@aurodesignsystem/auro-formkit 5.1.3 → 5.1.4

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 (44) hide show
  1. package/CHANGELOG.md +14 -2
  2. package/components/combobox/README.md +2 -0
  3. package/components/combobox/demo/api.md +190 -62
  4. package/components/combobox/demo/api.min.js +401 -146
  5. package/components/combobox/demo/index.md +2 -0
  6. package/components/combobox/demo/index.min.js +331 -132
  7. package/components/combobox/demo/readme.md +2 -0
  8. package/components/combobox/dist/auro-combobox.d.ts +81 -33
  9. package/components/combobox/dist/index.js +297 -122
  10. package/components/combobox/dist/registered.js +297 -122
  11. package/components/counter/demo/api.min.js +9 -4
  12. package/components/counter/demo/index.min.js +9 -4
  13. package/components/counter/dist/index.js +9 -4
  14. package/components/counter/dist/registered.js +9 -4
  15. package/components/datepicker/demo/api.min.js +61 -16
  16. package/components/datepicker/demo/index.min.js +61 -16
  17. package/components/datepicker/dist/index.js +61 -16
  18. package/components/datepicker/dist/registered.js +61 -16
  19. package/components/dropdown/demo/api.min.js +8 -3
  20. package/components/dropdown/demo/index.min.js +8 -3
  21. package/components/dropdown/dist/index.js +8 -3
  22. package/components/dropdown/dist/registered.js +8 -3
  23. package/components/input/demo/api.md +48 -46
  24. package/components/input/demo/api.min.js +52 -12
  25. package/components/input/demo/index.md +7 -3
  26. package/components/input/demo/index.min.js +52 -12
  27. package/components/input/dist/auro-input.d.ts +4 -0
  28. package/components/input/dist/base-input.d.ts +9 -1
  29. package/components/input/dist/index.js +52 -12
  30. package/components/input/dist/registered.js +52 -12
  31. package/components/layoutElement/dist/index.js +1 -1
  32. package/components/layoutElement/dist/registered.js +1 -1
  33. package/components/menu/demo/api.md +4 -3
  34. package/components/menu/demo/api.min.js +35 -11
  35. package/components/menu/demo/index.min.js +35 -11
  36. package/components/menu/dist/auro-menu.d.ts +3 -2
  37. package/components/menu/dist/auro-menuoption.d.ts +1 -0
  38. package/components/menu/dist/index.js +35 -11
  39. package/components/menu/dist/registered.js +35 -11
  40. package/components/select/demo/api.min.js +44 -15
  41. package/components/select/demo/index.min.js +44 -15
  42. package/components/select/dist/index.js +10 -5
  43. package/components/select/dist/registered.js +10 -5
  44. package/package.json +1 -1
@@ -21,6 +21,8 @@ The following sections are editable by making changes to the following files:
21
21
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/description.md) -->
22
22
  <!-- The below content is automatically added from ./docs/partials/description.md -->
23
23
  `<auro-combobox>` is the combination of [dropdown](http://auro.alaskaair.com/components/auro/dropdown), [input](http://auro.alaskaair.com/components/auro/input), and [menu](http://auro.alaskaair.com/components/auro/menu) and allows users to filter search results from a predefined list as they type. When the user starts typing in the text input, a dropdown of a menu shows up to display options that match the user’s search.
24
+
25
+ By default, `auro-combobox` behaves as a suggestion list. This means any value may be typed into the combobox and the menu list presented effectively provides sample or suggestion options. With the use of the `persistInput` attribute the `auro-combobox` behaves as a filter of menu options. In this mode. typing into the input field will execute the filter but will not set the `value` of the combobox. The combobox value is set by selecting a menu option. Clicking the `X` clear button in the input will remove the current value of the HTML5 input causing the menu filter to reset as well as remove the current value of the combobox.
24
26
  <!-- AURO-GENERATED-CONTENT:END -->
25
27
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/readmeAddlInfo.md) -->
26
28
  <!-- The below content is automatically added from ./docs/partials/readmeAddlInfo.md -->
