@fluentui/react-spinner 9.74.7-experimental.cli-api.20261006-ccaa611d58.0 → 9.75.0-experimental.css-modules.20261031-810ab07afb.0

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.
Files changed (42) hide show
  1. package/CHANGELOG.md +32 -10
  2. package/README.md +10 -0
  3. package/lib/components/Spinner/Spinner.js.map +1 -1
  4. package/lib/components/Spinner/Spinner.module.css +327 -0
  5. package/lib/components/Spinner/Spinner.types.js.map +1 -1
  6. package/lib/components/Spinner/index.js.map +1 -1
  7. package/lib/components/Spinner/renderSpinner.js +2 -2
  8. package/lib/components/Spinner/renderSpinner.js.map +1 -1
  9. package/lib/components/Spinner/useSpinner.js.map +1 -1
  10. package/lib/components/Spinner/useSpinnerStyles.styles.css.js +28 -0
  11. package/lib/components/Spinner/useSpinnerStyles.styles.css.js.map +1 -0
  12. package/lib/components/Spinner/useSpinnerStyles.styles.raw.css.js +28 -0
  13. package/lib/components/Spinner/useSpinnerStyles.styles.raw.css.js.map +1 -0
  14. package/lib/components/Spinner/useSpinnerStyles.styles.raw.js.map +1 -1
  15. package/lib/contexts/SpinnerContext.js.map +1 -1
  16. package/lib/contexts/index.js.map +1 -1
  17. package/lib-commonjs/Spinner.cjs +7 -7
  18. package/lib-commonjs/components/Spinner/Spinner.cjs.map +1 -1
  19. package/lib-commonjs/components/Spinner/Spinner.module.css +327 -0
  20. package/lib-commonjs/components/Spinner/Spinner.types.cjs.map +1 -1
  21. package/lib-commonjs/components/Spinner/index.cjs +7 -7
  22. package/lib-commonjs/components/Spinner/index.cjs.map +1 -1
  23. package/lib-commonjs/components/Spinner/renderSpinner.cjs.map +1 -1
  24. package/lib-commonjs/components/Spinner/useSpinner.cjs +3 -3
  25. package/lib-commonjs/components/Spinner/useSpinner.cjs.map +1 -1
  26. package/lib-commonjs/components/Spinner/useSpinnerStyles.styles.cjs +3 -3
  27. package/lib-commonjs/components/Spinner/useSpinnerStyles.styles.cjs.map +1 -1
  28. package/lib-commonjs/components/Spinner/useSpinnerStyles.styles.css.cjs +47 -0
  29. package/lib-commonjs/components/Spinner/useSpinnerStyles.styles.css.cjs.map +1 -0
  30. package/lib-commonjs/components/Spinner/useSpinnerStyles.styles.raw.cjs +3 -3
  31. package/lib-commonjs/components/Spinner/useSpinnerStyles.styles.raw.cjs.map +1 -1
  32. package/lib-commonjs/components/Spinner/useSpinnerStyles.styles.raw.css.cjs +47 -0
  33. package/lib-commonjs/components/Spinner/useSpinnerStyles.styles.raw.css.cjs.map +1 -0
  34. package/lib-commonjs/contexts/SpinnerContext.cjs +3 -3
  35. package/lib-commonjs/contexts/SpinnerContext.cjs.map +1 -1
  36. package/lib-commonjs/contexts/index.cjs +3 -3
  37. package/lib-commonjs/contexts/index.cjs.map +1 -1
  38. package/lib-commonjs/index.cjs +9 -9
  39. package/lib-commonjs/index.cjs.map +1 -1
  40. package/package.json +13 -13
  41. package/dist/metadata/api/api-root.json +0 -1
  42. package/dist/metadata/index.json +0 -1
package/CHANGELOG.md CHANGED
@@ -1,22 +1,44 @@
1
1
  # Change Log - @fluentui/react-spinner
2
2
 
3
- <!-- This log was last generated on Tue, 06 Oct 2026 11:40:33 GMT and should not be manually modified. -->
3
+ <!-- This log was last generated on Sat, 31 Oct 2026 11:08:56 GMT and should not be manually modified. -->
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [9.74.7-experimental.cli-api.20261006-ccaa611d58.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinner_v9.74.7-experimental.cli-api.20261006-ccaa611d58.0)
7
+ ## [9.75.0-experimental.css-modules.20261031-810ab07afb.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinner_v9.75.0-experimental.css-modules.20261031-810ab07afb.0)
8
8
 
9
- Tue, 06 Oct 2026 11:40:33 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinner_v9.8.5..@fluentui/react-spinner_v9.74.7-experimental.cli-api.20261006-ccaa611d58.0)
9
+ Sat, 31 Oct 2026 11:08:56 GMT
11
10
 
12
11
  ### Changes
13
12
 
