@nldd/design-system 0.8.83 → 0.8.85
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 +3436 -477
- 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/button/button.styles.d.ts.map +1 -1
- package/dist/components/actions/button/button.styles.js +11 -0
- package/dist/components/actions/button/button.styles.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 +2046 -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 +6 -4
- 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 +5 -1
- package/dist/components/content/icon/icon-registry.js.map +1 -1
- package/dist/components/content/icon/icon.d.ts +13 -0
- package/dist/components/content/icon/icon.d.ts.map +1 -1
- package/dist/components/content/icon/icon.js +16 -0
- package/dist/components/content/icon/icon.js.map +1 -1
- package/dist/components/content/icon/icon.styles.d.ts.map +1 -1
- package/dist/components/content/icon/icon.styles.js +29 -1
- package/dist/components/content/icon/icon.styles.js.map +1 -1
- package/dist/components/content/image/image.d.ts +1 -1
- package/dist/components/content/image/image.js +1 -1
- package/dist/components/content/image/image.styles.d.ts.map +1 -1
- package/dist/components/content/image/image.styles.js +11 -0
- package/dist/components/content/image/image.styles.js.map +1 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.d.ts +30 -30
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.js +30 -30
- package/dist/components/content/rich-text/rich-text.d.ts +20 -20
- package/dist/components/content/rich-text/rich-text.js +20 -20
- package/dist/components/content/text/text.d.ts +6 -0
- package/dist/components/content/text/text.d.ts.map +1 -1
- package/dist/components/content/text/text.js +6 -0
- package/dist/components/content/text/text.js.map +1 -1
- package/dist/components/content/text/text.styles.d.ts.map +1 -1
- package/dist/components/content/text/text.styles.js +2 -0
- package/dist/components/content/text/text.styles.js.map +1 -1
- 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-Cd4BloIM.js} +41 -3
- package/dist/components/{icon-button-BYy6hnAY.js → icon-button-CXN0yaVx.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 +113 -7
- package/dist/nldd.min.js +899 -756
- package/dist/types/vue.d.ts +442 -292
- 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
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Nederlandse Digitale Dienst Validation List (Lit + TypeScript)
|
|
9
|
+
*
|
|
10
|
+
* Everything a value has to satisfy, in one list. A requirement you can state
|
|
11
|
+
* up front is an item with a rule, and it checks itself while you type. One
|
|
12
|
+
* only a server can decide is an item without a rule, and the app names it in
|
|
13
|
+
* `unmet` on the control.
|
|
14
|
+
*
|
|
15
|
+
* The list has two modes and `judging` is the switch. Before a verdict it shows
|
|
16
|
+
* its hints, which are the requirements of the field. After one it shows
|
|
17
|
+
* everything the value does not satisfy, and the hints are gone. It throws that
|
|
18
|
+
* switch itself the moment its control turns `invalid`, so when the field is
|
|
19
|
+
* judged is the consumer's decision, and the right moment is on submit.
|
|
20
|
+
*
|
|
21
|
+
* Hints are off by default. A phone number does not need its format spelled out
|
|
22
|
+
* before anyone has typed, while the rules for a password do.
|
|
23
|
+
*
|
|
24
|
+
* There are no checkmarks. The control already shows a validation icon of its
|
|
25
|
+
* own, and repeating that per line says the same thing three times.
|
|
26
|
+
*
|
|
27
|
+
* @element nldd-validation-list
|
|
28
|
+
*
|
|
29
|
+
* @attr {string} for - Id of the control this list is about. Not needed inside an nldd-form-field, which hands its own control over.
|
|
30
|
+
* @attr {boolean} hint - Show every item before there is a verdict, as the requirements of the field. Overridable per item.
|
|
31
|
+
* @attr {boolean} judging - Drop the hints, because this field has been judged. Turned on by the list itself once its control is `invalid`, and settable by hand. What turns red follows `invalid`, not this.
|
|
32
|
+
*
|
|
33
|
+
* @slot - nldd-validation-item elements.
|
|
34
|
+
*
|
|
35
|
+
* ─────────────────────────────────────────────────────────────────────────
|
|
36
|
+
*
|
|
37
|
+
* @element nldd-validation-item
|
|
38
|
+
*
|
|
39
|
+
* @attr {string} match - Regular expression the value has to contain. Not anchored, unlike the native `pattern`: `[A-Z]` means "has a capital in it".
|
|
40
|
+
* @attr {number} minlength - Fewest characters the value may have.
|
|
41
|
+
* @attr {number} maxlength - Most characters the value may have.
|
|
42
|
+
* @attr {boolean} required - The value may not be empty. Use it on a field whose other rules would pass an empty value.
|
|
43
|
+
* @attr {boolean} hint - Show this item before there is a verdict, whatever the list says.
|
|
44
|
+
* @attr {boolean} unmet - Whether the value fails this item. Managed by the list; do not set it yourself.
|
|
45
|
+
* @attr {boolean} visible - Whether the item is on screen. Managed by the list.
|
|
46
|
+
*
|
|
47
|
+
* @slot - The text of the requirement.
|
|
48
|
+
*
|
|
49
|
+
* ─────────────────────────────────────────────────────────────────────────
|
|
50
|
+
*
|
|
51
|
+
* Give every item an id that names its field as well as its rule. An id has to
|
|
52
|
+
* be unique in the whole document, and `length` is the first thing three fields
|
|
53
|
+
* in one form will all reach for.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* <nldd-form-field label="Wachtwoord">
|
|
57
|
+
* <nldd-password-field name="password" invalid unmet="password-breach"></nldd-password-field>
|
|
58
|
+
* <nldd-validation-list hint>
|
|
59
|
+
* <nldd-validation-item id="password-length" minlength="8">Minimaal 8 tekens</nldd-validation-item>
|
|
60
|
+
* <nldd-validation-item id="password-capital" match="[A-Z]">Een hoofdletter</nldd-validation-item>
|
|
61
|
+
* <nldd-validation-item id="password-breach">Dit wachtwoord staat in een bekend datalek</nldd-validation-item>
|
|
62
|
+
* </nldd-validation-list>
|
|
63
|
+
* </nldd-form-field>
|
|
64
|
+
*/
|
|
65
|
+
import { LitElement } from 'lit';
|
|
66
|
+
import { customElement, property, state } from 'lit/decorators.js';
|
|
67
|
+
import { validationListStyles, validationItemStyles } from './validation-list.styles.js';
|
|
68
|
+
import { validationListTemplate, validationItemTemplate } from './validation-list.template.js';
|
|
69
|
+
/* ============================================================
|
|
70
|
+
nldd-validation-item
|
|
71
|
+
============================================================ */
|
|
72
|
+
let NLDDValidationItem = class NLDDValidationItem extends LitElement {
|
|
73
|
+
constructor() {
|
|
74
|
+
super(...arguments);
|
|
75
|
+
/** Not anchored, unlike the native `pattern`. See the note at the top. */
|
|
76
|
+
this.match = '';
|
|
77
|
+
/** For a field whose other rules would pass an empty value. See `test`. */
|
|
78
|
+
this.required = false;
|
|
79
|
+
this.hint = false;
|
|
80
|
+
this.unmet = false;
|
|
81
|
+
this.visible = false;
|
|
82
|
+
}
|
|
83
|
+
/** Whether this item judges itself, or waits for the app to name it. */
|
|
84
|
+
get hasRule() {
|
|
85
|
+
return this.required
|
|
86
|
+
|| Boolean(this.match)
|
|
87
|
+
|| this.minlength !== undefined
|
|
88
|
+
|| this.maxlength !== undefined;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Whether `value` satisfies this item, or null when there is nothing to
|
|
92
|
+
* satisfy because the item carries no rule.
|
|
93
|
+
*
|
|
94
|
+
* An empty value is held against the rules like any other, so "minimaal 8
|
|
95
|
+
* tekens" fails on it, because it does. What keeps a fresh field from
|
|
96
|
+
* lighting up all of its requirements is not this method but the verdict: an
|
|
97
|
+
* item only turns critical once the control says `invalid`, and an untouched
|
|
98
|
+
* field has not been judged yet.
|
|
99
|
+
*/
|
|
100
|
+
test(value) {
|
|
101
|
+
if (!this.hasRule)
|
|
102
|
+
return null;
|
|
103
|
+
if (this.required && !value)
|
|
104
|
+
return false;
|
|
105
|
+
if (this.minlength !== undefined && value.length < this.minlength)
|
|
106
|
+
return false;
|
|
107
|
+
if (this.maxlength !== undefined && value.length > this.maxlength)
|
|
108
|
+
return false;
|
|
109
|
+
if (this.match && !new RegExp(this.match, 'u').test(value))
|
|
110
|
+
return false;
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
connectedCallback() {
|
|
114
|
+
super.connectedCallback();
|
|
115
|
+
this.setAttribute('role', 'listitem');
|
|
116
|
+
}
|
|
117
|
+
render() {
|
|
118
|
+
return validationItemTemplate(this);
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
NLDDValidationItem.styles = validationItemStyles;
|
|
122
|
+
__decorate([
|
|
123
|
+
property({ type: String })
|
|
124
|
+
], NLDDValidationItem.prototype, "match", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
property({ type: Number })
|
|
127
|
+
], NLDDValidationItem.prototype, "minlength", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
property({ type: Number })
|
|
130
|
+
], NLDDValidationItem.prototype, "maxlength", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
property({ type: Boolean, reflect: true })
|
|
133
|
+
], NLDDValidationItem.prototype, "required", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
property({ type: Boolean, reflect: true })
|
|
136
|
+
], NLDDValidationItem.prototype, "hint", void 0);
|
|
137
|
+
__decorate([
|
|
138
|
+
property({ type: Boolean, reflect: true })
|
|
139
|
+
], NLDDValidationItem.prototype, "unmet", void 0);
|
|
140
|
+
__decorate([
|
|
141
|
+
property({ type: Boolean, reflect: true })
|
|
142
|
+
], NLDDValidationItem.prototype, "visible", void 0);
|
|
143
|
+
NLDDValidationItem = __decorate([
|
|
144
|
+
customElement('nldd-validation-item')
|
|
145
|
+
], NLDDValidationItem);
|
|
146
|
+
export { NLDDValidationItem };
|
|
147
|
+
/* ============================================================
|
|
148
|
+
nldd-validation-list
|
|
149
|
+
============================================================ */
|
|
150
|
+
let NLDDValidationList = class NLDDValidationList extends LitElement {
|
|
151
|
+
constructor() {
|
|
152
|
+
super(...arguments);
|
|
153
|
+
/** Id of the control, for a list that sits outside an nldd-form-field. */
|
|
154
|
+
this.for = '';
|
|
155
|
+
this.hint = false;
|
|
156
|
+
/**
|
|
157
|
+
* Whether the list is judging the value or explaining what the field wants.
|
|
158
|
+
*
|
|
159
|
+
* The switch between the two modes. Off, the hints state the requirements;
|
|
160
|
+
* on, they are gone and what is left is whatever the value fails. It goes on
|
|
161
|
+
* the moment the control is `invalid`, and then stays on. A field that has
|
|
162
|
+
* been judged does not become unjudged: repair the value and the control
|
|
163
|
+
* turns valid again, but the question the hints answered has been asked and
|
|
164
|
+
* settled, so bringing them back would undo the one thing the verdict
|
|
165
|
+
* achieved.
|
|
166
|
+
*
|
|
167
|
+
* What it does not decide is what turns red. That follows `invalid` on the
|
|
168
|
+
* control and nothing else, so a line never goes critical under a field that
|
|
169
|
+
* looks fine.
|
|
170
|
+
*
|
|
171
|
+
* So when a field starts being judged is decided by whoever writes `invalid`
|
|
172
|
+
* on the control, and the moment to do that is on submit. Writing it while
|
|
173
|
+
* someone is still typing turns a field red about a value that is not
|
|
174
|
+
* finished, which is the one thing this list is built to avoid.
|
|
175
|
+
*
|
|
176
|
+
* Set it yourself to flip the mode without a control saying anything, and
|
|
177
|
+
* clear it to put the field back the way it started, which is what a reset
|
|
178
|
+
* wants.
|
|
179
|
+
*/
|
|
180
|
+
this.judging = false;
|
|
181
|
+
/**
|
|
182
|
+
* The control this list is about.
|
|
183
|
+
*
|
|
184
|
+
* Set by the wrapping nldd-form-field, which already answers "which control
|
|
185
|
+
* is this field about" for the label and the description. A `for` of its own
|
|
186
|
+
* wins, and setting this property directly is what a test or a story does.
|
|
187
|
+
*/
|
|
188
|
+
this.control = null;
|
|
189
|
+
this._resolved = null;
|
|
190
|
+
this._observer = null;
|
|
191
|
+
this._onInput = () => this._evaluate();
|
|
192
|
+
}
|
|
193
|
+
connectedCallback() {
|
|
194
|
+
super.connectedCallback();
|
|
195
|
+
this._resolve();
|
|
196
|
+
}
|
|
197
|
+
disconnectedCallback() {
|
|
198
|
+
super.disconnectedCallback();
|
|
199
|
+
this._detach();
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Resolving and latching happen before the render, not after it.
|
|
203
|
+
*
|
|
204
|
+
* Both write a reactive property, `_resolved` and `judging`, and writing one
|
|
205
|
+
* from `updated()` asks for a second render on top of the one that just
|
|
206
|
+
* finished. That is a dev-mode warning on every field that arrives already
|
|
207
|
+
* invalid. Reading what they need does not take a render: the control is
|
|
208
|
+
* found by id or handed over as a property, and the items are light DOM.
|
|
209
|
+
*/
|
|
210
|
+
willUpdate(changed) {
|
|
211
|
+
if (changed.has('for') || changed.has('control'))
|
|
212
|
+
this._resolve();
|
|
213
|
+
this._latchJudging();
|
|
214
|
+
}
|
|
215
|
+
updated() {
|
|
216
|
+
this._evaluate();
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* A field that has been judged does not become unjudged, so this only ever
|
|
220
|
+
* goes on. What turns red is `invalid` and nothing else; this decides only
|
|
221
|
+
* whether the hints are still on screen.
|
|
222
|
+
*/
|
|
223
|
+
_latchJudging() {
|
|
224
|
+
if (this._resolved?.hasAttribute('invalid'))
|
|
225
|
+
this.judging = true;
|
|
226
|
+
}
|
|
227
|
+
render() {
|
|
228
|
+
return validationListTemplate(this);
|
|
229
|
+
}
|
|
230
|
+
get _items() {
|
|
231
|
+
return Array.from(this.children)
|
|
232
|
+
.filter((el) => el instanceof NLDDValidationItem);
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Finds the control and starts listening to it.
|
|
236
|
+
*
|
|
237
|
+
* `getRootNode()` and not `document`: an IDREF only resolves inside its own
|
|
238
|
+
* tree, and a consumer who puts this form inside a component of their own
|
|
239
|
+
* would otherwise find nothing.
|
|
240
|
+
*/
|
|
241
|
+
_resolve() {
|
|
242
|
+
const root = this.getRootNode();
|
|
243
|
+
const next = this.for ? root.getElementById?.(this.for) ?? null : this.control;
|
|
244
|
+
// `_observer` and not just the control: taking this element out of the DOM
|
|
245
|
+
// and putting it back, which is what a consumer portalling a sheet to the
|
|
246
|
+
// body does, runs disconnectedCallback and takes the listener with it. The
|
|
247
|
+
// control never changed, so comparing only that would find no work to do
|
|
248
|
+
// and the list would sit there reacting to nothing.
|
|
249
|
+
if (next === this._resolved && this._observer)
|
|
250
|
+
return;
|
|
251
|
+
this._detach();
|
|
252
|
+
this._resolved = next;
|
|
253
|
+
if (!next)
|
|
254
|
+
return;
|
|
255
|
+
next.addEventListener('input', this._onInput);
|
|
256
|
+
this._observer = new MutationObserver(() => {
|
|
257
|
+
this._latchJudging();
|
|
258
|
+
this._evaluate();
|
|
259
|
+
});
|
|
260
|
+
this._observer.observe(next, { attributes: true, attributeFilter: ['invalid', 'unmet'] });
|
|
261
|
+
}
|
|
262
|
+
_detach() {
|
|
263
|
+
this._resolved?.removeEventListener('input', this._onInput);
|
|
264
|
+
this._observer?.disconnect();
|
|
265
|
+
this._observer = null;
|
|
266
|
+
}
|
|
267
|
+
_currentValue() {
|
|
268
|
+
if (this.value !== undefined)
|
|
269
|
+
return this.value;
|
|
270
|
+
const control = this._resolved;
|
|
271
|
+
return control?.value === undefined || control.value === null ? '' : String(control.value);
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Decides per item whether it is met, and what that makes visible.
|
|
275
|
+
*
|
|
276
|
+
* An item with a rule judges itself; one without waits to be named in
|
|
277
|
+
* `unmet` on the control. Never both: a rule is held against the value as it
|
|
278
|
+
* is now, while `unmet` is a snapshot of the last check and therefore older,
|
|
279
|
+
* so letting the snapshot win would show a mistake that has been fixed.
|
|
280
|
+
*/
|
|
281
|
+
_evaluate() {
|
|
282
|
+
const control = this._resolved;
|
|
283
|
+
// The two attributes answer two questions and are kept apart on purpose.
|
|
284
|
+
// `invalid` decides what turns critical, so a line never goes red under a
|
|
285
|
+
// field that looks fine; `judging` only decides whether the hints are
|
|
286
|
+
// still on screen, and unlike `invalid` it does not come back off.
|
|
287
|
+
const invalid = control?.hasAttribute('invalid') ?? false;
|
|
288
|
+
const named = (control?.getAttribute('unmet') ?? '').split(' ').filter(Boolean);
|
|
289
|
+
const value = this._currentValue();
|
|
290
|
+
let anyVisible = false;
|
|
291
|
+
let anyRuleFails = false;
|
|
292
|
+
const messages = [];
|
|
293
|
+
for (const item of this._items) {
|
|
294
|
+
const rule = item.test(value);
|
|
295
|
+
const failing = rule === null ? named.includes(item.id) : !rule;
|
|
296
|
+
if (import.meta.env?.DEV && rule !== null && named.includes(item.id)) {
|
|
297
|
+
console.warn(`<nldd-validation-list>: item "${item.id}" has a rule of its own and is also named in \`unmet\`. `
|
|
298
|
+
+ 'The rule decides, and the name is ignored: it is a snapshot of the previous check and cannot be newer '
|
|
299
|
+
+ 'than the value. Drop it from `unmet`, or take the rule off the item.');
|
|
300
|
+
}
|
|
301
|
+
item.unmet = invalid && failing;
|
|
302
|
+
item.visible = item.unmet || (!this.judging && (item.hint || this.hint));
|
|
303
|
+
if (item.visible)
|
|
304
|
+
anyVisible = true;
|
|
305
|
+
if (rule === false) {
|
|
306
|
+
anyRuleFails = true;
|
|
307
|
+
messages.push(item.textContent?.trim() ?? '');
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
this.classList.toggle('has-items', anyVisible);
|
|
311
|
+
this._reportValidity(anyRuleFails, messages);
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Hands the verdict to the control, so a form with a failing rule does not
|
|
315
|
+
* submit.
|
|
316
|
+
*
|
|
317
|
+
* Only the rules. What the app named in `unmet` it already knows, and
|
|
318
|
+
* reporting that back would be this list telling the app what the app told
|
|
319
|
+
* it.
|
|
320
|
+
*
|
|
321
|
+
* Through `setCustomValidity` and not into `internals` directly. A control
|
|
322
|
+
* reports its own `required` and `pattern` through the same channel, and
|
|
323
|
+
* `setValidity` writes the whole set of flags at once: writing here would
|
|
324
|
+
* erase those on the way in, and they would erase this on the next render.
|
|
325
|
+
* The platform's own name for a reason of your own is the one both sides
|
|
326
|
+
* understand, and a plain native input answers to it too.
|
|
327
|
+
*/
|
|
328
|
+
_reportValidity(fails, messages) {
|
|
329
|
+
const control = this._resolved;
|
|
330
|
+
if (!control?.setCustomValidity)
|
|
331
|
+
return;
|
|
332
|
+
control.setCustomValidity(fails ? messages.filter(Boolean).join('. ') : '');
|
|
333
|
+
}
|
|
334
|
+
};
|
|
335
|
+
NLDDValidationList.styles = validationListStyles;
|
|
336
|
+
__decorate([
|
|
337
|
+
property({ type: String })
|
|
338
|
+
], NLDDValidationList.prototype, "for", void 0);
|
|
339
|
+
__decorate([
|
|
340
|
+
property({ type: Boolean, reflect: true })
|
|
341
|
+
], NLDDValidationList.prototype, "hint", void 0);
|
|
342
|
+
__decorate([
|
|
343
|
+
property({ type: Boolean, reflect: true })
|
|
344
|
+
], NLDDValidationList.prototype, "judging", void 0);
|
|
345
|
+
__decorate([
|
|
346
|
+
property({ attribute: false })
|
|
347
|
+
], NLDDValidationList.prototype, "control", void 0);
|
|
348
|
+
__decorate([
|
|
349
|
+
property({ attribute: false })
|
|
350
|
+
], NLDDValidationList.prototype, "value", void 0);
|
|
351
|
+
__decorate([
|
|
352
|
+
state()
|
|
353
|
+
], NLDDValidationList.prototype, "_resolved", void 0);
|
|
354
|
+
NLDDValidationList = __decorate([
|
|
355
|
+
customElement('nldd-validation-list')
|
|
356
|
+
], NLDDValidationList);
|
|
357
|
+
export { NLDDValidationList };
|
|
358
|
+
//# sourceMappingURL=validation-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation-list.js","sourceRoot":"","sources":["../../../../src/components/forms/validation-list/validation-list.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,OAAO,EAAE,UAAU,EAAuB,MAAM,KAAK,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACzF,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAU/F;;kEAEkE;AAG3D,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,UAAU;IAA3C;;QAGN,0EAA0E;QAE1E,UAAK,GAAG,EAAE,CAAC;QAQX,2EAA2E;QAE3E,aAAQ,GAAG,KAAK,CAAC;QAGjB,SAAI,GAAG,KAAK,CAAC;QAGb,UAAK,GAAG,KAAK,CAAC;QAGd,YAAO,GAAG,KAAK,CAAC;IAqCjB,CAAC;IAnCA,wEAAwE;IACxE,IAAI,OAAO;QACV,OAAO,IAAI,CAAC,QAAQ;eAChB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;eACnB,I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AiB,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC7E,CAAC;;AAjNe,yBAAM,GAAG,oBAAoB,AAAvB,CAAwB;AAI9C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAClB;AAGT;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDAC9B;AA2Bb;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;mDAC3B;AAUhB;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;mDACA;AAI/B;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;iDAChB;AAGP;IADP,KAAK,EAAE;qDACiC;AApD7B,kBAAkB;IAD9B,aAAa,CAAC,sBAAsB,CAAC;GACzB,kBAAkB,CAmN9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation-list.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/validation-list/validation-list.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB,yBA2BhC,CAAC;AAGF,eAAO,MAAM,oBAAoB,yBA2BhC,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const validationListStyles = css `
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
/* # Host */
|
|
6
|
+
|
|
7
|
+
:host {
|
|
8
|
+
--_gap: var(--primitives-space-2);
|
|
9
|
+
|
|
10
|
+
display: block;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:host(:not(.has-items)) {
|
|
14
|
+
display: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:host([hidden]) {
|
|
18
|
+
display: none;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
/* # List */
|
|
23
|
+
|
|
24
|
+
.validation-list {
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
gap: var(--_gap);
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
30
|
+
export const validationItemStyles = css `
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
/* # Host */
|
|
34
|
+
|
|
35
|
+
:host {
|
|
36
|
+
--_content-color: var(--semantics-content-color);
|
|
37
|
+
--_font: var(--primitives-font-body-sm-regular-tight);
|
|
38
|
+
|
|
39
|
+
display: none;
|
|
40
|
+
color: var(--_content-color);
|
|
41
|
+
font: var(--_font);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:host([visible]) {
|
|
45
|
+
display: block;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:host([unmet]) {
|
|
49
|
+
--_content-color: var(--semantics-content-critical-color);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* After the visible rule at equal specificity: hidden must also win on an
|
|
53
|
+
item that is currently shown. */
|
|
54
|
+
:host([hidden]) {
|
|
55
|
+
display: none;
|
|
56
|
+
}
|
|
57
|
+
`;
|
|
58
|
+
//# sourceMappingURL=validation-list.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation-list.styles.js","sourceRoot":"","sources":["../../../../src/components/forms/validation-list/validation-list.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAG1B,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BtC,CAAC;AAGF,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BtC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { TemplateResult } from 'lit';
|
|
2
|
+
import type { NLDDValidationList, NLDDValidationItem } from './validation-list.js';
|
|
3
|
+
export declare function validationListTemplate(_component: NLDDValidationList): TemplateResult;
|
|
4
|
+
export declare function validationItemTemplate(_component: NLDDValidationItem): TemplateResult;
|
|
5
|
+
//# sourceMappingURL=validation-list.template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation-list.template.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/validation-list/validation-list.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,cAAc,EAAE,MAAM,KAAK,CAAC;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAEnF,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,kBAAkB,GAAG,cAAc,CAQrF;AAED,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,kBAAkB,GAAG,cAAc,CAIrF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
export function validationListTemplate(_component) {
|
|
3
|
+
return html `
|
|
4
|
+
<div class="validation-list"
|
|
5
|
+
role="list"
|
|
6
|
+
>
|
|
7
|
+
<slot></slot>
|
|
8
|
+
</div>
|
|
9
|
+
`;
|
|
10
|
+
}
|
|
11
|
+
export function validationItemTemplate(_component) {
|
|
12
|
+
return html `
|
|
13
|
+
<slot></slot>
|
|
14
|
+
`;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=validation-list.template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation-list.template.js","sourceRoot":"","sources":["../../../../src/components/forms/validation-list/validation-list.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAC;AAG3C,MAAM,UAAU,sBAAsB,CAAC,UAA8B;IACpE,OAAO,IAAI,CAAA;;;;;;EAMV,CAAC;AACH,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,UAA8B;IACpE,OAAO,IAAI,CAAA;;EAEV,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { t as __decorate } from "./decorate-
|
|
2
|
+
import { t as __decorate } from "./decorate-lwt_OrAG.js";
|
|
3
3
|
import { t as reflectNonDefault } from "./reflect-non-default-OLaK60rT.js";
|
|
4
4
|
import { LitElement, css, html } from "lit";
|
|
5
5
|
import { customElement, property, state } from "lit/decorators.js";
|
|
@@ -21,6 +21,7 @@ var iconStyles = css`
|
|
|
21
21
|
--_size: 100%;
|
|
22
22
|
--_color: inherit;
|
|
23
23
|
--_custom-color: inherit;
|
|
24
|
+
--_glyph-scale: 1;
|
|
24
25
|
|
|
25
26
|
display: inline-flex;
|
|
26
27
|
width: var(--_size);
|
|
@@ -95,7 +96,34 @@ var iconStyles = css`
|
|
|
95
96
|
|
|
96
97
|
svg {
|
|
97
98
|
display: block;
|
|
98
|
-
width: 100
|
|
99
|
+
width: calc(100% * var(--_glyph-scale));
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
/* # Box
|
|
104
|
+
*
|
|
105
|
+
* The colour question turns around: [color] and [custom-color] paint the
|
|
106
|
+
* box, and the glyph takes whatever contrasts with it. That flip is the
|
|
107
|
+
* reason this is a component option and not a box a consumer builds; the
|
|
108
|
+
* pair is the part a consumer cannot check by eye.
|
|
109
|
+
*
|
|
110
|
+
* [size] measures the box, so the same size renders a smaller glyph with
|
|
111
|
+
* [box] than without. Four fifths of the box, and a radius of a fifth,
|
|
112
|
+
* both written as a ratio so a change lands everywhere at once. */
|
|
113
|
+
|
|
114
|
+
:host([box]) {
|
|
115
|
+
--_glyph-scale: calc(4 / 5);
|
|
116
|
+
|
|
117
|
+
border-radius: calc(var(--_size) / 5);
|
|
118
|
+
background-color: currentColor;
|
|
119
|
+
height: var(--_size);
|
|
120
|
+
justify-content: center;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* Resolved against the host's currentColor, which the rule above painted the
|
|
124
|
+
box with, and only then assigned to the glyph. Same route as nldd-badge. */
|
|
125
|
+
:host([box]) svg {
|
|
126
|
+
color: var(--semantics-content-contrast-color);
|
|
99
127
|
}
|
|
100
128
|
`;
|
|
101
129
|
//#endregion
|
|
@@ -373,6 +401,7 @@ var aliases = {
|
|
|
373
401
|
"countdown": "timer",
|
|
374
402
|
"sfp": "transceiver-module",
|
|
375
403
|
"delete": "trash",
|
|
404
|
+
"tools": "screwdriver-wrench",
|
|
376
405
|
"path": "point-bottom-left-to-point-top-right-s-curve-path",
|
|
377
406
|
"traject": "point-bottom-left-to-point-top-right-s-curve-path",
|
|
378
407
|
"power": "power-plug",
|
|
@@ -676,6 +705,7 @@ var iconRegistry = /* @__PURE__ */ new Map([
|
|
|
676
705
|
["moon", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M10.47 2.12a8.99 8.99 0 0 0 11.41 11.4 10 10 0 1 1-11.4-11.4M8 5.07A8 8 0 1 0 18.93 16 11 11 0 0 1 8 5.07\"/>\n</svg>"],
|
|
677
706
|
["network-structure", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M12 1a3 3 0 0 1 2.89 3.8l1.95 1.13A2.99 2.99 0 0 1 22 8a3 3 0 0 1-2.32 2.92v2.16a3 3 0 1 1-2.84 5l-1.95 1.12a3 3 0 1 1-5.78 0l-1.95-1.13A2.99 2.99 0 0 1 2 16a3 3 0 0 1 2.32-2.92v-2.16a3 3 0 1 1 2.84-5L9.11 4.8A3 3 0 0 1 12 1m0 18a1 1 0 1 0 0 2 1 1 0 0 0 0-2m-4.1-3.79c.13.5.13 1.06 0 1.55l1.96 1.14a3 3 0 0 1 1.39-.8v-2.2a3 3 0 0 1-1.4-.81zm6.25-1.12a3 3 0 0 1-1.4.81v2.2a3 3 0 0 1 1.39.8l1.96-1.14a3 3 0 0 1 0-1.55zM5 15a1 1 0 1 0 0 2 1 1 0 0 0 0-2m14 0a1 1 0 1 0 0 2 1 1 0 0 0 0-2m-4.1-3.79c.13.5.13 1.07 0 1.58l1.95 1.12a3 3 0 0 1 1.33-.8v-2.23a3 3 0 0 1-1.33-.79zm-7.75-1.12a3 3 0 0 1-1.33.8v2.23a3 3 0 0 1 1.33.79l1.96-1.12a3 3 0 0 1 0-1.58zM12 11a1 1 0 1 0 0 2 1 1 0 0 0 0-2M7.9 7.23c.13.5.13 1.06 0 1.56L9.84 9.9a3 3 0 0 1 1.4-.81V6.9a3 3 0 0 1-1.4-.8zm6.24-1.13a3 3 0 0 1-1.39.8v2.2a3 3 0 0 1 1.4.8l1.95-1.1a3 3 0 0 1 0-1.56zM5 7a1 1 0 1 0 0 2 1 1 0 0 0 0-2m14 0a1 1 0 1 0 0 2 1 1 0 0 0 0-2m-7-4a1 1 0 1 0 0 2 1 1 0 0 0 0-2\"/>\n</svg>"],
|
|
678
707
|
["network-switch", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M8 9h-2v-2h2v2z\"/>\n <path fill=\"currentColor\" d=\"M11.33 9h-2v-2h2v2z\"/>\n <path fill=\"currentColor\" d=\"M14.67 9h-2v-2h2v2z\"/>\n <path fill=\"currentColor\" d=\"M18 9h-2v-2h2v2z\"/>\n <path fill=\"currentColor\" d=\"M22 5v6c0 1.1-.9 2-2 2h-7v3.17c.85 .31 1.52 .98 1.83 1.83h7.17v2h-7.17c-.42 1.16-1.52 2-2.83 2c-1.31 0-2.41-.84-2.83-2h-7.17v-2h7.17c.31-.85 .98-1.52 1.83-1.83v-3.17h-7c-1.1 0-2-.9-2-2v-6c0-1.1 .9-2 2-2h16c1.1 0 2 .9 2 2zm-10 13c-.55 0-1 .45-1 1c0 .55 .45 1 1 1c.55 0 1-.45 1-1c0-.55-.45-1-1-1zm-8-7h16v-6h-16v6z\"/>\n</svg>"],
|
|
708
|
+
["note", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M17 7H7V8.5H17V7Z\"/>\n <path fill=\"currentColor\" d=\"M17 10H7V11.5H17V10Z\"/>\n <path fill=\"currentColor\" d=\"M12 14.5V13H7V14.5H12Z\"/>\n <path fill=\"currentColor\" d=\"M16.59 20.41L20.41 16.59C20.79 16.21 21 15.7 21 15.17V6C21 4.34 19.66 3 18 3H6C4.34 3 3 4.34 3 6V18C3 19.66 4.34 21 6 21H15.17C15.7 21 16.21 20.79 16.59 20.41ZM6 19C5.45 19 5 18.55 5 18V6C5 5.45 5.45 5 6 5H18C18.55 5 19 5.45 19 6V14H16C14.9 14 14 14.9 14 16V19H6ZM16 16H18.17L16 18.17V16Z\"/>\n</svg>"],
|
|
679
709
|
["numbered-list", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M5.43 14a2 2 0 0 1 1.3 3.4l-1.1 1.1H7.5V20h-4v-1.5l2.16-2.16a.5.5 0 0 0 .14-.4.5.5 0 0 0-.47-.44.5.5 0 0 0-.51.37l-1.45-.39A2 2 0 0 1 5.43 14M22 19H10v-2h12zM22 13H10v-2h12zM6.5 10H5V5.5H3.5V4h3zM22 7H10V5h12z\"/>\n</svg>"],
|
|
680
710
|
["paintbrush", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M18.13 2.51a2.39 2.39 0 0 1 3.35 3.35l-7.31 9.26A3.7 3.7 0 0 1 12 16.46c-.28 2.52-2.62 4.49-5.47 4.49a5.5 5.5 0 0 1-5.04-3h.04c1.38 0 2.5-.9 2.5-2a4 4 0 0 1 3.48-3.97 4 4 0 0 1 1.35-2.16zM8.04 13.95a2 2 0 0 0-2 2c0 1.1-.45 2-1.12 2.66q.72.33 1.62.34c1.66 0 3.5-1.2 3.5-3a2 2 0 0 0-2-2m2.07-2.56q-.43.35-.59.84a4 4 0 0 1 2.24 2.23q.49-.15.84-.58l1.08-1.37-2.2-2.2zm9.25-7.3-6.3 4.97 1.87 1.86 4.98-6.3c.27-.34-.2-.81-.55-.54\"/>\n</svg>"],
|
|
681
711
|
["paper-plane", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M19.7 2.74c.96-.31 1.87.6 1.56 1.57l-5.73 17.94c-.4.98-1.8 1.03-2.27.07L10.2 14.5a1.3 1.3 0 0 0-.7-.7l-7.72-3.03c-1.1-.42-1.04-2 .08-2.35zm-7.77 10.75q.08.15.13.29l2.25 5.74 3.94-12.36zm-7.45-3.8 5.74 2.25.3.13 6.32-6.32z\"/>\n</svg>"],
|
|
@@ -725,6 +755,7 @@ var iconRegistry = /* @__PURE__ */ new Map([
|
|
|
725
755
|
["rectangle-stack-text", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M14 17H6v-2h8zm4-4H6v-2h12z\"/>\n <path fill=\"currentColor\" d=\"M19 7a3 3 0 0 1 3 3v9a3 3 0 0 1-2.846 2.996L19 22H5l-.154-.004a3 3 0 0 1-2.842-2.842L2 19v-9a3 3 0 0 1 3-3zM5 9a1 1 0 0 0-1 1v9a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-9a1 1 0 0 0-1-1zm13.5-4.5A1.5 1.5 0 0 1 20 6H4a1.5 1.5 0 0 1 1.5-1.5zm-2-2.5A1.5 1.5 0 0 1 18 3.5H6A1.5 1.5 0 0 1 7.5 2z\"/>\n</svg>"],
|
|
726
756
|
["scissor", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M2.4 6.14a3 3 0 0 1 5.55 2.05l2.82 1.62 8.75-2.95a2 2 0 0 1 2.44.87L7.95 15.82a3 3 0 1 1-1-1.74L8.83 13a2 2 0 0 1 0-2L6.95 9.92A3 3 0 0 1 2.4 6.14m3.47 9.72a1 1 0 1 0-1.73 1 1 1 0 0 0 1.73-1m4.7-4.61a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5M5.5 6.77a1 1 0 1 0-1 1.74 1 1 0 0 0 1-1.74\"/>\n <path fill=\"currentColor\" d=\"M21.96 16.27a2 2 0 0 1-2.44.87l-7.5-2.53 3.53-2.04z\"/>\n</svg>"],
|
|
727
757
|
["score-meter", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M5.24 14.81a7 7 0 0 0 1.81 3.14l-2.12 2.12a10 10 0 0 1-2.59-4.48zm13.83-8.88a10 10 0 0 1 0 14.14l-2.12-2.12a7 7 0 0 0 0-9.9zm-3.33 3.75c.44.5.8 1.11 1 1.74l-3.27 1.89a1.5 1.5 0 1 1-1-1.73zM7.05 8.05A7 7 0 0 0 5 13H2a10 10 0 0 1 2.93-7.07zM12 3a10 10 0 0 1 5 1.34l-1.5 2.6a7 7 0 0 0-7 0L7 4.34A10 10 0 0 1 12 3\"/>\n</svg>"],
|
|
758
|
+
["screwdriver-wrench", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M11.29 14.71L9.65 16.35C9.87 16.86 10 17.41 10 18C10 20.21 8.21 22 6 22C5.41 22 4.86 21.87 4.35 21.65L6.15 19.85C6.34 19.66 6.34 19.34 6.15 19.15L4.85 17.85C4.66 17.66 4.34 17.66 4.15 17.85L2.35 19.65C2.13 19.14 2 18.59 2 18C2 15.79 3.79 14 6 14C6.59 14 7.14 14.13 7.65 14.35L7.97 14.02L8.2 13.98L10.17 13.59L11.29 14.71Z\"/>\n <path fill=\"currentColor\" d=\"M3.04 3.04C4.42 1.66 6.66 1.66 8.04 3.04L12.62 7.62C12.86 7.86 12.96 8.2 12.9 8.52L12.5 10.5L16.5 14.5L18.59 14.92C18.85 14.97 19.08 15.12 19.23 15.34L22 19.5L19.46 22L15.34 19.23C15.12 19.08 14.97 18.85 14.92 18.6L14.5 16.5L10.5 12.5L8.52 12.9L8.4 12.91C8.15 12.93 7.91 12.86 7.71 12.7L7.62 12.62L3.04 8.04C1.7 6.7 1.66 4.56 2.92 3.17L3.04 3.04ZM16.8 17.8L19.22 19.43L19.42 19.23L17.79 16.8L16.55 16.55L16.8 17.8ZM6.63 4.45C6.03 3.85 5.05 3.85 4.45 4.45C3.85 5.05 3.85 6.03 4.45 6.63L8.66 10.83L10.11 10.54L10.47 10.47L10.54 10.11L10.83 8.66L6.63 4.45Z\"/>\n <path fill=\"currentColor\" d=\"M18 2C18.59 2 19.14 2.13 19.65 2.35L17.85 4.15C17.66 4.34 17.66 4.66 17.85 4.85L19.15 6.15C19.34 6.34 19.66 6.34 19.85 6.15L21.65 4.35C21.87 4.86 22 5.41 22 6C22 8.21 20.21 10 18 10C17.41 10 16.86 9.87 16.35 9.65L14.71 11.29L13.59 10.17L13.98 8.2L14.02 7.97L14.35 7.65C14.13 7.14 14 6.59 14 6C14 3.79 15.79 2 18 2Z\"/>\n</svg>"],
|
|
728
759
|
["seal-check-mark", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"m15.66 7.41-4.7 4.71-2.71-2.7L9.66 8l1.3 1.3L14.25 6z\"/>\n <path fill=\"currentColor\" d=\"M12 1a8 8 0 0 1 5 14.24V23l-5-2-5 2v-7.76A8 8 0 0 1 12 1m3 15.42a8 8 0 0 1-6 0v3.62l3-1.2 3 1.2zM12 3a6 6 0 1 0 0 12 6 6 0 0 0 0-12\"/>\n</svg>"],
|
|
729
760
|
["seal-star", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M11.77 5.16a.25.25 0 0 1 .46 0l.87 2.1a.3.3 0 0 0 .22.15l2.27.18a.25.25 0 0 1 .14.44L14 9.51a.3.3 0 0 0-.08.25l.53 2.21a.25.25 0 0 1-.38.27l-1.94-1.18a.3.3 0 0 0-.26 0l-1.94 1.18a.25.25 0 0 1-.38-.27l.53-2.21a.3.3 0 0 0-.08-.25L8.27 8.03a.25.25 0 0 1 .15-.44l2.27-.18a.3.3 0 0 0 .2-.15z\"/>\n <path fill=\"currentColor\" d=\"M12 1a8 8 0 0 1 8 8 8 8 0 0 1-3 6.24V23l-5-2-5 2v-7.76A8 8 0 0 1 4 9a8 8 0 0 1 8-8m3 15.42a8 8 0 0 1-6 0v3.62l3-1.2 3 1.2zM12 3a6 6 0 1 0 0 12 6 6 0 0 0 0-12\"/>\n</svg>"],
|
|
730
761
|
["shield", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M16.43 4.58C13.55 3.63 10.45 3.63 7.57 4.58L5 5.44V11.72C5 13.72 6 15.6 7.67 16.71L12 19.6L16.33 16.71C18 15.6 19 13.72 19 11.72V5.44L16.43 4.58ZM21 11.97C20.92 14.55 19.59 16.94 17.44 18.38L12 22L6.56 18.38C4.41 16.94 3.08 14.55 3 11.97L3 5.44C3 4.58 3.55 3.82 4.37 3.54L6.94 2.69C10.22 1.59 13.78 1.59 17.06 2.69L19.63 3.54C20.45 3.82 21 4.58 21 5.44L21 11.97Z\"/>\n</svg>"],
|
|
@@ -774,9 +805,11 @@ var iconRegistry = /* @__PURE__ */ new Map([
|
|
|
774
805
|
["tray", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M21 6v12c0 1.66-1.34 3-3 3H6c-1.66 0-3-1.34-3-3V6a3 3 0 0 1 3-3h12c1.66 0 3 1.34 3 3M5 18a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-4h-3.126a4.002 4.002 0 0 1-7.748 0H5zM6 5a1 1 0 0 0-1 1v6h5v1c0 1.083.92 2 2 2s2-.918 2-2v-1h5V6a1 1 0 0 0-1-1z\"/>\n</svg>"],
|
|
775
806
|
["tree-structure", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M20 15a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2h-5a2 2 0 0 1-2-2v-3c0-1.1.9-2 2-2h1.5v-1a1 1 0 0 0-1-1H14c-.77 0-1.47-.3-2-.77-.53.48-1.23.77-2 .77H8.5a1 1 0 0 0-1 1v1H9a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-3c0-1.1.9-2 2-2h1.5v-1a3 3 0 0 1 3-3H10a1 1 0 0 0 1-1V9H9a2 2 0 0 1-2-2V4c0-1.1.9-2 2-2h6a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2h-2v1a1 1 0 0 0 1 1h1.5a3 3 0 0 1 3 3v1zM4 20h5v-3H4zm11 0h5v-3h-5zM9 7h6V4H9z\"/>\n</svg>"],
|
|
776
807
|
["triangle-square-circle", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M17.5 13a4.5 4.5 0 1 1 0 9 4.5 4.5 0 0 1 0-9m0 2a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M10 13a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-6a1 1 0 0 1 1-1zm-5 6h4v-4H5zm6.57-16.25a.5.5 0 0 1 .86 0l4.33 7.5a.5.5 0 0 1-.36.75H7.6a.5.5 0 0 1-.36-.75zM10.27 9h3.46L12 6z\"/>\n</svg>"],
|
|
808
|
+
["tulip", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M12 2c1.34.42 2.79 1.58 4.03 3.07A8 8 0 0 1 19 4.5V12a7 7 0 0 1-6 6.93V22h-2v-3.07A7 7 0 0 1 5 12V4.5q1.62 0 3.02.6C9.27 3.6 10.72 2.41 12 2M7 12a5 5 0 0 0 4 4.9v-4.4a6 6 0 0 0-4-5.66zm10-5.16a6 6 0 0 0-4 5.66v4.4a5 5 0 0 0 4-4.9zm-4.98-2.66A9 9 0 0 0 9.8 6.1q1.36 1.03 2.2 2.53a8 8 0 0 1 2.24-2.56 9 9 0 0 0-2.22-1.89\"/>\n</svg>"],
|
|
809
|
+
["tulip-light", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\">\n <path fill=\"currentColor\" d=\"M16 2c2.08.84 3.99 2.55 5.51 4.63A10 10 0 0 1 25 6v10a9 9 0 0 1-8 8.94V30h-2v-5.06A9 9 0 0 1 7 16V6q1.85 0 3.49.63C12 4.55 13.92 2.83 16 2M9 16a7 7 0 0 0 6 6.93V16a8 8 0 0 0-6-7.75zm14-7.75A8 8 0 0 0 17 16v6.93A7 7 0 0 0 23 16zm-7-4.04c-1.3.7-2.58 1.87-3.69 3.32 1.58 1 2.87 2.42 3.69 4.1.82-1.68 2.1-3.1 3.69-4.1A12 12 0 0 0 16 4.2\"/>\n</svg>"],
|
|
777
810
|
["underlined", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M20 22H4v-2h16zM8 13c0 1.33 1.43 3 4 3s4-1.67 4-3V2h2v11c0 2.76-2.69 5-6 5s-6-2.24-6-5V2h2z\"/>\n</svg>"],
|
|
778
811
|
["video-camera", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M20.283 5.264C20.91 4.62 22 5.064 22 5.96l-.013 12.24c.013.739-1.077 1.179-1.707.539L17 15.362V16.5c0 1.66-1.34 3-3 3H5c-1.66 0-3-1.34-3-3v-9a3 3 0 0 1 3-3h9c1.657 0 3 1.34 3 3v1.137zM5 6.5a1 1 0 0 0-1 1v9a1 1 0 0 0 1 1h9a1 1 0 0 0 1-1v-9a1 1 0 0 0-1-1zm12 5.005v.99l3 3.081V8.423z\"/>\n</svg>"],
|
|
779
|
-
["viewfinder", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M5 18a1 1 0 0 0 1
|
|
812
|
+
["viewfinder", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M5 18a1 1 0 0 0 1 1h3v2H6a3 3 0 0 1-3-3v-3h2zm16 0a3 3 0 0 1-3 3h-3v-2h3a1 1 0 0 0 1-1v-3h2zM9 5H6a1 1 0 0 0-1 1v3H3V6a3 3 0 0 1 3-3h3zm12 1v3h-2V6a1 1 0 0 0-1-1h-3V3h3a3 3 0 0 1 3 3\"/>\n</svg>"],
|
|
780
813
|
["viewfinder-line", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M5 18a1 1 0 0 0 1 1h3v2H6a3 3 0 0 1-3-3v-3h2zm16 0a3 3 0 0 1-3 3h-3v-2h3a1 1 0 0 0 1-1v-3h2zm1-5H2v-2h20zM9 5H6a1 1 0 0 0-1 1v3H3V6a3 3 0 0 1 3-3h3zm9-2a3 3 0 0 1 3 3v3h-2V6a1 1 0 0 0-1-1h-3V3z\"/>\n</svg>"],
|
|
781
814
|
["waving-crossing-lines", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M22 15c-4.83 0-7.45 .95-10.02 1.93c-2.65 1.01-5.29 2.07-9.98 2.07v-2c4.31 0 6.67-.94 9.27-1.93c2.68-1.02 5.56-2.07 10.73-2.07v2z\"/>\n <path fill=\"currentColor\" d=\"M18.18 16.24c1.11 .48 2.36 .76 3.82 .76v2c-2.81 0-4.97-.88-6.76-2.13c.88-.26 1.84-.47 2.94-.63z\"/>\n <path fill=\"currentColor\" d=\"M22 7c-4.66 0-7.18 1.83-9.77 3.8c-2.62 1.99-5.36 4.2-10.23 4.2v-2c4.13 0 6.39-1.79 9.02-3.8c2.66-2.03 5.64-4.2 10.98-4.2v2z\"/>\n <path fill=\"currentColor\" d=\"M12.69 11.7c.42 .47 .84 .93 1.26 1.38c-.74 .21-1.43 .45-2.08 .69c-.27-.29-.53-.58-.78-.87c.56-.4 1.09-.81 1.6-1.2z\"/>\n <path fill=\"currentColor\" d=\"M5.61 9c.65 .39 1.27 .89 1.88 1.48c-.31 .19-.63 .36-.95 .52h-4.54v-2h3.61z\"/>\n <path fill=\"currentColor\" d=\"M22 11h-8.38c1.05-.77 2.09-1.47 3.29-2h5.09v2z\"/>\n <path fill=\"currentColor\" d=\"M2 5c3.54 0 5.97 1.7 8 3.72c-.56 .43-1.1 .83-1.64 1.2c-1.77-1.73-3.66-2.92-6.36-2.92v-2z\"/>\n</svg>"],
|
|
782
815
|
["wheat", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M8 22H6v-3h2zm10 0h-2v-3h2zM3 14a4 4 0 0 1 4 4 4 4 0 0 1-4-4m8 0a4 4 0 0 1-4 4 4 4 0 0 1 4-4m2 0a4 4 0 0 1 4 4 4 4 0 0 1-4-4m8 0a4 4 0 0 1-4 4 4 4 0 0 1 4-4M3 10a4 4 0 0 1 4 4 4 4 0 0 1-4-4m8 0a4 4 0 0 1-4 4 4 4 0 0 1 4-4m2 0a4 4 0 0 1 4 4 4 4 0 0 1-4-4m8 0a4 4 0 0 1-4 4 4 4 0 0 1 4-4M3 6a4 4 0 0 1 4 4 4 4 0 0 1-4-4m8 0a4 4 0 0 1-4 4 4 4 0 0 1 4-4m2 0a4 4 0 0 1 4 4 4 4 0 0 1-4-4m8 0a4 4 0 0 1-4 4 4 4 0 0 1 4-4M7 2a4 4 0 0 1 0 5.29A4 4 0 0 1 7 2m10 0a4 4 0 0 1 0 5.29A4 4 0 0 1 17 2\"/>\n</svg>"]
|
|
@@ -797,6 +830,7 @@ var NLDDIcon = (_NLDDIcon = class NLDDIcon extends LitElement {
|
|
|
797
830
|
this.size = "";
|
|
798
831
|
this.color = "";
|
|
799
832
|
this.customColor = "";
|
|
833
|
+
this.box = false;
|
|
800
834
|
this._iconSvg = null;
|
|
801
835
|
}
|
|
802
836
|
connectedCallback() {
|
|
@@ -835,6 +869,10 @@ __decorate([property({
|
|
|
835
869
|
attribute: "custom-color",
|
|
836
870
|
converter: reflectNonDefault("")
|
|
837
871
|
})], NLDDIcon.prototype, "customColor", void 0);
|
|
872
|
+
__decorate([property({
|
|
873
|
+
type: Boolean,
|
|
874
|
+
reflect: true
|
|
875
|
+
})], NLDDIcon.prototype, "box", void 0);
|
|
838
876
|
__decorate([state()], NLDDIcon.prototype, "_iconSvg", void 0);
|
|
839
877
|
NLDDIcon = __decorate([customElement("nldd-icon")], NLDDIcon);
|
|
840
878
|
//#endregion
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as inheritedTextReset } from "./shadow-resets-aG-rgyNQ.js";
|
|
2
|
-
import { t as __decorate } from "./decorate-
|
|
3
|
-
import { t as withTranslations } from "./with-translations-
|
|
2
|
+
import { t as __decorate } from "./decorate-lwt_OrAG.js";
|
|
3
|
+
import { t as withTranslations } from "./with-translations-CqUV9S5g.js";
|
|
4
4
|
import { t as reflectNonDefault } from "./reflect-non-default-OLaK60rT.js";
|
|
5
|
-
import "./icon-
|
|
5
|
+
import "./icon-Cd4BloIM.js";
|
|
6
6
|
import { r as isTouchMode } from "./input-modality-DhTeUxKi.js";
|
|
7
7
|
import { LitElement, css, html, nothing } from "lit";
|
|
8
8
|
import { customElement, property, state } from "lit/decorators.js";
|
|
@@ -1102,7 +1102,7 @@ function tooltipTemplate(component) {
|
|
|
1102
1102
|
*
|
|
1103
1103
|
* @element nldd-tooltip
|
|
1104
1104
|
* @attr {string} text - Tooltip text
|
|
1105
|
-
* @attr {boolean} open - Forces the tooltip visible, whatever hover or focus does. Use it for programmatic feedback ("Copied", for instance). Reset it to false to restore the hover
|
|
1105
|
+
* @attr {boolean} open - Forces the tooltip visible, whatever hover or focus does. Use it for programmatic feedback ("Copied", for instance). Reset it to false to restore the hover behavior.
|
|
1106
1106
|
* @attr {string} placement - Position: 'top' | 'bottom' | 'left' | 'right' (default: 'bottom'; automatically 'top' on touch devices)
|
|
1107
1107
|
* @attr {string} timing - When the tooltip appears on hover: 'instant' — right away, without a show delay. 'default' — after the standard show delay (700ms). 'never' — the tooltip is never shown; hover and focus events are ignored, aria-describedby is suppressed, and a tooltip that is already visible disappears. The hide delay and the touch suppression stay in force under every value. A focus trigger is always instant.
|
|
1108
1108
|
*
|
|
@@ -1484,7 +1484,7 @@ var nlddIconButtonTranslations = { "components.icon-button.opens-in-new-tab-labe
|
|
|
1484
1484
|
* Nederlandse Digitale Dienst Icon Button Component (Lit + TypeScript)
|
|
1485
1485
|
*
|
|
1486
1486
|
* @element nldd-icon-button
|
|
1487
|
-
* @attr {string} variant - Button variant: 'accent-filled' | 'accent-transparent' | 'neutral-tinted' | 'neutral-transparent' | 'critical-tinted' | 'critical-transparent' | 'inherit-filled' | 'inherit-tinted' | 'primary' | 'secondary' | 'destructive'.
|
|
1487
|
+
* @attr {string} variant - Button variant: 'accent-filled' | 'accent-transparent' | 'neutral-tinted' | 'neutral-transparent' | 'critical-tinted' | 'critical-transparent' | 'inherit-filled' | 'inherit-tinted' | 'primary' | 'secondary' | 'destructive'. The inherit variants derive their colors from currentColor, for buttons on colored surfaces.
|
|
1488
1488
|
* @attr {string} size - Button size: 'xs' | 'sm' | 'md' | 'lg' (default: 'md')
|
|
1489
1489
|
* @attr {boolean} hide-lg-text - In lg size, hides the text label and enlarges the icon by one step (28px)
|
|
1490
1490
|
* @attr {boolean} no-highlight-border - Removes the per-variant highlight border (e.g. when a control group draws a single border instead).
|
|
@@ -31,6 +31,7 @@ export { NLDDTooltip } from './content/tooltip/tooltip.js';
|
|
|
31
31
|
export { NLDDForm } from './forms/form/form.js';
|
|
32
32
|
export { NLDDFormActions } from './forms/form-actions/form-actions.js';
|
|
33
33
|
export { NLDDFormField } from './forms/form-field/form-field.js';
|
|
34
|
+
export { NLDDValidationList } from './forms/validation-list/validation-list.js';
|
|
34
35
|
export { NLDDFormSection } from './forms/form-section/form-section.js';
|
|
35
36
|
export { NLDDCheckbox } from './inputs/checkbox/checkbox.js';
|
|
36
37
|
export { NLDDCheckboxField } from './inputs/checkbox-field/checkbox-field.js';
|