@@ -31,14 +31,13 @@ export const withContextWrapper = makeDecorator({
31
31
color : "light"
32
32
} ,
33
33
"white" : {
34
- background : "var(--spectrum-examples-gradient-static-white" ,
34
+ background : "var(--spectrum-examples-gradient-static-white) " ,
35
35
color : "dark"
36
36
} ,
37
37
} ;
38
38
39
39
const original = {
40
40
color,
41
- context,
42
41
scale,
43
42
} ;
44
43
@@ -57,7 +56,6 @@ export const withContextWrapper = makeDecorator({
57
56
58
57
// Reset the context to the original values
59
58
color = original . color ;
60
- context = original . context ;
61
59
scale = original . scale ;
62
60
63
61
let staticKey = staticColor ;
@@ -72,20 +70,7 @@ export const withContextWrapper = makeDecorator({
72
70
if ( ! staticKey ) hasStaticElement = false ;
73
71
74
72
// Every container gets the spectrum class
75
- container . classList . toggle ( "spectrum" , ! isRaw ) ;
76
-
77
- // S1 and S1 Express get the legacy class
78
- container . classList . toggle ( "spectrum--legacy" , ! isModern && ! isRaw ) ;
79
-
80
- // Express only gets the express class
81
- container . classList . toggle ( "spectrum--express" , isExpress && ! isRaw ) ;
82
-
83
- // Darkest is deprecated in Spectrum 2
84
- if ( isModern && color === "darkest" ) {
85
- /* eslint-disable no-console -- notify that darkest was deprecated in S2 */
86
- console . warn ( "The 'darkest' color is deprecated in Spectrum 2. Please use 'dark' instead." ) ;
87
- color = "dark" ;
88
- }
73
+ container . classList . toggle ( "spectrum" , true ) ;
89
74
90
75
// Let the static color override the color if it's set
91
76
if ( ! isTestingWrapper && hasStaticElement && staticColorSettings [ staticKey ] ?. color ) {
@@ -98,12 +83,12 @@ export const withContextWrapper = makeDecorator({
98
83
color = "light" ;
99
84
}
100
85
101
- for ( let c of [ "light" , "dark" , "darkest" ] ) {
102
- container . classList . toggle ( `spectrum--${ c } ` , c === color && ! isRaw ) ;
86
+ for ( let c of [ "light" , "dark" ] ) {
87
+ container . classList . toggle ( `spectrum--${ c } ` , c === color ) ;
103
88
}
104
89
105
90
for ( const s of [ "medium" , "large" ] ) {
106
- container . classList . toggle ( `spectrum--${ s } ` , s === scale && ! isRaw ) ;
91
+ container . classList . toggle ( `spectrum--${ s } ` , s === scale ) ;
107
92
}
108
93
109
94
if ( ! isTestingWrapper ) {
0 commit comments