@aurodesignsystem-dev/auro-formkit 0.0.0-pr1489.6 → 0.0.0-pr1489.8

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 (51) hide show
  1. package/components/checkbox/demo/customize.min.js +1 -1
  2. package/components/checkbox/demo/getting-started.min.js +1 -1
  3. package/components/checkbox/demo/index.min.js +1 -1
  4. package/components/checkbox/dist/index.js +1 -1
  5. package/components/checkbox/dist/registered.js +1 -1
  6. package/components/combobox/demo/customize.min.js +24 -11
  7. package/components/combobox/demo/getting-started.min.js +24 -11
  8. package/components/combobox/demo/index.min.js +24 -11
  9. package/components/combobox/dist/index.js +24 -11
  10. package/components/combobox/dist/registered.js +24 -11
  11. package/components/counter/demo/customize.min.js +23 -10
  12. package/components/counter/demo/index.min.js +23 -10
  13. package/components/counter/dist/index.js +1 -1
  14. package/components/counter/dist/registered.js +1 -1
  15. package/components/datepicker/demo/accessibility.md +5 -5
  16. package/components/datepicker/demo/customize.min.js +185 -221
  17. package/components/datepicker/demo/index.md +26 -0
  18. package/components/datepicker/demo/index.min.js +187 -223
  19. package/components/datepicker/demo/keyboard-behavior.md +1 -1
  20. package/components/datepicker/dist/index.js +185 -221
  21. package/components/datepicker/dist/registered.js +185 -221
  22. package/components/datepicker/dist/src/auro-calendar-cell.d.ts +2 -2
  23. package/components/datepicker/dist/src/auro-calendar-month.d.ts +3 -4
  24. package/components/datepicker/dist/src/auro-datepicker.d.ts +72 -72
  25. package/components/dropdown/demo/customize.min.js +22 -9
  26. package/components/dropdown/demo/getting-started.min.js +22 -9
  27. package/components/dropdown/demo/index.min.js +22 -9
  28. package/components/dropdown/dist/auro-dropdown.d.ts +3 -2
  29. package/components/dropdown/dist/index.js +22 -9
  30. package/components/dropdown/dist/registered.js +22 -9
  31. package/components/form/demo/customize.min.js +258 -255
  32. package/components/form/demo/getting-started.min.js +258 -255
  33. package/components/form/demo/index.min.js +258 -255
  34. package/components/form/demo/registerDemoDeps.min.js +258 -255
  35. package/components/input/demo/customize.min.js +1 -1
  36. package/components/input/demo/getting-started.min.js +1 -1
  37. package/components/input/demo/index.min.js +1 -1
  38. package/components/input/dist/index.js +1 -1
  39. package/components/input/dist/registered.js +1 -1
  40. package/components/radio/demo/customize.min.js +1 -1
  41. package/components/radio/demo/getting-started.min.js +1 -1
  42. package/components/radio/demo/index.min.js +1 -1
  43. package/components/radio/dist/index.js +1 -1
  44. package/components/radio/dist/registered.js +1 -1
  45. package/components/select/demo/customize.min.js +23 -10
  46. package/components/select/demo/getting-started.min.js +23 -10
  47. package/components/select/demo/index.min.js +23 -10
  48. package/components/select/dist/index.js +23 -10
  49. package/components/select/dist/registered.js +23 -10
  50. package/custom-elements.json +96 -101
  51. package/package.json +1 -1
@@ -184,9 +184,9 @@ export class AuroCalendarCell extends LitElement {
184
184
  */
185
185
  private isLastHoveredDate;
186
186
  /**
187
- * Checks if the current date is a highlighted date.
187
+ * Checks if the current date is a referenced date.
188
188
  * @param {Object} dateStr - The date string in MM_DD_YYYY format.
189
- * @returns Boolean - True if the date is a highlighted date.
189
+ * @returns Boolean - True if the date is a referenced date.
190
190
  */
191
191
  isReferenceDate(dateStr: Object): boolean;
192
192
  /**
@@ -46,12 +46,11 @@ export class AuroCalendarMonth extends RangeDatepickerCalendar {
46
46
  */
47
47
  private handleDateHovered;
48
48
  /**
49
- * Handles arrow key navigation within the month grid.
50
- * Dispatches a cross-month navigation event when the boundary is reached.
49
+ * Dispatches a bubbling event when the mouse leaves the date grid body
50
+ * so the parent calendar can clear the range hover preview.
51
51
  * @private
52
- * @param {KeyboardEvent} event - The keyboard event.
53
52
  * @returns {void}
54
53
  */
55
- private handleGridKeyDown;
54
+ private handleTbodyMouseLeave;
56
55
  }
