Skip to content
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

Modify tokens updater to support color aliases #226

Merged
merged 3 commits into from
Dec 2, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add missing selected tokens in switch
Carlos Viteri committed Nov 26, 2024
commit d9005e5744a85580ffd0b40d67eafdd16eeb002a
9 changes: 6 additions & 3 deletions dist/docsite/android/colors.xml
Original file line number Diff line number Diff line change
@@ -84,9 +84,12 @@
<color name="cdr_color_background_surface_secondary">#fff7f5f3</color>
<color name="cdr_color_background_surface_brand_spruce">#ff1f513f</color>
<color name="cdr_color_background_surface_sale">#ffc7370f</color>
<color name="cdr_color_background_switch_default_rest">#ff4b4a48</color>
<color name="cdr_color_background_switch_default_hover">#ff2e2e2b</color>
<color name="cdr_color_background_switch_default_focus">#ff2e2e2b</color>
<color name="cdr_color_background_switch_default_rest">#fffafbf9</color>
<color name="cdr_color_background_switch_default_hover">#fffafbf9</color>
<color name="cdr_color_background_switch_default_focus">#fffafbf9</color>
<color name="cdr_color_background_switch_selected_default_rest">#ff4b4a48</color>
<color name="cdr_color_background_switch_selected_default_hover">#ff2e2e2b</color>
<color name="cdr_color_background_switch_selected_default_focus">#ff2e2e2b</color>
<color name="cdr_color_background_switch_handle_default_rest">#ffd5cfc3</color>
<color name="cdr_color_background_switch_handle_default_hover">#ffedeae3</color>
<color name="cdr_color_background_switch_handle_default_focus">#ffd5cfc3</color>
9 changes: 6 additions & 3 deletions dist/docsite/css/cdr-tokens.css
Original file line number Diff line number Diff line change
@@ -81,9 +81,12 @@
--cdr-color-background-surface-secondary: #f7f5f3;
--cdr-color-background-surface-brand-spruce: #1f513f;
--cdr-color-background-surface-sale: #c7370f;
--cdr-color-background-switch-default-rest: #4b4a48;
--cdr-color-background-switch-default-hover: #2e2e2b;
--cdr-color-background-switch-default-focus: #2e2e2b;
--cdr-color-background-switch-default-rest: #fafbf9;
--cdr-color-background-switch-default-hover: #fafbf9;
--cdr-color-background-switch-default-focus: #fafbf9;
--cdr-color-background-switch-selected-default-rest: #4b4a48;
--cdr-color-background-switch-selected-default-hover: #2e2e2b;
--cdr-color-background-switch-selected-default-focus: #2e2e2b;
--cdr-color-background-switch-handle-default-rest: #d5cfc3;
--cdr-color-background-switch-handle-default-hover: #edeae3;
--cdr-color-background-switch-handle-default-focus: #d5cfc3;
19 changes: 17 additions & 2 deletions dist/docsite/figma/figma.json
Original file line number Diff line number Diff line change
@@ -1171,16 +1171,31 @@
},
"switch": {
"default-rest": {
"$value": "{color.warm-grey-900}",
"$value": "{color.warm-grey-010}",
"$type": "color",
"filePath": "tokens/global/switch.json5"
},
"default-hover": {
"$value": "{color.warm-grey-1000}",
"$value": "{color.warm-grey-010}",
"$type": "color",
"filePath": "tokens/global/switch.json5"
},
"default-focus": {
"$value": "{color.warm-grey-010}",
"$type": "color",
"filePath": "tokens/global/switch.json5"
},
"selected-default-rest": {
"$value": "{color.warm-grey-900}",
"$type": "color",
"filePath": "tokens/global/switch.json5"
},
"selected-default-hover": {
"$value": "{color.warm-grey-1000}",
"$type": "color",
"filePath": "tokens/global/switch.json5"
},
"selected-default-focus": {
"$value": "{color.warm-grey-1000}",
"$type": "color",
"filePath": "tokens/global/switch.json5"
3 changes: 3 additions & 0 deletions dist/docsite/ios/CdrColor.h
Original file line number Diff line number Diff line change
@@ -91,6 +91,9 @@ CdrColorBackgroundSurfaceSale,
CdrColorBackgroundSwitchDefaultRest,
CdrColorBackgroundSwitchDefaultHover,
CdrColorBackgroundSwitchDefaultFocus,
CdrColorBackgroundSwitchSelectedDefaultRest,
CdrColorBackgroundSwitchSelectedDefaultHover,
CdrColorBackgroundSwitchSelectedDefaultFocus,
CdrColorBackgroundSwitchHandleDefaultRest,
CdrColorBackgroundSwitchHandleDefaultHover,
CdrColorBackgroundSwitchHandleDefaultFocus,
3 changes: 3 additions & 0 deletions dist/docsite/ios/CdrColor.m
Original file line number Diff line number Diff line change
@@ -99,6 +99,9 @@ + (NSArray *)values {
[UIColor colorWithRed:0.969f green:0.961f blue:0.953f alpha:1.000f],
[UIColor colorWithRed:0.122f green:0.318f blue:0.247f alpha:1.000f],
[UIColor colorWithRed:0.780f green:0.216f blue:0.059f alpha:1.000f],
[UIColor colorWithRed:0.980f green:0.984f blue:0.976f alpha:1.000f],
[UIColor colorWithRed:0.980f green:0.984f blue:0.976f alpha:1.000f],
[UIColor colorWithRed:0.980f green:0.984f blue:0.976f alpha:1.000f],
[UIColor colorWithRed:0.294f green:0.290f blue:0.282f alpha:1.000f],
[UIColor colorWithRed:0.180f green:0.180f blue:0.169f alpha:1.000f],
[UIColor colorWithRed:0.180f green:0.180f blue:0.169f alpha:1.000f],
9 changes: 6 additions & 3 deletions dist/docsite/js/cdr-tokens.cjs
Original file line number Diff line number Diff line change
@@ -81,9 +81,12 @@ module.exports = {
"CdrColorBackgroundSurfaceSecondary": "#f7f5f3",
"CdrColorBackgroundSurfaceBrandSpruce": "#1f513f",
"CdrColorBackgroundSurfaceSale": "#c7370f",
"CdrColorBackgroundSwitchDefaultRest": "#4b4a48",
"CdrColorBackgroundSwitchDefaultHover": "#2e2e2b",
"CdrColorBackgroundSwitchDefaultFocus": "#2e2e2b",
"CdrColorBackgroundSwitchDefaultRest": "#fafbf9",
"CdrColorBackgroundSwitchDefaultHover": "#fafbf9",
"CdrColorBackgroundSwitchDefaultFocus": "#fafbf9",
"CdrColorBackgroundSwitchSelectedDefaultRest": "#4b4a48",
"CdrColorBackgroundSwitchSelectedDefaultHover": "#2e2e2b",
"CdrColorBackgroundSwitchSelectedDefaultFocus": "#2e2e2b",
"CdrColorBackgroundSwitchHandleDefaultRest": "#d5cfc3",
"CdrColorBackgroundSwitchHandleDefaultHover": "#edeae3",
"CdrColorBackgroundSwitchHandleDefaultFocus": "#d5cfc3",
3 changes: 3 additions & 0 deletions dist/docsite/js/cdr-tokens.d.mts
Original file line number Diff line number Diff line change
@@ -83,6 +83,9 @@ export const CdrColorBackgroundSurfaceSale : string;
export const CdrColorBackgroundSwitchDefaultRest : string;
export const CdrColorBackgroundSwitchDefaultHover : string;
export const CdrColorBackgroundSwitchDefaultFocus : string;
export const CdrColorBackgroundSwitchSelectedDefaultRest : string;
export const CdrColorBackgroundSwitchSelectedDefaultHover : string;
export const CdrColorBackgroundSwitchSelectedDefaultFocus : string;
export const CdrColorBackgroundSwitchHandleDefaultRest : string;
export const CdrColorBackgroundSwitchHandleDefaultHover : string;
export const CdrColorBackgroundSwitchHandleDefaultFocus : string;
9 changes: 6 additions & 3 deletions dist/docsite/js/cdr-tokens.mjs
Original file line number Diff line number Diff line change
@@ -80,9 +80,12 @@ export const CdrColorBackgroundSurfacePrimary = "#ffffff";
export const CdrColorBackgroundSurfaceSecondary = "#f7f5f3";
export const CdrColorBackgroundSurfaceBrandSpruce = "#1f513f";
export const CdrColorBackgroundSurfaceSale = "#c7370f";
export const CdrColorBackgroundSwitchDefaultRest = "#4b4a48";
export const CdrColorBackgroundSwitchDefaultHover = "#2e2e2b";
export const CdrColorBackgroundSwitchDefaultFocus = "#2e2e2b";
export const CdrColorBackgroundSwitchDefaultRest = "#fafbf9";
export const CdrColorBackgroundSwitchDefaultHover = "#fafbf9";
export const CdrColorBackgroundSwitchDefaultFocus = "#fafbf9";
export const CdrColorBackgroundSwitchSelectedDefaultRest = "#4b4a48";
export const CdrColorBackgroundSwitchSelectedDefaultHover = "#2e2e2b";
export const CdrColorBackgroundSwitchSelectedDefaultFocus = "#2e2e2b";
export const CdrColorBackgroundSwitchHandleDefaultRest = "#d5cfc3";
export const CdrColorBackgroundSwitchHandleDefaultHover = "#edeae3";
export const CdrColorBackgroundSwitchHandleDefaultFocus = "#d5cfc3";
84 changes: 81 additions & 3 deletions dist/docsite/json/android.json
Original file line number Diff line number Diff line change
@@ -2106,6 +2106,84 @@
"deprecated": false
}
},
{
"$value": "#fffafbf9",
"$type": "color",
"docs": {
"category": "colors",
"type": "switch",
"example": "color",
"description": "The background color of a switch on rest"
},
"filePath": "tokens/global/switch.json5",
"isSource": false,
"original": {
"$value": "{options.color.warm-grey-010}",
"$type": "color",
"docs": {
"category": "colors",
"type": "switch",
"example": "color",
"description": "The background color of a switch on rest"
}
},
"name": "cdr_color_background_switch_default_rest",
"attributes": {
"deprecated": false
}
},
{
"$value": "#fffafbf9",
"$type": "color",
"docs": {
"category": "colors",
"type": "switch",
"example": "color",
"description": "The background color of a switch on hover"
},
"filePath": "tokens/global/switch.json5",
"isSource": false,
"original": {
"$value": "{options.color.warm-grey-010}",
"$type": "color",
"docs": {
"category": "colors",
"type": "switch",
"example": "color",
"description": "The background color of a switch on hover"
}
},
"name": "cdr_color_background_switch_default_hover",
"attributes": {
"deprecated": false
}
},
{
"$value": "#fffafbf9",
"$type": "color",
"docs": {
"category": "colors",
"type": "switch",
"example": "color",
"description": "The background color of a switch on focus"
},
"filePath": "tokens/global/switch.json5",
"isSource": false,
"original": {
"$value": "{options.color.warm-grey-010}",
"$type": "color",
"docs": {
"category": "colors",
"type": "switch",
"example": "color",
"description": "The background color of a switch on focus"
}
},
"name": "cdr_color_background_switch_default_focus",
"attributes": {
"deprecated": false
}
},
{
"$value": "#ff4b4a48",
"$type": "color",
@@ -2127,7 +2205,7 @@
"description": "The background color of a selected switch on rest"
}
},
"name": "cdr_color_background_switch_default_rest",
"name": "cdr_color_background_switch_selected_default_rest",
"attributes": {
"deprecated": false
}
@@ -2153,7 +2231,7 @@
"description": "The background color of a selected switch on hover"
}
},
"name": "cdr_color_background_switch_default_hover",
"name": "cdr_color_background_switch_selected_default_hover",
"attributes": {
"deprecated": false
}
@@ -2179,7 +2257,7 @@
"description": "The background color of a selected switch on focus"
}
},
"name": "cdr_color_background_switch_default_focus",
"name": "cdr_color_background_switch_selected_default_focus",
"attributes": {
"deprecated": false
}
84 changes: 81 additions & 3 deletions dist/docsite/json/global.json
Original file line number Diff line number Diff line change
@@ -2106,6 +2106,84 @@
"deprecated": false
}
},
{
"$value": "#fafbf9",
"$type": "color",
"docs": {
"category": "colors",
"type": "switch",
"example": "color",
"description": "The background color of a switch on rest"
},
"filePath": "tokens/global/switch.json5",
"isSource": false,
"original": {
"$value": "{options.color.warm-grey-010}",
"$type": "color",
"docs": {
"category": "colors",
"type": "switch",
"example": "color",
"description": "The background color of a switch on rest"
}
},
"name": "cdr-color-background-switch-default-rest",
"attributes": {
"deprecated": false
}
},
{
"$value": "#fafbf9",
"$type": "color",
"docs": {
"category": "colors",
"type": "switch",
"example": "color",
"description": "The background color of a switch on hover"
},
"filePath": "tokens/global/switch.json5",
"isSource": false,
"original": {
"$value": "{options.color.warm-grey-010}",
"$type": "color",
"docs": {
"category": "colors",
"type": "switch",
"example": "color",
"description": "The background color of a switch on hover"
}
},
"name": "cdr-color-background-switch-default-hover",
"attributes": {
"deprecated": false
}
},
{
"$value": "#fafbf9",
"$type": "color",
"docs": {
"category": "colors",
"type": "switch",
"example": "color",
"description": "The background color of a switch on focus"
},
"filePath": "tokens/global/switch.json5",
"isSource": false,
"original": {
"$value": "{options.color.warm-grey-010}",
"$type": "color",
"docs": {
"category": "colors",
"type": "switch",
"example": "color",
"description": "The background color of a switch on focus"
}
},
"name": "cdr-color-background-switch-default-focus",
"attributes": {
"deprecated": false
}
},
{
"$value": "#4b4a48",
"$type": "color",
@@ -2127,7 +2205,7 @@
"description": "The background color of a selected switch on rest"
}
},
"name": "cdr-color-background-switch-default-rest",
"name": "cdr-color-background-switch-selected-default-rest",
"attributes": {
"deprecated": false
}
@@ -2153,7 +2231,7 @@
"description": "The background color of a selected switch on hover"
}
},
"name": "cdr-color-background-switch-default-hover",
"name": "cdr-color-background-switch-selected-default-hover",
"attributes": {
"deprecated": false
}
@@ -2179,7 +2257,7 @@
"description": "The background color of a selected switch on focus"
}
},
"name": "cdr-color-background-switch-default-focus",
"name": "cdr-color-background-switch-selected-default-focus",
"attributes": {
"deprecated": false
}
Loading