@patternfly/react-code-editor 6.0.0-alpha.3 → 6.0.0-alpha.30

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.
@@ -1,9 +1,9 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`CodeEditor matches snapshot with all props 1`] = `
3
+ exports[`Matches snapshot with control buttons enabled 1`] = `
4
4
  <DocumentFragment>
5
5
  <div
6
- class="pf-v5-c-code-editor pf-m-read-only"
6
+ class="pf-v5-c-code-editor"
7
7
  >
8
8
  <div
9
9
  class="pf-v5-c-file-upload false false"
@@ -101,32 +101,6 @@ exports[`CodeEditor matches snapshot with all props 1`] = `
101
101
  <div
102
102
  class="pf-v5-c-code-editor__header-main"
103
103
  />
104
- <div
105
- class="pf-v5-c-code-editor__tab"
106
- >
107
- <span
108
- class="pf-v5-c-code-editor__tab-icon"
109
- >
110
- <svg
111
- aria-hidden="true"
112
- class="pf-v5-svg"
113
- fill="currentColor"
114
- height="1em"
115
- role="img"
116
- viewBox="0 0 640 512"
117
- width="1em"
118
- >
119
- <path
120
- d="M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"
121
- />
122
- </svg>
123
- </span>
124
- <span
125
- class="pf-v5-c-code-editor__tab-text"
126
- >
127
- JAVASCRIPT
128
- </span>
129
- </div>
130
104
  </div>
131
105
  <div
132
106
  class="pf-v5-c-code-editor__main"
@@ -142,214 +116,8 @@ exports[`CodeEditor matches snapshot with all props 1`] = `
142
116
  tabindex="0"
143
117
  >
144
118
  <div
