Skip to content

Commit

Permalink
fix: adopt upstream Paragon changes
Browse files Browse the repository at this point in the history
  • Loading branch information
adamstankiewicz committed Sep 7, 2024
1 parent 9c93550 commit b621460
Show file tree
Hide file tree
Showing 53 changed files with 4,187 additions and 2,734 deletions.
2,456 changes: 1,953 additions & 503 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
"build-tokens": "paragon build-tokens --source ./tokens/src --build-dir ./paragon/css --source-tokens-only",
"build-scss": "paragon build-scss --corePath ./paragon/core.scss --themesPath ./paragon/css/themes --defaultThemeVariants light",
"build": "make build",
"build:watch": "nodemon --ignore dist -x \"make build\"",
"paragon:help": "paragon help"
},
"devDependencies": {
"@openedx/paragon": "22.0.0-alpha.25"
"@openedx/paragon": "file:../paragon/openedx-paragon-20.18.1.tgz",
"nodemon": "^3.1.4"
}
}
5 changes: 2 additions & 3 deletions paragon/css/core/custom-media-breakpoints.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/**
* IMPORTANT: This file is the result of assembling design tokens
* Do not edit directly
* Generated on Fri, 24 May 2024 22:53:44 GMT
* Do not edit directly, this file was auto-generated. while transforming design tokens.
* See <root>/tokens/README.md for more details.
*/

