@nldd/design-system 0.14.0 → 0.16.0
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/NOTICES.md +1 -1
- package/custom-elements.json +1795 -138
- package/dist/components/actions/button/button.d.ts +2 -17
- package/dist/components/actions/button/button.d.ts.map +1 -1
- package/dist/components/actions/button/button.js +18 -34
- 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 +2 -2
- package/dist/components/actions/button/button.template.js.map +1 -1
- package/dist/components/actions/button-group/button-group.d.ts +8 -3
- package/dist/components/actions/button-group/button-group.d.ts.map +1 -1
- package/dist/components/actions/button-group/button-group.js +32 -13
- package/dist/components/actions/button-group/button-group.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.d.ts +2 -1
- package/dist/components/actions/icon-button/icon-button.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.js +16 -1
- 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 +2 -2
- package/dist/components/actions/icon-button/icon-button.template.js.map +1 -1
- package/dist/components/actions/menu/menu-item.d.ts.map +1 -1
- package/dist/components/actions/menu/menu-item.js +3 -0
- package/dist/components/actions/menu/menu-item.js.map +1 -1
- package/dist/components/actions/menu/menu.d.ts +34 -1
- package/dist/components/actions/menu/menu.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.i18n.d.ts +2 -0
- package/dist/components/actions/menu/menu.i18n.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.i18n.js +4 -0
- package/dist/components/actions/menu/menu.i18n.js.map +1 -1
- package/dist/components/actions/menu/menu.js +65 -3
- package/dist/components/actions/menu/menu.js.map +1 -1
- package/dist/components/actions/split-button/split-button.d.ts +63 -34
- package/dist/components/actions/split-button/split-button.d.ts.map +1 -1
- package/dist/components/actions/split-button/split-button.i18n.d.ts +1 -1
- package/dist/components/actions/split-button/split-button.i18n.js +1 -1
- package/dist/components/actions/split-button/split-button.i18n.js.map +1 -1
- package/dist/components/actions/split-button/split-button.js +116 -76
- package/dist/components/actions/split-button/split-button.js.map +1 -1
- package/dist/components/actions/split-button/split-button.styles.d.ts.map +1 -1
- package/dist/components/actions/split-button/split-button.styles.js +4 -0
- package/dist/components/actions/split-button/split-button.styles.js.map +1 -1
- package/dist/components/actions/split-button/split-button.template.d.ts +2 -1
- package/dist/components/actions/split-button/split-button.template.d.ts.map +1 -1
- package/dist/components/actions/split-button/split-button.template.js +25 -20
- package/dist/components/actions/split-button/split-button.template.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar.story-sync.d.ts +13 -0
- package/dist/components/actions/toolbar/toolbar.story-sync.d.ts.map +1 -0
- package/dist/components/actions/toolbar/toolbar.story-sync.js +89 -0
- package/dist/components/actions/toolbar/toolbar.story-sync.js.map +1 -0
- package/dist/components/components.js +3195 -810
- package/dist/components/content/code-viewer/code-viewer.d.ts.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.js +3 -0
- package/dist/components/content/code-viewer/code-viewer.js.map +1 -1
- package/dist/components/content/icon/icon-aliases.d.ts.map +1 -1
- package/dist/components/content/icon/icon-aliases.js +4 -0
- package/dist/components/content/icon/icon-aliases.js.map +1 -1
- package/dist/components/content/rich-text/rich-text.d.ts +4 -1
- package/dist/components/content/rich-text/rich-text.d.ts.map +1 -1
- package/dist/components/content/rich-text/rich-text.js +4 -1
- package/dist/components/content/rich-text/rich-text.js.map +1 -1
- package/dist/components/content/title/title.d.ts +8 -0
- package/dist/components/content/title/title.d.ts.map +1 -1
- package/dist/components/content/title/title.js +8 -0
- package/dist/components/content/title/title.js.map +1 -1
- package/dist/components/content/title/title.styles.d.ts.map +1 -1
- package/dist/components/content/title/title.styles.js +13 -0
- package/dist/components/content/title/title.styles.js.map +1 -1
- package/dist/components/content/tooltip/tooltip.d.ts +8 -1
- package/dist/components/content/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/content/tooltip/tooltip.js +48 -6
- package/dist/components/content/tooltip/tooltip.js.map +1 -1
- package/dist/components/content/tooltip/tooltip.styles.d.ts.map +1 -1
- package/dist/components/content/tooltip/tooltip.styles.js +5 -0
- package/dist/components/content/tooltip/tooltip.styles.js.map +1 -1
- package/dist/components/{decorate-x12uDAK4.js → decorate-pEFCObfp.js} +1 -1
- package/dist/components/{with-translations-DLzmBSkU.js → defer-focus-CkNrCf_g.js} +34 -3
- package/dist/components/{dev-checks-BgrW077W.js → dev-checks--aiYe9Pe.js} +100 -4
- package/dist/components/{dist-BaLc58I_.js → dist-245LaK9m.js} +1 -1
- package/dist/components/{dist-DgjvHvsN.js → dist-4g23YHP0.js} +1 -1
- package/dist/components/{dist-YYLChwRq.js → dist-Bf823YyL.js} +1 -1
- package/dist/components/{dist-Bm3708s5.js → dist-CeMOOqgP.js} +13 -1
- package/dist/components/{dist-CJ9uLG0u.js → dist-DFjwTlJV.js} +1 -1
- package/dist/components/forms/form-field/form-field.d.ts +2 -2
- package/dist/components/forms/form-field/form-field.d.ts.map +1 -1
- package/dist/components/forms/form-field/form-field.js +4 -3
- package/dist/components/forms/form-field/form-field.js.map +1 -1
- package/dist/components/forms/form-field/form-field.template.d.ts.map +1 -1
- package/dist/components/forms/form-field/form-field.template.js +3 -2
- package/dist/components/forms/form-field/form-field.template.js.map +1 -1
- package/dist/components/forms/validation-list/validation-list.d.ts +26 -0
- package/dist/components/forms/validation-list/validation-list.d.ts.map +1 -1
- package/dist/components/forms/validation-list/validation-list.i18n.d.ts +12 -0
- package/dist/components/forms/validation-list/validation-list.i18n.d.ts.map +1 -0
- package/dist/components/forms/validation-list/validation-list.i18n.js +11 -0
- package/dist/components/forms/validation-list/validation-list.i18n.js.map +1 -0
- package/dist/components/forms/validation-list/validation-list.js +74 -2
- package/dist/components/forms/validation-list/validation-list.js.map +1 -1
- package/dist/components/{icon-IgCyk9ui.js → icon-BQjRjtKH.js} +3 -1
- package/dist/components/{icon-button-B5tH4b3c.js → icon-button-BivCiIpt.js} +124 -21
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/inputs/checkbox/checkbox.d.ts +0 -5
- package/dist/components/inputs/checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/inputs/checkbox/checkbox.js +3 -5
- package/dist/components/inputs/checkbox/checkbox.js.map +1 -1
- package/dist/components/inputs/checkbox/checkbox.styles.js +9 -9
- package/dist/components/inputs/checkbox-field/checkbox-field.d.ts.map +1 -1
- package/dist/components/inputs/checkbox-field/checkbox-field.js +3 -0
- package/dist/components/inputs/checkbox-field/checkbox-field.js.map +1 -1
- package/dist/components/inputs/code-editor/code-editor.styles.d.ts.map +1 -1
- package/dist/components/inputs/code-editor/code-editor.styles.js +42 -13
- package/dist/components/inputs/code-editor/code-editor.styles.js.map +1 -1
- package/dist/components/inputs/combo-box/combo-box.d.ts +4 -0
- package/dist/components/inputs/combo-box/combo-box.d.ts.map +1 -1
- package/dist/components/inputs/combo-box/combo-box.js +12 -0
- package/dist/components/inputs/combo-box/combo-box.js.map +1 -1
- package/dist/components/inputs/date-field/date-field.i18n.js +4 -4
- package/dist/components/inputs/date-field/date-field.i18n.js.map +1 -1
- package/dist/components/inputs/date-picker/date-picker.d.ts +3 -3
- package/dist/components/inputs/date-picker/date-picker.d.ts.map +1 -1
- package/dist/components/inputs/date-picker/date-picker.i18n.d.ts +2 -2
- package/dist/components/inputs/date-picker/date-picker.i18n.js +2 -2
- package/dist/components/inputs/date-picker/date-picker.i18n.js.map +1 -1
- package/dist/components/inputs/date-picker/date-picker.js +3 -0
- package/dist/components/inputs/date-picker/date-picker.js.map +1 -1
- package/dist/components/inputs/date-picker/date-picker.template.js +2 -2
- package/dist/components/inputs/date-picker/date-picker.template.js.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.d.ts.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.js +5 -1
- package/dist/components/inputs/dropdown/dropdown.js.map +1 -1
- package/dist/components/inputs/file-field/file-field.d.ts +147 -17
- package/dist/components/inputs/file-field/file-field.d.ts.map +1 -1
- package/dist/components/inputs/file-field/file-field.drop.d.ts +16 -1
- package/dist/components/inputs/file-field/file-field.drop.d.ts.map +1 -1
- package/dist/components/inputs/file-field/file-field.drop.js +33 -0
- package/dist/components/inputs/file-field/file-field.drop.js.map +1 -1
- package/dist/components/inputs/file-field/file-field.i18n.d.ts +11 -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 +16 -6
- package/dist/components/inputs/file-field/file-field.i18n.js.map +1 -1
- package/dist/components/inputs/file-field/file-field.js +419 -74
- 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 +244 -100
- package/dist/components/inputs/file-field/file-field.styles.js.map +1 -1
- package/dist/components/inputs/file-field/file-field.template.d.ts +2 -1
- package/dist/components/inputs/file-field/file-field.template.d.ts.map +1 -1
- package/dist/components/inputs/file-field/file-field.template.js +284 -84
- package/dist/components/inputs/file-field/file-field.template.js.map +1 -1
- package/dist/components/inputs/file-field/file-field.truncate.d.ts +17 -0
- package/dist/components/inputs/file-field/file-field.truncate.d.ts.map +1 -1
- package/dist/components/inputs/file-field/file-field.truncate.js +26 -3
- package/dist/components/inputs/file-field/file-field.truncate.js.map +1 -1
- package/dist/components/inputs/number-field/number-field.d.ts.map +1 -1
- package/dist/components/inputs/number-field/number-field.js +3 -0
- package/dist/components/inputs/number-field/number-field.js.map +1 -1
- package/dist/components/inputs/password-field/password-field.d.ts +5 -12
- package/dist/components/inputs/password-field/password-field.d.ts.map +1 -1
- package/dist/components/inputs/password-field/password-field.i18n.d.ts +8 -0
- package/dist/components/inputs/password-field/password-field.i18n.d.ts.map +1 -0
- package/dist/components/inputs/password-field/password-field.i18n.js +7 -0
- package/dist/components/inputs/password-field/password-field.i18n.js.map +1 -0
- package/dist/components/inputs/password-field/password-field.js +10 -23
- package/dist/components/inputs/password-field/password-field.js.map +1 -1
- package/dist/components/inputs/password-field/password-field.template.js +2 -2
- package/dist/components/inputs/password-field/password-field.template.js.map +1 -1
- package/dist/components/inputs/radio-button/radio-button.d.ts +0 -5
- package/dist/components/inputs/radio-button/radio-button.d.ts.map +1 -1
- package/dist/components/inputs/radio-button/radio-button.js +0 -5
- package/dist/components/inputs/radio-button/radio-button.js.map +1 -1
- package/dist/components/inputs/radio-button/radio-button.styles.js +9 -9
- package/dist/components/inputs/radio-button-group/radio-button-group.d.ts.map +1 -1
- package/dist/components/inputs/radio-button-group/radio-button-group.js +3 -0
- package/dist/components/inputs/radio-button-group/radio-button-group.js.map +1 -1
- package/dist/components/inputs/search-field/search-field.d.ts.map +1 -1
- package/dist/components/inputs/search-field/search-field.js +3 -0
- package/dist/components/inputs/search-field/search-field.js.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.d.ts.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.js +5 -0
- package/dist/components/inputs/segmented-control/segmented-control.js.map +1 -1
- package/dist/components/inputs/slider/slider.d.ts +51 -14
- package/dist/components/inputs/slider/slider.d.ts.map +1 -1
- package/dist/components/inputs/slider/slider.js +197 -50
- package/dist/components/inputs/slider/slider.js.map +1 -1
- package/dist/components/inputs/slider/slider.styles.d.ts.map +1 -1
- package/dist/components/inputs/slider/slider.styles.js +42 -18
- package/dist/components/inputs/slider/slider.styles.js.map +1 -1
- package/dist/components/inputs/slider/slider.template.d.ts.map +1 -1
- package/dist/components/inputs/slider/slider.template.js +13 -5
- package/dist/components/inputs/slider/slider.template.js.map +1 -1
- package/dist/components/inputs/stepper/stepper.d.ts.map +1 -1
- package/dist/components/inputs/stepper/stepper.js +3 -0
- package/dist/components/inputs/stepper/stepper.js.map +1 -1
- package/dist/components/inputs/swatch-picker/swatch-picker.d.ts +185 -0
- package/dist/components/inputs/swatch-picker/swatch-picker.d.ts.map +1 -0
- package/dist/components/inputs/swatch-picker/swatch-picker.i18n.d.ts +22 -0
- package/dist/components/inputs/swatch-picker/swatch-picker.i18n.d.ts.map +1 -0
- package/dist/components/inputs/swatch-picker/swatch-picker.i18n.js +21 -0
- package/dist/components/inputs/swatch-picker/swatch-picker.i18n.js.map +1 -0
- package/dist/components/inputs/swatch-picker/swatch-picker.js +485 -0
- package/dist/components/inputs/swatch-picker/swatch-picker.js.map +1 -0
- package/dist/components/inputs/swatch-picker/swatch-picker.styles.d.ts +3 -0
- package/dist/components/inputs/swatch-picker/swatch-picker.styles.d.ts.map +1 -0
- package/dist/components/inputs/swatch-picker/swatch-picker.styles.js +177 -0
- package/dist/components/inputs/swatch-picker/swatch-picker.styles.js.map +1 -0
- package/dist/components/inputs/swatch-picker/swatch-picker.template.d.ts +6 -0
- package/dist/components/inputs/swatch-picker/swatch-picker.template.d.ts.map +1 -0
- package/dist/components/inputs/swatch-picker/swatch-picker.template.js +44 -0
- package/dist/components/inputs/swatch-picker/swatch-picker.template.js.map +1 -0
- package/dist/components/inputs/switch/switch.d.ts +0 -5
- package/dist/components/inputs/switch/switch.d.ts.map +1 -1
- package/dist/components/inputs/switch/switch.js +3 -5
- package/dist/components/inputs/switch/switch.js.map +1 -1
- package/dist/components/inputs/switch/switch.styles.js +2 -2
- package/dist/components/inputs/switch-field/switch-field.d.ts.map +1 -1
- package/dist/components/inputs/switch-field/switch-field.js +3 -0
- package/dist/components/inputs/switch-field/switch-field.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.code-copy.js +2 -2
- package/dist/components/inputs/text-editor/text-editor.code-copy.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.cursor.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.cursor.js +1 -11
- package/dist/components/inputs/text-editor/text-editor.cursor.js.map +1 -1
- 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 +127 -11
- 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 +3 -1
- package/dist/components/inputs/text-editor/text-editor.i18n.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.i18n.js +5 -1
- package/dist/components/inputs/text-editor/text-editor.i18n.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.js +7 -5
- package/dist/components/inputs/text-editor/text-editor.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.markdown.d.ts +3 -0
- package/dist/components/inputs/text-editor/text-editor.markdown.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.markdown.js +9 -1
- package/dist/components/inputs/text-editor/text-editor.markdown.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.mentions.d.ts +7 -2
- package/dist/components/inputs/text-editor/text-editor.mentions.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.mentions.js +47 -145
- package/dist/components/inputs/text-editor/text-editor.mentions.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 +187 -2
- package/dist/components/inputs/text-editor/text-editor.styles.js.map +1 -1
- package/dist/components/inputs/text-field/text-field.d.ts.map +1 -1
- package/dist/components/inputs/text-field/text-field.js +3 -0
- package/dist/components/inputs/text-field/text-field.js.map +1 -1
- package/dist/components/inputs/time-field/time-field.i18n.js +3 -3
- package/dist/components/inputs/time-field/time-field.i18n.js.map +1 -1
- package/dist/components/inputs/time-picker/time-picker.d.ts.map +1 -1
- package/dist/components/inputs/time-picker/time-picker.js +3 -0
- package/dist/components/inputs/time-picker/time-picker.js.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.d.ts.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.js +3 -0
- package/dist/components/inputs/toggle-button/toggle-button.js.map +1 -1
- package/dist/components/inputs/toggle-button-group/toggle-button-group.d.ts.map +1 -1
- package/dist/components/inputs/toggle-button-group/toggle-button-group.js +3 -0
- package/dist/components/inputs/toggle-button-group/toggle-button-group.js.map +1 -1
- package/dist/components/inputs/token-field/token-field.d.ts +4 -0
- package/dist/components/inputs/token-field/token-field.d.ts.map +1 -1
- package/dist/components/inputs/token-field/token-field.i18n.d.ts +1 -1
- package/dist/components/inputs/token-field/token-field.i18n.js +1 -1
- package/dist/components/inputs/token-field/token-field.i18n.js.map +1 -1
- package/dist/components/inputs/token-field/token-field.js +12 -0
- package/dist/components/inputs/token-field/token-field.js.map +1 -1
- package/dist/components/inputs/token-field/token-field.template.js +1 -1
- package/dist/components/inputs/token-field/token-field.template.js.map +1 -1
- package/dist/components/{just-in-time-education.i18n-BJ5ovWVB.js → just-in-time-education.i18n-S05IOgqk.js} +76 -23
- package/dist/components/layout/collection/collection.d.ts +4 -0
- package/dist/components/layout/collection/collection.d.ts.map +1 -1
- package/dist/components/layout/collection/collection.js +56 -8
- package/dist/components/layout/collection/collection.js.map +1 -1
- package/dist/components/layout/collection/collection.template.js +1 -1
- package/dist/components/layout/collection/collection.template.js.map +1 -1
- package/dist/components/layout/page-footer/page-footer.d.ts +2 -0
- package/dist/components/layout/page-footer/page-footer.d.ts.map +1 -1
- package/dist/components/layout/page-footer/page-footer.js +7 -0
- package/dist/components/layout/page-footer/page-footer.js.map +1 -1
- package/dist/components/layout/page-footer/page-footer.styles.d.ts.map +1 -1
- package/dist/components/layout/page-footer/page-footer.styles.js +33 -11
- package/dist/components/layout/page-footer/page-footer.styles.js.map +1 -1
- package/dist/components/layout/page-footer/page-footer.template.d.ts.map +1 -1
- package/dist/components/layout/page-footer/page-footer.template.js +2 -0
- package/dist/components/layout/page-footer/page-footer.template.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.styles.js +1 -1
- package/dist/components/layout/popover/popover.d.ts +19 -7
- package/dist/components/layout/popover/popover.d.ts.map +1 -1
- package/dist/components/layout/popover/popover.js +25 -8
- package/dist/components/layout/popover/popover.js.map +1 -1
- package/dist/components/layout/task-board/task-board.d.ts +9 -1
- package/dist/components/layout/task-board/task-board.d.ts.map +1 -1
- package/dist/components/layout/task-board/task-board.js +67 -4
- package/dist/components/layout/task-board/task-board.js.map +1 -1
- package/dist/components/{list.i18n-nFB6dZpc.js → list.i18n-CKqbhFQ_.js} +1 -1
- package/dist/components/lists-and-tables/cells/cell/cell.d.ts +2 -0
- package/dist/components/lists-and-tables/cells/cell/cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/cell/cell.js +2 -1
- package/dist/components/lists-and-tables/cells/cell/cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/description-cell/description-cell.d.ts +2 -0
- package/dist/components/lists-and-tables/cells/description-cell/description-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/description-cell/description-cell.js +2 -1
- package/dist/components/lists-and-tables/cells/description-cell/description-cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.d.ts +2 -0
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.js +2 -1
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.d.ts +7 -2
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.js +3 -3
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.js.map +1 -1
- package/dist/components/lists-and-tables/list/list.i18n.d.ts +1 -1
- package/dist/components/lists-and-tables/list/list.i18n.js +1 -1
- package/dist/components/lists-and-tables/list/list.js +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.d.ts +9 -2
- package/dist/components/lists-and-tables/list-item/list-item.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.js +22 -2
- package/dist/components/lists-and-tables/list-item/list-item.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.styles.js +0 -6
- package/dist/components/lists-and-tables/list-item/list-item.styles.js.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js +14 -2
- 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 +1 -2
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.js.map +1 -1
- package/dist/components/lists-and-tables/table/table.d.ts +24 -0
- package/dist/components/lists-and-tables/table/table.d.ts.map +1 -1
- package/dist/components/lists-and-tables/table/table.js +52 -4
- package/dist/components/lists-and-tables/table/table.js.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.d.ts +4 -4
- 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.i18n.d.ts +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.i18n.js +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.i18n.js.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.js +5 -2
- package/dist/components/navigation/document-tab-bar/document-tab-bar.js.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.template.js +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.template.js.map +1 -1
- package/dist/components/navigation/link/link.styles.d.ts.map +1 -1
- package/dist/components/navigation/link/link.styles.js +0 -4
- package/dist/components/navigation/link/link.styles.js.map +1 -1
- package/dist/components/navigation/link-group/link-group.d.ts +47 -0
- package/dist/components/navigation/link-group/link-group.d.ts.map +1 -0
- package/dist/components/navigation/link-group/link-group.js +81 -0
- package/dist/components/navigation/link-group/link-group.js.map +1 -0
- package/dist/components/navigation/link-group/link-group.styles.d.ts +2 -0
- package/dist/components/navigation/link-group/link-group.styles.d.ts.map +1 -0
- package/dist/components/navigation/link-group/link-group.styles.js +60 -0
- package/dist/components/navigation/link-group/link-group.styles.js.map +1 -0
- package/dist/components/navigation/link-group/link-group.template.d.ts +3 -0
- package/dist/components/navigation/link-group/link-group.template.d.ts.map +1 -0
- package/dist/components/navigation/link-group/link-group.template.js +15 -0
- package/dist/components/navigation/link-group/link-group.template.js.map +1 -0
- package/dist/components/navigation/menu-bar/menu-bar.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar/menu-bar.js +4 -0
- package/dist/components/navigation/menu-bar/menu-bar.js.map +1 -1
- package/dist/components/navigation/menu-bar/menu-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar/menu-bar.styles.js +9 -0
- package/dist/components/navigation/menu-bar/menu-bar.styles.js.map +1 -1
- package/dist/components/navigation/menu-bar/menu-bar.template.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar/menu-bar.template.js +25 -19
- package/dist/components/navigation/menu-bar/menu-bar.template.js.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.js +10 -0
- package/dist/components/navigation/menu-bar-item/menu-bar-item.js.map +1 -1
- package/dist/components/navigation/pagination/pagination.i18n.d.ts +3 -3
- package/dist/components/navigation/pagination/pagination.i18n.js +3 -3
- package/dist/components/navigation/pagination/pagination.i18n.js.map +1 -1
- package/dist/components/navigation/pagination/pagination.template.js +3 -3
- package/dist/components/navigation/pagination/pagination.template.js.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.d.ts.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.js +3 -0
- package/dist/components/navigation/tab-bar/tab-bar.js.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js +7 -6
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js.map +1 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.d.ts +11 -0
- package/dist/components/navigation/top-title-bar/top-title-bar.d.ts.map +1 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.js +37 -0
- package/dist/components/navigation/top-title-bar/top-title-bar.js.map +1 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.template.js +1 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.template.js.map +1 -1
- package/dist/components/{nl.generated-Ny3Kwppu.js → nl.generated-CUo20aPV.js} +5 -2
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.d.ts +1 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.js +3 -3
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.js.map +1 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.d.ts +2 -2
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.js +2 -2
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.js +9 -2
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.js.map +1 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.d.ts +1 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js +1 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.styles.js +9 -6
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.styles.js.map +1 -1
- package/dist/components/{visibility-mixin-DcwzF0_a.js → visibility-mixin-Ce0goNS6.js} +1 -1
- package/dist/css/rich-text.css +5 -0
- package/dist/css/variables.css +3 -1
- package/dist/nldd.min.js +1810 -1008
- package/dist/translations/en-US.d.ts.map +1 -1
- package/dist/translations/en-US.js +67 -23
- package/dist/translations/en-US.js.map +1 -1
- package/dist/translations/fy.d.ts +3 -3
- package/dist/translations/fy.d.ts.map +1 -1
- package/dist/translations/fy.js +82 -23
- package/dist/translations/fy.js.map +1 -1
- package/dist/translations/nl.generated.d.ts +55 -11
- package/dist/translations/nl.generated.d.ts.map +1 -1
- package/dist/translations/nl.generated.js +6 -0
- package/dist/translations/nl.generated.js.map +1 -1
- package/dist/translations/pap-AW.d.ts +3 -3
- package/dist/translations/pap-AW.d.ts.map +1 -1
- package/dist/translations/pap-AW.js +82 -23
- package/dist/translations/pap-AW.js.map +1 -1
- package/dist/translations/pap-CW.d.ts +3 -3
- package/dist/translations/pap-CW.d.ts.map +1 -1
- package/dist/translations/pap-CW.js +82 -23
- package/dist/translations/pap-CW.js.map +1 -1
- package/dist/types/vue.d.ts +153 -57
- package/dist/utilities/carried-context.d.ts +14 -3
- package/dist/utilities/carried-context.d.ts.map +1 -1
- package/dist/utilities/carried-context.js +12 -5
- package/dist/utilities/carried-context.js.map +1 -1
- package/dist/utilities/defer-focus.d.ts +24 -0
- package/dist/utilities/defer-focus.d.ts.map +1 -0
- package/dist/utilities/defer-focus.js +33 -0
- package/dist/utilities/defer-focus.js.map +1 -0
- package/dist/utilities/dev-rules.generated.d.ts.map +1 -1
- package/dist/utilities/dev-rules.generated.js +105 -3
- package/dist/utilities/dev-rules.generated.js.map +1 -1
- package/dist/utilities/file-drag-and-drop.d.ts +18 -0
- package/dist/utilities/file-drag-and-drop.d.ts.map +1 -0
- package/dist/utilities/file-drag-and-drop.js +31 -0
- package/dist/utilities/file-drag-and-drop.js.map +1 -0
- package/dist/utilities/list-items.d.ts +10 -0
- package/dist/utilities/list-items.d.ts.map +1 -0
- package/dist/utilities/list-items.js +21 -0
- package/dist/utilities/list-items.js.map +1 -0
- package/dist/utilities/owner-form.d.ts +21 -0
- package/dist/utilities/owner-form.d.ts.map +1 -0
- package/dist/utilities/owner-form.js +39 -0
- package/dist/utilities/owner-form.js.map +1 -0
- package/dist/utilities/popover-target.d.ts +25 -0
- package/dist/utilities/popover-target.d.ts.map +1 -0
- package/dist/utilities/popover-target.js +48 -0
- package/dist/utilities/popover-target.js.map +1 -0
- package/dist/utilities/popup-anchor-controller.d.ts.map +1 -1
- package/dist/utilities/popup-anchor-controller.js +11 -2
- package/dist/utilities/popup-anchor-controller.js.map +1 -1
- package/dist/utilities/render-marked.d.ts +2 -0
- package/dist/utilities/render-marked.d.ts.map +1 -1
- package/dist/utilities/render-marked.js +4 -0
- package/dist/utilities/render-marked.js.map +1 -1
- package/dist/utilities/row-header-mixin.d.ts +31 -0
- package/dist/utilities/row-header-mixin.d.ts.map +1 -0
- package/dist/utilities/row-header-mixin.js +44 -0
- package/dist/utilities/row-header-mixin.js.map +1 -0
- package/lint/cli.js +4 -4
- package/lint/data.generated.json +1 -1
- package/package.json +14 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"split-button.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/split-button/split-button.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"split-button.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/split-button/split-button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAWtD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAE1E,OAAO,uBAAuB,CAAC;AAC/B,OAAO,iCAAiC,CAAC;AACzC,OAAO,4BAA4B,CAAC;AAEpC,MAAM,MAAM,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE7C,MAAM,MAAM,qBAAqB,GAC9B,gBAAgB,GAChB,cAA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U,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAgB/C,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,mBAAmB,EAAE,eAAe,CAAC;KACrC;CACD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const nlddSplitButtonTranslations: {
|
|
2
|
-
'components.split-button.
|
|
2
|
+
'components.split-button.show-options-action': string;
|
|
3
3
|
};
|
|
4
4
|
export type NLDDSplitButtonTranslations = typeof nlddSplitButtonTranslations;
|
|
5
5
|
//# sourceMappingURL=split-button.i18n.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"split-button.i18n.js","sourceRoot":"","sources":["../../../../src/components/actions/split-button/split-button.i18n.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,2BAA2B,GAAG;IAC1C,
|
|
1
|
+
{"version":3,"file":"split-button.i18n.js","sourceRoot":"","sources":["../../../../src/components/actions/split-button/split-button.i18n.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,2BAA2B,GAAG;IAC1C,6CAA6C,EAAE,yBAAyB;CACxE,CAAC"}
|
|
@@ -7,144 +7,169 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
/**
|
|
8
8
|
* Nederlandse Digitale Dienst Split Button Component (Lit + TypeScript)
|
|
9
9
|
*
|
|
10
|
-
* A split button combines a primary action
|
|
11
|
-
* The main button performs the default action
|
|
12
|
-
* menu or popover.
|
|
10
|
+
* A split button combines a primary action with a chevron that opens its
|
|
11
|
+
* alternatives. The main button performs the default action; the chevron opens
|
|
12
|
+
* a menu or popover of variants of that same action.
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
14
|
+
* The overlay is required. Put an `nldd-menu` or `nldd-popover` in the `popup`
|
|
15
|
+
* slot, as on nldd-button and nldd-icon-button:
|
|
16
16
|
*
|
|
17
17
|
* ```html
|
|
18
|
-
* <nldd-split-button text="
|
|
19
|
-
* <nldd-menu>
|
|
18
|
+
* <nldd-split-button text="Bewaar">
|
|
19
|
+
* <nldd-menu slot="popup">
|
|
20
20
|
* <nldd-menu-item text="Opslaan als…"></nldd-menu-item>
|
|
21
21
|
* </nldd-menu>
|
|
22
22
|
* </nldd-split-button>
|
|
23
23
|
* ```
|
|
24
24
|
*
|
|
25
|
-
* The
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
25
|
+
* The split button has no other slots, so an overlay without `slot="popup"`
|
|
26
|
+
* works too. When both hold one, the one in `popup` wins. For an overlay that
|
|
27
|
+
* lives elsewhere, point `popovertarget` at it instead.
|
|
28
|
+
*
|
|
29
|
+
* The chevron is the overlay's invoker: it anchors it, opens and closes it, and
|
|
30
|
+
* takes `aria-expanded` and `aria-haspopup` from it, exactly as an
|
|
31
|
+
* nldd-icon-button with a slotted overlay does. Its accessible name says which
|
|
32
|
+
* action it belongs to ("Meer opties voor Bewaar").
|
|
33
|
+
*
|
|
34
|
+
* The API is narrower than nldd-button on purpose: a split button is an action
|
|
35
|
+
* with variants, so it has no supporting text, no end icon and no link target.
|
|
36
|
+
* Its label always stays on one line, without an ellipsis: keep it short.
|
|
29
37
|
*
|
|
30
38
|
* @element nldd-split-button
|
|
31
39
|
* @attr {string} size - Button size: 'xs' | 'sm' | 'md' | 'lg' (default: 'md')
|
|
32
|
-
* @attr {string} appearance - Visual style (default
|
|
40
|
+
* @attr {string} appearance - Visual style: 'neutral-tinted' (default) | 'neutral-base' | 'accent-filled' | 'primary' | 'secondary' | 'inherit-tinted' | 'inherit-filled'. 'primary' is 'accent-filled' and 'secondary' is 'neutral-tinted'. The inherit appearances are for a colored surface. There are no transparent appearances: the split button needs a surface of its own to show it is one control.
|
|
33
41
|
* @attr {boolean} disabled - Disabled state. Avoid it: let the action run and say afterwards what is missing; the design guidelines say why.
|
|
42
|
+
* @attr {boolean} loading - Loading state of the main action, as on nldd-button. The chevron stays available.
|
|
43
|
+
* @attr {string} loading-text - What the screen reader announces while `loading` is on, as on nldd-button.
|
|
34
44
|
* @attr {string} width - Width mode: 'full' (stretches to container) or any CSS length; the main action button fills the available space
|
|
35
45
|
* @attr {string} text - Button text for the primary action
|
|
36
46
|
* @attr {string} icon - Icon name shown before the text on the primary action button
|
|
47
|
+
* @attr {string} type - What the main action does in a form: 'button' (default) | 'submit' | 'reset'. Ignored when `href` is set.
|
|
48
|
+
* @attr {string} form - Id of the form the main action submits or resets, for a split button outside it. Takes an `nldd-form` as well as a plain `<form>`, as on nldd-button.
|
|
49
|
+
* @attr {string} href - Turns the main action into a link, as on nldd-button.
|
|
50
|
+
* @attr {string} download - Saves the file `href` points at instead of opening it, as on nldd-button. Only used with `href`.
|
|
51
|
+
* @attr {string} popovertarget - ID of an `nldd-menu` or `nldd-popover` elsewhere in this tree that the chevron opens, for an overlay that cannot be a child. A slotted overlay wins.
|
|
37
52
|
* @attr {string} shortcut - Keyboard shortcut hint for the primary action, shown right after its text, e.g. 'Cmd+S'. Forwarded to the inner nldd-button; display only, wire up the handling in your app.
|
|
38
53
|
* @attr {string} shortcut-mac - Override of `shortcut` on macOS, where the keys differ (falls back to `shortcut`).
|
|
39
54
|
* @attr {string} shortcut-windows - Override of `shortcut` on Windows (falls back to `shortcut`).
|
|
40
55
|
* @attr {string} shortcut-linux - Override of `shortcut` on Linux (falls back to `shortcut`).
|
|
41
56
|
* @attr {object} translations - Translations; unset keys fall back to Dutch
|
|
42
57
|
*
|
|
43
|
-
* @slot -
|
|
58
|
+
* @slot popup - The `nldd-menu` or `nldd-popover` the chevron opens.
|
|
59
|
+
* @slot - Fallback for the overlay when it has no `slot="popup"`. Anything that is not an `nldd-menu` or `nldd-popover` does nothing here.
|
|
44
60
|
*
|
|
45
61
|
* @fires action-click - Fired when the main button is clicked
|
|
46
|
-
* @fires menu-click - Fired when the dropdown trigger is clicked and no overlay is slotted
|
|
47
62
|
*/
|
|
48
63
|
import { LitElement } from 'lit';
|
|
49
|
-
import { property
|
|
64
|
+
import { property } from 'lit/decorators.js';
|
|
50
65
|
import { customElement } from '../../../utilities/custom-element.js';
|
|
51
66
|
import { reflectNonDefault } from '../../../utilities/reflect-non-default.js';
|
|
67
|
+
import { internalsOf } from '../../../utilities/element-state.js';
|
|
68
|
+
import { ownerForm } from '../../../utilities/owner-form.js';
|
|
69
|
+
import { popoverTargetOf } from '../../../utilities/popover-target.js';
|
|
70
|
+
import { translate } from '../../../utilities/translations.js';
|
|
52
71
|
import { splitButtonStyles } from './split-button.styles.js';
|
|
53
|
-
import {
|
|
72
|
+
import { splitButtonTemplate } from './split-button.template.js';
|
|
54
73
|
import { nlddSplitButtonTranslations } from './split-button.i18n.js';
|
|
55
74
|
import './../button/button.js';
|
|
56
75
|
import './../icon-button/icon-button.js';
|
|
57
76
|
import '../../actions/menu/menu.js';
|
|
58
|
-
import { PopupAnchorController } from '../../../utilities/popup-anchor-controller.js';
|
|
59
|
-
import { translate } from '../../../utilities/translations.js';
|
|
60
77
|
let NLDDSplitButton = class NLDDSplitButton extends LitElement {
|
|
61
78
|
constructor() {
|
|
62
79
|
super(...arguments);
|
|
80
|
+
this._internals = internalsOf(this);
|
|
63
81
|
this.size = 'md';
|
|
64
82
|
this.appearance = 'neutral-tinted';
|
|
65
83
|
this.disabled = false;
|
|
84
|
+
/** Loading state of the main action. The chevron stays available. */
|
|
85
|
+
this.loading = false;
|
|
86
|
+
/** What the screen reader announces while `loading` is on. */
|
|
87
|
+
this.loadingText = '';
|
|
66
88
|
/** Width mode: 'full' (stretch to container) or any CSS length. The main action button fills the available space. */
|
|
67
89
|
this.width = '';
|
|
68
90
|
/** Button text for the primary action. */
|
|
69
91
|
this.text = '';
|
|
92
|
+
/** Icon name shown before the text on the primary action button. */
|
|
93
|
+
this.icon = '';
|
|
94
|
+
/** What the main action does in a form. Ignored when `href` is set. */
|
|
95
|
+
this.type = 'button';
|
|
96
|
+
/** Direct reference to that overlay, for one in another tree. */
|
|
97
|
+
this.popoverTargetElement = null;
|
|
70
98
|
this.shortcut = '';
|
|
71
99
|
this.shortcutMac = '';
|
|
72
100
|
this.shortcutWindows = '';
|
|
73
101
|
this.shortcutLinux = '';
|
|
74
|
-
/** Icon name shown before the text on the primary action button. */
|
|
75
|
-
this.icon = '';
|
|
76
102
|
this.translations = {};
|
|
77
|
-
this.
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
* binds its slotchange handler. */
|
|
82
|
-
this._popup = new PopupAnchorController(this, {
|
|
83
|
-
anchorFor: () => this._popupButtonWrapper ?? null,
|
|
84
|
-
onChange: (overlay, previous) => {
|
|
85
|
-
previous?.removeEventListener('toggle', this._handleMenuToggle);
|
|
86
|
-
this._menuIsOpen = false;
|
|
87
|
-
overlay?.addEventListener('toggle', this._handleMenuToggle);
|
|
88
|
-
},
|
|
89
|
-
});
|
|
90
|
-
this._handleMenuToggle = (event) => {
|
|
91
|
-
this._menuIsOpen = event.newState === 'open';
|
|
103
|
+
this._refreshPopoverTarget = () => {
|
|
104
|
+
const chevron = this.renderRoot.querySelector('.split-button__popup-button nldd-icon-button');
|
|
105
|
+
if (chevron)
|
|
106
|
+
chevron.popoverTargetElement = this._popoverTarget();
|
|
92
107
|
};
|
|
93
108
|
}
|
|
94
109
|
// — i18n —————————————————————————————————————————————————————————————————
|
|
95
|
-
_t(key) {
|
|
96
|
-
return translate(this.translations, nlddSplitButtonTranslations, key);
|
|
110
|
+
_t(key, vars) {
|
|
111
|
+
return translate(this.translations, nlddSplitButtonTranslations, key, vars);
|
|
97
112
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
this.
|
|
113
|
+
/** The appearance for the two buttons inside: they take the aliases'
|
|
114
|
+
* meaning, not the alias, so 'secondary' is never a fall-through there. */
|
|
115
|
+
_buttonAppearance() {
|
|
116
|
+
if (this.appearance === 'primary')
|
|
117
|
+
return 'accent-filled';
|
|
118
|
+
if (this.appearance === 'secondary')
|
|
119
|
+
return 'neutral-tinted';
|
|
120
|
+
return this.appearance;
|
|
104
121
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
122
|
+
// — Popover target ———————————————————————————————————————————————————————
|
|
123
|
+
/** The overlay `popovertarget` names, for the chevron. Looked up in the tree
|
|
124
|
+
* of this host: in the chevron's own tree the id would find nothing. */
|
|
125
|
+
_popoverTarget() {
|
|
126
|
+
return popoverTargetOf(this, this.popovertarget, this.popoverTargetElement);
|
|
108
127
|
}
|
|
128
|
+
// — Handlers —————————————————————————————————————————————————————————————
|
|
109
129
|
_handleActionClick(e) {
|
|
110
|
-
if (this.disabled)
|
|
130
|
+
if (this.disabled || this.loading)
|
|
111
131
|
return;
|
|
112
132
|
e.stopPropagation();
|
|
113
133
|
this.dispatchEvent(new CustomEvent('action-click', { bubbles: true, composed: true }));
|
|
114
|
-
|
|
115
|
-
_handleMenuClick(e) {
|
|
116
|
-
if (this.disabled)
|
|
117
|
-
return;
|
|
118
|
-
e.stopPropagation();
|
|
119
|
-
if (this._popup.handleClick(e))
|
|
134
|
+
if (this.href)
|
|
120
135
|
return;
|
|
121
|
-
|
|
136
|
+
const form = ownerForm(this, this._internals);
|
|
137
|
+
if (this.type === 'submit')
|
|
138
|
+
form?.requestSubmit();
|
|
139
|
+
else if (this.type === 'reset')
|
|
140
|
+
form?.reset();
|
|
141
|
+
}
|
|
142
|
+
// — Lifecycle ————————————————————————————————————————————————————————————
|
|
143
|
+
firstUpdated() {
|
|
144
|
+
// Capture, so it runs before the chevron's own click handler reads its
|
|
145
|
+
// target, for a keyboard click as well: an overlay rendered after this
|
|
146
|
+
// split button was not there on its last render.
|
|
147
|
+
this.renderRoot.querySelector('.split-button__popup-button')?.addEventListener('click', this._refreshPopoverTarget, true);
|
|
122
148
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
// 'full' switches the host to block + 100% via CSS; a valid CSS length
|
|
129
|
-
// is applied inline. Either way --_split-button-width drives the inner layout so the
|
|
130
|
-
// split-button stretches and the main button fills the free space.
|
|
149
|
+
willUpdate(changed) {
|
|
150
|
+
if (changed.has('width')) {
|
|
151
|
+
// 'full' is CSS on the host. A CSS length goes into local variables
|
|
152
|
+
// only, so a width the app sets on the host itself still wins. Set
|
|
153
|
+
// before the render, so an explicit width never shows at auto first.
|
|
131
154
|
const w = this.width;
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
this.style.width = isValidLength ? w : '';
|
|
135
|
-
if (isFull || isValidLength) {
|
|
155
|
+
if (w && w !== 'full' && CSS.supports('width', w)) {
|
|
156
|
+
this.style.setProperty('--_split-button-host-width', w);
|
|
136
157
|
this.style.setProperty('--_split-button-width', '100%');
|
|
137
158
|
}
|
|
138
159
|
else {
|
|
160
|
+
this.style.removeProperty('--_split-button-host-width');
|
|
139
161
|
this.style.removeProperty('--_split-button-width');
|
|
140
162
|
}
|
|
141
163
|
}
|
|
142
164
|
}
|
|
143
165
|
render() {
|
|
144
|
-
return
|
|
166
|
+
return splitButtonTemplate(this);
|
|
145
167
|
}
|
|
146
168
|
};
|
|
147
169
|
NLDDSplitButton.styles = splitButtonStyles;
|
|
170
|
+
/** Form-associated, so a submit split button finds the form it sits in:
|
|
171
|
+
* its action button is in this shadow root and has no form owner. */
|
|
172
|
+
NLDDSplitButton.formAssociated = true;
|
|
148
173
|
__decorate([
|
|
149
174
|
property({ reflect: true, converter: reflectNonDefault('md') })
|
|
150
175
|
], NLDDSplitButton.prototype, "size", void 0);
|
|
@@ -154,12 +179,36 @@ __decorate([
|
|
|
154
179
|
__decorate([
|
|
155
180
|
property({ type: Boolean, reflect: true })
|
|
156
181
|
], NLDDSplitButton.prototype, "disabled", void 0);
|
|
182
|
+
__decorate([
|
|
183
|
+
property({ type: Boolean, reflect: true })
|
|
184
|
+
], NLDDSplitButton.prototype, "loading", void 0);
|
|
185
|
+
__decorate([
|
|
186
|
+
property({ attribute: 'loading-text' })
|
|
187
|
+
], NLDDSplitButton.prototype, "loadingText", void 0);
|
|
157
188
|
__decorate([
|
|
158
189
|
property({ reflect: true, converter: reflectNonDefault('') })
|
|
159
190
|
], NLDDSplitButton.prototype, "width", void 0);
|
|
160
191
|
__decorate([
|
|
161
192
|
property({ reflect: true, converter: reflectNonDefault('') })
|
|
162
193
|
], NLDDSplitButton.prototype, "text", void 0);
|
|
194
|
+
__decorate([
|
|
195
|
+
property({ type: String })
|
|
196
|
+
], NLDDSplitButton.prototype, "icon", void 0);
|
|
197
|
+
__decorate([
|
|
198
|
+
property({ reflect: true, converter: reflectNonDefault('button') })
|
|
199
|
+
], NLDDSplitButton.prototype, "type", void 0);
|
|
200
|
+
__decorate([
|
|
201
|
+
property()
|
|
202
|
+
], NLDDSplitButton.prototype, "href", void 0);
|
|
203
|
+
__decorate([
|
|
204
|
+
property()
|
|
205
|
+
], NLDDSplitButton.prototype, "download", void 0);
|
|
206
|
+
__decorate([
|
|
207
|
+
property()
|
|
208
|
+
], NLDDSplitButton.prototype, "popovertarget", void 0);
|
|
209
|
+
__decorate([
|
|
210
|
+
property({ attribute: false })
|
|
211
|
+
], NLDDSplitButton.prototype, "popoverTargetElement", void 0);
|
|
163
212
|
__decorate([
|
|
164
213
|
property({ reflect: true, converter: reflectNonDefault('') })
|
|
165
214
|
], NLDDSplitButton.prototype, "shortcut", void 0);
|
|
@@ -172,18 +221,9 @@ __decorate([
|
|
|
172
221
|
__decorate([
|
|
173
222
|
property({ reflect: true, attribute: 'shortcut-linux', converter: reflectNonDefault('') })
|
|
174
223
|
], NLDDSplitButton.prototype, "shortcutLinux", void 0);
|
|
175
|
-
__decorate([
|
|
176
|
-
property({ type: String })
|
|
177
|
-
], NLDDSplitButton.prototype, "icon", void 0);
|
|
178
224
|
__decorate([
|
|
179
225
|
property({ type: Object })
|
|
180
226
|
], NLDDSplitButton.prototype, "translations", void 0);
|
|
181
|
-
__decorate([
|
|
182
|
-
query('.split-button__popup-button')
|
|
183
|
-
], NLDDSplitButton.prototype, "_popupButtonWrapper", void 0);
|
|
184
|
-
__decorate([
|
|
185
|
-
state()
|
|
186
|
-
], NLDDSplitButton.prototype, "_menuIsOpen", void 0);
|
|
187
227
|
NLDDSplitButton = __decorate([
|
|
188
228
|
customElement('nldd-split-button')
|
|
189
229
|
], NLDDSplitButton);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"split-button.js","sourceRoot":"","sources":["../../../../src/components/actions/split-button/split-button.ts"],"names":[],"mappings":";;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"split-button.js","sourceRoot":"","sources":["../../../../src/components/actions/split-button/split-button.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,OAAO,EAAE,UAAU,EAAuB,MAAM,KAAK,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAGrE,OAAO,uBAAuB,CAAC;AAC/B,OAAO,iCAAiC,CAAC;AACzC,OAAO,4BAA4B,CAAC;AAc7B,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,UAAU;IAAxC;;QAME,eAAU,GAAG,WAAW,CA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AAE,MAAM,EAAE,CAAC;6CACjB;AAIV;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,CAAgC,QAAQ,CAAC,EAAE,CAAC;6CACpD;AAI/C;IADC,QAAQ,EAAE;6CACG;AAId;IADC,QAAQ,EAAE;iDACO;AAIlB;IADC,QAAQ,EAAE;sDACY;AAIvB;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;6DACa;AAG5C;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,CAAS,EAAE,CAAC,EAAE,CAAC;iDACxD;AAGd;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,iBAAiB,CAAS,EAAE,CAAC,EAAE,CAAC;oDAChF;AAGjB;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,kBAAkB,EAAE,SAAS,EAAE,iBAAiB,CAAS,EAAE,CAAC,EAAE,CAAC;wDAChF;AAGrB;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,gBAAgB,EAAE,SAAS,EAAE,iBAAiB,CAAS,EAAE,CAAC,EAAE,CAAC;sDAChF;AAGnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qDAC6B;AAtE5C,eAAe;IAD3B,aAAa,CAAC,mBAAmB,CAAC;GACtB,eAAe,CA2I3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"split-button.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/split-button/split-button.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"split-button.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/split-button/split-button.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,yBAqI7B,CAAC"}
|
|
@@ -15,9 +15,11 @@ export const splitButtonStyles = css `
|
|
|
15
15
|
--_split-button-highlight-border-color: var(--semantics-buttons-neutral-tinted-highlight-border-color);
|
|
16
16
|
--_split-button-divider-length: var(--semantics-buttons-md-divider-length);
|
|
17
17
|
--_split-button-width: auto;
|
|
18
|
+
--_split-button-host-width: auto;
|
|
18
19
|
|
|
19
20
|
${inheritedTextReset}
|
|
20
21
|
display: inline-flex;
|
|
22
|
+
width: var(--_split-button-host-width);
|
|
21
23
|
isolation: isolate;
|
|
22
24
|
-webkit-tap-highlight-color: transparent;
|
|
23
25
|
}
|
|
@@ -76,6 +78,8 @@ export const splitButtonStyles = css `
|
|
|
76
78
|
display: none;
|
|
77
79
|
}
|
|
78
80
|
|
|
81
|
+
/* The host fades, not its buttons: the highlight border is drawn here and
|
|
82
|
+
has to fade with them. */
|
|
79
83
|
:host([disabled]) {
|
|
80
84
|
opacity: var(--primitives-opacity-disabled);
|
|
81
85
|
pointer-events: none;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"split-button.styles.js","sourceRoot":"","sources":["../../../../src/components/actions/split-button/split-button.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"split-button.styles.js","sourceRoot":"","sources":["../../../../src/components/actions/split-button/split-button.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;IAiBhC,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoHrB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type TemplateResult } from 'lit';
|
|
1
2
|
import type { NLDDSplitButton } from './split-button.js';
|
|
2
|
-
export declare function
|
|
3
|
+
export declare function splitButtonTemplate(component: NLDDSplitButton): TemplateResult;
|
|
3
4
|
//# sourceMappingURL=split-button.template.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"split-button.template.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/split-button/split-button.template.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"split-button.template.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/split-button/split-button.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,eAAe,GAAG,cAAc,CA0C9E"}
|
|
@@ -1,40 +1,45 @@
|
|
|
1
1
|
import { html, nothing } from 'lit';
|
|
2
|
-
export function
|
|
2
|
+
export function splitButtonTemplate(component) {
|
|
3
3
|
return html `
|
|
4
4
|
<div class="split-button">
|
|
5
5
|
<nldd-button
|
|
6
|
-
appearance=${
|
|
7
|
-
size=${
|
|
8
|
-
text=${
|
|
9
|
-
start-icon=${
|
|
10
|
-
shortcut=${
|
|
11
|
-
shortcut-mac=${
|
|
12
|
-
shortcut-windows=${
|
|
13
|
-
shortcut-linux=${
|
|
6
|
+
appearance=${component._buttonAppearance()}
|
|
7
|
+
size=${component.size}
|
|
8
|
+
text=${component.text}
|
|
9
|
+
start-icon=${component.icon || nothing}
|
|
10
|
+
shortcut=${component.shortcut || nothing}
|
|
11
|
+
shortcut-mac=${component.shortcutMac || nothing}
|
|
12
|
+
shortcut-windows=${component.shortcutWindows || nothing}
|
|
13
|
+
shortcut-linux=${component.shortcutLinux || nothing}
|
|
14
|
+
href=${component.href || nothing}
|
|
15
|
+
download=${component.download ?? nothing}
|
|
16
|
+
loading-text=${component.loadingText || nothing}
|
|
14
17
|
horizontal-alignment="left"
|
|
15
18
|
width="full"
|
|
16
19
|
no-highlight-border
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
single-line
|
|
21
|
+
?loading=${component.loading}
|
|
22
|
+
?disabled=${component.disabled}
|
|
23
|
+
@click=${component._handleActionClick}
|
|
19
24
|
></nldd-button>
|
|
20
25
|
<div class="split-button__divider"></div>
|
|
21
26
|
<div class="split-button__popup-button">
|
|
22
27
|
<nldd-icon-button
|
|
23
|
-
appearance=${
|
|
24
|
-
size=${
|
|
28
|
+
appearance=${component._buttonAppearance()}
|
|
29
|
+
size=${component.size}
|
|
25
30
|
icon="chevron-down-small"
|
|
26
|
-
text=${
|
|
31
|
+
text=${component._t('components.split-button.show-options-action', { text: component.text })}
|
|
27
32
|
tooltip-timing="never"
|
|
28
33
|
no-highlight-border
|
|
29
34
|
hide-lg-text
|
|
30
|
-
?disabled=${
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
?disabled=${component.disabled}
|
|
36
|
+
.popoverTargetElement=${component._popoverTarget()}
|
|
37
|
+
>
|
|
38
|
+
<slot name="popup" slot="popup"></slot>
|
|
39
|
+
<slot slot="popup"></slot>
|
|
40
|
+
</nldd-icon-button>
|
|
35
41
|
</div>
|
|
36
42
|
</div>
|
|
37
|
-
<slot @slotchange=${this._popup.handleSlotChange}></slot>
|
|
38
43
|
`;
|
|
39
44
|
}
|
|
40
45
|
//# sourceMappingURL=split-button.template.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"split-button.template.js","sourceRoot":"","sources":["../../../../src/components/actions/split-button/split-button.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"split-button.template.js","sourceRoot":"","sources":["../../../../src/components/actions/split-button/split-button.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAC;AAGzD,MAAM,UAAU,mBAAmB,CAAC,SAA0B;IAC7D,OAAO,IAAI,CAAA;;;iBAGK,SAAS,CAAC,iBAAiB,EAAE;WACnC,SAAS,CAAC,IAAI;WACd,SAAS,CAAC,IAAI;iBACR,SAAS,CAAC,IAAI,IAAI,OAAO;eAC3B,SAAS,CAAC,QAAQ,IAAI,OAAO;mBACzB,SAAS,CAAC,WAAW,IAAI,OAAO;uBAC5B,SAAS,CAAC,eAAe,IAAI,OAAO;qBACtC,SAAS,CAAC,aAAa,IAAI,OAAO;WAC5C,SAAS,CAAC,IAAI,IAAI,OAAO;eACrB,SAAS,CAAC,QAAQ,IAAI,OAAO;mBACzB,SAAS,CAAC,WAAW,IAAI,OAAO;;;;;eAKpC,SAAS,CAAC,OAAO;gBAChB,SAAS,CAAC,QAAQ;aACrB,SAAS,CAAC,kBAAkB;;;;;kBAKvB,SAAS,CAAC,iBAAiB,EAAE;YACnC,SAAS,CAAC,IAAI;;YAEd,SAAS,CAAC,EAAE,CAAC,6CAA6C,EAAE,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC;;;;iBAIhF,SAAS,CAAC,QAAQ;6BACN,SAAS,CAAC,cAAc,EAAE;;;;;;;EAOrD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Story helper: keeps an nldd-segmented-control or nldd-tab-bar in an
|
|
3
|
+
* nldd-toolbar-item in step with its alternatives in the item's `overflow`
|
|
4
|
+
* slot, both ways, the way an app does. A menu item does not check itself: the
|
|
5
|
+
* app sets `selected`, and the toolbar copies that into its overflow menu. The
|
|
6
|
+
* n-th menu item stands for the n-th segment or tab.
|
|
7
|
+
*
|
|
8
|
+
* Installed once per page; the listeners sit on the document, so every story
|
|
9
|
+
* that renders a toolbar gets it. The text editor's toolbar story wires its own
|
|
10
|
+
* controls to the editor, so it is left alone.
|
|
11
|
+
*/
|
|
12
|
+
export declare function syncToolbarOverflow(): void;
|
|
13
|
+
//# sourceMappingURL=toolbar.story-sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbar.story-sync.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/toolbar/toolbar.story-sync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAqCH,wBAAgB,mBAAmB,IAAI,IAAI,CAkD1C"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Story helper: keeps an nldd-segmented-control or nldd-tab-bar in an
|
|
3
|
+
* nldd-toolbar-item in step with its alternatives in the item's `overflow`
|
|
4
|
+
* slot, both ways, the way an app does. A menu item does not check itself: the
|
|
5
|
+
* app sets `selected`, and the toolbar copies that into its overflow menu. The
|
|
6
|
+
* n-th menu item stands for the n-th segment or tab.
|
|
7
|
+
*
|
|
8
|
+
* Installed once per page; the listeners sit on the document, so every story
|
|
9
|
+
* that renders a toolbar gets it. The text editor's toolbar story wires its own
|
|
10
|
+
* controls to the editor, so it is left alone.
|
|
11
|
+
*/
|
|
12
|
+
const alternativesOf = (toolbarItem) => Array.from(toolbarItem.querySelectorAll(':scope > nldd-menu-item[slot="overflow"], :scope > [slot="overflow"] nldd-menu-item'));
|
|
13
|
+
const segmentsOf = (control) => Array.from(control.querySelectorAll('nldd-segmented-control-item'));
|
|
14
|
+
const tabsOf = (bar) => Array.from(bar.querySelectorAll('nldd-tab-bar-item'));
|
|
15
|
+
/** Checks the menu item that stands for the current tab. */
|
|
16
|
+
function mirrorTabs(bar, toolbarItem) {
|
|
17
|
+
const tabs = tabsOf(bar);
|
|
18
|
+
alternativesOf(toolbarItem).forEach((item, index) => {
|
|
19
|
+
item.selected = !!tabs[index]?.current;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
const ownToolbar = (el) => !el.closest('.demo-editor');
|
|
23
|
+
const isChosen = (control, value) => value !== null && (control.type === 'checkbox' ? (control.values ?? []).includes(value) : control.value === value);
|
|
24
|
+
/** Checks the menu items that stand for a chosen segment. */
|
|
25
|
+
function mirror(control, toolbarItem) {
|
|
26
|
+
const segments = segmentsOf(control);
|
|
27
|
+
alternativesOf(toolbarItem).forEach((item, index) => {
|
|
28
|
+
item.selected = isChosen(control, segments[index]?.getAttribute('value') ?? null);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
let installed = false;
|
|
32
|
+
export function syncToolbarOverflow() {
|
|
33
|
+
if (installed)
|
|
34
|
+
return;
|
|
35
|
+
installed = true;
|
|
36
|
+
document.addEventListener('change', (event) => {
|
|
37
|
+
const control = event.target;
|
|
38
|
+
if (control?.tagName !== 'NLDD-SEGMENTED-CONTROL')
|
|
39
|
+
return;
|
|
40
|
+
const toolbarItem = control.closest('nldd-toolbar-item');
|
|
41
|
+
if (toolbarItem && ownToolbar(toolbarItem))
|
|
42
|
+
mirror(control, toolbarItem);
|
|
43
|
+
});
|
|
44
|
+
document.addEventListener('tabchange', (event) => {
|
|
45
|
+
const bar = event.target;
|
|
46
|
+
const toolbarItem = bar?.closest?.('nldd-toolbar-item');
|
|
47
|
+
if (!toolbarItem || !ownToolbar(toolbarItem))
|
|
48
|
+
return;
|
|
49
|
+
// A navigation bar leaves `current` to the app, which sets it on the route change.
|
|
50
|
+
if (bar.navigation) {
|
|
51
|
+
const item = event.detail.item;
|
|
52
|
+
tabsOf(bar).forEach((tab) => { tab.current = tab === item; });
|
|
53
|
+
}
|
|
54
|
+
// After the bar has moved `current` to the tab.
|
|
55
|
+
queueMicrotask(() => mirrorTabs(bar, toolbarItem));
|
|
56
|
+
});
|
|
57
|
+
// The toolbar sends a `select` on a copy in its menu on to the original.
|
|
58
|
+
document.addEventListener('select', (event) => {
|
|
59
|
+
const item = event.target;
|
|
60
|
+
if (item?.tagName !== 'NLDD-MENU-ITEM')
|
|
61
|
+
return;
|
|
62
|
+
const toolbarItem = item.closest('nldd-toolbar-item');
|
|
63
|
+
const bar = toolbarItem?.querySelector('nldd-tab-bar');
|
|
64
|
+
if (toolbarItem && bar && ownToolbar(toolbarItem)) {
|
|
65
|
+
const index = alternativesOf(toolbarItem).indexOf(item);
|
|
66
|
+
if (index < 0)
|
|
67
|
+
return;
|
|
68
|
+
tabsOf(bar).forEach((tab, i) => { tab.current = i === index; });
|
|
69
|
+
mirrorTabs(bar, toolbarItem);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const control = toolbarItem?.querySelector('nldd-segmented-control');
|
|
73
|
+
if (!toolbarItem || !control || !ownToolbar(toolbarItem))
|
|
74
|
+
return;
|
|
75
|
+
const index = alternativesOf(toolbarItem).indexOf(item);
|
|
76
|
+
const value = segmentsOf(control)[index]?.getAttribute('value');
|
|
77
|
+
if (index < 0 || !value)
|
|
78
|
+
return;
|
|
79
|
+
if (control.type === 'checkbox') {
|
|
80
|
+
const values = control.values ?? [];
|
|
81
|
+
control.values = values.includes(value) ? values.filter((other) => other !== value) : [...values, value];
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
control.value = value;
|
|
85
|
+
}
|
|
86
|
+
mirror(control, toolbarItem);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=toolbar.story-sync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbar.story-sync.js","sourceRoot":"","sources":["../../../../src/components/actions/toolbar/toolbar.story-sync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,MAAM,cAAc,GAAG,CAAC,WAAoB,EAAiB,EAAE,CAC9D,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAc,qFAAqF,CAAC,CAAC,CAAC;AAI9I,MAAM,UAAU,GAAG,CAAC,OAAgB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