react-native-ui-lib 7.43.0 → 7.44.0-snapshot.7204

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 (98) hide show
  1. package/babel.config.js +12 -0
  2. package/index.js +1 -0
  3. package/lib/android/build.gradle +5 -5
  4. package/lib/android/src/main/java/com/wix/reactnativeuilib/UiLibPackageList.java +0 -2
  5. package/lib/android/src/main/java/com/wix/reactnativeuilib/highlighterview/HighlighterViewManager.java +31 -23
  6. package/lib/android/src/main/java/com/wix/reactnativeuilib/keyboardinput/utils/RuntimeUtils.java +1 -1
  7. package/lib/components/HighlighterOverlayView/HighlighterViewNativeComponent.d.ts +61 -0
  8. package/lib/components/HighlighterOverlayView/HighlighterViewNativeComponent.js +2 -0
  9. package/lib/components/{HighlighterOverlayView.web.d.ts → HighlighterOverlayView/index.d.ts} +1 -1
  10. package/lib/components/HighlighterOverlayView/index.js +49 -0
  11. package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView}/CustomKeyboardView/CustomKeyboardView.android.d.ts +5 -2
  12. package/lib/components/Keyboard/KeyboardAccessoryView/CustomKeyboardView/CustomKeyboardView.android.js +51 -0
  13. package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView}/CustomKeyboardView/CustomKeyboardView.ios.d.ts +1 -1
  14. package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView}/CustomKeyboardView/CustomKeyboardView.ios.js +3 -3
  15. package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView/CustomKeyboardView}/CustomKeyboardViewBase.d.ts +3 -0
  16. package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView/CustomKeyboardView}/CustomKeyboardViewBase.js +1 -1
  17. package/lib/components/Keyboard/{KeyboardInput/utils → KeyboardAccessoryView/KeyboardRegistry/EventEmitterManager}/__tests__/EventEmitterManager.spec.js +1 -1
  18. package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView/KeyboardRegistry}/__tests__/KeyboardRegistry.spec.js +1 -1
  19. package/lib/components/Keyboard/{KeyboardInput/KeyboardRegistry.d.ts → KeyboardAccessoryView/KeyboardRegistry/index.d.ts} +1 -1
  20. package/lib/components/Keyboard/{KeyboardInput/KeyboardRegistry.js → KeyboardAccessoryView/KeyboardRegistry/index.js} +1 -1
  21. package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView/KeyboardRegistry}/keyboardRegistry.api.json +9 -9
  22. package/lib/components/Keyboard/KeyboardAccessoryView/KeyboardUtils/index.d.ts +26 -0
  23. package/lib/components/Keyboard/KeyboardAccessoryView/KeyboardUtils/index.js +91 -0
  24. package/lib/components/Keyboard/{KeyboardInput/KeyboardAccessoryView.d.ts → KeyboardAccessoryView/index.d.ts} +11 -1
  25. package/lib/components/Keyboard/{KeyboardInput/KeyboardAccessoryView.js → KeyboardAccessoryView/index.js} +31 -5
  26. package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView}/keyboardAccessoryView.api.json +5 -5
  27. package/lib/components/Keyboard/{KeyboardTracking/KeyboardAwareInsetsView.d.ts → KeyboardAwareInsetsView/index.d.ts} +1 -1
  28. package/lib/components/Keyboard/{KeyboardTracking/KeyboardAwareInsetsView.js → KeyboardAwareInsetsView/index.js} +1 -1
  29. package/lib/components/Keyboard/{KeyboardTracking/KeyboardTrackingView → KeyboardTrackingView}/KeyboardTrackingView.ios.d.ts +1 -4
  30. package/lib/components/Keyboard/{KeyboardTracking/KeyboardTrackingView → KeyboardTrackingView}/KeyboardTrackingView.ios.js +5 -8
  31. package/lib/components/Keyboard/KeyboardTrackingView/KeyboardTrackingViewNativeComponent.d.ts +58 -0
  32. package/lib/components/Keyboard/KeyboardTrackingView/KeyboardTrackingViewNativeComponent.js +2 -0
  33. package/lib/components/Keyboard/{KeyboardTracking/KeyboardTrackingView → KeyboardTrackingView}/index.d.ts +2 -2
  34. package/lib/components/Keyboard/{KeyboardTracking/KeyboardTrackingView → KeyboardTrackingView}/keyboardTrackingView.api.json +11 -20
  35. package/lib/components/Keyboard/index.d.ts +6 -6
  36. package/lib/components/Keyboard/index.js +6 -6
  37. package/lib/components/SafeArea/SafeAreaInsetsManager.d.ts +8 -3
  38. package/lib/components/SafeArea/SafeAreaInsetsManager.js +89 -23
  39. package/lib/components/SafeArea/SafeAreaSpacerView.js +60 -9
  40. package/lib/package.json +1 -1
  41. package/lib/react-native.config.js +1 -3
  42. package/metro.config.js +2 -2
  43. package/package.json +24 -24
  44. package/react-native.config.js +1 -3
  45. package/src/commons/Constants.d.ts +1 -0
  46. package/src/commons/Constants.js +15 -6
  47. package/src/components/KeyboardAwareScrollView/KeyboardAwareBase.js +5 -1
  48. package/src/components/badge/index.d.ts +107 -47
  49. package/src/components/button/button.api.json +1 -1
  50. package/src/components/button/index.d.ts +53 -23
  51. package/src/components/button/types.d.ts +0 -1
  52. package/src/components/chip/index.js +37 -14
  53. package/src/components/drawer/Swipeable.js +1 -2
  54. package/src/components/drawer/index.js +31 -25
  55. package/src/components/expandableSection/index.js +3 -2
  56. package/src/components/fadedScrollView/index.js +7 -2
  57. package/src/components/picker/helpers/useFieldType.d.ts +53 -23
  58. package/src/components/slider/GradientSlider.d.ts +1 -1
  59. package/src/components/sortableGridList/SortableItem.js +13 -4
  60. package/src/components/sortableList/SortableListItem.js +13 -4
  61. package/src/components/stackAggregator/index.js +16 -11
  62. package/src/components/textField/Input.js +0 -1
  63. package/src/components/textField/presets/outline.d.ts +106 -46
  64. package/src/components/textField/presets/underline.d.ts +106 -46
  65. package/src/components/textField/usePreset.d.ts +72 -44
  66. package/src/incubator/dialog/index.js +1 -1
  67. package/src/incubator/dialog/useDialogContent.d.ts +1 -1
  68. package/lib/android/src/main/java/com/wix/reactnativeuilib/highlighterview/ReactHacks.java +0 -30
  69. package/lib/android/src/main/java/com/wix/reactnativeuilib/highlighterview/ReflectionUtils.java +0 -34
  70. package/lib/android/src/main/java/com/wix/reactnativeuilib/textinput/DefaultKeyListener.java +0 -33
  71. package/lib/android/src/main/java/com/wix/reactnativeuilib/textinput/KeyListenerProxy.java +0 -53
  72. package/lib/android/src/main/java/com/wix/reactnativeuilib/textinput/TextInputDelKeyHandlerModule.java +0 -54
  73. package/lib/android/src/main/java/com/wix/reactnativeuilib/textinput/TextInputDelKeyHandlerPackage.java +0 -28
  74. package/lib/android/src/main/java/com/wix/reactnativeuilib/textinput/ViewUtils.java +0 -36
  75. package/lib/components/HighlighterOverlayView.js +0 -40
  76. package/lib/components/Keyboard/KeyboardInput/CustomKeyboardView/CustomKeyboardView.android.js +0 -28
  77. package/lib/components/Keyboard/KeyboardInput/utils/KeyboardUtils.d.ts +0 -11
  78. package/lib/components/Keyboard/KeyboardInput/utils/KeyboardUtils.js +0 -17
  79. /package/lib/components/{HighlighterOverlayView.d.ts → HighlighterOverlayView/index.web.d.ts} +0 -0
  80. /package/lib/components/{HighlighterOverlayView.web.js → HighlighterOverlayView/index.web.js} +0 -0
  81. /package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView}/CustomKeyboardView/index.d.ts +0 -0
  82. /package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView}/CustomKeyboardView/index.js +0 -0
  83. /package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView}/CustomKeyboardView/index.web.d.ts +0 -0
  84. /package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView}/CustomKeyboardView/index.web.js +0 -0
  85. /package/lib/components/Keyboard/{KeyboardInput/utils/EventEmitterManager.d.ts → KeyboardAccessoryView/KeyboardRegistry/EventEmitterManager/index.d.ts} +0 -0
  86. /package/lib/components/Keyboard/{KeyboardInput/utils/EventEmitterManager.js → KeyboardAccessoryView/KeyboardRegistry/EventEmitterManager/index.js} +0 -0
  87. /package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView}/TextInputKeyboardManager/TextInputKeyboardManager.android.d.ts +0 -0
  88. /package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView}/TextInputKeyboardManager/TextInputKeyboardManager.android.js +0 -0
  89. /package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView}/TextInputKeyboardManager/TextInputKeyboardManager.ios.d.ts +0 -0
  90. /package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView}/TextInputKeyboardManager/TextInputKeyboardManager.ios.js +0 -0
  91. /package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView}/TextInputKeyboardManager/index.d.ts +0 -0
  92. /package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView}/TextInputKeyboardManager/index.js +0 -0
  93. /package/lib/components/Keyboard/{KeyboardTracking → KeyboardAwareInsetsView}/keyboardAwareInsetsView.api.json +0 -0
  94. /package/lib/components/Keyboard/{KeyboardTracking/KeyboardTrackingView → KeyboardTrackingView}/KeyboardTrackingView.android.d.ts +0 -0
  95. /package/lib/components/Keyboard/{KeyboardTracking/KeyboardTrackingView → KeyboardTrackingView}/KeyboardTrackingView.android.js +0 -0
  96. /package/lib/components/Keyboard/{KeyboardTracking/KeyboardTrackingView → KeyboardTrackingView}/index.js +0 -0
  97. /package/lib/components/Keyboard/{KeyboardTracking/KeyboardTrackingView → KeyboardTrackingView}/index.web.d.ts +0 -0
  98. /package/lib/components/Keyboard/{KeyboardTracking/KeyboardTrackingView → KeyboardTrackingView}/index.web.js +0 -0
