@contentful/f36-modal 4.14.0 → 4.16.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # Change Log
2
2
 
3
+ ## 4.16.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#2175](https://github.com/contentful/forma-36/pull/2175) [`438ccb1d`](https://github.com/contentful/forma-36/commit/438ccb1d28e7e7d309b050d1d5510fc15dd1ffa6) Thanks [@maxcheremisin](https://github.com/maxcheremisin)! - Add 'overlayProps' to Modal component
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies []:
12
+ - @contentful/f36-button@4.16.0
13
+ - @contentful/f36-icons@4.16.0
14
+ - @contentful/f36-typography@4.16.0
15
+ - @contentful/f36-core@4.16.0
16
+
17
+ ## 4.15.1
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies []:
22
+ - @contentful/f36-button@4.15.1
23
+ - @contentful/f36-icons@4.15.1
24
+ - @contentful/f36-typography@4.15.1
25
+ - @contentful/f36-core@4.15.1
26
+
27
+ ## 4.15.0
28
+
29
+ ### Patch Changes
30
+
31
+ - Updated dependencies []:
32
+ - @contentful/f36-button@4.15.0
33
+ - @contentful/f36-icons@4.15.0
34
+ - @contentful/f36-typography@4.15.0
35
+ - @contentful/f36-core@4.15.0
36
+
3
37
  ## 4.14.0
4
38
 
5
39
  ### Patch Changes
