@justeattakeaway/pie-text-input 0.23.5 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -50,7 +50,7 @@
50
50
  "type": {
51
51
  "text": "DefaultProps"
52
52
  },
53
- "default": "{\n type: 'text',\n value: '',\n size: 'medium',\n status: 'default',\n}",
53
+ "default": "{\n type: 'text',\n value: '',\n size: 'medium',\n status: 'default',\n disabled: false,\n readonly: false,\n}",
54
54
  "description": "Default values for optional properties that have default fallback values in the component."
55
55
  }
56
56
  ],
@@ -150,7 +150,7 @@
150
150
  "kind": "field",
151
151
  "name": "name",
152
152
  "type": {
153
- "text": "TextInputProps['name'] | undefined"
153
+ "text": "TextInputProps['name']"
154
154
  },
155
155
  "privacy": "public",
156
156
  "attribute": "name"
@@ -158,9 +158,6 @@
158
158
  {
159
159
  "kind": "field",
160
160
  "name": "disabled",
161
- "type": {
162
- "text": "TextInputProps['disabled'] | undefined"
163
- },
164
161
  "privacy": "public",
165
162
  "attribute": "disabled",
166
163
  "reflects": true
@@ -169,7 +166,7 @@
169
166
  "kind": "field",
170
167
  "name": "pattern",
171
168
  "type": {
172
- "text": "TextInputProps['pattern'] | undefined"
169
+ "text": "TextInputProps['pattern']"
173
170
  },
174
171
  "privacy": "public",
175
172
  "attribute": "pattern"
@@ -178,7 +175,7 @@
178
175
  "kind": "field",
179
176
  "name": "minlength",
180
177
  "type": {
181
- "text": "TextInputProps['minlength'] | undefined"
178
+ "text": "TextInputProps['minlength']"
182
179
  },
183
180
  "privacy": "public",
184
181
  "attribute": "minlength"
@@ -187,7 +184,7 @@
187
184
  "kind": "field",
188
185
  "name": "maxlength",
189
186
  "type": {
190
- "text": "TextInputProps['maxlength'] | undefined"
187
+ "text": "TextInputProps['maxlength']"
191
188
  },
192
189
  "privacy": "public",
193
190
  "attribute": "maxlength"
@@ -196,7 +193,7 @@
196
193
  "kind": "field",
197
194
  "name": "autocomplete",
198
195
  "type": {
199
- "text": "TextInputProps['autocomplete'] | undefined"
196
+ "text": "TextInputProps['autocomplete']"
200
197
  },
201
198
  "privacy": "public",
202
199
  "attribute": "autocomplete"
@@ -205,7 +202,7 @@
205
202
  "kind": "field",
206
203
  "name": "placeholder",
207
204
  "type": {
208
- "text": "TextInputProps['placeholder'] | undefined"
205
+ "text": "TextInputProps['placeholder']"
209
206
  },
210
207
  "privacy": "public",
211
208
  "attribute": "placeholder"
@@ -214,7 +211,7 @@
214
211
  "kind": "field",
215
212
  "name": "autoFocus",
216
213
  "type": {
217
- "text": "TextInputProps['autoFocus'] | undefined"
214
+ "text": "TextInputProps['autoFocus']"
218
215
  },
219
216
  "privacy": "public",
220
217
  "attribute": "autoFocus"
@@ -223,7 +220,7 @@
223
220
  "kind": "field",
224
221
  "name": "inputmode",
225
222
  "type": {
226
- "text": "TextInputProps['inputmode'] | undefined"
223
+ "text": "TextInputProps['inputmode']"
227
224
  },
228
225
  "privacy": "public",
229
226
  "attribute": "inputmode"
@@ -231,9 +228,6 @@
231
228
  {
232
229
  "kind": "field",
233
230
  "name": "readonly",
234
- "type": {
235
- "text": "TextInputProps['readonly'] | undefined"
236
- },
237
231
  "privacy": "public",
238
232
  "attribute": "readonly"
239
233
  },
@@ -241,7 +235,7 @@
241
235
  "kind": "field",
242
236
  "name": "defaultValue",
243
237
  "type": {
244
- "text": "TextInputProps['defaultValue'] | undefined"
238
+ "text": "TextInputProps['defaultValue']"
245
239
  },
246
240
  "privacy": "public",
247
241
  "attribute": "defaultValue"
@@ -250,7 +244,7 @@
250
244
  "kind": "field",
251
245
  "name": "assistiveText",
252
246
  "type": {
253
- "text": "TextInputProps['assistiveText'] | undefined"
247
+ "text": "TextInputProps['assistiveText']"
254
248
  },
255
249
  "privacy": "public",
256
250
  "attribute": "assistiveText"
@@ -258,9 +252,6 @@
258
252
  {
259
253
  "kind": "field",
260
254
  "name": "status",
261
- "type": {
262
- "text": "TextInputProps['status'] | undefined"
263
- },
264
255
  "privacy": "public",
265
256
  "attribute": "status"
266
257
  },
@@ -268,7 +259,7 @@
268
259
  "kind": "field",
269
260
  "name": "step",
270
261
  "type": {
271
- "text": "TextInputProps['step'] | undefined"
262
+ "text": "TextInputProps['step']"
272
263
  },
273
264
  "privacy": "public",
274
265
  "attribute": "step"
@@ -277,7 +268,7 @@
277
268
  "kind": "field",
278
269
  "name": "min",
279
270
  "type": {
280
- "text": "TextInputProps['min'] | undefined"
271
+ "text": "TextInputProps['min']"
281
272
  },
282
273
  "privacy": "public",
283
274
  "attribute": "min"
@@ -286,7 +277,7 @@
286
277
  "kind": "field",
287
278
  "name": "max",
288
279
  "type": {
289
- "text": "TextInputProps['max'] | undefined"
280
+ "text": "TextInputProps['max']"
290
281
  },
291
282
  "privacy": "public",
292
283
  "attribute": "max"
@@ -294,9 +285,6 @@
294
285
  {
295
286
  "kind": "field",
296
287
  "name": "size",
297
- "type": {
298
- "text": "TextInputProps['size'] | undefined"
299
- },
300
288
  "privacy": "public",
301
289
  "attribute": "size"
302
290
  },
@@ -304,7 +292,7 @@
304
292
  "kind": "field",
305
293
  "name": "required",
306
294
  "type": {
307
- "text": "TextInputProps['required'] | undefined"
295
+ "text": "boolean"
308
296
  },
309
297
  "privacy": "public",
310
298
  "default": "false",
@@ -314,7 +302,7 @@
314
302
  "kind": "field",
315
303
  "name": "input",
316
304
  "type": {
317
- "text": "HTMLInputElement | undefined"
305
+ "text": "HTMLInputElement"
318
306
  },
319
307
  "privacy": "private"
320
308
  },
