@vygruppen/spor-react 12.13.0 → 12.13.1
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/.turbo/turbo-build.log +10 -10
- package/.turbo/turbo-postinstall.log +1 -1
- package/CHANGELOG.md +8 -0
- package/dist/index.cjs +8 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +7 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/input/CountryCodeSelect.tsx +1 -1
- package/src/input/Popover.tsx +8 -1
package/package.json
CHANGED
@@ -58,7 +58,7 @@ export const CountryCodeSelect = forwardRef<
|
|
58
58
|
sideRadiusVariant={"rightSideSquare"}
|
59
59
|
>
|
60
60
|
{callingCodes.items.map((code) => (
|
61
|
-
<SelectItem
|
61
|
+
<SelectItem key={code.label} item={code}>
|
62
62
|
{code.label}
|
63
63
|
</SelectItem>
|
64
64
|
))}
|
package/src/input/Popover.tsx
CHANGED
@@ -7,6 +7,7 @@ import {
|
|
7
7
|
Overlay,
|
8
8
|
usePopover,
|
9
9
|
} from "react-aria";
|
10
|
+
import ReactDOM from "react-dom";
|
10
11
|
import { OverlayTriggerState } from "react-stately";
|
11
12
|
|
12
13
|
type PopoverProps = {
|
@@ -54,7 +55,7 @@ type PopoverProps = {
|
|
54
55
|
/**
|
55
56
|
* Internal popover component.
|
56
57
|
*
|
57
|
-
* Used to render accessible popover content,
|
58
|
+
* Used to render accessible popover content, only used in ComboBox.
|
58
59
|
*/
|
59
60
|
export const Popover = forwardRef<HTMLDivElement, PopoverProps>(
|
60
61
|
(
|
@@ -95,6 +96,8 @@ export const Popover = forwardRef<HTMLDivElement, PopoverProps>(
|
|
95
96
|
{...popoverProps}
|
96
97
|
ref={popoverRef}
|
97
98
|
minWidth={triggerRef.current?.clientWidth ?? "auto"}
|
99
|
+
position="absolute"
|
100
|
+
zIndex={1400}
|
98
101
|
>
|
99
102
|
<DismissButton onDismiss={state.close} />
|
100
103
|
{children}
|
@@ -103,6 +106,10 @@ export const Popover = forwardRef<HTMLDivElement, PopoverProps>(
|
|
103
106
|
);
|
104
107
|
|
105
108
|
if (isNonModal) {
|
109
|
+
// Render in a portal to ensure it does not take up semantic space
|
110
|
+
if (globalThis.window !== undefined && typeof document !== "undefined") {
|
111
|
+
return ReactDOM.createPortal(popoverBox, document.body);
|
112
|
+
}
|
106
113
|
return popoverBox;
|
107
114
|
}
|
108
115
|
return (
|