@lodev09/react-native-true-sheet 3.0.0 → 3.0.2
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/README.md +3 -0
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetView.kt +5 -0
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetViewController.kt +5 -3
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetViewManager.kt +27 -7
- package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetGrabberView.kt +36 -10
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetViewShadowNode.cpp +5 -3
- package/ios/TrueSheetView.mm +34 -5
- package/ios/TrueSheetViewController.h +1 -0
- package/ios/TrueSheetViewController.mm +53 -31
- package/ios/core/TrueSheetBlurView.h +3 -1
- package/ios/core/TrueSheetBlurView.mm +31 -32
- package/ios/core/TrueSheetGrabberView.h +42 -0
- package/ios/core/TrueSheetGrabberView.mm +107 -0
- package/lib/module/TrueSheet.js +7 -0
- package/lib/module/TrueSheet.js.map +1 -1
- package/lib/module/fabric/TrueSheetViewNativeComponent.ts +16 -3
- package/lib/typescript/src/TrueSheet.d.ts.map +1 -1
- package/lib/typescript/src/TrueSheet.types.d.ts +62 -12
- package/lib/typescript/src/TrueSheet.types.d.ts.map +1 -1
- package/lib/typescript/src/fabric/TrueSheetViewNativeComponent.d.ts +13 -2
- package/lib/typescript/src/fabric/TrueSheetViewNativeComponent.d.ts.map +1 -1
- package/package.json +8 -2
- package/src/TrueSheet.tsx +7 -0
- package/src/TrueSheet.types.ts +65 -13
- package/src/fabric/TrueSheetViewNativeComponent.ts +16 -3
package/README.md
CHANGED
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
[](https://github.com/lodev09/react-native-true-sheet/actions/workflows/ci.yml)
|
|
4
4
|
[](https://www.npmjs.com/package/@lodev09/react-native-true-sheet)
|
|
5
5
|
|
|
6
|
+
> [!NOTE]
|
|
7
|
+
> 🎉 **Version 3.0 is here!** Completely rebuilt for Fabric with new features like automatic ScrollView detection, native headers/footers, sheet stacking, and more. [Read the announcement](https://sheet.lodev09.com/blog/release-3-0)
|
|
8
|
+
|
|
6
9
|
The true native bottom sheet experience for your React Native Apps. 💩
|
|
7
10
|
|
|
8
11
|
<img alt="React Native True Sheet - IOS" src="docs/static/img/preview-ios.gif" width="300" height="600" /><img alt="React Native True Sheet - Android" src="docs/static/img/preview-android.gif" width="300" height="600" />
|
|
@@ -13,6 +13,7 @@ import com.facebook.react.uimanager.ThemedReactContext
|
|
|
13
13
|
import com.facebook.react.uimanager.UIManagerHelper
|
|
14
14
|
import com.facebook.react.uimanager.events.EventDispatcher
|
|
15
15
|
import com.facebook.react.views.view.ReactViewGroup
|
|
16
|
+
import com.lodev09.truesheet.core.GrabberOptions
|
|
16
17
|
import com.lodev09.truesheet.core.TrueSheetDialogObserver
|
|
17
18
|
import com.lodev09.truesheet.events.*
|
|
18
19
|
|
|
@@ -281,6 +282,10 @@ class TrueSheetView(private val reactContext: ThemedReactContext) :
|
|
|
281
282
|
viewController.grabber = grabber
|
|
282
283
|
}
|
|
283
284
|
|
|
285
|
+
fun setGrabberOptions(options: GrabberOptions?) {
|
|
286
|
+
viewController.grabberOptions = options
|
|
287
|
+
}
|
|
288
|
+
|
|
284
289
|
fun setDetents(newDetents: MutableList<Double>) {
|
|
285
290
|
viewController.detents = newDetents
|
|
286
291
|
}
|
|
@@ -24,6 +24,7 @@ import com.facebook.react.util.RNLog
|
|
|
24
24
|
import com.facebook.react.views.view.ReactViewGroup
|
|
25
25
|
import com.google.android.material.bottomsheet.BottomSheetBehavior
|
|
26
26
|
import com.google.android.material.bottomsheet.BottomSheetDialog
|
|
27
|
+
import com.lodev09.truesheet.core.GrabberOptions
|
|
27
28
|
import com.lodev09.truesheet.core.RNScreensFragmentObserver
|
|
28
29
|
import com.lodev09.truesheet.core.TrueSheetGrabberView
|
|
29
30
|
import com.lodev09.truesheet.utils.ScreenUtils
|
|
@@ -139,6 +140,7 @@ class TrueSheetViewController(private val reactContext: ThemedReactContext) :
|
|
|
139
140
|
var dimmed = true
|
|
140
141
|
var dimmedDetentIndex = 0
|
|
141
142
|
var grabber: Boolean = true
|
|
143
|
+
var grabberOptions: GrabberOptions? = null
|
|
142
144
|
var sheetCornerRadius: Float = -1f
|
|
143
145
|
var sheetBackgroundColor: Int = 0
|
|
144
146
|
var edgeToEdgeFullScreen: Boolean = false
|
|
@@ -298,10 +300,10 @@ class TrueSheetViewController(private val reactContext: ThemedReactContext) :
|
|
|
298
300
|
}
|
|
299
301
|
|
|
300
302
|
dialog.setOnCancelListener {
|
|
303
|
+
delegate?.viewControllerWillDismiss()
|
|
304
|
+
|
|
301
305
|
// Notify parent sheet that it is about to regain focus
|
|
302
306
|
parentSheetView?.viewControllerWillFocus()
|
|
303
|
-
|
|
304
|
-
delegate?.viewControllerWillDismiss()
|
|
305
307
|
}
|
|
306
308
|
|
|
307
309
|
dialog.setOnDismissListener {
|
|
@@ -579,7 +581,7 @@ class TrueSheetViewController(private val reactContext: ThemedReactContext) :
|
|
|
579
581
|
|
|
580
582
|
if (!grabber || !draggable) return
|
|
581
583
|
|
|
582
|
-
val grabberView = TrueSheetGrabberView(reactContext).apply {
|
|
584
|
+
val grabberView = TrueSheetGrabberView(reactContext, grabberOptions).apply {
|
|
583
585
|
tag = GRABBER_TAG
|
|
584
586
|
}
|
|
585
587
|
|
|
@@ -2,6 +2,7 @@ package com.lodev09.truesheet
|
|
|
2
2
|
|
|
3
3
|
import android.view.WindowManager
|
|
4
4
|
import com.facebook.react.bridge.ReadableArray
|
|
5
|
+
import com.facebook.react.bridge.ReadableMap
|
|
5
6
|
import com.facebook.react.module.annotations.ReactModule
|
|
6
7
|
import com.facebook.react.uimanager.PixelUtil.dpToPx
|
|
7
8
|
import com.facebook.react.uimanager.ReactStylesDiffMap
|
|
@@ -13,6 +14,7 @@ import com.facebook.react.uimanager.ViewManagerDelegate
|
|
|
13
14
|
import com.facebook.react.uimanager.annotations.ReactProp
|
|
14
15
|
import com.facebook.react.viewmanagers.TrueSheetViewManagerDelegate
|
|
15
16
|
import com.facebook.react.viewmanagers.TrueSheetViewManagerInterface
|
|
17
|
+
import com.lodev09.truesheet.core.GrabberOptions
|
|
16
18
|
import com.lodev09.truesheet.events.*
|
|
17
19
|
|
|
18
20
|
/**
|
|
@@ -109,6 +111,29 @@ class TrueSheetViewManager :
|
|
|
109
111
|
view.setGrabber(grabber)
|
|
110
112
|
}
|
|
111
113
|
|
|
114
|
+
@ReactProp(name = "grabberOptions")
|
|
115
|
+
override fun setGrabberOptions(view: TrueSheetView, options: ReadableMap?) {
|
|
116
|
+
if (options == null) {
|
|
117
|
+
view.setGrabberOptions(null)
|
|
118
|
+
return
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
val grabberOptions = GrabberOptions(
|
|
122
|
+
width = if (options.hasKey("width")) options.getDouble("width").toFloat() else null,
|
|
123
|
+
height = if (options.hasKey("height")) options.getDouble("height").toFloat() else null,
|
|
124
|
+
topMargin = if (options.hasKey("topMargin")) options.getDouble("topMargin").toFloat() else null,
|
|
125
|
+
cornerRadius = if (options.hasKey("cornerRadius") &&
|
|
126
|
+
options.getDouble("cornerRadius") >= 0
|
|
127
|
+
) {
|
|
128
|
+
options.getDouble("cornerRadius").toFloat()
|
|
129
|
+
} else {
|
|
130
|
+
null
|
|
131
|
+
},
|
|
132
|
+
color = if (options.hasKey("color") && options.getInt("color") != 0) options.getInt("color") else null
|
|
133
|
+
)
|
|
134
|
+
view.setGrabberOptions(grabberOptions)
|
|
135
|
+
}
|
|
136
|
+
|
|
112
137
|
@ReactProp(name = "dismissible", defaultBoolean = true)
|
|
113
138
|
override fun setDismissible(view: TrueSheetView, dismissible: Boolean) {
|
|
114
139
|
view.setDismissible(dismissible)
|
|
@@ -160,13 +185,8 @@ class TrueSheetViewManager :
|
|
|
160
185
|
// iOS-specific prop - no-op on Android
|
|
161
186
|
}
|
|
162
187
|
|
|
163
|
-
@ReactProp(name = "
|
|
164
|
-
override fun
|
|
165
|
-
// iOS-specific prop - no-op on Android
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
@ReactProp(name = "blurInteraction", defaultBoolean = false)
|
|
169
|
-
override fun setBlurInteraction(view: TrueSheetView, value: Boolean) {
|
|
188
|
+
@ReactProp(name = "blurOptions")
|
|
189
|
+
override fun setBlurOptions(view: TrueSheetView, options: ReadableMap?) {
|
|
170
190
|
// iOS-specific prop - no-op on Android
|
|
171
191
|
}
|
|
172
192
|
|
|
@@ -9,33 +9,59 @@ import android.view.View
|
|
|
9
9
|
import android.widget.FrameLayout
|
|
10
10
|
import com.facebook.react.uimanager.PixelUtil.dpToPx
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Options for customizing the grabber appearance.
|
|
14
|
+
*/
|
|
15
|
+
data class GrabberOptions(
|
|
16
|
+
val width: Float? = null,
|
|
17
|
+
val height: Float? = null,
|
|
18
|
+
val topMargin: Float? = null,
|
|
19
|
+
val cornerRadius: Float? = null,
|
|
20
|
+
val color: Int? = null
|
|
21
|
+
)
|
|
22
|
+
|
|
12
23
|
/**
|
|
13
24
|
* Native grabber (drag handle) view for the bottom sheet.
|
|
14
25
|
* Displays a small pill-shaped indicator at the top of the sheet.
|
|
15
26
|
*/
|
|
16
27
|
@SuppressLint("ViewConstructor")
|
|
17
|
-
class TrueSheetGrabberView(context: Context) : View(context) {
|
|
28
|
+
class TrueSheetGrabberView(context: Context, private val options: GrabberOptions? = null) : View(context) {
|
|
18
29
|
|
|
19
30
|
companion object {
|
|
20
|
-
private const val
|
|
21
|
-
private const val
|
|
22
|
-
private const val
|
|
23
|
-
private val
|
|
31
|
+
private const val DEFAULT_WIDTH = 32f // dp
|
|
32
|
+
private const val DEFAULT_HEIGHT = 4f // dp
|
|
33
|
+
private const val DEFAULT_TOP_MARGIN = 16f // dp
|
|
34
|
+
private val DEFAULT_COLOR = Color.argb((0.4 * 255).toInt(), 73, 69, 79) // #49454F @ 40%
|
|
24
35
|
}
|
|
25
36
|
|
|
37
|
+
private val grabberWidth: Float
|
|
38
|
+
get() = options?.width ?: DEFAULT_WIDTH
|
|
39
|
+
|
|
40
|
+
private val grabberHeight: Float
|
|
41
|
+
get() = options?.height ?: DEFAULT_HEIGHT
|
|
42
|
+
|
|
43
|
+
private val grabberTopMargin: Float
|
|
44
|
+
get() = options?.topMargin ?: DEFAULT_TOP_MARGIN
|
|
45
|
+
|
|
46
|
+
private val grabberCornerRadius: Float
|
|
47
|
+
get() = options?.cornerRadius ?: (grabberHeight / 2)
|
|
48
|
+
|
|
49
|
+
private val grabberColor: Int
|
|
50
|
+
get() = options?.color ?: DEFAULT_COLOR
|
|
51
|
+
|
|
26
52
|
init {
|
|
27
53
|
layoutParams = FrameLayout.LayoutParams(
|
|
28
|
-
|
|
29
|
-
|
|
54
|
+
grabberWidth.dpToPx().toInt(),
|
|
55
|
+
grabberHeight.dpToPx().toInt()
|
|
30
56
|
).apply {
|
|
31
57
|
gravity = Gravity.CENTER_HORIZONTAL or Gravity.TOP
|
|
32
|
-
topMargin =
|
|
58
|
+
topMargin = grabberTopMargin.dpToPx().toInt()
|
|
33
59
|
}
|
|
34
60
|
|
|
35
61
|
background = GradientDrawable().apply {
|
|
36
62
|
shape = GradientDrawable.RECTANGLE
|
|
37
|
-
cornerRadius =
|
|
38
|
-
setColor(
|
|
63
|
+
cornerRadius = grabberCornerRadius.dpToPx()
|
|
64
|
+
setColor(grabberColor)
|
|
39
65
|
}
|
|
40
66
|
|
|
41
67
|
// High elevation to ensure grabber appears above content views
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
#include "TrueSheetViewShadowNode.h"
|
|
2
2
|
|
|
3
|
-
#include <
|
|
3
|
+
#include <react/renderer/components/view/conversions.h>
|
|
4
4
|
|
|
5
5
|
namespace facebook::react {
|
|
6
6
|
|
|
7
|
+
using namespace yoga;
|
|
8
|
+
|
|
7
9
|
extern const char TrueSheetViewComponentName[] = "TrueSheetView";
|
|
8
10
|
|
|
9
11
|
void TrueSheetViewShadowNode::adjustLayoutWithState() {
|
|
@@ -22,7 +24,7 @@ void TrueSheetViewShadowNode::adjustLayoutWithState() {
|
|
|
22
24
|
|
|
23
25
|
// Set width if provided
|
|
24
26
|
if (stateData.containerWidth > 0) {
|
|
25
|
-
adjustedStyle.setDimension(yoga::Dimension::Width,
|
|
27
|
+
adjustedStyle.setDimension(yoga::Dimension::Width, StyleSizeLength::points(stateData.containerWidth));
|
|
26
28
|
if (adjustedStyle.dimension(yoga::Dimension::Width) != currentStyle.dimension(yoga::Dimension::Width)) {
|
|
27
29
|
needsUpdate = true;
|
|
28
30
|
}
|
|
@@ -30,7 +32,7 @@ void TrueSheetViewShadowNode::adjustLayoutWithState() {
|
|
|
30
32
|
|
|
31
33
|
// Set height if provided
|
|
32
34
|
if (stateData.containerHeight > 0) {
|
|
33
|
-
adjustedStyle.setDimension(yoga::Dimension::Height,
|
|
35
|
+
adjustedStyle.setDimension(yoga::Dimension::Height, StyleSizeLength::points(stateData.containerHeight));
|
|
34
36
|
if (adjustedStyle.dimension(yoga::Dimension::Height) != currentStyle.dimension(yoga::Dimension::Height)) {
|
|
35
37
|
needsUpdate = true;
|
|
36
38
|
}
|
package/ios/TrueSheetView.mm
CHANGED
|
@@ -121,11 +121,10 @@ using namespace facebook::react;
|
|
|
121
121
|
// Blur tint
|
|
122
122
|
_controller.blurTint = !newProps.blurTint.empty() ? RCTNSStringFromString(newProps.blurTint) : nil;
|
|
123
123
|
|
|
124
|
-
// Blur
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
_controller.blurInteraction = newProps.blurInteraction;
|
|
124
|
+
// Blur options
|
|
125
|
+
const auto &blurOpts = newProps.blurOptions;
|
|
126
|
+
_controller.blurIntensity = blurOpts.intensity >= 0 ? @(blurOpts.intensity) : nil;
|
|
127
|
+
_controller.blurInteraction = blurOpts.interaction;
|
|
129
128
|
|
|
130
129
|
// Corner radius
|
|
131
130
|
_controller.cornerRadius = newProps.cornerRadius < 0 ? nil : @(newProps.cornerRadius);
|
|
@@ -136,6 +135,36 @@ using namespace facebook::react;
|
|
|
136
135
|
}
|
|
137
136
|
|
|
138
137
|
_controller.grabber = newProps.grabber;
|
|
138
|
+
|
|
139
|
+
// Grabber options - check if any non-default values are set
|
|
140
|
+
const auto &grabberOpts = newProps.grabberOptions;
|
|
141
|
+
BOOL hasGrabberOptions = grabberOpts.width > 0 || grabberOpts.height > 0 || grabberOpts.topMargin > 0 ||
|
|
142
|
+
grabberOpts.cornerRadius >= 0 || grabberOpts.color != 0;
|
|
143
|
+
|
|
144
|
+
if (hasGrabberOptions) {
|
|
145
|
+
NSMutableDictionary *options = [NSMutableDictionary dictionary];
|
|
146
|
+
|
|
147
|
+
if (grabberOpts.width > 0) {
|
|
148
|
+
options[@"width"] = @(grabberOpts.width);
|
|
149
|
+
}
|
|
150
|
+
if (grabberOpts.height > 0) {
|
|
151
|
+
options[@"height"] = @(grabberOpts.height);
|
|
152
|
+
}
|
|
153
|
+
if (grabberOpts.topMargin > 0) {
|
|
154
|
+
options[@"topMargin"] = @(grabberOpts.topMargin);
|
|
155
|
+
}
|
|
156
|
+
if (grabberOpts.cornerRadius >= 0) {
|
|
157
|
+
options[@"cornerRadius"] = @(grabberOpts.cornerRadius);
|
|
158
|
+
}
|
|
159
|
+
if (grabberOpts.color != 0) {
|
|
160
|
+
options[@"color"] = RCTUIColorFromSharedColor(SharedColor(grabberOpts.color));
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
_controller.grabberOptions = options;
|
|
164
|
+
} else {
|
|
165
|
+
_controller.grabberOptions = nil;
|
|
166
|
+
}
|
|
167
|
+
|
|
139
168
|
_controller.pageSizing = newProps.pageSizing;
|
|
140
169
|
_controller.modalInPresentation = !newProps.dismissible;
|
|
141
170
|
_controller.draggable = newProps.draggable;
|
|
@@ -55,6 +55,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
55
55
|
@property (nonatomic, strong, nullable) UIColor *backgroundColor;
|
|
56
56
|
@property (nonatomic, strong, nullable) NSNumber *cornerRadius;
|
|
57
57
|
@property (nonatomic, assign) BOOL grabber;
|
|
58
|
+
@property (nonatomic, strong, nullable) NSDictionary *grabberOptions;
|
|
58
59
|
@property (nonatomic, assign) BOOL draggable;
|
|
59
60
|
@property (nonatomic, assign) BOOL dimmed;
|
|
60
61
|
@property (nonatomic, strong, nullable) NSNumber *dimmedDetentIndex;
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
#import "TrueSheetViewController.h"
|
|
10
10
|
#import "TrueSheetContentView.h"
|
|
11
11
|
#import "core/TrueSheetBlurView.h"
|
|
12
|
+
#import "core/TrueSheetGrabberView.h"
|
|
12
13
|
#import "utils/GestureUtil.h"
|
|
13
14
|
#import "utils/WindowUtil.h"
|
|
14
15
|
|
|
@@ -30,6 +31,9 @@
|
|
|
30
31
|
// Blur effect view
|
|
31
32
|
TrueSheetBlurView *_blurView;
|
|
32
33
|
|
|
34
|
+
// Custom grabber view
|
|
35
|
+
TrueSheetGrabberView *_grabberView;
|
|
36
|
+
|
|
33
37
|
// Resolved detent positions (Y coordinate when sheet rests at each detent)
|
|
34
38
|
NSMutableArray<NSNumber *> *_resolvedDetentPositions;
|
|
35
39
|
}
|
|
@@ -121,6 +125,11 @@
|
|
|
121
125
|
- (void)viewDidLoad {
|
|
122
126
|
[super viewDidLoad];
|
|
123
127
|
self.view.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
|
|
128
|
+
|
|
129
|
+
// Create custom grabber view (hidden by default, shown when grabberOptions is set)
|
|
130
|
+
_grabberView = [[TrueSheetGrabberView alloc] init];
|
|
131
|
+
_grabberView.hidden = YES;
|
|
132
|
+
[_grabberView addToView:self.view];
|
|
124
133
|
}
|
|
125
134
|
|
|
126
135
|
- (void)viewWillAppear:(BOOL)animated {
|
|
@@ -173,25 +182,30 @@
|
|
|
173
182
|
}
|
|
174
183
|
}
|
|
175
184
|
|
|
185
|
+
- (BOOL)isDismissing {
|
|
186
|
+
return self.presentingViewController == nil || self.isBeingDismissed;
|
|
187
|
+
}
|
|
188
|
+
|
|
176
189
|
- (void)viewWillDisappear:(BOOL)animated {
|
|
177
190
|
[super viewWillDisappear:animated];
|
|
178
191
|
|
|
179
|
-
|
|
192
|
+
if (self.isDismissing) {
|
|
193
|
+
_isPresented = NO;
|
|
194
|
+
_activeDetentIndex = -1;
|
|
180
195
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
if (_parentSheetController) {
|
|
184
|
-
if ([_parentSheetController.delegate respondsToSelector:@selector(viewControllerWillFocus)]) {
|
|
185
|
-
[_parentSheetController.delegate viewControllerWillFocus];
|
|
186
|
-
}
|
|
196
|
+
if ([self.delegate respondsToSelector:@selector(viewControllerWillDismiss)]) {
|
|
197
|
+
[self.delegate viewControllerWillDismiss];
|
|
187
198
|
}
|
|
188
199
|
|
|
189
200
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
190
201
|
[self emitChangePositionDelegateWithPosition:self.currentPosition realtime:NO];
|
|
191
202
|
});
|
|
192
203
|
|
|
193
|
-
|
|
194
|
-
|
|
204
|
+
// Notify the parent sheet (if any) that it is about to regain focus
|
|
205
|
+
if (_parentSheetController) {
|
|
206
|
+
if ([_parentSheetController.delegate respondsToSelector:@selector(viewControllerWillFocus)]) {
|
|
207
|
+
[_parentSheetController.delegate viewControllerWillFocus];
|
|
208
|
+
}
|
|
195
209
|
}
|
|
196
210
|
}
|
|
197
211
|
}
|
|
@@ -200,9 +214,7 @@
|
|
|
200
214
|
[super viewDidDisappear:animated];
|
|
201
215
|
|
|
202
216
|
// Only dispatch didDismiss when actually dismissing (not when another modal is presented on top)
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
if (isActuallyDismissing) {
|
|
217
|
+
if (self.isDismissing) {
|
|
206
218
|
// Notify the parent sheet (if any) that it regained focus
|
|
207
219
|
if (_parentSheetController) {
|
|
208
220
|
if ([_parentSheetController.delegate respondsToSelector:@selector(viewControllerDidFocus)]) {
|
|
@@ -215,11 +227,6 @@
|
|
|
215
227
|
[self.delegate viewControllerDidDismiss];
|
|
216
228
|
}
|
|
217
229
|
}
|
|
218
|
-
|
|
219
|
-
if (isActuallyDismissing) {
|
|
220
|
-
_isPresented = NO;
|
|
221
|
-
_activeDetentIndex = -1;
|
|
222
|
-
}
|
|
223
230
|
}
|
|
224
231
|
|
|
225
232
|
- (void)viewDidLayoutSubviews {
|
|
@@ -678,7 +685,6 @@
|
|
|
678
685
|
}
|
|
679
686
|
|
|
680
687
|
sheet.prefersEdgeAttachedInCompactHeight = YES;
|
|
681
|
-
sheet.prefersGrabberVisible = self.grabber && self.draggable;
|
|
682
688
|
|
|
683
689
|
if (self.cornerRadius) {
|
|
684
690
|
sheet.preferredCornerRadius = [self.cornerRadius floatValue];
|
|
@@ -688,28 +694,44 @@
|
|
|
688
694
|
|
|
689
695
|
self.view.backgroundColor = self.backgroundColor;
|
|
690
696
|
|
|
691
|
-
// Setup
|
|
697
|
+
// Setup blur effect view - recreate only when blurTint changes
|
|
698
|
+
BOOL blurTintChanged = ![_blurView.blurTint isEqualToString:self.blurTint];
|
|
699
|
+
|
|
700
|
+
if (_blurView && blurTintChanged) {
|
|
701
|
+
[_blurView removeFromSuperview];
|
|
702
|
+
_blurView = nil;
|
|
703
|
+
}
|
|
704
|
+
|
|
692
705
|
if (self.blurTint && self.blurTint.length > 0) {
|
|
693
|
-
// Create blur view if needed
|
|
694
706
|
if (!_blurView) {
|
|
695
707
|
_blurView = [[TrueSheetBlurView alloc] init];
|
|
696
|
-
_blurView
|
|
697
|
-
_blurView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
|
698
|
-
[self.view insertSubview:_blurView atIndex:0];
|
|
708
|
+
[_blurView addToView:self.view];
|
|
699
709
|
}
|
|
700
|
-
|
|
701
|
-
// Update blur properties and apply effect
|
|
702
710
|
_blurView.blurTint = self.blurTint;
|
|
703
711
|
_blurView.blurIntensity = self.blurIntensity;
|
|
704
712
|
_blurView.blurInteraction = self.blurInteraction;
|
|
705
713
|
[_blurView applyBlurEffect];
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
// Setup grabber
|
|
717
|
+
BOOL showGrabber = self.grabber && self.draggable;
|
|
718
|
+
|
|
719
|
+
if (self.grabberOptions) {
|
|
720
|
+
// Use custom grabber view when options are provided
|
|
721
|
+
sheet.prefersGrabberVisible = NO;
|
|
722
|
+
|
|
723
|
+
NSDictionary *options = self.grabberOptions;
|
|
724
|
+
_grabberView.grabberWidth = options[@"width"];
|
|
725
|
+
_grabberView.grabberHeight = options[@"height"];
|
|
726
|
+
_grabberView.topMargin = options[@"topMargin"];
|
|
727
|
+
_grabberView.cornerRadius = options[@"cornerRadius"];
|
|
728
|
+
_grabberView.color = options[@"color"];
|
|
729
|
+
[_grabberView applyConfiguration];
|
|
730
|
+
_grabberView.hidden = !showGrabber;
|
|
706
731
|
} else {
|
|
707
|
-
//
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
[_blurView removeFromSuperview];
|
|
711
|
-
_blurView = nil;
|
|
712
|
-
}
|
|
732
|
+
// Use system default grabber when no options provided
|
|
733
|
+
sheet.prefersGrabberVisible = showGrabber;
|
|
734
|
+
_grabberView.hidden = YES;
|
|
713
735
|
}
|
|
714
736
|
}
|
|
715
737
|
|
|
@@ -16,8 +16,10 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
16
16
|
@property (nonatomic, strong, nullable) NSNumber *blurIntensity;
|
|
17
17
|
@property (nonatomic, assign) BOOL blurInteraction;
|
|
18
18
|
|
|
19
|
+
/// Adds the blur view to a parent view with proper constraints
|
|
20
|
+
- (void)addToView:(UIView *)parentView;
|
|
21
|
+
|
|
19
22
|
- (void)applyBlurEffect;
|
|
20
|
-
- (void)removeBlurEffect;
|
|
21
23
|
|
|
22
24
|
@end
|
|
23
25
|
|
|
@@ -61,52 +61,51 @@
|
|
|
61
61
|
|
|
62
62
|
#pragma mark - Public
|
|
63
63
|
|
|
64
|
-
- (void)
|
|
65
|
-
if (
|
|
66
|
-
[self removeBlurEffect];
|
|
64
|
+
- (void)addToView:(UIView *)parentView {
|
|
65
|
+
if (self.superview == parentView) {
|
|
67
66
|
return;
|
|
68
67
|
}
|
|
69
68
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// Clear existing effect
|
|
77
|
-
self.effect = nil;
|
|
78
|
-
|
|
79
|
-
UIBlurEffectStyle style = [TrueSheetBlurView blurEffectStyleFromString:self.blurTint];
|
|
80
|
-
UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:style];
|
|
69
|
+
self.frame = parentView.bounds;
|
|
70
|
+
self.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
|
71
|
+
[parentView insertSubview:self atIndex:0];
|
|
72
|
+
}
|
|
81
73
|
|
|
74
|
+
- (void)applyBlurEffect {
|
|
82
75
|
self.userInteractionEnabled = self.blurInteraction;
|
|
83
76
|
|
|
84
|
-
//
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
77
|
+
// Create animator only once
|
|
78
|
+
if (!_blurAnimator) {
|
|
79
|
+
UIBlurEffectStyle style = [TrueSheetBlurView blurEffectStyleFromString:self.blurTint];
|
|
80
|
+
UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:style];
|
|
81
|
+
|
|
82
|
+
__weak __typeof(self) weakSelf = self;
|
|
83
|
+
_blurAnimator = [[UIViewPropertyAnimator alloc] initWithDuration:1.0
|
|
84
|
+
curve:UIViewAnimationCurveLinear
|
|
85
|
+
animations:^{
|
|
86
|
+
weakSelf.effect = blurEffect;
|
|
87
|
+
}];
|
|
88
|
+
_blurAnimator.pausesOnCompletion = YES;
|
|
89
|
+
}
|
|
92
90
|
|
|
93
|
-
//
|
|
91
|
+
// Update intensity
|
|
94
92
|
CGFloat intensity =
|
|
95
93
|
(self.blurIntensity && [self.blurIntensity floatValue] >= 0) ? [self.blurIntensity floatValue] / 100.0 : 1.0;
|
|
96
94
|
_blurAnimator.fractionComplete = intensity;
|
|
97
95
|
}
|
|
98
96
|
|
|
99
|
-
- (void)
|
|
100
|
-
|
|
101
|
-
[_blurAnimator stopAnimation:YES];
|
|
102
|
-
_blurAnimator = nil;
|
|
103
|
-
}
|
|
97
|
+
- (void)willMoveToSuperview:(UIView *)newSuperview {
|
|
98
|
+
[super willMoveToSuperview:newSuperview];
|
|
104
99
|
|
|
105
|
-
|
|
106
|
-
|
|
100
|
+
// Clean up when removed from superview
|
|
101
|
+
if (!newSuperview) {
|
|
102
|
+
if (_blurAnimator) {
|
|
103
|
+
[_blurAnimator stopAnimation:YES];
|
|
104
|
+
_blurAnimator = nil;
|
|
105
|
+
}
|
|
107
106
|
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
self.effect = nil;
|
|
108
|
+
}
|
|
110
109
|
}
|
|
111
110
|
|
|
112
111
|
@end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Created by Jovanni Lo (@lodev09)
|
|
3
|
+
// Copyright (c) 2024-present. All rights reserved.
|
|
4
|
+
//
|
|
5
|
+
// This source code is licensed under the MIT license found in the
|
|
6
|
+
// LICENSE file in the root directory of this source tree.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <UIKit/UIKit.h>
|
|
10
|
+
|
|
11
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Native grabber (drag handle) view for the bottom sheet.
|
|
15
|
+
* Uses UIVibrancyEffect to adapt color based on the background.
|
|
16
|
+
*/
|
|
17
|
+
@interface TrueSheetGrabberView : UIView
|
|
18
|
+
|
|
19
|
+
/// Width of the grabber pill (default: 36)
|
|
20
|
+
@property (nonatomic, strong, nullable) NSNumber *grabberWidth;
|
|
21
|
+
|
|
22
|
+
/// Height of the grabber pill (default: 5)
|
|
23
|
+
@property (nonatomic, strong, nullable) NSNumber *grabberHeight;
|
|
24
|
+
|
|
25
|
+
/// Top margin from the sheet edge (default: 5)
|
|
26
|
+
@property (nonatomic, strong, nullable) NSNumber *topMargin;
|
|
27
|
+
|
|
28
|
+
/// Corner radius of the grabber pill (default: height / 2)
|
|
29
|
+
@property (nonatomic, strong, nullable) NSNumber *cornerRadius;
|
|
30
|
+
|
|
31
|
+
/// Custom color for the grabber (uses vibrancy effect when nil)
|
|
32
|
+
@property (nonatomic, strong, nullable) UIColor *color;
|
|
33
|
+
|
|
34
|
+
/// Adds the grabber view to a parent view with proper constraints
|
|
35
|
+
- (void)addToView:(UIView *)parentView;
|
|
36
|
+
|
|
37
|
+
/// Applies the current configuration to the grabber view
|
|
38
|
+
- (void)applyConfiguration;
|
|
39
|
+
|
|
40
|
+
@end
|
|
41
|
+
|
|
42
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Created by Jovanni Lo (@lodev09)
|
|
3
|
+
// Copyright (c) 2024-present. All rights reserved.
|
|
4
|
+
//
|
|
5
|
+
// This source code is licensed under the MIT license found in the
|
|
6
|
+
// LICENSE file in the root directory of this source tree.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import "TrueSheetGrabberView.h"
|
|
10
|
+
|
|
11
|
+
static const CGFloat kDefaultGrabberWidth = 36.0;
|
|
12
|
+
static const CGFloat kDefaultGrabberHeight = 5.0;
|
|
13
|
+
static const CGFloat kDefaultGrabberTopMargin = 5.0;
|
|
14
|
+
|
|
15
|
+
@implementation TrueSheetGrabberView {
|
|
16
|
+
UIVisualEffectView *_vibrancyView;
|
|
17
|
+
UIView *_fillView;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
#pragma mark - Initialization
|
|
21
|
+
|
|
22
|
+
- (instancetype)init {
|
|
23
|
+
if (self = [super init]) {
|
|
24
|
+
[self setupView];
|
|
25
|
+
}
|
|
26
|
+
return self;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
#pragma mark - Computed Properties
|
|
30
|
+
|
|
31
|
+
- (CGFloat)effectiveWidth {
|
|
32
|
+
return _grabberWidth ? [_grabberWidth floatValue] : kDefaultGrabberWidth;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
- (CGFloat)effectiveHeight {
|
|
36
|
+
return _grabberHeight ? [_grabberHeight floatValue] : kDefaultGrabberHeight;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
- (CGFloat)effectiveTopMargin {
|
|
40
|
+
return _topMargin ? [_topMargin floatValue] : kDefaultGrabberTopMargin;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
- (CGFloat)effectiveCornerRadius {
|
|
44
|
+
return _cornerRadius ? [_cornerRadius floatValue] : [self effectiveHeight] / 2.0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
#pragma mark - Setup
|
|
48
|
+
|
|
49
|
+
- (void)setupView {
|
|
50
|
+
self.userInteractionEnabled = NO;
|
|
51
|
+
self.clipsToBounds = YES;
|
|
52
|
+
|
|
53
|
+
// Create blur effect for vibrancy base
|
|
54
|
+
UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleSystemChromeMaterial];
|
|
55
|
+
UIVibrancyEffect *vibrancyEffect = [UIVibrancyEffect effectForBlurEffect:blurEffect style:UIVibrancyEffectStyleFill];
|
|
56
|
+
|
|
57
|
+
// Create the vibrancy view that fills this view
|
|
58
|
+
_vibrancyView = [[UIVisualEffectView alloc] initWithEffect:vibrancyEffect];
|
|
59
|
+
_vibrancyView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
|
60
|
+
[self addSubview:_vibrancyView];
|
|
61
|
+
|
|
62
|
+
// Add a fill view inside vibrancy contentView
|
|
63
|
+
_fillView = [[UIView alloc] init];
|
|
64
|
+
_fillView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
|
65
|
+
_fillView.backgroundColor = [UIColor.darkGrayColor colorWithAlphaComponent:0.7];
|
|
66
|
+
[_vibrancyView.contentView addSubview:_fillView];
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
#pragma mark - Public
|
|
70
|
+
|
|
71
|
+
- (void)addToView:(UIView *)parentView {
|
|
72
|
+
if (self.superview == parentView) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
[parentView addSubview:self];
|
|
77
|
+
[self applyConfiguration];
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
- (void)applyConfiguration {
|
|
81
|
+
CGFloat width = [self effectiveWidth];
|
|
82
|
+
CGFloat height = [self effectiveHeight];
|
|
83
|
+
CGFloat topMargin = [self effectiveTopMargin];
|
|
84
|
+
CGFloat parentWidth = self.superview ? self.superview.bounds.size.width : UIScreen.mainScreen.bounds.size.width;
|
|
85
|
+
|
|
86
|
+
// Position the grabber: centered horizontally, with top margin
|
|
87
|
+
self.frame = CGRectMake((parentWidth - width) / 2.0, topMargin, width, height);
|
|
88
|
+
self.layer.cornerRadius = [self effectiveCornerRadius];
|
|
89
|
+
|
|
90
|
+
// Update vibrancy and fill view frames
|
|
91
|
+
_vibrancyView.frame = self.bounds;
|
|
92
|
+
_fillView.frame = _vibrancyView.contentView.bounds;
|
|
93
|
+
|
|
94
|
+
// Apply custom color to vibrancy view
|
|
95
|
+
if (_color) {
|
|
96
|
+
_vibrancyView.backgroundColor = _color;
|
|
97
|
+
} else {
|
|
98
|
+
_vibrancyView.backgroundColor = nil;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
- (void)layoutSubviews {
|
|
103
|
+
[super layoutSubviews];
|
|
104
|
+
[self applyConfiguration];
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@end
|
package/lib/module/TrueSheet.js
CHANGED
|
@@ -266,12 +266,14 @@ export class TrueSheet extends PureComponent {
|
|
|
266
266
|
dismissible = true,
|
|
267
267
|
draggable = true,
|
|
268
268
|
grabber = true,
|
|
269
|
+
grabberOptions,
|
|
269
270
|
dimmed = true,
|
|
270
271
|
initialDetentIndex = -1,
|
|
271
272
|
initialDetentAnimated = true,
|
|
272
273
|
keyboardMode = 'resize',
|
|
273
274
|
dimmedDetentIndex,
|
|
274
275
|
blurTint,
|
|
276
|
+
blurOptions,
|
|
275
277
|
cornerRadius,
|
|
276
278
|
maxHeight,
|
|
277
279
|
edgeToEdgeFullScreen,
|
|
@@ -306,9 +308,14 @@ export class TrueSheet extends PureComponent {
|
|
|
306
308
|
style: styles.sheetView,
|
|
307
309
|
detents: resolvedDetents,
|
|
308
310
|
blurTint: blurTint,
|
|
311
|
+
blurOptions: blurOptions,
|
|
309
312
|
background: processColor(backgroundColor) ?? 0,
|
|
310
313
|
cornerRadius: cornerRadius,
|
|
311
314
|
grabber: grabber,
|
|
315
|
+
grabberOptions: {
|
|
316
|
+
...grabberOptions,
|
|
317
|
+
color: processColor(grabberOptions?.color) ?? 0
|
|
318
|
+
},
|
|
312
319
|
dimmed: dimmed,
|
|
313
320
|
dimmedDetentIndex: dimmedDetentIndex,
|
|
314
321
|
keyboardMode: keyboardMode,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PureComponent","createRef","isValidElement","createElement","TrueSheetViewNativeComponent","TrueSheetContainerViewNativeComponent","TrueSheetContentViewNativeComponent","TrueSheetHeaderViewNativeComponent","TrueSheetFooterViewNativeComponent","TrueSheetModule","Platform","processColor","StyleSheet","findNodeHandle","View","jsx","_jsx","jsxs","_jsxs","LINKING_ERROR","select","ios","default","ANDROID_HITBOX_HEIGHT","Error","TrueSheet","displayName","instances","presentationResolver","constructor","props","nativeRef","validateDetents","shouldRenderImmediately","initialDetentIndex","undefined","state","shouldRenderNativeView","onMount","bind","onWillDismiss","onDidDismiss","onWillPresent","onDidPresent","onDetentChange","onDragBegin","onDragChange","onDragEnd","onPositionChange","onWillFocus","onDidFocus","onWillBlur","onDidBlur","detents","length","console","warn","forEach","detent","index","detentsLength","Math","min","getInstance","name","instance","handle","nodeHandle","current","present","dismiss","resize","registerInstance","unregisterInstance","event","setState","Promise","resolve","presentByRef","dismissByRef","componentDidMount","componentDidUpdate","prevProps","componentWillUnmount","render","backgroundColor","dismissible","draggable","grabber","dimmed","initialDetentAnimated","keyboardMode","dimmedDetentIndex","blurTint","cornerRadius","maxHeight","edgeToEdgeFullScreen","scrollable","pageSizing","children","style","header","footer","rest","resolvedDetents","slice","map","containerStyle","android","styles","scrollableAndroidContainer","contentStyle","scrollableAndroidContent","ref","sheetView","background","OS","collapsable","grabberHitbox","create","zIndex","position","top","left","right","bottom","flexGrow","flexBasis","height"],"sourceRoot":"../../src","sources":["TrueSheet.tsx"],"mappings":";;AAAA,SACEA,aAAa,EAEbC,SAAS,EAGTC,cAAc,EACdC,aAAa,QACR,OAAO;AAmBd,OAAOC,4BAA4B,MAAM,uCAAuC;AAChF,OAAOC,qCAAqC,MAAM,gDAAgD;AAClG,OAAOC,mCAAmC,MAAM,8CAA8C;AAC9F,OAAOC,kCAAkC,MAAM,6CAA6C;AAC5F,OAAOC,kCAAkC,MAAM,6CAA6C;AAE5F,OAAOC,eAAe,MAAM,kCAA+B;AAE3D,SAASC,QAAQ,EAAEC,YAAY,EAAEC,UAAU,EAAEC,cAAc,EAAEC,IAAI,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAExF,MAAMC,aAAa,GACjB,2FAA2F,GAC3FT,QAAQ,CAACU,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B,GAC/B,iDAAiD;;AAEnD;AACA,MAAMC,qBAAqB,GAAG,EAAE;AAEhC,IAAI,CAACd,eAAe,EAAE;EACpB,MAAM,IAAIe,KAAK,CAACL,aAAa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Q,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRI,MAAM,EAAEzG;EACV;AACF,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["PureComponent","createRef","isValidElement","createElement","TrueSheetViewNativeComponent","TrueSheetContainerViewNativeComponent","TrueSheetContentViewNativeComponent","TrueSheetHeaderViewNativeComponent","TrueSheetFooterViewNativeComponent","TrueSheetModule","Platform","processColor","StyleSheet","findNodeHandle","View","jsx","_jsx","jsxs","_jsxs","LINKING_ERROR","select","ios","default","ANDROID_HITBOX_HEIGHT","Error","TrueSheet","displayName","instances","presentationResolver","constructor","props","nativeRef","validateDetents","shouldRenderImmediately","initialDetentIndex","undefined","state","shouldRenderNativeView","onMount","bind","onWillDismiss","onDidDismiss","onWillPresent","onDidPresent","onDetentChange","onDragBegin","onDragChange","onDragEnd","onPositionChange","onWillFocus","onDidFocus","onWillBlur","onDidBlur","detents","length","console","warn","forEach","detent","index","detentsLength","Math","min","getInstance","name","instance","handle","nodeHandle","current","present","dismiss","resize","registerInstance","unregisterInstance","event","setState","Promise","resolve","presentByRef","dismissByRef","componentDidMount","componentDidUpdate","prevProps","componentWillUnmount","render","backgroundColor","dismissible","draggable","grabber","grabberOptions","dimmed","initialDetentAnimated","keyboardMode","dimmedDetentIndex","blurTint","blurOptions","cornerRadius","maxHeight","edgeToEdgeFullScreen","scrollable","pageSizing","children","style","header","footer","rest","resolvedDetents","slice","map","containerStyle","android","styles","scrollableAndroidContainer","contentStyle","scrollableAndroidContent","ref","sheetView","background","color","OS","collapsable","grabberHitbox","create","zIndex","position","top","left","right","bottom","flexGrow","flexBasis","height"],"sourceRoot":"../../src","sources":["TrueSheet.tsx"],"mappings":";;AAAA,SACEA,aAAa,EAEbC,SAAS,EAGTC,cAAc,EACdC,aAAa,QACR,OAAO;AAmBd,OAAOC,4BAA4B,MAAM,uCAAuC;AAChF,OAAOC,qCAAqC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EAAE,KAAM;UAAClB,KAAK,EAAES,MAAM,CAACU;QAAc,CAAE,CACzD;MAAA,CACoC;IACxC,CAC2B,CAAC;EAEnC;AACF;AAEA,MAAMV,MAAM,GAAGnG,UAAU,CAAC8G,MAAM,CAAC;EAC/BN,SAAS,EAAE;IACTO,MAAM,EAAE,CAAC,IAAI;IACbC,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IAER;IACAC,MAAM,EAAEtH,QAAQ,CAACU,MAAM,CAAC;MAAE0F,OAAO,EAAE;IAAE,CAAC;EACxC,CAAC;EACDE,0BAA0B,EAAE;IAC1BY,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE;EACV,CAAC;EACDd,wBAAwB,EAAE;IACxBe,QAAQ,EAAE,CAAC;IACXC,SAAS,EAAE;EACb,CAAC;EACD1B,MAAM,EAAE;IACNoB,QAAQ,EAAE,UAAU;IACpBE,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE;EACT,CAAC;EACDN,aAAa,EAAE;IACbG,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRI,MAAM,EAAE5G;EACV;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -7,6 +7,19 @@ import type {
|
|
|
7
7
|
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
8
8
|
import { codegenNativeComponent } from 'react-native';
|
|
9
9
|
|
|
10
|
+
type GrabberOptionsType = Readonly<{
|
|
11
|
+
width?: Double;
|
|
12
|
+
height?: Double;
|
|
13
|
+
topMargin?: Double;
|
|
14
|
+
cornerRadius?: WithDefault<Double, -1>;
|
|
15
|
+
color?: Int32;
|
|
16
|
+
}>;
|
|
17
|
+
|
|
18
|
+
type BlurOptionsType = Readonly<{
|
|
19
|
+
intensity?: WithDefault<Double, -1>;
|
|
20
|
+
interaction?: WithDefault<boolean, true>;
|
|
21
|
+
}>;
|
|
22
|
+
|
|
10
23
|
export interface DetentInfoEventPayload {
|
|
11
24
|
index: Int32;
|
|
12
25
|
position: Double;
|
|
@@ -35,12 +48,12 @@ export interface NativeProps extends ViewProps {
|
|
|
35
48
|
blurTint?: WithDefault<string, ''>;
|
|
36
49
|
keyboardMode?: WithDefault<'resize' | 'pan', 'resize'>;
|
|
37
50
|
|
|
38
|
-
// Blur
|
|
39
|
-
|
|
40
|
-
blurInteraction?: WithDefault<boolean, true>;
|
|
51
|
+
// Blur options
|
|
52
|
+
blurOptions?: BlurOptionsType;
|
|
41
53
|
|
|
42
54
|
// Boolean properties - match defaults from TrueSheet.types.ts
|
|
43
55
|
grabber?: WithDefault<boolean, true>;
|
|
56
|
+
grabberOptions?: GrabberOptionsType;
|
|
44
57
|
dismissible?: WithDefault<boolean, true>;
|
|
45
58
|
draggable?: WithDefault<boolean, true>;
|
|
46
59
|
dimmed?: WithDefault<boolean, true>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrueSheet.d.ts","sourceRoot":"","sources":["../../../src/TrueSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAGb,KAAK,SAAS,EAIf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EACV,cAAc,EAef,MAAM,mBAAmB,CAAC;AA2B3B,UAAU,cAAc;IACtB,sBAAsB,EAAE,OAAO,CAAC;CACjC;AAED,qBAAa,SAAU,SAAQ,aAAa,CAAC,cAAc,EAAE,cAAc,CAAC;IAC1E,WAAW,SAAe;IAE1B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA8B;IAExD;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAqC;IAEtE;;OAEG;IACH,OAAO,CAAC,oBAAoB,CAA6B;gBAE7C,KAAK,EAAE,cAAc;I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AIlB,OAAO,CAAC,SAAS;IAIjB;;;OAGG;IACU,OAAO,CAAC,KAAK,GAAE,MAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAmBtD;;;OAGG;IACU,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjD;;OAEG;IACU,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrC,iBAAiB,IAAI,IAAI;IAIzB,kBAAkB,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI;IASnD,oBAAoB,IAAI,IAAI;IAO5B,MAAM,IAAI,SAAS;CAkHpB"}
|
|
@@ -35,6 +35,61 @@ export type DidFocusEvent = NativeSyntheticEvent<null>;
|
|
|
35
35
|
export type DidBlurEvent = NativeSyntheticEvent<null>;
|
|
36
36
|
export type WillFocusEvent = NativeSyntheticEvent<null>;
|
|
37
37
|
export type WillBlurEvent = NativeSyntheticEvent<null>;
|
|
38
|
+
/**
|
|
39
|
+
* Options for customizing the grabber (drag handle) appearance.
|
|
40
|
+
*/
|
|
41
|
+
export interface GrabberOptions {
|
|
42
|
+
/**
|
|
43
|
+
* The width of the grabber pill.
|
|
44
|
+
*
|
|
45
|
+
* @default iOS: 36, Android: 32
|
|
46
|
+
*/
|
|
47
|
+
width?: number;
|
|
48
|
+
/**
|
|
49
|
+
* The height of the grabber pill.
|
|
50
|
+
*
|
|
51
|
+
* @default iOS: 5, Android: 4
|
|
52
|
+
*/
|
|
53
|
+
height?: number;
|
|
54
|
+
/**
|
|
55
|
+
* The top margin of the grabber from the sheet edge.
|
|
56
|
+
*
|
|
57
|
+
* @default iOS: 5, Android: 16
|
|
58
|
+
*/
|
|
59
|
+
topMargin?: number;
|
|
60
|
+
/**
|
|
61
|
+
* The corner radius of the grabber pill.
|
|
62
|
+
*
|
|
63
|
+
* @default height / 2
|
|
64
|
+
*/
|
|
65
|
+
cornerRadius?: number;
|
|
66
|
+
/**
|
|
67
|
+
* The color of the grabber.
|
|
68
|
+
* Uses native vibrancy/material styling when not provided.
|
|
69
|
+
*/
|
|
70
|
+
color?: ColorValue;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Options for customizing the blur effect.
|
|
74
|
+
* Only applies when `blurTint` is set.
|
|
75
|
+
*
|
|
76
|
+
* @platform ios
|
|
77
|
+
*/
|
|
78
|
+
export interface BlurOptions {
|
|
79
|
+
/**
|
|
80
|
+
* The intensity of the blur effect (0-100).
|
|
81
|
+
* Uses system default if not provided.
|
|
82
|
+
*/
|
|
83
|
+
intensity?: number;
|
|
84
|
+
/**
|
|
85
|
+
* Enables or disables user interaction on the blur view.
|
|
86
|
+
* Disabling this can help with visual artifacts (flash) on iOS 18+
|
|
87
|
+
* when touching the sheet content with blur enabled.
|
|
88
|
+
*
|
|
89
|
+
* @default true
|
|
90
|
+
*/
|
|
91
|
+
interaction?: boolean;
|
|
92
|
+
}
|
|
38
93
|
/**
|
|
39
94
|
* Blur style mapped to native values in IOS.
|
|
40
95
|
*
|
|
@@ -155,6 +210,11 @@ export interface TrueSheetProps extends ViewProps {
|
|
|
155
210
|
* @default true
|
|
156
211
|
*/
|
|
157
212
|
grabber?: boolean;
|
|
213
|
+
/**
|
|
214
|
+
* Options for customizing the grabber appearance.
|
|
215
|
+
* Only applies when `grabber` is `true`.
|
|
216
|
+
*/
|
|
217
|
+
grabberOptions?: GrabberOptions;
|
|
158
218
|
/**
|
|
159
219
|
* Controls the sheet presentation style on iPad.
|
|
160
220
|
* When enabled (true), uses a large page sheet for better readability.
|
|
@@ -172,22 +232,12 @@ export interface TrueSheetProps extends ViewProps {
|
|
|
172
232
|
*/
|
|
173
233
|
blurTint?: BlurTint;
|
|
174
234
|
/**
|
|
175
|
-
*
|
|
235
|
+
* Options for customizing the blur effect.
|
|
176
236
|
* Only applies when `blurTint` is set.
|
|
177
|
-
* Uses system default if not provided.
|
|
178
|
-
*
|
|
179
|
-
* @platform ios
|
|
180
|
-
*/
|
|
181
|
-
blurIntensity?: number;
|
|
182
|
-
/**
|
|
183
|
-
* Enables or disables user interaction on the blur view.
|
|
184
|
-
* Disabling this can help with visual artifacts (flash) on iOS 18+
|
|
185
|
-
* when touching the sheet content with blur enabled.
|
|
186
|
-
* Uses system default (true) if not provided.
|
|
187
237
|
*
|
|
188
238
|
* @platform ios
|
|
189
239
|
*/
|
|
190
|
-
|
|
240
|
+
blurOptions?: BlurOptions;
|
|
191
241
|
/**
|
|
192
242
|
* Overrides `large` or `100%` height.
|
|
193
243
|
* Also sets the maximum height for 'auto' detents.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrueSheet.types.d.ts","sourceRoot":"","sources":["../../../src/TrueSheet.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEhF,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,0BAA2B,SAAQ,sBAAsB;IACxE;;;OAGG;IACH,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,MAAM,UAAU,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC;AACpD,MAAM,MAAM,iBAAiB,GAAG,oBAAoB,CAAC,sBAAsB,CAAC,CAAC;AAC7E,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,CAAC,sBAAsB,CAAC,CAAC;AAC5E,MAAM,MAAM,eAAe,GAAG,oBAAoB,CAAC,sBAAsB,CAAC,CAAC;AAC3E,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC;AAC1D,MAAM,MAAM,eAAe,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC;AACzD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IAAI,CAAC;IAE5C;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;CAC3C"}
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import type { ViewProps } from 'react-native';
|
|
2
2
|
import type { DirectEventHandler, Double, Int32, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
+
type GrabberOptionsType = Readonly<{
|
|
4
|
+
width?: Double;
|
|
5
|
+
height?: Double;
|
|
6
|
+
topMargin?: Double;
|
|
7
|
+
cornerRadius?: WithDefault<Double, -1>;
|
|
8
|
+
color?: Int32;
|
|
9
|
+
}>;
|
|
10
|
+
type BlurOptionsType = Readonly<{
|
|
11
|
+
intensity?: WithDefault<Double, -1>;
|
|
12
|
+
interaction?: WithDefault<boolean, true>;
|
|
13
|
+
}>;
|
|
3
14
|
export interface DetentInfoEventPayload {
|
|
4
15
|
index: Int32;
|
|
5
16
|
position: Double;
|
|
@@ -20,9 +31,9 @@ export interface NativeProps extends ViewProps {
|
|
|
20
31
|
dimmedDetentIndex?: WithDefault<Int32, 0>;
|
|
21
32
|
blurTint?: WithDefault<string, ''>;
|
|
22
33
|
keyboardMode?: WithDefault<'resize' | 'pan', 'resize'>;
|
|
23
|
-
|
|
24
|
-
blurInteraction?: WithDefault<boolean, true>;
|
|
34
|
+
blurOptions?: BlurOptionsType;
|
|
25
35
|
grabber?: WithDefault<boolean, true>;
|
|
36
|
+
grabberOptions?: GrabberOptionsType;
|
|
26
37
|
dismissible?: WithDefault<boolean, true>;
|
|
27
38
|
draggable?: WithDefault<boolean, true>;
|
|
28
39
|
dimmed?: WithDefault<boolean, true>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrueSheetViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/TrueSheetViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAA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gBAAgB,CAAC,EAAE,kBAAkB,CAAC,0BAA0B,CAAC,CAAC;IAClE,WAAW,CAAC,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACvC,UAAU,CAAC,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACtC,UAAU,CAAC,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACtC,SAAS,CAAC,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;CACtC;;AAED,wBAEG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lodev09/react-native-true-sheet",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "The true native bottom sheet experience for your React Native Apps.",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"main": "./lib/module/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"tidy": "yarn typecheck && yarn lint && yarn format && scripts/objclint.sh && scripts/ktlint.sh",
|
|
42
42
|
"clean": "scripts/clean.sh",
|
|
43
43
|
"prepare": "bob build",
|
|
44
|
-
"release": "
|
|
44
|
+
"release": "release-it --only-version",
|
|
45
45
|
"release:beta": "yarn release --preRelease=beta"
|
|
46
46
|
},
|
|
47
47
|
"keywords": [
|
|
@@ -152,6 +152,12 @@
|
|
|
152
152
|
"npm": {
|
|
153
153
|
"publish": true
|
|
154
154
|
},
|
|
155
|
+
"hooks": {
|
|
156
|
+
"before:init": [
|
|
157
|
+
"yarn tidy",
|
|
158
|
+
"yarn test"
|
|
159
|
+
]
|
|
160
|
+
},
|
|
155
161
|
"github": {
|
|
156
162
|
"release": true,
|
|
157
163
|
"comments": {
|
package/src/TrueSheet.tsx
CHANGED
|
@@ -342,12 +342,14 @@ export class TrueSheet extends PureComponent<TrueSheetProps, TrueSheetState> {
|
|
|
342
342
|
dismissible = true,
|
|
343
343
|
draggable = true,
|
|
344
344
|
grabber = true,
|
|
345
|
+
grabberOptions,
|
|
345
346
|
dimmed = true,
|
|
346
347
|
initialDetentIndex = -1,
|
|
347
348
|
initialDetentAnimated = true,
|
|
348
349
|
keyboardMode = 'resize',
|
|
349
350
|
dimmedDetentIndex,
|
|
350
351
|
blurTint,
|
|
352
|
+
blurOptions,
|
|
351
353
|
cornerRadius,
|
|
352
354
|
maxHeight,
|
|
353
355
|
edgeToEdgeFullScreen,
|
|
@@ -390,9 +392,14 @@ export class TrueSheet extends PureComponent<TrueSheetProps, TrueSheetState> {
|
|
|
390
392
|
style={styles.sheetView}
|
|
391
393
|
detents={resolvedDetents}
|
|
392
394
|
blurTint={blurTint}
|
|
395
|
+
blurOptions={blurOptions}
|
|
393
396
|
background={(processColor(backgroundColor) as number) ?? 0}
|
|
394
397
|
cornerRadius={cornerRadius}
|
|
395
398
|
grabber={grabber}
|
|
399
|
+
grabberOptions={{
|
|
400
|
+
...grabberOptions,
|
|
401
|
+
color: (processColor(grabberOptions?.color) as number) ?? 0,
|
|
402
|
+
}}
|
|
396
403
|
dimmed={dimmed}
|
|
397
404
|
dimmedDetentIndex={dimmedDetentIndex}
|
|
398
405
|
keyboardMode={keyboardMode}
|
package/src/TrueSheet.types.ts
CHANGED
|
@@ -39,6 +39,63 @@ export type DidBlurEvent = NativeSyntheticEvent<null>;
|
|
|
39
39
|
export type WillFocusEvent = NativeSyntheticEvent<null>;
|
|
40
40
|
export type WillBlurEvent = NativeSyntheticEvent<null>;
|
|
41
41
|
|
|
42
|
+
/**
|
|
43
|
+
* Options for customizing the grabber (drag handle) appearance.
|
|
44
|
+
*/
|
|
45
|
+
export interface GrabberOptions {
|
|
46
|
+
/**
|
|
47
|
+
* The width of the grabber pill.
|
|
48
|
+
*
|
|
49
|
+
* @default iOS: 36, Android: 32
|
|
50
|
+
*/
|
|
51
|
+
width?: number;
|
|
52
|
+
/**
|
|
53
|
+
* The height of the grabber pill.
|
|
54
|
+
*
|
|
55
|
+
* @default iOS: 5, Android: 4
|
|
56
|
+
*/
|
|
57
|
+
height?: number;
|
|
58
|
+
/**
|
|
59
|
+
* The top margin of the grabber from the sheet edge.
|
|
60
|
+
*
|
|
61
|
+
* @default iOS: 5, Android: 16
|
|
62
|
+
*/
|
|
63
|
+
topMargin?: number;
|
|
64
|
+
/**
|
|
65
|
+
* The corner radius of the grabber pill.
|
|
66
|
+
*
|
|
67
|
+
* @default height / 2
|
|
68
|
+
*/
|
|
69
|
+
cornerRadius?: number;
|
|
70
|
+
/**
|
|
71
|
+
* The color of the grabber.
|
|
72
|
+
* Uses native vibrancy/material styling when not provided.
|
|
73
|
+
*/
|
|
74
|
+
color?: ColorValue;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Options for customizing the blur effect.
|
|
79
|
+
* Only applies when `blurTint` is set.
|
|
80
|
+
*
|
|
81
|
+
* @platform ios
|
|
82
|
+
*/
|
|
83
|
+
export interface BlurOptions {
|
|
84
|
+
/**
|
|
85
|
+
* The intensity of the blur effect (0-100).
|
|
86
|
+
* Uses system default if not provided.
|
|
87
|
+
*/
|
|
88
|
+
intensity?: number;
|
|
89
|
+
/**
|
|
90
|
+
* Enables or disables user interaction on the blur view.
|
|
91
|
+
* Disabling this can help with visual artifacts (flash) on iOS 18+
|
|
92
|
+
* when touching the sheet content with blur enabled.
|
|
93
|
+
*
|
|
94
|
+
* @default true
|
|
95
|
+
*/
|
|
96
|
+
interaction?: boolean;
|
|
97
|
+
}
|
|
98
|
+
|
|
42
99
|
/**
|
|
43
100
|
* Blur style mapped to native values in IOS.
|
|
44
101
|
*
|
|
@@ -193,6 +250,12 @@ export interface TrueSheetProps extends ViewProps {
|
|
|
193
250
|
*/
|
|
194
251
|
grabber?: boolean;
|
|
195
252
|
|
|
253
|
+
/**
|
|
254
|
+
* Options for customizing the grabber appearance.
|
|
255
|
+
* Only applies when `grabber` is `true`.
|
|
256
|
+
*/
|
|
257
|
+
grabberOptions?: GrabberOptions;
|
|
258
|
+
|
|
196
259
|
/**
|
|
197
260
|
* Controls the sheet presentation style on iPad.
|
|
198
261
|
* When enabled (true), uses a large page sheet for better readability.
|
|
@@ -212,23 +275,12 @@ export interface TrueSheetProps extends ViewProps {
|
|
|
212
275
|
blurTint?: BlurTint;
|
|
213
276
|
|
|
214
277
|
/**
|
|
215
|
-
*
|
|
278
|
+
* Options for customizing the blur effect.
|
|
216
279
|
* Only applies when `blurTint` is set.
|
|
217
|
-
* Uses system default if not provided.
|
|
218
|
-
*
|
|
219
|
-
* @platform ios
|
|
220
|
-
*/
|
|
221
|
-
blurIntensity?: number;
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
* Enables or disables user interaction on the blur view.
|
|
225
|
-
* Disabling this can help with visual artifacts (flash) on iOS 18+
|
|
226
|
-
* when touching the sheet content with blur enabled.
|
|
227
|
-
* Uses system default (true) if not provided.
|
|
228
280
|
*
|
|
229
281
|
* @platform ios
|
|
230
282
|
*/
|
|
231
|
-
|
|
283
|
+
blurOptions?: BlurOptions;
|
|
232
284
|
|
|
233
285
|
/**
|
|
234
286
|
* Overrides `large` or `100%` height.
|
|
@@ -7,6 +7,19 @@ import type {
|
|
|
7
7
|
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
8
8
|
import { codegenNativeComponent } from 'react-native';
|
|
9
9
|
|
|
10
|
+
type GrabberOptionsType = Readonly<{
|
|
11
|
+
width?: Double;
|
|
12
|
+
height?: Double;
|
|
13
|
+
topMargin?: Double;
|
|
14
|
+
cornerRadius?: WithDefault<Double, -1>;
|
|
15
|
+
color?: Int32;
|
|
16
|
+
}>;
|
|
17
|
+
|
|
18
|
+
type BlurOptionsType = Readonly<{
|
|
19
|
+
intensity?: WithDefault<Double, -1>;
|
|
20
|
+
interaction?: WithDefault<boolean, true>;
|
|
21
|
+
}>;
|
|
22
|
+
|
|
10
23
|
export interface DetentInfoEventPayload {
|
|
11
24
|
index: Int32;
|
|
12
25
|
position: Double;
|
|
@@ -35,12 +48,12 @@ export interface NativeProps extends ViewProps {
|
|
|
35
48
|
blurTint?: WithDefault<string, ''>;
|
|
36
49
|
keyboardMode?: WithDefault<'resize' | 'pan', 'resize'>;
|
|
37
50
|
|
|
38
|
-
// Blur
|
|
39
|
-
|
|
40
|
-
blurInteraction?: WithDefault<boolean, true>;
|
|
51
|
+
// Blur options
|
|
52
|
+
blurOptions?: BlurOptionsType;
|
|
41
53
|
|
|
42
54
|
// Boolean properties - match defaults from TrueSheet.types.ts
|
|
43
55
|
grabber?: WithDefault<boolean, true>;
|
|
56
|
+
grabberOptions?: GrabberOptionsType;
|
|
44
57
|
dismissible?: WithDefault<boolean, true>;
|
|
45
58
|
draggable?: WithDefault<boolean, true>;
|
|
46
59
|
dimmed?: WithDefault<boolean, true>;
|