@esri/calcite-components 5.2.0-next.34 → 5.2.0-next.36

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 (159) hide show
  1. package/dist/cdn/{JOSEHQRG.js → 2336GIGM.js} +1 -1
  2. package/dist/cdn/{OPT67Q2R.js → 2AXGJJMA.js} +1 -1
  3. package/dist/cdn/{OUQEH6CK.js → 2WP6KOC5.js} +1 -1
  4. package/dist/cdn/{DBYBKXUC.js → 3CQ6JCVK.js} +1 -1
  5. package/dist/cdn/{YGRFNIT3.js → 3ERCXYXN.js} +1 -1
  6. package/dist/cdn/{MLN6T267.js → 3ESCXH2T.js} +1 -1
  7. package/dist/cdn/{CIZBRXWP.js → 3G35TZAF.js} +1 -1
  8. package/dist/cdn/{52L2Y4I3.js → 3GZ3WFA2.js} +1 -1
  9. package/dist/cdn/{WKQNZHN6.js → 3Q3GK2B4.js} +1 -1
  10. package/dist/cdn/{GZJYDK4X.js → 44HCLKE3.js} +1 -1
  11. package/dist/cdn/{3452BXT3.js → 44N6QRSL.js} +1 -1
  12. package/dist/cdn/{XG2KRODT.js → 4IVLGM5W.js} +1 -1
  13. package/dist/cdn/{CMPLB6H3.js → 4XYY4F6B.js} +1 -1
  14. package/dist/cdn/{Q54PMU4H.js → 5JFZFUXO.js} +1 -1
  15. package/dist/cdn/{KKYGFS33.js → 5M6N5KCT.js} +1 -1
  16. package/dist/cdn/{ZVV7PQRT.js → 5Q4ZBSKD.js} +1 -1
  17. package/dist/cdn/{ZIMTT3GB.js → 66YXWLDW.js} +1 -1
  18. package/dist/cdn/{67LKCAUF.js → 6ICKIPTR.js} +1 -1
  19. package/dist/cdn/{FW6BT6EP.js → 6TUMJN6V.js} +1 -1
  20. package/dist/cdn/7R3G5UWC.js +2 -0
  21. package/dist/cdn/{VVKC5BGR.js → 7S36JJ3L.js} +1 -1
  22. package/dist/cdn/{6OVB3TAD.js → A7JOVYUR.js} +1 -1
  23. package/dist/cdn/{KXN5XB73.js → ACVSDDN7.js} +1 -1
  24. package/dist/cdn/{RET4INDI.js → AFUZB74J.js} +1 -1
  25. package/dist/cdn/{4KD57W6G.js → APEXJ5RF.js} +1 -1
  26. package/dist/cdn/{LU4ANEQL.js → ARV4VGAR.js} +1 -1
  27. package/dist/cdn/{QBDKDE2F.js → AXV7U3YM.js} +1 -1
  28. package/dist/cdn/{JDJW7IOG.js → B4QYMPP5.js} +1 -1
  29. package/dist/cdn/{DJE52FKC.js → BIO2AGP7.js} +1 -1
  30. package/dist/cdn/{V464OWRY.js → BJWNSGHQ.js} +1 -1
  31. package/dist/cdn/{ZSPKZX6D.js → BMNHU4MU.js} +1 -1
  32. package/dist/cdn/{UHAH4IYQ.js → BNJ2ECUV.js} +1 -1
  33. package/dist/cdn/{NJ24XHLQ.js → BOMXI5JR.js} +1 -1
  34. package/dist/cdn/{KXLEYKX5.js → BSEW334M.js} +1 -1
  35. package/dist/cdn/{L5OXNYB3.js → BVEDAJDJ.js} +1 -1
  36. package/dist/cdn/{NP3C6UH3.js → BYV7PB3D.js} +1 -1
  37. package/dist/cdn/{4VQI4R7J.js → C67OMHVV.js} +1 -1
  38. package/dist/cdn/{DC6ZE5VV.js → COKW2W3H.js} +1 -1
  39. package/dist/cdn/{NGUUYLR7.js → CPE3WI7D.js} +1 -1
  40. package/dist/cdn/{XZRWDGTF.js → CRNK76OX.js} +1 -1
  41. package/dist/cdn/{FLHFZN4H.js → CSC2MWHL.js} +1 -1
  42. package/dist/cdn/{CNNLMIH2.js → D2MAHJVD.js} +1 -1
  43. package/dist/cdn/{IUVPJ3HG.js → D422MRUE.js} +1 -1
  44. package/dist/cdn/{34A2JBI7.js → D5AIFYSU.js} +1 -1
  45. package/dist/cdn/{YGFGJM5J.js → D77IWCZW.js} +1 -1
  46. package/dist/cdn/{G6ZVL3QG.js → DFXBKDYZ.js} +1 -1
  47. package/dist/cdn/{FWBMKLCU.js → DMQO5JPM.js} +1 -1
  48. package/dist/cdn/{YFCK7FOA.js → DWZH5S6A.js} +1 -1
  49. package/dist/cdn/{5JYHJI7D.js → E3IJHDBS.js} +1 -1
  50. package/dist/cdn/{MWTJ5EKX.js → E6AZMF7L.js} +1 -1
  51. package/dist/cdn/{XQKV3J6C.js → EEBW63P4.js} +1 -1
  52. package/dist/cdn/{RCO7AQK4.js → EJXR2VN5.js} +1 -1
  53. package/dist/cdn/{GDCT3O3R.js → ELFOI6WT.js} +1 -1
  54. package/dist/cdn/{56CUCPCD.js → EMQ2MCGF.js} +1 -1
  55. package/dist/cdn/{ZGP64WBH.js → F2D3H34H.js} +1 -1
  56. package/dist/cdn/{MAPRLDXG.js → F324JMBO.js} +1 -1
  57. package/dist/cdn/{HYJNZGDZ.js → FZVKIU5E.js} +1 -1
  58. package/dist/cdn/{XSVOUKOA.js → GD6KFBEX.js} +1 -1
  59. package/dist/cdn/{AWJAVEAX.js → GIUS3NDP.js} +1 -1
  60. package/dist/cdn/{ER7WXLPC.js → GOISJED7.js} +1 -1
  61. package/dist/cdn/{KBEOU6XB.js → GPJOMAWT.js} +1 -1
  62. package/dist/cdn/{LUINM7MS.js → HB74BJDJ.js} +1 -1
  63. package/dist/cdn/{KHUXEHSN.js → HFTA4RHJ.js} +1 -1
  64. package/dist/cdn/{PHIHMI6K.js → I4KTH4KC.js} +1 -1
  65. package/dist/cdn/{ITCJPW46.js → ICYLXVNT.js} +1 -1
  66. package/dist/cdn/{JKVUWO4Q.js → IKWI2E3V.js} +1 -1
  67. package/dist/cdn/{5CLYROXT.js → IZPDHL3B.js} +1 -1
  68. package/dist/cdn/{VP6XZS6K.js → J2PVASPF.js} +1 -1
  69. package/dist/cdn/{R7NJ5DPM.js → JB7W5VDR.js} +1 -1
  70. package/dist/cdn/{NO7V52QT.js → JI4IZOJN.js} +1 -1
  71. package/dist/cdn/{4VHAXDQK.js → JIRSLGBI.js} +1 -1
  72. package/dist/cdn/{7XZ7PAEM.js → JPGTXVCK.js} +1 -1
  73. package/dist/cdn/{TFZWWJXM.js → JVGDPJTI.js} +1 -1
  74. package/dist/cdn/{7LKDA6OC.js → KB5HQR6V.js} +1 -1
  75. package/dist/cdn/{WFZSPJIU.js → KCC4OZCV.js} +1 -1
  76. package/dist/cdn/{PJNX7EDP.js → KD7Z636C.js} +1 -1
  77. package/dist/cdn/{2OLJ3FUU.js → KKSM2CSJ.js} +1 -1
  78. package/dist/cdn/{TOS26VDH.js → KTDUPBWG.js} +1 -1
  79. package/dist/cdn/{X6FVQNUG.js → KY2GO432.js} +1 -1
  80. package/dist/cdn/{KAWJR2MH.js → LAV7IGG7.js} +1 -1
  81. package/dist/cdn/{CQ55NUF2.js → LCVNCULG.js} +1 -1
  82. package/dist/cdn/{7ZILEGVA.js → LG5E6RXA.js} +1 -1
  83. package/dist/cdn/{X4UWXMWI.js → LJ6WHU3X.js} +1 -1
  84. package/dist/cdn/{YYGZ5NQC.js → LL2RSQRQ.js} +1 -1
  85. package/dist/cdn/{6DDEBJT6.js → LNRCU5CV.js} +1 -1
  86. package/dist/cdn/{LV7VPYVR.js → LQBZF6CP.js} +1 -1
  87. package/dist/cdn/{FDS2YREX.js → LS6BOZFJ.js} +1 -1
  88. package/dist/cdn/{PLGNVWQV.js → MNQDYLSO.js} +1 -1
  89. package/dist/cdn/{WJVJQE5P.js → MXJ6FFGH.js} +1 -1
  90. package/dist/cdn/{OEKMQUG2.js → MXPKHEUB.js} +1 -1
  91. package/dist/cdn/{WTUM4SSW.js → N33ICRJV.js} +1 -1
  92. package/dist/cdn/{U62I6ED4.js → N57ILTR7.js} +1 -1
  93. package/dist/cdn/{B4OTZN7V.js → NDOW2ZTL.js} +1 -1
  94. package/dist/cdn/{S3BDFFWK.js → NGCSLLQK.js} +1 -1
  95. package/dist/cdn/{CWNQIS43.js → NHFVKAKE.js} +1 -1
  96. package/dist/cdn/{VQUEYWKU.js → NZ5OT47X.js} +1 -1
  97. package/dist/cdn/{NXGI7U6L.js → O3R33QRD.js} +1 -1
  98. package/dist/cdn/{NKL7NSVV.js → OIPUW5WN.js} +1 -1
  99. package/dist/cdn/{7BKS4PFK.js → OUUUQNUM.js} +1 -1
  100. package/dist/cdn/{GIJ7PYXB.js → OWNV4RTI.js} +1 -1
  101. package/dist/cdn/{EQIXMYG3.js → P36AR5X7.js} +1 -1
  102. package/dist/cdn/{EMIJDMKX.js → PGRQYEZM.js} +1 -1
  103. package/dist/cdn/{C3KPSVGH.js → PRU74JEB.js} +1 -1
  104. package/dist/cdn/{MQHZO6ZP.js → PT5CNRQK.js} +1 -1
  105. package/dist/cdn/{HMM4ZFPP.js → QA66FYZW.js} +1 -1
  106. package/dist/cdn/{A57WDXBM.js → QFIDSGQK.js} +1 -1
  107. package/dist/cdn/{DUBD6KNL.js → QIHWVOSW.js} +1 -1
  108. package/dist/cdn/{GJCWKT4V.js → QL66OUSE.js} +1 -1
  109. package/dist/cdn/{3B2YYHEP.js → QQU44OYZ.js} +1 -1
  110. package/dist/cdn/{NUJKT5EY.js → RD3MZVBU.js} +1 -1
  111. package/dist/cdn/{LOVOT7S2.js → RMWKZ4KQ.js} +1 -1
  112. package/dist/cdn/{P34UMG3H.js → RV5SWVE6.js} +1 -1
  113. package/dist/cdn/{V25VIIA6.js → RVKDUYGC.js} +1 -1
  114. package/dist/cdn/{QQPT3ENO.js → SREXUJPH.js} +1 -1
  115. package/dist/cdn/{STFBBE2C.js → SU2RE5RD.js} +1 -1
  116. package/dist/cdn/{HHATT2UD.js → SUWH62Z3.js} +1 -1
  117. package/dist/cdn/{IEO3SNVS.js → SXMXRXIV.js} +1 -1
  118. package/dist/cdn/{XXQAUXU6.js → T66EI655.js} +1 -1
  119. package/dist/cdn/{FJCFPYSL.js → TCB2OPWG.js} +1 -1
  120. package/dist/cdn/{EJWPGKEU.js → TM3BMLVT.js} +1 -1
  121. package/dist/cdn/{O7FVKI6E.js → TMUBVLL4.js} +1 -1
  122. package/dist/cdn/{VUSM63GA.js → TPOHX4I6.js} +1 -1
  123. package/dist/cdn/{UQGH3DKB.js → TVE6AT5Z.js} +1 -1
  124. package/dist/cdn/{LGTVQKU4.js → UDLOJC55.js} +1 -1
  125. package/dist/cdn/{N3YSSIMR.js → UEYHDZXA.js} +1 -1
  126. package/dist/cdn/{NVENUCRF.js → UPMYWTPY.js} +1 -1
  127. package/dist/cdn/{M3EYW2VG.js → UUNZM3XE.js} +1 -1
  128. package/dist/cdn/{CRUSHZIN.js → VTJVVZ2D.js} +1 -1
  129. package/dist/cdn/{5GW2PNBP.js → WELPBHP2.js} +1 -1
  130. package/dist/cdn/{E6TPV5IU.js → WKRUDQ4S.js} +1 -1
  131. package/dist/cdn/{ACQTS3J3.js → XFH2XUOX.js} +1 -1
  132. package/dist/cdn/{YFE2XCCJ.js → XG53CBNZ.js} +1 -1
  133. package/dist/cdn/{4XAA4FL5.js → XGJWH7PU.js} +1 -1
  134. package/dist/cdn/{IER4QCWX.js → XIMGG2BO.js} +1 -1
  135. package/dist/cdn/{DXJ3SZ3N.js → XJ5CSBFD.js} +1 -1
  136. package/dist/cdn/{YCY2AXMT.js → Y5CP5VZ4.js} +1 -1
  137. package/dist/cdn/{JUJXXQWA.js → Y7ZIFXGT.js} +1 -1
  138. package/dist/cdn/{GTTHGH23.js → YBUIKSNW.js} +1 -1
  139. package/dist/cdn/{KSUJTKZ5.js → YWWVMIYA.js} +1 -1
  140. package/dist/cdn/{LIJ5V2RH.js → ZC5BXC3O.js} +1 -1
  141. package/dist/cdn/{TSYMHVVE.js → ZNRIUQFL.js} +1 -1
  142. package/dist/cdn/{CP25FMC2.js → ZOSYFXOS.js} +1 -1
  143. package/dist/cdn/{3ZE4JI4X.js → ZSXWFUAF.js} +1 -1
  144. package/dist/cdn/{Q7NS4GVX.js → ZUTMFUC6.js} +1 -1
  145. package/dist/cdn/{2SO74VOS.js → ZVROPKQE.js} +1 -1
  146. package/dist/cdn/assets/icon/radarChart16.json +1 -0
  147. package/dist/cdn/assets/icon/radarChart24.json +1 -0
  148. package/dist/cdn/assets/icon/radarChart32.json +1 -0
  149. package/dist/cdn/assets/icon/treeMap16.json +1 -0
  150. package/dist/cdn/assets/icon/treeMap24.json +1 -0
  151. package/dist/cdn/assets/icon/treeMap32.json +1 -0
  152. package/dist/cdn/index.js +1 -1
  153. package/dist/chunks/runtime.js +4 -4
  154. package/dist/components/calcite-action-bar/customElement.js +1 -1
  155. package/dist/docs/api.json +1 -1
  156. package/dist/docs/docs.json +1 -1
  157. package/dist/docs/web-types.json +1 -1
  158. package/package.json +3 -3
  159. package/dist/cdn/ROJJWCLD.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as x}from"./56CUCPCD.js";import{a as y}from"./4XAA4FL5.js";import{a as O}from"./CP25FMC2.js";import{a as g}from"./VI7SBYXT.js";import"./FLHFZN4H.js";import"./YFCK7FOA.js";import{k as v}from"./ER7WXLPC.js";import{G as b,H as p,S as f,g as h,h as u,p as m}from"./DBYBKXUC.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(t){this.handleNudgeEvent(t)}onGlobalDragStart(){this.endObserving()}onGlobalDragEnd(){this.beginObserving()}onDragEnd(){}onDragStart(){}onDragSort(){this.items=Array.from(this.el.children),this.calciteListOrderChange.emit()}handleNudgeEvent(t){let{direction:a}=t.detail,e=t.composedPath().find(r=>r.matches(this.handleSelector)),i=this.items.find(r=>e&&r.contains(e)||t.composedPath().includes(r)),d=this.items.length-1,s=i?this.items.indexOf(i):-1,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(e)),e&&"selected"in e&&(e.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:t,layout:a}=this,e=a==="horizontal"||!1;return this.interactiveContainer({disabled:t,children:u`<div class=${p({[o.container]:!0,[o.containerVertical]:!e,[o.containerHorizontal]:e})}><slot></slot></div>`})}};f("calcite-sortable-list",c);export{c as SortableList};
