@norges-domstoler/dds-components 0.0.0-dev-20241206124606 → 0.0.0-dev-20241206132224
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/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -2454,6 +2454,7 @@ type PopoverProps = BaseComponentPropsWithChildren<HTMLDivElement, {
|
|
|
2454
2454
|
sizeProps?: PopoverSizeProps;
|
|
2455
2455
|
/** **OBS!** Propen settes automatisk av `<PopoverGroup />`. Funksjon kjørt ved lukking. */
|
|
2456
2456
|
onClose?: () => void;
|
|
2457
|
+
withoutFocusOnBlur?: boolean;
|
|
2457
2458
|
}>;
|
|
2458
2459
|
declare const Popover: react.ForwardRefExoticComponent<Pick<react.HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
|
|
2459
2460
|
/**Tittel. */
|
|
@@ -2484,6 +2485,7 @@ declare const Popover: react.ForwardRefExoticComponent<Pick<react.HTMLAttributes
|
|
|
2484
2485
|
sizeProps?: PopoverSizeProps;
|
|
2485
2486
|
/** **OBS!** Propen settes automatisk av `<PopoverGroup />`. Funksjon kjørt ved lukking. */
|
|
2486
2487
|
onClose?: () => void;
|
|
2488
|
+
withoutFocusOnBlur?: boolean;
|
|
2487
2489
|
} & {
|
|
2488
2490
|
children?: ReactNode | undefined;
|
|
2489
2491
|
} & {
|
package/dist/index.d.ts
CHANGED
|
@@ -2454,6 +2454,7 @@ type PopoverProps = BaseComponentPropsWithChildren<HTMLDivElement, {
|
|
|
2454
2454
|
sizeProps?: PopoverSizeProps;
|
|
2455
2455
|
/** **OBS!** Propen settes automatisk av `<PopoverGroup />`. Funksjon kjørt ved lukking. */
|
|
2456
2456
|
onClose?: () => void;
|
|
2457
|
+
withoutFocusOnBlur?: boolean;
|
|
2457
2458
|
}>;
|
|
2458
2459
|
declare const Popover: react.ForwardRefExoticComponent<Pick<react.HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
|
|
2459
2460
|
/**Tittel. */
|
|
@@ -2484,6 +2485,7 @@ declare const Popover: react.ForwardRefExoticComponent<Pick<react.HTMLAttributes
|
|
|
2484
2485
|
sizeProps?: PopoverSizeProps;
|
|
2485
2486
|
/** **OBS!** Propen settes automatisk av `<PopoverGroup />`. Funksjon kjørt ved lukking. */
|
|
2486
2487
|
onClose?: () => void;
|
|
2488
|
+
withoutFocusOnBlur?: boolean;
|
|
2487
2489
|
} & {
|
|
2488
2490
|
children?: ReactNode | undefined;
|
|
2489
2491
|
} & {
|
package/dist/index.js
CHANGED
|
@@ -11301,6 +11301,7 @@ var Popover = (0, import_react111.forwardRef)(
|
|
|
11301
11301
|
id,
|
|
11302
11302
|
className,
|
|
11303
11303
|
htmlProps = {},
|
|
11304
|
+
withoutFocusOnBlur = false,
|
|
11304
11305
|
...rest
|
|
11305
11306
|
} = props;
|
|
11306
11307
|
const hasTransitionedIn = useMountTransition(isOpen, 400);
|
|
@@ -11310,7 +11311,7 @@ var Popover = (0, import_react111.forwardRef)(
|
|
|
11310
11311
|
});
|
|
11311
11312
|
refs.setReference(anchorElement || null);
|
|
11312
11313
|
const popoverRef = useReturnFocusOnBlur(
|
|
11313
|
-
isOpen && hasTransitionedIn,
|
|
11314
|
+
isOpen && hasTransitionedIn && !withoutFocusOnBlur,
|
|
11314
11315
|
() => {
|
|
11315
11316
|
onClose && onClose();
|
|
11316
11317
|
onBlur && onBlur();
|