@@ -7,7 +7,9 @@
7
7
  * @slot label - Defines the content of the label.
8
8
  * @slot helpText - Defines the content of the helpText.
9
9
  * @slot displayValue - Allows custom HTML content to display the selected value when the combobox is not focused. Only works with `snowflake` and `emphasized` layouts.
10
- * @event auroCombobox-valueSet - Notifies that the component has a new value set.
10
+ * @event auroCombobox-valueSet - (Deprecated) Notifies that the component has a new value set.
11
+ * @event input - Notifies that the component has a new value set.
12
+ * @event inputValue - Notifies that the components internal HTML5 input value has changed.
11
13
  * @event auroFormElement-validated - Notifies that the component value(s) have been validated.
12
14
  */
13
15
  export class AuroCombobox extends AuroElement {
@@ -37,7 +39,7 @@ export class AuroCombobox extends AuroElement {
37
39
  reflect: boolean;
38
40
  };
39
41
  /**
40
- * When attribute is present auro-menu will apply checkmarks to selected options.
42
+ * When attribute is present auro-menu will apply check marks to selected options.
41
43
  */
42
44
  checkmark: {
43
45
  type: BooleanConstructor;
@@ -68,6 +70,13 @@ export class AuroCombobox extends AuroElement {
68
70
  reflect: boolean;
69
71
  attribute: boolean;
70
72
  };
73
+ /**
74
+ * If defined, the display value slot content will only mask the HTML5 input element. The inputs label will not be masked.
75
+ */
76
+ dvInputOnly: {
77
+ type: BooleanConstructor;
78
+ reflect: boolean;
79
+ };
71
80
  /**
72
81
  * When defined, sets persistent validity to `customError` and sets the validation message to the attribute value.
73
82
  */
@@ -138,6 +147,13 @@ export class AuroCombobox extends AuroElement {
138
147
  * @type {HTMLElement}
139
148
  */
140
149
  optionSelected: HTMLElement;
150
+ /**
151
+ * If declared, selecting a menu option will not change the input value. By doing so,
152
+ * the current menu filter will be preserved and the user can continue from their last
153
+ * filter state. It is recommended to use this in combination with the `displayValue` slot.
154
+ * @type {Boolean}
155
+ */
156
+ persistInput: boolean;
141
157
  /**
142
158
  * Position where the bib should appear relative to the trigger.
143
159
  * Accepted values:
@@ -183,6 +199,13 @@ export class AuroCombobox extends AuroElement {
183
199
  setCustomValidityValueMissing: {
184
200
  type: StringConstructor;
185
201
  };
202
+ /**
203
+ * Indicates whether the combobox is in a dirty state (has been interacted with).
204
+ * @type {boolean}
205
+ * @default false
206
+ * @private
207
+ */
208
+ touched: boolean;
186
209
  /**
187
210
  * If set, the `icon` attribute will be applied to the trigger `auro-input` element.
188
211
  */
@@ -197,6 +220,13 @@ export class AuroCombobox extends AuroElement {
197
220
  type: StringConstructor;
198
221
  reflect: boolean;
199
222
  };
223
+ /**
224
+ * Specifies the value of the input element within the combobox.
225
+ */
226
+ typedValue: {
227
+ type: StringConstructor;
228
+ reflect: boolean;
229
+ };
200
230
  /**
201
231
  * Specifies the `validityState` this element is in.
202
232
  */
@@ -250,49 +280,52 @@ export class AuroCombobox extends AuroElement {
250
280
  *
251
281
  */
252
282
  static register(name?: string): void;
253
- matchWidth: boolean;
254
- /**
255
- * @private
256
- * @returns {void} Internal defaults.
257
- */
258
- private privateDefaults;
259
- dropdownOpen: any;
260
- dropdownId: any;
261
- onDark: boolean;
262
- noFilter: boolean;
263
- validity: any;
264
- value: any;
265
- optionSelected: any;
266
- checkmark: boolean;
267
283
  disabled: boolean;
284
+ msgSelectionMissing: string;
285
+ noFilter: boolean;
268
286
  noValidate: boolean;
269
- required: boolean;
270
- triggerIcon: boolean;
271
- availableOptions: any[];
272
287
  optionActive: any;
273
- msgSelectionMissing: string;
288
+ persistInput: boolean;
289
+ required: boolean;
290
+ value: any;
291
+ typedValue: any;
292
+ checkmark: boolean;
293
+ dvInputOnly: boolean;
274
294
  fullscreenBreakpoint: string;
275
- largeFullscreenHeadline: boolean;
276
- validation: AuroFormValidation;
277
- runtimeUtils: any;
278
- isHiddenWhileLoading: boolean;
279
- errorMessage: any;
280
- /**
281
- * @private
282
- */
283
- private shape;
284
- /**
285
- * @private
286
- */
287
- private size;
295
+ matchWidth: boolean;
296
+ shape: string;
297
+ size: string;
298
+ triggerIcon: boolean;
288
299
  placement: string;
289
300
  offset: number;
290
301
  noFlip: boolean;
291
302
  autoPlacement: boolean;
303
+ /**
304
+ * @private
305
+ * @returns {void} Internal defaults.
306
+ */
307
+ private privateDefaults;
292
308
  dropdownTag: any;
293
309
  bibtemplateTag: any;
294
310
  inputTag: any;
295
311
  helpTextTag: any;
312
+ availableOptions: any[];
313
+ dropdownId: any;
314
+ dropdownOpen: any;
315
+ errorMessage: any;
316
+ isHiddenWhileLoading: boolean;
317
+ largeFullscreenHeadline: boolean;
318
+ onDark: boolean;
319
+ optionSelected: any;
320
+ runtimeUtils: any;
321
+ touched: boolean;
322
+ validation: AuroFormValidation;
323
+ validity: any;
324
+ /**
325
+ * Returns the current value of the input element within the combobox.
326
+ * @returns {string|undefined} The value of the input element, or undefined if the input is not present.
327
+ */
328
+ get inputValue(): string | undefined;
296
329
  /**
297
330
  * Checks if the element is valid.
298
331
  * @returns {boolean} - Returns true if the element is valid, false otherwise.
@@ -310,6 +343,11 @@ export class AuroCombobox extends AuroElement {
310
343
  * @returns {void}
311
344
  */
312
345
  private syncValuesAndStates;
346
+ /**
347
+ * Update displayValue or input.value, it's called when making a selection.
348
+ * @private
349
+ */
350
+ private updateTriggerTextDisplay;
313
351
  /**
314
352
  * Resets the menu matchWord to true.
315
353
  * @private
@@ -350,6 +388,10 @@ export class AuroCombobox extends AuroElement {
350
388
  * @private
351
389
  */
352
390
  private setInputFocus;
391
+ /**
392
+ * @private
393
+ */
394
+ private setClearBtnFocus;
353
395
  /**
354
396
  * Update menu to default for fullscreen bib, otherwise to this.size and this.shape.
355
397
  * @private
@@ -421,6 +463,7 @@ export class AuroCombobox extends AuroElement {
421
463
  */
422
464
  validate(force?: boolean): void;
423
465
  updated(changedProperties: any): Promise<void>;
466
+ hasValue: boolean;
424
467
  /**
425
468
  * Applies slotted nodes to a target element with a new slot name.
426
469
  * @private
@@ -430,6 +473,11 @@ export class AuroCombobox extends AuroElement {
430
473
  * @returns {void}
431
474
  */
432
475
  private transportAssignedNodes;
476
+ /**
477
+ * Updates the active option in the menu.
478
+ * @param {number} index - Index of the option to make active.
479
+ */
480
+ updateActiveOption(index: number): void;
433
481
  /**
434
482
  * Watch for slot changes and recalculate the menuoptions.
435
483
  * @private