@norges-domstoler/dds-components 0.0.0-dev-20241209080734 → 0.0.0-dev-20241209085435
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 +8 -0
- package/dist/index.d.ts +8 -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 +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2455,6 +2455,10 @@ type PopoverProps = BaseComponentPropsWithChildren<HTMLDivElement, {
|
|
|
2455
2455
|
sizeProps?: PopoverSizeProps;
|
|
2456
2456
|
/** **OBS!** Propen settes automatisk av `<PopoverGroup />`. Funksjon kjørt ved lukking. */
|
|
2457
2457
|
onClose?: () => void;
|
|
2458
|
+
/** Om focus skal returneres ved `blur`
|
|
2459
|
+
* @default true
|
|
2460
|
+
*/
|
|
2461
|
+
returnFocusOnBlur?: boolean;
|
|
2458
2462
|
}>;
|
|
2459
2463
|
declare const Popover: react.ForwardRefExoticComponent<Pick<react.HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
|
|
2460
2464
|
/**Tittel. */
|
|
@@ -2485,6 +2489,10 @@ declare const Popover: react.ForwardRefExoticComponent<Pick<react.HTMLAttributes
|
|
|
2485
2489
|
sizeProps?: PopoverSizeProps;
|
|
2486
2490
|
/** **OBS!** Propen settes automatisk av `<PopoverGroup />`. Funksjon kjørt ved lukking. */
|
|
2487
2491
|
onClose?: () => void;
|
|
2492
|
+
/** Om focus skal returneres ved `blur`
|
|
2493
|
+
* @default true
|
|
2494
|
+
*/
|
|
2495
|
+
returnFocusOnBlur?: boolean;
|
|
2488
2496
|
} & {
|
|
2489
2497
|
children?: ReactNode | undefined;
|
|
2490
2498
|
} & {
|
package/dist/index.d.ts
CHANGED
|
@@ -2455,6 +2455,10 @@ type PopoverProps = BaseComponentPropsWithChildren<HTMLDivElement, {
|
|
|
2455
2455
|
sizeProps?: PopoverSizeProps;
|
|
2456
2456
|
/** **OBS!** Propen settes automatisk av `<PopoverGroup />`. Funksjon kjørt ved lukking. */
|
|
2457
2457
|
onClose?: () => void;
|
|
2458
|
+
/** Om focus skal returneres ved `blur`
|
|
2459
|
+
* @default true
|
|
2460
|
+
*/
|
|
2461
|
+
returnFocusOnBlur?: boolean;
|
|
2458
2462
|
}>;
|
|
2459
2463
|
declare const Popover: react.ForwardRefExoticComponent<Pick<react.HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
|
|
2460
2464
|
/**Tittel. */
|
|
@@ -2485,6 +2489,10 @@ declare const Popover: react.ForwardRefExoticComponent<Pick<react.HTMLAttributes
|
|
|
2485
2489
|
sizeProps?: PopoverSizeProps;
|
|
2486
2490
|
/** **OBS!** Propen settes automatisk av `<PopoverGroup />`. Funksjon kjørt ved lukking. */
|
|
2487
2491
|
onClose?: () => void;
|
|
2492
|
+
/** Om focus skal returneres ved `blur`
|
|
2493
|
+
* @default true
|
|
2494
|
+
*/
|
|
2495
|
+
returnFocusOnBlur?: boolean;
|
|
2488
2496
|
} & {
|
|
2489
2497
|
children?: ReactNode | undefined;
|
|
2490
2498
|
} & {
|
package/dist/index.js
CHANGED
|
@@ -11300,6 +11300,7 @@ var Popover = (0, import_react111.forwardRef)(
|
|
|
11300
11300
|
placement = "bottom",
|
|
11301
11301
|
offset = import_dds_design_tokens16.ddsTokens.ddsSpacingX05NumberPx,
|
|
11302
11302
|
sizeProps,
|
|
11303
|
+
returnFocusOnBlur = true,
|
|
11303
11304
|
id,
|
|
11304
11305
|
className,
|
|
11305
11306
|
htmlProps = {},
|
|
@@ -11312,7 +11313,7 @@ var Popover = (0, import_react111.forwardRef)(
|
|
|
11312
11313
|
});
|
|
11313
11314
|
refs.setReference(anchorElement || null);
|
|
11314
11315
|
const popoverRef = useReturnFocusOnBlur(
|
|
11315
|
-
isOpen && hasTransitionedIn,
|
|
11316
|
+
isOpen && hasTransitionedIn && returnFocusOnBlur,
|
|
11316
11317
|
() => {
|
|
11317
11318
|
onClose && onClose();
|
|
11318
11319
|
onBlur && onBlur();
|