@@ -84,12 +84,25 @@ export class UmbMultipleColorPickerItemInputElement extends UUIFormControlMixin(
84
84
this . dispatchEvent ( new UmbInputEvent ( ) ) ;
85
85
}
86
86
87
+ #onLabelKeydown( event : KeyboardEvent ) {
88
+ event . stopPropagation ( ) ;
89
+ const target = event . currentTarget as UUIInputElement ;
90
+ if ( event . key === 'Enter' && target . value ) {
91
+ this . dispatchEvent ( new CustomEvent ( 'enter' ) ) ;
92
+ }
93
+ }
94
+
87
95
#onLabelChange( event : UUIInputEvent ) {
88
96
event . stopPropagation ( ) ;
89
97
this . label = event . target . value as string ;
90
98
this . dispatchEvent ( new UmbChangeEvent ( ) ) ;
91
99
}
92
100
101
+ #onValueKeydown( event : KeyboardEvent ) {
102
+ event . stopPropagation ( ) ;
103
+ if ( event . key === 'Enter' ) this . #onColorClick( ) ;
104
+ }
105
+
93
106
#onValueChange( event : UUIInputEvent ) {
94
107
event . stopPropagation ( ) ;
95
108
this . value = event . target . value as string ;
@@ -145,6 +158,7 @@ export class UmbMultipleColorPickerItemInputElement extends UUIFormControlMixin(
145
158
placeholder= ${ this . localize . term ( 'general_value' ) }
146
159
required= ${ this . required }
147
160
required- message= "Value is missing"
161
+ @keydown = ${ this . #onValueKeydown}
148
162
@input = ${ this . #onValueInput}
149
163
@change = ${ this . #onValueChange} >
150
164
<uui- color - swatch
@@ -162,6 +176,7 @@ export class UmbMultipleColorPickerItemInputElement extends UUIFormControlMixin(
162
176
label= ${ this . localize . term ( 'placeholders_label' ) }
163
177
placeholder= ${ this . localize . term ( 'placeholders_label' ) }
164
178
value= ${ ifDefined ( this . label ) }
179
+ @keydown = ${ this . #onLabelKeydown}
165
180
@input = "${ this . #onLabelInput} "
166
181
@change = "${ this . #onLabelChange} "
167
182
?dis abled= ${ this . disabled }
@@ -210,6 +225,12 @@ export class UmbMultipleColorPickerItemInputElement extends UUIFormControlMixin(
210
225
padding : var (--uui-size-1 );
211
226
}
212
227
228
+ uui-color-swatch : focus-within {
229
+ outline : 2px solid var (--uui-color-selected );
230
+ outline-offset : 0 ;
231
+ border-radius : var (--uui-border-radius );
232
+ }
233
+
213
234
.color-wrapper {
214
235
position : relative;
215
236
flex : 1 ;
0 commit comments