Skip to content

Commit

Permalink
feat: #36 support deprecated:false flag for distribution of token data
Browse files Browse the repository at this point in the history
  • Loading branch information
blackfalcon committed Feb 11, 2021
1 parent 4b84b5e commit 9d40067
Show file tree
Hide file tree
Showing 18 changed files with 552 additions and 239 deletions.
18 changes: 17 additions & 1 deletion scripts/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@
"destination": "JSObject--allTokens.js",
"format": "javascript/module",
"filter": {
"public": true
"public": true,
"deprecated": false
}
}
]
Expand All @@ -232,6 +233,21 @@
"format": "css/variables"
}
]
},
"JSObject--deprecatedTokens": {
"transformGroup": "js",
"comment": "File type: JS; data type: JS; filter: deprecated",
"buildPath": "./dist/tokens/",
"transforms": ["attribute/cti", "name/cti/kebab", "color/css"],
"files": [
{
"destination": "JSObject--deprecated.js",
"format": "javascript/module",
"filter": {
"deprecated": true
}
}
]
}
}
}
9 changes: 6 additions & 3 deletions src/animation.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,20 @@
"property": {
"value": "all",
"legacy": true,
"public": true
"public": true,
"deprecated": false
},
"duration": {
"value": "0.3s",
"legacy": true,
"public": true
"public": true,
"deprecated": false
},
"timing": {
"value": "ease-out",
"legacy": true,
"public": true
"public": true,
"deprecated": false
}
}
}
Expand Down
15 changes: 10 additions & 5 deletions src/asset/font.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,32 @@
"familyName": {
"value": "AS Circular",
"legacy": true,
"public": true
"public": true,
"deprecated": false
},
"filename": {
"value": "ASCircularWeb",
"legacy": true,
"public": true
"public": true,
"deprecated": false
},
"weight": {
"light": {
"value": "-Light",
"legacy": true,
"public": true
"public": true,
"deprecated": false
},
"medium": {
"value": "-Medium",
"public": true
"public": true,
"deprecated": false
},
"book": {
"value": "-Book",
"legacy": true,
"public": true
"public": true,
"deprecated": false
}
}
}
Expand Down
9 changes: 6 additions & 3 deletions src/breakpoint.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@
"breakpoint": {
"sm": {
"value": "660px",
"public": true
"public": true,
"deprecated": false
},
"md": {
"value": "1024px",
"public": true
"public": true,
"deprecated": false
},
"lg": {
"value": "1232px",
"public": true
"public": true,
"deprecated": false
}
}
}
27 changes: 18 additions & 9 deletions src/color/alert.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@
"public": true,
"onLight": true,
"usage": "Notification color on light backgrounds",
"wcag": "AAA"
"wcag": "AAA",
"deprecated": false
},
"onDark": {
"value": "{color.brand.breeze.300.value}",
"public": true,
"onDark": true,
"usage": "Notification color on dark backgrounds",
"wcag": "AAA"
"wcag": "AAA",
"deprecated": false
}
},
"warning": {
Expand All @@ -23,7 +25,8 @@
"public": true,
"onLight": true,
"usage": "Warning color on light backgrounds",
"wcag": "AAA"
"wcag": "AAA",
"deprecated": false
}
},
"error": {
Expand All @@ -32,14 +35,16 @@
"public": true,
"onLight": true,
"usage": "Error color on light backgrounds",
"wcag": "AAA"
"wcag": "AAA",
"deprecated": false
},
"onDark": {
"value": "{color.state.error.100.value}",
"public": true,
"onDark": true,
"usage": "Error color on dark backgrounds",
"wcag": "AAA"
"wcag": "AAA",
"deprecated": false
}
},
"success": {
Expand All @@ -48,14 +53,16 @@
"public": true,
"onLight": true,
"usage": "Success color on light backgrounds",
"wcag": "AAA"
"wcag": "AAA",
"deprecated": false
},
"onDark": {
"value": "{color.state.success.100.value}",
"public": true,
"onDark": true,
"usage": "Success color on dark backgrounds",
"wcag": "AAA"
"wcag": "AAA",
"deprecated": false
}
},
"advisory": {
Expand All @@ -64,14 +71,16 @@
"public": true,
"onLight": true,
"usage": "Travel advisory or system maintenance color on light backgrounds",
"wcag": "AAA"
"wcag": "AAA",
"deprecated": false
},
"onDark": {
"value": "{color.brand.goldcoast.100.value}",
"public": true,
"onDark": true,
"usage": "Travel advisory or system maintenance color on dark backgrounds",
"wcag": "AAA"
"wcag": "AAA",
"deprecated": false
}
}
}
Expand Down
12 changes: 8 additions & 4 deletions src/color/background.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,32 @@
"public": true,
"neutral": true,
"usage": "Used for creating light backgrounds",
"wcag": "n/a"
"wcag": "n/a",
"deprecated": false
},
"lighter": {
"value": "{color.base.gray.100.value}",
"public": true,
"neutral": true,
"usage": "Used for creating light backgrounds @ 90% white",
"wcag": "n/a"
"wcag": "n/a",
"deprecated": false
},
"darker": {
"value": "{color.brand.midnight.400.value}",
"public": true,
"neutral": true,
"usage": "Used for creating dark backgrounds",
"wcag": "n/a"
"wcag": "n/a",
"deprecated": false
},
"darkest": {
"value": "{color.brand.midnight.500.value}",
"public": true,
"neutral": true,
"usage": "Used for creating dark backgrounds @ 20% darker",
"wcag": "n/a"
"wcag": "n/a",
"deprecated": false
}
}
}
Expand Down
71 changes: 53 additions & 18 deletions src/color/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,101 +5,136 @@
"value": "ffffff",
"comment": "{comments.color.base.value.comment}",
"legacy": true,
"public": true
"public": true,
"deprecated": false
},
"white-opacity-40": {
"value": "ffffff66",
"comment": "white @ 40%",
"public": true,
"opacity": true
"opacity": true,
"deprecated": false
},
"black": {
"value": "000000",
"comment": "{comments.color.base.value.comment}",
"legacy": true,
"public": true
"public": true,
"deprecated": false
},
"black-opacity-15": {
"value": "00000026",
"comment": "black @ 15%",
"public": true,
"opacity": true
"opacity": true,
"deprecated": false
},
"gray": {
"100": {
"value": "f8f8f8",
"version": "3.0.1",
"public": true,
"neutral": true,
"usage": "Neutral accent",
"wcag": "n/a"
"wcag": "n/a",
"deprecated": true,
"reference": "color-brand-gray-100",
"comment": "{comments.reference.comment} color-brand-gray-100"
},
"200": {
"value": "dbdbdb",
"public": true,
"neutral": true,
"usage": "Neutral accent",
"wcag": "n/a"
"wcag": "n/a",
"deprecated": true,
"version": "3.0.1",
"reference": "color-brand-gray-200",
"comment": "{comments.reference.comment} color-brand-gray-200"
},
"300": {
"value": "b2b2b2",
"public": true,
"neutral": true,
"usage": "Neutral accent",
"wcag": "n/a"
"wcag": "n/a",
"deprecated": true,
"version": "3.0.1",
"reference": "color-brand-gray-300",
"comment": "{comments.reference.comment} color-brand-gray-300"
},
"400": {
"value": "767676",
"public": true,
"neutral": true,
"usage": "Neutral accent",
"wcag": "n/a"
"wcag": "n/a",
"deprecated": true,
"version": "3.0.1",
"reference": "color-brand-gray-400",
"comment": "{comments.reference.comment} color-brand-gray-400"
},
"500": {
"value": "222222",
"public": true,
"neutral": true,
"usage": "Neutral accent",
"wcag": "n/a"
"wcag": "n/a",
"deprecated": true,
"version": "3.0.1",
"reference": "color-brand-gray-500",
"comment": "{comments.reference.comment} color-brand-gray-500"
}
},
"neutral": {
"400": {
"value": "9fabbb",
"comment": "{comments.color.base.value.comment}",
"public": true
"public": true,
"deprecated": true,
"version": "3.0.1",
"reference": "color-brand-neutral-400",
"comment": "{comments.reference.comment} color-brand-neutral-400"
},
"500": {
"value": "626b79",
"comment": "{comments.color.base.value.comment}",
"public": true
"public": true,
"deprecated": true,
"version": "3.0.1",
"reference": "color-brand-neutral-500",
"comment": "{comments.reference.comment} color-brand-neutral-500"
}
}
},
"state": {
"error": {
"100": {
"value": "ff999b",
"public": true
"public": true,
"deprecated": false
},
"500": {
"value": "df0b37",
"public": true
"public": true,
"deprecated": false
}
},
"success": {
"100": {
"value": "69cf96",
"public": true
"public": true,
"deprecated": false
},
"500": {
"value": "00805d",
"public": true
"public": true,
"deprecated": false
}
},
"warning": {
"500": {
"value": "de750c",
"public": true
"public": true,
"deprecated": false
}
}
}
Expand Down

0 comments on commit 9d40067

Please sign in to comment.