-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(tab-title): add icon start/end custom CSS prop #10871
Merged
jcfranco
merged 5 commits into
dev
from
jcfranco/10497-add-tab-title-icon-start-end-color-css-props
Nov 27, 2024
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
4832009
feat(tab-title): add icon start/end custom CSS prop
jcfranco 87d0dbd
fix prop name to follow schema
jcfranco 5e40766
merge dev
jcfranco c479e6b
fix theming custom vars
jcfranco 90b7213
update tokenValueMap with correct start/end icon color names
jcfranco File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,10 +1,113 @@ | ||
import { html } from "../../support/formatting"; | ||
|
||
export const tabs = html`<calcite-tabs> | ||
<calcite-tab-nav slot="title-group"> | ||
<calcite-tab-title selected>Tab 1 Title</calcite-tab-title> | ||
<calcite-tab-title>Tab 2 Title</calcite-tab-title> | ||
<calcite-tab-title>Tab 3 Title</calcite-tab-title> | ||
<calcite-tab-title>Tab 4 Title</calcite-tab-title> | ||
</calcite-tab-nav> | ||
</calcite-tabs>`; | ||
export const tabsTokens = { | ||
// additional tokens will be added in https://github.com/Esri/calcite-design-system/pull/10532/ | ||
calciteTabEndIconColor: "", | ||
calciteTabStartIconColor: "", | ||
}; | ||
|
||
export const tabs = html` | ||
<style> | ||
calcite-tabs { | ||
width: 400px; | ||
} | ||
</style> | ||
<calcite-tabs position="bottom"> | ||
<calcite-tab-nav slot="title-group"> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right" selected | ||
>Tab 1 Title | ||
</calcite-tab-title> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right">Tab 2 Title</calcite-tab-title> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right">Tab 3 Title</calcite-tab-title> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right">Tab 4 Title</calcite-tab-title> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right">Tab 5 Title</calcite-tab-title> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right">Tab 6 Title</calcite-tab-title> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right">Tab 7 Title</calcite-tab-title> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right">Tab 8 Title</calcite-tab-title> | ||
</calcite-tab-nav> | ||
<calcite-tab selected>Tab 1 Content</calcite-tab> | ||
<calcite-tab>Tab 2 Content</calcite-tab> | ||
<calcite-tab>Tab 3 Content</calcite-tab> | ||
<calcite-tab>Tab 4 Content</calcite-tab> | ||
<calcite-tab>Tab 5 Content</calcite-tab> | ||
<calcite-tab>Tab 6 Content</calcite-tab> | ||
<calcite-tab>Tab 7 Content</calcite-tab> | ||
<calcite-tab>Tab 8 Content</calcite-tab> | ||
</calcite-tabs> | ||
<br /> | ||
<calcite-tabs position="top"> | ||
<calcite-tab-nav slot="title-group"> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right" selected | ||
>Tab 1 Title | ||
</calcite-tab-title> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right">Tab 2 Title</calcite-tab-title> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right">Tab 3 Title</calcite-tab-title> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right">Tab 4 Title</calcite-tab-title> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right">Tab 5 Title</calcite-tab-title> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right">Tab 6 Title</calcite-tab-title> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right">Tab 7 Title</calcite-tab-title> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right">Tab 8 Title</calcite-tab-title> | ||
</calcite-tab-nav> | ||
<calcite-tab selected>Tab 1 Content</calcite-tab> | ||
<calcite-tab>Tab 2 Content</calcite-tab> | ||
<calcite-tab>Tab 3 Content</calcite-tab> | ||
<calcite-tab>Tab 4 Content</calcite-tab> | ||
<calcite-tab>Tab 5 Content</calcite-tab> | ||
<calcite-tab>Tab 6 Content</calcite-tab> | ||
<calcite-tab>Tab 7 Content</calcite-tab> | ||
<calcite-tab>Tab 8 Content</calcite-tab> | ||
</calcite-tabs> | ||
`; | ||
|
||
export const tabsBordered = html` | ||
<style> | ||
calcite-tabs { | ||
width: 400px; | ||
} | ||
</style> | ||
<calcite-tabs bordered position="bottom"> | ||
<calcite-tab-nav slot="title-group"> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right" selected | ||
>Tab 1 Title | ||
</calcite-tab-title> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right">Tab 2 Title</calcite-tab-title> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right">Tab 3 Title</calcite-tab-title> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right">Tab 4 Title</calcite-tab-title> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right">Tab 5 Title</calcite-tab-title> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right">Tab 6 Title</calcite-tab-title> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right">Tab 7 Title</calcite-tab-title> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right">Tab 8 Title</calcite-tab-title> | ||
</calcite-tab-nav> | ||
<calcite-tab selected>Tab 1 Content</calcite-tab> | ||
<calcite-tab>Tab 2 Content</calcite-tab> | ||
<calcite-tab>Tab 3 Content</calcite-tab> | ||
<calcite-tab>Tab 4 Content</calcite-tab> | ||
<calcite-tab>Tab 5 Content</calcite-tab> | ||
<calcite-tab>Tab 6 Content</calcite-tab> | ||
<calcite-tab>Tab 7 Content</calcite-tab> | ||
<calcite-tab>Tab 8 Content</calcite-tab> | ||
</calcite-tabs> | ||
<br /> | ||
<calcite-tabs position="top"> | ||
<calcite-tab-nav slot="title-group"> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right" selected | ||
>Tab 1 Title | ||
</calcite-tab-title> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right">Tab 2 Title</calcite-tab-title> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right">Tab 3 Title</calcite-tab-title> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right">Tab 4 Title</calcite-tab-title> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right">Tab 5 Title</calcite-tab-title> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right">Tab 6 Title</calcite-tab-title> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right">Tab 7 Title</calcite-tab-title> | ||
<calcite-tab-title closable icon-start="arrow-left" icon-end="arrow-right">Tab 8 Title</calcite-tab-title> | ||
</calcite-tab-nav> | ||
<calcite-tab selected>Tab 1 Content</calcite-tab> | ||
<calcite-tab>Tab 2 Content</calcite-tab> | ||
<calcite-tab>Tab 3 Content</calcite-tab> | ||
<calcite-tab>Tab 4 Content</calcite-tab> | ||
<calcite-tab>Tab 5 Content</calcite-tab> | ||
<calcite-tab>Tab 6 Content</calcite-tab> | ||
<calcite-tab>Tab 7 Content</calcite-tab> | ||
<calcite-tab>Tab 8 Content</calcite-tab> | ||
</calcite-tabs> | ||
`; |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this make more sense as
--calcite-tab-icon-start-color
and--calcite-tab-icon-end-color
instead ofstart/end-icon
?That would match the property names of
iconStart
andiconEnd
(notstartIcon
/endIcon
)?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I had originally, but changed to follow accordion-item.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could confirm that - that does seem like it should match the property name? If it is intended to be the opposite of prop name, feel free to ignore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per the naming schema https://github.com/Esri/calcite-design-system/wiki/tokens-naming-schema is should be [system]-[component]-[element]-[type]-[appearance] which would be
--calcite-tab-icon-color-start/end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on ☝️, we'll need to correct
accordion-item
's props too. cc @geospatialem@alisonailea Can you update the schema diagram to include start/end as examples?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added #10894 to next month's December milestone for the
accordion-item
token refactor. cc @alisonaileaThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the schema diagram to include start/end as examples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alisonailea @macandcheese Any additional feedback on the name and PR besides start/end?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM !