@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.
- package/CHANGELOG.md +3 -4
- package/es/Spinner/v2/AISpinnerIcon.js +44 -0
- package/es/Spinner/v2/index.js +46 -24
- package/es/Spinner/v2/styles.js +23 -9
- package/lib/Spinner/v2/AISpinnerIcon.js +47 -0
- package/lib/Spinner/v2/index.js +45 -23
- package/lib/Spinner/v2/styles.js +23 -9
- package/package.json +14 -12
- package/src/Spinner/v2/AISpinnerIcon.tsx +45 -0
- package/src/Spinner/v2/README.md +21 -1
- package/src/Spinner/v2/index.tsx +46 -24
- package/src/Spinner/v2/props.ts +5 -3
- package/src/Spinner/v2/styles.ts +22 -5
- package/tsconfig.build.json +2 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Spinner/v2/AISpinnerIcon.d.ts +4 -0
- package/types/Spinner/v2/AISpinnerIcon.d.ts.map +1 -0
- package/types/Spinner/v2/index.d.ts +3 -3
- package/types/Spinner/v2/index.d.ts.map +1 -1
- package/types/Spinner/v2/props.d.ts +5 -3
- package/types/Spinner/v2/props.d.ts.map +1 -1
- package/types/Spinner/v2/styles.d.ts.map +1 -1
package/src/Spinner/v2/styles.ts
CHANGED
|
@@ -151,10 +151,9 @@ const generateStyle = (
|
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
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
|
-
|
|
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
|
}
|
package/tsconfig.build.json
CHANGED
|
@@ -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" },
|