@esri/calcite-components 5.0.0-next.2 → 5.0.0-next.3

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 (198) hide show
  1. package/dist/calcite/{XPW6AWHY.js → 2526AKXE.js} +1 -1
  2. package/dist/calcite/{VC23VSV3.js → 2FBU6T3T.js} +2 -2
  3. package/dist/calcite/{2HCOP3OW.js → 2IUZ3YR2.js} +2 -2
  4. package/dist/calcite/{Y53A45DR.js → 2OBK2KGK.js} +2 -2
  5. package/dist/calcite/{6REOS7VN.js → 2QSQXOI5.js} +2 -2
  6. package/dist/calcite/{BWBMNUXP.js → 2U5DG73Y.js} +2 -2
  7. package/dist/calcite/{LYOVUI3B.js → 34B5K3VC.js} +2 -2
  8. package/dist/calcite/{XLVC3WVH.js → 35QUJIVR.js} +2 -2
  9. package/dist/calcite/{LQ6VE45D.js → 3DRRZPK3.js} +2 -2
  10. package/dist/calcite/{YA2XH3BT.js → 3GUK3G7C.js} +1 -1
  11. package/dist/calcite/{C23DAAYV.js → 3QKRHYDR.js} +2 -2
  12. package/dist/calcite/{K5VUM3MK.js → 425YTQUT.js} +2 -2
  13. package/dist/calcite/{QB3MUPVE.js → 43SYTK5U.js} +2 -2
  14. package/dist/calcite/{WEUU4GYG.js → 4AHB62J2.js} +2 -2
  15. package/dist/calcite/{LT7C6GNK.js → 4BE5CM4R.js} +2 -2
  16. package/dist/calcite/{YPW2IFI6.js → 4IBSL24S.js} +2 -2
  17. package/dist/calcite/{G3LW5GU5.js → 4T2MXJFD.js} +2 -2
  18. package/dist/calcite/{NO25YNZI.js → 52U5HSRZ.js} +2 -2
  19. package/dist/calcite/{HNZOEWL7.js → 57WVJI5D.js} +1 -1
  20. package/dist/calcite/{J5KIXHJQ.js → 5E23KXQW.js} +2 -2
  21. package/dist/calcite/{Z7ARDFVR.js → 5JALWDSF.js} +2 -2
  22. package/dist/calcite/{ZUW5HJLD.js → 5MCNWZT7.js} +2 -2
  23. package/dist/calcite/{KGQ7IO5B.js → 5MVGEBA4.js} +2 -2
  24. package/dist/calcite/{BW34ER3N.js → 6BL35Y24.js} +2 -2
  25. package/dist/calcite/{66UJIY7C.js → 6CFV5RKV.js} +2 -2
  26. package/dist/calcite/{ZQKP4DDJ.js → 6HTHE64W.js} +2 -2
  27. package/dist/calcite/{67W7PMC5.js → 6J3DGER2.js} +2 -2
  28. package/dist/calcite/{ONRCFAXM.js → 6RMUSGEC.js} +2 -2
  29. package/dist/calcite/{VM37RG4J.js → 6RQZN7N2.js} +2 -2
  30. package/dist/calcite/{SLER6GVJ.js → 6UGLHCRO.js} +2 -2
  31. package/dist/calcite/{QCJFC5LS.js → 777CURPL.js} +2 -2
  32. package/dist/calcite/{FFVF2J2J.js → 7CSKQBJD.js} +2 -2
  33. package/dist/calcite/{GZNEHDFX.js → 7STMP4B2.js} +1 -1
  34. package/dist/calcite/{AN7BJW6E.js → 7WAFUV2T.js} +2 -2
  35. package/dist/calcite/{LQZRO6V7.js → A7PQJDZZ.js} +2 -2
  36. package/dist/calcite/{ULK65WQH.js → AEYCEODJ.js} +2 -2
  37. package/dist/calcite/{C7SWOQAB.js → ALOAVLGK.js} +2 -2
  38. package/dist/calcite/{GO7QOJ4G.js → ANAWJ75J.js} +2 -2
  39. package/dist/calcite/{OAAKVSOG.js → AYEIZT5Y.js} +2 -2
  40. package/dist/calcite/{67224TPH.js → BCBU5ZR6.js} +2 -2
  41. package/dist/calcite/{QYME6L2Y.js → BE4UHKT6.js} +2 -2
  42. package/dist/calcite/{KXFX476X.js → BGDALDXM.js} +2 -2
  43. package/dist/calcite/{JKJRBKHB.js → BHCRRG5K.js} +2 -2
  44. package/dist/calcite/{RSGHKHKR.js → BSQIX4WQ.js} +2 -2
  45. package/dist/calcite/{2AWS3TTU.js → BVHWNNF7.js} +2 -2
  46. package/dist/calcite/{CAAAOTNT.js → C47YSH7C.js} +2 -2
  47. package/dist/calcite/{QV5VJGK4.js → CNF3Q4TX.js} +2 -2
  48. package/dist/calcite/{NPB7VDJV.js → CSBYILHE.js} +2 -2
  49. package/dist/calcite/{EFMQFOY3.js → D2QA5PI3.js} +2 -2
  50. package/dist/calcite/{DULSFTYX.js → DLM7KEK5.js} +2 -2
  51. package/dist/calcite/{OFPYAEOU.js → DNM3U3Z7.js} +1 -1
  52. package/dist/calcite/{ZRF2LJED.js → DQJ4CTWW.js} +2 -2
  53. package/dist/calcite/{7HYMMGRS.js → DY2XHFEN.js} +2 -2
  54. package/dist/calcite/{XWCNDKFU.js → E22QVECL.js} +2 -2
  55. package/dist/calcite/{ZS5AQJG2.js → E2ETQPML.js} +2 -2
  56. package/dist/calcite/{EZFX7GFD.js → EFEUKCWA.js} +1 -1
  57. package/dist/calcite/{UO6GJMZS.js → EH4IJP5H.js} +2 -2
  58. package/dist/calcite/{MNOO2GEE.js → EU6IVBMM.js} +2 -2
  59. package/dist/calcite/{DSYP2L5X.js → EWPZP6OD.js} +2 -2
  60. package/dist/calcite/{ZVUSRWWY.js → FJ6DIGL4.js} +2 -2
  61. package/dist/calcite/{V25MLN7E.js → FPD3KMKK.js} +1 -1
  62. package/dist/calcite/{YEEEKHTO.js → FQH6NA2N.js} +2 -2
  63. package/dist/calcite/{NYTC7VVQ.js → FXAVGIBO.js} +2 -2
  64. package/dist/calcite/{32TESKME.js → GPIMJEMU.js} +2 -2
  65. package/dist/calcite/{5QMODV7V.js → GT3B6N5Y.js} +1 -1
  66. package/dist/calcite/{PPKBJQ5Q.js → GTQBX3SK.js} +2 -2
  67. package/dist/calcite/{X3DBNTLH.js → HGI7ZMWJ.js} +2 -2
  68. package/dist/calcite/{AQJZ34DW.js → HJBVI5HP.js} +2 -2
  69. package/dist/calcite/{6YKZNLEV.js → HS3YVIY4.js} +2 -2
  70. package/dist/calcite/{S6DQTLRI.js → HXDER6NO.js} +2 -2
  71. package/dist/calcite/{TCRZHHM4.js → HXF4YIAH.js} +2 -2
  72. package/dist/calcite/{N7OPKIOO.js → HZVXI5VT.js} +2 -2
  73. package/dist/calcite/{ZR7MTX2F.js → I2EB746H.js} +2 -2
  74. package/dist/calcite/{YLT7ECGR.js → ICWMT556.js} +2 -2
  75. package/dist/calcite/{EF5KMWOQ.js → IVEARGFQ.js} +2 -2
  76. package/dist/calcite/{VC3LAQJK.js → IWU3WQTA.js} +2 -2
  77. package/dist/calcite/{KIBRPNHY.js → J3FSCDUX.js} +2 -2
  78. package/dist/calcite/{I2XGTS34.js → JDVZQ6HH.js} +2 -2
  79. package/dist/calcite/JEZYPF4D.js +4 -0
  80. package/dist/calcite/{KJXOD5Z2.js → JW4SOJWB.js} +2 -2
  81. package/dist/calcite/{SYNATVXJ.js → JXRRZQUL.js} +2 -2
  82. package/dist/calcite/{A7FBHSOE.js → K6E5LSS6.js} +2 -2
  83. package/dist/calcite/{AZVSLWKE.js → K6F4PVVD.js} +2 -2
  84. package/dist/calcite/{KTT2ROP5.js → KEKHXXG2.js} +2 -2
  85. package/dist/calcite/{3PF6L44U.js → KGALTIIM.js} +2 -2
  86. package/dist/calcite/{7MNPDRSG.js → KIGAOJGV.js} +1 -1
  87. package/dist/calcite/{43WQ54NQ.js → KMS2JCWI.js} +1 -1
  88. package/dist/calcite/{5DRLQB2T.js → KNTW4634.js} +1 -1
  89. package/dist/calcite/{4AL3SLA3.js → KUUFM5EV.js} +2 -2
  90. package/dist/calcite/{CP6672N4.js → KXG3JNXH.js} +2 -2
  91. package/dist/calcite/{JX2SCNZH.js → KZSABN6Z.js} +2 -2
  92. package/dist/calcite/{6G4YIOVX.js → L6HFE67F.js} +1 -1
  93. package/dist/calcite/{VOP2KDER.js → LSTKQGBO.js} +2 -2
  94. package/dist/calcite/{RKHTX2IT.js → LT2NMLTM.js} +2 -2
  95. package/dist/calcite/{57G6CI2K.js → MBIDNSLG.js} +1 -1
  96. package/dist/calcite/{34C2CSRC.js → MEERCHNE.js} +2 -2
  97. package/dist/calcite/{TZGCNMHE.js → MIR3A75I.js} +2 -2
  98. package/dist/calcite/{SKEE2RVS.js → N4VKIVPS.js} +2 -2
  99. package/dist/calcite/{52HAQJHJ.js → N5LX4COS.js} +2 -2
  100. package/dist/calcite/{AND4R747.js → NHJ736R2.js} +2 -2
  101. package/dist/calcite/{5Z6FCIBA.js → NHUHCQ4J.js} +1 -1
  102. package/dist/calcite/{6VQKSVQZ.js → NL3LLRLQ.js} +2 -2
  103. package/dist/calcite/{YTKNZCQJ.js → OBEAWB6Y.js} +2 -2
  104. package/dist/calcite/{IGR4KAKH.js → OPTERABQ.js} +2 -2
  105. package/dist/calcite/{Z5QL3IGF.js → OT4HMOKY.js} +2 -2
  106. package/dist/calcite/{APWPUFHK.js → OWE3TUYA.js} +2 -2
  107. package/dist/calcite/{732CITAT.js → P2MLMFIB.js} +2 -2
  108. package/dist/calcite/{UBGSVRI6.js → P2RYGBBZ.js} +2 -2
  109. package/dist/calcite/{FDJBCYHX.js → P5PS2PVQ.js} +2 -2
  110. package/dist/calcite/{QYN4Y2UO.js → PAKKXMW6.js} +1 -1
  111. package/dist/calcite/{7NSIROF7.js → PBJYTCZQ.js} +1 -1
  112. package/dist/calcite/{A7LIGMJQ.js → PDC2HFCE.js} +1 -1
  113. package/dist/calcite/{Z6R3XFLS.js → PHQB3YSI.js} +2 -2
  114. package/dist/calcite/{G3NSWBMZ.js → PO2U44AW.js} +2 -2
  115. package/dist/calcite/{GRMS7FQY.js → PSYXUHRF.js} +1 -1
  116. package/dist/calcite/{6MJOAFKY.js → PX5VW7CA.js} +2 -2
  117. package/dist/calcite/{YWWOX5W3.js → QDR7A47F.js} +2 -2
  118. package/dist/calcite/{KQAALLEV.js → QP5GAAB3.js} +2 -2
  119. package/dist/calcite/{MFSHN3IL.js → QSCN7J3O.js} +2 -2
  120. package/dist/calcite/{EJNDGPN2.js → QTBEVUXO.js} +2 -2
  121. package/dist/calcite/{GQIOILN4.js → QX6ZGXUA.js} +2 -2
  122. package/dist/calcite/{5ZVESTKT.js → R7GSVJN5.js} +2 -2
  123. package/dist/calcite/{2NLH7XFG.js → RQFHIC47.js} +2 -2
  124. package/dist/calcite/{O6YPQQ5N.js → RQU4NRTA.js} +2 -2
  125. package/dist/calcite/{5HYWAM3T.js → RSQ6RL3K.js} +1 -1
  126. package/dist/calcite/{RJQBTNQM.js → RWVRFF3I.js} +2 -2
  127. package/dist/calcite/{PV4KB5V4.js → S5R35RX3.js} +2 -2
  128. package/dist/calcite/{3IXSIT7M.js → S5TFXGHY.js} +2 -2
  129. package/dist/calcite/{2QAR72YP.js → SKKSLFHT.js} +2 -2
  130. package/dist/calcite/{S4PILGWU.js → SLICSH62.js} +2 -2
  131. package/dist/calcite/{UQCEQ44M.js → SN7NAXJ7.js} +2 -2
  132. package/dist/calcite/{26A44OD3.js → TG4OK7FQ.js} +2 -2
  133. package/dist/calcite/{R5RXEIYL.js → TKNM6PGC.js} +2 -2
  134. package/dist/calcite/{7ZV336XQ.js → U235MJ2F.js} +2 -2
  135. package/dist/calcite/{IEON5PAG.js → UA4KBTNZ.js} +2 -2
  136. package/dist/calcite/{FMHT4PTX.js → UCRIU7RD.js} +2 -2
  137. package/dist/calcite/{M3SKP2LL.js → UTGJTZUE.js} +2 -2
  138. package/dist/calcite/{GBKXT23N.js → UXWFYSWM.js} +2 -2
  139. package/dist/calcite/{66PQSM5C.js → VAG4CLRN.js} +2 -2
  140. package/dist/calcite/{7C5HX3U5.js → VBT5FAGS.js} +1 -1
  141. package/dist/calcite/{AUWGPSX4.js → VFZYB7KV.js} +2 -2
  142. package/dist/calcite/{DX5CTXCH.js → VGOGYBOG.js} +2 -2
  143. package/dist/calcite/{L63F4E2F.js → VQT3LLC7.js} +1 -1
  144. package/dist/calcite/{EU53PNIW.js → WIJWBGXQ.js} +2 -2
  145. package/dist/calcite/{FHD6A3EJ.js → WJT34A4V.js} +2 -2
  146. package/dist/calcite/{MRLX7ZWB.js → WLATCKTT.js} +2 -2
  147. package/dist/calcite/{H6ACIWPU.js → WRHL43TZ.js} +2 -2
  148. package/dist/calcite/{2ZC3AAAG.js → WRVSFB7L.js} +2 -2
  149. package/dist/calcite/{5NYJ6WZZ.js → WTV3W5WN.js} +2 -2
  150. package/dist/calcite/{YGIF2DGN.js → WVP5XPLP.js} +2 -2
  151. package/dist/calcite/{UKTG6YHR.js → WWH2YWKG.js} +2 -2
  152. package/dist/calcite/{BTKNJZBD.js → WWKRJ5BW.js} +2 -2
  153. package/dist/calcite/{JYXQNDBZ.js → WWUSLEON.js} +2 -2
  154. package/dist/calcite/{3625VFO5.js → X3IVLT67.js} +2 -2
  155. package/dist/calcite/{K6SZIYUC.js → XAUVURWR.js} +1 -1
  156. package/dist/calcite/{GI7F3WH2.js → XO5ETFTI.js} +1 -1
  157. package/dist/calcite/{B3CZZZ3T.js → XRAT3TME.js} +2 -2
  158. package/dist/calcite/{FEP2O2MA.js → XWOGKL32.js} +2 -2
  159. package/dist/calcite/{UMUEMXJF.js → XWXCOJUO.js} +2 -2
  160. package/dist/calcite/{SQE7VYLC.js → XXNZUORE.js} +2 -2
  161. package/dist/calcite/{WFBFQEOK.js → XXYGNCPD.js} +2 -2
  162. package/dist/calcite/{Y5N22JX4.js → XYJQXYRM.js} +2 -2
  163. package/dist/calcite/{M7JX436Q.js → YANBAVXH.js} +2 -2
  164. package/dist/calcite/{GPIRDMOU.js → YG7PWF3G.js} +2 -2
  165. package/dist/calcite/{HG4ISKH4.js → YPBCS4NA.js} +2 -2
  166. package/dist/calcite/{UMPKFWZZ.js → YT4SL4T4.js} +2 -2
  167. package/dist/calcite/{TDYNRNC3.js → YTEVYZWQ.js} +2 -2
  168. package/dist/calcite/{QUSE2BTR.js → ZCDYIKPL.js} +2 -2
  169. package/dist/calcite/{BXLQRGO6.js → ZLSS7CXL.js} +2 -2
  170. package/dist/calcite/{N3EON3SQ.js → ZMYI2UVC.js} +2 -2
  171. package/dist/calcite/{MVRE5C3I.js → ZN5NGGVV.js} +2 -2
  172. package/dist/calcite/{2XQID652.js → ZTZGAKAG.js} +2 -2
  173. package/dist/calcite/calcite.esm.js +2 -2
  174. package/dist/chunks/runtime.js +4 -4
  175. package/dist/components/calcite-action/customElement.d.ts +1 -1
  176. package/dist/components/calcite-action-pad/customElement.d.ts +1 -1
  177. package/dist/components/calcite-block/customElement.d.ts +4 -4
  178. package/dist/components/calcite-block-group/customElement.d.ts +1 -1
  179. package/dist/components/calcite-block-section/customElement.d.ts +2 -2
  180. package/dist/components/calcite-card/customElement.d.ts +1 -1
  181. package/dist/components/calcite-card/customElement.js +1 -1
  182. package/dist/components/calcite-combobox-item/customElement.d.ts +1 -1
  183. package/dist/components/calcite-dialog/customElement.d.ts +1 -1
  184. package/dist/components/calcite-dropdown/customElement.d.ts +1 -1
  185. package/dist/components/calcite-input-number/customElement.d.ts +2 -2
  186. package/dist/components/calcite-list/customElement.d.ts +1 -1
  187. package/dist/components/calcite-list-item/customElement.d.ts +1 -1
  188. package/dist/components/calcite-sheet/customElement.d.ts +2 -2
  189. package/dist/components/calcite-shell-panel/customElement.d.ts +4 -4
  190. package/dist/components/calcite-stepper/customElement.d.ts +1 -1
  191. package/dist/components/calcite-tile/customElement.d.ts +2 -2
  192. package/dist/components/calcite-tooltip/customElement.d.ts +1 -1
  193. package/dist/docs/api.json +50 -50
  194. package/dist/docs/docs.json +28 -28
  195. package/dist/docs/vscode.html-custom-data.json +23 -23
  196. package/dist/docs/web-types.json +24 -24
  197. package/package.json +3 -3
  198. package/dist/calcite/U2QCHDBN.js +0 -4
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v5.0.0-next.2 */
4
- import{b as A}from"./HNZOEWL7.js";import{a as E,b as L,c as I,d as D,f as _,h as b}from"./5DRLQB2T.js";import{k as F}from"./ZR7MTX2F.js";import{a as W,b as K}from"./QYN4Y2UO.js";import{a as G,b as z}from"./MNOO2GEE.js";import{a as g}from"./AN7BJW6E.js";import{a as q}from"./C23DAAYV.js";import{a as B}from"./V25MLN7E.js";import"./6G4YIOVX.js";import{a as T}from"./5HYWAM3T.js";import{a as N}from"./EU53PNIW.js";import{a as U}from"./UMUEMXJF.js";import"./GBKXT23N.js";import"./KJXOD5Z2.js";import"./UBGSVRI6.js";import{g as R,t as v}from"./S4PILGWU.js";import{a as H}from"./OFPYAEOU.js";import{C,D as M,E as h,K as O,P as k,g as w,h as d,o as m}from"./C7SWOQAB.js";var f={container:"container",table:"table",scrim:"scrim",stack:"stack",tableContainer:"table-container",sticky:"sticky-pos",assistiveText:"assistive-text",containerHeight:"container-height"},y={filterNoResults:"filter-no-results",filterActionsStart:"filter-actions-start",filterActionsEnd:"filter-actions-end"},j=w`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.container{position:relative;background-color:var(--calcite-list-background-color, var(--calcite-color-foreground-1))}.container-height{block-size:100%}.table-container{box-sizing:border-box;display:flex;inline-size:100%;flex-direction:column;background-color:transparent}.table-container *{box-sizing:border-box}.table{inline-size:100%}.stack{--calcite-stack-padding-inline: 0;--calcite-stack-padding-block: 0}.sticky-pos{position:sticky;inset-block-start:0px;z-index:var(--calcite-z-index-sticky);background-color:var(--calcite-list-background-color, var(--calcite-color-foreground-1))}.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}:host([hidden]){display:none}[hidden]{display:none}`,J=`${L}, ${I}`,P=class extends M{constructor(){super(),this.dragSelector=I,this.focusableItems=[],this.handleSelector="calcite-sort-handle",this.listItems=[],this.listItemGroups=[],this.mutationObserver=T("mutation",()=>{this.willPerformFilter=!0,this.updateListItemsDebounced()}),this.cancelable=q()(this),this.updateListItemsDebounced=B(this.updateListItems,O.nextTick),this.visibleItems=[],this.willFilterEmit=!1,this.willPerformFilter=!1,this.messages=N({blocking:!0}),this.focusSetter=U()(this),this.dataForFilter=[],this.hasFilterActionsEnd=!1,this.hasFilterActionsStart=!1,this.hasFilterNoResults=!1,this.sortHandleMenuItems=[],this.disabled=!1,this.dragEnabled=!1,this.filterEnabled=!1,this.filteredData=[],this.filteredItems=[],this.interactionMode="interactive",this.loading=!1,this.displayMode="flat",this.scale="m",this.selectedItems=[],this.selectionAppearance="icon",this.selectionMode="none",this.sortDisabled=!1,this.calciteInternalListDefaultSlotChange=m({cancelable:!1}),this.calciteListChange=m({cancelable:!1}),this.calciteListDragEnd=m({cancelable:!1}),this.calciteListDragStart=m({cancelable:!1}),this.calciteListFilter=m({cancelable:!1}),this.calciteListMoveHalt=m({cancelable:!1}),this.calciteListOrderChange=m({cancelable:!1}),this.listen("calciteInternalListItemToggle",this.handleCalciteListItemToggle),this.listen("calciteInternalFocusPreviousItem",this.handleCalciteInternalFocusPreviousItem),this.listen("calciteInternalListItemActive",this.handleCalciteInternalListItemActive),this.listen("calciteListItemSelect",this.handleCalciteListItemSelect),this.listen("calciteInternalAssistiveTextChange",this.handleCalciteInternalAssistiveTextChange),this.listen("calciteListItemSortHandleBeforeOpen",this.updateListItemsDebounced),this.listen("calciteSortHandleReorder",this.handleSortReorder),this.listen("calciteSortHandleMove",this.handleSortMove),this.listen("calciteSortHandleAdd",this.handleSortAdd),this.listen("calciteInternalListItemSelect",this.handleCalciteInternalListItemSelect),this.listen("calciteInternalListItemSelectMultiple",this.handleCalciteInternalListItemSelectMultiple),this.listen("calciteInternalListItemChange",this.handleCalciteInternalListItemChange),this.listen("calciteInternalListItemGroupDefaultSlotChange",this.handleCalciteInternalListItemGroupDefaultSlotChange)}static{this.properties={assistiveText:[16,{},{state:!0}],dataForFilter:[16,{},{state:!0}],hasFilterActionsEnd:[16,{},{state:!0}],hasFilterActionsStart:[16,{},{state:!0}],hasFilterNoResults:[16,{},{state:!0}],sortHandleMenuItems:[16,{},{state:!0}],canPull:[0,{},{attribute:!1}],canPut:[0,{},{attribute:!1}],disabled:[7,{},{reflect:!0,type:Boolean}],dragEnabled:[7,{},{reflect:!0,type:Boolean}],filterEnabled:[7,{},{reflect:!0,type:Boolean}],filterPredicate:[0,{},{attribute:!1}],filterLabel:[3,{},{reflect:!0}],filterPlaceholder:[3,{},{reflect:!0}],filterProps:[0,{},{attribute:!1}],filterText:[3,{},{reflect:!0}],filteredData:[0,{},{attribute:!1}],filteredItems:[0,{},{attribute:!1}],group:[3,{},{reflect:!0}],interactionMode:[3,{},{reflect:!0}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],displayMode:[3,{},{reflect:!0}],numberingSystem:1,scale:[3,{},{reflect:!0}],selectedItems:[0,{},{attribute:!1}],selectionAppearance:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],sortDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=j}get hasActiveFilter(){return this.filterEnabled&&this.filterText&&this.filteredItems.length!==this.visibleItems.length}get showNoResultsContainer(){return this.filterEnabled&&this.filterText&&this.hasFilterNoResults&&this.visibleItems.length&&!this.filteredItems.length}async setFocus(e){return this.focusSetter(()=>this.filterEnabled?this.filterEl:this.focusableItems.find(t=>t.active),e)}emitOrderChangeEvent(e){this.calciteListOrderChange.emit(e)}connectedCallback(){super.connectedCallback(),this.connectObserver(),this.willPerformFilter=!0,this.updateListItemsDebounced(),this.setUpSorting(),this.setParentList(),this.setListItemGroups(),this.cancelable.add(this.updateListItemsDebounced)}async load(){this.handleInteractionModeWarning()}willUpdate(e){(e.has("filterText")||e.has("filterProps")||e.has("filterPredicate"))&&this.performFilter(),(e.has("filterEnabled")&&(this.hasUpdated||this.filterEnabled!==!1)||e.has("group")||e.has("sortDisabled")&&(this.hasUpdated||this.sortDisabled!==!1)||e.has("dragEnabled")&&(this.hasUpdated||this.dragEnabled!==!1)||e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="none")||e.has("selectionAppearance")&&(this.hasUpdated||this.selectionAppearance!=="icon")||e.has("displayMode")&&this.hasUpdated||e.has("scale")&&this.hasUpdated||e.has("canPull")&&this.hasUpdated||e.has("canPut")&&this.hasUpdated||e.has("filterPredicate")&&this.hasUpdated)&&this.handleListItemChange()}updated(){G(this)}disconnectedCallback(){super.disconnectedCallback(),this.disconnectObserver(),K(this)}updateListItems(){this.updateGroupItems();let{selectionAppearance:e,selectionMode:t,interactionMode:s,dragEnabled:a,el:i,filterEl:n,displayMode:l,scale:r,sortDisabled:c,sortHandleMenuItems:u}=this,p=Array.from(this.el.querySelectorAll(I)),S=i,$=Array.from(S.children).filter(b);if(p.forEach(o=>{o.scale=r,o.selectionAppearance=e,o.selectionMode=t,o.interactionMode=s,o.closest(E)===i&&(o.moveToItems=u.filter(x=>this.validateSortMenuItem({type:"move",fromEl:S,toEl:x.element,dragEl:o,newIndex:0,oldIndex:$.indexOf(o)})),o.addToItems=this.sortHandleMenuItems.filter(x=>this.validateSortMenuItem({type:"add",fromEl:S,toEl:x.element,dragEl:o,newIndex:0,oldIndex:$.indexOf(o)})),o.dragHandle=a,o.displayMode=l,o.sortDisabled=c)}),this.parentListEl){this.setUpSorting();return}this.listItems=p,this.filterEnabled&&this.willPerformFilter&&(this.willPerformFilter=!1,this.dataForFilter=this.getItemData(),n&&(n.items=this.dataForFilter,this.filterAndUpdateData())),this.visibleItems=this.listItems.filter(o=>!o.closed&&!o.hidden),this.updateFilteredItems(),this.borderItems(),this.focusableItems=this.filteredItems.filter(o=>!o.disabled),this.setActiveListItem(),this.updateSelectedItems(),this.setUpSorting()}handleListItemChange(){this.willPerformFilter=!0,this.updateListItemsDebounced()}handleCalciteListItemToggle(e){this.parentListEl||(e.stopPropagation(),this.borderItems())}handleCalciteInternalFocusPreviousItem(e){if(this.parentListEl)return;e.stopPropagation();let{focusableItems:t}=this,a=t.findIndex(i=>i.active)-1;t[a]&&this.focusRow(t[a])}handleCalciteInternalListItemActive(e){if(this.parentListEl)return;e.stopPropagation();let t=e.target,{listItems:s}=this;s.forEach(a=>{a.active=a===t})}handleCalciteListItemSelect(){this.parentListEl||this.updateSelectedItems(!0)}handleCalciteInternalAssistiveTextChange(e){this.assistiveText=e.detail.message,e.stopPropagation()}handleSortReorder(e){this.parentListEl||e.defaultPrevented||(e.preventDefault(),this.handleReorder(e))}handleSortAdd(e){this.parentListEl||e.defaultPrevented||(e.preventDefault(),this.handleAdd(e))}handleSortMove(e){this.parentListEl||e.defaultPrevented||(e.preventDefault(),this.handleMove(e))}handleCalciteInternalListItemSelect(e){if(this.parentListEl)return;e.stopPropagation();let t=e.target,{listItems:s,selectionMode:a}=this;t.selected&&(a==="single"||a==="single-persist")&&s.forEach(i=>i.selected=i===t),this.updateSelectedItems()}handleCalciteInternalListItemSelectMultiple(e){if(this.parentListEl)return;e.stopPropagation();let{target:t,detail:s}=e,{focusableItems:a,lastSelectedInfo:i}=this,n=t;if(s.selectMultiple&&i){let l=a.indexOf(n),r=a.indexOf(i.selectedItem),c=Math.min(r,l),u=Math.max(r,l);a.slice(c,u+1).forEach(p=>p.selected=i.selected)}else this.lastSelectedInfo={selectedItem:n,selected:n.selected}}handleCalciteInternalListItemChange(e){this.parentListEl||(e.stopPropagation(),this.updateListItemsDebounced())}handleCalciteInternalListItemGroupDefaultSlotChange(e){e.stopPropagation()}connectObserver(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}disconnectObserver(){this.mutationObserver?.disconnect()}setUpSorting(){let{dragEnabled:e,defaultSlotEl:t}=this;e&&(t&&_(t),W(this))}onGlobalDragStart(){this.disconnectObserver()}onGlobalDragEnd(){this.connectObserver()}onDragEnd(e){this.calciteListDragEnd.emit(e)}onDragStart(e){e.dragEl.sortHandleOpen=!1,this.calciteListDragStart.emit(e)}onDragSort(e){this.setParentList(),this.updateListItemsDebounced(),this.calciteListOrderChange.emit(e)}setParentList(){this.parentListEl=this.el.parentElement?.closest(E)}handleDefaultSlotChange(){this.parentListEl&&this.calciteInternalListDefaultSlotChange.emit()}setListItemGroups(){this.listItemGroups=Array.from(this.el.querySelectorAll(L))}handleFilterActionsStartSlotChange(e){this.hasFilterActionsStart=v(e)}handleFilterActionsEndSlotChange(e){this.hasFilterActionsEnd=v(e)}handleFilterNoResultsSlotChange(e){this.hasFilterNoResults=v(e)}setActiveListItem(){let{focusableItems:e}=this;e.some(t=>t.active)||e[0]&&(e[0].active=!0)}async updateSelectedItems(e=!1){await this.updateComplete,this.selectedItems=this.visibleItems.filter(t=>t.selected),e&&this.calciteListChange.emit()}filterElements({el:e,filteredItems:t,visibleParents:s}){let a=!s.has(e)&&!t.includes(e);e.filterHidden=a;let i=e.parentElement.closest(J);i&&(a||s.add(i),this.filterElements({el:i,filteredItems:t,visibleParents:s}))}allParentListItemsExpanded(e){let t=e.parentElement?.closest(I);if(t){if(!t.expanded)return!1}else return!0;return this.allParentListItemsExpanded(t)}borderItems(){let e=this.visibleItems.filter(t=>!t.filterHidden&&this.allParentListItemsExpanded(t));e.forEach(t=>t.bordered=t!==e[e.length-1])}updateFilteredItems(){let{visibleItems:e,filteredData:t,filterText:s,filterPredicate:a}=this,i=e?.filter(r=>e.every(c=>c===r||!r.contains(c))),n=a?e.filter(a):s?t.map(r=>r.el):e||[],l=new WeakSet;i.forEach(r=>this.filterElements({el:r,filteredItems:n,visibleParents:l})),this.filteredItems=n,this.willFilterEmit&&(this.willFilterEmit=!1,this.calciteListFilter.emit())}updateFilteredData(){let{filterEl:e}=this;e&&(e.filteredItems&&(this.filteredData=e.filteredItems),this.updateListItemsDebounced())}async filterAndUpdateData(){await this.filterEl?.filter(this.filterText),this.updateFilteredData()}get effectiveFilterProps(){return this.filterProps?this.filterProps.filter(e=>e!=="el"):["description","label","metadata","heading"]}performFilter(){let{filterEl:e,filterText:t,effectiveFilterProps:s}=this;e&&(e.value=t,e.filterProps=s,this.filterAndUpdateData())}setDefaultSlotEl(e){this.defaultSlotEl=e}setFilterEl(e){this.filterEl=e,this.performFilter()}handleFilterChange(e){e.stopPropagation();let{value:t}=e.currentTarget;this.filterText=t,this.willFilterEmit=!0,this.updateFilteredData()}getItemData(){return this.listItems.map(e=>({label:e.label,description:e.description,metadata:e.metadata,heading:this.getGroupHeading(e),el:e}))}getGroupHeading(e){return this.listItemGroups.filter(s=>s.contains(e)).map(s=>s.heading)}updateGroupItems(){let{el:e,group:t,scale:s}=this,a=R(e),i=t?Array.from(a.querySelectorAll(`${E}[group="${t}"]`)).filter(l=>!l.disabled&&l.dragEnabled):[];this.sortHandleMenuItems=i.map(l=>({element:l,label:l.label??l.id,id:H()})),Array.from(this.el.querySelectorAll(L)).forEach(l=>{l.scale=s})}focusRow(e){let{focusableItems:t}=this;e&&(t.forEach(s=>s.active=s===e),e.setFocus())}isNavigable(e){let t=e.parentElement?.closest(I);return t?t.expanded&&this.isNavigable(t):!0}handleListKeydown(e){if(e.defaultPrevented||this.parentListEl)return;let{key:t}=e,s=this.focusableItems.filter(i=>this.isNavigable(i)),a=s.findIndex(i=>i.active);if(t==="ArrowDown"){e.preventDefault();let i=e.target===this.filterEl?0:a+1;s[i]&&this.focusRow(s[i])}else if(t==="ArrowUp"){if(e.preventDefault(),a===0&&this.filterEnabled){this.filterEl.setFocus();return}let i=a-1;s[i]&&this.focusRow(s[i])}else if(t==="Home"){e.preventDefault();let i=s[0];i&&this.focusRow(i)}else if(t==="End"){e.preventDefault();let i=s[s.length-1];i&&this.focusRow(i)}}handleInteractionModeWarning(){this.interactionMode==="static"&&this.selectionMode!=="none"&&this.selectionAppearance==="border"&&console.warn('selection-appearance="border" requires interaction-mode="interactive"')}validateSortMenuItem({fromEl:e,toEl:t,dragEl:s,newIndex:a,oldIndex:i,type:n}){if(!e||!t||t===e||s.contains(t))return!1;let l=e.canPull?.({toEl:t,fromEl:e,dragEl:s,newIndex:a,oldIndex:i})??!0,r=t.canPut?.({toEl:t,fromEl:e,dragEl:s,newIndex:a,oldIndex:i})??!0;return(n==="add"?l==="clone":l===!0)&&r}handleAdd(e){let{addTo:t}=e.detail,s=e.target,a=s?.parentElement,i=t.element,l=Array.from(a.children).filter(b).indexOf(s),r=0;if(!this.validateSortMenuItem({type:"add",fromEl:a,toEl:i,dragEl:s,newIndex:r,oldIndex:l}))return;s.sortHandleOpen=!1,this.disconnectObserver();let c=s.cloneNode();i.prepend(c),D(s),this.updateListItemsDebounced(),this.connectObserver();let u={dragEl:s,fromEl:a,toEl:i,newIndex:r,oldIndex:l};this.calciteListOrderChange.emit(u),i.emitOrderChangeEvent(u)}handleMove(e){let{moveTo:t}=e.detail,s=e.target,a=s?.parentElement,i=t.element,l=Array.from(a.children).filter(b).indexOf(s),r=0;if(!this.validateSortMenuItem({type:"move",fromEl:a,toEl:i,dragEl:s,newIndex:r,oldIndex:l}))return;s.sortHandleOpen=!1,this.disconnectObserver(),i.prepend(s),D(s),this.updateListItemsDebounced(),this.connectObserver();let c={dragEl:s,fromEl:a,toEl:i,newIndex:r,oldIndex:l};this.calciteListOrderChange.emit(c),i.emitOrderChangeEvent(c)}handleReorder(e){let{reorder:t}=e.detail,s=e.target,a=s?.parentElement;if(!a)return;s.sortHandleOpen=!1;let i=Array.from(a.children).filter(b),n=i.length-1,l=i.indexOf(s),r=l;switch(t){case"top":r=0;break;case"bottom":r=n;break;case"up":r=l===0?0:l-1;break;case"down":r=l===n?n:l+1;break}this.disconnectObserver();let c=t==="up"||t==="top"?i[r]:i[r].nextSibling;a.insertBefore(s,c),this.updateListItemsDebounced(),this.connectObserver(),this.calciteListOrderChange.emit({dragEl:s,fromEl:a,toEl:a,newIndex:r,oldIndex:l})}render(){let{loading:e,label:t,disabled:s,dataForFilter:a,filterEnabled:i,filterPlaceholder:n,filterText:l,filterLabel:r,hasFilterActionsStart:c,hasFilterActionsEnd:u,effectiveFilterProps:p}=this;return z({disabled:this.disabled,children:d`<div class=${h({[f.container]:!0,[f.containerHeight]:this.listItems.length<1&&e})}>${this.dragEnabled?d`<span aria-live=assertive class=${h(f.assistiveText)}>${this.assistiveText}</span>`:null}${this.renderItemAriaLive()}${e?d`<calcite-scrim class=${h(f.scrim)} .loading=${e}></calcite-scrim>`:null}<div .ariaBusy=${e} .ariaLabel=${t||""} class=${h(f.table)} @keydown=${this.handleListKeydown} role=treegrid>${i||c||u?d`<div class=${h(f.sticky)} role=rowgroup><div role=row><div role=columnheader><calcite-stack class=${h(f.stack)}><slot name=${y.filterActionsStart} @slotchange=${this.handleFilterActionsStartSlotChange} slot=${A.actionsStart}></slot><calcite-filter .ariaLabel=${n} .disabled=${s} .filterProps=${p} .items=${a} .label=${r} @calciteFilterChange=${this.handleFilterChange} .placeholder=${n} .scale=${this.scale} .value=${l} ${C(this.setFilterEl)}></calcite-filter><slot name=${y.filterActionsEnd} @slotchange=${this.handleFilterActionsEndSlotChange} slot=${A.actionsEnd}></slot></calcite-stack></div></div></div>`:null}<div class=${h(f.tableContainer)} role=rowgroup><slot @slotchange=${this.handleDefaultSlotChange} ${C(this.setDefaultSlotEl)}></slot></div></div><div aria-live=polite data-test-id=no-results-container .hidden=${!this.showNoResultsContainer}><slot name=${y.filterNoResults} @slotchange=${this.handleFilterNoResultsSlotChange}></slot></div></div>`})}renderItemAriaLive(){let{messages:e,filteredItems:t,parentListEl:s,messages:{_lang:a},numberingSystem:i}=this;return F.numberFormatOptions={locale:a,numberingSystem:i},s?null:d`<div aria-live=polite class=${h(f.assistiveText)}>${this.hasActiveFilter?g("aria-filter-enabled",d`<div>${e.filterEnabled}</div>`):null}${g("aria-item-count",d`<div>${e.total.replace("{count}",F.localize(t.length.toString()))}</div>`)}${t.length?g("aria-item-list",d`<ol>${t.map(n=>d`<li>${n.label}</li>`)}</ol>`):null}</div>`}};k("calcite-list",P);export{P as List};
3
+ v5.0.0-next.3 */
4
+ import{b as A}from"./57WVJI5D.js";import{a as E,b as L,c as I,d as D,f as _,h as b}from"./KNTW4634.js";import{k as F}from"./I2EB746H.js";import{a as W,b as K}from"./PAKKXMW6.js";import{a as G,b as z}from"./EU6IVBMM.js";import{a as g}from"./7WAFUV2T.js";import{a as q}from"./3QKRHYDR.js";import{a as B}from"./FPD3KMKK.js";import"./L6HFE67F.js";import{a as T}from"./RSQ6RL3K.js";import{a as N}from"./WIJWBGXQ.js";import{a as U}from"./XWXCOJUO.js";import"./UXWFYSWM.js";import"./JW4SOJWB.js";import"./P2RYGBBZ.js";import{g as R,t as v}from"./SLICSH62.js";import{a as H}from"./DNM3U3Z7.js";import{C,D as M,E as h,K as O,P as k,g as w,h as d,o as m}from"./ALOAVLGK.js";var f={container:"container",table:"table",scrim:"scrim",stack:"stack",tableContainer:"table-container",sticky:"sticky-pos",assistiveText:"assistive-text",containerHeight:"container-height"},y={filterNoResults:"filter-no-results",filterActionsStart:"filter-actions-start",filterActionsEnd:"filter-actions-end"},j=w`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.container{position:relative;background-color:var(--calcite-list-background-color, var(--calcite-color-foreground-1))}.container-height{block-size:100%}.table-container{box-sizing:border-box;display:flex;inline-size:100%;flex-direction:column;background-color:transparent}.table-container *{box-sizing:border-box}.table{inline-size:100%}.stack{--calcite-stack-padding-inline: 0;--calcite-stack-padding-block: 0}.sticky-pos{position:sticky;inset-block-start:0px;z-index:var(--calcite-z-index-sticky);background-color:var(--calcite-list-background-color, var(--calcite-color-foreground-1))}.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}:host([hidden]){display:none}[hidden]{display:none}`,J=`${L}, ${I}`,P=class extends M{constructor(){super(),this.dragSelector=I,this.focusableItems=[],this.handleSelector="calcite-sort-handle",this.listItems=[],this.listItemGroups=[],this.mutationObserver=T("mutation",()=>{this.willPerformFilter=!0,this.updateListItemsDebounced()}),this.cancelable=q()(this),this.updateListItemsDebounced=B(this.updateListItems,O.nextTick),this.visibleItems=[],this.willFilterEmit=!1,this.willPerformFilter=!1,this.messages=N({blocking:!0}),this.focusSetter=U()(this),this.dataForFilter=[],this.hasFilterActionsEnd=!1,this.hasFilterActionsStart=!1,this.hasFilterNoResults=!1,this.sortHandleMenuItems=[],this.disabled=!1,this.dragEnabled=!1,this.filterEnabled=!1,this.filteredData=[],this.filteredItems=[],this.interactionMode="interactive",this.loading=!1,this.displayMode="flat",this.scale="m",this.selectedItems=[],this.selectionAppearance="icon",this.selectionMode="none",this.sortDisabled=!1,this.calciteInternalListDefaultSlotChange=m({cancelable:!1}),this.calciteListChange=m({cancelable:!1}),this.calciteListDragEnd=m({cancelable:!1}),this.calciteListDragStart=m({cancelable:!1}),this.calciteListFilter=m({cancelable:!1}),this.calciteListMoveHalt=m({cancelable:!1}),this.calciteListOrderChange=m({cancelable:!1}),this.listen("calciteInternalListItemToggle",this.handleCalciteListItemToggle),this.listen("calciteInternalFocusPreviousItem",this.handleCalciteInternalFocusPreviousItem),this.listen("calciteInternalListItemActive",this.handleCalciteInternalListItemActive),this.listen("calciteListItemSelect",this.handleCalciteListItemSelect),this.listen("calciteInternalAssistiveTextChange",this.handleCalciteInternalAssistiveTextChange),this.listen("calciteListItemSortHandleBeforeOpen",this.updateListItemsDebounced),this.listen("calciteSortHandleReorder",this.handleSortReorder),this.listen("calciteSortHandleMove",this.handleSortMove),this.listen("calciteSortHandleAdd",this.handleSortAdd),this.listen("calciteInternalListItemSelect",this.handleCalciteInternalListItemSelect),this.listen("calciteInternalListItemSelectMultiple",this.handleCalciteInternalListItemSelectMultiple),this.listen("calciteInternalListItemChange",this.handleCalciteInternalListItemChange),this.listen("calciteInternalListItemGroupDefaultSlotChange",this.handleCalciteInternalListItemGroupDefaultSlotChange)}static{this.properties={assistiveText:[16,{},{state:!0}],dataForFilter:[16,{},{state:!0}],hasFilterActionsEnd:[16,{},{state:!0}],hasFilterActionsStart:[16,{},{state:!0}],hasFilterNoResults:[16,{},{state:!0}],sortHandleMenuItems:[16,{},{state:!0}],canPull:[0,{},{attribute:!1}],canPut:[0,{},{attribute:!1}],disabled:[7,{},{reflect:!0,type:Boolean}],dragEnabled:[7,{},{reflect:!0,type:Boolean}],filterEnabled:[7,{},{reflect:!0,type:Boolean}],filterPredicate:[0,{},{attribute:!1}],filterLabel:[3,{},{reflect:!0}],filterPlaceholder:[3,{},{reflect:!0}],filterProps:[0,{},{attribute:!1}],filterText:[3,{},{reflect:!0}],filteredData:[0,{},{attribute:!1}],filteredItems:[0,{},{attribute:!1}],group:[3,{},{reflect:!0}],interactionMode:[3,{},{reflect:!0}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],displayMode:[3,{},{reflect:!0}],numberingSystem:1,scale:[3,{},{reflect:!0}],selectedItems:[0,{},{attribute:!1}],selectionAppearance:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],sortDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=j}get hasActiveFilter(){return this.filterEnabled&&this.filterText&&this.filteredItems.length!==this.visibleItems.length}get showNoResultsContainer(){return this.filterEnabled&&this.filterText&&this.hasFilterNoResults&&this.visibleItems.length&&!this.filteredItems.length}async setFocus(e){return this.focusSetter(()=>this.filterEnabled?this.filterEl:this.focusableItems.find(t=>t.active),e)}emitOrderChangeEvent(e){this.calciteListOrderChange.emit(e)}connectedCallback(){super.connectedCallback(),this.connectObserver(),this.willPerformFilter=!0,this.updateListItemsDebounced(),this.setUpSorting(),this.setParentList(),this.setListItemGroups(),this.cancelable.add(this.updateListItemsDebounced)}async load(){this.handleInteractionModeWarning()}willUpdate(e){(e.has("filterText")||e.has("filterProps")||e.has("filterPredicate"))&&this.performFilter(),(e.has("filterEnabled")&&(this.hasUpdated||this.filterEnabled!==!1)||e.has("group")||e.has("sortDisabled")&&(this.hasUpdated||this.sortDisabled!==!1)||e.has("dragEnabled")&&(this.hasUpdated||this.dragEnabled!==!1)||e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="none")||e.has("selectionAppearance")&&(this.hasUpdated||this.selectionAppearance!=="icon")||e.has("displayMode")&&this.hasUpdated||e.has("scale")&&this.hasUpdated||e.has("canPull")&&this.hasUpdated||e.has("canPut")&&this.hasUpdated||e.has("filterPredicate")&&this.hasUpdated)&&this.handleListItemChange()}updated(){G(this)}disconnectedCallback(){super.disconnectedCallback(),this.disconnectObserver(),K(this)}updateListItems(){this.updateGroupItems();let{selectionAppearance:e,selectionMode:t,interactionMode:s,dragEnabled:a,el:i,filterEl:n,displayMode:l,scale:r,sortDisabled:c,sortHandleMenuItems:u}=this,p=Array.from(this.el.querySelectorAll(I)),S=i,$=Array.from(S.children).filter(b);if(p.forEach(o=>{o.scale=r,o.selectionAppearance=e,o.selectionMode=t,o.interactionMode=s,o.closest(E)===i&&(o.moveToItems=u.filter(x=>this.validateSortMenuItem({type:"move",fromEl:S,toEl:x.element,dragEl:o,newIndex:0,oldIndex:$.indexOf(o)})),o.addToItems=this.sortHandleMenuItems.filter(x=>this.validateSortMenuItem({type:"add",fromEl:S,toEl:x.element,dragEl:o,newIndex:0,oldIndex:$.indexOf(o)})),o.dragHandle=a,o.displayMode=l,o.sortDisabled=c)}),this.parentListEl){this.setUpSorting();return}this.listItems=p,this.filterEnabled&&this.willPerformFilter&&(this.willPerformFilter=!1,this.dataForFilter=this.getItemData(),n&&(n.items=this.dataForFilter,this.filterAndUpdateData())),this.visibleItems=this.listItems.filter(o=>!o.closed&&!o.hidden),this.updateFilteredItems(),this.borderItems(),this.focusableItems=this.filteredItems.filter(o=>!o.disabled),this.setActiveListItem(),this.updateSelectedItems(),this.setUpSorting()}handleListItemChange(){this.willPerformFilter=!0,this.updateListItemsDebounced()}handleCalciteListItemToggle(e){this.parentListEl||(e.stopPropagation(),this.borderItems())}handleCalciteInternalFocusPreviousItem(e){if(this.parentListEl)return;e.stopPropagation();let{focusableItems:t}=this,a=t.findIndex(i=>i.active)-1;t[a]&&this.focusRow(t[a])}handleCalciteInternalListItemActive(e){if(this.parentListEl)return;e.stopPropagation();let t=e.target,{listItems:s}=this;s.forEach(a=>{a.active=a===t})}handleCalciteListItemSelect(){this.parentListEl||this.updateSelectedItems(!0)}handleCalciteInternalAssistiveTextChange(e){this.assistiveText=e.detail.message,e.stopPropagation()}handleSortReorder(e){this.parentListEl||e.defaultPrevented||(e.preventDefault(),this.handleReorder(e))}handleSortAdd(e){this.parentListEl||e.defaultPrevented||(e.preventDefault(),this.handleAdd(e))}handleSortMove(e){this.parentListEl||e.defaultPrevented||(e.preventDefault(),this.handleMove(e))}handleCalciteInternalListItemSelect(e){if(this.parentListEl)return;e.stopPropagation();let t=e.target,{listItems:s,selectionMode:a}=this;t.selected&&(a==="single"||a==="single-persist")&&s.forEach(i=>i.selected=i===t),this.updateSelectedItems()}handleCalciteInternalListItemSelectMultiple(e){if(this.parentListEl)return;e.stopPropagation();let{target:t,detail:s}=e,{focusableItems:a,lastSelectedInfo:i}=this,n=t;if(s.selectMultiple&&i){let l=a.indexOf(n),r=a.indexOf(i.selectedItem),c=Math.min(r,l),u=Math.max(r,l);a.slice(c,u+1).forEach(p=>p.selected=i.selected)}else this.lastSelectedInfo={selectedItem:n,selected:n.selected}}handleCalciteInternalListItemChange(e){this.parentListEl||(e.stopPropagation(),this.updateListItemsDebounced())}handleCalciteInternalListItemGroupDefaultSlotChange(e){e.stopPropagation()}connectObserver(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}disconnectObserver(){this.mutationObserver?.disconnect()}setUpSorting(){let{dragEnabled:e,defaultSlotEl:t}=this;e&&(t&&_(t),W(this))}onGlobalDragStart(){this.disconnectObserver()}onGlobalDragEnd(){this.connectObserver()}onDragEnd(e){this.calciteListDragEnd.emit(e)}onDragStart(e){e.dragEl.sortHandleOpen=!1,this.calciteListDragStart.emit(e)}onDragSort(e){this.setParentList(),this.updateListItemsDebounced(),this.calciteListOrderChange.emit(e)}setParentList(){this.parentListEl=this.el.parentElement?.closest(E)}handleDefaultSlotChange(){this.parentListEl&&this.calciteInternalListDefaultSlotChange.emit()}setListItemGroups(){this.listItemGroups=Array.from(this.el.querySelectorAll(L))}handleFilterActionsStartSlotChange(e){this.hasFilterActionsStart=v(e)}handleFilterActionsEndSlotChange(e){this.hasFilterActionsEnd=v(e)}handleFilterNoResultsSlotChange(e){this.hasFilterNoResults=v(e)}setActiveListItem(){let{focusableItems:e}=this;e.some(t=>t.active)||e[0]&&(e[0].active=!0)}async updateSelectedItems(e=!1){await this.updateComplete,this.selectedItems=this.visibleItems.filter(t=>t.selected),e&&this.calciteListChange.emit()}filterElements({el:e,filteredItems:t,visibleParents:s}){let a=!s.has(e)&&!t.includes(e);e.filterHidden=a;let i=e.parentElement.closest(J);i&&(a||s.add(i),this.filterElements({el:i,filteredItems:t,visibleParents:s}))}allParentListItemsExpanded(e){let t=e.parentElement?.closest(I);if(t){if(!t.expanded)return!1}else return!0;return this.allParentListItemsExpanded(t)}borderItems(){let e=this.visibleItems.filter(t=>!t.filterHidden&&this.allParentListItemsExpanded(t));e.forEach(t=>t.bordered=t!==e[e.length-1])}updateFilteredItems(){let{visibleItems:e,filteredData:t,filterText:s,filterPredicate:a}=this,i=e?.filter(r=>e.every(c=>c===r||!r.contains(c))),n=a?e.filter(a):s?t.map(r=>r.el):e||[],l=new WeakSet;i.forEach(r=>this.filterElements({el:r,filteredItems:n,visibleParents:l})),this.filteredItems=n,this.willFilterEmit&&(this.willFilterEmit=!1,this.calciteListFilter.emit())}updateFilteredData(){let{filterEl:e}=this;e&&(e.filteredItems&&(this.filteredData=e.filteredItems),this.updateListItemsDebounced())}async filterAndUpdateData(){await this.filterEl?.filter(this.filterText),this.updateFilteredData()}get effectiveFilterProps(){return this.filterProps?this.filterProps.filter(e=>e!=="el"):["description","label","metadata","heading"]}performFilter(){let{filterEl:e,filterText:t,effectiveFilterProps:s}=this;e&&(e.value=t,e.filterProps=s,this.filterAndUpdateData())}setDefaultSlotEl(e){this.defaultSlotEl=e}setFilterEl(e){this.filterEl=e,this.performFilter()}handleFilterChange(e){e.stopPropagation();let{value:t}=e.currentTarget;this.filterText=t,this.willFilterEmit=!0,this.updateFilteredData()}getItemData(){return this.listItems.map(e=>({label:e.label,description:e.description,metadata:e.metadata,heading:this.getGroupHeading(e),el:e}))}getGroupHeading(e){return this.listItemGroups.filter(s=>s.contains(e)).map(s=>s.heading)}updateGroupItems(){let{el:e,group:t,scale:s}=this,a=R(e),i=t?Array.from(a.querySelectorAll(`${E}[group="${t}"]`)).filter(l=>!l.disabled&&l.dragEnabled):[];this.sortHandleMenuItems=i.map(l=>({element:l,label:l.label??l.id,id:H()})),Array.from(this.el.querySelectorAll(L)).forEach(l=>{l.scale=s})}focusRow(e){let{focusableItems:t}=this;e&&(t.forEach(s=>s.active=s===e),e.setFocus())}isNavigable(e){let t=e.parentElement?.closest(I);return t?t.expanded&&this.isNavigable(t):!0}handleListKeydown(e){if(e.defaultPrevented||this.parentListEl)return;let{key:t}=e,s=this.focusableItems.filter(i=>this.isNavigable(i)),a=s.findIndex(i=>i.active);if(t==="ArrowDown"){e.preventDefault();let i=e.target===this.filterEl?0:a+1;s[i]&&this.focusRow(s[i])}else if(t==="ArrowUp"){if(e.preventDefault(),a===0&&this.filterEnabled){this.filterEl.setFocus();return}let i=a-1;s[i]&&this.focusRow(s[i])}else if(t==="Home"){e.preventDefault();let i=s[0];i&&this.focusRow(i)}else if(t==="End"){e.preventDefault();let i=s[s.length-1];i&&this.focusRow(i)}}handleInteractionModeWarning(){this.interactionMode==="static"&&this.selectionMode!=="none"&&this.selectionAppearance==="border"&&console.warn('selection-appearance="border" requires interaction-mode="interactive"')}validateSortMenuItem({fromEl:e,toEl:t,dragEl:s,newIndex:a,oldIndex:i,type:n}){if(!e||!t||t===e||s.contains(t))return!1;let l=e.canPull?.({toEl:t,fromEl:e,dragEl:s,newIndex:a,oldIndex:i})??!0,r=t.canPut?.({toEl:t,fromEl:e,dragEl:s,newIndex:a,oldIndex:i})??!0;return(n==="add"?l==="clone":l===!0)&&r}handleAdd(e){let{addTo:t}=e.detail,s=e.target,a=s?.parentElement,i=t.element,l=Array.from(a.children).filter(b).indexOf(s),r=0;if(!this.validateSortMenuItem({type:"add",fromEl:a,toEl:i,dragEl:s,newIndex:r,oldIndex:l}))return;s.sortHandleOpen=!1,this.disconnectObserver();let c=s.cloneNode();i.prepend(c),D(s),this.updateListItemsDebounced(),this.connectObserver();let u={dragEl:s,fromEl:a,toEl:i,newIndex:r,oldIndex:l};this.calciteListOrderChange.emit(u),i.emitOrderChangeEvent(u)}handleMove(e){let{moveTo:t}=e.detail,s=e.target,a=s?.parentElement,i=t.element,l=Array.from(a.children).filter(b).indexOf(s),r=0;if(!this.validateSortMenuItem({type:"move",fromEl:a,toEl:i,dragEl:s,newIndex:r,oldIndex:l}))return;s.sortHandleOpen=!1,this.disconnectObserver(),i.prepend(s),D(s),this.updateListItemsDebounced(),this.connectObserver();let c={dragEl:s,fromEl:a,toEl:i,newIndex:r,oldIndex:l};this.calciteListOrderChange.emit(c),i.emitOrderChangeEvent(c)}handleReorder(e){let{reorder:t}=e.detail,s=e.target,a=s?.parentElement;if(!a)return;s.sortHandleOpen=!1;let i=Array.from(a.children).filter(b),n=i.length-1,l=i.indexOf(s),r=l;switch(t){case"top":r=0;break;case"bottom":r=n;break;case"up":r=l===0?0:l-1;break;case"down":r=l===n?n:l+1;break}this.disconnectObserver();let c=t==="up"||t==="top"?i[r]:i[r].nextSibling;a.insertBefore(s,c),this.updateListItemsDebounced(),this.connectObserver(),this.calciteListOrderChange.emit({dragEl:s,fromEl:a,toEl:a,newIndex:r,oldIndex:l})}render(){let{loading:e,label:t,disabled:s,dataForFilter:a,filterEnabled:i,filterPlaceholder:n,filterText:l,filterLabel:r,hasFilterActionsStart:c,hasFilterActionsEnd:u,effectiveFilterProps:p}=this;return z({disabled:this.disabled,children:d`<div class=${h({[f.container]:!0,[f.containerHeight]:this.listItems.length<1&&e})}>${this.dragEnabled?d`<span aria-live=assertive class=${h(f.assistiveText)}>${this.assistiveText}</span>`:null}${this.renderItemAriaLive()}${e?d`<calcite-scrim class=${h(f.scrim)} .loading=${e}></calcite-scrim>`:null}<div .ariaBusy=${e} .ariaLabel=${t||""} class=${h(f.table)} @keydown=${this.handleListKeydown} role=treegrid>${i||c||u?d`<div class=${h(f.sticky)} role=rowgroup><div role=row><div role=columnheader><calcite-stack class=${h(f.stack)}><slot name=${y.filterActionsStart} @slotchange=${this.handleFilterActionsStartSlotChange} slot=${A.actionsStart}></slot><calcite-filter .ariaLabel=${n} .disabled=${s} .filterProps=${p} .items=${a} .label=${r} @calciteFilterChange=${this.handleFilterChange} .placeholder=${n} .scale=${this.scale} .value=${l} ${C(this.setFilterEl)}></calcite-filter><slot name=${y.filterActionsEnd} @slotchange=${this.handleFilterActionsEndSlotChange} slot=${A.actionsEnd}></slot></calcite-stack></div></div></div>`:null}<div class=${h(f.tableContainer)} role=rowgroup><slot @slotchange=${this.handleDefaultSlotChange} ${C(this.setDefaultSlotEl)}></slot></div></div><div aria-live=polite data-test-id=no-results-container .hidden=${!this.showNoResultsContainer}><slot name=${y.filterNoResults} @slotchange=${this.handleFilterNoResultsSlotChange}></slot></div></div>`})}renderItemAriaLive(){let{messages:e,filteredItems:t,parentListEl:s,messages:{_lang:a},numberingSystem:i}=this;return F.numberFormatOptions={locale:a,numberingSystem:i},s?null:d`<div aria-live=polite class=${h(f.assistiveText)}>${this.hasActiveFilter?g("aria-filter-enabled",d`<div>${e.filterEnabled}</div>`):null}${g("aria-item-count",d`<div>${e.total.replace("{count}",F.localize(t.length.toString()))}</div>`)}${t.length?g("aria-item-list",d`<ol>${t.map(n=>d`<li>${n.label}</li>`)}</ol>`):null}</div>`}};k("calcite-list",P);export{P as List};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v5.0.0-next.2 */
4
- import{a as F}from"./ZS5AQJG2.js";import{c as z,d as C,e as A}from"./Z7ARDFVR.js";import{c as w,e as I,h as R}from"./RJQBTNQM.js";import{a as y,b as B}from"./MNOO2GEE.js";import{a as d}from"./7NSIROF7.js";import{a as x}from"./UMUEMXJF.js";import"./GBKXT23N.js";import"./KJXOD5Z2.js";import"./UBGSVRI6.js";import{e as k}from"./S4PILGWU.js";import"./OFPYAEOU.js";import{B as p,C as m,D as v,E as l,P as g,g as u,h as b,l as f,o as c}from"./C7SWOQAB.js";var L={container:"container",radio:"radio"},T=u`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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;cursor:pointer}:host .container{position:relative;outline:2px solid transparent;outline-offset:2px;display:flex}:host .radio{cursor:pointer;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;outline-color:transparent;border-radius:var(--calcite-radio-button-corner-radius, var(--calcite-corner-radius-pill));background-color:var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1));box-shadow:inset 0 0 0 var(--calcite-border-width-sm) var(--calcite-radio-button-border-color, var(--calcite-color-border-input))}:host([hovered]) .radio,:host(:not([checked])[focused]:not([disabled])) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-md) var(--calcite-radio-button-border-color, var(--calcite-color-brand-hover))}:host([hovered]) .radio:active,:host(:not([checked])[focused]:not([disabled])) .radio:active{box-shadow:inset 0 0 0 var(--calcite-border-width-md) var(--calcite-color-brand-press)}:host([focused]) .radio{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([disabled]) .radio{cursor:default;opacity:var(--calcite-opacity-disabled)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hovered][disabled]) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-sm) var(--calcite-radio-button-border-color, var(--calcite-color-border-input))}:host([scale=s]){--calcite-internal-radio-size: var( --calcite-radio-button-size, var(--calcite-radio-size, var(--calcite-size-fixed-md)) )}:host([scale=m]){--calcite-internal-radio-size: var( --calcite-radio-button-size, var(--calcite-radio-size, var(--calcite-size-fixed-md-plus)) )}:host([scale=l]){--calcite-internal-radio-size: var( --calcite-radio-button-size, var(--calcite-radio-size, var(--calcite-size-fixed-lg)) )}.radio{block-size:var(--calcite-internal-radio-size);inline-size:var(--calcite-internal-radio-size);size:var(--calcite-internal-radio-size)}:host([scale=s][checked]) .radio,:host([hovered][scale=s][checked][disabled]) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-lg) var(--calcite-radio-button-border-color, var(--calcite-color-brand))}:host([scale=s][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-lg) var(--calcite-radio-button-border-color, var(--calcite-color-brand)),0 0 0 2px var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1))}:host([scale=m][checked]) .radio,:host([hovered][scale=m][checked][disabled]) .radio{box-shadow:inset 0 0 0 5px var(--calcite-radio-button-border-color, var(--calcite-color-brand))}:host([scale=m][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 5px var(--calcite-radio-button-border-color, var(--calcite-color-brand)),0 0 0 2px var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1))}:host([scale=l][checked]) .radio,:host([hovered][scale=l][checked][disabled]) .radio{box-shadow:inset 0 0 0 6px var(--calcite-radio-button-border-color, var(--calcite-color-brand))}:host([scale=l][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 6px var(--calcite-radio-button-border-color, var(--calcite-color-brand)),0 0 0 2px var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1))}@media(forced-colors:active){:host([checked]) .radio:after,:host([checked][disabled]) .radio:after{content:"";inline-size:var(--calcite-internal-radio-size);block-size:var(--calcite-internal-radio-size);background-color:CanvasText;display:block}}.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)}::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}`,h=class extends v{constructor(){super(),this.containerRef=p(),this.focusSetter=x()(this),this.checked=!1,this.disabled=!1,this.focused=!1,this.hovered=!1,this.required=!1,this.scale="m",this.calciteInternalRadioButtonBlur=c({cancelable:!1}),this.calciteInternalRadioButtonCheckedChange=c({cancelable:!1}),this.calciteInternalRadioButtonFocus=c({cancelable:!1}),this.calciteRadioButtonChange=c({cancelable:!1}),this.listen("pointerenter",this.pointerEnterHandler),this.listen("pointerleave",this.pointerLeaveHandler),this.listen("click",this.clickHandler),this.listen("keydown",this.handleKeyDown)}static{this.properties={checked:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],focused:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],hovered:[7,{},{reflect:!0,type:Boolean}],label:1,labelText:1,name:[3,{},{reflect:!0}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],value:1}}static{this.styles=T}async emitCheckedChange(){this.calciteInternalRadioButtonCheckedChange.emit()}async setFocus(e){return this.focusSetter(()=>this.containerRef.value,e)}connectedCallback(){this.rootNode=this.el.getRootNode(),this.name&&this.checkLastRadioButton(),z(this),w(this),this.updateTabIndexOfOtherRadioButtonsInGroup(),super.connectedCallback()}willUpdate(e){this.hasUpdated&&e.has("checked")&&this.checkedChanged(this.checked),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.updateTabIndexOfOtherRadioButtonsInGroup(),e.has("name")&&this.checkLastRadioButton()}updated(){y(this)}loaded(){this.focused&&!this.disabled&&this.setFocus()}disconnectedCallback(){super.disconnectedCallback(),C(this),I(this),this.updateTabIndexOfOtherRadioButtonsInGroup()}checkedChanged(e){e&&this.uncheckOtherRadioButtonsInGroup(),this.calciteInternalRadioButtonCheckedChange.emit()}syncHiddenFormInput(e){e.type="radio"}selectItem(e,i){e[i].click()}queryButtons(){return Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden])")).filter(e=>e.name===this.name)}isFocusable(){let e=this.queryButtons(),i=e.find(a=>!a.disabled),t=e.find(a=>a.checked);return i===this.el&&!t}check(){this.disabled||(this.focused=!0,this.setFocus(),!this.checked&&(this.uncheckAllRadioButtonsInGroup(),this.checked=!0,this.calciteRadioButtonChange.emit()))}clickHandler(){this.disabled||this.check()}onLabelClick(e){if(this.disabled||this.el.hidden)return;let i=e.currentTarget,t=i.for?this.rootNode.querySelector(`calcite-radio-button[id="${i.for}"]`):i.querySelector(`calcite-radio-button[name="${this.name}"]`);t&&(t.focused=!0,this.setFocus(),!t.checked&&(this.uncheckOtherRadioButtonsInGroup(),t.checked=!0,this.calciteRadioButtonChange.emit()))}checkLastRadioButton(){let i=this.queryButtons().filter(t=>t.checked);if(i?.length>1){let t=i[i.length-1];i.filter(a=>a!==t).forEach(a=>{a.checked=!1,a.emitCheckedChange()})}}uncheckAllRadioButtonsInGroup(){this.queryButtons().forEach(i=>{i.checked&&(i.checked=!1,i.focused=!1)})}uncheckOtherRadioButtonsInGroup(){this.queryButtons().filter(t=>t!==this.el).forEach(t=>{t.checked&&(t.checked=!1,t.focused=!1)})}updateTabIndexOfOtherRadioButtonsInGroup(){this.queryButtons().filter(t=>t!==this.el&&!t.disabled).forEach(t=>{t.manager?.component.requestUpdate()})}getTabIndex(){if(!this.disabled)return this.checked||this.isFocusable()?0:-1}pointerEnterHandler(){this.disabled||(this.hovered=!0)}pointerLeaveHandler(){this.disabled||(this.hovered=!1)}handleKeyDown(e){let i=["ArrowLeft","ArrowUp","ArrowRight","ArrowDown"," "],{key:t}=e,{el:a}=this;if(i.indexOf(t)===-1)return;if(t===" "){this.check(),e.preventDefault();return}let r=t;k(a)==="rtl"&&(t==="ArrowRight"&&(r="ArrowLeft"),t==="ArrowLeft"&&(r="ArrowRight"));let o=Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden])")).filter(s=>s.name===this.name),n=0;switch(o.some((s,q)=>{if(s.checked)return n=q,!0}),r){case"ArrowLeft":case"ArrowUp":e.preventDefault(),this.selectItem(o,this.getNextNonDisabledIndex(o,n,"left"));return;case"ArrowRight":case"ArrowDown":e.preventDefault(),this.selectItem(o,this.getNextNonDisabledIndex(o,n,"right"));return;default:return}}getNextNonDisabledIndex(e,i,t){let a=e.length,r=t==="left"?-1:1,o=d(i+r,a);for(;e[o].disabled;)o=d(o+r,a);return o}onContainerBlur(){this.focused=!1,this.calciteInternalRadioButtonBlur.emit()}onContainerFocus(){this.disabled||(this.focused=!0,this.calciteInternalRadioButtonFocus.emit())}render(){let e=this.getTabIndex();return B({disabled:this.disabled,children:b`<div .ariaChecked=${this.checked} .ariaLabel=${A(this)} class=${l(L.container)} @blur=${this.onContainerBlur} @focus=${this.onContainerFocus} role=radio tabindex=${e??f} ${m(this.containerRef)}><div class=${l(L.radio)}></div>${this.labelText&&F({labelText:this.labelText,spacingInlineStart:!0})||""}</div>${R({component:this})}`})}};g("calcite-radio-button",h);export{h as RadioButton};
3
+ v5.0.0-next.3 */
4
+ import{a as F}from"./E2ETQPML.js";import{c as z,d as C,e as A}from"./5JALWDSF.js";import{c as w,e as I,h as R}from"./RWVRFF3I.js";import{a as y,b as B}from"./EU6IVBMM.js";import{a as d}from"./PBJYTCZQ.js";import{a as x}from"./XWXCOJUO.js";import"./UXWFYSWM.js";import"./JW4SOJWB.js";import"./P2RYGBBZ.js";import{e as k}from"./SLICSH62.js";import"./DNM3U3Z7.js";import{B as p,C as m,D as v,E as l,P as g,g as u,h as b,l as f,o as c}from"./ALOAVLGK.js";var L={container:"container",radio:"radio"},T=u`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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;cursor:pointer}:host .container{position:relative;outline:2px solid transparent;outline-offset:2px;display:flex}:host .radio{cursor:pointer;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;outline-color:transparent;border-radius:var(--calcite-radio-button-corner-radius, var(--calcite-corner-radius-pill));background-color:var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1));box-shadow:inset 0 0 0 var(--calcite-border-width-sm) var(--calcite-radio-button-border-color, var(--calcite-color-border-input))}:host([hovered]) .radio,:host(:not([checked])[focused]:not([disabled])) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-md) var(--calcite-radio-button-border-color, var(--calcite-color-brand-hover))}:host([hovered]) .radio:active,:host(:not([checked])[focused]:not([disabled])) .radio:active{box-shadow:inset 0 0 0 var(--calcite-border-width-md) var(--calcite-color-brand-press)}:host([focused]) .radio{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([disabled]) .radio{cursor:default;opacity:var(--calcite-opacity-disabled)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hovered][disabled]) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-sm) var(--calcite-radio-button-border-color, var(--calcite-color-border-input))}:host([scale=s]){--calcite-internal-radio-size: var( --calcite-radio-button-size, var(--calcite-radio-size, var(--calcite-size-fixed-md)) )}:host([scale=m]){--calcite-internal-radio-size: var( --calcite-radio-button-size, var(--calcite-radio-size, var(--calcite-size-fixed-md-plus)) )}:host([scale=l]){--calcite-internal-radio-size: var( --calcite-radio-button-size, var(--calcite-radio-size, var(--calcite-size-fixed-lg)) )}.radio{block-size:var(--calcite-internal-radio-size);inline-size:var(--calcite-internal-radio-size);size:var(--calcite-internal-radio-size)}:host([scale=s][checked]) .radio,:host([hovered][scale=s][checked][disabled]) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-lg) var(--calcite-radio-button-border-color, var(--calcite-color-brand))}:host([scale=s][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-lg) var(--calcite-radio-button-border-color, var(--calcite-color-brand)),0 0 0 2px var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1))}:host([scale=m][checked]) .radio,:host([hovered][scale=m][checked][disabled]) .radio{box-shadow:inset 0 0 0 5px var(--calcite-radio-button-border-color, var(--calcite-color-brand))}:host([scale=m][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 5px var(--calcite-radio-button-border-color, var(--calcite-color-brand)),0 0 0 2px var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1))}:host([scale=l][checked]) .radio,:host([hovered][scale=l][checked][disabled]) .radio{box-shadow:inset 0 0 0 6px var(--calcite-radio-button-border-color, var(--calcite-color-brand))}:host([scale=l][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 6px var(--calcite-radio-button-border-color, var(--calcite-color-brand)),0 0 0 2px var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1))}@media(forced-colors:active){:host([checked]) .radio:after,:host([checked][disabled]) .radio:after{content:"";inline-size:var(--calcite-internal-radio-size);block-size:var(--calcite-internal-radio-size);background-color:CanvasText;display:block}}.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)}::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}`,h=class extends v{constructor(){super(),this.containerRef=p(),this.focusSetter=x()(this),this.checked=!1,this.disabled=!1,this.focused=!1,this.hovered=!1,this.required=!1,this.scale="m",this.calciteInternalRadioButtonBlur=c({cancelable:!1}),this.calciteInternalRadioButtonCheckedChange=c({cancelable:!1}),this.calciteInternalRadioButtonFocus=c({cancelable:!1}),this.calciteRadioButtonChange=c({cancelable:!1}),this.listen("pointerenter",this.pointerEnterHandler),this.listen("pointerleave",this.pointerLeaveHandler),this.listen("click",this.clickHandler),this.listen("keydown",this.handleKeyDown)}static{this.properties={checked:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],focused:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],hovered:[7,{},{reflect:!0,type:Boolean}],label:1,labelText:1,name:[3,{},{reflect:!0}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],value:1}}static{this.styles=T}async emitCheckedChange(){this.calciteInternalRadioButtonCheckedChange.emit()}async setFocus(e){return this.focusSetter(()=>this.containerRef.value,e)}connectedCallback(){this.rootNode=this.el.getRootNode(),this.name&&this.checkLastRadioButton(),z(this),w(this),this.updateTabIndexOfOtherRadioButtonsInGroup(),super.connectedCallback()}willUpdate(e){this.hasUpdated&&e.has("checked")&&this.checkedChanged(this.checked),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.updateTabIndexOfOtherRadioButtonsInGroup(),e.has("name")&&this.checkLastRadioButton()}updated(){y(this)}loaded(){this.focused&&!this.disabled&&this.setFocus()}disconnectedCallback(){super.disconnectedCallback(),C(this),I(this),this.updateTabIndexOfOtherRadioButtonsInGroup()}checkedChanged(e){e&&this.uncheckOtherRadioButtonsInGroup(),this.calciteInternalRadioButtonCheckedChange.emit()}syncHiddenFormInput(e){e.type="radio"}selectItem(e,i){e[i].click()}queryButtons(){return Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden])")).filter(e=>e.name===this.name)}isFocusable(){let e=this.queryButtons(),i=e.find(a=>!a.disabled),t=e.find(a=>a.checked);return i===this.el&&!t}check(){this.disabled||(this.focused=!0,this.setFocus(),!this.checked&&(this.uncheckAllRadioButtonsInGroup(),this.checked=!0,this.calciteRadioButtonChange.emit()))}clickHandler(){this.disabled||this.check()}onLabelClick(e){if(this.disabled||this.el.hidden)return;let i=e.currentTarget,t=i.for?this.rootNode.querySelector(`calcite-radio-button[id="${i.for}"]`):i.querySelector(`calcite-radio-button[name="${this.name}"]`);t&&(t.focused=!0,this.setFocus(),!t.checked&&(this.uncheckOtherRadioButtonsInGroup(),t.checked=!0,this.calciteRadioButtonChange.emit()))}checkLastRadioButton(){let i=this.queryButtons().filter(t=>t.checked);if(i?.length>1){let t=i[i.length-1];i.filter(a=>a!==t).forEach(a=>{a.checked=!1,a.emitCheckedChange()})}}uncheckAllRadioButtonsInGroup(){this.queryButtons().forEach(i=>{i.checked&&(i.checked=!1,i.focused=!1)})}uncheckOtherRadioButtonsInGroup(){this.queryButtons().filter(t=>t!==this.el).forEach(t=>{t.checked&&(t.checked=!1,t.focused=!1)})}updateTabIndexOfOtherRadioButtonsInGroup(){this.queryButtons().filter(t=>t!==this.el&&!t.disabled).forEach(t=>{t.manager?.component.requestUpdate()})}getTabIndex(){if(!this.disabled)return this.checked||this.isFocusable()?0:-1}pointerEnterHandler(){this.disabled||(this.hovered=!0)}pointerLeaveHandler(){this.disabled||(this.hovered=!1)}handleKeyDown(e){let i=["ArrowLeft","ArrowUp","ArrowRight","ArrowDown"," "],{key:t}=e,{el:a}=this;if(i.indexOf(t)===-1)return;if(t===" "){this.check(),e.preventDefault();return}let r=t;k(a)==="rtl"&&(t==="ArrowRight"&&(r="ArrowLeft"),t==="ArrowLeft"&&(r="ArrowRight"));let o=Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden])")).filter(s=>s.name===this.name),n=0;switch(o.some((s,q)=>{if(s.checked)return n=q,!0}),r){case"ArrowLeft":case"ArrowUp":e.preventDefault(),this.selectItem(o,this.getNextNonDisabledIndex(o,n,"left"));return;case"ArrowRight":case"ArrowDown":e.preventDefault(),this.selectItem(o,this.getNextNonDisabledIndex(o,n,"right"));return;default:return}}getNextNonDisabledIndex(e,i,t){let a=e.length,r=t==="left"?-1:1,o=d(i+r,a);for(;e[o].disabled;)o=d(o+r,a);return o}onContainerBlur(){this.focused=!1,this.calciteInternalRadioButtonBlur.emit()}onContainerFocus(){this.disabled||(this.focused=!0,this.calciteInternalRadioButtonFocus.emit())}render(){let e=this.getTabIndex();return B({disabled:this.disabled,children:b`<div .ariaChecked=${this.checked} .ariaLabel=${A(this)} class=${l(L.container)} @blur=${this.onContainerBlur} @focus=${this.onContainerFocus} role=radio tabindex=${e??f} ${m(this.containerRef)}><div class=${l(L.radio)}></div>${this.labelText&&F({labelText:this.labelText,spacingInlineStart:!0})||""}</div>${R({component:this})}`})}};g("calcite-radio-button",h);export{h as RadioButton};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v5.0.0-next.2 */
4
- import{a as T}from"./VC3LAQJK.js";import{a as R}from"./ZS5AQJG2.js";import{c as M,d as E,e as O}from"./Z7ARDFVR.js";import{c as F,e as S,h as q}from"./RJQBTNQM.js";import{a as C,b as z}from"./MNOO2GEE.js";import{a as I}from"./EU53PNIW.js";import{a as L}from"./UMUEMXJF.js";import"./GBKXT23N.js";import"./KJXOD5Z2.js";import"./UBGSVRI6.js";import"./S4PILGWU.js";import{a as V}from"./OFPYAEOU.js";import{A as y,D as $,E as s,F as x,G as o,I as k,P as w,g as b,h as n,o as f}from"./C7SWOQAB.js";var P=({full:h,scale:e,partial:t})=>n`<calcite-icon class=${s(t?void 0:"icon")} .icon=${h?"star-f":"star"} .scale=${e}></calcite-icon>`,l={fieldSet:"fieldset",star:"star",fraction:"fraction",numberAverage:"number--average",numberCount:"number--count",wrapper:"wrapper",visuallyHidden:"visually-hidden"},K="calcite-ratings",v={validationMessage:"validationMessage",host:h=>`${K}-${h}`},N=b`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([read-only]) *,:host([disabled]) *,:host([read-only]) ::slotted(*),:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:flex;align-items:center;inline-size:fit-content}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){block-size:1.5rem;--calcite-internal-rating-spacing: .25rem}:host([scale=m]){block-size:2rem;--calcite-internal-rating-spacing: .5rem}:host([scale=l]){block-size:2.75rem;--calcite-internal-rating-spacing: .75rem}.fieldset{margin:0;display:flex;border-width:0;padding:0;align-items:center;gap:var(--calcite-rating-spacing, var(--calcite-internal-rating-spacing))}.wrapper{display:inline-block}.star{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;position:relative;display:flex;flex-direction:column;cursor:pointer;color:var(--calcite-rating-color, var(--calcite-color-border-input))}.star:hover{color:var(--calcite-rating-color-hover, var(--calcite-color-brand-hover))}.star:active{color:var(--calcite-rating-color-press, var(--calcite-color-brand-press))}.star:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.average,.fraction{color:var(--calcite-rating-average-color, var(--calcite-color-status-warning))}.hovered,.selected{color:var(--calcite-rating-color, var(--calcite-color-brand))}.fraction{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;position:absolute;pointer-events:none;inset-block-start:0;overflow:hidden;inset-inline-start:0}calcite-chip{pointer-events:none;cursor:default}.number--average{font-weight:700;color:var(--calcite-rating-average-text-color)}.number--count{color:var(--calcite-rating-count-text-color, var(--calcite-color-text-2));font-style:italic}.number--count:not(:first-child){margin-inline-start:var(--calcite-rating-spacing, var(--calcite-internal-rating-spacing))}.visually-hidden{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}.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}`,m=class extends ${constructor(){super(),this.emit=!1,this.guid=v.host(V()),this.isKeyboardInteraction=!0,this.labelElements=[],this.max=5,this._value=0,this.messages=I({blocking:!0}),this.focusSetter=L()(this),this.disabled=!1,this.readOnly=!1,this.required=!1,this.scale="m",this.showChip=!1,this.status="idle",this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.calciteRatingChange=f({cancelable:!1}),this.listen("keydown",this.handleHostKeyDown),this.listen("pointerout",this.handleRatingPointerOut),this.listen("pointerover",this.handleRatingPointerOver)}static{this.properties={hoverValue:[16,{},{state:!0}],average:[11,{},{reflect:!0,type:Number}],count:[11,{},{reflect:!0,type:Number}],disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],labelText:1,messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],showChip:[7,{},{reflect:!0,type:Boolean}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:k,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:[11,{},{reflect:!0,type:Number}]}}static{this.styles=N}get value(){return this._value}set value(e){let t=this._value;e!==t&&(this._value=e,this.hasUpdated&&this.handleValueUpdate(e))}async setFocus(e){return this.focusSetter(()=>this.el,e)}connectedCallback(){super.connectedCallback(),M(this),F(this)}async load(){this.requestUpdate("value")}willUpdate(){this.starsMap=Array.from({length:this.max},(e,t)=>{let a=t+1,i=!this.hoverValue&&this.average&&!this.value&&a<=this.average,u=a===this.value,r=this.average&&this.average+1-a,c=a<=this.hoverValue,p=`${this.guid}-${a}`,d=!this.hoverValue&&!this.value&&!c&&r>0&&r<1,g=this.value>=a,D=this.getTabIndex(a);return{average:i,checked:u,fraction:r,hovered:c,id:p,partial:d,selected:g,value:a,tabIndex:D}})}updated(){C(this)}loaded(){this.labelElements=Array.from(this.renderRoot.querySelectorAll("label"))}disconnectedCallback(){super.disconnectedCallback(),E(this),S(this)}handleValueUpdate(e){this.hoverValue=e,this.emit&&this.calciteRatingChange.emit(),this.emit=!1}onLabelClick(){this.setFocus()}handleRatingPointerOver(){this.isKeyboardInteraction=!1}handleRatingPointerOut(){this.isKeyboardInteraction=!0,this.hoverValue=null}handleHostKeyDown(){this.isKeyboardInteraction=!0}handleLabelKeyDown(e){let t=this.getValueFromLabelEvent(e),a=e.key,i=a==" "?void 0:Number(a);if(this.emit=!0,isNaN(i))switch(a){case"Enter":case" ":this.value=!this.required&&this.value===t?0:t;break;case"ArrowLeft":this.value=this.getPreviousRatingValue(t),this.updateFocus(),e.preventDefault();break;case"ArrowRight":this.value=this.getNextRatingValue(t),this.updateFocus(),e.preventDefault();break;case"Tab":this.hoverValue=null;break}else!this.required&&i>=0&&i<=this.max?this.value=i:this.required&&i>0&&i<=this.max&&(this.value=i),this.updateFocus()}handleInputChange(e){if(this.isKeyboardInteraction===!0){let t=Number(e.target.value);this.hoverValue=t,this.value=t}}handleLabelPointerOver(e){this.hoverValue=this.getValueFromLabelEvent(e)}handleLabelPointerDown(e){let t=e.currentTarget,a=this.getValueFromLabelEvent(e);this.hoverValue=a,this.emit=!0,this.value=!this.required&&this.value===a?0:a,t.focus()}handleLabelClick(e){e.preventDefault()}handleLabelFocus(e){let t=this.getValueFromLabelEvent(e);this.hoverValue=t}updateFocus(){this.hoverValue=this.value,this.labelElements[this.value-1].focus()}getTabIndex(e){return this.readOnly||this.value!==e&&(this.value||e!==1)?-1:0}getValueFromLabelEvent(e){let t=e.currentTarget;return Number(t.getAttribute("data-value"))}getNextRatingValue(e){return e===5?1:e+1}getPreviousRatingValue(e){return e===1?5:e-1}render(){let e=this.count?.toString();return z({disabled:this.disabled,children:n`<span class=${s(l.wrapper)}>${this.labelText&&R({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<fieldset class=${s(l.fieldSet)} .disabled=${this.disabled}><legend class=${s(l.visuallyHidden)}>${this.messages.rating}</legend>${this.starsMap.map(({average:t,checked:a,fraction:i,hovered:u,id:r,partial:c,selected:p,value:d,tabIndex:g})=>n`<label class=${s({[l.star]:!0,selected:p,hovered:u,average:t,partial:c})} data-value=${d??o} for=${r??o} @click=${this.handleLabelClick} @focus=${this.handleLabelFocus} @keydown=${this.handleLabelKeyDown} @pointerdown=${this.handleLabelPointerDown} @pointerover=${this.handleLabelPointerOver} tabindex=${g??o}><input aria-errormessage=${v.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaLabel=${O(this)} .ariaRequired=${this.required} .checked=${a} class=${s(l.visuallyHidden)} .disabled=${this.disabled||this.readOnly} id=${r??o} name=${this.guid??o} @change=${this.handleInputChange} tabindex=-1 type=radio .value=${y(d??"")}>${P({full:p||t||u,scale:this.scale})}${c&&n`<div class=${s(l.fraction)} style=${x({width:`${i*100}%`})}>${P({full:!0,partial:!0,scale:this.scale})}</div>`||""}<span class=${s(l.visuallyHidden)}>${this.messages.stars.replace("{num}",`${d}`)}</span></label>`)}${(this.count||this.average)&&this.showChip?n`<calcite-chip .label=${e} .scale=${this.scale} .value=${e}>${!!this.average&&n`<span class=${s(l.numberAverage)}>${this.average.toString()}</span>`||""}${!!this.count&&n`<span class=${s(l.numberCount)}>(${e})</span>`||""}</calcite-chip>`:null}</fieldset>${q({component:this})}${this.validationMessage&&this.status==="invalid"?T({icon:this.validationIcon,id:v.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}</span>`})}};w("calcite-rating",m);export{m as Rating};
3
+ v5.0.0-next.3 */
4
+ import{a as T}from"./IWU3WQTA.js";import{a as R}from"./E2ETQPML.js";import{c as M,d as E,e as O}from"./5JALWDSF.js";import{c as F,e as S,h as q}from"./RWVRFF3I.js";import{a as C,b as z}from"./EU6IVBMM.js";import{a as I}from"./WIJWBGXQ.js";import{a as L}from"./XWXCOJUO.js";import"./UXWFYSWM.js";import"./JW4SOJWB.js";import"./P2RYGBBZ.js";import"./SLICSH62.js";import{a as V}from"./DNM3U3Z7.js";import{A as y,D as $,E as s,F as x,G as o,I as k,P as w,g as b,h as n,o as f}from"./ALOAVLGK.js";var P=({full:h,scale:e,partial:t})=>n`<calcite-icon class=${s(t?void 0:"icon")} .icon=${h?"star-f":"star"} .scale=${e}></calcite-icon>`,l={fieldSet:"fieldset",star:"star",fraction:"fraction",numberAverage:"number--average",numberCount:"number--count",wrapper:"wrapper",visuallyHidden:"visually-hidden"},K="calcite-ratings",v={validationMessage:"validationMessage",host:h=>`${K}-${h}`},N=b`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([read-only]) *,:host([disabled]) *,:host([read-only]) ::slotted(*),:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:flex;align-items:center;inline-size:fit-content}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){block-size:1.5rem;--calcite-internal-rating-spacing: .25rem}:host([scale=m]){block-size:2rem;--calcite-internal-rating-spacing: .5rem}:host([scale=l]){block-size:2.75rem;--calcite-internal-rating-spacing: .75rem}.fieldset{margin:0;display:flex;border-width:0;padding:0;align-items:center;gap:var(--calcite-rating-spacing, var(--calcite-internal-rating-spacing))}.wrapper{display:inline-block}.star{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;position:relative;display:flex;flex-direction:column;cursor:pointer;color:var(--calcite-rating-color, var(--calcite-color-border-input))}.star:hover{color:var(--calcite-rating-color-hover, var(--calcite-color-brand-hover))}.star:active{color:var(--calcite-rating-color-press, var(--calcite-color-brand-press))}.star:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.average,.fraction{color:var(--calcite-rating-average-color, var(--calcite-color-status-warning))}.hovered,.selected{color:var(--calcite-rating-color, var(--calcite-color-brand))}.fraction{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;position:absolute;pointer-events:none;inset-block-start:0;overflow:hidden;inset-inline-start:0}calcite-chip{pointer-events:none;cursor:default}.number--average{font-weight:700;color:var(--calcite-rating-average-text-color)}.number--count{color:var(--calcite-rating-count-text-color, var(--calcite-color-text-2));font-style:italic}.number--count:not(:first-child){margin-inline-start:var(--calcite-rating-spacing, var(--calcite-internal-rating-spacing))}.visually-hidden{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}.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}`,m=class extends ${constructor(){super(),this.emit=!1,this.guid=v.host(V()),this.isKeyboardInteraction=!0,this.labelElements=[],this.max=5,this._value=0,this.messages=I({blocking:!0}),this.focusSetter=L()(this),this.disabled=!1,this.readOnly=!1,this.required=!1,this.scale="m",this.showChip=!1,this.status="idle",this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.calciteRatingChange=f({cancelable:!1}),this.listen("keydown",this.handleHostKeyDown),this.listen("pointerout",this.handleRatingPointerOut),this.listen("pointerover",this.handleRatingPointerOver)}static{this.properties={hoverValue:[16,{},{state:!0}],average:[11,{},{reflect:!0,type:Number}],count:[11,{},{reflect:!0,type:Number}],disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],labelText:1,messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],showChip:[7,{},{reflect:!0,type:Boolean}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:k,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:[11,{},{reflect:!0,type:Number}]}}static{this.styles=N}get value(){return this._value}set value(e){let t=this._value;e!==t&&(this._value=e,this.hasUpdated&&this.handleValueUpdate(e))}async setFocus(e){return this.focusSetter(()=>this.el,e)}connectedCallback(){super.connectedCallback(),M(this),F(this)}async load(){this.requestUpdate("value")}willUpdate(){this.starsMap=Array.from({length:this.max},(e,t)=>{let a=t+1,i=!this.hoverValue&&this.average&&!this.value&&a<=this.average,u=a===this.value,r=this.average&&this.average+1-a,c=a<=this.hoverValue,p=`${this.guid}-${a}`,d=!this.hoverValue&&!this.value&&!c&&r>0&&r<1,g=this.value>=a,D=this.getTabIndex(a);return{average:i,checked:u,fraction:r,hovered:c,id:p,partial:d,selected:g,value:a,tabIndex:D}})}updated(){C(this)}loaded(){this.labelElements=Array.from(this.renderRoot.querySelectorAll("label"))}disconnectedCallback(){super.disconnectedCallback(),E(this),S(this)}handleValueUpdate(e){this.hoverValue=e,this.emit&&this.calciteRatingChange.emit(),this.emit=!1}onLabelClick(){this.setFocus()}handleRatingPointerOver(){this.isKeyboardInteraction=!1}handleRatingPointerOut(){this.isKeyboardInteraction=!0,this.hoverValue=null}handleHostKeyDown(){this.isKeyboardInteraction=!0}handleLabelKeyDown(e){let t=this.getValueFromLabelEvent(e),a=e.key,i=a==" "?void 0:Number(a);if(this.emit=!0,isNaN(i))switch(a){case"Enter":case" ":this.value=!this.required&&this.value===t?0:t;break;case"ArrowLeft":this.value=this.getPreviousRatingValue(t),this.updateFocus(),e.preventDefault();break;case"ArrowRight":this.value=this.getNextRatingValue(t),this.updateFocus(),e.preventDefault();break;case"Tab":this.hoverValue=null;break}else!this.required&&i>=0&&i<=this.max?this.value=i:this.required&&i>0&&i<=this.max&&(this.value=i),this.updateFocus()}handleInputChange(e){if(this.isKeyboardInteraction===!0){let t=Number(e.target.value);this.hoverValue=t,this.value=t}}handleLabelPointerOver(e){this.hoverValue=this.getValueFromLabelEvent(e)}handleLabelPointerDown(e){let t=e.currentTarget,a=this.getValueFromLabelEvent(e);this.hoverValue=a,this.emit=!0,this.value=!this.required&&this.value===a?0:a,t.focus()}handleLabelClick(e){e.preventDefault()}handleLabelFocus(e){let t=this.getValueFromLabelEvent(e);this.hoverValue=t}updateFocus(){this.hoverValue=this.value,this.labelElements[this.value-1].focus()}getTabIndex(e){return this.readOnly||this.value!==e&&(this.value||e!==1)?-1:0}getValueFromLabelEvent(e){let t=e.currentTarget;return Number(t.getAttribute("data-value"))}getNextRatingValue(e){return e===5?1:e+1}getPreviousRatingValue(e){return e===1?5:e-1}render(){let e=this.count?.toString();return z({disabled:this.disabled,children:n`<span class=${s(l.wrapper)}>${this.labelText&&R({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<fieldset class=${s(l.fieldSet)} .disabled=${this.disabled}><legend class=${s(l.visuallyHidden)}>${this.messages.rating}</legend>${this.starsMap.map(({average:t,checked:a,fraction:i,hovered:u,id:r,partial:c,selected:p,value:d,tabIndex:g})=>n`<label class=${s({[l.star]:!0,selected:p,hovered:u,average:t,partial:c})} data-value=${d??o} for=${r??o} @click=${this.handleLabelClick} @focus=${this.handleLabelFocus} @keydown=${this.handleLabelKeyDown} @pointerdown=${this.handleLabelPointerDown} @pointerover=${this.handleLabelPointerOver} tabindex=${g??o}><input aria-errormessage=${v.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaLabel=${O(this)} .ariaRequired=${this.required} .checked=${a} class=${s(l.visuallyHidden)} .disabled=${this.disabled||this.readOnly} id=${r??o} name=${this.guid??o} @change=${this.handleInputChange} tabindex=-1 type=radio .value=${y(d??"")}>${P({full:p||t||u,scale:this.scale})}${c&&n`<div class=${s(l.fraction)} style=${x({width:`${i*100}%`})}>${P({full:!0,partial:!0,scale:this.scale})}</div>`||""}<span class=${s(l.visuallyHidden)}>${this.messages.stars.replace("{num}",`${d}`)}</span></label>`)}${(this.count||this.average)&&this.showChip?n`<calcite-chip .label=${e} .scale=${this.scale} .value=${e}>${!!this.average&&n`<span class=${s(l.numberAverage)}>${this.average.toString()}</span>`||""}${!!this.count&&n`<span class=${s(l.numberCount)}>(${e})</span>`||""}</calcite-chip>`:null}</fieldset>${q({component:this})}${this.validationMessage&&this.status==="invalid"?T({icon:this.validationIcon,id:v.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}</span>`})}};w("calcite-rating",m);export{m as Rating};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v5.0.0-next.2 */
4
- import{E as e,h as t,l as i}from"./C7SWOQAB.js";var n={alignmentCenter:"internal-label-alignment--center",alignmentEnd:"internal-label-alignment--end",container:"internal-label--container",requiredIndicator:"internal-label-required--indicator",spacingBottom:"internal-label-spacing--bottom",spacingInlineEnd:"internal-label-spacing-inline--end",spacingInlineStart:"internal-label-spacing-inline--start",text:"internal-label--text"},b=({alignmentCenter:a,bottomSpacingDisabled:l,labelText:r,onClick:s,required:c,spacingInlineEnd:o,spacingInlineStart:d,tooltipText:g})=>t`<div class=${e({[n.alignmentCenter]:a,[n.alignmentEnd]:!a,[n.container]:!0,[n.spacingBottom]:!l,[n.spacingInlineEnd]:o,[n.spacingInlineStart]:d})} @click=${s}><div class=${e(n.text)}>${r}${c&&t`<span aria-hidden=true class=${e(n.requiredIndicator)} title=${g??i}>*</span>`||""}</div><slot name=label-content></slot></div>`;export{b as a};
3
+ v5.0.0-next.3 */
4
+ import{E as e,h as t,l as i}from"./ALOAVLGK.js";var n={alignmentCenter:"internal-label-alignment--center",alignmentEnd:"internal-label-alignment--end",container:"internal-label--container",requiredIndicator:"internal-label-required--indicator",spacingBottom:"internal-label-spacing--bottom",spacingInlineEnd:"internal-label-spacing-inline--end",spacingInlineStart:"internal-label-spacing-inline--start",text:"internal-label--text"},b=({alignmentCenter:a,bottomSpacingDisabled:l,labelText:r,onClick:s,required:c,spacingInlineEnd:o,spacingInlineStart:d,tooltipText:g})=>t`<div class=${e({[n.alignmentCenter]:a,[n.alignmentEnd]:!a,[n.container]:!0,[n.spacingBottom]:!l,[n.spacingInlineEnd]:o,[n.spacingInlineStart]:d})} @click=${s}><div class=${e(n.text)}>${r}${c&&t`<span aria-hidden=true class=${e(n.requiredIndicator)} title=${g??i}>*</span>`||""}</div><slot name=label-content></slot></div>`;export{b as a};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v5.0.0-next.2 */
3
+ v5.0.0-next.3 */
4
4
  var n={menuActions:"menu-actions",menuTooltip:"menu-tooltip"},o={menu:"ellipsis"},t={container:"container"};export{n as a,o as b,t as c};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v5.0.0-next.2 */
