@xhsreds/reds-rn-next 0.10.1-beta202511051557 → 0.10.1-beta202511062045

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 (46) hide show
  1. package/coverage/.tmp/coverage-0.json +1 -1
  2. package/coverage/.tmp/coverage-1.json +1 -1
  3. package/coverage/.tmp/coverage-10.json +1 -1
  4. package/coverage/.tmp/coverage-11.json +1 -1
  5. package/coverage/.tmp/coverage-12.json +1 -1
  6. package/coverage/.tmp/coverage-13.json +1 -1
  7. package/coverage/.tmp/coverage-14.json +1 -1
  8. package/coverage/.tmp/coverage-15.json +1 -1
  9. package/coverage/.tmp/coverage-16.json +1 -1
  10. package/coverage/.tmp/coverage-17.json +1 -1
  11. package/coverage/.tmp/coverage-18.json +1 -1
  12. package/coverage/.tmp/coverage-20.json +1 -1
  13. package/coverage/.tmp/coverage-21.json +1 -1
  14. package/coverage/.tmp/coverage-22.json +1 -1
  15. package/coverage/.tmp/coverage-24.json +1 -1
  16. package/coverage/.tmp/coverage-25.json +1 -1
  17. package/coverage/.tmp/coverage-26.json +1 -1
  18. package/coverage/.tmp/coverage-27.json +1 -1
  19. package/coverage/.tmp/coverage-28.json +1 -1
  20. package/coverage/.tmp/coverage-29.json +1 -1
  21. package/coverage/.tmp/coverage-30.json +1 -1
  22. package/coverage/.tmp/coverage-31.json +1 -1
  23. package/coverage/.tmp/coverage-32.json +1 -1
  24. package/coverage/.tmp/coverage-33.json +1 -1
  25. package/coverage/.tmp/coverage-34.json +1 -1
  26. package/coverage/.tmp/coverage-35.json +1 -1
  27. package/coverage/.tmp/coverage-36.json +1 -1
  28. package/coverage/.tmp/coverage-37.json +1 -1
  29. package/coverage/.tmp/coverage-38.json +1 -1
  30. package/coverage/.tmp/coverage-39.json +1 -1
  31. package/coverage/.tmp/coverage-4.json +1 -1
  32. package/coverage/.tmp/coverage-40.json +1 -1
  33. package/coverage/.tmp/coverage-41.json +1 -1
  34. package/coverage/.tmp/coverage-42.json +1 -1
  35. package/coverage/.tmp/coverage-43.json +1 -1
  36. package/coverage/.tmp/coverage-5.json +1 -1
  37. package/coverage/.tmp/coverage-6.json +1 -1
  38. package/coverage/.tmp/coverage-7.json +1 -1
  39. package/coverage/.tmp/coverage-8.json +1 -1
  40. package/coverage/.tmp/coverage-9.json +1 -1
  41. package/lib/cjs/components/Sheets/AnimatedSheets.js +2 -2
  42. package/lib/cjs/components/Sheets/AnimatedSheets.js.map +1 -1
  43. package/lib/esm/components/Sheets/AnimatedSheets.js +2 -2
  44. package/lib/esm/components/Sheets/AnimatedSheets.js.map +1 -1
  45. package/package.json +2 -2
  46. package/src/components/Sheets/AnimatedSheets.tsx +116 -112
@@ -402,123 +402,127 @@ const AnimatedSheets = forwardRef((props: RedsSheets, ref) => {
402
402
  ) : (
403
403
  <></>
404
404
  )}
