@sapudex/web-components 2.47.0 → 2.49.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/bundle.esm.js +2 -0
- package/cypress/specs/AccordionSpotlight.cy.tsx +402 -0
- package/cypress/specs/BusyIndicator.cy.tsx +15 -0
- package/cypress/specs/Carousel.cy.tsx +142 -0
- package/cypress/specs/DatePicker.cy.tsx +62 -0
- package/cypress/specs/FilterMenu.cy.tsx +968 -10
- package/cypress/specs/List.cy.tsx +106 -0
- package/cypress/specs/ListItem.cy.tsx +291 -1
- package/cypress/specs/MediaPlayer.cy.tsx +32 -0
- package/cypress/specs/SelectBox.cy.tsx +134 -3
- package/cypress/specs/Tag.cy.tsx +34 -3
- package/cypress/specs/TextField.cy.tsx +68 -0
- package/cypress/support/component-imports.instrumented.ts +6 -0
- package/cypress/support/component-imports.src.ts +6 -0
- package/dist/AccordionSpotlight.d.ts +149 -0
- package/dist/AccordionSpotlight.js +284 -0
- package/dist/AccordionSpotlight.js.map +1 -0
- package/dist/AccordionSpotlightItem.d.ts +76 -0
- package/dist/AccordionSpotlightItem.js +115 -0
- package/dist/AccordionSpotlightItem.js.map +1 -0
- package/dist/AccordionSpotlightItemTemplate.d.ts +2 -0
- package/dist/AccordionSpotlightItemTemplate.js +5 -0
- package/dist/AccordionSpotlightItemTemplate.js.map +1 -0
- package/dist/AccordionSpotlightTemplate.d.ts +2 -0
- package/dist/AccordionSpotlightTemplate.js +10 -0
- package/dist/AccordionSpotlightTemplate.js.map +1 -0
- package/dist/BusyIndicator.d.ts +9 -0
- package/dist/BusyIndicator.js +7 -1
- package/dist/BusyIndicator.js.map +1 -1
- package/dist/Carousel.d.ts +64 -8
- package/dist/Carousel.js +191 -33
- package/dist/Carousel.js.map +1 -1
- package/dist/CarouselTemplate.js +9 -2
- package/dist/CarouselTemplate.js.map +1 -1
- package/dist/DatePicker.d.ts +5 -0
- package/dist/DatePicker.js +10 -0
- package/dist/DatePicker.js.map +1 -1
- package/dist/DatePickerTemplate.js +1 -1
- package/dist/DatePickerTemplate.js.map +1 -1
- package/dist/FilterMenu.d.ts +12 -2
- package/dist/FilterMenu.js +24 -4
- package/dist/FilterMenu.js.map +1 -1
- package/dist/FilterMenuTemplate.js +1 -1
- package/dist/FilterMenuTemplate.js.map +1 -1
- package/dist/List.d.ts +1 -0
- package/dist/List.js +24 -11
- package/dist/List.js.map +1 -1
- package/dist/ListGroupHeader.js +5 -1
- package/dist/ListGroupHeader.js.map +1 -1
- package/dist/ListGroupHeaderBase.d.ts +22 -0
- package/dist/ListGroupHeaderBase.js +44 -0
- package/dist/ListGroupHeaderBase.js.map +1 -1
- package/dist/ListItem.d.ts +4 -0
- package/dist/ListItem.js +32 -0
- package/dist/ListItem.js.map +1 -1
- package/dist/MediaPlayer.d.ts +2 -0
- package/dist/MediaPlayer.js +12 -0
- package/dist/MediaPlayer.js.map +1 -1
- package/dist/PromoTile.js +1 -1
- package/dist/PromoTile.js.map +1 -1
- package/dist/SearchableListBase.d.ts +10 -1
- package/dist/SearchableListBase.js +23 -7
- package/dist/SearchableListBase.js.map +1 -1
- package/dist/SearchableListBaseTemplate.js +3 -2
- package/dist/SearchableListBaseTemplate.js.map +1 -1
- package/dist/SelectBase.d.ts +14 -0
- package/dist/SelectBase.js +56 -3
- package/dist/SelectBase.js.map +1 -1
- package/dist/SelectBoxTemplate.js +1 -1
- package/dist/SelectBoxTemplate.js.map +1 -1
- package/dist/TabNavigation.d.ts +6 -0
- package/dist/TabNavigation.js +5 -0
- package/dist/TabNavigation.js.map +1 -1
- package/dist/Tag.js +3 -2
- package/dist/Tag.js.map +1 -1
- package/dist/TagTemplate.js +2 -2
- package/dist/TagTemplate.js.map +1 -1
- package/dist/TextField.d.ts +12 -0
- package/dist/TextField.js +15 -0
- package/dist/TextField.js.map +1 -1
- package/dist/TextFieldTemplate.js +1 -1
- package/dist/TextFieldTemplate.js.map +1 -1
- package/dist/assets/{InputSuggestions-CbKVAumI.js → InputSuggestions-DaB1A6jW.js} +1 -1
- package/dist/assets/{ListItemStandardExpandableTextTemplate-C3-WJZBS.js → ListItemStandardExpandableTextTemplate-Co4KQuVw.js} +1 -1
- package/dist/assets/{bundle-JYo3bV8v.css → bundle-CkxyEA8c.css} +1 -1
- package/dist/assets/{bundle.esm-D8jQybCx.js → bundle.esm-al3NYhoB.js} +242 -239
- package/dist/assets/messagebundle_ar-BUZ_gTvQ.js +1 -0
- package/dist/assets/messagebundle_en-DoNTK1BE.js +1 -0
- package/dist/assets/messagebundle_no-BZQfeWxT.js +1 -0
- package/dist/assets/messagebundle_pl-CsXeN1y6.js +1 -0
- package/dist/assets/messagebundle_pt_PT-CQ5YAsmx.js +1 -0
- package/dist/css/themes/Accordion.css +1 -1
- package/dist/css/themes/AccordionItem.css +1 -1
- package/dist/css/themes/AccordionSpotlight.css +1 -0
- package/dist/css/themes/AccordionSpotlightItem.css +1 -0
- package/dist/css/themes/Badge.css +1 -1
- package/dist/css/themes/BusyIndicator.css +1 -0
- package/dist/css/themes/Button.css +1 -1
- package/dist/css/themes/Carousel.css +1 -1
- package/dist/css/themes/Divider.css +1 -1
- package/dist/css/themes/Dropdown.css +1 -1
- package/dist/css/themes/FilterMenu.css +1 -1
- package/dist/css/themes/Footer.css +1 -1
- package/dist/css/themes/ImageGridTableItem.css +1 -1
- package/dist/css/themes/MastheadItem.css +1 -1
- package/dist/css/themes/MastheadProfileMenu.css +1 -1
- package/dist/css/themes/MastheadShell.css +1 -1
- package/dist/css/themes/MediaPlayer.css +1 -1
- package/dist/css/themes/PhoneNumberField.css +1 -1
- package/dist/css/themes/ProgressBar.css +1 -1
- package/dist/css/themes/PromoTile.css +1 -1
- package/dist/css/themes/Review.css +1 -1
- package/dist/css/themes/ReviewItem.css +1 -1
- package/dist/css/themes/Search.css +1 -1
- package/dist/css/themes/SelectBase.css +1 -1
- package/dist/css/themes/SelectBox.css +1 -1
- package/dist/css/themes/SideNavigation.css +1 -1
- package/dist/css/themes/SideNavigationGroup.css +1 -1
- package/dist/css/themes/SocialMediaButton.css +1 -1
- package/dist/css/themes/StepInput.css +1 -1
- package/dist/css/themes/Switch.css +1 -1
- package/dist/css/themes/TabNavigation.css +1 -1
- package/dist/css/themes/Table.css +1 -1
- package/dist/css/themes/TableCell.css +1 -1
- package/dist/css/themes/TableGroupRow.css +1 -1
- package/dist/css/themes/TableHeaderCell.css +1 -1
- package/dist/css/themes/Tag.css +1 -1
- package/dist/css/themes/TagGroup.css +1 -1
- package/dist/css/themes/TextArea.css +1 -1
- package/dist/css/themes/TextField.css +1 -1
- package/dist/css/themes/Toast.css +1 -1
- package/dist/custom-elements-internal.json +511 -35
- package/dist/custom-elements.json +455 -49
- package/dist/generated/assets/i18n/messagebundle_ar.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en.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_PT.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/templates/ListGroupHeaderTemplate.lit.js +24 -21
- package/dist/generated/templates/ListGroupHeaderTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ListItemTemplate.lit.js +2 -2
- package/dist/generated/templates/ListItemTemplate.lit.js.map +1 -1
- package/dist/generated/themes/Accordion.css.d.ts +1 -1
- package/dist/generated/themes/Accordion.css.js +1 -1
- package/dist/generated/themes/Accordion.css.js.map +1 -1
- package/dist/generated/themes/AccordionItem.css.d.ts +1 -1
- package/dist/generated/themes/AccordionItem.css.js +1 -1
- package/dist/generated/themes/AccordionItem.css.js.map +1 -1
- package/dist/generated/themes/AccordionSpotlight.css.d.ts +2 -0
- package/dist/generated/themes/AccordionSpotlight.css.js +8 -0
- package/dist/generated/themes/AccordionSpotlight.css.js.map +1 -0
- package/dist/generated/themes/AccordionSpotlightItem.css.d.ts +2 -0
- package/dist/generated/themes/AccordionSpotlightItem.css.js +8 -0
- package/dist/generated/themes/AccordionSpotlightItem.css.js.map +1 -0
- package/dist/generated/themes/Badge.css.d.ts +1 -1
- package/dist/generated/themes/Badge.css.js +1 -1
- package/dist/generated/themes/Badge.css.js.map +1 -1
- package/dist/generated/themes/BusyIndicator.css.d.ts +2 -0
- package/dist/generated/themes/BusyIndicator.css.js +8 -0
- package/dist/generated/themes/BusyIndicator.css.js.map +1 -0
- 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/Divider.css.d.ts +1 -1
- package/dist/generated/themes/Divider.css.js +1 -1
- package/dist/generated/themes/Divider.css.js.map +1 -1
- package/dist/generated/themes/Dropdown.css.d.ts +1 -1
- package/dist/generated/themes/Dropdown.css.js +1 -1
- package/dist/generated/themes/Dropdown.css.js.map +1 -1
- package/dist/generated/themes/FilterMenu.css.d.ts +1 -1
- package/dist/generated/themes/FilterMenu.css.js +1 -1
- package/dist/generated/themes/FilterMenu.css.js.map +1 -1
- package/dist/generated/themes/Footer.css.d.ts +1 -1
- package/dist/generated/themes/Footer.css.js +1 -1
- package/dist/generated/themes/Footer.css.js.map +1 -1
- package/dist/generated/themes/ImageGridTableItem.css.d.ts +1 -1
- package/dist/generated/themes/ImageGridTableItem.css.js +1 -1
- package/dist/generated/themes/ImageGridTableItem.css.js.map +1 -1
- package/dist/generated/themes/MastheadItem.css.d.ts +1 -1
- package/dist/generated/themes/MastheadItem.css.js +1 -1
- package/dist/generated/themes/MastheadItem.css.js.map +1 -1
- package/dist/generated/themes/MastheadProfileMenu.css.d.ts +1 -1
- package/dist/generated/themes/MastheadProfileMenu.css.js +1 -1
- package/dist/generated/themes/MastheadProfileMenu.css.js.map +1 -1
- package/dist/generated/themes/MastheadShell.css.d.ts +1 -1
- package/dist/generated/themes/MastheadShell.css.js +1 -1
- package/dist/generated/themes/MastheadShell.css.js.map +1 -1
- package/dist/generated/themes/MediaPlayer.css.d.ts +1 -1
- package/dist/generated/themes/MediaPlayer.css.js +1 -1
- package/dist/generated/themes/MediaPlayer.css.js.map +1 -1
- package/dist/generated/themes/PhoneNumberField.css.d.ts +1 -1
- package/dist/generated/themes/PhoneNumberField.css.js +1 -1
- package/dist/generated/themes/PhoneNumberField.css.js.map +1 -1
- package/dist/generated/themes/ProgressBar.css.d.ts +1 -1
- package/dist/generated/themes/ProgressBar.css.js +1 -1
- package/dist/generated/themes/ProgressBar.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/Review.css.d.ts +1 -1
- package/dist/generated/themes/Review.css.js +1 -1
- package/dist/generated/themes/Review.css.js.map +1 -1
- package/dist/generated/themes/ReviewItem.css.d.ts +1 -1
- package/dist/generated/themes/ReviewItem.css.js +1 -1
- package/dist/generated/themes/ReviewItem.css.js.map +1 -1
- package/dist/generated/themes/Search.css.d.ts +1 -1
- package/dist/generated/themes/Search.css.js +1 -1
- package/dist/generated/themes/Search.css.js.map +1 -1
- package/dist/generated/themes/SelectBase.css.d.ts +1 -1
- package/dist/generated/themes/SelectBase.css.js +1 -1
- package/dist/generated/themes/SelectBase.css.js.map +1 -1
- package/dist/generated/themes/SelectBox.css.d.ts +1 -1
- package/dist/generated/themes/SelectBox.css.js +1 -1
- package/dist/generated/themes/SelectBox.css.js.map +1 -1
- package/dist/generated/themes/SideNavigation.css.d.ts +1 -1
- package/dist/generated/themes/SideNavigation.css.js +1 -1
- package/dist/generated/themes/SideNavigation.css.js.map +1 -1
- package/dist/generated/themes/SideNavigationGroup.css.d.ts +1 -1
- package/dist/generated/themes/SideNavigationGroup.css.js +1 -1
- package/dist/generated/themes/SideNavigationGroup.css.js.map +1 -1
- package/dist/generated/themes/SocialMediaButton.css.d.ts +1 -1
- package/dist/generated/themes/SocialMediaButton.css.js +1 -1
- package/dist/generated/themes/SocialMediaButton.css.js.map +1 -1
- package/dist/generated/themes/StepInput.css.d.ts +1 -1
- package/dist/generated/themes/StepInput.css.js +1 -1
- package/dist/generated/themes/StepInput.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/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/Table.css.d.ts +1 -1
- package/dist/generated/themes/Table.css.js +1 -1
- package/dist/generated/themes/Table.css.js.map +1 -1
- package/dist/generated/themes/TableCell.css.d.ts +1 -1
- package/dist/generated/themes/TableCell.css.js +1 -1
- package/dist/generated/themes/TableCell.css.js.map +1 -1
- package/dist/generated/themes/TableGroupRow.css.d.ts +1 -1
- package/dist/generated/themes/TableGroupRow.css.js +1 -1
- package/dist/generated/themes/TableGroupRow.css.js.map +1 -1
- package/dist/generated/themes/TableHeaderCell.css.d.ts +1 -1
- package/dist/generated/themes/TableHeaderCell.css.js +1 -1
- package/dist/generated/themes/TableHeaderCell.css.js.map +1 -1
- package/dist/generated/themes/Tag.css.d.ts +1 -1
- package/dist/generated/themes/Tag.css.js +1 -1
- package/dist/generated/themes/Tag.css.js.map +1 -1
- package/dist/generated/themes/TagGroup.css.d.ts +1 -1
- package/dist/generated/themes/TagGroup.css.js +1 -1
- package/dist/generated/themes/TagGroup.css.js.map +1 -1
- package/dist/generated/themes/TextArea.css.d.ts +1 -1
- package/dist/generated/themes/TextArea.css.js +1 -1
- package/dist/generated/themes/TextArea.css.js.map +1 -1
- package/dist/generated/themes/TextField.css.d.ts +1 -1
- package/dist/generated/themes/TextField.css.js +1 -1
- package/dist/generated/themes/TextField.css.js.map +1 -1
- package/dist/generated/themes/Toast.css.d.ts +1 -1
- package/dist/generated/themes/Toast.css.js +1 -1
- package/dist/generated/themes/Toast.css.js.map +1 -1
- package/dist/messagebundle.properties +3 -0
- package/dist/messagebundle_ar.properties +99 -0
- package/dist/messagebundle_en.properties +2 -0
- package/dist/messagebundle_no.properties +126 -1
- package/dist/messagebundle_pl.properties +134 -1
- package/dist/messagebundle_pt_PT.properties +126 -1
- package/dist/vscode.html-custom-data.json +92 -12
- package/dist/web-types.json +233 -27
- package/package.json +1 -1
- package/src/AccordionSpotlight.ts +321 -0
- package/src/AccordionSpotlightItem.ts +117 -0
- package/src/AccordionSpotlightItemTemplate.tsx +7 -0
- package/src/AccordionSpotlightTemplate.tsx +107 -0
- package/src/BusyIndicator.ts +17 -2
- package/src/Carousel.ts +243 -34
- package/src/CarouselTemplate.tsx +66 -27
- package/src/DatePicker.ts +9 -0
- package/src/DatePickerTemplate.tsx +2 -1
- package/src/FilterMenu.ts +25 -4
- package/src/FilterMenuTemplate.tsx +1 -1
- package/src/List.ts +23 -11
- package/src/ListGroupHeader.hbs +11 -10
- package/src/ListGroupHeader.ts +5 -1
- package/src/ListGroupHeaderBase.ts +48 -0
- package/src/ListItem.hbs +5 -1
- package/src/ListItem.ts +36 -0
- package/src/MediaPlayer.ts +11 -0
- package/src/PromoTile.ts +1 -1
- package/src/SearchableListBase.ts +24 -7
- package/src/SearchableListBaseTemplate.tsx +5 -2
- package/src/SelectBase.ts +58 -3
- package/src/SelectBoxTemplate.tsx +1 -0
- package/src/TabNavigation.ts +6 -0
- package/src/Tag.ts +3 -2
- package/src/TagTemplate.tsx +2 -0
- package/src/TextField.ts +26 -1
- package/src/TextFieldTemplate.tsx +1 -0
- package/src/generated/i18n/i18n-defaults.ts +2 -2
- package/src/generated/templates/ListGroupHeaderTemplate.lit.ts +24 -21
- package/src/generated/templates/ListItemTemplate.lit.ts +2 -2
- package/src/generated/themes/Accordion.css.ts +1 -1
- package/src/generated/themes/AccordionItem.css.ts +1 -1
- package/src/generated/themes/AccordionSpotlight.css.ts +9 -0
- package/src/generated/themes/AccordionSpotlightItem.css.ts +9 -0
- package/src/generated/themes/Badge.css.ts +1 -1
- package/src/generated/themes/BusyIndicator.css.ts +9 -0
- package/src/generated/themes/Button.css.ts +1 -1
- package/src/generated/themes/Carousel.css.ts +1 -1
- package/src/generated/themes/Divider.css.ts +1 -1
- package/src/generated/themes/Dropdown.css.ts +1 -1
- package/src/generated/themes/FilterMenu.css.ts +1 -1
- package/src/generated/themes/Footer.css.ts +1 -1
- package/src/generated/themes/ImageGridTableItem.css.ts +1 -1
- package/src/generated/themes/MastheadItem.css.ts +1 -1
- package/src/generated/themes/MastheadProfileMenu.css.ts +1 -1
- package/src/generated/themes/MastheadShell.css.ts +1 -1
- package/src/generated/themes/MediaPlayer.css.ts +1 -1
- package/src/generated/themes/PhoneNumberField.css.ts +1 -1
- package/src/generated/themes/ProgressBar.css.ts +1 -1
- package/src/generated/themes/PromoTile.css.ts +1 -1
- package/src/generated/themes/Review.css.ts +1 -1
- package/src/generated/themes/ReviewItem.css.ts +1 -1
- package/src/generated/themes/Search.css.ts +1 -1
- package/src/generated/themes/SelectBase.css.ts +1 -1
- package/src/generated/themes/SelectBox.css.ts +1 -1
- package/src/generated/themes/SideNavigation.css.ts +1 -1
- package/src/generated/themes/SideNavigationGroup.css.ts +1 -1
- package/src/generated/themes/SocialMediaButton.css.ts +1 -1
- package/src/generated/themes/StepInput.css.ts +1 -1
- package/src/generated/themes/Switch.css.ts +1 -1
- package/src/generated/themes/TabNavigation.css.ts +1 -1
- package/src/generated/themes/Table.css.ts +1 -1
- package/src/generated/themes/TableCell.css.ts +1 -1
- package/src/generated/themes/TableGroupRow.css.ts +1 -1
- package/src/generated/themes/TableHeaderCell.css.ts +1 -1
- package/src/generated/themes/Tag.css.ts +1 -1
- package/src/generated/themes/TagGroup.css.ts +1 -1
- package/src/generated/themes/TextArea.css.ts +1 -1
- package/src/generated/themes/TextField.css.ts +1 -1
- package/src/generated/themes/Toast.css.ts +1 -1
- package/src/i18n/messagebundle.properties +3 -0
- package/src/i18n/messagebundle_ar.properties +99 -0
- package/src/i18n/messagebundle_en.properties +2 -0
- package/src/i18n/messagebundle_no.properties +126 -1
- package/src/i18n/messagebundle_pl.properties +134 -1
- package/src/i18n/messagebundle_pt_PT.properties +126 -1
- package/src/themes/Accordion.css +1 -1
- package/src/themes/AccordionItem.css +4 -4
- package/src/themes/AccordionSpotlight.css +264 -0
- package/src/themes/AccordionSpotlightItem.css +3 -0
- package/src/themes/Badge.css +7 -7
- package/src/themes/BusyIndicator.css +24 -0
- package/src/themes/Button.css +57 -57
- package/src/themes/Carousel.css +20 -8
- package/src/themes/Divider.css +1 -1
- package/src/themes/Dropdown.css +1 -1
- package/src/themes/FilterMenu.css +2 -2
- package/src/themes/Footer.css +1 -1
- package/src/themes/ImageGridTableItem.css +1 -1
- package/src/themes/MastheadItem.css +7 -4
- package/src/themes/MastheadProfileMenu.css +0 -13
- package/src/themes/MastheadShell.css +2 -2
- package/src/themes/MediaPlayer.css +5 -34
- package/src/themes/PhoneNumberField.css +6 -6
- package/src/themes/ProgressBar.css +4 -0
- package/src/themes/PromoTile.css +4 -4
- package/src/themes/Review.css +2 -2
- package/src/themes/ReviewItem.css +2 -2
- package/src/themes/Search.css +5 -5
- package/src/themes/SelectBase.css +14 -14
- package/src/themes/SelectBox.css +1 -1
- package/src/themes/SideNavigation.css +1 -1
- package/src/themes/SideNavigationGroup.css +1 -1
- package/src/themes/SocialMediaButton.css +2 -2
- package/src/themes/StepInput.css +8 -8
- package/src/themes/Switch.css +9 -9
- package/src/themes/TabNavigation.css +1 -1
- package/src/themes/Table.css +1 -1
- package/src/themes/TableCell.css +3 -3
- package/src/themes/TableGroupRow.css +1 -1
- package/src/themes/TableHeaderCell.css +3 -4
- package/src/themes/Tag.css +28 -4
- package/src/themes/TagGroup.css +1 -0
- package/src/themes/TextArea.css +4 -4
- package/src/themes/TextField.css +13 -13
- package/src/themes/Toast.css +1 -1
- package/dist/assets/messagebundle_ar-BNhVFt1-.js +0 -1
- package/dist/assets/messagebundle_en-BZqDcZHN.js +0 -1
- package/dist/assets/messagebundle_no-BIUfmTWJ.js +0 -1
- package/dist/assets/messagebundle_pl-BmaELnDD.js +0 -1
- package/dist/assets/messagebundle_pt_PT-DcVh6BH6.js +0 -1
package/bundle.esm.js
CHANGED
|
@@ -24,6 +24,8 @@ import "./dist/Assets.js";
|
|
|
24
24
|
// Import your web components here from the dist/ directory
|
|
25
25
|
import "./dist/Accordion.js";
|
|
26
26
|
import "./dist/AccordionItem.js";
|
|
27
|
+
import "./dist/AccordionSpotlight.js";
|
|
28
|
+
import "./dist/AccordionSpotlightItem.js";
|
|
27
29
|
import "./dist/Avatar.js";
|
|
28
30
|
import "./dist/AvatarGroup.js";
|
|
29
31
|
import "./dist/Badge.js";
|
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
import {
|
|
2
|
+
UDExAccordionSpotlight,
|
|
3
|
+
UDExAccordionSpotlightItem,
|
|
4
|
+
} from "../support/component-imports.js";
|
|
5
|
+
|
|
6
|
+
const defaultAccordionSpotlight = (
|
|
7
|
+
<UDExAccordionSpotlight id="accordion-spotlight">
|
|
8
|
+
<UDExAccordionSpotlightItem heading="Item 1" subheading="Description for item 1" selected>
|
|
9
|
+
<div>Panel content 1</div>
|
|
10
|
+
</UDExAccordionSpotlightItem>
|
|
11
|
+
<UDExAccordionSpotlightItem heading="Item 2" subheading="Description for item 2">
|
|
12
|
+
<div>Panel content 2</div>
|
|
13
|
+
</UDExAccordionSpotlightItem>
|
|
14
|
+
<UDExAccordionSpotlightItem heading="Item 3" subheading="Description for item 3">
|
|
15
|
+
<div>Panel content 3</div>
|
|
16
|
+
</UDExAccordionSpotlightItem>
|
|
17
|
+
</UDExAccordionSpotlight>
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
describe("AccordionSpotlight — rendering", () => {
|
|
21
|
+
beforeEach(() => {
|
|
22
|
+
cy.mount(defaultAccordionSpotlight);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
it("renders the root element and nav panel", () => {
|
|
26
|
+
cy.get("[udex-accordion-spotlight]").shadow().find(".udex-accordion-spotlight").should("exist");
|
|
27
|
+
cy.get("[udex-accordion-spotlight]").shadow().find(".udex-accordion-spotlight__nav").should("exist");
|
|
28
|
+
cy.get("[udex-accordion-spotlight]").shadow().find(".udex-accordion-spotlight__nav-holder").should("exist");
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it("renders correct number of nav items", () => {
|
|
32
|
+
cy.get("[udex-accordion-spotlight]")
|
|
33
|
+
.shadow()
|
|
34
|
+
.find(".udex-accordion-spotlight__nav-item")
|
|
35
|
+
.should("have.length", 3);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it("first item is selected by default", () => {
|
|
39
|
+
cy.get("[udex-accordion-spotlight]")
|
|
40
|
+
.shadow()
|
|
41
|
+
.find(".udex-accordion-spotlight-item__button")
|
|
42
|
+
.eq(0)
|
|
43
|
+
.should("have.class", "udex-accordion-spotlight-item__button--active")
|
|
44
|
+
.and("have.attr", "aria-expanded", "true");
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it("all other items are not selected", () => {
|
|
48
|
+
cy.get("[udex-accordion-spotlight]")
|
|
49
|
+
.shadow()
|
|
50
|
+
.find(".udex-accordion-spotlight-item__button")
|
|
51
|
+
.eq(1)
|
|
52
|
+
.should("not.have.class", "udex-accordion-spotlight-item__button--active")
|
|
53
|
+
.and("have.attr", "aria-expanded", "false");
|
|
54
|
+
|
|
55
|
+
cy.get("[udex-accordion-spotlight]")
|
|
56
|
+
.shadow()
|
|
57
|
+
.find(".udex-accordion-spotlight-item__button")
|
|
58
|
+
.eq(2)
|
|
59
|
+
.should("not.have.class", "udex-accordion-spotlight-item__button--active")
|
|
60
|
+
.and("have.attr", "aria-expanded", "false");
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
it("subheading area is open for the selected item and hidden for the rest", () => {
|
|
64
|
+
cy.get("[udex-accordion-spotlight]")
|
|
65
|
+
.shadow()
|
|
66
|
+
.find(".udex-accordion-spotlight-item__expand")
|
|
67
|
+
.eq(0)
|
|
68
|
+
.should("have.class", "udex-accordion-spotlight-item__expand--open")
|
|
69
|
+
.and("not.have.attr", "aria-hidden");
|
|
70
|
+
|
|
71
|
+
cy.get("[udex-accordion-spotlight]")
|
|
72
|
+
.shadow()
|
|
73
|
+
.find(".udex-accordion-spotlight-item__expand")
|
|
74
|
+
.eq(1)
|
|
75
|
+
.should("not.have.class", "udex-accordion-spotlight-item__expand--open")
|
|
76
|
+
.and("have.attr", "aria-hidden", "true");
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
it("does not render footer slot when no footer content is provided", () => {
|
|
80
|
+
cy.get("[udex-accordion-spotlight]")
|
|
81
|
+
.shadow()
|
|
82
|
+
.find(".udex-accordion-spotlight__footer")
|
|
83
|
+
.should("not.exist");
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
it("renders footer slot when footer content is provided", () => {
|
|
87
|
+
cy.mount(
|
|
88
|
+
<UDExAccordionSpotlight id="accordion-spotlight-with-footer">
|
|
89
|
+
<UDExAccordionSpotlightItem heading="Item 1" subheading="Sub 1" selected>
|
|
90
|
+
<div>Panel content 1</div>
|
|
91
|
+
</UDExAccordionSpotlightItem>
|
|
92
|
+
<UDExAccordionSpotlightItem heading="Item 2" subheading="Sub 2">
|
|
93
|
+
<div>Panel content 2</div>
|
|
94
|
+
</UDExAccordionSpotlightItem>
|
|
95
|
+
<div slot="footer">Footer content</div>
|
|
96
|
+
</UDExAccordionSpotlight>
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
cy.get("[udex-accordion-spotlight]")
|
|
100
|
+
.shadow()
|
|
101
|
+
.find(".udex-accordion-spotlight__footer")
|
|
102
|
+
.should("exist");
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
it("renders content panels on desktop", () => {
|
|
106
|
+
cy.get("[udex-accordion-spotlight]")
|
|
107
|
+
.shadow()
|
|
108
|
+
.find(".udex-accordion-spotlight__content")
|
|
109
|
+
.should("exist");
|
|
110
|
+
|
|
111
|
+
cy.get("[udex-accordion-spotlight]")
|
|
112
|
+
.shadow()
|
|
113
|
+
.find(".udex-accordion-spotlight__content .udex-accordion-spotlight__panel")
|
|
114
|
+
.should("have.length", 3);
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
it("each panel has role=region and aria-labelledby that matches its button id", () => {
|
|
118
|
+
cy.get("[udex-accordion-spotlight]")
|
|
119
|
+
.shadow()
|
|
120
|
+
.find(".udex-accordion-spotlight__content .udex-accordion-spotlight__panel")
|
|
121
|
+
.each(($panel, index) => {
|
|
122
|
+
cy.wrap($panel).should("have.attr", "role", "region");
|
|
123
|
+
const labelledBy = $panel.attr("aria-labelledby");
|
|
124
|
+
expect(labelledBy).to.be.a("string").and.not.be.empty;
|
|
125
|
+
cy.get("[udex-accordion-spotlight]")
|
|
126
|
+
.shadow()
|
|
127
|
+
.find(".udex-accordion-spotlight-item__button")
|
|
128
|
+
.eq(index)
|
|
129
|
+
.should("have.attr", "id", labelledBy);
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
describe("AccordionSpotlight — item selection", () => {
|
|
135
|
+
beforeEach(() => {
|
|
136
|
+
cy.mount(defaultAccordionSpotlight);
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
it("clicking a nav button activates that item", () => {
|
|
140
|
+
cy.get("[udex-accordion-spotlight]")
|
|
141
|
+
.shadow()
|
|
142
|
+
.find(".udex-accordion-spotlight-item__button")
|
|
143
|
+
.eq(1)
|
|
144
|
+
.click();
|
|
145
|
+
|
|
146
|
+
cy.get("[udex-accordion-spotlight]")
|
|
147
|
+
.shadow()
|
|
148
|
+
.find(".udex-accordion-spotlight-item__button")
|
|
149
|
+
.eq(1)
|
|
150
|
+
.should("have.class", "udex-accordion-spotlight-item__button--active");
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
it("clicking a nav button deactivates the previously selected item", () => {
|
|
154
|
+
cy.get("[udex-accordion-spotlight]")
|
|
155
|
+
.shadow()
|
|
156
|
+
.find(".udex-accordion-spotlight-item__button")
|
|
157
|
+
.eq(1)
|
|
158
|
+
.click();
|
|
159
|
+
|
|
160
|
+
cy.get("[udex-accordion-spotlight]")
|
|
161
|
+
.shadow()
|
|
162
|
+
.find(".udex-accordion-spotlight-item__button")
|
|
163
|
+
.eq(0)
|
|
164
|
+
.should("not.have.class", "udex-accordion-spotlight-item__button--active");
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
it("clicking a nav button updates aria-expanded on the clicked button", () => {
|
|
168
|
+
cy.get("[udex-accordion-spotlight]")
|
|
169
|
+
.shadow()
|
|
170
|
+
.find(".udex-accordion-spotlight-item__button")
|
|
171
|
+
.eq(2)
|
|
172
|
+
.click()
|
|
173
|
+
.should("have.attr", "aria-expanded", "true");
|
|
174
|
+
|
|
175
|
+
cy.get("[udex-accordion-spotlight]")
|
|
176
|
+
.shadow()
|
|
177
|
+
.find(".udex-accordion-spotlight-item__button")
|
|
178
|
+
.eq(0)
|
|
179
|
+
.should("have.attr", "aria-expanded", "false");
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
it("clicking the already-selected item does not fire item-click event", () => {
|
|
183
|
+
const itemClickHandler = cy.stub().as("itemClick");
|
|
184
|
+
cy.mount(
|
|
185
|
+
<UDExAccordionSpotlight id="accordion-spotlight-noop" onItemClick={itemClickHandler}>
|
|
186
|
+
<UDExAccordionSpotlightItem heading="Item 1" subheading="Sub 1" selected>
|
|
187
|
+
<div>Panel content 1</div>
|
|
188
|
+
</UDExAccordionSpotlightItem>
|
|
189
|
+
<UDExAccordionSpotlightItem heading="Item 2" subheading="Sub 2">
|
|
190
|
+
<div>Panel content 2</div>
|
|
191
|
+
</UDExAccordionSpotlightItem>
|
|
192
|
+
</UDExAccordionSpotlight>
|
|
193
|
+
);
|
|
194
|
+
|
|
195
|
+
cy.get("[udex-accordion-spotlight]")
|
|
196
|
+
.shadow()
|
|
197
|
+
.find(".udex-accordion-spotlight-item__button")
|
|
198
|
+
.eq(0)
|
|
199
|
+
.click();
|
|
200
|
+
|
|
201
|
+
cy.get("@itemClick").should("not.have.been.called");
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
it("clicking a different item fires item-click event", () => {
|
|
205
|
+
const itemClickHandler = cy.stub().as("itemClick");
|
|
206
|
+
cy.mount(
|
|
207
|
+
<UDExAccordionSpotlight id="accordion-spotlight-event" onItemClick={itemClickHandler}>
|
|
208
|
+
<UDExAccordionSpotlightItem heading="Item 1" subheading="Sub 1" selected>
|
|
209
|
+
<div>Panel content 1</div>
|
|
210
|
+
</UDExAccordionSpotlightItem>
|
|
211
|
+
<UDExAccordionSpotlightItem heading="Item 2" subheading="Sub 2">
|
|
212
|
+
<div>Panel content 2</div>
|
|
213
|
+
</UDExAccordionSpotlightItem>
|
|
214
|
+
</UDExAccordionSpotlight>
|
|
215
|
+
);
|
|
216
|
+
|
|
217
|
+
cy.get("[udex-accordion-spotlight]")
|
|
218
|
+
.shadow()
|
|
219
|
+
.find(".udex-accordion-spotlight-item__button")
|
|
220
|
+
.eq(1)
|
|
221
|
+
.click();
|
|
222
|
+
|
|
223
|
+
cy.get("@itemClick").should("have.been.calledOnce");
|
|
224
|
+
});
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
describe("AccordionSpotlight — autoPlay", () => {
|
|
228
|
+
it("does not render play button when autoPlay is false (default)", () => {
|
|
229
|
+
cy.mount(defaultAccordionSpotlight);
|
|
230
|
+
|
|
231
|
+
cy.get("[udex-accordion-spotlight]")
|
|
232
|
+
.shadow()
|
|
233
|
+
.find(".udex-accordion-spotlight__play-button")
|
|
234
|
+
.should("not.exist");
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
it("renders play button when autoPlay is true", () => {
|
|
238
|
+
cy.mount(
|
|
239
|
+
<UDExAccordionSpotlight id="accordion-spotlight-autoplay" autoPlay>
|
|
240
|
+
<UDExAccordionSpotlightItem heading="Item 1" subheading="Sub 1" selected>
|
|
241
|
+
<div>Panel content 1</div>
|
|
242
|
+
</UDExAccordionSpotlightItem>
|
|
243
|
+
<UDExAccordionSpotlightItem heading="Item 2" subheading="Sub 2">
|
|
244
|
+
<div>Panel content 2</div>
|
|
245
|
+
</UDExAccordionSpotlightItem>
|
|
246
|
+
</UDExAccordionSpotlight>
|
|
247
|
+
);
|
|
248
|
+
|
|
249
|
+
cy.get("[udex-accordion-spotlight]")
|
|
250
|
+
.shadow()
|
|
251
|
+
.find(".udex-accordion-spotlight__play-button")
|
|
252
|
+
.should("exist");
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
it("clicking the play button toggles the icon between pause and play", () => {
|
|
256
|
+
cy.mount(
|
|
257
|
+
<UDExAccordionSpotlight id="accordion-spotlight-toggle" autoPlay>
|
|
258
|
+
<UDExAccordionSpotlightItem heading="Item 1" subheading="Sub 1" selected>
|
|
259
|
+
<div>Panel content 1</div>
|
|
260
|
+
</UDExAccordionSpotlightItem>
|
|
261
|
+
<UDExAccordionSpotlightItem heading="Item 2" subheading="Sub 2">
|
|
262
|
+
<div>Panel content 2</div>
|
|
263
|
+
</UDExAccordionSpotlightItem>
|
|
264
|
+
</UDExAccordionSpotlight>
|
|
265
|
+
);
|
|
266
|
+
|
|
267
|
+
cy.get("[udex-accordion-spotlight]")
|
|
268
|
+
.shadow()
|
|
269
|
+
.find(".udex-accordion-spotlight__play-button")
|
|
270
|
+
.should("have.attr", "icon", "pause");
|
|
271
|
+
|
|
272
|
+
cy.get("[udex-accordion-spotlight]")
|
|
273
|
+
.shadow()
|
|
274
|
+
.find(".udex-accordion-spotlight__play-button")
|
|
275
|
+
.click();
|
|
276
|
+
|
|
277
|
+
cy.get("[udex-accordion-spotlight]")
|
|
278
|
+
.shadow()
|
|
279
|
+
.find(".udex-accordion-spotlight__play-button")
|
|
280
|
+
.should("have.attr", "icon", "play");
|
|
281
|
+
|
|
282
|
+
cy.get("[udex-accordion-spotlight]")
|
|
283
|
+
.shadow()
|
|
284
|
+
.find(".udex-accordion-spotlight__play-button")
|
|
285
|
+
.click();
|
|
286
|
+
|
|
287
|
+
cy.get("[udex-accordion-spotlight]")
|
|
288
|
+
.shadow()
|
|
289
|
+
.find(".udex-accordion-spotlight__play-button")
|
|
290
|
+
.should("have.attr", "icon", "pause");
|
|
291
|
+
});
|
|
292
|
+
});
|
|
293
|
+
|
|
294
|
+
describe("AccordionSpotlight — Static media mode", () => {
|
|
295
|
+
it("renders the media area in Static mode with slotted media content", () => {
|
|
296
|
+
cy.mount(
|
|
297
|
+
<UDExAccordionSpotlight id="accordion-spotlight-static" mediaMode="Static">
|
|
298
|
+
<UDExAccordionSpotlightItem heading="Item 1" subheading="Sub 1" selected>
|
|
299
|
+
<div>Panel content 1</div>
|
|
300
|
+
</UDExAccordionSpotlightItem>
|
|
301
|
+
<UDExAccordionSpotlightItem heading="Item 2" subheading="Sub 2">
|
|
302
|
+
<div>Panel content 2</div>
|
|
303
|
+
</UDExAccordionSpotlightItem>
|
|
304
|
+
<img slot="media" src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'/>" alt="media" />
|
|
305
|
+
</UDExAccordionSpotlight>
|
|
306
|
+
);
|
|
307
|
+
|
|
308
|
+
cy.get("[udex-accordion-spotlight]")
|
|
309
|
+
.shadow()
|
|
310
|
+
.find(".udex-accordion-spotlight__media")
|
|
311
|
+
.should("exist");
|
|
312
|
+
});
|
|
313
|
+
|
|
314
|
+
it("does not render the content area in Static mode", () => {
|
|
315
|
+
cy.mount(
|
|
316
|
+
<UDExAccordionSpotlight id="accordion-spotlight-static-nocontent" mediaMode="Static">
|
|
317
|
+
<UDExAccordionSpotlightItem heading="Item 1" subheading="Sub 1" selected>
|
|
318
|
+
<div>Panel content 1</div>
|
|
319
|
+
</UDExAccordionSpotlightItem>
|
|
320
|
+
<UDExAccordionSpotlightItem heading="Item 2" subheading="Sub 2">
|
|
321
|
+
<div>Panel content 2</div>
|
|
322
|
+
</UDExAccordionSpotlightItem>
|
|
323
|
+
<img slot="media" src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'/>" alt="media" />
|
|
324
|
+
</UDExAccordionSpotlight>
|
|
325
|
+
);
|
|
326
|
+
|
|
327
|
+
cy.get("[udex-accordion-spotlight]")
|
|
328
|
+
.shadow()
|
|
329
|
+
.find(".udex-accordion-spotlight__content")
|
|
330
|
+
.should("not.exist");
|
|
331
|
+
});
|
|
332
|
+
|
|
333
|
+
it("does not render the media area in Dynamic mode (default)", () => {
|
|
334
|
+
cy.mount(defaultAccordionSpotlight);
|
|
335
|
+
|
|
336
|
+
cy.get("[udex-accordion-spotlight]")
|
|
337
|
+
.shadow()
|
|
338
|
+
.find(".udex-accordion-spotlight__media")
|
|
339
|
+
.should("not.exist");
|
|
340
|
+
});
|
|
341
|
+
});
|
|
342
|
+
|
|
343
|
+
describe("AccordionSpotlight — accessibility", () => {
|
|
344
|
+
beforeEach(() => {
|
|
345
|
+
cy.mount(defaultAccordionSpotlight);
|
|
346
|
+
});
|
|
347
|
+
|
|
348
|
+
it("each nav button has an aria-expanded attribute", () => {
|
|
349
|
+
cy.get("[udex-accordion-spotlight]")
|
|
350
|
+
.shadow()
|
|
351
|
+
.find(".udex-accordion-spotlight-item__button")
|
|
352
|
+
.each(($btn) => {
|
|
353
|
+
cy.wrap($btn).should("have.attr", "aria-expanded");
|
|
354
|
+
});
|
|
355
|
+
});
|
|
356
|
+
|
|
357
|
+
it("each nav button has aria-controls that matches a panel id", () => {
|
|
358
|
+
cy.get("[udex-accordion-spotlight]")
|
|
359
|
+
.shadow()
|
|
360
|
+
.find(".udex-accordion-spotlight-item__button")
|
|
361
|
+
.each(($btn) => {
|
|
362
|
+
const controls = $btn.attr("aria-controls");
|
|
363
|
+
expect(controls).to.be.a("string").and.not.be.empty;
|
|
364
|
+
cy.get("[udex-accordion-spotlight]")
|
|
365
|
+
.shadow()
|
|
366
|
+
.find(`#${controls}`)
|
|
367
|
+
.should("exist")
|
|
368
|
+
.and("have.class", "udex-accordion-spotlight__panel");
|
|
369
|
+
});
|
|
370
|
+
});
|
|
371
|
+
|
|
372
|
+
it("each content panel has role=region", () => {
|
|
373
|
+
cy.get("[udex-accordion-spotlight]")
|
|
374
|
+
.shadow()
|
|
375
|
+
.find(".udex-accordion-spotlight__content .udex-accordion-spotlight__panel")
|
|
376
|
+
.each(($panel) => {
|
|
377
|
+
cy.wrap($panel).should("have.attr", "role", "region");
|
|
378
|
+
});
|
|
379
|
+
});
|
|
380
|
+
|
|
381
|
+
it("inactive panels have aria-hidden=true", () => {
|
|
382
|
+
cy.get("[udex-accordion-spotlight]")
|
|
383
|
+
.shadow()
|
|
384
|
+
.find(".udex-accordion-spotlight__content .udex-accordion-spotlight__panel")
|
|
385
|
+
.eq(1)
|
|
386
|
+
.should("have.attr", "aria-hidden", "true");
|
|
387
|
+
|
|
388
|
+
cy.get("[udex-accordion-spotlight]")
|
|
389
|
+
.shadow()
|
|
390
|
+
.find(".udex-accordion-spotlight__content .udex-accordion-spotlight__panel")
|
|
391
|
+
.eq(2)
|
|
392
|
+
.should("have.attr", "aria-hidden", "true");
|
|
393
|
+
});
|
|
394
|
+
|
|
395
|
+
it("active panel does not have aria-hidden", () => {
|
|
396
|
+
cy.get("[udex-accordion-spotlight]")
|
|
397
|
+
.shadow()
|
|
398
|
+
.find(".udex-accordion-spotlight__content .udex-accordion-spotlight__panel")
|
|
399
|
+
.eq(0)
|
|
400
|
+
.should("not.have.attr", "aria-hidden");
|
|
401
|
+
});
|
|
402
|
+
});
|
|
@@ -7,4 +7,19 @@ describe("Busy Indicator", () => {
|
|
|
7
7
|
cy.mount(busyIndicator)
|
|
8
8
|
cy.get("[udex-busy-indicator]").shadow().find(".ui5-busy-indicator-root").should("be.visible")
|
|
9
9
|
});
|
|
10
|
+
|
|
11
|
+
it("does not have surface-container attribute by default", () => {
|
|
12
|
+
cy.mount(busyIndicator)
|
|
13
|
+
cy.get("[udex-busy-indicator]").should("not.have.attr", "surface-container")
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it("sets surface-container attribute when surfaceContainer property is set", () => {
|
|
17
|
+
cy.mount(<UDExBusyIndicator surfaceContainer></UDExBusyIndicator>)
|
|
18
|
+
cy.get("[udex-busy-indicator]").should("have.attr", "surface-container")
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it("renders busy indicator root when surface-container is set", () => {
|
|
22
|
+
cy.mount(<UDExBusyIndicator surfaceContainer></UDExBusyIndicator>)
|
|
23
|
+
cy.get("[udex-busy-indicator]").shadow().find(".ui5-busy-indicator-root").should("be.visible")
|
|
24
|
+
});
|
|
10
25
|
});
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { UDExCarousel } from "../support/component-imports.js";
|
|
2
|
+
|
|
3
|
+
describe("UDExCarousel component", () => {
|
|
4
|
+
it("tests if web component is correctly rendered", () => {
|
|
5
|
+
cy.mount(
|
|
6
|
+
<UDExCarousel id="carousel" navigation-placement="bottom">
|
|
7
|
+
<div>slide 1</div>
|
|
8
|
+
<div>slide 2</div>
|
|
9
|
+
<div>slide 3</div>
|
|
10
|
+
</UDExCarousel>
|
|
11
|
+
);
|
|
12
|
+
cy.get("[udex-carousel]").shadow().find(".udex-carousel").should("be.visible");
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
it("tests if component renders content slots", () => {
|
|
16
|
+
cy.mount(
|
|
17
|
+
<UDExCarousel id="carousel" navigation-placement="bottom">
|
|
18
|
+
<div>slide 1</div>
|
|
19
|
+
<div>slide 2</div>
|
|
20
|
+
<div>slide 3</div>
|
|
21
|
+
</UDExCarousel>
|
|
22
|
+
);
|
|
23
|
+
cy.get("[udex-carousel]").shadow().find(".udex-carousel slot").should("have.length", 3);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it("tests if component renders numeric page indicator type", () => {
|
|
27
|
+
cy.mount(
|
|
28
|
+
<UDExCarousel id="carousel" navigation-placement="bottom" page-indicator-type="Numeric">
|
|
29
|
+
<div>slide 1</div>
|
|
30
|
+
<div>slide 2</div>
|
|
31
|
+
<div>slide 3</div>
|
|
32
|
+
</UDExCarousel>
|
|
33
|
+
);
|
|
34
|
+
cy.get("[udex-carousel]")
|
|
35
|
+
.shadow()
|
|
36
|
+
.find("[ui5-carousel]")
|
|
37
|
+
.shadow()
|
|
38
|
+
.find(".ui5-carousel-navigation-text")
|
|
39
|
+
.should("have.text", "1 of 3");
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it("tests if component renders 3 items per page", () => {
|
|
43
|
+
cy.mount(
|
|
44
|
+
<UDExCarousel id="carousel" items-per-page="S3 M3 L3 XL3" navigation-placement="bottom">
|
|
45
|
+
<div>slide 1</div>
|
|
46
|
+
<div>slide 2</div>
|
|
47
|
+
<div>slide 3</div>
|
|
48
|
+
<div>slide 4</div>
|
|
49
|
+
<div>slide 5</div>
|
|
50
|
+
<div>slide 6</div>
|
|
51
|
+
<div>slide 7</div>
|
|
52
|
+
<div>slide 8</div>
|
|
53
|
+
</UDExCarousel>
|
|
54
|
+
);
|
|
55
|
+
cy.get("[udex-carousel]")
|
|
56
|
+
.shadow()
|
|
57
|
+
.find("[ui5-carousel]")
|
|
58
|
+
.shadow()
|
|
59
|
+
.find(".ui5-carousel-item:not(.ui5-carousel-item--hidden)")
|
|
60
|
+
.should("have.length", 3);
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
it("tests if correct navigation-placement attribute is applied", () => {
|
|
64
|
+
cy.mount(
|
|
65
|
+
<UDExCarousel id="carousel-bottom" navigation-placement="bottom">
|
|
66
|
+
<div>slide 1</div>
|
|
67
|
+
<div>slide 2</div>
|
|
68
|
+
<div>slide 3</div>
|
|
69
|
+
</UDExCarousel>
|
|
70
|
+
);
|
|
71
|
+
cy.get("#carousel-bottom").should("have.attr", "navigation-placement", "bottom");
|
|
72
|
+
|
|
73
|
+
cy.mount(
|
|
74
|
+
<UDExCarousel id="carousel-top" navigation-placement="top">
|
|
75
|
+
<div>slide 1</div>
|
|
76
|
+
<div>slide 2</div>
|
|
77
|
+
<div>slide 3</div>
|
|
78
|
+
</UDExCarousel>
|
|
79
|
+
);
|
|
80
|
+
cy.get("#carousel-top").should("have.attr", "navigation-placement", "top");
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
it("tests if correct disabled attribute is applied to navigation buttons", () => {
|
|
84
|
+
cy.mount(
|
|
85
|
+
<UDExCarousel id="carousel" navigation-placement="bottom">
|
|
86
|
+
<div>slide 1</div>
|
|
87
|
+
<div>slide 2</div>
|
|
88
|
+
<div>slide 3</div>
|
|
89
|
+
</UDExCarousel>
|
|
90
|
+
);
|
|
91
|
+
cy.get("[udex-carousel]").shadow().find("[data-ui5-arrow-back]").as("prev");
|
|
92
|
+
cy.get("[udex-carousel]").shadow().find("[data-ui5-arrow-forward]").as("next");
|
|
93
|
+
|
|
94
|
+
cy.get("@prev").should("have.attr", "disabled");
|
|
95
|
+
cy.get("@next").should("not.have.attr", "disabled");
|
|
96
|
+
|
|
97
|
+
cy.get("@next").click();
|
|
98
|
+
cy.get("@prev").should("not.have.attr", "disabled");
|
|
99
|
+
cy.get("@next").should("not.have.attr", "disabled");
|
|
100
|
+
|
|
101
|
+
cy.get("@next").click();
|
|
102
|
+
cy.get("@prev").should("not.have.attr", "disabled");
|
|
103
|
+
cy.get("@next").should("have.attr", "disabled");
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
it("tests navigation buttons are hidden when all items fit on one page", () => {
|
|
107
|
+
cy.mount(
|
|
108
|
+
<UDExCarousel id="carousel" items-per-page="S3 M3 L3 XL3" navigation-placement="bottom">
|
|
109
|
+
<div>slide 1</div>
|
|
110
|
+
<div>slide 2</div>
|
|
111
|
+
<div>slide 3</div>
|
|
112
|
+
</UDExCarousel>
|
|
113
|
+
);
|
|
114
|
+
cy.get("[udex-carousel]")
|
|
115
|
+
.shadow()
|
|
116
|
+
.find(".udex-carousel__navigation-wrapper")
|
|
117
|
+
.should("not.exist");
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
it("tests navigation buttons appear after resizing to viewport where items no longer fit on one page", () => {
|
|
121
|
+
cy.viewport(1440, 900);
|
|
122
|
+
cy.mount(
|
|
123
|
+
<UDExCarousel id="carousel" items-per-page="S1 M1 L1 XL3" navigation-placement="bottom">
|
|
124
|
+
<div>slide 1</div>
|
|
125
|
+
<div>slide 2</div>
|
|
126
|
+
<div>slide 3</div>
|
|
127
|
+
</UDExCarousel>
|
|
128
|
+
);
|
|
129
|
+
|
|
130
|
+
cy.get("[udex-carousel]")
|
|
131
|
+
.shadow()
|
|
132
|
+
.find(".udex-carousel__navigation-wrapper")
|
|
133
|
+
.should("not.exist");
|
|
134
|
+
|
|
135
|
+
cy.viewport(375, 812);
|
|
136
|
+
|
|
137
|
+
cy.get("[udex-carousel]")
|
|
138
|
+
.shadow()
|
|
139
|
+
.find(".udex-carousel__navigation-wrapper")
|
|
140
|
+
.should("exist");
|
|
141
|
+
});
|
|
142
|
+
});
|
|
@@ -191,6 +191,68 @@ describe("Date Picker", () => {
|
|
|
191
191
|
});
|
|
192
192
|
});
|
|
193
193
|
|
|
194
|
+
describe("calendar icon aria-haspopup / aria-expanded (a11y)", () => {
|
|
195
|
+
// Updated: accessibility fix moved aria-haspopup/aria-expanded off the input and onto the
|
|
196
|
+
// calendar icon *button*. DatePicker's template passes `_icon-aria-has-popup="grid"` and
|
|
197
|
+
// `_icon-aria-expanded={this._isPopoverOpen ? "true" : "false"}` to the inner UDExTextField.
|
|
198
|
+
// TextField exposes these as the private string props `_iconAriaHasPopup` / `_iconAriaExpanded`,
|
|
199
|
+
// whose `iconAccessibilityAttributes` getter forwards a ButtonAccessibilityAttributes object to
|
|
200
|
+
// the UDExControlButton (a UI5 Button), whose shadow `.ui5-button-root` renders aria-haspopup /
|
|
201
|
+
// aria-expanded. `_isPopoverOpen` (toggled in _afterDropdownOpen/_afterDropdownClose) drives expanded.
|
|
202
|
+
// The previous object-based `_calendarIconAccessibilityAttributes` / `_icon-accessibility-attributes`
|
|
203
|
+
// forwarding no longer exists.
|
|
204
|
+
// Traversal: [udex-date-picker] -> shadow -> [udex-text-field] -> shadow ->
|
|
205
|
+
// [udex-control-button] -> shadow -> .ui5-button-root
|
|
206
|
+
|
|
207
|
+
const buttonRoot = () =>
|
|
208
|
+
cy
|
|
209
|
+
.get("#a11yDatePicker")
|
|
210
|
+
.shadow()
|
|
211
|
+
.find("[udex-text-field]")
|
|
212
|
+
.shadow()
|
|
213
|
+
.find("[udex-control-button]")
|
|
214
|
+
.shadow()
|
|
215
|
+
.find(".ui5-button-root");
|
|
216
|
+
|
|
217
|
+
const nativeInput = () =>
|
|
218
|
+
cy
|
|
219
|
+
.get("#a11yDatePicker")
|
|
220
|
+
.shadow()
|
|
221
|
+
.find("[udex-text-field]")
|
|
222
|
+
.shadow()
|
|
223
|
+
.find("input");
|
|
224
|
+
|
|
225
|
+
beforeEach(() => {
|
|
226
|
+
cy.mount(<UDExDatePicker id="a11yDatePicker" label="Date"></UDExDatePicker>);
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
it("sets aria-haspopup=\"grid\" on the calendar icon button", () => {
|
|
230
|
+
buttonRoot().should("have.attr", "aria-haspopup", "grid");
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
it("does NOT set aria-haspopup on the native input", () => {
|
|
234
|
+
// The accessibility fix removed aria-haspopup from the input entirely.
|
|
235
|
+
nativeInput().should("not.have.attr", "aria-haspopup");
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
it("sets aria-expanded=\"false\" on the calendar icon button when the popover is closed", () => {
|
|
239
|
+
buttonRoot().should("have.attr", "aria-expanded", "false");
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
it("sets aria-expanded=\"true\" on the calendar icon button after opening the calendar", () => {
|
|
243
|
+
// Click the icon button to open the calendar popover; `_isPopoverOpen` flips true
|
|
244
|
+
// in `_afterDropdownOpen`, which re-renders the button with aria-expanded="true".
|
|
245
|
+
cy.get("#a11yDatePicker")
|
|
246
|
+
.shadow()
|
|
247
|
+
.find("[udex-text-field]")
|
|
248
|
+
.shadow()
|
|
249
|
+
.find("[udex-control-button]")
|
|
250
|
+
.click();
|
|
251
|
+
|
|
252
|
+
buttonRoot().should("have.attr", "aria-expanded", "true");
|
|
253
|
+
});
|
|
254
|
+
});
|
|
255
|
+
|
|
194
256
|
describe("calendar timestamp navigation", () => {
|
|
195
257
|
// Regression coverage for the fix that forwards `_calendarTimestamp` to the inner
|
|
196
258
|
// `udex-calendar`. UI5's Calendar guards `timestamp` behind an internal
|