Skip to content

Commit

Permalink
refactor(mapping): update toggle mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
artyorsh authored Apr 22, 2019
1 parent 671ddd1 commit e71ca2c
Show file tree
Hide file tree
Showing 5 changed files with 818 additions and 1,154 deletions.
188 changes: 153 additions & 35 deletions src/framework/ui/common/mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -2082,19 +2082,34 @@
"borderWidth": {
"type": "number"
},
"borderColor": {
"type": "string"
},
"backgroundColor": {
"type": "string"
},
"offsetValue": {
"type": "number"
},
"tintBackgroundColor": {
"type": "string"
"thumbWidth": {
"type": "number"
},
"borderColor": {
"type": "string"
"thumbHeight": {
"type": "number"
},
"thumbBorderRadius": {
"type": "number"
},
"thumbBackgroundColor": {
"type": "string"
},
"highlightBackgroundColor": {
"iconWidth": {
"type": "number"
},
"iconHeight": {
"type": "number"
},
"iconTintColor": {
"type": "string"
},
"highlightWidth": {
Expand All @@ -2105,6 +2120,9 @@
},
"highlightBorderRadius": {
"type": "number"
},
"highlightBackgroundColor": {
"type": "string"
}
},
"appearances": {
Expand All @@ -2131,6 +2149,9 @@
}
},
"size": {
"tiny": {
"default": false
},
"small": {
"default": false
},
Expand All @@ -2139,6 +2160,9 @@
},
"large": {
"default": false
},
"giant": {
"default": false
}
}
},
Expand All @@ -2163,69 +2187,163 @@
"appearances": {
"default": {
"mapping": {
"offsetValue": 20,
"thumbBackgroundColor": "#ffffff",
"highlightBackgroundColor": "transparent",
"borderColor": "color-basic-500",
"backgroundColor": "color-basic-300",
"thumbBackgroundColor": "color-white",
"highlightBackgroundColor": "opacity-transparent",
"state": {
"active": {
"highlightBackgroundColor": "#e5e7ea"
"borderColor": "color-basic-600",
"highlightBackgroundColor": "color-basic-200"
},
"disabled": {
"borderColor": "gray-dark",
"tintBackgroundColor": "gray-light"
"borderColor": "color-basic-500",
"backgroundColor": "color-basic-300"
},
"checked.disabled": {
"borderColor": "color-basic-400",
"iconTintColor": "color-basic-400"
}
}
},
"variantGroups": {
"status": {
"primary": {
"tintBackgroundColor": "#d9e4ff",
"borderColor": "blue-primary"
"iconTintColor": "color-primary-500",
"state": {
"checked": {
"borderColor": "color-primary-500",
"backgroundColor": "color-primary-500"
},
"checked.active": {
"borderColor": "color-primary-600"
}
}
},
"success": {
"tintBackgroundColor": "#b3ffd6",
"borderColor": "#00e096"
"iconTintColor": "color-success-500",
"state": {
"checked": {
"borderColor": "color-success-500",
"backgroundColor": "color-success-500"
},
"checked.active": {
"borderColor": "color-success-600"
}
}
},
"info": {
"tintBackgroundColor": "#c7e2ff",
"borderColor": "#0095ff"
"iconTintColor": "color-info-500",
"state": {
"checked": {
"borderColor": "color-info-500",
"backgroundColor": "color-info-500"
},
"checked.active": {
"borderColor": "color-info-600"
}
}
},
"warning": {
"tintBackgroundColor": "#fff1c2",
"borderColor": "#ffaa00"
"iconTintColor": "color-warning-500",
"state": {
"checked": {
"borderColor": "color-warning-500",
"backgroundColor": "color-warning-500"
},
"checked.active": {
"borderColor": "color-warning-600"
}
}
},
"danger": {
"tintBackgroundColor": "#FFD6D9",
"borderColor": "pink-primary"
"iconTintColor": "color-danger-500",
"state": {
"checked": {
"borderColor": "color-danger-500",
"backgroundColor": "color-danger-500"
},
"checked.active": {
"borderColor": "color-danger-600"
}
}
}
},
"size": {
"tiny": {
"width": 32,
"height": 20,
"borderRadius": 10,
"borderWidth": 1.5,
"thumbWidth": 18,
"thumbHeight": 18,
"thumbBorderRadius": 9,
"iconWidth": 9,
"iconHeight": 9,
"highlightWidth": 44,
"highlightHeight": 32,
"highlightBorderRadius": 16,
"offsetValue": 12
},
"small": {
"width": 38,
"height": 22,
"borderRadius": 11,
"borderWidth": 0.5,
"highlightWidth": 48,
"highlightHeight": 32,
"highlightBorderRadius": 16
"height": 24,
"borderRadius": 12,
"borderWidth": 1.5,
"thumbWidth": 22,
"thumbHeight": 22,
"thumbBorderRadius": 11,
"iconWidth": 11,
"iconHeight": 11,
"highlightWidth": 50,
"highlightHeight": 36,
"highlightBorderRadius": 18,
"offsetValue": 16
},
"medium": {
"width": 52,
"height": 32,
"borderRadius": 16,
"borderWidth": 1.5,
"highlightWidth": 62,
"highlightHeight": 42,
"highlightBorderRadius": 21
"thumbWidth": 30,
"thumbHeight": 30,
"thumbBorderRadius": 15,
"iconWidth": 15,
"iconHeight": 15,
"highlightWidth": 64,
"highlightHeight": 44,
"highlightBorderRadius": 22,
"offsetValue": 20
},
"large": {
"width": 72,
"height": 42,
"borderRadius": 21,
"width": 64,
"height": 40,
"borderRadius": 20,
"borderWidth": 2,
"highlightWidth": 82,
"thumbWidth": 36,
"thumbHeight": 36,
"thumbBorderRadius": 18,
"iconWidth": 18,
"iconHeight": 18,
"highlightWidth": 76,
"highlightHeight": 52,
"highlightBorderRadius": 26
"highlightBorderRadius": 26,
"offsetValue": 24
},
"giant": {
"width": 76,
"height": 48,
"borderRadius": 24,
"borderWidth": 2,
"thumbWidth": 44,
"thumbHeight": 44,
"thumbBorderRadius": 22,
"iconWidth": 22,
"iconHeight": 22,
"highlightWidth": 88,
"highlightHeight": 60,
"highlightBorderRadius": 30,
"offsetValue": 28
}
}
}
Expand Down
Loading

0 comments on commit e71ca2c

Please sign in to comment.