Inputs

Todos os campos de entrada do app — 3 componentes com tokens reais, estados e código fonte.

SearchInput (pill)
searchPara onde você quer ir?
OriginDestination
flight_takeoffSaindo de
flight_landIndo para
swap_horiz
TripTypeSelector
Ida e voltakeyboard_arrow_down
1person_outlinekeyboard_arrow_down
Inputs
Clique em cada input para simular o estado focused.

SearchInput (Pill)

Input principal de busca. Usado na home para destino e em outras buscas rápidas. Pill perfeito com 54px de altura, fundo white10 que clareia no estado focused.

Component/SearchInputVariants: Default, Focused — components/SearchInput.js
searchPara onde você quer ir?
Default
searchParisclose
Focused / Com valor
PropriedadeValorDescrição
heightinputHeight (54px)Token compartilhado com outros inputs
borderRadius100Pill perfeito
backgroundColorcolors.white10rgba(255,255,255,0.10)
borderWidth1
borderColorcolors.white10Não muda no focused
paddingHorizontalspacing.md (16px)
gapspacing.sm (8px)Entre ícone e texto
fontSize16
fontFamilyMediumGeneral Sans Medium
color (text)colors.white (#FFFFFF)
color (placeholder)colors.white60rgba(255,255,255,0.60)
bg (focused)rgba(255,255,255,0.18)Border não muda
iconSize20MaterialIcons, color white
tsx
copy
import { SearchInput } from '@/components/SearchInput';

<SearchInput
  icon="search"
  placeholder="Para onde você quer ir?"
  value={destination}
  onPress={() => openDestinationPicker()}
/>

// StyleSheet interno — SearchInput.js:
// input: {
//   flexDirection: 'row',
//   alignItems: 'center',
//   gap: spacing.sm,          // 8
//   height: inputHeight,      // 54
//   paddingHorizontal: spacing.md, // 16
//   borderRadius: 100,
//   backgroundColor: colors.white10,
//   borderWidth: 1,
//   borderColor: colors.white10,
// },
// inputFocused: {
//   backgroundColor: 'rgba(255, 255, 255, 0.18)',
// },
// text: { flex: 1, fontSize: 16, color: colors.white, fontFamily: Medium },
// placeholder: { color: colors.white60 }

OriginDestinationInput

Input duplo de origem e destino num único container pill. Altura total de 109px (2 × 54px + 1px separador). Botão de swap posicionado absolutamente à direita, com animação de rotação 180° via Reanimated.

Component/OriginDestinationInputVariants: Default, Origin focused, Dest focused — components/OriginDestinationInput.js
flight_takeoffSaindo de
flight_landIndo para
swap_horiz
Default
flight_takeoffSão Paulo (GRU)
flight_landIndo para
swap_horiz
Origin focused
PropriedadeValorDescrição
height (container)rowHeight*2 + 1 (109px)2 rows + 1px separator
borderRadiusradius.sm (8px)
backgroundColorcolors.white10rgba(255,255,255,0.10)
borderWidth1
borderColorcolors.white10
rowHeight54pxCada linha
paddingHorizontalspacing.md (16px)
gapspacing.sm (8px)Entre ícone e texto
row focused bgrgba(255,255,255,0.18)Só a row ativa
separator1px rgba(255,255,255,0.15)
swapButton size36×36pxborderRadius 18
swapButton bg#000000Preto puro
swapButton border1px rgba(255,255,255,0.3)
swapButton positionright: 16px, center YPosição absoluta
tsx
copy
import { OriginDestinationInput } from '@/components/OriginDestinationInput';

<OriginDestinationInput
  origin={origin}          // { name, country, code } | null
  destination={destination}
  onOriginPress={() => openOriginPicker()}
  onDestinationPress={() => openDestinationPicker()}
  onSwapPress={() => swapOriginDestination()}
/>

// StyleSheet interno — OriginDestinationInput.js:
// container: {
//   height: containerHeight,   // rowHeight * 2 + 1 = 109
//   borderRadius: 999,
//   backgroundColor: colors.white10,
//   borderWidth: 1,
//   borderColor: colors.white10,
//   overflow: 'hidden',
// },
// row: {
//   flexDirection: 'row',
//   alignItems: 'center',
//   gap: spacing.sm,             // 8
//   paddingHorizontal: spacing.md, // 16
//   height: rowHeight,           // 54
// },
// rowFocused: { backgroundColor: 'rgba(255, 255, 255, 0.18)' },
// separator: { height: 1, backgroundColor: 'rgba(255, 255, 255, 0.15)' },
// swapButton: {
//   position: 'absolute',
//   right: spacing.md,           // 16
//   width: 36, height: 36,
//   borderRadius: 18,
//   backgroundColor: '#000000',
//   borderWidth: 1,
//   borderColor: 'rgba(255, 255, 255, 0.3)',
// }

TripTypeSelector

Seletor duplo de tipo de viagem e número de passageiros. Container retangular comradius.sm (8px), dividido em dois segmentos com divider vertical. Cada segmento tem estado focused independente.

Component/TripTypeSelectorVariants: Default, Segment focused — components/TripTypeSelector.js
Ida e voltakeyboard_arrow_down
1person_outlinekeyboard_arrow_down
Default
Só idakeyboard_arrow_down
2person_outlinekeyboard_arrow_down
Left segment focused
PropriedadeValorDescrição
heightinputHeight (54px)
borderRadiusradius.sm (8px)Quadrado, não pill
backgroundColorcolors.white10rgba(255,255,255,0.10)
borderWidth1
borderColorcolors.white10
segment paddingLeftspacing.md (16px)
segment paddingRightspacing.sm (8px)
gapspacing.sm (8px)Entre elementos do segmento
divider1px rgba(255,255,255,0.2)Entre os dois segmentos
fontSize16fontFamily Medium
segment focused bgrgba(255,255,255,0.18)Só o segmento ativo
icon (chevron)keyboard-arrow-down, 24MaterialIcons
icon (person)person-outline, 20MaterialIcons
tsx
copy
import { TripTypeSelector } from '@/components/TripTypeSelector';

<TripTypeSelector
  tripType="ida e volta"    // ou "só ida"
  passengers={1}
  onTripTypePress={() => openTripTypePicker()}
  onPassengersPress={() => openPassengersPicker()}
/>

// StyleSheet interno — TripTypeSelector.js:
// container: {
//   flexDirection: 'row',
//   height: inputHeight,    // 54
//   borderRadius: radius.sm, // 8
//   backgroundColor: colors.white10,
//   borderWidth: 1,
//   borderColor: colors.white10,
//   overflow: 'hidden',
// },
// segment: {
//   flex: 1,
//   flexDirection: 'row',
//   alignItems: 'center',
//   gap: spacing.sm,        // 8
//   paddingLeft: spacing.md, // 16
//   paddingRight: spacing.sm, // 8
// },
// segmentRight: {
//   borderLeftWidth: 1,
//   borderLeftColor: 'rgba(255, 255, 255, 0.2)',
// },
// segmentFocused: { backgroundColor: 'rgba(255, 255, 255, 0.18)' },
// text: { fontSize: 16, color: colors.white, fontFamily: Medium }