@dfds-ui/modal 2.0.29 → 2.2.0-alpha.8d87a90d
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/package.json +7 -7
- package/cjs/index.d.ts +0 -1
- package/cjs/index.js +0 -16
- package/cjs/modal/Modal.d.ts +0 -93
- package/cjs/modal/Modal.js +0 -71
- package/cjs/modal/ModalAction.d.ts +0 -17
- package/cjs/modal/ModalAction.js +0 -36
- package/cjs/modal/ModalActionsContainer.d.ts +0 -9
- package/cjs/modal/ModalActionsContainer.js +0 -26
- package/cjs/modal/ModalBody.d.ts +0 -10
- package/cjs/modal/ModalBody.js +0 -23
- package/cjs/modal/ModalCloseButton.d.ts +0 -13
- package/cjs/modal/ModalCloseButton.js +0 -43
- package/cjs/modal/ModalDialog.d.ts +0 -42
- package/cjs/modal/ModalDialog.js +0 -234
- package/cjs/modal/ModalFooter.d.ts +0 -8
- package/cjs/modal/ModalFooter.js +0 -28
- package/cjs/modal/ModalHeader.d.ts +0 -9
- package/cjs/modal/ModalHeader.js +0 -33
- package/cjs/modal/ModalHeadline.d.ts +0 -7
- package/cjs/modal/ModalHeadline.js +0 -23
- package/cjs/modal/ModalPanel.d.ts +0 -49
- package/cjs/modal/ModalPanel.js +0 -99
- package/cjs/modal/ReactModalWrapper.d.ts +0 -7
- package/cjs/modal/ReactModalWrapper.js +0 -35
- package/cjs/modal/index.d.ts +0 -11
- package/cjs/modal/index.js +0 -129
- package/index.d.ts +0 -1
- package/index.js +0 -1
- package/modal/Modal.d.ts +0 -93
- package/modal/Modal.js +0 -60
- package/modal/ModalAction.d.ts +0 -17
- package/modal/ModalAction.js +0 -28
- package/modal/ModalActionsContainer.d.ts +0 -9
- package/modal/ModalActionsContainer.js +0 -19
- package/modal/ModalBody.d.ts +0 -10
- package/modal/ModalBody.js +0 -15
- package/modal/ModalCloseButton.d.ts +0 -13
- package/modal/ModalCloseButton.js +0 -35
- package/modal/ModalDialog.d.ts +0 -42
- package/modal/ModalDialog.js +0 -199
- package/modal/ModalFooter.d.ts +0 -8
- package/modal/ModalFooter.js +0 -20
- package/modal/ModalHeader.d.ts +0 -9
- package/modal/ModalHeader.js +0 -24
- package/modal/ModalHeadline.d.ts +0 -7
- package/modal/ModalHeadline.js +0 -14
- package/modal/ModalPanel.d.ts +0 -49
- package/modal/ModalPanel.js +0 -85
- package/modal/ReactModalWrapper.d.ts +0 -7
- package/modal/ReactModalWrapper.js +0 -29
- package/modal/index.d.ts +0 -11
- package/modal/index.js +0 -11
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
var _excluded = ["actions"];
|
|
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
|
-
import React from 'react';
|
|
6
|
-
import { theme } from '@dfds-ui/theme';
|
|
7
|
-
import { css } from '@emotion/react';
|
|
8
|
-
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
9
|
-
var ModalAction = function ModalAction(props) {
|
|
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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9tb2RhbC9Nb2RhbEFjdGlvbnNDb250YWluZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNjIiwiZmlsZSI6Ii4uLy4uL3NyYy9tb2RhbC9Nb2RhbEFjdGlvbnNDb250YWluZXIudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0J1xuaW1wb3J0IHsgdGhlbWUgfSBmcm9tICdAZGZkcy11aS90aGVtZSdcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuXG5leHBvcnQgdHlwZSBNb2RhbEFjdGlvbnNQcm9wcyA9IHtcbiAgLyoqXG4gICAqIEFjdGlvbnMgdG8gYmUgZGlzcGxheWVkIGF0IHRoZSBib3R0b20gb2YgdGhlIG1vZGFsXG4gICAqL1xuICBhY3Rpb25zPzogUmVhY3QuUmVhY3ROb2RlXG59XG5cbmNvbnN0IE1vZGFsQWN0aW9uOiBSZWFjdC5GdW5jdGlvbkNvbXBvbmVudDx7IGNsYXNzTmFtZT86IHN0cmluZyB9PiA9IChwcm9wcykgPT4ge1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIGNzcz17Y3NzYFxuICAgICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAgICBmbGV4LXdyYXA6IG5vd3JhcDtcbiAgICAgICAganVzdGlmeS1jb250ZW50OiBmbGV4LWVuZDtcbiAgICAgICAgZmxleC1ncm93OiAxO1xuICAgICAgICBwYWRkaW5nLXRvcDogJHt0aGVtZS5zcGFjaW5nLnN9O1xuICAgICAgICBwYWRkaW5nLWJvdHRvbTogJHt0aGVtZS5zcGFjaW5nLnN9O1xuICAgICAgYH1cbiAgICAgIHsuLi5wcm9wc31cbiAgICAvPlxuICApXG59XG5cbmNvbnN0IE1vZGFsQWN0aW9uc0NvbnRhaW5lcjogUmVhY3QuRnVuY3Rpb25Db21wb25lbnQ8TW9kYWxBY3Rpb25zUHJvcHM+ID0gKHsgYWN0aW9ucywgLi4ucmVzdCB9KSA9PiB7XG4gIHJldHVybiA8ZGl2IHsuLi5yZXN0fT57YWN0aW9ucyAmJiA8TW9kYWxBY3Rpb24+e2FjdGlvbnN9PC9Nb2RhbEFjdGlvbj59PC9kaXY+XG59XG5cbmV4cG9ydCBkZWZhdWx0IE1vZGFsQWN0aW9uc0NvbnRhaW5lclxuIl19 */")
|
|
12
|
-
}, props));
|
|
13
|
-
};
|
|
14
|
-
var ModalActionsContainer = function ModalActionsContainer(_ref) {
|
|
15
|
-
var actions = _ref.actions,
|
|
16
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
-
return ___EmotionJSX("div", rest, actions && ___EmotionJSX(ModalAction, null, actions));
|
|
18
|
-
};
|
|
19
|
-
export default ModalActionsContainer;
|
package/modal/ModalBody.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare type ModalBodyProps = {
|
|
3
|
-
hasPadding?: boolean;
|
|
4
|
-
column?: boolean;
|
|
5
|
-
};
|
|
6
|
-
export declare const ModalBody: import("@emotion/styled").StyledComponent<{
|
|
7
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
-
as?: import("react").ElementType<any> | undefined;
|
|
9
|
-
} & ModalBodyProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
|
-
export default ModalBody;
|
package/modal/ModalBody.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import _styled from "@emotion/styled/base";
|
|
2
|
-
import { theme } from '@dfds-ui/theme';
|
|
3
|
-
import { typography } from '@dfds-ui/typography';
|
|
4
|
-
import { css } from '@emotion/react';
|
|
5
|
-
export var ModalBody = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "production" ? {
|
|
6
|
-
target: "e1nrz8580"
|
|
7
|
-
} : {
|
|
8
|
-
target: "e1nrz8580",
|
|
9
|
-
label: "ModalBody"
|
|
10
|
-
})(typography.body, " ", function (p) {
|
|
11
|
-
return p.hasPadding && /*#__PURE__*/css("flex:1 1 auto;margin:", theme.spacing.xs, " ", theme.spacing.s, " 0 ", theme.spacing.s, ";padding-bottom:", theme.spacing.s, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:ModalBody;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9tb2RhbC9Nb2RhbEJvZHkudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNPIiwiZmlsZSI6Ii4uLy4uL3NyYy9tb2RhbC9Nb2RhbEJvZHkudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnXG5pbXBvcnQgeyB0aGVtZSB9IGZyb20gJ0BkZmRzLXVpL3RoZW1lJ1xuaW1wb3J0IHsgdHlwb2dyYXBoeSB9IGZyb20gJ0BkZmRzLXVpL3R5cG9ncmFwaHknXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcblxuZXhwb3J0IHR5cGUgTW9kYWxCb2R5UHJvcHMgPSB7XG4gIGhhc1BhZGRpbmc/OiBib29sZWFuXG4gIGNvbHVtbj86IGJvb2xlYW5cbn1cblxuZXhwb3J0IGNvbnN0IE1vZGFsQm9keSA9IHN0eWxlZC5kaXY8TW9kYWxCb2R5UHJvcHM+YFxuICAke3R5cG9ncmFwaHkuYm9keX1cbiAgJHsocCkgPT5cbiAgICBwLmhhc1BhZGRpbmcgJiZcbiAgICBjc3NgXG4gICAgICBmbGV4OiAxIDEgYXV0bztcbiAgICAgIG1hcmdpbjogJHt0aGVtZS5zcGFjaW5nLnhzfSAke3RoZW1lLnNwYWNpbmcuc30gMCAke3RoZW1lLnNwYWNpbmcuc307XG4gICAgICBwYWRkaW5nLWJvdHRvbTogJHt0aGVtZS5zcGFjaW5nLnN9O1xuICAgIGB9XG4gICR7KHApID0+XG4gICAgcC5jb2x1bW4gJiZcbiAgICBgXG4gICAgZGlzcGxheTogZmxleDtcbiAgICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuICBgfVxuYFxuXG5leHBvcnQgZGVmYXVsdCBNb2RhbEJvZHlcbiJdfQ== */");
|
|
12
|
-
}, " ", function (p) {
|
|
13
|
-
return p.column && "\n display: flex;\n flex-direction: column;\n ";
|
|
14
|
-
}, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9tb2RhbC9Nb2RhbEJvZHkudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVVtRCIsImZpbGUiOiIuLi8uLi9zcmMvbW9kYWwvTW9kYWxCb2R5LnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJ1xuaW1wb3J0IHsgdGhlbWUgfSBmcm9tICdAZGZkcy11aS90aGVtZSdcbmltcG9ydCB7IHR5cG9ncmFwaHkgfSBmcm9tICdAZGZkcy11aS90eXBvZ3JhcGh5J1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXG5cbmV4cG9ydCB0eXBlIE1vZGFsQm9keVByb3BzID0ge1xuICBoYXNQYWRkaW5nPzogYm9vbGVhblxuICBjb2x1bW4/OiBib29sZWFuXG59XG5cbmV4cG9ydCBjb25zdCBNb2RhbEJvZHkgPSBzdHlsZWQuZGl2PE1vZGFsQm9keVByb3BzPmBcbiAgJHt0eXBvZ3JhcGh5LmJvZHl9XG4gICR7KHApID0+XG4gICAgcC5oYXNQYWRkaW5nICYmXG4gICAgY3NzYFxuICAgICAgZmxleDogMSAxIGF1dG87XG4gICAgICBtYXJnaW46ICR7dGhlbWUuc3BhY2luZy54c30gJHt0aGVtZS5zcGFjaW5nLnN9IDAgJHt0aGVtZS5zcGFjaW5nLnN9O1xuICAgICAgcGFkZGluZy1ib3R0b206ICR7dGhlbWUuc3BhY2luZy5zfTtcbiAgICBgfVxuICAkeyhwKSA9PlxuICAgIHAuY29sdW1uICYmXG4gICAgYFxuICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcbiAgYH1cbmBcblxuZXhwb3J0IGRlZmF1bHQgTW9kYWxCb2R5XG4iXX0= */"));
|
|
15
|
-
export default ModalBody;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { IconButtonSize } from '@dfds-ui/react-components';
|
|
3
|
-
export declare type ModalCloseButtonProps = {
|
|
4
|
-
onRequestClose?: () => void;
|
|
5
|
-
className?: string;
|
|
6
|
-
icon?: React.ElementType;
|
|
7
|
-
size?: IconButtonSize;
|
|
8
|
-
tabIndex?: number;
|
|
9
|
-
closeLabel?: string;
|
|
10
|
-
children?: React.ReactNode;
|
|
11
|
-
};
|
|
12
|
-
export declare const ModalCloseButton: ({ onRequestClose, className, icon, size, closeLabel, ...rest }: ModalCloseButtonProps) => JSX.Element;
|
|
13
|
-
export default ModalCloseButton;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
var _excluded = ["onRequestClose", "className", "icon", "size", "closeLabel"];
|
|
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
|
-
import React from 'react';
|
|
6
|
-
import { IconButton } from '@dfds-ui/react-components';
|
|
7
|
-
import { Close } from '@dfds-ui/icons/system';
|
|
8
|
-
import { css } from '@emotion/react';
|
|
9
|
-
import { theme } from '@dfds-ui/theme';
|
|
10
|
-
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
11
|
-
export var ModalCloseButton = function ModalCloseButton(_ref) {
|
|
12
|
-
var onRequestClose = _ref.onRequestClose,
|
|
13
|
-
className = _ref.className,
|
|
14
|
-
_ref$icon = _ref.icon,
|
|
15
|
-
icon = _ref$icon === void 0 ? Close : _ref$icon,
|
|
16
|
-
_ref$size = _ref.size,
|
|
17
|
-
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
18
|
-
_ref$closeLabel = _ref.closeLabel,
|
|
19
|
-
closeLabel = _ref$closeLabel === void 0 ? 'Close' : _ref$closeLabel,
|
|
20
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
21
|
-
return ___EmotionJSX(IconButton, _extends({
|
|
22
|
-
disableOverlay: true,
|
|
23
|
-
disableTooltip: true,
|
|
24
|
-
hoverColor: theme.colors.secondary.main,
|
|
25
|
-
size: size,
|
|
26
|
-
css: /*#__PURE__*/css("align-self:flex-start;color:", theme.colors.text.primary.primary, ";height:3rem;width:3rem;&:active{color:", theme.colors.secondary.dark, ";}" + (process.env.NODE_ENV === "production" ? "" : ";label:ModalCloseButton;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9tb2RhbC9Nb2RhbENsb3NlQnV0dG9uLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE4QmMiLCJmaWxlIjoiLi4vLi4vc3JjL21vZGFsL01vZGFsQ2xvc2VCdXR0b24udHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0J1xuaW1wb3J0IHsgSWNvbkJ1dHRvbiwgSWNvbkJ1dHRvblNpemUgfSBmcm9tICdAZGZkcy11aS9yZWFjdC1jb21wb25lbnRzJ1xuaW1wb3J0IHsgQ2xvc2UgfSBmcm9tICdAZGZkcy11aS9pY29ucy9zeXN0ZW0nXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcbmltcG9ydCB7IHRoZW1lIH0gZnJvbSAnQGRmZHMtdWkvdGhlbWUnXG5cbmV4cG9ydCB0eXBlIE1vZGFsQ2xvc2VCdXR0b25Qcm9wcyA9IHtcbiAgb25SZXF1ZXN0Q2xvc2U/OiAoKSA9PiB2b2lkXG4gIGNsYXNzTmFtZT86IHN0cmluZ1xuICBpY29uPzogUmVhY3QuRWxlbWVudFR5cGVcbiAgc2l6ZT86IEljb25CdXR0b25TaXplXG4gIHRhYkluZGV4PzogbnVtYmVyXG4gIGNsb3NlTGFiZWw/OiBzdHJpbmdcbiAgY2hpbGRyZW4/OiBSZWFjdC5SZWFjdE5vZGVcbn1cblxuZXhwb3J0IGNvbnN0IE1vZGFsQ2xvc2VCdXR0b24gPSAoe1xuICBvblJlcXVlc3RDbG9zZSxcbiAgY2xhc3NOYW1lLFxuICBpY29uID0gQ2xvc2UsXG4gIHNpemUgPSAnbWVkaXVtJyxcbiAgY2xvc2VMYWJlbCA9ICdDbG9zZScsXG4gIC4uLnJlc3Rcbn06IE1vZGFsQ2xvc2VCdXR0b25Qcm9wcykgPT4ge1xuICByZXR1cm4gKFxuICAgIDxJY29uQnV0dG9uXG4gICAgICBkaXNhYmxlT3ZlcmxheVxuICAgICAgZGlzYWJsZVRvb2x0aXBcbiAgICAgIGhvdmVyQ29sb3I9e3RoZW1lLmNvbG9ycy5zZWNvbmRhcnkubWFpbn1cbiAgICAgIHNpemU9e3NpemV9XG4gICAgICBjc3M9e2Nzc2BcbiAgICAgICAgYWxpZ24tc2VsZjogZmxleC1zdGFydDtcbiAgICAgICAgY29sb3I6ICR7dGhlbWUuY29sb3JzLnRleHQucHJpbWFyeS5wcmltYXJ5fTtcbiAgICAgICAgaGVpZ2h0OiAzcmVtO1xuICAgICAgICB3aWR0aDogM3JlbTtcbiAgICAgICAgJjphY3RpdmUge1xuICAgICAgICAgIGNvbG9yOiAke3RoZW1lLmNvbG9ycy5zZWNvbmRhcnkuZGFya307XG4gICAgICAgIH1cbiAgICAgIGB9XG4gICAgICBjbGFzc05hbWU9e2NsYXNzTmFtZX1cbiAgICAgIG9uQ2xpY2s9e29uUmVxdWVzdENsb3NlfVxuICAgICAgaWNvbj17aWNvbn1cbiAgICAgIGFyaWFMYWJlbD17Y2xvc2VMYWJlbH1cbiAgICAgIGRhdGEtdGVzdGlkPVwibW9kYWwtY2xvc2VcIlxuICAgICAgdHlwZT1cImJ1dHRvblwiXG4gICAgICB7Li4ucmVzdH1cbiAgICAvPlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IE1vZGFsQ2xvc2VCdXR0b25cbiJdfQ== */"),
|
|
27
|
-
className: className,
|
|
28
|
-
onClick: onRequestClose,
|
|
29
|
-
icon: icon,
|
|
30
|
-
ariaLabel: closeLabel,
|
|
31
|
-
"data-testid": "modal-close",
|
|
32
|
-
type: "button"
|
|
33
|
-
}, rest));
|
|
34
|
-
};
|
|
35
|
-
export default ModalCloseButton;
|
package/modal/ModalDialog.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { theme } from '@dfds-ui/theme';
|
|
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
|
-
isOpen: boolean;
|
|
9
|
-
onRequestClose?: () => void;
|
|
10
|
-
shouldCloseOnOverlayClick?: boolean;
|
|
11
|
-
shouldCloseOnEsc?: boolean;
|
|
12
|
-
className?: string;
|
|
13
|
-
variation?: ModalVariation;
|
|
14
|
-
zIndex?: number;
|
|
15
|
-
sizes?: ModalSizes;
|
|
16
|
-
fixedTopPosition?: boolean;
|
|
17
|
-
renderWhenClosed?: boolean;
|
|
18
|
-
backdrop?: Backdrop;
|
|
19
|
-
backdropVariant?: BackdropVariant;
|
|
20
|
-
children?: React.ReactNode;
|
|
21
|
-
};
|
|
22
|
-
export declare function setGlobalAppElement(selector: string): void;
|
|
23
|
-
declare const backdropsTransparent: {
|
|
24
|
-
readonly lowEmphasis: "iVBORw0KGgoAAAANSUhEUgAAACgAAAAoAQMAAAC2MCouAAAAA1BMVEX///+nxBvIAAAAAXRSTlOzEo46UAAAAAtJREFUCNdjGGEAAADwAAFOldjfAAAAAElFTkSuQmCC";
|
|
25
|
-
readonly mediumEmphasis: "iVBORw0KGgoAAAANSUhEUgAAACgAAAAoAQMAAAC2MCouAAAAA1BMVEUAAACnej3aAAAAAXRSTlNANjqZ9gAAAAtJREFUCNdjGGEAAADwAAFOldjfAAAAAElFTkSuQmCC";
|
|
26
|
-
readonly highEmphasis: "iVBORw0KGgoAAAANSUhEUgAAACgAAAAoAQMAAAC2MCouAAAAA1BMVEUAK0XXvHWsAAAAAXRSTlOzEo46UAAAAAtJREFUCNdjGGEAAADwAAFOldjfAAAAAElFTkSuQmCC";
|
|
27
|
-
};
|
|
28
|
-
export declare const defaultProps: {
|
|
29
|
-
sizes: {
|
|
30
|
-
s: string;
|
|
31
|
-
m: string;
|
|
32
|
-
l: string;
|
|
33
|
-
xl: string;
|
|
34
|
-
xxl: string;
|
|
35
|
-
};
|
|
36
|
-
zIndex: number;
|
|
37
|
-
renderWhenClosed: boolean;
|
|
38
|
-
backdrop: "lowEmphasis" | "mediumEmphasis" | "highEmphasis";
|
|
39
|
-
backdropVariant: BackdropVariant;
|
|
40
|
-
};
|
|
41
|
-
declare const ModalDialog: ({ isOpen, onRequestClose, shouldCloseOnOverlayClick, shouldCloseOnEsc, variation, zIndex, className, sizes, fixedTopPosition, renderWhenClosed, backdrop, backdropVariant, children, ...rest }: ModalDialogProps) => JSX.Element | null;
|
|
42
|
-
export default ModalDialog;
|