@metamask-previews/design-system-react-native 0.27.0-preview.a0fe3894 → 0.28.0-preview.1f40f69f
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/CHANGELOG.md +15 -1
- package/dist/components/AvatarBase/AvatarBase.cjs +1 -1
- package/dist/components/AvatarBase/AvatarBase.cjs.map +1 -1
- package/dist/components/AvatarBase/AvatarBase.mjs +1 -1
- package/dist/components/AvatarBase/AvatarBase.mjs.map +1 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.cjs +2 -2
- package/dist/components/AvatarFavicon/AvatarFavicon.cjs.map +1 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.d.cts.map +1 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.d.mts.map +1 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.mjs +2 -2
- package/dist/components/AvatarFavicon/AvatarFavicon.mjs.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.cjs +2 -2
- package/dist/components/AvatarNetwork/AvatarNetwork.cjs.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.d.cts.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.d.mts.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.mjs +2 -2
- package/dist/components/AvatarNetwork/AvatarNetwork.mjs.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.cjs +2 -2
- package/dist/components/AvatarToken/AvatarToken.cjs.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.d.cts.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.d.mts.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.mjs +2 -2
- package/dist/components/AvatarToken/AvatarToken.mjs.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.cjs +47 -24
- package/dist/components/SectionHeader/SectionHeader.cjs.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.d.cts +16 -13
- package/dist/components/SectionHeader/SectionHeader.d.cts.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.d.mts +16 -13
- package/dist/components/SectionHeader/SectionHeader.d.mts.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.mjs +48 -25
- package/dist/components/SectionHeader/SectionHeader.mjs.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.types.cjs.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.types.d.cts +16 -9
- package/dist/components/SectionHeader/SectionHeader.types.d.cts.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.types.d.mts +16 -9
- package/dist/components/SectionHeader/SectionHeader.types.d.mts.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.types.mjs.map +1 -1
- package/dist/components/TextArea/TextArea.cjs +3 -7
- package/dist/components/TextArea/TextArea.cjs.map +1 -1
- package/dist/components/TextArea/TextArea.d.cts +158 -163
- package/dist/components/TextArea/TextArea.d.cts.map +1 -1
- package/dist/components/TextArea/TextArea.d.mts +158 -163
- package/dist/components/TextArea/TextArea.d.mts.map +1 -1
- package/dist/components/TextArea/TextArea.mjs +4 -8
- package/dist/components/TextArea/TextArea.mjs.map +1 -1
- package/dist/components/TextArea/TextArea.types.cjs.map +1 -1
- package/dist/components/TextArea/TextArea.types.d.cts +12 -45
- package/dist/components/TextArea/TextArea.types.d.cts.map +1 -1
- package/dist/components/TextArea/TextArea.types.d.mts +12 -45
- package/dist/components/TextArea/TextArea.types.d.mts.map +1 -1
- package/dist/components/TextArea/TextArea.types.mjs.map +1 -1
- package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.cjs.map +1 -1
- package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.d.cts +2 -2
- package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.d.cts.map +1 -1
- package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.d.mts +2 -2
- package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.d.mts.map +1 -1
- package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.mjs.map +1 -1
- package/package.json +6 -6
|
@@ -1,170 +1,165 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TextInput } from "react-native";
|
|
2
2
|
export declare const TextArea: import("react").ForwardRefExoticComponent<Omit<import("@metamask-previews/design-system-shared").InputPropsShared, "isStateStylesDisabled"> & {
|
|
3
3
|
isError?: boolean | undefined;
|
|
4
|
-
|
|
4
|
+
} & {
|
|
5
|
+
children?: import("react").ReactNode;
|
|
6
|
+
hitSlop?: number | import("react-native").Insets | null | undefined;
|
|
7
|
+
id?: string | undefined;
|
|
8
|
+
needsOffscreenAlphaCompositing?: boolean | undefined;
|
|
9
|
+
onLayout?: ((event: import("react-native").LayoutChangeEvent) => void) | undefined;
|
|
10
|
+
pointerEvents?: "box-none" | "none" | "box-only" | "auto" | undefined;
|
|
11
|
+
removeClippedSubviews?: boolean | undefined;
|
|
12
|
+
style?: import("react-native").StyleProp<import("react-native").TextStyle>;
|
|
13
|
+
testID?: string | undefined;
|
|
14
|
+
nativeID?: string | undefined;
|
|
15
|
+
collapsable?: boolean | undefined;
|
|
16
|
+
collapsableChildren?: boolean | undefined;
|
|
17
|
+
renderToHardwareTextureAndroid?: boolean | undefined;
|
|
18
|
+
focusable?: boolean | undefined;
|
|
19
|
+
tabIndex?: 0 | -1 | undefined;
|
|
20
|
+
shouldRasterizeIOS?: boolean | undefined;
|
|
21
|
+
isTVSelectable?: boolean | undefined;
|
|
22
|
+
hasTVPreferredFocus?: boolean | undefined;
|
|
23
|
+
tvParallaxShiftDistanceX?: number | undefined;
|
|
24
|
+
tvParallaxShiftDistanceY?: number | undefined;
|
|
25
|
+
tvParallaxTiltAngle?: number | undefined;
|
|
26
|
+
tvParallaxMagnification?: number | undefined;
|
|
27
|
+
onStartShouldSetResponder?: ((event: import("react-native").GestureResponderEvent) => boolean) | undefined;
|
|
28
|
+
onMoveShouldSetResponder?: ((event: import("react-native").GestureResponderEvent) => boolean) | undefined;
|
|
29
|
+
onResponderEnd?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
30
|
+
onResponderGrant?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
31
|
+
onResponderReject?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
32
|
+
onResponderMove?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
33
|
+
onResponderRelease?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
34
|
+
onResponderStart?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
35
|
+
onResponderTerminationRequest?: ((event: import("react-native").GestureResponderEvent) => boolean) | undefined;
|
|
36
|
+
onResponderTerminate?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
37
|
+
onStartShouldSetResponderCapture?: ((event: import("react-native").GestureResponderEvent) => boolean) | undefined;
|
|
38
|
+
onMoveShouldSetResponderCapture?: ((event: import("react-native").GestureResponderEvent) => boolean) | undefined;
|
|
39
|
+
onTouchStart?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
40
|
+
onTouchMove?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
41
|
+
onTouchEnd?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
42
|
+
onTouchCancel?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
43
|
+
onTouchEndCapture?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
44
|
+
onPointerEnter?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
45
|
+
onPointerEnterCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
46
|
+
onPointerLeave?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
47
|
+
onPointerLeaveCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
48
|
+
onPointerMove?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
49
|
+
onPointerMoveCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
50
|
+
onPointerCancel?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
51
|
+
onPointerCancelCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
52
|
+
onPointerDown?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
53
|
+
onPointerDownCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
54
|
+
onPointerUp?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
55
|
+
onPointerUpCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
56
|
+
accessible?: boolean | undefined;
|
|
57
|
+
accessibilityActions?: readonly Readonly<{
|
|
58
|
+
name: string;
|
|
59
|
+
label?: string | undefined;
|
|
60
|
+
}>[] | undefined;
|
|
61
|
+
accessibilityLabel?: string | undefined;
|
|
62
|
+
'aria-label'?: string | undefined;
|
|
63
|
+
accessibilityRole?: import("react-native").AccessibilityRole | undefined;
|
|
64
|
+
accessibilityState?: import("react-native").AccessibilityState | undefined;
|
|
65
|
+
'aria-busy'?: boolean | undefined;
|
|
66
|
+
'aria-checked'?: boolean | "mixed" | undefined;
|
|
67
|
+
'aria-disabled'?: boolean | undefined;
|
|
68
|
+
'aria-expanded'?: boolean | undefined;
|
|
69
|
+
'aria-selected'?: boolean | undefined;
|
|
70
|
+
accessibilityHint?: string | undefined;
|
|
71
|
+
accessibilityValue?: import("react-native").AccessibilityValue | undefined;
|
|
72
|
+
'aria-valuemax'?: number | undefined;
|
|
73
|
+
'aria-valuemin'?: number | undefined;
|
|
74
|
+
'aria-valuenow'?: number | undefined;
|
|
75
|
+
'aria-valuetext'?: string | undefined;
|
|
76
|
+
onAccessibilityAction?: ((event: import("react-native").AccessibilityActionEvent) => void) | undefined;
|
|
77
|
+
importantForAccessibility?: "auto" | "yes" | "no" | "no-hide-descendants" | undefined;
|
|
78
|
+
'aria-hidden'?: boolean | undefined;
|
|
79
|
+
'aria-modal'?: boolean | undefined;
|
|
80
|
+
role?: import("react-native").Role | undefined;
|
|
81
|
+
accessibilityLabelledBy?: string | string[] | undefined;
|
|
82
|
+
'aria-labelledby'?: string | undefined;
|
|
83
|
+
accessibilityLiveRegion?: "none" | "polite" | "assertive" | undefined;
|
|
84
|
+
'aria-live'?: "polite" | "assertive" | "off" | undefined;
|
|
85
|
+
screenReaderFocusable?: boolean | undefined;
|
|
86
|
+
accessibilityElementsHidden?: boolean | undefined;
|
|
87
|
+
accessibilityViewIsModal?: boolean | undefined;
|
|
88
|
+
onAccessibilityEscape?: (() => void) | undefined;
|
|
89
|
+
onAccessibilityTap?: (() => void) | undefined;
|
|
90
|
+
onMagicTap?: (() => void) | undefined;
|
|
91
|
+
accessibilityIgnoresInvertColors?: boolean | undefined;
|
|
92
|
+
accessibilityLanguage?: string | undefined;
|
|
93
|
+
accessibilityShowsLargeContentViewer?: boolean | undefined;
|
|
94
|
+
accessibilityLargeContentTitle?: string | undefined;
|
|
95
|
+
accessibilityRespondsToUserInteraction?: boolean | undefined;
|
|
96
|
+
twClassName?: string | undefined;
|
|
97
|
+
onPress?: ((e: import("react-native").NativeSyntheticEvent<import("react-native").NativeTouchEvent>) => void) | undefined;
|
|
98
|
+
onPressIn?: ((e: import("react-native").NativeSyntheticEvent<import("react-native").NativeTouchEvent>) => void) | undefined;
|
|
99
|
+
onPressOut?: ((e: import("react-native").NativeSyntheticEvent<import("react-native").NativeTouchEvent>) => void) | undefined;
|
|
100
|
+
allowFontScaling?: boolean | undefined;
|
|
101
|
+
numberOfLines?: number | undefined;
|
|
102
|
+
maxFontSizeMultiplier?: number | null | undefined;
|
|
103
|
+
lineBreakStrategyIOS?: "none" | "standard" | "hangul-word" | "push-out" | undefined;
|
|
104
|
+
selectionColor?: import("react-native").ColorValue | undefined;
|
|
105
|
+
textBreakStrategy?: "simple" | "highQuality" | "balanced" | undefined;
|
|
106
|
+
textAlign?: "center" | "left" | "right" | undefined;
|
|
107
|
+
textAlignVertical?: "auto" | "center" | "bottom" | "top" | undefined;
|
|
108
|
+
verticalAlign?: "auto" | "bottom" | "top" | "middle" | undefined;
|
|
109
|
+
rejectResponderTermination?: boolean | null | undefined;
|
|
110
|
+
onChange?: ((e: import("react-native").TextInputChangeEvent) => void) | undefined;
|
|
111
|
+
autoCapitalize?: "none" | "sentences" | "words" | "characters" | undefined;
|
|
112
|
+
autoComplete?: "off" | "name" | "email" | "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" | "family-name" | "gender" | "given-name" | "honorific-prefix" | "honorific-suffix" | "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" | undefined;
|
|
113
|
+
autoCorrect?: boolean | undefined;
|
|
114
|
+
blurOnSubmit?: boolean | undefined;
|
|
115
|
+
submitBehavior?: import("react-native").SubmitBehavior | undefined;
|
|
116
|
+
caretHidden?: boolean | undefined;
|
|
117
|
+
contextMenuHidden?: boolean | undefined;
|
|
118
|
+
keyboardType?: import("react-native").KeyboardTypeOptions | undefined;
|
|
119
|
+
inputMode?: import("react-native").InputModeOptions | undefined;
|
|
120
|
+
maxLength?: number | undefined;
|
|
121
|
+
onContentSizeChange?: ((e: import("react-native").TextInputContentSizeChangeEvent) => void) | undefined;
|
|
122
|
+
onEndEditing?: ((e: import("react-native").TextInputEndEditingEvent) => void) | undefined;
|
|
123
|
+
onSelectionChange?: ((e: import("react-native").TextInputSelectionChangeEvent) => void) | undefined;
|
|
124
|
+
onSubmitEditing?: ((e: import("react-native").TextInputSubmitEditingEvent) => void) | undefined;
|
|
125
|
+
onScroll?: ((e: import("react-native").TextInputScrollEvent) => void) | undefined;
|
|
126
|
+
onKeyPress?: ((e: import("react-native").TextInputKeyPressEvent) => void) | undefined;
|
|
127
|
+
readOnly?: boolean | undefined;
|
|
128
|
+
returnKeyType?: import("react-native").ReturnKeyTypeOptions | undefined;
|
|
129
|
+
enterKeyHint?: import("react-native").EnterKeyHintTypeOptions | undefined;
|
|
130
|
+
secureTextEntry?: boolean | undefined;
|
|
131
|
+
selectTextOnFocus?: boolean | undefined;
|
|
132
|
+
selection?: {
|
|
133
|
+
start: number;
|
|
134
|
+
end?: number | undefined;
|
|
135
|
+
} | undefined;
|
|
136
|
+
inputAccessoryViewID?: string | undefined;
|
|
137
|
+
inputAccessoryViewButtonLabel?: string | undefined;
|
|
138
|
+
disableKeyboardShortcuts?: boolean | undefined;
|
|
139
|
+
clearButtonMode?: "never" | "while-editing" | "unless-editing" | "always" | undefined;
|
|
140
|
+
clearTextOnFocus?: boolean | undefined;
|
|
141
|
+
dataDetectorTypes?: import("react-native").DataDetectorTypes | import("react-native").DataDetectorTypes[] | undefined;
|
|
142
|
+
enablesReturnKeyAutomatically?: boolean | undefined;
|
|
143
|
+
keyboardAppearance?: "default" | "light" | "dark" | undefined;
|
|
144
|
+
passwordRules?: string | null | undefined;
|
|
145
|
+
selectionState?: import("react-native").DocumentSelectionState | undefined;
|
|
146
|
+
spellCheck?: boolean | undefined;
|
|
147
|
+
textContentType?: "none" | "name" | "nickname" | "password" | "username" | "flightNumber" | "URL" | "addressCity" | "addressCityAndState" | "addressState" | "countryName" | "creditCardNumber" | "creditCardExpiration" | "creditCardExpirationMonth" | "creditCardExpirationYear" | "creditCardSecurityCode" | "creditCardType" | "creditCardName" | "creditCardGivenName" | "creditCardMiddleName" | "creditCardFamilyName" | "emailAddress" | "familyName" | "fullStreetAddress" | "givenName" | "jobTitle" | "location" | "middleName" | "namePrefix" | "nameSuffix" | "organizationName" | "postalCode" | "streetAddressLine1" | "streetAddressLine2" | "sublocality" | "telephoneNumber" | "newPassword" | "oneTimeCode" | "birthdate" | "birthdateDay" | "birthdateMonth" | "birthdateYear" | "cellularEID" | "cellularIMEI" | "dateTime" | "shipmentTrackingNumber" | undefined;
|
|
148
|
+
scrollEnabled?: boolean | undefined;
|
|
149
|
+
lineBreakModeIOS?: "head" | "middle" | "tail" | "clip" | "wordWrapping" | "char" | undefined;
|
|
150
|
+
smartInsertDelete?: boolean | undefined;
|
|
151
|
+
cursorColor?: import("react-native").ColorValue | null | undefined;
|
|
152
|
+
selectionHandleColor?: import("react-native").ColorValue | null | undefined;
|
|
153
|
+
importantForAutofill?: "auto" | "yes" | "no" | "noExcludeDescendants" | "yesExcludeDescendants" | undefined;
|
|
154
|
+
disableFullscreenUI?: boolean | undefined;
|
|
155
|
+
inlineImageLeft?: string | undefined;
|
|
156
|
+
inlineImagePadding?: number | undefined;
|
|
157
|
+
returnKeyLabel?: string | undefined;
|
|
158
|
+
underlineColorAndroid?: import("react-native").ColorValue | undefined;
|
|
159
|
+
showSoftInputOnFocus?: boolean | undefined;
|
|
5
160
|
} & {
|
|
6
161
|
onChangeText?: ((text: string) => void) | undefined;
|
|
7
162
|
onFocus?: ((e: import("react-native").FocusEvent) => void) | undefined;
|
|
8
163
|
onBlur?: ((e: import("react-native").BlurEvent) => void) | undefined;
|
|
9
|
-
|
|
10
|
-
children?: import("react").ReactNode;
|
|
11
|
-
hitSlop?: number | import("react-native").Insets | null | undefined;
|
|
12
|
-
id?: string | undefined;
|
|
13
|
-
needsOffscreenAlphaCompositing?: boolean | undefined;
|
|
14
|
-
onLayout?: ((event: import("react-native").LayoutChangeEvent) => void) | undefined;
|
|
15
|
-
pointerEvents?: "box-none" | "none" | "box-only" | "auto" | undefined;
|
|
16
|
-
removeClippedSubviews?: boolean | undefined;
|
|
17
|
-
testID?: string | undefined;
|
|
18
|
-
nativeID?: string | undefined;
|
|
19
|
-
collapsable?: boolean | undefined;
|
|
20
|
-
collapsableChildren?: boolean | undefined;
|
|
21
|
-
renderToHardwareTextureAndroid?: boolean | undefined;
|
|
22
|
-
focusable?: boolean | undefined;
|
|
23
|
-
tabIndex?: 0 | -1 | undefined;
|
|
24
|
-
shouldRasterizeIOS?: boolean | undefined;
|
|
25
|
-
isTVSelectable?: boolean | undefined;
|
|
26
|
-
hasTVPreferredFocus?: boolean | undefined;
|
|
27
|
-
tvParallaxShiftDistanceX?: number | undefined;
|
|
28
|
-
tvParallaxShiftDistanceY?: number | undefined;
|
|
29
|
-
tvParallaxTiltAngle?: number | undefined;
|
|
30
|
-
tvParallaxMagnification?: number | undefined;
|
|
31
|
-
onStartShouldSetResponder?: ((event: import("react-native").GestureResponderEvent) => boolean) | undefined;
|
|
32
|
-
onMoveShouldSetResponder?: ((event: import("react-native").GestureResponderEvent) => boolean) | undefined;
|
|
33
|
-
onResponderEnd?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
34
|
-
onResponderGrant?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
35
|
-
onResponderReject?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
36
|
-
onResponderMove?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
37
|
-
onResponderRelease?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
38
|
-
onResponderStart?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
39
|
-
onResponderTerminationRequest?: ((event: import("react-native").GestureResponderEvent) => boolean) | undefined;
|
|
40
|
-
onResponderTerminate?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
41
|
-
onStartShouldSetResponderCapture?: ((event: import("react-native").GestureResponderEvent) => boolean) | undefined;
|
|
42
|
-
onMoveShouldSetResponderCapture?: ((event: import("react-native").GestureResponderEvent) => boolean) | undefined;
|
|
43
|
-
onTouchStart?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
44
|
-
onTouchMove?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
45
|
-
onTouchEnd?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
46
|
-
onTouchCancel?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
47
|
-
onTouchEndCapture?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
48
|
-
onPointerEnter?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
49
|
-
onPointerEnterCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
50
|
-
onPointerLeave?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
51
|
-
onPointerLeaveCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
52
|
-
onPointerMove?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
53
|
-
onPointerMoveCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
54
|
-
onPointerCancel?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
55
|
-
onPointerCancelCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
56
|
-
onPointerDown?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
57
|
-
onPointerDownCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
58
|
-
onPointerUp?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
59
|
-
onPointerUpCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
60
|
-
accessible?: boolean | undefined;
|
|
61
|
-
accessibilityActions?: readonly Readonly<{
|
|
62
|
-
name: string;
|
|
63
|
-
label?: string | undefined;
|
|
64
|
-
}>[] | undefined;
|
|
65
|
-
accessibilityLabel?: string | undefined;
|
|
66
|
-
'aria-label'?: string | undefined;
|
|
67
|
-
accessibilityRole?: import("react-native").AccessibilityRole | undefined;
|
|
68
|
-
accessibilityState?: import("react-native").AccessibilityState | undefined;
|
|
69
|
-
'aria-busy'?: boolean | undefined;
|
|
70
|
-
'aria-checked'?: boolean | "mixed" | undefined;
|
|
71
|
-
'aria-disabled'?: boolean | undefined;
|
|
72
|
-
'aria-expanded'?: boolean | undefined;
|
|
73
|
-
'aria-selected'?: boolean | undefined;
|
|
74
|
-
accessibilityHint?: string | undefined;
|
|
75
|
-
accessibilityValue?: import("react-native").AccessibilityValue | undefined;
|
|
76
|
-
'aria-valuemax'?: number | undefined;
|
|
77
|
-
'aria-valuemin'?: number | undefined;
|
|
78
|
-
'aria-valuenow'?: number | undefined;
|
|
79
|
-
'aria-valuetext'?: string | undefined;
|
|
80
|
-
onAccessibilityAction?: ((event: import("react-native").AccessibilityActionEvent) => void) | undefined;
|
|
81
|
-
importantForAccessibility?: "auto" | "yes" | "no" | "no-hide-descendants" | undefined;
|
|
82
|
-
'aria-hidden'?: boolean | undefined;
|
|
83
|
-
'aria-modal'?: boolean | undefined;
|
|
84
|
-
role?: import("react-native").Role | undefined;
|
|
85
|
-
accessibilityLabelledBy?: string | string[] | undefined;
|
|
86
|
-
'aria-labelledby'?: string | undefined;
|
|
87
|
-
accessibilityLiveRegion?: "none" | "polite" | "assertive" | undefined;
|
|
88
|
-
'aria-live'?: "polite" | "assertive" | "off" | undefined;
|
|
89
|
-
screenReaderFocusable?: boolean | undefined;
|
|
90
|
-
accessibilityElementsHidden?: boolean | undefined;
|
|
91
|
-
accessibilityViewIsModal?: boolean | undefined;
|
|
92
|
-
onAccessibilityEscape?: (() => void) | undefined;
|
|
93
|
-
onAccessibilityTap?: (() => void) | undefined;
|
|
94
|
-
onMagicTap?: (() => void) | undefined;
|
|
95
|
-
accessibilityIgnoresInvertColors?: boolean | undefined;
|
|
96
|
-
accessibilityLanguage?: string | undefined;
|
|
97
|
-
accessibilityShowsLargeContentViewer?: boolean | undefined;
|
|
98
|
-
accessibilityLargeContentTitle?: string | undefined;
|
|
99
|
-
accessibilityRespondsToUserInteraction?: boolean | undefined;
|
|
100
|
-
twClassName?: string | undefined;
|
|
101
|
-
onPress?: ((e: import("react-native").NativeSyntheticEvent<import("react-native").NativeTouchEvent>) => void) | undefined;
|
|
102
|
-
onPressIn?: ((e: import("react-native").NativeSyntheticEvent<import("react-native").NativeTouchEvent>) => void) | undefined;
|
|
103
|
-
onPressOut?: ((e: import("react-native").NativeSyntheticEvent<import("react-native").NativeTouchEvent>) => void) | undefined;
|
|
104
|
-
allowFontScaling?: boolean | undefined;
|
|
105
|
-
numberOfLines?: number | undefined;
|
|
106
|
-
maxFontSizeMultiplier?: number | null | undefined;
|
|
107
|
-
lineBreakStrategyIOS?: "none" | "standard" | "hangul-word" | "push-out" | undefined;
|
|
108
|
-
selectionColor?: import("react-native").ColorValue | undefined;
|
|
109
|
-
textBreakStrategy?: "simple" | "highQuality" | "balanced" | undefined;
|
|
110
|
-
textAlign?: "center" | "left" | "right" | undefined;
|
|
111
|
-
textAlignVertical?: "auto" | "center" | "bottom" | "top" | undefined;
|
|
112
|
-
verticalAlign?: "auto" | "bottom" | "top" | "middle" | undefined;
|
|
113
|
-
rejectResponderTermination?: boolean | null | undefined;
|
|
114
|
-
onChange?: ((e: import("react-native").TextInputChangeEvent) => void) | undefined;
|
|
115
|
-
autoCapitalize?: "none" | "sentences" | "words" | "characters" | undefined;
|
|
116
|
-
autoComplete?: "off" | "name" | "email" | "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" | "family-name" | "gender" | "given-name" | "honorific-prefix" | "honorific-suffix" | "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" | undefined;
|
|
117
|
-
autoCorrect?: boolean | undefined;
|
|
118
|
-
blurOnSubmit?: boolean | undefined;
|
|
119
|
-
submitBehavior?: import("react-native").SubmitBehavior | undefined;
|
|
120
|
-
caretHidden?: boolean | undefined;
|
|
121
|
-
contextMenuHidden?: boolean | undefined;
|
|
122
|
-
keyboardType?: import("react-native").KeyboardTypeOptions | undefined;
|
|
123
|
-
inputMode?: import("react-native").InputModeOptions | undefined;
|
|
124
|
-
maxLength?: number | undefined;
|
|
125
|
-
onContentSizeChange?: ((e: import("react-native").TextInputContentSizeChangeEvent) => void) | undefined;
|
|
126
|
-
onEndEditing?: ((e: import("react-native").TextInputEndEditingEvent) => void) | undefined;
|
|
127
|
-
onSelectionChange?: ((e: import("react-native").TextInputSelectionChangeEvent) => void) | undefined;
|
|
128
|
-
onSubmitEditing?: ((e: import("react-native").TextInputSubmitEditingEvent) => void) | undefined;
|
|
129
|
-
onScroll?: ((e: import("react-native").TextInputScrollEvent) => void) | undefined;
|
|
130
|
-
onKeyPress?: ((e: import("react-native").TextInputKeyPressEvent) => void) | undefined;
|
|
131
|
-
readOnly?: boolean | undefined;
|
|
132
|
-
returnKeyType?: import("react-native").ReturnKeyTypeOptions | undefined;
|
|
133
|
-
enterKeyHint?: import("react-native").EnterKeyHintTypeOptions | undefined;
|
|
134
|
-
secureTextEntry?: boolean | undefined;
|
|
135
|
-
selectTextOnFocus?: boolean | undefined;
|
|
136
|
-
selection?: {
|
|
137
|
-
start: number;
|
|
138
|
-
end?: number | undefined;
|
|
139
|
-
} | undefined;
|
|
140
|
-
inputAccessoryViewID?: string | undefined;
|
|
141
|
-
inputAccessoryViewButtonLabel?: string | undefined;
|
|
142
|
-
disableKeyboardShortcuts?: boolean | undefined;
|
|
143
|
-
clearButtonMode?: "never" | "while-editing" | "unless-editing" | "always" | undefined;
|
|
144
|
-
clearTextOnFocus?: boolean | undefined;
|
|
145
|
-
dataDetectorTypes?: import("react-native").DataDetectorTypes | import("react-native").DataDetectorTypes[] | undefined;
|
|
146
|
-
enablesReturnKeyAutomatically?: boolean | undefined;
|
|
147
|
-
keyboardAppearance?: "default" | "light" | "dark" | undefined;
|
|
148
|
-
passwordRules?: string | null | undefined;
|
|
149
|
-
selectionState?: import("react-native").DocumentSelectionState | undefined;
|
|
150
|
-
spellCheck?: boolean | undefined;
|
|
151
|
-
textContentType?: "none" | "name" | "nickname" | "password" | "username" | "flightNumber" | "URL" | "addressCity" | "addressCityAndState" | "addressState" | "countryName" | "creditCardNumber" | "creditCardExpiration" | "creditCardExpirationMonth" | "creditCardExpirationYear" | "creditCardSecurityCode" | "creditCardType" | "creditCardName" | "creditCardGivenName" | "creditCardMiddleName" | "creditCardFamilyName" | "emailAddress" | "familyName" | "fullStreetAddress" | "givenName" | "jobTitle" | "location" | "middleName" | "namePrefix" | "nameSuffix" | "organizationName" | "postalCode" | "streetAddressLine1" | "streetAddressLine2" | "sublocality" | "telephoneNumber" | "newPassword" | "oneTimeCode" | "birthdate" | "birthdateDay" | "birthdateMonth" | "birthdateYear" | "cellularEID" | "cellularIMEI" | "dateTime" | "shipmentTrackingNumber" | undefined;
|
|
152
|
-
scrollEnabled?: boolean | undefined;
|
|
153
|
-
lineBreakModeIOS?: "head" | "middle" | "tail" | "clip" | "wordWrapping" | "char" | undefined;
|
|
154
|
-
smartInsertDelete?: boolean | undefined;
|
|
155
|
-
cursorColor?: import("react-native").ColorValue | null | undefined;
|
|
156
|
-
selectionHandleColor?: import("react-native").ColorValue | null | undefined;
|
|
157
|
-
importantForAutofill?: "auto" | "yes" | "no" | "noExcludeDescendants" | "yesExcludeDescendants" | undefined;
|
|
158
|
-
disableFullscreenUI?: boolean | undefined;
|
|
159
|
-
inlineImageLeft?: string | undefined;
|
|
160
|
-
inlineImagePadding?: number | undefined;
|
|
161
|
-
returnKeyLabel?: string | undefined;
|
|
162
|
-
underlineColorAndroid?: import("react-native").ColorValue | undefined;
|
|
163
|
-
showSoftInputOnFocus?: boolean | undefined;
|
|
164
|
-
} | undefined;
|
|
165
|
-
inputRef?: import("react").Ref<import("react-native").TextInput> | undefined;
|
|
166
|
-
twClassName?: string | undefined;
|
|
167
|
-
style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
|
|
168
|
-
testID?: string | undefined;
|
|
169
|
-
} & Omit<import("../Box/index.mjs").BoxProps, "children" | "style" | "testID" | "onBlur" | "onFocus" | "accessible" | "twClassName" | "isDisabled" | "value" | "autoFocus" | "onChangeText" | "placeholder" | "textVariant" | "isReadOnly" | "isError" | "inputElement" | "inputProps" | "inputRef"> & import("react").RefAttributes<View>>;
|
|
164
|
+
} & import("react").RefAttributes<TextInput>>;
|
|
170
165
|
//# sourceMappingURL=TextArea.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.d.mts","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"TextArea.d.mts","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,qBAAqB;AAOzC,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6CAsFpB,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { useTailwind } from "@metamask-previews/design-system-twrnc-preset";
|
|
2
2
|
import { forwardRef, useCallback, useEffect, useState } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { Box } from "../Box/index.mjs";
|
|
3
|
+
import { TextInput } from "react-native";
|
|
5
4
|
import { Input } from "../Input/index.mjs";
|
|
6
|
-
export const TextArea = forwardRef(({ value, onChangeText, placeholder, isReadOnly, onBlur, onFocus, autoFocus = false,
|
|
5
|
+
export const TextArea = forwardRef(({ value, onChangeText, placeholder, isReadOnly, onBlur, onFocus, autoFocus = false, isDisabled = false, isError = false, textVariant, style, twClassName, testID, ...props }, ref) => {
|
|
7
6
|
const [isFocused, setIsFocused] = useState(autoFocus);
|
|
8
7
|
const tw = useTailwind();
|
|
9
8
|
useEffect(() => {
|
|
@@ -11,7 +10,6 @@ export const TextArea = forwardRef(({ value, onChangeText, placeholder, isReadOn
|
|
|
11
10
|
setIsFocused(false);
|
|
12
11
|
}
|
|
13
12
|
}, [isDisabled, isReadOnly]);
|
|
14
|
-
const { twClassName: inputTwClassNameFromProps, ...inputRestWithoutTwClassName } = inputProps ?? {};
|
|
15
13
|
const onBlurHandler = useCallback((e) => {
|
|
16
14
|
if (!isDisabled) {
|
|
17
15
|
setIsFocused(false);
|
|
@@ -24,12 +22,10 @@ export const TextArea = forwardRef(({ value, onChangeText, placeholder, isReadOn
|
|
|
24
22
|
onFocus?.(e);
|
|
25
23
|
}
|
|
26
24
|
}, [isDisabled, onFocus]);
|
|
27
|
-
return (<
|
|
25
|
+
return (<Input ref={ref} {...props} testID={testID} value={value} onChangeText={onChangeText} placeholder={placeholder} isReadOnly={isReadOnly} textVariant={textVariant} isDisabled={isDisabled} autoFocus={autoFocus} onBlur={onBlurHandler} onFocus={onFocusHandler} isStateStylesDisabled multiline textAlignVertical="top" style={[
|
|
28
26
|
tw.style('rounded-lg', 'min-h-24', 'border', 'px-4', 'py-3', 'bg-muted', isDisabled && 'border-muted', !isDisabled && isError && 'border-error-default', !isDisabled && !isError && isFocused && 'border-default', !isDisabled && !isError && !isFocused && 'border-muted', isDisabled && 'opacity-50', twClassName),
|
|
29
27
|
style,
|
|
30
|
-
]}
|
|
31
|
-
{inputElement || (<Input {...inputRestWithoutTwClassName} ref={inputRef} value={value} onChangeText={onChangeText} placeholder={placeholder} isReadOnly={isReadOnly} textVariant={textVariant} isDisabled={isDisabled} autoFocus={autoFocus} onBlur={onBlurHandler} onFocus={onFocusHandler} isStateStylesDisabled multiline textAlignVertical="top" twClassName={`min-h-[88px] w-full flex-1 self-stretch bg-transparent border-0 py-1${inputTwClassNameFromProps ? ` ${inputTwClassNameFromProps}` : ''}`}/>)}
|
|
32
|
-
</Box>);
|
|
28
|
+
]}/>);
|
|
33
29
|
});
|
|
34
30
|
TextArea.displayName = 'TextArea';
|
|
35
31
|
//# sourceMappingURL=TextArea.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.mjs","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc;AACrE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"TextArea.mjs","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc;AACrE,OAAO,EAAE,SAAS,EAAE,qBAAqB;AAEzC,OAAO,EAAE,KAAK,EAAE,2BAAiB;AAKjC,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAChC,CACE,EACE,KAAK,EACL,YAAY,EACZ,WAAW,EACX,UAAU,EACV,MAAM,EACN,OAAO,EACP,SAAS,GAAG,KAAK,EACjB,UAAU,GAAG,KAAK,EAClB,OAAO,GAAG,KAAK,EACf,WAAW,EACX,KAAK,EACL,WAAW,EACX,MAAM,EACN,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;IACtD,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IAEzB,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,UAAU,IAAI,UAAU,EAAE;YAC5B,YAAY,CAAC,KAAK,CAAC,CAAC;SACrB;IACH,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC;IAE7B,MAAM,aAAa,GAAG,WAAW,CAC/B,CAAC,CAAmD,EAAE,EAAE;QACtD,IAAI,CAAC,UAAU,EAAE;YACf,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;SACb;IACH,CAAC,EACD,CAAC,UAAU,EAAE,MAAM,CAAC,CACrB,CAAC;IAEF,MAAM,cAAc,GAAG,WAAW,CAChC,CAAC,CAAoD,EAAE,EAAE;QACvD,IAAI,CAAC,UAAU,EAAE;YACf,YAAY,CAAC,IAAI,CAAC,CAAC;YACnB,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;SACd;IACH,CAAC,EACD,CAAC,UAAU,EAAE,OAAO,CAAC,CACtB,CAAC;IAEF,OAAO,CACL,CAAC,KAAK,CACJ,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,IAAI,KAAK,CAAC,CACV,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,MAAM,CAAC,CAAC,aAAa,CAAC,CACtB,OAAO,CAAC,CAAC,cAAc,CAAC,CACxB,qBAAqB,CACrB,SAAS,CACT,iBAAiB,CAAC,KAAK,CACvB,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CACN,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,MAAM,EACN,MAAM,EACN,UAAU,EACV,UAAU,IAAI,cAAc,EAC5B,CAAC,UAAU,IAAI,OAAO,IAAI,sBAAsB,EAChD,CAAC,UAAU,IAAI,CAAC,OAAO,IAAI,SAAS,IAAI,gBAAgB,EACxD,CAAC,UAAU,IAAI,CAAC,OAAO,IAAI,CAAC,SAAS,IAAI,cAAc,EACvD,UAAU,IAAI,YAAY,EAC1B,WAAW,CACZ;YACD,KAAK;SACN,CAAC,EACF,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport { forwardRef, useCallback, useEffect, useState } from 'react';\nimport { TextInput } from 'react-native';\n\nimport { Input } from '../Input';\nimport type { InputProps } from '../Input/Input.types';\n\nimport type { TextAreaProps } from './TextArea.types';\n\nexport const TextArea = forwardRef<TextInput, TextAreaProps>(\n (\n {\n value,\n onChangeText,\n placeholder,\n isReadOnly,\n onBlur,\n onFocus,\n autoFocus = false,\n isDisabled = false,\n isError = false,\n textVariant,\n style,\n twClassName,\n testID,\n ...props\n },\n ref,\n ) => {\n const [isFocused, setIsFocused] = useState(autoFocus);\n const tw = useTailwind();\n\n useEffect(() => {\n if (isDisabled || isReadOnly) {\n setIsFocused(false);\n }\n }, [isDisabled, isReadOnly]);\n\n const onBlurHandler = useCallback(\n (e: Parameters<NonNullable<InputProps['onBlur']>>[0]) => {\n if (!isDisabled) {\n setIsFocused(false);\n onBlur?.(e);\n }\n },\n [isDisabled, onBlur],\n );\n\n const onFocusHandler = useCallback(\n (e: Parameters<NonNullable<InputProps['onFocus']>>[0]) => {\n if (!isDisabled) {\n setIsFocused(true);\n onFocus?.(e);\n }\n },\n [isDisabled, onFocus],\n );\n\n return (\n <Input\n ref={ref}\n {...props}\n testID={testID}\n value={value}\n onChangeText={onChangeText}\n placeholder={placeholder}\n isReadOnly={isReadOnly}\n textVariant={textVariant}\n isDisabled={isDisabled}\n autoFocus={autoFocus}\n onBlur={onBlurHandler}\n onFocus={onFocusHandler}\n isStateStylesDisabled\n multiline\n textAlignVertical=\"top\"\n style={[\n tw.style(\n 'rounded-lg',\n 'min-h-24',\n 'border',\n 'px-4',\n 'py-3',\n 'bg-muted',\n isDisabled && 'border-muted',\n !isDisabled && isError && 'border-error-default',\n !isDisabled && !isError && isFocused && 'border-default',\n !isDisabled && !isError && !isFocused && 'border-muted',\n isDisabled && 'opacity-50',\n twClassName,\n ),\n style,\n ]}\n />\n );\n },\n);\n\nTextArea.displayName = 'TextArea';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.types.cjs","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.types.ts"],"names":[],"mappings":"","sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"TextArea.types.cjs","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n InputPropsShared,\n TextAreaPropsShared,\n} from '@metamask-previews/design-system-shared';\n\nimport type { InputProps } from '../Input/Input.types';\n\n/**\n * Additional props merged onto the `Input` (`../Input/Input.tsx`).\n *\n * TextArea owns `value`, `onChangeText`, `placeholder`, `isReadOnly`, `onFocus`,\n * `onBlur`, `isDisabled`, `autoFocus`, `textVariant`, multiline (always on),\n * and `placeholderTextColor` (Input sets it from theme).\n */\ntype TextAreaInputProps = Omit<\n InputProps,\n | keyof InputPropsShared\n | 'editable'\n | 'multiline'\n | 'onBlur'\n | 'onChangeText'\n | 'onFocus'\n | 'placeholderTextColor'\n>;\n\n/**\n * React Native `TextArea` props: shared textarea state plus the remaining\n * `TextInput` props that are meaningful for the `TextInput`.\n */\nexport type TextAreaProps = TextAreaPropsShared &\n TextAreaInputProps & {\n /**\n * Called when the `TextInput` value changes (React Native naming).\n */\n onChangeText?: InputProps['onChangeText'];\n /**\n * Called when the `TextInput` receives focus (composed with TextArea border state).\n */\n onFocus?: InputProps['onFocus'];\n /**\n * Called when the `TextInput` loses focus (composed with TextArea border state).\n */\n onBlur?: InputProps['onBlur'];\n };\n"]}
|
|
@@ -1,63 +1,30 @@
|
|
|
1
|
-
import type { TextAreaPropsShared } from "@metamask-previews/design-system-shared";
|
|
2
|
-
import type { Ref } from "react";
|
|
3
|
-
import type { StyleProp, TextInput, ViewStyle } from "react-native";
|
|
4
|
-
import type { BoxProps } from "../Box/Box.types.cjs";
|
|
1
|
+
import type { InputPropsShared, TextAreaPropsShared } from "@metamask-previews/design-system-shared";
|
|
5
2
|
import type { InputProps } from "../Input/Input.types.cjs";
|
|
6
3
|
/**
|
|
7
|
-
* Additional props merged onto the
|
|
4
|
+
* Additional props merged onto the `Input` (`../Input/Input.tsx`).
|
|
8
5
|
*
|
|
9
6
|
* TextArea owns `value`, `onChangeText`, `placeholder`, `isReadOnly`, `onFocus`,
|
|
10
|
-
* `onBlur`, `isDisabled`, `autoFocus`, `textVariant`, multiline (always on),
|
|
11
|
-
*
|
|
12
|
-
* omitted (Input sets it from theme).
|
|
7
|
+
* `onBlur`, `isDisabled`, `autoFocus`, `textVariant`, multiline (always on),
|
|
8
|
+
* and `placeholderTextColor` (Input sets it from theme).
|
|
13
9
|
*/
|
|
14
|
-
type TextAreaInputProps = Omit<InputProps,
|
|
10
|
+
type TextAreaInputProps = Omit<InputProps, keyof InputPropsShared | 'editable' | 'multiline' | 'onBlur' | 'onChangeText' | 'onFocus' | 'placeholderTextColor'>;
|
|
15
11
|
/**
|
|
16
|
-
* React Native `TextArea` props
|
|
17
|
-
* `
|
|
18
|
-
* `testID`.
|
|
12
|
+
* React Native `TextArea` props: shared textarea state plus the remaining
|
|
13
|
+
* `TextInput` props that are meaningful for the `TextInput`.
|
|
19
14
|
*/
|
|
20
|
-
export type
|
|
15
|
+
export type TextAreaProps = TextAreaPropsShared & TextAreaInputProps & {
|
|
21
16
|
/**
|
|
22
|
-
* Called when the
|
|
17
|
+
* Called when the `TextInput` value changes (React Native naming).
|
|
23
18
|
*/
|
|
24
|
-
onChangeText?:
|
|
19
|
+
onChangeText?: InputProps['onChangeText'];
|
|
25
20
|
/**
|
|
26
|
-
* Called when the
|
|
21
|
+
* Called when the `TextInput` receives focus (composed with TextArea border state).
|
|
27
22
|
*/
|
|
28
23
|
onFocus?: InputProps['onFocus'];
|
|
29
24
|
/**
|
|
30
|
-
* Called when the
|
|
25
|
+
* Called when the `TextInput` loses focus (composed with TextArea border state).
|
|
31
26
|
*/
|
|
32
27
|
onBlur?: InputProps['onBlur'];
|
|
33
|
-
/**
|
|
34
|
-
* Additional props for the inner `Input`. Do not pass `placeholder`, `isReadOnly`, `onFocus`, `onBlur`, or `multiline` here;
|
|
35
|
-
* use the TextArea-level props where applicable. For accessibility, prefer `accessibilityLabel` and `accessibilityHint` on
|
|
36
|
-
* `inputProps`. `placeholderTextColor` is omitted from the type; the inner `Input` sets it from the theme.
|
|
37
|
-
*/
|
|
38
|
-
inputProps?: TextAreaInputProps;
|
|
39
|
-
/**
|
|
40
|
-
* Ref to the inner `TextInput`. The component `ref` targets the root `Box` (`View`).
|
|
41
|
-
*/
|
|
42
|
-
inputRef?: Ref<TextInput>;
|
|
43
|
-
/**
|
|
44
|
-
* Optional twrnc classes for the root `Box`.
|
|
45
|
-
*/
|
|
46
|
-
twClassName?: string;
|
|
47
|
-
/**
|
|
48
|
-
* Optional style for the root `Box`.
|
|
49
|
-
*/
|
|
50
|
-
style?: StyleProp<ViewStyle>;
|
|
51
|
-
/**
|
|
52
|
-
* Optional test id for the root `Box`.
|
|
53
|
-
*/
|
|
54
|
-
testID?: string;
|
|
55
28
|
};
|
|
56
|
-
type TextAreaReservedBoxKeys = keyof TextAreaBaseProps | 'accessible' | 'children' | 'style';
|
|
57
|
-
/**
|
|
58
|
-
* TextArea props: `TextAreaBaseProps` plus remaining `BoxProps` at the top
|
|
59
|
-
* level, excluding keys reserved by TextArea.
|
|
60
|
-
*/
|
|
61
|
-
export type TextAreaProps = TextAreaBaseProps & Omit<BoxProps, TextAreaReservedBoxKeys>;
|
|
62
29
|
export {};
|
|
63
30
|
//# sourceMappingURL=TextArea.types.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.types.d.cts","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"TextArea.types.d.cts","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,mBAAmB,EACpB,gDAAgD;AAEjD,OAAO,KAAK,EAAE,UAAU,EAAE,iCAA6B;AAEvD;;;;;;GAMG;AACH,KAAK,kBAAkB,GAAG,IAAI,CAC5B,UAAU,EACR,MAAM,gBAAgB,GACtB,UAAU,GACV,WAAW,GACX,QAAQ,GACR,cAAc,GACd,SAAS,GACT,sBAAsB,CACzB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAC7C,kBAAkB,GAAG;IACnB;;OAEG;IACH,YAAY,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC,CAAC;IAC1C;;OAEG;IACH,OAAO,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;IAChC;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;CAC/B,CAAC"}
|
|
@@ -1,63 +1,30 @@
|
|
|
1
|
-
import type { TextAreaPropsShared } from "@metamask-previews/design-system-shared";
|
|
2
|
-
import type { Ref } from "react";
|
|
3
|
-
import type { StyleProp, TextInput, ViewStyle } from "react-native";
|
|
4
|
-
import type { BoxProps } from "../Box/Box.types.mjs";
|
|
1
|
+
import type { InputPropsShared, TextAreaPropsShared } from "@metamask-previews/design-system-shared";
|
|
5
2
|
import type { InputProps } from "../Input/Input.types.mjs";
|
|
6
3
|
/**
|
|
7
|
-
* Additional props merged onto the
|
|
4
|
+
* Additional props merged onto the `Input` (`../Input/Input.tsx`).
|
|
8
5
|
*
|
|
9
6
|
* TextArea owns `value`, `onChangeText`, `placeholder`, `isReadOnly`, `onFocus`,
|
|
10
|
-
* `onBlur`, `isDisabled`, `autoFocus`, `textVariant`, multiline (always on),
|
|
11
|
-
*
|
|
12
|
-
* omitted (Input sets it from theme).
|
|
7
|
+
* `onBlur`, `isDisabled`, `autoFocus`, `textVariant`, multiline (always on),
|
|
8
|
+
* and `placeholderTextColor` (Input sets it from theme).
|
|
13
9
|
*/
|
|
14
|
-
type TextAreaInputProps = Omit<InputProps,
|
|
10
|
+
type TextAreaInputProps = Omit<InputProps, keyof InputPropsShared | 'editable' | 'multiline' | 'onBlur' | 'onChangeText' | 'onFocus' | 'placeholderTextColor'>;
|
|
15
11
|
/**
|
|
16
|
-
* React Native `TextArea` props
|
|
17
|
-
* `
|
|
18
|
-
* `testID`.
|
|
12
|
+
* React Native `TextArea` props: shared textarea state plus the remaining
|
|
13
|
+
* `TextInput` props that are meaningful for the `TextInput`.
|
|
19
14
|
*/
|
|
20
|
-
export type
|
|
15
|
+
export type TextAreaProps = TextAreaPropsShared & TextAreaInputProps & {
|
|
21
16
|
/**
|
|
22
|
-
* Called when the
|
|
17
|
+
* Called when the `TextInput` value changes (React Native naming).
|
|
23
18
|
*/
|
|
24
|
-
onChangeText?:
|
|
19
|
+
onChangeText?: InputProps['onChangeText'];
|
|
25
20
|
/**
|
|
26
|
-
* Called when the
|
|
21
|
+
* Called when the `TextInput` receives focus (composed with TextArea border state).
|
|
27
22
|
*/
|
|
28
23
|
onFocus?: InputProps['onFocus'];
|
|
29
24
|
/**
|
|
30
|
-
* Called when the
|
|
25
|
+
* Called when the `TextInput` loses focus (composed with TextArea border state).
|
|
31
26
|
*/
|
|
32
27
|
onBlur?: InputProps['onBlur'];
|
|
33
|
-
/**
|
|
34
|
-
* Additional props for the inner `Input`. Do not pass `placeholder`, `isReadOnly`, `onFocus`, `onBlur`, or `multiline` here;
|
|
35
|
-
* use the TextArea-level props where applicable. For accessibility, prefer `accessibilityLabel` and `accessibilityHint` on
|
|
36
|
-
* `inputProps`. `placeholderTextColor` is omitted from the type; the inner `Input` sets it from the theme.
|
|
37
|
-
*/
|
|
38
|
-
inputProps?: TextAreaInputProps;
|
|
39
|
-
/**
|
|
40
|
-
* Ref to the inner `TextInput`. The component `ref` targets the root `Box` (`View`).
|
|
41
|
-
*/
|
|
42
|
-
inputRef?: Ref<TextInput>;
|
|
43
|
-
/**
|
|
44
|
-
* Optional twrnc classes for the root `Box`.
|
|
45
|
-
*/
|
|
46
|
-
twClassName?: string;
|
|
47
|
-
/**
|
|
48
|
-
* Optional style for the root `Box`.
|
|
49
|
-
*/
|
|
50
|
-
style?: StyleProp<ViewStyle>;
|
|
51
|
-
/**
|
|
52
|
-
* Optional test id for the root `Box`.
|
|
53
|
-
*/
|
|
54
|
-
testID?: string;
|
|
55
28
|
};
|
|
56
|
-
type TextAreaReservedBoxKeys = keyof TextAreaBaseProps | 'accessible' | 'children' | 'style';
|
|
57
|
-
/**
|
|
58
|
-
* TextArea props: `TextAreaBaseProps` plus remaining `BoxProps` at the top
|
|
59
|
-
* level, excluding keys reserved by TextArea.
|
|
60
|
-
*/
|
|
61
|
-
export type TextAreaProps = TextAreaBaseProps & Omit<BoxProps, TextAreaReservedBoxKeys>;
|
|
62
29
|
export {};
|
|
63
30
|
//# sourceMappingURL=TextArea.types.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.types.d.mts","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"TextArea.types.d.mts","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,mBAAmB,EACpB,gDAAgD;AAEjD,OAAO,KAAK,EAAE,UAAU,EAAE,iCAA6B;AAEvD;;;;;;GAMG;AACH,KAAK,kBAAkB,GAAG,IAAI,CAC5B,UAAU,EACR,MAAM,gBAAgB,GACtB,UAAU,GACV,WAAW,GACX,QAAQ,GACR,cAAc,GACd,SAAS,GACT,sBAAsB,CACzB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAC7C,kBAAkB,GAAG;IACnB;;OAEG;IACH,YAAY,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC,CAAC;IAC1C;;OAEG;IACH,OAAO,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;IAChC;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;CAC/B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.types.mjs","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.types.ts"],"names":[],"mappings":"","sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"TextArea.types.mjs","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n InputPropsShared,\n TextAreaPropsShared,\n} from '@metamask-previews/design-system-shared';\n\nimport type { InputProps } from '../Input/Input.types';\n\n/**\n * Additional props merged onto the `Input` (`../Input/Input.tsx`).\n *\n * TextArea owns `value`, `onChangeText`, `placeholder`, `isReadOnly`, `onFocus`,\n * `onBlur`, `isDisabled`, `autoFocus`, `textVariant`, multiline (always on),\n * and `placeholderTextColor` (Input sets it from theme).\n */\ntype TextAreaInputProps = Omit<\n InputProps,\n | keyof InputPropsShared\n | 'editable'\n | 'multiline'\n | 'onBlur'\n | 'onChangeText'\n | 'onFocus'\n | 'placeholderTextColor'\n>;\n\n/**\n * React Native `TextArea` props: shared textarea state plus the remaining\n * `TextInput` props that are meaningful for the `TextInput`.\n */\nexport type TextAreaProps = TextAreaPropsShared &\n TextAreaInputProps & {\n /**\n * Called when the `TextInput` value changes (React Native naming).\n */\n onChangeText?: InputProps['onChangeText'];\n /**\n * Called when the `TextInput` receives focus (composed with TextArea border state).\n */\n onFocus?: InputProps['onFocus'];\n /**\n * Called when the `TextInput` loses focus (composed with TextArea border state).\n */\n onBlur?: InputProps['onBlur'];\n };\n"]}
|