@instructure/ui-spinner 11.7.7-snapshot-4 → 11.7.7-snapshot-7

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.
@@ -151,10 +151,9 @@ const generateStyle = (
151
151
  }
152
152
  }
153
153
 
154
- const circleSpinVariant = {
155
- default: { stroke: componentTheme.color },
156
- inverse: { stroke: componentTheme.inverseColor }
157
- }
154
+ // Only the circle variants use this. The AI variants render an icon instead,
155
+ // and take their color from the icon's own tokens.
156
+ const isInverse = variant === 'inverse'
158
157
 
159
158
  return {
160
159
  spinner: {
@@ -199,7 +198,25 @@ const generateStyle = (
199
198
  animationTimingFunction: 'ease',
200
199
  strokeDasharray: `calc(${radii[size!]} * 2 * 3.14159 * 0.75) 1000px`,
201
200
  ...circleSpinSizes[size!],
202
- ...circleSpinVariant[variant!]
201
+ stroke: isInverse ? componentTheme.inverseColor : componentTheme.color
202
+ },
203
+ aiSpin: {
204
+ label: 'spinner__aiSpin',
205
+ display: 'block',
206
+ // The icon sits in an inline-block span. Without this, the line adds
207
+ // extra space below it, and the icon no longer rotates around its center.
208
+ lineHeight: 0,
209
+ ...circleSizes[size!],
210
+ animationName: rotate,
211
+ animationDuration: '2.25s',
212
+ animationIterationCount: 'infinite',
213
+ animationTimingFunction: 'linear',
214
+ // The icon has no `size` prop, so its svg has no width or height. Use the
215
+ // same size as the circle, so the layout stays the same in every variant.
216
+ '& svg': {
217
+ display: 'block',
218
+ ...circleSizes[size!]
219
+ }
203
220
  },
204
221
  radius: radii[size!]
205
222
  }
@@ -11,7 +11,9 @@
11
11
  { "path": "../console/tsconfig.build.json" },
12
12
  { "path": "../emotion/tsconfig.build.json" },
13
13
  { "path": "../shared-types/tsconfig.build.json" },
14
+ { "path": "../ui-a11y-content/tsconfig.build.json" },
14
15
  { "path": "../ui-color-utils/tsconfig.build.json" },
16
+ { "path": "../ui-icons/tsconfig.build.json" },
15
17
  { "path": "../ui-react-utils/tsconfig.build.json" },
16
18
  { "path": "../ui-utils/tsconfig.build.json" },
17
19
  { "path": "../ui-view/tsconfig.build.json" },