@@ -420,126 +408,114 @@
420
408
  {
421
409
  "name": "name",
422
410
  "type": {
423
- "text": "TextInputProps['name'] | undefined"
411
+ "text": "TextInputProps['name']"
424
412
  },
425
413
  "fieldName": "name"
426
414
  },
427
415
  {
428
416
  "name": "disabled",
429
- "type": {
430
- "text": "TextInputProps['disabled'] | undefined"
431
- },
432
417
  "fieldName": "disabled"
433
418
  },
434
419
  {
435
420
  "name": "pattern",
436
421
  "type": {
437
- "text": "TextInputProps['pattern'] | undefined"
422
+ "text": "TextInputProps['pattern']"
438
423
  },
439
424
  "fieldName": "pattern"
440
425
  },
441
426
  {
442
427
  "name": "minlength",
443
428
  "type": {
444
- "text": "TextInputProps['minlength'] | undefined"
429
+ "text": "TextInputProps['minlength']"
445
430
  },
446
431
  "fieldName": "minlength"
447
432
  },
448
433
  {
449
434
  "name": "maxlength",
450
435
  "type": {
451
- "text": "TextInputProps['maxlength'] | undefined"
436
+ "text": "TextInputProps['maxlength']"
452
437
  },
453
438
  "fieldName": "maxlength"
454
439
  },
455
440
  {
456
441
  "name": "autocomplete",
457
442
  "type": {
458
- "text": "TextInputProps['autocomplete'] | undefined"
443
+ "text": "TextInputProps['autocomplete']"
459
444
  },
460
445
  "fieldName": "autocomplete"
461
446
  },
462
447
  {
463
448
  "name": "placeholder",
464
449
  "type": {
465
- "text": "TextInputProps['placeholder'] | undefined"
450
+ "text": "TextInputProps['placeholder']"
466
451
  },
467
452
  "fieldName": "placeholder"
468
453
  },
469
454
  {
470
455
  "name": "autoFocus",
471
456
  "type": {
472
- "text": "TextInputProps['autoFocus'] | undefined"
457
+ "text": "TextInputProps['autoFocus']"
473
458
  },
474
459
  "fieldName": "autoFocus"
475
460
  },
476
461
  {
477
462
  "name": "inputmode",
478
463
  "type": {
479
- "text": "TextInputProps['inputmode'] | undefined"
464
+ "text": "TextInputProps['inputmode']"
480
465
  },
481
466
  "fieldName": "inputmode"
482
467
  },
483
468
  {
484
469
  "name": "readonly",
485
- "type": {
486
- "text": "TextInputProps['readonly'] | undefined"
487
- },
488
470
  "fieldName": "readonly"
489
471
  },
490
472
  {
491
473
  "name": "defaultValue",
492
474
  "type": {
493
- "text": "TextInputProps['defaultValue'] | undefined"
475
+ "text": "TextInputProps['defaultValue']"
494
476
  },
495
477
  "fieldName": "defaultValue"
496
478
  },
497
479
  {
498
480
  "name": "assistiveText",
499
481
  "type": {
500
- "text": "TextInputProps['assistiveText'] | undefined"
482
+ "text": "TextInputProps['assistiveText']"
501
483
  },
502
484
  "fieldName": "assistiveText"
503
485
  },
