@instructure/ui-codemods 11.7.4-snapshot-135 → 11.7.4-snapshot-142
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -2
- package/lib/__node_tests__/codemods.test.ts +8 -0
- package/lib/__node_tests__/runTest.ts +8 -5
- package/lib/index.ts +3 -1
- package/lib/multiVersionThemeVariablesCodemod/migrateComponentOverridesToThemeOverride.ts +480 -0
- package/lib/multiVersionThemeVariablesCodemod/multiVersionThemeVariablesCodemod.ts +49 -0
- package/lib/multiVersionThemeVariablesCodemod/themeVariableMappings/index.ts +1255 -0
- package/lib/multiVersionThemeVariablesCodemod/transformThemeVariables.ts +734 -0
- package/lib/utils/codemodHelpers.ts +23 -3
- package/package.json +3 -2
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -0,0 +1,1255 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The MIT License (MIT)
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/** A theme variable that was renamed in the new theming system. */
|
|
26
|
+
export interface RenamedVariable {
|
|
27
|
+
/** the new theme variable name */
|
|
28
|
+
to: string
|
|
29
|
+
/** optional note shown to the user about the rename */
|
|
30
|
+
warning?: string
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** A theme variable that was removed in the new theming system. */
|
|
34
|
+
export interface RemovedVariable {
|
|
35
|
+
/** optional note shown to the user about the removal (e.g. what to use instead) */
|
|
36
|
+
warning?: string
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* A theme variable kept under the same name, but changed in a way the codemod
|
|
41
|
+
* can't fix automatically (e.g. its value shape changed). It is left in place
|
|
42
|
+
* and the user is warned to review it.
|
|
43
|
+
*/
|
|
44
|
+
export interface WarnedVariable {
|
|
45
|
+
/** note shown to the user about what changed and what to check */
|
|
46
|
+
warning: string
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** A theme variable that is unchanged for a given variant (left as-is). */
|
|
50
|
+
export interface KeptVariable {
|
|
51
|
+
/** marks the token as kept under the same name for this variant */
|
|
52
|
+
keep: true
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* A theme variable whose migration depends on a component prop (e.g. Checkbox's
|
|
57
|
+
* `variant`). The same v1 token maps to a different v2 outcome for each variant
|
|
58
|
+
* because the variants now read different token slots. Per-instance
|
|
59
|
+
* `themeOverride` is resolved by reading the static `variant` prop; if it can't
|
|
60
|
+
* be determined statically (dynamic expression), the token is left unchanged and
|
|
61
|
+
* the user is warned. Each per-variant outcome is a rename (`to`), a removal, or
|
|
62
|
+
* `keep` (unchanged for that variant).
|
|
63
|
+
*/
|
|
64
|
+
export interface VariantDependentVariable {
|
|
65
|
+
/** outcome when `variant="toggle"` (renders ToggleFacade -> `Toggle` slot) */
|
|
66
|
+
toggle: RenamedVariable | RemovedVariable | KeptVariable
|
|
67
|
+
/** outcome for the default/`variant="simple"` checkbox (CheckboxFacade -> `Checkbox` slot) */
|
|
68
|
+
simple: RenamedVariable | RemovedVariable | KeptVariable
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface ComponentMapping {
|
|
72
|
+
/** the package the component is imported from */
|
|
73
|
+
import: string
|
|
74
|
+
/** old theme variable name -> { new name, optional note } */
|
|
75
|
+
renamed?: Record<string, RenamedVariable>
|
|
76
|
+
/** old theme variable name -> { optional note } */
|
|
77
|
+
removed?: Record<string, RemovedVariable>
|
|
78
|
+
/** theme variable name -> { note } for tokens kept as-is but warned about */
|
|
79
|
+
warned?: Record<string, WarnedVariable>
|
|
80
|
+
/**
|
|
81
|
+
* old theme variable name -> per-variant outcome, for tokens that migrate
|
|
82
|
+
* differently depending on a component prop (currently only Checkbox's
|
|
83
|
+
* `variant`). Only applied to per-instance `themeOverride` props, where the
|
|
84
|
+
* variant can be read from the element.
|
|
85
|
+
*/
|
|
86
|
+
variantDependent?: Record<string, VariantDependentVariable>
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* The source-of-truth table of component theme variable changes, keyed by
|
|
91
|
+
* component name. Built component-by-component from the upgrade guide and the
|
|
92
|
+
* v1/v2 `theme.ts` diffs (`renamed` for value-preserving name changes,
|
|
93
|
+
* `removed` for tokens with no 1:1 successor).
|
|
94
|
+
*/
|
|
95
|
+
export const THEME_VARIABLE_MAPPINGS: Record<string, ComponentMapping> = {
|
|
96
|
+
Alert: {
|
|
97
|
+
import: '@instructure/ui-alerts',
|
|
98
|
+
removed: {
|
|
99
|
+
boxShadow: {
|
|
100
|
+
warning:
|
|
101
|
+
'`boxShadow` has been removed; it now uses the `sharedTokens.boxShadow.elevation4` shared token.'
|
|
102
|
+
},
|
|
103
|
+
contentPadding: {
|
|
104
|
+
warning:
|
|
105
|
+
'`contentPadding` has been removed; use `contentPaddingVertical` and `contentPaddingHorizontal` instead.'
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
Avatar: {
|
|
110
|
+
import: '@instructure/ui-avatar',
|
|
111
|
+
renamed: {
|
|
112
|
+
background: { to: 'backgroundColor' },
|
|
113
|
+
borderWidthSmall: { to: 'borderWidthSm' },
|
|
114
|
+
borderWidthMedium: { to: 'borderWidthMd' }
|
|
115
|
+
},
|
|
116
|
+
removed: {
|
|
117
|
+
boxShadowColor: {
|
|
118
|
+
warning:
|
|
119
|
+
'`boxShadowColor`/`boxShadowBlur` were removed; `boxShadow` is now a single object token.'
|
|
120
|
+
},
|
|
121
|
+
boxShadowBlur: {
|
|
122
|
+
warning:
|
|
123
|
+
'`boxShadowColor`/`boxShadowBlur` were removed; `boxShadow` is now a single object token.'
|
|
124
|
+
},
|
|
125
|
+
color: {
|
|
126
|
+
warning:
|
|
127
|
+
"Avatar's color system was reworked to `accent1`-`accent6`; use `blueBackgroundColor`/`blueTextColor` instead of `color`."
|
|
128
|
+
},
|
|
129
|
+
colorShamrock: {
|
|
130
|
+
warning:
|
|
131
|
+
"Avatar's color system was reworked to `accent1`-`accent6`; use `greenBackgroundColor`/`greenTextColor` instead of `colorShamrock`."
|
|
132
|
+
},
|
|
133
|
+
colorBarney: {
|
|
134
|
+
warning:
|
|
135
|
+
"Avatar's color system was reworked to `accent1`-`accent6`; use `blueBackgroundColor`/`blueTextColor` instead of `colorBarney`."
|
|
136
|
+
},
|
|
137
|
+
colorCrimson: {
|
|
138
|
+
warning:
|
|
139
|
+
"Avatar's color system was reworked to `accent1`-`accent6`; use `redBackgroundColor`/`redTextColor` instead of `colorCrimson`."
|
|
140
|
+
},
|
|
141
|
+
colorFire: {
|
|
142
|
+
warning:
|
|
143
|
+
"Avatar's color system was reworked to `accent1`-`accent6`; use `orangeBackgroundColor`/`orangeTextColor` instead of `colorFire`."
|
|
144
|
+
},
|
|
145
|
+
colorLicorice: {
|
|
146
|
+
warning:
|
|
147
|
+
"Avatar's color system was reworked to `accent1`-`accent6`; use `ashBackgroundColor`/`ashTextColor` instead of `colorLicorice`."
|
|
148
|
+
},
|
|
149
|
+
colorAsh: {
|
|
150
|
+
warning:
|
|
151
|
+
"Avatar's color system was reworked to `accent1`-`accent6`; use `greyBackgroundColor`/`greyTextColor` instead of `colorAsh`."
|
|
152
|
+
},
|
|
153
|
+
aiFontColor: {
|
|
154
|
+
warning: 'the AI variant text now uses `textOnColor`.'
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
Billboard: {
|
|
159
|
+
import: '@instructure/ui-billboard',
|
|
160
|
+
removed: {
|
|
161
|
+
iconColor: {},
|
|
162
|
+
iconHoverColor: {}
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
Spinner: {
|
|
166
|
+
import: '@instructure/ui-spinner',
|
|
167
|
+
renamed: {
|
|
168
|
+
xSmallBorderWidth: { to: 'strokeWidthXs' },
|
|
169
|
+
smallBorderWidth: { to: 'strokeWidthSm' },
|
|
170
|
+
mediumBorderWidth: { to: 'strokeWidthMd' },
|
|
171
|
+
largeBorderWidth: { to: 'strokeWidthLg' }
|
|
172
|
+
},
|
|
173
|
+
removed: {
|
|
174
|
+
xSmallSize: {
|
|
175
|
+
warning:
|
|
176
|
+
'`xSmallSize` has been removed; use `containerSizeXs` (outer container) and `spinnerSizeXs` (the circle).'
|
|
177
|
+
},
|
|
178
|
+
smallSize: {
|
|
179
|
+
warning:
|
|
180
|
+
'`smallSize` has been removed; use `containerSizeSm` (outer container) and `spinnerSizeSm` (the circle).'
|
|
181
|
+
},
|
|
182
|
+
mediumSize: {
|
|
183
|
+
warning:
|
|
184
|
+
'`mediumSize` has been removed; use `containerSizeMd` (outer container) and `spinnerSizeMd` (the circle).'
|
|
185
|
+
},
|
|
186
|
+
largeSize: {
|
|
187
|
+
warning:
|
|
188
|
+
'`largeSize` has been removed; use `containerSizeLg` (outer container) and `spinnerSizeLg` (the circle).'
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
Metric: {
|
|
193
|
+
import: '@instructure/ui-metric',
|
|
194
|
+
removed: {
|
|
195
|
+
padding: {
|
|
196
|
+
warning:
|
|
197
|
+
'`padding` has been removed. Use `paddingHorizontal` for left/right padding'
|
|
198
|
+
},
|
|
199
|
+
fontFamily: {
|
|
200
|
+
warning:
|
|
201
|
+
'`fontFamily` has been removed. Use `valueFontFamily` and `labelFontFamily` for setting the value and label font families'
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
MetricGroup: {
|
|
206
|
+
import: '@instructure/ui-metric',
|
|
207
|
+
removed: {
|
|
208
|
+
lineHeight: {}
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
Modal: {
|
|
212
|
+
import: '@instructure/ui-modal',
|
|
213
|
+
renamed: {
|
|
214
|
+
background: { to: 'backgroundColor' },
|
|
215
|
+
inverseBackground: { to: 'inverseBackgroundColor' }
|
|
216
|
+
},
|
|
217
|
+
warned: {
|
|
218
|
+
boxShadow: {
|
|
219
|
+
warning:
|
|
220
|
+
'`boxShadow` is now an object (`{ 0: {…}, 1: {…} }`) instead of a CSS string; update any string override.'
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
'Modal.Body': {
|
|
225
|
+
import: '@instructure/ui-modal',
|
|
226
|
+
renamed: {
|
|
227
|
+
inverseBackground: { to: 'inverseBackgroundColor' }
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
'Modal.Header': {
|
|
231
|
+
import: '@instructure/ui-modal',
|
|
232
|
+
renamed: {
|
|
233
|
+
background: { to: 'backgroundColor' },
|
|
234
|
+
inverseBackground: { to: 'inverseBackgroundColor' }
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
'Modal.Footer': {
|
|
238
|
+
import: '@instructure/ui-modal',
|
|
239
|
+
renamed: {
|
|
240
|
+
background: { to: 'backgroundColor' },
|
|
241
|
+
inverseBackground: { to: 'inverseBackgroundColor' }
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
NumberInput: {
|
|
245
|
+
import: '@instructure/ui-number-input',
|
|
246
|
+
renamed: {
|
|
247
|
+
color: { to: 'textColor' },
|
|
248
|
+
background: { to: 'backgroundColor' },
|
|
249
|
+
arrowsHoverBackgroundColor: { to: 'arrowsBackgroundHoverColor' },
|
|
250
|
+
mediumFontSize: { to: 'fontSizeMd' },
|
|
251
|
+
largeFontSize: { to: 'fontSizeLg' },
|
|
252
|
+
mediumHeight: { to: 'heightMd' },
|
|
253
|
+
largeHeight: { to: 'heightLg' }
|
|
254
|
+
},
|
|
255
|
+
removed: {
|
|
256
|
+
padding: {
|
|
257
|
+
warning:
|
|
258
|
+
'`padding` has been removed. Use `paddingHorizontalMd` and `paddingHorizontalLg` for horizontal padding'
|
|
259
|
+
},
|
|
260
|
+
arrowsActiveBoxShadow: {
|
|
261
|
+
warning:
|
|
262
|
+
'`arrowsActiveBoxShadow` has been removed; the arrow `:active` state now uses `arrowsBackgroundActiveColor` and `arrowsBorderActiveColor`'
|
|
263
|
+
},
|
|
264
|
+
borderStyle: {},
|
|
265
|
+
arrowsColor: {},
|
|
266
|
+
requiredInvalidColor: {},
|
|
267
|
+
errorOutlineColor: {},
|
|
268
|
+
focusOutlineWidth: {},
|
|
269
|
+
focusOutlineStyle: {},
|
|
270
|
+
focusOutlineColor: {}
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
Heading: {
|
|
274
|
+
import: '@instructure/ui-heading',
|
|
275
|
+
renamed: {
|
|
276
|
+
primaryColor: { to: 'baseColor' },
|
|
277
|
+
secondaryColor: { to: 'mutedColor' },
|
|
278
|
+
primaryInverseColor: { to: 'inverseColor' },
|
|
279
|
+
secondaryInverseColor: { to: 'inverseColor' }
|
|
280
|
+
},
|
|
281
|
+
removed: {
|
|
282
|
+
weightImportant: {},
|
|
283
|
+
lineHeight125: {},
|
|
284
|
+
lineHeight150: {}
|
|
285
|
+
},
|
|
286
|
+
warned: {
|
|
287
|
+
titlePageDesktop: {
|
|
288
|
+
warning:
|
|
289
|
+
'`titlePageDesktop` is now a full typography object instead of just a font size; update any override.'
|
|
290
|
+
},
|
|
291
|
+
titlePageMobile: {
|
|
292
|
+
warning:
|
|
293
|
+
'`titlePageMobile` is now a full typography object instead of just a font size; update any override.'
|
|
294
|
+
},
|
|
295
|
+
titleSection: {
|
|
296
|
+
warning:
|
|
297
|
+
'`titleSection` is now a full typography object instead of just a font size; update any override.'
|
|
298
|
+
},
|
|
299
|
+
titleCardSection: {
|
|
300
|
+
warning:
|
|
301
|
+
'`titleCardSection` is now a full typography object instead of just a font size; update any override.'
|
|
302
|
+
},
|
|
303
|
+
titleModule: {
|
|
304
|
+
warning:
|
|
305
|
+
'`titleModule` is now a full typography object instead of just a font size; update any override.'
|
|
306
|
+
},
|
|
307
|
+
titleCardLarge: {
|
|
308
|
+
warning:
|
|
309
|
+
'`titleCardLarge` is now a full typography object instead of just a font size; update any override.'
|
|
310
|
+
},
|
|
311
|
+
titleCardRegular: {
|
|
312
|
+
warning:
|
|
313
|
+
'`titleCardRegular` is now a full typography object instead of just a font size; update any override.'
|
|
314
|
+
},
|
|
315
|
+
titleCardMini: {
|
|
316
|
+
warning:
|
|
317
|
+
'`titleCardMini` is now a full typography object instead of just a font size; update any override.'
|
|
318
|
+
},
|
|
319
|
+
label: {
|
|
320
|
+
warning:
|
|
321
|
+
'`label` is now a full typography object instead of just a font size; update any override.'
|
|
322
|
+
},
|
|
323
|
+
labelInline: {
|
|
324
|
+
warning:
|
|
325
|
+
'`labelInline` is now a full typography object instead of just a font size; update any override.'
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
Tag: {
|
|
330
|
+
import: '@instructure/ui-tag',
|
|
331
|
+
removed: {
|
|
332
|
+
defaultIconColor: {},
|
|
333
|
+
defaultIconHoverColor: {},
|
|
334
|
+
focusOutlineColor: {},
|
|
335
|
+
focusOutlineStyle: {},
|
|
336
|
+
focusOutlineWidth: {},
|
|
337
|
+
padding: {
|
|
338
|
+
warning:
|
|
339
|
+
'paddingHorizontal replaces padding for horizontal padding control'
|
|
340
|
+
},
|
|
341
|
+
paddingSmall: {
|
|
342
|
+
warning:
|
|
343
|
+
'paddingHorizontalSmall replaces paddingSmall for horizontal padding control'
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
Pill: {
|
|
348
|
+
import: '@instructure/ui-pill',
|
|
349
|
+
renamed: {
|
|
350
|
+
padding: {
|
|
351
|
+
to: 'paddingHorizontal',
|
|
352
|
+
warning: 'now only controls horizontal padding'
|
|
353
|
+
},
|
|
354
|
+
background: { to: 'backgroundColor' }
|
|
355
|
+
},
|
|
356
|
+
removed: {
|
|
357
|
+
primaryColor: {
|
|
358
|
+
warning: 'split into baseTextColor and baseBorderColor'
|
|
359
|
+
},
|
|
360
|
+
successColor: {
|
|
361
|
+
warning: 'split into successTextColor and successBorderColor'
|
|
362
|
+
},
|
|
363
|
+
infoColor: { warning: 'split into infoTextColor and infoBorderColor' },
|
|
364
|
+
warningColor: {
|
|
365
|
+
warning: 'split into warningTextColor and warningBorderColor'
|
|
366
|
+
},
|
|
367
|
+
dangerColor: {
|
|
368
|
+
warning: 'replaced with errorTextColor and errorBorderColor'
|
|
369
|
+
},
|
|
370
|
+
alertColor: { warning: 'use info* variables instead' }
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
Text: {
|
|
374
|
+
import: '@instructure/ui-text',
|
|
375
|
+
renamed: {
|
|
376
|
+
primaryColor: { to: 'baseColor' },
|
|
377
|
+
secondaryColor: { to: 'mutedColor' },
|
|
378
|
+
primaryInverseColor: { to: 'inverseColor' },
|
|
379
|
+
secondaryInverseColor: { to: 'inverseColor' },
|
|
380
|
+
brandColor: { to: 'primaryColor' },
|
|
381
|
+
dangerColor: { to: 'errorColor' },
|
|
382
|
+
weightImportant: { to: 'fontWeightImportant' },
|
|
383
|
+
weightRegular: { to: 'fontWeightRegular' }
|
|
384
|
+
},
|
|
385
|
+
removed: {
|
|
386
|
+
alertColor: {}
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
TextArea: {
|
|
390
|
+
import: '@instructure/ui-text-area',
|
|
391
|
+
renamed: {
|
|
392
|
+
smallFontSize: { to: 'fontSizeSm' },
|
|
393
|
+
mediumFontSize: { to: 'fontSizeMd' },
|
|
394
|
+
largeFontSize: { to: 'fontSizeLg' },
|
|
395
|
+
color: { to: 'textColor' },
|
|
396
|
+
background: { to: 'backgroundColor' }
|
|
397
|
+
},
|
|
398
|
+
removed: {
|
|
399
|
+
requiredInvalidColor: {},
|
|
400
|
+
borderStyle: {},
|
|
401
|
+
borderTopColor: {},
|
|
402
|
+
borderRightColor: {},
|
|
403
|
+
borderBottomColor: {},
|
|
404
|
+
borderLeftColor: {},
|
|
405
|
+
focusOutlineColor: {},
|
|
406
|
+
focusOutlineWidth: {},
|
|
407
|
+
focusOutlineStyle: {}
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
TextInput: {
|
|
411
|
+
import: '@instructure/ui-text-input',
|
|
412
|
+
renamed: {
|
|
413
|
+
smallFontSize: { to: 'fontSizeSm' },
|
|
414
|
+
mediumFontSize: { to: 'fontSizeMd' },
|
|
415
|
+
largeFontSize: { to: 'fontSizeLg' },
|
|
416
|
+
smallHeight: { to: 'heightSm' },
|
|
417
|
+
mediumHeight: { to: 'heightMd' },
|
|
418
|
+
largeHeight: { to: 'heightLg' },
|
|
419
|
+
color: { to: 'textColor' },
|
|
420
|
+
background: { to: 'backgroundColor' }
|
|
421
|
+
},
|
|
422
|
+
removed: {
|
|
423
|
+
padding: {},
|
|
424
|
+
borderStyle: {},
|
|
425
|
+
focusOutlineWidth: {},
|
|
426
|
+
focusOutlineStyle: {},
|
|
427
|
+
focusOutlineColor: {},
|
|
428
|
+
requiredInvalidColor: {}
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
'Rating.Icon': {
|
|
432
|
+
import: '@instructure/ui-rating',
|
|
433
|
+
removed: {
|
|
434
|
+
smallIconFontSize: {},
|
|
435
|
+
mediumIconFontSize: {},
|
|
436
|
+
largeIconFontSize: {}
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
RangeInput: {
|
|
440
|
+
import: '@instructure/ui-range-input',
|
|
441
|
+
renamed: {
|
|
442
|
+
handleShadow: {
|
|
443
|
+
to: 'boxShadow',
|
|
444
|
+
warning:
|
|
445
|
+
'`handleShadow` is now `boxShadow`, an object (`{ 0: {…}, 1: {…} }`) instead of a CSS string; update any string override.'
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
removed: {
|
|
449
|
+
handleFocusRingSize: {
|
|
450
|
+
warning: 'style uses sharedTokens.focusOutline.width token'
|
|
451
|
+
},
|
|
452
|
+
handleFocusRingColor: {
|
|
453
|
+
warning: 'style uses sharedTokens.focusOutline.onColor token'
|
|
454
|
+
},
|
|
455
|
+
handleFocusOutlineColor: {},
|
|
456
|
+
handleFocusOutlineWidth: {},
|
|
457
|
+
handleShadowColor: {}
|
|
458
|
+
},
|
|
459
|
+
warned: {
|
|
460
|
+
valueSmallPadding: {
|
|
461
|
+
warning: 'now only sets horizontal padding of the value'
|
|
462
|
+
},
|
|
463
|
+
valueMediumPadding: {
|
|
464
|
+
warning: 'now only sets horizontal padding of the value'
|
|
465
|
+
},
|
|
466
|
+
valueLargePadding: {
|
|
467
|
+
warning: 'now only sets horizontal padding of the value'
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
RadioInput: {
|
|
472
|
+
import: '@instructure/ui-radio-input',
|
|
473
|
+
renamed: {
|
|
474
|
+
background: { to: 'backgroundColor' },
|
|
475
|
+
hoverBorderColor: { to: 'borderHoverColor' },
|
|
476
|
+
labelColor: { to: 'labelBaseColor' },
|
|
477
|
+
labelFontFamily: { to: 'fontFamily' },
|
|
478
|
+
labelFontWeight: { to: 'fontWeight' },
|
|
479
|
+
simpleFacadeMarginEnd: { to: 'gap' },
|
|
480
|
+
simpleFacadeSmallSize: { to: 'controlSizeSm' },
|
|
481
|
+
simpleFacadeMediumSize: { to: 'controlSizeMd' },
|
|
482
|
+
simpleFacadeLargeSize: { to: 'controlSizeLg' },
|
|
483
|
+
simpleCheckedInsetSmall: { to: 'checkedInsetSm' },
|
|
484
|
+
simpleCheckedInsetMedium: { to: 'checkedInsetMd' },
|
|
485
|
+
simpleCheckedInsetLarge: { to: 'checkedInsetLg' },
|
|
486
|
+
simpleFontSizeSmall: { to: 'fontSizeSm' },
|
|
487
|
+
simpleFontSizeMedium: { to: 'fontSizeMd' },
|
|
488
|
+
simpleFontSizeLarge: { to: 'fontSizeLg' }
|
|
489
|
+
},
|
|
490
|
+
removed: {
|
|
491
|
+
focusBorderColor: {
|
|
492
|
+
warning: 'focus outline is now controlled via sharedTokens'
|
|
493
|
+
},
|
|
494
|
+
focusBorderWidth: {
|
|
495
|
+
warning: 'focus outline is now controlled via sharedTokens'
|
|
496
|
+
},
|
|
497
|
+
focusBorderStyle: {
|
|
498
|
+
warning: 'focus outline is now controlled via sharedTokens'
|
|
499
|
+
},
|
|
500
|
+
labelLineHeight: {
|
|
501
|
+
warning:
|
|
502
|
+
'split into size-specific lineHeightSm, lineHeightMd, lineHeightLg'
|
|
503
|
+
}
|
|
504
|
+
},
|
|
505
|
+
warned: {
|
|
506
|
+
toggleShadow: {
|
|
507
|
+
warning:
|
|
508
|
+
'`toggleShadow` is now an object (`{ 0: {…}, 1: {…} }`) instead of a CSS string; update any string override.'
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
},
|
|
512
|
+
RadioInputGroup: {
|
|
513
|
+
import: '@instructure/ui-radio-input',
|
|
514
|
+
removed: {
|
|
515
|
+
invalidAsteriskColor: {}
|
|
516
|
+
}
|
|
517
|
+
},
|
|
518
|
+
Link: {
|
|
519
|
+
import: '@instructure/ui-link',
|
|
520
|
+
renamed: {
|
|
521
|
+
color: { to: 'textColor' },
|
|
522
|
+
hoverColor: { to: 'textHoverColor' },
|
|
523
|
+
colorInverse: { to: 'onColorTextColor' }
|
|
524
|
+
},
|
|
525
|
+
removed: {
|
|
526
|
+
fontSize: {},
|
|
527
|
+
fontSizeSmall: {},
|
|
528
|
+
lineHeight: {},
|
|
529
|
+
focusOutlineWidth: {},
|
|
530
|
+
focusOutlineStyle: {},
|
|
531
|
+
focusOutlineColor: {},
|
|
532
|
+
focusOutlineBorderRadius: {},
|
|
533
|
+
focusInverseOutlineColor: {},
|
|
534
|
+
focusInverseIconOutlineColor: {},
|
|
535
|
+
iconSize: {},
|
|
536
|
+
iconPlusTextMargin: {},
|
|
537
|
+
iconPlusTextMarginSmall: {},
|
|
538
|
+
textUnderlineOffset: {},
|
|
539
|
+
hoverTextDecorationWithinText: {},
|
|
540
|
+
hoverTextDecorationOutsideText: {},
|
|
541
|
+
textDecorationWithinText: {},
|
|
542
|
+
textDecorationOutsideText: {}
|
|
543
|
+
}
|
|
544
|
+
},
|
|
545
|
+
View: {
|
|
546
|
+
import: '@instructure/ui-view',
|
|
547
|
+
removed: {
|
|
548
|
+
marginXxxSmall: { warning: 'Use sharedTokens.spacing' },
|
|
549
|
+
marginXxSmall: { warning: 'Use sharedTokens.spacing' },
|
|
550
|
+
marginXSmall: { warning: 'Use sharedTokens.spacing' },
|
|
551
|
+
marginSmall: { warning: 'Use sharedTokens.spacing' },
|
|
552
|
+
marginMedium: { warning: 'Use sharedTokens.spacing' },
|
|
553
|
+
marginLarge: { warning: 'Use sharedTokens.spacing' },
|
|
554
|
+
marginXLarge: { warning: 'Use sharedTokens.spacing' },
|
|
555
|
+
marginXxLarge: { warning: 'Use sharedTokens.spacing' },
|
|
556
|
+
paddingXxxSmall: { warning: 'Use sharedTokens.spacing' },
|
|
557
|
+
paddingXxSmall: { warning: 'Use sharedTokens.spacing' },
|
|
558
|
+
paddingXSmall: { warning: 'Use sharedTokens.spacing' },
|
|
559
|
+
paddingSmall: { warning: 'Use sharedTokens.spacing' },
|
|
560
|
+
paddingMedium: { warning: 'Use sharedTokens.spacing' },
|
|
561
|
+
paddingLarge: { warning: 'Use sharedTokens.spacing' },
|
|
562
|
+
paddingXLarge: { warning: 'Use sharedTokens.spacing' },
|
|
563
|
+
paddingXxLarge: { warning: 'Use sharedTokens.spacing' },
|
|
564
|
+
shadowResting: { warning: 'Use sharedTokens.boxShadow.elevation*' },
|
|
565
|
+
shadowAbove: { warning: 'Use sharedTokens.boxShadow.elevation*' },
|
|
566
|
+
shadowTopmost: { warning: 'Use sharedTokens.boxShadow.elevation*' },
|
|
567
|
+
borderRadiusSmall: { warning: 'Use sharedTokens.radius*' },
|
|
568
|
+
borderRadiusMedium: { warning: 'Use sharedTokens.radius*' },
|
|
569
|
+
borderRadiusLarge: { warning: 'Use sharedTokens.radius*' },
|
|
570
|
+
borderWidthSmall: { warning: 'Use sharedTokens.width*' },
|
|
571
|
+
borderWidthMedium: { warning: 'Use sharedTokens.width*' },
|
|
572
|
+
borderWidthLarge: { warning: 'Use sharedTokens.width*' },
|
|
573
|
+
focusOutlineStyle: {
|
|
574
|
+
warning: 'focus outline is now controlled via sharedTokens.focusOutline'
|
|
575
|
+
},
|
|
576
|
+
focusOutlineWidth: {
|
|
577
|
+
warning: 'focus outline is now controlled via sharedTokens.focusOutline'
|
|
578
|
+
},
|
|
579
|
+
focusOutlineOffset: {
|
|
580
|
+
warning: 'focus outline is now controlled via sharedTokens.focusOutline'
|
|
581
|
+
},
|
|
582
|
+
focusOutlineInset: {
|
|
583
|
+
warning: 'focus outline is now controlled via sharedTokens.focusOutline'
|
|
584
|
+
},
|
|
585
|
+
focusColorInfo: {
|
|
586
|
+
warning: 'focus outline is now controlled via sharedTokens.focusOutline'
|
|
587
|
+
},
|
|
588
|
+
focusColorDanger: {
|
|
589
|
+
warning: 'focus outline is now controlled via sharedTokens.focusOutline'
|
|
590
|
+
},
|
|
591
|
+
focusColorSuccess: {
|
|
592
|
+
warning: 'focus outline is now controlled via sharedTokens.focusOutline'
|
|
593
|
+
},
|
|
594
|
+
focusColorInverse: {
|
|
595
|
+
warning: 'focus outline is now controlled via sharedTokens.focusOutline'
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
},
|
|
599
|
+
Tray: {
|
|
600
|
+
import: '@instructure/ui-tray',
|
|
601
|
+
renamed: {
|
|
602
|
+
background: { to: 'backgroundColor' },
|
|
603
|
+
xSmallWidth: { to: 'widthXs' },
|
|
604
|
+
smallWidth: { to: 'widthSm' },
|
|
605
|
+
regularWidth: { to: 'widthMd' },
|
|
606
|
+
mediumWidth: { to: 'widthLg' },
|
|
607
|
+
largeWidth: { to: 'widthXl' }
|
|
608
|
+
},
|
|
609
|
+
removed: {
|
|
610
|
+
borderStyle: {},
|
|
611
|
+
position: {}
|
|
612
|
+
},
|
|
613
|
+
warned: {
|
|
614
|
+
boxShadow: {
|
|
615
|
+
warning:
|
|
616
|
+
'`boxShadow` is now an object (`{ 0: {…}, 1: {…} }`) instead of a CSS string; update any string override.'
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
},
|
|
620
|
+
ToggleDetails: {
|
|
621
|
+
import: '@instructure/ui-toggle-details',
|
|
622
|
+
renamed: {
|
|
623
|
+
smallIconSize: {
|
|
624
|
+
to: 'contentPaddingSmall',
|
|
625
|
+
warning:
|
|
626
|
+
'`smallIconSize` is now `contentPaddingSmall` and only controls the content padding; the icon is now self-sized.'
|
|
627
|
+
},
|
|
628
|
+
mediumIconSize: {
|
|
629
|
+
to: 'contentPaddingMedium',
|
|
630
|
+
warning:
|
|
631
|
+
'`mediumIconSize` is now `contentPaddingMedium` and only controls the content padding; the icon is now self-sized.'
|
|
632
|
+
},
|
|
633
|
+
largeIconSize: {
|
|
634
|
+
to: 'contentPaddingLarge',
|
|
635
|
+
warning:
|
|
636
|
+
'`largeIconSize` is now `contentPaddingLarge` and only controls the content padding; the icon is now self-sized.'
|
|
637
|
+
}
|
|
638
|
+
},
|
|
639
|
+
removed: {
|
|
640
|
+
toggleFocusBorderColor: {}
|
|
641
|
+
}
|
|
642
|
+
},
|
|
643
|
+
Breadcrumb: {
|
|
644
|
+
import: '@instructure/ui-breadcrumb',
|
|
645
|
+
removed: {
|
|
646
|
+
fontFamily: { warning: 'handled in Link component' },
|
|
647
|
+
separatorColor: { warning: 'handled in Link component' },
|
|
648
|
+
smallSeparatorFontSize: { warning: 'handled in Link component' },
|
|
649
|
+
smallFontSize: { warning: 'handled in Link component' },
|
|
650
|
+
mediumSeparatorFontSize: { warning: 'handled in Link component' },
|
|
651
|
+
mediumFontSize: { warning: 'handled in Link component' },
|
|
652
|
+
largeSeparatorFontSize: { warning: 'handled in Link component' },
|
|
653
|
+
largeFontSize: { warning: 'handled in Link component' }
|
|
654
|
+
}
|
|
655
|
+
},
|
|
656
|
+
// Checkbox renders either CheckboxFacade (default / `variant="simple"`, reads
|
|
657
|
+
// the `Checkbox` token slot) or ToggleFacade (`variant="toggle"`, reads the
|
|
658
|
+
// `Toggle` slot) and forwards its `themeOverride` to whichever one renders.
|
|
659
|
+
// `renamed`/`removed` below are non-variant-dependent: either shared by both
|
|
660
|
+
// facades with the same v2 fate, or used by only one facade (so a `themeOverride`
|
|
661
|
+
// setting them implies that variant). Tokens that migrate *differently* per
|
|
662
|
+
// variant are in `variantDependent` and resolved from the element's `variant`.
|
|
663
|
+
Checkbox: {
|
|
664
|
+
import: '@instructure/ui-checkbox',
|
|
665
|
+
renamed: {
|
|
666
|
+
background: { to: 'backgroundColor' },
|
|
667
|
+
checkedBorderColor: { to: 'borderCheckedColor' },
|
|
668
|
+
hoverBorderColor: { to: 'borderHoverColor' },
|
|
669
|
+
marginRight: { to: 'gap' },
|
|
670
|
+
facadeSizeSmall: { to: 'controlSizeSm' },
|
|
671
|
+
facadeSizeMedium: { to: 'controlSizeMd' },
|
|
672
|
+
facadeSizeLarge: { to: 'controlSizeLg' },
|
|
673
|
+
// Checkbox wrapper token (applies to both variants)
|
|
674
|
+
requiredInvalidColor: { to: 'asteriskColor' }
|
|
675
|
+
},
|
|
676
|
+
removed: {
|
|
677
|
+
// notes mirror the Checkbox upgrade-guide tables (empty -> silent)
|
|
678
|
+
color: {},
|
|
679
|
+
focusBorderStyle: {},
|
|
680
|
+
focusBorderWidth: {},
|
|
681
|
+
focusBorderColor: {},
|
|
682
|
+
padding: {},
|
|
683
|
+
checkedLabelColor: {},
|
|
684
|
+
// CheckboxFacade-only: in v2 the icon fontSize collapses into the shared
|
|
685
|
+
// fontSize* tokens that labelFontSize* already maps to, so removed (per guide).
|
|
686
|
+
iconSizeSmall: {},
|
|
687
|
+
iconSizeMedium: {},
|
|
688
|
+
iconSizeLarge: {},
|
|
689
|
+
// ToggleFacade-only
|
|
690
|
+
focusOutlineColor: {},
|
|
691
|
+
checkedIconColor: {},
|
|
692
|
+
uncheckedIconColor: {},
|
|
693
|
+
// Checkbox wrapper tokens
|
|
694
|
+
checkErrorInsetWidth: { warning: 'split into new size variants' },
|
|
695
|
+
toggleErrorInsetWidth: { warning: 'custom calculation added' }
|
|
696
|
+
},
|
|
697
|
+
variantDependent: {
|
|
698
|
+
checkedBackground: {
|
|
699
|
+
simple: { to: 'backgroundCheckedColor' },
|
|
700
|
+
toggle: { to: 'checkedBackgroundColor' }
|
|
701
|
+
},
|
|
702
|
+
labelLineHeight: {
|
|
703
|
+
simple: { to: 'lineHeight' },
|
|
704
|
+
toggle: { warning: 'split into new size variants' }
|
|
705
|
+
},
|
|
706
|
+
labelFontSizeSmall: {
|
|
707
|
+
simple: { to: 'fontSizeSm' },
|
|
708
|
+
toggle: { to: 'labelFontSizeSm' }
|
|
709
|
+
},
|
|
710
|
+
labelFontSizeMedium: {
|
|
711
|
+
simple: { to: 'fontSizeMd' },
|
|
712
|
+
toggle: { to: 'labelFontSizeMd' }
|
|
713
|
+
},
|
|
714
|
+
labelFontSizeLarge: {
|
|
715
|
+
simple: { to: 'fontSizeLg' },
|
|
716
|
+
toggle: { to: 'labelFontSizeLg' }
|
|
717
|
+
},
|
|
718
|
+
// Renamed for the checkbox facade, kept unchanged for the toggle facade
|
|
719
|
+
// (ToggleFacade v2 still uses labelColor/labelFontFamily/labelFontWeight).
|
|
720
|
+
labelColor: {
|
|
721
|
+
simple: { to: 'labelBaseColor' },
|
|
722
|
+
toggle: { keep: true }
|
|
723
|
+
},
|
|
724
|
+
labelFontFamily: {
|
|
725
|
+
simple: { to: 'fontFamily' },
|
|
726
|
+
toggle: { keep: true }
|
|
727
|
+
},
|
|
728
|
+
labelFontWeight: {
|
|
729
|
+
simple: { to: 'fontWeight' },
|
|
730
|
+
toggle: { keep: true }
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
},
|
|
734
|
+
// Provider-override facades. In v1 the checkbox/toggle visuals were themed via
|
|
735
|
+
// `componentOverrides.CheckboxFacade` / `.ToggleFacade`; in v2 those facades read
|
|
736
|
+
// their own `CheckboxFacade` / `ToggleFacade` slots, so the overrides keep their
|
|
737
|
+
// key and only the visual tokens rename. These mirror the guide's
|
|
738
|
+
// "Checkbox (simple variant)" / "(toggle variant)" tables. (There are no
|
|
739
|
+
// `<CheckboxFacade>`/`<ToggleFacade>` JSX elements in user code; these entries
|
|
740
|
+
// only apply to provider `componentOverrides`.)
|
|
741
|
+
CheckboxFacade: {
|
|
742
|
+
import: '@instructure/ui-checkbox',
|
|
743
|
+
renamed: {
|
|
744
|
+
background: { to: 'backgroundColor' },
|
|
745
|
+
checkedBackground: { to: 'backgroundCheckedColor' },
|
|
746
|
+
checkedBorderColor: { to: 'borderCheckedColor' },
|
|
747
|
+
hoverBorderColor: { to: 'borderHoverColor' },
|
|
748
|
+
marginRight: { to: 'gap' },
|
|
749
|
+
facadeSizeSmall: { to: 'controlSizeSm' },
|
|
750
|
+
facadeSizeMedium: { to: 'controlSizeMd' },
|
|
751
|
+
facadeSizeLarge: { to: 'controlSizeLg' },
|
|
752
|
+
labelFontSizeSmall: { to: 'fontSizeSm' },
|
|
753
|
+
labelFontSizeMedium: { to: 'fontSizeMd' },
|
|
754
|
+
labelFontSizeLarge: { to: 'fontSizeLg' },
|
|
755
|
+
labelColor: { to: 'labelBaseColor' },
|
|
756
|
+
labelFontFamily: { to: 'fontFamily' },
|
|
757
|
+
labelFontWeight: { to: 'fontWeight' },
|
|
758
|
+
labelLineHeight: { to: 'lineHeight' }
|
|
759
|
+
},
|
|
760
|
+
removed: {
|
|
761
|
+
color: {},
|
|
762
|
+
padding: {},
|
|
763
|
+
checkedLabelColor: {},
|
|
764
|
+
iconSizeSmall: {},
|
|
765
|
+
iconSizeMedium: {},
|
|
766
|
+
iconSizeLarge: {},
|
|
767
|
+
focusBorderStyle: {},
|
|
768
|
+
focusBorderWidth: {},
|
|
769
|
+
focusBorderColor: {}
|
|
770
|
+
}
|
|
771
|
+
},
|
|
772
|
+
ToggleFacade: {
|
|
773
|
+
import: '@instructure/ui-checkbox',
|
|
774
|
+
renamed: {
|
|
775
|
+
background: { to: 'backgroundColor' },
|
|
776
|
+
checkedBackground: { to: 'checkedBackgroundColor' },
|
|
777
|
+
labelFontSizeSmall: { to: 'labelFontSizeSm' },
|
|
778
|
+
labelFontSizeMedium: { to: 'labelFontSizeMd' },
|
|
779
|
+
labelFontSizeLarge: { to: 'labelFontSizeLg' }
|
|
780
|
+
},
|
|
781
|
+
removed: {
|
|
782
|
+
color: {},
|
|
783
|
+
checkedIconColor: {},
|
|
784
|
+
uncheckedIconColor: {},
|
|
785
|
+
focusOutlineColor: {},
|
|
786
|
+
focusBorderWidth: {},
|
|
787
|
+
focusBorderStyle: {},
|
|
788
|
+
labelLineHeight: { warning: 'split into new size variants' }
|
|
789
|
+
}
|
|
790
|
+
},
|
|
791
|
+
CloseButton: {
|
|
792
|
+
import: '@instructure/ui-buttons',
|
|
793
|
+
removed: {
|
|
794
|
+
offsetMedium: { warning: 'now uses sharedTokens.spacing' },
|
|
795
|
+
offsetSmall: { warning: 'now uses sharedTokens.spacing' },
|
|
796
|
+
offsetXSmall: { warning: 'now uses sharedTokens.spacing' },
|
|
797
|
+
zIndex: { warning: 'hardcoded to 1' }
|
|
798
|
+
}
|
|
799
|
+
},
|
|
800
|
+
BaseButton: {
|
|
801
|
+
import: '@instructure/ui-buttons',
|
|
802
|
+
removed: {
|
|
803
|
+
smallPaddingTop: { warning: 'replaced by paddingVertical' },
|
|
804
|
+
smallPaddingBottom: { warning: 'replaced by paddingVertical' },
|
|
805
|
+
mediumPaddingTop: { warning: 'replaced by paddingVertical' },
|
|
806
|
+
mediumPaddingBottom: { warning: 'replaced by paddingVertical' },
|
|
807
|
+
largePaddingTop: { warning: 'replaced by paddingVertical' },
|
|
808
|
+
largePaddingBottom: { warning: 'replaced by paddingVertical' },
|
|
809
|
+
iconSizeSmall: { warning: 'icon sizing handled by Lucide icon system' },
|
|
810
|
+
iconSizeMedium: { warning: 'icon sizing handled by Lucide icon system' },
|
|
811
|
+
iconSizeLarge: { warning: 'icon sizing handled by Lucide icon system' },
|
|
812
|
+
iconTextGap: { warning: 'replaced by gapButtonContentSm/Md/Lg' },
|
|
813
|
+
iconTextGapCondensed: { warning: 'replaced by gapButtonContentSm' },
|
|
814
|
+
primaryActiveBoxShadow: {},
|
|
815
|
+
primaryGhostActiveBoxShadow: {},
|
|
816
|
+
secondaryActiveBoxShadow: {},
|
|
817
|
+
secondaryGhostActiveBoxShadow: {},
|
|
818
|
+
successActiveBoxShadow: {},
|
|
819
|
+
successGhostActiveBoxShadow: {},
|
|
820
|
+
dangerActiveBoxShadow: {},
|
|
821
|
+
dangerGhostActiveBoxShadow: {},
|
|
822
|
+
primaryInverseActiveBoxShadow: {},
|
|
823
|
+
primaryInverseGhostActiveBoxShadow: {}
|
|
824
|
+
}
|
|
825
|
+
},
|
|
826
|
+
CondensedButton: {
|
|
827
|
+
// Uses BaseButton's token set; in v2 it reads its own `CondensedButton` slot,
|
|
828
|
+
// so a provider `componentOverrides.CondensedButton` maps straight to
|
|
829
|
+
// `themeOverride.components.CondensedButton` (no re-key).
|
|
830
|
+
import: '@instructure/ui-buttons',
|
|
831
|
+
removed: {
|
|
832
|
+
smallPaddingTop: { warning: 'replaced by paddingVertical' },
|
|
833
|
+
smallPaddingBottom: { warning: 'replaced by paddingVertical' },
|
|
834
|
+
mediumPaddingTop: { warning: 'replaced by paddingVertical' },
|
|
835
|
+
mediumPaddingBottom: { warning: 'replaced by paddingVertical' },
|
|
836
|
+
largePaddingTop: { warning: 'replaced by paddingVertical' },
|
|
837
|
+
largePaddingBottom: { warning: 'replaced by paddingVertical' },
|
|
838
|
+
iconSizeSmall: { warning: 'icon sizing handled by Lucide icon system' },
|
|
839
|
+
iconSizeMedium: { warning: 'icon sizing handled by Lucide icon system' },
|
|
840
|
+
iconSizeLarge: { warning: 'icon sizing handled by Lucide icon system' },
|
|
841
|
+
iconTextGap: { warning: 'replaced by gapButtonContentSm/Md/Lg' },
|
|
842
|
+
iconTextGapCondensed: { warning: 'replaced by gapButtonContentSm' },
|
|
843
|
+
primaryActiveBoxShadow: {},
|
|
844
|
+
primaryGhostActiveBoxShadow: {},
|
|
845
|
+
secondaryActiveBoxShadow: {},
|
|
846
|
+
secondaryGhostActiveBoxShadow: {},
|
|
847
|
+
successActiveBoxShadow: {},
|
|
848
|
+
successGhostActiveBoxShadow: {},
|
|
849
|
+
dangerActiveBoxShadow: {},
|
|
850
|
+
dangerGhostActiveBoxShadow: {},
|
|
851
|
+
primaryInverseActiveBoxShadow: {},
|
|
852
|
+
primaryInverseGhostActiveBoxShadow: {}
|
|
853
|
+
}
|
|
854
|
+
},
|
|
855
|
+
Button: {
|
|
856
|
+
// Uses BaseButton's token set; in v2 it reads its own `Button` slot, so a
|
|
857
|
+
// provider `componentOverrides.Button` maps straight to
|
|
858
|
+
// `themeOverride.components.Button` (no re-key).
|
|
859
|
+
import: '@instructure/ui-buttons',
|
|
860
|
+
removed: {
|
|
861
|
+
smallPaddingTop: { warning: 'replaced by paddingVertical' },
|
|
862
|
+
smallPaddingBottom: { warning: 'replaced by paddingVertical' },
|
|
863
|
+
mediumPaddingTop: { warning: 'replaced by paddingVertical' },
|
|
864
|
+
mediumPaddingBottom: { warning: 'replaced by paddingVertical' },
|
|
865
|
+
largePaddingTop: { warning: 'replaced by paddingVertical' },
|
|
866
|
+
largePaddingBottom: { warning: 'replaced by paddingVertical' },
|
|
867
|
+
iconSizeSmall: { warning: 'icon sizing handled by Lucide icon system' },
|
|
868
|
+
iconSizeMedium: { warning: 'icon sizing handled by Lucide icon system' },
|
|
869
|
+
iconSizeLarge: { warning: 'icon sizing handled by Lucide icon system' },
|
|
870
|
+
iconTextGap: { warning: 'replaced by gapButtonContentSm/Md/Lg' },
|
|
871
|
+
iconTextGapCondensed: { warning: 'replaced by gapButtonContentSm' },
|
|
872
|
+
primaryActiveBoxShadow: {},
|
|
873
|
+
primaryGhostActiveBoxShadow: {},
|
|
874
|
+
secondaryActiveBoxShadow: {},
|
|
875
|
+
secondaryGhostActiveBoxShadow: {},
|
|
876
|
+
successActiveBoxShadow: {},
|
|
877
|
+
successGhostActiveBoxShadow: {},
|
|
878
|
+
dangerActiveBoxShadow: {},
|
|
879
|
+
dangerGhostActiveBoxShadow: {},
|
|
880
|
+
primaryInverseActiveBoxShadow: {},
|
|
881
|
+
primaryInverseGhostActiveBoxShadow: {}
|
|
882
|
+
}
|
|
883
|
+
},
|
|
884
|
+
IconButton: {
|
|
885
|
+
// Uses BaseButton's token set; in v2 it reads its own `IconButton` slot, so a
|
|
886
|
+
// provider `componentOverrides.IconButton` maps straight to
|
|
887
|
+
// `themeOverride.components.IconButton` (no re-key).
|
|
888
|
+
import: '@instructure/ui-buttons',
|
|
889
|
+
removed: {
|
|
890
|
+
smallPaddingTop: { warning: 'replaced by paddingVertical' },
|
|
891
|
+
smallPaddingBottom: { warning: 'replaced by paddingVertical' },
|
|
892
|
+
mediumPaddingTop: { warning: 'replaced by paddingVertical' },
|
|
893
|
+
mediumPaddingBottom: { warning: 'replaced by paddingVertical' },
|
|
894
|
+
largePaddingTop: { warning: 'replaced by paddingVertical' },
|
|
895
|
+
largePaddingBottom: { warning: 'replaced by paddingVertical' },
|
|
896
|
+
iconSizeSmall: { warning: 'icon sizing handled by Lucide icon system' },
|
|
897
|
+
iconSizeMedium: { warning: 'icon sizing handled by Lucide icon system' },
|
|
898
|
+
iconSizeLarge: { warning: 'icon sizing handled by Lucide icon system' },
|
|
899
|
+
iconTextGap: { warning: 'replaced by gapButtonContentSm/Md/Lg' },
|
|
900
|
+
iconTextGapCondensed: { warning: 'replaced by gapButtonContentSm' },
|
|
901
|
+
primaryActiveBoxShadow: {},
|
|
902
|
+
primaryGhostActiveBoxShadow: {},
|
|
903
|
+
secondaryActiveBoxShadow: {},
|
|
904
|
+
secondaryGhostActiveBoxShadow: {},
|
|
905
|
+
successActiveBoxShadow: {},
|
|
906
|
+
successGhostActiveBoxShadow: {},
|
|
907
|
+
dangerActiveBoxShadow: {},
|
|
908
|
+
dangerGhostActiveBoxShadow: {},
|
|
909
|
+
primaryInverseActiveBoxShadow: {},
|
|
910
|
+
primaryInverseGhostActiveBoxShadow: {}
|
|
911
|
+
}
|
|
912
|
+
},
|
|
913
|
+
'Table.Cell': {
|
|
914
|
+
import: '@instructure/ui-table',
|
|
915
|
+
removed: {
|
|
916
|
+
padding: {
|
|
917
|
+
warning: 'split into paddingVertical and paddingHorizontal'
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
},
|
|
921
|
+
'Table.ColHeader': {
|
|
922
|
+
import: '@instructure/ui-table',
|
|
923
|
+
removed: {
|
|
924
|
+
padding: {
|
|
925
|
+
warning: 'split into paddingVertical and paddingHorizontal'
|
|
926
|
+
},
|
|
927
|
+
focusOutlineColor: {},
|
|
928
|
+
focusOutlineStyle: {},
|
|
929
|
+
focusOutlineWidth: {},
|
|
930
|
+
sortedIconColor: {},
|
|
931
|
+
unSortedIconColor: {}
|
|
932
|
+
}
|
|
933
|
+
},
|
|
934
|
+
'Table.Row': {
|
|
935
|
+
import: '@instructure/ui-table',
|
|
936
|
+
removed: {
|
|
937
|
+
padding: {
|
|
938
|
+
warning: 'split into paddingVertical and paddingHorizontal'
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
},
|
|
942
|
+
'Table.RowHeader': {
|
|
943
|
+
import: '@instructure/ui-table',
|
|
944
|
+
removed: {
|
|
945
|
+
padding: {
|
|
946
|
+
warning: 'split into paddingVertical and paddingHorizontal'
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
},
|
|
950
|
+
'Tabs.Panel': {
|
|
951
|
+
import: '@instructure/ui-tabs',
|
|
952
|
+
renamed: {
|
|
953
|
+
color: { to: 'textColor' }
|
|
954
|
+
},
|
|
955
|
+
removed: {
|
|
956
|
+
focusOutlineColor: {
|
|
957
|
+
warning: 'style uses sharedTokens.focusOutline.infoColor'
|
|
958
|
+
},
|
|
959
|
+
borderStyle: {}
|
|
960
|
+
}
|
|
961
|
+
},
|
|
962
|
+
'Tabs.Tab': {
|
|
963
|
+
import: '@instructure/ui-tabs',
|
|
964
|
+
renamed: {
|
|
965
|
+
defaultColor: { to: 'defaultTextColor' },
|
|
966
|
+
secondaryColor: { to: 'secondaryTextColor' }
|
|
967
|
+
}
|
|
968
|
+
},
|
|
969
|
+
Mask: {
|
|
970
|
+
import: '@instructure/ui-overlays',
|
|
971
|
+
renamed: {
|
|
972
|
+
background: { to: 'backgroundColor' }
|
|
973
|
+
},
|
|
974
|
+
removed: {
|
|
975
|
+
zIndex: {},
|
|
976
|
+
borderColor: {},
|
|
977
|
+
focusBorderColor: {},
|
|
978
|
+
borderRadius: {},
|
|
979
|
+
borderWidth: {}
|
|
980
|
+
}
|
|
981
|
+
},
|
|
982
|
+
Menu: {
|
|
983
|
+
import: '@instructure/ui-menu',
|
|
984
|
+
removed: {
|
|
985
|
+
focusBorderStyle: { warning: 'style uses sharedTokens.focusOutline' },
|
|
986
|
+
focusBorderWidth: { warning: 'style uses sharedTokens.focusOutline' },
|
|
987
|
+
focusBorderColor: { warning: 'style uses sharedTokens.focusOutline' },
|
|
988
|
+
focusBorderRadius: { warning: 'style uses sharedTokens.focusOutline' },
|
|
989
|
+
background: {},
|
|
990
|
+
borderRadius: {}
|
|
991
|
+
}
|
|
992
|
+
},
|
|
993
|
+
'Menu.Item': {
|
|
994
|
+
import: '@instructure/ui-menu',
|
|
995
|
+
removed: {
|
|
996
|
+
iconColor: {},
|
|
997
|
+
activeIconColor: {},
|
|
998
|
+
padding: {
|
|
999
|
+
warning: 'split into paddingVertical and paddingHorizontal'
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
},
|
|
1003
|
+
'Menu.Group': {
|
|
1004
|
+
import: '@instructure/ui-menu',
|
|
1005
|
+
removed: {
|
|
1006
|
+
padding: {
|
|
1007
|
+
warning: 'split into paddingVertical and paddingHorizontal'
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
},
|
|
1011
|
+
'Menu.Separator': {
|
|
1012
|
+
import: '@instructure/ui-menu',
|
|
1013
|
+
removed: {
|
|
1014
|
+
margin: {
|
|
1015
|
+
warning: 'split into marginVertical and marginHorizontal'
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
},
|
|
1019
|
+
'SideNavBar.Item': {
|
|
1020
|
+
import: '@instructure/ui-side-nav-bar',
|
|
1021
|
+
renamed: {
|
|
1022
|
+
innerFocusOutline: { to: 'innerFocusOutlineColor' },
|
|
1023
|
+
outerFocusOutline: { to: 'outerFocusOutlineColor' },
|
|
1024
|
+
selectedInnerFocusOutline: { to: 'selectedInnerFocusOutlineColor' },
|
|
1025
|
+
selectedOuterFocusOutline: { to: 'selectedOuterFocusOutlineColor' }
|
|
1026
|
+
},
|
|
1027
|
+
removed: {
|
|
1028
|
+
iconColor: {},
|
|
1029
|
+
iconSize: {},
|
|
1030
|
+
selectedIconColor: {}
|
|
1031
|
+
}
|
|
1032
|
+
},
|
|
1033
|
+
Options: {
|
|
1034
|
+
import: '@instructure/ui-options',
|
|
1035
|
+
removed: {
|
|
1036
|
+
nestedLabelPadding: {
|
|
1037
|
+
warning:
|
|
1038
|
+
'split into nestedLabelPaddingVertical and nestedLabelPaddingHorizontal'
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
},
|
|
1042
|
+
'Options.Item': {
|
|
1043
|
+
import: '@instructure/ui-options',
|
|
1044
|
+
removed: {
|
|
1045
|
+
padding: {
|
|
1046
|
+
warning: 'split into paddingVertical and paddingHorizontal'
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
},
|
|
1050
|
+
'Options.Separator': {
|
|
1051
|
+
import: '@instructure/ui-options',
|
|
1052
|
+
removed: {
|
|
1053
|
+
margin: {
|
|
1054
|
+
warning: 'split into marginVertical and marginHorizontal'
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
},
|
|
1058
|
+
// Drilldown itself has no token changes, but its sub-components forward their
|
|
1059
|
+
// `themeOverride` to the Options components they render, so the Options token
|
|
1060
|
+
// changes apply to a `themeOverride` set on Drilldown.Group/Option/Separator.
|
|
1061
|
+
'Drilldown.Group': {
|
|
1062
|
+
import: '@instructure/ui-drilldown',
|
|
1063
|
+
removed: {
|
|
1064
|
+
nestedLabelPadding: {
|
|
1065
|
+
warning:
|
|
1066
|
+
'split into nestedLabelPaddingVertical and nestedLabelPaddingHorizontal'
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
},
|
|
1070
|
+
'Drilldown.Option': {
|
|
1071
|
+
import: '@instructure/ui-drilldown',
|
|
1072
|
+
removed: {
|
|
1073
|
+
padding: {
|
|
1074
|
+
warning: 'split into paddingVertical and paddingHorizontal'
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
},
|
|
1078
|
+
'Drilldown.Separator': {
|
|
1079
|
+
import: '@instructure/ui-drilldown',
|
|
1080
|
+
removed: {
|
|
1081
|
+
margin: {
|
|
1082
|
+
warning: 'split into marginVertical and marginHorizontal'
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
},
|
|
1086
|
+
Grid: {
|
|
1087
|
+
import: '@instructure/ui-grid',
|
|
1088
|
+
removed: {
|
|
1089
|
+
mediumMin: {
|
|
1090
|
+
warning: 'value is read from `sharedTokens.breakpoints.md`'
|
|
1091
|
+
},
|
|
1092
|
+
largeMin: {
|
|
1093
|
+
warning:
|
|
1094
|
+
'value is read from `sharedTokens.breakpoints.lg`. Its value is now 64em instead of 62em.'
|
|
1095
|
+
},
|
|
1096
|
+
xLargeMin: {
|
|
1097
|
+
warning:
|
|
1098
|
+
'value is read from `sharedTokens.breakpoints.xl`. Its value is now 80em instead of 75em.'
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
},
|
|
1102
|
+
'Grid.Col': {
|
|
1103
|
+
import: '@instructure/ui-grid',
|
|
1104
|
+
removed: {
|
|
1105
|
+
mediumMin: {
|
|
1106
|
+
warning: 'value is read from `sharedTokens.breakpoints.md`'
|
|
1107
|
+
},
|
|
1108
|
+
largeMin: {
|
|
1109
|
+
warning: 'value is read from `sharedTokens.breakpoints.lg`'
|
|
1110
|
+
},
|
|
1111
|
+
xLargeMin: {
|
|
1112
|
+
warning: 'value is read from `sharedTokens.breakpoints.xl`'
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
},
|
|
1116
|
+
'Grid.Row': {
|
|
1117
|
+
import: '@instructure/ui-grid',
|
|
1118
|
+
removed: {
|
|
1119
|
+
mediumMin: {
|
|
1120
|
+
warning: 'value is read from `sharedTokens.breakpoints.md`'
|
|
1121
|
+
},
|
|
1122
|
+
largeMin: {
|
|
1123
|
+
warning: 'value is read from `sharedTokens.breakpoints.lg`'
|
|
1124
|
+
},
|
|
1125
|
+
xLargeMin: {
|
|
1126
|
+
warning: 'value is read from `sharedTokens.breakpoints.xl`'
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
},
|
|
1130
|
+
FormFieldGroup: {
|
|
1131
|
+
import: '@instructure/ui-form-field',
|
|
1132
|
+
removed: {
|
|
1133
|
+
errorBorderColor: {},
|
|
1134
|
+
errorFieldsPadding: {},
|
|
1135
|
+
borderColor: {},
|
|
1136
|
+
borderStyle: {},
|
|
1137
|
+
borderWidth: {},
|
|
1138
|
+
borderRadius: {}
|
|
1139
|
+
}
|
|
1140
|
+
},
|
|
1141
|
+
FormFieldLayout: {
|
|
1142
|
+
import: '@instructure/ui-form-field',
|
|
1143
|
+
renamed: {
|
|
1144
|
+
color: { to: 'textColor' }
|
|
1145
|
+
},
|
|
1146
|
+
removed: {
|
|
1147
|
+
spacing: {},
|
|
1148
|
+
inlinePadding: {},
|
|
1149
|
+
stackedOrInlineBreakpoint: {
|
|
1150
|
+
warning: 'now uses `sharedTokens.breakpoints.md`'
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1153
|
+
},
|
|
1154
|
+
FormFieldMessage: {
|
|
1155
|
+
import: '@instructure/ui-form-field',
|
|
1156
|
+
renamed: {
|
|
1157
|
+
colorHint: { to: 'hintTextColor' },
|
|
1158
|
+
colorError: { to: 'errorTextColor' },
|
|
1159
|
+
colorSuccess: { to: 'successTextColor' }
|
|
1160
|
+
},
|
|
1161
|
+
removed: {
|
|
1162
|
+
errorIconMarginRight: {}
|
|
1163
|
+
}
|
|
1164
|
+
},
|
|
1165
|
+
FormFieldMessages: {
|
|
1166
|
+
import: '@instructure/ui-form-field',
|
|
1167
|
+
removed: {
|
|
1168
|
+
topMargin: {}
|
|
1169
|
+
}
|
|
1170
|
+
},
|
|
1171
|
+
ColorPicker: {
|
|
1172
|
+
import: '@instructure/ui-color-picker',
|
|
1173
|
+
removed: {
|
|
1174
|
+
warningIconColor: {},
|
|
1175
|
+
errorIconColor: {},
|
|
1176
|
+
successIconColor: {},
|
|
1177
|
+
spacing: { warning: 'now uses sharedTokens.spacing' }
|
|
1178
|
+
}
|
|
1179
|
+
},
|
|
1180
|
+
SourceCodeEditor: {
|
|
1181
|
+
import: '@instructure/ui-source-code-editor',
|
|
1182
|
+
removed: {
|
|
1183
|
+
focusBorderColor: {
|
|
1184
|
+
warning: 'now uses sharedTokens.focusOutline.infoColor'
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
},
|
|
1188
|
+
NutritionFacts: {
|
|
1189
|
+
import: '@instructure/ui-instructure',
|
|
1190
|
+
renamed: {
|
|
1191
|
+
cardBorderRadius: { to: 'borderRadius' }
|
|
1192
|
+
}
|
|
1193
|
+
},
|
|
1194
|
+
Flex: {
|
|
1195
|
+
import: '@instructure/ui-flex',
|
|
1196
|
+
removed: {
|
|
1197
|
+
gapButtons: {},
|
|
1198
|
+
gapCheckboxes: {},
|
|
1199
|
+
gapDataPoints: {},
|
|
1200
|
+
gapInputFields: {},
|
|
1201
|
+
gapLarge: {},
|
|
1202
|
+
gapMedium: {},
|
|
1203
|
+
gapMediumSmall: {},
|
|
1204
|
+
gapModalElements: {},
|
|
1205
|
+
gapModuleElements: {},
|
|
1206
|
+
gapPaddingCardLarge: {},
|
|
1207
|
+
gapPaddingCardMedium: {},
|
|
1208
|
+
gapPaddingCardSmall: {},
|
|
1209
|
+
gapRadios: {},
|
|
1210
|
+
gapSectionElements: {},
|
|
1211
|
+
gapSections: {},
|
|
1212
|
+
gapSelects: {},
|
|
1213
|
+
gapSmall: {},
|
|
1214
|
+
gapSpace0: {},
|
|
1215
|
+
gapSpace12: {},
|
|
1216
|
+
gapSpace16: {},
|
|
1217
|
+
gapSpace2: {},
|
|
1218
|
+
gapSpace24: {},
|
|
1219
|
+
gapSpace36: {},
|
|
1220
|
+
gapSpace4: {},
|
|
1221
|
+
gapSpace48: {},
|
|
1222
|
+
gapSpace60: {},
|
|
1223
|
+
gapSpace8: {},
|
|
1224
|
+
gapStatusIndicators: {},
|
|
1225
|
+
gapTags: {},
|
|
1226
|
+
gapTextareas: {},
|
|
1227
|
+
gapToggles: {},
|
|
1228
|
+
gapTrayElements: {},
|
|
1229
|
+
gapXLarge: {},
|
|
1230
|
+
gapXSmall: {},
|
|
1231
|
+
gapXxLarge: {},
|
|
1232
|
+
gapXxSmall: {},
|
|
1233
|
+
gapXxxSmall: {}
|
|
1234
|
+
}
|
|
1235
|
+
},
|
|
1236
|
+
TreeBrowser: {
|
|
1237
|
+
import: '@instructure/ui-tree-browser',
|
|
1238
|
+
removed: {
|
|
1239
|
+
focusOutlineWidth: { warning: 'handled by sharedTokens' },
|
|
1240
|
+
focusOutlineStyle: { warning: 'handled by sharedTokens' },
|
|
1241
|
+
focusOutlineColor: { warning: 'handled by sharedTokens' }
|
|
1242
|
+
}
|
|
1243
|
+
},
|
|
1244
|
+
'TreeBrowser.Button': {
|
|
1245
|
+
import: '@instructure/ui-tree-browser',
|
|
1246
|
+
removed: {
|
|
1247
|
+
focusOutlineWidth: { warning: 'handled by sharedTokens' },
|
|
1248
|
+
focusOutlineStyle: { warning: 'handled by sharedTokens' },
|
|
1249
|
+
focusOutlineColor: { warning: 'handled by sharedTokens' },
|
|
1250
|
+
iconColor: {}
|
|
1251
|
+
// NB: `iconsMarginRight` and `selectedOutlineWidth` are dead-in-v1 (unused in
|
|
1252
|
+
// v1 styles) - kept in the upgrade guide as "unused token" but excluded here.
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
}
|