Skip to content

Commit f5fd08a

Browse files
feat!: add design tokens support (#314)
BREAKING CHANGE: Pre-design-tokens theming is no longer supported. Co-authored-by: Diana Olarte <[email protected]>
1 parent 8fb8e67 commit f5fd08a

File tree

20 files changed

+4863
-2172
lines changed

20 files changed

+4863
-2172
lines changed

.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ USER_INFO_COOKIE_NAME=''
2222
APP_ID=''
2323
MFE_CONFIG_API_URL=''
2424
HOTJAR_SITE_ID=''
25+
# Fallback in local style files
26+
PARAGON_THEME_URLS={}

.env.development

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ USER_INFO_COOKIE_NAME='edx-user-info'
2323
APP_ID=''
2424
MFE_CONFIG_API_URL=''
2525
HOTJAR_SITE_ID='0'
26+
# Fallback in local style files
27+
PARAGON_THEME_URLS={}

.env.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ USER_INFO_COOKIE_NAME='edx-user-info'
2121
APP_ID=''
2222
MFE_CONFIG_API_URL=''
2323
HOTJAR_SITE_ID='0'
24+
PARAGON_THEME_URLS={}

package-lock.json

Lines changed: 4802 additions & 2084 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
"url": "https://github.com/edx/frontend-app-ora/issues"
3535
},
3636
"dependencies": {
37-
"@edx/brand": "npm:@edx/brand-[email protected].3",
38-
"@edx/frontend-lib-special-exams": "^3.1.0",
37+
"@edx/brand": "npm:@openedx/brand-[email protected].3",
38+
"@edx/frontend-lib-special-exams": "^3.4.0",
3939
"@edx/frontend-platform": "8.4.0",
4040
"@edx/openedx-atlas": "^0.7.0",
4141
"@edx/react-unit-test-utils": "^3.0.0",
@@ -45,12 +45,12 @@
4545
"@fortawesome/free-regular-svg-icons": "5.15.4",
4646
"@fortawesome/free-solid-svg-icons": "5.15.4",
4747
"@fortawesome/react-fontawesome": "0.2.2",
48-
"@openedx/paragon": "^21.13.1",
48+
"@openedx/paragon": "^23.4.2",
4949
"@reduxjs/toolkit": "^1.9.7",
5050
"@tanstack/react-query": "^4.29.25",
5151
"@tanstack/react-query-devtools": "^4.35.3",
5252
"@tinymce/tinymce-react": "3.14.0",
53-
"@zip.js/zip.js": "^2.7.30",
53+
"@zip.js/zip.js": "^2.7.62",
5454
"axios": "^1.5.1",
5555
"classnames": "^2.3.2",
5656
"core-js": "3.42.0",
@@ -85,14 +85,14 @@
8585
"glob": "7.2.3",
8686
"husky": "7.0.4",
8787
"jest": "^29.7.0",
88-
"ts-jest": "^29.1.4"
88+
"ts-jest": "^29.4.0"
8989
},
9090
"overrides": {
9191
"@edx/frontend-lib-special-exams": {
92-
"@openedx/paragon": "21.13.1"
92+
"@openedx/paragon": "^23.4.2"
9393
},
9494
"@edx/frontend-platform": {
95-
"@openedx/paragon": "21.13.1"
95+
"@openedx/paragon": "^23.4.2"
9696
}
9797
}
9898
}

src/components/Assessment/Assessment.scss

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,34 @@
1-
@import "~@edx/brand/paragon/variables";
2-
@import "~@openedx/paragon/scss/core/core";
3-
@import "~@edx/brand/paragon/overrides";
4-
51
.assessment-card {
62
max-width: 320px !important;
73
height: fit-content;
84
max-height: 100%;
95
position: sticky !important;
10-
top: map-get($spacers, 1) * -1;
6+
top: calc( var(--pgn-spacing-spacer-1) * -1);
117

128
.assessment-header {
139
box-shadow: 0 0 0.25rem rgba(0, 0, 0, 0.3) !important;
1410
display: flex;
1511
justify-content: center;
16-
padding: map-get($spacers, 3);
12+
padding: var(--pgn-spacing-spacer-3);
1713
}
1814

1915
.assessment-body {
2016
overflow-y: hide;
21-
padding: map-get($spacers, 3);
17+
padding: var(--pgn-spacing-spacer-3);
2218
}
2319

2420
.assessment-footer {
2521
box-shadow: 0 0 0.25rem rgba(0, 0, 0, 0.3) !important;
2622
justify-content: center;
27-
padding: map-get($spacers, 3);
23+
padding: var(--pgn-spacing-spacer-3);
2824
}
2925

3026
button.pgn__stateful-btn.pgn__stateful-btn-state-pending {
3127
opacity: .4 !important;
3228
}
3329
}
3430

35-
@include media-breakpoint-down(sm) {
31+
@media (--pgn-size-breakpoint-max-width-sm) {
3632
.assessment-card {
3733
margin-left: 0 !important;
3834
width: 100% !important;

src/components/CriterionContainer/CriterionContainer.scss

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
1-
@import "~@edx/brand/paragon/variables";
2-
@import "~@openedx/paragon/scss/core/core";
3-
@import "~@edx/brand/paragon/overrides";
4-
51
.criteria-label {
62
width: 100%;
73
.criteria-title {
84
display: inline-block;
95
max-width: calc(100% - 44px);
10-
color: $primary-500;
6+
color: var(--pgn-color-primary-500);
117
font-weight: bold;
128
vertical-align: top;
139
}
1410
.esg-help-icon {
15-
margin-top: (map-get($spacers, 1\.5) * -1);
16-
margin-right: (map-get($spacers, 2\.5) * -1);
11+
margin-top: calc( var(--pgn-spacing-spacer-1-5) * -1);
12+
margin-right: calc( var(--pgn-spacing-spacer-2-5) * -1);
1713
vertical-align: top;
1814
}
1915
}

src/components/FilePreview/components/FileRenderer/FileCard/FileCard.scss

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
@import "@openedx/paragon/scss/core/core";
2-
31
.file-card {
4-
margin: map-get($spacers, 1) 0;
2+
margin: var(--pgn-spacing-spacer-1) 0;
53

64
.file-card-title {
75
text-overflow: ellipsis;
@@ -26,8 +24,8 @@
2624
white-space: pre-wrap;
2725
}
2826

29-
@include media-breakpoint-down(sm) {
27+
@media (--pgn-size-breakpoint-max-width-sm) {
3028
.file-card-title {
31-
width: calc(map-get($container-max-widths, "sm")/2);
29+
width: calc(var(--pgn-size-container-max-width-sm)/2);
3230
}
33-
}
31+
}

src/components/FileUpload/styles.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
vertical-align: middle;
66
overflow: hidden;
77
white-space: nowrap;
8-
}
8+
}

src/components/ModalContainer.scss

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
@import '@edx/brand/paragon/variables.scss';
2-
@import '@openedx/paragon/scss/core/core.scss';
3-
@import '@edx/brand/paragon/overrides.scss';
4-
51
.ora-modal-body {
6-
min-height: calc(100vh - 20px - 64px - (map-get($spacers, 2) * 8));
2+
min-height: calc(100vh - 20px - 64px - calc(var(--pgn-spacing-spacer-2) * 8));
73
height: 100%;
84
}
95

106
.exam-timer {
11-
max-width: $max-width-lg;
7+
max-width: var(--pgn-size-container-max-width-lg);
128
margin: auto;
139
button {
1410
display: none;

0 commit comments

Comments
 (0)