@mgcrea/react-native-tailwind 0.7.0 → 0.8.0
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/README.md +2 -1
- package/dist/babel/index.cjs +333 -195
- package/dist/babel/index.d.ts +4 -40
- package/dist/babel/index.test.ts +214 -1
- package/dist/babel/index.ts +4 -1169
- package/dist/babel/plugin.d.ts +42 -0
- package/{src/babel/index.test.ts → dist/babel/plugin.test.ts} +216 -2
- package/dist/babel/plugin.ts +491 -0
- package/dist/babel/utils/attributeMatchers.d.ts +23 -0
- package/dist/babel/utils/attributeMatchers.ts +71 -0
- package/dist/babel/utils/componentSupport.d.ts +18 -0
- package/dist/babel/utils/componentSupport.ts +68 -0
- package/dist/babel/utils/dynamicProcessing.d.ts +32 -0
- package/dist/babel/utils/dynamicProcessing.ts +223 -0
- package/dist/babel/utils/modifierProcessing.d.ts +26 -0
- package/dist/babel/utils/modifierProcessing.ts +118 -0
- package/dist/babel/utils/styleInjection.d.ts +15 -0
- package/dist/babel/utils/styleInjection.ts +80 -0
- package/dist/babel/utils/styleTransforms.d.ts +39 -0
- package/dist/babel/utils/styleTransforms.test.ts +349 -0
- package/dist/babel/utils/styleTransforms.ts +258 -0
- package/dist/babel/utils/twProcessing.d.ts +28 -0
- package/dist/babel/utils/twProcessing.ts +124 -0
- package/dist/components/TextInput.d.ts +171 -14
- package/dist/config/tailwind.d.ts +302 -0
- package/dist/config/tailwind.js +1 -0
- package/dist/index.d.ts +5 -4
- package/dist/index.js +1 -1
- package/dist/parser/colors.js +1 -1
- package/dist/parser/index.d.ts +1 -0
- package/dist/parser/index.js +1 -1
- package/dist/parser/modifiers.d.ts +2 -2
- package/dist/parser/modifiers.js +1 -1
- package/dist/parser/placeholder.d.ts +36 -0
- package/dist/parser/placeholder.js +1 -0
- package/dist/parser/placeholder.test.js +1 -0
- package/dist/parser/typography.d.ts +1 -0
- package/dist/parser/typography.js +1 -1
- package/dist/parser/typography.test.js +1 -1
- package/dist/runtime.cjs +1 -1
- package/dist/runtime.cjs.map +4 -4
- package/dist/runtime.d.ts +1 -14
- package/dist/runtime.js +1 -1
- package/dist/runtime.js.map +4 -4
- package/dist/stubs/tw.d.ts +1 -14
- package/dist/types/core.d.ts +40 -0
- package/dist/types/core.js +0 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +1 -0
- package/dist/types/runtime.d.ts +15 -0
- package/dist/types/runtime.js +1 -0
- package/dist/types/util.d.ts +3 -0
- package/dist/types/util.js +0 -0
- package/package.json +1 -1
- package/src/babel/index.ts +4 -1169
- package/src/babel/plugin.test.ts +482 -0
- package/src/babel/plugin.ts +491 -0
- package/src/babel/utils/attributeMatchers.ts +71 -0
- package/src/babel/utils/componentSupport.ts +68 -0
- package/src/babel/utils/dynamicProcessing.ts +223 -0
- package/src/babel/utils/modifierProcessing.ts +118 -0
- package/src/babel/utils/styleInjection.ts +80 -0
- package/src/babel/utils/styleTransforms.test.ts +349 -0
- package/src/babel/utils/styleTransforms.ts +258 -0
- package/src/babel/utils/twProcessing.ts +124 -0
- package/src/components/TextInput.tsx +17 -14
- package/src/config/{palettes.ts → tailwind.ts} +2 -2
- package/src/index.ts +6 -3
- package/src/parser/colors.ts +2 -2
- package/src/parser/index.ts +1 -0
- package/src/parser/modifiers.ts +10 -4
- package/src/parser/placeholder.test.ts +105 -0
- package/src/parser/placeholder.ts +78 -0
- package/src/parser/typography.test.ts +11 -0
- package/src/parser/typography.ts +20 -2
- package/src/runtime.ts +1 -16
- package/src/stubs/tw.ts +1 -16
- package/src/{types.ts → types/core.ts} +0 -4
- package/src/types/index.ts +2 -0
- package/src/types/runtime.ts +17 -0
- package/src/types/util.ts +1 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility functions for processing tw`...` and twStyle() calls
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { NodePath } from "@babel/core";
|
|
6
|
+
import type * as BabelTypes from "@babel/types";
|
|
7
|
+
import type { ModifierType, ParsedModifier } from "../../parser/index.js";
|
|
8
|
+
import type { StyleObject } from "../../types/core.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Plugin state interface (subset needed for tw processing)
|
|
12
|
+
*/
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
|
14
|
+
export interface TwProcessingState {
|
|
15
|
+
styleRegistry: Map<string, StyleObject>;
|
|
16
|
+
customColors: Record<string, string>;
|
|
17
|
+
stylesIdentifier: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Process tw`...` or twStyle('...') call and replace with TwStyle object
|
|
22
|
+
* Generates: { style: styles._base, activeStyle: styles._active, ... }
|
|
23
|
+
*/
|
|
24
|
+
export function processTwCall(
|
|
25
|
+
className: string,
|
|
26
|
+
path: NodePath,
|
|
27
|
+
state: TwProcessingState,
|
|
28
|
+
parseClassName: (className: string, customColors: Record<string, string>) => StyleObject,
|
|
29
|
+
generateStyleKey: (className: string) => string,
|
|
30
|
+
splitModifierClasses: (className: string) => { baseClasses: string[]; modifierClasses: ParsedModifier[] },
|
|
31
|
+
t: typeof BabelTypes,
|
|
32
|
+
): void {
|
|
33
|
+
const { baseClasses, modifierClasses } = splitModifierClasses(className);
|
|
34
|
+
|
|
35
|
+
// Build TwStyle object properties
|
|
36
|
+
const objectProperties: BabelTypes.ObjectProperty[] = [];
|
|
37
|
+
|
|
38
|
+
// Parse and add base styles
|
|
39
|
+
if (baseClasses.length > 0) {
|
|
40
|
+
const baseClassName = baseClasses.join(" ");
|
|
41
|
+
const baseStyleObject = parseClassName(baseClassName, state.customColors);
|
|
42
|
+
const baseStyleKey = generateStyleKey(baseClassName);
|
|
43
|
+
state.styleRegistry.set(baseStyleKey, baseStyleObject);
|
|
44
|
+
|
|
45
|
+
objectProperties.push(
|
|
46
|
+
t.objectProperty(
|
|
47
|
+
t.identifier("style"),
|
|
48
|
+
t.memberExpression(t.identifier(state.stylesIdentifier), t.identifier(baseStyleKey)),
|
|
49
|
+
),
|
|
50
|
+
);
|
|
51
|
+
} else {
|
|
52
|
+
// No base classes - add empty style object
|
|
53
|
+
objectProperties.push(t.objectProperty(t.identifier("style"), t.objectExpression([])));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Group modifiers by type
|
|
57
|
+
const modifiersByType = new Map<ModifierType, ParsedModifier[]>();
|
|
58
|
+
for (const mod of modifierClasses) {
|
|
59
|
+
if (!modifiersByType.has(mod.modifier)) {
|
|
60
|
+
modifiersByType.set(mod.modifier, []);
|
|
61
|
+
}
|
|
62
|
+
const modGroup = modifiersByType.get(mod.modifier);
|
|
63
|
+
if (modGroup) {
|
|
64
|
+
modGroup.push(mod);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Add modifier styles
|
|
69
|
+
for (const [modifierType, modifiers] of modifiersByType) {
|
|
70
|
+
const modifierClassNames = modifiers.map((m) => m.baseClass).join(" ");
|
|
71
|
+
const modifierStyleObject = parseClassName(modifierClassNames, state.customColors);
|
|
72
|
+
const modifierStyleKey = generateStyleKey(`${modifierType}_${modifierClassNames}`);
|
|
73
|
+
state.styleRegistry.set(modifierStyleKey, modifierStyleObject);
|
|
74
|
+
|
|
75
|
+
// Map modifier type to property name: active -> activeStyle
|
|
76
|
+
const propertyName = `${modifierType}Style`;
|
|
77
|
+
|
|
78
|
+
objectProperties.push(
|
|
79
|
+
t.objectProperty(
|
|
80
|
+
t.identifier(propertyName),
|
|
81
|
+
t.memberExpression(t.identifier(state.stylesIdentifier), t.identifier(modifierStyleKey)),
|
|
82
|
+
),
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Replace the tw`...` or twStyle('...') with the object
|
|
87
|
+
const twStyleObject = t.objectExpression(objectProperties);
|
|
88
|
+
path.replaceWith(twStyleObject);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Remove tw/twStyle imports from @mgcrea/react-native-tailwind
|
|
93
|
+
* This is called after all tw calls have been transformed
|
|
94
|
+
*/
|
|
95
|
+
export function removeTwImports(path: NodePath<BabelTypes.Program>, t: typeof BabelTypes): void {
|
|
96
|
+
// Traverse the program to find and remove tw/twStyle imports
|
|
97
|
+
path.traverse({
|
|
98
|
+
ImportDeclaration(importPath) {
|
|
99
|
+
const node = importPath.node;
|
|
100
|
+
|
|
101
|
+
// Only process imports from main package
|
|
102
|
+
if (node.source.value !== "@mgcrea/react-native-tailwind") {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Filter out tw/twStyle specifiers
|
|
107
|
+
const remainingSpecifiers = node.specifiers.filter((spec) => {
|
|
108
|
+
if (t.isImportSpecifier(spec) && t.isIdentifier(spec.imported)) {
|
|
109
|
+
const importedName = spec.imported.name;
|
|
110
|
+
return importedName !== "tw" && importedName !== "twStyle";
|
|
111
|
+
}
|
|
112
|
+
return true;
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
if (remainingSpecifiers.length === 0) {
|
|
116
|
+
// Remove entire import if no specifiers remain
|
|
117
|
+
importPath.remove();
|
|
118
|
+
} else if (remainingSpecifiers.length < node.specifiers.length) {
|
|
119
|
+
// Update import with remaining specifiers
|
|
120
|
+
node.specifiers = remainingSpecifiers;
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
});
|
|
124
|
+
}
|
|
@@ -14,8 +14,9 @@
|
|
|
14
14
|
* />
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
|
-
import { TextInput as RNTextInput, type TextInputProps as RNTextInputProps } from "react-native";
|
|
18
|
-
|
|
17
|
+
import { type BlurEvent, type FocusEvent, TextInput as RNTextInput, type TextInputProps as RNTextInputProps } from "react-native";
|
|
18
|
+
import { type Simplify } from "../types/util";
|
|
19
|
+
export type TextInputProps = Simplify<Omit<RNTextInputProps, "style"> & {
|
|
19
20
|
/**
|
|
20
21
|
* Style can be a static style object/array or a function that receives focus and disabled state
|
|
21
22
|
*/
|
|
@@ -29,7 +30,7 @@ export type TextInputProps = Omit<RNTextInputProps, "style"> & {
|
|
|
29
30
|
* When true, sets editable to false
|
|
30
31
|
*/
|
|
31
32
|
disabled?: boolean;
|
|
32
|
-
}
|
|
33
|
+
}>;
|
|
33
34
|
/**
|
|
34
35
|
* Enhanced TextInput with focus and disabled state support
|
|
35
36
|
*
|
|
@@ -41,18 +42,174 @@ export type TextInputProps = Omit<RNTextInputProps, "style"> & {
|
|
|
41
42
|
* - `editable={false}` - React Native's native prop
|
|
42
43
|
* If both are provided, `disabled` takes precedence.
|
|
43
44
|
*/
|
|
44
|
-
export declare const TextInput: import("react").ForwardRefExoticComponent<
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
export declare const TextInput: import("react").ForwardRefExoticComponent<{
|
|
46
|
+
value?: string | undefined | undefined;
|
|
47
|
+
textAlign?: "left" | "center" | "right" | undefined | undefined;
|
|
48
|
+
placeholder?: string | undefined | undefined;
|
|
49
|
+
children?: import("react").ReactNode;
|
|
50
|
+
hitSlop?: number | import("react-native").Insets | null | undefined;
|
|
51
|
+
id?: string | undefined | undefined;
|
|
52
|
+
needsOffscreenAlphaCompositing?: boolean | undefined | undefined;
|
|
53
|
+
onLayout?: ((event: import("react-native").LayoutChangeEvent) => void) | undefined | undefined;
|
|
54
|
+
pointerEvents?: "box-none" | "none" | "box-only" | "auto" | undefined | undefined;
|
|
55
|
+
removeClippedSubviews?: boolean | undefined | undefined;
|
|
56
|
+
testID?: string | undefined | undefined;
|
|
57
|
+
nativeID?: string | undefined | undefined;
|
|
58
|
+
collapsable?: boolean | undefined | undefined;
|
|
59
|
+
collapsableChildren?: boolean | undefined | undefined;
|
|
60
|
+
className?: string | undefined;
|
|
61
|
+
onBlur?: ((e: BlurEvent) => void) | undefined | undefined;
|
|
62
|
+
onFocus?: ((e: FocusEvent) => void) | undefined | undefined;
|
|
63
|
+
renderToHardwareTextureAndroid?: boolean | undefined | undefined;
|
|
64
|
+
focusable?: boolean | undefined | undefined;
|
|
65
|
+
tabIndex?: 0 | -1 | undefined | undefined;
|
|
66
|
+
shouldRasterizeIOS?: boolean | undefined | undefined;
|
|
67
|
+
isTVSelectable?: boolean | undefined | undefined;
|
|
68
|
+
hasTVPreferredFocus?: boolean | undefined | undefined;
|
|
69
|
+
tvParallaxShiftDistanceX?: number | undefined | undefined;
|
|
70
|
+
tvParallaxShiftDistanceY?: number | undefined | undefined;
|
|
71
|
+
tvParallaxTiltAngle?: number | undefined | undefined;
|
|
72
|
+
tvParallaxMagnification?: number | undefined | undefined;
|
|
73
|
+
onStartShouldSetResponder?: ((event: import("react-native").GestureResponderEvent) => boolean) | undefined | undefined;
|
|
74
|
+
onMoveShouldSetResponder?: ((event: import("react-native").GestureResponderEvent) => boolean) | undefined | undefined;
|
|
75
|
+
onResponderEnd?: ((event: import("react-native").GestureResponderEvent) => void) | undefined | undefined;
|
|
76
|
+
onResponderGrant?: ((event: import("react-native").GestureResponderEvent) => void) | undefined | undefined;
|
|
77
|
+
onResponderReject?: ((event: import("react-native").GestureResponderEvent) => void) | undefined | undefined;
|
|
78
|
+
onResponderMove?: ((event: import("react-native").GestureResponderEvent) => void) | undefined | undefined;
|
|
79
|
+
onResponderRelease?: ((event: import("react-native").GestureResponderEvent) => void) | undefined | undefined;
|
|
80
|
+
onResponderStart?: ((event: import("react-native").GestureResponderEvent) => void) | undefined | undefined;
|
|
81
|
+
onResponderTerminationRequest?: ((event: import("react-native").GestureResponderEvent) => boolean) | undefined | undefined;
|
|
82
|
+
onResponderTerminate?: ((event: import("react-native").GestureResponderEvent) => void) | undefined | undefined;
|
|
83
|
+
onStartShouldSetResponderCapture?: ((event: import("react-native").GestureResponderEvent) => boolean) | undefined | undefined;
|
|
84
|
+
onMoveShouldSetResponderCapture?: ((event: import("react-native").GestureResponderEvent) => boolean) | undefined | undefined;
|
|
85
|
+
onTouchStart?: ((event: import("react-native").GestureResponderEvent) => void) | undefined | undefined;
|
|
86
|
+
onTouchMove?: ((event: import("react-native").GestureResponderEvent) => void) | undefined | undefined;
|
|
87
|
+
onTouchEnd?: ((event: import("react-native").GestureResponderEvent) => void) | undefined | undefined;
|
|
88
|
+
onTouchCancel?: ((event: import("react-native").GestureResponderEvent) => void) | undefined | undefined;
|
|
89
|
+
onTouchEndCapture?: ((event: import("react-native").GestureResponderEvent) => void) | undefined | undefined;
|
|
90
|
+
onPointerEnter?: ((event: import("react-native").PointerEvent) => void) | undefined | undefined;
|
|
91
|
+
onPointerEnterCapture?: ((event: import("react-native").PointerEvent) => void) | undefined | undefined;
|
|
92
|
+
onPointerLeave?: ((event: import("react-native").PointerEvent) => void) | undefined | undefined;
|
|
93
|
+
onPointerLeaveCapture?: ((event: import("react-native").PointerEvent) => void) | undefined | undefined;
|
|
94
|
+
onPointerMove?: ((event: import("react-native").PointerEvent) => void) | undefined | undefined;
|
|
95
|
+
onPointerMoveCapture?: ((event: import("react-native").PointerEvent) => void) | undefined | undefined;
|
|
96
|
+
onPointerCancel?: ((event: import("react-native").PointerEvent) => void) | undefined | undefined;
|
|
97
|
+
onPointerCancelCapture?: ((event: import("react-native").PointerEvent) => void) | undefined | undefined;
|
|
98
|
+
onPointerDown?: ((event: import("react-native").PointerEvent) => void) | undefined | undefined;
|
|
99
|
+
onPointerDownCapture?: ((event: import("react-native").PointerEvent) => void) | undefined | undefined;
|
|
100
|
+
onPointerUp?: ((event: import("react-native").PointerEvent) => void) | undefined | undefined;
|
|
101
|
+
onPointerUpCapture?: ((event: import("react-native").PointerEvent) => void) | undefined | undefined;
|
|
102
|
+
accessible?: boolean | undefined | undefined;
|
|
103
|
+
accessibilityActions?: readonly Readonly<{
|
|
104
|
+
name: import("react-native").AccessibilityActionName | string;
|
|
105
|
+
label?: string | undefined;
|
|
106
|
+
}>[] | undefined;
|
|
107
|
+
accessibilityLabel?: string | undefined | undefined;
|
|
108
|
+
'aria-label'?: string | undefined | undefined;
|
|
109
|
+
accessibilityRole?: import("react-native").AccessibilityRole | undefined;
|
|
110
|
+
accessibilityState?: import("react-native").AccessibilityState | undefined;
|
|
111
|
+
'aria-busy'?: boolean | undefined | undefined;
|
|
112
|
+
'aria-checked'?: boolean | "mixed" | undefined | undefined;
|
|
113
|
+
'aria-disabled'?: boolean | undefined | undefined;
|
|
114
|
+
'aria-expanded'?: boolean | undefined | undefined;
|
|
115
|
+
'aria-selected'?: boolean | undefined | undefined;
|
|
116
|
+
accessibilityHint?: string | undefined | undefined;
|
|
117
|
+
accessibilityValue?: import("react-native").AccessibilityValue | undefined;
|
|
118
|
+
'aria-valuemax'?: number | undefined;
|
|
119
|
+
'aria-valuemin'?: number | undefined;
|
|
120
|
+
'aria-valuenow'?: number | undefined;
|
|
121
|
+
'aria-valuetext'?: string | undefined;
|
|
122
|
+
onAccessibilityAction?: ((event: import("react-native").AccessibilityActionEvent) => void) | undefined | undefined;
|
|
123
|
+
importantForAccessibility?: ("auto" | "yes" | "no" | "no-hide-descendants") | undefined | undefined;
|
|
124
|
+
'aria-hidden'?: boolean | undefined | undefined;
|
|
125
|
+
'aria-modal'?: boolean | undefined | undefined;
|
|
126
|
+
role?: import("react-native").Role | undefined;
|
|
127
|
+
accessibilityLabelledBy?: string | string[] | undefined | undefined;
|
|
128
|
+
'aria-labelledby'?: string | undefined | undefined;
|
|
129
|
+
accessibilityLiveRegion?: "none" | "polite" | "assertive" | undefined | undefined;
|
|
130
|
+
'aria-live'?: ("polite" | "assertive" | "off") | undefined | undefined;
|
|
131
|
+
screenReaderFocusable?: boolean | undefined | undefined;
|
|
132
|
+
accessibilityElementsHidden?: boolean | undefined | undefined;
|
|
133
|
+
accessibilityViewIsModal?: boolean | undefined | undefined;
|
|
134
|
+
onAccessibilityEscape?: (() => void) | undefined | undefined;
|
|
135
|
+
onAccessibilityTap?: (() => void) | undefined | undefined;
|
|
136
|
+
onMagicTap?: (() => void) | undefined | undefined;
|
|
137
|
+
accessibilityIgnoresInvertColors?: boolean | undefined | undefined;
|
|
138
|
+
accessibilityLanguage?: string | undefined | undefined;
|
|
139
|
+
accessibilityShowsLargeContentViewer?: boolean | undefined | undefined;
|
|
140
|
+
accessibilityLargeContentTitle?: string | undefined | undefined;
|
|
141
|
+
accessibilityRespondsToUserInteraction?: boolean | undefined | undefined;
|
|
142
|
+
onPress?: ((e: import("react-native").NativeSyntheticEvent<import("react-native").NativeTouchEvent>) => void) | undefined | undefined;
|
|
143
|
+
onPressIn?: ((e: import("react-native").NativeSyntheticEvent<import("react-native").NativeTouchEvent>) => void) | undefined | undefined;
|
|
144
|
+
onPressOut?: ((e: import("react-native").NativeSyntheticEvent<import("react-native").NativeTouchEvent>) => void) | undefined | undefined;
|
|
145
|
+
allowFontScaling?: boolean | undefined | undefined;
|
|
146
|
+
autoCapitalize?: "none" | "sentences" | "words" | "characters" | undefined | undefined;
|
|
147
|
+
autoComplete?: "additional-name" | "address-line1" | "address-line2" | "birthdate-day" | "birthdate-full" | "birthdate-month" | "birthdate-year" | "cc-csc" | "cc-exp" | "cc-exp-day" | "cc-exp-month" | "cc-exp-year" | "cc-number" | "cc-name" | "cc-given-name" | "cc-middle-name" | "cc-family-name" | "cc-type" | "country" | "current-password" | "email" | "family-name" | "gender" | "given-name" | "honorific-prefix" | "honorific-suffix" | "name" | "name-family" | "name-given" | "name-middle" | "name-middle-initial" | "name-prefix" | "name-suffix" | "new-password" | "nickname" | "one-time-code" | "organization" | "organization-title" | "password" | "password-new" | "postal-address" | "postal-address-country" | "postal-address-extended" | "postal-address-extended-postal-code" | "postal-address-locality" | "postal-address-region" | "postal-code" | "street-address" | "sms-otp" | "tel" | "tel-country-code" | "tel-national" | "tel-device" | "url" | "username" | "username-new" | "off" | undefined | undefined;
|
|
148
|
+
autoCorrect?: boolean | undefined | undefined;
|
|
149
|
+
autoFocus?: boolean | undefined | undefined;
|
|
150
|
+
blurOnSubmit?: boolean | undefined | undefined;
|
|
151
|
+
submitBehavior?: import("react-native").SubmitBehavior | undefined;
|
|
152
|
+
caretHidden?: boolean | undefined | undefined;
|
|
153
|
+
contextMenuHidden?: boolean | undefined | undefined;
|
|
154
|
+
defaultValue?: string | undefined | undefined;
|
|
155
|
+
editable?: boolean | undefined | undefined;
|
|
156
|
+
keyboardType?: import("react-native").KeyboardTypeOptions | undefined;
|
|
157
|
+
inputMode?: import("react-native").InputModeOptions | undefined;
|
|
158
|
+
maxLength?: number | undefined | undefined;
|
|
159
|
+
multiline?: boolean | undefined | undefined;
|
|
160
|
+
onChange?: ((e: import("react-native").TextInputChangeEvent) => void) | undefined | undefined;
|
|
161
|
+
onChangeText?: ((text: string) => void) | undefined | undefined;
|
|
162
|
+
onContentSizeChange?: ((e: import("react-native").TextInputContentSizeChangeEvent) => void) | undefined | undefined;
|
|
163
|
+
onEndEditing?: ((e: import("react-native").TextInputEndEditingEvent) => void) | undefined | undefined;
|
|
164
|
+
onSelectionChange?: ((e: import("react-native").TextInputSelectionChangeEvent) => void) | undefined | undefined;
|
|
165
|
+
onSubmitEditing?: ((e: import("react-native").TextInputSubmitEditingEvent) => void) | undefined | undefined;
|
|
166
|
+
onScroll?: ((e: import("react-native").TextInputScrollEvent) => void) | undefined | undefined;
|
|
167
|
+
onKeyPress?: ((e: import("react-native").TextInputKeyPressEvent) => void) | undefined | undefined;
|
|
168
|
+
placeholderTextColor?: import("react-native").ColorValue | undefined;
|
|
169
|
+
readOnly?: boolean | undefined | undefined;
|
|
170
|
+
returnKeyType?: import("react-native").ReturnKeyTypeOptions | undefined;
|
|
171
|
+
enterKeyHint?: import("react-native").EnterKeyHintTypeOptions | undefined;
|
|
172
|
+
secureTextEntry?: boolean | undefined | undefined;
|
|
173
|
+
selectTextOnFocus?: boolean | undefined | undefined;
|
|
174
|
+
selection?: {
|
|
175
|
+
start: number;
|
|
176
|
+
end?: number | undefined;
|
|
177
|
+
} | undefined | undefined;
|
|
178
|
+
selectionColor?: import("react-native").ColorValue | undefined;
|
|
179
|
+
inputAccessoryViewID?: string | undefined | undefined;
|
|
180
|
+
inputAccessoryViewButtonLabel?: string | undefined | undefined;
|
|
181
|
+
maxFontSizeMultiplier?: number | null | undefined | undefined;
|
|
182
|
+
disableKeyboardShortcuts?: boolean | undefined | undefined;
|
|
183
|
+
clearButtonMode?: "never" | "while-editing" | "unless-editing" | "always" | undefined | undefined;
|
|
184
|
+
clearTextOnFocus?: boolean | undefined | undefined;
|
|
185
|
+
dataDetectorTypes?: import("react-native").DataDetectorTypes | import("react-native").DataDetectorTypes[] | undefined;
|
|
186
|
+
enablesReturnKeyAutomatically?: boolean | undefined | undefined;
|
|
187
|
+
keyboardAppearance?: "default" | "light" | "dark" | undefined | undefined;
|
|
188
|
+
passwordRules?: string | null | undefined | undefined;
|
|
189
|
+
rejectResponderTermination?: boolean | null | undefined | undefined;
|
|
190
|
+
selectionState?: import("react-native").DocumentSelectionState | undefined;
|
|
191
|
+
spellCheck?: boolean | undefined | undefined;
|
|
192
|
+
textContentType?: "none" | "URL" | "addressCity" | "addressCityAndState" | "addressState" | "countryName" | "creditCardNumber" | "creditCardExpiration" | "creditCardExpirationMonth" | "creditCardExpirationYear" | "creditCardSecurityCode" | "creditCardType" | "creditCardName" | "creditCardGivenName" | "creditCardMiddleName" | "creditCardFamilyName" | "emailAddress" | "familyName" | "fullStreetAddress" | "givenName" | "jobTitle" | "location" | "middleName" | "name" | "namePrefix" | "nameSuffix" | "nickname" | "organizationName" | "postalCode" | "streetAddressLine1" | "streetAddressLine2" | "sublocality" | "telephoneNumber" | "username" | "password" | "newPassword" | "oneTimeCode" | "birthdate" | "birthdateDay" | "birthdateMonth" | "birthdateYear" | "cellularEID" | "cellularIMEI" | "dateTime" | "flightNumber" | "shipmentTrackingNumber" | undefined | undefined;
|
|
193
|
+
scrollEnabled?: boolean | undefined | undefined;
|
|
194
|
+
lineBreakStrategyIOS?: "none" | "standard" | "hangul-word" | "push-out" | undefined | undefined;
|
|
195
|
+
lineBreakModeIOS?: "wordWrapping" | "char" | "clip" | "head" | "middle" | "tail" | undefined | undefined;
|
|
196
|
+
smartInsertDelete?: boolean | undefined | undefined;
|
|
197
|
+
cursorColor?: import("react-native").ColorValue | null | undefined;
|
|
198
|
+
selectionHandleColor?: import("react-native").ColorValue | null | undefined;
|
|
199
|
+
importantForAutofill?: "auto" | "no" | "noExcludeDescendants" | "yes" | "yesExcludeDescendants" | undefined | undefined;
|
|
200
|
+
disableFullscreenUI?: boolean | undefined | undefined;
|
|
201
|
+
inlineImageLeft?: string | undefined | undefined;
|
|
202
|
+
inlineImagePadding?: number | undefined | undefined;
|
|
203
|
+
numberOfLines?: number | undefined | undefined;
|
|
204
|
+
returnKeyLabel?: string | undefined | undefined;
|
|
205
|
+
textBreakStrategy?: "simple" | "highQuality" | "balanced" | undefined | undefined;
|
|
206
|
+
underlineColorAndroid?: import("react-native").ColorValue | undefined;
|
|
207
|
+
textAlignVertical?: "auto" | "top" | "bottom" | "center" | undefined | undefined;
|
|
208
|
+
showSoftInputOnFocus?: boolean | undefined | undefined;
|
|
209
|
+
verticalAlign?: "auto" | "top" | "bottom" | "middle" | undefined | undefined;
|
|
210
|
+
style?: import("react-native").StyleProp<import("react-native").TextStyle> | ((state: {
|
|
49
211
|
focused: boolean;
|
|
50
212
|
disabled: boolean;
|
|
51
213
|
}) => RNTextInputProps["style"]);
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Convenience prop for disabled state (overrides editable if provided)
|
|
55
|
-
* When true, sets editable to false
|
|
56
|
-
*/
|
|
57
|
-
disabled?: boolean;
|
|
214
|
+
disabled?: boolean | undefined;
|
|
58
215
|
} & import("react").RefAttributes<RNTextInput>>;
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
export type TailwindPalette = {
|
|
2
|
+
"50": string;
|
|
3
|
+
"100": string;
|
|
4
|
+
"200": string;
|
|
5
|
+
"300": string;
|
|
6
|
+
"400": string;
|
|
7
|
+
"500": string;
|
|
8
|
+
"600": string;
|
|
9
|
+
"700": string;
|
|
10
|
+
"800": string;
|
|
11
|
+
"900": string;
|
|
12
|
+
"950": string;
|
|
13
|
+
};
|
|
14
|
+
export declare const TAILWIND_COLORS: {
|
|
15
|
+
red: {
|
|
16
|
+
"50": string;
|
|
17
|
+
"100": string;
|
|
18
|
+
"200": string;
|
|
19
|
+
"300": string;
|
|
20
|
+
"400": string;
|
|
21
|
+
"500": string;
|
|
22
|
+
"600": string;
|
|
23
|
+
"700": string;
|
|
24
|
+
"800": string;
|
|
25
|
+
"900": string;
|
|
26
|
+
"950": string;
|
|
27
|
+
};
|
|
28
|
+
orange: {
|
|
29
|
+
"50": string;
|
|
30
|
+
"100": string;
|
|
31
|
+
"200": string;
|
|
32
|
+
"300": string;
|
|
33
|
+
"400": string;
|
|
34
|
+
"500": string;
|
|
35
|
+
"600": string;
|
|
36
|
+
"700": string;
|
|
37
|
+
"800": string;
|
|
38
|
+
"900": string;
|
|
39
|
+
"950": string;
|
|
40
|
+
};
|
|
41
|
+
amber: {
|
|
42
|
+
"50": string;
|
|
43
|
+
"100": string;
|
|
44
|
+
"200": string;
|
|
45
|
+
"300": string;
|
|
46
|
+
"400": string;
|
|
47
|
+
"500": string;
|
|
48
|
+
"600": string;
|
|
49
|
+
"700": string;
|
|
50
|
+
"800": string;
|
|
51
|
+
"900": string;
|
|
52
|
+
"950": string;
|
|
53
|
+
};
|
|
54
|
+
yellow: {
|
|
55
|
+
"50": string;
|
|
56
|
+
"100": string;
|
|
57
|
+
"200": string;
|
|
58
|
+
"300": string;
|
|
59
|
+
"400": string;
|
|
60
|
+
"500": string;
|
|
61
|
+
"600": string;
|
|
62
|
+
"700": string;
|
|
63
|
+
"800": string;
|
|
64
|
+
"900": string;
|
|
65
|
+
"950": string;
|
|
66
|
+
};
|
|
67
|
+
lime: {
|
|
68
|
+
"50": string;
|
|
69
|
+
"100": string;
|
|
70
|
+
"200": string;
|
|
71
|
+
"300": string;
|
|
72
|
+
"400": string;
|
|
73
|
+
"500": string;
|
|
74
|
+
"600": string;
|
|
75
|
+
"700": string;
|
|
76
|
+
"800": string;
|
|
77
|
+
"900": string;
|
|
78
|
+
"950": string;
|
|
79
|
+
};
|
|
80
|
+
green: {
|
|
81
|
+
"50": string;
|
|
82
|
+
"100": string;
|
|
83
|
+
"200": string;
|
|
84
|
+
"300": string;
|
|
85
|
+
"400": string;
|
|
86
|
+
"500": string;
|
|
87
|
+
"600": string;
|
|
88
|
+
"700": string;
|
|
89
|
+
"800": string;
|
|
90
|
+
"900": string;
|
|
91
|
+
"950": string;
|
|
92
|
+
};
|
|
93
|
+
emerald: {
|
|
94
|
+
"50": string;
|
|
95
|
+
"100": string;
|
|
96
|
+
"200": string;
|
|
97
|
+
"300": string;
|
|
98
|
+
"400": string;
|
|
99
|
+
"500": string;
|
|
100
|
+
"600": string;
|
|
101
|
+
"700": string;
|
|
102
|
+
"800": string;
|
|
103
|
+
"900": string;
|
|
104
|
+
"950": string;
|
|
105
|
+
};
|
|
106
|
+
teal: {
|
|
107
|
+
"50": string;
|
|
108
|
+
"100": string;
|
|
109
|
+
"200": string;
|
|
110
|
+
"300": string;
|
|
111
|
+
"400": string;
|
|
112
|
+
"500": string;
|
|
113
|
+
"600": string;
|
|
114
|
+
"700": string;
|
|
115
|
+
"800": string;
|
|
116
|
+
"900": string;
|
|
117
|
+
"950": string;
|
|
118
|
+
};
|
|
119
|
+
cyan: {
|
|
120
|
+
"50": string;
|
|
121
|
+
"100": string;
|
|
122
|
+
"200": string;
|
|
123
|
+
"300": string;
|
|
124
|
+
"400": string;
|
|
125
|
+
"500": string;
|
|
126
|
+
"600": string;
|
|
127
|
+
"700": string;
|
|
128
|
+
"800": string;
|
|
129
|
+
"900": string;
|
|
130
|
+
"950": string;
|
|
131
|
+
};
|
|
132
|
+
sky: {
|
|
133
|
+
"50": string;
|
|
134
|
+
"100": string;
|
|
135
|
+
"200": string;
|
|
136
|
+
"300": string;
|
|
137
|
+
"400": string;
|
|
138
|
+
"500": string;
|
|
139
|
+
"600": string;
|
|
140
|
+
"700": string;
|
|
141
|
+
"800": string;
|
|
142
|
+
"900": string;
|
|
143
|
+
"950": string;
|
|
144
|
+
};
|
|
145
|
+
blue: {
|
|
146
|
+
"50": string;
|
|
147
|
+
"100": string;
|
|
148
|
+
"200": string;
|
|
149
|
+
"300": string;
|
|
150
|
+
"400": string;
|
|
151
|
+
"500": string;
|
|
152
|
+
"600": string;
|
|
153
|
+
"700": string;
|
|
154
|
+
"800": string;
|
|
155
|
+
"900": string;
|
|
156
|
+
"950": string;
|
|
157
|
+
};
|
|
158
|
+
indigo: {
|
|
159
|
+
"50": string;
|
|
160
|
+
"100": string;
|
|
161
|
+
"200": string;
|
|
162
|
+
"300": string;
|
|
163
|
+
"400": string;
|
|
164
|
+
"500": string;
|
|
165
|
+
"600": string;
|
|
166
|
+
"700": string;
|
|
167
|
+
"800": string;
|
|
168
|
+
"900": string;
|
|
169
|
+
"950": string;
|
|
170
|
+
};
|
|
171
|
+
violet: {
|
|
172
|
+
"50": string;
|
|
173
|
+
"100": string;
|
|
174
|
+
"200": string;
|
|
175
|
+
"300": string;
|
|
176
|
+
"400": string;
|
|
177
|
+
"500": string;
|
|
178
|
+
"600": string;
|
|
179
|
+
"700": string;
|
|
180
|
+
"800": string;
|
|
181
|
+
"900": string;
|
|
182
|
+
"950": string;
|
|
183
|
+
};
|
|
184
|
+
purple: {
|
|
185
|
+
"50": string;
|
|
186
|
+
"100": string;
|
|
187
|
+
"200": string;
|
|
188
|
+
"300": string;
|
|
189
|
+
"400": string;
|
|
190
|
+
"500": string;
|
|
191
|
+
"600": string;
|
|
192
|
+
"700": string;
|
|
193
|
+
"800": string;
|
|
194
|
+
"900": string;
|
|
195
|
+
"950": string;
|
|
196
|
+
};
|
|
197
|
+
fuchsia: {
|
|
198
|
+
"50": string;
|
|
199
|
+
"100": string;
|
|
200
|
+
"200": string;
|
|
201
|
+
"300": string;
|
|
202
|
+
"400": string;
|
|
203
|
+
"500": string;
|
|
204
|
+
"600": string;
|
|
205
|
+
"700": string;
|
|
206
|
+
"800": string;
|
|
207
|
+
"900": string;
|
|
208
|
+
"950": string;
|
|
209
|
+
};
|
|
210
|
+
pink: {
|
|
211
|
+
"50": string;
|
|
212
|
+
"100": string;
|
|
213
|
+
"200": string;
|
|
214
|
+
"300": string;
|
|
215
|
+
"400": string;
|
|
216
|
+
"500": string;
|
|
217
|
+
"600": string;
|
|
218
|
+
"700": string;
|
|
219
|
+
"800": string;
|
|
220
|
+
"900": string;
|
|
221
|
+
"950": string;
|
|
222
|
+
};
|
|
223
|
+
rose: {
|
|
224
|
+
"50": string;
|
|
225
|
+
"100": string;
|
|
226
|
+
"200": string;
|
|
227
|
+
"300": string;
|
|
228
|
+
"400": string;
|
|
229
|
+
"500": string;
|
|
230
|
+
"600": string;
|
|
231
|
+
"700": string;
|
|
232
|
+
"800": string;
|
|
233
|
+
"900": string;
|
|
234
|
+
"950": string;
|
|
235
|
+
};
|
|
236
|
+
slate: {
|
|
237
|
+
"50": string;
|
|
238
|
+
"100": string;
|
|
239
|
+
"200": string;
|
|
240
|
+
"300": string;
|
|
241
|
+
"400": string;
|
|
242
|
+
"500": string;
|
|
243
|
+
"600": string;
|
|
244
|
+
"700": string;
|
|
245
|
+
"800": string;
|
|
246
|
+
"900": string;
|
|
247
|
+
"950": string;
|
|
248
|
+
};
|
|
249
|
+
gray: {
|
|
250
|
+
"50": string;
|
|
251
|
+
"100": string;
|
|
252
|
+
"200": string;
|
|
253
|
+
"300": string;
|
|
254
|
+
"400": string;
|
|
255
|
+
"500": string;
|
|
256
|
+
"600": string;
|
|
257
|
+
"700": string;
|
|
258
|
+
"800": string;
|
|
259
|
+
"900": string;
|
|
260
|
+
"950": string;
|
|
261
|
+
};
|
|
262
|
+
zinc: {
|
|
263
|
+
"50": string;
|
|
264
|
+
"100": string;
|
|
265
|
+
"200": string;
|
|
266
|
+
"300": string;
|
|
267
|
+
"400": string;
|
|
268
|
+
"500": string;
|
|
269
|
+
"600": string;
|
|
270
|
+
"700": string;
|
|
271
|
+
"800": string;
|
|
272
|
+
"900": string;
|
|
273
|
+
"950": string;
|
|
274
|
+
};
|
|
275
|
+
neutral: {
|
|
276
|
+
"50": string;
|
|
277
|
+
"100": string;
|
|
278
|
+
"200": string;
|
|
279
|
+
"300": string;
|
|
280
|
+
"400": string;
|
|
281
|
+
"500": string;
|
|
282
|
+
"600": string;
|
|
283
|
+
"700": string;
|
|
284
|
+
"800": string;
|
|
285
|
+
"900": string;
|
|
286
|
+
"950": string;
|
|
287
|
+
};
|
|
288
|
+
stone: {
|
|
289
|
+
"50": string;
|
|
290
|
+
"100": string;
|
|
291
|
+
"200": string;
|
|
292
|
+
"300": string;
|
|
293
|
+
"400": string;
|
|
294
|
+
"500": string;
|
|
295
|
+
"600": string;
|
|
296
|
+
"700": string;
|
|
297
|
+
"800": string;
|
|
298
|
+
"900": string;
|
|
299
|
+
"950": string;
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
export type TailwindColor = keyof typeof TAILWIND_COLORS;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.TAILWIND_COLORS=void 0;var TAILWIND_COLORS=exports.TAILWIND_COLORS={red:{"50":"#fef2f2","100":"#ffe2e2","200":"#ffc9c9","300":"#ffa2a2","400":"#ff6467","500":"#fb2c36","600":"#e7000b","700":"#c10007","800":"#9f0712","900":"#82181a","950":"#460809"},orange:{"50":"#fff7ed","100":"#ffedd4","200":"#ffd6a7","300":"#ffb86a","400":"#ff8904","500":"#ff6900","600":"#f54900","700":"#ca3500","800":"#9f2d00","900":"#7e2a0c","950":"#441306"},amber:{"50":"#fffbeb","100":"#fef3c6","200":"#fee685","300":"#ffd230","400":"#ffb900","500":"#fe9a00","600":"#e17100","700":"#bb4d00","800":"#973c00","900":"#7b3306","950":"#461901"},yellow:{"50":"#fefce8","100":"#fef9c2","200":"#fff085","300":"#ffdf20","400":"#fdc700","500":"#f0b100","600":"#d08700","700":"#a65f00","800":"#894b00","900":"#733e0a","950":"#432004"},lime:{"50":"#f7fee7","100":"#ecfcca","200":"#d8f999","300":"#bbf451","400":"#9ae600","500":"#7ccf00","600":"#5ea500","700":"#497d00","800":"#3c6300","900":"#35530e","950":"#192e03"},green:{"50":"#f0fdf4","100":"#dcfce7","200":"#b9f8cf","300":"#7bf1a8","400":"#05df72","500":"#00c950","600":"#00a63e","700":"#008236","800":"#016630","900":"#0d542b","950":"#032e15"},emerald:{"50":"#ecfdf5","100":"#d0fae5","200":"#a4f4cf","300":"#5ee9b5","400":"#00d492","500":"#00bc7d","600":"#009966","700":"#007a55","800":"#006045","900":"#004f3b","950":"#002c22"},teal:{"50":"#f0fdfa","100":"#cbfbf1","200":"#96f7e4","300":"#46ecd5","400":"#00d5be","500":"#00bba7","600":"#009689","700":"#00786f","800":"#005f5a","900":"#0b4f4a","950":"#022f2e"},cyan:{"50":"#ecfeff","100":"#cefafe","200":"#a2f4fd","300":"#53eafd","400":"#00d3f2","500":"#00b8db","600":"#0092b8","700":"#007595","800":"#005f78","900":"#104e64","950":"#053345"},sky:{"50":"#f0f9ff","100":"#dff2fe","200":"#b8e6fe","300":"#74d4ff","400":"#00bcff","500":"#00a6f4","600":"#0084d1","700":"#0069a8","800":"#00598a","900":"#024a70","950":"#052f4a"},blue:{"50":"#eff6ff","100":"#dbeafe","200":"#bedbff","300":"#8ec5ff","400":"#51a2ff","500":"#2b7fff","600":"#155dfc","700":"#1447e6","800":"#193cb8","900":"#1c398e","950":"#162456"},indigo:{"50":"#eef2ff","100":"#e0e7ff","200":"#c6d2ff","300":"#a3b3ff","400":"#7c86ff","500":"#615fff","600":"#4f39f6","700":"#432dd7","800":"#372aac","900":"#312c85","950":"#1e1a4d"},violet:{"50":"#f5f3ff","100":"#ede9fe","200":"#ddd6ff","300":"#c4b4ff","400":"#a684ff","500":"#8e51ff","600":"#7f22fe","700":"#7008e7","800":"#5d0ec0","900":"#4d179a","950":"#2f0d68"},purple:{"50":"#faf5ff","100":"#f3e8ff","200":"#e9d4ff","300":"#dab2ff","400":"#c27aff","500":"#ad46ff","600":"#9810fa","700":"#8200db","800":"#6e11b0","900":"#59168b","950":"#3c0366"},fuchsia:{"50":"#fdf4ff","100":"#fae8ff","200":"#f6cfff","300":"#f4a8ff","400":"#ed6aff","500":"#e12afb","600":"#c800de","700":"#a800b7","800":"#8a0194","900":"#721378","950":"#4b004f"},pink:{"50":"#fdf2f8","100":"#fce7f3","200":"#fccee8","300":"#fda5d5","400":"#fb64b6","500":"#f6339a","600":"#e60076","700":"#c6005c","800":"#a3004c","900":"#861043","950":"#510424"},rose:{"50":"#fff1f2","100":"#ffe4e6","200":"#ffccd3","300":"#ffa1ad","400":"#ff637e","500":"#ff2056","600":"#ec003f","700":"#c70036","800":"#a50036","900":"#8b0836","950":"#4d0218"},slate:{"50":"#f8fafc","100":"#f1f5f9","200":"#e2e8f0","300":"#cad5e2","400":"#90a1b9","500":"#62748e","600":"#45556c","700":"#314158","800":"#1d293d","900":"#0f172b","950":"#020618"},gray:{"50":"#f9fafb","100":"#f3f4f6","200":"#e5e7eb","300":"#d1d5dc","400":"#99a1af","500":"#6a7282","600":"#4a5565","700":"#364153","800":"#1e2939","900":"#101828","950":"#030712"},zinc:{"50":"#fafafa","100":"#f4f4f5","200":"#e4e4e7","300":"#d4d4d8","400":"#9f9fa9","500":"#71717b","600":"#52525c","700":"#3f3f46","800":"#27272a","900":"#18181b","950":"#09090b"},neutral:{"50":"#fafafa","100":"#f5f5f5","200":"#e5e5e5","300":"#d4d4d4","400":"#a1a1a1","500":"#737373","600":"#525252","700":"#404040","800":"#262626","900":"#171717","950":"#0a0a0a"},stone:{"50":"#fafaf9","100":"#f5f5f4","200":"#e7e5e4","300":"#d6d3d1","400":"#a6a09b","500":"#79716b","600":"#57534d","700":"#44403b","800":"#292524","900":"#1c1917","950":"#0c0a09"}};
|