@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
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** Elements whose own role a list item would hide. A custom element or a
|
|
2
|
+
* plain div or span has none worth keeping. */
|
|
3
|
+
const OWN_ROLE = /^(a|article|aside|button|details|dialog|fieldset|figure|footer|form|h[1-6]|header|hr|img|input|li|main|nav|ol|section|select|table|textarea|ul)$/;
|
|
4
|
+
/**
|
|
5
|
+
* Gives slotted children `role="listitem"`, for a component that renders the
|
|
6
|
+
* `role="list"` around its slot.
|
|
7
|
+
*
|
|
8
|
+
* A child with a role of its own, written or implied by its element, keeps it:
|
|
9
|
+
* a consumer's `<article>` stays an article. An nldd-card carries its article
|
|
10
|
+
* inside its shadow root, so its host has room for the list item.
|
|
11
|
+
*/
|
|
12
|
+
export function markListItems(elements) {
|
|
13
|
+
for (const el of elements) {
|
|
14
|
+
if (el.hasAttribute('role') && el.getAttribute('role') !== 'listitem')
|
|
15
|
+
continue;
|
|
16
|
+
if (OWN_ROLE.test(el.localName))
|
|
17
|
+
continue;
|
|
18
|
+
el.setAttribute('role', 'listitem');
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=list-items.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-items.js","sourceRoot":"","sources":["../../src/utilities/list-items.ts"],"names":[],"mappings":"AAAA;gDACgD;AAChD,MAAM,QAAQ,GAAG,kJAAkJ,CAAC;AAEpK;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,QAAmB;IAChD,KAAK,MAAM,EAAE,IAAI,QAAQ,EAAE,CAAC;QAC3B,IAAI,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,UAAU;YAAE,SAAS;QAChF,IAAI,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC;YAAE,SAAS;QAC1C,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACrC,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The form a form-associated button acts on: the one it sits in, or the one
|
|
3
|
+
* its `form` attribute names.
|
|
4
|
+
*
|
|
5
|
+
* The platform resolves that attribute itself, but only to a real `<form>`.
|
|
6
|
+
* An `nldd-form` renders its form in the light DOM without handing it the id
|
|
7
|
+
* the consumer wrote, so an id pointing at the component finds an element
|
|
8
|
+
* that is not a form, and the button ends up with no form owner at all. That
|
|
9
|
+
* is the whole reason a save button in a page footer, outside the form it
|
|
10
|
+
* belongs to, used to do nothing.
|
|
11
|
+
*
|
|
12
|
+
* The id is looked up in the host's own root, the same scope the platform
|
|
13
|
+
* searches: a button inside a shadow tree reaches the forms in that tree, not
|
|
14
|
+
* one in the document around it. Put the two in the same tree, or hand the
|
|
15
|
+
* button its form another way.
|
|
16
|
+
*
|
|
17
|
+
* Shared by nldd-button and nldd-split-button, whose action button sits in a
|
|
18
|
+
* shadow root and so has no form owner of its own.
|
|
19
|
+
*/
|
|
20
|
+
export declare function ownerForm(host: HTMLElement, internals: ElementInternals): HTMLFormElement | null;
|
|
21
|
+
//# sourceMappingURL=owner-form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"owner-form.d.ts","sourceRoot":"","sources":["../../src/utilities/owner-form.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,gBAAgB,GAAG,eAAe,GAAG,IAAI,CAehG"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { setState } from './element-state.js';
|
|
2
|
+
/**
|
|
3
|
+
* The form a form-associated button acts on: the one it sits in, or the one
|
|
4
|
+
* its `form` attribute names.
|
|
5
|
+
*
|
|
6
|
+
* The platform resolves that attribute itself, but only to a real `<form>`.
|
|
7
|
+
* An `nldd-form` renders its form in the light DOM without handing it the id
|
|
8
|
+
* the consumer wrote, so an id pointing at the component finds an element
|
|
9
|
+
* that is not a form, and the button ends up with no form owner at all. That
|
|
10
|
+
* is the whole reason a save button in a page footer, outside the form it
|
|
11
|
+
* belongs to, used to do nothing.
|
|
12
|
+
*
|
|
13
|
+
* The id is looked up in the host's own root, the same scope the platform
|
|
14
|
+
* searches: a button inside a shadow tree reaches the forms in that tree, not
|
|
15
|
+
* one in the document around it. Put the two in the same tree, or hand the
|
|
16
|
+
* button its form another way.
|
|
17
|
+
*
|
|
18
|
+
* Shared by nldd-button and nldd-split-button, whose action button sits in a
|
|
19
|
+
* shadow root and so has no form owner of its own.
|
|
20
|
+
*/
|
|
21
|
+
export function ownerForm(host, internals) {
|
|
22
|
+
const id = host.getAttribute('form');
|
|
23
|
+
const root = host.getRootNode();
|
|
24
|
+
const target = id && 'getElementById' in root ? root.getElementById(id) : null;
|
|
25
|
+
const rendered = target?.form;
|
|
26
|
+
let form = null;
|
|
27
|
+
if (target instanceof HTMLFormElement)
|
|
28
|
+
form = target;
|
|
29
|
+
else if (rendered instanceof HTMLFormElement)
|
|
30
|
+
form = rendered;
|
|
31
|
+
// Nothing to submit is the silent failure this attribute exists to end:
|
|
32
|
+
// the click does nothing and no error says why. Two facts, since a typo
|
|
33
|
+
// and an nldd-form that has not rendered yet look identical from the
|
|
34
|
+
// outside.
|
|
35
|
+
setState(host, 'no-form-target', Boolean(id) && !target);
|
|
36
|
+
setState(host, 'form-target-not-a-form', Boolean(target) && !form);
|
|
37
|
+
return id ? form : internals.form;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=owner-form.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"owner-form.js","sourceRoot":"","sources":["../../src/utilities/owner-form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,SAAS,CAAC,IAAiB,EAAE,SAA2B;IACvE,MAAM,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IACrC,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAA2B,CAAC;IACzD,MAAM,MAAM,GAAG,EAAE,IAAI,gBAAgB,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC/E,MAAM,QAAQ,GAAI,MAAoC,EAAE,IAAI,CAAC;IAC7D,IAAI,IAAI,GAA2B,IAAI,CAAC;IACxC,IAAI,MAAM,YAAY,eAAe;QAAE,IAAI,GAAG,MAAM,CAAC;SAChD,IAAI,QAAQ,YAAY,eAAe;QAAE,IAAI,GAAG,QAAQ,CAAC;IAC9D,wEAAwE;IACxE,wEAAwE;IACxE,qEAAqE;IACrE,WAAW;IACX,QAAQ,CAAC,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACzD,QAAQ,CAAC,IAAI,EAAE,wBAAwB,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnE,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The popover a component's inner button invokes, from `popovertarget` or
|
|
3
|
+
* `popoverTargetElement` on the host.
|
|
4
|
+
*
|
|
5
|
+
* An id written on the inner button is looked up in the component's own
|
|
6
|
+
* shadow root, where the popover never is, so the button opened nothing. The
|
|
7
|
+
* id is looked up here in the tree of the host instead, and the inner button
|
|
8
|
+
* gets the element. The element wins when both are set.
|
|
9
|
+
*
|
|
10
|
+
* Look it up again on click: a popover rendered after the button is not there
|
|
11
|
+
* yet on the button's first render.
|
|
12
|
+
*/
|
|
13
|
+
export declare function popoverTargetOf(host: Element, id: string | undefined, element: Element | null): Element | null;
|
|
14
|
+
/**
|
|
15
|
+
* Positions an `nldd-menu` or `nldd-popover` that `popovertarget` points at
|
|
16
|
+
* against the control that opens it, so the overlay needs no `anchor` of its
|
|
17
|
+
* own. The browser already opens and closes it; this adds where it stands and
|
|
18
|
+
* the ARIA link back to the control, as a slotted overlay gets.
|
|
19
|
+
*
|
|
20
|
+
* An overlay with an `anchor` id, or anchored to another element, is
|
|
21
|
+
* left alone: someone chose where it goes. Pass `null` to let go, as on
|
|
22
|
+
* disconnect or when `popovertarget` changes.
|
|
23
|
+
*/
|
|
24
|
+
export declare function anchorPopoverTarget(host: Element, target: Element | null): void;
|
|
25
|
+
//# sourceMappingURL=popover-target.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover-target.d.ts","sourceRoot":"","sources":["../../src/utilities/popover-target.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,OAAO,GAAG,IAAI,CAK9G;AAOD;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,GAAG,IAAI,CAY/E"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The popover a component's inner button invokes, from `popovertarget` or
|
|
3
|
+
* `popoverTargetElement` on the host.
|
|
4
|
+
*
|
|
5
|
+
* An id written on the inner button is looked up in the component's own
|
|
6
|
+
* shadow root, where the popover never is, so the button opened nothing. The
|
|
7
|
+
* id is looked up here in the tree of the host instead, and the inner button
|
|
8
|
+
* gets the element. The element wins when both are set.
|
|
9
|
+
*
|
|
10
|
+
* Look it up again on click: a popover rendered after the button is not there
|
|
11
|
+
* yet on the button's first render.
|
|
12
|
+
*/
|
|
13
|
+
export function popoverTargetOf(host, id, element) {
|
|
14
|
+
if (element)
|
|
15
|
+
return element;
|
|
16
|
+
if (!id)
|
|
17
|
+
return null;
|
|
18
|
+
const root = host.getRootNode();
|
|
19
|
+
return root.getElementById?.(id) ?? null;
|
|
20
|
+
}
|
|
21
|
+
/** The overlay each host anchored, so it can let go again. */
|
|
22
|
+
const anchoredBy = new WeakMap();
|
|
23
|
+
/**
|
|
24
|
+
* Positions an `nldd-menu` or `nldd-popover` that `popovertarget` points at
|
|
25
|
+
* against the control that opens it, so the overlay needs no `anchor` of its
|
|
26
|
+
* own. The browser already opens and closes it; this adds where it stands and
|
|
27
|
+
* the ARIA link back to the control, as a slotted overlay gets.
|
|
28
|
+
*
|
|
29
|
+
* An overlay with an `anchor` id, or anchored to another element, is
|
|
30
|
+
* left alone: someone chose where it goes. Pass `null` to let go, as on
|
|
31
|
+
* disconnect or when `popovertarget` changes.
|
|
32
|
+
*/
|
|
33
|
+
export function anchorPopoverTarget(host, target) {
|
|
34
|
+
const previous = anchoredBy.get(host);
|
|
35
|
+
const next = target?.matches('nldd-menu, nldd-popover') && !target.getAttribute('anchor')
|
|
36
|
+
? target
|
|
37
|
+
: null;
|
|
38
|
+
if (previous && previous !== next && previous.anchorElement === host)
|
|
39
|
+
previous.anchorElement = null;
|
|
40
|
+
if (next && (next.anchorElement === null || next.anchorElement === host)) {
|
|
41
|
+
next.anchorElement = host;
|
|
42
|
+
anchoredBy.set(host, next);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
anchoredBy.delete(host);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=popover-target.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover-target.js","sourceRoot":"","sources":["../../src/utilities/popover-target.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,eAAe,CAAC,IAAa,EAAE,EAAsB,EAAE,OAAuB;IAC7F,IAAI,OAAO;QAAE,OAAO,OAAO,CAAC;IAC5B,IAAI,CAAC,EAAE;QAAE,OAAO,IAAI,CAAC;IACrB,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAA2B,CAAC;IACzD,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC;AAC1C,CAAC;AAID,8DAA8D;AAC9D,MAAM,UAAU,GAAG,IAAI,OAAO,EAA8B,CAAC;AAE7D;;;;;;;;;GASG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAa,EAAE,MAAsB;IACxE,MAAM,QAAQ,GAAG,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACtC,MAAM,IAAI,GAAG,MAAM,EAAE,OAAO,CAAC,yBAAyB,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC;QACxF,CAAC,CAAC,MAA2B;QAC7B,CAAC,CAAC,IAAI,CAAC;IACR,IAAI,QAAQ,IAAI,QAA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;IAC/E,iBAAiB,QAAO,IAAI,CAO1B;IAEF;;wEAEoE;IACpE,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO;CAavC"}
|
|
@@ -6,14 +6,21 @@ export class PopupAnchorController {
|
|
|
6
6
|
/** Bind to the popup slot's `slotchange`. */
|
|
7
7
|
this.handleSlotChange = (event) => {
|
|
8
8
|
const slot = event.target;
|
|
9
|
-
|
|
9
|
+
// Flattened, so a component can forward its own slot into this one
|
|
10
|
+
// (nldd-split-button hands its popup to the chevron this way).
|
|
11
|
+
const overlay = slot.assignedElements({ flatten: true }).find((el) => el.matches(OVERLAY_SELECTOR)) ?? null;
|
|
10
12
|
this.setOverlay(overlay);
|
|
11
13
|
};
|
|
12
14
|
/** Bind to the invoker's `pointerdown`. Snapshots the open state before the
|
|
13
15
|
* browser's light-dismiss runs. Covers mouse, touch and pen — `mousedown`
|
|
14
16
|
* alone would skip touch, where no mousedown precedes the synthetic click. */
|
|
15
17
|
this.handlePointerdown = () => {
|
|
16
|
-
|
|
18
|
+
const overlay = this._overlay;
|
|
19
|
+
if (!overlay) {
|
|
20
|
+
this._wasOpenOnPointerdown = false;
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
this._wasOpenOnPointerdown = '_shownForInvoker' in overlay ? overlay._shownForInvoker() : overlay.matches(':popover-open');
|
|
17
24
|
};
|
|
18
25
|
this._anchorFor = options.anchorFor ?? (() => host);
|
|
19
26
|
this._onChange = options.onChange;
|
|
@@ -55,6 +62,8 @@ export class PopupAnchorController {
|
|
|
55
62
|
// guard keeps showPopover() from throwing on an already-open overlay.
|
|
56
63
|
const wasOpen = event.detail > 0 && this._wasOpenOnPointerdown;
|
|
57
64
|
this._wasOpenOnPointerdown = false;
|
|
65
|
+
if ('_endInvokerGesture' in this._overlay)
|
|
66
|
+
this._overlay._endInvokerGesture();
|
|
58
67
|
if (!wasOpen && !this._overlay.matches(':popover-open'))
|
|
59
68
|
this._overlay.showPopover();
|
|
60
69
|
return true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popup-anchor-controller.js","sourceRoot":"","sources":["../../src/utilities/popup-anchor-controller.ts"],"names":[],"mappings":"AA2BA,MAAM,gBAAgB,GAAG,yBAAyB,CAAC;AAYnD,MAAM,OAAO,qBAAqB;IAMjC,YAAY,IAAiB,EAAE,UAA8B,EAAE;QAHvD,aAAQ,GAAmB,IAAI,CAAC;QAChC,0BAAqB,GAAG,KAAK,CAAC;QAYtC,6CAA6C;QAC7C,qBAAgB,GAAG,CAAC,KAAY,EAAQ,EAAE;YACzC,MAAM,IAAI,GAAG,KAAK,CAAC,MAAyB,CAAC;YAC7C,MAAM,OAAO,GAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAyB,IAAI,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"popup-anchor-controller.js","sourceRoot":"","sources":["../../src/utilities/popup-anchor-controller.ts"],"names":[],"mappings":"AA2BA,MAAM,gBAAgB,GAAG,yBAAyB,CAAC;AAYnD,MAAM,OAAO,qBAAqB;IAMjC,YAAY,IAAiB,EAAE,UAA8B,EAAE;QAHvD,aAAQ,GAAmB,IAAI,CAAC;QAChC,0BAAqB,GAAG,KAAK,CAAC;QAYtC,6CAA6C;QAC7C,qBAAgB,GAAG,CAAC,KAAY,EAAQ,EAAE;YACzC,MAAM,IAAI,GAAG,KAAK,CAAC,MAAyB,CAAC;YAC7C,mEAAmE;YACnE,+DAA+D;YAC/D,MAAM,OAAO,GAAI,IAAI,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAyB,IAAI,IAAI,CAAC;YACrI,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAC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,KAAiB;QAC5B,IAAI,CAAC,IAAI,CAAC,QAAQ;YAAE,OAAO,KAAK,CAAC;QACjC,0EAA0E;QAC1E,yEAAyE;QACzE,wEAAwE;QACxE,uEAAuE;QACvE,sEAAsE;QACtE,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,qBAAqB,CAAC;QAC/D,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC;QACnC,IAAI,oBAAoB,IAAI,IAAI,CAAC,QAAQ;YAAE,IAAI,CAAC,QAAQ,CAAC,kBAAkB,EAAE,CAAC;QAC9E,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,eAAe,CAAC;YAAE,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;QACrF,OAAO,IAAI,CAAC;IACb,CAAC;CACD"}
|
|
@@ -5,6 +5,8 @@ export type QueryMarkMode = 'match' | 'predictive';
|
|
|
5
5
|
* Returns the original string when no markers are present (cheap path).
|
|
6
6
|
*/
|
|
7
7
|
export declare function renderBold(text: string): TemplateResult | string;
|
|
8
|
+
/** The text of `**bold**` markdown without its markers, for an accessible name. */
|
|
9
|
+
export declare function stripBold(text: string): string;
|
|
8
10
|
/**
|
|
9
11
|
* Renders text with the query (or its complement) wrapped in `<b>`, based on `mode`.
|
|
10
12
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-marked.d.ts","sourceRoot":"","sources":["../../src/utilities/render-marked.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAEzD,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,YAAY,CAAC;AAEnD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,MAAM,CAIhE;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,eAAe,CAC9B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,aAA4B,GAChC,cAAc,GAAG,MAAM,GAAG,OAAO,OAAO,CAyB1C"}
|
|
1
|
+
{"version":3,"file":"render-marked.d.ts","sourceRoot":"","sources":["../../src/utilities/render-marked.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAEzD,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,YAAY,CAAC;AAEnD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,MAAM,CAIhE;AAED,mFAAmF;AACnF,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,eAAe,CAC9B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,aAA4B,GAChC,cAAc,GAAG,MAAM,GAAG,OAAO,OAAO,CAyB1C"}
|
|
@@ -9,6 +9,10 @@ export function renderBold(text) {
|
|
|
9
9
|
const parts = text.split(/\*\*(.+?)\*\*/g);
|
|
10
10
|
return html `${parts.map((part, i) => i % 2 === 1 ? html `<b>${part}</b>` : part)}`;
|
|
11
11
|
}
|
|
12
|
+
/** The text of `**bold**` markdown without its markers, for an accessible name. */
|
|
13
|
+
export function stripBold(text) {
|
|
14
|
+
return text.replace(/\*\*(.+?)\*\*/g, '$1');
|
|
15
|
+
}
|
|
12
16
|
/**
|
|
13
17
|
* Renders text with the query (or its complement) wrapped in `<b>`, based on `mode`.
|
|
14
18
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-marked.js","sourceRoot":"","sources":["../../src/utilities/render-marked.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAC;AAIzD;;;GAGG;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,MAAM,EAAE,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,KAAK,YAAY,EAAE,CAAC,CAAC;QAC/E,CAAC;QACD,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,KAAK,OAAO,EAAE,CAAC,CAAC;QACjF,MAAM,GAAG,GAAG,GAAG,CAAC,CAAC,MAAM,CAAC;IACzB,CAAC;IAED,OAAO,IAAI,CAAA,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;AAC7E,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
type Constructor<T = LitElement> = new (...args: any[]) => T;
|
|
3
|
+
/**
|
|
4
|
+
* Adds the `row-header` attribute to the cells that can say what a row is
|
|
5
|
+
* about: `nldd-cell`, `nldd-title-cell`, `nldd-text-cell` and
|
|
6
|
+
* `nldd-description-cell`.
|
|
7
|
+
*
|
|
8
|
+
* It is the `<th scope="row">` of an `nldd-table`. The cell itself does
|
|
9
|
+
* nothing with it: the `nldd-table-row` around it reads the attribute and
|
|
10
|
+
* gives that cell `role="rowheader"` instead of `role="cell"`, so a screen
|
|
11
|
+
* reader names the row when it reads any other cell in it. The row assigns
|
|
12
|
+
* every cell role already, which is why the decision stays there.
|
|
13
|
+
*
|
|
14
|
+
* It sits on the cell rather than on the row, because a cell is what a header
|
|
15
|
+
* is in HTML too, and because a column index on the row breaks as soon as a
|
|
16
|
+
* column is hidden at a breakpoint or reordered. It is a mixin so it works the
|
|
17
|
+
* same on every cell variant, and the variant still decides how the cell
|
|
18
|
+
* looks: a row header gets no styling of its own.
|
|
19
|
+
*
|
|
20
|
+
* In a header row (`slot="header"`) the attribute is ignored and the cell
|
|
21
|
+
* stays a `columnheader`. Outside an `nldd-table` it does nothing.
|
|
22
|
+
*
|
|
23
|
+
* @mixin RowHeaderMixin
|
|
24
|
+
*
|
|
25
|
+
* @attr {boolean} row-header - In an `nldd-table`, makes this cell the header of its row (role="rowheader" instead of "cell"). Semantics only: the cell looks the same. Ignored in a header row.
|
|
26
|
+
*/
|
|
27
|
+
export declare function RowHeaderMixin<TBase extends Constructor<LitElement>>(Base: TBase): TBase & Constructor<LitElement & {
|
|
28
|
+
rowHeader: boolean;
|
|
29
|
+
}>;
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=row-header-mixin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row-header-mixin.d.ts","sourceRoot":"","sources":["../../src/utilities/row-header-mixin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAEjC,KAAK,WAAW,CAAC,CAAC,GAAG,UAAU,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,cAAc,CAAC,KAAK,SAAS,WAAW,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,KAAK,GAK7C,KAAK,GACvC,WAAW,CAAC,UAAU,GAAG;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,CAAC,CACjD"}
|
|
@@ -0,0 +1,44 @@
|
|
|
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 { property } from 'lit/decorators.js';
|
|
8
|
+
/**
|
|
9
|
+
* Adds the `row-header` attribute to the cells that can say what a row is
|
|
10
|
+
* about: `nldd-cell`, `nldd-title-cell`, `nldd-text-cell` and
|
|
11
|
+
* `nldd-description-cell`.
|
|
12
|
+
*
|
|
13
|
+
* It is the `<th scope="row">` of an `nldd-table`. The cell itself does
|
|
14
|
+
* nothing with it: the `nldd-table-row` around it reads the attribute and
|
|
15
|
+
* gives that cell `role="rowheader"` instead of `role="cell"`, so a screen
|
|
16
|
+
* reader names the row when it reads any other cell in it. The row assigns
|
|
17
|
+
* every cell role already, which is why the decision stays there.
|
|
18
|
+
*
|
|
19
|
+
* It sits on the cell rather than on the row, because a cell is what a header
|
|
20
|
+
* is in HTML too, and because a column index on the row breaks as soon as a
|
|
21
|
+
* column is hidden at a breakpoint or reordered. It is a mixin so it works the
|
|
22
|
+
* same on every cell variant, and the variant still decides how the cell
|
|
23
|
+
* looks: a row header gets no styling of its own.
|
|
24
|
+
*
|
|
25
|
+
* In a header row (`slot="header"`) the attribute is ignored and the cell
|
|
26
|
+
* stays a `columnheader`. Outside an `nldd-table` it does nothing.
|
|
27
|
+
*
|
|
28
|
+
* @mixin RowHeaderMixin
|
|
29
|
+
*
|
|
30
|
+
* @attr {boolean} row-header - In an `nldd-table`, makes this cell the header of its row (role="rowheader" instead of "cell"). Semantics only: the cell looks the same. Ignored in a header row.
|
|
31
|
+
*/
|
|
32
|
+
export function RowHeaderMixin(Base) {
|
|
33
|
+
class WithRowHeader extends Base {
|
|
34
|
+
constructor() {
|
|
35
|
+
super(...arguments);
|
|
36
|
+
this.rowHeader = false;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
__decorate([
|
|
40
|
+
property({ type: Boolean, reflect: true, attribute: 'row-header' })
|
|
41
|
+
], WithRowHeader.prototype, "rowHeader", void 0);
|
|
42
|
+
return WithRowHeader;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=row-header-mixin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row-header-mixin.js","sourceRoot":"","sources":["../../src/utilities/row-header-mixin.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAK7C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,cAAc,CAAwC,IAAW;IAChF,MAAM,aAAc,SAAQ,IAAI;QAAhC;;YAEC,cAAS,GAAG,KAAK,CAAC;QACnB,CAAC;KAAA;IADA;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;oDAClD;IAEnB,OAAO,aAC0C,CAAC;AACnD,CAAC"}
|
package/lint/cli.js
CHANGED
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
* The `nldd` command. One bin, so `npx @nldd/design-system lint` runs it too.
|
|
4
4
|
*
|
|
5
5
|
* This file stays small: most of a run is Node starting and compiling, so the
|
|
6
|
-
* compile cache goes first, before anything else is loaded. Node
|
|
6
|
+
* compile cache goes first, before anything else is loaded. Node 20 goes on
|
|
7
7
|
* without it.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import module from 'node:module';
|
|
11
|
-
import util from 'node:util';
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
const [major, minor] = process.versions.node.split('.').map(Number);
|
|
13
|
+
if (major < 20 || (major === 20 && minor < 19)) {
|
|
14
|
+
console.error('nldd needs Node 20.19 or newer.');
|
|
15
15
|
process.exit(2);
|
|
16
16
|
}
|
|
17
17
|
module.enableCompileCache?.();
|