@esri/calcite-components 5.1.0-next.24 → 5.1.0-next.26

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 (220) hide show
  1. package/dist/cdn/24UVSZOE.js +2 -0
  2. package/dist/cdn/{HRLMDN6T.js → 265A6AOM.js} +1 -1
  3. package/dist/cdn/{FYQ7F5FG.js → 266QPYGH.js} +1 -1
  4. package/dist/cdn/{H3YVYZPV.js → 2COONMVV.js} +1 -1
  5. package/dist/cdn/{LC6TRGG7.js → 2DPUDJQI.js} +1 -1
  6. package/dist/cdn/{4CZC7KQY.js → 2JM24U42.js} +1 -1
  7. package/dist/cdn/{LXABSKOX.js → 2N2EIOZQ.js} +1 -1
  8. package/dist/cdn/{VZ5HKHDG.js → 2ZJL6VLF.js} +1 -1
  9. package/dist/cdn/{M2MLAGF4.js → 32SZ6MKP.js} +1 -1
  10. package/dist/cdn/{ZM7QKH4L.js → 34RZGOUB.js} +1 -1
  11. package/dist/cdn/{HRNHJL7M.js → 35A2JWYN.js} +1 -1
  12. package/dist/cdn/{RJDE3YGW.js → 3EFK33T5.js} +1 -1
  13. package/dist/cdn/3SWWI6IT.js +2 -0
  14. package/dist/cdn/{AXUCCIRH.js → 3WIYPWAH.js} +1 -1
  15. package/dist/cdn/3Z6IQA5N.js +2 -0
  16. package/dist/cdn/{YXD2TKPQ.js → 4DBLFLPE.js} +1 -1
  17. package/dist/cdn/{I5534LUG.js → 4UTZIEIH.js} +1 -1
  18. package/dist/cdn/{C6S2WP47.js → 53ZCK7UM.js} +1 -1
  19. package/dist/cdn/5G5VTRTL.js +2 -0
  20. package/dist/cdn/{NHCHXBNQ.js → 5KJCBGYY.js} +1 -1
  21. package/dist/cdn/{Z62ZQOFN.js → 5YNF2CQY.js} +1 -1
  22. package/dist/cdn/{G5F3EKOD.js → 65XPD5PJ.js} +1 -1
  23. package/dist/cdn/{BH7HJNVQ.js → 6DMT6SBE.js} +1 -1
  24. package/dist/cdn/{SWXDM2ED.js → 6ISWKJVP.js} +1 -1
  25. package/dist/cdn/{CU2QH5Q4.js → 74MAIRJS.js} +1 -1
  26. package/dist/cdn/{DQSR27R7.js → 7GXPYZ67.js} +1 -1
  27. package/dist/cdn/7TFLXBND.js +2 -0
  28. package/dist/cdn/{GNFWEGWN.js → AE3UBVD4.js} +1 -1
  29. package/dist/cdn/{EKCEBAA2.js → AM3KA6XI.js} +1 -1
  30. package/dist/cdn/{2VVXMMOX.js → BGQMFO4B.js} +1 -1
  31. package/dist/cdn/{PQ2XMBCR.js → BKVED5K4.js} +1 -1
  32. package/dist/cdn/{DV75YW7X.js → BNBJDKHP.js} +1 -1
  33. package/dist/cdn/{C2YUFRVH.js → C4ZX7VYR.js} +1 -1
  34. package/dist/cdn/{V72AGXGP.js → CZGH2P5R.js} +1 -1
  35. package/dist/cdn/{TBJYLOUU.js → D26KXFR4.js} +1 -1
  36. package/dist/cdn/{OQBDHV3I.js → D7Q3AXKP.js} +1 -1
  37. package/dist/cdn/{3HMTHRWV.js → DCQRXTMY.js} +1 -1
  38. package/dist/cdn/{EHIAXJAL.js → DCWL5FUH.js} +1 -1
  39. package/dist/cdn/{M4SJWE6C.js → DHPVZMKK.js} +1 -1
  40. package/dist/cdn/{OONKEETK.js → DNXGXZPK.js} +1 -1
  41. package/dist/cdn/{EMOACECT.js → DPPYTPUN.js} +1 -1
  42. package/dist/cdn/{K7JT7AJ3.js → EPC7QGCY.js} +1 -1
  43. package/dist/cdn/{JG6RAMMT.js → ESIG7SRN.js} +1 -1
  44. package/dist/cdn/{KPANVE7Y.js → EVSREOVQ.js} +1 -1
  45. package/dist/cdn/{2X4WQJ6V.js → EWMBDFVU.js} +1 -1
  46. package/dist/cdn/{E76CXK6W.js → EWTR65YA.js} +1 -1
  47. package/dist/cdn/F2QZDZIO.js +2 -0
  48. package/dist/cdn/{NJLLWKXS.js → F4GCWY3F.js} +1 -1
  49. package/dist/cdn/{BV3MTUEH.js → F7QQUXJL.js} +1 -1
  50. package/dist/cdn/{ZRUMOR65.js → FG5FW5ZE.js} +1 -1
  51. package/dist/cdn/{WZMSRH42.js → FIBHCK3H.js} +1 -1
  52. package/dist/cdn/FMP6OQ7D.js +2 -0
  53. package/dist/cdn/{W4EQNTRQ.js → FULAAFER.js} +1 -1
  54. package/dist/cdn/{335WNYZK.js → G3EBHETV.js} +1 -1
  55. package/dist/cdn/{PH6LS2IK.js → GAR2IMZ3.js} +1 -1
  56. package/dist/cdn/{ROEQAS3A.js → GRDNG5EU.js} +1 -1
  57. package/dist/cdn/GTLHPFUV.js +2 -0
  58. package/dist/cdn/GU4S3ZKG.js +2 -0
  59. package/dist/cdn/{ZH7KRORX.js → GUOSNPAU.js} +1 -1
  60. package/dist/cdn/{UHWKDOKY.js → H5BLSEZ3.js} +1 -1
  61. package/dist/cdn/HCNEPLF5.js +2 -0
  62. package/dist/cdn/HGBMCFOD.js +2 -0
  63. package/dist/cdn/{LKD6P5YN.js → HGGO3AHT.js} +1 -1
  64. package/dist/cdn/{MJ7VTT7G.js → HMOQULJD.js} +1 -1
  65. package/dist/cdn/{EFNUNWOY.js → HUQJ333U.js} +1 -1
  66. package/dist/cdn/{D7OBXZA4.js → I2PT3UPN.js} +1 -1
  67. package/dist/cdn/I3D4XCLD.js +2 -0
  68. package/dist/cdn/{L4AKVA6J.js → IGZX5AHV.js} +1 -1
  69. package/dist/cdn/{Y4PGFRFZ.js → IJ3XVWSG.js} +1 -1
  70. package/dist/cdn/{FVUFPRTZ.js → IPPVAW62.js} +1 -1
  71. package/dist/cdn/IQZVCTFW.js +2 -0
  72. package/dist/cdn/{37J4QHCP.js → IRWU2TR6.js} +1 -1
  73. package/dist/cdn/{IOC4JWCG.js → JAWBEMIK.js} +1 -1
  74. package/dist/cdn/{ZCRYCMYT.js → JHT4F2RJ.js} +1 -1
  75. package/dist/cdn/{WXC33DHR.js → JVKSFUKV.js} +1 -1
  76. package/dist/cdn/{N4JJVMZE.js → JZIOWDZS.js} +1 -1
  77. package/dist/cdn/{4JXQHRCB.js → KDWR7M23.js} +1 -1
  78. package/dist/cdn/{BJUVF75X.js → KOW5NTJQ.js} +1 -1
  79. package/dist/cdn/{MSZ64UC4.js → KPREHL4V.js} +1 -1
  80. package/dist/cdn/{HTG4U6IG.js → KPT5PXJP.js} +1 -1
  81. package/dist/cdn/{ADF5GJVT.js → KR5QASPF.js} +1 -1
  82. package/dist/cdn/{BQB3G5CU.js → L3QXLZZH.js} +1 -1
  83. package/dist/cdn/{QXROGUXE.js → L6WB4227.js} +1 -1
  84. package/dist/cdn/{GEEEQOVM.js → LEBRWA4E.js} +1 -1
  85. package/dist/cdn/LGATM33J.js +2 -0
  86. package/dist/cdn/{HZH4MIUY.js → LHBACKJ5.js} +1 -1
  87. package/dist/cdn/{AUNOHC7O.js → M5WQDFOK.js} +1 -1
  88. package/dist/cdn/{R2N7UDBR.js → MCUIYFPY.js} +1 -1
  89. package/dist/cdn/{WTIDWDIV.js → MEQVQ22B.js} +1 -1
  90. package/dist/cdn/{EQZ2R35U.js → MOQRGDBX.js} +1 -1
  91. package/dist/cdn/{FSADANOP.js → MTU6D47Y.js} +1 -1
  92. package/dist/cdn/{LFRK6P2D.js → MW7AGGL3.js} +1 -1
  93. package/dist/cdn/{6WZT4UHB.js → NAP62AX7.js} +1 -1
  94. package/dist/cdn/NDSQ4CFN.js +2 -0
  95. package/dist/cdn/NK6ELXJB.js +2 -0
  96. package/dist/cdn/{5FJMWVWT.js → NSPEKGY3.js} +1 -1
  97. package/dist/cdn/{6PNUIAH7.js → P54SS6QP.js} +1 -1
  98. package/dist/cdn/{4ASYQP4D.js → PDBGWRDU.js} +1 -1
  99. package/dist/cdn/{MS5MFEFA.js → PGRW53WB.js} +1 -1
  100. package/dist/cdn/{H6EU56Z7.js → PS3Y5JIN.js} +1 -1
  101. package/dist/cdn/{6AYF7R5N.js → PYG7GNQ7.js} +1 -1
  102. package/dist/cdn/{BR3PTYFV.js → QH4IVVZX.js} +1 -1
  103. package/dist/cdn/{DDJ7R667.js → QHG4UVN7.js} +1 -1
  104. package/dist/cdn/{BOSJ366C.js → QMHN63LJ.js} +1 -1
  105. package/dist/cdn/{QSN4H5ZF.js → QN5DWY5J.js} +1 -1
  106. package/dist/cdn/{BMSVTVRT.js → QNLMV3T5.js} +1 -1
  107. package/dist/cdn/{E34NNTQ5.js → QVE3GWZX.js} +1 -1
  108. package/dist/cdn/{3MNKCPKM.js → R2VQNT5E.js} +1 -1
  109. package/dist/cdn/{WNICNNQU.js → RYLTUWGS.js} +1 -1
  110. package/dist/cdn/{AM3UGITY.js → S2N3EAWR.js} +1 -1
  111. package/dist/cdn/{6OOV6EIP.js → S4QXLRJT.js} +1 -1
  112. package/dist/cdn/{IQG4N535.js → S5D4KC2T.js} +1 -1
  113. package/dist/cdn/{TJDQBBDE.js → SAG5PN6V.js} +1 -1
  114. package/dist/cdn/{H5R56TSG.js → SGYKV7MJ.js} +1 -1
  115. package/dist/cdn/SMKTVIG3.js +2 -0
  116. package/dist/cdn/{U4DLHQJE.js → SR2U4UYC.js} +1 -1
  117. package/dist/cdn/{TWOG3N6D.js → T2DDJ3UZ.js} +1 -1
  118. package/dist/cdn/{SLJCJN7J.js → T53FCHAR.js} +1 -1
  119. package/dist/cdn/{6YQEO3TU.js → TQRVWHPS.js} +1 -1
  120. package/dist/cdn/{JLHHQUJF.js → UFRNO43Y.js} +1 -1
  121. package/dist/cdn/{VDGHE2H6.js → UIUDRBYG.js} +1 -1
  122. package/dist/cdn/ULHLMMN4.js +2 -0
  123. package/dist/cdn/UM7ABEPP.js +2 -0
  124. package/dist/cdn/UWDGNSRK.js +2 -0
  125. package/dist/cdn/{C2L2O5EQ.js → V2MNT2SI.js} +1 -1
  126. package/dist/cdn/{O3H5TYI3.js → VL5W6R2P.js} +1 -1
  127. package/dist/cdn/{XCSZRXTK.js → W7Y7PLEA.js} +1 -1
  128. package/dist/cdn/{52BHEJXM.js → WAX64AMV.js} +1 -1
  129. package/dist/cdn/{RTZMUTWS.js → WPHKI6II.js} +1 -1
  130. package/dist/cdn/{VMIQAKYU.js → WTUALX4S.js} +1 -1
  131. package/dist/cdn/{S5B7YG37.js → WZF7PAWT.js} +1 -1
  132. package/dist/cdn/{PM2IMGBS.js → X5FERJLS.js} +1 -1
  133. package/dist/cdn/{DGJMVWH6.js → XFUK6FWO.js} +1 -1
  134. package/dist/cdn/{VQUXTHQG.js → XG3KX423.js} +1 -1
  135. package/dist/cdn/{TSARCS44.js → XJHIIAS4.js} +1 -1
  136. package/dist/cdn/{QFY7DQSD.js → XLYUKQVS.js} +1 -1
  137. package/dist/cdn/XUCO6AFQ.js +2 -0
  138. package/dist/cdn/XWQOS7OO.js +2 -0
  139. package/dist/cdn/{UWCX25CF.js → Y7XT2XH3.js} +1 -1
  140. package/dist/cdn/{WZYUE4T7.js → YJF4NBEX.js} +1 -1
  141. package/dist/cdn/{TU3TE2NA.js → YQ2FBYJF.js} +1 -1
  142. package/dist/cdn/{TFVEPZC4.js → ZAXSD5VD.js} +1 -1
  143. package/dist/cdn/{QSTEMUD6.js → ZTSGKD2X.js} +1 -1
  144. package/dist/cdn/index.js +1 -1
  145. package/dist/chunks/FloatingArrow.js +24 -0
  146. package/dist/chunks/Heading.js +3 -3
  147. package/dist/chunks/dom.js +8 -7
  148. package/dist/chunks/{useReferenceElement.js → manager.js} +108 -108
  149. package/dist/chunks/resources6.js +2 -0
  150. package/dist/chunks/runtime.js +4 -4
  151. package/dist/chunks/useFormTrigger.js +25 -0
  152. package/dist/chunks/{sortableComponent.js → useSortable.js} +67 -44
  153. package/dist/components/calcite-action/customElement.d.ts +4 -4
  154. package/dist/components/calcite-action/customElement.js +7 -13
  155. package/dist/components/calcite-action-bar/customElement.d.ts +3 -3
  156. package/dist/components/calcite-action-bar/customElement.js +3 -2
  157. package/dist/components/calcite-action-group/customElement.d.ts +4 -4
  158. package/dist/components/calcite-action-pad/customElement.d.ts +2 -2
  159. package/dist/components/calcite-action-pad/customElement.js +1 -1
  160. package/dist/components/calcite-autocomplete/customElement.d.ts +1 -2
  161. package/dist/components/calcite-autocomplete/customElement.js +11 -27
  162. package/dist/components/calcite-block-group/customElement.js +3 -3
  163. package/dist/components/calcite-block-group/interfaces.d.ts +2 -6
  164. package/dist/components/calcite-button/customElement.js +6 -16
  165. package/dist/components/calcite-dialog/customElement.d.ts +2 -0
  166. package/dist/components/calcite-dialog/customElement.js +3 -1
  167. package/dist/components/calcite-dropdown/customElement.d.ts +12 -2
  168. package/dist/components/calcite-dropdown/customElement.js +29 -12
  169. package/dist/components/calcite-flow-item/customElement.d.ts +2 -0
  170. package/dist/components/calcite-flow-item/customElement.js +3 -1
  171. package/dist/components/calcite-list/customElement.js +3 -3
  172. package/dist/components/calcite-list/interfaces.d.ts +2 -6
  173. package/dist/components/calcite-list-item/customElement.js +1 -1
  174. package/dist/components/calcite-meter/customElement.js +1 -1
  175. package/dist/components/calcite-panel/customElement.d.ts +2 -0
  176. package/dist/components/calcite-panel/customElement.js +20 -8
  177. package/dist/components/calcite-popover/customElement.js +2 -1
  178. package/dist/components/calcite-radio-button/customElement.js +170 -2
  179. package/dist/components/calcite-sheet/customElement.js +1 -1
  180. package/dist/components/calcite-slider/customElement.js +1 -1
  181. package/dist/components/calcite-sortable-list/customElement.d.ts +1 -1
  182. package/dist/components/calcite-sortable-list/customElement.js +3 -3
  183. package/dist/components/calcite-tab-nav/customElement.js +1 -1
  184. package/dist/components/calcite-tabs/customElement.js +1 -1
  185. package/dist/components/calcite-tooltip/customElement.js +2 -1
  186. package/dist/components/calcite-tree-item/customElement.js +1 -1
  187. package/dist/controllers/useSortable.d.ts +7 -0
  188. package/dist/docs/api.json +1 -1
  189. package/dist/docs/docs.json +1 -1
  190. package/dist/docs/vscode.html-custom-data.json +1 -1
  191. package/dist/docs/web-types.json +1 -1
  192. package/dist/loader.js +4 -4
  193. package/dist/types/lumina.d.ts +1 -1
  194. package/dist/types/preact.d.ts +1 -1
  195. package/dist/types/react.d.ts +1 -1
  196. package/dist/types/stencil.d.ts +1 -1
  197. package/package.json +2 -2
  198. package/dist/cdn/2AWRANF5.js +0 -2
  199. package/dist/cdn/2QIN5FHX.js +0 -2
  200. package/dist/cdn/2XJOX5RG.js +0 -2
  201. package/dist/cdn/4Q2SKZQE.js +0 -2
  202. package/dist/cdn/4Z4GUZI3.js +0 -2
  203. package/dist/cdn/5UMQFD62.js +0 -2
  204. package/dist/cdn/73OOTHVT.js +0 -2
  205. package/dist/cdn/7TMAJS7Y.js +0 -2
  206. package/dist/cdn/A7BG2XIR.js +0 -2
  207. package/dist/cdn/H5VS33TX.js +0 -2
  208. package/dist/cdn/KYAGNB4G.js +0 -2
  209. package/dist/cdn/LKWEQBCD.js +0 -2
  210. package/dist/cdn/MTMLYT66.js +0 -2
  211. package/dist/cdn/NYTQT63Y.js +0 -2
  212. package/dist/cdn/R4W63P53.js +0 -2
  213. package/dist/cdn/RJYIXMGE.js +0 -2
  214. package/dist/cdn/TN3KZSGU.js +0 -2
  215. package/dist/cdn/VLOV4VWX.js +0 -2
  216. package/dist/cdn/WJXZ7BPV.js +0 -2
  217. package/dist/cdn/YOCPNRH2.js +0 -2
  218. package/dist/cdn/ZB3IIOBU.js +0 -2
  219. package/dist/chunks/form.js +0 -267
  220. package/dist/utils/sortableComponent.d.ts +0 -7
