@aurodesignsystem-dev/auro-formkit 0.0.0-pr1594.2 → 0.0.0-pr1595.1

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.
Files changed (83) hide show
  1. package/components/bibtemplate/dist/auro-bibtemplate.d.ts +11 -0
  2. package/components/bibtemplate/dist/index.js +13 -0
  3. package/components/bibtemplate/dist/registered.js +13 -0
  4. package/components/checkbox/demo/api.md +17 -11
  5. package/components/checkbox/demo/customize.min.js +23 -6
  6. package/components/checkbox/demo/getting-started.min.js +23 -6
  7. package/components/checkbox/demo/index.min.js +23 -6
  8. package/components/checkbox/dist/auro-checkbox-group.d.ts +8 -0
  9. package/components/checkbox/dist/auro-checkbox.d.ts +4 -0
  10. package/components/checkbox/dist/index.js +23 -6
  11. package/components/checkbox/dist/registered.js +23 -6
  12. package/components/combobox/demo/api.md +26 -18
  13. package/components/combobox/demo/customize.min.js +426 -126
  14. package/components/combobox/demo/getting-started.min.js +426 -126
  15. package/components/combobox/demo/index.min.js +426 -126
  16. package/components/combobox/dist/auro-combobox.d.ts +38 -21
  17. package/components/combobox/dist/index.js +338 -111
  18. package/components/combobox/dist/registered.js +338 -111
  19. package/components/counter/demo/api.md +34 -16
  20. package/components/counter/demo/customize.min.js +204 -64
  21. package/components/counter/demo/index.min.js +204 -64
  22. package/components/counter/dist/auro-counter-button.d.ts +4 -0
  23. package/components/counter/dist/auro-counter-group.d.ts +27 -4
  24. package/components/counter/dist/auro-counter.d.ts +7 -0
  25. package/components/counter/dist/index.js +204 -64
  26. package/components/counter/dist/registered.js +204 -64
  27. package/components/datepicker/demo/api.md +55 -49
  28. package/components/datepicker/demo/customize.min.js +515 -134
  29. package/components/datepicker/demo/index.min.js +515 -134
  30. package/components/datepicker/dist/auro-calendar-cell.d.ts +58 -4
  31. package/components/datepicker/dist/auro-calendar-month.d.ts +10 -4
  32. package/components/datepicker/dist/auro-calendar.d.ts +25 -6
  33. package/components/datepicker/dist/auro-datepicker.d.ts +70 -22
  34. package/components/datepicker/dist/index.js +515 -134
  35. package/components/datepicker/dist/registered.js +515 -134
  36. package/components/dropdown/demo/api.md +25 -22
  37. package/components/dropdown/demo/customize.min.js +107 -37
  38. package/components/dropdown/demo/getting-started.min.js +245 -82
  39. package/components/dropdown/demo/index.min.js +107 -37
  40. package/components/dropdown/dist/auro-dropdown.d.ts +34 -8
  41. package/components/dropdown/dist/auro-dropdownBib.d.ts +17 -5
  42. package/components/dropdown/dist/index.js +107 -37
  43. package/components/dropdown/dist/registered.js +107 -37
  44. package/components/form/demo/customize.min.js +1518 -466
  45. package/components/form/demo/getting-started.min.js +1518 -466
  46. package/components/form/demo/index.min.js +1518 -466
  47. package/components/form/demo/registerDemoDeps.min.js +1518 -466
  48. package/components/helptext/dist/auro-helptext.d.ts +8 -7
  49. package/components/helptext/dist/index.js +7 -2
  50. package/components/helptext/dist/registered.js +7 -2
  51. package/components/input/demo/api.md +30 -30
  52. package/components/input/demo/customize.min.js +138 -45
  53. package/components/input/demo/getting-started.min.js +138 -45
  54. package/components/input/demo/index.min.js +138 -45
  55. package/components/input/dist/base-input.d.ts +79 -25
  56. package/components/input/dist/index.js +138 -45
  57. package/components/input/dist/registered.js +138 -45
  58. package/components/layoutElement/dist/auroElement.d.ts +10 -17
  59. package/components/layoutElement/dist/index.js +20 -20
  60. package/components/layoutElement/dist/registered.js +20 -20
  61. package/components/menu/demo/api.md +31 -27
  62. package/components/menu/demo/index.min.js +108 -35
  63. package/components/menu/dist/auro-menu.d.ts +26 -21
  64. package/components/menu/dist/auro-menuoption.d.ts +27 -1
  65. package/components/menu/dist/index.js +108 -35
  66. package/components/menu/dist/registered.js +108 -35
  67. package/components/radio/demo/api.md +8 -7
  68. package/components/radio/demo/customize.min.js +21 -7
  69. package/components/radio/demo/getting-started.min.js +21 -7
  70. package/components/radio/demo/index.min.js +21 -7
  71. package/components/radio/dist/auro-radio-group.d.ts +8 -3
  72. package/components/radio/dist/auro-radio.d.ts +1 -0
  73. package/components/radio/dist/index.js +21 -7
  74. package/components/radio/dist/registered.js +21 -7
  75. package/components/select/demo/api.md +18 -15
  76. package/components/select/demo/customize.min.js +259 -79
  77. package/components/select/demo/getting-started.min.js +259 -79
  78. package/components/select/demo/index.min.js +259 -79
  79. package/components/select/dist/auro-select.d.ts +17 -0
  80. package/components/select/dist/index.js +171 -64
  81. package/components/select/dist/registered.js +171 -64
  82. package/custom-elements.json +1189 -1336
  83. package/package.json +1 -1
