@esri/calcite-components 6.0.0-next.41 → 6.0.0-next.43

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 (155) hide show
  1. package/dist/cdn/{SL6PX7BU.js → 22HTBL5Q.js} +1 -1
  2. package/dist/cdn/{CRCNMQ6U.js → 2AUWYJTU.js} +1 -1
  3. package/dist/cdn/{HYPKFMZ3.js → 2B5QV45Z.js} +1 -1
  4. package/dist/cdn/{J7J7UGUE.js → 2BNUYUXB.js} +1 -1
  5. package/dist/cdn/{EONA7IQ2.js → 2D4JDP7T.js} +1 -1
  6. package/dist/cdn/{MOMCWSCN.js → 2DJNFQBI.js} +1 -1
  7. package/dist/cdn/{SSG7KCBE.js → 2DUGAKVF.js} +1 -1
  8. package/dist/cdn/{RVPCZP2Z.js → 2GA2KOTB.js} +1 -1
  9. package/dist/cdn/{6KD347WK.js → 2GYTEFGH.js} +1 -1
  10. package/dist/cdn/{NYRCHRKX.js → 2JSY3YK5.js} +1 -1
  11. package/dist/cdn/{UUEFYLY2.js → 2KE3HKUU.js} +1 -1
  12. package/dist/cdn/{DRDMWION.js → 322QF47N.js} +1 -1
  13. package/dist/cdn/{IUWTLP2K.js → 3GHBWG5F.js} +1 -1
  14. package/dist/cdn/{YIVDEL6M.js → 3MA5I3EL.js} +1 -1
  15. package/dist/cdn/{UIDGAGC2.js → 3R2ZSNM4.js} +1 -1
  16. package/dist/cdn/{I3GU5EWI.js → 46UFUKHO.js} +1 -1
  17. package/dist/cdn/{VCNXTZIB.js → 4UWTUG6N.js} +1 -1
  18. package/dist/cdn/{JZBMGMJ6.js → 55ZVVSOQ.js} +1 -1
  19. package/dist/cdn/{P2NQUMRE.js → 5EI7THRT.js} +1 -1
  20. package/dist/cdn/{JMNAWSFE.js → 5EZMWCNT.js} +1 -1
  21. package/dist/cdn/{A2E2RMXZ.js → 5HNV2P26.js} +1 -1
  22. package/dist/cdn/{OBFQT2GF.js → 5LW6RKZJ.js} +1 -1
  23. package/dist/cdn/{GZAODZ7D.js → 5OEPGTX6.js} +1 -1
  24. package/dist/cdn/{6YPKPDEO.js → 5WKWFEM3.js} +1 -1
  25. package/dist/cdn/{QSOJGKN5.js → 62RMKVD2.js} +1 -1
  26. package/dist/cdn/{3LB6SWLJ.js → 62VZ4F32.js} +1 -1
  27. package/dist/cdn/{EGPFQBLQ.js → 6TEARYG5.js} +1 -1
  28. package/dist/cdn/{4NEP7MDA.js → 6VZH2P7P.js} +1 -1
  29. package/dist/cdn/{K3GWWDZW.js → 73BDPT4D.js} +1 -1
  30. package/dist/cdn/{2SMJICOP.js → 7NWSMGFV.js} +1 -1
  31. package/dist/cdn/{B3NWUOCA.js → 7VSUKBQ3.js} +1 -1
  32. package/dist/cdn/{QSXVAPM2.js → 7YR5AUFQ.js} +1 -1
  33. package/dist/cdn/{ZS6NXVE5.js → A2BC3NKN.js} +1 -1
  34. package/dist/cdn/{7TLCWO7F.js → A5PN2JQF.js} +1 -1
  35. package/dist/cdn/{6SP6MBYJ.js → AFX6IOYQ.js} +1 -1
  36. package/dist/cdn/{JAAJDAHF.js → ANSK3YW4.js} +1 -1
  37. package/dist/cdn/{PMJTOAVA.js → AVZJMH5W.js} +1 -1
  38. package/dist/cdn/{O66WVUJB.js → BACPXBJE.js} +1 -1
  39. package/dist/cdn/{52BUFPBP.js → BLHWNR5R.js} +1 -1
  40. package/dist/cdn/{LBEYZAKV.js → BMVMOTGE.js} +1 -1
  41. package/dist/cdn/{G6KVCV55.js → BO2W3J5A.js} +1 -1
  42. package/dist/cdn/{C6M4JCTV.js → BST3AL6L.js} +1 -1
  43. package/dist/cdn/{TQFPQLA2.js → BWN43ATY.js} +1 -1
  44. package/dist/cdn/{V2KQR2XN.js → BWXUZDHI.js} +1 -1
  45. package/dist/cdn/{7GQ4J3D5.js → CB6GORA5.js} +1 -1
  46. package/dist/cdn/{4JF4JQ3G.js → CZCMW27K.js} +1 -1
  47. package/dist/cdn/{OGL53PGD.js → DOSP5QBH.js} +1 -1
  48. package/dist/cdn/{EM3FYCIO.js → EG6S6OPG.js} +1 -1
  49. package/dist/cdn/{X3U2KQAT.js → EUQD3CTZ.js} +1 -1
  50. package/dist/cdn/{DA2CFUDW.js → EZS665EL.js} +1 -1
  51. package/dist/cdn/{YXQZ7UHS.js → FC6HWNBQ.js} +1 -1
  52. package/dist/cdn/{GOMLXKOV.js → FDIODFG7.js} +1 -1
  53. package/dist/cdn/{T2WOUUIS.js → FWVZTSO2.js} +1 -1
  54. package/dist/cdn/{3Z464C3P.js → FYRM5JPJ.js} +1 -1
  55. package/dist/cdn/{OLFEED6X.js → G4EMFAVM.js} +1 -1
  56. package/dist/cdn/{EKEFELZY.js → G4NJ7XW5.js} +1 -1
  57. package/dist/cdn/{LKDPHRCA.js → G525AMUR.js} +1 -1
  58. package/dist/cdn/{P4NLNAM7.js → GM4OILF7.js} +1 -1
  59. package/dist/cdn/{WRKKUQQU.js → GWQTX455.js} +1 -1
  60. package/dist/cdn/{2GCIY57V.js → HHGRKV6S.js} +1 -1
  61. package/dist/cdn/HL72AGTH.js +2 -0
  62. package/dist/cdn/{GB3II6II.js → I2FD7PG7.js} +1 -1
  63. package/dist/cdn/{QZECX3D7.js → IAKKGJB5.js} +1 -1
  64. package/dist/cdn/{ECGXFZZG.js → IOIA7JE3.js} +1 -1
  65. package/dist/cdn/{KZX3OXDQ.js → IPQMNI3W.js} +1 -1
  66. package/dist/cdn/{KQRVATI2.js → J7MD2WQQ.js} +1 -1
  67. package/dist/cdn/{3HB4YUMK.js → JAMQKMQJ.js} +1 -1
  68. package/dist/cdn/{Q4HXK7F6.js → JG2CDP4G.js} +1 -1
  69. package/dist/cdn/{XISVSABU.js → JPCV54Y7.js} +1 -1
  70. package/dist/cdn/{GHJJBYGW.js → JQWUCIE2.js} +1 -1
  71. package/dist/cdn/{OOL2PGGX.js → JXZGMCKM.js} +1 -1
  72. package/dist/cdn/{TAS2OYGT.js → K3EJVL7J.js} +1 -1
  73. package/dist/cdn/{MHPHYJXB.js → K4V46ETG.js} +1 -1
  74. package/dist/cdn/{CMAORR3S.js → KAOZCXGN.js} +1 -1
  75. package/dist/cdn/{CAP6VV44.js → KKGRCTUJ.js} +1 -1
  76. package/dist/cdn/{TVCVWX6M.js → KKKWM22U.js} +1 -1
  77. package/dist/cdn/{WWTG7ZPG.js → KYNZ6MSZ.js} +1 -1
  78. package/dist/cdn/{YQ7YVAUO.js → L7BXXSWJ.js} +1 -1
  79. package/dist/cdn/{KSKKX3DQ.js → LPSN35WY.js} +1 -1
  80. package/dist/cdn/{SPMNI4RN.js → LQASX2YS.js} +1 -1
  81. package/dist/cdn/{TCKPQTAT.js → LQFP2ESG.js} +1 -1
  82. package/dist/cdn/{4XQQHPVY.js → LRATA7Q6.js} +1 -1
  83. package/dist/cdn/{B26BEKKF.js → LVUNEQCM.js} +1 -1
  84. package/dist/cdn/{NKSITX36.js → LZQDLCQT.js} +1 -1
  85. package/dist/cdn/{BPZZDPGH.js → M7WEPGCG.js} +1 -1
  86. package/dist/cdn/{GC7HHWM2.js → MOG6D3AV.js} +1 -1
  87. package/dist/cdn/{FKWUANWM.js → MW5J2H2J.js} +1 -1
  88. package/dist/cdn/{OEBG7JC5.js → N5S3P5LL.js} +1 -1
  89. package/dist/cdn/{NZF6JBBG.js → NAK5F2XB.js} +1 -1
  90. package/dist/cdn/{LGWYCDSW.js → NIX7EJ7C.js} +1 -1
  91. package/dist/cdn/{GUVISGOX.js → NRM2PN6F.js} +1 -1
  92. package/dist/cdn/{A3WI4PSX.js → OBAZ7P66.js} +1 -1
  93. package/dist/cdn/{PS7GD743.js → ODRDTFBJ.js} +1 -1
  94. package/dist/cdn/{KTPGBIFO.js → OWQJVBWC.js} +1 -1
  95. package/dist/cdn/{367B2I32.js → PEQGAUG6.js} +1 -1
  96. package/dist/cdn/{IZXK3GYR.js → PGO5O36C.js} +1 -1
  97. package/dist/cdn/{UJEP6JO7.js → PNMA4F7B.js} +1 -1
  98. package/dist/cdn/{MHL3UPMJ.js → PWCQ53WM.js} +1 -1
  99. package/dist/cdn/{MA6IXTYF.js → Q37GK2TC.js} +1 -1
  100. package/dist/cdn/{RFFJLQZY.js → QVTEPN4P.js} +1 -1
  101. package/dist/cdn/{7B3I4PXA.js → QYQF7VQX.js} +1 -1
  102. package/dist/cdn/{RKSSARIJ.js → R7NGBQDE.js} +1 -1
  103. package/dist/cdn/{AMHAEN2D.js → RFHWMM7F.js} +1 -1
  104. package/dist/cdn/{JBM25QJA.js → RVDV374O.js} +1 -1
  105. package/dist/cdn/{ZSBKEWEI.js → RXZ5ESF2.js} +1 -1
  106. package/dist/cdn/{YBAOD7UZ.js → SRHOJK7L.js} +1 -1
  107. package/dist/cdn/{RCXRIJLO.js → U4V4PQ3U.js} +1 -1
  108. package/dist/cdn/U76IOSLV.js +2 -0
  109. package/dist/cdn/{CUZJMKIC.js → UPXF4W63.js} +1 -1
  110. package/dist/cdn/{3XLCYFS4.js → UXFFVSSZ.js} +1 -1
  111. package/dist/cdn/{5F3FNYI6.js → VGJ3KIAD.js} +1 -1
  112. package/dist/cdn/{EU27AWSQ.js → VNEVHFVM.js} +1 -1
  113. package/dist/cdn/{L6ZUP2OC.js → VO4IVNUA.js} +1 -1
  114. package/dist/cdn/{EXXPHOSM.js → VREQJ5TS.js} +1 -1
  115. package/dist/cdn/{42FUGDCZ.js → VSMYOJUO.js} +1 -1
  116. package/dist/cdn/{DXBUUX4R.js → VXPUUMVE.js} +1 -1
  117. package/dist/cdn/{KYTSS3US.js → W6EJSX2J.js} +1 -1
  118. package/dist/cdn/{IBYELTDA.js → W6TASL3O.js} +1 -1
  119. package/dist/cdn/{PN3VHKDB.js → WDJOGUZJ.js} +1 -1
  120. package/dist/cdn/{UUSIBLEF.js → WEZJZN6M.js} +1 -1
  121. package/dist/cdn/{35EV72EN.js → WLTMYW2M.js} +1 -1
  122. package/dist/cdn/{KZBLHQQN.js → X67IG56W.js} +1 -1
  123. package/dist/cdn/{MPKVEQNU.js → XCVEEEKD.js} +1 -1
  124. package/dist/cdn/{KNHRMOQB.js → XJJYF3O2.js} +1 -1
  125. package/dist/cdn/{IKQBABTT.js → Y4CNM57Y.js} +1 -1
  126. package/dist/cdn/{CN5XJCFI.js → YKOJ2EST.js} +1 -1
  127. package/dist/cdn/{NLPDVREC.js → YNTEGYLJ.js} +1 -1
  128. package/dist/cdn/{L2BMSVLY.js → YPKKJMPL.js} +1 -1
  129. package/dist/cdn/{TYSXXADY.js → YXAFALSQ.js} +1 -1
  130. package/dist/cdn/{O4BLHHTK.js → YXYYBAXM.js} +1 -1
  131. package/dist/cdn/{4JZY2S4T.js → Z6EZL7G6.js} +1 -1
  132. package/dist/cdn/{JXSOJ2CG.js → ZCD25ZFU.js} +1 -1
  133. package/dist/cdn/{YEVJGQUY.js → ZHFEFXBE.js} +1 -1
  134. package/dist/cdn/{V5QAUYXS.js → ZHV3PD4A.js} +1 -1
  135. package/dist/cdn/{L4UI7VRQ.js → ZSXJX7JG.js} +1 -1
  136. package/dist/cdn/{S44H7S42.js → ZUTPJ6CY.js} +1 -1
  137. package/dist/cdn/{EWU2U6MC.js → ZYJFXSDN.js} +1 -1
  138. package/dist/cdn/index.js +1 -1
  139. package/dist/chunks/runtime.js +3 -3
  140. package/dist/components/calcite-autocomplete/customElement.js +25 -2
  141. package/dist/components/calcite-date-picker/customElement.d.ts +2 -2
  142. package/dist/components/calcite-dropdown/customElement.d.ts +1 -1
  143. package/dist/components/calcite-input/customElement.js +2 -0
  144. package/dist/components/calcite-input-date-picker/customElement.d.ts +2 -2
  145. package/dist/components/calcite-segmented-control/customElement.d.ts +4 -4
  146. package/dist/components/calcite-segmented-control/customElement.js +1 -2
  147. package/dist/components/calcite-select/customElement.d.ts +4 -4
  148. package/dist/components/calcite-select/customElement.js +1 -2
  149. package/dist/docs/api.json +1 -1
  150. package/dist/docs/docs.json +1 -1
  151. package/dist/docs/vscode.html-custom-data.json +1 -1
  152. package/dist/docs/web-types.json +1 -1
  153. package/package.json +1 -1
  154. package/dist/cdn/6GGPZWII.js +0 -2
  155. package/dist/cdn/OFHGVQJU.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as W}from"./OOL2PGGX.js";import{a as t,b as x,c as S,d as r}from"./ICVHIOLT.js";import{a as G}from"./UIDGAGC2.js";import{b as V}from"./ECGXFZZG.js";import{a as j}from"./YIVDEL6M.js";import"./ZSBKEWEI.js";import{b as K}from"./WTNYMVTD.js";import{a as _}from"./SPMNI4RN.js";import"./5K4OZJAZ.js";import{a as O,b as R}from"./FDHY2TZA.js";import{c as E}from"./7XS2SBMV.js";import{c as U}from"./TJGNWJF6.js";import{a as g}from"./VCNXTZIB.js";import{a as I}from"./UUEFYLY2.js";import"./2IM7ZZ7U.js";import{a as M}from"./IUWTLP2K.js";import{a as L}from"./VMHJHFFS.js";import"./KNHRMOQB.js";import"./BPZZDPGH.js";import{A as $,x as k,y as B,z as d}from"./RRBGCYLX.js";import{E as D,F as A,G as P,H as o,T as N,g as F,h as n,l as y,p as C}from"./WWTG7ZPG.js";var q=F`:host([disabled]){opacity:var(--calcite-opacity-disabled);cursor:default;-webkit-user-select:none;user-select:none}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:flex;inline-size:100%;block-size:100%;flex:1 1 auto;overflow:hidden;box-sizing:border-box;border-radius:var(--calcite-panel-corner-radius, var(--calcite-theme-corner-radius-none, 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:var(--calcite-opacity-full)}.interaction-container{display:contents}:host([scale=s]){--calcite-internal-panel-default-space: var(--calcite-theme-space-sm, var(--calcite-spacing-sm));--calcite-internal-panel-header-vertical-padding: var(--calcite-theme-space-sm-plus, 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-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=m]){--calcite-internal-panel-default-space: var(--calcite-theme-space-md, var(--calcite-spacing-md));--calcite-internal-panel-header-vertical-padding: var(--calcite-theme-space-md-plus, 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-theme-space-md, var(--calcite-spacing-md))}:host(:is([scale=s],[scale=m])){--calcite-internal-panel-action-spacing: var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs))}:host([scale=l]){--calcite-internal-panel-action-spacing: var(--calcite-theme-space-xs, var(--calcite-spacing-xs));--calcite-internal-panel-default-space: var(--calcite-theme-space-lg, var(--calcite-spacing-lg));--calcite-internal-panel-header-vertical-padding: var(--calcite-theme-space-xl, 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-theme-space-lg, 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-theme-color-surface-2, 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;background-color:var(--calcite-theme-color-surface-1, var(--calcite-color-background));margin:var(--calcite-space-none);display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;padding:var(--calcite-space-none);overflow:hidden;box-sizing:border-box;color:var(--calcite-color-text-2);transition:max-block-size var(--calcite-animation-timing),inline-size var(--calcite-animation-timing);font-size:var(--calcite-font-size-relative-base)}.container *{box-sizing:border-box}.header{display:flex;flex-direction:column;z-index:var(--calcite-z-index-header);background-color:var(--calcite-panel-header-background-color, var(--calcite-theme-color-surface-2, 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--no-row{border-block-end:0}.content-top--no-border{border-block-start:0}.header-container{display:flex;flex-direction:row;inline-size:100%;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))}.header-top{inline-size:100%;border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));padding:var(--calcite-panel-header-top-space, var(--calcite-internal-panel-default-space))}.action-bar-container{inline-size:100%}.action-bar-container ::slotted(calcite-action-bar),.content-top ::slotted(calcite-action-bar){inline-size:100%}.header-content{display:flex;flex-direction:column;overflow:hidden;padding-inline:var(--calcite-space-md);padding-block:var(--calcite-space-md-plus);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:var(--calcite-space-none);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:var(--calcite-space-none)}.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{display:flex;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;overflow:auto;block-size:100%;outline-color:var(--calcite-color-transparent);color:var(--calcite-color-text-2);position:relative;padding:var(--calcite-panel-space, var(--calcite-panel-content-space, 0));background:var(--calcite-panel-background-color, var(--calcite-theme-color-surface-1, 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(-1 * var(--calcite-space-base) * (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{font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);display:flex;margin-block-start:auto;flex-direction:row;align-content:space-between;justify-content:center;align-items:center;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-theme-color-surface-2, var(--calcite-color-foreground-1)))}.footer-content{display:flex;flex-direction:row;align-items:center;justify-content:center;flex:1 1 0%}.footer-start{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex:1 1 0%;margin-inline-end:auto;gap:var(--calcite-internal-panel-default-space)}.footer-end{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;flex:1 1 0%;margin-inline-start:auto;gap:var(--calcite-internal-panel-default-space)}.fab-container{position:sticky;inset-block-end:var(--calcite-space-none);margin-block:var(--calcite-space-none);margin-inline:auto;display:block;padding:var(--calcite-space-sm);z-index:var(--calcite-z-index-sticky);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}`,w=class extends P{constructor(){super(),this.containerRef=D(),this.resizeObserver=O("resize",()=>this.resizeHandler()),this.messages=I(),this._closed=!1,this.focusSetter=M()(this).setFocus,this.focusTrapController=W({focusTrapOptions:{allowOutsideClick:!0,escapeDeactivates:e=>(!e.defaultPrevented&&this.closable&&(this.emitCloseEvent(),e.preventDefault()),!1)}})(this),this.interactiveContainer=_(this),this.hasActionBar=!1,this.hasContentBottom=!1,this.hasContentTop=!1,this.hasContentTopActionBar=!1,this.hasEndActions=!1,this.hasFab=!1,this.hasFooterContent=!1,this.hasFooterEndContent=!1,this.hasFooterStartContent=!1,this.hasHeaderContent=!1,this.hasHeaderDescription=!1,this.hasHeaderHeading=!1,this.hasHeaderTop=!1,this.hasMenuItems=!1,this.hasStartActions=!1,this.showHeaderContent=!1,this.closable=!1,this.collapseDirection="down",this.collapsed=!1,this.collapsible=!1,this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.focusTrapEnabledByParent=!1,this.focusTrapDisabled=!1,this.menuOpen=!1,this.menuPlacement=V,this.overlayPositioning="absolute",this.scale="m",this.topLayerDisabled=!1,this.calcitePanelClose=C({cancelable:!0}),this.calcitePanelCollapse=C({cancelable:!1}),this.calcitePanelExpand=C({cancelable:!1}),this.calcitePanelScroll=C({cancelable:!1}),this.calcitePanelToggle=C({cancelable:!1}),this.listen("keydown",this.panelKeyDownHandler),this.listen("calcitePanelClose",this.panelCloseHandler)}static{this.properties={hasActionBar:[16,{},{state:!0}],hasContentBottom:[16,{},{state:!0}],hasContentTop:[16,{},{state:!0}],hasContentTopActionBar:[16,{},{state:!0}],hasEndActions:[16,{},{state:!0}],hasFab:[16,{},{state:!0}],hasFooterContent:[16,{},{state:!0}],hasFooterEndContent:[16,{},{state:!0}],hasFooterStartContent:[16,{},{state:!0}],hasHeaderContent:[16,{},{state:!0}],hasHeaderDescription:[16,{},{state:!0}],hasHeaderHeading:[16,{},{state:!0}],hasHeaderTop:[16,{},{state:!0}],hasMenuItems:[16,{},{state:!0}],hasStartActions:[16,{},{state:!0}],showHeaderContent:[16,{},{state:!0}],beforeClose:[0,{},{attribute:!1}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],collapseDirection:1,collapsed:[7,{},{reflect:!0,type:Boolean}],collapsible:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],icon:[3,{},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],loading:[7,{},{reflect:!0,type:Boolean}],focusTrapEnabledByParent:[5,{},{type:Boolean}],focusTrapDisabled:[5,{},{type:Boolean}],focusTrapOptions:[0,{},{attribute:!1}],menuFlipPlacements:[0,{},{attribute:!1}],menuOpen:[7,{},{reflect:!0,type:Boolean}],menuPlacement:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=[G,q]}get hasHeaderRow(){return this.hasHeaderContent||!!this.heading||!!this.description||this.hasHeaderHeading||this.hasHeaderDescription||this.hasStartActions||this.hasEndActions||this.collapsible||this.closable||this.hasMenuItems}get closed(){return this._closed}set closed(e){let a=this._closed;e!==a&&this.setClosedState(e)}async scrollContentTo(e){this.panelScrollEl?.scrollTo(e)}async setFocus(e){return this.focusSetter(()=>this.containerRef.value,e)}async updateFocusTrapElements(e){this.focusTrapController.setExtraContainers(e),this.focusTrapController.updateContainerElements()}willUpdate(e){e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calcitePanelCollapse.emit():this.calcitePanelExpand.emit())}updated(e){(e.has("closable")||e.has("closed")||e.has("focusTrapDisabled")||e.has("focusTrapEnabledByParent"))&&(this.hasDialogBehavior?this.focusTrapController.activate():this.focusTrapController.deactivate())}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}focusTrapDisabledOverride(){return this.focusTrapDisabled||!this.hasDialogBehavior}get hasDialogBehavior(){return!this.focusTrapDisabled&&!this.closed&&(this.closable||this.focusTrapEnabledByParent)}async setClosedState(e){if(this.beforeClose&&e)try{await this.beforeClose?.()}catch{return}this._closed=e}resizeHandler(){let{panelScrollEl:e}=this;if(!e||typeof e.scrollHeight!="number"||typeof e.offsetHeight!="number")return;e.scrollHeight>e.offsetHeight?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}closeClickHandler(){this.emitCloseEvent()}emitCloseEvent(){this.calcitePanelClose.emit()}panelKeyDownHandler(e){e.key!=="Escape"||e.defaultPrevented||this.closed||!this.closable||(e.preventDefault(),this.emitCloseEvent())}panelCloseHandler(e){e.defaultPrevented||e.target!==this.el||(this.closed=!0)}collapse(){this.collapsed=!this.collapsed,this.calcitePanelToggle.emit()}panelScrollHandler(){this.calcitePanelScroll.emit()}handleHeaderActionsStartSlotChange(e){this.hasStartActions=d(e)}handleHeaderActionsEndSlotChange(e){this.hasEndActions=d(e)}handleHeaderMenuActionsSlotChange(e){this.hasMenuItems=d(e)}handleActionBarSlotChange(e){let a=$(e).filter(E);a.forEach(i=>i.layout="horizontal"),this.hasActionBar=!!a.length}handleHeaderContentSlotChange(e){this.hasHeaderContent=d(e)}handleHeaderTopSlotChange(e){this.hasHeaderTop=d(e)}handleHeaderDescriptionSlotChange(e){this.hasHeaderDescription=B(e)||$(e).some(k)}handleHeaderHeadingSlotChange(e){this.hasHeaderHeading=B(e)||$(e).some(k)}handleFabSlotChange(e){this.hasFab=d(e)}handleFooterEndSlotChange(e){this.hasFooterEndContent=d(e)}handleFooterStartSlotChange(e){this.hasFooterStartContent=d(e)}handleFooterSlotChange(e){this.hasFooterContent=d(e)}contentBottomSlotChangeHandler(e){this.hasContentBottom=d(e)}contentTopSlotChangeHandler(e){this.hasContentTop=d(e),this.hasContentTopActionBar=$(e).some(E)}setPanelScrollEl(e){R(this.resizeObserver,this.panelScrollEl,e),this.panelScrollEl=e}handleAlertsSlotChange(e){$(e)?.map(a=>{a.nodeName==="CALCITE-ALERT"&&(a.embedded=!0)})}renderHeaderContent(){let{heading:e,headingLevel:a,description:i,hasHeaderContent:s,hasHeaderDescription:c,hasHeaderHeading:l,icon:u,scale:p}=this,v=!!e||l,h=!!i||c,f=v||h,m=u?n`<calcite-icon class=${o(t.icon)} .flipRtl=${this.iconFlipRtl} .icon=${u} .scale=${L(p)}></calcite-icon>`:null,b=j({class:t.heading,hidden:!v,id:x.heading,level:a,children:n`<slot .hidden=${!l} name=${r.heading} @slotchange=${this.handleHeaderHeadingSlotChange}></slot>${l?null:e}`}),H=n`<span class=${o(t.description)} .hidden=${!h}><slot .hidden=${!c} name=${r.description} @slotchange=${this.handleHeaderDescriptionSlotChange}></slot>${c?null:i}</span>`;return g("header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerNonSlottedContent]:!0})} .hidden=${s||!f}>${m}<div class=${o(t.headingTextContent)}>${b}${H}</div></div>`)}renderActionBar(){return n`<div class=${o(t.actionBarContainer)} .hidden=${!this.hasActionBar}><slot name=${r.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`}renderHeaderSlottedContent(){return g("slotted-header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerSlottedContent]:!0})} .hidden=${!this.hasHeaderContent}><slot name=${r.headerContent} @slotchange=${this.handleHeaderContentSlotChange}></slot></div>`)}renderHeaderTop(){return n`<div class=${o(t.headerTop)} .hidden=${!this.hasHeaderTop}><slot name=${r.headerTop} @slotchange=${this.handleHeaderTopSlotChange}></slot></div>`}renderHeaderStartActions(){let{hasStartActions:e}=this;return g("header-actions-start",n`<div class=${o({[t.headerActionsStart]:!0,[t.headerActions]:!0})} .hidden=${!e}><slot name=${r.headerActionsStart} @slotchange=${this.handleHeaderActionsStartSlotChange}></slot></div>`)}renderHeaderActionsEnd(){let{hasEndActions:e,messages:a,closable:i,collapsed:s,collapseDirection:c,collapsible:l,hasMenuItems:u}=this,{collapse:p,expand:v,close:h}=a,f=[S.expand,S.collapse];c==="up"&&f.reverse();let m=l?n`<calcite-action .aria=${{expanded:!s}} .icon=${s?f[0]:f[1]} id=${x.collapse} .label=${p} @click=${this.collapse} .scale=${this.scale} .text=${p} title=${(s?v:p)??y}></calcite-action>`:null,b=i?n`<calcite-action .ariaLabel=${h} .icon=${S.close} id=${x.close} @click=${this.closeClickHandler} .scale=${this.scale} .text=${h} title=${h??y}></calcite-action>`:null,H=n`<slot name=${r.headerActionsEnd} @slotchange=${this.handleHeaderActionsEndSlotChange}></slot>`,z=e||m||b||u;return g("header-actions-end",n`<div class=${o({[t.headerActionsEnd]:!0,[t.headerActions]:!0})} .hidden=${!z}>${H}${this.renderMenu()}${m}${b}</div>`)}renderMenu(){let{hasMenuItems:e,messages:a,menuOpen:i,menuFlipPlacements:s,menuPlacement:c,scale:l}=this;return g("menu",n`<calcite-action-menu .flipPlacements=${s??["top","bottom"]} .hidden=${!e} .label=${a.options} .open=${i} .overlayPositioning=${this.overlayPositioning} .placement=${c} .scale=${l} .topLayerDisabled=${this.topLayerDisabled}><calcite-action class=${o(t.menuAction)} .icon=${S.menu} .scale=${l} slot=${U.trigger} .text=${a.options}></calcite-action><slot name=${r.headerMenuActions} @slotchange=${this.handleHeaderMenuActionsSlotChange}></slot></calcite-action-menu>`)}renderHeaderNode(){let{hasHeaderContent:e,hasHeaderDescription:a,hasHeaderHeading:i,hasHeaderTop:s,hasStartActions:c,hasEndActions:l,closable:u,collapsible:p,hasMenuItems:v,hasActionBar:h,hasContentTop:f,heading:m,description:b}=this,H=this.renderHeaderContent(),T=e||(!!m||!!b||i||a)||s||c||l||p||u||v||h||f;return this.showHeaderContent=T,n`<header class=${o({[t.header]:!0,[t.headerNoRow]:s&&!this.hasHeaderRow&&!h&&!f})} .hidden=${!(T||h||f)}>${this.renderHeaderTop()}<div class=${o({[t.headerContainer]:!0,[t.headerContainerBorderEnd]:h&&this.hasHeaderRow})} .hidden=${!T}>${this.renderHeaderStartActions()}${this.renderHeaderSlottedContent()}${H}${this.renderHeaderActionsEnd()}</div>${this.renderActionBar()}${this.renderContentTop()}</header>`}renderFooterNode(){let{hasFooterEndContent:e,hasFooterStartContent:a,hasFooterContent:i}=this,s=a||e||i;return n`<footer class=${o(t.footer)} .hidden=${!s}><div class=${o(t.footerContent)} .hidden=${!i}><slot name=${r.footer} @slotchange=${this.handleFooterSlotChange}></slot></div><div class=${o(t.footerStart)} .hidden=${i||!a}><slot name=${r.footerStart} @slotchange=${this.handleFooterStartSlotChange}></slot></div><div class=${o(t.footerEnd)} .hidden=${i||!e}><slot name=${r.footerEnd} @slotchange=${this.handleFooterEndSlotChange}></slot></div></footer>`}renderContent(){return n`<div class=${o(t.contentWrapper)} .hidden=${this.collapsible&&this.collapsed} @scroll=${this.panelScrollHandler} ${A(this.setPanelScrollEl)}><slot></slot>${this.renderFab()}</div>`}renderContentBottom(){return n`<div class=${o(t.contentBottom)} .hidden=${!this.hasContentBottom}><slot name=${r.contentBottom} @slotchange=${this.contentBottomSlotChangeHandler}></slot></div>`}renderContentTop(){return n`<div class=${o({[t.contentTop]:!0,[t.contentTopNoBorder]:!this.hasHeaderRow&&!this.hasActionBar&&(this.hasHeaderTop||this.hasContentTopActionBar)})} .hidden=${!this.hasContentTop}><slot name=${r.contentTop} @slotchange=${this.contentTopSlotChangeHandler}></slot></div>`}renderFab(){return n`<div class=${o(t.fabContainer)} .hidden=${!this.hasFab}><slot name=${r.fab} @slotchange=${this.handleFabSlotChange}></slot></div>`}render(){let{disabled:e,loading:a,closed:i,heading:s,description:c}=this,l=this.hasDialogBehavior,u=!!s||this.hasHeaderHeading,p=n`<div aria-labelledby=${(l&&u?x.heading:void 0)??y} .ariaBusy=${K(a,void 0)} .ariaDescription=${l&&c?c:void 0} .ariaLabel=${l&&s&&!this.hasHeaderHeading?s:void 0} .ariaLive=${l?"polite":void 0} class=${o(t.container)} .hidden=${i} .role=${l?"dialog":"article"} ${A(this.containerRef)}>${this.renderHeaderNode()}${this.renderContent()}${this.renderContentBottom()}${this.renderFooterNode()}${g("alerts",n`<slot name=${r.alerts} @slotchange=${this.handleAlertsSlotChange}></slot>`)}</div>`;return this.interactiveContainer({disabled:e,children:n`${p}${a?n`<calcite-scrim .loading=${a}></calcite-scrim>`:null}`})}};N("calcite-panel",w);export{w as Panel};
2
+ import{a as W}from"./JXZGMCKM.js";import{a as t,b as x,c as S,d as r}from"./ICVHIOLT.js";import{a as G}from"./3R2ZSNM4.js";import{b as V}from"./IOIA7JE3.js";import{a as j}from"./3MA5I3EL.js";import"./RXZ5ESF2.js";import{b as K}from"./WTNYMVTD.js";import{a as _}from"./LQASX2YS.js";import"./5K4OZJAZ.js";import{a as O,b as R}from"./FDHY2TZA.js";import{c as E}from"./7XS2SBMV.js";import{c as U}from"./TJGNWJF6.js";import{a as g}from"./4UWTUG6N.js";import{a as I}from"./2KE3HKUU.js";import"./2IM7ZZ7U.js";import{a as M}from"./3GHBWG5F.js";import{a as L}from"./VMHJHFFS.js";import"./XJJYF3O2.js";import"./M7WEPGCG.js";import{A as $,x as k,y as B,z as d}from"./RRBGCYLX.js";import{E as D,F as A,G as P,H as o,T as N,g as F,h as n,l as y,p as C}from"./KYNZ6MSZ.js";var q=F`:host([disabled]){opacity:var(--calcite-opacity-disabled);cursor:default;-webkit-user-select:none;user-select:none}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:flex;inline-size:100%;block-size:100%;flex:1 1 auto;overflow:hidden;box-sizing:border-box;border-radius:var(--calcite-panel-corner-radius, var(--calcite-theme-corner-radius-none, 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:var(--calcite-opacity-full)}.interaction-container{display:contents}:host([scale=s]){--calcite-internal-panel-default-space: var(--calcite-theme-space-sm, var(--calcite-spacing-sm));--calcite-internal-panel-header-vertical-padding: var(--calcite-theme-space-sm-plus, 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-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=m]){--calcite-internal-panel-default-space: var(--calcite-theme-space-md, var(--calcite-spacing-md));--calcite-internal-panel-header-vertical-padding: var(--calcite-theme-space-md-plus, 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-theme-space-md, var(--calcite-spacing-md))}:host(:is([scale=s],[scale=m])){--calcite-internal-panel-action-spacing: var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs))}:host([scale=l]){--calcite-internal-panel-action-spacing: var(--calcite-theme-space-xs, var(--calcite-spacing-xs));--calcite-internal-panel-default-space: var(--calcite-theme-space-lg, var(--calcite-spacing-lg));--calcite-internal-panel-header-vertical-padding: var(--calcite-theme-space-xl, 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-theme-space-lg, 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-theme-color-surface-2, 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;background-color:var(--calcite-theme-color-surface-1, var(--calcite-color-background));margin:var(--calcite-space-none);display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;padding:var(--calcite-space-none);overflow:hidden;box-sizing:border-box;color:var(--calcite-color-text-2);transition:max-block-size var(--calcite-animation-timing),inline-size var(--calcite-animation-timing);font-size:var(--calcite-font-size-relative-base)}.container *{box-sizing:border-box}.header{display:flex;flex-direction:column;z-index:var(--calcite-z-index-header);background-color:var(--calcite-panel-header-background-color, var(--calcite-theme-color-surface-2, 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--no-row{border-block-end:0}.content-top--no-border{border-block-start:0}.header-container{display:flex;flex-direction:row;inline-size:100%;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))}.header-top{inline-size:100%;border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));padding:var(--calcite-panel-header-top-space, var(--calcite-internal-panel-default-space))}.action-bar-container{inline-size:100%}.action-bar-container ::slotted(calcite-action-bar),.content-top ::slotted(calcite-action-bar){inline-size:100%}.header-content{display:flex;flex-direction:column;overflow:hidden;padding-inline:var(--calcite-space-md);padding-block:var(--calcite-space-md-plus);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:var(--calcite-space-none);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:var(--calcite-space-none)}.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{display:flex;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;overflow:auto;block-size:100%;outline-color:var(--calcite-color-transparent);color:var(--calcite-color-text-2);position:relative;padding:var(--calcite-panel-space, var(--calcite-panel-content-space, 0));background:var(--calcite-panel-background-color, var(--calcite-theme-color-surface-1, 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(-1 * var(--calcite-space-base) * (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{font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);display:flex;margin-block-start:auto;flex-direction:row;align-content:space-between;justify-content:center;align-items:center;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-theme-color-surface-2, var(--calcite-color-foreground-1)))}.footer-content{display:flex;flex-direction:row;align-items:center;justify-content:center;flex:1 1 0%}.footer-start{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex:1 1 0%;margin-inline-end:auto;gap:var(--calcite-internal-panel-default-space)}.footer-end{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;flex:1 1 0%;margin-inline-start:auto;gap:var(--calcite-internal-panel-default-space)}.fab-container{position:sticky;inset-block-end:var(--calcite-space-none);margin-block:var(--calcite-space-none);margin-inline:auto;display:block;padding:var(--calcite-space-sm);z-index:var(--calcite-z-index-sticky);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}`,w=class extends P{constructor(){super(),this.containerRef=D(),this.resizeObserver=O("resize",()=>this.resizeHandler()),this.messages=I(),this._closed=!1,this.focusSetter=M()(this).setFocus,this.focusTrapController=W({focusTrapOptions:{allowOutsideClick:!0,escapeDeactivates:e=>(!e.defaultPrevented&&this.closable&&(this.emitCloseEvent(),e.preventDefault()),!1)}})(this),this.interactiveContainer=_(this),this.hasActionBar=!1,this.hasContentBottom=!1,this.hasContentTop=!1,this.hasContentTopActionBar=!1,this.hasEndActions=!1,this.hasFab=!1,this.hasFooterContent=!1,this.hasFooterEndContent=!1,this.hasFooterStartContent=!1,this.hasHeaderContent=!1,this.hasHeaderDescription=!1,this.hasHeaderHeading=!1,this.hasHeaderTop=!1,this.hasMenuItems=!1,this.hasStartActions=!1,this.showHeaderContent=!1,this.closable=!1,this.collapseDirection="down",this.collapsed=!1,this.collapsible=!1,this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.focusTrapEnabledByParent=!1,this.focusTrapDisabled=!1,this.menuOpen=!1,this.menuPlacement=V,this.overlayPositioning="absolute",this.scale="m",this.topLayerDisabled=!1,this.calcitePanelClose=C({cancelable:!0}),this.calcitePanelCollapse=C({cancelable:!1}),this.calcitePanelExpand=C({cancelable:!1}),this.calcitePanelScroll=C({cancelable:!1}),this.calcitePanelToggle=C({cancelable:!1}),this.listen("keydown",this.panelKeyDownHandler),this.listen("calcitePanelClose",this.panelCloseHandler)}static{this.properties={hasActionBar:[16,{},{state:!0}],hasContentBottom:[16,{},{state:!0}],hasContentTop:[16,{},{state:!0}],hasContentTopActionBar:[16,{},{state:!0}],hasEndActions:[16,{},{state:!0}],hasFab:[16,{},{state:!0}],hasFooterContent:[16,{},{state:!0}],hasFooterEndContent:[16,{},{state:!0}],hasFooterStartContent:[16,{},{state:!0}],hasHeaderContent:[16,{},{state:!0}],hasHeaderDescription:[16,{},{state:!0}],hasHeaderHeading:[16,{},{state:!0}],hasHeaderTop:[16,{},{state:!0}],hasMenuItems:[16,{},{state:!0}],hasStartActions:[16,{},{state:!0}],showHeaderContent:[16,{},{state:!0}],beforeClose:[0,{},{attribute:!1}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],collapseDirection:1,collapsed:[7,{},{reflect:!0,type:Boolean}],collapsible:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],icon:[3,{},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],loading:[7,{},{reflect:!0,type:Boolean}],focusTrapEnabledByParent:[5,{},{type:Boolean}],focusTrapDisabled:[5,{},{type:Boolean}],focusTrapOptions:[0,{},{attribute:!1}],menuFlipPlacements:[0,{},{attribute:!1}],menuOpen:[7,{},{reflect:!0,type:Boolean}],menuPlacement:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=[G,q]}get hasHeaderRow(){return this.hasHeaderContent||!!this.heading||!!this.description||this.hasHeaderHeading||this.hasHeaderDescription||this.hasStartActions||this.hasEndActions||this.collapsible||this.closable||this.hasMenuItems}get closed(){return this._closed}set closed(e){let a=this._closed;e!==a&&this.setClosedState(e)}async scrollContentTo(e){this.panelScrollEl?.scrollTo(e)}async setFocus(e){return this.focusSetter(()=>this.containerRef.value,e)}async updateFocusTrapElements(e){this.focusTrapController.setExtraContainers(e),this.focusTrapController.updateContainerElements()}willUpdate(e){e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calcitePanelCollapse.emit():this.calcitePanelExpand.emit())}updated(e){(e.has("closable")||e.has("closed")||e.has("focusTrapDisabled")||e.has("focusTrapEnabledByParent"))&&(this.hasDialogBehavior?this.focusTrapController.activate():this.focusTrapController.deactivate())}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}focusTrapDisabledOverride(){return this.focusTrapDisabled||!this.hasDialogBehavior}get hasDialogBehavior(){return!this.focusTrapDisabled&&!this.closed&&(this.closable||this.focusTrapEnabledByParent)}async setClosedState(e){if(this.beforeClose&&e)try{await this.beforeClose?.()}catch{return}this._closed=e}resizeHandler(){let{panelScrollEl:e}=this;if(!e||typeof e.scrollHeight!="number"||typeof e.offsetHeight!="number")return;e.scrollHeight>e.offsetHeight?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}closeClickHandler(){this.emitCloseEvent()}emitCloseEvent(){this.calcitePanelClose.emit()}panelKeyDownHandler(e){e.key!=="Escape"||e.defaultPrevented||this.closed||!this.closable||(e.preventDefault(),this.emitCloseEvent())}panelCloseHandler(e){e.defaultPrevented||e.target!==this.el||(this.closed=!0)}collapse(){this.collapsed=!this.collapsed,this.calcitePanelToggle.emit()}panelScrollHandler(){this.calcitePanelScroll.emit()}handleHeaderActionsStartSlotChange(e){this.hasStartActions=d(e)}handleHeaderActionsEndSlotChange(e){this.hasEndActions=d(e)}handleHeaderMenuActionsSlotChange(e){this.hasMenuItems=d(e)}handleActionBarSlotChange(e){let a=$(e).filter(E);a.forEach(i=>i.layout="horizontal"),this.hasActionBar=!!a.length}handleHeaderContentSlotChange(e){this.hasHeaderContent=d(e)}handleHeaderTopSlotChange(e){this.hasHeaderTop=d(e)}handleHeaderDescriptionSlotChange(e){this.hasHeaderDescription=B(e)||$(e).some(k)}handleHeaderHeadingSlotChange(e){this.hasHeaderHeading=B(e)||$(e).some(k)}handleFabSlotChange(e){this.hasFab=d(e)}handleFooterEndSlotChange(e){this.hasFooterEndContent=d(e)}handleFooterStartSlotChange(e){this.hasFooterStartContent=d(e)}handleFooterSlotChange(e){this.hasFooterContent=d(e)}contentBottomSlotChangeHandler(e){this.hasContentBottom=d(e)}contentTopSlotChangeHandler(e){this.hasContentTop=d(e),this.hasContentTopActionBar=$(e).some(E)}setPanelScrollEl(e){R(this.resizeObserver,this.panelScrollEl,e),this.panelScrollEl=e}handleAlertsSlotChange(e){$(e)?.map(a=>{a.nodeName==="CALCITE-ALERT"&&(a.embedded=!0)})}renderHeaderContent(){let{heading:e,headingLevel:a,description:i,hasHeaderContent:s,hasHeaderDescription:c,hasHeaderHeading:l,icon:u,scale:p}=this,v=!!e||l,h=!!i||c,f=v||h,m=u?n`<calcite-icon class=${o(t.icon)} .flipRtl=${this.iconFlipRtl} .icon=${u} .scale=${L(p)}></calcite-icon>`:null,b=j({class:t.heading,hidden:!v,id:x.heading,level:a,children:n`<slot .hidden=${!l} name=${r.heading} @slotchange=${this.handleHeaderHeadingSlotChange}></slot>${l?null:e}`}),H=n`<span class=${o(t.description)} .hidden=${!h}><slot .hidden=${!c} name=${r.description} @slotchange=${this.handleHeaderDescriptionSlotChange}></slot>${c?null:i}</span>`;return g("header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerNonSlottedContent]:!0})} .hidden=${s||!f}>${m}<div class=${o(t.headingTextContent)}>${b}${H}</div></div>`)}renderActionBar(){return n`<div class=${o(t.actionBarContainer)} .hidden=${!this.hasActionBar}><slot name=${r.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`}renderHeaderSlottedContent(){return g("slotted-header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerSlottedContent]:!0})} .hidden=${!this.hasHeaderContent}><slot name=${r.headerContent} @slotchange=${this.handleHeaderContentSlotChange}></slot></div>`)}renderHeaderTop(){return n`<div class=${o(t.headerTop)} .hidden=${!this.hasHeaderTop}><slot name=${r.headerTop} @slotchange=${this.handleHeaderTopSlotChange}></slot></div>`}renderHeaderStartActions(){let{hasStartActions:e}=this;return g("header-actions-start",n`<div class=${o({[t.headerActionsStart]:!0,[t.headerActions]:!0})} .hidden=${!e}><slot name=${r.headerActionsStart} @slotchange=${this.handleHeaderActionsStartSlotChange}></slot></div>`)}renderHeaderActionsEnd(){let{hasEndActions:e,messages:a,closable:i,collapsed:s,collapseDirection:c,collapsible:l,hasMenuItems:u}=this,{collapse:p,expand:v,close:h}=a,f=[S.expand,S.collapse];c==="up"&&f.reverse();let m=l?n`<calcite-action .aria=${{expanded:!s}} .icon=${s?f[0]:f[1]} id=${x.collapse} .label=${p} @click=${this.collapse} .scale=${this.scale} .text=${p} title=${(s?v:p)??y}></calcite-action>`:null,b=i?n`<calcite-action .ariaLabel=${h} .icon=${S.close} id=${x.close} @click=${this.closeClickHandler} .scale=${this.scale} .text=${h} title=${h??y}></calcite-action>`:null,H=n`<slot name=${r.headerActionsEnd} @slotchange=${this.handleHeaderActionsEndSlotChange}></slot>`,z=e||m||b||u;return g("header-actions-end",n`<div class=${o({[t.headerActionsEnd]:!0,[t.headerActions]:!0})} .hidden=${!z}>${H}${this.renderMenu()}${m}${b}</div>`)}renderMenu(){let{hasMenuItems:e,messages:a,menuOpen:i,menuFlipPlacements:s,menuPlacement:c,scale:l}=this;return g("menu",n`<calcite-action-menu .flipPlacements=${s??["top","bottom"]} .hidden=${!e} .label=${a.options} .open=${i} .overlayPositioning=${this.overlayPositioning} .placement=${c} .scale=${l} .topLayerDisabled=${this.topLayerDisabled}><calcite-action class=${o(t.menuAction)} .icon=${S.menu} .scale=${l} slot=${U.trigger} .text=${a.options}></calcite-action><slot name=${r.headerMenuActions} @slotchange=${this.handleHeaderMenuActionsSlotChange}></slot></calcite-action-menu>`)}renderHeaderNode(){let{hasHeaderContent:e,hasHeaderDescription:a,hasHeaderHeading:i,hasHeaderTop:s,hasStartActions:c,hasEndActions:l,closable:u,collapsible:p,hasMenuItems:v,hasActionBar:h,hasContentTop:f,heading:m,description:b}=this,H=this.renderHeaderContent(),T=e||(!!m||!!b||i||a)||s||c||l||p||u||v||h||f;return this.showHeaderContent=T,n`<header class=${o({[t.header]:!0,[t.headerNoRow]:s&&!this.hasHeaderRow&&!h&&!f})} .hidden=${!(T||h||f)}>${this.renderHeaderTop()}<div class=${o({[t.headerContainer]:!0,[t.headerContainerBorderEnd]:h&&this.hasHeaderRow})} .hidden=${!T}>${this.renderHeaderStartActions()}${this.renderHeaderSlottedContent()}${H}${this.renderHeaderActionsEnd()}</div>${this.renderActionBar()}${this.renderContentTop()}</header>`}renderFooterNode(){let{hasFooterEndContent:e,hasFooterStartContent:a,hasFooterContent:i}=this,s=a||e||i;return n`<footer class=${o(t.footer)} .hidden=${!s}><div class=${o(t.footerContent)} .hidden=${!i}><slot name=${r.footer} @slotchange=${this.handleFooterSlotChange}></slot></div><div class=${o(t.footerStart)} .hidden=${i||!a}><slot name=${r.footerStart} @slotchange=${this.handleFooterStartSlotChange}></slot></div><div class=${o(t.footerEnd)} .hidden=${i||!e}><slot name=${r.footerEnd} @slotchange=${this.handleFooterEndSlotChange}></slot></div></footer>`}renderContent(){return n`<div class=${o(t.contentWrapper)} .hidden=${this.collapsible&&this.collapsed} @scroll=${this.panelScrollHandler} ${A(this.setPanelScrollEl)}><slot></slot>${this.renderFab()}</div>`}renderContentBottom(){return n`<div class=${o(t.contentBottom)} .hidden=${!this.hasContentBottom}><slot name=${r.contentBottom} @slotchange=${this.contentBottomSlotChangeHandler}></slot></div>`}renderContentTop(){return n`<div class=${o({[t.contentTop]:!0,[t.contentTopNoBorder]:!this.hasHeaderRow&&!this.hasActionBar&&(this.hasHeaderTop||this.hasContentTopActionBar)})} .hidden=${!this.hasContentTop}><slot name=${r.contentTop} @slotchange=${this.contentTopSlotChangeHandler}></slot></div>`}renderFab(){return n`<div class=${o(t.fabContainer)} .hidden=${!this.hasFab}><slot name=${r.fab} @slotchange=${this.handleFabSlotChange}></slot></div>`}render(){let{disabled:e,loading:a,closed:i,heading:s,description:c}=this,l=this.hasDialogBehavior,u=!!s||this.hasHeaderHeading,p=n`<div aria-labelledby=${(l&&u?x.heading:void 0)??y} .ariaBusy=${K(a,void 0)} .ariaDescription=${l&&c?c:void 0} .ariaLabel=${l&&s&&!this.hasHeaderHeading?s:void 0} .ariaLive=${l?"polite":void 0} class=${o(t.container)} .hidden=${i} .role=${l?"dialog":"article"} ${A(this.containerRef)}>${this.renderHeaderNode()}${this.renderContent()}${this.renderContentBottom()}${this.renderFooterNode()}${g("alerts",n`<slot name=${r.alerts} @slotchange=${this.handleAlertsSlotChange}></slot>`)}</div>`;return this.interactiveContainer({disabled:e,children:n`${p}${a?n`<calcite-scrim .loading=${a}></calcite-scrim>`:null}`})}};N("calcite-panel",w);export{w as Panel};
@@ -1,3 +1,3 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{h,i as p,j as S}from"./WWTG7ZPG.js";var u=Symbol.for(""),d=t=>{if(t?.r===u)return t?._$litStatic$},_=t=>({_$litStatic$:t,r:u}),w=(t,...a)=>({_$litStatic$:a.reduce((r,i,o)=>r+(e=>{if(e._$litStatic$!==void 0)return e._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but
2
+ import{h,i as p,j as S}from"./KYNZ6MSZ.js";var u=Symbol.for(""),d=t=>{if(t?.r===u)return t?._$litStatic$},_=t=>({_$litStatic$:t,r:u}),w=(t,...a)=>({_$litStatic$:a.reduce((r,i,o)=>r+(e=>{if(e._$litStatic$!==void 0)return e._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but
3
3
  take care to ensure page security.`)})(i)+t[o+1],t[0]),r:u}),v=new Map,c=t=>(a,...r)=>{let i=r.length,o,e,l=[],$=[],n,s=0,f=!1;for(;s<i;){for(n=a[s];s<i&&(e=r[s],(o=d(e))!==void 0);)n+=o+a[++s],f=!0;s!==i&&$.push(e),l.push(n),s++}if(s===i&&l.push(a[i]),f){let m=l.join("$$lit$$");(a=v.get(m))===void 0&&(l.raw=l,v.set(m,a=l)),r=$}return t(a,...r)},b=c(h),x=c(p),y=c(S);export{_ as a,w as b,b as c};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as u}from"./KSKKX3DQ.js";import{a as p}from"./ZS6NXVE5.js";import{a as g,b as t}from"./PN3VHKDB.js";import{a as d}from"./FDHY2TZA.js";import{a as m}from"./UUEFYLY2.js";import{a as h}from"./IUWTLP2K.js";import"./VMHJHFFS.js";import"./KNHRMOQB.js";import"./BPZZDPGH.js";import"./RRBGCYLX.js";import{G as n,H as c,L as r,T as o,g as i,h as s,p as l}from"./WWTG7ZPG.js";var f={itemWrapper:"item-wrapper"},v={validationMessage:"radioButtonGroupValidationMessage"},x=i`:host{display:flex;flex-direction:column}:host>.item-wrapper{display:flex;max-inline-size:100vw}:host([layout=horizontal])>.item-wrapper{flex-direction:row;flex-wrap:wrap}:host([layout=horizontal][scale=s])>.item-wrapper{column-gap:var(--calcite-radio-button-group-gap, var(--calcite-theme-space-lg, var(--calcite-spacing-lg)))}:host([layout=horizontal][scale=m])>.item-wrapper{column-gap:var(--calcite-radio-button-group-gap, var(--calcite-theme-space-xl, var(--calcite-spacing-xl)))}:host([layout=horizontal][scale=l])>.item-wrapper{column-gap:var(--calcite-radio-button-group-gap, var(--calcite-theme-space-2xl, var(--calcite-spacing-xxl)))}:host([layout=vertical])>.item-wrapper{flex-direction:column;inline-size:fit-content}:host([scale=s]) calcite-input-message{--calcite-input-message-spacing: var( --calcite-radio-button-input-message-spacing, calc(var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs)) * -1) )}:host([scale=m]) calcite-input-message{--calcite-input-message-spacing: var( --calcite-radio-button-input-message-spacing, calc(var(--calcite-theme-space-sm, var(--calcite-spacing-sm)) * -1) )}:host([scale=l]) calcite-input-message{--calcite-input-message-spacing: var( --calcite-radio-button-input-message-spacing, calc(var(--calcite-theme-space-md, var(--calcite-spacing-md)) * -1) )}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-theme-space-base, var(--calcite-spacing-base))}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs))}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-theme-space-md, var(--calcite-spacing-md))}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-theme-space-md, var(--calcite-spacing-md))}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}:host([hidden]){display:none}[hidden]{display:none}`,a=class extends n{constructor(){super(),this.messages=m(),this.mutationObserver=d("mutation",()=>this.passPropsToRadioButtons()),this.focusSetter=h()(this).setFocus,this._disabled=!1,this.disabledWasSet=!1,this.radioButtons=[],this.layout="horizontal",this.required=!1,this.scale="m",this.selectedItem=null,this.status="idle",this.calciteRadioButtonGroupChange=l({cancelable:!1}),this.listen("calciteRadioButtonChange",this.radioButtonChangeHandler),this.listen("calciteInvalid",this.handleInvalidFormEvent),this.listen("luminaFormResetCallback",()=>{this.status==="invalid"&&t(this)})}static{this.properties={radioButtons:[16,{},{state:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],labelText:1,layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectedItem:[0,{},{attribute:!1}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:r},{reflect:!0}],validationMessage:1}}static{this.styles=x}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this.disabledWasSet=!0}async setFocus(e){return this.focusSetter(()=>this.selectedItem&&!this.selectedItem.disabled?this.selectedItem:this.getFocusableRadioButton(),e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}willUpdate(e){(e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)||e.has("layout")&&(this.hasUpdated||this.layout!=="horizontal")||e.has("scale")&&(this.hasUpdated||this.scale!=="m")||e.has("status")&&this.hasUpdated)&&this.passPropsToRadioButtons()}loaded(){this.passPropsToRadioButtons()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}handleInvalidFormEvent(e){let b=this.validationMessage||e.target.validationMessage||"";g(this,{message:b,icon:!0,status:"invalid"})}passPropsToRadioButtons(){this.radioButtons=Array.from(this.el.querySelectorAll("calcite-radio-button")),this.selectedItem=Array.from(this.radioButtons).reverse().find(e=>e.checked)??null,this.radioButtons.forEach(e=>{this.disabledWasSet&&(e.disabled=this.disabled),e.name=this.name,e.required=this.required,e.scale=this.scale,e.status=this.status})}getFocusableRadioButton(){return this.radioButtons.find(e=>!e.disabled)}radioButtonChangeHandler(e){this.selectedItem=e.target,this.required&&this.selectedItem&&this.status==="invalid"&&t(this),this.calciteRadioButtonGroupChange.emit()}render(){return this.el.role="radiogroup",s`${this.labelText&&p({labelText:this.labelText,required:this.required,tooltipText:this.messages.required})||""}<div aria-errormessage=${v.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaRequired=${this.required} class=${c(f.itemWrapper)}><slot></slot></div>${this.validationMessage&&this.status==="invalid"?u({icon:this.validationIcon,id:v.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`}};o("calcite-radio-button-group",a);export{a as RadioButtonGroup};
2
+ import{a as u}from"./LPSN35WY.js";import{a as p}from"./A2BC3NKN.js";import{a as g,b as t}from"./WDJOGUZJ.js";import{a as d}from"./FDHY2TZA.js";import{a as m}from"./2KE3HKUU.js";import{a as h}from"./3GHBWG5F.js";import"./VMHJHFFS.js";import"./XJJYF3O2.js";import"./M7WEPGCG.js";import"./RRBGCYLX.js";import{G as n,H as c,L as r,T as o,g as i,h as s,p as l}from"./KYNZ6MSZ.js";var f={itemWrapper:"item-wrapper"},v={validationMessage:"radioButtonGroupValidationMessage"},x=i`:host{display:flex;flex-direction:column}:host>.item-wrapper{display:flex;max-inline-size:100vw}:host([layout=horizontal])>.item-wrapper{flex-direction:row;flex-wrap:wrap}:host([layout=horizontal][scale=s])>.item-wrapper{column-gap:var(--calcite-radio-button-group-gap, var(--calcite-theme-space-lg, var(--calcite-spacing-lg)))}:host([layout=horizontal][scale=m])>.item-wrapper{column-gap:var(--calcite-radio-button-group-gap, var(--calcite-theme-space-xl, var(--calcite-spacing-xl)))}:host([layout=horizontal][scale=l])>.item-wrapper{column-gap:var(--calcite-radio-button-group-gap, var(--calcite-theme-space-2xl, var(--calcite-spacing-xxl)))}:host([layout=vertical])>.item-wrapper{flex-direction:column;inline-size:fit-content}:host([scale=s]) calcite-input-message{--calcite-input-message-spacing: var( --calcite-radio-button-input-message-spacing, calc(var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs)) * -1) )}:host([scale=m]) calcite-input-message{--calcite-input-message-spacing: var( --calcite-radio-button-input-message-spacing, calc(var(--calcite-theme-space-sm, var(--calcite-spacing-sm)) * -1) )}:host([scale=l]) calcite-input-message{--calcite-input-message-spacing: var( --calcite-radio-button-input-message-spacing, calc(var(--calcite-theme-space-md, var(--calcite-spacing-md)) * -1) )}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-theme-space-base, var(--calcite-spacing-base))}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs))}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-theme-space-md, var(--calcite-spacing-md))}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-theme-space-md, var(--calcite-spacing-md))}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}:host([hidden]){display:none}[hidden]{display:none}`,a=class extends n{constructor(){super(),this.messages=m(),this.mutationObserver=d("mutation",()=>this.passPropsToRadioButtons()),this.focusSetter=h()(this).setFocus,this._disabled=!1,this.disabledWasSet=!1,this.radioButtons=[],this.layout="horizontal",this.required=!1,this.scale="m",this.selectedItem=null,this.status="idle",this.calciteRadioButtonGroupChange=l({cancelable:!1}),this.listen("calciteRadioButtonChange",this.radioButtonChangeHandler),this.listen("calciteInvalid",this.handleInvalidFormEvent),this.listen("luminaFormResetCallback",()=>{this.status==="invalid"&&t(this)})}static{this.properties={radioButtons:[16,{},{state:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],labelText:1,layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectedItem:[0,{},{attribute:!1}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:r},{reflect:!0}],validationMessage:1}}static{this.styles=x}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this.disabledWasSet=!0}async setFocus(e){return this.focusSetter(()=>this.selectedItem&&!this.selectedItem.disabled?this.selectedItem:this.getFocusableRadioButton(),e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}willUpdate(e){(e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)||e.has("layout")&&(this.hasUpdated||this.layout!=="horizontal")||e.has("scale")&&(this.hasUpdated||this.scale!=="m")||e.has("status")&&this.hasUpdated)&&this.passPropsToRadioButtons()}loaded(){this.passPropsToRadioButtons()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}handleInvalidFormEvent(e){let b=this.validationMessage||e.target.validationMessage||"";g(this,{message:b,icon:!0,status:"invalid"})}passPropsToRadioButtons(){this.radioButtons=Array.from(this.el.querySelectorAll("calcite-radio-button")),this.selectedItem=Array.from(this.radioButtons).reverse().find(e=>e.checked)??null,this.radioButtons.forEach(e=>{this.disabledWasSet&&(e.disabled=this.disabled),e.name=this.name,e.required=this.required,e.scale=this.scale,e.status=this.status})}getFocusableRadioButton(){return this.radioButtons.find(e=>!e.disabled)}radioButtonChangeHandler(e){this.selectedItem=e.target,this.required&&this.selectedItem&&this.status==="invalid"&&t(this),this.calciteRadioButtonGroupChange.emit()}render(){return this.el.role="radiogroup",s`${this.labelText&&p({labelText:this.labelText,required:this.required,tooltipText:this.messages.required})||""}<div aria-errormessage=${v.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaRequired=${this.required} class=${c(f.itemWrapper)}><slot></slot></div>${this.validationMessage&&this.status==="invalid"?u({icon:this.validationIcon,id:v.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`}};o("calcite-radio-button-group",a);export{a as RadioButtonGroup};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as e}from"./ASXRP7XI.js";import{a as i}from"./VCNXTZIB.js";import"./2IM7ZZ7U.js";import{a as s}from"./IUWTLP2K.js";import"./VMHJHFFS.js";import"./KNHRMOQB.js";import"./BPZZDPGH.js";import"./RRBGCYLX.js";import{G as c,H as t,T as r,g as l,h as a}from"./WWTG7ZPG.js";var u=l`:host([scale=s]){--calcite-internal-navigation-user-padding-inline: var(--calcite-space-md);--calcite-internal-navigation-user-full-name-font-size: var(--calcite-font-size-relative-base);--calcite-internal-navigation-user-username-font-size: var(--calcite-font-size-relative-sm);--calcite-internal-navigation-user-full-name-line-height: var(--calcite-space-lg);--calcite-internal-navigation-user-username-line-height: var(--calcite-space-lg)}:host([scale=m]){--calcite-internal-navigation-user-padding-inline: var(--calcite-space-lg);--calcite-internal-navigation-user-full-name-font-size: var(--calcite-font-size-relative-md);--calcite-internal-navigation-user-username-font-size: var(--calcite-font-size-relative-base);--calcite-internal-navigation-user-full-name-line-height: var(--calcite-space-xl);--calcite-internal-navigation-user-username-line-height: var(--calcite-space-lg)}:host([scale=l]){--calcite-internal-navigation-user-padding-inline: var(--calcite-space-xl);--calcite-internal-navigation-user-full-name-font-size: var(--calcite-font-size-relative-xl);--calcite-internal-navigation-user-username-font-size: var(--calcite-font-size-relative-lg);--calcite-internal-navigation-user-full-name-line-height: var(--calcite-space-2xl);--calcite-internal-navigation-user-username-line-height: var(--calcite-space-2xl)}:host{outline:var(--calcite-border-width-md) solid transparent;outline-offset:var(--calcite-border-width-md);display:inline-flex}:host .button{font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);display:flex;margin:var(--calcite-space-none);align-items:center;justify-content:center;cursor:pointer;outline-color:var(--calcite-color-transparent);font-family:inherit;border:none;padding-inline:0;background-color:var(--calcite-navigation-background-color, var(--calcite-internal-navigation-user-background-color, var(--calcite-color-transparent)));border-block-end:2px solid var(--calcite-color-transparent)}.text-container{display:flex;flex-direction:column;text-align:start;margin-block-start:var(--calcite-space-base);padding-inline:var(--calcite-internal-navigation-user-padding-inline)}calcite-avatar{--calcite-avatar-corner-radius: var(--calcite-navigation-user-avatar-corner-radius);--calcite-avatar-color: var(--calcite-navigation-user-avatar-color);padding-inline:var(--calcite-internal-navigation-user-padding-inline)}calcite-avatar~.text-container{padding-inline-start:var(--calcite-space-none)}.full-name{margin-inline-start:var(--calcite-space-none);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-navigation-user-full-name-text-color, var(--calcite-color-text-1));font-size:var(--calcite-internal-navigation-user-full-name-font-size);padding-block-start:var(--calcite-space-2xs);line-height:var(--calcite-internal-navigation-user-full-name-line-height)}.standalone{padding-block-start:0}.username{font-size:var(--calcite-internal-navigation-user-username-font-size);color:var(--calcite-navigation-user-name-text-color, var(--calcite-color-text-2));line-height:var(--calcite-internal-navigation-user-username-line-height)}:host(:hover) .button,:host(:focus) .button{--calcite-internal-navigation-user-background-color: var( --calcite-theme-color-surface-3, var(--calcite-color-foreground-2) )}:host(:focus) .button{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(-1 * var(--calcite-space-base) * (1 - 2 * clamp(0,var(--calcite-offset-invert-focus),1)))}:host(:active) .button{--calcite-internal-navigation-user-background-color: var( --calcite-theme-color-surface-4, var(--calcite-color-foreground-3) )}:host([active]) .button{border-block-end-color:var(--calcite-navigation-accent-color, var(--calcite-color-brand))}:host([hidden]){display:none}[hidden]{display:none}`,n=class extends c{constructor(){super(...arguments),this.focusSetter=s()(this).setFocus,this.active=!1,this.textDisabled=!1,this.scale="m"}static{this.properties={active:[7,{},{reflect:!0,type:Boolean}],fullName:1,label:1,textDisabled:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],thumbnail:1,userId:1,username:1}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=u}async setFocus(o){return this.focusSetter(()=>this.el,o)}render(){return a`<button .ariaLabel=${this.label} class=${t(e.button)}><calcite-avatar .fullName=${this.fullName} .label=${this.label} .scale=${this.scale} .thumbnail=${this.thumbnail} .userId=${this.userId} .username=${this.username}></calcite-avatar>${(this.fullName||this.username)&&!this.textDisabled&&a`<div class=${t(e.textContainer)}>${this.fullName&&i(e.fullName,a`<span class=${t({[e.fullName]:!0,[e.standalone]:!this.username})}>${this.fullName}</span>`)||""}${this.username&&i(e.username,a`<span class=${t(e.username)}>${this.username}</span>`)||""}</div>`||""}</button>`}};r("calcite-navigation-user",n);export{n as NavigationUser};
2
+ import{a as e}from"./ASXRP7XI.js";import{a as i}from"./4UWTUG6N.js";import"./2IM7ZZ7U.js";import{a as s}from"./3GHBWG5F.js";import"./VMHJHFFS.js";import"./XJJYF3O2.js";import"./M7WEPGCG.js";import"./RRBGCYLX.js";import{G as c,H as t,T as r,g as l,h as a}from"./KYNZ6MSZ.js";var u=l`:host([scale=s]){--calcite-internal-navigation-user-padding-inline: var(--calcite-space-md);--calcite-internal-navigation-user-full-name-font-size: var(--calcite-font-size-relative-base);--calcite-internal-navigation-user-username-font-size: var(--calcite-font-size-relative-sm);--calcite-internal-navigation-user-full-name-line-height: var(--calcite-space-lg);--calcite-internal-navigation-user-username-line-height: var(--calcite-space-lg)}:host([scale=m]){--calcite-internal-navigation-user-padding-inline: var(--calcite-space-lg);--calcite-internal-navigation-user-full-name-font-size: var(--calcite-font-size-relative-md);--calcite-internal-navigation-user-username-font-size: var(--calcite-font-size-relative-base);--calcite-internal-navigation-user-full-name-line-height: var(--calcite-space-xl);--calcite-internal-navigation-user-username-line-height: var(--calcite-space-lg)}:host([scale=l]){--calcite-internal-navigation-user-padding-inline: var(--calcite-space-xl);--calcite-internal-navigation-user-full-name-font-size: var(--calcite-font-size-relative-xl);--calcite-internal-navigation-user-username-font-size: var(--calcite-font-size-relative-lg);--calcite-internal-navigation-user-full-name-line-height: var(--calcite-space-2xl);--calcite-internal-navigation-user-username-line-height: var(--calcite-space-2xl)}:host{outline:var(--calcite-border-width-md) solid transparent;outline-offset:var(--calcite-border-width-md);display:inline-flex}:host .button{font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);display:flex;margin:var(--calcite-space-none);align-items:center;justify-content:center;cursor:pointer;outline-color:var(--calcite-color-transparent);font-family:inherit;border:none;padding-inline:0;background-color:var(--calcite-navigation-background-color, var(--calcite-internal-navigation-user-background-color, var(--calcite-color-transparent)));border-block-end:2px solid var(--calcite-color-transparent)}.text-container{display:flex;flex-direction:column;text-align:start;margin-block-start:var(--calcite-space-base);padding-inline:var(--calcite-internal-navigation-user-padding-inline)}calcite-avatar{--calcite-avatar-corner-radius: var(--calcite-navigation-user-avatar-corner-radius);--calcite-avatar-color: var(--calcite-navigation-user-avatar-color);padding-inline:var(--calcite-internal-navigation-user-padding-inline)}calcite-avatar~.text-container{padding-inline-start:var(--calcite-space-none)}.full-name{margin-inline-start:var(--calcite-space-none);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-navigation-user-full-name-text-color, var(--calcite-color-text-1));font-size:var(--calcite-internal-navigation-user-full-name-font-size);padding-block-start:var(--calcite-space-2xs);line-height:var(--calcite-internal-navigation-user-full-name-line-height)}.standalone{padding-block-start:0}.username{font-size:var(--calcite-internal-navigation-user-username-font-size);color:var(--calcite-navigation-user-name-text-color, var(--calcite-color-text-2));line-height:var(--calcite-internal-navigation-user-username-line-height)}:host(:hover) .button,:host(:focus) .button{--calcite-internal-navigation-user-background-color: var( --calcite-theme-color-surface-3, var(--calcite-color-foreground-2) )}:host(:focus) .button{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(-1 * var(--calcite-space-base) * (1 - 2 * clamp(0,var(--calcite-offset-invert-focus),1)))}:host(:active) .button{--calcite-internal-navigation-user-background-color: var( --calcite-theme-color-surface-4, var(--calcite-color-foreground-3) )}:host([active]) .button{border-block-end-color:var(--calcite-navigation-accent-color, var(--calcite-color-brand))}:host([hidden]){display:none}[hidden]{display:none}`,n=class extends c{constructor(){super(...arguments),this.focusSetter=s()(this).setFocus,this.active=!1,this.textDisabled=!1,this.scale="m"}static{this.properties={active:[7,{},{reflect:!0,type:Boolean}],fullName:1,label:1,textDisabled:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],thumbnail:1,userId:1,username:1}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=u}async setFocus(o){return this.focusSetter(()=>this.el,o)}render(){return a`<button .ariaLabel=${this.label} class=${t(e.button)}><calcite-avatar .fullName=${this.fullName} .label=${this.label} .scale=${this.scale} .thumbnail=${this.thumbnail} .userId=${this.userId} .username=${this.username}></calcite-avatar>${(this.fullName||this.username)&&!this.textDisabled&&a`<div class=${t(e.textContainer)}>${this.fullName&&i(e.fullName,a`<span class=${t({[e.fullName]:!0,[e.standalone]:!this.username})}>${this.fullName}</span>`)||""}${this.username&&i(e.username,a`<span class=${t(e.username)}>${this.username}</span>`)||""}</div>`||""}</button>`}};r("calcite-navigation-user",n);export{n as NavigationUser};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{a as _}from"./LPSN35WY.js";import{b as q}from"./G2G5ELGL.js";import{a as K}from"./A2BC3NKN.js";import{c as j}from"./WDJOGUZJ.js";import{a as V}from"./7VSUKBQ3.js";import{b as W}from"./XIERF7M3.js";import{d as y}from"./K4N2EM4F.js";import{a as v,c as x,e as G,g as p,h as N}from"./IOIA7JE3.js";import{a as I}from"./XN5GTOTE.js";import{a as Y}from"./ZUTPJ6CY.js";import{a as H}from"./CB6GORA5.js";import{a as P}from"./LQASX2YS.js";import"./5K4OZJAZ.js";import{a as E,b as O}from"./FDHY2TZA.js";import{a as F}from"./CASNTUXN.js";import{a as M}from"./G525AMUR.js";import{a as U}from"./CNNZUX2A.js";import{a as B}from"./2KE3HKUU.js";import"./2IM7ZZ7U.js";import{a as D}from"./3GHBWG5F.js";import"./VMHJHFFS.js";import{c as R,e as w}from"./XJJYF3O2.js";import"./M7WEPGCG.js";import{B as b,e as z,f as L,z as g}from"./RRBGCYLX.js";import{E as h,F as c,G as A,H as r,L as f,M as S,T,g as k,h as d,l as m,p as l}from"./KYNZ6MSZ.js";var Z=k`:host([disabled]){opacity:var(--calcite-opacity-disabled);cursor:default;-webkit-user-select:none;user-select:none}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:block}.input-container{position:relative;display:flex;flex:1 1 auto;flex-wrap:nowrap}.input{inline-size:100%;--calcite-input-prefix-size: var(--calcite-autocomplete-input-prefix-size);--calcite-input-suffix-size: var(--calcite-autocomplete-input-suffix-size);--calcite-input-background-color: var(--calcite-autocomplete-input-background-color);--calcite-input-border-color: var(--calcite-autocomplete-input-border-color);--calcite-input-corner-radius: var(--calcite-autocomplete-input-corner-radius, var(--calcite-corner-radius));--calcite-input-shadow: var(--calcite-autocomplete-input-shadow);--calcite-input-icon-color: var(--calcite-autocomplete-input-icon-color);--calcite-input-text-color: var(--calcite-autocomplete-input-text-color);--calcite-input-placeholder-text-color: var(--calcite-autocomplete-input-placeholder-text-color);--calcite-input-actions-background-color: var(--calcite-autocomplete-input-actions-background-color);--calcite-input-actions-background-color-hover: var(--calcite-autocomplete-input-actions-background-color-hover);--calcite-input-actions-background-color-press: var(--calcite-autocomplete-input-actions-background-color-press);--calcite-input-actions-icon-color: var(--calcite-autocomplete-input-actions-icon-color);--calcite-input-actions-icon-color-hover: var(--calcite-autocomplete-input-actions-icon-color-hover);--calcite-input-actions-icon-color-press: var(--calcite-autocomplete-input-actions-icon-color-press);--calcite-input-loading-background-color: var(--calcite-autocomplete-input-loading-background-color);--calcite-input-loading-fill-color: var(--calcite-autocomplete-input-loading-fill-color);--calcite-input-prefix-text-color: var(--calcite-autocomplete-input-prefix-text-color);--calcite-input-suffix-text-color: var(--calcite-autocomplete-input-suffix-text-color)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:var(--calcite-opacity-full)}.interaction-container{display:contents}.content-container{inline-size:100%;box-sizing:border-box}.floating-ui-container{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{.floating-ui-container{opacity:0;inset-block-start:0;left:0}}:host([top-layer-disabled]) .floating-ui-container{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown)}.floating-ui-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.floating-ui-container:popover-open{display:block}.floating-ui-container .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;border-radius:var(--calcite-corner-radius-sm);z-index:var(--calcite-z-index)}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.content-container .calcite-floating-ui-anim{overflow-y:auto;inline-size:100%;box-shadow:var(--calcite-shadow-md);max-block-size:var(--calcite-autocomplete-menu-max-size-y, 45vh);color:var(--calcite-autocomplete-text-color, var(--calcite-color-text-1));background-color:var(--calcite-autocomplete-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)));border-radius:var(--calcite-autocomplete-corner-radius, var(--calcite-theme-corner-radius-sm, var(--calcite-corner-radius-round)))}.content--hidden{display:none}@media(forced-colors:active){.floating-ui-container--active{border:1px solid canvasText}}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-theme-space-base, var(--calcite-spacing-base))}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs))}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-theme-space-md, var(--calcite-spacing-md))}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-theme-space-md, var(--calcite-spacing-md))}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}:host([hidden]){display:none}[hidden]{display:none}`,J={contentBottom:"content-bottom",contentTop:"content-top"},o={inputContainer:"input-container",input:"input",contentContainer:"content-container",contentAnimation:"content-animation",content:"content",contentHidden:"content--hidden",floatingUIContainer:"floating-ui-container",floatingUIContainerActive:"floating-ui-container--active"},Q="autocomplete",X={validationMessage:"autocompleteValidationMessage",input:u=>`${Q}-input-${u}`,list:u=>`${Q}-list-${u}`},tt="calcite-autocomplete-item-group",et="calcite-autocomplete-item",C=class extends A{constructor(){super(),this.guid=F(),this.attributeWatch=R(["autofocus","enterkeyhint","inputmode"],this.handleGlobalAttributesChanged),this.direction=w(),this.formSupport=j({inputType:"text"})(this),this.listId=X.list(this.guid),this.messages=B(),this.transitionProp="opacity",this.transitionRef=h(),this.defaultSlotRef=h(),this.listboxRef=h(),this.listboxOptionRefs=new Map,this.focusSetter=D()(this).setFocus,this.resizeObserver=E("resize",()=>{this.setFloatingElSize()}),this.interactiveContainer=P(this),this.topLayer=M({target:()=>this.floatingEl})(this),this.activeIndex=-1,this.hasContentBottom=!1,this.hasContentTop=!1,this.items=[],this.groups=[],this.alignment="start",this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.open=!1,this.overlayPositioning="absolute",this.placement=v,this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.topLayerDisabled=!1,this.value="",this.calciteAutocompleteBeforeClose=l({cancelable:!1}),this.calciteAutocompleteBeforeOpen=l({cancelable:!1}),this.calciteAutocompleteChange=l({cancelable:!1}),this.calciteAutocompleteClose=l({cancelable:!1}),this.calciteAutocompleteOpen=l({cancelable:!1}),this.calciteAutocompleteTextChange=l({cancelable:!1}),this.calciteAutocompleteTextInput=l({cancelable:!1}),Y(this),this.listen("focusout",this.handleFocusOut),this.listen("calciteInternalInputClear",this.handleInputClear),this.listen("calciteAutocompleteItemSelect",this.handleAutocompleteItemSelect),this.listen("calciteInternalAutocompleteItemChange",this.handleAutocompleteItemChange),this.listen("calciteInternalAutocompleteItemGroupItemsChange",this.handleAutocompleteItemGroupItemsChange)}static{this.properties={activeDescendantElement:[16,{},{state:!0}],activeIndex:[16,{},{state:!0}],hasContentBottom:[16,{},{state:!0}],hasContentTop:[16,{},{state:!0}],items:[16,{},{state:!0}],groups:[16,{},{state:!0}],alignment:[3,{},{reflect:!0}],autocomplete:1,disabled:[7,{},{reflect:!0,type:Boolean}],flipPlacements:[0,{},{attribute:!1}],form:[3,{},{reflect:!0}],icon:[3,{converter:f},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],inputValue:1,label:1,labelText:1,loading:[7,{},{reflect:!0,type:Boolean}],maxLength:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],minLength:[11,{},{reflect:!0,type:Number}],name:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],pattern:1,placeholder:1,placement:[3,{},{reflect:!0}],prefixText:1,readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],suffixText:1,topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],validationIcon:[3,{converter:f},{reflect:!0}],validationMessage:1,validity:[32,{},{readOnly:!0,attribute:!1}],value:1}}static{this.formAssociated=!0}static{this.styles=[Z,H]}get isOpen(){return this.open&&(this.hasContentTop||this.hasContentBottom||this.items.length>0)}get enabledItems(){return this.items.filter(t=>!t.disabled)}async reposition(t=!1){let{floatingEl:e,referenceEl:a,placement:i,overlayPositioning:n,flipPlacements:s}=this;return G(this,{direction:this.direction,floatingEl:e,referenceEl:a,overlayPositioning:n,placement:i,flipPlacements:s,type:"menu"},t)}async scrollContentTo(t){this.transitionRef.value?.scrollTo(t)}async selectText(){return this.referenceEl?.selectText()}async setFocus(t){return this.focusSetter(()=>this.referenceEl,t)}connectedCallback(){super.connectedCallback(),p(this)}load(){this.listenOn(document,"click",this.documentClickHandler)}willUpdate(t){t.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),t.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),t.has("value")&&this.hasUpdated&&this.selectedItemsHandler(),(t.has("flipPlacements")||t.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||t.has("placement")&&(this.hasUpdated||this.placement!==v))&&this.reposition(!0);let e=!1;t.has("inputValue")&&(this.hasUpdated||this.inputValue)&&(this.inputValueMatchPattern=this.inputValue?new RegExp(`(${q(this.inputValue)})`,"i"):void 0,this.updateItems(),this.updateGroups(),e=!0),!e&&t.has("scale")&&(this.hasUpdated||this.scale!=="m")&&(this.updateItems(),this.updateGroups(),e=!0),!e&&t.has("activeIndex")&&(this.hasUpdated||this.activeIndex!==-1)&&this.updateItems()}updated(){this.syncActiveDescendantElement()}loaded(){this.getAllItems(),p(this)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect(),N(this)}setFloatingElSize(){let{referenceEl:t,floatingEl:e}=this;!t||!e||(e.style.inlineSize=`${t.clientWidth}px`)}handleGlobalAttributesChanged(){this.requestUpdate()}handleDisabledChange(t){t||(this.open=!1)}selectedItemsHandler(){this.items.forEach(t=>t.selected=t.value===this.value)}openHandler(){if(this.disabled){this.open=!1;return}this.open||(this.activeIndex=-1),U(this),this.setFloatingElSize(),this.reposition(!0)}async documentClickHandler(t){this.disabled||t.composedPath().includes(this.el)||(this.open=!1)}async handleAutocompleteItemSelect(t){this.value=t.target.value,this.selectedItemsHandler(),this.emitChange(),await this.setFocus(),this.open=!1}handleAutocompleteItemChange(t){t.stopPropagation(),this.items.length&&(this.updateItems(),this.requestUpdate())}onLabelClick(){this.setFocus()}onBeforeOpen(){this.calciteAutocompleteBeforeOpen.emit(),this.topLayer.show()}onOpen(){this.calciteAutocompleteOpen.emit()}onBeforeClose(){this.calciteAutocompleteBeforeClose.emit()}onClose(){this.calciteAutocompleteClose.emit(),this.topLayer.hide()}emitChange(){this.calciteAutocompleteChange.emit()}updateGroups(){this.groups.forEach((t,e,a)=>{t.scale=this.scale,t.position=e,e===0&&(t.disableSpacing=!0);let i=a[e+1];i&&(i.disableSpacing=t.children.length===0)})}updateItems(){this.value&&this.selectedItemsHandler(),this.items.forEach(t=>{t.scale=this.scale,t.inputValueMatchPattern=this.inputValueMatchPattern}),this.enabledItems.forEach((t,e)=>{let a=e===this.activeIndex;t.active=a}),this.syncActiveDescendantElement()}syncActiveDescendantElement(){let t=this.enabledItems[this.activeIndex];this.activeDescendantElement=t?this.listboxOptionRefs.get(t.guid)?.value:void 0}handleInputFocus(){this.open=!0}handleInputClear(){this.open=!0}handleFocusOut(t){t.relatedTarget instanceof Node&&this.el.contains(t.relatedTarget)||(this.open=!1)}handleContentMouseDown(t){for(let e of t.composedPath()){if(e===t.currentTarget)break;if(e instanceof Element&&z(e,L))return}t.preventDefault()}handleContentTopSlotChange(t){this.hasContentTop=g(t)}handleContentBottomSlotChange(t){this.hasContentBottom=g(t)}handleDefaultSlotChange(){this.getAllItems()}handleAutocompleteItemGroupItemsChange(t){t.stopPropagation(),this.getAllItems()}getAllItems(){let t=this.defaultSlotRef.value?b(this.defaultSlotRef.value,tt):Array.from(this.el.children).filter(W),e=this.defaultSlotRef.value?b(this.defaultSlotRef.value,et):Array.from(this.el.children).filter(y),a=t.flatMap(n=>n.items??[]),i=Array.from(new Set([...e,...a].filter(y)));this.groups=t,this.items=i,this.removeStaleListboxOptionRefs(i),this.updateItems(),this.updateGroups()}removeStaleListboxOptionRefs(t){let e=new Set(t.map(a=>a.guid));this.listboxOptionRefs.forEach((a,i)=>{e.has(i)||this.listboxOptionRefs.delete(i)})}getListboxOptionRef(t){let e=this.listboxOptionRefs.get(t.guid);return e||(e=h(),this.listboxOptionRefs.set(t.guid,e)),e}setReferenceEl(t){O(this.resizeObserver,this.referenceEl,t),this.referenceEl=t,p(this)}keyDownHandler(t){let{defaultPrevented:e,key:a}=t;if(e)return;let{open:i,activeIndex:n,enabledItems:s}=this,$=s.length&&n>-1?s[n]:null;switch(a){case"Escape":i&&(this.open=!1,t.preventDefault());break;case"Tab":this.open=!1;break;case"Enter":i&&$?($.requestSelection(),this.open=!1,t.preventDefault()):!t.defaultPrevented&&this.formSupport.active&&(t.preventDefault(),this.formSupport.requestSubmit());break;case"ArrowDown":s.length&&(this.open=!0,this.activeIndex=n!==-1?Math.min(n+1,s.length-1):0,this.scrollToActiveItem(),t.preventDefault());break;case"ArrowUp":s.length&&(this.open=!0,this.activeIndex=n!==-1?Math.max(n-1,0):s.length-1,this.scrollToActiveItem(),t.preventDefault());break;case"Home":s.length&&(this.open=!0,this.activeIndex=0,this.scrollToActiveItem(),t.preventDefault());break;case"End":s.length&&(this.open=!0,this.activeIndex=s.length-1,this.scrollToActiveItem(),t.preventDefault());break}}scrollToActiveItem(){this.enabledItems[this.activeIndex]?.scrollIntoView({block:"nearest"})}changeHandler(t){t.stopPropagation(),this.inputValue=t.target.value,this.calciteAutocompleteTextChange.emit()}inputClickHandler(t){t.defaultPrevented||(this.open=!0)}inputHandler(t){t.stopPropagation(),this.inputValue=t.target.value,this.open=this.inputValue?.length>0,this.calciteAutocompleteTextInput.emit()}setFloatingEl(t){this.floatingEl=t,p(this)}render(){let{disabled:t,isOpen:e}=this,a=this.el.autofocus,i=this.el.enterKeyHint,n=this.el.inputMode;return this.interactiveContainer({disabled:t,children:d`${this.labelText&&K({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div class=${r(o.inputContainer)}><calcite-input .alignment=${this.alignment} .aria=${{activeDescendantElement:this.activeDescendantElement,autoComplete:"list",controlsElements:this.listboxRef.value?[this.listboxRef.value]:void 0,expanded:e,hasPopup:"listbox",label:I(this)}} .autocomplete=${this.autocomplete} .autofocus=${a} class=${r(o.input)} clearable .disabled=${t} enterkeyhint=${i??m} .form=${this.form} .icon=${this.icon??!0} .iconFlipRtl=${this.iconFlipRtl} inputmode=${n??m} .inputRole=${"combobox"} .label=${this.label} .loading=${this.loading} .maxLength=${this.maxLength} .messageOverrides=${this.messages} .minLength=${this.minLength} .name=${this.name} @calciteInputChange=${this.changeHandler} @calciteInputInput=${this.inputHandler} @calciteInternalInputFocus=${this.handleInputFocus} @click=${this.inputClickHandler} @keydown=${this.keyDownHandler} .pattern=${this.pattern} .placeholder=${this.placeholder} .prefixText=${this.prefixText} .readOnly=${this.readOnly} .required=${this.required} .scale=${this.scale} .status=${this.status} .suffixText=${this.suffixText} type=search .value=${this.inputValue} ${c(this.setReferenceEl)}></calcite-input>${this.renderListBox()}<div class=${r({[o.contentContainer]:!0,[o.floatingUIContainer]:!0,[o.floatingUIContainerActive]:e})} popover=manual ${c(this.setFloatingEl)}><div class=${r({[o.contentAnimation]:!0,[x.animation]:!0,[x.animationActive]:e})} ${c(this.transitionRef)}><div class=${r({[o.content]:!0,[o.contentHidden]:!e})} @mousedown=${this.handleContentMouseDown}><slot name=${J.contentTop} @slotchange=${this.handleContentTopSlotChange}></slot><slot aria-hidden=true @slotchange=${this.handleDefaultSlotChange} ${c(this.defaultSlotRef)}></slot><slot name=${J.contentBottom} @slotchange=${this.handleContentBottomSlotChange}></slot></div></div></div></div>${this.validationMessage&&this.status==="invalid"?_({icon:this.validationIcon,id:X.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}renderListBox(){return d`<ul .ariaLabel=${I(this)} aria-live=polite class=${r(S.screenReaderText)} id=${this.listId??m} role=listbox tabindex=-1 ${c(this.listboxRef)}>${this.renderListBoxOptions()}</ul>`}renderListBoxOptions(){return V(this.items.filter(t=>!!(t.label||t.heading)),t=>t.guid,t=>d`<li .ariaDisabled=${t.disabled} .ariaLabel=${t.label} .ariaSelected=${t.selected} role=option tabindex=-1 ${c(this.getListboxOptionRef(t))}>${t.heading}${t.description}</li>`)}};T("calcite-autocomplete",C);export{C as Autocomplete};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{h as b}from"./UJEP6JO7.js";import{b as y}from"./WTNYMVTD.js";import{a as p}from"./SPMNI4RN.js";import{j as c}from"./EWU2U6MC.js";import{a as g}from"./JN6YLTUP.js";import{a as f}from"./IUWTLP2K.js";import"./VMHJHFFS.js";import"./KNHRMOQB.js";import"./BPZZDPGH.js";import{m as v}from"./RRBGCYLX.js";import{G as h,H as t,K as o,T as u,g as n,h as d,p as a}from"./WWTG7ZPG.js";var x=n`:host([disabled]){opacity:var(--calcite-opacity-disabled);cursor:default;-webkit-user-select:none;user-select:none}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{cursor:pointer;display:flex;position:relative;outline:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:var(--calcite-opacity-full)}.interaction-container{display:contents}.day-wrapper{display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;inline-size:100%}.day{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);display:flex;align-items:center;justify-content:center;inline-size:100%;position:relative;line-height:var(--calcite-font-line-height-fixed-base);block-size:var(--calcite-internal-day-size);outline-color:var(--calcite-color-transparent);background-color:var(--calcite-date-picker-day-background-color);color:var(--calcite-date-picker-day-text-color, var(--calcite-color-text-1))}.text{margin-block:var(--calcite-space-px) var(--calcite-space-none);margin-inline-start:0px}:host([scale=s]){--calcite-internal-day-size: 32px}:host([scale=s]) .day{font-size:var(--calcite-font-size-relative-sm)}:host([scale=m]){--calcite-internal-day-size: 40px}:host([scale=m]) .day{font-size:var(--calcite-font-size-relative-base)}:host([scale=l]){--calcite-internal-day-size: 44px}:host([scale=l]) .day{font-size:var(--calcite-font-size-relative-md)}:host(:not([current-month])) .day{opacity:var(--calcite-opacity-full);color:var(--calcite-color-text-3)}:host(:focus:not([disabled]):not([selected]):not([current-month])) .day{color:var(--calcite-color-text-1)}:host(:hover:not([disabled]):not([selected])) .day{background-color:var(--calcite-date-picker-day-background-color-hover, var(--calcite-theme-color-surface-3, var(--calcite-color-foreground-2)));color:var(--calcite-date-picker-day-text-color-hover, var(--calcite-color-text-1))}:host(:not([range]):not([selected]).current-day) .day{color:var(--calcite-date-picker-current-day-text-color, var(--calcite-color-brand));font-weight:var(--calcite-font-weight-bold)}:host(:focus[selected]) .day{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-space-base) * (1 - 2 * clamp(0,var(--calcite-offset-invert-focus),1)));z-index:var(--calcite-z-index);box-shadow:0 0 0 2px var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1))}:host(:focus:not([disabled]):not([selected])) .day{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(-1 * var(--calcite-space-base) * (1 - 2 * clamp(0,var(--calcite-offset-invert-focus),1)))}:host(:hover:not([disabled]):not([selected])) .day{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(-1 * var(--calcite-space-base) * (1 - 2 * clamp(0,var(--calcite-offset-invert-focus),1)))}:host([selected]) .day{font-weight:var(--calcite-font-weight-medium);background-color:var(--calcite-date-picker-day-background-color-selected, var(--calcite-color-brand));color:var(--calcite-date-picker-day-text-color-selected, var(--calcite-color-text-inverse))}:host([range-hover]:not([selected])) .day{background-color:var(--calcite-date-picker-day-outside-range-background-color-hover, var(--calcite-theme-color-surface-3, var(--calcite-color-foreground-2)));color:var(--calcite-date-picker-day-outside-range-text-color-hover, var(--calcite-color-text-1))}:host([highlighted]:not([selected])) .day,:host(:hover[highlighted]:not([selected])) .day{color:var(--calcite-date-picker-day-range-text-color, var(--calcite-color-text-highlight));background-color:var(--calcite-date-picker-day-range-background-color, var(--calcite-color-surface-highlight))}:host([disabled]) .day{color:var(--calcite-color-text-2);text-decoration-line:line-through;opacity:var(--calcite-opacity-disabled)}@media(forced-colors:active){.day{border-radius:var(--calcite-corner-radius-none)}:host([selected]){outline:2px solid canvasText}:host(:hover:not([selected])) .day{border-radius:50%}:host([range][selected]) .day,:host([highlighted]) .day,:host([range-hover]:not([selected])) .day{background-color:highlight}:host([range-hover]) .day,:host([range][selected][start-of-range]) .day,:host([range][selected][end-of-range]) .day{background-color:canvas}}:host([hidden]){display:none}[hidden]{display:none}`,r={dayWrapper:"day-wrapper",day:"day",text:"text"},i=class extends h{constructor(){super(),this.focusSetter=f()(this).setFocus,this.interactiveContainer=p(this),this.active=!1,this.currentMonth=!1,this.disabled=!1,this.endOfRange=!1,this.highlighted=!1,this.range=!1,this.rangeHover=!1,this.selected=!1,this.startOfRange=!1,this.calciteInternalDayHover=a({cancelable:!1}),this.calciteInternalDaySelect=a({cancelable:!1}),this.listen("pointerover",this.pointerOverHandler),this.listen("click",this.onClick),this.listen("keydown",this.keyDownHandler)}static{this.properties={active:[7,{},{reflect:!0,type:Boolean}],currentMonth:[7,{},{reflect:!0,type:Boolean}],dateTimeFormat:[0,{},{attribute:!1}],day:[9,{},{type:Number}],disabled:[7,{},{reflect:!0,type:Boolean}],endOfRange:[7,{},{reflect:!0,type:Boolean}],highlighted:[7,{},{reflect:!0,type:Boolean}],range:[7,{},{reflect:!0,type:Boolean}],rangeHover:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],startOfRange:[7,{},{reflect:!0,type:Boolean}],value:[0,{},{attribute:!1}]}}static{this.styles=x}async setFocus(e){return this.focusSetter(()=>this.el,e)}load(){this.parentDatePickerEl=v(this.el,"calcite-date-picker")??void 0}onClick(){this.disabled||this.calciteInternalDaySelect.emit()}keyDownHandler(e){g(e.key)&&(this.disabled||this.calciteInternalDaySelect.emit(),e.preventDefault())}pointerOverHandler(){this.disabled||this.calciteInternalDayHover.emit()}render(){let e=b(this.value).replaceAll("-","");if(this.parentDatePickerEl){let{numberingSystem:l,lang:s}=this.parentDatePickerEl;c.numberFormatOptions={useGrouping:!1,...l&&{numberingSystem:l},...s&&{locale:s}}}let m=c.localize(String(this.day)),k=this.dateTimeFormat.format(this.value)??null;return this.el.ariaLabel=k,this.el.ariaSelected=y(this.active),o(this.el,"id",e),this.el.role="gridcell",o(this.el,"tabIndex",this.active&&!this.disabled?0:-1),this.interactiveContainer({disabled:this.disabled,children:d`<div aria-hidden=true class=${t(r.dayWrapper)}><span class=${t(r.day)}><span class=${t(r.text)}>${m}</span></span></div>`})}};u("calcite-date-picker-day",i);export{i as DatePickerDay};
2
+ import{h as b}from"./PNMA4F7B.js";import{b as y}from"./WTNYMVTD.js";import{a as p}from"./LQASX2YS.js";import{j as c}from"./ZYJFXSDN.js";import{a as g}from"./JN6YLTUP.js";import{a as f}from"./3GHBWG5F.js";import"./VMHJHFFS.js";import"./XJJYF3O2.js";import"./M7WEPGCG.js";import{m as v}from"./RRBGCYLX.js";import{G as h,H as t,K as o,T as u,g as n,h as d,p as a}from"./KYNZ6MSZ.js";var x=n`:host([disabled]){opacity:var(--calcite-opacity-disabled);cursor:default;-webkit-user-select:none;user-select:none}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{cursor:pointer;display:flex;position:relative;outline:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:var(--calcite-opacity-full)}.interaction-container{display:contents}.day-wrapper{display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;inline-size:100%}.day{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);display:flex;align-items:center;justify-content:center;inline-size:100%;position:relative;line-height:var(--calcite-font-line-height-fixed-base);block-size:var(--calcite-internal-day-size);outline-color:var(--calcite-color-transparent);background-color:var(--calcite-date-picker-day-background-color);color:var(--calcite-date-picker-day-text-color, var(--calcite-color-text-1))}.text{margin-block:var(--calcite-space-px) var(--calcite-space-none);margin-inline-start:0px}:host([scale=s]){--calcite-internal-day-size: 32px}:host([scale=s]) .day{font-size:var(--calcite-font-size-relative-sm)}:host([scale=m]){--calcite-internal-day-size: 40px}:host([scale=m]) .day{font-size:var(--calcite-font-size-relative-base)}:host([scale=l]){--calcite-internal-day-size: 44px}:host([scale=l]) .day{font-size:var(--calcite-font-size-relative-md)}:host(:not([current-month])) .day{opacity:var(--calcite-opacity-full);color:var(--calcite-color-text-3)}:host(:focus:not([disabled]):not([selected]):not([current-month])) .day{color:var(--calcite-color-text-1)}:host(:hover:not([disabled]):not([selected])) .day{background-color:var(--calcite-date-picker-day-background-color-hover, var(--calcite-theme-color-surface-3, var(--calcite-color-foreground-2)));color:var(--calcite-date-picker-day-text-color-hover, var(--calcite-color-text-1))}:host(:not([range]):not([selected]).current-day) .day{color:var(--calcite-date-picker-current-day-text-color, var(--calcite-color-brand));font-weight:var(--calcite-font-weight-bold)}:host(:focus[selected]) .day{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-space-base) * (1 - 2 * clamp(0,var(--calcite-offset-invert-focus),1)));z-index:var(--calcite-z-index);box-shadow:0 0 0 2px var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1))}:host(:focus:not([disabled]):not([selected])) .day{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(-1 * var(--calcite-space-base) * (1 - 2 * clamp(0,var(--calcite-offset-invert-focus),1)))}:host(:hover:not([disabled]):not([selected])) .day{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(-1 * var(--calcite-space-base) * (1 - 2 * clamp(0,var(--calcite-offset-invert-focus),1)))}:host([selected]) .day{font-weight:var(--calcite-font-weight-medium);background-color:var(--calcite-date-picker-day-background-color-selected, var(--calcite-color-brand));color:var(--calcite-date-picker-day-text-color-selected, var(--calcite-color-text-inverse))}:host([range-hover]:not([selected])) .day{background-color:var(--calcite-date-picker-day-outside-range-background-color-hover, var(--calcite-theme-color-surface-3, var(--calcite-color-foreground-2)));color:var(--calcite-date-picker-day-outside-range-text-color-hover, var(--calcite-color-text-1))}:host([highlighted]:not([selected])) .day,:host(:hover[highlighted]:not([selected])) .day{color:var(--calcite-date-picker-day-range-text-color, var(--calcite-color-text-highlight));background-color:var(--calcite-date-picker-day-range-background-color, var(--calcite-color-surface-highlight))}:host([disabled]) .day{color:var(--calcite-color-text-2);text-decoration-line:line-through;opacity:var(--calcite-opacity-disabled)}@media(forced-colors:active){.day{border-radius:var(--calcite-corner-radius-none)}:host([selected]){outline:2px solid canvasText}:host(:hover:not([selected])) .day{border-radius:50%}:host([range][selected]) .day,:host([highlighted]) .day,:host([range-hover]:not([selected])) .day{background-color:highlight}:host([range-hover]) .day,:host([range][selected][start-of-range]) .day,:host([range][selected][end-of-range]) .day{background-color:canvas}}:host([hidden]){display:none}[hidden]{display:none}`,r={dayWrapper:"day-wrapper",day:"day",text:"text"},i=class extends h{constructor(){super(),this.focusSetter=f()(this).setFocus,this.interactiveContainer=p(this),this.active=!1,this.currentMonth=!1,this.disabled=!1,this.endOfRange=!1,this.highlighted=!1,this.range=!1,this.rangeHover=!1,this.selected=!1,this.startOfRange=!1,this.calciteInternalDayHover=a({cancelable:!1}),this.calciteInternalDaySelect=a({cancelable:!1}),this.listen("pointerover",this.pointerOverHandler),this.listen("click",this.onClick),this.listen("keydown",this.keyDownHandler)}static{this.properties={active:[7,{},{reflect:!0,type:Boolean}],currentMonth:[7,{},{reflect:!0,type:Boolean}],dateTimeFormat:[0,{},{attribute:!1}],day:[9,{},{type:Number}],disabled:[7,{},{reflect:!0,type:Boolean}],endOfRange:[7,{},{reflect:!0,type:Boolean}],highlighted:[7,{},{reflect:!0,type:Boolean}],range:[7,{},{reflect:!0,type:Boolean}],rangeHover:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],startOfRange:[7,{},{reflect:!0,type:Boolean}],value:[0,{},{attribute:!1}]}}static{this.styles=x}async setFocus(e){return this.focusSetter(()=>this.el,e)}load(){this.parentDatePickerEl=v(this.el,"calcite-date-picker")??void 0}onClick(){this.disabled||this.calciteInternalDaySelect.emit()}keyDownHandler(e){g(e.key)&&(this.disabled||this.calciteInternalDaySelect.emit(),e.preventDefault())}pointerOverHandler(){this.disabled||this.calciteInternalDayHover.emit()}render(){let e=b(this.value).replaceAll("-","");if(this.parentDatePickerEl){let{numberingSystem:l,lang:s}=this.parentDatePickerEl;c.numberFormatOptions={useGrouping:!1,...l&&{numberingSystem:l},...s&&{locale:s}}}let m=c.localize(String(this.day)),k=this.dateTimeFormat.format(this.value)??null;return this.el.ariaLabel=k,this.el.ariaSelected=y(this.active),o(this.el,"id",e),this.el.role="gridcell",o(this.el,"tabIndex",this.active&&!this.disabled?0:-1),this.interactiveContainer({disabled:this.disabled,children:d`<div aria-hidden=true class=${t(r.dayWrapper)}><span class=${t(r.day)}><span class=${t(r.text)}>${m}</span></span></div>`})}};u("calcite-date-picker-day",i);export{i as DatePickerDay};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as I}from"./BBZC3BBE.js";import{a as T}from"./CASNTUXN.js";import{b as w}from"./6FZVJGKC.js";import{c as D}from"./7XS2SBMV.js";import{a as A,d as E}from"./HJHRSII7.js";import{a as d,b as p,c as x,d as $}from"./TJGNWJF6.js";import{c as b}from"./Y2QT4M6Q.js";import"./2IM7ZZ7U.js";import{a as y}from"./IUWTLP2K.js";import"./VMHJHFFS.js";import"./KNHRMOQB.js";import"./BPZZDPGH.js";import{B as l}from"./RRBGCYLX.js";import{E as g,F as u,G as O,H as v,T as P,g as S,h,l as f,p as c}from"./WWTG7ZPG.js";var L=S`:host([scale=s]){--calcite-internal-action-menu-gap: var( --calcite-action-menu-items-space, var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs)) );--calcite-internal-action-menu-padding: var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs))}:host([scale=m]){--calcite-internal-action-menu-gap: var( --calcite-action-menu-items-space, var(--calcite-theme-space-sm, var(--calcite-spacing-sm)) );--calcite-internal-action-menu-padding: var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=l]){--calcite-internal-action-menu-gap: var( --calcite-action-menu-items-space, var(--calcite-theme-space-sm-plus, var(--calcite-spacing-sm-plus)) );--calcite-internal-action-menu-padding: var(--calcite-theme-space-sm-plus, var(--calcite-spacing-sm-plus))}:host{font-size:var(--calcite-font-size-relative-lg);box-sizing:border-box;display:flex;flex-direction:column}::slotted(calcite-action-group:not(:last-of-type)){border-block-end-width:var(--calcite-border-width-sm);padding-block-end:var(--calcite-internal-action-menu-padding)}.default-trigger{position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}slot[name=trigger]::slotted(calcite-action),calcite-action::slotted([slot=trigger]){position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}.menu{outline:var(--calcite-border-width-md) solid transparent;outline-offset:var(--calcite-border-width-md);display:flex;flex-direction:column;flex-wrap:nowrap;overflow-y:auto;overflow-x:hidden;max-block-size:45vh;gap:var(--calcite-internal-action-menu-gap);padding:var(--calcite-internal-action-menu-padding)}:host([hidden]){display:none}[hidden]{display:none}`,H=["ArrowUp","ArrowDown","End","Home"],_=["ArrowLeft","ArrowRight"],k=["ArrowUp","ArrowDown"],N=[..._,...k],R=["left","right","leading","trailing"],F=["top","bottom"],M=class extends O{constructor(){super(),this.guid=T(),this._actions=[],this.navigableActions=[],this.defaultSlotRef=g(),this.triggerSlotRef=g(),this.menuButtonClick=()=>{this.toggleOpen()},this.menuButtonId=p.button(this.guid),this.handleDocumentMouseDown=t=>{this.open&&!t.composedPath().includes(this.el)&&(this.focusMenuButtonOnClose=!1)},this.handleDocumentFocusIn=t=>{let e=t.composedPath();this.menuHasFocus=this.navigableActions.some(n=>e.includes(n))},this.menuButtonKeyDown=t=>{let{defaultPrevented:e,key:n}=t,{navigableActions:i}=this;if(e||!i.length||this.isValidKey(n,N)&&t.composedPath().some(r=>r instanceof Element&&D(r)))return;let o=this.placementOrientation,a=o==="horizontal"?_:o==="vertical"||!o?k:void 0;!a||!this.isValidKey(n,a)||(t.preventDefault(),this.toggleOpen(!0),this.activeMenuItemIndex=n==="ArrowDown"||n==="ArrowRight"?0:i.length-1,this.updateActions(i),this.setFocus())},this.menuKeyDown=t=>{let{key:e}=t,{navigableActions:n}=this;if(n.length){if(e==="Tab"){this.focusMenuButtonOnClose=!1,this.restoreMenuButtonTabIndexOnClose=!1,this.open=!1,this.menuButtonTabIndexFrame=requestAnimationFrame(()=>{this.menuButtonTabIndexFrame=void 0,this.open||this.restoreMenuButtonTabIndex(),this.restoreMenuButtonTabIndexOnClose=!0});return}if(e==="Escape"){this.focusMenuButtonOnClose=!0,this.restoreMenuButtonTabIndexOnClose=!0,this.toggleOpen(!1),t.preventDefault();return}this.handleActionNavigation(t,e,n)}},this.menuId=p.menu(this.guid),this._open=!1,this.updateAction=(t,e)=>{let{guid:n,activeMenuItemIndex:i,open:o}=this,a=p.action(n,e);t.tabIndex=o&&e===i?0:-1,t.aria={...t.aria,checked:void 0,label:t.label||t.text,role:"menuitem"},t.ariaChecked=null,t.id||(t.id=a)},this.focusSetter=y()(this).setFocus,this.focusMenuButtonOnClose=!0,this.menuHasFocus=!1,this.restoreMenuButtonTabIndexOnClose=!0,this.mouseDownHandler=t=>{t.composedPath().some(e=>e instanceof Element&&b(e))&&(this.focusMenuButtonOnClose=!1,this.activeMenuItemIndex=this.navigableActions.findIndex(e=>e===t.target))},this.handleActionFocus=t=>{let e=this.navigableActions.findIndex(n=>t.composedPath().includes(n));e!==-1&&(this.activeMenuItemIndex=e)},this.activeMenuItemIndex=-1,this.appearance="solid",this.expanded=!1,this.overlayPositioning="absolute",this.placement="auto",this.topLayerDisabled=!1,this.scale="m",this.calciteActionMenuCollapse=c({cancelable:!1}),this.calciteActionMenuExpand=c({cancelable:!1}),this.calciteActionMenuOpen=c({cancelable:!1}),this.calciteInternalActionMenuActionsChange=c({cancelable:!1}),this.listen("calciteInternalActionGroupActionsChange",this.handleActionGroupActionsChange)}static{this.properties={activeMenuItemIndex:[16,{},{state:!0}],menuButtonEl:[16,{},{state:!0}],appearance:[3,{},{reflect:!0}],expanded:[7,{},{reflect:!0,type:Boolean}],flipPlacements:[0,{},{attribute:!1}],label:1,open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],actions:[32,{},{attribute:!1,readOnly:!0}]}}static{this.styles=L}get placementOrientation(){let e=(this.flipPlacements?.length?this.flipPlacements:[this.placement]).find(n=>this.hasPlacementPrefix(n,R.concat(F)));if(e){if(this.hasPlacementPrefix(e,R))return"horizontal";if(this.hasPlacementPrefix(e,F))return"vertical"}}get open(){return this._open}set open(t){let e=this._open;t!==e&&(this._open=t,this.openHandler(t))}get actions(){return this._actions}async setFocus(t){return this.open?(await this.updateComplete,this.open?this.navigableActions[this.activeMenuItemIndex]?.setFocus({preventScroll:!0,...t}):void 0):this.focusSetter(()=>this.menuButtonEl||this.el,t)}connectedCallback(){super.connectedCallback(),this.connectMenuButtonEl(),this.listen("mousedown",this.mouseDownHandler),this.listenOn(document,"focusin",this.handleDocumentFocusIn),this.listenOn(document,"mousedown",this.handleDocumentMouseDown)}willUpdate(t){t.has("expanded")&&(this.hasUpdated||this.expanded!==!1)&&this.expandedHandler(),t.has("activeMenuItemIndex")&&(this.hasUpdated||this.activeMenuItemIndex!==-1)&&this.updateActions(this.navigableActions),t.has("expanded")&&this.hasUpdated&&(this.expanded?this.calciteActionMenuExpand.emit():this.calciteActionMenuCollapse.emit())}disconnectedCallback(){super.disconnectedCallback(),this.menuButtonTabIndexFrame!=null&&(cancelAnimationFrame(this.menuButtonTabIndexFrame),this.menuButtonTabIndexFrame=void 0),this.disconnectMenuButtonEl()}expandedHandler(){this.open=!1,this.setTooltipReferenceElement()}focusMenuButton(t){return this.focusSetter(()=>this.menuButtonEl,t)}openHandler(t){this.menuButtonEl&&(this.menuButtonEl.active=t,this.syncMenuButtonAria()),this.popoverEl&&(this.popoverEl.open=t),this.activeMenuItemIndex=this.open?0:-1,this.updateActions(this.navigableActions),t?this.disableMenuButtonTabStop():this.restoreMenuButtonTabIndexOnClose&&this.restoreMenuButtonTabIndex(),this.calciteActionMenuOpen.emit(),this.setTooltipReferenceElement()}connectMenuButtonEl(){let{menuButtonId:t,open:e,label:n}=this,i=this.slottedMenuButtonEl||this.defaultMenuButtonEl;this.menuButtonEl!==i&&(this.disconnectMenuButtonEl(),this.menuButtonEl=i,this.popoverEl&&i&&(this.popoverEl.referenceElement=i,this.popoverEl.referenceEl=i,this.open&&this.popoverEl.reposition(!0)),this.setTooltipReferenceElement(),i&&(i.active=e,this.syncMenuButtonAria(),e&&this.disableMenuButtonTabStop(),i.id||(i.id=t),i.label||(i.label=n),i.text||(i.text=n),i.addEventListener("click",this.menuButtonClick),i.addEventListener("keydown",this.menuButtonKeyDown)))}disconnectMenuButtonEl(){let{menuButtonEl:t}=this;t&&(this.restoreMenuButtonTabIndex(),t.removeEventListener("click",this.menuButtonClick),t.removeEventListener("keydown",this.menuButtonKeyDown),this.menuButtonEl=void 0)}disableMenuButtonTabStop(){let{menuButtonEl:t}=this;t&&(this.menuButtonTabIndex===void 0&&(this.menuButtonTabIndex=t.getAttribute("tabindex")),t.tabIndex=-1)}restoreMenuButtonTabIndex(){let{menuButtonEl:t,menuButtonTabIndex:e}=this;!t||e===void 0||(e===null?t.removeAttribute("tabindex"):t.setAttribute("tabindex",e),this.menuButtonTabIndex=void 0)}syncActions(){let t=this.navigableActions[this.activeMenuItemIndex],e=this.activeMenuItemIndex,n=this.menuHasFocus,i=this.triggerSlotRef.value,o=i?l(i,"calcite-action").filter(s=>!s.classList.contains(d.defaultTrigger)):[],a=new Set(o),r=this.defaultSlotRef.value?l(this.defaultSlotRef.value).flatMap(s=>b(s)?s:s instanceof HTMLSlotElement?l(s,"calcite-action"):E(s)?s.actions:[]):[],m=[],B=new Set;[...o,...r].forEach(s=>{B.has(s)||(B.add(s),m.push(s))}),this._actions=m,this.navigableActions=m.filter(s=>!a.has(s)&&!s.disabled&&!s.hidden);let C=this.navigableActions.indexOf(t);!this.open||!this.navigableActions.length?this.activeMenuItemIndex=-1:C!==-1?this.activeMenuItemIndex=C:e<0?this.activeMenuItemIndex=0:this.activeMenuItemIndex=Math.min(e,this.navigableActions.length-1),this.updateActions(this.navigableActions),n&&(this.navigableActions.length?this.setFocus():(this.open=!1,this.focusMenuButton()))}setMenuButtonEl(){this.slottedMenuButtonEl=this.triggerSlotRef.value?l(this.triggerSlotRef.value,"calcite-action")[0]:void 0,this.connectMenuButtonEl()}syncMenuButtonAria(){let{menuButtonEl:t,open:e}=this;t&&(t.aria={...t.aria,expanded:e,hasPopup:"menu"})}syncActionsAndEmitChange(){this.syncActions(),this.calciteInternalActionMenuActionsChange.emit()}handleTriggerSlotChange(){this.setMenuButtonEl(),this.syncActionsAndEmitChange()}setDefaultMenuButtonEl(t){this.defaultMenuButtonEl=t,this.connectMenuButtonEl()}setPopoverEl(t){t&&(this.popoverEl=t,this.menuButtonEl&&(t.referenceElement=this.menuButtonEl,t.referenceEl=this.menuButtonEl),t.open=this.open)}handleCalciteActionClick(t){let e=this.navigableActions.find(a=>t.composedPath().includes(a));if(!e)return;this.activeMenuItemIndex=this.navigableActions.indexOf(e),this.focusMenuButtonOnClose=!1;let n=e.closest("calcite-action-group"),i=e.slot===A.menuActions&&n?.selectionMode==="none"&&!!n.closest("calcite-action-bar"),o=!!n&&n.selectionMode!=="none"&&n.actions.includes(e)&&e.slot!==A.menuActions;!i&&!o&&(e.active=!e.active),this.open=!1,this.menuHasFocus&&this.setFocus()}updateTooltip(t){let e=t.target.assignedElements({flatten:!0}).filter(w);this.tooltipEl=e[0],this.setTooltipReferenceElement()}setTooltipReferenceElement(){let{tooltipEl:t,expanded:e,menuButtonEl:n,open:i}=this;t&&(t.referenceElement=!e&&!i?n:void 0)}updateActions(t){t?.forEach(this.updateAction)}async handleDefaultSlotChange(){await this.componentOnReady(),this.syncActionsAndEmitChange()}handleActionGroupActionsChange(t){let e=t.target;(this.defaultSlotRef.value?l(this.defaultSlotRef.value).filter(i=>E(i)):[]).includes(e)&&this.syncActionsAndEmitChange()}isValidKey(t,e){return!!e.find(n=>n===t)}hasPlacementPrefix(t,e){return e.some(n=>t===n||t.startsWith(`${n}-`))}handleActionNavigation(t,e,n){if(!this.open||!this.isValidKey(e,H))return;t.preventDefault(),e==="Home"&&(this.activeMenuItemIndex=0),e==="End"&&(this.activeMenuItemIndex=n.length-1);let i=this.activeMenuItemIndex;e==="ArrowUp"&&(this.activeMenuItemIndex=I(Math.max(i-1,-1),n.length)),e==="ArrowDown"&&(this.activeMenuItemIndex=I(i+1,n.length)),this.updateActions(n),this.setFocus()}toggleOpen(t=!this.open){this.open=t}handlePopoverOpen(t){t.stopPropagation(),this.open=!0,this.setFocus()}handlePopoverClose(t){let{focusMenuButtonOnClose:e,menuHasFocus:n}=this;this.focusMenuButtonOnClose=!0,t.stopPropagation(),this.open=!1,e&&n&&this.focusMenuButton()}renderMenuButton(){let{appearance:t,label:e,scale:n,expanded:i,open:o}=this;return h`<slot name=${x.trigger} @slotchange=${this.handleTriggerSlotChange} ${u(this.triggerSlotRef)}><calcite-action .appearance=${t} .aria=${{expanded:o,hasPopup:"menu"}} class=${v(d.defaultTrigger)} .icon=${$.menu} .scale=${n} .text=${e} .textEnabled=${i} ${u(this.setDefaultMenuButtonEl)}></calcite-action></slot>`}renderMenuItems(){let{menuId:t,menuButtonEl:e,label:n,placement:i,overlayPositioning:o,flipPlacements:a}=this;return h`<calcite-popover auto-close .flipPlacements=${a} focus-trap-disabled .label=${n} offset-distance=0 @calcitePopoverClose=${this.handlePopoverClose} @calcitePopoverOpen=${this.handlePopoverOpen} .overlayPositioning=${o} .placement=${i} pointer-disabled .referenceElement=${e} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled} trigger-disabled ${u(this.setPopoverEl)}><div aria-labelledby=${e?.id??f} .ariaOrientation=${this.placementOrientation==="vertical"?"vertical":void 0} class=${v(d.menu)} id=${t??f} @click=${this.handleCalciteActionClick} @focusin=${this.handleActionFocus} @keydown=${this.menuKeyDown} role=menu tabindex=-1><slot @slotchange=${this.handleDefaultSlotChange} ${u(this.defaultSlotRef)}></slot></div></calcite-popover>`}render(){return h`${this.renderMenuButton()}${this.renderMenuItems()}<slot name=${x.tooltip} @slotchange=${this.updateTooltip}></slot>`}};P("calcite-action-menu",M);export{M as ActionMenu};
2
+ import{a as I}from"./BBZC3BBE.js";import{a as T}from"./CASNTUXN.js";import{b as w}from"./6FZVJGKC.js";import{c as D}from"./7XS2SBMV.js";import{a as A,d as E}from"./HJHRSII7.js";import{a as d,b as p,c as x,d as $}from"./TJGNWJF6.js";import{c as b}from"./Y2QT4M6Q.js";import"./2IM7ZZ7U.js";import{a as y}from"./3GHBWG5F.js";import"./VMHJHFFS.js";import"./XJJYF3O2.js";import"./M7WEPGCG.js";import{B as l}from"./RRBGCYLX.js";import{E as g,F as u,G as O,H as v,T as P,g as S,h,l as f,p as c}from"./KYNZ6MSZ.js";var L=S`:host([scale=s]){--calcite-internal-action-menu-gap: var( --calcite-action-menu-items-space, var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs)) );--calcite-internal-action-menu-padding: var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs))}:host([scale=m]){--calcite-internal-action-menu-gap: var( --calcite-action-menu-items-space, var(--calcite-theme-space-sm, var(--calcite-spacing-sm)) );--calcite-internal-action-menu-padding: var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=l]){--calcite-internal-action-menu-gap: var( --calcite-action-menu-items-space, var(--calcite-theme-space-sm-plus, var(--calcite-spacing-sm-plus)) );--calcite-internal-action-menu-padding: var(--calcite-theme-space-sm-plus, var(--calcite-spacing-sm-plus))}:host{font-size:var(--calcite-font-size-relative-lg);box-sizing:border-box;display:flex;flex-direction:column}::slotted(calcite-action-group:not(:last-of-type)){border-block-end-width:var(--calcite-border-width-sm);padding-block-end:var(--calcite-internal-action-menu-padding)}.default-trigger{position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}slot[name=trigger]::slotted(calcite-action),calcite-action::slotted([slot=trigger]){position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}.menu{outline:var(--calcite-border-width-md) solid transparent;outline-offset:var(--calcite-border-width-md);display:flex;flex-direction:column;flex-wrap:nowrap;overflow-y:auto;overflow-x:hidden;max-block-size:45vh;gap:var(--calcite-internal-action-menu-gap);padding:var(--calcite-internal-action-menu-padding)}:host([hidden]){display:none}[hidden]{display:none}`,H=["ArrowUp","ArrowDown","End","Home"],_=["ArrowLeft","ArrowRight"],k=["ArrowUp","ArrowDown"],N=[..._,...k],R=["left","right","leading","trailing"],F=["top","bottom"],M=class extends O{constructor(){super(),this.guid=T(),this._actions=[],this.navigableActions=[],this.defaultSlotRef=g(),this.triggerSlotRef=g(),this.menuButtonClick=()=>{this.toggleOpen()},this.menuButtonId=p.button(this.guid),this.handleDocumentMouseDown=t=>{this.open&&!t.composedPath().includes(this.el)&&(this.focusMenuButtonOnClose=!1)},this.handleDocumentFocusIn=t=>{let e=t.composedPath();this.menuHasFocus=this.navigableActions.some(n=>e.includes(n))},this.menuButtonKeyDown=t=>{let{defaultPrevented:e,key:n}=t,{navigableActions:i}=this;if(e||!i.length||this.isValidKey(n,N)&&t.composedPath().some(r=>r instanceof Element&&D(r)))return;let o=this.placementOrientation,a=o==="horizontal"?_:o==="vertical"||!o?k:void 0;!a||!this.isValidKey(n,a)||(t.preventDefault(),this.toggleOpen(!0),this.activeMenuItemIndex=n==="ArrowDown"||n==="ArrowRight"?0:i.length-1,this.updateActions(i),this.setFocus())},this.menuKeyDown=t=>{let{key:e}=t,{navigableActions:n}=this;if(n.length){if(e==="Tab"){this.focusMenuButtonOnClose=!1,this.restoreMenuButtonTabIndexOnClose=!1,this.open=!1,this.menuButtonTabIndexFrame=requestAnimationFrame(()=>{this.menuButtonTabIndexFrame=void 0,this.open||this.restoreMenuButtonTabIndex(),this.restoreMenuButtonTabIndexOnClose=!0});return}if(e==="Escape"){this.focusMenuButtonOnClose=!0,this.restoreMenuButtonTabIndexOnClose=!0,this.toggleOpen(!1),t.preventDefault();return}this.handleActionNavigation(t,e,n)}},this.menuId=p.menu(this.guid),this._open=!1,this.updateAction=(t,e)=>{let{guid:n,activeMenuItemIndex:i,open:o}=this,a=p.action(n,e);t.tabIndex=o&&e===i?0:-1,t.aria={...t.aria,checked:void 0,label:t.label||t.text,role:"menuitem"},t.ariaChecked=null,t.id||(t.id=a)},this.focusSetter=y()(this).setFocus,this.focusMenuButtonOnClose=!0,this.menuHasFocus=!1,this.restoreMenuButtonTabIndexOnClose=!0,this.mouseDownHandler=t=>{t.composedPath().some(e=>e instanceof Element&&b(e))&&(this.focusMenuButtonOnClose=!1,this.activeMenuItemIndex=this.navigableActions.findIndex(e=>e===t.target))},this.handleActionFocus=t=>{let e=this.navigableActions.findIndex(n=>t.composedPath().includes(n));e!==-1&&(this.activeMenuItemIndex=e)},this.activeMenuItemIndex=-1,this.appearance="solid",this.expanded=!1,this.overlayPositioning="absolute",this.placement="auto",this.topLayerDisabled=!1,this.scale="m",this.calciteActionMenuCollapse=c({cancelable:!1}),this.calciteActionMenuExpand=c({cancelable:!1}),this.calciteActionMenuOpen=c({cancelable:!1}),this.calciteInternalActionMenuActionsChange=c({cancelable:!1}),this.listen("calciteInternalActionGroupActionsChange",this.handleActionGroupActionsChange)}static{this.properties={activeMenuItemIndex:[16,{},{state:!0}],menuButtonEl:[16,{},{state:!0}],appearance:[3,{},{reflect:!0}],expanded:[7,{},{reflect:!0,type:Boolean}],flipPlacements:[0,{},{attribute:!1}],label:1,open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],actions:[32,{},{attribute:!1,readOnly:!0}]}}static{this.styles=L}get placementOrientation(){let e=(this.flipPlacements?.length?this.flipPlacements:[this.placement]).find(n=>this.hasPlacementPrefix(n,R.concat(F)));if(e){if(this.hasPlacementPrefix(e,R))return"horizontal";if(this.hasPlacementPrefix(e,F))return"vertical"}}get open(){return this._open}set open(t){let e=this._open;t!==e&&(this._open=t,this.openHandler(t))}get actions(){return this._actions}async setFocus(t){return this.open?(await this.updateComplete,this.open?this.navigableActions[this.activeMenuItemIndex]?.setFocus({preventScroll:!0,...t}):void 0):this.focusSetter(()=>this.menuButtonEl||this.el,t)}connectedCallback(){super.connectedCallback(),this.connectMenuButtonEl(),this.listen("mousedown",this.mouseDownHandler),this.listenOn(document,"focusin",this.handleDocumentFocusIn),this.listenOn(document,"mousedown",this.handleDocumentMouseDown)}willUpdate(t){t.has("expanded")&&(this.hasUpdated||this.expanded!==!1)&&this.expandedHandler(),t.has("activeMenuItemIndex")&&(this.hasUpdated||this.activeMenuItemIndex!==-1)&&this.updateActions(this.navigableActions),t.has("expanded")&&this.hasUpdated&&(this.expanded?this.calciteActionMenuExpand.emit():this.calciteActionMenuCollapse.emit())}disconnectedCallback(){super.disconnectedCallback(),this.menuButtonTabIndexFrame!=null&&(cancelAnimationFrame(this.menuButtonTabIndexFrame),this.menuButtonTabIndexFrame=void 0),this.disconnectMenuButtonEl()}expandedHandler(){this.open=!1,this.setTooltipReferenceElement()}focusMenuButton(t){return this.focusSetter(()=>this.menuButtonEl,t)}openHandler(t){this.menuButtonEl&&(this.menuButtonEl.active=t,this.syncMenuButtonAria()),this.popoverEl&&(this.popoverEl.open=t),this.activeMenuItemIndex=this.open?0:-1,this.updateActions(this.navigableActions),t?this.disableMenuButtonTabStop():this.restoreMenuButtonTabIndexOnClose&&this.restoreMenuButtonTabIndex(),this.calciteActionMenuOpen.emit(),this.setTooltipReferenceElement()}connectMenuButtonEl(){let{menuButtonId:t,open:e,label:n}=this,i=this.slottedMenuButtonEl||this.defaultMenuButtonEl;this.menuButtonEl!==i&&(this.disconnectMenuButtonEl(),this.menuButtonEl=i,this.popoverEl&&i&&(this.popoverEl.referenceElement=i,this.popoverEl.referenceEl=i,this.open&&this.popoverEl.reposition(!0)),this.setTooltipReferenceElement(),i&&(i.active=e,this.syncMenuButtonAria(),e&&this.disableMenuButtonTabStop(),i.id||(i.id=t),i.label||(i.label=n),i.text||(i.text=n),i.addEventListener("click",this.menuButtonClick),i.addEventListener("keydown",this.menuButtonKeyDown)))}disconnectMenuButtonEl(){let{menuButtonEl:t}=this;t&&(this.restoreMenuButtonTabIndex(),t.removeEventListener("click",this.menuButtonClick),t.removeEventListener("keydown",this.menuButtonKeyDown),this.menuButtonEl=void 0)}disableMenuButtonTabStop(){let{menuButtonEl:t}=this;t&&(this.menuButtonTabIndex===void 0&&(this.menuButtonTabIndex=t.getAttribute("tabindex")),t.tabIndex=-1)}restoreMenuButtonTabIndex(){let{menuButtonEl:t,menuButtonTabIndex:e}=this;!t||e===void 0||(e===null?t.removeAttribute("tabindex"):t.setAttribute("tabindex",e),this.menuButtonTabIndex=void 0)}syncActions(){let t=this.navigableActions[this.activeMenuItemIndex],e=this.activeMenuItemIndex,n=this.menuHasFocus,i=this.triggerSlotRef.value,o=i?l(i,"calcite-action").filter(s=>!s.classList.contains(d.defaultTrigger)):[],a=new Set(o),r=this.defaultSlotRef.value?l(this.defaultSlotRef.value).flatMap(s=>b(s)?s:s instanceof HTMLSlotElement?l(s,"calcite-action"):E(s)?s.actions:[]):[],m=[],B=new Set;[...o,...r].forEach(s=>{B.has(s)||(B.add(s),m.push(s))}),this._actions=m,this.navigableActions=m.filter(s=>!a.has(s)&&!s.disabled&&!s.hidden);let C=this.navigableActions.indexOf(t);!this.open||!this.navigableActions.length?this.activeMenuItemIndex=-1:C!==-1?this.activeMenuItemIndex=C:e<0?this.activeMenuItemIndex=0:this.activeMenuItemIndex=Math.min(e,this.navigableActions.length-1),this.updateActions(this.navigableActions),n&&(this.navigableActions.length?this.setFocus():(this.open=!1,this.focusMenuButton()))}setMenuButtonEl(){this.slottedMenuButtonEl=this.triggerSlotRef.value?l(this.triggerSlotRef.value,"calcite-action")[0]:void 0,this.connectMenuButtonEl()}syncMenuButtonAria(){let{menuButtonEl:t,open:e}=this;t&&(t.aria={...t.aria,expanded:e,hasPopup:"menu"})}syncActionsAndEmitChange(){this.syncActions(),this.calciteInternalActionMenuActionsChange.emit()}handleTriggerSlotChange(){this.setMenuButtonEl(),this.syncActionsAndEmitChange()}setDefaultMenuButtonEl(t){this.defaultMenuButtonEl=t,this.connectMenuButtonEl()}setPopoverEl(t){t&&(this.popoverEl=t,this.menuButtonEl&&(t.referenceElement=this.menuButtonEl,t.referenceEl=this.menuButtonEl),t.open=this.open)}handleCalciteActionClick(t){let e=this.navigableActions.find(a=>t.composedPath().includes(a));if(!e)return;this.activeMenuItemIndex=this.navigableActions.indexOf(e),this.focusMenuButtonOnClose=!1;let n=e.closest("calcite-action-group"),i=e.slot===A.menuActions&&n?.selectionMode==="none"&&!!n.closest("calcite-action-bar"),o=!!n&&n.selectionMode!=="none"&&n.actions.includes(e)&&e.slot!==A.menuActions;!i&&!o&&(e.active=!e.active),this.open=!1,this.menuHasFocus&&this.setFocus()}updateTooltip(t){let e=t.target.assignedElements({flatten:!0}).filter(w);this.tooltipEl=e[0],this.setTooltipReferenceElement()}setTooltipReferenceElement(){let{tooltipEl:t,expanded:e,menuButtonEl:n,open:i}=this;t&&(t.referenceElement=!e&&!i?n:void 0)}updateActions(t){t?.forEach(this.updateAction)}async handleDefaultSlotChange(){await this.componentOnReady(),this.syncActionsAndEmitChange()}handleActionGroupActionsChange(t){let e=t.target;(this.defaultSlotRef.value?l(this.defaultSlotRef.value).filter(i=>E(i)):[]).includes(e)&&this.syncActionsAndEmitChange()}isValidKey(t,e){return!!e.find(n=>n===t)}hasPlacementPrefix(t,e){return e.some(n=>t===n||t.startsWith(`${n}-`))}handleActionNavigation(t,e,n){if(!this.open||!this.isValidKey(e,H))return;t.preventDefault(),e==="Home"&&(this.activeMenuItemIndex=0),e==="End"&&(this.activeMenuItemIndex=n.length-1);let i=this.activeMenuItemIndex;e==="ArrowUp"&&(this.activeMenuItemIndex=I(Math.max(i-1,-1),n.length)),e==="ArrowDown"&&(this.activeMenuItemIndex=I(i+1,n.length)),this.updateActions(n),this.setFocus()}toggleOpen(t=!this.open){this.open=t}handlePopoverOpen(t){t.stopPropagation(),this.open=!0,this.setFocus()}handlePopoverClose(t){let{focusMenuButtonOnClose:e,menuHasFocus:n}=this;this.focusMenuButtonOnClose=!0,t.stopPropagation(),this.open=!1,e&&n&&this.focusMenuButton()}renderMenuButton(){let{appearance:t,label:e,scale:n,expanded:i,open:o}=this;return h`<slot name=${x.trigger} @slotchange=${this.handleTriggerSlotChange} ${u(this.triggerSlotRef)}><calcite-action .appearance=${t} .aria=${{expanded:o,hasPopup:"menu"}} class=${v(d.defaultTrigger)} .icon=${$.menu} .scale=${n} .text=${e} .textEnabled=${i} ${u(this.setDefaultMenuButtonEl)}></calcite-action></slot>`}renderMenuItems(){let{menuId:t,menuButtonEl:e,label:n,placement:i,overlayPositioning:o,flipPlacements:a}=this;return h`<calcite-popover auto-close .flipPlacements=${a} focus-trap-disabled .label=${n} offset-distance=0 @calcitePopoverClose=${this.handlePopoverClose} @calcitePopoverOpen=${this.handlePopoverOpen} .overlayPositioning=${o} .placement=${i} pointer-disabled .referenceElement=${e} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled} trigger-disabled ${u(this.setPopoverEl)}><div aria-labelledby=${e?.id??f} .ariaOrientation=${this.placementOrientation==="vertical"?"vertical":void 0} class=${v(d.menu)} id=${t??f} @click=${this.handleCalciteActionClick} @focusin=${this.handleActionFocus} @keydown=${this.menuKeyDown} role=menu tabindex=-1><slot @slotchange=${this.handleDefaultSlotChange} ${u(this.defaultSlotRef)}></slot></div></calcite-popover>`}render(){return h`${this.renderMenuButton()}${this.renderMenuItems()}<slot name=${x.tooltip} @slotchange=${this.updateTooltip}></slot>`}};P("calcite-action-menu",M);export{M as ActionMenu};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as et}from"./KYTSS3US.js";import{a as tt}from"./5K4OZJAZ.js";import{a as _}from"./FDHY2TZA.js";import{b as it}from"./6FZVJGKC.js";import{a as y,b as F}from"./7XS2SBMV.js";import{a as m,d as f}from"./HJHRSII7.js";import{c as $,e as b}from"./TJGNWJF6.js";import{c as p}from"./Y2QT4M6Q.js";import{a as Z}from"./UUEFYLY2.js";import"./2IM7ZZ7U.js";import{a as Y}from"./IUWTLP2K.js";import"./VMHJHFFS.js";import{e as Q}from"./KNHRMOQB.js";import"./BPZZDPGH.js";import{A as J,B as X,J as v,s as R}from"./RRBGCYLX.js";import{E as x,F as M,G as q,H as k,N as K,Q as j,T as V,g as U,h as I,l as W,p as D}from"./WWTG7ZPG.js";var nt={chevronsLeft:"chevrons-left",chevronsRight:"chevrons-right"};function ct(l,t){return t||l.closest("calcite-shell-panel")?.position||"start"}function lt({actions:l,expandables:t,expanded:e}){l.filter(i=>i.slot!==m.menuActions).forEach(i=>i.textEnabled=e),t.forEach(i=>i.expanded=e)}var dt=({tooltip:l,referenceElement:t,expanded:e,ref:i})=>(l&&(l.referenceElement=!e&&t?t:void 0),i&&i(t),t),ht=({collapseText:l,collapseLabel:t,direction:e,expanded:i,expandText:n,expandLabel:o,toggle:s,el:a,position:c,tooltip:r,ref:d,scale:G})=>{let T=e==="rtl",S=i?l:n,g=i?t:o,h=[nt.chevronsLeft,nt.chevronsRight];T&&h.reverse();let A=ct(a,c)==="end",C=A?h[1]:h[0],u=A?h[0]:h[1];return I`<calcite-action .aria=${{expanded:i}} .icon=${i?C:u} id=expand-toggle .label=${g} @click=${s} .scale=${G} .text=${S} .textEnabled=${i} title=${(!i&&!r?S:void 0)??W} ${M(z=>dt({tooltip:r,referenceElement:z,expanded:i,ref:d}))}></calcite-action>`},ut=({bufferSize:l=0,containerSize:t,itemSizes:e})=>{let i=t-l,n=e.length,o=0;for(let[s,a]of e.entries())if(o=o+a,o>i){n=s;break}else continue;return n},pt=({bufferSize:l=0,containerSize:t,itemSizes:e})=>Math.max(e.length-ut({bufferSize:l,itemSizes:e,containerSize:t}),0),ft=l=>l.flatMap(t=>f(t)?t.actions:b(t)?t.actions.filter(e=>e.slot===$.trigger):t).filter(t=>!!t),gt=({item:l,containerRect:t,horizontal:e,rtl:i})=>{let n=l.getBoundingClientRect();return e?n.top-t.top:i?t.right-n.right:n.left-t.left},vt=({actionGroups:l,expanded:t,overflowCount:e})=>{let i=e;[...l].reverse().forEach(n=>{let o=0,s=n.actions.filter(a=>a.parentElement===n).reverse();s.forEach(a=>{a.slot===m.menuActions&&(a.removeAttribute("slot"),a.textEnabled=t)}),i>0&&!n.overflowActionsDisabled&&s.some(a=>(s.filter(r=>!r.slot).length>1&&s.length>2&&!a.closest("calcite-action-menu")&&!a.overflowDisabled&&(a.textEnabled=!0,a.setAttribute("slot",m.menuActions),o++,o>1&&i--),i<1)),n.manager.component.requestUpdate()})},mt=U`:host{box-sizing:border-box;background-color:var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1));color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([scale=s]){--calcite-internal-action-bar-gap: var( --calcite-action-bar-items-space, var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs)) );--calcite-internal-action-bar-padding: var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs))}:host([scale=m]){--calcite-internal-action-bar-gap: var( --calcite-action-bar-items-space, var(--calcite-theme-space-sm, var(--calcite-spacing-sm)) );--calcite-internal-action-bar-padding: var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=l]){--calcite-internal-action-bar-gap: var(--calcite-action-bar-items-space, var(--calcite-space-sm-plus));--calcite-internal-action-bar-padding: var(--calcite-theme-space-sm-plus, var(--calcite-spacing-sm-plus))}:host{display:inline-flex;align-self:stretch;background:transparent;--calcite-internal-action-group-dividing-border-margin: calc( var(--calcite-theme-space-base, var(--calcite-spacing-base)) + 1px )}.container{display:inline-flex;flex-direction:column;flex:1 1 auto;background-color:var(--calcite-action-bar-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)));gap:var(--calcite-internal-action-bar-gap);padding:var(--calcite-internal-action-bar-padding)}:host([floating]) .container{animation:in var(--calcite-internal-animation-timing-slow) ease-in-out;overflow:hidden;border-radius:var(--calcite-action-bar-corner-radius, var(--calcite-theme-corner-radius-sm, var(--calcite-corner-radius-round)));box-shadow:var(--calcite-action-bar-shadow, var(--calcite-shadow-md))}:host([layout=vertical]){flex-direction:column}:host([layout=vertical]):host([overflow-actions-disabled]) .container{overflow-y:auto}:host([layout=vertical]):host([expanded]) .container{max-inline-size:var(--calcite-action-bar-expanded-max-width, auto)}:host([layout=vertical]) .action-group--end{margin-block-start:auto}:host([layout=vertical]) ::slotted(calcite-action-group:not(:last-of-type)){border-block-end-width:var(--calcite-border-width-sm);border-image:linear-gradient(to right,transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent var(--calcite-internal-action-group-dividing-border-margin));border-image-slice:1;padding-block-end:var(--calcite-internal-action-bar-padding)}:host([layout=horizontal]){flex-direction:row}:host([layout=horizontal]) .container{flex-direction:row}:host([layout=horizontal]):host([overflow-actions-disabled]) .container{overflow-x:auto}:host([layout=horizontal]) .action-group--end{margin-inline-start:auto}:host([layout=horizontal]) ::slotted(calcite-action-group:not(:last-of-type)){border-image:linear-gradient(transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent var(--calcite-internal-action-group-dividing-border-margin));border-image-slice:1;border-inline-end-width:var(--calcite-border-width-sm);padding-inline-end:var(--calcite-internal-action-bar-padding)}.action-group--end{justify-content:flex-end}.line-overlay{position:absolute;inset:0;pointer-events:none}.line{position:absolute;--calcite-internal-action-bar-divider-inset: calc( var(--calcite-internal-action-group-dividing-border-margin) - var(--calcite-border-width-sm) )}:host([overflow-mode=wrap][layout=horizontal]) .container,:host([overflow-mode=wrap][layout=vertical]) .container{position:relative;flex-wrap:wrap;align-content:flex-start;--calcite-internal-action-bar-line-gap: calc( var(--calcite-internal-action-bar-padding) + var(--calcite-internal-action-bar-gap) )}:host([overflow-mode=wrap][layout=horizontal]) ::slotted(calcite-action-group[slot=actions-start]),:host([overflow-mode=wrap][layout=vertical]) ::slotted(calcite-action-group[slot=actions-start]){padding-inline-end:0;padding-block-end:0;border-inline-end-width:0;border-block-end-width:0}:host([overflow-mode=wrap][layout=horizontal]) .container{row-gap:var(--calcite-internal-action-bar-line-gap)}:host([overflow-mode=wrap][layout=horizontal]) ::slotted(calcite-action-group:not([slot=actions-start])){margin-inline-start:calc(-1 * var(--calcite-border-width-sm));padding-inline:var(--calcite-internal-action-bar-padding) 0;border-inline-start-width:var(--calcite-border-width-sm);border-inline-end-width:0;border-image:linear-gradient(transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent calc(100% - var(--calcite-internal-action-group-dividing-border-margin)));border-image-slice:1}:host([overflow-mode=wrap][layout=horizontal]) .line{inset-inline:var(--calcite-internal-action-bar-padding);block-size:var(--calcite-border-width-sm);inset-block-start:calc(var(--calcite-internal-action-bar-line-offset, 0px) - var(--calcite-internal-action-bar-line-gap) / 2);background:linear-gradient(to right,transparent var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-bar-divider-inset)),transparent calc(100% - var(--calcite-internal-action-bar-divider-inset)))}:host([overflow-mode=wrap][layout=horizontal]) .container.has-action-groups{overflow:hidden;padding-inline-start:0;column-gap:calc(var(--calcite-internal-action-bar-gap) + var(--calcite-border-width-sm))}:host([overflow-mode=wrap][layout=horizontal]) .container.has-action-groups .action-group--start{padding-inline-start:var(--calcite-internal-action-bar-padding)}:host([overflow-mode=wrap][layout=vertical]) .container{block-size:100%;min-block-size:0;column-gap:var(--calcite-internal-action-bar-line-gap)}:host([overflow-mode=wrap][layout=vertical]) ::slotted(calcite-action-group:not([slot=actions-start])){margin-block-start:calc(-1 * var(--calcite-border-width-sm));padding-block:var(--calcite-internal-action-bar-padding) 0;border-block-start-width:var(--calcite-border-width-sm);border-block-end-width:0;border-image:linear-gradient(to right,transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent calc(100% - var(--calcite-internal-action-group-dividing-border-margin)));border-image-slice:1}:host([overflow-mode=wrap][layout=vertical]) .line{inset-block:var(--calcite-internal-action-bar-padding);inline-size:var(--calcite-border-width-sm);inset-inline-start:calc(var(--calcite-internal-action-bar-line-offset, 0px) - var(--calcite-internal-action-bar-line-gap) / 2);background:linear-gradient(to bottom,transparent var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-bar-divider-inset)),transparent calc(100% - var(--calcite-internal-action-bar-divider-inset)))}:host([overflow-mode=wrap][layout=vertical]) .container.has-action-groups{overflow:hidden;padding-block-start:0;row-gap:calc(var(--calcite-internal-action-bar-gap) + var(--calcite-border-width-sm))}:host([overflow-mode=wrap][layout=vertical]) .container.has-action-groups .action-group--start{padding-block-start:var(--calcite-internal-action-bar-padding)}:host([overflow-mode=none][layout=horizontal]) .container{overflow-x:auto}:host([overflow-mode=none][layout=vertical]) .container{overflow-y:auto}:host([hidden]){display:none}[hidden]{display:none}`,H=class extends q{constructor(){super(),this.actions=[],this.navigationItems=[],this.containerRef=x(),this.defaultSlotRef=x(),this.actionsStartSlotRef=x(),this.actionsEndSlotRef=x(),this.actionsStartGroupRef=x(),this.actionsEndGroupRef=x(),this.direction=Q(),this.defaultSlotItems=[],this.actionGroups=[],this.actionMenus=[],this.actionsStart=[],this.actionsStartGroups=[],this.actionsEnd=[],this.actionsEndGroups=[],this.automaticallyOverflowedActions=[],this.authoredMenuActions=[],this.overflowPassId=0,this.suppressedActionGroupActionsChange=new WeakMap,this.cancelable=et()(this),this.resize=tt(({width:t,height:e})=>{let{expanded:i,expandToggleDisabled:n,layout:o,expandPosition:s}=this;if(!this.el.isConnected||!this.containerRef.value)return;if(this.updateGroups(),this.usesWrap){this.scheduleLineMeasure();return}if(this.overflowMode!=="collapse"||o==="vertical"&&!e||o==="horizontal"&&!t)return;let a=this.getItemSizes(),{actionGroups:c,actionsEnd:r,actionsEndGroups:d,actionsStart:G,actionsStartGroups:T,defaultSlotItems:S}=this,g=[...T,...c,...d],h=this.hasActionsEnd||!n&&s==="end"?1:0,A=this.hasActionsStart||!n&&s==="start"?1:0,C=S.length+h+A,u=C,E=getComputedStyle(this.containerRef.value);if(u+=v(o==="horizontal"?E.paddingInlineStart:E.paddingBlockStart)+v(o==="horizontal"?E.paddingInlineEnd:E.paddingBlockEnd),g.length>0){let O=g.length-1;g.forEach((N,L)=>{let w=getComputedStyle(N),B=v(w.gap),P=this.getActionGroupItemCount(N),rt=Math.max(P-1,0);u+=B*rt,L!==O&&(u+=v(o==="horizontal"?w.paddingInlineEnd:w.paddingBlockEnd),u+=v(o==="horizontal"?w.borderInlineEndWidth:w.borderBlockEndWidth))})}let z=(O,N,L)=>{if(!N||O.length<1)return;let w=getComputedStyle(N),B=v(w.gap),P=O.length+(L?1:0);u+=B*Math.max(P-1,0)},at=!n&&s==="start",ot=!n&&s==="end";z(G,this.actionsStartGroupRef.value,at),z(r,this.actionsEndGroupRef.value,ot),C>1&&(u+=v(E.gap)*(C-1));let st=pt({bufferSize:u,containerSize:o==="horizontal"?t:e,itemSizes:a});this.runOverflowActions({actionGroups:g,expanded:i,overflowCount:st})},K.resize),this.resizeHandler=t=>{if(this.usesWrap){this.scheduleLineMeasure();return}let{width:e,height:i}=t.target&&t.target!==this.el?{width:this.el.clientWidth,height:this.el.clientHeight}:t.contentRect,n=this.layout==="horizontal"?"width":"height",o=n==="width"?e:i;this.lastOverflowAxisSize?.axis===n&&this.lastOverflowAxisSize.size===o||(this.lastOverflowAxisSize={axis:n,size:o},this.resize({width:e,height:i}))},this.resizeObserver=_("resize",t=>this.resizeHandlerEntries(t)),this.toggleExpand=()=>{this.expanded=!this.expanded,this.calciteActionBarToggle.emit()},this.messages=Z({blocking:!0}),this.focusSetter=Y()(this).setFocus,this.setExpandToggleEl=t=>{this.expandToggleEl=t,this.syncNavigationItemTabIndexes()},this.hasActionsEnd=!1,this.hasActionsStart=!1,this.hasActionGroups=!1,this.lineOffsets=[],this.floating=!1,this.expandToggleDisabled=!1,this.expanded=!1,this.expandPosition="end",this.layout="vertical",this.overflowMode="collapse",this.overlayPositioning="absolute",this.scale="m",this.selectionAppearance="neutral",this.calciteActionBarCollapse=D({cancelable:!1}),this.calciteActionBarExpand=D({cancelable:!1}),this.calciteActionBarToggle=D({cancelable:!1}),this.listen("calciteActionMenuOpen",this.actionMenuOpenHandler),this.listen("calciteInternalActionGroupActionsChange",this.handleActionGroupActionsChange),this.listen("calciteInternalActionMenuActionsChange",this.handleActionMenuActionsChange),this.listen("click",this.handleFocusIn),this.listen("keydown",this.handleKeyDown),this.listen("focusin",this.handleFocusIn)}static{this.properties={expandTooltip:[16,{},{state:!0}],hasActionsEnd:[16,{},{state:!0}],hasActionsStart:[16,{},{state:!0}],hasActionGroups:[16,{},{state:!0}],lineOffsets:[16,{},{state:!0}],actionsEndGroupLabel:1,actionsStartGroupLabel:1,floating:[7,{},{reflect:!0,type:Boolean}],expandToggleDisabled:[7,{},{reflect:!0,type:Boolean}],expanded:[7,{},{reflect:!0,type:Boolean}],expandPosition:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],overflowMode:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overflowActionsDisabled:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],position:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}]}}static{this.styles=mt}get usesWrap(){return this.overflowMode==="wrap"&&this.layout!=="grid"}get overflowActionsDisabled(){return this.overflowMode==="none"}set overflowActionsDisabled(t){j.deprecated("property",{component:this,name:"overflowActionsDisabled",removalVersion:7,suggested:'overflowMode="none"'}),this.overflowMode=t?"none":"collapse"}async overflowActions(){if(this.overflowMode!=="collapse"){this.usesWrap&&this.scheduleLineMeasure();return}this.resize({width:this.el.clientWidth,height:this.el.clientHeight})}async setFocus(t){return this.focusSetter(()=>this.el,t)}connectedCallback(){super.connectedCallback(),this.updateGroups(),this.updateNavigationItems(),this.syncNavigationItemTabIndexes(),this.overflowActions(),this.updateActions(),this.overflowActionsDisabledHandler(this.overflowActionsDisabled),this.overflowModeHandler(),this.cancelable.add(this.resize)}willUpdate(t){(t.has("expandToggleDisabled")&&(this.hasUpdated||this.expandToggleDisabled!==!1)||t.has("expandPosition")&&(this.hasUpdated||this.expandPosition!=="end"))&&this.overflowActions(),t.has("layout")&&(this.hasUpdated||this.layout!=="vertical")&&(this.updateGroups(),this.overflowModeHandler(),this.usesWrap||this.updateLines()),t.has("overflowActionsDisabled")&&(this.hasUpdated||this.overflowActionsDisabled!==!1)&&this.overflowActionsDisabledHandler(this.overflowActionsDisabled),t.has("overflowMode")&&(this.hasUpdated||this.overflowMode!=="collapse")&&(!this.usesWrap&&this.lineMeasureFrame!=null&&(cancelAnimationFrame(this.lineMeasureFrame),this.lineMeasureFrame=void 0),this.usesWrap?this.scheduleLineMeasure():this.updateLines(),this.overflowModeHandler()),t.has("expanded")&&this.hasUpdated&&(this.expandedHandler(),this.expanded?this.calciteActionBarExpand.emit():this.calciteActionBarCollapse.emit()),t.has("selectionAppearance")&&(this.hasUpdated||this.selectionAppearance!=="neutral")&&this.updateActions()}updated(){this.usesWrap&&this.lineMeasureFrame==null&&this.scheduleLineMeasure()}loaded(){this.syncDefaultSlot(),this.syncActionsStartSlot(),this.syncActionsEndSlot(),this.syncActionsState(),this.overflowActions()}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect(),this.lineMeasureFrame!=null&&(cancelAnimationFrame(this.lineMeasureFrame),this.lineMeasureFrame=void 0)}getItemSizes(){let{layout:t,expandToggleEl:e}=this,i=t==="horizontal"?"clientWidth":"clientHeight",n=this.actions.map(a=>a[i]||0);this.getTrackedActionGroups().flatMap(a=>R(a,"calcite-action-menu")).forEach(a=>{let c=(a.actions??[]).find(r=>r.slot===$.trigger);n.push((c??a)[i]||0)}),e&&n.push(e[i]||0);let s=Math.max(...n,0);return n.map(a=>a||s)}getActionGroupItemCount(t){let e=t.actions.filter(n=>n.parentElement===t),i=R(t,"calcite-action-menu").length;return e.length+i}expandedHandler(){this.syncActionsState(!0),this.overflowActions()}overflowModeHandler(){this.overflowMode==="none"?this.resizeObserver?.disconnect():this.resizeObserver?.observe(this.el),this.overflowActions()}overflowActionsDisabledHandler(t){if(t){this.resizeObserver?.disconnect();return}this.resizeObserver?.observe(this.el),this.containerRef.value&&this.resizeObserver?.observe(this.containerRef.value),this.overflowActions()}actionMenuOpenHandler(t){let e=t.composedPath(),i=e.find(n=>f(n)||b(n));i&&(f(i)&&!i.menuOpen||b(i)&&!i.open||(this.getTrackedActionGroups().forEach(n=>{e.includes(n)||(n.menuOpen=!1)}),this.getTrackedActionMenus().forEach(n=>{e.includes(n)||(n.open=!1)}),this.updateActions()))}runOverflowActions({actionGroups:t,expanded:e,overflowCount:i}){let n=++this.overflowPassId,o=t.flatMap(a=>a.actions.filter(c=>c.parentElement===a));this.automaticallyOverflowedActions=this.automaticallyOverflowedActions.filter(a=>o.includes(a)),this.authoredMenuActions=this.authoredMenuActions.filter(a=>o.includes(a)&&a.slot===m.menuActions),o.forEach(a=>{a.slot===m.menuActions&&!this.automaticallyOverflowedActions.includes(a)&&!this.authoredMenuActions.includes(a)&&this.authoredMenuActions.push(a)});let s=new Map;t.forEach(a=>{let c=a.actions.filter(r=>r.parentElement===a);s.set(a,c.map(r=>r.slot??"").join("|"))}),vt({actionGroups:t,expanded:e,overflowCount:i}),this.authoredMenuActions.forEach(a=>{a.slot=m.menuActions,a.textEnabled=!0}),this.automaticallyOverflowedActions=o.filter(a=>a.slot===m.menuActions&&!this.authoredMenuActions.includes(a)),t.forEach(a=>{let r=a.actions.filter(d=>d.parentElement===a).map(d=>d.slot??"").join("|");s.get(a)!==r&&(this.suppressedActionGroupActionsChange.set(a,n),this.queueSuppressedActionGroupActionsChangeCleanup(a,n))})}queueSuppressedActionGroupActionsChangeCleanup(t,e){queueMicrotask(()=>{this.suppressedActionGroupActionsChange.get(t)===e&&this.suppressedActionGroupActionsChange.delete(t)})}resizeHandlerEntries(t){t.forEach(this.resizeHandler)}getSectionWrapperGroups(){return[this.actionsStartGroupRef.value,this.actionsEndGroupRef.value].filter(t=>!!t)}updateGroups(){let t=[...this.actionGroups,...this.actionsStartGroups,...this.actionsEndGroups,...this.getSectionWrapperGroups()];this.hasActionGroups=this.actionGroups.length>0,t.forEach(e=>{e.layout=this.layout,e.scale=this.scale}),this.syncNavItems()}syncNavItems(){this.el.isConnected&&(this.updateNavigationItems(),this.syncNavigationItemTabIndexes(),this.updateActions())}scheduleLineMeasure(){this.lineMeasureFrame!=null&&cancelAnimationFrame(this.lineMeasureFrame),this.lineMeasureFrame=requestAnimationFrame(()=>{this.lineMeasureFrame=void 0,this.updateLines()})}getWrapItems(){let t=[],e=this.actionsStartGroupRef.value;e&&!e.hidden&&t.push(e),this.defaultSlotItems.forEach(n=>{n.hidden||t.push(n)});let i=this.actionsEndGroupRef.value;return i&&!i.hidden&&t.push(i),t}updateLines(){let t=this.containerRef.value;if(!t||!this.usesWrap){this.lineOffsets.length>0&&(this.lineOffsets=[]);return}let e=this.layout==="horizontal",i=this.direction==="rtl",n=t.getBoundingClientRect(),o=this.getWrapItems(),s=[],a=null;o.forEach(r=>{let d=gt({item:r,containerRect:n,horizontal:e,rtl:i});a!==null&&Math.abs(d-a)>1&&s.push(d),a=d}),(s.length!==this.lineOffsets.length||s.some((r,d)=>r!==this.lineOffsets[d]))&&(this.lineOffsets=s)}handleDefaultSlotChange(){this.syncSlotAndActions(()=>this.syncDefaultSlot()),this.updateGroups(),this.updateNavigationItems(),this.syncNavigationItemTabIndexes(),this.updateActions(),this.usesWrap&&this.scheduleLineMeasure()}handleActionsEndSlotChange(){this.syncSlotAndActions(()=>this.syncActionsEndSlot()),this.syncNavigationItemTabIndexes()}handleActionsStartSlotChange(){this.syncSlotAndActions(()=>this.syncActionsStartSlot()),this.syncNavigationItemTabIndexes()}handleTooltipSlotChange(t){let e=J(t).filter(it);this.expandTooltip=e[0]}updateActions(){let t=new Set(this.actions);this.getTrackedActionMenus().forEach(e=>{e.actions.forEach(i=>t.add(i))}),t.forEach(e=>{e.selectionAppearance=this.selectionAppearance})}updateNavigationItems(){let t=[...this.getNavigationItems(this.actionsStart),...this.getNavigationItems(this.defaultSlotItems),...this.getNavigationItems(this.actionsEnd)],{expandToggleEl:e}=this;this.navigationItems=e&&this.isNavigableAction(e)?this.expandPosition==="start"?[e,...t]:[...t,e]:t}getNavigationItems(t){return t.flatMap(e=>p(e)?this.isNavigableAction(e)?[e]:[]:b(e)?this.isNavigableActionMenu(e)?[e]:[]:this.getActionGroupNavigationItems(e))}getActionGroupNavigationItems(t){if(t.hasAttribute("hidden"))return[];let e=(t.actions??[]).filter(s=>this.isNavigableAction(s)),i=R(t,"calcite-action-menu").filter(s=>this.isNavigableActionMenu(s)),n=[...e,...i].sort((s,a)=>s===a?0:s.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1),{actionMenu:o}=t;return o&&this.isNavigableActionMenu(o)&&!n.includes(o)&&n.push(o),n}isNavigableAction(t){return!t.disabled&&!t.hidden&&!t.inert&&t.slot!=="menu-actions"&&!t.closest("calcite-action-menu")}isNavigableActionMenu(t){let e=t.menuButtonEl??t.actions?.find(i=>i.slot===$.trigger);return!t.hidden&&!t.inert&&!e?.disabled&&!e?.hidden&&!e?.inert}syncActions(){this.actions=ft([...this.actionsStart,...this.defaultSlotItems,...this.actionsEnd])}syncActionsAndOverflow(){this.syncActionsState(),this.overflowActions()}syncSlotAndActions(t){t(),this.syncActionsAndOverflow()}syncActionsState(t=!1){this.syncActions(),this.updateActions(),t&&lt({actions:this.actions,expandables:[...this.getTrackedActionGroups(),...this.getTrackedActionMenus(),...this.getSectionWrapperGroups()],expanded:this.expanded})}getTrackedActionGroups(){return[...this.actionGroups,...this.actionsStartGroups,...this.actionsEndGroups]}getTrackedActionMenus(){return[...this.actionMenus,...this.actionsStart,...this.actionsEnd].filter(t=>b(t))}getAssignedActionBarItems(t){return t?X(t).filter(e=>p(e)||f(e)||b(e)):[]}syncDefaultSlot(){this.defaultSlotItems=this.getAssignedActionBarItems(this.defaultSlotRef.value),this.actionGroups=this.defaultSlotItems.filter(t=>f(t)),this.actionMenus=this.defaultSlotItems.filter(t=>b(t)),this.updateGroups()}syncActionsStartSlot(){this.actionsStart=this.getAssignedActionBarItems(this.actionsStartSlotRef.value),this.actionsStartGroups=this.actionsStart.filter(t=>f(t)),this.hasActionsStart=this.actionsStart.length>0,this.updateGroups()}syncActionsEndSlot(){this.actionsEnd=this.getAssignedActionBarItems(this.actionsEndSlotRef.value),this.actionsEndGroups=this.actionsEnd.filter(t=>f(t)),this.hasActionsEnd=this.actionsEnd.length>0,this.updateGroups()}handleActionGroupActionsChange(t){let e=t.target;this.getTrackedActionGroups().includes(e)&&(this.suppressedActionGroupActionsChange.has(e)||(this.syncActionsAndOverflow(),this.syncNavigationItemTabIndexes()))}handleActionMenuActionsChange(t){let e=t.target;this.getTrackedActionMenus().includes(e)&&(this.syncActionsAndOverflow(),this.syncNavigationItemTabIndexes())}handleKeyDown(t){if((this.getEventActionMenu(t)||this.getOpenActionMenu())?.open)return t.key==="Escape",void 0;if(t.defaultPrevented)return;this.updateNavigationItems();let i=this.getNavigationItemFromEvent(t);if(!i||!this.navigationItems.length)return;if(this.layout==="grid"&&["ArrowDown","ArrowRight","ArrowUp","ArrowLeft"].includes(t.key)){let r=t.key==="ArrowDown"||t.key==="ArrowRight"?"next":"previous";this.focusNavigationItem(r,i),t.preventDefault();return}let n=this.layout!=="horizontal",o=t.composedPath().find(f),s=n?"ArrowRight":"ArrowDown",a=n?"ArrowLeft":"ArrowUp",c=i.matches("calcite-action-menu")&&!i.open;if((o?.selectionMode==="multiple"||o?.selectionMode==="none")&&(t.key===s||t.key===a)&&!c){t.preventDefault();return}if(!this.handleSecondaryArrowActionMenuOpen(t,i,n))switch(t.key){case"ArrowDown":n?(this.focusNavigationItem("next",i),t.preventDefault()):this.focusActionGroupItem("next",i,o)&&t.preventDefault();break;case"ArrowUp":n?(this.focusNavigationItem("previous",i),t.preventDefault()):this.focusActionGroupItem("previous",i,o)&&t.preventDefault();break;case"ArrowRight":n?this.focusActionGroupItem("next",i,o)&&t.preventDefault():(this.focusNavigationItem("next",i),t.preventDefault());break;case"ArrowLeft":n?this.focusActionGroupItem("previous",i,o)&&t.preventDefault():(this.focusNavigationItem("previous",i),t.preventDefault());break;case"Home":this.focusNavigationItem("first",i),t.preventDefault();break;case"End":this.focusNavigationItem("last",i),t.preventDefault();break;case"Tab":t.composedPath().some(r=>p(r)&&r.aria?.role==="menuitem")||this.setNavigationItemTabIndexes(i);break}}handleSecondaryArrowActionMenuOpen(t,e,i){if(!e.matches("calcite-action-menu")||e.open)return!1;let n=i?"ArrowRight":"ArrowDown",o=i?"ArrowLeft":"ArrowUp";return t.key!==n&&t.key!==o?!1:(t.preventDefault(),this.openActionMenuAndFocusBoundaryItem(e,t.key===n?"first":"last"),!0)}openActionMenuAndFocusBoundaryItem(t,e){t.open=!0,this.focusActionMenuBoundaryItem(t,e)}async focusActionMenuBoundaryItem(t,e){if(await t.componentOnReady(),!t.open)return;let i=t.actions.filter(o=>o.aria?.role==="menuitem"&&!o.disabled&&!o.hidden&&!o.inert);await(e==="first"?i[0]:i[i.length-1])?.setFocus({preventScroll:!0})}handleFocusIn(t){this.updateNavigationItems();let e=this.getNavigationItemFromEvent(t);if(t instanceof MouseEvent){t.detail>0&&e&&p(e)&&this.setNavigationItemTabIndexes(e);return}let i=this.getEventActionMenu(t)||this.getOpenActionMenu();if(!i?.open){if(e?.matches("calcite-action-menu")&&i){this.syncClosedActionMenu(i);return}this.syncNavigationItemTabIndexes(e??void 0)}}focusNavigationItem(t,e){let{navigationItems:i}=this,n=i.indexOf(e);if(n===-1)return;let o=n;t==="first"?o=0:t==="last"?o=i.length-1:t==="next"?o=(n+1)%i.length:o=(n-1+i.length)%i.length;let s=i[o];s&&s!==e&&s.setFocus(),this.syncNavigationItemTabIndexes(s)}focusActionGroupItem(t,e,i){if(!p(e)||!i||i.selectionMode==="multiple"||i.selectionMode==="none")return!1;let n=this.navigationItems.filter(c=>p(c)&&i.actions.includes(c)),o=n.indexOf(e);if(n.length<2||o===-1)return!1;let s=t==="next"?(o+1)%n.length:(o-1+n.length)%n.length,a=n[s];return!a||a===e?!1:(a.setFocus(),this.syncNavigationItemTabIndexes(a),!0)}getCurrentNavigationItem(){let{activeElement:t}=document;if(t instanceof HTMLElement){let i=t.matches("calcite-action, calcite-action-menu")?t:t.closest("calcite-action, calcite-action-menu");if(i&&this.navigationItems.includes(i))return i;let n=t.closest("calcite-action-menu");if(n){let o=this.navigationItems.find(s=>s===n);if(o)return o}}let e=this.getCurrentFocusItem();return e||this.getDefaultNavigationItem()}getCurrentFocusItem(){let{currentFocusItem:t}=this;return t?this.navigationItems.find(e=>e===t):void 0}getDefaultNavigationItem(){return this.navigationItems.find(t=>p(t)&&t!==this.expandToggleEl)||this.navigationItems[0]}getEventActionMenu(t){let e=t.composedPath().find(n=>n instanceof HTMLElement&&n.matches("calcite-action-menu"));if(e)return e;let i=t.target;if(i instanceof HTMLElement){let n=i.closest("calcite-action-menu");if(n)return n}return null}getOpenActionMenu(){return this.navigationItems.find(t=>t.matches("calcite-action-menu")&&t.open)}syncClosedActionMenu(t){this.updateNavigationItems();let e=this.navigationItems.find(i=>i===t);e&&this.setNavigationItemTabIndexes(e)}getNavigationItemFromEvent(t){for(let e of t.composedPath()){if(!(e instanceof HTMLElement)||!e.matches("calcite-action, calcite-action-menu"))continue;let i=this.navigationItems.find(o=>o===e);if(i)return i;let n=e.closest("calcite-action-menu");if(n){let o=this.navigationItems.find(s=>s===n);if(o)return o}}return null}syncNavigationItemTabIndexes(t){this.updateNavigationItems();let i=(t?this.navigationItems.find(n=>n===t):void 0)||this.getCurrentNavigationItem();i&&(this.setNavigationItemTabIndexes(i),this.updateActions())}setNavigationItemTabIndexes(t){t.matches(":focus-within")&&(this.currentFocusItem=t),this.navigationItems.forEach(e=>{let i=e===t;if(p(e)){i&&!e.disabled&&!e.hidden?e.removeAttribute("tabindex"):e.tabIndex=-1;return}i?e.removeAttribute("tabindex"):e.tabIndex=-1;let{menuButtonEl:n}=e;n&&(i&&!e.open?n.removeAttribute("tabindex"):n.tabIndex=-1)})}renderExpandTooltipSlot(){return I`<slot name=${F.expandTooltip} @slotchange=${this.handleTooltipSlotChange}></slot>`}renderExpandToggle(){let{el:t,expanded:e,toggleExpand:i,messages:n,position:o,scale:s}=this;return ht({collapseLabel:n.collapseLabel,collapseText:n.collapse,direction:this.direction,el:t,expanded:e,expandLabel:n.expandLabel,expandText:n.expand,position:o,ref:this.setExpandToggleEl,scale:s,toggle:i,tooltip:this.expandTooltip})}renderActionsGroup(t){let{expandToggleDisabled:e,scale:i,layout:n,overlayPositioning:o,expandPosition:s}=this,a=t==="start",c=!e&&s===t,r=a?this.hasActionsStart:this.hasActionsEnd,d=a?F.actionsStart:F.actionsEnd,G=a?this.handleActionsStartSlotChange:this.handleActionsEndSlotChange,T=a?this.actionsStartGroupLabel:this.actionsEndGroupLabel,S=!c&&!r&&!(a?this.hasActionsStart:this.hasActionsEnd),g=a?this.actionsStartGroupRef:this.actionsEndGroupRef,h=a?this.actionsStartSlotRef:this.actionsEndSlotRef,A=c?this.renderExpandToggle():null;return I`<calcite-action-group class=${k({[y.actionGroupStart]:a,[y.actionGroupEnd]:!a})} .hidden=${S} .label=${T} .layout=${n} .overlayPositioning=${o} .scale=${i} ${M(g)}>${a?A:null}<slot name=${d??W} @slotchange=${G} ${M(h)}></slot>${c?this.renderExpandTooltipSlot():null}${a?null:A}</calcite-action-group>`}render(){let t=this.layout==="horizontal"?"horizontal":"vertical";return I`<div .ariaOrientation=${t} class=${k({[y.container]:!0,[y.hasActionGroups]:this.hasActionGroups})} role=toolbar ${M(this.containerRef)}>${this.renderActionsGroup("start")}<slot @slotchange=${this.handleDefaultSlotChange} ${M(this.defaultSlotRef)}></slot>${this.renderActionsGroup("end")}${this.usesWrap?I`<div aria-hidden=true class=${k(y.lineOverlay)}>${this.lineOffsets.map(e=>I`<div class=${k(y.line)} style=${`--calcite-internal-action-bar-line-offset: ${e}px`}></div>`)}</div>`:null}</div>`}};V("calcite-action-bar",H);export{H as ActionBar};
2
+ import{a as et}from"./W6EJSX2J.js";import{a as tt}from"./5K4OZJAZ.js";import{a as _}from"./FDHY2TZA.js";import{b as it}from"./6FZVJGKC.js";import{a as y,b as F}from"./7XS2SBMV.js";import{a as m,d as f}from"./HJHRSII7.js";import{c as $,e as b}from"./TJGNWJF6.js";import{c as p}from"./Y2QT4M6Q.js";import{a as Z}from"./2KE3HKUU.js";import"./2IM7ZZ7U.js";import{a as Y}from"./3GHBWG5F.js";import"./VMHJHFFS.js";import{e as Q}from"./XJJYF3O2.js";import"./M7WEPGCG.js";import{A as J,B as X,J as v,s as R}from"./RRBGCYLX.js";import{E as x,F as M,G as q,H as k,N as K,Q as j,T as V,g as U,h as I,l as W,p as D}from"./KYNZ6MSZ.js";var nt={chevronsLeft:"chevrons-left",chevronsRight:"chevrons-right"};function ct(l,t){return t||l.closest("calcite-shell-panel")?.position||"start"}function lt({actions:l,expandables:t,expanded:e}){l.filter(i=>i.slot!==m.menuActions).forEach(i=>i.textEnabled=e),t.forEach(i=>i.expanded=e)}var dt=({tooltip:l,referenceElement:t,expanded:e,ref:i})=>(l&&(l.referenceElement=!e&&t?t:void 0),i&&i(t),t),ht=({collapseText:l,collapseLabel:t,direction:e,expanded:i,expandText:n,expandLabel:o,toggle:s,el:a,position:c,tooltip:r,ref:d,scale:G})=>{let T=e==="rtl",S=i?l:n,g=i?t:o,h=[nt.chevronsLeft,nt.chevronsRight];T&&h.reverse();let A=ct(a,c)==="end",C=A?h[1]:h[0],u=A?h[0]:h[1];return I`<calcite-action .aria=${{expanded:i}} .icon=${i?C:u} id=expand-toggle .label=${g} @click=${s} .scale=${G} .text=${S} .textEnabled=${i} title=${(!i&&!r?S:void 0)??W} ${M(z=>dt({tooltip:r,referenceElement:z,expanded:i,ref:d}))}></calcite-action>`},ut=({bufferSize:l=0,containerSize:t,itemSizes:e})=>{let i=t-l,n=e.length,o=0;for(let[s,a]of e.entries())if(o=o+a,o>i){n=s;break}else continue;return n},pt=({bufferSize:l=0,containerSize:t,itemSizes:e})=>Math.max(e.length-ut({bufferSize:l,itemSizes:e,containerSize:t}),0),ft=l=>l.flatMap(t=>f(t)?t.actions:b(t)?t.actions.filter(e=>e.slot===$.trigger):t).filter(t=>!!t),gt=({item:l,containerRect:t,horizontal:e,rtl:i})=>{let n=l.getBoundingClientRect();return e?n.top-t.top:i?t.right-n.right:n.left-t.left},vt=({actionGroups:l,expanded:t,overflowCount:e})=>{let i=e;[...l].reverse().forEach(n=>{let o=0,s=n.actions.filter(a=>a.parentElement===n).reverse();s.forEach(a=>{a.slot===m.menuActions&&(a.removeAttribute("slot"),a.textEnabled=t)}),i>0&&!n.overflowActionsDisabled&&s.some(a=>(s.filter(r=>!r.slot).length>1&&s.length>2&&!a.closest("calcite-action-menu")&&!a.overflowDisabled&&(a.textEnabled=!0,a.setAttribute("slot",m.menuActions),o++,o>1&&i--),i<1)),n.manager.component.requestUpdate()})},mt=U`:host{box-sizing:border-box;background-color:var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1));color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([scale=s]){--calcite-internal-action-bar-gap: var( --calcite-action-bar-items-space, var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs)) );--calcite-internal-action-bar-padding: var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs))}:host([scale=m]){--calcite-internal-action-bar-gap: var( --calcite-action-bar-items-space, var(--calcite-theme-space-sm, var(--calcite-spacing-sm)) );--calcite-internal-action-bar-padding: var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=l]){--calcite-internal-action-bar-gap: var(--calcite-action-bar-items-space, var(--calcite-space-sm-plus));--calcite-internal-action-bar-padding: var(--calcite-theme-space-sm-plus, var(--calcite-spacing-sm-plus))}:host{display:inline-flex;align-self:stretch;background:transparent;--calcite-internal-action-group-dividing-border-margin: calc( var(--calcite-theme-space-base, var(--calcite-spacing-base)) + 1px )}.container{display:inline-flex;flex-direction:column;flex:1 1 auto;background-color:var(--calcite-action-bar-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)));gap:var(--calcite-internal-action-bar-gap);padding:var(--calcite-internal-action-bar-padding)}:host([floating]) .container{animation:in var(--calcite-internal-animation-timing-slow) ease-in-out;overflow:hidden;border-radius:var(--calcite-action-bar-corner-radius, var(--calcite-theme-corner-radius-sm, var(--calcite-corner-radius-round)));box-shadow:var(--calcite-action-bar-shadow, var(--calcite-shadow-md))}:host([layout=vertical]){flex-direction:column}:host([layout=vertical]):host([overflow-actions-disabled]) .container{overflow-y:auto}:host([layout=vertical]):host([expanded]) .container{max-inline-size:var(--calcite-action-bar-expanded-max-width, auto)}:host([layout=vertical]) .action-group--end{margin-block-start:auto}:host([layout=vertical]) ::slotted(calcite-action-group:not(:last-of-type)){border-block-end-width:var(--calcite-border-width-sm);border-image:linear-gradient(to right,transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent var(--calcite-internal-action-group-dividing-border-margin));border-image-slice:1;padding-block-end:var(--calcite-internal-action-bar-padding)}:host([layout=horizontal]){flex-direction:row}:host([layout=horizontal]) .container{flex-direction:row}:host([layout=horizontal]):host([overflow-actions-disabled]) .container{overflow-x:auto}:host([layout=horizontal]) .action-group--end{margin-inline-start:auto}:host([layout=horizontal]) ::slotted(calcite-action-group:not(:last-of-type)){border-image:linear-gradient(transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent var(--calcite-internal-action-group-dividing-border-margin));border-image-slice:1;border-inline-end-width:var(--calcite-border-width-sm);padding-inline-end:var(--calcite-internal-action-bar-padding)}.action-group--end{justify-content:flex-end}.line-overlay{position:absolute;inset:0;pointer-events:none}.line{position:absolute;--calcite-internal-action-bar-divider-inset: calc( var(--calcite-internal-action-group-dividing-border-margin) - var(--calcite-border-width-sm) )}:host([overflow-mode=wrap][layout=horizontal]) .container,:host([overflow-mode=wrap][layout=vertical]) .container{position:relative;flex-wrap:wrap;align-content:flex-start;--calcite-internal-action-bar-line-gap: calc( var(--calcite-internal-action-bar-padding) + var(--calcite-internal-action-bar-gap) )}:host([overflow-mode=wrap][layout=horizontal]) ::slotted(calcite-action-group[slot=actions-start]),:host([overflow-mode=wrap][layout=vertical]) ::slotted(calcite-action-group[slot=actions-start]){padding-inline-end:0;padding-block-end:0;border-inline-end-width:0;border-block-end-width:0}:host([overflow-mode=wrap][layout=horizontal]) .container{row-gap:var(--calcite-internal-action-bar-line-gap)}:host([overflow-mode=wrap][layout=horizontal]) ::slotted(calcite-action-group:not([slot=actions-start])){margin-inline-start:calc(-1 * var(--calcite-border-width-sm));padding-inline:var(--calcite-internal-action-bar-padding) 0;border-inline-start-width:var(--calcite-border-width-sm);border-inline-end-width:0;border-image:linear-gradient(transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent calc(100% - var(--calcite-internal-action-group-dividing-border-margin)));border-image-slice:1}:host([overflow-mode=wrap][layout=horizontal]) .line{inset-inline:var(--calcite-internal-action-bar-padding);block-size:var(--calcite-border-width-sm);inset-block-start:calc(var(--calcite-internal-action-bar-line-offset, 0px) - var(--calcite-internal-action-bar-line-gap) / 2);background:linear-gradient(to right,transparent var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-bar-divider-inset)),transparent calc(100% - var(--calcite-internal-action-bar-divider-inset)))}:host([overflow-mode=wrap][layout=horizontal]) .container.has-action-groups{overflow:hidden;padding-inline-start:0;column-gap:calc(var(--calcite-internal-action-bar-gap) + var(--calcite-border-width-sm))}:host([overflow-mode=wrap][layout=horizontal]) .container.has-action-groups .action-group--start{padding-inline-start:var(--calcite-internal-action-bar-padding)}:host([overflow-mode=wrap][layout=vertical]) .container{block-size:100%;min-block-size:0;column-gap:var(--calcite-internal-action-bar-line-gap)}:host([overflow-mode=wrap][layout=vertical]) ::slotted(calcite-action-group:not([slot=actions-start])){margin-block-start:calc(-1 * var(--calcite-border-width-sm));padding-block:var(--calcite-internal-action-bar-padding) 0;border-block-start-width:var(--calcite-border-width-sm);border-block-end-width:0;border-image:linear-gradient(to right,transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent calc(100% - var(--calcite-internal-action-group-dividing-border-margin)));border-image-slice:1}:host([overflow-mode=wrap][layout=vertical]) .line{inset-block:var(--calcite-internal-action-bar-padding);inline-size:var(--calcite-border-width-sm);inset-inline-start:calc(var(--calcite-internal-action-bar-line-offset, 0px) - var(--calcite-internal-action-bar-line-gap) / 2);background:linear-gradient(to bottom,transparent var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-bar-divider-inset)),transparent calc(100% - var(--calcite-internal-action-bar-divider-inset)))}:host([overflow-mode=wrap][layout=vertical]) .container.has-action-groups{overflow:hidden;padding-block-start:0;row-gap:calc(var(--calcite-internal-action-bar-gap) + var(--calcite-border-width-sm))}:host([overflow-mode=wrap][layout=vertical]) .container.has-action-groups .action-group--start{padding-block-start:var(--calcite-internal-action-bar-padding)}:host([overflow-mode=none][layout=horizontal]) .container{overflow-x:auto}:host([overflow-mode=none][layout=vertical]) .container{overflow-y:auto}:host([hidden]){display:none}[hidden]{display:none}`,H=class extends q{constructor(){super(),this.actions=[],this.navigationItems=[],this.containerRef=x(),this.defaultSlotRef=x(),this.actionsStartSlotRef=x(),this.actionsEndSlotRef=x(),this.actionsStartGroupRef=x(),this.actionsEndGroupRef=x(),this.direction=Q(),this.defaultSlotItems=[],this.actionGroups=[],this.actionMenus=[],this.actionsStart=[],this.actionsStartGroups=[],this.actionsEnd=[],this.actionsEndGroups=[],this.automaticallyOverflowedActions=[],this.authoredMenuActions=[],this.overflowPassId=0,this.suppressedActionGroupActionsChange=new WeakMap,this.cancelable=et()(this),this.resize=tt(({width:t,height:e})=>{let{expanded:i,expandToggleDisabled:n,layout:o,expandPosition:s}=this;if(!this.el.isConnected||!this.containerRef.value)return;if(this.updateGroups(),this.usesWrap){this.scheduleLineMeasure();return}if(this.overflowMode!=="collapse"||o==="vertical"&&!e||o==="horizontal"&&!t)return;let a=this.getItemSizes(),{actionGroups:c,actionsEnd:r,actionsEndGroups:d,actionsStart:G,actionsStartGroups:T,defaultSlotItems:S}=this,g=[...T,...c,...d],h=this.hasActionsEnd||!n&&s==="end"?1:0,A=this.hasActionsStart||!n&&s==="start"?1:0,C=S.length+h+A,u=C,E=getComputedStyle(this.containerRef.value);if(u+=v(o==="horizontal"?E.paddingInlineStart:E.paddingBlockStart)+v(o==="horizontal"?E.paddingInlineEnd:E.paddingBlockEnd),g.length>0){let O=g.length-1;g.forEach((N,L)=>{let w=getComputedStyle(N),B=v(w.gap),P=this.getActionGroupItemCount(N),rt=Math.max(P-1,0);u+=B*rt,L!==O&&(u+=v(o==="horizontal"?w.paddingInlineEnd:w.paddingBlockEnd),u+=v(o==="horizontal"?w.borderInlineEndWidth:w.borderBlockEndWidth))})}let z=(O,N,L)=>{if(!N||O.length<1)return;let w=getComputedStyle(N),B=v(w.gap),P=O.length+(L?1:0);u+=B*Math.max(P-1,0)},at=!n&&s==="start",ot=!n&&s==="end";z(G,this.actionsStartGroupRef.value,at),z(r,this.actionsEndGroupRef.value,ot),C>1&&(u+=v(E.gap)*(C-1));let st=pt({bufferSize:u,containerSize:o==="horizontal"?t:e,itemSizes:a});this.runOverflowActions({actionGroups:g,expanded:i,overflowCount:st})},K.resize),this.resizeHandler=t=>{if(this.usesWrap){this.scheduleLineMeasure();return}let{width:e,height:i}=t.target&&t.target!==this.el?{width:this.el.clientWidth,height:this.el.clientHeight}:t.contentRect,n=this.layout==="horizontal"?"width":"height",o=n==="width"?e:i;this.lastOverflowAxisSize?.axis===n&&this.lastOverflowAxisSize.size===o||(this.lastOverflowAxisSize={axis:n,size:o},this.resize({width:e,height:i}))},this.resizeObserver=_("resize",t=>this.resizeHandlerEntries(t)),this.toggleExpand=()=>{this.expanded=!this.expanded,this.calciteActionBarToggle.emit()},this.messages=Z({blocking:!0}),this.focusSetter=Y()(this).setFocus,this.setExpandToggleEl=t=>{this.expandToggleEl=t,this.syncNavigationItemTabIndexes()},this.hasActionsEnd=!1,this.hasActionsStart=!1,this.hasActionGroups=!1,this.lineOffsets=[],this.floating=!1,this.expandToggleDisabled=!1,this.expanded=!1,this.expandPosition="end",this.layout="vertical",this.overflowMode="collapse",this.overlayPositioning="absolute",this.scale="m",this.selectionAppearance="neutral",this.calciteActionBarCollapse=D({cancelable:!1}),this.calciteActionBarExpand=D({cancelable:!1}),this.calciteActionBarToggle=D({cancelable:!1}),this.listen("calciteActionMenuOpen",this.actionMenuOpenHandler),this.listen("calciteInternalActionGroupActionsChange",this.handleActionGroupActionsChange),this.listen("calciteInternalActionMenuActionsChange",this.handleActionMenuActionsChange),this.listen("click",this.handleFocusIn),this.listen("keydown",this.handleKeyDown),this.listen("focusin",this.handleFocusIn)}static{this.properties={expandTooltip:[16,{},{state:!0}],hasActionsEnd:[16,{},{state:!0}],hasActionsStart:[16,{},{state:!0}],hasActionGroups:[16,{},{state:!0}],lineOffsets:[16,{},{state:!0}],actionsEndGroupLabel:1,actionsStartGroupLabel:1,floating:[7,{},{reflect:!0,type:Boolean}],expandToggleDisabled:[7,{},{reflect:!0,type:Boolean}],expanded:[7,{},{reflect:!0,type:Boolean}],expandPosition:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],overflowMode:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overflowActionsDisabled:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],position:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}]}}static{this.styles=mt}get usesWrap(){return this.overflowMode==="wrap"&&this.layout!=="grid"}get overflowActionsDisabled(){return this.overflowMode==="none"}set overflowActionsDisabled(t){j.deprecated("property",{component:this,name:"overflowActionsDisabled",removalVersion:7,suggested:'overflowMode="none"'}),this.overflowMode=t?"none":"collapse"}async overflowActions(){if(this.overflowMode!=="collapse"){this.usesWrap&&this.scheduleLineMeasure();return}this.resize({width:this.el.clientWidth,height:this.el.clientHeight})}async setFocus(t){return this.focusSetter(()=>this.el,t)}connectedCallback(){super.connectedCallback(),this.updateGroups(),this.updateNavigationItems(),this.syncNavigationItemTabIndexes(),this.overflowActions(),this.updateActions(),this.overflowActionsDisabledHandler(this.overflowActionsDisabled),this.overflowModeHandler(),this.cancelable.add(this.resize)}willUpdate(t){(t.has("expandToggleDisabled")&&(this.hasUpdated||this.expandToggleDisabled!==!1)||t.has("expandPosition")&&(this.hasUpdated||this.expandPosition!=="end"))&&this.overflowActions(),t.has("layout")&&(this.hasUpdated||this.layout!=="vertical")&&(this.updateGroups(),this.overflowModeHandler(),this.usesWrap||this.updateLines()),t.has("overflowActionsDisabled")&&(this.hasUpdated||this.overflowActionsDisabled!==!1)&&this.overflowActionsDisabledHandler(this.overflowActionsDisabled),t.has("overflowMode")&&(this.hasUpdated||this.overflowMode!=="collapse")&&(!this.usesWrap&&this.lineMeasureFrame!=null&&(cancelAnimationFrame(this.lineMeasureFrame),this.lineMeasureFrame=void 0),this.usesWrap?this.scheduleLineMeasure():this.updateLines(),this.overflowModeHandler()),t.has("expanded")&&this.hasUpdated&&(this.expandedHandler(),this.expanded?this.calciteActionBarExpand.emit():this.calciteActionBarCollapse.emit()),t.has("selectionAppearance")&&(this.hasUpdated||this.selectionAppearance!=="neutral")&&this.updateActions()}updated(){this.usesWrap&&this.lineMeasureFrame==null&&this.scheduleLineMeasure()}loaded(){this.syncDefaultSlot(),this.syncActionsStartSlot(),this.syncActionsEndSlot(),this.syncActionsState(),this.overflowActions()}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect(),this.lineMeasureFrame!=null&&(cancelAnimationFrame(this.lineMeasureFrame),this.lineMeasureFrame=void 0)}getItemSizes(){let{layout:t,expandToggleEl:e}=this,i=t==="horizontal"?"clientWidth":"clientHeight",n=this.actions.map(a=>a[i]||0);this.getTrackedActionGroups().flatMap(a=>R(a,"calcite-action-menu")).forEach(a=>{let c=(a.actions??[]).find(r=>r.slot===$.trigger);n.push((c??a)[i]||0)}),e&&n.push(e[i]||0);let s=Math.max(...n,0);return n.map(a=>a||s)}getActionGroupItemCount(t){let e=t.actions.filter(n=>n.parentElement===t),i=R(t,"calcite-action-menu").length;return e.length+i}expandedHandler(){this.syncActionsState(!0),this.overflowActions()}overflowModeHandler(){this.overflowMode==="none"?this.resizeObserver?.disconnect():this.resizeObserver?.observe(this.el),this.overflowActions()}overflowActionsDisabledHandler(t){if(t){this.resizeObserver?.disconnect();return}this.resizeObserver?.observe(this.el),this.containerRef.value&&this.resizeObserver?.observe(this.containerRef.value),this.overflowActions()}actionMenuOpenHandler(t){let e=t.composedPath(),i=e.find(n=>f(n)||b(n));i&&(f(i)&&!i.menuOpen||b(i)&&!i.open||(this.getTrackedActionGroups().forEach(n=>{e.includes(n)||(n.menuOpen=!1)}),this.getTrackedActionMenus().forEach(n=>{e.includes(n)||(n.open=!1)}),this.updateActions()))}runOverflowActions({actionGroups:t,expanded:e,overflowCount:i}){let n=++this.overflowPassId,o=t.flatMap(a=>a.actions.filter(c=>c.parentElement===a));this.automaticallyOverflowedActions=this.automaticallyOverflowedActions.filter(a=>o.includes(a)),this.authoredMenuActions=this.authoredMenuActions.filter(a=>o.includes(a)&&a.slot===m.menuActions),o.forEach(a=>{a.slot===m.menuActions&&!this.automaticallyOverflowedActions.includes(a)&&!this.authoredMenuActions.includes(a)&&this.authoredMenuActions.push(a)});let s=new Map;t.forEach(a=>{let c=a.actions.filter(r=>r.parentElement===a);s.set(a,c.map(r=>r.slot??"").join("|"))}),vt({actionGroups:t,expanded:e,overflowCount:i}),this.authoredMenuActions.forEach(a=>{a.slot=m.menuActions,a.textEnabled=!0}),this.automaticallyOverflowedActions=o.filter(a=>a.slot===m.menuActions&&!this.authoredMenuActions.includes(a)),t.forEach(a=>{let r=a.actions.filter(d=>d.parentElement===a).map(d=>d.slot??"").join("|");s.get(a)!==r&&(this.suppressedActionGroupActionsChange.set(a,n),this.queueSuppressedActionGroupActionsChangeCleanup(a,n))})}queueSuppressedActionGroupActionsChangeCleanup(t,e){queueMicrotask(()=>{this.suppressedActionGroupActionsChange.get(t)===e&&this.suppressedActionGroupActionsChange.delete(t)})}resizeHandlerEntries(t){t.forEach(this.resizeHandler)}getSectionWrapperGroups(){return[this.actionsStartGroupRef.value,this.actionsEndGroupRef.value].filter(t=>!!t)}updateGroups(){let t=[...this.actionGroups,...this.actionsStartGroups,...this.actionsEndGroups,...this.getSectionWrapperGroups()];this.hasActionGroups=this.actionGroups.length>0,t.forEach(e=>{e.layout=this.layout,e.scale=this.scale}),this.syncNavItems()}syncNavItems(){this.el.isConnected&&(this.updateNavigationItems(),this.syncNavigationItemTabIndexes(),this.updateActions())}scheduleLineMeasure(){this.lineMeasureFrame!=null&&cancelAnimationFrame(this.lineMeasureFrame),this.lineMeasureFrame=requestAnimationFrame(()=>{this.lineMeasureFrame=void 0,this.updateLines()})}getWrapItems(){let t=[],e=this.actionsStartGroupRef.value;e&&!e.hidden&&t.push(e),this.defaultSlotItems.forEach(n=>{n.hidden||t.push(n)});let i=this.actionsEndGroupRef.value;return i&&!i.hidden&&t.push(i),t}updateLines(){let t=this.containerRef.value;if(!t||!this.usesWrap){this.lineOffsets.length>0&&(this.lineOffsets=[]);return}let e=this.layout==="horizontal",i=this.direction==="rtl",n=t.getBoundingClientRect(),o=this.getWrapItems(),s=[],a=null;o.forEach(r=>{let d=gt({item:r,containerRect:n,horizontal:e,rtl:i});a!==null&&Math.abs(d-a)>1&&s.push(d),a=d}),(s.length!==this.lineOffsets.length||s.some((r,d)=>r!==this.lineOffsets[d]))&&(this.lineOffsets=s)}handleDefaultSlotChange(){this.syncSlotAndActions(()=>this.syncDefaultSlot()),this.updateGroups(),this.updateNavigationItems(),this.syncNavigationItemTabIndexes(),this.updateActions(),this.usesWrap&&this.scheduleLineMeasure()}handleActionsEndSlotChange(){this.syncSlotAndActions(()=>this.syncActionsEndSlot()),this.syncNavigationItemTabIndexes()}handleActionsStartSlotChange(){this.syncSlotAndActions(()=>this.syncActionsStartSlot()),this.syncNavigationItemTabIndexes()}handleTooltipSlotChange(t){let e=J(t).filter(it);this.expandTooltip=e[0]}updateActions(){let t=new Set(this.actions);this.getTrackedActionMenus().forEach(e=>{e.actions.forEach(i=>t.add(i))}),t.forEach(e=>{e.selectionAppearance=this.selectionAppearance})}updateNavigationItems(){let t=[...this.getNavigationItems(this.actionsStart),...this.getNavigationItems(this.defaultSlotItems),...this.getNavigationItems(this.actionsEnd)],{expandToggleEl:e}=this;this.navigationItems=e&&this.isNavigableAction(e)?this.expandPosition==="start"?[e,...t]:[...t,e]:t}getNavigationItems(t){return t.flatMap(e=>p(e)?this.isNavigableAction(e)?[e]:[]:b(e)?this.isNavigableActionMenu(e)?[e]:[]:this.getActionGroupNavigationItems(e))}getActionGroupNavigationItems(t){if(t.hasAttribute("hidden"))return[];let e=(t.actions??[]).filter(s=>this.isNavigableAction(s)),i=R(t,"calcite-action-menu").filter(s=>this.isNavigableActionMenu(s)),n=[...e,...i].sort((s,a)=>s===a?0:s.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1),{actionMenu:o}=t;return o&&this.isNavigableActionMenu(o)&&!n.includes(o)&&n.push(o),n}isNavigableAction(t){return!t.disabled&&!t.hidden&&!t.inert&&t.slot!=="menu-actions"&&!t.closest("calcite-action-menu")}isNavigableActionMenu(t){let e=t.menuButtonEl??t.actions?.find(i=>i.slot===$.trigger);return!t.hidden&&!t.inert&&!e?.disabled&&!e?.hidden&&!e?.inert}syncActions(){this.actions=ft([...this.actionsStart,...this.defaultSlotItems,...this.actionsEnd])}syncActionsAndOverflow(){this.syncActionsState(),this.overflowActions()}syncSlotAndActions(t){t(),this.syncActionsAndOverflow()}syncActionsState(t=!1){this.syncActions(),this.updateActions(),t&&lt({actions:this.actions,expandables:[...this.getTrackedActionGroups(),...this.getTrackedActionMenus(),...this.getSectionWrapperGroups()],expanded:this.expanded})}getTrackedActionGroups(){return[...this.actionGroups,...this.actionsStartGroups,...this.actionsEndGroups]}getTrackedActionMenus(){return[...this.actionMenus,...this.actionsStart,...this.actionsEnd].filter(t=>b(t))}getAssignedActionBarItems(t){return t?X(t).filter(e=>p(e)||f(e)||b(e)):[]}syncDefaultSlot(){this.defaultSlotItems=this.getAssignedActionBarItems(this.defaultSlotRef.value),this.actionGroups=this.defaultSlotItems.filter(t=>f(t)),this.actionMenus=this.defaultSlotItems.filter(t=>b(t)),this.updateGroups()}syncActionsStartSlot(){this.actionsStart=this.getAssignedActionBarItems(this.actionsStartSlotRef.value),this.actionsStartGroups=this.actionsStart.filter(t=>f(t)),this.hasActionsStart=this.actionsStart.length>0,this.updateGroups()}syncActionsEndSlot(){this.actionsEnd=this.getAssignedActionBarItems(this.actionsEndSlotRef.value),this.actionsEndGroups=this.actionsEnd.filter(t=>f(t)),this.hasActionsEnd=this.actionsEnd.length>0,this.updateGroups()}handleActionGroupActionsChange(t){let e=t.target;this.getTrackedActionGroups().includes(e)&&(this.suppressedActionGroupActionsChange.has(e)||(this.syncActionsAndOverflow(),this.syncNavigationItemTabIndexes()))}handleActionMenuActionsChange(t){let e=t.target;this.getTrackedActionMenus().includes(e)&&(this.syncActionsAndOverflow(),this.syncNavigationItemTabIndexes())}handleKeyDown(t){if((this.getEventActionMenu(t)||this.getOpenActionMenu())?.open)return t.key==="Escape",void 0;if(t.defaultPrevented)return;this.updateNavigationItems();let i=this.getNavigationItemFromEvent(t);if(!i||!this.navigationItems.length)return;if(this.layout==="grid"&&["ArrowDown","ArrowRight","ArrowUp","ArrowLeft"].includes(t.key)){let r=t.key==="ArrowDown"||t.key==="ArrowRight"?"next":"previous";this.focusNavigationItem(r,i),t.preventDefault();return}let n=this.layout!=="horizontal",o=t.composedPath().find(f),s=n?"ArrowRight":"ArrowDown",a=n?"ArrowLeft":"ArrowUp",c=i.matches("calcite-action-menu")&&!i.open;if((o?.selectionMode==="multiple"||o?.selectionMode==="none")&&(t.key===s||t.key===a)&&!c){t.preventDefault();return}if(!this.handleSecondaryArrowActionMenuOpen(t,i,n))switch(t.key){case"ArrowDown":n?(this.focusNavigationItem("next",i),t.preventDefault()):this.focusActionGroupItem("next",i,o)&&t.preventDefault();break;case"ArrowUp":n?(this.focusNavigationItem("previous",i),t.preventDefault()):this.focusActionGroupItem("previous",i,o)&&t.preventDefault();break;case"ArrowRight":n?this.focusActionGroupItem("next",i,o)&&t.preventDefault():(this.focusNavigationItem("next",i),t.preventDefault());break;case"ArrowLeft":n?this.focusActionGroupItem("previous",i,o)&&t.preventDefault():(this.focusNavigationItem("previous",i),t.preventDefault());break;case"Home":this.focusNavigationItem("first",i),t.preventDefault();break;case"End":this.focusNavigationItem("last",i),t.preventDefault();break;case"Tab":t.composedPath().some(r=>p(r)&&r.aria?.role==="menuitem")||this.setNavigationItemTabIndexes(i);break}}handleSecondaryArrowActionMenuOpen(t,e,i){if(!e.matches("calcite-action-menu")||e.open)return!1;let n=i?"ArrowRight":"ArrowDown",o=i?"ArrowLeft":"ArrowUp";return t.key!==n&&t.key!==o?!1:(t.preventDefault(),this.openActionMenuAndFocusBoundaryItem(e,t.key===n?"first":"last"),!0)}openActionMenuAndFocusBoundaryItem(t,e){t.open=!0,this.focusActionMenuBoundaryItem(t,e)}async focusActionMenuBoundaryItem(t,e){if(await t.componentOnReady(),!t.open)return;let i=t.actions.filter(o=>o.aria?.role==="menuitem"&&!o.disabled&&!o.hidden&&!o.inert);await(e==="first"?i[0]:i[i.length-1])?.setFocus({preventScroll:!0})}handleFocusIn(t){this.updateNavigationItems();let e=this.getNavigationItemFromEvent(t);if(t instanceof MouseEvent){t.detail>0&&e&&p(e)&&this.setNavigationItemTabIndexes(e);return}let i=this.getEventActionMenu(t)||this.getOpenActionMenu();if(!i?.open){if(e?.matches("calcite-action-menu")&&i){this.syncClosedActionMenu(i);return}this.syncNavigationItemTabIndexes(e??void 0)}}focusNavigationItem(t,e){let{navigationItems:i}=this,n=i.indexOf(e);if(n===-1)return;let o=n;t==="first"?o=0:t==="last"?o=i.length-1:t==="next"?o=(n+1)%i.length:o=(n-1+i.length)%i.length;let s=i[o];s&&s!==e&&s.setFocus(),this.syncNavigationItemTabIndexes(s)}focusActionGroupItem(t,e,i){if(!p(e)||!i||i.selectionMode==="multiple"||i.selectionMode==="none")return!1;let n=this.navigationItems.filter(c=>p(c)&&i.actions.includes(c)),o=n.indexOf(e);if(n.length<2||o===-1)return!1;let s=t==="next"?(o+1)%n.length:(o-1+n.length)%n.length,a=n[s];return!a||a===e?!1:(a.setFocus(),this.syncNavigationItemTabIndexes(a),!0)}getCurrentNavigationItem(){let{activeElement:t}=document;if(t instanceof HTMLElement){let i=t.matches("calcite-action, calcite-action-menu")?t:t.closest("calcite-action, calcite-action-menu");if(i&&this.navigationItems.includes(i))return i;let n=t.closest("calcite-action-menu");if(n){let o=this.navigationItems.find(s=>s===n);if(o)return o}}let e=this.getCurrentFocusItem();return e||this.getDefaultNavigationItem()}getCurrentFocusItem(){let{currentFocusItem:t}=this;return t?this.navigationItems.find(e=>e===t):void 0}getDefaultNavigationItem(){return this.navigationItems.find(t=>p(t)&&t!==this.expandToggleEl)||this.navigationItems[0]}getEventActionMenu(t){let e=t.composedPath().find(n=>n instanceof HTMLElement&&n.matches("calcite-action-menu"));if(e)return e;let i=t.target;if(i instanceof HTMLElement){let n=i.closest("calcite-action-menu");if(n)return n}return null}getOpenActionMenu(){return this.navigationItems.find(t=>t.matches("calcite-action-menu")&&t.open)}syncClosedActionMenu(t){this.updateNavigationItems();let e=this.navigationItems.find(i=>i===t);e&&this.setNavigationItemTabIndexes(e)}getNavigationItemFromEvent(t){for(let e of t.composedPath()){if(!(e instanceof HTMLElement)||!e.matches("calcite-action, calcite-action-menu"))continue;let i=this.navigationItems.find(o=>o===e);if(i)return i;let n=e.closest("calcite-action-menu");if(n){let o=this.navigationItems.find(s=>s===n);if(o)return o}}return null}syncNavigationItemTabIndexes(t){this.updateNavigationItems();let i=(t?this.navigationItems.find(n=>n===t):void 0)||this.getCurrentNavigationItem();i&&(this.setNavigationItemTabIndexes(i),this.updateActions())}setNavigationItemTabIndexes(t){t.matches(":focus-within")&&(this.currentFocusItem=t),this.navigationItems.forEach(e=>{let i=e===t;if(p(e)){i&&!e.disabled&&!e.hidden?e.removeAttribute("tabindex"):e.tabIndex=-1;return}i?e.removeAttribute("tabindex"):e.tabIndex=-1;let{menuButtonEl:n}=e;n&&(i&&!e.open?n.removeAttribute("tabindex"):n.tabIndex=-1)})}renderExpandTooltipSlot(){return I`<slot name=${F.expandTooltip} @slotchange=${this.handleTooltipSlotChange}></slot>`}renderExpandToggle(){let{el:t,expanded:e,toggleExpand:i,messages:n,position:o,scale:s}=this;return ht({collapseLabel:n.collapseLabel,collapseText:n.collapse,direction:this.direction,el:t,expanded:e,expandLabel:n.expandLabel,expandText:n.expand,position:o,ref:this.setExpandToggleEl,scale:s,toggle:i,tooltip:this.expandTooltip})}renderActionsGroup(t){let{expandToggleDisabled:e,scale:i,layout:n,overlayPositioning:o,expandPosition:s}=this,a=t==="start",c=!e&&s===t,r=a?this.hasActionsStart:this.hasActionsEnd,d=a?F.actionsStart:F.actionsEnd,G=a?this.handleActionsStartSlotChange:this.handleActionsEndSlotChange,T=a?this.actionsStartGroupLabel:this.actionsEndGroupLabel,S=!c&&!r&&!(a?this.hasActionsStart:this.hasActionsEnd),g=a?this.actionsStartGroupRef:this.actionsEndGroupRef,h=a?this.actionsStartSlotRef:this.actionsEndSlotRef,A=c?this.renderExpandToggle():null;return I`<calcite-action-group class=${k({[y.actionGroupStart]:a,[y.actionGroupEnd]:!a})} .hidden=${S} .label=${T} .layout=${n} .overlayPositioning=${o} .scale=${i} ${M(g)}>${a?A:null}<slot name=${d??W} @slotchange=${G} ${M(h)}></slot>${c?this.renderExpandTooltipSlot():null}${a?null:A}</calcite-action-group>`}render(){let t=this.layout==="horizontal"?"horizontal":"vertical";return I`<div .ariaOrientation=${t} class=${k({[y.container]:!0,[y.hasActionGroups]:this.hasActionGroups})} role=toolbar ${M(this.containerRef)}>${this.renderActionsGroup("start")}<slot @slotchange=${this.handleDefaultSlotChange} ${M(this.defaultSlotRef)}></slot>${this.renderActionsGroup("end")}${this.usesWrap?I`<div aria-hidden=true class=${k(y.lineOverlay)}>${this.lineOffsets.map(e=>I`<div class=${k(y.line)} style=${`--calcite-internal-action-bar-line-offset: ${e}px`}></div>`)}</div>`:null}</div>`}};V("calcite-action-bar",H);export{H as ActionBar};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as u}from"./SPMNI4RN.js";import{a as p}from"./IUWTLP2K.js";import"./VMHJHFFS.js";import"./KNHRMOQB.js";import"./BPZZDPGH.js";import"./RRBGCYLX.js";import{G as n,H as t,L as s,T as d,g as c,h as l,p as r}from"./WWTG7ZPG.js";var o={container:"container",dividerContainer:"divider-container",divider:"divider"},h={trigger:"trigger"},e={chevronDown:"chevronDown",caretDown:"caretDown",ellipsis:"ellipsis",handleVertical:"handle-vertical"},b=c`:host([disabled]){opacity:var(--calcite-opacity-disabled);cursor:default;-webkit-user-select:none;user-select:none}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block}:host([width=auto]){inline-size:auto}:host([width=full]){inline-size:100%}:host([kind=brand]){--calcite-internal-split-button-divider-border-color: var(--calcite-color-brand);--calcite-internal-split-button-divider-color: var( --calcite-theme-color-surface-2, var(--calcite-color-foreground-1) )}:host([kind=danger]){--calcite-internal-split-button-divider-border-color: var(--calcite-color-status-danger);--calcite-internal-split-button-divider-color: var( --calcite-theme-color-surface-2, var(--calcite-color-foreground-1) )}:host([kind=neutral]){--calcite-internal-split-button-divider-border-color: var( --calcite-theme-color-surface-4, var(--calcite-color-foreground-3) );--calcite-internal-split-button-divider-color: var(--calcite-color-text-1)}:host([kind=inverse]){--calcite-internal-split-button-divider-border-color: var(--calcite-color-inverse);--calcite-internal-split-button-divider-color: var( --calcite-theme-color-surface-2, var(--calcite-color-foreground-1) )}:host([appearance=transparent]){--calcite-internal-split-button-divider-border-color: transparent}:host([appearance=transparent]):host([kind=brand]){--calcite-internal-split-button-divider-color: var(--calcite-color-brand)}:host([appearance=transparent]):host([kind=danger]){--calcite-internal-split-button-divider-color: var(--calcite-color-status-danger)}:host([appearance=transparent]):host([kind=neutral]){--calcite-internal-split-button-divider-color: var(--calcite-color-text-1)}:host([appearance=transparent]):host([kind=inverse]){--calcite-internal-split-button-divider-color: var( --calcite-theme-color-surface-2, var(--calcite-color-foreground-1) )}:host([appearance=outline]):host([kind=brand]),:host([appearance=outline]):host([kind=danger]),:host([appearance=outline]):host([kind=neutral]),:host([appearance=outline]):host([kind=inverse]){--calcite-internal-split-button-divider-border-color: transparent}:host([appearance=outline-fill]):host([kind=brand]),:host([appearance=outline-fill]):host([kind=danger]),:host([appearance=outline-fill]):host([kind=neutral]),:host([appearance=outline-fill]):host([kind=inverse]){--calcite-internal-split-button-divider-border-color: var( --calcite-theme-color-surface-1, var(--calcite-color-background) )}:host([appearance=outline]):host([kind=brand]),:host([appearance=outline-fill]):host([kind=brand]){--calcite-internal-split-button-divider-color: var(--calcite-color-brand)}:host([appearance=outline]):host([kind=danger]),:host([appearance=outline-fill]):host([kind=danger]){--calcite-internal-split-button-divider-color: var(--calcite-color-status-danger)}:host([appearance=outline]):host([kind=neutral]),:host([appearance=outline-fill]):host([kind=neutral]){--calcite-internal-split-button-divider-color: var(--calcite-color-border-1)}:host([appearance=outline]):host([kind=inverse]),:host([appearance=outline-fill]):host([kind=inverse]){--calcite-internal-split-button-divider-color: var(--calcite-color-inverse)}.container{display:flex;align-items:stretch}.container>calcite-dropdown>calcite-button{block-size:100%;vertical-align:top}.divider-container{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;display:flex;inline-size:var(--calcite-space-px);align-items:stretch;background-color:var(--calcite-split-button-divider-color, var(--calcite-internal-split-button-divider-border-color))}.divider{margin-block:var(--calcite-space-2xs);display:inline-block;inline-size:var(--calcite-space-px);background-color:var(--calcite-split-button-divider-border-color, var(--calcite-internal-split-button-divider-color))}:host([appearance=outline-fill]) .divider-container,:host([appearance=outline]) .divider-container{border-block:1px solid var(--calcite-internal-split-button-divider-color)}:host([appearance=outline-fill]):hover .divider-container,:host([appearance=outline]):hover .divider-container{background-color:var(--calcite-internal-split-button-divider-color)}:host([appearance=outline-fill]:hover) .divider-container,:host([appearance=outline]:hover) .divider-container{background-color:var(--calcite-internal-split-button-divider-color)}:host([appearance=outline-fill]:focus-within):host([kind=brand]),:host([appearance=outline]:focus-within):host([kind=brand]){--calcite-internal-split-button-divider-color: var(--calcite-color-brand-press)}:host([appearance=outline-fill]:focus-within):host([kind=danger]),:host([appearance=outline]:focus-within):host([kind=danger]){--calcite-internal-split-button-divider-color: var(--calcite-color-danger-press)}:host([appearance=outline-fill]:focus-within) .divider-container,:host([appearance=outline]:focus-within) .divider-container{background-color:var(--calcite-internal-split-button-divider-color)}calcite-button[split-child=primary],calcite-button[split-child=secondary]{--calcite-button-background-color: var(--calcite-split-button-background-color);--calcite-button-border-color: var(--calcite-split-button-border-color);--calcite-button-text-color: var(--calcite-split-button-text-color);--calcite-button-icon-color: var(--calcite-split-button-icon-color);--calcite-button-loading-color: var(--calcite-split-button-loading-color);--calcite-button-shadow: var(--calcite-split-button-shadow)}calcite-button[split-child=primary]:hover,calcite-button[split-child=secondary]:hover{--calcite-button-background-color: var(--calcite-split-button-background-color-hover)}calcite-button[split-child=primary]:focus,calcite-button[split-child=secondary]:focus{--calcite-button-background-color: var(--calcite-split-button-background-color-focus)}calcite-button[split-child=primary]:active,calcite-button[split-child=secondary]:active{--calcite-button-background-color: var(--calcite-split-button-background-color-press)}calcite-button[split-child=primary]{--calcite-button-corner-radius: var(--calcite-split-button-corner-radius, var(--calcite-corner-radius)) var(--calcite-corner-radius-none) var(--calcite-corner-radius-none) var(--calcite-split-button-corner-radius, var(--calcite-corner-radius))}calcite-button[split-child=secondary]{--calcite-button-corner-radius: var(--calcite-corner-radius-none) var(--calcite-split-button-corner-radius, var(--calcite-corner-radius)) var(--calcite-split-button-corner-radius, var(--calcite-corner-radius)) var(--calcite-corner-radius-none)}calcite-dropdown{--calcite-dropdown-shadow: var(--calcite-split-button-dropdown-shadow);--calcite-dropdown-background-color: var(--calcite-split-button-dropdown-background-color);--calcite-dropdown-width: var(--calcite-split-button-dropdown-width)}:host([disabled]) calcite-dropdown>calcite-button{pointer-events:none}:host([disabled]):host([appearance=outline-fill]) .divider-container{background-color:var(--calcite-theme-color-surface-1, var(--calcite-color-background))}:host([disabled]):host([appearance=outline]) .divider-container{background-color:transparent}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:var(--calcite-opacity-full)}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,a=class extends n{constructor(){super(...arguments),this.focusSetter=p()(this).setFocus,this.interactiveContainer=u(this),this.active=!1,this.appearance="solid",this.disabled=!1,this.download=!1,this.dropdownIconType="chevron",this.kind="brand",this.loading=!1,this.overlayPositioning="absolute",this.placement="bottom-end",this.scale="m",this.topLayerDisabled=!1,this.width="auto",this.calciteSplitButtonPrimaryClick=r({cancelable:!1}),this.calciteSplitButtonSecondaryClick=r({cancelable:!1})}static{this.properties={active:[7,{},{reflect:!0,type:Boolean}],appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],download:[3,{converter:s},{reflect:!0}],dropdownIconType:[3,{},{reflect:!0}],dropdownLabel:[3,{},{reflect:!0}],flipPlacements:[0,{},{attribute:!1}],href:[3,{},{reflect:!0}],kind:[3,{},{reflect:!0}],loading:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],rel:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],primaryIconEnd:[3,{},{reflect:!0}],primaryIconFlipRtl:[3,{},{reflect:!0}],primaryIconStart:[3,{},{reflect:!0}],primaryLabel:[3,{},{reflect:!0}],primaryText:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],target:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],width:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=b}get dropdownIcon(){return this.dropdownIconType==="chevron"?e.chevronDown:this.dropdownIconType==="caret"?e.caretDown:this.dropdownIconType==="ellipsis"?e.ellipsis:e.handleVertical}async setFocus(i){return this.focusSetter(()=>this.el,i)}calciteSplitButtonPrimaryClickHandler(){this.calciteSplitButtonPrimaryClick.emit()}calciteSplitButtonSecondaryClickHandler(){this.calciteSplitButtonSecondaryClick.emit()}render(){let i=this.width==="auto"?"auto":"full";return this.interactiveContainer({disabled:this.disabled,children:l`<div class=${t(o.container)}><calcite-button .appearance=${this.appearance} .disabled=${this.disabled} .download=${this.download} .href=${this.href} .iconEnd=${this.primaryIconEnd} .iconFlipRtl=${this.primaryIconFlipRtl} .iconStart=${this.primaryIconStart} .kind=${this.kind} .label=${this.primaryLabel} .loading=${this.loading} @click=${this.calciteSplitButtonPrimaryClickHandler} .rel=${this.rel} .scale=${this.scale} split-child=primary .target=${this.target} type=button .width=${i}>${this.primaryText}</calcite-button><div class=${t(o.dividerContainer)}><div class=${t(o.divider)}></div></div><calcite-dropdown .disabled=${this.disabled} .flipPlacements=${this.flipPlacements} @click=${this.calciteSplitButtonSecondaryClickHandler} .open=${this.active} .overlayPositioning=${this.overlayPositioning} .placement=${this.placement} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled} .widthScale=${this.scale}><calcite-button .appearance=${this.appearance} .disabled=${this.disabled} .iconStart=${this.dropdownIcon} .kind=${this.kind} .label=${this.dropdownLabel} .scale=${this.scale} slot=${h.trigger} split-child=secondary type=button></calcite-button><slot></slot></calcite-dropdown></div>`})}};d("calcite-split-button",a);export{a as SplitButton};
2
+ import{a as u}from"./LQASX2YS.js";import{a as p}from"./3GHBWG5F.js";import"./VMHJHFFS.js";import"./XJJYF3O2.js";import"./M7WEPGCG.js";import"./RRBGCYLX.js";import{G as n,H as t,L as s,T as d,g as c,h as l,p as r}from"./KYNZ6MSZ.js";var o={container:"container",dividerContainer:"divider-container",divider:"divider"},h={trigger:"trigger"},e={chevronDown:"chevronDown",caretDown:"caretDown",ellipsis:"ellipsis",handleVertical:"handle-vertical"},b=c`:host([disabled]){opacity:var(--calcite-opacity-disabled);cursor:default;-webkit-user-select:none;user-select:none}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block}:host([width=auto]){inline-size:auto}:host([width=full]){inline-size:100%}:host([kind=brand]){--calcite-internal-split-button-divider-border-color: var(--calcite-color-brand);--calcite-internal-split-button-divider-color: var( --calcite-theme-color-surface-2, var(--calcite-color-foreground-1) )}:host([kind=danger]){--calcite-internal-split-button-divider-border-color: var(--calcite-color-status-danger);--calcite-internal-split-button-divider-color: var( --calcite-theme-color-surface-2, var(--calcite-color-foreground-1) )}:host([kind=neutral]){--calcite-internal-split-button-divider-border-color: var( --calcite-theme-color-surface-4, var(--calcite-color-foreground-3) );--calcite-internal-split-button-divider-color: var(--calcite-color-text-1)}:host([kind=inverse]){--calcite-internal-split-button-divider-border-color: var(--calcite-color-inverse);--calcite-internal-split-button-divider-color: var( --calcite-theme-color-surface-2, var(--calcite-color-foreground-1) )}:host([appearance=transparent]){--calcite-internal-split-button-divider-border-color: transparent}:host([appearance=transparent]):host([kind=brand]){--calcite-internal-split-button-divider-color: var(--calcite-color-brand)}:host([appearance=transparent]):host([kind=danger]){--calcite-internal-split-button-divider-color: var(--calcite-color-status-danger)}:host([appearance=transparent]):host([kind=neutral]){--calcite-internal-split-button-divider-color: var(--calcite-color-text-1)}:host([appearance=transparent]):host([kind=inverse]){--calcite-internal-split-button-divider-color: var( --calcite-theme-color-surface-2, var(--calcite-color-foreground-1) )}:host([appearance=outline]):host([kind=brand]),:host([appearance=outline]):host([kind=danger]),:host([appearance=outline]):host([kind=neutral]),:host([appearance=outline]):host([kind=inverse]){--calcite-internal-split-button-divider-border-color: transparent}:host([appearance=outline-fill]):host([kind=brand]),:host([appearance=outline-fill]):host([kind=danger]),:host([appearance=outline-fill]):host([kind=neutral]),:host([appearance=outline-fill]):host([kind=inverse]){--calcite-internal-split-button-divider-border-color: var( --calcite-theme-color-surface-1, var(--calcite-color-background) )}:host([appearance=outline]):host([kind=brand]),:host([appearance=outline-fill]):host([kind=brand]){--calcite-internal-split-button-divider-color: var(--calcite-color-brand)}:host([appearance=outline]):host([kind=danger]),:host([appearance=outline-fill]):host([kind=danger]){--calcite-internal-split-button-divider-color: var(--calcite-color-status-danger)}:host([appearance=outline]):host([kind=neutral]),:host([appearance=outline-fill]):host([kind=neutral]){--calcite-internal-split-button-divider-color: var(--calcite-color-border-1)}:host([appearance=outline]):host([kind=inverse]),:host([appearance=outline-fill]):host([kind=inverse]){--calcite-internal-split-button-divider-color: var(--calcite-color-inverse)}.container{display:flex;align-items:stretch}.container>calcite-dropdown>calcite-button{block-size:100%;vertical-align:top}.divider-container{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;display:flex;inline-size:var(--calcite-space-px);align-items:stretch;background-color:var(--calcite-split-button-divider-color, var(--calcite-internal-split-button-divider-border-color))}.divider{margin-block:var(--calcite-space-2xs);display:inline-block;inline-size:var(--calcite-space-px);background-color:var(--calcite-split-button-divider-border-color, var(--calcite-internal-split-button-divider-color))}:host([appearance=outline-fill]) .divider-container,:host([appearance=outline]) .divider-container{border-block:1px solid var(--calcite-internal-split-button-divider-color)}:host([appearance=outline-fill]):hover .divider-container,:host([appearance=outline]):hover .divider-container{background-color:var(--calcite-internal-split-button-divider-color)}:host([appearance=outline-fill]:hover) .divider-container,:host([appearance=outline]:hover) .divider-container{background-color:var(--calcite-internal-split-button-divider-color)}:host([appearance=outline-fill]:focus-within):host([kind=brand]),:host([appearance=outline]:focus-within):host([kind=brand]){--calcite-internal-split-button-divider-color: var(--calcite-color-brand-press)}:host([appearance=outline-fill]:focus-within):host([kind=danger]),:host([appearance=outline]:focus-within):host([kind=danger]){--calcite-internal-split-button-divider-color: var(--calcite-color-danger-press)}:host([appearance=outline-fill]:focus-within) .divider-container,:host([appearance=outline]:focus-within) .divider-container{background-color:var(--calcite-internal-split-button-divider-color)}calcite-button[split-child=primary],calcite-button[split-child=secondary]{--calcite-button-background-color: var(--calcite-split-button-background-color);--calcite-button-border-color: var(--calcite-split-button-border-color);--calcite-button-text-color: var(--calcite-split-button-text-color);--calcite-button-icon-color: var(--calcite-split-button-icon-color);--calcite-button-loading-color: var(--calcite-split-button-loading-color);--calcite-button-shadow: var(--calcite-split-button-shadow)}calcite-button[split-child=primary]:hover,calcite-button[split-child=secondary]:hover{--calcite-button-background-color: var(--calcite-split-button-background-color-hover)}calcite-button[split-child=primary]:focus,calcite-button[split-child=secondary]:focus{--calcite-button-background-color: var(--calcite-split-button-background-color-focus)}calcite-button[split-child=primary]:active,calcite-button[split-child=secondary]:active{--calcite-button-background-color: var(--calcite-split-button-background-color-press)}calcite-button[split-child=primary]{--calcite-button-corner-radius: var(--calcite-split-button-corner-radius, var(--calcite-corner-radius)) var(--calcite-corner-radius-none) var(--calcite-corner-radius-none) var(--calcite-split-button-corner-radius, var(--calcite-corner-radius))}calcite-button[split-child=secondary]{--calcite-button-corner-radius: var(--calcite-corner-radius-none) var(--calcite-split-button-corner-radius, var(--calcite-corner-radius)) var(--calcite-split-button-corner-radius, var(--calcite-corner-radius)) var(--calcite-corner-radius-none)}calcite-dropdown{--calcite-dropdown-shadow: var(--calcite-split-button-dropdown-shadow);--calcite-dropdown-background-color: var(--calcite-split-button-dropdown-background-color);--calcite-dropdown-width: var(--calcite-split-button-dropdown-width)}:host([disabled]) calcite-dropdown>calcite-button{pointer-events:none}:host([disabled]):host([appearance=outline-fill]) .divider-container{background-color:var(--calcite-theme-color-surface-1, var(--calcite-color-background))}:host([disabled]):host([appearance=outline]) .divider-container{background-color:transparent}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:var(--calcite-opacity-full)}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,a=class extends n{constructor(){super(...arguments),this.focusSetter=p()(this).setFocus,this.interactiveContainer=u(this),this.active=!1,this.appearance="solid",this.disabled=!1,this.download=!1,this.dropdownIconType="chevron",this.kind="brand",this.loading=!1,this.overlayPositioning="absolute",this.placement="bottom-end",this.scale="m",this.topLayerDisabled=!1,this.width="auto",this.calciteSplitButtonPrimaryClick=r({cancelable:!1}),this.calciteSplitButtonSecondaryClick=r({cancelable:!1})}static{this.properties={active:[7,{},{reflect:!0,type:Boolean}],appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],download:[3,{converter:s},{reflect:!0}],dropdownIconType:[3,{},{reflect:!0}],dropdownLabel:[3,{},{reflect:!0}],flipPlacements:[0,{},{attribute:!1}],href:[3,{},{reflect:!0}],kind:[3,{},{reflect:!0}],loading:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],rel:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],primaryIconEnd:[3,{},{reflect:!0}],primaryIconFlipRtl:[3,{},{reflect:!0}],primaryIconStart:[3,{},{reflect:!0}],primaryLabel:[3,{},{reflect:!0}],primaryText:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],target:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],width:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=b}get dropdownIcon(){return this.dropdownIconType==="chevron"?e.chevronDown:this.dropdownIconType==="caret"?e.caretDown:this.dropdownIconType==="ellipsis"?e.ellipsis:e.handleVertical}async setFocus(i){return this.focusSetter(()=>this.el,i)}calciteSplitButtonPrimaryClickHandler(){this.calciteSplitButtonPrimaryClick.emit()}calciteSplitButtonSecondaryClickHandler(){this.calciteSplitButtonSecondaryClick.emit()}render(){let i=this.width==="auto"?"auto":"full";return this.interactiveContainer({disabled:this.disabled,children:l`<div class=${t(o.container)}><calcite-button .appearance=${this.appearance} .disabled=${this.disabled} .download=${this.download} .href=${this.href} .iconEnd=${this.primaryIconEnd} .iconFlipRtl=${this.primaryIconFlipRtl} .iconStart=${this.primaryIconStart} .kind=${this.kind} .label=${this.primaryLabel} .loading=${this.loading} @click=${this.calciteSplitButtonPrimaryClickHandler} .rel=${this.rel} .scale=${this.scale} split-child=primary .target=${this.target} type=button .width=${i}>${this.primaryText}</calcite-button><div class=${t(o.dividerContainer)}><div class=${t(o.divider)}></div></div><calcite-dropdown .disabled=${this.disabled} .flipPlacements=${this.flipPlacements} @click=${this.calciteSplitButtonSecondaryClickHandler} .open=${this.active} .overlayPositioning=${this.overlayPositioning} .placement=${this.placement} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled} .widthScale=${this.scale}><calcite-button .appearance=${this.appearance} .disabled=${this.disabled} .iconStart=${this.dropdownIcon} .kind=${this.kind} .label=${this.dropdownLabel} .scale=${this.scale} slot=${h.trigger} split-child=secondary type=button></calcite-button><slot></slot></calcite-dropdown></div>`})}};d("calcite-split-button",a);export{a as SplitButton};