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

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 (181) hide show
  1. package/dist/calcite/{VBT5FAGS.js → 2GG4AF5T.js} +1 -1
  2. package/dist/calcite/{LSTKQGBO.js → 2HKRJLBG.js} +2 -2
  3. package/dist/calcite/{MEERCHNE.js → 2IWOXJH7.js} +2 -2
  4. package/dist/calcite/{RQU4NRTA.js → 2KH3AUCG.js} +2 -2
  5. package/dist/calcite/{KIGAOJGV.js → 2VKJIYLT.js} +1 -1
  6. package/dist/calcite/{KZSABN6Z.js → 2YBCAJSV.js} +2 -2
  7. package/dist/calcite/{QDR7A47F.js → 3266GV6Z.js} +2 -2
  8. package/dist/calcite/{FQH6NA2N.js → 3HXEF55M.js} +2 -2
  9. package/dist/calcite/{J3FSCDUX.js → 3KUVOQAL.js} +2 -2
  10. package/dist/calcite/{AYEIZT5Y.js → 3NOZ7M75.js} +2 -2
  11. package/dist/calcite/{JW4SOJWB.js → 3YZG7MA3.js} +2 -2
  12. package/dist/calcite/{GPIMJEMU.js → 45F6XOYY.js} +2 -2
  13. package/dist/calcite/{SKKSLFHT.js → 4ARTWEEZ.js} +2 -2
  14. package/dist/calcite/4GHB4NY4.js +4 -0
  15. package/dist/calcite/{2FBU6T3T.js → 4JZMONLD.js} +2 -2
  16. package/dist/calcite/{2OBK2KGK.js → 5AL5GWRD.js} +2 -2
  17. package/dist/calcite/{SLICSH62.js → 5IPJANUU.js} +2 -2
  18. package/dist/calcite/{SN7NAXJ7.js → 5K2Z2TMW.js} +2 -2
  19. package/dist/calcite/{CNF3Q4TX.js → 5LAPR75M.js} +2 -2
  20. package/dist/calcite/{BGDALDXM.js → 62OUMNJ6.js} +2 -2
  21. package/dist/calcite/{XXYGNCPD.js → 67HVFNHP.js} +2 -2
  22. package/dist/calcite/{HXDER6NO.js → 6J5W2PAJ.js} +2 -2
  23. package/dist/calcite/{S5TFXGHY.js → 6VPACZP5.js} +2 -2
  24. package/dist/calcite/{VGOGYBOG.js → 6VQ5IL36.js} +2 -2
  25. package/dist/calcite/{6RQZN7N2.js → 73LRFHS4.js} +2 -2
  26. package/dist/calcite/{JXRRZQUL.js → 7DTG5KDL.js} +2 -2
  27. package/dist/calcite/{OT4HMOKY.js → 7IHVHMIY.js} +2 -2
  28. package/dist/calcite/{MIR3A75I.js → 7IYAKB7Q.js} +2 -2
  29. package/dist/calcite/{GT3B6N5Y.js → 7NUC3WBG.js} +1 -1
  30. package/dist/calcite/{PSYXUHRF.js → 7PFVW4JF.js} +1 -1
  31. package/dist/calcite/{WRVSFB7L.js → 7QP5BUGE.js} +2 -2
  32. package/dist/calcite/{FXAVGIBO.js → 7XJU5OTS.js} +2 -2
  33. package/dist/calcite/{35QUJIVR.js → 7ZNR3GNI.js} +2 -2
  34. package/dist/calcite/{6BL35Y24.js → A4CO6B7Z.js} +2 -2
  35. package/dist/calcite/{OBEAWB6Y.js → AHOXXRX5.js} +2 -2
  36. package/dist/calcite/{RSQ6RL3K.js → ALDDSDTX.js} +1 -1
  37. package/dist/calcite/{DY2XHFEN.js → APIFFM3O.js} +2 -2
  38. package/dist/calcite/{PO2U44AW.js → AQ4DKRX6.js} +2 -2
  39. package/dist/calcite/{BCBU5ZR6.js → AUF6YLAM.js} +2 -2
  40. package/dist/calcite/{ALOAVLGK.js → AUIOWPFN.js} +2 -2
  41. package/dist/calcite/{UXWFYSWM.js → B5JXPZDV.js} +2 -2
  42. package/dist/calcite/{6RMUSGEC.js → BE5OB2TH.js} +2 -2
  43. package/dist/calcite/{UTGJTZUE.js → BEUZYBM5.js} +3 -3
  44. package/dist/calcite/{WWH2YWKG.js → BFINWHLX.js} +2 -2
  45. package/dist/calcite/{KGALTIIM.js → BHBYSC5H.js} +2 -2
  46. package/dist/calcite/{S5R35RX3.js → BHU252WA.js} +2 -2
  47. package/dist/calcite/{6UGLHCRO.js → BNKVQYLQ.js} +2 -2
  48. package/dist/calcite/{JDVZQ6HH.js → BYZPKQRD.js} +2 -2
  49. package/dist/calcite/{EWPZP6OD.js → C2X6VADY.js} +2 -2
  50. package/dist/calcite/{XYJQXYRM.js → C3BQ4W7K.js} +2 -2
  51. package/dist/calcite/{QP5GAAB3.js → C4S2BOWK.js} +2 -2
  52. package/dist/calcite/{BVHWNNF7.js → CF6DTFNX.js} +2 -2
  53. package/dist/calcite/{P2RYGBBZ.js → CIU4VM7X.js} +2 -2
  54. package/dist/calcite/{WVP5XPLP.js → CJWGQETT.js} +2 -2
  55. package/dist/calcite/{YG7PWF3G.js → CQMVTE7J.js} +2 -2
  56. package/dist/calcite/{VFZYB7KV.js → CTLGVBKW.js} +2 -2
  57. package/dist/calcite/{QTBEVUXO.js → CUL3VHSD.js} +2 -2
  58. package/dist/calcite/{I2EB746H.js → CVLFEMH2.js} +2 -2
  59. package/dist/calcite/{2U5DG73Y.js → DDW4WTS2.js} +2 -2
  60. package/dist/calcite/{GTQBX3SK.js → DDXY7TRY.js} +2 -2
  61. package/dist/calcite/{57WVJI5D.js → DJVVGNTK.js} +1 -1
  62. package/dist/calcite/{777CURPL.js → DOH3ZW2R.js} +2 -2
  63. package/dist/calcite/{ICWMT556.js → DONAES6Q.js} +2 -2
  64. package/dist/calcite/{52U5HSRZ.js → DSEMLW7Z.js} +2 -2
  65. package/dist/calcite/{4IBSL24S.js → DZWPXJWV.js} +2 -2
  66. package/dist/calcite/{ZN5NGGVV.js → F6EDNLSI.js} +2 -2
  67. package/dist/calcite/{3GUK3G7C.js → FZIUTVKD.js} +1 -1
  68. package/dist/calcite/{XRAT3TME.js → GE7SQF7S.js} +2 -2
  69. package/dist/calcite/{ZTZGAKAG.js → GUT2GKDG.js} +2 -2
  70. package/dist/calcite/{XAUVURWR.js → H2FWQITV.js} +1 -1
  71. package/dist/calcite/{QX6ZGXUA.js → H5ANNFJC.js} +2 -2
  72. package/dist/calcite/{WTV3W5WN.js → H5DKF7F3.js} +2 -2
  73. package/dist/calcite/{KMS2JCWI.js → HBHSBTMM.js} +1 -1
  74. package/dist/calcite/{WWKRJ5BW.js → HT5KXL4J.js} +2 -2
  75. package/dist/calcite/{5E23KXQW.js → HU4SHWE7.js} +2 -2
  76. package/dist/calcite/{K6F4PVVD.js → HVF3RXXI.js} +2 -2
  77. package/dist/calcite/{34B5K3VC.js → HXGFAPCM.js} +2 -2
  78. package/dist/calcite/{CSBYILHE.js → I53JH7YD.js} +2 -2
  79. package/dist/calcite/{DQJ4CTWW.js → IEL7YV5C.js} +2 -2
  80. package/dist/calcite/{XWOGKL32.js → IHEW664E.js} +2 -2
  81. package/dist/calcite/{HZVXI5VT.js → IKDSO2OB.js} +2 -2
  82. package/dist/calcite/{P5PS2PVQ.js → JJWGSKGI.js} +2 -2
  83. package/dist/calcite/{ANAWJ75J.js → K3AHNZL7.js} +2 -2
  84. package/dist/calcite/{YT4SL4T4.js → K5GJLIBR.js} +2 -2
  85. package/dist/calcite/{VAG4CLRN.js → KH3UKQ2D.js} +2 -2
  86. package/dist/calcite/{E2ETQPML.js → KRHM7ACI.js} +2 -2
  87. package/dist/calcite/{BHCRRG5K.js → KT4EQWT6.js} +2 -2
  88. package/dist/calcite/{WIJWBGXQ.js → LH7245HX.js} +2 -2
  89. package/dist/calcite/{KNTW4634.js → LJI5SYGA.js} +1 -1
  90. package/dist/calcite/{4BE5CM4R.js → LQ3URZCB.js} +2 -2
  91. package/dist/calcite/{LT2NMLTM.js → LRKWQ3C3.js} +2 -2
  92. package/dist/calcite/{YANBAVXH.js → LROCCBRV.js} +2 -2
  93. package/dist/calcite/{X3IVLT67.js → LYDOM6VQ.js} +2 -2
  94. package/dist/calcite/{HJBVI5HP.js → MEFMO7UB.js} +2 -2
  95. package/dist/calcite/{BE4UHKT6.js → MP3OWQ2A.js} +2 -2
  96. package/dist/calcite/{TKNM6PGC.js → MVLJJOH2.js} +2 -2
  97. package/dist/calcite/{XXNZUORE.js → N5MSFOLW.js} +2 -2
  98. package/dist/calcite/{425YTQUT.js → N7OO7R2S.js} +2 -2
  99. package/dist/calcite/{UA4KBTNZ.js → NID6WJOW.js} +2 -2
  100. package/dist/calcite/{EFEUKCWA.js → NLYYOFNV.js} +1 -1
  101. package/dist/calcite/{IVEARGFQ.js → NQJMDHT5.js} +2 -2
  102. package/dist/calcite/{EU6IVBMM.js → NSBK36H4.js} +2 -2
  103. package/dist/calcite/{PBJYTCZQ.js → NU57UAAO.js} +1 -1
  104. package/dist/calcite/{7WAFUV2T.js → NULQJBCW.js} +2 -2
  105. package/dist/calcite/{PDC2HFCE.js → OCT7LR2O.js} +1 -1
  106. package/dist/calcite/{UCRIU7RD.js → OFZACK2Y.js} +2 -2
  107. package/dist/calcite/{KEKHXXG2.js → OMKDUGKV.js} +2 -2
  108. package/dist/calcite/{FJ6DIGL4.js → PFDLGOVS.js} +2 -2
  109. package/dist/calcite/{4T2MXJFD.js → PFKUB7JD.js} +2 -2
  110. package/dist/calcite/{5MVGEBA4.js → PJOGMC7F.js} +2 -2
  111. package/dist/calcite/{WRHL43TZ.js → PLD7OLLJ.js} +2 -2
  112. package/dist/calcite/{3QKRHYDR.js → PSCEW76J.js} +2 -2
  113. package/dist/calcite/{WJT34A4V.js → PSNA5FAF.js} +2 -2
  114. package/dist/calcite/{E22QVECL.js → PU5TGCQG.js} +2 -2
  115. package/dist/calcite/{N4VKIVPS.js → PVL2DQVP.js} +2 -2
  116. package/dist/calcite/{5MCNWZT7.js → PZL4QWV5.js} +2 -2
  117. package/dist/calcite/{NL3LLRLQ.js → Q23OEAP2.js} +2 -2
  118. package/dist/calcite/{D2QA5PI3.js → Q2GRCTSJ.js} +2 -2
  119. package/dist/calcite/{YTEVYZWQ.js → Q3MUDXRY.js} +2 -2
  120. package/dist/calcite/{EH4IJP5H.js → QF6F6CY3.js} +2 -2
  121. package/dist/calcite/{WWUSLEON.js → QFT74HW3.js} +2 -2
  122. package/dist/calcite/{C47YSH7C.js → R73QB7MJ.js} +2 -2
  123. package/dist/calcite/{N5LX4COS.js → RFALVOKT.js} +2 -2
  124. package/dist/calcite/{IWU3WQTA.js → RI3NRBMI.js} +2 -2
  125. package/dist/calcite/{PAKKXMW6.js → RND3V33U.js} +1 -1
  126. package/dist/calcite/{K6E5LSS6.js → ROWPIQLT.js} +2 -2
  127. package/dist/calcite/{6CFV5RKV.js → RRP2E2T3.js} +2 -2
  128. package/dist/calcite/{L6HFE67F.js → S5CLKCGJ.js} +1 -1
  129. package/dist/calcite/{7CSKQBJD.js → SGJU36YV.js} +2 -2
  130. package/dist/calcite/{KUUFM5EV.js → SMRCCHJE.js} +2 -2
  131. package/dist/calcite/{RQFHIC47.js → SXB76NOR.js} +2 -2
  132. package/dist/calcite/{ZLSS7CXL.js → SZWYWOXZ.js} +2 -2
  133. package/dist/calcite/{KXG3JNXH.js → T6Y6ZTWW.js} +2 -2
  134. package/dist/calcite/{6HTHE64W.js → U3KRKTQY.js} +2 -2
  135. package/dist/calcite/{ZMYI2UVC.js → UGI3YWJM.js} +2 -2
  136. package/dist/calcite/{AEYCEODJ.js → UN7GLLXI.js} +2 -2
  137. package/dist/calcite/{2QSQXOI5.js → UNJRBV2R.js} +2 -2
  138. package/dist/calcite/{6J3DGER2.js → UOZDXXIF.js} +2 -2
  139. package/dist/calcite/{XO5ETFTI.js → V3ZR6RFK.js} +1 -1
  140. package/dist/calcite/{HXF4YIAH.js → V4NPQ4WA.js} +2 -2
  141. package/dist/calcite/{JEZYPF4D.js → VBRBI7IU.js} +2 -2
  142. package/dist/calcite/{NHJ736R2.js → VIWDW2WZ.js} +2 -2
  143. package/dist/calcite/{DLM7KEK5.js → VKRWRFEJ.js} +2 -2
  144. package/dist/calcite/{PX5VW7CA.js → VMWAAH5B.js} +2 -2
  145. package/dist/calcite/{TG4OK7FQ.js → VQMSSO2U.js} +2 -2
  146. package/dist/calcite/{VQT3LLC7.js → VYFT5EAY.js} +1 -1
  147. package/dist/calcite/{FPD3KMKK.js → W5OJOVZY.js} +1 -1
  148. package/dist/calcite/{WLATCKTT.js → W6EWFSR3.js} +2 -2
  149. package/dist/calcite/{43SYTK5U.js → W72YZH73.js} +2 -2
  150. package/dist/calcite/{YPBCS4NA.js → WBGRGCXR.js} +2 -2
  151. package/dist/calcite/{XWXCOJUO.js → WOTQIMPZ.js} +2 -2
  152. package/dist/calcite/{NHUHCQ4J.js → WPTOKN7K.js} +1 -1
  153. package/dist/calcite/{P2MLMFIB.js → WTY55PPZ.js} +2 -2
  154. package/dist/calcite/{R7GSVJN5.js → WWJXVV6U.js} +2 -2
  155. package/dist/calcite/{2IUZ3YR2.js → X374PRV7.js} +2 -2
  156. package/dist/calcite/{BSQIX4WQ.js → XNFJXDQ6.js} +2 -2
  157. package/dist/calcite/{HS3YVIY4.js → XNLWKJLM.js} +2 -2
  158. package/dist/calcite/{MBIDNSLG.js → XRSYDXWZ.js} +1 -1
  159. package/dist/calcite/{QSCN7J3O.js → XZTRPLLK.js} +2 -2
  160. package/dist/calcite/{RWVRFF3I.js → Y3HXK6MO.js} +2 -2
  161. package/dist/calcite/{OPTERABQ.js → Y442PVMQ.js} +2 -2
  162. package/dist/calcite/{A7PQJDZZ.js → YCLOS6NX.js} +2 -2
  163. package/dist/calcite/{2526AKXE.js → YSBWKH76.js} +1 -1
  164. package/dist/calcite/{7STMP4B2.js → YSP6WWQB.js} +1 -1
  165. package/dist/calcite/{U235MJ2F.js → YV7DKMEQ.js} +2 -2
  166. package/dist/calcite/{OWE3TUYA.js → ZAQTILTS.js} +2 -2
  167. package/dist/calcite/{DNM3U3Z7.js → ZLR2B6GQ.js} +1 -1
  168. package/dist/calcite/{ZCDYIKPL.js → ZSMNT5VS.js} +2 -2
  169. package/dist/calcite/{3DRRZPK3.js → ZTOBC3PN.js} +2 -2
  170. package/dist/calcite/{PHQB3YSI.js → ZV7YL7QG.js} +2 -2
  171. package/dist/calcite/{5JALWDSF.js → ZVWKN3G7.js} +2 -2
  172. package/dist/calcite/{4AHB62J2.js → ZZGPQLEW.js} +2 -2
  173. package/dist/calcite/calcite.esm.js +2 -2
  174. package/dist/chunks/runtime.js +4 -4
  175. package/dist/chunks/useFocusTrap.js +2 -1
  176. package/dist/components/calcite-block/customElement.js +1 -1
  177. package/dist/docs/api.json +1 -1
  178. package/dist/docs/docs.json +1 -1
  179. package/dist/docs/web-types.json +1 -1
  180. package/package.json +2 -2
  181. package/dist/calcite/HGI7ZMWJ.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.3 */