14
- - Release 9.74.7-experimental.cli-api.20261006-ccaa611d58 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by 257645319+office-ogx-auth-helper[bot]@users.noreply.github.com)
15
- - Bump @fluentui/react-jsx-runtime to v9.74.7-experimental.cli-api.20261006-ccaa611d58.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
16
- - Bump @fluentui/react-label to v9.74.7-experimental.cli-api.20261006-ccaa611d58.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
17
- - Bump @fluentui/react-shared-contexts to v9.74.7-experimental.cli-api.20261006-ccaa611d58.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
18
- - Bump @fluentui/react-theme to v9.74.7-experimental.cli-api.20261006-ccaa611d58.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
19
- - Bump @fluentui/react-utilities to v9.74.7-experimental.cli-api.20261006-ccaa611d58.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
13
+ - Release 9.75.0-experimental.css-modules.20261031-810ab07afb ([commit](https://github.com/microsoft/fluentui/commit/undefined) by 257645319+office-ogx-auth-helper[bot]@users.noreply.github.com)
14
+ - Bump @fluentui/react-jsx-runtime to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
15
+ - Bump @fluentui/react-label to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
16
+ - Bump @fluentui/react-shared-contexts to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
17
+ - Bump @fluentui/react-theme to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
18
+ - Bump @fluentui/react-utilities to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
19
+
20
+ ## [9.8.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinner_v9.8.7)
21
+
22
+ Mon, 19 Oct 2026 16:49:01 GMT
23
+
24
+ ### Patches
25
+
26
+ - Bump @fluentui/react-jsx-runtime to v9.4.7 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
27
+ - Bump @fluentui/react-label to v9.4.6 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
28
+ - Bump @fluentui/react-utilities to v9.27.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
29
+
30
+ ## [9.8.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinner_v9.8.6)
31
+
32
+ Tue, 22 Sep 2026 11:25:39 GMT
33
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinner_v9.8.5..@fluentui/react-spinner_v9.8.6)
34
+
35
+ ### Patches
36
+
37
+ - fix: remove unused react-dom and @types/react-dom peer dependencies, mark @types/react as optional ([PR #36559](https://github.com/microsoft/fluentui/pull/36559) by martinhochel@microsoft.com)
38
+ - Bump @fluentui/react-jsx-runtime to v9.4.6 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
39
+ - Bump @fluentui/react-label to v9.4.5 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
40
+ - Bump @fluentui/react-shared-contexts to v9.26.4 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
41
+ - Bump @fluentui/react-utilities to v9.26.7 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
20
42
 
21
43
  ## [9.8.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinner_v9.8.5)
22
44
 
package/README.md CHANGED
@@ -43,3 +43,13 @@ See [SPEC.md](./SPEC.md).
43
43
  ### Migration Guide
44
44
 
45
45
  If you're upgrading to Fluent UI v9 see [MIGRATION.md](./MIGRATION.md) for guidance on updating to the latest Spinner implementation.
46
+
47
+ ## Opt-in CSS Modules styles
48
+
49
+ CSS Modules alternatives are available for `Spinner`. The default exports and component imports continue to use Griffel.
50
+
51
+ To opt in, configure your bundler to replace each `use<Component>Styles.styles.js` module with its adjacent `use<Component>Styles.styles.css.js` alternative (or `.styles.ts` with `.styles.css.ts` for source builds). Apply the replacement consistently to client and server bundles. The CSS loader must provide a default class-name map and retain the adjacent `.module.css` asset, including CSS from dependencies. All component rules are in `@layer fluentui` and use the theme custom properties supplied by `FluentProvider`.
52
+
53
+ The CSS hook retains the shared Fluent context for the spinner tail's RTL styling.
54
+
55
+ For composed labels, also select the CSS Modules alternative for `@fluentui/react-label`. Mixing its default unlayered Griffel styles with these layered alternatives can override label typography.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Spinner/Spinner.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useSpinner_unstable } from './useSpinner';\nimport { renderSpinner_unstable } from './renderSpinner';\nimport { useSpinnerStyles_unstable } from './useSpinnerStyles.styles';\nimport type { SpinnerProps } from './Spinner.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Converged Spinner component for the fluentui repo\n */\nexport const Spinner: ForwardRefComponent<SpinnerProps> = React.forwardRef((props, ref) => {\n const state = useSpinner_unstable(props, ref);\n\n useSpinnerStyles_unstable(state);\n\n useCustomStyleHook_unstable('useSpinnerStyles_unstable')(state);\n\n return renderSpinner_unstable(state);\n});\n\nSpinner.displayName = 'Spinner';\n"],"names":["React","useSpinner_unstable","renderSpinner_unstable","useSpinnerStyles_unstable","useCustomStyleHook_unstable","Spinner","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,mBAAmB,QAAQ,kBAAe;AACnD,SAASC,sBAAsB,QAAQ,qBAAkB;AACzD,SAASC,yBAAyB,QAAQ,+BAA4B;AAGtE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,wBAA6CL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACjF,MAAMC,QAAQR,oBAAoBM,OAAOC;IAEzCL,0BAA0BM;IAE1BL,4BAA4B,6BAA6BK;IAEzD,OAAOP,uBAAuBO;AAChC,GAAG;AAEHJ,QAAQK,WAAW,GAAG"}
1
+ {"version":3,"sources":["../../../src/components/Spinner/Spinner.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useSpinner_unstable } from './useSpinner';\nimport { renderSpinner_unstable } from './renderSpinner';\nimport { useSpinnerStyles_unstable } from './useSpinnerStyles.styles';\nimport type { SpinnerProps } from './Spinner.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Converged Spinner component for the fluentui repo\n */\nexport const Spinner: ForwardRefComponent<SpinnerProps> = React.forwardRef((props, ref) => {\n const state = useSpinner_unstable(props, ref);\n\n useSpinnerStyles_unstable(state);\n\n useCustomStyleHook_unstable('useSpinnerStyles_unstable')(state);\n\n return renderSpinner_unstable(state);\n});\n\nSpinner.displayName = 'Spinner';\n"],"names":["React","useSpinner_unstable","renderSpinner_unstable","useSpinnerStyles_unstable","useCustomStyleHook_unstable","Spinner","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,mBAAmB,QAAQ,kBAAe;AACnD,SAASC,sBAAsB,QAAQ,qBAAkB;AACzD,SAASC,yBAAyB,QAAQ,+BAA4B;AAGtE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,wBAA6CL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACjF,MAAMC,QAAQR,oBAAoBM,OAAOC;IAEzCL,0BAA0BM;IAE1BL,4BAA4B,6BAA6BK;IAEzD,OAAOP,uBAAuBO;AAChC,GAAG;AAEHJ,QAAQK,WAAW,GAAG"}
@@ -0,0 +1,327 @@
1
+ @layer fluentui {
2
+ .root {
3
+ display: flex;
4
+ align-items: center;
5
+ justify-content: center;
6
+ line-height: 0;
7
+ gap: var(--spacingHorizontalS);
8
+ overflow: hidden;
9
+ min-width: min-content;
10
+ }
11
+
12
+ .above,
13
+ .below {
14
+ flex-direction: column;
15
+ }
16
+
17
+ .spinner {
18
+ position: relative;
19
+ flex-shrink: 0;
20
+ mask-image: radial-gradient(
21
+ closest-side,
22
+ transparent calc(100% - var(--fui-Spinner--strokeWidth) - var(--strokeWidthThin)),
23
+ var(--colorNeutralForegroundStaticInverted) calc(100% - var(--fui-Spinner--strokeWidth))
24
+ calc(100% - var(--strokeWidthThin)),
25
+ transparent 100%
26
+ );
27
+ background-color: var(--colorBrandStroke2Contrast);
28
+ color: var(--colorBrandStroke1);
29
+ animation-duration: 1.5s;
30
+ animation-iteration-count: infinite;
31
+ animation-timing-function: linear;
32
+ animation-name: animation1;
33
+ }
34
+
35
+ .spinner:where(:dir(rtl)) {
36
+ animation-name: animation1RTL;
37
+ }
38
+
39
+ .spinnerTail::before,
40
+ .spinnerTail::after {
41
+ content: '';
42
+ position: absolute;
43
+ display: block;
44
+ width: 100%;
45
+ height: 100%;
46
+ animation: inherit;
47
+ background-image: conic-gradient(currentcolor 135deg, transparent 135deg);
48
+ }
49
+
50
+ .spinnerTail::before {
51
+ animation-name: animation3;
52
+ }
53
+
54
+ .spinnerTail:where(:dir(rtl))::before {
55
+ animation-name: animation3RTL;
56
+ }
57
+
58
+ .spinnerTail::after {
59
+ animation-name: animation4;
60
+ }
61
+
62
+ .spinnerTail:where(:dir(rtl))::after {
63
+ animation-name: animation4RTL;
64
+ }
65
+
66
+ .spinnerTail {
67
+ position: absolute;
68
+ display: block;
69
+ width: 100%;
70
+ height: 100%;
71
+ mask-image: conic-gradient(transparent 105deg, var(--colorNeutralForegroundStaticInverted) 105deg);
72
+ animation-duration: 1.5s;
73
+ animation-iteration-count: infinite;
74
+ animation-timing-function: var(--curveEasyEase);
75
+ animation-name: animation2;
76
+ }
77
+
78
+ .spinnerTail:where(:dir(rtl)) {
79
+ animation-name: animation2RTL;
80
+ }
81
+
82
+ :where(.inverted) > .spinner {
83
+ background-color: var(--colorNeutralStrokeAlpha2);
84
+ color: var(--colorNeutralStrokeOnBrand2);
85
+ }
86
+
87
+ .rtlTail::before,
88
+ .rtlTail::after {
89
+ background-image: conic-gradient(transparent 225deg, currentcolor 225deg);
90
+ }
91
+
92
+ .rtlTail {
93
+ mask-image: conic-gradient(var(--colorNeutralForegroundStaticInverted) 255deg, transparent 255deg);
94
+ }
95
+
96
+ :where(.extra-tiny) > .spinner {
97
+ height: var(--spacingHorizontalL);
98
+ width: var(--spacingHorizontalL);
99
+ --fui-Spinner--strokeWidth: var(--strokeWidthThick);
100
+ }
101
+
102
+ :where(.extra-tiny) > .label {
103
+ font-family: var(--fontFamilyBase);
104
+ font-size: var(--fontSizeBase300);
105
+ font-weight: var(--fontWeightRegular);
106
+ line-height: var(--lineHeightBase300);
107
+ }
108
+
109
+ :where(.tiny) > .spinner {
110
+ height: var(--spacingHorizontalXL);
111
+ width: var(--spacingHorizontalXL);
112
+ --fui-Spinner--strokeWidth: var(--strokeWidthThick);
113
+ }
114
+
115
+ :where(.tiny) > .label {
116
+ font-family: var(--fontFamilyBase);
117
+ font-size: var(--fontSizeBase300);
118
+ font-weight: var(--fontWeightRegular);
119
+ line-height: var(--lineHeightBase300);
120
+ }
121
+
122
+ :where(.extra-small) > .spinner {
123
+ height: var(--spacingHorizontalXXL);
124
+ width: var(--spacingHorizontalXXL);
125
+ --fui-Spinner--strokeWidth: var(--strokeWidthThick);
126
+ }
127
+
128
+ :where(.extra-small) > .label {
129
+ font-family: var(--fontFamilyBase);
130
+ font-size: var(--fontSizeBase300);
131
+ font-weight: var(--fontWeightRegular);
132
+ line-height: var(--lineHeightBase300);
133
+ }
134
+
135
+ :where(.small) > .spinner {
136
+ height: calc(var(--spacingHorizontalXS) * 7);
137
+ width: calc(var(--spacingHorizontalXS) * 7);
138
+ --fui-Spinner--strokeWidth: var(--strokeWidthThick);
139
+ }
140
+
141
+ :where(.small) > .label {
142
+ font-family: var(--fontFamilyBase);
143
+ font-size: var(--fontSizeBase300);
144
+ font-weight: var(--fontWeightRegular);
145
+ line-height: var(--lineHeightBase300);
146
+ }
147
+
148
+ :where(.medium) > .spinner {
149
+ height: var(--spacingHorizontalXXXL);
150
+ width: var(--spacingHorizontalXXXL);
151
+ --fui-Spinner--strokeWidth: var(--strokeWidthThicker);
152
+ }
153
+
154
+ :where(.medium) > .label {
155
+ font-family: var(--fontFamilyBase);
156
+ font-size: var(--fontSizeBase400);
157
+ font-weight: var(--fontWeightSemibold);
158
+ line-height: var(--lineHeightBase400);
159
+ }
160
+
161
+ :where(.large) > .spinner {
162
+ height: calc(var(--spacingHorizontalXS) * 9);
163
+ width: calc(var(--spacingHorizontalXS) * 9);
164
+ --fui-Spinner--strokeWidth: var(--strokeWidthThicker);
165
+ }
166
+
167
+ :where(.large) > .label {
168
+ font-family: var(--fontFamilyBase);
169
+ font-size: var(--fontSizeBase400);
170
+ font-weight: var(--fontWeightSemibold);
171
+ line-height: var(--lineHeightBase400);
172
+ }
173
+
174
+ :where(.extra-large) > .spinner {
175
+ height: calc(var(--spacingHorizontalXS) * 10);
176
+ width: calc(var(--spacingHorizontalXS) * 10);
177
+ --fui-Spinner--strokeWidth: var(--strokeWidthThicker);
178
+ }
179
+
180
+ :where(.extra-large) > .label {
181
+ font-family: var(--fontFamilyBase);
182
+ font-size: var(--fontSizeBase400);
183
+ font-weight: var(--fontWeightSemibold);
184
+ line-height: var(--lineHeightBase400);
185
+ }
186
+
187
+ :where(.huge) > .spinner {
188
+ height: calc(var(--spacingHorizontalXS) * 11);
189
+ width: calc(var(--spacingHorizontalXS) * 11);
190
+ --fui-Spinner--strokeWidth: var(--strokeWidthThickest);
191
+ }
192
+
193
+ :where(.huge) > .label {
194
+ font-family: var(--fontFamilyBase);
195
+ font-size: var(--fontSizeBase500);
196
+ font-weight: var(--fontWeightSemibold);
197
+ line-height: var(--lineHeightBase500);
198
+ }
199
+
200
+ :where(.inverted) > .label {
201
+ color: var(--colorNeutralForegroundStaticInverted);
202
+ }
203
+
204
+ @media screen and (forced-colors: active) {
205
+ .spinner {
206
+ background-color: HighlightText;
207
+ color: Highlight;
208
+ forced-color-adjust: none;
209
+ }
210
+ }
211
+
212
+ @media screen and (prefers-reduced-motion: reduce) {
213
+ .spinner {
214
+ animation-duration: 1.8s;
215
+ }
216
+ }
217
+
218
+ @media screen and (prefers-reduced-motion: reduce) {
219
+ .spinnerTail::before,
220
+ .spinnerTail::after {
221
+ content: none;
222
+ }
223
+ }
224
+
225
+ @media screen and (prefers-reduced-motion: reduce) {
226
+ .spinnerTail {
227
+ animation-iteration-count: 0;
228
+ background-image: conic-gradient(transparent 120deg, currentcolor 360deg);
229
+ }
230
+ }
231
+
232
+ @media screen and (prefers-reduced-motion: reduce) {
233
+ .rtlTail {
234
+ background-image: conic-gradient(currentcolor 0deg, transparent 240deg);
235
+ }
236
+ }
237
+
238
+ @keyframes animation1 {
239
+ 0% {
240
+ transform: rotate(0deg);
241
+ }
242
+ 100% {
243
+ transform: rotate(360deg);
244
+ }
245
+ }
246
+
247
+ @keyframes animation1RTL {
248
+ 0% {
249
+ transform: rotate(0deg);
250
+ }
251
+ 100% {
252
+ transform: rotate(-360deg);
253
+ }
254
+ }
255
+
256
+ @keyframes animation2 {
257
+ 0% {
258
+ transform: rotate(-135deg);
259
+ }
260
+ 50% {
261
+ transform: rotate(0deg);
262
+ }
263
+ 100% {
264
+ transform: rotate(225deg);
265
+ }
266
+ }
267
+
268
+ @keyframes animation2RTL {
269
+ 0% {
270
+ transform: rotate(135deg);
271
+ }
272
+ 50% {
273
+ transform: rotate(0deg);
274
+ }
275
+ 100% {
276
+ transform: rotate(-225deg);
277
+ }
278
+ }
279
+
280
+ @keyframes animation3 {
281
+ 0% {
282
+ transform: rotate(0deg);
283
+ }
284
+ 50% {
285
+ transform: rotate(105deg);
286
+ }
287
+ 100% {
288
+ transform: rotate(0deg);
289
+ }
290
+ }
291
+
292
+ @keyframes animation3RTL {
293
+ 0% {
294
+ transform: rotate(0deg);
295
+ }
296
+ 50% {
297
+ transform: rotate(-105deg);
298
+ }
299
+ 100% {
300
+ transform: rotate(0deg);
301
+ }
302
+ }
303
+
304
+ @keyframes animation4 {
305
+ 0% {
306
+ transform: rotate(0deg);
307
+ }
308
+ 50% {
309
+ transform: rotate(225deg);
310
+ }
311
+ 100% {
312
+ transform: rotate(0deg);
313
+ }
314
+ }
315
+
316
+ @keyframes animation4RTL {
317
+ 0% {
318
+ transform: rotate(0deg);
319
+ }
320
+ 50% {
321
+ transform: rotate(-225deg);
322
+ }
323
+ 100% {
324
+ transform: rotate(0deg);
325
+ }
326
+ }
327
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Spinner/Spinner.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { Label } from '@fluentui/react-label';\n\nexport type SpinnerSlots = {\n /**\n * The root of the Spinner.\n * The root slot receives the `className` and `style` specified directly on the `<Spinner>`.\n */\n root: NonNullable<Slot<'div', 'span'>>;\n\n /**\n * The animated spinning ring.\n */\n spinner?: Slot<'span'>;\n\n /**\n * The part of the spinner that rotates.\n */\n spinnerTail?: NonNullable<Slot<'span'>>;\n\n /**\n * An optional label for the Spinner.\n */\n label?: Slot<typeof Label>;\n};\n\n/**\n * Spinner Props\n */\nexport type SpinnerProps = Omit<ComponentProps<SpinnerSlots>, 'size'> & {\n /**\n * The appearance of the Spinner.\n * @default 'primary'\n */\n appearance?: 'primary' | 'inverted';\n\n /**\n * Time in milliseconds after component mount before spinner is visible.\n * @default 0\n */\n delay?: number;\n\n /**\n * Where the label is positioned relative to the Spinner\n * @default 'after'\n */\n labelPosition?: 'above' | 'below' | 'before' | 'after';\n\n /**\n * The size of the spinner.\n * @default 'medium'\n */\n size?: 'extra-tiny' | 'tiny' | 'extra-small' | 'small' | 'medium' | 'large' | 'extra-large' | 'huge';\n};\n\n/**\n * Spinner base props, excluding design-related props like appearance and size.\n */\nexport type SpinnerBaseProps = Omit<SpinnerProps, 'appearance' | 'size'>;\n\n/**\n * State used in rendering Spinner\n */\nexport type SpinnerState = ComponentState<SpinnerSlots> &\n Required<Pick<SpinnerProps, 'appearance' | 'delay' | 'labelPosition' | 'size'>> & {\n /**\n * Should the spinner be rendered in the DOM\n */\n shouldRenderSpinner: boolean;\n };\n\n/**\n * Spinner base state, excluding design-related state like appearance and size.\n */\nexport type SpinnerBaseState = Omit<SpinnerState, 'appearance' | 'size'>;\n"],"names":[],"mappings":"AAuEA;;CAEC,GACD,WAAyE"}
1
+ {"version":3,"sources":["../../../src/components/Spinner/Spinner.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { Label } from '@fluentui/react-label';\n\nexport type SpinnerSlots = {\n /**\n * The root of the Spinner.\n * The root slot receives the `className` and `style` specified directly on the `<Spinner>`.\n */\n root: NonNullable<Slot<'div', 'span'>>;\n\n /**\n * The animated spinning ring.\n */\n spinner?: Slot<'span'>;\n\n /**\n * The part of the spinner that rotates.\n */\n spinnerTail?: NonNullable<Slot<'span'>>;\n\n /**\n * An optional label for the Spinner.\n */\n label?: Slot<typeof Label>;\n};\n\n/**\n * Spinner Props\n */\nexport type SpinnerProps = Omit<ComponentProps<SpinnerSlots>, 'size'> & {\n /**\n * The appearance of the Spinner.\n * @default 'primary'\n */\n appearance?: 'primary' | 'inverted';\n\n /**\n * Time in milliseconds after component mount before spinner is visible.\n * @default 0\n */\n delay?: number;\n\n /**\n * Where the label is positioned relative to the Spinner\n * @default 'after'\n */\n labelPosition?: 'above' | 'below' | 'before' | 'after';\n\n /**\n * The size of the spinner.\n * @default 'medium'\n */\n size?: 'extra-tiny' | 'tiny' | 'extra-small' | 'small' | 'medium' | 'large' | 'extra-large' | 'huge';\n};\n\n/**\n * Spinner base props, excluding design-related props like appearance and size.\n */\nexport type SpinnerBaseProps = Omit<SpinnerProps, 'appearance' | 'size'>;\n\n/**\n * State used in rendering Spinner\n */\nexport type SpinnerState = ComponentState<SpinnerSlots> &\n Required<Pick<SpinnerProps, 'appearance' | 'delay' | 'labelPosition' | 'size'>> & {\n /**\n * Should the spinner be rendered in the DOM\n */\n shouldRenderSpinner: boolean;\n };\n\n/**\n * Spinner base state, excluding design-related state like appearance and size.\n */\nexport type SpinnerBaseState = Omit<SpinnerState, 'appearance' | 'size'>;\n"],"names":[],"mappings":"AAuEA;;CAEC,GACD,WAAyE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Spinner/index.ts"],"sourcesContent":["export { Spinner } from './Spinner';\nexport type { SpinnerBaseProps, SpinnerBaseState, SpinnerProps, SpinnerSlots, SpinnerState } from './Spinner.types';\nexport { renderSpinner_unstable } from './renderSpinner';\nexport { useSpinner_unstable, useSpinnerBase_unstable } from './useSpinner';\nexport { spinnerClassNames, useSpinnerStyles_unstable } from './useSpinnerStyles.styles';\n"],"names":["Spinner","renderSpinner_unstable","useSpinner_unstable","useSpinnerBase_unstable","spinnerClassNames","useSpinnerStyles_unstable"],"mappings":"AAAA,SAASA,OAAO,QAAQ,eAAY;AAEpC,SAASC,sBAAsB,QAAQ,qBAAkB;AACzD,SAASC,mBAAmB,EAAEC,uBAAuB,QAAQ,kBAAe;AAC5E,SAASC,iBAAiB,EAAEC,yBAAyB,QAAQ,+BAA4B"}
1
+ {"version":3,"sources":["../../../src/components/Spinner/index.ts"],"sourcesContent":["export { Spinner } from './Spinner';\nexport type { SpinnerBaseProps, SpinnerBaseState, SpinnerProps, SpinnerSlots, SpinnerState } from './Spinner.types';\nexport { renderSpinner_unstable } from './renderSpinner';\nexport { useSpinner_unstable, useSpinnerBase_unstable } from './useSpinner';\nexport { spinnerClassNames, useSpinnerStyles_unstable } from './useSpinnerStyles.styles';\n"],"names":["Spinner","renderSpinner_unstable","useSpinner_unstable","useSpinnerBase_unstable","spinnerClassNames","useSpinnerStyles_unstable"],"mappings":"AAAA,SAASA,OAAO,QAAQ,eAAY;AAEpC,SAASC,sBAAsB,QAAQ,qBAAkB;AACzD,SAASC,mBAAmB,EAAEC,uBAAuB,QAAQ,kBAAe;AAC5E,SAASC,iBAAiB,EAAEC,yBAAyB,QAAQ,+BAA4B"}
@@ -1,5 +1,5 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
- import { assertSlots } from "@fluentui/react-utilities";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
+ import { assertSlots } from "@fluentui/react-utilities";
3
3
  /**
4
4
  * Render the final JSX of Spinner
5
5
  */ export const renderSpinner_unstable = (state)=>{
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Spinner/renderSpinner.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { SpinnerBaseState, SpinnerSlots } from './Spinner.types';\n\n/**\n * Render the final JSX of Spinner\n */\nexport const renderSpinner_unstable = (state: SpinnerBaseState): JSXElement => {\n assertSlots<SpinnerSlots>(state);\n const { labelPosition, shouldRenderSpinner } = state;\n return (\n <state.root>\n {state.label && shouldRenderSpinner && (labelPosition === 'above' || labelPosition === 'before') && (\n <state.label />\n )}\n {state.spinner && shouldRenderSpinner && (\n <state.spinner>{state.spinnerTail && <state.spinnerTail />}</state.spinner>\n )}\n {state.label && shouldRenderSpinner && (labelPosition === 'below' || labelPosition === 'after') && (\n <state.label />\n )}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderSpinner_unstable","state","labelPosition","shouldRenderSpinner","root","label","spinner","spinnerTail"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,yBAAyB,CAACC;IACrCF,YAA0BE;IAC1B,MAAM,EAAEC,aAAa,EAAEC,mBAAmB,EAAE,GAAGF;IAC/C,qBACE,MAACA,MAAMG,IAAI;;YACRH,MAAMI,KAAK,IAAIF,uBAAwBD,CAAAA,kBAAkB,WAAWA,kBAAkB,QAAO,mBAC5F,KAACD,MAAMI,KAAK;YAEbJ,MAAMK,OAAO,IAAIH,qCAChB,KAACF,MAAMK,OAAO;0BAAEL,MAAMM,WAAW,kBAAI,KAACN,MAAMM,WAAW;;YAExDN,MAAMI,KAAK,IAAIF,uBAAwBD,CAAAA,kBAAkB,WAAWA,kBAAkB,OAAM,mBAC3F,KAACD,MAAMI,KAAK;;;AAIpB,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/Spinner/renderSpinner.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { SpinnerBaseState, SpinnerSlots } from './Spinner.types';\n\n/**\n * Render the final JSX of Spinner\n */\nexport const renderSpinner_unstable = (state: SpinnerBaseState): JSXElement => {\n assertSlots<SpinnerSlots>(state);\n const { labelPosition, shouldRenderSpinner } = state;\n return (\n <state.root>\n {state.label && shouldRenderSpinner && (labelPosition === 'above' || labelPosition === 'before') && (\n <state.label />\n )}\n {state.spinner && shouldRenderSpinner && (\n <state.spinner>{state.spinnerTail && <state.spinnerTail />}</state.spinner>\n )}\n {state.label && shouldRenderSpinner && (labelPosition === 'below' || labelPosition === 'after') && (\n <state.label />\n )}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderSpinner_unstable","state","labelPosition","shouldRenderSpinner","root","label","spinner","spinnerTail"],"mappings":";AAAA,0BAA0B,GAC1B,iDAAiD,GAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,yBAAyB,CAACC;IACrCF,YAA0BE;IAC1B,MAAM,EAAEC,aAAa,EAAEC,mBAAmB,EAAE,GAAGF;IAC/C,qBACE,MAACA,MAAMG,IAAI;;YACRH,MAAMI,KAAK,IAAIF,uBAAwBD,CAAAA,kBAAkB,WAAWA,kBAAkB,QAAO,mBAC5F,KAACD,MAAMI,KAAK;YAEbJ,MAAMK,OAAO,IAAIH,qCAChB,KAACF,MAAMK,OAAO;0BAAEL,MAAMM,WAAW,kBAAI,KAACN,MAAMM,WAAW;;YAExDN,MAAMI,KAAK,IAAIF,uBAAwBD,CAAAA,kBAAkB,WAAWA,kBAAkB,OAAM,mBAC3F,KAACD,MAAMI,KAAK;;;AAIpB,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Spinner/useSpinner.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, useId, useTimeout, slot } from '@fluentui/react-utilities';\nimport type { SpinnerBaseProps, SpinnerBaseState, SpinnerProps, SpinnerState } from './Spinner.types';\nimport { Label } from '@fluentui/react-label';\nimport { useSpinnerContext } from '../../contexts/SpinnerContext';\n\n/**\n * Create the state required to render Spinner.\n *\n * The returned state can be modified with hooks such as useSpinnerStyles_unstable,\n * before being passed to renderSpinner_unstable.\n *\n * @param props - props from this instance of Spinner\n * @param ref - reference to root HTMLElement of Spinner\n */\nexport const useSpinner_unstable = (props: SpinnerProps, ref: React.Ref<HTMLElement>): SpinnerState => {\n const { size: contextSize } = useSpinnerContext();\n const { appearance = 'primary', size = contextSize ?? 'medium', ...baseProps } = props;\n\n const baseState = useSpinnerBase_unstable(baseProps, ref);\n\n return {\n ...baseState,\n appearance,\n size,\n components: {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ...baseState.components,\n label: Label,\n },\n label: slot.optional(props.label, {\n defaultProps: baseState.label,\n elementType: Label,\n }),\n };\n};\n\n/**\n * Base hook for Spinner component, which manages state related to slots structure, ARIA attributes,\n * and delay-based visibility logic.\n *\n * @param props - User provided props to the Spinner component.\n * @param ref - User provided ref to be passed to the Spinner component.\n */\nexport const useSpinnerBase_unstable = (props: SpinnerBaseProps, ref: React.Ref<HTMLElement>): SpinnerBaseState => {\n const { delay = 0, labelPosition = 'after' } = props;\n const baseId = useId('spinner');\n\n const { role = 'progressbar', ...rest } = props;\n const nativeRoot = slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n role,\n ...rest,\n }),\n {\n elementType: 'div',\n },\n );\n const [isShownAfterDelay, setIsShownAfterDelay] = React.useState(false);\n const [setDelayTimeout, clearDelayTimeout] = useTimeout();\n React.useEffect(() => {\n if (delay <= 0) {\n return;\n }\n setDelayTimeout(() => {\n setIsShownAfterDelay(true);\n }, delay);\n return () => {\n clearDelayTimeout();\n };\n }, [setDelayTimeout, clearDelayTimeout, delay]);\n const labelShorthand = slot.optional(props.label, {\n defaultProps: { id: baseId },\n renderByDefault: false,\n elementType: 'label',\n });\n const spinnerShortHand = slot.optional(props.spinner, {\n renderByDefault: true,\n elementType: 'span',\n });\n if (labelShorthand && nativeRoot && !nativeRoot['aria-labelledby']) {\n nativeRoot['aria-labelledby'] = labelShorthand.id;\n }\n const state: SpinnerBaseState = {\n delay,\n labelPosition,\n shouldRenderSpinner: !delay || isShownAfterDelay,\n components: { root: 'div', spinner: 'span', spinnerTail: 'span', label: 'label' },\n root: nativeRoot,\n spinner: spinnerShortHand,\n spinnerTail: slot.always(props.spinnerTail, { elementType: 'span' }),\n label: labelShorthand,\n };\n return state;\n};\n"],"names":["React","getIntrinsicElementProps","useId","useTimeout","slot","Label","useSpinnerContext","useSpinner_unstable","props","ref","size","contextSize","appearance","baseProps","baseState","useSpinnerBase_unstable","components","label","optional","defaultProps","elementType","delay","labelPosition","baseId","role","rest","nativeRoot","always","isShownAfterDelay","setIsShownAfterDelay","useState","setDelayTimeout","clearDelayTimeout","useEffect","labelShorthand","id","renderByDefault","spinnerShortHand","spinner","state","shouldRenderSpinner","root","spinnerTail"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,KAAK,EAAEC,UAAU,EAAEC,IAAI,QAAQ,4BAA4B;AAE9F,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,iBAAiB,QAAQ,mCAAgC;AAElE;;;;;;;;CAQC,GACD,OAAO,MAAMC,sBAAsB,CAACC,OAAqBC;IACvD,MAAM,EAAEC,MAAMC,WAAW,EAAE,GAAGL;IAC9B,MAAM,EAAEM,aAAa,SAAS,EAAEF,OAAOC,wBAAAA,yBAAAA,cAAe,QAAQ,EAAE,GAAGE,WAAW,GAAGL;IAEjF,MAAMM,YAAYC,wBAAwBF,WAAWJ;IAErD,OAAO;QACL,GAAGK,SAAS;QACZF;QACAF;QACAM,YAAY;YACV,4DAA4D;YAC5D,GAAGF,UAAUE,UAAU;YACvBC,OAAOZ;QACT;QACAY,OAAOb,KAAKc,QAAQ,CAACV,MAAMS,KAAK,EAAE;YAChCE,cAAcL,UAAUG,KAAK;YAC7BG,aAAaf;QACf;IACF;AACF,EAAE;AAEF;;;;;;CAMC,GACD,OAAO,MAAMU,0BAA0B,CAACP,OAAyBC;IAC/D,MAAM,EAAEY,QAAQ,CAAC,EAAEC,gBAAgB,OAAO,EAAE,GAAGd;IAC/C,MAAMe,SAASrB,MAAM;IAErB,MAAM,EAAEsB,OAAO,aAAa,EAAE,GAAGC,MAAM,GAAGjB;IAC1C,MAAMkB,aAAatB,KAAKuB,MAAM,CAC5B1B,yBAAyB,OAAO;QAC9B,SAAS;QACT,4EAA4E;QAC5E,4FAA4F;QAC5FQ,KAAKA;QACLe;QACA,GAAGC,IAAI;IACT,IACA;QACEL,aAAa;IACf;IAEF,MAAM,CAACQ,mBAAmBC,qBAAqB,GAAG7B,MAAM8B,QAAQ,CAAC;IACjE,MAAM,CAACC,iBAAiBC,kBAAkB,GAAG7B;IAC7CH,MAAMiC,SAAS,CAAC;QACd,IAAIZ,SAAS,GAAG;YACd;QACF;QACAU,gBAAgB;YACdF,qBAAqB;QACvB,GAAGR;QACH,OAAO;YACLW;QACF;IACF,GAAG;QAACD;QAAiBC;QAAmBX;KAAM;IAC9C,MAAMa,iBAAiB9B,KAAKc,QAAQ,CAACV,MAAMS,KAAK,EAAE;QAChDE,cAAc;YAAEgB,IAAIZ;QAAO;QAC3Ba,iBAAiB;QACjBhB,aAAa;IACf;IACA,MAAMiB,mBAAmBjC,KAAKc,QAAQ,CAACV,MAAM8B,OAAO,EAAE;QACpDF,iBAAiB;QACjBhB,aAAa;IACf;IACA,IAAIc,kBAAkBR,cAAc,CAACA,UAAU,CAAC,kBAAkB,EAAE;QAClEA,UAAU,CAAC,kBAAkB,GAAGQ,eAAeC,EAAE;IACnD;IACA,MAAMI,QAA0B;QAC9BlB;QACAC;QACAkB,qBAAqB,CAACnB,SAASO;QAC/BZ,YAAY;YAAEyB,MAAM;YAAOH,SAAS;YAAQI,aAAa;YAAQzB,OAAO;QAAQ;QAChFwB,MAAMf;QACNY,SAASD;QACTK,aAAatC,KAAKuB,MAAM,CAACnB,MAAMkC,WAAW,EAAE;YAAEtB,aAAa;QAAO;QAClEH,OAAOiB;IACT;IACA,OAAOK;AACT,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/Spinner/useSpinner.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, useId, useTimeout, slot } from '@fluentui/react-utilities';\nimport type { SpinnerBaseProps, SpinnerBaseState, SpinnerProps, SpinnerState } from './Spinner.types';\nimport { Label } from '@fluentui/react-label';\nimport { useSpinnerContext } from '../../contexts/SpinnerContext';\n\n/**\n * Create the state required to render Spinner.\n *\n * The returned state can be modified with hooks such as useSpinnerStyles_unstable,\n * before being passed to renderSpinner_unstable.\n *\n * @param props - props from this instance of Spinner\n * @param ref - reference to root HTMLElement of Spinner\n */\nexport const useSpinner_unstable = (props: SpinnerProps, ref: React.Ref<HTMLElement>): SpinnerState => {\n const { size: contextSize } = useSpinnerContext();\n const { appearance = 'primary', size = contextSize ?? 'medium', ...baseProps } = props;\n\n const baseState = useSpinnerBase_unstable(baseProps, ref);\n\n return {\n ...baseState,\n appearance,\n size,\n components: {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ...baseState.components,\n label: Label,\n },\n label: slot.optional(props.label, {\n defaultProps: baseState.label,\n elementType: Label,\n }),\n };\n};\n\n/**\n * Base hook for Spinner component, which manages state related to slots structure, ARIA attributes,\n * and delay-based visibility logic.\n *\n * @param props - User provided props to the Spinner component.\n * @param ref - User provided ref to be passed to the Spinner component.\n */\nexport const useSpinnerBase_unstable = (props: SpinnerBaseProps, ref: React.Ref<HTMLElement>): SpinnerBaseState => {\n const { delay = 0, labelPosition = 'after' } = props;\n const baseId = useId('spinner');\n\n const { role = 'progressbar', ...rest } = props;\n const nativeRoot = slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n role,\n ...rest,\n }),\n {\n elementType: 'div',\n },\n );\n const [isShownAfterDelay, setIsShownAfterDelay] = React.useState(false);\n const [setDelayTimeout, clearDelayTimeout] = useTimeout();\n React.useEffect(() => {\n if (delay <= 0) {\n return;\n }\n setDelayTimeout(() => {\n setIsShownAfterDelay(true);\n }, delay);\n return () => {\n clearDelayTimeout();\n };\n }, [setDelayTimeout, clearDelayTimeout, delay]);\n const labelShorthand = slot.optional(props.label, {\n defaultProps: { id: baseId },\n renderByDefault: false,\n elementType: 'label',\n });\n const spinnerShortHand = slot.optional(props.spinner, {\n renderByDefault: true,\n elementType: 'span',\n });\n if (labelShorthand && nativeRoot && !nativeRoot['aria-labelledby']) {\n nativeRoot['aria-labelledby'] = labelShorthand.id;\n }\n const state: SpinnerBaseState = {\n delay,\n labelPosition,\n shouldRenderSpinner: !delay || isShownAfterDelay,\n components: { root: 'div', spinner: 'span', spinnerTail: 'span', label: 'label' },\n root: nativeRoot,\n spinner: spinnerShortHand,\n spinnerTail: slot.always(props.spinnerTail, { elementType: 'span' }),\n label: labelShorthand,\n };\n return state;\n};\n"],"names":["React","getIntrinsicElementProps","useId","useTimeout","slot","Label","useSpinnerContext","useSpinner_unstable","props","ref","size","contextSize","appearance","baseProps","baseState","useSpinnerBase_unstable","components","label","optional","defaultProps","elementType","delay","labelPosition","baseId","role","rest","nativeRoot","always","isShownAfterDelay","setIsShownAfterDelay","useState","setDelayTimeout","clearDelayTimeout","useEffect","labelShorthand","id","renderByDefault","spinnerShortHand","spinner","state","shouldRenderSpinner","root","spinnerTail"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,KAAK,EAAEC,UAAU,EAAEC,IAAI,QAAQ,4BAA4B;AAE9F,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,iBAAiB,QAAQ,mCAAgC;AAElE;;;;;;;;CAQC,GACD,OAAO,MAAMC,sBAAsB,CAACC,OAAqBC;IACvD,MAAM,EAAEC,MAAMC,WAAW,EAAE,GAAGL;IAC9B,MAAM,EAAEM,aAAa,SAAS,EAAEF,OAAOC,wBAAAA,yBAAAA,cAAe,QAAQ,EAAE,GAAGE,WAAW,GAAGL;IAEjF,MAAMM,YAAYC,wBAAwBF,WAAWJ;IAErD,OAAO;QACL,GAAGK,SAAS;QACZF;QACAF;QACAM,YAAY;YACV,4DAA4D;YAC5D,GAAGF,UAAUE,UAAU;YACvBC,OAAOZ;QACT;QACAY,OAAOb,KAAKc,QAAQ,CAACV,MAAMS,KAAK,EAAE;YAChCE,cAAcL,UAAUG,KAAK;YAC7BG,aAAaf;QACf;IACF;AACF,EAAE;AAEF;;;;;;CAMC,GACD,OAAO,MAAM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AClEH,OAAOiB;IACT;IACA,OAAOK;AACT,EAAE"}
@@ -0,0 +1,28 @@
1
+ 'use client';
2
+ import { useFluent_unstable as useFluent } from "@fluentui/react-shared-contexts";
3
+ import { clsx } from "clsx";
4
+ import styles from "./Spinner.module.css";
5
+ export const spinnerClassNames = {
6
+ root: 'fui-Spinner',
7
+ spinner: 'fui-Spinner__spinner',
8
+ spinnerTail: 'fui-Spinner__spinnerTail',
9
+ label: 'fui-Spinner__label'
10
+ };
11
+ export const useSpinnerStyles_unstable = (state)=>{
12
+ const { dir } = useFluent();
13
+ // eslint-disable-next-line react-hooks/immutability
14
+ state.root.className = clsx(spinnerClassNames.root, styles.root, styles[state.labelPosition], styles[state.size], styles[state.appearance], state.root.className);
15
+ if (state.spinner) {
16
+ // eslint-disable-next-line react-hooks/immutability
17
+ state.spinner.className = clsx(spinnerClassNames.spinner, styles.spinner, state.spinner.className);
18
+ }
19
+ if (state.spinnerTail) {
20
+ // eslint-disable-next-line react-hooks/immutability
21
+ state.spinnerTail.className = clsx(spinnerClassNames.spinnerTail, styles.spinnerTail, dir === 'rtl' && styles.rtlTail, state.spinnerTail.className);
22
+ }
23
+ if (state.label) {
24
+ // eslint-disable-next-line react-hooks/immutability
25
+ state.label.className = clsx(spinnerClassNames.label, styles.label, state.label.className);
26
+ }
27
+ return state;
28
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/Spinner/useSpinnerStyles.styles.css.ts"],"sourcesContent":["'use client';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { SpinnerState, SpinnerSlots } from './Spinner.types';\nimport styles from './Spinner.module.css';\n\nexport const spinnerClassNames: SlotClassNames<SpinnerSlots> = {\n root: 'fui-Spinner',\n spinner: 'fui-Spinner__spinner',\n spinnerTail: 'fui-Spinner__spinnerTail',\n label: 'fui-Spinner__label',\n};\n\nexport const useSpinnerStyles_unstable = (state: SpinnerState): SpinnerState => {\n const { dir } = useFluent();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = clsx(\n spinnerClassNames.root,\n styles.root,\n styles[state.labelPosition],\n styles[state.size],\n styles[state.appearance],\n state.root.className,\n );\n if (state.spinner) {\n // eslint-disable-next-line react-hooks/immutability\n state.spinner.className = clsx(spinnerClassNames.spinner, styles.spinner, state.spinner.className);\n }\n if (state.spinnerTail) {\n // eslint-disable-next-line react-hooks/immutability\n state.spinnerTail.className = clsx(\n spinnerClassNames.spinnerTail,\n styles.spinnerTail,\n dir === 'rtl' && styles.rtlTail,\n state.spinnerTail.className,\n );\n }\n if (state.label) {\n // eslint-disable-next-line react-hooks/immutability\n state.label.className = clsx(spinnerClassNames.label, styles.label, state.label.className);\n }\n return state;\n};\n"],"names":["useFluent_unstable","useFluent","clsx","styles","spinnerClassNames","root","spinner","spinnerTail","label","useSpinnerStyles_unstable","state","dir","className","labelPosition","size","appearance","rtlTail"],"mappings":"AAAA;AACA,SAASA,sBAAsBC,SAAS,QAAQ,kCAAkC;AAClF,SAASC,IAAI,QAAQ,OAAO;AAG5B,OAAOC,YAAY,uBAAuB;AAE1C,OAAO,MAAMC,oBAAkD;IAC7DC,MAAM;IACNC,SAAS;IACTC,aAAa;IACbC,OAAO;AACT,EAAE;AAEF,OAAO,MAAMC,4BAA4B,CAACC;IACxC,MAAM,EAAEC,GAAG,EAAE,GAAGV;IAChB,oDAAoD;IACpDS,MAAML,IAAI,CAACO,SAAS,GAAGV,KACrBE,kBAAkBC,IAAI,EACtBF,OAAOE,IAAI,EACXF,MAAM,CAACO,MAAMG,aAAa,CAAC,EAC3BV,MAAM,CAACO,MAAMI,IAAI,CAAC,EAClBX,MAAM,CAACO,MAAMK,UAAU,CAAC,EACxBL,MAAML,IAAI,CAACO,SAAS;IAEtB,IAAIF,MAAMJ,OAAO,EAAE;QACjB,oDAAoD;QACpDI,MAAMJ,OAAO,CAACM,SAAS,GAAGV,KAAKE,kBAAkBE,OAAO,EAAEH,OAAOG,OAAO,EAAEI,MAAMJ,OAAO,CAACM,SAAS;IACnG;IACA,IAAIF,MAAMH,WAAW,EAAE;QACrB,oDAAoD;QACpDG,MAAMH,WAAW,CAACK,SAAS,GAAGV,KAC5BE,kBAAkBG,WAAW,EAC7BJ,OAAOI,WAAW,EAClBI,QAAQ,SAASR,OAAOa,OAAO,EAC/BN,MAAMH,WAAW,CAACK,SAAS;IAE/B;IACA,IAAIF,MAAMF,KAAK,EAAE;QACf,oDAAoD;QACpDE,MAAMF,KAAK,CAACI,SAAS,GAAGV,KAAKE,kBAAkBI,KAAK,EAAEL,OAAOK,KAAK,EAAEE,MAAMF,KAAK,CAACI,SAAS;IAC3F;IACA,OAAOF;AACT,EAAE"}
@@ -0,0 +1,28 @@
1
+ 'use client';
2
+ import { useFluent_unstable as useFluent } from "@fluentui/react-shared-contexts";
3
+ import { clsx } from "clsx";
4
+ import styles from "./Spinner.module.css";
5
+ export const spinnerClassNames = {
6
+ root: 'fui-Spinner',
7
+ spinner: 'fui-Spinner__spinner',
8
+ spinnerTail: 'fui-Spinner__spinnerTail',
9
+ label: 'fui-Spinner__label'
10
+ };
11
+ export const useSpinnerStyles_unstable = (state)=>{
12
+ const { dir } = useFluent();
13
+ // eslint-disable-next-line react-hooks/immutability
14
+ state.root.className = clsx(spinnerClassNames.root, styles.root, styles[state.labelPosition], styles[state.size], styles[state.appearance], state.root.className);
15
+ if (state.spinner) {
16
+ // eslint-disable-next-line react-hooks/immutability
17
+ state.spinner.className = clsx(spinnerClassNames.spinner, styles.spinner, state.spinner.className);
18
+ }
19
+ if (state.spinnerTail) {
20
+ // eslint-disable-next-line react-hooks/immutability
21
+ state.spinnerTail.className = clsx(spinnerClassNames.spinnerTail, styles.spinnerTail, dir === 'rtl' && styles.rtlTail, state.spinnerTail.className);
22
+ }
23
+ if (state.label) {
24
+ // eslint-disable-next-line react-hooks/immutability
25
+ state.label.className = clsx(spinnerClassNames.label, styles.label, state.label.className);
26
+ }
27
+ return state;
28
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/Spinner/useSpinnerStyles.styles.css.ts"],"sourcesContent":["'use client';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { SpinnerState, SpinnerSlots } from './Spinner.types';\nimport styles from './Spinner.module.css';\n\nexport const spinnerClassNames: SlotClassNames<SpinnerSlots> = {\n root: 'fui-Spinner',\n spinner: 'fui-Spinner__spinner',\n spinnerTail: 'fui-Spinner__spinnerTail',\n label: 'fui-Spinner__label',\n};\n\nexport const useSpinnerStyles_unstable = (state: SpinnerState): SpinnerState => {\n const { dir } = useFluent();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = clsx(\n spinnerClassNames.root,\n styles.root,\n styles[state.labelPosition],\n styles[state.size],\n styles[state.appearance],\n state.root.className,\n );\n if (state.spinner) {\n // eslint-disable-next-line react-hooks/immutability\n state.spinner.className = clsx(spinnerClassNames.spinner, styles.spinner, state.spinner.className);\n }\n if (state.spinnerTail) {\n // eslint-disable-next-line react-hooks/immutability\n state.spinnerTail.className = clsx(\n spinnerClassNames.spinnerTail,\n styles.spinnerTail,\n dir === 'rtl' && styles.rtlTail,\n state.spinnerTail.className,\n );\n }\n if (state.label) {\n // eslint-disable-next-line react-hooks/immutability\n state.label.className = clsx(spinnerClassNames.label, styles.label, state.label.className);\n }\n return state;\n};\n"],"names":["useFluent_unstable","useFluent","clsx","styles","spinnerClassNames","root","spinner","spinnerTail","label","useSpinnerStyles_unstable","state","dir","className","labelPosition","size","appearance","rtlTail"],"mappings":"AAAA;AACA,SAASA,sBAAsBC,SAAS,QAAQ,kCAAkC;AAClF,SAASC,IAAI,QAAQ,OAAO;AAG5B,OAAOC,YAAY,uBAAuB;AAE1C,OAAO,MAAMC,oBAAkD;IAC7DC,MAAM;IACNC,SAAS;IACTC,aAAa;IACbC,OAAO;AACT,EAAE;AAEF,OAAO,MAAMC,4BAA4B,CAACC;IACxC,MAAM,EAAEC,GAAG,EAAE,GAAGV;IAChB,oDAAoD;IACpDS,MAAML,IAAI,CAACO,SAAS,GAAGV,KACrBE,kBAAkBC,IAAI,EACtBF,OAAOE,IAAI,EACXF,MAAM,CAACO,MAAMG,aAAa,CAAC,EAC3BV,MAAM,CAACO,MAAMI,IAAI,CAAC,EAClBX,MAAM,CAACO,MAAMK,UAAU,CAAC,EACxBL,MAAML,IAAI,CAACO,SAAS;IAEtB,IAAIF,MAAMJ,OAAO,EAAE;QACjB,oDAAoD;QACpDI,MAAMJ,OAAO,CAACM,SAAS,GAAGV,KAAKE,kBAAkBE,OAAO,EAAEH,OAAOG,OAAO,EAAEI,MAAMJ,OAAO,CAACM,SAAS;IACnG;IACA,IAAIF,MAAMH,WAAW,EAAE;QACrB,oDAAoD;QACpDG,MAAMH,WAAW,CAACK,SAAS,GAAGV,KAC5BE,kBAAkBG,WAAW,EAC7BJ,OAAOI,WAAW,EAClBI,QAAQ,SAASR,OAAOa,OAAO,EAC/BN,MAAMH,WAAW,CAACK,SAAS;IAE/B;IACA,IAAIF,MAAMF,KAAK,EAAE;QACf,oDAAoD;QACpDE,MAAMF,KAAK,CAACI,SAAS,GAAGV,KAAKE,kBAAkBI,KAAK,EAAEL,OAAOK,KAAK,EAAEE,MAAMF,KAAK,CAACI,SAAS;IAC3F;IACA,OAAOF;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Spinner/useSpinnerStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport type { SpinnerSlots, SpinnerState } from './Spinner.types';\n\nexport const spinnerClassNames: SlotClassNames<SpinnerSlots> = {\n root: 'fui-Spinner',\n spinner: 'fui-Spinner__spinner',\n spinnerTail: 'fui-Spinner__spinnerTail',\n label: 'fui-Spinner__label',\n};\n\n/**\n * CSS variables used internally by Spinner\n */\nconst vars = {\n strokeWidth: '--fui-Spinner--strokeWidth',\n};\n\nconst useRootBaseClassName = makeResetStyles({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n lineHeight: '0',\n gap: '8px',\n overflow: 'hidden', // prevents height changes from rotating children\n minWidth: 'min-content',\n});\n\nconst useRootStyles = makeStyles({\n vertical: {\n flexDirection: 'column',\n },\n});\n\nconst useSpinnerBaseClassName = makeResetStyles({\n position: 'relative',\n flexShrink: 0,\n\n // Use a mask to create the ring shape of the spinner.\n maskImage:\n `radial-gradient(closest-side, ` +\n `transparent calc(100% - var(${vars.strokeWidth}) - 1px), ` +\n `white calc(100% - var(${vars.strokeWidth})) calc(100% - 1px), ` +\n `transparent 100%)`,\n\n backgroundColor: tokens.colorBrandStroke2Contrast,\n color: tokens.colorBrandStroke1,\n '@media screen and (forced-colors: active)': {\n backgroundColor: 'HighlightText',\n color: 'Highlight',\n forcedColorAdjust: 'none',\n },\n\n animationDuration: '1.5s',\n animationIterationCount: 'infinite',\n animationTimingFunction: 'linear',\n animationName: {\n '0%': { transform: 'rotate(0deg)' },\n '100%': { transform: 'rotate(360deg)' },\n },\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n animationDuration: '1.8s',\n },\n});\n\n// The spinner tail is rendered using two 135deg arc segments, behind a 105deg arc mask.\n// The segments are rotated out from behind the mask to expand the visible arc from\n// 30deg (min) to 255deg (max), and then back behind the mask again to shrink the arc.\n// The tail and spinner itself also have 360deg rotation animations for the spin.\nconst useSpinnerTailBaseClassName = makeResetStyles({\n position: 'absolute',\n display: 'block',\n width: '100%',\n height: '100%',\n maskImage: 'conic-gradient(transparent 105deg, white 105deg)',\n\n '&::before, &::after': {\n content: '\"\"',\n position: 'absolute',\n display: 'block',\n width: '100%',\n height: '100%',\n animation: 'inherit',\n backgroundImage: 'conic-gradient(currentcolor 135deg, transparent 135deg)',\n },\n\n animationDuration: '1.5s',\n animationIterationCount: 'infinite',\n animationTimingFunction: tokens.curveEasyEase,\n animationName: {\n '0%': { transform: 'rotate(-135deg)' },\n '50%': { transform: 'rotate(0deg)' },\n '100%': { transform: 'rotate(225deg)' },\n },\n '&::before': {\n animationName: {\n '0%': { transform: 'rotate(0deg)' },\n '50%': { transform: 'rotate(105deg)' },\n '100%': { transform: 'rotate(0deg)' },\n },\n },\n '&::after': {\n animationName: {\n '0%': { transform: 'rotate(0deg)' },\n '50%': { transform: 'rotate(225deg)' },\n '100%': { transform: 'rotate(0deg)' },\n },\n },\n '@media screen and (prefers-reduced-motion: reduce)': {\n animationIterationCount: '0',\n backgroundImage: 'conic-gradient(transparent 120deg, currentcolor 360deg)',\n '&::before, &::after': {\n content: 'none',\n },\n },\n});\n\nconst useSpinnerStyles = makeStyles({\n inverted: {\n backgroundColor: tokens.colorNeutralStrokeAlpha2,\n color: tokens.colorNeutralStrokeOnBrand2,\n },\n\n rtlTail: {\n maskImage: 'conic-gradient(white 255deg, transparent 255deg)',\n '&::before, &::after': {\n backgroundImage: 'conic-gradient(transparent 225deg, currentcolor 225deg)',\n },\n '@media screen and (prefers-reduced-motion: reduce)': {\n backgroundImage: 'conic-gradient(currentcolor 0deg, transparent 240deg)',\n },\n },\n\n 'extra-tiny': {\n height: '16px',\n width: '16px',\n [vars.strokeWidth]: tokens.strokeWidthThick,\n },\n\n tiny: {\n height: '20px',\n width: '20px',\n [vars.strokeWidth]: tokens.strokeWidthThick,\n },\n\n 'extra-small': {\n height: '24px',\n width: '24px',\n [vars.strokeWidth]: tokens.strokeWidthThick,\n },\n\n small: {\n height: '28px',\n width: '28px',\n [vars.strokeWidth]: tokens.strokeWidthThick,\n },\n\n medium: {\n height: '32px',\n width: '32px',\n [vars.strokeWidth]: tokens.strokeWidthThicker,\n },\n\n large: {\n height: '36px',\n width: '36px',\n [vars.strokeWidth]: tokens.strokeWidthThicker,\n },\n\n 'extra-large': {\n height: '40px',\n width: '40px',\n [vars.strokeWidth]: tokens.strokeWidthThicker,\n },\n\n huge: {\n height: '44px',\n width: '44px',\n [vars.strokeWidth]: tokens.strokeWidthThickest,\n },\n});\n\nconst useLabelStyles = makeStyles({\n inverted: {\n color: tokens.colorNeutralForegroundStaticInverted,\n },\n\n 'extra-tiny': {\n ...typographyStyles.body1,\n },\n\n tiny: {\n ...typographyStyles.body1,\n },\n\n 'extra-small': {\n ...typographyStyles.body1,\n },\n\n small: {\n ...typographyStyles.body1,\n },\n\n medium: {\n ...typographyStyles.subtitle2,\n },\n\n large: {\n ...typographyStyles.subtitle2,\n },\n\n 'extra-large': {\n ...typographyStyles.subtitle2,\n },\n\n huge: {\n ...typographyStyles.subtitle1,\n },\n});\n\n/**\n * Apply styling to the Spinner slots based on the state\n */\nexport const useSpinnerStyles_unstable = (state: SpinnerState): SpinnerState => {\n const { labelPosition, size, appearance } = state;\n const { dir } = useFluent();\n\n const rootBaseClassName = useRootBaseClassName();\n const rootStyles = useRootStyles();\n const spinnerBaseClassName = useSpinnerBaseClassName();\n const spinnerStyles = useSpinnerStyles();\n const spinnerTailBaseClassName = useSpinnerTailBaseClassName();\n const labelStyles = useLabelStyles();\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n spinnerClassNames.root,\n rootBaseClassName,\n (labelPosition === 'above' || labelPosition === 'below') && rootStyles.vertical,\n state.root.className,\n );\n if (state.spinner) {\n // eslint-disable-next-line react-hooks/immutability\n state.spinner.className = mergeClasses(\n spinnerClassNames.spinner,\n spinnerBaseClassName,\n spinnerStyles[size],\n appearance === 'inverted' && spinnerStyles.inverted,\n state.spinner.className,\n );\n }\n if (state.spinnerTail) {\n // eslint-disable-next-line react-hooks/immutability\n state.spinnerTail.className = mergeClasses(\n spinnerClassNames.spinnerTail,\n spinnerTailBaseClassName,\n dir === 'rtl' && spinnerStyles.rtlTail,\n state.spinnerTail.className,\n );\n }\n if (state.label) {\n // eslint-disable-next-line react-hooks/immutability\n state.label.className = mergeClasses(\n spinnerClassNames.label,\n labelStyles[size],\n appearance === 'inverted' && labelStyles.inverted,\n state.label.className,\n );\n }\n\n return state;\n};\n"],"names":["useFluent_unstable","useFluent","tokens","typographyStyles","makeResetStyles","makeStyles","mergeClasses","spinnerClassNames","root","spinner","spinnerTail","label","vars","strokeWidth","useRootBaseClassName","display","alignItems","justifyContent","lineHeight","gap","overflow","minWidth","useRootStyles","vertical","flexDirection","useSpinnerBaseClassName","position","flexShrink","maskImage","backgroundColor","colorBrandStroke2Contrast","color","colorBrandStroke1","forcedColorAdjust","animationDuration","animationIterationCount","animationTimingFunction","animationName","transform","useSpinnerTailBaseClassName","width","height","content","animation","backgroundImage","curveEasyEase","useSpinnerStyles","inverted","colorNeutralStrokeAlpha2","colorNeutralStrokeOnBrand2","rtlTail","strokeWidthThick","tiny","small","medium","strokeWidthThicker","large","huge","strokeWidthThickest","useLabelStyles","colorNeutralForegroundStaticInverted","body1","subtitle2","subtitle1","useSpinnerStyles_unstable","state","labelPosition","size","appearance","dir","rootBaseClassName","rootStyles","spinnerBaseClassName","spinnerStyles","spinnerTailBaseClassName","labelStyles","className"],"mappings":"AAAA;AAEA,SAASA,sBAAsBC,SAAS,QAAQ,kCAAkC;AAClF,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,wBAAwB;AAEjE,SAASC,eAAe,EAAEC,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAG3E,OAAO,MAAMC,oBAAkD;IAC7DC,MAAM;IACNC,SAAS;IACTC,aAAa;IACbC,OAAO;AACT,EAAE;AAEF;;CAEC,GACD,MAAMC,OAAO;IACXC,aAAa;AACf;AAEA,MAAMC,uBAAuBV,gBAAgB;IAC3CW,SAAS;IACTC,YAAY;IACZC,gBAAgB;IAChBC,YAAY;IACZC,KAAK;IACLC,UAAU;IACVC,UAAU;AACZ;AAEA,MAAMC,gBAAgBjB,WAAW;IAC/BkB,UAAU;QACRC,eAAe;IACjB;AACF;AAEA,MAAMC,0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,GAAGtE,aAC5BC,kBAAkBG,WAAW,EAC7BgE,0BACAL,QAAQ,SAASI,cAAcvB,OAAO,EACtCe,MAAMvD,WAAW,CAACkE,SAAS;IAE/B;IACA,IAAIX,MAAMtD,KAAK,EAAE;QACf,oDAAoD;QACpDsD,MAAMtD,KAAK,CAACiE,SAAS,GAAGtE,aACtBC,kBAAkBI,KAAK,EACvBgE,WAAW,CAACR,KAAK,EACjBC,eAAe,cAAcO,YAAY5B,QAAQ,EACjDkB,MAAMtD,KAAK,CAACiE,SAAS;IAEzB;IAEA,OAAOX;AACT,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/Spinner/useSpinnerStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport type { SpinnerSlots, SpinnerState } from './Spinner.types';\n\nexport const spinnerClassNames: SlotClassNames<SpinnerSlots> = {\n root: 'fui-Spinner',\n spinner: 'fui-Spinner__spinner',\n spinnerTail: 'fui-Spinner__spinnerTail',\n label: 'fui-Spinner__label',\n};\n\n/**\n * CSS variables used internally by Spinner\n */\nconst vars = {\n strokeWidth: '--fui-Spinner--strokeWidth',\n};\n\nconst useRootBaseClassName = makeResetStyles({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n lineHeight: '0',\n gap: '8px',\n overflow: 'hidden', // prevents height changes from rotating children\n minWidth: 'min-content',\n});\n\nconst useRootStyles = makeStyles({\n vertical: {\n flexDirection: 'column',\n },\n});\n\nconst useSpinnerBaseClassName = makeResetStyles({\n position: 'relative',\n flexShrink: 0,\n\n // Use a mask to create the ring shape of the spinner.\n maskImage:\n `radial-gradient(closest-side, ` +\n `transparent calc(100% - var(${vars.strokeWidth}) - 1px), ` +\n `white calc(100% - var(${vars.strokeWidth})) calc(100% - 1px), ` +\n `transparent 100%)`,\n\n backgroundColor: tokens.colorBrandStroke2Contrast,\n color: tokens.colorBrandStroke1,\n '@media screen and (forced-colors: active)': {\n backgroundColor: 'HighlightText',\n color: 'Highlight',\n forcedColorAdjust: 'none',\n },\n\n animationDuration: '1.5s',\n animationIterationCount: 'infinite',\n animationTimingFunction: 'linear',\n animationName: {\n '0%': { transform: 'rotate(0deg)' },\n '100%': { transform: 'rotate(360deg)' },\n },\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n animationDuration: '1.8s',\n },\n});\n\n// The spinner tail is rendered using two 135deg arc segments, behind a 105deg arc mask.\n// The segments are rotated out from behind the mask to expand the visible arc from\n// 30deg (min) to 255deg (max), and then back behind the mask again to shrink the arc.\n// The tail and spinner itself also have 360deg rotation animations for the spin.\nconst useSpinnerTailBaseClassName = makeResetStyles({\n position: 'absolute',\n display: 'block',\n width: '100%',\n height: '100%',\n maskImage: 'conic-gradient(transparent 105deg, white 105deg)',\n\n '&::before, &::after': {\n content: '\"\"',\n position: 'absolute',\n display: 'block',\n width: '100%',\n height: '100%',\n animation: 'inherit',\n backgroundImage: 'conic-gradient(currentcolor 135deg, transparent 135deg)',\n },\n\n animationDuration: '1.5s',\n animationIterationCount: 'infinite',\n animationTimingFunction: tokens.curveEasyEase,\n animationName: {\n '0%': { transform: 'rotate(-135deg)' },\n '50%': { transform: 'rotate(0deg)' },\n '100%': { transform: 'rotate(225deg)' },\n },\n '&::before': {\n animationName: {\n '0%': { transform: 'rotate(0deg)' },\n '50%': { transform: 'rotate(105deg)' },\n '100%': { transform: 'rotate(0deg)' },\n },\n },\n '&::after': {\n animationName: {\n '0%': { transform: 'rotate(0deg)' },\n '50%': { transform: 'rotate(225deg)' },\n '100%': { transform: 'rotate(0deg)' },\n },\n },\n '@media screen and (prefers-reduced-motion: reduce)': {\n animationIterationCount: '0',\n backgroundImage: 'conic-gradient(transparent 120deg, currentcolor 360deg)',\n '&::before, &::after': {\n content: 'none',\n },\n },\n});\n\nconst useSpinnerStyles = makeStyles({\n inverted: {\n backgroundColor: tokens.colorNeutralStrokeAlpha2,\n color: tokens.colorNeutralStrokeOnBrand2,\n },\n\n rtlTail: {\n maskImage: 'conic-gradient(white 255deg, transparent 255deg)',\n '&::before, &::after': {\n backgroundImage: 'conic-gradient(transparent 225deg, currentcolor 225deg)',\n },\n '@media screen and (prefers-reduced-motion: reduce)': {\n backgroundImage: 'conic-gradient(currentcolor 0deg, transparent 240deg)',\n },\n },\n\n 'extra-tiny': {\n height: '16px',\n width: '16px',\n [vars.strokeWidth]: tokens.strokeWidthThick,\n },\n\n tiny: {\n height: '20px',\n width: '20px',\n [vars.strokeWidth]: tokens.strokeWidthThick,\n },\n\n 'extra-small': {\n height: '24px',\n width: '24px',\n [vars.strokeWidth]: tokens.strokeWidthThick,\n },\n\n small: {\n height: '28px',\n width: '28px',\n [vars.strokeWidth]: tokens.strokeWidthThick,\n },\n\n medium: {\n height: '32px',\n width: '32px',\n [vars.strokeWidth]: tokens.strokeWidthThicker,\n },\n\n large: {\n height: '36px',\n width: '36px',\n [vars.strokeWidth]: tokens.strokeWidthThicker,\n },\n\n 'extra-large': {\n height: '40px',\n width: '40px',\n [vars.strokeWidth]: tokens.strokeWidthThicker,\n },\n\n huge: {\n height: '44px',\n width: '44px',\n [vars.strokeWidth]: tokens.strokeWidthThickest,\n },\n});\n\nconst useLabelStyles = makeStyles({\n inverted: {\n color: tokens.colorNeutralForegroundStaticInverted,\n },\n\n 'extra-tiny': {\n ...typographyStyles.body1,\n },\n\n tiny: {\n ...typographyStyles.body1,\n },\n\n 'extra-small': {\n ...typographyStyles.body1,\n },\n\n small: {\n ...typographyStyles.body1,\n },\n\n medium: {\n ...typographyStyles.subtitle2,\n },\n\n large: {\n ...typographyStyles.subtitle2,\n },\n\n 'extra-large': {\n ...typographyStyles.subtitle2,\n },\n\n huge: {\n ...typographyStyles.subtitle1,\n },\n});\n\n/**\n * Apply styling to the Spinner slots based on the state\n */\nexport const useSpinnerStyles_unstable = (state: SpinnerState): SpinnerState => {\n const { labelPosition, size, appearance } = state;\n const { dir } = useFluent();\n\n const rootBaseClassName = useRootBaseClassName();\n const rootStyles = useRootStyles();\n const spinnerBaseClassName = useSpinnerBaseClassName();\n const spinnerStyles = useSpinnerStyles();\n const spinnerTailBaseClassName = useSpinnerTailBaseClassName();\n const labelStyles = useLabelStyles();\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n spinnerClassNames.root,\n rootBaseClassName,\n (labelPosition === 'above' || labelPosition === 'below') && rootStyles.vertical,\n state.root.className,\n );\n if (state.spinner) {\n // eslint-disable-next-line react-hooks/immutability\n state.spinner.className = mergeClasses(\n spinnerClassNames.spinner,\n spinnerBaseClassName,\n spinnerStyles[size],\n appearance === 'inverted' && spinnerStyles.inverted,\n state.spinner.className,\n );\n }\n if (state.spinnerTail) {\n // eslint-disable-next-line react-hooks/immutability\n state.spinnerTail.className = mergeClasses(\n spinnerClassNames.spinnerTail,\n spinnerTailBaseClassName,\n dir === 'rtl' && spinnerStyles.rtlTail,\n state.spinnerTail.className,\n );\n }\n if (state.label) {\n // eslint-disable-next-line react-hooks/immutability\n state.label.className = mergeClasses(\n spinnerClassNames.label,\n labelStyles[size],\n appearance === 'inverted' && labelStyles.inverted,\n state.label.className,\n );\n }\n\n return state;\n};\n"],"names":["useFluent_unstable","useFluent","tokens","typographyStyles","makeResetStyles","makeStyles","mergeClasses","spinnerClassNames","root","spinner","spinnerTail","label","vars","strokeWidth","useRootBaseClassName","display","alignItems","justifyContent","lineHeight","gap","overflow","minWidth","useRootStyles","vertical","flexDirection","useSpinnerBaseClassName","position","flexShrink","maskImage","backgroundColor","colorBrandStroke2Contrast","color","colorBrandStroke1","forcedColorAdjust","animationDuration","animationIterationCount","animationTimingFunction","animationName","transform","useSpinnerTailBaseClassName","width","height","content","animation","backgroundImage","curveEasyEase","useSpinnerStyles","inverted","colorNeutralStrokeAlpha2","colorNeutralStrokeOnBrand2","rtlTail","strokeWidthThick","tiny","small","medium","strokeWidthThicker","large","huge","strokeWidthThickest","useLabelStyles","colorNeutralForegroundStaticInverted","body1","subtitle2","subtitle1","useSpinnerStyles_unstable","state","labelPosition","size","appearance","dir","rootBaseClassName","rootStyles","spinnerBaseClassName","spinnerStyles","spinnerTailBaseClassName","labelStyles","className"],"mappings":"AAAA;AAEA,SAASA,sBAAsBC,SAAS,QAAQ,kCAAkC;AAClF,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,wBAAwB;AAEjE,SAASC,eAAe,EAAEC,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAG3E,OAAO,MAAMC,oBAAkD;IAC7DC,MAAM;IACNC,SAAS;IACTC,aAAa;IACbC,OAAO;AACT,EAAE;AAEF;;CAEC,GACD,MAAMC,OAAO;IACXC,aAAa;AACf;AAEA,MAAMC,uBAAuBV,gBAAgB;IAC3CW,SAAS;IACTC,YAAY;IACZC,gBAAgB;IAChBC,YAAY;IACZC,KAAK;IACLC,UAAU;IACVC,UAAU;AACZ;AAEA,MAAMC,gBAAgBjB,WAAW;IAC/BkB,UAAU;QACRC,eAAe;IACjB;AACF;AAEA,MAAMC,0BAA0BrB,gBAAgB;IAC9CsB,UAAU;IACVC,YAAY;IAEZ,sDAAsD;IACtDC,WACE,CAAC,8BAA8B,CAAC,GAChC,CAAC,4BAA4B,EAAEhB,KAAKC,WAAW,CAAC,UAAU,CAAC,GAC3D,CAAC,sBAAsB,EAAED,KAAKC,WAAW,CAAC,qBAAqB,CAAC,GAChE,CAAC,iBAAiB,CAAC;IAErBgB,iBAAiB3B,OAAO4B,yBAAyB;IACjDC,OAAO7B,OAAO8B,iBAAiB;IAC/B,6CAA6C;QAC3CH,iBAAiB;QACjBE,OAAO;QACPE,mBAAmB;IACrB;IAEAC,mBAAmB;IACnBC,yBAAyB;IACzBC,yBAAyB;IACzBC,eAAe;QACb,MAAM;YAAEC,WAAW;QAAe;QAClC,QAAQ;YAAEA,WAAW;QAAiB;IACxC;IAEA,sDAAsD;QACpDJ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GH;IAC5C,MAAM,EAAEI,GAAG,EAAE,GAAGpE;IAEhB,MAAMqE,oBAAoBxD;IAC1B,MAAMyD,aAAajD;IACnB,MAAMkD,uBAAuB/C;IAC7B,MAAMgD,gBAAgB3B;IACtB,MAAM4B,2BAA2BnC;IACjC,MAAMoC,cAAchB;IAEpB,oDAAoD;IACpDM,MAAMzD,IAAI,CAACoE,SAAS,GAAGtE,aACrBC,kBAAkBC,IAAI,EACtB8D,mBACA,AAACJ,CAAAA,kBAAkB,WAAWA,kBAAkB,OAAM,KAAMK,WAAWhD,QAAQ,EAC/E0C,MAAMzD,IAAI,CAACoE,SAAS;IAEtB,IAAIX,MAAMxD,OAAO,EAAE;QACjB,oDAAoD;QACpDwD,MAAMxD,OAAO,CAACmE,SAAS,GAAGtE,aACxBC,kBAAkBE,OAAO,EACzB+D,sBACAC,aAAa,CAACN,KAAK,EACnBC,eAAe,cAAcK,cAAc1B,QAAQ,EACnDkB,MAAMxD,OAAO,CAACmE,SAAS;IAE3B;IACA,IAAIX,MAAMvD,WAAW,EAAE;QACrB,oDAAoD;QACpDuD,MAAMvD,WAAW,CAACkE,SAAS,GAAGtE,aAC5BC,kBAAkBG,WAAW,EAC7BgE,0BACAL,QAAQ,SAASI,cAAcvB,OAAO,EACtCe,MAAMvD,WAAW,CAACkE,SAAS;IAE/B;IACA,IAAIX,MAAMtD,KAAK,EAAE;QACf,oDAAoD;QACpDsD,MAAMtD,KAAK,CAACiE,SAAS,GAAGtE,aACtBC,kBAAkBI,KAAK,EACvBgE,WAAW,CAACR,KAAK,EACjBC,eAAe,cAAcO,YAAY5B,QAAQ,EACjDkB,MAAMtD,KAAK,CAACiE,SAAS;IAEzB;IAEA,OAAOX;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/contexts/SpinnerContext.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { SpinnerProps } from '../components/Spinner/Spinner.types';\n\nconst SpinnerContext = React.createContext<SpinnerContextValue | undefined>(undefined);\n\n/**\n * @internal\n */\nexport type SpinnerContextValue = Pick<SpinnerProps, 'size'>;\n\nconst SpinnerContextDefaultValue: SpinnerContextValue = {};\n\n/**\n * @internal\n */\nexport const SpinnerContextProvider = SpinnerContext.Provider;\n\n/**\n * @internal\n */\nexport const useSpinnerContext = (): SpinnerContextValue =>\n React.useContext(SpinnerContext) ?? SpinnerContextDefaultValue;\n"],"names":["React","SpinnerContext","createContext","undefined","SpinnerContextDefaultValue","SpinnerContextProvider","Provider","useSpinnerContext","useContext"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAG/B,MAAMC,iBAAiBD,MAAME,aAAa,CAAkCC;AAO5E,MAAMC,6BAAkD,CAAC;AAEzD;;CAEC,GACD,OAAO,MAAMC,yBAAyBJ,eAAeK,QAAQ,CAAC;AAE9D;;CAEC,GACD,OAAO,MAAMC,oBAAoB;QAC/BP;WAAAA,CAAAA,oBAAAA,MAAMQ,UAAU,CAACP,6BAAjBD,+BAAAA,oBAAoCI;EAA2B"}
1
+ {"version":3,"sources":["../../src/contexts/SpinnerContext.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { SpinnerProps } from '../components/Spinner/Spinner.types';\n\nconst SpinnerContext = React.createContext<SpinnerContextValue | undefined>(undefined);\n\n/**\n * @internal\n */\nexport type SpinnerContextValue = Pick<SpinnerProps, 'size'>;\n\nconst SpinnerContextDefaultValue: SpinnerContextValue = {};\n\n/**\n * @internal\n */\nexport const SpinnerContextProvider = SpinnerContext.Provider;\n\n/**\n * @internal\n */\nexport const useSpinnerContext = (): SpinnerContextValue =>\n React.useContext(SpinnerContext) ?? SpinnerContextDefaultValue;\n"],"names":["React","SpinnerContext","createContext","undefined","SpinnerContextDefaultValue","SpinnerContextProvider","Provider","useSpinnerContext","useContext"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAG/B,MAAMC,iBAAiBD,MAAME,aAAa,CAAkCC;AAO5E,MAAMC,6BAAkD,CAAC;AAEzD;;CAEC,GACD,OAAO,MAAMC,yBAAyBJ,eAAeK,QAAQ,CAAC;AAE9D;;CAEC,GACD,OAAO,MAAMC,oBAAoB;QAC/BP;YAAAA,oBAAAA,MAAMQ,UAAU,CAACP,6BAAjBD,+BAAAA,oBAAoCI;EAA2B"}