react-native-ui-lib 7.41.1 → 7.42.0-snapshot.6978
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/lib/components/Keyboard/KeyboardInput/TextInputKeyboardManager/TextInputKeyboardManager.ios.js +1 -1
- package/lib/package.json +1 -1
- package/package.json +1 -1
- package/searchInput.d.ts +2 -0
- package/searchInput.js +1 -0
- package/src/components/button/button.api.json +5 -197
- package/src/components/chip/chip.driver.d.ts +33 -0
- package/src/components/chip/chip.driver.js +56 -0
- package/src/components/index.js +3 -0
- package/src/components/picker/Picker.driver.new.d.ts +32 -0
- package/src/components/picker/Picker.driver.new.js +7 -5
- package/src/components/picker/helpers/useNewPickerProps.js +11 -7
- package/src/components/searchInput/index.d.ts +37 -0
- package/src/components/searchInput/index.js +218 -0
- package/src/components/searchInput/searchInput.api.json +57 -0
- package/src/components/searchInput/types.d.ts +66 -0
- package/src/components/searchInput/types.js +5 -0
- package/src/components/tabController/apis/tabController.api.json +21 -5
- package/src/components/textField/useImperativeInputHandle.js +2 -0
- package/src/components/timeline/Line.d.ts +1 -0
- package/src/components/timeline/Line.js +5 -4
- package/src/components/timeline/Point.d.ts +1 -0
- package/src/components/timeline/Point.js +5 -4
- package/src/components/timeline/index.js +6 -5
- package/src/components/timeline/line.driver.d.ts +10 -0
- package/src/components/timeline/line.driver.js +40 -0
- package/src/components/timeline/point.driver.d.ts +8 -0
- package/src/components/timeline/point.driver.js +55 -0
- package/src/components/timeline/timeline.driver.d.ts +25 -0
- package/src/components/timeline/timeline.driver.js +39 -0
- package/src/components/wizard/wizard.api.json +7 -7
- package/src/index.d.ts +1 -0
- package/src/index.js +28 -0
- package/src/testkit/index.d.ts +2 -0
- package/src/testkit/index.js +3 -1
|
@@ -45,7 +45,7 @@ export default class TextInputKeyboardManager {
|
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
function findNodeHandle(ref) {
|
|
48
|
-
return ReactNative.findNodeHandle(ref.current || ref);
|
|
48
|
+
return ref.current?.getNodeHandle?.() || ref?.getNodeHandle?.() || ReactNative.findNodeHandle(ref.current || ref);
|
|
49
49
|
}
|
|
50
50
|
const springAnimation = {
|
|
51
51
|
duration: 400,
|
package/lib/package.json
CHANGED
package/package.json
CHANGED
package/searchInput.d.ts
ADDED
package/searchInput.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./src/components/searchInput').default;
|
|
@@ -237,89 +237,12 @@
|
|
|
237
237
|
},
|
|
238
238
|
{
|
|
239
239
|
"type": "section",
|
|
240
|
-
"title": "
|
|
240
|
+
"title": "Button",
|
|
241
241
|
"description": ""
|
|
242
242
|
},
|
|
243
243
|
{
|
|
244
244
|
"type": "table",
|
|
245
|
-
"columns": ["Property", "
|
|
246
|
-
"items": [
|
|
247
|
-
{
|
|
248
|
-
"title": "Primary",
|
|
249
|
-
"description": "",
|
|
250
|
-
"content": [
|
|
251
|
-
{
|
|
252
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_priority_primary.png"
|
|
253
|
-
}
|
|
254
|
-
]
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
"title": "Secondary",
|
|
258
|
-
"description": "",
|
|
259
|
-
"content": [
|
|
260
|
-
{
|
|
261
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_priority_secondary.png"
|
|
262
|
-
}
|
|
263
|
-
]
|
|
264
|
-
}
|
|
265
|
-
],
|
|
266
|
-
"title": "",
|
|
267
|
-
"description": "",
|
|
268
|
-
"name": "Priority"
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
"type": "table",
|
|
272
|
-
"columns": ["Property", "Primary", "Secondary"],
|
|
273
|
-
"items": [
|
|
274
|
-
{
|
|
275
|
-
"title": "Main",
|
|
276
|
-
"description": "The default button style, used for most actions.",
|
|
277
|
-
"content": [
|
|
278
|
-
{
|
|
279
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_presets_mainPrimary.png"
|
|
280
|
-
},
|
|
281
|
-
{
|
|
282
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_presets_mainSecondary.png"
|
|
283
|
-
}
|
|
284
|
-
]
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
"title": "Inverted",
|
|
288
|
-
"description": "Used on top of images and dark background. ",
|
|
289
|
-
"content": [
|
|
290
|
-
{
|
|
291
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_presets_invertedPrimary.png"
|
|
292
|
-
},
|
|
293
|
-
{
|
|
294
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_presets_invertedSecondary.png"
|
|
295
|
-
}
|
|
296
|
-
]
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
"title": "Destructive",
|
|
300
|
-
"description": "Used for destructive actions such as Delete and Log out. ",
|
|
301
|
-
"content": [
|
|
302
|
-
{
|
|
303
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_presets_distructivePrimary.png"
|
|
304
|
-
},
|
|
305
|
-
{
|
|
306
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_presets_distructiveSecondary.png"
|
|
307
|
-
}
|
|
308
|
-
]
|
|
309
|
-
}
|
|
310
|
-
],
|
|
311
|
-
"title": "",
|
|
312
|
-
"description": "",
|
|
313
|
-
"name": "Presets"
|
|
314
|
-
},
|
|
315
|
-
{
|
|
316
|
-
"type": "section",
|
|
317
|
-
"title": "States",
|
|
318
|
-
"description": ""
|
|
319
|
-
},
|
|
320
|
-
{
|
|
321
|
-
"type": "table",
|
|
322
|
-
"columns": ["Property", "Primary", "Secondary"],
|
|
245
|
+
"columns": ["Property", "Default", "Outline"],
|
|
323
246
|
"items": [
|
|
324
247
|
{
|
|
325
248
|
"title": "Active",
|
|
@@ -333,18 +256,6 @@
|
|
|
333
256
|
}
|
|
334
257
|
]
|
|
335
258
|
},
|
|
336
|
-
{
|
|
337
|
-
"title": "Loading",
|
|
338
|
-
"description": "",
|
|
339
|
-
"content": [
|
|
340
|
-
{
|
|
341
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_states_mainLoadingPrimary.png"
|
|
342
|
-
},
|
|
343
|
-
{
|
|
344
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_states_mainLoadingSecondary.png"
|
|
345
|
-
}
|
|
346
|
-
]
|
|
347
|
-
},
|
|
348
259
|
{
|
|
349
260
|
"title": "Disabled",
|
|
350
261
|
"description": "",
|
|
@@ -362,51 +273,6 @@
|
|
|
362
273
|
"description": "",
|
|
363
274
|
"name": "Main"
|
|
364
275
|
},
|
|
365
|
-
{
|
|
366
|
-
"type": "table",
|
|
367
|
-
"columns": ["Property", "Primary", "Secondary"],
|
|
368
|
-
"items": [
|
|
369
|
-
{
|
|
370
|
-
"title": "Active",
|
|
371
|
-
"description": "",
|
|
372
|
-
"content": [
|
|
373
|
-
{
|
|
374
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_states_invertedActivePrimary.png"
|
|
375
|
-
},
|
|
376
|
-
{
|
|
377
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_states_invertedActiveSecondary.png"
|
|
378
|
-
}
|
|
379
|
-
]
|
|
380
|
-
},
|
|
381
|
-
{
|
|
382
|
-
"title": "Loading",
|
|
383
|
-
"description": "",
|
|
384
|
-
"content": [
|
|
385
|
-
{
|
|
386
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_states_invertedLoadingPrimary.png"
|
|
387
|
-
},
|
|
388
|
-
{
|
|
389
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_states_invertedLoadingSecondary.png"
|
|
390
|
-
}
|
|
391
|
-
]
|
|
392
|
-
},
|
|
393
|
-
{
|
|
394
|
-
"title": "Disabled",
|
|
395
|
-
"description": "",
|
|
396
|
-
"content": [
|
|
397
|
-
{
|
|
398
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_states_invertedDisabledPrimary.png"
|
|
399
|
-
},
|
|
400
|
-
{
|
|
401
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_states_invertedDisabledSecondary.png"
|
|
402
|
-
}
|
|
403
|
-
]
|
|
404
|
-
}
|
|
405
|
-
],
|
|
406
|
-
"title": "",
|
|
407
|
-
"description": "",
|
|
408
|
-
"name": "Inverted"
|
|
409
|
-
},
|
|
410
276
|
{
|
|
411
277
|
"type": "table",
|
|
412
278
|
"columns": ["Property", "Component"],
|
|
@@ -478,7 +344,7 @@
|
|
|
478
344
|
"columns": ["Property", "Component"],
|
|
479
345
|
"items": [
|
|
480
346
|
{
|
|
481
|
-
"title": "
|
|
347
|
+
"title": "Default",
|
|
482
348
|
"description": "",
|
|
483
349
|
"content": [
|
|
484
350
|
{
|
|
@@ -487,7 +353,7 @@
|
|
|
487
353
|
]
|
|
488
354
|
},
|
|
489
355
|
{
|
|
490
|
-
"title": "
|
|
356
|
+
"title": "Outline",
|
|
491
357
|
"description": "",
|
|
492
358
|
"content": [
|
|
493
359
|
{
|
|
@@ -499,37 +365,6 @@
|
|
|
499
365
|
"title": "Priority",
|
|
500
366
|
"description": ""
|
|
501
367
|
},
|
|
502
|
-
{
|
|
503
|
-
"type": "table",
|
|
504
|
-
"columns": ["Property", "Primary", "Secondary"],
|
|
505
|
-
"items": [
|
|
506
|
-
{
|
|
507
|
-
"title": "Main",
|
|
508
|
-
"description": "The default button style, used for most actions.",
|
|
509
|
-
"content": [
|
|
510
|
-
{
|
|
511
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_iconButton_presets_mainPrimary.png"
|
|
512
|
-
},
|
|
513
|
-
{
|
|
514
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_iconButton_presets_mainSecondary.png"
|
|
515
|
-
}
|
|
516
|
-
]
|
|
517
|
-
},
|
|
518
|
-
{
|
|
519
|
-
"title": "Inverted",
|
|
520
|
-
"description": "Used on top of images and dark background. ",
|
|
521
|
-
"content": [
|
|
522
|
-
{
|
|
523
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_iconButton_presets_invertedPrimary.png"
|
|
524
|
-
},
|
|
525
|
-
{
|
|
526
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_iconButton_presets_invertedSecondary.png"
|
|
527
|
-
}
|
|
528
|
-
]
|
|
529
|
-
}
|
|
530
|
-
],
|
|
531
|
-
"title": "Presets"
|
|
532
|
-
},
|
|
533
368
|
{
|
|
534
369
|
"type": "section",
|
|
535
370
|
"title": "States",
|
|
@@ -537,7 +372,7 @@
|
|
|
537
372
|
},
|
|
538
373
|
{
|
|
539
374
|
"type": "table",
|
|
540
|
-
"columns": ["Property", "
|
|
375
|
+
"columns": ["Property", "Default", "Outline"],
|
|
541
376
|
"items": [
|
|
542
377
|
{
|
|
543
378
|
"title": "Active",
|
|
@@ -596,15 +431,6 @@
|
|
|
596
431
|
}
|
|
597
432
|
]
|
|
598
433
|
},
|
|
599
|
-
{
|
|
600
|
-
"title": "Destructive",
|
|
601
|
-
"description": "text style: bodyBold, $textDangerLight",
|
|
602
|
-
"content": [
|
|
603
|
-
{
|
|
604
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_linkButton_presets_distructive.png"
|
|
605
|
-
}
|
|
606
|
-
]
|
|
607
|
-
},
|
|
608
434
|
{
|
|
609
435
|
"title": "Disabled",
|
|
610
436
|
"description": "text style: bodyBold, $textDisabled",
|
|
@@ -691,24 +517,6 @@
|
|
|
691
517
|
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_fullWidth_presets_main.png"
|
|
692
518
|
}
|
|
693
519
|
]
|
|
694
|
-
},
|
|
695
|
-
{
|
|
696
|
-
"title": "Destructive ",
|
|
697
|
-
"description": "",
|
|
698
|
-
"content": [
|
|
699
|
-
{
|
|
700
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_fullWidth_presets_destructive.png"
|
|
701
|
-
}
|
|
702
|
-
]
|
|
703
|
-
},
|
|
704
|
-
{
|
|
705
|
-
"title": "Premium",
|
|
706
|
-
"description": "",
|
|
707
|
-
"content": [
|
|
708
|
-
{
|
|
709
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_fullWidth_presets_premium.png"
|
|
710
|
-
}
|
|
711
|
-
]
|
|
712
520
|
}
|
|
713
521
|
],
|
|
714
522
|
"title": "Presets",
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ComponentProps } from '../../testkit/new/Component.driver';
|
|
2
|
+
export declare const ChipDriver: (props: ComponentProps) => {
|
|
3
|
+
getLabel: () => {
|
|
4
|
+
getText: () => string | (string | import("react-test-renderer").ReactTestInstance)[];
|
|
5
|
+
getStyle: () => import("react-native").TextStyle;
|
|
6
|
+
press: () => void;
|
|
7
|
+
hasOnPress: () => boolean;
|
|
8
|
+
onPressIn: () => void;
|
|
9
|
+
hasOnPressIn: () => boolean;
|
|
10
|
+
onPressOut: () => void;
|
|
11
|
+
hasOnPressOut: () => boolean;
|
|
12
|
+
onLongPress: () => void;
|
|
13
|
+
hasOnLongPress: () => boolean;
|
|
14
|
+
getElement: () => import("react-test-renderer").ReactTestInstance;
|
|
15
|
+
queryElement: () => import("react-test-renderer").ReactTestInstance | undefined;
|
|
16
|
+
exists: () => boolean;
|
|
17
|
+
};
|
|
18
|
+
getDismissIcon: () => {
|
|
19
|
+
exists: () => boolean;
|
|
20
|
+
getStyle: () => any;
|
|
21
|
+
getElement: () => import("react-test-renderer").ReactTestInstance;
|
|
22
|
+
queryElement: () => import("react-test-renderer").ReactTestInstance | undefined;
|
|
23
|
+
};
|
|
24
|
+
getIcon: () => {
|
|
25
|
+
exists: () => boolean;
|
|
26
|
+
getStyle: () => any;
|
|
27
|
+
getElement: () => import("react-test-renderer").ReactTestInstance;
|
|
28
|
+
queryElement: () => import("react-test-renderer").ReactTestInstance | undefined;
|
|
29
|
+
};
|
|
30
|
+
getElement: () => import("react-test-renderer").ReactTestInstance;
|
|
31
|
+
queryElement: () => import("react-test-renderer").ReactTestInstance | undefined;
|
|
32
|
+
exists: () => boolean;
|
|
33
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import { useComponentDriver } from "../../testkit/new/Component.driver";
|
|
3
|
+
import { TextDriver } from "../text/Text.driver.new";
|
|
4
|
+
import { ImageDriver } from "../image/Image.driver.new";
|
|
5
|
+
export const ChipDriver = props => {
|
|
6
|
+
const driver = useComponentDriver(props);
|
|
7
|
+
const labelDriver = TextDriver({
|
|
8
|
+
renderTree: props.renderTree,
|
|
9
|
+
testID: `${props.testID}.label`
|
|
10
|
+
});
|
|
11
|
+
const dismissIconDriver = ImageDriver({
|
|
12
|
+
renderTree: props.renderTree,
|
|
13
|
+
testID: `${props.testID}.dismissIcon`
|
|
14
|
+
});
|
|
15
|
+
const iconDriver = ImageDriver({
|
|
16
|
+
renderTree: props.renderTree,
|
|
17
|
+
testID: `${props.testID}.icon`
|
|
18
|
+
});
|
|
19
|
+
const getLabel = () => {
|
|
20
|
+
return {
|
|
21
|
+
...labelDriver
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
const getDismissIcon = () => {
|
|
25
|
+
const exists = () => {
|
|
26
|
+
return dismissIconDriver.exists();
|
|
27
|
+
};
|
|
28
|
+
const getStyle = () => {
|
|
29
|
+
return StyleSheet.flatten(dismissIconDriver.getElement().props.style);
|
|
30
|
+
};
|
|
31
|
+
return {
|
|
32
|
+
...dismissIconDriver,
|
|
33
|
+
exists,
|
|
34
|
+
getStyle
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
const getIcon = () => {
|
|
38
|
+
const exists = () => {
|
|
39
|
+
return iconDriver.exists();
|
|
40
|
+
};
|
|
41
|
+
const getStyle = () => {
|
|
42
|
+
return StyleSheet.flatten(iconDriver.getElement().props.style);
|
|
43
|
+
};
|
|
44
|
+
return {
|
|
45
|
+
...iconDriver,
|
|
46
|
+
exists,
|
|
47
|
+
getStyle
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
return {
|
|
51
|
+
...driver,
|
|
52
|
+
getLabel,
|
|
53
|
+
getDismissIcon,
|
|
54
|
+
getIcon
|
|
55
|
+
};
|
|
56
|
+
};
|
package/src/components/index.js
CHANGED
|
@@ -137,6 +137,9 @@ export default {
|
|
|
137
137
|
get ProgressiveImage() {
|
|
138
138
|
return require('./progressiveImage').default;
|
|
139
139
|
},
|
|
140
|
+
get SearchInput() {
|
|
141
|
+
return require('./searchInput').default;
|
|
142
|
+
},
|
|
140
143
|
get StateScreen() {
|
|
141
144
|
return require('./stateScreen').default;
|
|
142
145
|
},
|
|
@@ -7,5 +7,37 @@ export declare const PickerDriver: (props: ComponentProps, useDialog: boolean) =
|
|
|
7
7
|
done: () => void;
|
|
8
8
|
isOpen: () => boolean;
|
|
9
9
|
dismissDialog: () => void;
|
|
10
|
+
itemDriver: (testID: string) => {
|
|
11
|
+
press: () => void;
|
|
12
|
+
hasOnPress: () => boolean;
|
|
13
|
+
onPressIn: () => void;
|
|
14
|
+
hasOnPressIn: () => boolean;
|
|
15
|
+
onPressOut: () => void;
|
|
16
|
+
hasOnPressOut: () => boolean;
|
|
17
|
+
onLongPress: () => void;
|
|
18
|
+
hasOnLongPress: () => boolean;
|
|
19
|
+
getElement: () => import("react-test-renderer").ReactTestInstance;
|
|
20
|
+
queryElement: () => import("react-test-renderer").ReactTestInstance | undefined;
|
|
21
|
+
exists: () => boolean;
|
|
22
|
+
getStyle: () => any;
|
|
23
|
+
getLabel: () => {
|
|
24
|
+
getText: () => string | (string | import("react-test-renderer").ReactTestInstance)[];
|
|
25
|
+
getStyle: () => import("react-native/types").TextStyle;
|
|
26
|
+
press: () => void;
|
|
27
|
+
hasOnPress: () => boolean;
|
|
28
|
+
onPressIn: () => void;
|
|
29
|
+
hasOnPressIn: () => boolean;
|
|
30
|
+
onPressOut: () => void;
|
|
31
|
+
hasOnPressOut: () => boolean;
|
|
32
|
+
onLongPress: () => void;
|
|
33
|
+
hasOnLongPress: () => boolean;
|
|
34
|
+
getElement: () => import("react-test-renderer").ReactTestInstance;
|
|
35
|
+
queryElement: () => import("react-test-renderer").ReactTestInstance | undefined;
|
|
36
|
+
exists: () => boolean;
|
|
37
|
+
};
|
|
38
|
+
getLabelStyle: () => import("react-native/types").TextStyle;
|
|
39
|
+
getIconStyle: () => any;
|
|
40
|
+
getIcon: () => import("../../testkit/new/Component.driver").ComponentDriverResult;
|
|
41
|
+
};
|
|
10
42
|
selectItem: (testID: string) => void;
|
|
11
43
|
};
|
|
@@ -54,12 +54,13 @@ export const PickerDriver = (props, useDialog) => {
|
|
|
54
54
|
dialogDriver.pressOnBackground();
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
|
+
const itemDriver = testID => ButtonDriver({
|
|
58
|
+
renderTree: props.renderTree,
|
|
59
|
+
testID
|
|
60
|
+
});
|
|
57
61
|
const selectItem = testID => {
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
testID
|
|
61
|
-
});
|
|
62
|
-
itemDriver.press();
|
|
62
|
+
const driver = itemDriver(testID);
|
|
63
|
+
driver.press();
|
|
63
64
|
};
|
|
64
65
|
return {
|
|
65
66
|
exists,
|
|
@@ -69,6 +70,7 @@ export const PickerDriver = (props, useDialog) => {
|
|
|
69
70
|
done,
|
|
70
71
|
isOpen,
|
|
71
72
|
dismissDialog,
|
|
73
|
+
itemDriver,
|
|
72
74
|
selectItem
|
|
73
75
|
};
|
|
74
76
|
};
|
|
@@ -13,23 +13,27 @@ const useNewPickerProps = props => {
|
|
|
13
13
|
renderHeader,
|
|
14
14
|
renderOverlay
|
|
15
15
|
} = props;
|
|
16
|
-
const
|
|
16
|
+
const defaultModalProps = {
|
|
17
17
|
animationType: 'slide',
|
|
18
18
|
transparent: Constants.isIOS && enableModalBlur,
|
|
19
19
|
enableModalBlur: Constants.isIOS && enableModalBlur,
|
|
20
20
|
onRequestClose: topBarProps?.onCancel
|
|
21
21
|
};
|
|
22
|
+
const mergedModalProps = {
|
|
23
|
+
...defaultModalProps,
|
|
24
|
+
...(onShow && {
|
|
25
|
+
onShow
|
|
26
|
+
}),
|
|
27
|
+
...pickerModalProps,
|
|
28
|
+
...customPickerProps?.modalProps
|
|
29
|
+
};
|
|
22
30
|
const newProps = {
|
|
23
31
|
renderHeader: renderCustomDialogHeader || renderHeader,
|
|
24
32
|
renderInput: renderPicker || renderInput,
|
|
25
33
|
renderOverlay: renderCustomModal || renderOverlay,
|
|
26
34
|
customPickerProps: {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
...modalProps,
|
|
30
|
-
...pickerModalProps
|
|
31
|
-
},
|
|
32
|
-
...customPickerProps
|
|
35
|
+
...customPickerProps,
|
|
36
|
+
modalProps: mergedModalProps
|
|
33
37
|
}
|
|
34
38
|
};
|
|
35
39
|
return newProps;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SearchInputPresets, SearchInputProps, SearchInputRef } from './types';
|
|
3
|
+
declare const SearchInput: React.ForwardRefExoticComponent<import("react-native").TextInputProps & {
|
|
4
|
+
onClear?: (() => void) | undefined;
|
|
5
|
+
onDismiss?: (() => void) | undefined;
|
|
6
|
+
cancelButtonProps?: import("../button").ButtonProps | undefined;
|
|
7
|
+
customRightElement?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
8
|
+
showLoader?: boolean | undefined;
|
|
9
|
+
loaderProps?: import("react-native").ActivityIndicatorProps | undefined;
|
|
10
|
+
customLoader?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
11
|
+
invertColors?: boolean | undefined;
|
|
12
|
+
inaccessible?: boolean | undefined;
|
|
13
|
+
useSafeArea?: boolean | undefined;
|
|
14
|
+
style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
|
|
15
|
+
containerStyle?: import("react-native").StyleProp<import("react-native").TextStyle | import("react-native").ViewStyle>;
|
|
16
|
+
preset?: "default" | "prominent" | SearchInputPresets | undefined;
|
|
17
|
+
} & React.RefAttributes<any>>;
|
|
18
|
+
interface StaticMembers {
|
|
19
|
+
presets: typeof SearchInputPresets;
|
|
20
|
+
}
|
|
21
|
+
export { SearchInput, SearchInputProps, SearchInputRef, SearchInputPresets };
|
|
22
|
+
declare const _default: React.ForwardRefExoticComponent<import("react-native").TextInputProps & {
|
|
23
|
+
onClear?: (() => void) | undefined;
|
|
24
|
+
onDismiss?: (() => void) | undefined;
|
|
25
|
+
cancelButtonProps?: import("../button").ButtonProps | undefined;
|
|
26
|
+
customRightElement?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
27
|
+
showLoader?: boolean | undefined;
|
|
28
|
+
loaderProps?: import("react-native").ActivityIndicatorProps | undefined;
|
|
29
|
+
customLoader?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
30
|
+
invertColors?: boolean | undefined;
|
|
31
|
+
inaccessible?: boolean | undefined;
|
|
32
|
+
useSafeArea?: boolean | undefined;
|
|
33
|
+
style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
|
|
34
|
+
containerStyle?: import("react-native").StyleProp<import("react-native").TextStyle | import("react-native").ViewStyle>;
|
|
35
|
+
preset?: "default" | "prominent" | SearchInputPresets | undefined;
|
|
36
|
+
} & React.RefAttributes<any>> & StaticMembers;
|
|
37
|
+
export default _default;
|