@dfds-ui/modal 2.0.29-alpha.fae844df → 2.2.0-alpha.4e495871
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 +1 -1
- package/cjs/modal/Modal.js +22 -33
- package/cjs/modal/ModalAction.d.ts +2 -2
- package/cjs/modal/ModalAction.js +6 -9
- package/cjs/modal/ModalActionsContainer.d.ts +1 -1
- package/cjs/modal/ModalActionsContainer.js +6 -8
- package/cjs/modal/ModalBody.d.ts +1 -1
- package/cjs/modal/ModalBody.js +1 -1
- package/cjs/modal/ModalCloseButton.d.ts +1 -1
- package/cjs/modal/ModalCloseButton.js +10 -15
- package/cjs/modal/ModalDialog.d.ts +5 -5
- package/cjs/modal/ModalDialog.js +35 -55
- package/cjs/modal/ModalFooter.d.ts +1 -1
- package/cjs/modal/ModalFooter.js +8 -10
- package/cjs/modal/ModalHeader.d.ts +1 -1
- package/cjs/modal/ModalHeader.js +10 -12
- package/cjs/modal/ModalHeadline.d.ts +1 -1
- package/cjs/modal/ModalHeadline.js +1 -1
- package/cjs/modal/ModalPanel.d.ts +4 -4
- package/cjs/modal/ModalPanel.js +1 -1
- package/cjs/modal/ReactModalWrapper.d.ts +1 -1
- package/cjs/modal/ReactModalWrapper.js +6 -8
- package/cjs/modal/index.js +14 -13
- package/modal/Modal.d.ts +1 -1
- package/modal/Modal.js +3 -3
- package/modal/ModalAction.d.ts +2 -2
- package/modal/ModalAction.js +3 -3
- package/modal/ModalActionsContainer.d.ts +1 -1
- package/modal/ModalActionsContainer.js +3 -3
- package/modal/ModalBody.d.ts +1 -1
- package/modal/ModalCloseButton.d.ts +1 -1
- package/modal/ModalCloseButton.js +3 -3
- package/modal/ModalDialog.d.ts +5 -5
- package/modal/ModalDialog.js +11 -11
- package/modal/ModalFooter.d.ts +1 -1
- package/modal/ModalFooter.js +3 -3
- package/modal/ModalHeader.d.ts +1 -1
- package/modal/ModalHeader.js +3 -3
- package/modal/ModalHeadline.d.ts +1 -1
- package/modal/ModalPanel.d.ts +4 -4
- package/modal/ReactModalWrapper.d.ts +1 -1
- package/modal/ReactModalWrapper.js +3 -3
- package/package.json +7 -7
package/cjs/modal/ModalFooter.js
CHANGED
|
@@ -7,17 +7,15 @@ exports.default = exports.ModalFooter = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _react2 = require("@emotion/react");
|
|
9
9
|
var _reactComponents = require("@dfds-ui/react-components");
|
|
10
|
-
|
|
11
|
-
function
|
|
12
|
-
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); }
|
|
13
|
-
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; }
|
|
14
|
-
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
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15
12
|
const stickyStyles = /*#__PURE__*/(0, _react2.css)(_reactComponents.legacyMedia.lt('md'), "{position:sticky;bottom:0;left:0;right:0;}" + (process.env.NODE_ENV === "production" ? "" : ";label:stickyStyles;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9tb2RhbC9Nb2RhbEZvb3Rlci50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBVXdCIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy9tb2RhbC9Nb2RhbEZvb3Rlci50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QsIHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcbmltcG9ydCB7IGxlZ2FjeU1lZGlhIGFzIG1lZGlhIH0gZnJvbSAnQGRmZHMtdWkvcmVhY3QtY29tcG9uZW50cydcblxuZXhwb3J0IHR5cGUgTW9kYWxGb290ZXJQcm9wcyA9IHtcbiAgY2xhc3NOYW1lPzogc3RyaW5nXG4gIHN0aWNreT86IGJvb2xlYW5cbiAgY2hpbGRyZW4/OiBSZWFjdE5vZGVcbn1cblxuY29uc3Qgc3RpY2t5U3R5bGVzID0gY3NzYFxuICAke21lZGlhLmx0KCdtZCcpfSB7XG4gICAgcG9zaXRpb246IHN0aWNreTtcbiAgICBib3R0b206IDA7XG4gICAgbGVmdDogMDtcbiAgICByaWdodDogMDtcbiAgfVxuYFxuXG5leHBvcnQgY29uc3QgTW9kYWxGb290ZXIgPSAoeyBjaGlsZHJlbiwgY2xhc3NOYW1lLCBzdGlja3ksIC4uLnJlc3QgfTogTW9kYWxGb290ZXJQcm9wcykgPT4ge1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIGNsYXNzTmFtZT17Y2xhc3NOYW1lfVxuICAgICAgY3NzPXtjc3NgXG4gICAgICAgIGJhY2tncm91bmQtY29sb3I6IGJsdWU7XG4gICAgICAgICR7c3RpY2t5ICYmIHN0aWNreVN0eWxlc307XG4gICAgICBgfVxuICAgICAgey4uLnJlc3R9XG4gICAgPlxuICAgICAge2NoaWxkcmVufVxuICAgIDwvZGl2PlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IE1vZGFsRm9vdGVyXG4iXX0= */");
|
|
16
|
-
const ModalFooter =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
const ModalFooter = ({
|
|
14
|
+
children,
|
|
15
|
+
className,
|
|
16
|
+
sticky,
|
|
17
|
+
...rest
|
|
18
|
+
}) => {
|
|
21
19
|
return (0, _react2.jsx)("div", _extends({
|
|
22
20
|
className: className,
|
|
23
21
|
css: /*#__PURE__*/(0, _react2.css)("background-color:blue;", sticky && stickyStyles, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:ModalFooter;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9tb2RhbC9Nb2RhbEZvb3Rlci50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBdUJjIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy9tb2RhbC9Nb2RhbEZvb3Rlci50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QsIHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcbmltcG9ydCB7IGxlZ2FjeU1lZGlhIGFzIG1lZGlhIH0gZnJvbSAnQGRmZHMtdWkvcmVhY3QtY29tcG9uZW50cydcblxuZXhwb3J0IHR5cGUgTW9kYWxGb290ZXJQcm9wcyA9IHtcbiAgY2xhc3NOYW1lPzogc3RyaW5nXG4gIHN0aWNreT86IGJvb2xlYW5cbiAgY2hpbGRyZW4/OiBSZWFjdE5vZGVcbn1cblxuY29uc3Qgc3RpY2t5U3R5bGVzID0gY3NzYFxuICAke21lZGlhLmx0KCdtZCcpfSB7XG4gICAgcG9zaXRpb246IHN0aWNreTtcbiAgICBib3R0b206IDA7XG4gICAgbGVmdDogMDtcbiAgICByaWdodDogMDtcbiAgfVxuYFxuXG5leHBvcnQgY29uc3QgTW9kYWxGb290ZXIgPSAoeyBjaGlsZHJlbiwgY2xhc3NOYW1lLCBzdGlja3ksIC4uLnJlc3QgfTogTW9kYWxGb290ZXJQcm9wcykgPT4ge1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIGNsYXNzTmFtZT17Y2xhc3NOYW1lfVxuICAgICAgY3NzPXtjc3NgXG4gICAgICAgIGJhY2tncm91bmQtY29sb3I6IGJsdWU7XG4gICAgICAgICR7c3RpY2t5ICYmIHN0aWNreVN0eWxlc307XG4gICAgICBgfVxuICAgICAgey4uLnJlc3R9XG4gICAgPlxuICAgICAge2NoaWxkcmVufVxuICAgIDwvZGl2PlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IE1vZGFsRm9vdGVyXG4iXX0= */")
|
package/cjs/modal/ModalHeader.js
CHANGED
|
@@ -9,19 +9,17 @@ var _react2 = require("@emotion/react");
|
|
|
9
9
|
var _theme = require("@dfds-ui/theme");
|
|
10
10
|
var _reactComponents = require("@dfds-ui/react-components");
|
|
11
11
|
var _divider = require("@dfds-ui/react-components/divider");
|
|
12
|
-
|
|
13
|
-
function _interopRequireWildcard(e,
|
|
14
|
-
function _extends() {
|
|
15
|
-
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; }
|
|
16
|
-
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; }
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
15
|
const stickyStyles = /*#__PURE__*/(0, _react2.css)(_reactComponents.legacyMedia.lt('md'), "{position:sticky;top:0;left:0;right:0;}" + (process.env.NODE_ENV === "production" ? "" : ";label:stickyStyles;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9tb2RhbC9Nb2RhbEhlYWRlci50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBYXdCIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy9tb2RhbC9Nb2RhbEhlYWRlci50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QsIHsgUmVhY3ROb2RlLCBGcmFnbWVudCB9IGZyb20gJ3JlYWN0J1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXG5pbXBvcnQgeyB0aGVtZS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W1lLmNvbG9ycy5zdXJmYWNlLnByaW1hcnl9O1xuICAgICAgICAgICR7c3RpY2t5ICYmIHN0aWNreVN0eWxlc307XG4gICAgICAgIGB9XG4gICAgICAgIHsuLi5yZXN0fVxuICAgICAgPlxuICAgICAgICB7Y2hpbGRyZW59XG4gICAgICA8L2Rpdj5cbiAgICAgIHshbm9EaXZpZGVyICYmIDxEaXZpZGVyIC8+fVxuICAgIDwvRnJhZ21lbnQ+XG4gIClcbn1cblxuZXhwb3J0IGRlZmF1bHQgTW9kYWxIZWFkZXJcbiJdfQ== */");
|
|
18
|
-
const ModalHeader =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
const ModalHeader = ({
|
|
17
|
+
children,
|
|
18
|
+
className,
|
|
19
|
+
sticky,
|
|
20
|
+
noDivider = false,
|
|
21
|
+
...rest
|
|
22
|
+
}) => {
|
|
25
23
|
return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)("div", _extends({
|
|
26
24
|
className: className,
|
|
27
25
|
css: /*#__PURE__*/(0, _react2.css)("min-height:3rem;display:flex;align-items:center;justify-content:space-between;padding-left:", _theme.theme.spacing.s, ";background-color:", _theme.theme.colors.surface.primary, ";", sticky && stickyStyles, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:ModalHeader;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9tb2RhbC9Nb2RhbEhlYWRlci50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBMkJnQiIsImZpbGUiOiIuLi8uLi8uLi9zcmMvbW9kYWwvTW9kYWxIZWFkZXIudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0LCB7IFJlYWN0Tm9kZSwgRnJhZ21lbnQgfSBmcm9tICdyZWFjdCdcb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ke3RoZW1lLnNwYWNpbmcuc307XG4gICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogJHt0aGVtZS5jb2xvcnMuc3VyZmFjZS5wcmltYXJ5fTtcbiAgICAgICAgICAke3N0aWNreSAmJiBzdGlja3lTdHlsZXN9O1xuICAgICAgICBgfVxuICAgICAgICB7Li4ucmVzdH1cbiAgICAgID5cbiAgICAgICAge2NoaWxkcmVufVxuICAgICAgPC9kaXY+XG4gICAgICB7IW5vRGl2aWRlciAmJiA8RGl2aWRlciAvPn1cbiAgICA8L0ZyYWdtZW50PlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IE1vZGFsSGVhZGVyXG4iXX0= */")
|
|
@@ -8,7 +8,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
8
8
|
var _reactComponents = require("@dfds-ui/react-components");
|
|
9
9
|
var _react2 = require("@emotion/react");
|
|
10
10
|
var _theme = require("@dfds-ui/theme");
|
|
11
|
-
function _interopRequireDefault(
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
12
|
const ModalHeadline = ({
|
|
13
13
|
className,
|
|
14
14
|
children
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type ModalPanelProps = {
|
|
3
3
|
/**
|
|
4
4
|
* Determines if the modal should be shown or not.
|
|
5
5
|
*/
|
|
@@ -23,7 +23,7 @@ export declare type ModalPanelProps = {
|
|
|
23
23
|
children?: ReactNode;
|
|
24
24
|
};
|
|
25
25
|
export declare const ModalPanel: ({ isOpen, shouldCloseOnEsc, onRequestClose, zIndex, className, children, }: ModalPanelProps) => JSX.Element;
|
|
26
|
-
export
|
|
26
|
+
export type ModalPanelHeaderProps = {
|
|
27
27
|
/**
|
|
28
28
|
* className to be assigned to component
|
|
29
29
|
*/
|
|
@@ -31,7 +31,7 @@ export declare type ModalPanelHeaderProps = {
|
|
|
31
31
|
children: ReactNode;
|
|
32
32
|
};
|
|
33
33
|
export declare const ModalPanelHeader: ({ className, children }: ModalPanelHeaderProps) => JSX.Element;
|
|
34
|
-
export
|
|
34
|
+
export type ModalPanelContent = {
|
|
35
35
|
/**
|
|
36
36
|
* className to be assigned to component
|
|
37
37
|
*/
|
|
@@ -39,7 +39,7 @@ export declare type ModalPanelContent = {
|
|
|
39
39
|
children: ReactNode;
|
|
40
40
|
};
|
|
41
41
|
export declare const ModalPanelContent: ({ className, children }: ModalPanelContent) => JSX.Element;
|
|
42
|
-
export
|
|
42
|
+
export type ModalPanelFooterProps = {
|
|
43
43
|
/**
|
|
44
44
|
* className to be assigned to component
|
|
45
45
|
*/
|
package/cjs/modal/ModalPanel.js
CHANGED
|
@@ -9,7 +9,7 @@ var _react2 = require("@emotion/react");
|
|
|
9
9
|
var _ReactModalWrapper = require("./ReactModalWrapper");
|
|
10
10
|
var _reactComponents = require("@dfds-ui/react-components");
|
|
11
11
|
var _theme = require("@dfds-ui/theme");
|
|
12
|
-
function _interopRequireDefault(
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
14
14
|
const modalPanelStyles = ({
|
|
15
15
|
zIndex
|
|
@@ -7,14 +7,12 @@ exports.ReactModalWrapper = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _reactModal = _interopRequireDefault(require("react-modal"));
|
|
9
9
|
var _react2 = require("@emotion/react");
|
|
10
|
-
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
let className = _ref.className,
|
|
17
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
12
|
+
const ReactModalWrapper = ({
|
|
13
|
+
className,
|
|
14
|
+
...rest
|
|
15
|
+
}) => {
|
|
18
16
|
const classArr = className ? className.split(' ') : ['__modal'];
|
|
19
17
|
const append = str => classArr.join(str + ' ') + str;
|
|
20
18
|
return (0, _react2.jsx)(_reactModal.default, _extends({
|
package/cjs/modal/index.js
CHANGED
|
@@ -10,19 +10,19 @@ var _exportNames = {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "ModalAction", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function
|
|
13
|
+
get: function () {
|
|
14
14
|
return _ModalAction.default;
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "ModalActionsContainer", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function
|
|
19
|
+
get: function () {
|
|
20
20
|
return _ModalActionsContainer.default;
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "ModalDialog", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function
|
|
25
|
+
get: function () {
|
|
26
26
|
return _ModalDialog.default;
|
|
27
27
|
}
|
|
28
28
|
});
|
|
@@ -33,7 +33,7 @@ Object.keys(_Modal).forEach(function (key) {
|
|
|
33
33
|
if (key in exports && exports[key] === _Modal[key]) return;
|
|
34
34
|
Object.defineProperty(exports, key, {
|
|
35
35
|
enumerable: true,
|
|
36
|
-
get: function
|
|
36
|
+
get: function () {
|
|
37
37
|
return _Modal[key];
|
|
38
38
|
}
|
|
39
39
|
});
|
|
@@ -45,7 +45,7 @@ Object.keys(_ModalDialog).forEach(function (key) {
|
|
|
45
45
|
if (key in exports && exports[key] === _ModalDialog[key]) return;
|
|
46
46
|
Object.defineProperty(exports, key, {
|
|
47
47
|
enumerable: true,
|
|
48
|
-
get: function
|
|
48
|
+
get: function () {
|
|
49
49
|
return _ModalDialog[key];
|
|
50
50
|
}
|
|
51
51
|
});
|
|
@@ -57,7 +57,7 @@ Object.keys(_ModalCloseButton).forEach(function (key) {
|
|
|
57
57
|
if (key in exports && exports[key] === _ModalCloseButton[key]) return;
|
|
58
58
|
Object.defineProperty(exports, key, {
|
|
59
59
|
enumerable: true,
|
|
60
|
-
get: function
|
|
60
|
+
get: function () {
|
|
61
61
|
return _ModalCloseButton[key];
|
|
62
62
|
}
|
|
63
63
|
});
|
|
@@ -69,7 +69,7 @@ Object.keys(_ModalHeader).forEach(function (key) {
|
|
|
69
69
|
if (key in exports && exports[key] === _ModalHeader[key]) return;
|
|
70
70
|
Object.defineProperty(exports, key, {
|
|
71
71
|
enumerable: true,
|
|
72
|
-
get: function
|
|
72
|
+
get: function () {
|
|
73
73
|
return _ModalHeader[key];
|
|
74
74
|
}
|
|
75
75
|
});
|
|
@@ -81,7 +81,7 @@ Object.keys(_ModalFooter).forEach(function (key) {
|
|
|
81
81
|
if (key in exports && exports[key] === _ModalFooter[key]) return;
|
|
82
82
|
Object.defineProperty(exports, key, {
|
|
83
83
|
enumerable: true,
|
|
84
|
-
get: function
|
|
84
|
+
get: function () {
|
|
85
85
|
return _ModalFooter[key];
|
|
86
86
|
}
|
|
87
87
|
});
|
|
@@ -93,7 +93,7 @@ Object.keys(_ModalBody).forEach(function (key) {
|
|
|
93
93
|
if (key in exports && exports[key] === _ModalBody[key]) return;
|
|
94
94
|
Object.defineProperty(exports, key, {
|
|
95
95
|
enumerable: true,
|
|
96
|
-
get: function
|
|
96
|
+
get: function () {
|
|
97
97
|
return _ModalBody[key];
|
|
98
98
|
}
|
|
99
99
|
});
|
|
@@ -105,7 +105,7 @@ Object.keys(_ModalHeadline).forEach(function (key) {
|
|
|
105
105
|
if (key in exports && exports[key] === _ModalHeadline[key]) return;
|
|
106
106
|
Object.defineProperty(exports, key, {
|
|
107
107
|
enumerable: true,
|
|
108
|
-
get: function
|
|
108
|
+
get: function () {
|
|
109
109
|
return _ModalHeadline[key];
|
|
110
110
|
}
|
|
111
111
|
});
|
|
@@ -119,10 +119,11 @@ Object.keys(_ModalPanel).forEach(function (key) {
|
|
|
119
119
|
if (key in exports && exports[key] === _ModalPanel[key]) return;
|
|
120
120
|
Object.defineProperty(exports, key, {
|
|
121
121
|
enumerable: true,
|
|
122
|
-
get: function
|
|
122
|
+
get: function () {
|
|
123
123
|
return _ModalPanel[key];
|
|
124
124
|
}
|
|
125
125
|
});
|
|
126
126
|
});
|
|
127
|
-
function _interopRequireDefault(
|
|
128
|
-
function
|
|
127
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
128
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
129
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
package/modal/Modal.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ModalSizes, ModalVariation, Backdrop, BackdropVariant } from './ModalDialog';
|
|
3
|
-
export
|
|
3
|
+
export type ModalProps = React.PropsWithChildren<{
|
|
4
4
|
/**
|
|
5
5
|
* If set to `true` the modal is shown
|
|
6
6
|
*/
|
package/modal/Modal.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["showClose", "heading", "headerClassName", "noContentPadding", "onRequestClose", "children", "closeTabIndex", "closeLabel", "column", "zIndex", "sizes", "renderWhenClosed", "backdrop", "backdropVariant", "actions"];
|
|
2
|
-
function _extends() {
|
|
3
|
-
function _objectWithoutProperties(
|
|
4
|
-
function _objectWithoutPropertiesLoose(
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import ModalHeader from './ModalHeader';
|
|
7
7
|
import ModalCloseButton from './ModalCloseButton';
|
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
|
|
4
|
-
export
|
|
3
|
+
export type ModalActionVariation = 'primary' | 'secondary';
|
|
4
|
+
export type ModalActionProps = {
|
|
5
5
|
actionVariation?: ModalActionVariation;
|
|
6
6
|
onClick?: () => void;
|
|
7
7
|
/**
|
package/modal/ModalAction.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["actionVariation"];
|
|
2
|
-
function _extends() {
|
|
3
|
-
function _objectWithoutProperties(
|
|
4
|
-
function _objectWithoutPropertiesLoose(
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { css } from '@emotion/react';
|
|
7
7
|
import { theme } from '@dfds-ui/theme';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["actions"];
|
|
2
|
-
function _objectWithoutProperties(
|
|
3
|
-
function _objectWithoutPropertiesLoose(
|
|
4
|
-
function _extends() {
|
|
2
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
3
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
4
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { theme } from '@dfds-ui/theme';
|
|
7
7
|
import { css } from '@emotion/react';
|
package/modal/ModalBody.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["onRequestClose", "className", "icon", "size", "closeLabel"];
|
|
2
|
-
function _extends() {
|
|
3
|
-
function _objectWithoutProperties(
|
|
4
|
-
function _objectWithoutPropertiesLoose(
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { IconButton } from '@dfds-ui/react-components';
|
|
7
7
|
import { Close } from '@dfds-ui/icons/system';
|
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;
|