@esri/calcite-components 5.1.0-next.37 → 5.1.0-next.39

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 (162) hide show
  1. package/dist/cdn/{7ELEQQWQ.js → 2EYQO5RO.js} +1 -1
  2. package/dist/cdn/{D2QDHCMY.js → 2G6BBCKC.js} +1 -1
  3. package/dist/cdn/{VJ2J57GV.js → 2ICXHDMT.js} +1 -1
  4. package/dist/cdn/{UDEHRQ25.js → 2RXW5MM2.js} +1 -1
  5. package/dist/cdn/{QFYAIO5N.js → 2UT6QW2P.js} +1 -1
  6. package/dist/cdn/{THUID5TW.js → 2WAGXSA4.js} +1 -1
  7. package/dist/cdn/{Y3PVIYC3.js → 3A3IFNH2.js} +1 -1
  8. package/dist/cdn/{B66RZWEP.js → 3LRRD5QE.js} +1 -1
  9. package/dist/cdn/{DADGM6BU.js → 3NU2NHGS.js} +1 -1
  10. package/dist/cdn/{DCW27CRD.js → 4ADUFYOA.js} +1 -1
  11. package/dist/cdn/{TC2HYHNQ.js → 4LSB2ECA.js} +1 -1
  12. package/dist/cdn/{X7BSBNJI.js → 4OQTPZUU.js} +1 -1
  13. package/dist/cdn/{YOOTQTCX.js → 4XCVBYLO.js} +1 -1
  14. package/dist/cdn/{VZCQPI2Z.js → 5ZLBJZJ7.js} +1 -1
  15. package/dist/cdn/{SJBCYNKJ.js → 65TWUVGB.js} +1 -1
  16. package/dist/cdn/{KMKQ2PDF.js → 65ZQSQR3.js} +1 -1
  17. package/dist/cdn/{XYFPAJQH.js → 6EFNLPWX.js} +1 -1
  18. package/dist/cdn/{FDD2T3QH.js → 6H3SVFHY.js} +1 -1
  19. package/dist/cdn/{ZY7IR2MX.js → 6LSTPHZI.js} +1 -1
  20. package/dist/cdn/{6T4XEKDN.js → 73ZPWB5U.js} +1 -1
  21. package/dist/cdn/{CFBOYHB5.js → 7EPQUNDP.js} +1 -1
  22. package/dist/cdn/{APM6UXYQ.js → 7INJNSBW.js} +1 -1
  23. package/dist/cdn/{MMRBA6UD.js → 7YEZBQKK.js} +1 -1
  24. package/dist/cdn/{SSHSLGXN.js → ABZDHJA3.js} +1 -1
  25. package/dist/cdn/{7WF2XM47.js → AGKZCLV2.js} +1 -1
  26. package/dist/cdn/{XEF64NRG.js → AJB3JF2J.js} +1 -1
  27. package/dist/cdn/{FAW4OXCP.js → ANRSISGB.js} +1 -1
  28. package/dist/cdn/{W6N4HMDN.js → AVLAPBUL.js} +2 -2
  29. package/dist/cdn/{CY6WXSCS.js → BCWGIFQ6.js} +1 -1
  30. package/dist/cdn/{F7XH47OP.js → BHKYM4DE.js} +1 -1
  31. package/dist/cdn/{KEQVRTL2.js → BJFQLJO4.js} +1 -1
  32. package/dist/cdn/{GUVLUFKF.js → BNFEZZPA.js} +1 -1
  33. package/dist/cdn/{6QVWUACM.js → BUWOMRIE.js} +1 -1
  34. package/dist/cdn/{HQFY6IIR.js → CN5DO72Y.js} +1 -1
  35. package/dist/cdn/{JHX52U3K.js → CVLLF5SX.js} +1 -1
  36. package/dist/cdn/{ZTFQHI4R.js → CXKSB7FV.js} +1 -1
  37. package/dist/cdn/{4MGT4NXS.js → D4I6VIFB.js} +1 -1
  38. package/dist/cdn/{JLKXEEIC.js → DKAAW4WM.js} +1 -1
  39. package/dist/cdn/{EBBX2KYW.js → DL2AD5RL.js} +1 -1
  40. package/dist/cdn/{FEOPEQVF.js → DLW23V3J.js} +1 -1
  41. package/dist/cdn/{LILTOAS3.js → DODZHVRZ.js} +1 -1
  42. package/dist/cdn/{DQ6X4MHR.js → DY4IAYUM.js} +1 -1
  43. package/dist/cdn/{T6HQUAOY.js → EJDQLGLV.js} +1 -1
  44. package/dist/cdn/{UQDWRBRM.js → EM5P6HTS.js} +1 -1
  45. package/dist/cdn/{CLACOPPW.js → FEULY56M.js} +1 -1
  46. package/dist/cdn/{5WT657AA.js → FLNUHL3P.js} +1 -1
  47. package/dist/cdn/{3AMEP6UM.js → FOOYJIFF.js} +1 -1
  48. package/dist/cdn/{GRBFY2CP.js → FZBFKTSY.js} +1 -1
  49. package/dist/cdn/{DCRUR5I4.js → GJMGUX3J.js} +1 -1
  50. package/dist/cdn/{ECPEDRI4.js → GMBLIV5K.js} +1 -1
  51. package/dist/cdn/{C46PKVNM.js → GYAUHSN4.js} +1 -1
  52. package/dist/cdn/{JRTZINC4.js → H2NNFIY3.js} +1 -1
  53. package/dist/cdn/{MUIXFS3K.js → H3MNG2YW.js} +1 -1
  54. package/dist/cdn/{RNKA2SW6.js → H5COXEYQ.js} +1 -1
  55. package/dist/cdn/{QE3LUEOT.js → HA7QTDUX.js} +1 -1
  56. package/dist/cdn/{LXTFSRMX.js → HAUPYF5T.js} +1 -1
  57. package/dist/cdn/{NIOVXTJG.js → HDK34IOG.js} +1 -1
  58. package/dist/cdn/{FWDN6JQX.js → HGCMRJQI.js} +1 -1
  59. package/dist/cdn/{VB4UZYZC.js → HWH7NSBW.js} +1 -1
  60. package/dist/cdn/{XIVCGC5P.js → IHIZ4KBV.js} +1 -1
  61. package/dist/cdn/{L4TWDV3P.js → IMKD5CR5.js} +1 -1
  62. package/dist/cdn/{47PHWBPZ.js → J3BMSM22.js} +1 -1
  63. package/dist/cdn/{YZPG2WAU.js → JEU53YDF.js} +1 -1
  64. package/dist/cdn/{TOWONFBW.js → JIPLU34Z.js} +1 -1
  65. package/dist/cdn/{P6W2NJEA.js → JKRIHM2F.js} +1 -1
  66. package/dist/cdn/{MNKYBFH6.js → JQQO4E5K.js} +1 -1
  67. package/dist/cdn/{6MALQSRM.js → JVEMJGWM.js} +1 -1
  68. package/dist/cdn/{LF6DFSG4.js → K27SYFRQ.js} +1 -1
  69. package/dist/cdn/{NSDCJ7OE.js → KA5J5VOO.js} +1 -1
  70. package/dist/cdn/{7OBKNMFG.js → KADJM46T.js} +1 -1
  71. package/dist/cdn/{ZA2N6Q2Y.js → KEJHAUIK.js} +1 -1
  72. package/dist/cdn/{ROBRFQUB.js → KG7F6GFL.js} +1 -1
  73. package/dist/cdn/{L7ZNMTWP.js → KGXO3BRP.js} +1 -1
  74. package/dist/cdn/{WCC3O3WR.js → LAR632IC.js} +1 -1
  75. package/dist/cdn/{O7UHKJFJ.js → LGKD7NXS.js} +1 -1
  76. package/dist/cdn/{PRDEYDG5.js → LII5WM27.js} +1 -1
  77. package/dist/cdn/{TJSWJBHU.js → LJR5TCGE.js} +1 -1
  78. package/dist/cdn/{TG2V3PD6.js → LSPPTTY7.js} +1 -1
  79. package/dist/cdn/{KCX5MLEP.js → LXP6KXCM.js} +1 -1
  80. package/dist/cdn/{II7KRIYC.js → MD7CKNSJ.js} +1 -1
  81. package/dist/cdn/{UQLK4HWA.js → MD7RLOIC.js} +1 -1
  82. package/dist/cdn/{67URAIAY.js → MNMSTOGW.js} +1 -1
  83. package/dist/cdn/{LYPJGGLG.js → MNQ7RBBX.js} +1 -1
  84. package/dist/cdn/{5VWVHZVR.js → MZF2VR2T.js} +1 -1
  85. package/dist/cdn/{DZHW7OZI.js → N474TOZ4.js} +1 -1
  86. package/dist/cdn/{JBFCD7FG.js → NB54XJ7H.js} +1 -1
  87. package/dist/cdn/{WB7H7E6J.js → NHW7JG5W.js} +1 -1
  88. package/dist/cdn/{DBDQXBT4.js → NW4ACYLP.js} +1 -1
  89. package/dist/cdn/{QFFHODL3.js → OULARRVO.js} +1 -1
  90. package/dist/cdn/{FQWCNEV3.js → OXFDZYMM.js} +1 -1
  91. package/dist/cdn/{BM6PLXLN.js → PBQDEBPA.js} +1 -1
  92. package/dist/cdn/{ENVEMBSE.js → PGZP6RKU.js} +1 -1
  93. package/dist/cdn/{LK7TV6ES.js → PLQSKRB2.js} +1 -1
  94. package/dist/cdn/{CBU57T2K.js → PSPER4WF.js} +1 -1
  95. package/dist/cdn/{FKOPLDSR.js → Q64GOVA4.js} +1 -1
  96. package/dist/cdn/{HDXU7E5F.js → QAVEKTQL.js} +1 -1
  97. package/dist/cdn/{RGB6SXBT.js → QBM3MM5B.js} +1 -1
  98. package/dist/cdn/{742UAGA2.js → QECXVTW6.js} +1 -1
  99. package/dist/cdn/{3PDJRR3M.js → QFQTYQCH.js} +1 -1
  100. package/dist/cdn/{FW4KB235.js → RBW3KVLR.js} +1 -1
  101. package/dist/cdn/{BJDNT32R.js → RCBOSOCJ.js} +1 -1
  102. package/dist/cdn/{C3MG4CM5.js → RD67Y6U6.js} +1 -1
  103. package/dist/cdn/{VLLYES47.js → RFSDXX3Q.js} +1 -1
  104. package/dist/cdn/{SMNM4XDR.js → RLE32A2Q.js} +1 -1
  105. package/dist/cdn/{LSEGCMR3.js → RRMXYXQO.js} +1 -1
  106. package/dist/cdn/{GS75MLSQ.js → RTRAWD3Y.js} +1 -1
  107. package/dist/cdn/{5JMSXNN3.js → RW6S27U2.js} +1 -1
  108. package/dist/cdn/{ER6CZ6JO.js → SRQUQHD2.js} +1 -1
  109. package/dist/cdn/{GMNUTTK7.js → SURF6YPL.js} +1 -1
  110. package/dist/cdn/{AASJWLS3.js → T2OMCM2R.js} +1 -1
  111. package/dist/cdn/{ANC4DUDW.js → T5XR4YFF.js} +1 -1
  112. package/dist/cdn/{WG76VRRN.js → TEBB6NX6.js} +1 -1
  113. package/dist/cdn/{JANAPR3Q.js → TG6IATT4.js} +1 -1
  114. package/dist/cdn/{JMJUEMDK.js → TUAIYZ7H.js} +1 -1
  115. package/dist/cdn/{R3LK4ZRK.js → TYUL73P5.js} +1 -1
  116. package/dist/cdn/{D4U2HWWX.js → UC2ZZOMZ.js} +1 -1
  117. package/dist/cdn/{JYKJZWFD.js → UVPJWJ7R.js} +1 -1
  118. package/dist/cdn/UVPZQRCO.js +2 -0
  119. package/dist/cdn/{PHZY2HMB.js → VBG7FLGQ.js} +1 -1
  120. package/dist/cdn/{6DDKEQGM.js → VEOMII5B.js} +1 -1
  121. package/dist/cdn/{2GX7K7GM.js → VMEAI5PE.js} +1 -1
  122. package/dist/cdn/{4KZB24O5.js → VRDWGG6T.js} +1 -1
  123. package/dist/cdn/{WUNMWOLI.js → VUC5HSJB.js} +1 -1
  124. package/dist/cdn/{GXBPQDBX.js → VVHN4ZOC.js} +1 -1
  125. package/dist/cdn/{EHF72JQT.js → WAWWK4O4.js} +1 -1
  126. package/dist/cdn/{APTSHGBA.js → WDLT7N5A.js} +1 -1
  127. package/dist/cdn/{I7TCMIZT.js → WETB24TG.js} +1 -1
  128. package/dist/cdn/{P3QQ5HCA.js → WFA7QYGU.js} +1 -1
  129. package/dist/cdn/{YLINWLQG.js → WKGH3M4F.js} +1 -1
  130. package/dist/cdn/{OPUF2ESH.js → XAGMG6IZ.js} +1 -1
  131. package/dist/cdn/{IRYIL3MF.js → XEG6ES6J.js} +1 -1
  132. package/dist/cdn/{P6OTJRIH.js → XENSYWVR.js} +1 -1
  133. package/dist/cdn/{IGKRZRHS.js → XLTV2YEG.js} +1 -1
  134. package/dist/cdn/{UKOW743Z.js → XW43TDQT.js} +1 -1
  135. package/dist/cdn/{ZAEB5BJR.js → Y6VNLIJU.js} +1 -1
  136. package/dist/cdn/{BEK4OM4G.js → YTNI4UPU.js} +1 -1
  137. package/dist/cdn/{WN5HGYJ2.js → YU34JKOR.js} +1 -1
  138. package/dist/cdn/{TGBJJDFJ.js → YZTFIE2X.js} +1 -1
  139. package/dist/cdn/{M5EVL4VV.js → YZUVO4BX.js} +1 -1
  140. package/dist/cdn/{FUKPQ7PM.js → Z42ZXHGG.js} +1 -1
  141. package/dist/cdn/{OWQ36JRV.js → ZG7M7DWC.js} +1 -1
  142. package/dist/cdn/{OZGVEBYF.js → ZH6FJ33E.js} +1 -1
  143. package/dist/cdn/{4E3ZDBJS.js → ZY2K66YV.js} +1 -1
  144. package/dist/cdn/assets/icon/gpsReceiver16.json +1 -0
  145. package/dist/cdn/assets/icon/gpsReceiver24.json +1 -0
  146. package/dist/cdn/assets/icon/gpsReceiver32.json +1 -0
  147. package/dist/cdn/assets/icon/totalStation16.json +1 -0
  148. package/dist/cdn/assets/icon/totalStation24.json +1 -0
  149. package/dist/cdn/assets/icon/totalStation32.json +1 -0
  150. package/dist/cdn/index.js +1 -1
  151. package/dist/chunks/runtime.js +4 -4
  152. package/dist/chunks/useFocusTrap.js +21 -0
  153. package/dist/components/calcite-autocomplete/customElement.d.ts +5 -1
  154. package/dist/components/calcite-link/customElement.d.ts +6 -6
  155. package/dist/components/calcite-link/customElement.js +16 -20
  156. package/dist/components/calcite-shell-panel/customElement.js +4 -3
  157. package/dist/docs/api.json +1 -1
  158. package/dist/docs/docs.json +1 -1
  159. package/dist/docs/vscode.html-custom-data.json +1 -1
  160. package/dist/docs/web-types.json +1 -1
  161. package/package.json +3 -3
  162. package/dist/cdn/FEC3Y4KI.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as x}from"./BJDNT32R.js";import{a as y}from"./TG2V3PD6.js";import{a as O}from"./FUKPQ7PM.js";import{a as g}from"./ENDXE7YY.js";import"./QFYAIO5N.js";import"./OPUF2ESH.js";import{l as v}from"./M5EVL4VV.js";import"./OAOQ5BXS.js";import{G as b,H as p,S as f,g as h,h as u,p as m}from"./4E3ZDBJS.js";var o={container:"container",containerHorizontal:"container--horizontal",containerVertical:"container--vertical"},S=h`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.container{display:flex;flex:1 1 auto}.container--vertical{flex-direction:column}.container--horizontal{flex-direction:row}:host([hidden]){display:none}[hidden]{display:none}`,c=class extends b{constructor(){super(),this.dragEnabled=!0,this.items=[],this.mutationObserver=g("mutation",()=>{this.setUpSorting()}),this.sortable=x()(this),this.interactiveContainer=y(this),this.disabled=!1,this.handleSelector="calcite-handle",this.layout="vertical",this.loading=!1,this.calciteListOrderChange=m({cancelable:!1}),this.listen("calciteHandleNudge",this.calciteHandleNudgeNextHandler)}static{this.properties={canPull:[0,{},{attribute:!1}],canPut:[0,{},{attribute:!1}],disabled:[7,{},{reflect:!0,type:Boolean}],dragSelector:[3,{},{reflect:!0}],group:[3,{},{reflect:!0}],handleSelector:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],loading:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=S}connectedCallback(){super.connectedCallback(),this.setUpSorting(),this.beginObserving()}load(){O.deprecated("component",{component:this,name:"sortable-list",removalVersion:5,suggested:"block-group"})}disconnectedCallback(){super.disconnectedCallback(),this.endObserving()}calciteHandleNudgeNextHandler(e){this.handleNudgeEvent(e)}onGlobalDragStart(){this.endObserving()}onGlobalDragEnd(){this.beginObserving()}onDragEnd(){}onDragStart(){}onDragSort(){this.items=Array.from(this.el.children),this.calciteListOrderChange.emit()}handleNudgeEvent(e){let{direction:a}=e.detail,t=e.composedPath().find(r=>r.matches(this.handleSelector)),i=this.items.find(r=>r.contains(t)||e.composedPath().includes(r)),d=this.items.length-1,s=this.items.indexOf(i),l=!1,n;a==="up"?s===0?l=!0:n=s-1:s===d?n=0:s===d-1?l=!0:n=s+2,this.endObserving(),l?i.parentElement.appendChild(i):i.parentElement.insertBefore(i,this.items[n]),this.items=Array.from(this.el.children),this.beginObserving(),requestAnimationFrame(()=>v(t)),"selected"in t&&(t.selected=!0)}setUpSorting(){this.items=Array.from(this.el.children),this.sortable.reset()}beginObserving(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}endObserving(){this.mutationObserver?.disconnect()}render(){let{disabled:e,layout:a}=this,t=a==="horizontal"||!1;return this.interactiveContainer({disabled:e,children:u`<div class=${p({[o.container]:!0,[o.containerVertical]:!t,[o.containerHorizontal]:t})}><slot></slot></div>`})}};f("calcite-sortable-list",c);export{c as SortableList};
