@contentful/field-editor-markdown 0.17.1 → 1.0.2

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.
@@ -12,10 +12,10 @@ require('codemirror/addon/display/autorefresh');
12
12
  var React = require('react');
13
13
  var React__default = _interopDefault(React);
14
14
  var emotion = require('emotion');
15
- var tokens = _interopDefault(require('@contentful/forma-36-tokens'));
15
+ var tokens = _interopDefault(require('@contentful/f36-tokens'));
16
16
  var fieldEditorShared = require('@contentful/field-editor-shared');
17
- var noop = _interopDefault(require('lodash/noop'));
18
- var forma36ReactComponents = require('@contentful/forma-36-react-components');
17
+ var f36Components = require('@contentful/f36-components');
18
+ var f36Icons = require('@contentful/f36-icons');
19
19
  var transform = _interopDefault(require('lodash/transform'));
20
20
  var throttle = _interopDefault(require('lodash/throttle'));
21
21
  var CodeMirror = _interopDefault(require('codemirror'));
@@ -29,6 +29,7 @@ var Markdown = _interopDefault(require('markdown-to-jsx'));
29
29
  var DOMPurify = _interopDefault(require('dompurify'));
30
30
  var inRange = _interopDefault(require('lodash/inRange'));
31
31
  var isObject = _interopDefault(require('lodash/isObject'));
32
+ var hostnameTransformer = require('@contentful/hostname-transformer');
32
33
  var extend = _interopDefault(require('lodash/extend'));
33
34
  var isString = _interopDefault(require('lodash/isString'));
34
35
  var isFinite = _interopDefault(require('lodash/isFinite'));
@@ -195,16 +196,7 @@ var _excluded = ["label"],
195
196
  _excluded7 = ["label"],
196
197
  _excluded8 = ["label"],
197
198
  _excluded9 = ["label"],