4
- import{k as l}from"./I2EB746H.js";import{a as x,b as z}from"./EU6IVBMM.js";import"./L6HFE67F.js";import{a as y}from"./WIJWBGXQ.js";import{a as f}from"./XWXCOJUO.js";import"./UXWFYSWM.js";import{c as g}from"./JW4SOJWB.js";import"./P2RYGBBZ.js";import{r as v}from"./SLICSH62.js";import"./DNM3U3Z7.js";import{B as d,C as h,D as m,E as t,H as u,P as b,g as n,h as i,l as p,o}from"./ALOAVLGK.js";var r={container:"container",hasSlottedContent:"has-slotted-content",stepperItemContent:"stepper-item-content",stepperItemDescription:"stepper-item-description",stepperItemHeader:"stepper-item-header",stepperItemHeading:"stepper-item-heading",stepperItemHeaderText:"stepper-item-header-text",stepperItemIcon:"stepper-item-icon",stepperItemNumber:"stepper-item-number",visuallyHidden:"visually-hidden"},a={circle:"circle",circleF:"circleF",exclamationMarkCircleF:"exclamationMarkCircleF",checkCircleF:"checkCircleF"},I=n`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]),:host([layout=horizontal][disabled]) .stepper-item-header,:host([layout=horizontal-single][disabled]) .stepper-item-header{cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([layout=horizontal][disabled]) .stepper-item-header *,:host([layout=horizontal-single][disabled]) .stepper-item-header *,:host([disabled]) ::slotted(*),:host([layout=horizontal][disabled]) .stepper-item-header ::slotted(*),:host([layout=horizontal-single][disabled]) .stepper-item-header ::slotted(*){pointer-events:none}:host([scale=s]){--calcite-internal-stepper-item-spacing-unit-s: .25rem;--calcite-internal-stepper-item-spacing-unit-m: .75rem;--calcite-internal-stepper-item-spacing-unit-l: 1rem;--calcite-internal-stepper-action-inline-size: 2rem;font-size:var(--calcite-font-size--1);line-height:1rem;margin-inline-end:.25rem}:host([scale=s]) .stepper-item-description{font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]){--calcite-internal-stepper-item-spacing-unit-s: .5rem;--calcite-internal-stepper-item-spacing-unit-m: 1rem;--calcite-internal-stepper-item-spacing-unit-l: 1.25rem;--calcite-internal-stepper-action-inline-size: 2.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;margin-inline-end:.5rem}:host([scale=m]) .stepper-item-description{font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]){--calcite-internal-stepper-item-spacing-unit-s: .75rem;--calcite-internal-stepper-item-spacing-unit-m: 1.25rem;--calcite-internal-stepper-item-spacing-unit-l: 1.5rem;--calcite-internal-stepper-action-inline-size: 3rem;font-size:var(--calcite-font-size-1);line-height:1.5rem;margin-inline-end:.75rem}:host([scale=l]) .stepper-item-description{font-size:var(--calcite-font-size-0);line-height:1.25rem}:host{position:relative;display:flex;flex-grow:1;flex-direction:column;align-self:flex-start;margin-block-end:var(--calcite-stepper-bar-gap, var(--calcite-internal-stepper-item-spacing-unit-s))}:host .container{position:relative;display:flex;flex-grow:1;cursor:pointer;flex-direction:column;border-width:0px;border-block-start-width:2px;border-style:solid;border-color:var(--calcite-color-border-3);color:var(--calcite-color-text-3);text-decoration-line:none;outline:2px solid transparent;outline-offset:2px}:host .container:active{background-color:var(--calcite-stepper-item-background-color-press, var(--calcite-color-foreground-3))}:host{outline-color:transparent}:host(: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))))}:host .stepper-item-header{display:flex;cursor:pointer;align-items:flex-start}:host .stepper-item-header:active{background-color:var(--calcite-stepper-item-background-color-press, var(--calcite-color-foreground-3))}:host .stepper-item-content,:host .stepper-item-header{padding-block:var(--calcite-internal-stepper-item-spacing-unit-l);padding-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);text-align:start}:host .stepper-item-header *{display:inline-flex;align-items:center}:host .stepper-item-content{display:none;inline-size:100%;flex-direction:column;font-size:var(--calcite-font-size--2);line-height:1.375}:host .stepper-item-icon{margin-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);margin-block-start:1px;display:inline-flex;block-size:.75rem;flex-shrink:0;align-self:flex-start;color:var(--calcite-stepper-item-icon-color, var(--calcite-color-border-input))}:host([complete]) .stepper-item-icon{opacity:var(--calcite-opacity-disabled)}:host .stepper-item-header-text{flex-direction:column;text-align:initial;margin-inline-end:auto}:host .stepper-item-heading,:host .stepper-item-description{display:flex;inline-size:100%}:host .stepper-item-heading{margin-block-end:.25rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-stepper-item-header-text-color, var(--calcite-color-text-2))}:host .stepper-item-description{color:var(--calcite-stepper-item-description-text-color, var(--calcite-color-text-3))}:host .stepper-item-number{font-weight:var(--calcite-font-weight-medium);margin-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);color:var(--calcite-stepper-item-description-text-color, var(--calcite-color-text-3))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([complete]) .container{border-color:#007ac280}:host([complete]) .container .stepper-item-icon{color:var(--calcite-stepper-item-complete-icon-color, var(--calcite-color-brand))}:host([error]) .container{border-block-start-color:var(--calcite-color-status-danger)}:host([error]) .container .stepper-item-number{color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([error]) .container .stepper-item-icon{opacity:1;color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host(:hover:not([disabled]):not([selected])) .container,:host(:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-color-brand)}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-heading,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-heading{color:var(--calcite-stepper-item-header-text-color-hover, var(--calcite-color-text-1))}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-description,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-description{color:var(--calcite-stepper-item-description-text-color-hover, var(--calcite-color-text-2))}:host([error]:hover:not([disabled]):not([selected])) .container,:host([error]:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-color-status-danger-hover)}:host([selected]) .container{border-block-start-color:var(--calcite-color-brand)}:host([selected]) .container .stepper-item-heading{color:var(--calcite-stepper-item-selected-header-text-color, var(--calcite-color-text-1))}:host([selected]) .container .stepper-item-description{color:var(--calcite-stepper-item-description-text-color-hover, var(--calcite-color-text-2))}:host([selected]) .container .stepper-item-number{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-brand))}:host([selected]) .container .stepper-item-icon{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-brand));opacity:1}:host([selected]) .container .stepper-item-content{display:flex}:host([layout=vertical]){inline-size:100%}:host([layout=vertical]) .container{margin-inline:0px;margin-block-start:0px;flex:1 1 auto;border-block-start-width:0px;border-style:solid;padding-block:0px;border-inline-start-width:2px;padding-inline-start:var(--calcite-internal-stepper-item-spacing-unit-l);border-color:var(--calcite-stepper-bar-fill-color, var(--calcite-color-border-2))}:host([layout=vertical]) .container .stepper-item-icon{order:3;margin-block:1px 0px;padding-inline-start:var(--calcite-internal-stepper-item-spacing-unit-s);margin-inline-start:auto}:host([layout=vertical]) .container .stepper-item-header{padding-inline-end:0px}:host([layout=vertical]) .container .stepper-item-content{padding:0}:host([layout=vertical][complete]) .container{border-color:var(--calcite-stepper-bar-complete-fill-color, rgba(0, 122, 194, .5))}:host([layout=vertical][complete]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][complete]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-complete-fill-color-hover, var(--calcite-color-brand))}:host([layout=vertical][error]) .container{border-color:var(--calcite-stepper-bar-error-fill-color, var(--calcite-color-status-danger))}:host([layout=vertical][selected]) .container{border-color:var(--calcite-stepper-bar-selected-fill-color, var(--calcite-color-brand))}:host([layout=vertical][selected]) .container .stepper-item-content.has-slotted-content{margin-block-end:var(--calcite-internal-stepper-item-spacing-unit-l)}:host([layout=vertical]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-fill-color-hover, rgba(0, 122, 194, .5))}:host([layout=vertical][error]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][error]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-error-fill-color-hover, var(--calcite-color-status-danger-hover))}:host([layout=horizontal]),:host([layout=horizontal-single]){display:contents}:host([layout=horizontal]) .container,:host([layout=horizontal-single]) .container{display:contents}:host([layout=horizontal]) .stepper-item-header,:host([layout=horizontal-single]) .stepper-item-header{border-width:0px;border-block-start-width:2px;border-style:solid;outline-color:transparent;grid-row:items;border-color:var(--calcite-stepper-bar-fill-color, var(--calcite-color-border-2))}:host([layout=horizontal]) .stepper-item-header:focus,:host([layout=horizontal-single]) .stepper-item-header: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))))}:host([layout=horizontal]) .stepper-item-content,:host([layout=horizontal-single]) .stepper-item-content{cursor:auto;transition-timing-function:cubic-bezier(.4,0,.2,1);padding-block:0;padding-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);text-align:start}:host([layout=horizontal-single]) .stepper-item-header{grid-area:1/1/1/-1}:host([layout=horizontal]) .stepper-item-content,:host([layout=horizontal-single]) .stepper-item-content{grid-area:2/1/2/-1}:host([layout=horizontal][complete]) .stepper-item-header,:host([layout=horizontal-single][complete]) .stepper-item-header{border-color:var(--calcite-stepper-bar-complete-fill-color, rgba(0, 122, 194, .5))}:host([layout=horizontal][complete]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][complete]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][complete]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][complete]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-complete-fill-color-hover, var(--calcite-color-brand))}:host([layout=horizontal][error]) .stepper-item-header,:host([layout=horizontal-single][error]) .stepper-item-header{border-color:var(--calcite-stepper-bar-error-fill-color, var(--calcite-color-status-danger))}:host([layout=horizontal][selected]) .stepper-item-header,:host([layout=horizontal-single][selected]) .stepper-item-header{border-color:var(--calcite-stepper-bar-selected-fill-color, var(--calcite-color-brand))}:host([layout=horizontal]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-fill-color-hover, rgba(0, 122, 194, .5))}:host([layout=horizontal][error]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][error]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][error]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][error]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-error-fill-color-hover, var(--calcite-color-status-danger-hover))}@media(forced-colors:active){:host .container{outline-width:0;outline-offset:0}:host(:focus),:host(:focus-visible){outline-color:canvasText}:host([selected]) .container{border-block-start-color:highlight}:host([selected]) .container .stepper-item-number{color:highlight}:host([selected]) .container .stepper-item-icon{color:highlight}:host([layout=vertical][selected]) .container{border-color:highlight}}:host([layout=horizontal-single]) .stepper-item-header{margin-inline-end:0px;box-sizing:border-box;border-style:none;inline-size:100%;padding-inline:calc(var(--calcite-internal-stepper-action-inline-size) + .5rem)}:host([layout=horizontal-single][error]) .container .stepper-item-number{color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([layout=horizontal-single][error]) .container .stepper-item-icon{opacity:1;color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([layout=horizontal-single][error][selected]),:host([layout=horizontal-single][complete][selected]) .container{color:var(--calcite-color-text-3)}:host([layout=horizontal-single][error][selected]) .stepper-item-heading,:host([layout=horizontal-single][complete][selected]) .container .stepper-item-heading{color:var(--calcite-stepper-item-header-text-color, var(--calcite-color-text-2))}:host([layout=horizontal-single][complete][selected]) .container .stepper-item-icon{opacity:var(--calcite-opacity-disabled)}:host([layout=horizontal-single][complete][selected]) .container .stepper-item-number{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-text-3))}.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}:host([hidden]){display:none}[hidden]{display:none}:host([item-hidden]){display:none}`,c=class extends m{constructor(){super(),this.headerRef=d(),this.messages=y(),this.focusSetter=f()(this),this.complete=!1,this.disabled=!1,this.error=!1,this.icon=!1,this.iconFlipRtl=!1,this.itemHidden=!1,this.numbered=!1,this.scale="m",this.selected=!1,this.calciteInternalStepperItemKeyEvent=o({cancelable:!1}),this.calciteInternalStepperItemRegister=o({cancelable:!1}),this.calciteInternalStepperItemSelect=o({cancelable:!1}),this.calciteStepperItemSelect=o({cancelable:!1}),this.listenOn(document.body,"calciteInternalStepperItemChange",this.updateActiveItemOnChange),this.listen("click",this.handleItemClick),this.listen("keydown",this.keyDownHandler)}static{this.properties={stepperItemHasContent:[16,{},{state:!0}],complete:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],error:[7,{},{reflect:!0,type:Boolean}],heading:1,icon:[5,{},{type:Boolean}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],itemHidden:[7,{},{reflect:!0,type:Boolean}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],numbered:[5,{},{type:Boolean}],numberingSystem:1,scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=I}async setFocus(e){return this.focusSetter(()=>this.layout==="vertical"?this.el:this.headerRef.value,e)}async load(){this.parentStepperEl=this.el.parentElement,this.itemPosition=this.getItemPosition(),this.registerStepperItem(),this.selected&&this.emitRequestedItem()}willUpdate(e){e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.selectedHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.registerStepperItem(),e.has("messages")&&this.effectiveLocaleWatcher(this.messages._lang)}updated(){x(this),u(this.el,"tabindex",this.disabled||this.layout==="horizontal"?null:0)}selectedHandler(){this.selected&&this.emitRequestedItem()}effectiveLocaleWatcher(e){l.numberFormatOptions={locale:e,numberingSystem:this.numberingSystem,useGrouping:!1}}updateActiveItemOnChange(e){(e.target===this.parentStepperEl||e.composedPath().includes(this.parentStepperEl))&&(this.selectedPosition=e.detail.position,this.determineSelectedItem())}keyDownHandler(e){if(!this.disabled&&e.target===this.el)switch(e.key){case" ":case"Enter":this.emitUserRequestedItem(),e.preventDefault();break;case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"Home":case"End":this.calciteInternalStepperItemKeyEvent.emit({item:e}),e.preventDefault();break}}determineSelectedItem(){this.selected=!this.disabled&&this.itemPosition===this.selectedPosition}registerStepperItem(){this.calciteInternalStepperItemRegister.emit({position:this.itemPosition})}handleItemClick(e){this.disabled||g(this.el)||this.layout==="horizontal"&&e.composedPath().some(s=>s.classList?.contains("stepper-item-content"))||this.emitUserRequestedItem()}emitUserRequestedItem(){this.emitRequestedItem(),this.disabled||this.calciteStepperItemSelect.emit()}emitRequestedItem(){if(!this.disabled){let e=this.itemPosition;this.calciteInternalStepperItemSelect.emit({position:e})}}getItemPosition(){return Array.from(this.parentStepperEl?.querySelectorAll("calcite-stepper-item:not([hidden]):not([item-hidden])")).indexOf(this.el)}render(){this.el.ariaCurrent=this.selected?"step":"false";let e=this.layout==="horizontal"&&!this.disabled?0:null;return z({disabled:this.disabled,children:i`<div class=${t(r.container)}>${this.complete&&i`<span aria-live=polite class=${t(r.visuallyHidden)}>${this.messages.complete}</span>`||""}<div class=${t(r.stepperItemHeader)} tabindex=${e??p} ${h(this.headerRef)}>${this.icon?this.renderIcon():null}${this.numbered?i`<div class=${t(r.stepperItemNumber)}>${this.renderNumbers()}.</div>`:null}<div class=${t(r.stepperItemHeaderText)}><span class=${t(r.stepperItemHeading)}>${this.heading}</span><span class=${t(r.stepperItemDescription)}>${this.description}</span></div></div><div class=${t({[r.stepperItemContent]:!0,[r.hasSlottedContent]:this.stepperItemHasContent})}><slot @slotchange=${s=>this.stepperItemHasContent=v(s)}></slot></div></div>`})}renderIcon(){let e=a.circle;return this.selected&&(this.layout!=="horizontal-single"||!this.error&&!this.complete)?e=a.circleF:this.error?e=a.exclamationMarkCircleF:this.complete&&(e=a.checkCircleF),i`<calcite-icon class=${t(r.stepperItemIcon)} .flipRtl=${this.iconFlipRtl} .icon=${e} scale=s></calcite-icon>`}renderNumbers(){return l.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:!1},l.numberFormatter.format(this.itemPosition+1)}};b("calcite-stepper-item",c);export{c as StepperItem};
3
+ v5.0.0-next.5 */
4
+ import{k as l}from"./CVLFEMH2.js";import{a as x,b as z}from"./NSBK36H4.js";import"./S5CLKCGJ.js";import{a as y}from"./LH7245HX.js";import{a as f}from"./WOTQIMPZ.js";import"./B5JXPZDV.js";import{c as g}from"./3YZG7MA3.js";import"./CIU4VM7X.js";import{r as v}from"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{B as d,C as h,D as m,E as t,H as u,P as b,g as n,h as i,l as p,o}from"./AUIOWPFN.js";var r={container:"container",hasSlottedContent:"has-slotted-content",stepperItemContent:"stepper-item-content",stepperItemDescription:"stepper-item-description",stepperItemHeader:"stepper-item-header",stepperItemHeading:"stepper-item-heading",stepperItemHeaderText:"stepper-item-header-text",stepperItemIcon:"stepper-item-icon",stepperItemNumber:"stepper-item-number",visuallyHidden:"visually-hidden"},a={circle:"circle",circleF:"circleF",exclamationMarkCircleF:"exclamationMarkCircleF",checkCircleF:"checkCircleF"},I=n`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]),:host([layout=horizontal][disabled]) .stepper-item-header,:host([layout=horizontal-single][disabled]) .stepper-item-header{cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([layout=horizontal][disabled]) .stepper-item-header *,:host([layout=horizontal-single][disabled]) .stepper-item-header *,:host([disabled]) ::slotted(*),:host([layout=horizontal][disabled]) .stepper-item-header ::slotted(*),:host([layout=horizontal-single][disabled]) .stepper-item-header ::slotted(*){pointer-events:none}:host([scale=s]){--calcite-internal-stepper-item-spacing-unit-s: .25rem;--calcite-internal-stepper-item-spacing-unit-m: .75rem;--calcite-internal-stepper-item-spacing-unit-l: 1rem;--calcite-internal-stepper-action-inline-size: 2rem;font-size:var(--calcite-font-size--1);line-height:1rem;margin-inline-end:.25rem}:host([scale=s]) .stepper-item-description{font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]){--calcite-internal-stepper-item-spacing-unit-s: .5rem;--calcite-internal-stepper-item-spacing-unit-m: 1rem;--calcite-internal-stepper-item-spacing-unit-l: 1.25rem;--calcite-internal-stepper-action-inline-size: 2.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;margin-inline-end:.5rem}:host([scale=m]) .stepper-item-description{font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]){--calcite-internal-stepper-item-spacing-unit-s: .75rem;--calcite-internal-stepper-item-spacing-unit-m: 1.25rem;--calcite-internal-stepper-item-spacing-unit-l: 1.5rem;--calcite-internal-stepper-action-inline-size: 3rem;font-size:var(--calcite-font-size-1);line-height:1.5rem;margin-inline-end:.75rem}:host([scale=l]) .stepper-item-description{font-size:var(--calcite-font-size-0);line-height:1.25rem}:host{position:relative;display:flex;flex-grow:1;flex-direction:column;align-self:flex-start;margin-block-end:var(--calcite-stepper-bar-gap, var(--calcite-internal-stepper-item-spacing-unit-s))}:host .container{position:relative;display:flex;flex-grow:1;cursor:pointer;flex-direction:column;border-width:0px;border-block-start-width:2px;border-style:solid;border-color:var(--calcite-color-border-3);color:var(--calcite-color-text-3);text-decoration-line:none;outline:2px solid transparent;outline-offset:2px}:host .container:active{background-color:var(--calcite-stepper-item-background-color-press, var(--calcite-color-foreground-3))}:host{outline-color:transparent}:host(: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))))}:host .stepper-item-header{display:flex;cursor:pointer;align-items:flex-start}:host .stepper-item-header:active{background-color:var(--calcite-stepper-item-background-color-press, var(--calcite-color-foreground-3))}:host .stepper-item-content,:host .stepper-item-header{padding-block:var(--calcite-internal-stepper-item-spacing-unit-l);padding-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);text-align:start}:host .stepper-item-header *{display:inline-flex;align-items:center}:host .stepper-item-content{display:none;inline-size:100%;flex-direction:column;font-size:var(--calcite-font-size--2);line-height:1.375}:host .stepper-item-icon{margin-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);margin-block-start:1px;display:inline-flex;block-size:.75rem;flex-shrink:0;align-self:flex-start;color:var(--calcite-stepper-item-icon-color, var(--calcite-color-border-input))}:host([complete]) .stepper-item-icon{opacity:var(--calcite-opacity-disabled)}:host .stepper-item-header-text{flex-direction:column;text-align:initial;margin-inline-end:auto}:host .stepper-item-heading,:host .stepper-item-description{display:flex;inline-size:100%}:host .stepper-item-heading{margin-block-end:.25rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-stepper-item-header-text-color, var(--calcite-color-text-2))}:host .stepper-item-description{color:var(--calcite-stepper-item-description-text-color, var(--calcite-color-text-3))}:host .stepper-item-number{font-weight:var(--calcite-font-weight-medium);margin-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);color:var(--calcite-stepper-item-description-text-color, var(--calcite-color-text-3))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([complete]) .container{border-color:#007ac280}:host([complete]) .container .stepper-item-icon{color:var(--calcite-stepper-item-complete-icon-color, var(--calcite-color-brand))}:host([error]) .container{border-block-start-color:var(--calcite-color-status-danger)}:host([error]) .container .stepper-item-number{color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([error]) .container .stepper-item-icon{opacity:1;color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host(:hover:not([disabled]):not([selected])) .container,:host(:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-color-brand)}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-heading,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-heading{color:var(--calcite-stepper-item-header-text-color-hover, var(--calcite-color-text-1))}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-description,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-description{color:var(--calcite-stepper-item-description-text-color-hover, var(--calcite-color-text-2))}:host([error]:hover:not([disabled]):not([selected])) .container,:host([error]:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-color-status-danger-hover)}:host([selected]) .container{border-block-start-color:var(--calcite-color-brand)}:host([selected]) .container .stepper-item-heading{color:var(--calcite-stepper-item-selected-header-text-color, var(--calcite-color-text-1))}:host([selected]) .container .stepper-item-description{color:var(--calcite-stepper-item-description-text-color-hover, var(--calcite-color-text-2))}:host([selected]) .container .stepper-item-number{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-brand))}:host([selected]) .container .stepper-item-icon{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-brand));opacity:1}:host([selected]) .container .stepper-item-content{display:flex}:host([layout=vertical]){inline-size:100%}:host([layout=vertical]) .container{margin-inline:0px;margin-block-start:0px;flex:1 1 auto;border-block-start-width:0px;border-style:solid;padding-block:0px;border-inline-start-width:2px;padding-inline-start:var(--calcite-internal-stepper-item-spacing-unit-l);border-color:var(--calcite-stepper-bar-fill-color, var(--calcite-color-border-2))}:host([layout=vertical]) .container .stepper-item-icon{order:3;margin-block:1px 0px;padding-inline-start:var(--calcite-internal-stepper-item-spacing-unit-s);margin-inline-start:auto}:host([layout=vertical]) .container .stepper-item-header{padding-inline-end:0px}:host([layout=vertical]) .container .stepper-item-content{padding:0}:host([layout=vertical][complete]) .container{border-color:var(--calcite-stepper-bar-complete-fill-color, rgba(0, 122, 194, .5))}:host([layout=vertical][complete]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][complete]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-complete-fill-color-hover, var(--calcite-color-brand))}:host([layout=vertical][error]) .container{border-color:var(--calcite-stepper-bar-error-fill-color, var(--calcite-color-status-danger))}:host([layout=vertical][selected]) .container{border-color:var(--calcite-stepper-bar-selected-fill-color, var(--calcite-color-brand))}:host([layout=vertical][selected]) .container .stepper-item-content.has-slotted-content{margin-block-end:var(--calcite-internal-stepper-item-spacing-unit-l)}:host([layout=vertical]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-fill-color-hover, rgba(0, 122, 194, .5))}:host([layout=vertical][error]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][error]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-error-fill-color-hover, var(--calcite-color-status-danger-hover))}:host([layout=horizontal]),:host([layout=horizontal-single]){display:contents}:host([layout=horizontal]) .container,:host([layout=horizontal-single]) .container{display:contents}:host([layout=horizontal]) .stepper-item-header,:host([layout=horizontal-single]) .stepper-item-header{border-width:0px;border-block-start-width:2px;border-style:solid;outline-color:transparent;grid-row:items;border-color:var(--calcite-stepper-bar-fill-color, var(--calcite-color-border-2))}:host([layout=horizontal]) .stepper-item-header:focus,:host([layout=horizontal-single]) .stepper-item-header: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))))}:host([layout=horizontal]) .stepper-item-content,:host([layout=horizontal-single]) .stepper-item-content{cursor:auto;transition-timing-function:cubic-bezier(.4,0,.2,1);padding-block:0;padding-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);text-align:start}:host([layout=horizontal-single]) .stepper-item-header{grid-area:1/1/1/-1}:host([layout=horizontal]) .stepper-item-content,:host([layout=horizontal-single]) .stepper-item-content{grid-area:2/1/2/-1}:host([layout=horizontal][complete]) .stepper-item-header,:host([layout=horizontal-single][complete]) .stepper-item-header{border-color:var(--calcite-stepper-bar-complete-fill-color, rgba(0, 122, 194, .5))}:host([layout=horizontal][complete]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][complete]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][complete]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][complete]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-complete-fill-color-hover, var(--calcite-color-brand))}:host([layout=horizontal][error]) .stepper-item-header,:host([layout=horizontal-single][error]) .stepper-item-header{border-color:var(--calcite-stepper-bar-error-fill-color, var(--calcite-color-status-danger))}:host([layout=horizontal][selected]) .stepper-item-header,:host([layout=horizontal-single][selected]) .stepper-item-header{border-color:var(--calcite-stepper-bar-selected-fill-color, var(--calcite-color-brand))}:host([layout=horizontal]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-fill-color-hover, rgba(0, 122, 194, .5))}:host([layout=horizontal][error]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][error]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][error]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][error]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-error-fill-color-hover, var(--calcite-color-status-danger-hover))}@media(forced-colors:active){:host .container{outline-width:0;outline-offset:0}:host(:focus),:host(:focus-visible){outline-color:canvasText}:host([selected]) .container{border-block-start-color:highlight}:host([selected]) .container .stepper-item-number{color:highlight}:host([selected]) .container .stepper-item-icon{color:highlight}:host([layout=vertical][selected]) .container{border-color:highlight}}:host([layout=horizontal-single]) .stepper-item-header{margin-inline-end:0px;box-sizing:border-box;border-style:none;inline-size:100%;padding-inline:calc(var(--calcite-internal-stepper-action-inline-size) + .5rem)}:host([layout=horizontal-single][error]) .container .stepper-item-number{color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([layout=horizontal-single][error]) .container .stepper-item-icon{opacity:1;color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([layout=horizontal-single][error][selected]),:host([layout=horizontal-single][complete][selected]) .container{color:var(--calcite-color-text-3)}:host([layout=horizontal-single][error][selected]) .stepper-item-heading,:host([layout=horizontal-single][complete][selected]) .container .stepper-item-heading{color:var(--calcite-stepper-item-header-text-color, var(--calcite-color-text-2))}:host([layout=horizontal-single][complete][selected]) .container .stepper-item-icon{opacity:var(--calcite-opacity-disabled)}:host([layout=horizontal-single][complete][selected]) .container .stepper-item-number{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-text-3))}.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}:host([hidden]){display:none}[hidden]{display:none}:host([item-hidden]){display:none}`,c=class extends m{constructor(){super(),this.headerRef=d(),this.messages=y(),this.focusSetter=f()(this),this.complete=!1,this.disabled=!1,this.error=!1,this.icon=!1,this.iconFlipRtl=!1,this.itemHidden=!1,this.numbered=!1,this.scale="m",this.selected=!1,this.calciteInternalStepperItemKeyEvent=o({cancelable:!1}),this.calciteInternalStepperItemRegister=o({cancelable:!1}),this.calciteInternalStepperItemSelect=o({cancelable:!1}),this.calciteStepperItemSelect=o({cancelable:!1}),this.listenOn(document.body,"calciteInternalStepperItemChange",this.updateActiveItemOnChange),this.listen("click",this.handleItemClick),this.listen("keydown",this.keyDownHandler)}static{this.properties={stepperItemHasContent:[16,{},{state:!0}],complete:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],error:[7,{},{reflect:!0,type:Boolean}],heading:1,icon:[5,{},{type:Boolean}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],itemHidden:[7,{},{reflect:!0,type:Boolean}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],numbered:[5,{},{type:Boolean}],numberingSystem:1,scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=I}async setFocus(e){return this.focusSetter(()=>this.layout==="vertical"?this.el:this.headerRef.value,e)}async load(){this.parentStepperEl=this.el.parentElement,this.itemPosition=this.getItemPosition(),this.registerStepperItem(),this.selected&&this.emitRequestedItem()}willUpdate(e){e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.selectedHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.registerStepperItem(),e.has("messages")&&this.effectiveLocaleWatcher(this.messages._lang)}updated(){x(this),u(this.el,"tabindex",this.disabled||this.layout==="horizontal"?null:0)}selectedHandler(){this.selected&&this.emitRequestedItem()}effectiveLocaleWatcher(e){l.numberFormatOptions={locale:e,numberingSystem:this.numberingSystem,useGrouping:!1}}updateActiveItemOnChange(e){(e.target===this.parentStepperEl||e.composedPath().includes(this.parentStepperEl))&&(this.selectedPosition=e.detail.position,this.determineSelectedItem())}keyDownHandler(e){if(!this.disabled&&e.target===this.el)switch(e.key){case" ":case"Enter":this.emitUserRequestedItem(),e.preventDefault();break;case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"Home":case"End":this.calciteInternalStepperItemKeyEvent.emit({item:e}),e.preventDefault();break}}determineSelectedItem(){this.selected=!this.disabled&&this.itemPosition===this.selectedPosition}registerStepperItem(){this.calciteInternalStepperItemRegister.emit({position:this.itemPosition})}handleItemClick(e){this.disabled||g(this.el)||this.layout==="horizontal"&&e.composedPath().some(s=>s.classList?.contains("stepper-item-content"))||this.emitUserRequestedItem()}emitUserRequestedItem(){this.emitRequestedItem(),this.disabled||this.calciteStepperItemSelect.emit()}emitRequestedItem(){if(!this.disabled){let e=this.itemPosition;this.calciteInternalStepperItemSelect.emit({position:e})}}getItemPosition(){return Array.from(this.parentStepperEl?.querySelectorAll("calcite-stepper-item:not([hidden]):not([item-hidden])")).indexOf(this.el)}render(){this.el.ariaCurrent=this.selected?"step":"false";let e=this.layout==="horizontal"&&!this.disabled?0:null;return z({disabled:this.disabled,children:i`<div class=${t(r.container)}>${this.complete&&i`<span aria-live=polite class=${t(r.visuallyHidden)}>${this.messages.complete}</span>`||""}<div class=${t(r.stepperItemHeader)} tabindex=${e??p} ${h(this.headerRef)}>${this.icon?this.renderIcon():null}${this.numbered?i`<div class=${t(r.stepperItemNumber)}>${this.renderNumbers()}.</div>`:null}<div class=${t(r.stepperItemHeaderText)}><span class=${t(r.stepperItemHeading)}>${this.heading}</span><span class=${t(r.stepperItemDescription)}>${this.description}</span></div></div><div class=${t({[r.stepperItemContent]:!0,[r.hasSlottedContent]:this.stepperItemHasContent})}><slot @slotchange=${s=>this.stepperItemHasContent=v(s)}></slot></div></div>`})}renderIcon(){let e=a.circle;return this.selected&&(this.layout!=="horizontal-single"||!this.error&&!this.complete)?e=a.circleF:this.error?e=a.exclamationMarkCircleF:this.complete&&(e=a.checkCircleF),i`<calcite-icon class=${t(r.stepperItemIcon)} .flipRtl=${this.iconFlipRtl} .icon=${e} scale=s></calcite-icon>`}renderNumbers(){return l.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:!1},l.numberFormatter.format(this.itemPosition+1)}};b("calcite-stepper-item",c);export{c as StepperItem};
@@ -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.3 */
4
- import{a as t,b as d}from"./PDC2HFCE.js";import{a as E,b as $}from"./EU6IVBMM.js";import{a as x}from"./XWXCOJUO.js";import"./UXWFYSWM.js";import{a as s}from"./JW4SOJWB.js";import"./P2RYGBBZ.js";import{q as D}from"./SLICSH62.js";import"./DNM3U3Z7.js";import{B as v,C as g,D as k,E as n,G as r,H as I,P as y,g as b,h as i,o as c}from"./ALOAVLGK.js";var R=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([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:flex;flex-grow:1;align-items:center;outline-color:transparent}.container{position:relative;display:flex;flex-grow:1;cursor:pointer;align-items:center;text-decoration-line:none;color:var(--calcite-dropdown-item-text-color, var(--calcite-color-text-3));text-align:start;outline-color:transparent}.container a{outline:none;position:relative;display:flex;flex-grow:1;cursor:pointer;align-items:center;text-decoration-line:none;color:var(--calcite-dropdown-item-text-color, var(--calcite-color-text-3))}.dropdown-item-content{flex:1 1 auto;padding-block:.125rem}.dropdown-item-icon{position:relative;opacity:0;transition-timing-function:cubic-bezier(.4,0,.2,1);transform:scale(.9)}:host([scale=s]) .container{padding-block:.25rem;padding-inline:.5rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s]) .dropdown-item-icon,:host([scale=s]) .dropdown-item-icon--start{padding-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .dropdown-item-icon--end{padding-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .container{padding-block:.5rem;padding-inline:.75rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) .dropdown-item-icon,:host([scale=m]) .dropdown-item-icon--start{padding-inline-end:var(--calcite-spacing-md)}:host([scale=m]) .dropdown-item-icon--end{padding-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .container{padding-block:.625rem;padding-inline:1rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .dropdown-item-icon,:host([scale=l]) .dropdown-item-icon--start{padding-inline-end:var(--calcite-spacing-lg)}:host([scale=l]) .dropdown-item-icon--end{padding-inline-start:var(--calcite-spacing-lg)}:host(:focus) .container{text-decoration-line:none;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))))}:host(:hover:not([disabled])) .container{background-color:var(--calcite-dropdown-item-background-color-hover, var(--calcite-color-foreground-2))}:host(:active:not([disabled])) .container{background-color:var(--calcite-dropdown-item-background-color-press, var(--calcite-color-foreground-3))}:host(:hover:not([disabled])) .container,:host(:active:not([disabled])) .container{text-decoration-line:none;color:var(--calcite-dropdown-item-text-color-press, var(--calcite-color-text-1))}:host(:hover:not([disabled])) .dropdown-link,:host(:active:not([disabled])) .dropdown-link{color:var(--calcite-dropdown-item-text-color-press, var(--calcite-color-text-1))}:host([selected]) .container:not(.container--none-selection),:host([selected]) .dropdown-link{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-dropdown-item-text-color-press, var(--calcite-color-text-1))}:host([selected]) .container:not(.container--none-selection) calcite-icon,:host([selected]) .dropdown-link calcite-icon{color:var(--calcite-dropdown-item-icon-color-press, var(--calcite-color-brand))}:host(:hover:not([disabled])) .dropdown-item-icon{color:var(--calcite-dropdown-item-icon-color-hover)}:host([selected]) .dropdown-item-icon{opacity:1}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,p=class extends k{constructor(){super(),this.childLinkRef=v(),this.focusSetter=x()(this),this.disabled=!1,this.scale="m",this.selected=!1,this.selectionMode="single",this.calciteDropdownItemSelect=c({cancelable:!1}),this.calciteInternalDropdownCloseRequest=c({cancelable:!1}),this.calciteInternalDropdownItemKeyEvent=c({cancelable:!1}),this.calciteInternalDropdownItemSelect=c({cancelable:!1}),this.listen("click",this.onClick),this.listen("keydown",this.keyDownHandler),this.listenOn(document.body,"calciteInternalDropdownItemChange",this.updateActiveItemOnChange)}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],href:[3,{},{reflect:!0}],iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{type:String},{reflect:!0}],label:1,rel:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],selectionMode:1,target:[3,{},{reflect:!0}]}}static{this.styles=R}async setFocus(e){return this.focusSetter(()=>this.el,e)}connectedCallback(){super.connectedCallback(),this.initialize()}load(){this.initialize()}updated(){E(this)}onClick(){this.emitRequestedItem()}keyDownHandler(e){switch(e.key){case" ":case"Enter":this.emitRequestedItem(),this.href&&this.childLinkRef.value.click(),e.preventDefault();break;case"Escape":this.calciteInternalDropdownCloseRequest.emit(),e.preventDefault();break;case"Tab":this.calciteInternalDropdownItemKeyEvent.emit({keyboardEvent:e});break;case"ArrowUp":case"ArrowDown":case"Home":case"End":e.preventDefault(),this.calciteInternalDropdownItemKeyEvent.emit({keyboardEvent:e});break}}updateActiveItemOnChange(e){e.composedPath().includes(this.parentDropdownGroupEl)&&(this.requestedDropdownGroup=e.detail.requestedDropdownGroup,this.requestedDropdownItem=e.detail.requestedDropdownItem,this.determineActiveItem()),e.stopPropagation()}initialize(){this.parentDropdownGroupEl=this.el.closest("calcite-dropdown-group"),this.selectionMode==="none"&&(this.selected=!1)}determineActiveItem(){switch(this.selectionMode){case"multiple":this.el===this.requestedDropdownItem&&(this.selected=!this.selected);break;case"single":this.el===this.requestedDropdownItem?this.selected=!0:this.requestedDropdownGroup===this.parentDropdownGroupEl&&(this.selected=!1);break;case"none":this.selected=!1;break}}emitRequestedItem(){this.calciteDropdownItemSelect.emit(),this.calciteInternalDropdownItemSelect.emit({requestedDropdownItem:this.el,requestedDropdownGroup:this.parentDropdownGroupEl})}render(){let{href:e,selectionMode:o,label:h,iconFlipRtl:a}=this,m=i`<calcite-icon class=${n(t.iconStart)} .flipRtl=${a==="start"||a==="both"} .icon=${this.iconStart} .scale=${s(this.scale)}></calcite-icon>`,l=i`<span class=${n(t.itemContent)}><slot></slot></span>`,u=i`<calcite-icon class=${n(t.iconEnd)} .flipRtl=${a==="end"||a==="both"} .icon=${this.iconEnd} .scale=${s(this.scale)}></calcite-icon>`,f=this.iconStart&&this.iconEnd?[m,l,u]:this.iconStart?[m,l]:this.iconEnd?[l,u]:l,C=e?i`<a .ariaLabel=${h} class=${n(t.link)} href=${e??r} rel=${this.rel??r} tabindex=-1 target=${this.target??r} ${g(this.childLinkRef)}>${f}</a>`:f,S=e?null:o==="single"?"menuitemradio":o==="multiple"?"menuitemcheckbox":"menuitem",q=o!=="none"?D(this.selected):null,{disabled:w}=this;return this.el.ariaChecked=q,this.el.ariaLabel=e?"":h,this.el.role=S,I(this.el,"tabIndex",w?-1:0),$({disabled:w,children:i`<div class=${n({[t.container]:!0,[t.containerNone]:o==="none"})}>${o!=="none"?i`<calcite-icon class=${n(t.icon)} .icon=${o==="multiple"?d.check:d.bulletPoint} .scale=${s(this.scale)}></calcite-icon>`:null}${C}</div>`})}};y("calcite-dropdown-item",p);export{p as DropdownItem};
3
+ v5.0.0-next.5 */
4
+ import{a as t,b as d}from"./OCT7LR2O.js";import{a as E,b as $}from"./NSBK36H4.js";import{a as x}from"./WOTQIMPZ.js";import"./B5JXPZDV.js";import{a as s}from"./3YZG7MA3.js";import"./CIU4VM7X.js";import{q as D}from"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{B as v,C as g,D as k,E as n,G as r,H as I,P as y,g as b,h as i,o as c}from"./AUIOWPFN.js";var R=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([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:flex;flex-grow:1;align-items:center;outline-color:transparent}.container{position:relative;display:flex;flex-grow:1;cursor:pointer;align-items:center;text-decoration-line:none;color:var(--calcite-dropdown-item-text-color, var(--calcite-color-text-3));text-align:start;outline-color:transparent}.container a{outline:none;position:relative;display:flex;flex-grow:1;cursor:pointer;align-items:center;text-decoration-line:none;color:var(--calcite-dropdown-item-text-color, var(--calcite-color-text-3))}.dropdown-item-content{flex:1 1 auto;padding-block:.125rem}.dropdown-item-icon{position:relative;opacity:0;transition-timing-function:cubic-bezier(.4,0,.2,1);transform:scale(.9)}:host([scale=s]) .container{padding-block:.25rem;padding-inline:.5rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s]) .dropdown-item-icon,:host([scale=s]) .dropdown-item-icon--start{padding-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .dropdown-item-icon--end{padding-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .container{padding-block:.5rem;padding-inline:.75rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) .dropdown-item-icon,:host([scale=m]) .dropdown-item-icon--start{padding-inline-end:var(--calcite-spacing-md)}:host([scale=m]) .dropdown-item-icon--end{padding-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .container{padding-block:.625rem;padding-inline:1rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .dropdown-item-icon,:host([scale=l]) .dropdown-item-icon--start{padding-inline-end:var(--calcite-spacing-lg)}:host([scale=l]) .dropdown-item-icon--end{padding-inline-start:var(--calcite-spacing-lg)}:host(:focus) .container{text-decoration-line:none;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))))}:host(:hover:not([disabled])) .container{background-color:var(--calcite-dropdown-item-background-color-hover, var(--calcite-color-foreground-2))}:host(:active:not([disabled])) .container{background-color:var(--calcite-dropdown-item-background-color-press, var(--calcite-color-foreground-3))}:host(:hover:not([disabled])) .container,:host(:active:not([disabled])) .container{text-decoration-line:none;color:var(--calcite-dropdown-item-text-color-press, var(--calcite-color-text-1))}:host(:hover:not([disabled])) .dropdown-link,:host(:active:not([disabled])) .dropdown-link{color:var(--calcite-dropdown-item-text-color-press, var(--calcite-color-text-1))}:host([selected]) .container:not(.container--none-selection),:host([selected]) .dropdown-link{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-dropdown-item-text-color-press, var(--calcite-color-text-1))}:host([selected]) .container:not(.container--none-selection) calcite-icon,:host([selected]) .dropdown-link calcite-icon{color:var(--calcite-dropdown-item-icon-color-press, var(--calcite-color-brand))}:host(:hover:not([disabled])) .dropdown-item-icon{color:var(--calcite-dropdown-item-icon-color-hover)}:host([selected]) .dropdown-item-icon{opacity:1}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,p=class extends k{constructor(){super(),this.childLinkRef=v(),this.focusSetter=x()(this),this.disabled=!1,this.scale="m",this.selected=!1,this.selectionMode="single",this.calciteDropdownItemSelect=c({cancelable:!1}),this.calciteInternalDropdownCloseRequest=c({cancelable:!1}),this.calciteInternalDropdownItemKeyEvent=c({cancelable:!1}),this.calciteInternalDropdownItemSelect=c({cancelable:!1}),this.listen("click",this.onClick),this.listen("keydown",this.keyDownHandler),this.listenOn(document.body,"calciteInternalDropdownItemChange",this.updateActiveItemOnChange)}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],href:[3,{},{reflect:!0}],iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{type:String},{reflect:!0}],label:1,rel:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],selectionMode:1,target:[3,{},{reflect:!0}]}}static{this.styles=R}async setFocus(e){return this.focusSetter(()=>this.el,e)}connectedCallback(){super.connectedCallback(),this.initialize()}load(){this.initialize()}updated(){E(this)}onClick(){this.emitRequestedItem()}keyDownHandler(e){switch(e.key){case" ":case"Enter":this.emitRequestedItem(),this.href&&this.childLinkRef.value.click(),e.preventDefault();break;case"Escape":this.calciteInternalDropdownCloseRequest.emit(),e.preventDefault();break;case"Tab":this.calciteInternalDropdownItemKeyEvent.emit({keyboardEvent:e});break;case"ArrowUp":case"ArrowDown":case"Home":case"End":e.preventDefault(),this.calciteInternalDropdownItemKeyEvent.emit({keyboardEvent:e});break}}updateActiveItemOnChange(e){e.composedPath().includes(this.parentDropdownGroupEl)&&(this.requestedDropdownGroup=e.detail.requestedDropdownGroup,this.requestedDropdownItem=e.detail.requestedDropdownItem,this.determineActiveItem()),e.stopPropagation()}initialize(){this.parentDropdownGroupEl=this.el.closest("calcite-dropdown-group"),this.selectionMode==="none"&&(this.selected=!1)}determineActiveItem(){switch(this.selectionMode){case"multiple":this.el===this.requestedDropdownItem&&(this.selected=!this.selected);break;case"single":this.el===this.requestedDropdownItem?this.selected=!0:this.requestedDropdownGroup===this.parentDropdownGroupEl&&(this.selected=!1);break;case"none":this.selected=!1;break}}emitRequestedItem(){this.calciteDropdownItemSelect.emit(),this.calciteInternalDropdownItemSelect.emit({requestedDropdownItem:this.el,requestedDropdownGroup:this.parentDropdownGroupEl})}render(){let{href:e,selectionMode:o,label:h,iconFlipRtl:a}=this,m=i`<calcite-icon class=${n(t.iconStart)} .flipRtl=${a==="start"||a==="both"} .icon=${this.iconStart} .scale=${s(this.scale)}></calcite-icon>`,l=i`<span class=${n(t.itemContent)}><slot></slot></span>`,u=i`<calcite-icon class=${n(t.iconEnd)} .flipRtl=${a==="end"||a==="both"} .icon=${this.iconEnd} .scale=${s(this.scale)}></calcite-icon>`,f=this.iconStart&&this.iconEnd?[m,l,u]:this.iconStart?[m,l]:this.iconEnd?[l,u]:l,C=e?i`<a .ariaLabel=${h} class=${n(t.link)} href=${e??r} rel=${this.rel??r} tabindex=-1 target=${this.target??r} ${g(this.childLinkRef)}>${f}</a>`:f,S=e?null:o==="single"?"menuitemradio":o==="multiple"?"menuitemcheckbox":"menuitem",q=o!=="none"?D(this.selected):null,{disabled:w}=this;return this.el.ariaChecked=q,this.el.ariaLabel=e?"":h,this.el.role=S,I(this.el,"tabIndex",w?-1:0),$({disabled:w,children:i`<div class=${n({[t.container]:!0,[t.containerNone]:o==="none"})}>${o!=="none"?i`<calcite-icon class=${n(t.icon)} .icon=${o==="multiple"?d.check:d.bulletPoint} .scale=${s(this.scale)}></calcite-icon>`:null}${C}</div>`})}};y("calcite-dropdown-item",p);export{p as DropdownItem};
@@ -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.3 */
3
+ v5.0.0-next.5 */
4
4
  var o={menu:"menu",defaultTrigger:"default-trigger"},e="calcite-action-menu",i={button:t=>`${e}-${t}-menu-button`,menu:t=>`${e}-${t}-menu`,action:(t,n)=>`${e}-${t}-action-${n}`},a={tooltip:"tooltip",trigger:"trigger"},s={menu:"ellipsis"};export{o as a,i as b,a as c,s as d};
