@avenue-ticketing/native 0.1.6 → 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/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';
@@ -310,6 +310,14 @@ var InputGroupContext = createContext(null);
310
310
  var useInputGroupContext = () => useContext(InputGroupContext);
311
311
  var ShellFocusContext = createContext(null);
312
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
+ };
313
321
  var Label = ({ children, isRequired, isInvalid, className }) => {
314
322
  return /* @__PURE__ */ jsxs(View, { className: cx(inputStyles.labelRow, className), children: [
315
323
  /* @__PURE__ */ jsx(Text, { className: inputStyles.label, children }),
@@ -428,7 +436,11 @@ var InputBase = ({
428
436
  onBlur: handleBlur,
429
437
  onSubmitEditing,
430
438
  blurOnSubmit: onSubmitEditing ? false : void 0,
431
- style: { includeFontPadding: false, paddingVertical: 0 },
439
+ style: {
440
+ includeFontPadding: false,
441
+ paddingVertical: 0,
442
+ ...androidInputPad(size, hasLeadingIcon, hasTrailingIcon)
443
+ },
432
444
  className: cx(
433
445
  inputStyles.input,
434
446
  groupInputPad ?? sizeStyles.input,