@esri/calcite-components 5.2.0-next.10 → 5.2.0-next.12

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 (174) hide show
  1. package/dist/cdn/{Y3IJ4QWR.js → 2CDB7YMV.js} +1 -1
  2. package/dist/cdn/{5ZR6DDCR.js → 2FMHWMNQ.js} +1 -1
  3. package/dist/cdn/{TGYPYCF4.js → 2JZG6CW2.js} +1 -1
  4. package/dist/cdn/{62BATO6A.js → 2X4PAO3S.js} +1 -1
  5. package/dist/cdn/{IS3ZDW5X.js → 2XK6LELA.js} +1 -1
  6. package/dist/cdn/{M4DT3YH7.js → 354DIEVA.js} +1 -1
  7. package/dist/cdn/{PWRAXZYG.js → 44HM425L.js} +1 -1
  8. package/dist/cdn/{UB3V636R.js → 46HCGN3Z.js} +1 -1
  9. package/dist/cdn/{6EAKC3JX.js → 4BURTKNO.js} +1 -1
  10. package/dist/cdn/{DSKYNHS5.js → 4H7ZPEKZ.js} +1 -1
  11. package/dist/cdn/{BX2A7TZF.js → 52HQQX6Y.js} +1 -1
  12. package/dist/cdn/{GFNFEM62.js → 5454RDUL.js} +1 -1
  13. package/dist/cdn/{4ILBALOX.js → 5DZDAOWR.js} +1 -1
  14. package/dist/cdn/{WYZKN22P.js → 5NGA4EVP.js} +1 -1
  15. package/dist/cdn/{J667RYKY.js → 5UROUYS3.js} +1 -1
  16. package/dist/cdn/{WLHD45FG.js → 5VTZSLYJ.js} +1 -1
  17. package/dist/cdn/{NCB62BP6.js → 5YB5FJYE.js} +1 -1
  18. package/dist/cdn/{R2OJ24AU.js → 6D5P5PBV.js} +1 -1
  19. package/dist/cdn/{IKWZUQVX.js → 6LVEPSJF.js} +1 -1
  20. package/dist/cdn/{XPBXVOOM.js → 6PYZSUH3.js} +1 -1
  21. package/dist/cdn/{GS2Y3PBT.js → 6WLLLEN3.js} +1 -1
  22. package/dist/cdn/{QTPNQPO2.js → 6ZYLTGE3.js} +1 -1
  23. package/dist/cdn/{Z2HYUNW6.js → 75NCTK6L.js} +1 -1
  24. package/dist/cdn/{NOWB7ME4.js → 77PTOZSM.js} +1 -1
  25. package/dist/cdn/{X6NRJK63.js → 7CSWVJ5M.js} +1 -1
  26. package/dist/cdn/{RU76WLDJ.js → 7G4RBWYJ.js} +1 -1
  27. package/dist/cdn/{SUS2TW6Q.js → 7ICPTQE4.js} +1 -1
  28. package/dist/cdn/{NETUDVJE.js → ABPNVHU5.js} +1 -1
  29. package/dist/cdn/{KYXL4Q6Z.js → AELZW7AU.js} +1 -1
  30. package/dist/cdn/{32V4MTBZ.js → APMOQ4Y4.js} +1 -1
  31. package/dist/cdn/{62DS7KDI.js → AUR6YRDE.js} +1 -1
  32. package/dist/cdn/{X6FCHMZG.js → B4IGEBPK.js} +1 -1
  33. package/dist/cdn/{DS6L5K3I.js → BBBZ2WYF.js} +1 -1
  34. package/dist/cdn/BEE5ZZFY.js +2 -0
  35. package/dist/cdn/{LSCCXGYA.js → BHTABSYE.js} +1 -1
  36. package/dist/cdn/{D5SMTOSV.js → BZ6TSXUG.js} +1 -1
  37. package/dist/cdn/{2XBG7AQW.js → CAPBWUWG.js} +1 -1
  38. package/dist/cdn/{F3CASDS6.js → CGFRDHBP.js} +1 -1
  39. package/dist/cdn/{HDPZILRT.js → CJGWPL4U.js} +1 -1
  40. package/dist/cdn/{QCGQ7ATZ.js → CRGGJZWM.js} +1 -1
  41. package/dist/cdn/{5MI4LBOF.js → CRPOWZ37.js} +1 -1
  42. package/dist/cdn/{ACJQRKUW.js → CXU6VING.js} +1 -1
  43. package/dist/cdn/{AF4KCLDZ.js → CZ7VYDWG.js} +1 -1
  44. package/dist/cdn/{I5UVGD2T.js → D6LPYA46.js} +1 -1
  45. package/dist/cdn/{WDSPL6ZK.js → E63GBURX.js} +1 -1
  46. package/dist/cdn/{A5O37JHD.js → E744VP2Z.js} +1 -1
  47. package/dist/cdn/{TGZ3QKJ4.js → EH3PTZ4U.js} +1 -1
  48. package/dist/cdn/{HU6DWJRC.js → ENRWHPIF.js} +1 -1
  49. package/dist/cdn/{PKJLXAOH.js → ESZT6RT5.js} +1 -1
  50. package/dist/cdn/{BQTJOWZ3.js → ET7646XY.js} +1 -1
  51. package/dist/cdn/{NZSAVAYK.js → EWZPL6OB.js} +1 -1
  52. package/dist/cdn/FAW4SQGE.js +2 -0
  53. package/dist/cdn/{623VYD6R.js → FTXGWUZO.js} +1 -1
  54. package/dist/cdn/{7VRPMFQF.js → GADJ2LXH.js} +1 -1
  55. package/dist/cdn/{F2FESEN6.js → GQRIHYNB.js} +1 -1
  56. package/dist/cdn/{IOUY4CQP.js → H4T6A6SI.js} +1 -1
  57. package/dist/cdn/{R5TLERHG.js → HAV72ZDA.js} +1 -1
  58. package/dist/cdn/{QGF4HKFB.js → HHXN2PES.js} +2 -2
  59. package/dist/cdn/{LF33RPOG.js → HSABUJJ2.js} +1 -1
  60. package/dist/cdn/{PUF2Z3VH.js → IC54UVU5.js} +1 -1
  61. package/dist/cdn/ICNDY3NT.js +2 -0
  62. package/dist/cdn/{JSYBOIFM.js → IGIOBUYM.js} +1 -1
  63. package/dist/cdn/{RRCZQZOO.js → ISOE5AOQ.js} +1 -1
  64. package/dist/cdn/{JRW3WDSZ.js → IXZ6PFE7.js} +1 -1
  65. package/dist/cdn/{TI24RDMW.js → J2VPKHPR.js} +1 -1
  66. package/dist/cdn/{3B57SEKF.js → JBNMR7AO.js} +1 -1
  67. package/dist/cdn/{3LWCBP7W.js → JSJA6AQG.js} +1 -1
  68. package/dist/cdn/K2LPDQCB.js +2 -0
  69. package/dist/cdn/{I3B4HO2I.js → K44VSQNH.js} +1 -1
  70. package/dist/cdn/{5LF7TQ7N.js → KXOJANYH.js} +1 -1
  71. package/dist/cdn/{BFWNX5LC.js → KZIIO2XD.js} +1 -1
  72. package/dist/cdn/{EJDHS4O4.js → L3FQNCSW.js} +1 -1
  73. package/dist/cdn/{B57TN6IA.js → LJNFFPCF.js} +1 -1
  74. package/dist/cdn/{QJMDDNP3.js → LKRC2DI2.js} +1 -1
  75. package/dist/cdn/{CS4FUOM2.js → LMGYSP5H.js} +1 -1
  76. package/dist/cdn/{A65ZFLA5.js → LNEHNLWI.js} +1 -1
  77. package/dist/cdn/LPCOIGOZ.js +2 -0
  78. package/dist/cdn/{K7PZZZ6K.js → MCWGKKKK.js} +1 -1
  79. package/dist/cdn/{7RU3CEXC.js → MF2UVK2Y.js} +1 -1
  80. package/dist/cdn/{IB5GGLYT.js → MGECKJAN.js} +1 -1
  81. package/dist/cdn/{KIJ2PAMT.js → ML7VRYLW.js} +1 -1
  82. package/dist/cdn/{7OJ44OYE.js → N6U6CWDX.js} +1 -1
  83. package/dist/cdn/{UGQDFFBV.js → NBWS4C5W.js} +1 -1
  84. package/dist/cdn/{EB4TOPVL.js → NEQ464F7.js} +1 -1
  85. package/dist/cdn/{J6HUPBGJ.js → NQEA36ZD.js} +1 -1
  86. package/dist/cdn/{HTU2PERJ.js → NR2DIL26.js} +1 -1
  87. package/dist/cdn/{23VCVGLR.js → NTUCRCRT.js} +1 -1
  88. package/dist/cdn/{T6HXZ3H2.js → O6NLIZ6M.js} +1 -1
  89. package/dist/cdn/{AADSKWZE.js → OPBHLBK2.js} +1 -1
  90. package/dist/cdn/{QWDKQYDJ.js → OS4SFT2S.js} +1 -1
  91. package/dist/cdn/{LSHFRLID.js → P6DFWXKW.js} +1 -1
  92. package/dist/cdn/{ZV25GLCY.js → PBGLJ2NE.js} +1 -1
  93. package/dist/cdn/{GA7TBRYI.js → PBNUGRZX.js} +1 -1
  94. package/dist/cdn/{WESLKQDB.js → PHDTNRTM.js} +1 -1
  95. package/dist/cdn/{IAR4ISXM.js → PQYZ3E6P.js} +1 -1
  96. package/dist/cdn/{OPSPK4B3.js → PZNSB5BM.js} +1 -1
  97. package/dist/cdn/{ECJOLDA7.js → QHJT7WEH.js} +1 -1
  98. package/dist/cdn/{JSVI27VE.js → QXGCF46A.js} +1 -1
  99. package/dist/cdn/{NQW3WH3Q.js → QYY75EOV.js} +1 -1
  100. package/dist/cdn/{24IFUIVY.js → RLDYC26K.js} +1 -1
  101. package/dist/cdn/{XHHYMR4N.js → RNZE3WNS.js} +1 -1
  102. package/dist/cdn/{SCTJJN6F.js → RSHGM7UO.js} +1 -1
  103. package/dist/cdn/{I6SYKKXZ.js → RU5PXLVE.js} +1 -1
  104. package/dist/cdn/{CAYYH2BZ.js → RZAH33G6.js} +1 -1
  105. package/dist/cdn/{J672TVUY.js → S67ATPSA.js} +1 -1
  106. package/dist/cdn/{E2D5X3QE.js → SEFSZCQN.js} +1 -1
  107. package/dist/cdn/{FD4JYU3Z.js → SEQVM5PO.js} +1 -1
  108. package/dist/cdn/{YPAAYPPO.js → SHZ74755.js} +1 -1
  109. package/dist/cdn/{WZZAKFR4.js → SIVTVAQT.js} +1 -1
  110. package/dist/cdn/{KTXKK7QW.js → SOJIVG6M.js} +1 -1
  111. package/dist/cdn/SR2CE22O.js +2 -0
  112. package/dist/cdn/{4D4NG376.js → SYYE6RQW.js} +1 -1
  113. package/dist/cdn/{TQEGPC7M.js → TALQPJJZ.js} +1 -1
  114. package/dist/cdn/{PWDPNUIL.js → TBJEABC5.js} +1 -1
  115. package/dist/cdn/{JAJPR5ZA.js → TFYOAEH3.js} +1 -1
  116. package/dist/cdn/{CDZP2WAZ.js → TWQ57IRJ.js} +1 -1
  117. package/dist/cdn/{ASE5XDV4.js → UASO6SDG.js} +1 -1
  118. package/dist/cdn/{6XGFIG4A.js → UJWPJWIO.js} +1 -1
  119. package/dist/cdn/{DYPOSBRY.js → UPGBCUHE.js} +1 -1
  120. package/dist/cdn/{SNAUVEQE.js → UUCBJ7TH.js} +1 -1
  121. package/dist/cdn/{EBNDBB6M.js → V5LP26I7.js} +1 -1
  122. package/dist/cdn/{KNBD5GM5.js → V63M76YG.js} +1 -1
  123. package/dist/cdn/{XASONDK4.js → V67BG7XH.js} +1 -1
  124. package/dist/cdn/{VELYDHCO.js → VGNEUGPB.js} +1 -1
  125. package/dist/cdn/{WLKA4SAY.js → VUJAJ4W5.js} +1 -1
  126. package/dist/cdn/{AUFQLHKF.js → VVFKNSX5.js} +1 -1
  127. package/dist/cdn/{B4OXM5EW.js → VXFMTQI4.js} +1 -1
  128. package/dist/cdn/{BFGNWZDN.js → WAU5PXO6.js} +1 -1
  129. package/dist/cdn/{IVC47QDM.js → WDNHEC7F.js} +1 -1
  130. package/dist/cdn/{GCPJFQZF.js → WDOIKEZ5.js} +1 -1
  131. package/dist/cdn/{IR3U674S.js → X4XNQCPA.js} +1 -1
  132. package/dist/cdn/{BLEDNRID.js → X6BHVUUT.js} +1 -1
  133. package/dist/cdn/{4NS7O3WO.js → X7PZUV2N.js} +1 -1
  134. package/dist/cdn/{3KFW6OD6.js → X7RHHBQJ.js} +1 -1
  135. package/dist/cdn/{II45OKZO.js → YDKH5LGF.js} +1 -1
  136. package/dist/cdn/{2BWHYQMD.js → YE46XAUA.js} +1 -1
  137. package/dist/cdn/{IQNZOCQ5.js → YSRFQCJ4.js} +1 -1
  138. package/dist/cdn/{TRD5VAXC.js → YUKSX2SW.js} +1 -1
  139. package/dist/cdn/{ATGPYSIN.js → ZC4SJHJN.js} +1 -1
  140. package/dist/cdn/{D2OHAZVJ.js → ZC7MQVIB.js} +1 -1
  141. package/dist/cdn/{G35IZGOS.js → ZGTWRO3M.js} +1 -1
  142. package/dist/cdn/{KI44TQK5.js → ZLW3VJCO.js} +1 -1
  143. package/dist/cdn/ZRAZ7URS.js +2 -0
  144. package/dist/cdn/{MDCWCWAM.js → ZUAZBJFO.js} +1 -1
  145. package/dist/cdn/{5MVD3F6G.js → ZZ2IVCQ7.js} +1 -1
  146. package/dist/cdn/assets/combobox/t9n/messages.en.json +1 -1
  147. package/dist/cdn/assets/combobox/t9n/messages.json +1 -1
  148. package/dist/cdn/index.js +1 -1
  149. package/dist/chunks/resources.js +0 -1
  150. package/dist/chunks/runtime.js +5 -4
  151. package/dist/chunks/useSortable.js +34 -4
  152. package/dist/components/calcite-action/customElement.js +26 -10
  153. package/dist/components/calcite-carousel/customElement.js +1 -1
  154. package/dist/components/calcite-chip/customElement.d.ts +1 -1
  155. package/dist/components/calcite-chip/customElement.js +2 -2
  156. package/dist/components/calcite-combobox/customElement.js +5 -5
  157. package/dist/components/calcite-flow-item/customElement.js +9 -7
  158. package/dist/components/calcite-pagination/customElement.js +1 -1
  159. package/dist/components/calcite-panel/customElement.js +38 -6
  160. package/dist/components/calcite-tile/customElement.d.ts +1 -1
  161. package/dist/docs/api.json +1 -1
  162. package/dist/docs/docs.json +1 -1
  163. package/dist/docs/translations.json +1 -1
  164. package/dist/docs/vscode.html-custom-data.json +1 -1
  165. package/dist/docs/web-types.json +1 -1
  166. package/dist/loader.js +2 -2
  167. package/package.json +2 -2
  168. package/dist/cdn/2NR7N254.js +0 -2
  169. package/dist/cdn/DDKQNHOD.js +0 -2
  170. package/dist/cdn/I2P6NHEC.js +0 -2
  171. package/dist/cdn/J4H5KXXA.js +0 -2
  172. package/dist/cdn/KZPZO55C.js +0 -2
  173. package/dist/cdn/U2RL2HER.js +0 -2
  174. package/dist/cdn/VOWRCOLL.js +0 -2
