You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/documentation-site/patternfly-docs/content/design-guidelines/components/dual-list-selector/dual-list-selector.md
+28-14Lines changed: 28 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,19 +20,25 @@ Dual list selectors are useful when you have a large set of options for users to
20
20
## Behavior
21
21
Users can select one or more items from the available list and use the arrows to move these items to the chosen list. Users can filter down the items by using the search input field.
22
22
23
-
<imgsrc="./img/dual list single.gif"alt="basic dual list behavior"width="880"/>
23
+
<divclass="ws-docs-content-img">
24
+

25
+
</div>
24
26
25
-
In an expandable dual list, when users move an item from the available list to the chosen list, the item still appears in its original group structure. For example, if the item Option 6 in the group Folder 2 is moved from the available list to the chosen list, the Option 6 item will appear in the chosen list under the Folder 2 group. It won’t appear as a stand-alone, single-level item.
27
+
In an expandable dual list, when users move an item from the available list to the chosen list, the item still appears in its original group structure. For example, if the item Broccoli in the group Folder Vegetables is moved from the available list to the chosen list, the Broccoli item will appear in the chosen list under the Vegetable group. It won’t appear as a stand-alone, single-level item.
26
28
27
-
<imgsrc="./img/dual list folders.gif"alt="basic dual list behavior"width="880"/>
29
+
<divclass="ws-docs-content-img">
30
+

31
+
</div>
28
32
29
33
## Variations
30
34
There are two types of dual list selectors: basic dual lists and expandable dual lists.
31
35
32
36
### Basic dual list
33
37
A basic dual list contains a flat list of items for the user to choose from.

41
+
</div>
36
42
37
43
1.**List labels:** List labels distinguish between the list of available items and the list of chosen items. These labels can be changed based on your use case, and they should be clear and concise.
38
44
2.**Available items list:** The available items list is a list of items that users can choose from. Available list items can have a single level or multiple levels.
@@ -47,25 +53,33 @@ A basic dual list contains a flat list of items for the user to choose from.
47
53
### Expandable dual list
48
54
An expandable dual list contains a multi-leveled list of items for users to choose from. Items can be nested in a hierarchical tree to show different groupings or categories, and the list can have up to three levels.

58
+
</div>
51
59
52
-
1.**Folder:**group of items that can be selected and moved from one list of options to the other. When a folder has a mix of selected and unselected items, the checkbox should have a mixed state. When all items in a folder are selected, the folder checkbox should have a selected state.
53
-
2.**Item:**item within a folder that can be selected and moved.
60
+
1.**Number of items:**indicator of how many items are selected, among the total items available in the list. <u>In expandable lists, only non-folder items are included in the item count.</u>
61
+
2.**Folder:**group of items that can be selected and moved from one list of options to the other. When a folder has a mix of selected and unselected items, the checkbox should have a mixed state. When all items in a folder are selected, the folder checkbox should have a selected state.
54
62
3.**Selected item:** visual state of an item when it has been selected by a user.
55
-
4.**Number of items:**indicator of how many items are selected, among the total items available in the list. <u>In expandable lists, only non-folder items are included in the item count.</u>
63
+
4.**Item:**item within a folder that can be selected and moved.
56
64
5.**Badge (optional):** number of items inside a folder.
57
65
58
66
### Drag and drop dual list
59
67
Drag and drop functionality inside of a dual list allows users to customize the order in which items within the Chosen options are displayed. The fa-grip icon at the start of the item row is used to indicate that the items are draggable.
60
68
61
-
1.**onDrag event:** Upon click & hold a `--pf-v6-global--active-color--100` border will show the draggable area that is available. The list item being dragged will also use a `--pf-v6-global--active-color--100` border to highlight it as the item being dragged and all other list items will switch to a disabled state.
69
+
<divclass="ws-docs-content-img">
70
+

71
+
</div>
62
72
63
-
<imgsrc="./img/Drag-drop-Dual-list-selector-selected-step-1-final.png"alt="Dual list drag interaction 1 - Drag in progress"width="880"/>
73
+
1.**onDrag event:** Upon click & hold a `--pf-t--global--border--color--brand--clicked` border will show the draggable area that is available. The list item being dragged will also use a `--pf-t--global--border--color--brand--clicked` border to highlight it as the item being dragged.
64
74
65
-
2.**postDrag event:** Once dropped, the items will be reordered based on the user’s action.
75
+
<divclass="ws-docs-content-img">
76
+

77
+
</div>
66
78
67
-
<imgsrc="./img/Drag-drop-Dual-list-selector-selected-step-2-final.png"alt="Dual list drag interaction 2 - Drag & drop completed"width="880"/>
79
+
2.**Ghost row:** Mid onDrag event, a duplicate ghost row will follow the active dragged item. The ghost row will fill the available space and use a `--pf-t--global--border--color--brand--clicked` border to highlight it as the item being dragged. The ghost row icon button will recieve a hover fill using `--pf-t--global--background--color--action--plain--hover`.
68
80
69
-
3.**Error state:** If the list item is dragged outside the bounding box the borders on the dragged item will switch to `--pf-v6-global--danger-color--100` and the cursor will change to not-allowed to indicate an invalid placement. If the user releases the cursor outside the bounding area the dragged item will return to its default position.
81
+
<divclass="ws-docs-content-img">
82
+

83
+
</div>
70
84
71
-
<imgsrc="./img/Drag-drop-Dual-list-selector-selected-step-3-final.png"alt="Dual list drag interactionstep 3 - Error state"width="880"/>
85
+
3.**postDrag event:** Once dropped, the items will be reordered based on the user’s action. The recently dropped row will receive a hover fill using `--pf-t--global--background--color--primary--hover`and the icon button will receive a background fill of `--pf-t--global--background--color--action--plain--hover`.
Copy file name to clipboardExpand all lines: packages/documentation-site/patternfly-docs/content/design-guidelines/components/dual-list-selector/img/basic-dual-list.svg
0 commit comments