@tamagui/portal 1.0.1-beta.42 → 1.0.1-beta.45
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/Portal.js +3 -1
- package/dist/cjs/Portal.js.map +2 -2
- package/dist/esm/Portal.js +3 -1
- package/dist/esm/Portal.js.map +2 -2
- package/dist/jsx/Portal.js +1 -1
- package/package.json +3 -3
- package/types/Portal.d.ts +2 -1
- package/types/Portal.d.ts.map +1 -1
package/dist/cjs/Portal.js
CHANGED
|
@@ -51,7 +51,9 @@ const Portal = /* @__PURE__ */ __name((props) => {
|
|
|
51
51
|
}, props));
|
|
52
52
|
if (!import_core.isWeb) {
|
|
53
53
|
return /* @__PURE__ */ React.createElement(import_react_native.Modal, {
|
|
54
|
-
visible: true
|
|
54
|
+
visible: true,
|
|
55
|
+
transparent: true,
|
|
56
|
+
pointerEvents: "none"
|
|
55
57
|
}, contents);
|
|
56
58
|
}
|
|
57
59
|
const [hostElement, setHostElement] = React.useState(null);
|
package/dist/cjs/Portal.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Portal.tsx"],
|
|
4
|
-
"sourcesContent": ["import '@tamagui/polyfill-dev'\n\nimport { isWeb, useIsomorphicLayoutEffect } from '@tamagui/core'\nimport { YStack, YStackProps } from '@tamagui/stacks'\nimport * as React from 'react'\nimport { createPortal } from 'react-dom'\nimport { Modal } from 'react-native'\n\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAO;AAEP,kBAAiD;AACjD,oBAAoC;AACpC,YAAuB;AACvB,uBAA6B;AAC7B,0BAAsB;
|
|
4
|
+
"sourcesContent": ["import '@tamagui/polyfill-dev'\n\nimport { isWeb, useIsomorphicLayoutEffect } from '@tamagui/core'\nimport { YStack, YStackProps } from '@tamagui/stacks'\nimport * as React from 'react'\nimport { createPortal } from 'react-dom'\nimport { Modal } from 'react-native'\n\nexport type PortalProps = YStackProps\n\nexport const Portal = (props: PortalProps) => {\n const contents = <YStack pointerEvents=\"none\" fullscreen {...props} />\n\n if (!isWeb) {\n // check if theme stays in context here\n return (\n <Modal visible transparent pointerEvents=\"none\">\n {contents}\n </Modal>\n )\n }\n\n const [hostElement, setHostElement] = React.useState<any>(null)\n\n useIsomorphicLayoutEffect(() => {\n setHostElement(globalThis.document?.body)\n }, [])\n\n if (hostElement) {\n return createPortal(contents, hostElement)\n }\n\n // ssr return null\n return null\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAO;AAEP,kBAAiD;AACjD,oBAAoC;AACpC,YAAuB;AACvB,uBAA6B;AAC7B,0BAAsB;AAIf,MAAM,SAAS,wBAAC,UAAuB;AAC5C,QAAM,WAAW,oCAAC;AAAA,IAAO,eAAc;AAAA,IAAO,YAAU;AAAA,KAAK,MAAO;AAEpE,MAAI,CAAC,mBAAO;AAEV,WACE,oCAAC;AAAA,MAAM,SAAO;AAAA,MAAC,aAAW;AAAA,MAAC,eAAc;AAAA,OACtC,QACH;AAAA,EAEJ;AAEA,QAAM,CAAC,aAAa,kBAAkB,MAAM,SAAc,IAAI;AAE9D,6CAA0B,MAAM;AAxBlC;AAyBI,mBAAe,iBAAW,aAAX,mBAAqB,IAAI;AAAA,EAC1C,GAAG,CAAC,CAAC;AAEL,MAAI,aAAa;AACf,WAAO,mCAAa,UAAU,WAAW;AAAA,EAC3C;AAGA,SAAO;AACT,GAxBsB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/Portal.js
CHANGED
|
@@ -14,7 +14,9 @@ const Portal = /* @__PURE__ */ __name((props) => {
|
|
|
14
14
|
});
|
|
15
15
|
if (!isWeb) {
|
|
16
16
|
return /* @__PURE__ */ React.createElement(Modal, {
|
|
17
|
-
visible: true
|
|
17
|
+
visible: true,
|
|
18
|
+
transparent: true,
|
|
19
|
+
pointerEvents: "none"
|
|
18
20
|
}, contents);
|
|
19
21
|
}
|
|
20
22
|
const [hostElement, setHostElement] = React.useState(null);
|
package/dist/esm/Portal.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Portal.tsx"],
|
|
4
|
-
"sourcesContent": ["import '@tamagui/polyfill-dev'\n\nimport { isWeb, useIsomorphicLayoutEffect } from '@tamagui/core'\nimport { YStack, YStackProps } from '@tamagui/stacks'\nimport * as React from 'react'\nimport { createPortal } from 'react-dom'\nimport { Modal } from 'react-native'\n\
|
|
5
|
-
"mappings": ";;AAAA;AAEA;AACA;AACA;AACA;AACA;
|
|
4
|
+
"sourcesContent": ["import '@tamagui/polyfill-dev'\n\nimport { isWeb, useIsomorphicLayoutEffect } from '@tamagui/core'\nimport { YStack, YStackProps } from '@tamagui/stacks'\nimport * as React from 'react'\nimport { createPortal } from 'react-dom'\nimport { Modal } from 'react-native'\n\nexport type PortalProps = YStackProps\n\nexport const Portal = (props: PortalProps) => {\n const contents = <YStack pointerEvents=\"none\" fullscreen {...props} />\n\n if (!isWeb) {\n // check if theme stays in context here\n return (\n <Modal visible transparent pointerEvents=\"none\">\n {contents}\n </Modal>\n )\n }\n\n const [hostElement, setHostElement] = React.useState<any>(null)\n\n useIsomorphicLayoutEffect(() => {\n setHostElement(globalThis.document?.body)\n }, [])\n\n if (hostElement) {\n return createPortal(contents, hostElement)\n }\n\n // ssr return null\n return null\n}\n"],
|
|
5
|
+
"mappings": ";;AAAA;AAEA;AACA;AACA;AACA;AACA;AAIO,MAAM,SAAS,wBAAC,UAAuB;AAC5C,QAAM,WAAW,oCAAC;AAAA,IAAO,eAAc;AAAA,IAAO,YAAU;AAAA,IAAE,GAAG;AAAA,GAAO;AAEpE,MAAI,CAAC,OAAO;AAEV,WACE,oCAAC;AAAA,MAAM,SAAO;AAAA,MAAC,aAAW;AAAA,MAAC,eAAc;AAAA,OACtC,QACH;AAAA,EAEJ;AAEA,QAAM,CAAC,aAAa,kBAAkB,MAAM,SAAc,IAAI;AAE9D,4BAA0B,MAAM;AAxBlC;AAyBI,mBAAe,iBAAW,aAAX,mBAAqB,IAAI;AAAA,EAC1C,GAAG,CAAC,CAAC;AAEL,MAAI,aAAa;AACf,WAAO,aAAa,UAAU,WAAW;AAAA,EAC3C;AAGA,SAAO;AACT,GAxBsB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/jsx/Portal.js
CHANGED
|
@@ -9,7 +9,7 @@ import { Modal } from "react-native";
|
|
|
9
9
|
const Portal = /* @__PURE__ */ __name((props) => {
|
|
10
10
|
const contents = <YStack pointerEvents="none" fullscreen {...props} />;
|
|
11
11
|
if (!isWeb) {
|
|
12
|
-
return <Modal visible>{contents}</Modal>;
|
|
12
|
+
return <Modal visible transparent pointerEvents="none">{contents}</Modal>;
|
|
13
13
|
}
|
|
14
14
|
const [hostElement, setHostElement] = React.useState(null);
|
|
15
15
|
useIsomorphicLayoutEffect(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/portal",
|
|
3
|
-
"version": "1.0.1-beta.
|
|
3
|
+
"version": "1.0.1-beta.45",
|
|
4
4
|
"sideEffects": true,
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"types": "./types/index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"clean:build": "tamagui-build clean:build"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@tamagui/stacks": "^1.0.1-beta.
|
|
21
|
+
"@tamagui/stacks": "^1.0.1-beta.45"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"react": "*",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"react-native": "*"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@tamagui/build": "^1.0.1-beta.
|
|
29
|
+
"@tamagui/build": "^1.0.1-beta.45",
|
|
30
30
|
"@types/react-native": "^0.67.3",
|
|
31
31
|
"react": "*",
|
|
32
32
|
"react-dom": "*",
|
package/types/Portal.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import '@tamagui/polyfill-dev';
|
|
3
3
|
import { YStackProps } from '@tamagui/stacks';
|
|
4
|
-
export declare
|
|
4
|
+
export declare type PortalProps = YStackProps;
|
|
5
|
+
export declare const Portal: (props: PortalProps) => JSX.Element | null;
|
|
5
6
|
//# sourceMappingURL=Portal.d.ts.map
|
package/types/Portal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../src/Portal.tsx"],"names":[],"mappings":";AAAA,OAAO,uBAAuB,CAAA;AAG9B,OAAO,EAAU,WAAW,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../src/Portal.tsx"],"names":[],"mappings":";AAAA,OAAO,uBAAuB,CAAA;AAG9B,OAAO,EAAU,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAKrD,oBAAY,WAAW,GAAG,WAAW,CAAA;AAErC,eAAO,MAAM,MAAM,UAAW,WAAW,uBAwBxC,CAAA"}
|