@nldd/design-system 0.8.96 → 0.8.98
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 +14 -10
- package/custom-elements.json +528 -107
- package/dist/components/components.js +894 -267
- package/dist/components/content/code-viewer/code-viewer.d.ts +4 -1
- package/dist/components/content/code-viewer/code-viewer.d.ts.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.js +43 -5
- package/dist/components/content/code-viewer/code-viewer.js.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.styles.d.ts.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.styles.js +11 -0
- package/dist/components/content/code-viewer/code-viewer.styles.js.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.template.d.ts.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.template.js +1 -0
- package/dist/components/content/code-viewer/code-viewer.template.js.map +1 -1
- package/dist/components/content/icon/icon-aliases.js +1 -1
- package/dist/components/content/icon/icon-aliases.js.map +1 -1
- package/dist/components/content/icon/icon-gallery-status.d.ts.map +1 -1
- package/dist/components/content/icon/icon-gallery-status.js +15 -4
- package/dist/components/content/icon/icon-gallery-status.js.map +1 -1
- package/dist/components/content/icon/icon-registry.js +12 -12
- package/dist/components/content/icon/icon-registry.js.map +1 -1
- package/dist/components/content/image/image.d.ts +19 -3
- package/dist/components/content/image/image.d.ts.map +1 -1
- package/dist/components/content/image/image.js +25 -4
- package/dist/components/content/image/image.js.map +1 -1
- package/dist/components/content/image/image.styles.d.ts.map +1 -1
- package/dist/components/content/image/image.styles.js +36 -0
- package/dist/components/content/image/image.styles.js.map +1 -1
- package/dist/components/content/image/image.template.d.ts.map +1 -1
- package/dist/components/content/image/image.template.js +13 -1
- package/dist/components/content/image/image.template.js.map +1 -1
- package/dist/components/content/rich-text/rich-text.d.ts +25 -12
- package/dist/components/content/rich-text/rich-text.d.ts.map +1 -1
- package/dist/components/content/rich-text/rich-text.js +25 -12
- package/dist/components/content/rich-text/rich-text.js.map +1 -1
- package/dist/components/content/tooltip/tooltip.d.ts +7 -0
- package/dist/components/content/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/content/tooltip/tooltip.js +29 -2
- package/dist/components/content/tooltip/tooltip.js.map +1 -1
- package/dist/components/{dist-CH9m014O.js → dist-B2QcygzG.js} +1 -1
- package/dist/components/{dist-DMHTTJRJ.js → dist-BB5mlo7D.js} +2 -2
- package/dist/components/{dist-C3uWRipu.js → dist-Bo5Jeyfn.js} +1 -1
- package/dist/components/{dist-CpW8MF-L.js → dist-Bud_7w5g.js} +232 -214
- package/dist/components/{dist-CvL6_ezZ.js → dist-CA0yDFIt.js} +2 -2
- package/dist/components/{dist-DV6Mp5N1.js → dist-CaxHkqR2.js} +3 -3
- package/dist/components/{dist-BWRYv3Mp.js → dist-Ch3gNAuT.js} +1 -1
- package/dist/components/{dist-PlhQXXtE.js → dist-DbNhCpS5.js} +1 -1
- package/dist/components/{dist-DTOshgo1.js → dist-DkqAbJH8.js} +1 -1
- package/dist/components/{dist-BWEAw34D.js → dist-DnZmcpbQ.js} +1 -1
- package/dist/components/{dist-Bi4EHsFY.js → dist-iC2RTM0V.js} +2 -2
- package/dist/components/forms/validation-list/validation-list.d.ts +19 -9
- package/dist/components/forms/validation-list/validation-list.d.ts.map +1 -1
- package/dist/components/forms/validation-list/validation-list.js +38 -12
- package/dist/components/forms/validation-list/validation-list.js.map +1 -1
- package/dist/components/{icon-DQHT2C7z.js → icon-D_ZGezHx.js} +13 -13
- package/dist/components/{icon-button-mevRsl4C.js → icon-button-CJIikwyu.js} +16 -3
- 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/segmented-control/segmented-control.d.ts +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.d.ts.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.js +1 -4
- package/dist/components/inputs/segmented-control/segmented-control.js.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.d.ts +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.d.ts.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.js +1 -4
- package/dist/components/inputs/toggle-button/toggle-button.js.map +1 -1
- package/dist/components/layout/box/box.d.ts +1 -1
- package/dist/components/layout/box/box.js +1 -1
- package/dist/components/layout/container/container.d.ts.map +1 -1
- package/dist/components/layout/container/container.js +2 -1
- package/dist/components/layout/container/container.js.map +1 -1
- package/dist/components/layout/page/page.d.ts +9 -3
- package/dist/components/layout/page/page.d.ts.map +1 -1
- package/dist/components/layout/page/page.js +36 -13
- package/dist/components/layout/page/page.js.map +1 -1
- package/dist/components/layout/page/page.styles.js +1 -1
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts +2 -0
- 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 +3 -1
- 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 +5 -0
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.styles.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.d.ts +57 -11
- package/dist/components/layout/page-sections/hero/hero.d.ts.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.js +158 -15
- package/dist/components/layout/page-sections/hero/hero.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.styles.d.ts.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.styles.js +95 -41
- package/dist/components/layout/page-sections/hero/hero.styles.js.map +1 -1
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.d.ts +4 -0
- 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 +8 -1
- 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.d.ts.map +1 -1
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.styles.js +13 -0
- 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 +4 -0
- 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 +8 -1
- 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.d.ts.map +1 -1
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.styles.js +17 -0
- 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/page-section-controls.d.ts +11 -1
- package/dist/components/layout/page-sections/page-section-controls.d.ts.map +1 -1
- package/dist/components/layout/page-sections/page-section-controls.js +11 -2
- package/dist/components/layout/page-sections/page-section-controls.js.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts +5 -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 +6 -2
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.styles.d.ts.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.styles.js +13 -10
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.styles.js.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.template.js +6 -6
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.template.js.map +1 -1
- package/dist/components/layout/page-sections/simple-section/simple-section.d.ts +2 -0
- 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 +3 -2
- 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 +2 -2
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.d.ts +4 -0
- 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 +8 -1
- 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.d.ts.map +1 -1
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.styles.js +17 -0
- 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/sheet/sheet.js +1 -1
- package/dist/components/layout/sheet/sheet.js.map +1 -1
- package/dist/components/layout/{app-view/app-view.d.ts → shell/shell.d.ts} +11 -11
- package/dist/components/layout/shell/shell.d.ts.map +1 -0
- package/dist/components/layout/{app-view/app-view.js → shell/shell.js} +24 -24
- package/dist/components/layout/shell/shell.js.map +1 -0
- package/dist/components/layout/shell/shell.styles.d.ts +2 -0
- package/dist/components/layout/shell/shell.styles.d.ts.map +1 -0
- package/dist/components/layout/{app-view/app-view.styles.js → shell/shell.styles.js} +8 -8
- package/dist/components/layout/shell/shell.styles.js.map +1 -0
- package/dist/components/layout/shell/shell.template.d.ts +4 -0
- package/dist/components/layout/shell/shell.template.d.ts.map +1 -0
- package/dist/components/layout/shell/shell.template.js +9 -0
- package/dist/components/layout/shell/shell.template.js.map +1 -0
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.js +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.js.map +1 -1
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.d.ts +1 -1
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.js +1 -1
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.d.ts +1 -1
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.js +1 -1
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.styles.js +2 -0
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.styles.js.map +1 -1
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.styles.js +2 -0
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.styles.js.map +1 -1
- package/dist/components/lists-and-tables/list/list.d.ts +6 -1
- package/dist/components/lists-and-tables/list/list.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list/list.js +7 -2
- package/dist/components/lists-and-tables/list/list.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.d.ts +31 -6
- 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 +55 -11
- package/dist/components/lists-and-tables/list-item/list-item.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.template.d.ts +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.template.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.template.js +7 -6
- package/dist/components/lists-and-tables/list-item/list-item.template.js.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts +4 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js +8 -2
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.d.ts +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.js +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.js.map +1 -1
- package/dist/components/navigation/menu-bar/menu-bar.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar/menu-bar.js +19 -2
- package/dist/components/navigation/menu-bar/menu-bar.js.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.d.ts +7 -2
- 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 +15 -3
- 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.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.styles.js +12 -2
- package/dist/components/navigation/menu-bar-item/menu-bar-item.styles.js.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.template.d.ts +1 -0
- 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 +55 -40
- package/dist/components/navigation/menu-bar-item/menu-bar-item.template.js.map +1 -1
- package/dist/components/navigation/skip-link/skip-link.d.ts +50 -4
- package/dist/components/navigation/skip-link/skip-link.d.ts.map +1 -1
- package/dist/components/navigation/skip-link/skip-link.js +140 -13
- package/dist/components/navigation/skip-link/skip-link.js.map +1 -1
- package/dist/components/navigation/skip-link/skip-link.template.d.ts.map +1 -1
- package/dist/components/navigation/skip-link/skip-link.template.js +1 -0
- package/dist/components/navigation/skip-link/skip-link.template.js.map +1 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.d.ts +8 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.d.ts.map +1 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.js +9 -2
- package/dist/components/navigation/top-title-bar/top-title-bar.js.map +1 -1
- package/dist/components/status-and-feedback/status-bar/status-bar.d.ts +10 -0
- package/dist/components/status-and-feedback/status-bar/status-bar.d.ts.map +1 -1
- package/dist/components/status-and-feedback/status-bar/status-bar.js +21 -0
- package/dist/components/status-and-feedback/status-bar/status-bar.js.map +1 -1
- package/dist/css/document-reset.css +3 -3
- package/dist/css/rich-text.css +36 -90
- package/dist/nldd.min.js +912 -736
- package/dist/types/vue.d.ts +85 -38
- package/dist/utilities/page-section-mixin.d.ts +5 -0
- package/dist/utilities/page-section-mixin.d.ts.map +1 -1
- package/dist/utilities/page-section-mixin.js +10 -1
- package/dist/utilities/page-section-mixin.js.map +1 -1
- package/dist/utilities/scroll-mode-controller.d.ts +29 -13
- package/dist/utilities/scroll-mode-controller.d.ts.map +1 -1
- package/dist/utilities/scroll-mode-controller.js +48 -13
- package/dist/utilities/scroll-mode-controller.js.map +1 -1
- package/package.json +5 -5
- package/dist/components/layout/app-view/app-view.d.ts.map +0 -1
- package/dist/components/layout/app-view/app-view.js.map +0 -1
- package/dist/components/layout/app-view/app-view.styles.d.ts +0 -2
- package/dist/components/layout/app-view/app-view.styles.d.ts.map +0 -1
- package/dist/components/layout/app-view/app-view.styles.js.map +0 -1
- package/dist/components/layout/app-view/app-view.template.d.ts +0 -4
- package/dist/components/layout/app-view/app-view.template.d.ts.map +0 -1
- package/dist/components/layout/app-view/app-view.template.js +0 -9
- package/dist/components/layout/app-view/app-view.template.js.map +0 -1
- package/dist/components/palettes.html +0 -245
- package/dist/components/sample-images/butterfly-1200.jpg +0 -0
- package/dist/components/sample-images/butterfly-1600.jpg +0 -0
- package/dist/components/sample-images/butterfly-480.jpg +0 -0
- package/dist/components/sample-images/butterfly-960.jpg +0 -0
- package/dist/palettes.html +0 -245
- package/dist/sample-images/butterfly-1200.jpg +0 -0
- package/dist/sample-images/butterfly-1600.jpg +0 -0
- package/dist/sample-images/butterfly-480.jpg +0 -0
- package/dist/sample-images/butterfly-960.jpg +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const template: (button: boolean, href: string | undefined, target: string | undefined, rel: string | undefined, opensInNewTabLabel?: string, actionTabindex?: string, isHighlighted?: boolean, checkbox?: boolean, radio?: boolean, checked?: boolean, expanded?: boolean, showChildren?: boolean, hasCheckedSegment?: boolean, disabled?: boolean) => import("lit-html").TemplateResult<1>;
|
|
1
|
+
export declare const template: (button: boolean, href: string | undefined, target: string | undefined, rel: string | undefined, opensInNewTabLabel?: string, actionTabindex?: string, isHighlighted?: boolean, checkbox?: boolean, radio?: boolean, checked?: boolean, expanded?: boolean, showChildren?: boolean, hasCheckedSegment?: boolean, disabled?: boolean, childrenRole?: "group" | "list", childrenOpen?: boolean) => import("lit-html").TemplateResult<1>;
|
|
2
2
|
//# sourceMappingURL=list-item.template.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-item.template.d.ts","sourceRoot":"","sources":["../../../../src/components/lists-and-tables/list-item/list-item.template.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,QAAQ,GACpB,QAAQ,OAAO,EACf,MAAM,MAAM,GAAG,SAAS,EACxB,QAAQ,MAAM,GAAG,SAAS,EAC1B,KAAK,MAAM,GAAG,SAAS,EACvB,qBAAqB,MAAM,EAC3B,iBAAiB,MAAM,EACvB,uBAAqB,EACrB,kBAAgB,EAChB,eAAa,EACb,iBAAe,EACf,WAAW,OAAO,EAClB,sBAAoB,EACpB,2BAAyB,EACzB,kBAAgB,
|
|
1
|
+
{"version":3,"file":"list-item.template.d.ts","sourceRoot":"","sources":["../../../../src/components/lists-and-tables/list-item/list-item.template.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,QAAQ,GACpB,QAAQ,OAAO,EACf,MAAM,MAAM,GAAG,SAAS,EACxB,QAAQ,MAAM,GAAG,SAAS,EAC1B,KAAK,MAAM,GAAG,SAAS,EACvB,qBAAqB,MAAM,EAC3B,iBAAiB,MAAM,EACvB,uBAAqB,EACrB,kBAAgB,EAChB,eAAa,EACb,iBAAe,EACf,WAAW,OAAO,EAClB,sBAAoB,EACpB,2BAAyB,EACzB,kBAAgB,EAChB,eAAc,OAAO,GAAG,MAAgB,EACxC,sBAAgC,yCAsFhC,CAAC"}
|
|
@@ -7,16 +7,17 @@ import { linkRel } from '../../../utilities/link-rel.js';
|
|
|
7
7
|
// block, not to the widened action box.
|
|
8
8
|
const content = html `<slot></slot>`;
|
|
9
9
|
const divider = html `<div class="list-item__divider"></div>`;
|
|
10
|
-
export const template = (button, href, target, rel, opensInNewTabLabel, actionTabindex, isHighlighted = false, checkbox = false, radio = false, checked = false, expanded, showChildren = false, hasCheckedSegment = false, disabled = false) => {
|
|
10
|
+
export const template = (button, href, target, rel, opensInNewTabLabel, actionTabindex, isHighlighted = false, checkbox = false, radio = false, checked = false, expanded, showChildren = false, hasCheckedSegment = false, disabled = false, childrenRole = 'group', childrenOpen = expanded === true) => {
|
|
11
11
|
const ariaExpanded = expanded === undefined ? nothing : String(expanded);
|
|
12
|
-
// The
|
|
13
|
-
// hierarchy: assistive technology derives level, position and set size
|
|
14
|
-
// it, so none of those are authored.
|
|
12
|
+
// The row's child rows. In a tree `role="group"` is what makes the nesting
|
|
13
|
+
// the hierarchy: assistive technology derives level, position and set size
|
|
14
|
+
// from it, so none of those are authored. In a navigation list the same
|
|
15
|
+
// nesting is a list inside a list item. Hidden while collapsed — an
|
|
15
16
|
// aria-expanded="false" node with reachable children contradicts itself.
|
|
16
17
|
const children = showChildren
|
|
17
18
|
? html `<div class="list-item__children"
|
|
18
|
-
role
|
|
19
|
-
?hidden=${
|
|
19
|
+
role=${childrenRole}
|
|
20
|
+
?hidden=${!childrenOpen}
|
|
20
21
|
><slot name="children"></slot></div>`
|
|
21
22
|
: html `<slot name="children" hidden></slot>`;
|
|
22
23
|
// `is-highlighted` paints the listbox active-option highlight (separate from
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-item.template.js","sourceRoot":"","sources":["../../../../src/components/lists-and-tables/list-item/list-item.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAEzD,qEAAqE;AACrE,yEAAyE;AACzE,yEAAyE;AACzE,wCAAwC;AACxC,MAAM,OAAO,GAAG,IAAI,CAAA,eAAe,CAAC;AACpC,MAAM,OAAO,GAAG,IAAI,CAAA,wCAAwC,CAAC;AAE7D,MAAM,CAAC,MAAM,QAAQ,GAAG,CACvB,MAAe,EACf,IAAwB,EACxB,MAA0B,EAC1B,GAAuB,EACvB,kBAA2B,EAC3B,cAAuB,EACvB,aAAa,GAAG,KAAK,EACrB,QAAQ,GAAG,KAAK,EAChB,KAAK,GAAG,KAAK,EACb,OAAO,GAAG,KAAK,EACf,QAAkB,EAClB,YAAY,GAAG,KAAK,EACpB,iBAAiB,GAAG,KAAK,EACzB,QAAQ,GAAG,KAAK,
|
|
1
|
+
{"version":3,"file":"list-item.template.js","sourceRoot":"","sources":["../../../../src/components/lists-and-tables/list-item/list-item.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAEzD,qEAAqE;AACrE,yEAAyE;AACzE,yEAAyE;AACzE,wCAAwC;AACxC,MAAM,OAAO,GAAG,IAAI,CAAA,eAAe,CAAC;AACpC,MAAM,OAAO,GAAG,IAAI,CAAA,wCAAwC,CAAC;AAE7D,MAAM,CAAC,MAAM,QAAQ,GAAG,CACvB,MAAe,EACf,IAAwB,EACxB,MAA0B,EAC1B,GAAuB,EACvB,kBAA2B,EAC3B,cAAuB,EACvB,aAAa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yEAAyE;QACzE,uDAAuD;QACvD,OAAO,IAAI,CAAA,cAAc,UAAU;;;;gBAIrB,QAAQ;mBACL,MAAM,CAAC,OAAO,CAAC;oBACd,YAAY;eACjB,cAAc,IAAI,OAAO;MAClC,OAAO;KACR,OAAO;UACF,QAAQ,EAAE,CAAC;IACpB,CAAC;IACD,IAAI,KAAK,EAAE,CAAC;QACX,0EAA0E;QAC1E,sEAAsE;QACtE,4DAA4D;QAC5D,sEAAsE;QACtE,2BAA2B;QAC3B,OAAO,IAAI,CAAA,cAAc,UAAU;;;;gBAIrB,QAAQ;mBACL,MAAM,CAAC,OAAO,CAAC;eACnB,cAAc,IAAI,OAAO;MAClC,OAAO;KACR,OAAO;UACF,QAAQ,EAAE,CAAC;IACpB,CAAC;IACD,IAAI,MAAM,EAAE,CAAC;QACZ,OAAO,IAAI,CAAA,cAAc,UAAU;;;gBAGrB,QAAQ;oBACJ,YAAY;eACjB,cAAc,IAAI,OAAO;MAClC,OAAO;KACR,OAAO;UACF,QAAQ,EAAE,CAAC;IACpB,CAAC;IACD,OAAO,IAAI,CAAA,cAAc,UAAU;IAChC,OAAO;IACP,OAAO;SACF,QAAQ,EAAE,CAAC;AACpB,CAAC,CAAC"}
|
|
@@ -40,7 +40,8 @@ export type ListItemSegmentWidth = 'fit-content' | 'full';
|
|
|
40
40
|
* @attr {boolean} expanded - Disclosure state, reflected as `aria-expanded` on the control, and painted: the segment stays lit a step above hover for as long as what it opened is on screen, so a menu reads as hanging off this row rather than floating over the list. Set it on the segment that opens something (a tree row's chevron, a menu). Leave it off entirely when the segment discloses nothing — an absent attribute emits no aria-expanded.
|
|
41
41
|
* @attr {string} popup-type - Type of popup this segment opens: 'menu' | 'listbox' | 'dialog' | 'tree' | 'grid'. Becomes aria-haspopup on the control and makes aria-expanded permanent, so a row of identical "more" segments says what it opens before anything is open. An nldd-menu or nldd-popover anchored here sets it itself from the first render.
|
|
42
42
|
* @attr {string} popovertarget - ID of a popover this segment toggles; forwarded to the inner button. The IDL counterparts `popoverTargetElement` and `popoverTargetAction` work across shadow boundaries, as on nldd-icon-button.
|
|
43
|
-
* @attr {boolean} current - Marks the segment as the current
|
|
43
|
+
* @attr {boolean} current - Marks the segment as the current one, with `aria-current` set to `current-type`. The row it sits in paints itself as the current row from it, so on a segmented row this is the only place it has to be set.
|
|
44
|
+
* @attr {'page'|'step'|'location'|'date'|'time'|'true'} current-type - The `aria-current` value of a `current` segment (default 'page'). Use 'location' for a table of contents, whose rows point at sections of the page you are on.
|
|
44
45
|
* @attr {boolean} disabled - Switches the segment off: a `button` or `checkbox` segment stops responding and dims, a `href` segment gets `aria-disabled` and its click is blocked (a link cannot be disabled natively). The arrow keys skip a row whose only segment is off.
|
|
45
46
|
*
|
|
46
47
|
* Divider markers, set on a CELL inside the segment rather than on the segment itself:
|
|
@@ -93,6 +94,8 @@ export declare class NLDDListItemSegment extends LitElement {
|
|
|
93
94
|
/** Action the browser performs on click, mirroring popovertargetaction. */
|
|
94
95
|
popoverTargetAction: 'toggle' | 'show' | 'hide';
|
|
95
96
|
current: boolean;
|
|
97
|
+
/** The `aria-current` value of a current segment; see nldd-list-item's `current-type`. */
|
|
98
|
+
currentType: 'page' | 'step' | 'location' | 'date' | 'time' | 'true';
|
|
96
99
|
disabled: boolean;
|
|
97
100
|
/** Set by the parent nldd-list-item, mirroring its list's type. */
|
|
98
101
|
_parentType: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-item-segment.d.ts","sourceRoot":"","sources":["../../../../src/components/lists-and-tables/list-item-segment/list-item-segment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAKjC,OAAO,EAAY,KAAK,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAGxF,MAAM,MAAM,oBAAoB,GAAG,aAAa,GAAG,MAAM,CAAC;AAE1D
|
|
1
|
+
{"version":3,"file":"list-item-segment.d.ts","sourceRoot":"","sources":["../../../../src/components/lists-and-t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BAAiB;IAYjB,oBAAoB;IAUpB,YAAY;IAKrB,2EAA2E;IAC3E,gBAAgB,CAAC,IAAI,EAAE,MAAM;IAO7B,oEAAoE;IACpE,OAAO,KAAK,aAAa,GAExB;IAED,IAAI,YAAY,IAAI,sBAAsB,CAKzC;IAED,OAAO,CAAC,YAAY,CAmBlB;IAEF,OAAO,CAAC,cAAc,CAKpB;IAEF,OAAO,CAAC,eAAe,CAErB;IAEF;;;;;;OAMG;IACH,OAAO,CAAC,YAAY,CAGlB;IAEF,OAAO,CAAC,cAAc,CAWpB;IAEF,OAAO,CAAC,aAAa,CAInB;IAEF,uFAAuF;IAC9E,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI;IAI5C;;sFAEkF;IACzE,OAAO;IAKP,MAAM;CAqBf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,wBAAwB,EAAE,mBAAmB,CAAC;KAC9C;CACD"}
|
|
@@ -49,7 +49,8 @@ import { template } from './list-item-segment.template.js';
|
|
|
49
49
|
* @attr {boolean} expanded - Disclosure state, reflected as `aria-expanded` on the control, and painted: the segment stays lit a step above hover for as long as what it opened is on screen, so a menu reads as hanging off this row rather than floating over the list. Set it on the segment that opens something (a tree row's chevron, a menu). Leave it off entirely when the segment discloses nothing — an absent attribute emits no aria-expanded.
|
|
50
50
|
* @attr {string} popup-type - Type of popup this segment opens: 'menu' | 'listbox' | 'dialog' | 'tree' | 'grid'. Becomes aria-haspopup on the control and makes aria-expanded permanent, so a row of identical "more" segments says what it opens before anything is open. An nldd-menu or nldd-popover anchored here sets it itself from the first render.
|
|
51
51
|
* @attr {string} popovertarget - ID of a popover this segment toggles; forwarded to the inner button. The IDL counterparts `popoverTargetElement` and `popoverTargetAction` work across shadow boundaries, as on nldd-icon-button.
|
|
52
|
-
* @attr {boolean} current - Marks the segment as the current
|
|
52
|
+
* @attr {boolean} current - Marks the segment as the current one, with `aria-current` set to `current-type`. The row it sits in paints itself as the current row from it, so on a segmented row this is the only place it has to be set.
|
|
53
|
+
* @attr {'page'|'step'|'location'|'date'|'time'|'true'} current-type - The `aria-current` value of a `current` segment (default 'page'). Use 'location' for a table of contents, whose rows point at sections of the page you are on.
|
|
53
54
|
* @attr {boolean} disabled - Switches the segment off: a `button` or `checkbox` segment stops responding and dims, a `href` segment gets `aria-disabled` and its click is blocked (a link cannot be disabled natively). The arrow keys skip a row whose only segment is off.
|
|
54
55
|
*
|
|
55
56
|
* Divider markers, set on a CELL inside the segment rather than on the segment itself:
|
|
@@ -88,6 +89,8 @@ let NLDDListItemSegment = class NLDDListItemSegment extends LitElement {
|
|
|
88
89
|
/** Action the browser performs on click, mirroring popovertargetaction. */
|
|
89
90
|
this.popoverTargetAction = 'toggle';
|
|
90
91
|
this.current = false;
|
|
92
|
+
/** The `aria-current` value of a current segment; see nldd-list-item's `current-type`. */
|
|
93
|
+
this.currentType = 'page';
|
|
91
94
|
this.disabled = false;
|
|
92
95
|
/** Set by the parent nldd-list-item, mirroring its list's type. */
|
|
93
96
|
this._parentType = 'list';
|
|
@@ -213,7 +216,7 @@ let NLDDListItemSegment = class NLDDListItemSegment extends LitElement {
|
|
|
213
216
|
if (import.meta.env?.DEV && this.disclosure && this.expanded !== undefined) {
|
|
214
217
|
console.warn('nldd-list-item-segment: `disclosure` takes aria-expanded from the row, so the `expanded` on this action is ignored. Drop one of the two.');
|
|
215
218
|
}
|
|
216
|
-
return template(this._controlType, this.href, this.target, this.rel, this.checked, this.disclosure ? this._rowExpanded : this.expanded, this.current, this.disabled, this.accessibleLabel, this._tabbable === undefined ? undefined : (this._tabbable ? '0' : '-1'), this.popupType, this.popovertarget, this.popoverTargetElement, this.popoverTargetAction);
|
|
219
|
+
return template(this._controlType, this.href, this.target, this.rel, this.checked, this.disclosure ? this._rowExpanded : this.expanded, this.current ? this.currentType : undefined, this.disabled, this.accessibleLabel, this._tabbable === undefined ? undefined : (this._tabbable ? '0' : '-1'), this.popupType, this.popovertarget, this.popoverTargetElement, this.popoverTargetAction);
|
|
217
220
|
}
|
|
218
221
|
};
|
|
219
222
|
NLDDListItemSegment.styles = [listItemSegmentStyles];
|
|
@@ -262,6 +265,9 @@ __decorate([
|
|
|
262
265
|
__decorate([
|
|
263
266
|
property({ type: Boolean, reflect: true })
|
|
264
267
|
], NLDDListItemSegment.prototype, "current", void 0);
|
|
268
|
+
__decorate([
|
|
269
|
+
property({ reflect: true, attribute: 'current-type', converter: reflectNonDefault('page') })
|
|
270
|
+
], NLDDListItemSegment.prototype, "currentType", void 0);
|
|
265
271
|
__decorate([
|
|
266
272
|
property({ type: Boolean, reflect: true })
|
|
267
273
|
], NLDDListItemSegment.prototype, "disabled", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-item-segment.js","sourceRoot":"","sources":["../../../../src/components/lists-and-tables/list-item-segment/list-item-segment.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,QAAQ,EAA+B,MAAM,iCAAiC,CAAC;AAKxF
|
|
1
|
+
{"version":3,"file":"list-item-segment.js","sourceRoot":"","sources":["../../../../src/components/lists-and-tables/list-item-segment/list-item-segment.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,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DACa;AAMrB;IADC,KAAK,EAAE;sDACY;AAKpB;IADC,KAAK,EAAE;yDACe;AAGf;IADP,KAAK,CAAC,oBAAoB,CAAC;qDACG;AAhGnB,mBAAmB;IAD/B,aAAa,CAAC,wBAAwB,CAAC;GAC3B,mBAAmB,CAkP/B"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export type ListItemSegmentControl = 'link' | 'button' | 'checkbox' | 'plain';
|
|
2
|
-
export declare function template(control: ListItemSegmentControl, href: string | undefined, target: string | undefined, rel: string | undefined, checked: boolean, expanded: boolean | undefined, current:
|
|
2
|
+
export declare function template(control: ListItemSegmentControl, href: string | undefined, target: string | undefined, rel: string | undefined, checked: boolean, expanded: boolean | undefined, current: string | undefined, disabled: boolean, accessibleLabel: string, actionTabindex?: string, popupType?: string, popovertarget?: string, popoverTargetElement?: Element | null, popoverTargetAction?: 'toggle' | 'show' | 'hide'): import("lit-html").TemplateResult<1>;
|
|
3
3
|
//# sourceMappingURL=list-item-segment.template.d.ts.map
|
package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-item-segment.template.d.ts","sourceRoot":"","sources":["../../../../src/components/lists-and-tables/list-item-segment/list-item-segment.template.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAC;AAE9E,wBAAgB,QAAQ,CACvB,OAAO,EAAE,sBAAsB,EAC/B,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,OAAO,GAAG,SAAS,EAC7B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"list-item-segment.template.d.ts","sourceRoot":"","sources":["../../../../src/components/lists-and-tables/list-item-segment/list-item-segment.template.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAC;AAE9E,wBAAgB,QAAQ,CACvB,OAAO,EAAE,sBAAsB,EAC/B,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,OAAO,GAAG,SAAS,EAC7B,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,QAAQ,EAAE,OAAO,EACjB,eAAe,EAAE,MAAM,EACvB,cAAc,CAAC,EAAE,MAAM,EACvB,SAAS,CAAC,EAAE,MAAM,EAClB,aAAa,CAAC,EAAE,MAAM,EACtB,oBAAoB,CAAC,EAAE,OAAO,GAAG,IAAI,EACrC,mBAAmB,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,wCA8ChD"}
|
|
@@ -8,7 +8,7 @@ export function template(control, href, target, rel, checked, expanded, current,
|
|
|
8
8
|
const ariaExpanded = expanded === undefined
|
|
9
9
|
? (popupType ? 'false' : nothing)
|
|
10
10
|
: String(expanded);
|
|
11
|
-
const ariaCurrent = current
|
|
11
|
+
const ariaCurrent = current ?? nothing;
|
|
12
12
|
const label = accessibleLabel || nothing;
|
|
13
13
|
if (control === 'link') {
|
|
14
14
|
return html `<a class="list-item-segment"
|
package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-item-segment.template.js","sourceRoot":"","sources":["../../../../src/components/lists-and-tables/list-item-segment/list-item-segment.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAIzD,MAAM,UAAU,QAAQ,CACvB,OAA+B,EAC/B,IAAwB,EACxB,MAA0B,EAC1B,GAAuB,EACvB,OAAgB,EAChB,QAA6B,EAC7B,
|
|
1
|
+
{"version":3,"file":"list-item-segment.template.js","sourceRoot":"","sources":["../../../../src/components/lists-and-tables/list-item-segment/list-item-segment.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAIzD,MAAM,UAAU,QAAQ,CACvB,OAA+B,EAC/B,IAAwB,EACxB,MAA0B,EAC1B,GAAuB,EACvB,OAAgB,EAChB,QAA6B,EAC7B,OAA2B,EAC3B,QAAiB,EACjB,eAAuB,EACvB,cAAuB,EACvB,SAAkB,EAClB,aAAsB,EACtB,oBAAqC,EACrC,mBAAgD;IAEhD,MAAM,OAAO,GAAG,IAAI,CAAA,eAAe,CAAC;IACpC,0EAA0E;IAC1E,2EAA2E;IAC3E,6EAA6E;IAC7E,MAAM,YAAY,GAAG,QAAQ,KAAK,SAAS;QAC1C,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;QACjC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACpB,MAAM,WAAW,GAAG,OAAO,IAAI,OAAO,CAAC;IACvC,MAAM,KAAK,GAAG,eAAe,IAAI,OAAO,CAAC;IAEzC,IAAI,OAAO,KAAK,MAAM,EAAE,CAAC;QACxB,OAAO,IAAI,CAAA;UACH,IAAI,IAAI,OAAO;YACb,MAAM,IAAI,OAAO;SACpB,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,OAAO;mBACrB,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;mBAC3B,YAAY;kBACb,WAAW;gBACb,KAAK;cACP,cAAc,IAAI,OAAO;KAClC,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,IAAI,OAAO,K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D,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,SAAS,CAAuB;IAE/B,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IASlD,iCAAiC;IACjC,IAAI,aAAa,IAAI,MAAM,CAE1B;IAIQ,oBAAoB,IAAI,IAAI;IAO5B,YAAY,IAAI,IAAI;IAe7B,uFAAuF;IACvF,qBAAqB,IAAI,IAAI;IAI7B,OAAO,CAAC,aAAa,CAInB;IAEF,iFAAiF;IACjF,OAAO,CAAC,UAAU;IAMlB,oDAAoD;IACpD,OAAO,CAAC,qBAAqB;IAS7B,OAAO,CAAC,uBAAuB;IAgB/B,OAAO,CAAC,yBAAyB;IAkBjC,OAAO,CAAC,uBAAuB,CAM7B;IAEF;;;;;;OAMG;IACH,OAAO,CAAC,eAAe;IAqEvB,OAAO,CAAC,mBAAmB;IAqB3B;;;;;;;;OAQG;IACH,mBAAmB,QAAO,IAAI,CAe5B;IAEF,qGAAqG;IACrG,gCAAgC,QAAO,IAAI,CAIzC;IAEF,OAAO,CAAC,qBAAqB;IAwEpB,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,eAAe,EAAE,WAAW,CAAC;KAC7B;CACD"}
|
|
@@ -271,6 +271,10 @@ let NLDDMenuBar = class NLDDMenuBar extends withTranslations(LitElement, nlddMen
|
|
|
271
271
|
menuItem.setAttribute('text', item.text);
|
|
272
272
|
if (item.icon)
|
|
273
273
|
menuItem.setAttribute('icon', item.icon);
|
|
274
|
+
// A link stays a link in the menu: nldd-menu-item renders an <a> for
|
|
275
|
+
// an href, and only that <a> carries aria-current for `selected`.
|
|
276
|
+
if (item.href)
|
|
277
|
+
menuItem.setAttribute('href', item.href);
|
|
274
278
|
if (item.current)
|
|
275
279
|
menuItem.setAttribute('selected', '');
|
|
276
280
|
if (item.disabled)
|
|
@@ -306,8 +310,21 @@ let NLDDMenuBar = class NLDDMenuBar extends withTranslations(LitElement, nlddMen
|
|
|
306
310
|
continue;
|
|
307
311
|
}
|
|
308
312
|
}
|
|
309
|
-
menuItem.addEventListener('click', () => {
|
|
310
|
-
item.
|
|
313
|
+
menuItem.addEventListener('click', (event) => {
|
|
314
|
+
if (!item.href) {
|
|
315
|
+
item.click();
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
// The link in the menu navigates by itself. The original still
|
|
319
|
+
// hears the click, so a router listening there can take over and
|
|
320
|
+
// cancel the navigation, as it does in the bar. With the button and
|
|
321
|
+
// the modifier keys of the real click, so a router that leaves a
|
|
322
|
+
// Cmd-click alone still does and the link opens in a new tab.
|
|
323
|
+
const { button, ctrlKey, metaKey, shiftKey, altKey } = event;
|
|
324
|
+
const forwarded = new MouseEvent('click', { bubbles: true, cancelable: true, composed: true, button, ctrlKey, metaKey, shiftKey, altKey });
|
|
325
|
+
item.dispatchEvent(forwarded);
|
|
326
|
+
if (forwarded.defaultPrevented)
|
|
327
|
+
event.preventDefault();
|
|
311
328
|
});
|
|
312
329
|
this._overflowMenu.appendChild(menuItem);
|
|
313
330
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-bar.js","sourceRoot":"","sources":["../../../../src/components/navigation/menu-bar/menu-bar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAuB,MAAM,KAAK,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,m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,KAAK,CAAC,4BAA4B,CAAC;oDACE;AAMtC;IADC,KAAK,EAAE;8CACU;AAxBN,WAAW;IADvB,aAAa,CAAC,eAAe,CAAC;GAClB,WAAW,CA2VvB"}
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* @attr {string} href - Optional link URL. Without href it renders as a button.
|
|
14
14
|
* @attr {string} icon - Optional icon name (nldd-icon)
|
|
15
15
|
* @attr {boolean} expandable - Show the disclosure icon and open the slotted `<nldd-menu>` on click
|
|
16
|
-
* @attr {boolean} icon-only - Hide the text visually (always)
|
|
17
|
-
* @attr {'icon'|'text'} content-priority - Decides what stays visible in compact mode: 'icon' hides the text, 'text' hides the icon
|
|
16
|
+
* @attr {boolean} icon-only - Hide the text visually (always). The text then shows as a tooltip on hover and focus.
|
|
17
|
+
* @attr {'icon'|'text'} content-priority - Decides what stays visible in compact mode: 'icon' hides the text, 'text' hides the icon. A bar is compact on a narrow screen and also at 200% zoom on a desktop, so with 'icon' the text is gone there too and shows as a tooltip instead.
|
|
18
18
|
* @attr {boolean} compact - Activates content-priority behavior (set by the parent nldd-menu-bar)
|
|
19
19
|
* @attr {boolean} disabled - Turn interaction off
|
|
20
20
|
* @attr {string} accessible-label - Override aria-label
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
*
|
|
25
25
|
* @fires select - On a click on a non-expandable button item (bubbles, composed)
|
|
26
26
|
*
|
|
27
|
+
* @slot icon - Takes the place of the icon: an `nldd-avatar` for the person who is signed in, for instance. It gets the size of an icon, and follows `content-priority` and `icon-only` as the icon does. Wins over `icon`.
|
|
27
28
|
* @slot - Content of the expandable popover. Wrap items in an `<nldd-menu>` so
|
|
28
29
|
* this component does not have to duplicate the menu API (variant,
|
|
29
30
|
* accessible-label, translations, filterFn and so on). Event listeners on
|
|
@@ -70,6 +71,10 @@ export declare class NLDDMenuBarItem extends LitElement {
|
|
|
70
71
|
connectedCallback(): void;
|
|
71
72
|
firstUpdated(): void;
|
|
72
73
|
disconnectedCallback(): void;
|
|
74
|
+
/** @internal Whether the icon slot is filled, so the icon area and the icon-only rules follow it. */
|
|
75
|
+
_hasSlottedIcon: boolean;
|
|
76
|
+
/** @internal */
|
|
77
|
+
_onIconSlotChange: (e: Event) => void;
|
|
73
78
|
_onSlotChange: () => void;
|
|
74
79
|
focus(options?: FocusOptions): void;
|
|
75
80
|
private _findMenu;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-bar-item.d.ts","sourceRoot":"","sources":["../../../../src/components/navigation/menu-bar-item/menu-bar-item.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"menu-bar-item.d.ts","sourceRoot":"","sources":["../../../../src/components/navigation/menu-bar-item/menu-bar-item.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAKjC,OAAO,4BAA4B,CAAC;AACpC,OAAO,4BAA4B,CAAC;AAcpC,qBACa,eAAgB,SAAQ,UAAU;IAC9C,OAAgB,MAAM,0BAAqB;IAG3C,IAAI,SAAM;IAGV,OAAO,UAAS;IAGhB,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAU;IAG9E,IAAI,SAAM;IAGV,IAAI,SAAM;IAGV,UAAU,UAAS;IAGnB,QAAQ,UAAS;IAGjB,eAAe,SAAM;IAGrB,OAAO,UAAS;IAGhB,QAAQ,UAAS;IAGjB,eAAe,SAAM;IAGrB,QAAQ,SAAM;IAGd,QAAQ,UAAS;IAEjB;;;;;;OAMG;IAEH,oBAAoB,EAAE,OAAO,GAAG,IAAI,CAAQ;IAE5C;;;;;;OAMG;IAEH,mBAAmB,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAY;IAI3D,OAAO,CAAC,KAAK,CAA4B;IACzC,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,yBAAyB,CAAS;IAC1C,OAAO,CAAC,kBAAkB,CAAyC;IAI1D,iBAAiB,IAAI,IAAI;IAWzB,YAAY,IAAI,IAAI;IAQpB,oBAAoB,IAAI,IAAI;IAOrC,qGAAqG;IAErG,eAAe,UAAS;IAExB,gBAAgB;IAChB,iBAAiB,GAAI,GAAG,KAAK,KAAG,IAAI,CAIlC;IAEF,aAAa,QAAO,IAAI,CAGtB;IAEO,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI;IAO5C,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,SAAS;IAcjB,OAAO,CAAC,WAAW;IAWnB,OAAO,CAAC,kBAAkB,CAIxB;IAEF,OAAO,CAAC,YAAY,CAqBlB;IAIF,OAAO,CAAC,WAAW;IAgBV,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,oBAAoB,EAAE,eAAe,CAAC;KACtC;CACD"}
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* @attr {string} href - Optional link URL. Without href it renders as a button.
|
|
14
14
|
* @attr {string} icon - Optional icon name (nldd-icon)
|
|
15
15
|
* @attr {boolean} expandable - Show the disclosure icon and open the slotted `<nldd-menu>` on click
|
|
16
|
-
* @attr {boolean} icon-only - Hide the text visually (always)
|
|
17
|
-
* @attr {'icon'|'text'} content-priority - Decides what stays visible in compact mode: 'icon' hides the text, 'text' hides the icon
|
|
16
|
+
* @attr {boolean} icon-only - Hide the text visually (always). The text then shows as a tooltip on hover and focus.
|
|
17
|
+
* @attr {'icon'|'text'} content-priority - Decides what stays visible in compact mode: 'icon' hides the text, 'text' hides the icon. A bar is compact on a narrow screen and also at 200% zoom on a desktop, so with 'icon' the text is gone there too and shows as a tooltip instead.
|
|
18
18
|
* @attr {boolean} compact - Activates content-priority behavior (set by the parent nldd-menu-bar)
|
|
19
19
|
* @attr {boolean} disabled - Turn interaction off
|
|
20
20
|
* @attr {string} accessible-label - Override aria-label
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
*
|
|
25
25
|
* @fires select - On a click on a non-expandable button item (bubbles, composed)
|
|
26
26
|
*
|
|
27
|
+
* @slot icon - Takes the place of the icon: an `nldd-avatar` for the person who is signed in, for instance. It gets the size of an icon, and follows `content-priority` and `icon-only` as the icon does. Wins over `icon`.
|
|
27
28
|
* @slot - Content of the expandable popover. Wrap items in an `<nldd-menu>` so
|
|
28
29
|
* this component does not have to duplicate the menu API (variant,
|
|
29
30
|
* accessible-label, translations, filterFn and so on). Event listeners on
|
|
@@ -36,7 +37,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
36
37
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
37
38
|
};
|
|
38
39
|
import { LitElement } from 'lit';
|
|
39
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
40
|
+
import { customElement, property, state } from 'lit/decorators.js';
|
|
40
41
|
import { reflectNonDefault } from '../../../utilities/reflect-non-default.js';
|
|
41
42
|
import { menuBarItemStyles } from './menu-bar-item.styles.js';
|
|
42
43
|
import { template } from './menu-bar-item.template.js';
|
|
@@ -79,6 +80,14 @@ let NLDDMenuBarItem = class NLDDMenuBarItem extends LitElement {
|
|
|
79
80
|
this._menuOpen = false;
|
|
80
81
|
this._pointerdownWhileMenuOpen = false;
|
|
81
82
|
this._menuToggleHandler = null;
|
|
83
|
+
/** @internal Whether the icon slot is filled, so the icon area and the icon-only rules follow it. */
|
|
84
|
+
this._hasSlottedIcon = false;
|
|
85
|
+
/** @internal */
|
|
86
|
+
this._onIconSlotChange = (e) => {
|
|
87
|
+
this._hasSlottedIcon = e.target.assignedElements().length > 0;
|
|
88
|
+
// A derived state for the host's own CSS, never written back into `icon`.
|
|
89
|
+
this.toggleAttribute('data-has-icon', this._hasSlottedIcon);
|
|
90
|
+
};
|
|
82
91
|
this._onSlotChange = () => {
|
|
83
92
|
// Re-wire when a consumer swaps the slotted <nldd-menu> at runtime.
|
|
84
93
|
this._wireMenu();
|
|
@@ -233,6 +242,9 @@ __decorate([
|
|
|
233
242
|
__decorate([
|
|
234
243
|
property({ attribute: false })
|
|
235
244
|
], NLDDMenuBarItem.prototype, "popoverTargetAction", void 0);
|
|
245
|
+
__decorate([
|
|
246
|
+
state()
|
|
247
|
+
], NLDDMenuBarItem.prototype, "_hasSlottedIcon", void 0);
|
|
236
248
|
NLDDMenuBarItem = __decorate([
|
|
237
249
|
customElement('nldd-menu-bar-item')
|
|
238
250
|
], NLDDMenuBarItem);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-bar-item.js","sourceRoot":"","sources":["../../../../src/components/navigation/menu-bar-item/menu-bar-item.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"menu-bar-item.js","sourceRoot":"","sources":["../../../../src/components/navigation/menu-bar-item/menu-bar-item.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,4BAA4B,CAAC;AACpC,OAAO,4BAA4B,CAAC;AAe7B,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,UAAU;IAAxC;;QAIN,SAAI,GAAG,EAAE,CAAC;QAGV,YAAO,GAAG,KAAK,CAAC;QAGhB,gBAAW,GAA4D,MAAM,CAAC;QAG9E,SAAI,GAAG,EAAE,CAAC;QAGV,SAAI,GAAG,EAAE,CAAC;QAGV,eAAU,GAAG,KAAK,CAAC;QAGnB,aAAQ,GAAG,KAAK,CAAC;QAGjB,oBAA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,CAAC;wDAChF;AAGrB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDAC3B;AAGhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iDAC1B;AAGjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;wDACrC;AAGrB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iDACb;AAGd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iDAC1B;AAUjB;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;6DACa;AAU5C;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;4DAC4B;AAuC3D;IADC,KAAK,EAAE;wDACgB;AAnGZ,eAAe;IAD3B,aAAa,CAAC,oBAAoB,CAAC;GACvB,eAAe,CAuM3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-bar-item.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/navigation/menu-bar-item/menu-bar-item.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"menu-bar-item.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/navigation/menu-bar-item/menu-bar-item.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,yBAsM7B,CAAC"}
|
|
@@ -123,6 +123,16 @@ export const menuBarItemStyles = css `
|
|
|
123
123
|
flex-shrink: 0;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
.menu-bar-item__icon[hidden] {
|
|
127
|
+
display: none;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
::slotted([slot="icon"]) {
|
|
131
|
+
display: flex;
|
|
132
|
+
width: 100%;
|
|
133
|
+
height: 100%;
|
|
134
|
+
}
|
|
135
|
+
|
|
126
136
|
/* ## Disclosure icon */
|
|
127
137
|
|
|
128
138
|
.menu-bar-item__disclosure-icon {
|
|
@@ -168,12 +178,12 @@ export const menuBarItemStyles = css `
|
|
|
168
178
|
/* # Icon-only */
|
|
169
179
|
|
|
170
180
|
:host([icon-only]) .menu-bar-item,
|
|
171
|
-
:host([content-priority="icon"][compact][icon]:not([icon=""])) .menu-bar-item {
|
|
181
|
+
:host([content-priority="icon"][compact]:is([icon]:not([icon=""]), [data-has-icon])) .menu-bar-item {
|
|
172
182
|
padding: var(--primitives-space-8);
|
|
173
183
|
}
|
|
174
184
|
|
|
175
185
|
:host([icon-only]) .menu-bar-item__text,
|
|
176
|
-
:host([content-priority="icon"][compact][icon]:not([icon=""])) .menu-bar-item__text {
|
|
186
|
+
:host([content-priority="icon"][compact]:is([icon]:not([icon=""]), [data-has-icon])) .menu-bar-item__text {
|
|
177
187
|
position: absolute;
|
|
178
188
|
margin: -1px;
|
|
179
189
|
border: 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-bar-item.styles.js","sourceRoot":"","sources":["../../../../src/components/navigation/menu-bar-item/menu-bar-item.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;IAmBhC,kBAAkB
|
|
1
|
+
{"version":3,"file":"menu-bar-item.styles.js","sourceRoot":"","sources":["../../../../src/components/navigation/menu-bar-item/menu-bar-item.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;IAmBhC,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmLrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-bar-item.template.d.ts","sourceRoot":"","sources":["../../../../src/components/navigation/menu-bar-item/menu-bar-item.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"menu-bar-item.template.d.ts","sourceRoot":"","sources":["../../../../src/components/navigation/menu-bar-item/menu-bar-item.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,kCAAkC,CAAC;AAE1C,wBAAgB,QAAQ,CAAC,SAAS,EAAE,eAAe,wCA+ElD"}
|
|
@@ -1,29 +1,71 @@
|
|
|
1
1
|
import { html, nothing } from 'lit';
|
|
2
2
|
import { sanitizeUrl } from '../../../utilities/sanitize-url.js';
|
|
3
|
+
import '../../content/tooltip/tooltip.js';
|
|
3
4
|
export function template(component) {
|
|
4
5
|
const safeHref = sanitizeUrl(component.href);
|
|
5
6
|
const isLink = Boolean(safeHref);
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
// Whether the text is hidden, the same question the styles answer: always
|
|
8
|
+
// with `icon-only`, and in a compact bar only when there is an icon to fall
|
|
9
|
+
// back on. One answer for the name and the tooltip, so they cannot disagree.
|
|
10
|
+
const hasIcon = Boolean(component.icon) || component._hasSlottedIcon;
|
|
11
|
+
const showsIconOnly = Boolean(component.text) && (component.iconOnly || (component.contentPriority === 'icon' && component.compact && hasIcon));
|
|
12
|
+
const ariaLabel = component.accessibleLabel || (showsIconOnly ? component.text : nothing);
|
|
13
|
+
// Once the text is hidden, hover has to bring it back: an icon alone leaves
|
|
14
|
+
// a sighted reader guessing, and at 200% zoom a bar is compact on a desktop.
|
|
15
|
+
// Always rendered, with an empty text when there is nothing to show, so the
|
|
16
|
+
// control is not replaced (and focus lost) when the bar turns compact.
|
|
17
|
+
const tooltipText = showsIconOnly ? (component.accessibleLabel || component.text) : '';
|
|
8
18
|
const ariaCurrent = component.current ? component.currentType : nothing;
|
|
9
19
|
const ariaHaspopup = component.expandable ? 'menu' : (component.haspopup || nothing);
|
|
10
20
|
const ariaExpanded = (component.expandable || component.haspopup) ? String(component.expanded) : nothing;
|
|
21
|
+
// The slot is always rendered, so a slotted icon is noticed when it arrives;
|
|
22
|
+
// the icon name is its fallback.
|
|
23
|
+
const icon = html `
|
|
24
|
+
<span class="menu-bar-item__icon" ?hidden=${!component.icon && !component._hasSlottedIcon}>
|
|
25
|
+
<slot name="icon" @slotchange=${component._onIconSlotChange}>
|
|
26
|
+
${component.icon ? html `<nldd-icon icon=${component.icon}></nldd-icon>` : nothing}
|
|
27
|
+
</slot>
|
|
28
|
+
</span>
|
|
29
|
+
`;
|
|
11
30
|
if (isLink) {
|
|
12
31
|
return html `
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
32
|
+
<nldd-tooltip text=${tooltipText}>
|
|
33
|
+
<a class="menu-bar-item"
|
|
34
|
+
href=${safeHref}
|
|
35
|
+
aria-disabled=${component.disabled || nothing}
|
|
36
|
+
tabindex=${component.disabled ? '-1' : nothing}
|
|
37
|
+
aria-current=${ariaCurrent}
|
|
38
|
+
aria-label=${ariaLabel}
|
|
39
|
+
aria-haspopup=${ariaHaspopup}
|
|
40
|
+
aria-expanded=${ariaExpanded}
|
|
41
|
+
>
|
|
42
|
+
${icon}
|
|
43
|
+
<span class="menu-bar-item__text">
|
|
44
|
+
${component.text}
|
|
45
|
+
</span>
|
|
46
|
+
${component.expandable ? html `
|
|
47
|
+
<span class="menu-bar-item__disclosure-icon">
|
|
48
|
+
<nldd-icon icon="chevron-down-small"></nldd-icon>
|
|
49
|
+
</span>
|
|
50
|
+
` : nothing}
|
|
51
|
+
</a>
|
|
52
|
+
</nldd-tooltip>
|
|
53
|
+
<slot @slotchange=${component._onSlotChange}></slot>
|
|
54
|
+
`;
|
|
55
|
+
}
|
|
56
|
+
return html `
|
|
57
|
+
<nldd-tooltip text=${tooltipText}>
|
|
58
|
+
<button class="menu-bar-item"
|
|
59
|
+
type="button"
|
|
60
|
+
?disabled=${component.disabled}
|
|
17
61
|
aria-current=${ariaCurrent}
|
|
18
62
|
aria-label=${ariaLabel}
|
|
19
63
|
aria-haspopup=${ariaHaspopup}
|
|
20
64
|
aria-expanded=${ariaExpanded}
|
|
65
|
+
.popoverTargetElement=${component.popoverTargetElement}
|
|
66
|
+
.popoverTargetAction=${component.popoverTargetAction}
|
|
21
67
|
>
|
|
22
|
-
${
|
|
23
|
-
<span class="menu-bar-item__icon">
|
|
24
|
-
<nldd-icon icon=${component.icon}></nldd-icon>
|
|
25
|
-
</span>
|
|
26
|
-
` : nothing}
|
|
68
|
+
${icon}
|
|
27
69
|
<span class="menu-bar-item__text">
|
|
28
70
|
${component.text}
|
|
29
71
|
</span>
|
|
@@ -32,35 +74,8 @@ export function template(component) {
|
|
|
32
74
|
<nldd-icon icon="chevron-down-small"></nldd-icon>
|
|
33
75
|
</span>
|
|
34
76
|
` : nothing}
|
|
35
|
-
</
|
|
36
|
-
|
|
37
|
-
`;
|
|
38
|
-
}
|
|
39
|
-
return html `
|
|
40
|
-
<button class="menu-bar-item"
|
|
41
|
-
type="button"
|
|
42
|
-
?disabled=${component.disabled}
|
|
43
|
-
aria-current=${ariaCurrent}
|
|
44
|
-
aria-label=${ariaLabel}
|
|
45
|
-
aria-haspopup=${ariaHaspopup}
|
|
46
|
-
aria-expanded=${ariaExpanded}
|
|
47
|
-
.popoverTargetElement=${component.popoverTargetElement}
|
|
48
|
-
.popoverTargetAction=${component.popoverTargetAction}
|
|
49
|
-
>
|
|
50
|
-
${component.icon ? html `
|
|
51
|
-
<span class="menu-bar-item__icon">
|
|
52
|
-
<nldd-icon icon=${component.icon}></nldd-icon>
|
|
53
|
-
</span>
|
|
54
|
-
` : nothing}
|
|
55
|
-
<span class="menu-bar-item__text">
|
|
56
|
-
${component.text}
|
|
57
|
-
</span>
|
|
58
|
-
${component.expandable ? html `
|
|
59
|
-
<span class="menu-bar-item__disclosure-icon">
|
|
60
|
-
<nldd-icon icon="chevron-down-small"></nldd-icon>
|
|
61
|
-
</span>
|
|
62
|
-
` : nothing}
|
|
63
|
-
</button>
|
|
77
|
+
</button>
|
|
78
|
+
</nldd-tooltip>
|
|
64
79
|
<slot @slotchange=${component._onSlotChange}></slot>
|
|
65
80
|
`;
|
|
66
81
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-bar-item.template.js","sourceRoot":"","sources":["../../../../src/components/navigation/menu-bar-item/menu-bar-item.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"menu-bar-item.template.js","sourceRoot":"","sources":["../../../../src/components/navigation/menu-bar-item/menu-bar-item.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,kCAAkC,CAAC;AAE1C,MAAM,UAAU,QAAQ,CAAC,SAA0B;IAClD,MAAM,QAAQ,GAAG,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC7C,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IACjC,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