@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
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { type MenuVariant } from './menu.template.js';
|
|
3
|
+
/**
|
|
4
|
+
* A labeled group of menu items inside an nldd-menu. Wraps its slotted
|
|
5
|
+
* items in `role="group"` with `aria-labelledby` pointing to the group's
|
|
6
|
+
* `text`, providing native ARIA group semantics that a flat title element
|
|
7
|
+
* can't deliver.
|
|
8
|
+
*
|
|
9
|
+
* The group renders an automatic divider above itself, except when it's
|
|
10
|
+
* the first child of the menu — so consumers don't need to manage
|
|
11
|
+
* separator placement around groups themselves. Spacing above the title
|
|
12
|
+
* is intentionally larger than below, to bind the title visually to the
|
|
13
|
+
* items it labels.
|
|
14
|
+
*
|
|
15
|
+
* Use the wrapper for grouping with a title; for ungrouped flat menus or
|
|
16
|
+
* a divider without a title, the existing `nldd-menu-item` +
|
|
17
|
+
* `nldd-menu-divider` flat structure keeps working unchanged.
|
|
18
|
+
*
|
|
19
|
+
* @element nldd-menu-group
|
|
20
|
+
*
|
|
21
|
+
* @attr {string} text - Group title text shown above the items.
|
|
22
|
+
*
|
|
23
|
+
* @slot - nldd-menu-item children (the items belonging to this group).
|
|
24
|
+
*/
|
|
25
|
+
export declare class NLDDMenuGroup extends LitElement {
|
|
26
|
+
static styles: import("lit").CSSResult;
|
|
27
|
+
text: string;
|
|
28
|
+
private static _idCounter;
|
|
29
|
+
readonly _titleId: string;
|
|
30
|
+
/** @internal The variant of the menu around it, set by that nldd-menu. */
|
|
31
|
+
menuVariant: MenuVariant | null;
|
|
32
|
+
updated(changed: Map<string, unknown>): void;
|
|
33
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=menu-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-group.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/menu/menu-group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAIjC,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGzE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,aAAc,SAAQ,UAAU;IAC5C,OAAgB,MAAM,0BAAmB;IAGzC,IAAI,SAAM;IAOV,OAAO,CAAC,MAAM,CAAC,UAAU,CAAK;IAC9B,QAAQ,CAAC,QAAQ,SAAyD;IAE1E,0EAA0E;IAE1E,WAAW,EAAE,WAAW,GAAG,IAAI,CAAQ;IAE9B,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAM5C,MAAM;CAGf"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { LitElement } from 'lit';
|
|
8
|
+
import { property, state } from 'lit/decorators.js';
|
|
9
|
+
import { reflectNonDefault } from '../../../utilities/reflect-non-default.js';
|
|
10
|
+
import { menuGroupStyles } from './menu.styles.js';
|
|
11
|
+
import { menuGroupTemplate } from './menu.template.js';
|
|
12
|
+
import { syncListItemRole } from './menu-item.js';
|
|
13
|
+
/**
|
|
14
|
+
* A labeled group of menu items inside an nldd-menu. Wraps its slotted
|
|
15
|
+
* items in `role="group"` with `aria-labelledby` pointing to the group's
|
|
16
|
+
* `text`, providing native ARIA group semantics that a flat title element
|
|
17
|
+
* can't deliver.
|
|
18
|
+
*
|
|
19
|
+
* The group renders an automatic divider above itself, except when it's
|
|
20
|
+
* the first child of the menu — so consumers don't need to manage
|
|
21
|
+
* separator placement around groups themselves. Spacing above the title
|
|
22
|
+
* is intentionally larger than below, to bind the title visually to the
|
|
23
|
+
* items it labels.
|
|
24
|
+
*
|
|
25
|
+
* Use the wrapper for grouping with a title; for ungrouped flat menus or
|
|
26
|
+
* a divider without a title, the existing `nldd-menu-item` +
|
|
27
|
+
* `nldd-menu-divider` flat structure keeps working unchanged.
|
|
28
|
+
*
|
|
29
|
+
* @element nldd-menu-group
|
|
30
|
+
*
|
|
31
|
+
* @attr {string} text - Group title text shown above the items.
|
|
32
|
+
*
|
|
33
|
+
* @slot - nldd-menu-item children (the items belonging to this group).
|
|
34
|
+
*/
|
|
35
|
+
export class NLDDMenuGroup extends LitElement {
|
|
36
|
+
constructor() {
|
|
37
|
+
super(...arguments);
|
|
38
|
+
this.text = '';
|
|
39
|
+
this._titleId = `nldd-menu-group-title-${NLDDMenuGroup._idCounter++}`;
|
|
40
|
+
/** @internal The variant of the menu around it, set by that nldd-menu. */
|
|
41
|
+
this.menuVariant = null;
|
|
42
|
+
}
|
|
43
|
+
updated(changed) {
|
|
44
|
+
// In a navigation menu the group is a list item that holds a list of
|
|
45
|
+
// its own, named by the title: a list may only own list items.
|
|
46
|
+
if (changed.has('menuVariant'))
|
|
47
|
+
syncListItemRole(this, this.menuVariant);
|
|
48
|
+
}
|
|
49
|
+
render() {
|
|
50
|
+
return menuGroupTemplate(this);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
NLDDMenuGroup.styles = menuGroupStyles;
|
|
54
|
+
// SSR caveat: this counter is per module instance, not per render. If
|
|
55
|
+
// the component ever runs in a context where modules reload between
|
|
56
|
+
// server and client (SSR hydration, Vite HMR with fresh module state),
|
|
57
|
+
// IDs will mismatch and aria-labelledby refs will break. Browser-only
|
|
58
|
+
// today; revisit if hydration is added.
|
|
59
|
+
NLDDMenuGroup._idCounter = 0;
|
|
60
|
+
__decorate([
|
|
61
|
+
property({ reflect: true, converter: reflectNonDefault('') })
|
|
62
|
+
], NLDDMenuGroup.prototype, "text", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
state()
|
|
65
|
+
], NLDDMenuGroup.prototype, "menuVariant", void 0);
|
|
66
|
+
if (!customElements.get('nldd-menu-group')) {
|
|
67
|
+
customElements.define('nldd-menu-group', NLDDMenuGroup);
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=menu-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"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iB,CAAC,EAAE,CAAC;IAC5C,cAAc,CAAC,MAAM,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC;AACzD,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { type MenuVariant } from './menu.template.js';
|
|
3
|
+
import type { QueryMarkMode } from '../../../utilities/render-marked.js';
|
|
4
|
+
import type { NLDDMenu } from './menu.js';
|
|
5
|
+
/** Makes `host` a list item while its menu is a navigation menu, and takes
|
|
6
|
+
* that back when it is not. A `listitem` the consumer set by hand on an item
|
|
7
|
+
* goes too when the variant changes back; nothing else uses that role here. */
|
|
8
|
+
export declare function syncListItemRole(host: HTMLElement, variant: MenuVariant | null): void;
|
|
9
|
+
/**
|
|
10
|
+
* A single item within an nldd-menu.
|
|
11
|
+
*
|
|
12
|
+
* @element nldd-menu-item
|
|
13
|
+
*
|
|
14
|
+
* @attr {boolean} destructive - Marks the item as destructive (red text; red highlight bg). Use for irreversible actions like "Delete". Color is the only built-in signal, so per WCAG 1.4.1 the item's own label must convey the destructive nature (e.g. "Verwijder") — don't rely on the red alone. Confirming the action (e.g. a follow-up dialog) is the consumer's responsibility.
|
|
15
|
+
* @attr {string} text - Display text. Supports **bold** markdown syntax.
|
|
16
|
+
* @attr {string} details - Secondary label shown on the right side.
|
|
17
|
+
* @attr {string} icon - Icon name rendered before the text.
|
|
18
|
+
* @attr {string} shortcut - Keyboard shortcut hint shown on the right, e.g. 'Cmd+E'. Display only (rendered via nldd-keyboard-shortcut) — it does not bind the key; wire up the handling in your app. Hidden on touch-only devices, where it isn't invokable.
|
|
19
|
+
* @attr {string} shortcut-mac / shortcut-windows / shortcut-linux - Per-OS overrides for `shortcut`, picked by detected OS (falls back to `shortcut`).
|
|
20
|
+
* @attr {string} href - Optional link target. A plain button item with an href renders as an `<a>` so it is a real link (middle-click, open in new tab, copy link). Ignored for submenu openers, checkbox/radio items, and while disabled.
|
|
21
|
+
* @attr {string} type - Item type: 'button' | 'checkbox' | 'radio'. Default: 'button'. One checkbox or radio item gives every item in its menu the check-mark column, so the text of the whole menu starts at one line, as in a native menu. Submenus decide for themselves.
|
|
22
|
+
* @attr {boolean} selected - Selected state for checkbox and radio types.
|
|
23
|
+
* @attr {boolean} disabled - Disabled state.
|
|
24
|
+
* @attr {string} value - A value of the item's own, read off the item in a `select` handler. The default filter matches on it as well as on `text` and `aliases`. Not a form value: this component is not form-associated.
|
|
25
|
+
* @attr {string} aliases - Space-separated alternative search terms.
|
|
26
|
+
* @attr {string} query - Query substring to bold-highlight in text. Set by menu's filter(); also settable by consumers.
|
|
27
|
+
* @attr {string} query-mark-mode - 'match' | 'predictive' (default: 'predictive'). See text-cell for details.
|
|
28
|
+
*
|
|
29
|
+
* @fires select - Fired when the item is clicked and not disabled.
|
|
30
|
+
*/
|
|
31
|
+
export declare class NLDDMenuItem extends LitElement {
|
|
32
|
+
static styles: import("lit").CSSResult;
|
|
33
|
+
destructive: boolean;
|
|
34
|
+
text: string;
|
|
35
|
+
details: string;
|
|
36
|
+
icon: string;
|
|
37
|
+
shortcut: string;
|
|
38
|
+
shortcutMac: string;
|
|
39
|
+
shortcutWindows: string;
|
|
40
|
+
shortcutLinux: string;
|
|
41
|
+
href: string;
|
|
42
|
+
type: 'button' | 'checkbox' | 'radio';
|
|
43
|
+
selected: boolean;
|
|
44
|
+
disabled: boolean;
|
|
45
|
+
value: string;
|
|
46
|
+
aliases: string;
|
|
47
|
+
query: string;
|
|
48
|
+
queryMarkMode: QueryMarkMode;
|
|
49
|
+
/**
|
|
50
|
+
* Which menu owns this item, set by that nldd-menu. Not part of the public API.
|
|
51
|
+
*
|
|
52
|
+
* `null` until one claims it, and an unclaimed item carries no menu role.
|
|
53
|
+
* A menu role is a promise about what is around you, so an item cannot make
|
|
54
|
+
* it on its own. `nldd-toolbar-item` holds exactly such an item: the
|
|
55
|
+
* declaration of what belongs in the overflow menu, which the toolbar clones
|
|
56
|
+
* into the real menu when it collapses. The clone is claimed there and the
|
|
57
|
+
* declaration stays what it is.
|
|
58
|
+
*/
|
|
59
|
+
menuVariant: MenuVariant | null;
|
|
60
|
+
/** Whether this item keeps the check-mark column free without being
|
|
61
|
+
* checkable, because another item in its menu is. Set by that nldd-menu.
|
|
62
|
+
* Not part of the public API. */
|
|
63
|
+
checkColumn: boolean;
|
|
64
|
+
/** Tracks whether this item's submenu (if any) is currently open. Set by
|
|
65
|
+
* the parent nldd-menu via the `submenu-open`/`submenu-close` lifecycle. */
|
|
66
|
+
_submenuOpen: boolean;
|
|
67
|
+
private static _idCounter;
|
|
68
|
+
connectedCallback(): void;
|
|
69
|
+
focus(options?: FocusOptions): void;
|
|
70
|
+
/** Cached reference to the direct child `<nldd-menu>` (this item's
|
|
71
|
+
* submenu). Resolved once at firstUpdated; mutating the children after
|
|
72
|
+
* mount is not supported in v1. */
|
|
73
|
+
private _cachedSubmenuEl;
|
|
74
|
+
private _submenuMutationObserver;
|
|
75
|
+
get _submenuEl(): NLDDMenu | null;
|
|
76
|
+
get _hasSubmenu(): boolean;
|
|
77
|
+
willUpdate(): void;
|
|
78
|
+
updated(changedProperties: Map<string, unknown>): void;
|
|
79
|
+
firstUpdated(): void;
|
|
80
|
+
disconnectedCallback(): void;
|
|
81
|
+
_handleClick(event?: Event): void;
|
|
82
|
+
/** Programmatically select this item. */
|
|
83
|
+
select(): void;
|
|
84
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=menu-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-item.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/menu/menu-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAIjC,OAAO,EAAoB,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,KAAK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AAE,KAAK,GAAG,IAAI;IAyCjC,yCAAyC;IACzC,MAAM,IAAI,IAAI;IAIL,MAAM;CAGf"}
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { LitElement } from 'lit';
|
|
8
|
+
import { property, state } from 'lit/decorators.js';
|
|
9
|
+
import { reflectNonDefault } from '../../../utilities/reflect-non-default.js';
|
|
10
|
+
import { menuItemStyles } from './menu.styles.js';
|
|
11
|
+
import { menuItemTemplate } from './menu.template.js';
|
|
12
|
+
/** Makes `host` a list item while its menu is a navigation menu, and takes
|
|
13
|
+
* that back when it is not. A `listitem` the consumer set by hand on an item
|
|
14
|
+
* goes too when the variant changes back; nothing else uses that role here. */
|
|
15
|
+
export function syncListItemRole(host, variant) {
|
|
16
|
+
if (variant === 'navigation')
|
|
17
|
+
host.setAttribute('role', 'listitem');
|
|
18
|
+
else if (host.getAttribute('role') === 'listitem')
|
|
19
|
+
host.removeAttribute('role');
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* A single item within an nldd-menu.
|
|
23
|
+
*
|
|
24
|
+
* @element nldd-menu-item
|
|
25
|
+
*
|
|
26
|
+
* @attr {boolean} destructive - Marks the item as destructive (red text; red highlight bg). Use for irreversible actions like "Delete". Color is the only built-in signal, so per WCAG 1.4.1 the item's own label must convey the destructive nature (e.g. "Verwijder") — don't rely on the red alone. Confirming the action (e.g. a follow-up dialog) is the consumer's responsibility.
|
|
27
|
+
* @attr {string} text - Display text. Supports **bold** markdown syntax.
|
|
28
|
+
* @attr {string} details - Secondary label shown on the right side.
|
|
29
|
+
* @attr {string} icon - Icon name rendered before the text.
|
|
30
|
+
* @attr {string} shortcut - Keyboard shortcut hint shown on the right, e.g. 'Cmd+E'. Display only (rendered via nldd-keyboard-shortcut) — it does not bind the key; wire up the handling in your app. Hidden on touch-only devices, where it isn't invokable.
|
|
31
|
+
* @attr {string} shortcut-mac / shortcut-windows / shortcut-linux - Per-OS overrides for `shortcut`, picked by detected OS (falls back to `shortcut`).
|
|
32
|
+
* @attr {string} href - Optional link target. A plain button item with an href renders as an `<a>` so it is a real link (middle-click, open in new tab, copy link). Ignored for submenu openers, checkbox/radio items, and while disabled.
|
|
33
|
+
* @attr {string} type - Item type: 'button' | 'checkbox' | 'radio'. Default: 'button'. One checkbox or radio item gives every item in its menu the check-mark column, so the text of the whole menu starts at one line, as in a native menu. Submenus decide for themselves.
|
|
34
|
+
* @attr {boolean} selected - Selected state for checkbox and radio types.
|
|
35
|
+
* @attr {boolean} disabled - Disabled state.
|
|
36
|
+
* @attr {string} value - A value of the item's own, read off the item in a `select` handler. The default filter matches on it as well as on `text` and `aliases`. Not a form value: this component is not form-associated.
|
|
37
|
+
* @attr {string} aliases - Space-separated alternative search terms.
|
|
38
|
+
* @attr {string} query - Query substring to bold-highlight in text. Set by menu's filter(); also settable by consumers.
|
|
39
|
+
* @attr {string} query-mark-mode - 'match' | 'predictive' (default: 'predictive'). See text-cell for details.
|
|
40
|
+
*
|
|
41
|
+
* @fires select - Fired when the item is clicked and not disabled.
|
|
42
|
+
*/
|
|
43
|
+
export class NLDDMenuItem extends LitElement {
|
|
44
|
+
constructor() {
|
|
45
|
+
super(...arguments);
|
|
46
|
+
this.destructive = false;
|
|
47
|
+
this.text = '';
|
|
48
|
+
this.details = '';
|
|
49
|
+
this.icon = '';
|
|
50
|
+
this.shortcut = '';
|
|
51
|
+
this.shortcutMac = '';
|
|
52
|
+
this.shortcutWindows = '';
|
|
53
|
+
this.shortcutLinux = '';
|
|
54
|
+
this.href = '';
|
|
55
|
+
this.type = 'button';
|
|
56
|
+
this.selected = false;
|
|
57
|
+
this.disabled = false;
|
|
58
|
+
this.value = '';
|
|
59
|
+
this.aliases = '';
|
|
60
|
+
this.query = '';
|
|
61
|
+
this.queryMarkMode = 'predictive';
|
|
62
|
+
/**
|
|
63
|
+
* Which menu owns this item, set by that nldd-menu. Not part of the public API.
|
|
64
|
+
*
|
|
65
|
+
* `null` until one claims it, and an unclaimed item carries no menu role.
|
|
66
|
+
* A menu role is a promise about what is around you, so an item cannot make
|
|
67
|
+
* it on its own. `nldd-toolbar-item` holds exactly such an item: the
|
|
68
|
+
* declaration of what belongs in the overflow menu, which the toolbar clones
|
|
69
|
+
* into the real menu when it collapses. The clone is claimed there and the
|
|
70
|
+
* declaration stays what it is.
|
|
71
|
+
*/
|
|
72
|
+
this.menuVariant = null;
|
|
73
|
+
/** Whether this item keeps the check-mark column free without being
|
|
74
|
+
* checkable, because another item in its menu is. Set by that nldd-menu.
|
|
75
|
+
* Not part of the public API. */
|
|
76
|
+
this.checkColumn = false;
|
|
77
|
+
/** Tracks whether this item's submenu (if any) is currently open. Set by
|
|
78
|
+
* the parent nldd-menu via the `submenu-open`/`submenu-close` lifecycle. */
|
|
79
|
+
this._submenuOpen = false;
|
|
80
|
+
/** Cached reference to the direct child `<nldd-menu>` (this item's
|
|
81
|
+
* submenu). Resolved once at firstUpdated; mutating the children after
|
|
82
|
+
* mount is not supported in v1. */
|
|
83
|
+
this._cachedSubmenuEl = null;
|
|
84
|
+
this._submenuMutationObserver = null;
|
|
85
|
+
}
|
|
86
|
+
connectedCallback() {
|
|
87
|
+
super.connectedCallback();
|
|
88
|
+
if (!this.id) {
|
|
89
|
+
this.id = `nldd-menu-item-${NLDDMenuItem._idCounter++}`;
|
|
90
|
+
}
|
|
91
|
+
this.addEventListener('focusin', (e) => {
|
|
92
|
+
// Only react when focus actually lands on our own shadow content
|
|
93
|
+
// (the .menu__item button). focusin is composed and bubbles, so it
|
|
94
|
+
// also fires here when focus moves into a slotted descendant —
|
|
95
|
+
// notably when a child submenu's .menu element gets focused on
|
|
96
|
+
// open. Without this guard the parent's _handleMenuItemFocused
|
|
97
|
+
// re-highlights the opener after we just cleared it.
|
|
98
|
+
const realTarget = e.composedPath()[0];
|
|
99
|
+
if (!realTarget || !this.shadowRoot?.contains(realTarget))
|
|
100
|
+
return;
|
|
101
|
+
this.setAttribute('data-focused', '');
|
|
102
|
+
this.dispatchEvent(new CustomEvent('menu-item-focused', {
|
|
103
|
+
bubbles: true,
|
|
104
|
+
composed: true,
|
|
105
|
+
}));
|
|
106
|
+
});
|
|
107
|
+
this.addEventListener('focusout', (e) => {
|
|
108
|
+
// Mirror the focusin guard so a slotted descendant losing focus
|
|
109
|
+
// doesn't strip data-focused from the opener while it's still
|
|
110
|
+
// keyboard-focused itself.
|
|
111
|
+
const realTarget = e.composedPath()[0];
|
|
112
|
+
if (!realTarget || !this.shadowRoot?.contains(realTarget))
|
|
113
|
+
return;
|
|
114
|
+
this.removeAttribute('data-focused');
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
focus(options) {
|
|
118
|
+
const focusable = this.shadowRoot?.querySelector('button, a');
|
|
119
|
+
focusable?.focus(options);
|
|
120
|
+
}
|
|
121
|
+
get _submenuEl() {
|
|
122
|
+
return this._cachedSubmenuEl;
|
|
123
|
+
}
|
|
124
|
+
get _hasSubmenu() {
|
|
125
|
+
return this._cachedSubmenuEl !== null;
|
|
126
|
+
}
|
|
127
|
+
willUpdate() {
|
|
128
|
+
if (this.hasUpdated)
|
|
129
|
+
return;
|
|
130
|
+
// Before the first render, off the light DOM, so the chevron and the ARIA
|
|
131
|
+
// attributes are right the first time. Resolving it in `firstUpdated` asks
|
|
132
|
+
// for a second render from inside the first.
|
|
133
|
+
this._cachedSubmenuEl = this.querySelector(':scope > nldd-menu');
|
|
134
|
+
}
|
|
135
|
+
updated(changedProperties) {
|
|
136
|
+
// In a navigation menu the item is a list item, and the link inside it
|
|
137
|
+
// is just a link.
|
|
138
|
+
if (changedProperties.has('menuVariant'))
|
|
139
|
+
syncListItemRole(this, this.menuVariant);
|
|
140
|
+
// An item that becomes checkable, or stops being so, changes whether its
|
|
141
|
+
// menu reserves the check-mark column, also while the menu is open.
|
|
142
|
+
if (changedProperties.has('type') && changedProperties.get('type') !== undefined && this.menuVariant) {
|
|
143
|
+
this.closest('nldd-menu')?._claimItems();
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
firstUpdated() {
|
|
147
|
+
// Submenu attachment is one-shot in v1 — a nldd-menu added after this
|
|
148
|
+
// point would silently miss aria-controls, the chevron indicator, the
|
|
149
|
+
// hover-open lifecycle, and the close-state sync. Watch for late
|
|
150
|
+
// additions and warn so consumers don't chase the symptom.
|
|
151
|
+
this._submenuMutationObserver = new MutationObserver(() => {
|
|
152
|
+
const current = this.querySelector(':scope > nldd-menu');
|
|
153
|
+
if (current && current !== this._cachedSubmenuEl) {
|
|
154
|
+
console.warn('[nldd-menu-item] A nldd-menu child was added after mount. '
|
|
155
|
+
+ 'Submenu attachment is resolved once at firstUpdated in v1, '
|
|
156
|
+
+ 'so this menu will not be treated as a submenu. Define the '
|
|
157
|
+
+ 'nldd-menu child before the item is connected to the DOM.');
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
this._submenuMutationObserver.observe(this, { childList: true });
|
|
161
|
+
}
|
|
162
|
+
disconnectedCallback() {
|
|
163
|
+
super.disconnectedCallback();
|
|
164
|
+
this._submenuMutationObserver?.disconnect();
|
|
165
|
+
this._submenuMutationObserver = null;
|
|
166
|
+
}
|
|
167
|
+
_handleClick(event) {
|
|
168
|
+
if (this.disabled)
|
|
169
|
+
return;
|
|
170
|
+
// Submenu items don't fire `select` — they open their submenu instead.
|
|
171
|
+
// Item is either an action OR a submenu opener, not both.
|
|
172
|
+
if (this._hasSubmenu) {
|
|
173
|
+
// The button is wired to the submenu via the popoverTargetElement
|
|
174
|
+
// IDL property (set in the template). That marks it as the
|
|
175
|
+
// submenu's invoker so the browser excludes the opener from
|
|
176
|
+
// popover light-dismiss — clicking the opener no longer closes
|
|
177
|
+
// the submenu underneath it. The flip side: the browser would
|
|
178
|
+
// also auto-show the popover with its default positioning,
|
|
179
|
+
// which races our anchor + placement set in `_handleSubmenuOpen`.
|
|
180
|
+
// preventDefault stops the browser action and lets our flow
|
|
181
|
+
// own positioning.
|
|
182
|
+
//
|
|
183
|
+
// We use the IDL property rather than the `popovertarget`
|
|
184
|
+
// attribute because the button lives in this menu-item's shadow
|
|
185
|
+
// root while the submenu is a light-DOM child — attribute-based
|
|
186
|
+
// ID resolution is tree-scoped and would silently fail to find
|
|
187
|
+
// the cross-tree target. The IDL property takes a direct element
|
|
188
|
+
// reference and works across shadow boundaries.
|
|
189
|
+
event?.preventDefault();
|
|
190
|
+
// Click on an already-open opener: keep the submenu visible and
|
|
191
|
+
// the opener visually "active" (aria-expanded + :hover). A second
|
|
192
|
+
// click should not toggle it closed — that conflicts with the
|
|
193
|
+
// hover-open semantics of cascade mode.
|
|
194
|
+
if (this._submenuOpen)
|
|
195
|
+
return;
|
|
196
|
+
this.dispatchEvent(new CustomEvent('submenu-open', {
|
|
197
|
+
detail: { submenu: this._submenuEl, item: this },
|
|
198
|
+
bubbles: true,
|
|
199
|
+
composed: false,
|
|
200
|
+
}));
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
this.dispatchEvent(new CustomEvent('select', {
|
|
204
|
+
bubbles: true,
|
|
205
|
+
composed: true,
|
|
206
|
+
}));
|
|
207
|
+
this.closest('nldd-menu')?.hidePopover?.();
|
|
208
|
+
}
|
|
209
|
+
/** Programmatically select this item. */
|
|
210
|
+
select() {
|
|
211
|
+
this._handleClick();
|
|
212
|
+
}
|
|
213
|
+
render() {
|
|
214
|
+
return menuItemTemplate.call(this, this.menuVariant);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
NLDDMenuItem.styles = menuItemStyles;
|
|
218
|
+
NLDDMenuItem._idCounter = 0;
|
|
219
|
+
__decorate([
|
|
220
|
+
property({ type: Boolean, reflect: true })
|
|
221
|
+
], NLDDMenuItem.prototype, "destructive", void 0);
|
|
222
|
+
__decorate([
|
|
223
|
+
property({ reflect: true, converter: reflectNonDefault('') })
|
|
224
|
+
], NLDDMenuItem.prototype, "text", void 0);
|
|
225
|
+
__decorate([
|
|
226
|
+
property({ reflect: true, converter: reflectNonDefault('') })
|
|
227
|
+
], NLDDMenuItem.prototype, "details", void 0);
|
|
228
|
+
__decorate([
|
|
229
|
+
property({ type: String, reflect: true })
|
|
230
|
+
], NLDDMenuItem.prototype, "icon", void 0);
|
|
231
|
+
__decorate([
|
|
232
|
+
property({ reflect: true, converter: reflectNonDefault('') })
|
|
233
|
+
], NLDDMenuItem.prototype, "shortcut", void 0);
|
|
234
|
+
__decorate([
|
|
235
|
+
property({ reflect: true, attribute: 'shortcut-mac', converter: reflectNonDefault('') })
|
|
236
|
+
], NLDDMenuItem.prototype, "shortcutMac", void 0);
|
|
237
|
+
__decorate([
|
|
238
|
+
property({ reflect: true, attribute: 'shortcut-windows', converter: reflectNonDefault('') })
|
|
239
|
+
], NLDDMenuItem.prototype, "shortcutWindows", void 0);
|
|
240
|
+
__decorate([
|
|
241
|
+
property({ reflect: true, attribute: 'shortcut-linux', converter: reflectNonDefault('') })
|
|
242
|
+
], NLDDMenuItem.prototype, "shortcutLinux", void 0);
|
|
243
|
+
__decorate([
|
|
244
|
+
property({ type: String, reflect: true })
|
|
245
|
+
], NLDDMenuItem.prototype, "href", void 0);
|
|
246
|
+
__decorate([
|
|
247
|
+
property({ type: String, reflect: true })
|
|
248
|
+
], NLDDMenuItem.prototype, "type", void 0);
|
|
249
|
+
__decorate([
|
|
250
|
+
property({ type: Boolean, reflect: true })
|
|
251
|
+
], NLDDMenuItem.prototype, "selected", void 0);
|
|
252
|
+
__decorate([
|
|
253
|
+
property({ type: Boolean, reflect: true })
|
|
254
|
+
], NLDDMenuItem.prototype, "disabled", void 0);
|
|
255
|
+
__decorate([
|
|
256
|
+
property({ type: String, reflect: true })
|
|
257
|
+
], NLDDMenuItem.prototype, "value", void 0);
|
|
258
|
+
__decorate([
|
|
259
|
+
property({ reflect: true, converter: reflectNonDefault('') })
|
|
260
|
+
], NLDDMenuItem.prototype, "aliases", void 0);
|
|
261
|
+
__decorate([
|
|
262
|
+
property({ reflect: true, converter: reflectNonDefault('') })
|
|
263
|
+
], NLDDMenuItem.prototype, "query", void 0);
|
|
264
|
+
__decorate([
|
|
265
|
+
property({ reflect: true, attribute: 'query-mark-mode', converter: reflectNonDefault('predictive') })
|
|
266
|
+
], NLDDMenuItem.prototype, "queryMarkMode", void 0);
|
|
267
|
+
__decorate([
|
|
268
|
+
state()
|
|
269
|
+
], NLDDMenuItem.prototype, "menuVariant", void 0);
|
|
270
|
+
__decorate([
|
|
271
|
+
state()
|
|
272
|
+
], NLDDMenuItem.prototype, "checkColumn", void 0);
|
|
273
|
+
__decorate([
|
|
274
|
+
state()
|
|
275
|
+
], NLDDMenuItem.prototype, "_submenuOpen", void 0);
|
|
276
|
+
if (!customElements.get('nldd-menu-item')) {
|
|
277
|
+
customElements.define('nldd-menu-item', NLDDMenuItem);
|
|
278
|
+
}
|
|
279
|
+
//# sourceMappingURL=menu-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-item.js","sourceRoot":"","sources":["../../../../src/components/actions/menu/menu-item.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAoB,MAAM,oBAAoB,CAAC;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MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CACO;AAGjD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAC1B;AAGjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAC1B;AAGjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CAC/B;AAGX;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,CAAS,EAAE,CAAC,EAAE,CAAC;6CACzD;AAGb;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,CAAS,EAAE,CAAC,EAAE,CAAC;2CAC3D;AAGX;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,EAAE,SAAS,EAAE,iBAAiB,CAAgB,YAAY,CAAC,EAAE,CAAC;mDACzE;AAa5C;IADC,KAAK,EAAE;iDAC+B;AAMvC;IADC,KAAK,EAAE;iDACY;AAKpB;IADC,KAAK,EAAE;kDACa;AAoJtB,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE,CAAC;IAC3C,cAAc,CAAC,MAAM,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { NLDDMenu } from './menu.js';
|
|
2
|
+
import type { NLDDMenuItem } from './menu-item.js';
|
|
3
|
+
/**
|
|
4
|
+
* One open submenu in a chain: which menu opened it, from which item, and how
|
|
5
|
+
* it closes. A level has three paths:
|
|
6
|
+
*
|
|
7
|
+
* 1. **Open.** Wire the submenu to its parent, register it with the root, and
|
|
8
|
+
* show it: beside its item in cascade mode, in place of its parent in
|
|
9
|
+
* drill-in mode.
|
|
10
|
+
* 2. **One level back.** The submenu closed on its own (the back button,
|
|
11
|
+
* ArrowLeft, Escape, light-dismiss in cascade mode). Tear down, and in
|
|
12
|
+
* drill-in mode show the parent again and say where you are.
|
|
13
|
+
* 3. **Collapse.** The whole chain goes (a select, the anchor, a tap outside,
|
|
14
|
+
* a resize). Tear down without showing the parent, driven from the root's
|
|
15
|
+
* registry, so it never depends on parent links that real interaction can
|
|
16
|
+
* leave stale.
|
|
17
|
+
*
|
|
18
|
+
* Everything a level needs is captured here when it opens, so a viewport flip
|
|
19
|
+
* between cascade and drill-in mid-navigation cannot leave it half undone.
|
|
20
|
+
*/
|
|
21
|
+
export declare class SubmenuLevel {
|
|
22
|
+
readonly parent: NLDDMenu;
|
|
23
|
+
readonly opener: NLDDMenuItem;
|
|
24
|
+
readonly submenu: NLDDMenu;
|
|
25
|
+
readonly drillIn: boolean;
|
|
26
|
+
/** The root of the chain, whose registry holds this level. */
|
|
27
|
+
readonly root: NLDDMenu;
|
|
28
|
+
/** Where a drill-in submenu stood before it moved to <body>. */
|
|
29
|
+
private _homeParent;
|
|
30
|
+
private _homeNextSibling;
|
|
31
|
+
constructor(parent: NLDDMenu, opener: NLDDMenuItem, submenu: NLDDMenu, drillIn: boolean);
|
|
32
|
+
open(): void;
|
|
33
|
+
/** Close this level as part of collapsing the whole chain. */
|
|
34
|
+
collapse(): void;
|
|
35
|
+
private _handleToggle;
|
|
36
|
+
/** Undo what `open` did. With `stepBack`, a drill-in parent shows again and
|
|
37
|
+
* announces itself; a collapse leaves it closed and silent. */
|
|
38
|
+
private _teardown;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=menu.chain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu.chain.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/menu/menu.chain.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,YAAY;IASvB,QAAQ,CAAC,MAAM,EAAE,QAAQ;IACzB,QAAQ,CAAC,MAAM,EAAE,YAAY;IAC7B,QAAQ,CAAC,OAAO,EAAE,QAAQ;IAC1B,QAAQ,CAAC,OAAO,EAAE,OAAO;IAX1B,8DAA8D;IAC9D,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAExB,gEAAgE;IAChE,OAAO,CAAC,WAAW,CAA4B;IAC/C,OAAO,CAAC,gBAAgB,CAAqB;gBAGnC,MAAM,EAAE,QAAQ,EAChB,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,OAAO;IAK1B,IAAI,IAAI,IAAI;IAyDZ,8DAA8D;IAC9D,QAAQ,IAAI,IAAI;IAOhB,OAAO,CAAC,aAAa,CASnB;IAEF;oEACgE;IAChE,OAAO,CAAC,SAAS;CA2CjB"}
|