File tree Expand file tree Collapse file tree 2 files changed +25
-5
lines changed Expand file tree Collapse file tree 2 files changed +25
-5
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,8 @@ export class UUIInputElement extends FormControlMixin(
58
58
var(--uui-input-border-color, var(--uui-color-border));
59
59
60
60
--uui-button-height: 100%;
61
+ --auto-width-text-margin-right: 0;
62
+ --auto-width-text-margin-left: 0;
61
63
}
62
64
63
65
#control {
@@ -75,6 +77,8 @@ export class UUIInputElement extends FormControlMixin(
75
77
z-index: -1;
76
78
height: 0px;
77
79
padding: 0 var(--uui-size-space-3);
80
+ margin: 0 var(--auto-width-text-margin-right) 0
81
+ var(--auto-width-text-margin-left);
78
82
}
79
83
80
84
:host([auto-width]) #input {
@@ -407,7 +411,7 @@ export class UUIInputElement extends FormControlMixin(
407
411
}
408
412
409
413
private renderInputWithAutoWidth ( ) {
410
- html `< div id ="control ">
414
+ return html `< div id ="control ">
411
415
${ this . renderInput ( ) } ${ this . renderAutoWidthBackground ( ) }
412
416
</ div > ` ;
413
417
}
Original file line number Diff line number Diff line change @@ -314,7 +314,7 @@ export const AutoWidth: Story = {
314
314
.name=${ props . name }
315
315
.placeholder=${ props . placeholder }
316
316
.value=${ props . value }
317
- .autoWidth =${ props . autoWidth } >
317
+ ?auto-width =${ props . autoWidth } >
318
318
</ uui-input >
319
319
< br /> < br />
320
320
< uui-input
@@ -329,15 +329,31 @@ export const AutoWidth: Story = {
329
329
.name=${ props . name }
330
330
.placeholder=${ props . placeholder }
331
331
.value=${ props . value }
332
- .autoWidth =${ props . autoWidth } >
332
+ ?auto-width =${ props . autoWidth } >
333
333
< uui-input
334
334
slot ="prepend "
335
335
placeholder ="Prepend auto-width "
336
- .autoWidth =${ props . autoWidth } > </ uui-input >
336
+ ?auto-width =${ props . autoWidth } > </ uui-input >
337
337
< uui-input
338
338
slot ="append "
339
339
placeholder ="Append auto-width false "> </ uui-input >
340
- </ uui-input > ` ,
340
+ </ uui-input >
341
+
342
+ < br /> < br />
343
+ < uui-input
344
+ .min =${ props . min }
345
+ .max =${ props . max }
346
+ .step=${ props . step }
347
+ .disabled=${ props . disabled }
348
+ .readonly=${ props . readonly }
349
+ .error=${ props . error }
350
+ .label=${ props . label }
351
+ .type=${ props . type }
352
+ .name=${ props . name }
353
+ style="--auto-width-text-margin-right: 50px"
354
+ placeholder="--auto-width-text-margin-right: 50px"
355
+ .value=${ props . value }
356
+ ?auto-width=${ props . autoWidth } > </ uui-input > ` ,
341
357
args : {
342
358
autoWidth : true ,
343
359
placeholder : 'Start typing...' ,
You can’t perform that action at this time.
0 commit comments