@@ -103,13 +103,24 @@ export const MinMaxLength: Story = {
103
103
minlength="3"
104
104
maxlength="4"
105
105
minlength-message="Minimum 3"
106
- maxlength-message="Maximum 4"></uui-input>` ,
106
+ maxlength-message="Maximum 4">
107
+ </uui-input>` ,
107
108
} ,
108
109
} ,
109
110
} ,
110
111
} ;
111
112
112
113
export const NumberInput : Story = {
114
+ render : props => html `
115
+ < uui-input
116
+ .type =${ props . type }
117
+ .placeholder =${ props . placeholder }
118
+ .step=${ props . step }
119
+ .min=${ props . min }
120
+ .max=${ props . max }
121
+ .value=${ props . value } >
122
+ </ uui-input >
123
+ ` ,
113
124
args : {
114
125
placeholder : 'Input number' ,
115
126
type : 'number' ,
@@ -135,6 +146,14 @@ export const NumberInput: Story = {
135
146
} ;
136
147
137
148
export const DateTimeLocal : Story = {
149
+ render : props => html `
150
+ < uui-input
151
+ .type =${ props . type }
152
+ .min =${ props . min }
153
+ .max=${ props . max }
154
+ .value=${ props . value } >
155
+ </ uui-input >
156
+ ` ,
138
157
args : {
139
158
type : 'datetime-local' ,
140
159
value : '2023-04-20T10:00' ,
@@ -147,7 +166,7 @@ export const DateTimeLocal: Story = {
147
166
} ,
148
167
docs : {
149
168
source : {
150
- code : ` <uui-input
169
+ code : `<uui-input
151
170
type="datetime-local"
152
171
min="2023-04-13T10:00"
153
172
value="2023-04-20T10:00"
@@ -159,7 +178,14 @@ export const DateTimeLocal: Story = {
159
178
} ;
160
179
161
180
export const Disabled : Story = {
162
- args : { disabled : true } ,
181
+ render : props => html `
182
+ < uui-input
183
+ .type =${ props . type }
184
+ .value =${ props . value }
185
+ ?disabled=${ props . disabled } >
186
+ </ uui-input >
187
+ ` ,
188
+ args : { disabled : true , value : 'Disabled' } ,
163
189
parameters : {
164
190
controls : { include : [ 'disabled' , 'type' , 'value' ] } ,
165
191
docs : {
@@ -170,7 +196,30 @@ export const Disabled: Story = {
170
196
} ,
171
197
} ;
172
198
199
+ export const Readonly : Story = {
200
+ render : props => html `
201
+ < uui-input
202
+ .type =${ props . type }
203
+ .value =${ props . value }
204
+ ?readonly=${ props . readonly } >
205
+ </ uui-input >
206
+ ` ,
207
+ args : { readonly : true , value : 'Readonly' } ,
208
+ parameters : {
209
+ controls : { include : [ 'readonly' , 'type' , 'value' ] } ,
210
+ docs : {
211
+ source : {
212
+ code : `<uui-input readonly></uui-input>` ,
213
+ } ,
214
+ } ,
215
+ } ,
216
+ } ;
217
+
173
218
export const Error : Story = {
219
+ render : props => html `
220
+ < uui-input .type =${ props . type } .value =${ props . value } ?error=${ props . error } >
221
+ </ uui-input >
222
+ ` ,
174
223
args : { error : true , label : 'Error' } ,
175
224
parameters : {
176
225
controls : { include : [ 'error' , 'type' , 'value' ] } ,
@@ -334,10 +383,10 @@ export const AutoWidth: Story = {
334
383
< uui-input
335
384
slot ="prepend "
336
385
placeholder ="Prepend auto-width "
337
- ?auto-width =${ props . autoWidth } > </ uui-input >
338
- < uui-input
339
- slot ="append "
340
- placeholder =" Append auto-width false " > </ uui-input >
386
+ ?auto-width =${ props . autoWidth } >
387
+ </ uui-input >
388
+ < uui-input slot ="append " placeholder =" Append auto-width false " >
389
+ </ uui-input >
341
390
</ uui-input >
342
391
343
392
< br /> < br />
@@ -354,7 +403,8 @@ export const AutoWidth: Story = {
354
403
style="--auto-width-text-margin-right: 50px"
355
404
placeholder="--auto-width-text-margin-right: 50px"
356
405
.value=${ props . value }
357
- ?auto-width=${ props . autoWidth } > </ uui-input > ` ,
406
+ ?auto-width=${ props . autoWidth } >
407
+ </ uui-input > ` ,
358
408
args : {
359
409
autoWidth : true ,
360
410
placeholder : 'Start typing...' ,
0 commit comments