@dfds-ui/modal 2.2.0-alpha.c2f773c5 → 2.2.0-alpha.c79adffa
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/index.js +1 -1
- package/cjs/modal/Modal.d.ts +3 -7
- package/cjs/modal/Modal.js +47 -40
- package/cjs/modal/ModalAction.d.ts +2 -2
- package/cjs/modal/ModalAction.js +11 -9
- package/cjs/modal/ModalActionsContainer.d.ts +1 -1
- package/cjs/modal/ModalActionsContainer.js +11 -15
- package/cjs/modal/ModalBody.d.ts +4 -3
- package/cjs/modal/ModalCloseButton.d.ts +2 -2
- package/cjs/modal/ModalCloseButton.js +17 -13
- package/cjs/modal/ModalDialog.d.ts +7 -7
- package/cjs/modal/ModalDialog.js +79 -61
- package/cjs/modal/ModalFooter.d.ts +3 -3
- package/cjs/modal/ModalFooter.js +12 -12
- package/cjs/modal/ModalHeader.d.ts +3 -3
- package/cjs/modal/ModalHeader.js +16 -17
- package/cjs/modal/ModalHeadline.d.ts +3 -3
- package/cjs/modal/ModalHeadline.js +3 -5
- package/cjs/modal/ModalPanel.d.ts +9 -9
- package/cjs/modal/ModalPanel.js +28 -32
- package/cjs/modal/ReactModalWrapper.d.ts +2 -2
- package/cjs/modal/ReactModalWrapper.js +11 -9
- package/cjs/modal/index.js +12 -12
- package/modal/Modal.d.ts +3 -7
- package/modal/Modal.js +14 -25
- package/modal/ModalAction.d.ts +2 -2
- package/modal/ModalAction.js +3 -8
- package/modal/ModalActionsContainer.d.ts +1 -1
- package/modal/ModalActionsContainer.js +5 -14
- package/modal/ModalBody.d.ts +4 -3
- package/modal/ModalCloseButton.d.ts +2 -2
- package/modal/ModalCloseButton.js +3 -8
- package/modal/ModalDialog.d.ts +7 -7
- package/modal/ModalDialog.js +27 -28
- package/modal/ModalFooter.d.ts +3 -3
- package/modal/ModalFooter.js +4 -11
- package/modal/ModalHeader.d.ts +3 -3
- package/modal/ModalHeader.js +6 -15
- package/modal/ModalHeadline.d.ts +3 -3
- package/modal/ModalHeadline.js +4 -5
- package/modal/ModalPanel.d.ts +9 -9
- package/modal/ModalPanel.js +29 -32
- package/modal/ReactModalWrapper.d.ts +2 -2
- package/modal/ReactModalWrapper.js +3 -8
- package/package.json +12 -12
package/modal/Modal.js
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
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); }
|
|
2
1
|
var _excluded = ["showClose", "heading", "headerClassName", "noContentPadding", "onRequestClose", "children", "closeTabIndex", "closeLabel", "column", "zIndex", "sizes", "renderWhenClosed", "backdrop", "backdropVariant", "actions"];
|
|
3
|
-
function
|
|
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); }
|
|
2
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
8
3
|
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
4
|
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; }
|
|
10
5
|
import React from 'react';
|
|
@@ -14,7 +9,7 @@ import ModalDialog, { defaultProps } from './ModalDialog';
|
|
|
14
9
|
import ModalBody from './ModalBody';
|
|
15
10
|
import ModalActionsContainer from './ModalActionsContainer';
|
|
16
11
|
import ModalHeadline from './ModalHeadline';
|
|
17
|
-
import { jsx as
|
|
12
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
18
13
|
export var Modal = function Modal(_ref) {
|
|
19
14
|
var _ref$showClose = _ref.showClose,
|
|
20
15
|
showClose = _ref$showClose === void 0 ? true : _ref$showClose,
|
|
@@ -43,29 +38,23 @@ export var Modal = function Modal(_ref) {
|
|
|
43
38
|
actions = _ref.actions,
|
|
44
39
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
45
40
|
var showHeader = heading !== undefined || showClose;
|
|
46
|
-
return
|
|
41
|
+
return ___EmotionJSX(ModalDialog, _extends({
|
|
47
42
|
onRequestClose: onRequestClose,
|
|
48
43
|
sizes: sizes,
|
|
49
44
|
renderWhenClosed: renderWhenClosed,
|
|
50
45
|
backdrop: backdrop,
|
|
51
46
|
backdropVariant: backdropVariant
|
|
52
|
-
}, rest),
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
hasPadding: !noContentPadding,
|
|
64
|
-
column: column,
|
|
65
|
-
children: children
|
|
66
|
-
}), _jsx(ModalActionsContainer, {
|
|
67
|
-
actions: actions
|
|
68
|
-
})]
|
|
47
|
+
}, rest), showHeader && ___EmotionJSX(ModalHeader, {
|
|
48
|
+
className: headerClassName
|
|
49
|
+
}, ___EmotionJSX(ModalHeadline, null, heading), showClose && ___EmotionJSX(ModalCloseButton, {
|
|
50
|
+
onRequestClose: onRequestClose,
|
|
51
|
+
tabIndex: closeTabIndex,
|
|
52
|
+
closeLabel: closeLabel
|
|
53
|
+
})), ___EmotionJSX(ModalBody, {
|
|
54
|
+
hasPadding: !noContentPadding,
|
|
55
|
+
column: column
|
|
56
|
+
}, children), ___EmotionJSX(ModalActionsContainer, {
|
|
57
|
+
actions: actions
|
|
69
58
|
}));
|
|
70
59
|
};
|
|
71
60
|
export default Modal;
|
package/modal/ModalAction.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ButtonProps } from '@dfds-ui/react-components';
|
|
3
|
-
export type ModalActionVariation = 'primary' | 'secondary';
|
|
4
|
-
export type ModalActionProps = {
|
|
3
|
+
export declare type ModalActionVariation = 'primary' | 'secondary';
|
|
4
|
+
export declare type ModalActionProps = {
|
|
5
5
|
actionVariation?: ModalActionVariation;
|
|
6
6
|
onClick?: () => void;
|
|
7
7
|
/**
|
package/modal/ModalAction.js
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
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); }
|
|
2
1
|
var _excluded = ["actionVariation"];
|
|
3
|
-
function
|
|
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); }
|
|
2
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
8
3
|
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
4
|
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; }
|
|
10
5
|
import React from 'react';
|
|
@@ -12,7 +7,7 @@ import { css } from '@emotion/react';
|
|
|
12
7
|
import { theme } from '@dfds-ui/theme';
|
|
13
8
|
import { typography } from '@dfds-ui/typography';
|
|
14
9
|
import { Button } from '@dfds-ui/react-components';
|
|
15
|
-
import { jsx as
|
|
10
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
16
11
|
var getVariationStyle = function getVariationStyle(actionVariation) {
|
|
17
12
|
if (actionVariation === 'primary') {
|
|
18
13
|
return /*#__PURE__*/css("color:", theme.colors.text.light.primary, ";background:", theme.colors.secondary.main, ";margin-right:", theme.spacing.s, ";&:hover{color:", theme.colors.text.light.primary, ";}" + (process.env.NODE_ENV === "production" ? "" : ";label:getVariationStyle;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9tb2RhbC9Nb2RhbEFjdGlvbi50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBdUJjIiwiZmlsZSI6Ii4uLy4uL3NyYy9tb2RhbC9Nb2RhbEFjdGlvbi50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QgZnJvbSAncmVhY3QnXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcbmltcG9ydCB7IHRoZW1lIH0gZnJvbSAnQGRmZHMtdWkvdGhlbWUnXG5pbXBvcnQgeyB0eXBvZ3JhcGh5IH0gZnJvbSAnQGRmZHMtdWkvdHlwb2dyYXBoeSdcbmltcG9ydCB7IEJ1dHRvbiwgQnV0dG9uUHJvcHMgfSBmcm9tICdAZGZkcy11aS9yZWFjdC1jb21wb25lbnRzJ1xuXG5leHBvcnQgdHlwZSBNb2RhbEFjdGlvblZhcmlhdGlvbiA9ICdwcmltYXJ5JyB8ICdzZWNvbmRhcnknXG5cbmV4cG9ydCB0eXBlIE1vZGFsQWN0aW9uUHJvcHMgPSB7XG4gIGFjdGlvblZhcmlhdGlvbj86I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c3QgfSkgPT4ge1xuICByZXR1cm4gKFxuICAgIDxCdXR0b25cbiAgICAgIHZhcmlhdGlvbj1cInRleHRcIlxuICAgICAgdHlwZT1cImJ1dHRvblwiXG4gICAgICBjc3M9e2Nzc2BcbiAgICAgICAgJHt0eXBvZ3JhcGh5LmFjdGlvbn07XG4gICAgICAgIGZsZXg6IGF1dG87XG4gICAgICAgIGZsZXgtYmFzaXM6IGF1dG87XG4gICAgICAgIGZsZXgtZ3JvdzogMDtcbiAgICAgICAgbWFyZ2luLWxlZnQ6ICR7dGhlbWUuc3BhY2luZy54c307XG4gICAgICAgIHBhZGRpbmc6IDAgJHt0aGVtZS5zcGFjaW5nLnhzfTtcbiAgICAgICAgJHtnZXRWYXJpYXRpb25TdHlsZShhY3Rpb25WYXJpYXRpb24pfVxuICAgICAgYH1cbiAgICAgIHsuLi5yZXN0fVxuICAgIC8+XG4gIClcbn1cblxuZXhwb3J0IGRlZmF1bHQgTW9kYWxBY3Rpb25cbiJdfQ== */");
|
|
@@ -24,7 +19,7 @@ export var ModalAction = function ModalAction(_ref) {
|
|
|
24
19
|
var _ref$actionVariation = _ref.actionVariation,
|
|
25
20
|
actionVariation = _ref$actionVariation === void 0 ? 'primary' : _ref$actionVariation,
|
|
26
21
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
27
|
-
return
|
|
22
|
+
return ___EmotionJSX(Button, _extends({
|
|
28
23
|
variation: "text",
|
|
29
24
|
type: "button",
|
|
30
25
|
css: /*#__PURE__*/css(typography.action, ";flex:auto;flex-basis:auto;flex-grow:0;margin-left:", theme.spacing.xs, ";padding:0 ", theme.spacing.xs, ";", getVariationStyle(actionVariation), ";" + (process.env.NODE_ENV === "production" ? "" : ";label:ModalAction;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9tb2RhbC9Nb2RhbEFjdGlvbi50c3giXSwibmFt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b3J0IGRlZmF1bHQgTW9kYWxBY3Rpb25cbiJdfQ== */")
|
|
@@ -1,28 +1,19 @@
|
|
|
1
1
|
var _excluded = ["actions"];
|
|
2
|
-
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); }
|
|
3
2
|
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; }
|
|
4
3
|
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
|
-
function
|
|
6
|
-
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; }
|
|
7
|
-
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; }
|
|
8
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
9
|
-
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); }
|
|
4
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
10
5
|
import React from 'react';
|
|
11
6
|
import { theme } from '@dfds-ui/theme';
|
|
12
7
|
import { css } from '@emotion/react';
|
|
13
|
-
import { jsx as
|
|
8
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
14
9
|
var ModalAction = function ModalAction(props) {
|
|
15
|
-
return
|
|
16
|
-
css: /*#__PURE__*/css("display:flex;flex-wrap:nowrap;justify-content:flex-end;flex-grow:1;padding-top:", theme.spacing.s, ";padding-bottom:", theme.spacing.s, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:ModalAction;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
10
|
+
return ___EmotionJSX("div", _extends({
|
|
11
|
+
css: /*#__PURE__*/css("display:flex;flex-wrap:nowrap;justify-content:flex-end;flex-grow:1;padding-top:", theme.spacing.s, ";padding-bottom:", theme.spacing.s, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:ModalAction;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9tb2RhbC9Nb2RhbEFjdGlvbnNDb250YWluZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNjIiwiZmlsZSI6Ii4uLy4uL3NyYy9tb2RhbC9Nb2RhbEFjdGlvbnNDb250YWluZXIudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0J1xuaW1wb3J0IHsgdGhlbWUgfSBmcm9tICdAZ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|
|
19
14
|
var ModalActionsContainer = function ModalActionsContainer(_ref) {
|
|
20
15
|
var actions = _ref.actions,
|
|
21
16
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
22
|
-
return
|
|
23
|
-
children: actions && _jsx(ModalAction, {
|
|
24
|
-
children: actions
|
|
25
|
-
})
|
|
26
|
-
}));
|
|
17
|
+
return ___EmotionJSX("div", rest, actions && ___EmotionJSX(ModalAction, null, actions));
|
|
27
18
|
};
|
|
28
19
|
export default ModalActionsContainer;
|
package/modal/ModalBody.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare type ModalBodyProps = {
|
|
2
3
|
hasPadding?: boolean;
|
|
3
4
|
column?: boolean;
|
|
4
5
|
};
|
|
5
6
|
export declare const ModalBody: import("@emotion/styled").StyledComponent<{
|
|
6
|
-
theme?: import("@emotion/react").Theme;
|
|
7
|
-
as?:
|
|
7
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
+
as?: import("react").ElementType<any> | undefined;
|
|
8
9
|
} & ModalBodyProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
9
10
|
export default ModalBody;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IconButtonSize } from '@dfds-ui/react-components';
|
|
3
|
-
export type ModalCloseButtonProps = {
|
|
3
|
+
export declare type ModalCloseButtonProps = {
|
|
4
4
|
onRequestClose?: () => void;
|
|
5
5
|
className?: string;
|
|
6
6
|
icon?: React.ElementType;
|
|
@@ -9,5 +9,5 @@ export type ModalCloseButtonProps = {
|
|
|
9
9
|
closeLabel?: string;
|
|
10
10
|
children?: React.ReactNode;
|
|
11
11
|
};
|
|
12
|
-
export declare const ModalCloseButton: ({ onRequestClose, className, icon, size, closeLabel, ...rest }: ModalCloseButtonProps) =>
|
|
12
|
+
export declare const ModalCloseButton: ({ onRequestClose, className, icon, size, closeLabel, ...rest }: ModalCloseButtonProps) => JSX.Element;
|
|
13
13
|
export default ModalCloseButton;
|
|
@@ -1,10 +1,5 @@
|
|
|
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); }
|
|
2
1
|
var _excluded = ["onRequestClose", "className", "icon", "size", "closeLabel"];
|
|
3
|
-
function
|
|
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); }
|
|
2
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
8
3
|
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
4
|
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; }
|
|
10
5
|
import React from 'react';
|
|
@@ -12,7 +7,7 @@ import { IconButton } from '@dfds-ui/react-components';
|
|
|
12
7
|
import { Close } from '@dfds-ui/icons/system';
|
|
13
8
|
import { css } from '@emotion/react';
|
|
14
9
|
import { theme } from '@dfds-ui/theme';
|
|
15
|
-
import { jsx as
|
|
10
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
16
11
|
export var ModalCloseButton = function ModalCloseButton(_ref) {
|
|
17
12
|
var onRequestClose = _ref.onRequestClose,
|
|
18
13
|
className = _ref.className,
|
|
@@ -23,7 +18,7 @@ export var ModalCloseButton = function ModalCloseButton(_ref) {
|
|
|
23
18
|
_ref$closeLabel = _ref.closeLabel,
|
|
24
19
|
closeLabel = _ref$closeLabel === void 0 ? 'Close' : _ref$closeLabel,
|
|
25
20
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
26
|
-
return
|
|
21
|
+
return ___EmotionJSX(IconButton, _extends({
|
|
27
22
|
disableOverlay: true,
|
|
28
23
|
disableTooltip: true,
|
|
29
24
|
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 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 = {
|
|
3
|
+
export declare type ModalVariation = 'default' | 'fullscreen';
|
|
4
|
+
export declare type ModalSizes = Record<keyof typeof theme.breakpoints, string>;
|
|
5
|
+
export declare type Backdrop = keyof typeof backdropsTransparent;
|
|
6
|
+
export declare type BackdropVariant = 'transparent' | 'solid';
|
|
7
|
+
export declare type ModalDialogProps = {
|
|
8
8
|
isOpen: boolean;
|
|
9
9
|
onRequestClose?: () => void;
|
|
10
10
|
shouldCloseOnOverlayClick?: boolean;
|
|
@@ -35,8 +35,8 @@ export declare const defaultProps: {
|
|
|
35
35
|
};
|
|
36
36
|
zIndex: number;
|
|
37
37
|
renderWhenClosed: boolean;
|
|
38
|
-
backdrop:
|
|
38
|
+
backdrop: "lowEmphasis" | "mediumEmphasis" | "highEmphasis";
|
|
39
39
|
backdropVariant: BackdropVariant;
|
|
40
40
|
};
|
|
41
|
-
declare const ModalDialog: ({ isOpen, onRequestClose, shouldCloseOnOverlayClick, shouldCloseOnEsc, variation, zIndex, className, sizes, fixedTopPosition, renderWhenClosed, backdrop, backdropVariant, children, ...rest }: ModalDialogProps) =>
|
|
41
|
+
declare const ModalDialog: ({ isOpen, onRequestClose, shouldCloseOnOverlayClick, shouldCloseOnEsc, variation, zIndex, className, sizes, fixedTopPosition, renderWhenClosed, backdrop, backdropVariant, children, ...rest }: ModalDialogProps) => JSX.Element | null;
|
|
42
42
|
export default ModalDialog;
|