@@ -48,6 +48,8 @@ import type { DialogPlacement } from "./interfaces.js";
48
48
  * @slot [header-actions-end] - A slot for adding actions or content to the ending side of the component's header.
49
49
  * @slot [header-content] - A slot for adding custom content to the component's header.
50
50
  * @slot [header-menu-actions] - A slot for adding an overflow menu with actions inside a `calcite-dropdown`.
51
+ * @slot [heading] - A slot for adding content to the heading area of the default header. Takes precedence over the `heading` property.
52
+ * @slot [description] - A slot for adding content to the description area of the default header. Takes precedence over the `description` property.
51
53
  * @slot [fab] - A slot for adding a `calcite-fab` (floating action button) to perform an action.
52
54
  * @slot [footer] - A slot for adding custom content to the component's footer. Should not be used with the `footer-start` or `footer-end` slots.
53
55
  * @slot [footer-end] - A slot for adding a trailing footer custom content. Should not be used with the `footer` slot.
@@ -32,6 +32,8 @@ const SLOTS = {
32
32
  contentBottom: "content-bottom",
33
33
  headerActionsStart: "header-actions-start",
34
34
  headerActionsEnd: "header-actions-end",
35
+ description: "description",
36
+ heading: "heading",
35
37
  headerMenuActions: "header-menu-actions",
36
38
  headerContent: "header-content",
37
39
  fab: "fab",
@@ -492,7 +494,7 @@ class Dialog extends LitElement {
492
494
  })} .popover=${!this.embedded ? "manual" : null} role=dialog ${ref(this.popoverRef)}>${this.modal ? html`<calcite-scrim class=${safeClassMap(CSS.scrim)} @click=${this.handleOutsideClose}></calcite-scrim>` : null}<div class=${safeClassMap({
493
495
  [CSS.dialog]: true,
494
496
  [getDimensionClass("width", this.width, this.widthScale)]: !!(this.width || this.widthScale)
495
- })} @keydown=${this.handleKeyDown} ${ref(this.setTransitionEl)}>${assistiveText ? keyed("assistive-text", html`<div aria-live=polite class=${safeClassMap(CSS.assistiveText)}>${assistiveText}</div>`) : null}<slot name=${SLOTS.customContent}><calcite-panel class=${safeClassMap(CSS.panel)} .closable=${!this.closeDisabled} .description=${description} .heading=${heading} .headingLevel=${this.headingLevel} .hidden=${!this.opened} .icon=${icon} .iconFlipRtl=${iconFlipRtl} .loading=${this.loading} .menuOpen=${this.menuOpen} .messageOverrides=${this.messageOverrides} @keydown=${this.handlePanelKeyDown} @calcitePanelClose=${this.handleInternalPanelCloseClick} @calcitePanelScroll=${this.handleInternalPanelScroll} .overlayPositioning=${this.overlayPositioning} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled} ${ref(this.panelRef)}><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.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></slot></div></div>`;
497
+ })} @keydown=${this.handleKeyDown} ${ref(this.setTransitionEl)}>${assistiveText ? keyed("assistive-text", html`<div aria-live=polite class=${safeClassMap(CSS.assistiveText)}>${assistiveText}</div>`) : null}<slot name=${SLOTS.customContent}><calcite-panel class=${safeClassMap(CSS.panel)} .closable=${!this.closeDisabled} .description=${description} .heading=${heading} .headingLevel=${this.headingLevel} .hidden=${!this.opened} .icon=${icon} .iconFlipRtl=${iconFlipRtl} .loading=${this.loading} .menuOpen=${this.menuOpen} .messageOverrides=${this.messageOverrides} @keydown=${this.handlePanelKeyDown} @calcitePanelClose=${this.handleInternalPanelCloseClick} @calcitePanelScroll=${this.handleInternalPanelScroll} .overlayPositioning=${this.overlayPositioning} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled} ${ref(this.panelRef)}><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></slot></div></div>`;
496
498
  }