145
- class="react-monaco-editor-container"
146
- data-keybinding-context="2"
147
- data-mode-id="plaintext"
148
- style="height: 400px;"
149
- >
150
- <div
151
- class="monaco-editor showUnused showDeprecated vs-dark"
152
- data-uri="inmemory://model/2"
153
- style="width: 5px; height: 5px;"
154
- >
155
- <div
156
- class="overflow-guard"
157
- data-mprt="3"
158
- style="width: 5px; height: 5px;"
159
- >
160
- <div
161
- aria-hidden="true"
162
- class="margin"
163
- role="presentation"
164
- style="position: absolute;"
165
- >
166
- <div
167
- class="glyph-margin"
168
- />
169
- <div
170
- aria-hidden="true"
171
- class="margin-view-zones"
172
- role="presentation"
173
- style="position: absolute;"
174
- />
175
- <div
176
- aria-hidden="true"
177
- class="margin-view-overlays"
178
- role="presentation"
179
- style="position: absolute; width: 1px; font-family: Consolas, 'Courier New', monospace; font-weight: normal; font-size: 14px; font-feature-settings: \\"liga\\" off, \\"calt\\" off; line-height: 19px; letter-spacing: 0px;"
180
- />
181
- </div>
182
- <div
183
- class="monaco-scrollable-element editor-scrollable vs-dark"
184
- data-mprt="5"
185
- role="presentation"
186
- style="position: absolute; overflow: hidden; left: 26px; width: -21px; height: 5px;"
187
- >
188
- <div
189
- class="lines-content monaco-editor-background"
190
- style="position: absolute; overflow: hidden; width: 1000000px; height: 1000000px; transform: translate3d(0px, 0px, 0px); contain: strict; top: 0px; left: 0px;"
191
- >
192
- <div
193
- aria-hidden="true"
194
- class="view-overlays"
195
- role="presentation"
196
- style="position: absolute; height: 0px;"
197
- />
198
- <div
199
- aria-hidden="true"
200
- class="view-rulers"
201
- role="presentation"
202
- />
203
- <div
204
- aria-hidden="true"
205
- class="blockDecorations-container"
206
- role="presentation"
207
- />
208
- <div
209
- aria-hidden="true"
210
- class="view-zones"
211
- role="presentation"
212
- style="position: absolute;"
213
- />
214
- <div
215
- aria-hidden="true"
216
- class="view-lines monaco-mouse-cursor-text"
217
- data-mprt="7"
218
- role="presentation"
219
- style="position: absolute; font-family: Consolas, 'Courier New', monospace; font-weight: normal; font-size: 14px; font-feature-settings: \\"liga\\" off, \\"calt\\" off; line-height: 19px; letter-spacing: 0px; width: 54px; height: 19px;"
220
- >
221
- <div
222
- class="view-line"
223
- style="top:0px;height:19px;"
224
- >
225
- <span>
226
- <span
227
- class="mtk1"
228
- >
229
- test
230
- </span>
231
- </span>
232
- </div>
233
- </div>
234
- <div
235
- class="contentWidgets"
236
- data-mprt="1"
237
- style="position: absolute; top: 0px;"
238
- />
239
- <div
240
- aria-hidden="true"
241
- class="cursors-layer cursor-line-style cursor-solid"
242
- role="presentation"
243
- >
244
- <div
245
- class="cursor monaco-mouse-cursor-text"
246
- style="height: 19px; top: 0px; left: 0px; font-family: Consolas, 'Courier New', monospace; font-weight: normal; font-size: 14px; font-feature-settings: \\"liga\\" off, \\"calt\\" off; line-height: 19px; letter-spacing: 0px; display: none; visibility: hidden;"
247
- />
248
- </div>
249
- </div>
250
- <div
251
- aria-hidden="true"
252
- class="invisible scrollbar horizontal"
253
- role="presentation"
254
- style="position: absolute; width: 0px; height: 12px; left: 0px; bottom: 0px;"
255
- >
256
- <div
257
- class="slider"
258
- style="position: absolute; top: 0px; left: 0px; height: 12px; transform: translate3d(0px, 0px, 0px); contain: strict; width: 20px;"
259
- />
260
- </div>
261
- <canvas
262
- aria-hidden="true"
263
- class="decorationsOverviewRuler"
264
- height="5"
265
- style="position: absolute; transform: translate3d(0px, 0px, 0px); contain: strict; top: 0px; right: 0px; width: 14px; height: 5px; display: block;"
266
- width="14"
267
- />
268
- <div
269
- aria-hidden="true"
270
- class="invisible scrollbar vertical"
271
- role="presentation"
272
- style="position: absolute; width: 14px; height: 5px; right: 0px; top: 0px;"
273
- >
274
- <div
275
- class="slider"
276
- style="position: absolute; top: 0px; left: 0px; width: 14px; transform: translate3d(0px, 0px, 0px); contain: strict; height: 20px;"
277
- />
278
- </div>
279
- </div>
280
- <div
281
- aria-hidden="true"
282
- role="presentation"
283
- />
284
- <textarea
285
- aria-autocomplete="both"
286
- aria-haspopup="false"
287
- aria-label="Editor content;Press Alt+F1 for Accessibility Options."
288
- aria-multiline="true"
289
- aria-roledescription="editor"
290
- autocapitalize="off"
291
- autocomplete="off"
292
- autocorrect="off"
293
- class="inputarea monaco-mouse-cursor-text"
294
- data-mprt="6"
295
- role="textbox"
296
- spellcheck="false"
297
- style="font-family: Consolas, 'Courier New', monospace; font-weight: normal; font-size: 14px; font-feature-settings: \\"liga\\" off, \\"calt\\" off; line-height: 19px; letter-spacing: 0px; top: 0px; left: 0px; width: 1px; height: 1px;"
298
- tabindex="-1"
299
- wrap="off"
300
- />
301
- <div
302
- class="monaco-editor-background textAreaCover"
303
- style="position: absolute; top: 0px; left: 0px; width: 1px; height: 1px;"
304
- />
305
- <div
306
- class="overlayWidgets"
307
- data-mprt="4"
308
- >
309
- <div
310
- style="position: absolute;"
311
- widgetid="editor.contrib.quickInputWidget"
312
- />
313
- </div>
314
- <div
315
- aria-hidden="true"
316
- class="minimap slider-mouseover"
317
- data-mprt="8"
318
- role="presentation"
319
- style="position: absolute; left: 0px; width: 0px; height: 5px;"
320
- >
321
- <div
322
- class="minimap-shadow-hidden"
323
- style="height: 5px;"
324
- />
325
- <canvas
326
- height="5"
327
- style="position: absolute; left: 0px; width: 0px; height: 5px;"
328
- width="0"
329
- />
330
- <canvas
331
- class="minimap-decorations-layer"
332
- height="5"
333
- style="position: absolute; left: 0px; width: 0px; height: 5px;"
334
- width="0"
335
- />
336
- <div
337
- class="minimap-slider"
338
- style="position: absolute; transform: translate3d(0px, 0px, 0px); contain: strict; width: 0px;"
339
- >
340
- <div
341
- class="minimap-slider-horizontal"
342
- style="position: absolute;"
343
- />
344
- </div>
345
- </div>
346
- </div>
347
- <div
348
- class="overflowingContentWidgets"
349
- data-mprt="2"
350
- />
351
- </div>
352
- </div>
119
+ data-testid="mock-editor"
120
+ />
353
121
  </div>