@@ -2,6 +2,7 @@
2
2
  * Base class for auro-input component that provides core input functionality.
3
3
  * @event input - Event fires when the value of an `auro-input` has been changed.
4
4
  * @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` value has changed.
5
+ * @event auroInput-validityChange - Notifies that the `validity` state of the input has changed.
5
6
  */
6
7
  export default class BaseInput extends AuroElement {
7
8
  static get shadowRootOptions(): {
@@ -13,11 +14,30 @@ export default class BaseInput extends AuroElement {
13
14
  slotAssignment?: SlotAssignmentMode;
14
15
  };
15
16
  static get properties(): {
17
+ /**
18
+ * Sets the layout variant of the input.
19
+ * @type {'classic' | 'emphasized' | 'emphasized-left' | 'emphasized-right' | 'snowflake' | 'snowflake-left' | 'snowflake-right'}
20
+ * @default 'classic'
21
+ */
22
+ layout: "classic" | "emphasized" | "emphasized-left" | "emphasized-right" | "snowflake" | "snowflake-left" | "snowflake-right";
23
+ /**
24
+ * Sets the shape of the input.
25
+ * @type {'box' | 'classic' | 'pill' | 'pill-left' | 'pill-right' | 'rounded' | 'snowflake'}
26
+ * @default 'classic'
27
+ */
28
+ shape: "box" | "classic" | "pill" | "pill-left" | "pill-right" | "rounded" | "snowflake";
29
+ /**
30
+ * Sets the size of the input.
31
+ * @type {'xs' | 'sm' | 'md' | 'lg' | 'xl'}
32
+ * @default 'lg'
33
+ */
34
+ size: "xs" | "sm" | "md" | "lg" | "xl";
16
35
  /**
17
36
  * The value for the role attribute.
18
37
  */
19
38
  a11yRole: {
20
39
  type: StringConstructor;
40
+ attribute: string;
21
41
  reflect: boolean;
22
42
  };
23
43
  /**
@@ -25,6 +45,7 @@ export default class BaseInput extends AuroElement {
25
45
  */
26
46
  a11yControls: {
27
47
  type: StringConstructor;
48
+ attribute: string;
28
49
  reflect: boolean;
29
50
  };
30
51
  /**
@@ -32,6 +53,7 @@ export default class BaseInput extends AuroElement {
32
53
  */
33
54
  a11yExpanded: {
34
55
  type: BooleanConstructor;
56
+ attribute: string;
35
57
  reflect: boolean;
36
58
  };
37
59
  /**
@@ -40,6 +62,7 @@ export default class BaseInput extends AuroElement {
40
62
  */
41
63
  a11yActivedescendant: {
42
64
  type: StringConstructor;
65
+ attribute: string;
43
66
  reflect: boolean;
44
67
  };
45
68
  /**
@@ -49,6 +72,7 @@ export default class BaseInput extends AuroElement {
49
72
  */
50
73
  activeLabel: {
51
74
  type: BooleanConstructor;
75
+ attribute: string;
52
76
  reflect: boolean;
53
77
  };
54
78
  /**
@@ -58,12 +82,10 @@ export default class BaseInput extends AuroElement {
58
82
  */
59
83
  appearance: "default" | "inverse";
60
84
  /**
61
- * An enumerated attribute that controls whether and how text input is automatically capitalized as it is entered/edited by the user. [off/none, on/sentences, words, characters].
85
+ * An enumerated attribute that controls whether and how text input is automatically capitalized as it is entered/edited by the user.
86
+ * @type {'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters'}
62
87
  */
63
- autocapitalize: {
64
- type: StringConstructor;
65
- reflect: boolean;
66
- };
88
+ autocapitalize: "off" | "none" | "on" | "sentences" | "words" | "characters";
67
89
  /**
68
90
  * An enumerated attribute that defines what the user agent can suggest for autofill. At this time, only `autocomplete="off"` is supported.
69
91
  */
@@ -73,16 +95,15 @@ export default class BaseInput extends AuroElement {
73
95
  };
74
96
  /**
75
97
  * When set to `off`, stops iOS from auto-correcting words when typed into a text box.
98
+ * @type {'on' | 'off'}
76
99
  */
77
- autocorrect: {
78
- type: StringConstructor;
79
- reflect: boolean;
80
- };
100
+ autocorrect: "on" | "off";
81
101
  /**
82
102
  * Custom help text message for email type validity.
83
103
  */
84
104
  customValidityTypeEmail: {
85
105
  type: StringConstructor;
106
+ attribute: string;
86
107
  };
87
108
  /**
88
109
  * If set, disables the input.
@@ -96,6 +117,7 @@ export default class BaseInput extends AuroElement {
96
117
  */
97
118
  dvInputOnly: {
98
119
  type: BooleanConstructor;
120
+ attribute: string;
99
121
  reflect: boolean;
100
122
  };
101
123
  /**
@@ -110,6 +132,7 @@ export default class BaseInput extends AuroElement {
110
132
  */
111
133
  errorMessage: {
112
134
  type: StringConstructor;
135
+ attribute: string;
113
136
  };
114
137
  /**
115
138
  * Specifies the input mask format.
@@ -141,6 +164,7 @@ export default class BaseInput extends AuroElement {
141
164
  */
142
165
  hideLabelVisually: {
143
166
  type: BooleanConstructor;
167
+ attribute: string;
144
168
  reflect: boolean;
145
169
  };
146
170
  /**
@@ -198,6 +222,7 @@ export default class BaseInput extends AuroElement {
198
222
  */
199
223
  maxLength: {
200
224
  type: NumberConstructor;
225
+ attribute: string;
201
226
  reflect: boolean;
202
227
  };
203
228
  /**
@@ -211,6 +236,7 @@ export default class BaseInput extends AuroElement {
211
236
  */
212
237
  minLength: {
213
238
  type: NumberConstructor;
239
+ attribute: string;
214
240
  reflect: boolean;
215
241
  };
216
242
  /**
@@ -233,6 +259,7 @@ export default class BaseInput extends AuroElement {
233
259
  */
234
260
  noValidate: {
235
261
  type: BooleanConstructor;
262
+ attribute: string;
236
263
  reflect: boolean;
237
264
  };
238
265
  /**
@@ -240,6 +267,7 @@ export default class BaseInput extends AuroElement {
240
267
  */
241
268
  onDark: {
242
269
  type: BooleanConstructor;
270
+ attribute: string;
243
271
  reflect: boolean;
244
272
  };
245
273
  /**
@@ -275,66 +303,77 @@ export default class BaseInput extends AuroElement {
275
303
  */
276
304
  setCustomValidity: {
277
305
  type: StringConstructor;
306
+ attribute: string;
278
307
  };
279
308
  /**
280
309
  * Custom help text message to display when validity = `badInput`.
281
310
  */
282
311
  setCustomValidityBadInput: {
283
312
  type: StringConstructor;
313
+ attribute: string;
284
314
  };
285
315
  /**
286
316
  * Custom help text message to display when validity = `customError`.
287
317
  */
288
318
  setCustomValidityCustomError: {
289
319
  type: StringConstructor;
320
+ attribute: string;
290
321
  };
291
322
  /**
292
323
  * Custom help text message to display for the declared element `type` and type validity fails.
293
324
  */
294
325
  setCustomValidityForType: {
295
326
  type: StringConstructor;
327
+ attribute: string;
296
328
  };
297
329
  /**
298
330
  * Custom help text message to display when validity = `patternMismatch`.
299
331
  */
300
332
  setCustomValidityPatternMismatch: {
301
333
  type: StringConstructor;
334
+ attribute: string;
302
335
  };
303
336
  /**
304
337
  * Custom help text message to display when validity = `rangeOverflow`.
305
338
  */
306
339
  setCustomValidityRangeOverflow: {
307
340
  type: StringConstructor;
341
+ attribute: string;
308
342
  };
309
343
  /**
310
344
  * Custom help text message to display when validity = `rangeUnderflow`.
311
345
  */
312
346
  setCustomValidityRangeUnderflow: {
313
347
  type: StringConstructor;
348
+ attribute: string;
314
349
  };
315
350
  /**
316
351
  * Custom help text message to display when validity = `tooLong`.
317
352
  */
318
353
  setCustomValidityTooLong: {
319
354
  type: StringConstructor;
355
+ attribute: string;
320
356
  };
321
357
  /**
322
358
  * Custom help text message to display when validity = `tooShort`.
323
359
  */
324
360
  setCustomValidityTooShort: {
325
361
  type: StringConstructor;
362
+ attribute: string;
326
363
  };
327
364
  /**
328
365
  * Custom help text message to display when validity = `valueMissing`.
329
366
  */
330
367
  setCustomValidityValueMissing: {
331
368
  type: StringConstructor;
369
+ attribute: string;
332
370
  };
333
371
  /**
334
372
  * @ignore
335
373
  */
336
374
  showPassword: {
337
375
  state: boolean;
376
+ attribute: boolean;
338
377
  };
339
378
  /**
340
379
  * Simple makes the input render without a border.
@@ -344,12 +383,10 @@ export default class BaseInput extends AuroElement {
344
383
  reflect: boolean;
345
384
  };
346
385
  /**
347
- * An enumerated attribute defines whether the element may be checked for spelling errors. [true, false]. When set to `false` the attribute `autocorrect` is set to `off` and `autocapitalize` is set to `none`.
386
+ * An enumerated attribute defines whether the element may be checked for spelling errors. When set to `false` the attribute `autocorrect` is set to `off` and `autocapitalize` is set to `none`.
387
+ * @type {'true' | 'false'}
348
388
  */
349
- spellcheck: {
350
- type: StringConstructor;
351
- reflect: boolean;
352
- };
389
+ spellcheck: "true" | "false";
353
390
  /**
354
391
  * Indicates whether the input is in a dirty state (has been interacted with).
355
392
  * @private
@@ -370,6 +407,7 @@ export default class BaseInput extends AuroElement {
370
407
  */
371
408
  validateOnInput: {
372
409
  type: BooleanConstructor;
410
+ attribute: string;
373
411
  };
374
412
  /**
375
413
  * Specifies the `validityState` this element is in.
@@ -385,17 +423,19 @@ export default class BaseInput extends AuroElement {
385
423
  value: {
386
424
  type: StringConstructor;
387
425
  };
388
- layout: {
389
- type: StringConstructor;
390
- attribute: string;
391
- reflect: boolean;
392
- };
393
426
  };
394
427
  activeLabel: boolean;
395
- /** @private */
428
+ /**
429
+ * @private
430
+ * @type {string[]}
431
+ */
396
432
  private allowedInputTypes;
397
- appearance: string;
398
- /** @private */
433
+ /** @type {'default' | 'inverse'} */
434
+ appearance: "default" | "inverse";
435
+ /**
436
+ * @private
437
+ * @type {Record<string, string>}
438
+ */
399
439
  private dateFormatMap;
400
440
  disabled: boolean;
401
441
  /** @private */
@@ -420,12 +460,13 @@ export default class BaseInput extends AuroElement {
420
460
  onDark: boolean;
421
461
  required: boolean;
422
462
  setCustomValidityForType: string | undefined;
423
- /** @private */
463
+ /**
464
+ * @private
465
+ * @type {string[]}
466
+ */
424
467
  private setSelectionInputTypes;
425
- shape: string;
426
468
  /** @private */
427
469
  private showPassword;
428
- size: string;
429
470
  touched: boolean;
430
471
  /** @private */
431
472
  private uniqueId;
@@ -436,6 +477,19 @@ export default class BaseInput extends AuroElement {
436
477
  /** @private */
437
478
  private validationCCLength;
438
479
  value: string | undefined;
480
+ /**
481
+ * Sets the default `layout`, `shape`, and `size` values.
482
+ *
483
+ * These are assigned in a helper method rather than the constructor body so
484
+ * the CEM analyzer keeps their `@type` string-literal unions (a literal
485
+ * assignment in the constructor would make the analyzer infer `string` and
486
+ * override the union — see AlaskaAirlines/discussions#653, gotcha 1).
487
+ * @private
488
+ * @returns {void}
489
+ */
490
+ private initializeArchitectureDefaults;
491
+ shape: string | undefined;
492
+ size: string | undefined;
439
493
  /**
440
494
  * Read-only Date object representation of `value` for full date formats.
441
495
  * @returns {Date|undefined}