@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.
- package/components/bibtemplate/dist/auro-bibtemplate.d.ts +11 -0
- package/components/bibtemplate/dist/index.js +13 -0
- package/components/bibtemplate/dist/registered.js +13 -0
- package/components/checkbox/demo/api.md +17 -11
- package/components/checkbox/demo/customize.min.js +23 -6
- package/components/checkbox/demo/getting-started.min.js +23 -6
- package/components/checkbox/demo/index.min.js +23 -6
- package/components/checkbox/dist/auro-checkbox-group.d.ts +8 -0
- package/components/checkbox/dist/auro-checkbox.d.ts +4 -0
- package/components/checkbox/dist/index.js +23 -6
- package/components/checkbox/dist/registered.js +23 -6
- package/components/combobox/demo/api.md +26 -18
- package/components/combobox/demo/customize.min.js +426 -126
- package/components/combobox/demo/getting-started.min.js +426 -126
- package/components/combobox/demo/index.min.js +426 -126
- package/components/combobox/dist/auro-combobox.d.ts +38 -21
- package/components/combobox/dist/index.js +338 -111
- package/components/combobox/dist/registered.js +338 -111
- package/components/counter/demo/api.md +34 -16
- package/components/counter/demo/customize.min.js +204 -64
- package/components/counter/demo/index.min.js +204 -64
- package/components/counter/dist/auro-counter-button.d.ts +4 -0
- package/components/counter/dist/auro-counter-group.d.ts +27 -4
- package/components/counter/dist/auro-counter.d.ts +7 -0
- package/components/counter/dist/index.js +204 -64
- package/components/counter/dist/registered.js +204 -64
- package/components/datepicker/demo/api.md +55 -49
- package/components/datepicker/demo/customize.min.js +515 -134
- package/components/datepicker/demo/index.min.js +515 -134
- package/components/datepicker/dist/auro-calendar-cell.d.ts +58 -4
- package/components/datepicker/dist/auro-calendar-month.d.ts +10 -4
- package/components/datepicker/dist/auro-calendar.d.ts +25 -6
- package/components/datepicker/dist/auro-datepicker.d.ts +70 -22
- package/components/datepicker/dist/index.js +515 -134
- package/components/datepicker/dist/registered.js +515 -134
- package/components/dropdown/demo/api.md +25 -22
- package/components/dropdown/demo/customize.min.js +107 -37
- package/components/dropdown/demo/getting-started.min.js +245 -82
- package/components/dropdown/demo/index.min.js +107 -37
- package/components/dropdown/dist/auro-dropdown.d.ts +34 -8
- package/components/dropdown/dist/auro-dropdownBib.d.ts +17 -5
- package/components/dropdown/dist/index.js +107 -37
- package/components/dropdown/dist/registered.js +107 -37
- package/components/form/demo/customize.min.js +1518 -466
- package/components/form/demo/getting-started.min.js +1518 -466
- package/components/form/demo/index.min.js +1518 -466
- package/components/form/demo/registerDemoDeps.min.js +1518 -466
- package/components/helptext/dist/auro-helptext.d.ts +8 -7
- package/components/helptext/dist/index.js +7 -2
- package/components/helptext/dist/registered.js +7 -2
- package/components/input/demo/api.md +30 -30
- package/components/input/demo/customize.min.js +138 -45
- package/components/input/demo/getting-started.min.js +138 -45
- package/components/input/demo/index.min.js +138 -45
- package/components/input/dist/base-input.d.ts +79 -25
- package/components/input/dist/index.js +138 -45
- package/components/input/dist/registered.js +138 -45
- package/components/layoutElement/dist/auroElement.d.ts +10 -17
- package/components/layoutElement/dist/index.js +20 -20
- package/components/layoutElement/dist/registered.js +20 -20
- package/components/menu/demo/api.md +31 -27
- package/components/menu/demo/index.min.js +108 -35
- package/components/menu/dist/auro-menu.d.ts +26 -21
- package/components/menu/dist/auro-menuoption.d.ts +27 -1
- package/components/menu/dist/index.js +108 -35
- package/components/menu/dist/registered.js +108 -35
- package/components/radio/demo/api.md +8 -7
- package/components/radio/demo/customize.min.js +21 -7
- package/components/radio/demo/getting-started.min.js +21 -7
- package/components/radio/demo/index.min.js +21 -7
- package/components/radio/dist/auro-radio-group.d.ts +8 -3
- package/components/radio/dist/auro-radio.d.ts +1 -0
- package/components/radio/dist/index.js +21 -7
- package/components/radio/dist/registered.js +21 -7
- package/components/select/demo/api.md +18 -15
- package/components/select/demo/customize.min.js +259 -79
- package/components/select/demo/getting-started.min.js +259 -79
- package/components/select/demo/index.min.js +259 -79
- package/components/select/dist/auro-select.d.ts +17 -0
- package/components/select/dist/index.js +171 -64
- package/components/select/dist/registered.js +171 -64
- package/custom-elements.json +1189 -1336
- package/package.json +1 -1
|
@@ -4388,8 +4388,11 @@ const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
|
4388
4388
|
];
|
|
4389
4389
|
|
|
4390
4390
|
/**
|
|
4391
|
+
* The `auro-dropdownbib` element renders the dropdown's bib as a dialog/popover container and manages its fullscreen and modal display.
|
|
4391
4392
|
* @prop { String } fullscreenBreakpoint - Defines the screen size breakpoint (`lg`, `md`, `sm`, or `xs`) at which the dropdown switches to fullscreen mode on mobile. When expanded, the dropdown will automatically display in fullscreen mode if the screen size is equal to or smaller than the selected breakpoint.
|
|
4392
4393
|
* @csspart bibContainer - Apply css to the bib container.
|
|
4394
|
+
* @event auro-dropdownbib-connected - Notifies that the dropdown bib has connected to the DOM, passing a reference to the element in the event detail.
|
|
4395
|
+
* @event auro-bib-cancel - Notifies that the bib was cancelled (e.g. via the ESC key) so parent components can close it.
|
|
4393
4396
|
*/
|
|
4394
4397
|
|
|
4395
4398
|
class AuroDropdownBib extends i$3 {
|
|
@@ -4404,9 +4407,17 @@ class AuroDropdownBib extends i$3 {
|
|
|
4404
4407
|
|
|
4405
4408
|
AuroLibraryRuntimeUtils$1$2.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
4406
4409
|
|
|
4407
|
-
this.shape = "rounded";
|
|
4408
4410
|
this.matchWidth = false;
|
|
4409
4411
|
this.hasActiveDescendant = false;
|
|
4412
|
+
|
|
4413
|
+
this.initializeArchitectureDefaults();
|
|
4414
|
+
}
|
|
4415
|
+
|
|
4416
|
+
// The `shape` default is set in a helper (not the constructor body) so the CEM
|
|
4417
|
+
// analyzer keeps its `@type` union instead of inferring `string` from a
|
|
4418
|
+
// constructor-literal assignment. See AlaskaAirlines/discussions#653.
|
|
4419
|
+
initializeArchitectureDefaults() {
|
|
4420
|
+
this.shape = "rounded";
|
|
4410
4421
|
}
|
|
4411
4422
|
|
|
4412
4423
|
static get styles() {
|
|
@@ -4425,6 +4436,7 @@ class AuroDropdownBib extends i$3 {
|
|
|
4425
4436
|
*/
|
|
4426
4437
|
isFullscreen: {
|
|
4427
4438
|
type: Boolean,
|
|
4439
|
+
attribute: 'isfullscreen',
|
|
4428
4440
|
reflect: true
|
|
4429
4441
|
},
|
|
4430
4442
|
|
|
@@ -4450,6 +4462,7 @@ class AuroDropdownBib extends i$3 {
|
|
|
4450
4462
|
*/
|
|
4451
4463
|
matchWidth: {
|
|
4452
4464
|
type: Boolean,
|
|
4465
|
+
attribute: 'matchwidth',
|
|
4453
4466
|
reflect: true
|
|
4454
4467
|
},
|
|
4455
4468
|
|
|
@@ -4465,11 +4478,18 @@ class AuroDropdownBib extends i$3 {
|
|
|
4465
4478
|
* A reference to the associated bib template element.
|
|
4466
4479
|
*/
|
|
4467
4480
|
bibTemplate: {
|
|
4468
|
-
type: Object
|
|
4481
|
+
type: Object,
|
|
4482
|
+
attribute: 'bibtemplate'
|
|
4469
4483
|
},
|
|
4470
4484
|
|
|
4485
|
+
/**
|
|
4486
|
+
* Sets the shape of the dropdown bib.
|
|
4487
|
+
* @type {'box' | 'classic' | 'pill' | 'rounded' | 'snowflake'}
|
|
4488
|
+
* @default 'rounded'
|
|
4489
|
+
*/
|
|
4471
4490
|
shape: {
|
|
4472
4491
|
type: String,
|
|
4492
|
+
attribute: "shape",
|
|
4473
4493
|
reflect: true
|
|
4474
4494
|
},
|
|
4475
4495
|
|
|
@@ -4481,7 +4501,8 @@ class AuroDropdownBib extends i$3 {
|
|
|
4481
4501
|
* @private
|
|
4482
4502
|
*/
|
|
4483
4503
|
dialogLabel: {
|
|
4484
|
-
type: String
|
|
4504
|
+
type: String,
|
|
4505
|
+
attribute: 'dialoglabel'
|
|
4485
4506
|
},
|
|
4486
4507
|
|
|
4487
4508
|
/**
|
|
@@ -4492,7 +4513,8 @@ class AuroDropdownBib extends i$3 {
|
|
|
4492
4513
|
* @private
|
|
4493
4514
|
*/
|
|
4494
4515
|
dialogRole: {
|
|
4495
|
-
type: String
|
|
4516
|
+
type: String,
|
|
4517
|
+
attribute: 'dialogrole'
|
|
4496
4518
|
},
|
|
4497
4519
|
|
|
4498
4520
|
/**
|
|
@@ -4500,7 +4522,8 @@ class AuroDropdownBib extends i$3 {
|
|
|
4500
4522
|
* @private
|
|
4501
4523
|
*/
|
|
4502
4524
|
hasActiveDescendant: {
|
|
4503
|
-
type: Boolean
|
|
4525
|
+
type: Boolean,
|
|
4526
|
+
attribute: 'hasactivedescendant'
|
|
4504
4527
|
}
|
|
4505
4528
|
};
|
|
4506
4529
|
}
|
|
@@ -4851,6 +4874,8 @@ let AuroHelpText$2 = class AuroHelpText extends i$3 {
|
|
|
4851
4874
|
super();
|
|
4852
4875
|
|
|
4853
4876
|
this.error = false;
|
|
4877
|
+
|
|
4878
|
+
/** @type {'default' | 'inverse'} */
|
|
4854
4879
|
this.appearance = "default";
|
|
4855
4880
|
this.onDark = false;
|
|
4856
4881
|
this.hasTextContent = false;
|
|
@@ -4871,8 +4896,8 @@ let AuroHelpText$2 = class AuroHelpText extends i$3 {
|
|
|
4871
4896
|
return {
|
|
4872
4897
|
|
|
4873
4898
|
/**
|
|
4874
|
-
*
|
|
4875
|
-
* @
|
|
4899
|
+
* The appearance of the help text, either default (for light backgrounds) or inverse (for dark backgrounds).
|
|
4900
|
+
* @type {'default' | 'inverse'}
|
|
4876
4901
|
* @default 'default'
|
|
4877
4902
|
*/
|
|
4878
4903
|
appearance: {
|
|
@@ -4885,6 +4910,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$3 {
|
|
|
4885
4910
|
*/
|
|
4886
4911
|
slotNodes: {
|
|
4887
4912
|
type: Boolean,
|
|
4913
|
+
attribute: 'slotnodes',
|
|
4888
4914
|
},
|
|
4889
4915
|
|
|
4890
4916
|
/**
|
|
@@ -4892,6 +4918,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$3 {
|
|
|
4892
4918
|
*/
|
|
4893
4919
|
hasTextContent: {
|
|
4894
4920
|
type: Boolean,
|
|
4921
|
+
attribute: 'hastextcontent',
|
|
4895
4922
|
},
|
|
4896
4923
|
|
|
4897
4924
|
/**
|
|
@@ -4907,6 +4934,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$3 {
|
|
|
4907
4934
|
*/
|
|
4908
4935
|
onDark: {
|
|
4909
4936
|
type: Boolean,
|
|
4937
|
+
attribute: 'ondark',
|
|
4910
4938
|
reflect: true
|
|
4911
4939
|
}
|
|
4912
4940
|
};
|
|
@@ -4977,39 +5005,39 @@ let AuroHelpText$2 = class AuroHelpText extends i$3 {
|
|
|
4977
5005
|
}
|
|
4978
5006
|
};
|
|
4979
5007
|
|
|
4980
|
-
var formkitVersion$2 = '
|
|
5008
|
+
var formkitVersion$2 = '202608300032';
|
|
4981
5009
|
|
|
5010
|
+
/**
|
|
5011
|
+
* AuroElement is the shared base class for layout-aware Auro form components.
|
|
5012
|
+
*
|
|
5013
|
+
* It defines the common `layout`, `shape`, `size`, and `ondark` reactive
|
|
5014
|
+
* properties and the architecture helpers (`renderLayout`, `resetShapeClasses`,
|
|
5015
|
+
* `resetLayoutClasses`) that subclasses use to render a chosen layout and apply
|
|
5016
|
+
* the matching `shape-*` / `layout-*` wrapper classes. Subclasses supply their
|
|
5017
|
+
* own default and valid value set for `layout`, `shape`, and `size`.
|
|
5018
|
+
*/
|
|
4982
5019
|
let AuroElement$2 = class AuroElement extends i$3 {
|
|
4983
5020
|
static get properties() {
|
|
4984
5021
|
return {
|
|
4985
5022
|
|
|
4986
5023
|
/**
|
|
4987
|
-
*
|
|
4988
|
-
* @default {'default'}
|
|
5024
|
+
* When true, renders the component styled for use on a dark background.
|
|
4989
5025
|
*/
|
|
4990
|
-
layout: {
|
|
4991
|
-
type: String,
|
|
4992
|
-
attribute: "layout",
|
|
4993
|
-
reflect: true
|
|
4994
|
-
},
|
|
4995
|
-
|
|
4996
|
-
shape: {
|
|
4997
|
-
type: String,
|
|
4998
|
-
attribute: "shape",
|
|
4999
|
-
reflect: true
|
|
5000
|
-
},
|
|
5001
|
-
|
|
5002
|
-
size: {
|
|
5003
|
-
type: String,
|
|
5004
|
-
attribute: "size",
|
|
5005
|
-
reflect: true
|
|
5006
|
-
},
|
|
5007
|
-
|
|
5008
5026
|
onDark: {
|
|
5009
5027
|
type: Boolean,
|
|
5010
5028
|
attribute: "ondark",
|
|
5011
5029
|
reflect: true
|
|
5012
5030
|
}
|
|
5031
|
+
|
|
5032
|
+
// NOTE: `layout`, `shape`, and `size` are intentionally NOT declared here.
|
|
5033
|
+
// Their valid value sets differ per component, and the CEM analyzer roots
|
|
5034
|
+
// an inherited property's `type` in the class that declares it — a base
|
|
5035
|
+
// declaration would force every subclass's `@type` to be discarded and
|
|
5036
|
+
// emitted as plain `string`. Each subclass declares its own `layout` /
|
|
5037
|
+
// `shape` / `size` with an exact `@type` union instead. AuroElement still
|
|
5038
|
+
// consumes `this.layout` / `this.shape` / `this.size` in its render and
|
|
5039
|
+
// architecture helpers below (subclasses guarantee the reactive props).
|
|
5040
|
+
// See AlaskaAirlines/discussions#653.
|
|
5013
5041
|
};
|
|
5014
5042
|
}
|
|
5015
5043
|
|
|
@@ -5095,6 +5123,7 @@ let AuroElement$2 = class AuroElement extends i$3 {
|
|
|
5095
5123
|
* @slot helpText - Defines the content of the helpText.
|
|
5096
5124
|
* @slot trigger - Defines the content of the trigger.
|
|
5097
5125
|
* @csspart trigger - The trigger content container.
|
|
5126
|
+
* @csspart wrapper - The trigger wrapper element surrounding the trigger content and chevron.
|
|
5098
5127
|
* @csspart chevron - The collapsed/expanded state icon container.
|
|
5099
5128
|
* @csspart size - The size of the dropdown bib. (height, width, maxHeight, maxWidth only)
|
|
5100
5129
|
* @csspart helpText - The helpText content container.
|
|
@@ -5119,7 +5148,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5119
5148
|
|
|
5120
5149
|
/**
|
|
5121
5150
|
* When true, the dropdown skips its generic focus restoration on close.
|
|
5122
|
-
* Set by consumers (
|
|
5151
|
+
* Set by consumers (for example combobox) that manage their own focus routing
|
|
5123
5152
|
* via setClearBtnFocus / setInputFocus / keyboard strategy.
|
|
5124
5153
|
* Separate from noHideOnThisFocusLoss (which controls auto-close behavior).
|
|
5125
5154
|
* @private
|
|
@@ -5288,7 +5317,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5288
5317
|
/**
|
|
5289
5318
|
* Focus the trigger content. When the trigger wrapper itself is focusable
|
|
5290
5319
|
* (has tabindex), focus it directly. Otherwise, focus the first focusable
|
|
5291
|
-
* element slotted into the trigger slot (
|
|
5320
|
+
* element slotted into the trigger slot (for example the auro-input).
|
|
5292
5321
|
* @private
|
|
5293
5322
|
*/
|
|
5294
5323
|
focusTrigger() {
|
|
@@ -5385,6 +5414,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5385
5414
|
*/
|
|
5386
5415
|
autoPlacement: {
|
|
5387
5416
|
type: Boolean,
|
|
5417
|
+
attribute: 'autoplacement',
|
|
5388
5418
|
reflect: true
|
|
5389
5419
|
},
|
|
5390
5420
|
|
|
@@ -5393,6 +5423,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5393
5423
|
*/
|
|
5394
5424
|
desktopModal: {
|
|
5395
5425
|
type: Boolean,
|
|
5426
|
+
attribute: 'desktopmodal',
|
|
5396
5427
|
reflect: true
|
|
5397
5428
|
},
|
|
5398
5429
|
|
|
@@ -5401,6 +5432,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5401
5432
|
*/
|
|
5402
5433
|
disableEventShow: {
|
|
5403
5434
|
type: Boolean,
|
|
5435
|
+
attribute: 'disableeventshow',
|
|
5404
5436
|
reflect: true
|
|
5405
5437
|
},
|
|
5406
5438
|
|
|
@@ -5434,14 +5466,16 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5434
5466
|
*/
|
|
5435
5467
|
disableKeyboardHandling: {
|
|
5436
5468
|
type: Boolean,
|
|
5469
|
+
attribute: 'disablekeyboardhandling',
|
|
5437
5470
|
reflect: true
|
|
5438
5471
|
},
|
|
5439
5472
|
|
|
5440
5473
|
/**
|
|
5441
|
-
*
|
|
5474
|
+
* Sets the width of the dropdown bib in pixels.
|
|
5442
5475
|
*/
|
|
5443
5476
|
dropdownWidth: {
|
|
5444
|
-
type: Number
|
|
5477
|
+
type: Number,
|
|
5478
|
+
attribute: 'dropdownwidth'
|
|
5445
5479
|
},
|
|
5446
5480
|
|
|
5447
5481
|
/**
|
|
@@ -5466,7 +5500,8 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5466
5500
|
* Contains the help text message for the current validity error.
|
|
5467
5501
|
*/
|
|
5468
5502
|
errorMessage: {
|
|
5469
|
-
type: String
|
|
5503
|
+
type: String,
|
|
5504
|
+
attribute: 'errormessage'
|
|
5470
5505
|
},
|
|
5471
5506
|
|
|
5472
5507
|
/**
|
|
@@ -5474,6 +5509,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5474
5509
|
*/
|
|
5475
5510
|
focusShow: {
|
|
5476
5511
|
type: Boolean,
|
|
5512
|
+
attribute: 'focusshow',
|
|
5477
5513
|
reflect: true
|
|
5478
5514
|
},
|
|
5479
5515
|
|
|
@@ -5491,6 +5527,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5491
5527
|
*/
|
|
5492
5528
|
isBibFullscreen: {
|
|
5493
5529
|
type: Boolean,
|
|
5530
|
+
attribute: 'isbibfullscreen',
|
|
5494
5531
|
reflect: true
|
|
5495
5532
|
},
|
|
5496
5533
|
|
|
@@ -5499,6 +5536,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5499
5536
|
*/
|
|
5500
5537
|
hoverToggle: {
|
|
5501
5538
|
type: Boolean,
|
|
5539
|
+
attribute: 'hovertoggle',
|
|
5502
5540
|
reflect: true
|
|
5503
5541
|
},
|
|
5504
5542
|
|
|
@@ -5506,7 +5544,8 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5506
5544
|
* @private
|
|
5507
5545
|
*/
|
|
5508
5546
|
hasTriggerContent: {
|
|
5509
|
-
type: Boolean
|
|
5547
|
+
type: Boolean,
|
|
5548
|
+
attribute: false
|
|
5510
5549
|
},
|
|
5511
5550
|
|
|
5512
5551
|
/**
|
|
@@ -5519,6 +5558,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5519
5558
|
*/
|
|
5520
5559
|
fullscreenBreakpoint: {
|
|
5521
5560
|
type: String,
|
|
5561
|
+
attribute: "fullscreenbreakpoint",
|
|
5522
5562
|
reflect: true
|
|
5523
5563
|
},
|
|
5524
5564
|
|
|
@@ -5529,6 +5569,27 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5529
5569
|
*/
|
|
5530
5570
|
layout: {
|
|
5531
5571
|
type: String,
|
|
5572
|
+
attribute: "layout",
|
|
5573
|
+
reflect: true
|
|
5574
|
+
},
|
|
5575
|
+
|
|
5576
|
+
/**
|
|
5577
|
+
* Sets the shape of the dropdown.
|
|
5578
|
+
* @type {'box' | 'classic' | 'pill' | 'pill-left' | 'pill-right' | 'rounded' | 'snowflake'}
|
|
5579
|
+
*/
|
|
5580
|
+
shape: {
|
|
5581
|
+
type: String,
|
|
5582
|
+
attribute: "shape",
|
|
5583
|
+
reflect: true
|
|
5584
|
+
},
|
|
5585
|
+
|
|
5586
|
+
/**
|
|
5587
|
+
* Sets the size of the dropdown.
|
|
5588
|
+
* @type {'xs' | 'sm' | 'md' | 'lg' | 'xl'}
|
|
5589
|
+
*/
|
|
5590
|
+
size: {
|
|
5591
|
+
type: String,
|
|
5592
|
+
attribute: "size",
|
|
5532
5593
|
reflect: true
|
|
5533
5594
|
},
|
|
5534
5595
|
|
|
@@ -5538,6 +5599,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5538
5599
|
*/
|
|
5539
5600
|
parentBorder: {
|
|
5540
5601
|
type: Boolean,
|
|
5602
|
+
attribute: 'parentborder',
|
|
5541
5603
|
reflect: true
|
|
5542
5604
|
},
|
|
5543
5605
|
|
|
@@ -5546,6 +5608,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5546
5608
|
*/
|
|
5547
5609
|
matchWidth: {
|
|
5548
5610
|
type: Boolean,
|
|
5611
|
+
attribute: 'matchwidth',
|
|
5549
5612
|
reflect: true
|
|
5550
5613
|
},
|
|
5551
5614
|
|
|
@@ -5555,6 +5618,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5555
5618
|
*/
|
|
5556
5619
|
noFlip: {
|
|
5557
5620
|
type: Boolean,
|
|
5621
|
+
attribute: 'noflip',
|
|
5558
5622
|
reflect: true
|
|
5559
5623
|
},
|
|
5560
5624
|
|
|
@@ -5571,6 +5635,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5571
5635
|
*/
|
|
5572
5636
|
noHideOnThisFocusLoss: {
|
|
5573
5637
|
type: Boolean,
|
|
5638
|
+
attribute: 'nohideonthisfocusloss',
|
|
5574
5639
|
reflect: true
|
|
5575
5640
|
},
|
|
5576
5641
|
|
|
@@ -5579,6 +5644,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5579
5644
|
*/
|
|
5580
5645
|
noToggle: {
|
|
5581
5646
|
type: Boolean,
|
|
5647
|
+
attribute: 'notoggle',
|
|
5582
5648
|
reflect: true
|
|
5583
5649
|
},
|
|
5584
5650
|
|
|
@@ -5596,14 +5662,17 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5596
5662
|
*/
|
|
5597
5663
|
onDark: {
|
|
5598
5664
|
type: Boolean,
|
|
5665
|
+
attribute: 'ondark',
|
|
5599
5666
|
reflect: true
|
|
5600
5667
|
},
|
|
5601
5668
|
|
|
5602
5669
|
/**
|
|
5603
5670
|
* If declared, and a function is set, that function will execute when the slot content is updated.
|
|
5671
|
+
* @type {() => void}
|
|
5604
5672
|
*/
|
|
5605
5673
|
onSlotChange: {
|
|
5606
5674
|
type: Function,
|
|
5675
|
+
attribute: 'onslotchange',
|
|
5607
5676
|
reflect: false
|
|
5608
5677
|
},
|
|
5609
5678
|
|
|
@@ -5618,10 +5687,11 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5618
5687
|
},
|
|
5619
5688
|
|
|
5620
5689
|
/**
|
|
5621
|
-
*
|
|
5690
|
+
* Sets the tabindex applied to the dropdown trigger for keyboard focus order.
|
|
5622
5691
|
*/
|
|
5623
5692
|
tabIndex: {
|
|
5624
|
-
type: Number
|
|
5693
|
+
type: Number,
|
|
5694
|
+
attribute: 'tabindex'
|
|
5625
5695
|
},
|
|
5626
5696
|
|
|
5627
5697
|
/**
|
|
@@ -5845,7 +5915,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5845
5915
|
/**
|
|
5846
5916
|
* @description Let subscribers know that the dropdown ID ha been generated and added.
|
|
5847
5917
|
* @event auroDropdown-idAdded
|
|
5848
|
-
* @type {
|
|
5918
|
+
* @type {CustomEvent<{ id: string }>} - Detail carries the generated ID of the dropdown bib element.
|
|
5849
5919
|
*/
|
|
5850
5920
|
this.dispatchEvent(new CustomEvent('auroDropdown-idAdded', {detail: {id: this.floater.element.id}}));
|
|
5851
5921
|
|
|
@@ -10994,37 +11064,37 @@ class AuroFormValidation {
|
|
|
10994
11064
|
}
|
|
10995
11065
|
}
|
|
10996
11066
|
|
|
11067
|
+
/**
|
|
11068
|
+
* AuroElement is the shared base class for layout-aware Auro form components.
|
|
11069
|
+
*
|
|
11070
|
+
* It defines the common `layout`, `shape`, `size`, and `ondark` reactive
|
|
11071
|
+
* properties and the architecture helpers (`renderLayout`, `resetShapeClasses`,
|
|
11072
|
+
* `resetLayoutClasses`) that subclasses use to render a chosen layout and apply
|
|
11073
|
+
* the matching `shape-*` / `layout-*` wrapper classes. Subclasses supply their
|
|
11074
|
+
* own default and valid value set for `layout`, `shape`, and `size`.
|
|
11075
|
+
*/
|
|
10997
11076
|
let AuroElement$1 = class AuroElement extends i$3 {
|
|
10998
11077
|
static get properties() {
|
|
10999
11078
|
return {
|
|
11000
11079
|
|
|
11001
11080
|
/**
|
|
11002
|
-
*
|
|
11003
|
-
* @default {'default'}
|
|
11081
|
+
* When true, renders the component styled for use on a dark background.
|
|
11004
11082
|
*/
|
|
11005
|
-
layout: {
|
|
11006
|
-
type: String,
|
|
11007
|
-
attribute: "layout",
|
|
11008
|
-
reflect: true
|
|
11009
|
-
},
|
|
11010
|
-
|
|
11011
|
-
shape: {
|
|
11012
|
-
type: String,
|
|
11013
|
-
attribute: "shape",
|
|
11014
|
-
reflect: true
|
|
11015
|
-
},
|
|
11016
|
-
|
|
11017
|
-
size: {
|
|
11018
|
-
type: String,
|
|
11019
|
-
attribute: "size",
|
|
11020
|
-
reflect: true
|
|
11021
|
-
},
|
|
11022
|
-
|
|
11023
11083
|
onDark: {
|
|
11024
11084
|
type: Boolean,
|
|
11025
11085
|
attribute: "ondark",
|
|
11026
11086
|
reflect: true
|
|
11027
11087
|
}
|
|
11088
|
+
|
|
11089
|
+
// NOTE: `layout`, `shape`, and `size` are intentionally NOT declared here.
|
|
11090
|
+
// Their valid value sets differ per component, and the CEM analyzer roots
|
|
11091
|
+
// an inherited property's `type` in the class that declares it — a base
|
|
11092
|
+
// declaration would force every subclass's `@type` to be discarded and
|
|
11093
|
+
// emitted as plain `string`. Each subclass declares its own `layout` /
|
|
11094
|
+
// `shape` / `size` with an exact `@type` union instead. AuroElement still
|
|
11095
|
+
// consumes `this.layout` / `this.shape` / `this.size` in its render and
|
|
11096
|
+
// architecture helpers below (subclasses guarantee the reactive props).
|
|
11097
|
+
// See AlaskaAirlines/discussions#653.
|
|
11028
11098
|
};
|
|
11029
11099
|
}
|
|
11030
11100
|
|
|
@@ -16991,6 +17061,7 @@ class DomHandler {
|
|
|
16991
17061
|
* Base class for auro-input component that provides core input functionality.
|
|
16992
17062
|
* @event input - Event fires when the value of an `auro-input` has been changed.
|
|
16993
17063
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` value has changed.
|
|
17064
|
+
* @event auroInput-validityChange - Notifies that the `validity` state of the input has changed.
|
|
16994
17065
|
*/
|
|
16995
17066
|
class BaseInput extends AuroElement$1 {
|
|
16996
17067
|
|
|
@@ -17021,7 +17092,10 @@ class BaseInput extends AuroElement$1 {
|
|
|
17021
17092
|
// during its own update cycle sees a populated util instance.
|
|
17022
17093
|
this.activeLabel = false;
|
|
17023
17094
|
|
|
17024
|
-
/**
|
|
17095
|
+
/**
|
|
17096
|
+
* @private
|
|
17097
|
+
* @type {string[]}
|
|
17098
|
+
*/
|
|
17025
17099
|
this.allowedInputTypes = [
|
|
17026
17100
|
"text",
|
|
17027
17101
|
"number",
|
|
@@ -17030,9 +17104,14 @@ class BaseInput extends AuroElement$1 {
|
|
|
17030
17104
|
"credit-card",
|
|
17031
17105
|
"tel"
|
|
17032
17106
|
];
|
|
17107
|
+
|
|
17108
|
+
/** @type {'default' | 'inverse'} */
|
|
17033
17109
|
this.appearance = "default";
|
|
17034
17110
|
|
|
17035
|
-
/**
|
|
17111
|
+
/**
|
|
17112
|
+
* @private
|
|
17113
|
+
* @type {Record<string, string>}
|
|
17114
|
+
*/
|
|
17036
17115
|
this.dateFormatMap = {
|
|
17037
17116
|
'mm/dd/yyyy': 'dateMMDDYYYY',
|
|
17038
17117
|
'dd/mm/yyyy': 'dateDDMMYYYY',
|
|
@@ -17063,7 +17142,6 @@ class BaseInput extends AuroElement$1 {
|
|
|
17063
17142
|
|
|
17064
17143
|
/** @private */
|
|
17065
17144
|
this.label = 'Input label is undefined';
|
|
17066
|
-
this.layout = 'classic';
|
|
17067
17145
|
this.locale = 'en-US';
|
|
17068
17146
|
this._format = undefined;
|
|
17069
17147
|
|
|
@@ -17079,17 +17157,18 @@ class BaseInput extends AuroElement$1 {
|
|
|
17079
17157
|
this.setCustomValidityForType = undefined;
|
|
17080
17158
|
// Credit Card is intentionally excluded — its mask manages the cursor
|
|
17081
17159
|
// itself, and listing it here caused cursor placement issues in Safari.
|
|
17082
|
-
/**
|
|
17160
|
+
/**
|
|
17161
|
+
* @private
|
|
17162
|
+
* @type {string[]}
|
|
17163
|
+
*/
|
|
17083
17164
|
this.setSelectionInputTypes = [
|
|
17084
17165
|
"text",
|
|
17085
17166
|
"password",
|
|
17086
17167
|
"email"
|
|
17087
17168
|
];
|
|
17088
|
-
this.shape = 'classic';
|
|
17089
17169
|
|
|
17090
17170
|
/** @private */
|
|
17091
17171
|
this.showPassword = false;
|
|
17092
|
-
this.size = 'lg';
|
|
17093
17172
|
this.touched = false;
|
|
17094
17173
|
|
|
17095
17174
|
/** @private */
|
|
@@ -17107,6 +17186,24 @@ class BaseInput extends AuroElement$1 {
|
|
|
17107
17186
|
/** @private */
|
|
17108
17187
|
this.validationCCLength = undefined;
|
|
17109
17188
|
this.value = undefined;
|
|
17189
|
+
|
|
17190
|
+
this.initializeArchitectureDefaults();
|
|
17191
|
+
}
|
|
17192
|
+
|
|
17193
|
+
/**
|
|
17194
|
+
* Sets the default `layout`, `shape`, and `size` values.
|
|
17195
|
+
*
|
|
17196
|
+
* These are assigned in a helper method rather than the constructor body so
|
|
17197
|
+
* the CEM analyzer keeps their `@type` string-literal unions (a literal
|
|
17198
|
+
* assignment in the constructor would make the analyzer infer `string` and
|
|
17199
|
+
* override the union — see AlaskaAirlines/discussions#653, gotcha 1).
|
|
17200
|
+
* @private
|
|
17201
|
+
* @returns {void}
|
|
17202
|
+
*/
|
|
17203
|
+
initializeArchitectureDefaults() {
|
|
17204
|
+
this.layout = 'classic';
|
|
17205
|
+
this.shape = 'classic';
|
|
17206
|
+
this.size = 'lg';
|
|
17110
17207
|
}
|
|
17111
17208
|
|
|
17112
17209
|
// function to define props used within the scope of this component
|
|
@@ -17114,11 +17211,45 @@ class BaseInput extends AuroElement$1 {
|
|
|
17114
17211
|
return {
|
|
17115
17212
|
...super.properties,
|
|
17116
17213
|
|
|
17214
|
+
/**
|
|
17215
|
+
* Sets the layout variant of the input.
|
|
17216
|
+
* @type {'classic' | 'emphasized' | 'emphasized-left' | 'emphasized-right' | 'snowflake' | 'snowflake-left' | 'snowflake-right'}
|
|
17217
|
+
* @default 'classic'
|
|
17218
|
+
*/
|
|
17219
|
+
layout: {
|
|
17220
|
+
type: String,
|
|
17221
|
+
attribute: "layout",
|
|
17222
|
+
reflect: true
|
|
17223
|
+
},
|
|
17224
|
+
|
|
17225
|
+
/**
|
|
17226
|
+
* Sets the shape of the input.
|
|
17227
|
+
* @type {'box' | 'classic' | 'pill' | 'pill-left' | 'pill-right' | 'rounded' | 'snowflake'}
|
|
17228
|
+
* @default 'classic'
|
|
17229
|
+
*/
|
|
17230
|
+
shape: {
|
|
17231
|
+
type: String,
|
|
17232
|
+
attribute: "shape",
|
|
17233
|
+
reflect: true
|
|
17234
|
+
},
|
|
17235
|
+
|
|
17236
|
+
/**
|
|
17237
|
+
* Sets the size of the input.
|
|
17238
|
+
* @type {'xs' | 'sm' | 'md' | 'lg' | 'xl'}
|
|
17239
|
+
* @default 'lg'
|
|
17240
|
+
*/
|
|
17241
|
+
size: {
|
|
17242
|
+
type: String,
|
|
17243
|
+
attribute: "size",
|
|
17244
|
+
reflect: true
|
|
17245
|
+
},
|
|
17246
|
+
|
|
17117
17247
|
/**
|
|
17118
17248
|
* The value for the role attribute.
|
|
17119
17249
|
*/
|
|
17120
17250
|
a11yRole: {
|
|
17121
17251
|
type: String,
|
|
17252
|
+
attribute: 'a11yrole',
|
|
17122
17253
|
reflect: true
|
|
17123
17254
|
},
|
|
17124
17255
|
|
|
@@ -17127,6 +17258,7 @@ class BaseInput extends AuroElement$1 {
|
|
|
17127
17258
|
*/
|
|
17128
17259
|
a11yControls: {
|
|
17129
17260
|
type: String,
|
|
17261
|
+
attribute: 'a11ycontrols',
|
|
17130
17262
|
reflect: true
|
|
17131
17263
|
},
|
|
17132
17264
|
|
|
@@ -17135,6 +17267,7 @@ class BaseInput extends AuroElement$1 {
|
|
|
17135
17267
|
*/
|
|
17136
17268
|
a11yExpanded: {
|
|
17137
17269
|
type: Boolean,
|
|
17270
|
+
attribute: 'a11yexpanded',
|
|
17138
17271
|
reflect: true
|
|
17139
17272
|
},
|
|
17140
17273
|
|
|
@@ -17144,6 +17277,7 @@ class BaseInput extends AuroElement$1 {
|
|
|
17144
17277
|
*/
|
|
17145
17278
|
a11yActivedescendant: {
|
|
17146
17279
|
type: String,
|
|
17280
|
+
attribute: 'a11yactivedescendant',
|
|
17147
17281
|
reflect: true
|
|
17148
17282
|
},
|
|
17149
17283
|
|
|
@@ -17154,6 +17288,7 @@ class BaseInput extends AuroElement$1 {
|
|
|
17154
17288
|
*/
|
|
17155
17289
|
activeLabel: {
|
|
17156
17290
|
type: Boolean,
|
|
17291
|
+
attribute: 'activelabel',
|
|
17157
17292
|
reflect: true
|
|
17158
17293
|
},
|
|
17159
17294
|
|
|
@@ -17168,7 +17303,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
17168
17303
|
},
|
|
17169
17304
|
|
|
17170
17305
|
/**
|
|
17171
|
-
* An enumerated attribute that controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
|
17306
|
+
* An enumerated attribute that controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
|
17307
|
+
* @type {'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters'}
|
|
17172
17308
|
*/
|
|
17173
17309
|
autocapitalize: {
|
|
17174
17310
|
type: String,
|
|
@@ -17185,6 +17321,7 @@ class BaseInput extends AuroElement$1 {
|
|
|
17185
17321
|
|
|
17186
17322
|
/**
|
|
17187
17323
|
* When set to `off`, stops iOS from auto-correcting words when typed into a text box.
|
|
17324
|
+
* @type {'on' | 'off'}
|
|
17188
17325
|
*/
|
|
17189
17326
|
autocorrect: {
|
|
17190
17327
|
type: String,
|
|
@@ -17195,7 +17332,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
17195
17332
|
* Custom help text message for email type validity.
|
|
17196
17333
|
*/
|
|
17197
17334
|
customValidityTypeEmail: {
|
|
17198
|
-
type: String
|
|
17335
|
+
type: String,
|
|
17336
|
+
attribute: 'customvaliditytypeemail'
|
|
17199
17337
|
},
|
|
17200
17338
|
|
|
17201
17339
|
/**
|
|
@@ -17211,6 +17349,7 @@ class BaseInput extends AuroElement$1 {
|
|
|
17211
17349
|
*/
|
|
17212
17350
|
dvInputOnly: {
|
|
17213
17351
|
type: Boolean,
|
|
17352
|
+
attribute: 'dvinputonly',
|
|
17214
17353
|
reflect: true
|
|
17215
17354
|
},
|
|
17216
17355
|
|
|
@@ -17226,7 +17365,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
17226
17365
|
* Contains the help text message for the current validity error.
|
|
17227
17366
|
*/
|
|
17228
17367
|
errorMessage: {
|
|
17229
|
-
type: String
|
|
17368
|
+
type: String,
|
|
17369
|
+
attribute: 'errormessage'
|
|
17230
17370
|
},
|
|
17231
17371
|
|
|
17232
17372
|
/**
|
|
@@ -17262,6 +17402,7 @@ class BaseInput extends AuroElement$1 {
|
|
|
17262
17402
|
*/
|
|
17263
17403
|
hideLabelVisually: {
|
|
17264
17404
|
type: Boolean,
|
|
17405
|
+
attribute: 'hidelabelvisually',
|
|
17265
17406
|
reflect: true
|
|
17266
17407
|
},
|
|
17267
17408
|
|
|
@@ -17328,6 +17469,7 @@ class BaseInput extends AuroElement$1 {
|
|
|
17328
17469
|
*/
|
|
17329
17470
|
maxLength: {
|
|
17330
17471
|
type: Number,
|
|
17472
|
+
attribute: 'maxlength',
|
|
17331
17473
|
reflect: true
|
|
17332
17474
|
},
|
|
17333
17475
|
|
|
@@ -17343,6 +17485,7 @@ class BaseInput extends AuroElement$1 {
|
|
|
17343
17485
|
*/
|
|
17344
17486
|
minLength: {
|
|
17345
17487
|
type: Number,
|
|
17488
|
+
attribute: 'minlength',
|
|
17346
17489
|
reflect: true
|
|
17347
17490
|
},
|
|
17348
17491
|
|
|
@@ -17368,6 +17511,7 @@ class BaseInput extends AuroElement$1 {
|
|
|
17368
17511
|
*/
|
|
17369
17512
|
noValidate: {
|
|
17370
17513
|
type: Boolean,
|
|
17514
|
+
attribute: 'novalidate',
|
|
17371
17515
|
reflect: true
|
|
17372
17516
|
},
|
|
17373
17517
|
|
|
@@ -17376,6 +17520,7 @@ class BaseInput extends AuroElement$1 {
|
|
|
17376
17520
|
*/
|
|
17377
17521
|
onDark: {
|
|
17378
17522
|
type: Boolean,
|
|
17523
|
+
attribute: 'ondark',
|
|
17379
17524
|
reflect: true
|
|
17380
17525
|
},
|
|
17381
17526
|
|
|
@@ -17415,77 +17560,88 @@ class BaseInput extends AuroElement$1 {
|
|
|
17415
17560
|
* Sets a custom help text message to display for all validityStates.
|
|
17416
17561
|
*/
|
|
17417
17562
|
setCustomValidity: {
|
|
17418
|
-
type: String
|
|
17563
|
+
type: String,
|
|
17564
|
+
attribute: 'setcustomvalidity'
|
|
17419
17565
|
},
|
|
17420
17566
|
|
|
17421
17567
|
/**
|
|
17422
17568
|
* Custom help text message to display when validity = `badInput`.
|
|
17423
17569
|
*/
|
|
17424
17570
|
setCustomValidityBadInput: {
|
|
17425
|
-
type: String
|
|
17571
|
+
type: String,
|
|
17572
|
+
attribute: 'setcustomvaliditybadinput'
|
|
17426
17573
|
},
|
|
17427
17574
|
|
|
17428
17575
|
/**
|
|
17429
17576
|
* Custom help text message to display when validity = `customError`.
|
|
17430
17577
|
*/
|
|
17431
17578
|
setCustomValidityCustomError: {
|
|
17432
|
-
type: String
|
|
17579
|
+
type: String,
|
|
17580
|
+
attribute: 'setcustomvaliditycustomerror'
|
|
17433
17581
|
},
|
|
17434
17582
|
|
|
17435
17583
|
/**
|
|
17436
17584
|
* Custom help text message to display for the declared element `type` and type validity fails.
|
|
17437
17585
|
*/
|
|
17438
17586
|
setCustomValidityForType: {
|
|
17439
|
-
type: String
|
|
17587
|
+
type: String,
|
|
17588
|
+
attribute: 'setcustomvalidityfortype'
|
|
17440
17589
|
},
|
|
17441
17590
|
|
|
17442
17591
|
/**
|
|
17443
17592
|
* Custom help text message to display when validity = `patternMismatch`.
|
|
17444
17593
|
*/
|
|
17445
17594
|
setCustomValidityPatternMismatch: {
|
|
17446
|
-
type: String
|
|
17595
|
+
type: String,
|
|
17596
|
+
attribute: 'setcustomvaliditypatternmismatch'
|
|
17447
17597
|
},
|
|
17448
17598
|
|
|
17449
17599
|
/**
|
|
17450
17600
|
* Custom help text message to display when validity = `rangeOverflow`.
|
|
17451
17601
|
*/
|
|
17452
17602
|
setCustomValidityRangeOverflow: {
|
|
17453
|
-
type: String
|
|
17603
|
+
type: String,
|
|
17604
|
+
attribute: 'setcustomvalidityrangeoverflow'
|
|
17454
17605
|
},
|
|
17455
17606
|
|
|
17456
17607
|
/**
|
|
17457
17608
|
* Custom help text message to display when validity = `rangeUnderflow`.
|
|
17458
17609
|
*/
|
|
17459
17610
|
setCustomValidityRangeUnderflow: {
|
|
17460
|
-
type: String
|
|
17611
|
+
type: String,
|
|
17612
|
+
attribute: 'setcustomvalidityrangeunderflow'
|
|
17461
17613
|
},
|
|
17462
17614
|
|
|
17463
17615
|
/**
|
|
17464
17616
|
* Custom help text message to display when validity = `tooLong`.
|
|
17465
17617
|
*/
|
|
17466
17618
|
setCustomValidityTooLong: {
|
|
17467
|
-
type: String
|
|
17619
|
+
type: String,
|
|
17620
|
+
attribute: 'setcustomvaliditytoolong'
|
|
17468
17621
|
},
|
|
17469
17622
|
|
|
17470
17623
|
/**
|
|
17471
17624
|
* Custom help text message to display when validity = `tooShort`.
|
|
17472
17625
|
*/
|
|
17473
17626
|
setCustomValidityTooShort: {
|
|
17474
|
-
type: String
|
|
17627
|
+
type: String,
|
|
17628
|
+
attribute: 'setcustomvaliditytooshort'
|
|
17475
17629
|
},
|
|
17476
17630
|
|
|
17477
17631
|
/**
|
|
17478
17632
|
* Custom help text message to display when validity = `valueMissing`.
|
|
17479
17633
|
*/
|
|
17480
17634
|
setCustomValidityValueMissing: {
|
|
17481
|
-
type: String
|
|
17635
|
+
type: String,
|
|
17636
|
+
attribute: 'setcustomvalidityvaluemissing'
|
|
17482
17637
|
},
|
|
17483
17638
|
|
|
17484
17639
|
/**
|
|
17485
17640
|
* @ignore
|
|
17486
17641
|
*/
|
|
17487
17642
|
showPassword: {
|
|
17488
|
-
state: true
|
|
17643
|
+
state: true,
|
|
17644
|
+
attribute: false
|
|
17489
17645
|
},
|
|
17490
17646
|
|
|
17491
17647
|
/**
|
|
@@ -17497,7 +17653,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
17497
17653
|
},
|
|
17498
17654
|
|
|
17499
17655
|
/**
|
|
17500
|
-
* An enumerated attribute defines whether the element may be checked for spelling errors.
|
|
17656
|
+
* 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`.
|
|
17657
|
+
* @type {'true' | 'false'}
|
|
17501
17658
|
*/
|
|
17502
17659
|
spellcheck: {
|
|
17503
17660
|
type: String,
|
|
@@ -17528,7 +17685,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
17528
17685
|
* Sets validation mode to re-eval with each input.
|
|
17529
17686
|
*/
|
|
17530
17687
|
validateOnInput: {
|
|
17531
|
-
type: Boolean
|
|
17688
|
+
type: Boolean,
|
|
17689
|
+
attribute: 'validateoninput'
|
|
17532
17690
|
},
|
|
17533
17691
|
|
|
17534
17692
|
/**
|
|
@@ -18582,6 +18740,8 @@ let AuroHelpText$1 = class AuroHelpText extends i$3 {
|
|
|
18582
18740
|
super();
|
|
18583
18741
|
|
|
18584
18742
|
this.error = false;
|
|
18743
|
+
|
|
18744
|
+
/** @type {'default' | 'inverse'} */
|
|
18585
18745
|
this.appearance = "default";
|
|
18586
18746
|
this.onDark = false;
|
|
18587
18747
|
this.hasTextContent = false;
|
|
@@ -18602,8 +18762,8 @@ let AuroHelpText$1 = class AuroHelpText extends i$3 {
|
|
|
18602
18762
|
return {
|
|
18603
18763
|
|
|
18604
18764
|
/**
|
|
18605
|
-
*
|
|
18606
|
-
* @
|
|
18765
|
+
* The appearance of the help text, either default (for light backgrounds) or inverse (for dark backgrounds).
|
|
18766
|
+
* @type {'default' | 'inverse'}
|
|
18607
18767
|
* @default 'default'
|
|
18608
18768
|
*/
|
|
18609
18769
|
appearance: {
|
|
@@ -18616,6 +18776,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$3 {
|
|
|
18616
18776
|
*/
|
|
18617
18777
|
slotNodes: {
|
|
18618
18778
|
type: Boolean,
|
|
18779
|
+
attribute: 'slotnodes',
|
|
18619
18780
|
},
|
|
18620
18781
|
|
|
18621
18782
|
/**
|
|
@@ -18623,6 +18784,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$3 {
|
|
|
18623
18784
|
*/
|
|
18624
18785
|
hasTextContent: {
|
|
18625
18786
|
type: Boolean,
|
|
18787
|
+
attribute: 'hastextcontent',
|
|
18626
18788
|
},
|
|
18627
18789
|
|
|
18628
18790
|
/**
|
|
@@ -18638,6 +18800,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$3 {
|
|
|
18638
18800
|
*/
|
|
18639
18801
|
onDark: {
|
|
18640
18802
|
type: Boolean,
|
|
18803
|
+
attribute: 'ondark',
|
|
18641
18804
|
reflect: true
|
|
18642
18805
|
}
|
|
18643
18806
|
};
|
|
@@ -18708,7 +18871,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$3 {
|
|
|
18708
18871
|
}
|
|
18709
18872
|
};
|
|
18710
18873
|
|
|
18711
|
-
var formkitVersion$1 = '
|
|
18874
|
+
var formkitVersion$1 = '202608300032';
|
|
18712
18875
|
|
|
18713
18876
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
18714
18877
|
// See LICENSE in the project root for license information.
|
|
@@ -19722,6 +19885,9 @@ var headerVersion = '5.0.1';
|
|
|
19722
19885
|
* @slot subheader - Slot for the subheader content.
|
|
19723
19886
|
* @slot footer - Slot for the footer content.
|
|
19724
19887
|
* @slot ariaLabel.close - Slot for the close button aria-label.
|
|
19888
|
+
* @csspart bibtemplate - The outermost bibtemplate container element.
|
|
19889
|
+
* @event close-click - Notifies when the close button is clicked.
|
|
19890
|
+
* @event auro-bibtemplate-connected - Notifies that the bibtemplate has connected to the DOM, passing a reference to the element in the event detail.
|
|
19725
19891
|
*/
|
|
19726
19892
|
class AuroBibtemplate extends i$3 {
|
|
19727
19893
|
|
|
@@ -19761,10 +19927,19 @@ class AuroBibtemplate extends i$3 {
|
|
|
19761
19927
|
// function to define props used within the scope of this component
|
|
19762
19928
|
static get properties() {
|
|
19763
19929
|
return {
|
|
19930
|
+
|
|
19931
|
+
/**
|
|
19932
|
+
* If declared, the bibtemplate renders in fullscreen mode, exposing the header, subheader, and footer regions.
|
|
19933
|
+
*/
|
|
19764
19934
|
isFullscreen: {
|
|
19765
19935
|
type: Boolean,
|
|
19936
|
+
attribute: 'isfullscreen',
|
|
19766
19937
|
reflect: true
|
|
19767
19938
|
},
|
|
19939
|
+
|
|
19940
|
+
/**
|
|
19941
|
+
* If declared, the fullscreen headline renders using the larger display heading style.
|
|
19942
|
+
*/
|
|
19768
19943
|
large: {
|
|
19769
19944
|
type: Boolean,
|
|
19770
19945
|
reflect: true
|
|
@@ -19775,6 +19950,7 @@ class AuroBibtemplate extends i$3 {
|
|
|
19775
19950
|
*/
|
|
19776
19951
|
showFooter: {
|
|
19777
19952
|
type: Boolean,
|
|
19953
|
+
attribute: 'showfooter',
|
|
19778
19954
|
reflect: true
|
|
19779
19955
|
}
|
|
19780
19956
|
};
|
|
@@ -19887,7 +20063,7 @@ class AuroBibtemplate extends i$3 {
|
|
|
19887
20063
|
}
|
|
19888
20064
|
}
|
|
19889
20065
|
|
|
19890
|
-
var formkitVersion = '
|
|
20066
|
+
var formkitVersion = '202608300032';
|
|
19891
20067
|
|
|
19892
20068
|
var styleCss$3 = i$6`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block;text-align:left}:host [auro-dropdown]{--ds-auro-dropdown-trigger-background-color: transparent}:host #inputInBib::part(wrapper){box-shadow:none}:host #inputInBib::part(accent-left){display:none}:host([layout*=classic]) [auro-input]{width:100%}:host([layout*=classic]) [auro-input]::part(helpText){display:none}:host([layout*=classic]) #slotHolder{display:none}`;
|
|
19893
20069
|
|
|
@@ -19895,37 +20071,37 @@ var styleEmphasizedCss = i$6`:host([layout*=emphasized][shape*=pill]) [auro-inpu
|
|
|
19895
20071
|
|
|
19896
20072
|
var styleSnowflakeCss = i$6`:host([layout*=snowflake][shape*=snowflake]) [auro-input]{width:100%}:host([layout*=snowflake][shape*=snowflake]) [auro-input]::part(inputHelpText){display:none}:host([layout*=snowflake][shape*=snowflake])::part(helpText){text-align:center}`;
|
|
19897
20073
|
|
|
20074
|
+
/**
|
|
20075
|
+
* AuroElement is the shared base class for layout-aware Auro form components.
|
|
20076
|
+
*
|
|
20077
|
+
* It defines the common `layout`, `shape`, `size`, and `ondark` reactive
|
|
20078
|
+
* properties and the architecture helpers (`renderLayout`, `resetShapeClasses`,
|
|
20079
|
+
* `resetLayoutClasses`) that subclasses use to render a chosen layout and apply
|
|
20080
|
+
* the matching `shape-*` / `layout-*` wrapper classes. Subclasses supply their
|
|
20081
|
+
* own default and valid value set for `layout`, `shape`, and `size`.
|
|
20082
|
+
*/
|
|
19898
20083
|
class AuroElement extends i$3 {
|
|
19899
20084
|
static get properties() {
|
|
19900
20085
|
return {
|
|
19901
20086
|
|
|
19902
20087
|
/**
|
|
19903
|
-
*
|
|
19904
|
-
* @default {'default'}
|
|
20088
|
+
* When true, renders the component styled for use on a dark background.
|
|
19905
20089
|
*/
|
|
19906
|
-
layout: {
|
|
19907
|
-
type: String,
|
|
19908
|
-
attribute: "layout",
|
|
19909
|
-
reflect: true
|
|
19910
|
-
},
|
|
19911
|
-
|
|
19912
|
-
shape: {
|
|
19913
|
-
type: String,
|
|
19914
|
-
attribute: "shape",
|
|
19915
|
-
reflect: true
|
|
19916
|
-
},
|
|
19917
|
-
|
|
19918
|
-
size: {
|
|
19919
|
-
type: String,
|
|
19920
|
-
attribute: "size",
|
|
19921
|
-
reflect: true
|
|
19922
|
-
},
|
|
19923
|
-
|
|
19924
20090
|
onDark: {
|
|
19925
20091
|
type: Boolean,
|
|
19926
20092
|
attribute: "ondark",
|
|
19927
20093
|
reflect: true
|
|
19928
20094
|
}
|
|
20095
|
+
|
|
20096
|
+
// NOTE: `layout`, `shape`, and `size` are intentionally NOT declared here.
|
|
20097
|
+
// Their valid value sets differ per component, and the CEM analyzer roots
|
|
20098
|
+
// an inherited property's `type` in the class that declares it — a base
|
|
20099
|
+
// declaration would force every subclass's `@type` to be discarded and
|
|
20100
|
+
// emitted as plain `string`. Each subclass declares its own `layout` /
|
|
20101
|
+
// `shape` / `size` with an exact `@type` union instead. AuroElement still
|
|
20102
|
+
// consumes `this.layout` / `this.shape` / `this.size` in its render and
|
|
20103
|
+
// architecture helpers below (subclasses guarantee the reactive props).
|
|
20104
|
+
// See AlaskaAirlines/discussions#653.
|
|
19929
20105
|
};
|
|
19930
20106
|
}
|
|
19931
20107
|
|
|
@@ -20101,6 +20277,8 @@ class AuroHelpText extends i$3 {
|
|
|
20101
20277
|
super();
|
|
20102
20278
|
|
|
20103
20279
|
this.error = false;
|
|
20280
|
+
|
|
20281
|
+
/** @type {'default' | 'inverse'} */
|
|
20104
20282
|
this.appearance = "default";
|
|
20105
20283
|
this.onDark = false;
|
|
20106
20284
|
this.hasTextContent = false;
|
|
@@ -20121,8 +20299,8 @@ class AuroHelpText extends i$3 {
|
|
|
20121
20299
|
return {
|
|
20122
20300
|
|
|
20123
20301
|
/**
|
|
20124
|
-
*
|
|
20125
|
-
* @
|
|
20302
|
+
* The appearance of the help text, either default (for light backgrounds) or inverse (for dark backgrounds).
|
|
20303
|
+
* @type {'default' | 'inverse'}
|
|
20126
20304
|
* @default 'default'
|
|
20127
20305
|
*/
|
|
20128
20306
|
appearance: {
|
|
@@ -20135,6 +20313,7 @@ class AuroHelpText extends i$3 {
|
|
|
20135
20313
|
*/
|
|
20136
20314
|
slotNodes: {
|
|
20137
20315
|
type: Boolean,
|
|
20316
|
+
attribute: 'slotnodes',
|
|
20138
20317
|
},
|
|
20139
20318
|
|
|
20140
20319
|
/**
|
|
@@ -20142,6 +20321,7 @@ class AuroHelpText extends i$3 {
|
|
|
20142
20321
|
*/
|
|
20143
20322
|
hasTextContent: {
|
|
20144
20323
|
type: Boolean,
|
|
20324
|
+
attribute: 'hastextcontent',
|
|
20145
20325
|
},
|
|
20146
20326
|
|
|
20147
20327
|
/**
|
|
@@ -20157,6 +20337,7 @@ class AuroHelpText extends i$3 {
|
|
|
20157
20337
|
*/
|
|
20158
20338
|
onDark: {
|
|
20159
20339
|
type: Boolean,
|
|
20340
|
+
attribute: 'ondark',
|
|
20160
20341
|
reflect: true
|
|
20161
20342
|
}
|
|
20162
20343
|
};
|
|
@@ -20287,6 +20468,7 @@ function getOptionLabel(option) {
|
|
|
20287
20468
|
* @slot label - Defines the content of the label.
|
|
20288
20469
|
* @slot helpText - Defines the content of the helpText.
|
|
20289
20470
|
* @slot displayValue - Allows custom HTML content to display the selected value when the combobox is not focused. Only works with `snowflake` and `emphasized` layouts.
|
|
20471
|
+
* @csspart helpText - The help text and error message content container.
|
|
20290
20472
|
* @event auroCombobox-valueSet - (Deprecated) Notifies that the component has a new value set.
|
|
20291
20473
|
* @event input - Notifies that the component has a new value set.
|
|
20292
20474
|
* @event inputValue - Notifies that the components internal HTML5 input value has changed.
|
|
@@ -20306,6 +20488,7 @@ class AuroCombobox extends AuroElement {
|
|
|
20306
20488
|
*/
|
|
20307
20489
|
_initializeDefaults() {
|
|
20308
20490
|
// Defaults that effect the combobox behavior and state
|
|
20491
|
+
/** @type {'default' | 'inverse'} */
|
|
20309
20492
|
this.appearance = "default";
|
|
20310
20493
|
this.disabled = false;
|
|
20311
20494
|
this.msgSelectionMissing = 'Please select an option.';
|
|
@@ -20391,7 +20574,7 @@ class AuroCombobox extends AuroElement {
|
|
|
20391
20574
|
|
|
20392
20575
|
/**
|
|
20393
20576
|
* Defines whether the component will be on lighter or darker backgrounds.
|
|
20394
|
-
* @
|
|
20577
|
+
* @type {'default' | 'inverse'}
|
|
20395
20578
|
* @default 'default'
|
|
20396
20579
|
*/
|
|
20397
20580
|
appearance: {
|
|
@@ -20412,6 +20595,7 @@ class AuroCombobox extends AuroElement {
|
|
|
20412
20595
|
*/
|
|
20413
20596
|
autoPlacement: {
|
|
20414
20597
|
type: Boolean,
|
|
20598
|
+
attribute: 'autoplacement',
|
|
20415
20599
|
reflect: true
|
|
20416
20600
|
},
|
|
20417
20601
|
|
|
@@ -20419,9 +20603,11 @@ class AuroCombobox extends AuroElement {
|
|
|
20419
20603
|
* Array of available options to display in the dropdown.
|
|
20420
20604
|
* This array contains all non-hidden options (e.g., hidden by filtering on input value).
|
|
20421
20605
|
* @private
|
|
20606
|
+
* @type {HTMLElement[]}
|
|
20422
20607
|
*/
|
|
20423
20608
|
availableOptions: {
|
|
20424
20609
|
state: true,
|
|
20610
|
+
attribute: false,
|
|
20425
20611
|
type: Array,
|
|
20426
20612
|
reflect: false,
|
|
20427
20613
|
hasChanged(newVal, oldVal) {
|
|
@@ -20491,6 +20677,7 @@ class AuroCombobox extends AuroElement {
|
|
|
20491
20677
|
*/
|
|
20492
20678
|
dvInputOnly: {
|
|
20493
20679
|
type: Boolean,
|
|
20680
|
+
attribute: 'dvinputonly',
|
|
20494
20681
|
reflect: true
|
|
20495
20682
|
},
|
|
20496
20683
|
|
|
@@ -20524,6 +20711,29 @@ class AuroCombobox extends AuroElement {
|
|
|
20524
20711
|
*/
|
|
20525
20712
|
layout: {
|
|
20526
20713
|
type: String,
|
|
20714
|
+
attribute: "layout",
|
|
20715
|
+
reflect: true
|
|
20716
|
+
},
|
|
20717
|
+
|
|
20718
|
+
/**
|
|
20719
|
+
* Sets the shape of the combobox.
|
|
20720
|
+
* @type {'box' | 'classic' | 'pill' | 'pill-left' | 'pill-right' | 'rounded' | 'snowflake'}
|
|
20721
|
+
* @default 'classic'
|
|
20722
|
+
*/
|
|
20723
|
+
shape: {
|
|
20724
|
+
type: String,
|
|
20725
|
+
attribute: "shape",
|
|
20726
|
+
reflect: true
|
|
20727
|
+
},
|
|
20728
|
+
|
|
20729
|
+
/**
|
|
20730
|
+
* Sets the size of the combobox.
|
|
20731
|
+
* @type {'xs' | 'sm' | 'md' | 'lg' | 'xl'}
|
|
20732
|
+
* @default 'xl'
|
|
20733
|
+
*/
|
|
20734
|
+
size: {
|
|
20735
|
+
type: String,
|
|
20736
|
+
attribute: "size",
|
|
20527
20737
|
reflect: true
|
|
20528
20738
|
},
|
|
20529
20739
|
|
|
@@ -20533,6 +20743,7 @@ class AuroCombobox extends AuroElement {
|
|
|
20533
20743
|
*/
|
|
20534
20744
|
matchWidth: {
|
|
20535
20745
|
type: Boolean,
|
|
20746
|
+
attribute: 'matchwidth',
|
|
20536
20747
|
reflect: true
|
|
20537
20748
|
},
|
|
20538
20749
|
|
|
@@ -20541,6 +20752,7 @@ class AuroCombobox extends AuroElement {
|
|
|
20541
20752
|
*/
|
|
20542
20753
|
noFilter: {
|
|
20543
20754
|
type: Boolean,
|
|
20755
|
+
attribute: 'nofilter',
|
|
20544
20756
|
reflect: true
|
|
20545
20757
|
},
|
|
20546
20758
|
|
|
@@ -20550,6 +20762,7 @@ class AuroCombobox extends AuroElement {
|
|
|
20550
20762
|
*/
|
|
20551
20763
|
noFlip: {
|
|
20552
20764
|
type: Boolean,
|
|
20765
|
+
attribute: 'noflip',
|
|
20553
20766
|
reflect: true
|
|
20554
20767
|
},
|
|
20555
20768
|
|
|
@@ -20566,6 +20779,7 @@ class AuroCombobox extends AuroElement {
|
|
|
20566
20779
|
*/
|
|
20567
20780
|
noValidate: {
|
|
20568
20781
|
type: Boolean,
|
|
20782
|
+
attribute: 'novalidate',
|
|
20569
20783
|
reflect: true
|
|
20570
20784
|
},
|
|
20571
20785
|
|
|
@@ -20583,6 +20797,7 @@ class AuroCombobox extends AuroElement {
|
|
|
20583
20797
|
*/
|
|
20584
20798
|
onDark: {
|
|
20585
20799
|
type: Boolean,
|
|
20800
|
+
attribute: 'ondark',
|
|
20586
20801
|
reflect: true
|
|
20587
20802
|
},
|
|
20588
20803
|
|
|
@@ -20591,7 +20806,8 @@ class AuroCombobox extends AuroElement {
|
|
|
20591
20806
|
* @type {HTMLElement}
|
|
20592
20807
|
*/
|
|
20593
20808
|
optionSelected: {
|
|
20594
|
-
type: Object
|
|
20809
|
+
type: Object,
|
|
20810
|
+
attribute: 'optionselected'
|
|
20595
20811
|
},
|
|
20596
20812
|
|
|
20597
20813
|
/**
|
|
@@ -20601,6 +20817,7 @@ class AuroCombobox extends AuroElement {
|
|
|
20601
20817
|
*/
|
|
20602
20818
|
persistInput: {
|
|
20603
20819
|
type: Boolean,
|
|
20820
|
+
attribute: 'persistinput',
|
|
20604
20821
|
reflect: true
|
|
20605
20822
|
},
|
|
20606
20823
|
|
|
@@ -20634,28 +20851,32 @@ class AuroCombobox extends AuroElement {
|
|
|
20634
20851
|
* Sets a custom help text message to display for all validityStates.
|
|
20635
20852
|
*/
|
|
20636
20853
|
setCustomValidity: {
|
|
20637
|
-
type: String
|
|
20854
|
+
type: String,
|
|
20855
|
+
attribute: 'setcustomvalidity'
|
|
20638
20856
|
},
|
|
20639
20857
|
|
|
20640
20858
|
/**
|
|
20641
20859
|
* Custom help text message to display when validity = `customError`.
|
|
20642
20860
|
*/
|
|
20643
20861
|
setCustomValidityCustomError: {
|
|
20644
|
-
type: String
|
|
20862
|
+
type: String,
|
|
20863
|
+
attribute: 'setcustomvaliditycustomerror'
|
|
20645
20864
|
},
|
|
20646
20865
|
|
|
20647
20866
|
/**
|
|
20648
20867
|
* Custom help text message to display when validity = `valueMissing`.
|
|
20649
20868
|
*/
|
|
20650
20869
|
setCustomValidityValueMissing: {
|
|
20651
|
-
type: String
|
|
20870
|
+
type: String,
|
|
20871
|
+
attribute: 'setcustomvalidityvaluemissing'
|
|
20652
20872
|
},
|
|
20653
20873
|
|
|
20654
20874
|
/**
|
|
20655
20875
|
* Custom help text message to display when validity = `valueMissing` due to the user not choosing a menu option when behavior = "filter".
|
|
20656
20876
|
*/
|
|
20657
20877
|
setCustomValidityValueMissingFilter: {
|
|
20658
|
-
type: String
|
|
20878
|
+
type: String,
|
|
20879
|
+
attribute: 'setcustomvalidityvaluemissingfilter'
|
|
20659
20880
|
},
|
|
20660
20881
|
|
|
20661
20882
|
/**
|
|
@@ -20675,11 +20896,13 @@ class AuroCombobox extends AuroElement {
|
|
|
20675
20896
|
*/
|
|
20676
20897
|
triggerIcon: {
|
|
20677
20898
|
type: Boolean,
|
|
20899
|
+
attribute: 'triggericon',
|
|
20678
20900
|
reflect: true
|
|
20679
20901
|
},
|
|
20680
20902
|
|
|
20681
20903
|
/**
|
|
20682
20904
|
* Applies the defined value as the type attribute on `auro-input`.
|
|
20905
|
+
* @type {'text' | 'password' | 'email' | 'credit-card' | 'tel' | 'number' | 'date'}
|
|
20683
20906
|
*/
|
|
20684
20907
|
type: {
|
|
20685
20908
|
type: String,
|
|
@@ -20691,6 +20914,7 @@ class AuroCombobox extends AuroElement {
|
|
|
20691
20914
|
*/
|
|
20692
20915
|
typedValue: {
|
|
20693
20916
|
type: String,
|
|
20917
|
+
attribute: 'typedvalue',
|
|
20694
20918
|
reflect: true
|
|
20695
20919
|
},
|
|
20696
20920
|
|
|
@@ -20716,6 +20940,7 @@ class AuroCombobox extends AuroElement {
|
|
|
20716
20940
|
*/
|
|
20717
20941
|
largeFullscreenHeadline: {
|
|
20718
20942
|
type: Boolean,
|
|
20943
|
+
attribute: 'largefullscreenheadline',
|
|
20719
20944
|
reflect: true
|
|
20720
20945
|
},
|
|
20721
20946
|
/* eslint-enable jsdoc/require-description-complete-sentence */
|
|
@@ -20730,12 +20955,14 @@ class AuroCombobox extends AuroElement {
|
|
|
20730
20955
|
*/
|
|
20731
20956
|
fullscreenBreakpoint: {
|
|
20732
20957
|
type: String,
|
|
20958
|
+
attribute: "fullscreenbreakpoint",
|
|
20733
20959
|
reflect: true
|
|
20734
20960
|
},
|
|
20735
20961
|
|
|
20736
20962
|
/**
|
|
20737
20963
|
* Specifies the currently active option.
|
|
20738
20964
|
* @private
|
|
20965
|
+
* @type {HTMLElement}
|
|
20739
20966
|
*/
|
|
20740
20967
|
optionActive: {
|
|
20741
20968
|
type: Object,
|
|
@@ -22506,6 +22733,7 @@ let menuInstanceIdCounter = 0;
|
|
|
22506
22733
|
* @event {CustomEvent<Element>} auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
|
|
22507
22734
|
* @event {CustomEvent<any>} auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
22508
22735
|
* @event {CustomEvent<{ loading: boolean; hasLoadingPlaceholder: boolean; }>} auroMenu-loadingChange - Notifies when the loading attribute is changed.
|
|
22736
|
+
* @event {CustomEvent<{ options: Array<HTMLElement> }>} auroMenu-optionsChange - Notifies that the set of available menu options has changed.
|
|
22509
22737
|
* @event {CustomEvent<any>} auroMenu-selectValueFailure - Notifies that an attempt to select a menuoption by matching a value has failed.
|
|
22510
22738
|
* @event {CustomEvent<any>} auroMenu-selectValueReset - Notifies that the component value has been reset.
|
|
22511
22739
|
* @event {CustomEvent<any>} auroMenu-selectedOption - Notifies that a new menuoption selection has been made.
|
|
@@ -22520,15 +22748,7 @@ class AuroMenu extends AuroElement {
|
|
|
22520
22748
|
|
|
22521
22749
|
// State properties (reactive)
|
|
22522
22750
|
|
|
22523
|
-
|
|
22524
|
-
* @private
|
|
22525
|
-
*/
|
|
22526
|
-
this.shape = "box";
|
|
22527
|
-
|
|
22528
|
-
/**
|
|
22529
|
-
* @private
|
|
22530
|
-
*/
|
|
22531
|
-
this.size = "sm";
|
|
22751
|
+
this.initializeArchitectureDefaults();
|
|
22532
22752
|
|
|
22533
22753
|
// Value of the selected options
|
|
22534
22754
|
this.value = undefined;
|
|
@@ -22569,8 +22789,6 @@ class AuroMenu extends AuroElement {
|
|
|
22569
22789
|
|
|
22570
22790
|
// Instance properties (non-reactive)
|
|
22571
22791
|
|
|
22572
|
-
menuInstanceIdCounter += 1;
|
|
22573
|
-
|
|
22574
22792
|
Object.assign(this, {
|
|
22575
22793
|
// Root-level menu (true) or a nested submenu (false)
|
|
22576
22794
|
rootMenu: true,
|
|
@@ -22582,7 +22800,7 @@ class AuroMenu extends AuroElement {
|
|
|
22582
22800
|
loadingSlots: null,
|
|
22583
22801
|
// Unique id for this menu instance; prefixes every auto-generated option
|
|
22584
22802
|
// key so keys never collide across menus in the same document.
|
|
22585
|
-
_menuInstanceId: `menu-${menuInstanceIdCounter}`,
|
|
22803
|
+
_menuInstanceId: `menu-${menuInstanceIdCounter += 1}`,
|
|
22586
22804
|
// Monotonically increasing counter for option key generation. Never
|
|
22587
22805
|
// resets, so a key is never reused within this instance's lifetime.
|
|
22588
22806
|
_optionKeyCounter: 0,
|
|
@@ -22598,10 +22816,50 @@ class AuroMenu extends AuroElement {
|
|
|
22598
22816
|
});
|
|
22599
22817
|
}
|
|
22600
22818
|
|
|
22819
|
+
// Defaults for the layout/shape/size architecture props are set in a helper
|
|
22820
|
+
// (not the constructor body) so the CEM analyzer keeps their `@type` unions
|
|
22821
|
+
// instead of inferring `string` from a constructor-literal assignment.
|
|
22822
|
+
// See AlaskaAirlines/discussions#653.
|
|
22823
|
+
initializeArchitectureDefaults() {
|
|
22824
|
+
this.shape = "box";
|
|
22825
|
+
this.size = "sm";
|
|
22826
|
+
}
|
|
22827
|
+
|
|
22601
22828
|
static get properties() {
|
|
22602
22829
|
return {
|
|
22603
22830
|
...super.properties,
|
|
22604
22831
|
|
|
22832
|
+
/**
|
|
22833
|
+
* Applies a named layout variant to the menu. Free-form string consumed by the shared architecture helpers; menu defines no closed value set.
|
|
22834
|
+
*/
|
|
22835
|
+
layout: {
|
|
22836
|
+
type: String,
|
|
22837
|
+
attribute: "layout",
|
|
22838
|
+
reflect: true
|
|
22839
|
+
},
|
|
22840
|
+
|
|
22841
|
+
/**
|
|
22842
|
+
* Sets the shape of the menu options.
|
|
22843
|
+
* @type {'box' | 'pill' | 'snowflake'}
|
|
22844
|
+
* @default 'box'
|
|
22845
|
+
*/
|
|
22846
|
+
shape: {
|
|
22847
|
+
type: String,
|
|
22848
|
+
attribute: "shape",
|
|
22849
|
+
reflect: true
|
|
22850
|
+
},
|
|
22851
|
+
|
|
22852
|
+
/**
|
|
22853
|
+
* Sets the size of the menu options.
|
|
22854
|
+
* @type {'xs' | 'sm' | 'md' | 'lg' | 'xl'}
|
|
22855
|
+
* @default 'sm'
|
|
22856
|
+
*/
|
|
22857
|
+
size: {
|
|
22858
|
+
type: String,
|
|
22859
|
+
attribute: "size",
|
|
22860
|
+
reflect: true
|
|
22861
|
+
},
|
|
22862
|
+
|
|
22605
22863
|
/**
|
|
22606
22864
|
* When true, the entire menu and all options are disabled.
|
|
22607
22865
|
*/
|
|
@@ -22657,6 +22915,7 @@ class AuroMenu extends AuroElement {
|
|
|
22657
22915
|
/**
|
|
22658
22916
|
* Specifies the current active menuOption.
|
|
22659
22917
|
* @readonly
|
|
22918
|
+
* @type {HTMLElement}
|
|
22660
22919
|
*/
|
|
22661
22920
|
optionActive: {
|
|
22662
22921
|
type: Object,
|
|
@@ -22666,6 +22925,7 @@ class AuroMenu extends AuroElement {
|
|
|
22666
22925
|
/**
|
|
22667
22926
|
* The currently selected menu option(s). In single-select mode this is a single `HTMLElement` (or `undefined` when nothing is selected). In multi-select mode this is an array of `HTMLElement`s.
|
|
22668
22927
|
* @readonly
|
|
22928
|
+
* @type {HTMLElement | HTMLElement[]}
|
|
22669
22929
|
*/
|
|
22670
22930
|
optionSelected: {
|
|
22671
22931
|
// Allow HTMLElement, HTMLElement[] arrays and undefined
|
|
@@ -23883,9 +24143,36 @@ class AuroMenuOption extends AuroElement {
|
|
|
23883
24143
|
static get properties() {
|
|
23884
24144
|
return {
|
|
23885
24145
|
...super.properties,
|
|
24146
|
+
|
|
24147
|
+
/**
|
|
24148
|
+
* Sets the shape of the option. When unset, it inherits the shape of the parent `auro-menu`.
|
|
24149
|
+
* @type {'box' | 'pill' | 'snowflake'}
|
|
24150
|
+
* @default 'box'
|
|
24151
|
+
*/
|
|
24152
|
+
shape: {
|
|
24153
|
+
type: String,
|
|
24154
|
+
attribute: "shape",
|
|
24155
|
+
reflect: true
|
|
24156
|
+
},
|
|
24157
|
+
|
|
24158
|
+
/**
|
|
24159
|
+
* Sets the size of the option. When unset, it inherits the size of the parent `auro-menu`.
|
|
24160
|
+
* @type {'xs' | 'sm' | 'md' | 'lg' | 'xl'}
|
|
24161
|
+
* @default 'sm'
|
|
24162
|
+
*/
|
|
24163
|
+
size: {
|
|
24164
|
+
type: String,
|
|
24165
|
+
attribute: "size",
|
|
24166
|
+
reflect: true
|
|
24167
|
+
},
|
|
24168
|
+
|
|
24169
|
+
/**
|
|
24170
|
+
* When true, this option will not show the checkmark when selected.
|
|
24171
|
+
*/
|
|
23886
24172
|
noCheckmark: {
|
|
23887
24173
|
type: Boolean,
|
|
23888
|
-
reflect: true
|
|
24174
|
+
reflect: true,
|
|
24175
|
+
attribute: 'nocheckmark'
|
|
23889
24176
|
},
|
|
23890
24177
|
|
|
23891
24178
|
/**
|
|
@@ -23897,21 +24184,34 @@ class AuroMenuOption extends AuroElement {
|
|
|
23897
24184
|
type: Boolean,
|
|
23898
24185
|
reflect: true
|
|
23899
24186
|
},
|
|
24187
|
+
|
|
24188
|
+
/**
|
|
24189
|
+
* When true, the option is disabled and cannot be selected.
|
|
24190
|
+
*/
|
|
23900
24191
|
disabled: {
|
|
23901
24192
|
type: Boolean,
|
|
23902
24193
|
reflect: true
|
|
23903
24194
|
},
|
|
24195
|
+
|
|
24196
|
+
/**
|
|
24197
|
+
* The value associated with this menu option.
|
|
24198
|
+
*/
|
|
23904
24199
|
value: {
|
|
23905
24200
|
type: String,
|
|
23906
24201
|
reflect: true
|
|
23907
24202
|
},
|
|
24203
|
+
|
|
24204
|
+
/**
|
|
24205
|
+
* Sets the tab order of the menu option.
|
|
24206
|
+
*/
|
|
23908
24207
|
tabIndex: {
|
|
23909
24208
|
type: Number,
|
|
23910
|
-
reflect: true
|
|
24209
|
+
reflect: true,
|
|
24210
|
+
attribute: 'tabindex'
|
|
23911
24211
|
},
|
|
23912
24212
|
|
|
23913
24213
|
/**
|
|
23914
|
-
*
|
|
24214
|
+
* When set, selecting this option dispatches a custom event of the given name from the parent `auro-menu` (and an `auroMenu-customEventFired` event) instead of selecting the option.
|
|
23915
24215
|
*/
|
|
23916
24216
|
event: {
|
|
23917
24217
|
type: String,
|