-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tabs): make component responsive (#8616)
**Related Issue:** #6689 ## Summary This improves how `tabs` works at narrow widths where `tab-title`s can't be displayed entirely. ### Notable changes * overflowing `tab-title`s will be clipped * affordances to scroll clipped `tab-titles` forward/backward will be displayed accordingly * selecting a `tab-title` that is partially clipped will be scrolled into view * `tab-title`s can be scrolled via wheel or drag See [design spec](https://www.figma.com/file/JAINbGHSykI8JQCVzOHiSz/Tabs---responsive-design-%5B6689%5D?node-id=862%3A13837&mode=dev) for more details. --------- Co-authored-by: eliza <eli97736@esri.com>
- Loading branch information
Showing
10 changed files
with
883 additions
and
181 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
13 changes: 13 additions & 0 deletions
13
packages/calcite-components/src/components/tab-nav/resources.ts
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 |
---|---|---|
@@ -1,3 +1,16 @@ | ||
export const ICON = { | ||
chevronRight: "chevron-right", | ||
chevronLeft: "chevron-left", | ||
}; | ||
|
||
export const CSS = { | ||
activeIndicatorContainer: "tab-nav-active-indicator-container", | ||
container: "tab-nav", | ||
containerHasEndTabTitleOverflow: "tab-nav--end-overflow", | ||
containerHasStartTabTitleOverflow: "tab-nav--start-overflow", | ||
scrollButton: "scroll-button", | ||
scrollButtonContainer: "scroll-button-container", | ||
scrollBackwardContainerButton: "scroll-button-container--backward", | ||
scrollForwardContainerButton: "scroll-button-container--forward", | ||
tabTitleSlotWrapper: "tab-titles-slot-wrapper", | ||
}; |
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
Oops, something went wrong.