Skip to content

Commit

Permalink
refactor: unit -> dimension
Browse files Browse the repository at this point in the history
  • Loading branch information
malangcat committed Jan 15, 2025
1 parent 28093a2 commit c89c84b
Show file tree
Hide file tree
Showing 167 changed files with 1,674 additions and 1,637 deletions.
72 changes: 36 additions & 36 deletions docs/public/rootage/components/action-button.json
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@
"size=xsmall": {
"enabled": {
"root": {
"minHeight": "$unit.s8",
"minHeight": "$dimension.s8",
"cornerRadius": "$radius.full"
},
"progressCircle": {
Expand All @@ -337,15 +337,15 @@
"size=xsmall, layout=with text": {
"enabled": {
"root": {
"gap": "$unit.s1",
"paddingX": "$unit.s3_5",
"paddingY": "$unit.s1_5"
"gap": "$dimension.s1",
"paddingX": "$dimension.s3_5",
"paddingY": "$dimension.s1_5"
},
"prefixIcon": {
"size": "$unit.s3_5"
"size": "$dimension.s3_5"
},
"suffixIcon": {
"size": "$unit.s3_5"
"size": "$dimension.s3_5"
},
"label": {
"fontSize": "$font-size.s4"
Expand All @@ -355,19 +355,19 @@
"size=xsmall, layout=icon only": {
"enabled": {
"root": {
"minWidth": "$unit.s8",
"paddingX": "$unit.s1_5",
"paddingY": "$unit.s1_5"
"minWidth": "$dimension.s8",
"paddingX": "$dimension.s1_5",
"paddingY": "$dimension.s1_5"
},
"icon": {
"size": "$unit.s3_5"
"size": "$dimension.s3_5"
}
}
},
"size=small": {
"enabled": {
"root": {
"minHeight": "$unit.s9",
"minHeight": "$dimension.s9",
"cornerRadius": "$radius.s2"
},
"progressCircle": {
Expand All @@ -379,15 +379,15 @@
"size=small, layout=with text": {
"enabled": {
"root": {
"gap": "$unit.s1",
"paddingX": "$unit.s3_5",
"paddingY": "$unit.s2"
"gap": "$dimension.s1",
"paddingX": "$dimension.s3_5",
"paddingY": "$dimension.s2"
},
"prefixIcon": {
"size": "$unit.s3_5"
"size": "$dimension.s3_5"
},
"suffixIcon": {
"size": "$unit.s3_5"
"size": "$dimension.s3_5"
},
"label": {
"fontSize": "$font-size.s4"
Expand All @@ -397,19 +397,19 @@
"size=small, layout=icon only": {
"enabled": {
"root": {
"minWidth": "$unit.s9",
"paddingX": "$unit.s2",
"paddingY": "$unit.s2"
"minWidth": "$dimension.s9",
"paddingX": "$dimension.s2",
"paddingY": "$dimension.s2"
},
"icon": {
"size": "$unit.s4"
"size": "$dimension.s4"
}
}
},
"size=medium": {
"enabled": {
"root": {
"minHeight": "$unit.s10",
"minHeight": "$dimension.s10",
"cornerRadius": "$radius.s2"
},
"progressCircle": {
Expand All @@ -421,15 +421,15 @@
"size=medium, layout=with text": {
"enabled": {
"root": {
"gap": "$unit.s1",
"paddingX": "$unit.s4",
"paddingY": "$unit.s2_5"
"gap": "$dimension.s1",
"paddingX": "$dimension.s4",
"paddingY": "$dimension.s2_5"
},
"prefixIcon": {
"size": "$unit.s4"
"size": "$dimension.s4"
},
"suffixIcon": {
"size": "$unit.s4"
"size": "$dimension.s4"
},
"label": {
"fontSize": "$font-size.s4"
Expand All @@ -439,9 +439,9 @@
"size=medium, layout=icon only": {
"enabled": {
"root": {
"minWidth": "$unit.s10",
"paddingX": "$unit.s2_5",
"paddingY": "$unit.s2_5"
"minWidth": "$dimension.s10",
"paddingX": "$dimension.s2_5",
"paddingY": "$dimension.s2_5"
},
"icon": {
"size": "18px"
Expand All @@ -451,7 +451,7 @@
"size=large": {
"enabled": {
"root": {
"minHeight": "$unit.s13",
"minHeight": "$dimension.s13",
"cornerRadius": "$radius.s3"
},
"progressCircle": {
Expand All @@ -463,9 +463,9 @@
"size=large, layout=with text": {
"enabled": {
"root": {
"gap": "$unit.s2",
"paddingX": "$unit.s5",
"paddingY": "$unit.s3_5"
"gap": "$dimension.s2",
"paddingX": "$dimension.s5",
"paddingY": "$dimension.s3_5"
},
"prefixIcon": {
"size": "22px"
Expand All @@ -481,9 +481,9 @@
"size=large, layout=icon only": {
"enabled": {
"root": {
"minWidth": "$unit.s13",
"paddingX": "$unit.s3_5",
"paddingY": "$unit.s3_5"
"minWidth": "$dimension.s13",
"paddingX": "$dimension.s3_5",
"paddingY": "$dimension.s3_5"
},
"icon": {
"size": "22px"
Expand Down
32 changes: 16 additions & 16 deletions docs/public/rootage/components/action-chip.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,18 @@
"size=small": {
"enabled": {
"root": {
"minHeight": "$unit.s8",
"paddingY": "$unit.s1_5",
"gap": "$unit.s1"
"minHeight": "$dimension.s8",
"paddingY": "$dimension.s1_5",
"gap": "$dimension.s1"
},
"label": {
"fontSize": "$font-size.s4"
},
"prefixIcon": {
"size": "$unit.s4"
"size": "$dimension.s4"
},
"suffixIcon": {
"size": "$unit.s3_5"
"size": "$dimension.s3_5"
},
"count": {
"fontSize": "$font-size.s4"
Expand All @@ -73,18 +73,18 @@
"size=medium": {
"enabled": {
"root": {
"minHeight": "$unit.s9",
"paddingY": "$unit.s2",
"gap": "$unit.s1"
"minHeight": "$dimension.s9",
"paddingY": "$dimension.s2",
"gap": "$dimension.s1"
},
"label": {
"fontSize": "$font-size.s4"
},
"prefixIcon": {
"size": "$unit.s4"
"size": "$dimension.s4"
},
"suffixIcon": {
"size": "$unit.s3_5"
"size": "$dimension.s3_5"
},
"count": {
"fontSize": "$font-size.s4"
Expand All @@ -94,34 +94,34 @@
"size=small,layout=with text": {
"enabled": {
"root": {
"paddingX": "$unit.s3"
"paddingX": "$dimension.s3"
}
}
},
"size=small,layout=icon only": {
"enabled": {
"root": {
"minWidth": "$unit.s8"
"minWidth": "$dimension.s8"
},
"icon": {
"size": "$unit.s4"
"size": "$dimension.s4"
}
}
},
"size=medium,layout=with text": {
"enabled": {
"root": {
"paddingX": "$unit.s3_5"
"paddingX": "$dimension.s3_5"
}
}
},
"size=medium,layout=icon only": {
"enabled": {
"root": {
"minWidth": "$unit.s9"
"minWidth": "$dimension.s9"
},
"icon": {
"size": "$unit.s4"
"size": "$dimension.s4"
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions docs/public/rootage/components/action-sheet-close-button.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"color": "$color.bg.neutral-weak",
"minHeight": "52px",
"cornerRadius": "$radius.s3",
"paddingX": "$unit.s5",
"paddingY": "$unit.s3_5",
"gap": "$unit.s3"
"paddingX": "$dimension.s5",
"paddingY": "$dimension.s3_5",
"gap": "$dimension.s3"
},
"label": {
"color": "$color.fg.neutral",
Expand Down
6 changes: 3 additions & 3 deletions docs/public/rootage/components/action-sheet-item.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
"root": {
"color": "$color.bg.neutral-weak",
"minHeight": "52px",
"paddingX": "$unit.s3_5",
"paddingY": "$unit.s4",
"paddingX": "$dimension.s3_5",
"paddingY": "$dimension.s4",
"strokeBottomWidth": "1px",
"strokeColor": "$color.stroke.neutral",
"gap": "$unit.s3"
"gap": "$dimension.s3"
},
"prefixIcon": {
"size": "22px"
Expand Down
8 changes: 4 additions & 4 deletions docs/public/rootage/components/action-sheet.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@
},
"content": {
"color": "$color.bg.layer-floating",
"paddingX": "$horizontal-spacing.global-gutter",
"paddingY": "$unit.s4",
"paddingX": "$dimension.spacing-x.global-gutter",
"paddingY": "$dimension.s4",
"cornerTopRadius": "$radius.s6",
"enterDuration": "$duration.s6",
"enterTimingFunction": "$timing-function.enter-expressive",
"exitDuration": "$duration.s4",
"exitTimingFunction": "$timing-function.exit"
},
"list": {
"gap": "$unit.s2_5"
"gap": "$dimension.s2_5"
},
"group": {
"cornerRadius": "$radius.s4"
},
"footer": {
"paddingTop": "$unit.s2_5"
"paddingTop": "$dimension.s2_5"
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions docs/public/rootage/components/badge.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"size=large": {
"enabled": {
"root": {
"minHeight": "$unit.s6",
"paddingX": "$unit.s2",
"paddingY": "$unit.s1"
"minHeight": "$dimension.s6",
"paddingX": "$dimension.s2",
"paddingY": "$dimension.s1"
},
"label": {
"fontSize": "$font-size.s2",
Expand All @@ -21,9 +21,9 @@
"size=medium": {
"enabled": {
"root": {
"minHeight": "$unit.s5",
"paddingX": "$unit.s1_5",
"paddingY": "$unit.s0_5"
"minHeight": "$dimension.s5",
"paddingX": "$dimension.s1_5",
"paddingY": "$dimension.s0_5"
},
"label": {
"fontSize": "$font-size.s1",
Expand Down
18 changes: 9 additions & 9 deletions docs/public/rootage/components/bottom-sheet.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
"exitTimingFunction": "$timing-function.exit"
},
"header": {
"gap": "$unit.s2",
"paddingX": "$horizontal-spacing.global-gutter",
"paddingTop": "$unit.s6",
"paddingBottom": "$unit.s4"
"gap": "$dimension.s2",
"paddingX": "$dimension.spacing-x.global-gutter",
"paddingTop": "$dimension.s6",
"paddingBottom": "$dimension.s4"
},
"footer": {
"paddingX": "$horizontal-spacing.global-gutter",
"paddingTop": "$unit.s3",
"paddingBottom": "$unit.s4"
"paddingX": "$dimension.spacing-x.global-gutter",
"paddingTop": "$dimension.s3",
"paddingBottom": "$dimension.s4"
},
"title": {
"color": "$color.fg.neutral",
Expand All @@ -52,8 +52,8 @@
"cornerRadius": "$radius.full",
"targetSize": "44px",
"size": "28px",
"fromTop": "$unit.s5",
"fromRight": "$unit.s5"
"fromTop": "$dimension.s5",
"fromRight": "$dimension.s5"
},
"closeIcon": {
"color": "$color.fg.neutral",
Expand Down
Loading

0 comments on commit c89c84b

Please sign in to comment.