Skip to content

Commit cc0d59e

Browse files
prestonwebdevclaude
andcommitted
refactor(mosaic): stop rotating the combobox and phone input chevrons
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent 71e8a95 commit cc0d59e

6 files changed

Lines changed: 1 addition & 40 deletions

File tree

‎packages/mosaic/src/components/combobox/combobox.markers.stylex.ts‎

Lines changed: 0 additions & 3 deletions
This file was deleted.

‎packages/mosaic/src/components/combobox/combobox.styles.ts‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
typeScaleVars,
1313
} from '../../tokens.stylex';
1414
import { inputGroupScope } from '../input-group/input-group.markers.stylex';
15-
import { comboboxTriggerScope } from './combobox.markers.stylex';
1615

1716
const popupRadius = radiusVars['--cl-radius-xl'];
1817
const inset = space['1.5'];
@@ -140,16 +139,4 @@ export const trigger = stylex.create({
140139
marginInlineEnd: `calc(-1 * ${space['2']})`,
141140
width: space['5.5'],
142141
},
143-
chevron: {
144-
transform: {
145-
default: null,
146-
[stylex.when.ancestor('[data-open]', comboboxTriggerScope)]: 'rotate(180deg)',
147-
},
148-
transitionDuration: {
149-
default: durationVars['--cl-duration-base'],
150-
'@media (prefers-reduced-motion: reduce)': durationVars['--cl-duration-instant'],
151-
},
152-
transitionProperty: 'transform',
153-
transitionTimingFunction: easingVars['--cl-ease-enter'],
154-
},
155142
});

‎packages/mosaic/src/components/combobox/combobox.tsx‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import { Icon } from '../icon';
1717
import { Input, type InputVariant } from '../input';
1818
import { useOptionalInputGroupContext } from '../input-group/input-group.context';
1919
import { scrollAreaRoot, scrollAreaViewport } from '../scroll-area';
20-
import { comboboxTriggerScope } from './combobox.markers.stylex';
2120
import { styles, trigger } from './combobox.styles';
2221

2322
export type ComboboxRootProps = ComboboxProps;
@@ -73,7 +72,7 @@ export const ComboboxTrigger = React.forwardRef<HTMLButtonElement, ComboboxTrigg
7372
render ??
7473
(props => (
7574
<Button
76-
xstyle={[trigger.base, comboboxTriggerScope]}
75+
xstyle={trigger.base}
7776
{...props}
7877
/>
7978
))
@@ -84,7 +83,6 @@ export const ComboboxTrigger = React.forwardRef<HTMLButtonElement, ComboboxTrigg
8483
<Icon
8584
glyph={ChevronDown}
8685
size='md'
87-
xstyle={trigger.chevron}
8886
/>
8987
)}
9088
</HeadlessCombobox.Trigger>

‎packages/mosaic/src/components/phone-input/phone-input.markers.stylex.ts‎

Lines changed: 0 additions & 3 deletions
This file was deleted.

‎packages/mosaic/src/components/phone-input/phone-input.styles.ts‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,13 @@ import * as stylex from '@stylexjs/stylex';
22

33
import {
44
colorVars,
5-
durationVars,
6-
easingVars,
75
fontFamilyVars,
86
fontWeightVars,
97
radiusVars,
108
shadowVars,
119
space,
1210
typeScaleVars,
1311
} from '../../tokens.stylex';
14-
import { phoneTriggerScope } from './phone-input.markers.stylex';
1512

1613
const popupRadius = radiusVars['--cl-radius-xl'];
1714
const listInset = space['1.5'];
@@ -45,18 +42,6 @@ export const styles = stylex.create({
4542
paddingInlineStart: `calc(${space['2']} + var(--_cl-input-group-inset))`,
4643
userSelect: 'none',
4744
},
48-
chevron: {
49-
transform: {
50-
default: null,
51-
[stylex.when.ancestor('[aria-expanded="true"]', phoneTriggerScope)]: 'rotate(180deg)',
52-
},
53-
transitionDuration: {
54-
default: durationVars['--cl-duration-base'],
55-
'@media (prefers-reduced-motion: reduce)': durationVars['--cl-duration-instant'],
56-
},
57-
transitionProperty: 'transform',
58-
transitionTimingFunction: easingVars['--cl-ease-enter'],
59-
},
6045
triggerContent: {
6146
gap: space['0.5'],
6247
alignItems: 'center',

‎packages/mosaic/src/components/phone-input/phone-input.tsx‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import { InputGroup } from '../input-group';
2424
import { Popover } from '../popover';
2525
import { scrollAreaRoot, scrollAreaViewport } from '../scroll-area';
2626
import { formatNationalNumber, getNationalNumber, toE164 } from './phone-input.format';
27-
import { phoneTriggerScope } from './phone-input.markers.stylex';
2827
import { styles } from './phone-input.styles';
2928

3029
const countryOptions = [...IsoToCountryMap.values()];
@@ -215,7 +214,6 @@ export const PhoneInput = React.forwardRef<HTMLInputElement, PhoneInputProps>(fu
215214
reset.base,
216215
focusOutline.visible,
217216
buttonStyles.touchTarget,
218-
phoneTriggerScope,
219217
styles.trigger,
220218
disabled && buttonStyles.disabled,
221219
),
@@ -236,7 +234,6 @@ export const PhoneInput = React.forwardRef<HTMLInputElement, PhoneInputProps>(fu
236234
<Icon
237235
glyph={ChevronDown}
238236
size='md'
239-
xstyle={styles.chevron}
240237
/>
241238
</span>
242239
</Popover.Trigger>

0 commit comments

Comments
 (0)