@@ -87,7 +87,7 @@ class Carousel extends LitElement {
87
87
  this.slideDurationRemaining = time;
88
88
  }
89
89
  };
90
- this.messages = useT9n();
90
+ this.messages = useT9n({ blocking: true });
91
91
  this.focusSetter = useSetFocus()(this);
92
92
  this.interactiveContainer = useInteractive(this);
93
93
  this.itemDirection = "standby";
@@ -48,7 +48,7 @@ export abstract class Chip extends LitElement {
48
48
  */
49
49
  accessor disabled: boolean;
50
50
  /** Specifies an icon to display. */
51
- accessor icon: IconName;
51
+ accessor icon: IconName | undefined;
52
52
  /**
53
53
  * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`).
54
54
  *
@@ -16,7 +16,7 @@ class Chip extends LitElement {
16
16
  super();
17
17
  this.closeButtonRef = createRef();
18
18
  this.containerRef = createRef();
19
- this.messages = useT9n();
19
+ this.messages = useT9n({ blocking: true });
20
20
  this.focusSetter = useSetFocus()(this);
21
21
  this.interactiveContainer = useInteractive(this);
22
22
  this.hasImage = false;
@@ -162,7 +162,7 @@ class Chip extends LitElement {
162
162
  render() {
163
163
  const { disabled } = this;
164
164
  const disableInteraction = disabled || !disabled && !this.interactive;
165
- const role = this.selectionMode === "multiple" && this.interactive ? "checkbox" : this.selectionMode !== "none" && this.interactive ? "radio" : this.interactive ? "button" : "img";
165
+ const role = this.selectionMode === "multiple" && this.interactive ? "checkbox" : this.selectionMode !== "none" && this.interactive ? "radio" : this.interactive ? "button" : this.closable ? void 0 : "img";
166
166
  return this.interactiveContainer({ disabled, children: html`<div .ariaChecked=${this.selectionMode !== "none" && this.interactive ? this.selected : void 0} .ariaLabel=${this.label} class=${safeClassMap({
167
167
  [CSS.container]: true,
168
168
  [CSS.textSlotted]: this.hasText,
@@ -116,7 +116,7 @@ class Combobox extends LitElement {
116
116
  this._selectedItems = [];
117
117
  this.textInputRef = createRef();
118
118
  this._value = "";
119
- this.messages = useT9n();
119
+ this.messages = useT9n({ blocking: true });
120
120
  this.focusSetter = useSetFocus()(this);
121
121
  this.customChipAddHandler = () => {
122
122
  this.addCustomChip(this.filterText, true);
@@ -1145,7 +1145,7 @@ class Combobox extends LitElement {
1145
1145
  }
1146
1146
  getDescriptionMessage() {
1147
1147
  const value = Array.isArray(this.value) ? this.value.join(", ") : this.value;
1148
- return this.readOnly ? this.messages.nonEditable?.replace("{value}", `${value}`) ?? `${value}` : value;
1148
+ return this.readOnly ? this.messages.nonEditable.replace("{value}", `${value}`) : value;
1149
1149
  }
1150
1150
  getChipLabel(item, isAncestors) {
1151
1151
  if (!isAncestors) {
@@ -1159,10 +1159,10 @@ class Combobox extends LitElement {
1159
1159
  return keyed(item.guid || item.value || label, html`<calcite-chip .appearance=${readOnly ? "outline" : "solid"} class=${safeClassMap({
1160
1160
  [CSS.chip]: true,
1161
1161
  [CSS.disabled]: disabled
1162
- })} .closable=${!disabled && !readOnly} data-testid=${`${disabled ? "disabled-chip" : "chip"}-${index}`} .disabled=${disabled} .icon=${item.icon} .iconFlipRtl=${item.iconFlipRtl} id=${(!disabled && item.guid ? `${IDS.chip(item.guid)}` : void 0) ?? nothing} .label=${label} .messageOverrides=${!disabled ? { dismissLabel: messages.removeTag } : void 0} @calciteChipClose=${!disabled ? () => this.calciteChipCloseHandler(item) : void 0} @focusin=${!disabled ? () => this.activeChipIndex = index : void 0} .scale=${scale} .selected=${item.selected} .tabIndex=${!disabled && activeChipIndex === index ? 0 : -1} title=${label ?? nothing} .value=${item.value}>${label}</calcite-chip>`);
1162
+ })} .closable=${!disabled && !readOnly} data-testid=${`${disabled ? "disabled-chip" : "chip"}-${index}`} .disabled=${disabled} .icon=${item.icon} .iconFlipRtl=${item.iconFlipRtl} id=${(!disabled && item.guid ? `${IDS.chip(item.guid)}` : void 0) ?? nothing} .label=${label} .messageOverrides=${!disabled ? { dismissLabel: messages.removeTag.replace("{value}", `${label}`) } : void 0} @calciteChipClose=${!disabled ? () => this.calciteChipCloseHandler(item) : void 0} @focusin=${!disabled ? () => this.activeChipIndex = index : void 0} .scale=${scale} .selected=${item.selected} .tabIndex=${!disabled && activeChipIndex === index ? 0 : -1} title=${label ?? nothing} .value=${item.value}>${label}</calcite-chip>`);
1163
1163
  }
1164
1164
  renderChipCount(count, scale) {
1165
- const label = this.fitUsingCompactCountLabel ? `${count}` : this.messages.disabledSelectedCount?.replace("{count}", `${count}`) ?? `+${count}`;
1165
+ const label = this.fitUsingCompactCountLabel ? `${count}` : this.messages.disabledSelectedCount.replace("{count}", `${count}`) ?? `+${count}`;
1166
1166
  return html`<calcite-chip appearance=solid class=${safeClassMap({
1167
1167
  [CSS.chip]: true
1168
1168
  })} data-testid=selected-chip-count id=selected-chip-count .label=${label} .scale=${scale} tabindex=-1 title=${label ?? nothing} ${ref(this.selectedChipCountRef)}>${label}</calcite-chip>`;
@@ -1346,7 +1346,7 @@ class Combobox extends LitElement {
1346
1346
  [FloatingCSS.animation]: true,
1347
1347
  [FloatingCSS.animationActive]: open
1348
1348
  };
1349
- const label = (this.filterText && messages.add?.replace("{text}", `${this.filterText}`)) ?? "";
1349
+ const label = (this.filterText && messages.add.replace("{text}", `${this.filterText}`)) ?? "";
1350
1350
  return html`<div aria-hidden=true class=${safeClassMap(CSS.floatingUIContainer)} popover=manual ${ref(setFloatingEl)}><div class=${safeClassMap(classes)} ${ref(setContainerEl)}><ul class=${safeClassMap({ [CSS.list]: true, [CSS.listHide]: !open })}>${this.selectAllEnabled && this.selectionMode !== "single" && this.selectionMode !== "single-persist" && html`<calcite-combobox-item class=${safeClassMap(CSS.selectAll)} data-testid=select-all-item .heading=${messages.selectAll} .id=${`${this.guid}-select-all-enabled-interactive`} .indeterminate=${this.indeterminate} .label=${messages.selectAll} .scale=${scale} .selected=${this.allSelected} tabindex=-1 value=select-all ${ref(this.selectAllComboboxItemRef)}></calcite-combobox-item>` || ""}<slot></slot>${this.noMatchesFound && (this.allowCustomValues ? html`<li aria-label=${label ?? nothing} class=${safeClassMap(CSS.noMatches)} @click=${this.customChipAddHandler} role=option tabindex=0>${highlightText({
1351
1351
  text: label,
1352
1352
  pattern: new RegExp(`(${escapeRegExp(this.filterText)})`, "i")
@@ -7,7 +7,6 @@ import { createRef, ref } from "lit/directives/ref.js";
7
7
  import { useDirection } from "@arcgis/lumina/controllers";
8
8
  import { S as SLOTS$1 } from "../../chunks/resources8.js";
9
9
  import { u as useT9n } from "../../chunks/useT9n.js";
10
- import { u as useSetFocus } from "../../chunks/useSetFocus.js";
11
10
  import { u as useInteractive } from "../../chunks/useInteractive.js";
12
11
  const CSS = {
13
12
  backButton: "back-button"
@@ -40,7 +39,6 @@ class FlowItem extends LitElement {
40
39
  this.containerRef = createRef();
41
40
  this.direction = useDirection();
42
41
  this.messages = useT9n();
43
- this.focusSetter = useSetFocus()(this);
44
42
  this.interactiveContainer = useInteractive(this);
45
43
  this.closable = false;
46
44
  this.closed = false;
@@ -50,6 +48,7 @@ class FlowItem extends LitElement {
50
48
  this.disabled = false;
51
49
  this.iconFlipRtl = false;
52
50
  this.loading = false;
51
+ this.focusTrapEnabled = false;
53
52
  this.menuOpen = false;
54
53
  this.overlayPositioning = "absolute";
55
54
  this.scale = "m";
@@ -65,7 +64,7 @@ class FlowItem extends LitElement {
65
64
  this.calciteInternalFlowItemChange = createEvent({ cancelable: false });
66
65
  }
67
66
  static {
68
- this.properties = { beforeBack: [0, {}, { attribute: false }], beforeClose: [0, {}, { attribute: false }], closable: [7, {}, { reflect: true, type: Boolean }], closed: [7, {}, { reflect: true, type: Boolean }], collapseDirection: 1, collapsed: [7, {}, { reflect: true, type: Boolean }], collapsible: [7, {}, { reflect: true, type: Boolean }], description: 1, disabled: [7, {}, { reflect: true, type: Boolean }], heading: 1, headingLevel: [11, {}, { type: Number, reflect: true }], icon: [3, { type: String }, { reflect: true }], iconFlipRtl: [7, {}, { reflect: true, type: Boolean }], loading: [7, {}, { reflect: true, type: Boolean }], menuOpen: [7, {}, { reflect: true, type: Boolean }], messageOverrides: [0, {}, { attribute: false }], overlayPositioning: [3, {}, { reflect: true }], scale: [3, {}, { reflect: true }], selected: [7, {}, { reflect: true, type: Boolean }], showBackButton: [5, {}, { type: Boolean }], topLayerDisabled: [7, {}, { reflect: true, type: Boolean }] };
67
+ this.properties = { beforeBack: [0, {}, { attribute: false }], beforeClose: [0, {}, { attribute: false }], closable: [7, {}, { reflect: true, type: Boolean }], closed: [7, {}, { reflect: true, type: Boolean }], collapseDirection: 1, collapsed: [7, {}, { reflect: true, type: Boolean }], collapsible: [7, {}, { reflect: true, type: Boolean }], description: 1, disabled: [7, {}, { reflect: true, type: Boolean }], heading: 1, headingLevel: [11, {}, { type: Number, reflect: true }], icon: [3, { type: String }, { reflect: true }], iconFlipRtl: [7, {}, { reflect: true, type: Boolean }], loading: [7, {}, { reflect: true, type: Boolean }], focusTrapEnabled: [7, {}, { reflect: true, type: Boolean }], focusTrapOptions: [0, {}, { attribute: false }], menuOpen: [7, {}, { reflect: true, type: Boolean }], messageOverrides: [0, {}, { attribute: false }], overlayPositioning: [3, {}, { reflect: true }], scale: [3, {}, { reflect: true }], selected: [7, {}, { reflect: true, type: Boolean }], showBackButton: [5, {}, { type: Boolean }], topLayerDisabled: [7, {}, { reflect: true, type: Boolean }] };
69
68
  }
70
69
  static {
71
70
  this.styles = styles;
@@ -74,7 +73,10 @@ class FlowItem extends LitElement {
74
73
  await this.containerRef.value?.scrollContentTo(options);
75
74
  }
76
75
  async setFocus(options) {
77
- return this.focusSetter(() => this.backButtonRef.value || this.containerRef.value, options);
76
+ return this.containerRef.value?.setFocus(options);
77
+ }
78
+ async updateFocusTrapElements(extraContainers) {
79
+ this.containerRef.value?.updateFocusTrapElements(extraContainers);
78
80
  }
79
81
  willUpdate(changes) {
80
82
  if (changes.has("selected") && (this.hasUpdated || this.selected !== false)) {
@@ -119,11 +121,11 @@ class FlowItem extends LitElement {
119
121
  const { showBackButton, backButtonClick, messages } = this;
120
122
  const label = messages.back;
121
123
  const icon = rtl ? ICONS.backRight : ICONS.backLeft;
122
- return showBackButton ? keyed("flow-back-button", html`<calcite-action .ariaLabel=${label} class=${safeClassMap(CSS.backButton)} .icon=${icon} @click=${backButtonClick} .scale=${this.scale} slot=${SLOTS.headerActionsStart} .text=${label} title=${label ?? nothing} ${ref(this.backButtonRef)}></calcite-action>`) : null;
124
+ return showBackButton ? keyed("flow-back-button", html`<calcite-action class=${safeClassMap(CSS.backButton)} .icon=${icon} @click=${backButtonClick} .scale=${this.scale} slot=${SLOTS.headerActionsStart} .text=${label} title=${label ?? nothing} ${ref(this.backButtonRef)}></calcite-action>`) : null;
123
125
  }
124
126
  render() {
125
- const { collapsed, collapseDirection, collapsible, closable, closed, description, disabled, heading, headingLevel, loading, menuOpen, messageOverrides, overlayPositioning, beforeClose, icon, iconFlipRtl } = this;
126
- return this.interactiveContainer({ disabled, children: html`<calcite-panel .beforeClose=${beforeClose} .closable=${closable} .closed=${closed} .collapsed=${collapsed} .collapseDirection=${collapseDirection} .collapsible=${collapsible} .description=${description} .disabled=${disabled} .heading=${heading} .headingLevel=${headingLevel} .icon=${icon} .iconFlipRtl=${iconFlipRtl} .loading=${loading} .menuOpen=${menuOpen} .messageOverrides=${messageOverrides} @calcitePanelClose=${this.handleInternalPanelClose} @calcitePanelScroll=${this.handleInternalPanelScroll} @calcitePanelToggle=${this.handleInternalPanelToggle} .overlayPositioning=${overlayPositioning} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled} ${ref(this.containerRef)}>${this.renderBackButton()}<slot name=${SLOTS.actionBar} slot=${SLOTS$1.actionBar}></slot><slot name=${SLOTS.alerts} slot=${SLOTS$1.alerts}></slot><slot name=${SLOTS.headerActionsStart} slot=${SLOTS$1.headerActionsStart}></slot><slot name=${SLOTS.headerActionsEnd} slot=${SLOTS$1.headerActionsEnd}></slot><slot name=${SLOTS.description} slot=${SLOTS$1.description}></slot><slot name=${SLOTS.heading} slot=${SLOTS$1.heading}></slot><slot name=${SLOTS.headerContent} slot=${SLOTS$1.headerContent}></slot><slot name=${SLOTS.headerMenuActions} slot=${SLOTS$1.headerMenuActions}></slot><slot name=${SLOTS.fab} slot=${SLOTS$1.fab}></slot><slot name=${SLOTS.contentTop} slot=${SLOTS$1.contentTop}></slot><slot name=${SLOTS.contentBottom} slot=${SLOTS$1.contentBottom}></slot><slot name=${SLOTS.footerStart} slot=${SLOTS$1.footerStart}></slot><slot name=${SLOTS.footer} slot=${SLOTS$1.footer}></slot><slot name=${SLOTS.footerEnd} slot=${SLOTS$1.footerEnd}></slot><slot></slot></calcite-panel>` });
127
+ const { collapsed, collapseDirection, collapsible, closable, closed, description, disabled, heading, headingLevel, loading, menuOpen, messageOverrides, overlayPositioning, beforeClose, icon, iconFlipRtl, focusTrapEnabled, focusTrapOptions } = this;
128
+ return this.interactiveContainer({ disabled, children: html`<calcite-panel .beforeClose=${beforeClose} .closable=${closable} .closed=${closed} .collapsed=${collapsed} .collapseDirection=${collapseDirection} .collapsible=${collapsible} .description=${description} .disabled=${disabled} .focusTrapEnabled=${focusTrapEnabled} .focusTrapOptions=${focusTrapOptions} .heading=${heading} .headingLevel=${headingLevel} .icon=${icon} .iconFlipRtl=${iconFlipRtl} .loading=${loading} .menuOpen=${menuOpen} .messageOverrides=${messageOverrides} @calcitePanelClose=${this.handleInternalPanelClose} @calcitePanelScroll=${this.handleInternalPanelScroll} @calcitePanelToggle=${this.handleInternalPanelToggle} .overlayPositioning=${overlayPositioning} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled} ${ref(this.containerRef)}>${this.renderBackButton()}<slot name=${SLOTS.actionBar} slot=${SLOTS$1.actionBar}></slot><slot name=${SLOTS.alerts} slot=${SLOTS$1.alerts}></slot><slot name=${SLOTS.headerActionsStart} slot=${SLOTS$1.headerActionsStart}></slot><slot name=${SLOTS.headerActionsEnd} slot=${SLOTS$1.headerActionsEnd}></slot><slot name=${SLOTS.description} slot=${SLOTS$1.description}></slot><slot name=${SLOTS.heading} slot=${SLOTS$1.heading}></slot><slot name=${SLOTS.headerContent} slot=${SLOTS$1.headerContent}></slot><slot name=${SLOTS.headerMenuActions} slot=${SLOTS$1.headerMenuActions}></slot><slot name=${SLOTS.fab} slot=${SLOTS$1.fab}></slot><slot name=${SLOTS.contentTop} slot=${SLOTS$1.contentTop}></slot><slot name=${SLOTS.contentBottom} slot=${SLOTS$1.contentBottom}></slot><slot name=${SLOTS.footerStart} slot=${SLOTS$1.footerStart}></slot><slot name=${SLOTS.footer} slot=${SLOTS$1.footer}></slot><slot name=${SLOTS.footerEnd} slot=${SLOTS$1.footerEnd}></slot><slot></slot></calcite-panel>` });
127
129
  }
128
130
  }
129
131
  customElement("calcite-flow-item", FlowItem);
@@ -40,7 +40,7 @@ class Pagination extends LitElement {
40
40
  super(...arguments);
41
41
  this.resizeHandler = ({ contentRect: { width } }) => this.setMaxItemsToBreakpoint(width);
42
42
  this.resizeObserver = createObserver("resize", (entries) => entries.forEach(this.resizeHandler));
43
- this.messages = useT9n();
43
+ this.messages = useT9n({ blocking: true });
44
44
  this.focusSetter = useSetFocus()(this);
45
45
  this.isXXSmall = false;
46
46
  this.lastStartItem = 1;
@@ -14,6 +14,7 @@ import { u as useT9n } from "../../chunks/useT9n.js";
14
14
  import { u as useSetFocus } from "../../chunks/useSetFocus.js";
15
15
  import { s as styles$1 } from "../../chunks/header.js";
16
16
  import { u as useInteractive } from "../../chunks/useInteractive.js";
17
+ import { u as useFocusTrap } from "../../chunks/useFocusTrap.js";
17
18
  import { C as CSS, S as SLOTS, I as ICONS, a as IDS } from "../../chunks/resources8.js";
18
19
  const styles = css`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;overflow:hidden;border-radius:var(--calcite-panel-corner-radius, var(--calcite-corner-radius-sharp))}slot[name=alerts]::slotted(calcite-alert){block-size:0}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){--calcite-internal-panel-default-space: var(--calcite-spacing-sm);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-sm-plus)}:host([scale=s]) .header-content .heading{font-size:var(--calcite-font-size--1)}:host([scale=s]) .header-content .description{font-size:var(--calcite-font-size--2)}:host([scale=s]) .header-content .icon{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]){--calcite-internal-panel-default-space: var(--calcite-spacing-md);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-md-plus)}:host([scale=m]) .header-content .heading{font-size:var(--calcite-font-size-0)}:host([scale=m]) .header-content .description{font-size:var(--calcite-font-size--1)}:host([scale=m]) .header-content .icon{margin-inline-end:var(--calcite-spacing-md)}:host(:is([scale=s],[scale=m])){--calcite-internal-panel-action-spacing: var(--calcite-spacing-xxs)}:host([scale=l]){--calcite-internal-panel-action-spacing: var(--calcite-spacing-xs);--calcite-internal-panel-default-space: var(--calcite-spacing-lg);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-xl)}:host([scale=l]) .header-content .heading{font-size:var(--calcite-font-size-1)}:host([scale=l]) .header-content .description{font-size:var(--calcite-font-size-0)}:host([scale=l]) .header-content .icon{margin-inline-end:var(--calcite-spacing-lg)}.content-top,.content-bottom{display:flex;align-items:flex-start;align-self:stretch;border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));background-color:var(--calcite-panel-background-color, var(--calcite-color-foreground-1))}.content-top{padding:var(--calcite-panel-content-top-space, var(--calcite-internal-panel-default-space))}.content-bottom{padding:var(--calcite-panel-content-bottom-space, var(--calcite-internal-panel-default-space))}.container{position:relative;margin:0;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;overflow:hidden;background-color:var(--calcite-color-background);padding:0;font-size:var(--calcite-font-size-relative-base);color:var(--calcite-color-text-2);transition:max-block-size var(--calcite-animation-timing),inline-size var(--calcite-animation-timing);box-sizing:border-box;font-size:var(--calcite-font-size--1)}.container *{box-sizing:border-box}.header{z-index:var(--calcite-z-index-header);display:flex;flex-direction:column;background-color:var(--calcite-panel-header-background-color, var(--calcite-color-foreground-1));border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-panel-header-border-block-end, var(--calcite-color-border-3)))}.header-container{display:flex;inline-size:100%;flex-direction:row;align-items:stretch;justify-content:flex-start;flex:0 0 auto}.header-container--border-end{border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3))}.action-bar-container{inline-size:100%}.action-bar-container ::slotted(calcite-action-bar){inline-size:100%}.header-content{display:flex;flex-direction:column;overflow:hidden;padding-inline:.75rem;padding-block:.875rem;margin-inline-end:auto;justify-content:center}.header-content .heading-text-content{flex:1 1 auto;overflow:hidden}.header-content .heading,.header-content .description{display:block;flex:none;overflow-wrap:break-word;padding:0;line-height:var(--calcite-font-line-height-relative-snug)}.header-content .heading{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-panel-heading-text-color, var(--calcite-color-text-1))}.header-content .heading:only-child{margin-block-end:0px}.header-content .description{color:var(--calcite-panel-description-text-color, var(--calcite-color-text-2))}#close,#collapse,calcite-action-menu{--calcite-action-background-color: var(--calcite-panel-header-action-background-color);--calcite-action-background-color-hover: var(--calcite-panel-header-action-background-color-hover);--calcite-action-background-color-press: var(--calcite-panel-header-action-background-color-press);--calcite-action-text-color: var(--calcite-panel-header-action-text-color);--calcite-action-text-color-press: var(--calcite-panel-header-action-text-color-press)}.header-actions{display:flex;flex-direction:row;flex-wrap:nowrap;margin:auto;gap:var(--calcite-internal-panel-action-spacing)}.header-actions--start{margin-inline-start:var(--calcite-internal-panel-action-spacing)}.header-actions--end{margin-inline-end:var(--calcite-internal-panel-action-spacing)}.content-wrapper{position:relative;display:flex;block-size:100%;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;overflow:auto;color:var(--calcite-color-text-2);outline-color:transparent;padding:var(--calcite-panel-space, var(--calcite-panel-content-space, 0));background:var(--calcite-panel-background-color, var(--calcite-color-background))}.content-wrapper:focus-visible{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.header-content{flex:1 1 auto;justify-content:center;padding-block:var(--calcite-internal-panel-header-vertical-padding);padding-inline:var(--calcite-internal-panel-default-space)}.header-content.header--slotted-content{padding:var(--calcite-panel-header-content-space, var(--calcite-internal-panel-header-vertical-padding) var(--calcite-internal-panel-default-space))}.header-content.header--non-slotted-content{align-items:center;flex-direction:row}.footer{margin-block-start:auto;display:flex;flex-direction:row;align-content:space-between;align-items:center;justify-content:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));padding:var(--calcite-panel-footer-space, var(--calcite-panel-footer-padding, var(--calcite-internal-panel-default-space)));background-color:var(--calcite-panel-footer-background-color, var(--calcite-color-foreground-1))}.footer-content{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:center}.footer-start{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-start;margin-inline-end:auto;gap:var(--calcite-internal-panel-default-space)}.footer-end{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-end;margin-inline-start:auto;gap:var(--calcite-internal-panel-default-space)}.fab-container{position:sticky;inset-block-end:0px;z-index:var(--calcite-z-index-sticky);margin-block:0px;margin-inline:auto;display:block;padding:.5rem;inset-inline:0;inline-size:fit-content}calcite-icon{--calcite-icon-color: var(--calcite-panel-icon-color, var(--calcite-ui-icon-color, var(--calcite-color-text-1)))}:host([hidden]){display:none}[hidden]{display:none}`;
19
20
  class Panel extends LitElement {
@@ -24,6 +25,18 @@ class Panel extends LitElement {
24
25
  this.messages = useT9n();
25
26
  this._closed = false;
26
27
  this.focusSetter = useSetFocus()(this);
28
+ this.focusTrapController = useFocusTrap({
29
+ focusTrapOptions: {
30
+ allowOutsideClick: true,
31
+ escapeDeactivates: (event) => {
32
+ if (!event.defaultPrevented && this.closable) {
33
+ this.emitCloseEvent();
34
+ event.preventDefault();
35
+ }
36
+ return false;
37
+ }
38
+ }
39
+ })(this);
27
40
  this.interactiveContainer = useInteractive(this);
28
41
  this.hasActionBar = false;
29
42
  this.hasContentBottom = false;
@@ -46,6 +59,7 @@ class Panel extends LitElement {
46
59
  this.disabled = false;
47
60
  this.iconFlipRtl = false;
48
61
  this.loading = false;
62
+ this.focusTrapEnabled = false;
49
63
  this.menuOpen = false;
50
64
  this.menuPlacement = defaultEndMenuPlacement;
51
65
  this.overlayPositioning = "absolute";
@@ -60,7 +74,7 @@ class Panel extends LitElement {
60
74
  this.listen("calcitePanelClose", this.panelCloseHandler);
61
75
  }
62
76
  static {
63
- this.properties = { hasActionBar: [16, {}, { state: true }], hasContentBottom: [16, {}, { state: true }], hasContentTop: [16, {}, { state: true }], hasEndActions: [16, {}, { state: true }], hasFab: [16, {}, { state: true }], hasFooterContent: [16, {}, { state: true }], hasFooterEndContent: [16, {}, { state: true }], hasFooterStartContent: [16, {}, { state: true }], hasHeaderContent: [16, {}, { state: true }], hasHeaderDescription: [16, {}, { state: true }], hasHeaderHeading: [16, {}, { state: true }], hasMenuItems: [16, {}, { state: true }], hasStartActions: [16, {}, { state: true }], showHeaderContent: [16, {}, { state: true }], beforeClose: [0, {}, { attribute: false }], closable: [7, {}, { reflect: true, type: Boolean }], closed: [7, {}, { reflect: true, type: Boolean }], collapseDirection: 1, collapsed: [7, {}, { reflect: true, type: Boolean }], collapsible: [7, {}, { reflect: true, type: Boolean }], description: 1, disabled: [7, {}, { reflect: true, type: Boolean }], heading: 1, headingLevel: [11, {}, { type: Number, reflect: true }], icon: [3, { type: String }, { reflect: true }], iconFlipRtl: [7, {}, { reflect: true, type: Boolean }], loading: [7, {}, { reflect: true, type: Boolean }], menuFlipPlacements: [0, {}, { attribute: false }], menuOpen: [7, {}, { reflect: true, type: Boolean }], menuPlacement: [3, {}, { reflect: true }], messageOverrides: [0, {}, { attribute: false }], overlayPositioning: [3, {}, { reflect: true }], scale: [3, {}, { reflect: true }], topLayerDisabled: [7, {}, { reflect: true, type: Boolean }] };
77
+ this.properties = { hasActionBar: [16, {}, { state: true }], hasContentBottom: [16, {}, { state: true }], hasContentTop: [16, {}, { state: true }], hasEndActions: [16, {}, { state: true }], hasFab: [16, {}, { state: true }], hasFooterContent: [16, {}, { state: true }], hasFooterEndContent: [16, {}, { state: true }], hasFooterStartContent: [16, {}, { state: true }], hasHeaderContent: [16, {}, { state: true }], hasHeaderDescription: [16, {}, { state: true }], hasHeaderHeading: [16, {}, { state: true }], hasMenuItems: [16, {}, { state: true }], hasStartActions: [16, {}, { state: true }], showHeaderContent: [16, {}, { state: true }], beforeClose: [0, {}, { attribute: false }], closable: [7, {}, { reflect: true, type: Boolean }], closed: [7, {}, { reflect: true, type: Boolean }], collapseDirection: 1, collapsed: [7, {}, { reflect: true, type: Boolean }], collapsible: [7, {}, { reflect: true, type: Boolean }], description: 1, disabled: [7, {}, { reflect: true, type: Boolean }], heading: 1, headingLevel: [11, {}, { type: Number, reflect: true }], icon: [3, { type: String }, { reflect: true }], iconFlipRtl: [7, {}, { reflect: true, type: Boolean }], loading: [7, {}, { reflect: true, type: Boolean }], focusTrapEnabled: [7, {}, { reflect: true, type: Boolean }], focusTrapOptions: [0, {}, { attribute: false }], menuFlipPlacements: [0, {}, { attribute: false }], menuOpen: [7, {}, { reflect: true, type: Boolean }], menuPlacement: [3, {}, { reflect: true }], messageOverrides: [0, {}, { attribute: false }], overlayPositioning: [3, {}, { reflect: true }], scale: [3, {}, { reflect: true }], topLayerDisabled: [7, {}, { reflect: true, type: Boolean }] };
64
78
  }
65
79
  static {
66
80
  this.styles = [styles$1, styles];
@@ -80,6 +94,10 @@ class Panel extends LitElement {
80
94
  async setFocus(options) {
81
95
  return this.focusSetter(() => this.containerRef.value, options);
82
96
  }
97
+ async updateFocusTrapElements(extraContainers) {
98
+ this.focusTrapController.setExtraContainers(extraContainers);
99
+ this.focusTrapController.updateContainerElements();
100
+ }
83
101
  willUpdate(changes) {
84
102
  if (changes.has("collapsed") && this.hasUpdated) {
85
103
  if (this.collapsed) {
@@ -89,10 +107,22 @@ class Panel extends LitElement {
89
107
  }
90
108
  }
91
109
  }
110
+ updated(changes) {
111
+ if (changes.has("focusTrapEnabled") || changes.has("closable") || changes.has("closed")) {
112
+ if (!this.closed && this.closable && this.focusTrapEnabled) {
113
+ this.focusTrapController.activate();
114
+ } else {
115
+ this.focusTrapController.deactivate();
116
+ }
117
+ }
118
+ }
92
119
  disconnectedCallback() {
93
120
  super.disconnectedCallback();
94
121
  this.resizeObserver?.disconnect();
95
122
  }
123
+ focusTrapDisabledOverride() {
124
+ return !this.focusTrapEnabled || !this.closable || this.closed;
125
+ }
96
126
  async setClosedState(value) {
97
127
  if (this.beforeClose && value) {
98
128
  try {
@@ -122,10 +152,11 @@ class Panel extends LitElement {
122
152
  this.calcitePanelClose.emit();
123
153
  }
124
154
  panelKeyDownHandler(event) {
125
- if (this.closable && event.key === "Escape" && !event.defaultPrevented) {
126
- event.preventDefault();
127
- this.emitCloseEvent();
155
+ if (event.key !== "Escape" || event.defaultPrevented || this.closed || !this.closable) {
156
+ return;
128
157
  }
158
+ event.preventDefault();
159
+ this.emitCloseEvent();
129
160
  }
130
161
  panelCloseHandler(event) {
131
162
  if (event.defaultPrevented || event.target !== this.el) {
@@ -255,8 +286,9 @@ class Panel extends LitElement {
255
286
  return html`<div class=${safeClassMap(CSS.fabContainer)} .hidden=${!this.hasFab}><slot name=${SLOTS.fab} @slotchange=${this.handleFabSlotChange}></slot></div>`;
256
287
  }
257
288
  render() {
258
- const { disabled, loading, closed } = this;
259
- const panelNode = html`<article .ariaBusy=${loading} class=${safeClassMap(CSS.container)} .hidden=${closed} ${ref(this.containerRef)}>${this.renderHeaderNode()}${this.renderContent()}${this.renderContentBottom()}${this.renderFooterNode()}${keyed("alerts", html`<slot name=${SLOTS.alerts} @slotchange=${this.handleAlertsSlotChange}></slot>`)}</article>`;
289
+ const { disabled, loading, closed, heading, description, focusTrapEnabled, closable } = this;
290
+ const hasDialogRole = focusTrapEnabled && closable;
291
+ const panelNode = html`<div .ariaBusy=${loading} .ariaDescription=${hasDialogRole && description ? description : void 0} .ariaLabel=${hasDialogRole && heading ? heading : void 0} .ariaLive=${hasDialogRole ? "polite" : void 0} class=${safeClassMap(CSS.container)} .hidden=${closed} .role=${hasDialogRole ? "dialog" : "article"} ${ref(this.containerRef)}>${this.renderHeaderNode()}${this.renderContent()}${this.renderContentBottom()}${this.renderFooterNode()}${keyed("alerts", html`<slot name=${SLOTS.alerts} @slotchange=${this.handleAlertsSlotChange}></slot>`)}</div>`;
260
292
  return this.interactiveContainer({ disabled, children: html`${loading ? html`<calcite-scrim .loading=${loading}></calcite-scrim>` : null}${panelNode}` });
261
293
  }
262
294
  }
@@ -14,7 +14,7 @@ import type { HeadingLevel } from "../functional/Heading.js";
14
14
  * @cssproperty [--calcite-tile-shadow] - Specifies the shadow around the component.
15
15
  * @cssproperty [--calcite-tile-text-color] - Specifies the component's `description` and `icon` text color, but not the `heading` text color.
16
16
  * @cssproperty [--calcite-tile-link-text-color] - Specifies the component's link text color.
17
- * @slot [content-top] - A slot for adding non-actionable elements above the component's content. Content slotted here will render in place of the `icon` property.
17
+ * @slot [content-top] - A slot for adding non-actionable elements above the component's content.
18
18
  * @slot [content-bottom] - A slot for adding non-actionable elements below the component's content.
19
19
  */
20
20
  export abstract class Tile extends LitElement {