@nldd/design-system 0.8.93 → 0.8.94
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 +21 -1
- package/README.md +3 -3
- package/custom-elements.json +575 -96
- package/dist/components/actions/button/button.d.ts +8 -5
- package/dist/components/actions/button/button.d.ts.map +1 -1
- package/dist/components/actions/button/button.js +11 -5
- package/dist/components/actions/button/button.js.map +1 -1
- package/dist/components/actions/button/button.styles.d.ts.map +1 -1
- package/dist/components/actions/button/button.styles.js +41 -73
- package/dist/components/actions/button/button.styles.js.map +1 -1
- package/dist/components/actions/button/button.template.d.ts.map +1 -1
- package/dist/components/actions/button/button.template.js +1 -0
- package/dist/components/actions/button/button.template.js.map +1 -1
- package/dist/components/actions/button-bar/button-bar.d.ts +11 -4
- package/dist/components/actions/button-bar/button-bar.d.ts.map +1 -1
- package/dist/components/actions/button-bar/button-bar.js +25 -9
- package/dist/components/actions/button-bar/button-bar.js.map +1 -1
- package/dist/components/actions/button-bar/button-bar.styles.d.ts.map +1 -1
- package/dist/components/actions/button-bar/button-bar.styles.js +18 -3
- package/dist/components/actions/button-bar/button-bar.styles.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.d.ts +8 -5
- package/dist/components/actions/icon-button/icon-button.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.js +11 -5
- package/dist/components/actions/icon-button/icon-button.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.styles.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.styles.js +35 -61
- package/dist/components/actions/icon-button/icon-button.styles.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 +1 -0
- package/dist/components/actions/icon-button/icon-button.template.js.map +1 -1
- package/dist/components/actions/menu/menu.d.ts +17 -2
- package/dist/components/actions/menu/menu.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.js +34 -11
- package/dist/components/actions/menu/menu.js.map +1 -1
- package/dist/components/actions/menu/menu.template.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.template.js +5 -3
- package/dist/components/actions/menu/menu.template.js.map +1 -1
- package/dist/components/actions/split-button/split-button.d.ts +2 -2
- package/dist/components/actions/split-button/split-button.d.ts.map +1 -1
- package/dist/components/actions/split-button/split-button.js +5 -4
- 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 +18 -3
- package/dist/components/actions/split-button/split-button.styles.js.map +1 -1
- package/dist/components/actions/split-button/split-button.template.js +2 -2
- package/dist/components/actions/split-button/split-button.template.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar.js +3 -2
- package/dist/components/actions/toolbar/toolbar.js.map +1 -1
- package/dist/components/components.js +1132 -461
- package/dist/components/content/avatar/avatar.js +1 -1
- package/dist/components/content/avatar/avatar.js.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.d.ts +2 -2
- package/dist/components/content/code-viewer/code-viewer.d.ts.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.js +10 -6
- package/dist/components/content/code-viewer/code-viewer.js.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.styles.js +6 -6
- package/dist/components/content/image/image.d.ts.map +1 -1
- package/dist/components/content/image/image.js +2 -1
- package/dist/components/content/image/image.js.map +1 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.d.ts +3 -3
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.d.ts.map +1 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.js +3 -3
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.js +7 -7
- package/dist/components/content/rich-text/rich-text.d.ts +2 -0
- package/dist/components/content/rich-text/rich-text.d.ts.map +1 -1
- package/dist/components/content/rich-text/rich-text.js +8 -1
- package/dist/components/content/rich-text/rich-text.js.map +1 -1
- package/dist/components/content/text/text.styles.d.ts.map +1 -1
- package/dist/components/content/text/text.styles.js +1 -0
- package/dist/components/content/text/text.styles.js.map +1 -1
- package/dist/components/content/token/token.d.ts.map +1 -1
- package/dist/components/content/token/token.js +2 -1
- package/dist/components/content/token/token.js.map +1 -1
- package/dist/components/content/token/token.template.js +2 -2
- package/dist/components/forms/form-actions/form-actions.d.ts +1 -1
- package/dist/components/forms/form-actions/form-actions.js +1 -1
- package/dist/components/{icon-button-hO6k8W63.js → icon-button-DHzLMmj0.js} +45 -67
- package/dist/components/index.d.ts +1 -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/code-editor/code-editor.d.ts +5 -5
- package/dist/components/inputs/code-editor/code-editor.d.ts.map +1 -1
- package/dist/components/inputs/code-editor/code-editor.js +5 -5
- package/dist/components/inputs/code-editor/code-editor.js.map +1 -1
- package/dist/components/inputs/code-editor/code-editor.styles.js +3 -3
- package/dist/components/inputs/combo-box/combo-box.d.ts +43 -2
- package/dist/components/inputs/combo-box/combo-box.d.ts.map +1 -1
- package/dist/components/inputs/combo-box/combo-box.js +115 -40
- package/dist/components/inputs/combo-box/combo-box.js.map +1 -1
- package/dist/components/inputs/combo-box/combo-box.template.js +2 -2
- package/dist/components/inputs/date-field/date-field.d.ts.map +1 -1
- package/dist/components/inputs/date-field/date-field.js +2 -1
- package/dist/components/inputs/date-field/date-field.js.map +1 -1
- package/dist/components/inputs/date-field/date-field.template.js +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 +0 -2
- package/dist/components/inputs/dropdown/dropdown.d.ts.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.js +1 -13
- package/dist/components/inputs/dropdown/dropdown.js.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.styles.d.ts.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.styles.js +24 -12
- package/dist/components/inputs/dropdown/dropdown.styles.js.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.template.d.ts.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.template.js +0 -1
- package/dist/components/inputs/dropdown/dropdown.template.js.map +1 -1
- package/dist/components/inputs/file-field/file-field.d.ts.map +1 -1
- package/dist/components/inputs/file-field/file-field.js +2 -7
- package/dist/components/inputs/file-field/file-field.js.map +1 -1
- package/dist/components/inputs/file-field/file-field.template.js +2 -2
- package/dist/components/inputs/number-field/number-field.d.ts.map +1 -1
- package/dist/components/inputs/number-field/number-field.js +2 -1
- package/dist/components/inputs/number-field/number-field.js.map +1 -1
- package/dist/components/inputs/number-field/number-field.template.js +2 -2
- package/dist/components/inputs/search-field/search-field.d.ts.map +1 -1
- package/dist/components/inputs/search-field/search-field.js +2 -1
- package/dist/components/inputs/search-field/search-field.js.map +1 -1
- package/dist/components/inputs/search-field/search-field.template.js +2 -2
- package/dist/components/inputs/segmented-control/segmented-control.d.ts +6 -0
- package/dist/components/inputs/segmented-control/segmented-control.d.ts.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.js +13 -0
- package/dist/components/inputs/segmented-control/segmented-control.js.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.styles.d.ts.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.styles.js +54 -16
- package/dist/components/inputs/segmented-control/segmented-control.styles.js.map +1 -1
- package/dist/components/inputs/stepper/stepper.d.ts.map +1 -1
- package/dist/components/inputs/stepper/stepper.js +2 -1
- package/dist/components/inputs/stepper/stepper.js.map +1 -1
- package/dist/components/inputs/stepper/stepper.template.js +2 -2
- package/dist/components/inputs/text-editor/text-editor.annotations.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.annotations.js +6 -4
- package/dist/components/inputs/text-editor/text-editor.annotations.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.d.ts +27 -64
- package/dist/components/inputs/text-editor/text-editor.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.i18n.d.ts +2 -0
- package/dist/components/inputs/text-editor/text-editor.i18n.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.i18n.js +5 -0
- package/dist/components/inputs/text-editor/text-editor.i18n.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.js +87 -20
- package/dist/components/inputs/text-editor/text-editor.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.labels.d.ts +4 -0
- package/dist/components/inputs/text-editor/text-editor.labels.d.ts.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.labels.js +5 -0
- package/dist/components/inputs/text-editor/text-editor.labels.js.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.links.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.links.js +6 -4
- package/dist/components/inputs/text-editor/text-editor.links.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.markdown.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.markdown.js +5 -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 +27 -3
- package/dist/components/inputs/text-editor/text-editor.mentions.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.mentions.js +144 -25
- package/dist/components/inputs/text-editor/text-editor.mentions.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.spellcheck.d.ts +11 -0
- package/dist/components/inputs/text-editor/text-editor.spellcheck.d.ts.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.spellcheck.js +134 -0
- package/dist/components/inputs/text-editor/text-editor.spellcheck.js.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.styles.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.styles.js +9 -3
- package/dist/components/inputs/text-editor/text-editor.styles.js.map +1 -1
- package/dist/components/inputs/time-field/time-field.d.ts.map +1 -1
- package/dist/components/inputs/time-field/time-field.js +2 -1
- package/dist/components/inputs/time-field/time-field.js.map +1 -1
- package/dist/components/inputs/time-field/time-field.template.js +2 -2
- package/dist/components/inputs/time-picker/time-picker.d.ts.map +1 -1
- package/dist/components/inputs/time-picker/time-picker.js +2 -1
- package/dist/components/inputs/time-picker/time-picker.js.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.d.ts +12 -0
- package/dist/components/inputs/toggle-button/toggle-button.d.ts.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.js +17 -0
- package/dist/components/inputs/toggle-button/toggle-button.js.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.styles.d.ts.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.styles.js +99 -12
- package/dist/components/inputs/toggle-button/toggle-button.styles.js.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.template.d.ts.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.template.js +3 -2
- package/dist/components/inputs/toggle-button/toggle-button.template.js.map +1 -1
- package/dist/components/inputs/toggle-button-group/toggle-button-group.d.ts +4 -2
- 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 +8 -2
- package/dist/components/inputs/toggle-button-group/toggle-button-group.js.map +1 -1
- package/dist/components/inputs/token-field/token-field.d.ts +26 -1
- package/dist/components/inputs/token-field/token-field.d.ts.map +1 -1
- package/dist/components/inputs/token-field/token-field.js +59 -6
- 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/layout/card/card.d.ts +3 -0
- package/dist/components/layout/card/card.d.ts.map +1 -1
- package/dist/components/layout/card/card.js +3 -0
- package/dist/components/layout/card/card.js.map +1 -1
- package/dist/components/layout/card/card.styles.d.ts.map +1 -1
- package/dist/components/layout/card/card.styles.js +22 -2
- package/dist/components/layout/card/card.styles.js.map +1 -1
- package/dist/components/layout/collection/collection.d.ts.map +1 -1
- package/dist/components/layout/collection/collection.js +2 -1
- package/dist/components/layout/collection/collection.js.map +1 -1
- package/dist/components/layout/collection/collection.template.js +1 -1
- package/dist/components/layout/page-footer/page-footer.d.ts +0 -2
- package/dist/components/layout/page-footer/page-footer.d.ts.map +1 -1
- package/dist/components/layout/page-footer/page-footer.js +4 -19
- package/dist/components/layout/page-footer/page-footer.js.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js +2 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js.map +1 -1
- package/dist/components/layout/popover/popover.d.ts.map +1 -1
- package/dist/components/layout/popover/popover.js +2 -1
- package/dist/components/layout/popover/popover.js.map +1 -1
- package/dist/components/layout/window/window.d.ts.map +1 -1
- package/dist/components/layout/window/window.js +2 -1
- package/dist/components/layout/window/window.js.map +1 -1
- package/dist/components/lists-and-tables/cells/drag-handle-cell/drag-handle-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/drag-handle-cell/drag-handle-cell.js +2 -1
- package/dist/components/lists-and-tables/cells/drag-handle-cell/drag-handle-cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.d.ts +7 -7
- package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.js +9 -9
- package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.styles.js +5 -5
- package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.template.js +1 -1
- package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.template.js.map +1 -1
- package/dist/components/lists-and-tables/list/list.d.ts +11 -8
- package/dist/components/lists-and-tables/list/list.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list/list.js +31 -31
- package/dist/components/lists-and-tables/list/list.js.map +1 -1
- package/dist/components/lists-and-tables/list/list.styles.js +5 -5
- package/dist/components/lists-and-tables/list/list.template.js +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.d.ts +4 -4
- 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 +10 -10
- package/dist/components/lists-and-tables/list-item/list-item.js.map +1 -1
- package/dist/components/lists-and-tables/table/table.d.ts +2 -0
- package/dist/components/lists-and-tables/table/table.d.ts.map +1 -1
- package/dist/components/lists-and-tables/table/table.js +10 -7
- package/dist/components/lists-and-tables/table/table.js.map +1 -1
- package/dist/components/navigation/breadcrumbs/breadcrumbs.d.ts +0 -2
- package/dist/components/navigation/breadcrumbs/breadcrumbs.d.ts.map +1 -1
- package/dist/components/navigation/breadcrumbs/breadcrumbs.js +4 -19
- package/dist/components/navigation/breadcrumbs/breadcrumbs.js.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.template.js +1 -1
- package/dist/components/navigation/menu-bar/menu-bar.js +1 -1
- package/dist/components/navigation/menu-bar/menu-bar.js.map +1 -1
- package/dist/components/navigation/pagination/pagination.d.ts +0 -3
- package/dist/components/navigation/pagination/pagination.d.ts.map +1 -1
- package/dist/components/navigation/pagination/pagination.js +2 -13
- package/dist/components/navigation/pagination/pagination.js.map +1 -1
- package/dist/components/navigation/pagination/pagination.template.js +2 -2
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.d.ts +12 -0
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.d.ts.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js +37 -2
- package/dist/components/navigation/top-navigation-bar/top-navigation-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 +48 -3
- 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.template.js +3 -3
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.d.ts.map +1 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.js +2 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.js.map +1 -1
- package/dist/components/status-and-feedback/banner/banner.d.ts.map +1 -1
- package/dist/components/status-and-feedback/banner/banner.js +2 -1
- package/dist/components/status-and-feedback/banner/banner.js.map +1 -1
- package/dist/components/status-and-feedback/banner/banner.template.js +1 -1
- package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.template.js +1 -1
- package/dist/components/status-and-feedback/notification/notification.template.js +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.d.ts +4 -4
- package/dist/components/status-and-feedback/progress-bar/progress-bar.d.ts.map +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.js +11 -10
- package/dist/components/status-and-feedback/progress-bar/progress-bar.js.map +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.styles.js +6 -6
- package/dist/components/status-and-feedback/progress-bar/progress-bar.template.js +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.template.js.map +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.d.ts +6 -4
- package/dist/components/status-and-feedback/progress-circle/progress-circle.d.ts.map +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.js +16 -13
- package/dist/components/status-and-feedback/progress-circle/progress-circle.js.map +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.styles.js +3 -3
- package/dist/components/{with-translations-BAKFoEKy.js → with-translations-Dt2DTXJF.js} +40 -12
- package/dist/css/rich-text.css +5 -1
- package/dist/css/variables.css +30 -42
- package/dist/nldd.min.js +1053 -869
- package/dist/translations/en-US.d.ts +17 -0
- package/dist/translations/en-US.d.ts.map +1 -0
- package/dist/translations/en-US.js +185 -0
- package/dist/translations/en-US.js.map +1 -0
- package/dist/translations/fy.d.ts +20 -0
- package/dist/translations/fy.d.ts.map +1 -0
- package/dist/translations/fy.js +185 -0
- package/dist/translations/fy.js.map +1 -0
- package/dist/translations/nl.generated.d.ts +188 -0
- package/dist/translations/nl.generated.d.ts.map +1 -0
- package/dist/translations/nl.generated.js +101 -0
- package/dist/translations/nl.generated.js.map +1 -0
- package/dist/translations/pap-AW.d.ts +22 -0
- package/dist/translations/pap-AW.d.ts.map +1 -0
- package/dist/translations/pap-AW.js +185 -0
- package/dist/translations/pap-AW.js.map +1 -0
- package/dist/translations/pap-CW.d.ts +22 -0
- package/dist/translations/pap-CW.d.ts.map +1 -0
- package/dist/translations/pap-CW.js +185 -0
- package/dist/translations/pap-CW.js.map +1 -0
- package/dist/types/vue.d.ts +76 -38
- package/dist/utilities/translations.d.ts +37 -0
- package/dist/utilities/translations.d.ts.map +1 -0
- package/dist/utilities/translations.js +80 -0
- package/dist/utilities/translations.js.map +1 -0
- package/dist/utilities/with-translations.d.ts.map +1 -1
- package/dist/utilities/with-translations.js +2 -15
- package/dist/utilities/with-translations.js.map +1 -1
- package/package.json +29 -3
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
* Nederlandse Digitale Dienst Button Component (Lit + TypeScript)
|
|
3
3
|
*
|
|
4
4
|
* @element nldd-button
|
|
5
|
-
* @attr {string}
|
|
5
|
+
* @attr {string} appearance - Visual style, color included: 'primary' | 'secondary' | 'destructive' | 'accent-filled' | 'accent-transparent' | 'neutral-tinted' | 'neutral-base' | 'neutral-transparent' | 'critical-tinted' | 'critical-transparent' | 'inherit-filled' | 'inherit-tinted'. The inherit appearances derive their colors from currentColor, for buttons on colored surfaces; inherit-filled uses the surface color (--context-parent-background-color) as the label color, with a white/black contrast flip as a fallback.
|
|
6
6
|
* @attr {string} size - Button size: 'xs' | 'sm' | 'md' | 'lg' (default: 'md'). 'lg' uses larger text and 24px start/end icons.
|
|
7
7
|
* @attr {string} horizontal-alignment - Horizontal alignment of the button content: 'left' | 'center' | 'right' (default: unset, centered). Most visible with width="full" or a fixed width.
|
|
8
8
|
* @attr {boolean} loading - Loading state (default: false). Shows an activity indicator over the visually hidden content, sets aria-busy on the inner control and blocks activation, without dropping the button from the tab order (unlike disabled). The content stays laid out, so the button keeps its width.
|
|
9
|
+
* @attr {string} loading-text - What the screen reader announces while `loading` is on, for a button that does more than load: "Aan het bewaren". Leave it out and the activity indicator says its translated "Laden".
|
|
9
10
|
* @attr {boolean} disabled - Disabled state
|
|
10
11
|
* @attr {string} type - Button type for form submission: 'button' | 'submit' | 'reset' (ignored when href is set)
|
|
11
12
|
* @attr {string} popovertarget - ID of a popover element this button invokes; forwarded to the inner button. Use the popoverTargetElement property instead when the popover lives in another tree.
|
|
@@ -18,7 +19,7 @@
|
|
|
18
19
|
* @attr {string} text - Button text
|
|
19
20
|
* @attr {string} supporting-text - Supporting text shown below the text (md/lg) or after it (sm/xs), in a secondary color. Part of the accessible name (unless `accessible-label` is set, which replaces the whole accessible name).
|
|
20
21
|
* @attr {boolean} single-line - When true, truncates overflowing text with an ellipsis instead of letting it wrap. Requires the button (or an ancestor) to constrain the width.
|
|
21
|
-
* @attr {boolean} no-highlight-border - Removes the per-
|
|
22
|
+
* @attr {boolean} no-highlight-border - Removes the per-appearance highlight border (e.g. when nldd-button-bar draws a single group border instead).
|
|
22
23
|
* @attr {boolean} no-tab - Takes the button out of the tab order (tabindex="-1"), for a control owned by a roving container (e.g. a button in a row of an nldd-list, where the arrow keys move between rows) that manages focus itself. Still mouse- and script-focusable.
|
|
23
24
|
* @attr {string} start-icon - Icon name for the start icon (before text)
|
|
24
25
|
* @attr {string} end-icon - Icon name for the end icon (after text)
|
|
@@ -39,7 +40,7 @@ import { LitElement } from 'lit';
|
|
|
39
40
|
import { PopupAnchorController } from '../../../utilities/popup-anchor-controller.js';
|
|
40
41
|
import './../../content/icon/icon.js';
|
|
41
42
|
import './../../status-and-feedback/activity-indicator/activity-indicator.js';
|
|
42
|
-
type
|
|
43
|
+
type Appearance = 'primary' | 'secondary' | 'destructive' | 'accent-filled' | 'accent-transparent' | 'neutral-tinted' | 'neutral-base' | 'neutral-transparent' | 'critical-tinted' | 'critical-transparent' | 'inherit-filled' | 'inherit-tinted';
|
|
43
44
|
type Size = 'xs' | 'sm' | 'md' | 'lg';
|
|
44
45
|
type ButtonType = 'button' | 'submit' | 'reset';
|
|
45
46
|
type PopupType = 'menu' | 'listbox' | 'dialog' | 'tree' | 'grid';
|
|
@@ -53,7 +54,7 @@ export declare class NLDDButton extends NLDDButton_base {
|
|
|
53
54
|
static styles: import("lit").CSSResult;
|
|
54
55
|
static formAssociated: boolean;
|
|
55
56
|
private _internals;
|
|
56
|
-
|
|
57
|
+
appearance: Appearance;
|
|
57
58
|
size: Size;
|
|
58
59
|
/** Horizontal alignment of the button content. Most visible with width="full" or a fixed width. */
|
|
59
60
|
horizontalAlignment: 'left' | 'center' | 'right' | '';
|
|
@@ -105,13 +106,15 @@ export declare class NLDDButton extends NLDDButton_base {
|
|
|
105
106
|
* `click` listener delegated on an ancestor receives nothing while loading.
|
|
106
107
|
*/
|
|
107
108
|
loading: boolean;
|
|
109
|
+
/** What the screen reader announces while loading. Empty falls back to the activity indicator's "Laden". */
|
|
110
|
+
loadingText: string;
|
|
108
111
|
disabled: boolean;
|
|
109
112
|
/** Button text. */
|
|
110
113
|
text: string;
|
|
111
114
|
/** Supporting text: below the text (md/lg) or after it (sm/xs), in a secondary color. Part of the accessible name (unless `accessible-label` is set, which replaces the whole accessible name). */
|
|
112
115
|
supportingText: string;
|
|
113
116
|
singleLine: boolean;
|
|
114
|
-
/** Removes the per-
|
|
117
|
+
/** Removes the per-appearance highlight border (e.g. when nldd-button-bar draws a single group border instead). */
|
|
115
118
|
noHighlightBorder: boolean;
|
|
116
119
|
/** Icon name for the start icon (before text). When not set, the start-icon slot is used. */
|
|
117
120
|
startIcon: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/button/button.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/button/button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAOjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,8BAA8B,CAAC;AACtC,OAAO,sEAAsE,CAAC;AAG9E,KAAK,UAAU,GACZ,SAAS,GACT,WAAW,GACX,aAAa,GACb,eAAe,GACf,oBAAoB,GACpB,gBAAgB,GAChB,cAAc,GACd,qBAAqB,GACrB,iBAAiB,GACjB,sBAAsB,GACtB,gBAAgB,GAChB,gBAAgB,CAAC;AACpB,KAAK,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACtC,KAAK,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;AAChD,KAAK,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;;;;;;;AAEjE,qBACa,UAAW,SAAQ,eAAiE;IAChG,OAAgB,MAAM,0BAAgB;IAKtC,MAAM,CAAC,cAAc,UAAQ;IAC7B,OAAO,CAAC,UAAU,CAA0B;IAG5C,UAAU,EAAE,UAAU,CAAoB;IAG1C,IAAI,EAAE,IAAI,CAAQ;IAElB,mGAAmG;IAEnG,mBAAmB,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,EAAE,CAAM;IAE3D,mEAAmE;IAEnE,KAAK,SAAM;IAEX;;6DAEyD;IAEzD,QAAQ,SAAM;IAEd;;qFAEiF;IAEjF,KAAK,UAAS;IAGd,UAAU,UAAS;IAGnB,QAAQ,UAAS;IAEjB;;;;OAIG;IAEH,SAAS,CAAC,EAAE,SAAS,CAAC;IAGtB,IAAI,EAAE,UAAU,CA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digitale Dienst Button Component (Lit + TypeScript)
|
|
3
3
|
*
|
|
4
4
|
* @element nldd-button
|
|
5
|
-
* @attr {string}
|
|
5
|
+
* @attr {string} appearance - Visual style, color included: 'primary' | 'secondary' | 'destructive' | 'accent-filled' | 'accent-transparent' | 'neutral-tinted' | 'neutral-base' | 'neutral-transparent' | 'critical-tinted' | 'critical-transparent' | 'inherit-filled' | 'inherit-tinted'. The inherit appearances derive their colors from currentColor, for buttons on colored surfaces; inherit-filled uses the surface color (--context-parent-background-color) as the label color, with a white/black contrast flip as a fallback.
|
|
6
6
|
* @attr {string} size - Button size: 'xs' | 'sm' | 'md' | 'lg' (default: 'md'). 'lg' uses larger text and 24px start/end icons.
|
|
7
7
|
* @attr {string} horizontal-alignment - Horizontal alignment of the button content: 'left' | 'center' | 'right' (default: unset, centered). Most visible with width="full" or a fixed width.
|
|
8
8
|
* @attr {boolean} loading - Loading state (default: false). Shows an activity indicator over the visually hidden content, sets aria-busy on the inner control and blocks activation, without dropping the button from the tab order (unlike disabled). The content stays laid out, so the button keeps its width.
|
|
9
|
+
* @attr {string} loading-text - What the screen reader announces while `loading` is on, for a button that does more than load: "Aan het bewaren". Leave it out and the activity indicator says its translated "Laden".
|
|
9
10
|
* @attr {boolean} disabled - Disabled state
|
|
10
11
|
* @attr {string} type - Button type for form submission: 'button' | 'submit' | 'reset' (ignored when href is set)
|
|
11
12
|
* @attr {string} popovertarget - ID of a popover element this button invokes; forwarded to the inner button. Use the popoverTargetElement property instead when the popover lives in another tree.
|
|
@@ -18,7 +19,7 @@
|
|
|
18
19
|
* @attr {string} text - Button text
|
|
19
20
|
* @attr {string} supporting-text - Supporting text shown below the text (md/lg) or after it (sm/xs), in a secondary color. Part of the accessible name (unless `accessible-label` is set, which replaces the whole accessible name).
|
|
20
21
|
* @attr {boolean} single-line - When true, truncates overflowing text with an ellipsis instead of letting it wrap. Requires the button (or an ancestor) to constrain the width.
|
|
21
|
-
* @attr {boolean} no-highlight-border - Removes the per-
|
|
22
|
+
* @attr {boolean} no-highlight-border - Removes the per-appearance highlight border (e.g. when nldd-button-bar draws a single group border instead).
|
|
22
23
|
* @attr {boolean} no-tab - Takes the button out of the tab order (tabindex="-1"), for a control owned by a roving container (e.g. a button in a row of an nldd-list, where the arrow keys move between rows) that manages focus itself. Still mouse- and script-focusable.
|
|
23
24
|
* @attr {string} start-icon - Icon name for the start icon (before text)
|
|
24
25
|
* @attr {string} end-icon - Icon name for the end icon (after text)
|
|
@@ -56,7 +57,7 @@ let NLDDButton = class NLDDButton extends DescribedBy(withTranslations(LitElemen
|
|
|
56
57
|
constructor() {
|
|
57
58
|
super(...arguments);
|
|
58
59
|
this._internals = this.attachInternals();
|
|
59
|
-
this.
|
|
60
|
+
this.appearance = 'neutral-tinted';
|
|
60
61
|
this.size = 'md';
|
|
61
62
|
/** Horizontal alignment of the button content. Most visible with width="full" or a fixed width. */
|
|
62
63
|
this.horizontalAlignment = '';
|
|
@@ -102,13 +103,15 @@ let NLDDButton = class NLDDButton extends DescribedBy(withTranslations(LitElemen
|
|
|
102
103
|
* `click` listener delegated on an ancestor receives nothing while loading.
|
|
103
104
|
*/
|
|
104
105
|
this.loading = false;
|
|
106
|
+
/** What the screen reader announces while loading. Empty falls back to the activity indicator's "Laden". */
|
|
107
|
+
this.loadingText = '';
|
|
105
108
|
this.disabled = false;
|
|
106
109
|
/** Button text. */
|
|
107
110
|
this.text = '';
|
|
108
111
|
/** Supporting text: below the text (md/lg) or after it (sm/xs), in a secondary color. Part of the accessible name (unless `accessible-label` is set, which replaces the whole accessible name). */
|
|
109
112
|
this.supportingText = '';
|
|
110
113
|
this.singleLine = false;
|
|
111
|
-
/** Removes the per-
|
|
114
|
+
/** Removes the per-appearance highlight border (e.g. when nldd-button-bar draws a single group border instead). */
|
|
112
115
|
this.noHighlightBorder = false;
|
|
113
116
|
/** Icon name for the start icon (before text). When not set, the start-icon slot is used. */
|
|
114
117
|
this.startIcon = '';
|
|
@@ -267,7 +270,7 @@ NLDDButton.styles = buttonStyles;
|
|
|
267
270
|
NLDDButton.formAssociated = true;
|
|
268
271
|
__decorate([
|
|
269
272
|
property({ reflect: true, converter: reflectNonDefault('neutral-tinted') })
|
|
270
|
-
], NLDDButton.prototype, "
|
|
273
|
+
], NLDDButton.prototype, "appearance", void 0);
|
|
271
274
|
__decorate([
|
|
272
275
|
property({ reflect: true, converter: reflectNonDefault('md') })
|
|
273
276
|
], NLDDButton.prototype, "size", void 0);
|
|
@@ -307,6 +310,9 @@ __decorate([
|
|
|
307
310
|
__decorate([
|
|
308
311
|
property({ type: Boolean, reflect: true })
|
|
309
312
|
], NLDDButton.prototype, "loading", void 0);
|
|
313
|
+
__decorate([
|
|
314
|
+
property({ attribute: 'loading-text' })
|
|
315
|
+
], NLDDButton.prototype, "loadingText", void 0);
|
|
310
316
|
__decorate([
|
|
311
317
|
property({ type: Boolean, reflect: true })
|
|
312
318
|
], NLDDButton.prototype, "disabled", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../../src/components/actions/button/button.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../../src/components/actions/button/button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,q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AC;8CAClD;AAInB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,qBAAqB,EAAE,CAAC;qDACnD;AAI1B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;6CACrC;AAIf;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC;2CACrC;AAIb;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;mDACrC;AAIrB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wCACL;AAIrC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CACY;AAOvC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uCACS;AAxIxB,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CA8QtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/button/button.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"button.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/button/button.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,yBAolBxB,CAAC"}
|
|
@@ -88,7 +88,7 @@ export const buttonStyles = css `
|
|
|
88
88
|
--_supporting-font: var(--semantics-buttons-lg-supporting-text-font);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
:host([
|
|
91
|
+
:host([appearance="neutral-base"]) {
|
|
92
92
|
--_background-color: var(--semantics-buttons-neutral-base-background-color);
|
|
93
93
|
--_primary-content-color: var(--semantics-buttons-neutral-base-content-color);
|
|
94
94
|
--_secondary-content-color: var(--semantics-buttons-neutral-base-content-secondary-color);
|
|
@@ -103,7 +103,7 @@ export const buttonStyles = css `
|
|
|
103
103
|
--_is-active-highlight-border-color: var(--semantics-buttons-neutral-base-is-active-highlight-border-color);
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
:host([
|
|
106
|
+
:host([appearance="neutral-transparent"]) {
|
|
107
107
|
--_background-color: transparent;
|
|
108
108
|
--_primary-content-color: var(--semantics-buttons-neutral-transparent-content-color);
|
|
109
109
|
--_secondary-content-color: var(--semantics-buttons-neutral-transparent-content-secondary-color);
|
|
@@ -118,8 +118,8 @@ export const buttonStyles = css `
|
|
|
118
118
|
--_is-active-highlight-border-color: transparent;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
:host([
|
|
122
|
-
:host([
|
|
121
|
+
:host([appearance="accent-filled"]),
|
|
122
|
+
:host([appearance="primary"]) {
|
|
123
123
|
--_background-color: var(--semantics-buttons-accent-filled-background-color);
|
|
124
124
|
--_primary-content-color: var(--semantics-buttons-accent-filled-content-color);
|
|
125
125
|
--_secondary-content-color: var(--semantics-buttons-accent-filled-content-secondary-color);
|
|
@@ -134,7 +134,7 @@ export const buttonStyles = css `
|
|
|
134
134
|
--_is-active-highlight-border-color: var(--semantics-buttons-accent-filled-is-active-highlight-border-color);
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
:host([
|
|
137
|
+
:host([appearance="accent-transparent"]) {
|
|
138
138
|
--_background-color: transparent;
|
|
139
139
|
--_primary-content-color: var(--semantics-buttons-accent-transparent-content-color);
|
|
140
140
|
--_secondary-content-color: var(--semantics-buttons-accent-transparent-content-secondary-color);
|
|
@@ -149,8 +149,8 @@ export const buttonStyles = css `
|
|
|
149
149
|
--_is-active-highlight-border-color: transparent;
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
:host([
|
|
153
|
-
:host([
|
|
152
|
+
:host([appearance="critical-tinted"]),
|
|
153
|
+
:host([appearance="destructive"]) {
|
|
154
154
|
--_background-color: var(--semantics-buttons-critical-tinted-background-color);
|
|
155
155
|
--_primary-content-color: var(--semantics-buttons-critical-tinted-content-color);
|
|
156
156
|
--_secondary-content-color: var(--semantics-buttons-critical-tinted-content-secondary-color);
|
|
@@ -165,7 +165,7 @@ export const buttonStyles = css `
|
|
|
165
165
|
--_is-active-highlight-border-color: var(--semantics-buttons-critical-tinted-is-active-highlight-border-color);
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
:host([
|
|
168
|
+
:host([appearance="critical-transparent"]) {
|
|
169
169
|
--_background-color: transparent;
|
|
170
170
|
--_primary-content-color: var(--semantics-buttons-critical-transparent-content-color);
|
|
171
171
|
--_secondary-content-color: var(--semantics-buttons-critical-transparent-content-secondary-color);
|
|
@@ -186,34 +186,36 @@ export const buttonStyles = css `
|
|
|
186
186
|
here on the host — inside a :root token it would freeze — with the
|
|
187
187
|
tokens' white/black contrast flip as fallback. */
|
|
188
188
|
|
|
189
|
-
:host([
|
|
190
|
-
|
|
189
|
+
:host([appearance="inherit-tinted"]),
|
|
190
|
+
:host([expanded][appearance="inherit-tinted"]) {
|
|
191
|
+
--_background-color: var(--context-button-background-color, var(--semantics-buttons-inherit-tinted-background-color));
|
|
191
192
|
--_primary-content-color: var(--semantics-buttons-inherit-tinted-content-color);
|
|
192
193
|
--_secondary-content-color: var(--semantics-buttons-inherit-tinted-content-secondary-color);
|
|
193
194
|
--_highlight-border-color: var(--semantics-buttons-inherit-tinted-highlight-border-color);
|
|
194
|
-
--_is-hovered-background-color: var(--
|
|
195
|
-
--_is-hovered-primary-content-color: var(--
|
|
196
|
-
--_is-hovered-secondary-content-color: var(--
|
|
197
|
-
--_is-hovered-highlight-border-color: var(--
|
|
198
|
-
--_is-active-background-color: var(--
|
|
199
|
-
--_is-active-primary-content-color: var(--
|
|
200
|
-
--_is-active-secondary-content-color: var(--
|
|
201
|
-
--_is-active-highlight-border-color: var(--
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
:host([
|
|
195
|
+
--_is-hovered-background-color: var(--_background-color);
|
|
196
|
+
--_is-hovered-primary-content-color: var(--_primary-content-color);
|
|
197
|
+
--_is-hovered-secondary-content-color: var(--_secondary-content-color);
|
|
198
|
+
--_is-hovered-highlight-border-color: var(--_highlight-border-color);
|
|
199
|
+
--_is-active-background-color: var(--_background-color);
|
|
200
|
+
--_is-active-primary-content-color: var(--_primary-content-color);
|
|
201
|
+
--_is-active-secondary-content-color: var(--_secondary-content-color);
|
|
202
|
+
--_is-active-highlight-border-color: var(--_highlight-border-color);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
:host([appearance="inherit-filled"]),
|
|
206
|
+
:host([expanded][appearance="inherit-filled"]) {
|
|
205
207
|
--_background-color: var(--semantics-buttons-inherit-filled-background-color);
|
|
206
208
|
--_primary-content-color: var(--context-parent-background-color, var(--semantics-buttons-inherit-filled-content-color));
|
|
207
209
|
--_secondary-content-color: var(--semantics-buttons-inherit-filled-content-secondary-color);
|
|
208
210
|
--_highlight-border-color: var(--semantics-buttons-inherit-filled-highlight-border-color);
|
|
209
|
-
--_is-hovered-background-color: var(--
|
|
210
|
-
--_is-hovered-primary-content-color: var(--
|
|
211
|
-
--_is-hovered-secondary-content-color: var(--
|
|
212
|
-
--_is-hovered-highlight-border-color: var(--
|
|
213
|
-
--_is-active-background-color: var(--
|
|
214
|
-
--_is-active-primary-content-color: var(--
|
|
215
|
-
--_is-active-secondary-content-color: var(--
|
|
216
|
-
--_is-active-highlight-border-color: var(--
|
|
211
|
+
--_is-hovered-background-color: var(--_background-color);
|
|
212
|
+
--_is-hovered-primary-content-color: var(--_primary-content-color);
|
|
213
|
+
--_is-hovered-secondary-content-color: var(--_secondary-content-color);
|
|
214
|
+
--_is-hovered-highlight-border-color: var(--_highlight-border-color);
|
|
215
|
+
--_is-active-background-color: var(--_background-color);
|
|
216
|
+
--_is-active-primary-content-color: var(--_primary-content-color);
|
|
217
|
+
--_is-active-secondary-content-color: var(--_secondary-content-color);
|
|
218
|
+
--_is-active-highlight-border-color: var(--_highlight-border-color);
|
|
217
219
|
}
|
|
218
220
|
|
|
219
221
|
/* For inherit-filled the inner button keeps the inherited on-color:
|
|
@@ -221,11 +223,11 @@ export const buttonStyles = css `
|
|
|
221
223
|
against it, and would otherwise self-reference the label. The label
|
|
222
224
|
color moves to the content layer instead. The higher specificity of
|
|
223
225
|
these rules deliberately pins the color through hover/active/expanded. */
|
|
224
|
-
:host([
|
|
226
|
+
:host([appearance="inherit-filled"]) .button {
|
|
225
227
|
color: inherit;
|
|
226
228
|
}
|
|
227
229
|
|
|
228
|
-
:host([
|
|
230
|
+
:host([appearance="inherit-filled"]) .button > * {
|
|
229
231
|
color: var(--_primary-content-color);
|
|
230
232
|
}
|
|
231
233
|
|
|
@@ -246,7 +248,7 @@ export const buttonStyles = css `
|
|
|
246
248
|
--_is-active-highlight-border-color: var(--semantics-buttons-neutral-tinted-is-expanded-is-active-highlight-border-color);
|
|
247
249
|
}
|
|
248
250
|
|
|
249
|
-
:host([expanded][
|
|
251
|
+
:host([expanded][appearance="neutral-base"]) {
|
|
250
252
|
--_background-color: var(--semantics-buttons-neutral-base-is-expanded-background-color);
|
|
251
253
|
--_primary-content-color: var(--semantics-buttons-neutral-base-is-expanded-content-color);
|
|
252
254
|
--_secondary-content-color: var(--semantics-buttons-neutral-base-is-expanded-content-secondary-color);
|
|
@@ -261,7 +263,7 @@ export const buttonStyles = css `
|
|
|
261
263
|
--_is-active-highlight-border-color: var(--semantics-buttons-neutral-base-is-expanded-is-active-highlight-border-color);
|
|
262
264
|
}
|
|
263
265
|
|
|
264
|
-
:host([expanded][
|
|
266
|
+
:host([expanded][appearance="neutral-transparent"]) {
|
|
265
267
|
--_background-color: transparent;
|
|
266
268
|
--_primary-content-color: var(--semantics-buttons-neutral-transparent-content-color);
|
|
267
269
|
--_secondary-content-color: var(--semantics-buttons-neutral-transparent-content-secondary-color);
|
|
@@ -276,8 +278,8 @@ export const buttonStyles = css `
|
|
|
276
278
|
--_is-active-highlight-border-color: transparent;
|
|
277
279
|
}
|
|
278
280
|
|
|
279
|
-
:host([expanded][
|
|
280
|
-
:host([expanded][
|
|
281
|
+
:host([expanded][appearance="accent-filled"]),
|
|
282
|
+
:host([expanded][appearance="primary"]) {
|
|
281
283
|
--_background-color: var(--semantics-buttons-accent-filled-is-expanded-background-color);
|
|
282
284
|
--_primary-content-color: var(--semantics-buttons-accent-filled-is-expanded-content-color);
|
|
283
285
|
--_secondary-content-color: var(--semantics-buttons-accent-filled-is-expanded-content-secondary-color);
|
|
@@ -292,7 +294,7 @@ export const buttonStyles = css `
|
|
|
292
294
|
--_is-active-highlight-border-color: var(--semantics-buttons-accent-filled-is-expanded-is-active-highlight-border-color);
|
|
293
295
|
}
|
|
294
296
|
|
|
295
|
-
:host([expanded][
|
|
297
|
+
:host([expanded][appearance="accent-transparent"]) {
|
|
296
298
|
--_background-color: transparent;
|
|
297
299
|
--_primary-content-color: var(--semantics-buttons-accent-transparent-content-color);
|
|
298
300
|
--_secondary-content-color: var(--semantics-buttons-accent-transparent-content-secondary-color);
|
|
@@ -307,8 +309,8 @@ export const buttonStyles = css `
|
|
|
307
309
|
--_is-active-highlight-border-color: transparent;
|
|
308
310
|
}
|
|
309
311
|
|
|
310
|
-
:host([expanded][
|
|
311
|
-
:host([expanded][
|
|
312
|
+
:host([expanded][appearance="critical-tinted"]),
|
|
313
|
+
:host([expanded][appearance="destructive"]) {
|
|
312
314
|
--_background-color: var(--semantics-buttons-critical-tinted-is-expanded-background-color);
|
|
313
315
|
--_primary-content-color: var(--semantics-buttons-critical-tinted-is-expanded-content-color);
|
|
314
316
|
--_secondary-content-color: var(--semantics-buttons-critical-tinted-is-expanded-content-secondary-color);
|
|
@@ -323,7 +325,7 @@ export const buttonStyles = css `
|
|
|
323
325
|
--_is-active-highlight-border-color: var(--semantics-buttons-critical-tinted-is-expanded-is-active-highlight-border-color);
|
|
324
326
|
}
|
|
325
327
|
|
|
326
|
-
:host([expanded][
|
|
328
|
+
:host([expanded][appearance="critical-transparent"]) {
|
|
327
329
|
--_background-color: transparent;
|
|
328
330
|
--_primary-content-color: var(--semantics-buttons-critical-transparent-content-color);
|
|
329
331
|
--_secondary-content-color: var(--semantics-buttons-critical-transparent-content-secondary-color);
|
|
@@ -338,40 +340,6 @@ export const buttonStyles = css `
|
|
|
338
340
|
--_is-active-highlight-border-color: transparent;
|
|
339
341
|
}
|
|
340
342
|
|
|
341
|
-
/* The on-color variants keep their currentColor-derived content; expanded
|
|
342
|
-
only deepens the background. Content is restated (not inherited from the
|
|
343
|
-
resting block) because the default [expanded] block has equal
|
|
344
|
-
specificity and later source order, so it would otherwise win. */
|
|
345
|
-
:host([expanded][variant="inherit-tinted"]) {
|
|
346
|
-
--_background-color: var(--semantics-buttons-inherit-tinted-is-expanded-background-color);
|
|
347
|
-
--_primary-content-color: var(--semantics-buttons-inherit-tinted-is-expanded-content-color);
|
|
348
|
-
--_secondary-content-color: var(--semantics-buttons-inherit-tinted-is-expanded-content-secondary-color);
|
|
349
|
-
--_highlight-border-color: var(--semantics-buttons-inherit-tinted-is-expanded-highlight-border-color);
|
|
350
|
-
--_is-hovered-background-color: var(--semantics-buttons-inherit-tinted-is-expanded-is-hovered-background-color);
|
|
351
|
-
--_is-hovered-primary-content-color: var(--semantics-buttons-inherit-tinted-is-expanded-is-hovered-content-color);
|
|
352
|
-
--_is-hovered-secondary-content-color: var(--semantics-buttons-inherit-tinted-is-expanded-is-hovered-content-secondary-color);
|
|
353
|
-
--_is-hovered-highlight-border-color: var(--semantics-buttons-inherit-tinted-is-expanded-is-hovered-highlight-border-color);
|
|
354
|
-
--_is-active-background-color: var(--semantics-buttons-inherit-tinted-is-expanded-is-active-background-color);
|
|
355
|
-
--_is-active-primary-content-color: var(--semantics-buttons-inherit-tinted-is-expanded-is-active-content-color);
|
|
356
|
-
--_is-active-secondary-content-color: var(--semantics-buttons-inherit-tinted-is-expanded-is-active-content-secondary-color);
|
|
357
|
-
--_is-active-highlight-border-color: var(--semantics-buttons-inherit-tinted-is-expanded-is-active-highlight-border-color);
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
:host([expanded][variant="inherit-filled"]) {
|
|
361
|
-
--_background-color: var(--semantics-buttons-inherit-filled-is-expanded-background-color);
|
|
362
|
-
--_primary-content-color: var(--context-parent-background-color, var(--semantics-buttons-inherit-filled-is-expanded-content-color));
|
|
363
|
-
--_secondary-content-color: var(--semantics-buttons-inherit-filled-is-expanded-content-secondary-color);
|
|
364
|
-
--_highlight-border-color: var(--semantics-buttons-inherit-filled-is-expanded-highlight-border-color);
|
|
365
|
-
--_is-hovered-background-color: var(--semantics-buttons-inherit-filled-is-expanded-is-hovered-background-color);
|
|
366
|
-
--_is-hovered-primary-content-color: var(--semantics-buttons-inherit-filled-is-expanded-is-hovered-content-color);
|
|
367
|
-
--_is-hovered-secondary-content-color: var(--semantics-buttons-inherit-filled-is-expanded-is-hovered-content-secondary-color);
|
|
368
|
-
--_is-hovered-highlight-border-color: var(--semantics-buttons-inherit-filled-is-expanded-is-hovered-highlight-border-color);
|
|
369
|
-
--_is-active-background-color: var(--semantics-buttons-inherit-filled-is-expanded-is-active-background-color);
|
|
370
|
-
--_is-active-primary-content-color: var(--semantics-buttons-inherit-filled-is-expanded-is-active-content-color);
|
|
371
|
-
--_is-active-secondary-content-color: var(--semantics-buttons-inherit-filled-is-expanded-is-active-content-secondary-color);
|
|
372
|
-
--_is-active-highlight-border-color: var(--semantics-buttons-inherit-filled-is-expanded-is-active-highlight-border-color);
|
|
373
|
-
}
|
|
374
|
-
|
|
375
343
|
:host([width="full"]) {
|
|
376
344
|
display: block;
|
|
377
345
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.styles.js","sourceRoot":"","sources":["../../../../src/components/actions/button/button.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkC3B,kBAAkB
|
|
1
|
+
{"version":3,"file":"button.styles.js","sourceRoot":"","sources":["../../../../src/components/actions/button/button.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkC3B,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkjBrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.template.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/button/button.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,UAAU,eAAe;IACxB,WAAW,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;CACrC;AA+BD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"button.template.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/button/button.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,UAAU,eAAe;IACxB,WAAW,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;CACrC;AA+BD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,eAAe,wCAkHlE"}
|
|
@@ -75,6 +75,7 @@ export function template(helpers) {
|
|
|
75
75
|
<nldd-activity-indicator
|
|
76
76
|
timing="instant"
|
|
77
77
|
size=${this.size === 'xs' ? '16' : this.size === 'sm' ? '20' : this.size === 'lg' ? '28' : '24'}
|
|
78
|
+
text=${this.loadingText || nothing}
|
|
78
79
|
></nldd-activity-indicator>
|
|
79
80
|
</div>
|
|
80
81
|
`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.template.js","sourceRoot":"","sources":["../../../../src/components/actions/button/button.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAEpC,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAMzD,SAAS,aAAa,CAAC,SAAqB;IAC3C,sEAAsE;IACtE,6EAA6E;IAC7E,mEAAmE;IACnE,OAAO,IAAI,CAAA;;KAEP,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAA;;uBAER,SAAS,CAAC,SAAS;;IAEtC,CAAC,CAAC,CAAC,IAAI,CAAA,iCAAiC;;iCAEX,SAAS,CAAC,IAAI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CAAC;IACH,CAAC;IAED,uEAAuE;IACvE,2EAA2E;IAC3E,wEAAwE;IACxE,yEAAyE;IACzE,wEAAwE;IACxE,OAAO,IAAI,CAAA;kBACM,WAAW;UACnB,IAAI,CAAC,IAAI;eACJ,IAAI,CAAC,QAAQ;mBACT,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;gBACnC,SAAS;mBACN,IAAI,CAAC,SAAS,IAAI,OAAO;mBACzB,YAAY;eAChB,QAAQ;cACT,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO;mBACtB,IAAI,CAAC,aAAa,IAAI,OAAO;2BACrB,IAAI,CAAC,oBAAoB;0BAC1B,IAAI,CAAC,mBAAmB;kBAChC,IAAI,CAAC,MAAM,CAAC,iBAAiB;YACnC,OAAO,CAAC,WAAW;;KAE1B,OAAO;;IAER,gBAAgB;IAChB,SAAS;EACX,CAAC;AACH,CAAC"}
|
|
@@ -2,12 +2,17 @@
|
|
|
2
2
|
* Nederlandse Digitale Dienst Button Bar Component (Lit + TypeScript)
|
|
3
3
|
*
|
|
4
4
|
* A horizontal container for grouping buttons with a neutral background.
|
|
5
|
-
* Automatically propagates its size and
|
|
5
|
+
* Automatically propagates its size and appearance to all child nldd-button and nldd-icon-button elements.
|
|
6
6
|
* Renders nldd-button-bar-divider elements as internal dividers — no separate component needed.
|
|
7
7
|
*
|
|
8
|
+
* The bar is one surface for actions; on/off buttons do not go in it. For a row
|
|
9
|
+
* of toggles use nldd-toggle-button-group, and for one choice out of a few
|
|
10
|
+
* options on one surface nldd-segmented-control. An nldd-toggle-button placed
|
|
11
|
+
* here is shown as it is, and a warning says so in development.
|
|
12
|
+
*
|
|
8
13
|
* @element nldd-button-bar
|
|
9
14
|
* @attr {string} size - Bar size: 'xs' | 'sm' | 'md' | 'lg' (default: 'md'). At 'lg', icon-button children stack their label below the icon (mobile action-bar style).
|
|
10
|
-
* @attr {string}
|
|
15
|
+
* @attr {string} appearance - Visual style of the buttons (default: 'neutral-tinted'; 'inherit-tinted' and 'inherit-filled' for a colored surface)
|
|
11
16
|
* @attr {boolean} disabled - Disabled state
|
|
12
17
|
*
|
|
13
18
|
* @slot - Default slot for nldd-button, nldd-icon-button and nldd-button-bar-divider elements
|
|
@@ -27,7 +32,7 @@ export type BarChild = {
|
|
|
27
32
|
export declare class NLDDButtonBar extends LitElement {
|
|
28
33
|
static styles: import("lit").CSSResult;
|
|
29
34
|
size: Size;
|
|
30
|
-
|
|
35
|
+
appearance: string;
|
|
31
36
|
disabled: boolean;
|
|
32
37
|
_children: BarChild[];
|
|
33
38
|
private _idCounter;
|
|
@@ -40,9 +45,11 @@ export declare class NLDDButtonBar extends LitElement {
|
|
|
40
45
|
private _handleFocusIn;
|
|
41
46
|
private _handleFocusOut;
|
|
42
47
|
private _propagateSize;
|
|
43
|
-
private
|
|
48
|
+
private _propagateAppearance;
|
|
44
49
|
private _propagateDisabled;
|
|
45
50
|
private _buildChildren;
|
|
51
|
+
private _warnedToggleButton;
|
|
52
|
+
private _warnToggleButton;
|
|
46
53
|
render(): import("lit-html").TemplateResult<1>;
|
|
47
54
|
}
|
|
48
55
|
declare global {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-bar.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/button-bar/button-bar.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"button-bar.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/button-bar/button-bar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAgBjC,MAAM,MAAM,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE7C,MAAM,MAAM,QAAQ,GACjB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAC/B;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAIpD,qBACa,aAAc,SAAQ,UAAU;IAC5C,OAAgB,MAAM,0BAAmB;IAGzC,IAAI,EAAE,IAAI,CAAQ;IAGlB,UAAU,EAAE,MAAM,CAAoB;IAGtC,QAAQ,UAAS;IAGjB,SAAS,EAAE,QAAQ,EAAE,CAAM;IAE3B,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,SAAS,CAAiC;IAClD,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,qBAAqB,CAA0B;IAE9C,iBAAiB,IAAI,IAAI;IASzB,oBAAoB,IAAI,IAAI;IAQ5B,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAiB/D,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,eAAe;IAOvB,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,oBAAoB;IAM5B,OAAO,CAAC,kBAAkB;IAsB1B,OAAO,CAAC,cAAc;IAgCtB,OAAO,CAAC,mBAAmB,CAAS;IAEpC,OAAO,CAAC,iBAAiB;IAUhB,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,iBAAiB,EAAE,aAAa,CAAC;QACjC,yBAAyB,EAAE,WAAW,CAAC;KACvC;CACD"}
|
|
@@ -8,12 +8,17 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
* Nederlandse Digitale Dienst Button Bar Component (Lit + TypeScript)
|
|
9
9
|
*
|
|
10
10
|
* A horizontal container for grouping buttons with a neutral background.
|
|
11
|
-
* Automatically propagates its size and
|
|
11
|
+
* Automatically propagates its size and appearance to all child nldd-button and nldd-icon-button elements.
|
|
12
12
|
* Renders nldd-button-bar-divider elements as internal dividers — no separate component needed.
|
|
13
13
|
*
|
|
14
|
+
* The bar is one surface for actions; on/off buttons do not go in it. For a row
|
|
15
|
+
* of toggles use nldd-toggle-button-group, and for one choice out of a few
|
|
16
|
+
* options on one surface nldd-segmented-control. An nldd-toggle-button placed
|
|
17
|
+
* here is shown as it is, and a warning says so in development.
|
|
18
|
+
*
|
|
14
19
|
* @element nldd-button-bar
|
|
15
20
|
* @attr {string} size - Bar size: 'xs' | 'sm' | 'md' | 'lg' (default: 'md'). At 'lg', icon-button children stack their label below the icon (mobile action-bar style).
|
|
16
|
-
* @attr {string}
|
|
21
|
+
* @attr {string} appearance - Visual style of the buttons (default: 'neutral-tinted'; 'inherit-tinted' and 'inherit-filled' for a colored surface)
|
|
17
22
|
* @attr {boolean} disabled - Disabled state
|
|
18
23
|
*
|
|
19
24
|
* @slot - Default slot for nldd-button, nldd-icon-button and nldd-button-bar-divider elements
|
|
@@ -40,13 +45,14 @@ let NLDDButtonBar = class NLDDButtonBar extends LitElement {
|
|
|
40
45
|
constructor() {
|
|
41
46
|
super(...arguments);
|
|
42
47
|
this.size = 'md';
|
|
43
|
-
this.
|
|
48
|
+
this.appearance = 'neutral-tinted';
|
|
44
49
|
this.disabled = false;
|
|
45
50
|
this._children = [];
|
|
46
51
|
this._idCounter = 0;
|
|
47
52
|
this._observer = null;
|
|
48
53
|
this._building = false;
|
|
49
54
|
this._individuallyDisabled = new WeakSet();
|
|
55
|
+
this._warnedToggleButton = false;
|
|
50
56
|
}
|
|
51
57
|
connectedCallback() {
|
|
52
58
|
super.connectedCallback();
|
|
@@ -67,8 +73,8 @@ let NLDDButtonBar = class NLDDButtonBar extends LitElement {
|
|
|
67
73
|
if (changedProperties.has('size') || changedProperties.has('_children')) {
|
|
68
74
|
this._propagateSize();
|
|
69
75
|
}
|
|
70
|
-
if (changedProperties.has('
|
|
71
|
-
this.
|
|
76
|
+
if (changedProperties.has('appearance') || changedProperties.has('_children')) {
|
|
77
|
+
this._propagateAppearance();
|
|
72
78
|
}
|
|
73
79
|
if (changedProperties.has('disabled')) {
|
|
74
80
|
this._propagateDisabled();
|
|
@@ -97,10 +103,10 @@ let NLDDButtonBar = class NLDDButtonBar extends LitElement {
|
|
|
97
103
|
.filter(el => BUTTON_TAGS.includes(el.tagName.toLowerCase()))
|
|
98
104
|
.forEach(el => el.setAttribute('size', this.size));
|
|
99
105
|
}
|
|
100
|
-
|
|
106
|
+
_propagateAppearance() {
|
|
101
107
|
Array.from(this.children)
|
|
102
108
|
.filter(el => BUTTON_TAGS.includes(el.tagName.toLowerCase()))
|
|
103
|
-
.forEach(el => el.setAttribute('
|
|
109
|
+
.forEach(el => el.setAttribute('appearance', this.appearance));
|
|
104
110
|
}
|
|
105
111
|
_propagateDisabled() {
|
|
106
112
|
const buttons = Array.from(this.children).filter(el => BUTTON_TAGS.includes(el.tagName.toLowerCase()));
|
|
@@ -131,9 +137,11 @@ let NLDDButtonBar = class NLDDButtonBar extends LitElement {
|
|
|
131
137
|
if (tag === 'nldd-button-bar-divider') {
|
|
132
138
|
return { type: 'divider', id: this._idCounter++ };
|
|
133
139
|
}
|
|
140
|
+
if (tag === 'nldd-toggle-button')
|
|
141
|
+
this._warnToggleButton();
|
|
134
142
|
if (BUTTON_TAGS.includes(tag)) {
|
|
135
143
|
el.setAttribute('size', this.size);
|
|
136
|
-
el.setAttribute('
|
|
144
|
+
el.setAttribute('appearance', this.appearance);
|
|
137
145
|
// The bar draws one group border (.button-bar::after); children drop theirs.
|
|
138
146
|
el.setAttribute('no-highlight-border', '');
|
|
139
147
|
}
|
|
@@ -146,6 +154,14 @@ let NLDDButtonBar = class NLDDButtonBar extends LitElement {
|
|
|
146
154
|
});
|
|
147
155
|
this._building = false;
|
|
148
156
|
}
|
|
157
|
+
_warnToggleButton() {
|
|
158
|
+
if (!import.meta.env?.DEV || this._warnedToggleButton)
|
|
159
|
+
return;
|
|
160
|
+
this._warnedToggleButton = true;
|
|
161
|
+
console.warn('<nldd-button-bar>: nldd-toggle-button is not supported here. The bar is one surface for actions, '
|
|
162
|
+
+ 'and a selected toggle breaks it. Use nldd-toggle-button-group for a row of toggles, '
|
|
163
|
+
+ 'or nldd-segmented-control for one choice out of a few options.');
|
|
164
|
+
}
|
|
149
165
|
render() {
|
|
150
166
|
return template.call(this);
|
|
151
167
|
}
|
|
@@ -156,7 +172,7 @@ __decorate([
|
|
|
156
172
|
], NLDDButtonBar.prototype, "size", void 0);
|
|
157
173
|
__decorate([
|
|
158
174
|
property({ reflect: true, converter: reflectNonDefault('neutral-tinted') })
|
|
159
|
-
], NLDDButtonBar.prototype, "
|
|
175
|
+
], NLDDButtonBar.prototype, "appearance", void 0);
|
|
160
176
|
__decorate([
|
|
161
177
|
property({ type: Boolean, reflect: true })
|
|
162
178
|
], NLDDButtonBar.prototype, "disabled", void 0);
|