@fluentui/react-spinbutton 9.75.1-experimental.positioning-engine.20261103-19efe125d1.0 → 9.75.2-experimental.css-modules.20261113-ba13c87438.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.
package/CHANGELOG.md CHANGED
@@ -1,22 +1,22 @@
1
1
  # Change Log - @fluentui/react-spinbutton
2
2
 
3
- <!-- This log was last generated on Tue, 03 Nov 2026 14:18:10 GMT and should not be manually modified. -->
3
+ <!-- This log was last generated on Fri, 13 Nov 2026 20:36:59 GMT and should not be manually modified. -->
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [9.75.1-experimental.positioning-engine.20261103-19efe125d1.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.75.1-experimental.positioning-engine.20261103-19efe125d1.0)
7
+ ## [9.75.2-experimental.css-modules.20261113-ba13c87438.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.75.2-experimental.css-modules.20261113-ba13c87438.0)
8
8
 
9
- Tue, 03 Nov 2026 14:18:10 GMT
9
+ Fri, 13 Nov 2026 20:36:59 GMT
10
10
 
11
11
  ### Changes
12
12
 
13
- - Release 9.75.1-experimental.positioning-engine.20261103-19efe125d1 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by 257645319+office-ogx-auth-helper[bot]@users.noreply.github.com)
14
- - Bump @fluentui/keyboard-keys to v9.75.1-experimental.positioning-engine.20261103-19efe125d1.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
15
- - Bump @fluentui/react-field to v9.75.1-experimental.positioning-engine.20261103-19efe125d1.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
16
- - Bump @fluentui/react-jsx-runtime to v9.75.1-experimental.positioning-engine.20261103-19efe125d1.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
17
- - Bump @fluentui/react-shared-contexts to v9.75.1-experimental.positioning-engine.20261103-19efe125d1.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
18
- - Bump @fluentui/react-theme to v9.75.1-experimental.positioning-engine.20261103-19efe125d1.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
19
- - Bump @fluentui/react-utilities to v9.75.1-experimental.positioning-engine.20261103-19efe125d1.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
13
+ - Release 9.75.2-experimental.css-modules.20261113-ba13c87438 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by 257645319+office-ogx-auth-helper[bot]@users.noreply.github.com)
14
+ - Bump @fluentui/keyboard-keys to v9.75.2-experimental.css-modules.20261113-ba13c87438.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
15
+ - Bump @fluentui/react-field to v9.75.2-experimental.css-modules.20261113-ba13c87438.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
16
+ - Bump @fluentui/react-jsx-runtime to v9.75.2-experimental.css-modules.20261113-ba13c87438.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
17
+ - Bump @fluentui/react-shared-contexts to v9.75.2-experimental.css-modules.20261113-ba13c87438.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
18
+ - Bump @fluentui/react-theme to v9.75.2-experimental.css-modules.20261113-ba13c87438.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
19
+ - Bump @fluentui/react-utilities to v9.75.2-experimental.css-modules.20261113-ba13c87438.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
20
20
 
21
21
  ## [9.6.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.6.8)
22
22
 
package/README.md CHANGED
@@ -28,8 +28,14 @@ Alternatively, run Storybook locally with:
28
28
 
29
29
  ### Specification
30
30
 
31
- See [Spec.md](./Spec.md).
31
+ See [Spec.md](./docs/Spec.md).
32
32
 
33
33
  ### Migration Guide
34
34
 
