@avenue-ticketing/native 0.1.6 → 0.1.8
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/button.js +7 -7
- package/dist/button.js.map +1 -1
- package/dist/combobox.js +1 -1
- package/dist/combobox.js.map +1 -1
- package/dist/date-picker.js +7 -7
- package/dist/date-picker.js.map +1 -1
- package/dist/input.js +21 -9
- package/dist/input.js.map +1 -1
- package/dist/multi-select.js +7 -7
- 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/theme-dark.css +6 -0
- package/theme.css +3 -0
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: {
|
|
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,
|
|
@@ -6484,12 +6496,12 @@ var buttonStyles = sortCx({
|
|
|
6484
6496
|
},
|
|
6485
6497
|
colors: {
|
|
6486
6498
|
primary: {
|
|
6487
|
-
root: "bg-primary
|
|
6488
|
-
label: "text-
|
|
6489
|
-
/** Web `*:data-icon:not([data-icon=loading]):text-
|
|
6490
|
-
icon: "text-
|
|
6491
|
-
/** Loading icon inherits
|
|
6492
|
-
spinner: "text-
|
|
6499
|
+
root: "bg-button-primary",
|
|
6500
|
+
label: "text-button-primary",
|
|
6501
|
+
/** Web `*:data-icon:not([data-icon=loading]):text-button-primary/70` */
|
|
6502
|
+
icon: "text-button-primary/70",
|
|
6503
|
+
/** Loading icon inherits the primary label color. */
|
|
6504
|
+
spinner: "text-button-primary"
|
|
6493
6505
|
},
|
|
6494
6506
|
brand: {
|
|
6495
6507
|
root: "bg-brand-solid",
|
|
@@ -6573,7 +6585,7 @@ var nativeButtonInteraction = sortCx({
|
|
|
6573
6585
|
topHighlight: "absolute left-px right-px top-px h-px bg-[rgba(255,255,255,0.12)]",
|
|
6574
6586
|
secondaryBottom: "absolute inset-x-0 bottom-0 h-px bg-[rgba(0,0,0,0.05)]",
|
|
6575
6587
|
colors: {
|
|
6576
|
-
primary: "active:bg-
|
|
6588
|
+
primary: "active:bg-button-primary_hover",
|
|
6577
6589
|
brand: "active:bg-brand-solid_hover",
|
|
6578
6590
|
secondary: "active:bg-primary_hover",
|
|
6579
6591
|
tertiary: "active:bg-primary_hover",
|