Skip to content

Commit

Permalink
feat!: break semantic tokens into separate files
Browse files Browse the repository at this point in the history
BREAKING CHANGE: removes “light” and “dark” tokens in favor of composite color mode tokens
  • Loading branch information
alisonailea committed Nov 16, 2023
1 parent cfb2114 commit 2db9f56
Show file tree
Hide file tree
Showing 10 changed files with 1,888 additions and 1,709 deletions.
1,709 changes: 0 additions & 1,709 deletions packages/calcite-design-tokens/src/semantic.json

This file was deleted.

62 changes: 62 additions & 0 deletions packages/calcite-design-tokens/src/semantic/border.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"semantic": {
"ui": {
"border": {
"border-radius": {
"value": "{core.border.border-radius.none}",
"type": "borderRadius",
"description": "For backwards compatibility only. This token will be removed from the published tokens in the next major version in favor of removing the \"ui\" level that doesn't match the naming schema.",
"extensions": {
"calcite.deprecated": true
}
}
}
},
"border": {
"radius": {
"default": {
"value": "{core.border.border-radius.1}",
"type": "borderRadius"
},
"base": {
"value": "{core.border.border-radius.none}",
"type": "borderRadius"
},
"sharp": {
"value": "{core.border.border-radius.none}",
"type": "borderRadius"
},
"round": {
"value": "{core.border.border-radius.1}",
"type": "borderRadius"
},
"circular": {
"value": "{core.border.border-radius.half}",
"type": "borderRadius"
},
"pill": {
"value": "{core.border.border-radius.full}",
"type": "borderRadius"
}
},
"width": {
"none": {
"value": "{core.size.default.none}",
"type": "borderWidth"
},
"sm": {
"value": "{core.size.default.0} - 1",
"type": "borderWidth"
},
"md": {
"value": "{core.size.default.0}",
"type": "borderWidth"
},
"lg": {
"value": "{core.size.default.1}",
"type": "borderWidth"
}
}
}
}
}
42 changes: 42 additions & 0 deletions packages/calcite-design-tokens/src/semantic/box-shadow.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"semantic": {
"box-shadow": {
"none": {
"value": "{core.box-shadow.0}",
"type": "boxShadow"
},
"sm": {
"value": ["{core.box-shadow.1}", "{core.box-shadow.2}"],
"type": "boxShadow"
},
"md": {
"value": ["{core.box-shadow.3}", "{core.box-shadow.4}"],
"type": "boxShadow"
},
"0": {
"value": "{core.box-shadow.0}",
"type": "boxShadow",
"description": "For backwards compatibility only. This token will be removed from the published tokens in the next major version in favor of nominal sizing.",
"extensions": {
"calcite.deprecated": true
}
},
"1": {
"value": ["{core.box-shadow.1}", "{core.box-shadow.2}"],
"type": "boxShadow",
"description": "For backwards compatibility only. This token will be removed from the published tokens in the next major version in favor of nominal sizing.",
"extensions": {
"calcite.deprecated": true
}
},
"2": {
"value": ["{core.box-shadow.3}", "{core.box-shadow.4}"],
"type": "boxShadow",
"description": "For backwards compatibility only. This token will be removed from the published tokens in the next major version in favor of nominal sizing.",
"extensions": {
"calcite.deprecated": true
}
}
}
}
}
769 changes: 769 additions & 0 deletions packages/calcite-design-tokens/src/semantic/color.json

Large diffs are not rendered by default.

104 changes: 104 additions & 0 deletions packages/calcite-design-tokens/src/semantic/container-size.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{
"semantic": {
"container-size": {
"height": {
"xxs": {
"value": {
"min": "0",
"max": "{core.breakpoint.default.154}"
},
"type": "breakpoint",
"description": "Small handheld devices and mini-windows"
},
"xs": {
"value": {
"min": "{core.breakpoint.default.154} + 1",
"max": "{core.breakpoint.default.328}"
},
"type": "breakpoint",
"description": "Handheld devices"
},
"sm": {
"value": {
"min": "{core.breakpoint.default.328} + 1",
"max": "{core.breakpoint.default.504}"
},
"type": "breakpoint",
"description": "Small tablets"
},
"md": {
"value": {
"min": "{core.breakpoint.default.504} + 1",
"max": "{core.breakpoint.default.678}"
},
"type": "breakpoint",
"description": "Small laptops"
},
"lg": {
"value": {
"min": "{core.breakpoint.default.678} + 1",
"max": "{core.breakpoint.default.854}"
},
"type": "breakpoint",
"description": "Large laptops and desktop computers"
},
"xl": {
"value": {
"min": "{core.breakpoint.default.854} + 1"
},
"type": "breakpoint",
"description": "Projectors and televisions"
}
},
"width": {
"xxs": {
"value": {
"min": 0,
"max": "{core.breakpoint.default.320}"
},
"type": "breakpoint",
"description": "Small handheld devices and mini-windows"
},
"xs": {
"value": {
"min": "{core.breakpoint.default.320} + 1",
"max": "{core.breakpoint.default.476}"
},
"type": "breakpoint",
"description": "Handheld devices"
},
"sm": {
"value": {
"min": "{core.breakpoint.default.476} + 1",
"max": "{core.breakpoint.default.768}"
},
"type": "breakpoint",
"description": "Small tablets"
},
"md": {
"value": {
"min": "{core.breakpoint.default.768} + 1",
"max": "{core.breakpoint.default.1152}"
},
"type": "breakpoint",
"description": "Small laptops"
},
"lg": {
"value": {
"min": "{core.breakpoint.default.1152} + 1",
"max": "{core.breakpoint.default.1440}"
},
"type": "breakpoint",
"description": "Large laptops and desktop computers"
},
"xl": {
"value": {
"min": "{core.breakpoint.default.1440} + 1"
},
"type": "breakpoint",
"description": "Projectors and televisions"
}
}
}
}
}
Loading

0 comments on commit 2db9f56

Please sign in to comment.