35
35
  When upgrading to Fluent UI v9 see the [upgrade guide](https://react.fluentui.dev/?path=/docs/concepts-migration-from-v8-components-spinbutton-migration--docs) for guidance on updating to the latest SpinButton implementation.
36
+
37
+ ## Opt-in CSS Modules styles
38
+
39
+ CSS Modules alternatives are available for `SpinButton`. The default exports and component imports continue to use Griffel.
40
+
41
+ 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. Component rules are unlayered, like Griffel's, and use the theme custom properties supplied by `FluentProvider`.
@@ -0,0 +1,364 @@
1
+ /* @griffel-buckets reset: .root, .incrementButton, .decrementButton, .input */
2
+ /* stylelint-disable-next-line block-no-empty -- Class must exist in the CSS Module map; it is used as a state qualifier. */
3
+ .medium {
4
+ }
5
+ .root::before {
6
+ content: '';
7
+ box-sizing: border-box;
8
+ position: absolute;
9
+ top: 0;
10
+ inset-inline-end: 0;
11
+ bottom: 0;
12
+ inset-inline-start: 0;
13
+ pointer-events: none;
14
+ z-index: 10;
15
+ border: var(--strokeWidthThin) solid var(--colorNeutralStroke1);
16
+ border-bottom-color: var(--colorNeutralStrokeAccessible);
17
+ border-radius: var(--borderRadiusMedium);
18
+ }
19
+
20
+ .root::after {
21
+ box-sizing: border-box;
22
+ content: '';
23
+ position: absolute;
24
+ inset-inline-end: 0;
25
+ bottom: 0;
26
+ inset-inline-start: 0;
27
+ z-index: 20;
28
+ height: max(var(--strokeWidthThick), var(--borderRadiusMedium));
29
+ border-end-start-radius: var(--borderRadiusMedium);
30
+ border-end-end-radius: var(--borderRadiusMedium);
31
+ border-bottom: var(--strokeWidthThick) solid var(--colorCompoundBrandStroke);
32
+ clip-path: inset(calc(100% - var(--strokeWidthThick)) 0 0 0);
33
+ transform: scaleX(0);
34
+ transition-property: transform;
35
+ transition-duration: var(--durationUltraFast);
36
+ transition-delay: var(--curveAccelerateMid);
37
+ }
38
+
39
+ .root:focus-within::after {
40
+ transform: scaleX(1);
41
+ transition-property: transform;
42
+ transition-duration: var(--durationNormal);
43
+ transition-delay: var(--curveDecelerateMid);
44
+ }
45
+
46
+ .root:focus-within:active::after {
47
+ border-bottom-color: var(--colorCompoundBrandStrokePressed);
48
+ }
49
+
50
+ .root:focus-within {
51
+ outline: var(--strokeWidthThick) solid transparent;
52
+ }
53
+
54
+ .root {
55
+ display: inline-grid;
56
+ grid-template-columns: 1fr var(--spacingHorizontalXXL);
57
+ grid-template-rows: 1fr 1fr;
58
+ column-gap: var(--spacingHorizontalXS);
59
+ row-gap: 0;
60
+ position: relative;
61
+ isolation: isolate;
62
+ vertical-align: middle;
63
+ background-color: var(--colorNeutralBackground1);
64
+ min-height: var(--spacingHorizontalXXXL);
65
+ padding-block: 0;
66
+ padding-inline: var(--spacingHorizontalMNudge) 0;
67
+ border-radius: var(--borderRadiusMedium);
68
+ }
69
+
70
+ .small {
71
+ min-height: var(--spacingHorizontalXXL);
72
+ font-family: var(--fontFamilyBase);
73
+ font-size: var(--fontSizeBase200);
74
+ font-weight: var(--fontWeightRegular);
75
+ line-height: var(--lineHeightBase200);
76
+ padding-inline-start: var(--spacingHorizontalS);
77
+ }
78
+
79
+ .underline::before {
80
+ border-top-width: 0;
81
+ border-inline-end-width: 0;
82
+ border-bottom-width: var(--strokeWidthThin);
83
+ border-inline-start-width: 0;
84
+ border-radius: var(--borderRadiusNone);
85
+ }
86
+
87
+ .filled::before {
88
+ border: var(--strokeWidthThin) solid var(--colorTransparentStroke);
89
+ }
90
+
91
+ .filled-darker {
92
+ background-color: var(--colorNeutralBackground3);
93
+ }
94
+
95
+ .filled-lighter {
96
+ background-color: var(--colorNeutralBackground1);
97
+ }
98
+
99
+ .root:where(.outline:not(.disabled)):hover::before {
100
+ border-top-color: var(--colorNeutralStroke1Hover);
101
+ border-inline-end-color: var(--colorNeutralStroke1Hover);
102
+ border-bottom-color: var(--colorNeutralStrokeAccessibleHover);
103
+ border-inline-start-color: var(--colorNeutralStroke1Hover);
104
+ }
105
+
106
+ .root:where(.outline:not(.disabled)):active::before,
107
+ .root:where(.outline:not(.disabled)):focus-within::before {
108
+ border-top-color: var(--colorNeutralStroke1Pressed);
109
+ border-inline-end-color: var(--colorNeutralStroke1Pressed);
110
+ border-bottom-color: var(--colorNeutralStrokeAccessiblePressed);
111
+ border-inline-start-color: var(--colorNeutralStroke1Pressed);
112
+ }
113
+
114
+ .root:where(.underline:not(.disabled)):hover::before {
115
+ border-bottom-color: var(--colorNeutralStrokeAccessibleHover);
116
+ }
117
+
118
+ .root:where(.underline:not(.disabled)):active::before,
119
+ .root:where(.underline:not(.disabled)):focus-within::before {
120
+ border-bottom-color: var(--colorNeutralStrokeAccessiblePressed);
121
+ }
122
+
123
+ .root:where(.underline:not(.disabled))::after {
124
+ border-radius: var(--borderRadiusNone);
125
+ }
126
+
127
+ .root:where(.filled:not(.disabled)):hover::before,
128
+ .root:where(.filled:not(.disabled)):focus-within::before {
129
+ border-top-color: var(--colorTransparentStrokeInteractive);
130
+ border-inline-end-color: var(--colorTransparentStrokeInteractive);
131
+ border-bottom-color: var(--colorTransparentStrokeInteractive);
132
+ border-inline-start-color: var(--colorTransparentStrokeInteractive);
133
+ }
134
+
135
+ .invalid:where(:not(.disabled)):not(:focus-within)::before,
136
+ .invalid:where(:not(.disabled)):hover:not(:focus-within)::before {
137
+ border-top-color: var(--colorPaletteRedBorder2);
138
+ border-inline-end-color: var(--colorPaletteRedBorder2);
139
+ border-bottom-color: var(--colorPaletteRedBorder2);
140
+ border-inline-start-color: var(--colorPaletteRedBorder2);
141
+ }
142
+
143
+ .disabled::before {
144
+ border-top-color: var(--colorNeutralStrokeDisabled);
145
+ border-inline-end-color: var(--colorNeutralStrokeDisabled);
146
+ border-bottom-color: var(--colorNeutralStrokeDisabled);
147
+ border-inline-start-color: var(--colorNeutralStrokeDisabled);
148
+ }
149
+
150
+ .disabled {
151
+ cursor: not-allowed;
152
+ background-color: var(--colorTransparentBackground);
153
+ }
154
+
155
+ .input::placeholder {
156
+ color: var(--colorNeutralForeground4);
157
+ opacity: 1;
158
+ }
159
+
160
+ .input {
161
+ grid-column-start: 1;
162
+ grid-column-end: 2;
163
+ grid-row-start: 1;
164
+ grid-row-end: 3;
165
+ outline-style: none;
166
+ border: 0;
167
+ padding: 0;
168
+ color: var(--colorNeutralForeground1);
169
+ background-color: transparent;
170
+ font-family: inherit;
171
+ font-size: inherit;
172
+ font-weight: inherit;
173
+ line-height: inherit;
174
+ width: 100%;
175
+ }
176
+
177
+ :where(.disabled) > .input::placeholder {
178
+ color: var(--colorNeutralForegroundDisabled);
179
+ }
180
+
181
+ :where(.disabled) > .input {
182
+ color: var(--colorNeutralForegroundDisabled);
183
+ cursor: not-allowed;
184
+ background-color: var(--colorTransparentBackground);
185
+ }
186
+
187
+ .incrementButton:active,
188
+ .decrementButton:active {
189
+ outline-style: none;
190
+ }
191
+
192
+ .incrementButton:enabled:hover,
193
+ .decrementButton:enabled:hover {
194
+ cursor: pointer;
195
+ color: var(--colorNeutralForeground3Hover);
196
+ background-color: var(--colorSubtleBackgroundHover);
197
+ }
198
+
199
+ .incrementButton:enabled:active,
200
+ .decrementButton:enabled:active {
201
+ color: var(--colorNeutralForeground3Pressed);
202
+ background-color: var(--colorSubtleBackgroundPressed);
203
+ }
204
+
205
+ .incrementButton:enabled:global(.fui-SpinButton__button_active),
206
+ .decrementButton:enabled:global(.fui-SpinButton__button_active) {
207
+ color: var(--colorNeutralForeground3Pressed);
208
+ background-color: var(--colorSubtleBackgroundPressed);
209
+ }
210
+
211
+ .incrementButton:disabled,
212
+ .decrementButton:disabled {
213
+ cursor: not-allowed;
214
+ color: var(--colorNeutralForegroundDisabled);
215
+ }
216
+
217
+ .incrementButton,
218
+ .decrementButton {
219
+ display: inline-flex;
220
+ width: var(--spacingHorizontalXXL);
221
+ align-items: center;
222
+ justify-content: center;
223
+ border: 0;
224
+ position: absolute;
225
+ outline-style: none;
226
+ height: var(--spacingHorizontalL);
227
+ background-color: transparent;
228
+ color: var(--colorNeutralForeground3);
229
+ grid-column-start: 2;
230
+ border-radius: 0;
231
+ padding: 0 calc(var(--spacingHorizontalXS) * 1.25) 0 calc(var(--spacingHorizontalXS) * 1.25);
232
+ }
233
+
234
+ .incrementButton {
235
+ grid-row-start: 1;
236
+ border-start-end-radius: var(--borderRadiusMedium);
237
+ padding-top: var(--spacingHorizontalXS);
238
+ padding-bottom: var(--strokeWidthThin);
239
+ }
240
+
241
+ .decrementButton {
242
+ grid-row-start: 2;
243
+ border-end-end-radius: var(--borderRadiusMedium);
244
+ padding-top: var(--strokeWidthThin);
245
+ padding-bottom: var(--spacingHorizontalXS);
246
+ }
247
+
248
+ :where(.small) > .incrementButton {
249
+ padding-block: var(--strokeWidthThicker) 0px;
250
+ padding-inline: var(--spacingHorizontalXS) var(--spacingHorizontalSNudge);
251
+ height: var(--spacingHorizontalM);
252
+ }
253
+
254
+ :where(.small) > .decrementButton {
255
+ padding-block: 0px var(--strokeWidthThicker);
256
+ padding-inline: var(--spacingHorizontalXS) var(--spacingHorizontalSNudge);
257
+ height: var(--spacingHorizontalM);
258
+ }
259
+
260
+ :where(.underline) > .incrementButton:enabled:hover,
261
+ :where(.underline) > .decrementButton:enabled:hover {
262
+ color: var(--colorNeutralForeground3Hover);
263
+ background-color: var(--colorSubtleBackgroundHover);
264
+ }
265
+
266
+ :where(.underline) > .incrementButton:enabled:active,
267
+ :where(.underline) > .decrementButton:enabled:active {
268
+ color: var(--colorNeutralForeground3Pressed);
269
+ background-color: var(--colorSubtleBackgroundPressed);
270
+ }
271
+
272
+ :where(.underline) > .incrementButton:enabled:global(.fui-SpinButton__button_active),
273
+ :where(.underline) > .decrementButton:enabled:global(.fui-SpinButton__button_active) {
274
+ color: var(--colorNeutralForeground3Pressed);
275
+ background-color: var(--colorSubtleBackgroundPressed);
276
+ }
277
+
278
+ :where(.underline) > .incrementButton:disabled,
279
+ :where(.underline) > .decrementButton:disabled {
280
+ color: var(--colorNeutralForegroundDisabled);
281
+ }
282
+
283
+ :where(.underline) > .incrementButton,
284
+ :where(.underline) > .decrementButton {
285
+ background-color: transparent;
286
+ color: var(--colorNeutralForeground3);
287
+ }
288
+
289
+ :where(.filled-darker) > .incrementButton:enabled:hover,
290
+ :where(.filled-darker) > .decrementButton:enabled:hover {
291
+ color: var(--colorNeutralForeground3Hover);
292
+ background-color: var(--colorNeutralBackground3Hover);
293
+ }
294
+
295
+ :where(.filled-darker) > .incrementButton:enabled:active,
296
+ :where(.filled-darker) > .decrementButton:enabled:active {
297
+ color: var(--colorNeutralForeground3Pressed);
298
+ background-color: var(--colorNeutralBackground3Pressed);
299
+ }
300
+
301
+ :where(.filled-darker) > .incrementButton:enabled:global(.fui-SpinButton__button_active),
302
+ :where(.filled-darker) > .decrementButton:enabled:global(.fui-SpinButton__button_active) {
303
+ color: var(--colorNeutralForeground3Pressed);
304
+ background-color: var(--colorNeutralBackground3Pressed);
305
+ }
306
+
307
+ :where(.filled-darker) > .incrementButton:disabled,
308
+ :where(.filled-darker) > .decrementButton:disabled {
309
+ color: var(--colorNeutralForegroundDisabled);
310
+ }
311
+
312
+ :where(.filled-darker) > .incrementButton,
313
+ :where(.filled-darker) > .decrementButton {
314
+ background-color: transparent;
315
+ color: var(--colorNeutralForeground3);
316
+ }
317
+
318
+ :where(.filled-lighter) > .incrementButton:enabled:hover,
319
+ :where(.filled-lighter) > .decrementButton:enabled:hover {
320
+ color: var(--colorNeutralForeground3Hover);
321
+ background-color: var(--colorNeutralBackground1Hover);
322
+ }
323
+
324
+ :where(.filled-lighter) > .incrementButton:enabled:active,
325
+ :where(.filled-lighter) > .incrementButton:enabled:global(.fui-SpinButton__button_active),
326
+ :where(.filled-lighter) > .decrementButton:enabled:active,
327
+ :where(.filled-lighter) > .decrementButton:enabled:global(.fui-SpinButton__button_active) {
328
+ color: var(--colorNeutralForeground3Pressed);
329
+ background-color: var(--colorNeutralBackground1Pressed);
330
+ }
331
+
332
+ :where(.filled-lighter) > .incrementButton:disabled,
333
+ :where(.filled-lighter) > .decrementButton:disabled {
334
+ color: var(--colorNeutralForegroundDisabled);
335
+ }
336
+
337
+ :where(.filled-lighter) > .incrementButton,
338
+ :where(.filled-lighter) > .decrementButton {
339
+ background-color: transparent;
340
+ color: var(--colorNeutralForeground3);
341
+ }
342
+
343
+ @media screen and (prefers-reduced-motion: reduce) {
344
+ .root::after {
345
+ transition-duration: 0.01ms;
346
+ transition-delay: 0.01ms;
347
+ }
348
+ }
349
+
350
+ @media screen and (prefers-reduced-motion: reduce) {
351
+ .root:focus-within::after {
352
+ transition-duration: 0.01ms;
353
+ transition-delay: 0.01ms;
354
+ }
355
+ }
356
+
357
+ @media (forced-colors: active) {
358
+ .disabled::before {
359
+ border-top-color: GrayText;
360
+ border-inline-end-color: GrayText;
361
+ border-bottom-color: GrayText;
362
+ border-inline-start-color: GrayText;
363
+ }
364
+ }
@@ -0,0 +1,16 @@
1
+ import { clsx } from "clsx";
2
+ import styles from "./SpinButton.module.css";
3
+ export const spinButtonClassNames = {
4
+ root: 'fui-SpinButton',
5
+ input: 'fui-SpinButton__input',
6
+ incrementButton: 'fui-SpinButton__incrementButton',
7
+ decrementButton: 'fui-SpinButton__decrementButton'
8
+ };
9
+ export const useSpinButtonStyles_unstable = (state)=>{
10
+ const disabled = state.input.disabled;
11
+ state.root.className = clsx(spinButtonClassNames.root, styles.root, styles[state.size], styles[state.appearance], state.appearance.startsWith('filled') && styles.filled, disabled && styles.disabled, String(state.input['aria-invalid']) === 'true' && styles.invalid, state.root.className);
12
+ state.incrementButton.className = clsx(spinButtonClassNames.incrementButton, state.spinState === 'up' && 'fui-SpinButton__button_active', styles.incrementButton, state.incrementButton.className);
13
+ state.decrementButton.className = clsx(spinButtonClassNames.decrementButton, state.spinState === 'down' && 'fui-SpinButton__button_active', styles.decrementButton, state.decrementButton.className);
14
+ state.input.className = clsx(spinButtonClassNames.input, styles.input, state.input.className);
15
+ return state;
16
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/SpinButton/useSpinButtonStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { SpinButtonState, SpinButtonSlots } from './SpinButton.types';\nimport styles from './SpinButton.module.css';\n\nexport const spinButtonClassNames: SlotClassNames<SpinButtonSlots> = {\n root: 'fui-SpinButton',\n input: 'fui-SpinButton__input',\n incrementButton: 'fui-SpinButton__incrementButton',\n decrementButton: 'fui-SpinButton__decrementButton',\n};\n\nexport const useSpinButtonStyles_unstable = (state: SpinButtonState): SpinButtonState => {\n const disabled = state.input.disabled;\n state.root.className = clsx(\n spinButtonClassNames.root,\n styles.root,\n styles[state.size],\n styles[state.appearance],\n state.appearance.startsWith('filled') && styles.filled,\n disabled && styles.disabled,\n String(state.input['aria-invalid']) === 'true' && styles.invalid,\n state.root.className,\n );\n state.incrementButton.className = clsx(\n spinButtonClassNames.incrementButton,\n state.spinState === 'up' && 'fui-SpinButton__button_active',\n styles.incrementButton,\n state.incrementButton.className,\n );\n state.decrementButton.className = clsx(\n spinButtonClassNames.decrementButton,\n state.spinState === 'down' && 'fui-SpinButton__button_active',\n styles.decrementButton,\n state.decrementButton.className,\n );\n state.input.className = clsx(spinButtonClassNames.input, styles.input, state.input.className);\n return state;\n};\n"],"names":["clsx","styles","spinButtonClassNames","root","input","incrementButton","decrementButton","useSpinButtonStyles_unstable","state","disabled","className","size","appearance","startsWith","filled","String","invalid","spinState"],"mappings":"AAAA,SAASA,IAAI,QAAQ,OAAO;AAG5B,OAAOC,YAAY,0BAA0B;AAE7C,OAAO,MAAMC,uBAAwD;IACnEC,MAAM;IACNC,OAAO;IACPC,iBAAiB;IACjBC,iBAAiB;AACnB,EAAE;AAEF,OAAO,MAAMC,+BAA+B,CAACC;IAC3C,MAAMC,WAAWD,MAAMJ,KAAK,CAACK,QAAQ;IACrCD,MAAML,IAAI,CAACO,SAAS,GAAGV,KACrBE,qBAAqBC,IAAI,EACzBF,OAAOE,IAAI,EACXF,MAAM,CAACO,MAAMG,IAAI,CAAC,EAClBV,MAAM,CAACO,MAAMI,UAAU,CAAC,EACxBJ,MAAMI,UAAU,CAACC,UAAU,CAAC,aAAaZ,OAAOa,MAAM,EACtDL,YAAYR,OAAOQ,QAAQ,EAC3BM,OAAOP,MAAMJ,KAAK,CAAC,eAAe,MAAM,UAAUH,OAAOe,OAAO,EAChER,MAAML,IAAI,CAACO,SAAS;IAEtBF,MAAMH,eAAe,CAACK,SAAS,GAAGV,KAChCE,qBAAqBG,eAAe,EACpCG,MAAMS,SAAS,KAAK,QAAQ,iCAC5BhB,OAAOI,eAAe,EACtBG,MAAMH,eAAe,CAACK,SAAS;IAEjCF,MAAMF,eAAe,CAACI,SAAS,GAAGV,KAChCE,qBAAqBI,eAAe,EACpCE,MAAMS,SAAS,KAAK,UAAU,iCAC9BhB,OAAOK,eAAe,EACtBE,MAAMF,eAAe,CAACI,SAAS;IAEjCF,MAAMJ,KAAK,CAACM,SAAS,GAAGV,KAAKE,qBAAqBE,KAAK,EAAEH,OAAOG,KAAK,EAAEI,MAAMJ,KAAK,CAACM,SAAS;IAC5F,OAAOF;AACT,EAAE"}
@@ -0,0 +1,16 @@
1
+ import { clsx } from "clsx";
2
+ import styles from "./SpinButton.module.css";
3
+ export const spinButtonClassNames = {
4
+ root: 'fui-SpinButton',
5
+ input: 'fui-SpinButton__input',
6
+ incrementButton: 'fui-SpinButton__incrementButton',
7
+ decrementButton: 'fui-SpinButton__decrementButton'
8
+ };
9
+ export const useSpinButtonStyles_unstable = (state)=>{
10
+ const disabled = state.input.disabled;
11
+ state.root.className = clsx(spinButtonClassNames.root, styles.root, styles[state.size], styles[state.appearance], state.appearance.startsWith('filled') && styles.filled, disabled && styles.disabled, String(state.input['aria-invalid']) === 'true' && styles.invalid, state.root.className);
12
+ state.incrementButton.className = clsx(spinButtonClassNames.incrementButton, state.spinState === 'up' && 'fui-SpinButton__button_active', styles.incrementButton, state.incrementButton.className);
13
+ state.decrementButton.className = clsx(spinButtonClassNames.decrementButton, state.spinState === 'down' && 'fui-SpinButton__button_active', styles.decrementButton, state.decrementButton.className);
14
+ state.input.className = clsx(spinButtonClassNames.input, styles.input, state.input.className);
15
+ return state;
16
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/SpinButton/useSpinButtonStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { SpinButtonState, SpinButtonSlots } from './SpinButton.types';\nimport styles from './SpinButton.module.css';\n\nexport const spinButtonClassNames: SlotClassNames<SpinButtonSlots> = {\n root: 'fui-SpinButton',\n input: 'fui-SpinButton__input',\n incrementButton: 'fui-SpinButton__incrementButton',\n decrementButton: 'fui-SpinButton__decrementButton',\n};\n\nexport const useSpinButtonStyles_unstable = (state: SpinButtonState): SpinButtonState => {\n const disabled = state.input.disabled;\n state.root.className = clsx(\n spinButtonClassNames.root,\n styles.root,\n styles[state.size],\n styles[state.appearance],\n state.appearance.startsWith('filled') && styles.filled,\n disabled && styles.disabled,\n String(state.input['aria-invalid']) === 'true' && styles.invalid,\n state.root.className,\n );\n state.incrementButton.className = clsx(\n spinButtonClassNames.incrementButton,\n state.spinState === 'up' && 'fui-SpinButton__button_active',\n styles.incrementButton,\n state.incrementButton.className,\n );\n state.decrementButton.className = clsx(\n spinButtonClassNames.decrementButton,\n state.spinState === 'down' && 'fui-SpinButton__button_active',\n styles.decrementButton,\n state.decrementButton.className,\n );\n state.input.className = clsx(spinButtonClassNames.input, styles.input, state.input.className);\n return state;\n};\n"],"names":["clsx","styles","spinButtonClassNames","root","input","incrementButton","decrementButton","useSpinButtonStyles_unstable","state","disabled","className","size","appearance","startsWith","filled","String","invalid","spinState"],"mappings":"AAAA,SAASA,IAAI,QAAQ,OAAO;AAG5B,OAAOC,YAAY,0BAA0B;AAE7C,OAAO,MAAMC,uBAAwD;IACnEC,MAAM;IACNC,OAAO;IACPC,iBAAiB;IACjBC,iBAAiB;AACnB,EAAE;AAEF,OAAO,MAAMC,+BAA+B,CAACC;IAC3C,MAAMC,WAAWD,MAAMJ,KAAK,CAACK,QAAQ;IACrCD,MAAML,IAAI,CAACO,SAAS,GAAGV,KACrBE,qBAAqBC,IAAI,EACzBF,OAAOE,IAAI,EACXF,MAAM,CAACO,MAAMG,IAAI,CAAC,EAClBV,MAAM,CAACO,MAAMI,UAAU,CAAC,EACxBJ,MAAMI,UAAU,CAACC,UAAU,CAAC,aAAaZ,OAAOa,MAAM,EACtDL,YAAYR,OAAOQ,QAAQ,EAC3BM,OAAOP,MAAMJ,KAAK,CAAC,eAAe,MAAM,UAAUH,OAAOe,OAAO,EAChER,MAAML,IAAI,CAACO,SAAS;IAEtBF,MAAMH,eAAe,CAACK,SAAS,GAAGV,KAChCE,qBAAqBG,eAAe,EACpCG,MAAMS,SAAS,KAAK,QAAQ,iCAC5BhB,OAAOI,eAAe,EACtBG,MAAMH,eAAe,CAACK,SAAS;IAEjCF,MAAMF,eAAe,CAACI,SAAS,GAAGV,KAChCE,qBAAqBI,eAAe,EACpCE,MAAMS,SAAS,KAAK,UAAU,iCAC9BhB,OAAOK,eAAe,EACtBE,MAAMF,eAAe,CAACI,SAAS;IAEjCF,MAAMJ,KAAK,CAACM,SAAS,GAAGV,KAAKE,qBAAqBE,KAAK,EAAEH,OAAOG,KAAK,EAAEI,MAAMJ,KAAK,CAACM,SAAS;IAC5F,OAAOF;AACT,EAAE"}
@@ -0,0 +1,364 @@
1
+ /* @griffel-buckets reset: .root, .incrementButton, .decrementButton, .input */
2
+ /* stylelint-disable-next-line block-no-empty -- Class must exist in the CSS Module map; it is used as a state qualifier. */
3
+ .medium {
4
+ }
5
+ .root::before {
6
+ content: '';
7
+ box-sizing: border-box;
8
+ position: absolute;
9
+ top: 0;
10
+ inset-inline-end: 0;
11
+ bottom: 0;
12
+ inset-inline-start: 0;
13
+ pointer-events: none;
14
+ z-index: 10;
15
+ border: var(--strokeWidthThin) solid var(--colorNeutralStroke1);
16
+ border-bottom-color: var(--colorNeutralStrokeAccessible);
17
+ border-radius: var(--borderRadiusMedium);
18
+ }
19
+
20
+ .root::after {
21
+ box-sizing: border-box;
22
+ content: '';
23
+ position: absolute;
24
+ inset-inline-end: 0;
25
+ bottom: 0;
26
+ inset-inline-start: 0;
27
+ z-index: 20;
28
+ height: max(var(--strokeWidthThick), var(--borderRadiusMedium));
29
+ border-end-start-radius: var(--borderRadiusMedium);
30
+ border-end-end-radius: var(--borderRadiusMedium);
31
+ border-bottom: var(--strokeWidthThick) solid var(--colorCompoundBrandStroke);
32
+ clip-path: inset(calc(100% - var(--strokeWidthThick)) 0 0 0);
33
+ transform: scaleX(0);
34
+ transition-property: transform;
35
+ transition-duration: var(--durationUltraFast);
36
+ transition-delay: var(--curveAccelerateMid);
37
+ }
38
+
39
+ .root:focus-within::after {
40
+ transform: scaleX(1);
41
+ transition-property: transform;
42
+ transition-duration: var(--durationNormal);
43
+ transition-delay: var(--curveDecelerateMid);
44
+ }
45
+
46
+ .root:focus-within:active::after {
47
+ border-bottom-color: var(--colorCompoundBrandStrokePressed);
48
+ }
49
+
50
+ .root:focus-within {
51
+ outline: var(--strokeWidthThick) solid transparent;
52
+ }
53
+
54
+ .root {
55
+ display: inline-grid;
56
+ grid-template-columns: 1fr var(--spacingHorizontalXXL);
57
+ grid-template-rows: 1fr 1fr;
58
+ column-gap: var(--spacingHorizontalXS);
59
+ row-gap: 0;
60
+ position: relative;
61
+ isolation: isolate;
62
+ vertical-align: middle;
63
+ background-color: var(--colorNeutralBackground1);
64
+ min-height: var(--spacingHorizontalXXXL);
65
+ padding-block: 0;
66
+ padding-inline: var(--spacingHorizontalMNudge) 0;
67
+ border-radius: var(--borderRadiusMedium);
68
+ }
69
+
70
+ .small {
71
+ min-height: var(--spacingHorizontalXXL);
72
+ font-family: var(--fontFamilyBase);
73
+ font-size: var(--fontSizeBase200);
74
+ font-weight: var(--fontWeightRegular);
75
+ line-height: var(--lineHeightBase200);
76
+ padding-inline-start: var(--spacingHorizontalS);
77
+ }
78
+
79
+ .underline::before {
80
+ border-top-width: 0;
81
+ border-inline-end-width: 0;
82
+ border-bottom-width: var(--strokeWidthThin);
83
+ border-inline-start-width: 0;
84
+ border-radius: var(--borderRadiusNone);
85
+ }
86
+
87
+ .filled::before {
88
+ border: var(--strokeWidthThin) solid var(--colorTransparentStroke);
89
+ }
90
+
91
+ .filled-darker {
92
+ background-color: var(--colorNeutralBackground3);
93
+ }
94
+
95
+ .filled-lighter {
96
+ background-color: var(--colorNeutralBackground1);
97
+ }
98
+
99
+ .root:where(.outline:not(.disabled)):hover::before {
100
+ border-top-color: var(--colorNeutralStroke1Hover);
101
+ border-inline-end-color: var(--colorNeutralStroke1Hover);
102
+ border-bottom-color: var(--colorNeutralStrokeAccessibleHover);
103
+ border-inline-start-color: var(--colorNeutralStroke1Hover);
104
+ }
105
+
106
+ .root:where(.outline:not(.disabled)):active::before,
107
+ .root:where(.outline:not(.disabled)):focus-within::before {
108
+ border-top-color: var(--colorNeutralStroke1Pressed);
109
+ border-inline-end-color: var(--colorNeutralStroke1Pressed);
110
+ border-bottom-color: var(--colorNeutralStrokeAccessiblePressed);
111
+ border-inline-start-color: var(--colorNeutralStroke1Pressed);
112
+ }
113
+
114
+ .root:where(.underline:not(.disabled)):hover::before {
115
+ border-bottom-color: var(--colorNeutralStrokeAccessibleHover);
116
+ }
117
+
118
+ .root:where(.underline:not(.disabled)):active::before,
119
+ .root:where(.underline:not(.disabled)):focus-within::before {
120
+ border-bottom-color: var(--colorNeutralStrokeAccessiblePressed);
121
+ }
122
+
123
+ .root:where(.underline:not(.disabled))::after {
124
+ border-radius: var(--borderRadiusNone);
125
+ }
126
+
127
+ .root:where(.filled:not(.disabled)):hover::before,
128
+ .root:where(.filled:not(.disabled)):focus-within::before {
129
+ border-top-color: var(--colorTransparentStrokeInteractive);
130
+ border-inline-end-color: var(--colorTransparentStrokeInteractive);
131
+ border-bottom-color: var(--colorTransparentStrokeInteractive);
132
+ border-inline-start-color: var(--colorTransparentStrokeInteractive);
133
+ }
134
+
135
+ .invalid:where(:not(.disabled)):not(:focus-within)::before,
136
+ .invalid:where(:not(.disabled)):hover:not(:focus-within)::before {
137
+ border-top-color: var(--colorPaletteRedBorder2);
138
+ border-inline-end-color: var(--colorPaletteRedBorder2);
139
+ border-bottom-color: var(--colorPaletteRedBorder2);
140
+ border-inline-start-color: var(--colorPaletteRedBorder2);
141
+ }
142
+
143
+ .disabled::before {
144
+ border-top-color: var(--colorNeutralStrokeDisabled);
145
+ border-inline-end-color: var(--colorNeutralStrokeDisabled);
146
+ border-bottom-color: var(--colorNeutralStrokeDisabled);
147
+ border-inline-start-color: var(--colorNeutralStrokeDisabled);
148
+ }
149
+
150
+ .disabled {
151
+ cursor: not-allowed;
152
+ background-color: var(--colorTransparentBackground);
153
+ }
154
+
155
+ .input::placeholder {
156
+ color: var(--colorNeutralForeground4);
157
+ opacity: 1;
158
+ }
159
+
160
+ .input {
161
+ grid-column-start: 1;
162
+ grid-column-end: 2;
163
+ grid-row-start: 1;
164
+ grid-row-end: 3;
165
+ outline-style: none;
166
+ border: 0;
167
+ padding: 0;
168
+ color: var(--colorNeutralForeground1);
169
+ background-color: transparent;
170
+ font-family: inherit;
171
+ font-size: inherit;
172
+ font-weight: inherit;
173
+ line-height: inherit;
174
+ width: 100%;
175
+ }
176
+
177
+ :where(.disabled) > .input::placeholder {
178
+ color: var(--colorNeutralForegroundDisabled);
179
+ }
180
+
181
+ :where(.disabled) > .input {
182
+ color: var(--colorNeutralForegroundDisabled);
183
+ cursor: not-allowed;
184
+ background-color: var(--colorTransparentBackground);
185
+ }
186
+
187
+ .incrementButton:active,
188
+ .decrementButton:active {
189
+ outline-style: none;
190
+ }
191
+
192
+ .incrementButton:enabled:hover,
193
+ .decrementButton:enabled:hover {
194
+ cursor: pointer;
195
+ color: var(--colorNeutralForeground3Hover);
196
+ background-color: var(--colorSubtleBackgroundHover);
197
+ }
198
+
199
+ .incrementButton:enabled:active,
200
+ .decrementButton:enabled:active {
201
+ color: var(--colorNeutralForeground3Pressed);
202
+ background-color: var(--colorSubtleBackgroundPressed);
203
+ }
204
+
205
+ .incrementButton:enabled:global(.fui-SpinButton__button_active),
206
+ .decrementButton:enabled:global(.fui-SpinButton__button_active) {
207
+ color: var(--colorNeutralForeground3Pressed);
208
+ background-color: var(--colorSubtleBackgroundPressed);
209
+ }
210
+
211
+ .incrementButton:disabled,
212
+ .decrementButton:disabled {
213
+ cursor: not-allowed;
214
+ color: var(--colorNeutralForegroundDisabled);
215
+ }
216
+
217
+ .incrementButton,
218
+ .decrementButton {
219
+ display: inline-flex;
220
+ width: var(--spacingHorizontalXXL);
221
+ align-items: center;
222
+ justify-content: center;
223
+ border: 0;
224
+ position: absolute;
225
+ outline-style: none;
226
+ height: var(--spacingHorizontalL);
227
+ background-color: transparent;
228
+ color: var(--colorNeutralForeground3);
229
+ grid-column-start: 2;
230
+ border-radius: 0;
231
+ padding: 0 calc(var(--spacingHorizontalXS) * 1.25) 0 calc(var(--spacingHorizontalXS) * 1.25);
232
+ }
233
+
234
+ .incrementButton {
235
+ grid-row-start: 1;
236
+ border-start-end-radius: var(--borderRadiusMedium);
237
+ padding-top: var(--spacingHorizontalXS);
238
+ padding-bottom: var(--strokeWidthThin);
239
+ }
240
+
241
+ .decrementButton {
242
+ grid-row-start: 2;
243
+ border-end-end-radius: var(--borderRadiusMedium);
244
+ padding-top: var(--strokeWidthThin);
245
+ padding-bottom: var(--spacingHorizontalXS);
246
+ }
247
+
248
+ :where(.small) > .incrementButton {
249
+ padding-block: var(--strokeWidthThicker) 0px;
250
+ padding-inline: var(--spacingHorizontalXS) var(--spacingHorizontalSNudge);
251
+ height: var(--spacingHorizontalM);
252
+ }
253
+
254
+ :where(.small) > .decrementButton {
255
+ padding-block: 0px var(--strokeWidthThicker);
256
+ padding-inline: var(--spacingHorizontalXS) var(--spacingHorizontalSNudge);
257
+ height: var(--spacingHorizontalM);
258
+ }
259
+
260
+ :where(.underline) > .incrementButton:enabled:hover,
261
+ :where(.underline) > .decrementButton:enabled:hover {
262
+ color: var(--colorNeutralForeground3Hover);
263
+ background-color: var(--colorSubtleBackgroundHover);
264
+ }
265
+
266
+ :where(.underline) > .incrementButton:enabled:active,
267
+ :where(.underline) > .decrementButton:enabled:active {
268
+ color: var(--colorNeutralForeground3Pressed);
269
+ background-color: var(--colorSubtleBackgroundPressed);
270
+ }
271
+
272
+ :where(.underline) > .incrementButton:enabled:global(.fui-SpinButton__button_active),
273
+ :where(.underline) > .decrementButton:enabled:global(.fui-SpinButton__button_active) {
274
+ color: var(--colorNeutralForeground3Pressed);
275
+ background-color: var(--colorSubtleBackgroundPressed);
276
+ }
277
+
278
+ :where(.underline) > .incrementButton:disabled,
279
+ :where(.underline) > .decrementButton:disabled {
280
+ color: var(--colorNeutralForegroundDisabled);
281
+ }
282
+
283
+ :where(.underline) > .incrementButton,
284
+ :where(.underline) > .decrementButton {
285
+ background-color: transparent;
286
+ color: var(--colorNeutralForeground3);
287
+ }
288
+
289
+ :where(.filled-darker) > .incrementButton:enabled:hover,
290
+ :where(.filled-darker) > .decrementButton:enabled:hover {
291
+ color: var(--colorNeutralForeground3Hover);
292
+ background-color: var(--colorNeutralBackground3Hover);
293
+ }
294
+
295
+ :where(.filled-darker) > .incrementButton:enabled:active,
296
+ :where(.filled-darker) > .decrementButton:enabled:active {
297
+ color: var(--colorNeutralForeground3Pressed);
298
+ background-color: var(--colorNeutralBackground3Pressed);
299
+ }
300
+
301
+ :where(.filled-darker) > .incrementButton:enabled:global(.fui-SpinButton__button_active),
302
+ :where(.filled-darker) > .decrementButton:enabled:global(.fui-SpinButton__button_active) {
303
+ color: var(--colorNeutralForeground3Pressed);
304
+ background-color: var(--colorNeutralBackground3Pressed);
305
+ }
306
+
307
+ :where(.filled-darker) > .incrementButton:disabled,
308
+ :where(.filled-darker) > .decrementButton:disabled {
309
+ color: var(--colorNeutralForegroundDisabled);
310
+ }
311
+
312
+ :where(.filled-darker) > .incrementButton,
313
+ :where(.filled-darker) > .decrementButton {
314
+ background-color: transparent;
315
+ color: var(--colorNeutralForeground3);
316
+ }
317
+
318
+ :where(.filled-lighter) > .incrementButton:enabled:hover,
319
+ :where(.filled-lighter) > .decrementButton:enabled:hover {
320
+ color: var(--colorNeutralForeground3Hover);
321
+ background-color: var(--colorNeutralBackground1Hover);
322
+ }
323
+
324
+ :where(.filled-lighter) > .incrementButton:enabled:active,
325
+ :where(.filled-lighter) > .incrementButton:enabled:global(.fui-SpinButton__button_active),
326
+ :where(.filled-lighter) > .decrementButton:enabled:active,
327
+ :where(.filled-lighter) > .decrementButton:enabled:global(.fui-SpinButton__button_active) {
328
+ color: var(--colorNeutralForeground3Pressed);
329
+ background-color: var(--colorNeutralBackground1Pressed);
330
+ }
331
+
332
+ :where(.filled-lighter) > .incrementButton:disabled,
333
+ :where(.filled-lighter) > .decrementButton:disabled {
334
+ color: var(--colorNeutralForegroundDisabled);
335
+ }
336
+
337
+ :where(.filled-lighter) > .incrementButton,
338
+ :where(.filled-lighter) > .decrementButton {
339
+ background-color: transparent;
340
+ color: var(--colorNeutralForeground3);
341
+ }
342
+
343
+ @media screen and (prefers-reduced-motion: reduce) {
344
+ .root::after {
345
+ transition-duration: 0.01ms;
346
+ transition-delay: 0.01ms;
347
+ }
348
+ }
349
+
350
+ @media screen and (prefers-reduced-motion: reduce) {
351
+ .root:focus-within::after {
352
+ transition-duration: 0.01ms;
353
+ transition-delay: 0.01ms;
354
+ }
355
+ }
356
+
357
+ @media (forced-colors: active) {
358
+ .disabled::before {
359
+ border-top-color: GrayText;
360
+ border-inline-end-color: GrayText;
361
+ border-bottom-color: GrayText;
362
+ border-inline-start-color: GrayText;
363
+ }
364
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
+ });
10
+ }
11
+ _export(exports, {
12
+ get spinButtonClassNames () {
13
+ return spinButtonClassNames;
14
+ },
15
+ get useSpinButtonStyles_unstable () {
16
+ return useSpinButtonStyles_unstable;
17
+ }
18
+ });
19
+ const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
20
+ const _clsx = require("clsx");
21
+ const _SpinButtonmodulecss = /*#__PURE__*/ _interop_require_default._(require("./SpinButton.module.css"));
22
+ const spinButtonClassNames = {
23
+ root: 'fui-SpinButton',
24
+ input: 'fui-SpinButton__input',
25
+ incrementButton: 'fui-SpinButton__incrementButton',
26
+ decrementButton: 'fui-SpinButton__decrementButton'
27
+ };
28
+ const useSpinButtonStyles_unstable = (state)=>{
29
+ const disabled = state.input.disabled;
30
+ state.root.className = (0, _clsx.clsx)(spinButtonClassNames.root, _SpinButtonmodulecss.default.root, _SpinButtonmodulecss.default[state.size], _SpinButtonmodulecss.default[state.appearance], state.appearance.startsWith('filled') && _SpinButtonmodulecss.default.filled, disabled && _SpinButtonmodulecss.default.disabled, String(state.input['aria-invalid']) === 'true' && _SpinButtonmodulecss.default.invalid, state.root.className);
31
+ state.incrementButton.className = (0, _clsx.clsx)(spinButtonClassNames.incrementButton, state.spinState === 'up' && 'fui-SpinButton__button_active', _SpinButtonmodulecss.default.incrementButton, state.incrementButton.className);
32
+ state.decrementButton.className = (0, _clsx.clsx)(spinButtonClassNames.decrementButton, state.spinState === 'down' && 'fui-SpinButton__button_active', _SpinButtonmodulecss.default.decrementButton, state.decrementButton.className);
33
+ state.input.className = (0, _clsx.clsx)(spinButtonClassNames.input, _SpinButtonmodulecss.default.input, state.input.className);
34
+ return state;
35
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/SpinButton/useSpinButtonStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { SpinButtonState, SpinButtonSlots } from './SpinButton.types';\nimport styles from './SpinButton.module.css';\n\nexport const spinButtonClassNames: SlotClassNames<SpinButtonSlots> = {\n root: 'fui-SpinButton',\n input: 'fui-SpinButton__input',\n incrementButton: 'fui-SpinButton__incrementButton',\n decrementButton: 'fui-SpinButton__decrementButton',\n};\n\nexport const useSpinButtonStyles_unstable = (state: SpinButtonState): SpinButtonState => {\n const disabled = state.input.disabled;\n state.root.className = clsx(\n spinButtonClassNames.root,\n styles.root,\n styles[state.size],\n styles[state.appearance],\n state.appearance.startsWith('filled') && styles.filled,\n disabled && styles.disabled,\n String(state.input['aria-invalid']) === 'true' && styles.invalid,\n state.root.className,\n );\n state.incrementButton.className = clsx(\n spinButtonClassNames.incrementButton,\n state.spinState === 'up' && 'fui-SpinButton__button_active',\n styles.incrementButton,\n state.incrementButton.className,\n );\n state.decrementButton.className = clsx(\n spinButtonClassNames.decrementButton,\n state.spinState === 'down' && 'fui-SpinButton__button_active',\n styles.decrementButton,\n state.decrementButton.className,\n );\n state.input.className = clsx(spinButtonClassNames.input, styles.input, state.input.className);\n return state;\n};\n"],"names":["clsx","styles","spinButtonClassNames","root","input","incrementButton","decrementButton","useSpinButtonStyles_unstable","state","disabled","className","size","appearance","startsWith","filled","String","invalid","spinState"],"mappings":";;;;;;;;;;;QAKaE;;;QAOAK;;;;;sBAZQ,OAAO;8EAGT,0BAA0B;AAEtC,6BAA8D;IACnEJ,MAAM;IACNC,OAAO;IACPC,iBAAiB;IACjBC,iBAAiB;AACnB,EAAE;AAEK,qCAAqC,CAACE;IAC3C,MAAMC,WAAWD,MAAMJ,KAAK,CAACK,QAAQ;IACrCD,MAAML,IAAI,CAACO,SAAS,OAAGV,UAAAA,EACrBE,qBAAqBC,IAAI,EACzBF,4BAAAA,CAAOE,IAAI,EACXF,4BAAM,CAACO,MAAMG,IAAI,CAAC,EAClBV,4BAAM,CAACO,MAAMI,UAAU,CAAC,EACxBJ,MAAMI,UAAU,CAACC,UAAU,CAAC,aAAaZ,4BAAAA,CAAOa,MAAM,EACtDL,YAAYR,4BAAAA,CAAOQ,QAAQ,EAC3BM,OAAOP,MAAMJ,KAAK,CAAC,eAAe,MAAM,UAAUH,4BAAAA,CAAOe,OAAO,EAChER,MAAML,IAAI,CAACO,SAAS;IAEtBF,MAAMH,eAAe,CAACK,SAAS,OAAGV,UAAAA,EAChCE,qBAAqBG,eAAe,EACpCG,MAAMS,SAAS,KAAK,QAAQ,iCAC5BhB,4BAAAA,CAAOI,eAAe,EACtBG,MAAMH,eAAe,CAACK,SAAS;IAEjCF,MAAMF,eAAe,CAACI,SAAS,OAAGV,UAAAA,EAChCE,qBAAqBI,eAAe,EACpCE,MAAMS,SAAS,KAAK,UAAU,iCAC9BhB,4BAAAA,CAAOK,eAAe,EACtBE,MAAMF,eAAe,CAACI,SAAS;IAEjCF,MAAMJ,KAAK,CAACM,SAAS,OAAGV,UAAAA,EAAKE,qBAAqBE,KAAK,EAAEH,4BAAAA,CAAOG,KAAK,EAAEI,MAAMJ,KAAK,CAACM,SAAS;IAC5F,OAAOF;AACT,EAAE"}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
+ });
10
+ }
11
+ _export(exports, {
12
+ get spinButtonClassNames () {
13
+ return spinButtonClassNames;
14
+ },
15
+ get useSpinButtonStyles_unstable () {
16
+ return useSpinButtonStyles_unstable;
17
+ }
18
+ });
19
+ const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
20
+ const _clsx = require("clsx");
21
+ const _SpinButtonmodulecss = /*#__PURE__*/ _interop_require_default._(require("./SpinButton.module.css"));
22
+ const spinButtonClassNames = {
23
+ root: 'fui-SpinButton',
24
+ input: 'fui-SpinButton__input',
25
+ incrementButton: 'fui-SpinButton__incrementButton',
26
+ decrementButton: 'fui-SpinButton__decrementButton'
27
+ };
28
+ const useSpinButtonStyles_unstable = (state)=>{
29
+ const disabled = state.input.disabled;
30
+ state.root.className = (0, _clsx.clsx)(spinButtonClassNames.root, _SpinButtonmodulecss.default.root, _SpinButtonmodulecss.default[state.size], _SpinButtonmodulecss.default[state.appearance], state.appearance.startsWith('filled') && _SpinButtonmodulecss.default.filled, disabled && _SpinButtonmodulecss.default.disabled, String(state.input['aria-invalid']) === 'true' && _SpinButtonmodulecss.default.invalid, state.root.className);
31
+ state.incrementButton.className = (0, _clsx.clsx)(spinButtonClassNames.incrementButton, state.spinState === 'up' && 'fui-SpinButton__button_active', _SpinButtonmodulecss.default.incrementButton, state.incrementButton.className);
32
+ state.decrementButton.className = (0, _clsx.clsx)(spinButtonClassNames.decrementButton, state.spinState === 'down' && 'fui-SpinButton__button_active', _SpinButtonmodulecss.default.decrementButton, state.decrementButton.className);
33
+ state.input.className = (0, _clsx.clsx)(spinButtonClassNames.input, _SpinButtonmodulecss.default.input, state.input.className);
34
+ return state;
35
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/SpinButton/useSpinButtonStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { SpinButtonState, SpinButtonSlots } from './SpinButton.types';\nimport styles from './SpinButton.module.css';\n\nexport const spinButtonClassNames: SlotClassNames<SpinButtonSlots> = {\n root: 'fui-SpinButton',\n input: 'fui-SpinButton__input',\n incrementButton: 'fui-SpinButton__incrementButton',\n decrementButton: 'fui-SpinButton__decrementButton',\n};\n\nexport const useSpinButtonStyles_unstable = (state: SpinButtonState): SpinButtonState => {\n const disabled = state.input.disabled;\n state.root.className = clsx(\n spinButtonClassNames.root,\n styles.root,\n styles[state.size],\n styles[state.appearance],\n state.appearance.startsWith('filled') && styles.filled,\n disabled && styles.disabled,\n String(state.input['aria-invalid']) === 'true' && styles.invalid,\n state.root.className,\n );\n state.incrementButton.className = clsx(\n spinButtonClassNames.incrementButton,\n state.spinState === 'up' && 'fui-SpinButton__button_active',\n styles.incrementButton,\n state.incrementButton.className,\n );\n state.decrementButton.className = clsx(\n spinButtonClassNames.decrementButton,\n state.spinState === 'down' && 'fui-SpinButton__button_active',\n styles.decrementButton,\n state.decrementButton.className,\n );\n state.input.className = clsx(spinButtonClassNames.input, styles.input, state.input.className);\n return state;\n};\n"],"names":["clsx","styles","spinButtonClassNames","root","input","incrementButton","decrementButton","useSpinButtonStyles_unstable","state","disabled","className","size","appearance","startsWith","filled","String","invalid","spinState"],"mappings":";;;;;;;;;;;QAKaE;;;QAOAK;;;;;sBAZQ,OAAO;8EAGT,0BAA0B;AAEtC,6BAA8D;IACnEJ,MAAM;IACNC,OAAO;IACPC,iBAAiB;IACjBC,iBAAiB;AACnB,EAAE;AAEK,qCAAqC,CAACE;IAC3C,MAAMC,WAAWD,MAAMJ,KAAK,CAACK,QAAQ;IACrCD,MAAML,IAAI,CAACO,SAAS,OAAGV,UAAAA,EACrBE,qBAAqBC,IAAI,EACzBF,4BAAAA,CAAOE,IAAI,EACXF,4BAAM,CAACO,MAAMG,IAAI,CAAC,EAClBV,4BAAM,CAACO,MAAMI,UAAU,CAAC,EACxBJ,MAAMI,UAAU,CAACC,UAAU,CAAC,aAAaZ,4BAAAA,CAAOa,MAAM,EACtDL,YAAYR,4BAAAA,CAAOQ,QAAQ,EAC3BM,OAAOP,MAAMJ,KAAK,CAAC,eAAe,MAAM,UAAUH,4BAAAA,CAAOe,OAAO,EAChER,MAAML,IAAI,CAACO,SAAS;IAEtBF,MAAMH,eAAe,CAACK,SAAS,OAAGV,UAAAA,EAChCE,qBAAqBG,eAAe,EACpCG,MAAMS,SAAS,KAAK,QAAQ,iCAC5BhB,4BAAAA,CAAOI,eAAe,EACtBG,MAAMH,eAAe,CAACK,SAAS;IAEjCF,MAAMF,eAAe,CAACI,SAAS,OAAGV,UAAAA,EAChCE,qBAAqBI,eAAe,EACpCE,MAAMS,SAAS,KAAK,UAAU,iCAC9BhB,4BAAAA,CAAOK,eAAe,EACtBE,MAAMF,eAAe,CAACI,SAAS;IAEjCF,MAAMJ,KAAK,CAACM,SAAS,OAAGV,UAAAA,EAAKE,qBAAqBE,KAAK,EAAEH,4BAAAA,CAAOG,KAAK,EAAEI,MAAMJ,KAAK,CAACM,SAAS;IAC5F,OAAOF;AACT,EAAE"}
package/package.json CHANGED
@@ -1,26 +1,29 @@
1
1
  {
2
2
  "name": "@fluentui/react-spinbutton",
3
- "version": "9.75.1-experimental.positioning-engine.20261103-19efe125d1.0",
3
+ "version": "9.75.2-experimental.css-modules.20261113-ba13c87438.0",
4
4
  "description": "Fluent UI React SpinButton component.",
5
5
  "main": "lib-commonjs/index.cjs",
6
6
  "module": "lib/index.js",
7
7
  "typings": "./dist/index.d.ts",
8
- "sideEffects": false,
8
+ "sideEffects": [
9
+ "**/*.css"
10
+ ],
9
11
  "repository": {
10
12
  "type": "git",
11
13
  "url": "https://github.com/microsoft/fluentui"
12
14
  },
13
15
  "license": "MIT",
14
16
  "dependencies": {
15
- "@fluentui/keyboard-keys": "9.75.1-experimental.positioning-engine.20261103-19efe125d1.0",
16
- "@fluentui/react-field": "9.75.1-experimental.positioning-engine.20261103-19efe125d1.0",
17
+ "@fluentui/keyboard-keys": "9.75.2-experimental.css-modules.20261113-ba13c87438.0",
18
+ "@fluentui/react-field": "9.75.2-experimental.css-modules.20261113-ba13c87438.0",
17
19
  "@fluentui/react-icons": "^2.0.245",
18
- "@fluentui/react-jsx-runtime": "9.75.1-experimental.positioning-engine.20261103-19efe125d1.0",
19
- "@fluentui/react-shared-contexts": "9.75.1-experimental.positioning-engine.20261103-19efe125d1.0",
20
- "@fluentui/react-theme": "9.75.1-experimental.positioning-engine.20261103-19efe125d1.0",
21
- "@fluentui/react-utilities": "9.75.1-experimental.positioning-engine.20261103-19efe125d1.0",
20
+ "@fluentui/react-jsx-runtime": "9.75.2-experimental.css-modules.20261113-ba13c87438.0",
21
+ "@fluentui/react-shared-contexts": "9.75.2-experimental.css-modules.20261113-ba13c87438.0",
22
+ "@fluentui/react-theme": "9.75.2-experimental.css-modules.20261113-ba13c87438.0",
23
+ "@fluentui/react-utilities": "9.75.2-experimental.css-modules.20261113-ba13c87438.0",
22
24
  "@griffel/react": "^1.5.32",
23
- "@swc/helpers": "^0.5.1"
25
+ "@swc/helpers": "^0.5.1",
26
+ "clsx": "^2.1.1"
24
27
  },
25
28
  "peerDependencies": {
26
29
  "@types/react": ">=16.14.0 <20.0.0",