decap-cms-widget-list 3.0.0 → 3.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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "decap-cms-widget-list",
3
3
  "description": "Widget for editing lists in Decap CMS.",
4
- "version": "3.0.0",
4
+ "version": "3.0.2",
5
5
  "homepage": "https://www.decapcms.org/docs/widgets/#list",
6
6
  "repository": "https://github.com/decaporg/decap-cms/tree/master/packages/decap-cms-widget-list",
7
7
  "bugs": "https://github.com/decaporg/decap-cms/issues",
@@ -21,19 +21,21 @@
21
21
  "build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore \"**/__tests__\" --root-mode upward"
22
22
  },
23
23
  "dependencies": {
24
- "react-sortable-hoc": "^2.0.0"
24
+ "@dnd-kit/core": "^6.0.8",
25
+ "@dnd-kit/modifiers": "^6.0.1",
26
+ "@dnd-kit/sortable": "^7.0.2"
25
27
  },
26
28
  "peerDependencies": {
27
29
  "@emotion/core": "^10.0.35",
28
30
  "@emotion/styled": "^10.0.27",
29
- "decap-cms-lib-widgets": "^1.6.1",
30
- "decap-cms-ui-default": "^2.12.1",
31
- "decap-cms-widget-object": "^2.6.2",
31
+ "decap-cms-lib-widgets": "^3.0.0",
32
+ "decap-cms-ui-default": "^3.0.0",
33
+ "decap-cms-widget-object": "^3.0.0",
32
34
  "immutable": "^3.7.6",
33
35
  "lodash": "^4.17.11",
34
36
  "prop-types": "^15.7.2",
35
37
  "react": "^16.8.4 || ^17.0.0",
36
38
  "react-immutable-proptypes": "^2.1.0"
37
39
  },
38
- "gitHead": "053d640b29df7432d8bd45565a41b1194dbf5b96"
40
+ "gitHead": "b1eae3bbb1661dfa5e3fc0407f03a2e0d564c14e"
39
41
  }
@@ -6,8 +6,18 @@ import { css, ClassNames } from '@emotion/core';
6
6
  import { List, Map, fromJS } from 'immutable';
7
7
  import { partial, isEmpty, uniqueId } from 'lodash';
8
8
  import uuid from 'uuid/v4';
9
- import { SortableContainer, SortableElement, SortableHandle } from 'react-sortable-hoc';
10
9
  import DecapCmsWidgetObject from 'decap-cms-widget-object';
