@aurodesignsystem-dev/auro-formkit 0.0.0-pr1554.0 → 0.0.0-pr1554.10
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/checkbox/demo/customize.min.js +1 -1
- package/components/checkbox/demo/getting-started.min.js +1 -1
- package/components/checkbox/demo/index.min.js +1 -1
- package/components/checkbox/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/demo/customize.min.js +123 -43
- package/components/combobox/demo/getting-started.min.js +123 -43
- package/components/combobox/demo/index.min.js +123 -43
- package/components/combobox/dist/index.js +123 -43
- package/components/combobox/dist/registered.js +123 -43
- package/components/counter/demo/customize.min.js +47 -6
- package/components/counter/demo/index.min.js +47 -6
- package/components/counter/dist/index.js +47 -6
- package/components/counter/dist/registered.js +47 -6
- package/components/datepicker/demo/customize.min.js +85 -16
- package/components/datepicker/demo/index.min.js +85 -16
- package/components/datepicker/dist/index.js +85 -16
- package/components/datepicker/dist/registered.js +85 -16
- package/components/dropdown/demo/customize.min.js +46 -5
- package/components/dropdown/demo/getting-started.min.js +46 -5
- package/components/dropdown/demo/index.min.js +46 -5
- package/components/dropdown/dist/auro-dropdown.d.ts +8 -1
- package/components/dropdown/dist/index.js +46 -5
- package/components/dropdown/dist/registered.js +46 -5
- package/components/form/demo/customize.min.js +342 -83
- package/components/form/demo/getting-started.min.js +342 -83
- package/components/form/demo/index.min.js +342 -83
- package/components/form/demo/registerDemoDeps.min.js +342 -83
- package/components/input/demo/customize.min.js +38 -10
- package/components/input/demo/getting-started.min.js +38 -10
- package/components/input/demo/index.min.js +38 -10
- package/components/input/dist/index.js +38 -10
- package/components/input/dist/registered.js +38 -10
- package/components/radio/demo/customize.min.js +1 -1
- package/components/radio/demo/getting-started.min.js +1 -1
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/demo/customize.min.js +47 -6
- package/components/select/demo/getting-started.min.js +47 -6
- package/components/select/demo/index.min.js +47 -6
- package/components/select/dist/index.js +47 -6
- package/components/select/dist/registered.js +47 -6
- package/custom-elements.json +1783 -1777
- package/package.json +1 -1
|
@@ -3804,7 +3804,7 @@ class AuroHelpText extends i {
|
|
|
3804
3804
|
}
|
|
3805
3805
|
}
|
|
3806
3806
|
|
|
3807
|
-
var formkitVersion = '
|
|
3807
|
+
var formkitVersion = '202607160655';
|
|
3808
3808
|
|
|
3809
3809
|
class AuroElement extends i {
|
|
3810
3810
|
static get properties() {
|
|
@@ -3933,7 +3933,6 @@ class AuroDropdown extends AuroElement {
|
|
|
3933
3933
|
static get shadowRootOptions() {
|
|
3934
3934
|
return {
|
|
3935
3935
|
...AuroElement.shadowRootOptions,
|
|
3936
|
-
delegatesFocus: true,
|
|
3937
3936
|
};
|
|
3938
3937
|
}
|
|
3939
3938
|
|
|
@@ -4100,7 +4099,47 @@ class AuroDropdown extends AuroElement {
|
|
|
4100
4099
|
focusables[0].focus();
|
|
4101
4100
|
}
|
|
4102
4101
|
} else {
|
|
4102
|
+
this.focusTrigger();
|
|
4103
|
+
}
|
|
4104
|
+
}
|
|
4105
|
+
|
|
4106
|
+
/**
|
|
4107
|
+
* Focus the trigger content. When the trigger wrapper itself is focusable
|
|
4108
|
+
* (has tabindex), focus it directly. Otherwise, focus the first focusable
|
|
4109
|
+
* element slotted into the trigger slot (e.g. the auro-input).
|
|
4110
|
+
* @private
|
|
4111
|
+
*/
|
|
4112
|
+
focusTrigger() {
|
|
4113
|
+
if (this.trigger.hasAttribute('tabindex')) {
|
|
4103
4114
|
this.trigger.focus();
|
|
4115
|
+
} else {
|
|
4116
|
+
// Slotted content isn't a DOM child of the trigger div, so
|
|
4117
|
+
// getFocusableElements can't find it. Query assigned nodes directly.
|
|
4118
|
+
const slot = this.trigger.querySelector('slot[name="trigger"]');
|
|
4119
|
+
if (slot) {
|
|
4120
|
+
const assigned = slot.assignedElements();
|
|
4121
|
+
for (const el of assigned) {
|
|
4122
|
+
if (el.hasAttribute('disabled')) {
|
|
4123
|
+
continue;
|
|
4124
|
+
}
|
|
4125
|
+
// Try finding a focusable descendant first (handles non-focusable
|
|
4126
|
+
// wrappers like <div> containing a <button>). If none found, try
|
|
4127
|
+
// focusing the element directly (works for custom elements like
|
|
4128
|
+
// auro-input that have delegatesFocus or a custom focus() method).
|
|
4129
|
+
const descendants = getFocusableElements(el);
|
|
4130
|
+
if (descendants.length > 0) {
|
|
4131
|
+
descendants[0].focus();
|
|
4132
|
+
return;
|
|
4133
|
+
}
|
|
4134
|
+
el.focus();
|
|
4135
|
+
return;
|
|
4136
|
+
}
|
|
4137
|
+
}
|
|
4138
|
+
// Fallback: try DOM children (non-slotted content)
|
|
4139
|
+
const focusables = getFocusableElements(this.trigger);
|
|
4140
|
+
if (focusables.length > 0) {
|
|
4141
|
+
focusables[0].focus();
|
|
4142
|
+
}
|
|
4104
4143
|
}
|
|
4105
4144
|
}
|
|
4106
4145
|
|
|
@@ -4554,14 +4593,16 @@ class AuroDropdown extends AuroElement {
|
|
|
4554
4593
|
|
|
4555
4594
|
const eventType = event.detail.eventType || "unknown";
|
|
4556
4595
|
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
4557
|
-
this.
|
|
4596
|
+
this.focusTrigger();
|
|
4558
4597
|
}
|
|
4559
4598
|
|
|
4560
4599
|
|
|
4561
4600
|
// On Tab-driven close (eventType "focusloss"), let focus advance naturally
|
|
4562
4601
|
// — restoring to the trigger would trap the user on this dropdown, forcing
|
|
4563
4602
|
// an extra Tab to move on. Escape and outside-click still restore.
|
|
4564
|
-
|
|
4603
|
+
// When noHideOnThisFocusLoss is true, the consumer (e.g. combobox) manages
|
|
4604
|
+
// its own focus restoration — skip the generic trigger focus to avoid races.
|
|
4605
|
+
if (!this.isPopoverVisible && eventType !== "focusloss" && !this.noHideOnThisFocusLoss) {
|
|
4565
4606
|
// wait til the bib gets fully closed and rendered
|
|
4566
4607
|
setTimeout(() => {
|
|
4567
4608
|
// Skip if the bib re-opened, or if focus moved intentionally outside the dropdown (not to body).
|
|
@@ -4573,7 +4614,7 @@ class AuroDropdown extends AuroElement {
|
|
|
4573
4614
|
return;
|
|
4574
4615
|
}
|
|
4575
4616
|
// Restore focus to the trigger.
|
|
4576
|
-
this.
|
|
4617
|
+
this.focusTrigger();
|
|
4577
4618
|
});
|
|
4578
4619
|
}
|
|
4579
4620
|
}
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
*/
|
|
16
16
|
export class AuroDropdown extends AuroElement {
|
|
17
17
|
static get shadowRootOptions(): {
|
|
18
|
-
delegatesFocus: boolean;
|
|
19
18
|
clonable?: boolean;
|
|
20
19
|
customElementRegistry?: CustomElementRegistry | null;
|
|
20
|
+
delegatesFocus?: boolean;
|
|
21
21
|
mode: ShadowRootMode;
|
|
22
22
|
serializable?: boolean;
|
|
23
23
|
slotAssignment?: SlotAssignmentMode;
|
|
@@ -366,6 +366,13 @@ export class AuroDropdown extends AuroElement {
|
|
|
366
366
|
* If not, trigger element will get focus.
|
|
367
367
|
*/
|
|
368
368
|
focus(): void;
|
|
369
|
+
/**
|
|
370
|
+
* Focus the trigger content. When the trigger wrapper itself is focusable
|
|
371
|
+
* (has tabindex), focus it directly. Otherwise, focus the first focusable
|
|
372
|
+
* element slotted into the trigger slot (e.g. the auro-input).
|
|
373
|
+
* @private
|
|
374
|
+
*/
|
|
375
|
+
private focusTrigger;
|
|
369
376
|
/**
|
|
370
377
|
* Sets the active descendant element for accessibility.
|
|
371
378
|
* Uses ariaActiveDescendantElement to cross shadow DOM boundaries.
|
|
@@ -3709,7 +3709,7 @@ class AuroHelpText extends LitElement {
|
|
|
3709
3709
|
}
|
|
3710
3710
|
}
|
|
3711
3711
|
|
|
3712
|
-
var formkitVersion = '
|
|
3712
|
+
var formkitVersion = '202607160655';
|
|
3713
3713
|
|
|
3714
3714
|
class AuroElement extends LitElement {
|
|
3715
3715
|
static get properties() {
|
|
@@ -3838,7 +3838,6 @@ class AuroDropdown extends AuroElement {
|
|
|
3838
3838
|
static get shadowRootOptions() {
|
|
3839
3839
|
return {
|
|
3840
3840
|
...AuroElement.shadowRootOptions,
|
|
3841
|
-
delegatesFocus: true,
|
|
3842
3841
|
};
|
|
3843
3842
|
}
|
|
3844
3843
|
|
|
@@ -4005,7 +4004,47 @@ class AuroDropdown extends AuroElement {
|
|
|
4005
4004
|
focusables[0].focus();
|
|
4006
4005
|
}
|
|
4007
4006
|
} else {
|
|
4007
|
+
this.focusTrigger();
|
|
4008
|
+
}
|
|
4009
|
+
}
|
|
4010
|
+
|
|
4011
|
+
/**
|
|
4012
|
+
* Focus the trigger content. When the trigger wrapper itself is focusable
|
|
4013
|
+
* (has tabindex), focus it directly. Otherwise, focus the first focusable
|
|
4014
|
+
* element slotted into the trigger slot (e.g. the auro-input).
|
|
4015
|
+
* @private
|
|
4016
|
+
*/
|
|
4017
|
+
focusTrigger() {
|
|
4018
|
+
if (this.trigger.hasAttribute('tabindex')) {
|
|
4008
4019
|
this.trigger.focus();
|
|
4020
|
+
} else {
|
|
4021
|
+
// Slotted content isn't a DOM child of the trigger div, so
|
|
4022
|
+
// getFocusableElements can't find it. Query assigned nodes directly.
|
|
4023
|
+
const slot = this.trigger.querySelector('slot[name="trigger"]');
|
|
4024
|
+
if (slot) {
|
|
4025
|
+
const assigned = slot.assignedElements();
|
|
4026
|
+
for (const el of assigned) {
|
|
4027
|
+
if (el.hasAttribute('disabled')) {
|
|
4028
|
+
continue;
|
|
4029
|
+
}
|
|
4030
|
+
// Try finding a focusable descendant first (handles non-focusable
|
|
4031
|
+
// wrappers like <div> containing a <button>). If none found, try
|
|
4032
|
+
// focusing the element directly (works for custom elements like
|
|
4033
|
+
// auro-input that have delegatesFocus or a custom focus() method).
|
|
4034
|
+
const descendants = getFocusableElements(el);
|
|
4035
|
+
if (descendants.length > 0) {
|
|
4036
|
+
descendants[0].focus();
|
|
4037
|
+
return;
|
|
4038
|
+
}
|
|
4039
|
+
el.focus();
|
|
4040
|
+
return;
|
|
4041
|
+
}
|
|
4042
|
+
}
|
|
4043
|
+
// Fallback: try DOM children (non-slotted content)
|
|
4044
|
+
const focusables = getFocusableElements(this.trigger);
|
|
4045
|
+
if (focusables.length > 0) {
|
|
4046
|
+
focusables[0].focus();
|
|
4047
|
+
}
|
|
4009
4048
|
}
|
|
4010
4049
|
}
|
|
4011
4050
|
|
|
@@ -4459,14 +4498,16 @@ class AuroDropdown extends AuroElement {
|
|
|
4459
4498
|
|
|
4460
4499
|
const eventType = event.detail.eventType || "unknown";
|
|
4461
4500
|
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
4462
|
-
this.
|
|
4501
|
+
this.focusTrigger();
|
|
4463
4502
|
}
|
|
4464
4503
|
|
|
4465
4504
|
|
|
4466
4505
|
// On Tab-driven close (eventType "focusloss"), let focus advance naturally
|
|
4467
4506
|
// — restoring to the trigger would trap the user on this dropdown, forcing
|
|
4468
4507
|
// an extra Tab to move on. Escape and outside-click still restore.
|
|
4469
|
-
|
|
4508
|
+
// When noHideOnThisFocusLoss is true, the consumer (e.g. combobox) manages
|
|
4509
|
+
// its own focus restoration — skip the generic trigger focus to avoid races.
|
|
4510
|
+
if (!this.isPopoverVisible && eventType !== "focusloss" && !this.noHideOnThisFocusLoss) {
|
|
4470
4511
|
// wait til the bib gets fully closed and rendered
|
|
4471
4512
|
setTimeout(() => {
|
|
4472
4513
|
// Skip if the bib re-opened, or if focus moved intentionally outside the dropdown (not to body).
|
|
@@ -4478,7 +4519,7 @@ class AuroDropdown extends AuroElement {
|
|
|
4478
4519
|
return;
|
|
4479
4520
|
}
|
|
4480
4521
|
// Restore focus to the trigger.
|
|
4481
|
-
this.
|
|
4522
|
+
this.focusTrigger();
|
|
4482
4523
|
});
|
|
4483
4524
|
}
|
|
4484
4525
|
}
|
|
@@ -3709,7 +3709,7 @@ class AuroHelpText extends LitElement {
|
|
|
3709
3709
|
}
|
|
3710
3710
|
}
|
|
3711
3711
|
|
|
3712
|
-
var formkitVersion = '
|
|
3712
|
+
var formkitVersion = '202607160655';
|
|
3713
3713
|
|
|
3714
3714
|
class AuroElement extends LitElement {
|
|
3715
3715
|
static get properties() {
|
|
@@ -3838,7 +3838,6 @@ class AuroDropdown extends AuroElement {
|
|
|
3838
3838
|
static get shadowRootOptions() {
|
|
3839
3839
|
return {
|
|
3840
3840
|
...AuroElement.shadowRootOptions,
|
|
3841
|
-
delegatesFocus: true,
|
|
3842
3841
|
};
|
|
3843
3842
|
}
|
|
3844
3843
|
|
|
@@ -4005,7 +4004,47 @@ class AuroDropdown extends AuroElement {
|
|
|
4005
4004
|
focusables[0].focus();
|
|
4006
4005
|
}
|
|
4007
4006
|
} else {
|
|
4007
|
+
this.focusTrigger();
|
|
4008
|
+
}
|
|
4009
|
+
}
|
|
4010
|
+
|
|
4011
|
+
/**
|
|
4012
|
+
* Focus the trigger content. When the trigger wrapper itself is focusable
|
|
4013
|
+
* (has tabindex), focus it directly. Otherwise, focus the first focusable
|
|
4014
|
+
* element slotted into the trigger slot (e.g. the auro-input).
|
|
4015
|
+
* @private
|
|
4016
|
+
*/
|
|
4017
|
+
focusTrigger() {
|
|
4018
|
+
if (this.trigger.hasAttribute('tabindex')) {
|
|
4008
4019
|
this.trigger.focus();
|
|
4020
|
+
} else {
|
|
4021
|
+
// Slotted content isn't a DOM child of the trigger div, so
|
|
4022
|
+
// getFocusableElements can't find it. Query assigned nodes directly.
|
|
4023
|
+
const slot = this.trigger.querySelector('slot[name="trigger"]');
|
|
4024
|
+
if (slot) {
|
|
4025
|
+
const assigned = slot.assignedElements();
|
|
4026
|
+
for (const el of assigned) {
|
|
4027
|
+
if (el.hasAttribute('disabled')) {
|
|
4028
|
+
continue;
|
|
4029
|
+
}
|
|
4030
|
+
// Try finding a focusable descendant first (handles non-focusable
|
|
4031
|
+
// wrappers like <div> containing a <button>). If none found, try
|
|
4032
|
+
// focusing the element directly (works for custom elements like
|
|
4033
|
+
// auro-input that have delegatesFocus or a custom focus() method).
|
|
4034
|
+
const descendants = getFocusableElements(el);
|
|
4035
|
+
if (descendants.length > 0) {
|
|
4036
|
+
descendants[0].focus();
|
|
4037
|
+
return;
|
|
4038
|
+
}
|
|
4039
|
+
el.focus();
|
|
4040
|
+
return;
|
|
4041
|
+
}
|
|
4042
|
+
}
|
|
4043
|
+
// Fallback: try DOM children (non-slotted content)
|
|
4044
|
+
const focusables = getFocusableElements(this.trigger);
|
|
4045
|
+
if (focusables.length > 0) {
|
|
4046
|
+
focusables[0].focus();
|
|
4047
|
+
}
|
|
4009
4048
|
}
|
|
4010
4049
|
}
|
|
4011
4050
|
|
|
@@ -4459,14 +4498,16 @@ class AuroDropdown extends AuroElement {
|
|
|
4459
4498
|
|
|
4460
4499
|
const eventType = event.detail.eventType || "unknown";
|
|
4461
4500
|
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
4462
|
-
this.
|
|
4501
|
+
this.focusTrigger();
|
|
4463
4502
|
}
|
|
4464
4503
|
|
|
4465
4504
|
|
|
4466
4505
|
// On Tab-driven close (eventType "focusloss"), let focus advance naturally
|
|
4467
4506
|
// — restoring to the trigger would trap the user on this dropdown, forcing
|
|
4468
4507
|
// an extra Tab to move on. Escape and outside-click still restore.
|
|
4469
|
-
|
|
4508
|
+
// When noHideOnThisFocusLoss is true, the consumer (e.g. combobox) manages
|
|
4509
|
+
// its own focus restoration — skip the generic trigger focus to avoid races.
|
|
4510
|
+
if (!this.isPopoverVisible && eventType !== "focusloss" && !this.noHideOnThisFocusLoss) {
|
|
4470
4511
|
// wait til the bib gets fully closed and rendered
|
|
4471
4512
|
setTimeout(() => {
|
|
4472
4513
|
// Skip if the bib re-opened, or if focus moved intentionally outside the dropdown (not to body).
|
|
@@ -4478,7 +4519,7 @@ class AuroDropdown extends AuroElement {
|
|
|
4478
4519
|
return;
|
|
4479
4520
|
}
|
|
4480
4521
|
// Restore focus to the trigger.
|
|
4481
|
-
this.
|
|
4522
|
+
this.focusTrigger();
|
|
4482
4523
|
});
|
|
4483
4524
|
}
|
|
4484
4525
|
}
|