-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui5-carousel): initial implementation (#1159)
- Loading branch information
Showing
21 changed files
with
1,031 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<section | ||
class="ui5-carousel-root" | ||
tabindex="0" | ||
@keydown={{_onkeydown}} | ||
> | ||
<div class="ui5-carousel-overflow-hidden"> | ||
<div class="{{classes.content}}" style="{{styles.content}}"> | ||
{{#each items}} | ||
<div class="{{../classes.item}}"> | ||
{{#each this}} | ||
{{#if this.item}} | ||
<slot name="{{this.item._individualSlot}}" tabindex="{{this.tabIndex}}"></slot> | ||
{{/if}} | ||
{{/each}} | ||
</div> | ||
{{/each}} | ||
</div> | ||
|
||
{{#if arrows.content}} | ||
<div class="ui5-carousel-navigation-arrows"> | ||
<ui5-button | ||
class="ui5-carousel-navigation-button" | ||
icon="slim-arrow-left" | ||
tabindex="-1" | ||
@click={{navigateLeft}} | ||
@keydown={{_onbuttonkeydown}} | ||
></ui5-button> | ||
<ui5-button | ||
class="ui5-carousel-navigation-button" | ||
icon="slim-arrow-right" | ||
tabindex="-1" | ||
@click={{navigateRight}} | ||
@keydown={{_onbuttonkeydown}} | ||
></ui5-button> | ||
</div> | ||
{{/if}} | ||
|
||
{{#unless hideNavigation}} | ||
<div class="{{classes.navigation}}"> | ||
{{#if arrows.navigation}} | ||
<ui5-button | ||
class="ui5-carousel-navigation-button" | ||
icon="slim-arrow-left" | ||
tabindex="-1" | ||
@click={{navigateLeft}} | ||
@keydown={{_onbuttonkeydown}} | ||
></ui5-button> | ||
{{/if}} | ||
|
||
<div class="ui5-carousel-navigation"> | ||
{{#if isPageTypeDots}} | ||
{{#each dots}} | ||
<div | ||
?active="{{this.active}}" | ||
class="ui5-carousel-navigation-dot" | ||
></div> | ||
{{/each}} | ||
{{else}} | ||
<ui5-label>{{currenlySelectedIndexToShow}} {{ofText}} {{items.length}}</ui5-label> | ||
{{/if}} | ||
</div> | ||
|
||
{{#if arrows.navigation}} | ||
<ui5-button | ||
class="ui5-carousel-navigation-button" | ||
icon="slim-arrow-right" | ||
tabindex="-1" | ||
@click={{navigateRight}} | ||
@keydown={{_onbuttonkeydown}} | ||
></ui5-button> | ||
{{/if}} | ||
</div> | ||
{{/unless}} | ||
</div> | ||
</section> |
Oops, something went wrong.