@wecareu/input-text 0.1.1

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.
Files changed (49) hide show
  1. package/README.md +36 -0
  2. package/lib/commonjs/InputText.js +350 -0
  3. package/lib/commonjs/InputText.js.map +1 -0
  4. package/lib/commonjs/InputText.types.js +6 -0
  5. package/lib/commonjs/InputText.types.js.map +1 -0
  6. package/lib/commonjs/InputTextErrorMessage.js +32 -0
  7. package/lib/commonjs/InputTextErrorMessage.js.map +1 -0
  8. package/lib/commonjs/InputTextIcon.js +65 -0
  9. package/lib/commonjs/InputTextIcon.js.map +1 -0
  10. package/lib/commonjs/animations/shake.js +45 -0
  11. package/lib/commonjs/animations/shake.js.map +1 -0
  12. package/lib/commonjs/index.js +13 -0
  13. package/lib/commonjs/index.js.map +1 -0
  14. package/lib/commonjs/index.stories.js +409 -0
  15. package/lib/commonjs/index.stories.js.map +1 -0
  16. package/lib/module/InputText.js +343 -0
  17. package/lib/module/InputText.js.map +1 -0
  18. package/lib/module/InputText.types.js +2 -0
  19. package/lib/module/InputText.types.js.map +1 -0
  20. package/lib/module/InputTextErrorMessage.js +25 -0
  21. package/lib/module/InputTextErrorMessage.js.map +1 -0
  22. package/lib/module/InputTextIcon.js +58 -0
  23. package/lib/module/InputTextIcon.js.map +1 -0
  24. package/lib/module/animations/shake.js +39 -0
  25. package/lib/module/animations/shake.js.map +1 -0
  26. package/lib/module/index.js +2 -0
  27. package/lib/module/index.js.map +1 -0
  28. package/lib/module/index.stories.js +402 -0
  29. package/lib/module/index.stories.js.map +1 -0
  30. package/lib/typescript/src/InputText.d.ts +5 -0
  31. package/lib/typescript/src/InputText.d.ts.map +1 -0
  32. package/lib/typescript/src/InputText.types.d.ts +146 -0
  33. package/lib/typescript/src/InputText.types.d.ts.map +1 -0
  34. package/lib/typescript/src/InputTextErrorMessage.d.ts +3 -0
  35. package/lib/typescript/src/InputTextErrorMessage.d.ts.map +1 -0
  36. package/lib/typescript/src/InputTextIcon.d.ts +3 -0
  37. package/lib/typescript/src/InputTextIcon.d.ts.map +1 -0
  38. package/lib/typescript/src/animations/shake.d.ts +32 -0
  39. package/lib/typescript/src/animations/shake.d.ts.map +1 -0
  40. package/lib/typescript/src/index.d.ts +3 -0
  41. package/lib/typescript/src/index.d.ts.map +1 -0
  42. package/package.json +66 -0
  43. package/src/InputText.tsx +451 -0
  44. package/src/InputText.types.ts +153 -0
  45. package/src/InputTextErrorMessage.tsx +31 -0
  46. package/src/InputTextIcon.tsx +65 -0
  47. package/src/animations/shake.ts +76 -0
  48. package/src/index.stories.tsx +387 -0
  49. package/src/index.tsx +2 -0
