@aurodesignsystem/auro-formkit 2.0.0-beta.45 → 2.0.0-beta.47

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 (71) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/components/bibtemplate/dist/index.js +3 -3
  3. package/components/bibtemplate/dist/registered.js +3 -3
  4. package/components/checkbox/README.md +1 -1
  5. package/components/checkbox/demo/api.min.js +301 -54
  6. package/components/checkbox/demo/index.min.js +301 -54
  7. package/components/checkbox/dist/auro-checkbox-group.d.ts +5 -1
  8. package/components/checkbox/dist/helptextVersion.d.ts +2 -0
  9. package/components/checkbox/dist/index.js +301 -54
  10. package/components/checkbox/dist/registered.js +301 -54
  11. package/components/combobox/README.md +4 -4
  12. package/components/combobox/demo/api.md +2 -2
  13. package/components/combobox/demo/api.min.js +4308 -1776
  14. package/components/combobox/demo/index.md +2 -2
  15. package/components/combobox/demo/index.min.js +4308 -1776
  16. package/components/combobox/dist/index.js +4295 -1763
  17. package/components/combobox/dist/registered.js +4295 -1763
  18. package/components/counter/README.md +1 -1
  19. package/components/counter/demo/api.min.js +272 -77
  20. package/components/counter/demo/index.min.js +272 -77
  21. package/components/counter/dist/index.js +272 -77
  22. package/components/counter/dist/registered.js +272 -77
  23. package/components/datepicker/README.md +6 -4
  24. package/components/datepicker/demo/api.js +2 -2
  25. package/components/datepicker/demo/api.md +134 -48
  26. package/components/datepicker/demo/api.min.js +5628 -2100
  27. package/components/datepicker/demo/index.md +6 -0
  28. package/components/datepicker/demo/index.min.js +5623 -2094
  29. package/components/datepicker/dist/auro-calendar-month.d.ts +15 -0
  30. package/components/datepicker/dist/auro-calendar.d.ts +24 -0
  31. package/components/datepicker/dist/auro-datepicker.d.ts +31 -11
  32. package/components/datepicker/dist/bibtemplateVersion.d.ts +2 -0
  33. package/components/datepicker/dist/index.js +5623 -2094
  34. package/components/datepicker/dist/registered.js +5623 -2094
  35. package/components/datepicker/dist/utilities.d.ts +25 -0
  36. package/components/datepicker/dist/utilitiesCalendar.d.ts +2 -1
  37. package/components/dropdown/README.md +1 -1
  38. package/components/dropdown/demo/api.min.js +235 -37
  39. package/components/dropdown/demo/index.min.js +235 -37
  40. package/components/dropdown/dist/auro-dropdown.d.ts +4 -0
  41. package/components/dropdown/dist/helptextVersion.d.ts +2 -0
  42. package/components/dropdown/dist/index.js +235 -37
  43. package/components/dropdown/dist/registered.js +235 -37
  44. package/components/form/README.md +1 -1
  45. package/components/helptext/dist/index.js +2 -0
  46. package/components/helptext/dist/registered.js +2 -0
  47. package/components/input/README.md +1 -1
  48. package/components/input/demo/api.md +91 -89
  49. package/components/input/demo/api.min.js +4064 -1727
  50. package/components/input/demo/index.md +2 -2
  51. package/components/input/demo/index.min.js +4064 -1727
  52. package/components/input/dist/auro-input.d.ts +4 -1
  53. package/components/input/dist/base-input.d.ts +46 -12
  54. package/components/input/dist/helptextVersion.d.ts +2 -0
  55. package/components/input/dist/index.js +4064 -1727
  56. package/components/input/dist/registered.js +4064 -1727
  57. package/components/input/dist/utilities.d.ts +25 -0
  58. package/components/menu/README.md +1 -1
  59. package/components/radio/README.md +1 -1
  60. package/components/radio/demo/api.min.js +300 -53
  61. package/components/radio/demo/index.min.js +300 -53
  62. package/components/radio/dist/auro-radio-group.d.ts +5 -1
  63. package/components/radio/dist/helptextVersion.d.ts +2 -0
  64. package/components/radio/dist/index.js +300 -53
  65. package/components/radio/dist/registered.js +300 -53
  66. package/components/select/README.md +3 -3
  67. package/components/select/demo/api.min.js +262 -67
  68. package/components/select/demo/index.min.js +262 -67
  69. package/components/select/dist/index.js +251 -56
  70. package/components/select/dist/registered.js +251 -56
  71. package/package.json +1 -1
@@ -16,13 +16,16 @@ export class AuroInput extends BaseInput {
16
16
  * @private
17
17
  */
18
18
  private buttonTag;
19
+ /**
20
+ * @private
21
+ */
22
+ private helpTextTag;
19
23
  /**
20
24
  * Function to determine if the input is meant to render an icon visualizing the input type.
21
25
  * @private
22
26
  * @returns {boolean} - Returns true if the input type is meant to render an icon.
23
27
  */
24
28
  private hasTypeIcon;
25
- isDateType(): boolean;
26
29
  render(): import("lit-html").TemplateResult;
27
30
  }
28
31
  import BaseInput from './base-input.js';
@@ -25,7 +25,7 @@ export default class BaseInput extends LitElement {
25
25
  reflect: boolean;
26
26
  };
27
27
  /**
28
- * 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]
28
+ * 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].
29
29
  */
