@@ -90,6 +90,7 @@ const SelectionGroup = props => {
90
90
disabled = { props . disabled }
91
91
options = { props . group . options }
92
92
ariaLabelledby = { groupLabelID }
93
+ listboxLabel = { props . group . label }
93
94
/>
94
95
</ div >
95
96
) ;
@@ -111,7 +112,11 @@ const ListBox = props => (
111
112
role = "listbox"
112
113
>
113
114
{ props . options . map ( option => (
114
- < Option key = { _ . uniqueId ( 'cell-resize-handle-' ) } option = { option } />
115
+ < Option
116
+ key = { _ . uniqueId ( 'cell-resize-handle-' ) }
117
+ option = { option }
118
+ listboxLabel = { props . listboxLabel }
119
+ />
115
120
) ) }
116
121
</ ul >
117
122
</ div >
@@ -121,7 +126,7 @@ const Option = props => (
121
126
< li role = "presentation" className = "slds-listbox__item" >
122
127
< div
123
128
className = { classNames (
124
- 'slds-listbox__option slds-listbox__option_plain slds-media' ,
129
+ 'slds-listbox__option slds-listbox__option_plain slds-media slds-media_small slds-media_inline ' ,
125
130
{
126
131
'slds-is-grabbed' : props . option . isGrabbed ,
127
132
'slds-is-selected' : props . option . isSelected
@@ -132,14 +137,26 @@ const Option = props => (
132
137
role = "option"
133
138
tabIndex = { props . option . tabIndex }
134
139
>
135
- < span className = "slds-truncate" title = { props . option . text } >
136
- { props . option . text }
137
- { props . option . required ? (
138
- < abbr className = "slds-required" title = "required" >
139
- *
140
- </ abbr >
141
- ) : null }
140
+ < span className = "slds-media__body" >
141
+ < span className = "slds-truncate" title = { props . option . text } >
142
+ { props . option . text }
143
+ </ span >
142
144
</ span >
145
+ { props . option . locked && (
146
+ < span className = "slds-media__figure slds-media__figure_reverse" >
147
+ < span className = "slds-icon_container" title = "Locked item" >
148
+ < SvgIcon
149
+ className = "slds-icon slds-icon_x-small slds-icon-text-default"
150
+ sprite = "utility"
151
+ symbol = "lock"
152
+ />
153
+ < span className = "slds-assistive-text" >
154
+ { ' ' }
155
+ : item cannot be removed from { props . listboxLabel }
156
+ </ span >
157
+ </ span >
158
+ </ span >
159
+ ) }
143
160
</ div >
144
161
</ li >
145
162
) ;
@@ -256,7 +273,7 @@ export const DisabledSnapShot = {
256
273
]
257
274
} ;
258
275
259
- export const RequiredSnapShot = {
276
+ export const LockedSnapShot = {
260
277
liveRegionText : '' ,
261
278
optionDragLabel :
262
279
'Press space bar when on an item, to move it within the list. CMD plus left and right arrow keys, to move items between lists. Required items must remain in the second category.' ,
@@ -298,7 +315,7 @@ export const RequiredSnapShot = {
298
315
tabIndex : 0 ,
299
316
isSelected : false ,
300
317
isGrabbed : false ,
301
- required : true
318
+ locked : true
302
319
} ,
303
320
{
304
321
text : 'Option 5' ,
0 commit comments