@contentful/f36-modal 4.6.1 → 4.7.1

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.7.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2008](https://github.com/contentful/forma-36/pull/2008) [`1a941fd9`](https://github.com/contentful/forma-36/commit/1a941fd99757e49bb30e0e32eab19bc680f66597) Thanks [@massao](https://github.com/massao)! - Fix issue with types being generated wrongly
8
+
9
+ - Updated dependencies []:
10
+ - @contentful/f36-button@4.7.1
11
+ - @contentful/f36-icons@4.7.1
12
+ - @contentful/f36-typography@4.7.1
13
+ - @contentful/f36-core@4.7.1
14
+
15
+ ## 4.7.0
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies [[`e50b8945`](https://github.com/contentful/forma-36/commit/e50b8945faef7323187e1bd9a2a9cbfcbae2e405)]:
20
+ - @contentful/f36-core@4.7.0
21
+ - @contentful/f36-button@4.7.0
22
+ - @contentful/f36-icons@4.7.0
23
+ - @contentful/f36-typography@4.7.0
24
+
25
+ ## 4.6.2
26
+
27
+ ### Patch Changes
28
+
29
+ - [#1994](https://github.com/contentful/forma-36/pull/1994) [`0364ffe2`](https://github.com/contentful/forma-36/commit/0364ffe2aa2e5ccfea6263f4173b2d8069e4ec05) Thanks [@denkristoffer](https://github.com/denkristoffer)! - fix(modal): fix scaling issues for modals with size "zen"
30
+
31
+ - Updated dependencies []:
32
+ - @contentful/f36-button@4.6.2
33
+ - @contentful/f36-icons@4.6.2
34
+ - @contentful/f36-typography@4.6.2
35
+ - @contentful/f36-core@4.6.2
36
+
3
37
  ## 4.6.1
4
38
 
5
39
  ### Patch Changes
package/dist/main.js CHANGED
@@ -1,43 +1,26 @@
1
- var $7x5iO$react = require("react");
2
- var $7x5iO$reactmodal = require("react-modal");
3
- var $7x5iO$contentfulf36core = require("@contentful/f36-core");
4
- var $7x5iO$emotion = require("emotion");
5
- var $7x5iO$contentfulf36icons = require("@contentful/f36-icons");
6
- var $7x5iO$contentfulf36button = require("@contentful/f36-button");
7
- var $7x5iO$contentfulf36typography = require("@contentful/f36-typography");
8
- var $7x5iO$contentfulf36tokens = require("@contentful/f36-tokens");
9
- var $7x5iO$reactdom = require("react-dom");
10
-
11
- function $parcel$exportWildcard(dest, source) {
12
- Object.keys(source).forEach(function(key) {
13
- if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
14
- return;
15
- }
16
-
17
- Object.defineProperty(dest, key, {
18
- enumerable: true,
19
- get: function get() {
20
- return source[key];
21
- }
22
- });
23
- });
1
+ var $a6cQm$react = require("react");
2
+ var $a6cQm$reactmodal = require("react-modal");
3
+ var $a6cQm$contentfulf36core = require("@contentful/f36-core");
4
+ var $a6cQm$emotion = require("emotion");
5
+ var $a6cQm$contentfulf36icons = require("@contentful/f36-icons");
6
+ var $a6cQm$contentfulf36button = require("@contentful/f36-button");
7
+ var $a6cQm$contentfulf36typography = require("@contentful/f36-typography");
8
+ var $a6cQm$contentfulf36tokens = require("@contentful/f36-tokens");
9
+ var $a6cQm$reactdom = require("react-dom");
24
10
 
25
- return dest;
26
- }
27
11
  function $parcel$export(e, n, v, s) {
28
12
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
29
13
  }
30
14
  function $parcel$interopDefault(a) {
31
15
  return a && a.__esModule ? a.default : a;
32
16
  }
33
- var $4eddba25b642b7ac$exports = {};
34
17
 
35
- $parcel$export($4eddba25b642b7ac$exports, "Modal", () => $2132db66f9439432$export$2b77a92f1a5ad772);
36
- $parcel$export($4eddba25b642b7ac$exports, "ModalConfirm", () => $657ddd6e4548962f$export$427af6990c8ff682);
37
- $parcel$export($4eddba25b642b7ac$exports, "ModalContent", () => $66391c55bbcf9065$export$6da19a24bf249f17);
38
- $parcel$export($4eddba25b642b7ac$exports, "ModalControls", () => $8b06e393320a8e77$export$c63fb08199be8e0e);
39
- $parcel$export($4eddba25b642b7ac$exports, "ModalHeader", () => $2679bd8c144d3995$export$f50a68e3694789ee);
40
- $parcel$export($4eddba25b642b7ac$exports, "ModalLauncher", () => $f6dfceab072669eb$export$e21b828b42c54a37);
18
+ $parcel$export(module.exports, "Modal", () => $2132db66f9439432$export$2b77a92f1a5ad772);
19
+ $parcel$export(module.exports, "ModalConfirm", () => $657ddd6e4548962f$export$427af6990c8ff682);
20
+ $parcel$export(module.exports, "ModalContent", () => $66391c55bbcf9065$export$6da19a24bf249f17);
21
+ $parcel$export(module.exports, "ModalControls", () => $8b06e393320a8e77$export$c63fb08199be8e0e);
22
+ $parcel$export(module.exports, "ModalHeader", () => $2679bd8c144d3995$export$f50a68e3694789ee);
23
+ $parcel$export(module.exports, "ModalLauncher", () => $f6dfceab072669eb$export$e21b828b42c54a37);
41
24
 
42
25
 
43
26
 
@@ -51,19 +34,19 @@ $parcel$export($4eddba25b642b7ac$exports, "ModalLauncher", () => $f6dfceab072669
51
34
 
52
35
  function $2e9361382cc113aa$export$4bef00d568400c9b() {
53
36
  return {
54
- root: /*#__PURE__*/ $7x5iO$emotion.css({
37
+ root: /*#__PURE__*/ $a6cQm$emotion.css({
55
38
  position: 'relative',
56
- padding: `${($parcel$interopDefault($7x5iO$contentfulf36tokens)).spacingM} ${($parcel$interopDefault($7x5iO$contentfulf36tokens)).spacingM} ${($parcel$interopDefault($7x5iO$contentfulf36tokens)).spacingM} ${($parcel$interopDefault($7x5iO$contentfulf36tokens)).spacingL}`,
57
- borderRadius: `${($parcel$interopDefault($7x5iO$contentfulf36tokens)).borderRadiusMedium} ${($parcel$interopDefault($7x5iO$contentfulf36tokens)).borderRadiusMedium} 0 0`,
58
- borderBottom: `1px solid ${($parcel$interopDefault($7x5iO$contentfulf36tokens)).gray300}`
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}`
59
42
  }),
60
- buttonContainer: /*#__PURE__*/ $7x5iO$emotion.css({
43
+ buttonContainer: /*#__PURE__*/ $a6cQm$emotion.css({
61
44
  position: 'relative',
62
- width: ($parcel$interopDefault($7x5iO$contentfulf36tokens)).spacing2Xl,
63
- height: ($parcel$interopDefault($7x5iO$contentfulf36tokens)).spacingL,
45
+ width: ($parcel$interopDefault($a6cQm$contentfulf36tokens)).spacing2Xl,
46
+ height: ($parcel$interopDefault($a6cQm$contentfulf36tokens)).spacingL,
64
47
  button: {
65
48
  position: 'absolute',
66
- top: `calc(-1 * ${($parcel$interopDefault($7x5iO$contentfulf36tokens)).spacing2Xs})`,
49
+ top: `calc(-1 * ${($parcel$interopDefault($a6cQm$contentfulf36tokens)).spacing2Xs})`,
67
50
  right: 0
68
51
  }
69
52
  })
@@ -71,33 +54,33 @@ function $2e9361382cc113aa$export$4bef00d568400c9b() {
71
54
  }
72
55
 
73
56
 
74
- function $2679bd8c144d3995$export$f50a68e3694789ee({ onClose: onClose , title: title , testId: testId = 'cf-ui-modal-header' , className: className , ...otherProps }) {
57
+ const $2679bd8c144d3995$export$f50a68e3694789ee = ({ onClose: onClose , title: title , testId: testId = 'cf-ui-modal-header' , className: className , ...otherProps })=>{
75
58
  const styles = $2e9361382cc113aa$export$4bef00d568400c9b();
76
- return(/*#__PURE__*/ ($parcel$interopDefault($7x5iO$react)).createElement($7x5iO$contentfulf36core.Flex, {
59
+ return /*#__PURE__*/ ($parcel$interopDefault($a6cQm$react)).createElement($a6cQm$contentfulf36core.Flex, {
77
60
  ...otherProps,
78
- className: $7x5iO$emotion.cx(styles.root, className),
61
+ className: $a6cQm$emotion.cx(styles.root, className),
79
62
  testId: testId,
80
63
  alignItems: "center",
81
64
  justifyContent: "space-between"
82
- }, /*#__PURE__*/ ($parcel$interopDefault($7x5iO$react)).createElement($7x5iO$contentfulf36typography.Subheading, {
65
+ }, /*#__PURE__*/ ($parcel$interopDefault($a6cQm$react)).createElement($a6cQm$contentfulf36typography.Subheading, {
83
66
  as: "h1",
84
67
  isTruncated: true,
85
68
  marginBottom: "none"
86
- }, title), onClose && /*#__PURE__*/ ($parcel$interopDefault($7x5iO$react)).createElement($7x5iO$contentfulf36core.Flex, {
69
+ }, title), onClose && /*#__PURE__*/ ($parcel$interopDefault($a6cQm$react)).createElement($a6cQm$contentfulf36core.Flex, {
87
70
  alignItems: "center",
88
71
  className: styles.buttonContainer
89
- }, /*#__PURE__*/ ($parcel$interopDefault($7x5iO$react)).createElement($7x5iO$contentfulf36button.Button, {
72
+ }, /*#__PURE__*/ ($parcel$interopDefault($a6cQm$react)).createElement($a6cQm$contentfulf36button.Button, {
90
73
  variant: "transparent",
91
74
  "aria-label": "Close",
92
- startIcon: /*#__PURE__*/ ($parcel$interopDefault($7x5iO$react)).createElement($7x5iO$contentfulf36icons.CloseIcon, {
75
+ startIcon: /*#__PURE__*/ ($parcel$interopDefault($a6cQm$react)).createElement($a6cQm$contentfulf36icons.CloseIcon, {
93
76
  size: "small"
94
77
  }),
95
78
  onClick: ()=>{
96
79
  onClose();
97
80
  },
98
81
  size: "small"
99
- }))));
100
- }
82
+ })));
83
+ };
101
84
  $2679bd8c144d3995$export$f50a68e3694789ee.displayName = 'ModalHeader';
102
85
 
103
86
 
@@ -108,12 +91,12 @@ $2679bd8c144d3995$export$f50a68e3694789ee.displayName = 'ModalHeader';
108
91
 
109
92
  function $32e971b34c262557$export$5168abbf3ad664a0() {
110
93
  return {
111
- root: /*#__PURE__*/ $7x5iO$emotion.css({
112
- padding: `${($parcel$interopDefault($7x5iO$contentfulf36tokens)).spacingM} ${($parcel$interopDefault($7x5iO$contentfulf36tokens)).spacingL}`,
113
- color: ($parcel$interopDefault($7x5iO$contentfulf36tokens)).gray700,
114
- fontSize: ($parcel$interopDefault($7x5iO$contentfulf36tokens)).fontSizeM,
115
- fontFamily: ($parcel$interopDefault($7x5iO$contentfulf36tokens)).fontStackPrimary,
116
- lineHeight: ($parcel$interopDefault($7x5iO$contentfulf36tokens)).lineHeightM,
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,
117
100
  overflowY: 'auto',
118
101
  overflowX: 'auto',
119
102
  boxSizing: 'border-box'
@@ -122,15 +105,15 @@ function $32e971b34c262557$export$5168abbf3ad664a0() {
122
105
  }
123
106
 
124
107
 
125
- function $66391c55bbcf9065$export$6da19a24bf249f17({ testId: testId = 'cf-ui-modal-content' , className: className , children: children , ...otherProps }) {
108
+ const $66391c55bbcf9065$export$6da19a24bf249f17 = ({ testId: testId = 'cf-ui-modal-content' , className: className , children: children , ...otherProps })=>{
126
109
  const styles = $32e971b34c262557$export$5168abbf3ad664a0();
127
- return(/*#__PURE__*/ ($parcel$interopDefault($7x5iO$react)).createElement($7x5iO$contentfulf36core.Box, {
110
+ return /*#__PURE__*/ ($parcel$interopDefault($a6cQm$react)).createElement($a6cQm$contentfulf36core.Box, {
128
111
  ...otherProps,
129
112
  as: "div",
130
- className: $7x5iO$emotion.cx(styles.root, className),
113
+ className: $a6cQm$emotion.cx(styles.root, className),
131
114
  testId: testId
132
- }, children));
133
- }
115
+ }, children);
116
+ };
134
117
  $66391c55bbcf9065$export$6da19a24bf249f17.displayName = 'ModalContent';
135
118
 
136
119
 
@@ -138,55 +121,53 @@ $66391c55bbcf9065$export$6da19a24bf249f17.displayName = 'ModalContent';
138
121
 
139
122
 
140
123
  function $a1d799ea27882387$export$9af97f4b0b4c597a(props) {
141
- const modal = $7x5iO$emotion.cx(/*#__PURE__*/ $7x5iO$emotion.css({
142
- margin: ($parcel$interopDefault($7x5iO$contentfulf36tokens)).spacing2Xl,
143
- backgroundColor: ($parcel$interopDefault($7x5iO$contentfulf36tokens)).colorWhite,
144
- borderRadius: ($parcel$interopDefault($7x5iO$contentfulf36tokens)).borderRadiusMedium,
145
- boxShadow: ($parcel$interopDefault($7x5iO$contentfulf36tokens)).boxShadowHeavy,
146
- maxHeight: `calc(100vh - 1rem * (100 / ${($parcel$interopDefault($7x5iO$contentfulf36tokens)).fontBaseDefault}))`,
147
- maxWidth: `calc(100vw - 1rem * (100 / ${($parcel$interopDefault($7x5iO$contentfulf36tokens)).fontBaseDefault}))`,
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}))`,
148
131
  overflow: 'hidden',
149
132
  display: 'flex',
150
133
  flexDirection: 'column'
151
- }), props.allowHeightOverflow ? /*#__PURE__*/ $7x5iO$emotion.css({
134
+ }), props.allowHeightOverflow ? /*#__PURE__*/ $a6cQm$emotion.css({
152
135
  name: "1evlo53",
153
136
  styles: "overflow:auto;max-height:none;"
154
- }) : null, props.size === 'zen' ? /*#__PURE__*/ $7x5iO$emotion.css({
137
+ }) : null, props.size === 'zen' ? /*#__PURE__*/ $a6cQm$emotion.css({
155
138
  name: "11c88st",
156
139
  styles: "max-width:none;max-height:none;margin:0;height:100%;width:100%;"
157
140
  }) : null, props.className);
158
141
  return {
159
- modal: modal,
160
- portal: /*#__PURE__*/ $7x5iO$emotion.css({
142
+ portal: /*#__PURE__*/ $a6cQm$emotion.css({
161
143
  name: "13o7eu2",
162
144
  styles: "display:block;"
163
145
  }),
164
146
  base: {
165
- root: $7x5iO$emotion.cx(/*#__PURE__*/ $7x5iO$emotion.css({
166
- zIndex: ($parcel$interopDefault($7x5iO$contentfulf36tokens)).zIndexModalContent,
147
+ root: $a6cQm$emotion.cx(/*#__PURE__*/ $a6cQm$emotion.css({
148
+ zIndex: ($parcel$interopDefault($a6cQm$contentfulf36tokens)).zIndexModalContent,
167
149
  position: 'relative',
168
150
  padding: 0,
169
151
  display: 'inline-block',
170
152
  margin: '0 auto',
171
153
  textAlign: 'left',
172
154
  outline: 'none',
173
- transform: 'scale(0.85)',
174
- transition: `transform ${($parcel$interopDefault($7x5iO$contentfulf36tokens)).transitionDurationDefault} ${($parcel$interopDefault($7x5iO$contentfulf36tokens)).transitionEasingDefault}`
175
- }), props.size === 'zen' ? /*#__PURE__*/ $7x5iO$emotion.css({
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({
176
158
  name: "uwwqev",
177
159
  styles: "width:100%;height:100%;"
178
160
  }) : null),
179
- afterOpen: /*#__PURE__*/ $7x5iO$emotion.css({
161
+ afterOpen: /*#__PURE__*/ $a6cQm$emotion.css({
180
162
  name: "plgkgv",
181
163
  styles: "transform:scale(1) !important;"
182
164
  }),
183
- beforeClose: /*#__PURE__*/ $7x5iO$emotion.css({
184
- name: "zhiq4h",
185
- styles: "transform:scale(0.85) !important;"
165
+ beforeClose: /*#__PURE__*/ $a6cQm$emotion.css({
166
+ transform: props.size === 'zen' ? 'scale(1)' : 'scale(0.85)'
186
167
  })
187
168
  },
188
169
  modalOverlay: {
189
- root: $7x5iO$emotion.cx(/*#__PURE__*/ $7x5iO$emotion.css({
170
+ root: $a6cQm$emotion.cx(/*#__PURE__*/ $a6cQm$emotion.css({
190
171
  display: 'flex',
191
172
  alignItems: 'baseline',
192
173
  flexWrap: 'wrap',
@@ -194,26 +175,27 @@ function $a1d799ea27882387$export$9af97f4b0b4c597a(props) {
194
175
  right: 0,
195
176
  bottom: 0,
196
177
  left: 0,
197
- zIndex: ($parcel$interopDefault($7x5iO$contentfulf36tokens)).zIndexModal,
178
+ zIndex: ($parcel$interopDefault($a6cQm$contentfulf36tokens)).zIndexModal,
198
179
  opacity: 0,
199
- transition: `opacity ${($parcel$interopDefault($7x5iO$contentfulf36tokens)).transitionDurationDefault} ${($parcel$interopDefault($7x5iO$contentfulf36tokens)).transitionEasingDefault}`,
180
+ transition: `opacity ${($parcel$interopDefault($a6cQm$contentfulf36tokens)).transitionDurationDefault} ${($parcel$interopDefault($a6cQm$contentfulf36tokens)).transitionEasingDefault}`,
200
181
  position: 'fixed',
201
182
  overflowY: 'auto',
202
183
  backgroundColor: 'rgba(12, 20, 28, 0.74902)',
203
184
  textAlign: 'center'
204
- }), props.position === 'center' ? /*#__PURE__*/ $7x5iO$emotion.css({
185
+ }), props.position === 'center' ? /*#__PURE__*/ $a6cQm$emotion.css({
205
186
  name: "1qe4tyl",
206
187
  styles: "align-items:center;justify-content:center;"
207
188
  }) : null),
208
- afterOpen: /*#__PURE__*/ $7x5iO$emotion.css({
189
+ afterOpen: /*#__PURE__*/ $a6cQm$emotion.css({
209
190
  name: "whh5e5",
210
191
  styles: "opacity:1;"
211
192
  }),
212
- beforeClose: /*#__PURE__*/ $7x5iO$emotion.css({
193
+ beforeClose: /*#__PURE__*/ $a6cQm$emotion.css({
213
194
  name: "q7lffx",
214
195
  styles: "opacity:0;"
215
196
  })
216
- }
197
+ },
198
+ modal: modal
217
199
  };
218
200
  }
219
201
 
@@ -235,8 +217,8 @@ function $854b6d713fe70fc9$var$focusFirstWithinNode(node) {
235
217
  }
236
218
  }
237
219
  }
238
- function $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 }) {
239
- const contentRef = $7x5iO$react.useRef(null);
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
+ const contentRef = $a6cQm$react.useRef(null);
240
222
  const props = {
241
223
  ...otherProps,
242
224
  allowHeightOverflow: allowHeightOverflow,
@@ -253,7 +235,7 @@ function $854b6d713fe70fc9$export$2b77a92f1a5ad772({ allowHeightOverflow: allowH
253
235
  allowHeightOverflow: allowHeightOverflow,
254
236
  className: otherProps.className
255
237
  });
256
- $7x5iO$react.useEffect(()=>{
238
+ $a6cQm$react.useEffect(()=>{
257
239
  if (props.isShown) setTimeout(()=>{
258
240
  if (props.initialFocusRef && props.initialFocusRef.current) {
259
241
  if (props.initialFocusRef.current.focus) props.initialFocusRef.current.focus();
@@ -264,13 +246,13 @@ function $854b6d713fe70fc9$export$2b77a92f1a5ad772({ allowHeightOverflow: allowH
264
246
  props.initialFocusRef
265
247
  ]);
266
248
  const renderDefault = ()=>{
267
- return(/*#__PURE__*/ $7x5iO$react.createElement($7x5iO$react.Fragment, null, otherProps.title && /*#__PURE__*/ $7x5iO$react.createElement($2679bd8c144d3995$export$f50a68e3694789ee, {
249
+ return /*#__PURE__*/ $a6cQm$react.createElement($a6cQm$react.Fragment, null, otherProps.title && /*#__PURE__*/ $a6cQm$react.createElement($2679bd8c144d3995$export$f50a68e3694789ee, {
268
250
  title: otherProps.title,
269
251
  onClose: props.onClose,
270
252
  ...otherProps.modalHeaderProps
271
- }), /*#__PURE__*/ $7x5iO$react.createElement($66391c55bbcf9065$export$6da19a24bf249f17, otherProps.modalContentProps, otherProps.children)));
253
+ }), /*#__PURE__*/ $a6cQm$react.createElement($66391c55bbcf9065$export$6da19a24bf249f17, otherProps.modalContentProps, otherProps.children));
272
254
  };
273
- return(/*#__PURE__*/ $7x5iO$react.createElement(($parcel$interopDefault($7x5iO$reactmodal)), {
255
+ return /*#__PURE__*/ $a6cQm$react.createElement(($parcel$interopDefault($a6cQm$reactmodal)), {
274
256
  ariaHideApp: false,
275
257
  aria: aria,
276
258
  onRequestClose: props.onClose,
@@ -300,15 +282,15 @@ function $854b6d713fe70fc9$export$2b77a92f1a5ad772({ allowHeightOverflow: allowH
300
282
  contentRef: (ref)=>{
301
283
  contentRef.current = ref;
302
284
  }
303
- }, /*#__PURE__*/ $7x5iO$react.createElement($7x5iO$contentfulf36core.Box, {
285
+ }, /*#__PURE__*/ $a6cQm$react.createElement($a6cQm$contentfulf36core.Box, {
304
286
  testId: testId,
305
287
  style: {
306
288
  width: $854b6d713fe70fc9$var$ModalSizesMapper[size] || size
307
289
  },
308
290
  className: styles.modal,
309
291
  "data-modal-root": true
310
- }, typeof otherProps.children === 'function' ? otherProps.children(props) : renderDefault())));
311
- }
292
+ }, typeof otherProps.children === 'function' ? otherProps.children(props) : renderDefault()));
293
+ };
312
294
  $854b6d713fe70fc9$export$2b77a92f1a5ad772.displayName = 'Modal';
313
295
 
314
296
 
@@ -317,8 +299,8 @@ $854b6d713fe70fc9$export$2b77a92f1a5ad772.displayName = 'Modal';
317
299
 
318
300
 
319
301
 
320
- function $8b06e393320a8e77$export$c63fb08199be8e0e({ testId: testId = 'cf-ui-modal-controls' , className: className , children: children , ...otherProps }) {
321
- return(/*#__PURE__*/ ($parcel$interopDefault($7x5iO$react)).createElement($7x5iO$contentfulf36core.Flex, {
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, {
322
304
  ...otherProps,
323
305
  className: className,
324
306
  testId: testId,
@@ -326,11 +308,11 @@ function $8b06e393320a8e77$export$c63fb08199be8e0e({ testId: testId = 'cf-ui-mod
326
308
  justifyContent: "flex-end",
327
309
  margin: "spacingL",
328
310
  marginTop: "none"
329
- }, /*#__PURE__*/ ($parcel$interopDefault($7x5iO$react)).createElement($7x5iO$contentfulf36button.ButtonGroup, {
311
+ }, /*#__PURE__*/ ($parcel$interopDefault($a6cQm$react)).createElement($a6cQm$contentfulf36button.ButtonGroup, {
330
312
  variant: "spaced",
331
313
  spacing: "spacingS"
332
- }, children)));
333
- }
314
+ }, children));
315
+ };
334
316
  $8b06e393320a8e77$export$c63fb08199be8e0e.displayName = 'ModalControls';
335
317
 
336
318
 
@@ -343,9 +325,9 @@ $2132db66f9439432$export$2b77a92f1a5ad772.Controls = $8b06e393320a8e77$export$c6
343
325
 
344
326
 
345
327
 
346
- function $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 }) {
347
- const cancelRef = ($parcel$interopDefault($7x5iO$react)).useRef(null);
348
- const confirmButton = confirmLabel ? /*#__PURE__*/ ($parcel$interopDefault($7x5iO$react)).createElement($7x5iO$contentfulf36button.Button, {
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, {
349
331
  testId: confirmTestId,
350
332
  isDisabled: isConfirmDisabled,
351
333
  isLoading: isConfirmLoading,
@@ -353,14 +335,14 @@ function $657ddd6e4548962f$export$427af6990c8ff682({ allowHeightOverflow: allowH
353
335
  size: "small",
354
336
  onClick: ()=>onConfirm()
355
337
  }, confirmLabel) : null;
356
- const cancelButton = cancelLabel ? /*#__PURE__*/ ($parcel$interopDefault($7x5iO$react)).createElement($7x5iO$contentfulf36button.Button, {
338
+ const cancelButton = cancelLabel ? /*#__PURE__*/ ($parcel$interopDefault($a6cQm$react)).createElement($a6cQm$contentfulf36button.Button, {
357
339
  testId: cancelTestId,
358
340
  variant: "secondary",
359
341
  onClick: onCancel,
360
342
  size: "small",
361
343
  ref: initialFocusRef || cancelRef
362
344
  }, cancelLabel) : null;
363
- return(/*#__PURE__*/ ($parcel$interopDefault($7x5iO$react)).createElement($2132db66f9439432$export$2b77a92f1a5ad772, {
345
+ return /*#__PURE__*/ ($parcel$interopDefault($a6cQm$react)).createElement($2132db66f9439432$export$2b77a92f1a5ad772, {
364
346
  testId: testId,
365
347
  isShown: isShown,
366
348
  onClose: onCancel,
@@ -370,12 +352,12 @@ function $657ddd6e4548962f$export$427af6990c8ff682({ allowHeightOverflow: allowH
370
352
  allowHeightOverflow: allowHeightOverflow,
371
353
  initialFocusRef: cancelRef
372
354
  }, ()=>{
373
- return(/*#__PURE__*/ ($parcel$interopDefault($7x5iO$react)).createElement(($parcel$interopDefault($7x5iO$react)).Fragment, null, /*#__PURE__*/ ($parcel$interopDefault($7x5iO$react)).createElement($2132db66f9439432$export$2b77a92f1a5ad772.Header, {
355
+ return /*#__PURE__*/ ($parcel$interopDefault($a6cQm$react)).createElement(($parcel$interopDefault($a6cQm$react)).Fragment, null, /*#__PURE__*/ ($parcel$interopDefault($a6cQm$react)).createElement($2132db66f9439432$export$2b77a92f1a5ad772.Header, {
374
356
  title: title || '',
375
357
  ...modalHeaderProps
376
- }), /*#__PURE__*/ ($parcel$interopDefault($7x5iO$react)).createElement($2132db66f9439432$export$2b77a92f1a5ad772.Content, modalContentProps, children), /*#__PURE__*/ ($parcel$interopDefault($7x5iO$react)).createElement($2132db66f9439432$export$2b77a92f1a5ad772.Controls, modalControlsProps, cancelButton, confirmButton)));
377
- }));
378
- }
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));
359
+ });
360
+ };
379
361
  $657ddd6e4548962f$export$427af6990c8ff682.displayName = 'ModalConfirm';
380
362
 
381
363
 
@@ -403,12 +385,11 @@ function $f6dfceab072669eb$var$closeAll() {
403
385
  render(config);
404
386
  await new Promise((resolveDelay)=>setTimeout(resolveDelay, delay)
405
387
  );
406
- ($parcel$interopDefault($7x5iO$reactdom)).unmountComponentAtNode($f6dfceab072669eb$var$getRoot(rootElId));
388
+ ($parcel$interopDefault($a6cQm$reactdom)).unmountComponentAtNode($f6dfceab072669eb$var$getRoot(rootElId));
407
389
  $f6dfceab072669eb$var$openModalsIds.delete(rootElId);
408
390
  });
409
391
  } // eslint-disable-next-line @typescript-eslint/no-explicit-any
410
- function $f6dfceab072669eb$var$open(componentRenderer, options = {
411
- }) {
392
+ function $f6dfceab072669eb$var$open(componentRenderer, options = {}) {
412
393
  options = {
413
394
  delay: 300,
414
395
  ...options
@@ -421,7 +402,7 @@ function $f6dfceab072669eb$var$open(componentRenderer, options = {
421
402
  isShown: true
422
403
  };
423
404
  function render({ onClose: onClose , isShown: isShown }) {
424
- ($parcel$interopDefault($7x5iO$reactdom)).render(componentRenderer({
405
+ ($parcel$interopDefault($a6cQm$reactdom)).render(componentRenderer({
425
406
  onClose: onClose,
426
407
  isShown: isShown
427
408
  }), rootDom);
@@ -434,7 +415,7 @@ function $f6dfceab072669eb$var$open(componentRenderer, options = {
434
415
  render(currentConfig);
435
416
  await new Promise((resolveDelay)=>setTimeout(resolveDelay, options.delay)
436
417
  );
437
- ($parcel$interopDefault($7x5iO$reactdom)).unmountComponentAtNode(rootDom);
418
+ ($parcel$interopDefault($a6cQm$reactdom)).unmountComponentAtNode(rootDom);
438
419
  rootDom.remove();
439
420
  $f6dfceab072669eb$var$openModalsIds.delete(rootElId);
440
421
  resolve(arg);
@@ -455,7 +436,4 @@ const $f6dfceab072669eb$export$e21b828b42c54a37 = {
455
436
 
456
437
 
457
438
 
458
- $parcel$exportWildcard(module.exports, $4eddba25b642b7ac$exports);
459
-
460
-
461
439
  //# sourceMappingURL=main.js.map