@activecollab/components 2.0.435 → 2.0.436
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 +6 -5
- package/dist/cjs/components/ConfirmDialog/ConfirmDialog.js.map +1 -1
- package/dist/cjs/components/Dialog/Dialog.js +65 -43
- package/dist/cjs/components/Dialog/Dialog.js.map +1 -1
- package/dist/cjs/components/Dialog/DialogActions.js +13 -5
- package/dist/cjs/components/Dialog/DialogActions.js.map +1 -1
- package/dist/cjs/components/Dialog/DialogContent.js +4 -5
- package/dist/cjs/components/Dialog/DialogContent.js.map +1 -1
- package/dist/cjs/components/Dialog/DialogContext.js +14 -7
- package/dist/cjs/components/Dialog/DialogContext.js.map +1 -1
- package/dist/cjs/components/Dialog/DialogTitle.js +19 -5
- package/dist/cjs/components/Dialog/DialogTitle.js.map +1 -1
- package/dist/cjs/components/Dialog/Styles.js +55 -13
- package/dist/cjs/components/Dialog/Styles.js.map +1 -1
- package/dist/cjs/components/Dialog/index.js +11 -0
- package/dist/cjs/components/Dialog/index.js.map +1 -1
- package/dist/cjs/components/Modal/Modal.js +3 -2
- package/dist/cjs/components/Modal/Modal.js.map +1 -1
- package/dist/cjs/components/Transitions/Fade/Fade.js +11 -2
- package/dist/cjs/components/Transitions/Fade/Fade.js.map +1 -1
- package/dist/cjs/components/Transitions/SlideFromTop/SlideFromTop.js +46 -30
- package/dist/cjs/components/Transitions/SlideFromTop/SlideFromTop.js.map +1 -1
- package/dist/cjs/components/Wizard/Step.js +4 -1
- package/dist/cjs/components/Wizard/Step.js.map +1 -1
- package/dist/cjs/components/Wizard/Wizard.js +14 -2
- package/dist/cjs/components/Wizard/Wizard.js.map +1 -1
- package/dist/esm/components/ConfirmDialog/ConfirmDialog.d.ts +3 -0
- package/dist/esm/components/ConfirmDialog/ConfirmDialog.d.ts.map +1 -1
- package/dist/esm/components/ConfirmDialog/ConfirmDialog.js +6 -5
- package/dist/esm/components/ConfirmDialog/ConfirmDialog.js.map +1 -1
- package/dist/esm/components/Dialog/Dialog.d.ts +7 -2
- package/dist/esm/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/esm/components/Dialog/Dialog.js +65 -48
- package/dist/esm/components/Dialog/Dialog.js.map +1 -1
- package/dist/esm/components/Dialog/DialogActions.d.ts.map +1 -1
- package/dist/esm/components/Dialog/DialogActions.js +10 -5
- package/dist/esm/components/Dialog/DialogActions.js.map +1 -1
- package/dist/esm/components/Dialog/DialogContent.d.ts +5 -1
- package/dist/esm/components/Dialog/DialogContent.d.ts.map +1 -1
- package/dist/esm/components/Dialog/DialogContent.js +4 -5
- package/dist/esm/components/Dialog/DialogContent.js.map +1 -1
- package/dist/esm/components/Dialog/DialogContext.d.ts +11 -1
- package/dist/esm/components/Dialog/DialogContext.d.ts.map +1 -1
- package/dist/esm/components/Dialog/DialogContext.js +10 -8
- package/dist/esm/components/Dialog/DialogContext.js.map +1 -1
- package/dist/esm/components/Dialog/DialogTitle.d.ts +4 -1
- package/dist/esm/components/Dialog/DialogTitle.d.ts.map +1 -1
- package/dist/esm/components/Dialog/DialogTitle.js +20 -6
- package/dist/esm/components/Dialog/DialogTitle.js.map +1 -1
- package/dist/esm/components/Dialog/Styles.d.ts +19 -2
- package/dist/esm/components/Dialog/Styles.d.ts.map +1 -1
- package/dist/esm/components/Dialog/Styles.js +47 -11
- package/dist/esm/components/Dialog/Styles.js.map +1 -1
- package/dist/esm/components/Dialog/index.d.ts +1 -0
- package/dist/esm/components/Dialog/index.d.ts.map +1 -1
- package/dist/esm/components/Dialog/index.js +1 -0
- package/dist/esm/components/Dialog/index.js.map +1 -1
- package/dist/esm/components/Modal/Modal.d.ts.map +1 -1
- package/dist/esm/components/Modal/Modal.js +3 -2
- package/dist/esm/components/Modal/Modal.js.map +1 -1
- package/dist/esm/components/Transitions/Fade/Fade.d.ts.map +1 -1
- package/dist/esm/components/Transitions/Fade/Fade.js +11 -2
- package/dist/esm/components/Transitions/Fade/Fade.js.map +1 -1
- package/dist/esm/components/Transitions/SlideFromTop/SlideFromTop.d.ts +2 -0
- package/dist/esm/components/Transitions/SlideFromTop/SlideFromTop.d.ts.map +1 -1
- package/dist/esm/components/Transitions/SlideFromTop/SlideFromTop.js +46 -30
- package/dist/esm/components/Transitions/SlideFromTop/SlideFromTop.js.map +1 -1
- package/dist/esm/components/Wizard/Step.d.ts +4 -0
- package/dist/esm/components/Wizard/Step.d.ts.map +1 -1
- package/dist/esm/components/Wizard/Step.js +4 -1
- package/dist/esm/components/Wizard/Step.js.map +1 -1
- package/dist/esm/components/Wizard/Wizard.d.ts +3 -0
- package/dist/esm/components/Wizard/Wizard.d.ts.map +1 -1
- package/dist/esm/components/Wizard/Wizard.js +14 -2
- package/dist/esm/components/Wizard/Wizard.js.map +1 -1
- package/dist/index.js +257 -116
- 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
|
@@ -1,23 +1,37 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["children", "className", "disableDefaultHeading"];
|
|
3
|
+
const _excluded = ["children", "className", "disableDefaultHeading", "onClose", "closeLabel"];
|
|
4
4
|
import React from "react";
|
|
5
5
|
import classnames from "classnames";
|
|
6
|
-
import {
|
|
6
|
+
import { useDialogContext } from "./DialogContext";
|
|
7
|
+
import { StyledDialogTitle, StyledDialogTitleBar, StyledDialogTitleClose } from "./Styles";
|
|
8
|
+
import { IconButton } from "../IconButton";
|
|
9
|
+
import { CancelCrossIcon } from "../Icons";
|
|
7
10
|
import { Header3 } from "../Typography/Variants/Header3";
|
|
8
|
-
// import { useDialogContext } from "./DialogContext";
|
|
9
|
-
|
|
10
11
|
export const DialogTitle = _ref => {
|
|
12
|
+
var _dialog$requestClose;
|
|
11
13
|
let children = _ref.children,
|
|
12
14
|
className = _ref.className,
|
|
13
15
|
_ref$disableDefaultHe = _ref.disableDefaultHeading,
|
|
14
16
|
disableDefaultHeading = _ref$disableDefaultHe === void 0 ? false : _ref$disableDefaultHe,
|
|
17
|
+
onClose = _ref.onClose,
|
|
18
|
+
_ref$closeLabel = _ref.closeLabel,
|
|
19
|
+
closeLabel = _ref$closeLabel === void 0 ? "Close" : _ref$closeLabel,
|
|
15
20
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
16
|
-
|
|
21
|
+
const dialog = useDialogContext();
|
|
22
|
+
const heading = disableDefaultHeading ? children : /*#__PURE__*/React.createElement(Header3, null, children);
|
|
17
23
|
|
|
24
|
+
// Closing through the dialog lets the exit transition run; the caller's onClose fires once it
|
|
25
|
+
// finishes. Falling back keeps a title used outside a dialog working.
|
|
26
|
+
const handleClose = (_dialog$requestClose = dialog == null ? void 0 : dialog.requestClose) != null ? _dialog$requestClose : onClose;
|
|
18
27
|
return /*#__PURE__*/React.createElement(StyledDialogTitle, _extends({
|
|
19
28
|
className: classnames("c-dialog-title-wrapper", className)
|
|
20
|
-
}, rest),
|
|
29
|
+
}, rest), onClose ? /*#__PURE__*/React.createElement(StyledDialogTitleBar, null, heading, /*#__PURE__*/React.createElement(StyledDialogTitleClose, null, /*#__PURE__*/React.createElement(IconButton, {
|
|
30
|
+
type: "button",
|
|
31
|
+
variant: "text gray",
|
|
32
|
+
"aria-label": closeLabel,
|
|
33
|
+
onClick: handleClose
|
|
34
|
+
}, /*#__PURE__*/React.createElement(CancelCrossIcon, null)))) : heading);
|
|
21
35
|
};
|
|
22
36
|
DialogTitle.displayName = "DialogTitle";
|
|
23
37
|
//# sourceMappingURL=DialogTitle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogTitle.js","names":["React","classnames","StyledDialogTitle","Header3","DialogTitle","_ref","children","className","_ref$disableDefaultHe","disableDefaultHeading","rest","_objectWithoutPropertiesLoose","_excluded","createElement","_extends","displayName"],"sources":["../../../../src/components/Dialog/DialogTitle.tsx"],"sourcesContent":["import React, { PropsWithChildren } from \"react\";\n\nimport classnames from \"classnames\";\n\nimport {
|
|
1
|
+
{"version":3,"file":"DialogTitle.js","names":["React","classnames","useDialogContext","StyledDialogTitle","StyledDialogTitleBar","StyledDialogTitleClose","IconButton","CancelCrossIcon","Header3","DialogTitle","_ref","_dialog$requestClose","children","className","_ref$disableDefaultHe","disableDefaultHeading","onClose","_ref$closeLabel","closeLabel","rest","_objectWithoutPropertiesLoose","_excluded","dialog","heading","createElement","handleClose","requestClose","_extends","type","variant","onClick","displayName"],"sources":["../../../../src/components/Dialog/DialogTitle.tsx"],"sourcesContent":["import React, { PropsWithChildren } from \"react\";\n\nimport classnames from \"classnames\";\n\nimport { useDialogContext } from \"./DialogContext\";\nimport {\n StyledDialogTitle,\n StyledDialogTitleBar,\n StyledDialogTitleClose,\n} from \"./Styles\";\nimport { IconButton } from \"../IconButton\";\nimport { CancelCrossIcon } from \"../Icons\";\nimport { Header3 } from \"../Typography/Variants/Header3\";\n\nexport interface DialogTitleProps {\n className?: string;\n disableDefaultHeading?: boolean;\n /** Draws a close button next to the heading. */\n onClose?: () => void;\n closeLabel?: string;\n}\n\nexport const DialogTitle = ({\n children,\n className,\n disableDefaultHeading = false,\n onClose,\n closeLabel = \"Close\",\n ...rest\n}: PropsWithChildren<DialogTitleProps>) => {\n const dialog = useDialogContext();\n const heading = disableDefaultHeading ? (\n children\n ) : (\n <Header3>{children}</Header3>\n );\n\n // Closing through the dialog lets the exit transition run; the caller's onClose fires once it\n // finishes. Falling back keeps a title used outside a dialog working.\n const handleClose = dialog?.requestClose ?? onClose;\n\n return (\n <StyledDialogTitle\n className={classnames(\"c-dialog-title-wrapper\", className)}\n {...rest}\n >\n {onClose ? (\n <StyledDialogTitleBar>\n {heading}\n <StyledDialogTitleClose>\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n aria-label={closeLabel}\n onClick={handleClose}\n >\n <CancelCrossIcon />\n </IconButton>\n </StyledDialogTitleClose>\n </StyledDialogTitleBar>\n ) : (\n heading\n )}\n </StyledDialogTitle>\n );\n};\n\nDialogTitle.displayName = \"DialogTitle\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAA6B,OAAO;AAEhD,OAAOC,UAAU,MAAM,YAAY;AAEnC,SAASC,gBAAgB,QAAQ,iBAAiB;AAClD,SACEC,iBAAiB,EACjBC,oBAAoB,EACpBC,sBAAsB,QACjB,UAAU;AACjB,SAASC,UAAU,QAAQ,eAAe;AAC1C,SAASC,eAAe,QAAQ,UAAU;AAC1C,SAASC,OAAO,QAAQ,gCAAgC;AAUxD,OAAO,MAAMC,WAAW,GAAGC,IAAA,IAOgB;EAAA,IAAAC,oBAAA;EAAA,IANzCC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IACRC,SAAS,GAAAH,IAAA,CAATG,SAAS;IAAAC,qBAAA,GAAAJ,IAAA,CACTK,qBAAqB;IAArBA,qBAAqB,GAAAD,qBAAA,cAAG,KAAK,GAAAA,qBAAA;IAC7BE,OAAO,GAAAN,IAAA,CAAPM,OAAO;IAAAC,eAAA,GAAAP,IAAA,CACPQ,UAAU;IAAVA,UAAU,GAAAD,eAAA,cAAG,OAAO,GAAAA,eAAA;IACjBE,IAAI,GAAAC,6BAAA,CAAAV,IAAA,EAAAW,SAAA;EAEP,MAAMC,MAAM,GAAGpB,gBAAgB,CAAC,CAAC;EACjC,MAAMqB,OAAO,GAAGR,qBAAqB,GACnCH,QAAQ,gBAERZ,KAAA,CAAAwB,aAAA,CAAChB,OAAO,QAAEI,QAAkB,CAC7B;;EAED;EACA;EACA,MAAMa,WAAW,IAAAd,oBAAA,GAAGW,MAAM,oBAANA,MAAM,CAAEI,YAAY,YAAAf,oBAAA,GAAIK,OAAO;EAEnD,oBACEhB,KAAA,CAAAwB,aAAA,CAACrB,iBAAiB,EAAAwB,QAAA;IAChBd,SAAS,EAAEZ,UAAU,CAAC,wBAAwB,EAAEY,SAAS;EAAE,GACvDM,IAAI,GAEPH,OAAO,gBACNhB,KAAA,CAAAwB,aAAA,CAACpB,oBAAoB,QAClBmB,OAAO,eACRvB,KAAA,CAAAwB,aAAA,CAACnB,sBAAsB,qBACrBL,KAAA,CAAAwB,aAAA,CAAClB,UAAU;IACTsB,IAAI,EAAC,QAAQ;IACbC,OAAO,EAAC,WAAW;IACnB,cAAYX,UAAW;IACvBY,OAAO,EAAEL;EAAY,gBAErBzB,KAAA,CAAAwB,aAAA,CAACjB,eAAe,MAAE,CACR,CACU,CACJ,CAAC,GAEvBgB,OAEe,CAAC;AAExB,CAAC;AAEDd,WAAW,CAACsB,WAAW,GAAG,aAAa","ignoreList":[]}
|
|
@@ -1,6 +1,23 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const dialogSizes: {
|
|
2
|
+
readonly s: 440;
|
|
3
|
+
readonly m: 540;
|
|
4
|
+
readonly l: 700;
|
|
5
|
+
readonly xl: 840;
|
|
6
|
+
readonly xxl: 1000;
|
|
7
|
+
readonly xxxl: 1120;
|
|
8
|
+
};
|
|
9
|
+
export type DialogSize = keyof typeof dialogSizes;
|
|
10
|
+
export declare const StyledDialogViewport: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
11
|
+
export declare const StyledDialog: import("styled-components").StyledComponent<"div", any, {
|
|
12
|
+
$maxWidth: number;
|
|
13
|
+
$height?: string;
|
|
14
|
+
}, never>;
|
|
2
15
|
export declare const StyledDialogTitle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
-
export declare const
|
|
16
|
+
export declare const StyledDialogTitleBar: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
17
|
+
export declare const StyledDialogTitleClose: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
18
|
+
export declare const StyledDialogContent: import("styled-components").StyledComponent<"div", any, {
|
|
19
|
+
$scroll: boolean;
|
|
20
|
+
}, never>;
|
|
4
21
|
export declare const StyledDialogContentDivider: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
22
|
export declare const StyledDialogActions: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
23
|
//# sourceMappingURL=Styles.d.ts.map
|
|
@@ -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,WAAW;;;;;;;CAOd,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,WAAW,CAAC;AAQlD,eAAO,MAAM,oBAAoB,oEAoChC,CAAC;AAIF,eAAO,MAAM,YAAY;eACZ,MAAM;cACP,MAAM;SA4BjB,CAAC;AAIF,eAAO,MAAM,iBAAiB,oEAM7B,CAAC;AASF,eAAO,MAAM,oBAAoB,oEAKhC,CAAC;AAGF,eAAO,MAAM,sBAAsB,oEAMlC,CAAC;AAGF,eAAO,MAAM,mBAAmB;aAAyB,OAAO;SAQ/D,CAAC;AAGF,eAAO,MAAM,0BAA0B,oEAItC,CAAC;AAGF,eAAO,MAAM,mBAAmB,oEAS/B,CAAC"}
|
|
@@ -1,30 +1,66 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
1
|
+
import styled, { css } from "styled-components";
|
|
2
2
|
import { BoxSizingStyle } from "../BoxSizingStyle";
|
|
3
3
|
import { screen } from "../BreakPoints";
|
|
4
4
|
import { FontStyle } from "../FontStyle";
|
|
5
|
+
export const dialogSizes = {
|
|
6
|
+
s: 440,
|
|
7
|
+
m: 540,
|
|
8
|
+
l: 700,
|
|
9
|
+
xl: 840,
|
|
10
|
+
xxl: 1000,
|
|
11
|
+
xxxl: 1120
|
|
12
|
+
};
|
|
13
|
+
const MIN_GAP = "2.5vh";
|
|
14
|
+
const MAX_DIALOG_HEIGHT = "95vh";
|
|
15
|
+
|
|
16
|
+
// The dialog hangs at a fixed offset while there is room below it, then grows in both directions at
|
|
17
|
+
// once. Two shrinkable spacers express that: only the lower one grows, and past the crossover both
|
|
18
|
+
// shrink from the same basis, so the gaps stay equal down to MIN_GAP.
|
|
19
|
+
export const StyledDialogViewport = styled.div.withConfig({
|
|
20
|
+
displayName: "Styles__StyledDialogViewport",
|
|
21
|
+
componentId: "sc-jwpvgm-0"
|
|
22
|
+
})(["position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;padding-left:16px;padding-right:16px;pointer-events:none;--ac-dialog-offset:60px;", "{--ac-dialog-offset:126px;}&::before,&::after{content:\"\";flex-shrink:1;flex-basis:var(--ac-dialog-offset);min-height:", ";}&::before{flex-grow:0;}&::after{flex-grow:1;}", ""], screen.sm, MIN_GAP, BoxSizingStyle);
|
|
23
|
+
StyledDialogViewport.displayName = "StyledDialogViewport";
|
|
5
24
|
export const StyledDialog = styled.div.withConfig({
|
|
6
25
|
displayName: "Styles__StyledDialog",
|
|
7
|
-
componentId: "sc-jwpvgm-
|
|
8
|
-
})(["display:flex;flex-direction:column;flex:
|
|
26
|
+
componentId: "sc-jwpvgm-1"
|
|
27
|
+
})(["display:flex;flex-direction:column;flex:0 0 auto;pointer-events:auto;width:100%;max-width:", "px;max-height:", ";background-color:var(--page-paper-main);color:var(--color-theme-900);box-shadow:var(--shadow-primary);border-radius:8px;position:relative;transition:max-width 0.2s ease,height 0.2s ease;@media (prefers-reduced-motion:reduce){transition:none;}", " ", " ", ""], props => props.$maxWidth, MAX_DIALOG_HEIGHT, props => props.$height && css(["height:", ";"], props.$height), FontStyle, BoxSizingStyle);
|
|
9
28
|
StyledDialog.displayName = "StyledDialog";
|
|
10
29
|
export const StyledDialogTitle = styled.div.withConfig({
|
|
11
30
|
displayName: "Styles__StyledDialogTitle",
|
|
12
|
-
componentId: "sc-jwpvgm-
|
|
13
|
-
})(["padding:20px 30px;", " ", ""], FontStyle, BoxSizingStyle);
|
|
31
|
+
componentId: "sc-jwpvgm-2"
|
|
32
|
+
})(["padding:20px 30px;flex:0 0 auto;", " ", ""], FontStyle, BoxSizingStyle);
|
|
14
33
|
StyledDialogTitle.displayName = "StyledDialogTitle";
|
|
34
|
+
|
|
35
|
+
// The close button hangs 8px into the title padding, so it sits nearer the dialog edge than the
|
|
36
|
+
// heading does. The bar reserves the rest, which keeps the gap to the heading unchanged.
|
|
37
|
+
const CLOSE_OFFSET = 8;
|
|
38
|
+
const CLOSE_RESERVE = 44 - CLOSE_OFFSET;
|
|
39
|
+
|
|
40
|
+
// The header is as tall as its heading, with or without a close button.
|
|
41
|
+
export const StyledDialogTitleBar = styled.div.withConfig({
|
|
42
|
+
displayName: "Styles__StyledDialogTitleBar",
|
|
43
|
+
componentId: "sc-jwpvgm-3"
|
|
44
|
+
})(["position:relative;display:flex;align-items:center;padding-right:", "px;"], CLOSE_RESERVE);
|
|
45
|
+
StyledDialogTitleBar.displayName = "StyledDialogTitleBar";
|
|
46
|
+
export const StyledDialogTitleClose = styled.div.withConfig({
|
|
47
|
+
displayName: "Styles__StyledDialogTitleClose",
|
|
48
|
+
componentId: "sc-jwpvgm-4"
|
|
49
|
+
})(["position:absolute;right:-", "px;top:50%;transform:translateY(-50%);line-height:0;"], CLOSE_OFFSET);
|
|
50
|
+
StyledDialogTitleClose.displayName = "StyledDialogTitleClose";
|
|
15
51
|
export const StyledDialogContent = styled.div.withConfig({
|
|
16
52
|
displayName: "Styles__StyledDialogContent",
|
|
17
|
-
componentId: "sc-jwpvgm-
|
|
18
|
-
})(["padding:20px 30px;
|
|
53
|
+
componentId: "sc-jwpvgm-5"
|
|
54
|
+
})(["padding:20px 30px;flex:1 1 auto;min-height:0;overflow-y:", ";", " ", ""], props => props.$scroll ? "auto" : "visible", FontStyle, BoxSizingStyle);
|
|
19
55
|
StyledDialogContent.displayName = "StyledDialogContent";
|
|
20
56
|
export const StyledDialogContentDivider = styled.div.withConfig({
|
|
21
57
|
displayName: "Styles__StyledDialogContentDivider",
|
|
22
|
-
componentId: "sc-jwpvgm-
|
|
23
|
-
})(["border-top:1px solid var(--border-primary);height:1px;"]);
|
|
58
|
+
componentId: "sc-jwpvgm-6"
|
|
59
|
+
})(["border-top:1px solid var(--border-primary);height:1px;flex:0 0 auto;"]);
|
|
24
60
|
StyledDialogContentDivider.displayName = "StyledDialogContentDivider";
|
|
25
61
|
export const StyledDialogActions = styled.div.withConfig({
|
|
26
62
|
displayName: "Styles__StyledDialogActions",
|
|
27
|
-
componentId: "sc-jwpvgm-
|
|
28
|
-
})(["padding:20px 30px;", " ", ""], FontStyle, BoxSizingStyle);
|
|
63
|
+
componentId: "sc-jwpvgm-7"
|
|
64
|
+
})(["padding:20px 30px;flex:0 0 auto;display:flex;align-items:center;gap:12px;", " ", ""], FontStyle, BoxSizingStyle);
|
|
29
65
|
StyledDialogActions.displayName = "StyledDialogActions";
|
|
30
66
|
//# sourceMappingURL=Styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Styles.js","names":["styled","BoxSizingStyle","screen","FontStyle","
|
|
1
|
+
{"version":3,"file":"Styles.js","names":["styled","css","BoxSizingStyle","screen","FontStyle","dialogSizes","s","m","l","xl","xxl","xxxl","MIN_GAP","MAX_DIALOG_HEIGHT","StyledDialogViewport","div","withConfig","displayName","componentId","sm","StyledDialog","props","$maxWidth","$height","StyledDialogTitle","CLOSE_OFFSET","CLOSE_RESERVE","StyledDialogTitleBar","StyledDialogTitleClose","StyledDialogContent","$scroll","StyledDialogContentDivider","StyledDialogActions"],"sources":["../../../../src/components/Dialog/Styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { BoxSizingStyle } from \"../BoxSizingStyle\";\nimport { screen } from \"../BreakPoints\";\nimport { FontStyle } from \"../FontStyle\";\n\nexport const dialogSizes = {\n s: 440,\n m: 540,\n l: 700,\n xl: 840,\n xxl: 1000,\n xxxl: 1120,\n} as const;\n\nexport type DialogSize = keyof typeof dialogSizes;\n\nconst MIN_GAP = \"2.5vh\";\nconst MAX_DIALOG_HEIGHT = \"95vh\";\n\n// The dialog hangs at a fixed offset while there is room below it, then grows in both directions at\n// once. Two shrinkable spacers express that: only the lower one grows, and past the crossover both\n// shrink from the same basis, so the gaps stay equal down to MIN_GAP.\nexport const StyledDialogViewport = styled.div`\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n padding-left: 16px;\n padding-right: 16px;\n pointer-events: none;\n\n --ac-dialog-offset: 60px;\n\n ${screen.sm} {\n --ac-dialog-offset: 126px;\n }\n\n &::before,\n &::after {\n content: \"\";\n flex-shrink: 1;\n flex-basis: var(--ac-dialog-offset);\n min-height: ${MIN_GAP};\n }\n\n &::before {\n flex-grow: 0;\n }\n\n &::after {\n flex-grow: 1;\n }\n\n ${BoxSizingStyle}\n`;\n\nStyledDialogViewport.displayName = \"StyledDialogViewport\";\n\nexport const StyledDialog = styled.div<{\n $maxWidth: number;\n $height?: string;\n}>`\n display: flex;\n flex-direction: column;\n flex: 0 0 auto;\n pointer-events: auto;\n width: 100%;\n max-width: ${(props) => props.$maxWidth}px;\n max-height: ${MAX_DIALOG_HEIGHT};\n background-color: var(--page-paper-main);\n color: var(--color-theme-900);\n box-shadow: var(--shadow-primary);\n border-radius: 8px;\n position: relative;\n transition: max-width 0.2s ease, height 0.2s ease;\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n\n ${(props) =>\n props.$height &&\n css`\n height: ${props.$height};\n `}\n\n ${FontStyle}\n ${BoxSizingStyle}\n`;\n\nStyledDialog.displayName = \"StyledDialog\";\n\nexport const StyledDialogTitle = styled.div`\n padding: 20px 30px;\n flex: 0 0 auto;\n\n ${FontStyle}\n ${BoxSizingStyle}\n`;\nStyledDialogTitle.displayName = \"StyledDialogTitle\";\n\n// The close button hangs 8px into the title padding, so it sits nearer the dialog edge than the\n// heading does. The bar reserves the rest, which keeps the gap to the heading unchanged.\nconst CLOSE_OFFSET = 8;\nconst CLOSE_RESERVE = 44 - CLOSE_OFFSET;\n\n// The header is as tall as its heading, with or without a close button.\nexport const StyledDialogTitleBar = styled.div`\n position: relative;\n display: flex;\n align-items: center;\n padding-right: ${CLOSE_RESERVE}px;\n`;\nStyledDialogTitleBar.displayName = \"StyledDialogTitleBar\";\n\nexport const StyledDialogTitleClose = styled.div`\n position: absolute;\n right: -${CLOSE_OFFSET}px;\n top: 50%;\n transform: translateY(-50%);\n line-height: 0;\n`;\nStyledDialogTitleClose.displayName = \"StyledDialogTitleClose\";\n\nexport const StyledDialogContent = styled.div<{ $scroll: boolean }>`\n padding: 20px 30px;\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: ${(props) => (props.$scroll ? \"auto\" : \"visible\")};\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 flex: 0 0 auto;\n`;\nStyledDialogContentDivider.displayName = \"StyledDialogContentDivider\";\n\nexport const StyledDialogActions = styled.div`\n padding: 20px 30px;\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n gap: 12px;\n\n ${FontStyle}\n ${BoxSizingStyle}\n`;\nStyledDialogActions.displayName = \"StyledDialogActions\";\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAE/C,SAASC,cAAc,QAAQ,mBAAmB;AAClD,SAASC,MAAM,QAAQ,gBAAgB;AACvC,SAASC,SAAS,QAAQ,cAAc;AAExC,OAAO,MAAMC,WAAW,GAAG;EACzBC,CAAC,EAAE,GAAG;EACNC,CAAC,EAAE,GAAG;EACNC,CAAC,EAAE,GAAG;EACNC,EAAE,EAAE,GAAG;EACPC,GAAG,EAAE,IAAI;EACTC,IAAI,EAAE;AACR,CAAU;AAIV,MAAMC,OAAO,GAAG,OAAO;AACvB,MAAMC,iBAAiB,GAAG,MAAM;;AAEhC;A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,KAAK,IAAMA,KAAK,CAACS,OAAO,GAAG,MAAM,GAAG,SAAU,EAE3D1B,SAAS,EACTF,cAAc,CACjB;AACD2B,mBAAmB,CAACZ,WAAW,GAAG,qBAAqB;AAEvD,OAAO,MAAMc,0BAA0B,GAAG/B,MAAM,CAACe,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,4EAInD;AACDa,0BAA0B,CAACd,WAAW,GAAG,4BAA4B;AAErE,OAAO,MAAMe,mBAAmB,GAAGhC,MAAM,CAACe,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,2FAOzCd,SAAS,EACTF,cAAc,CACjB;AACD8B,mBAAmB,CAACf,WAAW,GAAG,qBAAqB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/Dialog/index.ts"],"sourcesContent":["export * from \"./Dialog\";\n"],"mappings":"AAAA,cAAc,UAAU","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/Dialog/index.ts"],"sourcesContent":["export * from \"./Dialog\";\nexport * from \"./DialogContext\";\n"],"mappings":"AAAA,cAAc,UAAU;AACxB,cAAc,iBAAiB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAOZ,YAAY,EAIb,MAAM,OAAO,CAAC;AAOf,MAAM,WAAW,MAAM;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,YAAY,CAAC;IACvB,cAAc,CAAC,EAAE,CAAC,KAAK,KAAA,KAAK,IAAI,CAAC;CAClC;AAQD,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAOZ,YAAY,EAIb,MAAM,OAAO,CAAC;AAOf,MAAM,WAAW,MAAM;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,YAAY,CAAC;IACvB,cAAc,CAAC,EAAE,CAAC,KAAK,KAAA,KAAK,IAAI,CAAC;CAClC;AAQD,eAAO,MAAM,KAAK,sHAwGjB,CAAC"}
|
|
@@ -70,11 +70,12 @@ export const Modal = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
70
70
|
props = {
|
|
71
71
|
onEnter: createChainedFunction(handleEnter, children.props.onEnter),
|
|
72
72
|
onExited: createChainedFunction(handleExited, children.props.onExited),
|
|
73
|
-
in: open
|
|
73
|
+
in: open,
|
|
74
|
+
forceClose: handleClose
|
|
74
75
|
};
|
|
75
76
|
}
|
|
76
77
|
return props;
|
|
77
|
-
}, [children, handleEnter, handleExited, hasTransition, open]);
|
|
78
|
+
}, [children, handleClose, handleEnter, handleExited, hasTransition, open]);
|
|
78
79
|
if (!open && (!hasTransition || exited)) {
|
|
79
80
|
return null;
|
|
80
81
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","names":["React","forwardRef","useRef","cloneElement","useMemo","useCallback","useState","useEffect","createChainedFunction","useForkRef","Overlay","Window","getHasTransition","children","props","Object","prototype","hasOwnProperty","call","Modal","_ref","ref","_ref$disableFocusLock","disableFocusLock","_ref$disableScrollLoc","disableScrollLock","_ref$disableBackgroun","disableBackgroundClick","_ref$disableBackgroun2","disableBackgroundColor","_ref$disableCloseOnEs","disableCloseOnEsc","_ref$open","open","defaultOpen","onClose","onClickOutside","rest","_objectWithoutPropertiesLoose","_excluded","_useState","setOpen","_useState2","exited","setExited","innerRef","handleRef","hasTransition","handleClose","handleBackgroundClick","event","preventDefault","handleEnter","handleExited","childProps","onEnter","onExited","in","createElement","_extends","onClick","displayName"],"sources":["../../../../src/components/Modal/Modal.tsx"],"sourcesContent":["import React, {\n forwardRef,\n HTMLAttributes,\n useRef,\n cloneElement,\n useMemo,\n useCallback,\n ReactElement,\n useState,\n useEffect,\n MouseEvent,\n} from \"react\";\n\nimport createChainedFunction from \"../../utils/createChainedFunction\";\nimport useForkRef from \"../../utils/useForkRef\";\nimport { Overlay } from \"../Overlay\";\nimport { Window } from \"../Window\";\n\nexport interface IModal {\n disableFocusLock?: boolean;\n disableScrollLock?: boolean;\n open?: boolean;\n disableBackgroundClick?: boolean;\n disableCloseOnEsc?: boolean;\n disableBackgroundColor?: boolean;\n onClose?: () => void;\n children: ReactElement;\n onClickOutside?: (event) => void;\n}\n\nconst getHasTransition = (children): boolean => {\n return children.props\n ? Object.prototype.hasOwnProperty.call(children.props, \"in\")\n : false;\n};\n\nexport const Modal = forwardRef<\n HTMLDivElement,\n IModal & HTMLAttributes<HTMLDivElement>\n>(\n (\n {\n children,\n disableFocusLock = false,\n disableScrollLock = false,\n disableBackgroundClick = false,\n disableBackgroundColor = false,\n disableCloseOnEsc = false,\n open: defaultOpen = false,\n onClose,\n onClickOutside,\n ...rest\n },\n ref\n ) => {\n const [open, setOpen] = useState(defaultOpen);\n const [exited, setExited] = useState(true);\n const innerRef = useRef<HTMLDivElement>(null);\n const handleRef = useForkRef(innerRef, ref);\n\n const hasTransition = useMemo(() => {\n return getHasTransition(children);\n }, [children]);\n\n useEffect(() => {\n setOpen(defaultOpen);\n }, [defaultOpen]);\n\n const handleClose = useCallback(() => {\n setOpen(false);\n if (!hasTransition) {\n typeof onClose === \"function\" && onClose();\n }\n }, [hasTransition, onClose]);\n\n const handleBackgroundClick = useCallback(\n (event: MouseEvent<HTMLDivElement>) => {\n if (!disableBackgroundClick) {\n event.preventDefault();\n return handleClose();\n }\n\n if (onClickOutside) {\n onClickOutside(event);\n }\n },\n [disableBackgroundClick, onClickOutside, handleClose]\n );\n\n const handleEnter = useCallback(() => {\n setExited(false);\n }, []);\n\n const handleExited = useCallback(() => {\n setExited(true);\n typeof onClose === \"function\" && onClose();\n }, [onClose]);\n\n const childProps = useMemo(() => {\n let props = {};\n\n // It's a Transition like component\n if (hasTransition && children) {\n props = {\n onEnter: createChainedFunction(handleEnter, children.props.onEnter),\n onExited: createChainedFunction(\n handleExited,\n children.props.onExited\n ),\n in: open,\n };\n }\n\n return props;\n }, [children, handleEnter, handleExited, hasTransition, open]);\n\n if (!open && (!hasTransition || exited)) {\n return null;\n }\n\n return (\n <Window\n {...rest}\n ref={handleRef}\n onClose={handleClose}\n disableFocusLock={disableFocusLock}\n disableScrollLock={disableScrollLock}\n disableCloseOnEsc={disableCloseOnEsc}\n >\n {open ? (\n <Overlay\n onClick={handleBackgroundClick}\n disableBackgroundColor={disableBackgroundColor}\n />\n ) : null}\n {cloneElement(children, childProps)}\n </Window>\n );\n }\n);\n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AW,GAAG/C,WAAW,CAAC,MAAM;IACpCuC,SAAS,CAAC,KAAK,CAAC;EAClB,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMS,YAAY,GAAGhD,WAAW,CAAC,MAAM;IACrCuC,SAAS,CAAC,IAAI,CAAC;IACf,OAAOT,OAAO,KAAK,UAAU,IAAIA,OAAO,CAAC,CAAC;EAC5C,CAAC,EAAE,CAACA,OAAO,CAAC,CAAC;EAEb,MAAMmB,UAAU,GAAGlD,OAAO,CAAC,MAAM;IAC/B,IAAIU,KAAK,GAAG,CAAC,CAAC;;IAEd;IACA,IAAIiC,aAAa,IAAIlC,QAAQ,EAAE;MAC7BC,KAAK,GAAG;QACNyC,OAAO,EAAE/C,qBAAqB,CAAC4C,WAAW,EAAEvC,QAAQ,CAACC,KAAK,CAACyC,OAAO,CAAC;QACnEC,QAAQ,EAAEhD,qBAAqB,CAC7B6C,YAAY,EACZxC,QAAQ,CAACC,KAAK,CAAC0C,QACjB,CAAC;QACDC,EAAE,EAAExB;
|
|
1
|
+
{"version":3,"file":"Modal.js","names":["React","forwardRef","useRef","cloneElement","useMemo","useCallback","useState","useEffect","createChainedFunction","useForkRef","Overlay","Window","getHasTransition","children","props","Object","prototype","hasOwnProperty","call","Modal","_ref","ref","_ref$disableFocusLock","disableFocusLock","_ref$disableScrollLoc","disableScrollLock","_ref$disableBackgroun","disableBackgroundClick","_ref$disableBackgroun2","disableBackgroundColor","_ref$disableCloseOnEs","disableCloseOnEsc","_ref$open","open","defaultOpen","onClose","onClickOutside","rest","_objectWithoutPropertiesLoose","_excluded","_useState","setOpen","_useState2","exited","setExited","innerRef","handleRef","hasTransition","handleClose","handleBackgroundClick","event","preventDefault","handleEnter","handleExited","childProps","onEnter","onExited","in","forceClose","createElement","_extends","onClick","displayName"],"sources":["../../../../src/components/Modal/Modal.tsx"],"sourcesContent":["import React, {\n forwardRef,\n HTMLAttributes,\n useRef,\n cloneElement,\n useMemo,\n useCallback,\n ReactElement,\n useState,\n useEffect,\n MouseEvent,\n} from \"react\";\n\nimport createChainedFunction from \"../../utils/createChainedFunction\";\nimport useForkRef from \"../../utils/useForkRef\";\nimport { Overlay } from \"../Overlay\";\nimport { Window } from \"../Window\";\n\nexport interface IModal {\n disableFocusLock?: boolean;\n disableScrollLock?: boolean;\n open?: boolean;\n disableBackgroundClick?: boolean;\n disableCloseOnEsc?: boolean;\n disableBackgroundColor?: boolean;\n onClose?: () => void;\n children: ReactElement;\n onClickOutside?: (event) => void;\n}\n\nconst getHasTransition = (children): boolean => {\n return children.props\n ? Object.prototype.hasOwnProperty.call(children.props, \"in\")\n : false;\n};\n\nexport const Modal = forwardRef<\n HTMLDivElement,\n IModal & HTMLAttributes<HTMLDivElement>\n>(\n (\n {\n children,\n disableFocusLock = false,\n disableScrollLock = false,\n disableBackgroundClick = false,\n disableBackgroundColor = false,\n disableCloseOnEsc = false,\n open: defaultOpen = false,\n onClose,\n onClickOutside,\n ...rest\n },\n ref\n ) => {\n const [open, setOpen] = useState(defaultOpen);\n const [exited, setExited] = useState(true);\n const innerRef = useRef<HTMLDivElement>(null);\n const handleRef = useForkRef(innerRef, ref);\n\n const hasTransition = useMemo(() => {\n return getHasTransition(children);\n }, [children]);\n\n useEffect(() => {\n setOpen(defaultOpen);\n }, [defaultOpen]);\n\n const handleClose = useCallback(() => {\n setOpen(false);\n if (!hasTransition) {\n typeof onClose === \"function\" && onClose();\n }\n }, [hasTransition, onClose]);\n\n const handleBackgroundClick = useCallback(\n (event: MouseEvent<HTMLDivElement>) => {\n if (!disableBackgroundClick) {\n event.preventDefault();\n return handleClose();\n }\n\n if (onClickOutside) {\n onClickOutside(event);\n }\n },\n [disableBackgroundClick, onClickOutside, handleClose]\n );\n\n const handleEnter = useCallback(() => {\n setExited(false);\n }, []);\n\n const handleExited = useCallback(() => {\n setExited(true);\n typeof onClose === \"function\" && onClose();\n }, [onClose]);\n\n const childProps = useMemo(() => {\n let props = {};\n\n // It's a Transition like component\n if (hasTransition && children) {\n props = {\n onEnter: createChainedFunction(handleEnter, children.props.onEnter),\n onExited: createChainedFunction(\n handleExited,\n children.props.onExited\n ),\n in: open,\n forceClose: handleClose,\n };\n }\n\n return props;\n }, [children, handleClose, handleEnter, handleExited, hasTransition, open]);\n\n if (!open && (!hasTransition || exited)) {\n return null;\n }\n\n return (\n <Window\n {...rest}\n ref={handleRef}\n onClose={handleClose}\n disableFocusLock={disableFocusLock}\n disableScrollLock={disableScrollLock}\n disableCloseOnEsc={disableCloseOnEsc}\n >\n {open ? (\n <Overlay\n onClick={handleBackgroundClick}\n disableBackgroundColor={disableBackgroundColor}\n />\n ) : null}\n {cloneElement(children, childProps)}\n </Window>\n );\n }\n);\n\nModal.displayName = \"Modal\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,IACVC,UAAU,EAEVC,MAAM,EACNC,YAAY,EACZC,OAAO,EACPC,WAAW,EAEXC,QAAQ,EACRC,SAAS,QAEJ,OAAO;AAEd,OAAOC,qBAAqB,MAAM,mCAAmC;AACrE,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,SAASC,OAAO,QAAQ,YAAY;AACpC,SAASC,MAAM,QAAQ,WAAW;AAclC,MAAMC,gBAAgB,GAAIC,QAAQ,IAAc;EAC9C,OAAOA,QAAQ,CAACC,KAAK,GACjBC,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACL,QAAQ,CAACC,KAAK,EAAE,IAAI,CAAC,GAC1D,KAAK;AACX,CAAC;AAED,OAAO,MAAMK,KAAK,gBAAGlB,UAAU,CAI7B,CAAAmB,IAAA,EAaEC,GAAG,KACA;EAAA,IAZDR,QAAQ,GAAAO,IAAA,CAARP,QAAQ;IAAAS,qBAAA,GAAAF,IAAA,CACRG,gBAAgB;IAAhBA,gBAAgB,GAAAD,qBAAA,cAAG,KAAK,GAAAA,qBAAA;IAAAE,qBAAA,GAAAJ,IAAA,CACxBK,iBAAiB;IAAjBA,iBAAiB,GAAAD,qBAAA,cAAG,KAAK,GAAAA,qBAAA;I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AI,CAACA,IAAI,KAAK,CAACc,aAAa,IAAIJ,MAAM,CAAC,EAAE;IACvC,OAAO,IAAI;EACb;EAEA,oBACE3C,KAAA,CAAA2D,aAAA,CAAChD,MAAM,EAAAiD,QAAA,KACDvB,IAAI;IACRhB,GAAG,EAAEyB,SAAU;IACfX,OAAO,EAAEa,WAAY;IACrBzB,gBAAgB,EAAEA,gBAAiB;IACnCE,iBAAiB,EAAEA,iBAAkB;IACrCM,iBAAiB,EAAEA;EAAkB,IAEpCE,IAAI,gBACHjC,KAAA,CAAA2D,aAAA,CAACjD,OAAO;IACNmD,OAAO,EAAEZ,qBAAsB;IAC/BpB,sBAAsB,EAAEA;EAAuB,CAChD,CAAC,GACA,IAAI,eACP1B,YAAY,CAACU,QAAQ,EAAEyC,UAAU,CAC5B,CAAC;AAEb,CACF,CAAC;AAEDnC,KAAK,CAAC2C,WAAW,GAAG,OAAO","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fade.d.ts","sourceRoot":"","sources":["../../../../../src/components/Transitions/Fade/Fade.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,YAAY,EAAgB,MAAM,OAAO,CAAC;AAG9D,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,UAAU,UAAW,SAAQ,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC;IAC3D,QAAQ,EAAE,YAAY,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAgBD,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,UAAU,
|
|
1
|
+
{"version":3,"file":"Fade.d.ts","sourceRoot":"","sources":["../../../../../src/components/Transitions/Fade/Fade.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,YAAY,EAAgB,MAAM,OAAO,CAAC;AAG9D,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,UAAU,UAAW,SAAQ,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC;IAC3D,QAAQ,EAAE,YAAY,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAgBD,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,UAAU,CAqC/B,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 = ["in", "children", "style", "timeout"];
|
|
3
|
+
const _excluded = ["in", "children", "style", "timeout", "onEnter"];
|
|
4
4
|
import React, { cloneElement } from "react";
|
|
5
5
|
import { Transition } from "react-transition-group";
|
|
6
6
|
const defaultStyle = duration => ({
|
|
@@ -28,11 +28,20 @@ export const Fade = _ref => {
|
|
|
28
28
|
style = _ref.style,
|
|
29
29
|
_ref$timeout = _ref.timeout,
|
|
30
30
|
timeout = _ref$timeout === void 0 ? 500 : _ref$timeout,
|
|
31
|
+
onEnter = _ref.onEnter,
|
|
31
32
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
33
|
+
// Same forced layout as SlideFromTop: without it the starting opacity never lands in the DOM.
|
|
34
|
+
const handleEnter = (node, isAppearing) => {
|
|
35
|
+
if (node) {
|
|
36
|
+
void node.offsetHeight;
|
|
37
|
+
}
|
|
38
|
+
onEnter == null || onEnter(node, isAppearing);
|
|
39
|
+
};
|
|
32
40
|
return /*#__PURE__*/React.createElement(Transition, _extends({
|
|
33
41
|
appear: true,
|
|
34
42
|
in: inProp,
|
|
35
|
-
timeout: timeout
|
|
43
|
+
timeout: timeout,
|
|
44
|
+
onEnter: handleEnter
|
|
36
45
|
}, rest), state => {
|
|
37
46
|
return /*#__PURE__*/cloneElement(children, {
|
|
38
47
|
style: _extends({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fade.js","names":["React","cloneElement","Transition","defaultStyle","duration","transition","opacity","transitionStyles","entering","entered","exiting","exited","Fade","_ref","_ref$in","in","inProp","children","style","_ref$timeout","timeout","rest","_objectWithoutPropertiesLoose","_excluded","createElement","_extends","appear","state","visibility","undefined","props","displayName"],"sources":["../../../../../src/components/Transitions/Fade/Fade.tsx"],"sourcesContent":["import React, { FC, ReactElement, cloneElement } from \"react\";\nimport { Transition } from \"react-transition-group\";\n\nimport { TransitionProps } from \"../types\";\n\ninterface IFadeProps extends Omit<TransitionProps, \"timeout\"> {\n children: ReactElement;\n timeout?: number;\n}\n\nconst defaultStyle = (\n duration: number\n): Partial<{ transition: string; opacity: number }> => ({\n transition: `all ${duration}ms ease-in-out`,\n opacity: 0,\n});\n\nconst transitionStyles = {\n entering: { opacity: 1 },\n entered: { opacity: 1 },\n exiting: { opacity: 0 },\n exited: { opacity: 0 },\n};\n\nexport const Fade: FC<IFadeProps> = ({\n in: inProp = false,\n children,\n style,\n timeout = 500,\n ...rest\n}) => (\n <Transition
|
|
1
|
+
{"version":3,"file":"Fade.js","names":["React","cloneElement","Transition","defaultStyle","duration","transition","opacity","transitionStyles","entering","entered","exiting","exited","Fade","_ref","_ref$in","in","inProp","children","style","_ref$timeout","timeout","onEnter","rest","_objectWithoutPropertiesLoose","_excluded","handleEnter","node","isAppearing","offsetHeight","createElement","_extends","appear","state","visibility","undefined","props","displayName"],"sources":["../../../../../src/components/Transitions/Fade/Fade.tsx"],"sourcesContent":["import React, { FC, ReactElement, cloneElement } from \"react\";\nimport { Transition } from \"react-transition-group\";\n\nimport { TransitionProps } from \"../types\";\n\ninterface IFadeProps extends Omit<TransitionProps, \"timeout\"> {\n children: ReactElement;\n timeout?: number;\n}\n\nconst defaultStyle = (\n duration: number\n): Partial<{ transition: string; opacity: number }> => ({\n transition: `all ${duration}ms ease-in-out`,\n opacity: 0,\n});\n\nconst transitionStyles = {\n entering: { opacity: 1 },\n entered: { opacity: 1 },\n exiting: { opacity: 0 },\n exited: { opacity: 0 },\n};\n\nexport const Fade: FC<IFadeProps> = ({\n in: inProp = false,\n children,\n style,\n timeout = 500,\n onEnter,\n ...rest\n}) => {\n // Same forced layout as SlideFromTop: without it the starting opacity never lands in the DOM.\n const handleEnter = (node: HTMLElement, isAppearing: boolean) => {\n if (node) {\n void node.offsetHeight;\n }\n onEnter?.(node, isAppearing);\n };\n\n return (\n <Transition\n appear\n in={inProp}\n timeout={timeout}\n onEnter={handleEnter}\n {...rest}\n >\n {(state): ReactElement => {\n return cloneElement(children, {\n style: {\n visibility: state === \"exited\" && !inProp ? \"hidden\" : undefined,\n ...defaultStyle(timeout),\n ...transitionStyles[state],\n ...style,\n ...children.props.style,\n },\n });\n }}\n </Transition>\n );\n};\n\nFade.displayName = \"Fade\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAsBC,YAAY,QAAQ,OAAO;AAC7D,SAASC,UAAU,QAAQ,wBAAwB;AASnD,MAAMC,YAAY,GAChBC,QAAgB,KACsC;EACtDC,UAAU,WAASD,QAAQ,mBAAgB;EAC3CE,OAAO,EAAE;AACX,CAAC,CAAC;AAEF,MAAMC,gBAAgB,GAAG;EACvBC,QAAQ,EAAE;IAAEF,OAAO,EAAE;EAAE,CAAC;EACxBG,OAAO,EAAE;IAAEH,OAAO,EAAE;EAAE,CAAC;EACvBI,OAAO,EAAE;IAAEJ,OAAO,EAAE;EAAE,CAAC;EACvBK,MAAM,EAAE;IAAEL,OAAO,EAAE;EAAE;AACvB,CAAC;AAED,OAAO,MAAMM,IAAoB,GAAGC,IAAA,IAO9B;EAAA,IAAAC,OAAA,GAAAD,IAAA,CANJE,EAAE;IAAEC,MAAM,GAAAF,OAAA,cAAG,KAAK,GAAAA,OAAA;IAClBG,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;IACRC,KAAK,GAAAL,IAAA,CAALK,KAAK;IAAAC,YAAA,GAAAN,IAAA,CACLO,OAAO;IAAPA,OAAO,GAAAD,YAAA,cAAG,GAAG,GAAAA,YAAA;IACbE,OAAO,GAAAR,IAAA,CAAPQ,OAAO;IACJC,IAAI,GAAAC,6BAAA,CAAAV,IAAA,EAAAW,SAAA;EAEP;EACA,MAAMC,WAAW,GAAGA,CAACC,IAAiB,EAAEC,WAAoB,KAAK;IAC/D,IAAID,IAAI,EAAE;MACR,KAAKA,IAAI,CAACE,YAAY;IACxB;IACAP,OAAO,YAAPA,OAAO,CAAGK,IAAI,EAAEC,WAAW,CAAC;EAC9B,CAAC;EAED,oBACE3B,KAAA,CAAA6B,aAAA,CAAC3B,UAAU,EAAA4B,QAAA;IACTC,MAAM;IACNhB,EAAE,EAAEC,MAAO;IACXI,OAAO,EAAEA,OAAQ;IACjBC,OAAO,EAAEI;EAAY,GACjBH,IAAI,GAENU,KAAK,IAAmB;IACxB,oBAAO/B,YAAY,CAACgB,QAAQ,EAAE;MAC5BC,KAAK,EAAAY,QAAA;QACHG,UAAU,EAAED,KAAK,KAAK,QAAQ,IAAI,CAAChB,MAAM,GAAG,QAAQ,GAAGkB;MAAS,GAC7D/B,YAAY,CAACiB,OAAO,CAAC,EACrBb,gBAAgB,CAACyB,KAAK,CAAC,EACvBd,KAAK,EACLD,QAAQ,CAACkB,KAAK,CAACjB,KAAK;IAE3B,CAAC,CAAC;EACJ,CACU,CAAC;AAEjB,CAAC;AAEDN,IAAI,CAACwB,WAAW,GAAG,MAAM","ignoreList":[]}
|
|
@@ -3,6 +3,8 @@ import { TransitionProps } from "../types";
|
|
|
3
3
|
interface ISlideFromTop extends Omit<TransitionProps, "timeout"> {
|
|
4
4
|
children: ReactElement;
|
|
5
5
|
timeout?: number;
|
|
6
|
+
/** How far above its resting place the element starts. A fixed travel, not a share of its height. */
|
|
7
|
+
distance?: number;
|
|
6
8
|
}
|
|
7
9
|
export declare const SlideFromTop: FC<ISlideFromTop>;
|
|
8
10
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlideFromTop.d.ts","sourceRoot":"","sources":["../../../../../src/components/Transitions/SlideFromTop/SlideFromTop.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,YAAY,EAAgB,MAAM,OAAO,CAAC;AAG9D,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,UAAU,aAAc,SAAQ,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC;IAC9D,QAAQ,EAAE,YAAY,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"SlideFromTop.d.ts","sourceRoot":"","sources":["../../../../../src/components/Transitions/SlideFromTop/SlideFromTop.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,YAAY,EAAgB,MAAM,OAAO,CAAC;AAG9D,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,UAAU,aAAc,SAAQ,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC;IAC9D,QAAQ,EAAE,YAAY,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qGAAqG;IACrG,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AA6BD,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,aAAa,CAyC1C,CAAC"}
|
|
@@ -1,33 +1,37 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import React, { cloneElement } from "react";
|
|
3
3
|
import { Transition } from "react-transition-group";
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
4
|
+
const DEFAULT_DISTANCE = 25;
|
|
5
|
+
const buildStyles = distance => {
|
|
6
|
+
const away = "translateY(-" + distance + "px)";
|
|
7
|
+
return {
|
|
8
|
+
base: {
|
|
9
|
+
transitionProperty: "opacity, transform",
|
|
10
|
+
transitionTimingFunction: "ease-out",
|
|
11
|
+
transform: away,
|
|
12
|
+
opacity: 0
|
|
13
|
+
},
|
|
14
|
+
entering: {
|
|
15
|
+
opacity: 1,
|
|
16
|
+
transform: "translateY(0)",
|
|
17
|
+
transitionDuration: ".3s"
|
|
18
|
+
},
|
|
19
|
+
entered: {
|
|
20
|
+
opacity: 1,
|
|
21
|
+
transform: "translateY(0)",
|
|
22
|
+
transitionDuration: ".3s"
|
|
23
|
+
},
|
|
24
|
+
exiting: {
|
|
25
|
+
opacity: 0,
|
|
26
|
+
transform: away,
|
|
27
|
+
transitionDuration: ".2s"
|
|
28
|
+
},
|
|
29
|
+
exited: {
|
|
30
|
+
opacity: 0,
|
|
31
|
+
transform: away,
|
|
32
|
+
transitionDuration: ".2s"
|
|
33
|
+
}
|
|
34
|
+
};
|
|
31
35
|
};
|
|
32
36
|
export const SlideFromTop = _ref => {
|
|
33
37
|
let _ref$in = _ref.in,
|
|
@@ -37,18 +41,30 @@ export const SlideFromTop = _ref => {
|
|
|
37
41
|
children = _ref.children,
|
|
38
42
|
style = _ref.style,
|
|
39
43
|
_ref$timeout = _ref.timeout,
|
|
40
|
-
timeout = _ref$timeout === void 0 ? 400 : _ref$timeout
|
|
44
|
+
timeout = _ref$timeout === void 0 ? 400 : _ref$timeout,
|
|
45
|
+
_ref$distance = _ref.distance,
|
|
46
|
+
distance = _ref$distance === void 0 ? DEFAULT_DISTANCE : _ref$distance;
|
|
47
|
+
const styles = buildStyles(distance);
|
|
48
|
+
|
|
49
|
+
// React flushes the state change that follows onEnter before the browser paints, so without a
|
|
50
|
+
// forced layout here the element never holds its starting style and the transition is skipped.
|
|
51
|
+
const handleEnter = (node, isAppearing) => {
|
|
52
|
+
if (node) {
|
|
53
|
+
void node.offsetHeight;
|
|
54
|
+
}
|
|
55
|
+
onEnter == null || onEnter(node, isAppearing);
|
|
56
|
+
};
|
|
41
57
|
return /*#__PURE__*/React.createElement(Transition, {
|
|
42
58
|
appear: true,
|
|
43
59
|
in: inProp,
|
|
44
60
|
timeout: timeout,
|
|
45
|
-
onEnter:
|
|
61
|
+
onEnter: handleEnter,
|
|
46
62
|
onExited: onExited
|
|
47
63
|
}, state => {
|
|
48
64
|
return /*#__PURE__*/cloneElement(children, {
|
|
49
65
|
style: _extends({
|
|
50
66
|
visibility: state === "exited" && !inProp ? "hidden" : undefined
|
|
51
|
-
},
|
|
67
|
+
}, styles.base, styles[state], style, children.props.style)
|
|
52
68
|
});
|
|
53
69
|
});
|
|
54
70
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlideFromTop.js","names":["React","cloneElement","Transition","
|
|
1
|
+
{"version":3,"file":"SlideFromTop.js","names":["React","cloneElement","Transition","DEFAULT_DISTANCE","buildStyles","distance","away","base","transitionProperty","transitionTimingFunction","transform","opacity","entering","transitionDuration","entered","exiting","exited","SlideFromTop","_ref","_ref$in","in","inProp","onEnter","onExited","children","style","_ref$timeout","timeout","_ref$distance","styles","handleEnter","node","isAppearing","offsetHeight","createElement","appear","state","_extends","visibility","undefined","props","displayName"],"sources":["../../../../../src/components/Transitions/SlideFromTop/SlideFromTop.tsx"],"sourcesContent":["import React, { FC, ReactElement, cloneElement } from \"react\";\nimport { Transition } from \"react-transition-group\";\n\nimport { TransitionProps } from \"../types\";\n\ninterface ISlideFromTop extends Omit<TransitionProps, \"timeout\"> {\n children: ReactElement;\n timeout?: number;\n /** How far above its resting place the element starts. A fixed travel, not a share of its height. */\n distance?: number;\n}\n\nconst DEFAULT_DISTANCE = 25;\n\nconst buildStyles = (distance: number) => {\n const away = `translateY(-${distance}px)`;\n\n return {\n base: {\n transitionProperty: \"opacity, transform\",\n transitionTimingFunction: \"ease-out\",\n transform: away,\n opacity: 0,\n },\n entering: {\n opacity: 1,\n transform: \"translateY(0)\",\n transitionDuration: \".3s\",\n },\n entered: {\n opacity: 1,\n transform: \"translateY(0)\",\n transitionDuration: \".3s\",\n },\n exiting: { opacity: 0, transform: away, transitionDuration: \".2s\" },\n exited: { opacity: 0, transform: away, transitionDuration: \".2s\" },\n };\n};\n\nexport const SlideFromTop: FC<ISlideFromTop> = ({\n in: inProp = false,\n onEnter,\n onExited,\n children,\n style,\n timeout = 400,\n distance = DEFAULT_DISTANCE,\n}) => {\n const styles = buildStyles(distance);\n\n // React flushes the state change that follows onEnter before the browser paints, so without a\n // forced layout here the element never holds its starting style and the transition is skipped.\n const handleEnter = (node: HTMLElement, isAppearing: boolean) => {\n if (node) {\n void node.offsetHeight;\n }\n onEnter?.(node, isAppearing);\n };\n\n return (\n <Transition\n appear\n in={inProp}\n timeout={timeout}\n onEnter={handleEnter}\n onExited={onExited}\n >\n {(state): ReactElement => {\n return cloneElement(children, {\n style: {\n visibility: state === \"exited\" && !inProp ? \"hidden\" : undefined,\n ...styles.base,\n ...styles[state],\n ...style,\n ...children.props.style,\n },\n });\n }}\n </Transition>\n );\n};\n\nSlideFromTop.displayName = \"SlideFromTop\";\n"],"mappings":";AAAA,OAAOA,KAAK,IAAsBC,YAAY,QAAQ,OAAO;AAC7D,SAASC,UAAU,QAAQ,wBAAwB;AAWnD,MAAMC,gBAAgB,GAAG,EAAE;AAE3B,MAAMC,WAAW,GAAIC,QAAgB,IAAK;EACxC,MAAMC,IAAI,oBAAkBD,QAAQ,QAAK;EAEzC,OAAO;IACLE,IAAI,EAAE;MACJC,kBAAkB,EAAE,oBAAoB;MACxCC,wBAAwB,EAAE,UAAU;MACpCC,SAAS,EAAEJ,IAAI;MACfK,OAAO,EAAE;IACX,CAAC;IACDC,QAAQ,EAAE;MACRD,OAAO,EAAE,CAAC;MACVD,SAAS,EAAE,eAAe;MAC1BG,kBAAkB,EAAE;IACtB,CAAC;IACDC,OAAO,EAAE;MACPH,OAAO,EAAE,CAAC;MACVD,SAAS,EAAE,eAAe;MAC1BG,kBAAkB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C,KAAK,EAAAY,QAAA;QACHC,UAAU,EAAEF,KAAK,KAAK,QAAQ,IAAI,CAACf,MAAM,GAAG,QAAQ,GAAGkB;MAAS,GAC7DV,MAAM,CAACtB,IAAI,EACXsB,MAAM,CAACO,KAAK,CAAC,EACbX,KAAK,EACLD,QAAQ,CAACgB,KAAK,CAACf,KAAK;IAE3B,CAAC,CAAC;EACJ,CACU,CAAC;AAEjB,CAAC;AAEDR,YAAY,CAACwB,WAAW,GAAG,cAAc","ignoreList":[]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FC, ReactNode } from "react";
|
|
2
|
+
import { DialogSize } from "../Dialog/Styles";
|
|
2
3
|
export interface IStep {
|
|
3
4
|
index?: number;
|
|
4
5
|
isLast?: boolean;
|
|
@@ -14,6 +15,9 @@ export interface IStep {
|
|
|
14
15
|
disableBackButton?: boolean;
|
|
15
16
|
customRightHeader?: ReactNode;
|
|
16
17
|
skip?: boolean;
|
|
18
|
+
/** Read by Wizard off the active step and passed to the dialog. */
|
|
19
|
+
size?: DialogSize;
|
|
20
|
+
height?: string;
|
|
17
21
|
}
|
|
18
22
|
export declare const Step: FC<IStep>;
|
|
19
23
|
//# sourceMappingURL=Step.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Step.d.ts","sourceRoot":"","sources":["../../../../src/components/Wizard/Step.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,SAAS,EAAe,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Step.d.ts","sourceRoot":"","sources":["../../../../src/components/Wizard/Step.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,SAAS,EAAe,MAAM,OAAO,CAAC;AAW1D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAK9C,MAAM,WAAW,KAAK;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,mEAAmE;IACnE,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,KAAK,CA4E1B,CAAC"}
|
|
@@ -2,6 +2,7 @@ import React, { useCallback } from "react";
|
|
|
2
2
|
import { StepActionButton } from "./StepActionButton";
|
|
3
3
|
import { StyledStepTitle, StyledStepHeaderLeft, StyledStepHeader, StyledCustomStep } from "./Styles";
|
|
4
4
|
import { Dialog } from "../Dialog";
|
|
5
|
+
import { useDialogClose } from "../Dialog/DialogContext";
|
|
5
6
|
import { IconButton } from "../IconButton";
|
|
6
7
|
import { ArrowBackMobileIcon, CancelCrossIcon } from "../Icons";
|
|
7
8
|
import { Caption2, Header3 } from "../Typography";
|
|
@@ -25,6 +26,8 @@ export const Step = _ref => {
|
|
|
25
26
|
customRightHeader = _ref.customRightHeader,
|
|
26
27
|
_ref$skip = _ref.skip,
|
|
27
28
|
skip = _ref$skip === void 0 ? false : _ref$skip;
|
|
29
|
+
// The close button goes through the dialog so the exit transition runs before the caller unmounts.
|
|
30
|
+
const closeDialog = useDialogClose(onClose);
|
|
28
31
|
const onActionButtonClick = useCallback(() => {
|
|
29
32
|
if (isLast && onClose) {
|
|
30
33
|
return onClose();
|
|
@@ -37,7 +40,7 @@ export const Step = _ref => {
|
|
|
37
40
|
className: "tw--ml-3 tw-mr-2",
|
|
38
41
|
disabled: changingStepInProgress
|
|
39
42
|
}, /*#__PURE__*/React.createElement(ArrowBackMobileIcon, null)) : null, /*#__PURE__*/React.createElement(StyledStepTitle, null, /*#__PURE__*/React.createElement(Caption2, null, title), /*#__PURE__*/React.createElement(Header3, null, subtitle))), customRightHeader ? customRightHeader : /*#__PURE__*/React.createElement(IconButton, {
|
|
40
|
-
onClick:
|
|
43
|
+
onClick: closeDialog,
|
|
41
44
|
variant: "text gray",
|
|
42
45
|
disabled: changingStepInProgress
|
|
43
46
|
}, /*#__PURE__*/React.createElement(CancelCrossIcon, null))), /*#__PURE__*/React.createElement(Dialog.ContentDivider, null), shouldRenderNextButton ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Dialog.Content, null, children), /*#__PURE__*/React.createElement(Dialog.ContentDivider, null), /*#__PURE__*/React.createElement(Dialog.Actions, null, /*#__PURE__*/React.createElement(StepActionButton, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Step.js","names":["React","useCallback","StepActionButton","StyledStepTitle","StyledStepHeaderLeft","StyledStepHeader","StyledCustomStep","Dialog","IconButton","ArrowBackMobileIcon","CancelCrossIcon","Caption2","Header3","Step","_ref","index","isLast","subtitle","title","onNextButtonClick","onPreviousButtonClick","onClose","children","_ref$actionLabel","actionLabel","_ref$shouldRenderNext","shouldRenderNextButton","_ref$changingStepInPr","changingStepInProgress","_ref$disableBackButto","disableBackButton","customRightHeader","_ref$skip","skip","onActionButtonClick","createElement","Fragment","onClick","variant","className","disabled","ContentDivider","Content","Actions","displayName"],"sources":["../../../../src/components/Wizard/Step.tsx"],"sourcesContent":["import React, { FC, ReactNode, useCallback } from \"react\";\n\nimport { StepActionButton } from \"./StepActionButton\";\nimport {\n StyledStepTitle,\n StyledStepHeaderLeft,\n StyledStepHeader,\n StyledCustomStep,\n} from \"./Styles\";\nimport { Dialog } from \"../Dialog\";\nimport { IconButton } from \"../IconButton\";\nimport { ArrowBackMobileIcon, CancelCrossIcon } from \"../Icons\";\nimport { Caption2, Header3 } from \"../Typography\";\n\nexport interface IStep {\n index?: number;\n isLast?: boolean;\n subtitle: string;\n title?: string;\n onNextButtonClick?: () => void;\n onPreviousButtonClick?: () => void;\n onClose?: () => void;\n children: ReactNode;\n actionLabel?: string;\n shouldRenderNextButton?: boolean;\n changingStepInProgress?: boolean;\n disableBackButton?: boolean;\n customRightHeader?: ReactNode;\n skip?: boolean;\n}\n\nexport const Step: FC<IStep> = ({\n index,\n isLast,\n subtitle,\n title,\n onNextButtonClick,\n onPreviousButtonClick,\n onClose,\n children,\n actionLabel = \"Proceed\",\n shouldRenderNextButton = true,\n changingStepInProgress = false,\n disableBackButton = false,\n customRightHeader,\n skip = false,\n}) => {\n const onActionButtonClick = useCallback(() => {\n if (isLast && onClose) {\n return onClose();\n }\n\n return onNextButtonClick && onNextButtonClick();\n }, [isLast, onClose, onNextButtonClick]);\n\n return !skip ? (\n <>\n <StyledStepHeader>\n <StyledStepHeaderLeft>\n {!disableBackButton && index && index > 0 ? (\n <IconButton\n onClick={onPreviousButtonClick}\n variant=\"text gray\"\n className=\"tw--ml-3 tw-mr-2\"\n disabled={changingStepInProgress}\n >\n <ArrowBackMobileIcon />\n </IconButton>\n ) : null}\n <StyledStepTitle>\n <Caption2>{title}</Caption2>\n <Header3>{subtitle}</Header3>\n </StyledStepTitle>\n </StyledStepHeaderLeft>\n {customRightHeader ? (\n customRightHeader\n ) : (\n <IconButton\n onClick={
|
|
1
|
+
{"version":3,"file":"Step.js","names":["React","useCallback","StepActionButton","StyledStepTitle","StyledStepHeaderLeft","StyledStepHeader","StyledCustomStep","Dialog","useDialogClose","IconButton","ArrowBackMobileIcon","CancelCrossIcon","Caption2","Header3","Step","_ref","index","isLast","subtitle","title","onNextButtonClick","onPreviousButtonClick","onClose","children","_ref$actionLabel","actionLabel","_ref$shouldRenderNext","shouldRenderNextButton","_ref$changingStepInPr","changingStepInProgress","_ref$disableBackButto","disableBackButton","customRightHeader","_ref$skip","skip","closeDialog","onActionButtonClick","createElement","Fragment","onClick","variant","className","disabled","ContentDivider","Content","Actions","displayName"],"sources":["../../../../src/components/Wizard/Step.tsx"],"sourcesContent":["import React, { FC, ReactNode, useCallback } from \"react\";\n\nimport { StepActionButton } from \"./StepActionButton\";\nimport {\n StyledStepTitle,\n StyledStepHeaderLeft,\n StyledStepHeader,\n StyledCustomStep,\n} from \"./Styles\";\nimport { Dialog } from \"../Dialog\";\nimport { useDialogClose } from \"../Dialog/DialogContext\";\nimport { DialogSize } from \"../Dialog/Styles\";\nimport { IconButton } from \"../IconButton\";\nimport { ArrowBackMobileIcon, CancelCrossIcon } from \"../Icons\";\nimport { Caption2, Header3 } from \"../Typography\";\n\nexport interface IStep {\n index?: number;\n isLast?: boolean;\n subtitle: string;\n title?: string;\n onNextButtonClick?: () => void;\n onPreviousButtonClick?: () => void;\n onClose?: () => void;\n children: ReactNode;\n actionLabel?: string;\n shouldRenderNextButton?: boolean;\n changingStepInProgress?: boolean;\n disableBackButton?: boolean;\n customRightHeader?: ReactNode;\n skip?: boolean;\n /** Read by Wizard off the active step and passed to the dialog. */\n size?: DialogSize;\n height?: string;\n}\n\nexport const Step: FC<IStep> = ({\n index,\n isLast,\n subtitle,\n title,\n onNextButtonClick,\n onPreviousButtonClick,\n onClose,\n children,\n actionLabel = \"Proceed\",\n shouldRenderNextButton = true,\n changingStepInProgress = false,\n disableBackButton = false,\n customRightHeader,\n skip = false,\n}) => {\n // The close button goes through the dialog so the exit transition runs before the caller unmounts.\n const closeDialog = useDialogClose(onClose);\n\n const onActionButtonClick = useCallback(() => {\n if (isLast && onClose) {\n return onClose();\n }\n\n return onNextButtonClick && onNextButtonClick();\n }, [isLast, onClose, onNextButtonClick]);\n\n return !skip ? (\n <>\n <StyledStepHeader>\n <StyledStepHeaderLeft>\n {!disableBackButton && index && index > 0 ? (\n <IconButton\n onClick={onPreviousButtonClick}\n variant=\"text gray\"\n className=\"tw--ml-3 tw-mr-2\"\n disabled={changingStepInProgress}\n >\n <ArrowBackMobileIcon />\n </IconButton>\n ) : null}\n <StyledStepTitle>\n <Caption2>{title}</Caption2>\n <Header3>{subtitle}</Header3>\n </StyledStepTitle>\n </StyledStepHeaderLeft>\n {customRightHeader ? (\n customRightHeader\n ) : (\n <IconButton\n onClick={closeDialog}\n variant=\"text gray\"\n disabled={changingStepInProgress}\n >\n <CancelCrossIcon />\n </IconButton>\n )}\n </StyledStepHeader>\n <Dialog.ContentDivider />\n {shouldRenderNextButton ? (\n <>\n <Dialog.Content>{children}</Dialog.Content>\n <Dialog.ContentDivider />\n <Dialog.Actions>\n <StepActionButton\n isLast={isLast}\n actionLabel={actionLabel}\n onNextButtonClick={onActionButtonClick}\n />\n </Dialog.Actions>\n </>\n ) : (\n <StyledCustomStep>{children}</StyledCustomStep>\n )}\n </>\n ) : null;\n};\n\nStep.displayName = \"Step\";\n"],"mappings":"AAAA,OAAOA,KAAK,IAAmBC,WAAW,QAAQ,OAAO;AAEzD,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SACEC,eAAe,EACfC,oBAAoB,EACpBC,gBAAgB,EAChBC,gBAAgB,QACX,UAAU;AACjB,SAASC,MAAM,QAAQ,WAAW;AAClC,SAASC,cAAc,QAAQ,yBAAyB;AAExD,SAASC,UAAU,QAAQ,eAAe;AAC1C,SAASC,mBAAmB,EAAEC,eAAe,QAAQ,UAAU;AAC/D,SAASC,QAAQ,EAAEC,OAAO,QAAQ,eAAe;AAsBjD,OAAO,MAAMC,IAAe,GAAGC,IAAA,IAezB;EAAA,IAdJC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,MAAM,GAAAF,IAAA,CAANE,MAAM;IACNC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IACRC,KAAK,GAAAJ,IAAA,CAALI,KAAK;IACLC,iBAAi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