-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sdds-acore/theme-builder): Fetching task was created. Theme file…
… deserialization was implemented. Color, gradients, typography and dimen tokens generators were implemented for view system.
- Loading branch information
Showing
29 changed files
with
1,346 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,17 @@ | ||
import com.sdds.plugin.themebuilder.ThemeBuilderExtension | ||
import com.sdds.plugin.themebuilder.ThemeBuilderTarget | ||
|
||
@Suppress("DSL_SCOPE_VIOLATION") | ||
plugins { | ||
id("convention.android-lib") | ||
id(libs.plugins.themebuilder.get().pluginId) | ||
} | ||
|
||
android { | ||
namespace = "com.sdds.playground.themebuilder" | ||
} | ||
|
||
configure<ThemeBuilderExtension> { | ||
themeUrl.set("file://${projectDir.path}/new_theme_scheme.json") | ||
target.set(ThemeBuilderTarget.COMPOSE.value) | ||
} |
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,170 @@ | ||
{ | ||
"name" : "theme-name", | ||
"version" : "0.0.1", | ||
"platforms": ["ios", "android", "web"], | ||
"colors" : { | ||
"category": ["text", "surfaces", "backgrounds"], | ||
"mode" : ["dark", "light"], | ||
"subcategory" : ["on-dark", "on-light", "default", "inverse"] | ||
}, | ||
"shadows": { | ||
"directions": ["up", "down"], | ||
"kind": ["hard", "soft"], | ||
"sizes": ["l", "m", "s", "xs", "xxs"] | ||
}, | ||
"typography": { | ||
"sizes": ["l", "m", "s", "xs", "xxs"], | ||
"kind": ["display", "body", "text", "h1", "h2", "h3", "h4", "h5"], | ||
"screen": ["screen-l", "screen-m", "screen-s"] | ||
}, | ||
"tokens": [ | ||
{ | ||
"displayName": "surfaceAccent", | ||
"name": "dark.inverse.surface.accent", | ||
"platform": "android", | ||
"tags" : [ | ||
"dark", | ||
"surface", | ||
"inverse" | ||
], | ||
"type": "sweep-gradient", | ||
"value" : { | ||
"locations": [ 0, 0.3, 0.7, 1 ], | ||
"colors" : ["#000", "#fff"], | ||
"startAngle": 0, | ||
"endAngle" : 360 | ||
}, | ||
"description": "Цвет текста", | ||
"enabled": true | ||
}, | ||
{ | ||
"displayName": "surfaceTransparentAccent", | ||
"name": "dark.on-light.surface.transparent-accent", | ||
"platform": "android", | ||
"tags" : [ | ||
"dark", | ||
"surface", | ||
"on-light" | ||
], | ||
"type": "color", | ||
"value" : { | ||
"origin": "#FFFFFF1F" | ||
}, | ||
"description": "Прозрачная акцентная поверхность", | ||
"enabled": true | ||
}, | ||
{ | ||
"displayName": "textAccent", | ||
"name": "on-dark.text.accent", | ||
"platform": "web", | ||
"tags": [ | ||
"dark", | ||
"on-dark", | ||
"text", | ||
"gradient" | ||
], | ||
"type": "linear-gradient", | ||
"value" : { | ||
"origin": "linear-gradient(122.62deg, #4817C1 0%, #C505D6 100%)" | ||
}, | ||
"description": "Цвет текста", | ||
"enabled": true | ||
}, | ||
{ | ||
"displayName": "downHardL", | ||
"name": "down.hard.l", | ||
"platform": "android", | ||
"tags": [ | ||
"down", | ||
"hard", | ||
"l" | ||
], | ||
"type": "shadow", | ||
"value": { | ||
"color": "#000", | ||
"elevation": 16 | ||
}, | ||
"description": "тень android", | ||
"enabled": true | ||
}, | ||
{ | ||
"name": "downHardL", | ||
"tags": [ | ||
"down", | ||
"hard", | ||
"l", | ||
"ios" | ||
], | ||
"platform": "ios", | ||
"type": "shadow", | ||
"value": { | ||
"color": "#000", | ||
"offset": { "width": 0, "height": 2 }, | ||
"opacity": 0.15, | ||
"radius": 1.5 | ||
}, | ||
"description": "Тень ios", | ||
"enabled": true | ||
}, | ||
{ | ||
"name": "downHardL", | ||
"platform": "web", | ||
"tags": [ | ||
"down", | ||
"hard", | ||
"l", | ||
"web" | ||
], | ||
"type": "shadow", | ||
"value": { | ||
"origin" : "0px 6px 12px rgba(0, 0, 0, 0.12)" | ||
}, | ||
"description": "Тень web", | ||
"enabled": true | ||
}, | ||
{ | ||
"displayName": "displayL", | ||
"name": "screen-l.display.l", | ||
"platform": "android", | ||
"tags": [ | ||
"screen-l", | ||
"display", | ||
"l" | ||
], | ||
"type": "typography", | ||
"value": { | ||
"fontFamily": "sans", | ||
"fontWeight": 300, | ||
"fontStyle": "normal", | ||
"textSize": 128, | ||
"letterSpacing": 0.02, | ||
"lineHeight": 128 | ||
}, | ||
"description": "шрифт android", | ||
"enabled": true | ||
}, | ||
{ | ||
"displayName": "displayL", | ||
"name": "screen-m.display.l", | ||
"platform": "android", | ||
"tags": [ | ||
"screen-m", | ||
"display", | ||
"l" | ||
], | ||
"type": "typography", | ||
"value": { | ||
"fontFamily": "sans", | ||
"fontWeight": 300, | ||
"fontStyle": "normal", | ||
"textSize": 96, | ||
"letterSpacing": 0.02, | ||
"lineHeight": 96 | ||
}, | ||
"description": "шрифт android", | ||
"enabled": true | ||
} | ||
] | ||
} | ||
|
||
|
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,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
|
||
</resources> |
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,139 @@ | ||
{ | ||
"name" : "theme-name", | ||
"version" : "0.0.2", | ||
"platforms": ["ios", "android", "web"], | ||
"colors" : { | ||
"category": ["text", "surfaces", "backgrounds"], | ||
"mode" : ["dark", "light"], | ||
"subcategory" : ["on-dark", "on-light", "default", "inverse"], | ||
"naming": "subcategory.category.name", | ||
"tokens" : [ | ||
{ | ||
"displayName": "surfaceAccent", | ||
"name": "inverse.surface.accent", | ||
"platform": "ios", | ||
"tags" : [ | ||
"dark", | ||
"surface", | ||
"inverse" | ||
], | ||
"value" : { | ||
"type": "angular-gradient", | ||
"locations": [ 0, 0.3, 0.7, 1 ], | ||
"colors" : ["#000", "#fff"], | ||
"startAngle": 0, | ||
"endAngle" : 360 | ||
}, | ||
"description": "Цвет текста", | ||
"enabled": true | ||
}, | ||
{ | ||
"displayName": "surfaceTransparentAccent", | ||
"name": "on-light.surface.transparent-accent", | ||
"platform": "ios", | ||
"tags" : [ | ||
"dark", | ||
"surface", | ||
"on-light" | ||
], | ||
"value" : { | ||
"origin": "#FFFFFF1F" | ||
}, | ||
"description": "Прозрачная акцентная поверхность", | ||
"enabled": true | ||
}, | ||
{ | ||
"displayName": "textAccent", | ||
"name": "on-dark.text.accent", | ||
"platform": "web", | ||
"tags": [ | ||
"dark", | ||
"on-dark", | ||
"text" | ||
], | ||
"value" : "linear-gradient(122.62deg, #4817C1 0%, #C505D6 100%)", | ||
"description": "Цвет текста", | ||
"enabled": true | ||
} | ||
] | ||
}, | ||
|
||
"shadows": { | ||
"directions": ["up", "down"], | ||
"types": ["hard", "soft"], | ||
"sizes": ["l", "m", "s", "xs", "xxs"], | ||
"tokens" : [ | ||
{ | ||
"displayName": "downHardL", | ||
"name": "down.hard.l", | ||
"tags": [ | ||
"down", | ||
"hard", | ||
"l" | ||
], | ||
"value": { | ||
"color": "#000", | ||
"elevation": 16 | ||
}, | ||
"description": "тень android", | ||
"enabled": true | ||
}, | ||
{ | ||
"name": "downHardL", | ||
"tags": [ | ||
"down", | ||
"hard", | ||
"l", | ||
"ios" | ||
], | ||
"value": { | ||
"color": "#000", | ||
"offset": { "width": 0, "height": 2 }, | ||
"opacity": 0.15, | ||
"radius": 1.5 | ||
}, | ||
"description": "Тень ios", | ||
"enabled": true | ||
}, | ||
{ | ||
"name": "downHardL", | ||
"tags": [ | ||
"down", | ||
"hard", | ||
"l", | ||
"web" | ||
], | ||
"value": "0px 6px 12px rgba(0, 0, 0, 0.12)", | ||
"description": "Тень web", | ||
"enabled": true | ||
} | ||
] | ||
}, | ||
|
||
"typography": { | ||
"sizes": ["l", "m", "s", "xs", "xxs"], | ||
"type": ["display", "body", "text", "h1", "h2", "h3", "h4", "h5"], | ||
"screen": ["sceen-l", "screen-m", "screen-s"], | ||
"tokens": [ | ||
{ | ||
"displayName": "displayL", | ||
"name": "screen-l.display.l", | ||
"platform": "android", | ||
"tags": [ | ||
"screen-l", | ||
"display", | ||
"l" | ||
], | ||
"value": { | ||
"font-family": "#000", | ||
"fontSize": 16, | ||
"lineSpacing": 0.02 | ||
}, | ||
"description": "шрифт android", | ||
"enabled": true | ||
} | ||
] | ||
} | ||
} | ||
|
||
|
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.