@@ -0,0 +1,402 @@
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
+ import React from 'react';
3
+ import { StyleSheet, View } from 'react-native';
4
+ import { action } from '@storybook/addon-actions';
5
+ import { ICON_NAMES } from '@wecareu/icons';
6
+ import { InputText } from '.';
7
+ const ICON_OPTIONS = ['none', ...ICON_NAMES];
8
+ const INPUT_TYPE_OPTIONS = ['text', 'email', 'password', 'number', 'phone', 'url'];
9
+ const KEYBOARD_OPTIONS = ['default', 'email-address', 'numeric', 'phone-pad', 'url', 'visible-password'];
10
+ const TEXT_CONTENT_OPTIONS = ['none', 'emailAddress', 'username', 'password', 'oneTimeCode', 'telephoneNumber', 'URL'];
11
+ function StatefulInput({
12
+ initialValue = '',
13
+ onChangeText,
14
+ ...rest
15
+ }) {
16
+ const [value, setValue] = React.useState(initialValue);
17
+ const handleChange = React.useCallback(nextValue => {
18
+ setValue(nextValue);
19
+ onChangeText(nextValue);
20
+ }, [onChangeText]);
21
+ return /*#__PURE__*/React.createElement(InputText, _extends({}, rest, {
22
+ onChangeText: handleChange,
23
+ value: value
24
+ }));
25
+ }
26
+ const meta = {
27
+ args: {
28
+ disabled: false,
29
+ initialValue: '',
30
+ inputError: false,
31
+ inputType: 'text',
32
+ keyboardType: 'default',
33
+ leftIconName: 'none',
34
+ locale: 'pt',
35
+ maskNumber: false,
36
+ maxLength: 255,
37
+ minLength: 3,
38
+ onChangeText: action('onChangeText'),
39
+ placeholder: 'Digite seu texto',
40
+ readonly: false,
41
+ rightIconName: 'none',
42
+ secureTextEntry: false,
43
+ textContentType: 'none',
44
+ validateOnBlur: true,
45
+ validationMessage: 'Digite ao menos 3 caracteres',
46
+ validatorMessage: 'Informe um valor válido',
47
+ validatorPattern: ''
48
+ },
49
+ argTypes: {
50
+ disabled: {
51
+ control: 'boolean'
52
+ },
53
+ formatter: {
54
+ control: false
55
+ },
56
+ initialValue: {
57
+ control: 'text'
58
+ },
59
+ inputError: {
60
+ control: 'boolean'
61
+ },
62
+ inputStyle: {
63
+ control: false
64
+ },
65
+ inputType: {
66
+ control: {
67
+ type: 'select'
68
+ },
69
+ options: INPUT_TYPE_OPTIONS
70
+ },
71
+ keyboardType: {
72
+ control: {
73
+ type: 'select'
74
+ },
75
+ options: KEYBOARD_OPTIONS
76
+ },
77
+ leftIcon: {
78
+ control: false
79
+ },
80
+ leftIconName: {
81
+ control: {
82
+ type: 'select'
83
+ },
84
+ options: ICON_OPTIONS
85
+ },
86
+ locale: {
87
+ control: {
88
+ type: 'select'
89
+ },
90
+ options: ['pt', 'en']
91
+ },
92
+ maskNumber: {
93
+ control: 'boolean'
94
+ },
95
+ maxLength: {
96
+ control: {
97
+ min: 1,
98
+ step: 1,
99
+ type: 'number'
100
+ }
101
+ },
102
+ minLength: {
103
+ control: {
104
+ min: 0,
105
+ step: 1,
106
+ type: 'number'
107
+ }
108
+ },
109
+ nextInputRef: {
110
+ control: false
111
+ },
112
+ onChangeText: {
113
+ control: false
114
+ },
115
+ parser: {
116
+ control: false
117
+ },
118
+ placeholder: {
119
+ control: 'text'
120
+ },
121
+ readonly: {
122
+ control: 'boolean'
123
+ },
124
+ rightIcon: {
125
+ control: false
126
+ },
127
+ rightIconName: {
128
+ control: {
129
+ type: 'select'
130
+ },
131
+ options: ICON_OPTIONS
132
+ },
133
+ secureTextEntry: {
134
+ control: 'boolean'
135
+ },
136
+ style: {
137
+ control: false
138
+ },
139
+ textContentType: {
140
+ control: {
141
+ type: 'select'
142
+ },
143
+ options: TEXT_CONTENT_OPTIONS
144
+ },
145
+ validateOnBlur: {
146
+ control: 'boolean'
147
+ },
148
+ validationMessage: {
149
+ control: 'text'
150
+ },
151
+ validator: {
152
+ control: false
153
+ },
154
+ validatorMessage: {
155
+ control: 'text'
156
+ },
157
+ validatorPattern: {
158
+ control: 'text'
159
+ },
160
+ value: {
161
+ control: false
162
+ }
163
+ },
164
+ component: InputText,
165
+ parameters: {
166
+ layout: 'centered'
167
+ },
168
+ tags: ['autodocs'],
169
+ title: 'Forms/InputText'
170
+ };
171
+ export default meta;
172
+ export const Default = {
173
+ render: args => {
174
+ const {
175
+ initialValue,
176
+ inputType,
177
+ keyboardType,
178
+ leftIconName,
179
+ locale,
180
+ maskNumber,
181
+ rightIconName,
182
+ textContentType,
183
+ validatorPattern,
184
+ validatorMessage,
185
+ ...inputArgs
186
+ } = args;
187
+ let derivedPlaceholder = inputArgs.placeholder;
188
+ let derivedSecureTextEntry = inputArgs.secureTextEntry;
189
+ let derivedKeyboardType = keyboardType;
190
+ let derivedTextContentType = textContentType;
191
+ let derivedValidatorPattern = validatorPattern;
192
+ let derivedValidatorMessage = validatorMessage;
193
+ switch (inputType) {
194
+ case 'email':
195
+ derivedPlaceholder = 'Email';
196
+ derivedSecureTextEntry = false;
197
+ derivedKeyboardType = 'email-address';
198
+ derivedTextContentType = 'emailAddress';
199
+ derivedValidatorPattern = '.+@.+\\..+';
200
+ derivedValidatorMessage = validatorMessage || 'Informe um email válido';
201
+ break;
202
+ case 'password':
203
+ derivedPlaceholder = 'Senha';
204
+ derivedSecureTextEntry = true;
205
+ derivedKeyboardType = 'visible-password';
206
+ derivedTextContentType = 'password';
207
+ derivedValidatorPattern = validatorPattern;
208
+ derivedValidatorMessage = validatorMessage || 'Informe uma senha válida';
209
+ break;
210
+ case 'number':
211
+ derivedPlaceholder = 'Número';
212
+ derivedSecureTextEntry = false;
213
+ derivedKeyboardType = 'numeric';
214
+ derivedTextContentType = 'none';
215
+ derivedValidatorPattern = validatorPattern || '^[0-9]+$';
216
+ derivedValidatorMessage = validatorMessage || 'Informe apenas números';
217
+ break;
218
+ case 'phone':
219
+ derivedPlaceholder = 'Telefone';
220
+ derivedSecureTextEntry = false;
221
+ derivedKeyboardType = 'phone-pad';
222
+ derivedTextContentType = 'telephoneNumber';
223
+ derivedValidatorPattern = validatorPattern || '^[0-9()\\s+-]{6,}$';
224
+ derivedValidatorMessage = validatorMessage || 'Informe um telefone válido';
225
+ break;
226
+ case 'url':
227
+ derivedPlaceholder = 'URL';
228
+ derivedSecureTextEntry = false;
229
+ derivedKeyboardType = 'url';
230
+ derivedTextContentType = 'URL';
231
+ derivedValidatorPattern = validatorPattern || '^(https?:\\/\\/).+';
232
+ derivedValidatorMessage = validatorMessage || 'Informe uma URL válida';
233
+ break;
234
+ default:
235
+ derivedPlaceholder = derivedPlaceholder || 'Digite seu texto';
236
+ derivedSecureTextEntry = false;
237
+ derivedKeyboardType = 'default';
238
+ derivedTextContentType = 'none';
239
+ derivedValidatorPattern = validatorPattern;
240
+ derivedValidatorMessage = validatorMessage || 'Informe um valor válido';
241
+ break;
242
+ }
243
+ let patternValidator;
244
+ if (derivedValidatorPattern && derivedValidatorPattern.trim().length > 0) {
245
+ try {
246
+ const regex = new RegExp(derivedValidatorPattern);
247
+ patternValidator = value => regex.test(value);
248
+ } catch {
249
+ patternValidator = undefined;
250
+ }
251
+ }
252
+ const leftIcon = leftIconName && leftIconName !== 'none' ? {
253
+ name: leftIconName
254
+ } : undefined;
255
+ const rightIcon = rightIconName && rightIconName !== 'none' ? {
256
+ name: rightIconName
257
+ } : undefined;
258
+ const finalValidator = patternValidator ?? inputArgs.validator;
259
+ const finalValidatorMessage = patternValidator ? derivedValidatorMessage : inputArgs.validatorMessage;
260
+ return /*#__PURE__*/React.createElement(View, {
261
+ style: styles.container
262
+ }, /*#__PURE__*/React.createElement(StatefulInput, _extends({}, inputArgs, {
263
+ initialValue: initialValue ?? '',
264
+ keyboardType: derivedKeyboardType,
265
+ leftIcon: leftIcon,
266
+ locale: locale,
267
+ maskNumber: maskNumber,
268
+ placeholder: derivedPlaceholder,
269
+ rightIcon: rightIcon,
270
+ secureTextEntry: derivedSecureTextEntry,
271
+ textContentType: derivedTextContentType === 'none' ? undefined : derivedTextContentType,
272
+ type: inputType,
273
+ validator: finalValidator,
274
+ validatorMessage: finalValidatorMessage
275
+ })));
276
+ }
277
+ };
278
+ export const WithError = {
279
+ render: args => /*#__PURE__*/React.createElement(View, {
280
+ style: styles.container
281
+ }, /*#__PURE__*/React.createElement(StatefulInput, _extends({}, args, {
282
+ errorMessage: "Campo obrigat\xF3rio",
283
+ initialValue: "texto",
284
+ inputError: true
285
+ })))
286
+ };
287
+ export const Disabled = {
288
+ render: args => /*#__PURE__*/React.createElement(View, {
289
+ style: styles.container
290
+ }, /*#__PURE__*/React.createElement(StatefulInput, _extends({}, args, {
291
+ disabled: true,
292
+ initialValue: "texto desabilitado"
293
+ })))
294
+ };
295
+ export const Readonly = {
296
+ render: args => /*#__PURE__*/React.createElement(View, {
297
+ style: styles.container
298
+ }, /*#__PURE__*/React.createElement(StatefulInput, _extends({}, args, {
299
+ initialValue: "valor somente leitura",
300
+ readonly: true
301
+ })))
302
+ };
303
+ export const WithLeftIcon = {
304
+ render: args => /*#__PURE__*/React.createElement(View, {
305
+ style: styles.container
306
+ }, /*#__PURE__*/React.createElement(StatefulInput, _extends({}, args, {
307
+ initialValue: "",
308
+ leftIcon: {
309
+ name: 'search'
310
+ },
311
+ placeholder: "Buscar"
312
+ })))
313
+ };
314
+ export const WithRightIcon = {
315
+ render: args => /*#__PURE__*/React.createElement(View, {
316
+ style: styles.container
317
+ }, /*#__PURE__*/React.createElement(StatefulInput, _extends({}, args, {
318
+ initialValue: "andre@wecareu.com",
319
+ placeholder: "Email",
320
+ rightIcon: {
321
+ name: 'mail'
322
+ }
323
+ })))
324
+ };
325
+ export const PasswordToggle = {
326
+ render: args => {
327
+ const [secure, setSecure] = React.useState(true);
328
+ return /*#__PURE__*/React.createElement(View, {
329
+ style: styles.container
330
+ }, /*#__PURE__*/React.createElement(StatefulInput, _extends({}, args, {
331
+ initialValue: "",
332
+ placeholder: "Senha",
333
+ rightIcon: {
334
+ accessibilityLabel: secure ? 'Mostrar senha' : 'Ocultar senha',
335
+ name: secure ? 'eyeOff' : 'eyeOn',
336
+ onPress: () => setSecure(previous => !previous)
337
+ },
338
+ secureTextEntry: secure
339
+ })));
340
+ }
341
+ };
342
+ export const WithMask = {
343
+ render: args => {
344
+ const formatter = React.useCallback(raw => {
345
+ const digits = raw.replace(/\D/g, '').slice(0, 11);
346
+ return digits.replace(/(\d{3})(\d)/, '$1.$2').replace(/(\d{3})(\d)/, '$1.$2').replace(/(\d{3})(\d{1,2})$/, '$1-$2');
347
+ }, []);
348
+ const parser = React.useCallback(masked => masked.replace(/\D/g, ''), []);
349
+ return /*#__PURE__*/React.createElement(View, {
350
+ style: styles.container
351
+ }, /*#__PURE__*/React.createElement(StatefulInput, _extends({}, args, {
352
+ formatter: formatter,
353
+ initialValue: "12345678901",
354
+ placeholder: "CPF",
355
+ parser: parser
356
+ })));
357
+ }
358
+ };
359
+ export const FocusChain = {
360
+ render: args => {
361
+ const secondInputRef = React.useRef(null);
362
+ const [first, setFirst] = React.useState('');
363
+ const [second, setSecond] = React.useState('');
364
+ const {
365
+ onChangeText,
366
+ ...rest
367
+ } = args;
368
+ return /*#__PURE__*/React.createElement(View, {
369
+ style: styles.column
370
+ }, /*#__PURE__*/React.createElement(InputText, _extends({}, rest, {
371
+ nextInputRef: secondInputRef,
372
+ onChangeText: value => {
373
+ setFirst(value);
374
+ onChangeText(value);
375
+ },
376
+ placeholder: "Primeiro campo",
377
+ value: first
378
+ })), /*#__PURE__*/React.createElement(View, {
379
+ style: styles.columnSpacing
380
+ }, /*#__PURE__*/React.createElement(InputText, _extends({}, rest, {
381
+ onChangeText: value => {
382
+ setSecond(value);
383
+ onChangeText(value);
384
+ },
385
+ placeholder: "Segundo campo",
386
+ ref: secondInputRef,
387
+ value: second
388
+ }))));
389
+ }
390
+ };
391
+ const styles = StyleSheet.create({
392
+ column: {
393
+ width: '100%'
394
+ },
395
+ columnSpacing: {
396
+ marginTop: 16
397
+ },
398
+ container: {
399
+ width: 320
400
+ }
401
+ });
402
+ //# sourceMappingURL=index.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","StyleSheet","View","action","ICON_NAMES","InputText","ICON_OPTIONS","INPUT_TYPE_OPTIONS","KEYBOARD_OPTIONS","TEXT_CONTENT_OPTIONS","StatefulInput","initialValue","onChangeText","rest","value","setValue","useState","handleChange","useCallback","nextValue","createElement","_extends","meta","args","disabled","inputError","inputType","keyboardType","leftIconName","locale","maskNumber","maxLength","minLength","placeholder","readonly","rightIconName","secureTextEntry","textContentType","validateOnBlur","validationMessage","validatorMessage","validatorPattern","argTypes","control","formatter","inputStyle","type","options","leftIcon","min","step","nextInputRef","parser","rightIcon","style","validator","component","parameters","layout","tags","title","Default","render","inputArgs","derivedPlaceholder","derivedSecureTextEntry","derivedKeyboardType","derivedTextContentType","derivedValidatorPattern","derivedValidatorMessage","patternValidator","trim","length","regex","RegExp","test","undefined","name","finalValidator","finalValidatorMessage","styles","container","WithError","errorMessage","Disabled","Readonly","WithLeftIcon","WithRightIcon","PasswordToggle","secure","setSecure","accessibilityLabel","onPress","previous","WithMask","raw","digits","replace","slice","masked","FocusChain","secondInputRef","useRef","first","setFirst","second","setSecond","column","columnSpacing","ref","create","width","marginTop"],"sourceRoot":"..\\..\\src","sources":["index.stories.tsx"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,UAAU,EAAaC,IAAI,QAAQ,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MACpBvF,KAAK,EAAE2F;IAAO,EACf,CACG,CACF,CAAC;EAEX;AACF,CAAC;AAED,MAAMzB,MAAM,GAAG/E,UAAU,CAAC6G,MAAM,CAAC;EAC/BH,MAAM,EAAE;IACNI,KAAK,EAAE;EACT,CAAC;EACDH,aAAa,EAAE;IACbI,SAAS,EAAE;EACb,CAAC;EACD/B,SAAS,EAAE;IACT8B,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { TextInput } from 'react-native';
3
+ import type { InputTextProps } from './InputText.types';
4
+ export declare const InputText: React.ForwardRefExoticComponent<InputTextProps & React.RefAttributes<TextInput>>;
5
+ //# sourceMappingURL=InputText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputText.d.ts","sourceRoot":"","sources":["../../../src/InputText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAwB,SAAS,EAAQ,MAAM,cAAc,CAAA;AAMpE,OAAO,KAAK,EAAmB,cAAc,EAAiB,MAAM,mBAAmB,CAAA;AAcvF,eAAO,MAAM,SAAS,kFAmOpB,CAAA"}
@@ -0,0 +1,146 @@
1
+ import type { RefObject } from 'react';
2
+ import type { StyleProp, TextInput, TextInputProps, TextStyle, ViewStyle } from 'react-native';
3
+ import type { IconName } from '@wecareu/icons';
4
+ export type InputTextType = 'text' | 'email' | 'password' | 'number' | 'url' | 'tel';
5
+ export type InputTextLocale = 'pt' | 'en';
6
+ export interface InputTextErrorMessageProps {
7
+ /**
8
+ * Text displayed underneath the field when it is in error state
9
+ */
10
+ message?: string;
11
+ /**
12
+ * Optional identifier exposed for automated tests
13
+ */
14
+ testID?: string;
15
+ }
16
+ export interface InputTextIconProps {
17
+ /**
18
+ * Accessibility label announced for screen readers
19
+ */
20
+ accessibilityLabel?: string;
21
+ /**
22
+ * Icon tint color. Falls back to theme.colors.text.tertiary when undefined
23
+ */
24
+ color?: string;
25
+ /**
26
+ * Icon identifier available in WeCareU icons package
27
+ */
28
+ name: IconName;
29
+ /**
30
+ * Press handler triggered when icon is tapped
31
+ */
32
+ onPress?: () => void;
33
+ /**
34
+ * Icon size in pixels. Defaults to theme.spacing.lg
35
+ */
36
+ size?: number;
37
+ /**
38
+ * Testing identifier used in automated tests
39
+ */
40
+ testID?: string;
41
+ }
42
+ export interface InputTextProps extends Omit<TextInputProps, 'editable' | 'onChangeText' | 'placeholderTextColor' | 'style' | 'value'> {
43
+ /**
44
+ * Callback invoked with the raw value (without mask) whenever text changes
45
+ */
46
+ onChangeText: (value: string) => void;
47
+ /**
48
+ * Defines the controlled value without mask formatting
49
+ */
50
+ value: string;
51
+ /**
52
+ * Defines locale used for automatic formatting/validation when type requires it
53
+ */
54
+ locale?: InputTextLocale;
55
+ /**
56
+ * Enables automatic masking for numeric inputs (thousands separators)
57
+ */
58
+ maskNumber?: boolean;
59
+ /**
60
+ * Semantic type used to infer validation and masking rules
61
+ */
62
+ type?: InputTextType;
63
+ /**
64
+ * Displays a disabled appearance and blocks user interaction
65
+ */
66
+ disabled?: boolean;
67
+ /**
68
+ * Optional error message rendered below the field when in error state
69
+ */
70
+ errorMessage?: string;
71
+ /**
72
+ * Transforms the controlled raw value into a formatted string for display
73
+ */
74
+ formatter?: (value: string) => string;
75
+ /**
76
+ * Shows the component using error tokens, triggering shake animation
77
+ */
78
+ inputError?: boolean;
79
+ /**
80
+ * Applies style overrides directly to the TextInput element
81
+ */
82
+ inputStyle?: StyleProp<TextStyle>;
83
+ /**
84
+ * Icon rendered on the left side of the field
85
+ */
86
+ leftIcon?: InputTextIconProps;
87
+ /**
88
+ * Maximum length allowed for the displayed value. Defaults to 255
89
+ */
90
+ maxLength?: number;
91
+ /**
92
+ * Minimum length expectation for the raw value. Defaults to 3
93
+ */
94
+ minLength?: number;
95
+ /**
96
+ * Reference to the next input triggered when submitting the keyboard action
97
+ */
98
+ nextInputRef?: RefObject<TextInput>;
99
+ /**
100
+ * Receives the validation status whenever internal validation runs.
101
+ */
102
+ onValidation?: (isValid: boolean) => void;
103
+ /**
104
+ * Parses the masked value typed by the user back into raw format
105
+ */
106
+ parser?: (value: string) => string;
107
+ /**
108
+ * Placeholder string displayed when empty
109
+ */
110
+ placeholder?: string;
111
+ /**
112
+ * Renders the field as read-only, mirroring disabled visuals
113
+ */
114
+ readonly?: boolean;
115
+ /**
116
+ * Icon rendered on the right side of the field
117
+ */
118
+ rightIcon?: InputTextIconProps;
119
+ /**
120
+ * Applies style overrides to the container View
121
+ */
122
+ style?: StyleProp<ViewStyle>;
123
+ /**
124
+ * Test identifier exposed on the container
125
+ */
126
+ testID?: string;
127
+ /**
128
+ * Enables internal validation when the field loses focus.
129
+ * Defaults to true.
130
+ */
131
+ validateOnBlur?: boolean;
132
+ /**
133
+ * Message displayed when internal validation fails (min/max length).
134
+ */
135
+ validationMessage?: string;
136
+ /**
137
+ * Custom validator executed when validateOnBlur is enabled.
138
+ * Return true for valid values.
139
+ */
140
+ validator?: (value: string) => boolean;
141
+ /**
142
+ * Message displayed when custom validator returns false.
143
+ */
144
+ validatorMessage?: string;
145
+ }
146
+ //# sourceMappingURL=InputText.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputText.types.d.ts","sourceRoot":"","sources":["../../../src/InputText.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE9F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAE9C,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,KAAK,CAAA;AAEpF,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,IAAI,CAAA;AAEzC,MAAM,WAA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E,MAAM,CAAA;IAClB;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IACnC;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;IACzC;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IAClC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,kBAAkB,CAAA;IAC9B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IAC5B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B;;;OAGG;IACH,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAA;IACtC;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B"}
@@ -0,0 +1,3 @@
1
+ import type { InputTextErrorMessageProps } from './InputText.types';
2
+ export declare function InputTextErrorMessage({ message, testID }: InputTextErrorMessageProps): JSX.Element | null;
3
+ //# sourceMappingURL=InputTextErrorMessage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputTextErrorMessage.d.ts","sourceRoot":"","sources":["../../../src/InputTextErrorMessage.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAA;AAEnE,wBAAgB,qBAAqB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,0BAA0B,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CAsBzG"}
@@ -0,0 +1,3 @@
1
+ import type { InputTextIconProps } from './InputText.types';
2
+ export declare function InputTextIcon({ accessibilityLabel, color, name, onPress, size, testID }: InputTextIconProps): JSX.Element;
3
+ //# sourceMappingURL=InputTextIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputTextIcon.d.ts","sourceRoot":"","sources":["../../../src/InputTextIcon.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAE3D,wBAAgB,aAAa,CAAC,EAC5B,kBAAkB,EAClB,KAAK,EACL,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,MAAM,EACP,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAqClC"}
@@ -0,0 +1,32 @@
1
+ import { Animated } from 'react-native';
2
+ interface UseShakeAnimationParams {
3
+ /**
4
+ * Distance in pixels applied to the shake translation
5
+ */
6
+ distance?: number;
7
+ /**
8
+ * Duration of each shake step in milliseconds
9
+ */
10
+ duration?: number;
11
+ /**
12
+ * Number of oscillations executed per trigger
13
+ */
14
+ iterations?: number;
15
+ }
16
+ interface UseShakeAnimationReturn {
17
+ /**
18
+ * Animated style applied to the container that needs feedback
19
+ */
20
+ animatedStyle: {
21
+ transform: {
22
+ translateX: Animated.AnimatedInterpolation<number>;
23
+ }[];
24
+ };
25
+ /**
26
+ * Function responsible for starting the shake effect
27
+ */
28
+ triggerShake: () => void;
29
+ }
30
+ export declare function useShakeAnimation({ distance, duration, iterations }?: UseShakeAnimationParams): UseShakeAnimationReturn;
31
+ export {};
32
+ //# sourceMappingURL=shake.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shake.d.ts","sourceRoot":"","sources":["../../../../src/animations/shake.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAEvC,UAAU,uBAAuB;IAC/B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,UAAU,uBAAuB;IAC/B;;OAEG;IACH,aAAa,EAAE;QACb,SAAS,EAAE;YAAE,UAAU,EAAE,QAAQ,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAA;SAAE,EAAE,CAAA;KACpE,CAAA;IACD;;OAEG;IACH,YAAY,EAAE,MAAM,IAAI,CAAA;CACzB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,QAAY,EACZ,QAAa,EACb,UAAc,EACf,GAAE,uBAA4B,GAAG,uBAAuB,CAuCxD"}
@@ -0,0 +1,3 @@
1
+ export { InputText } from './InputText';
2
+ export type { InputTextErrorMessageProps, InputTextIconProps, InputTextProps } from './InputText.types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,YAAY,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA"}