235 changes: 141 additions & 94 deletions paragon/css/core/variables.css

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion paragon/css/themes/light/index.css
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
@import "variables.css";
@import "utility-classes.css";
Empty file.
1,368 changes: 871 additions & 497 deletions paragon/css/themes/light/variables.css

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions tokens/src/core/alias/size.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"size": {
"border": {
"radius": {
"base": { "value": ".375rem" },
"lg": { "value": ".375rem" },
"sm": { "value": ".375rem" }
"base": { "$value": ".375rem" },
"lg": { "$value": ".375rem" },
"sm": { "$value": ".375rem" }
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions tokens/src/core/components/Badge.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"typography": {
"badge": {
"font": {
"size": { "value": "0.75rem" },
"weight": { "value": "400" }
"size": { "$value": "0.75rem" },
"weight": { "$value": "400" }
}
}
}
Expand Down
18 changes: 9 additions & 9 deletions tokens/src/core/components/Button/core.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,35 @@
"spacing": {
"btn": {
"focus": {
"gap": { "value": "2px" }
"gap": { "$value": "2px" }
}
}
},
"typography": {
"btn": {
"font": {
"weight": { "value": "500" }
"weight": { "$value": "500" }
}
}
},
"size": {
"btn": {
"border": {
"radius": {
"base": { "value": "100px", "type": "dimension", "source": "$btn-border-radius" },
"lg": { "value": "100px", "type": "dimension", "source": "$btn-border-radius-lg" },
"sm": { "value": "100px", "type": "dimension", "source": "$btn-border-radius-sm" }
"base": { "$value": "100px", "$type": "dimension", "source": "$btn-border-radius" },
"lg": { "$value": "100px", "$type": "dimension", "source": "$btn-border-radius-lg" },
"sm": { "$value": "100px", "$type": "dimension", "source": "$btn-border-radius-sm" }
}
},
"focus": {
"border-radius": {
"base": {
"value": "calc({size.btn.border.radius.base} + {spacing.btn.focus.border-gap})",
"type": "dimension",
"$value": "calc({size.btn.border.radius.base} + {spacing.btn.focus.border-gap})",
"$type": "dimension",
"source": "$btn-focus-border-radius"
},
"lg": { "value": "{size.btn.focus.border-radius.base}", "type": "dimension", "source": "$btn-focus-border-radius-lg" },
"sm": { "value": "{size.btn.border.radius.base}", "type": "dimension", "source": "$btn-focus-border-radius-sm" }
"lg": { "$value": "{size.btn.focus.border-radius.base}", "$type": "dimension", "source": "$btn-focus-border-radius-lg" },
"sm": { "$value": "{size.btn.border.radius.base}", "$type": "dimension", "source": "$btn-focus-border-radius-sm" }
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions tokens/src/core/components/Card.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"spacing": {
"card": {
"spacer": {
"x": { "value": "{spacing.spacer.4}" },
"y": { "value": "{spacing.spacer.3}" }
"x": { "$value": "{spacing.spacer.4}" },
"y": { "$value": "{spacing.spacer.3}" }
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions tokens/src/core/components/Dropdown.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
"size": {
"dropdown": {
"border": {
"width": { "value": "0" }
"width": { "$value": "0" }
}
}
},
"spacing": {
"dropdown": {
"padding": {
"y": {
"base": { "value": "{spacing.spacer.2}" },
"item": { "value": "{spacing.spacer.2,5}" }
"base": { "$value": "{spacing.spacer.2}" },
"item": { "$value": "{spacing.spacer.2,5}" }
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions tokens/src/core/components/Form/size.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"input": {
"radius": {
"border": {
"base": { "value": "0" },
"lg": { "value": "0" },
"sm": { "value": "0" }
"base": { "$value": "0" },
"lg": { "$value": "0" },
"sm": { "$value": "0" }
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion tokens/src/core/components/Image.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"image": {
"thumbnail": {
"border": {
"radius": { "value": "0" }
"radius": { "$value": "0" }
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion tokens/src/core/components/Nav.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"size": {
"nav": {
"pills": {
"border-radius": { "value": "0" }
"border-radius": { "$value": "0" }
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion tokens/src/core/components/Popover.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"size": {
"popover": {
"border": {
"width": { "value": "0px", "_comment": "A pixel next to zero is necessary for correct display Popover arrow." }
"width": { "$value": "0px", "_comment": "A pixel next to zero is necessary for correct display Popover arrow." }
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions tokens/src/core/components/general/caret.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"spacing": {
"caret": {
"base": { "value": "calc({size.caret.width} * 1)" },
"vertical-align": { "value": "calc({size.caret.width} * .67)" }
"base": { "$value": "calc({size.caret.width} * 1)" },
"vertical-align": { "$value": "calc({size.caret.width} * .67)" }
}
}
}
2 changes: 1 addition & 1 deletion tokens/src/core/components/general/headings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"typography": {
"headings": {
"font": {
"weight": { "value": "700" }
"weight": { "$value": "700" }
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion tokens/src/core/components/general/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"size": {
"input": {
"btn": {
"border-width": { "value": "1px" }
"border-width": { "$value": "1px" }
}
}
}
Expand Down
12 changes: 0 additions & 12 deletions tokens/src/core/global/display.json

This file was deleted.

70 changes: 29 additions & 41 deletions tokens/src/core/global/spacing.json
Original file line number Diff line number Diff line change
@@ -1,75 +1,63 @@
{
"spacing": {
"$type": "dimension",
"spacer": {
"base": {
"value": "1rem",
"type": "dimension",
"$value": "1rem",
"source": "$spacer",
"description": "Basic space value"
"$description": "Basic space value"
},
"0": {
"value": "0",
"type": "dimension",
"description": "Space value of level 0"
"$value": "0",
"$description": "Space value of level 0"
},
"1": {
"value": "calc({spacing.spacer.base} * .25)",
"type": "dimension",
"description": "Space value of level 1"
"$value": "calc({spacing.spacer.base} * .25)",
"$description": "Space value of level 1"
},
"1,5": {
"value": "calc({spacing.spacer.base} * .375)",
"type": "dimension",
"description": "Space value of level 1.5"
"1.5": {
"$value": "calc({spacing.spacer.base} * .375)",
"$description": "Space value of level 1.5"
},
"2": {
"value": "calc({spacing.spacer.base} * .5)",
"type": "dimension",
"description": "Space value of level 2"
"$value": "calc({spacing.spacer.base} * .5)",
"$description": "Space value of level 2"
},
"2,5": {
"value": "calc({spacing.spacer.base} * .75)",
"type": "dimension",
"description": "Space value of level 2.5"
"$value": "calc({spacing.spacer.base} * .75)",
"$description": "Space value of level 2.5"
},
"3": {
"value": "{spacing.spacer.base}",
"type": "dimension",
"description": "Space value of level 3"
"$value": "{spacing.spacer.base}",
"$description": "Space value of level 3"
},
"3,5": {
"value": "calc({spacing.spacer.base} * 1.25)",
"type": "dimension",
"description": "Space value of level 3.5"
"$value": "calc({spacing.spacer.base} * 1.25)",
"$description": "Space value of level 3.5"
},
"4": {
"value": "calc({spacing.spacer.base} * 1.5)",
"type": "dimension",
"description": "Space value of level 4"
"$value": "calc({spacing.spacer.base} * 1.5)",
"$description": "Space value of level 4"
},
"4,5": {
"value": "calc({spacing.spacer.base} * 2)",
"type": "dimension",
"description": "Space value of level 4.5"
"$value": "calc({spacing.spacer.base} * 2)",
"$description": "Space value of level 4.5"
},
"5": {
"value": "calc({spacing.spacer.base} * 3)",
"type": "dimension",
"description": "Space value of level 5"
"$value": "calc({spacing.spacer.base} * 3)",
"$description": "Space value of level 5"
},
"5,5": {
"value": "calc({spacing.spacer.base} * 4)",
"type": "dimension",
"description": "Space value of level 5.5"
"$value": "calc({spacing.spacer.base} * 4)",
"$description": "Space value of level 5.5"
},
"6": {
"value": "calc({spacing.spacer.base} * 5)",
"type": "dimension",
"description": "Space value of level 6"
"$value": "calc({spacing.spacer.base} * 5)",
"$description": "Space value of level 6"
}
},
"grid": {
"gutter-width": { "value": "{spacing.spacer.5,5}" }
"gutter-width": { "$value": "{spacing.spacer.4}" }
}
}
}
Loading

0 comments on commit b621460

Please sign in to comment.