10
+ import {
11
+ DndContext,
12
+ MouseSensor,
13
+ TouchSensor,
14
+ closestCenter,
15
+ useSensor,
16
+ useSensors,
17
+ } from '@dnd-kit/core';
18
+ import { SortableContext, useSortable } from '@dnd-kit/sortable';
19
+ import { restrictToParentElement } from '@dnd-kit/modifiers';
20
+ import { CSS } from '@dnd-kit/utilities';
11
21
  import {
12
22
  ListItemTopBar,
13
23
  ObjectWidgetTopBar,
@@ -28,8 +38,6 @@ const ObjectControl = DecapCmsWidgetObject.controlComponent;
28
38
 
29
39
  const ListItem = styled.div();
30
40
 
31
- const SortableListItem = SortableElement(ListItem);
32
-
33
41
  const StyledListItemTopBar = styled(ListItemTopBar)`
34
42
  background-color: ${colors.textFieldBorder};
35
43
  `;
@@ -65,9 +73,69 @@ const styles = {
65
73
  `,
66
74
  };
67
75
 
68
- const SortableList = SortableContainer(({ items, renderItem }) => {
69
- return <div>{items.map(renderItem)}</div>;
70
- });
76
+ function SortableList({ items, children, onSortEnd, keys }) {
77
+ const activationConstraint = { distance: 4 };
78
+ const sensors = useSensors(
79
+ useSensor(MouseSensor, { activationConstraint }),
80
+ useSensor(TouchSensor, { activationConstraint }),
81
+ );
82
+
83
+ function handleSortEnd({ active, over }) {
84
+ onSortEnd({
85
+ oldIndex: keys.indexOf(active.id),
86
+ newIndex: keys.indexOf(over.id),
87
+ });
88
+ }
89
+
90
+ return (
91
+ <div>
92
+ <DndContext
93
+ modifiers={[restrictToParentElement]}
94
+ collisionDetection={closestCenter}
95
+ sensors={sensors}
96
+ onDragEnd={handleSortEnd}
97
+ >
98
+ <SortableContext items={items}>{children}</SortableContext>
99
+ </DndContext>
100
+ </div>
101
+ );
102
+ }
103
+
104
+ function SortableListItem(props) {
105
+ const { setNodeRef, transform, transition } = useSortable({
106
+ id: props.id,
107
+ });
108
+
109
+ const style = {
110
+ transform: CSS.Transform.toString(transform),
111
+ transition,
112
+ };
113
+
114
+ const { collapsed } = props;
115
+
116
+ return (
117
+ <ListItem
118
+ sortable
119
+ ref={setNodeRef}
120
+ style={style}
121
+ css={[styles.listControlItem, collapsed && styles.listControlItemCollapsed]}
122
+ >
123
+ {props.children}
124
+ </ListItem>
125
+ );
126
+ }
127
+
128
+ function DragHandle({ children, id }) {
129
+ const { attributes, listeners } = useSortable({
130
+ id,
131
+ });
132
+
133
+ return (
134
+ <div {...attributes} {...listeners}>
135
+ {children}
136
+ </div>
137
+ );
138
+ }
71
139
 
72
140
  const valueTypes = {
73
141
  SINGLE: 'SINGLE',
@@ -524,11 +592,16 @@ export default class ListControl extends React.Component {
524
592
  return this.renderErroneousTypedItem(index, item);
525
593
  }
526
594
  }
595
+
596
+ console.log('kurwa', classNameWrapper);
597
+
527
598
  return (
528
599
  <SortableListItem
529
600
  css={[styles.listControlItem, collapsed && styles.listControlItemCollapsed]}
530
601
  index={index}
531
602
  key={key}
603
+ id={key}
604
+ keys={keys}
532
605
  >
533
606
  {isVariableTypesList && (
534
607
  <LabelComponent
@@ -543,8 +616,9 @@ export default class ListControl extends React.Component {
543
616
  <StyledListItemTopBar
544
617
  collapsed={collapsed}
545
618
  onCollapseToggle={partial(this.handleItemCollapseToggle, index)}
619
+ dragHandle={DragHandle}
620
+ id={key}
546
621
  onRemove={partial(this.handleRemove, index)}
547
- dragHandleHOC={SortableHandle}
548
622
  data-testid={`styled-list-item-top-bar-${key}`}
549
623
  />
550
624
  <NestedObjectLabel collapsed={collapsed} error={hasError}>
@@ -595,10 +669,11 @@ export default class ListControl extends React.Component {
595
669
  <StyledListItemTopBar
596
670
  onCollapseToggle={null}
597
671
  onRemove={partial(this.handleRemove, index, key)}
598
- dragHandleHOC={SortableHandle}
672
+ dragHandle={DragHandle}
673
+ id={key}
599
674
  />
600
675
  <NestedObjectLabel collapsed={true} error={true}>
601
- {errorMessage}
676
+ {errorMessage}aaaasdd
602
677
  </NestedObjectLabel>
603
678
  </SortableListItem>
604
679
  );
@@ -606,7 +681,7 @@ export default class ListControl extends React.Component {
606
681
 
607
682
  renderListControl() {
608
683
  const { value, forID, field, classNameWrapper, t } = this.props;
609
- const { itemsCollapsed, listCollapsed } = this.state;
684
+ const { itemsCollapsed, listCollapsed, keys } = this.state;
610
685
  const items = value || List();
611
686
  const label = field.get('label', field.get('name'));
612
687
  const labelSingular = field.get('label_singular') || field.get('label', field.get('name'));
@@ -615,6 +690,8 @@ export default class ListControl extends React.Component {
615
690
  const allItemsCollapsed = itemsCollapsed.every(val => val === true);
616
691
  const selfCollapsed = allItemsCollapsed && (listCollapsed || !minimizeCollapsedItems);
617
692
 
693
+ const itemsArray = keys.map(key => ({ id: key }));
694
+
618
695
  return (
619
696
  <ClassNames>
620
697
  {({ cx, css }) => (
@@ -639,13 +716,9 @@ export default class ListControl extends React.Component {
639
716
  t={t}
640
717
  />
641
718
  {(!selfCollapsed || !minimizeCollapsedItems) && (
642
- <SortableList
643
- items={items}
644
- renderItem={this.renderItem}
645
- onSortEnd={this.onSortEnd}
646
- useDragHandle
647
- lockAxis="y"
648
- />
719
+ <SortableList items={itemsArray} keys={keys} onSortEnd={this.onSortEnd}>
720
+ {items.map(this.renderItem)}
721
+ </SortableList>
649
722
  )}
650
723
  </div>
651
724
  )}
@@ -103,6 +103,14 @@ exports[`ListControl should add to list when add button is clicked 1`] = `
103
103
  height: 100%;
104
104
  }
105
105
 
106
+ .emotion-16 {
107
+ margin-top: 18px;
108
+ }
109
+
110
+ .emotion-16:first-of-type {
111
+ margin-top: 26px;
112
+ }
113
+
106
114
  .emotion-1 {
107
115
  display: inline-block;
108
116
  line-height: 0;
@@ -129,14 +137,6 @@ exports[`ListControl should add to list when add button is clicked 1`] = `
129
137
  height: 100%;
130
138
  }
131
139
 
132
- .emotion-16 {
133
- margin-top: 18px;
134
- }
135
-
136
- .emotion-16:first-of-type {
137
- margin-top: 26px;
138
- }
139
-
140
140
  .emotion-14 {
141
141
  display: none;
142
142
  border-top: 0;
@@ -202,6 +202,7 @@ exports[`ListControl should add to list when add button is clicked 1`] = `
202
202
  classname="css-1e1b0lr-StyledListItemTopBar e11zrb3c1"
203
203
  collapsed="false"
204
204
  data-testid="styled-list-item-top-bar-0"
205
+ id="0"
205
206
  >
206
207
  <button>
207
208
  Remove
@@ -224,6 +225,23 @@ exports[`ListControl should add to list when add button is clicked 1`] = `
224
225
  value="Map {}"
225
226
  />
226
227
  </div>
228
+ <div
229
+ id="DndDescribedBy-19"
230
+ style="display: none;"
231
+ >
232
+
233
+ To pick up a draggable item, press the space bar.
234
+ While dragging, use the arrow keys to move the item.
235
+ Press space again to drop the item in its new position, or press escape to cancel.
236
+
237
+ </div>
238
+ <div
239
+ aria-atomic="true"
240
+ aria-live="assertive"
241
+ id="DndLiveRegion-19"
242
+ role="status"
243
+ style="position: fixed; width: 1px; height: 1px; margin: -1px; border: 0px; padding: 0px; overflow: hidden; clip-path: inset(100%); white-space: nowrap;"
244
+ />
227
245
  </div>
228
246
  </div>
229
247
  </DocumentFragment>
@@ -332,6 +350,14 @@ exports[`ListControl should remove from list when remove button is clicked 1`] =
332
350
  height: 100%;
333
351
  }
334
352
 
353
+ .emotion-16 {
354
+ margin-top: 18px;
355
+ }
356
+
357
+ .emotion-16:first-of-type {
358
+ margin-top: 26px;
359
+ }
360
+
335
361
  .emotion-1 {
336
362
  display: inline-block;
337
363
  line-height: 0;
@@ -358,14 +384,6 @@ exports[`ListControl should remove from list when remove button is clicked 1`] =
358
384
  height: 100%;
359
385
  }
360
386
 
361
- .emotion-16 {
362
- margin-top: 18px;
363
- }
364
-
365
- .emotion-16:first-of-type {
366
- margin-top: 26px;
367
- }
368
-
369
387
  .emotion-14 {
370
388
  display: none;
371
389
  border-top: 0;
@@ -431,6 +449,7 @@ exports[`ListControl should remove from list when remove button is clicked 1`] =
431
449
  classname="css-1e1b0lr-StyledListItemTopBar e11zrb3c1"
432
450
  collapsed="false"
433
451
  data-testid="styled-list-item-top-bar-0"
452
+ id="0"
434
453
  >
435
454
  <button>
436
455
  Remove
@@ -460,6 +479,7 @@ exports[`ListControl should remove from list when remove button is clicked 1`] =
460
479
  classname="css-1e1b0lr-StyledListItemTopBar e11zrb3c1"
461
480
  collapsed="false"
462
481
  data-testid="styled-list-item-top-bar-1"
482
+ id="1"
463
483
  >
464
484
  <button>
465
485
  Remove
@@ -482,6 +502,23 @@ exports[`ListControl should remove from list when remove button is clicked 1`] =
482
502
  value="Map { \\"string\\": \\"item 2\\" }"
483
503
  />
484
504
  </div>
505
+ <div
506
+ id="DndDescribedBy-20"
507
+ style="display: none;"
508
+ >
509
+
510
+ To pick up a draggable item, press the space bar.
511
+ While dragging, use the arrow keys to move the item.
512
+ Press space again to drop the item in its new position, or press escape to cancel.
513
+
514
+ </div>
515
+ <div
516
+ aria-atomic="true"
517
+ aria-live="assertive"
518
+ id="DndLiveRegion-20"
519
+ role="status"
520
+ style="position: fixed; width: 1px; height: 1px; margin: -1px; border: 0px; padding: 0px; overflow: hidden; clip-path: inset(100%); white-space: nowrap;"
521
+ />
485
522
  </div>
486
523
  </div>
487
524
  </DocumentFragment>
@@ -592,7 +629,6 @@ exports[`ListControl should remove from list when remove button is clicked 2`] =
592
629
 
593
630
  .emotion-16 {
594
631
  margin-top: 18px;
595
- padding-bottom: 0;
596
632
  }
597
633
 
598
634
  .emotion-16:first-of-type {
@@ -685,11 +721,13 @@ exports[`ListControl should remove from list when remove button is clicked 2`] =
685
721
  <div>
686
722
  <div
687
723
  class="emotion-16 emotion-17"
724
+ style="transition: transform 0ms linear;"
688
725
  >
689
726
  <mock-list-item-top-bar
690
727
  classname="css-1e1b0lr-StyledListItemTopBar e11zrb3c1"
691
728
  collapsed="true"
692
729
  data-testid="styled-list-item-top-bar-2"
730
+ id="2"
693
731
  >
694
732
  <button>
695
733
  Remove
@@ -712,6 +750,23 @@ exports[`ListControl should remove from list when remove button is clicked 2`] =
712
750
  value="Map { \\"string\\": \\"item 2\\" }"
713
751
  />
714
752
  </div>
753
+ <div
754
+ id="DndDescribedBy-20"
755
+ style="display: none;"
756
+ >
757
+
758
+ To pick up a draggable item, press the space bar.
759
+ While dragging, use the arrow keys to move the item.
760
+ Press space again to drop the item in its new position, or press escape to cancel.
761
+
762
+ </div>
763
+ <div
764
+ aria-atomic="true"
765
+ aria-live="assertive"
766
+ id="DndLiveRegion-20"
767
+ role="status"
768
+ style="position: fixed; width: 1px; height: 1px; margin: -1px; border: 0px; padding: 0px; overflow: hidden; clip-path: inset(100%); white-space: nowrap;"
769
+ />
715
770
  </div>
716
771
  </div>
717
772
  </DocumentFragment>
@@ -831,6 +886,14 @@ exports[`ListControl should render list with fields with collapse = "false" and
831
886
  height: 100%;
832
887
  }
833
888
 
889
+ .emotion-16 {
890
+ margin-top: 18px;
891
+ }
892
+
893
+ .emotion-16:first-of-type {
894
+ margin-top: 26px;
895
+ }
896
+
834
897
  .emotion-1 {
835
898
  display: inline-block;
836
899
  line-height: 0;
@@ -857,14 +920,6 @@ exports[`ListControl should render list with fields with collapse = "false" and
857
920
  height: 100%;
858
921
  }
859
922
 
860
- .emotion-16 {
861
- margin-top: 18px;
862
- }
863
-
864
- .emotion-16:first-of-type {
865
- margin-top: 26px;
866
- }
867
-
868
923
  .emotion-14 {
869
924
  display: none;
870
925
  border-top: 0;
@@ -930,6 +985,7 @@ exports[`ListControl should render list with fields with collapse = "false" and
930
985
  classname="css-1e1b0lr-StyledListItemTopBar e11zrb3c1"
931
986
  collapsed="false"
932
987
  data-testid="styled-list-item-top-bar-0"
988
+ id="0"
933
989
  >
934
990
  <button>
935
991
  Remove
@@ -959,6 +1015,7 @@ exports[`ListControl should render list with fields with collapse = "false" and
959
1015
  classname="css-1e1b0lr-StyledListItemTopBar e11zrb3c1"
960
1016
  collapsed="false"
961
1017
  data-testid="styled-list-item-top-bar-1"
1018
+ id="1"
962
1019
  >
963
1020
  <button>
964
1021
  Remove
@@ -981,6 +1038,23 @@ exports[`ListControl should render list with fields with collapse = "false" and
981
1038
  value="Map { \\"string\\": \\"item 2\\" }"
982
1039
  />
983
1040
  </div>
1041
+ <div
1042
+ id="DndDescribedBy-16"
1043
+ style="display: none;"
1044
+ >
1045
+
1046
+ To pick up a draggable item, press the space bar.
1047
+ While dragging, use the arrow keys to move the item.
1048
+ Press space again to drop the item in its new position, or press escape to cancel.
1049
+
1050
+ </div>
1051
+ <div
1052
+ aria-atomic="true"
1053
+ aria-live="assertive"
1054
+ id="DndLiveRegion-16"
1055
+ role="status"
1056
+ style="position: fixed; width: 1px; height: 1px; margin: -1px; border: 0px; padding: 0px; overflow: hidden; clip-path: inset(100%); white-space: nowrap;"
1057
+ />
984
1058
  </div>
985
1059
  </div>
986
1060
  </DocumentFragment>
@@ -1089,6 +1163,14 @@ exports[`ListControl should render list with fields with collapse = "false" and
1089
1163
  height: 100%;
1090
1164
  }
1091
1165
 
1166
+ .emotion-16 {
1167
+ margin-top: 18px;
1168
+ }
1169
+
1170
+ .emotion-16:first-of-type {
1171
+ margin-top: 26px;
1172
+ }
1173
+
1092
1174
  .emotion-1 {
1093
1175
  display: inline-block;
1094
1176
  line-height: 0;
@@ -1115,14 +1197,6 @@ exports[`ListControl should render list with fields with collapse = "false" and
1115
1197
  height: 100%;
1116
1198
  }
1117
1199
 
1118
- .emotion-16 {
1119
- margin-top: 18px;
1120
- }
1121
-
1122
- .emotion-16:first-of-type {
1123
- margin-top: 26px;
1124
- }
1125
-
1126
1200
  .emotion-14 {
1127
1201
  display: none;
1128
1202
  border-top: 0;
@@ -1188,6 +1262,7 @@ exports[`ListControl should render list with fields with collapse = "false" and
1188
1262
  classname="css-1e1b0lr-StyledListItemTopBar e11zrb3c1"
1189
1263
  collapsed="false"
1190
1264
  data-testid="styled-list-item-top-bar-0"
1265
+ id="0"
1191
1266
  >
1192
1267
  <button>
1193
1268
  Remove
@@ -1217,6 +1292,7 @@ exports[`ListControl should render list with fields with collapse = "false" and
1217
1292
  classname="css-1e1b0lr-StyledListItemTopBar e11zrb3c1"
1218
1293
  collapsed="false"
1219
1294
  data-testid="styled-list-item-top-bar-1"
1295
+ id="1"
1220
1296
  >
1221
1297
  <button>
1222
1298
  Remove
@@ -1239,6 +1315,23 @@ exports[`ListControl should render list with fields with collapse = "false" and
1239
1315
  value="Map { \\"string\\": \\"item 2\\" }"
1240
1316
  />
1241
1317
  </div>
1318
+ <div
1319
+ id="DndDescribedBy-18"
1320
+ style="display: none;"
1321
+ >
1322
+
1323
+ To pick up a draggable item, press the space bar.
1324
+ While dragging, use the arrow keys to move the item.
1325
+ Press space again to drop the item in its new position, or press escape to cancel.
1326
+
1327
+ </div>
1328
+ <div
1329
+ aria-atomic="true"
1330
+ aria-live="assertive"
1331
+ id="DndLiveRegion-18"
1332
+ role="status"
1333
+ style="position: fixed; width: 1px; height: 1px; margin: -1px; border: 0px; padding: 0px; overflow: hidden; clip-path: inset(100%); white-space: nowrap;"
1334
+ />
1242
1335
  </div>
1243
1336
  </div>
1244
1337
  </DocumentFragment>
@@ -1375,7 +1468,6 @@ exports[`ListControl should render list with fields with default collapse ("true
1375
1468
 
1376
1469
  .emotion-16 {
1377
1470
  margin-top: 18px;
1378
- padding-bottom: 0;
1379
1471
  }
1380
1472
 
1381
1473
  .emotion-16:first-of-type {
@@ -1447,6 +1539,7 @@ exports[`ListControl should render list with fields with default collapse ("true
1447
1539
  classname="css-1e1b0lr-StyledListItemTopBar e11zrb3c1"
1448
1540
  collapsed="true"
1449
1541
  data-testid="styled-list-item-top-bar-0"
1542
+ id="0"
1450
1543
  >
1451
1544
  <button>
1452
1545
  Remove
@@ -1476,6 +1569,7 @@ exports[`ListControl should render list with fields with default collapse ("true
1476
1569
  classname="css-1e1b0lr-StyledListItemTopBar e11zrb3c1"
1477
1570
  collapsed="true"
1478
1571
  data-testid="styled-list-item-top-bar-1"
1572
+ id="1"
1479
1573
  >
1480
1574
  <button>
1481
1575
  Remove
@@ -1498,6 +1592,23 @@ exports[`ListControl should render list with fields with default collapse ("true
1498
1592
  value="Map { \\"string\\": \\"item 2\\" }"
1499
1593
  />
1500
1594
  </div>
1595
+ <div
1596
+ id="DndDescribedBy-15"
1597
+ style="display: none;"
1598
+ >
1599
+
1600
+ To pick up a draggable item, press the space bar.
1601
+ While dragging, use the arrow keys to move the item.
1602
+ Press space again to drop the item in its new position, or press escape to cancel.
1603
+
1604
+ </div>
1605
+ <div
1606
+ aria-atomic="true"
1607
+ aria-live="assertive"
1608
+ id="DndLiveRegion-15"
1609
+ role="status"
1610
+ style="position: fixed; width: 1px; height: 1px; margin: -1px; border: 0px; padding: 0px; overflow: hidden; clip-path: inset(100%); white-space: nowrap;"
1611
+ />
1501
1612
  </div>
1502
1613
  </div>
1503
1614
  </DocumentFragment>
@@ -1815,7 +1926,6 @@ exports[`ListControl should render list with nested object 1`] = `
1815
1926
 
1816
1927
  .emotion-16 {
1817
1928
  margin-top: 18px;
1818
- padding-bottom: 0;
1819
1929
  }
1820
1930
 
1821
1931
  .emotion-16:first-of-type {
@@ -1887,6 +1997,7 @@ exports[`ListControl should render list with nested object 1`] = `
1887
1997
  classname="css-1e1b0lr-StyledListItemTopBar e11zrb3c1"
1888
1998
  collapsed="true"
1889
1999
  data-testid="styled-list-item-top-bar-0"
2000
+ id="0"
1890
2001
  >
1891
2002
  <button>
1892
2003
  Remove
@@ -1916,6 +2027,7 @@ exports[`ListControl should render list with nested object 1`] = `
1916
2027
  classname="css-1e1b0lr-StyledListItemTopBar e11zrb3c1"
1917
2028
  collapsed="true"
1918
2029
  data-testid="styled-list-item-top-bar-1"
2030
+ id="1"
1919
2031
  >
1920
2032
  <button>
1921
2033
  Remove
@@ -1938,6 +2050,23 @@ exports[`ListControl should render list with nested object 1`] = `
1938
2050
  value="Map { \\"object\\": Map { \\"title\\": \\"item 2\\" } }"
1939
2051
  />
1940
2052
  </div>
2053
+ <div
2054
+ id="DndDescribedBy-0"
2055
+ style="display: none;"
2056
+ >
2057
+
2058
+ To pick up a draggable item, press the space bar.
2059
+ While dragging, use the arrow keys to move the item.
2060
+ Press space again to drop the item in its new position, or press escape to cancel.
2061
+
2062
+ </div>
2063
+ <div
2064
+ aria-atomic="true"
2065
+ aria-live="assertive"
2066
+ id="DndLiveRegion-0"
2067
+ role="status"
2068
+ style="position: fixed; width: 1px; height: 1px; margin: -1px; border: 0px; padding: 0px; overflow: hidden; clip-path: inset(100%); white-space: nowrap;"
2069
+ />
1941
2070
  </div>
1942
2071
  </div>
1943
2072
  </DocumentFragment>
@@ -2046,6 +2175,14 @@ exports[`ListControl should render list with nested object with collapse = false
2046
2175
  height: 100%;
2047
2176
  }
2048
2177
 
2178
+ .emotion-16 {
2179
+ margin-top: 18px;
2180
+ }
2181
+
2182
+ .emotion-16:first-of-type {
2183
+ margin-top: 26px;
2184
+ }
2185
+
2049
2186
  .emotion-1 {
2050
2187
  display: inline-block;
2051
2188
  line-height: 0;
@@ -2072,14 +2209,6 @@ exports[`ListControl should render list with nested object with collapse = false
2072
2209
  height: 100%;
2073
2210
  }
2074
2211
 
2075
- .emotion-16 {
2076
- margin-top: 18px;
2077
- }
2078
-
2079
- .emotion-16:first-of-type {
2080
- margin-top: 26px;
2081
- }
2082
-
2083
2212
  .emotion-14 {
2084
2213
  display: none;
2085
2214
  border-top: 0;
@@ -2145,6 +2274,7 @@ exports[`ListControl should render list with nested object with collapse = false
2145
2274
  classname="css-1e1b0lr-StyledListItemTopBar e11zrb3c1"
2146
2275
  collapsed="false"
2147
2276
  data-testid="styled-list-item-top-bar-0"
2277
+ id="0"
2148
2278
  >
2149
2279
  <button>
2150
2280
  Remove
@@ -2174,6 +2304,7 @@ exports[`ListControl should render list with nested object with collapse = false
2174
2304
  classname="css-1e1b0lr-StyledListItemTopBar e11zrb3c1"
2175
2305
  collapsed="false"
2176
2306
  data-testid="styled-list-item-top-bar-1"
2307
+ id="1"
2177
2308
  >
2178
2309
  <button>
2179
2310
  Remove
@@ -2196,6 +2327,23 @@ exports[`ListControl should render list with nested object with collapse = false
2196
2327
  value="Map { \\"object\\": Map { \\"title\\": \\"item 2\\" } }"
2197
2328
  />
2198
2329
  </div>
2330
+ <div
2331
+ id="DndDescribedBy-1"
2332
+ style="display: none;"
2333
+ >
2334
+
2335
+ To pick up a draggable item, press the space bar.
2336
+ While dragging, use the arrow keys to move the item.
2337
+ Press space again to drop the item in its new position, or press escape to cancel.
2338
+
2339
+ </div>
2340
+ <div
2341
+ aria-atomic="true"
2342
+ aria-live="assertive"
2343
+ id="DndLiveRegion-1"
2344
+ role="status"
2345
+ style="position: fixed; width: 1px; height: 1px; margin: -1px; border: 0px; padding: 0px; overflow: hidden; clip-path: inset(100%); white-space: nowrap;"
2346
+ />
2199
2347
  </div>
2200
2348
  </div>
2201
2349
  </DocumentFragment>