@salesforce/design-system-react 11.0.0-alpha.7 → 11.0.0-alpha.8
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/color-picker/color-picker.cjs +1 -1
- package/dist/cjs/components/color-picker/color-picker.cjs.map +1 -1
- package/dist/cjs/components/combobox/combobox.cjs +1 -1
- package/dist/cjs/components/combobox/combobox.cjs.map +1 -1
- package/dist/cjs/components/filter/filter.cjs +1 -1
- package/dist/cjs/components/filter/filter.cjs.map +1 -1
- package/dist/cjs/components/modal/check-props.cjs +2 -0
- package/dist/cjs/components/modal/check-props.cjs.map +1 -0
- package/dist/cjs/components/modal/component.cjs +2 -0
- package/dist/cjs/components/modal/component.cjs.map +1 -0
- package/dist/cjs/components/modal/index.cjs +1 -1
- package/dist/cjs/components/modal/index.cjs.map +1 -1
- package/dist/cjs/components/popover/component.cjs +2 -0
- package/dist/cjs/components/popover/component.cjs.map +1 -0
- package/dist/cjs/components/popover/edit-dialog.cjs +1 -1
- package/dist/cjs/components/popover/edit-dialog.cjs.map +1 -1
- package/dist/cjs/components/popover/popover.cjs +1 -1
- package/dist/cjs/components/popover/popover.cjs.map +1 -1
- package/dist/cjs/components/slider/check-props.cjs +1 -1
- package/dist/cjs/components/slider/check-props.cjs.map +1 -1
- package/dist/cjs/components/slider/index.cjs +1 -1
- package/dist/cjs/components/slider/index.cjs.map +1 -1
- package/dist/cjs/components/spinner/check-props.cjs +2 -0
- package/dist/cjs/components/spinner/check-props.cjs.map +1 -0
- package/dist/cjs/components/spinner/component.cjs +2 -0
- package/dist/cjs/components/spinner/component.cjs.map +1 -0
- package/dist/cjs/components/spinner/index.cjs +1 -1
- package/dist/cjs/components/spinner/index.cjs.map +1 -1
- package/dist/cjs/components/tree/check-props.cjs +1 -1
- package/dist/cjs/components/tree/check-props.cjs.map +1 -1
- package/dist/cjs/components/tree/tree.cjs +1 -1
- package/dist/cjs/components/tree/tree.cjs.map +1 -1
- package/dist/cjs/components/vertical-navigation/index.cjs +1 -1
- package/dist/cjs/components/vertical-navigation/index.cjs.map +1 -1
- package/dist/cjs/components/welcome-mat/index.cjs +1 -1
- package/dist/cjs/components/welcome-mat/index.cjs.map +1 -1
- package/dist/es/components/color-picker/color-picker.js +1 -1
- package/dist/es/components/color-picker/color-picker.js.map +1 -1
- package/dist/es/components/combobox/combobox.js +2 -2
- package/dist/es/components/combobox/combobox.js.map +1 -1
- package/dist/es/components/filter/filter.js +1 -1
- package/dist/es/components/filter/filter.js.map +1 -1
- package/dist/es/components/modal/check-props.js +22 -0
- package/dist/es/components/modal/check-props.js.map +1 -0
- package/dist/es/components/modal/component.js +35 -0
- package/dist/es/components/modal/component.js.map +1 -0
- package/dist/es/components/modal/index.js +118 -104
- package/dist/es/components/modal/index.js.map +1 -1
- package/dist/es/components/popover/component.js +59 -0
- package/dist/es/components/popover/component.js.map +1 -0
- package/dist/es/components/popover/edit-dialog.js +1 -1
- package/dist/es/components/popover/edit-dialog.js.map +1 -1
- package/dist/es/components/popover/popover.js +235 -191
- package/dist/es/components/popover/popover.js.map +1 -1
- package/dist/es/components/slider/check-props.js +1 -1
- package/dist/es/components/slider/check-props.js.map +1 -1
- package/dist/es/components/slider/index.js +63 -60
- package/dist/es/components/slider/index.js.map +1 -1
- package/dist/es/components/spinner/check-props.js +13 -0
- package/dist/es/components/spinner/check-props.js.map +1 -0
- package/dist/es/components/spinner/component.js +17 -0
- package/dist/es/components/spinner/component.js.map +1 -0
- package/dist/es/components/spinner/index.js +43 -29
- package/dist/es/components/spinner/index.js.map +1 -1
- package/dist/es/components/tree/check-props.js +1 -1
- package/dist/es/components/tree/check-props.js.map +1 -1
- package/dist/es/components/tree/tree.js +79 -73
- package/dist/es/components/tree/tree.js.map +1 -1
- package/dist/es/components/vertical-navigation/index.js +17 -16
- package/dist/es/components/vertical-navigation/index.js.map +1 -1
- package/dist/es/components/welcome-mat/index.js +51 -50
- package/dist/es/components/welcome-mat/index.js.map +1 -1
- package/dist/types/components/color-picker/color-picker.d.ts.map +1 -1
- package/dist/types/components/modal/check-props.d.ts +3 -0
- package/dist/types/components/modal/check-props.d.ts.map +1 -0
- package/dist/types/components/modal/index.d.ts +21 -13
- package/dist/types/components/modal/index.d.ts.map +1 -1
- package/dist/types/components/popover/popover.d.ts +24 -14
- package/dist/types/components/popover/popover.d.ts.map +1 -1
- package/dist/types/components/slider/check-props.d.ts.map +1 -1
- package/dist/types/components/slider/index.d.ts +9 -7
- package/dist/types/components/slider/index.d.ts.map +1 -1
- package/dist/types/components/spinner/check-props.d.ts +3 -0
- package/dist/types/components/spinner/check-props.d.ts.map +1 -0
- package/dist/types/components/spinner/index.d.ts +18 -9
- package/dist/types/components/spinner/index.d.ts.map +1 -1
- package/dist/types/components/tree/check-props.d.ts.map +1 -1
- package/dist/types/components/tree/tree.d.ts +8 -4
- package/dist/types/components/tree/tree.d.ts.map +1 -1
- package/dist/types/components/vertical-navigation/index.d.ts +7 -7
- package/dist/types/components/vertical-navigation/index.d.ts.map +1 -1
- package/dist/types/components/welcome-mat/index.d.ts +5 -6
- package/dist/types/components/welcome-mat/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -2,47 +2,59 @@ import { MODAL as e } from "../../utilities/constants.js";
|
|
|
2
2
|
import t from "../../utilities/generate-id.js";
|
|
3
3
|
import n from "../button/index.js";
|
|
4
4
|
import r from "../../utilities/warning/check-app-element-set.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import f from "
|
|
5
|
+
import i from "./check-props.js";
|
|
6
|
+
import a from "./component.js";
|
|
7
|
+
import { forwardRef as o, useCallback as s, useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
|
|
8
|
+
import f from "classnames";
|
|
9
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
10
|
+
import h from "react-modal";
|
|
9
11
|
//#region components/modal/index.tsx
|
|
10
|
-
var
|
|
12
|
+
var g = typeof document < "u", _ = typeof window < "u", v = {
|
|
11
13
|
dialogLabelledBy: "",
|
|
12
14
|
closeButton: "Close"
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}, [
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
15
|
+
}, y = o(({ align: o = "center", ariaHideApp: y = !0, assistiveText: b, children: x, className: ee, classNameContainer: te, classNameContent: ne, classNameFooter: re, classNameHeader: ie, classNamePortal: S, containerClassName: C, contentClassName: w, contentStyle: T, directional: E, disableClose: D, dismissOnClickOutside: O, onRequestClose: k, footer: A, footerClassName: j, header: M, headerClassName: N, id: P, isOpen: F, parentSelector: I, portalClassName: L, prompt: R, size: z, styleContent: B, tagline: V, heading: H, toast: U }, W) => {
|
|
16
|
+
c(() => {
|
|
17
|
+
i(e, {
|
|
18
|
+
containerClassName: C,
|
|
19
|
+
contentClassName: w,
|
|
20
|
+
contentStyle: T,
|
|
21
|
+
footerClassName: j,
|
|
22
|
+
headerClassName: N,
|
|
23
|
+
portalClassName: L
|
|
24
|
+
}, a);
|
|
25
|
+
}, []);
|
|
26
|
+
let [G, K] = d(null), q = u(t()), J = l(() => ({
|
|
27
|
+
...v,
|
|
28
|
+
...b
|
|
29
|
+
}), [b]), Y = s(() => P || q.current, [P]), X = R !== void 0;
|
|
30
|
+
c(() => {
|
|
31
|
+
y && r();
|
|
32
|
+
}, []), c(() => {
|
|
33
|
+
g && K(document.activeElement);
|
|
34
|
+
}, []), c(() => (_ && g && document.body && (F ? document.body.style.overflow = "hidden" : document.body.style.overflow = "inherit"), () => {
|
|
35
|
+
_ && g && document.body && (document.body.style.overflow = "inherit");
|
|
36
|
+
}), [F]);
|
|
37
|
+
let Z = s((e, t) => {
|
|
38
|
+
G && "focus" in G && typeof G.focus == "function" && G.focus(), k && k(e, t);
|
|
39
|
+
}, [G, k]), Q = s((e, t) => {
|
|
40
|
+
D || Z(e, t);
|
|
41
|
+
}, [D, Z]), ae = s((e) => {
|
|
42
|
+
Q(e, { trigger: "close-button" });
|
|
43
|
+
}, [Q]), oe = s((e) => {
|
|
44
|
+
Q(e, { trigger: e.type === "keydown" ? "escape" : "click-outside" });
|
|
45
|
+
}, [Q]), se = s((e) => {
|
|
46
|
+
(O === void 0 ? !D : O) && Z(e, { trigger: "click-outside" });
|
|
35
47
|
}, [
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
]),
|
|
48
|
+
O,
|
|
49
|
+
D,
|
|
50
|
+
Z
|
|
51
|
+
]), $ = s((e) => {
|
|
40
52
|
e && e.stopPropagation && e.stopPropagation();
|
|
41
|
-
}, []),
|
|
42
|
-
let e = ".25rem", t =
|
|
53
|
+
}, []), ce = s(() => {
|
|
54
|
+
let e = ".25rem", t = H || M ? {} : {
|
|
43
55
|
borderTopLeftRadius: e,
|
|
44
56
|
borderTopRightRadius: e
|
|
45
|
-
}, n =
|
|
57
|
+
}, n = A ? {} : {
|
|
46
58
|
borderBottomLeftRadius: e,
|
|
47
59
|
borderBottomRightRadius: e
|
|
48
60
|
};
|
|
@@ -51,88 +63,90 @@ var p = typeof document < "u", m = typeof window < "u", h = {
|
|
|
51
63
|
...n
|
|
52
64
|
};
|
|
53
65
|
}, [
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
]),
|
|
58
|
-
let e =
|
|
66
|
+
H,
|
|
67
|
+
M,
|
|
68
|
+
A
|
|
69
|
+
]), le = s(() => {
|
|
70
|
+
let e = Y(), t = {
|
|
59
71
|
describedby: `${e}-modal-content`,
|
|
60
72
|
modal: !0
|
|
61
73
|
};
|
|
62
|
-
if (
|
|
74
|
+
if (J.dialogLabel) return t.label = J.dialogLabel, t;
|
|
63
75
|
let n;
|
|
64
|
-
return
|
|
76
|
+
return J.dialogLabelledBy ? n = J.dialogLabelledBy : H && (n = `${e}-heading`), n && (t.labelledby = n), t;
|
|
65
77
|
}, [
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
]),
|
|
70
|
-
let e =
|
|
78
|
+
Y,
|
|
79
|
+
J,
|
|
80
|
+
H
|
|
81
|
+
]), ue = () => {
|
|
82
|
+
let e = M, t = !e && !H && !V, r = J.closeButton, i = /* @__PURE__ */ p(n, {
|
|
71
83
|
assistiveText: { icon: r },
|
|
72
84
|
iconCategory: "utility",
|
|
73
85
|
iconName: "close",
|
|
74
86
|
iconSize: "large",
|
|
75
87
|
className: "slds-button_icon slds-modal__close",
|
|
76
|
-
onClick:
|
|
88
|
+
onClick: ae,
|
|
77
89
|
title: r,
|
|
78
90
|
variant: "icon"
|
|
79
91
|
});
|
|
80
|
-
return (!e &&
|
|
81
|
-
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
-
className:
|
|
84
|
-
"slds-text-heading_small":
|
|
85
|
-
"slds-text-heading_medium": !
|
|
92
|
+
return (!e && H || V) && (e = /* @__PURE__ */ m("div", { children: [
|
|
93
|
+
U,
|
|
94
|
+
/* @__PURE__ */ p("h1", {
|
|
95
|
+
className: f({
|
|
96
|
+
"slds-text-heading_small": X,
|
|
97
|
+
"slds-text-heading_medium": !X
|
|
86
98
|
}),
|
|
87
|
-
id: `${
|
|
88
|
-
children:
|
|
99
|
+
id: `${Y()}-heading`,
|
|
100
|
+
children: H
|
|
89
101
|
}),
|
|
90
|
-
|
|
102
|
+
V ? /* @__PURE__ */ p("p", {
|
|
91
103
|
className: "slds-m-top_x-small",
|
|
92
|
-
children:
|
|
104
|
+
children: V
|
|
93
105
|
}) : null
|
|
94
|
-
] })), /* @__PURE__ */
|
|
95
|
-
className:
|
|
106
|
+
] })), /* @__PURE__ */ m("header", {
|
|
107
|
+
className: f("slds-modal__header", {
|
|
96
108
|
"slds-modal__header_empty": t,
|
|
97
|
-
[`slds-theme_${
|
|
98
|
-
"slds-theme_alert-texture":
|
|
99
|
-
},
|
|
100
|
-
onClick:
|
|
101
|
-
children: [
|
|
109
|
+
[`slds-theme_${R}`]: X,
|
|
110
|
+
"slds-theme_alert-texture": X
|
|
111
|
+
}, N, ie),
|
|
112
|
+
onClick: $,
|
|
113
|
+
children: [D ? null : i, e]
|
|
102
114
|
});
|
|
103
|
-
},
|
|
104
|
-
className:
|
|
115
|
+
}, de = () => A ? /* @__PURE__ */ p("footer", {
|
|
116
|
+
className: f({
|
|
105
117
|
"slds-modal__footer": !0,
|
|
106
|
-
"slds-modal__footer_directional":
|
|
107
|
-
"slds-theme_default":
|
|
108
|
-
},
|
|
109
|
-
onClick:
|
|
110
|
-
children:
|
|
111
|
-
}) : null,
|
|
112
|
-
let
|
|
113
|
-
...
|
|
114
|
-
...
|
|
118
|
+
"slds-modal__footer_directional": E,
|
|
119
|
+
"slds-theme_default": X
|
|
120
|
+
}, j, re),
|
|
121
|
+
onClick: $,
|
|
122
|
+
children: A
|
|
123
|
+
}) : null, fe = () => {
|
|
124
|
+
let e = o === "top" ? { justifyContent: "flex-start" } : void 0, t = {
|
|
125
|
+
...ce(),
|
|
126
|
+
...T,
|
|
127
|
+
...B
|
|
115
128
|
};
|
|
116
|
-
return /* @__PURE__ */
|
|
117
|
-
className:
|
|
118
|
-
onClick:
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
129
|
+
return /* @__PURE__ */ p("section", {
|
|
130
|
+
className: f("slds-modal", "slds-fade-in-open", z ? `slds-modal_${z}` : null, { "slds-modal_prompt": X }, ee),
|
|
131
|
+
onClick: se,
|
|
132
|
+
ref: W,
|
|
133
|
+
children: /* @__PURE__ */ m("div", {
|
|
134
|
+
className: f("slds-modal__container", C, te),
|
|
135
|
+
style: e,
|
|
122
136
|
children: [
|
|
123
|
-
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
className:
|
|
126
|
-
id: `${
|
|
127
|
-
style:
|
|
128
|
-
onClick:
|
|
129
|
-
children:
|
|
137
|
+
ue(),
|
|
138
|
+
/* @__PURE__ */ p("div", {
|
|
139
|
+
className: f("slds-modal__content", w, ne),
|
|
140
|
+
id: `${Y()}-modal-content`,
|
|
141
|
+
style: t,
|
|
142
|
+
onClick: $,
|
|
143
|
+
children: x
|
|
130
144
|
}),
|
|
131
|
-
|
|
145
|
+
de()
|
|
132
146
|
]
|
|
133
147
|
})
|
|
134
148
|
});
|
|
135
|
-
},
|
|
149
|
+
}, pe = {
|
|
136
150
|
content: {
|
|
137
151
|
position: void 0,
|
|
138
152
|
top: void 0,
|
|
@@ -151,21 +165,21 @@ var p = typeof document < "u", m = typeof window < "u", h = {
|
|
|
151
165
|
zIndex: 8e3,
|
|
152
166
|
backgroundColor: void 0
|
|
153
167
|
}
|
|
154
|
-
},
|
|
155
|
-
return /* @__PURE__ */
|
|
156
|
-
aria:
|
|
157
|
-
ariaHideApp:
|
|
158
|
-
isOpen:
|
|
159
|
-
onRequestClose:
|
|
160
|
-
role:
|
|
161
|
-
style:
|
|
162
|
-
parentSelector:
|
|
163
|
-
portalClassName:
|
|
164
|
-
children: [
|
|
168
|
+
}, me = le();
|
|
169
|
+
return /* @__PURE__ */ m(h, {
|
|
170
|
+
aria: me,
|
|
171
|
+
ariaHideApp: y,
|
|
172
|
+
isOpen: F,
|
|
173
|
+
onRequestClose: oe,
|
|
174
|
+
role: D ? "alertdialog" : "dialog",
|
|
175
|
+
style: pe,
|
|
176
|
+
parentSelector: I,
|
|
177
|
+
portalClassName: f("ReactModalPortal", L, S),
|
|
178
|
+
children: [fe(), /* @__PURE__ */ p("div", { className: "slds-backdrop slds-backdrop_open" })]
|
|
165
179
|
});
|
|
166
|
-
};
|
|
167
|
-
|
|
180
|
+
});
|
|
181
|
+
y.displayName = e;
|
|
168
182
|
//#endregion
|
|
169
|
-
export {
|
|
183
|
+
export { y as default };
|
|
170
184
|
|
|
171
185
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/modal/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\n// Implements the [Modal design pattern](https://lightningdesignsystem.com/components/modals/) in React.\n\nimport React, {\n\tuseState,\n\tuseEffect,\n\tuseCallback,\n\tuseMemo,\n\tuseRef,\n\tCSSProperties,\n\tReactNode,\n\tMouseEvent,\n\tKeyboardEvent,\n} from 'react';\nimport classNames from 'classnames';\nimport ReactModal from 'react-modal';\n\nimport checkAppElementIsSet from '../../utilities/warning/check-app-element-set';\nimport Button from '../button';\nimport { MODAL } from '../../utilities/constants';\nimport generateId from '../../utilities/generate-id';\n\nconst documentDefined = typeof document !== 'undefined';\nconst windowDefined = typeof window !== 'undefined';\n\n// Types\nexport type ModalAlign = 'top' | 'center';\nexport type ModalSize = 'small' | 'medium' | 'large';\nexport type ModalPrompt =\n\t'success' | 'warning' | 'error' | 'wrench' | 'offline' | 'info';\n\nexport interface ModalAssistiveText {\n\t/** This is a visually hidden label for the dialog. If not provided, `heading` is used. */\n\tdialogLabel?: string;\n\t/** This describes which node labels the dialog. If not provided and dialogLabel is unavailable, `id` is used. */\n\tdialogLabelledBy?: string;\n\t/** This is a visually hidden label for the close button. */\n\tcloseButton?: string;\n}\n\n/**\n * What caused a Modal close request:\n * - `'close-button'`: the header close button was clicked\n * - `'escape'`: the Escape key was pressed\n * - `'click-outside'`: a click landed outside the modal container (on the backdrop area)\n */\nexport type ModalRequestCloseTrigger =\n\t'close-button' | 'escape' | 'click-outside';\n\n/**\n * Data passed to `onRequestClose`\n */\nexport interface ModalRequestCloseData {\n\t/** What caused the close request */\n\ttrigger: ModalRequestCloseTrigger;\n}\n\n/**\n * Event passed to `onRequestClose`: the click (close button / outside click) or\n * keydown (Escape) that caused the request\n */\nexport type ModalRequestCloseEvent = MouseEvent | KeyboardEvent;\n\nexport interface ModalProps {\n\t/** Vertical alignment of Modal. */\n\talign?: ModalAlign;\n\t/** Boolean indicating if the appElement should be hidden. */\n\tariaHideApp?: boolean;\n\t/** Assistive text for accessibility. */\n\tassistiveText?: ModalAssistiveText;\n\t/** Modal content. */\n\tchildren: ReactNode;\n\t/** Custom CSS classes for the modal `section` node. */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Custom CSS classes for the modal's container. */\n\tcontainerClassName?: string | string[] | Record<string, boolean>;\n\t/** Custom CSS classes for the modal's body. */\n\tcontentClassName?: string | string[] | Record<string, boolean>;\n\t/** Custom styles for the modal's body. */\n\tcontentStyle?: CSSProperties;\n\t/** If true, modal footer buttons render left and right. */\n\tdirectional?: boolean;\n\t/** If true, Modals cannot be dismissed by clicking on the close icon or pressing esc key. */\n\tdisableClose?: boolean;\n\t/** If true, Modals can be dismissed by clicking outside of modal. If unspecified, defaults to !disableClose. */\n\tdismissOnClickOutside?: boolean;\n\t/**\n\t * Callback to fire when the Modal requests to be dismissed. Receives the triggering\n\t * click or keydown event and `data.trigger`: `'close-button'`, `'escape'`, or `'click-outside'`.\n\t * Not called when `disableClose` (or `dismissOnClickOutside: false` for outside clicks) prevents it.\n\t */\n\tonRequestClose?: (\n\t\tevent: ModalRequestCloseEvent,\n\t\tdata: ModalRequestCloseData\n\t) => void;\n\t/** Modal footer content, typically buttons. */\n\tfooter?: ReactNode | ReactNode[];\n\t/** Custom CSS classes for the footer. */\n\tfooterClassName?: string | string[] | Record<string, boolean>;\n\t/** Allows for a custom modal header that does not scroll with modal content. */\n\theader?: ReactNode;\n\t/** Adds CSS classes to the container surrounding the modal header. */\n\theaderClassName?: string | string[] | Record<string, boolean>;\n\t/** Unique identifier for the modal. The id is automatically generated if not provided. */\n\tid?: string;\n\t/** Forces the modal to be open or closed. */\n\tisOpen: boolean;\n\t/** Function whose return value is the mount node to insert the Modal element into. */\n\tparentSelector?: () => HTMLElement;\n\t/** Custom CSS classes for the portal DOM node. */\n\tportalClassName?: string | string[] | Record<string, boolean>;\n\t/** Styles the modal as a prompt. */\n\tprompt?: ModalPrompt;\n\t/** Specifies the modal's width. */\n\tsize?: ModalSize;\n\t/** Content underneath the heading in the modal header. */\n\ttagline?: ReactNode;\n\t/** Content underneath the title in the modal header. @deprecated Use heading instead */\n\ttitle?: ReactNode;\n\t/** Text heading at the top of a modal. */\n\theading?: ReactNode;\n\t/** Allows adding additional notifications within the modal. */\n\ttoast?: ReactNode;\n\t/** @deprecated Use assistiveText.closeButton instead */\n\tcloseButtonAssistiveText?: string;\n}\n\nconst defaultAssistiveText: ModalAssistiveText = {\n\tdialogLabelledBy: '',\n\tcloseButton: 'Close',\n};\n\n/**\n * The Modal component is used for the Lightning Design System Modal and Notification > Prompt components.\n * The Modal opens from a state change outside of the component itself (pass this state to the `isOpen` prop).\n *\n * By default, `Modal` will add `aria-hidden=true` to the `body` tag, but this disables some assistive technologies.\n * To prevent this you can add the following to your application with `#mount` being the root node of your application:\n * ```\n * import settings from 'design-system-react/components/settings';\n * settings.setAppElement('#mount');\n * ```\n */\nconst Modal: React.FC<ModalProps> = ({\n\talign = 'center',\n\tariaHideApp = true,\n\tassistiveText: assistiveTextProp,\n\tchildren,\n\tclassName,\n\tcontainerClassName,\n\tcontentClassName,\n\tcontentStyle: contentStyleProp,\n\tdirectional,\n\tdisableClose,\n\tdismissOnClickOutside,\n\tonRequestClose,\n\tfooter,\n\tfooterClassName,\n\theader,\n\theaderClassName,\n\tid: idProp,\n\tisOpen,\n\tparentSelector,\n\tportalClassName,\n\tprompt,\n\tsize,\n\ttagline,\n\ttitle,\n\theading,\n\ttoast,\n\tcloseButtonAssistiveText,\n}) => {\n\t// State\n\tconst [returnFocusTo, setReturnFocusTo] = useState<Element | null>(null);\n\n\t// Refs\n\tconst generatedId = useRef(generateId());\n\n\t// Merged assistive text\n\tconst assistiveText = useMemo(\n\t\t() => ({\n\t\t\t...defaultAssistiveText,\n\t\t\t...assistiveTextProp,\n\t\t}),\n\t\t[assistiveTextProp]\n\t);\n\n\t// ID getter\n\tconst getId = useCallback(() => idProp || generatedId.current, [idProp]);\n\n\t// Is this a prompt modal?\n\tconst isPrompt = prompt !== undefined;\n\n\t// Warn in development if the app element isn't set\n\tuseEffect(() => {\n\t\tif (ariaHideApp) {\n\t\t\tcheckAppElementIsSet();\n\t\t}\n\t}, []); // Only run on mount\n\n\t// Set return focus on mount\n\tuseEffect(() => {\n\t\tif (documentDefined) {\n\t\t\tsetReturnFocusTo(document.activeElement);\n\t\t}\n\t}, []);\n\n\t// Update body scroll when isOpen changes\n\tuseEffect(() => {\n\t\tif (windowDefined && documentDefined && document.body) {\n\t\t\tif (isOpen) {\n\t\t\t\tdocument.body.style.overflow = 'hidden';\n\t\t\t} else {\n\t\t\t\tdocument.body.style.overflow = 'inherit';\n\t\t\t}\n\t\t}\n\n\t\treturn () => {\n\t\t\t// Clear body scroll on unmount\n\t\t\tif (windowDefined && documentDefined && document.body) {\n\t\t\t\tdocument.body.style.overflow = 'inherit';\n\t\t\t}\n\t\t};\n\t}, [isOpen]);\n\n\t// Dismiss modal handler\n\tconst dismissModal = useCallback(\n\t\t(event: ModalRequestCloseEvent, data: ModalRequestCloseData) => {\n\t\t\tif (\n\t\t\t\treturnFocusTo &&\n\t\t\t\t'focus' in returnFocusTo &&\n\t\t\t\ttypeof returnFocusTo.focus === 'function'\n\t\t\t) {\n\t\t\t\treturnFocusTo.focus();\n\t\t\t}\n\t\t\tif (onRequestClose) {\n\t\t\t\tonRequestClose(event, data);\n\t\t\t}\n\t\t},\n\t\t[returnFocusTo, onRequestClose]\n\t);\n\n\t// Close modal handler (respects disableClose)\n\tconst closeModal = useCallback(\n\t\t(event: ModalRequestCloseEvent, data: ModalRequestCloseData) => {\n\t\t\tif (!disableClose) {\n\t\t\t\tdismissModal(event, data);\n\t\t\t}\n\t\t},\n\t\t[disableClose, dismissModal]\n\t);\n\n\t// Close button click handler\n\tconst handleCloseButtonClick = useCallback(\n\t\t(event: MouseEvent<HTMLButtonElement>) => {\n\t\t\tcloseModal(event, { trigger: 'close-button' });\n\t\t},\n\t\t[closeModal]\n\t);\n\n\t// react-modal's own close request: Escape keydown, or a click directly on its overlay\n\tconst handleReactModalRequestClose = useCallback(\n\t\t(event: ModalRequestCloseEvent) => {\n\t\t\tcloseModal(event, {\n\t\t\t\ttrigger: event.type === 'keydown' ? 'escape' : 'click-outside',\n\t\t\t});\n\t\t},\n\t\t[closeModal]\n\t);\n\n\t// Dismiss on click outside handler\n\tconst dismissModalOnClickOutside = useCallback(\n\t\t(event: MouseEvent<HTMLElement>) => {\n\t\t\t// if dismissOnClickOutside is not set, default its value to !disableClose\n\t\t\tconst shouldDismiss =\n\t\t\t\tdismissOnClickOutside !== undefined\n\t\t\t\t\t? dismissOnClickOutside\n\t\t\t\t\t: !disableClose;\n\n\t\t\tif (shouldDismiss) {\n\t\t\t\tdismissModal(event, { trigger: 'click-outside' });\n\t\t\t}\n\t\t},\n\t\t[dismissOnClickOutside, disableClose, dismissModal]\n\t);\n\n\t// Prevent click propagation inside modal\n\tconst handleModalClick = useCallback((event: MouseEvent) => {\n\t\tif (event && event.stopPropagation) {\n\t\t\tevent.stopPropagation();\n\t\t}\n\t}, []);\n\n\t// Calculate border radius based on header/footer presence\n\tconst getBorderRadius = useCallback((): CSSProperties => {\n\t\tconst borderRadiusValue = '.25rem';\n\t\tconst hasHeader = heading || header;\n\t\tconst borderTopRadius = hasHeader\n\t\t\t? {}\n\t\t\t: {\n\t\t\t\t\tborderTopLeftRadius: borderRadiusValue,\n\t\t\t\t\tborderTopRightRadius: borderRadiusValue,\n\t\t\t\t};\n\t\tconst borderBottomRadius = footer\n\t\t\t? {}\n\t\t\t: {\n\t\t\t\t\tborderBottomLeftRadius: borderRadiusValue,\n\t\t\t\t\tborderBottomRightRadius: borderRadiusValue,\n\t\t\t\t};\n\t\treturn {\n\t\t\t...borderTopRadius,\n\t\t\t...borderBottomRadius,\n\t\t};\n\t}, [heading, header, footer]);\n\n\t// Get ARIA attributes\n\tconst getAriaAttributes = useCallback(() => {\n\t\tconst modalId = getId();\n\t\tconst ariaAttributes: {\n\t\t\tdescribedby: string;\n\t\t\tmodal: boolean;\n\t\t\tlabel?: string;\n\t\t\tlabelledby?: string;\n\t\t} = {\n\t\t\tdescribedby: `${modalId}-modal-content`,\n\t\t\tmodal: true,\n\t\t};\n\n\t\tif (assistiveText.dialogLabel) {\n\t\t\tariaAttributes.label = assistiveText.dialogLabel;\n\t\t\treturn ariaAttributes;\n\t\t}\n\n\t\tlet dialogLabelledBy: string | undefined;\n\n\t\tif (assistiveText.dialogLabelledBy) {\n\t\t\tdialogLabelledBy = assistiveText.dialogLabelledBy;\n\t\t} else if (heading) {\n\t\t\tdialogLabelledBy = `${modalId}-heading`;\n\t\t}\n\n\t\tif (dialogLabelledBy) {\n\t\t\tariaAttributes.labelledby = dialogLabelledBy;\n\t\t}\n\n\t\treturn ariaAttributes;\n\t}, [getId, assistiveText, heading]);\n\n\t// Render header\n\tconst renderHeader = () => {\n\t\tlet headerContent = header;\n\t\tconst headerEmpty = !headerContent && !heading && !tagline;\n\t\tconst closeButtonText = assistiveText.closeButton;\n\n\t\tconst closeButton = (\n\t\t\t<Button\n\t\t\t\tassistiveText={{ icon: closeButtonText }}\n\t\t\t\ticonCategory=\"utility\"\n\t\t\t\ticonName=\"close\"\n\t\t\t\ticonSize=\"large\"\n\t\t\t\tclassName=\"slds-button_icon slds-modal__close\"\n\t\t\t\tonClick={handleCloseButtonClick}\n\t\t\t\ttitle={closeButtonText}\n\t\t\t\tvariant=\"icon\"\n\t\t\t/>\n\t\t);\n\n\t\tif ((!headerContent && heading) || tagline) {\n\t\t\theaderContent = (\n\t\t\t\t<div>\n\t\t\t\t\t{toast}\n\t\t\t\t\t<h1\n\t\t\t\t\t\tclassName={classNames({\n\t\t\t\t\t\t\t'slds-text-heading_small': isPrompt,\n\t\t\t\t\t\t\t'slds-text-heading_medium': !isPrompt,\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tid={`${getId()}-heading`}\n\t\t\t\t\t>\n\t\t\t\t\t\t{heading}\n\t\t\t\t\t</h1>\n\t\t\t\t\t{tagline ? <p className=\"slds-m-top_x-small\">{tagline}</p> : null}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<header\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t'slds-modal__header',\n\t\t\t\t\t{\n\t\t\t\t\t\t'slds-modal__header_empty': headerEmpty,\n\t\t\t\t\t\t[`slds-theme_${prompt}`]: isPrompt,\n\t\t\t\t\t\t'slds-theme_alert-texture': isPrompt,\n\t\t\t\t\t},\n\t\t\t\t\theaderClassName\n\t\t\t\t)}\n\t\t\t\tonClick={handleModalClick}\n\t\t\t>\n\t\t\t\t{disableClose ? null : closeButton}\n\t\t\t\t{headerContent}\n\t\t\t</header>\n\t\t);\n\t};\n\n\t// Render footer\n\tconst renderFooter = () => {\n\t\tif (!footer) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst footerClasses = {\n\t\t\t'slds-modal__footer': true,\n\t\t\t'slds-modal__footer_directional': directional,\n\t\t\t'slds-theme_default': isPrompt,\n\t\t};\n\n\t\treturn (\n\t\t\t<footer\n\t\t\t\tclassName={classNames(footerClasses, footerClassName)}\n\t\t\t\tonClick={handleModalClick}\n\t\t\t>\n\t\t\t\t{footer}\n\t\t\t</footer>\n\t\t);\n\t};\n\n\t// Render modal content\n\tconst renderModal = () => {\n\t\tconst modalStyle =\n\t\t\talign === 'top' ? { justifyContent: 'flex-start' } : undefined;\n\t\tconst borderRadius = getBorderRadius();\n\t\tconst contentStyle: CSSProperties = {\n\t\t\t...borderRadius,\n\t\t\t...contentStyleProp,\n\t\t};\n\n\t\treturn (\n\t\t\t<section\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t'slds-modal',\n\t\t\t\t\t'slds-fade-in-open',\n\t\t\t\t\tsize ? `slds-modal_${size}` : null,\n\t\t\t\t\t{ 'slds-modal_prompt': isPrompt },\n\t\t\t\t\tclassName\n\t\t\t\t)}\n\t\t\t\tonClick={dismissModalOnClickOutside}\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tclassName={classNames('slds-modal__container', containerClassName)}\n\t\t\t\t\tstyle={modalStyle}\n\t\t\t\t>\n\t\t\t\t\t{renderHeader()}\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames('slds-modal__content', contentClassName)}\n\t\t\t\t\t\tid={`${getId()}-modal-content`}\n\t\t\t\t\t\tstyle={contentStyle}\n\t\t\t\t\t\tonClick={handleModalClick}\n\t\t\t\t\t>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</div>\n\t\t\t\t\t{renderFooter()}\n\t\t\t\t</div>\n\t\t\t</section>\n\t\t);\n\t};\n\n\t// Custom styles for ReactModal - using undefined to reset default styles\n\tconst customStyles: ReactModal.Styles = {\n\t\tcontent: {\n\t\t\tposition: undefined,\n\t\t\ttop: undefined,\n\t\t\tleft: undefined,\n\t\t\tright: undefined,\n\t\t\tbottom: undefined,\n\t\t\tborder: undefined,\n\t\t\tbackground: undefined,\n\t\t\toverflow: undefined,\n\t\t\tWebkitOverflowScrolling: undefined,\n\t\t\tborderRadius: undefined,\n\t\t\toutline: undefined,\n\t\t\tpadding: undefined,\n\t\t},\n\t\toverlay: {\n\t\t\tzIndex: 8000, // following SLDS guideline for z-index overlay\n\t\t\tbackgroundColor: undefined,\n\t\t},\n\t};\n\n\tconst ariaAttributes = getAriaAttributes();\n\n\treturn (\n\t\t<ReactModal\n\t\t\taria={ariaAttributes}\n\t\t\tariaHideApp={ariaHideApp}\n\t\t\tisOpen={isOpen}\n\t\t\tonRequestClose={handleReactModalRequestClose}\n\t\t\trole={disableClose ? 'alertdialog' : 'dialog'}\n\t\t\tstyle={customStyles}\n\t\t\tparentSelector={parentSelector}\n\t\t\tportalClassName={classNames('ReactModalPortal', portalClassName)}\n\t\t>\n\t\t\t{renderModal()}\n\t\t\t<div className=\"slds-backdrop slds-backdrop_open\" />\n\t\t</ReactModal>\n\t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P,QAAQ,KAAA;GACR,QAAQ,KAAA;GACR,YAAY,KAAA;GACZ,UAAU,KAAA;GACV,yBAAyB,KAAA;GACzB,cAAc,KAAA;GACd,SAAS,KAAA;GACT,SAAS,KAAA;EACV;EACA,SAAS;GACR,QAAQ;GACR,iBAAiB,KAAA;EAClB;CACD,GAEM,KAAiB,EAAkB;CAEzC,OACC,kBAAC,GAAD;EACC,MAAM;EACO;EACL;EACR,gBAAgB;EAChB,MAAM,IAAe,gBAAgB;EACrC,OAAO;EACS;EAChB,iBAAiB,EAAW,oBAAoB,CAAe;EARhE,UAAA,CAUE,GAAY,GACb,kBAAC,OAAD,EAAK,WAAU,mCAAoC,CAAA,CACxC;;AAEd;AAEA,EAAM,cAAc"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/modal/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\n// Implements the [Modal design pattern](https://lightningdesignsystem.com/components/modals/) in React.\n\nimport {\n\tforwardRef,\n\tuseState,\n\tuseEffect,\n\tuseCallback,\n\tuseMemo,\n\tuseRef,\n\tCSSProperties,\n\tReactNode,\n\tMouseEvent,\n\tKeyboardEvent,\n} from 'react';\nimport classNames from 'classnames';\nimport ReactModal from 'react-modal';\n\nimport checkAppElementIsSet from '../../utilities/warning/check-app-element-set';\nimport Button from '../button';\nimport { MODAL } from '../../utilities/constants';\nimport generateId from '../../utilities/generate-id';\nimport checkProps from './check-props';\nimport componentDoc from './component.json';\n\nconst documentDefined = typeof document !== 'undefined';\nconst windowDefined = typeof window !== 'undefined';\n\n// Types\nexport type ModalAlign = 'top' | 'center';\nexport type ModalSize = 'small' | 'medium' | 'large';\nexport type ModalPrompt =\n\t'success' | 'warning' | 'error' | 'wrench' | 'offline' | 'info';\n\nexport interface ModalAssistiveText {\n\t/** This is a visually hidden label for the dialog. If not provided, `heading` is used. */\n\tdialogLabel?: string;\n\t/** This describes which node labels the dialog. If not provided and dialogLabel is unavailable, `id` is used. */\n\tdialogLabelledBy?: string;\n\t/** This is a visually hidden label for the close button. */\n\tcloseButton?: string;\n}\n\n/**\n * What caused a Modal close request:\n * - `'close-button'`: the header close button was clicked\n * - `'escape'`: the Escape key was pressed\n * - `'click-outside'`: a click landed outside the modal container (on the backdrop area)\n */\nexport type ModalRequestCloseTrigger =\n\t'close-button' | 'escape' | 'click-outside';\n\n/**\n * Data passed to `onRequestClose`\n */\nexport interface ModalRequestCloseData {\n\t/** What caused the close request */\n\ttrigger: ModalRequestCloseTrigger;\n}\n\n/**\n * Event passed to `onRequestClose`: the click (close button / outside click) or\n * keydown (Escape) that caused the request\n */\nexport type ModalRequestCloseEvent = MouseEvent | KeyboardEvent;\n\nexport interface ModalProps {\n\t/** Vertical alignment of Modal. */\n\talign?: ModalAlign;\n\t/** Boolean indicating if the appElement should be hidden. */\n\tariaHideApp?: boolean;\n\t/** Assistive text for accessibility. */\n\tassistiveText?: ModalAssistiveText;\n\t/** Modal content. */\n\tchildren: ReactNode;\n\t/** Custom CSS classes for the root `section.slds-modal` node. */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Custom CSS classes for the `.slds-modal__container` node. */\n\tclassNameContainer?: string | string[] | Record<string, boolean>;\n\t/** Custom CSS classes for the `.slds-modal__content` (body) node. */\n\tclassNameContent?: string | string[] | Record<string, boolean>;\n\t/** Custom CSS classes for the `footer.slds-modal__footer` node. */\n\tclassNameFooter?: string | string[] | Record<string, boolean>;\n\t/** Custom CSS classes for the `header.slds-modal__header` node. */\n\tclassNameHeader?: string | string[] | Record<string, boolean>;\n\t/** Custom CSS classes for the portal DOM node that react-modal appends to `parentSelector()`. */\n\tclassNamePortal?: string | string[] | Record<string, boolean>;\n\t/** @deprecated Use `classNameContainer`. */\n\tcontainerClassName?: string | string[] | Record<string, boolean>;\n\t/** @deprecated Use `classNameContent`. */\n\tcontentClassName?: string | string[] | Record<string, boolean>;\n\t/** @deprecated Use `styleContent`. */\n\tcontentStyle?: CSSProperties;\n\t/** If true, modal footer buttons render left and right. */\n\tdirectional?: boolean;\n\t/** If true, Modals cannot be dismissed by clicking on the close icon or pressing esc key. */\n\tdisableClose?: boolean;\n\t/** If true, Modals can be dismissed by clicking outside of modal. If unspecified, defaults to !disableClose. */\n\tdismissOnClickOutside?: boolean;\n\t/**\n\t * Callback to fire when the Modal requests to be dismissed. Receives the triggering\n\t * click or keydown event and `data.trigger`: `'close-button'`, `'escape'`, or `'click-outside'`.\n\t * Not called when `disableClose` (or `dismissOnClickOutside: false` for outside clicks) prevents it.\n\t */\n\tonRequestClose?: (\n\t\tevent: ModalRequestCloseEvent,\n\t\tdata: ModalRequestCloseData\n\t) => void;\n\t/** Modal footer content, typically buttons. */\n\tfooter?: ReactNode | ReactNode[];\n\t/** @deprecated Use `classNameFooter`. */\n\tfooterClassName?: string | string[] | Record<string, boolean>;\n\t/** Allows for a custom modal header that does not scroll with modal content. */\n\theader?: ReactNode;\n\t/** @deprecated Use `classNameHeader`. */\n\theaderClassName?: string | string[] | Record<string, boolean>;\n\t/** Unique identifier for the modal. The id is automatically generated if not provided. */\n\tid?: string;\n\t/** Forces the modal to be open or closed. */\n\tisOpen: boolean;\n\t/** Function whose return value is the mount node to insert the Modal element into. */\n\tparentSelector?: () => HTMLElement;\n\t/** @deprecated Use `classNamePortal`. */\n\tportalClassName?: string | string[] | Record<string, boolean>;\n\t/** Styles the modal as a prompt. */\n\tprompt?: ModalPrompt;\n\t/** Specifies the modal's width. */\n\tsize?: ModalSize;\n\t/** Custom styles for the `.slds-modal__content` (body) node. */\n\tstyleContent?: CSSProperties;\n\t/** Content underneath the heading in the modal header. */\n\ttagline?: ReactNode;\n\t/** Text heading at the top of a modal. */\n\theading?: ReactNode;\n\t/** Allows adding additional notifications within the modal. */\n\ttoast?: ReactNode;\n}\n\nconst defaultAssistiveText: ModalAssistiveText = {\n\tdialogLabelledBy: '',\n\tcloseButton: 'Close',\n};\n\n/**\n * The Modal component is used for the Lightning Design System Modal and Notification > Prompt components.\n * The Modal opens from a state change outside of the component itself (pass this state to the `isOpen` prop).\n *\n * By default, `Modal` will add `aria-hidden=true` to the `body` tag, but this disables some assistive technologies.\n * To prevent this you can add the following to your application with `#mount` being the root node of your application:\n * ```\n * import settings from 'design-system-react/components/settings';\n * settings.setAppElement('#mount');\n * ```\n */\nconst Modal = forwardRef<HTMLElement, ModalProps>(\n\t(\n\t\t{\n\t\t\talign = 'center',\n\t\t\tariaHideApp = true,\n\t\t\tassistiveText: assistiveTextProp,\n\t\t\tchildren,\n\t\t\tclassName,\n\t\t\tclassNameContainer,\n\t\t\tclassNameContent,\n\t\t\tclassNameFooter,\n\t\t\tclassNameHeader,\n\t\t\tclassNamePortal,\n\t\t\tcontainerClassName,\n\t\t\tcontentClassName,\n\t\t\tcontentStyle,\n\t\t\tdirectional,\n\t\t\tdisableClose,\n\t\t\tdismissOnClickOutside,\n\t\t\tonRequestClose,\n\t\t\tfooter,\n\t\t\tfooterClassName,\n\t\t\theader,\n\t\t\theaderClassName,\n\t\t\tid: idProp,\n\t\t\tisOpen,\n\t\t\tparentSelector,\n\t\t\tportalClassName,\n\t\t\tprompt,\n\t\t\tsize,\n\t\t\tstyleContent,\n\t\t\ttagline,\n\t\t\theading,\n\t\t\ttoast,\n\t\t},\n\t\tref\n\t) => {\n\t\tuseEffect(() => {\n\t\t\tcheckProps(\n\t\t\t\tMODAL,\n\t\t\t\t{\n\t\t\t\t\tcontainerClassName,\n\t\t\t\t\tcontentClassName,\n\t\t\t\t\tcontentStyle,\n\t\t\t\t\tfooterClassName,\n\t\t\t\t\theaderClassName,\n\t\t\t\t\tportalClassName,\n\t\t\t\t},\n\t\t\t\tcomponentDoc\n\t\t\t);\n\t\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t}, []); // Only run on mount\n\n\t\t// State\n\t\tconst [returnFocusTo, setReturnFocusTo] = useState<Element | null>(null);\n\n\t\t// Refs\n\t\tconst generatedId = useRef(generateId());\n\n\t\t// Merged assistive text\n\t\tconst assistiveText = useMemo(\n\t\t\t() => ({\n\t\t\t\t...defaultAssistiveText,\n\t\t\t\t...assistiveTextProp,\n\t\t\t}),\n\t\t\t[assistiveTextProp]\n\t\t);\n\n\t\t// ID getter\n\t\tconst getId = useCallback(() => idProp || generatedId.current, [idProp]);\n\n\t\t// Is this a prompt modal?\n\t\tconst isPrompt = prompt !== undefined;\n\n\t\t// Warn in development if the app element isn't set\n\t\tuseEffect(() => {\n\t\t\tif (ariaHideApp) {\n\t\t\t\tcheckAppElementIsSet();\n\t\t\t}\n\t\t}, []); // Only run on mount\n\n\t\t// Set return focus on mount\n\t\tuseEffect(() => {\n\t\t\tif (documentDefined) {\n\t\t\t\tsetReturnFocusTo(document.activeElement);\n\t\t\t}\n\t\t}, []);\n\n\t\t// Update body scroll when isOpen changes\n\t\tuseEffect(() => {\n\t\t\tif (windowDefined && documentDefined && document.body) {\n\t\t\t\tif (isOpen) {\n\t\t\t\t\tdocument.body.style.overflow = 'hidden';\n\t\t\t\t} else {\n\t\t\t\t\tdocument.body.style.overflow = 'inherit';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn () => {\n\t\t\t\t// Clear body scroll on unmount\n\t\t\t\tif (windowDefined && documentDefined && document.body) {\n\t\t\t\t\tdocument.body.style.overflow = 'inherit';\n\t\t\t\t}\n\t\t\t};\n\t\t}, [isOpen]);\n\n\t\t// Dismiss modal handler\n\t\tconst dismissModal = useCallback(\n\t\t\t(event: ModalRequestCloseEvent, data: ModalRequestCloseData) => {\n\t\t\t\tif (\n\t\t\t\t\treturnFocusTo &&\n\t\t\t\t\t'focus' in returnFocusTo &&\n\t\t\t\t\ttypeof returnFocusTo.focus === 'function'\n\t\t\t\t) {\n\t\t\t\t\treturnFocusTo.focus();\n\t\t\t\t}\n\t\t\t\tif (onRequestClose) {\n\t\t\t\t\tonRequestClose(event, data);\n\t\t\t\t}\n\t\t\t},\n\t\t\t[returnFocusTo, onRequestClose]\n\t\t);\n\n\t\t// Close modal handler (respects disableClose)\n\t\tconst closeModal = useCallback(\n\t\t\t(event: ModalRequestCloseEvent, data: ModalRequestCloseData) => {\n\t\t\t\tif (!disableClose) {\n\t\t\t\t\tdismissModal(event, data);\n\t\t\t\t}\n\t\t\t},\n\t\t\t[disableClose, dismissModal]\n\t\t);\n\n\t\t// Close button click handler\n\t\tconst handleCloseButtonClick = useCallback(\n\t\t\t(event: MouseEvent<HTMLButtonElement>) => {\n\t\t\t\tcloseModal(event, { trigger: 'close-button' });\n\t\t\t},\n\t\t\t[closeModal]\n\t\t);\n\n\t\t// react-modal's own close request: Escape keydown, or a click directly on its overlay\n\t\tconst handleReactModalRequestClose = useCallback(\n\t\t\t(event: ModalRequestCloseEvent) => {\n\t\t\t\tcloseModal(event, {\n\t\t\t\t\ttrigger: event.type === 'keydown' ? 'escape' : 'click-outside',\n\t\t\t\t});\n\t\t\t},\n\t\t\t[closeModal]\n\t\t);\n\n\t\t// Dismiss on click outside handler\n\t\tconst dismissModalOnClickOutside = useCallback(\n\t\t\t(event: MouseEvent<HTMLElement>) => {\n\t\t\t\t// if dismissOnClickOutside is not set, default its value to !disableClose\n\t\t\t\tconst shouldDismiss =\n\t\t\t\t\tdismissOnClickOutside !== undefined\n\t\t\t\t\t\t? dismissOnClickOutside\n\t\t\t\t\t\t: !disableClose;\n\n\t\t\t\tif (shouldDismiss) {\n\t\t\t\t\tdismissModal(event, { trigger: 'click-outside' });\n\t\t\t\t}\n\t\t\t},\n\t\t\t[dismissOnClickOutside, disableClose, dismissModal]\n\t\t);\n\n\t\t// Prevent click propagation inside modal\n\t\tconst handleModalClick = useCallback((event: MouseEvent) => {\n\t\t\tif (event && event.stopPropagation) {\n\t\t\t\tevent.stopPropagation();\n\t\t\t}\n\t\t}, []);\n\n\t\t// Calculate border radius based on header/footer presence\n\t\tconst getBorderRadius = useCallback((): CSSProperties => {\n\t\t\tconst borderRadiusValue = '.25rem';\n\t\t\tconst hasHeader = heading || header;\n\t\t\tconst borderTopRadius = hasHeader\n\t\t\t\t? {}\n\t\t\t\t: {\n\t\t\t\t\t\tborderTopLeftRadius: borderRadiusValue,\n\t\t\t\t\t\tborderTopRightRadius: borderRadiusValue,\n\t\t\t\t\t};\n\t\t\tconst borderBottomRadius = footer\n\t\t\t\t? {}\n\t\t\t\t: {\n\t\t\t\t\t\tborderBottomLeftRadius: borderRadiusValue,\n\t\t\t\t\t\tborderBottomRightRadius: borderRadiusValue,\n\t\t\t\t\t};\n\t\t\treturn {\n\t\t\t\t...borderTopRadius,\n\t\t\t\t...borderBottomRadius,\n\t\t\t};\n\t\t}, [heading, header, footer]);\n\n\t\t// Get ARIA attributes\n\t\tconst getAriaAttributes = useCallback(() => {\n\t\t\tconst modalId = getId();\n\t\t\tconst ariaAttributes: {\n\t\t\t\tdescribedby: string;\n\t\t\t\tmodal: boolean;\n\t\t\t\tlabel?: string;\n\t\t\t\tlabelledby?: string;\n\t\t\t} = {\n\t\t\t\tdescribedby: `${modalId}-modal-content`,\n\t\t\t\tmodal: true,\n\t\t\t};\n\n\t\t\tif (assistiveText.dialogLabel) {\n\t\t\t\tariaAttributes.label = assistiveText.dialogLabel;\n\t\t\t\treturn ariaAttributes;\n\t\t\t}\n\n\t\t\tlet dialogLabelledBy: string | undefined;\n\n\t\t\tif (assistiveText.dialogLabelledBy) {\n\t\t\t\tdialogLabelledBy = assistiveText.dialogLabelledBy;\n\t\t\t} else if (heading) {\n\t\t\t\tdialogLabelledBy = `${modalId}-heading`;\n\t\t\t}\n\n\t\t\tif (dialogLabelledBy) {\n\t\t\t\tariaAttributes.labelledby = dialogLabelledBy;\n\t\t\t}\n\n\t\t\treturn ariaAttributes;\n\t\t}, [getId, assistiveText, heading]);\n\n\t\t// Render header\n\t\tconst renderHeader = () => {\n\t\t\tlet headerContent = header;\n\t\t\tconst headerEmpty = !headerContent && !heading && !tagline;\n\t\t\tconst closeButtonText = assistiveText.closeButton;\n\n\t\t\tconst closeButton = (\n\t\t\t\t<Button\n\t\t\t\t\tassistiveText={{ icon: closeButtonText }}\n\t\t\t\t\ticonCategory=\"utility\"\n\t\t\t\t\ticonName=\"close\"\n\t\t\t\t\ticonSize=\"large\"\n\t\t\t\t\tclassName=\"slds-button_icon slds-modal__close\"\n\t\t\t\t\tonClick={handleCloseButtonClick}\n\t\t\t\t\ttitle={closeButtonText}\n\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t/>\n\t\t\t);\n\n\t\t\tif ((!headerContent && heading) || tagline) {\n\t\t\t\theaderContent = (\n\t\t\t\t\t<div>\n\t\t\t\t\t\t{toast}\n\t\t\t\t\t\t<h1\n\t\t\t\t\t\t\tclassName={classNames({\n\t\t\t\t\t\t\t\t'slds-text-heading_small': isPrompt,\n\t\t\t\t\t\t\t\t'slds-text-heading_medium': !isPrompt,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\tid={`${getId()}-heading`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{heading}\n\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t{tagline ? <p className=\"slds-m-top_x-small\">{tagline}</p> : null}\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t<header\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t'slds-modal__header',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'slds-modal__header_empty': headerEmpty,\n\t\t\t\t\t\t\t[`slds-theme_${prompt}`]: isPrompt,\n\t\t\t\t\t\t\t'slds-theme_alert-texture': isPrompt,\n\t\t\t\t\t\t},\n\t\t\t\t\t\theaderClassName,\n\t\t\t\t\t\tclassNameHeader\n\t\t\t\t\t)}\n\t\t\t\t\tonClick={handleModalClick}\n\t\t\t\t>\n\t\t\t\t\t{disableClose ? null : closeButton}\n\t\t\t\t\t{headerContent}\n\t\t\t\t</header>\n\t\t\t);\n\t\t};\n\n\t\t// Render footer\n\t\tconst renderFooter = () => {\n\t\t\tif (!footer) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst footerClasses = {\n\t\t\t\t'slds-modal__footer': true,\n\t\t\t\t'slds-modal__footer_directional': directional,\n\t\t\t\t'slds-theme_default': isPrompt,\n\t\t\t};\n\n\t\t\treturn (\n\t\t\t\t<footer\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\tfooterClasses,\n\t\t\t\t\t\tfooterClassName,\n\t\t\t\t\t\tclassNameFooter\n\t\t\t\t\t)}\n\t\t\t\t\tonClick={handleModalClick}\n\t\t\t\t>\n\t\t\t\t\t{footer}\n\t\t\t\t</footer>\n\t\t\t);\n\t\t};\n\n\t\t// Render modal content\n\t\tconst renderModal = () => {\n\t\t\tconst modalStyle =\n\t\t\t\talign === 'top' ? { justifyContent: 'flex-start' } : undefined;\n\t\t\tconst borderRadius = getBorderRadius();\n\t\t\tconst mergedStyleContent: CSSProperties = {\n\t\t\t\t...borderRadius,\n\t\t\t\t...contentStyle,\n\t\t\t\t...styleContent,\n\t\t\t};\n\n\t\t\treturn (\n\t\t\t\t<section\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t'slds-modal',\n\t\t\t\t\t\t'slds-fade-in-open',\n\t\t\t\t\t\tsize ? `slds-modal_${size}` : null,\n\t\t\t\t\t\t{ 'slds-modal_prompt': isPrompt },\n\t\t\t\t\t\tclassName\n\t\t\t\t\t)}\n\t\t\t\t\tonClick={dismissModalOnClickOutside}\n\t\t\t\t\tref={ref}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-modal__container',\n\t\t\t\t\t\t\tcontainerClassName,\n\t\t\t\t\t\t\tclassNameContainer\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tstyle={modalStyle}\n\t\t\t\t\t>\n\t\t\t\t\t\t{renderHeader()}\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t\t'slds-modal__content',\n\t\t\t\t\t\t\t\tcontentClassName,\n\t\t\t\t\t\t\t\tclassNameContent\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\tid={`${getId()}-modal-content`}\n\t\t\t\t\t\t\tstyle={mergedStyleContent}\n\t\t\t\t\t\t\tonClick={handleModalClick}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{renderFooter()}\n\t\t\t\t\t</div>\n\t\t\t\t</section>\n\t\t\t);\n\t\t};\n\n\t\t// Custom styles for ReactModal - using undefined to reset default styles\n\t\tconst customStyles: ReactModal.Styles = {\n\t\t\tcontent: {\n\t\t\t\tposition: undefined,\n\t\t\t\ttop: undefined,\n\t\t\t\tleft: undefined,\n\t\t\t\tright: undefined,\n\t\t\t\tbottom: undefined,\n\t\t\t\tborder: undefined,\n\t\t\t\tbackground: undefined,\n\t\t\t\toverflow: undefined,\n\t\t\t\tWebkitOverflowScrolling: undefined,\n\t\t\t\tborderRadius: undefined,\n\t\t\t\toutline: undefined,\n\t\t\t\tpadding: undefined,\n\t\t\t},\n\t\t\toverlay: {\n\t\t\t\tzIndex: 8000, // following SLDS guideline for z-index overlay\n\t\t\t\tbackgroundColor: undefined,\n\t\t\t},\n\t\t};\n\n\t\tconst ariaAttributes = getAriaAttributes();\n\n\t\treturn (\n\t\t\t<ReactModal\n\t\t\t\taria={ariaAttributes}\n\t\t\t\tariaHideApp={ariaHideApp}\n\t\t\t\tisOpen={isOpen}\n\t\t\t\tonRequestClose={handleReactModalRequestClose}\n\t\t\t\trole={disableClose ? 'alertdialog' : 'dialog'}\n\t\t\t\tstyle={customStyles}\n\t\t\t\tparentSelector={parentSelector}\n\t\t\t\tportalClassName={classNames(\n\t\t\t\t\t'ReactModalPortal',\n\t\t\t\t\tportalClassName,\n\t\t\t\t\tclassNamePortal\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{renderModal()}\n\t\t\t\t<div className=\"slds-backdrop slds-backdrop_open\" />\n\t\t\t</ReactModal>\n\t\t);\n\t}\n);\n\nModal.displayName = MODAL;\n\nexport default Modal;\n"],"mappings":";;;;;;;;;;;AA2BA,IAAM,IAAkB,OAAO,WAAa,KACtC,IAAgB,OAAO,SAAW,KAgHlC,IAA2C;CAChD,kBAAkB;CAClB,aAAa;AACd,GAaM,IAAQ,GAEZ,EACC,WAAQ,UACR,iBAAc,IACd,eAAe,GACf,aACA,eACA,wBACA,sBACA,qBACA,qBACA,oBACA,uBACA,qBACA,iBACA,gBACA,iBACA,0BACA,mBACA,WACA,oBACA,WACA,oBACA,IAAI,GACJ,WACA,mBACA,oBACA,WACA,SACA,iBACA,YACA,YACA,YAED,MACI;CACJ,QAAgB;EACf,EACC,GACA;GACC;GACA;GACA;GACA;GACA;GACA;EACD,GACA,CACD;CAED,GAAG,CAAC,CAAC;CAGL,IAAM,CAAC,GAAe,KAAoB,EAAyB,IAAI,GAGjE,IAAc,EAAO,EAAW,CAAC,GAGjC,IAAgB,SACd;EACN,GAAG;EACH,GAAG;CACJ,IACA,CAAC,CAAiB,CACnB,GAGM,IAAQ,QAAkB,KAAU,EAAY,SAAS,CAAC,CAAM,CAAC,GAGjE,IAAW,MAAW,KAAA;CAiB5B,AAdA,QAAgB;EACf,AAAI,KACH,EAAqB;CAEvB,GAAG,CAAC,CAAC,GAGL,QAAgB;EACf,AAAI,KACH,EAAiB,SAAS,aAAa;CAEzC,GAAG,CAAC,CAAC,GAGL,SACK,KAAiB,KAAmB,SAAS,SAC5C,IACH,SAAS,KAAK,MAAM,WAAW,WAE/B,SAAS,KAAK,MAAM,WAAW,kBAIpB;EAEZ,AAAI,KAAiB,KAAmB,SAAS,SAChD,SAAS,KAAK,MAAM,WAAW;CAEjC,IACE,CAAC,CAAM,CAAC;CAGX,IAAM,IAAe,GACnB,GAA+B,MAAgC;EAQ/D,AANC,KACA,WAAW,KACX,OAAO,EAAc,SAAU,cAE/B,EAAc,MAAM,GAEjB,KACH,EAAe,GAAO,CAAI;CAE5B,GACA,CAA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f,OAAO;MACP,SAAS;MAER;KACG,CAAA;KACJ,GAAa;IACV;;EACG,CAAA;CAEX,GAGM,KAAkC;EACvC,SAAS;GACR,UAAU,KAAA;GACV,KAAK,KAAA;GACL,MAAM,KAAA;GACN,OAAO,KAAA;GACP,QAAQ,KAAA;GACR,QAAQ,KAAA;GACR,YAAY,KAAA;GACZ,UAAU,KAAA;GACV,yBAAyB,KAAA;GACzB,cAAc,KAAA;GACd,SAAS,KAAA;GACT,SAAS,KAAA;EACV;EACA,SAAS;GACR,QAAQ;GACR,iBAAiB,KAAA;EAClB;CACD,GAEM,KAAiB,GAAkB;CAEzC,OACC,kBAAC,GAAD;EACC,MAAM;EACO;EACL;EACR,gBAAgB;EAChB,MAAM,IAAe,gBAAgB;EACrC,OAAO;EACS;EAChB,iBAAiB,EAChB,oBACA,GACA,CACD;EAZD,UAAA,CAcE,GAAY,GACb,kBAAC,OAAD,EAAK,WAAU,mCAAoC,CAAA,CACxC;;AAEd,CACD;AAEA,EAAM,cAAc"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
//#region components/popover/component.json
|
|
2
|
+
var e = "popover", t = "prod", n = "Popover", r = {
|
|
3
|
+
component: e,
|
|
4
|
+
status: t,
|
|
5
|
+
"display-name": "Popovers",
|
|
6
|
+
classKey: n,
|
|
7
|
+
"last-accessibility-review": {
|
|
8
|
+
"date-iso-8601": "2018/01/18",
|
|
9
|
+
"commit-sha": "ad6b6c6523ee21cada11be5f7ea4d99abc530726"
|
|
10
|
+
},
|
|
11
|
+
"SLDS-component-path": "/components/popovers",
|
|
12
|
+
"site-stories": [
|
|
13
|
+
{
|
|
14
|
+
heading: "With Header",
|
|
15
|
+
path: "/__examples__/header.jsx"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
heading: "With Alternative Header",
|
|
19
|
+
path: "/__examples__/alternative-header.jsx"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
heading: "Controlled State with Footer",
|
|
23
|
+
path: "/__examples__/controlled-with-footer.jsx"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
heading: "Custom Target",
|
|
27
|
+
path: "/__examples__/custom-target.jsx"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
heading: "Error Theme",
|
|
31
|
+
path: "/__examples__/error.jsx"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
heading: "Feature",
|
|
35
|
+
path: "/__examples__/feature.jsx"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
heading: "Walkthrough",
|
|
39
|
+
path: "/__examples__/walkthrough.jsx"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
heading: "Walkthrough Action",
|
|
43
|
+
path: "/__examples__/walkthrough-action.jsx"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
heading: "Warning",
|
|
47
|
+
path: "/__examples__/warning.jsx"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
heading: "Edit Dialog",
|
|
51
|
+
path: "/__examples__/edit-dialog.jsx"
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"url-slug": "popovers"
|
|
55
|
+
};
|
|
56
|
+
//#endregion
|
|
57
|
+
export { n as classKey, e as component, r as default, t as status };
|
|
58
|
+
|
|
59
|
+
//# sourceMappingURL=component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","names":[],"sources":["../../../../components/popover/component.json"],"sourcesContent":["{\n\t\"component\": \"popover\",\n\t\"status\": \"prod\",\n\t\"display-name\": \"Popovers\",\n\t\"classKey\": \"Popover\",\n\t\"last-accessibility-review\": {\n\t\t\"date-iso-8601\": \"2018/01/18\",\n\t\t\"commit-sha\": \"ad6b6c6523ee21cada11be5f7ea4d99abc530726\"\n\t},\n\t\"SLDS-component-path\": \"/components/popovers\",\n\t\"site-stories\": [\n\t\t{\n\t\t\t\"heading\": \"With Header\",\n\t\t\t\"path\": \"/__examples__/header.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"With Alternative Header\",\n\t\t\t\"path\": \"/__examples__/alternative-header.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"Controlled State with Footer\",\n\t\t\t\"path\": \"/__examples__/controlled-with-footer.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"Custom Target\",\n\t\t\t\"path\": \"/__examples__/custom-target.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"Error Theme\",\n\t\t\t\"path\": \"/__examples__/error.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"Feature\",\n\t\t\t\"path\": \"/__examples__/feature.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"Walkthrough\",\n\t\t\t\"path\": \"/__examples__/walkthrough.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"Walkthrough Action\",\n\t\t\t\"path\": \"/__examples__/walkthrough-action.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"Warning\",\n\t\t\t\"path\": \"/__examples__/warning.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"Edit Dialog\",\n\t\t\t\"path\": \"/__examples__/edit-dialog.jsx\"\n\t\t}\n\t],\n\t\"url-slug\": \"popovers\"\n}\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit-dialog.js","names":[],"sources":["../../../../components/popover/edit-dialog.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\n// # Edit Dialog Popver Component\n\n// ### React\nimport React, { type ReactNode } from 'react';\nimport assign from 'lodash.assign';\n\nimport { POPOVER_EDIT_DIALOG } from '../../utilities/constants';\n\nimport Button from '../button';\nimport Popover, { type PopoverProps } from './index';\n\nexport interface EditDialogLabels {\n\t/** text for Cancel button */\n\tcancel?: ReactNode;\n\t/** text for Save button */\n\tsave?: ReactNode;\n}\n\nexport interface EditDialogProps {\n\t/**\n\t * The trigger element. Defaults to an edit button when not provided.\n\t */\n\tchildren?: ReactNode;\n\t/**\n\t * Disables the edit dialog and prevents clicking it.\n\t */\n\tdisabled?: boolean;\n\t/**\n\t * Passed to the default trigger button's `onClick`.\n\t */\n\thandleOpen?: (event: React.MouseEvent) => void;\n\t/**\n\t * By default, a unique ID will be created at render to support keyboard navigation, ARIA roles, and connect the popover to the triggering button. This ID will be applied to the triggering element. `${id}-popover`, `${id}-dialog-heading`, `${id}-dialog-body` are also created.\n\t */\n\tid?: string;\n\t/**\n\t * Set to true when inputs within the popover are modified.\n\t */\n\tisModified?: boolean;\n\t/**\n\t * **Text labels for internationalization**\n\t * This object is merged with the default props object on every render.\n\t * * `cancel`: text for Cancel button\n\t * * `save`: text for Save button\n\t *\n\t * _Tested with snapshot testing._\n\t */\n\tlabels?: EditDialogLabels;\n\t/**\n\t * This function is passed onto the cancel `Button`. Triggered when the trigger button is clicked.\n\t */\n\tonCancel?: (event: React.MouseEvent) => void;\n\t/**\n\t * This function is passed onto the save `Button`. Triggered when the trigger button is clicked.\n\t */\n\tonSave?: (event: React.MouseEvent) => void;\n\t/**\n\t * Popover of type `~/components/popover`. This popover will be cloned and additional props appended, if passed in.\n\t */\n\tpopover?: ReactNode;\n\t/**\n\t * Additional props are passed onto the underlying `Popover`.\n\t */\n\t[key: string]: unknown;\n}\n\ninterface EditDialogState {\n\tisOpen: boolean;\n}\n\nconst defaultProps: Partial<EditDialogProps> = {\n\tlabels: {\n\t\tcancel: 'Cancel',\n\t\tsave: 'Save',\n\t},\n};\n\nclass EditDialog extends React.Component<EditDialogProps, EditDialogState> {\n\t// ### Display Name\n\t// Always use the canonical component name as the React display name.\n\tstatic displayName = POPOVER_EDIT_DIALOG;\n\n\tstatic defaultProps = defaultProps;\n\n\tstate: EditDialogState = { isOpen: false };\n\n\thandleOpen = () => {\n\t\tthis.setState({ isOpen: true });\n\t};\n\n\thandleClose = () => {\n\t\tthis.setState({ isOpen: false });\n\t};\n\n\trender() {\n\t\tconst { onCancel, onSave, ...restProps } = this.props;\n\n\t\t// trigger button will either be passed in children or defaults to an edit button.\n\t\tconst children = this.props.children ? (\n\t\t\tthis.props.children\n\t\t) : (\n\t\t\t<Button\n\t\t\t\tassistiveText={{ icon: 'Edit: Status' }}\n\t\t\t\tclassName=\"slds-button_reset\"\n\t\t\t\tdisabled={this.props.disabled}\n\t\t\t\ticonCategory=\"utility\"\n\t\t\t\ticonClassName=\"slds-button__icon slds-button__icon_hint\"\n\t\t\t\ticonName=\"edit\"\n\t\t\t\tonClick={this.props.handleOpen}\n\t\t\t\tvariant=\"icon\"\n\t\t\t\tstyle={{ verticalAlign: 'middle' }}\n\t\t\t/>\n\t\t);\n\n\t\tconst labels = assign({}, defaultProps.labels, this.props.labels);\n\n\t\treturn (\n\t\t\t<Popover\n\t\t\t\tclassNameFooter={[\n\t\t\t\t\t'slds-p-top_xxx-small',\n\t\t\t\t\t'slds-p-bottom_xx-small',\n\t\t\t\t\t'slds-p-right_large',\n\t\t\t\t]}\n\t\t\t\tclassNameBody={['slds-p-bottom_xx-small']}\n\t\t\t\tfooter={\n\t\t\t\t\t<div className=\"slds-text-align_right slds-text-align_right slds-p-bottom_x-small slds-p-right_xx-small\">\n\t\t\t\t\t\t<Button label={labels.cancel} onClick={onCancel} />\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tdisabled={!this.props.isModified}\n\t\t\t\t\t\t\tvariant=\"brand\"\n\t\t\t\t\t\t\tlabel={labels.save}\n\t\t\t\t\t\t\tonClick={onSave}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\
|
|
1
|
+
{"version":3,"file":"edit-dialog.js","names":[],"sources":["../../../../components/popover/edit-dialog.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\n// # Edit Dialog Popver Component\n\n// ### React\nimport React, { type ReactNode } from 'react';\nimport assign from 'lodash.assign';\n\nimport { POPOVER_EDIT_DIALOG } from '../../utilities/constants';\n\nimport Button from '../button';\nimport Popover, { type PopoverProps } from './index';\n\nexport interface EditDialogLabels {\n\t/** text for Cancel button */\n\tcancel?: ReactNode;\n\t/** text for Save button */\n\tsave?: ReactNode;\n}\n\nexport interface EditDialogProps {\n\t/**\n\t * The trigger element. Defaults to an edit button when not provided.\n\t */\n\tchildren?: ReactNode;\n\t/**\n\t * Disables the edit dialog and prevents clicking it.\n\t */\n\tdisabled?: boolean;\n\t/**\n\t * Passed to the default trigger button's `onClick`.\n\t */\n\thandleOpen?: (event: React.MouseEvent) => void;\n\t/**\n\t * By default, a unique ID will be created at render to support keyboard navigation, ARIA roles, and connect the popover to the triggering button. This ID will be applied to the triggering element. `${id}-popover`, `${id}-dialog-heading`, `${id}-dialog-body` are also created.\n\t */\n\tid?: string;\n\t/**\n\t * Set to true when inputs within the popover are modified.\n\t */\n\tisModified?: boolean;\n\t/**\n\t * **Text labels for internationalization**\n\t * This object is merged with the default props object on every render.\n\t * * `cancel`: text for Cancel button\n\t * * `save`: text for Save button\n\t *\n\t * _Tested with snapshot testing._\n\t */\n\tlabels?: EditDialogLabels;\n\t/**\n\t * This function is passed onto the cancel `Button`. Triggered when the trigger button is clicked.\n\t */\n\tonCancel?: (event: React.MouseEvent) => void;\n\t/**\n\t * This function is passed onto the save `Button`. Triggered when the trigger button is clicked.\n\t */\n\tonSave?: (event: React.MouseEvent) => void;\n\t/**\n\t * Popover of type `~/components/popover`. This popover will be cloned and additional props appended, if passed in.\n\t */\n\tpopover?: ReactNode;\n\t/**\n\t * Additional props are passed onto the underlying `Popover`.\n\t */\n\t[key: string]: unknown;\n}\n\ninterface EditDialogState {\n\tisOpen: boolean;\n}\n\nconst defaultProps: Partial<EditDialogProps> = {\n\tlabels: {\n\t\tcancel: 'Cancel',\n\t\tsave: 'Save',\n\t},\n};\n\nclass EditDialog extends React.Component<EditDialogProps, EditDialogState> {\n\t// ### Display Name\n\t// Always use the canonical component name as the React display name.\n\tstatic displayName = POPOVER_EDIT_DIALOG;\n\n\tstatic defaultProps = defaultProps;\n\n\tstate: EditDialogState = { isOpen: false };\n\n\thandleOpen = () => {\n\t\tthis.setState({ isOpen: true });\n\t};\n\n\thandleClose = () => {\n\t\tthis.setState({ isOpen: false });\n\t};\n\n\trender() {\n\t\tconst { onCancel, onSave, ...restProps } = this.props;\n\n\t\t// trigger button will either be passed in children or defaults to an edit button.\n\t\tconst children = this.props.children ? (\n\t\t\tthis.props.children\n\t\t) : (\n\t\t\t<Button\n\t\t\t\tassistiveText={{ icon: 'Edit: Status' }}\n\t\t\t\tclassName=\"slds-button_reset\"\n\t\t\t\tdisabled={this.props.disabled}\n\t\t\t\ticonCategory=\"utility\"\n\t\t\t\ticonClassName=\"slds-button__icon slds-button__icon_hint\"\n\t\t\t\ticonName=\"edit\"\n\t\t\t\tonClick={this.props.handleOpen}\n\t\t\t\tvariant=\"icon\"\n\t\t\t\tstyle={{ verticalAlign: 'middle' }}\n\t\t\t/>\n\t\t);\n\n\t\tconst labels = assign({}, defaultProps.labels, this.props.labels);\n\n\t\treturn (\n\t\t\t<Popover\n\t\t\t\tclassNameFooter={[\n\t\t\t\t\t'slds-p-top_xxx-small',\n\t\t\t\t\t'slds-p-bottom_xx-small',\n\t\t\t\t\t'slds-p-right_large',\n\t\t\t\t]}\n\t\t\t\tclassNameBody={['slds-p-bottom_xx-small']}\n\t\t\t\tfooter={\n\t\t\t\t\t<div className=\"slds-text-align_right slds-text-align_right slds-p-bottom_x-small slds-p-right_xx-small\">\n\t\t\t\t\t\t<Button label={labels.cancel} onClick={onCancel} />\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tdisabled={!this.props.isModified}\n\t\t\t\t\t\t\tvariant=\"brand\"\n\t\t\t\t\t\t\tlabel={labels.save}\n\t\t\t\t\t\t\tonClick={onSave}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\tstyleFooter={{ borderTop: '0px' }}\n\t\t\t\tonClose={this.handleClose}\n\t\t\t\tonRequestClose={this.handleClose}\n\t\t\t\tonOpen={this.handleOpen}\n\t\t\t\t{...(restProps as unknown as PopoverProps)}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</Popover>\n\t\t);\n\t}\n}\n\nexport default EditDialog;\n"],"mappings":";;;;;;;AAyEA,IAAM,IAAyC,EAC9C,QAAQ;CACP,QAAQ;CACR,MAAM;AACP,EACD,GAEM,IAAN,cAAyB,EAAM,UAA4C;CAG1E,OAAO,cAAc;CAErB,OAAO,eAAe;CAEtB,QAAyB,EAAE,QAAQ,GAAM;CAEzC,mBAAmB;EAClB,KAAK,SAAS,EAAE,QAAQ,GAAK,CAAC;CAC/B;CAEA,oBAAoB;EACnB,KAAK,SAAS,EAAE,QAAQ,GAAM,CAAC;CAChC;CAEA,SAAS;EACR,IAAM,EAAE,aAAU,WAAQ,GAAG,MAAc,KAAK,OAG1C,IAAW,KAAK,MAAM,WAC3B,KAAK,MAAM,WAEX,kBAAC,GAAD;GACC,eAAe,EAAE,MAAM,eAAe;GACtC,WAAU;GACV,UAAU,KAAK,MAAM;GACrB,cAAa;GACb,eAAc;GACd,UAAS;GACT,SAAS,KAAK,MAAM;GACpB,SAAQ;GACR,OAAO,EAAE,eAAe,SAAS;EACjC,CAAA,GAGI,IAAS,EAAO,CAAC,GAAG,EAAa,QAAQ,KAAK,MAAM,MAAM;EAEhE,OACC,kBAAC,GAAD;GACC,iBAAiB;IAChB;IACA;IACA;GACD;GACA,eAAe,CAAC,wBAAwB;GACxC,QACC,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACC,kBAAC,GAAD;KAAQ,OAAO,EAAO;KAAQ,SAAS;IAAW,CAAA,GAClD,kBAAC,GAAD;KACC,UAAU,CAAC,KAAK,MAAM;KACtB,SAAQ;KACR,OAAO,EAAO;KACd,SAAS;IACT,CAAA,CACG;;GAEN,aAAa,E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