504
486
  {
505
487
  "name": "status",
506
- "type": {
507
- "text": "TextInputProps['status'] | undefined"
508
- },
509
488
  "fieldName": "status"
510
489
  },
511
490
  {
512
491
  "name": "step",
513
492
  "type": {
514
- "text": "TextInputProps['step'] | undefined"
493
+ "text": "TextInputProps['step']"
515
494
  },
516
495
  "fieldName": "step"
517
496
  },
518
497
  {
519
498
  "name": "min",
520
499
  "type": {
521
- "text": "TextInputProps['min'] | undefined"
500
+ "text": "TextInputProps['min']"
522
501
  },
523
502
  "fieldName": "min"
524
503
  },
525
504
  {
526
505
  "name": "max",
527
506
  "type": {
528
- "text": "TextInputProps['max'] | undefined"
507
+ "text": "TextInputProps['max']"
529
508
  },
530
509
  "fieldName": "max"
531
510
  },
532
511
  {
533
512
  "name": "size",
534
- "type": {
535
- "text": "TextInputProps['size'] | undefined"
536
- },
537
513
  "fieldName": "size"
538
514
  },
539
515
  {
540
516
  "name": "required",
541
517
  "type": {
542
- "text": "TextInputProps['required'] | undefined"
518
+ "text": "boolean"
543
519
  },
544
520
  "default": "false",
545
521
  "fieldName": "required"
package/dist/index.d.ts CHANGED
@@ -11,7 +11,7 @@ import type { TemplateResult } from 'lit-html';
11
11
  /**
12
12
  * The default values for the `TextInputProps` that are required (i.e. they have a fallback value in the component).
13
13
  */
14
- declare type DefaultProps = ComponentDefaultProps<TextInputProps, 'type' | 'value' | 'size' | 'status'>;
14
+ declare type DefaultProps = ComponentDefaultProps<TextInputProps, 'type' | 'value' | 'size' | 'status' | 'disabled' | 'readonly'>;
15
15
 
16
16
  /**
17
17
  * Default values for optional properties that have default fallback values in the component.
@@ -35,27 +35,27 @@ export declare class PieTextInput extends PieTextInput_base implements TextInput
35
35
  mode: ShadowRootMode;
36
36
  slotAssignment?: SlotAssignmentMode | undefined;
37
37
  };
38
- type?: "number" | "text" | "password" | "url" | "email" | "tel" | undefined;
38
+ type: "number" | "text" | "password" | "url" | "email" | "tel";
39
39
  value: string;
40
- name?: TextInputProps['name'];
41
- disabled?: TextInputProps['disabled'];
42
- pattern?: TextInputProps['pattern'];
43
- minlength?: TextInputProps['minlength'];
44
- maxlength?: TextInputProps['maxlength'];
45
- autocomplete?: TextInputProps['autocomplete'];
46
- placeholder?: TextInputProps['placeholder'];
47
- autoFocus?: TextInputProps['autoFocus'];
48
- inputmode?: TextInputProps['inputmode'];
49
- readonly?: TextInputProps['readonly'];
50
- defaultValue?: TextInputProps['defaultValue'];
51
- assistiveText?: TextInputProps['assistiveText'];
52
- status?: TextInputProps['status'];
53
- step?: TextInputProps['step'];
54
- min?: TextInputProps['min'];
55
- max?: TextInputProps['max'];
56
- size?: TextInputProps['size'];
57
- required?: TextInputProps['required'];
58
- private input?;
40
+ name: TextInputProps['name'];
41
+ disabled: boolean;
42
+ pattern: TextInputProps['pattern'];
43
+ minlength: TextInputProps['minlength'];
44
+ maxlength: TextInputProps['maxlength'];
45
+ autocomplete: TextInputProps['autocomplete'];
46
+ placeholder: TextInputProps['placeholder'];
47
+ autoFocus: TextInputProps['autoFocus'];
48
+ inputmode: TextInputProps['inputmode'];
49
+ readonly: boolean;
50
+ defaultValue: TextInputProps['defaultValue'];
51
+ assistiveText: TextInputProps['assistiveText'];
52
+ status: "default" | "error" | "success";
53
+ step: TextInputProps['step'];
54
+ min: TextInputProps['min'];
55
+ max: TextInputProps['max'];
56
+ size: "small" | "medium" | "large";
57
+ required: boolean;
58
+ private input;
59
59
  focusTarget: HTMLElement;
60
60
  /**
61
61
  * (Read-only) returns a ValidityState with the validity states that this element is in.
@@ -74,7 +74,7 @@ export declare class PieTextInput extends PieTextInput_base implements TextInput
74
74
  * Resets the value to the default value.
75
75
  */
76
76
  formResetCallback(): void;
77
- protected firstUpdated(_changedProperties: PropertyValues<this>): void;
77
+ protected firstUpdated(): void;
78
78
  protected updated(_changedProperties: PropertyValues<this>): void;
79
79
  /**
80
80
  * Handles data processing in response to the input event. The native input event is left to bubble up.