forked from openedx/paragon
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BD-46] feat: refactoring design tokens folders structure (openedx#2069)
* feat: refactoring design tokens folders structure * fix: add missing "type" attribute to tokens and consider token's theme in color-yiq function * docs: update docstring for colorYiq function --------- Co-authored-by: Viktor Rusakov <[email protected]>
- Loading branch information
1 parent
a467d09
commit f24460f
Showing
118 changed files
with
1,383 additions
and
1,261 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
File renamed without changes.
File renamed without changes.
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,30 @@ | ||
{ | ||
"spacing": { | ||
"alert": { | ||
"padding": { | ||
"y": { "value": "1.5rem", "type": "dimension", "source": "$alert-padding-y" }, | ||
"x": { "value": "1.5rem", "type": "dimension", "source": "$alert-padding-x" } | ||
}, | ||
"margin-bottom": { "value": "1rem", "type": "dimension", "source": "$alert-margin-bottom" }, | ||
"actions-gap": { "value": "{spacing.spacer.3}", "type": "dimension", "source": "$alert-actions-gap" }, | ||
"icon-space": { "value": ".8rem", "type": "dimension", "source": "$alert-icon-space" } | ||
} | ||
}, | ||
"typography": { | ||
"alert": { | ||
"font": { | ||
"weight-link": { "value": "{typography.font.weight.normal}", "type": "fontWeight", "source": "$alert-link-font-weight" }, | ||
"size": { "value": ".875rem", "type": "dimension", "source": "$alert-font-size" } | ||
}, | ||
"line-height": { "value": "1.5rem", "type": "dimension", "source": "$alert-line-height" } | ||
} | ||
}, | ||
"size": { | ||
"alert": { | ||
"border": { | ||
"radius": { "value": "{size.border.radius.base}", "type": "dimension", "source": "$alert-border-radius" }, | ||
"width": { "value": "0", "type": "dimension", "source": "$alert-border-width" } | ||
} | ||
} | ||
} | ||
} |
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,25 @@ | ||
{ | ||
"spacing": { | ||
"annotation": { | ||
"padding": { "value": ".5rem", "type": "dimension", "source": "$annotation-padding" }, | ||
"arrow-side": { | ||
"margin": { "value": ".25rem", "type": "dimension", "source": "$annotation-arrow-side-margin" } | ||
} | ||
} | ||
}, | ||
"typography": { | ||
"annotation": { | ||
"font-size": { "value": "{typography.font.size.sm}", "type": "dimension", "source": "$annotation-font-size" }, | ||
"line-height": { "value": "{typography.line-height.sm}", "type": "dimension", "source": "$annotation-line-height" } | ||
} | ||
}, | ||
"size": { | ||
"annotation": { | ||
"arrow-border": { | ||
"width": { "value": ".5rem", "type": "dimension", "source": "$annotation-arrow-border-width" } | ||
}, | ||
"max-width": { "value": "18.75rem", "type": "dimension", "source": "$annotation-max-width" }, | ||
"border-radius": { "value": ".25rem", "type": "dimension", "source": "$annotation-border-radius" } | ||
} | ||
} | ||
} |
5 changes: 0 additions & 5 deletions
5
tokens/src/components/Avatar.json → tokens/src/core/components/Avatar.json
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
File renamed without changes.
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,33 @@ | ||
{ | ||
"spacing": { | ||
"badge": { | ||
"padding": { | ||
"x": { | ||
"base": { "value": ".5rem", "type": "dimension", "source": "$badge-padding-x" }, | ||
"pill": { "value": ".6em", "type": "dimension", "source": "$badge-pill-padding-x" } | ||
}, | ||
"y": { "value": ".125rem", "type": "dimension", "source": "$badge-padding-y" } | ||
} | ||
} | ||
}, | ||
"typography": { | ||
"badge": { | ||
"font": { | ||
"size": { "value": "75%", "type": "percentage", "source": "$badge-font-size" }, | ||
"weight": { "value": "{typography.font.weight.bold}", "type": "fontWeight", "source": "$badge-font-weight" } | ||
} | ||
} | ||
}, | ||
"size": { | ||
"badge": { | ||
"border-radius": { | ||
"base": { "value": ".25rem", "type": "dimension", "source": "$badge-border-radius" }, | ||
"pill": { "value": "10rem", "type": "dimension", "source": "$badge-pill-border-radius" } | ||
}, | ||
"focus-width": { "value": "{size.input.btn.focus-width}", "type": "dimension", "source": "$badge-focus-width" } | ||
} | ||
}, | ||
"transition": { | ||
"badge": { "value": "none", "type": "transition", "source": "$badge-transition" } | ||
} | ||
} |
13 changes: 0 additions & 13 deletions
13
tokens/src/components/Breadcrumb.json → tokens/src/core/components/Breadcrumb.json
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,10 @@ | ||
{ | ||
"spacing": { | ||
"bubble": { | ||
"expandable-padding": { | ||
"y": { "value": "0", "type": "transition", "source": "$bubble-expandable-padding-y" }, | ||
"x": { "value": ".25rem", "type": "transition", "source": "$bubble-expandable-padding-x" } | ||
} | ||
} | ||
} | ||
} |
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
32 changes: 0 additions & 32 deletions
32
tokens/src/components/Card.json → tokens/src/core/components/Card.json
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,37 @@ | ||
{ | ||
"size": { | ||
"carousel": { | ||
"control": { | ||
"width": { | ||
"base": { "value": "15%", "type": "percentage", "source": "$carousel-control-width" }, | ||
"icon": { "value": "20px", "type": "dimension", "source": "$carousel-control-icon-width" } | ||
} | ||
}, | ||
"indicator": { | ||
"width": { "value": "30px", "type": "dimension", "source": "$carousel-indicator-width" }, | ||
"height": { | ||
"base": { "value": "3px", "type": "dimension", "source": "$carousel-indicator-height" }, | ||
"area-hit": { "value": "3px", "type": "dimension", "source": "$carousel-indicator-hit-area-height" } | ||
} | ||
}, | ||
"caption-width": { "value": "70%", "type": "percentage", "source": "$carousel-caption-width" } | ||
} | ||
}, | ||
"spacing": { | ||
"carousel": { | ||
"indicator-spacer": { "value": "3px", "type": "dimension", "source": "$carousel-indicator-spacer" } | ||
} | ||
}, | ||
"transition": { | ||
"carousel": { | ||
"base": { | ||
"value": "transform {transition.carousel.duration} ease-in-out", | ||
"type": "transition", | ||
"source": "$carousel-transition-duration" | ||
}, | ||
"duration": { "value": ".6s", "type": "duration", "source": "$carousel-transition-duration" }, | ||
"indicator": { "value": "opacity .6s ease", "type": "transition", "source": "$carousel-indicator-transition" }, | ||
"control": { "value": "opacity .15s ease", "type": "transition", "source": "$carousel-control-transition" } | ||
} | ||
} | ||
} |
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
File renamed without changes.
File renamed without changes.
19 changes: 0 additions & 19 deletions
19
tokens/src/components/DataTable.json → tokens/src/core/components/DataTable.json
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.