@sapudex/web-components 0.117.1 → 0.127.6
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 +3 -0
- package/config/wdio.conf.js +19 -8
- package/dist/AccordionItem.d.ts +2 -1
- package/dist/AccordionItem.js +3 -3
- package/dist/AccordionItem.js.map +1 -1
- package/dist/Avatar.d.ts +12 -0
- package/dist/Avatar.js +22 -1
- package/dist/Avatar.js.map +1 -1
- package/dist/AvatarGroup.d.ts +28 -0
- package/dist/AvatarGroup.js +126 -0
- package/dist/AvatarGroup.js.map +1 -0
- package/dist/Dropdown.d.ts +11 -1
- package/dist/Dropdown.js +15 -3
- package/dist/Dropdown.js.map +1 -1
- package/dist/FilterMenu.d.ts +7 -1
- package/dist/FilterMenu.js +4 -1
- package/dist/FilterMenu.js.map +1 -1
- package/dist/Footer.d.ts +27 -0
- package/dist/Footer.js +27 -36
- package/dist/Footer.js.map +1 -1
- package/dist/HeroBanner.js +3 -0
- package/dist/HeroBanner.js.map +1 -1
- package/dist/MastheadItem.d.ts +1 -0
- package/dist/MastheadItem.js +5 -11
- package/dist/MastheadItem.js.map +1 -1
- package/dist/MastheadShell.d.ts +8 -0
- package/dist/MastheadShell.js +10 -0
- package/dist/MastheadShell.js.map +1 -1
- package/dist/MessageStrip.js +1 -1
- package/dist/MessageStrip.js.map +1 -1
- package/dist/Pagination.d.ts +3 -0
- package/dist/Pagination.js +16 -4
- package/dist/Pagination.js.map +1 -1
- package/dist/PasswordField.d.ts +14 -4
- package/dist/PasswordField.js +24 -15
- package/dist/PasswordField.js.map +1 -1
- package/dist/PhoneNumberField.d.ts +6 -0
- package/dist/PhoneNumberField.js +6 -1
- package/dist/PhoneNumberField.js.map +1 -1
- package/dist/RatingBar.d.ts +53 -0
- package/dist/RatingBar.js +96 -0
- package/dist/RatingBar.js.map +1 -0
- package/dist/Review.d.ts +71 -0
- package/dist/Review.js +108 -0
- package/dist/Review.js.map +1 -0
- package/dist/Search.d.ts +49 -1
- package/dist/Search.js +32 -3
- package/dist/Search.js.map +1 -1
- package/dist/SearchableListBase.d.ts +1 -1
- package/dist/SearchableListBase.js +1 -1
- package/dist/SearchableListBase.js.map +1 -1
- package/dist/SecondaryNavigation.d.ts +8 -8
- package/dist/SecondaryNavigation.js +51 -39
- package/dist/SecondaryNavigation.js.map +1 -1
- package/dist/SecondaryNavigationItem.d.ts +1 -1
- package/dist/SecondaryNavigationItem.js +15 -5
- package/dist/SecondaryNavigationItem.js.map +1 -1
- package/dist/SecondaryNavigationItemBase.d.ts +16 -2
- package/dist/SecondaryNavigationItemBase.js +27 -1
- package/dist/SecondaryNavigationItemBase.js.map +1 -1
- package/dist/SecondaryNavigationSubItem.d.ts +2 -1
- package/dist/SecondaryNavigationSubItem.js +5 -2
- package/dist/SecondaryNavigationSubItem.js.map +1 -1
- package/dist/SelectBox.js +2 -0
- package/dist/SelectBox.js.map +1 -1
- package/dist/StatusBadge.d.ts +5 -5
- package/dist/StatusBadge.js.map +1 -1
- package/dist/Switch.d.ts +1 -0
- package/dist/Switch.js +3 -0
- package/dist/Switch.js.map +1 -1
- package/dist/Tab.d.ts +8 -0
- package/dist/Tab.js +3 -0
- package/dist/Tab.js.map +1 -1
- package/dist/TabNavigation.d.ts +20 -20
- package/dist/TabNavigation.js +82 -101
- package/dist/TabNavigation.js.map +1 -1
- package/dist/Tag.d.ts +13 -6
- package/dist/Tag.js +34 -20
- package/dist/Tag.js.map +1 -1
- package/dist/TextArea.d.ts +1 -1
- package/dist/TextArea.js +3 -0
- package/dist/TextArea.js.map +1 -1
- package/dist/TextField.d.ts +9 -0
- package/dist/TextField.js +16 -0
- package/dist/TextField.js.map +1 -1
- package/dist/Tooltip.d.ts +2 -2
- package/dist/Tooltip.js +3 -3
- package/dist/Tooltip.js.map +1 -1
- package/dist/assets/bundle.esm-7d53f4f2.js +314 -0
- package/dist/assets/messagebundle_en-6dcc9ab4.js +1 -0
- package/dist/assets/parameters-bundle.css-de55cf62.js +2 -0
- package/dist/css/themes/AccordionItem.css +1 -1
- package/dist/css/themes/Avatar.css +1 -1
- package/dist/css/themes/Badge.css +1 -1
- package/dist/css/themes/Divider.css +1 -1
- package/dist/css/themes/Footer.css +1 -1
- package/dist/css/themes/HeroBanner.css +1 -1
- package/dist/css/themes/MastheadShell.css +1 -1
- package/dist/css/themes/Modal.css +1 -1
- package/dist/css/themes/Pagination.css +1 -1
- package/dist/css/themes/PhoneNumberField.css +1 -1
- package/dist/css/themes/RatingBar.css +1 -0
- package/dist/css/themes/RatingIndicator.css +1 -1
- package/dist/css/themes/Review.css +1 -0
- package/dist/css/themes/Search.css +1 -1
- package/dist/css/themes/SecondaryNavigation.css +1 -1
- package/dist/css/themes/SecondaryNavigationItem.css +1 -1
- package/dist/css/themes/SelectBox.css +1 -1
- package/dist/css/themes/Slider.css +1 -1
- package/dist/css/themes/StepInput.css +1 -1
- package/dist/css/themes/TabNavigation.css +1 -1
- package/dist/css/themes/Tag.css +1 -1
- package/dist/css/themes/TextField.css +1 -1
- package/dist/css/themes/overrides/@ui5/webcomponents/sap_glow/parameters-bundle.css +1 -1
- package/dist/custom-elements-internal.json +670 -100
- package/dist/custom-elements.json +594 -67
- package/dist/data/CountryListISO3166.js +162 -162
- package/dist/data/CountryListISO3166.js.map +1 -1
- package/dist/generated/assets/i18n/messagebundle_en.json +1 -1
- package/dist/generated/assets/themes/overrides/@ui5/webcomponents/sap_glow/parameters-bundle.css.json +1 -1
- package/dist/generated/i18n/i18n-defaults.d.ts +9 -1
- package/dist/generated/i18n/i18n-defaults.js +13 -5
- package/dist/generated/i18n/i18n-defaults.js.map +1 -1
- package/dist/generated/templates/AccordionItemTemplate.lit.js +1 -1
- package/dist/generated/templates/AccordionItemTemplate.lit.js.map +1 -1
- package/dist/generated/templates/DatePickerTemplate.lit.js +1 -1
- package/dist/generated/templates/DatePickerTemplate.lit.js.map +1 -1
- package/dist/generated/templates/DropdownTemplate.lit.js +2 -2
- package/dist/generated/templates/DropdownTemplate.lit.js.map +1 -1
- package/dist/generated/templates/FilterMenuTemplate.lit.js +1 -1
- package/dist/generated/templates/FilterMenuTemplate.lit.js.map +1 -1
- package/dist/generated/templates/FooterTemplate.lit.js +26 -28
- package/dist/generated/templates/FooterTemplate.lit.js.map +1 -1
- package/dist/generated/templates/HeroBannerTemplate.lit.js +9 -8
- package/dist/generated/templates/HeroBannerTemplate.lit.js.map +1 -1
- package/dist/generated/templates/MastheadItemTemplate.lit.js +3 -3
- package/dist/generated/templates/MastheadItemTemplate.lit.js.map +1 -1
- package/dist/generated/templates/MastheadShellTemplate.lit.js +2 -2
- package/dist/generated/templates/MastheadShellTemplate.lit.js.map +1 -1
- package/dist/generated/templates/PaginationTemplate.lit.js +1 -1
- package/dist/generated/templates/PaginationTemplate.lit.js.map +1 -1
- package/dist/generated/templates/PasswordFieldTemplate.lit.js +1 -2
- package/dist/generated/templates/PasswordFieldTemplate.lit.js.map +1 -1
- package/dist/generated/templates/PhoneNumberFieldTemplate.lit.js +3 -3
- package/dist/generated/templates/PhoneNumberFieldTemplate.lit.js.map +1 -1
- package/dist/generated/templates/RatingBarTemplate.lit.d.ts +4 -0
- package/dist/generated/templates/RatingBarTemplate.lit.js +6 -0
- package/dist/generated/templates/RatingBarTemplate.lit.js.map +1 -0
- package/dist/generated/templates/ReviewTemplate.lit.d.ts +4 -0
- package/dist/generated/templates/ReviewTemplate.lit.js +10 -0
- package/dist/generated/templates/ReviewTemplate.lit.js.map +1 -0
- package/dist/generated/templates/SearchSuggestionsTemplate.lit.js +1 -1
- package/dist/generated/templates/SearchSuggestionsTemplate.lit.js.map +1 -1
- package/dist/generated/templates/SearchTemplate.lit.js +7 -7
- package/dist/generated/templates/SearchTemplate.lit.js.map +1 -1
- package/dist/generated/templates/SecondaryNavigationItemTemplate.lit.js +3 -3
- package/dist/generated/templates/SecondaryNavigationItemTemplate.lit.js.map +1 -1
- package/dist/generated/templates/SecondaryNavigationSubItemTemplate.lit.js +5 -4
- package/dist/generated/templates/SecondaryNavigationSubItemTemplate.lit.js.map +1 -1
- package/dist/generated/templates/SecondaryNavigationTemplate.lit.js +3 -3
- package/dist/generated/templates/SecondaryNavigationTemplate.lit.js.map +1 -1
- package/dist/generated/templates/SelectBoxTemplate.lit.js +2 -2
- package/dist/generated/templates/SelectBoxTemplate.lit.js.map +1 -1
- package/dist/generated/templates/SwitchTemplate.lit.js +2 -2
- package/dist/generated/templates/SwitchTemplate.lit.js.map +1 -1
- package/dist/generated/templates/TabInOverflowTemplate.lit.js +2 -2
- package/dist/generated/templates/TabInOverflowTemplate.lit.js.map +1 -1
- package/dist/generated/templates/TabNavigationPopoverTemplate.lit.js +1 -1
- package/dist/generated/templates/TabNavigationPopoverTemplate.lit.js.map +1 -1
- package/dist/generated/templates/TabNavigationTemplate.lit.js +2 -2
- package/dist/generated/templates/TabNavigationTemplate.lit.js.map +1 -1
- package/dist/generated/templates/TagTemplate.lit.js +9 -3
- package/dist/generated/templates/TagTemplate.lit.js.map +1 -1
- package/dist/generated/templates/TextAreaTemplate.lit.js +1 -1
- package/dist/generated/templates/TextAreaTemplate.lit.js.map +1 -1
- package/dist/generated/templates/TextFieldTemplate.lit.js +2 -2
- package/dist/generated/templates/TextFieldTemplate.lit.js.map +1 -1
- package/dist/generated/templates/TooltipTemplate.lit.js +1 -1
- package/dist/generated/templates/TooltipTemplate.lit.js.map +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/Avatar.css.js +1 -1
- package/dist/generated/themes/Avatar.css.js.map +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/Divider.css.js +1 -1
- package/dist/generated/themes/Divider.css.js.map +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/HeroBanner.css.js +1 -1
- package/dist/generated/themes/HeroBanner.css.js.map +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/Modal.css.js +1 -1
- package/dist/generated/themes/Modal.css.js.map +1 -1
- package/dist/generated/themes/Pagination.css.js +1 -1
- package/dist/generated/themes/Pagination.css.js.map +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/RatingBar.css.js +9 -0
- package/dist/generated/themes/RatingBar.css.js.map +1 -0
- package/dist/generated/themes/RatingIndicator.css.js +1 -1
- package/dist/generated/themes/RatingIndicator.css.js.map +1 -1
- package/dist/generated/themes/Review.css.d.ts +3 -0
- package/dist/generated/themes/Review.css.js +9 -0
- package/dist/generated/themes/Review.css.js.map +1 -0
- package/dist/generated/themes/Search.css.js +1 -1
- package/dist/generated/themes/Search.css.js.map +1 -1
- package/dist/generated/themes/SecondaryNavigation.css.js +1 -1
- package/dist/generated/themes/SecondaryNavigation.css.js.map +1 -1
- package/dist/generated/themes/SecondaryNavigationItem.css.js +1 -1
- package/dist/generated/themes/SecondaryNavigationItem.css.js.map +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/Slider.css.js +1 -1
- package/dist/generated/themes/Slider.css.js.map +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/TabNavigation.css.js +1 -1
- package/dist/generated/themes/TabNavigation.css.js.map +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/TextField.css.js +1 -1
- package/dist/generated/themes/TextField.css.js.map +1 -1
- package/dist/generated/themes/overrides/@ui5/webcomponents/sap_glow/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/overrides/@ui5/webcomponents/sap_glow/parameters-bundle.css.js.map +1 -1
- package/dist/i18n/messagebundle.properties +28 -4
- package/dist/i18n/messagebundle_en.properties +12 -4
- package/dist/vscode.html-custom-data.json +112 -17
- package/dist/web-types.json +215 -33
- package/package.json +8 -8
- package/src/AccordionItem.hbs +1 -4
- package/src/AccordionItem.ts +5 -4
- package/src/Avatar.ts +24 -1
- package/src/AvatarGroup.ts +135 -0
- package/src/DatePicker.hbs +0 -1
- package/src/Dropdown.hbs +5 -2
- package/src/Dropdown.ts +24 -3
- package/src/FilterMenu.hbs +3 -0
- package/src/FilterMenu.ts +10 -2
- package/src/Footer.hbs +12 -37
- package/src/Footer.ts +64 -51
- package/src/HeroBanner.hbs +18 -14
- package/src/HeroBanner.ts +3 -0
- package/src/MastheadItem.hbs +3 -3
- package/src/MastheadItem.ts +10 -4
- package/src/MastheadShell.hbs +4 -0
- package/src/MastheadShell.ts +18 -0
- package/src/MessageStrip.ts +1 -1
- package/src/Pagination.hbs +4 -2
- package/src/Pagination.ts +19 -4
- package/src/PasswordField.hbs +6 -17
- package/src/PasswordField.ts +31 -23
- package/src/PhoneNumberField.hbs +8 -3
- package/src/PhoneNumberField.ts +11 -1
- package/src/RatingBar.hbs +11 -0
- package/src/RatingBar.ts +113 -0
- package/src/Review.hbs +44 -0
- package/src/Review.ts +140 -0
- package/src/Search.hbs +19 -14
- package/src/Search.ts +72 -2
- package/src/SearchSuggestions.hbs +1 -0
- package/src/SearchableListBase.ts +1 -1
- package/src/SecondaryNavigation.hbs +5 -1
- package/src/SecondaryNavigation.ts +67 -49
- package/src/SecondaryNavigationItem.hbs +3 -2
- package/src/SecondaryNavigationItem.ts +15 -5
- package/src/SecondaryNavigationItemBase.ts +41 -3
- package/src/SecondaryNavigationSubItem.hbs +13 -10
- package/src/SecondaryNavigationSubItem.ts +6 -2
- package/src/SelectBox.hbs +75 -76
- package/src/SelectBox.ts +2 -0
- package/src/StatusBadge.ts +2 -2
- package/src/Switch.hbs +3 -3
- package/src/Switch.ts +4 -0
- package/src/Tab.ts +10 -0
- package/src/TabInOverflow.hbs +3 -2
- package/src/TabNavigation.hbs +12 -10
- package/src/TabNavigation.ts +92 -116
- package/src/TabNavigationPopover.hbs +1 -0
- package/src/Tag.hbs +60 -26
- package/src/Tag.ts +54 -34
- package/src/TextArea.hbs +3 -4
- package/src/TextArea.ts +3 -0
- package/src/TextField.hbs +40 -36
- package/src/TextField.ts +24 -0
- package/src/Tooltip.hbs +2 -2
- package/src/Tooltip.ts +4 -4
- package/src/data/CountryListISO3166.ts +162 -162
- package/src/generated/i18n/i18n-defaults.ts +2 -2
- package/src/generated/templates/AccordionItemTemplate.lit.ts +1 -1
- package/src/generated/templates/DatePickerTemplate.lit.ts +1 -1
- package/src/generated/templates/DropdownTemplate.lit.ts +2 -2
- package/src/generated/templates/FilterMenuTemplate.lit.ts +1 -1
- package/src/generated/templates/FooterTemplate.lit.ts +26 -28
- package/src/generated/templates/HeroBannerTemplate.lit.ts +9 -8
- package/src/generated/templates/MastheadItemTemplate.lit.ts +3 -3
- package/src/generated/templates/MastheadShellTemplate.lit.ts +2 -2
- package/src/generated/templates/PaginationTemplate.lit.ts +1 -1
- package/src/generated/templates/PasswordFieldTemplate.lit.ts +1 -2
- package/src/generated/templates/PhoneNumberFieldTemplate.lit.ts +3 -3
- package/src/generated/templates/RatingBarTemplate.lit.ts +11 -0
- package/src/generated/templates/ReviewTemplate.lit.ts +15 -0
- package/src/generated/templates/SearchSuggestionsTemplate.lit.ts +1 -1
- package/src/generated/templates/SearchTemplate.lit.ts +7 -7
- package/src/generated/templates/SecondaryNavigationItemTemplate.lit.ts +3 -3
- package/src/generated/templates/SecondaryNavigationSubItemTemplate.lit.ts +5 -4
- package/src/generated/templates/SecondaryNavigationTemplate.lit.ts +3 -3
- package/src/generated/templates/SelectBoxTemplate.lit.ts +2 -2
- package/src/generated/templates/SwitchTemplate.lit.ts +2 -2
- package/src/generated/templates/TabInOverflowTemplate.lit.ts +2 -2
- package/src/generated/templates/TabNavigationPopoverTemplate.lit.ts +1 -1
- package/src/generated/templates/TabNavigationTemplate.lit.ts +2 -2
- package/src/generated/templates/TagTemplate.lit.ts +9 -3
- package/src/generated/templates/TextAreaTemplate.lit.ts +1 -1
- package/src/generated/templates/TextFieldTemplate.lit.ts +2 -2
- package/src/generated/templates/TooltipTemplate.lit.ts +1 -1
- package/src/generated/themes/AccordionItem.css.ts +1 -1
- package/src/generated/themes/Avatar.css.ts +1 -1
- package/src/generated/themes/Badge.css.ts +1 -1
- package/src/generated/themes/Divider.css.ts +1 -1
- package/src/generated/themes/Footer.css.ts +1 -1
- package/src/generated/themes/HeroBanner.css.ts +1 -1
- package/src/generated/themes/MastheadShell.css.ts +1 -1
- package/src/generated/themes/Modal.css.ts +1 -1
- package/src/generated/themes/Pagination.css.ts +1 -1
- package/src/generated/themes/PhoneNumberField.css.ts +1 -1
- package/src/generated/themes/RatingBar.css.ts +13 -0
- package/src/generated/themes/RatingIndicator.css.ts +1 -1
- package/src/generated/themes/Review.css.ts +13 -0
- package/src/generated/themes/Search.css.ts +1 -1
- package/src/generated/themes/SecondaryNavigation.css.ts +1 -1
- package/src/generated/themes/SecondaryNavigationItem.css.ts +1 -1
- package/src/generated/themes/SelectBox.css.ts +1 -1
- package/src/generated/themes/Slider.css.ts +1 -1
- package/src/generated/themes/StepInput.css.ts +1 -1
- package/src/generated/themes/TabNavigation.css.ts +1 -1
- package/src/generated/themes/Tag.css.ts +1 -1
- package/src/generated/themes/TextField.css.ts +1 -1
- package/src/generated/themes/overrides/@ui5/webcomponents/sap_glow/parameters-bundle.css.ts +1 -1
- package/src/i18n/messagebundle.properties +28 -4
- package/src/i18n/messagebundle_en.properties +12 -4
- package/src/themes/AccordionItem.css +6 -4
- package/src/themes/Avatar.css +24 -7
- package/src/themes/Badge.css +1 -1
- package/src/themes/Divider.css +6 -2
- package/src/themes/Footer.css +93 -168
- package/src/themes/HeroBanner.css +52 -24
- package/src/themes/MastheadShell.css +25 -29
- package/src/themes/Modal.css +6 -0
- package/src/themes/Pagination.css +7 -0
- package/src/themes/PhoneNumberField.css +1 -0
- package/src/themes/RatingBar.css +52 -0
- package/src/themes/Review.css +196 -0
- package/src/themes/Search.css +37 -25
- package/src/themes/SecondaryNavigation.css +33 -4
- package/src/themes/SecondaryNavigationItem.css +3 -2
- package/src/themes/SelectBox.css +17 -24
- package/src/themes/StepInput.css +5 -2
- package/src/themes/TabNavigation.css +7 -1
- package/src/themes/Tag.css +180 -148
- package/src/themes/TextField.css +75 -55
- package/dist/assets/bundle.esm-f65ae7da.js +0 -315
- package/dist/assets/messagebundle_en-7249941b.js +0 -1
- package/dist/assets/parameters-bundle.css-76ef62fa.js +0 -2
- package/dist/css/themes/PasswordField.css +0 -1
- package/dist/generated/themes/PasswordField.css.js +0 -9
- package/dist/generated/themes/PasswordField.css.js.map +0 -1
- package/src/generated/themes/PasswordField.css.ts +0 -13
- package/src/themes/PasswordField.css +0 -29
- /package/dist/generated/themes/{PasswordField.css.d.ts → RatingBar.css.d.ts} +0 -0
package/src/HeroBanner.hbs
CHANGED
|
@@ -1,30 +1,34 @@
|
|
|
1
1
|
<div class="{{heroBannerClasses}}" part="wrapper" style="background-color: {{wrapperBackgroundColor}}">
|
|
2
|
-
|
|
3
|
-
{{#if hasCustomBackgroundPicture}}
|
|
4
|
-
<slot name="backgroundPicture"></slot>
|
|
5
|
-
{{else if hasBackgroundImage}}
|
|
6
|
-
<picture>
|
|
7
|
-
<img loading="{{backgroundImageLoadingStrategy}}" src="{{backgroundImage}}" part="background-image" class="udex-hero-banner__background-image" alt="{{backgroundImageLabel}}" />
|
|
8
|
-
</picture>
|
|
9
|
-
{{/if}}
|
|
10
|
-
|
|
11
|
-
{{#if hasBackgroundVideo}}
|
|
2
|
+
{{#if hasBackgroundVideo}}
|
|
12
3
|
<div class="udex-hero-banner__background-video-wrapper" tabindex="0" @keydown={{_handleKeydown}} >
|
|
13
4
|
<video ?autoplay="{{shouldVideoAutoplay}}" muted loop playsinline part="background-video" class="udex-hero-banner__background-video" alt="{{backgroundVideoLabel}}">
|
|
14
5
|
<source src="{{backgroundVideo}}" type="video/mp4" />
|
|
15
6
|
</video>
|
|
16
7
|
<div class="udex-hero-banner__background-video-overlay"></div>
|
|
8
|
+
{{#if hasBackgroundImage}}
|
|
9
|
+
<picture>
|
|
10
|
+
<img loading="{{backgroundImageLoadingStrategy}}" src="{{backgroundImage}}" part="background-image" class="udex-hero-banner__background-image" alt="{{backgroundImageLabel}}" />
|
|
11
|
+
</picture>
|
|
12
|
+
{{/if}}
|
|
17
13
|
{{> hero-content}}
|
|
18
14
|
<button class="udex-hero-banner__media-button" aria-label="Play / Pause button" role="button" @click={{_toggleMediaButton}}>
|
|
19
15
|
<ui5-icon name={{mediaButtonIconName}}></ui5-icon>
|
|
20
16
|
</button>
|
|
21
17
|
</div>
|
|
22
18
|
{{else}}
|
|
23
|
-
<div class="udex-hero-
|
|
24
|
-
|
|
19
|
+
<div class="udex-hero-banner__container">
|
|
20
|
+
{{#if hasCustomBackgroundPicture}}
|
|
21
|
+
<slot name="backgroundPicture"></slot>
|
|
22
|
+
{{else if hasBackgroundImage}}
|
|
23
|
+
<picture>
|
|
24
|
+
<img loading="{{backgroundImageLoadingStrategy}}" src="{{backgroundImage}}" part="background-image" class="udex-hero-banner__background-image" alt="{{backgroundImageLabel}}" />
|
|
25
|
+
</picture>
|
|
26
|
+
{{/if}}
|
|
27
|
+
<div class="udex-hero-banner__content-container">
|
|
28
|
+
{{> hero-content}}
|
|
29
|
+
</div>
|
|
25
30
|
</div>
|
|
26
|
-
|
|
27
|
-
</div>
|
|
31
|
+
{{/if}}
|
|
28
32
|
</div>
|
|
29
33
|
|
|
30
34
|
{{#*inline "hero-content"}}
|
package/src/HeroBanner.ts
CHANGED
|
@@ -187,6 +187,9 @@ class UDExHeroBanner extends UI5Element {
|
|
|
187
187
|
|
|
188
188
|
onEnterDOM() {
|
|
189
189
|
if (this.backgroundVideo) {
|
|
190
|
+
if (this.backgroundColor) {
|
|
191
|
+
this.style.setProperty("--udexHeroBannerBackgroundVideoColor", `${this.wrapperBackgroundColor}`);
|
|
192
|
+
}
|
|
190
193
|
this._video?.addEventListener("play", () => {
|
|
191
194
|
this._calculateMediaButtonState();
|
|
192
195
|
});
|
package/src/MastheadItem.hbs
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
target="{{target}}"
|
|
8
8
|
href="{{href}}"
|
|
9
9
|
aria-labelledby="{{ariaLabelledBy}}"
|
|
10
|
-
aria-label="{{
|
|
10
|
+
aria-label="{{accessibleLabel}}">
|
|
11
11
|
{{> content}}
|
|
12
12
|
</a>
|
|
13
13
|
{{else if isProfileBtn}}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
aria-expanded="{{selected}}"
|
|
18
18
|
aria-labelledby="{{ariaLabelledBy}}"
|
|
19
19
|
aria-haspopup="{{hasDropdownSlot}}"
|
|
20
|
-
aria-label="{{
|
|
20
|
+
aria-label="{{accessibleLabel}}"
|
|
21
21
|
@keydown="{{handleKeyDown}}"
|
|
22
22
|
@click="{{onClick}}">
|
|
23
23
|
{{> content}}
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
aria-expanded="{{selected}}"
|
|
34
34
|
aria-labelledby="{{ariaLabelledBy}}"
|
|
35
35
|
aria-haspopup="{{hasDropdownSlot}}"
|
|
36
|
-
aria-label="{{
|
|
36
|
+
aria-label="{{accessibleLabel}}"
|
|
37
37
|
@keydown="{{handleKeyDown}}"
|
|
38
38
|
@click="{{onClick}}">
|
|
39
39
|
{{> content}}
|
package/src/MastheadItem.ts
CHANGED
|
@@ -18,6 +18,8 @@ import MastheadItemTemplate from "./generated/templates/MastheadItemTemplate.lit
|
|
|
18
18
|
// Styles
|
|
19
19
|
import MastheadItemCss from "./generated/themes/MastheadItem.css.js";
|
|
20
20
|
|
|
21
|
+
const breakpointSizeM: number = 1279;
|
|
22
|
+
|
|
21
23
|
export interface IMastheadItem {
|
|
22
24
|
text?: string;
|
|
23
25
|
selected?: boolean;
|
|
@@ -164,7 +166,7 @@ class UDExMastheadItem extends UI5Element implements IMastheadItem {
|
|
|
164
166
|
* @public
|
|
165
167
|
*/
|
|
166
168
|
@property({ type: String, defaultValue: "" })
|
|
167
|
-
iconAlt?: string
|
|
169
|
+
iconAlt?: string;
|
|
168
170
|
|
|
169
171
|
/**
|
|
170
172
|
* Hide active border for item
|
|
@@ -369,20 +371,24 @@ class UDExMastheadItem extends UI5Element implements IMastheadItem {
|
|
|
369
371
|
return this.hasDropdownSlot && !this.isProfileBtn && !this.icon.length;
|
|
370
372
|
}
|
|
371
373
|
|
|
372
|
-
get isProfileBtn():boolean {
|
|
374
|
+
get isProfileBtn(): boolean {
|
|
373
375
|
return this.getAttribute("slot") === "profile";
|
|
374
376
|
}
|
|
375
377
|
|
|
376
|
-
get isExploreBtn():boolean {
|
|
378
|
+
get isExploreBtn(): boolean {
|
|
377
379
|
return this.getAttribute("slot") === "exploreSAP";
|
|
378
380
|
}
|
|
379
381
|
|
|
382
|
+
get accessibleLabel(): string {
|
|
383
|
+
return this.accessibleName || this.innerText;
|
|
384
|
+
}
|
|
385
|
+
|
|
380
386
|
get isMenuItem(): boolean {
|
|
381
387
|
return true;
|
|
382
388
|
}
|
|
383
389
|
|
|
384
390
|
get isMobile(): boolean {
|
|
385
|
-
return window.innerWidth <
|
|
391
|
+
return window.innerWidth < breakpointSizeM;
|
|
386
392
|
}
|
|
387
393
|
}
|
|
388
394
|
|
package/src/MastheadShell.hbs
CHANGED
|
@@ -23,7 +23,10 @@
|
|
|
23
23
|
{{#if _isSearchVisible}}
|
|
24
24
|
<div class="udex-masthead-shell__search-container">
|
|
25
25
|
<slot name="search"></slot>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="udex-masthead-shell__btn-holder">
|
|
26
28
|
<udex-control-button
|
|
29
|
+
class="udex-masthead-shell__close-search-btn"
|
|
27
30
|
size="Small"
|
|
28
31
|
icon="decline"
|
|
29
32
|
accessible-name="{{closeButtonAccessibleName}}"
|
|
@@ -94,6 +97,7 @@
|
|
|
94
97
|
<a
|
|
95
98
|
role="link"
|
|
96
99
|
href="{{homeUrl}}"
|
|
100
|
+
title="{{logoTitle}}"
|
|
97
101
|
target="_self"
|
|
98
102
|
aria-label="{{homepageAriaLabel}}"
|
|
99
103
|
class="udex-masthead-shell__logo udex-masthead-shell__logo--link">
|
package/src/MastheadShell.ts
CHANGED
|
@@ -23,6 +23,7 @@ import MastheadShellTemplate from "./generated/templates/MastheadShellTemplate.l
|
|
|
23
23
|
import MastheadShellCss from "./generated/themes/MastheadShell.css.js";
|
|
24
24
|
|
|
25
25
|
const mobileMenuActiveClass: string = "udex-masthead-shell_mobile-menu-open";
|
|
26
|
+
const breakpointSizeM: number = 1279;
|
|
26
27
|
/**
|
|
27
28
|
* @class
|
|
28
29
|
*
|
|
@@ -173,6 +174,15 @@ class UDExMastheadShell extends UI5Element {
|
|
|
173
174
|
@property({ type: String, defaultValue: "" })
|
|
174
175
|
logoUrl!: string;
|
|
175
176
|
|
|
177
|
+
/**
|
|
178
|
+
* Defines the Logo default title
|
|
179
|
+
*
|
|
180
|
+
* @default ""
|
|
181
|
+
* @public
|
|
182
|
+
*/
|
|
183
|
+
@property({ type: String, defaultValue: "" })
|
|
184
|
+
logoTitle!: string;
|
|
185
|
+
|
|
176
186
|
/**
|
|
177
187
|
* Defines a site label. It will be displayed next to a logo.
|
|
178
188
|
*
|
|
@@ -267,6 +277,10 @@ class UDExMastheadShell extends UI5Element {
|
|
|
267
277
|
}
|
|
268
278
|
|
|
269
279
|
_handleResize(): void {
|
|
280
|
+
if (this.isMobileView) {
|
|
281
|
+
this._isSearchVisible = false;
|
|
282
|
+
}
|
|
283
|
+
|
|
270
284
|
if (this._shouldHandleResize) {
|
|
271
285
|
this._mobileMenu?.showFirstLevelMenu();
|
|
272
286
|
this.removeOverflowBody();
|
|
@@ -478,6 +492,10 @@ class UDExMastheadShell extends UI5Element {
|
|
|
478
492
|
get hasMobileMenuButtons(): boolean {
|
|
479
493
|
return !!this.mobileMenu.length;
|
|
480
494
|
}
|
|
495
|
+
|
|
496
|
+
get isMobileView(): boolean {
|
|
497
|
+
return window.innerWidth <= breakpointSizeM;
|
|
498
|
+
}
|
|
481
499
|
}
|
|
482
500
|
|
|
483
501
|
UDExMastheadShell.define();
|
package/src/MessageStrip.ts
CHANGED
|
@@ -189,7 +189,7 @@ class UDExMessageStrip extends MessageStrip {
|
|
|
189
189
|
}
|
|
190
190
|
|
|
191
191
|
get _closeButtonText() {
|
|
192
|
-
return this.getTranslation(MESSAGE_STRIP_CLOSE_BUTTON)
|
|
192
|
+
return `${this.textStatus ?? ""} ${this.getTranslation(MESSAGE_STRIP_CLOSE_BUTTON)}`;
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
get iconProvided() {
|
package/src/Pagination.hbs
CHANGED
|
@@ -17,8 +17,9 @@
|
|
|
17
17
|
<udex-button
|
|
18
18
|
?disabled="{{prevButtonDisbled}}"
|
|
19
19
|
accessible-name="{{previousPageAccessibleName}}"
|
|
20
|
+
tooltip="{{previousBtnTooltip}}"
|
|
20
21
|
size="Large"
|
|
21
|
-
icon="
|
|
22
|
+
icon="navigation-left-arrow"
|
|
22
23
|
design="Tertiary"
|
|
23
24
|
@click="{{setPrevPage}}"
|
|
24
25
|
></udex-button>
|
|
@@ -45,7 +46,8 @@
|
|
|
45
46
|
{{/if}}
|
|
46
47
|
<li class="udex-pagination__item--next udex-pagination__item">
|
|
47
48
|
<udex-button
|
|
48
|
-
?disabled="{{nextButtonDisbled}}"
|
|
49
|
+
?disabled="{{nextButtonDisbled}}"
|
|
50
|
+
tooltip="{{nextBtnTooltip}}"
|
|
49
51
|
accessible-name="{{nextPageAccessibleName}}"
|
|
50
52
|
size="Large"
|
|
51
53
|
icon="navigation-right-arrow"
|
package/src/Pagination.ts
CHANGED
|
@@ -6,6 +6,7 @@ import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
|
|
|
6
6
|
import Integer from "@ui5/webcomponents-base/dist/types/Integer.js";
|
|
7
7
|
import { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
8
8
|
import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
9
|
+
import { isDesktop } from "@ui5/webcomponents-base/dist/Device.js";
|
|
9
10
|
import {
|
|
10
11
|
OF,
|
|
11
12
|
PAGINATION_PAGE,
|
|
@@ -141,6 +142,12 @@ class UDExPagination extends UI5Element {
|
|
|
141
142
|
this._mobileDisplayNumber = 5;
|
|
142
143
|
}
|
|
143
144
|
|
|
145
|
+
onEnterDOM() {
|
|
146
|
+
if (isDesktop()) {
|
|
147
|
+
this.setAttribute("desktop", "");
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
144
151
|
get nextButtonDisbled(): boolean {
|
|
145
152
|
return this.currentPageIndex + 1 === this.pages;
|
|
146
153
|
}
|
|
@@ -209,11 +216,19 @@ class UDExPagination extends UI5Element {
|
|
|
209
216
|
return `${UDExPagination.i18nBundle.getText(PREVIOUS_PAGE)}. ${this.activatePageAccessibleText} ${this.currentPageIndex}`;
|
|
210
217
|
}
|
|
211
218
|
|
|
219
|
+
get previousBtnTooltip(): string {
|
|
220
|
+
return !this.prevButtonDisbled ? `${UDExPagination.i18nBundle.getText(PREVIOUS_PAGE)}` : "";
|
|
221
|
+
}
|
|
222
|
+
|
|
212
223
|
get nextPageAccessibleName(): string {
|
|
213
224
|
if (this.pages && this.currentPageIndex === (this.pages - 1)) { return UDExPagination.i18nBundle.getText(NEXT_PAGE); }
|
|
214
225
|
return `${UDExPagination.i18nBundle.getText(NEXT_PAGE)}. ${this.activatePageAccessibleText} ${this.currentPageIndex + 2}`;
|
|
215
226
|
}
|
|
216
227
|
|
|
228
|
+
get nextBtnTooltip(): string {
|
|
229
|
+
return !this.nextButtonDisbled ? `${UDExPagination.i18nBundle.getText(NEXT_PAGE)}` : "";
|
|
230
|
+
}
|
|
231
|
+
|
|
217
232
|
get pagination(): Page[] {
|
|
218
233
|
return this.setupPages(this.pages);
|
|
219
234
|
}
|
|
@@ -312,8 +327,8 @@ class UDExPagination extends UI5Element {
|
|
|
312
327
|
|
|
313
328
|
for (let index = startIndex; index < endIndex && index < pages; index++) {
|
|
314
329
|
const isCurrent = index === this.currentPageIndex;
|
|
315
|
-
const accessibleName = isCurrent ? `
|
|
316
|
-
${this.pageAccessibleName} ${index + 1} ${UDExPagination.i18nBundle.getText(OF)} ${this.pages}, ${UDExPagination.i18nBundle.getText(SELECTED)}` : `
|
|
330
|
+
const accessibleName = isCurrent ? `
|
|
331
|
+
${this.pageAccessibleName} ${index + 1} ${UDExPagination.i18nBundle.getText(OF)} ${this.pages}, ${UDExPagination.i18nBundle.getText(SELECTED)}` : `
|
|
317
332
|
${this.pageAccessibleName} ${index + 1} ${UDExPagination.i18nBundle.getText(OF)} ${this.pages}`;
|
|
318
333
|
pagesCollection.push({
|
|
319
334
|
index,
|
|
@@ -330,8 +345,8 @@ class UDExPagination extends UI5Element {
|
|
|
330
345
|
const pagesCollection = [];
|
|
331
346
|
for (let index = 0; index < pages; index++) {
|
|
332
347
|
const isCurrent = index === this.currentPageIndex;
|
|
333
|
-
const accessibleName = isCurrent ? `
|
|
334
|
-
${this.pageAccessibleName} ${index + 1} ${UDExPagination.i18nBundle.getText(OF)} ${this.pages}, ${UDExPagination.i18nBundle.getText(SELECTED)}` : `
|
|
348
|
+
const accessibleName = isCurrent ? `
|
|
349
|
+
${this.pageAccessibleName} ${index + 1} ${UDExPagination.i18nBundle.getText(OF)} ${this.pages}, ${UDExPagination.i18nBundle.getText(SELECTED)}` : `
|
|
335
350
|
${this.pageAccessibleName} ${index + 1} ${UDExPagination.i18nBundle.getText(OF)} ${this.pages}`;
|
|
336
351
|
pagesCollection.push({
|
|
337
352
|
index,
|
package/src/PasswordField.hbs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
<
|
|
2
|
-
<udex-text-field
|
|
1
|
+
<udex-text-field
|
|
3
2
|
type={{type}}
|
|
4
3
|
value="{{value}}"
|
|
5
4
|
label="{{passwordLabel}}"
|
|
@@ -11,18 +10,8 @@
|
|
|
11
10
|
supporting-text="{{supportingText}}"
|
|
12
11
|
accessible-name="{{accessibleName}}"
|
|
13
12
|
accessible-name-ref="{{accessibleNameRef}}"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
design="Default"
|
|
20
|
-
class="udex-password-field__button udex-password-field__button_show"
|
|
21
|
-
icon={{icon}}
|
|
22
|
-
size="Large"
|
|
23
|
-
accessible-name="{{showButtonTooltip}}"
|
|
24
|
-
tooltip={{showButtonTooltip}}
|
|
25
|
-
@click="{{handleShowPassword}}"
|
|
26
|
-
></udex-control-button>
|
|
27
|
-
{{/if}}
|
|
28
|
-
</div>
|
|
13
|
+
accessible-icon-name="{{showButtonTooltip}}"
|
|
14
|
+
show-button-tooltip="{{showButtonTooltip}}"
|
|
15
|
+
@ui5-click-icon="{{handleShowPassword}}"
|
|
16
|
+
icon="{{iconButton}}"
|
|
17
|
+
></udex-text-field>
|
package/src/PasswordField.ts
CHANGED
|
@@ -6,15 +6,19 @@ import Integer from "@ui5/webcomponents-base/dist/types/Integer.js";
|
|
|
6
6
|
import { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
7
7
|
import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
8
8
|
import UDExTextField from "./TextField.js";
|
|
9
|
-
import UDExControlButton from "./ControlButton.js";
|
|
10
9
|
import ValueState from "./types/common.js";
|
|
11
10
|
|
|
12
11
|
import PasswordFieldTemplate from "./generated/templates/PasswordFieldTemplate.lit.js";
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
export enum InputType {
|
|
14
|
+
Password = "password",
|
|
15
|
+
Text = "text",
|
|
16
|
+
}
|
|
17
17
|
|
|
18
|
+
export enum IconType {
|
|
19
|
+
Hide = "hide",
|
|
20
|
+
Show = "show",
|
|
21
|
+
}
|
|
18
22
|
/**
|
|
19
23
|
* @class
|
|
20
24
|
*
|
|
@@ -36,19 +40,19 @@ import PasswordFieldCss from "./generated/themes/PasswordField.css.js";
|
|
|
36
40
|
@customElement({
|
|
37
41
|
tag: "udex-password-field",
|
|
38
42
|
renderer: litRender,
|
|
39
|
-
styles: PasswordFieldCss,
|
|
40
43
|
template: PasswordFieldTemplate,
|
|
41
|
-
dependencies: [UDExTextField
|
|
44
|
+
dependencies: [UDExTextField],
|
|
42
45
|
})
|
|
46
|
+
|
|
43
47
|
class UDExPasswordField extends UI5Element {
|
|
44
48
|
/**
|
|
45
49
|
* Defines supporting text under the input field.
|
|
46
50
|
*
|
|
47
51
|
* @default ""
|
|
48
|
-
* @
|
|
52
|
+
* @private
|
|
49
53
|
*/
|
|
50
|
-
@property({ type: String, noAttribute: true, defaultValue:
|
|
51
|
-
type!:
|
|
54
|
+
@property({ type: String, noAttribute: true, defaultValue: InputType.Password })
|
|
55
|
+
type!: InputType;
|
|
52
56
|
|
|
53
57
|
/**
|
|
54
58
|
* Defines whether the component is in disabled state.
|
|
@@ -109,8 +113,8 @@ class UDExPasswordField extends UI5Element {
|
|
|
109
113
|
* @public
|
|
110
114
|
*/
|
|
111
115
|
|
|
112
|
-
@property({ type: ValueState, defaultValue:
|
|
113
|
-
valueState!:
|
|
116
|
+
@property({ type: ValueState, defaultValue: ValueState.Standard })
|
|
117
|
+
valueState!: ValueState;
|
|
114
118
|
|
|
115
119
|
/**
|
|
116
120
|
* Defines supporting text under the input field.
|
|
@@ -139,8 +143,8 @@ class UDExPasswordField extends UI5Element {
|
|
|
139
143
|
* @private
|
|
140
144
|
*/
|
|
141
145
|
|
|
142
|
-
@property({ type: String, noAttribute: true, defaultValue:
|
|
143
|
-
icon!:
|
|
146
|
+
@property({ type: String, noAttribute: true, defaultValue: IconType.Show })
|
|
147
|
+
icon!: IconType;
|
|
144
148
|
|
|
145
149
|
/**
|
|
146
150
|
* Defines the inner stored show password button tooltip.
|
|
@@ -149,7 +153,7 @@ class UDExPasswordField extends UI5Element {
|
|
|
149
153
|
* @public
|
|
150
154
|
*/
|
|
151
155
|
|
|
152
|
-
@property({ type: String
|
|
156
|
+
@property({ type: String })
|
|
153
157
|
showButtonTooltip!: string;
|
|
154
158
|
|
|
155
159
|
/**
|
|
@@ -176,7 +180,7 @@ class UDExPasswordField extends UI5Element {
|
|
|
176
180
|
* @default ""
|
|
177
181
|
* @public
|
|
178
182
|
*/
|
|
179
|
-
@property()
|
|
183
|
+
@property({ type: String })
|
|
180
184
|
accessibleName!: string;
|
|
181
185
|
|
|
182
186
|
/**
|
|
@@ -184,7 +188,7 @@ class UDExPasswordField extends UI5Element {
|
|
|
184
188
|
* @default ""
|
|
185
189
|
* @public
|
|
186
190
|
*/
|
|
187
|
-
@property({
|
|
191
|
+
@property({ type: String })
|
|
188
192
|
accessibleNameRef!: string;
|
|
189
193
|
|
|
190
194
|
static i18nBundle: I18nBundle;
|
|
@@ -193,20 +197,24 @@ class UDExPasswordField extends UI5Element {
|
|
|
193
197
|
UDExPasswordField.i18nBundle = await getI18nBundle("sap-ui-webcomponents-bundle");
|
|
194
198
|
}
|
|
195
199
|
|
|
196
|
-
handleShowPassword() {
|
|
197
|
-
const isPassword = this.type ===
|
|
200
|
+
handleShowPassword(): void {
|
|
201
|
+
const isPassword = this.type === InputType.Password;
|
|
198
202
|
|
|
199
|
-
this.icon = isPassword ?
|
|
200
|
-
this.type = isPassword ?
|
|
203
|
+
this.icon = isPassword ? IconType.Hide : IconType.Show;
|
|
204
|
+
this.type = isPassword ? InputType.Text : InputType.Password;
|
|
201
205
|
}
|
|
202
206
|
|
|
203
|
-
get passwordLabel() {
|
|
204
|
-
return `${this.label} ${this.showAsterisk
|
|
207
|
+
get passwordLabel(): string {
|
|
208
|
+
return `${this.label} ${this.showAsterisk ? "*" : ""}`;
|
|
205
209
|
}
|
|
206
210
|
|
|
207
|
-
get renderShowButton() {
|
|
211
|
+
get renderShowButton(): boolean {
|
|
208
212
|
return !this.disabled && !this.readonly && !this.displayonly && this.showButtonEnabled;
|
|
209
213
|
}
|
|
214
|
+
|
|
215
|
+
get iconButton(): IconType | null {
|
|
216
|
+
return this.renderShowButton ? this.icon : null;
|
|
217
|
+
}
|
|
210
218
|
}
|
|
211
219
|
|
|
212
220
|
UDExPasswordField.define();
|
package/src/PhoneNumberField.hbs
CHANGED
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
>
|
|
7
7
|
{{#if label}}
|
|
8
8
|
<label
|
|
9
|
+
id="udex-phone-number-field__label"
|
|
9
10
|
class="udex-phone-number-field__label"
|
|
10
|
-
for="phone"
|
|
11
|
+
for="{{this._id}}-phone"
|
|
11
12
|
>
|
|
12
13
|
{{label}}
|
|
13
14
|
{{#if required}}
|
|
@@ -17,7 +18,7 @@
|
|
|
17
18
|
{{/if}}
|
|
18
19
|
<udex-dropdown
|
|
19
20
|
class="udex-phone-number-field__dropdown"
|
|
20
|
-
id="
|
|
21
|
+
id="{{this._id}}_dropdown-menu"
|
|
21
22
|
horizontal-align="Left"
|
|
22
23
|
height="{{height}}"
|
|
23
24
|
>
|
|
@@ -54,7 +55,11 @@
|
|
|
54
55
|
?disabled="{{isButtonDisabled}}"
|
|
55
56
|
aria-disabled="{{isButtonDisabled}}"
|
|
56
57
|
aria-haspopup="true"
|
|
58
|
+
aria-label="{{countrySelectorAriaLabel}}"
|
|
57
59
|
accessible-name="{{countrySelectorAriaLabel}}"
|
|
60
|
+
aria-expanded="{{_dropdownExpanded}}"
|
|
61
|
+
aria-controls="{{this._id}}_dropdown-menu"
|
|
62
|
+
role="combobox"
|
|
58
63
|
@click="{{onClick}}"
|
|
59
64
|
>
|
|
60
65
|
<div class="udex-phone-number-field__open-button-text">
|
|
@@ -70,7 +75,7 @@
|
|
|
70
75
|
{{/unless}}
|
|
71
76
|
<input
|
|
72
77
|
class="udex-phone-number-field__input"
|
|
73
|
-
id="phone"
|
|
78
|
+
id="{{this._id}}-phone"
|
|
74
79
|
type="tel"
|
|
75
80
|
.value="{{value}}"
|
|
76
81
|
placeholder="{{phoneFormat}}"
|
package/src/PhoneNumberField.ts
CHANGED
|
@@ -199,6 +199,14 @@ class UDExPhoneNumberField extends UI5Element {
|
|
|
199
199
|
@property({ type: String, noAttribute: true, defaultValue: OpenButtonIcon.iconDown })
|
|
200
200
|
buttonIcon!: string;
|
|
201
201
|
|
|
202
|
+
/**
|
|
203
|
+
* Defines the open button icon
|
|
204
|
+
*
|
|
205
|
+
* @private
|
|
206
|
+
*/
|
|
207
|
+
@property({ type: Boolean, noAttribute: true })
|
|
208
|
+
_dropdownExpanded!: boolean;
|
|
209
|
+
|
|
202
210
|
/**
|
|
203
211
|
* Defines the phone format of the input
|
|
204
212
|
*
|
|
@@ -267,7 +275,7 @@ class UDExPhoneNumberField extends UI5Element {
|
|
|
267
275
|
}
|
|
268
276
|
|
|
269
277
|
get countrySelectorAriaLabel() {
|
|
270
|
-
return this.accessibleName || UDExPhoneNumberField.i18nBundle.getText(COUNTRY_SELECT)
|
|
278
|
+
return this.accessibleName || `${this.label} ${UDExPhoneNumberField.i18nBundle.getText(COUNTRY_SELECT)}`;
|
|
271
279
|
}
|
|
272
280
|
|
|
273
281
|
get countryIso() {
|
|
@@ -391,9 +399,11 @@ class UDExPhoneNumberField extends UI5Element {
|
|
|
391
399
|
|
|
392
400
|
handleDropdownOpen() {
|
|
393
401
|
this.buttonIcon = OpenButtonIcon.iconUp;
|
|
402
|
+
this._dropdownExpanded = true;
|
|
394
403
|
}
|
|
395
404
|
handleDropdownClose() {
|
|
396
405
|
this.buttonIcon = OpenButtonIcon.iconDown;
|
|
406
|
+
this._dropdownExpanded = false;
|
|
397
407
|
}
|
|
398
408
|
|
|
399
409
|
autoSelectCountry(value: string) {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<div class="udex-rating-bar__container">
|
|
2
|
+
<div aria-hidden="true" class="udex-rating-bar__rating">{{validatedRating}}</div>
|
|
3
|
+
<ui5-icon role="img" aria-labelledby="ratingDescription" name="favorite" class="udex-rating__icon"></ui5-icon>
|
|
4
|
+
<div class="udex-rating-bar__track">
|
|
5
|
+
<div class="udex-rating-bar__progress"></div>
|
|
6
|
+
</div>
|
|
7
|
+
{{#if showPercentage}}
|
|
8
|
+
<div role="note" class="udex-rating-bar__percentage">{{validatedPercentage}}</div>
|
|
9
|
+
{{/if}}
|
|
10
|
+
<span id="ratingDescription" class="hidden-text">{{_ratingDescription}}</span>
|
|
11
|
+
</div>
|
package/src/RatingBar.ts
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
2
|
+
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
3
|
+
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
4
|
+
import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
|
|
5
|
+
import I18nBundle, { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
6
|
+
import Icon from "@ui5/webcomponents/dist/Icon.js";
|
|
7
|
+
import Integer from "@ui5/webcomponents-base/dist/types/Integer.js";
|
|
8
|
+
import { STARS } from "./generated/i18n/i18n-defaults.js";
|
|
9
|
+
import RatingBarTemplate from "./generated/templates/RatingBarTemplate.lit.js";
|
|
10
|
+
|
|
11
|
+
// Styles
|
|
12
|
+
import RatingBarCss from "./generated/themes/RatingBar.css.js";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @class
|
|
16
|
+
*
|
|
17
|
+
* <h3 class="comment-api-title">Overview</h3>
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
* <h3>Usage</h3>
|
|
21
|
+
*
|
|
22
|
+
* For the <code>udex-rating-bar</code>
|
|
23
|
+
* <h3>ES6 Module Import</h3>
|
|
24
|
+
*
|
|
25
|
+
* <code>import "@udex/web-components/dist/RatingBar.js";</code>
|
|
26
|
+
*
|
|
27
|
+
* @constructor
|
|
28
|
+
* @extends UI5Element
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
@customElement({
|
|
32
|
+
tag: "udex-rating-bar",
|
|
33
|
+
renderer: litRender,
|
|
34
|
+
styles: RatingBarCss,
|
|
35
|
+
template: RatingBarTemplate,
|
|
36
|
+
dependencies: [Icon],
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
class UDExRatingBar extends UI5Element {
|
|
40
|
+
/**
|
|
41
|
+
* Defines the associated rating.
|
|
42
|
+
*
|
|
43
|
+
* @default 0
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
@property({ type: Number, defaultValue: 0, validator: Integer })
|
|
47
|
+
rating!: number;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Defines the percentage.
|
|
51
|
+
*
|
|
52
|
+
* @default 0
|
|
53
|
+
* @public
|
|
54
|
+
*/
|
|
55
|
+
@property({ type: Number, defaultValue: 0, validator: Integer })
|
|
56
|
+
percentage!: number;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Defines wether the percentage is shown or not.
|
|
60
|
+
*
|
|
61
|
+
* @default false
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
@property({ type: Boolean })
|
|
65
|
+
showPercentage!: boolean;
|
|
66
|
+
|
|
67
|
+
static i18nBundle: I18nBundle;
|
|
68
|
+
|
|
69
|
+
_minRating: number = 0;
|
|
70
|
+
_maxRating: number = 5;
|
|
71
|
+
_minPercentage: number = 0;
|
|
72
|
+
_maxPercentage: number = 100;
|
|
73
|
+
|
|
74
|
+
static async onDefine() {
|
|
75
|
+
UDExRatingBar.i18nBundle = await getI18nBundle("@ui5/webcomponents");
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
onBeforeRendering(): void {
|
|
79
|
+
this.style.setProperty("--udex-rating-bar-progress", `${this.percentage}%`);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
get validatedRating(): number {
|
|
83
|
+
if (this.rating > this._maxRating) {
|
|
84
|
+
console.warn("UDEx RatingBar: The rating shouldn't be more than 5.");
|
|
85
|
+
return this._maxRating;
|
|
86
|
+
}
|
|
87
|
+
if (this.rating < this._minRating) {
|
|
88
|
+
console.warn("UDEx RatingBar: The rating shouldn't be less than 0.");
|
|
89
|
+
return this._minRating;
|
|
90
|
+
}
|
|
91
|
+
return this.rating;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
get validatedPercentage(): string {
|
|
95
|
+
if (this.percentage > this._maxPercentage) {
|
|
96
|
+
console.warn("UDEx RatingBar: The percentage shouldn't be more than 100.");
|
|
97
|
+
return `${this._maxPercentage}%`;
|
|
98
|
+
}
|
|
99
|
+
if (this.percentage < this._minPercentage) {
|
|
100
|
+
console.warn("UDEx RatingBar: The percentage shouldn't be less than 0.");
|
|
101
|
+
return `${this._minPercentage}%`;
|
|
102
|
+
}
|
|
103
|
+
return `${this.percentage}%`;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
get _ratingDescription(): string {
|
|
107
|
+
return `${this.validatedRating} ${UDExRatingBar.i18nBundle.getText(STARS)}`;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
UDExRatingBar.define();
|
|
112
|
+
|
|
113
|
+
export default UDExRatingBar;
|