@@ -1,7 +1,7 @@
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.3 */
4
- import{a as N}from"./RSQ6RL3K.js";import{a as O}from"./DNM3U3Z7.js";import{D as S,E as x,G as o,P as G,g as X,h as z,i as g}from"./ALOAVLGK.js";function I(t,s,n){let i=s[0]-t[0],c=n[0]-s[0],l=s[1]-t[1],h=n[1]-s[1],r=l/(i||c<0&&0),a=h/(c||i<0&&0),e=(r*c+a*i)/(i+c);return(Math.sign(r)+Math.sign(a))*Math.min(Math.abs(r),Math.abs(a),.5*Math.abs(e))||0}function Y(t,s,n){let i=s[0]-t[0],c=s[1]-t[1];return i?(3*c/i-n)/2:n}function Z(t,s,n,i,c){let[l,h]=t,[r,a]=s,e=(r-l)/3,$=c([l+e,h+e*n]).join(","),d=c([r-e,a-e*i]).join(","),m=c([r,a]).join(",");return`C ${$} ${d} ${m}`}function A({width:t,height:s,min:n,max:i}){let c=i[0]-n[0],l=i[1]-n[1];return h=>{let r=(h[0]-n[0])/c*t,a=s-(h[1]-n[1])/l*s;return[r,a]}}function B(t){let[s,n]=t[0],i=[s,n],c=[s,n];return t.reduce(({min:l,max:h},[r,a])=>({min:[Math.min(l[0],r),Math.min(l[1],a)],max:[Math.max(h[0],r),Math.max(h[1],a)]}),{min:i,max:c})}function E({data:t,min:s,max:n,t:i}){if(t.length===0)return"";let[c,l]=i(t[0]),[h,r]=i(s),[a]=i(n),e,$,d,m=t.reduce((b,k,p)=>{if($=t[p-2],d=t[p-1],p>1){let u=I($,d,k),M=e===void 0?Y($,d,u):e,w=Z($,d,M,u,i);return e=u,`${b} ${w}`}return b},`M ${h},${r} L ${h},${l} L ${c},${l}`),L=t[t.length-1],v=Z(d,L,e,Y(d,L,e),i);return`${m} ${v} L ${a},${r} Z`}var R=X`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:block;block-size:100%}.svg{fill:currentColor;stroke:transparent;margin:0;display:block;block-size:100%;inline-size:100%;padding:0}.svg .graph-path--highlight{fill:var(--calcite-graph-highlight-fill-color, var(--calcite-color-brand));opacity:.5}:host([hidden]){display:none}[hidden]{display:none}`,y={svg:"svg",graphPath:"graph-path",graphPathHighlight:"graph-path--highlight"},C="calcite-graph",f={host:t=>`${C}-${t}`,linearGradient:t=>`linear-gradient-${C}-${t}`,mask:(t,s)=>`${C}-${t}${s}`},P=class extends S{constructor(){super(...arguments),this.graphId=O(),this.resizeObserver=N("resize",()=>this.requestUpdate()),this.data=[]}static{this.properties={colorStops:[0,{},{attribute:!1}],data:[0,{},{attribute:!1}],highlightMax:[9,{},{type:Number}],highlightMin:[9,{},{type:Number}],max:[11,{},{reflect:!0,type:Number}],min:[11,{},{reflect:!0,type:Number}]}}static{this.styles=R}connectedCallback(){super.connectedCallback(),this.resizeObserver?.observe(this.el)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}render(){let{data:s,colorStops:n,el:i,highlightMax:c,highlightMin:l,min:h,max:r}=this,a=this.graphId,{clientHeight:e,clientWidth:$}=i;if(!s||s.length===0)return z`<svg aria-hidden=true class=${x(y.svg)} height=${e??o} preserveAspectRatio=none viewBox=${`0 0 ${$} ${e}`} width=${$??o}></svg>`;let{min:d,max:m}=B(s),L=d,v=m;(h<d[0]||h>d[0])&&(L=[h,0]),(r>m[0]||r<m[0])&&(v=[r,m[1]]);let b=A({min:L,max:v,width:$,height:e}),[k]=b([l,v[1]]),[p]=b([c,v[1]]),u=E({data:s,min:d,max:m,t:b}),M=n?`url(#${f.linearGradient(a)})`:void 0;return z`<svg aria-hidden=true class=${x(y.svg)} height=${e??o} preserveAspectRatio=none viewBox=${`0 0 ${$} ${e}`} width=${$??o}>${n?g`<defs><linearGradient id=${f.linearGradient(a)??o} x1=0 x2=1 y1=0 y2=0>${n.map(({offset:w,color:j,opacity:H})=>g`<stop offset=${`${w*100}%`} stop-color=${j??o} stop-opacity=${H??o} />`)}</linearGradient></defs>`:null}${l!==void 0?[g`<mask height=100% id=${f.mask(a,1)??o} width=100% x=0% y=0%><path d=${`
3
+ v5.0.0-next.5 */
4
+ import{a as N}from"./ALDDSDTX.js";import{a as O}from"./ZLR2B6GQ.js";import{D as S,E as x,G as o,P as G,g as X,h as z,i as g}from"./AUIOWPFN.js";function I(t,s,n){let i=s[0]-t[0],c=n[0]-s[0],l=s[1]-t[1],h=n[1]-s[1],r=l/(i||c<0&&0),a=h/(c||i<0&&0),e=(r*c+a*i)/(i+c);return(Math.sign(r)+Math.sign(a))*Math.min(Math.abs(r),Math.abs(a),.5*Math.abs(e))||0}function Y(t,s,n){let i=s[0]-t[0],c=s[1]-t[1];return i?(3*c/i-n)/2:n}function Z(t,s,n,i,c){let[l,h]=t,[r,a]=s,e=(r-l)/3,$=c([l+e,h+e*n]).join(","),d=c([r-e,a-e*i]).join(","),m=c([r,a]).join(",");return`C ${$} ${d} ${m}`}function A({width:t,height:s,min:n,max:i}){let c=i[0]-n[0],l=i[1]-n[1];return h=>{let r=(h[0]-n[0])/c*t,a=s-(h[1]-n[1])/l*s;return[r,a]}}function B(t){let[s,n]=t[0],i=[s,n],c=[s,n];return t.reduce(({min:l,max:h},[r,a])=>({min:[Math.min(l[0],r),Math.min(l[1],a)],max:[Math.max(h[0],r),Math.max(h[1],a)]}),{min:i,max:c})}function E({data:t,min:s,max:n,t:i}){if(t.length===0)return"";let[c,l]=i(t[0]),[h,r]=i(s),[a]=i(n),e,$,d,m=t.reduce((b,k,p)=>{if($=t[p-2],d=t[p-1],p>1){let u=I($,d,k),M=e===void 0?Y($,d,u):e,w=Z($,d,M,u,i);return e=u,`${b} ${w}`}return b},`M ${h},${r} L ${h},${l} L ${c},${l}`),L=t[t.length-1],v=Z(d,L,e,Y(d,L,e),i);return`${m} ${v} L ${a},${r} Z`}var R=X`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:block;block-size:100%}.svg{fill:currentColor;stroke:transparent;margin:0;display:block;block-size:100%;inline-size:100%;padding:0}.svg .graph-path--highlight{fill:var(--calcite-graph-highlight-fill-color, var(--calcite-color-brand));opacity:.5}:host([hidden]){display:none}[hidden]{display:none}`,y={svg:"svg",graphPath:"graph-path",graphPathHighlight:"graph-path--highlight"},C="calcite-graph",f={host:t=>`${C}-${t}`,linearGradient:t=>`linear-gradient-${C}-${t}`,mask:(t,s)=>`${C}-${t}${s}`},P=class extends S{constructor(){super(...arguments),this.graphId=O(),this.resizeObserver=N("resize",()=>this.requestUpdate()),this.data=[]}static{this.properties={colorStops:[0,{},{attribute:!1}],data:[0,{},{attribute:!1}],highlightMax:[9,{},{type:Number}],highlightMin:[9,{},{type:Number}],max:[11,{},{reflect:!0,type:Number}],min:[11,{},{reflect:!0,type:Number}]}}static{this.styles=R}connectedCallback(){super.connectedCallback(),this.resizeObserver?.observe(this.el)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}render(){let{data:s,colorStops:n,el:i,highlightMax:c,highlightMin:l,min:h,max:r}=this,a=this.graphId,{clientHeight:e,clientWidth:$}=i;if(!s||s.length===0)return z`<svg aria-hidden=true class=${x(y.svg)} height=${e??o} preserveAspectRatio=none viewBox=${`0 0 ${$} ${e}`} width=${$??o}></svg>`;let{min:d,max:m}=B(s),L=d,v=m;(h<d[0]||h>d[0])&&(L=[h,0]),(r>m[0]||r<m[0])&&(v=[r,m[1]]);let b=A({min:L,max:v,width:$,height:e}),[k]=b([l,v[1]]),[p]=b([c,v[1]]),u=E({data:s,min:d,max:m,t:b}),M=n?`url(#${f.linearGradient(a)})`:void 0;return z`<svg aria-hidden=true class=${x(y.svg)} height=${e??o} preserveAspectRatio=none viewBox=${`0 0 ${$} ${e}`} width=${$??o}>${n?g`<defs><linearGradient id=${f.linearGradient(a)??o} x1=0 x2=1 y1=0 y2=0>${n.map(({offset:w,color:j,opacity:H})=>g`<stop offset=${`${w*100}%`} stop-color=${j??o} stop-opacity=${H??o} />`)}</linearGradient></defs>`:null}${l!==void 0?[g`<mask height=100% id=${f.mask(a,1)??o} width=100% x=0% y=0%><path d=${`
5
5
  M 0,0
6
6
  L ${k-1},0
7
7
  L ${k-1},${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.3 */
4
- import{c as h,l as M,q as S,u as C}from"./SLICSH62.js";import"./DNM3U3Z7.js";import{D as b,H as A,P as T,g as x,h as y,o as E}from"./ALOAVLGK.js";function w(u){return u?.tagName==="CALCITE-TREE-ITEM"}function D(u){return Array.from(u.querySelectorAll("calcite-tree-item:not([disabled])")).filter(t=>{let e=t;for(;e!==u&&e!==void 0;){let i=e.parentElement;if(!(!w(i)||!i.hasChildren||i.expanded))return!1;e=e.parentElement}return!0})}var k=x`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:block}:host(:focus){outline:2px solid transparent;outline-offset:2px}:host([hidden]){display:none}[hidden]{display:none}`,g=class extends b{constructor(){super(),this.items=[],this.lines=!1,this.parentExpanded=!1,this.scale="m",this.selectedItems=[],this.selectionMode="single",this.calciteTreeSelect=E({cancelable:!1}),this.listen("focus",this.onFocus),this.listen("focusin",this.onFocusIn),this.listen("focusout",this.onFocusOut),this.listen("calciteInternalTreeItemSelect",this.onInternalTreeItemSelect),this.listen("keydown",this.keyDownHandler)}static{this.properties={child:[7,{},{reflect:!0,type:Boolean}],lines:[7,{},{reflect:!0,type:Boolean}],parentExpanded:[5,{},{type:Boolean}],scale:[3,{},{reflect:!0}],selectedItems:[0,{},{attribute:!1}],selectionMode:[3,{},{reflect:!0}]}}static{this.styles=k}willUpdate(t){t.has("parentExpanded")&&(this.hasUpdated||this.parentExpanded!==!1)&&this.updateItems();let e=this.el.parentElement?.closest("calcite-tree");this.lines=e?e.lines:this.lines,this.scale=e?e.scale:this.scale,this.selectionMode=e?e.selectionMode:this.selectionMode,this.child=!!e}onFocus(){if(!this.child){let t=this.el.querySelector("calcite-tree-item[selected]:not([disabled])")||this.el.querySelector("calcite-tree-item:not([disabled])");M(t)}}onFocusIn(t){(t.relatedTarget===this.el||!this.el.contains(t.relatedTarget))&&this.el.removeAttribute("tabindex")}onFocusOut(t){!this.el.contains(t.relatedTarget)&&(this.el.tabIndex=this.getRootTabIndex())}onInternalTreeItemSelect(t){if(this.child)return;let e=t.target,i=h(e.querySelectorAll("calcite-tree-item"));if(t.preventDefault(),t.stopPropagation(),this.selectionMode==="ancestors"){this.updateAncestorTree(t);return}let o=this.selectionMode==="none",n=this.selectionMode!==null&&(!e.hasChildren||e.hasChildren&&(this.selectionMode==="children"||this.selectionMode==="multichildren")),l=this.selectionMode==="multichildren"&&e.hasChildren,c=!o&&t.detail.modifyCurrentSelection&&(this.selectionMode==="multiple"||this.selectionMode==="multichildren"),f=!c&&((this.selectionMode==="single"||this.selectionMode==="multiple")&&i.length<=0||this.selectionMode==="children"||this.selectionMode==="multichildren"||this.selectionMode==="single-persist"&&!e.hasChildren),d=["multiple","none","single","single-persist"].includes(this.selectionMode)&&e.hasChildren,a=[];n&&a.push(e),f&&h(this.el.querySelectorAll("calcite-tree-item[selected]")).forEach(r=>{a.includes(r)||(r.selected=!1)}),d&&["multiple","none","single","single-persist"].includes(this.selectionMode)&&(e.expanded=!e.expanded),l&&i.forEach(s=>{s.selected=!1,s.hasChildren&&(s.expanded=!1)}),c&&window.getSelection().removeAllRanges(),c&&e.selected?a.forEach(s=>{s.disabled||(s.selected=!1)}):o||a.forEach(s=>{s.disabled||(s.selected=this.selectionMode!=="single"||!s.selected)}),this.selectedItems=o?[]:h(this.el.querySelectorAll("calcite-tree-item")).filter(s=>s.selected),this.calciteTreeSelect.emit(),t.stopPropagation()}keyDownHandler(t){if(this.child)return;let e=this.el,i=t.target,o=["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End","Tab"];if(!(w(i)&&this.el.contains(i))||!o.includes(t.key))return;let n=D(e);if(t.key==="Tab"){n.forEach(l=>l.tabIndex=-1);return}if(t.key==="ArrowDown"){let l=n.indexOf(i);n[l+1]?.focus(),t.preventDefault();return}if(t.key==="ArrowUp"){let l=n.indexOf(i);n[l-1]?.focus(),t.preventDefault();return}if(t.key==="ArrowLeft"){if(i.hasChildren&&i.expanded){i.expanded=!1,t.preventDefault();return}n.slice(0,n.indexOf(i)).reverse().find(f=>f.depth===i.depth-1)?.focus(),t.preventDefault();return}if(t.key==="ArrowRight"){if(!i.disabled&&i.hasChildren)if(!i.expanded)i.expanded=!0,t.preventDefault();else{let l=n.indexOf(i);n[l+1]?.focus(),t.preventDefault()}return}if(t.key==="Home"){let l=n.shift();l&&(l.focus(),t.preventDefault());return}if(t.key==="End"){let l=n.pop();l&&(l.focus(),t.preventDefault());return}}updateAncestorTree(t){let e=t.target,i=t.detail.updateItem;if(e.disabled||e.indeterminate&&!i)return;let o=[],n=e.parentElement.closest("calcite-tree-item");for(;n;)o.push(n),n=n.parentElement.closest("calcite-tree-item");let l=Array.from(e.querySelectorAll("calcite-tree-item:not([disabled])")),c=l.filter(s=>!s.hasChildren),f=l.filter(s=>s.hasChildren),d;i?d=e.hasChildren?!(e.selected||e.indeterminate):!e.selected:d=e.selected,c.forEach(s=>{s.selected=d,s.indeterminate=!1});function a(s,r){let m=s.filter(p=>p.selected),I=s.filter(p=>!p.selected);r.selected=m.length===s.length,r.indeterminate=m.length>0&&I.length>0}f.reverse().forEach(s=>{let r=Array.from(s.querySelectorAll(":scope > calcite-tree > calcite-tree-item"));a(r,s)}),i&&(e.hasChildren?a(l,e):(e.selected=d,e.indeterminate=!1)),o.forEach(s=>{let r=h(s.querySelectorAll("calcite-tree-item")),m=r.filter(p=>p.selected);if(m.length===0){s.selected=!1,s.indeterminate=!1;return}let I=m.length<r.length;s.indeterminate=I,s.selected=!I}),this.selectedItems=h(this.el.querySelectorAll("calcite-tree-item")).filter(s=>s.selected),i&&this.calciteTreeSelect.emit()}updateItems(){this.items.forEach(t=>t.parentExpanded=this.parentExpanded)}handleDefaultSlotChange(t){let e=C(t).filter(i=>i.matches("calcite-tree-item"));this.items=e,this.updateItems()}getRootTabIndex(){return this.child?-1:0}render(){return this.el.ariaMultiSelectable=this.child?void 0:S(this.selectionMode==="multiple"||this.selectionMode==="multichildren"),this.el.role=this.child?void 0:"tree",A(this.el,"tabIndex",this.getRootTabIndex()),y`<slot @slotchange=${this.handleDefaultSlotChange}></slot>`}};T("calcite-tree",g);export{g as Tree};
3
+ v5.0.0-next.5 */
4
+ import{c as h,l as M,q as S,u as C}from"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{D as b,H as A,P as T,g as x,h as y,o as E}from"./AUIOWPFN.js";function w(u){return u?.tagName==="CALCITE-TREE-ITEM"}function D(u){return Array.from(u.querySelectorAll("calcite-tree-item:not([disabled])")).filter(t=>{let e=t;for(;e!==u&&e!==void 0;){let i=e.parentElement;if(!(!w(i)||!i.hasChildren||i.expanded))return!1;e=e.parentElement}return!0})}var k=x`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:block}:host(:focus){outline:2px solid transparent;outline-offset:2px}:host([hidden]){display:none}[hidden]{display:none}`,g=class extends b{constructor(){super(),this.items=[],this.lines=!1,this.parentExpanded=!1,this.scale="m",this.selectedItems=[],this.selectionMode="single",this.calciteTreeSelect=E({cancelable:!1}),this.listen("focus",this.onFocus),this.listen("focusin",this.onFocusIn),this.listen("focusout",this.onFocusOut),this.listen("calciteInternalTreeItemSelect",this.onInternalTreeItemSelect),this.listen("keydown",this.keyDownHandler)}static{this.properties={child:[7,{},{reflect:!0,type:Boolean}],lines:[7,{},{reflect:!0,type:Boolean}],parentExpanded:[5,{},{type:Boolean}],scale:[3,{},{reflect:!0}],selectedItems:[0,{},{attribute:!1}],selectionMode:[3,{},{reflect:!0}]}}static{this.styles=k}willUpdate(t){t.has("parentExpanded")&&(this.hasUpdated||this.parentExpanded!==!1)&&this.updateItems();let e=this.el.parentElement?.closest("calcite-tree");this.lines=e?e.lines:this.lines,this.scale=e?e.scale:this.scale,this.selectionMode=e?e.selectionMode:this.selectionMode,this.child=!!e}onFocus(){if(!this.child){let t=this.el.querySelector("calcite-tree-item[selected]:not([disabled])")||this.el.querySelector("calcite-tree-item:not([disabled])");M(t)}}onFocusIn(t){(t.relatedTarget===this.el||!this.el.contains(t.relatedTarget))&&this.el.removeAttribute("tabindex")}onFocusOut(t){!this.el.contains(t.relatedTarget)&&(this.el.tabIndex=this.getRootTabIndex())}onInternalTreeItemSelect(t){if(this.child)return;let e=t.target,i=h(e.querySelectorAll("calcite-tree-item"));if(t.preventDefault(),t.stopPropagation(),this.selectionMode==="ancestors"){this.updateAncestorTree(t);return}let o=this.selectionMode==="none",n=this.selectionMode!==null&&(!e.hasChildren||e.hasChildren&&(this.selectionMode==="children"||this.selectionMode==="multichildren")),l=this.selectionMode==="multichildren"&&e.hasChildren,c=!o&&t.detail.modifyCurrentSelection&&(this.selectionMode==="multiple"||this.selectionMode==="multichildren"),f=!c&&((this.selectionMode==="single"||this.selectionMode==="multiple")&&i.length<=0||this.selectionMode==="children"||this.selectionMode==="multichildren"||this.selectionMode==="single-persist"&&!e.hasChildren),d=["multiple","none","single","single-persist"].includes(this.selectionMode)&&e.hasChildren,a=[];n&&a.push(e),f&&h(this.el.querySelectorAll("calcite-tree-item[selected]")).forEach(r=>{a.includes(r)||(r.selected=!1)}),d&&["multiple","none","single","single-persist"].includes(this.selectionMode)&&(e.expanded=!e.expanded),l&&i.forEach(s=>{s.selected=!1,s.hasChildren&&(s.expanded=!1)}),c&&window.getSelection().removeAllRanges(),c&&e.selected?a.forEach(s=>{s.disabled||(s.selected=!1)}):o||a.forEach(s=>{s.disabled||(s.selected=this.selectionMode!=="single"||!s.selected)}),this.selectedItems=o?[]:h(this.el.querySelectorAll("calcite-tree-item")).filter(s=>s.selected),this.calciteTreeSelect.emit(),t.stopPropagation()}keyDownHandler(t){if(this.child)return;let e=this.el,i=t.target,o=["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End","Tab"];if(!(w(i)&&this.el.contains(i))||!o.includes(t.key))return;let n=D(e);if(t.key==="Tab"){n.forEach(l=>l.tabIndex=-1);return}if(t.key==="ArrowDown"){let l=n.indexOf(i);n[l+1]?.focus(),t.preventDefault();return}if(t.key==="ArrowUp"){let l=n.indexOf(i);n[l-1]?.focus(),t.preventDefault();return}if(t.key==="ArrowLeft"){if(i.hasChildren&&i.expanded){i.expanded=!1,t.preventDefault();return}n.slice(0,n.indexOf(i)).reverse().find(f=>f.depth===i.depth-1)?.focus(),t.preventDefault();return}if(t.key==="ArrowRight"){if(!i.disabled&&i.hasChildren)if(!i.expanded)i.expanded=!0,t.preventDefault();else{let l=n.indexOf(i);n[l+1]?.focus(),t.preventDefault()}return}if(t.key==="Home"){let l=n.shift();l&&(l.focus(),t.preventDefault());return}if(t.key==="End"){let l=n.pop();l&&(l.focus(),t.preventDefault());return}}updateAncestorTree(t){let e=t.target,i=t.detail.updateItem;if(e.disabled||e.indeterminate&&!i)return;let o=[],n=e.parentElement.closest("calcite-tree-item");for(;n;)o.push(n),n=n.parentElement.closest("calcite-tree-item");let l=Array.from(e.querySelectorAll("calcite-tree-item:not([disabled])")),c=l.filter(s=>!s.hasChildren),f=l.filter(s=>s.hasChildren),d;i?d=e.hasChildren?!(e.selected||e.indeterminate):!e.selected:d=e.selected,c.forEach(s=>{s.selected=d,s.indeterminate=!1});function a(s,r){let m=s.filter(p=>p.selected),I=s.filter(p=>!p.selected);r.selected=m.length===s.length,r.indeterminate=m.length>0&&I.length>0}f.reverse().forEach(s=>{let r=Array.from(s.querySelectorAll(":scope > calcite-tree > calcite-tree-item"));a(r,s)}),i&&(e.hasChildren?a(l,e):(e.selected=d,e.indeterminate=!1)),o.forEach(s=>{let r=h(s.querySelectorAll("calcite-tree-item")),m=r.filter(p=>p.selected);if(m.length===0){s.selected=!1,s.indeterminate=!1;return}let I=m.length<r.length;s.indeterminate=I,s.selected=!I}),this.selectedItems=h(this.el.querySelectorAll("calcite-tree-item")).filter(s=>s.selected),i&&this.calciteTreeSelect.emit()}updateItems(){this.items.forEach(t=>t.parentExpanded=this.parentExpanded)}handleDefaultSlotChange(t){let e=C(t).filter(i=>i.matches("calcite-tree-item"));this.items=e,this.updateItems()}getRootTabIndex(){return this.child?-1:0}render(){return this.el.ariaMultiSelectable=this.child?void 0:S(this.selectionMode==="multiple"||this.selectionMode==="multichildren"),this.el.role=this.child?void 0:"tree",A(this.el,"tabIndex",this.getRootTabIndex()),y`<slot @slotchange=${this.handleDefaultSlotChange}></slot>`}};T("calcite-tree",g);export{g as Tree};
@@ -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.3 */
3
+ v5.0.0-next.5 */
4
4
  var c="24px",a="32px",e="44px",t="48px";export{c as a,a as b,e as c,t as d};
@@ -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.3 */
4
- import{a as N}from"./GT3B6N5Y.js";import{k as c}from"./I2EB746H.js";import{a as B}from"./IWU3WQTA.js";import{a as q}from"./E2ETQPML.js";import{c as W,d as F,e as j}from"./5JALWDSF.js";import{c as H,e as T,h as I}from"./RWVRFF3I.js";import{a as O,b as A}from"./EU6IVBMM.js";import{a as R}from"./3QKRHYDR.js";import{c as M}from"./FPD3KMKK.js";import"./L6HFE67F.js";import{a as k,b as L}from"./RSQ6RL3K.js";import{a as C}from"./WIJWBGXQ.js";import{a as $}from"./XWXCOJUO.js";import{b as E}from"./UXWFYSWM.js";import"./JW4SOJWB.js";import"./P2RYGBBZ.js";import{t as u}from"./SLICSH62.js";import{a as S}from"./DNM3U3Z7.js";import{A as x,B as b,C as m,D as y,E as i,G as r,I as z,P as w,g as v,h as s,o as g}from"./ALOAVLGK.js";var a={assistiveText:"assistive-text",characterLimit:"character-limit",content:"content",container:"container",footer:"footer",characterOverLimit:"character--over-limit",readOnly:"readonly",textAreaInvalid:"text-area--invalid",footerSlotted:"footer--slotted",hide:"hide",footerEndSlotOnly:"footer--end-only",textArea:"text-area",textAreaOnly:"text-area--only",wrapper:"wrapper"},V={validationMessage:"textAreaValidationMessage"},D={footerStart:"footer-start",footerEnd:"footer-end"},U=100,f=Object.freeze({height:0,width:0}),_=v`: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{position:relative;box-sizing:border-box;display:inline-block;block-size:100%;inline-size:100%;--calcite-internal-text-area-border-color: var(--calcite-text-area-border-color, var(--calcite-color-border-input));--calcite-internal-text-area-footer-border-color: var( --calcite-text-area-footer-border-color, var(--calcite-internal-text-area-border-color) );--calcite-internal-text-area-corner-radius: var( --calcite-text-area-corner-radius, var(--calcite-corner-radius-default) );--calcite-internal-text-area-shadow: var(--calcite-text-area-shadow, var(--calcite-shadow-none));--calcite-internal-text-area-footer-background-color: var( --calcite-text-area-footer-background-color, var(--calcite-text-area-background-color, var(--calcite-color-foreground-1)) );min-block-size:var(--calcite-text-area-min-height, calc(2 * var(--calcite-internal-text-area-padding-block) + 2 * var(--calcite-border-width-sm)));min-inline-size:var(--calcite-text-area-min-width, 12rem)}.wrapper{box-sizing:border-box;block-size:100%;inline-size:100%;box-shadow:var(--calcite-internal-text-area-shadow);border-radius:var(--calcite-internal-text-area-corner-radius)}.text-area,.footer{font-size:var(--calcite-text-area-font-size, var(--calcite-font-size--1));padding-block:var(--calcite-internal-text-area-padding-block);padding-inline:var(--calcite-internal-text-area-padding-inline)}.footer{background-color:var(--calcite-internal-text-area-footer-background-color);border-radius:0 0 var(--calcite-internal-text-area-corner-radius) var(--calcite-internal-text-area-corner-radius)}.text-area{position:relative;margin:0;box-sizing:border-box;display:block;inline-size:100%;--calcite-internal-text-area-border-block-end-color: var(--calcite-internal-text-area-border-color);border:var(--calcite-border-width-sm) solid var(--calcite-internal-text-area-border-color);border-block-end-color:var(--calcite-internal-text-area-border-block-end-color);color:var(--calcite-text-area-text-color, var(--calcite-color-text-1));font-family:inherit;max-block-size:var(--calcite-text-area-max-height);min-block-size:calc(var(--calcite-text-area-min-height, 0px) - var(--calcite-internal-text-area-footer-min-height, 0px));max-inline-size:var(--calcite-text-area-max-width);min-inline-size:var(--calcite-text-area-min-width, 12rem);background-color:var(--calcite-text-area-background-color, var(--calcite-color-foreground-1));border-radius:var(--calcite-internal-text-area-corner-radius) var(--calcite-internal-text-area-corner-radius) 0 0}.text-area::placeholder{font-weight:var(--calcite-font-weight-normal)}@media screen and (max-width:480px){.text-area{resize:none}}.text-area: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))))}.text-area.text-area--invalid{--calcite-internal-text-area-border-color: var(--calcite-color-status-danger)}.text-area.text-area--invalid:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.text-area.footer--slotted{min-inline-size:18rem}.text-area.text-area--only{border-radius:var(--calcite-internal-text-area-corner-radius)}.text-area:not(.text-area--only,.text-area--invalid){--calcite-internal-text-area-border-block-end-color: var( --calcite-text-area-divider-color, var(--calcite-color-border-3) )}.footer{box-sizing:border-box;display:flex;align-items:center;border:var(--calcite-border-width-sm) solid var(--calcite-internal-text-area-footer-border-color);border-block-start:var(--calcite-border-width-none);min-block-size:var(--calcite-internal-text-area-footer-min-height)}.character-limit{display:flex;align-items:center;justify-content:flex-end;white-space:nowrap;font-size:var(--calcite-text-area-font-size, var(--calcite-font-size--1));font-weight:var(--calcite-font-weight-regular);color:var(--calcite-text-area-character-limit-text-color, var(--calcite-color-text-2));padding-inline-start:var(--calcite-spacing-md)}.character--over-limit{font-weight:var(--calcite-font-weight-bold);color:var(--calcite-color-status-danger)}.readonly{background-color:var(--calcite-text-area-background-color, var(--calcite-color-background));font-weight:var(--calcite-font-weight-medium)}.footer.readonly{background-color:var(--calcite-internal-text-area-footer-background-color, var(--calcite-color-background))}.content,.hide{display:none}.container{display:flex;inline-size:100%;justify-content:space-between}.footer--end-only{justify-content:flex-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}.text-area.text-area--only{block-size:100%;min-block-size:var(--calcite-text-area-min-height, 0)}:host([resize=none]) .text-area{resize:none}:host([resize=horizontal]) .text-area{resize:horizontal}:host([resize=vertical]) .text-area{resize:vertical}:host([scale=s]){--calcite-internal-text-area-padding-block: var(--calcite-spacing-xxs);--calcite-internal-text-area-padding-inline: var(--calcite-spacing-sm);--calcite-internal-text-area-footer-min-height: 1.75rem}:host([scale=s]) .text-area,:host([scale=s]) .footer,:host([scale=s]) .character-limit{font-size:var(--calcite-text-area-font-size, var(--calcite-font-size--2))}:host([scale=s]) .character-limit{padding-inline-start:var(--calcite-spacing-sm)}:host([scale=m]){--calcite-internal-text-area-padding-block: var(--calcite-spacing-sm);--calcite-internal-text-area-padding-inline: var(--calcite-spacing-md);--calcite-internal-text-area-footer-min-height: 2.25rem}:host([scale=l]){--calcite-internal-text-area-padding-block: var(--calcite-spacing-md);--calcite-internal-text-area-padding-inline: var(--calcite-spacing-lg);--calcite-internal-text-area-footer-min-height: 2.75rem}:host([scale=l]) .text-area,:host([scale=l]) .footer,:host([scale=l]) .character-limit{font-size:var(--calcite-text-area-font-size, var(--calcite-font-size-0))}:host([scale=l]) .character-limit{padding-inline-start:var(--calcite-spacing-lg)}:host([status=invalid]){--calcite-internal-text-area-border-color: var(--calcite-color-status-danger)}:host([status=invalid]) .text-area:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([disabled]) .text-area,:host([disabled]) .footer{opacity:var(--calcite-opacity-half)}.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([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}::placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-placeholder-text-color, var(--calcite-color-text-3))}`,p=class extends y{constructor(){super(...arguments),this.attributeWatch=E(["autofocus","spellcheck"],this.handleGlobalAttributesChanged),this.footerRef=b(),this.guid=S(),this.resizeObserver=k("resize",async()=>{await this.componentOnReady();let{textAreaHeight:e,textAreaWidth:t,elHeight:l,elWidth:n,footerHeight:d,footerWidth:o,validationMessageHeight:h}=this.getHeightAndWidthOfElements();if(o>0&&o!==t&&(this.footerRef.value.style.width=`${t}px`),this.resize==="none")return;let{width:G,height:P}=getComputedStyle(this.el);n!==t&&G!=="auto"&&this.updateSizeToAuto("width"),l!==e+d+h&&P!=="auto"&&this.updateSizeToAuto("height")}),this.cancelable=R()(this),this.updateSizeToAuto=M(e=>{this.el.style[e]="auto"},U,{edges:["trailing"]}),this.messages=C({blocking:!0}),this.focusSetter=$()(this),this.disabled=!1,this.groupSeparator=!1,this.limitText=!1,this.readOnly=!1,this.required=!1,this.resize="both",this.scale="m",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.value="",this.wrap="soft",this.calciteTextAreaChange=g(),this.calciteTextAreaInput=g()}static{this.properties={endSlotHasElements:[16,{},{state:!0}],startSlotHasElements:[16,{},{state:!0}],columns:[11,{},{reflect:!0,type:Number}],disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],groupSeparator:[7,{},{reflect:!0,type:Boolean}],label:1,labelText:1,limitText:[7,{},{reflect:!0,type:Boolean}],maxLength:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],minLength:[11,{},{reflect:!0,type:Number}],name:[3,{},{reflect:!0}],numberingSystem:1,placeholder:1,readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],resize:[3,{},{reflect:!0}],rows:[11,{},{reflect:!0,type:Number}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:z,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:1,wrap:[3,{},{reflect:!0}]}}static{this.styles=_}async selectText(){await this.componentOnReady(),this.textAreaEl?.select()}async setFocus(e){return this.focusSetter(()=>this.textAreaEl,e)}connectedCallback(){super.connectedCallback(),W(this),H(this),this.cancelable.add(this.updateSizeToAuto)}updated(){O(this),this.setTextAreaHeight()}disconnectedCallback(){super.disconnectedCallback(),F(this),T(this),this.resizeObserver?.disconnect()}handleGlobalAttributesChanged(){this.requestUpdate()}onLabelClick(){this.setFocus()}handleInput(e){this.value=e.target.value,this.calciteTextAreaInput.emit()}handleChange(){this.calciteTextAreaChange.emit()}contentSlotChangeHandler(){this.value||this.el.childNodes.forEach(t=>{t.nodeName==="#text"&&(this.value=t.nodeValue.trim())})}getLocalizedCharacterLength(){let e=this.value?this.value.length.toString():"0",t=this.maxLength.toString();return this.numberingSystem==="latn"?{currentLength:e,maxLength:t}:(c.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,signDisplay:"never",useGrouping:this.groupSeparator},{currentLength:c.localize(e),maxLength:c.localize(t)})}syncHiddenFormInput(e){e.setCustomValidity(""),this.isCharacterLimitExceeded()&&e.setCustomValidity(this.replacePlaceholdersInMessages()),N("textarea",this,e)}setTextAreaEl(e){L(this.resizeObserver,this.textAreaEl,e),this.textAreaEl=e}setTextAreaHeight(){let{textAreaHeight:e,elHeight:t,footerHeight:l,validationMessageHeight:n}=this.getHeightAndWidthOfElements();l>0&&e+l+n!=t&&(this.textAreaEl.style.height=`${t-l}px`)}getHeightAndWidthOfElements(){let{height:e,width:t}=this.textAreaEl?this.textAreaEl.getBoundingClientRect():f,{height:l,width:n}=this.el.getBoundingClientRect(),{height:d,width:o}=this.footerRef.value?this.footerRef.value.getBoundingClientRect():f,{height:h}=this.validationMessageEl?this.validationMessageEl.getBoundingClientRect():f;return{textAreaHeight:e,textAreaWidth:t,elHeight:l,elWidth:n,footerHeight:d,footerWidth:o,validationMessageHeight:h}}replacePlaceholdersInMessages(){return this.messages.tooLong.replace("{maxLength}",this.localizedCharacterLengthObj.maxLength).replace("{currentLength}",this.localizedCharacterLengthObj.currentLength)}isCharacterLimitExceeded(){return this.value?.length>this.maxLength}setValidationRef(e){e&&(this.validationMessageEl=e)}render(){let e=this.startSlotHasElements||this.endSlotHasElements||!!this.maxLength;return A({disabled:this.disabled,children:s`<div class=${i(a.wrapper)}>${this.labelText&&q({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<textarea aria-describedby=${this.guid??r} aria-errormessage=${V.validationMessage} .ariaInvalid=${this.status==="invalid"||this.isCharacterLimitExceeded()} .ariaLabel=${j(this)} .autofocus=${this.el.autofocus} class=${i({[a.textArea]:!0,[a.readOnly]:this.readOnly,[a.textAreaInvalid]:this.isCharacterLimitExceeded(),[a.footerSlotted]:this.endSlotHasElements&&this.startSlotHasElements,[a.textAreaOnly]:!e})} .cols=${this.columns} .disabled=${this.disabled} maxlength=${(this.limitText?this.maxLength:void 0)??r} name=${this.name??r} @change=${this.handleChange} @input=${this.handleInput} placeholder=${this.placeholder??r} .readOnly=${this.readOnly} .required=${this.required} .rows=${this.rows} spellcheck=${this.el.spellcheck??r} .value=${x(this.value??"")} wrap=${this.wrap??r} ${m(this.setTextAreaEl)}></textarea><span class=${i({[a.content]:!0})}><slot @slotchange=${this.contentSlotChangeHandler}></slot></span><footer class=${i({[a.footer]:!0,[a.readOnly]:this.readOnly,[a.hide]:!e})} ${m(this.footerRef)}><div class=${i({[a.container]:!0,[a.footerEndSlotOnly]:!this.startSlotHasElements&&this.endSlotHasElements})}><slot name=${D.footerStart} @slotchange=${t=>this.startSlotHasElements=u(t)}></slot><slot name=${D.footerEnd} @slotchange=${t=>this.endSlotHasElements=u(t)}></slot></div>${this.renderCharacterLimit()}</footer>${I({component:this})}${this.isCharacterLimitExceeded()&&s`<span aria-live=polite class=${i(a.assistiveText)} id=${this.guid??r}>${this.replacePlaceholdersInMessages()}</span>`||""}${this.validationMessage&&this.status==="invalid"?B({icon:this.validationIcon,id:V.validationMessage,message:this.validationMessage,ref:this.setValidationRef,scale:this.scale,status:this.status}):null}</div>`})}renderCharacterLimit(){return this.maxLength?(this.localizedCharacterLengthObj=this.getLocalizedCharacterLength(),s`<span class=${i(a.characterLimit)}><span class=${i({[a.characterOverLimit]:this.isCharacterLimitExceeded()})}>${this.localizedCharacterLengthObj.currentLength}</span>/${this.localizedCharacterLengthObj.maxLength}</span>`):null}};w("calcite-text-area",p);export{p as TextArea};
3
+ v5.0.0-next.5 */
4
+ import{a as N}from"./7NUC3WBG.js";import{k as c}from"./CVLFEMH2.js";import{a as B}from"./RI3NRBMI.js";import{a as q}from"./KRHM7ACI.js";import{c as W,d as F,e as j}from"./ZVWKN3G7.js";import{c as H,e as T,h as I}from"./Y3HXK6MO.js";import{a as O,b as A}from"./NSBK36H4.js";import{a as R}from"./PSCEW76J.js";import{c as M}from"./W5OJOVZY.js";import"./S5CLKCGJ.js";import{a as k,b as L}from"./ALDDSDTX.js";import{a as C}from"./LH7245HX.js";import{a as $}from"./WOTQIMPZ.js";import{b as E}from"./B5JXPZDV.js";import"./3YZG7MA3.js";import"./CIU4VM7X.js";import{t as u}from"./5IPJANUU.js";import{a as S}from"./ZLR2B6GQ.js";import{A as x,B as b,C as m,D as y,E as i,G as r,I as z,P as w,g as v,h as s,o as g}from"./AUIOWPFN.js";var a={assistiveText:"assistive-text",characterLimit:"character-limit",content:"content",container:"container",footer:"footer",characterOverLimit:"character--over-limit",readOnly:"readonly",textAreaInvalid:"text-area--invalid",footerSlotted:"footer--slotted",hide:"hide",footerEndSlotOnly:"footer--end-only",textArea:"text-area",textAreaOnly:"text-area--only",wrapper:"wrapper"},V={validationMessage:"textAreaValidationMessage"},D={footerStart:"footer-start",footerEnd:"footer-end"},U=100,f=Object.freeze({height:0,width:0}),_=v`: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{position:relative;box-sizing:border-box;display:inline-block;block-size:100%;inline-size:100%;--calcite-internal-text-area-border-color: var(--calcite-text-area-border-color, var(--calcite-color-border-input));--calcite-internal-text-area-footer-border-color: var( --calcite-text-area-footer-border-color, var(--calcite-internal-text-area-border-color) );--calcite-internal-text-area-corner-radius: var( --calcite-text-area-corner-radius, var(--calcite-corner-radius-default) );--calcite-internal-text-area-shadow: var(--calcite-text-area-shadow, var(--calcite-shadow-none));--calcite-internal-text-area-footer-background-color: var( --calcite-text-area-footer-background-color, var(--calcite-text-area-background-color, var(--calcite-color-foreground-1)) );min-block-size:var(--calcite-text-area-min-height, calc(2 * var(--calcite-internal-text-area-padding-block) + 2 * var(--calcite-border-width-sm)));min-inline-size:var(--calcite-text-area-min-width, 12rem)}.wrapper{box-sizing:border-box;block-size:100%;inline-size:100%;box-shadow:var(--calcite-internal-text-area-shadow);border-radius:var(--calcite-internal-text-area-corner-radius)}.text-area,.footer{font-size:var(--calcite-text-area-font-size, var(--calcite-font-size--1));padding-block:var(--calcite-internal-text-area-padding-block);padding-inline:var(--calcite-internal-text-area-padding-inline)}.footer{background-color:var(--calcite-internal-text-area-footer-background-color);border-radius:0 0 var(--calcite-internal-text-area-corner-radius) var(--calcite-internal-text-area-corner-radius)}.text-area{position:relative;margin:0;box-sizing:border-box;display:block;inline-size:100%;--calcite-internal-text-area-border-block-end-color: var(--calcite-internal-text-area-border-color);border:var(--calcite-border-width-sm) solid var(--calcite-internal-text-area-border-color);border-block-end-color:var(--calcite-internal-text-area-border-block-end-color);color:var(--calcite-text-area-text-color, var(--calcite-color-text-1));font-family:inherit;max-block-size:var(--calcite-text-area-max-height);min-block-size:calc(var(--calcite-text-area-min-height, 0px) - var(--calcite-internal-text-area-footer-min-height, 0px));max-inline-size:var(--calcite-text-area-max-width);min-inline-size:var(--calcite-text-area-min-width, 12rem);background-color:var(--calcite-text-area-background-color, var(--calcite-color-foreground-1));border-radius:var(--calcite-internal-text-area-corner-radius) var(--calcite-internal-text-area-corner-radius) 0 0}.text-area::placeholder{font-weight:var(--calcite-font-weight-normal)}@media screen and (max-width:480px){.text-area{resize:none}}.text-area: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))))}.text-area.text-area--invalid{--calcite-internal-text-area-border-color: var(--calcite-color-status-danger)}.text-area.text-area--invalid:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.text-area.footer--slotted{min-inline-size:18rem}.text-area.text-area--only{border-radius:var(--calcite-internal-text-area-corner-radius)}.text-area:not(.text-area--only,.text-area--invalid){--calcite-internal-text-area-border-block-end-color: var( --calcite-text-area-divider-color, var(--calcite-color-border-3) )}.footer{box-sizing:border-box;display:flex;align-items:center;border:var(--calcite-border-width-sm) solid var(--calcite-internal-text-area-footer-border-color);border-block-start:var(--calcite-border-width-none);min-block-size:var(--calcite-internal-text-area-footer-min-height)}.character-limit{display:flex;align-items:center;justify-content:flex-end;white-space:nowrap;font-size:var(--calcite-text-area-font-size, var(--calcite-font-size--1));font-weight:var(--calcite-font-weight-regular);color:var(--calcite-text-area-character-limit-text-color, var(--calcite-color-text-2));padding-inline-start:var(--calcite-spacing-md)}.character--over-limit{font-weight:var(--calcite-font-weight-bold);color:var(--calcite-color-status-danger)}.readonly{background-color:var(--calcite-text-area-background-color, var(--calcite-color-background));font-weight:var(--calcite-font-weight-medium)}.footer.readonly{background-color:var(--calcite-internal-text-area-footer-background-color, var(--calcite-color-background))}.content,.hide{display:none}.container{display:flex;inline-size:100%;justify-content:space-between}.footer--end-only{justify-content:flex-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}.text-area.text-area--only{block-size:100%;min-block-size:var(--calcite-text-area-min-height, 0)}:host([resize=none]) .text-area{resize:none}:host([resize=horizontal]) .text-area{resize:horizontal}:host([resize=vertical]) .text-area{resize:vertical}:host([scale=s]){--calcite-internal-text-area-padding-block: var(--calcite-spacing-xxs);--calcite-internal-text-area-padding-inline: var(--calcite-spacing-sm);--calcite-internal-text-area-footer-min-height: 1.75rem}:host([scale=s]) .text-area,:host([scale=s]) .footer,:host([scale=s]) .character-limit{font-size:var(--calcite-text-area-font-size, var(--calcite-font-size--2))}:host([scale=s]) .character-limit{padding-inline-start:var(--calcite-spacing-sm)}:host([scale=m]){--calcite-internal-text-area-padding-block: var(--calcite-spacing-sm);--calcite-internal-text-area-padding-inline: var(--calcite-spacing-md);--calcite-internal-text-area-footer-min-height: 2.25rem}:host([scale=l]){--calcite-internal-text-area-padding-block: var(--calcite-spacing-md);--calcite-internal-text-area-padding-inline: var(--calcite-spacing-lg);--calcite-internal-text-area-footer-min-height: 2.75rem}:host([scale=l]) .text-area,:host([scale=l]) .footer,:host([scale=l]) .character-limit{font-size:var(--calcite-text-area-font-size, var(--calcite-font-size-0))}:host([scale=l]) .character-limit{padding-inline-start:var(--calcite-spacing-lg)}:host([status=invalid]){--calcite-internal-text-area-border-color: var(--calcite-color-status-danger)}:host([status=invalid]) .text-area:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([disabled]) .text-area,:host([disabled]) .footer{opacity:var(--calcite-opacity-half)}.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([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}::placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-placeholder-text-color, var(--calcite-color-text-3))}`,p=class extends y{constructor(){super(...arguments),this.attributeWatch=E(["autofocus","spellcheck"],this.handleGlobalAttributesChanged),this.footerRef=b(),this.guid=S(),this.resizeObserver=k("resize",async()=>{await this.componentOnReady();let{textAreaHeight:e,textAreaWidth:t,elHeight:l,elWidth:n,footerHeight:d,footerWidth:o,validationMessageHeight:h}=this.getHeightAndWidthOfElements();if(o>0&&o!==t&&(this.footerRef.value.style.width=`${t}px`),this.resize==="none")return;let{width:G,height:P}=getComputedStyle(this.el);n!==t&&G!=="auto"&&this.updateSizeToAuto("width"),l!==e+d+h&&P!=="auto"&&this.updateSizeToAuto("height")}),this.cancelable=R()(this),this.updateSizeToAuto=M(e=>{this.el.style[e]="auto"},U,{edges:["trailing"]}),this.messages=C({blocking:!0}),this.focusSetter=$()(this),this.disabled=!1,this.groupSeparator=!1,this.limitText=!1,this.readOnly=!1,this.required=!1,this.resize="both",this.scale="m",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.value="",this.wrap="soft",this.calciteTextAreaChange=g(),this.calciteTextAreaInput=g()}static{this.properties={endSlotHasElements:[16,{},{state:!0}],startSlotHasElements:[16,{},{state:!0}],columns:[11,{},{reflect:!0,type:Number}],disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],groupSeparator:[7,{},{reflect:!0,type:Boolean}],label:1,labelText:1,limitText:[7,{},{reflect:!0,type:Boolean}],maxLength:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],minLength:[11,{},{reflect:!0,type:Number}],name:[3,{},{reflect:!0}],numberingSystem:1,placeholder:1,readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],resize:[3,{},{reflect:!0}],rows:[11,{},{reflect:!0,type:Number}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:z,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:1,wrap:[3,{},{reflect:!0}]}}static{this.styles=_}async selectText(){await this.componentOnReady(),this.textAreaEl?.select()}async setFocus(e){return this.focusSetter(()=>this.textAreaEl,e)}connectedCallback(){super.connectedCallback(),W(this),H(this),this.cancelable.add(this.updateSizeToAuto)}updated(){O(this),this.setTextAreaHeight()}disconnectedCallback(){super.disconnectedCallback(),F(this),T(this),this.resizeObserver?.disconnect()}handleGlobalAttributesChanged(){this.requestUpdate()}onLabelClick(){this.setFocus()}handleInput(e){this.value=e.target.value,this.calciteTextAreaInput.emit()}handleChange(){this.calciteTextAreaChange.emit()}contentSlotChangeHandler(){this.value||this.el.childNodes.forEach(t=>{t.nodeName==="#text"&&(this.value=t.nodeValue.trim())})}getLocalizedCharacterLength(){let e=this.value?this.value.length.toString():"0",t=this.maxLength.toString();return this.numberingSystem==="latn"?{currentLength:e,maxLength:t}:(c.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,signDisplay:"never",useGrouping:this.groupSeparator},{currentLength:c.localize(e),maxLength:c.localize(t)})}syncHiddenFormInput(e){e.setCustomValidity(""),this.isCharacterLimitExceeded()&&e.setCustomValidity(this.replacePlaceholdersInMessages()),N("textarea",this,e)}setTextAreaEl(e){L(this.resizeObserver,this.textAreaEl,e),this.textAreaEl=e}setTextAreaHeight(){let{textAreaHeight:e,elHeight:t,footerHeight:l,validationMessageHeight:n}=this.getHeightAndWidthOfElements();l>0&&e+l+n!=t&&(this.textAreaEl.style.height=`${t-l}px`)}getHeightAndWidthOfElements(){let{height:e,width:t}=this.textAreaEl?this.textAreaEl.getBoundingClientRect():f,{height:l,width:n}=this.el.getBoundingClientRect(),{height:d,width:o}=this.footerRef.value?this.footerRef.value.getBoundingClientRect():f,{height:h}=this.validationMessageEl?this.validationMessageEl.getBoundingClientRect():f;return{textAreaHeight:e,textAreaWidth:t,elHeight:l,elWidth:n,footerHeight:d,footerWidth:o,validationMessageHeight:h}}replacePlaceholdersInMessages(){return this.messages.tooLong.replace("{maxLength}",this.localizedCharacterLengthObj.maxLength).replace("{currentLength}",this.localizedCharacterLengthObj.currentLength)}isCharacterLimitExceeded(){return this.value?.length>this.maxLength}setValidationRef(e){e&&(this.validationMessageEl=e)}render(){let e=this.startSlotHasElements||this.endSlotHasElements||!!this.maxLength;return A({disabled:this.disabled,children:s`<div class=${i(a.wrapper)}>${this.labelText&&q({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<textarea aria-describedby=${this.guid??r} aria-errormessage=${V.validationMessage} .ariaInvalid=${this.status==="invalid"||this.isCharacterLimitExceeded()} .ariaLabel=${j(this)} .autofocus=${this.el.autofocus} class=${i({[a.textArea]:!0,[a.readOnly]:this.readOnly,[a.textAreaInvalid]:this.isCharacterLimitExceeded(),[a.footerSlotted]:this.endSlotHasElements&&this.startSlotHasElements,[a.textAreaOnly]:!e})} .cols=${this.columns} .disabled=${this.disabled} maxlength=${(this.limitText?this.maxLength:void 0)??r} name=${this.name??r} @change=${this.handleChange} @input=${this.handleInput} placeholder=${this.placeholder??r} .readOnly=${this.readOnly} .required=${this.required} .rows=${this.rows} spellcheck=${this.el.spellcheck??r} .value=${x(this.value??"")} wrap=${this.wrap??r} ${m(this.setTextAreaEl)}></textarea><span class=${i({[a.content]:!0})}><slot @slotchange=${this.contentSlotChangeHandler}></slot></span><footer class=${i({[a.footer]:!0,[a.readOnly]:this.readOnly,[a.hide]:!e})} ${m(this.footerRef)}><div class=${i({[a.container]:!0,[a.footerEndSlotOnly]:!this.startSlotHasElements&&this.endSlotHasElements})}><slot name=${D.footerStart} @slotchange=${t=>this.startSlotHasElements=u(t)}></slot><slot name=${D.footerEnd} @slotchange=${t=>this.endSlotHasElements=u(t)}></slot></div>${this.renderCharacterLimit()}</footer>${I({component:this})}${this.isCharacterLimitExceeded()&&s`<span aria-live=polite class=${i(a.assistiveText)} id=${this.guid??r}>${this.replacePlaceholdersInMessages()}</span>`||""}${this.validationMessage&&this.status==="invalid"?B({icon:this.validationIcon,id:V.validationMessage,message:this.validationMessage,ref:this.setValidationRef,scale:this.scale,status:this.status}):null}</div>`})}renderCharacterLimit(){return this.maxLength?(this.localizedCharacterLengthObj=this.getLocalizedCharacterLength(),s`<span class=${i(a.characterLimit)}><span class=${i({[a.characterOverLimit]:this.isCharacterLimitExceeded()})}>${this.localizedCharacterLengthObj.currentLength}</span>/${this.localizedCharacterLengthObj.maxLength}</span>`):null}};w("calcite-text-area",p);export{p as TextArea};
@@ -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.3 */
4
- import{a as C,t as m}from"./HXF4YIAH.js";import"./3GUK3G7C.js";import{a as y}from"./7WAFUV2T.js";import{d as z}from"./SLICSH62.js";import"./DNM3U3Z7.js";import{D as S,E as l,P as k,g,h as $,i as a,l as t}from"./ALOAVLGK.js";var h={swatch:"swatch",noColorSwatch:"swatch--no-color",checker:"checker"},x={borderLight:"rgba(0, 0, 0, 0.3)",borderDark:"rgba(255, 255, 255, 0.15)"},b=4,i={squareSize:b,size:b*2},v={checker:"checker",shape:"shape"},R=g`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{position:relative;display:inline-flex}:host([scale=s]){block-size:1.25rem;inline-size:1.25rem}:host([scale=m]){block-size:1.5rem;inline-size:1.5rem}:host([scale=l]){block-size:2rem;inline-size:2rem}.swatch{overflow:hidden;block-size:inherit;inline-size:inherit}.swatch rect{transition-property:all;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1)}.swatch--no-color rect{fill:var(--calcite-color-foreground-1)}.swatch--no-color line{stroke:var(--calcite-color-status-danger)}.checker{fill:#cacaca}:host([hidden]){display:none}[hidden]{display:none}`,u=class extends S{constructor(){super(...arguments),this.active=!1,this.scale="m"}static{this.properties={active:[7,{},{reflect:!0,type:Boolean}],color:1,scale:[3,{},{reflect:!0}]}}static{this.styles=R}load(){this.handleColorChange(this.color)}willUpdate(e){e.has("color")&&this.handleColorChange(this.color)}handleColorChange(e){this.internalColor=e?C(e):null}render(){let e=!this.internalColor,c={[h.swatch]:!0,[h.noColorSwatch]:e};return $`<svg class=${l(c)} xmlns=http://www.w3.org/2000/svg>${this.renderSwatch()}</svg>`}renderSwatch(){let{active:e,el:c,internalColor:s}=this,o=e?"100%":"0",n=z(c)==="light"?x.borderLight:x.borderDark,d=!s,r={height:"100%",rx:o,stroke:n,strokeWidth:"2",width:"100%"};if(d)return a`<clipPath id=${v.shape}><rect height=100% rx=${o??t} width=100% /></clipPath>${this.renderSwatchRect({clipPath:`inset(0 round ${o})`,...r})}<line clip-path=url(#shape) stroke-width=3 x1=100% x2=0 y1=0 y2=100% />`;let p=s.alpha(),q=m(s),f=m(s,p<1);return a`<title>${f}</title><defs><pattern height=${i.size} id=${v.checker} patternUnits=userSpaceOnUse width=${i.size} x=0 y=0><rect class=${l(h.checker)} height=${i.squareSize} width=${i.squareSize} x=0 y=0 /><rect class=${l(h.checker)} height=${i.squareSize} width=${i.squareSize} x=${i.squareSize} y=${i.squareSize} /></pattern></defs>${this.renderSwatchRect({fill:"url(#checker)",rx:r.rx,height:r.height,width:r.width})}${this.renderSwatchRect({clipPath:p<1?"polygon(100% 0, 0 0, 0 100%)":`inset(0 round ${o})`,fill:q,...r})}${p<1?this.renderSwatchRect({clipPath:"polygon(100% 0, 100% 100%, 0 100%)",fill:f,key:"opacity-fill",...r}):null}`}renderSwatchRect({clipPath:e,fill:c,height:s,key:o,rx:w,stroke:n,strokeWidth:d,width:r}){return y(o,a`<rect clip-path=${e??t} fill=${c??t} height=${s??t} rx=${w??t} stroke=${n??t} stroke-width=${d??t} width=${r??t} />`)}};k("calcite-color-picker-swatch",u);export{u as ColorPickerSwatch};
3
+ v5.0.0-next.5 */
4
+ import{a as C,t as m}from"./V4NPQ4WA.js";import"./FZIUTVKD.js";import{a as y}from"./NULQJBCW.js";import{d as z}from"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{D as S,E as l,P as k,g,h as $,i as a,l as t}from"./AUIOWPFN.js";var h={swatch:"swatch",noColorSwatch:"swatch--no-color",checker:"checker"},x={borderLight:"rgba(0, 0, 0, 0.3)",borderDark:"rgba(255, 255, 255, 0.15)"},b=4,i={squareSize:b,size:b*2},v={checker:"checker",shape:"shape"},R=g`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{position:relative;display:inline-flex}:host([scale=s]){block-size:1.25rem;inline-size:1.25rem}:host([scale=m]){block-size:1.5rem;inline-size:1.5rem}:host([scale=l]){block-size:2rem;inline-size:2rem}.swatch{overflow:hidden;block-size:inherit;inline-size:inherit}.swatch rect{transition-property:all;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1)}.swatch--no-color rect{fill:var(--calcite-color-foreground-1)}.swatch--no-color line{stroke:var(--calcite-color-status-danger)}.checker{fill:#cacaca}:host([hidden]){display:none}[hidden]{display:none}`,u=class extends S{constructor(){super(...arguments),this.active=!1,this.scale="m"}static{this.properties={active:[7,{},{reflect:!0,type:Boolean}],color:1,scale:[3,{},{reflect:!0}]}}static{this.styles=R}load(){this.handleColorChange(this.color)}willUpdate(e){e.has("color")&&this.handleColorChange(this.color)}handleColorChange(e){this.internalColor=e?C(e):null}render(){let e=!this.internalColor,c={[h.swatch]:!0,[h.noColorSwatch]:e};return $`<svg class=${l(c)} xmlns=http://www.w3.org/2000/svg>${this.renderSwatch()}</svg>`}renderSwatch(){let{active:e,el:c,internalColor:s}=this,o=e?"100%":"0",n=z(c)==="light"?x.borderLight:x.borderDark,d=!s,r={height:"100%",rx:o,stroke:n,strokeWidth:"2",width:"100%"};if(d)return a`<clipPath id=${v.shape}><rect height=100% rx=${o??t} width=100% /></clipPath>${this.renderSwatchRect({clipPath:`inset(0 round ${o})`,...r})}<line clip-path=url(#shape) stroke-width=3 x1=100% x2=0 y1=0 y2=100% />`;let p=s.alpha(),q=m(s),f=m(s,p<1);return a`<title>${f}</title><defs><pattern height=${i.size} id=${v.checker} patternUnits=userSpaceOnUse width=${i.size} x=0 y=0><rect class=${l(h.checker)} height=${i.squareSize} width=${i.squareSize} x=0 y=0 /><rect class=${l(h.checker)} height=${i.squareSize} width=${i.squareSize} x=${i.squareSize} y=${i.squareSize} /></pattern></defs>${this.renderSwatchRect({fill:"url(#checker)",rx:r.rx,height:r.height,width:r.width})}${this.renderSwatchRect({clipPath:p<1?"polygon(100% 0, 0 0, 0 100%)":`inset(0 round ${o})`,fill:q,...r})}${p<1?this.renderSwatchRect({clipPath:"polygon(100% 0, 100% 100%, 0 100%)",fill:f,key:"opacity-fill",...r}):null}`}renderSwatchRect({clipPath:e,fill:c,height:s,key:o,rx:w,stroke:n,strokeWidth:d,width:r}){return y(o,a`<rect clip-path=${e??t} fill=${c??t} height=${s??t} rx=${w??t} stroke=${n??t} stroke-width=${d??t} width=${r??t} />`)}};k("calcite-color-picker-swatch",u);export{u as ColorPickerSwatch};
@@ -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.3 */
4
- import{a,b,c}from"./UA4KBTNZ.js";import"./NHUHCQ4J.js";export{b as extractRegion,c as getCountry,a as global};
3
+ v5.0.0-next.5 */
4
+ import{a,b,c}from"./NID6WJOW.js";import"./WPTOKN7K.js";export{b as extractRegion,c as getCountry,a as global};
@@ -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.3 */
4
- import{a}from"./EFEUKCWA.js";import{c as $}from"./XAUVURWR.js";import{e as S}from"./SLICSH62.js";import{C as A,h as g,l as v}from"./ALOAVLGK.js";var b=t=>Array.from(t.querySelectorAll("calcite-action")).filter(e=>e.closest("calcite-action-menu")?e.slot===$.trigger:!0),D=({actionGroups:t,expanded:e,overflowCount:o})=>{let c=o;t.reverse().forEach(l=>{let i=0,s=b(l).reverse();s.forEach(n=>{n.slot===a.menuActions&&(n.removeAttribute("slot"),n.textEnabled=e)}),c>0&&s.some(n=>(s.filter(u=>!u.slot).length>1&&s.length>2&&!n.closest("calcite-action-menu")&&(n.textEnabled=!0,n.setAttribute("slot",a.menuActions),i++,i>1&&c--),c<1)),l.manager.component.requestUpdate()})},E={chevronsLeft:"chevrons-left",chevronsRight:"chevrons-right"};function y(t,e){return t||e.closest("calcite-shell-panel")?.position||"start"}function G({el:t,expanded:e}){b(t).filter(o=>o.slot!==a.menuActions).forEach(o=>o.textEnabled=e),t.querySelectorAll("calcite-action-group, calcite-action-menu").forEach(o=>o.expanded=e)}var L=({tooltip:t,referenceElement:e,expanded:o,ref:c})=>(t&&(t.referenceElement=!o&&e?e:null),c&&c(e),e),P=({expanded:t,expandText:e,collapseText:o,expandLabel:c,collapseLabel:l,toggle:i,el:s,position:n,tooltip:f,ref:u,scale:d})=>{let T=S(s)==="rtl",m=t?o:e,p=t?l:c,r=[E.chevronsLeft,E.chevronsRight];T&&r.reverse();let h=y(n,s)==="end",q=h?r[1]:r[0],x=h?r[0]:r[1];return g`<calcite-action .aria=${{expanded:t}} .icon=${t?q:x} id=expand-toggle .label=${p} @click=${i} .scale=${d} .text=${m} .textEnabled=${t} title=${(!t&&!f?m:null)??v} ${A(C=>L({tooltip:f,referenceElement:C,expanded:t,ref:u}))}></calcite-action>`};export{b as a,D as b,G as c,P as d};
3
+ v5.0.0-next.5 */
4
+ import{a}from"./NLYYOFNV.js";import{c as $}from"./H2FWQITV.js";import{e as S}from"./5IPJANUU.js";import{C as A,h as g,l as v}from"./AUIOWPFN.js";var b=t=>Array.from(t.querySelectorAll("calcite-action")).filter(e=>e.closest("calcite-action-menu")?e.slot===$.trigger:!0),D=({actionGroups:t,expanded:e,overflowCount:o})=>{let c=o;t.reverse().forEach(l=>{let i=0,s=b(l).reverse();s.forEach(n=>{n.slot===a.menuActions&&(n.removeAttribute("slot"),n.textEnabled=e)}),c>0&&s.some(n=>(s.filter(u=>!u.slot).length>1&&s.length>2&&!n.closest("calcite-action-menu")&&(n.textEnabled=!0,n.setAttribute("slot",a.menuActions),i++,i>1&&c--),c<1)),l.manager.component.requestUpdate()})},E={chevronsLeft:"chevrons-left",chevronsRight:"chevrons-right"};function y(t,e){return t||e.closest("calcite-shell-panel")?.position||"start"}function G({el:t,expanded:e}){b(t).filter(o=>o.slot!==a.menuActions).forEach(o=>o.textEnabled=e),t.querySelectorAll("calcite-action-group, calcite-action-menu").forEach(o=>o.expanded=e)}var L=({tooltip:t,referenceElement:e,expanded:o,ref:c})=>(t&&(t.referenceElement=!o&&e?e:null),c&&c(e),e),P=({expanded:t,expandText:e,collapseText:o,expandLabel:c,collapseLabel:l,toggle:i,el:s,position:n,tooltip:f,ref:u,scale:d})=>{let T=S(s)==="rtl",m=t?o:e,p=t?l:c,r=[E.chevronsLeft,E.chevronsRight];T&&r.reverse();let h=y(n,s)==="end",q=h?r[1]:r[0],x=h?r[0]:r[1];return g`<calcite-action .aria=${{expanded:t}} .icon=${t?q:x} id=expand-toggle .label=${p} @click=${i} .scale=${d} .text=${m} .textEnabled=${t} title=${(!t&&!f?m:null)??v} ${A(C=>L({tooltip:f,referenceElement:C,expanded:t,ref:u}))}></calcite-action>`};export{b as a,D as b,G as c,P as d};
@@ -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.3 */
4
- import{a as d}from"./PDC2HFCE.js";import{a as n}from"./RSQ6RL3K.js";import{D as l,E as i,P as c,g as o,h as t,o as r}from"./ALOAVLGK.js";var s={title:"title",firstTitle:"first-title",separator:"separator"},h=o`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:block}.container{text-align:start}.title{margin-block-end:-1px;display:block;cursor:default;overflow-wrap:break-word;border-width:0px;font-weight:var(--calcite-font-weight-bold);color:var(--calcite-dropdown-group-title-text-color, var(--calcite-color-text-1))}.separator{display:block;block-size:1px;background-color:var(--calcite-dropdown-group-border-color, var(--calcite-color-border-3))}:host([scale=s]){font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s]) .title{padding-block:var(--calcite-spacing-xxs);padding-inline:var(--calcite-spacing-sm)}:host([scale=s]) .first-title{padding-block-start:var(--calcite-spacing-sm)}:host([scale=s]) .separator{margin-block:var(--calcite-spacing-xxs);margin-inline:var(--calcite-spacing-sm)}:host([scale=m]){font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) .title{padding-block:var(--calcite-spacing-sm);padding-inline:var(--calcite-spacing-md)}:host([scale=m]) .first-title{padding-block-start:var(--calcite-spacing-lg)}:host([scale=m]) .separator{margin-block:var(--calcite-spacing-sm);margin-inline:var(--calcite-spacing-md)}:host([scale=l]){font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .title{padding-block:var(--calcite-spacing-sm-plus);padding-inline:var(--calcite-spacing-lg)}:host([scale=l]) .first-title{padding-block-start:var(--calcite-spacing-xl)}:host([scale=l]) .separator{margin-block:var(--calcite-spacing-sm-plus);margin-inline:var(--calcite-spacing-lg)}:host([hidden]){display:none}[hidden]{display:none}`,a=class extends l{constructor(){super(),this.mutationObserver=n("mutation",()=>this.updateItems()),this.position=-1,this.scale="m",this.selectionMode="single",this.calciteInternalDropdownItemChange=r({cancelable:!1}),this.listen("calciteInternalDropdownItemSelect",this.updateActiveItemOnChange)}static{this.properties={groupTitle:[3,{},{reflect:!0}],position:[9,{},{type:Number}],scale:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=h}connectedCallback(){super.connectedCallback(),this.updateItems(),this.mutationObserver?.observe(this.el,{childList:!0})}willUpdate(e){e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="single")&&this.updateItems()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}updateActiveItemOnChange(e){this.requestedDropdownGroup=e.detail.requestedDropdownGroup,this.requestedDropdownItem=e.detail.requestedDropdownItem,this.calciteInternalDropdownItemChange.emit({requestedDropdownGroup:this.requestedDropdownGroup,requestedDropdownItem:this.requestedDropdownItem})}updateItems(){Array.from(this.el.querySelectorAll("calcite-dropdown-item")).forEach(e=>e.selectionMode=this.selectionMode)}render(){let e=this.groupTitle?t`<span aria-hidden=true class=${i({[s.title]:!0,[s.firstTitle]:this.position===0})}>${this.groupTitle}</span>`:null,p=this.position>0?t`<div class=${i(s.separator)} role=separator></div>`:null;return this.el.ariaLabel=this.groupTitle,this.el.role="group",t`<div class=${i({[d.container]:!0})}>${p}${e}<slot></slot></div>`}};c("calcite-dropdown-group",a);export{a as DropdownGroup};
3
+ v5.0.0-next.5 */
4
+ import{a as d}from"./OCT7LR2O.js";import{a as n}from"./ALDDSDTX.js";import{D as l,E as i,P as c,g as o,h as t,o as r}from"./AUIOWPFN.js";var s={title:"title",firstTitle:"first-title",separator:"separator"},h=o`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:block}.container{text-align:start}.title{margin-block-end:-1px;display:block;cursor:default;overflow-wrap:break-word;border-width:0px;font-weight:var(--calcite-font-weight-bold);color:var(--calcite-dropdown-group-title-text-color, var(--calcite-color-text-1))}.separator{display:block;block-size:1px;background-color:var(--calcite-dropdown-group-border-color, var(--calcite-color-border-3))}:host([scale=s]){font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s]) .title{padding-block:var(--calcite-spacing-xxs);padding-inline:var(--calcite-spacing-sm)}:host([scale=s]) .first-title{padding-block-start:var(--calcite-spacing-sm)}:host([scale=s]) .separator{margin-block:var(--calcite-spacing-xxs);margin-inline:var(--calcite-spacing-sm)}:host([scale=m]){font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) .title{padding-block:var(--calcite-spacing-sm);padding-inline:var(--calcite-spacing-md)}:host([scale=m]) .first-title{padding-block-start:var(--calcite-spacing-lg)}:host([scale=m]) .separator{margin-block:var(--calcite-spacing-sm);margin-inline:var(--calcite-spacing-md)}:host([scale=l]){font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .title{padding-block:var(--calcite-spacing-sm-plus);padding-inline:var(--calcite-spacing-lg)}:host([scale=l]) .first-title{padding-block-start:var(--calcite-spacing-xl)}:host([scale=l]) .separator{margin-block:var(--calcite-spacing-sm-plus);margin-inline:var(--calcite-spacing-lg)}:host([hidden]){display:none}[hidden]{display:none}`,a=class extends l{constructor(){super(),this.mutationObserver=n("mutation",()=>this.updateItems()),this.position=-1,this.scale="m",this.selectionMode="single",this.calciteInternalDropdownItemChange=r({cancelable:!1}),this.listen("calciteInternalDropdownItemSelect",this.updateActiveItemOnChange)}static{this.properties={groupTitle:[3,{},{reflect:!0}],position:[9,{},{type:Number}],scale:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=h}connectedCallback(){super.connectedCallback(),this.updateItems(),this.mutationObserver?.observe(this.el,{childList:!0})}willUpdate(e){e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="single")&&this.updateItems()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}updateActiveItemOnChange(e){this.requestedDropdownGroup=e.detail.requestedDropdownGroup,this.requestedDropdownItem=e.detail.requestedDropdownItem,this.calciteInternalDropdownItemChange.emit({requestedDropdownGroup:this.requestedDropdownGroup,requestedDropdownItem:this.requestedDropdownItem})}updateItems(){Array.from(this.el.querySelectorAll("calcite-dropdown-item")).forEach(e=>e.selectionMode=this.selectionMode)}render(){let e=this.groupTitle?t`<span aria-hidden=true class=${i({[s.title]:!0,[s.firstTitle]:this.position===0})}>${this.groupTitle}</span>`:null,p=this.position>0?t`<div class=${i(s.separator)} role=separator></div>`:null;return this.el.ariaLabel=this.groupTitle,this.el.role="group",t`<div class=${i({[d.container]:!0})}>${p}${e}<slot></slot></div>`}};c("calcite-dropdown-group",a);export{a as DropdownGroup};
@@ -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.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};
3
+ v5.0.0-next.5 */
4
+ import{b as A}from"./DJVVGNTK.js";import{a as E,b as L,c as I,d as D,f as _,h as b}from"./LJI5SYGA.js";import{k as F}from"./CVLFEMH2.js";import{a as W,b as K}from"./RND3V33U.js";import{a as G,b as z}from"./NSBK36H4.js";import{a as g}from"./NULQJBCW.js";import{a as q}from"./PSCEW76J.js";import{a as B}from"./W5OJOVZY.js";import"./S5CLKCGJ.js";import{a as T}from"./ALDDSDTX.js";import{a as N}from"./LH7245HX.js";import{a as U}from"./WOTQIMPZ.js";import"./B5JXPZDV.js";import"./3YZG7MA3.js";import"./CIU4VM7X.js";import{g as R,t as v}from"./5IPJANUU.js";import{a as H}from"./ZLR2B6GQ.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"./AUIOWPFN.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};