@dfds-ui/modal 2.2.0-alpha.b8d61c36 → 2.2.0-alpha.bfcaf58a
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/cjs/modal/Modal.d.ts +6 -2
- package/cjs/modal/Modal.js +22 -18
- package/cjs/modal/ModalAction.d.ts +2 -2
- package/cjs/modal/ModalAction.js +6 -6
- package/cjs/modal/ModalActionsContainer.d.ts +1 -1
- package/cjs/modal/ModalActionsContainer.js +12 -7
- package/cjs/modal/ModalBody.d.ts +3 -3
- package/cjs/modal/ModalBody.js +2 -4
- package/cjs/modal/ModalCloseButton.d.ts +1 -1
- package/cjs/modal/ModalCloseButton.js +6 -6
- package/cjs/modal/ModalDialog.d.ts +6 -6
- package/cjs/modal/ModalDialog.js +37 -37
- package/cjs/modal/ModalFooter.d.ts +1 -1
- package/cjs/modal/ModalFooter.js +7 -6
- package/cjs/modal/ModalHeader.d.ts +1 -1
- package/cjs/modal/ModalHeader.js +10 -7
- package/cjs/modal/ModalHeadline.d.ts +1 -1
- package/cjs/modal/ModalHeadline.js +6 -5
- package/cjs/modal/ModalPanel.d.ts +4 -4
- package/cjs/modal/ModalPanel.js +32 -28
- package/cjs/modal/ReactModalWrapper.d.ts +1 -1
- package/cjs/modal/ReactModalWrapper.js +5 -5
- package/modal/Modal.d.ts +6 -2
- package/modal/Modal.js +27 -16
- package/modal/ModalAction.d.ts +2 -2
- package/modal/ModalAction.js +10 -5
- package/modal/ModalActionsContainer.d.ts +1 -1
- package/modal/ModalActionsContainer.js +15 -6
- package/modal/ModalBody.d.ts +3 -3
- package/modal/ModalCloseButton.d.ts +1 -1
- package/modal/ModalCloseButton.js +10 -5
- package/modal/ModalDialog.d.ts +6 -6
- package/modal/ModalDialog.js +33 -32
- package/modal/ModalFooter.d.ts +1 -1
- package/modal/ModalFooter.js +13 -6
- package/modal/ModalHeader.d.ts +1 -1
- package/modal/ModalHeader.js +17 -8
- package/modal/ModalHeadline.d.ts +1 -1
- package/modal/ModalHeadline.js +5 -4
- package/modal/ModalPanel.d.ts +4 -4
- package/modal/ModalPanel.js +32 -29
- package/modal/ReactModalWrapper.d.ts +1 -1
- package/modal/ReactModalWrapper.js +10 -5
- package/package.json +10 -10
package/modal/ModalBody.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type ModalBodyProps = {
|
|
2
2
|
hasPadding?: boolean;
|
|
3
3
|
column?: boolean;
|
|
4
4
|
};
|
|
5
5
|
export declare const ModalBody: import("@emotion/styled").StyledComponent<{
|
|
6
|
-
theme?: import("@emotion/react").Theme
|
|
7
|
-
as?:
|
|
6
|
+
theme?: import("@emotion/react").Theme;
|
|
7
|
+
as?: React.ElementType;
|
|
8
8
|
} & ModalBodyProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
9
9
|
export default ModalBody;
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1
2
|
var _excluded = ["onRequestClose", "className", "icon", "size", "closeLabel"];
|
|
2
|
-
function
|
|
3
|
-
function
|
|
4
|
-
function
|
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
9
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
5
10
|
import React from 'react';
|
|
6
11
|
import { IconButton } from '@dfds-ui/react-components';
|
|
7
12
|
import { Close } from '@dfds-ui/icons/system';
|
|
8
13
|
import { css } from '@emotion/react';
|
|
9
14
|
import { theme } from '@dfds-ui/theme';
|
|
10
|
-
import { jsx as
|
|
15
|
+
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
11
16
|
export var ModalCloseButton = function ModalCloseButton(_ref) {
|
|
12
17
|
var onRequestClose = _ref.onRequestClose,
|
|
13
18
|
className = _ref.className,
|
|
@@ -18,7 +23,7 @@ export var ModalCloseButton = function ModalCloseButton(_ref) {
|
|
|
18
23
|
_ref$closeLabel = _ref.closeLabel,
|
|
19
24
|
closeLabel = _ref$closeLabel === void 0 ? 'Close' : _ref$closeLabel,
|
|
20
25
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
21
|
-
return
|
|
26
|
+
return _jsx(IconButton, _objectSpread({
|
|
22
27
|
disableOverlay: true,
|
|
23
28
|
disableTooltip: true,
|
|
24
29
|
hoverColor: theme.colors.secondary.main,
|
package/modal/ModalDialog.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { theme } from '@dfds-ui/theme';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
3
|
+
export type ModalVariation = 'default' | 'fullscreen';
|
|
4
|
+
export type ModalSizes = Record<keyof typeof theme.breakpoints, string>;
|
|
5
|
+
export type Backdrop = keyof typeof backdropsTransparent;
|
|
6
|
+
export type BackdropVariant = 'transparent' | 'solid';
|
|
7
|
+
export type ModalDialogProps = {
|
|
8
8
|
isOpen: boolean;
|
|
9
9
|
onRequestClose?: () => void;
|
|
10
10
|
shouldCloseOnOverlayClick?: boolean;
|
|
@@ -35,7 +35,7 @@ export declare const defaultProps: {
|
|
|
35
35
|
};
|
|
36
36
|
zIndex: number;
|
|
37
37
|
renderWhenClosed: boolean;
|
|
38
|
-
backdrop:
|
|
38
|
+
backdrop: Backdrop;
|
|
39
39
|
backdropVariant: BackdropVariant;
|
|
40
40
|
};
|
|
41
41
|
declare const ModalDialog: ({ isOpen, onRequestClose, shouldCloseOnOverlayClick, shouldCloseOnEsc, variation, zIndex, className, sizes, fixedTopPosition, renderWhenClosed, backdrop, backdropVariant, children, ...rest }: ModalDialogProps) => React.JSX.Element | null;
|