497
499
  }
498
500
  customElement("calcite-dialog", Dialog);
@@ -1,6 +1,6 @@
1
1
  /// <reference path="../../index.d.ts" />
2
2
  import type { PublicLitElement as LitElement } from "@arcgis/lumina";
3
- import type { FlipPlacement, LogicalPlacement, OverlayPositioning } from "../../utils/floating-ui.js";
3
+ import type { FlipPlacement, LogicalPlacement, OverlayPositioning, ReferenceElement } from "../../utils/floating-ui.js";
4
4
  import type { Scale, Width } from "../interfaces.js";
5
5
  import type { DropdownItem } from "../calcite-dropdown-item/customElement.js";
6
6
 
@@ -8,7 +8,7 @@ import type { DropdownItem } from "../calcite-dropdown-item/customElement.js";
8
8
  * @cssproperty [--calcite-dropdown-width] - Specifies the width of the component's wrapper.
9
9
  * @cssproperty [--calcite-dropdown-background-color] - Specifies the component's background color.
10
10
  * @slot - A slot for adding `calcite-dropdown-group` elements. Every `calcite-dropdown-item` must have a parent `calcite-dropdown-group`, even if the `groupTitle` property is not set.
11
- * @slot [trigger] - A slot for the element that triggers the component.
11
+ * @slot [trigger] - [deprecated] Use `referenceElement` property instead. A slot for the element that triggers the component.
12
12
  */