@@ -39,7 +39,7 @@ declare class Button extends PureComponent<Props, ButtonState> {
39
39
  fontFamily?: string | undefined;
40
40
  fontSize?: number | undefined;
41
41
  fontStyle?: "normal" | "italic" | undefined;
42
- fontWeight?: "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | undefined;
42
+ fontWeight?: "black" | 900 | 600 | "light" | 100 | "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 200 | 300 | 400 | 500 | 700 | 800 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | undefined;
43
43
  letterSpacing?: number | undefined;
44
44
  lineHeight?: number | undefined;
45
45
  textAlign?: "auto" | "left" | "right" | "center" | "justify" | undefined;
@@ -62,31 +62,41 @@ declare class Button extends PureComponent<Props, ButtonState> {
62
62
  borderBlockEndColor?: import("react-native").ColorValue | undefined;
63
63
  borderBlockStartColor?: import("react-native").ColorValue | undefined;
64
64
  borderBottomColor?: import("react-native").ColorValue | undefined;
65
- borderBottomEndRadius?: import("react-native").AnimatableNumericValue | undefined;
66
- borderBottomLeftRadius?: import("react-native").AnimatableNumericValue | undefined;
67
- borderBottomRightRadius?: import("react-native").AnimatableNumericValue | undefined;
68
- borderBottomStartRadius?: import("react-native").AnimatableNumericValue | undefined;
65
+ borderBottomEndRadius?: string | import("react-native").AnimatableNumericValue | undefined;
66
+ borderBottomLeftRadius?: string | import("react-native").AnimatableNumericValue | undefined;
67
+ borderBottomRightRadius?: string | import("react-native").AnimatableNumericValue | undefined;
68
+ borderBottomStartRadius?: string | import("react-native").AnimatableNumericValue | undefined;
69
69
  borderColor?: import("react-native").ColorValue | undefined;
70
70
  borderCurve?: "circular" | "continuous" | undefined;
71
71
  borderEndColor?: import("react-native").ColorValue | undefined;
72
- borderEndEndRadius?: import("react-native").AnimatableNumericValue | undefined;
73
- borderEndStartRadius?: import("react-native").AnimatableNumericValue | undefined;
72
+ borderEndEndRadius?: string | import("react-native").AnimatableNumericValue | undefined;
73
+ borderEndStartRadius?: string | import("react-native").AnimatableNumericValue | undefined;
74
74
  borderLeftColor?: import("react-native").ColorValue | undefined;
75
- borderRadius?: import("react-native").AnimatableNumericValue | undefined;
75
+ borderRadius?: string | import("react-native").AnimatableNumericValue | undefined;
76
76
  borderRightColor?: import("react-native").ColorValue | undefined;
77
77
  borderStartColor?: import("react-native").ColorValue | undefined;
78
- borderStartEndRadius?: import("react-native").AnimatableNumericValue | undefined;
79
- borderStartStartRadius?: import("react-native").AnimatableNumericValue | undefined;
78
+ borderStartEndRadius?: string | import("react-native").AnimatableNumericValue | undefined;
79
+ borderStartStartRadius?: string | import("react-native").AnimatableNumericValue | undefined;
80
80
  borderStyle?: "solid" | "dotted" | "dashed" | undefined;
81
81
  borderTopColor?: import("react-native").ColorValue | undefined;
82
- borderTopEndRadius?: import("react-native").AnimatableNumericValue | undefined;
83
- borderTopLeftRadius?: import("react-native").AnimatableNumericValue | undefined;
84
- borderTopRightRadius?: import("react-native").AnimatableNumericValue | undefined;
85
- borderTopStartRadius?: import("react-native").AnimatableNumericValue | undefined;
82
+ borderTopEndRadius?: string | import("react-native").AnimatableNumericValue | undefined;
83
+ borderTopLeftRadius?: string | import("react-native").AnimatableNumericValue | undefined;
84
+ borderTopRightRadius?: string | import("react-native").AnimatableNumericValue | undefined;
85
+ borderTopStartRadius?: string | import("react-native").AnimatableNumericValue | undefined;
86
+ outlineColor?: import("react-native").ColorValue | undefined;
87
+ outlineOffset?: import("react-native").AnimatableNumericValue | undefined;
88
+ outlineStyle?: "solid" | "dotted" | "dashed" | undefined;
89
+ outlineWidth?: import("react-native").AnimatableNumericValue | undefined;
86
90
  opacity?: import("react-native").AnimatableNumericValue | undefined;
87
91
  elevation?: number | undefined;
88
92
  pointerEvents?: "auto" | "none" | "box-none" | "box-only" | undefined;
89
- alignContent?: "center" | "flex-start" | "flex-end" | "stretch" | "space-between" | "space-around" | undefined;
93
+ isolation?: "auto" | "isolate" | undefined;
94
+ cursor?: import("react-native").CursorValue | undefined;
95
+ boxShadow?: string | readonly import("react-native").BoxShadowValue[] | undefined;
96
+ filter?: string | readonly import("react-native").FilterFunction[] | undefined;
97
+ mixBlendMode?: import("react-native").BlendMode | undefined;
98
+ experimental_backgroundImage?: string | readonly import("react-native").GradientValue[] | undefined;
99
+ alignContent?: "center" | "flex-start" | "flex-end" | "stretch" | "space-between" | "space-around" | "space-evenly" | undefined;
90
100
  alignItems?: import("react-native").FlexAlignType | undefined;
91
101
  alignSelf?: "auto" | import("react-native").FlexAlignType | undefined;
92
102
  aspectRatio?: string | number | undefined;
@@ -98,14 +108,15 @@ declare class Button extends PureComponent<Props, ButtonState> {
98
108
  borderTopWidth?: number | undefined;
99
109
  borderWidth?: number | undefined;
100
110
  bottom?: import("react-native").DimensionValue | undefined;
101
- display?: "none" | "flex" | undefined;
111
+ boxSizing?: "border-box" | "content-box" | undefined;
112
+ display?: "none" | "flex" | "contents" | undefined;
102
113
  end?: import("react-native").DimensionValue | undefined;
103
114
  flex?: number | undefined;
104
115
  flexBasis?: import("react-native").DimensionValue | undefined;
105
116
  flexDirection: "row" | "column" | "row-reverse" | "column-reverse";
106
- rowGap?: number | undefined;
107
- gap?: number | undefined;
108
- columnGap?: number | undefined;
117
+ rowGap?: string | number | undefined;
118
+ gap?: string | number | undefined;
119
+ columnGap?: string | number | undefined;
109
120
  flexGrow?: number | undefined;
110
121
  flexShrink?: number | undefined;
111
122
  flexWrap?: "wrap" | "nowrap" | "wrap-reverse" | undefined;
@@ -135,13 +146,32 @@ declare class Button extends PureComponent<Props, ButtonState> {
135
146
  paddingStart?: import("react-native").DimensionValue | undefined;
136
147
  paddingTop?: import("react-native").DimensionValue | undefined;
137
148
  paddingVertical?: import("react-native").DimensionValue | undefined;
138
- position?: "absolute" | "relative" | undefined;
149
+ position?: "absolute" | "relative" | "static" | undefined;
139
150
  right?: import("react-native").DimensionValue | undefined;
140
151
  start?: import("react-native").DimensionValue | undefined;
141
152
  top?: import("react-native").DimensionValue | undefined;
142
153
  width?: import("react-native").DimensionValue | undefined;
143
154
  zIndex?: number | undefined;
144
155
  direction?: "ltr" | "rtl" | "inherit" | undefined;
156
+ inset?: import("react-native").DimensionValue | undefined;
157
+ insetBlock?: import("react-native").DimensionValue | undefined;
158
+ insetBlockEnd?: import("react-native").DimensionValue | undefined;
159
+ insetBlockStart?: import("react-native").DimensionValue | undefined;
160
+ insetInline?: import("react-native").DimensionValue | undefined;
161
+ insetInlineEnd?: import("react-native").DimensionValue | undefined;
162
+ insetInlineStart?: import("react-native").DimensionValue | undefined;
163
+ marginBlock?: import("react-native").DimensionValue | undefined;
164
+ marginBlockEnd?: import("react-native").DimensionValue | undefined;
165
+ marginBlockStart?: import("react-native").DimensionValue | undefined;
166
+ marginInline?: import("react-native").DimensionValue | undefined;
167
+ marginInlineEnd?: import("react-native").DimensionValue | undefined;
168
+ marginInlineStart?: import("react-native").DimensionValue | undefined;
169
+ paddingBlock?: import("react-native").DimensionValue | undefined;
170
+ paddingBlockEnd?: import("react-native").DimensionValue | undefined;
171
+ paddingBlockStart?: import("react-native").DimensionValue | undefined;
172
+ paddingInline?: import("react-native").DimensionValue | undefined;
173
+ paddingInlineEnd?: import("react-native").DimensionValue | undefined;
174
+ paddingInlineStart?: import("react-native").DimensionValue | undefined;
145
175
  shadowColor?: import("react-native").ColorValue | undefined;
146
176
  shadowOffset?: Readonly<{
147
177
  width: number;
@@ -149,7 +179,7 @@ declare class Button extends PureComponent<Props, ButtonState> {
149
179
  }> | undefined;
150
180
  shadowOpacity?: import("react-native").AnimatableNumericValue | undefined;
151
181
  shadowRadius?: number | undefined;
152
- transform?: string | (({
182
+ transform?: string | readonly (({
153
183
  perspective: import("react-native").AnimatableNumericValue;
154
184
  } & {
155
185
  rotate?: undefined;
@@ -270,7 +300,7 @@ declare class Button extends PureComponent<Props, ButtonState> {
270
300
  skewY?: undefined;
271
301
  matrix?: undefined;
272
302
  }) | ({
273
- translateX: import("react-native").AnimatableNumericValue;
303
+ translateX: import("react-native").AnimatableNumericValue | `${number}%`;
274
304
  } & {
275
305
  perspective?: undefined;
276
306
  rotate?: undefined;
@@ -285,7 +315,7 @@ declare class Button extends PureComponent<Props, ButtonState> {
285
315
  skewY?: undefined;
286
316
  matrix?: undefined;
287
317
  }) | ({
288
- translateY: import("react-native").AnimatableNumericValue;
318
+ translateY: import("react-native").AnimatableNumericValue | `${number}%`;
289
319
  } & {
290
320
  perspective?: undefined;
291
321
  rotate?: undefined;
@@ -131,7 +131,6 @@ export type ButtonProps = TouchableOpacityProps & TypographyModifiers & ColorsMo
131
131
  getActiveBackgroundColor?: (backgroundColor: string, props: any) => string;
132
132
  /**
133
133
  * should animate layout change
134
- * Note?: For Android you must set 'setLayoutAnimationEnabledExperimental(true)' via RN's 'UIManager'
135
134
  */
136
135
  animateLayout?: boolean;
137
136
  /**
@@ -1,5 +1,4 @@
1
- import _get from "lodash/get";
2
- import React, { useCallback } from 'react';
1
+ import React, { useCallback, useMemo } from 'react';
3
2
  import { StyleSheet } from 'react-native';
4
3
  import Assets from "../../assets";
5
4
  import { asBaseComponent } from "../../commons/new";
@@ -57,8 +56,8 @@ const Chip = ({
57
56
  }, [badgeProps]);
58
57
  const renderOnDismiss = useCallback(() => {
59
58
  return <TouchableOpacity style={[getMargins('dismiss'), dismissContainerStyle]} onPress={onDismiss} hitSlop={{
60
- top: 10,
61
- bottom: 10,
59
+ top: 16,
60
+ bottom: 16,
62
61
  left: 10,
63
62
  right: 10
64
63
  }} testID={`${testID}.dismiss`}>
@@ -138,23 +137,47 @@ const Chip = ({
138
137
  }
139
138
  }
140
139
  }, [avatarProps, badgeProps, iconSource, rightIconSource, onDismiss]);
141
- const getContainerSize = useCallback(() => {
142
- const width = useSizeAsMinimum ? 'minWidth' : 'width';
143
- const height = useSizeAsMinimum ? 'minHeight' : 'height';
144
- return typeof size === 'object' ? {
145
- [width]: _get(size, 'width'),
146
- [height]: _get(size, 'height')
147
- } : {
148
- [width]: size,
149
- [height]: size
140
+ const chipSize = useMemo(() => {
141
+ const width = typeof size === 'object' ? size.width : size;
142
+ const height = typeof size === 'object' ? size.height : size;
143
+ return {
144
+ width,
145
+ height
150
146
  };
151
147
  }, [size]);
148
+ const containerSizeStyle = useMemo(() => {
149
+ const {
150
+ width,
151
+ height
152
+ } = chipSize;
153
+ return useSizeAsMinimum ? {
154
+ minWidth: width,
155
+ minHeight: height
156
+ } : {
157
+ width,
158
+ height
159
+ };
160
+ }, [chipSize]);
152
161
  const Container = onPress ? TouchableOpacity : View;
162
+ const hitSlop = useMemo(() => {
163
+ const {
164
+ width = 48,
165
+ height = 48
166
+ } = chipSize;
167
+ const verticalHitSlop = Math.max(0, (48 - height) / 2);
168
+ const horizontalHitSlop = Math.max(0, (48 - width) / 2);
169
+ return {
170
+ top: verticalHitSlop,
171
+ bottom: verticalHitSlop,
172
+ left: horizontalHitSlop,
173
+ right: horizontalHitSlop
174
+ };
175
+ }, [chipSize]);
153
176
  return <Container activeOpacity={1} onPress={onPress} style={[styles.container, {
154
177
  backgroundColor
155
178
  }, {
156
179
  borderRadius
157
- }, containerStyle, getContainerSize()]} testID={testID} {...others}>
180
+ }, containerStyle, containerSizeStyle]} testID={testID} hitSlop={hitSlop} {...others}>
158
181
  {avatarProps && renderAvatar()}
159
182
  {iconSource && renderIcon('left')}
160
183
  {leftElement}
@@ -26,8 +26,7 @@ class Swipeable extends Component {
26
26
  static defaultProps = {
27
27
  friction: 1,
28
28
  overshootFriction: 1,
29
- useNativeAnimations: false,
30
- // issue in iPhone5
29
+ useNativeAnimations: true,
31
30
  fullLeftThreshold: 0.45,
32
31
  fullRightThreshold: 0.45
33
32
  };
@@ -220,30 +220,33 @@ class Drawer extends PureComponent {
220
220
  outputRange,
221
221
  extrapolate: 'clamp'
222
222
  });
223
- return <RectButton key={index} testID={item.testID} style={[styles.action, item.style, {
224
- backgroundColor: item.background || DEFAULT_BG,
225
- width: item.width,
226
- minWidth: itemsMinWidth
227
- }]} onPress={() => this.onActionPress(item)}>
228
- {item.customElement}
229
- {!item.customElement && item.icon && <Animated.Image source={item.icon} style={[styles.actionIcon, {
230
- width: itemsIconSize,
231
- height: itemsIconSize,
232
- tintColor: item.iconColor || itemsTintColor,
233
- opacity,
234
- transform: [{
235
- scale
236
- }]
237
- }]} />}
238
- {!item.customElement && item.text && <Animated.Text style={[styles.actionText, {
239
- color: item.textColor || itemsTintColor,
240
- opacity,
241
- transform: [{
242
- scale
243
- }]
244
- }, itemsTextStyle]} accessibilityElementsHidden importantForAccessibility="no-hide-descendants" accessible={false}>
245
- {item.text}
246
- </Animated.Text>}
223
+ return <RectButton key={index} testID={item.testID} onPress={() => this.onActionPress(item)}>
224
+ <View style={[styles.action, item.style, {
225
+ backgroundColor: item.background || DEFAULT_BG,
226
+ height: '100%',
227
+ width: item.width,
228
+ minWidth: itemsMinWidth
229
+ }]}>
230
+ {item.customElement}
231
+ {!item.customElement && item.icon && <Animated.Image source={item.icon} style={[styles.actionIcon, {
232
+ width: itemsIconSize,
233
+ height: itemsIconSize,
234
+ tintColor: item.iconColor || itemsTintColor,
235
+ opacity,
236
+ transform: [{
237
+ scale
238
+ }]
239
+ }]} />}
240
+ {!item.customElement && item.text && <Animated.Text style={[styles.actionText, {
241
+ color: item.textColor || itemsTintColor,
242
+ opacity,
243
+ transform: [{
244
+ scale
245
+ }]
246
+ }, itemsTextStyle]} accessibilityElementsHidden importantForAccessibility="no-hide-descendants" accessible={false}>
247
+ {item.text}
248
+ </Animated.Text>}
249
+ </View>
247
250
  </RectButton>;
248
251
  };
249
252
  render() {
@@ -255,7 +258,7 @@ class Drawer extends PureComponent {
255
258
  onToggleSwipeLeft,
256
259
  ...others
257
260
  } = this.props;
258
- return <GestureHandlerRootView>
261
+ return <GestureHandlerRootView style={styles.container}>
259
262
  <Swipeable {...others} ref={this._swipeableRow} friction={1} containerStyle={style} animationOptions={this.animationOptions} renderLeftActions={this.leftRender} renderRightActions={this.rightRender} rightActionsContainerStyle={this.getRightActionsContainerStyle(rightItems, leftItem)} leftActionsContainerStyle={this.getLeftActionsContainerStyle(leftItem, rightItems)} onSwipeableWillOpen={this.onSwipeableWillOpen} onSwipeableWillClose={this.onSwipeableWillClose} onToggleSwipeLeft={onToggleSwipeLeft && this.onToggleSwipeLeft}>
260
263
  <View accessible accessibilityActions={this.getAccessibilityActions()} onAccessibilityAction={this.onAccessibilityAction} {...extractAccessibilityProps(this.props)}>
261
264
  {children}
@@ -266,6 +269,9 @@ class Drawer extends PureComponent {
266
269
  }
267
270
  export default asBaseComponent(Drawer);
268
271
  const styles = StyleSheet.create({
272
+ container: {
273
+ flex: 0
274
+ },
269
275
  leftAction: {
270
276
  flex: 1,
271
277
  justifyContent: 'center',
@@ -58,12 +58,13 @@ function ExpandableSection(props) {
58
58
  </View>
59
59
  </View>;
60
60
  };
61
+ const Container = onPress ? TouchableOpacity : View;
61
62
  if (shouldShowSectionHeader) {
62
63
  return <View style={styles.hidden}>
63
64
  {top && renderChildren()}
64
- <TouchableOpacity onPress={onPress} testID={testID} accessibilityState={accessibilityState}>
65
+ <Container onPress={onPress} testID={testID} accessibilityState={accessibilityState}>
65
66
  {sectionHeader}
66
- </TouchableOpacity>
67
+ </Container>
67
68
  {!top && renderChildren()}
68
69
  </View>;
69
70
  } else {
@@ -1,5 +1,5 @@
1
1
  import React, { useCallback, useRef, useImperativeHandle } from 'react';
2
- import { ScrollView as RNScrollView } from 'react-native';
2
+ import { ScrollView as RNScrollView, StyleSheet } from 'react-native';
3
3
  import { ScrollView as GestureScrollView, GestureHandlerRootView } from 'react-native-gesture-handler';
4
4
  import Fader from "../fader";
5
5
  import useScrollEnabler from "../../hooks/useScrollEnabler";
@@ -60,7 +60,7 @@ const FadedScrollView = props => {
60
60
  isScrollEnabled
61
61
  }));
62
62
  if (children) {
63
- return <GestureHandlerRootView>
63
+ return <GestureHandlerRootView style={styles.container}>
64
64
  <ScrollView scrollEventThrottle={16} decelerationRate={'fast'} {...others} horizontal={horizontal} scrollEnabled={scrollEnabled} onContentSizeChange={_onContentSizeChange} onLayout={_onLayout} onScroll={onScroll}
65
65
  // @ts-expect-error
66
66
  ref={scrollViewRef}>
@@ -72,5 +72,10 @@ const FadedScrollView = props => {
72
72
  }
73
73
  return null;
74
74
  };
75
+ const styles = StyleSheet.create({
76
+ container: {
77
+ flex: 0
78
+ }
79
+ });
75
80
  FadedScrollView.displayName = 'IGNORE';
76
81
  export default forwardRef(FadedScrollView);
@@ -13,7 +13,7 @@ declare const useFieldType: (props: UseFieldTypeProps) => {
13
13
  fontFamily?: string | undefined;
14
14
  fontSize?: number | undefined;
15
15
  fontStyle?: "normal" | "italic" | undefined;
16
- fontWeight?: "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | undefined;
16
+ fontWeight?: "black" | 900 | 600 | "light" | 100 | "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 200 | 300 | 400 | 500 | 700 | 800 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | undefined;
17
17
  letterSpacing?: number | undefined;
18
18
  lineHeight?: number | undefined;
19
19
  textAlign?: "auto" | "left" | "right" | "center" | "justify" | undefined;
@@ -36,31 +36,41 @@ declare const useFieldType: (props: UseFieldTypeProps) => {
36
36
  borderBlockEndColor?: import("react-native/types").ColorValue | undefined;
37
37
  borderBlockStartColor?: import("react-native/types").ColorValue | undefined;
38
38
  borderBottomColor?: import("react-native/types").ColorValue | undefined;
39
- borderBottomEndRadius?: import("react-native/types").AnimatableNumericValue | undefined;
40
- borderBottomLeftRadius?: import("react-native/types").AnimatableNumericValue | undefined;
41
- borderBottomRightRadius?: import("react-native/types").AnimatableNumericValue | undefined;
42
- borderBottomStartRadius?: import("react-native/types").AnimatableNumericValue | undefined;
39
+ borderBottomEndRadius?: string | import("react-native/types").AnimatableNumericValue | undefined;
40
+ borderBottomLeftRadius?: string | import("react-native/types").AnimatableNumericValue | undefined;
41
+ borderBottomRightRadius?: string | import("react-native/types").AnimatableNumericValue | undefined;
42
+ borderBottomStartRadius?: string | import("react-native/types").AnimatableNumericValue | undefined;
43
43
  borderColor?: import("react-native/types").ColorValue | undefined;
44
44
  borderCurve?: "circular" | "continuous" | undefined;
45
45
  borderEndColor?: import("react-native/types").ColorValue | undefined;
46
- borderEndEndRadius?: import("react-native/types").AnimatableNumericValue | undefined;
47
- borderEndStartRadius?: import("react-native/types").AnimatableNumericValue | undefined;
46
+ borderEndEndRadius?: string | import("react-native/types").AnimatableNumericValue | undefined;
47
+ borderEndStartRadius?: string | import("react-native/types").AnimatableNumericValue | undefined;
48
48
  borderLeftColor?: import("react-native/types").ColorValue | undefined;
49
- borderRadius?: import("react-native/types").AnimatableNumericValue | undefined;
49
+ borderRadius?: string | import("react-native/types").AnimatableNumericValue | undefined;
50
50
  borderRightColor?: import("react-native/types").ColorValue | undefined;
51
51
  borderStartColor?: import("react-native/types").ColorValue | undefined;
52
- borderStartEndRadius?: import("react-native/types").AnimatableNumericValue | undefined;
53
- borderStartStartRadius?: import("react-native/types").AnimatableNumericValue | undefined;
52
+ borderStartEndRadius?: string | import("react-native/types").AnimatableNumericValue | undefined;
53
+ borderStartStartRadius?: string | import("react-native/types").AnimatableNumericValue | undefined;
54
54
  borderStyle?: "solid" | "dotted" | "dashed" | undefined;
55
55
  borderTopColor?: import("react-native/types").ColorValue | undefined;
56
- borderTopEndRadius?: import("react-native/types").AnimatableNumericValue | undefined;
57
- borderTopLeftRadius?: import("react-native/types").AnimatableNumericValue | undefined;
58
- borderTopRightRadius?: import("react-native/types").AnimatableNumericValue | undefined;
59
- borderTopStartRadius?: import("react-native/types").AnimatableNumericValue | undefined;
56
+ borderTopEndRadius?: string | import("react-native/types").AnimatableNumericValue | undefined;
57
+ borderTopLeftRadius?: string | import("react-native/types").AnimatableNumericValue | undefined;
58
+ borderTopRightRadius?: string | import("react-native/types").AnimatableNumericValue | undefined;
59
+ borderTopStartRadius?: string | import("react-native/types").AnimatableNumericValue | undefined;
60
+ outlineColor?: import("react-native/types").ColorValue | undefined;
61
+ outlineOffset?: import("react-native/types").AnimatableNumericValue | undefined;
62
+ outlineStyle?: "solid" | "dotted" | "dashed" | undefined;
63
+ outlineWidth?: import("react-native/types").AnimatableNumericValue | undefined;
60
64
  opacity?: import("react-native/types").AnimatableNumericValue | undefined;
61
65
  elevation?: number | undefined;
62
66
  pointerEvents?: "auto" | "none" | "box-none" | "box-only" | undefined;
63
- alignContent?: "center" | "flex-start" | "flex-end" | "stretch" | "space-between" | "space-around" | undefined;
67
+ isolation?: "auto" | "isolate" | undefined;
68
+ cursor?: import("react-native/types").CursorValue | undefined;
69
+ boxShadow?: string | readonly import("react-native/types").BoxShadowValue[] | undefined;
70
+ filter?: string | readonly import("react-native/types").FilterFunction[] | undefined;
71
+ mixBlendMode?: import("react-native/types").BlendMode | undefined;
72
+ experimental_backgroundImage?: string | readonly import("react-native/types").GradientValue[] | undefined;
73
+ alignContent?: "center" | "flex-start" | "flex-end" | "stretch" | "space-between" | "space-around" | "space-evenly" | undefined;
64
74
  alignItems?: import("react-native/types").FlexAlignType | undefined;
65
75
  alignSelf?: "auto" | import("react-native/types").FlexAlignType | undefined;
66
76
  aspectRatio?: string | number | undefined;
@@ -72,14 +82,15 @@ declare const useFieldType: (props: UseFieldTypeProps) => {
72
82
  borderTopWidth?: number | undefined;
73
83
  borderWidth?: number | undefined;
74
84
  bottom?: import("react-native/types").DimensionValue | undefined;
75
- display?: "none" | "flex" | undefined;
85
+ boxSizing?: "border-box" | "content-box" | undefined;
86
+ display?: "none" | "flex" | "contents" | undefined;
76
87
  end?: import("react-native/types").DimensionValue | undefined;
77
88
  flex?: number | undefined;
78
89
  flexBasis?: import("react-native/types").DimensionValue | undefined;
79
90
  flexDirection?: "row" | "column" | "row-reverse" | "column-reverse" | undefined;
80
- rowGap?: number | undefined;
81
- gap?: number | undefined;
82
- columnGap?: number | undefined;
91
+ rowGap?: string | number | undefined;
92
+ gap?: string | number | undefined;
93
+ columnGap?: string | number | undefined;
83
94
  flexGrow?: number | undefined;
84
95
  flexShrink?: number | undefined;
85
96
  flexWrap?: "wrap" | "nowrap" | "wrap-reverse" | undefined;
@@ -109,13 +120,32 @@ declare const useFieldType: (props: UseFieldTypeProps) => {
109
120
  paddingStart?: import("react-native/types").DimensionValue | undefined;
110
121
  paddingTop?: import("react-native/types").DimensionValue | undefined;
111
122
  paddingVertical?: import("react-native/types").DimensionValue | undefined;
112
- position?: "absolute" | "relative" | undefined;
123
+ position?: "absolute" | "relative" | "static" | undefined;
113
124
  right?: import("react-native/types").DimensionValue | undefined;
114
125
  start?: import("react-native/types").DimensionValue | undefined;
115
126
  top?: import("react-native/types").DimensionValue | undefined;
116
127
  width?: import("react-native/types").DimensionValue | undefined;
117
128
  zIndex?: number | undefined;
118
129
  direction?: "ltr" | "rtl" | "inherit" | undefined;
130
+ inset?: import("react-native/types").DimensionValue | undefined;
131
+ insetBlock?: import("react-native/types").DimensionValue | undefined;
132
+ insetBlockEnd?: import("react-native/types").DimensionValue | undefined;
133
+ insetBlockStart?: import("react-native/types").DimensionValue | undefined;
134
+ insetInline?: import("react-native/types").DimensionValue | undefined;
135
+ insetInlineEnd?: import("react-native/types").DimensionValue | undefined;
136
+ insetInlineStart?: import("react-native/types").DimensionValue | undefined;
137
+ marginBlock?: import("react-native/types").DimensionValue | undefined;
138
+ marginBlockEnd?: import("react-native/types").DimensionValue | undefined;
139
+ marginBlockStart?: import("react-native/types").DimensionValue | undefined;
140
+ marginInline?: import("react-native/types").DimensionValue | undefined;
141
+ marginInlineEnd?: import("react-native/types").DimensionValue | undefined;
142
+ marginInlineStart?: import("react-native/types").DimensionValue | undefined;
143
+ paddingBlock?: import("react-native/types").DimensionValue | undefined;
144
+ paddingBlockEnd?: import("react-native/types").DimensionValue | undefined;
145
+ paddingBlockStart?: import("react-native/types").DimensionValue | undefined;
146
+ paddingInline?: import("react-native/types").DimensionValue | undefined;
147
+ paddingInlineEnd?: import("react-native/types").DimensionValue | undefined;
148
+ paddingInlineStart?: import("react-native/types").DimensionValue | undefined;
119
149
  shadowColor?: import("react-native/types").ColorValue | undefined;
120
150
  shadowOffset?: Readonly<{
121
151
  width: number;
@@ -123,7 +153,7 @@ declare const useFieldType: (props: UseFieldTypeProps) => {
123
153
  }> | undefined;
124
154
  shadowOpacity?: import("react-native/types").AnimatableNumericValue | undefined;
125
155
  shadowRadius?: number | undefined;
126
- transform?: string | (({
156
+ transform?: string | readonly (({
127
157
  perspective: import("react-native/types").AnimatableNumericValue;
128
158
  } & {
129
159
  rotate?: undefined;
@@ -244,7 +274,7 @@ declare const useFieldType: (props: UseFieldTypeProps) => {
244
274
  skewY?: undefined;
245
275
  matrix?: undefined;
246
276
  }) | ({
247
- translateX: import("react-native/types").AnimatableNumericValue;
277
+ translateX: import("react-native/types").AnimatableNumericValue | `${number}%`;
248
278
  } & {
249
279
  perspective?: undefined;
250
280
  rotate?: undefined;
@@ -259,7 +289,7 @@ declare const useFieldType: (props: UseFieldTypeProps) => {
259
289
  skewY?: undefined;
260
290
  matrix?: undefined;
261
291
  }) | ({
262
- translateY: import("react-native/types").AnimatableNumericValue;
292
+ translateY: import("react-native/types").AnimatableNumericValue | `${number}%`;
263
293
  } & {
264
294
  perspective?: undefined;
265
295
  rotate?: undefined;
@@ -6,7 +6,7 @@ import { GradientSliderProps, GradientSliderTypes } from './types';
6
6
  type Props<T> = GradientSliderProps<T> & ForwardRefInjectedProps;
7
7
  declare const _default: React.ForwardRefExoticComponent<Omit<import("./types").SliderProps, "onValueChange"> & {
8
8
  color?: string | import("tinycolor2").ColorFormats.HSLA | undefined;
9
- type?: "default" | "hue" | "lightness" | "saturation" | GradientSliderTypes | undefined;
9
+ type?: "default" | "hue" | "saturation" | "lightness" | GradientSliderTypes | undefined;
10
10
  gradientSteps?: number | undefined;
11
11
  onValueChange?: ((value: string, alfa: number) => void) | undefined;
12
12
  accessible?: boolean | undefined;
@@ -23,6 +23,8 @@ function SortableItem(props) {
23
23
  const currIndex = useSharedValue(initialIndex.value);
24
24
  const translateX = useSharedValue(0);
25
25
  const translateY = useSharedValue(0);
26
+ const zIndex = useSharedValue(0);
27
+ const scale = useSharedValue(1);
26
28
  const isDragging = useSharedValue(false);
27
29
  const tempItemsOrder = useSharedValue(itemsOrder.value);
28
30
  const tempTranslateX = useSharedValue(0);
@@ -85,6 +87,15 @@ function SortableItem(props) {
85
87
  translateY.value = withTiming(translation.y, animationConfig);
86
88
  }
87
89
  }, []);
90
+ useAnimatedReaction(() => isDragging.value, (isDragging, wasDragging) => {
91
+ if (isDragging && !wasDragging) {
92
+ zIndex.value = withTiming(100, animationConfig);
93
+ scale.value = withSpring(1.1);
94
+ } else if (!isDragging && wasDragging) {
95
+ zIndex.value = withTiming(0, animationConfig);
96
+ scale.value = withSpring(1);
97
+ }
98
+ }, []);
88
99
  const onLayout = useCallback(event => {
89
100
  'worklet';
90
101
 
@@ -148,16 +159,14 @@ function SortableItem(props) {
148
159
  }
149
160
  });
150
161
  const animatedStyle = useAnimatedStyle(() => {
151
- const scale = withSpring(isDragging.value ? 1.1 : 1);
152
- const zIndex = isDragging.value ? 100 : withTiming(0, animationConfig);
153
162
  return {
154
- zIndex,
163
+ zIndex: Math.round(zIndex.value),
155
164
  transform: [{
156
165
  translateX: translateX.value
157
166
  }, {
158
167
  translateY: translateY.value
159
168
  }, {
160
- scale
169
+ scale: scale.value
161
170
  }]
162
171
  };
163
172
  });
@@ -51,6 +51,8 @@ const SortableListItem = props => {
51
51
  });
52
52
  const currIndex = useSharedValue(initialIndex.value);
53
53
  const translation = useSharedValue(0);
54
+ const zIndex = useSharedValue(0);
55
+ const scale = useSharedValue(1);
54
56
  const isDragging = useSharedValue(false);
55
57
  const draggedItemShadow = useSharedValue(StyleUtils.unpackStyle({
56
58
  ...Shadows.sh30.bottom,
@@ -78,6 +80,15 @@ const SortableListItem = props => {
78
80
  translation.value = withTiming(_translation, animationConfig);
79
81
  }
80
82
  }, []);
83
+ useAnimatedReaction(() => isDragging.value, (isDragging, wasDragging) => {
84
+ if (isDragging && !wasDragging) {
85
+ zIndex.value = withTiming(100, animationConfig);
86
+ scale.value = withSpring(propsScale);
87
+ } else if (!isDragging && wasDragging) {
88
+ zIndex.value = withTiming(0, animationConfig);
89
+ scale.value = withSpring(1);
90
+ }
91
+ }, []);
81
92
  const dragOnLongPressGesture = Gesture.Pan().activateAfterLongPress(250).enabled(!locked).onStart(() => {
82
93
  isDragging.value = true;
83
94
  translation.value = getTranslationByIndexChange(currIndex.value, initialIndex.value, itemSize.value);
@@ -143,20 +154,18 @@ const SortableListItem = props => {
143
154
  }
144
155
  });
145
156
  const draggedAnimatedStyle = useAnimatedStyle(() => {
146
- const scale = withSpring(isDragging.value ? propsScale : 1);
147
- const zIndex = isDragging.value ? 100 : withTiming(0, animationConfig);
148
157
  const opacity = isDragging.value ? 0.95 : 1;
149
158
  const shadow = isDragging.value ? draggedItemShadow.value : defaultItemShadow.value;
150
159
  return {
151
160
  backgroundColor: itemProps?.backgroundColor ?? LIST_ITEM_BACKGROUND,
152
161
  // required for elevation to work in Android
153
- zIndex,
162
+ zIndex: Math.round(zIndex.value),
154
163
  transform: [horizontal ? {
155
164
  translateX: translation.value
156
165
  } : {
157
166
  translateY: translation.value
158
167
  }, {
159
- scale
168
+ scale: scale.value
160
169
  }],
161
170
  opacity,
162
171
  ...itemProps?.margins,