@nldd/design-system 0.8.42 → 0.8.44
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/README.md +1 -1
- package/dist/components/actions/button/button.d.ts +36 -5
- package/dist/components/actions/button/button.d.ts.map +1 -1
- package/dist/components/actions/button/button.js +62 -6
- 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 +149 -63
- 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 +19 -1
- package/dist/components/actions/button/button.template.js.map +1 -1
- package/dist/components/actions/button-bar/button-bar.styles.js +4 -4
- package/dist/components/actions/button-group/button-group.js +2 -2
- package/dist/components/actions/button-group/button-group.js.map +1 -1
- package/dist/components/actions/button-group/button-group.styles.js +1 -1
- package/dist/components/actions/icon-button/icon-button.d.ts +43 -11
- package/dist/components/actions/icon-button/icon-button.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.js +68 -14
- 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 +163 -106
- 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 +20 -2
- package/dist/components/actions/icon-button/icon-button.template.js.map +1 -1
- package/dist/components/actions/split-button/split-button.d.ts +5 -5
- package/dist/components/actions/split-button/split-button.d.ts.map +1 -1
- package/dist/components/actions/split-button/split-button.js +19 -15
- package/dist/components/actions/split-button/split-button.js.map +1 -1
- package/dist/components/actions/split-button/split-button.styles.js +1 -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 +14 -12
- package/dist/components/actions/split-button/split-button.template.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar.d.ts +4 -6
- package/dist/components/actions/toolbar/toolbar.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar.js +31 -28
- package/dist/components/actions/toolbar/toolbar.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar.styles.js +17 -17
- package/dist/components/actions/toolbar/toolbar.template.d.ts +3 -3
- package/dist/components/actions/toolbar/toolbar.template.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar.template.js +17 -9
- package/dist/components/actions/toolbar/toolbar.template.js.map +1 -1
- package/dist/components/components.js +1 -1
- package/dist/components/content/blockquote/blockquote.styles.js +6 -6
- package/dist/components/content/blockquote/blockquote.styles.js.map +1 -1
- package/dist/components/content/code/code.styles.js +3 -3
- package/dist/components/content/icon/icon-aliases.d.ts.map +1 -1
- package/dist/components/content/icon/icon-aliases.js +15 -0
- package/dist/components/content/icon/icon-aliases.js.map +1 -1
- package/dist/components/content/icon/icon-registry.d.ts.map +1 -1
- package/dist/components/content/icon/icon-registry.js +11 -5
- package/dist/components/content/icon/icon-registry.js.map +1 -1
- package/dist/components/content/icon/icon.styles.js +1 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.d.ts +22 -0
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.d.ts.map +1 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.js +46 -2
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.js +5 -5
- package/dist/components/content/rich-text/rich-text.d.ts +3 -1
- package/dist/components/content/rich-text/rich-text.d.ts.map +1 -1
- package/dist/components/content/rich-text/rich-text.js +6 -1
- package/dist/components/content/rich-text/rich-text.js.map +1 -1
- package/dist/components/content/tag/tag.d.ts +3 -3
- package/dist/components/content/tag/tag.d.ts.map +1 -1
- package/dist/components/content/tag/tag.js +3 -3
- package/dist/components/content/tag/tag.js.map +1 -1
- package/dist/components/content/tag/tag.styles.d.ts.map +1 -1
- package/dist/components/content/tag/tag.styles.js +113 -15
- package/dist/components/content/tag/tag.styles.js.map +1 -1
- package/dist/components/content/title/title.styles.js +20 -20
- package/dist/components/content/title/title.styles.js.map +1 -1
- package/dist/components/content/tooltip/tooltip.d.ts +13 -7
- package/dist/components/content/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/content/tooltip/tooltip.js +34 -22
- package/dist/components/content/tooltip/tooltip.js.map +1 -1
- package/dist/components/content/tooltip/tooltip.styles.js +8 -8
- package/dist/components/forms/form-actions/form-actions.styles.js +2 -2
- package/dist/components/forms/form-field/form-field.styles.js +6 -6
- package/dist/components/{index-CJ3mdHHo.js → index-1v33GjGX.js} +4134 -3286
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/inputs/checkbox/checkbox.styles.js +9 -9
- package/dist/components/inputs/checkbox-field/checkbox-field.styles.js +4 -4
- package/dist/components/inputs/code-editor/code-editor.styles.js +14 -14
- package/dist/components/inputs/combo-box/combo-box.d.ts +1 -1
- package/dist/components/inputs/combo-box/combo-box.d.ts.map +1 -1
- package/dist/components/inputs/combo-box/combo-box.js +8 -2
- package/dist/components/inputs/combo-box/combo-box.js.map +1 -1
- package/dist/components/inputs/combo-box/combo-box.styles.d.ts.map +1 -1
- package/dist/components/inputs/combo-box/combo-box.styles.js +17 -14
- package/dist/components/inputs/combo-box/combo-box.styles.js.map +1 -1
- package/dist/components/inputs/combo-box/combo-box.template.d.ts.map +1 -1
- package/dist/components/inputs/combo-box/combo-box.template.js +4 -2
- package/dist/components/inputs/combo-box/combo-box.template.js.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.d.ts +13 -1
- package/dist/components/inputs/dropdown/dropdown.d.ts.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.js +33 -2
- 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 -16
- package/dist/components/inputs/dropdown/dropdown.styles.js.map +1 -1
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.d.ts +1 -1
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.d.ts.map +1 -1
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.js +8 -2
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.js.map +1 -1
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.js +14 -11
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.js.map +1 -1
- package/dist/components/inputs/number-field/number-field.d.ts +2 -4
- package/dist/components/inputs/number-field/number-field.d.ts.map +1 -1
- package/dist/components/inputs/number-field/number-field.js +8 -12
- package/dist/components/inputs/number-field/number-field.js.map +1 -1
- package/dist/components/inputs/number-field/number-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/number-field/number-field.styles.js +19 -18
- package/dist/components/inputs/number-field/number-field.styles.js.map +1 -1
- package/dist/components/inputs/number-field/number-field.template.js +2 -2
- package/dist/components/inputs/password-field/password-field.d.ts +9 -9
- package/dist/components/inputs/password-field/password-field.d.ts.map +1 -1
- package/dist/components/inputs/password-field/password-field.js +24 -18
- package/dist/components/inputs/password-field/password-field.js.map +1 -1
- package/dist/components/inputs/password-field/password-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/password-field/password-field.styles.js +20 -17
- package/dist/components/inputs/password-field/password-field.styles.js.map +1 -1
- package/dist/components/inputs/password-field/password-field.template.js +3 -3
- package/dist/components/inputs/password-field/password-field.template.js.map +1 -1
- package/dist/components/inputs/radio-button/radio-button.styles.js +11 -11
- package/dist/components/inputs/radio-button-field/radio-button-field.styles.js +4 -4
- package/dist/components/inputs/search-field/search-field.d.ts +1 -1
- package/dist/components/inputs/search-field/search-field.d.ts.map +1 -1
- package/dist/components/inputs/search-field/search-field.js +8 -2
- package/dist/components/inputs/search-field/search-field.js.map +1 -1
- package/dist/components/inputs/search-field/search-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/search-field/search-field.styles.js +19 -16
- package/dist/components/inputs/search-field/search-field.styles.js.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.d.ts +8 -2
- package/dist/components/inputs/segmented-control/segmented-control.d.ts.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.js +25 -4
- 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 +78 -107
- package/dist/components/inputs/segmented-control/segmented-control.styles.js.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.template.js +1 -1
- package/dist/components/inputs/stepper/stepper.styles.js +2 -2
- package/dist/components/inputs/stepper/stepper.template.js +2 -2
- package/dist/components/inputs/switch/switch.styles.js +13 -13
- package/dist/components/inputs/switch-field/switch-field.styles.js +4 -4
- package/dist/components/inputs/text-field/text-field.d.ts +1 -1
- package/dist/components/inputs/text-field/text-field.d.ts.map +1 -1
- package/dist/components/inputs/text-field/text-field.js +8 -2
- package/dist/components/inputs/text-field/text-field.js.map +1 -1
- package/dist/components/inputs/text-field/text-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/text-field/text-field.styles.js +19 -16
- package/dist/components/inputs/text-field/text-field.styles.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 +38 -18
- package/dist/components/inputs/toggle-button/toggle-button.styles.js.map +1 -1
- package/dist/components/inputs/token/token.d.ts +3 -3
- package/dist/components/inputs/token/token.d.ts.map +1 -1
- package/dist/components/inputs/token/token.js +6 -6
- package/dist/components/inputs/token/token.js.map +1 -1
- package/dist/components/inputs/token/token.styles.js +7 -7
- package/dist/components/inputs/token/token.template.js +2 -2
- package/dist/components/inputs/token/token.template.js.map +1 -1
- package/dist/components/layout/app-view/app-view.styles.js +4 -4
- package/dist/components/layout/box/box.styles.js +2 -2
- package/dist/components/layout/card/card.js +1 -1
- package/dist/components/layout/card/card.js.map +1 -1
- package/dist/components/layout/card/card.styles.js +4 -4
- package/dist/components/layout/collection/collection.styles.js +6 -6
- package/dist/components/layout/container/container.d.ts +4 -4
- package/dist/components/layout/container/container.js +4 -4
- package/dist/components/layout/container/container.styles.js +399 -399
- package/dist/components/layout/container/container.styles.js.map +1 -1
- package/dist/components/layout/divider/divider.styles.js +2 -2
- package/dist/components/layout/page/page.js +1 -1
- package/dist/components/layout/page/page.js.map +1 -1
- package/dist/components/layout/page/page.styles.js +9 -9
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts +6 -3
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js +21 -5
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js.map +1 -1
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.styles.d.ts.map +1 -1
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.styles.js +24 -23
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.styles.js.map +1 -1
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.d.ts +6 -3
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js +21 -5
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js.map +1 -1
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.styles.js +18 -18
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.styles.js.map +1 -1
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.d.ts +6 -3
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js +21 -5
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js.map +1 -1
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.styles.js +18 -18
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.styles.js.map +1 -1
- package/dist/components/layout/page-sections/simple-section/simple-section.d.ts +6 -3
- package/dist/components/layout/page-sections/simple-section/simple-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/simple-section/simple-section.js +21 -5
- package/dist/components/layout/page-sections/simple-section/simple-section.js.map +1 -1
- package/dist/components/layout/page-sections/simple-section/simple-section.styles.js +23 -23
- package/dist/components/layout/page-sections/simple-section/simple-section.styles.js.map +1 -1
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.d.ts +6 -3
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js +21 -5
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js.map +1 -1
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.styles.js +18 -18
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.styles.js.map +1 -1
- package/dist/components/layout/popover/popover.js +1 -1
- package/dist/components/layout/popover/popover.js.map +1 -1
- package/dist/components/layout/popover/popover.styles.js +4 -4
- package/dist/components/layout/sheet/sheet.d.ts +17 -4
- package/dist/components/layout/sheet/sheet.d.ts.map +1 -1
- package/dist/components/layout/sheet/sheet.js +43 -9
- package/dist/components/layout/sheet/sheet.js.map +1 -1
- package/dist/components/layout/sheet/sheet.styles.d.ts.map +1 -1
- package/dist/components/layout/sheet/sheet.styles.js +33 -40
- package/dist/components/layout/sheet/sheet.styles.js.map +1 -1
- package/dist/components/layout/spacer/spacer.styles.js +5 -5
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.styles.js +9 -9
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.styles.js +34 -34
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.styles.js +6 -6
- package/dist/components/layout/split-views/split-view-divider/split-view-divider.styles.js +4 -4
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.js +1 -1
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.js.map +1 -1
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.styles.js +3 -3
- package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.styles.js +7 -7
- package/dist/components/layout/window/window.js +1 -1
- package/dist/components/layout/window/window.js.map +1 -1
- package/dist/components/layout/window/window.styles.js +8 -8
- package/dist/components/lists-and-menus/cells/cell/cell.d.ts +4 -2
- package/dist/components/lists-and-menus/cells/cell/cell.d.ts.map +1 -1
- package/dist/components/lists-and-menus/cells/cell/cell.js +17 -6
- package/dist/components/lists-and-menus/cells/cell/cell.js.map +1 -1
- package/dist/components/lists-and-menus/cells/cell/cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-menus/cells/cell/cell.styles.js +26 -15
- package/dist/components/lists-and-menus/cells/cell/cell.styles.js.map +1 -1
- package/dist/components/lists-and-menus/cells/description-cell/description-cell.d.ts +2 -2
- package/dist/components/lists-and-menus/cells/description-cell/description-cell.d.ts.map +1 -1
- package/dist/components/lists-and-menus/cells/description-cell/description-cell.js +12 -7
- package/dist/components/lists-and-menus/cells/description-cell/description-cell.js.map +1 -1
- package/dist/components/lists-and-menus/cells/description-cell/description-cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-menus/cells/description-cell/description-cell.styles.js +9 -8
- package/dist/components/lists-and-menus/cells/description-cell/description-cell.styles.js.map +1 -1
- package/dist/components/lists-and-menus/cells/drag-handle-cell/drag-handle-cell.styles.js +9 -9
- package/dist/components/lists-and-menus/cells/icon-cell/icon-cell.d.ts.map +1 -1
- package/dist/components/lists-and-menus/cells/icon-cell/icon-cell.js +1 -1
- package/dist/components/lists-and-menus/cells/icon-cell/icon-cell.js.map +1 -1
- package/dist/components/lists-and-menus/cells/spacer-cell/spacer-cell.d.ts.map +1 -1
- package/dist/components/lists-and-menus/cells/spacer-cell/spacer-cell.js +1 -1
- package/dist/components/lists-and-menus/cells/spacer-cell/spacer-cell.js.map +1 -1
- package/dist/components/lists-and-menus/cells/spacer-cell/spacer-cell.styles.js +1 -1
- package/dist/components/lists-and-menus/cells/text-cell/text-cell.d.ts +3 -4
- package/dist/components/lists-and-menus/cells/text-cell/text-cell.d.ts.map +1 -1
- package/dist/components/lists-and-menus/cells/text-cell/text-cell.js +13 -9
- package/dist/components/lists-and-menus/cells/text-cell/text-cell.js.map +1 -1
- package/dist/components/lists-and-menus/cells/text-cell/text-cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-menus/cells/text-cell/text-cell.styles.js +26 -9
- package/dist/components/lists-and-menus/cells/text-cell/text-cell.styles.js.map +1 -1
- package/dist/components/lists-and-menus/cells/title-cell/title-cell.d.ts +3 -4
- package/dist/components/lists-and-menus/cells/title-cell/title-cell.d.ts.map +1 -1
- package/dist/components/lists-and-menus/cells/title-cell/title-cell.js +12 -8
- package/dist/components/lists-and-menus/cells/title-cell/title-cell.js.map +1 -1
- package/dist/components/lists-and-menus/cells/title-cell/title-cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-menus/cells/title-cell/title-cell.styles.js +26 -9
- package/dist/components/lists-and-menus/cells/title-cell/title-cell.styles.js.map +1 -1
- package/dist/components/lists-and-menus/list/list.d.ts.map +1 -1
- package/dist/components/lists-and-menus/list/list.i18n.js +1 -1
- package/dist/components/lists-and-menus/list/list.i18n.js.map +1 -1
- package/dist/components/lists-and-menus/list/list.js +7 -0
- package/dist/components/lists-and-menus/list/list.js.map +1 -1
- package/dist/components/lists-and-menus/list/list.styles.js +13 -13
- package/dist/components/lists-and-menus/list-item/list-item.styles.js +21 -21
- package/dist/components/lists-and-menus/menu/menu.d.ts +160 -29
- package/dist/components/lists-and-menus/menu/menu.d.ts.map +1 -1
- package/dist/components/lists-and-menus/menu/menu.i18n.d.ts +2 -0
- package/dist/components/lists-and-menus/menu/menu.i18n.d.ts.map +1 -1
- package/dist/components/lists-and-menus/menu/menu.i18n.js +2 -0
- package/dist/components/lists-and-menus/menu/menu.i18n.js.map +1 -1
- package/dist/components/lists-and-menus/menu/menu.js +534 -102
- package/dist/components/lists-and-menus/menu/menu.js.map +1 -1
- package/dist/components/lists-and-menus/menu/menu.styles.d.ts.map +1 -1
- package/dist/components/lists-and-menus/menu/menu.styles.js +93 -32
- package/dist/components/lists-and-menus/menu/menu.styles.js.map +1 -1
- package/dist/components/lists-and-menus/menu/menu.template.d.ts.map +1 -1
- package/dist/components/lists-and-menus/menu/menu.template.js +13 -0
- package/dist/components/lists-and-menus/menu/menu.template.js.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.d.ts +0 -2
- package/dist/components/navigation/document-tab-bar/document-tab-bar.d.ts.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.js +20 -22
- package/dist/components/navigation/document-tab-bar/document-tab-bar.js.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.js +48 -48
- package/dist/components/navigation/document-tab-bar/document-tab-bar.template.d.ts.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.template.js +12 -10
- package/dist/components/navigation/document-tab-bar/document-tab-bar.template.js.map +1 -1
- package/dist/components/navigation/link/link.d.ts.map +1 -0
- package/dist/components/navigation/link/link.js.map +1 -0
- package/dist/components/navigation/link/link.styles.d.ts.map +1 -0
- package/dist/components/{actions → navigation}/link/link.styles.js +4 -4
- package/dist/components/navigation/link/link.styles.js.map +1 -0
- package/dist/components/navigation/link/link.template.d.ts.map +1 -0
- package/dist/components/navigation/link/link.template.js.map +1 -0
- package/dist/components/navigation/menu-bar/menu-bar.d.ts +17 -5
- package/dist/components/navigation/menu-bar/menu-bar.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar/menu-bar.js +80 -35
- package/dist/components/navigation/menu-bar/menu-bar.js.map +1 -1
- package/dist/components/navigation/menu-bar/menu-bar.styles.js +2 -2
- package/dist/components/navigation/menu-bar/menu-bar.template.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar/menu-bar.template.js +12 -2
- 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 +17 -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 +28 -6
- package/dist/components/navigation/menu-bar-item/menu-bar-item.js.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.styles.js +21 -21
- package/dist/components/navigation/menu-bar-item/menu-bar-item.template.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.template.js +3 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.template.js.map +1 -1
- package/dist/components/navigation/pagination/pagination.d.ts +15 -2
- package/dist/components/navigation/pagination/pagination.d.ts.map +1 -1
- package/dist/components/navigation/pagination/pagination.js +24 -4
- package/dist/components/navigation/pagination/pagination.js.map +1 -1
- package/dist/components/navigation/pagination/pagination.styles.d.ts.map +1 -1
- package/dist/components/navigation/pagination/pagination.styles.js +48 -76
- package/dist/components/navigation/pagination/pagination.styles.js.map +1 -1
- package/dist/components/navigation/pagination/pagination.template.d.ts.map +1 -1
- package/dist/components/navigation/pagination/pagination.template.js +23 -16
- package/dist/components/navigation/pagination/pagination.template.js.map +1 -1
- package/dist/components/navigation/skip-link/skip-link.styles.js +9 -9
- package/dist/components/navigation/tab-bar/tab-bar.d.ts +3 -1
- package/dist/components/navigation/tab-bar/tab-bar.d.ts.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.js +5 -3
- package/dist/components/navigation/tab-bar/tab-bar.js.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.styles.js +55 -58
- package/dist/components/navigation/tab-bar/tab-bar.styles.js.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js +2 -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 +57 -70
- 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.styles.d.ts.map +1 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.styles.js +16 -14
- package/dist/components/navigation/top-title-bar/top-title-bar.styles.js.map +1 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.template.d.ts.map +1 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.template.js +1 -0
- package/dist/components/navigation/top-title-bar/top-title-bar.template.js.map +1 -1
- package/dist/components/{prism-typescript-Cdpexfvg.js → prism-typescript-D2EqsCqV.js} +1 -1
- package/dist/components/status-and-feedback/badge/badge.d.ts +3 -3
- package/dist/components/status-and-feedback/badge/badge.d.ts.map +1 -1
- package/dist/components/status-and-feedback/badge/badge.js +3 -3
- package/dist/components/status-and-feedback/badge/badge.js.map +1 -1
- package/dist/components/status-and-feedback/badge/badge.styles.js +13 -13
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.js +7 -7
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.styles.js +5 -5
- package/dist/css/global.css +1 -0
- package/dist/css/reset.css +7 -0
- package/dist/css/rich-text.css +106 -79
- package/dist/css/settings.css +121 -89
- package/dist/utilities/os.d.ts +27 -0
- package/dist/utilities/os.d.ts.map +1 -0
- package/dist/utilities/os.js +60 -0
- package/dist/utilities/os.js.map +1 -0
- package/dist/utilities/visibility-mixin.d.ts +18 -12
- package/dist/utilities/visibility-mixin.d.ts.map +1 -1
- package/dist/utilities/visibility-mixin.js +21 -14
- package/dist/utilities/visibility-mixin.js.map +1 -1
- package/package.json +6 -6
- package/dist/components/actions/link/link.d.ts.map +0 -1
- package/dist/components/actions/link/link.js.map +0 -1
- package/dist/components/actions/link/link.styles.d.ts.map +0 -1
- package/dist/components/actions/link/link.styles.js.map +0 -1
- package/dist/components/actions/link/link.template.d.ts.map +0 -1
- package/dist/components/actions/link/link.template.js.map +0 -1
- /package/dist/components/{actions → navigation}/link/link.d.ts +0 -0
- /package/dist/components/{actions → navigation}/link/link.js +0 -0
- /package/dist/components/{actions → navigation}/link/link.styles.d.ts +0 -0
- /package/dist/components/{actions → navigation}/link/link.template.d.ts +0 -0
- /package/dist/components/{actions → navigation}/link/link.template.js +0 -0
|
@@ -5,11 +5,19 @@ export const iconButtonStyles = css `
|
|
|
5
5
|
/* # Host */
|
|
6
6
|
|
|
7
7
|
:host {
|
|
8
|
+
--_width: auto;
|
|
9
|
+
--_disclosure-icon-size: var(--primitives-space-20);
|
|
10
|
+
|
|
8
11
|
display: inline-block;
|
|
12
|
+
max-width: 100%;
|
|
9
13
|
-webkit-tap-highlight-color: transparent;
|
|
10
14
|
}
|
|
11
15
|
|
|
12
|
-
:host([
|
|
16
|
+
:host([size='xs']) {
|
|
17
|
+
--_disclosure-icon-size: var(--primitives-space-16);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:host([width="full"]) {
|
|
13
21
|
display: block;
|
|
14
22
|
width: 100%;
|
|
15
23
|
flex-grow: 1;
|
|
@@ -28,20 +36,27 @@ export const iconButtonStyles = css `
|
|
|
28
36
|
/* # Block */
|
|
29
37
|
|
|
30
38
|
.icon-button {
|
|
31
|
-
appearance: none;
|
|
32
|
-
border: none;
|
|
33
|
-
margin: 0;
|
|
34
|
-
padding: 0;
|
|
35
|
-
background: none;
|
|
36
|
-
font: inherit;
|
|
37
39
|
box-sizing: border-box;
|
|
38
40
|
display: inline-flex;
|
|
41
|
+
margin: 0;
|
|
42
|
+
border: none;
|
|
43
|
+
background: none;
|
|
44
|
+
width: var(--_width);
|
|
45
|
+
padding: 0;
|
|
39
46
|
flex-direction: column;
|
|
40
47
|
align-items: center;
|
|
41
48
|
justify-content: center;
|
|
49
|
+
font: inherit;
|
|
50
|
+
text-decoration: none;
|
|
51
|
+
appearance: none;
|
|
42
52
|
transition:
|
|
43
53
|
background-color var(--primitives-transition-duration-fast) var(--primitives-transition-easing-default),
|
|
44
|
-
color var(--primitives-transition-duration-fast) var(--primitives-transition-easing-default)
|
|
54
|
+
color var(--primitives-transition-duration-fast) var(--primitives-transition-easing-default)
|
|
55
|
+
;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
a.icon-button {
|
|
59
|
+
cursor: var(--semantics-controls-link-cursor);
|
|
45
60
|
}
|
|
46
61
|
|
|
47
62
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -50,10 +65,6 @@ export const iconButtonStyles = css `
|
|
|
50
65
|
}
|
|
51
66
|
}
|
|
52
67
|
|
|
53
|
-
a.icon-button {
|
|
54
|
-
cursor: var(--semantics-controls-link-cursor);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
68
|
|
|
58
69
|
/* # Focus */
|
|
59
70
|
|
|
@@ -73,101 +84,49 @@ export const iconButtonStyles = css `
|
|
|
73
84
|
/* ## Size: XS */
|
|
74
85
|
|
|
75
86
|
:host([size='xs']) .icon-button {
|
|
76
|
-
|
|
87
|
+
border-radius: var(--semantics-controls-xs-corner-radius);
|
|
77
88
|
height: var(--semantics-controls-xs-min-size);
|
|
78
89
|
min-width: var(--semantics-controls-xs-min-size);
|
|
79
90
|
min-height: var(--semantics-controls-xs-min-size);
|
|
80
|
-
padding: var(--
|
|
81
|
-
border-radius: var(--semantics-controls-xs-corner-radius);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
:host([size='xs']) .icon-button__icon {
|
|
85
|
-
width: var(--primitives-space-16);
|
|
86
|
-
height: var(--primitives-space-16);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
:host([size='xs']) .icon-button__disclosure-icon {
|
|
90
|
-
width: var(--primitives-space-16);
|
|
91
|
-
height: var(--primitives-space-16);
|
|
91
|
+
padding: calc((var(--semantics-controls-xs-min-size) - var(--semantics-buttons-xs-icon-only-icon-size)) / 2);
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
/* ## Size: SM */
|
|
95
95
|
|
|
96
96
|
:host([size='sm']) .icon-button {
|
|
97
|
-
|
|
97
|
+
border-radius: var(--semantics-controls-sm-corner-radius);
|
|
98
98
|
height: var(--semantics-controls-sm-min-size);
|
|
99
99
|
min-width: var(--semantics-controls-sm-min-size);
|
|
100
100
|
min-height: var(--semantics-controls-sm-min-size);
|
|
101
|
-
padding: var(--
|
|
102
|
-
border-radius: var(--semantics-controls-sm-corner-radius);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
:host([size='sm']) .icon-button__icon {
|
|
106
|
-
width: var(--primitives-space-20);
|
|
107
|
-
height: var(--primitives-space-20);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
:host([size='sm']) .icon-button__disclosure-icon {
|
|
111
|
-
width: var(--primitives-space-20);
|
|
112
|
-
height: var(--primitives-space-20);
|
|
113
|
-
margin-right: calc(var(--primitives-space-2) * -1);
|
|
101
|
+
padding: calc((var(--semantics-controls-sm-min-size) - var(--semantics-buttons-sm-icon-only-icon-size)) / 2);
|
|
114
102
|
}
|
|
115
103
|
|
|
116
104
|
/* ## Size: MD (Default) */
|
|
117
105
|
|
|
118
106
|
:host([size='md']) .icon-button,
|
|
119
107
|
:host(:not([size])) .icon-button {
|
|
120
|
-
|
|
108
|
+
border-radius: var(--semantics-controls-md-corner-radius);
|
|
121
109
|
height: var(--semantics-controls-md-min-size);
|
|
122
110
|
min-width: var(--semantics-controls-md-min-size);
|
|
123
111
|
min-height: var(--semantics-controls-md-min-size);
|
|
124
|
-
padding: var(--
|
|
125
|
-
border-radius: var(--semantics-controls-md-corner-radius);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
:host([size='md']) .icon-button__icon,
|
|
129
|
-
:host(:not([size])) .icon-button__icon {
|
|
130
|
-
width: var(--primitives-space-24);
|
|
131
|
-
height: var(--primitives-space-24);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
:host([size='md']) .icon-button__disclosure-icon,
|
|
135
|
-
:host(:not([size])) .icon-button__disclosure-icon {
|
|
136
|
-
width: var(--primitives-space-20);
|
|
137
|
-
height: var(--primitives-space-20);
|
|
138
|
-
margin-right: calc(var(--primitives-space-2) * -1);
|
|
112
|
+
padding: calc((var(--semantics-controls-md-min-size) - var(--semantics-buttons-md-icon-only-icon-size)) / 2);
|
|
139
113
|
}
|
|
140
114
|
|
|
141
115
|
/* ## Size: LG */
|
|
142
116
|
|
|
143
117
|
:host([size='lg']) .icon-button {
|
|
144
|
-
|
|
118
|
+
border-radius: var(--semantics-controls-lg-corner-radius);
|
|
145
119
|
height: var(--semantics-controls-lg-min-size);
|
|
146
120
|
min-width: var(--semantics-controls-lg-min-size);
|
|
147
121
|
min-height: var(--semantics-controls-lg-min-size);
|
|
148
122
|
padding: var(--primitives-space-8);
|
|
149
|
-
border-radius: var(--semantics-controls-lg-corner-radius);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
:host([size='lg']) .icon-button__icon {
|
|
153
|
-
width: var(--primitives-space-24);
|
|
154
|
-
height: var(--primitives-space-24);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
:host([size='lg']) .icon-button__disclosure-icon {
|
|
158
|
-
width: var(--primitives-space-20);
|
|
159
|
-
height: var(--primitives-space-20);
|
|
160
|
-
margin-right: calc(var(--primitives-space-2) * -1);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
:host([full-width]) .icon-button {
|
|
164
|
-
width: 100%;
|
|
165
123
|
}
|
|
166
124
|
|
|
167
|
-
|
|
168
125
|
/* # Variants */
|
|
169
126
|
|
|
170
|
-
/* ##
|
|
127
|
+
/* ## Neutral Tinted (Secondary, Default) */
|
|
128
|
+
|
|
129
|
+
/* ### Default neutral tinted icon button */
|
|
171
130
|
|
|
172
131
|
:host([variant='neutral-tinted']) .icon-button,
|
|
173
132
|
:host([variant='secondary']) .icon-button,
|
|
@@ -176,6 +135,8 @@ export const iconButtonStyles = css `
|
|
|
176
135
|
color: var(--semantics-buttons-neutral-tinted-content-color);
|
|
177
136
|
}
|
|
178
137
|
|
|
138
|
+
/* ### Hovered neutral tinted icon button */
|
|
139
|
+
|
|
179
140
|
@media (hover: hover) {
|
|
180
141
|
:host([variant='neutral-tinted']) .icon-button:hover,
|
|
181
142
|
:host([variant='secondary']) .icon-button:hover,
|
|
@@ -185,6 +146,8 @@ export const iconButtonStyles = css `
|
|
|
185
146
|
}
|
|
186
147
|
}
|
|
187
148
|
|
|
149
|
+
/* ### Active neutral tinted icon button */
|
|
150
|
+
|
|
188
151
|
:host([variant='neutral-tinted']) .icon-button:active,
|
|
189
152
|
:host([variant='secondary']) .icon-button:active,
|
|
190
153
|
:host(:not([variant])) .icon-button:active {
|
|
@@ -192,13 +155,46 @@ export const iconButtonStyles = css `
|
|
|
192
155
|
color: var(--semantics-buttons-neutral-tinted-is-active-content-color);
|
|
193
156
|
}
|
|
194
157
|
|
|
195
|
-
/*
|
|
158
|
+
/* ### Open neutral tinted icon button */
|
|
159
|
+
|
|
160
|
+
:host([expanded][variant='neutral-tinted']) .icon-button,
|
|
161
|
+
:host([expanded][variant='secondary']) .icon-button,
|
|
162
|
+
:host([expanded]:not([variant])) .icon-button {
|
|
163
|
+
background-color: var(--semantics-buttons-neutral-tinted-is-expanded-background-color);
|
|
164
|
+
color: var(--semantics-buttons-neutral-tinted-is-expanded-content-color);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/* ### Open hovered neutral tinted icon button */
|
|
168
|
+
|
|
169
|
+
@media (hover: hover) {
|
|
170
|
+
:host([expanded][variant='neutral-tinted']) .icon-button:hover,
|
|
171
|
+
:host([expanded][variant='secondary']) .icon-button:hover,
|
|
172
|
+
:host([expanded]:not([variant])) .icon-button:hover {
|
|
173
|
+
background-color: var(--semantics-buttons-neutral-tinted-is-expanded-is-hovered-background-color);
|
|
174
|
+
color: var(--semantics-buttons-neutral-tinted-is-expanded-is-hovered-content-color);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/* ### Open active neutral tinted icon button */
|
|
179
|
+
|
|
180
|
+
:host([expanded][variant='neutral-tinted']) .icon-button:active,
|
|
181
|
+
:host([expanded][variant='secondary']) .icon-button:active,
|
|
182
|
+
:host([expanded]:not([variant])) .icon-button:active {
|
|
183
|
+
background-color: var(--semantics-buttons-neutral-tinted-is-expanded-is-active-background-color);
|
|
184
|
+
color: var(--semantics-buttons-neutral-tinted-is-expanded-is-active-content-color);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/* ## Neutral Transparent */
|
|
188
|
+
|
|
189
|
+
/* ### Default neutral transparent icon button */
|
|
196
190
|
|
|
197
191
|
:host([variant='neutral-transparent']) .icon-button {
|
|
198
192
|
background-color: transparent;
|
|
199
193
|
color: var(--semantics-buttons-neutral-transparent-content-color);
|
|
200
194
|
}
|
|
201
195
|
|
|
196
|
+
/* ### Hovered neutral transparent icon button */
|
|
197
|
+
|
|
202
198
|
@media (hover: hover) {
|
|
203
199
|
:host([variant='neutral-transparent']) .icon-button:hover {
|
|
204
200
|
background-color: transparent;
|
|
@@ -206,11 +202,15 @@ export const iconButtonStyles = css `
|
|
|
206
202
|
}
|
|
207
203
|
}
|
|
208
204
|
|
|
205
|
+
/* ### Active neutral transparent icon button */
|
|
206
|
+
|
|
209
207
|
:host([variant='neutral-transparent']) .icon-button:active {
|
|
210
208
|
color: var(--semantics-buttons-neutral-transparent-is-active-content-color);
|
|
211
209
|
}
|
|
212
210
|
|
|
213
|
-
/* ##
|
|
211
|
+
/* ## Accent Filled (Primary) */
|
|
212
|
+
|
|
213
|
+
/* ### Default accent filled icon button */
|
|
214
214
|
|
|
215
215
|
:host([variant='accent-filled']) .icon-button,
|
|
216
216
|
:host([variant='primary']) .icon-button {
|
|
@@ -218,6 +218,8 @@ export const iconButtonStyles = css `
|
|
|
218
218
|
color: var(--semantics-buttons-accent-filled-content-color);
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
+
/* ### Hovered accent filled icon button */
|
|
222
|
+
|
|
221
223
|
@media (hover: hover) {
|
|
222
224
|
:host([variant='accent-filled']) .icon-button:hover,
|
|
223
225
|
:host([variant='primary']) .icon-button:hover {
|
|
@@ -226,68 +228,66 @@ export const iconButtonStyles = css `
|
|
|
226
228
|
}
|
|
227
229
|
}
|
|
228
230
|
|
|
231
|
+
/* ### Active accent filled icon button */
|
|
232
|
+
|
|
229
233
|
:host([variant='accent-filled']) .icon-button:active,
|
|
230
234
|
:host([variant='primary']) .icon-button:active {
|
|
231
235
|
background-color: var(--semantics-buttons-accent-filled-is-active-background-color);
|
|
232
236
|
color: var(--semantics-buttons-accent-filled-is-active-content-color);
|
|
233
237
|
}
|
|
234
238
|
|
|
235
|
-
/*
|
|
236
|
-
|
|
237
|
-
:host([variant='accent-outlined']) .icon-button {
|
|
238
|
-
background-color: transparent;
|
|
239
|
-
border-width: var(--semantics-buttons-accent-outlined-border-thickness);
|
|
240
|
-
border-style: solid;
|
|
241
|
-
border-color: var(--semantics-buttons-accent-outlined-border-color);
|
|
242
|
-
color: var(--semantics-buttons-accent-outlined-content-color);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
:host([variant='accent-outlined'][size='lg']) .icon-button {
|
|
246
|
-
padding: calc(var(--primitives-space-8) - var(--semantics-buttons-accent-outlined-border-thickness));
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
:host([variant='accent-outlined'][size='md']) .icon-button {
|
|
250
|
-
padding: calc(var(--primitives-space-8) - var(--semantics-buttons-accent-outlined-border-thickness));
|
|
251
|
-
}
|
|
239
|
+
/* ### Open accent filled icon button */
|
|
252
240
|
|
|
253
|
-
:host([variant='accent-
|
|
254
|
-
|
|
241
|
+
:host([expanded][variant='accent-filled']) .icon-button,
|
|
242
|
+
:host([expanded][variant='primary']) .icon-button {
|
|
243
|
+
background-color: var(--semantics-buttons-accent-filled-is-expanded-background-color);
|
|
244
|
+
color: var(--semantics-buttons-accent-filled-is-expanded-content-color);
|
|
255
245
|
}
|
|
256
246
|
|
|
257
|
-
|
|
258
|
-
padding: calc(var(--primitives-space-4) - var(--semantics-buttons-accent-outlined-border-thickness));
|
|
259
|
-
}
|
|
247
|
+
/* ### Open hovered accent filled icon button */
|
|
260
248
|
|
|
261
249
|
@media (hover: hover) {
|
|
262
|
-
:host([variant='accent-
|
|
263
|
-
|
|
264
|
-
color: var(--semantics-buttons-accent-
|
|
250
|
+
:host([expanded][variant='accent-filled']) .icon-button:hover,
|
|
251
|
+
:host([expanded][variant='primary']) .icon-button:hover {
|
|
252
|
+
background-color: var(--semantics-buttons-accent-filled-is-expanded-is-hovered-background-color);
|
|
253
|
+
color: var(--semantics-buttons-accent-filled-is-expanded-is-hovered-content-color);
|
|
265
254
|
}
|
|
266
255
|
}
|
|
267
256
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
257
|
+
/* ### Open active accent filled icon button */
|
|
258
|
+
|
|
259
|
+
:host([expanded][variant='accent-filled']) .icon-button:active,
|
|
260
|
+
:host([expanded][variant='primary']) .icon-button:active {
|
|
261
|
+
background-color: var(--semantics-buttons-accent-filled-is-expanded-is-active-background-color);
|
|
262
|
+
color: var(--semantics-buttons-accent-filled-is-expanded-is-active-content-color);
|
|
271
263
|
}
|
|
272
264
|
|
|
273
|
-
/* ##
|
|
265
|
+
/* ## Accent Transparent */
|
|
266
|
+
|
|
267
|
+
/* ### Default accent transparent icon button */
|
|
274
268
|
|
|
275
269
|
:host([variant='accent-transparent']) .icon-button {
|
|
276
270
|
background-color: transparent;
|
|
277
271
|
color: var(--semantics-buttons-accent-transparent-content-color);
|
|
278
272
|
}
|
|
279
273
|
|
|
274
|
+
/* ### Hovered accent transparent icon button */
|
|
275
|
+
|
|
280
276
|
@media (hover: hover) {
|
|
281
277
|
:host([variant='accent-transparent']) .icon-button:hover {
|
|
282
278
|
color: var(--semantics-buttons-accent-transparent-is-hovered-content-color);
|
|
283
279
|
}
|
|
284
280
|
}
|
|
285
281
|
|
|
282
|
+
/* ### Active accent transparent icon button */
|
|
283
|
+
|
|
286
284
|
:host([variant='accent-transparent']) .icon-button:active {
|
|
287
285
|
color: var(--semantics-buttons-accent-transparent-is-active-content-color);
|
|
288
286
|
}
|
|
289
287
|
|
|
290
|
-
/* ##
|
|
288
|
+
/* ## Critical Tinted (Destructive) */
|
|
289
|
+
|
|
290
|
+
/* ### Default critical tinted icon button */
|
|
291
291
|
|
|
292
292
|
:host([variant='critical-tinted']) .icon-button,
|
|
293
293
|
:host([variant='destructive']) .icon-button {
|
|
@@ -295,6 +295,8 @@ export const iconButtonStyles = css `
|
|
|
295
295
|
color: var(--semantics-buttons-critical-tinted-content-color);
|
|
296
296
|
}
|
|
297
297
|
|
|
298
|
+
/* ### Hovered critical tinted icon button */
|
|
299
|
+
|
|
298
300
|
@media (hover: hover) {
|
|
299
301
|
:host([variant='critical-tinted']) .icon-button:hover,
|
|
300
302
|
:host([variant='destructive']) .icon-button:hover {
|
|
@@ -303,12 +305,37 @@ export const iconButtonStyles = css `
|
|
|
303
305
|
}
|
|
304
306
|
}
|
|
305
307
|
|
|
308
|
+
/* ### Active critical tinted icon button */
|
|
309
|
+
|
|
306
310
|
:host([variant='critical-tinted']) .icon-button:active,
|
|
307
311
|
:host([variant='destructive']) .icon-button:active {
|
|
308
312
|
background-color: var(--semantics-buttons-critical-tinted-is-active-background-color);
|
|
309
313
|
color: var(--semantics-buttons-critical-tinted-is-active-content-color);
|
|
310
314
|
}
|
|
311
315
|
|
|
316
|
+
/* ## Critical Transparent */
|
|
317
|
+
|
|
318
|
+
/* ### Default critical transparent icon button */
|
|
319
|
+
|
|
320
|
+
:host([variant='critical-transparent']) .icon-button {
|
|
321
|
+
background-color: transparent;
|
|
322
|
+
color: var(--semantics-buttons-critical-transparent-content-color);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/* ### Hovered critical transparent icon button */
|
|
326
|
+
|
|
327
|
+
@media (hover: hover) {
|
|
328
|
+
:host([variant='critical-transparent']) .icon-button:hover {
|
|
329
|
+
color: var(--semantics-buttons-critical-transparent-is-hovered-content-color);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
/* ### Active critical transparent icon button */
|
|
334
|
+
|
|
335
|
+
:host([variant='critical-transparent']) .icon-button:active {
|
|
336
|
+
color: var(--semantics-buttons-critical-transparent-is-active-content-color);
|
|
337
|
+
}
|
|
338
|
+
|
|
312
339
|
|
|
313
340
|
/* # Elements */
|
|
314
341
|
|
|
@@ -326,11 +353,41 @@ export const iconButtonStyles = css `
|
|
|
326
353
|
justify-content: center;
|
|
327
354
|
}
|
|
328
355
|
|
|
356
|
+
:host([size='xs']) .icon-button__icon {
|
|
357
|
+
width: var(--semantics-buttons-xs-icon-only-icon-size);
|
|
358
|
+
height: var(--semantics-buttons-xs-icon-only-icon-size);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
:host([size='sm']) .icon-button__icon {
|
|
362
|
+
width: var(--semantics-buttons-sm-icon-only-icon-size);
|
|
363
|
+
height: var(--semantics-buttons-sm-icon-only-icon-size);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
:host([size='md']) .icon-button__icon,
|
|
367
|
+
:host(:not([size])) .icon-button__icon {
|
|
368
|
+
width: var(--semantics-buttons-md-icon-only-icon-size);
|
|
369
|
+
height: var(--semantics-buttons-md-icon-only-icon-size);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
:host([size='lg']) .icon-button__icon {
|
|
373
|
+
width: var(--semantics-buttons-md-icon-only-icon-size);
|
|
374
|
+
height: var(--semantics-buttons-md-icon-only-icon-size);
|
|
375
|
+
}
|
|
376
|
+
|
|
329
377
|
.icon-button__disclosure-icon {
|
|
330
378
|
display: flex;
|
|
379
|
+
width: var(--_disclosure-icon-size);
|
|
380
|
+
height: var(--_disclosure-icon-size);
|
|
331
381
|
flex-shrink: 0;
|
|
332
382
|
}
|
|
333
383
|
|
|
384
|
+
:host([size='sm']) .icon-button__disclosure-icon,
|
|
385
|
+
:host([size='md']) .icon-button__disclosure-icon,
|
|
386
|
+
:host(:not([size])) .icon-button__disclosure-icon,
|
|
387
|
+
:host([size='lg']) .icon-button__disclosure-icon {
|
|
388
|
+
margin-right: calc(var(--primitives-space-2) * -1);
|
|
389
|
+
}
|
|
390
|
+
|
|
334
391
|
.icon-button__text {
|
|
335
392
|
display: none;
|
|
336
393
|
text-align: center;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.styles.js","sourceRoot":"","sources":["../../../../src/components/actions/icon-button/icon-button.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"icon-button.styles.js","sourceRoot":"","sources":["../../../../src/components/actions/icon-button/icon-button.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgZlC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.template.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/icon-button/icon-button.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,kCAAkC,CAAC;AAsB1C,wBAAgB,QAAQ,CAAC,IAAI,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"icon-button.template.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/icon-button/icon-button.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,kCAAkC,CAAC;AAsB1C,wBAAgB,QAAQ,CAAC,IAAI,EAAE,cAAc,wCAmE5C"}
|
|
@@ -25,6 +25,13 @@ export function template() {
|
|
|
25
25
|
// Tooltip text: accessible-label always, or text when not visible (non-lg)
|
|
26
26
|
const tooltipText = this.accessibleLabel
|
|
27
27
|
|| (this.size !== 'lg' ? this.text : '');
|
|
28
|
+
// `expandable` (disclosure widget signal) or `popup-type` (popup container
|
|
29
|
+
// signal) both require aria-expanded to always be present so screen
|
|
30
|
+
// readers know the current open/closed state. Without one of these, only
|
|
31
|
+
// open=true forwards aria-expanded — keeps plain buttons free of
|
|
32
|
+
// irrelevant ARIA attributes.
|
|
33
|
+
const isDisclosure = this.expandable || !!this.popupType;
|
|
34
|
+
const ariaExpanded = isDisclosure ? String(this.expanded) : (this.expanded ? 'true' : nothing);
|
|
28
35
|
const renderButton = () => {
|
|
29
36
|
if (this.href) {
|
|
30
37
|
const resolvedRel = this._resolvedRel();
|
|
@@ -35,28 +42,39 @@ export function template() {
|
|
|
35
42
|
rel=${resolvedRel || nothing}
|
|
36
43
|
aria-disabled=${this.disabled ? 'true' : nothing}
|
|
37
44
|
aria-label=${label}
|
|
45
|
+
aria-haspopup=${this.popupType || nothing}
|
|
46
|
+
aria-expanded=${ariaExpanded}
|
|
38
47
|
@click=${this._handleClick}
|
|
39
48
|
>
|
|
40
49
|
${content}
|
|
41
50
|
</a>
|
|
42
51
|
`;
|
|
43
52
|
}
|
|
53
|
+
// .popoverTargetElement / .popoverTargetAction are bound unguarded: in
|
|
54
|
+
// browsers without Popover-invoker IDL support Lit sets a harmless
|
|
55
|
+
// expando and the cross-shadow association just doesn't take effect —
|
|
56
|
+
// but those browsers don't support the Popover API at all, so the menu
|
|
57
|
+
// this button drives is non-functional regardless. No capability check.
|
|
44
58
|
return html `
|
|
45
59
|
<button class="icon-button"
|
|
46
60
|
type=${this.type}
|
|
47
61
|
?disabled=${this.disabled}
|
|
48
62
|
aria-disabled=${this.disabled ? 'true' : nothing}
|
|
49
63
|
aria-label=${label}
|
|
64
|
+
aria-haspopup=${this.popupType || nothing}
|
|
65
|
+
aria-expanded=${ariaExpanded}
|
|
50
66
|
popovertarget=${this.popovertarget || nothing}
|
|
67
|
+
.popoverTargetElement=${this.popoverTargetElement}
|
|
68
|
+
.popoverTargetAction=${this.popoverTargetAction}
|
|
51
69
|
@click=${this._handleClick}
|
|
52
70
|
>
|
|
53
71
|
${content}
|
|
54
72
|
</button>
|
|
55
73
|
`;
|
|
56
74
|
};
|
|
57
|
-
if (tooltipText &&
|
|
75
|
+
if (tooltipText && this.tooltipTiming !== 'never') {
|
|
58
76
|
return html `
|
|
59
|
-
<nldd-tooltip text=${tooltipText}>
|
|
77
|
+
<nldd-tooltip text=${tooltipText} timing=${this.tooltipTiming}>
|
|
60
78
|
${renderButton()}
|
|
61
79
|
</nldd-tooltip>
|
|
62
80
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.template.js","sourceRoot":"","sources":["../../../../src/components/actions/icon-button/icon-button.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAEpC,OAAO,kCAAkC,CAAC;AAE1C,SAAS,aAAa,CAAC,SAAyB;IAC/C,OAAO,IAAI,CAAA;;;MAGN,SAAS,CAAC,IAAI;QACf,CAAC,CAAC,IAAI,CAAA,mBAAmB,SAAS,CAAC,IAAI,eAAe;QACtD,CAAC,CAAC,IAAI,CAAA,iCAAiC,SAAS,CAAC,aAAa,UAAU;;KAExE,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAA;;;;IAI5B,CAAC,CAAC,CAAC,OAAO;;IAEV,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA;qCACY,SAAS,CAAC,IAAI;GAChD,CAAC,CAAC,CAAC,EAAE;EACN,CAAC;AACH,CAAC;AAED,MAAM,UAAU,QAAQ;IACvB,MAAM,KAAK,GAAG,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,IAAI,IAAI,OAAO,CAAC;IAC3D,MAAM,OAAO,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IAEpC,2EAA2E;IAC3E,MAAM,WAAW,GAAG,IAAI,CAAC,eAAe;WACpC,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAE1C,MAAM,YAAY,GAAG,GAAG,EAAE;QACzB,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACf,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;YACxC,OAAO,IAAI,CAAA;;YAEF,IAAI,CAAC,IAAI;cACP,IAAI,CAAC,MAAM,IAAI,OAAO;WACzB,WAAW,IAAI,OAAO;qBACZ,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;kBACnC,KAAK;
|
|
1
|
+
{"version":3,"file":"icon-button.template.js","sourceRoot":"","sources":["../../../../src/components/actions/icon-button/icon-button.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAEpC,OAAO,kCAAkC,CAAC;AAE1C,SAAS,aAAa,CAAC,SAAyB;IAC/C,OAAO,IAAI,CAAA;;;MAGN,SAAS,CAAC,IAAI;QACf,CAAC,CAAC,IAAI,CAAA,mBAAmB,SAAS,CAAC,IAAI,eAAe;QACtD,CAAC,CAAC,IAAI,CAAA,iCAAiC,SAAS,CAAC,aAAa,UAAU;;KAExE,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAA;;;;IAI5B,CAAC,CAAC,CAAC,OAAO;;IAEV,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA;qCACY,SAAS,CAAC,IAAI;GAChD,CAAC,CAAC,CAAC,EAAE;EACN,CAAC;AACH,CAAC;AAED,MAAM,UAAU,QAAQ;IACvB,MAAM,KAAK,GAAG,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,IAAI,IAAI,OAAO,CAAC;IAC3D,MAAM,OAAO,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IAEpC,2EAA2E;IAC3E,MAAM,WAAW,GAAG,IAAI,CAAC,eAAe;WACpC,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAE1C,2EAA2E;IAC3E,oEAAoE;IACpE,yEAAyE;IACzE,iEAAiE;IACjE,8BAA8B;IAC9B,MAAM,YAAY,GAAG,IAAI,CAAC,UAAU,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC;IACzD,MAAM,YAAY,GAAG,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAE/F,MAAM,YAAY,GAAG,GAAG,EAAE;QACzB,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACf,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;YACxC,OAAO,IAAI,CAAA;;YAEF,IAAI,CAAC,IAAI;cACP,IAAI,CAAC,MAAM,IAAI,OAAO;WACzB,WAAW,IAAI,OAAO;qBACZ,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;kBACnC,KAAK;qBACF,IAAI,CAAC,SAAS,IAAI,OAAO;qBACzB,YAAY;cACnB,IAAI,CAAC,YAAY;;OAExB,OAAO;;IAEV,CAAC;QACH,CAAC;QAED,uEAAuE;QACvE,mEAAmE;QACnE,sEAAsE;QACtE,uEAAuE;QACvE,wEAAwE;QACxE,OAAO,IAAI,CAAA;;WAEF,IAAI,CAAC,IAAI;gBACJ,IAAI,CAAC,QAAQ;oBACT,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;iBACnC,KAAK;oBACF,IAAI,CAAC,SAAS,IAAI,OAAO;oBACzB,YAAY;oBACZ,IAAI,CAAC,aAAa,IAAI,OAAO;4BACrB,IAAI,CAAC,oBAAoB;2BAC1B,IAAI,CAAC,mBAAmB;aACtC,IAAI,CAAC,YAAY;;MAExB,OAAO;;GAEV,CAAC;IACH,CAAC,CAAC;IAEF,IAAI,WAAW,IAAI,IAAI,CAAC,aAAa,KAAK,OAAO,EAAE,CAAC;QACnD,OAAO,IAAI,CAAA;wBACW,WAAW,WAAW,IAAI,CAAC,aAAa;MAC1D,YAAY,EAAE;;GAEjB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,EAAE,CAAC;AACvB,CAAC"}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* @attr {string} variant - Button variant (default: 'neutral-tinted')
|
|
19
19
|
* @attr {boolean} disabled - Disabled state
|
|
20
20
|
* @attr {string} text - Button text for the primary action
|
|
21
|
-
* @attr {string}
|
|
21
|
+
* @attr {string} icon - Icon name shown before the text on the primary action button
|
|
22
22
|
* @attr {object} translations - Translations; unset keys fall back to Dutch
|
|
23
23
|
*
|
|
24
24
|
* @fires action-click - Fired when the main button is clicked
|
|
@@ -38,14 +38,14 @@ export declare class NLDDSplitButton extends LitElement {
|
|
|
38
38
|
disabled: boolean;
|
|
39
39
|
/** Button text for the primary action. */
|
|
40
40
|
text: string;
|
|
41
|
-
/** Icon name
|
|
42
|
-
|
|
41
|
+
/** Icon name shown before the text on the primary action button. */
|
|
42
|
+
icon: string;
|
|
43
43
|
translations: Partial<NLDDSplitButtonTranslations>;
|
|
44
|
-
private
|
|
44
|
+
private _popupButtonWrapper?;
|
|
45
45
|
private _menu?;
|
|
46
46
|
_menuIsOpen: boolean;
|
|
47
47
|
_hasMenuItems: boolean;
|
|
48
|
-
private
|
|
48
|
+
private _menuWasOpenOnPointerdown;
|
|
49
49
|
private _childObserver?;
|
|
50
50
|
_t(key: keyof NLDDSplitButtonTranslations): string;
|
|
51
51
|
firstUpdated(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"split-button.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/split-button/split-button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAKjC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,uBAAuB,CAAC;AAC/B,OAAO,iCAAiC,CAAC;AACzC,OAAO,oCAAoC,CAAC;AAG5C,MAAM,MAAM,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEtC,qBACa,eAAgB,SAAQ,UAAU;IAC9C,OAAgB,MAAM,0BAAqB;IAG3C,IAAI,EAAE,IAAI,CAAQ;IAGlB,OAAO,EAAE,MAAM,CAAoB;IAGnC,QAAQ,UAAS;IAEjB,0CAA0C;IAE1C,IAAI,SAAM;IAEV
|
|
1
|
+
{"version":3,"file":"split-button.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/split-button/split-button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAKjC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,uBAAuB,CAAC;AAC/B,OAAO,iCAAiC,CAAC;AACzC,OAAO,oCAAoC,CAAC;AAG5C,MAAM,MAAM,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEtC,qBACa,eAAgB,SAAQ,UAAU;IAC9C,OAAgB,MAAM,0BAAqB;IAG3C,IAAI,EAAE,IAAI,CAAQ;IAGlB,OAAO,EAAE,MAAM,CAAoB;IAGnC,QAAQ,UAAS;IAEjB,0CAA0C;IAE1C,IAAI,SAAM;IAEV,oEAAoE;IAEpE,IAAI,SAAM;IAGV,YAAY,EAAE,OAAO,CAAC,2BAA2B,CAAC,CAAM;IAMxD,OAAO,CAAC,mBAAmB,CAAC,CAAiB;IAG7C,OAAO,CAAC,KAAK,CAAC,CAAW;IAGzB,WAAW,UAAS;IAGpB,aAAa,UAAS;IACtB,OAAO,CAAC,yBAAyB,CAAS;IAC1C,OAAO,CAAC,cAAc,CAAC,CAAmB;IAInC,EAAE,CAAC,GAAG,EAAE,MAAM,2BAA2B,GAAG,MAAM;IAMhD,YAAY,IAAI,IAAI;IAqBpB,oBAAoB,IAAI,IAAI;IAOrC;;;;;;OAMG;IACH,OAAO,CAAC,cAAc;IAetB,OAAO,CAAC,iBAAiB,CAEvB;IAEF,kBAAkB,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;IAMvC,gBAAgB,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;IAa5B,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,mBAAmB,EAAE,eAAe,CAAC;KACrC;CACD"}
|
|
@@ -24,7 +24,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
24
24
|
* @attr {string} variant - Button variant (default: 'neutral-tinted')
|
|
25
25
|
* @attr {boolean} disabled - Disabled state
|
|
26
26
|
* @attr {string} text - Button text for the primary action
|
|
27
|
-
* @attr {string}
|
|
27
|
+
* @attr {string} icon - Icon name shown before the text on the primary action button
|
|
28
28
|
* @attr {object} translations - Translations; unset keys fall back to Dutch
|
|
29
29
|
*
|
|
30
30
|
* @fires action-click - Fired when the main button is clicked
|
|
@@ -47,12 +47,12 @@ let NLDDSplitButton = class NLDDSplitButton extends LitElement {
|
|
|
47
47
|
this.disabled = false;
|
|
48
48
|
/** Button text for the primary action. */
|
|
49
49
|
this.text = '';
|
|
50
|
-
/** Icon name
|
|
51
|
-
this.
|
|
50
|
+
/** Icon name shown before the text on the primary action button. */
|
|
51
|
+
this.icon = '';
|
|
52
52
|
this.translations = {};
|
|
53
53
|
this._menuIsOpen = false;
|
|
54
54
|
this._hasMenuItems = false;
|
|
55
|
-
this.
|
|
55
|
+
this._menuWasOpenOnPointerdown = false;
|
|
56
56
|
this._handleMenuToggle = (event) => {
|
|
57
57
|
this._menuIsOpen = event.newState === 'open';
|
|
58
58
|
};
|
|
@@ -71,11 +71,15 @@ let NLDDSplitButton = class NLDDSplitButton extends LitElement {
|
|
|
71
71
|
this._childObserver = new MutationObserver(() => this._syncMenuItems());
|
|
72
72
|
this._childObserver.observe(this, { childList: true });
|
|
73
73
|
// Capture open-state BEFORE the browser's light-dismiss fires on
|
|
74
|
-
//
|
|
74
|
+
// pointerdown. The subsequent click handler uses this snapshot to
|
|
75
75
|
// decide: was the popover open? → user clicked to close (no-op,
|
|
76
76
|
// light-dismiss already closed it). Was it closed? → open it.
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
// Pointerdown fires for mouse, touch and pen — `mousedown` alone
|
|
78
|
+
// would skip touch on mobile, where no mousedown precedes the
|
|
79
|
+
// synthetic click; the snapshot would stay false and the handler
|
|
80
|
+
// would re-open an already-light-dismissed menu.
|
|
81
|
+
this._popupButtonWrapper?.addEventListener('pointerdown', () => {
|
|
82
|
+
this._menuWasOpenOnPointerdown = this._menu?.matches(':popover-open') ?? false;
|
|
79
83
|
});
|
|
80
84
|
}
|
|
81
85
|
disconnectedCallback() {
|
|
@@ -92,7 +96,7 @@ let NLDDSplitButton = class NLDDSplitButton extends LitElement {
|
|
|
92
96
|
* `this.children`.
|
|
93
97
|
*/
|
|
94
98
|
_syncMenuItems() {
|
|
95
|
-
if (!this._menu || !this.
|
|
99
|
+
if (!this._menu || !this._popupButtonWrapper)
|
|
96
100
|
return;
|
|
97
101
|
const toMove = Array.from(this.children).filter((el) => el.matches('nldd-menu-item, nldd-menu-divider'));
|
|
98
102
|
toMove.forEach((item) => this._menu.appendChild(item));
|
|
@@ -100,7 +104,7 @@ let NLDDSplitButton = class NLDDSplitButton extends LitElement {
|
|
|
100
104
|
this._hasMenuItems =
|
|
101
105
|
this._menu.querySelectorAll('nldd-menu-item, nldd-menu-divider').length > 0;
|
|
102
106
|
if (this._hasMenuItems && !hadItems) {
|
|
103
|
-
this._menu.anchorElement = this.
|
|
107
|
+
this._menu.anchorElement = this._popupButtonWrapper;
|
|
104
108
|
this._menu.addEventListener('toggle', this._handleMenuToggle);
|
|
105
109
|
}
|
|
106
110
|
}
|
|
@@ -115,8 +119,8 @@ let NLDDSplitButton = class NLDDSplitButton extends LitElement {
|
|
|
115
119
|
return;
|
|
116
120
|
e.stopPropagation();
|
|
117
121
|
if (this._hasMenuItems && this._menu) {
|
|
118
|
-
const wasOpen = this.
|
|
119
|
-
this.
|
|
122
|
+
const wasOpen = this._menuWasOpenOnPointerdown;
|
|
123
|
+
this._menuWasOpenOnPointerdown = false;
|
|
120
124
|
if (wasOpen)
|
|
121
125
|
return; // light-dismiss already closed it
|
|
122
126
|
this._menu.showPopover();
|
|
@@ -142,14 +146,14 @@ __decorate([
|
|
|
142
146
|
property({ type: String })
|
|
143
147
|
], NLDDSplitButton.prototype, "text", void 0);
|
|
144
148
|
__decorate([
|
|
145
|
-
property({ type: String
|
|
146
|
-
], NLDDSplitButton.prototype, "
|
|
149
|
+
property({ type: String })
|
|
150
|
+
], NLDDSplitButton.prototype, "icon", void 0);
|
|
147
151
|
__decorate([
|
|
148
152
|
property({ type: Object })
|
|
149
153
|
], NLDDSplitButton.prototype, "translations", void 0);
|
|
150
154
|
__decorate([
|
|
151
|
-
query('.split-
|
|
152
|
-
], NLDDSplitButton.prototype, "
|
|
155
|
+
query('.split-button__popup-button')
|
|
156
|
+
], NLDDSplitButton.prototype, "_popupButtonWrapper", void 0);
|
|
153
157
|
__decorate([
|
|
154
158
|
query('.split-button__menu')
|
|
155
159
|
], NLDDSplitButton.prototype, "_menu", void 0);
|