@spark-web/spinner 0.0.0-snapshot-release-20260409001813
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 +683 -0
- package/CLAUDE.md +73 -0
- package/README.md +85 -0
- package/dist/declarations/src/index.d.ts +2 -0
- package/dist/declarations/src/spinner.d.ts +14 -0
- package/dist/spark-web-spinner.cjs.d.ts +2 -0
- package/dist/spark-web-spinner.cjs.dev.js +73 -0
- package/dist/spark-web-spinner.cjs.js +7 -0
- package/dist/spark-web-spinner.cjs.prod.js +73 -0
- package/dist/spark-web-spinner.esm.js +69 -0
- package/package.json +36 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,683 @@
|
|
|
1
|
+
# @spark-web/spinner
|
|
2
|
+
|
|
3
|
+
## 0.0.0-snapshot-release-20260409001813
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#782](https://github.com/brighte-labs/spark-web/pull/782)
|
|
8
|
+
[`b18cf44`](https://github.com/brighte-labs/spark-web/commit/b18cf4426df1e94b005ece8d93996459dc3e41d6)
|
|
9
|
+
Thanks [@jacobporci-brighte](https://github.com/jacobporci-brighte)! -
|
|
10
|
+
**docs:** add CLAUDE.md AI context files to foundation and form packages;
|
|
11
|
+
patch data-table with manual sort and spinner overlay patterns
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
[[`b18cf44`](https://github.com/brighte-labs/spark-web/commit/b18cf4426df1e94b005ece8d93996459dc3e41d6)]:
|
|
14
|
+
- @spark-web/box@0.0.0-snapshot-release-20260409001813
|
|
15
|
+
|
|
16
|
+
## 5.1.0
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- [#667](https://github.com/brighte-labs/spark-web/pull/667)
|
|
21
|
+
[`80d9c15`](https://github.com/brighte-labs/spark-web/commit/80d9c156a40bbcd2b1a91a2d0403b3c8e9b47b4e)
|
|
22
|
+
Thanks [@Leo704099](https://github.com/Leo704099)! - Support react 17 to 19
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- Updated dependencies
|
|
27
|
+
[[`80d9c15`](https://github.com/brighte-labs/spark-web/commit/80d9c156a40bbcd2b1a91a2d0403b3c8e9b47b4e)]:
|
|
28
|
+
- @spark-web/utils@5.1.0
|
|
29
|
+
- @spark-web/a11y@5.3.0
|
|
30
|
+
- @spark-web/icon@5.1.0
|
|
31
|
+
- @spark-web/box@6.0.0
|
|
32
|
+
|
|
33
|
+
## 5.0.1
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- [#623](https://github.com/brighte-labs/spark-web/pull/623)
|
|
38
|
+
[`439f6dc`](https://github.com/brighte-labs/spark-web/commit/439f6dcebc40b65193606f990e5a246cdb6ede4d)
|
|
39
|
+
Thanks [@michtntbrighte](https://github.com/michtntbrighte)! - Fix loading
|
|
40
|
+
indicator message
|
|
41
|
+
|
|
42
|
+
## 5.0.0
|
|
43
|
+
|
|
44
|
+
### Major Changes
|
|
45
|
+
|
|
46
|
+
- This release of spark-web standardises the version across all packages to be
|
|
47
|
+
**`v5`**, primarily signifying the switch from `@emotion/css` to
|
|
48
|
+
`@emotion/react` as one of the key dependencies of the entire library, in
|
|
49
|
+
order to support server-side rendering / SSR.
|
|
50
|
+
|
|
51
|
+
This release also introduces support for theming, to allow for more co-branded
|
|
52
|
+
experiences across our web applications. It also supports component-level
|
|
53
|
+
theming for `<Button />`, `<ButtonLink />`, and `<Checkbox />`, which provides
|
|
54
|
+
the capability to override the global theme available inside an application.
|
|
55
|
+
|
|
56
|
+
To use this in an application, you can wrap the affected areas with a
|
|
57
|
+
`ThemeProvider`:
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
<ThemeProvider theme="pantheon">
|
|
61
|
+
<Input type="text" />
|
|
62
|
+
<Button type="submit" />
|
|
63
|
+
</ThemeProvider>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Part of the theming capabilities includes a new theme for `spark-web` called
|
|
67
|
+
"pantheon", which should map with our co-branding efforts in the Pantheon
|
|
68
|
+
project. It currently includes a small set of colors and its corresponding
|
|
69
|
+
font family.
|
|
70
|
+
|
|
71
|
+
### Patch Changes
|
|
72
|
+
|
|
73
|
+
- [#532](https://github.com/brighte-labs/spark-web/pull/532)
|
|
74
|
+
[`631573c`](https://github.com/brighte-labs/spark-web/commit/631573cb72981d99b9afa4ad559123f44e47b2a9)
|
|
75
|
+
Thanks [@ralcoriza-brighte](https://github.com/ralcoriza-brighte)! - Fix
|
|
76
|
+
type-related issues
|
|
77
|
+
|
|
78
|
+
- Updated dependencies
|
|
79
|
+
[[`631573c`](https://github.com/brighte-labs/spark-web/commit/631573cb72981d99b9afa4ad559123f44e47b2a9)]:
|
|
80
|
+
- @spark-web/utils@5.0.0
|
|
81
|
+
- @spark-web/a11y@5.0.0
|
|
82
|
+
- @spark-web/icon@5.0.0
|
|
83
|
+
- @spark-web/box@5.0.0
|
|
84
|
+
|
|
85
|
+
## 5.0.0-rc.31
|
|
86
|
+
|
|
87
|
+
### Patch Changes
|
|
88
|
+
|
|
89
|
+
- Fix type-related issues
|
|
90
|
+
|
|
91
|
+
- Updated dependencies []:
|
|
92
|
+
- @spark-web/utils@5.0.0-rc.31
|
|
93
|
+
- @spark-web/a11y@5.0.0-rc.31
|
|
94
|
+
- @spark-web/icon@5.0.0-rc.31
|
|
95
|
+
- @spark-web/box@5.0.0-rc.31
|
|
96
|
+
|
|
97
|
+
## 5.0.0-rc.30
|
|
98
|
+
|
|
99
|
+
### Minor Changes
|
|
100
|
+
|
|
101
|
+
- Adopt latest changes from stable main branch
|
|
102
|
+
|
|
103
|
+
### Patch Changes
|
|
104
|
+
|
|
105
|
+
- Updated dependencies []:
|
|
106
|
+
- @spark-web/utils@5.0.0-rc.30
|
|
107
|
+
- @spark-web/a11y@5.0.0-rc.30
|
|
108
|
+
- @spark-web/icon@5.0.0-rc.30
|
|
109
|
+
- @spark-web/box@5.0.0-rc.30
|
|
110
|
+
|
|
111
|
+
## 5.0.0-rc.29
|
|
112
|
+
|
|
113
|
+
### Minor Changes
|
|
114
|
+
|
|
115
|
+
- Revise stylesheet maps to align with theme name change
|
|
116
|
+
|
|
117
|
+
### Patch Changes
|
|
118
|
+
|
|
119
|
+
- Updated dependencies []:
|
|
120
|
+
- @spark-web/utils@5.0.0-rc.29
|
|
121
|
+
- @spark-web/a11y@5.0.0-rc.29
|
|
122
|
+
- @spark-web/icon@5.0.0-rc.29
|
|
123
|
+
- @spark-web/box@5.0.0-rc.29
|
|
124
|
+
|
|
125
|
+
## 5.0.0-rc.28
|
|
126
|
+
|
|
127
|
+
### Minor Changes
|
|
128
|
+
|
|
129
|
+
- Move fonts to theme package; Introduce Pantheon font family and stylesheet
|
|
130
|
+
|
|
131
|
+
### Patch Changes
|
|
132
|
+
|
|
133
|
+
- Updated dependencies []:
|
|
134
|
+
- @spark-web/utils@5.0.0-rc.28
|
|
135
|
+
- @spark-web/a11y@5.0.0-rc.28
|
|
136
|
+
- @spark-web/icon@5.0.0-rc.28
|
|
137
|
+
- @spark-web/box@5.0.0-rc.28
|
|
138
|
+
|
|
139
|
+
## 5.0.0-rc.27
|
|
140
|
+
|
|
141
|
+
### Minor Changes
|
|
142
|
+
|
|
143
|
+
- Remove theme prop in button link
|
|
144
|
+
|
|
145
|
+
### Patch Changes
|
|
146
|
+
|
|
147
|
+
- Updated dependencies []:
|
|
148
|
+
- @spark-web/utils@5.0.0-rc.27
|
|
149
|
+
- @spark-web/a11y@5.0.0-rc.27
|
|
150
|
+
- @spark-web/icon@5.0.0-rc.27
|
|
151
|
+
- @spark-web/box@5.0.0-rc.27
|
|
152
|
+
|
|
153
|
+
## 5.0.0-rc.26
|
|
154
|
+
|
|
155
|
+
### Minor Changes
|
|
156
|
+
|
|
157
|
+
- Roll back on using theme prop for component level theming; prefer using
|
|
158
|
+
ThemeProvider in applications instead
|
|
159
|
+
|
|
160
|
+
### Patch Changes
|
|
161
|
+
|
|
162
|
+
- Updated dependencies []:
|
|
163
|
+
- @spark-web/utils@5.0.0-rc.26
|
|
164
|
+
- @spark-web/a11y@5.0.0-rc.26
|
|
165
|
+
- @spark-web/icon@5.0.0-rc.26
|
|
166
|
+
- @spark-web/box@5.0.0-rc.26
|
|
167
|
+
|
|
168
|
+
## 5.0.0-rc.25
|
|
169
|
+
|
|
170
|
+
### Minor Changes
|
|
171
|
+
|
|
172
|
+
- Implement checkbox tokens for test theme
|
|
173
|
+
|
|
174
|
+
### Patch Changes
|
|
175
|
+
|
|
176
|
+
- Updated dependencies []:
|
|
177
|
+
- @spark-web/utils@5.0.0-rc.25
|
|
178
|
+
- @spark-web/a11y@5.0.0-rc.25
|
|
179
|
+
- @spark-web/icon@5.0.0-rc.25
|
|
180
|
+
- @spark-web/box@5.0.0-rc.25
|
|
181
|
+
|
|
182
|
+
## 5.0.0-rc.24
|
|
183
|
+
|
|
184
|
+
### Minor Changes
|
|
185
|
+
|
|
186
|
+
- Resolve issues with package build output
|
|
187
|
+
|
|
188
|
+
### Patch Changes
|
|
189
|
+
|
|
190
|
+
- Updated dependencies []:
|
|
191
|
+
- @spark-web/utils@5.0.0-rc.24
|
|
192
|
+
- @spark-web/a11y@5.0.0-rc.24
|
|
193
|
+
- @spark-web/icon@5.0.0-rc.24
|
|
194
|
+
- @spark-web/box@5.0.0-rc.24
|
|
195
|
+
|
|
196
|
+
## 2.0.0-rc.21
|
|
197
|
+
|
|
198
|
+
### Minor Changes
|
|
199
|
+
|
|
200
|
+
- Introduce global theming provider to set global default theme
|
|
201
|
+
|
|
202
|
+
### Patch Changes
|
|
203
|
+
|
|
204
|
+
- Updated dependencies []:
|
|
205
|
+
- @spark-web/utils@2.0.0-rc.21
|
|
206
|
+
- @spark-web/a11y@2.0.0-rc.21
|
|
207
|
+
- @spark-web/icon@2.0.0-rc.21
|
|
208
|
+
- @spark-web/box@2.0.0-rc.21
|
|
209
|
+
|
|
210
|
+
## 2.0.0-rc.20
|
|
211
|
+
|
|
212
|
+
### Minor Changes
|
|
213
|
+
|
|
214
|
+
- Support for component-level theming; button-level theming
|
|
215
|
+
|
|
216
|
+
### Patch Changes
|
|
217
|
+
|
|
218
|
+
- Updated dependencies []:
|
|
219
|
+
- @spark-web/utils@2.0.0-rc.20
|
|
220
|
+
- @spark-web/a11y@2.0.0-rc.20
|
|
221
|
+
- @spark-web/icon@2.0.0-rc.20
|
|
222
|
+
- @spark-web/box@2.0.0-rc.20
|
|
223
|
+
|
|
224
|
+
## 2.0.0-rc.19
|
|
225
|
+
|
|
226
|
+
### Major Changes
|
|
227
|
+
|
|
228
|
+
- test
|
|
229
|
+
|
|
230
|
+
### Patch Changes
|
|
231
|
+
|
|
232
|
+
- Updated dependencies []:
|
|
233
|
+
- @spark-web/utils@2.0.0-rc.19
|
|
234
|
+
- @spark-web/a11y@2.0.0-rc.19
|
|
235
|
+
- @spark-web/icon@2.0.0-rc.19
|
|
236
|
+
- @spark-web/box@2.0.0-rc.19
|
|
237
|
+
|
|
238
|
+
## 2.0.0-rc.18
|
|
239
|
+
|
|
240
|
+
### Major Changes
|
|
241
|
+
|
|
242
|
+
- tests
|
|
243
|
+
|
|
244
|
+
### Patch Changes
|
|
245
|
+
|
|
246
|
+
- Updated dependencies []:
|
|
247
|
+
- @spark-web/utils@2.0.0-rc.18
|
|
248
|
+
- @spark-web/a11y@2.0.0-rc.18
|
|
249
|
+
- @spark-web/icon@2.0.0-rc.18
|
|
250
|
+
- @spark-web/box@2.0.0-rc.18
|
|
251
|
+
|
|
252
|
+
## 2.0.0-rc.17
|
|
253
|
+
|
|
254
|
+
### Major Changes
|
|
255
|
+
|
|
256
|
+
- test
|
|
257
|
+
|
|
258
|
+
### Patch Changes
|
|
259
|
+
|
|
260
|
+
- Updated dependencies []:
|
|
261
|
+
- @spark-web/utils@2.0.0-rc.17
|
|
262
|
+
- @spark-web/a11y@2.0.0-rc.17
|
|
263
|
+
- @spark-web/icon@2.0.0-rc.17
|
|
264
|
+
- @spark-web/box@2.0.0-rc.17
|
|
265
|
+
|
|
266
|
+
## 2.0.0-rc.16
|
|
267
|
+
|
|
268
|
+
### Major Changes
|
|
269
|
+
|
|
270
|
+
- test
|
|
271
|
+
|
|
272
|
+
### Patch Changes
|
|
273
|
+
|
|
274
|
+
- Updated dependencies []:
|
|
275
|
+
- @spark-web/utils@2.0.0-rc.16
|
|
276
|
+
- @spark-web/a11y@2.0.0-rc.16
|
|
277
|
+
- @spark-web/icon@2.0.0-rc.16
|
|
278
|
+
- @spark-web/box@2.0.0-rc.16
|
|
279
|
+
|
|
280
|
+
## 2.0.0-rc.15
|
|
281
|
+
|
|
282
|
+
### Major Changes
|
|
283
|
+
|
|
284
|
+
- test
|
|
285
|
+
|
|
286
|
+
### Patch Changes
|
|
287
|
+
|
|
288
|
+
- Updated dependencies []:
|
|
289
|
+
- @spark-web/utils@2.0.0-rc.15
|
|
290
|
+
- @spark-web/a11y@2.0.0-rc.15
|
|
291
|
+
- @spark-web/icon@2.0.0-rc.15
|
|
292
|
+
- @spark-web/box@2.0.0-rc.15
|
|
293
|
+
|
|
294
|
+
## 2.0.0-rc.14
|
|
295
|
+
|
|
296
|
+
### Major Changes
|
|
297
|
+
|
|
298
|
+
- test
|
|
299
|
+
|
|
300
|
+
### Patch Changes
|
|
301
|
+
|
|
302
|
+
- Updated dependencies []:
|
|
303
|
+
- @spark-web/utils@2.0.0-rc.14
|
|
304
|
+
- @spark-web/a11y@2.0.0-rc.14
|
|
305
|
+
- @spark-web/icon@2.0.0-rc.14
|
|
306
|
+
- @spark-web/box@2.0.0-rc.14
|
|
307
|
+
|
|
308
|
+
## 2.0.0-rc.13
|
|
309
|
+
|
|
310
|
+
### Major Changes
|
|
311
|
+
|
|
312
|
+
- test
|
|
313
|
+
|
|
314
|
+
### Patch Changes
|
|
315
|
+
|
|
316
|
+
- Updated dependencies []:
|
|
317
|
+
- @spark-web/utils@2.0.0-rc.13
|
|
318
|
+
- @spark-web/a11y@2.0.0-rc.13
|
|
319
|
+
- @spark-web/icon@2.0.0-rc.13
|
|
320
|
+
- @spark-web/box@2.0.0-rc.13
|
|
321
|
+
|
|
322
|
+
## 2.0.0-rc.12
|
|
323
|
+
|
|
324
|
+
### Major Changes
|
|
325
|
+
|
|
326
|
+
- test
|
|
327
|
+
|
|
328
|
+
### Patch Changes
|
|
329
|
+
|
|
330
|
+
- Updated dependencies []:
|
|
331
|
+
- @spark-web/utils@2.0.0-rc.12
|
|
332
|
+
- @spark-web/a11y@2.0.0-rc.12
|
|
333
|
+
- @spark-web/icon@2.0.0-rc.12
|
|
334
|
+
- @spark-web/box@2.0.0-rc.12
|
|
335
|
+
|
|
336
|
+
## 2.0.0-rc.11
|
|
337
|
+
|
|
338
|
+
### Major Changes
|
|
339
|
+
|
|
340
|
+
- test
|
|
341
|
+
|
|
342
|
+
### Patch Changes
|
|
343
|
+
|
|
344
|
+
- Updated dependencies []:
|
|
345
|
+
- @spark-web/utils@2.0.0-rc.11
|
|
346
|
+
- @spark-web/a11y@2.0.0-rc.11
|
|
347
|
+
- @spark-web/icon@2.0.0-rc.11
|
|
348
|
+
- @spark-web/box@2.0.0-rc.11
|
|
349
|
+
|
|
350
|
+
## 2.0.0-rc.10
|
|
351
|
+
|
|
352
|
+
### Major Changes
|
|
353
|
+
|
|
354
|
+
- test
|
|
355
|
+
|
|
356
|
+
### Patch Changes
|
|
357
|
+
|
|
358
|
+
- Updated dependencies []:
|
|
359
|
+
- @spark-web/utils@2.0.0-rc.10
|
|
360
|
+
- @spark-web/a11y@2.0.0-rc.10
|
|
361
|
+
- @spark-web/icon@2.0.0-rc.10
|
|
362
|
+
- @spark-web/box@2.0.0-rc.10
|
|
363
|
+
|
|
364
|
+
## 2.0.0-rc.9
|
|
365
|
+
|
|
366
|
+
### Major Changes
|
|
367
|
+
|
|
368
|
+
- test
|
|
369
|
+
|
|
370
|
+
### Patch Changes
|
|
371
|
+
|
|
372
|
+
- Updated dependencies []:
|
|
373
|
+
- @spark-web/utils@2.0.0-rc.9
|
|
374
|
+
- @spark-web/a11y@2.0.0-rc.9
|
|
375
|
+
- @spark-web/icon@2.0.0-rc.9
|
|
376
|
+
- @spark-web/box@2.0.0-rc.9
|
|
377
|
+
|
|
378
|
+
## 2.0.0-rc.8
|
|
379
|
+
|
|
380
|
+
### Major Changes
|
|
381
|
+
|
|
382
|
+
- test
|
|
383
|
+
|
|
384
|
+
### Patch Changes
|
|
385
|
+
|
|
386
|
+
- Updated dependencies []:
|
|
387
|
+
- @spark-web/utils@2.0.0-rc.8
|
|
388
|
+
- @spark-web/a11y@2.0.0-rc.8
|
|
389
|
+
- @spark-web/icon@2.0.0-rc.8
|
|
390
|
+
- @spark-web/box@2.0.0-rc.8
|
|
391
|
+
|
|
392
|
+
## 2.0.0-rc.7
|
|
393
|
+
|
|
394
|
+
### Major Changes
|
|
395
|
+
|
|
396
|
+
- test
|
|
397
|
+
|
|
398
|
+
### Patch Changes
|
|
399
|
+
|
|
400
|
+
- Updated dependencies []:
|
|
401
|
+
- @spark-web/utils@2.0.0-rc.7
|
|
402
|
+
- @spark-web/a11y@2.0.0-rc.7
|
|
403
|
+
- @spark-web/icon@2.0.0-rc.7
|
|
404
|
+
- @spark-web/box@2.0.0-rc.7
|
|
405
|
+
|
|
406
|
+
## 2.0.0-rc.6
|
|
407
|
+
|
|
408
|
+
### Major Changes
|
|
409
|
+
|
|
410
|
+
- test
|
|
411
|
+
|
|
412
|
+
### Patch Changes
|
|
413
|
+
|
|
414
|
+
- Updated dependencies []:
|
|
415
|
+
- @spark-web/utils@2.0.0-rc.6
|
|
416
|
+
- @spark-web/a11y@2.0.0-rc.6
|
|
417
|
+
- @spark-web/icon@2.0.0-rc.6
|
|
418
|
+
- @spark-web/box@2.0.0-rc.6
|
|
419
|
+
|
|
420
|
+
## 2.0.0-rc.5
|
|
421
|
+
|
|
422
|
+
### Major Changes
|
|
423
|
+
|
|
424
|
+
- test
|
|
425
|
+
|
|
426
|
+
### Patch Changes
|
|
427
|
+
|
|
428
|
+
- Updated dependencies []:
|
|
429
|
+
- @spark-web/utils@2.0.0-rc.5
|
|
430
|
+
- @spark-web/a11y@2.0.0-rc.5
|
|
431
|
+
- @spark-web/icon@2.0.0-rc.5
|
|
432
|
+
- @spark-web/box@2.0.0-rc.5
|
|
433
|
+
|
|
434
|
+
## 2.0.0-rc.4
|
|
435
|
+
|
|
436
|
+
### Major Changes
|
|
437
|
+
|
|
438
|
+
- bug
|
|
439
|
+
|
|
440
|
+
### Patch Changes
|
|
441
|
+
|
|
442
|
+
- Updated dependencies []:
|
|
443
|
+
- @spark-web/utils@2.0.0-rc.4
|
|
444
|
+
- @spark-web/a11y@2.0.0-rc.4
|
|
445
|
+
- @spark-web/icon@2.0.0-rc.4
|
|
446
|
+
- @spark-web/box@2.0.0-rc.4
|
|
447
|
+
|
|
448
|
+
## 2.0.0-rc.3
|
|
449
|
+
|
|
450
|
+
### Major Changes
|
|
451
|
+
|
|
452
|
+
- upgrade package
|
|
453
|
+
|
|
454
|
+
### Patch Changes
|
|
455
|
+
|
|
456
|
+
- Updated dependencies []:
|
|
457
|
+
- @spark-web/utils@2.0.0-rc.3
|
|
458
|
+
- @spark-web/a11y@2.0.0-rc.3
|
|
459
|
+
- @spark-web/icon@2.0.0-rc.3
|
|
460
|
+
- @spark-web/box@2.0.0-rc.3
|
|
461
|
+
|
|
462
|
+
## 2.0.0-rc.2
|
|
463
|
+
|
|
464
|
+
### Major Changes
|
|
465
|
+
|
|
466
|
+
- add parser
|
|
467
|
+
|
|
468
|
+
### Patch Changes
|
|
469
|
+
|
|
470
|
+
- Updated dependencies []:
|
|
471
|
+
- @spark-web/utils@2.0.0-rc.2
|
|
472
|
+
- @spark-web/a11y@2.0.0-rc.2
|
|
473
|
+
- @spark-web/icon@2.0.0-rc.2
|
|
474
|
+
- @spark-web/box@2.0.0-rc.2
|
|
475
|
+
|
|
476
|
+
## 2.0.0-rc.1
|
|
477
|
+
|
|
478
|
+
### Major Changes
|
|
479
|
+
|
|
480
|
+
- rc
|
|
481
|
+
|
|
482
|
+
### Patch Changes
|
|
483
|
+
|
|
484
|
+
- Updated dependencies []:
|
|
485
|
+
- @spark-web/utils@2.0.0-rc.1
|
|
486
|
+
- @spark-web/a11y@2.0.0-rc.1
|
|
487
|
+
- @spark-web/icon@2.0.0-rc.1
|
|
488
|
+
- @spark-web/box@2.0.0-rc.1
|
|
489
|
+
|
|
490
|
+
## 2.0.0-rc.0
|
|
491
|
+
|
|
492
|
+
### Major Changes
|
|
493
|
+
|
|
494
|
+
- rc versio
|
|
495
|
+
|
|
496
|
+
### Patch Changes
|
|
497
|
+
|
|
498
|
+
- Updated dependencies []:
|
|
499
|
+
- @spark-web/a11y@2.0.0-rc.0
|
|
500
|
+
- @spark-web/icon@2.0.0-rc.0
|
|
501
|
+
- @spark-web/box@2.0.0-rc.0
|
|
502
|
+
- @spark-web/utils@2.0.0-rc.0
|
|
503
|
+
|
|
504
|
+
## 1.1.0
|
|
505
|
+
|
|
506
|
+
### Minor Changes
|
|
507
|
+
|
|
508
|
+
- [#382](https://github.com/brighte-labs/spark-web/pull/382)
|
|
509
|
+
[`955bf5d`](https://github.com/brighte-labs/spark-web/commit/955bf5d7698bfdf45e7f317aa3e726c81d3444c0)
|
|
510
|
+
Thanks [@dilipt-brighte](https://github.com/dilipt-brighte)! - Updates React
|
|
511
|
+
version to latest (18.2.0)
|
|
512
|
+
|
|
513
|
+
### Patch Changes
|
|
514
|
+
|
|
515
|
+
- Updated dependencies
|
|
516
|
+
[[`955bf5d`](https://github.com/brighte-labs/spark-web/commit/955bf5d7698bfdf45e7f317aa3e726c81d3444c0)]:
|
|
517
|
+
- @spark-web/a11y@1.4.0
|
|
518
|
+
- @spark-web/box@1.2.0
|
|
519
|
+
- @spark-web/icon@1.3.0
|
|
520
|
+
- @spark-web/utils@1.3.0
|
|
521
|
+
|
|
522
|
+
## 1.0.8
|
|
523
|
+
|
|
524
|
+
### Patch Changes
|
|
525
|
+
|
|
526
|
+
- [#218](https://github.com/brighte-labs/spark-web/pull/218)
|
|
527
|
+
[`6fc8d1b`](https://github.com/brighte-labs/spark-web/commit/6fc8d1bc37e25d0cd622bc37f68a1d92eb5961b5)
|
|
528
|
+
Thanks [@nderkim](https://github.com/nderkim)! - Rename files to kebab case
|
|
529
|
+
|
|
530
|
+
- [#222](https://github.com/brighte-labs/spark-web/pull/222)
|
|
531
|
+
[`7f93c45`](https://github.com/brighte-labs/spark-web/commit/7f93c45bbae8c765e10df9d0dd7615473797749b)
|
|
532
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update
|
|
533
|
+
dependencies
|
|
534
|
+
|
|
535
|
+
- [#242](https://github.com/brighte-labs/spark-web/pull/242)
|
|
536
|
+
[`6df05f7`](https://github.com/brighte-labs/spark-web/commit/6df05f764e4181c140d6547d6b897d0210468f6a)
|
|
537
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - - Add homepage
|
|
538
|
+
and repository keys to package.json
|
|
539
|
+
- Add CHANGELOG and README to files key in package.json
|
|
540
|
+
- Updated dependencies
|
|
541
|
+
[[`adc5e9e`](https://github.com/brighte-labs/spark-web/commit/adc5e9e6c99acd117f3261edcefdb5573132441b),
|
|
542
|
+
[`de99b9c`](https://github.com/brighte-labs/spark-web/commit/de99b9c7f72373bd1902cf67f5cfec9a1e1db01c),
|
|
543
|
+
[`6fc8d1b`](https://github.com/brighte-labs/spark-web/commit/6fc8d1bc37e25d0cd622bc37f68a1d92eb5961b5),
|
|
544
|
+
[`7f93c45`](https://github.com/brighte-labs/spark-web/commit/7f93c45bbae8c765e10df9d0dd7615473797749b),
|
|
545
|
+
[`6df05f7`](https://github.com/brighte-labs/spark-web/commit/6df05f764e4181c140d6547d6b897d0210468f6a)]:
|
|
546
|
+
- @spark-web/box@1.1.0
|
|
547
|
+
- @spark-web/icon@1.2.2
|
|
548
|
+
- @spark-web/a11y@1.3.2
|
|
549
|
+
- @spark-web/utils@1.2.3
|
|
550
|
+
|
|
551
|
+
## 1.0.7
|
|
552
|
+
|
|
553
|
+
### Patch Changes
|
|
554
|
+
|
|
555
|
+
- [#208](https://github.com/brighte-labs/spark-web/pull/208)
|
|
556
|
+
[`1ea26ef`](https://github.com/brighte-labs/spark-web/commit/1ea26ef04a3b45875ed0dd2326eeab1fbe1e4bc5)
|
|
557
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Lower required
|
|
558
|
+
node version
|
|
559
|
+
|
|
560
|
+
- Updated dependencies
|
|
561
|
+
[[`1ea26ef`](https://github.com/brighte-labs/spark-web/commit/1ea26ef04a3b45875ed0dd2326eeab1fbe1e4bc5)]:
|
|
562
|
+
- @spark-web/a11y@1.3.1
|
|
563
|
+
- @spark-web/box@1.0.9
|
|
564
|
+
- @spark-web/icon@1.2.1
|
|
565
|
+
- @spark-web/utils@1.2.2
|
|
566
|
+
|
|
567
|
+
## 1.0.6
|
|
568
|
+
|
|
569
|
+
### Patch Changes
|
|
570
|
+
|
|
571
|
+
- [#197](https://github.com/brighte-labs/spark-web/pull/197)
|
|
572
|
+
[`94016d8`](https://github.com/brighte-labs/spark-web/commit/94016d84e26bbe55833bbcbab847a2cce6041538)
|
|
573
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update packages
|
|
574
|
+
|
|
575
|
+
- Updated dependencies
|
|
576
|
+
[[`51b6c7a`](https://github.com/brighte-labs/spark-web/commit/51b6c7a43f441e02b90403b13af9cfa11e5438ef),
|
|
577
|
+
[`07286b5`](https://github.com/brighte-labs/spark-web/commit/07286b52f897909b1a806d736e1040351c93078f),
|
|
578
|
+
[`94016d8`](https://github.com/brighte-labs/spark-web/commit/94016d84e26bbe55833bbcbab847a2cce6041538)]:
|
|
579
|
+
- @spark-web/a11y@1.3.0
|
|
580
|
+
- @spark-web/icon@1.2.0
|
|
581
|
+
- @spark-web/box@1.0.8
|
|
582
|
+
- @spark-web/utils@1.2.1
|
|
583
|
+
|
|
584
|
+
## 1.0.5
|
|
585
|
+
|
|
586
|
+
### Patch Changes
|
|
587
|
+
|
|
588
|
+
- [#173](https://github.com/brighte-labs/spark-web/pull/173)
|
|
589
|
+
[`90b7e9c`](https://github.com/brighte-labs/spark-web/commit/90b7e9cf4eb7e864d765c74b22c3dedf3d262e25)
|
|
590
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update babel
|
|
591
|
+
dependency
|
|
592
|
+
|
|
593
|
+
- Updated dependencies
|
|
594
|
+
[[`90b7e9c`](https://github.com/brighte-labs/spark-web/commit/90b7e9cf4eb7e864d765c74b22c3dedf3d262e25),
|
|
595
|
+
[`be99536`](https://github.com/brighte-labs/spark-web/commit/be99536abb56dd26e5c9a1703e6df9c7860b449b),
|
|
596
|
+
[`c3867af`](https://github.com/brighte-labs/spark-web/commit/c3867af7b77dfae3580ab63a5d5c9e8452f2da62)]:
|
|
597
|
+
- @spark-web/a11y@1.2.0
|
|
598
|
+
- @spark-web/box@1.0.7
|
|
599
|
+
- @spark-web/icon@1.1.5
|
|
600
|
+
- @spark-web/utils@1.2.0
|
|
601
|
+
|
|
602
|
+
## 1.0.4
|
|
603
|
+
|
|
604
|
+
### Patch Changes
|
|
605
|
+
|
|
606
|
+
- [#167](https://github.com/brighte-labs/spark-web/pull/167)
|
|
607
|
+
[`4f79350`](https://github.com/brighte-labs/spark-web/commit/4f793508fdb43ddd452f0d59a3126101f9fa5459)
|
|
608
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update Babel
|
|
609
|
+
|
|
610
|
+
- Updated dependencies
|
|
611
|
+
[[`4f79350`](https://github.com/brighte-labs/spark-web/commit/4f793508fdb43ddd452f0d59a3126101f9fa5459),
|
|
612
|
+
[`f524009`](https://github.com/brighte-labs/spark-web/commit/f5240098cf731b0a2e351b7b585711e893a33736)]:
|
|
613
|
+
- @spark-web/a11y@1.1.0
|
|
614
|
+
- @spark-web/box@1.0.6
|
|
615
|
+
- @spark-web/icon@1.1.4
|
|
616
|
+
- @spark-web/utils@1.1.5
|
|
617
|
+
|
|
618
|
+
## 1.0.3
|
|
619
|
+
|
|
620
|
+
### Patch Changes
|
|
621
|
+
|
|
622
|
+
- [#142](https://github.com/brighte-labs/spark-web/pull/142)
|
|
623
|
+
[`500939d`](https://github.com/brighte-labs/spark-web/commit/500939de7c45c93d48078f39151035ab9eba057f)
|
|
624
|
+
Thanks [@clothoo](https://github.com/clothoo)! - Add role 'progressbar'
|
|
625
|
+
|
|
626
|
+
## 1.0.2
|
|
627
|
+
|
|
628
|
+
### Patch Changes
|
|
629
|
+
|
|
630
|
+
- [#113](https://github.com/brighte-labs/spark-web/pull/113)
|
|
631
|
+
[`156236d`](https://github.com/brighte-labs/spark-web/commit/156236d2474aee66a0b8e2030635f9c08a5b78ba)
|
|
632
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update
|
|
633
|
+
dependencies
|
|
634
|
+
|
|
635
|
+
- Updated dependencies
|
|
636
|
+
[[`156236d`](https://github.com/brighte-labs/spark-web/commit/156236d2474aee66a0b8e2030635f9c08a5b78ba)]:
|
|
637
|
+
- @spark-web/box@1.0.5
|
|
638
|
+
- @spark-web/icon@1.1.3
|
|
639
|
+
- @spark-web/utils@1.1.3
|
|
640
|
+
|
|
641
|
+
## 1.0.1
|
|
642
|
+
|
|
643
|
+
### Patch Changes
|
|
644
|
+
|
|
645
|
+
- [#87](https://github.com/brighte-labs/spark-web/pull/87)
|
|
646
|
+
[`5744b68`](https://github.com/brighte-labs/spark-web/commit/5744b6820f626b93a14e11e1fbd96bcbe1b12b27)
|
|
647
|
+
Thanks [@ChristopherMitchell242](https://github.com/ChristopherMitchell242)! -
|
|
648
|
+
Data attribute added to component props to allow consumers to attach
|
|
649
|
+
customattributes to components
|
|
650
|
+
|
|
651
|
+
* [#52](https://github.com/brighte-labs/spark-web/pull/52)
|
|
652
|
+
[`82ab744`](https://github.com/brighte-labs/spark-web/commit/82ab744f198466810f3386bc459b8ab4d57c820e)
|
|
653
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Add files array
|
|
654
|
+
to package.json files
|
|
655
|
+
|
|
656
|
+
- [#63](https://github.com/brighte-labs/spark-web/pull/63)
|
|
657
|
+
[`58a7284`](https://github.com/brighte-labs/spark-web/commit/58a728457bbbda86ac406a72d8ec4ad6c1c16630)
|
|
658
|
+
Thanks [@jordangeizer](https://github.com/jordangeizer)! - Patched loader
|
|
659
|
+
animation so that it doesn't disappear on last keyframe.
|
|
660
|
+
|
|
661
|
+
- Updated dependencies
|
|
662
|
+
[[`82ab744`](https://github.com/brighte-labs/spark-web/commit/82ab744f198466810f3386bc459b8ab4d57c820e),
|
|
663
|
+
[`df618d9`](https://github.com/brighte-labs/spark-web/commit/df618d92d534e06f06ecedc95ea6bdd51cdc906b)]:
|
|
664
|
+
- @spark-web/box@1.0.4
|
|
665
|
+
- @spark-web/icon@1.1.2
|
|
666
|
+
- @spark-web/utils@1.1.2
|
|
667
|
+
|
|
668
|
+
## 1.0.0
|
|
669
|
+
|
|
670
|
+
### Major Changes
|
|
671
|
+
|
|
672
|
+
- [#44](https://github.com/brighte-labs/spark-web/pull/44)
|
|
673
|
+
[`11e7365`](https://github.com/brighte-labs/spark-web/commit/11e73659ff4a01a48a8761821bff34c6ec28568b)
|
|
674
|
+
Thanks [@matildaPan](https://github.com/matildaPan)! - initial release of
|
|
675
|
+
spinner component
|
|
676
|
+
|
|
677
|
+
### Patch Changes
|
|
678
|
+
|
|
679
|
+
- Updated dependencies
|
|
680
|
+
[[`11e7365`](https://github.com/brighte-labs/spark-web/commit/11e73659ff4a01a48a8761821bff34c6ec28568b),
|
|
681
|
+
[`11e7365`](https://github.com/brighte-labs/spark-web/commit/11e73659ff4a01a48a8761821bff34c6ec28568b)]:
|
|
682
|
+
- @spark-web/icon@1.1.0
|
|
683
|
+
- @spark-web/utils@1.1.0
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# @spark-web/spinner — AI Context
|
|
2
|
+
|
|
3
|
+
## What this is
|
|
4
|
+
|
|
5
|
+
An animated circular loading indicator. Used to communicate that an async
|
|
6
|
+
operation is in progress. Includes a visually hidden "is loading" label for
|
|
7
|
+
screen readers.
|
|
8
|
+
|
|
9
|
+
## What this is NOT
|
|
10
|
+
|
|
11
|
+
- Not a progress bar — does not communicate percentage completion
|
|
12
|
+
- Not the loading state for `DataTable` — use the `isLoading` prop on
|
|
13
|
+
`DataTable` instead of placing a `Spinner` externally alongside the table
|
|
14
|
+
- Not a skeleton loader — for page-level skeleton loading use placeholder shapes
|
|
15
|
+
|
|
16
|
+
## Props interface
|
|
17
|
+
|
|
18
|
+
| Prop | Type | Default | Notes |
|
|
19
|
+
| ------ | ----------------------- | ----------- | -------------------------- |
|
|
20
|
+
| `tone` | icon tone (string) | — | Controls SVG stroke color |
|
|
21
|
+
| `size` | `'xxsmall' \| 'xsmall'` | `'xxsmall'` | Visual size of the spinner |
|
|
22
|
+
| `data` | `DataAttributeMap` | — | Test/analytics attributes |
|
|
23
|
+
|
|
24
|
+
## Common tones
|
|
25
|
+
|
|
26
|
+
- `tone="primary"` — green on white surface (default loading state)
|
|
27
|
+
- `tone="neutral"` — grey, for subdued contexts
|
|
28
|
+
- No tone — inherits ambient foreground color
|
|
29
|
+
|
|
30
|
+
## Common patterns
|
|
31
|
+
|
|
32
|
+
### Inline loading overlay (not inside DataTable)
|
|
33
|
+
|
|
34
|
+
Use only when you cannot use `DataTable`'s `isLoading` prop — e.g., a full-page
|
|
35
|
+
overlay or a custom loading region:
|
|
36
|
+
|
|
37
|
+
```tsx
|
|
38
|
+
{
|
|
39
|
+
isLoading && (
|
|
40
|
+
<Box
|
|
41
|
+
display="flex"
|
|
42
|
+
flexDirection="column"
|
|
43
|
+
alignItems="center"
|
|
44
|
+
justifyContent="center"
|
|
45
|
+
gap="small"
|
|
46
|
+
padding="xlarge"
|
|
47
|
+
>
|
|
48
|
+
<Spinner tone="primary" size="xsmall" />
|
|
49
|
+
<Text tone="muted">Loading</Text>
|
|
50
|
+
</Box>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Inline next to text
|
|
56
|
+
|
|
57
|
+
```tsx
|
|
58
|
+
<Row gap="small" alignY="center">
|
|
59
|
+
<Spinner tone="primary" />
|
|
60
|
+
<Text tone="muted">Saving…</Text>
|
|
61
|
+
</Row>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Do NOTs
|
|
65
|
+
|
|
66
|
+
- NEVER render a `Spinner` outside `DataTable` to indicate table loading — use
|
|
67
|
+
`DataTable`'s `isLoading` prop
|
|
68
|
+
- NEVER use a size larger than `xsmall` — only `xxsmall` and `xsmall` are
|
|
69
|
+
supported
|
|
70
|
+
- NEVER wrap `<Spinner>` in `aria-hidden="true"` — the component includes a
|
|
71
|
+
built-in visually hidden `"is loading"` label for screen readers. The inner
|
|
72
|
+
SVG is already `aria-hidden` by the component; do not suppress the outer
|
|
73
|
+
element.
|
package/README.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Spinner
|
|
3
|
+
storybookPath: feedback-overlays-spinner--default
|
|
4
|
+
isExperimentalPackage: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Spinner indicates to users that their request is in progress. In most cases
|
|
8
|
+
[you should use the `loading` prop on a Button instead of using this component directly](/package/button#loading).
|
|
9
|
+
|
|
10
|
+
## Examples
|
|
11
|
+
|
|
12
|
+
### Tones
|
|
13
|
+
|
|
14
|
+
The appearance of Spinner can be customised with the tone prop.
|
|
15
|
+
|
|
16
|
+
Defaults to `primary`.
|
|
17
|
+
|
|
18
|
+
```jsx live
|
|
19
|
+
const tones = ['secondary', 'critical', 'positive', 'neutral'];
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<Stack align="left" gap="large">
|
|
23
|
+
<Inline gap="large">
|
|
24
|
+
{tones.map(tone => (
|
|
25
|
+
<Spinner key={tone} tone={tone} />
|
|
26
|
+
))}
|
|
27
|
+
</Inline>
|
|
28
|
+
</Stack>
|
|
29
|
+
);
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
```jsx live
|
|
33
|
+
const backgrounds = [
|
|
34
|
+
// Light
|
|
35
|
+
['surface', 'positiveLight', 'infoLight', 'cautionLight', 'criticalLight'],
|
|
36
|
+
// Dark
|
|
37
|
+
['muted', 'positive', 'info', 'caution', 'critical'],
|
|
38
|
+
];
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<Stack gap="large">
|
|
42
|
+
{backgrounds.map((backgroundLightness, index) => (
|
|
43
|
+
<Inline key={index} gap="large">
|
|
44
|
+
{backgroundLightness.map(background => (
|
|
45
|
+
<Box
|
|
46
|
+
key={background}
|
|
47
|
+
background={background}
|
|
48
|
+
shadow="medium"
|
|
49
|
+
height="medium"
|
|
50
|
+
width="medium"
|
|
51
|
+
display="flex"
|
|
52
|
+
flexShrink={0}
|
|
53
|
+
alignItems="center"
|
|
54
|
+
justifyContent="center"
|
|
55
|
+
>
|
|
56
|
+
<Spinner />
|
|
57
|
+
</Box>
|
|
58
|
+
))}
|
|
59
|
+
</Inline>
|
|
60
|
+
))}
|
|
61
|
+
</Stack>
|
|
62
|
+
);
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Size
|
|
66
|
+
|
|
67
|
+
Spinners available in two size: `xxsmall` and `xsmall`.
|
|
68
|
+
|
|
69
|
+
Defaults to `xsmall`.
|
|
70
|
+
|
|
71
|
+
```jsx live
|
|
72
|
+
<Row gap="large">
|
|
73
|
+
<Spinner size="xxsmall" />
|
|
74
|
+
<Spinner size="xsmall" />
|
|
75
|
+
</Row>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Props
|
|
79
|
+
|
|
80
|
+
### Spinner
|
|
81
|
+
|
|
82
|
+
<PropsTable displayName="Spinner" />
|
|
83
|
+
|
|
84
|
+
[data-attribute-map]:
|
|
85
|
+
https://github.com/brighte-labs/spark-web/blob/e7f6f4285b4cfd876312cc89fbdd094039aa239a/packages/utils/src/internal/buildDataAttributes.ts#L1
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { IconProps } from '@spark-web/icon';
|
|
2
|
+
import type { DataAttributeMap } from '@spark-web/utils/internal';
|
|
3
|
+
export type SpinnerProps = {
|
|
4
|
+
/** Provide a tone to influence elements of the field, and its input. */
|
|
5
|
+
tone?: IconProps['tone'];
|
|
6
|
+
/** The size of the nested radios. */
|
|
7
|
+
size?: 'xxsmall' | 'xsmall';
|
|
8
|
+
/** Sets data attributes for the element. */
|
|
9
|
+
data?: DataAttributeMap;
|
|
10
|
+
};
|
|
11
|
+
export declare function Spinner({ tone, size, data }: SpinnerProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare namespace Spinner {
|
|
13
|
+
var displayName: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export * from "./declarations/src/index.js";
|
|
2
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Bhcmstd2ViLXNwaW5uZXIuY2pzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuL2RlY2xhcmF0aW9ucy9zcmMvaW5kZXguZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var react = require('@emotion/react');
|
|
6
|
+
var a11y = require('@spark-web/a11y');
|
|
7
|
+
var box = require('@spark-web/box');
|
|
8
|
+
var icon = require('@spark-web/icon');
|
|
9
|
+
var utils = require('@spark-web/utils');
|
|
10
|
+
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
11
|
+
|
|
12
|
+
function Spinner(_ref) {
|
|
13
|
+
var tone = _ref.tone,
|
|
14
|
+
_ref$size = _ref.size,
|
|
15
|
+
size = _ref$size === void 0 ? 'xxsmall' : _ref$size,
|
|
16
|
+
data = _ref.data;
|
|
17
|
+
var spinAnimationRef = utils.useSynchronizedAnimation(spinAnimation);
|
|
18
|
+
var strokeAnimationRef = utils.useSynchronizedAnimation(strokeDashAnimation);
|
|
19
|
+
var styles = useSpinnerStyles();
|
|
20
|
+
return jsxRuntime.jsxs(box.Box, {
|
|
21
|
+
as: "span",
|
|
22
|
+
ref: spinAnimationRef,
|
|
23
|
+
css: react.css(styles),
|
|
24
|
+
height: size,
|
|
25
|
+
width: size,
|
|
26
|
+
display: "inline-flex",
|
|
27
|
+
alignItems: "center",
|
|
28
|
+
justifyContent: "center",
|
|
29
|
+
data: data,
|
|
30
|
+
children: [jsxRuntime.jsx(a11y.VisuallyHidden, {
|
|
31
|
+
children: "is loading"
|
|
32
|
+
}), jsxRuntime.jsx(SpinnerIcon, {
|
|
33
|
+
size: size,
|
|
34
|
+
tone: tone,
|
|
35
|
+
ref: strokeAnimationRef,
|
|
36
|
+
"aria-hidden": "true"
|
|
37
|
+
})]
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
Spinner.displayName = 'Spinner';
|
|
41
|
+
var SpinnerIcon = icon.createIcon(jsxRuntime.jsx("circle", {
|
|
42
|
+
cx: 12,
|
|
43
|
+
cy: 12,
|
|
44
|
+
r: 9
|
|
45
|
+
}), 'SpinnerIcon');
|
|
46
|
+
var spinAnimation = react.keyframes({
|
|
47
|
+
from: {
|
|
48
|
+
transform: 'rotate(0deg)'
|
|
49
|
+
},
|
|
50
|
+
to: {
|
|
51
|
+
transform: 'rotate(360deg)'
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
var strokeDashAnimation = react.keyframes({
|
|
55
|
+
'0%': {
|
|
56
|
+
strokeDasharray: '1px, 200px',
|
|
57
|
+
strokeDashoffset: 0
|
|
58
|
+
},
|
|
59
|
+
'100%': {
|
|
60
|
+
strokeDasharray: '200px, 200px',
|
|
61
|
+
strokeDashoffset: '-55px'
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
function useSpinnerStyles() {
|
|
65
|
+
return {
|
|
66
|
+
animation: "".concat(spinAnimation, " 1.4s linear infinite"),
|
|
67
|
+
'& circle': {
|
|
68
|
+
animation: "".concat(strokeDashAnimation, " 1.6s cubic-bezier(0.47, 0, 0.75, 0.72) infinite")
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
exports.Spinner = Spinner;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var react = require('@emotion/react');
|
|
6
|
+
var a11y = require('@spark-web/a11y');
|
|
7
|
+
var box = require('@spark-web/box');
|
|
8
|
+
var icon = require('@spark-web/icon');
|
|
9
|
+
var utils = require('@spark-web/utils');
|
|
10
|
+
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
11
|
+
|
|
12
|
+
function Spinner(_ref) {
|
|
13
|
+
var tone = _ref.tone,
|
|
14
|
+
_ref$size = _ref.size,
|
|
15
|
+
size = _ref$size === void 0 ? 'xxsmall' : _ref$size,
|
|
16
|
+
data = _ref.data;
|
|
17
|
+
var spinAnimationRef = utils.useSynchronizedAnimation(spinAnimation);
|
|
18
|
+
var strokeAnimationRef = utils.useSynchronizedAnimation(strokeDashAnimation);
|
|
19
|
+
var styles = useSpinnerStyles();
|
|
20
|
+
return jsxRuntime.jsxs(box.Box, {
|
|
21
|
+
as: "span",
|
|
22
|
+
ref: spinAnimationRef,
|
|
23
|
+
css: react.css(styles),
|
|
24
|
+
height: size,
|
|
25
|
+
width: size,
|
|
26
|
+
display: "inline-flex",
|
|
27
|
+
alignItems: "center",
|
|
28
|
+
justifyContent: "center",
|
|
29
|
+
data: data,
|
|
30
|
+
children: [jsxRuntime.jsx(a11y.VisuallyHidden, {
|
|
31
|
+
children: "is loading"
|
|
32
|
+
}), jsxRuntime.jsx(SpinnerIcon, {
|
|
33
|
+
size: size,
|
|
34
|
+
tone: tone,
|
|
35
|
+
ref: strokeAnimationRef,
|
|
36
|
+
"aria-hidden": "true"
|
|
37
|
+
})]
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
Spinner.displayName = 'Spinner';
|
|
41
|
+
var SpinnerIcon = icon.createIcon(jsxRuntime.jsx("circle", {
|
|
42
|
+
cx: 12,
|
|
43
|
+
cy: 12,
|
|
44
|
+
r: 9
|
|
45
|
+
}), 'SpinnerIcon');
|
|
46
|
+
var spinAnimation = react.keyframes({
|
|
47
|
+
from: {
|
|
48
|
+
transform: 'rotate(0deg)'
|
|
49
|
+
},
|
|
50
|
+
to: {
|
|
51
|
+
transform: 'rotate(360deg)'
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
var strokeDashAnimation = react.keyframes({
|
|
55
|
+
'0%': {
|
|
56
|
+
strokeDasharray: '1px, 200px',
|
|
57
|
+
strokeDashoffset: 0
|
|
58
|
+
},
|
|
59
|
+
'100%': {
|
|
60
|
+
strokeDasharray: '200px, 200px',
|
|
61
|
+
strokeDashoffset: '-55px'
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
function useSpinnerStyles() {
|
|
65
|
+
return {
|
|
66
|
+
animation: "".concat(spinAnimation, " 1.4s linear infinite"),
|
|
67
|
+
'& circle': {
|
|
68
|
+
animation: "".concat(strokeDashAnimation, " 1.6s cubic-bezier(0.47, 0, 0.75, 0.72) infinite")
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
exports.Spinner = Spinner;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { keyframes, css } from '@emotion/react';
|
|
2
|
+
import { VisuallyHidden } from '@spark-web/a11y';
|
|
3
|
+
import { Box } from '@spark-web/box';
|
|
4
|
+
import { createIcon } from '@spark-web/icon';
|
|
5
|
+
import { useSynchronizedAnimation } from '@spark-web/utils';
|
|
6
|
+
import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
function Spinner(_ref) {
|
|
9
|
+
var tone = _ref.tone,
|
|
10
|
+
_ref$size = _ref.size,
|
|
11
|
+
size = _ref$size === void 0 ? 'xxsmall' : _ref$size,
|
|
12
|
+
data = _ref.data;
|
|
13
|
+
var spinAnimationRef = useSynchronizedAnimation(spinAnimation);
|
|
14
|
+
var strokeAnimationRef = useSynchronizedAnimation(strokeDashAnimation);
|
|
15
|
+
var styles = useSpinnerStyles();
|
|
16
|
+
return jsxs(Box, {
|
|
17
|
+
as: "span",
|
|
18
|
+
ref: spinAnimationRef,
|
|
19
|
+
css: css(styles),
|
|
20
|
+
height: size,
|
|
21
|
+
width: size,
|
|
22
|
+
display: "inline-flex",
|
|
23
|
+
alignItems: "center",
|
|
24
|
+
justifyContent: "center",
|
|
25
|
+
data: data,
|
|
26
|
+
children: [jsx(VisuallyHidden, {
|
|
27
|
+
children: "is loading"
|
|
28
|
+
}), jsx(SpinnerIcon, {
|
|
29
|
+
size: size,
|
|
30
|
+
tone: tone,
|
|
31
|
+
ref: strokeAnimationRef,
|
|
32
|
+
"aria-hidden": "true"
|
|
33
|
+
})]
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
Spinner.displayName = 'Spinner';
|
|
37
|
+
var SpinnerIcon = createIcon(jsx("circle", {
|
|
38
|
+
cx: 12,
|
|
39
|
+
cy: 12,
|
|
40
|
+
r: 9
|
|
41
|
+
}), 'SpinnerIcon');
|
|
42
|
+
var spinAnimation = keyframes({
|
|
43
|
+
from: {
|
|
44
|
+
transform: 'rotate(0deg)'
|
|
45
|
+
},
|
|
46
|
+
to: {
|
|
47
|
+
transform: 'rotate(360deg)'
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
var strokeDashAnimation = keyframes({
|
|
51
|
+
'0%': {
|
|
52
|
+
strokeDasharray: '1px, 200px',
|
|
53
|
+
strokeDashoffset: 0
|
|
54
|
+
},
|
|
55
|
+
'100%': {
|
|
56
|
+
strokeDasharray: '200px, 200px',
|
|
57
|
+
strokeDashoffset: '-55px'
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
function useSpinnerStyles() {
|
|
61
|
+
return {
|
|
62
|
+
animation: "".concat(spinAnimation, " 1.4s linear infinite"),
|
|
63
|
+
'& circle': {
|
|
64
|
+
animation: "".concat(strokeDashAnimation, " 1.6s cubic-bezier(0.47, 0, 0.75, 0.72) infinite")
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export { Spinner };
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@spark-web/spinner",
|
|
3
|
+
"version": "0.0.0-snapshot-release-20260409001813",
|
|
4
|
+
"homepage": "https://github.com/brighte-labs/spark-web#readme",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/brighte-labs/spark-web.git",
|
|
8
|
+
"directory": "packages/spinner"
|
|
9
|
+
},
|
|
10
|
+
"main": "dist/spark-web-spinner.cjs.js",
|
|
11
|
+
"module": "dist/spark-web-spinner.esm.js",
|
|
12
|
+
"files": [
|
|
13
|
+
"CHANGELOG.md",
|
|
14
|
+
"CLAUDE.md",
|
|
15
|
+
"dist",
|
|
16
|
+
"README.md"
|
|
17
|
+
],
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@babel/runtime": "^7.25.0",
|
|
20
|
+
"@emotion/react": "^11.14.0",
|
|
21
|
+
"@spark-web/a11y": "^5.3.0",
|
|
22
|
+
"@spark-web/box": "0.0.0-snapshot-release-20260409001813",
|
|
23
|
+
"@spark-web/icon": "^5.1.0",
|
|
24
|
+
"@spark-web/utils": "^5.1.0"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/react": "^19.1.0",
|
|
28
|
+
"react": "^19.1.0"
|
|
29
|
+
},
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"react": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
32
|
+
},
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=14"
|
|
35
|
+
}
|
|
36
|
+
}
|