4
- import{a as F,e as G,g as N}from"./5DRLQB2T.js";import{a,b as x,d as m,e as I}from"./GI7F3WH2.js";import{a as U}from"./I2XGTS34.js";import{a as T,b as P}from"./MNOO2GEE.js";import{a as h}from"./AN7BJW6E.js";import{a as O}from"./EU53PNIW.js";import{a as M}from"./UMUEMXJF.js";import"./GBKXT23N.js";import{a as S}from"./KJXOD5Z2.js";import{a as z}from"./UBGSVRI6.js";import{e as R,m as D,t as C}from"./S4PILGWU.js";import"./OFPYAEOU.js";import{B as b,C as v,D as B,E as i,P as A,g as H,h as l,l as k,o as s}from"./C7SWOQAB.js";var Q=H`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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}:host([filter-hidden]),:host([closed]){display:none}.wrapper--bordered{border-block-end:1px solid var(--calcite-list-border-color, var(--calcite-color-border-3))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.container{box-sizing:border-box;display:flex;flex:1 1 0%;overflow:hidden;background-color:var(--calcite-list-background-color, var(--calcite-color-foreground-1))}.container *{box-sizing:border-box}.container--hover:hover{cursor:pointer;background-color:var(--calcite-list-background-color-hover, var(--calcite-color-foreground-2))}.container:active{background-color:var(--calcite-list-background-color-press, var(--calcite-color-foreground-3))}.container--border{position:relative}.container--border:before{position:absolute;inline-size:var(--calcite-border-width-lg);inset-block:0;inset-inline-start:0;background-color:transparent;content:""}.container--border-selected:before{background-color:var(--calcite-list-selection-border-color, var(--calcite-color-brand))}.container--border-selected:focus{box-shadow:inset var(--calcite-border-width-lg) 0 0 0 var(--calcite-list-selection-border-color, var(--calcite-color-brand))}.nested-container{display:none;flex-direction:column;border-width:0px;border-style:solid;border-color:1px solid var(--calcite-list-border-color, var(--calcite-color-border-3));margin-inline-start:var(--calcite-list-spacing-indent, 1.5rem)}.nested-container--expanded{display:flex}.selection-container{display:flex;padding-block:0px;color:var(--calcite-list-icon-color, var(--calcite-color-border-input))}:host(:not([disabled]):not([selected])) .container:hover .selection-container--single{color:var(--calcite-list-icon-color, var(--calcite-color-border-input))}:host([selected]:hover) .selection-container,:host([selected]:hover) .selection-container--single,:host([selected]) .selection-container{color:var(--calcite-list-icon-color, var(--calcite-color-brand))}.content-container-wrapper{display:flex;flex:1 1 auto}.content-container-wrapper--bordered{border-block-end:1px solid var(--calcite-list-border-color, var(--calcite-color-border-3))}.content-container{display:flex;flex:1 1 auto;-webkit-user-select:none;user-select:none;align-items:stretch;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-list-content-text-color, var(--calcite-color-text-2))}.content-container--unavailable{opacity:var(--calcite-opacity-disabled)}.row,.grid-cell{outline-color:transparent}.row{position:relative}.row:focus,.grid-cell:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.content,.custom-content{display:flex;flex:1 1 auto;flex-direction:column;justify-content:center;line-height:var(--calcite-font-line-height-relative-snug)}.label{color:var(--calcite-list-label-text-color, var(--calcite-color-text-1))}.description{color:var(--calcite-list-description-text-color, var(--calcite-color-text-3))}.icon{align-self:center;color:var(--calcite-list-icon-color, var(--calcite-color-text-3))}.icon:hover,.icon:active{color:var(--calcite-color-text-1)}:host([display-mode=flat][drag-handle]:is([selection-mode=none],[selection-appearance=border])) .drag-container{padding-inline-end:var(--calcite-spacing-xxs)}:host([scale=s]) .actions-start{padding-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .content-container{gap:var(--calcite-spacing-sm);min-block-size:32px;padding-block:var(--calcite-spacing-xxs);padding-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .content,:host([scale=s]) .custom-content,:host([scale=s]) .label{font-size:var(--calcite-font-size--2)}:host([scale=s]) .description{font-size:var(--calcite-font-size--3)}:host([scale=s][display-mode=flat]:not([drag-handle])) .container{padding-inline-start:var(--calcite-spacing-sm)}:host([scale=s][display-mode=flat]:not([drag-handle])) .selection-container{padding-inline-end:var(--calcite-spacing-sm)}:host([scale=s][display-mode=flat][drag-handle]) .selection-container{padding-inline:var(--calcite-spacing-xxs) var(--calcite-spacing-sm)}:host([scale=s][display-mode=nested]) .selection-container{padding-inline-end:var(--calcite-spacing-xxs)}:host([scale=s][display-mode=nested][selection-appearance=icon]:not([selection-mode=none]):not([drag-handle])) .container{padding-inline-start:var(--calcite-spacing-sm)}:host([scale=s][display-mode=nested][selection-appearance=icon]:not([selection-mode=none]):not([drag-handle])) .selection-container{padding-inline-end:var(--calcite-spacing-xxs)}:host([scale=s][display-mode=nested][drag-handle]) .selection-container{padding-inline:var(--calcite-spacing-xxs)}:host([scale=m]) .actions-start{padding-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .content-container{gap:var(--calcite-spacing-sm);min-block-size:40px;padding-block:var(--calcite-spacing-sm);padding-inline-end:var(--calcite-spacing-md)}:host([scale=m]) .content,:host([scale=m]) .custom-content{font-size:var(--calcite-font-size--2)}:host([scale=m]) .label{font-size:var(--calcite-font-size--1)}:host([scale=m]) .description{font-size:var(--calcite-font-size--2)}:host([scale=m][display-mode=flat]) .container{padding-inline-start:var(--calcite-spacing-md)}:host([scale=m][display-mode=flat]) .selection-container{padding-inline-end:var(--calcite-spacing-sm)}:host([scale=m][display-mode=flat][drag-handle]) .container{padding-inline-start:0}:host([scale=m][display-mode=flat][drag-handle]) .selection-container{padding-inline:var(--calcite-spacing-xxs) var(--calcite-spacing-sm)}:host([scale=m][display-mode=nested]) .container{padding-inline-start:var(--calcite-spacing-xxs)}:host([scale=m][display-mode=nested]) .selection-container{padding-inline-end:var(--calcite-spacing-xxs)}:host([scale=m][display-mode=nested][selection-appearance=icon]:not([selection-mode=none]):not([drag-handle])) .container{padding-inline-start:var(--calcite-spacing-md)}:host([scale=m][display-mode=nested][drag-handle]) .container{padding-inline-start:0}:host([scale=m][display-mode=nested][drag-handle]) .selection-container{padding-inline:var(--calcite-spacing-xxs)}:host([scale=l]) .actions-start{padding-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .content-container{gap:var(--calcite-spacing-md);min-block-size:56px;padding-block:.625rem;padding-inline-end:var(--calcite-spacing-lg)}:host([scale=l]) .content,:host([scale=l]) .custom-content,:host([scale=l]) .label{font-size:var(--calcite-font-size-0)}:host([scale=l]) .description{font-size:var(--calcite-font-size--1)}:host([scale=l]) .nested-container{margin-inline-start:1.75rem}:host([scale=l][display-mode=flat]) .container{padding-inline-start:var(--calcite-spacing-lg)}:host([scale=l][display-mode=flat]) .selection-container{padding-inline-end:var(--calcite-spacing-md)}:host([scale=l][display-mode=flat][drag-handle]) .container{padding-inline-start:0}:host([scale=l][display-mode=flat][drag-handle]) .selection-container{padding-inline-end:var(--calcite-spacing-md)}:host([scale=l][display-mode=nested]) .container{padding-inline-start:var(--calcite-spacing-xxs)}:host([scale=l][display-mode=nested][drag-handle]) .container{padding-inline-start:0}:host([scale=l][display-mode=nested][selection-appearance=icon]:not([selection-mode=none]):not([drag-handle])) .container{padding-inline-start:var(--calcite-spacing-lg)}.label,.description,.content-bottom{font-weight:var(--calcite-font-weight-normal);word-wrap:break-word;word-break:break-word}:host([selected]) .label{font-weight:var(--calcite-font-weight-medium)}:host([selected]) .icon{color:var(--calcite-list-icon-color, var(--calcite-color-text-1))}:host([selected]) .description{color:var(--calcite-list-description-text-color, var(--calcite-color-text-2))}.content-start{justify-content:flex-start}.content-end{justify-content:flex-end}.content-start,.content-end{flex:1 1 auto}.content-start ::slotted(calcite-icon),.content-end ::slotted(calcite-icon){align-self:center}.content-bottom{display:flex;flex-direction:column}.content-container--has-center-content .content-start,.content-container--has-center-content .content-end{flex:0 1 auto}.expanded-container{color:var(--calcite-list-icon-color, var(--calcite-color-text-3));padding-inline:var(--calcite-spacing-xxs)}:host(:not([disabled])) .expanded-container:hover{color:var(--calcite-list-icon-color, var(--calcite-color-text-1))}.actions-start,.actions-end,.content-start,.content-end,.selection-container,.drag-container,.expanded-container{display:flex;align-items:center}.actions-start calcite-action,.actions-start calcite-sort-handle,.actions-end calcite-action,.actions-end calcite-sort-handle,.content-start calcite-action,.content-start calcite-sort-handle,.content-end calcite-action,.content-end calcite-sort-handle,.selection-container calcite-action,.selection-container calcite-sort-handle,.drag-container calcite-action,.drag-container calcite-sort-handle,.expanded-container calcite-action,.expanded-container calcite-sort-handle{align-self:stretch}.drag-container,.selection-container,.expanded-container{padding-block-end:var(--calcite-spacing-px)}.expanded-container,.selection-container{cursor:pointer}.actions-start,.actions-end{position:relative;padding:0}.actions-start ::slotted(calcite-action),.actions-start ::slotted(calcite-action-menu),.actions-start ::slotted(calcite-sort-handle),.actions-start ::slotted(calcite-dropdown),.actions-end ::slotted(calcite-action),.actions-end ::slotted(calcite-action-menu),.actions-end ::slotted(calcite-sort-handle),.actions-end ::slotted(calcite-dropdown){align-self:stretch;color:inherit}.row:focus .actions-start,.row:focus .actions-end{inset-block:.125rem}.row:focus .actions-start .close,.row:focus .actions-start ::slotted(calcite-action),.row:focus .actions-start ::slotted(calcite-action-menu),.row:focus .actions-start ::slotted(calcite-sort-handle),.row:focus .actions-start ::slotted(calcite-dropdown),.row:focus .actions-end .close,.row:focus .actions-end ::slotted(calcite-action),.row:focus .actions-end ::slotted(calcite-action-menu),.row:focus .actions-end ::slotted(calcite-sort-handle),.row:focus .actions-end ::slotted(calcite-dropdown){block-size:calc(100% - .25rem)}.row:focus:after,.row:focus:before{position:absolute;content:"";inline-size:.125rem;z-index:var(--calcite-z-index-header);background-color:var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));inset-block:0}.row:focus:before{inset-inline-start:0}.row:focus:after{inset-inline-end:0}.container--border:focus:before{display:none}::slotted(calcite-list:empty){border-block-start-width:0px}:host([hidden]){display:none}[hidden]{display:none}`,$=new Map,w=class extends B{constructor(){super(),this.actionsEndRef=b(),this.actionsStartRef=b(),this.containerRef=b(),this.contentRef=b(),this.defaultSlotRef=b(),this.handleGridRef=b(),this.messages=O(),this.focusSetter=M()(this),this.hasActionsEnd=!1,this.hasActionsStart=!1,this.hasContentBottom=!1,this.hasContentEnd=!1,this.hasContentStart=!1,this.hasCustomContent=!1,this.level=null,this.expandable=!1,this.active=!1,this.bordered=!1,this.sortDisabled=!1,this.closable=!1,this.closed=!1,this.disabled=!1,this.dragDisabled=!1,this.dragHandle=!1,this.expanded=!1,this.filterHidden=!1,this.interactionMode=null,this.displayMode="flat",this.addToItems=[],this.moveToItems=[],this.scale="m",this.selected=!1,this.selectionAppearance=null,this.selectionMode=null,this.sortHandleOpen=!1,this.unavailable=!1,this.calciteInternalFocusPreviousItem=s({cancelable:!1}),this.calciteInternalListItemActive=s({cancelable:!1}),this.calciteInternalListItemChange=s({cancelable:!1}),this.calciteInternalListItemSelect=s({cancelable:!1}),this.calciteInternalListItemSelectMultiple=s({cancelable:!1}),this.calciteInternalListItemToggle=s({cancelable:!1}),this.calciteListItemClose=s({cancelable:!1}),this.calciteListItemCollapse=s({cancelable:!1}),this.calciteListItemExpand=s({cancelable:!1}),this.calciteListItemSelect=s({cancelable:!1}),this.calciteListItemSortHandleBeforeClose=s({cancelable:!1}),this.calciteListItemSortHandleBeforeOpen=s({cancelable:!1}),this.calciteListItemSortHandleClose=s({cancelable:!1}),this.calciteListItemSortHandleOpen=s({cancelable:!1}),this.calciteListItemToggle=s({cancelable:!1}),this.listen("calciteInternalListItemGroupDefaultSlotChange",this.handleCalciteInternalListDefaultSlotChanges),this.listen("calciteInternalListDefaultSlotChange",this.handleCalciteInternalListDefaultSlotChanges)}static{this.properties={hasActionsEnd:[16,{},{state:!0}],hasActionsStart:[16,{},{state:!0}],hasContentBottom:[16,{},{state:!0}],hasContentEnd:[16,{},{state:!0}],hasContentStart:[16,{},{state:!0}],hasCustomContent:[16,{},{state:!0}],level:[16,{},{state:!0}],expandable:[16,{},{state:!0}],parentListEl:[16,{},{state:!0}],active:[5,{},{type:Boolean}],bordered:[5,{},{type:Boolean}],sortDisabled:[5,{},{type:Boolean}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],dragDisabled:[7,{},{reflect:!0,type:Boolean}],dragHandle:[7,{},{reflect:!0,type:Boolean}],expanded:[7,{},{reflect:!0,type:Boolean}],filterHidden:[7,{},{reflect:!0,type:Boolean}],interactionMode:1,label:1,messageOverrides:[0,{},{attribute:!1}],metadata:[0,{},{attribute:!1}],displayMode:[3,{},{reflect:!0}],addToItems:[0,{},{attribute:!1}],moveToItems:[0,{},{attribute:!1}],open:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],selectionAppearance:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],setPosition:[9,{},{type:Number}],setSize:[9,{},{type:Number}],sortHandleOpen:[7,{},{reflect:!0,type:Boolean}],unavailable:[7,{},{reflect:!0,type:Boolean}],value:1,iconStart:[3,{type:String},{reflect:!0}],iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}]}}static{this.styles=[Q,U]}get open(){return this.expanded}set open(e){z.deprecated("property",{name:"open",removalVersion:4,suggested:"expanded"}),this.expanded=e}async setFocus(e){return this.focusSetter(()=>{let{containerRef:t,parentListEl:n}=this,o=$.get(n);if(typeof o=="number"){let c=this.getGridCells()[o];if(c){this.focusCell(c);return}}return{target:t.value,includeContainer:!0,strategy:"focusable"}},e)}connectedCallback(){super.connectedCallback();let{el:e}=this;this.parentListEl=e.closest(F),this.level=N(e)+1,this.setSelectionDefaults()}disconnectedCallback(){super.disconnectedCallback(),$.clear()}willUpdate(e){e.has("active")&&(this.hasUpdated||this.active!==!1)&&this.activeHandler(this.active),e.has("closed")&&(this.hasUpdated||this.closed!==!1)&&this.handleClosedChange(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(),e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.handleSelectedChange(),e.has("sortHandleOpen")&&(this.hasUpdated||this.sortHandleOpen!==!1)&&this.sortHandleOpenHandler(),e.has("displayMode")&&this.hasUpdated&&this.handleExpandableChange(this.defaultSlotRef.value),e.has("expanded")&&this.hasUpdated&&(this.expanded?(this.handleExpandedChange(),this.calciteListItemExpand.emit()):this.calciteListItemCollapse.emit())}updated(){T(this)}activeHandler(e){e||this.focusCell(null,!1)}handleClosedChange(){this.emitCalciteInternalListItemChange()}handleDisabledChange(){this.emitCalciteInternalListItemChange()}handleExpandedChange(){this.emitCalciteInternalListItemToggle()}handleSelectedChange(){this.calciteInternalListItemSelect.emit()}sortHandleOpenHandler(){this.sortHandleEl&&(this.sortHandleEl.open=this.sortHandleOpen)}handleCalciteInternalListDefaultSlotChanges(e){e.stopPropagation(),this.handleExpandableChange(this.defaultSlotRef.value)}setSortHandleEl(e){this.sortHandleEl=e,this.sortHandleOpenHandler()}handleSortHandleBeforeOpen(e){e.stopPropagation(),this.calciteListItemSortHandleBeforeOpen.emit()}handleSortHandleBeforeClose(e){e.stopPropagation(),this.calciteListItemSortHandleBeforeClose.emit()}handleSortHandleClose(e){e.stopPropagation(),this.sortHandleOpen=!1,this.calciteListItemSortHandleClose.emit()}handleSortHandleOpen(e){e.stopPropagation(),this.sortHandleOpen=!0,this.calciteListItemSortHandleOpen.emit()}emitInternalListItemActive(){this.calciteInternalListItemActive.emit()}emitCalciteInternalListItemToggle(){this.calciteInternalListItemToggle.emit()}emitCalciteInternalListItemChange(){this.calciteInternalListItemChange.emit()}handleCloseClick(){this.closed=!0,this.calciteListItemClose.emit()}handleContentSlotChange(e){this.hasCustomContent=C(e)}handleActionsStartSlotChange(e){this.hasActionsStart=C(e)}handleActionsEndSlotChange(e){this.hasActionsEnd=C(e)}handleContentStartSlotChange(e){this.hasContentStart=C(e)}handleContentEndSlotChange(e){this.hasContentEnd=C(e)}handleContentBottomSlotChange(e){this.hasContentBottom=C(e)}setSelectionDefaults(){let{parentListEl:e,selectionMode:t,selectionAppearance:n}=this;e&&(t||(this.selectionMode=e.selectionMode),n||(this.selectionAppearance=e.selectionAppearance))}handleExpandableChange(e){if(!e)return;let t=G(e);t.lists.forEach(n=>{n.displayMode=this.displayMode}),this.expandable=this.displayMode==="nested"&&(t.lists.length>0||t.items.length>0)}handleDefaultSlotChange(e){this.handleExpandableChange(e.target)}handleToggleClick(){this.toggle()}toggle(e=!this.expanded){this.expanded=e,this.calciteListItemToggle.emit()}handleItemClick(e){e.defaultPrevented||this.toggleSelected(e.shiftKey)}async toggleSelected(e){let{selectionMode:t,selected:n}=this;this.disabled||(t==="multiple"||t==="single"?this.selected=!n:t==="single-persist"&&(this.selected=!0),this.calciteInternalListItemSelectMultiple.emit({selectMultiple:e&&t==="multiple"}),await this.updateComplete,this.calciteListItemSelect.emit())}getGridCells(){return[this.handleGridRef.value,this.actionsStartRef.value,this.contentRef.value,this.actionsEndRef.value].filter(e=>e&&!e.hidden)}handleItemKeyDown(e){if(e.defaultPrevented)return;let{key:t}=e,n=e.composedPath(),{containerRef:o,actionsStartRef:{value:c},actionsEndRef:{value:r},expanded:p,expandable:g}=this,d=this.getGridCells(),f=d.findIndex(u=>n.includes(u));if(t==="Enter"&&!n.includes(c)&&!n.includes(r))e.preventDefault(),this.toggleSelected(e.shiftKey);else if(t==="ArrowRight"){e.preventDefault();let u=f+1;f===-1?!p&&g?(this.toggle(!0),this.focusCell(null)):d[0]&&this.focusCell(d[0]):d[f]&&d[u]&&this.focusCell(d[u])}else if(t==="ArrowLeft"){e.preventDefault();let u=f-1;f===-1?(this.focusCell(null),p&&g?this.toggle(!1):this.calciteInternalFocusPreviousItem.emit()):f===0?(this.focusCell(null),o.value.focus()):d[f]&&d[u]&&this.focusCell(d[u])}}focusCellNull(){this.focusCell(null)}setFocusCell(e,t,n){let{parentListEl:o}=this;n&&$.set(o,null);let c=this.getGridCells();c.forEach(r=>{r.removeAttribute("tabindex"),r.removeAttribute(I)}),e&&(e===t?e.tabIndex=0:e.removeAttribute("tabindex"),e.setAttribute(I,""),n&&$.set(o,c.indexOf(e)))}focusCell(e,t=!0){let n=D(e);this.setFocusCell(e,n,t),n?.focus()}renderSelected(){let{selected:e,selectionMode:t,selectionAppearance:n}=this;return t==="none"||n==="border"?null:h("selection-container",l`<div class=${i({[a.selectionContainer]:!0,[a.selectionContainerSingle]:t==="single"||t==="single-persist"})} @click=${this.handleItemClick}><calcite-icon .icon=${e?t==="multiple"?m.selectedMultiple:m.selectedSingle:t==="multiple"?m.unselectedMultiple:m.unselectedSingle} .scale=${S(this.scale)}></calcite-icon></div>`)}renderDragHandle(){let{label:e,dragHandle:t,dragDisabled:n,setPosition:o,setSize:c,moveToItems:r,sortDisabled:p,addToItems:g}=this;return t?h("drag-handle-container",l`<div .ariaLabel=${e} class=${i({[a.dragContainer]:!0,[a.gridCell]:!0})} role=gridcell ${v(this.handleGridRef)}><calcite-sort-handle .addToItems=${g} .disabled=${n} .label=${e} .moveToItems=${r} @calciteSortHandleBeforeClose=${this.handleSortHandleBeforeClose} @calciteSortHandleBeforeOpen=${this.handleSortHandleBeforeOpen} @calciteSortHandleClose=${this.handleSortHandleClose} @calciteSortHandleOpen=${this.handleSortHandleOpen} overlay-positioning=fixed .scale=${this.scale} .setPosition=${o} .setSize=${c} .sortDisabled=${p} ${v(this.setSortHandleEl)}></calcite-sort-handle></div>`):null}renderExpanded(){let{el:e,expanded:t,expandable:n,messages:o,displayMode:c,scale:r}=this;if(c!=="nested")return null;let p=R(e),g=n?t?m.open:p==="rtl"?m.collapsedRTL:m.collapsedLTR:m.blank,d=S(r),f=n?t?o.collapse:o.expand:void 0,u=n?this.handleToggleClick:void 0;return h("expanded-container",l`<div class=${i(a.expandedContainer)} @click=${u} title=${f??k}>${h(g,l`<calcite-icon .icon=${g} .scale=${d}></calcite-icon>`)}</div>`)}renderActionsStart(){let{label:e,hasActionsStart:t}=this;return h("actions-start-container",l`<div .ariaLabel=${e} class=${i({[a.actionsStart]:!0,[a.gridCell]:!0})} .hidden=${!t} role=gridcell ${v(this.actionsStartRef)}><slot name=${x.actionsStart} @slotchange=${this.handleActionsStartSlotChange}></slot></div>`)}renderActionsEnd(){let{label:e,hasActionsEnd:t,closable:n,messages:o}=this;return h("actions-end-container",l`<div .ariaLabel=${e} class=${i({[a.actionsEnd]:!0,[a.gridCell]:!0})} .hidden=${!(t||n)} role=gridcell ${v(this.actionsEndRef)}><slot name=${x.actionsEnd} @slotchange=${this.handleActionsEndSlotChange}></slot>${n?h("close-action",l`<calcite-action appearance=transparent class=${i(a.close)} .icon=${m.close} .label=${o.close} @click=${this.handleCloseClick} .scale=${this.scale} .text=${o.close}></calcite-action>`):null}</div>`)}renderContentStart(){let{hasContentStart:e}=this;return l`<div class=${i(a.contentStart)} .hidden=${!e}><slot name=${x.contentStart} @slotchange=${this.handleContentStartSlotChange}></slot></div>`}renderCustomContent(){let{hasCustomContent:e}=this;return l`<div class=${i(a.customContent)} .hidden=${!e}><slot name=${x.content} @slotchange=${this.handleContentSlotChange}></slot></div>`}renderIconStart(){let{iconStart:e,iconFlipRtl:t,scale:n}=this;return e?h("icon-start",l`<calcite-icon class=${i(a.icon)} .flipRtl=${t==="both"||t==="start"} .icon=${e} .scale=${S(n)}></calcite-icon>`):null}renderIconEnd(){let{iconEnd:e,iconFlipRtl:t,scale:n}=this;return e?h("icon-end",l`<calcite-icon class=${i(a.icon)} .flipRtl=${t==="both"||t==="end"} .icon=${e} .scale=${S(n)}></calcite-icon>`):null}renderContentEnd(){let{hasContentEnd:e}=this;return l`<div class=${i(a.contentEnd)} .hidden=${!e}><slot name=${x.contentEnd} @slotchange=${this.handleContentEndSlotChange}></slot></div>`}renderContentBottom(){let{hasContentBottom:e}=this;return l`<div class=${i(a.contentBottom)} .hidden=${!e}><slot name=${x.contentBottom} @slotchange=${this.handleContentBottomSlotChange}></slot></div>`}renderDefaultContainer(){return l`<div class=${i({[a.nestedContainer]:!0,[a.nestedContainerExpanded]:this.expandable&&this.expanded})}><slot @slotchange=${this.handleDefaultSlotChange} ${v(this.defaultSlotRef)}></slot></div>`}renderContentProperties(){let{label:e,description:t,hasCustomContent:n}=this;return!n&&(e||t)?h("content",l`<div class=${i(a.content)}>${e?h("label",l`<div class=${i(a.label)}>${e}</div>`):null}${t?h("description",l`<div class=${i(a.description)}>${t}</div>`):null}</div>`):null}renderContentContainer(){let{description:e,label:t,selectionMode:n,hasCustomContent:o,unavailable:c}=this,r=o||!!t||!!e,p=[this.renderContentStart(),this.renderCustomContent(),this.renderIconStart(),this.renderContentProperties(),this.renderIconEnd(),this.renderContentEnd()];return h("content-container",l`<div .ariaLabel=${t} class=${i({[a.gridCell]:!0,[a.contentContainer]:!0,[a.contentContainerUnavailable]:c,[a.contentContainerSelectable]:n!=="none",[a.contentContainerHasCenterContent]:r})} @click=${this.handleItemClick} role=gridcell ${v(this.contentRef)}>${p}</div>`)}render(){let{expandable:e,expanded:t,level:n,active:o,label:c,selected:r,selectionAppearance:p,selectionMode:g,interactionMode:d,closed:f,filterHidden:u,bordered:L,disabled:K,hasContentBottom:E}=this,j=L&&E,W=L&&!E,y=g!=="none"&&p==="border",V=y&&r,q=y&&!r,J=d==="interactive"||d==="static"&&g!=="none"&&p==="border";return P({disabled:K,children:l`<div class=${i({[a.wrapper]:!0,[a.wrapperBordered]:j})}><div .ariaExpanded=${e?t:null} .ariaLabel=${c} .ariaLevel=${n} .ariaSelected=${r} class=${i({[a.row]:!0,[a.container]:!0,[a.containerHover]:J,[a.containerBorder]:y,[a.containerBorderSelected]:V,[a.containerBorderUnselected]:q})} .hidden=${f||u} @focus=${this.focusCellNull} @focusin=${this.emitInternalListItemActive} @keydown=${this.handleItemKeyDown} role=row .tabIndex=${o?0:-1} ${v(this.containerRef)}>${this.renderDragHandle()}${this.renderSelected()}${this.renderExpanded()}<div class=${i({[a.contentContainerWrapper]:!0,[a.contentContainerWrapperBordered]:W})}>${this.renderActionsStart()}${this.renderContentContainer()}${this.renderActionsEnd()}</div></div>${this.renderContentBottom()}</div>${this.renderDefaultContainer()}`})}};A("calcite-list-item",w);export{w as ListItem};
3
+ v5.0.0-next.3 */
4
+ import{a as F,e as G,g as N}from"./KNTW4634.js";import{a,b as x,d as m,e as I}from"./XO5ETFTI.js";import{a as U}from"./JDVZQ6HH.js";import{a as T,b as P}from"./EU6IVBMM.js";import{a as h}from"./7WAFUV2T.js";import{a as O}from"./WIJWBGXQ.js";import{a as M}from"./XWXCOJUO.js";import"./UXWFYSWM.js";import{a as S}from"./JW4SOJWB.js";import{a as z}from"./P2RYGBBZ.js";import{e as R,m as D,t as C}from"./SLICSH62.js";import"./DNM3U3Z7.js";import{B as b,C as v,D as B,E as i,P as A,g as H,h as l,l as k,o as s}from"./ALOAVLGK.js";var Q=H`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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}:host([filter-hidden]),:host([closed]){display:none}.wrapper--bordered{border-block-end:1px solid var(--calcite-list-border-color, var(--calcite-color-border-3))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.container{box-sizing:border-box;display:flex;flex:1 1 0%;overflow:hidden;background-color:var(--calcite-list-background-color, var(--calcite-color-foreground-1))}.container *{box-sizing:border-box}.container--hover:hover{cursor:pointer;background-color:var(--calcite-list-background-color-hover, var(--calcite-color-foreground-2))}.container:active{background-color:var(--calcite-list-background-color-press, var(--calcite-color-foreground-3))}.container--border{position:relative}.container--border:before{position:absolute;inline-size:var(--calcite-border-width-lg);inset-block:0;inset-inline-start:0;background-color:transparent;content:""}.container--border-selected:before{background-color:var(--calcite-list-selection-border-color, var(--calcite-color-brand))}.container--border-selected:focus{box-shadow:inset var(--calcite-border-width-lg) 0 0 0 var(--calcite-list-selection-border-color, var(--calcite-color-brand))}.nested-container{display:none;flex-direction:column;border-width:0px;border-style:solid;border-color:1px solid var(--calcite-list-border-color, var(--calcite-color-border-3));margin-inline-start:var(--calcite-list-spacing-indent, 1.5rem)}.nested-container--expanded{display:flex}.selection-container{display:flex;padding-block:0px;color:var(--calcite-list-icon-color, var(--calcite-color-border-input))}:host(:not([disabled]):not([selected])) .container:hover .selection-container--single{color:var(--calcite-list-icon-color, var(--calcite-color-border-input))}:host([selected]:hover) .selection-container,:host([selected]:hover) .selection-container--single,:host([selected]) .selection-container{color:var(--calcite-list-icon-color, var(--calcite-color-brand))}.content-container-wrapper{display:flex;flex:1 1 auto}.content-container-wrapper--bordered{border-block-end:1px solid var(--calcite-list-border-color, var(--calcite-color-border-3))}.content-container{display:flex;flex:1 1 auto;-webkit-user-select:none;user-select:none;align-items:stretch;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-list-content-text-color, var(--calcite-color-text-2))}.content-container--unavailable{opacity:var(--calcite-opacity-disabled)}.row,.grid-cell{outline-color:transparent}.row{position:relative}.row:focus,.grid-cell:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.content,.custom-content{display:flex;flex:1 1 auto;flex-direction:column;justify-content:center;line-height:var(--calcite-font-line-height-relative-snug)}.label{color:var(--calcite-list-label-text-color, var(--calcite-color-text-1))}.description{color:var(--calcite-list-description-text-color, var(--calcite-color-text-3))}.icon{align-self:center;color:var(--calcite-list-icon-color, var(--calcite-color-text-3))}.icon:hover,.icon:active{color:var(--calcite-color-text-1)}:host([display-mode=flat][drag-handle]:is([selection-mode=none],[selection-appearance=border])) .drag-container{padding-inline-end:var(--calcite-spacing-xxs)}:host([scale=s]) .actions-start{padding-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .content-container{gap:var(--calcite-spacing-sm);min-block-size:32px;padding-block:var(--calcite-spacing-xxs);padding-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .content,:host([scale=s]) .custom-content,:host([scale=s]) .label{font-size:var(--calcite-font-size--2)}:host([scale=s]) .description{font-size:var(--calcite-font-size--3)}:host([scale=s][display-mode=flat]:not([drag-handle])) .container{padding-inline-start:var(--calcite-spacing-sm)}:host([scale=s][display-mode=flat]:not([drag-handle])) .selection-container{padding-inline-end:var(--calcite-spacing-sm)}:host([scale=s][display-mode=flat][drag-handle]) .selection-container{padding-inline:var(--calcite-spacing-xxs) var(--calcite-spacing-sm)}:host([scale=s][display-mode=nested]) .selection-container{padding-inline-end:var(--calcite-spacing-xxs)}:host([scale=s][display-mode=nested][selection-appearance=icon]:not([selection-mode=none]):not([drag-handle])) .container{padding-inline-start:var(--calcite-spacing-sm)}:host([scale=s][display-mode=nested][selection-appearance=icon]:not([selection-mode=none]):not([drag-handle])) .selection-container{padding-inline-end:var(--calcite-spacing-xxs)}:host([scale=s][display-mode=nested][drag-handle]) .selection-container{padding-inline:var(--calcite-spacing-xxs)}:host([scale=m]) .actions-start{padding-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .content-container{gap:var(--calcite-spacing-sm);min-block-size:40px;padding-block:var(--calcite-spacing-sm);padding-inline-end:var(--calcite-spacing-md)}:host([scale=m]) .content,:host([scale=m]) .custom-content{font-size:var(--calcite-font-size--2)}:host([scale=m]) .label{font-size:var(--calcite-font-size--1)}:host([scale=m]) .description{font-size:var(--calcite-font-size--2)}:host([scale=m][display-mode=flat]) .container{padding-inline-start:var(--calcite-spacing-md)}:host([scale=m][display-mode=flat]) .selection-container{padding-inline-end:var(--calcite-spacing-sm)}:host([scale=m][display-mode=flat][drag-handle]) .container{padding-inline-start:0}:host([scale=m][display-mode=flat][drag-handle]) .selection-container{padding-inline:var(--calcite-spacing-xxs) var(--calcite-spacing-sm)}:host([scale=m][display-mode=nested]) .container{padding-inline-start:var(--calcite-spacing-xxs)}:host([scale=m][display-mode=nested]) .selection-container{padding-inline-end:var(--calcite-spacing-xxs)}:host([scale=m][display-mode=nested][selection-appearance=icon]:not([selection-mode=none]):not([drag-handle])) .container{padding-inline-start:var(--calcite-spacing-md)}:host([scale=m][display-mode=nested][drag-handle]) .container{padding-inline-start:0}:host([scale=m][display-mode=nested][drag-handle]) .selection-container{padding-inline:var(--calcite-spacing-xxs)}:host([scale=l]) .actions-start{padding-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .content-container{gap:var(--calcite-spacing-md);min-block-size:56px;padding-block:.625rem;padding-inline-end:var(--calcite-spacing-lg)}:host([scale=l]) .content,:host([scale=l]) .custom-content,:host([scale=l]) .label{font-size:var(--calcite-font-size-0)}:host([scale=l]) .description{font-size:var(--calcite-font-size--1)}:host([scale=l]) .nested-container{margin-inline-start:1.75rem}:host([scale=l][display-mode=flat]) .container{padding-inline-start:var(--calcite-spacing-lg)}:host([scale=l][display-mode=flat]) .selection-container{padding-inline-end:var(--calcite-spacing-md)}:host([scale=l][display-mode=flat][drag-handle]) .container{padding-inline-start:0}:host([scale=l][display-mode=flat][drag-handle]) .selection-container{padding-inline-end:var(--calcite-spacing-md)}:host([scale=l][display-mode=nested]) .container{padding-inline-start:var(--calcite-spacing-xxs)}:host([scale=l][display-mode=nested][drag-handle]) .container{padding-inline-start:0}:host([scale=l][display-mode=nested][selection-appearance=icon]:not([selection-mode=none]):not([drag-handle])) .container{padding-inline-start:var(--calcite-spacing-lg)}.label,.description,.content-bottom{font-weight:var(--calcite-font-weight-normal);word-wrap:break-word;word-break:break-word}:host([selected]) .label{font-weight:var(--calcite-font-weight-medium)}:host([selected]) .icon{color:var(--calcite-list-icon-color, var(--calcite-color-text-1))}:host([selected]) .description{color:var(--calcite-list-description-text-color, var(--calcite-color-text-2))}.content-start{justify-content:flex-start}.content-end{justify-content:flex-end}.content-start,.content-end{flex:1 1 auto}.content-start ::slotted(calcite-icon),.content-end ::slotted(calcite-icon){align-self:center}.content-bottom{display:flex;flex-direction:column}.content-container--has-center-content .content-start,.content-container--has-center-content .content-end{flex:0 1 auto}.expanded-container{color:var(--calcite-list-icon-color, var(--calcite-color-text-3));padding-inline:var(--calcite-spacing-xxs)}:host(:not([disabled])) .expanded-container:hover{color:var(--calcite-list-icon-color, var(--calcite-color-text-1))}.actions-start,.actions-end,.content-start,.content-end,.selection-container,.drag-container,.expanded-container{display:flex;align-items:center}.actions-start calcite-action,.actions-start calcite-sort-handle,.actions-end calcite-action,.actions-end calcite-sort-handle,.content-start calcite-action,.content-start calcite-sort-handle,.content-end calcite-action,.content-end calcite-sort-handle,.selection-container calcite-action,.selection-container calcite-sort-handle,.drag-container calcite-action,.drag-container calcite-sort-handle,.expanded-container calcite-action,.expanded-container calcite-sort-handle{align-self:stretch}.drag-container,.selection-container,.expanded-container{padding-block-end:var(--calcite-spacing-px)}.expanded-container,.selection-container{cursor:pointer}.actions-start,.actions-end{position:relative;padding:0}.actions-start ::slotted(calcite-action),.actions-start ::slotted(calcite-action-menu),.actions-start ::slotted(calcite-sort-handle),.actions-start ::slotted(calcite-dropdown),.actions-end ::slotted(calcite-action),.actions-end ::slotted(calcite-action-menu),.actions-end ::slotted(calcite-sort-handle),.actions-end ::slotted(calcite-dropdown){align-self:stretch;color:inherit}.row:focus .actions-start,.row:focus .actions-end{inset-block:.125rem}.row:focus .actions-start .close,.row:focus .actions-start ::slotted(calcite-action),.row:focus .actions-start ::slotted(calcite-action-menu),.row:focus .actions-start ::slotted(calcite-sort-handle),.row:focus .actions-start ::slotted(calcite-dropdown),.row:focus .actions-end .close,.row:focus .actions-end ::slotted(calcite-action),.row:focus .actions-end ::slotted(calcite-action-menu),.row:focus .actions-end ::slotted(calcite-sort-handle),.row:focus .actions-end ::slotted(calcite-dropdown){block-size:calc(100% - .25rem)}.row:focus:after,.row:focus:before{position:absolute;content:"";inline-size:.125rem;z-index:var(--calcite-z-index-header);background-color:var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));inset-block:0}.row:focus:before{inset-inline-start:0}.row:focus:after{inset-inline-end:0}.container--border:focus:before{display:none}::slotted(calcite-list:empty){border-block-start-width:0px}:host([hidden]){display:none}[hidden]{display:none}`,$=new Map,w=class extends B{constructor(){super(),this.actionsEndRef=b(),this.actionsStartRef=b(),this.containerRef=b(),this.contentRef=b(),this.defaultSlotRef=b(),this.handleGridRef=b(),this.messages=O(),this.focusSetter=M()(this),this.hasActionsEnd=!1,this.hasActionsStart=!1,this.hasContentBottom=!1,this.hasContentEnd=!1,this.hasContentStart=!1,this.hasCustomContent=!1,this.level=null,this.expandable=!1,this.active=!1,this.bordered=!1,this.sortDisabled=!1,this.closable=!1,this.closed=!1,this.disabled=!1,this.dragDisabled=!1,this.dragHandle=!1,this.expanded=!1,this.filterHidden=!1,this.interactionMode=null,this.displayMode="flat",this.addToItems=[],this.moveToItems=[],this.scale="m",this.selected=!1,this.selectionAppearance=null,this.selectionMode=null,this.sortHandleOpen=!1,this.unavailable=!1,this.calciteInternalFocusPreviousItem=s({cancelable:!1}),this.calciteInternalListItemActive=s({cancelable:!1}),this.calciteInternalListItemChange=s({cancelable:!1}),this.calciteInternalListItemSelect=s({cancelable:!1}),this.calciteInternalListItemSelectMultiple=s({cancelable:!1}),this.calciteInternalListItemToggle=s({cancelable:!1}),this.calciteListItemClose=s({cancelable:!1}),this.calciteListItemCollapse=s({cancelable:!1}),this.calciteListItemExpand=s({cancelable:!1}),this.calciteListItemSelect=s({cancelable:!1}),this.calciteListItemSortHandleBeforeClose=s({cancelable:!1}),this.calciteListItemSortHandleBeforeOpen=s({cancelable:!1}),this.calciteListItemSortHandleClose=s({cancelable:!1}),this.calciteListItemSortHandleOpen=s({cancelable:!1}),this.calciteListItemToggle=s({cancelable:!1}),this.listen("calciteInternalListItemGroupDefaultSlotChange",this.handleCalciteInternalListDefaultSlotChanges),this.listen("calciteInternalListDefaultSlotChange",this.handleCalciteInternalListDefaultSlotChanges)}static{this.properties={hasActionsEnd:[16,{},{state:!0}],hasActionsStart:[16,{},{state:!0}],hasContentBottom:[16,{},{state:!0}],hasContentEnd:[16,{},{state:!0}],hasContentStart:[16,{},{state:!0}],hasCustomContent:[16,{},{state:!0}],level:[16,{},{state:!0}],expandable:[16,{},{state:!0}],parentListEl:[16,{},{state:!0}],active:[5,{},{type:Boolean}],bordered:[5,{},{type:Boolean}],sortDisabled:[5,{},{type:Boolean}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],dragDisabled:[7,{},{reflect:!0,type:Boolean}],dragHandle:[7,{},{reflect:!0,type:Boolean}],expanded:[7,{},{reflect:!0,type:Boolean}],filterHidden:[7,{},{reflect:!0,type:Boolean}],interactionMode:1,label:1,messageOverrides:[0,{},{attribute:!1}],metadata:[0,{},{attribute:!1}],displayMode:[3,{},{reflect:!0}],addToItems:[0,{},{attribute:!1}],moveToItems:[0,{},{attribute:!1}],open:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],selectionAppearance:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],setPosition:[9,{},{type:Number}],setSize:[9,{},{type:Number}],sortHandleOpen:[7,{},{reflect:!0,type:Boolean}],unavailable:[7,{},{reflect:!0,type:Boolean}],value:1,iconStart:[3,{type:String},{reflect:!0}],iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}]}}static{this.styles=[Q,U]}get open(){return this.expanded}set open(e){z.deprecated("property",{name:"open",removalVersion:4,suggested:"expanded"}),this.expanded=e}async setFocus(e){return this.focusSetter(()=>{let{containerRef:t,parentListEl:n}=this,o=$.get(n);if(typeof o=="number"){let c=this.getGridCells()[o];if(c){this.focusCell(c);return}}return{target:t.value,includeContainer:!0,strategy:"focusable"}},e)}connectedCallback(){super.connectedCallback();let{el:e}=this;this.parentListEl=e.closest(F),this.level=N(e)+1,this.setSelectionDefaults()}disconnectedCallback(){super.disconnectedCallback(),$.clear()}willUpdate(e){e.has("active")&&(this.hasUpdated||this.active!==!1)&&this.activeHandler(this.active),e.has("closed")&&(this.hasUpdated||this.closed!==!1)&&this.handleClosedChange(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(),e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.handleSelectedChange(),e.has("sortHandleOpen")&&(this.hasUpdated||this.sortHandleOpen!==!1)&&this.sortHandleOpenHandler(),e.has("displayMode")&&this.hasUpdated&&this.handleExpandableChange(this.defaultSlotRef.value),e.has("expanded")&&this.hasUpdated&&(this.expanded?(this.handleExpandedChange(),this.calciteListItemExpand.emit()):this.calciteListItemCollapse.emit())}updated(){T(this)}activeHandler(e){e||this.focusCell(null,!1)}handleClosedChange(){this.emitCalciteInternalListItemChange()}handleDisabledChange(){this.emitCalciteInternalListItemChange()}handleExpandedChange(){this.emitCalciteInternalListItemToggle()}handleSelectedChange(){this.calciteInternalListItemSelect.emit()}sortHandleOpenHandler(){this.sortHandleEl&&(this.sortHandleEl.open=this.sortHandleOpen)}handleCalciteInternalListDefaultSlotChanges(e){e.stopPropagation(),this.handleExpandableChange(this.defaultSlotRef.value)}setSortHandleEl(e){this.sortHandleEl=e,this.sortHandleOpenHandler()}handleSortHandleBeforeOpen(e){e.stopPropagation(),this.calciteListItemSortHandleBeforeOpen.emit()}handleSortHandleBeforeClose(e){e.stopPropagation(),this.calciteListItemSortHandleBeforeClose.emit()}handleSortHandleClose(e){e.stopPropagation(),this.sortHandleOpen=!1,this.calciteListItemSortHandleClose.emit()}handleSortHandleOpen(e){e.stopPropagation(),this.sortHandleOpen=!0,this.calciteListItemSortHandleOpen.emit()}emitInternalListItemActive(){this.calciteInternalListItemActive.emit()}emitCalciteInternalListItemToggle(){this.calciteInternalListItemToggle.emit()}emitCalciteInternalListItemChange(){this.calciteInternalListItemChange.emit()}handleCloseClick(){this.closed=!0,this.calciteListItemClose.emit()}handleContentSlotChange(e){this.hasCustomContent=C(e)}handleActionsStartSlotChange(e){this.hasActionsStart=C(e)}handleActionsEndSlotChange(e){this.hasActionsEnd=C(e)}handleContentStartSlotChange(e){this.hasContentStart=C(e)}handleContentEndSlotChange(e){this.hasContentEnd=C(e)}handleContentBottomSlotChange(e){this.hasContentBottom=C(e)}setSelectionDefaults(){let{parentListEl:e,selectionMode:t,selectionAppearance:n}=this;e&&(t||(this.selectionMode=e.selectionMode),n||(this.selectionAppearance=e.selectionAppearance))}handleExpandableChange(e){if(!e)return;let t=G(e);t.lists.forEach(n=>{n.displayMode=this.displayMode}),this.expandable=this.displayMode==="nested"&&(t.lists.length>0||t.items.length>0)}handleDefaultSlotChange(e){this.handleExpandableChange(e.target)}handleToggleClick(){this.toggle()}toggle(e=!this.expanded){this.expanded=e,this.calciteListItemToggle.emit()}handleItemClick(e){e.defaultPrevented||this.toggleSelected(e.shiftKey)}async toggleSelected(e){let{selectionMode:t,selected:n}=this;this.disabled||(t==="multiple"||t==="single"?this.selected=!n:t==="single-persist"&&(this.selected=!0),this.calciteInternalListItemSelectMultiple.emit({selectMultiple:e&&t==="multiple"}),await this.updateComplete,this.calciteListItemSelect.emit())}getGridCells(){return[this.handleGridRef.value,this.actionsStartRef.value,this.contentRef.value,this.actionsEndRef.value].filter(e=>e&&!e.hidden)}handleItemKeyDown(e){if(e.defaultPrevented)return;let{key:t}=e,n=e.composedPath(),{containerRef:o,actionsStartRef:{value:c},actionsEndRef:{value:r},expanded:p,expandable:g}=this,d=this.getGridCells(),f=d.findIndex(u=>n.includes(u));if(t==="Enter"&&!n.includes(c)&&!n.includes(r))e.preventDefault(),this.toggleSelected(e.shiftKey);else if(t==="ArrowRight"){e.preventDefault();let u=f+1;f===-1?!p&&g?(this.toggle(!0),this.focusCell(null)):d[0]&&this.focusCell(d[0]):d[f]&&d[u]&&this.focusCell(d[u])}else if(t==="ArrowLeft"){e.preventDefault();let u=f-1;f===-1?(this.focusCell(null),p&&g?this.toggle(!1):this.calciteInternalFocusPreviousItem.emit()):f===0?(this.focusCell(null),o.value.focus()):d[f]&&d[u]&&this.focusCell(d[u])}}focusCellNull(){this.focusCell(null)}setFocusCell(e,t,n){let{parentListEl:o}=this;n&&$.set(o,null);let c=this.getGridCells();c.forEach(r=>{r.removeAttribute("tabindex"),r.removeAttribute(I)}),e&&(e===t?e.tabIndex=0:e.removeAttribute("tabindex"),e.setAttribute(I,""),n&&$.set(o,c.indexOf(e)))}focusCell(e,t=!0){let n=D(e);this.setFocusCell(e,n,t),n?.focus()}renderSelected(){let{selected:e,selectionMode:t,selectionAppearance:n}=this;return t==="none"||n==="border"?null:h("selection-container",l`<div class=${i({[a.selectionContainer]:!0,[a.selectionContainerSingle]:t==="single"||t==="single-persist"})} @click=${this.handleItemClick}><calcite-icon .icon=${e?t==="multiple"?m.selectedMultiple:m.selectedSingle:t==="multiple"?m.unselectedMultiple:m.unselectedSingle} .scale=${S(this.scale)}></calcite-icon></div>`)}renderDragHandle(){let{label:e,dragHandle:t,dragDisabled:n,setPosition:o,setSize:c,moveToItems:r,sortDisabled:p,addToItems:g}=this;return t?h("drag-handle-container",l`<div .ariaLabel=${e} class=${i({[a.dragContainer]:!0,[a.gridCell]:!0})} role=gridcell ${v(this.handleGridRef)}><calcite-sort-handle .addToItems=${g} .disabled=${n} .label=${e} .moveToItems=${r} @calciteSortHandleBeforeClose=${this.handleSortHandleBeforeClose} @calciteSortHandleBeforeOpen=${this.handleSortHandleBeforeOpen} @calciteSortHandleClose=${this.handleSortHandleClose} @calciteSortHandleOpen=${this.handleSortHandleOpen} overlay-positioning=fixed .scale=${this.scale} .setPosition=${o} .setSize=${c} .sortDisabled=${p} ${v(this.setSortHandleEl)}></calcite-sort-handle></div>`):null}renderExpanded(){let{el:e,expanded:t,expandable:n,messages:o,displayMode:c,scale:r}=this;if(c!=="nested")return null;let p=R(e),g=n?t?m.open:p==="rtl"?m.collapsedRTL:m.collapsedLTR:m.blank,d=S(r),f=n?t?o.collapse:o.expand:void 0,u=n?this.handleToggleClick:void 0;return h("expanded-container",l`<div class=${i(a.expandedContainer)} @click=${u} title=${f??k}>${h(g,l`<calcite-icon .icon=${g} .scale=${d}></calcite-icon>`)}</div>`)}renderActionsStart(){let{label:e,hasActionsStart:t}=this;return h("actions-start-container",l`<div .ariaLabel=${e} class=${i({[a.actionsStart]:!0,[a.gridCell]:!0})} .hidden=${!t} role=gridcell ${v(this.actionsStartRef)}><slot name=${x.actionsStart} @slotchange=${this.handleActionsStartSlotChange}></slot></div>`)}renderActionsEnd(){let{label:e,hasActionsEnd:t,closable:n,messages:o}=this;return h("actions-end-container",l`<div .ariaLabel=${e} class=${i({[a.actionsEnd]:!0,[a.gridCell]:!0})} .hidden=${!(t||n)} role=gridcell ${v(this.actionsEndRef)}><slot name=${x.actionsEnd} @slotchange=${this.handleActionsEndSlotChange}></slot>${n?h("close-action",l`<calcite-action appearance=transparent class=${i(a.close)} .icon=${m.close} .label=${o.close} @click=${this.handleCloseClick} .scale=${this.scale} .text=${o.close}></calcite-action>`):null}</div>`)}renderContentStart(){let{hasContentStart:e}=this;return l`<div class=${i(a.contentStart)} .hidden=${!e}><slot name=${x.contentStart} @slotchange=${this.handleContentStartSlotChange}></slot></div>`}renderCustomContent(){let{hasCustomContent:e}=this;return l`<div class=${i(a.customContent)} .hidden=${!e}><slot name=${x.content} @slotchange=${this.handleContentSlotChange}></slot></div>`}renderIconStart(){let{iconStart:e,iconFlipRtl:t,scale:n}=this;return e?h("icon-start",l`<calcite-icon class=${i(a.icon)} .flipRtl=${t==="both"||t==="start"} .icon=${e} .scale=${S(n)}></calcite-icon>`):null}renderIconEnd(){let{iconEnd:e,iconFlipRtl:t,scale:n}=this;return e?h("icon-end",l`<calcite-icon class=${i(a.icon)} .flipRtl=${t==="both"||t==="end"} .icon=${e} .scale=${S(n)}></calcite-icon>`):null}renderContentEnd(){let{hasContentEnd:e}=this;return l`<div class=${i(a.contentEnd)} .hidden=${!e}><slot name=${x.contentEnd} @slotchange=${this.handleContentEndSlotChange}></slot></div>`}renderContentBottom(){let{hasContentBottom:e}=this;return l`<div class=${i(a.contentBottom)} .hidden=${!e}><slot name=${x.contentBottom} @slotchange=${this.handleContentBottomSlotChange}></slot></div>`}renderDefaultContainer(){return l`<div class=${i({[a.nestedContainer]:!0,[a.nestedContainerExpanded]:this.expandable&&this.expanded})}><slot @slotchange=${this.handleDefaultSlotChange} ${v(this.defaultSlotRef)}></slot></div>`}renderContentProperties(){let{label:e,description:t,hasCustomContent:n}=this;return!n&&(e||t)?h("content",l`<div class=${i(a.content)}>${e?h("label",l`<div class=${i(a.label)}>${e}</div>`):null}${t?h("description",l`<div class=${i(a.description)}>${t}</div>`):null}</div>`):null}renderContentContainer(){let{description:e,label:t,selectionMode:n,hasCustomContent:o,unavailable:c}=this,r=o||!!t||!!e,p=[this.renderContentStart(),this.renderCustomContent(),this.renderIconStart(),this.renderContentProperties(),this.renderIconEnd(),this.renderContentEnd()];return h("content-container",l`<div .ariaLabel=${t} class=${i({[a.gridCell]:!0,[a.contentContainer]:!0,[a.contentContainerUnavailable]:c,[a.contentContainerSelectable]:n!=="none",[a.contentContainerHasCenterContent]:r})} @click=${this.handleItemClick} role=gridcell ${v(this.contentRef)}>${p}</div>`)}render(){let{expandable:e,expanded:t,level:n,active:o,label:c,selected:r,selectionAppearance:p,selectionMode:g,interactionMode:d,closed:f,filterHidden:u,bordered:L,disabled:K,hasContentBottom:E}=this,j=L&&E,W=L&&!E,y=g!=="none"&&p==="border",V=y&&r,q=y&&!r,J=d==="interactive"||d==="static"&&g!=="none"&&p==="border";return P({disabled:K,children:l`<div class=${i({[a.wrapper]:!0,[a.wrapperBordered]:j})}><div .ariaExpanded=${e?t:null} .ariaLabel=${c} .ariaLevel=${n} .ariaSelected=${r} class=${i({[a.row]:!0,[a.container]:!0,[a.containerHover]:J,[a.containerBorder]:y,[a.containerBorderSelected]:V,[a.containerBorderUnselected]:q})} .hidden=${f||u} @focus=${this.focusCellNull} @focusin=${this.emitInternalListItemActive} @keydown=${this.handleItemKeyDown} role=row .tabIndex=${o?0:-1} ${v(this.containerRef)}>${this.renderDragHandle()}${this.renderSelected()}${this.renderExpanded()}<div class=${i({[a.contentContainerWrapper]:!0,[a.contentContainerWrapperBordered]:W})}>${this.renderActionsStart()}${this.renderContentContainer()}${this.renderActionsEnd()}</div></div>${this.renderContentBottom()}</div>${this.renderDefaultContainer()}`})}};A("calcite-list-item",w);export{w as ListItem};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v5.0.0-next.2 */
4
- import{E as r,h as i}from"./C7SWOQAB.js";function s(){let{disabled:e}=this;e||HTMLElement.prototype.click.call(this)}function a(e){e.target.disabled&&e.preventDefault()}var o=["mousedown","mouseup","click"];function c(e){e.target.disabled&&(e.stopImmediatePropagation(),e.preventDefault())}var n={capture:!0};function m(e){if(e.disabled){e.el.setAttribute("aria-disabled","true"),e.el.contains(document.activeElement)&&document.activeElement.blur(),l(e);return}u(e),e.el.removeAttribute("aria-disabled")}function l(e){e.el.click=s,d(e.el)}function d(e){e.addEventListener("pointerdown",a,n),o.forEach(t=>e.addEventListener(t,c,n))}function u(e){delete e.el.click,f(e.el)}function f(e){e.removeEventListener("pointerdown",a,n),o.forEach(t=>e.removeEventListener(t,c,n))}var v={container:"interaction-container"},p=({children:e,disabled:t})=>i`<div class=${r(v.container)} .inert=${t}>${e}</div>`;export{m as a,p as b};
3
+ v5.0.0-next.3 */
4
+ import{E as r,h as i}from"./ALOAVLGK.js";function s(){let{disabled:e}=this;e||HTMLElement.prototype.click.call(this)}function a(e){e.target.disabled&&e.preventDefault()}var o=["mousedown","mouseup","click"];function c(e){e.target.disabled&&(e.stopImmediatePropagation(),e.preventDefault())}var n={capture:!0};function m(e){if(e.disabled){e.el.setAttribute("aria-disabled","true"),e.el.contains(document.activeElement)&&document.activeElement.blur(),l(e);return}u(e),e.el.removeAttribute("aria-disabled")}function l(e){e.el.click=s,d(e.el)}function d(e){e.addEventListener("pointerdown",a,n),o.forEach(t=>e.addEventListener(t,c,n))}function u(e){delete e.el.click,f(e.el)}function f(e){e.removeEventListener("pointerdown",a,n),o.forEach(t=>e.removeEventListener(t,c,n))}var v={container:"interaction-container"},p=({children:e,disabled:t})=>i`<div class=${r(v.container)} .inert=${t}>${e}</div>`;export{m as a,p as b};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v5.0.0-next.2 */
4
- import{a as z,e as I,f as M}from"./R5RXEIYL.js";import"./GZNEHDFX.js";import{b as l}from"./67W7PMC5.js";import{a as k,b as S}from"./MNOO2GEE.js";import{a}from"./AN7BJW6E.js";import{a as h,b as y}from"./KJXOD5Z2.js";import"./UBGSVRI6.js";import{r as w}from"./S4PILGWU.js";import{a as $}from"./OFPYAEOU.js";import{D as v,E as i,F as x,P as C,g as f,h as c,l as g,o as d}from"./C7SWOQAB.js";var t={active:"label--active",centerContent:"center-content",container:"container",iconCustom:"icon--custom",description:"description",icon:"icon",label:"label",scale:b=>`scale--${b}`,shortText:"short-text",single:"label--single",textContainer:"text-container",heading:"heading"},o={checked:"check-square-f",circle:"circle",indeterminate:"minus-square-f",selectedSingle:"circle-inset-large",unchecked:"square"},H={contentEnd:"content-end",contentStart:"content-start"},_="--calcite-combobox-item-spacing-indent-multiplier",O=f`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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([hidden]){display:none}[hidden]{display:none}.scale--s{font-size:var(--calcite-font-size--2);line-height:1rem;--calcite-internal-combobox-item-spacing-unit-s: .25rem;--calcite-internal-combobox-item-spacing-unit-l: .5rem;--calcite-combobox-item-selector-icon-size: 1rem;--calcite-internal-combobox-item-description-font-size: var(--calcite-font-size-xs)}.scale--m{font-size:var(--calcite-font-size--1);line-height:1rem;--calcite-internal-combobox-item-spacing-unit-s: .375rem;--calcite-internal-combobox-item-spacing-unit-l: .75rem;--calcite-combobox-item-selector-icon-size: 1rem;--calcite-internal-combobox-item-description-font-size: var(--calcite-font-size-sm)}.scale--l{font-size:var(--calcite-font-size-0);line-height:1.25rem;--calcite-internal-combobox-item-spacing-unit-s: .625rem;--calcite-internal-combobox-item-spacing-unit-l: 1rem;--calcite-combobox-item-selector-icon-size: 1.5rem;--calcite-internal-combobox-item-description-font-size: var(--calcite-font-size)}.container{--calcite-combobox-item-indent-value: calc( var(--calcite-internal-combobox-item-spacing-unit-l) * var(--calcite-combobox-item-spacing-indent-multiplier) )}:host(:focus){--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host,ul{margin:0;display:flex;flex-direction:column;padding:0}:host(:focus),ul:focus{outline:2px solid transparent;outline-offset:2px}.label{position:relative;box-sizing:border-box;display:flex;inline-size:100%;min-inline-size:100%;cursor:pointer;align-items:center;text-decoration-line:none;transition-timing-function:cubic-bezier(.4,0,.2,1);outline-color:transparent;word-wrap:break-word;word-break:break-word;justify-content:space-around;gap:var(--calcite-internal-combobox-item-spacing-unit-l);padding-block:var(--calcite-internal-combobox-item-spacing-unit-s);padding-inline-end:var(--calcite-internal-combobox-item-spacing-unit-l);padding-inline-start:var(--calcite-combobox-item-indent-value);color:var(--calcite-combobox-text-color, var(--calcite-color-text-3));transition-duration:var(--calcite-animation-timing)}:host([disabled]) .label{cursor:default}.label--active{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.label:hover{background-color:var(--calcite-combobox-item-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-combobox-text-color-hover, var(--calcite-color-text-1))}.label:active{background-color:var(--calcite-combobox-item-background-color-active, var(--calcite-color-foreground-3))}:host([selected]) .label,.label:active{color:var(--calcite-combobox-text-color-hover, var(--calcite-color-text-1))}:host([selected]) .label .description,:host([selected]) .label .short-text,.label:active .description,.label:active .short-text{color:var(--calcite-combobox-description-text-color-press, var(--calcite-color-text-2))}.icon{display:inline-flex;transition-timing-function:cubic-bezier(.4,0,.2,1);color:var(--calcite-color-border-input)}:host([selected]) .icon,:host([indeterminate]) .icon{color:var(--calcite-combobox-selected-icon-color, var(--calcite-color-brand))}.icon--custom{margin-block-start:-1px}.center-content{display:flex;flex-direction:column;flex-grow:1;padding-block:0}.description{font-size:var(--calcite-internal-combobox-item-description-font-size)}.short-text{white-space:nowrap}.heading{color:var(--calcite-combobox-heading-text-color, var(--calcite-color-text-1))}.description,.short-text{color:var(--calcite-combobox-description-text-color, var(--calcite-color-text-3))}:host([selected]) .heading{font-weight:var(--calcite-font-weight-medium)}.heading,.description,.short-text{line-height:var(--calcite-font-line-height-relative-snug)}:host([item-hidden]){display:none}.text-match{background-color:transparent;color:inherit;font-weight:var(--calcite-font-weight-bold)}`,m=class extends v{constructor(){super(...arguments),this._selected=!1,this.hasContent=!1,this.active=!1,this.disabled=!1,this.guid=$(),this.iconFlipRtl=!1,this.scale="m",this.selectionMode="multiple",this.itemHidden=!1,this.indeterminate=!1,this.calciteComboboxItemChange=d({cancelable:!1}),this.calciteInternalComboboxItemChange=d({cancelable:!1})}static{this.properties={hasContent:[16,{},{state:!0}],active:[7,{},{reflect:!0,type:Boolean}],ancestors:[0,{},{attribute:!1}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],filterDisabled:[7,{},{reflect:!0,type:Boolean}],filterTextMatchPattern:[2,{},{reflect:!0,attribute:!1}],guid:[3,{},{reflect:!0}],heading:1,icon:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],label:1,metadata:[0,{},{attribute:!1}],scale:1,selected:[7,{},{reflect:!0,type:Boolean}],selectionMode:[3,{},{reflect:!0}],shortHeading:1,textLabel:[3,{},{reflect:!0}],value:1,itemHidden:[7,{},{reflect:!0,type:Boolean}],indeterminate:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=O}get selected(){return this._selected}set selected(e){let n=this._selected;e!==n&&(this._selected=e,this.emitItemChange())}toggleSelection(){let e=this.selectionMode==="single-persist";this.disabled||e&&this.selected||(this.selected=!this.selected,this.calciteComboboxItemChange.emit())}connectedCallback(){super.connectedCallback(),this.ancestors=z(this.el)}load(){y(this,"value","textLabel")}willUpdate(e){this.hasUpdated&&(e.has("disabled")||e.has("heading")||e.has("label")||e.has("textLabel"))&&this.emitItemChange()}updated(){k(this)}emitItemChange(){this.calciteInternalComboboxItemChange.emit()}handleDefaultSlotChange(e){this.hasContent=w(e)}itemClickHandler(){this.toggleSelection()}renderIcon(e){return this.icon?a("icon",c`<calcite-icon class=${i({[t.iconCustom]:!!this.icon})} .flipRtl=${this.iconFlipRtl} .icon=${this.icon||e} .scale=${h(this.scale)}></calcite-icon>`):null}renderSelectIndicator(e){return a("indicator",c`<calcite-icon class=${i({[t.icon]:!0})} .flipRtl=${this.iconFlipRtl} .icon=${e} .scale=${h(this.scale)}></calcite-icon>`)}renderChildren(){return a("default-slot-container",c`<ul .hidden=${!this.hasContent}><slot @slotchange=${this.handleDefaultSlotChange}></slot></ul>`)}render(){let{disabled:e,heading:n,label:L,textLabel:B,value:R,filterTextMatchPattern:s,description:u,shortHeading:p}=this,r=M(this.selectionMode),T=e||r?void 0:o.checked,E=r?this.selected?o.selectedSingle:o.circle:this.indeterminate?o.indeterminate:this.selected?o.checked:o.unchecked,q=n||B,D=L||R,F={[t.label]:!0,[t.active]:this.active,[t.single]:r},P=I(this.el);return this.el.ariaHidden="true",this.el.ariaLabel=D,S({disabled:e,children:c`<div class=${i({[t.container]:!0,[t.scale(this.scale)]:!0})} style=${x({[_]:`${P}`})}><li class=${i(F)} id=${this.guid??g} @click=${this.itemClickHandler}>${this.renderSelectIndicator(E)}<slot name=${H.contentStart}></slot>${this.renderIcon(T)}<div class=${i(t.centerContent)}><div class=${i(t.heading)}>${l({text:q,pattern:s})}</div>${u?c`<div class=${i(t.description)}>${l({text:u,pattern:s})}</div>`:null}</div>${p?c`<div class=${i(t.shortText)}>${l({text:p,pattern:s})}</div>`:null}<slot name=${H.contentEnd}></slot></li>${this.renderChildren()}</div>`})}};C("calcite-combobox-item",m);export{m as ComboboxItem};
3
+ v5.0.0-next.3 */
4
+ import{a as z,e as I,f as M}from"./TKNM6PGC.js";import"./7STMP4B2.js";import{b as l}from"./6J3DGER2.js";import{a as k,b as S}from"./EU6IVBMM.js";import{a}from"./7WAFUV2T.js";import{a as h,b as y}from"./JW4SOJWB.js";import"./P2RYGBBZ.js";import{r as w}from"./SLICSH62.js";import{a as $}from"./DNM3U3Z7.js";import{D as v,E as i,F as x,P as C,g as f,h as c,l as g,o as d}from"./ALOAVLGK.js";var t={active:"label--active",centerContent:"center-content",container:"container",iconCustom:"icon--custom",description:"description",icon:"icon",label:"label",scale:b=>`scale--${b}`,shortText:"short-text",single:"label--single",textContainer:"text-container",heading:"heading"},o={checked:"check-square-f",circle:"circle",indeterminate:"minus-square-f",selectedSingle:"circle-inset-large",unchecked:"square"},H={contentEnd:"content-end",contentStart:"content-start"},_="--calcite-combobox-item-spacing-indent-multiplier",O=f`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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([hidden]){display:none}[hidden]{display:none}.scale--s{font-size:var(--calcite-font-size--2);line-height:1rem;--calcite-internal-combobox-item-spacing-unit-s: .25rem;--calcite-internal-combobox-item-spacing-unit-l: .5rem;--calcite-combobox-item-selector-icon-size: 1rem;--calcite-internal-combobox-item-description-font-size: var(--calcite-font-size-xs)}.scale--m{font-size:var(--calcite-font-size--1);line-height:1rem;--calcite-internal-combobox-item-spacing-unit-s: .375rem;--calcite-internal-combobox-item-spacing-unit-l: .75rem;--calcite-combobox-item-selector-icon-size: 1rem;--calcite-internal-combobox-item-description-font-size: var(--calcite-font-size-sm)}.scale--l{font-size:var(--calcite-font-size-0);line-height:1.25rem;--calcite-internal-combobox-item-spacing-unit-s: .625rem;--calcite-internal-combobox-item-spacing-unit-l: 1rem;--calcite-combobox-item-selector-icon-size: 1.5rem;--calcite-internal-combobox-item-description-font-size: var(--calcite-font-size)}.container{--calcite-combobox-item-indent-value: calc( var(--calcite-internal-combobox-item-spacing-unit-l) * var(--calcite-combobox-item-spacing-indent-multiplier) )}:host(:focus){--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host,ul{margin:0;display:flex;flex-direction:column;padding:0}:host(:focus),ul:focus{outline:2px solid transparent;outline-offset:2px}.label{position:relative;box-sizing:border-box;display:flex;inline-size:100%;min-inline-size:100%;cursor:pointer;align-items:center;text-decoration-line:none;transition-timing-function:cubic-bezier(.4,0,.2,1);outline-color:transparent;word-wrap:break-word;word-break:break-word;justify-content:space-around;gap:var(--calcite-internal-combobox-item-spacing-unit-l);padding-block:var(--calcite-internal-combobox-item-spacing-unit-s);padding-inline-end:var(--calcite-internal-combobox-item-spacing-unit-l);padding-inline-start:var(--calcite-combobox-item-indent-value);color:var(--calcite-combobox-text-color, var(--calcite-color-text-3));transition-duration:var(--calcite-animation-timing)}:host([disabled]) .label{cursor:default}.label--active{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.label:hover{background-color:var(--calcite-combobox-item-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-combobox-text-color-hover, var(--calcite-color-text-1))}.label:active{background-color:var(--calcite-combobox-item-background-color-active, var(--calcite-color-foreground-3))}:host([selected]) .label,.label:active{color:var(--calcite-combobox-text-color-hover, var(--calcite-color-text-1))}:host([selected]) .label .description,:host([selected]) .label .short-text,.label:active .description,.label:active .short-text{color:var(--calcite-combobox-description-text-color-press, var(--calcite-color-text-2))}.icon{display:inline-flex;transition-timing-function:cubic-bezier(.4,0,.2,1);color:var(--calcite-color-border-input)}:host([selected]) .icon,:host([indeterminate]) .icon{color:var(--calcite-combobox-selected-icon-color, var(--calcite-color-brand))}.icon--custom{margin-block-start:-1px}.center-content{display:flex;flex-direction:column;flex-grow:1;padding-block:0}.description{font-size:var(--calcite-internal-combobox-item-description-font-size)}.short-text{white-space:nowrap}.heading{color:var(--calcite-combobox-heading-text-color, var(--calcite-color-text-1))}.description,.short-text{color:var(--calcite-combobox-description-text-color, var(--calcite-color-text-3))}:host([selected]) .heading{font-weight:var(--calcite-font-weight-medium)}.heading,.description,.short-text{line-height:var(--calcite-font-line-height-relative-snug)}:host([item-hidden]){display:none}.text-match{background-color:transparent;color:inherit;font-weight:var(--calcite-font-weight-bold)}`,m=class extends v{constructor(){super(...arguments),this._selected=!1,this.hasContent=!1,this.active=!1,this.disabled=!1,this.guid=$(),this.iconFlipRtl=!1,this.scale="m",this.selectionMode="multiple",this.itemHidden=!1,this.indeterminate=!1,this.calciteComboboxItemChange=d({cancelable:!1}),this.calciteInternalComboboxItemChange=d({cancelable:!1})}static{this.properties={hasContent:[16,{},{state:!0}],active:[7,{},{reflect:!0,type:Boolean}],ancestors:[0,{},{attribute:!1}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],filterDisabled:[7,{},{reflect:!0,type:Boolean}],filterTextMatchPattern:[2,{},{reflect:!0,attribute:!1}],guid:[3,{},{reflect:!0}],heading:1,icon:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],label:1,metadata:[0,{},{attribute:!1}],scale:1,selected:[7,{},{reflect:!0,type:Boolean}],selectionMode:[3,{},{reflect:!0}],shortHeading:1,textLabel:[3,{},{reflect:!0}],value:1,itemHidden:[7,{},{reflect:!0,type:Boolean}],indeterminate:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=O}get selected(){return this._selected}set selected(e){let n=this._selected;e!==n&&(this._selected=e,this.emitItemChange())}toggleSelection(){let e=this.selectionMode==="single-persist";this.disabled||e&&this.selected||(this.selected=!this.selected,this.calciteComboboxItemChange.emit())}connectedCallback(){super.connectedCallback(),this.ancestors=z(this.el)}load(){y(this,"value","textLabel")}willUpdate(e){this.hasUpdated&&(e.has("disabled")||e.has("heading")||e.has("label")||e.has("textLabel"))&&this.emitItemChange()}updated(){k(this)}emitItemChange(){this.calciteInternalComboboxItemChange.emit()}handleDefaultSlotChange(e){this.hasContent=w(e)}itemClickHandler(){this.toggleSelection()}renderIcon(e){return this.icon?a("icon",c`<calcite-icon class=${i({[t.iconCustom]:!!this.icon})} .flipRtl=${this.iconFlipRtl} .icon=${this.icon||e} .scale=${h(this.scale)}></calcite-icon>`):null}renderSelectIndicator(e){return a("indicator",c`<calcite-icon class=${i({[t.icon]:!0})} .flipRtl=${this.iconFlipRtl} .icon=${e} .scale=${h(this.scale)}></calcite-icon>`)}renderChildren(){return a("default-slot-container",c`<ul .hidden=${!this.hasContent}><slot @slotchange=${this.handleDefaultSlotChange}></slot></ul>`)}render(){let{disabled:e,heading:n,label:L,textLabel:B,value:R,filterTextMatchPattern:s,description:u,shortHeading:p}=this,r=M(this.selectionMode),T=e||r?void 0:o.checked,E=r?this.selected?o.selectedSingle:o.circle:this.indeterminate?o.indeterminate:this.selected?o.checked:o.unchecked,q=n||B,D=L||R,F={[t.label]:!0,[t.active]:this.active,[t.single]:r},P=I(this.el);return this.el.ariaHidden="true",this.el.ariaLabel=D,S({disabled:e,children:c`<div class=${i({[t.container]:!0,[t.scale(this.scale)]:!0})} style=${x({[_]:`${P}`})}><li class=${i(F)} id=${this.guid??g} @click=${this.itemClickHandler}>${this.renderSelectIndicator(E)}<slot name=${H.contentStart}></slot>${this.renderIcon(T)}<div class=${i(t.centerContent)}><div class=${i(t.heading)}>${l({text:q,pattern:s})}</div>${u?c`<div class=${i(t.description)}>${l({text:u,pattern:s})}</div>`:null}</div>${p?c`<div class=${i(t.shortText)}>${l({text:p,pattern:s})}</div>`:null}<slot name=${H.contentEnd}></slot></li>${this.renderChildren()}</div>`})}};C("calcite-combobox-item",m);export{m as ComboboxItem};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v5.0.0-next.2 */
4
- import{a as v,b as g}from"./MNOO2GEE.js";import{a as m}from"./EU53PNIW.js";import{a as p}from"./UMUEMXJF.js";import"./GBKXT23N.js";import"./KJXOD5Z2.js";import"./UBGSVRI6.js";import{e as h}from"./S4PILGWU.js";import"./OFPYAEOU.js";import{B as n,C as s,D as d,E as a,J as b,P as u,g as i,h as c,l as o}from"./C7SWOQAB.js";var e={contentCell:"content-cell",numberCell:"number-cell",footerCell:"footer-cell",selectionCell:"selection-cell",selectedCell:"selected-cell",assistiveText:"assistive-text",lastCell:"last-cell",staticCell:"static-cell"},f=i`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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:contents}:host([alignment=center]) td:not(.selection-cell):not(.number-cell){text-align:center}:host([alignment=end]) td:not(.selection-cell):not(.number-cell){text-align:end}.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}td{white-space:normal;text-align:start;vertical-align:middle;color:var(--calcite-table-cell-text-color, var(--calcite-color-text-1));background-color:var(--calcite-internal-table-cell-background-color, var(--calcite-table-cell-background-color, transparent));font-size:var(--calcite-internal-table-cell-font-size);border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-table-cell-border-color, var(--calcite-table-border-color, var(--calcite-color-border-2)));padding:var(--calcite-internal-table-cell-padding)}td:not(.static-cell){outline-color:transparent}td:not(.static-cell):focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}td.start.content-cell{vertical-align:top}td.end.content-cell{vertical-align:bottom}td.last-cell{border-inline-end:0}.footer-cell{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-table-cell-text-color, var(--calcite-color-text-1));background-color:var(--calcite-table-cell-background-color, var(--calcite-table-cell-background, var(--calcite-color-background)));border-block-start:var(--calcite-border-width-sm) solid var(--calcite-table-cell-border-color, var(--calcite-table-border-color, var(--calcite-color-border-2)))}.number-cell,.selection-cell{text-align:center;border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-table-cell-border-color, var(--calcite-table-border-color, var(--calcite-color-border-2)));inline-size:2rem;min-inline-size:2rem}.number-cell{color:var(--calcite-table-number-cell-text-color, var(--calcite-color-text-1));background-color:var(--calcite-table-number-cell-background-color, var(--calcite-color-foreground-2))}.number-cell.footer-cell{background-color:var(--calcite-table-number-cell-background-color, var(--calcite-table-cell-background-color, var(--calcite-color-background)))}.selection-cell{color:var(--calcite-table-selection-cell-icon-color, var(--calcite-color-text-3))}.selection-cell:not(.footer-cell){cursor:pointer;background-color:var(--calcite-table-selection-cell-background-color, var(--calcite-table-cell-background-color, transparent))}.selection-cell.footer-cell{background-color:var(--calcite-table-selection-cell-background-color, var(--calcite-table-cell-background-color, var(--calcite-color-background)))}.selected-cell:not(.number-cell):not(.footer-cell){background-color:var(--calcite-table-cell-background-color-selected, var(--calcite-table-row-background-color-selected, var(--calcite-color-surface-highlight)))}.selection-cell.selected-cell{box-shadow:inset 0 0 0 0 var(--calcite-table-row-accent-color-selected, var(--calcite-color-brand));color:var(--calcite-table-selection-cell-icon-color-selected, var(--calcite-color-brand))}.calcite--rtl.selection-cell.selected-cell{box-shadow:inset -.25rem 0 0 0 var(--calcite-table-row-accent-color-selected, var(--calcite-color-brand))}.selection-cell{vertical-align:middle}.selection-cell ::slotted(calcite-icon){pointer-events:none;margin-block-start:.25rem}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,r=class extends d{constructor(){super(...arguments),this.containerRef=n(),this.messages=m(),this.focusSetter=p()(this),this.contentsText="",this.focused=!1,this.selectionText="",this.alignment="start",this.interactionMode="interactive",this.parentRowAlignment="start",this.scale="m"}static{this.properties={contentsText:[16,{},{state:!0}],focused:[16,{},{state:!0}],selectionText:[16,{},{state:!0}],alignment:[3,{},{reflect:!0}],colSpan:[11,{},{reflect:!0,type:Number}],disabled:[5,{},{type:Boolean}],interactionMode:1,lastCell:[5,{},{type:Boolean}],messageOverrides:[0,{},{attribute:!1}],numberCell:[5,{},{type:Boolean}],parentRowAlignment:1,parentRowIsSelected:[5,{},{type:Boolean}],parentRowPositionLocalized:1,parentRowType:1,positionInRow:[9,{},{type:Number}],readCellContentsToAT:[5,{},{type:Boolean}],rowSpan:[11,{},{reflect:!0,type:Number}],scale:1,selectionCell:[5,{},{type:Boolean}]}}static{this.styles=f}async setFocus(t){return this.focusSetter(()=>this.containerRef.value,t)}async load(){this.updateScreenReaderContentsText(),this.updateScreenReaderSelectionText()}willUpdate(t){t.has("parentRowIsSelected")&&this.updateScreenReaderSelectionText()}updated(){v(this)}updateScreenReaderSelectionText(){let t=`${this.messages?.row} ${this.parentRowPositionLocalized} ${this.messages?.selected} ${this.messages?.keyboardDeselect}`,l=`${this.messages?.row} ${this.parentRowPositionLocalized} ${this.messages?.unselected} ${this.messages?.keyboardSelect}`;this.selectionText=this.parentRowIsSelected?t:l}updateScreenReaderContentsText(){this.contentsText=this.el.textContent}onContainerBlur(){this.focused=!1}onContainerFocus(){this.focused=!0}render(){let t=h(this.el),l=this.disabled||this.interactionMode==="static"&&(!this.selectionCell||this.selectionCell&&this.parentRowType==="foot");return g({disabled:this.disabled,children:c`<td class=${a({[e.footerCell]:this.parentRowType==="foot",[e.contentCell]:!this.numberCell&&!this.selectionCell,[e.numberCell]:this.numberCell,[e.selectionCell]:this.selectionCell,[e.selectedCell]:this.parentRowIsSelected,[e.lastCell]:this.lastCell&&(!this.rowSpan||this.colSpan&&!!this.rowSpan),[b.rtl]:t==="rtl",[e.staticCell]:l,[this.parentRowAlignment]:this.parentRowAlignment==="start"||this.parentRowAlignment==="end"})} colSpan=${this.colSpan??o} @blur=${this.onContainerBlur} @focus=${this.onContainerFocus} .role=${this.interactionMode==="interactive"?"gridcell":"cell"} rowSpan=${this.rowSpan??o} .tabIndex=${l?-1:0} ${s(this.containerRef)}>${(this.selectionCell||this.readCellContentsToAT)&&c`<span .ariaLive=${this.focused?"polite":"off"} class=${a(e.assistiveText)}>${this.selectionCell&&this.selectionText||""}${this.readCellContentsToAT&&!this.selectionCell&&this.contentsText||""}</span>`||""}<slot @slotchange=${this.updateScreenReaderContentsText}></slot></td>`})}};u("calcite-table-cell",r);export{r as TableCell};
3
+ v5.0.0-next.3 */
4
+ import{a as v,b as g}from"./EU6IVBMM.js";import{a as m}from"./WIJWBGXQ.js";import{a as p}from"./XWXCOJUO.js";import"./UXWFYSWM.js";import"./JW4SOJWB.js";import"./P2RYGBBZ.js";import{e as h}from"./SLICSH62.js";import"./DNM3U3Z7.js";import{B as n,C as s,D as d,E as a,J as b,P as u,g as i,h as c,l as o}from"./ALOAVLGK.js";var e={contentCell:"content-cell",numberCell:"number-cell",footerCell:"footer-cell",selectionCell:"selection-cell",selectedCell:"selected-cell",assistiveText:"assistive-text",lastCell:"last-cell",staticCell:"static-cell"},f=i`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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:contents}:host([alignment=center]) td:not(.selection-cell):not(.number-cell){text-align:center}:host([alignment=end]) td:not(.selection-cell):not(.number-cell){text-align:end}.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}td{white-space:normal;text-align:start;vertical-align:middle;color:var(--calcite-table-cell-text-color, var(--calcite-color-text-1));background-color:var(--calcite-internal-table-cell-background-color, var(--calcite-table-cell-background-color, transparent));font-size:var(--calcite-internal-table-cell-font-size);border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-table-cell-border-color, var(--calcite-table-border-color, var(--calcite-color-border-2)));padding:var(--calcite-internal-table-cell-padding)}td:not(.static-cell){outline-color:transparent}td:not(.static-cell):focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}td.start.content-cell{vertical-align:top}td.end.content-cell{vertical-align:bottom}td.last-cell{border-inline-end:0}.footer-cell{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-table-cell-text-color, var(--calcite-color-text-1));background-color:var(--calcite-table-cell-background-color, var(--calcite-table-cell-background, var(--calcite-color-background)));border-block-start:var(--calcite-border-width-sm) solid var(--calcite-table-cell-border-color, var(--calcite-table-border-color, var(--calcite-color-border-2)))}.number-cell,.selection-cell{text-align:center;border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-table-cell-border-color, var(--calcite-table-border-color, var(--calcite-color-border-2)));inline-size:2rem;min-inline-size:2rem}.number-cell{color:var(--calcite-table-number-cell-text-color, var(--calcite-color-text-1));background-color:var(--calcite-table-number-cell-background-color, var(--calcite-color-foreground-2))}.number-cell.footer-cell{background-color:var(--calcite-table-number-cell-background-color, var(--calcite-table-cell-background-color, var(--calcite-color-background)))}.selection-cell{color:var(--calcite-table-selection-cell-icon-color, var(--calcite-color-text-3))}.selection-cell:not(.footer-cell){cursor:pointer;background-color:var(--calcite-table-selection-cell-background-color, var(--calcite-table-cell-background-color, transparent))}.selection-cell.footer-cell{background-color:var(--calcite-table-selection-cell-background-color, var(--calcite-table-cell-background-color, var(--calcite-color-background)))}.selected-cell:not(.number-cell):not(.footer-cell){background-color:var(--calcite-table-cell-background-color-selected, var(--calcite-table-row-background-color-selected, var(--calcite-color-surface-highlight)))}.selection-cell.selected-cell{box-shadow:inset 0 0 0 0 var(--calcite-table-row-accent-color-selected, var(--calcite-color-brand));color:var(--calcite-table-selection-cell-icon-color-selected, var(--calcite-color-brand))}.calcite--rtl.selection-cell.selected-cell{box-shadow:inset -.25rem 0 0 0 var(--calcite-table-row-accent-color-selected, var(--calcite-color-brand))}.selection-cell{vertical-align:middle}.selection-cell ::slotted(calcite-icon){pointer-events:none;margin-block-start:.25rem}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,r=class extends d{constructor(){super(...arguments),this.containerRef=n(),this.messages=m(),this.focusSetter=p()(this),this.contentsText="",this.focused=!1,this.selectionText="",this.alignment="start",this.interactionMode="interactive",this.parentRowAlignment="start",this.scale="m"}static{this.properties={contentsText:[16,{},{state:!0}],focused:[16,{},{state:!0}],selectionText:[16,{},{state:!0}],alignment:[3,{},{reflect:!0}],colSpan:[11,{},{reflect:!0,type:Number}],disabled:[5,{},{type:Boolean}],interactionMode:1,lastCell:[5,{},{type:Boolean}],messageOverrides:[0,{},{attribute:!1}],numberCell:[5,{},{type:Boolean}],parentRowAlignment:1,parentRowIsSelected:[5,{},{type:Boolean}],parentRowPositionLocalized:1,parentRowType:1,positionInRow:[9,{},{type:Number}],readCellContentsToAT:[5,{},{type:Boolean}],rowSpan:[11,{},{reflect:!0,type:Number}],scale:1,selectionCell:[5,{},{type:Boolean}]}}static{this.styles=f}async setFocus(t){return this.focusSetter(()=>this.containerRef.value,t)}async load(){this.updateScreenReaderContentsText(),this.updateScreenReaderSelectionText()}willUpdate(t){t.has("parentRowIsSelected")&&this.updateScreenReaderSelectionText()}updated(){v(this)}updateScreenReaderSelectionText(){let t=`${this.messages?.row} ${this.parentRowPositionLocalized} ${this.messages?.selected} ${this.messages?.keyboardDeselect}`,l=`${this.messages?.row} ${this.parentRowPositionLocalized} ${this.messages?.unselected} ${this.messages?.keyboardSelect}`;this.selectionText=this.parentRowIsSelected?t:l}updateScreenReaderContentsText(){this.contentsText=this.el.textContent}onContainerBlur(){this.focused=!1}onContainerFocus(){this.focused=!0}render(){let t=h(this.el),l=this.disabled||this.interactionMode==="static"&&(!this.selectionCell||this.selectionCell&&this.parentRowType==="foot");return g({disabled:this.disabled,children:c`<td class=${a({[e.footerCell]:this.parentRowType==="foot",[e.contentCell]:!this.numberCell&&!this.selectionCell,[e.numberCell]:this.numberCell,[e.selectionCell]:this.selectionCell,[e.selectedCell]:this.parentRowIsSelected,[e.lastCell]:this.lastCell&&(!this.rowSpan||this.colSpan&&!!this.rowSpan),[b.rtl]:t==="rtl",[e.staticCell]:l,[this.parentRowAlignment]:this.parentRowAlignment==="start"||this.parentRowAlignment==="end"})} colSpan=${this.colSpan??o} @blur=${this.onContainerBlur} @focus=${this.onContainerFocus} .role=${this.interactionMode==="interactive"?"gridcell":"cell"} rowSpan=${this.rowSpan??o} .tabIndex=${l?-1:0} ${s(this.containerRef)}>${(this.selectionCell||this.readCellContentsToAT)&&c`<span .ariaLive=${this.focused?"polite":"off"} class=${a(e.assistiveText)}>${this.selectionCell&&this.selectionText||""}${this.readCellContentsToAT&&!this.selectionCell&&this.contentsText||""}</span>`||""}<slot @slotchange=${this.updateScreenReaderContentsText}></slot></td>`})}};u("calcite-table-cell",r);export{r as TableCell};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v5.0.0-next.2 */
3
+ v5.0.0-next.3 */
4
4
  function s(r,e,{signal:o,edges:m}={}){let p,t=null,i=m!=null&&m.includes("leading"),x=m==null||m.includes("trailing"),l=()=>{t!==null&&(r.apply(p,t),p=void 0,t=null)},h=()=>{x&&l(),a()},f=null,u=()=>{f!=null&&clearTimeout(f),f=setTimeout(()=>{f=null,h()},e)},y=()=>{f!==null&&(clearTimeout(f),f=null)},a=()=>{y(),p=void 0,t=null},g=()=>{l()},n=function(...b){if(o?.aborted)return;p=this,t=b;let B=f==null;u(),i&&B&&l()};return n.schedule=u,n.cancel=a,n.flush=g,o?.addEventListener("abort",a,{once:!0}),n}function w(r,e,{signal:o,edges:m=["leading","trailing"]}={}){let p=null,t=s(r,e,{signal:o,edges:m}),i=function(...x){p==null?p=Date.now():Date.now()-p>=e&&(p=Date.now(),t.cancel()),t.apply(this,x)};return i.cancel=t.cancel,i.flush=t.flush,i}function c(r,e){if(e===void 0)return r.trimEnd();let o=r.length;switch(typeof e){case"string":{if(e.length!==1)throw new Error("The 'chars' parameter should be a single character string.");for(;o>0&&r[o-1]===e;)o--;break}case"object":for(;o>0&&e.includes(r[o-1]);)o--}return r.substring(0,o)}function d(r,e){if(e===void 0)return r.trimStart();let o=0;switch(typeof e){case"string":{for(;o<r.length&&r[o]===e;)o++;break}case"object":for(;o<r.length&&e.includes(r[o]);)o++}return r.substring(o)}function S(r,e){return e===void 0?r.trim():d(c(r,e),e)}function z(r){return r}function D(r){return r.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&")}export{s as a,z as b,w as c,D as d,S as e};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v5.0.0-next.2 */
4
- import{k as m}from"./ZR7MTX2F.js";import"./6G4YIOVX.js";import{a as P}from"./EU53PNIW.js";import"./GBKXT23N.js";import{c as g}from"./KJXOD5Z2.js";import"./UBGSVRI6.js";import{B as b,C as h,D as A,E as s,P as k,g as z,h as n,l as x,m as T,o as p}from"./C7SWOQAB.js";function L(){return navigator.userAgentData}function N(){if(!1)return"";let f=L();return f?.brands?f.brands.map(({brand:e,version:i})=>`${e}/${i}`).join(" "):navigator.userAgent}var l={bordered:"bordered",striped:"striped",selectionArea:"selection-area",paginationArea:"pagination-area",container:"container",tableContainer:"table-container",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"},v={selectionActions:"selection-actions",tableHeader:"table-header",tableFooter:"table-footer"},I={hideEmpty:"hide-empty",clear:"x"},D=z`@charset "UTF-8";:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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([scale=l]){--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{display:flex}.container{display:flex;flex-direction:column;inline-size:var(--calcite-container-size-content-fluid);block-size:var(--calcite-container-size-content-fluid)}.table-container{overflow:auto;white-space:nowrap;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))}.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:collapse;overflow-x:scroll;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;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}`,w=class extends A{constructor(){super(),this.paginationRef=b(),this.tableBodySlotRef=b(),this.tableFootSlotRef=b(),this.tableHeadSlotRef=b(),this.messages=P({blocking:!0}),this.colCount=0,this.pageStartRow=1,this.selectedCount=0,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.calciteInternalTableRowFocusChange=p({cancelable:!1}),this.calciteTablePageChange=p({cancelable:!1}),this.calciteTableSelect=p({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}],_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}]}}static{this.styles=D}get selectedItems(){return this._selectedItems}async load(){this.readCellContentsToAT=/safari/i.test(N()),this.listenOn(this.el.shadowRoot,"slotchange",this.handleSlotChange)}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()}handleSlotChange(){this.updateRows()}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 i=e.detail.cellPosition,o=e.detail.rowPosition,a=e.detail.destination,r=e.detail.lastCell,t=this.bodyRows?.filter(u=>!g(u)),c=this.allRows?.filter(u=>!g(u)),S=this.headRows[this.headRows.length-1]?.positionAll,R=t[0]?.positionAll,y=t[t.length-1]?.positionAll,$=this.footRows[0]?.positionAll,M=c[c.length-1]?.positionAll,F=a==="next"&&o===S,O=a==="previous"&&o===$,E=a==="previous"&&o===R,B=a==="next"&&o===y,d;switch(a){case"first":d=0;break;case"last":d=M;break;case"next":d=F?R:B?$:o+1;break;case"previous":d=O?y:E?S:o-1;break}let C=this.allRows?.find(u=>u.positionAll===d)?.cellCount,H=i>C?C:i;d!==void 0&&this.calciteInternalTableRowFocusChange.emit({cellPosition:H,rowPosition:d,destination:a,lastCell:r})}getSlottedRows(e){return e?.assignedElements({flatten:!0})?.filter(i=>i?.matches("calcite-table-row"))}updateRows(){let e=this.getSlottedRows(this.tableHeadSlotRef.value)||[],i=this.getSlottedRows(this.tableBodySlotRef.value)||[],o=this.getSlottedRows(this.tableFootSlotRef.value)||[],a=[...e,...i,...o];e?.forEach(t=>{let c=e?.indexOf(t);t.rowType="head",t.positionSection=c,t.positionSectionLocalized=this.localizeNumber((c+1).toString())}),i?.forEach(t=>{let c=i?.indexOf(t);t.rowType="body",t.positionSection=c,t.positionSectionLocalized=this.localizeNumber((c+1).toString())}),o?.forEach(t=>{let c=o?.indexOf(t);t.rowType="foot",t.positionSection=c,t.positionSectionLocalized=this.localizeNumber((c+1).toString())}),a?.forEach(t=>{t.interactionMode=this.interactionMode,t.selectionMode=this.selectionMode,t.bodyRowCount=i?.length,t.positionAll=a?.indexOf(t),t.numbered=this.numbered,t.scale=this.scale,t.readCellContentsToAT=this.readCellContentsToAT,t.lastVisibleRow=a?.indexOf(t)===a.length-1});let r=e[0]?.cellCount||e[0]?.querySelectorAll("calcite-table-header")?.length;this.colCount=r,this.headRows=e,this.bodyRows=i,this.footRows=o,this.allRows=a,this.handleCurrentPageRange(),this.updateSelectedItems()}handleCurrentPageRange(){let e=this.currentPage,i=this.bodyRows?.length||0,o=this.pageSize>0?Math.ceil(i/this.pageSize):1;if(o>0){let a=Math.min(Math.max(e,1),o);this.currentPage=a,this.pageStartRow=(a-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 i=e.positionSection+1,o=i>=this.pageStartRow&&i<this.pageStartRow+this.pageSize;e.itemHidden=this.pageSize>0&&!o&&!this.footRows.includes(e),e.lastVisibleRow=i===this.pageStartRow+this.pageSize-1||i===this.bodyRows.length})}async updateSelectedItems(e){let i=this.bodyRows?.filter(o=>o.selected);this._selectedItems=i,this.selectedCount=i?.length,this.allRows?.forEach(o=>{o.selectedRowCount=this.selectedCount,o.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(i=>{e?.rowType==="head"?i.selected=this.selectedCount!==this.bodyRows?.length:i.selected=this.selectionMode==="multiple"||e===i?i.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(t=>g(t))?.length,i=this.localizeNumber(e?.toString()),a=`${this.localizeNumber(this.selectedCount?.toString())} ${this.messages.selected}`,r=`${i} ${this.messages.hiddenSelected}`;return n`<div class=${s(l.selectionArea)}><calcite-chip class=${s({[l.selectionCountChip]:!0,[l.selectionChipActive]:this.selectedCount>0})} .kind=${this.selectedCount>0?"brand":"neutral"} .label=${a} .scale=${this.scale} .value=${a}>${a}</calcite-chip>${e>0&&n`<calcite-chip class=${s(l.selectionOutOfViewChip)} .icon=${I.hideEmpty} .label=${r} .scale=${this.scale} title=${r??x} .value=${r}>${i}</calcite-chip>`||""}${this.selectedCount>0&&n`<calcite-button class=${s(l.dismissButton)} .iconStart=${I.clear} kind=neutral @click=${this.handleDeselectAllRows} round .scale=${this.scale} .title=${`${this.messages.clear} ${a} ${this.messages.row}`}>${this.messages.clear}</calcite-button>`||""}<div class=${s(l.selectionActions)}><slot name=${v.selectionActions}></slot></div></div>`}renderPaginationArea(){return n`<div class=${s(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=${v.tableHeader} ${h(this.tableHeadSlotRef)}></slot></thead>`}renderTBody(){return n`<tbody><slot ${h(this.tableBodySlotRef)}></slot></tbody>`}renderTFoot(){return n`<tfoot><slot name=${v.tableFooter} ${h(this.tableFootSlotRef)}></slot></tfoot>`}render(){return n`<div class=${s(l.container)}>${this.selectionMode!=="none"&&this.selectionDisplay!=="none"&&this.renderSelectionArea()||""}<div class=${s({[l.bordered]:this.bordered,[l.striped]:this.striped,[l.tableContainer]:!0})}><table .ariaColCount=${this.colCount} .ariaMultiSelectable=${this.selectionMode==="multiple"?"true":null} .ariaRowCount=${this.allRows?.length} class=${s({[l.tableFixed]:this.layout==="fixed"})} .role=${this.interactionMode==="interactive"?"grid":"table"} ${h(e=>{e&&T(n`<caption class=${s(l.assistiveText)}>${this.caption}</caption>${this.renderTHead()}${this.renderTBody()}${this.renderTFoot()}`,e)})}></table></div>${this.pageSize>0&&this.renderPaginationArea()||""}</div>`}};k("calcite-table",w);export{w as Table};
3
+ v5.0.0-next.3 */
4
+ import{k as m}from"./I2EB746H.js";import"./L6HFE67F.js";import{a as P}from"./WIJWBGXQ.js";import"./UXWFYSWM.js";import{c as g}from"./JW4SOJWB.js";import"./P2RYGBBZ.js";import{B as b,C as h,D as A,E as s,P as k,g as z,h as n,l as x,m as T,o as p}from"./ALOAVLGK.js";function L(){return navigator.userAgentData}function N(){if(!1)return"";let f=L();return f?.brands?f.brands.map(({brand:e,version:i})=>`${e}/${i}`).join(" "):navigator.userAgent}var l={bordered:"bordered",striped:"striped",selectionArea:"selection-area",paginationArea:"pagination-area",container:"container",tableContainer:"table-container",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"},v={selectionActions:"selection-actions",tableHeader:"table-header",tableFooter:"table-footer"},I={hideEmpty:"hide-empty",clear:"x"},D=z`@charset "UTF-8";:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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([scale=l]){--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{display:flex}.container{display:flex;flex-direction:column;inline-size:var(--calcite-container-size-content-fluid);block-size:var(--calcite-container-size-content-fluid)}.table-container{overflow:auto;white-space:nowrap;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))}.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:collapse;overflow-x:scroll;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;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}`,w=class extends A{constructor(){super(),this.paginationRef=b(),this.tableBodySlotRef=b(),this.tableFootSlotRef=b(),this.tableHeadSlotRef=b(),this.messages=P({blocking:!0}),this.colCount=0,this.pageStartRow=1,this.selectedCount=0,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.calciteInternalTableRowFocusChange=p({cancelable:!1}),this.calciteTablePageChange=p({cancelable:!1}),this.calciteTableSelect=p({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}],_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}]}}static{this.styles=D}get selectedItems(){return this._selectedItems}async load(){this.readCellContentsToAT=/safari/i.test(N()),this.listenOn(this.el.shadowRoot,"slotchange",this.handleSlotChange)}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()}handleSlotChange(){this.updateRows()}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 i=e.detail.cellPosition,o=e.detail.rowPosition,a=e.detail.destination,r=e.detail.lastCell,t=this.bodyRows?.filter(u=>!g(u)),c=this.allRows?.filter(u=>!g(u)),S=this.headRows[this.headRows.length-1]?.positionAll,R=t[0]?.positionAll,y=t[t.length-1]?.positionAll,$=this.footRows[0]?.positionAll,M=c[c.length-1]?.positionAll,F=a==="next"&&o===S,O=a==="previous"&&o===$,E=a==="previous"&&o===R,B=a==="next"&&o===y,d;switch(a){case"first":d=0;break;case"last":d=M;break;case"next":d=F?R:B?$:o+1;break;case"previous":d=O?y:E?S:o-1;break}let C=this.allRows?.find(u=>u.positionAll===d)?.cellCount,H=i>C?C:i;d!==void 0&&this.calciteInternalTableRowFocusChange.emit({cellPosition:H,rowPosition:d,destination:a,lastCell:r})}getSlottedRows(e){return e?.assignedElements({flatten:!0})?.filter(i=>i?.matches("calcite-table-row"))}updateRows(){let e=this.getSlottedRows(this.tableHeadSlotRef.value)||[],i=this.getSlottedRows(this.tableBodySlotRef.value)||[],o=this.getSlottedRows(this.tableFootSlotRef.value)||[],a=[...e,...i,...o];e?.forEach(t=>{let c=e?.indexOf(t);t.rowType="head",t.positionSection=c,t.positionSectionLocalized=this.localizeNumber((c+1).toString())}),i?.forEach(t=>{let c=i?.indexOf(t);t.rowType="body",t.positionSection=c,t.positionSectionLocalized=this.localizeNumber((c+1).toString())}),o?.forEach(t=>{let c=o?.indexOf(t);t.rowType="foot",t.positionSection=c,t.positionSectionLocalized=this.localizeNumber((c+1).toString())}),a?.forEach(t=>{t.interactionMode=this.interactionMode,t.selectionMode=this.selectionMode,t.bodyRowCount=i?.length,t.positionAll=a?.indexOf(t),t.numbered=this.numbered,t.scale=this.scale,t.readCellContentsToAT=this.readCellContentsToAT,t.lastVisibleRow=a?.indexOf(t)===a.length-1});let r=e[0]?.cellCount||e[0]?.querySelectorAll("calcite-table-header")?.length;this.colCount=r,this.headRows=e,this.bodyRows=i,this.footRows=o,this.allRows=a,this.handleCurrentPageRange(),this.updateSelectedItems()}handleCurrentPageRange(){let e=this.currentPage,i=this.bodyRows?.length||0,o=this.pageSize>0?Math.ceil(i/this.pageSize):1;if(o>0){let a=Math.min(Math.max(e,1),o);this.currentPage=a,this.pageStartRow=(a-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 i=e.positionSection+1,o=i>=this.pageStartRow&&i<this.pageStartRow+this.pageSize;e.itemHidden=this.pageSize>0&&!o&&!this.footRows.includes(e),e.lastVisibleRow=i===this.pageStartRow+this.pageSize-1||i===this.bodyRows.length})}async updateSelectedItems(e){let i=this.bodyRows?.filter(o=>o.selected);this._selectedItems=i,this.selectedCount=i?.length,this.allRows?.forEach(o=>{o.selectedRowCount=this.selectedCount,o.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(i=>{e?.rowType==="head"?i.selected=this.selectedCount!==this.bodyRows?.length:i.selected=this.selectionMode==="multiple"||e===i?i.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(t=>g(t))?.length,i=this.localizeNumber(e?.toString()),a=`${this.localizeNumber(this.selectedCount?.toString())} ${this.messages.selected}`,r=`${i} ${this.messages.hiddenSelected}`;return n`<div class=${s(l.selectionArea)}><calcite-chip class=${s({[l.selectionCountChip]:!0,[l.selectionChipActive]:this.selectedCount>0})} .kind=${this.selectedCount>0?"brand":"neutral"} .label=${a} .scale=${this.scale} .value=${a}>${a}</calcite-chip>${e>0&&n`<calcite-chip class=${s(l.selectionOutOfViewChip)} .icon=${I.hideEmpty} .label=${r} .scale=${this.scale} title=${r??x} .value=${r}>${i}</calcite-chip>`||""}${this.selectedCount>0&&n`<calcite-button class=${s(l.dismissButton)} .iconStart=${I.clear} kind=neutral @click=${this.handleDeselectAllRows} round .scale=${this.scale} .title=${`${this.messages.clear} ${a} ${this.messages.row}`}>${this.messages.clear}</calcite-button>`||""}<div class=${s(l.selectionActions)}><slot name=${v.selectionActions}></slot></div></div>`}renderPaginationArea(){return n`<div class=${s(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=${v.tableHeader} ${h(this.tableHeadSlotRef)}></slot></thead>`}renderTBody(){return n`<tbody><slot ${h(this.tableBodySlotRef)}></slot></tbody>`}renderTFoot(){return n`<tfoot><slot name=${v.tableFooter} ${h(this.tableFootSlotRef)}></slot></tfoot>`}render(){return n`<div class=${s(l.container)}>${this.selectionMode!=="none"&&this.selectionDisplay!=="none"&&this.renderSelectionArea()||""}<div class=${s({[l.bordered]:this.bordered,[l.striped]:this.striped,[l.tableContainer]:!0})}><table .ariaColCount=${this.colCount} .ariaMultiSelectable=${this.selectionMode==="multiple"?"true":null} .ariaRowCount=${this.allRows?.length} class=${s({[l.tableFixed]:this.layout==="fixed"})} .role=${this.interactionMode==="interactive"?"grid":"table"} ${h(e=>{e&&T(n`<caption class=${s(l.assistiveText)}>${this.caption}</caption>${this.renderTHead()}${this.renderTBody()}${this.renderTFoot()}`,e)})}></table></div>${this.pageSize>0&&this.renderPaginationArea()||""}</div>`}};k("calcite-table",w);export{w as Table};