@dfds-ui/modal 2.2.0-alpha.e74a6756 → 2.2.0-alpha.eac8b0de
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 +7 -3
- package/cjs/modal/Modal.js +24 -21
- package/cjs/modal/ModalAction.js +7 -7
- package/cjs/modal/ModalActionsContainer.js +13 -8
- package/cjs/modal/ModalBody.d.ts +2 -3
- package/cjs/modal/ModalBody.js +3 -5
- package/cjs/modal/ModalCloseButton.d.ts +1 -1
- package/cjs/modal/ModalCloseButton.js +7 -7
- package/cjs/modal/ModalDialog.d.ts +2 -2
- package/cjs/modal/ModalDialog.js +37 -37
- package/cjs/modal/ModalFooter.d.ts +2 -2
- package/cjs/modal/ModalFooter.js +8 -7
- package/cjs/modal/ModalHeader.d.ts +2 -2
- package/cjs/modal/ModalHeader.js +11 -9
- package/cjs/modal/ModalHeadline.d.ts +2 -2
- package/cjs/modal/ModalHeadline.js +7 -6
- package/cjs/modal/ModalPanel.d.ts +5 -5
- package/cjs/modal/ModalPanel.js +33 -29
- package/cjs/modal/ReactModalWrapper.d.ts +1 -1
- package/cjs/modal/ReactModalWrapper.js +6 -6
- package/cjs/modal/index.js +2 -3
- package/modal/Modal.d.ts +7 -3
- package/modal/Modal.js +27 -16
- package/modal/ModalAction.js +10 -5
- package/modal/ModalActionsContainer.js +16 -7
- package/modal/ModalBody.d.ts +2 -3
- package/modal/ModalCloseButton.d.ts +1 -1
- package/modal/ModalCloseButton.js +10 -5
- package/modal/ModalDialog.d.ts +2 -2
- package/modal/ModalDialog.js +38 -37
- package/modal/ModalFooter.d.ts +2 -2
- package/modal/ModalFooter.js +13 -6
- package/modal/ModalHeader.d.ts +2 -2
- package/modal/ModalHeader.js +17 -8
- package/modal/ModalHeadline.d.ts +2 -2
- package/modal/ModalHeadline.js +5 -4
- package/modal/ModalPanel.d.ts +5 -5
- package/modal/ModalPanel.js +32 -29
- package/modal/ReactModalWrapper.d.ts +1 -1
- package/modal/ReactModalWrapper.js +10 -5
- package/package.json +12 -12
|
@@ -1,19 +1,28 @@
|
|
|
1
1
|
var _excluded = ["actions"];
|
|
2
|
-
function
|
|
3
|
-
function
|
|
4
|
-
function
|
|
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
|
+
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
|
+
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 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; }
|
|
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); }
|
|
5
10
|
import React from 'react';
|
|
6
11
|
import { theme } from '@dfds-ui/theme';
|
|
7
12
|
import { css } from '@emotion/react';
|
|
8
|
-
import { jsx as
|
|
13
|
+
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
9
14
|
var ModalAction = function ModalAction(props) {
|
|
10
|
-
return
|
|
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,
|
|
15
|
+
return _jsx("div", _objectSpread({
|
|
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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9tb2RhbC9Nb2RhbEFjdGlvbnNDb250YWluZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNjIiwiZmlsZSI6Ii4uLy4uL3NyYy9tb2RhbC9Nb2RhbEFjdGlvbnNDb250YWluZXIudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0J1xuaW1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b2RhbEFjdGlvbnNDb250YWluZXJcbiJdfQ== */")
|
|
12
17
|
}, props));
|
|
13
18
|
};
|
|
14
19
|
var ModalActionsContainer = function ModalActionsContainer(_ref) {
|
|
15
20
|
var actions = _ref.actions,
|
|
16
21
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
-
return
|
|
22
|
+
return _jsx("div", _objectSpread(_objectSpread({}, rest), {}, {
|
|
23
|
+
children: actions && _jsx(ModalAction, {
|
|
24
|
+
children: actions
|
|
25
|
+
})
|
|
26
|
+
}));
|
|
18
27
|
};
|
|
19
28
|
export default ModalActionsContainer;
|
package/modal/ModalBody.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export type ModalBodyProps = {
|
|
3
2
|
hasPadding?: boolean;
|
|
4
3
|
column?: boolean;
|
|
5
4
|
};
|
|
6
5
|
export declare const ModalBody: import("@emotion/styled").StyledComponent<{
|
|
7
|
-
theme?: import("@emotion/react").Theme
|
|
8
|
-
as?:
|
|
6
|
+
theme?: import("@emotion/react").Theme;
|
|
7
|
+
as?: React.ElementType;
|
|
9
8
|
} & ModalBodyProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
9
|
export default ModalBody;
|
|
@@ -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) => JSX.Element;
|
|
12
|
+
export declare const ModalCloseButton: ({ onRequestClose, className, icon, size, closeLabel, ...rest }: ModalCloseButtonProps) => React.JSX.Element;
|
|
13
13
|
export default ModalCloseButton;
|
|
@@ -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
|
@@ -35,8 +35,8 @@ 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
|
-
declare const ModalDialog: ({ isOpen, onRequestClose, shouldCloseOnOverlayClick, shouldCloseOnEsc, variation, zIndex, className, sizes, fixedTopPosition, renderWhenClosed, backdrop, backdropVariant, children, ...rest }: ModalDialogProps) => JSX.Element | null;
|
|
41
|
+
declare const ModalDialog: ({ isOpen, onRequestClose, shouldCloseOnOverlayClick, shouldCloseOnEsc, variation, zIndex, className, sizes, fixedTopPosition, renderWhenClosed, backdrop, backdropVariant, children, ...rest }: ModalDialogProps) => React.JSX.Element | null;
|
|
42
42
|
export default ModalDialog;
|