57
56
  import { RangeDatepickerCalendar } from './vendor/wc-range-datepicker/range-datepicker-calendar.js';
@@ -51,6 +51,20 @@ export class AuroDatePicker extends AuroElement {
51
51
  type: BooleanConstructor;
52
52
  reflect: boolean;
53
53
  };
54
+ /**
55
+ * Array of dates that cannot be selected. Dates should be in ISO format (YYYY-MM-DD).
56
+ */
57
+ blackoutDates: {
58
+ type: ArrayConstructor;
59
+ reflect: boolean;
60
+ };
61
+ /**
62
+ * Label announced for blackout (disabled but in-range) date cells.
63
+ */
64
+ blackoutLabel: {
65
+ type: StringConstructor;
66
+ reflect: boolean;
67
+ };
54
68
  /**
55
69
  * The last date that may be displayed in the calendar.
56
70
  */
@@ -99,24 +113,6 @@ export class AuroDatePicker extends AuroElement {
99
113
  type: StringConstructor;
100
114
  reflect: boolean;
101
115
  };
102
- hasFocus: {
103
- type: BooleanConstructor;
104
- reflect: boolean;
105
- };
106
- /**
107
- * @private
108
- */
109
- hasValue: {
110
- type: BooleanConstructor;
111
- reflect: boolean;
112
- };
113
- /**
114
- * @private
115
- */
116
- hasAllValues: {
117
- type: BooleanConstructor;
118
- reflect: boolean;
119
- };
120
116
  /**
121
117
  * Specifies the date format. The default is `mm/dd/yyyy`.
122
118
  */
