@tamagui/portal 1.0.1-beta.76 → 1.0.1-beta.79
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/jsx/Portal.js +1 -0
- package/dist/jsx/Portal.js.map +7 -0
- package/dist/jsx/index.js +1 -0
- package/dist/jsx/index.js.map +7 -0
- package/package.json +3 -3
- package/types/Portal.d.ts +0 -1
- package/types/Portal.d.ts.map +1 -1
package/dist/jsx/Portal.js
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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\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,CAAC,UAAuB;AAC5C,QAAM,WAAW,CAAC,OAAO,cAAc,OAAO,eAAe,OAAO;AAEpE,MAAI,CAAC,OAAO;AAEV,WACE,CAAC,MAAM,QAAQ,YAAY,cAAc,QACtC,SACH,EAFC;AAAA,EAIL;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;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/jsx/index.js
CHANGED
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.79",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"types": "./types/index.d.ts",
|
|
6
6
|
"main": "dist/cjs",
|
|
@@ -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.79"
|
|
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.79",
|
|
30
30
|
"@types/react-native": "^0.67.3",
|
|
31
31
|
"react": "*",
|
|
32
32
|
"react-dom": "*",
|
package/types/Portal.d.ts
CHANGED
package/types/Portal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../src/Portal.tsx"],"names":[],"mappings":"
|
|
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"}
|