Skip to content

Commit 433f9ed

Browse files
authored
chore: revert allowed override opacity (#8933)
1 parent 5ede892 commit 433f9ed

File tree

3 files changed

+18
-25
lines changed

3 files changed

+18
-25
lines changed

packages/@react-spectrum/s2/src/ActionButton.tsx

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,8 @@ export const ActionButton = forwardRef(function ActionButton(props: ActionButton
313313
style({
314314
order: 1,
315315
truncate: true,
316-
opacity: {
317-
default: 1,
318-
isProgressVisible: 0
316+
visibility: {
317+
isProgressVisible: 'hidden'
319318
}
320319
})({isProgressVisible})
321320
}],
@@ -325,9 +324,8 @@ export const ActionButton = forwardRef(function ActionButton(props: ActionButton
325324
size: fontRelative(20),
326325
marginStart: '--iconMargin',
327326
flexShrink: 0,
328-
opacity: {
329-
default: 1,
330-
isProgressVisible: 0
327+
visibility: {
328+
isProgressVisible: 'hidden'
331329
}
332330
})({isProgressVisible})
333331
}],
@@ -341,9 +339,8 @@ export const ActionButton = forwardRef(function ActionButton(props: ActionButton
341339
}],
342340
[ImageContext, {
343341
styles: style({
344-
opacity: {
345-
default: 1,
346-
isProgressVisible: 0
342+
visibility: {
343+
isProgressVisible: 'hidden'
347344
}
348345
})({isProgressVisible})
349346
}],
@@ -357,9 +354,8 @@ export const ActionButton = forwardRef(function ActionButton(props: ActionButton
357354
insetStart: '--badgePosition',
358355
marginTop: 'calc((self(height) * -1)/2)',
359356
marginStart: 'calc((self(height) * -1)/2)',
360-
opacity: {
361-
default: 1,
362-
isProgressVisible: 0
357+
visibility: {
358+
isProgressVisible: 'hidden'
363359
}
364360
})({isProgressVisible})
365361
}]
@@ -372,9 +368,9 @@ export const ActionButton = forwardRef(function ActionButton(props: ActionButton
372368
top: '50%',
373369
left: '50%',
374370
transform: 'translate(-50%, -50%)',
375-
opacity: {
376-
default: 0,
377-
isProgressVisible: 1
371+
visibility: {
372+
default: 'hidden',
373+
isProgressVisible: 'visible'
378374
}
379375
})({isProgressVisible, isPending})}>
380376
<ProgressCircle

packages/@react-spectrum/s2/src/Button.tsx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,8 @@ export const Button = forwardRef(function Button(props: ButtonProps, ref: Focusa
367367
styles: style({
368368
paddingY: '--labelPadding',
369369
order: 1,
370-
opacity: {
371-
default: 1,
372-
isProgressVisible: 0
370+
visibility: {
371+
isProgressVisible: 'hidden'
373372
}
374373
})({isProgressVisible}),
375374
// @ts-ignore data-attributes allowed on all JSX elements, but adding to DOMProps has been problematic in the past
@@ -381,9 +380,8 @@ export const Button = forwardRef(function Button(props: ButtonProps, ref: Focusa
381380
size: fontRelative(20),
382381
marginStart: '--iconMargin',
383382
flexShrink: 0,
384-
opacity: {
385-
default: 1,
386-
isProgressVisible: 0
383+
visibility: {
384+
isProgressVisible: 'hidden'
387385
}
388386
})({isProgressVisible})
389387
}]
@@ -396,9 +394,9 @@ export const Button = forwardRef(function Button(props: ButtonProps, ref: Focusa
396394
top: '50%',
397395
left: '50%',
398396
transform: 'translate(-50%, -50%)',
399-
opacity: {
400-
default: 0,
401-
isProgressVisible: 1
397+
visibility: {
398+
default: 'hidden',
399+
isProgressVisible: 'visible'
402400
}
403401
})({isProgressVisible, isPending})}>
404402
<ProgressCircle

packages/@react-spectrum/s2/src/style-utils.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,6 @@ const allowedOverrides = [
303303
'insetY',
304304
'insetStart',
305305
'insetEnd',
306-
'opacity',
307306
'visibility'
308307
] as const;
309308

0 commit comments

Comments
 (0)