@@ -133,6 +129,24 @@ export class AuroDatePicker extends AuroElement {
133
129
  * @default 'sm'
134
130
  */
135
131
  fullscreenBreakpoint: "xs" | "sm" | "md" | "lg" | "xl" | "disabled";
132
+ /**
133
+ * @private
134
+ */
135
+ hasAllValues: {
136
+ type: BooleanConstructor;
137
+ reflect: boolean;
138
+ };
139
+ hasFocus: {
140
+ type: BooleanConstructor;
141
+ reflect: boolean;
142
+ };
143
+ /**
144
+ * @private
145
+ */
146
+ hasValue: {
147
+ type: BooleanConstructor;
148
+ reflect: boolean;
149
+ };
136
150
  /** Exposes inputmode attribute for input. */
137
151
  inputmode: {
138
152
  type: StringConstructor;
@@ -167,6 +181,12 @@ export class AuroDatePicker extends AuroElement {
167
181
  type: StringConstructor;
168
182
  reflect: boolean;
169
183
  };
184
+ /**
185
+ * @private
186
+ */
187
+ monthFirst: {
188
+ type: BooleanConstructor;
189
+ };
170
190
  /**
171
191
  * Names of all 12 months to render in the calendar, used for localization of date string in mobile layout.
172
192
  */
@@ -174,23 +194,24 @@ export class AuroDatePicker extends AuroElement {
174
194
  type: ArrayConstructor;
175
195
  };
176
196
  /**
177
- * @private
197
+ * Accessible label for the next month navigation button.
178
198
  */
179
- monthFirst: {
180
- type: BooleanConstructor;
199
+ navLabelNextMonth: {
200
+ type: StringConstructor;
201
+ reflect: boolean;
181
202
  };
182
203
  /**
183
- * If declared, the bib will NOT flip to an alternate position
184
- * when there isn't enough space in the specified `placement`.
204
+ * Accessible label for the previous month navigation button.
185
205
  */
186
- noFlip: {
187
- type: BooleanConstructor;
206
+ navLabelPrevMonth: {
207
+ type: StringConstructor;
188
208
  reflect: boolean;
189
209
  };
190
210
  /**
191
- * If declared, the dropdown will shift its position to avoid being cut off by the viewport.
211
+ * If declared, the bib will NOT flip to an alternate position
212
+ * when there isn't enough space in the specified `placement`.
192
213
  */
193
- shift: {
214
+ noFlip: {
194
215
  type: BooleanConstructor;
195
216
  reflect: boolean;
196
217
  };
@@ -246,16 +267,9 @@ export class AuroDatePicker extends AuroElement {
246
267
  reflect: boolean;
247
268
  };
248
269
  /**
249
- * Label announced for the range start date cell.
250
- */
251
- rangeLabelStart: {
252
- type: StringConstructor;
253
- reflect: boolean;
254
- };
255
- /**
256
- * Label announced for the range end date cell.
270
+ * Label announced for cells after the range (or after start when no end is selected).
257
271
  */
258
- rangeLabelEnd: {
272
+ rangeLabelAfterRange: {
259
273
  type: StringConstructor;
260
274
  reflect: boolean;
261
275
  };
@@ -267,44 +281,23 @@ export class AuroDatePicker extends AuroElement {
267
281
  reflect: boolean;
268
282
  };
269
283
  /**
270
- * Label announced for cells within the selected range.
271
- */
272
- rangeLabelInRange: {
273
- type: StringConstructor;
274
- reflect: boolean;
275
- };
276
- /**
277
- * Label announced for cells after the range (or after start when no end is selected).
278
- */
279
- rangeLabelAfterRange: {
280
- type: StringConstructor;
281
- reflect: boolean;
282
- };
283
- /**
284
- * Array of dates that cannot be selected. Dates should be in ISO format (YYYY-MM-DD).
285
- */
286
- blackoutDates: {
287
- type: ArrayConstructor;
288
- reflect: boolean;
289
- };
290
- /**
291
- * Label announced for blackout (disabled but in-range) date cells.
284
+ * Label announced for the range end date cell.
292
285
  */
293
- blackoutLabel: {
286
+ rangeLabelEnd: {
294
287
  type: StringConstructor;
295
288
  reflect: boolean;
296
289
  };
297
290
  /**
298
- * Accessible label for the previous month navigation button.
291
+ * Label announced for cells within the selected range.
299
292
  */
300
- navLabelPrevMonth: {
293
+ rangeLabelInRange: {
301
294
  type: StringConstructor;
302
295
  reflect: boolean;
303
296
  };
304
297
  /**
305
- * Accessible label for the next month navigation button.
298
+ * Label announced for the range start date cell.
306
299
  */
307
- navLabelNextMonth: {
300
+ rangeLabelStart: {
308
301
  type: StringConstructor;
309
302
  reflect: boolean;
310
303
  };
@@ -354,6 +347,13 @@ export class AuroDatePicker extends AuroElement {
354
347
  setCustomValidityValueMissing: {
355
348
  type: StringConstructor;
356
349
  };
350
+ /**
351
+ * If declared, the dropdown will shift its position to avoid being cut off by the viewport.
352
+ */
353
+ shift: {
354
+ type: BooleanConstructor;
355
+ reflect: boolean;
356
+ };
357
357
  /**
358
358
  * Set true to make datepicker stacked style.
359
359
  */
@@ -361,6 +361,15 @@ export class AuroDatePicker extends AuroElement {
361
361
  type: BooleanConstructor;
362
362
  reflect: boolean;
363
363
  };
364
+ /**
365
+ * Indicates whether the datepicker is in a dirty state (has been interacted with).
366
+ * @private
367
+ */
368
+ touched: {
369
+ type: BooleanConstructor;
370
+ reflect: boolean;
371
+ attribute: boolean;
372
+ };
364
373
  /**
365
374
  * Specifies the `validityState` this element is in.
366
375
  */
@@ -380,15 +389,6 @@ export class AuroDatePicker extends AuroElement {
380
389
  valueEnd: {
381
390
  type: StringConstructor;
382
391
  };
383
- /**
384
- * Indicates whether the datepicker is in a dirty state (has been interacted with).
385
- * @private
386
- */
387
- touched: {
388
- type: BooleanConstructor;
389
- reflect: boolean;
390
- attribute: boolean;
391
- };
392
392
  };
393
393
  static get styles(): import("lit").CSSResult[];
394
394
  /**
@@ -3942,7 +3942,7 @@ class AuroHelpText extends i {
3942
3942
  }
3943
3943
  }
3944
3944
 
3945
- var formkitVersion = '202606012139';
3945
+ var formkitVersion = '202606030000';
3946
3946
 
3947
3947
  class AuroElement extends i {
3948
3948
  static get properties() {
@@ -4935,16 +4935,20 @@ class AuroDropdown extends AuroElement {
4935
4935
 
4936
4936
  // Walk up the ancestor chain, inerting siblings at each level
4937
4937
  // to ensure the entire page outside the host subtree is inert.
4938
+ // Uses a reference counter (data-auro-inert-count) so multiple
4939
+ // simultaneous modal dropdowns share inert state safely.
4938
4940
  let current = host;
4939
4941
  while (current.parentElement) {
4940
4942
  const parent = current.parentElement;
4941
4943
  for (const sibling of parent.children) {
4942
4944
  if (sibling !== current) {
4943
- this._inertSiblings.push({
4944
- element: sibling,
4945
- wasInert: sibling.inert
4946
- });
4945
+ const count = parseInt(sibling.dataset.auroInertCount || '0', 10);
4946
+ if (count === 0) {
4947
+ sibling.dataset.auroInertWas = sibling.inert ? 'true' : 'false';
4948
+ }
4949
+ sibling.dataset.auroInertCount = String(count + 1);
4947
4950
  sibling.inert = true;
4951
+ this._inertSiblings.push(sibling);
4948
4952
  }
4949
4953
  }
4950
4954
  current = parent;
@@ -4953,14 +4957,23 @@ class AuroDropdown extends AuroElement {
4953
4957
 
4954
4958
  /**
4955
4959
  * Restores `inert` state on siblings that were tracked by `_setPageInert`.
4956
- * Preserves the previous inert state so externally-inerted elements are
4957
- * not inadvertently re-enabled.
4960
+ * Uses reference counting so inert is only cleared when the last modal
4961
+ * dropdown releases a given element. Preserves the original inert state
4962
+ * so externally-inerted elements are not inadvertently re-enabled.
4958
4963
  * @private
4959
4964
  */
4960
4965
  _clearPageInert() {
4961
4966
  if (this._inertSiblings) {
4962
- for (const entry of this._inertSiblings) {
4963
- entry.element.inert = entry.wasInert;
4967
+ for (const sibling of this._inertSiblings) {
4968
+ const count = parseInt(sibling.dataset.auroInertCount || '1', 10) - 1;
4969
+ if (count <= 0) {
4970
+ const wasInert = sibling.dataset.auroInertWas === 'true';
4971
+ delete sibling.dataset.auroInertCount;
4972
+ delete sibling.dataset.auroInertWas;
4973
+ sibling.inert = wasInert;
4974
+ } else {
4975
+ sibling.dataset.auroInertCount = String(count);
4976
+ }
4964
4977
  }
4965
4978
  this._inertSiblings = undefined;
4966
4979
  }
@@ -3942,7 +3942,7 @@ class AuroHelpText extends i {
3942
3942
  }
3943
3943
  }
3944
3944
 
3945
- var formkitVersion = '202606012139';
3945
+ var formkitVersion = '202606030000';
3946
3946
 
3947
3947
  class AuroElement extends i {
3948
3948
  static get properties() {
@@ -4935,16 +4935,20 @@ class AuroDropdown extends AuroElement {
4935
4935
 
4936
4936
  // Walk up the ancestor chain, inerting siblings at each level
4937
4937
  // to ensure the entire page outside the host subtree is inert.
4938
+ // Uses a reference counter (data-auro-inert-count) so multiple
4939
+ // simultaneous modal dropdowns share inert state safely.
4938
4940
  let current = host;
4939
4941
  while (current.parentElement) {
4940
4942
  const parent = current.parentElement;
4941
4943
  for (const sibling of parent.children) {
4942
4944
  if (sibling !== current) {
4943
- this._inertSiblings.push({
4944
- element: sibling,
4945
- wasInert: sibling.inert
4946
- });
4945
+ const count = parseInt(sibling.dataset.auroInertCount || '0', 10);
4946
+ if (count === 0) {
4947
+ sibling.dataset.auroInertWas = sibling.inert ? 'true' : 'false';
4948
+ }
4949
+ sibling.dataset.auroInertCount = String(count + 1);
4947
4950
  sibling.inert = true;
4951
+ this._inertSiblings.push(sibling);
4948
4952
  }
4949
4953
  }
4950
4954
  current = parent;
@@ -4953,14 +4957,23 @@ class AuroDropdown extends AuroElement {
4953
4957
 
4954
4958
  /**
4955
4959
  * Restores `inert` state on siblings that were tracked by `_setPageInert`.
4956
- * Preserves the previous inert state so externally-inerted elements are
4957
- * not inadvertently re-enabled.
4960
+ * Uses reference counting so inert is only cleared when the last modal
4961
+ * dropdown releases a given element. Preserves the original inert state
4962
+ * so externally-inerted elements are not inadvertently re-enabled.
4958
4963
  * @private
4959
4964
  */
4960
4965
  _clearPageInert() {
4961
4966
  if (this._inertSiblings) {
4962
- for (const entry of this._inertSiblings) {
4963
- entry.element.inert = entry.wasInert;
4967
+ for (const sibling of this._inertSiblings) {
4968
+ const count = parseInt(sibling.dataset.auroInertCount || '1', 10) - 1;
4969
+ if (count <= 0) {
4970
+ const wasInert = sibling.dataset.auroInertWas === 'true';
4971
+ delete sibling.dataset.auroInertCount;
4972
+ delete sibling.dataset.auroInertWas;
4973
+ sibling.inert = wasInert;
4974
+ } else {
4975
+ sibling.dataset.auroInertCount = String(count);
4976
+ }
4964
4977
  }
4965
4978
  this._inertSiblings = undefined;
4966
4979
  }
@@ -3969,7 +3969,7 @@ class AuroHelpText extends i {
3969
3969
  }
3970
3970
  }
3971
3971
 
3972
- var formkitVersion = '202606012139';
3972
+ var formkitVersion = '202606030000';
3973
3973
 
3974
3974
  class AuroElement extends i {
3975
3975
  static get properties() {
@@ -4962,16 +4962,20 @@ class AuroDropdown extends AuroElement {
4962
4962
 
4963
4963
  // Walk up the ancestor chain, inerting siblings at each level
4964
4964
  // to ensure the entire page outside the host subtree is inert.
4965
+ // Uses a reference counter (data-auro-inert-count) so multiple
4966
+ // simultaneous modal dropdowns share inert state safely.
4965
4967
  let current = host;
4966
4968
  while (current.parentElement) {
4967
4969
  const parent = current.parentElement;
4968
4970
  for (const sibling of parent.children) {
4969
4971
  if (sibling !== current) {
4970
- this._inertSiblings.push({
4971
- element: sibling,
4972
- wasInert: sibling.inert
4973
- });
4972
+ const count = parseInt(sibling.dataset.auroInertCount || '0', 10);
4973
+ if (count === 0) {
4974
+ sibling.dataset.auroInertWas = sibling.inert ? 'true' : 'false';
4975
+ }
4976
+ sibling.dataset.auroInertCount = String(count + 1);
4974
4977
  sibling.inert = true;
4978
+ this._inertSiblings.push(sibling);
4975
4979
  }
4976
4980
  }
4977
4981
  current = parent;
@@ -4980,14 +4984,23 @@ class AuroDropdown extends AuroElement {
4980
4984
 
4981
4985
  /**
4982
4986
  * Restores `inert` state on siblings that were tracked by `_setPageInert`.
4983
- * Preserves the previous inert state so externally-inerted elements are
4984
- * not inadvertently re-enabled.
4987
+ * Uses reference counting so inert is only cleared when the last modal
4988
+ * dropdown releases a given element. Preserves the original inert state
4989
+ * so externally-inerted elements are not inadvertently re-enabled.
4985
4990
  * @private
4986
4991
  */
4987
4992
  _clearPageInert() {
4988
4993
  if (this._inertSiblings) {
4989
- for (const entry of this._inertSiblings) {
4990
- entry.element.inert = entry.wasInert;
4994
+ for (const sibling of this._inertSiblings) {
4995
+ const count = parseInt(sibling.dataset.auroInertCount || '1', 10) - 1;
4996
+ if (count <= 0) {
4997
+ const wasInert = sibling.dataset.auroInertWas === 'true';
4998
+ delete sibling.dataset.auroInertCount;
4999
+ delete sibling.dataset.auroInertWas;
5000
+ sibling.inert = wasInert;
5001
+ } else {
5002
+ sibling.dataset.auroInertCount = String(count);
5003
+ }
4991
5004
  }
4992
5005
  this._inertSiblings = undefined;
4993
5006
  }
@@ -428,8 +428,9 @@ export class AuroDropdown extends AuroElement {
428
428
  _inertSiblings: any[] | undefined;
429
429
  /**
430
430
  * Restores `inert` state on siblings that were tracked by `_setPageInert`.
431
- * Preserves the previous inert state so externally-inerted elements are
432
- * not inadvertently re-enabled.
431
+ * Uses reference counting so inert is only cleared when the last modal
432
+ * dropdown releases a given element. Preserves the original inert state
433
+ * so externally-inerted elements are not inadvertently re-enabled.
433
434
  * @private
434
435
  */
435
436
  private _clearPageInert;
@@ -3874,7 +3874,7 @@ class AuroHelpText extends LitElement {
3874
3874
  }
3875
3875
  }
3876
3876
 
3877
- var formkitVersion = '202606012139';
3877
+ var formkitVersion = '202606030000';
3878
3878
 
3879
3879
  class AuroElement extends LitElement {
3880
3880
  static get properties() {
@@ -4867,16 +4867,20 @@ class AuroDropdown extends AuroElement {
4867
4867
 
4868
4868
  // Walk up the ancestor chain, inerting siblings at each level
4869
4869
  // to ensure the entire page outside the host subtree is inert.
4870
+ // Uses a reference counter (data-auro-inert-count) so multiple
4871
+ // simultaneous modal dropdowns share inert state safely.
4870
4872
  let current = host;
4871
4873
  while (current.parentElement) {
4872
4874
  const parent = current.parentElement;
4873
4875
  for (const sibling of parent.children) {
4874
4876
  if (sibling !== current) {
4875
- this._inertSiblings.push({
4876
- element: sibling,
4877
- wasInert: sibling.inert
4878
- });
4877
+ const count = parseInt(sibling.dataset.auroInertCount || '0', 10);
4878
+ if (count === 0) {
4879
+ sibling.dataset.auroInertWas = sibling.inert ? 'true' : 'false';
4880
+ }
4881
+ sibling.dataset.auroInertCount = String(count + 1);
4879
4882
  sibling.inert = true;
4883
+ this._inertSiblings.push(sibling);
4880
4884
  }
4881
4885
  }
4882
4886
  current = parent;
@@ -4885,14 +4889,23 @@ class AuroDropdown extends AuroElement {
4885
4889
 
4886
4890
  /**
4887
4891
  * Restores `inert` state on siblings that were tracked by `_setPageInert`.
4888
- * Preserves the previous inert state so externally-inerted elements are
4889
- * not inadvertently re-enabled.
4892
+ * Uses reference counting so inert is only cleared when the last modal
4893
+ * dropdown releases a given element. Preserves the original inert state
4894
+ * so externally-inerted elements are not inadvertently re-enabled.
4890
4895
  * @private
4891
4896
  */
4892
4897
  _clearPageInert() {
4893
4898
  if (this._inertSiblings) {
4894
- for (const entry of this._inertSiblings) {
4895
- entry.element.inert = entry.wasInert;
4899
+ for (const sibling of this._inertSiblings) {
4900
+ const count = parseInt(sibling.dataset.auroInertCount || '1', 10) - 1;
4901
+ if (count <= 0) {
4902
+ const wasInert = sibling.dataset.auroInertWas === 'true';
4903
+ delete sibling.dataset.auroInertCount;
4904
+ delete sibling.dataset.auroInertWas;
4905
+ sibling.inert = wasInert;
4906
+ } else {
4907
+ sibling.dataset.auroInertCount = String(count);
4908
+ }
4896
4909
  }
4897
4910
  this._inertSiblings = undefined;
4898
4911
  }
@@ -3874,7 +3874,7 @@ class AuroHelpText extends LitElement {
3874
3874
  }
3875
3875
  }
3876
3876
 
3877
- var formkitVersion = '202606012139';
3877
+ var formkitVersion = '202606030000';
3878
3878
 
3879
3879
  class AuroElement extends LitElement {
3880
3880
  static get properties() {
@@ -4867,16 +4867,20 @@ class AuroDropdown extends AuroElement {
4867
4867
 
4868
4868
  // Walk up the ancestor chain, inerting siblings at each level
4869
4869
  // to ensure the entire page outside the host subtree is inert.
4870
+ // Uses a reference counter (data-auro-inert-count) so multiple
4871
+ // simultaneous modal dropdowns share inert state safely.
4870
4872
  let current = host;
4871
4873
  while (current.parentElement) {
4872
4874
  const parent = current.parentElement;
4873
4875
  for (const sibling of parent.children) {
4874
4876
  if (sibling !== current) {
4875
- this._inertSiblings.push({
4876
- element: sibling,
4877
- wasInert: sibling.inert
4878
- });
4877
+ const count = parseInt(sibling.dataset.auroInertCount || '0', 10);
4878
+ if (count === 0) {
4879
+ sibling.dataset.auroInertWas = sibling.inert ? 'true' : 'false';
4880
+ }
4881
+ sibling.dataset.auroInertCount = String(count + 1);
4879
4882
  sibling.inert = true;
4883
+ this._inertSiblings.push(sibling);
4880
4884
  }
4881
4885
  }
4882
4886
  current = parent;
@@ -4885,14 +4889,23 @@ class AuroDropdown extends AuroElement {
4885
4889
 
4886
4890
  /**
4887
4891
  * Restores `inert` state on siblings that were tracked by `_setPageInert`.
4888
- * Preserves the previous inert state so externally-inerted elements are
4889
- * not inadvertently re-enabled.
4892
+ * Uses reference counting so inert is only cleared when the last modal
4893
+ * dropdown releases a given element. Preserves the original inert state
4894
+ * so externally-inerted elements are not inadvertently re-enabled.
4890
4895
  * @private
4891
4896
  */
4892
4897
  _clearPageInert() {
4893
4898
  if (this._inertSiblings) {
4894
- for (const entry of this._inertSiblings) {
4895
- entry.element.inert = entry.wasInert;
4899
+ for (const sibling of this._inertSiblings) {
4900
+ const count = parseInt(sibling.dataset.auroInertCount || '1', 10) - 1;
4901
+ if (count <= 0) {
4902
+ const wasInert = sibling.dataset.auroInertWas === 'true';
4903
+ delete sibling.dataset.auroInertCount;
4904
+ delete sibling.dataset.auroInertWas;
4905
+ sibling.inert = wasInert;
4906
+ } else {
4907
+ sibling.dataset.auroInertCount = String(count);
4908
+ }
4896
4909
  }
4897
4910
  this._inertSiblings = undefined;
4898
4911
  }