@@ -17,7 +17,7 @@ import { FormElement, FormElementProps } from './FormElement';
1717import { Icon } from './Icon' ;
1818import { AutoAlign , RectangleAlignment } from './AutoAlign' ;
1919import { DropdownMenuProps } from './DropdownMenu' ;
20- import { isElInChildren } from './util' ;
20+ import { registerStyle , isElInChildren } from './util' ;
2121import { ComponentSettingsContext } from './ComponentSettings' ;
2222import { useControlledValue , useEventCallback , useMergeRefs } from './hooks' ;
2323import { createFC } from './common' ;
@@ -185,6 +185,18 @@ const PicklistContext = createContext<{
185185 optionIdPrefix : '' ,
186186} ) ;
187187
188+ /**
189+ *
190+ */
191+ function useInitComponentStyle ( ) {
192+ useEffect ( ( ) => {
193+ registerStyle ( 'picklist' , [
194+ [ '.react-picklist-input:focus-visible' , '{ outline: none; }' ] ,
195+ [ '.react-picklist-input:not(:disabled)' , '{ cursor: pointer; }' ] ,
196+ ] ) ;
197+ } , [ ] ) ;
198+ }
199+
188200/**
189201 *
190202 */
@@ -262,6 +274,8 @@ export const Picklist: (<MultiSelect extends boolean | undefined>(
262274 ...rprops
263275 } = props ;
264276
277+ useInitComponentStyle ( ) ;
278+
265279 const fallbackId = useId ( ) ;
266280 const id = id_ ?? fallbackId ;
267281 const listboxId = `${ id } -listbox` ;
@@ -557,6 +571,7 @@ export const Picklist: (<MultiSelect extends boolean | undefined>(
557571 }
558572 ) ;
559573 const inputClassNames = classnames (
574+ 'react-picklist-input' ,
560575 'slds-input_faux' ,
561576 'slds-combobox__input' ,
562577 {
0 commit comments