@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,485 @@
|
|
|
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
|
+
/**
|
|
8
|
+
* Nederlandse Digitale Dienst Swatch Picker Component (Lit + TypeScript)
|
|
9
|
+
*
|
|
10
|
+
* A row of swatches to choose one from: a color, or an image of a pattern or a
|
|
11
|
+
* material. The row wraps onto the next line when the swatches do not fit.
|
|
12
|
+
*
|
|
13
|
+
* It is a radio group: Tab enters and leaves it in one stop, the arrow keys
|
|
14
|
+
* choose, and the value goes with a form under `name`. The chosen swatch shows
|
|
15
|
+
* a check mark. Put it in an `nldd-form-field`, which names the group.
|
|
16
|
+
*
|
|
17
|
+
* Every swatch needs a name, since a color or an image says nothing to a screen
|
|
18
|
+
* reader. A swatch with a category `color` takes the name of that color from
|
|
19
|
+
* the translations ("Rood"); one with a `custom-color` or an `image` has to say
|
|
20
|
+
* it in `text`. The name shows as a tooltip.
|
|
21
|
+
*
|
|
22
|
+
* Exports both NLDDSwatchPicker and NLDDSwatchPickerItem.
|
|
23
|
+
*
|
|
24
|
+
* @element nldd-swatch-picker
|
|
25
|
+
* @attr {string} size - Swatch size, on the control scale: 'xs' (24px) | 'sm' (32px) | 'md' (44px) (default: 'md')
|
|
26
|
+
* @attr {string} accessible-label - Accessible name for the group, set as aria-label. In an nldd-form-field the field names it.
|
|
27
|
+
* @attr {string} accessible-labeled-by - Id of an external label element, set as aria-labelledby on the group
|
|
28
|
+
* @attr {boolean} invalid - Marks the group as invalid. Announced with aria-invalid; nothing is drawn for it.
|
|
29
|
+
* @attr {boolean} disabled - Disabled state for all swatches
|
|
30
|
+
* @attr {string} name - Name for form submission
|
|
31
|
+
* @attr {string} value - Value of the chosen swatch
|
|
32
|
+
* @attr {boolean} required - Something has to be chosen
|
|
33
|
+
*
|
|
34
|
+
* @fires change - When the choice changes; detail: { value: string }
|
|
35
|
+
*
|
|
36
|
+
* @slot - nldd-swatch-picker-item elements
|
|
37
|
+
*
|
|
38
|
+
* ---
|
|
39
|
+
*
|
|
40
|
+
* @element nldd-swatch-picker-item
|
|
41
|
+
* @attr {string} color - Category color: 'lintblauw' | 'donkerblauw' | 'hemelblauw' | 'lichtblauw' | 'paars' | 'violet' | 'robijnrood' | 'roze' | 'rood' | 'oranje' | 'donkergeel' | 'geel' | 'donkerbruin' | 'bruin' | 'donkergroen' | 'groen' | 'mosgroen' | 'mintgroen'. Brings its name along, so `text` is optional.
|
|
42
|
+
* @attr {string} custom-color - Any CSS color of your own (e.g. '#7a1f3d' or 'var(--brand-color)'), for a color outside the categories. Needs `text`.
|
|
43
|
+
* @attr {string} image - URL of an image that fills the swatch, for a pattern or a material. Needs `text`.
|
|
44
|
+
* @attr {string} image-srcset - Sources of the image at other pixel densities, with x descriptors (e.g. '/oak.jpg 1x, /oak@2x.jpg 2x'). The swatch has a fixed size, so there are no widths to choose from.
|
|
45
|
+
* @attr {string} text - Name of the swatch, for screen readers and the tooltip. Overrides the name of a category `color`.
|
|
46
|
+
* @attr {boolean} selected - Whether this swatch is chosen (set by the picker)
|
|
47
|
+
* @attr {boolean} disabled - Disabled state
|
|
48
|
+
* @attr {string} value - Value for this swatch
|
|
49
|
+
* @attr {string} size - Swatch size: 'xs' | 'sm' | 'md' (set by the picker, default: 'md')
|
|
50
|
+
* @attr {object} translations - Override translation keys (the names of the category colors); unset keys fall back to Dutch.
|
|
51
|
+
*/
|
|
52
|
+
import { LitElement } from 'lit';
|
|
53
|
+
import { property, state } from 'lit/decorators.js';
|
|
54
|
+
import { customElement } from '../../../utilities/custom-element.js';
|
|
55
|
+
import { FormAssociated } from '../../../utilities/form-associated-mixin.js';
|
|
56
|
+
import { reflectNonDefault } from '../../../utilities/reflect-non-default.js';
|
|
57
|
+
import { radioPositions } from '../../../utilities/radio-position.js';
|
|
58
|
+
import { setOwnedAttribute } from '../../../utilities/owned-attribute.js';
|
|
59
|
+
import { submitOnEnter } from '../../../utilities/implicit-submission.js';
|
|
60
|
+
import { deferFocus } from '../../../utilities/defer-focus.js';
|
|
61
|
+
import { withTranslations } from '../../../utilities/with-translations.js';
|
|
62
|
+
import { swatchPickerStyles, swatchPickerItemStyles } from './swatch-picker.styles.js';
|
|
63
|
+
import { swatchPickerTemplate, swatchPickerItemTemplate } from './swatch-picker.template.js';
|
|
64
|
+
import { nlddSwatchPickerItemTranslations } from './swatch-picker.i18n.js';
|
|
65
|
+
import '../../content/icon/icon.js';
|
|
66
|
+
/** How long the name stays after a tap, in ms. */
|
|
67
|
+
const NAME_AFTER_TAP_MS = 1500;
|
|
68
|
+
// # nldd-swatch-picker-item
|
|
69
|
+
let NLDDSwatchPickerItem = class NLDDSwatchPickerItem extends withTranslations(LitElement, nlddSwatchPickerItemTranslations) {
|
|
70
|
+
constructor() {
|
|
71
|
+
super(...arguments);
|
|
72
|
+
this.color = '';
|
|
73
|
+
this.customColor = '';
|
|
74
|
+
this.image = '';
|
|
75
|
+
this.imageSrcset = '';
|
|
76
|
+
this.text = '';
|
|
77
|
+
this.selected = false;
|
|
78
|
+
this.disabled = false;
|
|
79
|
+
this.value = '';
|
|
80
|
+
/** Set by nldd-swatch-picker. Not part of the public API. */
|
|
81
|
+
this.size = 'md';
|
|
82
|
+
/** Set by nldd-swatch-picker: this swatch's place in the group, which it
|
|
83
|
+
* cannot count by itself. */
|
|
84
|
+
this._groupPosition = null;
|
|
85
|
+
/** The aria-label this swatch wrote on itself, so it only takes back its own. */
|
|
86
|
+
this._appliedLabel = null;
|
|
87
|
+
/** Ends the name shown after a tap. */
|
|
88
|
+
this._nameTimer = 0;
|
|
89
|
+
/** The pointer of the last press, so a click knows how to keep the name. */
|
|
90
|
+
this._pointerType = '';
|
|
91
|
+
this._onFocus = () => {
|
|
92
|
+
this._tooltip?._handleFocusIn();
|
|
93
|
+
};
|
|
94
|
+
this._onBlur = () => {
|
|
95
|
+
this._tooltip?._handleTriggerLeave();
|
|
96
|
+
};
|
|
97
|
+
this._onClick = () => {
|
|
98
|
+
this._select();
|
|
99
|
+
this._showName();
|
|
100
|
+
};
|
|
101
|
+
this._onPointerDown = (e) => {
|
|
102
|
+
this._pointerType = e.pointerType;
|
|
103
|
+
// Before the click, which closes a tooltip that is not held open: held
|
|
104
|
+
// already, the hovered name stays where it is instead of flickering.
|
|
105
|
+
if (e.pointerType !== 'touch')
|
|
106
|
+
this._showName();
|
|
107
|
+
};
|
|
108
|
+
this._onPointerLeave = (e) => {
|
|
109
|
+
if (e.pointerType !== 'touch')
|
|
110
|
+
this._hideName();
|
|
111
|
+
};
|
|
112
|
+
this._onScroll = () => {
|
|
113
|
+
this._hideName();
|
|
114
|
+
};
|
|
115
|
+
this._onKeyDown = (e) => {
|
|
116
|
+
if (this.disabled)
|
|
117
|
+
return;
|
|
118
|
+
// Space is the key a radio answers to itself. The arrow keys and Enter
|
|
119
|
+
// belong to the group: it knows the form.
|
|
120
|
+
if (e.key === ' ') {
|
|
121
|
+
e.preventDefault();
|
|
122
|
+
this._select();
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
/** The name of the swatch: its own text, or that of its category color. */
|
|
127
|
+
get _name() {
|
|
128
|
+
if (this.text)
|
|
129
|
+
return this.text;
|
|
130
|
+
if (!this.color)
|
|
131
|
+
return '';
|
|
132
|
+
return this._t(`components.swatch-picker-item.${this.color}-text`);
|
|
133
|
+
}
|
|
134
|
+
connectedCallback() {
|
|
135
|
+
super.connectedCallback();
|
|
136
|
+
this.addEventListener('pointerdown', this._onPointerDown);
|
|
137
|
+
this.addEventListener('pointerleave', this._onPointerLeave);
|
|
138
|
+
this.addEventListener('click', this._onClick);
|
|
139
|
+
this.addEventListener('keydown', this._onKeyDown);
|
|
140
|
+
this.addEventListener('focus', this._onFocus);
|
|
141
|
+
this.addEventListener('blur', this._onBlur);
|
|
142
|
+
}
|
|
143
|
+
disconnectedCallback() {
|
|
144
|
+
super.disconnectedCallback();
|
|
145
|
+
this.removeEventListener('pointerdown', this._onPointerDown);
|
|
146
|
+
this.removeEventListener('pointerleave', this._onPointerLeave);
|
|
147
|
+
this.removeEventListener('click', this._onClick);
|
|
148
|
+
this.removeEventListener('keydown', this._onKeyDown);
|
|
149
|
+
this.removeEventListener('focus', this._onFocus);
|
|
150
|
+
this.removeEventListener('blur', this._onBlur);
|
|
151
|
+
this._hideName();
|
|
152
|
+
}
|
|
153
|
+
updated(changedProperties) {
|
|
154
|
+
if (changedProperties.has('customColor')) {
|
|
155
|
+
if (this.customColor && CSS.supports('color', this.customColor)) {
|
|
156
|
+
this.style.setProperty('--_swatch-picker-item-custom-color', this.customColor);
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
this.style.removeProperty('--_swatch-picker-item-custom-color');
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
this._syncAria();
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* The swatch is the radio itself. A native radio in a shadow root of its own
|
|
166
|
+
* is a group of one: a screen reader counts it as "1 of 1" and Tab stops at
|
|
167
|
+
* every option. The role on the element puts the group back in one tree,
|
|
168
|
+
* under the radiogroup the picker carries.
|
|
169
|
+
*/
|
|
170
|
+
_syncAria() {
|
|
171
|
+
this.setAttribute('role', 'radio');
|
|
172
|
+
this.setAttribute('aria-checked', String(this.selected));
|
|
173
|
+
this._appliedLabel = setOwnedAttribute(this, 'aria-label', this._name, this._appliedLabel);
|
|
174
|
+
if (this.disabled)
|
|
175
|
+
this.setAttribute('aria-disabled', 'true');
|
|
176
|
+
else
|
|
177
|
+
this.removeAttribute('aria-disabled');
|
|
178
|
+
const position = this._groupPosition;
|
|
179
|
+
if (position) {
|
|
180
|
+
this.setAttribute('aria-posinset', String(position.posInSet));
|
|
181
|
+
this.setAttribute('aria-setsize', String(position.setSize));
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
this.removeAttribute('aria-posinset');
|
|
185
|
+
this.removeAttribute('aria-setsize');
|
|
186
|
+
}
|
|
187
|
+
// A disabled option is not in the tab order, as a native one is not.
|
|
188
|
+
const tabbable = !this.disabled && position?.tabbable !== false;
|
|
189
|
+
this.setAttribute('tabindex', tabbable ? '0' : '-1');
|
|
190
|
+
}
|
|
191
|
+
/** The tooltip, which shows itself when focus moves into it. The focus is on
|
|
192
|
+
* this element, outside it, so it hears about focus from here. */
|
|
193
|
+
get _tooltip() {
|
|
194
|
+
return this.shadowRoot?.querySelector('nldd-tooltip') ?? null;
|
|
195
|
+
}
|
|
196
|
+
/** Chosen, the way a click, the space bar or an arrow key in the group does
|
|
197
|
+
* it. A radio never unchecks itself, so a chosen swatch says nothing.
|
|
198
|
+
*
|
|
199
|
+
* @internal */
|
|
200
|
+
_select() {
|
|
201
|
+
if (this.disabled || this.selected)
|
|
202
|
+
return;
|
|
203
|
+
this.dispatchEvent(new CustomEvent('item-change', {
|
|
204
|
+
detail: { value: this.value },
|
|
205
|
+
bubbles: true,
|
|
206
|
+
composed: true,
|
|
207
|
+
}));
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Keeps the name in view after a click or a tap: a click hides a tooltip,
|
|
211
|
+
* and a tap never shows one, while the name is the only label a swatch has.
|
|
212
|
+
* After a click it stays until the pointer leaves the swatch. After a tap it
|
|
213
|
+
* stays a moment, clear of the finger.
|
|
214
|
+
*/
|
|
215
|
+
_showName() {
|
|
216
|
+
const tooltip = this._tooltip;
|
|
217
|
+
if (!tooltip || !this._name)
|
|
218
|
+
return;
|
|
219
|
+
tooltip.open = true;
|
|
220
|
+
clearTimeout(this._nameTimer);
|
|
221
|
+
this._nameTimer = this._pointerType === 'touch'
|
|
222
|
+
? window.setTimeout(() => this._hideName(), NAME_AFTER_TAP_MS)
|
|
223
|
+
: 0;
|
|
224
|
+
// Held for the pointer, so it goes the way a hover does: on a scroll too.
|
|
225
|
+
document.addEventListener('scroll', this._onScroll, { capture: true, passive: true });
|
|
226
|
+
}
|
|
227
|
+
_hideName() {
|
|
228
|
+
document.removeEventListener('scroll', this._onScroll, { capture: true });
|
|
229
|
+
clearTimeout(this._nameTimer);
|
|
230
|
+
this._nameTimer = 0;
|
|
231
|
+
const tooltip = this._tooltip;
|
|
232
|
+
if (tooltip)
|
|
233
|
+
tooltip.open = false;
|
|
234
|
+
}
|
|
235
|
+
focus(options) {
|
|
236
|
+
if (deferFocus(this, options))
|
|
237
|
+
return;
|
|
238
|
+
super.focus(options);
|
|
239
|
+
}
|
|
240
|
+
render() {
|
|
241
|
+
return swatchPickerItemTemplate(this);
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
NLDDSwatchPickerItem.styles = swatchPickerItemStyles;
|
|
245
|
+
__decorate([
|
|
246
|
+
property({ reflect: true, converter: reflectNonDefault('') })
|
|
247
|
+
], NLDDSwatchPickerItem.prototype, "color", void 0);
|
|
248
|
+
__decorate([
|
|
249
|
+
property({ reflect: true, attribute: 'custom-color', converter: reflectNonDefault('') })
|
|
250
|
+
], NLDDSwatchPickerItem.prototype, "customColor", void 0);
|
|
251
|
+
__decorate([
|
|
252
|
+
property({ type: String })
|
|
253
|
+
], NLDDSwatchPickerItem.prototype, "image", void 0);
|
|
254
|
+
__decorate([
|
|
255
|
+
property({ type: String, attribute: 'image-srcset' })
|
|
256
|
+
], NLDDSwatchPickerItem.prototype, "imageSrcset", void 0);
|
|
257
|
+
__decorate([
|
|
258
|
+
property({ reflect: true, converter: reflectNonDefault('') })
|
|
259
|
+
], NLDDSwatchPickerItem.prototype, "text", void 0);
|
|
260
|
+
__decorate([
|
|
261
|
+
property({ type: Boolean, reflect: true })
|
|
262
|
+
], NLDDSwatchPickerItem.prototype, "selected", void 0);
|
|
263
|
+
__decorate([
|
|
264
|
+
property({ type: Boolean, reflect: true })
|
|
265
|
+
], NLDDSwatchPickerItem.prototype, "disabled", void 0);
|
|
266
|
+
__decorate([
|
|
267
|
+
property({ type: String })
|
|
268
|
+
], NLDDSwatchPickerItem.prototype, "value", void 0);
|
|
269
|
+
__decorate([
|
|
270
|
+
property({ reflect: true, converter: reflectNonDefault('md') })
|
|
271
|
+
], NLDDSwatchPickerItem.prototype, "size", void 0);
|
|
272
|
+
__decorate([
|
|
273
|
+
state()
|
|
274
|
+
], NLDDSwatchPickerItem.prototype, "_groupPosition", void 0);
|
|
275
|
+
NLDDSwatchPickerItem = __decorate([
|
|
276
|
+
customElement('nldd-swatch-picker-item')
|
|
277
|
+
], NLDDSwatchPickerItem);
|
|
278
|
+
export { NLDDSwatchPickerItem };
|
|
279
|
+
// # nldd-swatch-picker
|
|
280
|
+
let NLDDSwatchPicker = class NLDDSwatchPicker extends FormAssociated(LitElement) {
|
|
281
|
+
constructor() {
|
|
282
|
+
super(...arguments);
|
|
283
|
+
this.size = 'md';
|
|
284
|
+
this.accessibleLabel = '';
|
|
285
|
+
this.accessibleLabeledBy = '';
|
|
286
|
+
/**
|
|
287
|
+
* Marks the group as invalid. Announced and not drawn, and on the group: a
|
|
288
|
+
* red ring around one swatch would say that swatch is wrong, while it is the
|
|
289
|
+
* question that is unanswered.
|
|
290
|
+
*/
|
|
291
|
+
this.invalid = false;
|
|
292
|
+
this.disabled = false;
|
|
293
|
+
this.name = '';
|
|
294
|
+
this.value = '';
|
|
295
|
+
/** Something has to be chosen. Carried by a hidden radio of the group's own,
|
|
296
|
+
* checked as soon as anything is chosen, so the browser writes the message. */
|
|
297
|
+
this.required = false;
|
|
298
|
+
this._initialValue = '';
|
|
299
|
+
/** The name this group wrote onto its host, so it only takes back its own. */
|
|
300
|
+
this._appliedLabel = null;
|
|
301
|
+
this._handleItemChange = (e) => {
|
|
302
|
+
e.stopPropagation();
|
|
303
|
+
if (this.disabled || e.detail.value === this.value)
|
|
304
|
+
return;
|
|
305
|
+
this.value = e.detail.value;
|
|
306
|
+
this._syncItems();
|
|
307
|
+
this.commitFormValue();
|
|
308
|
+
this.dispatchEvent(new CustomEvent('change', {
|
|
309
|
+
detail: { value: this.value },
|
|
310
|
+
bubbles: true,
|
|
311
|
+
composed: true,
|
|
312
|
+
}));
|
|
313
|
+
};
|
|
314
|
+
this._handleKeydown = (e) => {
|
|
315
|
+
if (this.disabled)
|
|
316
|
+
return;
|
|
317
|
+
// Enter on a radio submits the form it belongs to, and the group is what
|
|
318
|
+
// the form knows.
|
|
319
|
+
if (e.key === 'Enter') {
|
|
320
|
+
submitOnEnter(this, e);
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
const items = this._getItems().filter((item) => !item.disabled);
|
|
324
|
+
if (items.length === 0)
|
|
325
|
+
return;
|
|
326
|
+
const current = items.findIndex((item) => item.selected);
|
|
327
|
+
let next;
|
|
328
|
+
switch (e.key) {
|
|
329
|
+
case 'ArrowLeft':
|
|
330
|
+
case 'ArrowUp':
|
|
331
|
+
next = current <= 0 ? items.length - 1 : current - 1;
|
|
332
|
+
break;
|
|
333
|
+
case 'ArrowRight':
|
|
334
|
+
case 'ArrowDown':
|
|
335
|
+
next = current >= items.length - 1 ? 0 : current + 1;
|
|
336
|
+
break;
|
|
337
|
+
case 'Home':
|
|
338
|
+
next = 0;
|
|
339
|
+
break;
|
|
340
|
+
case 'End':
|
|
341
|
+
next = items.length - 1;
|
|
342
|
+
break;
|
|
343
|
+
default:
|
|
344
|
+
return;
|
|
345
|
+
}
|
|
346
|
+
e.preventDefault();
|
|
347
|
+
if (next === current || !items[next])
|
|
348
|
+
return;
|
|
349
|
+
items[next].focus();
|
|
350
|
+
// Through the swatch, as a click: it fires item-change, and the group
|
|
351
|
+
// answers with change, so every way of choosing sends both.
|
|
352
|
+
items[next]._select();
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
connectedCallback() {
|
|
356
|
+
super.connectedCallback();
|
|
357
|
+
this.setAttribute('role', 'radiogroup');
|
|
358
|
+
this.addEventListener('item-change', this._handleItemChange);
|
|
359
|
+
this.addEventListener('keydown', this._handleKeydown);
|
|
360
|
+
}
|
|
361
|
+
disconnectedCallback() {
|
|
362
|
+
super.disconnectedCallback();
|
|
363
|
+
this.removeEventListener('item-change', this._handleItemChange);
|
|
364
|
+
this.removeEventListener('keydown', this._handleKeydown);
|
|
365
|
+
}
|
|
366
|
+
firstUpdated() {
|
|
367
|
+
this._syncItems();
|
|
368
|
+
this._initialValue = this.value;
|
|
369
|
+
}
|
|
370
|
+
formValue() {
|
|
371
|
+
return this.value || null;
|
|
372
|
+
}
|
|
373
|
+
formResetCallback() {
|
|
374
|
+
this.value = this._initialValue;
|
|
375
|
+
}
|
|
376
|
+
formStateRestoreCallback(state) {
|
|
377
|
+
if (typeof state === 'string')
|
|
378
|
+
this.value = state;
|
|
379
|
+
}
|
|
380
|
+
/** The group has no focus of its own, so an invalid submit lands where Tab
|
|
381
|
+
* would: on the chosen swatch, or the first one that is enabled. */
|
|
382
|
+
validationAnchor() {
|
|
383
|
+
const items = this._getItems().filter((item) => !item.disabled);
|
|
384
|
+
return items.find((item) => item.selected) ?? items[0];
|
|
385
|
+
}
|
|
386
|
+
updated(changedProperties) {
|
|
387
|
+
if (changedProperties.has('value') ||
|
|
388
|
+
changedProperties.has('size') ||
|
|
389
|
+
changedProperties.has('disabled') ||
|
|
390
|
+
changedProperties.has('required') ||
|
|
391
|
+
changedProperties.has('invalid')) {
|
|
392
|
+
this._syncItems();
|
|
393
|
+
}
|
|
394
|
+
if (changedProperties.has('value'))
|
|
395
|
+
this.commitFormValue();
|
|
396
|
+
if (changedProperties.has('accessibleLabel')) {
|
|
397
|
+
this._appliedLabel = setOwnedAttribute(this, 'aria-label', this.accessibleLabel, this._appliedLabel);
|
|
398
|
+
}
|
|
399
|
+
if (changedProperties.has('accessibleLabeledBy')) {
|
|
400
|
+
if (this.accessibleLabeledBy)
|
|
401
|
+
this.setAttribute('aria-labelledby', this.accessibleLabeledBy);
|
|
402
|
+
else
|
|
403
|
+
this.removeAttribute('aria-labelledby');
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
_getItems() {
|
|
407
|
+
const slot = this.shadowRoot?.querySelector('slot');
|
|
408
|
+
if (!slot)
|
|
409
|
+
return [];
|
|
410
|
+
return slot
|
|
411
|
+
.assignedElements()
|
|
412
|
+
.filter((el) => el.localName === 'nldd-swatch-picker-item');
|
|
413
|
+
}
|
|
414
|
+
_syncItems() {
|
|
415
|
+
const items = this._getItems();
|
|
416
|
+
this.toggleAttribute('aria-required', this.required);
|
|
417
|
+
if (this.invalid)
|
|
418
|
+
this.setAttribute('aria-invalid', 'true');
|
|
419
|
+
else
|
|
420
|
+
this.removeAttribute('aria-invalid');
|
|
421
|
+
for (const item of items) {
|
|
422
|
+
if (this.disabled && !item.hasAttribute('disabled')) {
|
|
423
|
+
item.setAttribute('group-disabled', '');
|
|
424
|
+
item.disabled = true;
|
|
425
|
+
}
|
|
426
|
+
else if (!this.disabled && item.hasAttribute('group-disabled')) {
|
|
427
|
+
item.removeAttribute('group-disabled');
|
|
428
|
+
item.disabled = false;
|
|
429
|
+
}
|
|
430
|
+
item.size = this.size;
|
|
431
|
+
item.selected = !!this.value && item.value === this.value;
|
|
432
|
+
}
|
|
433
|
+
const positions = radioPositions(items, (item) => item.selected, (item) => item.disabled);
|
|
434
|
+
items.forEach((item, index) => {
|
|
435
|
+
item._groupPosition = positions[index] ?? null;
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
/** @internal */
|
|
439
|
+
_onSlotChange() {
|
|
440
|
+
this._syncItems();
|
|
441
|
+
}
|
|
442
|
+
/** Focus goes to the chosen swatch, or the first enabled one: where Tab lands. */
|
|
443
|
+
focus(options) {
|
|
444
|
+
if (deferFocus(this, options))
|
|
445
|
+
return;
|
|
446
|
+
const items = this._getItems().filter((item) => !item.disabled);
|
|
447
|
+
(items.find((item) => item.selected) ?? items[0])?.focus(options);
|
|
448
|
+
}
|
|
449
|
+
render() {
|
|
450
|
+
return swatchPickerTemplate(this);
|
|
451
|
+
}
|
|
452
|
+
};
|
|
453
|
+
NLDDSwatchPicker.styles = swatchPickerStyles;
|
|
454
|
+
/** Says this is the control an nldd-form-field is about, so the field can
|
|
455
|
+
* find it, name it and move focus into it. See nldd-form-field. */
|
|
456
|
+
NLDDSwatchPicker.isFormInput = true;
|
|
457
|
+
__decorate([
|
|
458
|
+
property({ reflect: true, converter: reflectNonDefault('md') })
|
|
459
|
+
], NLDDSwatchPicker.prototype, "size", void 0);
|
|
460
|
+
__decorate([
|
|
461
|
+
property({ type: String, attribute: 'accessible-label' })
|
|
462
|
+
], NLDDSwatchPicker.prototype, "accessibleLabel", void 0);
|
|
463
|
+
__decorate([
|
|
464
|
+
property({ type: String, attribute: 'accessible-labeled-by' })
|
|
465
|
+
], NLDDSwatchPicker.prototype, "accessibleLabeledBy", void 0);
|
|
466
|
+
__decorate([
|
|
467
|
+
property({ type: Boolean, reflect: true })
|
|
468
|
+
], NLDDSwatchPicker.prototype, "invalid", void 0);
|
|
469
|
+
__decorate([
|
|
470
|
+
property({ type: Boolean, reflect: true })
|
|
471
|
+
], NLDDSwatchPicker.prototype, "disabled", void 0);
|
|
472
|
+
__decorate([
|
|
473
|
+
property({ reflect: true, converter: reflectNonDefault('') })
|
|
474
|
+
], NLDDSwatchPicker.prototype, "name", void 0);
|
|
475
|
+
__decorate([
|
|
476
|
+
property({ type: String, reflect: true })
|
|
477
|
+
], NLDDSwatchPicker.prototype, "value", void 0);
|
|
478
|
+
__decorate([
|
|
479
|
+
property({ type: Boolean, reflect: true })
|
|
480
|
+
], NLDDSwatchPicker.prototype, "required", void 0);
|
|
481
|
+
NLDDSwatchPicker = __decorate([
|
|
482
|
+
customElement('nldd-swatch-picker')
|
|
483
|
+
], NLDDSwatchPicker);
|
|
484
|
+
export { NLDDSwatchPicker };
|
|
485
|
+
//# sourceMappingURL=swatch-picker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swatch-picker.js","sourceRoot":"","sources":["../../../../src/components/inputs/swatch-picker/swatch-picker.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAkB,MAAM,6CAA6C,CAAC;AAC7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAsB,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,aAA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