@skatteetaten/ds-overlays 1.2.0 → 1.3.0
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/Popover/index.esm.js +2 -2
- package/PopoverContent/index.esm.js +1 -1
- package/{PopoverContent-QCKf0esL.js → PopoverContent-o3iFbvYe.js} +1 -2
- package/index.esm.js +1 -1
- package/package.json +7 -6
- package/src/Modal/Modal.d.ts +0 -1
- package/src/PopoverContent/PopoverContent.d.ts +0 -1
- package/src/PopoverContext/PopoverContext.d.ts +0 -1
- package/src/PopoverTrigger/PopoverTrigger.d.ts +0 -1
package/Popover/index.esm.js
CHANGED
|
@@ -2,8 +2,8 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { useRef, useState, useEffect, useMemo } from 'react';
|
|
3
3
|
import { useFloating, autoUpdate, offset, flip, shift, arrow, useDismiss, useInteractions } from '@floating-ui/react';
|
|
4
4
|
import { useMediaQuery } from '@skatteetaten/ds-core-utils';
|
|
5
|
-
import { P as PopoverContent, a as getPopoverPositionDefault } from '../PopoverContent-
|
|
6
|
-
export { g as getPopoverColorDefault, b as getPopoverRestoreFocusDefault } from '../PopoverContent-
|
|
5
|
+
import { P as PopoverContent, a as getPopoverPositionDefault } from '../PopoverContent-o3iFbvYe.js';
|
|
6
|
+
export { g as getPopoverColorDefault, b as getPopoverRestoreFocusDefault } from '../PopoverContent-o3iFbvYe.js';
|
|
7
7
|
import { PopoverContext } from '../PopoverContext/index.esm.js';
|
|
8
8
|
import { PopoverTrigger } from '../PopoverTrigger/index.esm.js';
|
|
9
9
|
import 'react-i18next';
|
|
@@ -5,5 +5,5 @@ import '@floating-ui/react';
|
|
|
5
5
|
import '@skatteetaten/ds-buttons';
|
|
6
6
|
import '@skatteetaten/ds-core-utils';
|
|
7
7
|
import '@skatteetaten/ds-icons';
|
|
8
|
-
export { P as PopoverContent } from '../PopoverContent-
|
|
8
|
+
export { P as PopoverContent } from '../PopoverContent-o3iFbvYe.js';
|
|
9
9
|
import '../PopoverContext/index.esm.js';
|
|
@@ -29,7 +29,7 @@ var styles = {
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
const PopoverContent = /*#__PURE__*/ forwardRef(({ id, className = getCommonClassNameDefault(), lang, 'data-testid': dataTestId, children }, ref)=>{
|
|
32
|
-
const { floatingData, interactions, arrowRef, isOpen, setIsOpen, color = getPopoverColorDefault(),
|
|
32
|
+
const { floatingData, interactions, arrowRef, isOpen, setIsOpen, color = getPopoverColorDefault(), shouldRestoreFocus = getPopoverRestoreFocusDefault(), onClose } = useContext(PopoverContext);
|
|
33
33
|
const { refs, floatingStyles, placement, middlewareData } = floatingData;
|
|
34
34
|
const { getFloatingProps } = interactions;
|
|
35
35
|
const { t } = useTranslation('Shared', {
|
|
@@ -69,7 +69,6 @@ const PopoverContent = /*#__PURE__*/ forwardRef(({ id, className = getCommonClas
|
|
|
69
69
|
}),
|
|
70
70
|
/*#__PURE__*/ jsx(IconButton, {
|
|
71
71
|
className: styles.popoverContentCloseButton,
|
|
72
|
-
size: isMobile ? 'small' : 'large',
|
|
73
72
|
svgPath: CancelSVGpath,
|
|
74
73
|
title: t('shared.Close'),
|
|
75
74
|
onClick: ()=>{
|
package/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { Modal, getModalDismissOnEscDefault, getModalDismissOnOutsideClickDefault, getModalPaddingDefault, getModalVariantDefault } from './Modal/index.esm.js';
|
|
2
2
|
export { Popover } from './Popover/index.esm.js';
|
|
3
3
|
import { colorNamesArr } from '@skatteetaten/ds-core-utils';
|
|
4
|
-
export { g as getPopoverColorDefault, a as getPopoverPositionDefault, b as getPopoverRestoreFocusDefault } from './PopoverContent-
|
|
4
|
+
export { g as getPopoverColorDefault, a as getPopoverPositionDefault, b as getPopoverRestoreFocusDefault } from './PopoverContent-o3iFbvYe.js';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
6
6
|
import 'react';
|
|
7
7
|
import 'react-i18next';
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skatteetaten/ds-overlays",
|
|
3
3
|
"groupId": "no.skatteetaten.aurora",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.3.0",
|
|
5
5
|
"main": "./index.esm.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"module": "./index.esm.js",
|
|
8
|
+
"types": "./index.esm.d.ts",
|
|
8
9
|
"repository": {
|
|
9
10
|
"type": "git",
|
|
10
11
|
"url": "git+https://github.com/Skatteetaten/designsystemet.git"
|
|
@@ -14,11 +15,11 @@
|
|
|
14
15
|
"i18next": "^23",
|
|
15
16
|
"react": "^18",
|
|
16
17
|
"react-i18next": "^14",
|
|
17
|
-
"@skatteetaten/ds-core-utils": "1.
|
|
18
|
-
"@skatteetaten/ds-buttons": "1.
|
|
19
|
-
"@skatteetaten/ds-icons": "1.
|
|
20
|
-
"@skatteetaten/ds-typography": "1.
|
|
21
|
-
"@skatteetaten/ds-progress": "1.
|
|
18
|
+
"@skatteetaten/ds-core-utils": "1.3.0",
|
|
19
|
+
"@skatteetaten/ds-buttons": "1.3.0",
|
|
20
|
+
"@skatteetaten/ds-icons": "1.3.0",
|
|
21
|
+
"@skatteetaten/ds-typography": "1.3.0",
|
|
22
|
+
"@skatteetaten/ds-progress": "1.3.0",
|
|
22
23
|
"@floating-ui/react": "0.26.17"
|
|
23
24
|
},
|
|
24
25
|
"dependencies": {},
|
package/src/Modal/Modal.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { getModalDismissOnEscDefault, getModalDismissOnOutsideClickDefault, getModalPaddingDefault, getModalVariantDefault } from './defaults';
|
|
3
2
|
import { ModalProps } from './Modal.types';
|
|
4
3
|
export declare const Modal: import("react").ForwardRefExoticComponent<ModalProps & import("react").RefAttributes<HTMLDialogElement>>;
|