@activecollab/components 2.0.278 → 2.0.279
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/dist/cjs/components/ConfirmDialog/ConfirmDialog.js +2 -5
- package/dist/cjs/components/ConfirmDialog/ConfirmDialog.js.map +1 -1
- package/dist/cjs/components/Dialog/Dialog.js +2 -6
- package/dist/cjs/components/Dialog/Dialog.js.map +1 -1
- package/dist/cjs/components/Dialog/Styles.js +3 -5
- package/dist/cjs/components/Dialog/Styles.js.map +1 -1
- package/dist/esm/components/ConfirmDialog/ConfirmDialog.d.ts +0 -1
- package/dist/esm/components/ConfirmDialog/ConfirmDialog.d.ts.map +1 -1
- package/dist/esm/components/ConfirmDialog/ConfirmDialog.js +2 -4
- package/dist/esm/components/ConfirmDialog/ConfirmDialog.js.map +1 -1
- package/dist/esm/components/Dialog/Dialog.d.ts +0 -1
- package/dist/esm/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/esm/components/Dialog/Dialog.js +3 -6
- package/dist/esm/components/Dialog/Dialog.js.map +1 -1
- package/dist/esm/components/Dialog/Styles.d.ts +1 -3
- package/dist/esm/components/Dialog/Styles.d.ts.map +1 -1
- package/dist/esm/components/Dialog/Styles.js +2 -2
- package/dist/esm/components/Dialog/Styles.js.map +1 -1
- package/dist/index.js +5 -14
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -28,9 +28,7 @@ var ConfirmDialog = exports.ConfirmDialog = /*#__PURE__*/(0, _react.forwardRef)(
|
|
|
28
28
|
_ref$shouldShowCancel = _ref.shouldShowCancelButton,
|
|
29
29
|
shouldShowCancelButton = _ref$shouldShowCancel === void 0 ? true : _ref$shouldShowCancel,
|
|
30
30
|
_ref$isLoading = _ref.isLoading,
|
|
31
|
-
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading
|
|
32
|
-
_ref$fullWidth = _ref.fullWidth,
|
|
33
|
-
fullWidth = _ref$fullWidth === void 0 ? false : _ref$fullWidth;
|
|
31
|
+
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading;
|
|
34
32
|
(0, _react.useEffect)(function () {
|
|
35
33
|
var handleKeyDown = function handleKeyDown(event) {
|
|
36
34
|
if (event.key === "Enter" && onConfirm) {
|
|
@@ -50,8 +48,7 @@ var ConfirmDialog = exports.ConfirmDialog = /*#__PURE__*/(0, _react.forwardRef)(
|
|
|
50
48
|
open: open,
|
|
51
49
|
onClose: onCancel,
|
|
52
50
|
className: (0, _classnames.default)("c-confirm-dialog", className),
|
|
53
|
-
disableCloseOnEsc: isLoading
|
|
54
|
-
fullWidth: fullWidth
|
|
51
|
+
disableCloseOnEsc: isLoading
|
|
55
52
|
}, /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.Title, null, dialogTitle), /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.ContentDivider, null), /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.Content, null, /*#__PURE__*/_react.default.createElement(_Body.Body2, {
|
|
56
53
|
lineHeight: "loose",
|
|
57
54
|
color: "secondary",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmDialog.js","names":["_react","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_Button","_Dialog","_Body","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ConfirmDialog","exports","forwardRef","_ref","ref","_ref$open","open","onCancel","onConfirm","className","_ref$dialogTitle","dialogTitle","_ref$dialogContent","dialogContent","_ref$confirmBtnText","confirmBtnText","_ref$cancelBtnText","cancelBtnText","_ref$shouldShowCancel","shouldShowCancelButton","_ref$isLoading","isLoading","
|
|
1
|
+
{"version":3,"file":"ConfirmDialog.js","names":["_react","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_Button","_Dialog","_Body","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ConfirmDialog","exports","forwardRef","_ref","ref","_ref$open","open","onCancel","onConfirm","className","_ref$dialogTitle","dialogTitle","_ref$dialogContent","dialogContent","_ref$confirmBtnText","confirmBtnText","_ref$cancelBtnText","cancelBtnText","_ref$shouldShowCancel","shouldShowCancelButton","_ref$isLoading","isLoading","useEffect","handleKeyDown","event","key","preventDefault","window","addEventListener","removeEventListener","createElement","Dialog","onClose","classnames","disableCloseOnEsc","Title","ContentDivider","Content","Body2","lineHeight","color","whitespace","Actions","Button","variant","style","marginRight","onClick","disabled","type","displayName"],"sources":["../../../../src/components/ConfirmDialog/ConfirmDialog.tsx"],"sourcesContent":["import React, { forwardRef, useEffect } from \"react\";\n\nimport classnames from \"classnames\";\n\nimport { Button } from \"../Button/Button\";\nimport { Dialog } from \"../Dialog\";\nimport { Body2 } from \"../Typography/Variants/Body2\";\n\nexport interface ConfirmDialogProps {\n open?: boolean;\n onCancel?: () => void;\n onConfirm?: () => void;\n className?: string;\n dialogTitle?: string;\n dialogContent?: string;\n confirmBtnText?: string;\n cancelBtnText?: string;\n shouldShowCancelButton?: boolean;\n isLoading?: boolean;\n}\n\nexport const ConfirmDialog = forwardRef<HTMLDivElement, ConfirmDialogProps>(\n (\n {\n open = false,\n onCancel,\n onConfirm,\n className,\n dialogTitle = \"Discard changes?\",\n dialogContent = \"All unsaved changes will be lost.\",\n confirmBtnText = \"OK\",\n cancelBtnText = \"Cancel\",\n shouldShowCancelButton = true,\n isLoading = false,\n },\n ref\n ) => {\n useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === \"Enter\" && onConfirm) {\n event.preventDefault();\n onConfirm();\n }\n };\n\n if (open) {\n window.addEventListener(\"keydown\", handleKeyDown);\n }\n\n return () => {\n window.removeEventListener(\"keydown\", handleKeyDown);\n };\n }, [open, onConfirm]);\n\n return (\n <Dialog\n ref={ref}\n open={open}\n onClose={onCancel}\n className={classnames(\"c-confirm-dialog\", className)}\n disableCloseOnEsc={isLoading}\n >\n <Dialog.Title>{dialogTitle}</Dialog.Title>\n <Dialog.ContentDivider />\n <Dialog.Content>\n <Body2 lineHeight=\"loose\" color=\"secondary\" whitespace=\"pre-line\">\n {dialogContent}\n </Body2>\n </Dialog.Content>\n <Dialog.ContentDivider />\n <Dialog.Actions>\n <Button\n variant=\"primary\"\n style={{ marginRight: \"12px\" }}\n onClick={onConfirm}\n disabled={isLoading}\n >\n {confirmBtnText}\n </Button>\n {shouldShowCancelButton ? (\n <Button\n variant=\"secondary\"\n data-action=\"cancel\"\n onClick={onCancel}\n type=\"button\"\n disabled={isLoading}\n >\n {cancelBtnText}\n </Button>\n ) : null}\n </Dialog.Actions>\n </Dialog>\n );\n }\n);\n\nConfirmDialog.displayName = \"ConfirmDialog\";\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AAAqD,SAAAE,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAP,wBAAAO,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAX,uBAAA,YAAAA,wBAAAO,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAS,CAAA,MAAAF,CAAA,GAAAJ,CAAA,GAAAG,CAAA,GA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MAAA,CAAAU,OAAA,CAAAgD,aAAA,CAACnD,KAAA,CAAA2D,KAAK;IAACC,UAAU,EAAC,OAAO;IAACC,KAAK,EAAC,WAAW;IAACC,UAAU,EAAC;EAAU,GAC9D5B,aACI,CACO,CAAC,eACjBzC,MAAA,CAAAU,OAAA,CAAAgD,aAAA,CAACpD,OAAA,CAAAqD,MAAM,CAACK,cAAc,MAAE,CAAC,eACzBhE,MAAA,CAAAU,OAAA,CAAAgD,aAAA,CAACpD,OAAA,CAAAqD,MAAM,CAACW,OAAO,qBACbtE,MAAA,CAAAU,OAAA,CAAAgD,aAAA,CAACrD,OAAA,CAAAkE,MAAM;IACLC,OAAO,EAAC,SAAS;IACjBC,KAAK,EAAE;MAAEC,WAAW,EAAE;IAAO,CAAE;IAC/BC,OAAO,EAAEvC,SAAU;IACnBwC,QAAQ,EAAE3B;EAAU,GAEnBN,cACK,CAAC,EACRI,sBAAsB,gBACrB/C,MAAA,CAAAU,OAAA,CAAAgD,aAAA,CAACrD,OAAA,CAAAkE,MAAM;IACLC,OAAO,EAAC,WAAW;IACnB,eAAY,QAAQ;IACpBG,OAAO,EAAExC,QAAS;IAClB0C,IAAI,EAAC,QAAQ;IACbD,QAAQ,EAAE3B;EAAU,GAEnBJ,aACK,CAAC,GACP,IACU,CACV,CAAC;AAEb,CACF,CAAC;AAEDjB,aAAa,CAACkD,WAAW,GAAG,eAAe","ignoreList":[]}
|
|
@@ -14,7 +14,7 @@ var _Styles = require("./Styles");
|
|
|
14
14
|
var _Modal = require("../Modal");
|
|
15
15
|
var _Transitions = require("../Transitions");
|
|
16
16
|
var _SlideFromTop = require("../Transitions/SlideFromTop");
|
|
17
|
-
var _excluded = ["children", "open", "onClose", "className", "enableBackgroundClick", "disableCloseOnEsc", "animate", "onClickOutside"
|
|
17
|
+
var _excluded = ["children", "open", "onClose", "className", "enableBackgroundClick", "disableCloseOnEsc", "animate", "onClickOutside"]; // import { DialogContext } from "./DialogContext";
|
|
18
18
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
19
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
20
20
|
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); }
|
|
@@ -33,8 +33,6 @@ var _Dialog = exports._Dialog = /*#__PURE__*/(0, _react.forwardRef)(function (_r
|
|
|
33
33
|
_ref$animate = _ref.animate,
|
|
34
34
|
animate = _ref$animate === void 0 ? "slide" : _ref$animate,
|
|
35
35
|
onClickOutside = _ref.onClickOutside,
|
|
36
|
-
_ref$fullWidth = _ref.fullWidth,
|
|
37
|
-
fullWidth = _ref$fullWidth === void 0 ? false : _ref$fullWidth,
|
|
38
36
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
39
37
|
var animateDialog = function animateDialog() {
|
|
40
38
|
switch (animate) {
|
|
@@ -42,15 +40,13 @@ var _Dialog = exports._Dialog = /*#__PURE__*/(0, _react.forwardRef)(function (_r
|
|
|
42
40
|
return /*#__PURE__*/_react.default.createElement(_Transitions.Fade, {
|
|
43
41
|
in: open
|
|
44
42
|
}, /*#__PURE__*/_react.default.createElement(_Styles.StyledDialog, {
|
|
45
|
-
$fullWidth: fullWidth,
|
|
46
43
|
className: (0, _classnames.default)("c-dialog", className)
|
|
47
44
|
}, children));
|
|
48
45
|
default:
|
|
49
46
|
return /*#__PURE__*/_react.default.createElement(_SlideFromTop.SlideFromTop, {
|
|
50
47
|
in: open
|
|
51
48
|
}, /*#__PURE__*/_react.default.createElement(_Styles.StyledDialog, {
|
|
52
|
-
className: (0, _classnames.default)("c-dialog", className)
|
|
53
|
-
$fullWidth: fullWidth
|
|
49
|
+
className: (0, _classnames.default)("c-dialog", className)
|
|
54
50
|
}, children));
|
|
55
51
|
}
|
|
56
52
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.js","names":["_react","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_DialogActions","_DialogContent","_DialogContentDivider","_DialogTitle","_Styles","_Modal","_Transitions","_SlideFromTop","_excluded","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_extends","assign","bind","arguments","length","apply","_objectWithoutProperties","_objectWithoutPropertiesLoose","getOwnPropertySymbols","indexOf","propertyIsEnumerable","_Dialog","exports","forwardRef","_ref","ref","children","_ref$open","open","onClose","className","_ref$enableBackground","enableBackgroundClick","_ref$disableCloseOnEs","disableCloseOnEsc","_ref$animate","animate","onClickOutside","
|
|
1
|
+
{"version":3,"file":"Dialog.js","names":["_react","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_DialogActions","_DialogContent","_DialogContentDivider","_DialogTitle","_Styles","_Modal","_Transitions","_SlideFromTop","_excluded","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_extends","assign","bind","arguments","length","apply","_objectWithoutProperties","_objectWithoutPropertiesLoose","getOwnPropertySymbols","indexOf","propertyIsEnumerable","_Dialog","exports","forwardRef","_ref","ref","children","_ref$open","open","onClose","className","_ref$enableBackground","enableBackgroundClick","_ref$disableCloseOnEs","disableCloseOnEsc","_ref$animate","animate","onClickOutside","rest","animateDialog","createElement","Fade","in","StyledDialog","classnames","SlideFromTop","Modal","disableBackgroundClick","displayName","Dialog","Title","DialogTitle","Content","DialogContent","ContentDivider","DialogContentDivider","Actions","DialogActions"],"sources":["../../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["import React, { forwardRef, HTMLAttributes, PropsWithChildren } from \"react\";\n\nimport classnames from \"classnames\";\n\n// import { DialogContext } from \"./DialogContext\";\n\nimport { DialogActions } from \"./DialogActions\";\nimport { DialogContent } from \"./DialogContent\";\nimport { DialogContentDivider } from \"./DialogContentDivider\";\nimport { DialogTitle } from \"./DialogTitle\";\nimport { StyledDialog } from \"./Styles\";\nimport { Modal } from \"../Modal\";\nimport { Fade } from \"../Transitions\";\nimport { SlideFromTop } from \"../Transitions/SlideFromTop\";\n\nexport interface DialogProps extends HTMLAttributes<HTMLDivElement> {\n open?: boolean;\n onClose?: () => void;\n className?: string;\n enableBackgroundClick?: boolean;\n disableCloseOnEsc?: boolean;\n animate?: \"fade\" | \"slide\";\n onClickOutside?: (event) => void;\n}\n\nexport const _Dialog = forwardRef<\n HTMLDivElement,\n PropsWithChildren<DialogProps>\n>(\n (\n {\n children,\n open = false,\n onClose,\n className,\n enableBackgroundClick = false,\n disableCloseOnEsc = false,\n animate = \"slide\",\n onClickOutside,\n ...rest\n },\n ref\n ) => {\n const animateDialog = () => {\n switch (animate) {\n case \"fade\":\n return (\n <Fade in={open}>\n <StyledDialog className={classnames(\"c-dialog\", className)}>\n {children}\n </StyledDialog>\n </Fade>\n );\n default:\n return (\n <SlideFromTop in={open}>\n <StyledDialog className={classnames(\"c-dialog\", className)}>\n {children}\n </StyledDialog>\n </SlideFromTop>\n );\n }\n };\n\n return (\n // <DialogContext.Provider value={{}}>\n\n <Modal\n ref={ref}\n open={open}\n onClose={onClose}\n disableBackgroundClick={!enableBackgroundClick}\n disableCloseOnEsc={disableCloseOnEsc}\n onClickOutside={onClickOutside}\n {...rest}\n >\n {animateDialog()}\n </Modal>\n // </DialogContext.Provider>\n );\n }\n);\n\n_Dialog.displayName = \"Dialog\";\n\n// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/34757\nexport const Dialog = Object.assign({}, _Dialog, {\n Title: DialogTitle,\n Content: DialogContent,\n ContentDivider: DialogContentDivider,\n Actions: DialogActions,\n});\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAIA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,qBAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,YAAA,GAAAT,OAAA;AACA,IAAAU,aAAA,GAAAV,OAAA;AAA2D,IAAAW,SAAA,4HAT3D;AAAA,SAAAT,uBAAAU,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAb,wBAAAa,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAjB,uBAAA,YAAAA,wBAAAa,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAS,CAAA,MAAAF,CAAA,GAAAJ,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAE,CAAA,CAAAI,GAAA,CAAAX,CAAA,UAAAO,CAAA,CAAAK,GAAA,CAAAZ,CAAA,GAAAO,CAAA,CAAAM,GAAA,CAAAb,CAAA,EAAAS,CAAA,cAAAK,EAAA,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gBACbpD,MAAA,CAAAgB,OAAA,CAAAgD,aAAA,CAACvD,OAAA,CAAA0D,YAAY;UAACb,SAAS,EAAE,IAAAc,mBAAU,EAAC,UAAU,EAAEd,SAAS;QAAE,GACxDJ,QACW,CACV,CAAC;MAEX;QACE,oBACElD,MAAA,CAAAgB,OAAA,CAAAgD,aAAA,CAACpD,aAAA,CAAAyD,YAAY;UAACH,EAAE,EAAEd;QAAK,gBACrBpD,MAAA,CAAAgB,OAAA,CAAAgD,aAAA,CAACvD,OAAA,CAAA0D,YAAY;UAACb,SAAS,EAAE,IAAAc,mBAAU,EAAC,UAAU,EAAEd,SAAS;QAAE,GACxDJ,QACW,CACF,CAAC;IAErB;EACF,CAAC;EAED;IAAA;IACE;IAEAlD,MAAA,CAAAgB,OAAA,CAAAgD,aAAA,CAACtD,MAAA,CAAA4D,KAAK,EAAApC,QAAA;MACJe,GAAG,EAAEA,GAAI;MACTG,IAAI,EAAEA,IAAK;MACXC,OAAO,EAAEA,OAAQ;MACjBkB,sBAAsB,EAAE,CAACf,qBAAsB;MAC/CE,iBAAiB,EAAEA,iBAAkB;MACrCG,cAAc,EAAEA;IAAe,GAC3BC,IAAI,GAEPC,aAAa,CAAC,CACV;IACP;EAAA;AAEJ,CACF,CAAC;AAEDlB,OAAO,CAAC2B,WAAW,GAAG,QAAQ;;AAE9B;AACO,IAAMC,MAAM,GAAA3B,OAAA,CAAA2B,MAAA,GAAG1C,MAAM,CAACI,MAAM,CAAC,CAAC,CAAC,EAAEU,OAAO,EAAE;EAC/C6B,KAAK,EAAEC,wBAAW;EAClBC,OAAO,EAAEC,4BAAa;EACtBC,cAAc,EAAEC,0CAAoB;EACpCC,OAAO,EAAEC;AACX,CAAC,CAAC","ignoreList":[]}
|
|
@@ -4,17 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.StyledDialogTitle = exports.StyledDialogContentDivider = exports.StyledDialogContent = exports.StyledDialogActions = exports.StyledDialog = void 0;
|
|
7
|
-
var _styledComponents =
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
8
|
var _BoxSizingStyle = require("../BoxSizingStyle");
|
|
9
9
|
var _BreakPoints = require("../BreakPoints");
|
|
10
10
|
var _FontStyle = require("../FontStyle");
|
|
11
|
-
function
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
12
|
var StyledDialog = exports.StyledDialog = _styledComponents.default.div.withConfig({
|
|
13
13
|
displayName: "Styles__StyledDialog",
|
|
14
14
|
componentId: "sc-jwpvgm-0"
|
|
15
|
-
})(["display:flex;flex-direction:column;flex:1 1 auto;max-height:calc(100vh - 156px);background-color:var(--page-paper-main);color:var(--color-theme-900);box-shadow:var(--shadow-primary);border-radius:8px;width:310px;margin:60px auto 30px auto;position:relative;
|
|
16
|
-
return props.$fullWidth && (0, _styledComponents.css)(["@media (max-width:640px){width:calc(100% - 32px);max-width:640px;margin-left:16px;margin-right:16px;}"]);
|
|
17
|
-
}, _FontStyle.FontStyle, _BoxSizingStyle.BoxSizingStyle, _BreakPoints.screen.sm);
|
|
15
|
+
})(["display:flex;flex-direction:column;flex:1 1 auto;max-height:calc(100vh - 156px);background-color:var(--page-paper-main);color:var(--color-theme-900);box-shadow:var(--shadow-primary);border-radius:8px;width:310px;margin:60px auto 30px auto;position:relative;@media (max-width:640px){width:calc(100% - 32px);max-width:640px;margin-left:16px !important;margin-right:16px !important;}", " ", " ", "{width:540px;margin:126px auto 30px auto;}"], _FontStyle.FontStyle, _BoxSizingStyle.BoxSizingStyle, _BreakPoints.screen.sm);
|
|
18
16
|
StyledDialog.displayName = "StyledDialog";
|
|
19
17
|
var StyledDialogTitle = exports.StyledDialogTitle = _styledComponents.default.div.withConfig({
|
|
20
18
|
displayName: "Styles__StyledDialogTitle",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Styles.js","names":["_styledComponents","
|
|
1
|
+
{"version":3,"file":"Styles.js","names":["_styledComponents","_interopRequireDefault","require","_BoxSizingStyle","_BreakPoints","_FontStyle","e","__esModule","default","StyledDialog","exports","styled","div","withConfig","displayName","componentId","FontStyle","BoxSizingStyle","screen","sm","StyledDialogTitle","StyledDialogContent","StyledDialogContentDivider","StyledDialogActions"],"sources":["../../../../src/components/Dialog/Styles.ts"],"sourcesContent":["import styled from \"styled-components\";\n\nimport { BoxSizingStyle } from \"../BoxSizingStyle\";\nimport { screen } from \"../BreakPoints\";\nimport { FontStyle } from \"../FontStyle\";\n\nexport const StyledDialog = styled.div`\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n max-height: calc(100vh - 156px);\n background-color: var(--page-paper-main);\n color: var(--color-theme-900);\n box-shadow: var(--shadow-primary);\n border-radius: 8px;\n width: 310px;\n margin: 60px auto 30px auto;\n position: relative;\n\n @media (max-width: 640px) {\n width: calc(100% - 32px);\n max-width: 640px;\n margin-left: 16px !important;\n margin-right: 16px !important;\n }\n\n ${FontStyle}\n ${BoxSizingStyle}\n\n ${screen.sm} {\n width: 540px;\n margin: 126px auto 30px auto;\n }\n`;\n\nStyledDialog.displayName = \"StyledDialog\";\n\nexport const StyledDialogTitle = styled.div`\n padding: 20px 30px;\n\n ${FontStyle}\n ${BoxSizingStyle}\n`;\nStyledDialogTitle.displayName = \"StyledDialogTitle\";\n\nexport const StyledDialogContent = styled.div`\n padding: 20px 30px;\n max-height: 580px;\n overflow-y: auto;\n flex: 1 1 auto;\n\n ${FontStyle}\n ${BoxSizingStyle}\n`;\nStyledDialogContent.displayName = \"StyledDialogContent\";\n\nexport const StyledDialogContentDivider = styled.div`\n border-top: 1px solid var(--border-primary);\n height: 1px;\n`;\nStyledDialogContentDivider.displayName = \"StyledDialogContentDivider\";\n\nexport const StyledDialogActions = styled.div`\n padding: 20px 30px;\n\n ${FontStyle}\n ${BoxSizingStyle}\n`;\nStyledDialogActions.displayName = \"StyledDialogActions\";\n"],"mappings":";;;;;;AAAA,IAAA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B","ignoreList":[]}
|
|
@@ -10,7 +10,6 @@ export interface ConfirmDialogProps {
|
|
|
10
10
|
cancelBtnText?: string;
|
|
11
11
|
shouldShowCancelButton?: boolean;
|
|
12
12
|
isLoading?: boolean;
|
|
13
|
-
fullWidth?: boolean;
|
|
14
13
|
}
|
|
15
14
|
export declare const ConfirmDialog: React.ForwardRefExoticComponent<ConfirmDialogProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
15
|
//# sourceMappingURL=ConfirmDialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmDialog.d.ts","sourceRoot":"","sources":["../../../../src/components/ConfirmDialog/ConfirmDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAQrD,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ConfirmDialog.d.ts","sourceRoot":"","sources":["../../../../src/components/ConfirmDialog/ConfirmDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAQrD,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,aAAa,2FAyEzB,CAAC"}
|
|
@@ -14,8 +14,7 @@ export const ConfirmDialog = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14
14
|
confirmBtnText = "OK",
|
|
15
15
|
cancelBtnText = "Cancel",
|
|
16
16
|
shouldShowCancelButton = true,
|
|
17
|
-
isLoading = false
|
|
18
|
-
fullWidth = false
|
|
17
|
+
isLoading = false
|
|
19
18
|
} = _ref;
|
|
20
19
|
useEffect(() => {
|
|
21
20
|
const handleKeyDown = event => {
|
|
@@ -36,8 +35,7 @@ export const ConfirmDialog = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
36
35
|
open: open,
|
|
37
36
|
onClose: onCancel,
|
|
38
37
|
className: classnames("c-confirm-dialog", className),
|
|
39
|
-
disableCloseOnEsc: isLoading
|
|
40
|
-
fullWidth: fullWidth
|
|
38
|
+
disableCloseOnEsc: isLoading
|
|
41
39
|
}, /*#__PURE__*/React.createElement(Dialog.Title, null, dialogTitle), /*#__PURE__*/React.createElement(Dialog.ContentDivider, null), /*#__PURE__*/React.createElement(Dialog.Content, null, /*#__PURE__*/React.createElement(Body2, {
|
|
42
40
|
lineHeight: "loose",
|
|
43
41
|
color: "secondary",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmDialog.js","names":["React","forwardRef","useEffect","classnames","Button","Dialog","Body2","ConfirmDialog","_ref","ref","open","onCancel","onConfirm","className","dialogTitle","dialogContent","confirmBtnText","cancelBtnText","shouldShowCancelButton","isLoading","
|
|
1
|
+
{"version":3,"file":"ConfirmDialog.js","names":["React","forwardRef","useEffect","classnames","Button","Dialog","Body2","ConfirmDialog","_ref","ref","open","onCancel","onConfirm","className","dialogTitle","dialogContent","confirmBtnText","cancelBtnText","shouldShowCancelButton","isLoading","handleKeyDown","event","key","preventDefault","window","addEventListener","removeEventListener","createElement","onClose","disableCloseOnEsc","Title","ContentDivider","Content","lineHeight","color","whitespace","Actions","variant","style","marginRight","onClick","disabled","type","displayName"],"sources":["../../../../src/components/ConfirmDialog/ConfirmDialog.tsx"],"sourcesContent":["import React, { forwardRef, useEffect } from \"react\";\n\nimport classnames from \"classnames\";\n\nimport { Button } from \"../Button/Button\";\nimport { Dialog } from \"../Dialog\";\nimport { Body2 } from \"../Typography/Variants/Body2\";\n\nexport interface ConfirmDialogProps {\n open?: boolean;\n onCancel?: () => void;\n onConfirm?: () => void;\n className?: string;\n dialogTitle?: string;\n dialogContent?: string;\n confirmBtnText?: string;\n cancelBtnText?: string;\n shouldShowCancelButton?: boolean;\n isLoading?: boolean;\n}\n\nexport const ConfirmDialog = forwardRef<HTMLDivElement, ConfirmDialogProps>(\n (\n {\n open = false,\n onCancel,\n onConfirm,\n className,\n dialogTitle = \"Discard changes?\",\n dialogContent = \"All unsaved changes will be lost.\",\n confirmBtnText = \"OK\",\n cancelBtnText = \"Cancel\",\n shouldShowCancelButton = true,\n isLoading = false,\n },\n ref\n ) => {\n useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === \"Enter\" && onConfirm) {\n event.preventDefault();\n onConfirm();\n }\n };\n\n if (open) {\n window.addEventListener(\"keydown\", handleKeyDown);\n }\n\n return () => {\n window.removeEventListener(\"keydown\", handleKeyDown);\n };\n }, [open, onConfirm]);\n\n return (\n <Dialog\n ref={ref}\n open={open}\n onClose={onCancel}\n className={classnames(\"c-confirm-dialog\", className)}\n disableCloseOnEsc={isLoading}\n >\n <Dialog.Title>{dialogTitle}</Dialog.Title>\n <Dialog.ContentDivider />\n <Dialog.Content>\n <Body2 lineHeight=\"loose\" color=\"secondary\" whitespace=\"pre-line\">\n {dialogContent}\n </Body2>\n </Dialog.Content>\n <Dialog.ContentDivider />\n <Dialog.Actions>\n <Button\n variant=\"primary\"\n style={{ marginRight: \"12px\" }}\n onClick={onConfirm}\n disabled={isLoading}\n >\n {confirmBtnText}\n </Button>\n {shouldShowCancelButton ? (\n <Button\n variant=\"secondary\"\n data-action=\"cancel\"\n onClick={onCancel}\n type=\"button\"\n disabled={isLoading}\n >\n {cancelBtnText}\n </Button>\n ) : null}\n </Dialog.Actions>\n </Dialog>\n );\n }\n);\n\nConfirmDialog.displayName = \"ConfirmDialog\";\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,EAAEC,SAAS,QAAQ,OAAO;AAEpD,OAAOC,UAAU,MAAM,YAAY;AAEnC,SAASC,MAAM,QAAQ,kBAAkB;AACzC,SAASC,MAAM,QAAQ,WAAW;AAClC,SAASC,KAAK,QAAQ,8BAA8B;AAepD,OAAO,MAAMC,aAAa,gBAAGN,UAAU,CACrC,CAAAO,IAAA,EAaEC,GAAG,KACA;EAAA,IAbH;IACEC,IAAI,GAAG,KAAK;IACZC,QAAQ;IACRC,SAAS;IACTC,SAAS;IACTC,WAAW,GAAG,kBAAkB;IAChCC,aAAa,GAAG,mCAAmC;IACnDC,cAAc,GAAG,IAAI;IACrBC,aAAa,GAAG,QAAQ;IACxBC,sBAAsB,GAAG,IAAI;IAC7BC,SAAS,GAAG;EACd,CAAC,GAAAX,IAAA;EAGDN,SAAS,CAAC,MAAM;IACd,MAAMkB,aAAa,GAAIC,KAAoB,IAAK;MAC9C,IAAIA,KAAK,CAACC,GAAG,KAAK,OAAO,IAAIV,SAAS,EAAE;QACtCS,KAAK,CAACE,cAAc,CAAC,CAAC;QACtBX,SAAS,CAAC,CAAC;MACb;IACF,CAAC;IAED,IAAIF,IAAI,EAAE;MACRc,MAAM,CAACC,gBAAgB,CAAC,SAAS,EAAEL,aAAa,CAAC;IACnD;IAEA,OAAO,MAAM;MACXI,MAAM,CAACE,mBAAmB,CAAC,SAAS,EAAEN,a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AG,eAAe","ignoreList":[]}
|
|
@@ -7,7 +7,6 @@ export interface DialogProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
7
7
|
disableCloseOnEsc?: boolean;
|
|
8
8
|
animate?: "fade" | "slide";
|
|
9
9
|
onClickOutside?: (event: any) => void;
|
|
10
|
-
fullWidth?: boolean;
|
|
11
10
|
}
|
|
12
11
|
export declare const _Dialog: React.ForwardRefExoticComponent<DialogProps & {
|
|
13
12
|
children?: React.ReactNode | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,cAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAe7E,MAAM,WAAW,WAAY,SAAQ,cAAc,CAAC,cAAc,CAAC;IACjE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B,cAAc,CAAC,EAAE,CAAC,KAAK,KAAA,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,cAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAe7E,MAAM,WAAW,WAAY,SAAQ,cAAc,CAAC,cAAc,CAAC;IACjE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B,cAAc,CAAC,EAAE,CAAC,KAAK,KAAA,KAAK,IAAI,CAAC;CAClC;AAED,eAAO,MAAM,OAAO;;wCAwDnB,CAAC;AAKF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;CAKjB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["children", "open", "onClose", "className", "enableBackgroundClick", "disableCloseOnEsc", "animate", "onClickOutside"
|
|
3
|
+
const _excluded = ["children", "open", "onClose", "className", "enableBackgroundClick", "disableCloseOnEsc", "animate", "onClickOutside"];
|
|
4
4
|
import React, { forwardRef } from "react";
|
|
5
5
|
import classnames from "classnames";
|
|
6
6
|
|
|
@@ -23,8 +23,7 @@ export const _Dialog = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
23
23
|
enableBackgroundClick = false,
|
|
24
24
|
disableCloseOnEsc = false,
|
|
25
25
|
animate = "slide",
|
|
26
|
-
onClickOutside
|
|
27
|
-
fullWidth = false
|
|
26
|
+
onClickOutside
|
|
28
27
|
} = _ref,
|
|
29
28
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
30
29
|
const animateDialog = () => {
|
|
@@ -33,15 +32,13 @@ export const _Dialog = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
33
32
|
return /*#__PURE__*/React.createElement(Fade, {
|
|
34
33
|
in: open
|
|
35
34
|
}, /*#__PURE__*/React.createElement(StyledDialog, {
|
|
36
|
-
$fullWidth: fullWidth,
|
|
37
35
|
className: classnames("c-dialog", className)
|
|
38
36
|
}, children));
|
|
39
37
|
default:
|
|
40
38
|
return /*#__PURE__*/React.createElement(SlideFromTop, {
|
|
41
39
|
in: open
|
|
42
40
|
}, /*#__PURE__*/React.createElement(StyledDialog, {
|
|
43
|
-
className: classnames("c-dialog", className)
|
|
44
|
-
$fullWidth: fullWidth
|
|
41
|
+
className: classnames("c-dialog", className)
|
|
45
42
|
}, children));
|
|
46
43
|
}
|
|
47
44
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.js","names":["React","forwardRef","classnames","DialogActions","DialogContent","DialogContentDivider","DialogTitle","StyledDialog","Modal","Fade","SlideFromTop","_Dialog","_ref","ref","children","open","onClose","className","enableBackgroundClick","disableCloseOnEsc","animate","onClickOutside","
|
|
1
|
+
{"version":3,"file":"Dialog.js","names":["React","forwardRef","classnames","DialogActions","DialogContent","DialogContentDivider","DialogTitle","StyledDialog","Modal","Fade","SlideFromTop","_Dialog","_ref","ref","children","open","onClose","className","enableBackgroundClick","disableCloseOnEsc","animate","onClickOutside","rest","_objectWithoutPropertiesLoose","_excluded","animateDialog","createElement","in","_extends","disableBackgroundClick","displayName","Dialog","Object","assign","Title","Content","ContentDivider","Actions"],"sources":["../../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["import React, { forwardRef, HTMLAttributes, PropsWithChildren } from \"react\";\n\nimport classnames from \"classnames\";\n\n// import { DialogContext } from \"./DialogContext\";\n\nimport { DialogActions } from \"./DialogActions\";\nimport { DialogContent } from \"./DialogContent\";\nimport { DialogContentDivider } from \"./DialogContentDivider\";\nimport { DialogTitle } from \"./DialogTitle\";\nimport { StyledDialog } from \"./Styles\";\nimport { Modal } from \"../Modal\";\nimport { Fade } from \"../Transitions\";\nimport { SlideFromTop } from \"../Transitions/SlideFromTop\";\n\nexport interface DialogProps extends HTMLAttributes<HTMLDivElement> {\n open?: boolean;\n onClose?: () => void;\n className?: string;\n enableBackgroundClick?: boolean;\n disableCloseOnEsc?: boolean;\n animate?: \"fade\" | \"slide\";\n onClickOutside?: (event) => void;\n}\n\nexport const _Dialog = forwardRef<\n HTMLDivElement,\n PropsWithChildren<DialogProps>\n>(\n (\n {\n children,\n open = false,\n onClose,\n className,\n enableBackgroundClick = false,\n disableCloseOnEsc = false,\n animate = \"slide\",\n onClickOutside,\n ...rest\n },\n ref\n ) => {\n const animateDialog = () => {\n switch (animate) {\n case \"fade\":\n return (\n <Fade in={open}>\n <StyledDialog className={classnames(\"c-dialog\", className)}>\n {children}\n </StyledDialog>\n </Fade>\n );\n default:\n return (\n <SlideFromTop in={open}>\n <StyledDialog className={classnames(\"c-dialog\", className)}>\n {children}\n </StyledDialog>\n </SlideFromTop>\n );\n }\n };\n\n return (\n // <DialogContext.Provider value={{}}>\n\n <Modal\n ref={ref}\n open={open}\n onClose={onClose}\n disableBackgroundClick={!enableBackgroundClick}\n disableCloseOnEsc={disableCloseOnEsc}\n onClickOutside={onClickOutside}\n {...rest}\n >\n {animateDialog()}\n </Modal>\n // </DialogContext.Provider>\n );\n }\n);\n\n_Dialog.displayName = \"Dialog\";\n\n// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/34757\nexport const Dialog = Object.assign({}, _Dialog, {\n Title: DialogTitle,\n Content: DialogContent,\n ContentDivider: DialogContentDivider,\n Actions: DialogActions,\n});\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAA2C,OAAO;AAE5E,OAAOC,UAAU,MAAM,YAAY;;AAEnC;;AAEA,SAASC,aAAa,QAAQ,iBAAiB;AAC/C,SAASC,aAAa,QAAQ,iBAAiB;AAC/C,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,YAAY,QAAQ,UAAU;AACvC,SAASC,KAAK,QAAQ,UAAU;AAChC,SAASC,IAAI,QAAQ,gBAAgB;AACrC,SAASC,YAAY,QAAQ,6BAA6B;AAY1D,OAAO,MAAMC,OAAO,gBAAGV,UAAU,CAI/B,CAAAW,IAAA,EAYEC,GAAG,KACA;EAAA,IAZH;MACEC,QAAQ;MACRC,IAAI,GAAG,KAAK;MACZC,OAA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CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
export declare const StyledDialog: import("styled-components").StyledComponent<"div", any, {
|
|
2
|
-
$fullWidth?: boolean;
|
|
3
|
-
}, never>;
|
|
1
|
+
export declare const StyledDialog: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
2
|
export declare const StyledDialogTitle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
3
|
export declare const StyledDialogContent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
4
|
export declare const StyledDialogContentDivider: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/Styles.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/Styles.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY,oEA2BxB,CAAC;AAIF,eAAO,MAAM,iBAAiB,oEAK7B,CAAC;AAGF,eAAO,MAAM,mBAAmB,oEAQ/B,CAAC;AAGF,eAAO,MAAM,0BAA0B,oEAGtC,CAAC;AAGF,eAAO,MAAM,mBAAmB,oEAK/B,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import styled
|
|
1
|
+
import styled from "styled-components";
|
|
2
2
|
import { BoxSizingStyle } from "../BoxSizingStyle";
|
|
3
3
|
import { screen } from "../BreakPoints";
|
|
4
4
|
import { FontStyle } from "../FontStyle";
|
|
5
5
|
export const StyledDialog = styled.div.withConfig({
|
|
6
6
|
displayName: "Styles__StyledDialog",
|
|
7
7
|
componentId: "sc-jwpvgm-0"
|
|
8
|
-
})(["display:flex;flex-direction:column;flex:1 1 auto;max-height:calc(100vh - 156px);background-color:var(--page-paper-main);color:var(--color-theme-900);box-shadow:var(--shadow-primary);border-radius:8px;width:310px;margin:60px auto 30px auto;position:relative
|
|
8
|
+
})(["display:flex;flex-direction:column;flex:1 1 auto;max-height:calc(100vh - 156px);background-color:var(--page-paper-main);color:var(--color-theme-900);box-shadow:var(--shadow-primary);border-radius:8px;width:310px;margin:60px auto 30px auto;position:relative;@media (max-width:640px){width:calc(100% - 32px);max-width:640px;margin-left:16px !important;margin-right:16px !important;}", " ", " ", "{width:540px;margin:126px auto 30px auto;}"], FontStyle, BoxSizingStyle, screen.sm);
|
|
9
9
|
StyledDialog.displayName = "StyledDialog";
|
|
10
10
|
export const StyledDialogTitle = styled.div.withConfig({
|
|
11
11
|
displayName: "Styles__StyledDialogTitle",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Styles.js","names":["styled","
|
|
1
|
+
{"version":3,"file":"Styles.js","names":["styled","BoxSizingStyle","screen","FontStyle","StyledDialog","div","withConfig","displayName","componentId","sm","StyledDialogTitle","StyledDialogContent","StyledDialogContentDivider","StyledDialogActions"],"sources":["../../../../src/components/Dialog/Styles.ts"],"sourcesContent":["import styled from \"styled-components\";\n\nimport { BoxSizingStyle } from \"../BoxSizingStyle\";\nimport { screen } from \"../BreakPoints\";\nimport { FontStyle } from \"../FontStyle\";\n\nexport const StyledDialog = styled.div`\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n max-height: calc(100vh - 156px);\n background-color: var(--page-paper-main);\n color: var(--color-theme-900);\n box-shadow: var(--shadow-primary);\n border-radius: 8px;\n width: 310px;\n margin: 60px auto 30px auto;\n position: relative;\n\n @media (max-width: 640px) {\n width: calc(100% - 32px);\n max-width: 640px;\n margin-left: 16px !important;\n margin-right: 16px !important;\n }\n\n ${FontStyle}\n ${BoxSizingStyle}\n\n ${screen.sm} {\n width: 540px;\n margin: 126px auto 30px auto;\n }\n`;\n\nStyledDialog.displayName = \"StyledDialog\";\n\nexport const StyledDialogTitle = styled.div`\n padding: 20px 30px;\n\n ${FontStyle}\n ${BoxSizingStyle}\n`;\nStyledDialogTitle.displayName = \"StyledDialogTitle\";\n\nexport const StyledDialogContent = styled.div`\n padding: 20px 30px;\n max-height: 580px;\n overflow-y: auto;\n flex: 1 1 auto;\n\n ${FontStyle}\n ${BoxSizingStyle}\n`;\nStyledDialogContent.displayName = \"StyledDialogContent\";\n\nexport const StyledDialogContentDivider = styled.div`\n border-top: 1px solid var(--border-primary);\n height: 1px;\n`;\nStyledDialogContentDivider.displayName = \"StyledDialogContentDivider\";\n\nexport const StyledDialogActions = styled.div`\n padding: 20px 30px;\n\n ${FontStyle}\n ${BoxSizingStyle}\n`;\nStyledDialogActions.displayName = \"StyledDialogActions\";\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,mBAAmB;AAEtC,SAASC,cAAc,QAAQ,mBAAmB;AAClD,SAASC,MAAM,QAAQ,gBAAgB;AACvC,SAASC,SAAS,QAAQ,cAAc;AAExC,OAAO,MAAMC,YAAY,GAAGJ,MAAM,CAACK,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,6bAoBlCL,SAAS,EACTF,cAAc,EAEdC,MAAM,CAACO,EAAE,CAIZ;AAEDL,YAAY,CAACG,WAAW,GAAG,cAAc;AAEzC,OAAO,MAAMG,iBAAiB,GAAGV,MAAM,CAACK,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,oCAGvCL,SAAS,EACTF,cAAc,CACjB;AACDS,iBAAiB,CAACH,WAAW,GAAG,mBAAmB;AAEnD,OAAO,MAAMI,mBAAmB,GAAGX,MAAM,CAACK,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,mFAMzCL,SAAS,EACTF,cAAc,CACjB;AACDU,mBAAmB,CAACJ,WAAW,GAAG,qBAAqB;AAEvD,OAAO,MAAMK,0BAA0B,GAAGZ,MAAM,CAACK,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,8DAGnD;AACDI,0BAA0B,CAACL,WAAW,GAAG,4BAA4B;AAErE,OAAO,MAAMM,mBAAmB,GAAGb,MAAM,CAACK,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,oCAGzCL,SAAS,EACTF,cAAc,CACjB;AACDY,mBAAmB,CAACN,WAAW,GAAG,qBAAqB","ignoreList":[]}
|
package/dist/index.js
CHANGED
|
@@ -12817,9 +12817,7 @@
|
|
|
12817
12817
|
var StyledDialog = styled__default["default"].div.withConfig({
|
|
12818
12818
|
displayName: "Styles__StyledDialog",
|
|
12819
12819
|
componentId: "sc-jwpvgm-0"
|
|
12820
|
-
})(["display:flex;flex-direction:column;flex:1 1 auto;max-height:calc(100vh - 156px);background-color:var(--page-paper-main);color:var(--color-theme-900);box-shadow:var(--shadow-primary);border-radius:8px;width:310px;margin:60px auto 30px auto;position:relative;
|
|
12821
|
-
return props.$fullWidth && styled.css(["@media (max-width:640px){width:calc(100% - 32px);max-width:640px;margin-left:16px;margin-right:16px;}"]);
|
|
12822
|
-
}, FontStyle, BoxSizingStyle, screen.sm);
|
|
12820
|
+
})(["display:flex;flex-direction:column;flex:1 1 auto;max-height:calc(100vh - 156px);background-color:var(--page-paper-main);color:var(--color-theme-900);box-shadow:var(--shadow-primary);border-radius:8px;width:310px;margin:60px auto 30px auto;position:relative;@media (max-width:640px){width:calc(100% - 32px);max-width:640px;margin-left:16px !important;margin-right:16px !important;}", " ", " ", "{width:540px;margin:126px auto 30px auto;}"], FontStyle, BoxSizingStyle, screen.sm);
|
|
12823
12821
|
StyledDialog.displayName = "StyledDialog";
|
|
12824
12822
|
var StyledDialogTitle = styled__default["default"].div.withConfig({
|
|
12825
12823
|
displayName: "Styles__StyledDialogTitle",
|
|
@@ -13312,7 +13310,7 @@
|
|
|
13312
13310
|
};
|
|
13313
13311
|
Scale.displayName = "Scale";
|
|
13314
13312
|
|
|
13315
|
-
var _excluded$1b = ["children", "open", "onClose", "className", "enableBackgroundClick", "disableCloseOnEsc", "animate", "onClickOutside"
|
|
13313
|
+
var _excluded$1b = ["children", "open", "onClose", "className", "enableBackgroundClick", "disableCloseOnEsc", "animate", "onClickOutside"];
|
|
13316
13314
|
var _Dialog = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
13317
13315
|
var children = _ref.children,
|
|
13318
13316
|
_ref$open = _ref.open,
|
|
@@ -13326,8 +13324,6 @@
|
|
|
13326
13324
|
_ref$animate = _ref.animate,
|
|
13327
13325
|
animate = _ref$animate === void 0 ? "slide" : _ref$animate,
|
|
13328
13326
|
onClickOutside = _ref.onClickOutside,
|
|
13329
|
-
_ref$fullWidth = _ref.fullWidth,
|
|
13330
|
-
fullWidth = _ref$fullWidth === void 0 ? false : _ref$fullWidth,
|
|
13331
13327
|
rest = _objectWithoutProperties(_ref, _excluded$1b);
|
|
13332
13328
|
var animateDialog = function animateDialog() {
|
|
13333
13329
|
switch (animate) {
|
|
@@ -13335,15 +13331,13 @@
|
|
|
13335
13331
|
return /*#__PURE__*/React__default["default"].createElement(Fade, {
|
|
13336
13332
|
in: open
|
|
13337
13333
|
}, /*#__PURE__*/React__default["default"].createElement(StyledDialog, {
|
|
13338
|
-
$fullWidth: fullWidth,
|
|
13339
13334
|
className: classNames__default["default"]("c-dialog", className)
|
|
13340
13335
|
}, children));
|
|
13341
13336
|
default:
|
|
13342
13337
|
return /*#__PURE__*/React__default["default"].createElement(SlideFromTop, {
|
|
13343
13338
|
in: open
|
|
13344
13339
|
}, /*#__PURE__*/React__default["default"].createElement(StyledDialog, {
|
|
13345
|
-
className: classNames__default["default"]("c-dialog", className)
|
|
13346
|
-
$fullWidth: fullWidth
|
|
13340
|
+
className: classNames__default["default"]("c-dialog", className)
|
|
13347
13341
|
}, children));
|
|
13348
13342
|
}
|
|
13349
13343
|
};
|
|
@@ -13388,9 +13382,7 @@
|
|
|
13388
13382
|
_ref$shouldShowCancel = _ref.shouldShowCancelButton,
|
|
13389
13383
|
shouldShowCancelButton = _ref$shouldShowCancel === void 0 ? true : _ref$shouldShowCancel,
|
|
13390
13384
|
_ref$isLoading = _ref.isLoading,
|
|
13391
|
-
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading
|
|
13392
|
-
_ref$fullWidth = _ref.fullWidth,
|
|
13393
|
-
fullWidth = _ref$fullWidth === void 0 ? false : _ref$fullWidth;
|
|
13385
|
+
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading;
|
|
13394
13386
|
React.useEffect(function () {
|
|
13395
13387
|
var handleKeyDown = function handleKeyDown(event) {
|
|
13396
13388
|
if (event.key === "Enter" && onConfirm) {
|
|
@@ -13410,8 +13402,7 @@
|
|
|
13410
13402
|
open: open,
|
|
13411
13403
|
onClose: onCancel,
|
|
13412
13404
|
className: classNames__default["default"]("c-confirm-dialog", className),
|
|
13413
|
-
disableCloseOnEsc: isLoading
|
|
13414
|
-
fullWidth: fullWidth
|
|
13405
|
+
disableCloseOnEsc: isLoading
|
|
13415
13406
|
}, /*#__PURE__*/React__default["default"].createElement(Dialog.Title, null, dialogTitle), /*#__PURE__*/React__default["default"].createElement(Dialog.ContentDivider, null), /*#__PURE__*/React__default["default"].createElement(Dialog.Content, null, /*#__PURE__*/React__default["default"].createElement(Body2, {
|
|
13416
13407
|
lineHeight: "loose",
|
|
13417
13408
|
color: "secondary",
|