2
+ import{a as x}from"./RCBOSOCJ.js";import{a as y}from"./LSPPTTY7.js";import{a as O}from"./Z42ZXHGG.js";import{a as g}from"./ENDXE7YY.js";import"./2UT6QW2P.js";import"./XAGMG6IZ.js";import{l as v}from"./YZUVO4BX.js";import"./OAOQ5BXS.js";import{G as b,H as p,S as f,g as h,h as u,p as m}from"./ZY2K66YV.js";var o={container:"container",containerHorizontal:"container--horizontal",containerVertical:"container--vertical"},S=h`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.container{display:flex;flex:1 1 auto}.container--vertical{flex-direction:column}.container--horizontal{flex-direction:row}:host([hidden]){display:none}[hidden]{display:none}`,c=class extends b{constructor(){super(),this.dragEnabled=!0,this.items=[],this.mutationObserver=g("mutation",()=>{this.setUpSorting()}),this.sortable=x()(this),this.interactiveContainer=y(this),this.disabled=!1,this.handleSelector="calcite-handle",this.layout="vertical",this.loading=!1,this.calciteListOrderChange=m({cancelable:!1}),this.listen("calciteHandleNudge",this.calciteHandleNudgeNextHandler)}static{this.properties={canPull:[0,{},{attribute:!1}],canPut:[0,{},{attribute:!1}],disabled:[7,{},{reflect:!0,type:Boolean}],dragSelector:[3,{},{reflect:!0}],group:[3,{},{reflect:!0}],handleSelector:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],loading:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=S}connectedCallback(){super.connectedCallback(),this.setUpSorting(),this.beginObserving()}load(){O.deprecated("component",{component:this,name:"sortable-list",removalVersion:5,suggested:"block-group"})}disconnectedCallback(){super.disconnectedCallback(),this.endObserving()}calciteHandleNudgeNextHandler(e){this.handleNudgeEvent(e)}onGlobalDragStart(){this.endObserving()}onGlobalDragEnd(){this.beginObserving()}onDragEnd(){}onDragStart(){}onDragSort(){this.items=Array.from(this.el.children),this.calciteListOrderChange.emit()}handleNudgeEvent(e){let{direction:a}=e.detail,t=e.composedPath().find(r=>r.matches(this.handleSelector)),i=this.items.find(r=>r.contains(t)||e.composedPath().includes(r)),d=this.items.length-1,s=this.items.indexOf(i),l=!1,n;a==="up"?s===0?l=!0:n=s-1:s===d?n=0:s===d-1?l=!0:n=s+2,this.endObserving(),l?i.parentElement.appendChild(i):i.parentElement.insertBefore(i,this.items[n]),this.items=Array.from(this.el.children),this.beginObserving(),requestAnimationFrame(()=>v(t)),"selected"in t&&(t.selected=!0)}setUpSorting(){this.items=Array.from(this.el.children),this.sortable.reset()}beginObserving(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}endObserving(){this.mutationObserver?.disconnect()}render(){let{disabled:e,layout:a}=this,t=a==="horizontal"||!1;return this.interactiveContainer({disabled:e,children:u`<div class=${p({[o.container]:!0,[o.containerVertical]:!t,[o.containerHorizontal]:t})}><slot></slot></div>`})}};f("calcite-sortable-list",c);export{c as SortableList};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{g as K}from"./MYDCGCGV.js";import{k as G}from"./CFBOYHB5.js";import{a as $}from"./YOOTQTCX.js";import{a as j}from"./WG76VRRN.js";import{c as A,d as W}from"./FQWCNEV3.js";import{a as q}from"./TG2V3PD6.js";import{a as V}from"./FW4KB235.js";import"./YGX7CUXN.js";import{a as N}from"./ANC4DUDW.js";import{a as E}from"./X7BSBNJI.js";import"./RH6ZIP65.js";import"./QFYAIO5N.js";import"./OPUF2ESH.js";import"./M5EVL4VV.js";import"./OAOQ5BXS.js";import{E as R,F as z,G as U,H as M,L as _,S as k,g as P,h as T,l as v,p as b}from"./4E3ZDBJS.js";var Y={offset:"offset"},ee={labelContent:"label-content"},te=60;function O(t){return t.replace(":15",".25").replace(":30",".5").replace(":45",".75").replace("\u2212","-")}function oe(t,e){let o=L(t,"en-US",e).replace("GMT","");return o===""?0:Number(O(o))*te}function se(){return new Date().getTimezoneOffset()*-1}function ae(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}async function ie(t){if(t==="offset")return o=>o;let{normalize:e}=await import("./23WLJ7R6.js");return e}async function ne(t,e,o,s,a){if(o==="name"){let{groupByName:n}=await import("./T2BI2MTE.js");return(await n()).map(({label:l})=>({label:l,value:l,metadata:{filterValue:l}})).filter(l=>!!l).sort()}let i=a==="user"?t:a==="utc"?"fr":"en-GB",c=s.getTime();if(o==="region"){let[{groupByRegion:n},{getCountry:m,global:l}]=await Promise.all([import("./OYOVXEMY.js"),import("./SFAEGOT3.js")]);return(await n()).map(({label:u,tzs:f})=>(f.sort((h,d)=>{let y=I(h,e),x=I(d,e),p="Etc/GMT";if(h.startsWith(p)&&d.startsWith(p)){let g=h.substring(p.length),F=d.substring(p.length),X=g===""?0:parseInt(g);return(F===""?0:parseInt(F))-X}return y.localeCompare(x)}),{label:S(e,u),items:f.map(h=>{let d=O(L(h,i,c)),y=I(h,e),x=u===l?`${I(l,e)} Etc`:H(h),p=m(h),g=S(e,p);return{label:y,value:h,metadata:{country:g===y?void 0:g,filterValue:x,offset:d}}})})).sort((u,f)=>u.label===l?-1:f.label===l?1:u.label.localeCompare(f.label))}let[{groupByOffset:C},{DateEngine:Z}]=await Promise.all([import("./I3YJL43S.js"),import("./GW3OENJK.js")]),w=await C({dateEngine:new Z,groupDateRange:1,startDate:new Date(c).toISOString()}),Q=new Intl.ListFormat(t,{style:"long",type:"conjunction"}),D=["Factory","Etc/UTC"];return w.forEach(n=>{let m=[],l=0;n.tzs.forEach((r,u)=>{D.includes(r)&&l++,m[u]=l}),n.tzs=n.tzs.filter(r=>!D.includes(r)),n.labelTzIdx=n.labelTzIdx.map(r=>r-m[r]).filter(r=>r>=0&&r<n.tzs.length)}),w.map(({labelTzIdx:n,tzs:m})=>{let l=m[0],r=O(L(l,i,c)),u=oe(l,c),f=n.map(d=>I(m[d],e));return{label:ce(e,r,Q.format(f)),value:u,metadata:{filterValue:m.map(d=>H(d))}}}).filter(n=>!!n).sort((n,m)=>n.value-m.value)}function I(t,e){return e[t]||re(t)}function le(t,e,o){return o.timeZoneRegionLabel.replace("{city}",t).replace("{country}",S(o,e))}function S(t,e){return t[e]||e}function re(t){return t.split("/").pop()}function H(t){return t.replace(/_/g," ")}function ce(t,e,o){return t.timeZoneLabel.replace("{offset}",e).replace("{cities}",o)}function L(t,e,o=Date.now()){return t==="Factory"&&(t="Etc/GMT"),G(e,{timeZone:t,timeZoneName:"shortOffset"}).formatToParts(o).find(({type:i})=>i==="timeZoneName").value}function me(t){return t[0].items!==void 0}function ue(t){return me(t)?t.flatMap(e=>e.items):t}function J(t,e,o){return o==null?null:ue(t).find(s=>s[e]==o)}var he=P`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block}.offset{white-space:nowrap}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}`,B=class extends U{constructor(){super(...arguments),this.comboboxRef=R(),this.formSupport=j({inputType:"text"})(this),this.messages=N({blocking:!0}),this.focusSetter=E()(this),this.interactiveContainer=q(this),this.#e=null,this.clearable=!1,this.disabled=!1,this.maxItems=0,this.mode="offset",this.offsetStyle="user",this.open=!1,this.overlayPositioning="absolute",this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.topLayerDisabled=!1,this.calciteInputTimeZoneBeforeClose=b({cancelable:!1}),this.calciteInputTimeZoneBeforeOpen=b({cancelable:!1}),this.calciteInputTimeZoneChange=b({cancelable:!1}),this.calciteInputTimeZoneClose=b({cancelable:!1}),this.calciteInputTimeZoneOpen=b({cancelable:!1})}static{this.properties={clearable:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],labelText:1,maxItems:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],mode:[3,{},{reflect:!0}],name:[3,{},{reflect:!0}],offsetStyle:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],readOnly:[7,{},{reflect:!0,type:Boolean}],referenceDate:1,required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],validationIcon:[3,{converter:_,type:String},{reflect:!0}],validationMessage:1,validity:[32,{},{readOnly:!0,attribute:!1}],value:1}}static{this.formAssociated=!0}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=he}#e;get value(){return this._value}set value(e){this.#e="internal",this._value=e}async setFocus(e){return this.focusSetter(()=>this.comboboxRef.value,e)}connectedCallback(){super.connectedCallback(),A(this)}async load(){this.normalizer=await ie(this.mode),await this.updateTimeZoneItems();let e=this.value,o=this.normalizeValue(e);this.value=o||(e===""?o:void 0),this.updateTimeZoneSelection();let s=this.selectedTimeZoneItem?`${this.selectedTimeZoneItem.value}`:"";this.value=s}willUpdate(e){e.has("value")&&this.hasUpdated&&this.handleValueChange(this.value,e.get("value")),(e.has("messages")||e.has("mode")&&(this.hasUpdated||this.mode!=="offset")||e.has("referenceDate"))&&this.handleTimeZoneItemPropsChange(),e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openChanged()}loaded(){this.openChanged()}disconnectedCallback(){super.disconnectedCallback(),W(this)}async handleTimeZoneItemPropsChange(){!this.timeZoneItems||!this.hasUpdated||(await this.updateTimeZoneItems(),this.updateTimeZoneSelection())}openChanged(){this.comboboxRef.value&&(this.comboboxRef.value.open=this.open)}async handleValueChange(e,o){let s=this.#e==="user";if(this.#e=null,s)return;let a=this.normalizeValue(e);if(!a){if(this.clearable){this._value=a,this.selectedTimeZoneItem=null;return}this._value=o,this.selectedTimeZoneItem=this.findTimeZoneItem(o);return}let i=this.findTimeZoneItem(a);if(!i){this._value=o;return}this._value=a,this.selectedTimeZoneItem=i}onLabelClick(){this.setFocus()}overrideSelectedLabelForRegion(e){this.mode!=="region"||!this.selectedTimeZoneItem||(this.comboboxRef.value.selectedItems[0].heading=this.getItemLabel(this.selectedTimeZoneItem,e))}onComboboxBeforeClose(e){e.stopPropagation(),this.overrideSelectedLabelForRegion(!1),this.calciteInputTimeZoneBeforeClose.emit()}onComboboxBeforeOpen(e){e.stopPropagation(),this.overrideSelectedLabelForRegion(!0),this.calciteInputTimeZoneBeforeOpen.emit()}onComboboxChange(e){e.stopPropagation();let s=e.target.selectedItems[0],a=this._value;if(!s){this._value="",this.requestUpdate("value",a),this.selectedTimeZoneItem=null,this.calciteInputTimeZoneChange.emit();return}let i=this.findTimeZoneItemByLabel(s.getAttribute("data-label")),c=`${i.value}`;this.value===c&&i.label===this.selectedTimeZoneItem.label||(this._value=c,this.requestUpdate("value",a),this.selectedTimeZoneItem=i,this.#e="user",this.calciteInputTimeZoneChange.emit())}onComboboxClose(e){e.stopPropagation(),this.open=!1,this.calciteInputTimeZoneClose.emit()}onComboboxOpen(e){this.open=!0,e.stopPropagation(),this.calciteInputTimeZoneOpen.emit()}findTimeZoneItem(e){return J(this.timeZoneItems,"value",e)}findTimeZoneItemByLabel(e){return J(this.timeZoneItems,"label",e)}async updateTimeZoneItems(){this.timeZoneItems=await this.createTimeZoneItems()}updateTimeZoneSelection(){if(this.value===""&&this.clearable){this.selectedTimeZoneItem=null;return}let e=this.mode==="offset"?se():ae(),o=this.value===""||!this.value?e:this.value;this.selectedTimeZoneItem=this.findTimeZoneItem(o)||this.findTimeZoneItem(e)}async createTimeZoneItems(){return!this.messages._lang||!this.messages?[]:ne(this.messages._lang,this.messages,this.mode,this.referenceDate instanceof Date?this.referenceDate:new Date(this.referenceDate??Date.now()),this.offsetStyle)}normalizeValue(e){return e=e===void 0?"":e,e&&this.normalizer(e)}getItemLabel(e,o=this.open){let s=this.selectedTimeZoneItem===e,{label:a,metadata:i}=e;return!i.country||o||!s?a:le(a,i.country,this.messages)}render(){return this.interactiveContainer({disabled:this.disabled,children:T`<calcite-combobox .clearDisabled=${!this.clearable} .disabled=${this.disabled} .label=${this.messages.chooseTimeZone} .labelText=${this.labelText} lang=${this.messages._lang??v} .maxItems=${this.maxItems} @calciteComboboxBeforeClose=${this.onComboboxBeforeClose} @calciteComboboxBeforeOpen=${this.onComboboxBeforeOpen} @calciteComboboxChange=${this.onComboboxChange} @calciteComboboxClose=${this.onComboboxClose} @calciteComboboxOpen=${this.onComboboxOpen} .overlayPositioning=${this.overlayPositioning} .placeholder=${this.mode==="name"?this.messages.namePlaceholder:this.mode==="offset"?this.messages.offsetPlaceholder:this.messages.regionPlaceholder} placeholder-icon=search .readOnly=${this.readOnly} .required=${this.required} .scale=${this.scale} .selectionMode=${this.clearable?"single":"single-persist"} .status=${this.status} .topLayerDisabled=${this.topLayerDisabled} .validationIcon=${this.validationIcon} .validationMessage=${this.validationMessage} ${z(this.comboboxRef)}>${this.renderItems()}<slot name=${ee.labelContent} slot=${K.labelContent}></slot></calcite-combobox>`})}renderItems(){return this.mode==="region"?this.renderRegionItems():$(this.timeZoneItems,({label:e})=>e,e=>{let o=this.selectedTimeZoneItem===e,{label:s,metadata:a,value:i}=e;return T`<calcite-combobox-item data-label=${s??v} .heading=${s} .metadata=${a} .selected=${o} .value=${i}></calcite-combobox-item>`})}renderRegionItems(){return this.timeZoneItems.flatMap(({label:e,items:o})=>V(e,T`<calcite-combobox-item-group .label=${e}>${$(o,({label:s})=>s,s=>{let a=this.selectedTimeZoneItem===s,{label:i,metadata:c,value:C}=s,Z=this.getItemLabel(s);return T`<calcite-combobox-item data-label=${i??v} .description=${c.country} .heading=${Z} .metadata=${c} .selected=${a} .value=${C}><span class=${M(Y.offset)} slot=content-end>${c.offset}</span></calcite-combobox-item>`})}</calcite-combobox-item-group>`))}};k("calcite-input-time-zone",B);export{B as InputTimeZone};
2
+ import{g as K}from"./MYDCGCGV.js";import{k as G}from"./7EPQUNDP.js";import{a as $}from"./4XCVBYLO.js";import{a as j}from"./TEBB6NX6.js";import{c as A,d as W}from"./OXFDZYMM.js";import{a as q}from"./LSPPTTY7.js";import{a as V}from"./RBW3KVLR.js";import"./YGX7CUXN.js";import{a as N}from"./T5XR4YFF.js";import{a as E}from"./4OQTPZUU.js";import"./RH6ZIP65.js";import"./2UT6QW2P.js";import"./XAGMG6IZ.js";import"./YZUVO4BX.js";import"./OAOQ5BXS.js";import{E as R,F as z,G as U,H as M,L as _,S as k,g as P,h as T,l as v,p as b}from"./ZY2K66YV.js";var Y={offset:"offset"},ee={labelContent:"label-content"},te=60;function O(t){return t.replace(":15",".25").replace(":30",".5").replace(":45",".75").replace("\u2212","-")}function oe(t,e){let o=L(t,"en-US",e).replace("GMT","");return o===""?0:Number(O(o))*te}function se(){return new Date().getTimezoneOffset()*-1}function ae(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}async function ie(t){if(t==="offset")return o=>o;let{normalize:e}=await import("./23WLJ7R6.js");return e}async function ne(t,e,o,s,a){if(o==="name"){let{groupByName:n}=await import("./T2BI2MTE.js");return(await n()).map(({label:l})=>({label:l,value:l,metadata:{filterValue:l}})).filter(l=>!!l).sort()}let i=a==="user"?t:a==="utc"?"fr":"en-GB",c=s.getTime();if(o==="region"){let[{groupByRegion:n},{getCountry:m,global:l}]=await Promise.all([import("./OYOVXEMY.js"),import("./SFAEGOT3.js")]);return(await n()).map(({label:u,tzs:f})=>(f.sort((h,d)=>{let y=I(h,e),x=I(d,e),p="Etc/GMT";if(h.startsWith(p)&&d.startsWith(p)){let g=h.substring(p.length),F=d.substring(p.length),X=g===""?0:parseInt(g);return(F===""?0:parseInt(F))-X}return y.localeCompare(x)}),{label:S(e,u),items:f.map(h=>{let d=O(L(h,i,c)),y=I(h,e),x=u===l?`${I(l,e)} Etc`:H(h),p=m(h),g=S(e,p);return{label:y,value:h,metadata:{country:g===y?void 0:g,filterValue:x,offset:d}}})})).sort((u,f)=>u.label===l?-1:f.label===l?1:u.label.localeCompare(f.label))}let[{groupByOffset:C},{DateEngine:Z}]=await Promise.all([import("./I3YJL43S.js"),import("./GW3OENJK.js")]),w=await C({dateEngine:new Z,groupDateRange:1,startDate:new Date(c).toISOString()}),Q=new Intl.ListFormat(t,{style:"long",type:"conjunction"}),D=["Factory","Etc/UTC"];return w.forEach(n=>{let m=[],l=0;n.tzs.forEach((r,u)=>{D.includes(r)&&l++,m[u]=l}),n.tzs=n.tzs.filter(r=>!D.includes(r)),n.labelTzIdx=n.labelTzIdx.map(r=>r-m[r]).filter(r=>r>=0&&r<n.tzs.length)}),w.map(({labelTzIdx:n,tzs:m})=>{let l=m[0],r=O(L(l,i,c)),u=oe(l,c),f=n.map(d=>I(m[d],e));return{label:ce(e,r,Q.format(f)),value:u,metadata:{filterValue:m.map(d=>H(d))}}}).filter(n=>!!n).sort((n,m)=>n.value-m.value)}function I(t,e){return e[t]||re(t)}function le(t,e,o){return o.timeZoneRegionLabel.replace("{city}",t).replace("{country}",S(o,e))}function S(t,e){return t[e]||e}function re(t){return t.split("/").pop()}function H(t){return t.replace(/_/g," ")}function ce(t,e,o){return t.timeZoneLabel.replace("{offset}",e).replace("{cities}",o)}function L(t,e,o=Date.now()){return t==="Factory"&&(t="Etc/GMT"),G(e,{timeZone:t,timeZoneName:"shortOffset"}).formatToParts(o).find(({type:i})=>i==="timeZoneName").value}function me(t){return t[0].items!==void 0}function ue(t){return me(t)?t.flatMap(e=>e.items):t}function J(t,e,o){return o==null?null:ue(t).find(s=>s[e]==o)}var he=P`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block}.offset{white-space:nowrap}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}`,B=class extends U{constructor(){super(...arguments),this.comboboxRef=R(),this.formSupport=j({inputType:"text"})(this),this.messages=N({blocking:!0}),this.focusSetter=E()(this),this.interactiveContainer=q(this),this.#e=null,this.clearable=!1,this.disabled=!1,this.maxItems=0,this.mode="offset",this.offsetStyle="user",this.open=!1,this.overlayPositioning="absolute",this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.topLayerDisabled=!1,this.calciteInputTimeZoneBeforeClose=b({cancelable:!1}),this.calciteInputTimeZoneBeforeOpen=b({cancelable:!1}),this.calciteInputTimeZoneChange=b({cancelable:!1}),this.calciteInputTimeZoneClose=b({cancelable:!1}),this.calciteInputTimeZoneOpen=b({cancelable:!1})}static{this.properties={clearable:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],labelText:1,maxItems:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],mode:[3,{},{reflect:!0}],name:[3,{},{reflect:!0}],offsetStyle:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],readOnly:[7,{},{reflect:!0,type:Boolean}],referenceDate:1,required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],validationIcon:[3,{converter:_,type:String},{reflect:!0}],validationMessage:1,validity:[32,{},{readOnly:!0,attribute:!1}],value:1}}static{this.formAssociated=!0}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=he}#e;get value(){return this._value}set value(e){this.#e="internal",this._value=e}async setFocus(e){return this.focusSetter(()=>this.comboboxRef.value,e)}connectedCallback(){super.connectedCallback(),A(this)}async load(){this.normalizer=await ie(this.mode),await this.updateTimeZoneItems();let e=this.value,o=this.normalizeValue(e);this.value=o||(e===""?o:void 0),this.updateTimeZoneSelection();let s=this.selectedTimeZoneItem?`${this.selectedTimeZoneItem.value}`:"";this.value=s}willUpdate(e){e.has("value")&&this.hasUpdated&&this.handleValueChange(this.value,e.get("value")),(e.has("messages")||e.has("mode")&&(this.hasUpdated||this.mode!=="offset")||e.has("referenceDate"))&&this.handleTimeZoneItemPropsChange(),e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openChanged()}loaded(){this.openChanged()}disconnectedCallback(){super.disconnectedCallback(),W(this)}async handleTimeZoneItemPropsChange(){!this.timeZoneItems||!this.hasUpdated||(await this.updateTimeZoneItems(),this.updateTimeZoneSelection())}openChanged(){this.comboboxRef.value&&(this.comboboxRef.value.open=this.open)}async handleValueChange(e,o){let s=this.#e==="user";if(this.#e=null,s)return;let a=this.normalizeValue(e);if(!a){if(this.clearable){this._value=a,this.selectedTimeZoneItem=null;return}this._value=o,this.selectedTimeZoneItem=this.findTimeZoneItem(o);return}let i=this.findTimeZoneItem(a);if(!i){this._value=o;return}this._value=a,this.selectedTimeZoneItem=i}onLabelClick(){this.setFocus()}overrideSelectedLabelForRegion(e){this.mode!=="region"||!this.selectedTimeZoneItem||(this.comboboxRef.value.selectedItems[0].heading=this.getItemLabel(this.selectedTimeZoneItem,e))}onComboboxBeforeClose(e){e.stopPropagation(),this.overrideSelectedLabelForRegion(!1),this.calciteInputTimeZoneBeforeClose.emit()}onComboboxBeforeOpen(e){e.stopPropagation(),this.overrideSelectedLabelForRegion(!0),this.calciteInputTimeZoneBeforeOpen.emit()}onComboboxChange(e){e.stopPropagation();let s=e.target.selectedItems[0],a=this._value;if(!s){this._value="",this.requestUpdate("value",a),this.selectedTimeZoneItem=null,this.calciteInputTimeZoneChange.emit();return}let i=this.findTimeZoneItemByLabel(s.getAttribute("data-label")),c=`${i.value}`;this.value===c&&i.label===this.selectedTimeZoneItem.label||(this._value=c,this.requestUpdate("value",a),this.selectedTimeZoneItem=i,this.#e="user",this.calciteInputTimeZoneChange.emit())}onComboboxClose(e){e.stopPropagation(),this.open=!1,this.calciteInputTimeZoneClose.emit()}onComboboxOpen(e){this.open=!0,e.stopPropagation(),this.calciteInputTimeZoneOpen.emit()}findTimeZoneItem(e){return J(this.timeZoneItems,"value",e)}findTimeZoneItemByLabel(e){return J(this.timeZoneItems,"label",e)}async updateTimeZoneItems(){this.timeZoneItems=await this.createTimeZoneItems()}updateTimeZoneSelection(){if(this.value===""&&this.clearable){this.selectedTimeZoneItem=null;return}let e=this.mode==="offset"?se():ae(),o=this.value===""||!this.value?e:this.value;this.selectedTimeZoneItem=this.findTimeZoneItem(o)||this.findTimeZoneItem(e)}async createTimeZoneItems(){return!this.messages._lang||!this.messages?[]:ne(this.messages._lang,this.messages,this.mode,this.referenceDate instanceof Date?this.referenceDate:new Date(this.referenceDate??Date.now()),this.offsetStyle)}normalizeValue(e){return e=e===void 0?"":e,e&&this.normalizer(e)}getItemLabel(e,o=this.open){let s=this.selectedTimeZoneItem===e,{label:a,metadata:i}=e;return!i.country||o||!s?a:le(a,i.country,this.messages)}render(){return this.interactiveContainer({disabled:this.disabled,children:T`<calcite-combobox .clearDisabled=${!this.clearable} .disabled=${this.disabled} .label=${this.messages.chooseTimeZone} .labelText=${this.labelText} lang=${this.messages._lang??v} .maxItems=${this.maxItems} @calciteComboboxBeforeClose=${this.onComboboxBeforeClose} @calciteComboboxBeforeOpen=${this.onComboboxBeforeOpen} @calciteComboboxChange=${this.onComboboxChange} @calciteComboboxClose=${this.onComboboxClose} @calciteComboboxOpen=${this.onComboboxOpen} .overlayPositioning=${this.overlayPositioning} .placeholder=${this.mode==="name"?this.messages.namePlaceholder:this.mode==="offset"?this.messages.offsetPlaceholder:this.messages.regionPlaceholder} placeholder-icon=search .readOnly=${this.readOnly} .required=${this.required} .scale=${this.scale} .selectionMode=${this.clearable?"single":"single-persist"} .status=${this.status} .topLayerDisabled=${this.topLayerDisabled} .validationIcon=${this.validationIcon} .validationMessage=${this.validationMessage} ${z(this.comboboxRef)}>${this.renderItems()}<slot name=${ee.labelContent} slot=${K.labelContent}></slot></calcite-combobox>`})}renderItems(){return this.mode==="region"?this.renderRegionItems():$(this.timeZoneItems,({label:e})=>e,e=>{let o=this.selectedTimeZoneItem===e,{label:s,metadata:a,value:i}=e;return T`<calcite-combobox-item data-label=${s??v} .heading=${s} .metadata=${a} .selected=${o} .value=${i}></calcite-combobox-item>`})}renderRegionItems(){return this.timeZoneItems.flatMap(({label:e,items:o})=>V(e,T`<calcite-combobox-item-group .label=${e}>${$(o,({label:s})=>s,s=>{let a=this.selectedTimeZoneItem===s,{label:i,metadata:c,value:C}=s,Z=this.getItemLabel(s);return T`<calcite-combobox-item data-label=${i??v} .description=${c.country} .heading=${Z} .metadata=${c} .selected=${a} .value=${C}><span class=${M(Y.offset)} slot=content-end>${c.offset}</span></calcite-combobox-item>`})}</calcite-combobox-item-group>`))}};k("calcite-input-time-zone",B);export{B as InputTimeZone};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{b as z}from"./WKR7R7AZ.js";import{a as I}from"./FUKPQ7PM.js";import{a as y}from"./ENDXE7YY.js";import{e as C}from"./QFYAIO5N.js";import"./OPUF2ESH.js";import{G as b,H as g,S as v,T as x,g as f,h as m,i as p,l as h}from"./4E3ZDBJS.js";var $={flipRtl:"flip-rtl",svg:"svg"},D={},d={},k={s:16,m:24,l:32};function w({icon:e,scale:t}){let s=k[t],i=B(e),n=i.charAt(i.length-1)==="F";return`${n?i.substring(0,i.length-1):i}${s}${n?"F":""}`}async function O(e){let t=w(e),s=N(t);if(s)return s;d[t]||(d[t]=fetch(x(`./assets/icon/${t}.json`)).then(n=>n.json()).catch(()=>(I.error(`${e.icon} (${e.scale}) icon failed to load`),"")));let i=await d[t];return D[t]=i,i}function U(e){return N(w(e))}function N(e){return D[e]}function B(e){let t=!isNaN(Number(e.charAt(0))),s=e.split("-");if(s.length>0){let n=/[a-z]/i;e=s.map((r,a)=>r.replace(n,function(l,o){return a===0&&o===0?l:l.toUpperCase()})).join("")}return t?`i${e}`:e}var L=f`:host{display:inline-flex;color:var(--calcite-icon-color, var(--calcite-ui-icon-color, currentColor))}:host([scale=s]){inline-size:16px;block-size:16px;min-inline-size:16px;min-block-size:16px}:host([scale=m]){inline-size:24px;block-size:24px;min-inline-size:24px;min-block-size:24px}:host([scale=l]){inline-size:32px;block-size:32px;min-inline-size:32px;min-block-size:32px}.flip-rtl{transform:scaleX(-1)}.svg{display:block}:host([hidden]){display:none}[hidden]{display:none}`,u=class extends b{constructor(){super(...arguments),this.direction=C(),this.visible=!1,this.flipRtl=!1,this.icon=null,this.preload=!1,this.scale="m"}static{this.properties={pathData:[16,{},{state:!0}],visible:[16,{},{state:!0}],flipRtl:[7,{},{reflect:!0,type:Boolean}],icon:[3,{type:String},{reflect:!0}],preload:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],textLabel:1}}static{this.styles=L}connectedCallback(){if(super.connectedCallback(),this.preload){this.visible=!0,this.loadIconPathData();return}this.visible||this.waitUntilVisible(()=>{this.visible=!0,this.loadIconPathData()})}willUpdate(t){(t.has("icon")&&(this.hasUpdated||this.icon!==null)||t.has("scale")&&(this.hasUpdated||this.scale!=="m"))&&this.loadIconPathData()}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver?.disconnect(),this.intersectionObserver=null}async loadIconPathData(){let{icon:t,scale:s,visible:i}=this;if(!t||!i)return;let n={icon:t,scale:s},r=U(n)||await O(n);t===this.icon&&(this.pathData=r)}waitUntilVisible(t){if(this.intersectionObserver=y("intersection",s=>{s.forEach(i=>{i.isIntersecting&&(this.intersectionObserver.disconnect(),this.intersectionObserver=null,t())})},{rootMargin:"50px"}),!this.intersectionObserver){t();return}this.intersectionObserver.observe(this.el)}render(){let{flipRtl:t,pathData:s,scale:i,textLabel:n}=this,r=this.direction,a=k[i],c=!!n,l=[].concat(s||"");return this.el.ariaHidden=z(!c),this.el.ariaLabel=c?n:null,this.el.role=c?"img":null,m`<svg aria-hidden=true class=${g({[$.flipRtl]:r==="rtl"&&t,[$.svg]:!0})} fill=currentColor height=100% viewBox=${`0 0 ${a} ${a}`} width=100% xmlns=http://www.w3.org/2000/svg>${l.map(o=>typeof o=="string"?p`<path d=${o??h} />`:p`<path d=${o.d??h} opacity=${("opacity"in o?o.opacity:1)??h} />`)}</svg>`}};v("calcite-icon",u);export{u as Icon};
2
+ import{b as z}from"./WKR7R7AZ.js";import{a as I}from"./Z42ZXHGG.js";import{a as y}from"./ENDXE7YY.js";import{e as C}from"./2UT6QW2P.js";import"./XAGMG6IZ.js";import{G as b,H as g,S as v,T as x,g as f,h as m,i as p,l as h}from"./ZY2K66YV.js";var $={flipRtl:"flip-rtl",svg:"svg"},D={},d={},k={s:16,m:24,l:32};function w({icon:e,scale:t}){let s=k[t],i=B(e),n=i.charAt(i.length-1)==="F";return`${n?i.substring(0,i.length-1):i}${s}${n?"F":""}`}async function O(e){let t=w(e),s=N(t);if(s)return s;d[t]||(d[t]=fetch(x(`./assets/icon/${t}.json`)).then(n=>n.json()).catch(()=>(I.error(`${e.icon} (${e.scale}) icon failed to load`),"")));let i=await d[t];return D[t]=i,i}function U(e){return N(w(e))}function N(e){return D[e]}function B(e){let t=!isNaN(Number(e.charAt(0))),s=e.split("-");if(s.length>0){let n=/[a-z]/i;e=s.map((r,a)=>r.replace(n,function(l,o){return a===0&&o===0?l:l.toUpperCase()})).join("")}return t?`i${e}`:e}var L=f`:host{display:inline-flex;color:var(--calcite-icon-color, var(--calcite-ui-icon-color, currentColor))}:host([scale=s]){inline-size:16px;block-size:16px;min-inline-size:16px;min-block-size:16px}:host([scale=m]){inline-size:24px;block-size:24px;min-inline-size:24px;min-block-size:24px}:host([scale=l]){inline-size:32px;block-size:32px;min-inline-size:32px;min-block-size:32px}.flip-rtl{transform:scaleX(-1)}.svg{display:block}:host([hidden]){display:none}[hidden]{display:none}`,u=class extends b{constructor(){super(...arguments),this.direction=C(),this.visible=!1,this.flipRtl=!1,this.icon=null,this.preload=!1,this.scale="m"}static{this.properties={pathData:[16,{},{state:!0}],visible:[16,{},{state:!0}],flipRtl:[7,{},{reflect:!0,type:Boolean}],icon:[3,{type:String},{reflect:!0}],preload:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],textLabel:1}}static{this.styles=L}connectedCallback(){if(super.connectedCallback(),this.preload){this.visible=!0,this.loadIconPathData();return}this.visible||this.waitUntilVisible(()=>{this.visible=!0,this.loadIconPathData()})}willUpdate(t){(t.has("icon")&&(this.hasUpdated||this.icon!==null)||t.has("scale")&&(this.hasUpdated||this.scale!=="m"))&&this.loadIconPathData()}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver?.disconnect(),this.intersectionObserver=null}async loadIconPathData(){let{icon:t,scale:s,visible:i}=this;if(!t||!i)return;let n={icon:t,scale:s},r=U(n)||await O(n);t===this.icon&&(this.pathData=r)}waitUntilVisible(t){if(this.intersectionObserver=y("intersection",s=>{s.forEach(i=>{i.isIntersecting&&(this.intersectionObserver.disconnect(),this.intersectionObserver=null,t())})},{rootMargin:"50px"}),!this.intersectionObserver){t();return}this.intersectionObserver.observe(this.el)}render(){let{flipRtl:t,pathData:s,scale:i,textLabel:n}=this,r=this.direction,a=k[i],c=!!n,l=[].concat(s||"");return this.el.ariaHidden=z(!c),this.el.ariaLabel=c?n:null,this.el.role=c?"img":null,m`<svg aria-hidden=true class=${g({[$.flipRtl]:r==="rtl"&&t,[$.svg]:!0})} fill=currentColor height=100% viewBox=${`0 0 ${a} ${a}`} width=100% xmlns=http://www.w3.org/2000/svg>${l.map(o=>typeof o=="string"?p`<path d=${o??h} />`:p`<path d=${o.d??h} opacity=${("opacity"in o?o.opacity:1)??h} />`)}</svg>`}};v("calcite-icon",u);export{u as Icon};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as s,b as o}from"./IYGANVDT.js";import{a as i}from"./FW4KB235.js";import{t as a}from"./M5EVL4VV.js";import"./OAOQ5BXS.js";import{G as r,H as e,S as d,g as l,h as n}from"./4E3ZDBJS.js";var h=l`:host([disabled]) .content{cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) .content *,:host([disabled]) .content ::slotted(*){pointer-events:none}:host{display:flex;flex:1 1 0%;flex-direction:column}.container{display:flex;flex:1 1 auto;align-items:stretch;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-2)}.content{display:flex;flex:1 1 auto;flex-direction:column;justify-content:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);padding-inline:var(--calcite-stack-padding-inline, .75rem);padding-block:var(--calcite-stack-padding-block, .5rem)}.content-start{justify-content:flex-start}.content-end{justify-content:flex-end}.content-start,.content-end{flex:0 1 auto}.content-start ::slotted(calcite-icon),.content-end ::slotted(calcite-icon){margin-inline:.75rem;align-self:center}.actions-start,.actions-end,.content-start,.content-end{display:flex;align-items:center}.actions-start ::slotted(calcite-action),.actions-start ::slotted(calcite-action-menu),.actions-start ::slotted(calcite-handle),.actions-start ::slotted(calcite-dropdown),.actions-end ::slotted(calcite-action),.actions-end ::slotted(calcite-action-menu),.actions-end ::slotted(calcite-handle),.actions-end ::slotted(calcite-dropdown){align-self:stretch;color:inherit}:host([hidden]){display:none}[hidden]{display:none}`,c=class extends r{constructor(){super(...arguments),this.hasActionsEnd=!1,this.hasActionsStart=!1,this.hasContentEnd=!1,this.hasContentStart=!1,this.disabled=!1}static{this.properties={hasActionsEnd:[16,{},{state:!0}],hasActionsStart:[16,{},{state:!0}],hasContentEnd:[16,{},{state:!0}],hasContentStart:[16,{},{state:!0}],disabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=h}handleActionsStartSlotChange(t){this.hasActionsStart=a(t)}handleActionsEndSlotChange(t){this.hasActionsEnd=a(t)}handleContentStartSlotChange(t){this.hasContentStart=a(t)}handleContentEndSlotChange(t){this.hasContentEnd=a(t)}renderActionsStart(){let{hasActionsStart:t}=this;return i("actions-start-container",n`<div class=${e(s.actionsStart)} .hidden=${!t}><slot name=${o.actionsStart} @slotchange=${this.handleActionsStartSlotChange}></slot></div>`)}renderActionsEnd(){let{hasActionsEnd:t}=this;return i("actions-end-container",n`<div class=${e(s.actionsEnd)} .hidden=${!t}><slot name=${o.actionsEnd} @slotchange=${this.handleActionsEndSlotChange}></slot></div>`)}renderContentStart(){let{hasContentStart:t}=this;return n`<div class=${e(s.contentStart)} .hidden=${!t}><slot name=${o.contentStart} @slotchange=${this.handleContentStartSlotChange}></slot></div>`}renderDefaultContent(){return n`<div class=${e(s.content)}><slot></slot></div>`}renderContentEnd(){let{hasContentEnd:t}=this;return n`<div class=${e(s.contentEnd)} .hidden=${!t}><slot name=${o.contentEnd} @slotchange=${this.handleContentEndSlotChange}></slot></div>`}render(){return n`<div class=${e(s.container)}>${this.renderActionsStart()}${this.renderContentStart()}${this.renderDefaultContent()}${this.renderContentEnd()}${this.renderActionsEnd()}</div>`}};d("calcite-stack",c);export{c as Stack};
2
+ import{a as s,b as o}from"./IYGANVDT.js";import{a as i}from"./RBW3KVLR.js";import{t as a}from"./YZUVO4BX.js";import"./OAOQ5BXS.js";import{G as r,H as e,S as d,g as l,h as n}from"./ZY2K66YV.js";var h=l`:host([disabled]) .content{cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) .content *,:host([disabled]) .content ::slotted(*){pointer-events:none}:host{display:flex;flex:1 1 0%;flex-direction:column}.container{display:flex;flex:1 1 auto;align-items:stretch;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-2)}.content{display:flex;flex:1 1 auto;flex-direction:column;justify-content:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);padding-inline:var(--calcite-stack-padding-inline, .75rem);padding-block:var(--calcite-stack-padding-block, .5rem)}.content-start{justify-content:flex-start}.content-end{justify-content:flex-end}.content-start,.content-end{flex:0 1 auto}.content-start ::slotted(calcite-icon),.content-end ::slotted(calcite-icon){margin-inline:.75rem;align-self:center}.actions-start,.actions-end,.content-start,.content-end{display:flex;align-items:center}.actions-start ::slotted(calcite-action),.actions-start ::slotted(calcite-action-menu),.actions-start ::slotted(calcite-handle),.actions-start ::slotted(calcite-dropdown),.actions-end ::slotted(calcite-action),.actions-end ::slotted(calcite-action-menu),.actions-end ::slotted(calcite-handle),.actions-end ::slotted(calcite-dropdown){align-self:stretch;color:inherit}:host([hidden]){display:none}[hidden]{display:none}`,c=class extends r{constructor(){super(...arguments),this.hasActionsEnd=!1,this.hasActionsStart=!1,this.hasContentEnd=!1,this.hasContentStart=!1,this.disabled=!1}static{this.properties={hasActionsEnd:[16,{},{state:!0}],hasActionsStart:[16,{},{state:!0}],hasContentEnd:[16,{},{state:!0}],hasContentStart:[16,{},{state:!0}],disabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=h}handleActionsStartSlotChange(t){this.hasActionsStart=a(t)}handleActionsEndSlotChange(t){this.hasActionsEnd=a(t)}handleContentStartSlotChange(t){this.hasContentStart=a(t)}handleContentEndSlotChange(t){this.hasContentEnd=a(t)}renderActionsStart(){let{hasActionsStart:t}=this;return i("actions-start-container",n`<div class=${e(s.actionsStart)} .hidden=${!t}><slot name=${o.actionsStart} @slotchange=${this.handleActionsStartSlotChange}></slot></div>`)}renderActionsEnd(){let{hasActionsEnd:t}=this;return i("actions-end-container",n`<div class=${e(s.actionsEnd)} .hidden=${!t}><slot name=${o.actionsEnd} @slotchange=${this.handleActionsEndSlotChange}></slot></div>`)}renderContentStart(){let{hasContentStart:t}=this;return n`<div class=${e(s.contentStart)} .hidden=${!t}><slot name=${o.contentStart} @slotchange=${this.handleContentStartSlotChange}></slot></div>`}renderDefaultContent(){return n`<div class=${e(s.content)}><slot></slot></div>`}renderContentEnd(){let{hasContentEnd:t}=this;return n`<div class=${e(s.contentEnd)} .hidden=${!t}><slot name=${o.contentEnd} @slotchange=${this.handleContentEndSlotChange}></slot></div>`}render(){return n`<div class=${e(s.container)}>${this.renderActionsStart()}${this.renderContentStart()}${this.renderDefaultContent()}${this.renderContentEnd()}${this.renderActionsEnd()}</div>`}};d("calcite-stack",c);export{c as Stack};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as l}from"./FW4KB235.js";import{F as c,H as a,h,i as e,l as s}from"./4E3ZDBJS.js";var d={arrow:"calcite-floating-ui-arrow",arrowStroke:"calcite-floating-ui-arrow__stroke"},m={width:12,height:6,strokeWidth:1},S=({floatingLayout:w,key:g,ref:f})=>{let{width:t,height:r,strokeWidth:o}=m,i=t/2,$=w==="vertical",n=`M0,0 H${t} L${t-i},${r} Q${i},${r} ${i},${r} Z`;return l(g,h`<svg aria-hidden=true class=${a(d.arrow)} height=${t} viewBox=${`0 0 ${t} ${t+($?0:o)}`} width=${t+($?o:0)} ${c(f)}>${e`${e`<path class=${a(d.arrowStroke)} d=${n??s} fill=none stroke-width=${o+1} />`||""}<path d=${n??s} stroke=none />`}</svg>`)};export{S as a};
2
+ import{a as l}from"./RBW3KVLR.js";import{F as c,H as a,h,i as e,l as s}from"./ZY2K66YV.js";var d={arrow:"calcite-floating-ui-arrow",arrowStroke:"calcite-floating-ui-arrow__stroke"},m={width:12,height:6,strokeWidth:1},S=({floatingLayout:w,key:g,ref:f})=>{let{width:t,height:r,strokeWidth:o}=m,i=t/2,$=w==="vertical",n=`M0,0 H${t} L${t-i},${r} Q${i},${r} ${i},${r} Z`;return l(g,h`<svg aria-hidden=true class=${a(d.arrow)} height=${t} viewBox=${`0 0 ${t} ${t+($?0:o)}`} width=${t+($?o:0)} ${c(f)}>${e`${e`<path class=${a(d.arrowStroke)} d=${n??s} fill=none stroke-width=${o+1} />`||""}<path d=${n??s} stroke=none />`}</svg>`)};export{S as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as P,b as H}from"./5JMSXNN3.js";import{a as T}from"./3PITBECR.js";import{a as C}from"./LXTFSRMX.js";import{a as m,c as u,d as k,e as S,f as A,g as n,h as O}from"./CBU57T2K.js";import{a as x}from"./JANAPR3Q.js";import{a as D}from"./TG2V3PD6.js";import"./AP2LDRUV.js";import"./WKR7R7AZ.js";import{a as f}from"./YGX7CUXN.js";import{a as h,b as d}from"./ENDXE7YY.js";import{a as E}from"./X7BSBNJI.js";import"./RH6ZIP65.js";import{e as y}from"./QFYAIO5N.js";import"./OPUF2ESH.js";import{C as p}from"./M5EVL4VV.js";import"./OAOQ5BXS.js";import{F as a,G as I,H as o,S as g,g as b,h as c,p as r}from"./4E3ZDBJS.js";var $={trigger:"trigger"},v={content:"content",wrapper:"wrapper",triggerContainer:"trigger-container"},z=b`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block}.wrapper{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}@starting-style{.wrapper{opacity:0;inset-block-start:0;left:0}}:host([top-layer-disabled]) .wrapper{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown)}.wrapper[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.wrapper:popover-open{display:block}.wrapper .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.wrapper[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.wrapper[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.wrapper[data-placement^=left] .calcite-floating-ui-anim{left:5px}.wrapper[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.wrapper[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.wrapper[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.content{max-height:45vh;width:auto;overflow-y:auto;overflow-x:hidden;inline-size:var(--calcite-dropdown-width, var(--calcite-internal-dropdown-width));background-color:var(--calcite-dropdown-background-color, var(--calcite-color-foreground-1))}.trigger-container{position:relative;display:flex;height:100%;flex:1 1 auto;word-wrap:break-word;word-break:break-word}.width-s{--calcite-internal-dropdown-width: 12rem}.width-m{--calcite-internal-dropdown-width: 14rem}.width-l{--calcite-internal-dropdown-width: 16rem}@media(forced-colors:active){:host([open]) .wrapper{border:var(--calcite-border-width-sm) solid canvasText}}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,M=H({click:!0,hover:!0}),w=class extends I{constructor(){super(),this.referenceElementController=P({manager:M})(this),this.direction=y(),this.focusLastDropdownItem=!1,this.activeItemIndex=-1,this.groups=[],this.items=[],this.mutationObserver=h("mutation",()=>this.updateItems()),this.transitionProp="opacity",this.resizeObserver=h("resize",e=>this.resizeObserverCallback(e)),this.onReferenceElementKeyDown=e=>this.keyDownHandler(e),this.focusSetter=E()(this),this.interactiveContainer=D(this),this.topLayer=C({target:()=>this.floatingEl})(this),this.closeOnSelectDisabled=!1,this.disabled=!1,this.maxItems=0,this.offsetDistance=0,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement=m,this.scale="m",this.selectedItems=[],this.topLayerDisabled=!1,this.type="click",this.calciteDropdownBeforeClose=r({cancelable:!1}),this.calciteDropdownBeforeOpen=r({cancelable:!1}),this.calciteDropdownClose=r({cancelable:!1}),this.calciteDropdownOpen=r({cancelable:!1}),this.calciteDropdownSelect=r({cancelable:!1}),this.listenOn(window,"click",this.closeCalciteDropdownOnClick),this.listenOn(window,"calciteDropdownOpen",this.closeCalciteDropdownOnOpenEvent),this.listen("pointerenter",this.pointerEnterHandler),this.listen("pointerleave",this.pointerLeaveHandler),this.listen("calciteInternalDropdownItemSelect",this.handleItemSelect)}static{this.properties={activeDescendantElement:[16,{},{state:!0}],referenceEl:[16,{},{state:!0}],closeOnSelectDisabled:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],flipPlacements:[0,{},{attribute:!1}],maxItems:[11,{},{reflect:!0,type:Number}],offsetDistance:[11,{},{type:Number,reflect:!0}],offsetSkidding:[11,{},{reflect:!0,type:Number}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],referenceElement:1,scale:[3,{},{reflect:!0}],selectedItems:[0,{},{attribute:!1}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],type:[3,{},{reflect:!0}],widthScale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=z}get referenceElementType(){return this.referenceElement?this.type:null}async reposition(e=!1){let{filteredFlipPlacements:t,floatingEl:i,offsetDistance:s,offsetSkidding:l,overlayPositioning:L,placement:F,referenceEl:B}=this;return S(this,{direction:this.direction,floatingEl:i,referenceEl:B,offsetDistance:s,offsetSkidding:l,overlayPositioning:L,placement:F,flipPlacements:t,type:"menu"},e)}async setFocus(e){return this.focusSetter(()=>this.referenceEl instanceof HTMLElement?this.referenceEl:this.floatingEl,e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),this.updateItems(),n(this)}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),e.has("flipPlacements")&&this.flipPlacementsHandler(),e.has("maxItems")&&this.hasUpdated&&this.setMaxScrollerHeight(),this.hasUpdated&&(e.has("offsetDistance")&&this.offsetDistance!==0||e.has("offsetSkidding")&&this.offsetSkidding!==0||e.has("overlayPositioning")&&this.overlayPositioning!=="absolute"||e.has("placement")&&this.placement!==m)&&this.reposition(!0),e.has("scale")&&(this.hasUpdated||this.scale!=="m")&&this.handlePropsChange(),e.has("referenceElement")&&!this.referenceElement&&this.open&&this.topLayer.hide()}updated(e){e.has("referenceEl")&&this.referenceElementType&&n(this)}loaded(){this.updateSelectedItems(),n(this)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),O(this)}openHandler(){this.disabled||(x(this),this.reposition(!0))}handleDisabledChange(e){e||(this.open=!1)}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}handlePropsChange(){this.updateItems(),this.updateGroupProps()}closeCalciteDropdownOnClick(e){this.referenceElementType||this.disabled||!this.open||e.composedPath().includes(this.el)||this.closeCalciteDropdown()}closeCalciteDropdownOnOpenEvent(e){this.referenceElementType||e.composedPath().includes(this.el)||this.closeCalciteDropdown()}pointerEnterHandler(){this.referenceElementType||this.disabled||this.type!=="hover"||(this.open=!0)}pointerLeaveHandler(){this.referenceElementType||this.disabled||this.type!=="hover"||this.closeCalciteDropdown()}getTraversableItems(){return this.items.filter(e=>!e.disabled&&!e.hidden)}async handleItemSelect(e){this.updateSelectedItems(),this.syncActiveItemFromTraversableItems(),e.stopPropagation(),this.calciteDropdownSelect.emit(),await this.setFocus(),this.closeOnSelectDisabled||this.closeCalciteDropdown()}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?k(t,e):null}updateItems(){this.items=this.groups.map(e=>Array.from(e?.querySelectorAll("calcite-dropdown-item"))).reduce((e,t)=>[...e,...t],[]),this.updateSelectedItems(),this.syncActiveItemFromTraversableItems(),this.reposition(!0),this.items.forEach(e=>e.scale=this.scale)}updateGroups(e){let t=e.target.assignedElements({flatten:!0}).filter(i=>i?.matches("calcite-dropdown-group"));this.groups=t,this.updateItems(),this.updateGroupProps()}updateGroupProps(){this.groups.forEach((e,t)=>{e.scale=this.scale,e.position=t})}resizeObserverCallback(e){e.forEach(({target:t})=>{t===this.referenceEl?this.setDropdownWidth():t===this.scrollerEl&&this.setMaxScrollerHeight()})}setDropdownWidth(){let{referenceEl:e,scrollerEl:t}=this;!t||!(e instanceof HTMLElement)||(t.style.minWidth=`${e.clientWidth}px`)}setMaxScrollerHeight(){let{maxItems:e,items:t,scrollerEl:i}=this;if(!i)return;let s=t.length>=e&&e>0?this.getYDistanceFromScroller(t.at(e-1)):0;i.style.maxBlockSize=s>0?`${s}px`:"",this.reposition(!0)}setScrollerAndTransitionEl(e){d(this.resizeObserver,this.scrollerEl,e),this.scrollerEl=e,this.transitionEl=e}onBeforeOpen(){this.setInitialActiveItem(),this.calciteDropdownBeforeOpen.emit(),this.topLayer.show()}onOpen(){this.calciteDropdownOpen.emit()}onBeforeClose(){this.calciteDropdownBeforeClose.emit()}onClose(){this.calciteDropdownClose.emit(),A(this),this.topLayer.hide()}setReferenceEl(e){let t=this.referenceEl instanceof HTMLElement?this.referenceEl:null,i=e instanceof HTMLElement?e:null;d(this.resizeObserver,t,i),this.referenceEl=e,n(this)}setFloatingEl(e){this.floatingEl=e,n(this)}keyDownHandler(e){if(!(this.referenceEl instanceof HTMLElement)||!e.composedPath().includes(this.referenceEl))return;let{defaultPrevented:t,key:i}=e;if(!t){if(this.open&&i==="Escape"){this.closeCalciteDropdown(),e.preventDefault();return}if(!this.open&&f(i)){this.open=!0,e.preventDefault();return}if(!this.open&&(i==="ArrowDown"||i==="ArrowUp")){e.preventDefault(),this.focusLastDropdownItem=i==="ArrowUp",this.open=!0;return}if(this.open){if(i==="Tab"){this.closeCalciteDropdown();return}if(i==="ArrowDown"){e.preventDefault(),this.navigateActiveItem("next");return}if(i==="ArrowUp"){e.preventDefault(),this.navigateActiveItem("previous");return}if(i==="Home"){e.preventDefault(),this.navigateActiveItem("first");return}if(i==="End"){e.preventDefault(),this.navigateActiveItem("last");return}f(i)&&(e.preventDefault(),this.activateActiveItem())}}}updateSelectedItems(){this.selectedItems=this.items.filter(e=>e.selected)}getYDistanceFromScroller(e){let t=e.getBoundingClientRect();return e.offsetTop+t.height}closeCalciteDropdown(){this.open=!1,this.setActiveItemByIndex(-1)}async setInitialActiveItem(){let e=this.getTraversableItems(),t=this.focusLastDropdownItem?e.at(-1):e[0];if(this.focusLastDropdownItem=!1,!t){this.setActiveItemByIndex(-1);return}let i=e.findIndex(s=>s===t);this.setActiveItemByIndex(i),await this.scrollActiveItemIntoView(t)}syncActiveItemFromTraversableItems(){let e=this.getTraversableItems();if(!e.length){this.setActiveItemByIndex(-1);return}if(this.activeItemIndex<0||this.activeItemIndex>=e.length){this.setActiveItemByIndex(0);return}this.updateActiveDescendantElement(e[this.activeItemIndex])}setActiveItemByIndex(e){this.activeItemIndex=e;let t=this.getTraversableItems(),i=e>=0?t[e]:null;this.updateActiveDescendantElement(i)}updateActiveDescendantElement(e){this.items.forEach(t=>{t.activeDescendant=t===e}),this.activeDescendantElement=e??null}navigateActiveItem(e){let t=this.getTraversableItems();if(!t.length)return;let i=t.length,s=this.activeItemIndex;s<0||s>=i?s=e==="previous"||e==="last"?i-1:0:e==="next"?s=(s+1)%i:e==="previous"?s=(s-1+i)%i:e==="first"?s=0:e==="last"&&(s=i-1);let l=t[s];this.setActiveItemByIndex(s),this.scrollActiveItemIntoView(l)}async scrollActiveItemIntoView(e){e&&(await this.updateComplete,await p(),await p(),e.scrollIntoView({block:"nearest"}))}activateActiveItem(){let e=this.getTraversableItems(),t=e[this.activeItemIndex]||e[0];t&&(this.setActiveItemByIndex(e.findIndex(i=>i===t)),t.activateItem())}openHoverDropdown(){this.open||this.disabled||this.type!=="hover"||(this.open=!0)}closeHoverDropdown(e){if(!this.open||this.disabled||this.type!=="hover")return;let t=e.relatedTarget;t&&(this.el.contains(t)||this.referenceEl!=null&&this.referenceEl instanceof HTMLElement&&this.referenceEl.contains(t))||this.closeCalciteDropdown()}toggleClickDropdown(){this.disabled||this.type!=="click"||(this.open=!this.open)}render(){let{open:e}=this;return this.interactiveContainer({disabled:this.disabled,children:c`${this.referenceElementType?null:c`<div class=${o(v.triggerContainer)} @click=${this.toggleClickDropdown} @focusin=${this.openHoverDropdown} @focusout=${this.closeHoverDropdown} @keydown=${this.keyDownHandler} ${a(this.setReferenceEl)}><slot .ariaActiveDescendantElement=${this.activeDescendantElement??null} .ariaControlsElements=${this.scrollerEl?[this.scrollerEl]:void 0} .ariaExpanded=${e} aria-haspopup=menu name=${$.trigger}></slot></div>`}<div class=${o({[v.wrapper]:!0,[T("width",this.width,this.widthScale)]:!!(this.width||this.widthScale)})} .inert=${!e} popover=manual ${a(this.setFloatingEl)}><div .ariaLabelledByElements=${this.referenceEl instanceof HTMLElement?[this.referenceEl]:void 0} class=${o({[v.content]:!0,[u.animation]:!0,[u.animationActive]:e})} role=menu ${a(this.setScrollerAndTransitionEl)}><slot @slotchange=${this.updateGroups}></slot></div></div>`})}};g("calcite-dropdown",w);export{w as Dropdown};
2
+ import{a as P,b as H}from"./RW6S27U2.js";import{a as T}from"./3PITBECR.js";import{a as C}from"./HAUPYF5T.js";import{a as m,c as u,d as k,e as S,f as A,g as n,h as O}from"./PSPER4WF.js";import{a as x}from"./TG6IATT4.js";import{a as D}from"./LSPPTTY7.js";import"./AP2LDRUV.js";import"./WKR7R7AZ.js";import{a as f}from"./YGX7CUXN.js";import{a as h,b as d}from"./ENDXE7YY.js";import{a as E}from"./4OQTPZUU.js";import"./RH6ZIP65.js";import{e as y}from"./2UT6QW2P.js";import"./XAGMG6IZ.js";import{C as p}from"./YZUVO4BX.js";import"./OAOQ5BXS.js";import{F as a,G as I,H as o,S as g,g as b,h as c,p as r}from"./ZY2K66YV.js";var $={trigger:"trigger"},v={content:"content",wrapper:"wrapper",triggerContainer:"trigger-container"},z=b`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block}.wrapper{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}@starting-style{.wrapper{opacity:0;inset-block-start:0;left:0}}:host([top-layer-disabled]) .wrapper{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown)}.wrapper[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.wrapper:popover-open{display:block}.wrapper .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.wrapper[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.wrapper[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.wrapper[data-placement^=left] .calcite-floating-ui-anim{left:5px}.wrapper[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.wrapper[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.wrapper[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.content{max-height:45vh;width:auto;overflow-y:auto;overflow-x:hidden;inline-size:var(--calcite-dropdown-width, var(--calcite-internal-dropdown-width));background-color:var(--calcite-dropdown-background-color, var(--calcite-color-foreground-1))}.trigger-container{position:relative;display:flex;height:100%;flex:1 1 auto;word-wrap:break-word;word-break:break-word}.width-s{--calcite-internal-dropdown-width: 12rem}.width-m{--calcite-internal-dropdown-width: 14rem}.width-l{--calcite-internal-dropdown-width: 16rem}@media(forced-colors:active){:host([open]) .wrapper{border:var(--calcite-border-width-sm) solid canvasText}}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,M=H({click:!0,hover:!0}),w=class extends I{constructor(){super(),this.referenceElementController=P({manager:M})(this),this.direction=y(),this.focusLastDropdownItem=!1,this.activeItemIndex=-1,this.groups=[],this.items=[],this.mutationObserver=h("mutation",()=>this.updateItems()),this.transitionProp="opacity",this.resizeObserver=h("resize",e=>this.resizeObserverCallback(e)),this.onReferenceElementKeyDown=e=>this.keyDownHandler(e),this.focusSetter=E()(this),this.interactiveContainer=D(this),this.topLayer=C({target:()=>this.floatingEl})(this),this.closeOnSelectDisabled=!1,this.disabled=!1,this.maxItems=0,this.offsetDistance=0,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement=m,this.scale="m",this.selectedItems=[],this.topLayerDisabled=!1,this.type="click",this.calciteDropdownBeforeClose=r({cancelable:!1}),this.calciteDropdownBeforeOpen=r({cancelable:!1}),this.calciteDropdownClose=r({cancelable:!1}),this.calciteDropdownOpen=r({cancelable:!1}),this.calciteDropdownSelect=r({cancelable:!1}),this.listenOn(window,"click",this.closeCalciteDropdownOnClick),this.listenOn(window,"calciteDropdownOpen",this.closeCalciteDropdownOnOpenEvent),this.listen("pointerenter",this.pointerEnterHandler),this.listen("pointerleave",this.pointerLeaveHandler),this.listen("calciteInternalDropdownItemSelect",this.handleItemSelect)}static{this.properties={activeDescendantElement:[16,{},{state:!0}],referenceEl:[16,{},{state:!0}],closeOnSelectDisabled:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],flipPlacements:[0,{},{attribute:!1}],maxItems:[11,{},{reflect:!0,type:Number}],offsetDistance:[11,{},{type:Number,reflect:!0}],offsetSkidding:[11,{},{reflect:!0,type:Number}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],referenceElement:1,scale:[3,{},{reflect:!0}],selectedItems:[0,{},{attribute:!1}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],type:[3,{},{reflect:!0}],widthScale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=z}get referenceElementType(){return this.referenceElement?this.type:null}async reposition(e=!1){let{filteredFlipPlacements:t,floatingEl:i,offsetDistance:s,offsetSkidding:l,overlayPositioning:L,placement:F,referenceEl:B}=this;return S(this,{direction:this.direction,floatingEl:i,referenceEl:B,offsetDistance:s,offsetSkidding:l,overlayPositioning:L,placement:F,flipPlacements:t,type:"menu"},e)}async setFocus(e){return this.focusSetter(()=>this.referenceEl instanceof HTMLElement?this.referenceEl:this.floatingEl,e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),this.updateItems(),n(this)}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),e.has("flipPlacements")&&this.flipPlacementsHandler(),e.has("maxItems")&&this.hasUpdated&&this.setMaxScrollerHeight(),this.hasUpdated&&(e.has("offsetDistance")&&this.offsetDistance!==0||e.has("offsetSkidding")&&this.offsetSkidding!==0||e.has("overlayPositioning")&&this.overlayPositioning!=="absolute"||e.has("placement")&&this.placement!==m)&&this.reposition(!0),e.has("scale")&&(this.hasUpdated||this.scale!=="m")&&this.handlePropsChange(),e.has("referenceElement")&&!this.referenceElement&&this.open&&this.topLayer.hide()}updated(e){e.has("referenceEl")&&this.referenceElementType&&n(this)}loaded(){this.updateSelectedItems(),n(this)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),O(this)}openHandler(){this.disabled||(x(this),this.reposition(!0))}handleDisabledChange(e){e||(this.open=!1)}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}handlePropsChange(){this.updateItems(),this.updateGroupProps()}closeCalciteDropdownOnClick(e){this.referenceElementType||this.disabled||!this.open||e.composedPath().includes(this.el)||this.closeCalciteDropdown()}closeCalciteDropdownOnOpenEvent(e){this.referenceElementType||e.composedPath().includes(this.el)||this.closeCalciteDropdown()}pointerEnterHandler(){this.referenceElementType||this.disabled||this.type!=="hover"||(this.open=!0)}pointerLeaveHandler(){this.referenceElementType||this.disabled||this.type!=="hover"||this.closeCalciteDropdown()}getTraversableItems(){return this.items.filter(e=>!e.disabled&&!e.hidden)}async handleItemSelect(e){this.updateSelectedItems(),this.syncActiveItemFromTraversableItems(),e.stopPropagation(),this.calciteDropdownSelect.emit(),await this.setFocus(),this.closeOnSelectDisabled||this.closeCalciteDropdown()}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?k(t,e):null}updateItems(){this.items=this.groups.map(e=>Array.from(e?.querySelectorAll("calcite-dropdown-item"))).reduce((e,t)=>[...e,...t],[]),this.updateSelectedItems(),this.syncActiveItemFromTraversableItems(),this.reposition(!0),this.items.forEach(e=>e.scale=this.scale)}updateGroups(e){let t=e.target.assignedElements({flatten:!0}).filter(i=>i?.matches("calcite-dropdown-group"));this.groups=t,this.updateItems(),this.updateGroupProps()}updateGroupProps(){this.groups.forEach((e,t)=>{e.scale=this.scale,e.position=t})}resizeObserverCallback(e){e.forEach(({target:t})=>{t===this.referenceEl?this.setDropdownWidth():t===this.scrollerEl&&this.setMaxScrollerHeight()})}setDropdownWidth(){let{referenceEl:e,scrollerEl:t}=this;!t||!(e instanceof HTMLElement)||(t.style.minWidth=`${e.clientWidth}px`)}setMaxScrollerHeight(){let{maxItems:e,items:t,scrollerEl:i}=this;if(!i)return;let s=t.length>=e&&e>0?this.getYDistanceFromScroller(t.at(e-1)):0;i.style.maxBlockSize=s>0?`${s}px`:"",this.reposition(!0)}setScrollerAndTransitionEl(e){d(this.resizeObserver,this.scrollerEl,e),this.scrollerEl=e,this.transitionEl=e}onBeforeOpen(){this.setInitialActiveItem(),this.calciteDropdownBeforeOpen.emit(),this.topLayer.show()}onOpen(){this.calciteDropdownOpen.emit()}onBeforeClose(){this.calciteDropdownBeforeClose.emit()}onClose(){this.calciteDropdownClose.emit(),A(this),this.topLayer.hide()}setReferenceEl(e){let t=this.referenceEl instanceof HTMLElement?this.referenceEl:null,i=e instanceof HTMLElement?e:null;d(this.resizeObserver,t,i),this.referenceEl=e,n(this)}setFloatingEl(e){this.floatingEl=e,n(this)}keyDownHandler(e){if(!(this.referenceEl instanceof HTMLElement)||!e.composedPath().includes(this.referenceEl))return;let{defaultPrevented:t,key:i}=e;if(!t){if(this.open&&i==="Escape"){this.closeCalciteDropdown(),e.preventDefault();return}if(!this.open&&f(i)){this.open=!0,e.preventDefault();return}if(!this.open&&(i==="ArrowDown"||i==="ArrowUp")){e.preventDefault(),this.focusLastDropdownItem=i==="ArrowUp",this.open=!0;return}if(this.open){if(i==="Tab"){this.closeCalciteDropdown();return}if(i==="ArrowDown"){e.preventDefault(),this.navigateActiveItem("next");return}if(i==="ArrowUp"){e.preventDefault(),this.navigateActiveItem("previous");return}if(i==="Home"){e.preventDefault(),this.navigateActiveItem("first");return}if(i==="End"){e.preventDefault(),this.navigateActiveItem("last");return}f(i)&&(e.preventDefault(),this.activateActiveItem())}}}updateSelectedItems(){this.selectedItems=this.items.filter(e=>e.selected)}getYDistanceFromScroller(e){let t=e.getBoundingClientRect();return e.offsetTop+t.height}closeCalciteDropdown(){this.open=!1,this.setActiveItemByIndex(-1)}async setInitialActiveItem(){let e=this.getTraversableItems(),t=this.focusLastDropdownItem?e.at(-1):e[0];if(this.focusLastDropdownItem=!1,!t){this.setActiveItemByIndex(-1);return}let i=e.findIndex(s=>s===t);this.setActiveItemByIndex(i),await this.scrollActiveItemIntoView(t)}syncActiveItemFromTraversableItems(){let e=this.getTraversableItems();if(!e.length){this.setActiveItemByIndex(-1);return}if(this.activeItemIndex<0||this.activeItemIndex>=e.length){this.setActiveItemByIndex(0);return}this.updateActiveDescendantElement(e[this.activeItemIndex])}setActiveItemByIndex(e){this.activeItemIndex=e;let t=this.getTraversableItems(),i=e>=0?t[e]:null;this.updateActiveDescendantElement(i)}updateActiveDescendantElement(e){this.items.forEach(t=>{t.activeDescendant=t===e}),this.activeDescendantElement=e??null}navigateActiveItem(e){let t=this.getTraversableItems();if(!t.length)return;let i=t.length,s=this.activeItemIndex;s<0||s>=i?s=e==="previous"||e==="last"?i-1:0:e==="next"?s=(s+1)%i:e==="previous"?s=(s-1+i)%i:e==="first"?s=0:e==="last"&&(s=i-1);let l=t[s];this.setActiveItemByIndex(s),this.scrollActiveItemIntoView(l)}async scrollActiveItemIntoView(e){e&&(await this.updateComplete,await p(),await p(),e.scrollIntoView({block:"nearest"}))}activateActiveItem(){let e=this.getTraversableItems(),t=e[this.activeItemIndex]||e[0];t&&(this.setActiveItemByIndex(e.findIndex(i=>i===t)),t.activateItem())}openHoverDropdown(){this.open||this.disabled||this.type!=="hover"||(this.open=!0)}closeHoverDropdown(e){if(!this.open||this.disabled||this.type!=="hover")return;let t=e.relatedTarget;t&&(this.el.contains(t)||this.referenceEl!=null&&this.referenceEl instanceof HTMLElement&&this.referenceEl.contains(t))||this.closeCalciteDropdown()}toggleClickDropdown(){this.disabled||this.type!=="click"||(this.open=!this.open)}render(){let{open:e}=this;return this.interactiveContainer({disabled:this.disabled,children:c`${this.referenceElementType?null:c`<div class=${o(v.triggerContainer)} @click=${this.toggleClickDropdown} @focusin=${this.openHoverDropdown} @focusout=${this.closeHoverDropdown} @keydown=${this.keyDownHandler} ${a(this.setReferenceEl)}><slot .ariaActiveDescendantElement=${this.activeDescendantElement??null} .ariaControlsElements=${this.scrollerEl?[this.scrollerEl]:void 0} .ariaExpanded=${e} aria-haspopup=menu name=${$.trigger}></slot></div>`}<div class=${o({[v.wrapper]:!0,[T("width",this.width,this.widthScale)]:!!(this.width||this.widthScale)})} .inert=${!e} popover=manual ${a(this.setFloatingEl)}><div .ariaLabelledByElements=${this.referenceEl instanceof HTMLElement?[this.referenceEl]:void 0} class=${o({[v.content]:!0,[u.animation]:!0,[u.animationActive]:e})} role=menu ${a(this.setScrollerAndTransitionEl)}><slot @slotchange=${this.updateGroups}></slot></div></div>`})}};g("calcite-dropdown",w);export{w as Dropdown};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{b as u}from"./WKR7R7AZ.js";import{q as b}from"./M5EVL4VV.js";import"./OAOQ5BXS.js";import{G as g,H as c,S as m,g as d,h as o,p as h}from"./4E3ZDBJS.js";var f={input:"input"},t={label:"label",labelScale:i=>`label--scale-${i}`,labelHorizontal:"label--horizontal",labelOutline:"label--outline",labelOutlineFill:"label--outline-fill",icon:"icon",iconSolo:"icon--solo"},v=d`:host{display:flex;cursor:pointer;align-self:stretch;font-weight:var(--calcite-font-weight-normal);outline-color:transparent;transition:background-color var(--calcite-internal-animation-timing-fast) ease-in-out,border-color var(--calcite-animation-timing) ease-in-out}.label{pointer-events:none;margin:.125rem;box-sizing:border-box;display:flex;flex:1 1 0%;align-items:center;color:var(--calcite-segmented-control-color, var(--calcite-color-text-3));background-color:var(--calcite-segmented-control-background-color);box-shadow:var(--calcite-segmented-control-shadow);border-color:var(--calcite-segmented-control-border-color);transition:background-color var(--calcite-internal-animation-timing-fast) ease-in-out,border-color var(--calcite-internal-animation-timing-fast) ease-in-out,color var(--calcite-internal-animation-timing-fast) ease-in-out}.label--horizontal{justify-content:center}:host(:focus){outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))));outline-offset:-1px;z-index:var(--calcite-z-index)}.label--scale-s{padding-inline:.5rem;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);padding-block:.125rem}.label--scale-m{padding-inline:.75rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);padding-block:.375rem}.label--scale-l{padding-inline:1rem;padding-block:var(--calcite-space-sm-plus);font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host(:hover) .label{background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-foreground-2));color:var(--calcite-segmented-control-color, var(--calcite-color-text-1))}:host(:active) .label{background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-foreground-3))}:host([checked]) .label{cursor:default;background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-brand));border-color:var(--calcite-segmented-control-border-color, var(--calcite-color-brand));color:var(--calcite-segmented-control-color, var(--calcite-color-text-inverse))}:host([checked]) .label--outline,:host([checked]) .label--outline-fill{background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-foreground-1));border-color:var(--calcite-segmented-control-border-color, var(--calcite-color-brand));box-shadow:var(--calcite-segmented-control-shadow, inset 0 0 0 1px var(--calcite-color-brand));color:var(--calcite-segmented-control-color, var(--calcite-color-brand))}:host([checked]) .label--outline{background-color:var(--calcite-segmented-control-background-color, transparent)}::slotted(input){display:none}@media(forced-colors:active){:host([checked]) .label{background-color:highlight}:host([checked]) .label--outline,:host([checked]) .label--outline-fill{outline:2px solid transparent;outline-offset:2px}:host([checked]) .label:not([class~=label--outline]) .icon{color:highlightText}}.icon{position:relative;margin:0;display:inline-flex;line-height:inherit;margin-inline-start:var(--calcite-internal-segmented-control-icon-margin-start);margin-inline-end:var(--calcite-internal-segmented-control-icon-margin-end);--calcite-icon-color: var(--calcite-segmented-control-icon-color)}:host([icon-start]) .label--scale-s{--calcite-internal-segmented-control-icon-margin-end: .5rem}:host([icon-end]) .label--scale-s{--calcite-internal-segmented-control-icon-margin-start: .5rem}:host([icon-start]) .label--scale-m{--calcite-internal-segmented-control-icon-margin-end: .75rem}:host([icon-end]) .label--scale-m{--calcite-internal-segmented-control-icon-margin-start: .75rem}:host([icon-start]) .label--scale-l{--calcite-internal-segmented-control-icon-margin-end: 1rem}:host([icon-end]) .label--scale-l{--calcite-internal-segmented-control-icon-margin-start: 1rem}.label .icon--solo{--calcite-internal-segmented-control-icon-margin-start: 0;--calcite-internal-segmented-control-icon-margin-end: 0}:host([hidden]){display:none}[hidden]{display:none}`,r=class extends g{constructor(){super(...arguments),this.hasSlottedContent=!1,this.appearance="solid",this.checked=!1,this.iconFlipRtl=!1,this.layout="horizontal",this.scale="m",this.calciteInternalSegmentedControlItemChange=h({cancelable:!1})}static{this.properties={hasSlottedContent:[16,{},{state:!0}],appearance:1,checked:[7,{},{reflect:!0,type:Boolean}],iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],iconStart:[3,{type:String},{reflect:!0}],layout:1,scale:1,value:1}}static{this.styles=v}willUpdate(e){e.has("checked")&&(this.hasUpdated||this.checked!==!1)&&this.calciteInternalSegmentedControlItemChange.emit()}handleSlotChange(e){this.hasSlottedContent=b(e)}renderIcon(e,l=!1){return e?o`<calcite-icon class=${c({[t.icon]:!0,[t.iconSolo]:l})} .flipRtl=${this.iconFlipRtl} .icon=${e} scale=s></calcite-icon>`:null}render(){let{appearance:e,checked:l,layout:n,scale:a,value:s}=this;return this.el.ariaChecked=u(l),this.el.ariaLabel=s,this.el.role="radio",o`<label class=${c({[t.label]:!0,[t.labelScale(a)]:!0,[t.labelHorizontal]:n==="horizontal",[t.labelOutline]:e==="outline",[t.labelOutlineFill]:e==="outline-fill"})}>${this.renderContent()}</label>`}renderContent(){let{hasSlottedContent:e,iconEnd:l,iconStart:n}=this,a=n||l;return!e&&a?[this.renderIcon(a,!0),o`<slot @slotchange=${this.handleSlotChange}></slot>`]:[this.renderIcon(n),o`<slot @slotchange=${this.handleSlotChange}></slot>`,o`<slot name=${f.input}></slot>`,this.renderIcon(l)]}};m("calcite-segmented-control-item",r);export{r as SegmentedControlItem};
2
+ import{b as u}from"./WKR7R7AZ.js";import{q as b}from"./YZUVO4BX.js";import"./OAOQ5BXS.js";import{G as g,H as c,S as m,g as d,h as o,p as h}from"./ZY2K66YV.js";var f={input:"input"},t={label:"label",labelScale:i=>`label--scale-${i}`,labelHorizontal:"label--horizontal",labelOutline:"label--outline",labelOutlineFill:"label--outline-fill",icon:"icon",iconSolo:"icon--solo"},v=d`:host{display:flex;cursor:pointer;align-self:stretch;font-weight:var(--calcite-font-weight-normal);outline-color:transparent;transition:background-color var(--calcite-internal-animation-timing-fast) ease-in-out,border-color var(--calcite-animation-timing) ease-in-out}.label{pointer-events:none;margin:.125rem;box-sizing:border-box;display:flex;flex:1 1 0%;align-items:center;color:var(--calcite-segmented-control-color, var(--calcite-color-text-3));background-color:var(--calcite-segmented-control-background-color);box-shadow:var(--calcite-segmented-control-shadow);border-color:var(--calcite-segmented-control-border-color);transition:background-color var(--calcite-internal-animation-timing-fast) ease-in-out,border-color var(--calcite-internal-animation-timing-fast) ease-in-out,color var(--calcite-internal-animation-timing-fast) ease-in-out}.label--horizontal{justify-content:center}:host(:focus){outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))));outline-offset:-1px;z-index:var(--calcite-z-index)}.label--scale-s{padding-inline:.5rem;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);padding-block:.125rem}.label--scale-m{padding-inline:.75rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);padding-block:.375rem}.label--scale-l{padding-inline:1rem;padding-block:var(--calcite-space-sm-plus);font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host(:hover) .label{background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-foreground-2));color:var(--calcite-segmented-control-color, var(--calcite-color-text-1))}:host(:active) .label{background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-foreground-3))}:host([checked]) .label{cursor:default;background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-brand));border-color:var(--calcite-segmented-control-border-color, var(--calcite-color-brand));color:var(--calcite-segmented-control-color, var(--calcite-color-text-inverse))}:host([checked]) .label--outline,:host([checked]) .label--outline-fill{background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-foreground-1));border-color:var(--calcite-segmented-control-border-color, var(--calcite-color-brand));box-shadow:var(--calcite-segmented-control-shadow, inset 0 0 0 1px var(--calcite-color-brand));color:var(--calcite-segmented-control-color, var(--calcite-color-brand))}:host([checked]) .label--outline{background-color:var(--calcite-segmented-control-background-color, transparent)}::slotted(input){display:none}@media(forced-colors:active){:host([checked]) .label{background-color:highlight}:host([checked]) .label--outline,:host([checked]) .label--outline-fill{outline:2px solid transparent;outline-offset:2px}:host([checked]) .label:not([class~=label--outline]) .icon{color:highlightText}}.icon{position:relative;margin:0;display:inline-flex;line-height:inherit;margin-inline-start:var(--calcite-internal-segmented-control-icon-margin-start);margin-inline-end:var(--calcite-internal-segmented-control-icon-margin-end);--calcite-icon-color: var(--calcite-segmented-control-icon-color)}:host([icon-start]) .label--scale-s{--calcite-internal-segmented-control-icon-margin-end: .5rem}:host([icon-end]) .label--scale-s{--calcite-internal-segmented-control-icon-margin-start: .5rem}:host([icon-start]) .label--scale-m{--calcite-internal-segmented-control-icon-margin-end: .75rem}:host([icon-end]) .label--scale-m{--calcite-internal-segmented-control-icon-margin-start: .75rem}:host([icon-start]) .label--scale-l{--calcite-internal-segmented-control-icon-margin-end: 1rem}:host([icon-end]) .label--scale-l{--calcite-internal-segmented-control-icon-margin-start: 1rem}.label .icon--solo{--calcite-internal-segmented-control-icon-margin-start: 0;--calcite-internal-segmented-control-icon-margin-end: 0}:host([hidden]){display:none}[hidden]{display:none}`,r=class extends g{constructor(){super(...arguments),this.hasSlottedContent=!1,this.appearance="solid",this.checked=!1,this.iconFlipRtl=!1,this.layout="horizontal",this.scale="m",this.calciteInternalSegmentedControlItemChange=h({cancelable:!1})}static{this.properties={hasSlottedContent:[16,{},{state:!0}],appearance:1,checked:[7,{},{reflect:!0,type:Boolean}],iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],iconStart:[3,{type:String},{reflect:!0}],layout:1,scale:1,value:1}}static{this.styles=v}willUpdate(e){e.has("checked")&&(this.hasUpdated||this.checked!==!1)&&this.calciteInternalSegmentedControlItemChange.emit()}handleSlotChange(e){this.hasSlottedContent=b(e)}renderIcon(e,l=!1){return e?o`<calcite-icon class=${c({[t.icon]:!0,[t.iconSolo]:l})} .flipRtl=${this.iconFlipRtl} .icon=${e} scale=s></calcite-icon>`:null}render(){let{appearance:e,checked:l,layout:n,scale:a,value:s}=this;return this.el.ariaChecked=u(l),this.el.ariaLabel=s,this.el.role="radio",o`<label class=${c({[t.label]:!0,[t.labelScale(a)]:!0,[t.labelHorizontal]:n==="horizontal",[t.labelOutline]:e==="outline",[t.labelOutlineFill]:e==="outline-fill"})}>${this.renderContent()}</label>`}renderContent(){let{hasSlottedContent:e,iconEnd:l,iconStart:n}=this,a=n||l;return!e&&a?[this.renderIcon(a,!0),o`<slot @slotchange=${this.handleSlotChange}></slot>`]:[this.renderIcon(n),o`<slot @slotchange=${this.handleSlotChange}></slot>`,o`<slot name=${f.input}></slot>`,this.renderIcon(l)]}};m("calcite-segmented-control-item",r);export{r as SegmentedControlItem};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as p}from"./TG2V3PD6.js";import{a as b}from"./X7BSBNJI.js";import"./RH6ZIP65.js";import"./QFYAIO5N.js";import"./OPUF2ESH.js";import"./M5EVL4VV.js";import"./OAOQ5BXS.js";import{E as s,F as c,G as r,H as n,J as d,S as u,g as i,h as l}from"./4E3ZDBJS.js";var k={button:"button"},R={plus:"plus"},S=i`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex;background-color:transparent}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}calcite-button{--calcite-fab-shadow-internal: 0 6px 20px -4px rgba(0, 0, 0, .1), 0 4px 12px -2px rgba(0, 0, 0, .08);box-shadow:var(--calcite-fab-shadow, var(--calcite-fab-shadow-internal));--calcite-button-background-color: var(--calcite-fab-background-color);--calcite-button-border-color: var(--calcite-fab-border-color);--calcite-button-corner-radius: var(--calcite-fab-corner-radius);--calcite-button-text-color: var(--calcite-fab-text-color);--calcite-button-loader-color: var(--calcite-fab-loader-color)}:host([hidden]){display:none}[hidden]{display:none}`,e=class extends r{constructor(){super(...arguments),this.buttonRef=s(),this.focusSetter=b()(this),this.interactiveContainer=p(this),this.appearance="solid",this.disabled=!1,this.icon=R.plus,this.iconFlipRtl=!1,this.kind="brand",this.loading=!1,this.scale="m",this.textEnabled=!1}static{this.properties={appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],icon:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],kind:[3,{},{reflect:!0}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],text:1,textEnabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=S}async setFocus(t){return this.focusSetter(()=>this.buttonRef.value,t)}render(){let{appearance:t,kind:h,disabled:a,loading:f,scale:x,textEnabled:m,icon:y,label:o,text:v,iconFlipRtl:g}=this,$=m?void 0:o||v||void 0;return this.interactiveContainer({disabled:a,children:l`<calcite-button .appearance=${t==="solid"?"solid":"outline-fill"} class=${n(k.button)} .disabled=${a} .iconFlipRtl=${g?"start":void 0} .iconStart=${y} .kind=${h} .label=${o} .loading=${f} round .scale=${x} title=${$??d} type=button width=auto ${c(this.buttonRef)}>${this.textEnabled?this.text:null}</calcite-button>`})}};u("calcite-fab",e);export{e as Fab};
2
+ import{a as p}from"./LSPPTTY7.js";import{a as b}from"./4OQTPZUU.js";import"./RH6ZIP65.js";import"./2UT6QW2P.js";import"./XAGMG6IZ.js";import"./YZUVO4BX.js";import"./OAOQ5BXS.js";import{E as s,F as c,G as r,H as n,J as d,S as u,g as i,h as l}from"./ZY2K66YV.js";var k={button:"button"},R={plus:"plus"},S=i`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex;background-color:transparent}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}calcite-button{--calcite-fab-shadow-internal: 0 6px 20px -4px rgba(0, 0, 0, .1), 0 4px 12px -2px rgba(0, 0, 0, .08);box-shadow:var(--calcite-fab-shadow, var(--calcite-fab-shadow-internal));--calcite-button-background-color: var(--calcite-fab-background-color);--calcite-button-border-color: var(--calcite-fab-border-color);--calcite-button-corner-radius: var(--calcite-fab-corner-radius);--calcite-button-text-color: var(--calcite-fab-text-color);--calcite-button-loader-color: var(--calcite-fab-loader-color)}:host([hidden]){display:none}[hidden]{display:none}`,e=class extends r{constructor(){super(...arguments),this.buttonRef=s(),this.focusSetter=b()(this),this.interactiveContainer=p(this),this.appearance="solid",this.disabled=!1,this.icon=R.plus,this.iconFlipRtl=!1,this.kind="brand",this.loading=!1,this.scale="m",this.textEnabled=!1}static{this.properties={appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],icon:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],kind:[3,{},{reflect:!0}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],text:1,textEnabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=S}async setFocus(t){return this.focusSetter(()=>this.buttonRef.value,t)}render(){let{appearance:t,kind:h,disabled:a,loading:f,scale:x,textEnabled:m,icon:y,label:o,text:v,iconFlipRtl:g}=this,$=m?void 0:o||v||void 0;return this.interactiveContainer({disabled:a,children:l`<calcite-button .appearance=${t==="solid"?"solid":"outline-fill"} class=${n(k.button)} .disabled=${a} .iconFlipRtl=${g?"start":void 0} .iconStart=${y} .kind=${h} .label=${o} .loading=${f} round .scale=${x} title=${$??d} type=button width=auto ${c(this.buttonRef)}>${this.textEnabled?this.text:null}</calcite-button>`})}};u("calcite-fab",e);export{e as Fab};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as $,b as M}from"./MUIXFS3K.js";import{a as C}from"./3PITBECR.js";import{a as g}from"./FW4KB235.js";import{a as S}from"./WKR7R7AZ.js";import{a as P}from"./ANC4DUDW.js";import{e as V}from"./QFYAIO5N.js";import"./OPUF2ESH.js";import{D as u,t as O,u as L}from"./M5EVL4VV.js";import"./OAOQ5BXS.js";import{E as H,F as B,G as A,H as s,M as v,O as D,P as _,S as E,g as I,h as m,p as y}from"./4E3ZDBJS.js";var K=I`.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-right{animation-name:in-right}.calcite-animate__in-left{animation-name:in-left}.calcite-animate__in-scale{animation-name:in-scale}@keyframes in{0%{opacity:0}to{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0,-5px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0,5px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-right{0%{opacity:0;transform:translate3D(-5px,0,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-left{0%{opacity:0;transform:translate3D(5px,0,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(.95,.95,1)}to{opacity:1;transform:scaleZ(1)}}`,n={container:"container",actionBarContainer:"action-bar-container",contentContainer:"content-container",content:"content",contentHeader:"content__header",contentBody:"content__body",contentOverlay:"content--overlay",floatAll:"float-all",floatContent:"float--content",resizeHandle:"resize-handle",resizeHandleBar:"resize-handle-bar"},N={actionBar:"action-bar",header:"header"},U={dragVertical:"drag-resize-vertical",dragHorizontal:"drag-resize-horizontal"},T=I`:host{pointer-events:none;position:relative;display:flex;flex:0 1 auto;align-items:stretch;z-index:var(--calcite-shell-panel-z-index, var(--calcite-z-index));--calcite-shell-panel-max-height: unset;--calcite-internal-shell-panel-shadow-block-start: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-block-end: 0 -4px 8px -1px rgba(0, 0, 0, .08), 0 -2px 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-inline-start: 4px 0 8px -1px rgba(0, 0, 0, .08), 2px 0 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-inline-end: -4px 0 8px -1px rgba(0, 0, 0, .08), -2px 0 4px -1px rgba(0, 0, 0, .04)}.calcite--rtl.content--overlay{--calcite-internal-shell-panel-shadow-inline-start: -4px 0 8px -1px rgba(0, 0, 0, .08), -2px 0 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-inline-end: 4px 0 8px -1px rgba(0, 0, 0, .08), 2px 0 4px -1px rgba(0, 0, 0, .04)}:host([layout=vertical]){z-index:var(--calcite-shell-panel-z-index, calc(var(--calcite-z-index) + 1))}:host([layout=vertical][display-mode=overlay]){z-index:var(--calcite-shell-panel-z-index, calc(var(--calcite-z-index-header) + 1))}:host([layout=vertical][display-mode=float-all]) .content{flex:2}:host([layout=vertical]:not([display-mode=float-all])) .width-s{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 12vw);--calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 300px);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 150px)}:host([layout=vertical][display-mode=float-all]) .width-s{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 12vw);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 150px)}:host([layout=vertical]:not([display-mode=float-all])) .width-m{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 20vw);--calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 420px);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 240px)}:host([layout=vertical][display-mode=float-all]) .width-m{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 20vw);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 240px)}:host([layout=vertical]:not([display-mode=float-all])) .width-l{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 45vw);--calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 680px);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 340px)}:host([layout=vertical][display-mode=float-all]) .width-l{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 45vw);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 340px)}:host([layout=horizontal]) .content{--calcite-internal-shell-panel-height: var(--calcite-shell-panel-height);--calcite-internal-shell-panel-min-height: var(--calcite-shell-panel-min-height, 5vh);--calcite-internal-shell-panel-max-height: var(--calcite-shell-panel-max-height, 30vh)}:host([layout=horizontal]) .height-s{--calcite-internal-shell-panel-height: var(--calcite-shell-panel-height);--calcite-internal-shell-panel-min-height: var(--calcite-shell-panel-min-height, 5vh);--calcite-internal-shell-panel-max-height: var(--calcite-shell-panel-max-height, 20vh)}:host([layout=horizontal]) .height-l{--calcite-internal-shell-panel-height: var(--calcite-shell-panel-height);--calcite-internal-shell-panel-min-height: var(--calcite-shell-panel-min-height, 5vh);--calcite-internal-shell-panel-max-height: var(--calcite-shell-panel-max-height, 40vh)}:host([display-mode=float-all][height=s]),:host([display-mode=float-all][height-scale=s]) .content{min-block-size:var(--calcite-shell-panel-height, 20vh)}:host([display-mode=float-all][height=m]),:host([display-mode=float-all][height-scale=m]) .content{min-block-size:var(--calcite-shell-panel-height, 30vh)}:host([display-mode=float-all][height=l]),:host([display-mode=float-all][height-scale=l]) .content{min-block-size:var(--calcite-shell-panel-height, 40vh)}.container{pointer-events:none;box-sizing:border-box;display:flex;block-size:100%;flex:1 1 auto;align-items:stretch;background-color:transparent;font-size:var(--calcite-font-size-relative-base);color:var(--calcite-shell-panel-text-color, var(--calcite-color-text-2))}.container *{box-sizing:border-box}.container.float-all{margin-block:var(--calcite-spacing-sm);margin-inline:var(--calcite-spacing-sm)}.float-all{max-block-size:var(--calcite-internal-shell-panel-max-height, calc(100% - 1rem) );box-shadow:var(--calcite-shell-panel-shadow, var(--calcite-shadow-sm));border-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));overflow:hidden}:host([layout=vertical][position=start]) .float-all{border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-shell-panel-border-color, var(--calcite-color-border-3))}:host([layout=vertical][position=end]) .float-all{border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-shell-panel-border-color, var(--calcite-color-border-3)))}:host([layout=horizontal]) .float-all{border-inline:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-shell-panel-border-color, var(--calcite-color-border-3)))}:host([layout=horizontal]) .container{block-size:auto;inline-size:100%;flex-direction:column}.resize-handle{position:absolute;box-sizing:border-box;display:flex;-webkit-user-select:none;user-select:none;align-items:center;justify-content:center;outline:2px solid transparent;outline-offset:2px;--calcite-internal-shell-panel-resize-handle-offset: calc( (var(--calcite-size-fixed-xxl) - var(--calcite-size-fixed-sm-plus)) / 2 * -1 );z-index:var(--calcite-z-index-header)}.resize-handle:active .resize-handle-bar,.resize-handle:hover .resize-handle-bar{color:var(--calcite-shell-panel-resize-icon-color, var(--calcite-color-text-1));background-color:var(--calcite-shell-panel-resize-background-color, var(--calcite-color-foreground-3))}.resize-handle-bar{pointer-events:none;display:flex;align-items:center;justify-content:center;color:var(--calcite-shell-panel-resize-icon-color, var(--calcite-color-border-input));background-color:var(--calcite-shell-panel-resize-background-color, var(--calcite-color-background))}.resize-handle:focus .resize-handle-bar{outline-color:transparent;outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)))}:host([position=start][layout=vertical]) .resize-handle{inline-size:var(--calcite-size-fixed-xxl);inset-inline-end:var(--calcite-internal-shell-panel-resize-handle-offset);block-size:100%}:host([position=start][layout=vertical]) .resize-handle-bar{block-size:100%;inline-size:var(--calcite-size-fixed-sm-plus);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=start][layout=vertical]):host([display-mode^=float]) .resize-handle-bar{border-start-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-end-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}:host([position=end][layout=vertical]) .resize-handle{inline-size:var(--calcite-size-fixed-xxl);inset-inline-start:var(--calcite-internal-shell-panel-resize-handle-offset);block-size:100%}:host([position=end][layout=vertical]) .resize-handle-bar{block-size:100%;inline-size:var(--calcite-size-fixed-sm-plus);border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=end][layout=vertical]):host([display-mode^=float]) .resize-handle-bar{border-start-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-end-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}:host([position=start][layout=horizontal]) .resize-handle{block-size:var(--calcite-size-fixed-xxl);inline-size:100%;inset-block-end:var(--calcite-internal-shell-panel-resize-handle-offset)}:host([position=start][layout=horizontal]) .resize-handle-bar{inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);border-block-start:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=start][layout=horizontal]):host([display-mode^=float]) .resize-handle-bar{border-end-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-end-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}:host([position=end][layout=horizontal]) .resize-handle{block-size:var(--calcite-size-fixed-xxl);inline-size:100%;inset-block-start:var(--calcite-internal-shell-panel-resize-handle-offset)}:host([position=end][layout=horizontal]) .resize-handle-bar{inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);border-block-end:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=end][layout=horizontal]):host([display-mode^=float]) .resize-handle-bar{border-start-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-start-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}::slotted(calcite-panel),::slotted(calcite-flow){block-size:100%;inline-size:100%;flex:1 1 auto;max-block-size:unset;max-inline-size:unset}.action-bar-container{pointer-events:auto;box-sizing:border-box;display:flex;flex:1 1 auto}.content-container{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;align-items:stretch;align-self:stretch}:host([layout=horizontal]) .action-bar-container,:host([layout=horizontal]) .content-container{flex-direction:column}.content{pointer-events:auto;position:relative;box-sizing:border-box;display:flex;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;align-self:stretch;padding:0;background-color:var(--calcite-shell-panel-background-color, var(--calcite-color-background));transition:max-block-size var(--calcite-animation-timing),max-inline-size var(--calcite-animation-timing)}:host([layout=vertical]:not([display-mode=float-all])) .content{inline-size:var(--calcite-internal-shell-panel-width);max-inline-size:var(--calcite-internal-shell-panel-max-width);min-inline-size:var(--calcite-internal-shell-panel-min-width)}:host([layout=vertical][display-mode=float-all]) .content{inline-size:var(--calcite-internal-shell-panel-width);min-inline-size:var(--calcite-internal-shell-panel-min-width)}:host([layout=horizontal]) .content{block-size:var(--calcite-internal-shell-panel-height);max-block-size:var(--calcite-internal-shell-panel-max-height);min-block-size:var(--calcite-internal-shell-panel-min-height)}:host([resizable][layout=vertical][position=start]) .content{padding-inline-end:var(--calcite-size-fixed-sm-plus)}:host([resizable][layout=vertical][position=end]) .content{padding-inline-start:var(--calcite-size-fixed-sm-plus)}:host([resizable][layout=horizontal][position=start]) .content{padding-block-end:var(--calcite-size-fixed-sm-plus)}:host([resizable][layout=horizontal][position=end]) .content{padding-block-start:var(--calcite-size-fixed-sm-plus)}.content__header{display:flex;flex:0 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch}.content__body{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.content--overlay{position:absolute;--tw-shadow: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--tw-shadow-colored: 0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--calcite-shell-panel-shadow, var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow))}:host([layout=vertical]) .content--overlay{inset-block-start:0px;block-size:100%}:host([layout=horizontal]) .content--overlay{inset-inline-start:0px;inline-size:100%}:host([layout=vertical][position=start]) .content--overlay{inset-inline-start:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-inline-start)}:host([layout=vertical][position=end]) .content--overlay{inset-inline-end:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-inline-end)}:host([layout=horizontal][position=start]) .content--overlay{inset-block-start:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-block-start)}:host([layout=horizontal][position=end]) .content--overlay{inset-block-end:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-block-end)}.float--content{margin-block-end:auto;block-size:auto;overflow:hidden;--tw-shadow: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--tw-shadow-colored: 0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--calcite-shell-panel-shadow, var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow));border-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));margin-inline:var(--calcite-spacing-sm);margin-block-start:var(--calcite-spacing-sm);max-block-size:var(--calcite-internal-shell-panel-max-height, calc(100% - 1rem) )}.float--content ::slotted(calcite-panel),.float--content ::slotted(calcite-flow){max-block-size:unset}:host([layout=horizontal]) .float--content{margin-block:var(--calcite-spacing-sm)}:host([position=start]) .float--content ::slotted(calcite-panel),:host([position=start]) .float--content ::slotted(calcite-flow),:host([position=end]) .float--content ::slotted(calcite-panel),:host([position=end]) .float--content ::slotted(calcite-flow){border-style:none}slot[name=action-bar]::slotted(calcite-action-bar),.content ::slotted(calcite-flow),.content ::slotted(calcite-panel:not([closed])){border:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=start]:not([slot=panel-end])) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=start]:not([slot=panel-end])) .content ::slotted(calcite-flow),:host([position=start]:not([slot=panel-end])) .content ::slotted(calcite-panel),:host([position=end][slot=panel-start]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=end][slot=panel-start]) .content ::slotted(calcite-flow),:host([position=end][slot=panel-start]) .content ::slotted(calcite-panel){border-inline-start:none}:host([resizable][layout=vertical]) .content ::slotted(calcite-flow),:host([resizable][layout=vertical]) .content ::slotted(calcite-panel){border-inline-start:none;border-inline-end:none}:host([resizable][layout=horizontal]) .content ::slotted(calcite-flow),:host([resizable][layout=horizontal]) .content ::slotted(calcite-panel){border-block-start:none;border-block-end:none}:host([position=end]:not([slot=panel-start])) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=end]:not([slot=panel-start])) .content ::slotted(calcite-flow),:host([position=end]:not([slot=panel-start])) .content ::slotted(calcite-panel),:host([position=start][slot=panel-end]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=start][slot=panel-end]) .content ::slotted(calcite-flow),:host([position=start][slot=panel-end]) .content ::slotted(calcite-panel){border-inline-end:none}:host([layout=horizontal]) slot[name=action-bar]::slotted(calcite-action-bar){border-inline:0}:host([layout=horizontal][position=start]) .content ::slotted(calcite-flow),:host([layout=horizontal][position=start]) .content ::slotted(calcite-panel){border-inline:0;border-block-start:0}:host([layout=horizontal][position=end]) .content ::slotted(calcite-flow),:host([layout=horizontal][position=end]) .content ::slotted(calcite-panel){border-inline:0;border-block-end:0}:host([display-mode=dock]) .resize-handle-bar,:host([display-mode=float-all]) .resize-handle-bar,:host([display-mode=overlay]) .resize-handle-bar{border-block-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);border-block-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}:host([hidden]){display:none}[hidden]{display:none}`,R=class extends A{constructor(){super(...arguments),this.direction=V(),this.actionBars=[],this.contentRef=H(),this.messages=P(),this.sizeOverride=M({targetElement:this.contentRef,getBounds:()=>({inline:{min:this.resizeValues.minInlineSize,max:this.resizeValues.maxInlineSize},block:{min:this.resizeValues.minBlockSize,max:this.resizeValues.maxBlockSize}}),onResize:e=>{this.resizeValues=e}}),this.resizeValues={inlineSize:null,blockSize:null,minInlineSize:null,minBlockSize:null,maxInlineSize:null,maxBlockSize:null},this.hasHeader=!1,this.collapsed=!1,this.displayMode="dock",this.layout="vertical",this.position="start",this.resizable=!1,this.widthScale="m",this.calciteInternalShellPanelResizeEnd=y({cancelable:!1}),this.calciteInternalShellPanelResizeStart=y({cancelable:!1}),this.calciteShellPanelCollapse=y({cancelable:!1}),this.calciteShellPanelExpand=y({cancelable:!1})}static{this.properties={resizeValues:[16,{},{state:!0}],hasHeader:[16,{},{state:!0}],collapsed:[7,{},{reflect:!0,type:Boolean}],displayMode:[3,{},{reflect:!0}],heightScale:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],position:[3,{},{reflect:!0}],resizable:[7,{},{reflect:!0,type:Boolean}],height:[3,{},{reflect:!0}],widthScale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=[T,K]}async updateSize(e){this.updateSizeInternal(e)}willUpdate(e){e.has("layout")&&(this.hasUpdated||this.layout!=="vertical")&&this.setActionBarsLayout(this.actionBars),e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calciteShellPanelCollapse.emit():this.calciteShellPanelExpand.emit()),e.has("direction")&&this.setupInteractions()}disconnectedCallback(){super.disconnectedCallback(),this.cleanupInteractions()}getContentElDOMRect(){return this.contentRef.value.getBoundingClientRect()}updateSizeInternal(e){this.contentRef.value&&this.sizeOverride.resize(e)}handleKeyDown(e){let{key:a,defaultPrevented:h,shiftKey:r}=e,{position:l,layout:t,resizable:i,contentRef:c,resizeValues:{maxBlockSize:b,maxInlineSize:z,minBlockSize:f,minInlineSize:k}}=this,d=[...t==="horizontal"?["ArrowUp","ArrowDown"]:["ArrowLeft","ArrowRight"],"Home","End"];if(!i||!c.value||h||!d.includes(a))return;let p=this.getContentElDOMRect(),w=this.direction==="rtl"?-1:1,o=r?_:D;switch(a){case"ArrowUp":this.updateSizeInternal({block:p.height+(t==="horizontal"&&l==="end"?o:-o)}),e.preventDefault();break;case"ArrowDown":this.updateSizeInternal({block:p.height+(t==="horizontal"&&l==="end"?-o:o)}),e.preventDefault();break;case"ArrowLeft":this.updateSizeInternal({inline:p.width+(t==="vertical"&&l==="end"?o:-o)*w}),e.preventDefault();break;case"ArrowRight":this.updateSizeInternal({inline:p.width+(t==="vertical"&&l==="end"?-o:o)*w}),e.preventDefault();break;case"Home":this.updateSizeInternal(t==="horizontal"?{block:f}:{inline:k}),e.preventDefault();break;case"End":this.updateSizeInternal(t==="horizontal"?{block:b}:{inline:z}),e.preventDefault();break}}cleanupInteractions(){this.interaction?.unset()}async setupInteractions(){this.cleanupInteractions();let{el:e,contentRef:a,resizable:h,position:r,collapsed:l,resizeHandleEl:t,layout:i}=this;if(!a.value||l||!h||!t)return;await this.el.componentOnReady();let{inlineSize:c,minInlineSize:b,blockSize:z,minBlockSize:f,maxInlineSize:k,maxBlockSize:x}=window.getComputedStyle(a.value),d={inlineSize:u(c),blockSize:u(z),minInlineSize:u(b),minBlockSize:u(f),maxInlineSize:u(k)||window.innerWidth,maxBlockSize:u(x)||window.innerHeight};this.resizeValues=d;let p=this.direction==="rtl";this.interaction=$(a.value,{context:e.ownerDocument}).resizable({edges:{top:r==="end"&&i==="horizontal"?t:!1,right:r===(p?"end":"start")&&i==="vertical"?t:!1,bottom:r==="start"&&i==="horizontal"?t:!1,left:r===(p?"start":"end")&&i==="vertical"?t:!1},modifiers:[$.modifiers.restrictSize({min:{width:d.minInlineSize,height:d.minBlockSize},max:{width:d.maxInlineSize,height:d.maxBlockSize}})],listeners:{resizestart:()=>{this.calciteInternalShellPanelResizeStart.emit()},resizeend:()=>{this.calciteInternalShellPanelResizeEnd.emit()},move:({rect:w})=>{let o=i==="horizontal";this.updateSize(o?{block:w.height}:{inline:w.width})}}})}setResizeHandleEl(e){this.resizeHandleEl=e,this.setupInteractions()}setActionBarsLayout(e){e.forEach(a=>a.layout=this.layout)}handleActionBarSlotChange(e){let a=L(e).filter(h=>h?.matches("calcite-action-bar"));this.actionBars=a,this.setActionBarsLayout(a)}handleHeaderSlotChange(e){this.hasHeader=O(e)}getResizeIcon(){let{layout:e}=this;return e==="horizontal"?U.dragVertical:U.dragHorizontal}renderHeader(){return g("header",m`<div class=${s(n.contentHeader)} .hidden=${!this.hasHeader}><slot name=${N.header} @slotchange=${this.handleHeaderSlotChange}></slot></div>`)}render(){let{collapsed:e,position:a,resizable:h,layout:r,displayMode:l,resizeValues:t}=this,i=this.direction,c=r==="horizontal",b=!e&&h?g("resize-handle",m`<div .ariaLabel=${this.messages.resize} .ariaOrientation=${c?"vertical":"horizontal"} .ariaValueMax=${S(c?"block":"inline",t.maxBlockSize,t.maxInlineSize)} .ariaValueMin=${S(c?"block":"inline",t.minBlockSize,t.minInlineSize)} .ariaValueNow=${S(c?"block":"inline",t.blockSize,t.inlineSize)} class=${s(n.resizeHandle)} @keydown=${this.handleKeyDown} role=separator tabindex=0 touch-action=none ${B(this.setResizeHandleEl)}><div class=${s(n.resizeHandleBar)}><calcite-icon .icon=${this.getResizeIcon()} scale=s></calcite-icon></div></div>`):null,z=()=>r==="horizontal"?a==="start"?v.calciteAnimateInDown:v.calciteAnimateInUp:i==="ltr"&&a==="end"||i==="rtl"&&a==="start"?v.calciteAnimateInLeft:v.calciteAnimateInRight,f=m`<div class=${s(n.contentContainer)}>${g("content",m`<div class=${s({[v.rtl]:i==="rtl",[n.content]:!0,[n.contentOverlay]:l==="overlay",[n.floatContent]:l==="float-content"||l==="float",[v.calciteAnimate]:l==="overlay",[z()]:l==="overlay",[C("width",this.width,this.widthScale)]:!!(this.width||this.widthScale),[C("height",this.height,this.heightScale)]:!!(this.height||this.heightScale)})} .hidden=${e} ${B(this.contentRef)}>${this.renderHeader()}<div class=${s(n.contentBody)}><slot></slot></div>${b}</div>`)}</div>`,x=[g("action-bar-container",m`<div class=${s(n.actionBarContainer)}><slot name=${N.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`),f];return a==="end"&&x.reverse(),m`<div class=${s({[n.container]:!0,[n.floatAll]:l==="float-all"})}>${x}</div>`}};E("calcite-shell-panel",R);export{R as ShellPanel};
2
+ import{a as $,b as U}from"./H3MNG2YW.js";import{a as C}from"./3PITBECR.js";import{a as g}from"./RBW3KVLR.js";import{a as S}from"./WKR7R7AZ.js";import{a as P}from"./T5XR4YFF.js";import{e as V}from"./2UT6QW2P.js";import"./XAGMG6IZ.js";import{D as u,t as O,u as L}from"./YZUVO4BX.js";import"./OAOQ5BXS.js";import{E as H,F as B,G as A,H as s,M as v,O as D,P as _,S as E,g as I,h as m,p as y}from"./ZY2K66YV.js";var K=I`.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-right{animation-name:in-right}.calcite-animate__in-left{animation-name:in-left}.calcite-animate__in-scale{animation-name:in-scale}@keyframes in{0%{opacity:0}to{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0,-5px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0,5px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-right{0%{opacity:0;transform:translate3D(-5px,0,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-left{0%{opacity:0;transform:translate3D(5px,0,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(.95,.95,1)}to{opacity:1;transform:scaleZ(1)}}`,n={container:"container",actionBarContainer:"action-bar-container",contentContainer:"content-container",content:"content",contentHeader:"content__header",contentBody:"content__body",contentOverlay:"content--overlay",floatAll:"float-all",floatContent:"float--content",resizeHandle:"resize-handle",resizeHandleBar:"resize-handle-bar"},M={actionBar:"action-bar",header:"header"},N={dragVertical:"drag-resize-vertical",dragHorizontal:"drag-resize-horizontal"},T=I`:host{pointer-events:none;position:relative;display:flex;flex:0 1 auto;align-items:stretch;z-index:var(--calcite-shell-panel-z-index, var(--calcite-z-index));--calcite-shell-panel-max-height: unset;--calcite-internal-shell-panel-shadow-block-start: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-block-end: 0 -4px 8px -1px rgba(0, 0, 0, .08), 0 -2px 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-inline-start: 4px 0 8px -1px rgba(0, 0, 0, .08), 2px 0 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-inline-end: -4px 0 8px -1px rgba(0, 0, 0, .08), -2px 0 4px -1px rgba(0, 0, 0, .04)}.calcite--rtl.content--overlay{--calcite-internal-shell-panel-shadow-inline-start: -4px 0 8px -1px rgba(0, 0, 0, .08), -2px 0 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-inline-end: 4px 0 8px -1px rgba(0, 0, 0, .08), 2px 0 4px -1px rgba(0, 0, 0, .04)}:host([layout=vertical]){z-index:var(--calcite-shell-panel-z-index, calc(var(--calcite-z-index) + 1))}:host([layout=vertical][display-mode=overlay]){z-index:var(--calcite-shell-panel-z-index, calc(var(--calcite-z-index-header) + 1))}:host([layout=vertical][display-mode=float-all]) .content{flex:2}:host([layout=vertical]:not([display-mode=float-all])) .width-s{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 12vw);--calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 300px);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 150px)}:host([layout=vertical][display-mode=float-all]) .width-s{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 12vw);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 150px)}:host([layout=vertical]:not([display-mode=float-all])) .width-m{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 20vw);--calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 420px);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 240px)}:host([layout=vertical][display-mode=float-all]) .width-m{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 20vw);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 240px)}:host([layout=vertical]:not([display-mode=float-all])) .width-l{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 45vw);--calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 680px);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 340px)}:host([layout=vertical][display-mode=float-all]) .width-l{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 45vw);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 340px)}:host([layout=horizontal]) .content{--calcite-internal-shell-panel-height: var(--calcite-shell-panel-height);--calcite-internal-shell-panel-min-height: var(--calcite-shell-panel-min-height, 5vh);--calcite-internal-shell-panel-max-height: var(--calcite-shell-panel-max-height, 30vh)}:host([layout=horizontal]) .height-s{--calcite-internal-shell-panel-height: var(--calcite-shell-panel-height);--calcite-internal-shell-panel-min-height: var(--calcite-shell-panel-min-height, 5vh);--calcite-internal-shell-panel-max-height: var(--calcite-shell-panel-max-height, 20vh)}:host([layout=horizontal]) .height-l{--calcite-internal-shell-panel-height: var(--calcite-shell-panel-height);--calcite-internal-shell-panel-min-height: var(--calcite-shell-panel-min-height, 5vh);--calcite-internal-shell-panel-max-height: var(--calcite-shell-panel-max-height, 40vh)}:host([display-mode=float-all][height=s]),:host([display-mode=float-all][height-scale=s]) .content{min-block-size:var(--calcite-shell-panel-height, 20vh)}:host([display-mode=float-all][height=m]),:host([display-mode=float-all][height-scale=m]) .content{min-block-size:var(--calcite-shell-panel-height, 30vh)}:host([display-mode=float-all][height=l]),:host([display-mode=float-all][height-scale=l]) .content{min-block-size:var(--calcite-shell-panel-height, 40vh)}.container{pointer-events:none;box-sizing:border-box;display:flex;block-size:100%;flex:1 1 auto;align-items:stretch;background-color:transparent;font-size:var(--calcite-font-size-relative-base);color:var(--calcite-shell-panel-text-color, var(--calcite-color-text-2))}.container *{box-sizing:border-box}.container.float-all{margin-block:var(--calcite-spacing-sm);margin-inline:var(--calcite-spacing-sm)}.float-all{max-block-size:var(--calcite-internal-shell-panel-max-height, calc(100% - 1rem) );box-shadow:var(--calcite-shell-panel-shadow, var(--calcite-shadow-sm));border-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));overflow:hidden}:host([layout=vertical][position=start]) .float-all{border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-shell-panel-border-color, var(--calcite-color-border-3))}:host([layout=vertical][position=end]) .float-all{border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-shell-panel-border-color, var(--calcite-color-border-3)))}:host([layout=horizontal]) .float-all{border-inline:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-shell-panel-border-color, var(--calcite-color-border-3)))}:host([layout=horizontal]) .container{block-size:auto;inline-size:100%;flex-direction:column}.resize-handle{position:absolute;box-sizing:border-box;display:flex;-webkit-user-select:none;user-select:none;align-items:center;justify-content:center;outline:2px solid transparent;outline-offset:2px;--calcite-internal-shell-panel-resize-handle-offset: calc( (var(--calcite-size-fixed-xxl) - var(--calcite-size-fixed-sm-plus)) / 2 * -1 );z-index:var(--calcite-z-index-header)}.resize-handle:active .resize-handle-bar,.resize-handle:hover .resize-handle-bar{color:var(--calcite-shell-panel-resize-icon-color, var(--calcite-color-text-1));background-color:var(--calcite-shell-panel-resize-background-color, var(--calcite-color-foreground-3))}.resize-handle-bar{pointer-events:none;display:flex;align-items:center;justify-content:center;color:var(--calcite-shell-panel-resize-icon-color, var(--calcite-color-border-input));background-color:var(--calcite-shell-panel-resize-background-color, var(--calcite-color-background))}.resize-handle:focus .resize-handle-bar{outline-color:transparent;outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)))}:host([position=start][layout=vertical]) .resize-handle{inline-size:var(--calcite-size-fixed-xxl);inset-inline-end:var(--calcite-internal-shell-panel-resize-handle-offset);block-size:100%}:host([position=start][layout=vertical]) .resize-handle-bar{block-size:100%;inline-size:var(--calcite-size-fixed-sm-plus);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=start][layout=vertical]):host([display-mode^=float]) .resize-handle-bar{border-start-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-end-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}:host([position=end][layout=vertical]) .resize-handle{inline-size:var(--calcite-size-fixed-xxl);inset-inline-start:var(--calcite-internal-shell-panel-resize-handle-offset);block-size:100%}:host([position=end][layout=vertical]) .resize-handle-bar{block-size:100%;inline-size:var(--calcite-size-fixed-sm-plus);border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=end][layout=vertical]):host([display-mode^=float]) .resize-handle-bar{border-start-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-end-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}:host([position=start][layout=horizontal]) .resize-handle{block-size:var(--calcite-size-fixed-xxl);inline-size:100%;inset-block-end:var(--calcite-internal-shell-panel-resize-handle-offset)}:host([position=start][layout=horizontal]) .resize-handle-bar{inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);border-block-start:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=start][layout=horizontal]):host([display-mode^=float]) .resize-handle-bar{border-end-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-end-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}:host([position=end][layout=horizontal]) .resize-handle{block-size:var(--calcite-size-fixed-xxl);inline-size:100%;inset-block-start:var(--calcite-internal-shell-panel-resize-handle-offset)}:host([position=end][layout=horizontal]) .resize-handle-bar{inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);border-block-end:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=end][layout=horizontal]):host([display-mode^=float]) .resize-handle-bar{border-start-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-start-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}::slotted(calcite-panel),::slotted(calcite-flow){block-size:100%;inline-size:100%;flex:1 1 auto;max-block-size:unset;max-inline-size:unset}.action-bar-container{pointer-events:auto;box-sizing:border-box;display:flex;flex:1 1 auto}.content-container{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;align-items:stretch;align-self:stretch}:host([layout=horizontal]) .action-bar-container,:host([layout=horizontal]) .content-container{flex-direction:column}.content{pointer-events:auto;position:relative;box-sizing:border-box;display:flex;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;align-self:stretch;padding:0;background-color:var(--calcite-shell-panel-background-color, var(--calcite-color-background));transition:max-block-size var(--calcite-animation-timing),max-inline-size var(--calcite-animation-timing)}:host([layout=vertical]:not([display-mode=float-all])) .content{inline-size:var(--calcite-internal-shell-panel-width);max-inline-size:var(--calcite-internal-shell-panel-max-width);min-inline-size:var(--calcite-internal-shell-panel-min-width)}:host([layout=vertical][display-mode=float-all]) .content{inline-size:var(--calcite-internal-shell-panel-width);min-inline-size:var(--calcite-internal-shell-panel-min-width)}:host([layout=horizontal]) .content{block-size:var(--calcite-internal-shell-panel-height);max-block-size:var(--calcite-internal-shell-panel-max-height);min-block-size:var(--calcite-internal-shell-panel-min-height)}:host([resizable][layout=vertical][position=start]) .content{padding-inline-end:var(--calcite-size-fixed-sm-plus)}:host([resizable][layout=vertical][position=end]) .content{padding-inline-start:var(--calcite-size-fixed-sm-plus)}:host([resizable][layout=horizontal][position=start]) .content{padding-block-end:var(--calcite-size-fixed-sm-plus)}:host([resizable][layout=horizontal][position=end]) .content{padding-block-start:var(--calcite-size-fixed-sm-plus)}.content__header{display:flex;flex:0 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch}.content__body{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.content--overlay{position:absolute;--tw-shadow: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--tw-shadow-colored: 0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--calcite-shell-panel-shadow, var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow))}:host([layout=vertical]) .content--overlay{inset-block-start:0px;block-size:100%}:host([layout=horizontal]) .content--overlay{inset-inline-start:0px;inline-size:100%}:host([layout=vertical][position=start]) .content--overlay{inset-inline-start:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-inline-start)}:host([layout=vertical][position=end]) .content--overlay{inset-inline-end:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-inline-end)}:host([layout=horizontal][position=start]) .content--overlay{inset-block-start:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-block-start)}:host([layout=horizontal][position=end]) .content--overlay{inset-block-end:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-block-end)}.float--content{margin-block-end:auto;block-size:auto;overflow:hidden;--tw-shadow: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--tw-shadow-colored: 0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--calcite-shell-panel-shadow, var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow));border-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));margin-inline:var(--calcite-spacing-sm);margin-block-start:var(--calcite-spacing-sm);max-block-size:var(--calcite-internal-shell-panel-max-height, calc(100% - 1rem) )}.float--content ::slotted(calcite-panel),.float--content ::slotted(calcite-flow){max-block-size:unset}:host([layout=horizontal]) .float--content{margin-block:var(--calcite-spacing-sm)}:host([position=start]) .float--content ::slotted(calcite-panel),:host([position=start]) .float--content ::slotted(calcite-flow),:host([position=end]) .float--content ::slotted(calcite-panel),:host([position=end]) .float--content ::slotted(calcite-flow){border-style:none}slot[name=action-bar]::slotted(calcite-action-bar),.content ::slotted(calcite-flow),.content ::slotted(calcite-panel:not([closed])){border:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=start]:not([slot=panel-end])) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=start]:not([slot=panel-end])) .content ::slotted(calcite-flow),:host([position=start]:not([slot=panel-end])) .content ::slotted(calcite-panel),:host([position=end][slot=panel-start]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=end][slot=panel-start]) .content ::slotted(calcite-flow),:host([position=end][slot=panel-start]) .content ::slotted(calcite-panel){border-inline-start:none}:host([resizable][layout=vertical]) .content ::slotted(calcite-flow),:host([resizable][layout=vertical]) .content ::slotted(calcite-panel){border-inline-start:none;border-inline-end:none}:host([resizable][layout=horizontal]) .content ::slotted(calcite-flow),:host([resizable][layout=horizontal]) .content ::slotted(calcite-panel){border-block-start:none;border-block-end:none}:host([position=end]:not([slot=panel-start])) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=end]:not([slot=panel-start])) .content ::slotted(calcite-flow),:host([position=end]:not([slot=panel-start])) .content ::slotted(calcite-panel),:host([position=start][slot=panel-end]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=start][slot=panel-end]) .content ::slotted(calcite-flow),:host([position=start][slot=panel-end]) .content ::slotted(calcite-panel){border-inline-end:none}:host([layout=horizontal]) slot[name=action-bar]::slotted(calcite-action-bar){border-inline:0}:host([layout=horizontal][position=start]) .content ::slotted(calcite-flow),:host([layout=horizontal][position=start]) .content ::slotted(calcite-panel){border-inline:0;border-block-start:0}:host([layout=horizontal][position=end]) .content ::slotted(calcite-flow),:host([layout=horizontal][position=end]) .content ::slotted(calcite-panel){border-inline:0;border-block-end:0}:host([display-mode=dock]) .resize-handle-bar,:host([display-mode=float-all]) .resize-handle-bar,:host([display-mode=overlay]) .resize-handle-bar{border-block-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);border-block-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}:host([hidden]){display:none}[hidden]{display:none}`,R=class extends A{constructor(){super(...arguments),this.direction=V(),this.actionBars=[],this.contentRef=H(),this.messages=P(),this.sizeOverride=U({targetElement:this.contentRef,getBounds:()=>({inline:{min:this.resizeValues.minInlineSize,max:this.resizeValues.maxInlineSize},block:{min:this.resizeValues.minBlockSize,max:this.resizeValues.maxBlockSize}}),onResize:e=>{this.resizeValues=e}}),this.resizeValues={inlineSize:null,blockSize:null,minInlineSize:null,minBlockSize:null,maxInlineSize:null,maxBlockSize:null},this.hasHeader=!1,this.collapsed=!1,this.displayMode="dock",this.layout="vertical",this.position="start",this.resizable=!1,this.widthScale="m",this.calciteInternalShellPanelResizeEnd=y({cancelable:!1}),this.calciteInternalShellPanelResizeStart=y({cancelable:!1}),this.calciteShellPanelCollapse=y({cancelable:!1}),this.calciteShellPanelExpand=y({cancelable:!1})}static{this.properties={resizeValues:[16,{},{state:!0}],hasHeader:[16,{},{state:!0}],collapsed:[7,{},{reflect:!0,type:Boolean}],displayMode:[3,{},{reflect:!0}],heightScale:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],position:[3,{},{reflect:!0}],resizable:[7,{},{reflect:!0,type:Boolean}],height:[3,{},{reflect:!0}],widthScale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=[T,K]}async updateSize(e){this.updateSizeInternal(e)}willUpdate(e){e.has("layout")&&(this.hasUpdated||this.layout!=="vertical")&&(this.setActionBarsLayout(this.actionBars),this.setupInteractions()),(e.has("direction")&&this.hasUpdated||e.has("position")&&(this.hasUpdated||this.position!=="start"))&&this.setupInteractions(),e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calciteShellPanelCollapse.emit():this.calciteShellPanelExpand.emit())}disconnectedCallback(){super.disconnectedCallback(),this.cleanupInteractions()}getContentElDOMRect(){return this.contentRef.value.getBoundingClientRect()}updateSizeInternal(e){this.contentRef.value&&this.sizeOverride.resize(e)}handleKeyDown(e){let{key:a,defaultPrevented:h,shiftKey:r}=e,{position:l,layout:t,resizable:i,contentRef:c,resizeValues:{maxBlockSize:b,maxInlineSize:z,minBlockSize:f,minInlineSize:k}}=this,d=[...t==="horizontal"?["ArrowUp","ArrowDown"]:["ArrowLeft","ArrowRight"],"Home","End"];if(!i||!c.value||h||!d.includes(a))return;let p=this.getContentElDOMRect(),w=this.direction==="rtl"?-1:1,o=r?_:D;switch(a){case"ArrowUp":this.updateSizeInternal({block:p.height+(t==="horizontal"&&l==="end"?o:-o)}),e.preventDefault();break;case"ArrowDown":this.updateSizeInternal({block:p.height+(t==="horizontal"&&l==="end"?-o:o)}),e.preventDefault();break;case"ArrowLeft":this.updateSizeInternal({inline:p.width+(t==="vertical"&&l==="end"?o:-o)*w}),e.preventDefault();break;case"ArrowRight":this.updateSizeInternal({inline:p.width+(t==="vertical"&&l==="end"?-o:o)*w}),e.preventDefault();break;case"Home":this.updateSizeInternal(t==="horizontal"?{block:f}:{inline:k}),e.preventDefault();break;case"End":this.updateSizeInternal(t==="horizontal"?{block:b}:{inline:z}),e.preventDefault();break}}cleanupInteractions(){this.interaction?.unset()}async setupInteractions(){this.cleanupInteractions();let{el:e,contentRef:a,resizable:h,position:r,collapsed:l,resizeHandleEl:t,layout:i}=this;if(!a.value||l||!h||!t)return;await this.el.componentOnReady();let{inlineSize:c,minInlineSize:b,blockSize:z,minBlockSize:f,maxInlineSize:k,maxBlockSize:x}=window.getComputedStyle(a.value),d={inlineSize:u(c),blockSize:u(z),minInlineSize:u(b),minBlockSize:u(f),maxInlineSize:u(k)||window.innerWidth,maxBlockSize:u(x)||window.innerHeight};this.resizeValues=d;let p=this.direction==="rtl";this.interaction=$(a.value,{context:e.ownerDocument}).resizable({edges:{top:r==="end"&&i==="horizontal"?t:!1,right:r===(p?"end":"start")&&i==="vertical"?t:!1,bottom:r==="start"&&i==="horizontal"?t:!1,left:r===(p?"start":"end")&&i==="vertical"?t:!1},modifiers:[$.modifiers.restrictSize({min:{width:d.minInlineSize,height:d.minBlockSize},max:{width:d.maxInlineSize,height:d.maxBlockSize}})],listeners:{resizestart:()=>{this.calciteInternalShellPanelResizeStart.emit()},resizeend:()=>{this.calciteInternalShellPanelResizeEnd.emit()},move:({rect:w})=>{let o=i==="horizontal";this.updateSize(o?{block:w.height}:{inline:w.width})}}})}setResizeHandleEl(e){this.resizeHandleEl=e,this.setupInteractions()}setActionBarsLayout(e){e.forEach(a=>a.layout=this.layout)}handleActionBarSlotChange(e){let a=L(e).filter(h=>h?.matches("calcite-action-bar"));this.actionBars=a,this.setActionBarsLayout(a)}handleHeaderSlotChange(e){this.hasHeader=O(e)}getResizeIcon(){let{layout:e}=this;return e==="horizontal"?N.dragVertical:N.dragHorizontal}renderHeader(){return g("header",m`<div class=${s(n.contentHeader)} .hidden=${!this.hasHeader}><slot name=${M.header} @slotchange=${this.handleHeaderSlotChange}></slot></div>`)}render(){let{collapsed:e,position:a,resizable:h,layout:r,displayMode:l,resizeValues:t}=this,i=this.direction,c=r==="horizontal",b=!e&&h?g("resize-handle",m`<div .ariaLabel=${this.messages.resize} .ariaOrientation=${c?"vertical":"horizontal"} .ariaValueMax=${S(c?"block":"inline",t.maxBlockSize,t.maxInlineSize)} .ariaValueMin=${S(c?"block":"inline",t.minBlockSize,t.minInlineSize)} .ariaValueNow=${S(c?"block":"inline",t.blockSize,t.inlineSize)} class=${s(n.resizeHandle)} @keydown=${this.handleKeyDown} role=separator tabindex=0 touch-action=none ${B(this.setResizeHandleEl)}><div class=${s(n.resizeHandleBar)}><calcite-icon .icon=${this.getResizeIcon()} scale=s></calcite-icon></div></div>`):null,z=()=>r==="horizontal"?a==="start"?v.calciteAnimateInDown:v.calciteAnimateInUp:i==="ltr"&&a==="end"||i==="rtl"&&a==="start"?v.calciteAnimateInLeft:v.calciteAnimateInRight,f=m`<div class=${s(n.contentContainer)}>${g("content",m`<div class=${s({[v.rtl]:i==="rtl",[n.content]:!0,[n.contentOverlay]:l==="overlay",[n.floatContent]:l==="float-content"||l==="float",[v.calciteAnimate]:l==="overlay",[z()]:l==="overlay",[C("width",this.width,this.widthScale)]:!!(this.width||this.widthScale),[C("height",this.height,this.heightScale)]:!!(this.height||this.heightScale)})} .hidden=${e} ${B(this.contentRef)}>${this.renderHeader()}<div class=${s(n.contentBody)}><slot></slot></div>${b}</div>`)}</div>`,x=[g("action-bar-container",m`<div class=${s(n.actionBarContainer)}><slot name=${M.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`),f];return a==="end"&&x.reverse(),m`<div class=${s({[n.container]:!0,[n.floatAll]:l==="float-all"})}>${x}</div>`}};E("calcite-shell-panel",R);export{R as ShellPanel};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as D}from"./3PDJRR3M.js";import{a as P}from"./6QVWUACM.js";import{b as I}from"./CBU57T2K.js";import{a as z}from"./JANAPR3Q.js";import{a as O}from"./IRYIL3MF.js";import"./FKOPLDSR.js";import{a as w}from"./TG2V3PD6.js";import{a as h}from"./FW4KB235.js";import"./AP2LDRUV.js";import{a as m}from"./FUKPQ7PM.js";import{a as B}from"./ANC4DUDW.js";import{a as E}from"./X7BSBNJI.js";import{a as p}from"./RH6ZIP65.js";import"./QFYAIO5N.js";import"./OPUF2ESH.js";import{t as r,u as H}from"./M5EVL4VV.js";import"./OAOQ5BXS.js";import{F as S,G as C,H as a,S as y,g as x,h as n,l as f,p as c}from"./4E3ZDBJS.js";var s={content:"content",toggle:"toggle",header:"header"},t={actionsEnd:"actions-end",container:"container",content:"content",contentEnd:"content-end",contentStart:"content-start",description:"description",header:"header",headerContainer:"header-container",headerHasContent:"header--has-content",headerDraggable:"header--draggable",heading:"heading",icon:"icon",iconStart:"icon--start",iconEnd:"icon--end",iconEndContainer:"icon-end-container",invalid:"invalid",statusIcon:"status-icon",title:"title",toggle:"toggle",toggleIcon:"toggle-icon",valid:"valid"},g={actionsEnd:"actions-end",contentEnd:"content-end",contentStart:"content-start",headerMenuActions:"header-menu-actions"},u={expanded:"chevron-up",collapsed:"chevron-down",valid:"check-circle",invalid:"exclamation-mark-triangle"},X=x`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host([scale=s]) .header{gap:var(--calcite-spacing-sm)}:host([scale=s]) .icon-end-container{gap:var(--calcite-spacing-sm);padding-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .heading{font-size:var(--calcite-font-size-sm)}:host([scale=s]) .description{font-size:var(--calcite-font-size-xs)}:host([scale=s]){--calcite-internal-block-actions-spacing: var(--calcite-spacing-xxs);--calcite-internal-block-header-content-padding: var(--calcite-spacing-sm);--calcite-internal-block-padding-block: var( --calcite-block-content-space, var(--calcite-block-padding, var(--calcite-spacing-xxs)) );--calcite-internal-block-padding-inline: var( --calcite-block-content-space, var(--calcite-block-padding, var(--calcite-spacing-sm)) )}:host([scale=m]) .header{gap:var(--calcite-spacing-md)}:host([scale=m]) .icon-end-container{gap:var(--calcite-spacing-md);padding-inline-end:var(--calcite-spacing-md)}:host([scale=m]) .heading{font-size:var(--calcite-font-size)}:host([scale=m]) .description{font-size:var(--calcite-font-size-sm)}:host([scale=m]){--calcite-internal-block-actions-spacing: var(--calcite-spacing-xxs);--calcite-internal-block-header-content-padding: var(--calcite-spacing-md);--calcite-internal-block-padding-block: var( --calcite-block-content-space, var(--calcite-block-padding, var(--calcite-spacing-sm)) );--calcite-internal-block-padding-inline: var( --calcite-block-content-space, var(--calcite-block-padding, var(--calcite-spacing-md)) )}:host([scale=l]) .header{gap:var(--calcite-spacing-lg)}:host([scale=l]) .icon-end-container{gap:var(--calcite-spacing-lg);padding-inline-end:var(--calcite-spacing-lg)}:host([scale=l]) .heading{font-size:var(--calcite-font-size-md)}:host([scale=l]) .description{font-size:var(--calcite-font-size)}:host([scale=l]){--calcite-internal-block-actions-spacing: var(--calcite-spacing-xs);--calcite-internal-block-header-content-padding: var(--calcite-spacing-lg);--calcite-internal-block-padding-block: var( --calcite-block-content-space, var(--calcite-block-padding, var(--calcite-spacing-md)) );--calcite-internal-block-padding-inline: var( --calcite-block-content-space, var(--calcite-block-padding, var(--calcite-spacing-lg)) )}:host{display:flex;flex-shrink:0;flex-grow:0;flex-direction:column;border-width:0px;border-block-end-width:1px;border-style:solid;padding:0;transition-property:margin;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.215,.44,.42,.88);flex-basis:auto;border-color:var(--calcite-block-border-color, var(--calcite-color-border-3))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.header{justify-content:flex-start}.header--has-content{padding:var(--calcite-internal-block-header-content-padding)}.header--draggable{padding-inline-start:var(--calcite-spacing-xxs)}.header,.toggle{grid-area:header}.header-container{display:grid;align-items:stretch;grid-template:auto/auto 1fr auto auto auto auto;grid-template-areas:"handle header icon-end menu actions-end"}.icon--start,.icon--end{color:var(--calcite-block-icon-color, var(--calcite-color-text-3))}.actions-end{align-items:center;display:flex;gap:var(--calcite-internal-block-actions-spacing);grid-area:actions-end;padding-block:var(--calcite-internal-block-actions-spacing);padding-inline-end:var(--calcite-internal-block-actions-spacing)}.toggle{margin:0;display:flex;cursor:pointer;flex-wrap:nowrap;align-items:center;justify-content:space-between;border-style:none;padding:0;outline-color:transparent;font-family:inherit;text-align:initial;background-color:var(--calcite-block-header-background-color, transparent)}.toggle:hover{background-color:var(--calcite-block-header-background-color-hover, var(--calcite-color-foreground-2))}.toggle:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.toggle:active{background-color:var(--calcite-block-header-background-color-press, var(--calcite-color-foreground-3))}calcite-loader[inline]{align-self:center}calcite-sort-handle{align-self:center;grid-area:handle;margin-block:var(--calcite-internal-block-actions-spacing);padding-inline-start:var(--calcite-spacing-xxs)}.title{display:flex;flex-direction:column}.header .title .heading{padding:0;word-wrap:break-word;word-break:break-word;color:var(--calcite-block-heading-text-color, var(--calcite-color-text-1));font-weight:var(--calcite-font-weight-normal);line-height:var(--calcite-font-line-height-relative-snug)}.description{padding:0;word-wrap:break-word;word-break:break-word;color:var(--calcite-block-description-text-color, var(--calcite-color-text-3));font-weight:var(--calcite-font-weight-regular);line-height:var(--calcite-font-line-height-relative-snug)}.icon{display:flex}.status-icon.valid{color:var(--calcite-color-status-success)}.status-icon.invalid{color:var(--calcite-color-status-danger)}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg)}to{transform:rotate(360deg)}}.icon-end-container{display:flex;align-items:center;grid-area:icon-end}.toggle-icon{align-self:center;justify-self:end;transition-property:color;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1);color:var(--calcite-block-icon-color, var(--calcite-color-text-3))}.toggle:hover .toggle-icon{color:var(--calcite-block-icon-color-hover, var(--calcite-color-text-1))}.container{position:relative;display:flex;block-size:100%;flex-direction:column}.content{position:relative;min-block-size:0px;flex:1 1 0%;opacity:0;padding-block:var(--calcite-internal-block-padding-block);padding-inline:var(--calcite-internal-block-padding-inline);transition:opacity var(--calcite-internal-animation-timing-slow) ease-in-out}.content-end,.content-start{display:flex;align-items:center;color:var(--calcite-block-text-color, var(--calcite-color-text-3))}calcite-action-menu{align-self:center;grid-area:menu;margin-inline-end:var(--calcite-internal-block-actions-spacing)}:host([expanded]){margin-block:.5rem}:host([expanded]) .header .title .heading{color:var(--calcite-block-heading-text-color, var(--calcite-block-heading-text-color-press, var(--calcite-color-text-1)));font-weight:var(--calcite-font-weight-medium)}:host([expanded]) .description{color:var(--calcite-block-description-text-color, var(--calcite-color-text-2))}:host([expanded]) .icon--start,:host([expanded]) .icon--end{color:var(--calcite-block-icon-color, var(--calcite-color-text-1))}:host([expanded]) .content{opacity:1}@starting-style{:host([expanded]){margin-block-start:0;opacity:0}}:host([expanded][scale=s]){margin-block:var(--calcite-spacing-xxs)}:host([expanded][scale=l]){margin-block:var(--calcite-spacing-md)}:host([hidden]){display:none}[hidden]{display:none}`,v=class extends C{constructor(){super(...arguments),this.transitionProp="margin-top",this.blockSectionChildren=[],this.messages=B(),this.focusSetter=E()(this),this.interactiveContainer=w(this),this.hasContentEnd=!1,this.hasContentStart=!1,this.hasEndActions=!1,this.hasMenuActions=!1,this.collapsible=!1,this.disabled=!1,this.dragDisabled=!1,this.dragHandle=!1,this.expanded=!1,this.loading=!1,this.menuPlacement=I,this.addToItems=[],this.moveToItems=[],this.sortDisabled=!1,this.overlayPositioning="absolute",this.scale="m",this.setPosition=null,this.setSize=null,this.sortHandleOpen=!1,this.topLayerDisabled=!1,this.calciteBlockBeforeClose=c({cancelable:!1}),this.calciteBlockBeforeOpen=c({cancelable:!1}),this.calciteBlockClose=c({cancelable:!1}),this.calciteBlockCollapse=c({cancelable:!1}),this.calciteBlockExpand=c({cancelable:!1}),this.calciteBlockOpen=c({cancelable:!1}),this.calciteBlockSortHandleBeforeClose=c({cancelable:!1}),this.calciteBlockSortHandleBeforeOpen=c({cancelable:!1}),this.calciteBlockSortHandleClose=c({cancelable:!1}),this.calciteBlockSortHandleOpen=c({cancelable:!1}),this.calciteBlockToggle=c({cancelable:!1}),this.calciteInternalBlockUpdateSortMenuItems=c({cancelable:!1})}static{this.properties={hasContentEnd:[16,{},{state:!0}],hasContentStart:[16,{},{state:!0}],hasEndActions:[16,{},{state:!0}],hasMenuActions:[16,{},{state:!0}],collapsible:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],dragDisabled:[7,{},{reflect:!0,type:Boolean}],dragHandle:[7,{},{reflect:!0,type:Boolean}],expanded:[7,{},{reflect:!0,type:Boolean}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{type:String},{reflect:!0}],loading:[7,{},{reflect:!0,type:Boolean}],label:1,menuFlipPlacements:[0,{},{attribute:!1}],menuPlacement:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],addToItems:[0,{},{attribute:!1}],moveToItems:[0,{},{attribute:!1}],sortDisabled:[5,{},{type:Boolean}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],setPosition:[9,{},{type:Number}],setSize:[9,{},{type:Number}],sortHandleOpen:[7,{},{reflect:!0,type:Boolean}],status:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=[D,X,P]}get open(){return this.expanded}set open(e){m.deprecated("property",{component:this,name:"open",removalVersion:5,suggested:"expanded"}),this.expanded=e}async setFocus(e){return this.focusSetter(()=>this.el,e)}connectedCallback(){super.connectedCallback(),this.transitionEl=this.el}load(){!this.heading&&!this.label&&m.warn(`${this.el.tagName} is missing both heading & label. Please provide a heading or label for the component to be accessible.`)}willUpdate(e){e.has("expanded")&&(this.hasUpdated||this.expanded!==!1)&&z(this),e.has("sortHandleOpen")&&(this.hasUpdated||this.sortHandleOpen!==!1)&&this.sortHandleOpenHandler(),e.has("expanded")&&this.hasUpdated&&(this.expanded?this.calciteBlockExpand.emit():this.calciteBlockCollapse.emit()),e.has("scale")&&this.hasUpdated&&this.updateBlockSectionScale()}onBeforeOpen(){this.calciteBlockBeforeOpen.emit()}onOpen(){this.calciteBlockOpen.emit()}onBeforeClose(){this.calciteBlockBeforeClose.emit()}onClose(){this.calciteBlockClose.emit()}sortHandleOpenHandler(){this.sortHandleEl&&(this.sortHandleEl.open=this.sortHandleOpen)}setSortHandleEl(e){this.sortHandleEl=e,this.sortHandleOpenHandler()}handleSortHandleBeforeOpen(e){e.stopPropagation(),this.calciteBlockSortHandleBeforeOpen.emit()}handleSortHandleBeforeClose(e){e.stopPropagation(),this.calciteBlockSortHandleBeforeClose.emit()}handleSortHandleClose(e){e.stopPropagation(),this.sortHandleOpen=!1,this.calciteBlockSortHandleClose.emit()}handleSortHandleOpen(e){e.stopPropagation(),this.sortHandleOpen=!0,this.calciteBlockSortHandleOpen.emit()}onHeaderClick(){this.expanded=!this.expanded,this.calciteBlockToggle.emit()}menuActionsSlotChangeHandler(e){this.hasMenuActions=r(e)}actionsEndSlotChangeHandler(e){this.hasEndActions=r(e)}handleContentEndSlotChange(e){this.hasContentEnd=r(e)}handleContentStartSlotChange(e){this.hasContentStart=r(e)}handleDefaultSlotChange(e){this.blockSectionChildren=H(e,"calcite-block-section"),this.updateBlockSectionScale()}updateBlockSectionScale(){this.blockSectionChildren.forEach(e=>{e.scale=this.scale})}renderScrim(){let{loading:e}=this,l=n`<slot @slotchange=${this.handleDefaultSlotChange}></slot>`;return[e?n`<calcite-scrim .loading=${e}></calcite-scrim>`:null,l]}renderLoaderStatusIcon(){let{loading:e,messages:l,status:i}=this;return e?h("loader",n`<div class=${a(t.icon)}><calcite-loader inline .label=${l.loading} .scale=${this.scale}></calcite-loader></div>`):i?h("status-icon",n`<div class=${a(t.icon)}><calcite-icon class=${a({[t.statusIcon]:!0,[t.valid]:i=="valid",[t.invalid]:i=="invalid"})} .icon=${u[i]} .scale=${p(this.scale)}></calcite-icon></div>`):null}renderActionsEnd(){return n`<div class=${a(t.actionsEnd)} .hidden=${!this.hasEndActions}><slot name=${g.actionsEnd} @slotchange=${this.actionsEndSlotChangeHandler}></slot></div>`}renderContentEnd(){return n`<div class=${a({[t.iconEndContainer]:!this.iconEnd&&!this.collapsible})} .hidden=${!this.hasContentEnd}><div class=${a(t.contentEnd)}><slot name=${g.contentEnd} @slotchange=${this.handleContentEndSlotChange}></slot></div></div>`}renderContentStart(){return n`<div class=${a(t.contentStart)} .hidden=${!this.hasContentStart}><slot name=${g.contentStart} @slotchange=${this.handleContentStartSlotChange}></slot></div>`}renderTitle(){let{heading:e,headingLevel:l,description:i}=this;return e||i?n`<div class=${a(t.title)}>${O({class:t.heading,level:l,children:e})}${i?n`<div class=${a(t.description)}>${i}</div>`:null}</div>`:null}renderIcon(e){let{iconFlipRtl:l}=this,i=l==="both"||e==="start"?l==="start":l==="end",o=e==="start"?this.iconStart:this.iconEnd,d=e==="start"?t.iconStart:t.iconEnd;if(o)return h(o,n`<calcite-icon class=${a(d)} .flipRtl=${i} .icon=${o} .scale=${p(this.scale)}></calcite-icon>`)}render(){let{collapsible:e,loading:l,expanded:i,label:o,heading:d,messages:b,description:A,menuFlipPlacements:T,menuPlacement:L,moveToItems:M,addToItems:F,setPosition:N,setSize:U,dragDisabled:R,sortDisabled:j,iconEnd:k,hasContentEnd:V,hasContentStart:G,iconStart:q}=this,J=i?b.collapse:b.expand,K=!!(d||A||V||G||q||l||status),$=n`<header class=${a({[t.header]:!0,[t.headerHasContent]:K,[t.headerDraggable]:this.dragHandle})} id=${s.header}>${this.renderIcon("start")}${this.renderContentStart()}${this.renderLoaderStatusIcon()}${this.renderTitle()}</header>`,Q=i?u.expanded:u.collapsed,W=n`<div class=${a(t.headerContainer)}>${this.dragHandle?n`<calcite-sort-handle .addToItems=${F} .disabled=${R} .label=${d||o} .moveToItems=${M} @calciteSortHandleBeforeClose=${this.handleSortHandleBeforeClose} @calciteSortHandleBeforeOpen=${this.handleSortHandleBeforeOpen} @calciteSortHandleClose=${this.handleSortHandleClose} @calciteSortHandleOpen=${this.handleSortHandleOpen} overlay-positioning=fixed .scale=${this.scale} .setPosition=${N} .setSize=${U} .sortDisabled=${j} .topLayerDisabled=${this.topLayerDisabled} ${S(this.setSortHandleEl)}></calcite-sort-handle>`:null}${e?n`<button aria-controls=${s.content} aria-describedby=${s.header} .ariaExpanded=${e?i:null} class=${a(t.toggle)} id=${s.toggle} @click=${this.onHeaderClick} title=${J??f}>${$}<div class=${a(t.iconEndContainer)}>${this.renderContentEnd()}${this.renderIcon("end")}<calcite-icon class=${a(t.toggleIcon)} .icon=${Q} .scale=${p(this.scale)}></calcite-icon></div></button>`:$}${k&&!e?n`<div class=${a(t.iconEndContainer)}>${this.renderContentEnd()}${this.renderIcon("end")}</div>`:!k&&!e?this.renderContentEnd():null}<calcite-action-menu .flipPlacements=${T??["top","bottom"]} .hidden=${!this.hasMenuActions} .label=${b.options} .overlayPositioning=${this.overlayPositioning} .placement=${L} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled}><slot name=${g.headerMenuActions} @slotchange=${this.menuActionsSlotChangeHandler}></slot></calcite-action-menu>${this.renderActionsEnd()}</div>`;return this.interactiveContainer({disabled:this.disabled,children:n`<article aria-label=${o??f} .ariaBusy=${l} class=${a({[t.container]:!0})}>${W}<section aria-labelledby=${s.toggle} class=${a(t.content)} .hidden=${!i} id=${s.content}>${this.renderScrim()}</section></article>`})}};y("calcite-block",v);export{v as Block};
2
+ import{a as D}from"./QFQTYQCH.js";import{a as P}from"./BUWOMRIE.js";import{b as I}from"./PSPER4WF.js";import{a as z}from"./TG6IATT4.js";import{a as O}from"./XEG6ES6J.js";import"./Q64GOVA4.js";import{a as w}from"./LSPPTTY7.js";import{a as h}from"./RBW3KVLR.js";import"./AP2LDRUV.js";import{a as m}from"./Z42ZXHGG.js";import{a as B}from"./T5XR4YFF.js";import{a as E}from"./4OQTPZUU.js";import{a as p}from"./RH6ZIP65.js";import"./2UT6QW2P.js";import"./XAGMG6IZ.js";import{t as r,u as H}from"./YZUVO4BX.js";import"./OAOQ5BXS.js";import{F as S,G as C,H as a,S as y,g as x,h as n,l as f,p as c}from"./ZY2K66YV.js";var s={content:"content",toggle:"toggle",header:"header"},t={actionsEnd:"actions-end",container:"container",content:"content",contentEnd:"content-end",contentStart:"content-start",description:"description",header:"header",headerContainer:"header-container",headerHasContent:"header--has-content",headerDraggable:"header--draggable",heading:"heading",icon:"icon",iconStart:"icon--start",iconEnd:"icon--end",iconEndContainer:"icon-end-container",invalid:"invalid",statusIcon:"status-icon",title:"title",toggle:"toggle",toggleIcon:"toggle-icon",valid:"valid"},g={actionsEnd:"actions-end",contentEnd:"content-end",contentStart:"content-start",headerMenuActions:"header-menu-actions"},u={expanded:"chevron-up",collapsed:"chevron-down",valid:"check-circle",invalid:"exclamation-mark-triangle"},X=x`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host([scale=s]) .header{gap:var(--calcite-spacing-sm)}:host([scale=s]) .icon-end-container{gap:var(--calcite-spacing-sm);padding-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .heading{font-size:var(--calcite-font-size-sm)}:host([scale=s]) .description{font-size:var(--calcite-font-size-xs)}:host([scale=s]){--calcite-internal-block-actions-spacing: var(--calcite-spacing-xxs);--calcite-internal-block-header-content-padding: var(--calcite-spacing-sm);--calcite-internal-block-padding-block: var( --calcite-block-content-space, var(--calcite-block-padding, var(--calcite-spacing-xxs)) );--calcite-internal-block-padding-inline: var( --calcite-block-content-space, var(--calcite-block-padding, var(--calcite-spacing-sm)) )}:host([scale=m]) .header{gap:var(--calcite-spacing-md)}:host([scale=m]) .icon-end-container{gap:var(--calcite-spacing-md);padding-inline-end:var(--calcite-spacing-md)}:host([scale=m]) .heading{font-size:var(--calcite-font-size)}:host([scale=m]) .description{font-size:var(--calcite-font-size-sm)}:host([scale=m]){--calcite-internal-block-actions-spacing: var(--calcite-spacing-xxs);--calcite-internal-block-header-content-padding: var(--calcite-spacing-md);--calcite-internal-block-padding-block: var( --calcite-block-content-space, var(--calcite-block-padding, var(--calcite-spacing-sm)) );--calcite-internal-block-padding-inline: var( --calcite-block-content-space, var(--calcite-block-padding, var(--calcite-spacing-md)) )}:host([scale=l]) .header{gap:var(--calcite-spacing-lg)}:host([scale=l]) .icon-end-container{gap:var(--calcite-spacing-lg);padding-inline-end:var(--calcite-spacing-lg)}:host([scale=l]) .heading{font-size:var(--calcite-font-size-md)}:host([scale=l]) .description{font-size:var(--calcite-font-size)}:host([scale=l]){--calcite-internal-block-actions-spacing: var(--calcite-spacing-xs);--calcite-internal-block-header-content-padding: var(--calcite-spacing-lg);--calcite-internal-block-padding-block: var( --calcite-block-content-space, var(--calcite-block-padding, var(--calcite-spacing-md)) );--calcite-internal-block-padding-inline: var( --calcite-block-content-space, var(--calcite-block-padding, var(--calcite-spacing-lg)) )}:host{display:flex;flex-shrink:0;flex-grow:0;flex-direction:column;border-width:0px;border-block-end-width:1px;border-style:solid;padding:0;transition-property:margin;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.215,.44,.42,.88);flex-basis:auto;border-color:var(--calcite-block-border-color, var(--calcite-color-border-3))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.header{justify-content:flex-start}.header--has-content{padding:var(--calcite-internal-block-header-content-padding)}.header--draggable{padding-inline-start:var(--calcite-spacing-xxs)}.header,.toggle{grid-area:header}.header-container{display:grid;align-items:stretch;grid-template:auto/auto 1fr auto auto auto auto;grid-template-areas:"handle header icon-end menu actions-end"}.icon--start,.icon--end{color:var(--calcite-block-icon-color, var(--calcite-color-text-3))}.actions-end{align-items:center;display:flex;gap:var(--calcite-internal-block-actions-spacing);grid-area:actions-end;padding-block:var(--calcite-internal-block-actions-spacing);padding-inline-end:var(--calcite-internal-block-actions-spacing)}.toggle{margin:0;display:flex;cursor:pointer;flex-wrap:nowrap;align-items:center;justify-content:space-between;border-style:none;padding:0;outline-color:transparent;font-family:inherit;text-align:initial;background-color:var(--calcite-block-header-background-color, transparent)}.toggle:hover{background-color:var(--calcite-block-header-background-color-hover, var(--calcite-color-foreground-2))}.toggle:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.toggle:active{background-color:var(--calcite-block-header-background-color-press, var(--calcite-color-foreground-3))}calcite-loader[inline]{align-self:center}calcite-sort-handle{align-self:center;grid-area:handle;margin-block:var(--calcite-internal-block-actions-spacing);padding-inline-start:var(--calcite-spacing-xxs)}.title{display:flex;flex-direction:column}.header .title .heading{padding:0;word-wrap:break-word;word-break:break-word;color:var(--calcite-block-heading-text-color, var(--calcite-color-text-1));font-weight:var(--calcite-font-weight-normal);line-height:var(--calcite-font-line-height-relative-snug)}.description{padding:0;word-wrap:break-word;word-break:break-word;color:var(--calcite-block-description-text-color, var(--calcite-color-text-3));font-weight:var(--calcite-font-weight-regular);line-height:var(--calcite-font-line-height-relative-snug)}.icon{display:flex}.status-icon.valid{color:var(--calcite-color-status-success)}.status-icon.invalid{color:var(--calcite-color-status-danger)}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg)}to{transform:rotate(360deg)}}.icon-end-container{display:flex;align-items:center;grid-area:icon-end}.toggle-icon{align-self:center;justify-self:end;transition-property:color;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1);color:var(--calcite-block-icon-color, var(--calcite-color-text-3))}.toggle:hover .toggle-icon{color:var(--calcite-block-icon-color-hover, var(--calcite-color-text-1))}.container{position:relative;display:flex;block-size:100%;flex-direction:column}.content{position:relative;min-block-size:0px;flex:1 1 0%;opacity:0;padding-block:var(--calcite-internal-block-padding-block);padding-inline:var(--calcite-internal-block-padding-inline);transition:opacity var(--calcite-internal-animation-timing-slow) ease-in-out}.content-end,.content-start{display:flex;align-items:center;color:var(--calcite-block-text-color, var(--calcite-color-text-3))}calcite-action-menu{align-self:center;grid-area:menu;margin-inline-end:var(--calcite-internal-block-actions-spacing)}:host([expanded]){margin-block:.5rem}:host([expanded]) .header .title .heading{color:var(--calcite-block-heading-text-color, var(--calcite-block-heading-text-color-press, var(--calcite-color-text-1)));font-weight:var(--calcite-font-weight-medium)}:host([expanded]) .description{color:var(--calcite-block-description-text-color, var(--calcite-color-text-2))}:host([expanded]) .icon--start,:host([expanded]) .icon--end{color:var(--calcite-block-icon-color, var(--calcite-color-text-1))}:host([expanded]) .content{opacity:1}@starting-style{:host([expanded]){margin-block-start:0;opacity:0}}:host([expanded][scale=s]){margin-block:var(--calcite-spacing-xxs)}:host([expanded][scale=l]){margin-block:var(--calcite-spacing-md)}:host([hidden]){display:none}[hidden]{display:none}`,v=class extends C{constructor(){super(...arguments),this.transitionProp="margin-top",this.blockSectionChildren=[],this.messages=B(),this.focusSetter=E()(this),this.interactiveContainer=w(this),this.hasContentEnd=!1,this.hasContentStart=!1,this.hasEndActions=!1,this.hasMenuActions=!1,this.collapsible=!1,this.disabled=!1,this.dragDisabled=!1,this.dragHandle=!1,this.expanded=!1,this.loading=!1,this.menuPlacement=I,this.addToItems=[],this.moveToItems=[],this.sortDisabled=!1,this.overlayPositioning="absolute",this.scale="m",this.setPosition=null,this.setSize=null,this.sortHandleOpen=!1,this.topLayerDisabled=!1,this.calciteBlockBeforeClose=c({cancelable:!1}),this.calciteBlockBeforeOpen=c({cancelable:!1}),this.calciteBlockClose=c({cancelable:!1}),this.calciteBlockCollapse=c({cancelable:!1}),this.calciteBlockExpand=c({cancelable:!1}),this.calciteBlockOpen=c({cancelable:!1}),this.calciteBlockSortHandleBeforeClose=c({cancelable:!1}),this.calciteBlockSortHandleBeforeOpen=c({cancelable:!1}),this.calciteBlockSortHandleClose=c({cancelable:!1}),this.calciteBlockSortHandleOpen=c({cancelable:!1}),this.calciteBlockToggle=c({cancelable:!1}),this.calciteInternalBlockUpdateSortMenuItems=c({cancelable:!1})}static{this.properties={hasContentEnd:[16,{},{state:!0}],hasContentStart:[16,{},{state:!0}],hasEndActions:[16,{},{state:!0}],hasMenuActions:[16,{},{state:!0}],collapsible:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],dragDisabled:[7,{},{reflect:!0,type:Boolean}],dragHandle:[7,{},{reflect:!0,type:Boolean}],expanded:[7,{},{reflect:!0,type:Boolean}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{type:String},{reflect:!0}],loading:[7,{},{reflect:!0,type:Boolean}],label:1,menuFlipPlacements:[0,{},{attribute:!1}],menuPlacement:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],addToItems:[0,{},{attribute:!1}],moveToItems:[0,{},{attribute:!1}],sortDisabled:[5,{},{type:Boolean}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],setPosition:[9,{},{type:Number}],setSize:[9,{},{type:Number}],sortHandleOpen:[7,{},{reflect:!0,type:Boolean}],status:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=[D,X,P]}get open(){return this.expanded}set open(e){m.deprecated("property",{component:this,name:"open",removalVersion:5,suggested:"expanded"}),this.expanded=e}async setFocus(e){return this.focusSetter(()=>this.el,e)}connectedCallback(){super.connectedCallback(),this.transitionEl=this.el}load(){!this.heading&&!this.label&&m.warn(`${this.el.tagName} is missing both heading & label. Please provide a heading or label for the component to be accessible.`)}willUpdate(e){e.has("expanded")&&(this.hasUpdated||this.expanded!==!1)&&z(this),e.has("sortHandleOpen")&&(this.hasUpdated||this.sortHandleOpen!==!1)&&this.sortHandleOpenHandler(),e.has("expanded")&&this.hasUpdated&&(this.expanded?this.calciteBlockExpand.emit():this.calciteBlockCollapse.emit()),e.has("scale")&&this.hasUpdated&&this.updateBlockSectionScale()}onBeforeOpen(){this.calciteBlockBeforeOpen.emit()}onOpen(){this.calciteBlockOpen.emit()}onBeforeClose(){this.calciteBlockBeforeClose.emit()}onClose(){this.calciteBlockClose.emit()}sortHandleOpenHandler(){this.sortHandleEl&&(this.sortHandleEl.open=this.sortHandleOpen)}setSortHandleEl(e){this.sortHandleEl=e,this.sortHandleOpenHandler()}handleSortHandleBeforeOpen(e){e.stopPropagation(),this.calciteBlockSortHandleBeforeOpen.emit()}handleSortHandleBeforeClose(e){e.stopPropagation(),this.calciteBlockSortHandleBeforeClose.emit()}handleSortHandleClose(e){e.stopPropagation(),this.sortHandleOpen=!1,this.calciteBlockSortHandleClose.emit()}handleSortHandleOpen(e){e.stopPropagation(),this.sortHandleOpen=!0,this.calciteBlockSortHandleOpen.emit()}onHeaderClick(){this.expanded=!this.expanded,this.calciteBlockToggle.emit()}menuActionsSlotChangeHandler(e){this.hasMenuActions=r(e)}actionsEndSlotChangeHandler(e){this.hasEndActions=r(e)}handleContentEndSlotChange(e){this.hasContentEnd=r(e)}handleContentStartSlotChange(e){this.hasContentStart=r(e)}handleDefaultSlotChange(e){this.blockSectionChildren=H(e,"calcite-block-section"),this.updateBlockSectionScale()}updateBlockSectionScale(){this.blockSectionChildren.forEach(e=>{e.scale=this.scale})}renderScrim(){let{loading:e}=this,l=n`<slot @slotchange=${this.handleDefaultSlotChange}></slot>`;return[e?n`<calcite-scrim .loading=${e}></calcite-scrim>`:null,l]}renderLoaderStatusIcon(){let{loading:e,messages:l,status:i}=this;return e?h("loader",n`<div class=${a(t.icon)}><calcite-loader inline .label=${l.loading} .scale=${this.scale}></calcite-loader></div>`):i?h("status-icon",n`<div class=${a(t.icon)}><calcite-icon class=${a({[t.statusIcon]:!0,[t.valid]:i=="valid",[t.invalid]:i=="invalid"})} .icon=${u[i]} .scale=${p(this.scale)}></calcite-icon></div>`):null}renderActionsEnd(){return n`<div class=${a(t.actionsEnd)} .hidden=${!this.hasEndActions}><slot name=${g.actionsEnd} @slotchange=${this.actionsEndSlotChangeHandler}></slot></div>`}renderContentEnd(){return n`<div class=${a({[t.iconEndContainer]:!this.iconEnd&&!this.collapsible})} .hidden=${!this.hasContentEnd}><div class=${a(t.contentEnd)}><slot name=${g.contentEnd} @slotchange=${this.handleContentEndSlotChange}></slot></div></div>`}renderContentStart(){return n`<div class=${a(t.contentStart)} .hidden=${!this.hasContentStart}><slot name=${g.contentStart} @slotchange=${this.handleContentStartSlotChange}></slot></div>`}renderTitle(){let{heading:e,headingLevel:l,description:i}=this;return e||i?n`<div class=${a(t.title)}>${O({class:t.heading,level:l,children:e})}${i?n`<div class=${a(t.description)}>${i}</div>`:null}</div>`:null}renderIcon(e){let{iconFlipRtl:l}=this,i=l==="both"||e==="start"?l==="start":l==="end",o=e==="start"?this.iconStart:this.iconEnd,d=e==="start"?t.iconStart:t.iconEnd;if(o)return h(o,n`<calcite-icon class=${a(d)} .flipRtl=${i} .icon=${o} .scale=${p(this.scale)}></calcite-icon>`)}render(){let{collapsible:e,loading:l,expanded:i,label:o,heading:d,messages:b,description:A,menuFlipPlacements:T,menuPlacement:L,moveToItems:M,addToItems:F,setPosition:N,setSize:U,dragDisabled:R,sortDisabled:j,iconEnd:k,hasContentEnd:V,hasContentStart:G,iconStart:q}=this,J=i?b.collapse:b.expand,K=!!(d||A||V||G||q||l||status),$=n`<header class=${a({[t.header]:!0,[t.headerHasContent]:K,[t.headerDraggable]:this.dragHandle})} id=${s.header}>${this.renderIcon("start")}${this.renderContentStart()}${this.renderLoaderStatusIcon()}${this.renderTitle()}</header>`,Q=i?u.expanded:u.collapsed,W=n`<div class=${a(t.headerContainer)}>${this.dragHandle?n`<calcite-sort-handle .addToItems=${F} .disabled=${R} .label=${d||o} .moveToItems=${M} @calciteSortHandleBeforeClose=${this.handleSortHandleBeforeClose} @calciteSortHandleBeforeOpen=${this.handleSortHandleBeforeOpen} @calciteSortHandleClose=${this.handleSortHandleClose} @calciteSortHandleOpen=${this.handleSortHandleOpen} overlay-positioning=fixed .scale=${this.scale} .setPosition=${N} .setSize=${U} .sortDisabled=${j} .topLayerDisabled=${this.topLayerDisabled} ${S(this.setSortHandleEl)}></calcite-sort-handle>`:null}${e?n`<button aria-controls=${s.content} aria-describedby=${s.header} .ariaExpanded=${e?i:null} class=${a(t.toggle)} id=${s.toggle} @click=${this.onHeaderClick} title=${J??f}>${$}<div class=${a(t.iconEndContainer)}>${this.renderContentEnd()}${this.renderIcon("end")}<calcite-icon class=${a(t.toggleIcon)} .icon=${Q} .scale=${p(this.scale)}></calcite-icon></div></button>`:$}${k&&!e?n`<div class=${a(t.iconEndContainer)}>${this.renderContentEnd()}${this.renderIcon("end")}</div>`:!k&&!e?this.renderContentEnd():null}<calcite-action-menu .flipPlacements=${T??["top","bottom"]} .hidden=${!this.hasMenuActions} .label=${b.options} .overlayPositioning=${this.overlayPositioning} .placement=${L} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled}><slot name=${g.headerMenuActions} @slotchange=${this.menuActionsSlotChangeHandler}></slot></calcite-action-menu>${this.renderActionsEnd()}</div>`;return this.interactiveContainer({disabled:this.disabled,children:n`<article aria-label=${o??f} .ariaBusy=${l} class=${a({[t.container]:!0})}>${W}<section aria-labelledby=${s.toggle} class=${a(t.content)} .hidden=${!i} id=${s.content}>${this.renderScrim()}</section></article>`})}};y("calcite-block",v);export{v as Block};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as G}from"./4KZB24O5.js";import{b as h}from"./QS4T2NHO.js";import{b as u}from"./CFBOYHB5.js";import{a as j}from"./3AMEP6UM.js";import{a as K}from"./GMNUTTK7.js";import{a as _}from"./WG76VRRN.js";import{c as A,d as U,e as N}from"./FQWCNEV3.js";import"./GS75MLSQ.js";import{a as L}from"./TG2V3PD6.js";import"./YGX7CUXN.js";import{a as V}from"./ANC4DUDW.js";import{a as q}from"./X7BSBNJI.js";import{a as B}from"./RH6ZIP65.js";import{e as M}from"./QFYAIO5N.js";import"./OPUF2ESH.js";import"./M5EVL4VV.js";import"./OAOQ5BXS.js";import{E as l,F as o,G as O,H as r,L as E,S as D,g as z,h as c,l as t,p}from"./4E3ZDBJS.js";var se=z`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}calcite-time-picker{--calcite-time-picker-color: var(--calcite-input-time-picker-digit-text-color);--calcite-time-picker-icon-color: var(--calcite-input-time-picker-digit-icon-color);--calcite-time-picker-border-color: var(--calcite-input-time-picker-border-color);--calcite-time-picker-button-background-color-hover: var(--calcite-input-time-picker-action-background-color-hover);--calcite-time-picker-button-background-color-press: var(--calcite-input-time-picker-action-background-color-press);--calcite-time-picker-input-border-color-hover: var(--calcite-input-time-picker-digit-border-color-hover);--calcite-time-picker-input-border-color-press: var(--calcite-input-time-picker-digit-border-color-press)}.container{--calcite-icon-color: var( --calcite-input-time-picker-icon-color, var(--calcite-ui-icon-color, var(--calcite-color-text-3)) );align-items:center;background-color:var(--calcite-input-time-picker-input-background-color, var(--calcite-color-foreground-1));border:1px solid var(--calcite-input-time-picker-input-border-color, var(--calcite-color-border-input));border-radius:var(--calcite-input-time-picker-input-corner-radius, var(--calcite-corner-radius-none));box-shadow:var(--calcite-input-time-picker-input-shadow, var(--calcite-shadow-none));box-sizing:border-box;display:flex;color:var(--calcite-input-time-picker-input-text-color, var(--calcite-color-text-1));flex-wrap:nowrap;font-weight:var(--calcite-font-weight-normal);inline-size:100%;padding-block:var(--calcite-spacing-base);-webkit-user-select:none;user-select:none}.container:focus-within{border-color:var(--calcite-color-brand);outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.container.read-only{background-color:var(--calcite-color-background);font-weight:var(--calcite-font-weight-medium)}.clock-icon{--calcite-icon-color: var( --calcite-input-time-picker-icon-color, var(--calcite-ui-icon-color, var(--calcite-color-text-3)) )}.hour-suffix,.minute-suffix,.second-suffix{white-space:pre}.input-container{display:flex;flex-grow:1}.input{align-items:center;display:flex;block-size:100%;justify-content:center;min-inline-size:max-content}.input.empty{inline-size:var(--calcite-spacing-xl)}.input:focus,.input:hover:focus{background-color:Highlight;color:HighlightText;outline:2px solid transparent;outline-offset:2px}.toggle-icon{--calcite-icon-color: var(--calcite-input-time-picker-icon-color, var(--calcite-color-text-3));align-items:center;block-size:24px;cursor:pointer;display:flex;inline-size:24px;justify-content:center}.toggle-icon:hover{--calcite-icon-color: var(--calcite-input-time-picker-icon-color-hover, var(--calcite-color-text-1))}:host([scale=s]) .container{block-size:1.5rem;font-size:var(--calcite-font-size-sm);gap:var(--calcite-spacing-sm);padding-inline-start:var(--calcite-spacing-sm);padding-inline-end:var(--calcite-spacing-xxs)}:host([scale=s]) .input-container{line-height:1rem}:host([scale=m]) .container{block-size:2rem;font-size:var(--calcite-font-size);gap:var(--calcite-spacing-md);padding-inline-start:var(--calcite-spacing-md);padding-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .input-container{line-height:1.5rem}:host([scale=l]) .container{block-size:2.75rem;font-size:var(--calcite-font-size-md);gap:var(--calcite-spacing-lg);padding-inline:var(--calcite-spacing-lg)}:host([scale=l]) .input-container{line-height:2.25rem}:host([status=invalid]) .container{border-color:var(--calcite-color-status-danger)}:host([status=invalid]) .container:focus-within{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}calcite-time-picker{--calcite-time-picker-background-color: var(--calcite-input-time-picker-background-color);--calcite-time-picker-border-color: var(--calcite-input-time-picker-border-color, transparent);--calcite-time-picker-corner-radius: var( --calcite-input-time-picker-corner-radius, var(--calcite-corner-radius-round) )}calcite-popover{--calcite-popover-corner-radius: var(--calcite-input-time-picker-corner-radius, var(--calcite-corner-radius-round))}.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-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-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start: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-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start: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-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start: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}`,i={clockIcon:"clock-icon",container:"container",decimalSeparator:"decimal-separator",empty:"empty",fractionalSecond:"fractional-second",hour:"hour",hourSuffix:"hour-suffix",input:"input",inputContainer:"input-container",meridiem:"meridiem",minute:"minute",minuteSuffix:"minute-suffix",readOnly:"read-only",second:"second",secondSuffix:"second-suffix",toggleIcon:"toggle-icon"},f={inputContainer:"inputContainer",validationMessage:"inputTimePickerValidationMessage"},w={clock:"clock",chevronUp:"chevron-up",chevronDown:"chevron-down"},P=class extends O{constructor(){super(),this.messages=V(),this.containerRef=l(),this.direction=M(),this.focusSetter=q()(this),this.formSupport=_({inputType:"time"})(this),this.fractionalSecondRef=l(),this.hourRef=l(),this.meridiemRef=l(),this.minuteRef=l(),this.secondRef=l(),this.time=G(this),this.interactiveContainer=L(this),this.timePickerRef=l(),this.disabled=!1,this.focusTrapDisabled=!1,this.hourFormat="user",this.open=!1,this.overlayPositioning="absolute",this.placement="auto",this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.step=60,this.calciteInputTimePickerBeforeClose=p({cancelable:!1}),this.calciteInputTimePickerBeforeOpen=p({cancelable:!1}),this.calciteInputTimePickerChange=p(),this.calciteInputTimePickerClose=p({cancelable:!1}),this.calciteInputTimePickerOpen=p({cancelable:!1}),this.listen("blur",this.blurHandler),this.listen("keydown",this.keyDownHandler),this.listen("calciteTimeChange",this.timeChangeHandler)}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],focusTrapDisabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],hourFormat:[3,{},{reflect:!0}],label:1,labelText:1,max:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],min:[3,{},{reflect:!0}],name:1,numberingSystem:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:1,placement:[3,{},{reflect:!0}],readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],step:[11,{},{reflect:!0,type:Number}],validationIcon:[3,{converter:E,type:String},{reflect:!0}],validationMessage:1,validity:[32,{},{readOnly:!0,attribute:!1}],value:1}}static{this.formAssociated=!0}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=se}async reposition(e=!1){this.popoverEl?.reposition(e)}async setFocus(e){return this.focusSetter(()=>this.el,e)}connectedCallback(){super.connectedCallback(),A(this)}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&(this.disabled||(this.open=!1)),e.has("readOnly")&&(this.hasUpdated||this.readOnly!==!1)&&(this.readOnly||(this.open=!1)),e.has("value")&&(this.hasUpdated?(this.time.userChangedValue||(this.previousEmittedValue=this.value),this.time.setValue(this.value),this.requestTimePickerUpdate()):this.previousEmittedValue=this.value)}disconnectedCallback(){super.disconnectedCallback(),U(this)}blurHandler(){this.changeEventHandler()}changeEventHandler(){let{previousEmittedValue:e,value:s}=this;e!==s&&(this.calciteInputTimePickerChange.emit().defaultPrevented?this.time.setValue(this.previousEmittedValue):this.previousEmittedValue=s)}keyDownHandler(e){let{defaultPrevented:s,key:a}=e,{hourFormat:n,meridiemOrder:d}=this.time;if(!s)if(a==="Enter")this.formSupport.active&&(this.formSupport.requestSubmit(),e.preventDefault()),this.changeEventHandler();else if(this.open&&a==="Escape")this.open=!1,e.preventDefault();else{let v=h(this.step)>0,g=this.step<60;switch(this.activeEl){case this.hourRef.value:a==="ArrowRight"?this.setFocusPart("minute"):a==="ArrowLeft"&&n==="12"&&d===0&&this.setFocusPart("meridiem");break;case this.minuteRef.value:switch(a){case"ArrowLeft":this.setFocusPart("hour");break;case"ArrowRight":this.step!==60?this.setFocusPart("second"):n==="12"&&this.setFocusPart("meridiem");break}break;case this.secondRef.value:switch(a){case"ArrowLeft":this.setFocusPart("minute");break;case"ArrowRight":h(this.step)>0?this.setFocusPart("fractionalSecond"):n==="12"&&this.setFocusPart("meridiem");break}break;case this.fractionalSecondRef.value:switch(a){case"ArrowLeft":this.setFocusPart("second");break;case"ArrowRight":n==="12"&&d!==0&&this.setFocusPart("meridiem");break}break;case this.meridiemRef.value:a==="ArrowLeft"&&d!==0?v?this.setFocusPart("fractionalSecond"):g?this.setFocusPart("second"):this.setFocusPart("minute"):a==="ArrowRight"&&d===0&&this.setFocusPart("hour");break}}}onLabelClick(){this.setFocus()}openHandler(){this.disabled||this.readOnly||this.popoverEl&&(this.popoverEl.open=this.open)}popoverBeforeOpenHandler(e){e.stopPropagation(),this.calciteInputTimePickerBeforeOpen.emit()}popoverOpenHandler(e){e.stopPropagation(),this.calciteInputTimePickerOpen.emit()}popoverBeforeCloseHandler(e){e.stopPropagation(),this.calciteInputTimePickerBeforeClose.emit()}popoverCloseHandler(e){e.stopPropagation(),this.calciteInputTimePickerClose.emit(),this.open=!1}requestTimePickerUpdate(){this.timePickerRef.value.manager?.component.requestUpdate()}setCalcitePopoverEl(e){this.popoverEl=e,this.openHandler()}async setFocusPart(e){(e==="hour"?this.hourRef:e==="minute"?this.minuteRef:e==="second"?this.secondRef:e==="fractionalSecond"?this.fractionalSecondRef:this.meridiemRef).value?.focus()}timeChangeHandler(e){if(e.stopPropagation(),this.disabled)return;let s=e.detail;s!==this.value?this.value=s:this.requestTimePickerUpdate()}timePartFocusHandler(e){this.activeEl=e.currentTarget}timePickerChangeHandler(e){e.stopPropagation()}toggleIconClickHandler(){this.open=!this.open}render(){let{messages:e,readOnly:s,scale:a}=this,{fractionalSecond:n,handleHourKeyDownEvent:d,handleMinuteKeyDownEvent:v,handleSecondKeyDownEvent:g,handleFractionalSecondKeyDownEvent:J,hour:b,hourFormat:Q,localizedDecimalSeparator:W,localizedFractionalSecond:k,localizedHour:S,localizedHourSuffix:X,localizedMinute:C,localizedMinuteSuffix:Y,localizedSecond:F,localizedSecondSuffix:H,meridiemOrder:Z,minute:$,second:x}=this.time,y="--",ee=u(n),ie=u(b),te=u($),ae=u(x),I=h(this.step)>0,R=Q==="12",re=this.step<60,T=Z===0||this.direction==="rtl",m=!this.disabled&&!this.readOnly;return this.interactiveContainer({disabled:this.disabled,children:c`${this.labelText&&K({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div aria-controls=${f.inputContainer} aria-labelledby=${f.inputContainer} class=${r({[i.container]:!0,[i.readOnly]:s})} role=combobox ${o(this.containerRef)}><calcite-icon class=${r(i.clockIcon)} .icon=${w.clock} .scale=${a==="l"?"m":"s"}></calcite-icon><div aria-label=${N(this)??t} .ariaRequired=${this.required} class=${r(i.inputContainer)} dir=ltr id=${f.inputContainer} role=group>${R&&T&&this.renderMeridiem()||""}<span aria-label=${this.messages.hour??t} aria-valuemax=23 aria-valuemin=1 aria-valuenow=${(ie&&parseInt(b)||"0")??t} aria-valuetext=${b??t} class=${r({[i.empty]:!S,[i.hour]:!0,[i.input]:!0})} @focus=${this.timePartFocusHandler} @keydown=${m?d:void 0} role=spinbutton tabindex=0 ${o(this.hourRef)}>${S||y}</span><span class=${r(i.hourSuffix)}>${X}</span><span aria-label=${this.messages.minute??t} aria-valuemax=12 aria-valuemin=1 aria-valuenow=${(te&&parseInt($)||"0")??t} aria-valuetext=${$??t} class=${r({[i.empty]:!C,[i.input]:!0,[i.minute]:!0})} @focus=${this.timePartFocusHandler} @keydown=${m?v:void 0} role=spinbutton tabindex=0 ${o(this.minuteRef)}>${C||y}</span><span class=${r(i.minuteSuffix)}>${Y}</span>${re&&c`<span aria-label=${this.messages.second??t} aria-valuemax=59 aria-valuemin=0 aria-valuenow=${(ae&&parseInt(x)||"0")??t} aria-valuetext=${x??t} class=${r({[i.empty]:!F,[i.input]:!0,[i.second]:!0})} @focus=${this.timePartFocusHandler} @keydown=${m?g:void 0} role=spinbutton tabindex=0 ${o(this.secondRef)}>${F||y}</span>`||""}${I&&c`<span class=${r(i.decimalSeparator)}>${W}</span>`||""}${I&&c`<span aria-label=${this.messages.fractionalSecond??t} aria-valuemax=999 aria-valuemin=1 aria-valuenow=${(ee&&parseInt(n)||"0")??t} aria-valuetext=${k??t} class=${r({[i.empty]:!k,[i.fractionalSecond]:!0,[i.input]:!0})} @focus=${this.timePartFocusHandler} @keydown=${m?J:void 0} role=spinbutton tabindex=0 ${o(this.fractionalSecondRef)}>${k||"".padStart(h(this.step),"-")}</span>`||""}${H&&c`<span class=${r(i.secondSuffix)}>${H}</span>`||""}${R&&!T&&this.renderMeridiem()||""}</div>${!this.readOnly&&this.renderToggleIcon(this.open)||""}</div><calcite-popover auto-close .focusTrapDisabled=${this.focusTrapDisabled} .focusTrapOptions=${{initialFocus:!1}} .label=${e.chooseTime} lang=${this.messages._lang??t} offset-distance=0 @calcitePopoverBeforeClose=${this.popoverBeforeCloseHandler} @calcitePopoverBeforeOpen=${this.popoverBeforeOpenHandler} @calcitePopoverClose=${this.popoverCloseHandler} @calcitePopoverOpen=${this.popoverOpenHandler} .overlayPositioning=${this.overlayPositioning} .placement=${this.placement} pointer-disabled .referenceElement=${this.containerRef.value} trigger-disabled ${o(this.setCalcitePopoverEl)}><calcite-time-picker .hourFormat=${this.time.hourFormat} lang=${this.messages._lang??t} .messageOverrides=${this.messageOverrides} .numberingSystem=${this.numberingSystem} @calciteTimePickerChange=${this.timePickerChangeHandler} .scale=${this.scale} .step=${this.step} tabindex=${(this.open?void 0:-1)??t} .time=${this.time} .value=${this.value} ${o(this.timePickerRef)}></calcite-time-picker></calcite-popover>${this.validationMessage&&this.status==="invalid"?j({icon:this.validationIcon,id:f.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}renderMeridiem(){let{handleMeridiemKeyDownEvent:e,localizedMeridiem:s,meridiem:a}=this.time,n=!this.disabled&&!this.readOnly;return c`<span aria-label=${this.messages.meridiem??t} aria-valuemax=2 aria-valuemin=1 aria-valuenow=${a==="PM"&&"2"||"1"} aria-valuetext=${a??t} class=${r({[i.empty]:!s,[i.input]:!0,[i.meridiem]:!0})} @focus=${this.timePartFocusHandler} @keydown=${n?e:void 0} role=spinbutton tabindex=0 ${o(this.meridiemRef)}>${s||"--"}</span>`}renderToggleIcon(e){return c`<span class=${r(i.toggleIcon)} @click=${this.toggleIconClickHandler}><calcite-icon .icon=${e?w.chevronUp:w.chevronDown} .scale=${B(this.scale)}></calcite-icon></span>`}};D("calcite-input-time-picker",P);export{P as InputTimePicker};
2
+ import{a as G}from"./VRDWGG6T.js";import{b as h}from"./QS4T2NHO.js";import{b as u}from"./7EPQUNDP.js";import{a as j}from"./FOOYJIFF.js";import{a as K}from"./SURF6YPL.js";import{a as _}from"./TEBB6NX6.js";import{c as A,d as U,e as N}from"./OXFDZYMM.js";import"./RTRAWD3Y.js";import{a as L}from"./LSPPTTY7.js";import"./YGX7CUXN.js";import{a as V}from"./T5XR4YFF.js";import{a as q}from"./4OQTPZUU.js";import{a as B}from"./RH6ZIP65.js";import{e as M}from"./2UT6QW2P.js";import"./XAGMG6IZ.js";import"./YZUVO4BX.js";import"./OAOQ5BXS.js";import{E as l,F as o,G as O,H as r,L as E,S as D,g as z,h as c,l as t,p}from"./ZY2K66YV.js";var se=z`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}calcite-time-picker{--calcite-time-picker-color: var(--calcite-input-time-picker-digit-text-color);--calcite-time-picker-icon-color: var(--calcite-input-time-picker-digit-icon-color);--calcite-time-picker-border-color: var(--calcite-input-time-picker-border-color);--calcite-time-picker-button-background-color-hover: var(--calcite-input-time-picker-action-background-color-hover);--calcite-time-picker-button-background-color-press: var(--calcite-input-time-picker-action-background-color-press);--calcite-time-picker-input-border-color-hover: var(--calcite-input-time-picker-digit-border-color-hover);--calcite-time-picker-input-border-color-press: var(--calcite-input-time-picker-digit-border-color-press)}.container{--calcite-icon-color: var( --calcite-input-time-picker-icon-color, var(--calcite-ui-icon-color, var(--calcite-color-text-3)) );align-items:center;background-color:var(--calcite-input-time-picker-input-background-color, var(--calcite-color-foreground-1));border:1px solid var(--calcite-input-time-picker-input-border-color, var(--calcite-color-border-input));border-radius:var(--calcite-input-time-picker-input-corner-radius, var(--calcite-corner-radius-none));box-shadow:var(--calcite-input-time-picker-input-shadow, var(--calcite-shadow-none));box-sizing:border-box;display:flex;color:var(--calcite-input-time-picker-input-text-color, var(--calcite-color-text-1));flex-wrap:nowrap;font-weight:var(--calcite-font-weight-normal);inline-size:100%;padding-block:var(--calcite-spacing-base);-webkit-user-select:none;user-select:none}.container:focus-within{border-color:var(--calcite-color-brand);outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.container.read-only{background-color:var(--calcite-color-background);font-weight:var(--calcite-font-weight-medium)}.clock-icon{--calcite-icon-color: var( --calcite-input-time-picker-icon-color, var(--calcite-ui-icon-color, var(--calcite-color-text-3)) )}.hour-suffix,.minute-suffix,.second-suffix{white-space:pre}.input-container{display:flex;flex-grow:1}.input{align-items:center;display:flex;block-size:100%;justify-content:center;min-inline-size:max-content}.input.empty{inline-size:var(--calcite-spacing-xl)}.input:focus,.input:hover:focus{background-color:Highlight;color:HighlightText;outline:2px solid transparent;outline-offset:2px}.toggle-icon{--calcite-icon-color: var(--calcite-input-time-picker-icon-color, var(--calcite-color-text-3));align-items:center;block-size:24px;cursor:pointer;display:flex;inline-size:24px;justify-content:center}.toggle-icon:hover{--calcite-icon-color: var(--calcite-input-time-picker-icon-color-hover, var(--calcite-color-text-1))}:host([scale=s]) .container{block-size:1.5rem;font-size:var(--calcite-font-size-sm);gap:var(--calcite-spacing-sm);padding-inline-start:var(--calcite-spacing-sm);padding-inline-end:var(--calcite-spacing-xxs)}:host([scale=s]) .input-container{line-height:1rem}:host([scale=m]) .container{block-size:2rem;font-size:var(--calcite-font-size);gap:var(--calcite-spacing-md);padding-inline-start:var(--calcite-spacing-md);padding-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .input-container{line-height:1.5rem}:host([scale=l]) .container{block-size:2.75rem;font-size:var(--calcite-font-size-md);gap:var(--calcite-spacing-lg);padding-inline:var(--calcite-spacing-lg)}:host([scale=l]) .input-container{line-height:2.25rem}:host([status=invalid]) .container{border-color:var(--calcite-color-status-danger)}:host([status=invalid]) .container:focus-within{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}calcite-time-picker{--calcite-time-picker-background-color: var(--calcite-input-time-picker-background-color);--calcite-time-picker-border-color: var(--calcite-input-time-picker-border-color, transparent);--calcite-time-picker-corner-radius: var( --calcite-input-time-picker-corner-radius, var(--calcite-corner-radius-round) )}calcite-popover{--calcite-popover-corner-radius: var(--calcite-input-time-picker-corner-radius, var(--calcite-corner-radius-round))}.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-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-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start: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-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start: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-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start: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}`,i={clockIcon:"clock-icon",container:"container",decimalSeparator:"decimal-separator",empty:"empty",fractionalSecond:"fractional-second",hour:"hour",hourSuffix:"hour-suffix",input:"input",inputContainer:"input-container",meridiem:"meridiem",minute:"minute",minuteSuffix:"minute-suffix",readOnly:"read-only",second:"second",secondSuffix:"second-suffix",toggleIcon:"toggle-icon"},f={inputContainer:"inputContainer",validationMessage:"inputTimePickerValidationMessage"},w={clock:"clock",chevronUp:"chevron-up",chevronDown:"chevron-down"},P=class extends O{constructor(){super(),this.messages=V(),this.containerRef=l(),this.direction=M(),this.focusSetter=q()(this),this.formSupport=_({inputType:"time"})(this),this.fractionalSecondRef=l(),this.hourRef=l(),this.meridiemRef=l(),this.minuteRef=l(),this.secondRef=l(),this.time=G(this),this.interactiveContainer=L(this),this.timePickerRef=l(),this.disabled=!1,this.focusTrapDisabled=!1,this.hourFormat="user",this.open=!1,this.overlayPositioning="absolute",this.placement="auto",this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.step=60,this.calciteInputTimePickerBeforeClose=p({cancelable:!1}),this.calciteInputTimePickerBeforeOpen=p({cancelable:!1}),this.calciteInputTimePickerChange=p(),this.calciteInputTimePickerClose=p({cancelable:!1}),this.calciteInputTimePickerOpen=p({cancelable:!1}),this.listen("blur",this.blurHandler),this.listen("keydown",this.keyDownHandler),this.listen("calciteTimeChange",this.timeChangeHandler)}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],focusTrapDisabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],hourFormat:[3,{},{reflect:!0}],label:1,labelText:1,max:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],min:[3,{},{reflect:!0}],name:1,numberingSystem:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:1,placement:[3,{},{reflect:!0}],readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],step:[11,{},{reflect:!0,type:Number}],validationIcon:[3,{converter:E,type:String},{reflect:!0}],validationMessage:1,validity:[32,{},{readOnly:!0,attribute:!1}],value:1}}static{this.formAssociated=!0}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=se}async reposition(e=!1){this.popoverEl?.reposition(e)}async setFocus(e){return this.focusSetter(()=>this.el,e)}connectedCallback(){super.connectedCallback(),A(this)}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&(this.disabled||(this.open=!1)),e.has("readOnly")&&(this.hasUpdated||this.readOnly!==!1)&&(this.readOnly||(this.open=!1)),e.has("value")&&(this.hasUpdated?(this.time.userChangedValue||(this.previousEmittedValue=this.value),this.time.setValue(this.value),this.requestTimePickerUpdate()):this.previousEmittedValue=this.value)}disconnectedCallback(){super.disconnectedCallback(),U(this)}blurHandler(){this.changeEventHandler()}changeEventHandler(){let{previousEmittedValue:e,value:s}=this;e!==s&&(this.calciteInputTimePickerChange.emit().defaultPrevented?this.time.setValue(this.previousEmittedValue):this.previousEmittedValue=s)}keyDownHandler(e){let{defaultPrevented:s,key:a}=e,{hourFormat:n,meridiemOrder:d}=this.time;if(!s)if(a==="Enter")this.formSupport.active&&(this.formSupport.requestSubmit(),e.preventDefault()),this.changeEventHandler();else if(this.open&&a==="Escape")this.open=!1,e.preventDefault();else{let v=h(this.step)>0,g=this.step<60;switch(this.activeEl){case this.hourRef.value:a==="ArrowRight"?this.setFocusPart("minute"):a==="ArrowLeft"&&n==="12"&&d===0&&this.setFocusPart("meridiem");break;case this.minuteRef.value:switch(a){case"ArrowLeft":this.setFocusPart("hour");break;case"ArrowRight":this.step!==60?this.setFocusPart("second"):n==="12"&&this.setFocusPart("meridiem");break}break;case this.secondRef.value:switch(a){case"ArrowLeft":this.setFocusPart("minute");break;case"ArrowRight":h(this.step)>0?this.setFocusPart("fractionalSecond"):n==="12"&&this.setFocusPart("meridiem");break}break;case this.fractionalSecondRef.value:switch(a){case"ArrowLeft":this.setFocusPart("second");break;case"ArrowRight":n==="12"&&d!==0&&this.setFocusPart("meridiem");break}break;case this.meridiemRef.value:a==="ArrowLeft"&&d!==0?v?this.setFocusPart("fractionalSecond"):g?this.setFocusPart("second"):this.setFocusPart("minute"):a==="ArrowRight"&&d===0&&this.setFocusPart("hour");break}}}onLabelClick(){this.setFocus()}openHandler(){this.disabled||this.readOnly||this.popoverEl&&(this.popoverEl.open=this.open)}popoverBeforeOpenHandler(e){e.stopPropagation(),this.calciteInputTimePickerBeforeOpen.emit()}popoverOpenHandler(e){e.stopPropagation(),this.calciteInputTimePickerOpen.emit()}popoverBeforeCloseHandler(e){e.stopPropagation(),this.calciteInputTimePickerBeforeClose.emit()}popoverCloseHandler(e){e.stopPropagation(),this.calciteInputTimePickerClose.emit(),this.open=!1}requestTimePickerUpdate(){this.timePickerRef.value.manager?.component.requestUpdate()}setCalcitePopoverEl(e){this.popoverEl=e,this.openHandler()}async setFocusPart(e){(e==="hour"?this.hourRef:e==="minute"?this.minuteRef:e==="second"?this.secondRef:e==="fractionalSecond"?this.fractionalSecondRef:this.meridiemRef).value?.focus()}timeChangeHandler(e){if(e.stopPropagation(),this.disabled)return;let s=e.detail;s!==this.value?this.value=s:this.requestTimePickerUpdate()}timePartFocusHandler(e){this.activeEl=e.currentTarget}timePickerChangeHandler(e){e.stopPropagation()}toggleIconClickHandler(){this.open=!this.open}render(){let{messages:e,readOnly:s,scale:a}=this,{fractionalSecond:n,handleHourKeyDownEvent:d,handleMinuteKeyDownEvent:v,handleSecondKeyDownEvent:g,handleFractionalSecondKeyDownEvent:J,hour:b,hourFormat:Q,localizedDecimalSeparator:W,localizedFractionalSecond:k,localizedHour:S,localizedHourSuffix:X,localizedMinute:C,localizedMinuteSuffix:Y,localizedSecond:F,localizedSecondSuffix:H,meridiemOrder:Z,minute:$,second:x}=this.time,y="--",ee=u(n),ie=u(b),te=u($),ae=u(x),I=h(this.step)>0,R=Q==="12",re=this.step<60,T=Z===0||this.direction==="rtl",m=!this.disabled&&!this.readOnly;return this.interactiveContainer({disabled:this.disabled,children:c`${this.labelText&&K({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div aria-controls=${f.inputContainer} aria-labelledby=${f.inputContainer} class=${r({[i.container]:!0,[i.readOnly]:s})} role=combobox ${o(this.containerRef)}><calcite-icon class=${r(i.clockIcon)} .icon=${w.clock} .scale=${a==="l"?"m":"s"}></calcite-icon><div aria-label=${N(this)??t} .ariaRequired=${this.required} class=${r(i.inputContainer)} dir=ltr id=${f.inputContainer} role=group>${R&&T&&this.renderMeridiem()||""}<span aria-label=${this.messages.hour??t} aria-valuemax=23 aria-valuemin=1 aria-valuenow=${(ie&&parseInt(b)||"0")??t} aria-valuetext=${b??t} class=${r({[i.empty]:!S,[i.hour]:!0,[i.input]:!0})} @focus=${this.timePartFocusHandler} @keydown=${m?d:void 0} role=spinbutton tabindex=0 ${o(this.hourRef)}>${S||y}</span><span class=${r(i.hourSuffix)}>${X}</span><span aria-label=${this.messages.minute??t} aria-valuemax=12 aria-valuemin=1 aria-valuenow=${(te&&parseInt($)||"0")??t} aria-valuetext=${$??t} class=${r({[i.empty]:!C,[i.input]:!0,[i.minute]:!0})} @focus=${this.timePartFocusHandler} @keydown=${m?v:void 0} role=spinbutton tabindex=0 ${o(this.minuteRef)}>${C||y}</span><span class=${r(i.minuteSuffix)}>${Y}</span>${re&&c`<span aria-label=${this.messages.second??t} aria-valuemax=59 aria-valuemin=0 aria-valuenow=${(ae&&parseInt(x)||"0")??t} aria-valuetext=${x??t} class=${r({[i.empty]:!F,[i.input]:!0,[i.second]:!0})} @focus=${this.timePartFocusHandler} @keydown=${m?g:void 0} role=spinbutton tabindex=0 ${o(this.secondRef)}>${F||y}</span>`||""}${I&&c`<span class=${r(i.decimalSeparator)}>${W}</span>`||""}${I&&c`<span aria-label=${this.messages.fractionalSecond??t} aria-valuemax=999 aria-valuemin=1 aria-valuenow=${(ee&&parseInt(n)||"0")??t} aria-valuetext=${k??t} class=${r({[i.empty]:!k,[i.fractionalSecond]:!0,[i.input]:!0})} @focus=${this.timePartFocusHandler} @keydown=${m?J:void 0} role=spinbutton tabindex=0 ${o(this.fractionalSecondRef)}>${k||"".padStart(h(this.step),"-")}</span>`||""}${H&&c`<span class=${r(i.secondSuffix)}>${H}</span>`||""}${R&&!T&&this.renderMeridiem()||""}</div>${!this.readOnly&&this.renderToggleIcon(this.open)||""}</div><calcite-popover auto-close .focusTrapDisabled=${this.focusTrapDisabled} .focusTrapOptions=${{initialFocus:!1}} .label=${e.chooseTime} lang=${this.messages._lang??t} offset-distance=0 @calcitePopoverBeforeClose=${this.popoverBeforeCloseHandler} @calcitePopoverBeforeOpen=${this.popoverBeforeOpenHandler} @calcitePopoverClose=${this.popoverCloseHandler} @calcitePopoverOpen=${this.popoverOpenHandler} .overlayPositioning=${this.overlayPositioning} .placement=${this.placement} pointer-disabled .referenceElement=${this.containerRef.value} trigger-disabled ${o(this.setCalcitePopoverEl)}><calcite-time-picker .hourFormat=${this.time.hourFormat} lang=${this.messages._lang??t} .messageOverrides=${this.messageOverrides} .numberingSystem=${this.numberingSystem} @calciteTimePickerChange=${this.timePickerChangeHandler} .scale=${this.scale} .step=${this.step} tabindex=${(this.open?void 0:-1)??t} .time=${this.time} .value=${this.value} ${o(this.timePickerRef)}></calcite-time-picker></calcite-popover>${this.validationMessage&&this.status==="invalid"?j({icon:this.validationIcon,id:f.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}renderMeridiem(){let{handleMeridiemKeyDownEvent:e,localizedMeridiem:s,meridiem:a}=this.time,n=!this.disabled&&!this.readOnly;return c`<span aria-label=${this.messages.meridiem??t} aria-valuemax=2 aria-valuemin=1 aria-valuenow=${a==="PM"&&"2"||"1"} aria-valuetext=${a??t} class=${r({[i.empty]:!s,[i.input]:!0,[i.meridiem]:!0})} @focus=${this.timePartFocusHandler} @keydown=${n?e:void 0} role=spinbutton tabindex=0 ${o(this.meridiemRef)}>${s||"--"}</span>`}renderToggleIcon(e){return c`<span class=${r(i.toggleIcon)} @click=${this.toggleIconClickHandler}><calcite-icon .icon=${e?w.chevronUp:w.chevronDown} .scale=${B(this.scale)}></calcite-icon></span>`}};D("calcite-input-time-picker",P);export{P as InputTimePicker};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{i as L,j as C,z as h}from"./M5EVL4VV.js";var k="calciteInternalLabelClick",E="calciteInternalLabelConnected",f="calciteInternalLabelDisconnected",v="calcite-label",r=new WeakMap,i=new WeakMap,c=new WeakMap,d=new WeakMap,s=new Set,y=e=>{let{id:t}=e,l=t&&L(e,{selector:`${v}[for="${t}"]`});if(l)return l;let a=C(e,v);return!a||M(a,e)?null:a};function M(e,t){let l,a="custom-element-ancestor-check",b=n=>{n.stopImmediatePropagation();let u=n.composedPath();l=u.slice(u.indexOf(t),u.indexOf(e))};return e.addEventListener(a,b,{once:!0}),t.dispatchEvent(new CustomEvent(a,{composed:!0,bubbles:!0})),e.removeEventListener(a,b),l.filter(n=>n!==t&&n!==e).filter(n=>n.tagName?.includes("-")).length>0}function m(e){if(!e)return;let t=y(e.el);if(i.has(t)&&t===e.labelEl||!t&&s.has(e))return;let l=O.bind(e);if(t){e.labelEl=t;let a=r.get(t)||[];a.push(e),r.set(t,a.sort(w)),i.has(e.labelEl)||(i.set(e.labelEl,g),e.labelEl.addEventListener(k,g)),s.delete(e),document.removeEventListener(E,c.get(e)),d.set(e,l),document.addEventListener(f,l)}else s.has(e)||(l(),document.removeEventListener(f,d.get(e)))}function T(e){if(!e||(s.delete(e),document.removeEventListener(E,c.get(e)),document.removeEventListener(f,d.get(e)),c.delete(e),d.delete(e),!e.labelEl))return;let t=r.get(e.labelEl);t.length===1&&(e.labelEl.removeEventListener(k,i.get(e.labelEl)),i.delete(e.labelEl)),r.set(e.labelEl,t.filter(l=>l!==e).sort(w)),e.labelEl=null}function w(e,t){return h(e.el,t.el)?-1:1}function I(e){return e.label||e.labelEl?.textContent?.trim()||""}function g(e){let t=e.detail.sourceEvent.target,l=r.get(this),a=l.find(n=>n.el===t);if(l.includes(a))return;let o=l[0];o.disabled||o.onLabelClick(e)}function D(){s.has(this)&&m(this)}function O(){s.add(this);let e=c.get(this)||D.bind(this);c.set(this,e),document.addEventListener(E,e)}async function B(e){if(await e.componentOnReady(),r.has(e))return;let l=e.ownerDocument?.getElementById(e.for);l&&requestAnimationFrame(()=>{for(let a of s)if(a.el===l){m(a);break}})}export{E as a,f as b,m as c,T as d,I as e,B as f};
2
+ import{i as L,j as C,z as h}from"./YZUVO4BX.js";var k="calciteInternalLabelClick",E="calciteInternalLabelConnected",f="calciteInternalLabelDisconnected",v="calcite-label",r=new WeakMap,i=new WeakMap,c=new WeakMap,d=new WeakMap,s=new Set,y=e=>{let{id:t}=e,l=t&&L(e,{selector:`${v}[for="${t}"]`});if(l)return l;let a=C(e,v);return!a||M(a,e)?null:a};function M(e,t){let l,a="custom-element-ancestor-check",b=n=>{n.stopImmediatePropagation();let u=n.composedPath();l=u.slice(u.indexOf(t),u.indexOf(e))};return e.addEventListener(a,b,{once:!0}),t.dispatchEvent(new CustomEvent(a,{composed:!0,bubbles:!0})),e.removeEventListener(a,b),l.filter(n=>n!==t&&n!==e).filter(n=>n.tagName?.includes("-")).length>0}function m(e){if(!e)return;let t=y(e.el);if(i.has(t)&&t===e.labelEl||!t&&s.has(e))return;let l=O.bind(e);if(t){e.labelEl=t;let a=r.get(t)||[];a.push(e),r.set(t,a.sort(w)),i.has(e.labelEl)||(i.set(e.labelEl,g),e.labelEl.addEventListener(k,g)),s.delete(e),document.removeEventListener(E,c.get(e)),d.set(e,l),document.addEventListener(f,l)}else s.has(e)||(l(),document.removeEventListener(f,d.get(e)))}function T(e){if(!e||(s.delete(e),document.removeEventListener(E,c.get(e)),document.removeEventListener(f,d.get(e)),c.delete(e),d.delete(e),!e.labelEl))return;let t=r.get(e.labelEl);t.length===1&&(e.labelEl.removeEventListener(k,i.get(e.labelEl)),i.delete(e.labelEl)),r.set(e.labelEl,t.filter(l=>l!==e).sort(w)),e.labelEl=null}function w(e,t){return h(e.el,t.el)?-1:1}function I(e){return e.label||e.labelEl?.textContent?.trim()||""}function g(e){let t=e.detail.sourceEvent.target,l=r.get(this),a=l.find(n=>n.el===t);if(l.includes(a))return;let o=l[0];o.disabled||o.onLabelClick(e)}function D(){s.has(this)&&m(this)}function O(){s.add(this);let e=c.get(this)||D.bind(this);c.set(this,e),document.addEventListener(E,e)}async function B(e){if(await e.componentOnReady(),r.has(e))return;let l=e.ownerDocument?.getElementById(e.for);l&&requestAnimationFrame(()=>{for(let a of s)if(a.el===l){m(a);break}})}export{E as a,f as b,m as c,T as d,I as e,B as f};