405
- <Animated.View
406
- testID="Sheets"
407
- style={[
408
- styles.picker,
409
- { backgroundColor: themeColor.Bg2 },
410
- {
411
- height: sheetsHeight,
412
- transform: [{ translateY }],
413
- },
414
- { zIndex: props.zIndex },
415
- props.sheetsStyle,
416
- ]}
417
- >
418
- {props.header ? <View onLayout={handleLabelLayout}>{props.header}</View> : <></>}
419
- {/** normal */}
420
- {showLabel && !props.header ? (
421
- <View
422
- style={[
423
- props.headlerLayout === "center" ? styles.labelContainer : styles.leftLabelContainer,
424
- { backgroundColor: themeColor.Bg2 },
425
- props.headerStyle,
426
- ]}
427
- onLayout={handleLabelLayout}
428
- >
429
- {!cancel ? (
430
- props.headlerLayout === "center" ? (
431
- <Block />
405
+ {_visible ? (
406
+ <Animated.View
407
+ testID="Sheets"
408
+ style={[
409
+ styles.picker,
410
+ { backgroundColor: themeColor.Bg2 },
411
+ {
412
+ height: sheetsHeight,
413
+ transform: [{ translateY }],
414
+ },
415
+ { zIndex: props.zIndex },
416
+ props.sheetsStyle,
417
+ ]}
418
+ >
419
+ {props.header ? <View onLayout={handleLabelLayout}>{props.header}</View> : <></>}
420
+ {/** normal */}
421
+ {showLabel && !props.header ? (
422
+ <View
423
+ style={[
424
+ props.headlerLayout === "center" ? styles.labelContainer : styles.leftLabelContainer,
425
+ { backgroundColor: themeColor.Bg2 },
426
+ props.headerStyle,
427
+ ]}
428
+ onLayout={handleLabelLayout}
429
+ >
430
+ {!cancel ? (
431
+ props.headlerLayout === "center" ? (
432
+ <Block />
433
+ ) : (
434
+ <></>
435
+ )
436
+ ) : (
437
+ <TouchableOpacity onPress={handleCancel} activeOpacity={1}>
438
+ {cancelType === SheetsActionType.text ? (
439
+ <Text style={[styles.cancel, { color: themeColor.Title }]} testID="cancel">
440
+ {cancelText || cancelKey}
441
+ </Text>
442
+ ) : (
443
+ iconWrapper("cancel")
444
+ )}
445
+ </TouchableOpacity>
446
+ )}
447
+ {label ? (
448
+ <Text style={[styles.label, { color: themeColor.Title }]}>
449
+ {label}
450
+ {showMask}
451
+ </Text>
432
452
  ) : (
433
453
  <></>
434
- )
435
- ) : (
436
- <TouchableOpacity onPress={handleCancel} activeOpacity={1}>
437
- {cancelType === SheetsActionType.text ? (
438
- <Text style={[styles.cancel, { color: themeColor.Title }]} testID="cancel">
439
- {cancelText || cancelKey}
440
- </Text>
454
+ )}
455
+ {!close ? (
456
+ props.headlerLayout === "center" ? (
457
+ <Block />
441
458
  ) : (
442
- iconWrapper("cancel")
443
- )}
444
- </TouchableOpacity>
445
- )}
446
- {label ? (
447
- <Text style={[styles.label, { color: themeColor.Title }]}>
448
- {label}
449
- {showMask}
450
- </Text>
451
- ) : (
452
- <></>
453
- )}
454
- {!close ? (
455
- props.headlerLayout === "center" ? (
456
- <Block />
459
+ <></>
460
+ )
461
+ ) : (
462
+ <TouchableOpacity onPress={handleConfirm} activeOpacity={1}>
463
+ {closeType === SheetsActionType.text ? (
464
+ <View>
465
+ <Text
466
+ style={[
467
+ styles.confirm,
468
+ { color: themeColor.Primary },
469
+ { elevation: 0, shadowColor: "transparent" },
470
+ ]}
471
+ testID="close"
472
+ >
473
+ {closeText || sureKey}
474
+ </Text>
475
+ </View>
476
+ ) : (
477
+ iconWrapper("confirm")
478
+ )}
479
+ </TouchableOpacity>
480
+ )}
481
+ </View>
482
+ ) : (
483
+ <></>
484
+ )}
485
+
486
+ {/** 拖拽按钮 */}
487
+ {sheetsType === SheetsType.dragable && !props.header ? (
488
+ <Animated.View style={[styles.dragableContainer]} {...panResponder.panHandlers} testID={"draggable"}>
489
+ <View style={[styles.dragable, { backgroundColor: themeColor.Fill3 }]} />
490
+ </Animated.View>
491
+ ) : (
492
+ <></>
493
+ )}
494
+
495
+ <View onLayout={handleLayout}>{children}</View>
496
+
497
+ {/** action */}
498
+ {showAction ? (
499
+ <View style={[styles.actionContainer]} onLayout={handleActionLayout}>
500
+ {cancel ? (
501
+ <View style={styles.action}>
502
+ <Button block onClick={handleCancel}>
503
+ {cancelText || cancelKey}
504
+ </Button>
505
+ </View>
457
506
  ) : (
458
507
  <></>
459
- )
460
- ) : (
461
- <TouchableOpacity onPress={handleConfirm} activeOpacity={1}>
462
- {closeType === SheetsActionType.text ? (
463
- <View>
464
- <Text
465
- style={[
466
- styles.confirm,
467
- { color: themeColor.Primary },
468
- { elevation: 0, shadowColor: "transparent" },
469
- ]}
470
- testID="close"
471
- >
472
- {closeText || sureKey}
473
- </Text>
474
- </View>
475
- ) : (
476
- iconWrapper("confirm")
477
- )}
478
- </TouchableOpacity>
479
- )}
480
- </View>
481
- ) : (
482
- <></>
483
- )}
484
-
485
- {/** 拖拽按钮 */}
486
- {sheetsType === SheetsType.dragable && !props.header ? (
487
- <Animated.View style={[styles.dragableContainer]} {...panResponder.panHandlers} testID={"draggable"}>
488
- <View style={[styles.dragable, { backgroundColor: themeColor.Fill3 }]} />
489
- </Animated.View>
490
- ) : (
491
- <></>
492
- )}
493
-
494
- <View onLayout={handleLayout}>{children}</View>
495
-
496
- {/** action */}
497
- {showAction ? (
498
- <View style={[styles.actionContainer]} onLayout={handleActionLayout}>
499
- {cancel ? (
500
- <View style={styles.action}>
501
- <Button block onClick={handleCancel}>
502
- {cancelText || cancelKey}
503
- </Button>
504
- </View>
505
- ) : (
506
- <></>
507
- )}
508
- {close ? (
509
- <View style={styles.action}>
510
- <Button block onClick={handleConfirm} type="primary">
511
- {closeText || sureKey}
512
- </Button>
513
- </View>
514
- ) : (
515
- <></>
516
- )}
517
- </View>
518
- ) : (
519
- <></>
520
- )}
521
- </Animated.View>
508
+ )}
509
+ {close ? (
510
+ <View style={styles.action}>
511
+ <Button block onClick={handleConfirm} type="primary">
512
+ {closeText || sureKey}
513
+ </Button>
514
+ </View>
515
+ ) : (
516
+ <></>
517
+ )}
518
+ </View>
519
+ ) : (
520
+ <></>
521
+ )}
522
+ </Animated.View>
523
+ ) : (
524
+ <></>
525
+ )}
522
526
  </>
523
527
  );
524
528
  });