package/dist/main.js CHANGED
@@ -34,19 +34,19 @@ $parcel$export(module.exports, "ModalLauncher", () => $f6dfceab072669eb$export$e
34
34
 
35
35
  function $2e9361382cc113aa$export$4bef00d568400c9b() {
36
36
  return {
37
- root: /*#__PURE__*/ $a6cQm$emotion.css({
38
- position: 'relative',
39
- padding: `${($parcel$interopDefault($a6cQm$contentfulf36tokens)).spacingM} ${($parcel$interopDefault($a6cQm$contentfulf36tokens)).spacingM} ${($parcel$interopDefault($a6cQm$contentfulf36tokens)).spacingM} ${($parcel$interopDefault($a6cQm$contentfulf36tokens)).spacingL}`,
40
- borderRadius: `${($parcel$interopDefault($a6cQm$contentfulf36tokens)).borderRadiusMedium} ${($parcel$interopDefault($a6cQm$contentfulf36tokens)).borderRadiusMedium} 0 0`,
41
- borderBottom: `1px solid ${($parcel$interopDefault($a6cQm$contentfulf36tokens)).gray300}`
37
+ root: /*#__PURE__*/ (0, $a6cQm$emotion.css)({
38
+ position: "relative",
39
+ padding: `${(0, ($parcel$interopDefault($a6cQm$contentfulf36tokens))).spacingM} ${(0, ($parcel$interopDefault($a6cQm$contentfulf36tokens))).spacingM} ${(0, ($parcel$interopDefault($a6cQm$contentfulf36tokens))).spacingM} ${(0, ($parcel$interopDefault($a6cQm$contentfulf36tokens))).spacingL}`,
40
+ borderRadius: `${(0, ($parcel$interopDefault($a6cQm$contentfulf36tokens))).borderRadiusMedium} ${(0, ($parcel$interopDefault($a6cQm$contentfulf36tokens))).borderRadiusMedium} 0 0`,
41
+ borderBottom: `1px solid ${(0, ($parcel$interopDefault($a6cQm$contentfulf36tokens))).gray300}`
42
42
  }),
43
- buttonContainer: /*#__PURE__*/ $a6cQm$emotion.css({
44
- position: 'relative',
45
- width: ($parcel$interopDefault($a6cQm$contentfulf36tokens)).spacing2Xl,
46
- height: ($parcel$interopDefault($a6cQm$contentfulf36tokens)).spacingL,
43
+ buttonContainer: /*#__PURE__*/ (0, $a6cQm$emotion.css)({
44
+ position: "relative",
45
+ width: (0, ($parcel$interopDefault($a6cQm$contentfulf36tokens))).spacing2Xl,
46
+ height: (0, ($parcel$interopDefault($a6cQm$contentfulf36tokens))).spacingL,
47
47
  button: {
48
- position: 'absolute',
49
- top: `calc(-1 * ${($parcel$interopDefault($a6cQm$contentfulf36tokens)).spacing2Xs})`,
48
+ position: "absolute",
49
+ top: `calc(-1 * ${(0, ($parcel$interopDefault($a6cQm$contentfulf36tokens))).spacing2Xs})`,
50
50
  right: 0
51
51
  }
52
52
  })
@@ -54,25 +54,25 @@ function $2e9361382cc113aa$export$4bef00d568400c9b() {
54
54
  }
55
55
 
56
56
 
57
- const $2679bd8c144d3995$export$f50a68e3694789ee = ({ onClose: onClose , title: title , testId: testId = 'cf-ui-modal-header' , className: className , ...otherProps })=>{
58
- const styles = $2e9361382cc113aa$export$4bef00d568400c9b();
59
- return /*#__PURE__*/ ($parcel$interopDefault($a6cQm$react)).createElement($a6cQm$contentfulf36core.Flex, {
57
+ const $2679bd8c144d3995$export$f50a68e3694789ee = ({ onClose: onClose , title: title , testId: testId = "cf-ui-modal-header" , className: className , ...otherProps })=>{
58
+ const styles = (0, $2e9361382cc113aa$export$4bef00d568400c9b)();
59
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($a6cQm$react))).createElement((0, $a6cQm$contentfulf36core.Flex), {
60
60
  ...otherProps,
61
- className: $a6cQm$emotion.cx(styles.root, className),
61
+ className: (0, $a6cQm$emotion.cx)(styles.root, className),
62
62
  testId: testId,
63
63
  alignItems: "center",
64
64
  justifyContent: "space-between"
65
- }, /*#__PURE__*/ ($parcel$interopDefault($a6cQm$react)).createElement($a6cQm$contentfulf36typography.Subheading, {
65
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($a6cQm$react))).createElement((0, $a6cQm$contentfulf36typography.Subheading), {
66
66
  as: "h2",
67
67
  isTruncated: true,
68
68
  marginBottom: "none"
69
- }, title), onClose && /*#__PURE__*/ ($parcel$interopDefault($a6cQm$react)).createElement($a6cQm$contentfulf36core.Flex, {
69
+ }, title), onClose && /*#__PURE__*/ (0, ($parcel$interopDefault($a6cQm$react))).createElement((0, $a6cQm$contentfulf36core.Flex), {
70
70
  alignItems: "center",
71
71
  className: styles.buttonContainer
72
- }, /*#__PURE__*/ ($parcel$interopDefault($a6cQm$react)).createElement($a6cQm$contentfulf36button.Button, {
72
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($a6cQm$react))).createElement((0, $a6cQm$contentfulf36button.Button), {
73
73
  variant: "transparent",
74
74
  "aria-label": "Close",
75
- startIcon: /*#__PURE__*/ ($parcel$interopDefault($a6cQm$react)).createElement($a6cQm$contentfulf36icons.CloseIcon, {
75
+ startIcon: /*#__PURE__*/ (0, ($parcel$interopDefault($a6cQm$react))).createElement((0, $a6cQm$contentfulf36icons.CloseIcon), {
76
76
  size: "small"
77
77
  }),
78
78
  onClick: ()=>{
@@ -81,7 +81,7 @@ const $2679bd8c144d3995$export$f50a68e3694789ee = ({ onClose: onClose , title: t
81
81
  size: "small"
82
82
  })));
83
83
  };
84
- $2679bd8c144d3995$export$f50a68e3694789ee.displayName = 'ModalHeader';
84
+ $2679bd8c144d3995$export$f50a68e3694789ee.displayName = "ModalHeader";
85
85
 
86
86
 
87
87
 
@@ -91,106 +91,106 @@ $2679bd8c144d3995$export$f50a68e3694789ee.displayName = 'ModalHeader';
91
91
 
92
92
  function $32e971b34c262557$export$5168abbf3ad664a0() {
93
93
  return {
94
- root: /*#__PURE__*/ $a6cQm$emotion.css({
95
- padding: `${($parcel$interopDefault($a6cQm$contentfulf36tokens)).spacingM} ${($parcel$interopDefault($a6cQm$contentfulf36tokens)).spacingL}`,
96
- color: ($parcel$interopDefault($a6cQm$contentfulf36tokens)).gray700,
97
- fontSize: ($parcel$interopDefault($a6cQm$contentfulf36tokens)).fontSizeM,
98
- fontFamily: ($parcel$interopDefault($a6cQm$contentfulf36tokens)).fontStackPrimary,
99
- lineHeight: ($parcel$interopDefault($a6cQm$contentfulf36tokens)).lineHeightM,
100
- overflowY: 'auto',
101
- overflowX: 'auto',
102
- boxSizing: 'border-box'
94
+ root: /*#__PURE__*/ (0, $a6cQm$emotion.css)({
95
+ padding: `${(0, ($parcel$interopDefault($a6cQm$contentfulf36tokens))).spacingM} ${(0, ($parcel$interopDefault($a6cQm$contentfulf36tokens))).spacingL}`,
96
+ color: (0, ($parcel$interopDefault($a6cQm$contentfulf36tokens))).gray700,
97
+ fontSize: (0, ($parcel$interopDefault($a6cQm$contentfulf36tokens))).fontSizeM,
98
+ fontFamily: (0, ($parcel$interopDefault($a6cQm$contentfulf36tokens))).fontStackPrimary,
99
+ lineHeight: (0, ($parcel$interopDefault($a6cQm$contentfulf36tokens))).lineHeightM,
100
+ overflowY: "auto",
101
+ overflowX: "auto",
102
+ boxSizing: "border-box"
103
103
  })
104
104
  };
105
105
  }
106
106
 
107
107
 
108
- const $66391c55bbcf9065$export$6da19a24bf249f17 = ({ testId: testId = 'cf-ui-modal-content' , className: className , children: children , ...otherProps })=>{
109
- const styles = $32e971b34c262557$export$5168abbf3ad664a0();
110
- return /*#__PURE__*/ ($parcel$interopDefault($a6cQm$react)).createElement($a6cQm$contentfulf36core.Box, {
108
+ const $66391c55bbcf9065$export$6da19a24bf249f17 = ({ testId: testId = "cf-ui-modal-content" , className: className , children: children , ...otherProps })=>{
109
+ const styles = (0, $32e971b34c262557$export$5168abbf3ad664a0)();
110
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($a6cQm$react))).createElement((0, $a6cQm$contentfulf36core.Box), {
111
111
  ...otherProps,
112
112
  as: "div",
113
- className: $a6cQm$emotion.cx(styles.root, className),
113
+ className: (0, $a6cQm$emotion.cx)(styles.root, className),
114
114
  testId: testId
115
115
  }, children);
116
116
  };
117
- $66391c55bbcf9065$export$6da19a24bf249f17.displayName = 'ModalContent';
117
+ $66391c55bbcf9065$export$6da19a24bf249f17.displayName = "ModalContent";
118
118
 
119
119
 
120
120
 
121
121
 
122
122
 
123
123
  function $a1d799ea27882387$export$9af97f4b0b4c597a(props) {
124
- const modal = $a6cQm$emotion.cx(/*#__PURE__*/ $a6cQm$emotion.css({
125
- margin: ($parcel$interopDefault($a6cQm$contentfulf36tokens)).spacing2Xl,
126
- backgroundColor: ($parcel$interopDefault($a6cQm$contentfulf36tokens)).colorWhite,
127
- borderRadius: props.size === 'zen' ? 0 : ($parcel$interopDefault($a6cQm$contentfulf36tokens)).borderRadiusMedium,
128
- boxShadow: ($parcel$interopDefault($a6cQm$contentfulf36tokens)).boxShadowHeavy,
129
- maxHeight: `calc(100vh - 1rem * (100 / ${($parcel$interopDefault($a6cQm$contentfulf36tokens)).fontBaseDefault}))`,
130
- maxWidth: `calc(100vw - 1rem * (100 / ${($parcel$interopDefault($a6cQm$contentfulf36tokens)).fontBaseDefault}))`,
131
- overflow: 'hidden',
132
- display: 'flex',
133
- flexDirection: 'column'
134
- }), props.allowHeightOverflow ? /*#__PURE__*/ $a6cQm$emotion.css({
124
+ const modal = (0, $a6cQm$emotion.cx)(/*#__PURE__*/ (0, $a6cQm$emotion.css)({
125
+ margin: (0, ($parcel$interopDefault($a6cQm$contentfulf36tokens))).spacing2Xl,
126
+ backgroundColor: (0, ($parcel$interopDefault($a6cQm$contentfulf36tokens))).colorWhite,
127
+ borderRadius: props.size === "zen" ? 0 : (0, ($parcel$interopDefault($a6cQm$contentfulf36tokens))).borderRadiusMedium,
128
+ boxShadow: (0, ($parcel$interopDefault($a6cQm$contentfulf36tokens))).boxShadowHeavy,
129
+ maxHeight: `calc(100vh - 1rem * (100 / ${(0, ($parcel$interopDefault($a6cQm$contentfulf36tokens))).fontBaseDefault}))`,
130
+ maxWidth: `calc(100vw - 1rem * (100 / ${(0, ($parcel$interopDefault($a6cQm$contentfulf36tokens))).fontBaseDefault}))`,
131
+ overflow: "hidden",
132
+ display: "flex",
133
+ flexDirection: "column"
134
+ }), props.allowHeightOverflow ? /*#__PURE__*/ (0, $a6cQm$emotion.css)({
135
135
  name: "1evlo53",
136
136
  styles: "overflow:auto;max-height:none;"
137
- }) : null, props.size === 'zen' ? /*#__PURE__*/ $a6cQm$emotion.css({
137
+ }) : null, props.size === "zen" ? /*#__PURE__*/ (0, $a6cQm$emotion.css)({
138
138
  name: "11c88st",
139
139
  styles: "max-width:none;max-height:none;margin:0;height:100%;width:100%;"
140
140
  }) : null, props.className);
141
141
  return {
142
- portal: /*#__PURE__*/ $a6cQm$emotion.css({
142
+ portal: /*#__PURE__*/ (0, $a6cQm$emotion.css)({
143
143
  name: "13o7eu2",
144
144
  styles: "display:block;"
145
145
  }),
146
146
  base: {
147
- root: $a6cQm$emotion.cx(/*#__PURE__*/ $a6cQm$emotion.css({
148
- zIndex: ($parcel$interopDefault($a6cQm$contentfulf36tokens)).zIndexModalContent,
149
- position: 'relative',
147
+ root: (0, $a6cQm$emotion.cx)(/*#__PURE__*/ (0, $a6cQm$emotion.css)({
148
+ zIndex: (0, ($parcel$interopDefault($a6cQm$contentfulf36tokens))).zIndexModalContent,
149
+ position: "relative",
150
150
  padding: 0,
151
- display: 'inline-block',
152
- margin: '0 auto',
153
- textAlign: 'left',
154
- outline: 'none',
155
- transform: props.size === 'zen' ? 'scale(1)' : 'scale(0.85)',
156
- transition: `transform ${($parcel$interopDefault($a6cQm$contentfulf36tokens)).transitionDurationDefault} ${($parcel$interopDefault($a6cQm$contentfulf36tokens)).transitionEasingDefault}`
157
- }), props.size === 'zen' ? /*#__PURE__*/ $a6cQm$emotion.css({
151
+ display: "inline-block",
152
+ margin: "0 auto",
153
+ textAlign: "left",
154
+ outline: "none",
155
+ transform: props.size === "zen" ? "scale(1)" : "scale(0.85)",
156
+ transition: `transform ${(0, ($parcel$interopDefault($a6cQm$contentfulf36tokens))).transitionDurationDefault} ${(0, ($parcel$interopDefault($a6cQm$contentfulf36tokens))).transitionEasingDefault}`
157
+ }), props.size === "zen" ? /*#__PURE__*/ (0, $a6cQm$emotion.css)({
158
158
  name: "uwwqev",
159
159
  styles: "width:100%;height:100%;"
160
160
  }) : null),
161
- afterOpen: /*#__PURE__*/ $a6cQm$emotion.css({
161
+ afterOpen: /*#__PURE__*/ (0, $a6cQm$emotion.css)({
162
162
  name: "plgkgv",
163
163
  styles: "transform:scale(1) !important;"
164
164
  }),
165
- beforeClose: /*#__PURE__*/ $a6cQm$emotion.css({
166
- transform: props.size === 'zen' ? 'scale(1)' : 'scale(0.85)'
165
+ beforeClose: /*#__PURE__*/ (0, $a6cQm$emotion.css)({
166
+ transform: props.size === "zen" ? "scale(1)" : "scale(0.85)"
167
167
  })
168
168
  },
169
169
  modalOverlay: {
170
- root: $a6cQm$emotion.cx(/*#__PURE__*/ $a6cQm$emotion.css({
171
- display: 'flex',
172
- alignItems: 'baseline',
173
- flexWrap: 'wrap',
170
+ root: (0, $a6cQm$emotion.cx)(/*#__PURE__*/ (0, $a6cQm$emotion.css)({
171
+ display: "flex",
172
+ alignItems: "baseline",
173
+ flexWrap: "wrap",
174
174
  top: 0,
175
175
  right: 0,
176
176
  bottom: 0,
177
177
  left: 0,
178
- zIndex: ($parcel$interopDefault($a6cQm$contentfulf36tokens)).zIndexModal,
178
+ zIndex: (0, ($parcel$interopDefault($a6cQm$contentfulf36tokens))).zIndexModal,
179
179
  opacity: 0,
180
- transition: `opacity ${($parcel$interopDefault($a6cQm$contentfulf36tokens)).transitionDurationDefault} ${($parcel$interopDefault($a6cQm$contentfulf36tokens)).transitionEasingDefault}`,
181
- position: 'fixed',
182
- overflowY: 'auto',
183
- backgroundColor: 'rgba(12, 20, 28, 0.74902)',
184
- textAlign: 'center'
185
- }), props.position === 'center' ? /*#__PURE__*/ $a6cQm$emotion.css({
180
+ transition: `opacity ${(0, ($parcel$interopDefault($a6cQm$contentfulf36tokens))).transitionDurationDefault} ${(0, ($parcel$interopDefault($a6cQm$contentfulf36tokens))).transitionEasingDefault}`,
181
+ position: "fixed",
182
+ overflowY: "auto",
183
+ backgroundColor: "rgba(12, 20, 28, 0.74902)",
184
+ textAlign: "center"
185
+ }), props.position === "center" ? /*#__PURE__*/ (0, $a6cQm$emotion.css)({
186
186
  name: "1qe4tyl",
187
187
  styles: "align-items:center;justify-content:center;"
188
- }) : null),
189
- afterOpen: /*#__PURE__*/ $a6cQm$emotion.css({
188
+ }) : null, props.overlayClassName),
189
+ afterOpen: /*#__PURE__*/ (0, $a6cQm$emotion.css)({
190
190
  name: "whh5e5",
191
191
  styles: "opacity:1;"
192
192
  }),
193
- beforeClose: /*#__PURE__*/ $a6cQm$emotion.css({
193
+ beforeClose: /*#__PURE__*/ (0, $a6cQm$emotion.css)({
194
194
  name: "q7lffx",
195
195
  styles: "opacity:0;"
196
196
  })
@@ -201,23 +201,24 @@ function $a1d799ea27882387$export$9af97f4b0b4c597a(props) {
201
201
 
202
202
 
203
203
  const $854b6d713fe70fc9$var$ModalSizesMapper = {
204
- medium: '520px',
205
- small: '400px',
206
- large: '700px',
207
- fullWidth: '100vw',
208
- zen: '100vw'
204
+ medium: "520px",
205
+ small: "400px",
206
+ large: "700px",
207
+ fullWidth: "100vw",
208
+ zen: "100vw"
209
209
  };
210
210
  function $854b6d713fe70fc9$var$focusFirstWithinNode(node) {
211
211
  if (node && node.querySelectorAll) {
212
- const elements = node.querySelectorAll('input, button');
212
+ const elements = node.querySelectorAll("input, button");
213
213
  if (elements.length > 0) {
214
214
  const firstElement = elements[0]; // @ts-expect-error focus might be missing
215
- if (typeof firstElement.focus === 'function') // @ts-expect-error focus might be missing
215
+ if (typeof firstElement.focus === "function") // @ts-expect-error focus might be missing
216
216
  firstElement.focus();
217
217
  }
218
218
  }
219
219
  }
220
- const $854b6d713fe70fc9$export$2b77a92f1a5ad772 = ({ allowHeightOverflow: allowHeightOverflow = false , position: position = 'center' , shouldCloseOnEscapePress: shouldCloseOnEscapePress = true , shouldCloseOnOverlayClick: shouldCloseOnOverlayClick = true , size: size = 'medium' , testId: testId = 'cf-ui-modal' , topOffset: topOffset = '50px' , aria: aria , ...otherProps })=>{
220
+ const $854b6d713fe70fc9$export$2b77a92f1a5ad772 = ({ allowHeightOverflow: allowHeightOverflow = false , position: position = "center" , shouldCloseOnEscapePress: shouldCloseOnEscapePress = true , shouldCloseOnOverlayClick: shouldCloseOnOverlayClick = true , size: size = "medium" , testId: testId = "cf-ui-modal" , topOffset: topOffset = "50px" , aria: aria , ...otherProps })=>{
221
+ var ref2, ref1;
221
222
  const contentRef = $a6cQm$react.useRef(null);
222
223
  const props = {
223
224
  ...otherProps,
@@ -229,11 +230,12 @@ const $854b6d713fe70fc9$export$2b77a92f1a5ad772 = ({ allowHeightOverflow: allowH
229
230
  testId: testId,
230
231
  topOffset: topOffset
231
232
  };
232
- const styles = $a1d799ea27882387$export$9af97f4b0b4c597a({
233
+ const styles = (0, $a1d799ea27882387$export$9af97f4b0b4c597a)({
233
234
  position: position,
234
235
  size: size,
235
236
  allowHeightOverflow: allowHeightOverflow,
236
- className: otherProps.className
237
+ className: otherProps.className,
238
+ overlayClassName: (ref2 = otherProps.overlayProps) === null || ref2 === void 0 ? void 0 : ref2.className
237
239
  });
238
240
  $a6cQm$react.useEffect(()=>{
239
241
  if (props.isShown) setTimeout(()=>{
@@ -246,13 +248,13 @@ const $854b6d713fe70fc9$export$2b77a92f1a5ad772 = ({ allowHeightOverflow: allowH
246
248
  props.initialFocusRef
247
249
  ]);
248
250
  const renderDefault = ()=>{
249
- return /*#__PURE__*/ $a6cQm$react.createElement($a6cQm$react.Fragment, null, otherProps.title && /*#__PURE__*/ $a6cQm$react.createElement($2679bd8c144d3995$export$f50a68e3694789ee, {
251
+ return /*#__PURE__*/ $a6cQm$react.createElement($a6cQm$react.Fragment, null, otherProps.title && /*#__PURE__*/ $a6cQm$react.createElement((0, $2679bd8c144d3995$export$f50a68e3694789ee), {
250
252
  title: otherProps.title,
251
253
  onClose: props.onClose,
252
254
  ...otherProps.modalHeaderProps
253
- }), /*#__PURE__*/ $a6cQm$react.createElement($66391c55bbcf9065$export$6da19a24bf249f17, otherProps.modalContentProps, otherProps.children));
255
+ }), /*#__PURE__*/ $a6cQm$react.createElement((0, $66391c55bbcf9065$export$6da19a24bf249f17), otherProps.modalContentProps, otherProps.children));
254
256
  };
255
- return /*#__PURE__*/ $a6cQm$react.createElement(($parcel$interopDefault($a6cQm$reactmodal)), {
257
+ return /*#__PURE__*/ $a6cQm$react.createElement((0, ($parcel$interopDefault($a6cQm$reactmodal))), {
256
258
  ariaHideApp: false,
257
259
  aria: aria,
258
260
  onRequestClose: props.onClose,
@@ -265,8 +267,9 @@ const $854b6d713fe70fc9$export$2b77a92f1a5ad772 = ({ allowHeightOverflow: allowH
265
267
  portalClassName: styles.portal,
266
268
  style: {
267
269
  content: {
268
- top: position === 'center' ? 0 : topOffset
269
- }
270
+ top: position === "center" ? 0 : topOffset
271
+ },
272
+ overlay: (ref1 = otherProps.overlayProps) === null || ref1 === void 0 ? void 0 : ref1.style
270
273
  },
271
274
  className: {
272
275
  base: styles.base.root,
@@ -282,16 +285,16 @@ const $854b6d713fe70fc9$export$2b77a92f1a5ad772 = ({ allowHeightOverflow: allowH
282
285
  contentRef: (ref)=>{
283
286
  contentRef.current = ref;
284
287
  }
285
- }, /*#__PURE__*/ $a6cQm$react.createElement($a6cQm$contentfulf36core.Box, {
288
+ }, /*#__PURE__*/ $a6cQm$react.createElement((0, $a6cQm$contentfulf36core.Box), {
286
289
  testId: testId,
287
290
  style: {
288
291
  width: $854b6d713fe70fc9$var$ModalSizesMapper[size] || size
289
292
  },
290
293
  className: styles.modal,
291
294
  "data-modal-root": true
292
- }, typeof otherProps.children === 'function' ? otherProps.children(props) : renderDefault()));
295
+ }, typeof otherProps.children === "function" ? otherProps.children(props) : renderDefault()));
293
296
  };
294
- $854b6d713fe70fc9$export$2b77a92f1a5ad772.displayName = 'Modal';
297
+ $854b6d713fe70fc9$export$2b77a92f1a5ad772.displayName = "Modal";
295
298
 
296
299
 
297
300
 
@@ -299,8 +302,8 @@ $854b6d713fe70fc9$export$2b77a92f1a5ad772.displayName = 'Modal';
299
302
 
300
303
 
301
304
 
302
- const $8b06e393320a8e77$export$c63fb08199be8e0e = ({ testId: testId = 'cf-ui-modal-controls' , className: className , children: children , ...otherProps })=>{
303
- return /*#__PURE__*/ ($parcel$interopDefault($a6cQm$react)).createElement($a6cQm$contentfulf36core.Flex, {
305
+ const $8b06e393320a8e77$export$c63fb08199be8e0e = ({ testId: testId = "cf-ui-modal-controls" , className: className , children: children , ...otherProps })=>{
306
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($a6cQm$react))).createElement((0, $a6cQm$contentfulf36core.Flex), {
304
307
  ...otherProps,
305
308
  className: className,
306
309
  testId: testId,
@@ -308,26 +311,26 @@ const $8b06e393320a8e77$export$c63fb08199be8e0e = ({ testId: testId = 'cf-ui-mod
308
311
  justifyContent: "flex-end",
309
312
  margin: "spacingL",
310
313
  marginTop: "none"
311
- }, /*#__PURE__*/ ($parcel$interopDefault($a6cQm$react)).createElement($a6cQm$contentfulf36button.ButtonGroup, {
314
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($a6cQm$react))).createElement((0, $a6cQm$contentfulf36button.ButtonGroup), {
312
315
  variant: "spaced",
313
316
  spacing: "spacingS"
314
317
  }, children));
315
318
  };
316
- $8b06e393320a8e77$export$c63fb08199be8e0e.displayName = 'ModalControls';
319
+ $8b06e393320a8e77$export$c63fb08199be8e0e.displayName = "ModalControls";
317
320
 
318
321
 
319
- const $2132db66f9439432$export$2b77a92f1a5ad772 = $854b6d713fe70fc9$export$2b77a92f1a5ad772;
320
- $2132db66f9439432$export$2b77a92f1a5ad772.Content = $66391c55bbcf9065$export$6da19a24bf249f17;
321
- $2132db66f9439432$export$2b77a92f1a5ad772.Header = $2679bd8c144d3995$export$f50a68e3694789ee;
322
- $2132db66f9439432$export$2b77a92f1a5ad772.Controls = $8b06e393320a8e77$export$c63fb08199be8e0e;
322
+ const $2132db66f9439432$export$2b77a92f1a5ad772 = (0, $854b6d713fe70fc9$export$2b77a92f1a5ad772);
323
+ $2132db66f9439432$export$2b77a92f1a5ad772.Content = (0, $66391c55bbcf9065$export$6da19a24bf249f17);
324
+ $2132db66f9439432$export$2b77a92f1a5ad772.Header = (0, $2679bd8c144d3995$export$f50a68e3694789ee);
325
+ $2132db66f9439432$export$2b77a92f1a5ad772.Controls = (0, $8b06e393320a8e77$export$c63fb08199be8e0e);
323
326
 
324
327
 
325
328
 
326
329
 
327
330
 
328
- const $657ddd6e4548962f$export$427af6990c8ff682 = ({ allowHeightOverflow: allowHeightOverflow = false , cancelLabel: cancelLabel = 'Cancel' , cancelTestId: cancelTestId = 'cf-ui-modal-confirm-cancel-button' , children: children , confirmLabel: confirmLabel = 'Confirm' , confirmTestId: confirmTestId = 'cf-ui-modal-confirm-confirm-button' , intent: intent = 'positive' , isConfirmDisabled: isConfirmDisabled = false , isConfirmLoading: isConfirmLoading = false , isShown: isShown , modalContentProps: modalContentProps , modalControlsProps: modalControlsProps , modalHeaderProps: modalHeaderProps , onCancel: onCancel , onConfirm: onConfirm , shouldCloseOnEscapePress: shouldCloseOnEscapePress = true , shouldCloseOnOverlayClick: shouldCloseOnOverlayClick = true , size: size = 'medium' , testId: testId = 'cf-ui-modal-confirm' , title: title = 'Are you sure?' , initialFocusRef: initialFocusRef })=>{
329
- const cancelRef = ($parcel$interopDefault($a6cQm$react)).useRef(null);
330
- const confirmButton = confirmLabel ? /*#__PURE__*/ ($parcel$interopDefault($a6cQm$react)).createElement($a6cQm$contentfulf36button.Button, {
331
+ const $657ddd6e4548962f$export$427af6990c8ff682 = ({ allowHeightOverflow: allowHeightOverflow = false , cancelLabel: cancelLabel = "Cancel" , cancelTestId: cancelTestId = "cf-ui-modal-confirm-cancel-button" , children: children , confirmLabel: confirmLabel = "Confirm" , confirmTestId: confirmTestId = "cf-ui-modal-confirm-confirm-button" , intent: intent = "positive" , isConfirmDisabled: isConfirmDisabled = false , isConfirmLoading: isConfirmLoading = false , isShown: isShown , modalContentProps: modalContentProps , modalControlsProps: modalControlsProps , modalHeaderProps: modalHeaderProps , onCancel: onCancel , onConfirm: onConfirm , shouldCloseOnEscapePress: shouldCloseOnEscapePress = true , shouldCloseOnOverlayClick: shouldCloseOnOverlayClick = true , size: size = "medium" , testId: testId = "cf-ui-modal-confirm" , title: title = "Are you sure?" , initialFocusRef: initialFocusRef })=>{
332
+ const cancelRef = (0, ($parcel$interopDefault($a6cQm$react))).useRef(null);
333
+ const confirmButton = confirmLabel ? /*#__PURE__*/ (0, ($parcel$interopDefault($a6cQm$react))).createElement((0, $a6cQm$contentfulf36button.Button), {
331
334
  testId: confirmTestId,
332
335
  isDisabled: isConfirmDisabled,
333
336
  isLoading: isConfirmLoading,
@@ -335,14 +338,14 @@ const $657ddd6e4548962f$export$427af6990c8ff682 = ({ allowHeightOverflow: allowH
335
338
  size: "small",
336
339
  onClick: ()=>onConfirm()
337
340
  }, confirmLabel) : null;
338
- const cancelButton = cancelLabel ? /*#__PURE__*/ ($parcel$interopDefault($a6cQm$react)).createElement($a6cQm$contentfulf36button.Button, {
341
+ const cancelButton = cancelLabel ? /*#__PURE__*/ (0, ($parcel$interopDefault($a6cQm$react))).createElement((0, $a6cQm$contentfulf36button.Button), {
339
342
  testId: cancelTestId,
340
343
  variant: "secondary",
341
344
  onClick: onCancel,
342
345
  size: "small",
343
346
  ref: initialFocusRef || cancelRef
344
347
  }, cancelLabel) : null;
345
- return /*#__PURE__*/ ($parcel$interopDefault($a6cQm$react)).createElement($2132db66f9439432$export$2b77a92f1a5ad772, {
348
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($a6cQm$react))).createElement((0, $2132db66f9439432$export$2b77a92f1a5ad772), {
346
349
  testId: testId,
347
350
  isShown: isShown,
348
351
  onClose: onCancel,
@@ -352,13 +355,13 @@ const $657ddd6e4548962f$export$427af6990c8ff682 = ({ allowHeightOverflow: allowH
352
355
  allowHeightOverflow: allowHeightOverflow,
353
356
  initialFocusRef: cancelRef
354
357
  }, ()=>{
355
- return /*#__PURE__*/ ($parcel$interopDefault($a6cQm$react)).createElement(($parcel$interopDefault($a6cQm$react)).Fragment, null, /*#__PURE__*/ ($parcel$interopDefault($a6cQm$react)).createElement($2132db66f9439432$export$2b77a92f1a5ad772.Header, {
356
- title: title || '',
358
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($a6cQm$react))).createElement((0, ($parcel$interopDefault($a6cQm$react))).Fragment, null, /*#__PURE__*/ (0, ($parcel$interopDefault($a6cQm$react))).createElement((0, $2132db66f9439432$export$2b77a92f1a5ad772).Header, {
359
+ title: title || "",
357
360
  ...modalHeaderProps
358
- }), /*#__PURE__*/ ($parcel$interopDefault($a6cQm$react)).createElement($2132db66f9439432$export$2b77a92f1a5ad772.Content, modalContentProps, children), /*#__PURE__*/ ($parcel$interopDefault($a6cQm$react)).createElement($2132db66f9439432$export$2b77a92f1a5ad772.Controls, modalControlsProps, cancelButton, confirmButton));
361
+ }), /*#__PURE__*/ (0, ($parcel$interopDefault($a6cQm$react))).createElement((0, $2132db66f9439432$export$2b77a92f1a5ad772).Content, modalContentProps, children), /*#__PURE__*/ (0, ($parcel$interopDefault($a6cQm$react))).createElement((0, $2132db66f9439432$export$2b77a92f1a5ad772).Controls, modalControlsProps, cancelButton, confirmButton));
359
362
  });
360
363
  };
361
- $657ddd6e4548962f$export$427af6990c8ff682.displayName = 'ModalConfirm';
364
+ $657ddd6e4548962f$export$427af6990c8ff682.displayName = "ModalConfirm";
362
365
 
363
366
 
364
367
 
@@ -370,8 +373,8 @@ const $f6dfceab072669eb$var$getRoot = (rootElId)=>{
370
373
  let rootDom = document.getElementById(rootElId);
371
374
  if (rootDom !== null) return rootDom;
372
375
  // Otherwise create it
373
- rootDom = document.createElement('div');
374
- rootDom.setAttribute('id', rootElId);
376
+ rootDom = document.createElement("div");
377
+ rootDom.setAttribute("id", rootElId);
375
378
  document.body.appendChild(rootDom);
376
379
  return rootDom;
377
380
  };
@@ -383,9 +386,8 @@ function $f6dfceab072669eb$var$closeAll() {
383
386
  isShown: false
384
387
  };
385
388
  render(config);
386
- await new Promise((resolveDelay)=>setTimeout(resolveDelay, delay)
387
- );
388
- ($parcel$interopDefault($a6cQm$reactdom)).unmountComponentAtNode($f6dfceab072669eb$var$getRoot(rootElId));
389
+ await new Promise((resolveDelay)=>setTimeout(resolveDelay, delay));
390
+ (0, ($parcel$interopDefault($a6cQm$reactdom))).unmountComponentAtNode($f6dfceab072669eb$var$getRoot(rootElId));
389
391
  $f6dfceab072669eb$var$openModalsIds.delete(rootElId);
390
392
  });
391
393
  } // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -402,7 +404,7 @@ function $f6dfceab072669eb$var$open(componentRenderer, options = {}) {
402
404
  isShown: true
403
405
  };
404
406
  function render({ onClose: onClose , isShown: isShown }) {
405
- ($parcel$interopDefault($a6cQm$reactdom)).render(componentRenderer({
407
+ (0, ($parcel$interopDefault($a6cQm$reactdom))).render(componentRenderer({
406
408
  onClose: onClose,
407
409
  isShown: isShown
408
410
  }), rootDom);
@@ -413,9 +415,8 @@ function $f6dfceab072669eb$var$open(componentRenderer, options = {}) {
413
415
  isShown: false
414
416
  };
415
417
  render(currentConfig);
416
- await new Promise((resolveDelay)=>setTimeout(resolveDelay, options.delay)
417
- );
418
- ($parcel$interopDefault($a6cQm$reactdom)).unmountComponentAtNode(rootDom);
418
+ await new Promise((resolveDelay)=>setTimeout(resolveDelay, options.delay));
419
+ (0, ($parcel$interopDefault($a6cQm$reactdom))).unmountComponentAtNode(rootDom);
419
420
  rootDom.remove();
420
421
  $f6dfceab072669eb$var$openModalsIds.delete(rootElId);
421
422
  resolve(arg);