@prizmui/components 0.1.6 → 0.1.7
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopoverSurface.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/PopoverSurface.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,uBAAuB,CAAC;AAMhD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAG3D,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,
|
|
1
|
+
{"version":3,"file":"PopoverSurface.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/PopoverSurface.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,uBAAuB,CAAC;AAMhD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAG3D,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CA8ClD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "jsx-framework-test-pb/jsx-runtime";
|
|
2
|
-
import { useContext } from 'jsx-framework-test-pb';
|
|
2
|
+
import { useContext, createPortal } from 'jsx-framework-test-pb';
|
|
3
3
|
import { PrizmProvider } from '../PrizmProvider/PrizmProvider';
|
|
4
4
|
import { ThemeContext } from '../PrizmProvider/ThemeContext';
|
|
5
5
|
import { PopoverContext } from './Popover.context';
|
|
@@ -16,8 +16,8 @@ export const PopoverSurface = (props) => {
|
|
|
16
16
|
return null;
|
|
17
17
|
const trigger = document.getElementById(context.triggerId);
|
|
18
18
|
const rect = trigger?.getBoundingClientRect();
|
|
19
|
-
return (_jsx(PrizmProvider, { theme: theme, style: {
|
|
20
|
-
position: '
|
|
19
|
+
return createPortal(_jsx(PrizmProvider, { theme: theme, style: {
|
|
20
|
+
position: 'fixed',
|
|
21
21
|
top: '0',
|
|
22
22
|
left: '0',
|
|
23
23
|
right: '0',
|
|
@@ -30,6 +30,6 @@ export const PopoverSurface = (props) => {
|
|
|
30
30
|
position: 'absolute',
|
|
31
31
|
top: rect ? `${rect.bottom + 8}px` : '0',
|
|
32
32
|
left: rect ? `${rect.left}px` : '0',
|
|
33
|
-
}, onClick: (e) => e.stopPropagation(), children: children }) }));
|
|
33
|
+
}, onClick: (e) => e.stopPropagation(), children: children }) }), document.body);
|
|
34
34
|
});
|
|
35
35
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prizmui/components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"dist"
|
|
15
15
|
],
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"
|
|
18
|
-
"
|
|
17
|
+
"calame": "0.0.6",
|
|
18
|
+
"@prizmui/tokens": "0.0.5"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"jsx-framework-test-pb": "*"
|