354
122
  </div>
355
123
  </div>
@@ -357,7 +125,7 @@ exports[`CodeEditor matches snapshot with all props 1`] = `
357
125
  </DocumentFragment>
358
126
  `;
359
127
 
360
- exports[`CodeEditor matches snapshot without props 1`] = `
128
+ exports[`Matches snapshot without props 1`] = `
361
129
  <DocumentFragment>
362
130
  <div
363
131
  class="pf-v5-c-code-editor"
@@ -381,209 +149,8 @@ exports[`CodeEditor matches snapshot without props 1`] = `
381
149
  tabindex="0"
382
150
  >
383
151
  <div
384
- class="react-monaco-editor-container"
385
- data-keybinding-context="1"
386
- data-mode-id="plaintext"
387
- >
388
- <div
389
- class="monaco-editor showUnused showDeprecated vs"
390
- data-uri="inmemory://model/1"
391
- style="width: 5px; height: 5px;"
392
- >
393
- <div
394
- class="overflow-guard"
395
- data-mprt="3"
396
- style="width: 5px; height: 5px;"
397
- >
398
- <div
399
- aria-hidden="true"
400
- class="margin"
401
- role="presentation"
402
- style="position: absolute;"
403
- >
404
- <div
405
- class="glyph-margin"
406
- />
407
- <div
408
- aria-hidden="true"
409
- class="margin-view-zones"
410
- role="presentation"
411
- style="position: absolute;"
412
- />
413
- <div
414
- aria-hidden="true"
415
- class="margin-view-overlays"
416
- role="presentation"
417
- style="position: absolute; width: 1px; font-family: Consolas, 'Courier New', monospace; font-weight: normal; font-size: 14px; font-feature-settings: \\"liga\\" off, \\"calt\\" off; line-height: 19px; letter-spacing: 0px;"
418
- />
419
- </div>
420
- <div
421
- class="monaco-scrollable-element editor-scrollable vs"
422
- data-mprt="5"
423
- role="presentation"
424
- style="position: absolute; overflow: hidden; left: 51px; width: -46px; height: 5px;"
425
- >
426
- <div
427
- class="lines-content monaco-editor-background"
428
- style="position: absolute; overflow: hidden; width: 1000000px; height: 1000000px; transform: translate3d(0px, 0px, 0px); contain: strict; top: 0px; left: 0px;"
429
- >
430
- <div
431
- aria-hidden="true"
432
- class="view-overlays"
433
- role="presentation"
434
- style="position: absolute; height: 0px;"
435
- />
436
- <div
437
- aria-hidden="true"
438
- class="view-rulers"
439
- role="presentation"
440
- />
441
- <div
442
- aria-hidden="true"
443
- class="blockDecorations-container"
444
- role="presentation"
445
- />
446
- <div
447
- aria-hidden="true"
448
- class="view-zones"
449
- role="presentation"
450
- style="position: absolute;"
451
- />
452
- <div
453
- aria-hidden="true"
454
- class="view-lines monaco-mouse-cursor-text"
455
- data-mprt="7"
456
- role="presentation"
457
- style="position: absolute; font-family: Consolas, 'Courier New', monospace; font-weight: normal; font-size: 14px; font-feature-settings: \\"liga\\" off, \\"calt\\" off; line-height: 19px; letter-spacing: 0px; width: 35px; height: 19px;"
458
- >
459
- <div
460
- class="view-line"
461
- style="top:0px;height:19px;"
462
- >
463
- <span>
464
- <span />
465
- </span>
466
- </div>
467
- </div>
468
- <div
469
- class="contentWidgets"
470
- data-mprt="1"
471
- style="position: absolute; top: 0px;"
472
- />
473
- <div
474
- aria-hidden="true"
475
- class="cursors-layer cursor-line-style cursor-solid"
476
- role="presentation"
477
- >
478
- <div
479
- class="cursor monaco-mouse-cursor-text"
480
- style="height: 19px; top: 0px; left: 0px; font-family: Consolas, 'Courier New', monospace; font-weight: normal; font-size: 14px; font-feature-settings: \\"liga\\" off, \\"calt\\" off; line-height: 19px; letter-spacing: 0px; display: none; visibility: hidden;"
481
- />
482
- </div>
483
- </div>
484
- <div
485
- aria-hidden="true"
486
- class="invisible scrollbar horizontal"
487
- role="presentation"
488
- style="position: absolute; width: 0px; height: 12px; left: 0px; bottom: 0px;"
489
- >
490
- <div
491
- class="slider"
492
- style="position: absolute; top: 0px; left: 0px; height: 12px; transform: translate3d(0px, 0px, 0px); contain: strict; width: 20px;"
493
- />
494
- </div>
495
- <canvas
496
- aria-hidden="true"
497
- class="decorationsOverviewRuler"
498
- height="5"
499
- style="position: absolute; transform: translate3d(0px, 0px, 0px); contain: strict; top: 0px; right: 0px; width: 14px; height: 5px; display: block;"
500
- width="14"
501
- />
502
- <div
503
- aria-hidden="true"
504
- class="invisible scrollbar vertical"
505
- role="presentation"
506
- style="position: absolute; width: 14px; height: 5px; right: 0px; top: 0px;"
507
- >
508
- <div
509
- class="slider"
510
- style="position: absolute; top: 0px; left: 0px; width: 14px; transform: translate3d(0px, 0px, 0px); contain: strict; height: 20px;"
511
- />
512
- </div>
513
- </div>
514
- <div
515
- aria-hidden="true"
516
- role="presentation"
517
- />
518
- <textarea
519
- aria-autocomplete="both"
520
- aria-haspopup="false"
521
- aria-label="Editor content;Press Alt+F1 for Accessibility Options."
522
- aria-multiline="true"
523
- aria-roledescription="editor"
524
- autocapitalize="off"
525
- autocomplete="off"
526
- autocorrect="off"
527
- class="inputarea monaco-mouse-cursor-text"
528
- data-mprt="6"
529
- role="textbox"
530
- spellcheck="false"
531
- style="font-family: Consolas, 'Courier New', monospace; font-weight: normal; font-size: 14px; font-feature-settings: \\"liga\\" off, \\"calt\\" off; line-height: 19px; letter-spacing: 0px; top: 0px; left: 0px; width: 1px; height: 1px;"
532
- tabindex="-1"
533
- wrap="off"
534
- />
535
- <div
536
- class="monaco-editor-background textAreaCover line-numbers"
537
- style="position: absolute; top: 0px; left: 0px; width: 1px; height: 1px;"
538
- />
539
- <div
540
- class="overlayWidgets"
541
- data-mprt="4"
542
- >
543
- <div
544
- style="position: absolute;"
545
- widgetid="editor.contrib.quickInputWidget"
546
- />
547
- </div>
548
- <div
549
- aria-hidden="true"
550
- class="minimap slider-mouseover"
551
- data-mprt="8"
552
- role="presentation"
553
- style="position: absolute; left: 0px; width: 0px; height: 5px;"
554
- >
555
- <div
556
- class="minimap-shadow-hidden"
557
- style="height: 5px;"
558
- />
559
- <canvas
560
- height="5"
561
- style="position: absolute; left: 0px; width: 0px; height: 5px;"
562
- width="0"
563
- />
564
- <canvas
565
- class="minimap-decorations-layer"
566
- height="5"
567
- style="position: absolute; left: 0px; width: 0px; height: 5px;"
568
- width="0"
569
- />
570
- <div
571
- class="minimap-slider"
572
- style="position: absolute; transform: translate3d(0px, 0px, 0px); contain: strict; width: 0px;"
573
- >
574
- <div
575
- class="minimap-slider-horizontal"
576
- style="position: absolute;"
577
- />
578
- </div>
579
- </div>
580
- </div>
581
- <div
582
- class="overflowingContentWidgets"
583
- data-mprt="2"
584
- />
585
- </div>
586
- </div>
152
+ data-testid="mock-editor"
153
+ />
587
154
  </div>
588
155
  </div>
589
156
  </div>
@@ -0,0 +1,22 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`Matches snapshot 1`] = `
4
+ <DocumentFragment>
5
+ <div
6
+ style="display: contents;"
7
+ >
8
+ <button
9
+ aria-disabled="false"
10
+ class="pf-v5-c-button pf-m-control"
11
+ data-ouia-component-id="OUIA-Generated-Button-control-1"
12
+ data-ouia-component-type="PF5/Button"
13
+ data-ouia-safe="true"
14
+ type="button"
15
+ >
16
+ <div>
17
+ icon
18
+ </div>
19
+ </button>
20
+ </div>
21
+ </DocumentFragment>
22
+ `;