Repository navigation
fix(mosaic): tighten phone input country selector spacing #10379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
cb289d1
3aeb9da
f8af401
356e16d
14e34d3
a9e2c32
1f25ba6
06cf393
676f742
d98644d
a4ce9b9
a17c1c1
93d163a
1e17298
4f5a017
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| --- | ||
| --- |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,48 @@ | ||
| import * as stylex from '@stylexjs/stylex'; | ||
|
|
||
| import { colorVars, radiusVars, shadowVars, space, typeScaleVars } from '../../tokens.stylex'; | ||
| import { | ||
| colorVars, | ||
| fontFamilyVars, | ||
| fontWeightVars, | ||
| radiusVars, | ||
| shadowVars, | ||
| space, | ||
| typeScaleVars, | ||
| } from '../../tokens.stylex'; | ||
|
|
||
| export const styles = stylex.create({ | ||
| triggerStart: { | ||
| paddingInlineStart: 'var(--_cl-input-group-inset)', | ||
| }, | ||
| trigger: { | ||
| '--_cl-icon-color': colorVars['--cl-color-foreground-secondary'], | ||
| borderRadius: 'max(0px, calc(var(--_cl-input-group-radius) - var(--_cl-input-group-inset)))', | ||
| borderWidth: 0, | ||
| alignItems: 'center', | ||
| appearance: 'none', | ||
| backgroundColor: 'transparent', | ||
| cursor: 'pointer', | ||
| display: 'inline-flex', | ||
| flexShrink: 0, | ||
| justifyContent: 'center', | ||
| outlineOffset: { default: null, ':focus-visible': 0 }, | ||
| paddingInlineEnd: 0, | ||
| paddingInlineStart: space['1.5'], | ||
| userSelect: 'none', | ||
| height: 'calc(var(--_cl-input-group-height) - 2 * var(--_cl-input-group-inset))', | ||
| }, | ||
| triggerContent: { | ||
| gap: space['0.5'], | ||
| alignItems: 'center', | ||
| display: 'flex', | ||
| }, | ||
| flag: { | ||
| fontSize: typeScaleVars['--cl-text-sm-size'], | ||
| lineHeight: 1, | ||
| }, | ||
| triggerFlag: { | ||
| alignItems: 'center', | ||
| display: 'flex', | ||
| flexShrink: 0, | ||
| fontSize: space['4'], | ||
| fontSize: typeScaleVars['--cl-text-xs-size'], | ||
| justifyContent: 'center', | ||
| lineHeight: 1, | ||
| height: space['4'], | ||
| width: space['4'], | ||
| }, | ||
|
|
@@ -29,14 +54,14 @@ export const styles = stylex.create({ | |
| }, | ||
| prefix: { | ||
| gap: space['2'], | ||
| color: colorVars['--cl-color-brand'], | ||
| color: colorVars['--cl-color-foreground'], | ||
| fontVariantNumeric: 'tabular-nums', | ||
| paddingInlineEnd: 0, | ||
| paddingInlineStart: space['2'], | ||
| }, | ||
| control: { | ||
| fontVariantNumeric: 'tabular-nums', | ||
| paddingInlineStart: space['2'], | ||
| paddingInlineStart: space['1.5'], | ||
| }, | ||
| popup: { | ||
| borderRadius: radiusVars['--cl-radius-lg'], | ||
|
|
@@ -45,28 +70,129 @@ export const styles = stylex.create({ | |
| boxShadow: shadowVars['--cl-shadow-md'], | ||
| color: colorVars['--cl-color-foreground'], | ||
| }, | ||
| countrySearchContainer: { | ||
| paddingInline: space['2'], | ||
| countrySearchRow: { | ||
| gap: space['1'], | ||
| alignItems: 'center', | ||
| borderBlockEndColor: colorVars['--cl-color-border'], | ||
| borderBlockEndStyle: 'solid', | ||
| borderBlockEndWidth: '1px', | ||
| display: 'flex', | ||
| flexShrink: 0, | ||
| paddingInlineEnd: space['2'], | ||
| paddingInlineStart: space['2'], | ||
| height: space['8'], | ||
| }, | ||
| countrySearchIcon: { | ||
| alignItems: 'center', | ||
| display: 'flex', | ||
| flexShrink: 0, | ||
| justifyContent: 'center', | ||
| height: space['5'], | ||
| width: space['5'], | ||
| }, | ||
| countrySearchInput: { | ||
| borderRadius: 0, | ||
| outline: { | ||
| default: 'none', | ||
| '@media (forced-colors: active)': { | ||
| default: null, | ||
| ':focus-visible': '2px solid CanvasText', | ||
| }, | ||
| }, | ||
|
Comment on lines
+95
to
+101
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win Restore a visible keyboard-focus indicator for country search. When the picker moves focus to the search input, Based on learnings, “Flag it when no visible focus indicator remains, whether native or custom.” 🤖 Prompt for AI Agents
Source: Learnings |
||
| outlineOffset: { | ||
| default: null, | ||
| '@media (forced-colors: active)': { | ||
| default: null, | ||
| ':focus-visible': '2px', | ||
| }, | ||
| }, | ||
| paddingInlineEnd: space['1'], | ||
| paddingInlineStart: space['0.5'], | ||
| height: space['6'], | ||
| '::placeholder': { | ||
| color: colorVars['--cl-color-foreground-secondary'], | ||
| }, | ||
| }, | ||
| countryList: { | ||
| gap: space['0.5'], | ||
| paddingBlock: space['0.5'], | ||
| paddingInline: space['1'], | ||
| display: 'flex', | ||
| flexDirection: 'column', | ||
| maxHeight: '16rem', | ||
| }, | ||
| option: { | ||
| borderRadius: radiusVars['--cl-radius-md'], | ||
| gap: space['1'], | ||
| outline: { | ||
| default: 'none', | ||
| '@media (forced-colors: active)': { | ||
| default: null, | ||
| ':is([data-active])': '2px solid CanvasText', | ||
| }, | ||
| }, | ||
| paddingBlock: space['1'], | ||
| alignItems: 'center', | ||
| backgroundColor: { | ||
| default: 'transparent', | ||
| ':is([data-active])': colorVars['--cl-color-neutral-alpha-100'], | ||
| '@media (hover: hover)': { | ||
| ':hover': colorVars['--cl-color-neutral-alpha-100'], | ||
| }, | ||
| }, | ||
| color: { | ||
| default: colorVars['--cl-color-foreground-secondary'], | ||
| ':where([data-active])': colorVars['--cl-color-foreground'], | ||
| }, | ||
| cursor: 'pointer', | ||
| display: 'flex', | ||
| flexShrink: 0, | ||
| paddingBlockEnd: space['1'], | ||
| paddingBlockStart: space['2'], | ||
| fontFamily: fontFamilyVars['--cl-font-family-sans'], | ||
| fontSize: typeScaleVars['--cl-text-sm-size'], | ||
| fontWeight: fontWeightVars['--cl-font-normal'], | ||
| lineHeight: typeScaleVars['--cl-text-sm-leading'], | ||
| paddingInlineEnd: space['1.5'], | ||
| paddingInlineStart: space['1'], | ||
| height: space['8'], | ||
| }, | ||
| empty: { | ||
| paddingBlock: space['6'], | ||
| paddingInline: space['3'], | ||
| color: colorVars['--cl-color-foreground-secondary'], | ||
| fontFamily: fontFamilyVars['--cl-font-family-sans'], | ||
| fontSize: typeScaleVars['--cl-text-sm-size'], | ||
| textAlign: 'center', | ||
| }, | ||
| optionFlag: { | ||
| alignItems: 'center', | ||
| display: 'flex', | ||
| flexShrink: 0, | ||
| justifyContent: 'center', | ||
| height: space['5'], | ||
| width: space['5'], | ||
| }, | ||
| optionName: { | ||
| padding: space['0.5'], | ||
| overflow: 'hidden', | ||
| flexGrow: 1, | ||
| textOverflow: 'ellipsis', | ||
| whiteSpace: 'nowrap', | ||
| height: space['6'], | ||
| minWidth: 0, | ||
| }, | ||
| optionCode: { | ||
| alignItems: 'center', | ||
| color: colorVars['--cl-color-foreground-secondary'], | ||
| display: 'flex', | ||
| flexShrink: 0, | ||
| fontSize: typeScaleVars['--cl-text-xs-size'], | ||
| fontVariantNumeric: 'tabular-nums', | ||
| fontWeight: fontWeightVars['--cl-font-medium'], | ||
| justifyContent: 'flex-end', | ||
| lineHeight: typeScaleVars['--cl-text-xs-leading'], | ||
| whiteSpace: 'nowrap', | ||
| }, | ||
| indicatorSlot: { | ||
| display: 'flex', | ||
| flexShrink: 0, | ||
| width: space['3'], | ||
| height: space['5'], | ||
| minWidth: space['5'], | ||
| width: 'max-content', | ||
| }, | ||
| }); | ||
Uh oh!
There was an error while loading. Please reload this page.