@avenue-ticketing/native 0.1.5 → 0.1.7
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/combobox.js +1 -1
- package/dist/combobox.js.map +1 -1
- package/dist/input.js +20 -6
- package/dist/input.js.map +1 -1
- package/dist/multi-select.js.map +1 -1
- package/dist/select-native.js.map +1 -1
- package/dist/select.js +1 -1
- package/dist/select.js.map +1 -1
- package/dist/tag-select.js +1 -1
- package/dist/tag-select.js.map +1 -1
- package/dist/textarea.js +1 -0
- package/dist/textarea.js.map +1 -1
- package/package.json +1 -1
package/dist/input.js
CHANGED
|
@@ -1,4 +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
3
|
import { useNativeVariable } from 'react-native-css';
|
|
3
4
|
import { View, Text, TextInput, Pressable, FlatList } from 'react-native-css/components';
|
|
4
5
|
import { EyeIcon } from 'phosphor-react-native/src/icons/Eye';
|
|
@@ -8,7 +9,6 @@ import { QuestionIcon } from 'phosphor-react-native/src/icons/Question';
|
|
|
8
9
|
import { extendTailwindMerge } from 'tailwind-merge';
|
|
9
10
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
10
11
|
import { InputGroupAddonContext, useInputGroupAddon } from '@avenue-ticketing/native/input-group-addon-context';
|
|
11
|
-
import { StyleSheet, useColorScheme, Platform, Modal, View as View$1, Pressable as Pressable$1, Linking } from 'react-native';
|
|
12
12
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
13
13
|
import Animated, { Easing, FadeIn, FadeOut, FadeInDown, FadeOutDown, useSharedValue, withTiming, useAnimatedStyle, runOnJS, withRepeat } from 'react-native-reanimated';
|
|
14
14
|
import { Picker } from '@react-native-picker/picker';
|
|
@@ -274,7 +274,8 @@ var emailTypoHintStyles = sortCx({
|
|
|
274
274
|
apply: "text-brand-secondary font-medium underline"
|
|
275
275
|
});
|
|
276
276
|
var phoneCountryStyles = sortCx({
|
|
277
|
-
|
|
277
|
+
flagWrap: "h-5 items-center justify-center",
|
|
278
|
+
flag: "text-base leading-none translate-y-px",
|
|
278
279
|
dial: "text-sm font-medium text-tertiary",
|
|
279
280
|
row: "flex-row items-center gap-1.5",
|
|
280
281
|
sheet: "flex-1 bg-primary pt-2.5",
|
|
@@ -294,7 +295,8 @@ var phoneCountryStyles = sortCx({
|
|
|
294
295
|
separator: "my-4 h-px bg-secondary",
|
|
295
296
|
item: "flex-row items-center border-b border-solid border-secondary px-4 py-2",
|
|
296
297
|
itemSelected: "bg-secondary",
|
|
297
|
-
|
|
298
|
+
sheetFlagWrap: "mr-4 h-6 items-center justify-center",
|
|
299
|
+
sheetFlag: "text-2xl leading-none translate-y-[2px]",
|
|
298
300
|
itemName: "min-w-0 flex-1 text-md font-medium text-primary",
|
|
299
301
|
itemDial: "ml-2 text-md font-semibold text-secondary",
|
|
300
302
|
letterHeader: "mt-2 bg-primary px-4 py-1",
|
|
@@ -308,6 +310,14 @@ var InputGroupContext = createContext(null);
|
|
|
308
310
|
var useInputGroupContext = () => useContext(InputGroupContext);
|
|
309
311
|
var ShellFocusContext = createContext(null);
|
|
310
312
|
var useShellFocus = () => useContext(ShellFocusContext);
|
|
313
|
+
var androidInputPad = (size, leading, trailing) => {
|
|
314
|
+
if (Platform.OS !== "android") return void 0;
|
|
315
|
+
const x = size === "lg" ? 14 : 12;
|
|
316
|
+
return {
|
|
317
|
+
paddingStart: leading ? size === "sm" ? 36 : size === "lg" ? 42 : 40 : x,
|
|
318
|
+
paddingEnd: trailing ? size === "lg" ? 38 : 36 : x
|
|
319
|
+
};
|
|
320
|
+
};
|
|
311
321
|
var Label = ({ children, isRequired, isInvalid, className }) => {
|
|
312
322
|
return /* @__PURE__ */ jsxs(View, { className: cx(inputStyles.labelRow, className), children: [
|
|
313
323
|
/* @__PURE__ */ jsx(Text, { className: inputStyles.label, children }),
|
|
@@ -426,7 +436,11 @@ var InputBase = ({
|
|
|
426
436
|
onBlur: handleBlur,
|
|
427
437
|
onSubmitEditing,
|
|
428
438
|
blurOnSubmit: onSubmitEditing ? false : void 0,
|
|
429
|
-
style: {
|
|
439
|
+
style: {
|
|
440
|
+
includeFontPadding: false,
|
|
441
|
+
paddingVertical: 0,
|
|
442
|
+
...androidInputPad(size, hasLeadingIcon, hasTrailingIcon)
|
|
443
|
+
},
|
|
430
444
|
className: cx(
|
|
431
445
|
inputStyles.input,
|
|
432
446
|
groupInputPad ?? sizeStyles.input,
|
|
@@ -6129,7 +6143,7 @@ var PhoneCountrySelect = ({
|
|
|
6129
6143
|
onPress: () => pick(country.iso),
|
|
6130
6144
|
className: cx(phoneCountryStyles.item, isSelected && phoneCountryStyles.itemSelected),
|
|
6131
6145
|
children: [
|
|
6132
|
-
/* @__PURE__ */ jsx(Text, { className: phoneCountryStyles.sheetFlag, children: country.flag }),
|
|
6146
|
+
/* @__PURE__ */ jsx(View, { className: phoneCountryStyles.sheetFlagWrap, children: /* @__PURE__ */ jsx(Text, { className: phoneCountryStyles.sheetFlag, children: country.flag }) }),
|
|
6133
6147
|
/* @__PURE__ */ jsx(Text, { className: phoneCountryStyles.itemName, children: country.name }),
|
|
6134
6148
|
/* @__PURE__ */ jsxs(Text, { className: phoneCountryStyles.itemDial, children: [
|
|
6135
6149
|
"+",
|
|
@@ -6157,7 +6171,7 @@ var PhoneCountrySelect = ({
|
|
|
6157
6171
|
),
|
|
6158
6172
|
children: [
|
|
6159
6173
|
selected ? /* @__PURE__ */ jsxs(View, { className: phoneCountryStyles.row, children: [
|
|
6160
|
-
/* @__PURE__ */ jsx(Text, { className: phoneCountryStyles.flag, children: selected.flag }),
|
|
6174
|
+
/* @__PURE__ */ jsx(View, { className: phoneCountryStyles.flagWrap, children: /* @__PURE__ */ jsx(Text, { className: phoneCountryStyles.flag, children: selected.flag }) }),
|
|
6161
6175
|
/* @__PURE__ */ jsxs(
|
|
6162
6176
|
Text,
|
|
6163
6177
|
{
|