@aurodesignsystem/auro-formkit 2.1.0-beta.4 → 2.1.0-beta.6

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 (54) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/components/bibtemplate/dist/index.js +2 -2
  3. package/components/bibtemplate/dist/registered.js +2 -2
  4. package/components/checkbox/README.md +1 -1
  5. package/components/checkbox/demo/readme.md +1 -1
  6. package/components/combobox/README.md +1 -1
  7. package/components/combobox/demo/api.md +122 -19
  8. package/components/combobox/demo/api.min.js +110 -16
  9. package/components/combobox/demo/index.min.js +110 -16
  10. package/components/combobox/demo/readme.md +1 -1
  11. package/components/combobox/dist/auro-combobox.d.ts +42 -0
  12. package/components/combobox/dist/index.js +110 -16
  13. package/components/combobox/dist/registered.js +110 -16
  14. package/components/counter/README.md +1 -1
  15. package/components/counter/demo/api.md +113 -10
  16. package/components/counter/demo/api.min.js +128 -39
  17. package/components/counter/demo/index.min.js +128 -39
  18. package/components/counter/demo/readme.md +1 -1
  19. package/components/counter/dist/auro-counter-group.d.ts +55 -17
  20. package/components/counter/dist/index.js +128 -39
  21. package/components/counter/dist/registered.js +128 -39
  22. package/components/datepicker/README.md +1 -1
  23. package/components/datepicker/demo/api.md +61 -0
  24. package/components/datepicker/demo/api.min.js +112 -17
  25. package/components/datepicker/demo/index.min.js +112 -17
  26. package/components/datepicker/demo/readme.md +1 -1
  27. package/components/datepicker/dist/auro-datepicker.d.ts +42 -0
  28. package/components/datepicker/dist/index.js +112 -17
  29. package/components/datepicker/dist/registered.js +112 -17
  30. package/components/dropdown/README.md +1 -1
  31. package/components/dropdown/demo/api.md +166 -19
  32. package/components/dropdown/demo/api.min.js +56 -14
  33. package/components/dropdown/demo/index.min.js +56 -14
  34. package/components/dropdown/demo/readme.md +1 -1
  35. package/components/dropdown/dist/auro-dropdown.d.ts +46 -6
  36. package/components/dropdown/dist/index.js +56 -14
  37. package/components/dropdown/dist/registered.js +56 -14
  38. package/components/form/README.md +1 -1
  39. package/components/form/demo/readme.md +1 -1
  40. package/components/input/README.md +1 -1
  41. package/components/input/demo/readme.md +1 -1
  42. package/components/menu/README.md +1 -1
  43. package/components/menu/demo/readme.md +1 -1
  44. package/components/radio/README.md +1 -1
  45. package/components/radio/demo/readme.md +1 -1
  46. package/components/select/README.md +1 -1
  47. package/components/select/demo/api.md +120 -17
  48. package/components/select/demo/api.min.js +110 -16
  49. package/components/select/demo/index.min.js +110 -16
  50. package/components/select/demo/readme.md +1 -1
  51. package/components/select/dist/auro-select.d.ts +42 -0
  52. package/components/select/dist/index.js +110 -16
  53. package/components/select/dist/registered.js +110 -16
  54. package/package.json +1 -1
@@ -13,6 +13,14 @@
13
13
  */
