@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 +80 -73
- package/dist/input.js.map +1 -1
- package/package.json +1 -1
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(
|
|
6202
|
-
|
|
6203
|
-
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
|
|
6207
|
-
{
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
|
|
6218
|
-
|
|
6219
|
-
|
|
6220
|
-
|
|
6221
|
-
|
|
6222
|
-
|
|
6223
|
-
|
|
6224
|
-
|
|
6225
|
-
|
|
6226
|
-
|
|
6227
|
-
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
|
|
6231
|
-
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
-
|
|
6236
|
-
|
|
6237
|
-
|
|
6238
|
-
|
|
6239
|
-
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
|
|
6244
|
-
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
|
|
6251
|
-
|
|
6252
|
-
|
|
6253
|
-
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
className: phoneCountryStyles.
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
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
|
] });
|