@nldd/design-system 0.12.0 → 0.13.1
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 +3253 -398
- package/dist/components/actions/button/button.d.ts +6 -1
- package/dist/components/actions/button/button.d.ts.map +1 -1
- package/dist/components/actions/button/button.i18n.d.ts +1 -0
- package/dist/components/actions/button/button.i18n.d.ts.map +1 -1
- package/dist/components/actions/button/button.i18n.js +1 -0
- package/dist/components/actions/button/button.i18n.js.map +1 -1
- package/dist/components/actions/button/button.js +7 -0
- package/dist/components/actions/button/button.js.map +1 -1
- package/dist/components/actions/button/button.template.d.ts.map +1 -1
- package/dist/components/actions/button/button.template.js +5 -2
- package/dist/components/actions/button/button.template.js.map +1 -1
- package/dist/components/actions/button-group/button-group.d.ts +4 -3
- package/dist/components/actions/button-group/button-group.d.ts.map +1 -1
- package/dist/components/actions/button-group/button-group.js +4 -3
- package/dist/components/actions/button-group/button-group.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 +6 -6
- package/dist/components/actions/button-group/button-group.styles.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.d.ts +8 -1
- package/dist/components/actions/icon-button/icon-button.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.i18n.d.ts +1 -0
- package/dist/components/actions/icon-button/icon-button.i18n.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.i18n.js +1 -0
- package/dist/components/actions/icon-button/icon-button.i18n.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.js +9 -0
- package/dist/components/actions/icon-button/icon-button.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.template.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.template.js +5 -2
- package/dist/components/actions/icon-button/icon-button.template.js.map +1 -1
- package/dist/components/actions/menu/menu-divider.d.ts +14 -0
- package/dist/components/actions/menu/menu-divider.d.ts.map +1 -0
- package/dist/components/actions/menu/menu-divider.js +33 -0
- package/dist/components/actions/menu/menu-divider.js.map +1 -0
- package/dist/components/actions/menu/menu-group.d.ts +35 -0
- package/dist/components/actions/menu/menu-group.d.ts.map +1 -0
- package/dist/components/actions/menu/menu-group.js +69 -0
- package/dist/components/actions/menu/menu-group.js.map +1 -0
- package/dist/components/actions/menu/menu-item.d.ts +86 -0
- package/dist/components/actions/menu/menu-item.d.ts.map +1 -0
- package/dist/components/actions/menu/menu-item.js +279 -0
- package/dist/components/actions/menu/menu-item.js.map +1 -0
- package/dist/components/actions/menu/menu.chain.d.ts +40 -0
- package/dist/components/actions/menu/menu.chain.d.ts.map +1 -0
- package/dist/components/actions/menu/menu.chain.js +150 -0
- package/dist/components/actions/menu/menu.chain.js.map +1 -0
- package/dist/components/actions/menu/menu.d.ts +54 -269
- package/dist/components/actions/menu/menu.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.js +106 -981
- package/dist/components/actions/menu/menu.js.map +1 -1
- package/dist/components/actions/menu/menu.pointer.d.ts +61 -0
- package/dist/components/actions/menu/menu.pointer.d.ts.map +1 -0
- package/dist/components/actions/menu/menu.pointer.js +143 -0
- package/dist/components/actions/menu/menu.pointer.js.map +1 -0
- package/dist/components/actions/menu/menu.safe-triangle.d.ts +79 -0
- package/dist/components/actions/menu/menu.safe-triangle.d.ts.map +1 -0
- package/dist/components/actions/menu/menu.safe-triangle.js +198 -0
- package/dist/components/actions/menu/menu.safe-triangle.js.map +1 -0
- package/dist/components/actions/menu/menu.template.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.template.js +5 -4
- package/dist/components/actions/menu/menu.template.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar-item.d.ts +46 -0
- package/dist/components/actions/toolbar/toolbar-item.d.ts.map +1 -0
- package/dist/components/actions/toolbar/toolbar-item.js +113 -0
- package/dist/components/actions/toolbar/toolbar-item.js.map +1 -0
- package/dist/components/actions/toolbar/toolbar-item.template.d.ts +3 -0
- package/dist/components/actions/toolbar/toolbar-item.template.d.ts.map +1 -0
- package/dist/components/actions/toolbar/toolbar-item.template.js +12 -0
- package/dist/components/actions/toolbar/toolbar-item.template.js.map +1 -0
- package/dist/components/actions/toolbar/toolbar-title.d.ts +43 -0
- package/dist/components/actions/toolbar/toolbar-title.d.ts.map +1 -0
- package/dist/components/actions/toolbar/toolbar-title.js +111 -0
- package/dist/components/actions/toolbar/toolbar-title.js.map +1 -0
- package/dist/components/actions/toolbar/toolbar-title.template.d.ts +3 -0
- package/dist/components/actions/toolbar/toolbar-title.template.d.ts.map +1 -0
- package/dist/components/actions/toolbar/toolbar-title.template.js +33 -0
- package/dist/components/actions/toolbar/toolbar-title.template.js.map +1 -0
- package/dist/components/actions/toolbar/toolbar.d.ts +16 -111
- package/dist/components/actions/toolbar/toolbar.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar.js +50 -423
- package/dist/components/actions/toolbar/toolbar.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar.layout.d.ts +40 -0
- package/dist/components/actions/toolbar/toolbar.layout.d.ts.map +1 -0
- package/dist/components/actions/toolbar/toolbar.layout.js +76 -0
- package/dist/components/actions/toolbar/toolbar.layout.js.map +1 -0
- package/dist/components/actions/toolbar/toolbar.overflow-menu.d.ts +52 -0
- package/dist/components/actions/toolbar/toolbar.overflow-menu.d.ts.map +1 -0
- package/dist/components/actions/toolbar/toolbar.overflow-menu.js +105 -0
- package/dist/components/actions/toolbar/toolbar.overflow-menu.js.map +1 -0
- package/dist/components/actions/toolbar/toolbar.template.d.ts +1 -4
- package/dist/components/actions/toolbar/toolbar.template.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar.template.js +0 -41
- package/dist/components/actions/toolbar/toolbar.template.js.map +1 -1
- package/dist/components/{breakpoints-Bpf2MgjM.js → breakpoints-Bti55RWY.js} +1 -2
- package/dist/components/components.js +5511 -3932
- package/dist/components/content/avatar/avatar.d.ts +2 -1
- package/dist/components/content/avatar/avatar.d.ts.map +1 -1
- package/dist/components/content/avatar/avatar.js +12 -1
- package/dist/components/content/avatar/avatar.js.map +1 -1
- package/dist/components/content/avatar-group/avatar-group.d.ts +30 -2
- package/dist/components/content/avatar-group/avatar-group.d.ts.map +1 -1
- package/dist/components/content/avatar-group/avatar-group.i18n.d.ts +1 -0
- package/dist/components/content/avatar-group/avatar-group.i18n.d.ts.map +1 -1
- package/dist/components/content/avatar-group/avatar-group.i18n.js +1 -0
- package/dist/components/content/avatar-group/avatar-group.i18n.js.map +1 -1
- package/dist/components/content/avatar-group/avatar-group.js +96 -7
- package/dist/components/content/avatar-group/avatar-group.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 +35 -1
- package/dist/components/content/avatar-group/avatar-group.styles.js.map +1 -1
- package/dist/components/content/avatar-group/avatar-group.template.d.ts +1 -0
- package/dist/components/content/avatar-group/avatar-group.template.d.ts.map +1 -1
- package/dist/components/content/avatar-group/avatar-group.template.js +52 -29
- package/dist/components/content/avatar-group/avatar-group.template.js.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.styles.d.ts.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.styles.js +48 -14
- package/dist/components/content/code-viewer/code-viewer.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 +30 -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 +16 -0
- package/dist/components/content/icon/icon-gallery-status.js.map +1 -1
- package/dist/components/content/icon/icon-registry.d.ts.map +1 -1
- package/dist/components/content/icon/icon-registry.js +16 -3
- package/dist/components/content/icon/icon-registry.js.map +1 -1
- package/dist/components/content/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/content/tooltip/tooltip.js +2 -0
- package/dist/components/content/tooltip/tooltip.js.map +1 -1
- package/dist/components/{decorate-CO88j7Lc.js → decorate-Cz9-peTN.js} +1 -2
- package/dist/components/{dist-B5E3q-ea.js → dist-B9YBOGFW.js} +4 -6
- package/dist/components/{dist-BWlUmyq3.js → dist-BFZM0YsR.js} +57 -36
- package/dist/components/{dist-BFw_yEMS.js → dist-BNkeFjc3.js} +5 -7
- package/dist/components/{dist-Co-tsc9S.js → dist-BaLc58I_.js} +7 -9
- package/dist/components/{dist-BOVSVPSz.js → dist-Bm3708s5.js} +3 -4
- package/dist/components/{dist-IPm8ilWf.js → dist-CJ9uLG0u.js} +5 -17
- package/dist/components/{dist-Dz28se9B.js → dist-CJm4tkNC.js} +4 -6
- package/dist/components/{dist-CC8oiVtm.js → dist-CSC1dG3L.js} +2 -3
- package/dist/components/{dist-BPB3rWnd.js → dist-DHhnz3Gv.js} +3 -4
- package/dist/components/{dist-Dn9pjiud.js → dist-DgjvHvsN.js} +6 -8
- package/dist/components/{dist-COKR0tYU.js → dist-PeUX4vPq.js} +3 -6
- package/dist/components/{dist-D_9ZyZ5v.js → dist-YYLChwRq.js} +5 -7
- package/dist/components/{dist-BNLAXAyO.js → dist-m70B83qb.js} +4 -6
- package/dist/components/{gherkin-uCVRxsGf.js → gherkin-DzYbEwDO.js} +1 -2
- package/dist/components/{icon-DFhgRf3P.js → icon-DZ1UXCzO.js} +42 -16
- package/dist/components/{icon-button-Sxkh5cVr.js → icon-button-984CwkU1.js} +106 -43
- package/dist/components/{input-modality-DhTeUxKi.js → input-modality-CiPLYYMN.js} +1 -2
- package/dist/components/inputs/code-editor/code-editor.styles.d.ts.map +1 -1
- package/dist/components/inputs/code-editor/code-editor.styles.js +42 -7
- package/dist/components/inputs/code-editor/code-editor.styles.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 +1 -0
- package/dist/components/inputs/combo-box/combo-box.styles.js.map +1 -1
- package/dist/components/inputs/date-field/date-field.d.ts +41 -28
- package/dist/components/inputs/date-field/date-field.d.ts.map +1 -1
- package/dist/components/inputs/date-field/date-field.dates.d.ts +60 -0
- package/dist/components/inputs/date-field/date-field.dates.d.ts.map +1 -0
- package/dist/components/inputs/date-field/date-field.dates.js +106 -0
- package/dist/components/inputs/date-field/date-field.dates.js.map +1 -0
- package/dist/components/inputs/date-field/date-field.i18n.d.ts +4 -0
- package/dist/components/inputs/date-field/date-field.i18n.d.ts.map +1 -1
- package/dist/components/inputs/date-field/date-field.i18n.js +6 -0
- package/dist/components/inputs/date-field/date-field.i18n.js.map +1 -1
- package/dist/components/inputs/date-field/date-field.js +110 -142
- 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 +1 -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 +21 -17
- package/dist/components/inputs/date-field/date-field.template.js.map +1 -1
- package/dist/components/inputs/date-picker/date-picker.d.ts +2 -2
- package/dist/components/inputs/date-picker/date-picker.i18n.d.ts +1 -1
- package/dist/components/inputs/date-picker/date-picker.i18n.js +1 -1
- package/dist/components/inputs/date-picker/date-picker.i18n.js.map +1 -1
- package/dist/components/inputs/date-picker/date-picker.template.js +1 -1
- package/dist/components/inputs/date-picker/date-picker.template.js.map +1 -1
- package/dist/components/inputs/file-field/file-field.d.ts +86 -10
- package/dist/components/inputs/file-field/file-field.d.ts.map +1 -1
- package/dist/components/inputs/file-field/file-field.drop.d.ts +34 -0
- package/dist/components/inputs/file-field/file-field.drop.d.ts.map +1 -0
- package/dist/components/inputs/file-field/file-field.drop.js +176 -0
- package/dist/components/inputs/file-field/file-field.drop.js.map +1 -0
- package/dist/components/inputs/file-field/file-field.i18n.d.ts +20 -1
- package/dist/components/inputs/file-field/file-field.i18n.d.ts.map +1 -1
- package/dist/components/inputs/file-field/file-field.i18n.js +20 -1
- package/dist/components/inputs/file-field/file-field.i18n.js.map +1 -1
- package/dist/components/inputs/file-field/file-field.js +283 -15
- package/dist/components/inputs/file-field/file-field.js.map +1 -1
- package/dist/components/inputs/file-field/file-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/file-field/file-field.styles.js +245 -10
- package/dist/components/inputs/file-field/file-field.styles.js.map +1 -1
- package/dist/components/inputs/file-field/file-field.template.d.ts +1 -0
- package/dist/components/inputs/file-field/file-field.template.d.ts.map +1 -1
- package/dist/components/inputs/file-field/file-field.template.js +167 -28
- package/dist/components/inputs/file-field/file-field.template.js.map +1 -1
- package/dist/components/inputs/file-field/file-field.truncate.d.ts +22 -0
- package/dist/components/inputs/file-field/file-field.truncate.d.ts.map +1 -0
- package/dist/components/inputs/file-field/file-field.truncate.js +62 -0
- package/dist/components/inputs/file-field/file-field.truncate.js.map +1 -0
- 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 +1 -0
- package/dist/components/inputs/multi-line-text-field/multi-line-text-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 +1 -0
- package/dist/components/inputs/password-field/password-field.styles.js.map +1 -1
- package/dist/components/inputs/search-field/search-field.d.ts +1 -1
- package/dist/components/inputs/search-field/search-field.js +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 +1 -0
- package/dist/components/inputs/search-field/search-field.styles.js.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.d.ts +6 -3
- package/dist/components/inputs/segmented-control/segmented-control.d.ts.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.js +8 -10
- package/dist/components/inputs/segmented-control/segmented-control.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.code-copy.d.ts +10 -0
- package/dist/components/inputs/text-editor/text-editor.code-copy.d.ts.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.code-copy.js +141 -0
- package/dist/components/inputs/text-editor/text-editor.code-copy.js.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.hidden-syntax.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.hidden-syntax.js +55 -7
- package/dist/components/inputs/text-editor/text-editor.hidden-syntax.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.i18n.d.ts +5 -0
- package/dist/components/inputs/text-editor/text-editor.i18n.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.i18n.js +7 -0
- package/dist/components/inputs/text-editor/text-editor.i18n.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.js +34 -3
- package/dist/components/inputs/text-editor/text-editor.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.markdown.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.markdown.js +6 -2
- package/dist/components/inputs/text-editor/text-editor.markdown.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.selection.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.selection.js +43 -7
- package/dist/components/inputs/text-editor/text-editor.selection.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.styles.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.styles.js +147 -7
- package/dist/components/inputs/text-editor/text-editor.styles.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.tasks.d.ts +17 -0
- package/dist/components/inputs/text-editor/text-editor.tasks.d.ts.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.tasks.js +113 -0
- package/dist/components/inputs/text-editor/text-editor.tasks.js.map +1 -0
- package/dist/components/inputs/text-field/text-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/text-field/text-field.styles.js +1 -0
- package/dist/components/inputs/text-field/text-field.styles.js.map +1 -1
- package/dist/components/inputs/time-field/time-field.d.ts +26 -40
- package/dist/components/inputs/time-field/time-field.d.ts.map +1 -1
- package/dist/components/inputs/time-field/time-field.i18n.d.ts +3 -0
- package/dist/components/inputs/time-field/time-field.i18n.d.ts.map +1 -1
- package/dist/components/inputs/time-field/time-field.i18n.js +5 -0
- package/dist/components/inputs/time-field/time-field.i18n.js.map +1 -1
- package/dist/components/inputs/time-field/time-field.js +68 -162
- 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 +1 -0
- package/dist/components/inputs/time-field/time-field.styles.js.map +1 -1
- package/dist/components/inputs/time-field/time-field.times.d.ts +74 -0
- package/dist/components/inputs/time-field/time-field.times.d.ts.map +1 -0
- package/dist/components/inputs/time-field/time-field.times.js +154 -0
- package/dist/components/inputs/time-field/time-field.times.js.map +1 -0
- package/dist/components/layout/card/card.d.ts +6 -1
- package/dist/components/layout/card/card.d.ts.map +1 -1
- package/dist/components/layout/card/card.i18n.d.ts +1 -0
- package/dist/components/layout/card/card.i18n.d.ts.map +1 -1
- package/dist/components/layout/card/card.i18n.js +1 -0
- package/dist/components/layout/card/card.i18n.js.map +1 -1
- package/dist/components/layout/card/card.js +7 -0
- package/dist/components/layout/card/card.js.map +1 -1
- package/dist/components/layout/card/card.template.d.ts.map +1 -1
- package/dist/components/layout/card/card.template.js +5 -2
- package/dist/components/layout/card/card.template.js.map +1 -1
- package/dist/components/layout/page/page.d.ts +3 -0
- package/dist/components/layout/page/page.d.ts.map +1 -1
- package/dist/components/layout/page/page.js +20 -3
- package/dist/components/layout/page/page.js.map +1 -1
- package/dist/components/layout/page/page.styles.d.ts.map +1 -1
- package/dist/components/layout/page/page.styles.js +25 -2
- package/dist/components/layout/page/page.styles.js.map +1 -1
- package/dist/components/layout/page/page.template.js +1 -1
- package/dist/components/layout/page/page.template.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero-corner.styles.d.ts.map +1 -1
- package/dist/components/layout/page-sections/hero/hero-corner.styles.js +61 -0
- package/dist/components/layout/page-sections/hero/hero-corner.styles.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.d.ts +1 -1
- package/dist/components/layout/page-sections/hero/hero.js +1 -1
- package/dist/components/layout/popover/popover.d.ts +6 -0
- package/dist/components/layout/popover/popover.d.ts.map +1 -1
- package/dist/components/layout/popover/popover.js +16 -0
- 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 +13 -0
- package/dist/components/layout/popover/popover.styles.js.map +1 -1
- package/dist/components/layout/sheet/sheet.d.ts +5 -0
- package/dist/components/layout/sheet/sheet.d.ts.map +1 -1
- package/dist/components/layout/sheet/sheet.js +14 -6
- package/dist/components/layout/sheet/sheet.js.map +1 -1
- package/dist/components/layout/sheet/sheet.template.d.ts.map +1 -1
- package/dist/components/layout/sheet/sheet.template.js +1 -0
- package/dist/components/layout/sheet/sheet.template.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.d.ts +6 -1
- 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.i18n.d.ts +1 -0
- package/dist/components/lists-and-tables/list-item/list-item.i18n.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.i18n.js +1 -0
- package/dist/components/lists-and-tables/list-item/list-item.i18n.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.js +12 -3
- package/dist/components/lists-and-tables/list-item/list-item.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.template.d.ts +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.template.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.template.js +2 -1
- package/dist/components/lists-and-tables/list-item/list-item.template.js.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts +6 -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.i18n.d.ts +1 -0
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.i18n.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.i18n.js +1 -0
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.i18n.js.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js +12 -3
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.d.ts +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.js +2 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.js.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.d.ts.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.js +5 -0
- package/dist/components/navigation/document-tab-bar/document-tab-bar.js.map +1 -1
- package/dist/components/navigation/link/link.d.ts +6 -1
- package/dist/components/navigation/link/link.d.ts.map +1 -1
- package/dist/components/navigation/link/link.i18n.d.ts +1 -0
- package/dist/components/navigation/link/link.i18n.d.ts.map +1 -1
- package/dist/components/navigation/link/link.i18n.js +1 -0
- package/dist/components/navigation/link/link.i18n.js.map +1 -1
- package/dist/components/navigation/link/link.js +7 -0
- package/dist/components/navigation/link/link.js.map +1 -1
- package/dist/components/navigation/link/link.template.d.ts.map +1 -1
- package/dist/components/navigation/link/link.template.js +5 -2
- package/dist/components/navigation/link/link.template.js.map +1 -1
- package/dist/components/navigation/menu-bar/menu-bar.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar/menu-bar.js +2 -0
- package/dist/components/navigation/menu-bar/menu-bar.js.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.d.ts +1 -0
- package/dist/components/navigation/tab-bar/tab-bar.d.ts.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.js +9 -0
- package/dist/components/navigation/tab-bar/tab-bar.js.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.d.ts +9 -24
- 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 +29 -220
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.menu-sheet.d.ts +48 -0
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.menu-sheet.d.ts.map +1 -0
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.menu-sheet.js +220 -0
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.menu-sheet.js.map +1 -0
- 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 +22 -2
- 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 +4 -0
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.template.js.map +1 -1
- package/dist/components/{reflect-non-default-OLaK60rT.js → reflect-non-default-B9wQcnne.js} +1 -2
- package/dist/components/{rolldown-runtime-D7D4PA-g.js → rolldown-runtime-D8jQpDG7.js} +1 -2
- package/dist/components/{shadow-resets-CPa58rmc.js → shadow-resets-BwOyyZFH.js} +1 -2
- package/dist/components/{shell-C61GCsJA.js → shell-Dh5IwHd-.js} +1 -2
- package/dist/components/status-and-feedback/banner/banner.d.ts +1 -1
- package/dist/components/status-and-feedback/banner/banner.js +2 -2
- package/dist/components/status-and-feedback/banner/banner.js.map +1 -1
- package/dist/components/status-and-feedback/notification/notification.d.ts +1 -1
- package/dist/components/status-and-feedback/notification/notification.d.ts.map +1 -1
- package/dist/components/status-and-feedback/notification/notification.js +4 -2
- package/dist/components/status-and-feedback/notification/notification.js.map +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.i18n.d.ts +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.i18n.js +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.i18n.js.map +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.js +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.js.map +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.i18n.d.ts +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.i18n.js +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.i18n.js.map +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.js +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.js.map +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.d.ts +10 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.d.ts.map +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.js +22 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.js.map +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.template.d.ts.map +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.template.js +2 -0
- package/dist/components/status-and-feedback/step-bar/step-bar.template.js.map +1 -1
- package/dist/components/{toml-C2HBbPgG.js → toml-D0Pix_8Q.js} +1 -2
- package/dist/components/{visibility-mixin-djNSG5ZN.js → visibility-mixin-C-K7ho5Q.js} +4 -6
- package/dist/components/{with-translations-C6QfP6_S.js → with-translations-DRuOq3QK.js} +14 -10
- package/dist/css/themes/donkergeel.css +5 -0
- package/dist/css/themes/geel.css +5 -0
- package/dist/css/themes.css +10 -0
- package/dist/css/variables.css +11 -11
- package/dist/nldd.min.js +2089 -1398
- package/dist/translations/en-US.d.ts.map +1 -1
- package/dist/translations/en-US.js +42 -4
- package/dist/translations/en-US.js.map +1 -1
- package/dist/translations/fy.d.ts.map +1 -1
- package/dist/translations/fy.js +42 -4
- package/dist/translations/fy.js.map +1 -1
- package/dist/translations/nl.generated.d.ts +42 -4
- package/dist/translations/nl.generated.d.ts.map +1 -1
- package/dist/translations/pap-AW.d.ts.map +1 -1
- package/dist/translations/pap-AW.js +42 -4
- package/dist/translations/pap-AW.js.map +1 -1
- package/dist/translations/pap-CW.d.ts.map +1 -1
- package/dist/translations/pap-CW.js +42 -4
- package/dist/translations/pap-CW.js.map +1 -1
- package/dist/types/vue.d.ts +69 -33
- package/dist/utilities/carried-context.d.ts +20 -0
- package/dist/utilities/carried-context.d.ts.map +1 -0
- package/dist/utilities/carried-context.js +76 -0
- package/dist/utilities/carried-context.js.map +1 -0
- package/dist/utilities/codemirror/languages.d.ts +5 -1
- package/dist/utilities/codemirror/languages.d.ts.map +1 -1
- package/dist/utilities/codemirror/languages.js +21 -1
- package/dist/utilities/codemirror/languages.js.map +1 -1
- package/dist/utilities/dismiss-from-title-bar.d.ts +1 -1
- package/dist/utilities/dismiss-from-title-bar.js +1 -1
- package/dist/utilities/form-associated-mixin.d.ts +7 -0
- package/dist/utilities/form-associated-mixin.d.ts.map +1 -1
- package/dist/utilities/form-associated-mixin.js +13 -1
- package/dist/utilities/form-associated-mixin.js.map +1 -1
- package/dist/utilities/link-hint.d.ts +11 -0
- package/dist/utilities/link-hint.d.ts.map +1 -1
- package/dist/utilities/link-hint.js +15 -0
- package/dist/utilities/link-hint.js.map +1 -1
- package/package.json +2 -2
|
@@ -32,211 +32,19 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
32
32
|
* @slot center - nldd-toolbar-item and nldd-toolbar-title elements placed at the center
|
|
33
33
|
* @slot end - nldd-toolbar-item and nldd-toolbar-title elements placed at the end
|
|
34
34
|
* @slot overflow - nldd-menu-item, nldd-menu-divider and nldd-menu-group elements always shown in the overflow menu
|
|
35
|
-
*
|
|
36
|
-
* ---
|
|
37
|
-
*
|
|
38
|
-
* @element nldd-toolbar-item
|
|
39
|
-
* @attr {string} width - Fluid width: a percentage (e.g. '40%') or any CSS length (e.g. '240px'). Setting it (or min-width or max-width) makes the item fluid so it grows to fill the available space.
|
|
40
|
-
* @attr {string} min-width - Minimum (fluid) width as a CSS length (e.g. '240px'). Setting it also makes the item fluid.
|
|
41
|
-
* @attr {string} max-width - Maximum (fluid) width as a CSS length (e.g. '480px'). Setting it also makes the item fluid.
|
|
42
|
-
* @attr {string} label - Text label shown below the item when the toolbar has show-item-labels.
|
|
43
|
-
* @attr {number} priority - Overflow order: items with a lower priority move into the overflow menu first (default 0). Items sharing a priority overflow together, regardless of position.
|
|
44
|
-
* @attr {'sm'|'md'|'lg'} size - Set by nldd-toolbar, not a consumer attribute: mirrors the toolbar's size (default: 'md') onto the item host, so size-dependent styling can key off it.
|
|
45
|
-
* @attr {boolean} show-item-labels - Set by nldd-toolbar, not a consumer attribute: mirrors the toolbar's show-item-labels, so the item renders its label below the control.
|
|
46
|
-
* @attr {boolean} fluid - Set by nldd-toolbar, not a consumer attribute: marks an item that grows or shrinks to fill space. Toggled synchronously during measurement, so it can appear or disappear between layout frames — do not style against it. It is not reflected as a JS property — read it with hasAttribute('fluid').
|
|
47
|
-
* @attr {boolean} solo-fluid - Set by nldd-toolbar, not a consumer attribute: the sole fluid item, allowed to shrink below its content. Same synchronous-toggle and property-read caveats as fluid.
|
|
48
|
-
* @attr {boolean} hidden - Set by nldd-toolbar, not a consumer attribute, when the item moves into the overflow menu. Same synchronous-toggle caveat.
|
|
49
|
-
* @attr {boolean} shrinkable - Set by nldd-toolbar, not a consumer attribute: the item holds a control that overflows by itself (nldd-tab-bar), so it gets the width that control wants with everything shown. Same synchronous-toggle caveat.
|
|
50
|
-
* @attr {boolean} shrunk - Set by nldd-toolbar, not a consumer attribute: a shrinkable item narrowed down to what its control needs at least, before it would move into the overflow menu. Same synchronous-toggle caveat.
|
|
51
|
-
*
|
|
52
|
-
* @slot - The control shown in the toolbar (e.g. nldd-icon-button)
|
|
53
|
-
* @slot overflow - Required: nldd-menu-item / nldd-menu-divider / nldd-menu-group children, shown in the overflow menu when this item overflows. Without them the action is gone on a narrow toolbar, and the item warns in development.
|
|
54
|
-
*
|
|
55
|
-
* ---
|
|
56
|
-
*
|
|
57
|
-
* @element nldd-toolbar-title
|
|
58
|
-
* @attr {string} width - Preferred (fluid) width as a CSS length or percentage; the title grows toward it and shrinks to min-width.
|
|
59
|
-
* @attr {string} min-width - Minimum width as a CSS length (default: the width of its own text, up to `max-width`). Items move into the overflow menu before the title gets narrower than this; only when no item is left to move does the title truncate below it. Set `0` to let the title shrink first.
|
|
60
|
-
* @attr {string} max-width - Maximum width as a CSS length (default: '240px'); the title text truncates with an ellipsis beyond it. The cap is lifted while the title is the sole toolbar element (it then stretches to fill the row).
|
|
61
|
-
* @attr {string} align - Text alignment: 'left' | 'center' (default: 'left').
|
|
62
|
-
* @attr {string} text - Title text.
|
|
63
|
-
* @attr {string} supporting-text - Secondary supporting text shown below the title.
|
|
64
|
-
* @attr {'sm'|'md'|'lg'} size - Set by nldd-toolbar, not a consumer attribute: mirrors the toolbar's size (default: 'md'), which sets the title group height and, at 'sm', the title and supporting-text fonts.
|
|
65
|
-
*
|
|
66
|
-
* @attr {string} href - Makes the mark and the name one link, for the place this window belongs to (usually the app's own start). The `action` slot stays outside it: a control inside a link is a control you cannot reach without following the link.
|
|
67
|
-
* @attr {string} target - Where the link opens; only meaningful with `href`. `_blank` adds rel="noopener noreferrer" and a visually hidden "opens in a new tab" announcement. An `href` to another origin than the page (another website, a subdomain too) adds a visually hidden "andere website", in one sentence with the new-tab announcement when both apply; there is no way to switch it off.
|
|
68
|
-
* @attr {object} translations - Override translation keys (the new-tab announcement); unset keys fall back to Dutch.
|
|
69
|
-
*
|
|
70
|
-
* @slot media - Optional leading image before the title: a logo, a product mark, a file-type icon. Its height is capped to the title group so it cannot stretch the row; pick the size within that yourself. With no `text` the media stands alone and carries the name, so give it one (an `alt`, or an accessible label).
|
|
71
|
-
* @slot action - Optional trailing control (e.g. an xs nldd-icon-button), shown inline after the title and tuned to sit against it. Empty by default.
|
|
72
35
|
*/
|
|
73
36
|
import { LitElement } from 'lit';
|
|
74
37
|
import { customElement, property, state } from 'lit/decorators.js';
|
|
75
38
|
import { reflectNonDefault } from '../../../utilities/reflect-non-default.js';
|
|
76
|
-
import { toolbarStyles
|
|
77
|
-
import { template
|
|
39
|
+
import { toolbarStyles } from './toolbar.styles.js';
|
|
40
|
+
import { template } from './toolbar.template.js';
|
|
78
41
|
import { nlddToolbarTranslations } from './toolbar.i18n.js';
|
|
79
42
|
import { translate } from '../../../utilities/translations.js';
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
this.minWidth = '';
|
|
86
|
-
this.maxWidth = '';
|
|
87
|
-
this.label = '';
|
|
88
|
-
// Overflow order. The parent toolbar reads this as a PROPERTY (el.priority), so
|
|
89
|
-
// both a bound property (Vue/React `:priority`, `el.priority = 2`) and a plain
|
|
90
|
-
// attribute (`priority="2"`) work. Reflected so an explicit value is visible in
|
|
91
|
-
// the DOM and a runtime property change re-triggers the toolbar's overflow
|
|
92
|
-
// recompute (its observer watches the attribute). The converter reflects the
|
|
93
|
-
// default 0 as *no attribute* (toAttribute → null), so the DOM isn't polluted
|
|
94
|
-
// with `priority="0"` on every item; 0 means "no explicit priority".
|
|
95
|
-
this.priority = 0;
|
|
96
|
-
/** Set by nldd-toolbar; not part of the public API. @internal */
|
|
97
|
-
this.size = 'md';
|
|
98
|
-
/** Set by nldd-toolbar; not part of the public API. @internal */
|
|
99
|
-
this.showItemLabels = false;
|
|
100
|
-
}
|
|
101
|
-
// Layout state — `fluid`, `solo-fluid` and `hidden` — is owned by
|
|
102
|
-
// nldd-toolbar and toggled directly as attributes during measurement
|
|
103
|
-
// (synchronous, so the host box reflows immediately). They are not
|
|
104
|
-
// reactive properties: Lit would reflect them asynchronously, which would
|
|
105
|
-
// desync the attribute from the synchronous getBoundingClientRect reads.
|
|
106
|
-
firstUpdated() {
|
|
107
|
-
// Without an alternative the action is simply gone once the toolbar runs
|
|
108
|
-
// out of room, and that only happens on a narrow screen. Say it at load,
|
|
109
|
-
// where a wide screen sees it too, not at the moment the item overflows.
|
|
110
|
-
//
|
|
111
|
-
// A frame later, not now: a framework can append the overflow child right
|
|
112
|
-
// after the element upgrades (Vue, React with async children), and asking
|
|
113
|
-
// on the first render would call that a missing fallback.
|
|
114
|
-
if (!import.meta.env?.DEV)
|
|
115
|
-
return;
|
|
116
|
-
requestAnimationFrame(() => this._warnWithoutOverflow());
|
|
117
|
-
}
|
|
118
|
-
_warnWithoutOverflow() {
|
|
119
|
-
if (!this.isConnected || this.querySelector(':scope > [slot="overflow"]'))
|
|
120
|
-
return;
|
|
121
|
-
const control = this.querySelector(':scope > :not([slot])');
|
|
122
|
-
const name = control?.getAttribute('accessible-label') || control?.getAttribute('text') || this.label;
|
|
123
|
-
console.warn(`nldd-toolbar-item${name ? ` ("${name}")` : ''}: nothing in slot="overflow". On a narrow toolbar this item moves into the overflow menu, and without an nldd-menu-item there its action is gone. Add one in slot="overflow".`);
|
|
124
|
-
}
|
|
125
|
-
render() {
|
|
126
|
-
return toolbarItemTemplate(this);
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
NLDDToolbarItem.styles = toolbarItemStyles;
|
|
130
|
-
__decorate([
|
|
131
|
-
property({ reflect: true, converter: reflectNonDefault('') })
|
|
132
|
-
], NLDDToolbarItem.prototype, "width", void 0);
|
|
133
|
-
__decorate([
|
|
134
|
-
property({ reflect: true, attribute: 'min-width', converter: reflectNonDefault('') })
|
|
135
|
-
], NLDDToolbarItem.prototype, "minWidth", void 0);
|
|
136
|
-
__decorate([
|
|
137
|
-
property({ reflect: true, attribute: 'max-width', converter: reflectNonDefault('') })
|
|
138
|
-
], NLDDToolbarItem.prototype, "maxWidth", void 0);
|
|
139
|
-
__decorate([
|
|
140
|
-
property({ type: String })
|
|
141
|
-
], NLDDToolbarItem.prototype, "label", void 0);
|
|
142
|
-
__decorate([
|
|
143
|
-
property({
|
|
144
|
-
reflect: true,
|
|
145
|
-
converter: {
|
|
146
|
-
fromAttribute: (value) => (value === null ? 0 : Number(value)),
|
|
147
|
-
toAttribute: (value) => (value === 0 ? null : String(value)),
|
|
148
|
-
},
|
|
149
|
-
})
|
|
150
|
-
], NLDDToolbarItem.prototype, "priority", void 0);
|
|
151
|
-
__decorate([
|
|
152
|
-
property({ reflect: true, converter: reflectNonDefault('md') })
|
|
153
|
-
], NLDDToolbarItem.prototype, "size", void 0);
|
|
154
|
-
__decorate([
|
|
155
|
-
property({ type: Boolean, reflect: true, attribute: 'show-item-labels' })
|
|
156
|
-
], NLDDToolbarItem.prototype, "showItemLabels", void 0);
|
|
157
|
-
NLDDToolbarItem = __decorate([
|
|
158
|
-
customElement('nldd-toolbar-item')
|
|
159
|
-
], NLDDToolbarItem);
|
|
160
|
-
export { NLDDToolbarItem };
|
|
161
|
-
// # nldd-toolbar-title
|
|
162
|
-
let NLDDToolbarTitle = class NLDDToolbarTitle extends LitElement {
|
|
163
|
-
constructor() {
|
|
164
|
-
super(...arguments);
|
|
165
|
-
this.width = '';
|
|
166
|
-
this.minWidth = '';
|
|
167
|
-
this.maxWidth = '';
|
|
168
|
-
this.align = 'left';
|
|
169
|
-
this.text = '';
|
|
170
|
-
this.supportingText = '';
|
|
171
|
-
this.href = '';
|
|
172
|
-
this.target = '';
|
|
173
|
-
this.translations = {};
|
|
174
|
-
/** Set by nldd-toolbar; not part of the public API. @internal */
|
|
175
|
-
this.size = 'md';
|
|
176
|
-
}
|
|
177
|
-
_t(key) {
|
|
178
|
-
return translate(this.translations, nlddToolbarTranslations, key);
|
|
179
|
-
}
|
|
180
|
-
// Layout state — `solo-fluid` and `hidden` — is owned by nldd-toolbar and
|
|
181
|
-
// toggled directly as attributes during measurement (synchronous). Not a
|
|
182
|
-
// reactive property for the same reflection-timing reason as the item.
|
|
183
|
-
// willUpdate (not updated) so the size CSS variables are written before the
|
|
184
|
-
// toolbar measures the title with getBoundingClientRect() on the same frame.
|
|
185
|
-
willUpdate(changedProperties) {
|
|
186
|
-
if (changedProperties.has('minWidth'))
|
|
187
|
-
this._reflectSizeVar('--_toolbar-title-group-min-width', this.minWidth);
|
|
188
|
-
if (changedProperties.has('width'))
|
|
189
|
-
this._reflectSizeVar('--_toolbar-title-width', this.width);
|
|
190
|
-
if (changedProperties.has('maxWidth'))
|
|
191
|
-
this._reflectSizeVar('--_toolbar-title-max-width', this.maxWidth);
|
|
192
|
-
}
|
|
193
|
-
_reflectSizeVar(prop, value) {
|
|
194
|
-
if (value) {
|
|
195
|
-
this.style.setProperty(prop, value);
|
|
196
|
-
}
|
|
197
|
-
else {
|
|
198
|
-
this.style.removeProperty(prop);
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
render() {
|
|
202
|
-
return toolbarTitleTemplate(this);
|
|
203
|
-
}
|
|
204
|
-
};
|
|
205
|
-
NLDDToolbarTitle.styles = toolbarTitleStyles;
|
|
206
|
-
__decorate([
|
|
207
|
-
property({ reflect: true, converter: reflectNonDefault('') })
|
|
208
|
-
], NLDDToolbarTitle.prototype, "width", void 0);
|
|
209
|
-
__decorate([
|
|
210
|
-
property({ reflect: true, attribute: 'min-width', converter: reflectNonDefault('') })
|
|
211
|
-
], NLDDToolbarTitle.prototype, "minWidth", void 0);
|
|
212
|
-
__decorate([
|
|
213
|
-
property({ reflect: true, attribute: 'max-width', converter: reflectNonDefault('') })
|
|
214
|
-
], NLDDToolbarTitle.prototype, "maxWidth", void 0);
|
|
215
|
-
__decorate([
|
|
216
|
-
property({ reflect: true, converter: reflectNonDefault('left') })
|
|
217
|
-
], NLDDToolbarTitle.prototype, "align", void 0);
|
|
218
|
-
__decorate([
|
|
219
|
-
property({ reflect: true, converter: reflectNonDefault('') })
|
|
220
|
-
], NLDDToolbarTitle.prototype, "text", void 0);
|
|
221
|
-
__decorate([
|
|
222
|
-
property({ reflect: true, attribute: 'supporting-text', converter: reflectNonDefault('') })
|
|
223
|
-
], NLDDToolbarTitle.prototype, "supportingText", void 0);
|
|
224
|
-
__decorate([
|
|
225
|
-
property({ type: String, reflect: true })
|
|
226
|
-
], NLDDToolbarTitle.prototype, "href", void 0);
|
|
227
|
-
__decorate([
|
|
228
|
-
property({ type: String, reflect: true })
|
|
229
|
-
], NLDDToolbarTitle.prototype, "target", void 0);
|
|
230
|
-
__decorate([
|
|
231
|
-
property({ type: Object })
|
|
232
|
-
], NLDDToolbarTitle.prototype, "translations", void 0);
|
|
233
|
-
__decorate([
|
|
234
|
-
property({ reflect: true, converter: reflectNonDefault('md') })
|
|
235
|
-
], NLDDToolbarTitle.prototype, "size", void 0);
|
|
236
|
-
NLDDToolbarTitle = __decorate([
|
|
237
|
-
customElement('nldd-toolbar-title')
|
|
238
|
-
], NLDDToolbarTitle);
|
|
239
|
-
export { NLDDToolbarTitle };
|
|
43
|
+
import { ToolbarOverflowMenu } from './toolbar.overflow-menu.js';
|
|
44
|
+
import { areaWidth, fillsRowAlone, itemsOf, overflowOrder, spacerZeros, groupForOverflow, } from './toolbar.layout.js';
|
|
45
|
+
export { NLDDToolbarItem } from './toolbar-item.js';
|
|
46
|
+
export { NLDDToolbarTitle } from './toolbar-title.js';
|
|
47
|
+
export { groupForOverflow } from './toolbar.layout.js';
|
|
240
48
|
// # Component
|
|
241
49
|
let NLDDToolbar = class NLDDToolbar extends LitElement {
|
|
242
50
|
constructor() {
|
|
@@ -245,7 +53,8 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
|
|
|
245
53
|
this.showItemLabels = false;
|
|
246
54
|
this.accessibleLabel = '';
|
|
247
55
|
this.translations = {};
|
|
248
|
-
|
|
56
|
+
/** The menu for what does not fit. @internal */
|
|
57
|
+
this._overflowMenu = new ToolbarOverflowMenu(this);
|
|
249
58
|
this._startChildren = [];
|
|
250
59
|
this._centerChildren = [];
|
|
251
60
|
this._endChildren = [];
|
|
@@ -267,14 +76,9 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
|
|
|
267
76
|
this._pinnedOverflowItems = [];
|
|
268
77
|
this._childIds = new WeakMap();
|
|
269
78
|
this._idCounter = 0;
|
|
270
|
-
/** Maps the stamped `data-toolbar-oid` of an overflow item (and its
|
|
271
|
-
* descendants) back to the original element, so a clone's `select` can be
|
|
272
|
-
* forwarded to the original. Rebuilt on every _syncMenuItems. */
|
|
273
|
-
this._overflowOriginalById = new Map();
|
|
274
79
|
this._itemWidths = new Map();
|
|
275
80
|
this._observer = null;
|
|
276
81
|
this._resizeObserver = null;
|
|
277
|
-
this._menu = null;
|
|
278
82
|
this._isMeasuring = false;
|
|
279
83
|
this._childResizeObserver = null;
|
|
280
84
|
this._lastChildWidths = new WeakMap();
|
|
@@ -289,31 +93,6 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
|
|
|
289
93
|
if (this._hasMeasured)
|
|
290
94
|
this._measureAndUpdate();
|
|
291
95
|
};
|
|
292
|
-
/** The overflow menu holds CLONES of the slotted overflow items (see
|
|
293
|
-
* _syncMenuItems), so a clone's `select` never reaches the original element's
|
|
294
|
-
* listeners. Forward it: map the clicked clone back to its original via the
|
|
295
|
-
* `data-toolbar-oid` stamped at clone time, then re-dispatch `select` on the
|
|
296
|
-
* original so a consumer's `@select` handler (or a live-bound attribute) on
|
|
297
|
-
* the real overflow item fires. */
|
|
298
|
-
this._onOverflowMenuSelect = (event) => {
|
|
299
|
-
let oid = null;
|
|
300
|
-
for (const node of event.composedPath()) {
|
|
301
|
-
if (node instanceof Element && node.hasAttribute('data-toolbar-oid')) {
|
|
302
|
-
oid = node.getAttribute('data-toolbar-oid');
|
|
303
|
-
break;
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
if (!oid)
|
|
307
|
-
return;
|
|
308
|
-
const original = this._overflowOriginalById.get(oid);
|
|
309
|
-
if (!original)
|
|
310
|
-
return;
|
|
311
|
-
original.dispatchEvent(new CustomEvent('select', {
|
|
312
|
-
bubbles: true,
|
|
313
|
-
composed: true,
|
|
314
|
-
detail: event.detail,
|
|
315
|
-
}));
|
|
316
|
-
};
|
|
317
96
|
}
|
|
318
97
|
// — i18n —————————————————————————————————————————————————————————————————
|
|
319
98
|
_t(key) {
|
|
@@ -359,8 +138,17 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
|
|
|
359
138
|
else if (needsMenuResync)
|
|
360
139
|
this._syncMenuItems();
|
|
361
140
|
});
|
|
141
|
+
// Here and not in firstUpdated: disconnecting takes it down, and a toolbar
|
|
142
|
+
// moved in the DOM or kept by a framework connects again without a first
|
|
143
|
+
// update, so it would no longer follow its width.
|
|
144
|
+
this._resizeObserver = new ResizeObserver(() => {
|
|
145
|
+
if (this._isMeasuring)
|
|
146
|
+
return;
|
|
147
|
+
this._overflowMenu.hide();
|
|
148
|
+
this._measureAndUpdate();
|
|
149
|
+
});
|
|
150
|
+
this._resizeObserver.observe(this);
|
|
362
151
|
setTimeout(() => this._buildChildren(), 0);
|
|
363
|
-
this._createMenu();
|
|
364
152
|
document.fonts?.addEventListener('loadingdone', this._onFontsLoaded);
|
|
365
153
|
}
|
|
366
154
|
disconnectedCallback() {
|
|
@@ -372,19 +160,8 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
|
|
|
372
160
|
this._resizeObserver = null;
|
|
373
161
|
this._childResizeObserver?.disconnect();
|
|
374
162
|
this._childResizeObserver = null;
|
|
375
|
-
this._menu?.remove();
|
|
376
|
-
this._menu = null;
|
|
377
163
|
}
|
|
378
164
|
firstUpdated() {
|
|
379
|
-
this._resizeObserver = new ResizeObserver(() => {
|
|
380
|
-
if (this._isMeasuring)
|
|
381
|
-
return;
|
|
382
|
-
if (this._menuOpen) {
|
|
383
|
-
this._menu?.hidePopover();
|
|
384
|
-
}
|
|
385
|
-
this._measureAndUpdate();
|
|
386
|
-
});
|
|
387
|
-
this._resizeObserver.observe(this);
|
|
388
165
|
this._syncHosts();
|
|
389
166
|
}
|
|
390
167
|
updated(changedProperties) {
|
|
@@ -405,92 +182,18 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
|
|
|
405
182
|
}
|
|
406
183
|
}
|
|
407
184
|
}
|
|
408
|
-
_createMenu() {
|
|
409
|
-
if (this._menu)
|
|
410
|
-
return;
|
|
411
|
-
const menu = document.createElement('nldd-menu');
|
|
412
|
-
menu.setAttribute('placement', 'bottom-end');
|
|
413
|
-
menu.id = `nldd-toolbar-overflow-menu-${this._idCounter++}`;
|
|
414
|
-
menu.addEventListener('toggle', (event) => {
|
|
415
|
-
this._menuOpen = event.newState === 'open';
|
|
416
|
-
});
|
|
417
|
-
menu.addEventListener('select', this._onOverflowMenuSelect);
|
|
418
|
-
// In the shadow root, NOT document.body: the menu is a popover, so it
|
|
419
|
-
// escapes clipping via the top layer anyway, and a body-level menu goes
|
|
420
|
-
// inert (visible but untouchable) when the toolbar sits inside a modal
|
|
421
|
-
// dialog — everything outside the dialog's subtree is inert then.
|
|
422
|
-
this.renderRoot.appendChild(menu);
|
|
423
|
-
this._menu = menu;
|
|
424
|
-
}
|
|
425
185
|
_syncMenuAnchor() {
|
|
426
|
-
|
|
427
|
-
return;
|
|
428
|
-
const overflowButton = this.shadowRoot?.querySelector('.toolbar__overflow-button nldd-icon-button');
|
|
429
|
-
if (overflowButton) {
|
|
430
|
-
this._menu.anchorElement = overflowButton;
|
|
431
|
-
// Wire the button as the menu's invoker. The browser handles
|
|
432
|
-
// open/close natively via popovertarget — no `@click` handler
|
|
433
|
-
// needed. The menu syncs `popoverTargetAction` on every toggle
|
|
434
|
-
// (`'hide'` while open, `'show'` while closed), so the next
|
|
435
|
-
// click does the right thing without racing against light-
|
|
436
|
-
// dismiss. Seed `'show'` here for the very first click before
|
|
437
|
-
// the menu has ever toggled.
|
|
438
|
-
if ('popoverTargetElement' in overflowButton) {
|
|
439
|
-
overflowButton.popoverTargetElement = this._menu;
|
|
440
|
-
}
|
|
441
|
-
// Default IDL value is 'toggle'; replace it with 'show' so the
|
|
442
|
-
// very first click opens via the explicit-show path. Once the
|
|
443
|
-
// menu has opened, `_syncAnchorPopupState` keeps the action in
|
|
444
|
-
// sync with state ('hide' while open, 'show' while closed) and
|
|
445
|
-
// this seed never overrides it.
|
|
446
|
-
if ('popoverTargetAction' in overflowButton && overflowButton.popoverTargetAction === 'toggle') {
|
|
447
|
-
overflowButton.popoverTargetAction = 'show';
|
|
448
|
-
}
|
|
449
|
-
}
|
|
186
|
+
this._overflowMenu.anchorTo(this.shadowRoot?.querySelector('.toolbar__overflow-button nldd-icon-button') ?? null);
|
|
450
187
|
}
|
|
451
|
-
/**
|
|
452
|
-
*
|
|
453
|
-
*
|
|
454
|
-
*
|
|
455
|
-
* Consumers should avoid adding extra listeners directly on overflow `nldd-menu-item` elements.
|
|
456
|
-
*/
|
|
188
|
+
/** Fills the overflow menu: the alternatives of the items that did not fit,
|
|
189
|
+
* the last to go first, then the toolbar's own overflow items. A clone does
|
|
190
|
+
* not carry listeners added with addEventListener; its `select` is sent on
|
|
191
|
+
* to the original (see toolbar.overflow-menu.ts). */
|
|
457
192
|
_syncMenuItems() {
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
this.
|
|
462
|
-
// Stamp the original (and every descendant) with a stable id — copied into
|
|
463
|
-
// the clone by cloneNode — so _onOverflowMenuSelect can map a clone's
|
|
464
|
-
// `select` back to the original. `data-toolbar-oid` is outside the
|
|
465
|
-
// observer's attributeFilter, so stamping never retriggers a re-sync.
|
|
466
|
-
const cloneWithForwarding = (el) => {
|
|
467
|
-
for (const node of [el, ...el.querySelectorAll('*')]) {
|
|
468
|
-
let oid = node.getAttribute('data-toolbar-oid');
|
|
469
|
-
if (!oid) {
|
|
470
|
-
oid = `oid-${this._idCounter++}`;
|
|
471
|
-
node.setAttribute('data-toolbar-oid', oid);
|
|
472
|
-
}
|
|
473
|
-
this._overflowOriginalById.set(oid, node);
|
|
474
|
-
}
|
|
475
|
-
const clone = el.cloneNode(true);
|
|
476
|
-
clone.removeAttribute('slot');
|
|
477
|
-
return clone;
|
|
478
|
-
};
|
|
479
|
-
const prioritized = [...this._getPrioritizedItems()].reverse();
|
|
480
|
-
prioritized.forEach(child => {
|
|
481
|
-
if (!this._overflowIds.has(child.id))
|
|
482
|
-
return;
|
|
483
|
-
if (child.overflowItems.length === 0)
|
|
484
|
-
return;
|
|
485
|
-
child.overflowItems.forEach(el => {
|
|
486
|
-
this._menu.appendChild(cloneWithForwarding(el));
|
|
487
|
-
});
|
|
488
|
-
});
|
|
489
|
-
if (this._pinnedOverflowItems.length > 0) {
|
|
490
|
-
this._pinnedOverflowItems.forEach(el => {
|
|
491
|
-
this._menu.appendChild(cloneWithForwarding(el));
|
|
492
|
-
});
|
|
493
|
-
}
|
|
193
|
+
const overflowed = [...this._getPrioritizedItems()].reverse()
|
|
194
|
+
.filter(child => this._overflowIds.has(child.id))
|
|
195
|
+
.flatMap(child => child.overflowItems);
|
|
196
|
+
this._overflowMenu.fill([...overflowed, ...this._pinnedOverflowItems]);
|
|
494
197
|
}
|
|
495
198
|
/**
|
|
496
199
|
* Syncs declarative state onto the slotted item and title hosts: size,
|
|
@@ -538,29 +241,8 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
|
|
|
538
241
|
});
|
|
539
242
|
}
|
|
540
243
|
_getPrioritizedItems() {
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
const endItems = this._endChildren
|
|
544
|
-
.filter((c) => c.type === 'item');
|
|
545
|
-
const startItems = this._startChildren
|
|
546
|
-
.filter((c) => c.type === 'item');
|
|
547
|
-
const centerItems = this._centerChildren
|
|
548
|
-
.filter((c) => c.type === 'item');
|
|
549
|
-
const result = [
|
|
550
|
-
...endItems.map((item, index) => ({ item, areaOrder: 0, index })),
|
|
551
|
-
...centerItems.map((item, index) => ({ item, areaOrder: 1, index })),
|
|
552
|
-
...startItems.map((item, index) => ({ item, areaOrder: 2, index })),
|
|
553
|
-
]
|
|
554
|
-
.sort((a, b) => {
|
|
555
|
-
if (a.item.priority !== b.item.priority)
|
|
556
|
-
return a.item.priority - b.item.priority;
|
|
557
|
-
if (a.areaOrder !== b.areaOrder)
|
|
558
|
-
return a.areaOrder - b.areaOrder;
|
|
559
|
-
return b.index - a.index;
|
|
560
|
-
})
|
|
561
|
-
.map(({ item }) => item);
|
|
562
|
-
this._prioritizedItemsCache = result;
|
|
563
|
-
return result;
|
|
244
|
+
this._prioritizedItemsCache ?? (this._prioritizedItemsCache = overflowOrder(this._startChildren, this._centerChildren, this._endChildren));
|
|
245
|
+
return this._prioritizedItemsCache;
|
|
564
246
|
}
|
|
565
247
|
_allHostChildren() {
|
|
566
248
|
return [...this._startChildren, ...this._centerChildren, ...this._endChildren];
|
|
@@ -579,28 +261,6 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
|
|
|
579
261
|
}
|
|
580
262
|
});
|
|
581
263
|
}
|
|
582
|
-
_computeAreaWidth(children, itemGap) {
|
|
583
|
-
const visible = children.filter(c => !this._overflowIds.has(c.id));
|
|
584
|
-
const gaps = Math.max(0, visible.length - 1) * itemGap;
|
|
585
|
-
const itemsWidth = visible.reduce((sum, child) => {
|
|
586
|
-
if (child.type === 'item' || child.type === 'title') {
|
|
587
|
-
return sum + (this._itemWidths.get(child.id) ?? 0);
|
|
588
|
-
}
|
|
589
|
-
return sum;
|
|
590
|
-
}, 0);
|
|
591
|
-
return gaps + itemsWidth;
|
|
592
|
-
}
|
|
593
|
-
_computeSpacerZeros(hostWidth, itemGap, overflowButtonWidth, startWidth, centerWidth, endWidth) {
|
|
594
|
-
if (startWidth === 0 && endWidth === 0) {
|
|
595
|
-
return { leftZero: true, rightZero: true };
|
|
596
|
-
}
|
|
597
|
-
const leftSpacer = hostWidth / 2 - startWidth - centerWidth / 2 - itemGap;
|
|
598
|
-
const rightSpacer = hostWidth / 2 - endWidth - centerWidth / 2 - itemGap - overflowButtonWidth;
|
|
599
|
-
return {
|
|
600
|
-
leftZero: leftSpacer <= 0,
|
|
601
|
-
rightZero: rightSpacer <= 0,
|
|
602
|
-
};
|
|
603
|
-
}
|
|
604
264
|
_updateAreaVars() {
|
|
605
265
|
const itemsEl = this.shadowRoot?.querySelector('.toolbar__items');
|
|
606
266
|
if (!itemsEl)
|
|
@@ -614,9 +274,9 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
|
|
|
614
274
|
? overflowButtonEl.getBoundingClientRect().width + hostGap
|
|
615
275
|
: 0;
|
|
616
276
|
this.style.setProperty('--_toolbar-overflow-button-width', `${overflowButtonWidth}px`);
|
|
617
|
-
const startWidth =
|
|
618
|
-
const centerWidth =
|
|
619
|
-
const endWidth =
|
|
277
|
+
const startWidth = areaWidth(this._startChildren, this._overflowIds, this._itemWidths, itemGap);
|
|
278
|
+
const centerWidth = areaWidth(this._centerChildren, this._overflowIds, this._itemWidths, itemGap);
|
|
279
|
+
const endWidth = areaWidth(this._endChildren, this._overflowIds, this._itemWidths, itemGap);
|
|
620
280
|
this.style.setProperty('--_toolbar-start-width', `${startWidth}px`);
|
|
621
281
|
this.style.setProperty('--_toolbar-center-width', `${centerWidth}px`);
|
|
622
282
|
this.style.setProperty('--_toolbar-end-width', `${endWidth}px`);
|
|
@@ -628,7 +288,7 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
|
|
|
628
288
|
// side gains items.
|
|
629
289
|
this.style.setProperty('--_toolbar-left-spacer-gap', startWidth > 0 ? `${itemGap}px` : '0px');
|
|
630
290
|
this.style.setProperty('--_toolbar-right-spacer-gap', endWidth > 0 ? `${itemGap}px` : '0px');
|
|
631
|
-
const { leftZero, rightZero } =
|
|
291
|
+
const { leftZero, rightZero } = spacerZeros(hostWidth, itemGap, overflowButtonWidth, startWidth, centerWidth, endWidth);
|
|
632
292
|
if (leftZero !== this._leftSpacerZero)
|
|
633
293
|
this._leftSpacerZero = leftZero;
|
|
634
294
|
if (rightZero !== this._rightSpacerZero)
|
|
@@ -641,16 +301,22 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
|
|
|
641
301
|
// balancing spacers). An item the toolbar moved into the overflow menu
|
|
642
302
|
// still counts: switching layout then changes what fits, so the next
|
|
643
303
|
// measurement brings it back, and the two layouts take turns forever.
|
|
644
|
-
const centerOnly =
|
|
645
|
-
&& !this._hasPresentChild(this._endChildren)
|
|
646
|
-
&& this._centerChildren.length > 0;
|
|
304
|
+
const centerOnly = this._isCenterOnly();
|
|
647
305
|
if (centerOnly !== this._centerOnly)
|
|
648
306
|
this._centerOnly = centerOnly;
|
|
649
307
|
const rendered = this._allHostChildren().filter(c => !this._overflowIds.has(c.id) && c.element.getClientRects().length > 0);
|
|
650
|
-
const soloFluid =
|
|
308
|
+
const soloFluid = fillsRowAlone(rendered);
|
|
651
309
|
if (soloFluid !== this._soloFluid)
|
|
652
310
|
this._soloFluid = soloFluid;
|
|
653
311
|
}
|
|
312
|
+
/** Whether only the center has anything in it: nothing rendered at the
|
|
313
|
+
* start or end, and nothing moved from there into the overflow menu. One
|
|
314
|
+
* definition for measuring and for the layout it picks. */
|
|
315
|
+
_isCenterOnly() {
|
|
316
|
+
return !this._hasPresentChild(this._startChildren)
|
|
317
|
+
&& !this._hasPresentChild(this._endChildren)
|
|
318
|
+
&& this._centerChildren.length > 0;
|
|
319
|
+
}
|
|
654
320
|
/** Whether any child in the list is actually rendered. getClientRects() is
|
|
655
321
|
* empty for a `display:none` element (consumer-hidden or toolbar-hidden via
|
|
656
322
|
* `[hidden]`), so this counts real on-screen presence, not mere DOM presence. */
|
|
@@ -677,7 +343,7 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
|
|
|
677
343
|
_measureOverflow(itemsEl) {
|
|
678
344
|
const overflowButtonEl = this.shadowRoot?.querySelector('.toolbar__overflow-button');
|
|
679
345
|
const allChildren = this._allHostChildren();
|
|
680
|
-
const itemChildren = allChildren
|
|
346
|
+
const itemChildren = itemsOf(allChildren);
|
|
681
347
|
const titleChildren = allChildren.filter((c) => c.type === 'title');
|
|
682
348
|
// Show all items, reset solo-fluid to fluid with min-width restored.
|
|
683
349
|
itemChildren.forEach(child => {
|
|
@@ -704,9 +370,7 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
|
|
|
704
370
|
overflowButtonEl?.classList.add('is-hidden');
|
|
705
371
|
}
|
|
706
372
|
void itemsEl.offsetWidth;
|
|
707
|
-
const centerOnly = this.
|
|
708
|
-
&& this._endChildren.length === 0
|
|
709
|
-
&& this._centerChildren.length > 0;
|
|
373
|
+
const centerOnly = this._isCenterOnly();
|
|
710
374
|
const isOverflowing = () => itemsEl.scrollWidth > itemsEl.clientWidth + 1;
|
|
711
375
|
if (!isOverflowing()) {
|
|
712
376
|
if (this._overflowIds.size > 0) {
|
|
@@ -827,13 +491,7 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
|
|
|
827
491
|
.map(el => {
|
|
828
492
|
const tag = el.tagName.toLowerCase();
|
|
829
493
|
if (tag === 'nldd-toolbar-title') {
|
|
830
|
-
|
|
831
|
-
return {
|
|
832
|
-
type: 'title',
|
|
833
|
-
element: el,
|
|
834
|
-
minWidth: el.minWidth || '200px',
|
|
835
|
-
id,
|
|
836
|
-
};
|
|
494
|
+
return { type: 'title', element: el, id: this._getId(el) };
|
|
837
495
|
}
|
|
838
496
|
if (tag === 'nldd-toolbar-item') {
|
|
839
497
|
const id = this._getId(el);
|
|
@@ -940,13 +598,12 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
|
|
|
940
598
|
});
|
|
941
599
|
}
|
|
942
600
|
render() {
|
|
943
|
-
const visibleNonDivider = this._allHostChildren().filter(c => !this._overflowIds.has(c.id));
|
|
944
601
|
// Pre-measurement fallback: before the first _updateAreaVars there is no
|
|
945
602
|
// rendering to read, so fall back to mere DOM presence. _soloFluid takes
|
|
946
603
|
// over from the first measurement on.
|
|
947
|
-
const isSoloFluid = this._soloFluid
|
|
948
|
-
(
|
|
949
|
-
return template(this, this._centerChildren.length > 0, this._leftSpacerZero, this._rightSpacerZero, isSoloFluid, this._pinnedOverflowItems.length > 0 || this._overflowIds.size > 0, this.
|
|
604
|
+
const isSoloFluid = this._soloFluid
|
|
605
|
+
|| fillsRowAlone(this._allHostChildren().filter(c => !this._overflowIds.has(c.id)));
|
|
606
|
+
return template(this, this._centerChildren.length > 0, this._leftSpacerZero, this._rightSpacerZero, isSoloFluid, this._pinnedOverflowItems.length > 0 || this._overflowIds.size > 0, this._overflowMenu.open, this.accessibleLabel, this._centerOnly, (key) => this._t(key));
|
|
950
607
|
}
|
|
951
608
|
};
|
|
952
609
|
NLDDToolbar.styles = toolbarStyles;
|
|
@@ -962,9 +619,6 @@ __decorate([
|
|
|
962
619
|
__decorate([
|
|
963
620
|
property({ type: Object })
|
|
964
621
|
], NLDDToolbar.prototype, "translations", void 0);
|
|
965
|
-
__decorate([
|
|
966
|
-
state()
|
|
967
|
-
], NLDDToolbar.prototype, "_menuOpen", void 0);
|
|
968
622
|
__decorate([
|
|
969
623
|
state()
|
|
970
624
|
], NLDDToolbar.prototype, "_startChildren", void 0);
|
|
@@ -996,31 +650,4 @@ NLDDToolbar = __decorate([
|
|
|
996
650
|
customElement('nldd-toolbar')
|
|
997
651
|
], NLDDToolbar);
|
|
998
652
|
export { NLDDToolbar };
|
|
999
|
-
/**
|
|
1000
|
-
* Groups prioritized items for overflow. Items with an explicit priority that
|
|
1001
|
-
* share a value form one group and overflow together regardless of their
|
|
1002
|
-
* position; items without a priority attribute each form their own group
|
|
1003
|
-
* (they overflow individually).
|
|
1004
|
-
*
|
|
1005
|
-
* @internal Exported for unit tests only; not part of the public API.
|
|
1006
|
-
*/
|
|
1007
|
-
export function groupForOverflow(items) {
|
|
1008
|
-
const groups = [];
|
|
1009
|
-
const byPriority = new Map();
|
|
1010
|
-
for (const child of items) {
|
|
1011
|
-
if (!child.hasPriority) {
|
|
1012
|
-
groups.push([child]);
|
|
1013
|
-
continue;
|
|
1014
|
-
}
|
|
1015
|
-
const existing = byPriority.get(child.priority);
|
|
1016
|
-
if (existing) {
|
|
1017
|
-
existing.push(child);
|
|
1018
|
-
continue;
|
|
1019
|
-
}
|
|
1020
|
-
const group = [child];
|
|
1021
|
-
byPriority.set(child.priority, group);
|
|
1022
|
-
groups.push(group);
|
|
1023
|
-
}
|
|
1024
|
-
return groups;
|
|
1025
|
-
}
|
|
1026
653
|
//# sourceMappingURL=toolbar.js.map
|