@sapudex/web-components 2.56.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/README.md +258 -0
- 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/cypress/specs/TagGroup.cy.tsx +35 -0
- package/dist/Carousel.d.ts +9 -3
- package/dist/Carousel.js +35 -6
- package/dist/Carousel.js.map +1 -1
- package/dist/CarouselTemplate.js +3 -3
- package/dist/CarouselTemplate.js.map +1 -1
- 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 +6 -6
- package/dist/TabNavigation.js +56 -42
- 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/Tag.d.ts +1 -0
- package/dist/Tag.js +6 -0
- package/dist/Tag.js.map +1 -1
- package/dist/TagGroup.js +4 -2
- package/dist/TagGroup.js.map +1 -1
- package/dist/assets/{InputSuggestions-ChhTxYh4.js → InputSuggestions-CMYjJsHw.js} +1 -1
- package/dist/assets/{ListItemStandardExpandableTextTemplate-Bh1HxZfH.js → ListItemStandardExpandableTextTemplate-D2i8wWuR.js} +1 -1
- package/dist/assets/{bundle.esm-DCX_ohoZ.js → bundle.esm-BjN47C_y.js} +242 -242
- package/dist/assets/messagebundle_ar-BvIvqOKJ.js +1 -0
- package/dist/assets/messagebundle_bg-CbE9TJP3.js +1 -0
- package/dist/assets/messagebundle_cs-D7sDCnrw.js +1 -0
- package/dist/assets/messagebundle_da-BKcG2gb3.js +1 -0
- package/dist/assets/messagebundle_de-CqojOAqG.js +1 -0
- package/dist/assets/messagebundle_el-DLfp0_Vm.js +1 -0
- package/dist/assets/messagebundle_en-B7YJOdQz.js +1 -0
- package/dist/assets/messagebundle_es-dcaagZn0.js +1 -0
- package/dist/assets/messagebundle_et-XYXhCdvm.js +1 -0
- package/dist/assets/messagebundle_fi-Dffg0zEq.js +1 -0
- package/dist/assets/messagebundle_fr-CW8ENL86.js +1 -0
- package/dist/assets/messagebundle_hr-onMgZwRd.js +1 -0
- package/dist/assets/messagebundle_hu-BPDuHAe0.js +1 -0
- package/dist/assets/messagebundle_it-BcfXVW1A.js +1 -0
- package/dist/assets/messagebundle_ja-EWp-Nkd9.js +1 -0
- package/dist/assets/messagebundle_ko-BKQ27UJW.js +1 -0
- package/dist/assets/messagebundle_lt-A-f2EeMY.js +1 -0
- package/dist/assets/messagebundle_lv-CHVU_rnx.js +1 -0
- package/dist/assets/messagebundle_nl-gmf1np1i.js +1 -0
- package/dist/assets/messagebundle_no-CazfcIRA.js +1 -0
- package/dist/assets/messagebundle_pl-iv_zMkL4.js +1 -0
- package/dist/assets/messagebundle_pt-usY49ESJ.js +1 -0
- package/dist/assets/messagebundle_pt_PT-DTLEUiTC.js +1 -0
- package/dist/assets/messagebundle_ro-BHeGIHaV.js +1 -0
- package/dist/assets/messagebundle_ru-DJB1z_R0.js +1 -0
- package/dist/assets/messagebundle_sk-DlNIpzr3.js +1 -0
- package/dist/assets/messagebundle_sl-Day075Cf.js +1 -0
- package/dist/assets/messagebundle_sr-iI_TwIHf.js +1 -0
- package/dist/assets/messagebundle_sv-BPj73b5X.js +1 -0
- package/dist/assets/messagebundle_tr-DpdBqQtI.js +1 -0
- package/dist/assets/messagebundle_uk-CT4EqEBF.js +1 -0
- package/dist/assets/messagebundle_zh_CN-B_42cWcu.js +1 -0
- package/dist/assets/messagebundle_zh_TW-D25iNCcy.js +1 -0
- package/dist/css/themes/Button.css +1 -1
- package/dist/css/themes/Carousel.css +1 -1
- package/dist/css/themes/ListGroupHeader.css +1 -1
- package/dist/css/themes/PromoTile.css +1 -1
- package/dist/css/themes/Switch.css +1 -1
- package/dist/css/themes/TabInOverflow.css +1 -1
- package/dist/css/themes/TabNavigation.css +1 -1
- package/dist/css/themes/Tooltip.css +1 -1
- package/dist/custom-elements-internal.json +12 -12
- package/dist/custom-elements.json +12 -12
- package/dist/generated/assets/i18n/messagebundle_ar.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_bg.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cs.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_da.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_de.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_el.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_es.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_et.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hu.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_it.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ja.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ko.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_nl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_no.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt_PT.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ro.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ru.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_tr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_uk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_CN.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_TW.json +1 -1
- package/dist/generated/i18n/i18n-defaults.d.ts +3 -9
- package/dist/generated/i18n/i18n-defaults.js +3 -9
- 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/Carousel.css.d.ts +1 -1
- package/dist/generated/themes/Carousel.css.js +1 -1
- package/dist/generated/themes/Carousel.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/Switch.css.d.ts +1 -1
- package/dist/generated/themes/Switch.css.js +1 -1
- package/dist/generated/themes/Switch.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/generated/themes/TabNavigation.css.d.ts +1 -1
- package/dist/generated/themes/TabNavigation.css.js +1 -1
- package/dist/generated/themes/TabNavigation.css.js.map +1 -1
- package/dist/generated/themes/Tooltip.css.d.ts +1 -1
- package/dist/generated/themes/Tooltip.css.js +1 -1
- package/dist/generated/themes/Tooltip.css.js.map +1 -1
- package/dist/messagebundle.properties +4 -10
- package/dist/messagebundle_ar.properties +0 -6
- package/dist/messagebundle_bg.properties +0 -8
- package/dist/messagebundle_cs.properties +0 -8
- package/dist/messagebundle_da.properties +0 -8
- package/dist/messagebundle_de.properties +0 -8
- package/dist/messagebundle_el.properties +0 -8
- package/dist/messagebundle_en.properties +2 -8
- package/dist/messagebundle_es.properties +0 -8
- package/dist/messagebundle_et.properties +0 -8
- package/dist/messagebundle_fi.properties +0 -8
- package/dist/messagebundle_fr.properties +0 -8
- package/dist/messagebundle_hr.properties +0 -8
- package/dist/messagebundle_hu.properties +0 -8
- package/dist/messagebundle_it.properties +0 -8
- package/dist/messagebundle_ja.properties +0 -8
- package/dist/messagebundle_ko.properties +0 -8
- package/dist/messagebundle_lt.properties +0 -8
- package/dist/messagebundle_lv.properties +0 -8
- package/dist/messagebundle_nl.properties +0 -8
- package/dist/messagebundle_no.properties +0 -8
- package/dist/messagebundle_pl.properties +0 -8
- package/dist/messagebundle_pt.properties +0 -8
- package/dist/messagebundle_pt_PT.properties +0 -8
- package/dist/messagebundle_ro.properties +0 -8
- package/dist/messagebundle_ru.properties +0 -8
- package/dist/messagebundle_sk.properties +0 -8
- package/dist/messagebundle_sl.properties +0 -7
- package/dist/messagebundle_sr.properties +0 -8
- package/dist/messagebundle_sv.properties +0 -8
- package/dist/messagebundle_tr.properties +0 -8
- package/dist/messagebundle_uk.properties +0 -8
- package/dist/messagebundle_zh_CN.properties +0 -8
- package/dist/messagebundle_zh_TW.properties +0 -8
- package/dist/vscode.html-custom-data.json +10 -2
- package/dist/web-types.json +6 -6
- package/package.json +1 -1
- package/src/Carousel.ts +51 -8
- package/src/CarouselTemplate.tsx +7 -7
- 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 +64 -46
- package/src/TabNavigationPopoverTemplate.tsx +27 -0
- package/src/TabNavigationTemplate.tsx +98 -0
- package/src/TabTemplate.tsx +7 -0
- package/src/Tag.ts +7 -0
- package/src/TagGroup.ts +4 -2
- package/src/generated/i18n/i18n-defaults.ts +2 -2
- package/src/generated/themes/Button.css.ts +1 -1
- package/src/generated/themes/Carousel.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/Switch.css.ts +1 -1
- package/src/generated/themes/TabInOverflow.css.ts +1 -1
- package/src/generated/themes/TabNavigation.css.ts +1 -1
- package/src/generated/themes/Tooltip.css.ts +1 -1
- package/src/i18n/messagebundle.properties +4 -10
- package/src/i18n/messagebundle_ar.properties +0 -6
- package/src/i18n/messagebundle_bg.properties +0 -8
- package/src/i18n/messagebundle_cs.properties +0 -8
- package/src/i18n/messagebundle_da.properties +0 -8
- package/src/i18n/messagebundle_de.properties +0 -8
- package/src/i18n/messagebundle_el.properties +0 -8
- package/src/i18n/messagebundle_en.properties +2 -8
- package/src/i18n/messagebundle_es.properties +0 -8
- package/src/i18n/messagebundle_et.properties +0 -8
- package/src/i18n/messagebundle_fi.properties +0 -8
- package/src/i18n/messagebundle_fr.properties +0 -8
- package/src/i18n/messagebundle_hr.properties +0 -8
- package/src/i18n/messagebundle_hu.properties +0 -8
- package/src/i18n/messagebundle_it.properties +0 -8
- package/src/i18n/messagebundle_ja.properties +0 -8
- package/src/i18n/messagebundle_ko.properties +0 -8
- package/src/i18n/messagebundle_lt.properties +0 -8
- package/src/i18n/messagebundle_lv.properties +0 -8
- package/src/i18n/messagebundle_nl.properties +0 -8
- package/src/i18n/messagebundle_no.properties +0 -8
- package/src/i18n/messagebundle_pl.properties +0 -8
- package/src/i18n/messagebundle_pt.properties +0 -8
- package/src/i18n/messagebundle_pt_PT.properties +0 -8
- package/src/i18n/messagebundle_ro.properties +0 -8
- package/src/i18n/messagebundle_ru.properties +0 -8
- package/src/i18n/messagebundle_sk.properties +0 -8
- package/src/i18n/messagebundle_sl.properties +0 -7
- package/src/i18n/messagebundle_sr.properties +0 -8
- package/src/i18n/messagebundle_sv.properties +0 -8
- package/src/i18n/messagebundle_tr.properties +0 -8
- package/src/i18n/messagebundle_uk.properties +0 -8
- package/src/i18n/messagebundle_zh_CN.properties +0 -8
- package/src/i18n/messagebundle_zh_TW.properties +0 -8
- package/src/themes/Button.css +2 -1
- package/src/themes/Carousel.css +17 -10
- package/src/themes/ListGroupHeader.css +50 -7
- package/src/themes/PromoTile.css +1 -0
- package/src/themes/Switch.css +2 -2
- package/src/themes/TabInOverflow.css +9 -4
- package/src/themes/TabNavigation.css +1 -0
- package/src/themes/Tooltip.css +5 -4
- package/dist/assets/messagebundle_ar-BUZ_gTvQ.js +0 -1
- package/dist/assets/messagebundle_bg-4ainC3nj.js +0 -1
- package/dist/assets/messagebundle_cs-CFtmLavu.js +0 -1
- package/dist/assets/messagebundle_da-BHL-qTPd.js +0 -1
- package/dist/assets/messagebundle_de-SMiMT-ST.js +0 -1
- package/dist/assets/messagebundle_el-ChAszJ4A.js +0 -1
- package/dist/assets/messagebundle_en-B0P3kkb6.js +0 -1
- package/dist/assets/messagebundle_es-LGmRBKqB.js +0 -1
- package/dist/assets/messagebundle_et-yYsmBPXN.js +0 -1
- package/dist/assets/messagebundle_fi-DeMNrHC9.js +0 -1
- package/dist/assets/messagebundle_fr-qEm5Eykz.js +0 -1
- package/dist/assets/messagebundle_hr-NBdiYo-T.js +0 -1
- package/dist/assets/messagebundle_hu-CBV3ISbF.js +0 -1
- package/dist/assets/messagebundle_it-BML2SC0W.js +0 -1
- package/dist/assets/messagebundle_ja-zyFfZHcj.js +0 -1
- package/dist/assets/messagebundle_ko-BCPaSqNp.js +0 -1
- package/dist/assets/messagebundle_lt-DB4b6FVx.js +0 -1
- package/dist/assets/messagebundle_lv-tAOia5tU.js +0 -1
- package/dist/assets/messagebundle_nl-BKUpVV-D.js +0 -1
- package/dist/assets/messagebundle_no-BZQfeWxT.js +0 -1
- package/dist/assets/messagebundle_pl-CsXeN1y6.js +0 -1
- package/dist/assets/messagebundle_pt-D9rap3lj.js +0 -1
- package/dist/assets/messagebundle_pt_PT-CQ5YAsmx.js +0 -1
- package/dist/assets/messagebundle_ro-BTNJ9YdP.js +0 -1
- package/dist/assets/messagebundle_ru-BTDmH8CB.js +0 -1
- package/dist/assets/messagebundle_sk-Lb4jvtpc.js +0 -1
- package/dist/assets/messagebundle_sl-BZi2bKSy.js +0 -1
- package/dist/assets/messagebundle_sr-B9TYgxO1.js +0 -1
- package/dist/assets/messagebundle_sv-DWlY9RTQ.js +0 -1
- package/dist/assets/messagebundle_tr-DOeCmUdx.js +0 -1
- package/dist/assets/messagebundle_uk-CCv57GhV.js +0 -1
- package/dist/assets/messagebundle_zh_CN-CHwH3F3-.js +0 -1
- package/dist/assets/messagebundle_zh_TW-FO0BCkub.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 -86
- 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
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import UDExTabNavigation, { UDExTabNavigationOrientation, UDExTabNavigationPlacement, UDExTabNavigationVerticalAlignment } from "../../src/TabNavigation.js";
|
|
2
2
|
import UDExTab from "../../src/Tab.js";
|
|
3
|
+
import UDExLink from "../../src/Link.js";
|
|
3
4
|
|
|
4
5
|
// ─── Process Tab fixtures ─────────────────────────────────────────────────────
|
|
5
6
|
|
|
@@ -223,12 +224,12 @@ describe("Tab Navigation component", () => {
|
|
|
223
224
|
.shadow()
|
|
224
225
|
.find(".udex-tab-navigation__root")
|
|
225
226
|
.should("be.visible");
|
|
226
|
-
|
|
227
|
+
|
|
227
228
|
// All tabs should be visible without overflow
|
|
228
229
|
cy.get("[udex-tab-navigation]")
|
|
229
230
|
.find("udex-tab")
|
|
230
231
|
.should("have.length", 5);
|
|
231
|
-
|
|
232
|
+
|
|
232
233
|
cy.get("[udex-tab-navigation]")
|
|
233
234
|
.shadow()
|
|
234
235
|
.find("button[role='tab']")
|
|
@@ -250,7 +251,7 @@ describe("Tab Navigation component", () => {
|
|
|
250
251
|
.shadow()
|
|
251
252
|
.find("button[role='tab'][aria-selected='true']")
|
|
252
253
|
.should("contain.text", "General Settings");
|
|
253
|
-
|
|
254
|
+
|
|
254
255
|
cy.get("[udex-tab-navigation]")
|
|
255
256
|
.find("udex-tab[selected]")
|
|
256
257
|
.find("h3")
|
|
@@ -270,7 +271,7 @@ describe("Tab Navigation component", () => {
|
|
|
270
271
|
.shadow()
|
|
271
272
|
.find("button[role='tab'][aria-selected='true']")
|
|
272
273
|
.should("contain.text", "Notifications");
|
|
273
|
-
|
|
274
|
+
|
|
274
275
|
cy.get("[udex-tab-navigation]")
|
|
275
276
|
.find("udex-tab[selected]")
|
|
276
277
|
.find("h3")
|
|
@@ -279,7 +280,7 @@ describe("Tab Navigation component", () => {
|
|
|
279
280
|
|
|
280
281
|
it("emits tab-select event on tab change", () => {
|
|
281
282
|
const tabSelectHandler = cy.stub().as("tabSelect");
|
|
282
|
-
|
|
283
|
+
|
|
283
284
|
cy.mount(
|
|
284
285
|
<UDExTabNavigation orientation="Vertical" onTabSelect={tabSelectHandler}>
|
|
285
286
|
<UDExTab text="Tab 1" selected>
|
|
@@ -468,11 +469,11 @@ describe("Tab Navigation component", () => {
|
|
|
468
469
|
.shadow()
|
|
469
470
|
.find(".udex-tab-navigation__root")
|
|
470
471
|
.should("be.visible");
|
|
471
|
-
|
|
472
|
+
|
|
472
473
|
cy.get("[udex-tab-navigation]")
|
|
473
474
|
.find("udex-tab")
|
|
474
475
|
.should("have.length", 3);
|
|
475
|
-
|
|
476
|
+
|
|
476
477
|
cy.get("[udex-tab-navigation]")
|
|
477
478
|
.shadow()
|
|
478
479
|
.find("button[role='tab']")
|
|
@@ -484,7 +485,7 @@ describe("Tab Navigation component", () => {
|
|
|
484
485
|
.shadow()
|
|
485
486
|
.find("button[role='tab'][aria-selected='true']")
|
|
486
487
|
.should("contain.text", "Tab 1");
|
|
487
|
-
|
|
488
|
+
|
|
488
489
|
cy.get("[udex-tab-navigation]")
|
|
489
490
|
.find("udex-tab[selected]")
|
|
490
491
|
.find("p")
|
|
@@ -504,7 +505,7 @@ describe("Tab Navigation component", () => {
|
|
|
504
505
|
.shadow()
|
|
505
506
|
.find("button[role='tab'][aria-selected='true']")
|
|
506
507
|
.should("contain.text", "Tab 3");
|
|
507
|
-
|
|
508
|
+
|
|
508
509
|
cy.get("[udex-tab-navigation]")
|
|
509
510
|
.find("udex-tab[selected]")
|
|
510
511
|
.find("p")
|
|
@@ -826,15 +827,15 @@ describe("Tab Navigation component", () => {
|
|
|
826
827
|
it("displays body text content correctly for each vertical tab", () => {
|
|
827
828
|
cy.mount(
|
|
828
829
|
<UDExTabNavigation orientation="Vertical">
|
|
829
|
-
<UDExTab
|
|
830
|
-
text="Settings"
|
|
831
|
-
bodyText="Configure your preferences"
|
|
830
|
+
<UDExTab
|
|
831
|
+
text="Settings"
|
|
832
|
+
bodyText="Configure your preferences"
|
|
832
833
|
selected
|
|
833
834
|
>
|
|
834
835
|
<div>Settings content</div>
|
|
835
836
|
</UDExTab>
|
|
836
|
-
<UDExTab
|
|
837
|
-
text="Account"
|
|
837
|
+
<UDExTab
|
|
838
|
+
text="Account"
|
|
838
839
|
bodyText="Manage your account"
|
|
839
840
|
>
|
|
840
841
|
<div>Account content</div>
|
|
@@ -1046,7 +1047,7 @@ describe("Tab Navigation component", () => {
|
|
|
1046
1047
|
cy.mount(
|
|
1047
1048
|
<UDExTabNavigation orientation={UDExTabNavigationOrientation.Vertical}>
|
|
1048
1049
|
<UDExTab text="Account" body-text="Privacy settings" selected>
|
|
1049
|
-
<
|
|
1050
|
+
<UDExLink slot="link" href="https://sap.com/" design="Default">Privacy Policy</UDExLink>
|
|
1050
1051
|
<div>Account content</div>
|
|
1051
1052
|
</UDExTab>
|
|
1052
1053
|
<UDExTab text="Settings">
|
|
@@ -1065,8 +1066,8 @@ describe("Tab Navigation component", () => {
|
|
|
1065
1066
|
cy.mount(
|
|
1066
1067
|
<UDExTabNavigation orientation={UDExTabNavigationOrientation.Vertical}>
|
|
1067
1068
|
<UDExTab text="Account" selected>
|
|
1068
|
-
<
|
|
1069
|
-
<
|
|
1069
|
+
<UDExLink slot="link" href="https://sap.com/privacy" design="Default">Privacy Policy</UDExLink>
|
|
1070
|
+
<UDExLink slot="link" href="https://sap.com/terms" design="Default">Terms of Service</UDExLink>
|
|
1070
1071
|
<div>Account content</div>
|
|
1071
1072
|
</UDExTab>
|
|
1072
1073
|
<UDExTab text="Settings">
|
|
@@ -1085,11 +1086,11 @@ describe("Tab Navigation component", () => {
|
|
|
1085
1086
|
cy.mount(
|
|
1086
1087
|
<UDExTabNavigation orientation={UDExTabNavigationOrientation.Vertical}>
|
|
1087
1088
|
<UDExTab text="Account" selected>
|
|
1088
|
-
<
|
|
1089
|
+
<UDExLink slot="link" href="https://sap.com/" design="Default">Privacy Policy</UDExLink>
|
|
1089
1090
|
<div>Account content</div>
|
|
1090
1091
|
</UDExTab>
|
|
1091
1092
|
<UDExTab text="Settings">
|
|
1092
|
-
<
|
|
1093
|
+
<UDExLink slot="link" href="https://sap.com/" design="Default">Terms of Service</UDExLink>
|
|
1093
1094
|
<div>Settings content</div>
|
|
1094
1095
|
</UDExTab>
|
|
1095
1096
|
</UDExTabNavigation>
|
|
@@ -1117,7 +1118,7 @@ describe("Tab Navigation component", () => {
|
|
|
1117
1118
|
<div>Account content</div>
|
|
1118
1119
|
</UDExTab>
|
|
1119
1120
|
<UDExTab text="Settings">
|
|
1120
|
-
<
|
|
1121
|
+
<UDExLink slot="link" href="https://sap.com/" design="Default">Privacy Policy</UDExLink>
|
|
1121
1122
|
<div>Settings content</div>
|
|
1122
1123
|
</UDExTab>
|
|
1123
1124
|
</UDExTabNavigation>
|
|
@@ -1139,7 +1140,7 @@ describe("Tab Navigation component", () => {
|
|
|
1139
1140
|
cy.mount(
|
|
1140
1141
|
<UDExTabNavigation orientation={UDExTabNavigationOrientation.Horizontal}>
|
|
1141
1142
|
<UDExTab text="Account" selected>
|
|
1142
|
-
<
|
|
1143
|
+
<UDExLink slot="link" href="https://sap.com/" design="Default">Privacy Policy</UDExLink>
|
|
1143
1144
|
<div>Account content</div>
|
|
1144
1145
|
</UDExTab>
|
|
1145
1146
|
<UDExTab text="Settings">
|
|
@@ -1983,6 +1984,198 @@ describe("Tab Navigation component", () => {
|
|
|
1983
1984
|
});
|
|
1984
1985
|
});
|
|
1985
1986
|
|
|
1987
|
+
// DOM-measurement-based overflow does not work in Cypress component tests
|
|
1988
|
+
// (see the skipped overflow suites above), so we move tabs into the overflow
|
|
1989
|
+
// popover programmatically. The popover only renders once _overflowItems has
|
|
1990
|
+
// length, so we populate it first, wait for the popover to mount, then open it.
|
|
1991
|
+
const openOverflowPopover = (overflowStartIndex: number) => {
|
|
1992
|
+
// 1. Set _overflowItems and stub updateOverflowItems so onBeforeRendering
|
|
1993
|
+
// cannot reset it back to [] (which it would, because no tabs are hidden
|
|
1994
|
+
// in the Cypress layout environment).
|
|
1995
|
+
cy.get("[udex-tab-navigation]").then($el => {
|
|
1996
|
+
const nav = $el[0] as any;
|
|
1997
|
+
// Stub first so onBeforeRendering cannot reset _overflowItems.
|
|
1998
|
+
nav.updateOverflowItems = () => {};
|
|
1999
|
+
// Setting the property triggers the internal re-render via the UI5 setter.
|
|
2000
|
+
nav._overflowItems = Array.from(nav.items).slice(overflowStartIndex);
|
|
2001
|
+
});
|
|
2002
|
+
|
|
2003
|
+
// 2. Once the popover is in the DOM, open it using the More button as opener.
|
|
2004
|
+
cy.get("[udex-tab-navigation]").shadow().find("[ui5-popover]").should("exist");
|
|
2005
|
+
cy.get("[udex-tab-navigation]").then($el => {
|
|
2006
|
+
const nav = $el[0] as any;
|
|
2007
|
+
nav._popover = nav.getResponsePopover();
|
|
2008
|
+
nav._popover.opener = nav.getMoreButton();
|
|
2009
|
+
nav._popover.open = true;
|
|
2010
|
+
nav._isExpanded = true;
|
|
2011
|
+
// updateOverflowItems is stubbed, so it never removes the hidden attribute.
|
|
2012
|
+
// Unhide the More button so it can receive focus (e.g. on Escape).
|
|
2013
|
+
nav.getMoreButton()?.removeAttribute("hidden");
|
|
2014
|
+
});
|
|
2015
|
+
|
|
2016
|
+
// 3. Wait for the overflow tab buttons to be in the DOM.
|
|
2017
|
+
cy.get("[udex-tab-navigation]")
|
|
2018
|
+
.shadow()
|
|
2019
|
+
.find(".udex-tab-overflow__button")
|
|
2020
|
+
.should("exist");
|
|
2021
|
+
};
|
|
2022
|
+
|
|
2023
|
+
describe("Overflow dropdown — disabled tab navigation", () => {
|
|
2024
|
+
|
|
2025
|
+
it("disabled item has aria-disabled and is not interactive", () => {
|
|
2026
|
+
const tabSelectStub = cy.stub().as("tabSelect");
|
|
2027
|
+
|
|
2028
|
+
cy.mount(
|
|
2029
|
+
<UDExTabNavigation>
|
|
2030
|
+
<UDExTab text="Tab 1" selected><div>Content 1</div></UDExTab>
|
|
2031
|
+
<UDExTab text="Tab 2" disabled><div>Content 2</div></UDExTab>
|
|
2032
|
+
<UDExTab text="Tab 3"><div>Content 3</div></UDExTab>
|
|
2033
|
+
</UDExTabNavigation>
|
|
2034
|
+
);
|
|
2035
|
+
|
|
2036
|
+
cy.get("[udex-tab-navigation]").then($el => {
|
|
2037
|
+
$el[0].addEventListener("tab-select", tabSelectStub);
|
|
2038
|
+
});
|
|
2039
|
+
|
|
2040
|
+
openOverflowPopover(1); // overflow: Tab 2 (disabled), Tab 3
|
|
2041
|
+
|
|
2042
|
+
// The disabled overflow item reflects aria-disabled="true".
|
|
2043
|
+
cy.get("[udex-tab-navigation]")
|
|
2044
|
+
.shadow()
|
|
2045
|
+
.find(".udex-tab-overflow__button[aria-disabled='true']")
|
|
2046
|
+
.should("contain.text", "Tab 2");
|
|
2047
|
+
|
|
2048
|
+
// Clicking the disabled item must not select it nor fire tab-select.
|
|
2049
|
+
cy.get("[udex-tab-navigation]")
|
|
2050
|
+
.shadow()
|
|
2051
|
+
.find(".udex-tab-overflow__button[aria-disabled='true']")
|
|
2052
|
+
.click({ force: true });
|
|
2053
|
+
|
|
2054
|
+
cy.get("@tabSelect").should("not.have.been.called");
|
|
2055
|
+
|
|
2056
|
+
// Tab 1 remains the selected (active) header tab.
|
|
2057
|
+
cy.get("[udex-tab-navigation]")
|
|
2058
|
+
.shadow()
|
|
2059
|
+
.find(".udex-tab-navigation__button-tab--active")
|
|
2060
|
+
.should("contain.text", "Tab 1");
|
|
2061
|
+
});
|
|
2062
|
+
|
|
2063
|
+
it("arrow navigation skips disabled items", () => {
|
|
2064
|
+
cy.mount(
|
|
2065
|
+
<UDExTabNavigation>
|
|
2066
|
+
<UDExTab text="Tab 1" selected><div>Content 1</div></UDExTab>
|
|
2067
|
+
<UDExTab text="Tab 2" disabled><div>Content 2</div></UDExTab>
|
|
2068
|
+
<UDExTab text="Tab 3"><div>Content 3</div></UDExTab>
|
|
2069
|
+
<UDExTab text="Tab 4" disabled><div>Content 4</div></UDExTab>
|
|
2070
|
+
<UDExTab text="Tab 5"><div>Content 5</div></UDExTab>
|
|
2071
|
+
</UDExTabNavigation>
|
|
2072
|
+
);
|
|
2073
|
+
|
|
2074
|
+
openOverflowPopover(1); // overflow: Tab 2 (disabled), Tab 3, Tab 4 (disabled), Tab 5
|
|
2075
|
+
|
|
2076
|
+
// ArrowDown from Tab 3 (index 1) skips disabled Tab 4 and lands on Tab 5.
|
|
2077
|
+
// onNextItemInPopover sets tabindex="0" on the destination item.
|
|
2078
|
+
cy.get("[udex-tab-navigation]").then($el => {
|
|
2079
|
+
const nav = $el[0] as any;
|
|
2080
|
+
const items: HTMLElement[] = nav.getItemsFromPopover();
|
|
2081
|
+
items.forEach((item, i) => item.setAttribute("tabindex", i === 1 ? "0" : "-1"));
|
|
2082
|
+
nav.onNextItemInPopover(items[1]);
|
|
2083
|
+
});
|
|
2084
|
+
cy.get("[udex-tab-navigation]").shadow()
|
|
2085
|
+
.find(".udex-tab-overflow__button").contains("Tab 5")
|
|
2086
|
+
.should("have.attr", "tabindex", "0");
|
|
2087
|
+
|
|
2088
|
+
// ArrowUp from Tab 3 (index 1) skips disabled Tab 2 and wraps back to Tab 5.
|
|
2089
|
+
cy.get("[udex-tab-navigation]").then($el => {
|
|
2090
|
+
const nav = $el[0] as any;
|
|
2091
|
+
const items: HTMLElement[] = nav.getItemsFromPopover();
|
|
2092
|
+
items.forEach((item, i) => item.setAttribute("tabindex", i === 1 ? "0" : "-1"));
|
|
2093
|
+
nav.onPreviousItemInPopover(items[1]);
|
|
2094
|
+
});
|
|
2095
|
+
cy.get("[udex-tab-navigation]").shadow()
|
|
2096
|
+
.find(".udex-tab-overflow__button").contains("Tab 5")
|
|
2097
|
+
.should("have.attr", "tabindex", "0");
|
|
2098
|
+
});
|
|
2099
|
+
|
|
2100
|
+
it("focus moves to first non-disabled item on open when first item is disabled", () => {
|
|
2101
|
+
cy.mount(
|
|
2102
|
+
<UDExTabNavigation>
|
|
2103
|
+
<UDExTab text="Tab 1" selected><div>Content 1</div></UDExTab>
|
|
2104
|
+
<UDExTab text="Tab 2" disabled><div>Content 2</div></UDExTab>
|
|
2105
|
+
<UDExTab text="Tab 3"><div>Content 3</div></UDExTab>
|
|
2106
|
+
<UDExTab text="Tab 4"><div>Content 4</div></UDExTab>
|
|
2107
|
+
</UDExTabNavigation>
|
|
2108
|
+
);
|
|
2109
|
+
|
|
2110
|
+
openOverflowPopover(1); // overflow: Tab 2 (disabled), Tab 3, Tab 4
|
|
2111
|
+
|
|
2112
|
+
// onFocusFirstItemPopover sets tabindex="0" on the first non-disabled item.
|
|
2113
|
+
cy.get("[udex-tab-navigation]").then($el => {
|
|
2114
|
+
($el[0] as any).onFocusFirstItemPopover();
|
|
2115
|
+
});
|
|
2116
|
+
cy.get("[udex-tab-navigation]").shadow()
|
|
2117
|
+
.find(".udex-tab-overflow__button").contains("Tab 3")
|
|
2118
|
+
.should("have.attr", "tabindex", "0");
|
|
2119
|
+
});
|
|
2120
|
+
|
|
2121
|
+
it("Home key moves focus to first non-disabled item", () => {
|
|
2122
|
+
cy.mount(
|
|
2123
|
+
<UDExTabNavigation>
|
|
2124
|
+
<UDExTab text="Tab 1" selected><div>Content 1</div></UDExTab>
|
|
2125
|
+
<UDExTab text="Tab 2" disabled><div>Content 2</div></UDExTab>
|
|
2126
|
+
<UDExTab text="Tab 3"><div>Content 3</div></UDExTab>
|
|
2127
|
+
<UDExTab text="Tab 4"><div>Content 4</div></UDExTab>
|
|
2128
|
+
</UDExTabNavigation>
|
|
2129
|
+
);
|
|
2130
|
+
|
|
2131
|
+
openOverflowPopover(1); // overflow: Tab 2 (disabled), Tab 3, Tab 4
|
|
2132
|
+
|
|
2133
|
+
// Spy on .focus() calls to assert which item handleHome targets.
|
|
2134
|
+
cy.get("[udex-tab-navigation]").then($el => {
|
|
2135
|
+
const nav = $el[0] as any;
|
|
2136
|
+
const items: HTMLElement[] = nav.getItemsFromPopover();
|
|
2137
|
+
let focusedItem: HTMLElement | undefined;
|
|
2138
|
+
items.forEach(item => {
|
|
2139
|
+
const orig = item.focus.bind(item);
|
|
2140
|
+
item.focus = () => { focusedItem = item; orig(); };
|
|
2141
|
+
});
|
|
2142
|
+
const e = new KeyboardEvent("keydown", { key: "Home", keyCode: 36, bubbles: true, cancelable: true });
|
|
2143
|
+
nav.handleHome(e);
|
|
2144
|
+
// Tab 3 (index 1) is the first non-disabled item; Tab 2 (index 0) must be skipped.
|
|
2145
|
+
expect(focusedItem).to.equal(items[1]);
|
|
2146
|
+
});
|
|
2147
|
+
});
|
|
2148
|
+
|
|
2149
|
+
it("End key moves focus to last non-disabled item", () => {
|
|
2150
|
+
cy.mount(
|
|
2151
|
+
<UDExTabNavigation>
|
|
2152
|
+
<UDExTab text="Tab 1" selected><div>Content 1</div></UDExTab>
|
|
2153
|
+
<UDExTab text="Tab 2"><div>Content 2</div></UDExTab>
|
|
2154
|
+
<UDExTab text="Tab 3"><div>Content 3</div></UDExTab>
|
|
2155
|
+
<UDExTab text="Tab 4"><div>Content 4</div></UDExTab>
|
|
2156
|
+
<UDExTab text="Tab 5" disabled><div>Content 5</div></UDExTab>
|
|
2157
|
+
</UDExTabNavigation>
|
|
2158
|
+
);
|
|
2159
|
+
|
|
2160
|
+
openOverflowPopover(2); // overflow: Tab 3, Tab 4, Tab 5 (disabled)
|
|
2161
|
+
|
|
2162
|
+
// Spy on .focus() calls to assert which item handleEnd targets.
|
|
2163
|
+
cy.get("[udex-tab-navigation]").then($el => {
|
|
2164
|
+
const nav = $el[0] as any;
|
|
2165
|
+
const items: HTMLElement[] = nav.getItemsFromPopover();
|
|
2166
|
+
let focusedItem: HTMLElement | undefined;
|
|
2167
|
+
items.forEach(item => {
|
|
2168
|
+
const orig = item.focus.bind(item);
|
|
2169
|
+
item.focus = () => { focusedItem = item; orig(); };
|
|
2170
|
+
});
|
|
2171
|
+
const e = new KeyboardEvent("keydown", { key: "End", keyCode: 35, bubbles: true, cancelable: true });
|
|
2172
|
+
nav.handleEnd(e);
|
|
2173
|
+
// Tab 4 (index 1) is the last non-disabled item; Tab 5 (index 2) must be skipped.
|
|
2174
|
+
expect(focusedItem).to.equal(items[1]);
|
|
2175
|
+
});
|
|
2176
|
+
});
|
|
2177
|
+
});
|
|
2178
|
+
|
|
1986
2179
|
// ── Process Tab variant ──────────────────────────────────────────────────────
|
|
1987
2180
|
|
|
1988
2181
|
describe("TabNavigation - Process Tab variant", () => {
|
|
@@ -2376,4 +2569,87 @@ describe("Tab Navigation component", () => {
|
|
|
2376
2569
|
});
|
|
2377
2570
|
});
|
|
2378
2571
|
});
|
|
2572
|
+
|
|
2573
|
+
describe("Overflow dropdown — focus management", () => {
|
|
2574
|
+
it("pressing Escape closes the popover and moves focus to the More button", () => {
|
|
2575
|
+
cy.mount(
|
|
2576
|
+
<UDExTabNavigation>
|
|
2577
|
+
<UDExTab text="Tab 1" selected><div>Content 1</div></UDExTab>
|
|
2578
|
+
<UDExTab text="Tab 2"><div>Content 2</div></UDExTab>
|
|
2579
|
+
<UDExTab text="Tab 3"><div>Content 3</div></UDExTab>
|
|
2580
|
+
</UDExTabNavigation>
|
|
2581
|
+
);
|
|
2582
|
+
|
|
2583
|
+
openOverflowPopover(1);
|
|
2584
|
+
|
|
2585
|
+
cy.get("[udex-tab-navigation]").then($el => {
|
|
2586
|
+
const nav = $el[0] as any;
|
|
2587
|
+
const e = new KeyboardEvent("keydown", { key: "Escape", keyCode: 27, bubbles: true, cancelable: true });
|
|
2588
|
+
nav.handleEscape(e);
|
|
2589
|
+
});
|
|
2590
|
+
|
|
2591
|
+
cy.get("[udex-tab-navigation]")
|
|
2592
|
+
.shadow()
|
|
2593
|
+
.find("[ui5-popover]")
|
|
2594
|
+
.should("not.have.attr", "open");
|
|
2595
|
+
|
|
2596
|
+
cy.get("[udex-tab-navigation]")
|
|
2597
|
+
.shadow()
|
|
2598
|
+
.find(".udex-tab-navigation__button-more")
|
|
2599
|
+
.shadow()
|
|
2600
|
+
.find("button")
|
|
2601
|
+
.should("be.focused");
|
|
2602
|
+
});
|
|
2603
|
+
|
|
2604
|
+
it("clicking an overflow item moves focus to the selected tab in the header", () => {
|
|
2605
|
+
cy.mount(
|
|
2606
|
+
<UDExTabNavigation>
|
|
2607
|
+
<UDExTab text="Tab 1" selected><div>Content 1</div></UDExTab>
|
|
2608
|
+
<UDExTab text="Tab 2"><div>Content 2</div></UDExTab>
|
|
2609
|
+
<UDExTab text="Tab 3"><div>Content 3</div></UDExTab>
|
|
2610
|
+
</UDExTabNavigation>
|
|
2611
|
+
);
|
|
2612
|
+
|
|
2613
|
+
openOverflowPopover(1);
|
|
2614
|
+
|
|
2615
|
+
cy.get("[udex-tab-navigation]")
|
|
2616
|
+
.shadow()
|
|
2617
|
+
.find(".udex-tab-overflow__button")
|
|
2618
|
+
.contains("Tab 2")
|
|
2619
|
+
.click({ force: true });
|
|
2620
|
+
|
|
2621
|
+
cy.get("[udex-tab-navigation]")
|
|
2622
|
+
.shadow()
|
|
2623
|
+
.find(".udex-tab-navigation__button-tab[aria-selected='true']")
|
|
2624
|
+
.should("contain.text", "Tab 2")
|
|
2625
|
+
.and("be.focused");
|
|
2626
|
+
});
|
|
2627
|
+
|
|
2628
|
+
it("pressing Enter on an overflow item moves focus to the selected tab in the header", () => {
|
|
2629
|
+
cy.mount(
|
|
2630
|
+
<UDExTabNavigation>
|
|
2631
|
+
<UDExTab text="Tab 1" selected><div>Content 1</div></UDExTab>
|
|
2632
|
+
<UDExTab text="Tab 2"><div>Content 2</div></UDExTab>
|
|
2633
|
+
<UDExTab text="Tab 3"><div>Content 3</div></UDExTab>
|
|
2634
|
+
</UDExTabNavigation>
|
|
2635
|
+
);
|
|
2636
|
+
|
|
2637
|
+
openOverflowPopover(1);
|
|
2638
|
+
|
|
2639
|
+
cy.get("[udex-tab-navigation]").then($el => {
|
|
2640
|
+
const nav = $el[0] as any;
|
|
2641
|
+
const items: HTMLElement[] = nav.getItemsFromPopover();
|
|
2642
|
+
const tab2Item = items.find((item) => item.textContent?.trim().startsWith("Tab 2"))!;
|
|
2643
|
+
const e = new KeyboardEvent("keydown", { key: "Enter", keyCode: 13, bubbles: true, cancelable: true });
|
|
2644
|
+
Object.defineProperty(e, "target", { value: tab2Item, configurable: true });
|
|
2645
|
+
nav.handleEnterOrSpace(e);
|
|
2646
|
+
});
|
|
2647
|
+
|
|
2648
|
+
cy.get("[udex-tab-navigation]")
|
|
2649
|
+
.shadow()
|
|
2650
|
+
.find(".udex-tab-navigation__button-tab[aria-selected='true']")
|
|
2651
|
+
.should("contain.text", "Tab 2")
|
|
2652
|
+
.and("be.focused");
|
|
2653
|
+
});
|
|
2654
|
+
});
|
|
2379
2655
|
});
|
|
@@ -210,4 +210,39 @@ describe("TagGroup", () => {
|
|
|
210
210
|
});
|
|
211
211
|
});
|
|
212
212
|
|
|
213
|
+
describe("Keyboard navigation with nonSelectable tags", () => {
|
|
214
|
+
const nonSelectableTagGroup = <UDExTagGroup>
|
|
215
|
+
{Array.from({ length: 16 }, (_, i) => (
|
|
216
|
+
<UDExTag nonSelectable text={`Tag ${i + 1}`} icon="employee"></UDExTag>
|
|
217
|
+
))}
|
|
218
|
+
</UDExTagGroup>;
|
|
219
|
+
|
|
220
|
+
it("Shift+Tab from overflow button focuses last visible nonSelectable tag's button", () => {
|
|
221
|
+
cy.mount(<div><button id="before">before</button>{nonSelectableTagGroup}</div>);
|
|
222
|
+
|
|
223
|
+
cy.get("[udex-tag-group]").shadow().find(".udex-tag-group__tokenizer").as("tokenizer");
|
|
224
|
+
cy.get("[udex-tag-group]").should("have.attr", "_is-hidden-tags");
|
|
225
|
+
cy.get("@tokenizer").shadow().find(".ui5-tokenizer-more-text").should("be.visible");
|
|
226
|
+
|
|
227
|
+
cy.get("@tokenizer").then($tokenizer => {
|
|
228
|
+
const nMoreCount = ($tokenizer[0] as any)._nMoreCount as number;
|
|
229
|
+
const totalCount = ($tokenizer[0] as any)._tokens.length as number;
|
|
230
|
+
const visibleCount = totalCount - nMoreCount;
|
|
231
|
+
cy.get("#before").focus();
|
|
232
|
+
// Tab through each visible tag's button + 1 more to land on the "n more" button
|
|
233
|
+
Cypress._.times(visibleCount + 1, () => cy.realPress("Tab"));
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
cy.get("@tokenizer").shadow().find(".ui5-tokenizer-more-text").should("be.focused");
|
|
237
|
+
|
|
238
|
+
cy.realPress(["Shift", "Tab"]);
|
|
239
|
+
|
|
240
|
+
cy.get("@tokenizer").then($tokenizer => {
|
|
241
|
+
const nMoreCount = ($tokenizer[0] as any)._nMoreCount as number;
|
|
242
|
+
const totalCount = ($tokenizer[0] as any)._tokens.length as number;
|
|
243
|
+
const lastVisibleToken = ($tokenizer[0] as any)._tokens[totalCount - nMoreCount - 1];
|
|
244
|
+
cy.wrap(lastVisibleToken).shadow().find("button").should("be.focused");
|
|
245
|
+
});
|
|
246
|
+
});
|
|
247
|
+
});
|
|
213
248
|
});
|
package/dist/Carousel.d.ts
CHANGED
|
@@ -4,12 +4,17 @@ import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
|
4
4
|
import type { ResizeObserverCallback } from "@ui5/webcomponents-base/dist/delegate/ResizeHandler.js";
|
|
5
5
|
import type UI5Carousel from "@ui5/webcomponents/dist/Carousel.js";
|
|
6
6
|
import type { CarouselNavigateEventDetail } from "@ui5/webcomponents/dist/Carousel.js";
|
|
7
|
-
import type { UI5CustomEvent } from "@ui5/webcomponents-base";
|
|
8
7
|
import type CarouselPageIndicatorType from "@ui5/webcomponents/dist/types/CarouselPageIndicatorType.js";
|
|
8
|
+
import type { UI5CustomEvent } from "@ui5/webcomponents-base";
|
|
9
9
|
export declare enum UDExCarouselNavigationPosition {
|
|
10
10
|
top = "top",
|
|
11
11
|
bottom = "bottom"
|
|
12
12
|
}
|
|
13
|
+
export declare enum UDExCarouselPageIndicatorType {
|
|
14
|
+
Default = "Default",
|
|
15
|
+
Numeric = "Numeric",
|
|
16
|
+
None = "None"
|
|
17
|
+
}
|
|
13
18
|
export declare enum UDExCarouselButtonDesign {
|
|
14
19
|
Secondary = "Secondary",
|
|
15
20
|
Tertiary = "Tertiary"
|
|
@@ -106,7 +111,7 @@ declare class UDExCarousel extends UI5Element {
|
|
|
106
111
|
* @default "Default"
|
|
107
112
|
* @public
|
|
108
113
|
*/
|
|
109
|
-
pageIndicatorType: `${
|
|
114
|
+
pageIndicatorType: `${UDExCarouselPageIndicatorType}`;
|
|
110
115
|
/**
|
|
111
116
|
* Defines the prev button is disabled
|
|
112
117
|
*
|
|
@@ -171,8 +176,9 @@ declare class UDExCarousel extends UI5Element {
|
|
|
171
176
|
};
|
|
172
177
|
get _hidePageIndicator(): boolean;
|
|
173
178
|
get _carousel(): UI5Carousel | null;
|
|
174
|
-
get
|
|
179
|
+
get _isBottomDotNavigation(): boolean;
|
|
175
180
|
get autoplayToggleButtonTooltipText(): string;
|
|
181
|
+
get sanitizedPageIndicatorType(): `${CarouselPageIndicatorType}`;
|
|
176
182
|
}
|
|
177
183
|
export default UDExCarousel;
|
|
178
184
|
export type { CarouselNavigateEventDetail, UDExCarouselAutoplayToggleEventDetails };
|
package/dist/Carousel.js
CHANGED
|
@@ -25,6 +25,12 @@ export var UDExCarouselNavigationPosition;
|
|
|
25
25
|
UDExCarouselNavigationPosition["top"] = "top";
|
|
26
26
|
UDExCarouselNavigationPosition["bottom"] = "bottom";
|
|
27
27
|
})(UDExCarouselNavigationPosition || (UDExCarouselNavigationPosition = {}));
|
|
28
|
+
export var UDExCarouselPageIndicatorType;
|
|
29
|
+
(function (UDExCarouselPageIndicatorType) {
|
|
30
|
+
UDExCarouselPageIndicatorType["Default"] = "Default";
|
|
31
|
+
UDExCarouselPageIndicatorType["Numeric"] = "Numeric";
|
|
32
|
+
UDExCarouselPageIndicatorType["None"] = "None";
|
|
33
|
+
})(UDExCarouselPageIndicatorType || (UDExCarouselPageIndicatorType = {}));
|
|
28
34
|
export var UDExCarouselButtonDesign;
|
|
29
35
|
(function (UDExCarouselButtonDesign) {
|
|
30
36
|
UDExCarouselButtonDesign["Secondary"] = "Secondary";
|
|
@@ -220,14 +226,14 @@ let UDExCarousel = UDExCarousel_1 = class UDExCarousel extends UI5Element {
|
|
|
220
226
|
if (this.isPrevButtonDisabled || !this._carousel) {
|
|
221
227
|
return;
|
|
222
228
|
}
|
|
223
|
-
this._carousel.
|
|
229
|
+
this._carousel.navigateArrowLeft();
|
|
224
230
|
this._calculateDisabledButtonsState();
|
|
225
231
|
}
|
|
226
232
|
_nextButtonClick() {
|
|
227
233
|
if (this.isNextButtonDisabled || !this._carousel) {
|
|
228
234
|
return;
|
|
229
235
|
}
|
|
230
|
-
this._carousel.
|
|
236
|
+
this._carousel.navigateArrowRight();
|
|
231
237
|
this._calculateDisabledButtonsState();
|
|
232
238
|
}
|
|
233
239
|
_onkeydown(e) {
|
|
@@ -246,8 +252,13 @@ let UDExCarousel = UDExCarousel_1 = class UDExCarousel extends UI5Element {
|
|
|
246
252
|
return translate(UDExCarousel_1, CAROUSEL_PREVIOUS_ARROW_TEXT);
|
|
247
253
|
}
|
|
248
254
|
get carouselClass() {
|
|
249
|
-
|
|
250
|
-
|
|
255
|
+
let classes = "udex-carousel";
|
|
256
|
+
classes += ` udex-carousel__navigation--${this.navigationPlacement}`;
|
|
257
|
+
if (this.navigationPlacement === UDExCarouselNavigationPosition.bottom
|
|
258
|
+
&& this.pageIndicatorType === UDExCarouselPageIndicatorType.None) {
|
|
259
|
+
classes += " udex-carousel__navigation--bottom-buttons-only";
|
|
260
|
+
}
|
|
261
|
+
return classes;
|
|
251
262
|
}
|
|
252
263
|
get navigationWrapperClass() {
|
|
253
264
|
let _class = "udex-carousel__navigation-wrapper";
|
|
@@ -264,6 +275,10 @@ let UDExCarousel = UDExCarousel_1 = class UDExCarousel extends UI5Element {
|
|
|
264
275
|
return _class;
|
|
265
276
|
}
|
|
266
277
|
get buttonDesign() {
|
|
278
|
+
if (this.navigationPlacement === UDExCarouselNavigationPosition.bottom
|
|
279
|
+
&& this.pageIndicatorType === UDExCarouselPageIndicatorType.None) {
|
|
280
|
+
return UDExCarouselButtonDesign.Secondary;
|
|
281
|
+
}
|
|
267
282
|
return this.navigationPlacement === UDExCarouselNavigationPosition.top
|
|
268
283
|
? UDExCarouselButtonDesign.Secondary
|
|
269
284
|
: UDExCarouselButtonDesign.Tertiary;
|
|
@@ -275,19 +290,33 @@ let UDExCarousel = UDExCarousel_1 = class UDExCarousel extends UI5Element {
|
|
|
275
290
|
};
|
|
276
291
|
}
|
|
277
292
|
get _hidePageIndicator() {
|
|
293
|
+
if (this.navigationPlacement === UDExCarouselNavigationPosition.bottom
|
|
294
|
+
&& this.pageIndicatorType === UDExCarouselPageIndicatorType.None) {
|
|
295
|
+
return true;
|
|
296
|
+
}
|
|
278
297
|
return this.navigationPlacement === UDExCarouselNavigationPosition.top;
|
|
279
298
|
}
|
|
280
299
|
get _carousel() {
|
|
281
300
|
return this.shadowRoot.querySelector("[ui5-carousel]");
|
|
282
301
|
}
|
|
283
|
-
get
|
|
284
|
-
|
|
302
|
+
get _isBottomDotNavigation() {
|
|
303
|
+
if (this.navigationPlacement === UDExCarouselNavigationPosition.bottom
|
|
304
|
+
&& this.pageIndicatorType !== UDExCarouselPageIndicatorType.None) {
|
|
305
|
+
return true;
|
|
306
|
+
}
|
|
307
|
+
return false;
|
|
285
308
|
}
|
|
286
309
|
get autoplayToggleButtonTooltipText() {
|
|
287
310
|
return this._autoplayIsPaused
|
|
288
311
|
? translate(UDExCarousel_1, CAROUSEL_AUTOPLAY_TOGGLE_START)
|
|
289
312
|
: translate(UDExCarousel_1, CAROUSEL_AUTOPLAY_TOGGLE_STOP);
|
|
290
313
|
}
|
|
314
|
+
get sanitizedPageIndicatorType() {
|
|
315
|
+
if (this.pageIndicatorType === UDExCarouselPageIndicatorType.None) {
|
|
316
|
+
return UDExCarouselPageIndicatorType.Default;
|
|
317
|
+
}
|
|
318
|
+
return this.pageIndicatorType;
|
|
319
|
+
}
|
|
291
320
|
};
|
|
292
321
|
__decorate([
|
|
293
322
|
property()
|