14
14
  export class AuroSelect extends LitElement {
15
15
  static get properties(): {
16
+ /**
17
+ * If declared, bib's position will be automatically calculated where to appear.
18
+ * @default false
19
+ */
20
+ autoPlacement: {
21
+ type: BooleanConstructor;
22
+ reflect: boolean;
23
+ };
16
24
  /**
17
25
  * When attribute is present, element shows disabled state.
18
26
  */
@@ -51,6 +59,15 @@ export class AuroSelect extends LitElement {
51
59
  type: BooleanConstructor;
52
60
  reflect: boolean;
53
61
  };
62
+ /**
63
+ * If declared, the bib will NOT flip to an alternate position
64
+ * when there isn't enough space in the specified `placement`.
65
+ * @default false
66
+ */
67
+ noFlip: {
68
+ type: BooleanConstructor;
69
+ reflect: boolean;
70
+ };
54
71
  /**
55
72
  * If set, disables auto-validation on blur.
56
73
  */
@@ -58,6 +75,14 @@ export class AuroSelect extends LitElement {
58
75
  type: BooleanConstructor;
59
76
  reflect: boolean;
60
77
  };
78
+ /**
79
+ * Gap between the trigger element and bib.
80
+ * @default 0
81
+ */
82
+ offset: {
83
+ type: NumberConstructor;
84
+ reflect: boolean;
85
+ };
61
86
  /**
62
87
  * @private
63
88
  */
@@ -77,6 +102,19 @@ export class AuroSelect extends LitElement {
77
102
  options: {
78
103
  type: ArrayConstructor;
79
104
  };
105
+ /**
106
+ * Position where the bib should appear relative to the trigger.
107
+ * Accepted values:
108
+ * "top" | "right" | "bottom" | "left" |
109
+ * "bottom-start" | "top-start" | "top-end" |
110
+ * "right-start" | "right-end" | "bottom-end" |
111
+ * "left-start" | "left-end"
112
+ * @default bottom-start
113
+ */
114
+ placement: {
115
+ type: StringConstructor;
116
+ reflect: boolean;
117
+ };
80
118
  /**
81
119
  * Populates the `required` attribute on the element. Used for client-side validation.
82
120
  */
@@ -142,6 +180,10 @@ export class AuroSelect extends LitElement {
142
180
  *
143
181
  */
144
182
  static register(name?: string): void;
183
+ placement: string;
184
+ offset: number;
185
+ noFlip: boolean;
186
+ autoPlacement: boolean;
145
187
  /**
146
188
  * @private
147
189
  */
@@ -3340,12 +3340,17 @@ class AuroDropdown extends LitElement {
3340
3340
  this.disabled = false;
3341
3341
  this.error = false;
3342
3342
  this.inset = false;
3343
- this.placement = 'bottom-start';
3344
3343
  this.rounded = false;
3345
3344
  this.tabIndex = 0;
3346
3345
  this.noToggle = false;
3347
3346
  this.labeled = true;
3348
3347
 
3348
+ // floaterConfig
3349
+ this.placement = 'bottom-start';
3350
+ this.offset = 0;
3351
+ this.noFlip = false;
3352
+ this.autoPlacement = false;
3353
+
3349
3354
  /**
3350
3355
  * @private
3351
3356
  */
@@ -3366,16 +3371,6 @@ class AuroDropdown extends LitElement {
3366
3371
  */
3367
3372
  this.floater = new AuroFloatingUI();
3368
3373
 
3369
- /**
3370
- * @private
3371
- */
3372
- this.floaterConfig = {
3373
- placement: 'bottom-start',
3374
- flip: true,
3375
- autoPlacement: false,
3376
- offset: 0,
3377
- };
3378
-
3379
3374
  /**
3380
3375
  * Generate unique names for dependency components.
3381
3376
  */
@@ -3397,6 +3392,18 @@ class AuroDropdown extends LitElement {
3397
3392
  this.helpTextTag = versioning.generateTag('auro-formkit-dropdown-helptext', helpTextVersion, AuroHelpText);
3398
3393
  }
3399
3394
 
3395
+ /**
3396
+ * @ignore
3397
+ */
3398
+ get floaterConfig() {
3399
+ return {
3400
+ placement: this.placement,
3401
+ flip: !this.noFlip,
3402
+ autoPlacement: this.autoPlacement,
3403
+ offset: this.offset,
3404
+ };
3405
+ }
3406
+
3400
3407
  /**
3401
3408
  * Public method to hide the dropdown.
3402
3409
  * @returns {void}
@@ -3417,6 +3424,15 @@ class AuroDropdown extends LitElement {
3417
3424
  static get properties() {
3418
3425
  return {
3419
3426
 
3427
+ /**
3428
+ * If declared, bib's position will be automatically calculated where to appear.
3429
+ * @default false
3430
+ */
3431
+ autoPlacement: {
3432
+ type: Boolean,
3433
+ reflect: true
3434
+ },
3435
+
3420
3436
  /**
3421
3437
  * If declared, applies a border around the trigger slot.
3422
3438
  */
@@ -3501,7 +3517,7 @@ class AuroDropdown extends LitElement {
3501
3517
  */
3502
3518
  isBibFullscreen: {
3503
3519
  type: Boolean,
3504
- reflect: true,
3520
+ reflect: true
3505
3521
  },
3506
3522
 
3507
3523
  /**
@@ -3544,6 +3560,16 @@ class AuroDropdown extends LitElement {
3544
3560
  reflect: true
3545
3561
  },
3546
3562
 
3563
+ /**
3564
+ * If declared, the bib will NOT flip to an alternate position
3565
+ * when there isn't enough space in the specified `placement`.
3566
+ * @default false
3567
+ */
3568
+ noFlip: {
3569
+ type: Boolean,
3570
+ reflect: true
3571
+ },
3572
+
3547
3573
  /**
3548
3574
  * If declared, the dropdown will not hide when moving focus outside the element.
3549
3575
  */
@@ -3560,16 +3586,32 @@ class AuroDropdown extends LitElement {
3560
3586
  reflect: true
3561
3587
  },
3562
3588
 
3589
+ /**
3590
+ * Gap between the trigger element and bib.
3591
+ * @default 0
3592
+ */
3593
+ offset: {
3594
+ type: Number,
3595
+ reflect: true
3596
+ },
3597
+
3563
3598
  onSlotChange: {
3564
3599
  type: Function,
3565
3600
  reflect: false
3566
3601
  },
3567
3602
 
3568
3603
  /**
3569
- * @private
3604
+ * Position where the bib should appear relative to the trigger.
3605
+ * Accepted values:
3606
+ * "top" | "right" | "bottom" | "left" |
3607
+ * "bottom-start" | "top-start" | "top-end" |
3608
+ * "right-start" | "right-end" | "bottom-end" |
3609
+ * "left-start" | "left-end"
3610
+ * @default bottom-start
3570
3611
  */
3571
3612
  placement: {
3572
- type: String
3613
+ type: String,
3614
+ reflect: true
3573
3615
  },
3574
3616
 
3575
3617
  /**
@@ -4736,11 +4778,11 @@ class AuroBibtemplate extends LitElement {
4736
4778
  return {
4737
4779
  isFullscreen: {
4738
4780
  type: Boolean,
4739
- reflect: true,
4781
+ reflect: true
4740
4782
  },
4741
4783
  large: {
4742
4784
  type: Boolean,
4743
- reflect: true,
4785
+ reflect: true
4744
4786
  }
4745
4787
  };
4746
4788
  }
@@ -4979,6 +5021,12 @@ class AuroSelect extends LitElement {
4979
5021
  const idSubstrEnd = 8;
4980
5022
  const idSubstrStart = 2;
4981
5023
 
5024
+ // floaterConfig
5025
+ this.placement = 'bottom-start';
5026
+ this.offset = 0;
5027
+ this.noFlip = false;
5028
+ this.autoPlacement = false;
5029
+
4982
5030
  /**
4983
5031
  * @private
4984
5032
  */
@@ -5035,6 +5083,15 @@ class AuroSelect extends LitElement {
5035
5083
  static get properties() {
5036
5084
  return {
5037
5085
 
5086
+ /**
5087
+ * If declared, bib's position will be automatically calculated where to appear.
5088
+ * @default false
5089
+ */
5090
+ autoPlacement: {
5091
+ type: Boolean,
5092
+ reflect: true
5093
+ },
5094
+
5038
5095
  /**
5039
5096
  * When attribute is present, element shows disabled state.
5040
5097
  */
@@ -5078,6 +5135,16 @@ class AuroSelect extends LitElement {
5078
5135
  reflect: true
5079
5136
  },
5080
5137
 
5138
+ /**
5139
+ * If declared, the bib will NOT flip to an alternate position
5140
+ * when there isn't enough space in the specified `placement`.
5141
+ * @default false
5142
+ */
5143
+ noFlip: {
5144
+ type: Boolean,
5145
+ reflect: true
5146
+ },
5147
+
5081
5148
  /**
5082
5149
  * If set, disables auto-validation on blur.
5083
5150
  */
@@ -5086,6 +5153,15 @@ class AuroSelect extends LitElement {
5086
5153
  reflect: true
5087
5154
  },
5088
5155
 
5156
+ /**
5157
+ * Gap between the trigger element and bib.
5158
+ * @default 0
5159
+ */
5160
+ offset: {
5161
+ type: Number,
5162
+ reflect: true
5163
+ },
5164
+
5089
5165
  /**
5090
5166
  * @private
5091
5167
  */
@@ -5109,6 +5185,20 @@ class AuroSelect extends LitElement {
5109
5185
  type: Array
5110
5186
  },
5111
5187
 
5188
+ /**
5189
+ * Position where the bib should appear relative to the trigger.
5190
+ * Accepted values:
5191
+ * "top" | "right" | "bottom" | "left" |
5192
+ * "bottom-start" | "top-start" | "top-end" |
5193
+ * "right-start" | "right-end" | "bottom-end" |
5194
+ * "left-start" | "left-end"
5195
+ * @default bottom-start
5196
+ */
5197
+ placement: {
5198
+ type: String,
5199
+ reflect: true
5200
+ },
5201
+
5112
5202
  /**
5113
5203
  * Populates the `required` attribute on the element. Used for client-side validation.
5114
5204
  */
@@ -5571,6 +5661,10 @@ class AuroSelect extends LitElement {
5571
5661
  .fullscreenBreakpoint="${this.fullscreenBreakpoint}"
5572
5662
  ?matchWidth="${!this.flexMenuWidth}"
5573
5663
  chevron
5664
+ .placement="${this.placement}"
5665
+ .offset="${this.offset}"
5666
+ ?autoPlacement="${this.autoPlacement}"
5667
+ ?noFlip="${this.noFlip}"
5574
5668
  part="dropdown">
5575
5669
  <span slot="trigger" aria-haspopup="true" id="triggerFocus">
5576
5670
  <span id="placeholder" class="${classMap(placeholderClass)}"><slot name="placeholder"></slot></span>
@@ -3340,12 +3340,17 @@ class AuroDropdown extends LitElement {
3340
3340
  this.disabled = false;
3341
3341
  this.error = false;
3342
3342
  this.inset = false;
3343
- this.placement = 'bottom-start';
3344
3343
  this.rounded = false;
3345
3344
  this.tabIndex = 0;
3346
3345
  this.noToggle = false;
3347
3346
  this.labeled = true;
3348
3347
 
3348
+ // floaterConfig
3349
+ this.placement = 'bottom-start';
3350
+ this.offset = 0;
3351
+ this.noFlip = false;
3352
+ this.autoPlacement = false;
3353
+
3349
3354
  /**
3350
3355
  * @private
3351
3356
  */
@@ -3366,16 +3371,6 @@ class AuroDropdown extends LitElement {
3366
3371
  */
3367
3372
  this.floater = new AuroFloatingUI();
3368
3373
 
3369
- /**
3370
- * @private
3371
- */
3372
- this.floaterConfig = {
3373
- placement: 'bottom-start',
3374
- flip: true,
3375
- autoPlacement: false,
3376
- offset: 0,
3377
- };
3378
-
3379
3374
  /**
3380
3375
  * Generate unique names for dependency components.
3381
3376
  */
@@ -3397,6 +3392,18 @@ class AuroDropdown extends LitElement {
3397
3392
  this.helpTextTag = versioning.generateTag('auro-formkit-dropdown-helptext', helpTextVersion, AuroHelpText);
3398
3393
  }
3399
3394
 
3395
+ /**
3396
+ * @ignore
3397
+ */
3398
+ get floaterConfig() {
3399
+ return {
3400
+ placement: this.placement,
3401
+ flip: !this.noFlip,
3402
+ autoPlacement: this.autoPlacement,
3403
+ offset: this.offset,
3404
+ };
3405
+ }
3406
+
3400
3407
  /**
3401
3408
  * Public method to hide the dropdown.
3402
3409
  * @returns {void}
@@ -3417,6 +3424,15 @@ class AuroDropdown extends LitElement {
3417
3424
  static get properties() {
3418
3425
  return {
3419
3426
 
3427
+ /**
3428
+ * If declared, bib's position will be automatically calculated where to appear.
3429
+ * @default false
3430
+ */
3431
+ autoPlacement: {
3432
+ type: Boolean,
3433
+ reflect: true
3434
+ },
3435
+
3420
3436
  /**
3421
3437
  * If declared, applies a border around the trigger slot.
3422
3438
  */
@@ -3501,7 +3517,7 @@ class AuroDropdown extends LitElement {
3501
3517
  */
3502
3518
  isBibFullscreen: {
3503
3519
  type: Boolean,
3504
- reflect: true,
3520
+ reflect: true
3505
3521
  },
3506
3522
 
3507
3523
  /**
@@ -3544,6 +3560,16 @@ class AuroDropdown extends LitElement {
3544
3560
  reflect: true
3545
3561
  },
3546
3562
 
3563
+ /**
3564
+ * If declared, the bib will NOT flip to an alternate position
3565
+ * when there isn't enough space in the specified `placement`.
3566
+ * @default false
3567
+ */
3568
+ noFlip: {
3569
+ type: Boolean,
3570
+ reflect: true
3571
+ },
3572
+
3547
3573
  /**
3548
3574
  * If declared, the dropdown will not hide when moving focus outside the element.
3549
3575
  */
@@ -3560,16 +3586,32 @@ class AuroDropdown extends LitElement {
3560
3586
  reflect: true
3561
3587
  },
3562
3588
 
3589
+ /**
3590
+ * Gap between the trigger element and bib.
3591
+ * @default 0
3592
+ */
3593
+ offset: {
3594
+ type: Number,
3595
+ reflect: true
3596
+ },
3597
+
3563
3598
  onSlotChange: {
3564
3599
  type: Function,
3565
3600
  reflect: false
3566
3601
  },
3567
3602
 
3568
3603
  /**
3569
- * @private
3604
+ * Position where the bib should appear relative to the trigger.
3605
+ * Accepted values:
3606
+ * "top" | "right" | "bottom" | "left" |
3607
+ * "bottom-start" | "top-start" | "top-end" |
3608
+ * "right-start" | "right-end" | "bottom-end" |
3609
+ * "left-start" | "left-end"
3610
+ * @default bottom-start
3570
3611
  */
3571
3612
  placement: {
3572
- type: String
3613
+ type: String,
3614
+ reflect: true
3573
3615
  },
3574
3616
 
3575
3617
  /**
@@ -4736,11 +4778,11 @@ class AuroBibtemplate extends LitElement {
4736
4778
  return {
4737
4779
  isFullscreen: {
4738
4780
  type: Boolean,
4739
- reflect: true,
4781
+ reflect: true
4740
4782
  },
4741
4783
  large: {
4742
4784
  type: Boolean,
4743
- reflect: true,
4785
+ reflect: true
4744
4786
  }
4745
4787
  };
4746
4788
  }
@@ -4979,6 +5021,12 @@ class AuroSelect extends LitElement {
4979
5021
  const idSubstrEnd = 8;
4980
5022
  const idSubstrStart = 2;
4981
5023
 
5024
+ // floaterConfig
5025
+ this.placement = 'bottom-start';
5026
+ this.offset = 0;
5027
+ this.noFlip = false;
5028
+ this.autoPlacement = false;
5029
+
4982
5030
  /**
4983
5031
  * @private
4984
5032
  */
@@ -5035,6 +5083,15 @@ class AuroSelect extends LitElement {
5035
5083
  static get properties() {
5036
5084
  return {
5037
5085
 
5086
+ /**
5087
+ * If declared, bib's position will be automatically calculated where to appear.
5088
+ * @default false
5089
+ */
5090
+ autoPlacement: {
5091
+ type: Boolean,
5092
+ reflect: true
5093
+ },
5094
+
5038
5095
  /**
5039
5096
  * When attribute is present, element shows disabled state.
5040
5097
  */
@@ -5078,6 +5135,16 @@ class AuroSelect extends LitElement {
5078
5135
  reflect: true
5079
5136
  },
5080
5137
 
5138
+ /**
5139
+ * If declared, the bib will NOT flip to an alternate position
5140
+ * when there isn't enough space in the specified `placement`.
5141
+ * @default false
5142
+ */
5143
+ noFlip: {
5144
+ type: Boolean,
5145
+ reflect: true
5146
+ },
5147
+
5081
5148
  /**
5082
5149
  * If set, disables auto-validation on blur.
5083
5150
  */
@@ -5086,6 +5153,15 @@ class AuroSelect extends LitElement {
5086
5153
  reflect: true
5087
5154
  },
5088
5155
 
5156
+ /**
5157
+ * Gap between the trigger element and bib.
5158
+ * @default 0
5159
+ */
5160
+ offset: {
5161
+ type: Number,
5162
+ reflect: true
5163
+ },
5164
+
5089
5165
  /**
5090
5166
  * @private
5091
5167
  */
@@ -5109,6 +5185,20 @@ class AuroSelect extends LitElement {
5109
5185
  type: Array
5110
5186
  },
5111
5187
 
5188
+ /**
5189
+ * Position where the bib should appear relative to the trigger.
5190
+ * Accepted values:
5191
+ * "top" | "right" | "bottom" | "left" |
5192
+ * "bottom-start" | "top-start" | "top-end" |
5193
+ * "right-start" | "right-end" | "bottom-end" |
5194
+ * "left-start" | "left-end"
5195
+ * @default bottom-start
5196
+ */
5197
+ placement: {
5198
+ type: String,
5199
+ reflect: true
5200
+ },
5201
+
5112
5202
  /**
5113
5203
  * Populates the `required` attribute on the element. Used for client-side validation.
5114
5204
  */
@@ -5571,6 +5661,10 @@ class AuroSelect extends LitElement {
5571
5661
  .fullscreenBreakpoint="${this.fullscreenBreakpoint}"
5572
5662
  ?matchWidth="${!this.flexMenuWidth}"
5573
5663
  chevron
5664
+ .placement="${this.placement}"
5665
+ .offset="${this.offset}"
5666
+ ?autoPlacement="${this.autoPlacement}"
5667
+ ?noFlip="${this.noFlip}"
5574
5668
  part="dropdown">
5575
5669
  <span slot="trigger" aria-haspopup="true" id="triggerFocus">
5576
5670
  <span id="placeholder" class="${classMap(placeholderClass)}"><slot name="placeholder"></slot></span>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurodesignsystem/auro-formkit",
3
- "version": "2.1.0-beta.4",
3
+ "version": "2.1.0-beta.6",
4
4
  "description": "A collection of web components used to build forms.",
5
5
  "homepage": "https://github.com/AlaskaAirlines/auro-formkit#readme",
6
6
  "bugs": {