@avenue-ticketing/native 0.1.9 → 0.1.10

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/dist/input.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createContext, useContext, useState, useCallback, useEffect, useMemo, useRef, isValidElement } from 'react';
2
- import { StyleSheet, useColorScheme, Platform, Modal, View as View$1, Pressable as Pressable$1, Linking } from 'react-native';
2
+ import { StyleSheet, useColorScheme, Platform, Modal, View as View$1, Pressable as Pressable$1, StatusBar, Linking } from 'react-native';
3
3
  import { useNativeVariable } from 'react-native-css';
4
4
  import { View, Text, TextInput, Pressable, FlatList } from 'react-native-css/components';
5
5
  import { EyeIcon } from 'phosphor-react-native/src/icons/Eye';
@@ -6198,78 +6198,85 @@ var PhoneCountrySelect = ({
6198
6198
  animationType: "slide",
6199
6199
  presentationStyle: "pageSheet",
6200
6200
  onRequestClose: close,
6201
- children: /* @__PURE__ */ jsx(InputGroupContext.Provider, { value: null, children: /* @__PURE__ */ jsx(ShellFocusContext.Provider, { value: null, children: /* @__PURE__ */ jsxs(View, { className: phoneCountryStyles.sheet, children: [
6202
- /* @__PURE__ */ jsxs(View, { className: phoneCountryStyles.header, children: [
6203
- /* @__PURE__ */ jsx(View, { className: phoneCountryStyles.headerSide }),
6204
- /* @__PURE__ */ jsx(Text, { className: phoneCountryStyles.headerTitle, children: "Select country" }),
6205
- /* @__PURE__ */ jsx(
6206
- Pressable,
6207
- {
6208
- accessibilityRole: "button",
6209
- accessibilityLabel: "Close",
6210
- onPress: close,
6211
- className: phoneCountryStyles.headerClose,
6212
- children: /* @__PURE__ */ jsx(XIcon, { size: 20, weight: "regular", color: fgPrimary })
6213
- }
6214
- )
6215
- ] }),
6216
- /* @__PURE__ */ jsxs(View, { className: phoneCountryStyles.body, children: [
6217
- /* @__PURE__ */ jsx(View, { className: phoneCountryStyles.searchWrap, children: /* @__PURE__ */ jsx(
6218
- InputBase,
6219
- {
6220
- size: "lg",
6221
- placeholder: "Search countries",
6222
- icon: MagnifyingGlassIcon,
6223
- value: search,
6224
- onChangeText: setSearch,
6225
- autoCapitalize: "none",
6226
- autoCorrect: false
6227
- }
6228
- ) }),
6229
- /* @__PURE__ */ jsxs(View, { className: phoneCountryStyles.listRow, children: [
6230
- /* @__PURE__ */ jsx(
6231
- FlatList,
6232
- {
6233
- ref: listRef,
6234
- className: phoneCountryStyles.listPane,
6235
- contentContainerClassName: search.trim() ? phoneCountryStyles.listContentSearch : void 0,
6236
- data: rows,
6237
- extraData: value,
6238
- keyboardShouldPersistTaps: "always",
6239
- showsVerticalScrollIndicator: false,
6240
- keyExtractor: (item) => item.type === "letter" ? `letter-${item.letter}` : item.country.iso,
6241
- onScrollToIndexFailed: (info) => {
6242
- setTimeout(() => {
6243
- listRef.current?.scrollToIndex({
6244
- index: info.index,
6245
- animated: true,
6246
- viewPosition: 0.1
6247
- });
6248
- }, 100);
6249
- },
6250
- ListHeaderComponent: search.trim() ? null : /* @__PURE__ */ jsxs(View, { children: [
6251
- /* @__PURE__ */ jsx(Text, { className: phoneCountryStyles.sectionTitle, children: "Popular" }),
6252
- popular.map((country) => /* @__PURE__ */ jsx(View, { children: renderCountry(country) }, country.iso)),
6253
- /* @__PURE__ */ jsx(View, { className: phoneCountryStyles.separator }),
6254
- /* @__PURE__ */ jsx(Text, { className: phoneCountryStyles.sectionTitle, children: "All countries" })
6255
- ] }),
6256
- ListEmptyComponent: /* @__PURE__ */ jsx(Text, { className: phoneCountryStyles.empty, children: "No country found." }),
6257
- renderItem: ({ item }) => item.type === "letter" ? /* @__PURE__ */ jsx(View, { className: phoneCountryStyles.letterHeader, children: /* @__PURE__ */ jsx(Text, { className: phoneCountryStyles.letterHeaderText, children: item.letter }) }) : renderCountry(item.country)
6258
- }
6259
- ),
6260
- !search.trim() && /* @__PURE__ */ jsx(View, { className: phoneCountryStyles.alphabet, children: letters.map((letter) => /* @__PURE__ */ jsx(
6261
- Pressable,
6262
- {
6263
- accessibilityRole: "button",
6264
- onPress: () => scrollToLetter(letter),
6265
- className: phoneCountryStyles.alphabetItem,
6266
- children: /* @__PURE__ */ jsx(Text, { className: phoneCountryStyles.alphabetLabel, children: letter })
6267
- },
6268
- letter
6269
- )) })
6270
- ] })
6271
- ] })
6272
- ] }) }) })
6201
+ children: /* @__PURE__ */ jsx(InputGroupContext.Provider, { value: null, children: /* @__PURE__ */ jsx(ShellFocusContext.Provider, { value: null, children: /* @__PURE__ */ jsxs(
6202
+ View,
6203
+ {
6204
+ className: phoneCountryStyles.sheet,
6205
+ style: Platform.OS === "android" ? { paddingTop: StatusBar.currentHeight ?? 0 } : void 0,
6206
+ children: [
6207
+ /* @__PURE__ */ jsxs(View, { className: phoneCountryStyles.header, children: [
6208
+ /* @__PURE__ */ jsx(View, { className: phoneCountryStyles.headerSide }),
6209
+ /* @__PURE__ */ jsx(Text, { className: phoneCountryStyles.headerTitle, children: "Select country" }),
6210
+ /* @__PURE__ */ jsx(
6211
+ Pressable,
6212
+ {
6213
+ accessibilityRole: "button",
6214
+ accessibilityLabel: "Close",
6215
+ onPress: close,
6216
+ className: phoneCountryStyles.headerClose,
6217
+ children: /* @__PURE__ */ jsx(XIcon, { size: 20, weight: "regular", color: fgPrimary })
6218
+ }
6219
+ )
6220
+ ] }),
6221
+ /* @__PURE__ */ jsxs(View, { className: phoneCountryStyles.body, children: [
6222
+ /* @__PURE__ */ jsx(View, { className: phoneCountryStyles.searchWrap, children: /* @__PURE__ */ jsx(
6223
+ InputBase,
6224
+ {
6225
+ size: "lg",
6226
+ placeholder: "Search countries",
6227
+ icon: MagnifyingGlassIcon,
6228
+ value: search,
6229
+ onChangeText: setSearch,
6230
+ autoCapitalize: "none",
6231
+ autoCorrect: false
6232
+ }
6233
+ ) }),
6234
+ /* @__PURE__ */ jsxs(View, { className: phoneCountryStyles.listRow, children: [
6235
+ /* @__PURE__ */ jsx(
6236
+ FlatList,
6237
+ {
6238
+ ref: listRef,
6239
+ className: phoneCountryStyles.listPane,
6240
+ contentContainerClassName: search.trim() ? phoneCountryStyles.listContentSearch : void 0,
6241
+ data: rows,
6242
+ extraData: value,
6243
+ keyboardShouldPersistTaps: "always",
6244
+ showsVerticalScrollIndicator: false,
6245
+ keyExtractor: (item) => item.type === "letter" ? `letter-${item.letter}` : item.country.iso,
6246
+ onScrollToIndexFailed: (info) => {
6247
+ setTimeout(() => {
6248
+ listRef.current?.scrollToIndex({
6249
+ index: info.index,
6250
+ animated: true,
6251
+ viewPosition: 0.1
6252
+ });
6253
+ }, 100);
6254
+ },
6255
+ ListHeaderComponent: search.trim() ? null : /* @__PURE__ */ jsxs(View, { children: [
6256
+ /* @__PURE__ */ jsx(Text, { className: phoneCountryStyles.sectionTitle, children: "Popular" }),
6257
+ popular.map((country) => /* @__PURE__ */ jsx(View, { children: renderCountry(country) }, country.iso)),
6258
+ /* @__PURE__ */ jsx(View, { className: phoneCountryStyles.separator }),
6259
+ /* @__PURE__ */ jsx(Text, { className: phoneCountryStyles.sectionTitle, children: "All countries" })
6260
+ ] }),
6261
+ ListEmptyComponent: /* @__PURE__ */ jsx(Text, { className: phoneCountryStyles.empty, children: "No country found." }),
6262
+ renderItem: ({ item }) => item.type === "letter" ? /* @__PURE__ */ jsx(View, { className: phoneCountryStyles.letterHeader, children: /* @__PURE__ */ jsx(Text, { className: phoneCountryStyles.letterHeaderText, children: item.letter }) }) : renderCountry(item.country)
6263
+ }
6264
+ ),
6265
+ !search.trim() && /* @__PURE__ */ jsx(View, { className: phoneCountryStyles.alphabet, children: letters.map((letter) => /* @__PURE__ */ jsx(
6266
+ Pressable,
6267
+ {
6268
+ accessibilityRole: "button",
6269
+ onPress: () => scrollToLetter(letter),
6270
+ className: phoneCountryStyles.alphabetItem,
6271
+ children: /* @__PURE__ */ jsx(Text, { className: phoneCountryStyles.alphabetLabel, children: letter })
6272
+ },
6273
+ letter
6274
+ )) })
6275
+ ] })
6276
+ ] })
6277
+ ]
6278
+ }
6279
+ ) }) })
6273
6280
  }
6274
6281
  )
6275
6282
  ] });