react-native-macos 0.66.69 → 0.66.72
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/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Lists/FlatList.js +1 -0
- package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m +3 -1
- package/React/Base/RCTConvert.m +1 -0
- package/React/Base/RCTVersion.m +1 -1
- package/React/Views/RCTView.h +6 -0
- package/React/Views/RCTView.m +41 -11
- package/React/Views/RCTViewManager.m +10 -0
- package/React/Views/ScrollView/RCTScrollContentView.m +12 -0
- package/React/Views/ScrollView/RCTScrollView.m +5 -0
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/package.json +1 -1
- package/template/package.json +1 -1
|
@@ -652,6 +652,7 @@ class FlatList<ItemT> extends React.PureComponent<Props<ItemT>, void> {
|
|
|
652
652
|
removeClippedSubviews={removeClippedSubviewsOrDefault(
|
|
653
653
|
_removeClippedSubviews,
|
|
654
654
|
)}
|
|
655
|
+
accessibilityRole="table" // TODO(macOS GH#774): Inherit NSAccessibilityTable protocols
|
|
655
656
|
{...this._renderer()}
|
|
656
657
|
/>
|
|
657
658
|
);
|
|
@@ -106,7 +106,9 @@
|
|
|
106
106
|
- (void)scrollViewDidScroll:(RCTUIScrollView *)scrollView // TODO(macOS ISS#3536887)
|
|
107
107
|
{
|
|
108
108
|
RCTDirectEventBlock onScroll = self.onScroll;
|
|
109
|
-
|
|
109
|
+
#if TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
110
|
+
[_scrollView setHasVerticalScroller:YES];
|
|
111
|
+
#endif // ]TODO(macOS GH#774)
|
|
110
112
|
if (onScroll) {
|
|
111
113
|
CGPoint contentOffset = scrollView.contentOffset;
|
|
112
114
|
CGSize contentSize = scrollView.contentSize;
|
package/React/Base/RCTConvert.m
CHANGED
package/React/Base/RCTVersion.m
CHANGED
package/React/Views/RCTView.h
CHANGED
|
@@ -144,6 +144,12 @@ extern const UIAccessibilityTraits SwitchAccessibilityTrait;
|
|
|
144
144
|
@property (nonatomic, copy) RCTDirectEventBlock onKeyUp;
|
|
145
145
|
@property (nonatomic, copy) NSArray<NSString*> *validKeysDown;
|
|
146
146
|
@property (nonatomic, copy) NSArray<NSString*> *validKeysUp;
|
|
147
|
+
|
|
148
|
+
// Shadow Properties
|
|
149
|
+
@property (nonatomic, strong) NSColor *shadowColor;
|
|
150
|
+
@property (nonatomic, assign) CGFloat shadowOpacity;
|
|
151
|
+
@property (nonatomic, assign) CGFloat shadowRadius;
|
|
152
|
+
@property (nonatomic, assign) CGSize shadowOffset;
|
|
147
153
|
#endif // ]TODO(macOS GH#774)
|
|
148
154
|
|
|
149
155
|
/**
|
package/React/Views/RCTView.m
CHANGED
|
@@ -164,6 +164,7 @@ static NSString *RCTRecursiveAccessibilityLabel(RCTUIView *view) // TODO(macOS I
|
|
|
164
164
|
_hitTestEdgeInsets = UIEdgeInsetsZero;
|
|
165
165
|
#if TARGET_OS_OSX // TODO(macOS GH#774)
|
|
166
166
|
_transform3D = CATransform3DIdentity;
|
|
167
|
+
_shadowColor = nil;
|
|
167
168
|
#endif // TODO(macOS GH#774)
|
|
168
169
|
|
|
169
170
|
_backgroundColor = super.backgroundColor;
|
|
@@ -726,20 +727,49 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : unused)
|
|
|
726
727
|
#endif // TODO(macOS GH#774)
|
|
727
728
|
|
|
728
729
|
#if TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
729
|
-
|
|
730
|
-
- (NSShadow*)shadow
|
|
730
|
+
- (void)setShadowColor:(NSColor *)shadowColor
|
|
731
731
|
{
|
|
732
|
-
|
|
733
|
-
|
|
732
|
+
if (_shadowColor != shadowColor)
|
|
733
|
+
{
|
|
734
|
+
_shadowColor = shadowColor;
|
|
735
|
+
[self didUpdateShadow];
|
|
736
|
+
}
|
|
737
|
+
}
|
|
734
738
|
|
|
735
|
-
|
|
736
|
-
|
|
739
|
+
- (void)setShadowOffset:(CGSize)shadowOffset
|
|
740
|
+
{
|
|
741
|
+
if (!CGSizeEqualToSize(_shadowOffset, shadowOffset))
|
|
742
|
+
{
|
|
743
|
+
_shadowOffset = shadowOffset;
|
|
744
|
+
[self didUpdateShadow];
|
|
745
|
+
}
|
|
746
|
+
}
|
|
737
747
|
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
748
|
+
- (void)setShadowOpacity:(CGFloat)shadowOpacity
|
|
749
|
+
{
|
|
750
|
+
if (_shadowOpacity != shadowOpacity)
|
|
751
|
+
{
|
|
752
|
+
_shadowOpacity = shadowOpacity;
|
|
753
|
+
[self didUpdateShadow];
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
- (void)setShadowRadius:(CGFloat)shadowRadius
|
|
758
|
+
{
|
|
759
|
+
if (_shadowRadius != shadowRadius)
|
|
760
|
+
{
|
|
761
|
+
_shadowRadius = shadowRadius;
|
|
762
|
+
[self didUpdateShadow];
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
-(void)didUpdateShadow
|
|
767
|
+
{
|
|
768
|
+
NSShadow *shadow = [NSShadow new];
|
|
769
|
+
shadow.shadowColor = [[self shadowColor] colorWithAlphaComponent:[self shadowOpacity]];
|
|
770
|
+
shadow.shadowOffset = [self shadowOffset];
|
|
771
|
+
shadow.shadowBlurRadius = [self shadowRadius];
|
|
772
|
+
[self setShadow:shadow];
|
|
743
773
|
}
|
|
744
774
|
|
|
745
775
|
- (void)viewDidMoveToWindow
|
|
@@ -51,6 +51,7 @@ RCT_MULTI_ENUM_CONVERTER(
|
|
|
51
51
|
// a set of RN accessibilityTraits are macOS specific accessiblity roles and map to nothing on iOS:
|
|
52
52
|
@"disclosure" : @(UIAccessibilityTraitNone),
|
|
53
53
|
@"group" : @(UIAccessibilityTraitNone),
|
|
54
|
+
@"table": @(UIAccessibilityTraitNone),
|
|
54
55
|
// ]TODO(macOS GH#774)
|
|
55
56
|
@"alert" : @(UIAccessibilityTraitNone),
|
|
56
57
|
@"checkbox" : @(UIAccessibilityTraitNone),
|
|
@@ -191,10 +192,19 @@ RCT_REMAP_VIEW_PROPERTY(opacity, alpha, CGFloat)
|
|
|
191
192
|
#else // [TODO(macOS GH#774)
|
|
192
193
|
RCT_REMAP_VIEW_PROPERTY(opacity, alphaValue, CGFloat)
|
|
193
194
|
#endif // ]TODO(macOS GH#774)
|
|
195
|
+
|
|
196
|
+
#if TARGET_OS_OSX // TODO(macOS GH#774)
|
|
194
197
|
RCT_REMAP_VIEW_PROPERTY(shadowColor, layer.shadowColor, CGColor)
|
|
195
198
|
RCT_REMAP_VIEW_PROPERTY(shadowOffset, layer.shadowOffset, CGSize)
|
|
196
199
|
RCT_REMAP_VIEW_PROPERTY(shadowOpacity, layer.shadowOpacity, float)
|
|
197
200
|
RCT_REMAP_VIEW_PROPERTY(shadowRadius, layer.shadowRadius, CGFloat)
|
|
201
|
+
#else // [TODO(macOS GH#774)
|
|
202
|
+
RCT_EXPORT_VIEW_PROPERTY(shadowColor, NSColor)
|
|
203
|
+
RCT_EXPORT_VIEW_PROPERTY(shadowOffset, CGSize)
|
|
204
|
+
RCT_EXPORT_VIEW_PROPERTY(shadowOpacity, CGFloat)
|
|
205
|
+
RCT_EXPORT_VIEW_PROPERTY(shadowRadius, CGFloat)
|
|
206
|
+
#endif // ]TODO(macOS GH#774)
|
|
207
|
+
|
|
198
208
|
RCT_REMAP_VIEW_PROPERTY(needsOffscreenAlphaCompositing, layer.allowsGroupOpacity, BOOL)
|
|
199
209
|
RCT_CUSTOM_VIEW_PROPERTY(overflow, YGOverflow, RCTView)
|
|
200
210
|
{
|
|
@@ -54,6 +54,18 @@
|
|
|
54
54
|
horizontalScrollerHeight:verticalScrollerWidth];
|
|
55
55
|
[[[scrollView bridge] uiManager] setLocalData:localData forView:self];
|
|
56
56
|
}
|
|
57
|
+
|
|
58
|
+
if ([platformScrollView accessibilityRole] == NSAccessibilityTableRole) {
|
|
59
|
+
NSMutableArray *subViews = [[NSMutableArray alloc] initWithCapacity:[[self subviews] count]];
|
|
60
|
+
for (NSView *view in [self subviews]) {
|
|
61
|
+
if ([view isKindOfClass:[RCTView class]]) {
|
|
62
|
+
[subViews addObject:view];
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
[platformScrollView setAccessibilityRows:subViews];
|
|
67
|
+
}
|
|
68
|
+
|
|
57
69
|
#endif // ]TODO(macOS GH#774)
|
|
58
70
|
}
|
|
59
71
|
|
|
@@ -485,6 +485,11 @@
|
|
|
485
485
|
{
|
|
486
486
|
[_scrollView setAccessibilityLabel:accessibilityLabel];
|
|
487
487
|
}
|
|
488
|
+
|
|
489
|
+
- (void)setAccessibilityRole:(NSAccessibilityRole)accessibilityRole
|
|
490
|
+
{
|
|
491
|
+
[_scrollView setAccessibilityRole:accessibilityRole];
|
|
492
|
+
}
|
|
488
493
|
#endif // ]TODO(macOS GH#774)
|
|
489
494
|
|
|
490
495
|
RCT_NOT_IMPLEMENTED(-(instancetype)initWithFrame : (CGRect)frame)
|
package/package.json
CHANGED