2
+ import{a as x}from"./EMQ2MCGF.js";import{a as y}from"./XGJWH7PU.js";import{a as O}from"./ZOSYFXOS.js";import{a as g}from"./VI7SBYXT.js";import"./CSC2MWHL.js";import"./DWZH5S6A.js";import{k as v}from"./GOISJED7.js";import{G as b,H as p,S as f,g as h,h as u,p as m}from"./3CQ6JCVK.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(t){this.handleNudgeEvent(t)}onGlobalDragStart(){this.endObserving()}onGlobalDragEnd(){this.beginObserving()}onDragEnd(){}onDragStart(){}onDragSort(){this.items=Array.from(this.el.children),this.calciteListOrderChange.emit()}handleNudgeEvent(t){let{direction:a}=t.detail,e=t.composedPath().find(r=>r.matches(this.handleSelector)),i=this.items.find(r=>e&&r.contains(e)||t.composedPath().includes(r)),d=this.items.length-1,s=i?this.items.indexOf(i):-1,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(e)),e&&"selected"in e&&(e.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:t,layout:a}=this,e=a==="horizontal"||!1;return this.interactiveContainer({disabled:t,children:u`<div class=${p({[o.container]:!0,[o.containerVertical]:!e,[o.containerHorizontal]:e})}><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.2/LICENSE.txt */
2
- import{b as n}from"./FLHFZN4H.js";var s=()=>n((a,o)=>{let e=new Set;return o.onDisconnected(()=>{e.forEach(r=>r.cancel())}),{add:r=>{[r].flat().forEach(c=>e.add(c))},resources:e}});export{s as a};
2
+ import{b as n}from"./CSC2MWHL.js";var s=()=>n((a,o)=>{let e=new Set;return o.onDisconnected(()=>{e.forEach(r=>r.cancel())}),{add:r=>{[r].flat().forEach(c=>e.add(c))},resources:e}});export{s as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as c,b as k,c as l}from"./KRZT7UVD.js";import{a as x}from"./4XAA4FL5.js";import{a as f}from"./YP3AYJH3.js";import{a as b}from"./JDJW7IOG.js";import{a as u}from"./6DDEBJT6.js";import{a as s}from"./ZWPNZ5XW.js";import"./FLHFZN4H.js";import"./YFCK7FOA.js";import{k as g,s as m}from"./ER7WXLPC.js";import{E as n,F as r,G as d,H as i,S as v,g as h,h as t,p as a}from"./DBYBKXUC.js";var C=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:inline-flex;cursor:default;border-radius:var(--calcite-chip-corner-radius, 9999px)}:host([closed]){display:none}:host([appearance=outline]) .container,:host([appearance=outline-fill]) .container{color:var(--calcite-chip-text-color, var(--calcite-color-text-1))}:host([appearance=outline]):host([kind=brand]),:host([appearance=outline-fill]):host([kind=brand]){--calcite-internal-chip-border-color: var(--calcite-chip-border-color, var(--calcite-color-brand));--calcite-internal-chip-selectable-hover-border-color: var(--calcite-chip-border-color, var(--calcite-color-brand));--calcite-internal-chip-selectable-active-border-color: var( --calcite-chip-border-color, var(--calcite-color-brand) )}:host([appearance=outline]):host([kind=inverse]),:host([appearance=outline-fill]):host([kind=inverse]){--calcite-internal-chip-border-color: var(--calcite-chip-border-color, var(--calcite-color-border-inverse))}:host([appearance=outline]):host([kind=neutral]),:host([appearance=outline-fill]):host([kind=neutral]){--calcite-internal-chip-border-color: var(--calcite-chip-border-color, var(--calcite-color-border-1))}:host([appearance=outline]){--calcite-internal-chip-background-color: transparent}:host([appearance=outline-fill]){--calcite-internal-chip-background-color: var(--calcite-chip-background-color, var(--calcite-color-foreground-1))}:host([appearance=solid]){--calcite-internal-chip-border-color: transparent;--calcite-internal-chip-selectable-hover-border-color: transparent;--calcite-internal-chip-selectable-active-border-color: transparent}:host([appearance=solid]):host([kind=brand]),:host([appearance=solid]):host([kind=inverse]){--calcite-internal-chip-close-background-color-hover: var(--calcite-color-transparent-inverse-hover);--calcite-internal-chip-close-background-color-press: var(--calcite-color-transparent-inverse-press);--calcite-internal-chip-close-icon-color: var(--calcite-color-text-inverse);--calcite-internal-chip-close-icon-color-hover: var(--calcite-color-text-inverse)}:host([appearance=solid]):host([kind=brand]) .container,:host([appearance=solid]):host([kind=inverse]) .container{color:var(--calcite-chip-text-color, var(--calcite-color-text-inverse))}:host([appearance=solid]):host([kind=brand]) .close,:host([appearance=solid]):host([kind=inverse]) .close{--calcite-color-focus: var(--calcite-color-text-inverse)}:host([appearance=solid]):host([kind=brand]){--calcite-internal-chip-background-color: var(--calcite-chip-background-color, var(--calcite-color-brand))}:host([appearance=solid]):host([kind=inverse]){--calcite-internal-chip-background-color: var(--calcite-chip-background-color, var(--calcite-color-inverse))}:host([appearance=solid]):host([kind=neutral]){--calcite-internal-chip-background-color: var(--calcite-chip-background-color, var(--calcite-color-foreground-2))}:host([kind=neutral]) .container{color:var(--calcite-chip-text-color, var(--calcite-color-text-1))}:host([selected]) .select-icon{opacity:1}:host([appearance=solid]):host([kind=neutral]){--calcite-internal-chip-selectable-hover-background-color: var(--calcite-color-foreground-3);--calcite-internal-chip-selectable-active-background-color: var(--calcite-color-border-2)}:host([appearance=solid]):host([kind=inverse]){--calcite-internal-chip-selectable-hover-background-color: var(--calcite-color-inverse-hover);--calcite-internal-chip-selectable-active-background-color: var(--calcite-color-inverse-press)}:host([appearance=solid]):host([kind=brand]){--calcite-internal-chip-selectable-hover-background-color: var(--calcite-color-brand-hover);--calcite-internal-chip-selectable-active-background-color: var(--calcite-color-brand-press)}:host([appearance=outline-fill]):host([kind=neutral]){--calcite-internal-chip-selectable-hover-background-color: var(--calcite-color-foreground-2);--calcite-internal-chip-selectable-hover-border-color: var(--calcite-color-border-input);--calcite-internal-chip-selectable-active-background-color: var(--calcite-color-foreground-3);--calcite-internal-chip-selectable-active-border-color: var(--calcite-color-text-3)}:host([appearance=outline-fill]):host([kind=inverse]),:host([appearance=outline-fill]):host([kind=brand]){--calcite-internal-chip-selectable-hover-background-color: var(--calcite-color-foreground-2);--calcite-internal-chip-selectable-active-background-color: var(--calcite-color-foreground-3)}:host([appearance=outline]):host([kind=neutral]){--calcite-internal-chip-selectable-hover-background-color: var(--calcite-color-transparent-hover);--calcite-internal-chip-selectable-hover-border-color: var(--calcite-color-border-input);--calcite-internal-chip-selectable-active-background-color: var(--calcite-color-transparent-press);--calcite-internal-chip-selectable-active-border-color: var(--calcite-color-text-3)}:host([appearance=outline]):host([kind=inverse]),:host([appearance=outline]):host([kind=brand]){--calcite-internal-chip-selectable-hover-background-color: var(--calcite-color-transparent-hover);--calcite-internal-chip-selectable-active-background-color: var(--calcite-color-transparent-press)}:host([scale=s]){--calcite-internal-chip-close-padding: var(--calcite-spacing-none)}:host([scale=s]) .container{--calcite-internal-chip-block-size: var(--calcite-size-sm, 1.5rem) ;--calcite-internal-chip-container-space-x-end: var(--calcite-spacing-xxs, .25rem) ;--calcite-internal-chip-container-space-x-start: var(--calcite-spacing-xxs, .25rem) ;--calcite-internal-chip-font-size: var(--calcite-font-size--2);--calcite-internal-chip-icon-size: var(--calcite-size-xs, 1rem) ;--calcite-internal-chip-icon-space: var(--calcite-spacing-xxs, .25rem) ;--calcite-internal-chip-image-size: var(--calcite-spacing-xl, 1.25rem) ;--calcite-internal-chip-title-space: var(--calcite-spacing-xxs, .25rem) ;--calcite-internal-close-size: var(--calcite-size-xs, 1rem) }:host([scale=s]) .container:not(.closable).is-circle{--calcite-internal-chip-container-space-x-start: var(--calcite-spacing-px);--calcite-internal-chip-container-space-x-end: var(--calcite-spacing-px)}:host([scale=s]) .container.image--slotted:has(.chip-icon),:host([scale=s]) .container.image--slotted.text--slotted,:host([scale=s]) .container.image--slotted.closable{--calcite-internal-chip-image-space-x-end: var(--calcite-spacing-xxs, .25rem) }:host([scale=s]) .container.image--slotted:not(.text--slotted,:has(.chip-icon)),:host([scale=s]) .container.image--slotted:not(.selectable){--calcite-internal-chip-container-space-x-start: var(--calcite-spacing-px)}:host([scale=s]) .container.selectable.single:not(.is-circle).image--slotted{--calcite-internal-chip-container-space-x-start: var(--calcite-spacing-px)}:host([scale=s]) .container.selectable.single:not(.is-circle).selected{--calcite-internal-chip-select-space-x-end: var(--calcite-spacing-xs, .375rem) ;--calcite-internal-chip-select-space-x-start: var(--calcite-spacing-none, 0)}:host([scale=s]) .container.selectable.single:not(.is-circle).selected.image--slotted{--calcite-internal-chip-select-space-x-end: .5rem ;--calcite-internal-chip-select-space-x-start: .125rem }:host([scale=s]) .container.multiple:not(.is-circle){--calcite-internal-chip-container-space-x-start: var(--calcite-spacing-xxs, .25rem) ;--calcite-internal-chip-select-space-x-end: var(--calcite-spacing-xxs, .25rem) ;--calcite-internal-chip-select-space-x-start: var(--calcite-spacing-xxs, .25rem) }:host([scale=s]) .container.multiple:not(.is-circle).image--slotted{--calcite-internal-chip-select-space-x-end: .5rem ;--calcite-internal-chip-select-space-x-start: var(--calcite-spacing-xs, .375rem) ;--calcite-internal-chip-container-space-x-start: var(--calcite-spacing-px)}:host([scale=s]) .container.multiple:not(.is-circle).image--slotted:not(.text--slotted){--calcite-internal-chip-select-space-x-start: var(--calcite-spacing-xs, .375rem) }:host([scale=m]){--calcite-internal-chip-close-padding: var(--calcite-spacing-xxs)}:host([scale=m]) .container{--calcite-internal-chip-block-size: var(--calcite-size-md, 2rem) ;--calcite-internal-chip-container-space-x-end: var(--calcite-spacing-xs, .375rem) ;--calcite-internal-chip-container-space-x-start: var(--calcite-spacing-xs, .375rem) ;--calcite-internal-chip-font-size: var(--calcite-font-size--1);--calcite-internal-chip-icon-size: var(--calcite-size-sm, 1.5rem) ;--calcite-internal-chip-icon-space: var(--calcite-spacing-xs, .375rem) ;--calcite-internal-chip-image-size: var(--calcite-size-sm, 1.5rem) ;--calcite-internal-chip-title-space: var(--calcite-spacing-xs, .375rem) ;--calcite-internal-close-size: var(--calcite-size-sm, 1.5rem) }:host([scale=m]) .container:not(.closable).is-circle{--calcite-internal-chip-container-space-x-end: var(--calcite-spacing-px);--calcite-internal-chip-container-space-x-start: var(--calcite-spacing-px)}:host([scale=m]) .container.image--slotted:not(.is-circle){--calcite-internal-chip-container-space-x-start: var(--calcite-spacing-xxs, .25rem) }:host([scale=m]) .container.image--slotted:has(.chip-icon),:host([scale=m]) .container.image--slotted.text--slotted,:host([scale=m]) .container.image--slotted.closable{--calcite-internal-chip-image-space-x-end: var(--calcite-spacing-xs, .375rem) }:host([scale=m]) .container.selectable.single:not(.is-circle).image--slotted{--calcite-internal-chip-container-space-x-start: var(--calcite-spacing-xxs, .25rem) }:host([scale=m]) .container.selectable.single:not(.is-circle).selected{--calcite-internal-chip-select-space-x-end: var(--calcite-spacing-px);--calcite-internal-chip-select-space-x-start: var(--calcite-spacing-none, 0)}:host([scale=m]) .container.selectable.single:not(.is-circle).selected.image--slotted{--calcite-internal-chip-select-space-x-end: var(--calcite-spacing-xxs, .25rem) ;--calcite-internal-chip-select-space-x-start: var(--calcite-spacing-xs, .375rem) }:host([scale=m]) .container.multiple:not(.is-circle){--calcite-internal-chip-select-space-x-end: .125rem ;--calcite-internal-chip-select-space-x-start: .125rem }:host([scale=m]) .container.multiple:not(.is-circle).image--slotted{--calcite-internal-chip-select-space-x-end: .5rem ;--calcite-internal-chip-select-space-x-start: var(--calcite-spacing-xxs, .25rem) }:host([scale=m]) .container.closable:not(.is-circle){--calcite-internal-chip-container-space-x-end: var(--calcite-spacing-xxs, .25rem) }:host([scale=l]){--calcite-internal-chip-close-padding: var(--calcite-spacing-xxs)}:host([scale=l]) .container{--calcite-internal-chip-block-size: 2.75rem ;--calcite-internal-chip-container-space-x-end: .5rem ;--calcite-internal-chip-container-space-x-start: .5rem ;--calcite-internal-chip-font-size: var(--calcite-font-size-0);--calcite-internal-chip-icon-size: var(--calcite-size-md, 2rem) ;--calcite-internal-chip-icon-space: .5rem ;--calcite-internal-chip-image-size: var(--calcite-size-md, 2rem) ;--calcite-internal-chip-title-space: .5rem ;--calcite-internal-close-size: var(--calcite-size-md, 2rem) }:host([scale=l]) .container:not(.closable).is-circle{--calcite-internal-chip-container-space-x-end: var(--calcite-spacing-xxs, .25rem) ;--calcite-internal-chip-container-space-x-start: var(--calcite-spacing-xxs, .25rem) }:host([scale=l]) .container.image--slotted:not(.is-circle){--calcite-internal-chip-container-space-x-start: var(--calcite-spacing-xs, .375rem) }:host([scale=l]) .container.image--slotted:has(.chip-icon),:host([scale=l]) .container.image--slotted.text--slotted,:host([scale=l]) .container.image--slotted.closable{--calcite-internal-chip-image-space-x-end: .5rem }:host([scale=l]) .container.selectable.single:not(.is-circle).image--slotted{--calcite-internal-chip-container-space-x-start: var(--calcite-spacing-xs, .375rem) }:host([scale=l]) .container.selectable.single:not(.is-circle).selected{--calcite-internal-chip-select-space-x-end: var(--calcite-spacing-xxs, .25rem) ;--calcite-internal-chip-select-space-x-start: var(--calcite-spacing-none, 0)}:host([scale=l]) .container.selectable.single:not(.is-circle).selected.image--slotted{--calcite-internal-chip-select-space-x-end: var(--calcite-spacing-xs, .375rem) ;--calcite-internal-chip-select-space-x-start: .5rem }:host([scale=l]) .container.multiple:not(.is-circle){--calcite-internal-chip-container-space-x-start: .5rem ;--calcite-internal-chip-select-space-x-end: var(--calcite-spacing-xxs, .25rem) ;--calcite-internal-chip-select-space-x-start: var(--calcite-spacing-xxs, .25rem) }:host([scale=l]) .container.multiple:not(.is-circle).image--slotted{--calcite-internal-chip-select-space-x-end: .75rem }:host([scale=l]) .container.closable:not(.is-circle){--calcite-internal-chip-container-space-x-end: var(--calcite-spacing-xs, .375rem) }.container{box-sizing:border-box;display:inline-flex;block-size:100%;max-inline-size:100%;align-items:center;justify-content:center;font-weight:var(--calcite-font-weight-medium);outline-color:transparent;background-color:var(--calcite-internal-chip-background-color);border-color:var(--calcite-internal-chip-border-color);border-radius:var(--calcite-chip-corner-radius, 9999px);border-width:var(--calcite-border-width-sm);border-style:solid;font-size:var(--calcite-internal-chip-font-size, var(--calcite-font-size));padding-inline-start:var(--calcite-internal-chip-container-space-x-start);padding-inline-end:var(--calcite-internal-chip-container-space-x-end);block-size:var(--calcite-internal-chip-block-size, auto);inline-size:var(--calcite-internal-chip-inline-size, auto);min-inline-size:var(--calcite-internal-chip-block-size, auto)}.container:hover .select-icon--active{opacity:var(--calcite-opacity-full, 1)}.container.selectable{cursor:pointer}.container.selectable:hover{background-color:var(--calcite-internal-chip-selectable-hover-background-color);border-color:var(--calcite-internal-chip-selectable-hover-border-color)}.container.selectable:active{background-color:var(--calcite-internal-chip-selectable-active-background-color);border-color:var(--calcite-internal-chip-selectable-active-border-color)}.container:not(.non-interactive):focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.container.text--slotted .title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.container:not(.text--slotted) .title,.container:not(.image--slotted) .image-container{display:none}.container.is-circle .chip-icon,.container.is-circle .image-container{padding:var(--calcite-spacing-none, 0)}.title{padding-inline:var(--calcite-internal-chip-title-space)}.image-container{display:inline-flex;overflow:hidden;align-items:center;justify-content:center;pointer-events:none;block-size:var(--calcite-internal-chip-image-size, var(--calcite-spacing-xxl, 1.5rem));inline-size:var(--calcite-internal-chip-image-size, var(--calcite-spacing-xxl, 1.5rem));padding-inline-start:var(--calcite-spacing-none, 0);padding-inline-end:var(--calcite-internal-chip-image-space-x-end, 0)}.chip-icon{position:relative;margin-block:0px;display:inline-flex;transition-timing-function:cubic-bezier(.4,0,.2,1);color:var(--calcite-chip-icon-color, var(--calcite-chip-text-color, var(--calcite-icon-color, var(--calcite-ui-icon-color, currentColor))));padding-inline:var(--calcite-internal-chip-icon-space, var(--calcite-spacing-xs, .375rem))}.select-icon{align-self:center;justify-content:center;align-items:center;display:flex;inset-block-start:-1px;position:absolute;visibility:hidden;inline-size:auto;opacity:0;transition:opacity .15s ease-in-out,inline-size .15s ease-in-out;color:var(--calcite-chip-select-icon-color, currentColor)}.select-icon.select-icon--active{position:relative;visibility:visible;opacity:var(--calcite-opacity-half, .5);color:var(--calcite-chip-select-icon-color-press, var(--calcite-chip-select-icon-color-pressed, var(--calcite-chip-select-icon-color, currentColor)))}.multiple .select-icon{display:flex;align-items:center;justify-content:center}.multiple .select-icon,.single .select-icon--active{padding-inline-start:var(--calcite-internal-chip-select-space-x-start);padding-inline-end:var(--calcite-internal-chip-select-space-x-end);block-size:var(--calcite-internal-chip-icon-size, var(--calcite-spacing-xxl, 1.5rem));inline-size:var(--calcite-internal-chip-icon-size, var(--calcite-spacing-xxl, 1.5rem))}.close{--calcite-action-background-color-hover: var(--calcite-internal-chip-close-background-color-hover);--calcite-action-background-color-press: var(--calcite-internal-chip-close-background-color-press);--calcite-action-corner-radius: var(--calcite-corner-radius-pill);--calcite-action-text-color: var( --calcite-chip-close-icon-color, var(--calcite-close-icon-color, var(--calcite-internal-chip-close-icon-color)) );--calcite-action-text-color-press: var( --calcite-chip-close-icon-color, var(--calcite-close-icon-color, var(--calcite-internal-chip-close-icon-color-hover)) );--calcite-icon-color: var(--calcite-action-text-color);--calcite-internal-action-min-height: unset;--calcite-internal-action-spacing: var(--calcite-internal-chip-close-padding)}slot[name=image]::slotted(*){display:flex;block-size:100%;inline-size:100%;overflow:hidden;border-radius:50%}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,o=class extends d{constructor(){super(),this.closeButtonRef=n(),this.containerRef=n(),this.messages=b({blocking:!0}),this.focusSetter=u()(this),this.interactiveContainer=x(this),this.hasImage=!1,this.hasText=!1,this.appearance="solid",this.closable=!1,this.closed=!1,this.closeOnDelete=!1,this.disabled=!1,this.iconFlipRtl=!1,this.interactive=!1,this.kind="neutral",this.scale="m",this.selected=!1,this.selectionMode="none",this.calciteChipClose=a({cancelable:!1}),this.calciteChipSelect=a({cancelable:!1}),this.calciteInternalChipKeyEvent=a({cancelable:!1}),this.calciteInternalChipSelect=a({cancelable:!1}),this.calciteInternalSyncSelectedChips=a({cancelable:!1}),this.listen("keydown",this.keyDownHandler),this.listen("click",this.clickHandler)}static{this.properties={hasImage:[16,{},{state:!0}],hasText:[16,{},{state:!0}],appearance:[3,{},{reflect:!0}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],closeOnDelete:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],icon:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],interactive:[5,{},{type:Boolean}],kind:[3,{},{reflect:!0}],label:1,messageOverrides:[0,{},{attribute:!1}],parentChipGroup:[0,{},{attribute:!1}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],selectionMode:1,value:1}}static{this.styles=C}async setFocus(e){return this.focusSetter(()=>{if(this.interactive)return this.containerRef.value;if(this.closable)return this.closeButtonRef.value},e)}async load(){this.updateHasText()}willUpdate(e){e.has("selected")&&this.hasUpdated&&this.watchSelected(this.selected)}loaded(){this.selectionMode!=="none"&&this.interactive&&this.selected&&this.handleSelectionPropertyChange(this.selected)}watchSelected(e){this.selectionMode!=="none"&&this.handleSelectionPropertyChange(e)}keyDownHandler(e){if(e.target===this.el)switch(e.key){case" ":case"Enter":this.handleEmittingEvent(),e.preventDefault();break;case"Backspace":case"Delete":this.closable&&!this.closed&&this.closeOnDelete&&(e.preventDefault(),this.close());break;case"ArrowRight":case"ArrowLeft":case"Home":case"End":this.calciteInternalChipKeyEvent.emit(e),e.preventDefault();break}}clickHandler(){!this.interactive&&this.closable&&g(this.closeButtonRef.value)}handleDefaultSlotChange(){this.updateHasText()}close(){this.calciteChipClose.emit(),this.selected=!1,this.closed=!0}closeButtonKeyDownHandler(e){f(e.key)&&(e.preventDefault(),this.close())}updateHasText(){this.hasText=this.el.textContent.trim().length>0}handleSlotImageChange(e){this.hasImage=m(e)}handleEmittingEvent(){this.interactive&&this.calciteChipSelect.emit()}handleSelectionPropertyChange(e){this.selectionMode==="single"&&this.calciteInternalSyncSelectedChips.emit(),!this.parentChipGroup?.selectedItems.includes(this.el)&&e&&this.selectionMode!=="multiple"&&this.calciteInternalChipSelect.emit(),this.selectionMode!=="single"&&this.calciteInternalSyncSelectedChips.emit()}renderChipImage(){return t`<div class=${i(c.imageContainer)}><slot name=${k.image} @slotchange=${this.handleSlotImageChange}></slot></div>`}renderSelectionIcon(){let e=this.selectionMode==="multiple"?this.selected?l.checkedMultiple:l.uncheckedMultiple:this.selected?l.checkedSingle:void 0;return t`<div class=${i({[c.selectIcon]:!0,[c.selectIconActive]:this.selectionMode==="multiple"||this.selected})}>${e?t`<calcite-icon .icon=${e} .scale=${s(this.scale)}></calcite-icon>`:null}</div>`}renderCloseButton(){return t`<calcite-action class=${i(c.close)} .icon=${l.close} @click=${this.close} @keydown=${this.closeButtonKeyDownHandler} .scale=${this.scale} .text=${this.messages.dismissLabel} ${r(this.closeButtonRef)}></calcite-action>`}renderIcon(){return t`<calcite-icon class=${i(c.chipIcon)} .flipRtl=${this.iconFlipRtl} .icon=${this.icon} .scale=${s(this.scale)}></calcite-icon>`}render(){let{disabled:e}=this,p=e||!e&&!this.interactive,y=this.selectionMode==="multiple"&&this.interactive?"checkbox":this.selectionMode!=="none"&&this.interactive?"radio":this.interactive?"button":this.closable?void 0:"img";return this.interactiveContainer({disabled:e,children:t`<div .ariaChecked=${this.selectionMode!=="none"&&this.interactive?this.selected:void 0} .ariaLabel=${this.label} class=${i({[c.container]:!0,[c.textSlotted]:this.hasText,[c.imageSlotted]:this.hasImage,[c.selectable]:this.selectionMode!=="none",[c.multiple]:this.selectionMode==="multiple",[c.single]:this.selectionMode==="single"||this.selectionMode==="single-persist",[c.selected]:this.selected,[c.closable]:this.closable,[c.nonInteractive]:!this.interactive,[c.isCircle]:!this.closable&&!this.hasText&&(!this.icon||!this.hasImage)&&(this.selectionMode==="none"||!!this.selectionMode&&this.selectionMode!=="multiple"&&!this.selected)})} @click=${this.handleEmittingEvent} .role=${y} .tabIndex=${p?-1:0} ${r(this.containerRef)}>${this.selectionMode!=="none"&&this.renderSelectionIcon()||""}${this.renderChipImage()}${this.icon&&this.renderIcon()||""}<span class=${i(c.title)}><slot @slotchange=${this.handleDefaultSlotChange}></slot></span>${this.closable&&this.renderCloseButton()||""}</div>`})}};v("calcite-chip",o);export{o as Chip};
2
+ import{a as c,b as k,c as l}from"./KRZT7UVD.js";import{a as x}from"./XGJWH7PU.js";import{a as f}from"./YP3AYJH3.js";import{a as b}from"./B4QYMPP5.js";import{a as u}from"./LNRCU5CV.js";import{a as s}from"./ZWPNZ5XW.js";import"./CSC2MWHL.js";import"./DWZH5S6A.js";import{k as g,s as m}from"./GOISJED7.js";import{E as n,F as r,G as d,H as i,S as v,g as h,h as t,p as a}from"./3CQ6JCVK.js";var C=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:inline-flex;cursor:default;border-radius:var(--calcite-chip-corner-radius, 9999px)}:host([closed]){display:none}:host([appearance=outline]) .container,:host([appearance=outline-fill]) .container{color:var(--calcite-chip-text-color, var(--calcite-color-text-1))}:host([appearance=outline]):host([kind=brand]),:host([appearance=outline-fill]):host([kind=brand]){--calcite-internal-chip-border-color: var(--calcite-chip-border-color, var(--calcite-color-brand));--calcite-internal-chip-selectable-hover-border-color: var(--calcite-chip-border-color, var(--calcite-color-brand));--calcite-internal-chip-selectable-active-border-color: var( --calcite-chip-border-color, var(--calcite-color-brand) )}:host([appearance=outline]):host([kind=inverse]),:host([appearance=outline-fill]):host([kind=inverse]){--calcite-internal-chip-border-color: var(--calcite-chip-border-color, var(--calcite-color-border-inverse))}:host([appearance=outline]):host([kind=neutral]),:host([appearance=outline-fill]):host([kind=neutral]){--calcite-internal-chip-border-color: var(--calcite-chip-border-color, var(--calcite-color-border-1))}:host([appearance=outline]){--calcite-internal-chip-background-color: transparent}:host([appearance=outline-fill]){--calcite-internal-chip-background-color: var(--calcite-chip-background-color, var(--calcite-color-foreground-1))}:host([appearance=solid]){--calcite-internal-chip-border-color: transparent;--calcite-internal-chip-selectable-hover-border-color: transparent;--calcite-internal-chip-selectable-active-border-color: transparent}:host([appearance=solid]):host([kind=brand]),:host([appearance=solid]):host([kind=inverse]){--calcite-internal-chip-close-background-color-hover: var(--calcite-color-transparent-inverse-hover);--calcite-internal-chip-close-background-color-press: var(--calcite-color-transparent-inverse-press);--calcite-internal-chip-close-icon-color: var(--calcite-color-text-inverse);--calcite-internal-chip-close-icon-color-hover: var(--calcite-color-text-inverse)}:host([appearance=solid]):host([kind=brand]) .container,:host([appearance=solid]):host([kind=inverse]) .container{color:var(--calcite-chip-text-color, var(--calcite-color-text-inverse))}:host([appearance=solid]):host([kind=brand]) .close,:host([appearance=solid]):host([kind=inverse]) .close{--calcite-color-focus: var(--calcite-color-text-inverse)}:host([appearance=solid]):host([kind=brand]){--calcite-internal-chip-background-color: var(--calcite-chip-background-color, var(--calcite-color-brand))}:host([appearance=solid]):host([kind=inverse]){--calcite-internal-chip-background-color: var(--calcite-chip-background-color, var(--calcite-color-inverse))}:host([appearance=solid]):host([kind=neutral]){--calcite-internal-chip-background-color: var(--calcite-chip-background-color, var(--calcite-color-foreground-2))}:host([kind=neutral]) .container{color:var(--calcite-chip-text-color, var(--calcite-color-text-1))}:host([selected]) .select-icon{opacity:1}:host([appearance=solid]):host([kind=neutral]){--calcite-internal-chip-selectable-hover-background-color: var(--calcite-color-foreground-3);--calcite-internal-chip-selectable-active-background-color: var(--calcite-color-border-2)}:host([appearance=solid]):host([kind=inverse]){--calcite-internal-chip-selectable-hover-background-color: var(--calcite-color-inverse-hover);--calcite-internal-chip-selectable-active-background-color: var(--calcite-color-inverse-press)}:host([appearance=solid]):host([kind=brand]){--calcite-internal-chip-selectable-hover-background-color: var(--calcite-color-brand-hover);--calcite-internal-chip-selectable-active-background-color: var(--calcite-color-brand-press)}:host([appearance=outline-fill]):host([kind=neutral]){--calcite-internal-chip-selectable-hover-background-color: var(--calcite-color-foreground-2);--calcite-internal-chip-selectable-hover-border-color: var(--calcite-color-border-input);--calcite-internal-chip-selectable-active-background-color: var(--calcite-color-foreground-3);--calcite-internal-chip-selectable-active-border-color: var(--calcite-color-text-3)}:host([appearance=outline-fill]):host([kind=inverse]),:host([appearance=outline-fill]):host([kind=brand]){--calcite-internal-chip-selectable-hover-background-color: var(--calcite-color-foreground-2);--calcite-internal-chip-selectable-active-background-color: var(--calcite-color-foreground-3)}:host([appearance=outline]):host([kind=neutral]){--calcite-internal-chip-selectable-hover-background-color: var(--calcite-color-transparent-hover);--calcite-internal-chip-selectable-hover-border-color: var(--calcite-color-border-input);--calcite-internal-chip-selectable-active-background-color: var(--calcite-color-transparent-press);--calcite-internal-chip-selectable-active-border-color: var(--calcite-color-text-3)}:host([appearance=outline]):host([kind=inverse]),:host([appearance=outline]):host([kind=brand]){--calcite-internal-chip-selectable-hover-background-color: var(--calcite-color-transparent-hover);--calcite-internal-chip-selectable-active-background-color: var(--calcite-color-transparent-press)}:host([scale=s]){--calcite-internal-chip-close-padding: var(--calcite-spacing-none)}:host([scale=s]) .container{--calcite-internal-chip-block-size: var(--calcite-size-sm, 1.5rem) ;--calcite-internal-chip-container-space-x-end: var(--calcite-spacing-xxs, .25rem) ;--calcite-internal-chip-container-space-x-start: var(--calcite-spacing-xxs, .25rem) ;--calcite-internal-chip-font-size: var(--calcite-font-size--2);--calcite-internal-chip-icon-size: var(--calcite-size-xs, 1rem) ;--calcite-internal-chip-icon-space: var(--calcite-spacing-xxs, .25rem) ;--calcite-internal-chip-image-size: var(--calcite-spacing-xl, 1.25rem) ;--calcite-internal-chip-title-space: var(--calcite-spacing-xxs, .25rem) ;--calcite-internal-close-size: var(--calcite-size-xs, 1rem) }:host([scale=s]) .container:not(.closable).is-circle{--calcite-internal-chip-container-space-x-start: var(--calcite-spacing-px);--calcite-internal-chip-container-space-x-end: var(--calcite-spacing-px)}:host([scale=s]) .container.image--slotted:has(.chip-icon),:host([scale=s]) .container.image--slotted.text--slotted,:host([scale=s]) .container.image--slotted.closable{--calcite-internal-chip-image-space-x-end: var(--calcite-spacing-xxs, .25rem) }:host([scale=s]) .container.image--slotted:not(.text--slotted,:has(.chip-icon)),:host([scale=s]) .container.image--slotted:not(.selectable){--calcite-internal-chip-container-space-x-start: var(--calcite-spacing-px)}:host([scale=s]) .container.selectable.single:not(.is-circle).image--slotted{--calcite-internal-chip-container-space-x-start: var(--calcite-spacing-px)}:host([scale=s]) .container.selectable.single:not(.is-circle).selected{--calcite-internal-chip-select-space-x-end: var(--calcite-spacing-xs, .375rem) ;--calcite-internal-chip-select-space-x-start: var(--calcite-spacing-none, 0)}:host([scale=s]) .container.selectable.single:not(.is-circle).selected.image--slotted{--calcite-internal-chip-select-space-x-end: .5rem ;--calcite-internal-chip-select-space-x-start: .125rem }:host([scale=s]) .container.multiple:not(.is-circle){--calcite-internal-chip-container-space-x-start: var(--calcite-spacing-xxs, .25rem) ;--calcite-internal-chip-select-space-x-end: var(--calcite-spacing-xxs, .25rem) ;--calcite-internal-chip-select-space-x-start: var(--calcite-spacing-xxs, .25rem) }:host([scale=s]) .container.multiple:not(.is-circle).image--slotted{--calcite-internal-chip-select-space-x-end: .5rem ;--calcite-internal-chip-select-space-x-start: var(--calcite-spacing-xs, .375rem) ;--calcite-internal-chip-container-space-x-start: var(--calcite-spacing-px)}:host([scale=s]) .container.multiple:not(.is-circle).image--slotted:not(.text--slotted){--calcite-internal-chip-select-space-x-start: var(--calcite-spacing-xs, .375rem) }:host([scale=m]){--calcite-internal-chip-close-padding: var(--calcite-spacing-xxs)}:host([scale=m]) .container{--calcite-internal-chip-block-size: var(--calcite-size-md, 2rem) ;--calcite-internal-chip-container-space-x-end: var(--calcite-spacing-xs, .375rem) ;--calcite-internal-chip-container-space-x-start: var(--calcite-spacing-xs, .375rem) ;--calcite-internal-chip-font-size: var(--calcite-font-size--1);--calcite-internal-chip-icon-size: var(--calcite-size-sm, 1.5rem) ;--calcite-internal-chip-icon-space: var(--calcite-spacing-xs, .375rem) ;--calcite-internal-chip-image-size: var(--calcite-size-sm, 1.5rem) ;--calcite-internal-chip-title-space: var(--calcite-spacing-xs, .375rem) ;--calcite-internal-close-size: var(--calcite-size-sm, 1.5rem) }:host([scale=m]) .container:not(.closable).is-circle{--calcite-internal-chip-container-space-x-end: var(--calcite-spacing-px);--calcite-internal-chip-container-space-x-start: var(--calcite-spacing-px)}:host([scale=m]) .container.image--slotted:not(.is-circle){--calcite-internal-chip-container-space-x-start: var(--calcite-spacing-xxs, .25rem) }:host([scale=m]) .container.image--slotted:has(.chip-icon),:host([scale=m]) .container.image--slotted.text--slotted,:host([scale=m]) .container.image--slotted.closable{--calcite-internal-chip-image-space-x-end: var(--calcite-spacing-xs, .375rem) }:host([scale=m]) .container.selectable.single:not(.is-circle).image--slotted{--calcite-internal-chip-container-space-x-start: var(--calcite-spacing-xxs, .25rem) }:host([scale=m]) .container.selectable.single:not(.is-circle).selected{--calcite-internal-chip-select-space-x-end: var(--calcite-spacing-px);--calcite-internal-chip-select-space-x-start: var(--calcite-spacing-none, 0)}:host([scale=m]) .container.selectable.single:not(.is-circle).selected.image--slotted{--calcite-internal-chip-select-space-x-end: var(--calcite-spacing-xxs, .25rem) ;--calcite-internal-chip-select-space-x-start: var(--calcite-spacing-xs, .375rem) }:host([scale=m]) .container.multiple:not(.is-circle){--calcite-internal-chip-select-space-x-end: .125rem ;--calcite-internal-chip-select-space-x-start: .125rem }:host([scale=m]) .container.multiple:not(.is-circle).image--slotted{--calcite-internal-chip-select-space-x-end: .5rem ;--calcite-internal-chip-select-space-x-start: var(--calcite-spacing-xxs, .25rem) }:host([scale=m]) .container.closable:not(.is-circle){--calcite-internal-chip-container-space-x-end: var(--calcite-spacing-xxs, .25rem) }:host([scale=l]){--calcite-internal-chip-close-padding: var(--calcite-spacing-xxs)}:host([scale=l]) .container{--calcite-internal-chip-block-size: 2.75rem ;--calcite-internal-chip-container-space-x-end: .5rem ;--calcite-internal-chip-container-space-x-start: .5rem ;--calcite-internal-chip-font-size: var(--calcite-font-size-0);--calcite-internal-chip-icon-size: var(--calcite-size-md, 2rem) ;--calcite-internal-chip-icon-space: .5rem ;--calcite-internal-chip-image-size: var(--calcite-size-md, 2rem) ;--calcite-internal-chip-title-space: .5rem ;--calcite-internal-close-size: var(--calcite-size-md, 2rem) }:host([scale=l]) .container:not(.closable).is-circle{--calcite-internal-chip-container-space-x-end: var(--calcite-spacing-xxs, .25rem) ;--calcite-internal-chip-container-space-x-start: var(--calcite-spacing-xxs, .25rem) }:host([scale=l]) .container.image--slotted:not(.is-circle){--calcite-internal-chip-container-space-x-start: var(--calcite-spacing-xs, .375rem) }:host([scale=l]) .container.image--slotted:has(.chip-icon),:host([scale=l]) .container.image--slotted.text--slotted,:host([scale=l]) .container.image--slotted.closable{--calcite-internal-chip-image-space-x-end: .5rem }:host([scale=l]) .container.selectable.single:not(.is-circle).image--slotted{--calcite-internal-chip-container-space-x-start: var(--calcite-spacing-xs, .375rem) }:host([scale=l]) .container.selectable.single:not(.is-circle).selected{--calcite-internal-chip-select-space-x-end: var(--calcite-spacing-xxs, .25rem) ;--calcite-internal-chip-select-space-x-start: var(--calcite-spacing-none, 0)}:host([scale=l]) .container.selectable.single:not(.is-circle).selected.image--slotted{--calcite-internal-chip-select-space-x-end: var(--calcite-spacing-xs, .375rem) ;--calcite-internal-chip-select-space-x-start: .5rem }:host([scale=l]) .container.multiple:not(.is-circle){--calcite-internal-chip-container-space-x-start: .5rem ;--calcite-internal-chip-select-space-x-end: var(--calcite-spacing-xxs, .25rem) ;--calcite-internal-chip-select-space-x-start: var(--calcite-spacing-xxs, .25rem) }:host([scale=l]) .container.multiple:not(.is-circle).image--slotted{--calcite-internal-chip-select-space-x-end: .75rem }:host([scale=l]) .container.closable:not(.is-circle){--calcite-internal-chip-container-space-x-end: var(--calcite-spacing-xs, .375rem) }.container{box-sizing:border-box;display:inline-flex;block-size:100%;max-inline-size:100%;align-items:center;justify-content:center;font-weight:var(--calcite-font-weight-medium);outline-color:transparent;background-color:var(--calcite-internal-chip-background-color);border-color:var(--calcite-internal-chip-border-color);border-radius:var(--calcite-chip-corner-radius, 9999px);border-width:var(--calcite-border-width-sm);border-style:solid;font-size:var(--calcite-internal-chip-font-size, var(--calcite-font-size));padding-inline-start:var(--calcite-internal-chip-container-space-x-start);padding-inline-end:var(--calcite-internal-chip-container-space-x-end);block-size:var(--calcite-internal-chip-block-size, auto);inline-size:var(--calcite-internal-chip-inline-size, auto);min-inline-size:var(--calcite-internal-chip-block-size, auto)}.container:hover .select-icon--active{opacity:var(--calcite-opacity-full, 1)}.container.selectable{cursor:pointer}.container.selectable:hover{background-color:var(--calcite-internal-chip-selectable-hover-background-color);border-color:var(--calcite-internal-chip-selectable-hover-border-color)}.container.selectable:active{background-color:var(--calcite-internal-chip-selectable-active-background-color);border-color:var(--calcite-internal-chip-selectable-active-border-color)}.container:not(.non-interactive):focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.container.text--slotted .title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.container:not(.text--slotted) .title,.container:not(.image--slotted) .image-container{display:none}.container.is-circle .chip-icon,.container.is-circle .image-container{padding:var(--calcite-spacing-none, 0)}.title{padding-inline:var(--calcite-internal-chip-title-space)}.image-container{display:inline-flex;overflow:hidden;align-items:center;justify-content:center;pointer-events:none;block-size:var(--calcite-internal-chip-image-size, var(--calcite-spacing-xxl, 1.5rem));inline-size:var(--calcite-internal-chip-image-size, var(--calcite-spacing-xxl, 1.5rem));padding-inline-start:var(--calcite-spacing-none, 0);padding-inline-end:var(--calcite-internal-chip-image-space-x-end, 0)}.chip-icon{position:relative;margin-block:0px;display:inline-flex;transition-timing-function:cubic-bezier(.4,0,.2,1);color:var(--calcite-chip-icon-color, var(--calcite-chip-text-color, var(--calcite-icon-color, var(--calcite-ui-icon-color, currentColor))));padding-inline:var(--calcite-internal-chip-icon-space, var(--calcite-spacing-xs, .375rem))}.select-icon{align-self:center;justify-content:center;align-items:center;display:flex;inset-block-start:-1px;position:absolute;visibility:hidden;inline-size:auto;opacity:0;transition:opacity .15s ease-in-out,inline-size .15s ease-in-out;color:var(--calcite-chip-select-icon-color, currentColor)}.select-icon.select-icon--active{position:relative;visibility:visible;opacity:var(--calcite-opacity-half, .5);color:var(--calcite-chip-select-icon-color-press, var(--calcite-chip-select-icon-color-pressed, var(--calcite-chip-select-icon-color, currentColor)))}.multiple .select-icon{display:flex;align-items:center;justify-content:center}.multiple .select-icon,.single .select-icon--active{padding-inline-start:var(--calcite-internal-chip-select-space-x-start);padding-inline-end:var(--calcite-internal-chip-select-space-x-end);block-size:var(--calcite-internal-chip-icon-size, var(--calcite-spacing-xxl, 1.5rem));inline-size:var(--calcite-internal-chip-icon-size, var(--calcite-spacing-xxl, 1.5rem))}.close{--calcite-action-background-color-hover: var(--calcite-internal-chip-close-background-color-hover);--calcite-action-background-color-press: var(--calcite-internal-chip-close-background-color-press);--calcite-action-corner-radius: var(--calcite-corner-radius-pill);--calcite-action-text-color: var( --calcite-chip-close-icon-color, var(--calcite-close-icon-color, var(--calcite-internal-chip-close-icon-color)) );--calcite-action-text-color-press: var( --calcite-chip-close-icon-color, var(--calcite-close-icon-color, var(--calcite-internal-chip-close-icon-color-hover)) );--calcite-icon-color: var(--calcite-action-text-color);--calcite-internal-action-min-height: unset;--calcite-internal-action-spacing: var(--calcite-internal-chip-close-padding)}slot[name=image]::slotted(*){display:flex;block-size:100%;inline-size:100%;overflow:hidden;border-radius:50%}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,o=class extends d{constructor(){super(),this.closeButtonRef=n(),this.containerRef=n(),this.messages=b({blocking:!0}),this.focusSetter=u()(this),this.interactiveContainer=x(this),this.hasImage=!1,this.hasText=!1,this.appearance="solid",this.closable=!1,this.closed=!1,this.closeOnDelete=!1,this.disabled=!1,this.iconFlipRtl=!1,this.interactive=!1,this.kind="neutral",this.scale="m",this.selected=!1,this.selectionMode="none",this.calciteChipClose=a({cancelable:!1}),this.calciteChipSelect=a({cancelable:!1}),this.calciteInternalChipKeyEvent=a({cancelable:!1}),this.calciteInternalChipSelect=a({cancelable:!1}),this.calciteInternalSyncSelectedChips=a({cancelable:!1}),this.listen("keydown",this.keyDownHandler),this.listen("click",this.clickHandler)}static{this.properties={hasImage:[16,{},{state:!0}],hasText:[16,{},{state:!0}],appearance:[3,{},{reflect:!0}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],closeOnDelete:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],icon:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],interactive:[5,{},{type:Boolean}],kind:[3,{},{reflect:!0}],label:1,messageOverrides:[0,{},{attribute:!1}],parentChipGroup:[0,{},{attribute:!1}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],selectionMode:1,value:1}}static{this.styles=C}async setFocus(e){return this.focusSetter(()=>{if(this.interactive)return this.containerRef.value;if(this.closable)return this.closeButtonRef.value},e)}async load(){this.updateHasText()}willUpdate(e){e.has("selected")&&this.hasUpdated&&this.watchSelected(this.selected)}loaded(){this.selectionMode!=="none"&&this.interactive&&this.selected&&this.handleSelectionPropertyChange(this.selected)}watchSelected(e){this.selectionMode!=="none"&&this.handleSelectionPropertyChange(e)}keyDownHandler(e){if(e.target===this.el)switch(e.key){case" ":case"Enter":this.handleEmittingEvent(),e.preventDefault();break;case"Backspace":case"Delete":this.closable&&!this.closed&&this.closeOnDelete&&(e.preventDefault(),this.close());break;case"ArrowRight":case"ArrowLeft":case"Home":case"End":this.calciteInternalChipKeyEvent.emit(e),e.preventDefault();break}}clickHandler(){!this.interactive&&this.closable&&g(this.closeButtonRef.value)}handleDefaultSlotChange(){this.updateHasText()}close(){this.calciteChipClose.emit(),this.selected=!1,this.closed=!0}closeButtonKeyDownHandler(e){f(e.key)&&(e.preventDefault(),this.close())}updateHasText(){this.hasText=this.el.textContent.trim().length>0}handleSlotImageChange(e){this.hasImage=m(e)}handleEmittingEvent(){this.interactive&&this.calciteChipSelect.emit()}handleSelectionPropertyChange(e){this.selectionMode==="single"&&this.calciteInternalSyncSelectedChips.emit(),!this.parentChipGroup?.selectedItems.includes(this.el)&&e&&this.selectionMode!=="multiple"&&this.calciteInternalChipSelect.emit(),this.selectionMode!=="single"&&this.calciteInternalSyncSelectedChips.emit()}renderChipImage(){return t`<div class=${i(c.imageContainer)}><slot name=${k.image} @slotchange=${this.handleSlotImageChange}></slot></div>`}renderSelectionIcon(){let e=this.selectionMode==="multiple"?this.selected?l.checkedMultiple:l.uncheckedMultiple:this.selected?l.checkedSingle:void 0;return t`<div class=${i({[c.selectIcon]:!0,[c.selectIconActive]:this.selectionMode==="multiple"||this.selected})}>${e?t`<calcite-icon .icon=${e} .scale=${s(this.scale)}></calcite-icon>`:null}</div>`}renderCloseButton(){return t`<calcite-action class=${i(c.close)} .icon=${l.close} @click=${this.close} @keydown=${this.closeButtonKeyDownHandler} .scale=${this.scale} .text=${this.messages.dismissLabel} ${r(this.closeButtonRef)}></calcite-action>`}renderIcon(){return t`<calcite-icon class=${i(c.chipIcon)} .flipRtl=${this.iconFlipRtl} .icon=${this.icon} .scale=${s(this.scale)}></calcite-icon>`}render(){let{disabled:e}=this,p=e||!e&&!this.interactive,y=this.selectionMode==="multiple"&&this.interactive?"checkbox":this.selectionMode!=="none"&&this.interactive?"radio":this.interactive?"button":this.closable?void 0:"img";return this.interactiveContainer({disabled:e,children:t`<div .ariaChecked=${this.selectionMode!=="none"&&this.interactive?this.selected:void 0} .ariaLabel=${this.label} class=${i({[c.container]:!0,[c.textSlotted]:this.hasText,[c.imageSlotted]:this.hasImage,[c.selectable]:this.selectionMode!=="none",[c.multiple]:this.selectionMode==="multiple",[c.single]:this.selectionMode==="single"||this.selectionMode==="single-persist",[c.selected]:this.selected,[c.closable]:this.closable,[c.nonInteractive]:!this.interactive,[c.isCircle]:!this.closable&&!this.hasText&&(!this.icon||!this.hasImage)&&(this.selectionMode==="none"||!!this.selectionMode&&this.selectionMode!=="multiple"&&!this.selected)})} @click=${this.handleEmittingEvent} .role=${y} .tabIndex=${p?-1:0} ${r(this.containerRef)}>${this.selectionMode!=="none"&&this.renderSelectionIcon()||""}${this.renderChipImage()}${this.icon&&this.renderIcon()||""}<span class=${i(c.title)}><slot @slotchange=${this.handleDefaultSlotChange}></slot></span>${this.closable&&this.renderCloseButton()||""}</div>`})}};v("calcite-chip",o);export{o as Chip};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{j as m}from"./CNNLMIH2.js";import"./YP3AYJH3.js";import{a as O}from"./VI7SBYXT.js";import{a as P}from"./JDJW7IOG.js";import{b as f}from"./ZWPNZ5XW.js";import"./FLHFZN4H.js";import"./YFCK7FOA.js";import{E as b,F as h,G as T,H as c,S as A,g as z,h as n,l as x,m as k,p as u}from"./DBYBKXUC.js";function N(){return navigator.userAgentData}function D(){if(!1)return"";let g=N();return g?.brands?g.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(" "):navigator.userAgent}var l={bordered:"bordered",striped:"striped",selectionArea:"selection-area",paginationArea:"pagination-area",container:"container",tableContainer:"table-container",tableContainerOverflow:"table-container--overflow",tableFixed:"table--fixed",assistiveText:"assistive-text",selectionActions:"selection-actions",dismissButton:"dismiss-button",selectionChipActive:"selection-chip--active",selectionCountChip:"selection-chip",selectionOutOfViewChip:"selection-chip--out-of-view"},w={selectionActions:"selection-actions",tableHeader:"table-header",tableFooter:"table-footer"},H={hideEmpty:"hide-empty",clear:"x"},V=z`@charset "UTF-8";:host{display:flex;--calcite-internal-table-border-collapse: collapse}:host([scale=s]){--calcite-internal-table-cell-padding: .25rem;--calcite-internal-table-cell-font-size: var(--calcite-font-size--2);--calcite-internal-table-cell-font-size-secondary: var(--calcite-font-size--3)}:host([scale=m]){--calcite-internal-table-cell-padding: .5rem;--calcite-internal-table-cell-font-size: var(--calcite-font-size--1);--calcite-internal-table-cell-font-size-secondary: var(--calcite-font-size--2)}:host(:is([scale=s],[scale=m])){--calcite-internal-table-selection-action-spacing: var(--calcite-spacing-xxs)}:host([scale=l]){--calcite-internal-table-selection-action-spacing: var(--calcite-spacing-xs);--calcite-internal-table-cell-padding: 1rem;--calcite-internal-table-cell-font-size: var(--calcite-font-size-0);--calcite-internal-table-cell-font-size-secondary: var(--calcite-font-size--1)}:host([sticky-header]){--calcite-internal-table-border-collapse: separate;--calcite-internal-table-header-border-block-end-width: 0;--calcite-internal-table-sticky-header-border-shadow: inset 0 calc(-1 * var(--calcite-border-width-sm)) 0 0 var(--calcite-table-header-border-color, var(--calcite-table-border-color, var(--calcite-color-border-2)))}:host([sticky-header]) .table-container{position:relative}.container{display:flex;flex-direction:column;inline-size:var(--calcite-container-size-content-fluid);block-size:var(--calcite-container-size-content-fluid)}.table-container{white-space:nowrap;line-height:var(--calcite-font-line-height-relative-tight);border:var(--calcite-border-width-sm) solid var(--calcite-table-border-color, var(--calcite-color-border-2));border-radius:var(--calcite-table-corner-radius, var(--calcite-corner-radius-sharp));box-shadow:var(--calcite-table-shadow, var(--calcite-shadow-none));overflow:auto}.table-container--overflow{overscroll-behavior-y:none}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}table{border-collapse:var(--calcite-internal-table-border-collapse);border-spacing:0;inline-size:var(--calcite-container-size-content-fluid)}@-moz-document url-prefix(){table{border-collapse:separate;border-spacing:0}}.table--fixed{table-layout:fixed}.bordered ::slotted(calcite-table-row){--calcite-table-row-border-color: var(--calcite-table-border-color, var(--calcite-color-border-2))}.striped ::slotted(calcite-table-row:nth-child(2n+1)){--calcite-table-row-background-color: var( --calcite-table-row-background-color-striped, var(--calcite-color-foreground-2) )}.selection-actions{display:flex;flex-direction:row;gap:var(--calcite-internal-table-selection-action-spacing);margin-inline-start:auto}.selection-area{display:flex;flex-direction:row;align-items:center;padding-block:var(--calcite-internal-table-cell-padding)}.selection-area calcite-chip:last-of-type{margin-inline-end:.5rem}.selection-area calcite-chip:last-of-type:not(:first-of-type){margin-inline-start:.5rem}.selection-area calcite-button{margin-inline-end:1rem}.selection-chip{--calcite-chip-background-color: var(--calcite-table-selection-chip-background-color);--calcite-chip-border-color: var(--calcite-table-selection-chip-border-color);--calcite-chip-corner-radius: var(--calcite-table-selection-chip-corner-radius);--calcite-chip-shadow: var(--calcite-table-selection-chip-shadow);--calcite-chip-text-color: var(--calcite-table-selection-chip-text-color)}.selection-chip.selection-chip--active{--calcite-chip-background-color: var(--calcite-table-selection-chip-background-color-selected);--calcite-chip-border-color: var(--calcite-table-selection-chip-border-color-selected);--calcite-chip-text-color: var(--calcite-table-selection-chip-text-color-selected)}.selection-chip--out-of-view{--calcite-chip-background-color: var(--calcite-table-selection-out-of-view-chip-background-color);--calcite-chip-border-color: var(--calcite-table-selection-out-of-view-chip-border-color);--calcite-chip-corner-radius: var(--calcite-table-selection-out-of-view-chip-corner-radius);--calcite-chip-shadow: var(--calcite-table-selection-out-of-view-chip-shadow);--calcite-chip-text-color: var(--calcite-table-selection-out-of-view-chip-text-color);--calcite-chip-icon-color: var(--calcite-table-selection-out-of-view-chip-icon-color)}.pagination-area{display:flex;inline-size:100%;flex-direction:row;justify-content:center;padding-block:var(--calcite-internal-table-cell-padding)}calcite-pagination{flex:1;justify-content:center;--calcite-pagination-color: var(--calcite-table-pagination-color);--calcite-pagination-color-hover: var(--calcite-table-pagination-color-hover);--calcite-pagination-color-border-hover: var(--calcite-table-pagination-color-border-hover);--calcite-pagination-color-border-active: var(--calcite-table-pagination-color-border-active);--calcite-pagination-background-color: var(--calcite-table-pagination-background-color);--calcite-pagination-icon-color-background-hover: var(--calcite-table-pagination-icon-color-background-hover)}.dismiss-button{margin-inline-end:1rem;--calcite-button-background-color: var(--calcite-table-selection-dismiss-button-background-color);--calcite-button-border-color: var(--calcite-table-selection-dismiss-button-border-color);--calcite-button-corner-radius: var(--calcite-table-selection-dismiss-button-corner-radius);--calcite-button-shadow: var(--calcite-table-selection-dismiss-button-shadow);--calcite-button-text-color: var(--calcite-table-selection-dismiss-button-text-color)}.dismiss-button:hover{--calcite-button-background-color: var(--calcite-table-selection-dismiss-button-background-color-hover);--calcite-button-border-color: var(--calcite-table-selection-dismiss-button-border-color-hover);--calcite-button-text-color: var(--calcite-table-selection-dismiss-button-text-color-hover)}.dismiss-button:active{--calcite-button-background-color: var(--calcite-table-selection-dismiss-button-background-color-active);--calcite-button-border-color: var(--calcite-table-selection-dismiss-button-border-color-active);--calcite-button-text-color: var(--calcite-table-selection-dismiss-button-text-color-active)}:host([hidden]){display:none}[hidden]{display:none}`,y=class extends T{constructor(){super(),this.allRows=[],this.bodyRows=[],this.footRows=[],this.headRows=[],this.paginationRef=b(),this.tableContainerRef=b(),this.tableEl=null,this.tableBodySlotRef=b(),this.tableFootSlotRef=b(),this.tableHeadSlotRef=b(),this.tableContainerOverflowAnimationFrame=null,this.tableContainerResizeObserver=O("resize",()=>this.scheduleTableContainerOverflowUpdate()),this.messages=P({blocking:!0}),this.colCount=0,this.pageStartRow=1,this.readCellContentsToAT=!1,this.selectedCount=0,this.tableContainerHasOverflow=!1,this._selectedItems=[],this.bordered=!1,this.currentPage=0,this.groupSeparator=!1,this.interactionMode="interactive",this.layout="auto",this.numbered=!1,this.pageSize=0,this.scale="m",this.selectionDisplay="top",this.selectionMode="none",this.striped=!1,this.stickyHeader=!1,this.calciteInternalTableRowFocusChange=u({cancelable:!1}),this.calciteTablePageChange=u({cancelable:!1}),this.calciteTableSelect=u({cancelable:!1}),this.listen("calciteTableRowSelect",this.calciteTableRowSelectListener),this.listen("calciteInternalTableRowSelect",this.calciteInternalTableRowSelectListener),this.listen("calciteInternalTableRowFocusRequest",this.calciteInternalTableRowFocusEvent)}static{this.properties={colCount:[16,{},{state:!0}],pageStartRow:[16,{},{state:!0}],readCellContentsToAT:[16,{},{state:!0}],selectedCount:[16,{},{state:!0}],tableContainerHasOverflow:[16,{},{state:!0}],_selectedItems:[16,{},{state:!0}],bordered:[7,{},{reflect:!0,type:Boolean}],caption:1,currentPage:[11,{},{reflect:!0,type:Number}],groupSeparator:[7,{},{reflect:!0,type:Boolean}],interactionMode:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],numbered:[7,{},{reflect:!0,type:Boolean}],numberingSystem:[3,{},{reflect:!0}],pageSize:[11,{},{reflect:!0,type:Number}],scale:[3,{},{reflect:!0}],selectedItems:[32,{},{attribute:!1,readOnly:!0}],selectionDisplay:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],striped:[7,{},{reflect:!0,type:Boolean}],stickyHeader:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=V}get selectedItems(){return this._selectedItems}async load(){this.readCellContentsToAT=/safari/i.test(D()),this.listenOn(this.el.shadowRoot,"slotchange",this.handleSlotChange)}disconnectedCallback(){super.disconnectedCallback(),this.tableContainerOverflowAnimationFrame!==null&&(cancelAnimationFrame(this.tableContainerOverflowAnimationFrame),this.tableContainerOverflowAnimationFrame=null),this.tableContainerResizeObserver?.disconnect()}willUpdate(e){(e.has("groupSeparator")&&(this.hasUpdated||this.groupSeparator!==!1)||e.has("interactionMode")&&(this.hasUpdated||this.interactionMode!=="interactive")||e.has("numbered")&&(this.hasUpdated||this.numbered!==!1)||e.has("numberingSystem")||e.has("pageSize")&&(this.hasUpdated||this.pageSize!==0)||e.has("scale")&&(this.hasUpdated||this.scale!=="m")||e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="none")||e.has("currentPage")&&(this.hasUpdated||this.currentPage>1)&&this.pageSize>0)&&this.updateRows(),e.has("stickyHeader")&&(this.hasUpdated||this.stickyHeader!==!1)&&(this.allRows?.forEach(t=>{t.stickyHeaderEnabled=this.stickyHeader}),this.stickyHeader?this.applyHeaderRowPositionStyles():this.resetStickyHeaderState())}handleSlotChange(){this.updateRows()}clearStickyHeaderRowStyles(){this.headRows?.forEach(e=>{e.style.removeProperty("--calcite-internal-table-header-offset"),e.style.removeProperty("--calcite-internal-table-header-z-index"),e.style.removeProperty("--calcite-internal-table-header-row-position")})}resetStickyHeaderState(){this.clearStickyHeaderRowStyles()}calciteTableRowSelectListener(e){e.composedPath().includes(this.el)&&this.setSelectedItems(e.target)}calciteInternalTableRowSelectListener(e){e.composedPath().includes(this.el)&&(this.updateSelectedItems(!1),e.stopPropagation())}calciteInternalTableRowFocusEvent(e){let t=e.detail.cellPosition,a=e.detail.rowPosition,o=e.detail.destination,r=e.detail.lastCell,i=this.bodyRows?.filter(p=>!f(p)),s=this.allRows?.filter(p=>!f(p)),R=this.headRows[this.headRows.length-1]?.positionAll,S=i[0]?.positionAll,C=i[i.length-1]?.positionAll,$=this.footRows[0]?.positionAll,F=s[s.length-1]?.positionAll,I=o==="next"&&a===R,E=o==="previous"&&a===$,M=o==="previous"&&a===S,B=o==="next"&&a===C,d;switch(o){case"first":d=0;break;case"last":d=F;break;case"next":d=I?S:B?$:a+1;break;case"previous":d=E?C:M?R:a-1;break}let v=this.allRows.find(p=>p.positionAll===d)?.cellCount,U=v&&t>v?v:t;d!==void 0&&this.calciteInternalTableRowFocusChange.emit({cellPosition:U,rowPosition:d,destination:o,lastCell:r})}getSlottedRows(e){return e?e.assignedElements({flatten:!0}).filter(t=>t.matches("calcite-table-row")):[]}observeTableContainer(){this.tableContainerResizeObserver?.disconnect();let e=this.tableContainerRef.value,t=this.tableEl;e&&this.tableContainerResizeObserver?.observe(e),t&&this.tableContainerResizeObserver?.observe(t)}scheduleTableContainerOverflowUpdate(){this.tableContainerOverflowAnimationFrame!==null&&cancelAnimationFrame(this.tableContainerOverflowAnimationFrame),this.tableContainerOverflowAnimationFrame=requestAnimationFrame(()=>{this.tableContainerOverflowAnimationFrame=null,this.updateTableContainerOverflow()})}applyHeaderRowPositionStyles(){this.clearStickyHeaderRowStyles();let e=this.headRows?.[0];e&&(e.style.setProperty("--calcite-internal-table-header-offset","0"),e.style.setProperty("--calcite-internal-table-header-z-index","2"),e.style.setProperty("--calcite-internal-table-header-row-position",this.stickyHeader?"sticky":"static"))}updateTableContainerOverflow(){let e=this.tableContainerRef.value;this.tableContainerHasOverflow=!!e&&(e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth)}updateRows(){let e=this.getSlottedRows(this.tableHeadSlotRef.value),t=this.getSlottedRows(this.tableBodySlotRef.value),a=this.getSlottedRows(this.tableFootSlotRef.value),o=[...e,...t,...a];e.forEach(i=>{let s=e.indexOf(i);i.rowType="head",i.positionSection=s,i.positionSectionLocalized=this.localizeNumber((s+1).toString())}),t.forEach(i=>{let s=t.indexOf(i);i.rowType="body",i.positionSection=s,i.positionSectionLocalized=this.localizeNumber((s+1).toString())}),a.forEach(i=>{let s=a.indexOf(i);i.rowType="foot",i.positionSection=s,i.positionSectionLocalized=this.localizeNumber((s+1).toString())}),o.forEach(i=>{i.interactionMode=this.interactionMode,i.selectionMode=this.selectionMode,i.bodyRowCount=t?.length,i.positionAll=o?.indexOf(i),i.numbered=this.numbered,i.scale=this.scale,i.readCellContentsToAT=this.readCellContentsToAT,i.lastVisibleRow=o?.indexOf(i)===o.length-1});let r=e[0]?.cellCount||0;this.colCount=r,this.headRows=e,this.bodyRows=t,this.footRows=a,this.allRows=o,this.applyHeaderRowPositionStyles(),this.observeTableContainer(),this.scheduleTableContainerOverflowUpdate(),this.handleCurrentPageRange(),this.updateSelectedItems()}handleCurrentPageRange(){let e=this.currentPage,t=this.bodyRows?.length||0,a=this.pageSize>0?Math.ceil(t/this.pageSize):1;if(a>0){let o=Math.min(Math.max(e,1),a);this.currentPage=o,this.pageStartRow=(o-1)*this.pageSize+1}this.paginateRows()}handlePaginationChange(){let e=this.paginationRef.value?.startItem;this.pageStartRow=e||1,this.currentPage=Math.ceil(this.pageStartRow/this.pageSize),this.calciteTablePageChange.emit(),this.updateRows()}paginateRows(){this.bodyRows?.forEach(e=>{let t=e.positionSection+1,a=t>=this.pageStartRow&&t<this.pageStartRow+this.pageSize;e.itemHidden=this.pageSize>0&&!a&&!this.footRows.includes(e),e.lastVisibleRow=t===this.pageStartRow+this.pageSize-1||t===this.bodyRows.length})}async updateSelectedItems(e){let t=this.bodyRows?.filter(a=>a.selected);this._selectedItems=t,this.selectedCount=t?.length,this.allRows?.forEach(a=>{a.selectedRowCount=this.selectedCount,a.selectedRowCountLocalized=this.localizeNumber(this.selectedCount)}),e&&this.calciteTableSelect.emit()}handleDeselectAllRows(){this.bodyRows?.forEach(e=>{e.selected=!1}),this.updateSelectedItems(!0)}setSelectedItems(e){this.bodyRows?.forEach(t=>{e?.rowType==="head"?t.selected=this.selectedCount!==this.bodyRows?.length:t.selected=this.selectionMode==="multiple"||e===t?t.selected:!1}),this.updateSelectedItems(!0)}localizeNumber(e){return m.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},m.localize(e.toString())}renderSelectionArea(){let e=this._selectedItems?.filter(i=>f(i))?.length,t=this.localizeNumber(e?.toString()),o=`${this.localizeNumber(this.selectedCount?.toString())} ${this.messages.selected}`,r=`${t} ${this.messages.hiddenSelected}`;return n`<div class=${c(l.selectionArea)}><calcite-chip class=${c({[l.selectionCountChip]:!0,[l.selectionChipActive]:this.selectedCount>0})} .kind=${this.selectedCount>0?"brand":"neutral"} .label=${o} .scale=${this.scale} .value=${o}>${o}</calcite-chip>${e>0&&n`<calcite-chip class=${c(l.selectionOutOfViewChip)} .icon=${H.hideEmpty} .label=${r} .scale=${this.scale} title=${r??x} .value=${r}>${t}</calcite-chip>`||""}${this.selectedCount>0&&n`<calcite-button class=${c(l.dismissButton)} .iconStart=${H.clear} kind=neutral @click=${this.handleDeselectAllRows} round .scale=${this.scale} .title=${`${this.messages.clear} ${o} ${this.messages.row}`}>${this.messages.clear}</calcite-button>`||""}<div class=${c(l.selectionActions)}><slot name=${w.selectionActions}></slot></div></div>`}renderPaginationArea(){return n`<div class=${c(l.paginationArea)}><calcite-pagination .groupSeparator=${this.groupSeparator} .numberingSystem=${this.numberingSystem} @calcitePaginationChange=${this.handlePaginationChange} .pageSize=${this.pageSize} .scale=${this.scale} .startItem=${this.pageStartRow} .totalItems=${this.bodyRows?.length} ${h(this.paginationRef)}></calcite-pagination></div>`}renderTHead(){return n`<thead><slot name=${w.tableHeader} ${h(this.tableHeadSlotRef)}></slot></thead>`}renderTBody(){return n`<tbody><slot ${h(this.tableBodySlotRef)}></slot></tbody>`}renderTFoot(){return n`<tfoot><slot name=${w.tableFooter} ${h(this.tableFootSlotRef)}></slot></tfoot>`}render(){return n`<div class=${c(l.container)}>${this.selectionMode!=="none"&&this.selectionDisplay!=="none"&&this.renderSelectionArea()||""}<div class=${c({[l.bordered]:this.bordered,[l.striped]:this.striped,[l.tableContainer]:!0,[l.tableContainerOverflow]:this.tableContainerHasOverflow})} ${h(this.tableContainerRef)}><table .ariaColCount=${this.colCount} .ariaMultiSelectable=${this.selectionMode==="multiple"?"true":void 0} .ariaRowCount=${this.allRows?.length} class=${c({[l.tableFixed]:this.layout==="fixed"})} .role=${this.interactionMode==="interactive"?"grid":"table"} ${h(e=>{e&&(this.tableEl=e,k(n`<caption class=${c(l.assistiveText)}>${this.caption}</caption>${this.renderTHead()}${this.renderTBody()}${this.renderTFoot()}`,e))})}></table></div>${this.pageSize>0&&this.renderPaginationArea()||""}</div>`}};A("calcite-table",y);export{y as Table};
2
+ import{j as m}from"./D2MAHJVD.js";import"./YP3AYJH3.js";import{a as O}from"./VI7SBYXT.js";import{a as P}from"./B4QYMPP5.js";import{b as f}from"./ZWPNZ5XW.js";import"./CSC2MWHL.js";import"./DWZH5S6A.js";import{E as b,F as h,G as T,H as c,S as A,g as z,h as n,l as x,m as k,p as u}from"./3CQ6JCVK.js";function N(){return navigator.userAgentData}function D(){if(!1)return"";let g=N();return g?.brands?g.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(" "):navigator.userAgent}var l={bordered:"bordered",striped:"striped",selectionArea:"selection-area",paginationArea:"pagination-area",container:"container",tableContainer:"table-container",tableContainerOverflow:"table-container--overflow",tableFixed:"table--fixed",assistiveText:"assistive-text",selectionActions:"selection-actions",dismissButton:"dismiss-button",selectionChipActive:"selection-chip--active",selectionCountChip:"selection-chip",selectionOutOfViewChip:"selection-chip--out-of-view"},w={selectionActions:"selection-actions",tableHeader:"table-header",tableFooter:"table-footer"},H={hideEmpty:"hide-empty",clear:"x"},V=z`@charset "UTF-8";:host{display:flex;--calcite-internal-table-border-collapse: collapse}:host([scale=s]){--calcite-internal-table-cell-padding: .25rem;--calcite-internal-table-cell-font-size: var(--calcite-font-size--2);--calcite-internal-table-cell-font-size-secondary: var(--calcite-font-size--3)}:host([scale=m]){--calcite-internal-table-cell-padding: .5rem;--calcite-internal-table-cell-font-size: var(--calcite-font-size--1);--calcite-internal-table-cell-font-size-secondary: var(--calcite-font-size--2)}:host(:is([scale=s],[scale=m])){--calcite-internal-table-selection-action-spacing: var(--calcite-spacing-xxs)}:host([scale=l]){--calcite-internal-table-selection-action-spacing: var(--calcite-spacing-xs);--calcite-internal-table-cell-padding: 1rem;--calcite-internal-table-cell-font-size: var(--calcite-font-size-0);--calcite-internal-table-cell-font-size-secondary: var(--calcite-font-size--1)}:host([sticky-header]){--calcite-internal-table-border-collapse: separate;--calcite-internal-table-header-border-block-end-width: 0;--calcite-internal-table-sticky-header-border-shadow: inset 0 calc(-1 * var(--calcite-border-width-sm)) 0 0 var(--calcite-table-header-border-color, var(--calcite-table-border-color, var(--calcite-color-border-2)))}:host([sticky-header]) .table-container{position:relative}.container{display:flex;flex-direction:column;inline-size:var(--calcite-container-size-content-fluid);block-size:var(--calcite-container-size-content-fluid)}.table-container{white-space:nowrap;line-height:var(--calcite-font-line-height-relative-tight);border:var(--calcite-border-width-sm) solid var(--calcite-table-border-color, var(--calcite-color-border-2));border-radius:var(--calcite-table-corner-radius, var(--calcite-corner-radius-sharp));box-shadow:var(--calcite-table-shadow, var(--calcite-shadow-none));overflow:auto}.table-container--overflow{overscroll-behavior-y:none}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}table{border-collapse:var(--calcite-internal-table-border-collapse);border-spacing:0;inline-size:var(--calcite-container-size-content-fluid)}@-moz-document url-prefix(){table{border-collapse:separate;border-spacing:0}}.table--fixed{table-layout:fixed}.bordered ::slotted(calcite-table-row){--calcite-table-row-border-color: var(--calcite-table-border-color, var(--calcite-color-border-2))}.striped ::slotted(calcite-table-row:nth-child(2n+1)){--calcite-table-row-background-color: var( --calcite-table-row-background-color-striped, var(--calcite-color-foreground-2) )}.selection-actions{display:flex;flex-direction:row;gap:var(--calcite-internal-table-selection-action-spacing);margin-inline-start:auto}.selection-area{display:flex;flex-direction:row;align-items:center;padding-block:var(--calcite-internal-table-cell-padding)}.selection-area calcite-chip:last-of-type{margin-inline-end:.5rem}.selection-area calcite-chip:last-of-type:not(:first-of-type){margin-inline-start:.5rem}.selection-area calcite-button{margin-inline-end:1rem}.selection-chip{--calcite-chip-background-color: var(--calcite-table-selection-chip-background-color);--calcite-chip-border-color: var(--calcite-table-selection-chip-border-color);--calcite-chip-corner-radius: var(--calcite-table-selection-chip-corner-radius);--calcite-chip-shadow: var(--calcite-table-selection-chip-shadow);--calcite-chip-text-color: var(--calcite-table-selection-chip-text-color)}.selection-chip.selection-chip--active{--calcite-chip-background-color: var(--calcite-table-selection-chip-background-color-selected);--calcite-chip-border-color: var(--calcite-table-selection-chip-border-color-selected);--calcite-chip-text-color: var(--calcite-table-selection-chip-text-color-selected)}.selection-chip--out-of-view{--calcite-chip-background-color: var(--calcite-table-selection-out-of-view-chip-background-color);--calcite-chip-border-color: var(--calcite-table-selection-out-of-view-chip-border-color);--calcite-chip-corner-radius: var(--calcite-table-selection-out-of-view-chip-corner-radius);--calcite-chip-shadow: var(--calcite-table-selection-out-of-view-chip-shadow);--calcite-chip-text-color: var(--calcite-table-selection-out-of-view-chip-text-color);--calcite-chip-icon-color: var(--calcite-table-selection-out-of-view-chip-icon-color)}.pagination-area{display:flex;inline-size:100%;flex-direction:row;justify-content:center;padding-block:var(--calcite-internal-table-cell-padding)}calcite-pagination{flex:1;justify-content:center;--calcite-pagination-color: var(--calcite-table-pagination-color);--calcite-pagination-color-hover: var(--calcite-table-pagination-color-hover);--calcite-pagination-color-border-hover: var(--calcite-table-pagination-color-border-hover);--calcite-pagination-color-border-active: var(--calcite-table-pagination-color-border-active);--calcite-pagination-background-color: var(--calcite-table-pagination-background-color);--calcite-pagination-icon-color-background-hover: var(--calcite-table-pagination-icon-color-background-hover)}.dismiss-button{margin-inline-end:1rem;--calcite-button-background-color: var(--calcite-table-selection-dismiss-button-background-color);--calcite-button-border-color: var(--calcite-table-selection-dismiss-button-border-color);--calcite-button-corner-radius: var(--calcite-table-selection-dismiss-button-corner-radius);--calcite-button-shadow: var(--calcite-table-selection-dismiss-button-shadow);--calcite-button-text-color: var(--calcite-table-selection-dismiss-button-text-color)}.dismiss-button:hover{--calcite-button-background-color: var(--calcite-table-selection-dismiss-button-background-color-hover);--calcite-button-border-color: var(--calcite-table-selection-dismiss-button-border-color-hover);--calcite-button-text-color: var(--calcite-table-selection-dismiss-button-text-color-hover)}.dismiss-button:active{--calcite-button-background-color: var(--calcite-table-selection-dismiss-button-background-color-active);--calcite-button-border-color: var(--calcite-table-selection-dismiss-button-border-color-active);--calcite-button-text-color: var(--calcite-table-selection-dismiss-button-text-color-active)}:host([hidden]){display:none}[hidden]{display:none}`,y=class extends T{constructor(){super(),this.allRows=[],this.bodyRows=[],this.footRows=[],this.headRows=[],this.paginationRef=b(),this.tableContainerRef=b(),this.tableEl=null,this.tableBodySlotRef=b(),this.tableFootSlotRef=b(),this.tableHeadSlotRef=b(),this.tableContainerOverflowAnimationFrame=null,this.tableContainerResizeObserver=O("resize",()=>this.scheduleTableContainerOverflowUpdate()),this.messages=P({blocking:!0}),this.colCount=0,this.pageStartRow=1,this.readCellContentsToAT=!1,this.selectedCount=0,this.tableContainerHasOverflow=!1,this._selectedItems=[],this.bordered=!1,this.currentPage=0,this.groupSeparator=!1,this.interactionMode="interactive",this.layout="auto",this.numbered=!1,this.pageSize=0,this.scale="m",this.selectionDisplay="top",this.selectionMode="none",this.striped=!1,this.stickyHeader=!1,this.calciteInternalTableRowFocusChange=u({cancelable:!1}),this.calciteTablePageChange=u({cancelable:!1}),this.calciteTableSelect=u({cancelable:!1}),this.listen("calciteTableRowSelect",this.calciteTableRowSelectListener),this.listen("calciteInternalTableRowSelect",this.calciteInternalTableRowSelectListener),this.listen("calciteInternalTableRowFocusRequest",this.calciteInternalTableRowFocusEvent)}static{this.properties={colCount:[16,{},{state:!0}],pageStartRow:[16,{},{state:!0}],readCellContentsToAT:[16,{},{state:!0}],selectedCount:[16,{},{state:!0}],tableContainerHasOverflow:[16,{},{state:!0}],_selectedItems:[16,{},{state:!0}],bordered:[7,{},{reflect:!0,type:Boolean}],caption:1,currentPage:[11,{},{reflect:!0,type:Number}],groupSeparator:[7,{},{reflect:!0,type:Boolean}],interactionMode:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],numbered:[7,{},{reflect:!0,type:Boolean}],numberingSystem:[3,{},{reflect:!0}],pageSize:[11,{},{reflect:!0,type:Number}],scale:[3,{},{reflect:!0}],selectedItems:[32,{},{attribute:!1,readOnly:!0}],selectionDisplay:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],striped:[7,{},{reflect:!0,type:Boolean}],stickyHeader:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=V}get selectedItems(){return this._selectedItems}async load(){this.readCellContentsToAT=/safari/i.test(D()),this.listenOn(this.el.shadowRoot,"slotchange",this.handleSlotChange)}disconnectedCallback(){super.disconnectedCallback(),this.tableContainerOverflowAnimationFrame!==null&&(cancelAnimationFrame(this.tableContainerOverflowAnimationFrame),this.tableContainerOverflowAnimationFrame=null),this.tableContainerResizeObserver?.disconnect()}willUpdate(e){(e.has("groupSeparator")&&(this.hasUpdated||this.groupSeparator!==!1)||e.has("interactionMode")&&(this.hasUpdated||this.interactionMode!=="interactive")||e.has("numbered")&&(this.hasUpdated||this.numbered!==!1)||e.has("numberingSystem")||e.has("pageSize")&&(this.hasUpdated||this.pageSize!==0)||e.has("scale")&&(this.hasUpdated||this.scale!=="m")||e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="none")||e.has("currentPage")&&(this.hasUpdated||this.currentPage>1)&&this.pageSize>0)&&this.updateRows(),e.has("stickyHeader")&&(this.hasUpdated||this.stickyHeader!==!1)&&(this.allRows?.forEach(t=>{t.stickyHeaderEnabled=this.stickyHeader}),this.stickyHeader?this.applyHeaderRowPositionStyles():this.resetStickyHeaderState())}handleSlotChange(){this.updateRows()}clearStickyHeaderRowStyles(){this.headRows?.forEach(e=>{e.style.removeProperty("--calcite-internal-table-header-offset"),e.style.removeProperty("--calcite-internal-table-header-z-index"),e.style.removeProperty("--calcite-internal-table-header-row-position")})}resetStickyHeaderState(){this.clearStickyHeaderRowStyles()}calciteTableRowSelectListener(e){e.composedPath().includes(this.el)&&this.setSelectedItems(e.target)}calciteInternalTableRowSelectListener(e){e.composedPath().includes(this.el)&&(this.updateSelectedItems(!1),e.stopPropagation())}calciteInternalTableRowFocusEvent(e){let t=e.detail.cellPosition,a=e.detail.rowPosition,o=e.detail.destination,r=e.detail.lastCell,i=this.bodyRows?.filter(p=>!f(p)),s=this.allRows?.filter(p=>!f(p)),R=this.headRows[this.headRows.length-1]?.positionAll,S=i[0]?.positionAll,C=i[i.length-1]?.positionAll,$=this.footRows[0]?.positionAll,F=s[s.length-1]?.positionAll,I=o==="next"&&a===R,E=o==="previous"&&a===$,M=o==="previous"&&a===S,B=o==="next"&&a===C,d;switch(o){case"first":d=0;break;case"last":d=F;break;case"next":d=I?S:B?$:a+1;break;case"previous":d=E?C:M?R:a-1;break}let v=this.allRows.find(p=>p.positionAll===d)?.cellCount,U=v&&t>v?v:t;d!==void 0&&this.calciteInternalTableRowFocusChange.emit({cellPosition:U,rowPosition:d,destination:o,lastCell:r})}getSlottedRows(e){return e?e.assignedElements({flatten:!0}).filter(t=>t.matches("calcite-table-row")):[]}observeTableContainer(){this.tableContainerResizeObserver?.disconnect();let e=this.tableContainerRef.value,t=this.tableEl;e&&this.tableContainerResizeObserver?.observe(e),t&&this.tableContainerResizeObserver?.observe(t)}scheduleTableContainerOverflowUpdate(){this.tableContainerOverflowAnimationFrame!==null&&cancelAnimationFrame(this.tableContainerOverflowAnimationFrame),this.tableContainerOverflowAnimationFrame=requestAnimationFrame(()=>{this.tableContainerOverflowAnimationFrame=null,this.updateTableContainerOverflow()})}applyHeaderRowPositionStyles(){this.clearStickyHeaderRowStyles();let e=this.headRows?.[0];e&&(e.style.setProperty("--calcite-internal-table-header-offset","0"),e.style.setProperty("--calcite-internal-table-header-z-index","2"),e.style.setProperty("--calcite-internal-table-header-row-position",this.stickyHeader?"sticky":"static"))}updateTableContainerOverflow(){let e=this.tableContainerRef.value;this.tableContainerHasOverflow=!!e&&(e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth)}updateRows(){let e=this.getSlottedRows(this.tableHeadSlotRef.value),t=this.getSlottedRows(this.tableBodySlotRef.value),a=this.getSlottedRows(this.tableFootSlotRef.value),o=[...e,...t,...a];e.forEach(i=>{let s=e.indexOf(i);i.rowType="head",i.positionSection=s,i.positionSectionLocalized=this.localizeNumber((s+1).toString())}),t.forEach(i=>{let s=t.indexOf(i);i.rowType="body",i.positionSection=s,i.positionSectionLocalized=this.localizeNumber((s+1).toString())}),a.forEach(i=>{let s=a.indexOf(i);i.rowType="foot",i.positionSection=s,i.positionSectionLocalized=this.localizeNumber((s+1).toString())}),o.forEach(i=>{i.interactionMode=this.interactionMode,i.selectionMode=this.selectionMode,i.bodyRowCount=t?.length,i.positionAll=o?.indexOf(i),i.numbered=this.numbered,i.scale=this.scale,i.readCellContentsToAT=this.readCellContentsToAT,i.lastVisibleRow=o?.indexOf(i)===o.length-1});let r=e[0]?.cellCount||0;this.colCount=r,this.headRows=e,this.bodyRows=t,this.footRows=a,this.allRows=o,this.applyHeaderRowPositionStyles(),this.observeTableContainer(),this.scheduleTableContainerOverflowUpdate(),this.handleCurrentPageRange(),this.updateSelectedItems()}handleCurrentPageRange(){let e=this.currentPage,t=this.bodyRows?.length||0,a=this.pageSize>0?Math.ceil(t/this.pageSize):1;if(a>0){let o=Math.min(Math.max(e,1),a);this.currentPage=o,this.pageStartRow=(o-1)*this.pageSize+1}this.paginateRows()}handlePaginationChange(){let e=this.paginationRef.value?.startItem;this.pageStartRow=e||1,this.currentPage=Math.ceil(this.pageStartRow/this.pageSize),this.calciteTablePageChange.emit(),this.updateRows()}paginateRows(){this.bodyRows?.forEach(e=>{let t=e.positionSection+1,a=t>=this.pageStartRow&&t<this.pageStartRow+this.pageSize;e.itemHidden=this.pageSize>0&&!a&&!this.footRows.includes(e),e.lastVisibleRow=t===this.pageStartRow+this.pageSize-1||t===this.bodyRows.length})}async updateSelectedItems(e){let t=this.bodyRows?.filter(a=>a.selected);this._selectedItems=t,this.selectedCount=t?.length,this.allRows?.forEach(a=>{a.selectedRowCount=this.selectedCount,a.selectedRowCountLocalized=this.localizeNumber(this.selectedCount)}),e&&this.calciteTableSelect.emit()}handleDeselectAllRows(){this.bodyRows?.forEach(e=>{e.selected=!1}),this.updateSelectedItems(!0)}setSelectedItems(e){this.bodyRows?.forEach(t=>{e?.rowType==="head"?t.selected=this.selectedCount!==this.bodyRows?.length:t.selected=this.selectionMode==="multiple"||e===t?t.selected:!1}),this.updateSelectedItems(!0)}localizeNumber(e){return m.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},m.localize(e.toString())}renderSelectionArea(){let e=this._selectedItems?.filter(i=>f(i))?.length,t=this.localizeNumber(e?.toString()),o=`${this.localizeNumber(this.selectedCount?.toString())} ${this.messages.selected}`,r=`${t} ${this.messages.hiddenSelected}`;return n`<div class=${c(l.selectionArea)}><calcite-chip class=${c({[l.selectionCountChip]:!0,[l.selectionChipActive]:this.selectedCount>0})} .kind=${this.selectedCount>0?"brand":"neutral"} .label=${o} .scale=${this.scale} .value=${o}>${o}</calcite-chip>${e>0&&n`<calcite-chip class=${c(l.selectionOutOfViewChip)} .icon=${H.hideEmpty} .label=${r} .scale=${this.scale} title=${r??x} .value=${r}>${t}</calcite-chip>`||""}${this.selectedCount>0&&n`<calcite-button class=${c(l.dismissButton)} .iconStart=${H.clear} kind=neutral @click=${this.handleDeselectAllRows} round .scale=${this.scale} .title=${`${this.messages.clear} ${o} ${this.messages.row}`}>${this.messages.clear}</calcite-button>`||""}<div class=${c(l.selectionActions)}><slot name=${w.selectionActions}></slot></div></div>`}renderPaginationArea(){return n`<div class=${c(l.paginationArea)}><calcite-pagination .groupSeparator=${this.groupSeparator} .numberingSystem=${this.numberingSystem} @calcitePaginationChange=${this.handlePaginationChange} .pageSize=${this.pageSize} .scale=${this.scale} .startItem=${this.pageStartRow} .totalItems=${this.bodyRows?.length} ${h(this.paginationRef)}></calcite-pagination></div>`}renderTHead(){return n`<thead><slot name=${w.tableHeader} ${h(this.tableHeadSlotRef)}></slot></thead>`}renderTBody(){return n`<tbody><slot ${h(this.tableBodySlotRef)}></slot></tbody>`}renderTFoot(){return n`<tfoot><slot name=${w.tableFooter} ${h(this.tableFootSlotRef)}></slot></tfoot>`}render(){return n`<div class=${c(l.container)}>${this.selectionMode!=="none"&&this.selectionDisplay!=="none"&&this.renderSelectionArea()||""}<div class=${c({[l.bordered]:this.bordered,[l.striped]:this.striped,[l.tableContainer]:!0,[l.tableContainerOverflow]:this.tableContainerHasOverflow})} ${h(this.tableContainerRef)}><table .ariaColCount=${this.colCount} .ariaMultiSelectable=${this.selectionMode==="multiple"?"true":void 0} .ariaRowCount=${this.allRows?.length} class=${c({[l.tableFixed]:this.layout==="fixed"})} .role=${this.interactionMode==="interactive"?"grid":"table"} ${h(e=>{e&&(this.tableEl=e,k(n`<caption class=${c(l.assistiveText)}>${this.caption}</caption>${this.renderTHead()}${this.renderTBody()}${this.renderTFoot()}`,e))})}></table></div>${this.pageSize>0&&this.renderPaginationArea()||""}</div>`}};A("calcite-table",y);export{y as Table};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{e as d}from"./FLHFZN4H.js";import"./YFCK7FOA.js";import{G as o,H as t,I as s,M as l,S as c,g as n,h as i}from"./DBYBKXUC.js";var v=n`:host{position:relative;display:block;inline-size:100%}.track,.bar{position:absolute;inset-block-start:0px;block-size:2px}.track{z-index:var(--calcite-z-index);inline-size:100%;overflow:hidden;background-color:var(--calcite-progress-background-color, var(--calcite-color-border-3))}.bar{z-index:var(--calcite-z-index);background-color:var(--calcite-progress-fill-color, var(--calcite-color-brand))}@media(forced-colors:active){.track{background-color:highlightText}.bar{background-color:linkText}}.indeterminate{inline-size:20%;animation:looping-progress-bar-ani calc(var(--calcite-internal-animation-timing-medium) / var(--calcite-internal-duration-factor) * 11 / var(--calcite-internal-duration-factor)) linear infinite}.indeterminate.calcite--rtl{animation-name:looping-progress-bar-ani-rtl}.reversed{animation-direction:reverse}.text{padding-inline:0px;padding-block:1rem 0px;text-align:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-progress-text-color, var(--calcite-color-text-2))}@keyframes looping-progress-bar-ani{0%{transform:translate3d(-100%,0,0)}50%{inline-size:40%}to{transform:translate3d(600%,0,0)}}@keyframes looping-progress-bar-ani-rtl{0%{transform:translate3d(100%,0,0)}50%{inline-size:40%}to{transform:translate3d(-600%,0,0)}}:host([hidden]){display:none}[hidden]{display:none}`,r={track:"track",bar:"bar",text:"text"},a=class extends o{constructor(){super(...arguments),this.direction=d(),this.reversed=!1,this.type="determinate",this.value=0}static{this.properties={label:1,reversed:[7,{},{reflect:!0,type:Boolean}],text:1,type:[3,{},{reflect:!0}],value:[9,{},{type:Number}]}}static{this.styles=v}render(){let e=this.type==="determinate",m=e?{width:`${this.value}%`}:{},p=this.direction;return i`<div .ariaLabel=${this.label||this.text} .ariaValueMax=${e?"100":void 0} .ariaValueMin=${e?"0":void 0} .ariaValueNow=${e?this.value:void 0} role=progressbar><div class=${t(r.track)}><div class=${t({[r.bar]:!0,indeterminate:this.type==="indeterminate",[l.rtl]:p==="rtl",reversed:this.reversed})} style=${s(m)}></div></div>${this.text?i`<div class=${t(r.text)}>${this.text}</div>`:null}</div>`}};c("calcite-progress",a);export{a as Progress};
2
+ import{e as d}from"./CSC2MWHL.js";import"./DWZH5S6A.js";import{G as o,H as t,I as s,M as l,S as c,g as n,h as i}from"./3CQ6JCVK.js";var v=n`:host{position:relative;display:block;inline-size:100%}.track,.bar{position:absolute;inset-block-start:0px;block-size:2px}.track{z-index:var(--calcite-z-index);inline-size:100%;overflow:hidden;background-color:var(--calcite-progress-background-color, var(--calcite-color-border-3))}.bar{z-index:var(--calcite-z-index);background-color:var(--calcite-progress-fill-color, var(--calcite-color-brand))}@media(forced-colors:active){.track{background-color:highlightText}.bar{background-color:linkText}}.indeterminate{inline-size:20%;animation:looping-progress-bar-ani calc(var(--calcite-internal-animation-timing-medium) / var(--calcite-internal-duration-factor) * 11 / var(--calcite-internal-duration-factor)) linear infinite}.indeterminate.calcite--rtl{animation-name:looping-progress-bar-ani-rtl}.reversed{animation-direction:reverse}.text{padding-inline:0px;padding-block:1rem 0px;text-align:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-progress-text-color, var(--calcite-color-text-2))}@keyframes looping-progress-bar-ani{0%{transform:translate3d(-100%,0,0)}50%{inline-size:40%}to{transform:translate3d(600%,0,0)}}@keyframes looping-progress-bar-ani-rtl{0%{transform:translate3d(100%,0,0)}50%{inline-size:40%}to{transform:translate3d(-600%,0,0)}}:host([hidden]){display:none}[hidden]{display:none}`,r={track:"track",bar:"bar",text:"text"},a=class extends o{constructor(){super(...arguments),this.direction=d(),this.reversed=!1,this.type="determinate",this.value=0}static{this.properties={label:1,reversed:[7,{},{reflect:!0,type:Boolean}],text:1,type:[3,{},{reflect:!0}],value:[9,{},{type:Number}]}}static{this.styles=v}render(){let e=this.type==="determinate",m=e?{width:`${this.value}%`}:{},p=this.direction;return i`<div .ariaLabel=${this.label||this.text} .ariaValueMax=${e?"100":void 0} .ariaValueMin=${e?"0":void 0} .ariaValueNow=${e?this.value:void 0} role=progressbar><div class=${t(r.track)}><div class=${t({[r.bar]:!0,indeterminate:this.type==="indeterminate",[l.rtl]:p==="rtl",reversed:this.reversed})} style=${s(m)}></div></div>${this.text?i`<div class=${t(r.text)}>${this.text}</div>`:null}</div>`}};c("calcite-progress",a);export{a as Progress};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{g as j}from"./QBJZUEM2.js";import{k as G}from"./CNNLMIH2.js";import{a as $}from"./7BKS4PFK.js";import{c as A}from"./NUJKT5EY.js";import{a as W}from"./7ZILEGVA.js";import{a as q}from"./4XAA4FL5.js";import{a as E}from"./TOS26VDH.js";import"./YP3AYJH3.js";import{a as k}from"./JDJW7IOG.js";import{a as N}from"./6DDEBJT6.js";import"./ZWPNZ5XW.js";import"./FLHFZN4H.js";import"./YFCK7FOA.js";import"./ER7WXLPC.js";import{E as z,F as P,G as U,H as M,L as _,S as V,g as R,h as v,l as y,p as b}from"./DBYBKXUC.js";var X={offset:"offset"},Y={labelContent:"label-content"},ee=60;function O(t){return t.replace(":15",".25").replace(":30",".5").replace(":45",".75").replace("\u2212","-")}function te(t,e){let o=L(t,"en-US",e).replace("GMT","");return o===""?0:Number(O(o))*ee}function oe(){return new Date().getTimezoneOffset()*-1}function ie(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}async function se(t){if(t==="offset")return o=>o;let{normalize:e}=await import("./RKLI4NN7.js");return e}async function ae(t,e,o,i,a){if(o==="name"){let{groupByName:n}=await import("./EOXVENGN.js");return(await n()).map(({label:l})=>({label:l,value:l,metadata:{filterValue:l}})).filter(l=>!!l).sort()}let s=a==="user"?t:a==="utc"?"fr":"en-GB",c=i.getTime();if(o==="region"){let[{groupByRegion:n},{getCountry:m,global:l}]=await Promise.all([import("./IYVJIUWV.js"),import("./Z6Q6E2KL.js")]);return(await n()).map(({label:u,tzs:f})=>(f.sort((h,d)=>{let I=T(h,e),x=T(d,e),p="Etc/GMT";if(h.startsWith(p)&&d.startsWith(p)){let g=h.substring(p.length),F=d.substring(p.length),Q=g===""?0:parseInt(g,10);return(F===""?0:parseInt(F,10))-Q}return I.localeCompare(x)}),{label:S(e,u),items:f.map(h=>{let d=O(L(h,s,c)),I=T(h,e),x=u===l?`${T(l,e)} Etc`:K(h),p=m(h),g=S(e,p);return{label:I,value:h,metadata:{country:g===I?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:Z},{DateEngine:C}]=await Promise.all([import("./SJNBO2YA.js"),import("./TAT7KHVI.js")]),w=await Z({dateEngine:new C,groupDateRange:1,startDate:new Date(c).toISOString()}),J=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,s,c)),u=te(l,c),f=n.map(d=>T(m[d],e));return{label:re(e,r,J.format(f)),value:u,metadata:{filterValue:m.map(d=>K(d))}}}).filter(n=>!!n).sort((n,m)=>n.value-m.value)}function T(t,e){return e[t]||le(t)}function ne(t,e,o){return o.timeZoneRegionLabel.replace("{city}",t).replace("{country}",S(o,e))}function S(t,e){return t[e]||e}function le(t){return t.split("/").pop()??""}function K(t){return t.replace(/_/g," ")}function re(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:s})=>s==="timeZoneName").value}function ce(t){return t[0].items!==void 0}function me(t){return ce(t)?t.flatMap(e=>e.items):t}function H(t,e,o){return o===void 0||t===void 0?void 0:me(t).find(i=>i[e]==o)}var ue=R`: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;--calcite-combobox-corner-radius: var(--calcite-input-time-zone-corner-radius, var(--calcite-corner-radius))}.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=z(),this.formSupport=A({inputType:"text"})(this),this.messages=k({blocking:!0}),this.focusSetter=N()(this),this.interactiveContainer=q(this),this.labelable=W(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={selectedTimeZoneItem:[16,{},{state:!0}],timeZoneItems:[16,{},{state:!0}],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}],placeholder:1,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=ue}#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)}async load(){this.normalizer=await se(this.mode),await this.updateTimeZoneItems();let e=this.value,o=this.normalizeValue(e);this.value=o||(e===""?o:void 0),this.updateTimeZoneSelection();let i=this.selectedTimeZoneItem?`${this.selectedTimeZoneItem.value}`:"";this.value=i}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()}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 i=this.#e==="user";if(this.#e=null,i)return;let a=this.normalizeValue(e);if(!a){if(this.clearable){this._value=a,this.selectedTimeZoneItem=void 0;return}this._value=o,this.selectedTimeZoneItem=this.findTimeZoneItem(o);return}let s=this.findTimeZoneItem(a);if(!s){this._value=o;return}this._value=a,this.selectedTimeZoneItem=s}onLabelClick(){this.setFocus()}overrideSelectedLabelForRegion(e){this.mode!=="region"||!this.selectedTimeZoneItem||this.comboboxRef.value&&(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 i=e.target.selectedItems[0],a=this._value;if(!i){this._value="",this.requestUpdate("value",a),this.selectedTimeZoneItem=void 0,this.calciteInputTimeZoneChange.emit();return}let s=this.findTimeZoneItemByLabel(i.getAttribute("data-label")??void 0),c=s?.value===void 0?void 0:`${s?.value}`;this.value===c&&s?.label===this.selectedTimeZoneItem?.label||(this._value=c,this.requestUpdate("value",a),this.selectedTimeZoneItem=s,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 H(this.timeZoneItems,"value",e)}findTimeZoneItemByLabel(e){return H(this.timeZoneItems,"label",e)}async updateTimeZoneItems(){this.timeZoneItems=await this.createTimeZoneItems()}updateTimeZoneSelection(){if(this.value===""&&this.clearable){this.selectedTimeZoneItem=void 0;return}let e=this.mode==="offset"?oe():ie(),o=this.value===""||!this.value?e:this.value;this.selectedTimeZoneItem=this.findTimeZoneItem(o)||this.findTimeZoneItem(e)}async createTimeZoneItems(){return!this.messages._lang||!this.messages?[]:ae(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 i=this.selectedTimeZoneItem===e,{label:a,metadata:s}=e;return!s.country||o||!i?a:ne(a,s.country,this.messages)}render(){return this.interactiveContainer({disabled:this.disabled,children:v`<calcite-combobox .clearDisabled=${!this.clearable} .disabled=${this.disabled} .label=${this.messages.chooseTimeZone} .labelText=${this.labelText} lang=${this.messages._lang??y} .maxItems=${this.maxItems} @calciteComboboxBeforeClose=${this.onComboboxBeforeClose} @calciteComboboxBeforeOpen=${this.onComboboxBeforeOpen} @calciteComboboxChange=${this.onComboboxChange} @calciteComboboxClose=${this.onComboboxClose} @calciteComboboxOpen=${this.onComboboxOpen} .overlayPositioning=${this.overlayPositioning} .placeholder=${this.placeholder||this.messages[`${this.mode}Placeholder`]} 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} ${P(this.comboboxRef)}>${this.renderItems()}<slot name=${Y.labelContent} slot=${j.labelContent}></slot></calcite-combobox>`})}renderItems(){return this.mode==="region"?this.renderRegionItems():$(this.timeZoneItems,({label:e})=>e,e=>{let o=this.selectedTimeZoneItem===e,{label:i,metadata:a,value:s}=e;return v`<calcite-combobox-item data-label=${i??y} .heading=${i} .metadata=${a} .selected=${o} .value=${s}></calcite-combobox-item>`})}renderRegionItems(){return this.timeZoneItems.flatMap(({label:e,items:o})=>E(e,v`<calcite-combobox-item-group .label=${e}>${$(o,({label:i})=>i,i=>{let a=this.selectedTimeZoneItem===i,{label:s,metadata:c,value:Z}=i,C=this.getItemLabel(i);return v`<calcite-combobox-item data-label=${s??y} .description=${c.country} .heading=${C} .metadata=${c} .selected=${a} .value=${Z}><span class=${M(X.offset)} slot=content-end>${c.offset}</span></calcite-combobox-item>`})}</calcite-combobox-item-group>`))}};V("calcite-input-time-zone",B);export{B as InputTimeZone};
2
+ import{g as j}from"./QBJZUEM2.js";import{k as G}from"./D2MAHJVD.js";import{a as $}from"./OUUUQNUM.js";import{c as A}from"./RD3MZVBU.js";import{a as W}from"./LG5E6RXA.js";import{a as q}from"./XGJWH7PU.js";import{a as E}from"./KTDUPBWG.js";import"./YP3AYJH3.js";import{a as k}from"./B4QYMPP5.js";import{a as N}from"./LNRCU5CV.js";import"./ZWPNZ5XW.js";import"./CSC2MWHL.js";import"./DWZH5S6A.js";import"./GOISJED7.js";import{E as z,F as P,G as U,H as M,L as _,S as V,g as R,h as v,l as y,p as b}from"./3CQ6JCVK.js";var X={offset:"offset"},Y={labelContent:"label-content"},ee=60;function O(t){return t.replace(":15",".25").replace(":30",".5").replace(":45",".75").replace("\u2212","-")}function te(t,e){let o=L(t,"en-US",e).replace("GMT","");return o===""?0:Number(O(o))*ee}function oe(){return new Date().getTimezoneOffset()*-1}function ie(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}async function se(t){if(t==="offset")return o=>o;let{normalize:e}=await import("./RKLI4NN7.js");return e}async function ae(t,e,o,i,a){if(o==="name"){let{groupByName:n}=await import("./EOXVENGN.js");return(await n()).map(({label:l})=>({label:l,value:l,metadata:{filterValue:l}})).filter(l=>!!l).sort()}let s=a==="user"?t:a==="utc"?"fr":"en-GB",c=i.getTime();if(o==="region"){let[{groupByRegion:n},{getCountry:m,global:l}]=await Promise.all([import("./IYVJIUWV.js"),import("./Z6Q6E2KL.js")]);return(await n()).map(({label:u,tzs:f})=>(f.sort((h,d)=>{let I=T(h,e),x=T(d,e),p="Etc/GMT";if(h.startsWith(p)&&d.startsWith(p)){let g=h.substring(p.length),F=d.substring(p.length),Q=g===""?0:parseInt(g,10);return(F===""?0:parseInt(F,10))-Q}return I.localeCompare(x)}),{label:S(e,u),items:f.map(h=>{let d=O(L(h,s,c)),I=T(h,e),x=u===l?`${T(l,e)} Etc`:K(h),p=m(h),g=S(e,p);return{label:I,value:h,metadata:{country:g===I?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:Z},{DateEngine:C}]=await Promise.all([import("./SJNBO2YA.js"),import("./TAT7KHVI.js")]),w=await Z({dateEngine:new C,groupDateRange:1,startDate:new Date(c).toISOString()}),J=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,s,c)),u=te(l,c),f=n.map(d=>T(m[d],e));return{label:re(e,r,J.format(f)),value:u,metadata:{filterValue:m.map(d=>K(d))}}}).filter(n=>!!n).sort((n,m)=>n.value-m.value)}function T(t,e){return e[t]||le(t)}function ne(t,e,o){return o.timeZoneRegionLabel.replace("{city}",t).replace("{country}",S(o,e))}function S(t,e){return t[e]||e}function le(t){return t.split("/").pop()??""}function K(t){return t.replace(/_/g," ")}function re(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:s})=>s==="timeZoneName").value}function ce(t){return t[0].items!==void 0}function me(t){return ce(t)?t.flatMap(e=>e.items):t}function H(t,e,o){return o===void 0||t===void 0?void 0:me(t).find(i=>i[e]==o)}var ue=R`: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;--calcite-combobox-corner-radius: var(--calcite-input-time-zone-corner-radius, var(--calcite-corner-radius))}.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=z(),this.formSupport=A({inputType:"text"})(this),this.messages=k({blocking:!0}),this.focusSetter=N()(this),this.interactiveContainer=q(this),this.labelable=W(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={selectedTimeZoneItem:[16,{},{state:!0}],timeZoneItems:[16,{},{state:!0}],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}],placeholder:1,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=ue}#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)}async load(){this.normalizer=await se(this.mode),await this.updateTimeZoneItems();let e=this.value,o=this.normalizeValue(e);this.value=o||(e===""?o:void 0),this.updateTimeZoneSelection();let i=this.selectedTimeZoneItem?`${this.selectedTimeZoneItem.value}`:"";this.value=i}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()}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 i=this.#e==="user";if(this.#e=null,i)return;let a=this.normalizeValue(e);if(!a){if(this.clearable){this._value=a,this.selectedTimeZoneItem=void 0;return}this._value=o,this.selectedTimeZoneItem=this.findTimeZoneItem(o);return}let s=this.findTimeZoneItem(a);if(!s){this._value=o;return}this._value=a,this.selectedTimeZoneItem=s}onLabelClick(){this.setFocus()}overrideSelectedLabelForRegion(e){this.mode!=="region"||!this.selectedTimeZoneItem||this.comboboxRef.value&&(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 i=e.target.selectedItems[0],a=this._value;if(!i){this._value="",this.requestUpdate("value",a),this.selectedTimeZoneItem=void 0,this.calciteInputTimeZoneChange.emit();return}let s=this.findTimeZoneItemByLabel(i.getAttribute("data-label")??void 0),c=s?.value===void 0?void 0:`${s?.value}`;this.value===c&&s?.label===this.selectedTimeZoneItem?.label||(this._value=c,this.requestUpdate("value",a),this.selectedTimeZoneItem=s,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 H(this.timeZoneItems,"value",e)}findTimeZoneItemByLabel(e){return H(this.timeZoneItems,"label",e)}async updateTimeZoneItems(){this.timeZoneItems=await this.createTimeZoneItems()}updateTimeZoneSelection(){if(this.value===""&&this.clearable){this.selectedTimeZoneItem=void 0;return}let e=this.mode==="offset"?oe():ie(),o=this.value===""||!this.value?e:this.value;this.selectedTimeZoneItem=this.findTimeZoneItem(o)||this.findTimeZoneItem(e)}async createTimeZoneItems(){return!this.messages._lang||!this.messages?[]:ae(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 i=this.selectedTimeZoneItem===e,{label:a,metadata:s}=e;return!s.country||o||!i?a:ne(a,s.country,this.messages)}render(){return this.interactiveContainer({disabled:this.disabled,children:v`<calcite-combobox .clearDisabled=${!this.clearable} .disabled=${this.disabled} .label=${this.messages.chooseTimeZone} .labelText=${this.labelText} lang=${this.messages._lang??y} .maxItems=${this.maxItems} @calciteComboboxBeforeClose=${this.onComboboxBeforeClose} @calciteComboboxBeforeOpen=${this.onComboboxBeforeOpen} @calciteComboboxChange=${this.onComboboxChange} @calciteComboboxClose=${this.onComboboxClose} @calciteComboboxOpen=${this.onComboboxOpen} .overlayPositioning=${this.overlayPositioning} .placeholder=${this.placeholder||this.messages[`${this.mode}Placeholder`]} 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} ${P(this.comboboxRef)}>${this.renderItems()}<slot name=${Y.labelContent} slot=${j.labelContent}></slot></calcite-combobox>`})}renderItems(){return this.mode==="region"?this.renderRegionItems():$(this.timeZoneItems,({label:e})=>e,e=>{let o=this.selectedTimeZoneItem===e,{label:i,metadata:a,value:s}=e;return v`<calcite-combobox-item data-label=${i??y} .heading=${i} .metadata=${a} .selected=${o} .value=${s}></calcite-combobox-item>`})}renderRegionItems(){return this.timeZoneItems.flatMap(({label:e,items:o})=>E(e,v`<calcite-combobox-item-group .label=${e}>${$(o,({label:i})=>i,i=>{let a=this.selectedTimeZoneItem===i,{label:s,metadata:c,value:Z}=i,C=this.getItemLabel(i);return v`<calcite-combobox-item data-label=${s??y} .description=${c.country} .heading=${C} .metadata=${c} .selected=${a} .value=${Z}><span class=${M(X.offset)} slot=content-end>${c.offset}</span></calcite-combobox-item>`})}</calcite-combobox-item-group>`))}};V("calcite-input-time-zone",B);export{B as InputTimeZone};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as T}from"./OEKMQUG2.js";import{a as L}from"./4XAA4FL5.js";import{a as g}from"./TOS26VDH.js";import{a as I}from"./T6CCMW7H.js";import{a as E}from"./VI7SBYXT.js";import{a as R}from"./JDJW7IOG.js";import{a as i,b as S}from"./BEE5ZZFY.js";import{a as B}from"./6DDEBJT6.js";import{a as C}from"./ZWPNZ5XW.js";import"./FLHFZN4H.js";import"./YFCK7FOA.js";import"./ER7WXLPC.js";import{E as v,F as l,G as z,H as a,J as n,M as y,S as w,g as x,h as t}from"./DBYBKXUC.js";var D=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]){--calcite-internal-action-font-size: var(--calcite-font-size--2);--calcite-internal-action-min-height: var(--calcite-size-sm);--calcite-internal-action-line-height: 1rem;--calcite-internal-action-spacing: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-action-font-size: var(--calcite-font-size--1);--calcite-internal-action-min-height: var(--calcite-size-md);--calcite-internal-action-line-height: 1rem;--calcite-internal-action-spacing: var(--calcite-spacing-sm)}:host([scale=l]){--calcite-internal-action-font-size: var(--calcite-font-size-0);--calcite-internal-action-min-height: var(--calcite-size-lg);--calcite-internal-action-line-height: 1.25rem;--calcite-internal-action-spacing: var(--calcite-spacing-sm-plus)}:host{display:flex;cursor:pointer;background-color:transparent;--calcite-internal-action-text-color: var(--calcite-color-text-3);border-radius:var(--calcite-action-corner-radius, var(--calcite-action-corner-radius-start-start, var(--calcite-corner-radius-xs)) var(--calcite-action-corner-radius-start-end, var(--calcite-corner-radius-xs)) var(--calcite-action-corner-radius-end-end, var(--calcite-corner-radius-xs)) var(--calcite-action-corner-radius-end-start, var(--calcite-corner-radius-xs)))}.interaction-container{border-radius:inherit}:host([width=full]){flex:1 0 auto}:host([width=full]) .button{justify-content:center}:host([width=full]) .button .text-container--visible{flex:none}:host([drag-handle]){cursor:move;--calcite-internal-action-text-color: var(--calcite-color-border-input);--calcite-internal-action-padding-inline: var(--calcite-spacing-xxs)}.button{position:relative;margin:0;display:flex;inline-size:auto;align-items:center;justify-content:flex-start;border-style:none;outline-color:transparent;box-sizing:border-box;background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-1));border-radius:inherit;color:var(--calcite-action-text-color, var(--calcite-internal-action-text-color));cursor:inherit;flex:1 0 auto;font-family:inherit;font-size:var(--calcite-internal-action-font-size);font-weight:var(--calcite-font-weight-normal);line-height:var(--calcite-internal-action-line-height);min-block-size:var(--calcite-internal-action-height, var(--calcite-internal-action-min-height));max-block-size:var(--calcite-internal-action-height, none);padding-block:var(--calcite-internal-action-padding-block, var(--calcite-internal-action-spacing));padding-inline:var(--calcite-internal-action-padding-inline, var(--calcite-internal-action-spacing));text-align:start}.button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-action-text-color-press, var(--calcite-action-text-color-pressed, var(--calcite-color-text-1)))}.button: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))))}.button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-foreground-3)))}.button--text-visible{gap:var(--calcite-internal-action-spacing);inline-size:100%}.icon-container{pointer-events:none;margin:0;display:flex;align-items:center;justify-content:center}.text-container{margin:0;inline-size:0px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:0;transition-property:opacity;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1);transition-property:inline-size}.text-container--visible{inline-size:auto;flex:1 1 auto;opacity:1}:host([active]) .button{background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-3));color:var(--calcite-action-text-color-press, var(--calcite-action-text-color-pressed, var(--calcite-color-text-1)))}:host([active]) .button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-color-foreground-3))}:host([active]) .button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-foreground-3)))}:host([loading]) .button:hover,:host([loading]) .button:focus{background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-1))}:host([loading]) calcite-loader[inline]{margin-inline-end:0px;--calcite-loader-progress-color-inline: var(--calcite-action-loader-color)}:host([appearance=transparent]):host([active]) .button{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-transparent-press)))}:host([appearance=transparent]) .button{transition-property:box-shadow;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1);background-color:var(--calcite-action-background-color, var(--calcite-color-transparent))}:host([appearance=transparent]) .button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-color-transparent-hover))}:host([appearance=transparent]) .button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-transparent-press)))}:host([selection-appearance=highlight]):host([active]) .button{background-color:var(--calcite-color-surface-highlight);color:var(--calcite-color-text-highlight)}:host([active-descendant]) .button{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))))}:host([alignment=center]) .button{justify-content:center}:host([alignment=end]) .button{justify-content:flex-end}:host([alignment=center]) .button .text-container--visible,:host([alignment=end]) .button .text-container--visible{flex:0 1 auto}:host([scale=s][compact]) .button,:host([scale=m][compact]) .button,:host([scale=l][compact]) .button{padding-inline:0px}.slot-container{display:flex}.slot-container--hidden{display:none}.indicator-with-icon{position:relative}.indicator-with-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.275rem;inset-inline-end:-.275rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}.indicator-without-icon{margin-inline:.25rem;inline-size:1rem;position:relative}.indicator-without-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.275rem;inset-inline-end:-.275rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}:host([scale=s]) .indicator-with-icon{position:relative}:host([scale=s]) .indicator-with-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.125rem;inset-inline-end:-.125rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand));block-size:.375rem;inline-size:.375rem}:host([scale=s]) .indicator-without-icon{position:relative}:host([scale=s]) .indicator-without-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.175rem;inset-inline-end:-.175rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand));block-size:.375rem;inline-size:.375rem}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,F=x`.screen-reader-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}`,k=class extends z{constructor(){super(...arguments),this.guid=I(),this.buttonRef=v(),this.buttonId=S.button(this.guid),this.mutationObserver=E("mutation",()=>this.requestUpdate()),this.messages=R({blocking:!0}),this.focusSetter=B()(this),this.indicatorRef=v(),this.interactiveContainer=L(this),this.formTrigger=T()(this),this.labelElRef=v(),this.active=!1,this.activeDescendant=!1,this.appearance="transparent",this.compact=!1,this.disabled=!1,this.dragHandle=!1,this.iconFlipRtl=!1,this.indicator=!1,this.loading=!1,this.overflowDisabled=!1,this.scale="m",this.width="auto",this.textEnabled=!1,this.type="button"}static{this.properties={aria:[0,{},{attribute:!1}],active:[7,{},{reflect:!0,type:Boolean}],activeDescendant:[7,{},{reflect:!0,type:Boolean}],alignment:[3,{},{reflect:!0}],appearance:[3,{},{reflect:!0}],compact:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],dragHandle:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],icon:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],indicator:[7,{},{reflect:!0,type:Boolean}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],overflowDisabled:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}],text:1,textEnabled:[7,{},{reflect:!0,type:Boolean}],type:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}]}}static{this.formAssociated=!0}static{this.styles=[D,F]}async setFocus(e){return this.focusSetter(()=>this.buttonRef.value,e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}getAccessibleLabel(){let e=this.label||this.text||"";return this.indicator?this.messages.indicatorLabel.replace("{label}",e):e}getLabelledByElements(){let e=[...this.labelElRef.value?[this.labelElRef.value]:[],...this.aria?.labelledByElements??[]];return e.length?e:void 0}renderTextContainer(){let{text:e,textEnabled:o}=this,r={[i.textContainer]:!0,[i.textContainerVisible]:o};return e?g("text-container",t`<div class=${a(r)}>${e}</div>`):null}renderIndicatorText(){let{indicator:e,messages:o,buttonId:r}=this;return t`<div aria-labelledby=${r??n} aria-live=polite class=${a(y.screenReaderText)} role=region ${l(this.indicatorRef)}>${e?o.indicator:null}</div>`}renderIconContainer(){let{loading:e,icon:o,scale:r,el:s,iconFlipRtl:m,indicator:d}=this,u=r==="l"?"l":"m",h=e?t`<calcite-loader inline .label=${this.messages.loading} .scale=${u}></calcite-loader>`:null,b=o?t`<calcite-icon class=${a({[i.indicatorWithIcon]:d})} .flipRtl=${m} .icon=${o} .scale=${C(this.scale)}></calcite-icon>`:null,c=h||b,p=c||s.children?.length,f=t`<div class=${a({[i.slotContainer]:!0,[i.slotContainerHidden]:e})}><slot></slot></div>`;return p?g("icon-container",t`<div aria-hidden=true class=${a(i.iconContainer)}>${c}${f}</div>`):null}renderLabel(){let e=this.getAccessibleLabel();return e?t`<span class=${a(y.screenReaderText)} ${l(this.labelElRef)}>${e}</span>`:null}renderButton(){let{compact:e,disabled:o,icon:r,loading:s,textEnabled:m,indicator:d,indicatorRef:u,buttonId:h}=this,b=this.getLabelledByElements(),c={[i.button]:!0,[i.buttonTextVisible]:m,[i.buttonCompact]:e},p=t`${this.renderIconContainer()}${this.renderTextContainer()}${!r&&d&&g("indicator-no-icon",t`<div class=${a(i.indicatorWithoutIcon)}></div>`)||""}${this.renderLabel()}`,f=d&&u.value?[u.value]:[],$=[...this.aria?.controlsElements??[],...f];return this.dragHandle?t`<span .ariaBusy=${s} .ariaControlsElements=${$} .ariaDescribedByElements=${this.aria?.describedByElements} .ariaExpanded=${this.aria?.expanded} .ariaHasPopup=${this.aria?.hasPopup} .ariaLabelledByElements=${b} .ariaOwnsElements=${this.aria?.ownsElements} .ariaPressed=${this.aria?.pressed} class=${a(c)} id=${h??n} role=button tabindex=${(this.disabled?void 0:0)??n} ${l(this.buttonRef)}>${p}</span>`:t`<button .ariaBusy=${s} .ariaChecked=${this.aria?.checked} .ariaControlsElements=${$} .ariaDescribedByElements=${this.aria?.describedByElements} .ariaExpanded=${this.aria?.expanded} .ariaHasPopup=${this.aria?.hasPopup} .ariaLabelledByElements=${b} .ariaOwnsElements=${this.aria?.ownsElements} .ariaPressed=${this.aria?.pressed} class=${a(c)} .disabled=${o} id=${h??n} .role=${this.aria?.role} type=${this.type??n} ${l(this.buttonRef)}>${p}</button>`}render(){return this.interactiveContainer({disabled:this.disabled,children:t`${this.renderButton()}${this.renderIndicatorText()}`})}};w("calcite-action",k);export{k as Action};
2
+ import{a as T}from"./MXPKHEUB.js";import{a as L}from"./XGJWH7PU.js";import{a as g}from"./KTDUPBWG.js";import{a as I}from"./T6CCMW7H.js";import{a as E}from"./VI7SBYXT.js";import{a as R}from"./B4QYMPP5.js";import{a as i,b as S}from"./BEE5ZZFY.js";import{a as B}from"./LNRCU5CV.js";import{a as C}from"./ZWPNZ5XW.js";import"./CSC2MWHL.js";import"./DWZH5S6A.js";import"./GOISJED7.js";import{E as v,F as l,G as z,H as a,J as n,M as y,S as w,g as x,h as t}from"./3CQ6JCVK.js";var D=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]){--calcite-internal-action-font-size: var(--calcite-font-size--2);--calcite-internal-action-min-height: var(--calcite-size-sm);--calcite-internal-action-line-height: 1rem;--calcite-internal-action-spacing: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-action-font-size: var(--calcite-font-size--1);--calcite-internal-action-min-height: var(--calcite-size-md);--calcite-internal-action-line-height: 1rem;--calcite-internal-action-spacing: var(--calcite-spacing-sm)}:host([scale=l]){--calcite-internal-action-font-size: var(--calcite-font-size-0);--calcite-internal-action-min-height: var(--calcite-size-lg);--calcite-internal-action-line-height: 1.25rem;--calcite-internal-action-spacing: var(--calcite-spacing-sm-plus)}:host{display:flex;cursor:pointer;background-color:transparent;--calcite-internal-action-text-color: var(--calcite-color-text-3);border-radius:var(--calcite-action-corner-radius, var(--calcite-action-corner-radius-start-start, var(--calcite-corner-radius-xs)) var(--calcite-action-corner-radius-start-end, var(--calcite-corner-radius-xs)) var(--calcite-action-corner-radius-end-end, var(--calcite-corner-radius-xs)) var(--calcite-action-corner-radius-end-start, var(--calcite-corner-radius-xs)))}.interaction-container{border-radius:inherit}:host([width=full]){flex:1 0 auto}:host([width=full]) .button{justify-content:center}:host([width=full]) .button .text-container--visible{flex:none}:host([drag-handle]){cursor:move;--calcite-internal-action-text-color: var(--calcite-color-border-input);--calcite-internal-action-padding-inline: var(--calcite-spacing-xxs)}.button{position:relative;margin:0;display:flex;inline-size:auto;align-items:center;justify-content:flex-start;border-style:none;outline-color:transparent;box-sizing:border-box;background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-1));border-radius:inherit;color:var(--calcite-action-text-color, var(--calcite-internal-action-text-color));cursor:inherit;flex:1 0 auto;font-family:inherit;font-size:var(--calcite-internal-action-font-size);font-weight:var(--calcite-font-weight-normal);line-height:var(--calcite-internal-action-line-height);min-block-size:var(--calcite-internal-action-height, var(--calcite-internal-action-min-height));max-block-size:var(--calcite-internal-action-height, none);padding-block:var(--calcite-internal-action-padding-block, var(--calcite-internal-action-spacing));padding-inline:var(--calcite-internal-action-padding-inline, var(--calcite-internal-action-spacing));text-align:start}.button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-action-text-color-press, var(--calcite-action-text-color-pressed, var(--calcite-color-text-1)))}.button: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))))}.button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-foreground-3)))}.button--text-visible{gap:var(--calcite-internal-action-spacing);inline-size:100%}.icon-container{pointer-events:none;margin:0;display:flex;align-items:center;justify-content:center}.text-container{margin:0;inline-size:0px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:0;transition-property:opacity;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1);transition-property:inline-size}.text-container--visible{inline-size:auto;flex:1 1 auto;opacity:1}:host([active]) .button{background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-3));color:var(--calcite-action-text-color-press, var(--calcite-action-text-color-pressed, var(--calcite-color-text-1)))}:host([active]) .button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-color-foreground-3))}:host([active]) .button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-foreground-3)))}:host([loading]) .button:hover,:host([loading]) .button:focus{background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-1))}:host([loading]) calcite-loader[inline]{margin-inline-end:0px;--calcite-loader-progress-color-inline: var(--calcite-action-loader-color)}:host([appearance=transparent]):host([active]) .button{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-transparent-press)))}:host([appearance=transparent]) .button{transition-property:box-shadow;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1);background-color:var(--calcite-action-background-color, var(--calcite-color-transparent))}:host([appearance=transparent]) .button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-color-transparent-hover))}:host([appearance=transparent]) .button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-transparent-press)))}:host([selection-appearance=highlight]):host([active]) .button{background-color:var(--calcite-color-surface-highlight);color:var(--calcite-color-text-highlight)}:host([active-descendant]) .button{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))))}:host([alignment=center]) .button{justify-content:center}:host([alignment=end]) .button{justify-content:flex-end}:host([alignment=center]) .button .text-container--visible,:host([alignment=end]) .button .text-container--visible{flex:0 1 auto}:host([scale=s][compact]) .button,:host([scale=m][compact]) .button,:host([scale=l][compact]) .button{padding-inline:0px}.slot-container{display:flex}.slot-container--hidden{display:none}.indicator-with-icon{position:relative}.indicator-with-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.275rem;inset-inline-end:-.275rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}.indicator-without-icon{margin-inline:.25rem;inline-size:1rem;position:relative}.indicator-without-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.275rem;inset-inline-end:-.275rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}:host([scale=s]) .indicator-with-icon{position:relative}:host([scale=s]) .indicator-with-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.125rem;inset-inline-end:-.125rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand));block-size:.375rem;inline-size:.375rem}:host([scale=s]) .indicator-without-icon{position:relative}:host([scale=s]) .indicator-without-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.175rem;inset-inline-end:-.175rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand));block-size:.375rem;inline-size:.375rem}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,F=x`.screen-reader-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}`,k=class extends z{constructor(){super(...arguments),this.guid=I(),this.buttonRef=v(),this.buttonId=S.button(this.guid),this.mutationObserver=E("mutation",()=>this.requestUpdate()),this.messages=R({blocking:!0}),this.focusSetter=B()(this),this.indicatorRef=v(),this.interactiveContainer=L(this),this.formTrigger=T()(this),this.labelElRef=v(),this.active=!1,this.activeDescendant=!1,this.appearance="transparent",this.compact=!1,this.disabled=!1,this.dragHandle=!1,this.iconFlipRtl=!1,this.indicator=!1,this.loading=!1,this.overflowDisabled=!1,this.scale="m",this.width="auto",this.textEnabled=!1,this.type="button"}static{this.properties={aria:[0,{},{attribute:!1}],active:[7,{},{reflect:!0,type:Boolean}],activeDescendant:[7,{},{reflect:!0,type:Boolean}],alignment:[3,{},{reflect:!0}],appearance:[3,{},{reflect:!0}],compact:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],dragHandle:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],icon:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],indicator:[7,{},{reflect:!0,type:Boolean}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],overflowDisabled:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}],text:1,textEnabled:[7,{},{reflect:!0,type:Boolean}],type:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}]}}static{this.formAssociated=!0}static{this.styles=[D,F]}async setFocus(e){return this.focusSetter(()=>this.buttonRef.value,e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}getAccessibleLabel(){let e=this.label||this.text||"";return this.indicator?this.messages.indicatorLabel.replace("{label}",e):e}getLabelledByElements(){let e=[...this.labelElRef.value?[this.labelElRef.value]:[],...this.aria?.labelledByElements??[]];return e.length?e:void 0}renderTextContainer(){let{text:e,textEnabled:o}=this,r={[i.textContainer]:!0,[i.textContainerVisible]:o};return e?g("text-container",t`<div class=${a(r)}>${e}</div>`):null}renderIndicatorText(){let{indicator:e,messages:o,buttonId:r}=this;return t`<div aria-labelledby=${r??n} aria-live=polite class=${a(y.screenReaderText)} role=region ${l(this.indicatorRef)}>${e?o.indicator:null}</div>`}renderIconContainer(){let{loading:e,icon:o,scale:r,el:s,iconFlipRtl:m,indicator:d}=this,u=r==="l"?"l":"m",h=e?t`<calcite-loader inline .label=${this.messages.loading} .scale=${u}></calcite-loader>`:null,b=o?t`<calcite-icon class=${a({[i.indicatorWithIcon]:d})} .flipRtl=${m} .icon=${o} .scale=${C(this.scale)}></calcite-icon>`:null,c=h||b,p=c||s.children?.length,f=t`<div class=${a({[i.slotContainer]:!0,[i.slotContainerHidden]:e})}><slot></slot></div>`;return p?g("icon-container",t`<div aria-hidden=true class=${a(i.iconContainer)}>${c}${f}</div>`):null}renderLabel(){let e=this.getAccessibleLabel();return e?t`<span class=${a(y.screenReaderText)} ${l(this.labelElRef)}>${e}</span>`:null}renderButton(){let{compact:e,disabled:o,icon:r,loading:s,textEnabled:m,indicator:d,indicatorRef:u,buttonId:h}=this,b=this.getLabelledByElements(),c={[i.button]:!0,[i.buttonTextVisible]:m,[i.buttonCompact]:e},p=t`${this.renderIconContainer()}${this.renderTextContainer()}${!r&&d&&g("indicator-no-icon",t`<div class=${a(i.indicatorWithoutIcon)}></div>`)||""}${this.renderLabel()}`,f=d&&u.value?[u.value]:[],$=[...this.aria?.controlsElements??[],...f];return this.dragHandle?t`<span .ariaBusy=${s} .ariaControlsElements=${$} .ariaDescribedByElements=${this.aria?.describedByElements} .ariaExpanded=${this.aria?.expanded} .ariaHasPopup=${this.aria?.hasPopup} .ariaLabelledByElements=${b} .ariaOwnsElements=${this.aria?.ownsElements} .ariaPressed=${this.aria?.pressed} class=${a(c)} id=${h??n} role=button tabindex=${(this.disabled?void 0:0)??n} ${l(this.buttonRef)}>${p}</span>`:t`<button .ariaBusy=${s} .ariaChecked=${this.aria?.checked} .ariaControlsElements=${$} .ariaDescribedByElements=${this.aria?.describedByElements} .ariaExpanded=${this.aria?.expanded} .ariaHasPopup=${this.aria?.hasPopup} .ariaLabelledByElements=${b} .ariaOwnsElements=${this.aria?.ownsElements} .ariaPressed=${this.aria?.pressed} class=${a(c)} .disabled=${o} id=${h??n} .role=${this.aria?.role} type=${this.type??n} ${l(this.buttonRef)}>${p}</button>`}render(){return this.interactiveContainer({disabled:this.disabled,children:t`${this.renderButton()}${this.renderIndicatorText()}`})}};w("calcite-action",k);export{k as Action};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as m}from"./4XAA4FL5.js";import{a as x}from"./YP3AYJH3.js";import{a as u}from"./JDJW7IOG.js";import{a as f}from"./6DDEBJT6.js";import{a as b}from"./ZWPNZ5XW.js";import"./FLHFZN4H.js";import"./YFCK7FOA.js";import{s as i}from"./ER7WXLPC.js";import{E as h,F as p,G as v,H as t,S as g,g as d,h as c,p as l}from"./DBYBKXUC.js";var a={container:"container",contentWrapper:"content-wrapper",header:"header",footer:"footer",checkboxWrapper:"checkbox-wrapper",checkboxWrapperDeprecated:"checkbox-wrapper-deprecated",thumbnailWrapper:"thumbnail-wrapper",headerTextContainer:"header-text-container",cardContent:"card-content",hasSlottedContent:"has-slotted-content"},r={thumbnail:"thumbnail",heading:"heading",description:"description",footerStart:"footer-start",footerEnd:"footer-end"},n={selected:"check-square-f",unselected:"square",selectedSingle:"circle-f",unselectedSingle:"circle"},w=d`: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;max-inline-size:100%}:host([scale=s]){--calcite-internal-card-header-text-container-padding-inline: var(--calcite-space-sm);--calcite-internal-card-header-text-container-padding-block: var(--calcite-space-xs);--calcite-internal-card-header-text-container-padding-right: 0;--calcite-internal-card-heading-font-size: var(--calcite-font-size-relative-sm);--calcite-internal-card-description-font-size: var(--calcite-font-size-relative-xs);--calcite-internal-card-checkbox-wrapper-padding: var(--calcite-space-xs);--calcite-internal-card-checkbox-wrapper-margin: var(--calcite-space-xs);--calcite-internal-card-slotted-content-padding: var(--calcite-space-sm);--calcite-internal-card-footer-padding-inline: var(--calcite-space-sm);--calcite-internal-card-footer-start-end-gap: var(--calcite-space-base)}:host([scale=m]){--calcite-internal-card-header-text-container-padding-inline: var(--calcite-space-md);--calcite-internal-card-header-text-container-padding-block: var(--calcite-space-sm);--calcite-internal-card-header-text-container-padding-right: var(--calcite-space-base);--calcite-internal-card-heading-font-size: var(--calcite-font-size-relative-base);--calcite-internal-card-description-font-size: var(--calcite-font-size-relative-sm);--calcite-internal-card-checkbox-wrapper-padding: var(--calcite-space-sm);--calcite-internal-card-checkbox-wrapper-margin: var(--calcite-space-sm);--calcite-internal-card-slotted-content-padding: var(--calcite-space-md);--calcite-internal-card-footer-padding-inline: var(--calcite-space-md);--calcite-internal-card-footer-start-end-gap: var(--calcite-space-2xs)}:host([scale=l]){--calcite-internal-card-header-text-container-padding-inline: var(--calcite-space-lg);--calcite-internal-card-header-text-container-padding-block: var(--calcite-space-md);--calcite-internal-card-header-text-container-padding-right: var(--calcite-space-xs);--calcite-internal-card-heading-font-size: var(--calcite-font-size-relative-md);--calcite-internal-card-description-font-size: var(--calcite-font-size-relative-base);--calcite-internal-card-checkbox-wrapper-padding: var(--calcite-space-md);--calcite-internal-card-checkbox-wrapper-margin: var(--calcite-space-md);--calcite-internal-card-slotted-content-padding: var(--calcite-space-lg);--calcite-internal-card-footer-padding-inline: var(--calcite-space-lg);--calcite-internal-card-footer-start-end-gap: var(--calcite-space-sm)}.content-wrapper{position:relative;display:flex;block-size:100%;flex-direction:column;justify-content:space-between;overflow:hidden;border:var(--calcite-border-width-sm) solid var(--calcite-card-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-card-corner-radius, var(--calcite-corner-radius-sharp));background-color:var(--calcite-card-background-color, var(--calcite-color-foreground-1));box-shadow:var(--calcite-card-shadow, var(--calcite-shadow-none));pointer-events:none}::slotted(*){pointer-events:auto}:host(:not([selectable])) .content-wrapper:not(.non-interactive){outline-color:transparent}:host(:not([selectable])) .content-wrapper:not(.non-interactive):focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.container{position:relative;display:flex;flex:1 1 auto;flex-direction:column}:host([loading]) .content-wrapper *:not(calcite-loader):not(.calcite-card-loader-container){pointer-events:none;opacity:0}:host([loading]) .calcite-card-loader-container{position:absolute;inset:0;display:flex;align-items:center}.header{display:flex;flex-direction:row;align-items:flex-start}.header-text-container{display:flex;flex-direction:column;inline-size:100%;justify-content:center;padding-inline:var(--calcite-internal-card-header-text-container-padding-inline);padding-block:var(--calcite-internal-card-header-text-container-padding-block)}.header-text-container:not(:only-child){padding-inline-end:var(--calcite-internal-card-header-text-container-padding-right)}.footer{display:flex;margin-block-start:auto;flex-direction:row;align-content:space-between;justify-content:space-between;padding-inline:var(--calcite-internal-card-footer-padding-inline);padding-block-start:var(--calcite-space-2xs);padding-block-end:var(--calcite-space-md)}.card-content{block-size:auto;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}.has-slotted-content{padding:var(--calcite-internal-card-slotted-content-padding)}:host([selected]) .content-wrapper{border:1px solid var(--calcite-card-accent-color-selected, var(--calcite-color-brand))}:host([selectable]) .header{padding-inline-end:var(--calcite-spacing-xxxl)}slot[name=heading]::slotted(*),*::slotted([slot=heading]){color:var(--calcite-color-text-1);margin:0;font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-relative-snug);font-size:var(--calcite-internal-card-heading-font-size)}slot[name=description]::slotted(*),*::slotted([slot=description]){color:var(--calcite-color-text-2);margin:0;font-weight:var(--calcite-font-weight-normal);line-height:var(--calcite-font-line-height-relative-snug);font-size:var(--calcite-internal-card-description-font-size)}slot[name=thumbnail]::slotted(img),img::slotted([slot=thumbnail]){min-inline-size:100%;max-inline-size:100%}slot[name=footer-start]::slotted(*),*::slotted([slot=footer-start]){align-self:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);margin-inline-end:auto}slot[name=footer-end]::slotted(*),*::slotted([slot=footer-end]){align-self:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}.checkbox-wrapper-deprecated{pointer-events:auto;position:absolute;inset-block-start:var(--calcite-spacing-sm);inset-inline-end:var(--calcite-spacing-sm);margin:0;padding:0;color:var(--calcite-card-selection-color, var(--calcite-color-text-3))}.checkbox-wrapper-deprecated:hover{background-color:var(--calcite-card-selection-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-card-selection-color-hover, var(--calcite-card-selection-icon-color-hover, var(--calcite-color-text-2)))}.checkbox-wrapper-deprecated:active{background-color:var(--calcite-card-selection-background-color-press, var(--calcite-color-transparent-press))}.checkbox-wrapper{outline-color:transparent;cursor:pointer;pointer-events:auto;display:flex;align-items:center;justify-items:center;color:var(--calcite-card-selection-color, var(--calcite-color-text-3));padding:var(--calcite-internal-card-checkbox-wrapper-padding);margin:var(--calcite-internal-card-checkbox-wrapper-margin)}.checkbox-wrapper:hover{background-color:var(--calcite-card-selection-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-card-selection-color-hover, var(--calcite-card-selection-icon-color-hover, var(--calcite-color-text-2)))}.checkbox-wrapper:active{background-color:var(--calcite-card-selection-background-color-press, var(--calcite-color-transparent-press))}.checkbox-wrapper calcite-icon{pointer-events:none}:host([selected]) .checkbox-wrapper-deprecated,:host([selected]) .checkbox-wrapper{color:var(--calcite-card-accent-color-selected, var(--calcite-card-selection-icon-color-selected, var(--calcite-color-brand)))}:host(:not([selectable])) .content-wrapper:not(.non-interactive):focus .checkbox-wrapper-deprecated,:host(:not([selectable])) .content-wrapper:not(.non-interactive):focus .checkbox-wrapper{background-color:var(--calcite-card-selection-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-card-selection-color-hover, var(--calcite-card-selection-icon-color-hover, var(--calcite-color-text-2)))}:host([selected]:not([selectable])) .content-wrapper:not(.non-interactive):focus .checkbox-wrapper-deprecated,:host([selected]:not([selectable])) .content-wrapper:not(.non-interactive):focus .checkbox-wrapper{background-color:var(--calcite-card-selection-background-color-press, var(--calcite-color-transparent-press));color:var(--calcite-card-accent-color-selected, var(--calcite-card-selection-icon-color-selected, var(--calcite-color-brand)))}.thumbnail-wrapper{display:flex}.content-wrapper.inline{flex-direction:row}.content-wrapper.inline>.container{inline-size:60%}.content-wrapper.inline>.thumbnail-wrapper{inline-size:40%;align-items:flex-start}.content-wrapper.inline slot[name=thumbnail]::slotted(img),.content-wrapper.inline img::slotted([slot=thumbnail]){inline-size:100%}slot[name=footer-start]::slotted(*),slot[name=footer-end]::slotted(*){display:flex;gap:var(--calcite-internal-card-footer-start-end-gap)}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,s=class extends v{constructor(){super(...arguments),this.containerRef=h(),this.messages=u(),this.focusSetter=f()(this),this.interactiveContainer=m(this),this.hasContent=!1,this.hasDescription=!1,this.hasFooterEnd=!1,this.hasFooterStart=!1,this.hasHeading=!1,this.hasThumbnail=!1,this.disabled=!1,this.loading=!1,this.scale="m",this.selectable=!1,this.selected=!1,this.selectionMode="none",this.thumbnailPosition="block-start",this.calciteCardSelect=l({cancelable:!1}),this.calciteInternalCardKeyEvent=l({cancelable:!1})}static{this.properties={hasContent:[16,{},{state:!0}],hasDescription:[16,{},{state:!0}],hasFooterEnd:[16,{},{state:!0}],hasFooterStart:[16,{},{state:!0}],hasHeading:[16,{},{state:!0}],hasThumbnail:[16,{},{state:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],scale:[3,{},{reflect:!0}],selectable:[7,{},{reflect:!0,type:Boolean}],selected:[7,{},{reflect:!0,type:Boolean}],selectionMode:1,thumbnailPosition:[3,{},{reflect:!0}]}}static{this.styles=w}async setFocus(e){return this.focusSetter(()=>({target:this.containerRef.value,includeContainer:!0}),e)}handleThumbnailSlotChange(e){this.hasThumbnail=i(e)}handleHeadingSlotChange(e){this.hasHeading=i(e)}handleDescriptionSlotChange(e){this.hasDescription=i(e)}handleFooterStartSlotChange(e){this.hasFooterStart=i(e)}handleFooterEndSlotChange(e){this.hasFooterEnd=i(e)}handleDefaultSlotChange(e){this.hasContent=i(e)}keyDownHandler(e){if(e.target===this.containerRef.value&&!this.selectable&&!this.disabled)if(x(e.key)&&this.selectionMode!=="none")this.calciteCardSelect.emit(),e.preventDefault();else switch(e.key){case"ArrowRight":case"ArrowLeft":case"Home":case"End":this.calciteInternalCardKeyEvent.emit(e),e.preventDefault();break}}cardBodyClickHandler(e){e.target===this.containerRef.value&&!this.selectable&&!this.disabled&&this.selectionMode!=="none"&&this.calciteCardSelect.emit()}selectCardDeprecated(e){this.selected=e.currentTarget.checked,this.calciteCardSelect.emit()}cardSelectClick(e){this.disabled||(e.preventDefault(),this.calciteCardSelect.emit(),this.setFocus())}renderCheckboxDeprecated(){return c`<calcite-label class=${t(a.checkboxWrapperDeprecated)}><calcite-checkbox .checked=${this.selected} .label=${this.messages.select} @calciteCheckboxChange=${this.selectCardDeprecated}></calcite-checkbox></calcite-label>`}renderThumbnail(){return c`<section class=${t(a.thumbnailWrapper)} .hidden=${!this.hasThumbnail}><slot name=${r.thumbnail} @slotchange=${this.handleThumbnailSlotChange}></slot></section>`}renderSelectionIcon(){let e=this.selectionMode==="multiple"&&this.selected?n.selected:this.selectionMode==="multiple"?n.unselected:this.selected?n.selectedSingle:n.unselectedSingle;return c`<div class=${t(a.checkboxWrapper)} @pointerdown=${this.cardSelectClick} tabindex=-1><calcite-icon .icon=${e} .scale=${b(this.scale)}></calcite-icon></div>`}renderHeader(){let e=this.hasHeading||this.hasDescription;return c`<header class=${t(a.header)} .hidden=${!e}>${this.selectable?this.renderCheckboxDeprecated():null}<div class=${t(a.headerTextContainer)}><slot name=${r.heading} @slotchange=${this.handleHeadingSlotChange}></slot><slot name=${r.description} @slotchange=${this.handleDescriptionSlotChange}></slot></div>${this.selectionMode!=="none"&&this.renderSelectionIcon()||""}</header>`}renderFooter(){let e=this.hasFooterStart||this.hasFooterEnd;return c`<footer class=${t(a.footer)} .hidden=${!e}><slot name=${r.footerStart} @slotchange=${this.handleFooterStartSlotChange}></slot><slot name=${r.footerEnd} @slotchange=${this.handleFooterEndSlotChange}></slot></footer>`}render(){let e=this.thumbnailPosition.startsWith("inline"),o=this.thumbnailPosition.endsWith("start"),k=this.selectionMode==="multiple"?"checkbox":this.selectionMode!=="none"?"radio":void 0;return this.interactiveContainer({disabled:this.disabled,children:c`<div .ariaChecked=${this.selectionMode!=="none"?this.selected:void 0} .ariaLabel=${this.label} class=${t({[a.contentWrapper]:!0,inline:e})} @click=${this.cardBodyClickHandler} @keydown=${this.keyDownHandler} .role=${k} .tabIndex=${!this.selectable||this.disabled?0:-1} ${p(this.containerRef)}>${this.loading?c`<div aria-live=polite class="calcite-card-loader-container"><calcite-loader .label=${this.messages.loading}></calcite-loader></div>`:null}${o&&this.renderThumbnail()||""}<section .ariaBusy=${this.loading} class=${t({[a.container]:!0})}>${this.renderHeader()}<div class=${t({[a.cardContent]:!0,[a.hasSlottedContent]:this.hasContent})}><slot @slotchange=${this.handleDefaultSlotChange}></slot></div>${this.renderFooter()}</section>${!o&&this.renderThumbnail()||""}</div>`})}};g("calcite-card",s);export{s as Card};
2
+ import{a as m}from"./XGJWH7PU.js";import{a as x}from"./YP3AYJH3.js";import{a as u}from"./B4QYMPP5.js";import{a as f}from"./LNRCU5CV.js";import{a as b}from"./ZWPNZ5XW.js";import"./CSC2MWHL.js";import"./DWZH5S6A.js";import{s as i}from"./GOISJED7.js";import{E as h,F as p,G as v,H as t,S as g,g as d,h as c,p as l}from"./3CQ6JCVK.js";var a={container:"container",contentWrapper:"content-wrapper",header:"header",footer:"footer",checkboxWrapper:"checkbox-wrapper",checkboxWrapperDeprecated:"checkbox-wrapper-deprecated",thumbnailWrapper:"thumbnail-wrapper",headerTextContainer:"header-text-container",cardContent:"card-content",hasSlottedContent:"has-slotted-content"},r={thumbnail:"thumbnail",heading:"heading",description:"description",footerStart:"footer-start",footerEnd:"footer-end"},n={selected:"check-square-f",unselected:"square",selectedSingle:"circle-f",unselectedSingle:"circle"},w=d`: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;max-inline-size:100%}:host([scale=s]){--calcite-internal-card-header-text-container-padding-inline: var(--calcite-space-sm);--calcite-internal-card-header-text-container-padding-block: var(--calcite-space-xs);--calcite-internal-card-header-text-container-padding-right: 0;--calcite-internal-card-heading-font-size: var(--calcite-font-size-relative-sm);--calcite-internal-card-description-font-size: var(--calcite-font-size-relative-xs);--calcite-internal-card-checkbox-wrapper-padding: var(--calcite-space-xs);--calcite-internal-card-checkbox-wrapper-margin: var(--calcite-space-xs);--calcite-internal-card-slotted-content-padding: var(--calcite-space-sm);--calcite-internal-card-footer-padding-inline: var(--calcite-space-sm);--calcite-internal-card-footer-start-end-gap: var(--calcite-space-base)}:host([scale=m]){--calcite-internal-card-header-text-container-padding-inline: var(--calcite-space-md);--calcite-internal-card-header-text-container-padding-block: var(--calcite-space-sm);--calcite-internal-card-header-text-container-padding-right: var(--calcite-space-base);--calcite-internal-card-heading-font-size: var(--calcite-font-size-relative-base);--calcite-internal-card-description-font-size: var(--calcite-font-size-relative-sm);--calcite-internal-card-checkbox-wrapper-padding: var(--calcite-space-sm);--calcite-internal-card-checkbox-wrapper-margin: var(--calcite-space-sm);--calcite-internal-card-slotted-content-padding: var(--calcite-space-md);--calcite-internal-card-footer-padding-inline: var(--calcite-space-md);--calcite-internal-card-footer-start-end-gap: var(--calcite-space-2xs)}:host([scale=l]){--calcite-internal-card-header-text-container-padding-inline: var(--calcite-space-lg);--calcite-internal-card-header-text-container-padding-block: var(--calcite-space-md);--calcite-internal-card-header-text-container-padding-right: var(--calcite-space-xs);--calcite-internal-card-heading-font-size: var(--calcite-font-size-relative-md);--calcite-internal-card-description-font-size: var(--calcite-font-size-relative-base);--calcite-internal-card-checkbox-wrapper-padding: var(--calcite-space-md);--calcite-internal-card-checkbox-wrapper-margin: var(--calcite-space-md);--calcite-internal-card-slotted-content-padding: var(--calcite-space-lg);--calcite-internal-card-footer-padding-inline: var(--calcite-space-lg);--calcite-internal-card-footer-start-end-gap: var(--calcite-space-sm)}.content-wrapper{position:relative;display:flex;block-size:100%;flex-direction:column;justify-content:space-between;overflow:hidden;border:var(--calcite-border-width-sm) solid var(--calcite-card-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-card-corner-radius, var(--calcite-corner-radius-sharp));background-color:var(--calcite-card-background-color, var(--calcite-color-foreground-1));box-shadow:var(--calcite-card-shadow, var(--calcite-shadow-none));pointer-events:none}::slotted(*){pointer-events:auto}:host(:not([selectable])) .content-wrapper:not(.non-interactive){outline-color:transparent}:host(:not([selectable])) .content-wrapper:not(.non-interactive):focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.container{position:relative;display:flex;flex:1 1 auto;flex-direction:column}:host([loading]) .content-wrapper *:not(calcite-loader):not(.calcite-card-loader-container){pointer-events:none;opacity:0}:host([loading]) .calcite-card-loader-container{position:absolute;inset:0;display:flex;align-items:center}.header{display:flex;flex-direction:row;align-items:flex-start}.header-text-container{display:flex;flex-direction:column;inline-size:100%;justify-content:center;padding-inline:var(--calcite-internal-card-header-text-container-padding-inline);padding-block:var(--calcite-internal-card-header-text-container-padding-block)}.header-text-container:not(:only-child){padding-inline-end:var(--calcite-internal-card-header-text-container-padding-right)}.footer{display:flex;margin-block-start:auto;flex-direction:row;align-content:space-between;justify-content:space-between;padding-inline:var(--calcite-internal-card-footer-padding-inline);padding-block-start:var(--calcite-space-2xs);padding-block-end:var(--calcite-space-md)}.card-content{block-size:auto;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}.has-slotted-content{padding:var(--calcite-internal-card-slotted-content-padding)}:host([selected]) .content-wrapper{border:1px solid var(--calcite-card-accent-color-selected, var(--calcite-color-brand))}:host([selectable]) .header{padding-inline-end:var(--calcite-spacing-xxxl)}slot[name=heading]::slotted(*),*::slotted([slot=heading]){color:var(--calcite-color-text-1);margin:0;font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-relative-snug);font-size:var(--calcite-internal-card-heading-font-size)}slot[name=description]::slotted(*),*::slotted([slot=description]){color:var(--calcite-color-text-2);margin:0;font-weight:var(--calcite-font-weight-normal);line-height:var(--calcite-font-line-height-relative-snug);font-size:var(--calcite-internal-card-description-font-size)}slot[name=thumbnail]::slotted(img),img::slotted([slot=thumbnail]){min-inline-size:100%;max-inline-size:100%}slot[name=footer-start]::slotted(*),*::slotted([slot=footer-start]){align-self:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);margin-inline-end:auto}slot[name=footer-end]::slotted(*),*::slotted([slot=footer-end]){align-self:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}.checkbox-wrapper-deprecated{pointer-events:auto;position:absolute;inset-block-start:var(--calcite-spacing-sm);inset-inline-end:var(--calcite-spacing-sm);margin:0;padding:0;color:var(--calcite-card-selection-color, var(--calcite-color-text-3))}.checkbox-wrapper-deprecated:hover{background-color:var(--calcite-card-selection-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-card-selection-color-hover, var(--calcite-card-selection-icon-color-hover, var(--calcite-color-text-2)))}.checkbox-wrapper-deprecated:active{background-color:var(--calcite-card-selection-background-color-press, var(--calcite-color-transparent-press))}.checkbox-wrapper{outline-color:transparent;cursor:pointer;pointer-events:auto;display:flex;align-items:center;justify-items:center;color:var(--calcite-card-selection-color, var(--calcite-color-text-3));padding:var(--calcite-internal-card-checkbox-wrapper-padding);margin:var(--calcite-internal-card-checkbox-wrapper-margin)}.checkbox-wrapper:hover{background-color:var(--calcite-card-selection-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-card-selection-color-hover, var(--calcite-card-selection-icon-color-hover, var(--calcite-color-text-2)))}.checkbox-wrapper:active{background-color:var(--calcite-card-selection-background-color-press, var(--calcite-color-transparent-press))}.checkbox-wrapper calcite-icon{pointer-events:none}:host([selected]) .checkbox-wrapper-deprecated,:host([selected]) .checkbox-wrapper{color:var(--calcite-card-accent-color-selected, var(--calcite-card-selection-icon-color-selected, var(--calcite-color-brand)))}:host(:not([selectable])) .content-wrapper:not(.non-interactive):focus .checkbox-wrapper-deprecated,:host(:not([selectable])) .content-wrapper:not(.non-interactive):focus .checkbox-wrapper{background-color:var(--calcite-card-selection-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-card-selection-color-hover, var(--calcite-card-selection-icon-color-hover, var(--calcite-color-text-2)))}:host([selected]:not([selectable])) .content-wrapper:not(.non-interactive):focus .checkbox-wrapper-deprecated,:host([selected]:not([selectable])) .content-wrapper:not(.non-interactive):focus .checkbox-wrapper{background-color:var(--calcite-card-selection-background-color-press, var(--calcite-color-transparent-press));color:var(--calcite-card-accent-color-selected, var(--calcite-card-selection-icon-color-selected, var(--calcite-color-brand)))}.thumbnail-wrapper{display:flex}.content-wrapper.inline{flex-direction:row}.content-wrapper.inline>.container{inline-size:60%}.content-wrapper.inline>.thumbnail-wrapper{inline-size:40%;align-items:flex-start}.content-wrapper.inline slot[name=thumbnail]::slotted(img),.content-wrapper.inline img::slotted([slot=thumbnail]){inline-size:100%}slot[name=footer-start]::slotted(*),slot[name=footer-end]::slotted(*){display:flex;gap:var(--calcite-internal-card-footer-start-end-gap)}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,s=class extends v{constructor(){super(...arguments),this.containerRef=h(),this.messages=u(),this.focusSetter=f()(this),this.interactiveContainer=m(this),this.hasContent=!1,this.hasDescription=!1,this.hasFooterEnd=!1,this.hasFooterStart=!1,this.hasHeading=!1,this.hasThumbnail=!1,this.disabled=!1,this.loading=!1,this.scale="m",this.selectable=!1,this.selected=!1,this.selectionMode="none",this.thumbnailPosition="block-start",this.calciteCardSelect=l({cancelable:!1}),this.calciteInternalCardKeyEvent=l({cancelable:!1})}static{this.properties={hasContent:[16,{},{state:!0}],hasDescription:[16,{},{state:!0}],hasFooterEnd:[16,{},{state:!0}],hasFooterStart:[16,{},{state:!0}],hasHeading:[16,{},{state:!0}],hasThumbnail:[16,{},{state:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],scale:[3,{},{reflect:!0}],selectable:[7,{},{reflect:!0,type:Boolean}],selected:[7,{},{reflect:!0,type:Boolean}],selectionMode:1,thumbnailPosition:[3,{},{reflect:!0}]}}static{this.styles=w}async setFocus(e){return this.focusSetter(()=>({target:this.containerRef.value,includeContainer:!0}),e)}handleThumbnailSlotChange(e){this.hasThumbnail=i(e)}handleHeadingSlotChange(e){this.hasHeading=i(e)}handleDescriptionSlotChange(e){this.hasDescription=i(e)}handleFooterStartSlotChange(e){this.hasFooterStart=i(e)}handleFooterEndSlotChange(e){this.hasFooterEnd=i(e)}handleDefaultSlotChange(e){this.hasContent=i(e)}keyDownHandler(e){if(e.target===this.containerRef.value&&!this.selectable&&!this.disabled)if(x(e.key)&&this.selectionMode!=="none")this.calciteCardSelect.emit(),e.preventDefault();else switch(e.key){case"ArrowRight":case"ArrowLeft":case"Home":case"End":this.calciteInternalCardKeyEvent.emit(e),e.preventDefault();break}}cardBodyClickHandler(e){e.target===this.containerRef.value&&!this.selectable&&!this.disabled&&this.selectionMode!=="none"&&this.calciteCardSelect.emit()}selectCardDeprecated(e){this.selected=e.currentTarget.checked,this.calciteCardSelect.emit()}cardSelectClick(e){this.disabled||(e.preventDefault(),this.calciteCardSelect.emit(),this.setFocus())}renderCheckboxDeprecated(){return c`<calcite-label class=${t(a.checkboxWrapperDeprecated)}><calcite-checkbox .checked=${this.selected} .label=${this.messages.select} @calciteCheckboxChange=${this.selectCardDeprecated}></calcite-checkbox></calcite-label>`}renderThumbnail(){return c`<section class=${t(a.thumbnailWrapper)} .hidden=${!this.hasThumbnail}><slot name=${r.thumbnail} @slotchange=${this.handleThumbnailSlotChange}></slot></section>`}renderSelectionIcon(){let e=this.selectionMode==="multiple"&&this.selected?n.selected:this.selectionMode==="multiple"?n.unselected:this.selected?n.selectedSingle:n.unselectedSingle;return c`<div class=${t(a.checkboxWrapper)} @pointerdown=${this.cardSelectClick} tabindex=-1><calcite-icon .icon=${e} .scale=${b(this.scale)}></calcite-icon></div>`}renderHeader(){let e=this.hasHeading||this.hasDescription;return c`<header class=${t(a.header)} .hidden=${!e}>${this.selectable?this.renderCheckboxDeprecated():null}<div class=${t(a.headerTextContainer)}><slot name=${r.heading} @slotchange=${this.handleHeadingSlotChange}></slot><slot name=${r.description} @slotchange=${this.handleDescriptionSlotChange}></slot></div>${this.selectionMode!=="none"&&this.renderSelectionIcon()||""}</header>`}renderFooter(){let e=this.hasFooterStart||this.hasFooterEnd;return c`<footer class=${t(a.footer)} .hidden=${!e}><slot name=${r.footerStart} @slotchange=${this.handleFooterStartSlotChange}></slot><slot name=${r.footerEnd} @slotchange=${this.handleFooterEndSlotChange}></slot></footer>`}render(){let e=this.thumbnailPosition.startsWith("inline"),o=this.thumbnailPosition.endsWith("start"),k=this.selectionMode==="multiple"?"checkbox":this.selectionMode!=="none"?"radio":void 0;return this.interactiveContainer({disabled:this.disabled,children:c`<div .ariaChecked=${this.selectionMode!=="none"?this.selected:void 0} .ariaLabel=${this.label} class=${t({[a.contentWrapper]:!0,inline:e})} @click=${this.cardBodyClickHandler} @keydown=${this.keyDownHandler} .role=${k} .tabIndex=${!this.selectable||this.disabled?0:-1} ${p(this.containerRef)}>${this.loading?c`<div aria-live=polite class="calcite-card-loader-container"><calcite-loader .label=${this.messages.loading}></calcite-loader></div>`:null}${o&&this.renderThumbnail()||""}<section .ariaBusy=${this.loading} class=${t({[a.container]:!0})}>${this.renderHeader()}<div class=${t({[a.cardContent]:!0,[a.hasSlottedContent]:this.hasContent})}><slot @slotchange=${this.handleDefaultSlotChange}></slot></div>${this.renderFooter()}</section>${!o&&this.renderThumbnail()||""}</div>`})}};g("calcite-card",s);export{s as Card};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as C}from"./NVENUCRF.js";import{a as k}from"./UHAH4IYQ.js";import{c as S}from"./NUJKT5EY.js";import{a as I}from"./DKJI4BME.js";import{a as A}from"./7ZILEGVA.js";import{a as w}from"./4XAA4FL5.js";import{a as x}from"./JDJW7IOG.js";import{a as y}from"./6DDEBJT6.js";import"./ZWPNZ5XW.js";import{e as b}from"./FLHFZN4H.js";import"./YFCK7FOA.js";import{t as v}from"./ER7WXLPC.js";import{G as p,H as u,L as f,S as g,g as d,h as o,l as h,p as m}from"./DBYBKXUC.js";var q={itemWrapper:"item-wrapper"},D={validationMessage:"segmentedControlValidationMessage"},$=d`: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;flex-direction:column}.item-wrapper{display:flex;background-color:var(--calcite-color-foreground-1);inline-size:fit-content;border-radius:var(--calcite-segmented-control-corner-radius, var(--calcite-corner-radius));outline:1px solid var(--calcite-segmented-control-border-color, var(--calcite-color-border-input));outline-offset:-1px}:host([appearance=outline])>.item-wrapper{background-color:transparent}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([layout=vertical])>.item-wrapper{flex-direction:column;align-items:flex-start;align-self:flex-start}:host([width=full])>.item-wrapper{inline-size:100%;min-inline-size:fit-content}:host([width=full])>.item-wrapper ::slotted(calcite-segmented-control-item){flex:1 1 auto}:host([width=full][layout=vertical])>.item-wrapper ::slotted(calcite-segmented-control-item){justify-content:flex-start}.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}::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}:host([hidden]){display:none}[hidden]{display:none}`,c=class extends p{constructor(){super(),this.direction=b(),this.formSupport=S({inputType:"text"})(this),this.items=[],this.messages=x(),this.focusSetter=y()(this),this.interactiveContainer=w(this),this.labelable=A(this),this.appearance="solid",this.disabled=!1,this.layout="horizontal",this.required=!1,this.scale="m",this.status="idle",this.value=null,this.width="auto",this.calciteSegmentedControlChange=m({cancelable:!1}),this.listen("calciteInternalSegmentedControlItemChange",this.handleSelected),this.listen("keydown",this.handleKeyDown),this.listen("click",this.handleClick)}static{this.properties={appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],labelText:1,messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectedItem:[0,{},{attribute:!1}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:f,type:String},{reflect:!0}],validationMessage:1,validity:[32,{},{readOnly:!0,attribute:!1}],value:1,width:[3,{},{reflect:!0}]}}static{this.formAssociated=!0}static{this.styles=$}async setFocus(e){return this.focusSetter(()=>this.selectedItem||this.items[0],e)}willUpdate(e){(e.has("appearance")&&(this.hasUpdated||this.appearance!=="solid")||e.has("layout")&&(this.hasUpdated||this.layout!=="horizontal")||e.has("scale")&&(this.hasUpdated||this.scale!=="m"))&&this.handleItemPropChange(),e.has("value")&&(this.hasUpdated||this.value!==null)&&this.valueHandler(this.value),e.has("selectedItem")&&this.handleSelectedItemChange(this.selectedItem,e.get("selectedItem"))}loaded(){this.formSupport.overrideDefaultValue(this.value)}valueHandler(e){let{items:t}=this;t.forEach(a=>a.checked=a.value===e)}handleSelectedItemChange(e,t){if(this.value=e?.value,e===t)return;let{items:a}=this,l=a.filter(s=>s===e).pop();l?this.selectItem(l):a[0]&&(a[0].tabIndex=0)}handleClick(e){this.disabled||e.target.localName==="calcite-segmented-control-item"&&this.selectItem(e.target,!0)}handleSelected(e){e.preventDefault();let t=e.target;t.checked&&this.selectItem(t),e.stopPropagation()}handleKeyDown(e){let t=["ArrowLeft","ArrowUp","ArrowRight","ArrowDown"," "],{key:a}=e,{selectedItem:l}=this;if(t.indexOf(a)===-1)return;let s=a;this.direction==="rtl"&&(a==="ArrowRight"&&(s="ArrowLeft"),a==="ArrowLeft"&&(s="ArrowRight"));let{items:i}=this,n=-1;switch(i.forEach((r,z)=>{r===l&&(n=z)}),s){case"ArrowLeft":case"ArrowUp":{e.preventDefault();let r=n<1?i[i.length-1]:i[n-1];this.selectItem(r,!0);return}case"ArrowRight":case"ArrowDown":{e.preventDefault();let r=n===-1?i[1]:i[n+1]||i[0];this.selectItem(r,!0);return}case" ":e.preventDefault(),this.selectItem(e.target,!0);return;default:return}}handleItemPropChange(){let{items:e}=this;e.forEach(t=>{t.appearance=this.appearance,t.layout=this.layout,t.scale=this.scale})}handleSelectedItem(){let{items:e}=this,t=e.filter(a=>a.checked).pop();t?this.selectItem(t):e[0]&&(e[0].tabIndex=0)}async handleDefaultSlotChange(e){let t=v(e).filter(a=>a.matches("calcite-segmented-control-item"));await Promise.all(t.map(a=>a.componentOnReady())),this.items=t,this.handleSelectedItem(),this.handleItemPropChange()}onLabelClick(){this.setFocus()}async selectItem(e,t=!1){if(e===this.selectedItem)return;let{items:a}=this,l;a.forEach(s=>{let i=s===e;(i&&!s.checked||!i&&s.checked)&&(s.checked=i),s.tabIndex=i?0:-1,i&&(l=s)}),this.selectedItem=l,l&&t&&(await this.updateComplete,this.calciteSegmentedControlChange.emit(),l.focus())}render(){return this.el.role="radiogroup",o`${this.labelText&&k({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div aria-errormessage=${D.validationMessage} aria-label=${I(this)??h} .ariaInvalid=${this.status==="invalid"} .ariaRequired=${this.required} class=${u(q.itemWrapper)}>${this.interactiveContainer({disabled:this.disabled,children:o`<slot @slotchange=${this.handleDefaultSlotChange}></slot>`})}</div>${this.validationMessage&&this.status==="invalid"?C({icon:this.validationIcon,id:D.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`}};g("calcite-segmented-control",c);export{c as SegmentedControl};
2
+ import{a as C}from"./UPMYWTPY.js";import{a as k}from"./BNJ2ECUV.js";import{c as S}from"./RD3MZVBU.js";import{a as I}from"./DKJI4BME.js";import{a as A}from"./LG5E6RXA.js";import{a as w}from"./XGJWH7PU.js";import{a as x}from"./B4QYMPP5.js";import{a as y}from"./LNRCU5CV.js";import"./ZWPNZ5XW.js";import{e as b}from"./CSC2MWHL.js";import"./DWZH5S6A.js";import{t as v}from"./GOISJED7.js";import{G as p,H as u,L as f,S as g,g as d,h as o,l as h,p as m}from"./3CQ6JCVK.js";var q={itemWrapper:"item-wrapper"},D={validationMessage:"segmentedControlValidationMessage"},$=d`: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;flex-direction:column}.item-wrapper{display:flex;background-color:var(--calcite-color-foreground-1);inline-size:fit-content;border-radius:var(--calcite-segmented-control-corner-radius, var(--calcite-corner-radius));outline:1px solid var(--calcite-segmented-control-border-color, var(--calcite-color-border-input));outline-offset:-1px}:host([appearance=outline])>.item-wrapper{background-color:transparent}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([layout=vertical])>.item-wrapper{flex-direction:column;align-items:flex-start;align-self:flex-start}:host([width=full])>.item-wrapper{inline-size:100%;min-inline-size:fit-content}:host([width=full])>.item-wrapper ::slotted(calcite-segmented-control-item){flex:1 1 auto}:host([width=full][layout=vertical])>.item-wrapper ::slotted(calcite-segmented-control-item){justify-content:flex-start}.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}::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}:host([hidden]){display:none}[hidden]{display:none}`,c=class extends p{constructor(){super(),this.direction=b(),this.formSupport=S({inputType:"text"})(this),this.items=[],this.messages=x(),this.focusSetter=y()(this),this.interactiveContainer=w(this),this.labelable=A(this),this.appearance="solid",this.disabled=!1,this.layout="horizontal",this.required=!1,this.scale="m",this.status="idle",this.value=null,this.width="auto",this.calciteSegmentedControlChange=m({cancelable:!1}),this.listen("calciteInternalSegmentedControlItemChange",this.handleSelected),this.listen("keydown",this.handleKeyDown),this.listen("click",this.handleClick)}static{this.properties={appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],labelText:1,messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectedItem:[0,{},{attribute:!1}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:f,type:String},{reflect:!0}],validationMessage:1,validity:[32,{},{readOnly:!0,attribute:!1}],value:1,width:[3,{},{reflect:!0}]}}static{this.formAssociated=!0}static{this.styles=$}async setFocus(e){return this.focusSetter(()=>this.selectedItem||this.items[0],e)}willUpdate(e){(e.has("appearance")&&(this.hasUpdated||this.appearance!=="solid")||e.has("layout")&&(this.hasUpdated||this.layout!=="horizontal")||e.has("scale")&&(this.hasUpdated||this.scale!=="m"))&&this.handleItemPropChange(),e.has("value")&&(this.hasUpdated||this.value!==null)&&this.valueHandler(this.value),e.has("selectedItem")&&this.handleSelectedItemChange(this.selectedItem,e.get("selectedItem"))}loaded(){this.formSupport.overrideDefaultValue(this.value)}valueHandler(e){let{items:t}=this;t.forEach(a=>a.checked=a.value===e)}handleSelectedItemChange(e,t){if(this.value=e?.value,e===t)return;let{items:a}=this,l=a.filter(s=>s===e).pop();l?this.selectItem(l):a[0]&&(a[0].tabIndex=0)}handleClick(e){this.disabled||e.target.localName==="calcite-segmented-control-item"&&this.selectItem(e.target,!0)}handleSelected(e){e.preventDefault();let t=e.target;t.checked&&this.selectItem(t),e.stopPropagation()}handleKeyDown(e){let t=["ArrowLeft","ArrowUp","ArrowRight","ArrowDown"," "],{key:a}=e,{selectedItem:l}=this;if(t.indexOf(a)===-1)return;let s=a;this.direction==="rtl"&&(a==="ArrowRight"&&(s="ArrowLeft"),a==="ArrowLeft"&&(s="ArrowRight"));let{items:i}=this,n=-1;switch(i.forEach((r,z)=>{r===l&&(n=z)}),s){case"ArrowLeft":case"ArrowUp":{e.preventDefault();let r=n<1?i[i.length-1]:i[n-1];this.selectItem(r,!0);return}case"ArrowRight":case"ArrowDown":{e.preventDefault();let r=n===-1?i[1]:i[n+1]||i[0];this.selectItem(r,!0);return}case" ":e.preventDefault(),this.selectItem(e.target,!0);return;default:return}}handleItemPropChange(){let{items:e}=this;e.forEach(t=>{t.appearance=this.appearance,t.layout=this.layout,t.scale=this.scale})}handleSelectedItem(){let{items:e}=this,t=e.filter(a=>a.checked).pop();t?this.selectItem(t):e[0]&&(e[0].tabIndex=0)}async handleDefaultSlotChange(e){let t=v(e).filter(a=>a.matches("calcite-segmented-control-item"));await Promise.all(t.map(a=>a.componentOnReady())),this.items=t,this.handleSelectedItem(),this.handleItemPropChange()}onLabelClick(){this.setFocus()}async selectItem(e,t=!1){if(e===this.selectedItem)return;let{items:a}=this,l;a.forEach(s=>{let i=s===e;(i&&!s.checked||!i&&s.checked)&&(s.checked=i),s.tabIndex=i?0:-1,i&&(l=s)}),this.selectedItem=l,l&&t&&(await this.updateComplete,this.calciteSegmentedControlChange.emit(),l.focus())}render(){return this.el.role="radiogroup",o`${this.labelText&&k({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div aria-errormessage=${D.validationMessage} aria-label=${I(this)??h} .ariaInvalid=${this.status==="invalid"} .ariaRequired=${this.required} class=${u(q.itemWrapper)}>${this.interactiveContainer({disabled:this.disabled,children:o`<slot @slotchange=${this.handleDefaultSlotChange}></slot>`})}</div>${this.validationMessage&&this.status==="invalid"?C({icon:this.validationIcon,id:D.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`}};g("calcite-segmented-control",c);export{c as SegmentedControl};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as i,b as m,c as o}from"./EMIJDMKX.js";import{a as r}from"./TOS26VDH.js";import{H as t}from"./DBYBKXUC.js";var p=({children:e,class:n,hidden:c=!1,key:f,level:a})=>{let s=a?i(`h${a}`):m`div`;return r(f,o`<${s} class=${t(n)} .hidden=${c}>${e}</${s}>`)};export{p as a};
2
+ import{a as i,b as m,c as o}from"./PGRQYEZM.js";import{a as r}from"./KTDUPBWG.js";import{H as t}from"./3CQ6JCVK.js";var p=({children:e,class:n,hidden:c=!1,key:f,level:a})=>{let s=a?i(`h${a}`):m`div`;return r(f,o`<${s} class=${t(n)} .hidden=${c}>${e}</${s}>`)};export{p as a};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a as ot}from"./44N6QRSL.js";import{a as tt}from"./5EBGPCB7.js";import{a as it,c as at}from"./BOMXI5JR.js";import{a as F}from"./ZOSYFXOS.js";import{a as Q}from"./VI7SBYXT.js";import{a as _}from"./B4QYMPP5.js";import{a as S,d as p}from"./5IJ25RMA.js";import{c as et,e as v}from"./DMK27J6W.js";import{c as W}from"./BEE5ZZFY.js";import{a as Z}from"./LNRCU5CV.js";import"./ZWPNZ5XW.js";import{e as J}from"./CSC2MWHL.js";import"./DWZH5S6A.js";import{C as h,t as X,u as Y,x as G}from"./GOISJED7.js";import{E as f,F as y,G as j,H as E,N as V,S as K,g as q,h as A,l as N,p as z}from"./3CQ6JCVK.js";var ht=({bufferSize:l=0,containerSize:t,itemSizes:e})=>{let i=t-l,a=e.length,r=0;for(let[o,n]of e.entries())if(r=r+n,r>i){a=o;break}else continue;return a},pt=({bufferSize:l=0,containerSize:t,itemSizes:e})=>Math.max(e.length-ht({bufferSize:l,itemSizes:e,containerSize:t}),0),w={container:"container",hasActionGroups:"has-action-groups",lineOverlay:"line-overlay",line:"line",actionGroupEnd:"action-group--end",actionGroupStart:"action-group--start"},P={actionsEnd:"actions-end",actionsStart:"actions-start",expandTooltip:"expand-tooltip"},ut=l=>l.flatMap(t=>p(t)?t.actions:v(t)?t.actions.filter(e=>e.slot===et.trigger):t).filter(t=>!!t),gt=({item:l,containerRect:t,horizontal:e,rtl:i})=>{let a=l.getBoundingClientRect();return e?a.top-t.top:i?t.right-a.right:a.left-t.left},ft=({actionGroups:l,expanded:t,overflowCount:e})=>{let i=e;[...l].reverse().forEach(a=>{let r=0,o=a.actions.filter(n=>n.parentElement===a).reverse();o.forEach(n=>{n.slot===S.menuActions&&(n.removeAttribute("slot"),n.textEnabled=t)}),i>0&&!a.overflowActionsDisabled&&o.some(n=>(o.filter(c=>!c.slot).length>1&&o.length>2&&!n.closest("calcite-action-menu")&&!n.overflowDisabled&&(n.textEnabled=!0,n.setAttribute("slot",S.menuActions),r++,r>1&&i--),i<1)),a.manager.component.requestUpdate()})},vt=q`: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([scale=s]){--calcite-internal-action-bar-gap: var(--calcite-action-bar-items-space, var(--calcite-spacing-xxs));--calcite-internal-action-bar-padding: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-action-bar-gap: var(--calcite-action-bar-items-space, var(--calcite-spacing-sm));--calcite-internal-action-bar-padding: var(--calcite-spacing-sm)}:host([scale=l]){--calcite-internal-action-bar-gap: var(--calcite-action-bar-items-space, var(--calcite-space-sm-plus));--calcite-internal-action-bar-padding: var(--calcite-spacing-sm-plus)}:host{display:inline-flex;align-self:stretch;background:transparent;--calcite-internal-action-group-dividing-border-margin: calc(var(--calcite-spacing-base) + 1px)}.container{display:inline-flex;flex:1 1 auto;flex-direction:column;background-color:var(--calcite-action-bar-background-color, var(--calcite-color-foreground-1));gap:var(--calcite-internal-action-bar-gap);padding:var(--calcite-internal-action-bar-padding)}@keyframes in{0%{opacity:0}to{opacity:1}}:host([floating]) .container{animation:in var(--calcite-internal-animation-timing-slow) ease-in-out;overflow:hidden;border-radius:var(--calcite-action-bar-corner-radius, var(--calcite-corner-radius-round));box-shadow:var(--calcite-action-bar-shadow, var(--calcite-shadow-md))}:host([layout=vertical]){flex-direction:column}:host([layout=vertical]):host([overflow-actions-disabled]) .container{overflow-y:auto}:host([layout=vertical]):host([expanded]) .container{max-inline-size:var(--calcite-action-bar-expanded-max-width, auto)}:host([layout=vertical]) .action-group--end{margin-block-start:auto}:host([layout=vertical]) ::slotted(calcite-action-group:not(:last-of-type)){border-block-end-width:var(--calcite-border-width-sm);border-image:linear-gradient(to right,transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent var(--calcite-internal-action-group-dividing-border-margin));border-image-slice:1;padding-block-end:var(--calcite-internal-action-bar-padding)}:host([layout=horizontal]){flex-direction:row}:host([layout=horizontal]) .container{flex-direction:row}:host([layout=horizontal]):host([overflow-actions-disabled]) .container{overflow-x:auto}:host([layout=horizontal]) .action-group--end{margin-inline-start:auto}:host([layout=horizontal]) ::slotted(calcite-action-group:not(:last-of-type)){border-image:linear-gradient(transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent var(--calcite-internal-action-group-dividing-border-margin));border-image-slice:1;border-inline-end-width:var(--calcite-border-width-sm);padding-inline-end:var(--calcite-internal-action-bar-padding)}.action-group--end{justify-content:flex-end}.line-overlay{position:absolute;inset:0;pointer-events:none}.line{position:absolute;--calcite-internal-action-bar-divider-inset: calc( var(--calcite-internal-action-group-dividing-border-margin) - var(--calcite-border-width-sm) )}:host([overflow-mode=wrap][layout=horizontal]) .container,:host([overflow-mode=wrap][layout=vertical]) .container{position:relative;flex-wrap:wrap;align-content:flex-start;--calcite-internal-action-bar-line-gap: calc( var(--calcite-internal-action-bar-padding) + var(--calcite-internal-action-bar-gap) )}:host([overflow-mode=wrap][layout=horizontal]) ::slotted(calcite-action-group[slot=actions-start]),:host([overflow-mode=wrap][layout=vertical]) ::slotted(calcite-action-group[slot=actions-start]){padding-inline-end:0;padding-block-end:0;border-inline-end-width:0;border-block-end-width:0}:host([overflow-mode=wrap][layout=horizontal]) .container{row-gap:var(--calcite-internal-action-bar-line-gap)}:host([overflow-mode=wrap][layout=horizontal]) ::slotted(calcite-action-group:not([slot=actions-start])){margin-inline-start:calc(-1 * var(--calcite-border-width-sm));padding-inline:var(--calcite-internal-action-bar-padding) 0;border-inline-start-width:var(--calcite-border-width-sm);border-inline-end-width:0;border-image:linear-gradient(transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent calc(100% - var(--calcite-internal-action-group-dividing-border-margin)));border-image-slice:1}:host([overflow-mode=wrap][layout=horizontal]) .line{inset-inline:var(--calcite-internal-action-bar-padding);block-size:var(--calcite-border-width-sm);inset-block-start:calc(var(--calcite-internal-action-bar-line-offset, 0px) - var(--calcite-internal-action-bar-line-gap) / 2);background:linear-gradient(to right,transparent var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-bar-divider-inset)),transparent calc(100% - var(--calcite-internal-action-bar-divider-inset)))}:host([overflow-mode=wrap][layout=horizontal]) .container.has-action-groups{overflow:hidden;padding-inline-start:0;column-gap:calc(var(--calcite-internal-action-bar-gap) + var(--calcite-border-width-sm))}:host([overflow-mode=wrap][layout=horizontal]) .container.has-action-groups .action-group--start{padding-inline-start:var(--calcite-internal-action-bar-padding)}:host([overflow-mode=wrap][layout=vertical]) .container{block-size:100%;min-block-size:0;column-gap:var(--calcite-internal-action-bar-line-gap)}:host([overflow-mode=wrap][layout=vertical]) ::slotted(calcite-action-group:not([slot=actions-start])){margin-block-start:calc(-1 * var(--calcite-border-width-sm));padding-block:var(--calcite-internal-action-bar-padding) 0;border-block-start-width:var(--calcite-border-width-sm);border-block-end-width:0;border-image:linear-gradient(to right,transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent calc(100% - var(--calcite-internal-action-group-dividing-border-margin)));border-image-slice:1}:host([overflow-mode=wrap][layout=vertical]) .line{inset-block:var(--calcite-internal-action-bar-padding);inline-size:var(--calcite-border-width-sm);inset-inline-start:calc(var(--calcite-internal-action-bar-line-offset, 0px) - var(--calcite-internal-action-bar-line-gap) / 2);background:linear-gradient(to bottom,transparent var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-bar-divider-inset)),transparent calc(100% - var(--calcite-internal-action-bar-divider-inset)))}:host([overflow-mode=wrap][layout=vertical]) .container.has-action-groups{overflow:hidden;padding-block-start:0;row-gap:calc(var(--calcite-internal-action-bar-gap) + var(--calcite-border-width-sm))}:host([overflow-mode=wrap][layout=vertical]) .container.has-action-groups .action-group--start{padding-block-start:var(--calcite-internal-action-bar-padding)}:host([overflow-mode=none][layout=horizontal]) .container{overflow-x:auto}:host([overflow-mode=none][layout=vertical]) .container{overflow-y:auto}:host([hidden]){display:none}[hidden]{display:none}`,H=class extends j{constructor(){super(),this.actions=[],this.containerRef=f(),this.defaultSlotRef=f(),this.actionsStartSlotRef=f(),this.actionsEndSlotRef=f(),this.actionsStartGroupRef=f(),this.actionsEndGroupRef=f(),this.direction=J(),this.defaultSlotItems=[],this.actionGroups=[],this.actionMenus=[],this.actionsStart=[],this.actionsStartGroups=[],this.actionsEnd=[],this.actionsEndGroups=[],this.overflowPassId=0,this.suppressedActionGroupActionsChange=new WeakMap,this.cancelable=ot()(this),this.resize=tt(({width:t,height:e})=>{let{expanded:i,expandToggleDisabled:a,layout:r,expandPosition:o}=this;if(!this.containerRef.value)return;if(this.usesWrap){this.scheduleLineMeasure();return}if(this.overflowMode!=="collapse"||r==="vertical"&&!e||r==="horizontal"&&!t)return;this.updateGroups();let n=this.getItemSizes(),{actionGroups:s,actionsEnd:c,actionsEndGroups:d,actionsStart:C,actionsStartGroups:T,defaultSlotItems:O}=this,b=[...T,...s,...d],D=this.hasActionsEnd||!a&&o==="end"?1:0,M=this.hasActionsStart||!a&&o==="start"?1:0,I=O.length+D+M,u=I,x=getComputedStyle(this.containerRef.value);if(u+=h(r==="horizontal"?x.paddingInlineStart:x.paddingBlockStart)+h(r==="horizontal"?x.paddingInlineEnd:x.paddingBlockEnd),b.length>0){let k=b.length-1;b.forEach((m,R)=>{let g=getComputedStyle(m),$=h(g.gap),B=m.actions.filter(L=>L.slot!==S.menuActions).length,ct=m.actions.some(L=>L.slot===S.menuActions),lt=B+(ct?1:0),dt=Math.max(lt-1,0);u+=$*dt,R!==k&&(u+=h(r==="horizontal"?g.paddingInlineEnd:g.paddingBlockEnd),u+=h(r==="horizontal"?g.borderInlineEndWidth:g.borderBlockEndWidth))})}let U=(k,m,R)=>{if(!m||k.length<1)return;let g=getComputedStyle(m),$=h(g.gap),B=k.length+(R?1:0);u+=$*Math.max(B-1,0)},nt=!a&&o==="start",rt=!a&&o==="end";U(C,this.actionsStartGroupRef.value,nt),U(c,this.actionsEndGroupRef.value,rt),I>1&&(u+=h(x.gap)*(I-1));let st=pt({bufferSize:u,containerSize:r==="horizontal"?t:e,itemSizes:n});this.runOverflowActions({actionGroups:b,expanded:i,overflowCount:st})},V.resize),this.resizeHandler=t=>{if(this.usesWrap){this.scheduleLineMeasure();return}let{width:e,height:i}=t.contentRect;this.resize({width:e,height:i})},this.resizeObserver=Q("resize",t=>this.resizeHandlerEntries(t)),this.toggleExpand=()=>{this.expanded=!this.expanded,this.calciteActionBarToggle.emit()},this.messages=_({blocking:!0}),this.focusSetter=Z()(this),this.setExpandToggleEl=t=>{this.expandToggleEl=t},this.hasActionsEnd=!1,this.hasActionsStart=!1,this.hasActionGroups=!1,this.lineOffsets=[],this.floating=!1,this.expandToggleDisabled=!1,this.expanded=!1,this.expandPosition="end",this.layout="vertical",this.overflowMode="collapse",this.overlayPositioning="absolute",this.scale="m",this.selectionAppearance="neutral",this.calciteActionBarCollapse=z({cancelable:!1}),this.calciteActionBarExpand=z({cancelable:!1}),this.calciteActionBarToggle=z({cancelable:!1}),this.listen("calciteActionMenuOpen",this.actionMenuOpenHandler),this.listen("calciteInternalActionGroupActionsChange",this.handleActionGroupActionsChange),this.listen("calciteInternalActionMenuActionsChange",this.handleActionMenuActionsChange),this.listen("keydown",this.handleKeyDown)}static{this.properties={expandTooltip:[16,{},{state:!0}],hasActionsEnd:[16,{},{state:!0}],hasActionsStart:[16,{},{state:!0}],hasActionGroups:[16,{},{state:!0}],lineOffsets:[16,{},{state:!0}],actionsEndGroupLabel:1,actionsStartGroupLabel:1,floating:[7,{},{reflect:!0,type:Boolean}],expandToggleDisabled:[7,{},{reflect:!0,type:Boolean}],expandDisabled:[7,{},{reflect:!0,type:Boolean}],expanded:[7,{},{reflect:!0,type:Boolean}],expandPosition:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],overflowMode:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overflowActionsDisabled:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],position:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}]}}static{this.styles=vt}get expandDisabled(){return this.expandToggleDisabled}set expandDisabled(t){F.deprecated("property",{component:this,name:"expandDisabled",removalVersion:6,suggested:"expandToggleDisabled"}),this.expandToggleDisabled=t}get overflowActionsDisabled(){return this.overflowMode==="none"}set overflowActionsDisabled(t){F.deprecated("property",{component:this,name:"overflowActionsDisabled",removalVersion:7,suggested:'overflowMode="none"'}),this.overflowMode=t?"none":"collapse"}async overflowActions(){if(this.overflowMode!=="collapse"){this.usesWrap&&this.scheduleLineMeasure();return}this.resize({width:this.el.clientWidth,height:this.el.clientHeight})}async setFocus(t){return this.focusSetter(()=>this.el,t)}connectedCallback(){super.connectedCallback(),this.overflowModeHandler(),this.cancelable.add(this.resize)}willUpdate(t){(t.has("expandDisabled")&&(this.hasUpdated||this.expandDisabled!==!1)||t.has("expandToggleDisabled")&&(this.hasUpdated||this.expandToggleDisabled!==!1)||t.has("expandPosition")&&(this.hasUpdated||this.expandPosition!=="end"))&&this.overflowActions(),t.has("layout")&&(this.hasUpdated||this.layout!=="vertical")&&(this.updateGroups(),this.overflowModeHandler(),this.usesWrap||this.updateLines()),t.has("overflowMode")&&(this.hasUpdated||this.overflowMode!=="collapse")&&(!this.usesWrap&&this.lineMeasureFrame!=null&&(cancelAnimationFrame(this.lineMeasureFrame),this.lineMeasureFrame=void 0),this.usesWrap?this.scheduleLineMeasure():this.updateLines(),this.overflowModeHandler()),t.has("expanded")&&this.hasUpdated&&(this.expandedHandler(),this.expanded?this.calciteActionBarExpand.emit():this.calciteActionBarCollapse.emit()),t.has("selectionAppearance")&&(this.hasUpdated||this.selectionAppearance!=="neutral")&&this.updateActions()}loaded(){this.syncDefaultSlot(),this.syncActionsStartSlot(),this.syncActionsEndSlot(),this.syncActionsState(),this.overflowActions()}updated(){this.usesWrap&&this.lineMeasureFrame==null&&this.scheduleLineMeasure()}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect(),this.lineMeasureFrame!=null&&(cancelAnimationFrame(this.lineMeasureFrame),this.lineMeasureFrame=void 0)}getItemSizes(){let{layout:t,expandToggleEl:e}=this,i=[...this.actions];e&&i.push(e);let a=t==="horizontal"?"clientWidth":"clientHeight",r=Math.max(...i.map(o=>o[a]||0));return i.map(o=>o[a]||r)}expandedHandler(){this.syncActionsState(!0),this.overflowActions()}overflowModeHandler(){this.overflowMode==="none"?this.resizeObserver?.disconnect():this.resizeObserver?.observe(this.el),this.overflowActions()}actionMenuOpenHandler(t){let e=t.composedPath(),i=e.find(a=>p(a)||v(a));i&&(p(i)&&!i.menuOpen||v(i)&&!i.open||(this.getTrackedActionGroups().forEach(a=>{e.includes(a)||(a.menuOpen=!1)}),this.getTrackedActionMenus().forEach(a=>{e.includes(a)||(a.open=!1)})))}runOverflowActions({actionGroups:t,expanded:e,overflowCount:i}){let a=++this.overflowPassId,r=new Map;t.forEach(o=>{let n=o.actions.filter(s=>s.parentElement===o);r.set(o,n.map(s=>s.slot??"").join("|"))}),ft({actionGroups:t,expanded:e,overflowCount:i}),t.forEach(o=>{let s=o.actions.filter(c=>c.parentElement===o).map(c=>c.slot??"").join("|");r.get(o)!==s&&(this.suppressedActionGroupActionsChange.set(o,a),this.queueSuppressedActionGroupActionsChangeCleanup(o,a))})}queueSuppressedActionGroupActionsChangeCleanup(t,e){queueMicrotask(()=>{this.suppressedActionGroupActionsChange.get(t)===e&&this.suppressedActionGroupActionsChange.delete(t)})}resizeHandlerEntries(t){t.forEach(this.resizeHandler)}getSectionWrapperGroups(){return[this.actionsStartGroupRef.value,this.actionsEndGroupRef.value].filter(t=>!!t)}updateGroups(){let t=[...this.actionGroups,...this.actionsStartGroups,...this.actionsEndGroups,...this.getSectionWrapperGroups()];this.hasActionGroups=this.actionGroups.length>0,t.forEach(e=>{e.layout=this.layout,e.scale=this.scale})}get usesWrap(){return this.overflowMode==="wrap"&&this.layout!=="grid"}scheduleLineMeasure(){this.lineMeasureFrame!=null&&cancelAnimationFrame(this.lineMeasureFrame),this.lineMeasureFrame=requestAnimationFrame(()=>{this.lineMeasureFrame=void 0,this.updateLines()})}getWrapItems(){let t=[],e=this.actionsStartGroupRef.value;e&&!e.hidden&&t.push(e),this.defaultSlotItems.forEach(a=>{a.hidden||t.push(a)});let i=this.actionsEndGroupRef.value;return i&&!i.hidden&&t.push(i),t}updateLines(){let t=this.containerRef.value;if(!t||!this.usesWrap){this.lineOffsets.length>0&&(this.lineOffsets=[]);return}let e=this.layout==="horizontal",i=this.direction==="rtl",a=t.getBoundingClientRect(),r=this.getWrapItems(),o=[],n=null;r.forEach(c=>{let d=gt({item:c,containerRect:a,horizontal:e,rtl:i});n!==null&&Math.abs(d-n)>1&&o.push(d),n=d}),(o.length!==this.lineOffsets.length||o.some((c,d)=>c!==this.lineOffsets[d]))&&(this.lineOffsets=o)}handleDefaultSlotChange(){this.syncSlotAndActions(()=>this.syncDefaultSlot()),this.usesWrap&&this.scheduleLineMeasure()}handleActionsEndSlotChange(){this.syncSlotAndActions(()=>this.syncActionsEndSlot())}handleActionsStartSlotChange(){this.syncSlotAndActions(()=>this.syncActionsStartSlot())}handleTooltipSlotChange(t){let e=X(t).filter(i=>i?.matches("calcite-tooltip"));this.expandTooltip=e[0]}updateActions(){let t=new Set(this.actions);this.getTrackedActionMenus().forEach(e=>{e.actions.forEach(i=>t.add(i))}),t.forEach(e=>{e.selectionAppearance=this.selectionAppearance})}syncActions(){this.actions=ut([...this.actionsStart,...this.defaultSlotItems,...this.actionsEnd])}syncActionsAndOverflow(){this.syncActionsState(),this.overflowActions()}syncSlotAndActions(t){t(),this.syncActionsAndOverflow()}syncActionsState(t=!1){this.syncActions(),this.updateActions(),t&&it({actions:this.actions,expandables:[...this.getTrackedActionGroups(),...this.getTrackedActionMenus(),...this.getSectionWrapperGroups()],expanded:this.expanded})}getTrackedActionGroups(){return[...this.actionGroups,...this.actionsStartGroups,...this.actionsEndGroups]}getTrackedActionMenus(){return[...this.actionMenus,...this.actionsStart,...this.actionsEnd].filter(t=>v(t))}getAssignedActionBarItems(t){return t?Y(t).filter(e=>W(e)||p(e)||v(e)):[]}syncDefaultSlot(){this.defaultSlotItems=this.getAssignedActionBarItems(this.defaultSlotRef.value),this.actionGroups=this.defaultSlotItems.filter(t=>p(t)),this.actionMenus=this.defaultSlotItems.filter(t=>v(t)),this.updateGroups()}syncActionsStartSlot(){this.actionsStart=this.getAssignedActionBarItems(this.actionsStartSlotRef.value),this.actionsStartGroups=this.actionsStart.filter(t=>p(t)),this.hasActionsStart=this.actionsStart.length>0,this.updateGroups()}syncActionsEndSlot(){this.actionsEnd=this.getAssignedActionBarItems(this.actionsEndSlotRef.value),this.actionsEndGroups=this.actionsEnd.filter(t=>p(t)),this.hasActionsEnd=this.actionsEnd.length>0,this.updateGroups()}handleActionGroupActionsChange(t){let e=t.target;this.getTrackedActionGroups().includes(e)&&(this.suppressedActionGroupActionsChange.has(e)||this.syncActionsAndOverflow())}handleActionMenuActionsChange(t){let e=t.target;this.getTrackedActionMenus().includes(e)&&this.syncActionsAndOverflow()}getNavigableActions(){return this.actions.filter(t=>!t.disabled&&t.slot!==S.menuActions)}handleKeyDown(t){let e=this.getNavigableActions(),i=document.activeElement;if(!(!W(i)||!e.includes(i)))switch(t.key){case"ArrowRight":case"ArrowDown":G(e,i,"next",!0),t.preventDefault();break;case"ArrowLeft":case"ArrowUp":G(e,i,"previous",!0),t.preventDefault();break;case"Home":G(e,i,"first",!0),t.preventDefault();break;case"End":G(e,i,"last",!0),t.preventDefault();break;case"Tab":this.setActionTabIndexes(i);break}}setActionTabIndexes(t){this.actions.forEach(e=>{let i=!e.disabled&&e===t?0:-1;i===0?e.removeAttribute("tabindex"):e.tabIndex=i})}renderExpandTooltipSlot(){return A`<slot name=${P.expandTooltip} @slotchange=${this.handleTooltipSlotChange}></slot>`}renderExpandToggle(){let{el:t,expanded:e,toggleExpand:i,messages:a,position:r,scale:o}=this;return at({collapseLabel:a.collapseLabel,collapseText:a.collapse,direction:this.direction,el:t,expanded:e,expandLabel:a.expandLabel,expandText:a.expand,position:r,ref:this.setExpandToggleEl,scale:o,toggle:i,tooltip:this.expandTooltip})}renderActionsGroup(t){let{expandToggleDisabled:e,scale:i,layout:a,overlayPositioning:r,expandPosition:o}=this,n=t==="start",s=!e&&o===t,c=n?this.hasActionsStart:this.hasActionsEnd,d=n?P.actionsStart:P.actionsEnd,C=n?this.handleActionsStartSlotChange:this.handleActionsEndSlotChange,T=n?this.actionsStartGroupLabel:this.actionsEndGroupLabel,O=!s&&!c,b=n?this.actionsStartGroupRef:this.actionsEndGroupRef,D=n?this.actionsStartSlotRef:this.actionsEndSlotRef,M=s?this.renderExpandToggle():null;return A`<calcite-action-group class=${E({[w.actionGroupStart]:n,[w.actionGroupEnd]:!n})} .hidden=${O} .label=${T} .layout=${a} .overlayPositioning=${r} .scale=${i} ${y(b)}>${n?M:null}<slot name=${d??N} @slotchange=${C} ${y(D)}></slot>${s?this.renderExpandTooltipSlot():null}${n?null:M}</calcite-action-group>`}render(){let t=this.layout==="horizontal"?"horizontal":"vertical";return A`<div .ariaOrientation=${t} class=${E({[w.container]:!0,[w.hasActionGroups]:this.hasActionGroups})} role=toolbar ${y(this.containerRef)}>${this.renderActionsGroup("start")}<slot @slotchange=${this.handleDefaultSlotChange} ${y(this.defaultSlotRef)}></slot>${this.renderActionsGroup("end")}${this.usesWrap?A`<div aria-hidden=true class=${E(w.lineOverlay)}>${this.lineOffsets.map(e=>A`<div class=${E(w.line)} style=${`--calcite-internal-action-bar-line-offset: ${e}px`}></div>`)}</div>`:null}</div>`}};K("calcite-action-bar",H);export{H as ActionBar};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{b as i}from"./FLHFZN4H.js";var d=e=>i((t,n)=>{let a=!1;n.onConnected(()=>{a&&o(!0)});async function o(s){await t.componentOnReady();let r=typeof e.target=="function"?e.target():e.target.value;if(!r||!r.hasAttribute("popover"))return;if(e.disabledOverride?.()||"topLayerDisabled"in t&&t.topLayerDisabled===!0||!s){a=!1,r.hidePopover();return}a=!0,r.showPopover()}return{show:async()=>{await o(!0)},hide:async()=>{await o(!1)}}});export{d as a};
2
+ import{b as i}from"./CSC2MWHL.js";var d=e=>i((t,n)=>{let a=!1;n.onConnected(()=>{a&&o(!0)});async function o(s){await t.componentOnReady();let r=typeof e.target=="function"?e.target():e.target.value;if(!r||!r.hasAttribute("popover"))return;if(e.disabledOverride?.()||"topLayerDisabled"in t&&t.topLayerDisabled===!0||!s){a=!1,r.hidePopover();return}a=!0,r.showPopover()}return{show:async()=>{await o(!0)},hide:async()=>{await o(!1)}}});export{d as a};