@tamagui/sheet 1.134.5 → 1.135.0
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/dist/cjs/SheetImplementationCustom.cjs +42 -39
- package/dist/cjs/SheetImplementationCustom.js +2 -2
- package/dist/cjs/SheetImplementationCustom.js.map +1 -1
- package/dist/cjs/SheetImplementationCustom.native.js +54 -51
- package/dist/cjs/SheetImplementationCustom.native.js.map +1 -1
- package/dist/esm/SheetImplementationCustom.js +3 -2
- package/dist/esm/SheetImplementationCustom.js.map +1 -1
- package/dist/esm/SheetImplementationCustom.mjs +43 -40
- package/dist/esm/SheetImplementationCustom.mjs.map +1 -1
- package/dist/esm/SheetImplementationCustom.native.js +47 -44
- package/dist/esm/SheetImplementationCustom.native.js.map +1 -1
- package/dist/jsx/SheetImplementationCustom.js +3 -2
- package/dist/jsx/SheetImplementationCustom.js.map +1 -1
- package/dist/jsx/SheetImplementationCustom.mjs +43 -40
- package/dist/jsx/SheetImplementationCustom.mjs.map +1 -1
- package/dist/jsx/SheetImplementationCustom.native.js +55 -52
- package/dist/jsx/SheetImplementationCustom.native.js.map +1 -1
- package/package.json +19 -19
- package/src/SheetImplementationCustom.tsx +52 -49
- package/types/SheetImplementationCustom.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/sheet",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.135.0",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"*.css"
|
|
6
6
|
],
|
|
@@ -37,30 +37,30 @@
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@tamagui/adapt": "1.
|
|
41
|
-
"@tamagui/animate-presence": "1.
|
|
42
|
-
"@tamagui/animations-react-native": "1.
|
|
43
|
-
"@tamagui/compose-refs": "1.
|
|
44
|
-
"@tamagui/constants": "1.
|
|
45
|
-
"@tamagui/core": "1.
|
|
46
|
-
"@tamagui/create-context": "1.
|
|
47
|
-
"@tamagui/helpers": "1.
|
|
48
|
-
"@tamagui/portal": "1.
|
|
49
|
-
"@tamagui/remove-scroll": "1.
|
|
50
|
-
"@tamagui/scroll-view": "1.
|
|
51
|
-
"@tamagui/stacks": "1.
|
|
52
|
-
"@tamagui/use-constant": "1.
|
|
53
|
-
"@tamagui/use-controllable-state": "1.
|
|
54
|
-
"@tamagui/use-did-finish-ssr": "1.
|
|
55
|
-
"@tamagui/use-keyboard-visible": "1.
|
|
56
|
-
"@tamagui/z-index-stack": "1.
|
|
40
|
+
"@tamagui/adapt": "1.135.0",
|
|
41
|
+
"@tamagui/animate-presence": "1.135.0",
|
|
42
|
+
"@tamagui/animations-react-native": "1.135.0",
|
|
43
|
+
"@tamagui/compose-refs": "1.135.0",
|
|
44
|
+
"@tamagui/constants": "1.135.0",
|
|
45
|
+
"@tamagui/core": "1.135.0",
|
|
46
|
+
"@tamagui/create-context": "1.135.0",
|
|
47
|
+
"@tamagui/helpers": "1.135.0",
|
|
48
|
+
"@tamagui/portal": "1.135.0",
|
|
49
|
+
"@tamagui/remove-scroll": "1.135.0",
|
|
50
|
+
"@tamagui/scroll-view": "1.135.0",
|
|
51
|
+
"@tamagui/stacks": "1.135.0",
|
|
52
|
+
"@tamagui/use-constant": "1.135.0",
|
|
53
|
+
"@tamagui/use-controllable-state": "1.135.0",
|
|
54
|
+
"@tamagui/use-did-finish-ssr": "1.135.0",
|
|
55
|
+
"@tamagui/use-keyboard-visible": "1.135.0",
|
|
56
|
+
"@tamagui/z-index-stack": "1.135.0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"react": "*",
|
|
60
60
|
"react-native": "*"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@tamagui/build": "1.
|
|
63
|
+
"@tamagui/build": "1.135.0",
|
|
64
64
|
"react": "*",
|
|
65
65
|
"react-native": "^0.79.2"
|
|
66
66
|
},
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
useIsomorphicLayoutEffect,
|
|
9
9
|
} from '@tamagui/constants'
|
|
10
10
|
import {
|
|
11
|
+
LayoutMeasurementController,
|
|
11
12
|
Stack,
|
|
12
13
|
Theme,
|
|
13
14
|
useConfiguration,
|
|
@@ -501,56 +502,58 @@ export const SheetImplementationCustom = React.forwardRef<View, SheetProps>(
|
|
|
501
502
|
// })
|
|
502
503
|
|
|
503
504
|
let contents = (
|
|
504
|
-
<
|
|
505
|
-
<
|
|
506
|
-
<
|
|
507
|
-
{
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
}}
|
|
521
|
-
onLayout={handleMaxContentViewLayout}
|
|
522
|
-
/>
|
|
523
|
-
)}
|
|
524
|
-
|
|
525
|
-
<AnimatedView
|
|
526
|
-
ref={ref}
|
|
527
|
-
{...panResponder?.panHandlers}
|
|
528
|
-
onLayout={handleAnimationViewLayout}
|
|
529
|
-
// @ts-ignore for CSS driver this is necessary to attach the transition
|
|
530
|
-
// also motion driver at least though i suspect all drivers?
|
|
531
|
-
animation={isDragging || disableAnimation ? null : animation}
|
|
532
|
-
// @ts-ignore
|
|
533
|
-
disableClassName
|
|
534
|
-
style={[
|
|
535
|
-
{
|
|
536
|
-
position: 'absolute',
|
|
537
|
-
zIndex,
|
|
538
|
-
width: '100%',
|
|
539
|
-
height: forcedContentHeight,
|
|
540
|
-
minHeight: forcedContentHeight,
|
|
541
|
-
opacity: !shouldHideParentSheet ? opacity : 0,
|
|
542
|
-
...((shouldHideParentSheet || !open) && {
|
|
505
|
+
<LayoutMeasurementController disable={!open}>
|
|
506
|
+
<ParentSheetContext.Provider value={nextParentContext}>
|
|
507
|
+
<SheetProvider {...providerProps} setHasScrollView={setHasScrollView}>
|
|
508
|
+
<AnimatePresence custom={{ open }}>
|
|
509
|
+
{shouldHideParentSheet || !open ? null : overlayComponent}
|
|
510
|
+
</AnimatePresence>
|
|
511
|
+
|
|
512
|
+
{snapPointsMode !== 'percent' && (
|
|
513
|
+
<View
|
|
514
|
+
style={{
|
|
515
|
+
opacity: 0,
|
|
516
|
+
position: 'absolute',
|
|
517
|
+
top: 0,
|
|
518
|
+
left: 0,
|
|
519
|
+
right: 0,
|
|
520
|
+
bottom: 0,
|
|
543
521
|
pointerEvents: 'none',
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
522
|
+
}}
|
|
523
|
+
onLayout={handleMaxContentViewLayout}
|
|
524
|
+
/>
|
|
525
|
+
)}
|
|
526
|
+
|
|
527
|
+
<AnimatedView
|
|
528
|
+
ref={ref}
|
|
529
|
+
{...panResponder?.panHandlers}
|
|
530
|
+
onLayout={handleAnimationViewLayout}
|
|
531
|
+
// @ts-ignore for CSS driver this is necessary to attach the transition
|
|
532
|
+
// also motion driver at least though i suspect all drivers?
|
|
533
|
+
animation={isDragging || disableAnimation ? null : animation}
|
|
534
|
+
// @ts-ignore
|
|
535
|
+
disableClassName
|
|
536
|
+
style={[
|
|
537
|
+
{
|
|
538
|
+
position: 'absolute',
|
|
539
|
+
zIndex,
|
|
540
|
+
width: '100%',
|
|
541
|
+
height: forcedContentHeight,
|
|
542
|
+
minHeight: forcedContentHeight,
|
|
543
|
+
opacity: !shouldHideParentSheet ? opacity : 0,
|
|
544
|
+
...((shouldHideParentSheet || !open) && {
|
|
545
|
+
pointerEvents: 'none',
|
|
546
|
+
}),
|
|
547
|
+
},
|
|
548
|
+
animatedStyle,
|
|
549
|
+
]}
|
|
550
|
+
>
|
|
551
|
+
{/* <AdaptProvider>{props.children}</AdaptProvider> */}
|
|
552
|
+
{props.children}
|
|
553
|
+
</AnimatedView>
|
|
554
|
+
</SheetProvider>
|
|
555
|
+
</ParentSheetContext.Provider>
|
|
556
|
+
</LayoutMeasurementController>
|
|
554
557
|
)
|
|
555
558
|
|
|
556
559
|
if (process.env.TAMAGUI_TARGET === 'native' && !USE_NATIVE_PORTAL) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SheetImplementationCustom.d.ts","sourceRoot":"","sources":["../src/SheetImplementationCustom.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SheetImplementationCustom.d.ts","sourceRoot":"","sources":["../src/SheetImplementationCustom.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAOvC,OAAO,EAAsC,IAAI,EAAE,MAAM,cAAc,CAAA;AAIvE,OAAO,KAAK,EAAc,cAAc,EAAE,MAAM,SAAS,CAAA;AAWzD,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;8BA8iBrC,CAAA"}
|