30
30
  autocapitalize: {
31
31
  type: StringConstructor;
@@ -49,6 +49,9 @@ export default class BaseInput extends LitElement {
49
49
  disabled: {
50
50
  type: BooleanConstructor;
51
51
  };
52
+ /**
53
+ * When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
54
+ */
52
55
  error: {
53
56
  type: StringConstructor;
54
57
  reflect: boolean;
@@ -59,6 +62,13 @@ export default class BaseInput extends LitElement {
59
62
  errorMessage: {
60
63
  type: StringConstructor;
61
64
  };
65
+ /**
66
+ * Specifies the input mask format.
67
+ */
68
+ format: {
69
+ type: StringConstructor;
70
+ reflect: boolean;
71
+ };
62
72
  /**
63
73
  * If set, will render an icon inside the input to the left of the value. Support is limited to auro-input instances with credit card format.
64
74
  */
@@ -211,7 +221,7 @@ export default class BaseInput extends LitElement {
211
221
  type: StringConstructor;
212
222
  };
213
223
  /**
214
- * Populates the `type` attribute on the input. Allowed values are `password`, `email`, `credit-card`, `month-day-year`, `month-year`, `year-month-day` or `text`. If given value is not allowed or set, defaults to `text`.
224
+ * Populates the `type` attribute on the input. Allowed values are `password`, `email`, `credit-card`, `date`, `tel` or `text`. If given value is not allowed or set, defaults to `text`.
215
225
  */
216
226
  type: {
217
227
  type: StringConstructor;
@@ -254,6 +264,7 @@ export default class BaseInput extends LitElement {
254
264
  * @returns {void}
255
265
  */
256
266
  private privateDefaults;
267
+ util: AuroInputUtilities;
257
268
  validation: AuroFormValidation;
258
269
  inputIconName: any;
259
270
  showPassword: any;
@@ -261,19 +272,38 @@ export default class BaseInput extends LitElement {
261
272
  hasValue: boolean;
262
273
  label: string;
263
274
  allowedInputTypes: string[];
264
- dateInputTypes: string[];
265
- autoFormattingTypes: string[];
266
275
  /**
267
276
  * Credit Card is not included as this caused cursor placement issues.
268
277
  * The Safari issue.
269
278
  */
270
279
  setSelectionInputTypes: string[];
280
+ dateFormatMap: {
281
+ 'mm/dd/yyyy': string;
282
+ 'dd/mm/yyyy': string;
283
+ 'yyyy/mm/dd': string;
284
+ 'yyyy/dd/mm': string;
285
+ 'mm/yy': string;
286
+ 'yy/mm': string;
287
+ 'mm/yyyy': string;
288
+ 'yyyy/mm': string;
289
+ yy: string;
290
+ yyyy: string;
291
+ mm: string;
292
+ dd: string;
293
+ 'dd/mm': string;
294
+ 'mm/dd': string;
295
+ };
271
296
  uniqueId: string;
272
297
  firstUpdated(): void;
273
298
  inputElement: HTMLInputElement;
274
299
  labelElement: HTMLLabelElement;
300
+ format: any;
275
301
  ValidityMessageOverride: any;
276
- cursorPosition: number;
302
+ /**
303
+ * @private
304
+ * @returns {void} Sets the default help text for the input.
305
+ */
306
+ private setCustomHelpTextMessage;
277
307
  /**
278
308
  * LitElement lifecycle method. Called after the DOM has been updated.
279
309
  * @param {Map<string, any>} changedProperties - Keys are the names of changed properties, values are the corresponding previous values.
@@ -283,14 +313,19 @@ export default class BaseInput extends LitElement {
283
313
  autocorrect: any;
284
314
  /**
285
315
  * @private
286
- * @returns {void} Handles cursor position when input auto-formats.
316
+ * @returns {void} Notify validity state changed via event.
287
317
  */
288
- private autoFormatHandling;
318
+ private notifyValidityChange;
289
319
  /**
320
+ * Sets up IMasks and logic based on auto-formatting requirements.
290
321
  * @private
291
- * @returns {void} Notify validity state changed via event.
322
+ * @returns {void}
292
323
  */
293
- private notifyValidityChange;
324
+ private configureAutoFormatting;
325
+ maskInstance: import("imask").InputMask<import("imask").FactoryArg>;
326
+ value: string;
327
+ formattedDate: any;
328
+ comparisonDate: any;
294
329
  /**
295
330
  * @private
296
331
  * @returns {string}
@@ -321,7 +356,6 @@ export default class BaseInput extends LitElement {
321
356
  * @return {void}
322
357
  */
323
358
  private handleClickClear;
324
- value: string;
325
359
  /**
326
360
  * @private
327
361
  * @return {void}
@@ -362,7 +396,7 @@ export default class BaseInput extends LitElement {
362
396
  * @returns {void}
363
397
  */
364
398
  private configureDataForType;
365
- dateStrLength: number;
399
+ lengthForType: any;
366
400
  /**
367
401
  * Validates against list of supported this.allowedInputTypes; return type=text if invalid request.
368
402
  * @private
@@ -373,7 +407,6 @@ export default class BaseInput extends LitElement {
373
407
  /**
374
408
  * Determines default help text string.
375
409
  * @private
376
- * @param {string} type Value entered into component prop.
377
410
  * @returns {string} Evaluates pre-determined help text.
378
411
  */
379
412
  private getHelpText;
@@ -416,4 +449,5 @@ export default class BaseInput extends LitElement {
416
449
  private matchInputValueToCreditCard;
417
450
  }
418
451
  import { LitElement } from "lit";
452
+ import { AuroInputUtilities } from "./utilities.js";
419
453
  import AuroFormValidation from '@auro-formkit/form-validation';
@@ -0,0 +1,2 @@
1
+ declare const _default: "1.0.0";
2
+ export default _default;