@sapudex/web-components 2.57.0 → 2.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cypress/specs/FilterMenu.cy.tsx +209 -19
- package/cypress/specs/List.cy.tsx +67 -4
- package/cypress/specs/ListItem.cy.tsx +35 -9
- package/cypress/specs/SelectBox.cy.tsx +100 -0
- package/cypress/specs/TabNavigation.cy.tsx +297 -21
- package/dist/List.d.ts +15 -1
- package/dist/List.js +23 -2
- package/dist/List.js.map +1 -1
- package/dist/ListGroupHeaderBase.d.ts +13 -0
- package/dist/ListGroupHeaderBase.js +43 -2
- package/dist/ListGroupHeaderBase.js.map +1 -1
- package/dist/ListGroupHeaderTemplate.js +26 -7
- package/dist/ListGroupHeaderTemplate.js.map +1 -1
- package/dist/ListItem.d.ts +0 -3
- package/dist/ListItem.js +18 -12
- package/dist/ListItem.js.map +1 -1
- package/dist/ListItemBase.d.ts +17 -0
- package/dist/ListItemBase.js +15 -0
- package/dist/ListItemBase.js.map +1 -1
- package/dist/ListItemTemplate.js +2 -2
- package/dist/ListItemTemplate.js.map +1 -1
- package/dist/MastheadCountrySelector.js +5 -5
- package/dist/MastheadCountrySelector.js.map +1 -1
- package/dist/MastheadCountrySelectorTemplate.d.ts +2 -0
- package/dist/MastheadCountrySelectorTemplate.js +15 -0
- package/dist/MastheadCountrySelectorTemplate.js.map +1 -0
- package/dist/MastheadItem.d.ts +0 -3
- package/dist/MastheadItem.js +3 -6
- package/dist/MastheadItem.js.map +1 -1
- package/dist/MastheadItemTemplate.d.ts +2 -0
- package/dist/MastheadItemTemplate.js +41 -0
- package/dist/MastheadItemTemplate.js.map +1 -0
- package/dist/MastheadMenu.d.ts +1 -0
- package/dist/MastheadMenu.js +4 -6
- package/dist/MastheadMenu.js.map +1 -1
- package/dist/MastheadMenuItem.d.ts +0 -3
- package/dist/MastheadMenuItem.js +3 -6
- package/dist/MastheadMenuItem.js.map +1 -1
- package/dist/MastheadMenuItemTemplate.d.ts +2 -0
- package/dist/MastheadMenuItemTemplate.js +36 -0
- package/dist/MastheadMenuItemTemplate.js.map +1 -0
- package/dist/MastheadMenuTemplate.d.ts +2 -0
- package/dist/MastheadMenuTemplate.js +13 -0
- package/dist/MastheadMenuTemplate.js.map +1 -0
- package/dist/MastheadMobileMenu.js +3 -3
- package/dist/MastheadMobileMenu.js.map +1 -1
- package/dist/MastheadMobileMenuTemplate.d.ts +2 -0
- package/dist/MastheadMobileMenuTemplate.js +33 -0
- package/dist/MastheadMobileMenuTemplate.js.map +1 -0
- package/dist/MastheadProfileMenu.d.ts +2 -4
- package/dist/MastheadProfileMenu.js +5 -20
- package/dist/MastheadProfileMenu.js.map +1 -1
- package/dist/MastheadProfileMenuTemplate.d.ts +2 -0
- package/dist/MastheadProfileMenuTemplate.js +24 -0
- package/dist/MastheadProfileMenuTemplate.js.map +1 -0
- package/dist/MastheadShell.js +3 -5
- package/dist/MastheadShell.js.map +1 -1
- package/dist/MastheadShellTemplate.d.ts +2 -0
- package/dist/MastheadShellTemplate.js +20 -0
- package/dist/MastheadShellTemplate.js.map +1 -0
- package/dist/SearchableListBase.d.ts +10 -0
- package/dist/SearchableListBase.js +34 -1
- package/dist/SearchableListBase.js.map +1 -1
- package/dist/SearchableListBaseTemplate.js +35 -4
- package/dist/SearchableListBaseTemplate.js.map +1 -1
- package/dist/SecondaryNavigation.d.ts +1 -0
- package/dist/SecondaryNavigation.js +20 -6
- package/dist/SecondaryNavigation.js.map +1 -1
- package/dist/SelectBase.js +8 -3
- package/dist/SelectBase.js.map +1 -1
- package/dist/Tab.d.ts +0 -7
- package/dist/Tab.js +4 -19
- package/dist/Tab.js.map +1 -1
- package/dist/TabHeaderTemplate.d.ts +2 -0
- package/dist/TabHeaderTemplate.js +15 -0
- package/dist/TabHeaderTemplate.js.map +1 -0
- package/dist/TabInOverflowTemplate.d.ts +2 -0
- package/dist/TabInOverflowTemplate.js +7 -0
- package/dist/TabInOverflowTemplate.js.map +1 -0
- package/dist/TabNavigation.d.ts +3 -4
- package/dist/TabNavigation.js +53 -40
- package/dist/TabNavigation.js.map +1 -1
- package/dist/TabNavigationPopoverTemplate.d.ts +2 -0
- package/dist/TabNavigationPopoverTemplate.js +9 -0
- package/dist/TabNavigationPopoverTemplate.js.map +1 -0
- package/dist/TabNavigationTemplate.d.ts +2 -0
- package/dist/TabNavigationTemplate.js +10 -0
- package/dist/TabNavigationTemplate.js.map +1 -0
- package/dist/TabTemplate.d.ts +2 -0
- package/dist/TabTemplate.js +5 -0
- package/dist/TabTemplate.js.map +1 -0
- package/dist/assets/{InputSuggestions-C8grDr_8.js → InputSuggestions-CMYjJsHw.js} +1 -1
- package/dist/assets/{ListItemStandardExpandableTextTemplate-BQtSr7yg.js → ListItemStandardExpandableTextTemplate-D2i8wWuR.js} +1 -1
- package/dist/assets/{bundle.esm-GvPkDyXP.js → bundle.esm-BjN47C_y.js} +242 -242
- package/dist/assets/messagebundle_en-B7YJOdQz.js +1 -0
- package/dist/css/themes/Button.css +1 -1
- package/dist/css/themes/ListGroupHeader.css +1 -1
- package/dist/css/themes/PromoTile.css +1 -1
- package/dist/css/themes/TabInOverflow.css +1 -1
- package/dist/generated/assets/i18n/messagebundle_en.json +1 -1
- package/dist/generated/i18n/i18n-defaults.d.ts +3 -1
- package/dist/generated/i18n/i18n-defaults.js +3 -1
- package/dist/generated/i18n/i18n-defaults.js.map +1 -1
- package/dist/generated/themes/Button.css.d.ts +1 -1
- package/dist/generated/themes/Button.css.js +1 -1
- package/dist/generated/themes/Button.css.js.map +1 -1
- package/dist/generated/themes/ListGroupHeader.css.d.ts +1 -1
- package/dist/generated/themes/ListGroupHeader.css.js +1 -1
- package/dist/generated/themes/ListGroupHeader.css.js.map +1 -1
- package/dist/generated/themes/PromoTile.css.d.ts +1 -1
- package/dist/generated/themes/PromoTile.css.js +1 -1
- package/dist/generated/themes/PromoTile.css.js.map +1 -1
- package/dist/generated/themes/TabInOverflow.css.d.ts +1 -1
- package/dist/generated/themes/TabInOverflow.css.js +1 -1
- package/dist/generated/themes/TabInOverflow.css.js.map +1 -1
- package/dist/messagebundle.properties +4 -0
- package/dist/messagebundle_en.properties +2 -0
- package/dist/web-types.json +1 -1
- package/package.json +1 -1
- package/src/List.ts +24 -2
- package/src/ListGroupHeaderBase.ts +44 -2
- package/src/ListGroupHeaderTemplate.tsx +74 -23
- package/src/ListItem.ts +18 -15
- package/src/ListItemBase.ts +30 -0
- package/src/ListItemTemplate.tsx +4 -4
- package/src/MastheadCountrySelector.ts +5 -5
- package/src/MastheadCountrySelectorTemplate.tsx +98 -0
- package/src/MastheadItem.ts +3 -6
- package/src/MastheadItemTemplate.tsx +178 -0
- package/src/MastheadMenu.ts +5 -6
- package/src/MastheadMenuItem.ts +3 -7
- package/src/MastheadMenuItemTemplate.tsx +123 -0
- package/src/MastheadMenuTemplate.tsx +142 -0
- package/src/MastheadMobileMenu.ts +3 -3
- package/src/MastheadMobileMenuTemplate.tsx +274 -0
- package/src/MastheadProfileMenu.ts +10 -23
- package/src/MastheadProfileMenuTemplate.tsx +143 -0
- package/src/MastheadShell.ts +3 -5
- package/src/MastheadShellTemplate.tsx +228 -0
- package/src/SearchableListBase.ts +37 -1
- package/src/SearchableListBaseTemplate.tsx +38 -2
- package/src/SecondaryNavigation.ts +21 -6
- package/src/SelectBase.ts +8 -3
- package/src/Tab.ts +4 -24
- package/src/TabHeaderTemplate.tsx +153 -0
- package/src/TabInOverflowTemplate.tsx +68 -0
- package/src/TabNavigation.ts +61 -44
- package/src/TabNavigationPopoverTemplate.tsx +27 -0
- package/src/TabNavigationTemplate.tsx +98 -0
- package/src/TabTemplate.tsx +7 -0
- package/src/generated/i18n/i18n-defaults.ts +2 -2
- package/src/generated/themes/Button.css.ts +1 -1
- package/src/generated/themes/ListGroupHeader.css.ts +1 -1
- package/src/generated/themes/PromoTile.css.ts +1 -1
- package/src/generated/themes/TabInOverflow.css.ts +1 -1
- package/src/i18n/messagebundle.properties +4 -0
- package/src/i18n/messagebundle_en.properties +2 -0
- package/src/themes/Button.css +2 -1
- package/src/themes/ListGroupHeader.css +50 -7
- package/src/themes/PromoTile.css +1 -0
- package/src/themes/TabInOverflow.css +9 -4
- package/dist/assets/messagebundle_en-DBpf5Il2.js +0 -1
- package/dist/generated/templates/MastheadCountrySelectorTemplate.lit.d.ts +0 -3
- package/dist/generated/templates/MastheadCountrySelectorTemplate.lit.js +0 -13
- package/dist/generated/templates/MastheadCountrySelectorTemplate.lit.js.map +0 -1
- package/dist/generated/templates/MastheadItemTemplate.lit.d.ts +0 -3
- package/dist/generated/templates/MastheadItemTemplate.lit.js +0 -43
- package/dist/generated/templates/MastheadItemTemplate.lit.js.map +0 -1
- package/dist/generated/templates/MastheadMenuItemTemplate.lit.d.ts +0 -3
- package/dist/generated/templates/MastheadMenuItemTemplate.lit.js +0 -21
- package/dist/generated/templates/MastheadMenuItemTemplate.lit.js.map +0 -1
- package/dist/generated/templates/MastheadMenuTemplate.lit.d.ts +0 -3
- package/dist/generated/templates/MastheadMenuTemplate.lit.js +0 -25
- package/dist/generated/templates/MastheadMenuTemplate.lit.js.map +0 -1
- package/dist/generated/templates/MastheadMobileMenuTemplate.lit.d.ts +0 -3
- package/dist/generated/templates/MastheadMobileMenuTemplate.lit.js +0 -37
- package/dist/generated/templates/MastheadMobileMenuTemplate.lit.js.map +0 -1
- package/dist/generated/templates/MastheadProfileMenuTemplate.lit.d.ts +0 -3
- package/dist/generated/templates/MastheadProfileMenuTemplate.lit.js +0 -18
- package/dist/generated/templates/MastheadProfileMenuTemplate.lit.js.map +0 -1
- package/dist/generated/templates/MastheadShellTemplate.lit.d.ts +0 -3
- package/dist/generated/templates/MastheadShellTemplate.lit.js +0 -28
- package/dist/generated/templates/MastheadShellTemplate.lit.js.map +0 -1
- package/dist/generated/templates/TabHeaderTemplate.lit.d.ts +0 -3
- package/dist/generated/templates/TabHeaderTemplate.lit.js +0 -52
- package/dist/generated/templates/TabHeaderTemplate.lit.js.map +0 -1
- package/dist/generated/templates/TabInOverflowTemplate.lit.d.ts +0 -3
- package/dist/generated/templates/TabInOverflowTemplate.lit.js +0 -15
- package/dist/generated/templates/TabInOverflowTemplate.lit.js.map +0 -1
- package/dist/generated/templates/TabNavigationPopoverTemplate.lit.d.ts +0 -3
- package/dist/generated/templates/TabNavigationPopoverTemplate.lit.js +0 -8
- package/dist/generated/templates/TabNavigationPopoverTemplate.lit.js.map +0 -1
- package/dist/generated/templates/TabNavigationTemplate.lit.d.ts +0 -3
- package/dist/generated/templates/TabNavigationTemplate.lit.js +0 -16
- package/dist/generated/templates/TabNavigationTemplate.lit.js.map +0 -1
- package/dist/generated/templates/TabTemplate.lit.d.ts +0 -3
- package/dist/generated/templates/TabTemplate.lit.js +0 -7
- package/dist/generated/templates/TabTemplate.lit.js.map +0 -1
- package/src/MastheadCountrySelector.hbs +0 -76
- package/src/MastheadItem.hbs +0 -136
- package/src/MastheadMenu.hbs +0 -131
- package/src/MastheadMenuItem.hbs +0 -102
- package/src/MastheadMobileMenu.hbs +0 -253
- package/src/MastheadProfileMenu.hbs +0 -121
- package/src/MastheadShell.hbs +0 -223
- package/src/Tab.hbs +0 -1
- package/src/TabHeader.hbs +0 -141
- package/src/TabInOverflow.hbs +0 -59
- package/src/TabNavigation.hbs +0 -88
- package/src/TabNavigationPopover.hbs +0 -18
- package/src/generated/templates/MastheadCountrySelectorTemplate.lit.ts +0 -17
- package/src/generated/templates/MastheadItemTemplate.lit.ts +0 -47
- package/src/generated/templates/MastheadMenuItemTemplate.lit.ts +0 -25
- package/src/generated/templates/MastheadMenuTemplate.lit.ts +0 -29
- package/src/generated/templates/MastheadMobileMenuTemplate.lit.ts +0 -41
- package/src/generated/templates/MastheadProfileMenuTemplate.lit.ts +0 -22
- package/src/generated/templates/MastheadShellTemplate.lit.ts +0 -32
- package/src/generated/templates/TabHeaderTemplate.lit.ts +0 -56
- package/src/generated/templates/TabInOverflowTemplate.lit.ts +0 -19
- package/src/generated/templates/TabNavigationPopoverTemplate.lit.ts +0 -12
- package/src/generated/templates/TabNavigationTemplate.lit.ts +0 -20
- package/src/generated/templates/TabTemplate.lit.ts +0 -11
|
@@ -3,6 +3,6 @@ import defaultThemeBase from "@ui5/webcomponents-theming/dist/generated/themes/s
|
|
|
3
3
|
import defaultTheme from "./sap_horizon/parameters-bundle.css.js";
|
|
4
4
|
registerThemePropertiesLoader("@" + "ui5" + "/" + "webcomponents-theming", "sap_horizon", async () => defaultThemeBase);
|
|
5
5
|
registerThemePropertiesLoader("@" + "s" + "a" + "p" + "u" + "d" + "e" + "x" + "/" + "w" + "e" + "b" + "-" + "c" + "o" + "m" + "p" + "o" + "n" + "e" + "n" + "t" + "s", "sap_horizon", async () => defaultTheme, "host");
|
|
6
|
-
export default `:host{--udex-tab-overflow-button-font-size: var(--sapFontSize, var(--udexTypographyNavigationRegularXLFontSize));--udex-tab-overflow-button-font-weight: var(--udexTypographyFontWeightRegular, 400);--udex-tab-overflow-button-badge-background: var(--sapAccentColor2, var(--udexColorRed7));--udex-tab-overflow-button-font-family: var(--sapFontFamily, sans-serif);--udex-tab-overflow-button-line-height: var(--sapContent_LineHeight, var(--udexTypographyBodyLineHeight))}[ui5-popover]{margin-top:1px;box-shadow:0 2px 8px #2235484d;border:1px solid var(--udexColorGrey6)}[ui5-popover]::part(content){padding:0}.tab-navigation-popover{display:flex;flex-direction:column;min-width:150px}.udex-tab-overflow__button{padding:var(--udexSpacer8) var(--udexSpacer12);display:flex;background:none;border:0;border-radius:0;cursor:pointer;text-align:start;color:var(--udexColorGrey9);font-family:var(--udex-tab-overflow-button-font-family);font-size:var(--udex-tab-overflow-button-font-size);font-weight:var(--udex-tab-overflow-button-font-weight);line-height:var(--udex-tab-overflow-button-line-height);text-decoration:none;text-transform:capitalize}.udex-tab-overflow__button:hover{background-color:var(--udexColorGrey1)}.udex-tab-overflow__button:focus{outline:2px solid var(--udexColorBlue7, #0070F2);outline-offset:-2px}.udex-tab-overflow__button:active{background-color:var(--udexColorGrey2)}.udex-tab-overflow__button-icon{margin-inline-end:var(--udexSpacer8);position:relative;z-index:var(--udexZIndex0, 0)}.udex-tab-overflow__button-badge{margin-block-start:-2px;margin-inline-start:2px;display:inline-flex;width:6px;height:6px;border:1px solid #fff;border-radius:50%;background-color:var(--udex-tab-overflow-button-badge-background)}.udex-tab-overflow__button-icon .udex-tab-overflow__button-badge{margin-block-start:0;margin-inline-start:0;position:absolute;z-index:var(--udexZIndex1, 1);inset-block-start:-4px;inset-inline-end:-6px}
|
|
6
|
+
export default `:host{--udex-tab-overflow-button-font-size: var(--sapFontSize, var(--udexTypographyNavigationRegularXLFontSize));--udex-tab-overflow-button-font-weight: var(--udexTypographyFontWeightRegular, 400);--udex-tab-overflow-button-badge-background: var(--sapAccentColor2, var(--udexColorRed7));--udex-tab-overflow-button-font-family: var(--sapFontFamily, sans-serif);--udex-tab-overflow-button-line-height: var(--sapContent_LineHeight, var(--udexTypographyBodyLineHeight))}[ui5-popover]{margin-top:1px;box-shadow:0 2px 8px #2235484d;border:1px solid var(--udexColorGrey6)}[ui5-popover]::part(content){padding:0}.tab-navigation-popover{display:flex;flex-direction:column;min-width:150px}.udex-tab-overflow__button{padding:var(--udexSpacer8) var(--udexSpacer12);display:flex;background:none;border:0;border-radius:0;cursor:pointer;text-align:start;color:var(--udexColorGrey9);font-family:var(--udex-tab-overflow-button-font-family);font-size:var(--udex-tab-overflow-button-font-size);font-weight:var(--udex-tab-overflow-button-font-weight);line-height:var(--udex-tab-overflow-button-line-height);text-decoration:none;text-transform:capitalize}.udex-tab-overflow__button:not([aria-disabled=true]):hover{background-color:var(--udexColorGrey1)}.udex-tab-overflow__button:not([aria-disabled=true]):focus{outline:var(--udexSpacer2, 2px) solid var(--udexColorBlue7, #0070F2);outline-offset:-2px}.udex-tab-overflow__button:not([aria-disabled=true]):active{background-color:var(--udexColorGrey2)}.udex-tab-overflow__button[aria-disabled=true]{opacity:var(--sapContent_DisabledOpacity, .4);cursor:default}.udex-tab-overflow__button-icon{margin-inline-end:var(--udexSpacer8);position:relative;z-index:var(--udexZIndex0, 0)}.udex-tab-overflow__button-badge{margin-block-start:-2px;margin-inline-start:2px;display:inline-flex;width:6px;height:6px;border:1px solid #fff;border-radius:50%;background-color:var(--udex-tab-overflow-button-badge-background)}.udex-tab-overflow__button-icon .udex-tab-overflow__button-badge{margin-block-start:0;margin-inline-start:0;position:absolute;z-index:var(--udexZIndex1, 1);inset-block-start:-4px;inset-inline-end:-6px}
|
|
7
7
|
`;
|
|
8
8
|
//# sourceMappingURL=TabInOverflow.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabInOverflow.css.js","sourceRoot":"","sources":["../../../src/generated/themes/TabInOverflow.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,yDAAyD,CAAC;AAExG,OAAO,gBAAgB,MAAM,uFAAuF,CAAC;AACrH,OAAO,YAAY,MAAM,wCAAwC,CAAC;AAElE,6BAA6B,CAAC,GAAG,GAAG,KAAK,GAAG,GAAG,GAAG,uBAAuB,EAAE,aAAa,EAAE,KAAK,IAAI,EAAE,CAAC,gBAAgB,CAAC,CAAC;AACxH,6BAA6B,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,EAAE,aAAa,EAAE,KAAK,IAAI,EAAE,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;AACxN,eAAe;CACd,CAAA","sourcesContent":["import { registerThemePropertiesLoader } from \"@ui5/webcomponents-base/dist/asset-registries/Themes.js\";\n\nimport defaultThemeBase from \"@ui5/webcomponents-theming/dist/generated/themes/sap_horizon/parameters-bundle.css.js\";\nimport defaultTheme from \"./sap_horizon/parameters-bundle.css.js\";\n\nregisterThemePropertiesLoader(\"@\" + \"ui5\" + \"/\" + \"webcomponents-theming\", \"sap_horizon\", async () => defaultThemeBase);\nregisterThemePropertiesLoader(\"@\" + \"s\" + \"a\" + \"p\" + \"u\" + \"d\" + \"e\" + \"x\" + \"/\" + \"w\" + \"e\" + \"b\" + \"-\" + \"c\" + \"o\" + \"m\" + \"p\" + \"o\" + \"n\" + \"e\" + \"n\" + \"t\" + \"s\", \"sap_horizon\", async () => defaultTheme, \"host\");\nexport default `:host{--udex-tab-overflow-button-font-size: var(--sapFontSize, var(--udexTypographyNavigationRegularXLFontSize));--udex-tab-overflow-button-font-weight: var(--udexTypographyFontWeightRegular, 400);--udex-tab-overflow-button-badge-background: var(--sapAccentColor2, var(--udexColorRed7));--udex-tab-overflow-button-font-family: var(--sapFontFamily, sans-serif);--udex-tab-overflow-button-line-height: var(--sapContent_LineHeight, var(--udexTypographyBodyLineHeight))}[ui5-popover]{margin-top:1px;box-shadow:0 2px 8px #2235484d;border:1px solid var(--udexColorGrey6)}[ui5-popover]::part(content){padding:0}.tab-navigation-popover{display:flex;flex-direction:column;min-width:150px}.udex-tab-overflow__button{padding:var(--udexSpacer8) var(--udexSpacer12);display:flex;background:none;border:0;border-radius:0;cursor:pointer;text-align:start;color:var(--udexColorGrey9);font-family:var(--udex-tab-overflow-button-font-family);font-size:var(--udex-tab-overflow-button-font-size);font-weight:var(--udex-tab-overflow-button-font-weight);line-height:var(--udex-tab-overflow-button-line-height);text-decoration:none;text-transform:capitalize}.udex-tab-overflow__button:hover{background-color:var(--udexColorGrey1)}.udex-tab-overflow__button:focus{outline:2px solid var(--udexColorBlue7, #0070F2);outline-offset:-2px}.udex-tab-overflow__button:active{background-color:var(--udexColorGrey2)}.udex-tab-overflow__button-icon{margin-inline-end:var(--udexSpacer8);position:relative;z-index:var(--udexZIndex0, 0)}.udex-tab-overflow__button-badge{margin-block-start:-2px;margin-inline-start:2px;display:inline-flex;width:6px;height:6px;border:1px solid #fff;border-radius:50%;background-color:var(--udex-tab-overflow-button-badge-background)}.udex-tab-overflow__button-icon .udex-tab-overflow__button-badge{margin-block-start:0;margin-inline-start:0;position:absolute;z-index:var(--udexZIndex1, 1);inset-block-start:-4px;inset-inline-end:-6px}\n`"]}
|
|
1
|
+
{"version":3,"file":"TabInOverflow.css.js","sourceRoot":"","sources":["../../../src/generated/themes/TabInOverflow.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,yDAAyD,CAAC;AAExG,OAAO,gBAAgB,MAAM,uFAAuF,CAAC;AACrH,OAAO,YAAY,MAAM,wCAAwC,CAAC;AAElE,6BAA6B,CAAC,GAAG,GAAG,KAAK,GAAG,GAAG,GAAG,uBAAuB,EAAE,aAAa,EAAE,KAAK,IAAI,EAAE,CAAC,gBAAgB,CAAC,CAAC;AACxH,6BAA6B,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,EAAE,aAAa,EAAE,KAAK,IAAI,EAAE,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;AACxN,eAAe;CACd,CAAA","sourcesContent":["import { registerThemePropertiesLoader } from \"@ui5/webcomponents-base/dist/asset-registries/Themes.js\";\n\nimport defaultThemeBase from \"@ui5/webcomponents-theming/dist/generated/themes/sap_horizon/parameters-bundle.css.js\";\nimport defaultTheme from \"./sap_horizon/parameters-bundle.css.js\";\n\nregisterThemePropertiesLoader(\"@\" + \"ui5\" + \"/\" + \"webcomponents-theming\", \"sap_horizon\", async () => defaultThemeBase);\nregisterThemePropertiesLoader(\"@\" + \"s\" + \"a\" + \"p\" + \"u\" + \"d\" + \"e\" + \"x\" + \"/\" + \"w\" + \"e\" + \"b\" + \"-\" + \"c\" + \"o\" + \"m\" + \"p\" + \"o\" + \"n\" + \"e\" + \"n\" + \"t\" + \"s\", \"sap_horizon\", async () => defaultTheme, \"host\");\nexport default `:host{--udex-tab-overflow-button-font-size: var(--sapFontSize, var(--udexTypographyNavigationRegularXLFontSize));--udex-tab-overflow-button-font-weight: var(--udexTypographyFontWeightRegular, 400);--udex-tab-overflow-button-badge-background: var(--sapAccentColor2, var(--udexColorRed7));--udex-tab-overflow-button-font-family: var(--sapFontFamily, sans-serif);--udex-tab-overflow-button-line-height: var(--sapContent_LineHeight, var(--udexTypographyBodyLineHeight))}[ui5-popover]{margin-top:1px;box-shadow:0 2px 8px #2235484d;border:1px solid var(--udexColorGrey6)}[ui5-popover]::part(content){padding:0}.tab-navigation-popover{display:flex;flex-direction:column;min-width:150px}.udex-tab-overflow__button{padding:var(--udexSpacer8) var(--udexSpacer12);display:flex;background:none;border:0;border-radius:0;cursor:pointer;text-align:start;color:var(--udexColorGrey9);font-family:var(--udex-tab-overflow-button-font-family);font-size:var(--udex-tab-overflow-button-font-size);font-weight:var(--udex-tab-overflow-button-font-weight);line-height:var(--udex-tab-overflow-button-line-height);text-decoration:none;text-transform:capitalize}.udex-tab-overflow__button:not([aria-disabled=true]):hover{background-color:var(--udexColorGrey1)}.udex-tab-overflow__button:not([aria-disabled=true]):focus{outline:var(--udexSpacer2, 2px) solid var(--udexColorBlue7, #0070F2);outline-offset:-2px}.udex-tab-overflow__button:not([aria-disabled=true]):active{background-color:var(--udexColorGrey2)}.udex-tab-overflow__button[aria-disabled=true]{opacity:var(--sapContent_DisabledOpacity, .4);cursor:default}.udex-tab-overflow__button-icon{margin-inline-end:var(--udexSpacer8);position:relative;z-index:var(--udexZIndex0, 0)}.udex-tab-overflow__button-badge{margin-block-start:-2px;margin-inline-start:2px;display:inline-flex;width:6px;height:6px;border:1px solid #fff;border-radius:50%;background-color:var(--udex-tab-overflow-button-badge-background)}.udex-tab-overflow__button-icon .udex-tab-overflow__button-badge{margin-block-start:0;margin-inline-start:0;position:absolute;z-index:var(--udexZIndex1, 1);inset-block-start:-4px;inset-inline-end:-6px}\n`"]}
|
|
@@ -238,6 +238,10 @@ TABLE_NO_DATA_FOUND=No data found
|
|
|
238
238
|
EXPAND=Expand
|
|
239
239
|
COLLAPSE=Collapse
|
|
240
240
|
|
|
241
|
+
#Accessible state words announced for collapsible group headers
|
|
242
|
+
EXPANDED=expanded
|
|
243
|
+
COLLAPSED=collapsed
|
|
244
|
+
|
|
241
245
|
#SecondaryNavigationSubItem Aria label for back button
|
|
242
246
|
BACK_BUTTON_LABEL=return back
|
|
243
247
|
|
package/dist/web-types.json
CHANGED
package/package.json
CHANGED
package/src/List.ts
CHANGED
|
@@ -215,6 +215,7 @@ class UDExList extends UI5Element {
|
|
|
215
215
|
if (target.isGroup && target.hasAttribute("collapsible") && target.collapsed) {
|
|
216
216
|
target.collapsed = false;
|
|
217
217
|
this.setCollapsedItems(false, target);
|
|
218
|
+
this.fireAccordionToggle(target);
|
|
218
219
|
}
|
|
219
220
|
}
|
|
220
221
|
|
|
@@ -223,9 +224,25 @@ class UDExList extends UI5Element {
|
|
|
223
224
|
if (target.isGroup && target.hasAttribute("collapsible") && !target.collapsed) {
|
|
224
225
|
target.collapsed = true;
|
|
225
226
|
this.setCollapsedItems(true, target);
|
|
227
|
+
this.fireAccordionToggle(target);
|
|
226
228
|
}
|
|
227
229
|
}
|
|
228
230
|
|
|
231
|
+
/**
|
|
232
|
+
* Arrow-key expand/collapse toggles `collapsed` directly here (multi-select
|
|
233
|
+
* headers deliver Left/Right to the List, not to the header's own key handler),
|
|
234
|
+
* so the `accordion-icon-click` event that drives the collapse/expand live-region
|
|
235
|
+
* announcement is never fired on this path. Re-emit it from the header so
|
|
236
|
+
* SearchableListBase announces the new state to screen readers, matching the
|
|
237
|
+
* chevron/pointer and single-select paths.
|
|
238
|
+
*/
|
|
239
|
+
fireAccordionToggle(target: UDExListItemBase): void {
|
|
240
|
+
target.dispatchEvent(new CustomEvent("accordion-icon-click", {
|
|
241
|
+
bubbles: true,
|
|
242
|
+
detail: { collapsed: target.collapsed },
|
|
243
|
+
}));
|
|
244
|
+
}
|
|
245
|
+
|
|
229
246
|
handleUpArrow(e: KeyboardEvent): void {
|
|
230
247
|
e.preventDefault();
|
|
231
248
|
const items = this.getKeyboardNavigationItems();
|
|
@@ -606,9 +623,14 @@ class UDExList extends UI5Element {
|
|
|
606
623
|
return this.accessibleRole !== "listbox" ? this.accessibleRole : "list";
|
|
607
624
|
}
|
|
608
625
|
|
|
609
|
-
/**
|
|
626
|
+
/**
|
|
627
|
+
* aria-multiselectable is exposed for every MultiSelect list — the flat listbox
|
|
628
|
+
* and the collapsible tree alike. It is required so the screen reader announces
|
|
629
|
+
* each option's selected / not-selected state (from aria-selected) instead of
|
|
630
|
+
* treating the container as single-select and announcing only the active option.
|
|
631
|
+
*/
|
|
610
632
|
get _listAriaMultiSelectable(): string | undefined {
|
|
611
|
-
return
|
|
633
|
+
return this.modeMultiSelect ? "true" : undefined;
|
|
612
634
|
}
|
|
613
635
|
}
|
|
614
636
|
|
|
@@ -46,6 +46,19 @@ class UDExListGroupHeaderBase extends UDExListItemBase {
|
|
|
46
46
|
@property({ type: Boolean })
|
|
47
47
|
_treeMode: boolean = false;
|
|
48
48
|
|
|
49
|
+
/**
|
|
50
|
+
* Marks the group as a self-contained role="listbox" (FilterMenu real-focus
|
|
51
|
+
* SingleSelect, non-collapsible groups). When true, this group's options are
|
|
52
|
+
* wrapped in their own listbox so JAWS counts them natively per group. Set by
|
|
53
|
+
* the parent (SearchableListBase.isPerGroupListbox) only when the whole list is
|
|
54
|
+
* grouped; the outer #udex-list drops its listbox role in that case.
|
|
55
|
+
*
|
|
56
|
+
* @default false
|
|
57
|
+
* @private
|
|
58
|
+
*/
|
|
59
|
+
@property({ type: Boolean })
|
|
60
|
+
_groupAsListbox: boolean = false;
|
|
61
|
+
|
|
49
62
|
/**
|
|
50
63
|
* Slot for group header list items.
|
|
51
64
|
*
|
|
@@ -210,10 +223,29 @@ class UDExListGroupHeaderBase extends UDExListItemBase {
|
|
|
210
223
|
return this._treeMode;
|
|
211
224
|
}
|
|
212
225
|
|
|
226
|
+
// FilterMenu real-focus SingleSelect non-collapsible group: its options are
|
|
227
|
+
// rendered inside their own role="listbox" so JAWS counts them natively per
|
|
228
|
+
// group ("1 of 4"). JAWS ignores role="group" boundaries and author
|
|
229
|
+
// aria-posinset within a single listbox, but counts reliably within a flat
|
|
230
|
+
// listbox. Excludes SelectBox (_useHostAriaRole) and tree mode.
|
|
231
|
+
get isPerGroupListbox(): boolean {
|
|
232
|
+
return this._groupAsListbox && !this._useHostAriaRole && !this._treeMode;
|
|
233
|
+
}
|
|
234
|
+
|
|
213
235
|
get singleCollapsibleHeaderRole(): string {
|
|
214
236
|
return this._treeMode ? "treeitem" : "button";
|
|
215
237
|
}
|
|
216
238
|
|
|
239
|
+
// Pins the collapsible header's accessible name to its heading (+ supporting text)
|
|
240
|
+
// so the decorative expand/collapse chevron button — a child of the header — does
|
|
241
|
+
// not fold its "Expand"/"Collapse" label into the header's name. The chevron is a
|
|
242
|
+
// mouse affordance only (tabindex=-1); its state is already conveyed by
|
|
243
|
+
// aria-expanded, so excluding its name avoids announcing "Collapse" alongside the
|
|
244
|
+
// spoken "expanded"/"collapsed" state.
|
|
245
|
+
get collapsibleHeaderLabelledBy(): string {
|
|
246
|
+
return this.supportingText ? "group-heading group-supporting-text" : "group-heading";
|
|
247
|
+
}
|
|
248
|
+
|
|
217
249
|
get collapsibleHeaderAccessibleRole(): string {
|
|
218
250
|
return this._treeMode ? "treeitem" : "button";
|
|
219
251
|
}
|
|
@@ -222,7 +254,13 @@ class UDExListGroupHeaderBase extends UDExListItemBase {
|
|
|
222
254
|
if (this._useHostAriaRole) {
|
|
223
255
|
return "presentation";
|
|
224
256
|
}
|
|
225
|
-
|
|
257
|
+
// Tree mode keeps the treeitem/group nesting; per-group-listbox mode moves the
|
|
258
|
+
// single labelled role="listbox" onto the inner options wrapper — the outer div
|
|
259
|
+
// is transparent so screen readers don't announce a redundant "group" around it.
|
|
260
|
+
if (this._treeMode || this.isPerGroupListbox) {
|
|
261
|
+
return "none";
|
|
262
|
+
}
|
|
263
|
+
return "group";
|
|
226
264
|
}
|
|
227
265
|
|
|
228
266
|
get contentRegionRole(): string {
|
|
@@ -230,7 +268,11 @@ class UDExListGroupHeaderBase extends UDExListItemBase {
|
|
|
230
268
|
}
|
|
231
269
|
|
|
232
270
|
get nonCollapsibleContainerRole(): string {
|
|
233
|
-
|
|
271
|
+
// The single role="group" for non-collapsible headers lives on the outer
|
|
272
|
+
// div.udex-list__group wrapper (groupWrapperRole = "group" in non-tree mode,
|
|
273
|
+
// labelled by aria-labelledby="group-heading"). This container div must be
|
|
274
|
+
// transparent so that extra "group group" announcements are avoided.
|
|
275
|
+
return "none";
|
|
234
276
|
}
|
|
235
277
|
|
|
236
278
|
get nonCollapsibleHeaderAccessibleRole(): string | undefined {
|
|
@@ -35,18 +35,11 @@ function SingleGroupHeader(this: UDExListGroupHeader) {
|
|
|
35
35
|
);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
// The visible header row of the single-select collapsible group: number/icon,
|
|
39
|
+
// heading + supporting text, and the expand/collapse chevron.
|
|
40
|
+
function SingleCollapsibleHeaderRow(this: UDExListGroupHeader) {
|
|
39
41
|
return (
|
|
40
|
-
|
|
41
|
-
class={`udex-list__group-content udex-list__group-header-wrap ${this.sizeClass}`}
|
|
42
|
-
part="group-item"
|
|
43
|
-
id={`${this._id}_group-content__focusable`}
|
|
44
|
-
role={this.singleCollapsibleHeaderRole as AriaRole}
|
|
45
|
-
tabIndex={0}
|
|
46
|
-
onKeyDown={this.handleKeyDown}
|
|
47
|
-
aria-expanded={this.expanded}
|
|
48
|
-
aria-controls={this.ariaControlsId}
|
|
49
|
-
_tab-index={Number(this._effectiveTabIndex)}>
|
|
42
|
+
<>
|
|
50
43
|
{this.typeNumber && <span class="udex-list__number">{this.numberOfItem}.</span>}
|
|
51
44
|
{this.typeCircle && <span class="udex-list__circle">•</span>}
|
|
52
45
|
{this.typeIcon && (
|
|
@@ -65,7 +58,7 @@ function SingleGroupHeaderCollapsible(this: UDExListGroupHeader) {
|
|
|
65
58
|
{...({ innerHTML: this.label } as object)}>
|
|
66
59
|
</span>
|
|
67
60
|
{this.supportingText && (
|
|
68
|
-
<span class={`udex-list__supporting-text ${this.sizeClass}`}>{this.supportingText}</span>
|
|
61
|
+
<span id="group-supporting-text" class={`udex-list__supporting-text ${this.sizeClass}`}>{this.supportingText}</span>
|
|
69
62
|
)}
|
|
70
63
|
</div>
|
|
71
64
|
<div class="udex-list__group-heading__icon-wrapper">
|
|
@@ -74,12 +67,48 @@ function SingleGroupHeaderCollapsible(this: UDExListGroupHeader) {
|
|
|
74
67
|
design="Tertiary"
|
|
75
68
|
class="udex-list__group-heading__icon"
|
|
76
69
|
onClick={this.handleCollapseIconClick as unknown as EventListener}
|
|
70
|
+
onMouseDown={this.handleCollapseIconMouseDown}
|
|
77
71
|
tabindex={-1}
|
|
78
72
|
accessible-name={this.expandButtonAccessibleName}
|
|
79
73
|
icon={slimArrowRight}
|
|
80
74
|
{...({ "mode": "Interactive" } as object)}
|
|
81
75
|
/>
|
|
82
76
|
</div>
|
|
77
|
+
</>
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function SingleGroupHeaderCollapsible(this: UDExListGroupHeader) {
|
|
82
|
+
// Conformant WAI-ARIA tree (FilterMenu real focus): nest the child role="group"
|
|
83
|
+
// INSIDE this treeitem so screen readers count children per group natively — no
|
|
84
|
+
// explicit aria-posinset/aria-setsize (which JAWS distrusts). Excludes SelectBox
|
|
85
|
+
// (aria-activedescendant, _useHostAriaRole) and non-tree modes, which keep the flat
|
|
86
|
+
// structure with the content region emitted as a sibling by the template body.
|
|
87
|
+
const nested = this.isTreeAccessibleRole && !this._useHostAriaRole;
|
|
88
|
+
return (
|
|
89
|
+
<div
|
|
90
|
+
class={`udex-list__group-content ${nested ? "udex-list__group-content--nested " : ""}udex-list__group-header-wrap ${this.sizeClass}`}
|
|
91
|
+
part="group-item"
|
|
92
|
+
id={`${this._id}_group-content__focusable`}
|
|
93
|
+
role={this.singleCollapsibleHeaderRole as AriaRole}
|
|
94
|
+
tabIndex={0}
|
|
95
|
+
onKeyDown={this.handleKeyDown}
|
|
96
|
+
aria-expanded={this.expanded}
|
|
97
|
+
aria-controls={this.ariaControlsId}
|
|
98
|
+
aria-labelledby={this.collapsibleHeaderLabelledBy}
|
|
99
|
+
_tab-index={Number(this._effectiveTabIndex)}>
|
|
100
|
+
{nested ? (
|
|
101
|
+
<>
|
|
102
|
+
<div class="udex-list__group-header-row">
|
|
103
|
+
{SingleCollapsibleHeaderRow.call(this)}
|
|
104
|
+
</div>
|
|
105
|
+
<div id={this.ariaControlsId} role={this.contentRegionRole as AriaRole} class="udex-list__group-list__content">
|
|
106
|
+
<slot></slot>
|
|
107
|
+
</div>
|
|
108
|
+
</>
|
|
109
|
+
) : (
|
|
110
|
+
SingleCollapsibleHeaderRow.call(this)
|
|
111
|
+
)}
|
|
83
112
|
</div>
|
|
84
113
|
);
|
|
85
114
|
}
|
|
@@ -116,6 +145,8 @@ function MultiOrRadioGroupHeader(this: UDExListGroupHeader) {
|
|
|
116
145
|
accessible-role={this.nonCollapsibleHeaderAccessibleRole}
|
|
117
146
|
_additional-class-name={this._additionalClassName}
|
|
118
147
|
_tab-index={Number(this._effectiveTabIndex)}
|
|
148
|
+
_aria-pos-in-set={this._ariaPosInSet}
|
|
149
|
+
_aria-set-size={this._ariaSetSize}
|
|
119
150
|
_icon={this._icon}
|
|
120
151
|
_filtered={this._filtered}
|
|
121
152
|
/>
|
|
@@ -177,6 +208,8 @@ function MultiOrRadioGroupHeaderCollapsible(this: UDExListGroupHeader) {
|
|
|
177
208
|
onAccordionIconClick={this.handleCollapseIconClick as EventListener}
|
|
178
209
|
_additional-class-name={this._additionalClassName}
|
|
179
210
|
_tab-index={Number(this._effectiveTabIndex)}
|
|
211
|
+
_aria-pos-in-set={this._ariaPosInSet}
|
|
212
|
+
_aria-set-size={this._ariaSetSize}
|
|
180
213
|
_icon={this._icon}
|
|
181
214
|
_filtered={this._filtered}
|
|
182
215
|
/>
|
|
@@ -184,12 +217,16 @@ function MultiOrRadioGroupHeaderCollapsible(this: UDExListGroupHeader) {
|
|
|
184
217
|
}
|
|
185
218
|
|
|
186
219
|
export default function ListGroupHeaderTemplate(this: UDExListGroupHeader) {
|
|
220
|
+
// Single-select real-focus tree: SingleGroupHeaderCollapsible now emits the
|
|
221
|
+
// role="group" content region as a CHILD of the treeitem (conformant nesting),
|
|
222
|
+
// so the template body must not also emit it as a sibling.
|
|
223
|
+
const singleSelectNested = this.isTreeAccessibleRole && !this.useListItemHeader && !this._useHostAriaRole;
|
|
187
224
|
return (
|
|
188
225
|
<div
|
|
189
226
|
part="item"
|
|
190
227
|
class="udex-list__group"
|
|
191
228
|
role={this.groupWrapperRole as AriaRole}
|
|
192
|
-
aria-labelledby={!this.isTreeAccessibleRole ? "group-heading" : undefined}>
|
|
229
|
+
aria-labelledby={(!this.isTreeAccessibleRole && !this.isPerGroupListbox) ? "group-heading" : undefined}>
|
|
193
230
|
{this.collapsible ? (
|
|
194
231
|
<div
|
|
195
232
|
class="udex-list__group-list"
|
|
@@ -199,28 +236,42 @@ export default function ListGroupHeaderTemplate(this: UDExListGroupHeader) {
|
|
|
199
236
|
? MultiOrRadioGroupHeaderCollapsible.call(this)
|
|
200
237
|
: SingleGroupHeaderCollapsible.call(this)
|
|
201
238
|
}
|
|
202
|
-
|
|
203
|
-
{this.
|
|
204
|
-
|
|
205
|
-
) : (
|
|
206
|
-
<div role="listbox" aria-label="group">
|
|
239
|
+
{!singleSelectNested && (
|
|
240
|
+
<div id={this.ariaControlsId} role={this.contentRegionRole as AriaRole} class="udex-list__group-list__content">
|
|
241
|
+
{this.isTreeAccessibleRole ? (
|
|
207
242
|
<slot></slot>
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
243
|
+
) : (
|
|
244
|
+
<div role="listbox" aria-label="group">
|
|
245
|
+
<slot></slot>
|
|
246
|
+
</div>
|
|
247
|
+
)}
|
|
248
|
+
</div>
|
|
249
|
+
)}
|
|
211
250
|
</div>
|
|
212
251
|
) : (
|
|
213
252
|
<div
|
|
214
253
|
role={this.nonCollapsibleContainerRole as AriaRole}
|
|
215
254
|
class="udex-list__group-list"
|
|
216
|
-
aria-label="group"
|
|
217
255
|
onui5-item-press={this.getHandleGroupItemsClick}
|
|
218
256
|
{...({ name: "group" } as object)}>
|
|
219
257
|
{this.modeMultiSelectOrRadioGroup
|
|
220
258
|
? MultiOrRadioGroupHeader.call(this)
|
|
221
259
|
: SingleGroupHeader.call(this)
|
|
222
260
|
}
|
|
223
|
-
|
|
261
|
+
{this.isTreeAccessibleRole ? (
|
|
262
|
+
<div role="group">
|
|
263
|
+
<slot></slot>
|
|
264
|
+
</div>
|
|
265
|
+
) : this.isPerGroupListbox ? (
|
|
266
|
+
// Each group is its own labelled listbox: JAWS counts the options natively
|
|
267
|
+
// per group ("Python, 1 of 4"). The outer #udex-list is presentational
|
|
268
|
+
// (SearchableListBase.isPerGroupListbox) so this is not a nested listbox.
|
|
269
|
+
<div role="listbox" aria-labelledby="group-heading">
|
|
270
|
+
<slot></slot>
|
|
271
|
+
</div>
|
|
272
|
+
) : (
|
|
273
|
+
<slot></slot>
|
|
274
|
+
)}
|
|
224
275
|
</div>
|
|
225
276
|
)}
|
|
226
277
|
</div>
|
package/src/ListItem.ts
CHANGED
|
@@ -398,27 +398,38 @@ class UDExListItem extends UDExListItemBase {
|
|
|
398
398
|
}
|
|
399
399
|
|
|
400
400
|
get ariaSelectedValue(): "true" | "false" | undefined {
|
|
401
|
-
|
|
401
|
+
// RadioGroup conveys its state through the radio control, never aria-selected.
|
|
402
|
+
if (this.modeRadioGroup) {
|
|
403
|
+
return undefined;
|
|
404
|
+
}
|
|
405
|
+
// MultiSelect treeitems convey state via aria-checked (see ariaCheckedValue).
|
|
406
|
+
// Every other selectable node — listbox options in both SingleSelect AND
|
|
407
|
+
// MultiSelect, plus SingleSelect treeitems — announces its state natively
|
|
408
|
+
// through aria-selected so the screen reader re-reads it when focus is on the
|
|
409
|
+
// item and when Enter/Space toggles it.
|
|
410
|
+
if (this.roleItem === "treeitem" && this.modeMultiSelect) {
|
|
402
411
|
return undefined;
|
|
403
412
|
}
|
|
404
|
-
//
|
|
405
|
-
|
|
413
|
+
// Gated on the actual rendered role of the [part=item] div — never the
|
|
414
|
+
// presentational inner div used in aria-activedescendant mode (SelectBox sets
|
|
415
|
+
// aria-selected on the host).
|
|
416
|
+
if (this.roleItem !== "treeitem" && this.roleItem !== "option") {
|
|
406
417
|
return undefined;
|
|
407
418
|
}
|
|
408
419
|
return this.selected ? "true" : "false";
|
|
409
420
|
}
|
|
410
421
|
|
|
411
422
|
get ariaExpandedValue(): "true" | "false" | undefined {
|
|
423
|
+
// aria-expanded is exposed ONLY on collapsible headers — a node the user can
|
|
424
|
+
// actually expand/collapse. Non-collapsible group headers must NOT report an
|
|
425
|
+
// expanded/collapsed state (nothing to toggle); the tree hierarchy is conveyed
|
|
426
|
+
// structurally by the nested role="group", not by aria-expanded.
|
|
412
427
|
if (!this.collapsible) {
|
|
413
428
|
return undefined;
|
|
414
429
|
}
|
|
415
430
|
return this.expanded ? "true" : "false";
|
|
416
431
|
}
|
|
417
432
|
|
|
418
|
-
get checkboxAriaHidden(): boolean {
|
|
419
|
-
return this.effectiveRole === "treeitem";
|
|
420
|
-
}
|
|
421
|
-
|
|
422
433
|
get _ariaDisabled(): boolean | undefined {
|
|
423
434
|
return this.disabled ? true : undefined;
|
|
424
435
|
}
|
|
@@ -450,14 +461,6 @@ class UDExListItem extends UDExListItemBase {
|
|
|
450
461
|
return `${this.selected ? translate(UDExListItem, SELECTED) : translate(UDExListItem, UNSELECTED)} `;
|
|
451
462
|
}
|
|
452
463
|
|
|
453
|
-
get itemDescribedBy(): string {
|
|
454
|
-
return `${this._id}-invisibleText-describedby`;
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
get itemState(): string {
|
|
458
|
-
return this.selected ? "Selected" : "Not selected";
|
|
459
|
-
}
|
|
460
|
-
|
|
461
464
|
get ratingAriaLabel(): string {
|
|
462
465
|
const ratingText = this.ratingCount ? `${translate(UDExListItem, RATING_COUNT_TITLE)} ${this.ratingCount}` : "";
|
|
463
466
|
const totalText = this.totalCount ? `${translate(UDExListItem, TOTAL)} ${this.totalCount}` : "";
|
package/src/ListItemBase.ts
CHANGED
|
@@ -240,6 +240,27 @@ class UDExListItemBase extends UI5Element {
|
|
|
240
240
|
@property({ type: Boolean })
|
|
241
241
|
_useHostAriaRole: boolean = false;
|
|
242
242
|
|
|
243
|
+
/**
|
|
244
|
+
* Explicit 1-based position of this treeitem within its own group, for a grouped
|
|
245
|
+
* tree structure. The sibling-group tree markup makes JAWS/NVDA compute a flattened
|
|
246
|
+
* posinset/setsize across all groups; setting these explicitly restores the
|
|
247
|
+
* per-group count so each item announces "N of <items in this group>".
|
|
248
|
+
* Only rendered on real treeitems (never in aria-activedescendant mode).
|
|
249
|
+
*
|
|
250
|
+
* @private
|
|
251
|
+
*/
|
|
252
|
+
@property({ type: Number })
|
|
253
|
+
_ariaPosInSet?: number;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Explicit set size (number of treeitems within this item's own group) — the
|
|
257
|
+
* companion to {@link _ariaPosInSet}.
|
|
258
|
+
*
|
|
259
|
+
* @private
|
|
260
|
+
*/
|
|
261
|
+
@property({ type: Number })
|
|
262
|
+
_ariaSetSize?: number;
|
|
263
|
+
|
|
243
264
|
/**
|
|
244
265
|
* Defines the tab index of the component.
|
|
245
266
|
*
|
|
@@ -311,6 +332,15 @@ class UDExListItemBase extends UI5Element {
|
|
|
311
332
|
|
|
312
333
|
handleCollapseIconMouseDown(e: MouseEvent) {
|
|
313
334
|
e.stopPropagation();
|
|
335
|
+
// In aria-activedescendant mode (SelectBox) DOM focus must stay on the search
|
|
336
|
+
// input. Preventing the mousedown default stops the chevron/header body div from
|
|
337
|
+
// stealing focus, which would otherwise trigger a focusout→refocus + scroll-into-view
|
|
338
|
+
// that shifts the chevron out from under the pointer and eats the first click.
|
|
339
|
+
// Real-focus components (FilterMenu/List) leave _useHostAriaRole false and are
|
|
340
|
+
// unaffected. The click still fires, so collapse/expand happens on the first click.
|
|
341
|
+
if (this._useHostAriaRole) {
|
|
342
|
+
e.preventDefault();
|
|
343
|
+
}
|
|
314
344
|
}
|
|
315
345
|
|
|
316
346
|
handleCollapseIconClick(e: MouseEvent | KeyboardEvent) {
|
package/src/ListItemTemplate.tsx
CHANGED
|
@@ -126,7 +126,6 @@ function ContentList(this: UDExListItem) {
|
|
|
126
126
|
)}
|
|
127
127
|
</div>
|
|
128
128
|
<div class="hidden" id={`${this._id}-invisibleText`}>{this.accessibleListItemName}</div>
|
|
129
|
-
<div class="hidden" id={`${this._id}-invisibleText-describedby`}>{this.itemState}</div>
|
|
130
129
|
</div>
|
|
131
130
|
);
|
|
132
131
|
}
|
|
@@ -144,6 +143,8 @@ export default function ListItemTemplate(this: UDExListItem) {
|
|
|
144
143
|
aria-checked={this.ariaCheckedValue}
|
|
145
144
|
aria-selected={this.ariaSelectedValue}
|
|
146
145
|
aria-expanded={this.ariaExpandedValue}
|
|
146
|
+
aria-posinset={this._ariaPosInSet || undefined}
|
|
147
|
+
aria-setsize={this._ariaSetSize || undefined}
|
|
147
148
|
onFocusIn={this.handleFocusIn}
|
|
148
149
|
onFocusOut={this.handleFocusOut}
|
|
149
150
|
onClick={this.handleItemClick}
|
|
@@ -152,8 +153,7 @@ export default function ListItemTemplate(this: UDExListItem) {
|
|
|
152
153
|
onKeyUp={this.handleKeyUp}
|
|
153
154
|
onKeyDown={this.handleKeyDown}
|
|
154
155
|
{...({ divider: this.divider, "_id": this._id } as object)}
|
|
155
|
-
data-selected={this.selected}
|
|
156
|
-
aria-describedby={this.itemDescribedBy}>
|
|
156
|
+
data-selected={this.selected}>
|
|
157
157
|
{this.modeMultiSelect && (
|
|
158
158
|
<UDExCheckbox
|
|
159
159
|
class="udex-list__checkbox"
|
|
@@ -163,7 +163,7 @@ export default function ListItemTemplate(this: UDExListItem) {
|
|
|
163
163
|
accessible-name={`checkbox ${this.stateAccessibleName}`}
|
|
164
164
|
checked={this.selected}
|
|
165
165
|
disabled={this.disabled}
|
|
166
|
-
aria-hidden=
|
|
166
|
+
aria-hidden="true"
|
|
167
167
|
/>
|
|
168
168
|
)}
|
|
169
169
|
{this.modeRadioGroup && (
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
2
2
|
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
3
3
|
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
4
|
-
import
|
|
4
|
+
import jsxRenderer from "@ui5/webcomponents-base/renderer/JsxRenderer.js";
|
|
5
5
|
import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
|
|
6
6
|
import UI5Icon from "@ui5/webcomponents/dist/Icon.js";
|
|
7
7
|
import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js";
|
|
@@ -9,8 +9,8 @@ import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
|
9
9
|
import { isDesktop } from "@ui5/webcomponents-base/dist/Device.js";
|
|
10
10
|
import "@ui5/webcomponents-icons/dist/slim-arrow-right.js";
|
|
11
11
|
import UDExMastheadMenuItem from "./MastheadMenuItem.js";
|
|
12
|
-
import
|
|
13
|
-
import MastheadCountrySelectorTemplate from "./
|
|
12
|
+
import { Mode as UDExSearchMode } from "./Search.js";
|
|
13
|
+
import MastheadCountrySelectorTemplate from "./MastheadCountrySelectorTemplate.js";
|
|
14
14
|
import AnalyticsName from "./types/AnalyticsName.js";
|
|
15
15
|
import { BreakpointUtils } from "./utils/Breakpoints.js";
|
|
16
16
|
import type UDExMastheadShell from "./MastheadShell.js";
|
|
@@ -77,10 +77,10 @@ type UDExMastheadCountrySelectorSearchEventDetail = {
|
|
|
77
77
|
*/
|
|
78
78
|
@customElement({
|
|
79
79
|
tag: "udex-masthead-country-selector",
|
|
80
|
-
renderer:
|
|
80
|
+
renderer: jsxRenderer,
|
|
81
81
|
styles: MastheadCountrySelectorCss,
|
|
82
82
|
template: MastheadCountrySelectorTemplate,
|
|
83
|
-
dependencies: [UI5Icon, UDExMastheadMenuItem
|
|
83
|
+
dependencies: [UI5Icon, UDExMastheadMenuItem],
|
|
84
84
|
})
|
|
85
85
|
|
|
86
86
|
/**
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type UDExMastheadCountrySelector from "./MastheadCountrySelector.js";
|
|
2
|
+
import UDExMastheadMenuItem from "./MastheadMenuItem.js";
|
|
3
|
+
import UDExSearch from "./Search.js";
|
|
4
|
+
|
|
5
|
+
export default function MastheadCountrySelectorTemplate(this: UDExMastheadCountrySelector) {
|
|
6
|
+
return (
|
|
7
|
+
<div class="udex-masthead-country-selector">
|
|
8
|
+
{this._isActiveRegionOpen ? activeRegionView.call(this) : regionsView.call(this)}
|
|
9
|
+
</div>
|
|
10
|
+
);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function activeRegionView(this: UDExMastheadCountrySelector) {
|
|
14
|
+
return (
|
|
15
|
+
<>
|
|
16
|
+
<span class="udex-masthead-country-selector__title">{this.countryTitle}</span>
|
|
17
|
+
{!this.isSingleMode && (
|
|
18
|
+
<UDExMastheadMenuItem
|
|
19
|
+
class="udex-masthead-country-selector__region-back-item"
|
|
20
|
+
accessible-role="button"
|
|
21
|
+
onClick={this.backToRegions}
|
|
22
|
+
label={this._activeRegion?.title}
|
|
23
|
+
type="Button"
|
|
24
|
+
part="menu-item"
|
|
25
|
+
icon-start={true}
|
|
26
|
+
{...{ "_accessible-name": this.backToRegionListAccessibleName, "is-back": "" }}>
|
|
27
|
+
</UDExMastheadMenuItem>
|
|
28
|
+
)}
|
|
29
|
+
{!this.hideSearch && (
|
|
30
|
+
<>
|
|
31
|
+
<UDExSearch
|
|
32
|
+
class="udex-masthead-country-selector__search"
|
|
33
|
+
onui5-handle-value-search={this.handleSearch}
|
|
34
|
+
onui5-handle-value-reset={this.handleSearchReset}
|
|
35
|
+
onui5-submit-search-value={this.handleSearch}
|
|
36
|
+
language-voice={this.languageVoice}
|
|
37
|
+
label={this.searchLabel}
|
|
38
|
+
mode={this.homeSearchMode}
|
|
39
|
+
show-voice-button={this.showSearchVoiceButton}
|
|
40
|
+
non-interactive-submit-button={true}
|
|
41
|
+
show-submit-button={true}>
|
|
42
|
+
</UDExSearch>
|
|
43
|
+
<span aria-live="polite" aria-atomic="true" class="hidden">{this._accSearchResultInfo}</span>
|
|
44
|
+
</>
|
|
45
|
+
)}
|
|
46
|
+
<div class="udex-masthead-country-selector__list-container">
|
|
47
|
+
<div class="udex-masthead-country-selector__list-wrap" onScroll={this.handleCountryListShadowVisible}>
|
|
48
|
+
<ul class="udex-masthead-country-selector__list udex-masthead-country-selector__list_countries" role="menu">
|
|
49
|
+
{this._activeCountries.map((country, index) => (
|
|
50
|
+
<li role="none" key={index}>
|
|
51
|
+
<UDExMastheadMenuItem
|
|
52
|
+
class="udex-masthead-country-selector__item udex-masthead-country-selector__item_countries"
|
|
53
|
+
onClick={this.handleCountryClick as any}
|
|
54
|
+
url={country.url}
|
|
55
|
+
label={country.displayTitle}
|
|
56
|
+
index={index}
|
|
57
|
+
part="menu-item"
|
|
58
|
+
{...{
|
|
59
|
+
"_country-code": country.countryCode,
|
|
60
|
+
"is-nav-item": "",
|
|
61
|
+
...(country.active ? { "_is-active-country": "" } : {}),
|
|
62
|
+
}}>
|
|
63
|
+
</UDExMastheadMenuItem>
|
|
64
|
+
</li>
|
|
65
|
+
))}
|
|
66
|
+
</ul>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</>
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function regionsView(this: UDExMastheadCountrySelector) {
|
|
74
|
+
return (
|
|
75
|
+
<>
|
|
76
|
+
<span class="udex-masthead-country-selector__title">{this.regionTitle}</span>
|
|
77
|
+
<ul class="udex-masthead-country-selector__list">
|
|
78
|
+
{this.regionsData.map((region, index) => (
|
|
79
|
+
<li key={index}>
|
|
80
|
+
<UDExMastheadMenuItem
|
|
81
|
+
onClick={this.handleRegionClick as any}
|
|
82
|
+
index={index}
|
|
83
|
+
accessible-role="button"
|
|
84
|
+
class="udex-masthead-country-selector__item udex-masthead-country-selector__item_region"
|
|
85
|
+
aria-haspopup="true"
|
|
86
|
+
type="Button"
|
|
87
|
+
part="menu-item"
|
|
88
|
+
has-border={true}
|
|
89
|
+
icon-end={true}
|
|
90
|
+
label={region.title}
|
|
91
|
+
{...{ "is-nav-item": "" }}>
|
|
92
|
+
</UDExMastheadMenuItem>
|
|
93
|
+
</li>
|
|
94
|
+
))}
|
|
95
|
+
</ul>
|
|
96
|
+
</>
|
|
97
|
+
);
|
|
98
|
+
}
|