@nldd/design-system 0.8.44 → 0.8.46
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/dist/components/actions/button/button.d.ts +3 -0
- package/dist/components/actions/button/button.d.ts.map +1 -1
- package/dist/components/actions/button/button.js +26 -0
- 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 +170 -292
- package/dist/components/actions/button/button.styles.js.map +1 -1
- package/dist/components/actions/button/button.template.d.ts.map +1 -1
- package/dist/components/actions/button/button.template.js +4 -1
- package/dist/components/actions/button/button.template.js.map +1 -1
- package/dist/components/actions/button-bar/button-bar.styles.d.ts.map +1 -1
- package/dist/components/actions/button-bar/button-bar.styles.js +33 -79
- package/dist/components/actions/button-bar/button-bar.styles.js.map +1 -1
- package/dist/components/actions/button-group/button-group.styles.d.ts.map +1 -1
- package/dist/components/actions/button-group/button-group.styles.js +24 -37
- package/dist/components/actions/button-group/button-group.styles.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.d.ts +2 -0
- package/dist/components/actions/icon-button/icon-button.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.js +23 -0
- package/dist/components/actions/icon-button/icon-button.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.styles.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.styles.js +166 -292
- package/dist/components/actions/icon-button/icon-button.styles.js.map +1 -1
- package/dist/components/actions/split-button/split-button.styles.d.ts.map +1 -1
- package/dist/components/actions/split-button/split-button.styles.js +32 -67
- package/dist/components/actions/split-button/split-button.styles.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar.js +1 -0
- package/dist/components/actions/toolbar/toolbar.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar.styles.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar.styles.js +42 -95
- package/dist/components/actions/toolbar/toolbar.styles.js.map +1 -1
- package/dist/components/components.js +1 -1
- package/dist/components/content/blockquote/blockquote.d.ts +1 -9
- package/dist/components/content/blockquote/blockquote.d.ts.map +1 -1
- package/dist/components/content/blockquote/blockquote.js +1 -6
- package/dist/components/content/blockquote/blockquote.js.map +1 -1
- package/dist/components/content/blockquote/blockquote.styles.d.ts.map +1 -1
- package/dist/components/content/blockquote/blockquote.styles.js +11 -10
- package/dist/components/content/blockquote/blockquote.styles.js.map +1 -1
- package/dist/components/content/blockquote/blockquote.template.d.ts.map +1 -1
- package/dist/components/content/blockquote/blockquote.template.js +4 -7
- package/dist/components/content/blockquote/blockquote.template.js.map +1 -1
- package/dist/components/content/code/code.d.ts +4 -0
- package/dist/components/content/code/code.d.ts.map +1 -1
- package/dist/components/content/code/code.js +20 -0
- package/dist/components/content/code/code.js.map +1 -1
- package/dist/components/content/code/code.styles.d.ts.map +1 -1
- package/dist/components/content/code/code.styles.js +7 -23
- package/dist/components/content/code/code.styles.js.map +1 -1
- package/dist/components/content/icon/icon-aliases.d.ts.map +1 -1
- package/dist/components/content/icon/icon-aliases.js +16 -7
- package/dist/components/content/icon/icon-aliases.js.map +1 -1
- package/dist/components/content/icon/icon-registry.d.ts.map +1 -1
- package/dist/components/content/icon/icon-registry.js +7 -1
- package/dist/components/content/icon/icon-registry.js.map +1 -1
- package/dist/components/content/icon/icon.d.ts +26 -1
- package/dist/components/content/icon/icon.d.ts.map +1 -1
- package/dist/components/content/icon/icon.js +30 -1
- 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 +65 -14
- package/dist/components/content/icon/icon.styles.js.map +1 -1
- package/dist/components/content/icon/icon.template.d.ts.map +1 -1
- package/dist/components/content/icon/icon.template.js +1 -5
- package/dist/components/content/icon/icon.template.js.map +1 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.d.ts.map +1 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.js +7 -13
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.js.map +1 -1
- package/dist/components/content/tag/tag.d.ts +5 -0
- package/dist/components/content/tag/tag.d.ts.map +1 -1
- package/dist/components/content/tag/tag.js +22 -0
- package/dist/components/content/tag/tag.js.map +1 -1
- package/dist/components/content/tag/tag.styles.d.ts.map +1 -1
- package/dist/components/content/tag/tag.styles.js +12 -23
- package/dist/components/content/tag/tag.styles.js.map +1 -1
- package/dist/components/content/tag/tag.template.d.ts.map +1 -1
- package/dist/components/content/tag/tag.template.js +12 -8
- package/dist/components/content/tag/tag.template.js.map +1 -1
- package/dist/components/content/title/title.styles.d.ts.map +1 -1
- package/dist/components/content/title/title.styles.js +84 -97
- package/dist/components/content/title/title.styles.js.map +1 -1
- package/dist/components/content/tooltip/tooltip.styles.d.ts.map +1 -1
- package/dist/components/content/tooltip/tooltip.styles.js +12 -15
- package/dist/components/content/tooltip/tooltip.styles.js.map +1 -1
- package/dist/components/forms/form-actions/form-actions.styles.d.ts.map +1 -1
- package/dist/components/forms/form-actions/form-actions.styles.js +16 -16
- package/dist/components/forms/form-actions/form-actions.styles.js.map +1 -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 +42 -49
- package/dist/components/forms/form-field/form-field.styles.js.map +1 -1
- package/dist/components/{index-1v33GjGX.js → index-BvNDgQGM.js} +3494 -5439
- package/dist/components/inputs/checkbox/checkbox.styles.d.ts.map +1 -1
- package/dist/components/inputs/checkbox/checkbox.styles.js +4 -25
- package/dist/components/inputs/checkbox/checkbox.styles.js.map +1 -1
- package/dist/components/inputs/checkbox-field/checkbox-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/checkbox-field/checkbox-field.styles.js +3 -6
- package/dist/components/inputs/checkbox-field/checkbox-field.styles.js.map +1 -1
- package/dist/components/inputs/code-editor/code-editor.styles.d.ts.map +1 -1
- package/dist/components/inputs/code-editor/code-editor.styles.js +15 -17
- package/dist/components/inputs/code-editor/code-editor.styles.js.map +1 -1
- package/dist/components/inputs/combo-box/combo-box.d.ts +2 -0
- package/dist/components/inputs/combo-box/combo-box.d.ts.map +1 -1
- package/dist/components/inputs/combo-box/combo-box.js +5 -0
- 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 +33 -61
- 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 +1 -0
- package/dist/components/inputs/combo-box/combo-box.template.js.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.d.ts +8 -0
- package/dist/components/inputs/dropdown/dropdown.d.ts.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.js +17 -0
- package/dist/components/inputs/dropdown/dropdown.js.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.styles.d.ts.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.styles.js +82 -97
- package/dist/components/inputs/dropdown/dropdown.styles.js.map +1 -1
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.d.ts +2 -0
- 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 +5 -0
- 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.styles.d.ts.map +1 -1
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.js +32 -59
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.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 +1 -0
- 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.styles.d.ts.map +1 -1
- package/dist/components/inputs/number-field/number-field.styles.js +27 -52
- package/dist/components/inputs/number-field/number-field.styles.js.map +1 -1
- package/dist/components/inputs/password-field/password-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/password-field/password-field.styles.js +42 -89
- package/dist/components/inputs/password-field/password-field.styles.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 +1 -0
- package/dist/components/inputs/password-field/password-field.template.js.map +1 -1
- package/dist/components/inputs/radio-button/radio-button.styles.d.ts.map +1 -1
- package/dist/components/inputs/radio-button/radio-button.styles.js +5 -26
- package/dist/components/inputs/radio-button/radio-button.styles.js.map +1 -1
- package/dist/components/inputs/radio-button-field/radio-button-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/radio-button-field/radio-button-field.styles.js +3 -6
- package/dist/components/inputs/radio-button-field/radio-button-field.styles.js.map +1 -1
- package/dist/components/inputs/search-field/search-field.d.ts +2 -0
- package/dist/components/inputs/search-field/search-field.d.ts.map +1 -1
- package/dist/components/inputs/search-field/search-field.js +5 -0
- package/dist/components/inputs/search-field/search-field.js.map +1 -1
- package/dist/components/inputs/search-field/search-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/search-field/search-field.styles.js +38 -73
- package/dist/components/inputs/search-field/search-field.styles.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 +1 -0
- package/dist/components/inputs/search-field/search-field.template.js.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.styles.d.ts.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.styles.js +44 -55
- package/dist/components/inputs/segmented-control/segmented-control.styles.js.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.template.js +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.template.js.map +1 -1
- package/dist/components/inputs/stepper/stepper.styles.d.ts.map +1 -1
- package/dist/components/inputs/stepper/stepper.styles.js +16 -30
- package/dist/components/inputs/stepper/stepper.styles.js.map +1 -1
- package/dist/components/inputs/switch/switch.styles.d.ts.map +1 -1
- package/dist/components/inputs/switch/switch.styles.js +26 -69
- package/dist/components/inputs/switch/switch.styles.js.map +1 -1
- package/dist/components/inputs/switch-field/switch-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/switch-field/switch-field.styles.js +3 -6
- package/dist/components/inputs/switch-field/switch-field.styles.js.map +1 -1
- package/dist/components/inputs/text-field/text-field.d.ts +2 -0
- package/dist/components/inputs/text-field/text-field.d.ts.map +1 -1
- package/dist/components/inputs/text-field/text-field.js +5 -0
- package/dist/components/inputs/text-field/text-field.js.map +1 -1
- package/dist/components/inputs/text-field/text-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/text-field/text-field.styles.js +30 -67
- package/dist/components/inputs/text-field/text-field.styles.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 +1 -0
- package/dist/components/inputs/text-field/text-field.template.js.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.d.ts +5 -1
- package/dist/components/inputs/toggle-button/toggle-button.d.ts.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.js +16 -2
- package/dist/components/inputs/toggle-button/toggle-button.js.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.styles.d.ts.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.styles.js +61 -96
- package/dist/components/inputs/toggle-button/toggle-button.styles.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 +10 -4
- package/dist/components/inputs/toggle-button/toggle-button.template.js.map +1 -1
- package/dist/components/inputs/token/token.styles.d.ts.map +1 -1
- package/dist/components/inputs/token/token.styles.js +33 -49
- package/dist/components/inputs/token/token.styles.js.map +1 -1
- package/dist/components/layout/app-view/app-view.styles.d.ts.map +1 -1
- package/dist/components/layout/app-view/app-view.styles.js +13 -7
- package/dist/components/layout/app-view/app-view.styles.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 -7
- package/dist/components/layout/card/card.styles.js.map +1 -1
- package/dist/components/layout/collection/collection.styles.d.ts.map +1 -1
- package/dist/components/layout/collection/collection.styles.js +17 -39
- package/dist/components/layout/collection/collection.styles.js.map +1 -1
- package/dist/components/layout/collection/collection.template.d.ts.map +1 -1
- package/dist/components/layout/collection/collection.template.js +1 -0
- package/dist/components/layout/collection/collection.template.js.map +1 -1
- package/dist/components/layout/container/container.d.ts +41 -43
- package/dist/components/layout/container/container.d.ts.map +1 -1
- package/dist/components/layout/container/container.js +143 -132
- package/dist/components/layout/container/container.js.map +1 -1
- package/dist/components/layout/container/container.styles.d.ts.map +1 -1
- package/dist/components/layout/container/container.styles.js +87 -1133
- package/dist/components/layout/container/container.styles.js.map +1 -1
- package/dist/components/layout/container/container.template.d.ts.map +1 -1
- package/dist/components/layout/container/container.template.js +1 -5
- package/dist/components/layout/container/container.template.js.map +1 -1
- package/dist/components/layout/divider/divider.styles.d.ts.map +1 -1
- package/dist/components/layout/divider/divider.styles.js +3 -1
- package/dist/components/layout/divider/divider.styles.js.map +1 -1
- package/dist/components/layout/page/page.styles.d.ts.map +1 -1
- package/dist/components/layout/page/page.styles.js +13 -19
- package/dist/components/layout/page/page.styles.js.map +1 -1
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.styles.d.ts.map +1 -1
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.styles.js +6 -15
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.styles.js.map +1 -1
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.styles.d.ts.map +1 -1
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.styles.js +12 -11
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.styles.js.map +1 -1
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.styles.d.ts.map +1 -1
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.styles.js +12 -11
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.styles.js.map +1 -1
- package/dist/components/layout/page-sections/simple-section/simple-section.styles.d.ts.map +1 -1
- package/dist/components/layout/page-sections/simple-section/simple-section.styles.js +6 -15
- package/dist/components/layout/page-sections/simple-section/simple-section.styles.js.map +1 -1
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.styles.d.ts.map +1 -1
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.styles.js +12 -11
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.styles.js.map +1 -1
- package/dist/components/layout/popover/popover.d.ts +2 -1
- package/dist/components/layout/popover/popover.d.ts.map +1 -1
- package/dist/components/layout/popover/popover.js +21 -4
- package/dist/components/layout/popover/popover.js.map +1 -1
- package/dist/components/layout/popover/popover.styles.d.ts.map +1 -1
- package/dist/components/layout/popover/popover.styles.js +7 -12
- package/dist/components/layout/popover/popover.styles.js.map +1 -1
- package/dist/components/layout/sheet/sheet.styles.d.ts.map +1 -1
- package/dist/components/layout/sheet/sheet.styles.js +27 -38
- package/dist/components/layout/sheet/sheet.styles.js.map +1 -1
- package/dist/components/layout/spacer/spacer.styles.d.ts.map +1 -1
- package/dist/components/layout/spacer/spacer.styles.js +12 -4
- package/dist/components/layout/spacer/spacer.styles.js.map +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.styles.d.ts.map +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.styles.js +23 -20
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.styles.js.map +1 -1
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.styles.d.ts.map +1 -1
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.styles.js +65 -78
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.styles.js.map +1 -1
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.styles.d.ts.map +1 -1
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.styles.js +19 -12
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.styles.js.map +1 -1
- package/dist/components/layout/split-views/split-view-divider/split-view-divider.styles.d.ts.map +1 -1
- package/dist/components/layout/split-views/split-view-divider/split-view-divider.styles.js +25 -45
- package/dist/components/layout/split-views/split-view-divider/split-view-divider.styles.js.map +1 -1
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.styles.d.ts.map +1 -1
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.styles.js +21 -7
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.styles.js.map +1 -1
- package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.styles.d.ts.map +1 -1
- package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.styles.js +19 -12
- package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.styles.js.map +1 -1
- package/dist/components/layout/window/window.styles.d.ts.map +1 -1
- package/dist/components/layout/window/window.styles.js +18 -26
- package/dist/components/layout/window/window.styles.js.map +1 -1
- package/dist/components/lists-and-menus/cells/cell/cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-menus/cells/cell/cell.styles.js +12 -11
- package/dist/components/lists-and-menus/cells/cell/cell.styles.js.map +1 -1
- package/dist/components/lists-and-menus/cells/description-cell/description-cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-menus/cells/description-cell/description-cell.styles.js +23 -26
- package/dist/components/lists-and-menus/cells/description-cell/description-cell.styles.js.map +1 -1
- package/dist/components/lists-and-menus/cells/drag-handle-cell/drag-handle-cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-menus/cells/drag-handle-cell/drag-handle-cell.styles.js +15 -21
- package/dist/components/lists-and-menus/cells/drag-handle-cell/drag-handle-cell.styles.js.map +1 -1
- package/dist/components/lists-and-menus/cells/icon-cell/icon-cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-menus/cells/icon-cell/icon-cell.styles.js +40 -92
- package/dist/components/lists-and-menus/cells/icon-cell/icon-cell.styles.js.map +1 -1
- package/dist/components/lists-and-menus/cells/spacer-cell/spacer-cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-menus/cells/spacer-cell/spacer-cell.styles.js +26 -25
- package/dist/components/lists-and-menus/cells/spacer-cell/spacer-cell.styles.js.map +1 -1
- package/dist/components/lists-and-menus/cells/text-cell/text-cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-menus/cells/text-cell/text-cell.styles.js +64 -125
- package/dist/components/lists-and-menus/cells/text-cell/text-cell.styles.js.map +1 -1
- package/dist/components/lists-and-menus/cells/title-cell/title-cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-menus/cells/title-cell/title-cell.styles.js +71 -132
- package/dist/components/lists-and-menus/cells/title-cell/title-cell.styles.js.map +1 -1
- package/dist/components/lists-and-menus/list/list.styles.d.ts.map +1 -1
- package/dist/components/lists-and-menus/list/list.styles.js +20 -47
- package/dist/components/lists-and-menus/list/list.styles.js.map +1 -1
- package/dist/components/lists-and-menus/list-item/list-item.styles.d.ts.map +1 -1
- package/dist/components/lists-and-menus/list-item/list-item.styles.js +29 -20
- package/dist/components/lists-and-menus/list-item/list-item.styles.js.map +1 -1
- package/dist/components/lists-and-menus/menu/menu.d.ts +28 -9
- package/dist/components/lists-and-menus/menu/menu.d.ts.map +1 -1
- package/dist/components/lists-and-menus/menu/menu.js +105 -26
- package/dist/components/lists-and-menus/menu/menu.js.map +1 -1
- package/dist/components/lists-and-menus/menu/menu.styles.d.ts.map +1 -1
- package/dist/components/lists-and-menus/menu/menu.styles.js +88 -135
- package/dist/components/lists-and-menus/menu/menu.styles.js.map +1 -1
- package/dist/components/lists-and-menus/menu/menu.template.js +2 -2
- package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.js +10 -6
- package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.js.map +1 -1
- package/dist/components/navigation/link/link.styles.d.ts.map +1 -1
- package/dist/components/navigation/link/link.styles.js +24 -33
- package/dist/components/navigation/link/link.styles.js.map +1 -1
- package/dist/components/navigation/menu-bar/menu-bar.d.ts +8 -8
- package/dist/components/navigation/menu-bar/menu-bar.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar/menu-bar.js +34 -15
- package/dist/components/navigation/menu-bar/menu-bar.js.map +1 -1
- package/dist/components/navigation/menu-bar/menu-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar/menu-bar.styles.js +3 -2
- package/dist/components/navigation/menu-bar/menu-bar.styles.js.map +1 -1
- package/dist/components/navigation/menu-bar/menu-bar.template.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar/menu-bar.template.js +1 -0
- package/dist/components/navigation/menu-bar/menu-bar.template.js.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.d.ts +2 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.js +13 -5
- package/dist/components/navigation/menu-bar-item/menu-bar-item.js.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.styles.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.styles.js +9 -11
- package/dist/components/navigation/menu-bar-item/menu-bar-item.styles.js.map +1 -1
- package/dist/components/navigation/pagination/pagination.d.ts +8 -0
- package/dist/components/navigation/pagination/pagination.d.ts.map +1 -1
- package/dist/components/navigation/pagination/pagination.js +11 -0
- package/dist/components/navigation/pagination/pagination.js.map +1 -1
- package/dist/components/navigation/pagination/pagination.styles.d.ts.map +1 -1
- package/dist/components/navigation/pagination/pagination.styles.js +80 -27
- package/dist/components/navigation/pagination/pagination.styles.js.map +1 -1
- package/dist/components/navigation/pagination/pagination.template.d.ts.map +1 -1
- package/dist/components/navigation/pagination/pagination.template.js +1 -0
- package/dist/components/navigation/pagination/pagination.template.js.map +1 -1
- package/dist/components/navigation/skip-link/skip-link.styles.d.ts.map +1 -1
- package/dist/components/navigation/skip-link/skip-link.styles.js +6 -8
- package/dist/components/navigation/skip-link/skip-link.styles.js.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.d.ts +3 -10
- package/dist/components/navigation/tab-bar/tab-bar.d.ts.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.js +3 -28
- package/dist/components/navigation/tab-bar/tab-bar.js.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.styles.js +22 -65
- package/dist/components/navigation/tab-bar/tab-bar.styles.js.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.template.js +1 -1
- 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 +9 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.d.ts.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js +56 -17
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js.map +1 -1
- 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 +13 -7
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.template.d.ts.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.template.js +6 -10
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.template.js.map +1 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.styles.js +13 -34
- package/dist/components/navigation/top-title-bar/top-title-bar.styles.js.map +1 -1
- package/dist/components/{prism-typescript-D2EqsCqV.js → prism-typescript-BX4tFNFm.js} +1 -1
- package/dist/components/status-and-feedback/badge/badge.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/badge/badge.styles.js +21 -34
- package/dist/components/status-and-feedback/badge/badge.styles.js.map +1 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.js +32 -33
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.js.map +1 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.styles.js +18 -22
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.styles.js.map +1 -1
- package/dist/css/settings.css +33 -7
- package/dist/utilities/color-scheme-repaint.d.ts +44 -0
- package/dist/utilities/color-scheme-repaint.d.ts.map +1 -0
- package/dist/utilities/color-scheme-repaint.js +88 -0
- package/dist/utilities/color-scheme-repaint.js.map +1 -0
- package/package.json +11 -8
- package/dist/components/content/blockquote/blockquote.i18n.d.ts +0 -5
- package/dist/components/content/blockquote/blockquote.i18n.d.ts.map +0 -1
- package/dist/components/content/blockquote/blockquote.i18n.js +0 -4
- package/dist/components/content/blockquote/blockquote.i18n.js.map +0 -1
- package/dist/utilities/popover-guard.d.ts +0 -10
- package/dist/utilities/popover-guard.d.ts.map +0 -1
- package/dist/utilities/popover-guard.js +0 -10
- package/dist/utilities/popover-guard.js.map +0 -1
|
@@ -7,18 +7,34 @@ export const listStyles = css `
|
|
|
7
7
|
:host {
|
|
8
8
|
--_drag-clone-top: 0px;
|
|
9
9
|
--_drag-clone-left: 0px;
|
|
10
|
-
--_drag-clone-width: 0px;
|
|
11
|
-
--_drag-clone-height: 0px;
|
|
12
10
|
--_drag-clone-opacity: 0.95;
|
|
13
11
|
--_drag-clone-z-index: 100;
|
|
12
|
+
--_drag-clone-width: 0px;
|
|
13
|
+
--_drag-clone-height: 0px;
|
|
14
14
|
|
|
15
15
|
display: block;
|
|
16
16
|
position: relative;
|
|
17
17
|
isolation: isolate;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
:host([no-dividers]) {
|
|
21
|
+
--context-list-divider-display: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:host([variant="box"]) .list__items {
|
|
25
|
+
border-radius: var(--components-list-corner-radius);
|
|
26
|
+
background-color: var(--semantics-surfaces-tinted-background-color);
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:host([variant="box-on-tinted"]) .list__items {
|
|
31
|
+
border-radius: var(--components-list-corner-radius);
|
|
32
|
+
background-color: var(--semantics-surfaces-background-color);
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
}
|
|
20
35
|
|
|
21
|
-
|
|
36
|
+
|
|
37
|
+
/* # Elements */
|
|
22
38
|
|
|
23
39
|
.list__body {
|
|
24
40
|
display: flex;
|
|
@@ -26,25 +42,16 @@ export const listStyles = css `
|
|
|
26
42
|
gap: var(--primitives-space-8);
|
|
27
43
|
}
|
|
28
44
|
|
|
29
|
-
|
|
30
|
-
/* # Header & footer */
|
|
31
|
-
|
|
32
45
|
.list__header,
|
|
33
46
|
.list__footer {
|
|
34
47
|
display: contents;
|
|
35
48
|
}
|
|
36
49
|
|
|
37
|
-
|
|
38
|
-
/* # Items */
|
|
39
|
-
|
|
40
50
|
.list__items {
|
|
41
51
|
display: flex;
|
|
42
52
|
flex-direction: column;
|
|
43
53
|
}
|
|
44
54
|
|
|
45
|
-
|
|
46
|
-
/* # Empty slot */
|
|
47
|
-
|
|
48
55
|
.list__empty {
|
|
49
56
|
padding: var(--primitives-space-16);
|
|
50
57
|
}
|
|
@@ -53,34 +60,6 @@ export const listStyles = css `
|
|
|
53
60
|
display: none;
|
|
54
61
|
}
|
|
55
62
|
|
|
56
|
-
|
|
57
|
-
/* # No dividers */
|
|
58
|
-
|
|
59
|
-
:host([no-dividers]) {
|
|
60
|
-
--context-list-divider-display: none;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
/* # Variant: box */
|
|
65
|
-
|
|
66
|
-
:host([variant='box']) .list__items {
|
|
67
|
-
border-radius: var(--components-list-corner-radius);
|
|
68
|
-
background-color: var(--semantics-surfaces-tinted-background-color);
|
|
69
|
-
overflow: hidden;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
/* # Variant: box-on-tinted */
|
|
74
|
-
|
|
75
|
-
:host([variant='box-on-tinted']) .list__items {
|
|
76
|
-
border-radius: var(--components-list-corner-radius);
|
|
77
|
-
background-color: var(--semantics-surfaces-background-color);
|
|
78
|
-
overflow: hidden;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
/* # Drag placeholder */
|
|
83
|
-
|
|
84
63
|
::slotted(.nldd-list-drag-placeholder) {
|
|
85
64
|
box-sizing: border-box;
|
|
86
65
|
border-radius: var(--components-list-item-indicator-corner-radius);
|
|
@@ -88,14 +67,11 @@ export const listStyles = css `
|
|
|
88
67
|
pointer-events: none;
|
|
89
68
|
}
|
|
90
69
|
|
|
91
|
-
|
|
92
|
-
/* # Drag clone */
|
|
93
|
-
|
|
94
70
|
.list__drag-clone {
|
|
71
|
+
display: flex;
|
|
95
72
|
position: absolute;
|
|
96
73
|
top: var(--_drag-clone-top);
|
|
97
74
|
left: var(--_drag-clone-left);
|
|
98
|
-
display: flex;
|
|
99
75
|
opacity: var(--_drag-clone-opacity);
|
|
100
76
|
z-index: var(--_drag-clone-z-index);
|
|
101
77
|
border-radius: var(--components-list-item-indicator-corner-radius);
|
|
@@ -108,9 +84,6 @@ export const listStyles = css `
|
|
|
108
84
|
align-items: stretch;
|
|
109
85
|
}
|
|
110
86
|
|
|
111
|
-
|
|
112
|
-
/* # Announcer */
|
|
113
|
-
|
|
114
87
|
.list__polite-announcer,
|
|
115
88
|
.list__assertive-announcer {
|
|
116
89
|
position: absolute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.styles.js","sourceRoot":"","sources":["../../../../src/components/lists-and-menus/list/list.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"list.styles.js","sourceRoot":"","sources":["../../../../src/components/lists-and-menus/list/list.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiG5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-item.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/lists-and-menus/list-item/list-item.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"list-item.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/lists-and-menus/list-item/list-item.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,yBAoQ1B,CAAC"}
|
|
@@ -55,14 +55,14 @@ export const listItemStyles = css `
|
|
|
55
55
|
box-sizing: border-box;
|
|
56
56
|
display: flex;
|
|
57
57
|
position: relative;
|
|
58
|
-
min-height: var(--semantics-controls-md-min-size);
|
|
59
58
|
width: 100%;
|
|
59
|
+
min-height: var(--semantics-controls-md-min-size);
|
|
60
60
|
flex-direction: row;
|
|
61
61
|
align-items: stretch;
|
|
62
62
|
isolation: isolate;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
:host([size=
|
|
65
|
+
:host([size="sm"]) .list-item {
|
|
66
66
|
min-height: var(--semantics-controls-sm-min-size);
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -72,16 +72,16 @@ export const listItemStyles = css `
|
|
|
72
72
|
.list-item__action {
|
|
73
73
|
display: flex;
|
|
74
74
|
margin: 0;
|
|
75
|
-
border: none;
|
|
76
75
|
outline: none;
|
|
76
|
+
border: none;
|
|
77
77
|
background: none;
|
|
78
78
|
width: 100%;
|
|
79
79
|
padding: 0;
|
|
80
80
|
flex-direction: row;
|
|
81
81
|
align-items: stretch;
|
|
82
82
|
text-align: start;
|
|
83
|
-
text-decoration: none;
|
|
84
83
|
color: inherit;
|
|
84
|
+
text-decoration: none;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
a.list-item__action {
|
|
@@ -91,11 +91,8 @@ export const listItemStyles = css `
|
|
|
91
91
|
|
|
92
92
|
/* # Indicator */
|
|
93
93
|
|
|
94
|
-
/*
|
|
95
|
-
|
|
96
|
-
.list-item, driven only by :host([selected]). Use when a slotted
|
|
97
|
-
control (e.g. a checkbox) owns the selection semantics and the row
|
|
98
|
-
itself should still reflect the selected state visually. */
|
|
94
|
+
/* Non-interactive: items without an inner action get the selection
|
|
95
|
+
indicator directly on .list-item, driven only by :host([selected]) */
|
|
99
96
|
|
|
100
97
|
.list-item:not(:has(.list-item__action))::before {
|
|
101
98
|
content: '';
|
|
@@ -114,9 +111,8 @@ export const listItemStyles = css `
|
|
|
114
111
|
--context-cell-content-color: var(--components-list-item-is-selected-content-color);
|
|
115
112
|
}
|
|
116
113
|
|
|
117
|
-
/*
|
|
118
|
-
|
|
119
|
-
hover and focus on top of the selected state. */
|
|
114
|
+
/* Interactive: items with a link/button inner element; indicator responds
|
|
115
|
+
to hover and focus on top of the selected state */
|
|
120
116
|
|
|
121
117
|
.list-item__action::before {
|
|
122
118
|
content: '';
|
|
@@ -130,8 +126,8 @@ export const listItemStyles = css `
|
|
|
130
126
|
pointer-events: none;
|
|
131
127
|
}
|
|
132
128
|
|
|
133
|
-
/*
|
|
134
|
-
|
|
129
|
+
/* hover only on hover-capable devices: avoids touch-scroll flashing the
|
|
130
|
+
hover state on the row under the finger */
|
|
135
131
|
@media (hover: hover) {
|
|
136
132
|
.list-item__action:hover {
|
|
137
133
|
--_background-color: var(--components-list-item-is-hovered-background-color);
|
|
@@ -149,6 +145,19 @@ export const listItemStyles = css `
|
|
|
149
145
|
}
|
|
150
146
|
}
|
|
151
147
|
|
|
148
|
+
/* Press feedback — works on touch where :hover doesn't. Same visual as
|
|
149
|
+
:hover (the gated mouse rule above) so it reads consistently across
|
|
150
|
+
input modes. */
|
|
151
|
+
.list-item__action:active {
|
|
152
|
+
--_background-color: var(--components-list-item-is-hovered-background-color);
|
|
153
|
+
--context-cell-content-color: var(--components-list-item-is-hovered-content-color);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
:host([selected]) .list-item__action:active {
|
|
157
|
+
--_background-color: var(--components-list-item-is-highlighted-background-color);
|
|
158
|
+
--context-cell-content-color: var(--components-list-item-is-highlighted-content-color);
|
|
159
|
+
}
|
|
160
|
+
|
|
152
161
|
:host([selected]) .list-item__action {
|
|
153
162
|
--_background-color: var(--components-list-item-is-selected-background-color);
|
|
154
163
|
--context-cell-content-color: var(--components-list-item-is-selected-content-color);
|
|
@@ -160,7 +169,7 @@ export const listItemStyles = css `
|
|
|
160
169
|
}
|
|
161
170
|
|
|
162
171
|
|
|
163
|
-
/*
|
|
172
|
+
/* # Focus */
|
|
164
173
|
|
|
165
174
|
.list-item__action:focus-visible:not(.is-pointer-focus)::after {
|
|
166
175
|
content: '';
|
|
@@ -202,8 +211,8 @@ export const listItemStyles = css `
|
|
|
202
211
|
z-index: var(--_z-index-content);
|
|
203
212
|
padding-block: var(--components-list-item-md-padding-block);
|
|
204
213
|
flex-direction: row;
|
|
205
|
-
align-items: center;
|
|
206
214
|
flex-shrink: 0;
|
|
215
|
+
align-items: center;
|
|
207
216
|
}
|
|
208
217
|
|
|
209
218
|
.list-item__start-area.is-visible,
|
|
@@ -211,8 +220,8 @@ export const listItemStyles = css `
|
|
|
211
220
|
display: flex;
|
|
212
221
|
}
|
|
213
222
|
|
|
214
|
-
:host([size=
|
|
215
|
-
:host([size=
|
|
223
|
+
:host([size="sm"]) .list-item__start-area,
|
|
224
|
+
:host([size="sm"]) .list-item__end-area {
|
|
216
225
|
padding-block: var(--components-list-item-sm-padding-block);
|
|
217
226
|
}
|
|
218
227
|
|
|
@@ -226,11 +235,11 @@ export const listItemStyles = css `
|
|
|
226
235
|
min-width: 0;
|
|
227
236
|
padding-block: var(--components-list-item-md-padding-block);
|
|
228
237
|
flex-direction: row;
|
|
229
|
-
align-items: center;
|
|
230
238
|
flex-grow: 1;
|
|
239
|
+
align-items: center;
|
|
231
240
|
}
|
|
232
241
|
|
|
233
|
-
:host([size=
|
|
242
|
+
:host([size="sm"]) .list-item__main-area {
|
|
234
243
|
padding-block: var(--components-list-item-sm-padding-block);
|
|
235
244
|
}
|
|
236
245
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-item.styles.js","sourceRoot":"","sources":["../../../../src/components/lists-and-menus/list-item/list-item.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"list-item.styles.js","sourceRoot":"","sources":["../../../../src/components/lists-and-menus/list-item/list-item.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoQhC,CAAC"}
|
|
@@ -47,6 +47,11 @@ export declare class NLDDMenuGroup extends LitElement {
|
|
|
47
47
|
* @attr {string} icon - Icon name rendered before the text (nldd-icon name).
|
|
48
48
|
* @attr {string} type - Item type: 'button' | 'checkbox' | 'radio'. Default: 'button'.
|
|
49
49
|
* @attr {boolean} selected - Selected state for checkbox and radio types.
|
|
50
|
+
* @attr {boolean} destructive - Marks the item as destructive (red text; red highlight bg). Use for irreversible
|
|
51
|
+
* actions like "Delete". Colour is the only built-in signal, so per WCAG 1.4.1 the
|
|
52
|
+
* item's own label must convey the destructive nature (e.g. "Verwijder") — don't rely
|
|
53
|
+
* on the red alone. Confirming the action (e.g. a follow-up dialog) is the consumer's
|
|
54
|
+
* responsibility.
|
|
50
55
|
* @attr {boolean} disabled - Disabled state.
|
|
51
56
|
* @attr {string} query - Query substring to bold-highlight in text. Set by menu's filter(); also settable by consumers.
|
|
52
57
|
* @attr {string} query-mark-mode - 'match' | 'predictive' (default: 'predictive'). See text-cell for details.
|
|
@@ -64,6 +69,7 @@ export declare class NLDDMenuItem extends LitElement {
|
|
|
64
69
|
icon: string;
|
|
65
70
|
type: 'button' | 'checkbox' | 'radio';
|
|
66
71
|
selected: boolean;
|
|
72
|
+
destructive: boolean;
|
|
67
73
|
disabled: boolean;
|
|
68
74
|
query: string;
|
|
69
75
|
queryMarkMode: QueryMarkMode;
|
|
@@ -104,9 +110,9 @@ export declare class NLDDMenuItem extends LitElement {
|
|
|
104
110
|
* @attr {string} empty-text - Text of the default empty-state dialog. Falls back
|
|
105
111
|
* to Dutch i18n "Geen opties beschikbaar".
|
|
106
112
|
* @attr {string} empty-supporting-text - Supporting text of the default empty-state dialog.
|
|
107
|
-
* @attr {string} width - Explicit width. Sets --
|
|
113
|
+
* @attr {string} width - Explicit width. Sets --_width internally.
|
|
108
114
|
* @attr {number} max-items - Maximum number of visible items before scrolling.
|
|
109
|
-
* Sets --
|
|
115
|
+
* Sets --_max-items internally. Default: 0 (no limit).
|
|
110
116
|
* @attr {object} translations - Override one or more translation keys.
|
|
111
117
|
* @attr {Function} filterFn - Custom filter function (query, item) => boolean.
|
|
112
118
|
*
|
|
@@ -128,11 +134,11 @@ export declare class NLDDMenu extends LitElement {
|
|
|
128
134
|
variant: 'menu' | 'listbox';
|
|
129
135
|
emptyText: string;
|
|
130
136
|
emptySupportingText: string;
|
|
131
|
-
/** Explicit width. Sets --
|
|
137
|
+
/** Explicit width. Sets --_width internally. */
|
|
132
138
|
width: string;
|
|
133
139
|
/**
|
|
134
140
|
* Maximum number of visible items before the menu scrolls.
|
|
135
|
-
* Sets --
|
|
141
|
+
* Sets --_max-items internally. Default: 0 (no limit).
|
|
136
142
|
*/
|
|
137
143
|
maxItems: number;
|
|
138
144
|
/**
|
|
@@ -193,12 +199,13 @@ export declare class NLDDMenu extends LitElement {
|
|
|
193
199
|
* @internal */
|
|
194
200
|
_parentItem: NLDDMenuItem | null;
|
|
195
201
|
private _isOpen;
|
|
196
|
-
private _closedAt;
|
|
197
202
|
/** Set on the root when a pointer gesture (outside/anchor pointerdown
|
|
198
|
-
* or confirmed tap) collapsed the chain
|
|
199
|
-
*
|
|
200
|
-
*
|
|
201
|
-
*
|
|
203
|
+
* or confirmed tap) collapsed the chain, or when a pointerdown landed
|
|
204
|
+
* on the anchor while the menu was open (covers native light-dismiss).
|
|
205
|
+
* The trailing `click` of that same gesture consumes it in
|
|
206
|
+
* `_handleDocumentClick` and must NOT reopen — gesture-correlated, so
|
|
207
|
+
* it's reliable on touch regardless of pointerup→click timing.
|
|
208
|
+
* @internal */
|
|
202
209
|
_collapsedByPointerGesture: boolean;
|
|
203
210
|
private _cleanupAutoUpdate;
|
|
204
211
|
private _t;
|
|
@@ -466,6 +473,18 @@ export declare class NLDDMenu extends LitElement {
|
|
|
466
473
|
* tap (pointerup without crossing the scroll threshold); a scroll
|
|
467
474
|
* leaves the chain untouched, matching root-menu behaviour.
|
|
468
475
|
*/
|
|
476
|
+
private _dragStartItem;
|
|
477
|
+
/**
|
|
478
|
+
* Native HTML `<select>` lets you press on one option, drag to another,
|
|
479
|
+
* and release to pick the one under the pointer. Standard click events
|
|
480
|
+
* don't fire across different elements, so we replicate it manually:
|
|
481
|
+
* remember the pointerdown'd item, listen for the matching pointerup,
|
|
482
|
+
* and if the release lands on a different non-disabled item, fire its
|
|
483
|
+
* `select` directly. The original button's click handler still owns the
|
|
484
|
+
* single-click no-drag path.
|
|
485
|
+
*/
|
|
486
|
+
private _handleItemPointerdown;
|
|
487
|
+
private _handleDragRelease;
|
|
469
488
|
private _handleDocumentPointerdown;
|
|
470
489
|
private _outsideTapStartX;
|
|
471
490
|
private _outsideTapStartY;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../../src/components/lists-and-menus/menu/menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAMjC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,oDAAoD,CAAC;AAC5D,OAAO,wDAAwD,CAAC;AAChE,OAAO,oDAAoD,CAAC;AAC5D,OAAO,4BAA4B,CAAC;AACpC,OAAO,0DAA0D,CAAC;
|
|
1
|
+
{"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../../src/components/lists-and-menus/menu/menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAMjC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,oDAAoD,CAAC;AAC5D,OAAO,wDAAwD,CAAC;AAChE,OAAO,oDAAoD,CAAC;AAC5D,OAAO,4BAA4B,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I,MAAM;IAIjC;sEACkE;IAClE,OAAO,CAAC,MAAM;IAKd,oEAAoE;IACvD,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAmDxC,OAAO,CAAC,cAAc,CA0FpB;IAEF,OAAO,CAAC,gBAAgB,CAAM;IAC9B,OAAO,CAAC,eAAe,CAAuB;IAC9C;;;uBAGmB;IACnB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAO;IAElD;;;;;;;;;;OAUG;IACH,OAAO,CAAC,gBAAgB;IA4BxB,OAAO,CAAC,aAAa,CAyDnB;IAEO,MAAM;CAGf;AAMD,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,WAAW,EAAE,QAAQ,CAAC;QACtB,gBAAgB,EAAE,YAAY,CAAC;QAC/B,mBAAmB,EAAE,eAAe,CAAC;QACrC,iBAAiB,EAAE,aAAa,CAAC;KACjC;CACD"}
|
|
@@ -16,7 +16,6 @@ import '../../lists-and-menus/cells/text-cell/text-cell.js';
|
|
|
16
16
|
import '../../content/icon/icon.js';
|
|
17
17
|
import '../../status-and-feedback/inline-dialog/inline-dialog.js';
|
|
18
18
|
import { isKeyboardMode, isTouchMode } from '../../../utilities/input-modality.js';
|
|
19
|
-
import { POPOVER_REOPEN_GUARD_MS } from '../../../utilities/popover-guard.js';
|
|
20
19
|
import { breakpoints } from '../../../assets/styles/breakpoints.js';
|
|
21
20
|
// # nldd-menu-divider
|
|
22
21
|
export class NLDDMenuDivider extends LitElement {
|
|
@@ -83,6 +82,11 @@ if (!customElements.get('nldd-menu-group')) {
|
|
|
83
82
|
* @attr {string} icon - Icon name rendered before the text (nldd-icon name).
|
|
84
83
|
* @attr {string} type - Item type: 'button' | 'checkbox' | 'radio'. Default: 'button'.
|
|
85
84
|
* @attr {boolean} selected - Selected state for checkbox and radio types.
|
|
85
|
+
* @attr {boolean} destructive - Marks the item as destructive (red text; red highlight bg). Use for irreversible
|
|
86
|
+
* actions like "Delete". Colour is the only built-in signal, so per WCAG 1.4.1 the
|
|
87
|
+
* item's own label must convey the destructive nature (e.g. "Verwijder") — don't rely
|
|
88
|
+
* on the red alone. Confirming the action (e.g. a follow-up dialog) is the consumer's
|
|
89
|
+
* responsibility.
|
|
86
90
|
* @attr {boolean} disabled - Disabled state.
|
|
87
91
|
* @attr {string} query - Query substring to bold-highlight in text. Set by menu's filter(); also settable by consumers.
|
|
88
92
|
* @attr {string} query-mark-mode - 'match' | 'predictive' (default: 'predictive'). See text-cell for details.
|
|
@@ -101,6 +105,7 @@ export class NLDDMenuItem extends LitElement {
|
|
|
101
105
|
this.icon = '';
|
|
102
106
|
this.type = 'button';
|
|
103
107
|
this.selected = false;
|
|
108
|
+
this.destructive = false;
|
|
104
109
|
this.disabled = false;
|
|
105
110
|
this.query = '';
|
|
106
111
|
this.queryMarkMode = 'predictive';
|
|
@@ -256,6 +261,9 @@ __decorate([
|
|
|
256
261
|
__decorate([
|
|
257
262
|
property({ type: Boolean, reflect: true })
|
|
258
263
|
], NLDDMenuItem.prototype, "selected", void 0);
|
|
264
|
+
__decorate([
|
|
265
|
+
property({ type: Boolean, reflect: true })
|
|
266
|
+
], NLDDMenuItem.prototype, "destructive", void 0);
|
|
259
267
|
__decorate([
|
|
260
268
|
property({ type: Boolean, reflect: true })
|
|
261
269
|
], NLDDMenuItem.prototype, "disabled", void 0);
|
|
@@ -297,9 +305,9 @@ const defaultFilterFn = (query, item) => {
|
|
|
297
305
|
* @attr {string} empty-text - Text of the default empty-state dialog. Falls back
|
|
298
306
|
* to Dutch i18n "Geen opties beschikbaar".
|
|
299
307
|
* @attr {string} empty-supporting-text - Supporting text of the default empty-state dialog.
|
|
300
|
-
* @attr {string} width - Explicit width. Sets --
|
|
308
|
+
* @attr {string} width - Explicit width. Sets --_width internally.
|
|
301
309
|
* @attr {number} max-items - Maximum number of visible items before scrolling.
|
|
302
|
-
* Sets --
|
|
310
|
+
* Sets --_max-items internally. Default: 0 (no limit).
|
|
303
311
|
* @attr {object} translations - Override one or more translation keys.
|
|
304
312
|
* @attr {Function} filterFn - Custom filter function (query, item) => boolean.
|
|
305
313
|
*
|
|
@@ -322,11 +330,11 @@ export class NLDDMenu extends LitElement {
|
|
|
322
330
|
this.variant = 'menu';
|
|
323
331
|
this.emptyText = '';
|
|
324
332
|
this.emptySupportingText = '';
|
|
325
|
-
/** Explicit width. Sets --
|
|
333
|
+
/** Explicit width. Sets --_width internally. */
|
|
326
334
|
this.width = '';
|
|
327
335
|
/**
|
|
328
336
|
* Maximum number of visible items before the menu scrolls.
|
|
329
|
-
* Sets --
|
|
337
|
+
* Sets --_max-items internally. Default: 0 (no limit).
|
|
330
338
|
*/
|
|
331
339
|
this.maxItems = 0;
|
|
332
340
|
/**
|
|
@@ -387,12 +395,13 @@ export class NLDDMenu extends LitElement {
|
|
|
387
395
|
* @internal */
|
|
388
396
|
this._parentItem = null;
|
|
389
397
|
this._isOpen = false;
|
|
390
|
-
this._closedAt = 0;
|
|
391
398
|
/** Set on the root when a pointer gesture (outside/anchor pointerdown
|
|
392
|
-
* or confirmed tap) collapsed the chain
|
|
393
|
-
*
|
|
394
|
-
*
|
|
395
|
-
*
|
|
399
|
+
* or confirmed tap) collapsed the chain, or when a pointerdown landed
|
|
400
|
+
* on the anchor while the menu was open (covers native light-dismiss).
|
|
401
|
+
* The trailing `click` of that same gesture consumes it in
|
|
402
|
+
* `_handleDocumentClick` and must NOT reopen — gesture-correlated, so
|
|
403
|
+
* it's reliable on touch regardless of pointerup→click timing.
|
|
404
|
+
* @internal */
|
|
396
405
|
this._collapsedByPointerGesture = false;
|
|
397
406
|
this._cleanupAutoUpdate = null;
|
|
398
407
|
// — Status messages (WCAG 4.1.3) ———————————————————————————————————————————
|
|
@@ -445,7 +454,7 @@ export class NLDDMenu extends LitElement {
|
|
|
445
454
|
if (this._isOpen) {
|
|
446
455
|
this.hidePopover();
|
|
447
456
|
}
|
|
448
|
-
else
|
|
457
|
+
else {
|
|
449
458
|
this.showPopover();
|
|
450
459
|
}
|
|
451
460
|
};
|
|
@@ -767,7 +776,6 @@ export class NLDDMenu extends LitElement {
|
|
|
767
776
|
*/
|
|
768
777
|
this._collapseChain = () => {
|
|
769
778
|
const root = this._chainRoot ?? this;
|
|
770
|
-
root._closedAt = Date.now();
|
|
771
779
|
// Snapshot + clear first so the re-entrant cleanup splices are
|
|
772
780
|
// no-ops and a trailing same-gesture call finds nothing to do.
|
|
773
781
|
const chain = root._openChain;
|
|
@@ -804,9 +812,58 @@ export class NLDDMenu extends LitElement {
|
|
|
804
812
|
* tap (pointerup without crossing the scroll threshold); a scroll
|
|
805
813
|
* leaves the chain untouched, matching root-menu behaviour.
|
|
806
814
|
*/
|
|
815
|
+
this._dragStartItem = null;
|
|
816
|
+
/**
|
|
817
|
+
* Native HTML `<select>` lets you press on one option, drag to another,
|
|
818
|
+
* and release to pick the one under the pointer. Standard click events
|
|
819
|
+
* don't fire across different elements, so we replicate it manually:
|
|
820
|
+
* remember the pointerdown'd item, listen for the matching pointerup,
|
|
821
|
+
* and if the release lands on a different non-disabled item, fire its
|
|
822
|
+
* `select` directly. The original button's click handler still owns the
|
|
823
|
+
* single-click no-drag path.
|
|
824
|
+
*/
|
|
825
|
+
this._handleItemPointerdown = (event) => {
|
|
826
|
+
if (event.button !== 0)
|
|
827
|
+
return;
|
|
828
|
+
const item = event.target?.closest('nldd-menu-item');
|
|
829
|
+
if (!item || item.disabled)
|
|
830
|
+
return;
|
|
831
|
+
this._dragStartItem = item;
|
|
832
|
+
document.addEventListener('pointerup', this._handleDragRelease, { capture: true, once: true });
|
|
833
|
+
};
|
|
834
|
+
this._handleDragRelease = (event) => {
|
|
835
|
+
const startItem = this._dragStartItem;
|
|
836
|
+
this._dragStartItem = null;
|
|
837
|
+
if (!startItem)
|
|
838
|
+
return;
|
|
839
|
+
// If the menu closed between pointerdown and pointerup (light-dismiss,
|
|
840
|
+
// keyboard shortcut), bail — elementFromPoint could otherwise resolve
|
|
841
|
+
// to an item in a different, newly-opened menu and fire its select.
|
|
842
|
+
if (!this._isOpen)
|
|
843
|
+
return;
|
|
844
|
+
const target = document.elementFromPoint(event.clientX, event.clientY);
|
|
845
|
+
const releaseItem = target?.closest('nldd-menu-item');
|
|
846
|
+
if (!releaseItem || releaseItem === startItem || releaseItem.disabled)
|
|
847
|
+
return;
|
|
848
|
+
// Different item — fire its select. Browser won't dispatch click here
|
|
849
|
+
// because pointerdown and pointerup landed on different targets, so
|
|
850
|
+
// there's no double-fire to suppress.
|
|
851
|
+
releaseItem._handleClick();
|
|
852
|
+
};
|
|
807
853
|
this._handleDocumentPointerdown = (event) => {
|
|
808
854
|
if (!this._isOpen)
|
|
809
855
|
return;
|
|
856
|
+
// Anchor pointerdown on a root menu while open: capture as a gesture
|
|
857
|
+
// so the trailing click — fired after native popover light-dismiss
|
|
858
|
+
// has already closed us — won't reopen us via `_handleDocumentClick`.
|
|
859
|
+
// Drill-in submenus take a different path further down.
|
|
860
|
+
if (!this._isSubmenu) {
|
|
861
|
+
const anchorEl = this._getAnchorEl();
|
|
862
|
+
if (anchorEl && event.composedPath().includes(anchorEl)) {
|
|
863
|
+
this._collapsedByPointerGesture = true;
|
|
864
|
+
return;
|
|
865
|
+
}
|
|
866
|
+
}
|
|
810
867
|
if (!this._drillInMode)
|
|
811
868
|
return;
|
|
812
869
|
// Only nested drill-in submenus need this: they form a hidden chain
|
|
@@ -973,7 +1030,6 @@ export class NLDDMenu extends LitElement {
|
|
|
973
1030
|
// already chosen a value, so screen readers announce the role.
|
|
974
1031
|
this._syncAnchorPopupState(this._isOpen);
|
|
975
1032
|
if (toggleEvent.newState !== 'open') {
|
|
976
|
-
this._closedAt = Date.now();
|
|
977
1033
|
this._cleanupAutoUpdate?.();
|
|
978
1034
|
this._cleanupAutoUpdate = null;
|
|
979
1035
|
window.removeEventListener('resize', this._handleWindowResize);
|
|
@@ -1076,18 +1132,18 @@ export class NLDDMenu extends LitElement {
|
|
|
1076
1132
|
updated(changedProperties) {
|
|
1077
1133
|
if (changedProperties.has('width')) {
|
|
1078
1134
|
if (this.width) {
|
|
1079
|
-
this.style.setProperty('--
|
|
1135
|
+
this.style.setProperty('--_width', this.width);
|
|
1080
1136
|
}
|
|
1081
1137
|
else {
|
|
1082
|
-
this.style.removeProperty('--
|
|
1138
|
+
this.style.removeProperty('--_width');
|
|
1083
1139
|
}
|
|
1084
1140
|
}
|
|
1085
1141
|
if (changedProperties.has('maxItems')) {
|
|
1086
1142
|
if (this.maxItems > 0) {
|
|
1087
|
-
this.style.setProperty('--
|
|
1143
|
+
this.style.setProperty('--_max-items', String(this.maxItems));
|
|
1088
1144
|
}
|
|
1089
1145
|
else {
|
|
1090
|
-
this.style.removeProperty('--
|
|
1146
|
+
this.style.removeProperty('--_max-items');
|
|
1091
1147
|
}
|
|
1092
1148
|
}
|
|
1093
1149
|
if (changedProperties.has('variant')) {
|
|
@@ -1525,6 +1581,7 @@ export class NLDDMenu extends LitElement {
|
|
|
1525
1581
|
this.addEventListener('menu-item-focused', this._handleMenuItemFocused);
|
|
1526
1582
|
this.addEventListener('submenu-open', this._handleSubmenuOpen);
|
|
1527
1583
|
this.addEventListener('select', this._collapseChain);
|
|
1584
|
+
this.addEventListener('pointerdown', this._handleItemPointerdown);
|
|
1528
1585
|
document.addEventListener('click', this._handleDocumentClick);
|
|
1529
1586
|
}
|
|
1530
1587
|
firstUpdated() {
|
|
@@ -1547,7 +1604,9 @@ export class NLDDMenu extends LitElement {
|
|
|
1547
1604
|
this.removeEventListener('menu-item-focused', this._handleMenuItemFocused);
|
|
1548
1605
|
this.removeEventListener('submenu-open', this._handleSubmenuOpen);
|
|
1549
1606
|
this.removeEventListener('select', this._collapseChain);
|
|
1607
|
+
this.removeEventListener('pointerdown', this._handleItemPointerdown);
|
|
1550
1608
|
document.removeEventListener('click', this._handleDocumentClick);
|
|
1609
|
+
document.removeEventListener('pointerup', this._handleDragRelease, true);
|
|
1551
1610
|
// Defensive: the pointerdown + resize listeners are added on open
|
|
1552
1611
|
// and removed on close, but if the menu is torn down mid-open we'd
|
|
1553
1612
|
// otherwise leak the global listeners.
|
|
@@ -1594,24 +1653,44 @@ export class NLDDMenu extends LitElement {
|
|
|
1594
1653
|
_updateDividerVisibility() {
|
|
1595
1654
|
const children = Array.from(this.children);
|
|
1596
1655
|
children.forEach(el => {
|
|
1597
|
-
|
|
1656
|
+
const tag = el.tagName.toLowerCase();
|
|
1657
|
+
if (tag === 'nldd-menu-divider')
|
|
1598
1658
|
el.removeAttribute('hidden');
|
|
1599
|
-
|
|
1659
|
+
if (tag === 'nldd-menu-group')
|
|
1660
|
+
el.removeAttribute('data-no-bottom-divider');
|
|
1600
1661
|
});
|
|
1601
1662
|
const visible = children.filter(el => !el.hasAttribute('hidden'));
|
|
1663
|
+
// Pass 1: hide redundant explicit dividers (first/last, adjacent to
|
|
1664
|
+
// another divider, adjacent to a group's auto-divider).
|
|
1602
1665
|
visible.forEach((el, index) => {
|
|
1603
1666
|
if (el.tagName.toLowerCase() !== 'nldd-menu-divider')
|
|
1604
1667
|
return;
|
|
1668
|
+
const prevTag = visible[index - 1]?.tagName.toLowerCase();
|
|
1669
|
+
const nextTag = visible[index + 1]?.tagName.toLowerCase();
|
|
1605
1670
|
const isFirst = index === 0;
|
|
1606
1671
|
const isLast = index === visible.length - 1;
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
if (isFirst || isLast || prevIsDivider || nextIsGroup) {
|
|
1672
|
+
if (isFirst || isLast
|
|
1673
|
+
|| prevTag === 'nldd-menu-divider'
|
|
1674
|
+
|| prevTag === 'nldd-menu-group'
|
|
1675
|
+
|| nextTag === 'nldd-menu-group') {
|
|
1612
1676
|
el.setAttribute('hidden', '');
|
|
1613
1677
|
}
|
|
1614
1678
|
});
|
|
1679
|
+
// Pass 2: determine group bottom-divider against the post-pass-1
|
|
1680
|
+
// visible set. Without this re-filter a group followed by an
|
|
1681
|
+
// explicit divider that pass 1 hid (e.g. because the divider is
|
|
1682
|
+
// last, or the items after it are hidden) would still see the
|
|
1683
|
+
// divider as its "next" sibling and keep the bottom border.
|
|
1684
|
+
const remaining = visible.filter(el => !el.hasAttribute('hidden'));
|
|
1685
|
+
remaining.forEach((el, index) => {
|
|
1686
|
+
if (el.tagName.toLowerCase() !== 'nldd-menu-group')
|
|
1687
|
+
return;
|
|
1688
|
+
const nextTag = remaining[index + 1]?.tagName.toLowerCase();
|
|
1689
|
+
const isLast = index === remaining.length - 1;
|
|
1690
|
+
if (isLast || nextTag === 'nldd-menu-group') {
|
|
1691
|
+
el.setAttribute('data-no-bottom-divider', '');
|
|
1692
|
+
}
|
|
1693
|
+
});
|
|
1615
1694
|
}
|
|
1616
1695
|
// — Public API ————————————————————————————————————————————————————————————
|
|
1617
1696
|
/**
|
|
@@ -1717,7 +1796,7 @@ export class NLDDMenu extends LitElement {
|
|
|
1717
1796
|
// Without this, the submenu's top edge aligns with the opener and the
|
|
1718
1797
|
// inner padding pushes the first item down, leaving a visible step.
|
|
1719
1798
|
const submenuPadding = (this._isSubmenu && !this._drillInMode)
|
|
1720
|
-
? this._cssPx('--
|
|
1799
|
+
? this._cssPx('--_padding')
|
|
1721
1800
|
: 0;
|
|
1722
1801
|
// Drill-in: pick the side from the available space around the
|
|
1723
1802
|
// anchor — recomputed every reposition, but content-independent so
|
|
@@ -1741,7 +1820,7 @@ export class NLDDMenu extends LitElement {
|
|
|
1741
1820
|
size({
|
|
1742
1821
|
padding: viewportMargin,
|
|
1743
1822
|
apply: ({ availableHeight }) => {
|
|
1744
|
-
this.style.setProperty('--
|
|
1823
|
+
this.style.setProperty('--_max-height', `${availableHeight}px`);
|
|
1745
1824
|
},
|
|
1746
1825
|
}),
|
|
1747
1826
|
],
|