13
13
  export abstract class Dropdown extends LitElement {
14
14
  /**
@@ -68,6 +68,16 @@ export abstract class Dropdown extends LitElement {
68
68
  * @default "bottom-start"
69
69
  */
70
70
  accessor placement: LogicalPlacement;
71
+ /**
72
+ * The `referenceElement` is used to position the component according to its `placement` value.
73
+ *
74
+ * Setting the value to an `HTMLElement` is preferred so the component does not need to query the DOM.
75
+ *
76
+ * However, a string `id` of the reference element can also be used.
77
+ *
78
+ * The component should not be placed within its own `referenceElement` to avoid unintended behavior.
79
+ */
80
+ accessor referenceElement: ReferenceElement | string | null;
71
81
  /**
72
82
  * Specifies the size of the component.
73
83
  *
@@ -13,6 +13,7 @@ import { g as getDimensionClass } from "../../chunks/dynamicClasses.js";
13
13
  import { u as useSetFocus } from "../../chunks/useSetFocus.js";
14
14
  import { u as useInteractive } from "../../chunks/useInteractive.js";
15
15
  import { u as useTopLayer } from "../../chunks/useTopLayer.js";
16
+ import { u as useReferenceElement, r as referenceElementManager } from "../../chunks/manager.js";
16
17
  const SLOTS = {
17
18
  trigger: "trigger"
18
19
  };
@@ -22,9 +23,11 @@ const CSS = {
22
23
  triggerContainer: "trigger-container"
23
24
  };
24
25
  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{display:inline-block}.wrapper{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}@starting-style{.wrapper{opacity:0;inset-block-start:0;left:0}}:host([top-layer-disabled]) .wrapper{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown)}.wrapper[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.wrapper:popover-open{display:block}.wrapper .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.wrapper[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.wrapper[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.wrapper[data-placement^=left] .calcite-floating-ui-anim{left:5px}.wrapper[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.wrapper[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.wrapper[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.content{max-height:45vh;width:auto;overflow-y:auto;overflow-x:hidden;inline-size:var(--calcite-dropdown-width, var(--calcite-internal-dropdown-width));background-color:var(--calcite-dropdown-background-color, var(--calcite-color-foreground-1))}.trigger-container{position:relative;display:flex;height:100%;flex:1 1 auto;word-wrap:break-word;word-break:break-word}.width-s{--calcite-internal-dropdown-width: 12rem}.width-m{--calcite-internal-dropdown-width: 14rem}.width-l{--calcite-internal-dropdown-width: 16rem}@media(forced-colors:active){:host([open]) .wrapper{border:var(--calcite-border-width-sm) solid canvasText}}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`;
26
+ const manager = referenceElementManager({ click: true, hover: true });
25
27
  class Dropdown extends LitElement {
26
28
  constructor() {
27
29
  super();
30
+ this.referenceElementController = useReferenceElement({ manager })(this);
28
31
  this.direction = useDirection();
29
32
  this.focusLastDropdownItem = false;
30
33
  this.activeItemIndex = -1;
@@ -33,6 +36,7 @@ class Dropdown extends LitElement {
33
36
  this.mutationObserver = createObserver("mutation", () => this.updateItems());
34
37
  this.transitionProp = "opacity";
35
38
  this.resizeObserver = createObserver("resize", (entries) => this.resizeObserverCallback(entries));
39
+ this.onReferenceElementKeyDown = (event) => this.keyDownHandler(event);
36
40
  this.focusSetter = useSetFocus()(this);
37
41
  this.interactiveContainer = useInteractive(this);
38
42
  this.topLayer = useTopLayer({
@@ -62,7 +66,7 @@ class Dropdown extends LitElement {
62
66
  this.listen("calciteInternalDropdownItemSelect", this.handleItemSelect);
63
67
  }
64
68
  static {
65
- this.properties = { activeDescendantElement: [16, {}, { state: true }], closeOnSelectDisabled: [7, {}, { reflect: true, type: Boolean }], disabled: [7, {}, { reflect: true, type: Boolean }], flipPlacements: [0, {}, { attribute: false }], maxItems: [11, {}, { reflect: true, type: Number }], offsetDistance: [11, {}, { type: Number, reflect: true }], offsetSkidding: [11, {}, { reflect: true, type: Number }], open: [7, {}, { reflect: true, type: Boolean }], overlayPositioning: [3, {}, { reflect: true }], placement: [3, {}, { reflect: true }], scale: [3, {}, { reflect: true }], selectedItems: [0, {}, { attribute: false }], topLayerDisabled: [7, {}, { reflect: true, type: Boolean }], type: [3, {}, { reflect: true }], widthScale: [3, {}, { reflect: true }], width: [3, {}, { reflect: true }] };
69
+ this.properties = { activeDescendantElement: [16, {}, { state: true }], referenceEl: [16, {}, { state: true }], closeOnSelectDisabled: [7, {}, { reflect: true, type: Boolean }], disabled: [7, {}, { reflect: true, type: Boolean }], flipPlacements: [0, {}, { attribute: false }], maxItems: [11, {}, { reflect: true, type: Number }], offsetDistance: [11, {}, { type: Number, reflect: true }], offsetSkidding: [11, {}, { reflect: true, type: Number }], open: [7, {}, { reflect: true, type: Boolean }], overlayPositioning: [3, {}, { reflect: true }], placement: [3, {}, { reflect: true }], referenceElement: 1, scale: [3, {}, { reflect: true }], selectedItems: [0, {}, { attribute: false }], topLayerDisabled: [7, {}, { reflect: true, type: Boolean }], type: [3, {}, { reflect: true }], widthScale: [3, {}, { reflect: true }], width: [3, {}, { reflect: true }] };
66
70
  }
67
71
  static {
68
72
  this.shadowRootOptions = { mode: "open", delegatesFocus: true };
@@ -70,6 +74,9 @@ class Dropdown extends LitElement {
70
74
  static {
71
75
  this.styles = styles;
72
76
  }
77
+ get referenceElementType() {
78
+ return this.referenceElement ? this.type : null;
79
+ }
73
80
  async reposition(delayed = false) {
74
81
  const { filteredFlipPlacements, floatingEl, offsetDistance, offsetSkidding, overlayPositioning, placement, referenceEl } = this;
75
82
  return reposition(this, {
@@ -85,7 +92,7 @@ class Dropdown extends LitElement {
85
92
  }, delayed);
86
93
  }
87
94
  async setFocus(options) {
88
- return this.focusSetter(() => this.referenceEl, options);
95
+ return this.focusSetter(() => this.referenceEl instanceof HTMLElement ? this.referenceEl : this.floatingEl, options);
89
96
  }
90
97
  connectedCallback() {
91
98
  super.connectedCallback();
@@ -113,6 +120,14 @@ class Dropdown extends LitElement {
113
120
  if (changes.has("scale") && (this.hasUpdated || this.scale !== "m")) {
114
121
  this.handlePropsChange();
115
122
  }
123
+ if (changes.has("referenceElement") && !this.referenceElement && this.open) {
124
+ this.topLayer.hide();
125
+ }
126
+ }
127
+ updated(changes) {
128
+ if (changes.has("referenceEl") && this.referenceElementType) {
129
+ connectFloatingUI(this);
130
+ }
116
131
  }
117
132
  loaded() {
118
133
  this.updateSelectedItems();
@@ -145,25 +160,25 @@ class Dropdown extends LitElement {
145
160
  this.updateGroupProps();
146
161
  }
147
162
  closeCalciteDropdownOnClick(event) {
148
- if (this.disabled || !this.open || event.composedPath().includes(this.el)) {
163
+ if (this.referenceElementType || this.disabled || !this.open || event.composedPath().includes(this.el)) {
149
164
  return;
150
165
  }
151
166
  this.closeCalciteDropdown();
152
167
  }
153
168
  closeCalciteDropdownOnOpenEvent(event) {
154
- if (event.composedPath().includes(this.el)) {
169
+ if (this.referenceElementType || event.composedPath().includes(this.el)) {
155
170
  return;
156
171
  }
157
172
  this.closeCalciteDropdown();
158
173
  }
159
174
  pointerEnterHandler() {
160
- if (this.disabled || this.type !== "hover") {
175
+ if (this.referenceElementType || this.disabled || this.type !== "hover") {
161
176
  return;
162
177
  }
163
178
  this.open = true;
164
179
  }
165
180
  pointerLeaveHandler() {
166
- if (this.disabled || this.type !== "hover") {
181
+ if (this.referenceElementType || this.disabled || this.type !== "hover") {
167
182
  return;
168
183
  }
169
184
  this.closeCalciteDropdown();
@@ -215,7 +230,7 @@ class Dropdown extends LitElement {
215
230
  }
216
231
  setDropdownWidth() {
217
232
  const { referenceEl, scrollerEl } = this;
218
- if (!scrollerEl || !referenceEl) {
233
+ if (!scrollerEl || !(referenceEl instanceof HTMLElement)) {
219
234
  return;
220
235
  }
221
236
  scrollerEl.style.minWidth = `${referenceEl.clientWidth}px`;
@@ -251,7 +266,9 @@ class Dropdown extends LitElement {
251
266
  this.topLayer.hide();
252
267
  }
253
268
  setReferenceEl(el) {
254
- updateRefObserver(this.resizeObserver, this.referenceEl, el);
269
+ const previousReferenceEl = this.referenceEl instanceof HTMLElement ? this.referenceEl : null;
270
+ const nextReferenceEl = el instanceof HTMLElement ? el : null;
271
+ updateRefObserver(this.resizeObserver, previousReferenceEl, nextReferenceEl);
255
272
  this.referenceEl = el;
256
273
  connectFloatingUI(this);
257
274
  }
@@ -260,7 +277,7 @@ class Dropdown extends LitElement {
260
277
  connectFloatingUI(this);
261
278
  }
262
279
  keyDownHandler(event) {
263
- if (!event.composedPath().includes(this.referenceEl)) {
280
+ if (!(this.referenceEl instanceof HTMLElement) || !event.composedPath().includes(this.referenceEl)) {
264
281
  return;
265
282
  }
266
283
  const { defaultPrevented, key } = event;
@@ -413,7 +430,7 @@ class Dropdown extends LitElement {
413
430
  return;
414
431
  }
415
432
  const relatedTarget = event.relatedTarget;
416
- if (relatedTarget && (this.el.contains(relatedTarget) || this.referenceEl != null && this.referenceEl.contains(relatedTarget))) {
433
+ if (relatedTarget && (this.el.contains(relatedTarget) || this.referenceEl != null && this.referenceEl instanceof HTMLElement && this.referenceEl.contains(relatedTarget))) {
417
434
  return;
418
435
  }
419
436
  this.closeCalciteDropdown();
@@ -426,10 +443,10 @@ class Dropdown extends LitElement {
426
443
  }
427
444
  render() {
428
445
  const { open } = this;
429
- return this.interactiveContainer({ disabled: this.disabled, children: html`<div class=${safeClassMap(CSS.triggerContainer)} @click=${this.toggleClickDropdown} @focusin=${this.openHoverDropdown} @focusout=${this.closeHoverDropdown} @keydown=${this.keyDownHandler} ${ref(this.setReferenceEl)}><slot .ariaActiveDescendantElement=${this.activeDescendantElement ?? null} .ariaControlsElements=${this.scrollerEl ? [this.scrollerEl] : void 0} .ariaExpanded=${open} aria-haspopup=menu name=${SLOTS.trigger}></slot></div><div class=${safeClassMap({
446
+ return this.interactiveContainer({ disabled: this.disabled, children: html`${!this.referenceElementType ? html`<div class=${safeClassMap(CSS.triggerContainer)} @click=${this.toggleClickDropdown} @focusin=${this.openHoverDropdown} @focusout=${this.closeHoverDropdown} @keydown=${this.keyDownHandler} ${ref(this.setReferenceEl)}><slot .ariaActiveDescendantElement=${this.activeDescendantElement ?? null} .ariaControlsElements=${this.scrollerEl ? [this.scrollerEl] : void 0} .ariaExpanded=${open} aria-haspopup=menu name=${SLOTS.trigger}></slot></div>` : null}<div class=${safeClassMap({
430
447
  [CSS.wrapper]: true,
431
448
  [getDimensionClass("width", this.width, this.widthScale)]: !!(this.width || this.widthScale)
432
- })} .inert=${!open} popover=manual ${ref(this.setFloatingEl)}><div .ariaLabelledByElements=${this.referenceEl ? [this.referenceEl] : void 0} class=${safeClassMap({
449
+ })} .inert=${!open} popover=manual ${ref(this.setFloatingEl)}><div .ariaLabelledByElements=${this.referenceEl instanceof HTMLElement ? [this.referenceEl] : void 0} class=${safeClassMap({
433
450
  [CSS.content]: true,
434
451
  [FloatingCSS.animation]: true,
435
452
  [FloatingCSS.animationActive]: open
@@ -42,6 +42,8 @@ import type { IconName } from "../calcite-icon/interfaces.js";
42
42
  * @slot [header-actions-end] - A slot for adding `calcite-action`s or content to the end side of the component's header.
43
43
  * @slot [header-content] - A slot for adding custom content to the component's header.
44
44
  * @slot [header-menu-actions] - A slot for adding an overflow menu with `calcite-action`s inside a `calcite-dropdown`.
45
+ * @slot [heading] - A slot for adding content to the heading area of the default header. Takes precedence over the `heading` property.
46
+ * @slot [description] - A slot for adding content to the description area of the default header. Takes precedence over the `description` property.
45
47
  * @slot [fab] - A slot for adding a `calcite-fab` (floating action button) to perform an action.
46
48
  * @slot [footer] - A slot for adding custom content to the component's footer. Should not be used with the `footer-start` or `footer-end` slots.
47
49
  * @slot [footer-end] - A slot for adding a trailing footer custom content. Should not be used with the `footer` slot.
@@ -23,6 +23,8 @@ const SLOTS = {
23
23
  contentBottom: "content-bottom",
24
24
  headerActionsStart: "header-actions-start",
25
25
  headerActionsEnd: "header-actions-end",
26
+ description: "description",
27
+ heading: "heading",
26
28
  headerMenuActions: "header-menu-actions",
27
29
  headerContent: "header-content",
28
30
  fab: "fab",
@@ -121,7 +123,7 @@ class FlowItem extends LitElement {
121
123
  }
122
124
  render() {
123
125
  const { collapsed, collapseDirection, collapsible, closable, closed, description, disabled, heading, headingLevel, loading, menuOpen, messages, overlayPositioning, beforeClose, icon, iconFlipRtl } = this;
124
- return this.interactiveContainer({ disabled, children: html`<calcite-panel .beforeClose=${beforeClose} .closable=${closable} .closed=${closed} .collapseDirection=${collapseDirection} .collapsed=${collapsed} .collapsible=${collapsible} .description=${description} .disabled=${disabled} .heading=${heading} .headingLevel=${headingLevel} .icon=${icon} .iconFlipRtl=${iconFlipRtl} .loading=${loading} .menuOpen=${menuOpen} .messageOverrides=${messages} @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.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>` });
126
+ return this.interactiveContainer({ disabled, children: html`<calcite-panel .beforeClose=${beforeClose} .closable=${closable} .closed=${closed} .collapseDirection=${collapseDirection} .collapsed=${collapsed} .collapsible=${collapsible} .description=${description} .disabled=${disabled} .heading=${heading} .headingLevel=${headingLevel} .icon=${icon} .iconFlipRtl=${iconFlipRtl} .loading=${loading} .menuOpen=${menuOpen} .messageOverrides=${messages} @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>` });
125
127
  }
126
128
  }
127
129
  customElement("calcite-flow-item", FlowItem);
@@ -8,7 +8,6 @@ import { LitElement, createEvent, safeClassMap, safeStyleMap } from "@arcgis/lum
8
8
  import { m as slotChangeHasContent, s as slotChangeHasAssignedElement, e as getRootNode } from "../../chunks/dom.js";
9
9
  import { c as createObserver } from "../../chunks/observers.js";
10
10
  import { l as listItemSelector, i as isListItem, a as listSelector, u as updateListItemChildren, b as listItemGroupSelector, e as expandedAncestors } from "../../chunks/utils4.js";
11
- import { d as disconnectSortableComponent, c as connectSortableComponent } from "../../chunks/sortableComponent.js";
12
11
  import { S as SLOTS$1 } from "../../chunks/resources8.js";
13
12
  import { n as numberStringFormatter } from "../../chunks/locale.js";
14
13
  import { g as guid } from "../../chunks/guid.js";
@@ -16,6 +15,7 @@ import { u as useT9n } from "../../chunks/useT9n.js";
16
15
  import { u as useCancelable } from "../../chunks/useCancelable.js";
17
16
  import { u as useSetFocus } from "../../chunks/useSetFocus.js";
18
17
  import { u as useInteractive } from "../../chunks/useInteractive.js";
18
+ import { u as useSortable } from "../../chunks/useSortable.js";
19
19
  const CSS = {
20
20
  container: "container",
21
21
  table: "table",
@@ -47,6 +47,7 @@ class List extends LitElement {
47
47
  this.updateListItemsDebounced();
48
48
  });
49
49
  this.cancelable = useCancelable()(this);
50
+ this.sortable = useSortable()(this);
50
51
  this.updateListItemsDebounced = debounce(this.updateListItems, DEBOUNCE.nextTick);
51
52
  this.visibleItems = [];
52
53
  this.willFilterEmit = false;
@@ -154,7 +155,6 @@ class List extends LitElement {
154
155
  super.disconnectedCallback();
155
156
  this.disconnectObserver();
156
157
  this.unobserveFilterRow();
157
- disconnectSortableComponent(this);
158
158
  }
159
159
  updateListItems() {
160
160
  this.updateGroupItems();
@@ -342,7 +342,7 @@ class List extends LitElement {
342
342
  if (defaultSlotEl) {
343
343
  updateListItemChildren(defaultSlotEl);
344
344
  }
345
- connectSortableComponent(this);
345
+ this.sortable.reset();
346
346
  }
347
347
  onGlobalDragStart() {
348
348
  this.disconnectObserver();
@@ -1,11 +1,7 @@
1
- import type { DragDetail } from "../../utils/sortableComponent.js";
1
+ import type { DragDetail } from "../../controllers/useSortable.js";
2
2
  import type { ListItem } from "../calcite-list-item/customElement.js";
3
3
  import type { List } from "./customElement.js";
4
4
 
5
5
  export type ListDisplayMode = "flat" | "nested";
6
6
 
7
- export interface ListDragDetail extends DragDetail {
8
- toEl: List;
9
- fromEl: List;
10
- dragEl: ListItem;
11
- }
7
+ export type ListDragDetail = DragDetail<List, List, ListItem>;
@@ -5,7 +5,7 @@ import { css, html, nothing } from "lit";
5
5
  import { createRef, ref } from "lit/directives/ref.js";
6
6
  import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
7
7
  import { useDirection } from "@arcgis/lumina/controllers";
8
- import { s as slotChangeHasAssignedElement, v as getFirstTabbable } from "../../chunks/dom.js";
8
+ import { s as slotChangeHasAssignedElement, y as getFirstTabbable } from "../../chunks/dom.js";
9
9
  import { u as useT9n } from "../../chunks/useT9n.js";
10
10
  import { g as getIconScale } from "../../chunks/component.js";
11
11
  import { l as logger } from "../../chunks/logger.js";
@@ -5,7 +5,7 @@ import { css, html } from "lit";
5
5
  import { createRef, ref } from "lit/directives/ref.js";
6
6
  import { LitElement, safeClassMap, safeStyleMap } from "@arcgis/lumina";
7
7
  import { n as numberStringFormatter } from "../../chunks/locale.js";
8
- import { x as intersects } from "../../chunks/dom.js";
8
+ import { z as intersects } from "../../chunks/dom.js";
9
9
  import { c as createObserver } from "../../chunks/observers.js";
10
10
  import { u as useT9n } from "../../chunks/useT9n.js";
11
11
  const CSS = {
@@ -37,6 +37,8 @@ import type { IconName } from "../calcite-icon/interfaces.js";
37
37
  * @slot [header-actions-end] - A slot for adding actions or content to the end side of the header.
38
38
  * @slot [header-content] - A slot for adding custom content to the header.
39
39
  * @slot [header-menu-actions] - A slot for adding an overflow menu with actions inside a `calcite-dropdown`.
40
+ * @slot [heading] - A slot for adding content to the heading area of the default header. Takes precedence over the `heading` property.
41
+ * @slot [description] - A slot for adding content to the description area of the default header. Takes precedence over the `description` property.
40
42
  * @slot [fab] - A slot for adding a `calcite-fab` (floating action button) to perform an action.
41
43
  * @slot [footer] - A slot for adding custom content to the component's footer. Should not be used with the `"footer-start"` or `"footer-end"` slots.
42
44
  * @slot [footer-end] - A slot for adding custom content to a trailing footer. Should not be used with the `"footer"` slot.
@@ -4,7 +4,7 @@ import { keyed } from "lit/directives/keyed.js";
4
4
  import { css, html, nothing } from "lit";
5
5
  import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
6
6
  import { createRef, ref } from "lit/directives/ref.js";
7
- import { s as slotChangeHasAssignedElement, a as slotChangeGetAssignedElements } from "../../chunks/dom.js";
7
+ import { s as slotChangeHasAssignedElement, a as slotChangeGetAssignedElements, A as slotChangeHasTextContent, h as hasVisibleContent } from "../../chunks/dom.js";
8
8
  import { g as getIconScale } from "../../chunks/component.js";
9
9
  import { c as createObserver, u as updateRefObserver } from "../../chunks/observers.js";
10
10
  import { S as SLOTS$1 } from "../../chunks/resources2.js";
@@ -34,6 +34,8 @@ class Panel extends LitElement {
34
34
  this.hasFooterEndContent = false;
35
35
  this.hasFooterStartContent = false;
36
36
  this.hasHeaderContent = false;
37
+ this.hasHeaderDescription = false;
38
+ this.hasHeaderHeading = false;
37
39
  this.hasMenuItems = false;
38
40
  this.hasStartActions = false;
39
41
  this.showHeaderContent = false;
@@ -58,7 +60,7 @@ class Panel extends LitElement {
58
60
  this.listen("calcitePanelClose", this.panelCloseHandler);
59
61
  }
60
62
  static {
61
- 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 }], 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 }] };
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 }] };
62
64
  }
63
65
  static {
64
66
  this.styles = [styles$1, styles];
@@ -155,6 +157,12 @@ class Panel extends LitElement {
155
157
  handleHeaderContentSlotChange(event) {
156
158
  this.hasHeaderContent = slotChangeHasAssignedElement(event);
157
159
  }
160
+ handleHeaderDescriptionSlotChange(event) {
161
+ this.hasHeaderDescription = slotChangeHasTextContent(event) || slotChangeGetAssignedElements(event).some(hasVisibleContent);
162
+ }
163
+ handleHeaderHeadingSlotChange(event) {
164
+ this.hasHeaderHeading = slotChangeHasTextContent(event) || slotChangeGetAssignedElements(event).some(hasVisibleContent);
165
+ }
158
166
  handleFabSlotChange(event) {
159
167
  this.hasFab = slotChangeHasAssignedElement(event);
160
168
  }
@@ -185,11 +193,14 @@ class Panel extends LitElement {
185
193
  });
186
194
  }
187
195
  renderHeaderContent() {
188
- const { heading, headingLevel, description, hasHeaderContent, icon, scale } = this;
196
+ const { heading, headingLevel, description, hasHeaderContent, hasHeaderDescription, hasHeaderHeading, icon, scale } = this;
197
+ const showHeaderHeading = !!heading || hasHeaderHeading;
198
+ const showHeaderDescription = !!description || hasHeaderDescription;
199
+ const showHeaderTextContent = showHeaderHeading || showHeaderDescription;
189
200
  const iconNode = icon ? html`<calcite-icon class=${safeClassMap(CSS.icon)} .flipRtl=${this.iconFlipRtl} .icon=${icon} .scale=${getIconScale(scale)}></calcite-icon>` : null;
190
- const headingNode = heading ? Heading({ class: CSS.heading, level: headingLevel, children: heading }) : null;
191
- const descriptionNode = description ? html`<span class=${safeClassMap(CSS.description)}>${description}</span>` : null;
192
- return !hasHeaderContent && (headingNode || descriptionNode) ? keyed("header-content", html`<div class=${safeClassMap({ [CSS.headerContent]: true, [CSS.headerNonSlottedContent]: true })}>${iconNode}<div class=${safeClassMap(CSS.headingTextContent)}>${headingNode}${descriptionNode}</div></div>`) : null;
201
+ const headingNode = Heading({ class: CSS.heading, hidden: !showHeaderHeading, level: headingLevel, children: html`<slot .hidden=${!hasHeaderHeading} name=${SLOTS.heading} @slotchange=${this.handleHeaderHeadingSlotChange}></slot>${!hasHeaderHeading ? heading : null}` });
202
+ const descriptionNode = html`<span class=${safeClassMap(CSS.description)} .hidden=${!showHeaderDescription}><slot .hidden=${!hasHeaderDescription} name=${SLOTS.description} @slotchange=${this.handleHeaderDescriptionSlotChange}></slot>${!hasHeaderDescription ? description : null}</span>`;
203
+ return keyed("header-content", html`<div class=${safeClassMap({ [CSS.headerContent]: true, [CSS.headerNonSlottedContent]: true })} .hidden=${hasHeaderContent || !showHeaderTextContent}>${iconNode}<div class=${safeClassMap(CSS.headingTextContent)}>${headingNode}${descriptionNode}</div></div>`);
193
204
  }
194
205
  renderActionBar() {
195
206
  return html`<div class=${safeClassMap(CSS.actionBarContainer)} .hidden=${!this.hasActionBar}><slot name=${SLOTS.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`;
@@ -219,9 +230,10 @@ class Panel extends LitElement {
219
230
  return keyed("menu", html`<calcite-action-menu .flipPlacements=${menuFlipPlacements ?? ["top", "bottom"]} .hidden=${!hasMenuItems} .label=${messages.options} .open=${menuOpen} .overlayPositioning=${this.overlayPositioning} .placement=${menuPlacement} .scale=${scale} .topLayerDisabled=${this.topLayerDisabled}><calcite-action class=${safeClassMap(CSS.menuAction)} .icon=${ICONS.menu} .scale=${scale} slot=${SLOTS$1.trigger} .text=${messages.options}></calcite-action><slot name=${SLOTS.headerMenuActions} @slotchange=${this.handleHeaderMenuActionsSlotChange}></slot></calcite-action-menu>`);
220
231
  }
221
232
  renderHeaderNode() {
222
- const { hasHeaderContent, hasStartActions, hasEndActions, closable, collapsible, hasMenuItems, hasActionBar, hasContentTop } = this;
233
+ const { hasHeaderContent, hasHeaderDescription, hasHeaderHeading, hasStartActions, hasEndActions, closable, collapsible, hasMenuItems, hasActionBar, hasContentTop, heading, description } = this;
223
234
  const headerContentNode = this.renderHeaderContent();
224
- const showHeaderContent = hasHeaderContent || !!headerContentNode || hasStartActions || hasEndActions || collapsible || closable || hasMenuItems || hasActionBar || hasContentTop;
235
+ const hasDefaultHeaderContent = !!heading || !!description || hasHeaderHeading || hasHeaderDescription;
236
+ const showHeaderContent = hasHeaderContent || hasDefaultHeaderContent || hasStartActions || hasEndActions || collapsible || closable || hasMenuItems || hasActionBar || hasContentTop;
225
237
  this.showHeaderContent = showHeaderContent;
226
238
  return html`<header class=${safeClassMap(CSS.header)} .hidden=${!(showHeaderContent || hasActionBar || hasContentTop)}><div class=${safeClassMap({ [CSS.headerContainer]: true, [CSS.headerContainerBorderEnd]: hasActionBar })} .hidden=${!showHeaderContent}>${this.renderHeaderStartActions()}${this.renderHeaderSlottedContent()}${headerContentNode}${this.renderHeaderActionsEnd()}</div>${this.renderActionBar()}${this.renderContentTop()}</header>`;
227
239
  }
@@ -9,11 +9,12 @@ import { e as defaultOffsetDistance, r as reposition, c as connectFloatingUI, a
9
9
  import { t as toggleOpenClose } from "../../chunks/openCloseComponent.js";
10
10
  import { H as Heading } from "../../chunks/Heading.js";
11
11
  import { c as createObserver } from "../../chunks/observers.js";
12
- import { u as useReferenceElement, F as FloatingArrow, r as referenceElementManager } from "../../chunks/useReferenceElement.js";
12
+ import { F as FloatingArrow } from "../../chunks/FloatingArrow.js";
13
13
  import { u as useT9n } from "../../chunks/useT9n.js";
14
14
  import { u as useFocusTrap } from "../../chunks/useFocusTrap.js";
15
15
  import { u as useSetFocus } from "../../chunks/useSetFocus.js";
16
16
  import { u as useTopLayer } from "../../chunks/useTopLayer.js";
17
+ import { u as useReferenceElement, r as referenceElementManager } from "../../chunks/manager.js";
17
18
  const CSS = {
18
19
  positionContainer: "position-container",
19
20
  container: "container",
@@ -1,15 +1,183 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
2
  import { c as customElement } from "../../chunks/runtime.js";
3
- import { css, nothing, html } from "lit";
3
+ import { html, isServer, css, nothing } from "lit";
4
4
  import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
5
5
  import { createRef, ref } from "lit/directives/ref.js";
6
6
  import { useDirection } from "@arcgis/lumina/controllers";
7
7
  import { g as getRoundRobinIndex } from "../../chunks/array.js";
8
- import { c as connectForm, d as disconnectForm, H as HiddenFormInputSlot } from "../../chunks/form.js";
8
+ import { q as queryElementRoots, c as closestElementCrossShadowBoundary } from "../../chunks/dom.js";
9
9
  import { c as connectLabel, d as disconnectLabel, g as getLabelText } from "../../chunks/label.js";
10
10
  import { I as InternalLabel } from "../../chunks/InternalLabel.js";
11
11
  import { u as useSetFocus } from "../../chunks/useSetFocus.js";
12
12
  import { u as useInteractive } from "../../chunks/useInteractive.js";
13
+ const hiddenFormInputSlotName = "hidden-form-input";
14
+ function isCheckable(component) {
15
+ return "checked" in component;
16
+ }
17
+ const onFormResetMap = /* @__PURE__ */ new WeakMap();
18
+ const formComponentSet = /* @__PURE__ */ new WeakSet();
19
+ function hasRegisteredFormComponentParent(form, formComponentEl) {
20
+ const hasParentComponentWithFormIdSet = closestElementCrossShadowBoundary(formComponentEl.parentElement, "[form]");
21
+ if (hasParentComponentWithFormIdSet) {
22
+ return true;
23
+ }
24
+ const formComponentRegisterEventName = "calciteInternalFormComponentRegister";
25
+ let hasRegisteredFormComponentParent2 = false;
26
+ form.addEventListener(formComponentRegisterEventName, (event) => {
27
+ hasRegisteredFormComponentParent2 = event.composedPath().some((element) => formComponentSet.has(element));
28
+ event.stopPropagation();
29
+ }, { once: true });
30
+ formComponentEl.dispatchEvent(new CustomEvent(formComponentRegisterEventName, {
31
+ bubbles: true,
32
+ composed: true
33
+ }));
34
+ return hasRegisteredFormComponentParent2;
35
+ }
36
+ function getValidationComponent(el) {
37
+ if (el.nodeName === "CALCITE-RADIO-BUTTON") {
38
+ return closestElementCrossShadowBoundary(el, "calcite-radio-button-group");
39
+ }
40
+ return el;
41
+ }
42
+ function connectForm(component) {
43
+ const { el, value } = component;
44
+ const associatedForm = findAssociatedForm(component);
45
+ if (!associatedForm || hasRegisteredFormComponentParent(associatedForm, el)) {
46
+ return;
47
+ }
48
+ component.formEl = associatedForm;
49
+ component.defaultValue = value;
50
+ if (isCheckable(component)) {
51
+ component.defaultChecked = component.checked;
52
+ }
53
+ const boundOnFormReset = onFormReset.bind(component);
54
+ associatedForm.addEventListener("reset", boundOnFormReset);
55
+ onFormResetMap.set(component.el, boundOnFormReset);
56
+ formComponentSet.add(el);
57
+ }
58
+ function findAssociatedForm(component) {
59
+ const { el, form } = component;
60
+ return form ? queryElementRoots(el, { id: form }) : closestElementCrossShadowBoundary(el, "form");
61
+ }
62
+ function onFormReset() {
63
+ if ("status" in this) {
64
+ this.status = "idle";
65
+ }
66
+ if ("validationIcon" in this) {
67
+ this.validationIcon = false;
68
+ }
69
+ if ("validationMessage" in this) {
70
+ this.validationMessage = "";
71
+ }
72
+ if (isCheckable(this)) {
73
+ this.checked = this.defaultChecked;
74
+ return;
75
+ }
76
+ this.value = this.defaultValue;
77
+ this.onFormReset?.();
78
+ }
79
+ function disconnectForm(component) {
80
+ const { el, formEl } = component;
81
+ if (!formEl) {
82
+ return;
83
+ }
84
+ const boundOnFormReset = onFormResetMap.get(el);
85
+ formEl.removeEventListener("reset", boundOnFormReset);
86
+ onFormResetMap.delete(el);
87
+ component.formEl = null;
88
+ formComponentSet.delete(el);
89
+ }
90
+ const internalHiddenInputInputEvent = "calciteInternalHiddenInputInput";
91
+ const hiddenInputInputHandler = (event) => {
92
+ event.target.dispatchEvent(new CustomEvent(internalHiddenInputInputEvent, { bubbles: true }));
93
+ };
94
+ const removeHiddenInputChangeEventListener = (input) => input.removeEventListener("input", hiddenInputInputHandler);
95
+ function syncHiddenFormInput(component) {
96
+ const { el, formEl, name, value } = component;
97
+ const { ownerDocument } = el;
98
+ if (isServer) {
99
+ return;
100
+ }
101
+ const inputs = el.querySelectorAll(`input[slot="${hiddenFormInputSlotName}"]`);
102
+ if (!formEl || !name) {
103
+ inputs.forEach((input) => {
104
+ removeHiddenInputChangeEventListener(input);
105
+ input.remove();
106
+ });
107
+ return;
108
+ }
109
+ const values = Array.isArray(value) ? value : [value];
110
+ const extra = [];
111
+ const seen = /* @__PURE__ */ new Set();
112
+ inputs.forEach((input) => {
113
+ const valueMatch = values.find((val) => (
114
+ /* intentional non-strict equality check */
115
+ val == input.value
116
+ ));
117
+ if (valueMatch != null) {
118
+ seen.add(valueMatch);
119
+ defaultSyncHiddenFormInput(component, input, valueMatch);
120
+ } else {
121
+ extra.push(input);
122
+ }
123
+ });
124
+ let docFrag;
125
+ values.forEach((value2) => {
126
+ if (seen.has(value2)) {
127
+ return;
128
+ }
129
+ let input = extra.pop();
130
+ if (!input) {
131
+ input = ownerDocument.createElement("input");
132
+ input.ariaHidden = "true";
133
+ input.slot = hiddenFormInputSlotName;
134
+ }
135
+ if (!docFrag) {
136
+ docFrag = ownerDocument.createDocumentFragment();
137
+ }
138
+ docFrag.append(input);
139
+ input.addEventListener("input", hiddenInputInputHandler);
140
+ defaultSyncHiddenFormInput(component, input, value2);
141
+ });
142
+ if (docFrag) {
143
+ el.append(docFrag);
144
+ }
145
+ extra.forEach((input) => {
146
+ removeHiddenInputChangeEventListener(input);
147
+ input.remove();
148
+ });
149
+ }
150
+ function defaultSyncHiddenFormInput(component, input, value) {
151
+ const { defaultValue, disabled, form, name, required } = component;
152
+ input.defaultValue = defaultValue;
153
+ input.disabled = disabled;
154
+ input.name = name;
155
+ input.required = required;
156
+ input.tabIndex = -1;
157
+ if (form) {
158
+ input.setAttribute("form", form);
159
+ } else {
160
+ input.removeAttribute("form");
161
+ }
162
+ if (isCheckable(component)) {
163
+ input.checked = component.checked;
164
+ input.defaultChecked = component.defaultChecked;
165
+ input.value = component.checked ? value || "on" : "";
166
+ } else {
167
+ input.value = value || "";
168
+ }
169
+ component.syncHiddenFormInput?.(input);
170
+ const validationComponent = getValidationComponent(component.el);
171
+ if (validationComponent && "validity" in validationComponent) {
172
+ for (const key in { ...input?.validity }) {
173
+ validationComponent.validity[key] = input.validity[key];
174
+ }
175
+ }
176
+ }
177
+ const HiddenFormInputSlot = ({ component }) => {
178
+ syncHiddenFormInput(component);
179
+ return html`<slot name=${hiddenFormInputSlotName}></slot>`;
180
+ };
13
181
  const CSS = {
14
182
  container: "container",
15
183
  radio: "radio"
@@ -6,7 +6,7 @@ import { css, html } from "lit";
6
6
  import { LitElement, createEvent, setAttribute, safeClassMap } from "@arcgis/lumina";
7
7
  import { createRef, ref } from "lit/directives/ref.js";
8
8
  import { useDirection } from "@arcgis/lumina/controllers";
9
- import { A as ensureId, g as getStylePixelValue } from "../../chunks/dom.js";
9
+ import { B as ensureId, g as getStylePixelValue } from "../../chunks/dom.js";
10
10
  import { c as createObserver } from "../../chunks/observers.js";
11
11
  import { t as toggleOpenClose } from "../../chunks/openCloseComponent.js";
12
12
  import { g as getDimensionClass } from "../../chunks/dynamicClasses.js";