198
- _excluded10 = ["label"],
199
- _excluded11 = ["label"],
200
- _excluded12 = ["label"],
201
- _excluded13 = ["label"],
202
- _excluded14 = ["label"],
203
- _excluded15 = ["label"],
204
- _excluded16 = ["label"],
205
- _excluded17 = ["label"],
206
- _excluded18 = ["label"],
207
- _excluded19 = ["label"];
199
+ _excluded10 = ["label"];
208
200
  var srOnly = /*#__PURE__*/emotion.css({
209
201
  position: 'absolute',
210
202
  width: '1px',
@@ -215,49 +207,49 @@ var srOnly = /*#__PURE__*/emotion.css({
215
207
  clip: 'rect(0, 0, 0, 0)',
216
208
  border: '0'
217
209
  });
218
- var Bold = function Bold(_ref) {
210
+ var Zen = function Zen(_ref) {
219
211
  var label = _ref.label,
220
212
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
221
213
 
222
214
  return React__default.createElement("svg", Object.assign({
223
215
  width: 14,
224
216
  height: 14,
225
- viewBox: "0 0 1782 1792"
217
+ viewBox: "0 0 1792 1792"
226
218
  }, rest), React__default.createElement("path", {
227
- d: "M747 1521q74 32 140 32 376 0 376-335 0-114-41-180-27-44-61.5-74t-67.5-46.5-80.5-25-84-10.5-94.5-2q-73 0-101 10 0 53-.5 159t-.5 158q0 8-1 67.5t-.5 96.5 4.5 83.5 12 66.5zm-14-746q42 7 109 7 82 0 143-13t110-44.5 74.5-89.5 25.5-142q0-70-29-122.5t-79-82T979 245t-124-14q-50 0-130 13 0 50 4 151t4 152q0 27-.5 80t-.5 79q0 46 1 69zm-541 889l2-94q15-4 85-16t106-27q7-12 12.5-27t8.5-33.5 5.5-32.5 3-37.5.5-34V1297q0-982-22-1025-4-8-22-14.5t-44.5-11-49.5-7-48.5-4.5-30.5-3l-4-83q98-2 340-11.5t373-9.5q23 0 68 .5t68 .5q70 0 136.5 13t128.5 42 108 71 74 104.5 28 137.5q0 52-16.5 95.5t-39 72T1398 722t-73 45-84 40q154 35 256.5 134t102.5 248q0 100-35 179.5t-93.5 130.5-138 85.5T1170 1633t-176 14q-44 0-132-3t-132-3q-106 0-307 11t-231 12z"
219
+ d: "M1411 541l-355 355 355 355 144-144q29-31 70-14 39 17 39 59v448q0 26-19 45t-45 19h-448q-42 0-59-40-17-39 14-69l144-144-355-355-355 355 144 144q31 30 14 69-17 40-59 40H192q-26 0-45-19t-19-45v-448q0-42 40-59 39-17 69 14l144 144 355-355-355-355-144 144q-19 19-45 19-12 0-24-5-40-17-40-59V192q0-26 19-45t45-19h448q42 0 59 40 17 39-14 69L541 381l355 355 355-355-144-144q-31-30-14-69 17-40 59-40h448q26 0 45 19t19 45v448q0 42-39 59-13 5-25 5-26 0-45-19z"
228
220
  }), React__default.createElement("span", {
229
221
  className: srOnly
230
222
  }, label));
231
223
  };
232
- var Italic = function Italic(_ref2) {
224
+ var Strikethrough = function Strikethrough(_ref2) {
233
225
  var label = _ref2.label,
234
226
  rest = _objectWithoutPropertiesLoose(_ref2, _excluded2);
235
227
 
236
228
  return React__default.createElement("svg", Object.assign({
237
229
  width: 14,
238
230
  height: 14,
239
- viewBox: "0 0 1782 1792"
231
+ viewBox: "0 0 1792 1792"
240
232
  }, rest), React__default.createElement("path", {
241
- d: "M384 1662l17-85q22-7 61.5-16.5t72-19T594 1518q28-35 41-101 1-7 62-289t114-543.5T863 288v-25q-24-13-54.5-18.5t-69.5-8-58-5.5l19-103q33 2 120 6.5t149.5 7T1090 144q48 0 98.5-2.5t121-7 98.5-6.5q-5 39-19 89-30 10-101.5 28.5T1179 279q-8 19-14 42.5t-9 40-7.5 45.5-6.5 42q-27 148-87.5 419.5T977 1224q-2 9-13 58t-20 90-16 83.5-6 57.5l1 18q17 4 185 31-3 44-16 99-11 0-32.5 1.5t-32.5 1.5q-29 0-87-10t-86-10q-138-2-206-2-51 0-143 9t-121 11z"
233
+ d: "M1760 896q14 0 23 9t9 23v64q0 14-9 23t-23 9H32q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h1728zM483 832q-28-35-51-80-48-98-48-188 0-181 134-309 133-127 393-127 50 0 167 19 66 12 177 48 10 38 21 118 14 123 14 183 0 18-5 45l-12 3-84-6-14-2q-50-149-103-205-88-91-210-91-114 0-182 59-67 58-67 146 0 73 66 140t279 129q69 20 173 66 58 28 95 52H483zm507 256h411q7 39 7 92 0 111-41 212-23 56-71 104-37 35-109 81-80 48-153 66-80 21-203 21-114 0-195-23l-140-40q-57-16-72-28-8-8-8-22v-13q0-108-2-156-1-30 0-68l2-37v-44l102-2q15 34 30 71t22.5 56 12.5 27q35 57 80 94 43 36 105 57 59 22 132 22 64 0 139-27 77-26 122-86 47-61 47-129 0-84-81-157-34-29-137-71z"
242
234
  }), React__default.createElement("span", {
243
235
  className: srOnly
244
236
  }, label));
245
237
  };
246
- var Quote = function Quote(_ref3) {
238
+ var Indent = function Indent(_ref3) {
247
239
  var label = _ref3.label,
248
240
  rest = _objectWithoutPropertiesLoose(_ref3, _excluded3);
249
241
 
250
242
  return React__default.createElement("svg", Object.assign({
251
243
  width: 14,
252
244
  height: 14,
253
- viewBox: "0 0 1782 1792"
245
+ viewBox: "0 0 1792 1792"
254
246
  }, rest), React__default.createElement("path", {
255
- d: "M832 960v384q0 80-56 136t-136 56H256q-80 0-136-56t-56-136V640q0-104 40.5-198.5T214 278t163.5-109.5T576 128h64q26 0 45 19t19 45v128q0 26-19 45t-45 19h-64q-106 0-181 75t-75 181v32q0 40 28 68t68 28h224q80 0 136 56t56 136zm896 0v384q0 80-56 136t-136 56h-384q-80 0-136-56t-56-136V640q0-104 40.5-198.5T1110 278t163.5-109.5T1472 128h64q26 0 45 19t19 45v128q0 26-19 45t-45 19h-64q-106 0-181 75t-75 181v32q0 40 28 68t68 28h224q80 0 136 56t56 136z"
247
+ d: "M352 832q0 14-9 23L55 1143q-9 9-23 9-13 0-22.5-9.5T0 1120V544q0-13 9.5-22.5T32 512q14 0 23 9l288 288q9 9 9 23zm1440 480v192q0 13-9.5 22.5t-22.5 9.5H32q-13 0-22.5-9.5T0 1504v-192q0-13 9.5-22.5T32 1280h1728q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5H672q-13 0-22.5-9.5T640 1120V928q0-13 9.5-22.5T672 896h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5T1760 768H672q-13 0-22.5-9.5T640 736V544q0-13 9.5-22.5T672 512h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5T1760 384H32q-13 0-22.5-9.5T0 352V160q0-13 9.5-22.5T32 128h1728q13 0 22.5 9.5t9.5 22.5z"
256
248
  }), React__default.createElement("span", {
257
249
  className: srOnly
258
250
  }, label));
259
251
  };
260
- var List = function List(_ref4) {
252
+ var Dedent = function Dedent(_ref4) {
261
253
  var label = _ref4.label,
262
254
  rest = _objectWithoutPropertiesLoose(_ref4, _excluded4);
263
255
 
@@ -266,26 +258,26 @@ var List = function List(_ref4) {
266
258
  height: 14,
267
259
  viewBox: "0 0 1792 1792"
268
260
  }, rest), React__default.createElement("path", {
269
- d: "M256 1312v192q0 13-9.5 22.5T224 1536H32q-13 0-22.5-9.5T0 1504v-192q0-13 9.5-22.5T32 1280h192q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5T224 1152H32q-13 0-22.5-9.5T0 1120V928q0-13 9.5-22.5T32 896h192q13 0 22.5 9.5T256 928zm0-384v192q0 13-9.5 22.5T224 768H32q-13 0-22.5-9.5T0 736V544q0-13 9.5-22.5T32 512h192q13 0 22.5 9.5T256 544zm1536 768v192q0 13-9.5 22.5t-22.5 9.5H416q-13 0-22.5-9.5T384 1504v-192q0-13 9.5-22.5t22.5-9.5h1344q13 0 22.5 9.5t9.5 22.5zM256 160v192q0 13-9.5 22.5T224 384H32q-13 0-22.5-9.5T0 352V160q0-13 9.5-22.5T32 128h192q13 0 22.5 9.5T256 160zm1536 768v192q0 13-9.5 22.5t-22.5 9.5H416q-13 0-22.5-9.5T384 1120V928q0-13 9.5-22.5T416 896h1344q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5T1760 768H416q-13 0-22.5-9.5T384 736V544q0-13 9.5-22.5T416 512h1344q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5T1760 384H416q-13 0-22.5-9.5T384 352V160q0-13 9.5-22.5T416 128h1344q13 0 22.5 9.5t9.5 22.5z"
261
+ d: "M384 544v576q0 13-9.5 22.5T352 1152q-14 0-23-9L41 855q-9-9-9-23t9-23l288-288q9-9 23-9 13 0 22.5 9.5T384 544zm1408 768v192q0 13-9.5 22.5t-22.5 9.5H32q-13 0-22.5-9.5T0 1504v-192q0-13 9.5-22.5T32 1280h1728q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5H672q-13 0-22.5-9.5T640 1120V928q0-13 9.5-22.5T672 896h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5T1760 768H672q-13 0-22.5-9.5T640 736V544q0-13 9.5-22.5T672 512h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5T1760 384H32q-13 0-22.5-9.5T0 352V160q0-13 9.5-22.5T32 128h1728q13 0 22.5 9.5t9.5 22.5z"
270
262
  }), React__default.createElement("span", {
271
263
  className: srOnly
272
264
  }, label));
273
265
  };
274
- var ListOl = function ListOl(_ref5) {
266
+ var Cubes = function Cubes(_ref5) {
275
267
  var label = _ref5.label,
276
268
  rest = _objectWithoutPropertiesLoose(_ref5, _excluded5);
277
269
 
278
270
  return React__default.createElement("svg", Object.assign({
279
- width: 14,
271
+ width: 18,
280
272
  height: 14,
281
- viewBox: "0 0 1792 1792"
273
+ viewBox: "0 0 2304 1792"
282
274
  }, rest), React__default.createElement("path", {
283
- d: "M381 1620q0 80-54.5 126T191 1792q-106 0-172-66l57-88q49 45 106 45 29 0 50.5-14.5T254 1626q0-64-105-56l-26-56q8-10 32.5-43.5t42.5-54 37-38.5v-1q-16 0-48.5 1t-48.5 1v53H32v-152h333v88l-95 115q51 12 81 49t30 88zm2-627v159H21q-6-36-6-54 0-51 23.5-93T95 937t66-47.5 56.5-43.5 23.5-45q0-25-14.5-38.5T187 749q-46 0-81 58l-85-59q24-51 71.5-79.5T198 640q73 0 123 41.5T371 794q0 50-34 91.5T262 950t-75.5 50.5T151 1053h127v-60h105zm1409 319v192q0 13-9.5 22.5t-22.5 9.5H544q-13 0-22.5-9.5T512 1504v-192q0-14 9-23t23-9h1216q13 0 22.5 9.5t9.5 22.5zM384 413v99H49v-99h107q0-41 .5-121.5T157 170v-12h-2q-8 17-50 54l-71-76L170 9h106v404h108zm1408 387v192q0 13-9.5 22.5t-22.5 9.5H544q-13 0-22.5-9.5T512 992V800q0-14 9-23t23-9h1216q13 0 22.5 9.5t9.5 22.5zm0-512v192q0 13-9.5 22.5T1760 512H544q-13 0-22.5-9.5T512 480V288q0-13 9.5-22.5T544 256h1216q13 0 22.5 9.5t9.5 22.5z"
275
+ d: "M640 1632l384-192v-314l-384 164v342zm-64-454l404-173-404-173-404 173zm1088 454l384-192v-314l-384 164v342zm-64-454l404-173-404-173-404 173zm-448-293l384-165V454l-384 164v267zm-64-379l441-189-441-189-441 189zm1088 518v416q0 36-19 67t-52 47l-448 224q-25 14-57 14t-57-14l-448-224q-4-2-7-4-2 2-7 4l-448 224q-25 14-57 14t-57-14L71 1554q-33-16-52-47t-19-67v-416q0-38 21.5-70T78 906l434-186V320q0-38 21.5-70t56.5-48l448-192q23-10 50-10t50 10l448 192q35 16 56.5 48t21.5 70v400l434 186q36 16 57 48t21 70z"
284
276
  }), React__default.createElement("span", {
285
277
  className: srOnly
286
278
  }, label));
287
279
  };
288
- var Link = function Link(_ref6) {
280
+ var Table = function Table(_ref6) {
289
281
  var label = _ref6.label,
290
282
  rest = _objectWithoutPropertiesLoose(_ref6, _excluded6);
291
283
 
@@ -294,12 +286,12 @@ var Link = function Link(_ref6) {
294
286
  height: 14,
295
287
  viewBox: "0 0 1792 1792"
296
288
  }, rest), React__default.createElement("path", {
297
- d: "M1520 1216q0-40-28-68l-208-208q-28-28-68-28-42 0-72 32 3 3 19 18.5t21.5 21.5 15 19 13 25.5 3.5 27.5q0 40-28 68t-68 28q-15 0-27.5-3.5t-25.5-13-19-15-21.5-21.5-18.5-19q-33 31-33 73 0 40 28 68l206 207q27 27 68 27 40 0 68-26l147-146q28-28 28-67zM817 511q0-40-28-68L583 236q-28-28-68-28-39 0-68 27L300 381q-28 28-28 67 0 40 28 68l208 208q27 27 68 27 42 0 72-31-3-3-19-18.5T607.5 680t-15-19-13-25.5T576 608q0-40 28-68t68-28q15 0 27.5 3.5t25.5 13 19 15 21.5 21.5 18.5 19q33-31 33-73zm895 705q0 120-85 203l-147 146q-83 83-203 83-121 0-204-85l-206-207q-83-83-83-203 0-123 88-209l-88-88q-86 88-208 88-120 0-204-84L164 652q-84-84-84-204t85-203L312 99q83-83 203-83 121 0 204 85l206 207q83 83 83 203 0 123-88 209l88 88q86-88 208-88 120 0 204 84l208 208q84 84 84 204z"
289
+ d: "M576 1376v-192q0-14-9-23t-23-9H224q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm0-384V800q0-14-9-23t-23-9H224q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9H736q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zM576 608V416q0-14-9-23t-23-9H224q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384V800q0-14-9-23t-23-9H736q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm-512-768V416q0-14-9-23t-23-9H736q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384V800q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm0-384V416q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm128-320v1088q0 66-47 113t-113 47H224q-66 0-113-47t-47-113V288q0-66 47-113t113-47h1344q66 0 113 47t47 113z"
298
290
  }), React__default.createElement("span", {
299
291
  className: srOnly
300
292
  }, label));
301
293
  };
302
- var Heading = function Heading(_ref7) {
294
+ var SpecialChar = function SpecialChar(_ref7) {
303
295
  var label = _ref7.label,
304
296
  rest = _objectWithoutPropertiesLoose(_ref7, _excluded7);
305
297
 
@@ -308,12 +300,12 @@ var Heading = function Heading(_ref7) {
308
300
  height: 14,
309
301
  viewBox: "0 0 1792 1792"
310
302
  }, rest), React__default.createElement("path", {
311
- d: "M1682 1664q-44 0-132.5-3.5T1416 1657q-44 0-132 3.5t-132 3.5q-24 0-37-20.5t-13-45.5q0-31 17-46t39-17 51-7 45-15q33-21 33-140l-1-391q0-21-1-31-13-4-50-4H560q-38 0-51 4-1 10-1 31l-1 371q0 142 37 164 16 10 48 13t57 3.5 45 15 20 45.5q0 26-12.5 48t-36.5 22q-47 0-139.5-3.5T387 1657q-43 0-128 3.5t-127 3.5q-23 0-35.5-21T84 1598q0-30 15.5-45t36-17.5 47.5-7.5 42-15q33-23 33-143l-1-57V500q0-3 .5-26t0-36.5T256 399t-3.5-42-6.5-36.5-11-31.5-16-18q-15-10-45-12t-53-2-41-14-18-45q0-26 12-48t36-22q46 0 138.5 3.5T387 135q42 0 126.5-3.5T640 128q25 0 37.5 22t12.5 48q0 30-17 43.5T634.5 256t-49.5 4-43 13q-35 21-35 160l1 320q0 21 1 32 13 3 39 3h699q25 0 38-3 1-11 1-32l1-320q0-139-35-160-18-11-58.5-12.5t-66-13T1102 198q0-26 12.5-48t37.5-22q44 0 132 3.5t132 3.5q43 0 129-3.5t129-3.5q25 0 37.5 22t12.5 48q0 30-17.5 44t-40 14.5-51.5 3-44 12.5q-35 23-35 161l1 943q0 119 34 140 16 10 46 13.5t53.5 4.5 41.5 15.5 18 44.5q0 26-12 48t-36 22z"
303
+ d: "M1360 1307l35 159q3 12-3 22.5t-17 14.5l-5 1q-4 2-10.5 3.5t-16 4.5-21.5 5.5-25.5 5-30 5-33.5 4.5-36.5 3-38.5 1q-234 0-409-130.5T511 1054h-95q-13 0-22.5-9.5T384 1022V909q0-13 9.5-22.5T416 877h66q-2-57 1-105h-67q-14 0-23-9t-9-23V626q0-14 9-23t23-9h98q67-210 243.5-338T1158 128q102 0 194 23 11 3 20 15 6 11 3 24l-43 159q-3 13-14 19.5t-24 2.5l-4-1q-4-1-11.5-2.5L1261 364l-22.5-3.5-26-3-29-2.5-29.5-1q-126 0-226 64T778 594h468q16 0 25 12 10 12 7 26l-24 114q-5 26-32 26H734q-3 37 0 105h459q15 0 25 12 9 12 6 27l-24 112q-2 11-11 18.5t-20 7.5H782q48 117 149.5 185.5T1160 1308q18 0 36-1.5t33.5-3.5 29.5-4.5 24.5-5 18.5-4.5l12-3 5-2q13-5 26 2 12 7 15 21z"
312
304
  }), React__default.createElement("span", {
313
305
  className: srOnly
314
306
  }, label));
315
307
  };
316
- var Zen = function Zen(_ref8) {
308
+ var OrgLinks = function OrgLinks(_ref8) {
317
309
  var label = _ref8.label,
318
310
  rest = _objectWithoutPropertiesLoose(_ref8, _excluded8);
319
311
 
@@ -322,12 +314,12 @@ var Zen = function Zen(_ref8) {
322
314
  height: 14,
323
315
  viewBox: "0 0 1792 1792"
324
316
  }, rest), React__default.createElement("path", {
325
- d: "M1411 541l-355 355 355 355 144-144q29-31 70-14 39 17 39 59v448q0 26-19 45t-45 19h-448q-42 0-59-40-17-39 14-69l144-144-355-355-355 355 144 144q31 30 14 69-17 40-59 40H192q-26 0-45-19t-19-45v-448q0-42 40-59 39-17 69 14l144 144 355-355-355-355-144 144q-19 19-45 19-12 0-24-5-40-17-40-59V192q0-26 19-45t45-19h448q42 0 59 40 17 39-14 69L541 381l355 355 355-355-144-144q-31-30-14-69 17-40 59-40h448q26 0 45 19t19 45v448q0 42-39 59-13 5-25 5-26 0-45-19z"
317
+ d: "M1792 1248v320q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-320q0-40 28-68t68-28h96V960H960v192h96q40 0 68 28t28 68v320q0 40-28 68t-68 28H736q-40 0-68-28t-28-68v-320q0-40 28-68t68-28h96V960H320v192h96q40 0 68 28t28 68v320q0 40-28 68t-68 28H96q-40 0-68-28t-28-68v-320q0-40 28-68t68-28h96V960q0-52 38-90t90-38h512V640h-96q-40 0-68-28t-28-68V224q0-40 28-68t68-28h320q40 0 68 28t28 68v320q0 40-28 68t-68 28h-96v192h512q52 0 90 38t38 90v192h96q40 0 68 28t28 68z"
326
318
  }), React__default.createElement("span", {
327
319
  className: srOnly
328
320
  }, label));
329
321
  };
330
- var Strikethrough = function Strikethrough(_ref9) {
322
+ var Undo = function Undo(_ref9) {
331
323
  var label = _ref9.label,
332
324
  rest = _objectWithoutPropertiesLoose(_ref9, _excluded9);
333
325
 
@@ -336,141 +328,15 @@ var Strikethrough = function Strikethrough(_ref9) {
336
328
  height: 14,
337
329
  viewBox: "0 0 1792 1792"
338
330
  }, rest), React__default.createElement("path", {
339
- d: "M1760 896q14 0 23 9t9 23v64q0 14-9 23t-23 9H32q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h1728zM483 832q-28-35-51-80-48-98-48-188 0-181 134-309 133-127 393-127 50 0 167 19 66 12 177 48 10 38 21 118 14 123 14 183 0 18-5 45l-12 3-84-6-14-2q-50-149-103-205-88-91-210-91-114 0-182 59-67 58-67 146 0 73 66 140t279 129q69 20 173 66 58 28 95 52H483zm507 256h411q7 39 7 92 0 111-41 212-23 56-71 104-37 35-109 81-80 48-153 66-80 21-203 21-114 0-195-23l-140-40q-57-16-72-28-8-8-8-22v-13q0-108-2-156-1-30 0-68l2-37v-44l102-2q15 34 30 71t22.5 56 12.5 27q35 57 80 94 43 36 105 57 59 22 132 22 64 0 139-27 77-26 122-86 47-61 47-129 0-84-81-157-34-29-137-71z"
331
+ d: "M1664 896q0 156-61 298t-164 245-245 164-298 61q-172 0-327-72.5T305 1387q-7-10-6.5-22.5t8.5-20.5l137-138q10-9 25-9 16 2 23 12 73 95 179 147t225 52q104 0 198.5-40.5T1258 1258t109.5-163.5T1408 896t-40.5-198.5T1258 534t-163.5-109.5T896 384q-98 0-188 35.5T548 521l137 138q31 30 14 69-17 40-59 40H192q-26 0-45-19t-19-45V256q0-42 40-59 39-17 69 14l130 129q107-101 244.5-156.5T896 128q156 0 298 61t245 164 164 245 61 298z"
340
332
  }), React__default.createElement("span", {
341
333
  className: srOnly
342
334
  }, label));
343
335
  };
344
- var Code = function Code(_ref10) {
336
+ var Redo = function Redo(_ref10) {
345
337
  var label = _ref10.label,
346
338
  rest = _objectWithoutPropertiesLoose(_ref10, _excluded10);
347
339
 
348
- return React__default.createElement("svg", Object.assign({
349
- width: 18,
350
- height: 14,
351
- viewBox: "0 0 2048 1792"
352
- }, rest), React__default.createElement("path", {
353
- d: "M681 1399l-50 50q-10 10-23 10t-23-10L119 983q-10-10-10-23t10-23l466-466q10-10 23-10t23 10l50 50q10 10 10 23t-10 23L288 960l393 393q10 10 10 23t-10 23zm591-1067L899 1623q-4 13-15.5 19.5T860 1645l-62-17q-13-4-19.5-15.5T776 1588l373-1291q4-13 15.5-19.5t23.5-2.5l62 17q13 4 19.5 15.5t2.5 24.5zm657 651l-466 466q-10 10-23 10t-23-10l-50-50q-10-10-10-23t10-23l393-393-393-393q-10-10-10-23t10-23l50-50q10-10 23-10t23 10l466 466q10 10 10 23t-10 23z"
354
- }), React__default.createElement("span", {
355
- className: srOnly
356
- }, label));
357
- };
358
- var Hr = function Hr(_ref11) {
359
- var label = _ref11.label,
360
- rest = _objectWithoutPropertiesLoose(_ref11, _excluded11);
361
-
362
- return React__default.createElement("svg", Object.assign({
363
- width: 14,
364
- height: 14,
365
- viewBox: "0 0 1792 1792"
366
- }, rest), React__default.createElement("path", {
367
- d: "M1792 896q0 26-19 45l-256 256q-19 19-45 19t-45-19-19-45v-128H384v128q0 26-19 45t-45 19-45-19L19 941Q0 922 0 896t19-45l256-256q19-19 45-19t45 19 19 45v128h1024V640q0-26 19-45t45-19 45 19l256 256q19 19 19 45z"
368
- }), React__default.createElement("span", {
369
- className: srOnly
370
- }, label));
371
- };
372
- var Indent = function Indent(_ref12) {
373
- var label = _ref12.label,
374
- rest = _objectWithoutPropertiesLoose(_ref12, _excluded12);
375
-
376
- return React__default.createElement("svg", Object.assign({
377
- width: 14,
378
- height: 14,
379
- viewBox: "0 0 1792 1792"
380
- }, rest), React__default.createElement("path", {
381
- d: "M352 832q0 14-9 23L55 1143q-9 9-23 9-13 0-22.5-9.5T0 1120V544q0-13 9.5-22.5T32 512q14 0 23 9l288 288q9 9 9 23zm1440 480v192q0 13-9.5 22.5t-22.5 9.5H32q-13 0-22.5-9.5T0 1504v-192q0-13 9.5-22.5T32 1280h1728q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5H672q-13 0-22.5-9.5T640 1120V928q0-13 9.5-22.5T672 896h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5T1760 768H672q-13 0-22.5-9.5T640 736V544q0-13 9.5-22.5T672 512h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5T1760 384H32q-13 0-22.5-9.5T0 352V160q0-13 9.5-22.5T32 128h1728q13 0 22.5 9.5t9.5 22.5z"
382
- }), React__default.createElement("span", {
383
- className: srOnly
384
- }, label));
385
- };
386
- var Dedent = function Dedent(_ref13) {
387
- var label = _ref13.label,
388
- rest = _objectWithoutPropertiesLoose(_ref13, _excluded13);
389
-
390
- return React__default.createElement("svg", Object.assign({
391
- width: 14,
392
- height: 14,
393
- viewBox: "0 0 1792 1792"
394
- }, rest), React__default.createElement("path", {
395
- d: "M384 544v576q0 13-9.5 22.5T352 1152q-14 0-23-9L41 855q-9-9-9-23t9-23l288-288q9-9 23-9 13 0 22.5 9.5T384 544zm1408 768v192q0 13-9.5 22.5t-22.5 9.5H32q-13 0-22.5-9.5T0 1504v-192q0-13 9.5-22.5T32 1280h1728q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5H672q-13 0-22.5-9.5T640 1120V928q0-13 9.5-22.5T672 896h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5T1760 768H672q-13 0-22.5-9.5T640 736V544q0-13 9.5-22.5T672 512h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5T1760 384H32q-13 0-22.5-9.5T0 352V160q0-13 9.5-22.5T32 128h1728q13 0 22.5 9.5t9.5 22.5z"
396
- }), React__default.createElement("span", {
397
- className: srOnly
398
- }, label));
399
- };
400
- var Cubes = function Cubes(_ref14) {
401
- var label = _ref14.label,
402
- rest = _objectWithoutPropertiesLoose(_ref14, _excluded14);
403
-
404
- return React__default.createElement("svg", Object.assign({
405
- width: 18,
406
- height: 14,
407
- viewBox: "0 0 2304 1792"
408
- }, rest), React__default.createElement("path", {
409
- d: "M640 1632l384-192v-314l-384 164v342zm-64-454l404-173-404-173-404 173zm1088 454l384-192v-314l-384 164v342zm-64-454l404-173-404-173-404 173zm-448-293l384-165V454l-384 164v267zm-64-379l441-189-441-189-441 189zm1088 518v416q0 36-19 67t-52 47l-448 224q-25 14-57 14t-57-14l-448-224q-4-2-7-4-2 2-7 4l-448 224q-25 14-57 14t-57-14L71 1554q-33-16-52-47t-19-67v-416q0-38 21.5-70T78 906l434-186V320q0-38 21.5-70t56.5-48l448-192q23-10 50-10t50 10l448 192q35 16 56.5 48t21.5 70v400l434 186q36 16 57 48t21 70z"
410
- }), React__default.createElement("span", {
411
- className: srOnly
412
- }, label));
413
- };
414
- var Table = function Table(_ref15) {
415
- var label = _ref15.label,
416
- rest = _objectWithoutPropertiesLoose(_ref15, _excluded15);
417
-
418
- return React__default.createElement("svg", Object.assign({
419
- width: 14,
420
- height: 14,
421
- viewBox: "0 0 1792 1792"
422
- }, rest), React__default.createElement("path", {
423
- d: "M576 1376v-192q0-14-9-23t-23-9H224q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm0-384V800q0-14-9-23t-23-9H224q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9H736q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zM576 608V416q0-14-9-23t-23-9H224q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384V800q0-14-9-23t-23-9H736q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm-512-768V416q0-14-9-23t-23-9H736q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384V800q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm0-384V416q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm128-320v1088q0 66-47 113t-113 47H224q-66 0-113-47t-47-113V288q0-66 47-113t113-47h1344q66 0 113 47t47 113z"
424
- }), React__default.createElement("span", {
425
- className: srOnly
426
- }, label));
427
- };
428
- var SpecialChar = function SpecialChar(_ref16) {
429
- var label = _ref16.label,
430
- rest = _objectWithoutPropertiesLoose(_ref16, _excluded16);
431
-
432
- return React__default.createElement("svg", Object.assign({
433
- width: 14,
434
- height: 14,
435
- viewBox: "0 0 1792 1792"
436
- }, rest), React__default.createElement("path", {
437
- d: "M1360 1307l35 159q3 12-3 22.5t-17 14.5l-5 1q-4 2-10.5 3.5t-16 4.5-21.5 5.5-25.5 5-30 5-33.5 4.5-36.5 3-38.5 1q-234 0-409-130.5T511 1054h-95q-13 0-22.5-9.5T384 1022V909q0-13 9.5-22.5T416 877h66q-2-57 1-105h-67q-14 0-23-9t-9-23V626q0-14 9-23t23-9h98q67-210 243.5-338T1158 128q102 0 194 23 11 3 20 15 6 11 3 24l-43 159q-3 13-14 19.5t-24 2.5l-4-1q-4-1-11.5-2.5L1261 364l-22.5-3.5-26-3-29-2.5-29.5-1q-126 0-226 64T778 594h468q16 0 25 12 10 12 7 26l-24 114q-5 26-32 26H734q-3 37 0 105h459q15 0 25 12 9 12 6 27l-24 112q-2 11-11 18.5t-20 7.5H782q48 117 149.5 185.5T1160 1308q18 0 36-1.5t33.5-3.5 29.5-4.5 24.5-5 18.5-4.5l12-3 5-2q13-5 26 2 12 7 15 21z"
438
- }), React__default.createElement("span", {
439
- className: srOnly
440
- }, label));
441
- };
442
- var OrgLinks = function OrgLinks(_ref17) {
443
- var label = _ref17.label,
444
- rest = _objectWithoutPropertiesLoose(_ref17, _excluded17);
445
-
446
- return React__default.createElement("svg", Object.assign({
447
- width: 14,
448
- height: 14,
449
- viewBox: "0 0 1792 1792"
450
- }, rest), React__default.createElement("path", {
451
- d: "M1792 1248v320q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-320q0-40 28-68t68-28h96V960H960v192h96q40 0 68 28t28 68v320q0 40-28 68t-68 28H736q-40 0-68-28t-28-68v-320q0-40 28-68t68-28h96V960H320v192h96q40 0 68 28t28 68v320q0 40-28 68t-68 28H96q-40 0-68-28t-28-68v-320q0-40 28-68t68-28h96V960q0-52 38-90t90-38h512V640h-96q-40 0-68-28t-28-68V224q0-40 28-68t68-28h320q40 0 68 28t28 68v320q0 40-28 68t-68 28h-96v192h512q52 0 90 38t38 90v192h96q40 0 68 28t28 68z"
452
- }), React__default.createElement("span", {
453
- className: srOnly
454
- }, label));
455
- };
456
- var Undo = function Undo(_ref18) {
457
- var label = _ref18.label,
458
- rest = _objectWithoutPropertiesLoose(_ref18, _excluded18);
459
-
460
- return React__default.createElement("svg", Object.assign({
461
- width: 14,
462
- height: 14,
463
- viewBox: "0 0 1792 1792"
464
- }, rest), React__default.createElement("path", {
465
- d: "M1664 896q0 156-61 298t-164 245-245 164-298 61q-172 0-327-72.5T305 1387q-7-10-6.5-22.5t8.5-20.5l137-138q10-9 25-9 16 2 23 12 73 95 179 147t225 52q104 0 198.5-40.5T1258 1258t109.5-163.5T1408 896t-40.5-198.5T1258 534t-163.5-109.5T896 384q-98 0-188 35.5T548 521l137 138q31 30 14 69-17 40-59 40H192q-26 0-45-19t-19-45V256q0-42 40-59 39-17 69 14l130 129q107-101 244.5-156.5T896 128q156 0 298 61t245 164 164 245 61 298z"
466
- }), React__default.createElement("span", {
467
- className: srOnly
468
- }, label));
469
- };
470
- var Redo = function Redo(_ref19) {
471
- var label = _ref19.label,
472
- rest = _objectWithoutPropertiesLoose(_ref19, _excluded19);
473
-
474
340
  return React__default.createElement("svg", Object.assign({
475
341
  width: 14,
476
342
  height: 14,
@@ -483,36 +349,21 @@ var Redo = function Redo(_ref19) {
483
349
  };
484
350
 
485
351
  var HeadingSelector = function HeadingSelector(props) {
486
- var _useState = React.useState(false),
487
- isOpen = _useState[0],
488
- setOpen = _useState[1];
489
-
490
352
  var handleMenuClick = function handleMenuClick(heading) {
491
353
  props.onSelect(heading);
492
- setOpen(false);
493
354
  };
494
355
 
495
- return React__default.createElement(forma36ReactComponents.Dropdown, {
496
- isOpen: isOpen,
497
- onClose: function onClose() {
498
- return setOpen(false);
499
- },
500
- toggleElement: React__default.cloneElement(props.children, {
501
- onClick: function onClick() {
502
- return setOpen(!isOpen);
503
- }
504
- })
505
- }, React__default.createElement(forma36ReactComponents.DropdownList, null, React__default.createElement(forma36ReactComponents.DropdownListItem, {
356
+ return React__default.createElement(f36Components.Menu, null, React__default.createElement(f36Components.Menu.Trigger, null, props.children), React__default.createElement(f36Components.Menu.List, null, React__default.createElement(f36Components.Menu.Item, {
506
357
  testId: "markdown-action-button-heading-h1",
507
358
  onClick: function onClick() {
508
359
  return handleMenuClick('h1');
509
360
  }
510
- }, "Heading 1"), React__default.createElement(forma36ReactComponents.DropdownListItem, {
361
+ }, "Heading 1"), React__default.createElement(f36Components.Menu.Item, {
511
362
  testId: "markdown-action-button-heading-h2",
512
363
  onClick: function onClick() {
513
364
  return handleMenuClick('h2');
514
365
  }
515
- }, "Heading 2"), React__default.createElement(forma36ReactComponents.DropdownListItem, {
366
+ }, "Heading 2"), React__default.createElement(f36Components.Menu.Item, {
516
367
  testId: "markdown-action-button-heading-h3",
517
368
  onClick: function onClick() {
518
369
  return handleMenuClick('h3');
@@ -524,12 +375,12 @@ var InsertLinkSelector = function InsertLinkSelector(props) {
524
375
  if (props.canAddNew) {
525
376
  return React__default.createElement(MultipleMediaContextMenu, Object.assign({}, props));
526
377
  } else {
527
- return React__default.createElement(forma36ReactComponents.Button, {
528
- disabled: props.disabled,
529
- icon: "Asset",
378
+ return React__default.createElement(f36Components.Button, {
379
+ isDisabled: props.disabled,
380
+ startIcon: React__default.createElement(f36Icons.AssetIcon, null),
530
381
  testId: "markdownEditor.linkExistingAssets",
531
382
  size: "small",
532
- buttonType: "muted",
383
+ variant: "secondary",
533
384
  onClick: function onClick() {
534
385
  props.onSelectExisting();
535
386
  }
@@ -538,45 +389,29 @@ var InsertLinkSelector = function InsertLinkSelector(props) {
538
389
  };
539
390
 
540
391
  var MultipleMediaContextMenu = function MultipleMediaContextMenu(props) {
541
- var _useState = React.useState(false),
542
- isOpen = _useState[0],
543
- setOpen = _useState[1];
544
-
545
- var handleMenuClick = function handleMenuClick(fn) {
546
- fn();
547
- setOpen(false);
548
- };
549
-
550
- return React__default.createElement(forma36ReactComponents.Dropdown, {
551
- isOpen: isOpen,
552
- position: "bottom-right",
553
- onClose: function onClose() {
554
- return setOpen(false);
555
- },
556
- toggleElement: React__default.createElement(forma36ReactComponents.Button, {
557
- disabled: props.disabled,
558
- icon: "Asset",
559
- testId: "markdownEditor.insertMediaDropdownTrigger",
560
- size: "small",
561
- buttonType: "muted",
562
- indicateDropdown: true,
563
- onClick: function onClick() {
564
- return setOpen(!isOpen);
565
- }
566
- }, "Insert media")
567
- }, React__default.createElement(forma36ReactComponents.DropdownList, null, React__default.createElement(forma36ReactComponents.DropdownListItem, {
392
+ return React__default.createElement(f36Components.Menu, {
393
+ placement: "bottom-end"
394
+ }, React__default.createElement(f36Components.Menu.Trigger, null, React__default.createElement(f36Components.Button, {
395
+ endIcon: React__default.createElement(f36Icons.ChevronDownIcon, null),
396
+ isDisabled: props.disabled,
397
+ startIcon: React__default.createElement(f36Icons.AssetIcon, null),
398
+ testId: "markdownEditor.insertMediaDropdownTrigger",
399
+ size: "small",
400
+ variant: "secondary"
401
+ }, "Insert media")), React__default.createElement(f36Components.Menu.List, null, React__default.createElement(f36Components.Menu.Item, {
568
402
  testId: "markdownEditor.uploadAssetsAndLink",
569
403
  onClick: function onClick() {
570
- return handleMenuClick(props.onAddNew);
404
+ return props.onAddNew();
571
405
  }
572
- }, "Add new media and link"), React__default.createElement(forma36ReactComponents.DropdownListItem, {
406
+ }, "Add new media and link"), React__default.createElement(f36Components.Menu.Item, {
573
407
  testId: "markdownEditor.linkExistingAssets",
574
408
  onClick: function onClick() {
575
- return handleMenuClick(props.onSelectExisting);
409
+ return props.onSelectExisting();
576
410
  }
577
411
  }, "Link existing media")));
578
412
  };
579
413
 
414
+ var _excluded$1 = ["tooltip", "onClick", "children", "className", "variant", "tooltipPlace", "isDisabled"];
580
415
  var styles$1 = {
581
416
  root: /*#__PURE__*/emotion.css({
582
417
  position: 'relative',
@@ -586,18 +421,11 @@ var styles$1 = {
586
421
  padding: tokens.spacingXs,
587
422
  borderTopLeftRadius: tokens.borderRadiusSmall
588
423
  }),
589
- actionsRow: /*#__PURE__*/emotion.css({
590
- display: 'flex',
591
- justifyContent: 'space-between'
592
- }),
593
- additionalRow: /*#__PURE__*/emotion.css({
594
- marginTop: tokens.spacingXs
595
- }),
596
- actionsGroup: /*#__PURE__*/emotion.css({
597
- display: 'flex'
598
- }),
599
424
  button: /*#__PURE__*/emotion.css({
600
- minWidth: '46px'
425
+ height: '30px',
426
+ width: '36px',
427
+ marginLeft: tokens.spacing2Xs,
428
+ marginRight: tokens.spacing2Xs
601
429
  }),
602
430
  icon: /*#__PURE__*/emotion.css({
603
431
  fill: tokens.gray700,
@@ -613,42 +441,39 @@ var styles$1 = {
613
441
  zIndex: /*#__PURE__*/Number(tokens.zIndexTooltip)
614
442
  })
615
443
  };
616
-
617
- function ToolbarButton(props) {
444
+ var ToolbarButton = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
618
445
  var tooltip = props.tooltip,
619
- _props$onClick = props.onClick,
620
- _onClick = _props$onClick === void 0 ? noop : _props$onClick,
621
- testId = props.testId,
446
+ onClick = props.onClick,
622
447
  children = props.children,
623
448
  className = props.className,
624
- _props$buttonType = props.buttonType,
625
- buttonType = _props$buttonType === void 0 ? 'naked' : _props$buttonType,
449
+ _props$variant = props.variant,
450
+ variant = _props$variant === void 0 ? 'transparent' : _props$variant,
626
451
  _props$tooltipPlace = props.tooltipPlace,
627
452
  tooltipPlace = _props$tooltipPlace === void 0 ? 'top' : _props$tooltipPlace,
628
- _props$disabled = props.disabled,
629
- disabled = _props$disabled === void 0 ? false : _props$disabled;
453
+ _props$isDisabled = props.isDisabled,
454
+ isDisabled = _props$isDisabled === void 0 ? false : _props$isDisabled,
455
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$1);
630
456
 
631
- var button = React__default.createElement(forma36ReactComponents.Button, {
457
+ var button = React__default.createElement(f36Components.Button, Object.assign({}, otherProps, {
458
+ ref: ref,
632
459
  className: emotion.cx(styles$1.button, className),
633
- disabled: disabled,
634
- onClick: function onClick() {
635
- _onClick();
636
- },
637
- testId: testId,
638
- buttonType: buttonType,
460
+ isDisabled: isDisabled,
461
+ onClick: onClick,
462
+ variant: variant,
639
463
  size: "small"
640
- }, children);
464
+ }), children);
641
465
 
642
466
  if (tooltip) {
643
- return React__default.createElement(forma36ReactComponents.Tooltip, {
467
+ return React__default.createElement(f36Components.Tooltip, {
644
468
  className: styles$1.tooltip,
645
- place: tooltipPlace,
469
+ placement: tooltipPlace,
646
470
  content: tooltip
647
471
  }, button);
648
472
  }
649
473
 
650
474
  return button;
651
- }
475
+ });
476
+ ToolbarButton.displayName = 'ToolbarButton';
652
477
 
653
478
  function MainButtons(props) {
654
479
  var tooltipPlace = props.mode === 'zen' ? 'bottom' : 'top';
@@ -659,66 +484,66 @@ function MainButtons(props) {
659
484
  }
660
485
  }
661
486
  }, React__default.createElement(ToolbarButton, {
662
- disabled: props.disabled,
487
+ isDisabled: props.disabled,
663
488
  testId: "markdown-action-button-heading",
664
489
  tooltip: "Headings",
665
490
  tooltipPlace: tooltipPlace
666
- }, React__default.createElement(Heading, {
667
- label: "Headings",
491
+ }, React__default.createElement(f36Icons.HeadingIcon, {
492
+ "aria-label": "Headings",
668
493
  className: styles$1.icon
669
494
  }))), React__default.createElement(ToolbarButton, {
670
- disabled: props.disabled,
495
+ isDisabled: props.disabled,
671
496
  testId: "markdown-action-button-bold",
672
497
  tooltip: "Bold",
673
498
  tooltipPlace: tooltipPlace,
674
499
  onClick: props.actions.simple.bold
675
- }, React__default.createElement(Bold, {
676
- label: "Bold",
500
+ }, React__default.createElement(f36Icons.FormatBoldIcon, {
501
+ "aria-label": "Bold",
677
502
  className: styles$1.icon
678
503
  })), React__default.createElement(ToolbarButton, {
679
- disabled: props.disabled,
504
+ isDisabled: props.disabled,
680
505
  testId: "markdown-action-button-italic",
681
506
  tooltip: "Italic",
682
507
  tooltipPlace: tooltipPlace,
683
508
  onClick: props.actions.simple.italic
684
- }, React__default.createElement(Italic, {
685
- label: "Italic",
509
+ }, React__default.createElement(f36Icons.FormatItalicIcon, {
510
+ "aria-label": "Italic",
686
511
  className: styles$1.icon
687
512
  })), React__default.createElement(ToolbarButton, {
688
- disabled: props.disabled,
513
+ isDisabled: props.disabled,
689
514
  testId: "markdown-action-button-quote",
690
515
  tooltip: "Quote",
691
516
  tooltipPlace: tooltipPlace,
692
517
  onClick: props.actions.simple.quote
693
- }, React__default.createElement(Quote, {
694
- label: "Quote",
518
+ }, React__default.createElement(f36Icons.QuoteIcon, {
519
+ "aria-label": "Quote",
695
520
  className: styles$1.icon
696
521
  })), React__default.createElement(ToolbarButton, {
697
- disabled: props.disabled,
522
+ isDisabled: props.disabled,
698
523
  testId: "markdown-action-button-ul",
699
524
  tooltip: "Unordered list",
700
525
  tooltipPlace: tooltipPlace,
701
526
  onClick: props.actions.simple.ul
702
- }, React__default.createElement(List, {
703
- label: "Unordered list",
527
+ }, React__default.createElement(f36Icons.ListBulletedIcon, {
528
+ "aria-label": "Unordered list",
704
529
  className: styles$1.icon
705
530
  })), React__default.createElement(ToolbarButton, {
706
- disabled: props.disabled,
531
+ isDisabled: props.disabled,
707
532
  testId: "markdown-action-button-ol",
708
533
  tooltip: "Ordered list",
709
534
  tooltipPlace: tooltipPlace,
710
535
  onClick: props.actions.simple.ol
711
- }, React__default.createElement(ListOl, {
712
- label: "Ordered list",
536
+ }, React__default.createElement(f36Icons.ListNumberedIcon, {
537
+ "aria-label": "Ordered list",
713
538
  className: styles$1.icon
714
539
  })), React__default.createElement(ToolbarButton, {
715
- disabled: props.disabled,
540
+ isDisabled: props.disabled,
716
541
  testId: "markdown-action-button-link",
717
542
  tooltip: "Link",
718
543
  tooltipPlace: tooltipPlace,
719
544
  onClick: props.actions.insertLink
720
- }, React__default.createElement(Link, {
721
- label: "Link",
545
+ }, React__default.createElement(f36Icons.LinkIcon, {
546
+ "aria-label": "Link",
722
547
  className: styles$1.icon
723
548
  })));
724
549
  }
@@ -726,7 +551,7 @@ function MainButtons(props) {
726
551
  function AdditionalButtons(props) {
727
552
  var tooltipPlace = props.mode === 'zen' ? 'bottom' : 'top';
728
553
  return React__default.createElement(React__default.Fragment, null, React__default.createElement(ToolbarButton, {
729
- disabled: props.disabled,
554
+ isDisabled: props.disabled,
730
555
  testId: "markdown-action-button-strike",
731
556
  tooltip: "Strike out",
732
557
  tooltipPlace: tooltipPlace,
@@ -735,25 +560,25 @@ function AdditionalButtons(props) {
735
560
  label: "Strike out",
736
561
  className: styles$1.icon
737
562
  })), React__default.createElement(ToolbarButton, {
738
- disabled: props.disabled,
563
+ isDisabled: props.disabled,
739
564
  testId: "markdown-action-button-code",
740
565
  tooltip: "Code block",
741
566
  tooltipPlace: tooltipPlace,
742
567
  onClick: props.actions.simple.code
743
- }, React__default.createElement(Code, {
744
- label: "Code block",
568
+ }, React__default.createElement(f36Icons.CodeIcon, {
569
+ "aria-label": "Code block",
745
570
  className: styles$1.icon
746
571
  })), React__default.createElement(ToolbarButton, {
747
- disabled: props.disabled,
572
+ isDisabled: props.disabled,
748
573
  testId: "markdown-action-button-hr",
749
574
  tooltip: "Horizontal rule",
750
575
  tooltipPlace: tooltipPlace,
751
576
  onClick: props.actions.simple.hr
752
- }, React__default.createElement(Hr, {
753
- label: "Horizontal rule",
577
+ }, React__default.createElement(f36Icons.HorizontalRuleIcon, {
578
+ "aria-label": "Horizontal rule",
754
579
  className: styles$1.icon
755
580
  })), React__default.createElement(ToolbarButton, {
756
- disabled: props.disabled,
581
+ isDisabled: props.disabled,
757
582
  testId: "markdown-action-button-indent",
758
583
  tooltip: "Increase indentation",
759
584
  tooltipPlace: tooltipPlace,
@@ -762,7 +587,7 @@ function AdditionalButtons(props) {
762
587
  label: "Increase indentation",
763
588
  className: styles$1.icon
764
589
  })), React__default.createElement(ToolbarButton, {
765
- disabled: props.disabled,
590
+ isDisabled: props.disabled,
766
591
  testId: "markdown-action-button-dedent",
767
592
  tooltip: "Decrease indentation",
768
593
  tooltipPlace: tooltipPlace,
@@ -771,7 +596,7 @@ function AdditionalButtons(props) {
771
596
  label: "Decrease indentation",
772
597
  className: styles$1.icon
773
598
  })), React__default.createElement(ToolbarButton, {
774
- disabled: props.disabled,
599
+ isDisabled: props.disabled,
775
600
  testId: "markdown-action-button-embed",
776
601
  tooltip: "Embed external content",
777
602
  tooltipPlace: tooltipPlace,
@@ -780,7 +605,7 @@ function AdditionalButtons(props) {
780
605
  label: "Embed external content",
781
606
  className: styles$1.icon
782
607
  })), React__default.createElement(ToolbarButton, {
783
- disabled: props.disabled,
608
+ isDisabled: props.disabled,
784
609
  testId: "markdown-action-button-table",
785
610
  tooltip: "Insert table",
786
611
  tooltipPlace: tooltipPlace,
@@ -789,7 +614,7 @@ function AdditionalButtons(props) {
789
614
  label: "Insert table",
790
615
  className: styles$1.icon
791
616
  })), React__default.createElement(ToolbarButton, {
792
- disabled: props.disabled,
617
+ isDisabled: props.disabled,
793
618
  testId: "markdown-action-button-special",
794
619
  tooltip: "Insert special character",
795
620
  tooltipPlace: tooltipPlace,
@@ -798,7 +623,7 @@ function AdditionalButtons(props) {
798
623
  label: "Insert special character",
799
624
  className: styles$1.icon
800
625
  })), React__default.createElement(ToolbarButton, {
801
- disabled: props.disabled,
626
+ isDisabled: props.disabled,
802
627
  testId: "markdown-action-button-organizeLinks",
803
628
  tooltip: "Organize links",
804
629
  tooltipPlace: tooltipPlace,
@@ -807,7 +632,7 @@ function AdditionalButtons(props) {
807
632
  label: "Organize links",
808
633
  className: styles$1.icon
809
634
  })), React__default.createElement(ToolbarButton, {
810
- disabled: props.disabled,
635
+ isDisabled: props.disabled,
811
636
  testId: "markdown-action-button-undo",
812
637
  tooltip: "Undo",
813
638
  tooltipPlace: tooltipPlace,
@@ -816,7 +641,7 @@ function AdditionalButtons(props) {
816
641
  label: "Undo",
817
642
  className: styles$1.icon
818
643
  })), React__default.createElement(ToolbarButton, {
819
- disabled: props.disabled,
644
+ isDisabled: props.disabled,
820
645
  testId: "markdown-action-button-redo",
821
646
  tooltip: "Redo",
822
647
  tooltipPlace: tooltipPlace,
@@ -834,59 +659,49 @@ function DefaultMarkdownToolbar(props) {
834
659
 
835
660
  return React__default.createElement("div", {
836
661
  className: styles$1.root
837
- }, React__default.createElement("div", {
838
- className: styles$1.actionsRow
839
- }, React__default.createElement("div", {
840
- className: styles$1.actionsGroup
841
- }, React__default.createElement(MainButtons, Object.assign({}, props)), React__default.createElement(ToolbarButton, {
842
- disabled: props.disabled,
662
+ }, React__default.createElement(f36Components.Flex, {
663
+ justifyContent: "space-between"
664
+ }, React__default.createElement(f36Components.Flex, null, React__default.createElement(MainButtons, Object.assign({}, props)), React__default.createElement(ToolbarButton, {
665
+ isDisabled: props.disabled,
843
666
  testId: "markdown-action-button-toggle-additional",
844
667
  tooltip: showAdditional ? 'Hide additional actions' : 'More actions',
845
668
  onClick: function onClick() {
846
669
  setShowAdditional(!showAdditional);
847
670
  }
848
- }, React__default.createElement(forma36ReactComponents.Icon, {
849
- className: styles$1.icon,
850
- icon: "MoreHorizontal"
851
- }))), React__default.createElement("div", {
852
- className: styles$1.actionsGroup
853
- }, React__default.createElement(InsertLinkSelector, {
671
+ }, React__default.createElement(f36Icons.MoreHorizontalIcon, {
672
+ className: styles$1.icon
673
+ }))), React__default.createElement(f36Components.Flex, null, React__default.createElement(InsertLinkSelector, {
854
674
  disabled: props.disabled,
855
675
  onSelectExisting: props.actions.linkExistingMedia,
856
676
  onAddNew: props.actions.addNewMedia,
857
677
  canAddNew: props.canUploadAssets
858
678
  }), React__default.createElement(ToolbarButton, {
859
- disabled: props.disabled,
679
+ isDisabled: props.disabled,
860
680
  testId: "markdown-action-button-zen",
861
- buttonType: "muted",
681
+ variant: "secondary",
862
682
  onClick: props.actions.openZenMode,
863
683
  className: styles$1.zenButton
864
684
  }, React__default.createElement(Zen, {
865
685
  label: "Expand",
866
686
  className: styles$1.icon
867
- })))), showAdditional && React__default.createElement("div", {
868
- className: emotion.cx(styles$1.actionsRow, styles$1.additionalRow)
869
- }, React__default.createElement("div", {
870
- className: styles$1.actionsGroup
871
- }, React__default.createElement(AdditionalButtons, Object.assign({}, props)))));
687
+ })))), showAdditional && React__default.createElement(f36Components.Flex, {
688
+ justifyContent: "space-between",
689
+ marginTop: "spacingXs"
690
+ }, React__default.createElement(f36Components.Flex, null, React__default.createElement(AdditionalButtons, Object.assign({}, props)))));
872
691
  }
873
692
  function ZenMarkdownToolbar(props) {
874
693
  return React__default.createElement("div", {
875
694
  className: styles$1.root
876
- }, React__default.createElement("div", {
877
- className: styles$1.actionsRow
878
- }, React__default.createElement("div", {
879
- className: styles$1.actionsGroup
880
- }, React__default.createElement(MainButtons, Object.assign({}, props)), React__default.createElement(AdditionalButtons, Object.assign({}, props))), React__default.createElement("div", {
881
- className: styles$1.actionsGroup
882
- }, React__default.createElement(InsertLinkSelector, {
695
+ }, React__default.createElement(f36Components.Flex, {
696
+ justifyContent: "space-between"
697
+ }, React__default.createElement(f36Components.Flex, null, React__default.createElement(MainButtons, Object.assign({}, props)), React__default.createElement(AdditionalButtons, Object.assign({}, props))), React__default.createElement(f36Components.Flex, null, React__default.createElement(InsertLinkSelector, {
883
698
  disabled: props.disabled,
884
699
  onSelectExisting: props.actions.linkExistingMedia,
885
700
  onAddNew: props.actions.addNewMedia,
886
701
  canAddNew: props.canUploadAssets
887
- }), React__default.createElement(forma36ReactComponents.Button, {
702
+ }), React__default.createElement(f36Components.Button, {
888
703
  testId: "markdown-action-button-zen-close",
889
- buttonType: "muted",
704
+ variant: "secondary",
890
705
  size: "small",
891
706
  className: emotion.cx(styles$1.zenButton, styles$1.zenButtonPressed),
892
707
  onClick: function onClick() {
@@ -910,6 +725,8 @@ var userAgent = /*#__PURE__*/get(window, 'navigator.userAgent', '');
910
725
  var platform = /*#__PURE__*/get(window, 'navigator.platform', '');
911
726
  var ctrlKey = 'Ctrl';
912
727
  var tests = {
728
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
729
+ // @ts-ignore ignore missing MSStream
913
730
  ios: /*#__PURE__*/ /(iphone os|ipad|iphone|ipod)/i.test(userAgent) && !window.MSStream
914
731
  };
915
732
 
@@ -1867,9 +1684,11 @@ var styles$3 = {
1867
1684
  })
1868
1685
  };
1869
1686
  function MarkdownHelp(props) {
1870
- return React__default.createElement(forma36ReactComponents.Paragraph, {
1687
+ return React__default.createElement(f36Components.Paragraph, {
1688
+ marginBottom: "none",
1871
1689
  className: styles$3.help
1872
- }, "Format your text like a pro with the", ' ', React__default.createElement(forma36ReactComponents.TextLink, {
1690
+ }, "Format your text like a pro with the", ' ', React__default.createElement(f36Components.TextLink, {
1691
+ as: "button",
1873
1692
  testId: "open-markdown-cheatsheet-button",
1874
1693
  onClick: function onClick() {
1875
1694
  props.onClick();
@@ -1952,7 +1771,7 @@ var styles$4 = {
1952
1771
  })
1953
1772
  };
1954
1773
  var CheatsheetModalDialog = function CheatsheetModalDialog() {
1955
- return React__default.createElement(forma36ReactComponents.Modal.Content, {
1774
+ return React__default.createElement(f36Components.ModalContent, {
1956
1775
  testId: "markdown-cheatsheet-dialog-content"
1957
1776
  }, React__default.createElement("div", {
1958
1777
  className: styles$4.flexColumnContainer
@@ -1960,22 +1779,25 @@ var CheatsheetModalDialog = function CheatsheetModalDialog() {
1960
1779
  className: emotion.cx(styles$4.flexColumn, styles$4.verticalDivider)
1961
1780
  }, React__default.createElement("div", {
1962
1781
  className: styles$4.helpItem
1963
- }, React__default.createElement(forma36ReactComponents.Heading, {
1964
- element: "h1",
1782
+ }, React__default.createElement(f36Components.Heading, {
1783
+ marginBottom: "none",
1784
+ as: "h1",
1965
1785
  className: emotion.cx(styles$4.preview, styles$4.h1)
1966
1786
  }, "H1"), React__default.createElement("div", {
1967
1787
  className: styles$4.markup
1968
1788
  }, "# heading")), React__default.createElement("div", {
1969
1789
  className: styles$4.helpItem
1970
- }, React__default.createElement(forma36ReactComponents.Heading, {
1971
- element: "h2",
1790
+ }, React__default.createElement(f36Components.Heading, {
1791
+ marginBottom: "none",
1792
+ as: "h2",
1972
1793
  className: emotion.cx(styles$4.preview, styles$4.h2)
1973
1794
  }, "H2"), React__default.createElement("div", {
1974
1795
  className: styles$4.markup
1975
1796
  }, "## heading")), React__default.createElement("div", {
1976
1797
  className: styles$4.helpItem
1977
- }, React__default.createElement(forma36ReactComponents.Heading, {
1978
- element: "h3",
1798
+ }, React__default.createElement(f36Components.Heading, {
1799
+ marginBottom: "none",
1800
+ as: "h3",
1979
1801
  className: emotion.cx(styles$4.preview, styles$4.h3)
1980
1802
  }, "H3"), React__default.createElement("div", {
1981
1803
  className: styles$4.markup
@@ -1999,7 +1821,8 @@ var CheatsheetModalDialog = function CheatsheetModalDialog() {
1999
1821
  className: styles$4.markup
2000
1822
  }, "~~text~~")), React__default.createElement("div", {
2001
1823
  className: styles$4.helpItem
2002
- }, React__default.createElement(forma36ReactComponents.TextLink, {
1824
+ }, React__default.createElement(f36Components.TextLink, {
1825
+ as: "button",
2003
1826
  className: styles$4.preview
2004
1827
  }, "Link"), React__default.createElement("div", {
2005
1828
  className: styles$4.markup
@@ -2043,7 +1866,7 @@ var CheatsheetModalDialog = function CheatsheetModalDialog() {
2043
1866
  className: styles$4.markup
2044
1867
  }, "```code here```")))), React__default.createElement("div", {
2045
1868
  className: styles$4.flexRowContainer
2046
- }, React__default.createElement(forma36ReactComponents.TextLink, {
1869
+ }, React__default.createElement(f36Components.TextLink, {
2047
1870
  className: styles$4.helpLink,
2048
1871
  href: "https://help.github.com/en/github/writing-on-github/basic-writing-and-formatting-syntax",
2049
1872
  target: "_blank",
@@ -2054,7 +1877,7 @@ var openCheatsheetModal = function openCheatsheetModal(dialogs) {
2054
1877
  return dialogs.openCurrent({
2055
1878
  title: 'Markdown formatting help',
2056
1879
  width: 'large',
2057
- minHeight: '425px',
1880
+ minHeight: '415px',
2058
1881
  shouldCloseOnEscapePress: true,
2059
1882
  shouldCloseOnOverlayClick: true,
2060
1883
  parameters: {
@@ -2063,7 +1886,7 @@ var openCheatsheetModal = function openCheatsheetModal(dialogs) {
2063
1886
  });
2064
1887
  };
2065
1888
 
2066
- var _excluded$1 = ["Embedly", "children"];
1889
+ var _excluded$2 = ["Embedly", "children"];
2067
1890
 
2068
1891
  var _templateObject$1;
2069
1892
  var styles$5 = {
@@ -2086,7 +1909,7 @@ var styles$5 = {
2086
1909
  function MarkdownLink(props) {
2087
1910
  var Embedly = props.Embedly,
2088
1911
  children = props.children,
2089
- rest = _objectWithoutPropertiesLoose(props, _excluded$1);
1912
+ rest = _objectWithoutPropertiesLoose(props, _excluded$2);
2090
1913
 
2091
1914
  if (props.className === 'embedly-card' && Embedly) {
2092
1915
  return React__default.createElement(Embedly, {
@@ -2885,14 +2708,6 @@ function isValidUrl(value) {
2885
2708
  return urlRegex.test(value);
2886
2709
  }
2887
2710
 
2888
- var styles$7 = {
2889
- controlsContainer: /*#__PURE__*/emotion.css({
2890
- display: 'flex',
2891
- button: {
2892
- marginRight: tokens.spacingM
2893
- }
2894
- })
2895
- };
2896
2711
  var InsertLinkModal = function InsertLinkModal(_ref) {
2897
2712
  var selectedText = _ref.selectedText,
2898
2713
  onClose = _ref.onClose;
@@ -2926,9 +2741,9 @@ var InsertLinkModal = function InsertLinkModal(_ref) {
2926
2741
  mainInputRef.current.focus();
2927
2742
  }
2928
2743
  }, [mainInputRef]);
2929
- return React__default.createElement(forma36ReactComponents.Modal.Content, {
2744
+ return React__default.createElement(React__default.Fragment, null, React__default.createElement(f36Components.ModalContent, {
2930
2745
  testId: "insert-link-modal"
2931
- }, React__default.createElement(forma36ReactComponents.Form, {
2746
+ }, React__default.createElement(f36Components.Form, {
2932
2747
  onSubmit: function onSubmit() {
2933
2748
  return onInsert({
2934
2749
  url: url,
@@ -2936,50 +2751,47 @@ var InsertLinkModal = function InsertLinkModal(_ref) {
2936
2751
  title: title
2937
2752
  });
2938
2753
  }
2939
- }, React__default.createElement(forma36ReactComponents.TextField, {
2940
- value: text,
2941
- name: "link-text",
2754
+ }, React__default.createElement(f36Components.FormControl, {
2942
2755
  id: "link-text-field",
2943
- labelText: "Link text",
2756
+ isDisabled: Boolean(selectedText)
2757
+ }, React__default.createElement(f36Components.FormControl.Label, null, "Link text"), React__default.createElement(f36Components.TextInput, {
2758
+ name: "link-text",
2759
+ value: text,
2944
2760
  onChange: function onChange(e) {
2945
2761
  setText(e.target.value);
2946
2762
  },
2947
- textInputProps: {
2948
- disabled: Boolean(selectedText),
2949
- testId: 'link-text-field'
2950
- }
2951
- }), React__default.createElement(forma36ReactComponents.TextField, {
2952
- value: url,
2953
- name: "target-url",
2763
+ testId: "link-text-field"
2764
+ })), React__default.createElement(f36Components.FormControl, {
2954
2765
  id: "target-url-field",
2955
- labelText: "Target URL",
2956
- helpText: "Include protocol (e.g. https://)",
2766
+ isInvalid: touched && !urlIsValid
2767
+ }, React__default.createElement(f36Components.FormControl.Label, null, "Target URL"), React__default.createElement(f36Components.TextInput, {
2768
+ name: "target-url",
2769
+ value: url,
2957
2770
  onChange: function onChange(e) {
2958
2771
  setUrl(e.target.value);
2959
2772
  setTouched(true);
2960
2773
  },
2961
- validationMessage: touched && !urlIsValid ? 'Invalid URL' : '',
2962
- textInputProps: {
2963
- placeholder: 'https://',
2964
- maxLength: 2100,
2965
- testId: 'target-url-field',
2966
- inputRef: mainInputRef
2967
- }
2968
- }), React__default.createElement(forma36ReactComponents.TextField, {
2969
- value: title,
2774
+ placeholder: "https://",
2775
+ maxLength: 2100,
2776
+ testId: "target-url-field",
2777
+ ref: mainInputRef
2778
+ }), React__default.createElement(f36Components.FormControl.HelpText, null, "Include protocol (e.g. https://)"), touched && !urlIsValid && React__default.createElement(f36Components.FormControl.ValidationMessage, null, "Invalid URL")), React__default.createElement(f36Components.FormControl, {
2779
+ id: "link-title-field"
2780
+ }, React__default.createElement(f36Components.FormControl.Label, null, "Link title"), React__default.createElement(f36Components.TextInput, {
2970
2781
  name: "link-title",
2971
- id: "link-title-field",
2972
- labelText: "Link title",
2973
- helpText: "Recommended for accessibility",
2782
+ value: title,
2974
2783
  onChange: function onChange(e) {
2975
2784
  setTitle(e.target.value);
2976
2785
  },
2977
- textInputProps: {
2978
- testId: 'link-title-field'
2979
- }
2980
- })), React__default.createElement("div", {
2981
- className: styles$7.controlsContainer
2982
- }, React__default.createElement(forma36ReactComponents.Button, {
2786
+ testId: "link-title-field"
2787
+ }), React__default.createElement(f36Components.FormControl.HelpText, null, "Recommended for accessibility")))), React__default.createElement(f36Components.ModalControls, null, React__default.createElement(f36Components.Button, {
2788
+ testId: "insert-link-cancel",
2789
+ onClick: function onClick() {
2790
+ return onClose(false);
2791
+ },
2792
+ variant: "secondary",
2793
+ size: "small"
2794
+ }, "Cancel"), React__default.createElement(f36Components.Button, {
2983
2795
  testId: "insert-link-confirm",
2984
2796
  onClick: function onClick() {
2985
2797
  onInsert({
@@ -2988,21 +2800,16 @@ var InsertLinkModal = function InsertLinkModal(_ref) {
2988
2800
  title: title
2989
2801
  });
2990
2802
  },
2991
- disabled: !urlIsValid,
2992
- buttonType: "positive"
2993
- }, "Insert"), React__default.createElement(forma36ReactComponents.Button, {
2994
- testId: "insert-link-cancel",
2995
- onClick: function onClick() {
2996
- return onClose(false);
2997
- },
2998
- buttonType: "muted"
2999
- }, "Cancel")));
2803
+ isDisabled: !urlIsValid,
2804
+ variant: "positive",
2805
+ size: "small"
2806
+ }, "Insert")));
3000
2807
  };
3001
2808
  var openInsertLinkDialog = function openInsertLinkDialog(dialogs, params) {
3002
2809
  return dialogs.openCurrent({
3003
2810
  title: 'Insert link',
3004
2811
  width: 'large',
3005
- minHeight: '441px',
2812
+ minHeight: '410px',
3006
2813
  shouldCloseOnEscapePress: true,
3007
2814
  shouldCloseOnOverlayClick: true,
3008
2815
  parameters: _extends({
@@ -3175,7 +2982,7 @@ var specialCharacters = [{
3175
2982
  desc: 'diamond'
3176
2983
  }];
3177
2984
 
3178
- var styles$8 = {
2985
+ var styles$7 = {
3179
2986
  buttonPanel: /*#__PURE__*/emotion.css({
3180
2987
  display: 'flex',
3181
2988
  flexWrap: 'wrap'
@@ -3197,20 +3004,6 @@ var styles$8 = {
3197
3004
  button: /*#__PURE__*/emotion.css({
3198
3005
  marginTop: tokens.spacingM,
3199
3006
  marginRight: tokens.spacingS
3200
- }),
3201
- charContainer: /*#__PURE__*/emotion.css({
3202
- display: 'flex',
3203
- flexDirection: 'column',
3204
- justifyContent: 'center',
3205
- marginBottom: tokens.spacingM
3206
- }),
3207
- selectedCharacter: /*#__PURE__*/emotion.css({
3208
- fontSize: tokens.fontSize3Xl,
3209
- margin: 'auto'
3210
- }),
3211
- selectedCharacterDesc: /*#__PURE__*/emotion.css({
3212
- fontSize: tokens.fontSizeM,
3213
- margin: 'auto'
3214
3007
  })
3215
3008
  };
3216
3009
  var SpecialCharacterModalDialog = function SpecialCharacterModalDialog(_ref) {
@@ -3220,54 +3013,59 @@ var SpecialCharacterModalDialog = function SpecialCharacterModalDialog(_ref) {
3220
3013
  selectedCharacter = _useState[0],
3221
3014
  setSelectedCharacter = _useState[1];
3222
3015
 
3223
- return React__default.createElement(forma36ReactComponents.Modal.Content, {
3016
+ return React__default.createElement(React__default.Fragment, null, React__default.createElement(f36Components.ModalContent, {
3224
3017
  testId: "insert-special-character-modal"
3225
- }, React__default.createElement("div", {
3226
- className: styles$8.charContainer
3227
- }, React__default.createElement(forma36ReactComponents.DisplayText, {
3228
- element: "p",
3229
- className: styles$8.selectedCharacter
3230
- }, String.fromCharCode(selectedCharacter.code)), React__default.createElement(forma36ReactComponents.DisplayText, {
3231
- element: "p",
3232
- className: styles$8.selectedCharacterDesc
3018
+ }, React__default.createElement(f36Components.Flex, {
3019
+ flexDirection: "column",
3020
+ alignItems: "center"
3021
+ }, React__default.createElement(f36Components.Text, {
3022
+ as: "div",
3023
+ lineHeight: "lineHeight3Xl",
3024
+ fontSize: "fontSize3Xl",
3025
+ marginBottom: "spacingS"
3026
+ }, String.fromCharCode(selectedCharacter.code)), React__default.createElement(f36Components.Text, {
3027
+ as: "div",
3028
+ marginBottom: "spacingS"
3233
3029
  }, selectedCharacter.desc)), React__default.createElement("div", {
3234
- className: styles$8.buttonPanel
3030
+ className: styles$7.buttonPanel
3235
3031
  }, specialCharacters.map(function (_char) {
3236
3032
  return React__default.createElement("div", {
3237
3033
  key: _char.code
3238
- }, React__default.createElement(forma36ReactComponents.Tooltip, {
3239
- className: styles$8.tooltip,
3034
+ }, React__default.createElement(f36Components.Tooltip, {
3035
+ className: styles$7.tooltip,
3240
3036
  content: _char.desc
3241
- }, React__default.createElement(forma36ReactComponents.Button, {
3037
+ }, React__default.createElement(f36Components.Button, {
3242
3038
  testId: "special-character-button",
3243
3039
  isActive: _char.code === selectedCharacter.code,
3244
- className: styles$8.charButton,
3245
- buttonType: "naked",
3040
+ className: styles$7.charButton,
3041
+ variant: "transparent",
3246
3042
  onClick: function onClick() {
3247
3043
  return setSelectedCharacter(_char);
3248
3044
  }
3249
3045
  }, String.fromCharCode(_char.code))));
3250
- })), React__default.createElement(forma36ReactComponents.Button, {
3251
- className: styles$8.button,
3252
- testId: "insert-character-confirm",
3253
- onClick: function onClick() {
3254
- return onClose(String.fromCharCode(selectedCharacter.code));
3255
- },
3256
- buttonType: "positive"
3257
- }, "Insert selected"), React__default.createElement(forma36ReactComponents.Button, {
3046
+ }))), React__default.createElement(f36Components.ModalControls, null, React__default.createElement(f36Components.Button, {
3258
3047
  testId: "insert-character-cancel",
3259
- className: styles$8.button,
3048
+ className: styles$7.button,
3260
3049
  onClick: function onClick() {
3261
3050
  return onClose(false);
3262
3051
  },
3263
- buttonType: "muted"
3264
- }, "Cancel"));
3052
+ variant: "secondary",
3053
+ size: "small"
3054
+ }, "Cancel"), React__default.createElement(f36Components.Button, {
3055
+ className: styles$7.button,
3056
+ testId: "insert-character-confirm",
3057
+ onClick: function onClick() {
3058
+ return onClose(String.fromCharCode(selectedCharacter.code));
3059
+ },
3060
+ variant: "positive",
3061
+ size: "small"
3062
+ }, "Insert selected")));
3265
3063
  };
3266
3064
  var openInsertSpecialCharacter = function openInsertSpecialCharacter(dialogs) {
3267
3065
  return dialogs.openCurrent({
3268
3066
  title: 'Insert special character',
3269
3067
  width: 'large',
3270
- minHeight: '615px',
3068
+ minHeight: '600px',
3271
3069
  shouldCloseOnEscapePress: true,
3272
3070
  shouldCloseOnOverlayClick: true,
3273
3071
  parameters: {
@@ -3276,13 +3074,6 @@ var openInsertSpecialCharacter = function openInsertSpecialCharacter(dialogs) {
3276
3074
  });
3277
3075
  };
3278
3076
 
3279
- var styles$9 = {
3280
- controlButton: /*#__PURE__*/emotion.css({
3281
- button: {
3282
- marginRight: tokens.spacingM
3283
- }
3284
- })
3285
- };
3286
3077
  var InsertTableModal = function InsertTableModal(_ref) {
3287
3078
  var onClose = _ref.onClose;
3288
3079
  var mainInputRef = React.useRef(null);
@@ -3304,50 +3095,51 @@ var InsertTableModal = function InsertTableModal(_ref) {
3304
3095
  mainInputRef.current.focus();
3305
3096
  }
3306
3097
  }, [mainInputRef]);
3307
- return React__default.createElement(forma36ReactComponents.Modal.Content, {
3098
+ return React__default.createElement(React__default.Fragment, null, React__default.createElement(f36Components.ModalContent, {
3308
3099
  testId: "insert-table-modal"
3309
- }, React__default.createElement(forma36ReactComponents.Form, null, React__default.createElement(forma36ReactComponents.TextField, {
3310
- labelText: "Number of rows",
3311
- value: rows.toString(),
3100
+ }, React__default.createElement(f36Components.Form, null, React__default.createElement(f36Components.FormControl, {
3312
3101
  id: "insert-table-rows-number-field",
3102
+ isRequired: true,
3103
+ isInvalid: !rowsAreValid
3104
+ }, React__default.createElement(f36Components.FormControl.Label, null, "Number of rows"), React__default.createElement(f36Components.TextInput, {
3313
3105
  name: "rows",
3106
+ value: rows.toString(),
3314
3107
  onChange: function onChange(e) {
3315
3108
  return setRows(Number(e.target.value));
3316
3109
  },
3317
- textInputProps: {
3318
- testId: 'insert-table-rows-number-field',
3319
- min: 2,
3320
- max: 100,
3321
- pattern: '[1-9][0-9]*',
3322
- type: 'number',
3323
- width: 'small',
3324
- autoComplete: 'off',
3325
- inputRef: mainInputRef
3326
- },
3327
- validationMessage: !rowsAreValid ? 'Should be between 2 and 100' : '',
3328
- required: true
3329
- }), React__default.createElement(forma36ReactComponents.TextField, {
3330
- labelText: "Number of columns",
3331
- value: cols.toString(),
3110
+ testId: "insert-table-rows-number-field",
3111
+ min: 2,
3112
+ max: 100,
3113
+ pattern: "[1-9][0-9]*",
3114
+ type: "number",
3115
+ width: "small",
3116
+ autoComplete: "off",
3117
+ ref: mainInputRef
3118
+ }), !rowsAreValid && React__default.createElement(f36Components.FormControl.ValidationMessage, null, "Should be between 2 and 100")), React__default.createElement(f36Components.FormControl, {
3332
3119
  id: "insert-table-columns-number-field",
3120
+ isRequired: true,
3121
+ isInvalid: !colsAreValid
3122
+ }, React__default.createElement(f36Components.FormControl.Label, null, "Number of columns"), React__default.createElement(f36Components.TextInput, {
3333
3123
  name: "columns",
3124
+ value: cols.toString(),
3334
3125
  onChange: function onChange(e) {
3335
3126
  return setColumns(Number(e.target.value));
3336
3127
  },
3337
- textInputProps: {
3338
- testId: 'insert-table-columns-number-field',
3339
- min: 1,
3340
- max: 100,
3341
- pattern: '[1-9][0-9]*',
3342
- type: 'number',
3343
- width: 'small',
3344
- autoComplete: 'off'
3128
+ testId: "insert-table-columns-number-field",
3129
+ min: 1,
3130
+ max: 100,
3131
+ pattern: "[1-9][0-9]*",
3132
+ type: "number",
3133
+ width: "small",
3134
+ autoComplete: "off"
3135
+ }), !colsAreValid && React__default.createElement(f36Components.FormControl.ValidationMessage, null, "Should be between 1 and 100")))), React__default.createElement(f36Components.ModalControls, null, React__default.createElement(f36Components.Button, {
3136
+ testId: "insert-table-cancel",
3137
+ onClick: function onClick() {
3138
+ return onClose(false);
3345
3139
  },
3346
- validationMessage: !colsAreValid ? 'Should be between 1 and 100' : '',
3347
- required: true
3348
- })), React__default.createElement("div", {
3349
- className: styles$9.controlButton
3350
- }, React__default.createElement(forma36ReactComponents.Button, {
3140
+ variant: "secondary",
3141
+ size: "small"
3142
+ }, "Cancel"), React__default.createElement(f36Components.Button, {
3351
3143
  testId: "insert-table-confirm",
3352
3144
  onClick: function onClick() {
3353
3145
  return onClose({
@@ -3355,21 +3147,16 @@ var InsertTableModal = function InsertTableModal(_ref) {
3355
3147
  cols: cols
3356
3148
  });
3357
3149
  },
3358
- buttonType: "positive",
3359
- disabled: !rowsAreValid || !colsAreValid
3360
- }, "Insert"), React__default.createElement(forma36ReactComponents.Button, {
3361
- testId: "insert-table-cancel",
3362
- onClick: function onClick() {
3363
- return onClose(false);
3364
- },
3365
- buttonType: "muted"
3366
- }, "Cancel")));
3150
+ variant: "positive",
3151
+ size: "small",
3152
+ isDisabled: !rowsAreValid || !colsAreValid
3153
+ }, "Insert")));
3367
3154
  };
3368
3155
  var openInsertTableDialog = function openInsertTableDialog(dialogs) {
3369
3156
  return dialogs.openCurrent({
3370
3157
  title: 'Insert table',
3371
3158
  width: 'medium',
3372
- minHeight: '290px',
3159
+ minHeight: '260px',
3373
3160
  shouldCloseOnEscapePress: true,
3374
3161
  shouldCloseOnOverlayClick: true,
3375
3162
  parameters: {
@@ -3378,7 +3165,7 @@ var openInsertTableDialog = function openInsertTableDialog(dialogs) {
3378
3165
  });
3379
3166
  };
3380
3167
 
3381
- var styles$a = {
3168
+ var styles$8 = {
3382
3169
  widthFiledGroup: /*#__PURE__*/emotion.css({
3383
3170
  display: 'flex',
3384
3171
  flexWrap: 'nowrap',
@@ -3391,12 +3178,6 @@ var styles$a = {
3391
3178
  }),
3392
3179
  radioButton: /*#__PURE__*/emotion.css({
3393
3180
  marginLeft: tokens.spacingM
3394
- }),
3395
- controlsContainer: /*#__PURE__*/emotion.css({
3396
- display: 'flex',
3397
- button: {
3398
- marginRight: tokens.spacingM
3399
- }
3400
3181
  })
3401
3182
  };
3402
3183
 
@@ -3447,87 +3228,85 @@ var EmbedExternalContentModal = function EmbedExternalContentModal(_ref2) {
3447
3228
  mainInputRef.current.focus();
3448
3229
  }
3449
3230
  }, [mainInputRef]);
3450
- return React__default.createElement(forma36ReactComponents.Modal.Content, {
3231
+ return React__default.createElement(React__default.Fragment, null, React__default.createElement(f36Components.ModalContent, {
3451
3232
  testId: "embed-external-dialog"
3452
- }, React__default.createElement(forma36ReactComponents.Form, null, React__default.createElement(forma36ReactComponents.TextField, {
3453
- value: url,
3233
+ }, React__default.createElement(f36Components.Form, null, React__default.createElement(f36Components.FormControl, {
3234
+ id: "external-link-url-field",
3235
+ isRequired: true,
3236
+ isInvalid: !urlIsValid
3237
+ }, React__default.createElement(f36Components.FormControl.Label, null, "Content URL"), React__default.createElement(f36Components.TextInput, {
3454
3238
  name: "external-link-url",
3239
+ value: url,
3455
3240
  onChange: function onChange(e) {
3456
3241
  var value = e.target.value;
3457
3242
  setUrl(value);
3458
3243
  setUrlValidity(isValidUrl(value));
3459
3244
  },
3460
- labelText: "Content URL",
3461
- id: "external-link-url-field",
3462
- helpText: "Include protocol (e.g. https://)",
3463
- textInputProps: {
3464
- testId: 'external-link-url-field',
3465
- placeholder: 'https://example.com',
3466
- inputRef: mainInputRef
3467
- },
3468
- required: true,
3469
- validationMessage: urlIsValid ? '' : 'URL is invalid'
3470
- }), React__default.createElement(forma36ReactComponents.TextLink, {
3245
+ testId: "external-link-url-field",
3246
+ placeholder: "https://example.com",
3247
+ ref: mainInputRef
3248
+ }), React__default.createElement(f36Components.FormControl.HelpText, null, "Include protocol (e.g. https://)"), !urlIsValid && React__default.createElement(f36Components.FormControl.ValidationMessage, null, "URL is invalid")), React__default.createElement(f36Components.TextLink, {
3471
3249
  href: "http://embed.ly/providers",
3472
3250
  target: "_blank",
3473
3251
  rel: "noopener noreferrer"
3474
3252
  }, "Supported sources"), React__default.createElement("div", {
3475
- className: styles$a.widthFiledGroup
3476
- }, React__default.createElement(forma36ReactComponents.TextField, {
3477
- value: width,
3253
+ className: styles$8.widthFiledGroup
3254
+ }, React__default.createElement(f36Components.FormControl, {
3478
3255
  id: "embedded-content-width",
3256
+ isRequired: true,
3257
+ isInvalid: !isWidthValid(Number(width), selectedUnit)
3258
+ }, React__default.createElement(f36Components.FormControl.Label, null, "Width"), React__default.createElement(f36Components.TextInput, {
3259
+ value: width,
3479
3260
  name: "embedded-content-width",
3261
+ testId: "embedded-content-width",
3262
+ type: "number",
3263
+ width: "small",
3480
3264
  onChange: function onChange(e) {
3481
3265
  return setWidth(e.target.value);
3482
- },
3483
- labelText: "Width",
3484
- textInputProps: {
3485
- testId: 'embedded-content-width',
3486
- type: 'number',
3487
- width: 'small'
3488
- },
3489
- required: true,
3490
- validationMessage: isWidthValid(Number(width), selectedUnit) ? '' : 'Should be equal or less then 100'
3491
- }), React__default.createElement("div", {
3492
- className: styles$a.radioButtonGroup
3493
- }, React__default.createElement(forma36ReactComponents.RadioButtonField, {
3494
- className: styles$a.radioButton,
3266
+ }
3267
+ }), !isWidthValid(Number(width), selectedUnit) && React__default.createElement(f36Components.FormControl.ValidationMessage, null, "Should be equal or less then 100")), React__default.createElement("div", {
3268
+ className: styles$8.radioButtonGroup
3269
+ }, React__default.createElement(f36Components.Radio, {
3495
3270
  id: "unit-option-percent",
3496
- checked: selectedUnit === 'percent',
3497
- labelText: "percent",
3498
3271
  value: "percent",
3272
+ isChecked: selectedUnit === 'percent',
3499
3273
  onChange: function onChange() {
3500
3274
  return setUnit('percent');
3501
3275
  },
3502
- labelIsLight: true
3503
- }), React__default.createElement(forma36ReactComponents.RadioButtonField, {
3504
- className: styles$a.radioButton,
3276
+ className: styles$8.radioButton
3277
+ }, "percent"), React__default.createElement(f36Components.Radio, {
3505
3278
  id: "unit-option-pixels",
3506
- checked: selectedUnit === 'px',
3507
- labelText: "pixels",
3508
3279
  value: "pixels",
3280
+ isChecked: selectedUnit === 'px',
3509
3281
  onChange: function onChange() {
3510
3282
  return setUnit('px');
3511
3283
  },
3512
- labelIsLight: true
3513
- }))), React__default.createElement(forma36ReactComponents.CheckboxField, {
3514
- value: "Yes",
3515
- testId: "attach-social-checkbox",
3284
+ className: styles$8.radioButton
3285
+ }, "pixels"))), React__default.createElement(f36Components.Checkbox, {
3516
3286
  id: "attach-social-checkbox",
3517
3287
  name: "attach-social-checkbox",
3518
- checked: attachSocial,
3288
+ value: "Yes",
3289
+ isChecked: attachSocial,
3519
3290
  onChange: function onChange() {
3520
3291
  return setAttachSocial(!attachSocial);
3521
3292
  },
3522
- labelText: "Attach social sharing links to this element",
3523
- labelIsLight: true
3524
- }), React__default.createElement(forma36ReactComponents.HelpText, null, "To enable this embedded content in your application make sure to add the\xA0", React__default.createElement(forma36ReactComponents.TextLink, {
3293
+ testId: "attach-social-checkbox"
3294
+ }, "Attach social sharing links to this element"), React__default.createElement(f36Components.Text, {
3295
+ as: "p",
3296
+ fontColor: "gray500",
3297
+ marginTop: "spacingXs"
3298
+ }, "To enable this embedded content in your application make sure to add the\xA0", React__default.createElement(f36Components.TextLink, {
3525
3299
  href: "http://embed.ly/docs/products/cards",
3526
3300
  target: "_blank",
3527
3301
  rel: "noopener noreferrer"
3528
- }, "Embedly's platform.js"), "\xA0on your development environment")), React__default.createElement("div", {
3529
- className: styles$a.controlsContainer
3530
- }, React__default.createElement(forma36ReactComponents.Button, {
3302
+ }, "Embedly's platform.js"), "\xA0on your development environment"))), React__default.createElement(f36Components.ModalControls, null, React__default.createElement(f36Components.Button, {
3303
+ testId: "emded-external-cancel",
3304
+ onClick: function onClick() {
3305
+ return onClose(false);
3306
+ },
3307
+ variant: "secondary",
3308
+ size: "small"
3309
+ }, "Cancel"), React__default.createElement(f36Components.Button, {
3531
3310
  testId: "embed-external-confirm",
3532
3311
  onClick: function onClick() {
3533
3312
  return onClose(makeEmbedlyLink({
@@ -3537,20 +3316,15 @@ var EmbedExternalContentModal = function EmbedExternalContentModal(_ref2) {
3537
3316
  attachSocial: attachSocial
3538
3317
  }));
3539
3318
  },
3540
- buttonType: "positive"
3541
- }, "Insert"), React__default.createElement(forma36ReactComponents.Button, {
3542
- testId: "emded-external-cancel",
3543
- onClick: function onClick() {
3544
- return onClose(false);
3545
- },
3546
- buttonType: "muted"
3547
- }, "Cancel")));
3319
+ variant: "positive",
3320
+ size: "small"
3321
+ }, "Insert")));
3548
3322
  };
3549
3323
  var openEmbedExternalContentDialog = function openEmbedExternalContentDialog(dialogs) {
3550
3324
  return dialogs.openCurrent({
3551
3325
  title: 'Embed external content',
3552
3326
  width: 'large',
3553
- minHeight: '475px',
3327
+ minHeight: '435px',
3554
3328
  shouldCloseOnEscapePress: true,
3555
3329
  shouldCloseOnOverlayClick: true,
3556
3330
  parameters: {
@@ -3559,53 +3333,45 @@ var openEmbedExternalContentDialog = function openEmbedExternalContentDialog(dia
3559
3333
  });
3560
3334
  };
3561
3335
 
3562
- var styles$b = {
3563
- controlButton: /*#__PURE__*/emotion.css({
3564
- marginTop: tokens.spacingL,
3565
- button: {
3566
- marginRight: tokens.spacingM
3567
- }
3568
- })
3569
- };
3570
3336
  var ConfirmInsertAssetModalDialog = function ConfirmInsertAssetModalDialog(_ref) {
3571
3337
  var onClose = _ref.onClose,
3572
3338
  assets = _ref.assets,
3573
3339
  locale = _ref.locale;
3574
3340
  var localesNumber = assets.length;
3575
- return React__default.createElement(forma36ReactComponents.Modal.Content, {
3341
+ return React__default.createElement(React__default.Fragment, null, React__default.createElement(f36Components.ModalContent, {
3576
3342
  testId: "confirm-insert-asset"
3577
- }, React__default.createElement(forma36ReactComponents.Typography, null, React__default.createElement(forma36ReactComponents.Paragraph, null, localesNumber === 1 ? "Link asset with missing file for locale " + locale : "Link assets with missing files for locale " + locale), React__default.createElement(forma36ReactComponents.Paragraph, null, localesNumber === 1 ? 'Do you want to link to the file in its fallback locale?' : 'Do you want to link to the files in their fallback locales?')), React__default.createElement(forma36ReactComponents.EntityList, null, assets.map(function (_ref2) {
3343
+ }, React__default.createElement(f36Components.Paragraph, null, localesNumber === 1 ? "Link asset with missing file for locale " + locale : "Link assets with missing files for locale " + locale), React__default.createElement(f36Components.Paragraph, null, localesNumber === 1 ? 'Do you want to link to the file in its fallback locale?' : 'Do you want to link to the files in their fallback locales?'), React__default.createElement(f36Components.EntityList, null, assets.map(function (_ref2) {
3578
3344
  var title = _ref2.title,
3579
3345
  description = _ref2.description,
3580
3346
  thumbnailUrl = _ref2.thumbnailUrl,
3581
3347
  thumbnailAltText = _ref2.thumbnailAltText;
3582
- return React__default.createElement(forma36ReactComponents.EntityListItem, {
3348
+ return React__default.createElement(f36Components.EntityList.Item, {
3583
3349
  key: thumbnailUrl,
3584
3350
  title: title,
3585
3351
  thumbnailUrl: thumbnailUrl + "?w=46&h=46&fit=thumb",
3586
3352
  thumbnailAltText: thumbnailAltText,
3587
3353
  description: description
3588
3354
  });
3589
- })), React__default.createElement("div", {
3590
- className: styles$b.controlButton
3591
- }, React__default.createElement(forma36ReactComponents.Button, {
3592
- testId: "confirm-insert-asset",
3355
+ }))), React__default.createElement(f36Components.ModalControls, null, React__default.createElement(f36Components.Button, {
3593
3356
  onClick: function onClick() {
3594
- return onClose(true);
3357
+ return onClose(false);
3595
3358
  },
3596
- buttonType: "positive"
3597
- }, "Confirm"), React__default.createElement(forma36ReactComponents.Button, {
3359
+ variant: "secondary",
3360
+ size: "small"
3361
+ }, "Cancel"), React__default.createElement(f36Components.Button, {
3362
+ testId: "confirm-insert-asset",
3598
3363
  onClick: function onClick() {
3599
- return onClose(false);
3364
+ return onClose(true);
3600
3365
  },
3601
- buttonType: "muted"
3602
- }, "Cancel")));
3366
+ variant: "positive",
3367
+ size: "small"
3368
+ }, "Confirm")));
3603
3369
  };
3604
3370
  var openConfirmInsertAsset = function openConfirmInsertAsset(dialogs, options) {
3605
3371
  return dialogs.openCurrent({
3606
3372
  title: 'Confirm using fallback assets',
3607
3373
  width: 'medium',
3608
- minHeight: '290px',
3374
+ minHeight: '270px',
3609
3375
  shouldCloseOnEscapePress: true,
3610
3376
  shouldCloseOnOverlayClick: true,
3611
3377
  parameters: _extends({
@@ -3614,7 +3380,7 @@ var openConfirmInsertAsset = function openConfirmInsertAsset(dialogs, options) {
3614
3380
  });
3615
3381
  };
3616
3382
 
3617
- var styles$c = {
3383
+ var styles$9 = {
3618
3384
  root: /*#__PURE__*/emotion.css({
3619
3385
  position: 'fixed',
3620
3386
  left: 0,
@@ -3733,17 +3499,17 @@ var ZenModeModalDialog = function ZenModeModalDialog(props) {
3733
3499
 
3734
3500
  var direction = (_props$sdk$locales$di = props.sdk.locales.direction[props.locale]) != null ? _props$sdk$locales$di : 'ltr';
3735
3501
  return React__default.createElement("div", {
3736
- className: styles$c.root,
3502
+ className: styles$9.root,
3737
3503
  "data-test-id": "zen-mode-markdown-editor"
3738
3504
  }, React__default.createElement("div", {
3739
- className: styles$c.topSplit
3505
+ className: styles$9.topSplit
3740
3506
  }, React__default.createElement(MarkdownToolbar, {
3741
3507
  mode: "zen",
3742
3508
  disabled: false,
3743
3509
  canUploadAssets: false,
3744
3510
  actions: actions
3745
3511
  })), React__default.createElement("div", {
3746
- className: emotion.cx(styles$c.editorSplit, (_cx = {}, _cx[styles$c.editorSplitFullscreen] = showPreview === false, _cx))
3512
+ className: emotion.cx(styles$9.editorSplit, (_cx = {}, _cx[styles$9.editorSplitFullscreen] = showPreview === false, _cx))
3747
3513
  }, React__default.createElement(MarkdownTextarea, {
3748
3514
  mode: "zen",
3749
3515
  visible: true,
@@ -3762,38 +3528,36 @@ var ZenModeModalDialog = function ZenModeModalDialog(props) {
3762
3528
  });
3763
3529
  }
3764
3530
  })), showPreview && React__default.createElement("div", {
3765
- className: styles$c.previewSplit
3531
+ className: styles$9.previewSplit
3766
3532
  }, React__default.createElement(MarkdownPreview, {
3767
3533
  direction: direction,
3768
3534
  mode: "zen",
3769
3535
  value: currentValue,
3770
3536
  previewComponents: props.previewComponents
3771
3537
  })), showPreview && React__default.createElement("div", {
3772
- className: styles$c.separator
3538
+ className: styles$9.separator
3773
3539
  }), showPreview && React__default.createElement("button", {
3774
- className: emotion.cx(styles$c.button, styles$c.hideButton),
3540
+ className: emotion.cx(styles$9.button, styles$9.hideButton),
3775
3541
  "aria-label": "Hide preview",
3776
3542
  onClick: function onClick() {
3777
3543
  setShowPreview(false);
3778
3544
  }
3779
- }, React__default.createElement(forma36ReactComponents.Icon, {
3780
- icon: "ChevronRight",
3781
- color: "muted",
3545
+ }, React__default.createElement(f36Icons.ChevronRightIcon, {
3546
+ variant: "muted",
3782
3547
  size: "tiny",
3783
- className: styles$c.icon
3548
+ className: styles$9.icon
3784
3549
  })), !showPreview && React__default.createElement("button", {
3785
- className: emotion.cx(styles$c.button, styles$c.showButton),
3550
+ className: emotion.cx(styles$9.button, styles$9.showButton),
3786
3551
  "aria-label": "Show preview",
3787
3552
  onClick: function onClick() {
3788
3553
  setShowPreview(true);
3789
3554
  }
3790
- }, React__default.createElement(forma36ReactComponents.Icon, {
3791
- icon: "ChevronLeft",
3792
- color: "muted",
3555
+ }, React__default.createElement(f36Icons.ChevronLeftIcon, {
3556
+ variant: "muted",
3793
3557
  size: "tiny",
3794
- className: styles$c.icon
3558
+ className: styles$9.icon
3795
3559
  })), React__default.createElement("div", {
3796
- className: styles$c.bottomSplit
3560
+ className: styles$9.bottomSplit
3797
3561
  }, React__default.createElement(MarkdownBottomBar, null, React__default.createElement(MarkdownHelp, {
3798
3562
  onClick: function onClick() {
3799
3563
  openCheatsheetModal(props.sdk.dialogs);
@@ -3841,10 +3605,17 @@ function makeAssetLink(asset, _ref) {
3841
3605
 
3842
3606
  if (isObject(file) && file.url) {
3843
3607
  var title = get(asset, ['fields', 'title', localeCode]) || get(asset, ['fields', 'title', fallbackCode || '']) || get(asset, ['fields', 'title', defaultLocaleCode]) || fileNameToTitle(file.fileName);
3608
+ var assetDomainMap = {
3609
+ images: 'images.ctfassets.net',
3610
+ assets: 'assets.ctfassets.net',
3611
+ downloads: 'downloads.ctfassets.net',
3612
+ videos: 'videos.ctfassets.net'
3613
+ };
3614
+ var fileUrl = hostnameTransformer.toExternal(file.url, assetDomainMap);
3844
3615
  return {
3845
3616
  title: title,
3846
3617
  asset: asset,
3847
- url: file.url,
3618
+ url: fileUrl,
3848
3619
  // is normally localized and we should not warn about this file
3849
3620
  isLocalized: Boolean(localizedFile),
3850
3621
  // was fallback value used
@@ -3852,7 +3623,7 @@ function makeAssetLink(asset, _ref) {
3852
3623
  // it means we used a default locale - we filter empty values
3853
3624
  isFallback: Boolean(fallbackFile),
3854
3625
  // todo: tranform using fromHostname
3855
- asMarkdown: "![" + title + "](" + file.url + ")"
3626
+ asMarkdown: "![" + title + "](" + fileUrl + ")"
3856
3627
  };
3857
3628
  } else {
3858
3629
  return null;
@@ -4575,7 +4346,7 @@ function createMarkdownActions(props) {
4575
4346
  };
4576
4347
  }
4577
4348
 
4578
- var styles$d = {
4349
+ var styles$a = {
4579
4350
  container: /*#__PURE__*/emotion.css({
4580
4351
  display: 'flex',
4581
4352
  flexDirection: 'column',
@@ -4633,7 +4404,7 @@ function MarkdownEditor(props) {
4633
4404
  openCheatsheetModal(props.sdk.dialogs);
4634
4405
  }, []);
4635
4406
  return React__default.createElement("div", {
4636
- className: styles$d.container,
4407
+ className: styles$a.container,
4637
4408
  "data-test-id": "markdown-editor"
4638
4409
  }, React__default.createElement(MarkdownTabs, {
4639
4410
  active: selectedTab,