@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{a as n}from"./7WAFUV2T.js";import{t as s,u as i}from"./SLICSH62.js";import"./DNM3U3Z7.js";import{D as g,E as r,P as u,g as f,h as a}from"./ALOAVLGK.js";var b=f`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host{position:absolute;inset:0;display:flex;block-size:100%;inline-size:100%;flex-direction:column;overflow:hidden}.main{position:relative;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;flex-direction:row;justify-content:space-between;overflow:hidden}.content{display:flex;block-size:100%;inline-size:100%;flex-direction:column;flex-wrap:nowrap;overflow:auto;justify-content:space-between}.content ::slotted(calcite-panel),.content ::slotted(calcite-flow){flex:1 1 auto;align-self:stretch;max-block-size:unset}.content--behind{position:absolute;inset:0;border-width:0px;z-index:calc(var(--calcite-z-index) - 1);display:initial}.content--non-interactive{pointer-events:none;display:flex;block-size:100%;inline-size:100%;flex-direction:column;flex-wrap:nowrap}::slotted(calcite-shell-panel){inline-size:unset}::slotted(.header .heading){font-size:var(--calcite-font-size--2);line-height:1.375;font-weight:var(--calcite-font-weight-normal)}slot[name=panel-start]::slotted(calcite-shell-panel),slot[name=panel-end]::slotted(calcite-shell-panel){position:relative;z-index:calc(var(--calcite-z-index) + 1)}slot[name=panel-end]::slotted(calcite-shell-panel){margin-inline-start:auto}::slotted(calcite-panel),::slotted(calcite-flow){border-width:var(--calcite-border-width-sm);border-color:var(--calcite-shell-border-color, var(--calcite-color-border-3));border-inline-start-width:var(--calcite-border-width-none);border-inline-end-width:var(--calcite-border-width-none);border-style:solid}slot[name=panel-top]::slotted(calcite-shell-panel:not([display-mode^=float])),slot[name=panel-bottom]::slotted(calcite-shell-panel:not([display-mode^=float])){border-color:var(--calcite-shell-border-color, var(--calcite-color-border-3));border-inline-start-width:var(--calcite-border-width-sm);border-inline-end-width:var(--calcite-border-width-sm)}.center-content{display:flex;flex-direction:column;justify-content:space-between;block-size:100%;inline-size:100%;min-inline-size:0}.content-bottom{justify-content:flex-end}::slotted(calcite-shell-panel){flex:none;align-self:stretch}::slotted(calcite-tip-manager){position:absolute;z-index:var(--calcite-z-index-toast);box-sizing:border-box}@keyframes in-up{0%{opacity:0;transform:translate3D(0,5px,0)}to{opacity:1;transform:translateZ(0)}}::slotted(calcite-tip-manager){animation:in-up var(--calcite-internal-animation-timing-slow) ease-in-out;border-radius:.25rem;--tw-shadow: 0 6px 20px -4px rgba(0, 0, 0, .1), 0 4px 12px -2px rgba(0, 0, 0, .08);--tw-shadow-colored: 0 6px 20px -4px var(--tw-shadow-color), 0 4px 12px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);inset-block-end:.5rem;inset-inline:var(--calcite-shell-tip-spacing, 26vw)}slot[name=panel-bottom]::slotted(calcite-shell-panel){margin-block-start:auto}slot[name=panel-top]::slotted(calcite-shell-panel){margin-block-end:auto}.position-wrapper{position:absolute;pointer-events:none;inset:0}:host([hidden]){display:none}[hidden]{display:none}`,o={main:"main",content:"content",contentBehind:"content--behind",contentBottom:"content-bottom",contentNonInteractive:"content--non-interactive",footer:"footer",positionedSlotWrapper:"positioned-slot-wrapper",contentBehindCenterContent:"center-content"},l={panelStart:"panel-start",panelEnd:"panel-end",panelTop:"panel-top",panelBottom:"panel-bottom",header:"header",footer:"footer",alerts:"alerts",sheets:"sheets",modals:"modals",dialogs:"dialogs"},h=class extends g{constructor(){super(),this.hasAlerts=!1,this.hasDialogs=!1,this.hasFooter=!1,this.hasHeader=!1,this.hasModals=!1,this.hasOnlyPanelBottom=!1,this.hasPanelBottom=!1,this.hasPanelTop=!1,this.hasSheets=!1,this.panelIsResizing=!1,this.contentBehind=!1,this.listen("calciteInternalShellPanelResizeStart",this.handleCalciteInternalShellPanelResizeStart),this.listen("calciteInternalShellPanelResizeEnd",this.handleCalciteInternalShellPanelResizeEnd)}static{this.properties={hasAlerts:[16,{},{state:!0}],hasDialogs:[16,{},{state:!0}],hasFooter:[16,{},{state:!0}],hasHeader:[16,{},{state:!0}],hasModals:[16,{},{state:!0}],hasOnlyPanelBottom:[16,{},{state:!0}],hasPanelBottom:[16,{},{state:!0}],hasPanelTop:[16,{},{state:!0}],hasSheets:[16,{},{state:!0}],panelIsResizing:[16,{},{state:!0}],contentBehind:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=b}willUpdate(t){(t.has("hasPanelTop")&&(this.hasUpdated||this.hasPanelTop!==!1)||t.has("hasPanelBottom")&&(this.hasUpdated||this.hasPanelBottom!==!1))&&(this.hasOnlyPanelBottom=!this.hasPanelTop&&this.hasPanelBottom)}handleCalciteInternalShellPanelResizeStart(t){this.panelIsResizing=!0,t.stopPropagation()}handleCalciteInternalShellPanelResizeEnd(t){this.panelIsResizing=!1,t.stopPropagation()}handleHeaderSlotChange(t){this.hasHeader=!!s(t)}handleFooterSlotChange(t){this.hasFooter=!!s(t)}handleAlertsSlotChange(t){this.hasAlerts=!!s(t),i(t).filter(e=>e?.matches("calcite-alert")).forEach(e=>{e.embedded=!0})}handleSheetsSlotChange(t){this.hasSheets=!!s(t),i(t).filter(e=>e?.matches("calcite-sheet")).forEach(e=>{e.embedded=!0})}handleModalsSlotChange(t){this.hasModals=!!s(t),i(t)?.filter(e=>e?.matches("calcite-modal")).forEach(e=>{e.embedded=!0})}handlePanelTopChange(t){this.hasPanelTop=s(t),i(t).filter(e=>e?.matches("calcite-shell-panel")).forEach(e=>{e.layout="horizontal",e.position="start"})}handlePanelBottomChange(t){this.hasPanelBottom=s(t),i(t).filter(e=>e?.matches("calcite-shell-panel")).forEach(e=>{e.layout="horizontal",e.position="end"})}handlePanelStartChange(t){i(t).filter(e=>e?.matches("calcite-shell-panel")).forEach(e=>{e.layout="vertical",e.position="start"})}handlePanelEndChange(t){i(t).filter(e=>e?.matches("calcite-shell-panel")).forEach(e=>{e.layout="vertical",e.position="end"})}handleDialogsSlotChange(t){this.hasDialogs=!!s(t),i(t).filter(e=>e?.matches("calcite-dialog")).forEach(e=>{e.embedded=!0})}renderHeader(){return a`<div .hidden=${!this.hasHeader}>${n("header",a`<slot name=${l.header} @slotchange=${this.handleHeaderSlotChange}></slot>`)}</div>`}renderFooter(){return n("footer",a`<div class=${r(o.footer)} .hidden=${!this.hasFooter}><slot name=${l.footer} @slotchange=${this.handleFooterSlotChange}></slot></div>`)}renderAlerts(){return a`<div .hidden=${!this.hasAlerts}>${n("alerts",a`<slot name=${l.alerts} @slotchange=${this.handleAlertsSlotChange}></slot>`)}</div>`}renderSheets(){return a`<div .hidden=${!this.hasSheets}>${n("sheets",a`<slot name=${l.sheets} @slotchange=${this.handleSheetsSlotChange}></slot>`)}</div>`}renderModals(){return a`<div .hidden=${!this.hasModals}>${n("modals",a`<slot name=${l.modals} @slotchange=${this.handleModalsSlotChange}></slot>`)}</div>`}renderDialogs(){return a`<div .hidden=${!this.hasDialogs}>${n("dialogs",a`<slot name=${l.dialogs} @slotchange=${this.handleDialogsSlotChange}></slot>`)}</div>`}renderContent(){let{panelIsResizing:t}=this,e=n("default-slot",a`<slot></slot>`),d=t?a`<div class=${r(o.contentNonInteractive)}>${e}</div>`:e,c=n("panel-bottom-slot",a`<slot name=${l.panelBottom} @slotchange=${this.handlePanelBottomChange}></slot>`),p=n("panel-top-slot",a`<slot name=${l.panelTop} @slotchange=${this.handlePanelTopChange}></slot>`),m="content-container";return this.contentBehind?[n(m,a`<div class=${r({[o.content]:!0,[o.contentBehind]:!0})}>${d}</div>`),a`<div class=${r({[o.contentBehindCenterContent]:!0,[o.contentBottom]:this.hasOnlyPanelBottom})}>${p}${c}</div>`]:[n(m,a`<div class=${r({[o.content]:!0,[o.contentBottom]:this.hasOnlyPanelBottom})}>${p}${d}${c}</div>`)]}renderMain(){return a`<div class=${r(o.main)}><slot name=${l.panelStart} @slotchange=${this.handlePanelStartChange}></slot>${this.renderContent()}<slot name=${l.panelEnd} @slotchange=${this.handlePanelEndChange}></slot></div>`}renderPositionedSlots(){return a`<div class=${r(o.positionedSlotWrapper)}>${this.renderAlerts()}${this.renderModals()}${this.renderDialogs()}${this.renderSheets()}</div>`}render(){return a`${this.renderHeader()}${this.renderMain()}${this.renderFooter()}${this.renderPositionedSlots()}`}};u("calcite-shell",h);export{h as Shell};
3
+ v5.0.0-next.5 */
4
+ import{a as n}from"./NULQJBCW.js";import{t as s,u as i}from"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{D as g,E as r,P as u,g as f,h as a}from"./AUIOWPFN.js";var b=f`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host{position:absolute;inset:0;display:flex;block-size:100%;inline-size:100%;flex-direction:column;overflow:hidden}.main{position:relative;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;flex-direction:row;justify-content:space-between;overflow:hidden}.content{display:flex;block-size:100%;inline-size:100%;flex-direction:column;flex-wrap:nowrap;overflow:auto;justify-content:space-between}.content ::slotted(calcite-panel),.content ::slotted(calcite-flow){flex:1 1 auto;align-self:stretch;max-block-size:unset}.content--behind{position:absolute;inset:0;border-width:0px;z-index:calc(var(--calcite-z-index) - 1);display:initial}.content--non-interactive{pointer-events:none;display:flex;block-size:100%;inline-size:100%;flex-direction:column;flex-wrap:nowrap}::slotted(calcite-shell-panel){inline-size:unset}::slotted(.header .heading){font-size:var(--calcite-font-size--2);line-height:1.375;font-weight:var(--calcite-font-weight-normal)}slot[name=panel-start]::slotted(calcite-shell-panel),slot[name=panel-end]::slotted(calcite-shell-panel){position:relative;z-index:calc(var(--calcite-z-index) + 1)}slot[name=panel-end]::slotted(calcite-shell-panel){margin-inline-start:auto}::slotted(calcite-panel),::slotted(calcite-flow){border-width:var(--calcite-border-width-sm);border-color:var(--calcite-shell-border-color, var(--calcite-color-border-3));border-inline-start-width:var(--calcite-border-width-none);border-inline-end-width:var(--calcite-border-width-none);border-style:solid}slot[name=panel-top]::slotted(calcite-shell-panel:not([display-mode^=float])),slot[name=panel-bottom]::slotted(calcite-shell-panel:not([display-mode^=float])){border-color:var(--calcite-shell-border-color, var(--calcite-color-border-3));border-inline-start-width:var(--calcite-border-width-sm);border-inline-end-width:var(--calcite-border-width-sm)}.center-content{display:flex;flex-direction:column;justify-content:space-between;block-size:100%;inline-size:100%;min-inline-size:0}.content-bottom{justify-content:flex-end}::slotted(calcite-shell-panel){flex:none;align-self:stretch}::slotted(calcite-tip-manager){position:absolute;z-index:var(--calcite-z-index-toast);box-sizing:border-box}@keyframes in-up{0%{opacity:0;transform:translate3D(0,5px,0)}to{opacity:1;transform:translateZ(0)}}::slotted(calcite-tip-manager){animation:in-up var(--calcite-internal-animation-timing-slow) ease-in-out;border-radius:.25rem;--tw-shadow: 0 6px 20px -4px rgba(0, 0, 0, .1), 0 4px 12px -2px rgba(0, 0, 0, .08);--tw-shadow-colored: 0 6px 20px -4px var(--tw-shadow-color), 0 4px 12px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);inset-block-end:.5rem;inset-inline:var(--calcite-shell-tip-spacing, 26vw)}slot[name=panel-bottom]::slotted(calcite-shell-panel){margin-block-start:auto}slot[name=panel-top]::slotted(calcite-shell-panel){margin-block-end:auto}.position-wrapper{position:absolute;pointer-events:none;inset:0}:host([hidden]){display:none}[hidden]{display:none}`,o={main:"main",content:"content",contentBehind:"content--behind",contentBottom:"content-bottom",contentNonInteractive:"content--non-interactive",footer:"footer",positionedSlotWrapper:"positioned-slot-wrapper",contentBehindCenterContent:"center-content"},l={panelStart:"panel-start",panelEnd:"panel-end",panelTop:"panel-top",panelBottom:"panel-bottom",header:"header",footer:"footer",alerts:"alerts",sheets:"sheets",modals:"modals",dialogs:"dialogs"},h=class extends g{constructor(){super(),this.hasAlerts=!1,this.hasDialogs=!1,this.hasFooter=!1,this.hasHeader=!1,this.hasModals=!1,this.hasOnlyPanelBottom=!1,this.hasPanelBottom=!1,this.hasPanelTop=!1,this.hasSheets=!1,this.panelIsResizing=!1,this.contentBehind=!1,this.listen("calciteInternalShellPanelResizeStart",this.handleCalciteInternalShellPanelResizeStart),this.listen("calciteInternalShellPanelResizeEnd",this.handleCalciteInternalShellPanelResizeEnd)}static{this.properties={hasAlerts:[16,{},{state:!0}],hasDialogs:[16,{},{state:!0}],hasFooter:[16,{},{state:!0}],hasHeader:[16,{},{state:!0}],hasModals:[16,{},{state:!0}],hasOnlyPanelBottom:[16,{},{state:!0}],hasPanelBottom:[16,{},{state:!0}],hasPanelTop:[16,{},{state:!0}],hasSheets:[16,{},{state:!0}],panelIsResizing:[16,{},{state:!0}],contentBehind:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=b}willUpdate(t){(t.has("hasPanelTop")&&(this.hasUpdated||this.hasPanelTop!==!1)||t.has("hasPanelBottom")&&(this.hasUpdated||this.hasPanelBottom!==!1))&&(this.hasOnlyPanelBottom=!this.hasPanelTop&&this.hasPanelBottom)}handleCalciteInternalShellPanelResizeStart(t){this.panelIsResizing=!0,t.stopPropagation()}handleCalciteInternalShellPanelResizeEnd(t){this.panelIsResizing=!1,t.stopPropagation()}handleHeaderSlotChange(t){this.hasHeader=!!s(t)}handleFooterSlotChange(t){this.hasFooter=!!s(t)}handleAlertsSlotChange(t){this.hasAlerts=!!s(t),i(t).filter(e=>e?.matches("calcite-alert")).forEach(e=>{e.embedded=!0})}handleSheetsSlotChange(t){this.hasSheets=!!s(t),i(t).filter(e=>e?.matches("calcite-sheet")).forEach(e=>{e.embedded=!0})}handleModalsSlotChange(t){this.hasModals=!!s(t),i(t)?.filter(e=>e?.matches("calcite-modal")).forEach(e=>{e.embedded=!0})}handlePanelTopChange(t){this.hasPanelTop=s(t),i(t).filter(e=>e?.matches("calcite-shell-panel")).forEach(e=>{e.layout="horizontal",e.position="start"})}handlePanelBottomChange(t){this.hasPanelBottom=s(t),i(t).filter(e=>e?.matches("calcite-shell-panel")).forEach(e=>{e.layout="horizontal",e.position="end"})}handlePanelStartChange(t){i(t).filter(e=>e?.matches("calcite-shell-panel")).forEach(e=>{e.layout="vertical",e.position="start"})}handlePanelEndChange(t){i(t).filter(e=>e?.matches("calcite-shell-panel")).forEach(e=>{e.layout="vertical",e.position="end"})}handleDialogsSlotChange(t){this.hasDialogs=!!s(t),i(t).filter(e=>e?.matches("calcite-dialog")).forEach(e=>{e.embedded=!0})}renderHeader(){return a`<div .hidden=${!this.hasHeader}>${n("header",a`<slot name=${l.header} @slotchange=${this.handleHeaderSlotChange}></slot>`)}</div>`}renderFooter(){return n("footer",a`<div class=${r(o.footer)} .hidden=${!this.hasFooter}><slot name=${l.footer} @slotchange=${this.handleFooterSlotChange}></slot></div>`)}renderAlerts(){return a`<div .hidden=${!this.hasAlerts}>${n("alerts",a`<slot name=${l.alerts} @slotchange=${this.handleAlertsSlotChange}></slot>`)}</div>`}renderSheets(){return a`<div .hidden=${!this.hasSheets}>${n("sheets",a`<slot name=${l.sheets} @slotchange=${this.handleSheetsSlotChange}></slot>`)}</div>`}renderModals(){return a`<div .hidden=${!this.hasModals}>${n("modals",a`<slot name=${l.modals} @slotchange=${this.handleModalsSlotChange}></slot>`)}</div>`}renderDialogs(){return a`<div .hidden=${!this.hasDialogs}>${n("dialogs",a`<slot name=${l.dialogs} @slotchange=${this.handleDialogsSlotChange}></slot>`)}</div>`}renderContent(){let{panelIsResizing:t}=this,e=n("default-slot",a`<slot></slot>`),d=t?a`<div class=${r(o.contentNonInteractive)}>${e}</div>`:e,c=n("panel-bottom-slot",a`<slot name=${l.panelBottom} @slotchange=${this.handlePanelBottomChange}></slot>`),p=n("panel-top-slot",a`<slot name=${l.panelTop} @slotchange=${this.handlePanelTopChange}></slot>`),m="content-container";return this.contentBehind?[n(m,a`<div class=${r({[o.content]:!0,[o.contentBehind]:!0})}>${d}</div>`),a`<div class=${r({[o.contentBehindCenterContent]:!0,[o.contentBottom]:this.hasOnlyPanelBottom})}>${p}${c}</div>`]:[n(m,a`<div class=${r({[o.content]:!0,[o.contentBottom]:this.hasOnlyPanelBottom})}>${p}${d}${c}</div>`)]}renderMain(){return a`<div class=${r(o.main)}><slot name=${l.panelStart} @slotchange=${this.handlePanelStartChange}></slot>${this.renderContent()}<slot name=${l.panelEnd} @slotchange=${this.handlePanelEndChange}></slot></div>`}renderPositionedSlots(){return a`<div class=${r(o.positionedSlotWrapper)}>${this.renderAlerts()}${this.renderModals()}${this.renderDialogs()}${this.renderSheets()}</div>`}render(){return a`${this.renderHeader()}${this.renderMain()}${this.renderFooter()}${this.renderPositionedSlots()}`}};u("calcite-shell",h);export{h as Shell};
@@ -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{g as X}from"./7STMP4B2.js";import{l as K}from"./I2EB746H.js";import{a as $}from"./OBEAWB6Y.js";import{c as J,d as Q}from"./5JALWDSF.js";import{c as H,e as W,f as j,h as A}from"./RWVRFF3I.js";import{a as G,b as q}from"./EU6IVBMM.js";import{a as _}from"./7WAFUV2T.js";import"./L6HFE67F.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"./SLICSH62.js";import"./DNM3U3Z7.js";import{B as R,C as z,D as M,E as k,I as E,P as V,g as P,h as I,l as y,o as b}from"./ALOAVLGK.js";var ae={offset:"offset"},se={labelContent:"label-content"},ie=60;function O(t){return t.replace(":15",".25").replace(":30",".5").replace(":45",".75").replace("\u2212","-")}function ne(t,e){let o=L(t,"en-US",e).replace("GMT","");return o===""?0:Number(O(o))*ie}function le(){return new Date().getTimezoneOffset()*-1}function re(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}async function ce(t){if(t==="offset")return o=>o;let{normalize:e}=await import("./MIR3A75I.js");return e}async function me(t,e,o,a,s){if(o==="name"){let{groupByName:i}=await import("./WWUSLEON.js");return(await i()).map(({label:n})=>({label:n,value:n,metadata:{filterValue:n}})).filter(n=>!!n).sort()}let l=s==="user"?t:s==="utc"?"fr":"en-GB",h=a.getTime();if(o==="region"){let[{groupByRegion:i},{getCountry:c,global:n}]=await Promise.all([import("./UCRIU7RD.js"),import("./K6F4PVVD.js")]);return(await i()).map(({label:m,tzs:d})=>(d.sort((u,f)=>{let v=T(u,e),x=T(f,e),p="Etc/GMT";if(u.startsWith(p)&&f.startsWith(p)){let g=u.substring(p.length),D=f.substring(p.length),oe=g===""?0:parseInt(g);return(D===""?0:parseInt(D))-oe}return v.localeCompare(x)}),{label:S(e,m),items:d.map(u=>{let f=O(L(u,l,h)),v=T(u,e),x=m===n?`${T(n,e)} Etc`:Y(u),p=c(u),g=S(e,p);return{label:v,value:u,metadata:{country:g===v?void 0:g,filterValue:x,offset:f}}})})).sort((m,d)=>m.label===n?-1:d.label===n?1:m.label.localeCompare(d.label))}let[{groupByOffset:C},{DateEngine:Z}]=await Promise.all([import("./4AHB62J2.js"),import("./2526AKXE.js")]),B=await C({dateEngine:new Z,groupDateRange:1,startDate:new Date(h).toISOString()}),te=new Intl.ListFormat(t,{style:"long",type:"conjunction"}),F=["Factory","Etc/UTC"];return B.forEach(i=>{let c=[],n=0;i.tzs.forEach((r,m)=>{F.includes(r)&&n++,c[m]=n}),i.tzs=i.tzs.filter(r=>!F.includes(r)),i.labelTzIdx=i.labelTzIdx.map(r=>r-c[r]).filter(r=>r>=0&&r<i.tzs.length)}),B.map(({labelTzIdx:i,tzs:c})=>{let n=c[0],r=O(L(n,l,h)),m=ne(n,h),d=i.map(f=>T(c[f],e));return{label:he(e,r,te.format(d)),value:m,metadata:{filterValue:c.map(f=>Y(f))}}}).filter(i=>!!i).sort((i,c)=>i.value-c.value)}function T(t,e){return e[t]||fe(t)}function ue(t,e,o){return o.timeZoneRegionLabel.replace("{city}",t).replace("{country}",S(o,e))}function S(t,e){return t[e]||e}function fe(t){return t.split("/").pop()}function Y(t){return t.replace(/_/g," ")}function he(t,e,o){return t.timeZoneLabel.replace("{offset}",e).replace("{cities}",o)}function L(t,e,o=Date.now()){return t==="Factory"&&(t="Etc/GMT"),K(e,{timeZone:t,timeZoneName:"shortOffset"}).formatToParts(o).find(({type:l})=>l==="timeZoneName").value}function de(t){return t[0].items!==void 0}function pe(t){return de(t)?t.flatMap(e=>e.items):t}function ee(t,e,o){return o==null?null:pe(t).find(a=>a[e]==o)}var be=P`: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}.offset{white-space:nowrap}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}`,w=class extends M{constructor(){super(...arguments),this.comboboxRef=R(),this.messages=N({blocking:!0}),this.focusSetter=U()(this),this.clearable=!1,this.disabled=!1,this.maxItems=0,this.mode="offset",this.offsetStyle="user",this.open=!1,this.overlayPositioning="absolute",this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.calciteInputTimeZoneBeforeClose=b({cancelable:!1}),this.calciteInputTimeZoneBeforeOpen=b({cancelable:!1}),this.calciteInputTimeZoneChange=b({cancelable:!1}),this.calciteInputTimeZoneClose=b({cancelable:!1}),this.calciteInputTimeZoneOpen=b({cancelable:!1})}static{this.properties={clearable:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],labelText:1,maxItems:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],mode:[3,{},{reflect:!0}],name:[3,{},{reflect:!0}],offsetStyle:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],readOnly:[7,{},{reflect:!0,type:Boolean}],referenceDate:1,required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:E,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:1}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=be}get value(){return this._value}set value(e){this._value=e}async setFocus(e){return this.focusSetter(()=>this.comboboxRef.value,e)}connectedCallback(){super.connectedCallback(),H(this),J(this)}async load(){this.normalizer=await ce(this.mode),await this.updateTimeZoneItems();let e=this.value,o=this.normalizeValue(e);this.value=o||(e===""?o:void 0),this.updateTimeZoneSelection();let a=this.selectedTimeZoneItem?`${this.selectedTimeZoneItem.value}`:"";j(this,a),this.value=a}willUpdate(e){e.has("value")&&this.hasUpdated&&this.handleValueChange(this.value,e.get("value")),(e.has("messages")||e.has("mode")&&(this.hasUpdated||this.mode!=="offset")||e.has("referenceDate"))&&this.handleTimeZoneItemPropsChange(),e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openChanged()}updated(){G(this)}loaded(){this.openChanged()}disconnectedCallback(){super.disconnectedCallback(),W(this),Q(this)}async handleTimeZoneItemPropsChange(){!this.timeZoneItems||!this.hasUpdated||(await this.updateTimeZoneItems(),this.updateTimeZoneSelection())}openChanged(){this.comboboxRef.value&&(this.comboboxRef.value.open=this.open)}async handleValueChange(e,o){let a=this.normalizeValue(e);if(!a){if(this.clearable){this._value=a,this.selectedTimeZoneItem=null;return}this._value=o,this.selectedTimeZoneItem=this.findTimeZoneItem(o);return}let s=this.findTimeZoneItem(a);if(!s){this._value=o;return}this._value=a,this.selectedTimeZoneItem=s}onLabelClick(){this.setFocus()}overrideSelectedLabelForRegion(e){this.mode!=="region"||!this.selectedTimeZoneItem||(this.comboboxRef.value.selectedItems[0].textLabel=this.getItemLabel(this.selectedTimeZoneItem,e))}onComboboxBeforeClose(e){e.stopPropagation(),this.overrideSelectedLabelForRegion(!1),this.calciteInputTimeZoneBeforeClose.emit()}onComboboxBeforeOpen(e){e.stopPropagation(),this.overrideSelectedLabelForRegion(!0),this.calciteInputTimeZoneBeforeOpen.emit()}onComboboxChange(e){e.stopPropagation();let a=e.target.selectedItems[0];if(!a){this._value="",this.selectedTimeZoneItem=null,this.calciteInputTimeZoneChange.emit();return}let s=this.findTimeZoneItemByLabel(a.getAttribute("data-label")),l=`${s.value}`;this.value===l&&s.label===this.selectedTimeZoneItem.label||(this._value=l,this.selectedTimeZoneItem=s,this.calciteInputTimeZoneChange.emit())}onComboboxClose(e){e.stopPropagation(),this.open=!1,this.calciteInputTimeZoneClose.emit()}onComboboxOpen(e){this.open=!0,e.stopPropagation(),this.calciteInputTimeZoneOpen.emit()}findTimeZoneItem(e){return ee(this.timeZoneItems,"value",e)}findTimeZoneItemByLabel(e){return ee(this.timeZoneItems,"label",e)}async updateTimeZoneItems(){this.timeZoneItems=await this.createTimeZoneItems()}updateTimeZoneSelection(){if(this.value===""&&this.clearable){this.selectedTimeZoneItem=null;return}let e=this.mode==="offset"?le():re(),o=this.value===""||!this.value?e:this.value;this.selectedTimeZoneItem=this.findTimeZoneItem(o)||this.findTimeZoneItem(e)}async createTimeZoneItems(){return!this.messages._lang||!this.messages?[]:me(this.messages._lang,this.messages,this.mode,this.referenceDate instanceof Date?this.referenceDate:new Date(this.referenceDate??Date.now()),this.offsetStyle)}normalizeValue(e){return e=e===void 0?"":e,e&&this.normalizer(e)}getItemLabel(e,o=this.open){let a=this.selectedTimeZoneItem===e,{label:s,metadata:l}=e;return!l.country||o||!a?s:ue(s,l.country,this.messages)}render(){return q({disabled:this.disabled,children:I`<calcite-combobox .clearDisabled=${!this.clearable} .disabled=${this.disabled} .label=${this.messages.chooseTimeZone} .labelText=${this.labelText} lang=${this.messages._lang??y} .maxItems=${this.maxItems} @calciteComboboxBeforeClose=${this.onComboboxBeforeClose} @calciteComboboxBeforeOpen=${this.onComboboxBeforeOpen} @calciteComboboxChange=${this.onComboboxChange} @calciteComboboxClose=${this.onComboboxClose} @calciteComboboxOpen=${this.onComboboxOpen} .overlayPositioning=${this.overlayPositioning} .placeholder=${this.mode==="name"?this.messages.namePlaceholder:this.mode==="offset"?this.messages.offsetPlaceholder:this.messages.regionPlaceholder} placeholder-icon=search .readOnly=${this.readOnly} .required=${this.required} .scale=${this.scale} .selectionMode=${this.clearable?"single":"single-persist"} .status=${this.status} .validationIcon=${this.validationIcon} .validationMessage=${this.validationMessage} ${z(this.comboboxRef)}>${this.renderItems()}<slot name=${se.labelContent} slot=${X.labelContent}></slot></calcite-combobox>${A({component:this})}`})}renderItems(){return this.mode==="region"?this.renderRegionItems():$(this.timeZoneItems,({label:e})=>e,e=>{let o=this.selectedTimeZoneItem===e,{label:a,metadata:s,value:l}=e;return I`<calcite-combobox-item data-label=${a??y} .metadata=${s} .selected=${o} .textLabel=${a} .value=${l}></calcite-combobox-item>`})}renderRegionItems(){return this.timeZoneItems.flatMap(({label:e,items:o})=>_(e,I`<calcite-combobox-item-group .label=${e}>${$(o,({label:a})=>a,a=>{let s=this.selectedTimeZoneItem===a,{label:l,metadata:h,value:C}=a,Z=this.getItemLabel(a);return I`<calcite-combobox-item data-label=${l??y} .description=${h.country} .metadata=${h} .selected=${s} .textLabel=${Z} .value=${C}><span class=${k(ae.offset)} slot=content-end>${h.offset}</span></calcite-combobox-item>`})}</calcite-combobox-item-group>`))}};V("calcite-input-time-zone",w);export{w as InputTimeZone};
3
+ v5.0.0-next.5 */
4
+ import{g as X}from"./YSP6WWQB.js";import{l as K}from"./CVLFEMH2.js";import{a as $}from"./AHOXXRX5.js";import{c as J,d as Q}from"./ZVWKN3G7.js";import{c as H,e as W,f as j,h as A}from"./Y3HXK6MO.js";import{a as G,b as q}from"./NSBK36H4.js";import{a as _}from"./NULQJBCW.js";import"./S5CLKCGJ.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"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{B as R,C as z,D as M,E as k,I as E,P as V,g as P,h as I,l as y,o as b}from"./AUIOWPFN.js";var ae={offset:"offset"},se={labelContent:"label-content"},ie=60;function O(t){return t.replace(":15",".25").replace(":30",".5").replace(":45",".75").replace("\u2212","-")}function ne(t,e){let o=L(t,"en-US",e).replace("GMT","");return o===""?0:Number(O(o))*ie}function le(){return new Date().getTimezoneOffset()*-1}function re(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}async function ce(t){if(t==="offset")return o=>o;let{normalize:e}=await import("./7IYAKB7Q.js");return e}async function me(t,e,o,a,s){if(o==="name"){let{groupByName:i}=await import("./QFT74HW3.js");return(await i()).map(({label:n})=>({label:n,value:n,metadata:{filterValue:n}})).filter(n=>!!n).sort()}let l=s==="user"?t:s==="utc"?"fr":"en-GB",h=a.getTime();if(o==="region"){let[{groupByRegion:i},{getCountry:c,global:n}]=await Promise.all([import("./OFZACK2Y.js"),import("./HVF3RXXI.js")]);return(await i()).map(({label:m,tzs:d})=>(d.sort((u,f)=>{let v=T(u,e),x=T(f,e),p="Etc/GMT";if(u.startsWith(p)&&f.startsWith(p)){let g=u.substring(p.length),D=f.substring(p.length),oe=g===""?0:parseInt(g);return(D===""?0:parseInt(D))-oe}return v.localeCompare(x)}),{label:S(e,m),items:d.map(u=>{let f=O(L(u,l,h)),v=T(u,e),x=m===n?`${T(n,e)} Etc`:Y(u),p=c(u),g=S(e,p);return{label:v,value:u,metadata:{country:g===v?void 0:g,filterValue:x,offset:f}}})})).sort((m,d)=>m.label===n?-1:d.label===n?1:m.label.localeCompare(d.label))}let[{groupByOffset:C},{DateEngine:Z}]=await Promise.all([import("./ZZGPQLEW.js"),import("./YSBWKH76.js")]),B=await C({dateEngine:new Z,groupDateRange:1,startDate:new Date(h).toISOString()}),te=new Intl.ListFormat(t,{style:"long",type:"conjunction"}),F=["Factory","Etc/UTC"];return B.forEach(i=>{let c=[],n=0;i.tzs.forEach((r,m)=>{F.includes(r)&&n++,c[m]=n}),i.tzs=i.tzs.filter(r=>!F.includes(r)),i.labelTzIdx=i.labelTzIdx.map(r=>r-c[r]).filter(r=>r>=0&&r<i.tzs.length)}),B.map(({labelTzIdx:i,tzs:c})=>{let n=c[0],r=O(L(n,l,h)),m=ne(n,h),d=i.map(f=>T(c[f],e));return{label:he(e,r,te.format(d)),value:m,metadata:{filterValue:c.map(f=>Y(f))}}}).filter(i=>!!i).sort((i,c)=>i.value-c.value)}function T(t,e){return e[t]||fe(t)}function ue(t,e,o){return o.timeZoneRegionLabel.replace("{city}",t).replace("{country}",S(o,e))}function S(t,e){return t[e]||e}function fe(t){return t.split("/").pop()}function Y(t){return t.replace(/_/g," ")}function he(t,e,o){return t.timeZoneLabel.replace("{offset}",e).replace("{cities}",o)}function L(t,e,o=Date.now()){return t==="Factory"&&(t="Etc/GMT"),K(e,{timeZone:t,timeZoneName:"shortOffset"}).formatToParts(o).find(({type:l})=>l==="timeZoneName").value}function de(t){return t[0].items!==void 0}function pe(t){return de(t)?t.flatMap(e=>e.items):t}function ee(t,e,o){return o==null?null:pe(t).find(a=>a[e]==o)}var be=P`: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}.offset{white-space:nowrap}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}`,w=class extends M{constructor(){super(...arguments),this.comboboxRef=R(),this.messages=N({blocking:!0}),this.focusSetter=U()(this),this.clearable=!1,this.disabled=!1,this.maxItems=0,this.mode="offset",this.offsetStyle="user",this.open=!1,this.overlayPositioning="absolute",this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.calciteInputTimeZoneBeforeClose=b({cancelable:!1}),this.calciteInputTimeZoneBeforeOpen=b({cancelable:!1}),this.calciteInputTimeZoneChange=b({cancelable:!1}),this.calciteInputTimeZoneClose=b({cancelable:!1}),this.calciteInputTimeZoneOpen=b({cancelable:!1})}static{this.properties={clearable:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],labelText:1,maxItems:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],mode:[3,{},{reflect:!0}],name:[3,{},{reflect:!0}],offsetStyle:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],readOnly:[7,{},{reflect:!0,type:Boolean}],referenceDate:1,required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:E,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:1}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=be}get value(){return this._value}set value(e){this._value=e}async setFocus(e){return this.focusSetter(()=>this.comboboxRef.value,e)}connectedCallback(){super.connectedCallback(),H(this),J(this)}async load(){this.normalizer=await ce(this.mode),await this.updateTimeZoneItems();let e=this.value,o=this.normalizeValue(e);this.value=o||(e===""?o:void 0),this.updateTimeZoneSelection();let a=this.selectedTimeZoneItem?`${this.selectedTimeZoneItem.value}`:"";j(this,a),this.value=a}willUpdate(e){e.has("value")&&this.hasUpdated&&this.handleValueChange(this.value,e.get("value")),(e.has("messages")||e.has("mode")&&(this.hasUpdated||this.mode!=="offset")||e.has("referenceDate"))&&this.handleTimeZoneItemPropsChange(),e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openChanged()}updated(){G(this)}loaded(){this.openChanged()}disconnectedCallback(){super.disconnectedCallback(),W(this),Q(this)}async handleTimeZoneItemPropsChange(){!this.timeZoneItems||!this.hasUpdated||(await this.updateTimeZoneItems(),this.updateTimeZoneSelection())}openChanged(){this.comboboxRef.value&&(this.comboboxRef.value.open=this.open)}async handleValueChange(e,o){let a=this.normalizeValue(e);if(!a){if(this.clearable){this._value=a,this.selectedTimeZoneItem=null;return}this._value=o,this.selectedTimeZoneItem=this.findTimeZoneItem(o);return}let s=this.findTimeZoneItem(a);if(!s){this._value=o;return}this._value=a,this.selectedTimeZoneItem=s}onLabelClick(){this.setFocus()}overrideSelectedLabelForRegion(e){this.mode!=="region"||!this.selectedTimeZoneItem||(this.comboboxRef.value.selectedItems[0].textLabel=this.getItemLabel(this.selectedTimeZoneItem,e))}onComboboxBeforeClose(e){e.stopPropagation(),this.overrideSelectedLabelForRegion(!1),this.calciteInputTimeZoneBeforeClose.emit()}onComboboxBeforeOpen(e){e.stopPropagation(),this.overrideSelectedLabelForRegion(!0),this.calciteInputTimeZoneBeforeOpen.emit()}onComboboxChange(e){e.stopPropagation();let a=e.target.selectedItems[0];if(!a){this._value="",this.selectedTimeZoneItem=null,this.calciteInputTimeZoneChange.emit();return}let s=this.findTimeZoneItemByLabel(a.getAttribute("data-label")),l=`${s.value}`;this.value===l&&s.label===this.selectedTimeZoneItem.label||(this._value=l,this.selectedTimeZoneItem=s,this.calciteInputTimeZoneChange.emit())}onComboboxClose(e){e.stopPropagation(),this.open=!1,this.calciteInputTimeZoneClose.emit()}onComboboxOpen(e){this.open=!0,e.stopPropagation(),this.calciteInputTimeZoneOpen.emit()}findTimeZoneItem(e){return ee(this.timeZoneItems,"value",e)}findTimeZoneItemByLabel(e){return ee(this.timeZoneItems,"label",e)}async updateTimeZoneItems(){this.timeZoneItems=await this.createTimeZoneItems()}updateTimeZoneSelection(){if(this.value===""&&this.clearable){this.selectedTimeZoneItem=null;return}let e=this.mode==="offset"?le():re(),o=this.value===""||!this.value?e:this.value;this.selectedTimeZoneItem=this.findTimeZoneItem(o)||this.findTimeZoneItem(e)}async createTimeZoneItems(){return!this.messages._lang||!this.messages?[]:me(this.messages._lang,this.messages,this.mode,this.referenceDate instanceof Date?this.referenceDate:new Date(this.referenceDate??Date.now()),this.offsetStyle)}normalizeValue(e){return e=e===void 0?"":e,e&&this.normalizer(e)}getItemLabel(e,o=this.open){let a=this.selectedTimeZoneItem===e,{label:s,metadata:l}=e;return!l.country||o||!a?s:ue(s,l.country,this.messages)}render(){return q({disabled:this.disabled,children:I`<calcite-combobox .clearDisabled=${!this.clearable} .disabled=${this.disabled} .label=${this.messages.chooseTimeZone} .labelText=${this.labelText} lang=${this.messages._lang??y} .maxItems=${this.maxItems} @calciteComboboxBeforeClose=${this.onComboboxBeforeClose} @calciteComboboxBeforeOpen=${this.onComboboxBeforeOpen} @calciteComboboxChange=${this.onComboboxChange} @calciteComboboxClose=${this.onComboboxClose} @calciteComboboxOpen=${this.onComboboxOpen} .overlayPositioning=${this.overlayPositioning} .placeholder=${this.mode==="name"?this.messages.namePlaceholder:this.mode==="offset"?this.messages.offsetPlaceholder:this.messages.regionPlaceholder} placeholder-icon=search .readOnly=${this.readOnly} .required=${this.required} .scale=${this.scale} .selectionMode=${this.clearable?"single":"single-persist"} .status=${this.status} .validationIcon=${this.validationIcon} .validationMessage=${this.validationMessage} ${z(this.comboboxRef)}>${this.renderItems()}<slot name=${se.labelContent} slot=${X.labelContent}></slot></calcite-combobox>${A({component:this})}`})}renderItems(){return this.mode==="region"?this.renderRegionItems():$(this.timeZoneItems,({label:e})=>e,e=>{let o=this.selectedTimeZoneItem===e,{label:a,metadata:s,value:l}=e;return I`<calcite-combobox-item data-label=${a??y} .metadata=${s} .selected=${o} .textLabel=${a} .value=${l}></calcite-combobox-item>`})}renderRegionItems(){return this.timeZoneItems.flatMap(({label:e,items:o})=>_(e,I`<calcite-combobox-item-group .label=${e}>${$(o,({label:a})=>a,a=>{let s=this.selectedTimeZoneItem===a,{label:l,metadata:h,value:C}=a,Z=this.getItemLabel(a);return I`<calcite-combobox-item data-label=${l??y} .description=${h.country} .metadata=${h} .selected=${s} .textLabel=${Z} .value=${C}><span class=${k(ae.offset)} slot=content-end>${h.offset}</span></calcite-combobox-item>`})}</calcite-combobox-item-group>`))}};V("calcite-input-time-zone",w);export{w as InputTimeZone};
@@ -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 p}from"./L6HFE67F.js";var C=new RegExp("\\.(0+)?$"),A=new RegExp("0+$"),u=class t{static{this.DECIMALS=100}static{this.ROUNDED=!0}static{this.SHIFT=BigInt("1"+"0".repeat(this.DECIMALS))}constructor(e){if(e instanceof t)return e;let[n,s]=R(e).split(".").concat("");this.value=BigInt(n+s.padEnd(t.DECIMALS,"0").slice(0,t.DECIMALS))+BigInt(t.ROUNDED&&s[t.DECIMALS]>="5"),this.isNegative=e.charAt(0)==="-"}static{this._divRound=(e,n)=>t.fromBigInt(e/n+(t.ROUNDED?e*BigInt(2)/n%BigInt(2):BigInt(0)))}static{this.fromBigInt=e=>Object.assign(Object.create(t.prototype),{value:e,isNegative:e<BigInt(0)})}getIntegersAndDecimals(){let e=this.value.toString().replace("-","").padStart(t.DECIMALS+1,"0"),n=e.slice(0,-t.DECIMALS),s=e.slice(-t.DECIMALS).replace(A,"");return{integers:n,decimals:s}}toString(){let{integers:e,decimals:n}=this.getIntegersAndDecimals();return`${this.isNegative?"-":""}${e}${n.length?"."+n:""}`}formatToParts(e){let{integers:n,decimals:s}=this.getIntegersAndDecimals(),i=e.numberFormatter.formatToParts(BigInt(n));return this.isNegative&&i.unshift({type:"minusSign",value:e.minusSign}),s.length&&(i.push({type:"decimal",value:e.decimal}),s.split("").forEach(r=>i.push({type:"fraction",value:r}))),i}format(e){let{integers:n,decimals:s}=this.getIntegersAndDecimals(),i=`${this.isNegative?e.minusSign:""}${e.numberFormatter.format(BigInt(n))}`,r=s.length?`${e.decimal}${s.split("").map(l=>e.numberFormatter.format(Number(l))).join("")}`:"";return`${i}${r}`}add(e){return t.fromBigInt(this.value+new t(e).value)}subtract(e){return t.fromBigInt(this.value-new t(e).value)}multiply(e){return t._divRound(this.value*new t(e).value,t.SHIFT)}divide(e){return t._divRound(this.value*t.SHIFT,new t(e).value)}};function D(t){return!(!t||isNaN(Number(t)))}function U(t){return!t||!j(t)?"":g(t,e=>{let n=!1,s=e.split("").filter((i,r)=>i.match(/\./g)&&!n?(n=!0,!0):i.match(/-/g)&&r===0?!0:p.includes(i)).join("");return D(s)?new u(s).toString():""})}var F=/^([-0])0+(?=\d)/,L=/(?!^\.)\.$/,T=/(?!^-)-/g,x=/^-\b0\b\.?0*$/,_=/0*$/,B=new Set(["e","E","-",",",".",...p]),K=t=>{let e=Array.from(t).filter(n=>B.has(n)).join("");return g(e,n=>{let s=n.replace(T,"").replace(L,"").replace(F,"$1");return D(s)?x.test(s)?s:M(s):n})};function M(t){let e=t.split(".")[1],n=new u(t).toString(),[s,i]=n.split(".");return e&&i!==e?`${s}.${e}`:n}function g(t,e){if(!t)return t;let n=t.toLowerCase().indexOf("e")+1;return n?t.replace(/[eE]*$/g,"").substring(0,n).concat(t.slice(n).replace(/[eE]/g,"")).split(/[eE]/).map((s,i)=>e(i===1?s.replace(/\./g,""):s)).join("e").replace(/^e/,"1e"):e(t)}function R(t){let e=t.split(/[eE]/);if(e.length===1)return t;let n=+t;if(Number.isSafeInteger(n))return`${n}`;let s=t.charAt(0)==="-",i=+e[1],r=e[0].split("."),l=(s?r[0].substring(1):r[0])||"",S=r[1]||"",O=(a,m)=>{let c=Math.abs(m)-a.length,d=c>0?`${"0".repeat(c)}${a}`:a;return`${d.slice(0,m)}.${d.slice(m)}`},E=(a,m)=>{let c=m>a.length?`${a}${"0".repeat(m-a.length)}`:a;return`${c.slice(0,m)}.${c.slice(m)}`},I=i>0?`${l}${E(S,i)}`:`${O(l,i)}${S}`;return`${s?"-":""}${I.charAt(0)==="."?"0":""}${I.replace(C,"").replace(F,"")}`}function j(t){return p.some(e=>t.includes(e))}function J(t,e,n){let s=e.split(".")[1];if(s){let i=s.match(_)[0];if(i&&n.delocalize(t).length!==e.length&&s.indexOf("e")===-1){let r=n.decimal;return t=t.includes(r)?t:`${t}${r}`,t.padEnd(t.length+i.length,n.localize("0"))}}return t}var h="en",H=["ar","bg","bs","ca","cs","da","de","de-AT","de-CH","el",h,"en-AU","en-CA","en-GB","es","es-MX","et","fi","fr","fr-CH","he","hi","hr","hu","id","it","it-CH","ja","ko","lt","lv","mk","no","nl","pl","pt","pt-PT","ro","ru","sk","sl","sr","sv","th","tr","uk","vi","zh-CN","zh-HK","zh-TW"],X=new Map(Object.entries({bg:{am:"\u043F\u0440.\u043E\u0431.",pm:"\u0441\u043B.\u043E\u0431."},bs:{am:"prijepodne",pm:"popodne"},ca:{am:"a.\xA0m.",pm:"p.\xA0m."},cs:{am:"dop.",pm:"odp."},es:{am:"a.\xA0m.",pm:"p.\xA0m."},"es-mx":{am:"a.m.",pm:"p.m."},"es-MX":{am:"a.m.",pm:"p.m."},fi:{am:"ap.",pm:"ip."},he:{am:"\u05DC\u05E4\u05E0\u05D4\u05F4\u05E6",pm:"\u05D0\u05D7\u05D4\u05F4\u05E6"},hu:{am:"de. ",pm:"du."},lt:{am:"prie\u0161piet",pm:"popiet"},lv:{am:"priek\u0161pusdien\u0101",pm:"p\u0113cpusdien\u0101"},mk:{am:"\u043F\u0440\u0435\u0442\u043F\u043B.",pm:"\u043F\u043E\u043F\u043B."},no:{am:"a.m.",pm:"p.m."},nl:{am:"a.m.",pm:"p.m."},"pt-pt":{am:"da manh\xE3",pm:"da tarde"},"pt-PT":{am:"da manh\xE3",pm:"da tarde"},ro:{am:"a.m.",pm:"p.m."},sl:{am:"dop.",pm:"pop."},sv:{am:"fm",pm:"em"},th:{am:"\u0E01\u0E48\u0E2D\u0E19\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07",pm:"\u0E2B\u0E25\u0E31\u0E07\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07"},tr:{am:"\xD6\xD6",pm:"\xD6S"},uk:{am:"\u0434\u043F",pm:"\u043F\u043F"},vi:{am:"SA",pm:"CH"}})),k=["arab","arabext","latn"],f=[...H],w=t=>k.includes(t),b=new Intl.NumberFormat().resolvedOptions().numberingSystem,y=b==="arab"||!w(b)?"latn":b,P=t=>w(t)?t:y;function N(t){return t?f.includes(t)?t:(t=t.toLowerCase(),t.includes("-")&&(t=t.replace(/(\w+)-(\w+)/,(e,n,s)=>`${n}-${s.toUpperCase()}`),f.includes(t)||(t=t.split("-")[0])),t==="nb"||t==="nn"?"no":t==="zh"?"zh-CN":f.includes(t)?t:(console.warn(`Translations for the "${t}" locale are not available and will fall back to the default, English (en).`),h)):h}function W(t){switch(t){case"it-CH":return"de-CH";case"bs":return"sr-Latn-CS";default:return t}}var $=class{constructor(){this.delocalize=e=>this._numberFormatOptions?g(e,n=>n.replace(new RegExp(`[${this._minusSign}]`,"g"),"-").replace(new RegExp(`[${this._group}]`,"g"),"").replace(new RegExp(`[${this._decimal}]`,"g"),".").replace(new RegExp(`[${this._digits.join("")}]`,"g"),this._getDigitIndex)):e,this.localize=e=>this._numberFormatOptions?g(e,n=>D(n.trim())?new u(n.trim()).format(this).replace(new RegExp(`[${this._actualGroup}]`,"g"),this._group):n):e}get group(){return this._group}get decimal(){return this._decimal}get minusSign(){return this._minusSign}get digits(){return this._digits}get numberFormatter(){return this._numberFormatter}get numberFormatOptions(){return this._numberFormatOptions}set numberFormatOptions(e){if(e.locale=N(e?.locale),e.numberingSystem=P(e?.numberingSystem),!this._numberFormatOptions&&e.locale===h&&e.numberingSystem===y&&Object.keys(e).length===2||JSON.stringify(this._numberFormatOptions)===JSON.stringify(e))return;this._numberFormatOptions=e,this._numberFormatter=new Intl.NumberFormat(this._numberFormatOptions.locale,this._numberFormatOptions),this._digits=[...new Intl.NumberFormat(this._numberFormatOptions.locale,{useGrouping:!1,numberingSystem:this._numberFormatOptions.numberingSystem}).format(9876543210)].reverse();let n=new Map(this._digits.map((i,r)=>[i,r])),s=new Intl.NumberFormat(this._numberFormatOptions.locale,{numberingSystem:this._numberFormatOptions.numberingSystem}).formatToParts(-123456789e-1);this._actualGroup=s.find(i=>i.type==="group").value,this._group=this._actualGroup.trim().length===0||this._actualGroup==" "?"\xA0":this._actualGroup,this._decimal=e.locale==="bs"||e.locale==="mk"?",":s.find(i=>i.type==="decimal").value,this._minusSign=s.find(i=>i.type==="minusSign").value,this._getDigitIndex=i=>n.get(i)}},q=new $,o,v;function Z(t={}){return Object.entries(t).sort(([e],[n])=>e.localeCompare(n)).map(e=>`${e[0]}-${e[1]}`).flat().join(":")}function Q(t,e){t=N(t),o||(o=new Map),v!==t&&(o.clear(),v=t);let n=Z(e),s=o.get(n);if(s)return s;let i=new Intl.DateTimeFormat(t,e);return o.set(n,i),i}export{u as a,D as b,U as c,K as d,J as e,X as f,P as g,N as h,W as i,$ as j,q as k,Q as l};
3
+ v5.0.0-next.5 */
4
+ import{b as p}from"./S5CLKCGJ.js";var C=new RegExp("\\.(0+)?$"),A=new RegExp("0+$"),u=class t{static{this.DECIMALS=100}static{this.ROUNDED=!0}static{this.SHIFT=BigInt("1"+"0".repeat(this.DECIMALS))}constructor(e){if(e instanceof t)return e;let[n,s]=R(e).split(".").concat("");this.value=BigInt(n+s.padEnd(t.DECIMALS,"0").slice(0,t.DECIMALS))+BigInt(t.ROUNDED&&s[t.DECIMALS]>="5"),this.isNegative=e.charAt(0)==="-"}static{this._divRound=(e,n)=>t.fromBigInt(e/n+(t.ROUNDED?e*BigInt(2)/n%BigInt(2):BigInt(0)))}static{this.fromBigInt=e=>Object.assign(Object.create(t.prototype),{value:e,isNegative:e<BigInt(0)})}getIntegersAndDecimals(){let e=this.value.toString().replace("-","").padStart(t.DECIMALS+1,"0"),n=e.slice(0,-t.DECIMALS),s=e.slice(-t.DECIMALS).replace(A,"");return{integers:n,decimals:s}}toString(){let{integers:e,decimals:n}=this.getIntegersAndDecimals();return`${this.isNegative?"-":""}${e}${n.length?"."+n:""}`}formatToParts(e){let{integers:n,decimals:s}=this.getIntegersAndDecimals(),i=e.numberFormatter.formatToParts(BigInt(n));return this.isNegative&&i.unshift({type:"minusSign",value:e.minusSign}),s.length&&(i.push({type:"decimal",value:e.decimal}),s.split("").forEach(r=>i.push({type:"fraction",value:r}))),i}format(e){let{integers:n,decimals:s}=this.getIntegersAndDecimals(),i=`${this.isNegative?e.minusSign:""}${e.numberFormatter.format(BigInt(n))}`,r=s.length?`${e.decimal}${s.split("").map(l=>e.numberFormatter.format(Number(l))).join("")}`:"";return`${i}${r}`}add(e){return t.fromBigInt(this.value+new t(e).value)}subtract(e){return t.fromBigInt(this.value-new t(e).value)}multiply(e){return t._divRound(this.value*new t(e).value,t.SHIFT)}divide(e){return t._divRound(this.value*t.SHIFT,new t(e).value)}};function D(t){return!(!t||isNaN(Number(t)))}function U(t){return!t||!j(t)?"":g(t,e=>{let n=!1,s=e.split("").filter((i,r)=>i.match(/\./g)&&!n?(n=!0,!0):i.match(/-/g)&&r===0?!0:p.includes(i)).join("");return D(s)?new u(s).toString():""})}var F=/^([-0])0+(?=\d)/,L=/(?!^\.)\.$/,T=/(?!^-)-/g,x=/^-\b0\b\.?0*$/,_=/0*$/,B=new Set(["e","E","-",",",".",...p]),K=t=>{let e=Array.from(t).filter(n=>B.has(n)).join("");return g(e,n=>{let s=n.replace(T,"").replace(L,"").replace(F,"$1");return D(s)?x.test(s)?s:M(s):n})};function M(t){let e=t.split(".")[1],n=new u(t).toString(),[s,i]=n.split(".");return e&&i!==e?`${s}.${e}`:n}function g(t,e){if(!t)return t;let n=t.toLowerCase().indexOf("e")+1;return n?t.replace(/[eE]*$/g,"").substring(0,n).concat(t.slice(n).replace(/[eE]/g,"")).split(/[eE]/).map((s,i)=>e(i===1?s.replace(/\./g,""):s)).join("e").replace(/^e/,"1e"):e(t)}function R(t){let e=t.split(/[eE]/);if(e.length===1)return t;let n=+t;if(Number.isSafeInteger(n))return`${n}`;let s=t.charAt(0)==="-",i=+e[1],r=e[0].split("."),l=(s?r[0].substring(1):r[0])||"",S=r[1]||"",O=(a,m)=>{let c=Math.abs(m)-a.length,d=c>0?`${"0".repeat(c)}${a}`:a;return`${d.slice(0,m)}.${d.slice(m)}`},E=(a,m)=>{let c=m>a.length?`${a}${"0".repeat(m-a.length)}`:a;return`${c.slice(0,m)}.${c.slice(m)}`},I=i>0?`${l}${E(S,i)}`:`${O(l,i)}${S}`;return`${s?"-":""}${I.charAt(0)==="."?"0":""}${I.replace(C,"").replace(F,"")}`}function j(t){return p.some(e=>t.includes(e))}function J(t,e,n){let s=e.split(".")[1];if(s){let i=s.match(_)[0];if(i&&n.delocalize(t).length!==e.length&&s.indexOf("e")===-1){let r=n.decimal;return t=t.includes(r)?t:`${t}${r}`,t.padEnd(t.length+i.length,n.localize("0"))}}return t}var h="en",H=["ar","bg","bs","ca","cs","da","de","de-AT","de-CH","el",h,"en-AU","en-CA","en-GB","es","es-MX","et","fi","fr","fr-CH","he","hi","hr","hu","id","it","it-CH","ja","ko","lt","lv","mk","no","nl","pl","pt","pt-PT","ro","ru","sk","sl","sr","sv","th","tr","uk","vi","zh-CN","zh-HK","zh-TW"],X=new Map(Object.entries({bg:{am:"\u043F\u0440.\u043E\u0431.",pm:"\u0441\u043B.\u043E\u0431."},bs:{am:"prijepodne",pm:"popodne"},ca:{am:"a.\xA0m.",pm:"p.\xA0m."},cs:{am:"dop.",pm:"odp."},es:{am:"a.\xA0m.",pm:"p.\xA0m."},"es-mx":{am:"a.m.",pm:"p.m."},"es-MX":{am:"a.m.",pm:"p.m."},fi:{am:"ap.",pm:"ip."},he:{am:"\u05DC\u05E4\u05E0\u05D4\u05F4\u05E6",pm:"\u05D0\u05D7\u05D4\u05F4\u05E6"},hu:{am:"de. ",pm:"du."},lt:{am:"prie\u0161piet",pm:"popiet"},lv:{am:"priek\u0161pusdien\u0101",pm:"p\u0113cpusdien\u0101"},mk:{am:"\u043F\u0440\u0435\u0442\u043F\u043B.",pm:"\u043F\u043E\u043F\u043B."},no:{am:"a.m.",pm:"p.m."},nl:{am:"a.m.",pm:"p.m."},"pt-pt":{am:"da manh\xE3",pm:"da tarde"},"pt-PT":{am:"da manh\xE3",pm:"da tarde"},ro:{am:"a.m.",pm:"p.m."},sl:{am:"dop.",pm:"pop."},sv:{am:"fm",pm:"em"},th:{am:"\u0E01\u0E48\u0E2D\u0E19\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07",pm:"\u0E2B\u0E25\u0E31\u0E07\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07"},tr:{am:"\xD6\xD6",pm:"\xD6S"},uk:{am:"\u0434\u043F",pm:"\u043F\u043F"},vi:{am:"SA",pm:"CH"}})),k=["arab","arabext","latn"],f=[...H],w=t=>k.includes(t),b=new Intl.NumberFormat().resolvedOptions().numberingSystem,y=b==="arab"||!w(b)?"latn":b,P=t=>w(t)?t:y;function N(t){return t?f.includes(t)?t:(t=t.toLowerCase(),t.includes("-")&&(t=t.replace(/(\w+)-(\w+)/,(e,n,s)=>`${n}-${s.toUpperCase()}`),f.includes(t)||(t=t.split("-")[0])),t==="nb"||t==="nn"?"no":t==="zh"?"zh-CN":f.includes(t)?t:(console.warn(`Translations for the "${t}" locale are not available and will fall back to the default, English (en).`),h)):h}function W(t){switch(t){case"it-CH":return"de-CH";case"bs":return"sr-Latn-CS";default:return t}}var $=class{constructor(){this.delocalize=e=>this._numberFormatOptions?g(e,n=>n.replace(new RegExp(`[${this._minusSign}]`,"g"),"-").replace(new RegExp(`[${this._group}]`,"g"),"").replace(new RegExp(`[${this._decimal}]`,"g"),".").replace(new RegExp(`[${this._digits.join("")}]`,"g"),this._getDigitIndex)):e,this.localize=e=>this._numberFormatOptions?g(e,n=>D(n.trim())?new u(n.trim()).format(this).replace(new RegExp(`[${this._actualGroup}]`,"g"),this._group):n):e}get group(){return this._group}get decimal(){return this._decimal}get minusSign(){return this._minusSign}get digits(){return this._digits}get numberFormatter(){return this._numberFormatter}get numberFormatOptions(){return this._numberFormatOptions}set numberFormatOptions(e){if(e.locale=N(e?.locale),e.numberingSystem=P(e?.numberingSystem),!this._numberFormatOptions&&e.locale===h&&e.numberingSystem===y&&Object.keys(e).length===2||JSON.stringify(this._numberFormatOptions)===JSON.stringify(e))return;this._numberFormatOptions=e,this._numberFormatter=new Intl.NumberFormat(this._numberFormatOptions.locale,this._numberFormatOptions),this._digits=[...new Intl.NumberFormat(this._numberFormatOptions.locale,{useGrouping:!1,numberingSystem:this._numberFormatOptions.numberingSystem}).format(9876543210)].reverse();let n=new Map(this._digits.map((i,r)=>[i,r])),s=new Intl.NumberFormat(this._numberFormatOptions.locale,{numberingSystem:this._numberFormatOptions.numberingSystem}).formatToParts(-123456789e-1);this._actualGroup=s.find(i=>i.type==="group").value,this._group=this._actualGroup.trim().length===0||this._actualGroup==" "?"\xA0":this._actualGroup,this._decimal=e.locale==="bs"||e.locale==="mk"?",":s.find(i=>i.type==="decimal").value,this._minusSign=s.find(i=>i.type==="minusSign").value,this._getDigitIndex=i=>n.get(i)}},q=new $,o,v;function Z(t={}){return Object.entries(t).sort(([e],[n])=>e.localeCompare(n)).map(e=>`${e[0]}-${e[1]}`).flat().join(":")}function Q(t,e){t=N(t),o||(o=new Map),v!==t&&(o.clear(),v=t);let n=Z(e),s=o.get(n);if(s)return s;let i=new Intl.DateTimeFormat(t,e);return o.set(n,i),i}export{u as a,D as b,U as c,K as d,J as e,X as f,P as g,N as h,W as i,$ as j,q as k,Q as l};
@@ -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 r}from"./DNM3U3Z7.js";import{D as c,E as o,H as l,P as a,g as s,h as i}from"./ALOAVLGK.js";var n={container:"container",selected:"selected"},h="calcite-carousel-item",u={host:t=>`${h}-${t}`},p=s`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:flex}.container{display:none;inline-size:var(--calcite-container-size-content-fluid)}:host([selected]) .container{display:block}:host([hidden]){display:none}[hidden]{display:none}`,e=class extends c{constructor(){super(...arguments),this.guid=u.host(r()),this.selected=!1}static{this.properties={label:1,selected:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=p}render(){let d=this.el.id||this.guid;return l(this.el,"id",d),i`<div .ariaLabel=${this.label} class=${o({[n.container]:!0,[n.selected]:this.selected})} role=tabpanel><slot></slot></div>`}};a("calcite-carousel-item",e);export{e as CarouselItem};
3
+ v5.0.0-next.5 */
4
+ import{a as r}from"./ZLR2B6GQ.js";import{D as c,E as o,H as l,P as a,g as s,h as i}from"./AUIOWPFN.js";var n={container:"container",selected:"selected"},h="calcite-carousel-item",u={host:t=>`${h}-${t}`},p=s`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:flex}.container{display:none;inline-size:var(--calcite-container-size-content-fluid)}:host([selected]) .container{display:block}:host([hidden]){display:none}[hidden]{display:none}`,e=class extends c{constructor(){super(...arguments),this.guid=u.host(r()),this.selected=!1}static{this.properties={label:1,selected:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=p}render(){let d=this.el.id||this.guid;return l(this.el,"id",d),i`<div .ariaLabel=${this.label} class=${o({[n.container]:!0,[n.selected]:this.selected})} role=tabpanel><slot></slot></div>`}};a("calcite-carousel-item",e);export{e as CarouselItem};
@@ -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 L}from"./4IBSL24S.js";import{b as y}from"./KIGAOJGV.js";import{b as d}from"./I2EB746H.js";import"./6J3DGER2.js";import"./L6HFE67F.js";import{a as F}from"./WIJWBGXQ.js";import{a as U}from"./XWXCOJUO.js";import"./UXWFYSWM.js";import{a as C,d as E}from"./JW4SOJWB.js";import"./P2RYGBBZ.js";import{e as R}from"./SLICSH62.js";import"./DNM3U3Z7.js";import{B as s,C as l,D,E as i,P as H,g as S,h as n,o as x}from"./ALOAVLGK.js";var e={button:"button",buttonBottomLeft:"button--bottom-left",buttonBottomRight:"button--bottom-right",buttonFractionalSecondDown:"button--fractionalSecond-down",buttonFractionalSecondUp:"button--fractionalSecond-up",buttonHourDown:"button--hour-down",buttonHourUp:"button--hour-up",buttonMeridiemDown:"button--meridiem-down",buttonMeridiemUp:"button--meridiem-up",buttonMinuteDown:"button--minute-down",buttonMinuteUp:"button--minute-up",buttonSecondDown:"button--second-down",buttonSecondUp:"button--second-up",buttonTopLeft:"button--top-left",buttonTopRight:"button--top-right",column:"column",decimalSeparator:"decimal-separator",delimiter:"delimiter",fractionalSecond:"fractionalSecond",hour:"hour",hourSuffix:"hour-suffix",input:"input",inputFocus:"inputFocus",meridiem:"meridiem",minute:"minute",minuteSuffix:"minute-suffix",second:"second",secondSuffix:"second-suffix",showMeridiem:"show-meridiem",showSecond:"show-second",scale:b=>`scale-${b}`,timePicker:"time-picker",meridiemStart:"meridiem--start"},a={chevronUp:"chevron-up",chevronDown:"chevron-down"},Y=S`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:inline-block}.time-picker{display:flex;-webkit-user-select:none;user-select:none;align-items:center;border-width:1px;border-style:solid;font-weight:var(--calcite-font-weight-medium);border-color:var(--calcite-time-picker-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-time-picker-corner-radius, var(--calcite-border-radius-round));color:var(--calcite-time-picker-color, var(--calcite-color-text-1));background-color:var(--calcite-time-picker-background-color, var(--calcite-color-foreground-1));overflow:hidden}.time-picker .column{display:flex;flex-direction:column}.time-picker .meridiem--start{order:-1}.time-picker .button{display:inline-flex;cursor:pointer;align-items:center;justify-content:center;background-color:var(--calcite-time-picker-background-color, var(--calcite-color-foreground-1))}.time-picker .button:hover,.time-picker .button:focus{outline:2px solid transparent;outline-offset:2px;z-index:var(--calcite-z-index-header);outline-offset:0;background-color:var(--calcite-time-picker-button-background-color-hover, var(--calcite-color-foreground-2))}.time-picker .button:active{background-color:var(--calcite-time-picker-button-background-color-press, var(--calcite-color-foreground-3))}.time-picker .button.top-left{border-start-start-radius:var(--calcite-time-picker-corner-radius, var(--calcite-border-radius-round))}.time-picker .button.bottom-left{border-end-start-radius:var(--calcite-time-picker-corner-radius, var(--calcite-border-radius-round))}.time-picker .button.top-right{border-start-end-radius:var(--calcite-time-picker-corner-radius, var(--calcite-border-radius-round))}.time-picker .button.bottom-right{border-end-end-radius:var(--calcite-time-picker-corner-radius, var(--calcite-border-radius-round))}.time-picker .button calcite-icon{color:var(--calcite-time-picker-icon-color, var(--calcite-color-text-3))}.time-picker .input{display:inline-flex;cursor:pointer;align-items:center;justify-content:center;font-weight:var(--calcite-font-weight-medium);background-color:var(--calcite-time-picker-background-color, var(--calcite-color-foreground-1))}.time-picker .input:hover{box-shadow:inset 0 0 0 2px var(--calcite-time-picker-input-border-color-hover, var(--calcite-color-foreground-2));z-index:var(--calcite-z-index-header)}.time-picker .input:focus,.time-picker .input:hover:focus{outline:2px solid transparent;outline-offset:2px;outline-offset:0}.time-picker .input.inputFocus,.time-picker .input:hover.inputFocus{box-shadow:inset 0 0 0 2px var(--calcite-time-picker-input-border-color-press, var(--calcite-color-brand));z-index:var(--calcite-z-index-header)}.time-picker.scale-s{font-size:var(--calcite-font-size--1)}.time-picker.scale-s .button,.time-picker.scale-s .input{padding-inline:var(--calcite-spacing-sm);padding-block:var(--calcite-spacing-xxs)}.time-picker.scale-s:not(.show-meridiem) .delimiter:last-child{padding-inline-end:var(--calcite-spacing-md)}.time-picker.scale-m{font-size:var(--calcite-font-size-0)}.time-picker.scale-m .button,.time-picker.scale-m .input{padding-inline:var(--calcite-spacing-md);padding-block:var(--calcite-spacing-sm)}.time-picker.scale-m:not(.show-meridiem) .delimiter:last-child{padding-inline-end:var(--calcite-spacing-xl)}.time-picker.scale-l{font-size:var(--calcite-font-size-1)}.time-picker.scale-l .button,.time-picker.scale-l .input{padding-inline:var(--calcite-spacing-lg);padding-block:var(--calcite-spacing-md)}.time-picker.scale-l:not(.show-meridiem) .delimiter:last-child{padding-inline-end:var(--calcite-spacing-xxl)}:host([hidden]){display:none}[hidden]{display:none}`,f=class extends D{constructor(){super(),this.fractionalSecondRef=s(),this.hourRef=s(),this.meridiemRef=s(),this.minuteRef=s(),this.pointerActivated=!1,this.secondRef=s(),this.messages=F(),this.focusSetter=U()(this),this.time=L(this),this.hourFormat="user",this.scale="m",this.step=60,this.value=null,this.calciteTimePickerChange=x({cancelable:!1}),this.listen("blur",this.blurHandler),this.listen("calciteTimeChange",this.timeChangeHandler),this.listen("keydown",this.keyDownHandler),this.listen("pointerdown",this.pointerDownHandler)}static{this.properties={activeEl:[16,{},{state:!0}],showFractionalSecond:[16,{},{state:!0}],showSecond:[16,{},{state:!0}],time:[0,{},{attribute:!1}],hourFormat:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],numberingSystem:1,scale:[3,{},{reflect:!0}],step:[11,{},{reflect:!0,type:Number}],value:1}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=Y}async setFocus(t){return this.focusSetter(()=>this.el,t)}connectedCallback(){super.connectedCallback(),this.toggleSecond()}willUpdate(t){t.has("step")&&(this.hasUpdated||this.step!==60)&&this.toggleSecond(),t.has("value")&&(this.hasUpdated||this.value!==null)&&this.time.setValue(this.value)}blurHandler(){this.activeEl=void 0,this.pointerActivated=!1}keyDownHandler(t){this.pointerActivated=!1;let{defaultPrevented:o,key:r}=t;if(o)return;let{hourFormat:u}=this.time;switch(this.activeEl){case this.hourRef.value:r==="ArrowRight"&&(this.focusPart("minute"),t.preventDefault());break;case this.minuteRef.value:switch(r){case"ArrowLeft":this.focusPart("hour"),t.preventDefault();break;case"ArrowRight":this.step!==60?(this.focusPart("second"),t.preventDefault()):u==="12"&&(this.focusPart("meridiem"),t.preventDefault());break}break;case this.secondRef.value:switch(r){case"ArrowLeft":this.focusPart("minute"),t.preventDefault();break;case"ArrowRight":this.showFractionalSecond?this.focusPart("fractionalSecond"):u==="12"&&(this.focusPart("meridiem"),t.preventDefault());break}break;case this.fractionalSecondRef.value:switch(r){case"ArrowLeft":this.focusPart("second"),t.preventDefault();break;case"ArrowRight":u==="12"&&(this.focusPart("meridiem"),t.preventDefault());break}break;case this.meridiemRef.value:switch(r){case"ArrowLeft":this.showFractionalSecond?this.focusPart("fractionalSecond"):this.step!==60?(this.focusPart("second"),t.preventDefault()):(this.focusPart("minute"),t.preventDefault());break}break}}pointerDownHandler(){this.pointerActivated=!0}async focusPart(t){await E(this),(t==="hour"?this.hourRef:t==="minute"?this.minuteRef:t==="second"?this.secondRef:t==="fractionalSecond"?this.fractionalSecondRef:this.meridiemRef).value?.focus()}focusHandler(t){this.pointerActivated||(this.activeEl=t.currentTarget)}fractionalSecondDownClickHandler(){this.activeEl=this.fractionalSecondRef.value,this.activeEl.focus(),this.time.nudgeFractionalSecond("down")}fractionalSecondUpClickHandler(){this.activeEl=this.fractionalSecondRef.value,this.activeEl.focus(),this.time.nudgeFractionalSecond("up")}hourDownClickHandler(){this.activeEl=this.hourRef.value,this.activeEl.focus(),this.time.decrementHour()}hourUpClickHandler(){this.activeEl=this.hourRef.value,this.activeEl.focus(),this.time.incrementHour()}inputClickHandler(t){this.activeEl=t.target}meridiemUpClickHandler(){this.activeEl=this.meridiemRef.value,this.activeEl.focus(),this.time.toggleMeridiem("up")}meridiemDownClickHandler(){this.activeEl=this.meridiemRef.value,this.activeEl.focus(),this.time.toggleMeridiem("down")}minuteDownClickHandler(){this.activeEl=this.minuteRef.value,this.activeEl.focus(),this.time.decrementMinute()}minuteUpClickHandler(){this.activeEl=this.minuteRef.value,this.activeEl.focus(),this.time.incrementMinute()}secondDownClickHandler(){this.activeEl=this.secondRef.value,this.activeEl.focus(),this.time.decrementSecond()}secondUpClickHandler(){this.activeEl=this.secondRef.value,this.activeEl.focus(),this.time.incrementSecond()}timeChangeHandler(t){t.stopPropagation();let o=t.detail;o!==this.value&&(this.value=o),this.calciteTimePickerChange.emit()}toggleSecond(){this.showSecond=this.step<60,this.stepPrecision=y(this.step),this.showFractionalSecond=this.stepPrecision>0}render(){let{activeEl:t,messages:o,scale:r}=this,{_lang:u}=o,{fractionalSecond:v,handleFractionalSecondKeyDownEvent:P,handleHourKeyDownEvent:M,handleMeridiemKeyDownEvent:z,handleMinuteKeyDownEvent:T,handleSecondKeyDownEvent:A,hour:h,hourFormat:V,localizedDecimalSeparator:N,localizedFractionalSecond:k,localizedHour:I,localizedHourSuffix:K,localizedMeridiem:B,localizedMinute:O,localizedMinuteSuffix:j,localizedSecond:_,localizedSecondSuffix:$,meridiem:w,meridiemOrder:q,minute:m,second:p}=this.time,G=d(h),c=C(r),J=d(m),Q=d(p),W=d(v),X=u!=="bg"&&$,g=V==="12";return n`<div class=${i({[e.timePicker]:!0,[e.showMeridiem]:g,[e.showSecond]:this.showSecond,[e.scale(r)]:!0})} dir=ltr><div class=${i(e.column)} role=group><span .ariaLabel=${o.hourUp} class=${i({[e.button]:!0,[e.buttonHourUp]:!0,[e.buttonTopLeft]:!0})} @click=${this.hourUpClickHandler} role=button><calcite-icon .icon=${a.chevronUp} .scale=${c}></calcite-icon></span><span .ariaLabel=${o.hour} aria-valuemax=23 aria-valuemin=1 .ariaValueNow=${G&&parseInt(h)||"0"} .ariaValueText=${h} class=${i({[e.input]:!0,[e.hour]:!0,[e.inputFocus]:t&&t===this.hourRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${M} role=spinbutton tabindex=0 ${l(this.hourRef)}>${I||"--"}</span><span .ariaLabel=${o.hourDown} class=${i({[e.button]:!0,[e.buttonHourDown]:!0,[e.buttonBottomLeft]:!0})} @click=${this.hourDownClickHandler} role=button><calcite-icon .icon=${a.chevronDown} .scale=${c}></calcite-icon></span></div><span class=${i({[e.delimiter]:!0,[e.hourSuffix]:!0})}>${K}</span><div class=${i(e.column)} role=group><span .ariaLabel=${o.minuteUp} class=${i({[e.button]:!0,[e.buttonMinuteUp]:!0})} @click=${this.minuteUpClickHandler} role=button><calcite-icon .icon=${a.chevronUp} .scale=${c}></calcite-icon></span><span .ariaLabel=${o.minute} aria-valuemax=12 aria-valuemin=1 .ariaValueNow=${J&&parseInt(m)||"0"} .ariaValueText=${m} class=${i({[e.input]:!0,[e.minute]:!0,[e.inputFocus]:t&&t===this.minuteRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${T} role=spinbutton tabindex=0 ${l(this.minuteRef)}>${O||"--"}</span><span .ariaLabel=${o.minuteDown} class=${i({[e.button]:!0,[e.buttonMinuteDown]:!0})} @click=${this.minuteDownClickHandler} role=button><calcite-icon .icon=${a.chevronDown} .scale=${c}></calcite-icon></span></div>${this.showSecond&&n`<span class=${i({[e.delimiter]:!0,[e.minuteSuffix]:!0})}>${j}</span>`||""}${this.showSecond&&n`<div class=${i(e.column)} role=group><span .ariaLabel=${o.secondUp} class=${i({[e.button]:!0,[e.buttonSecondUp]:!0})} @click=${this.secondUpClickHandler} role=button><calcite-icon .icon=${a.chevronUp} .scale=${c}></calcite-icon></span><span .ariaLabel=${o.second} aria-valuemax=59 aria-valuemin=0 .ariaValueNow=${Q&&parseInt(p)||"0"} .ariaValueText=${p} class=${i({[e.input]:!0,[e.second]:!0,[e.inputFocus]:t&&t===this.secondRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${A} role=spinbutton tabindex=0 ${l(this.secondRef)}>${_||"--"}</span><span .ariaLabel=${o.secondDown} class=${i({[e.button]:!0,[e.buttonSecondDown]:!0})} @click=${this.secondDownClickHandler} role=button><calcite-icon .icon=${a.chevronDown} .scale=${c}></calcite-icon></span></div>`||""}${this.showFractionalSecond&&n`<span class=${i({[e.delimiter]:!0,[e.decimalSeparator]:!0})}>${N}</span>`||""}${this.showFractionalSecond&&n`<div class=${i(e.column)} role=group><span .ariaLabel=${o.fractionalSecondUp} class=${i({[e.button]:!0,[e.buttonFractionalSecondUp]:!0})} @click=${this.fractionalSecondUpClickHandler} role=button><calcite-icon .icon=${a.chevronUp} .scale=${c}></calcite-icon></span><span .ariaLabel=${o.fractionalSecond} aria-valuemax=999 aria-valuemin=1 .ariaValueNow=${W&&parseInt(v)||"0"} .ariaValueText=${k} class=${i({[e.input]:!0,[e.fractionalSecond]:!0,[e.inputFocus]:t&&t===this.fractionalSecondRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${P} role=spinbutton tabindex=0 ${l(this.fractionalSecondRef)}>${k||"".padStart(this.stepPrecision,"-")}</span><span .ariaLabel=${o.fractionalSecondDown} class=${i({[e.button]:!0,[e.buttonFractionalSecondDown]:!0})} @click=${this.fractionalSecondDownClickHandler} role=button><calcite-icon .icon=${a.chevronDown} .scale=${c}></calcite-icon></span></div>`||""}${X&&n`<span class=${i({[e.delimiter]:!0,[e.secondSuffix]:!0})}>${$}</span>`||""}${g&&n`<div class=${i({[e.column]:!0,[e.meridiemStart]:q===0||R(this.el)==="rtl"})} role=group><span .ariaLabel=${o.meridiemUp} class=${i({[e.button]:!0,[e.buttonMeridiemUp]:!0,[e.buttonTopRight]:!0})} @click=${this.meridiemUpClickHandler} role=button><calcite-icon .icon=${a.chevronUp} .scale=${c}></calcite-icon></span><span .ariaLabel=${o.meridiem} aria-valuemax=2 aria-valuemin=1 .ariaValueNow=${w==="PM"&&"2"||"1"} .ariaValueText=${w} class=${i({[e.input]:!0,[e.meridiem]:!0,[e.inputFocus]:t&&t===this.meridiemRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${z} role=spinbutton tabindex=0 ${l(this.meridiemRef)}>${B||"--"}</span><span .ariaLabel=${o.meridiemDown} class=${i({[e.button]:!0,[e.buttonMeridiemDown]:!0,[e.buttonBottomRight]:!0})} @click=${this.meridiemDownClickHandler} role=button><calcite-icon .icon=${a.chevronDown} .scale=${c}></calcite-icon></span></div>`||""}</div>`}};H("calcite-time-picker",f);export{f as TimePicker};
3
+ v5.0.0-next.5 */
4
+ import{a as L}from"./DZWPXJWV.js";import{b as y}from"./2VKJIYLT.js";import{b as d}from"./CVLFEMH2.js";import"./UOZDXXIF.js";import"./S5CLKCGJ.js";import{a as F}from"./LH7245HX.js";import{a as U}from"./WOTQIMPZ.js";import"./B5JXPZDV.js";import{a as C,d as E}from"./3YZG7MA3.js";import"./CIU4VM7X.js";import{e as R}from"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{B as s,C as l,D,E as i,P as H,g as S,h as n,o as x}from"./AUIOWPFN.js";var e={button:"button",buttonBottomLeft:"button--bottom-left",buttonBottomRight:"button--bottom-right",buttonFractionalSecondDown:"button--fractionalSecond-down",buttonFractionalSecondUp:"button--fractionalSecond-up",buttonHourDown:"button--hour-down",buttonHourUp:"button--hour-up",buttonMeridiemDown:"button--meridiem-down",buttonMeridiemUp:"button--meridiem-up",buttonMinuteDown:"button--minute-down",buttonMinuteUp:"button--minute-up",buttonSecondDown:"button--second-down",buttonSecondUp:"button--second-up",buttonTopLeft:"button--top-left",buttonTopRight:"button--top-right",column:"column",decimalSeparator:"decimal-separator",delimiter:"delimiter",fractionalSecond:"fractionalSecond",hour:"hour",hourSuffix:"hour-suffix",input:"input",inputFocus:"inputFocus",meridiem:"meridiem",minute:"minute",minuteSuffix:"minute-suffix",second:"second",secondSuffix:"second-suffix",showMeridiem:"show-meridiem",showSecond:"show-second",scale:b=>`scale-${b}`,timePicker:"time-picker",meridiemStart:"meridiem--start"},a={chevronUp:"chevron-up",chevronDown:"chevron-down"},Y=S`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:inline-block}.time-picker{display:flex;-webkit-user-select:none;user-select:none;align-items:center;border-width:1px;border-style:solid;font-weight:var(--calcite-font-weight-medium);border-color:var(--calcite-time-picker-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-time-picker-corner-radius, var(--calcite-border-radius-round));color:var(--calcite-time-picker-color, var(--calcite-color-text-1));background-color:var(--calcite-time-picker-background-color, var(--calcite-color-foreground-1));overflow:hidden}.time-picker .column{display:flex;flex-direction:column}.time-picker .meridiem--start{order:-1}.time-picker .button{display:inline-flex;cursor:pointer;align-items:center;justify-content:center;background-color:var(--calcite-time-picker-background-color, var(--calcite-color-foreground-1))}.time-picker .button:hover,.time-picker .button:focus{outline:2px solid transparent;outline-offset:2px;z-index:var(--calcite-z-index-header);outline-offset:0;background-color:var(--calcite-time-picker-button-background-color-hover, var(--calcite-color-foreground-2))}.time-picker .button:active{background-color:var(--calcite-time-picker-button-background-color-press, var(--calcite-color-foreground-3))}.time-picker .button.top-left{border-start-start-radius:var(--calcite-time-picker-corner-radius, var(--calcite-border-radius-round))}.time-picker .button.bottom-left{border-end-start-radius:var(--calcite-time-picker-corner-radius, var(--calcite-border-radius-round))}.time-picker .button.top-right{border-start-end-radius:var(--calcite-time-picker-corner-radius, var(--calcite-border-radius-round))}.time-picker .button.bottom-right{border-end-end-radius:var(--calcite-time-picker-corner-radius, var(--calcite-border-radius-round))}.time-picker .button calcite-icon{color:var(--calcite-time-picker-icon-color, var(--calcite-color-text-3))}.time-picker .input{display:inline-flex;cursor:pointer;align-items:center;justify-content:center;font-weight:var(--calcite-font-weight-medium);background-color:var(--calcite-time-picker-background-color, var(--calcite-color-foreground-1))}.time-picker .input:hover{box-shadow:inset 0 0 0 2px var(--calcite-time-picker-input-border-color-hover, var(--calcite-color-foreground-2));z-index:var(--calcite-z-index-header)}.time-picker .input:focus,.time-picker .input:hover:focus{outline:2px solid transparent;outline-offset:2px;outline-offset:0}.time-picker .input.inputFocus,.time-picker .input:hover.inputFocus{box-shadow:inset 0 0 0 2px var(--calcite-time-picker-input-border-color-press, var(--calcite-color-brand));z-index:var(--calcite-z-index-header)}.time-picker.scale-s{font-size:var(--calcite-font-size--1)}.time-picker.scale-s .button,.time-picker.scale-s .input{padding-inline:var(--calcite-spacing-sm);padding-block:var(--calcite-spacing-xxs)}.time-picker.scale-s:not(.show-meridiem) .delimiter:last-child{padding-inline-end:var(--calcite-spacing-md)}.time-picker.scale-m{font-size:var(--calcite-font-size-0)}.time-picker.scale-m .button,.time-picker.scale-m .input{padding-inline:var(--calcite-spacing-md);padding-block:var(--calcite-spacing-sm)}.time-picker.scale-m:not(.show-meridiem) .delimiter:last-child{padding-inline-end:var(--calcite-spacing-xl)}.time-picker.scale-l{font-size:var(--calcite-font-size-1)}.time-picker.scale-l .button,.time-picker.scale-l .input{padding-inline:var(--calcite-spacing-lg);padding-block:var(--calcite-spacing-md)}.time-picker.scale-l:not(.show-meridiem) .delimiter:last-child{padding-inline-end:var(--calcite-spacing-xxl)}:host([hidden]){display:none}[hidden]{display:none}`,f=class extends D{constructor(){super(),this.fractionalSecondRef=s(),this.hourRef=s(),this.meridiemRef=s(),this.minuteRef=s(),this.pointerActivated=!1,this.secondRef=s(),this.messages=F(),this.focusSetter=U()(this),this.time=L(this),this.hourFormat="user",this.scale="m",this.step=60,this.value=null,this.calciteTimePickerChange=x({cancelable:!1}),this.listen("blur",this.blurHandler),this.listen("calciteTimeChange",this.timeChangeHandler),this.listen("keydown",this.keyDownHandler),this.listen("pointerdown",this.pointerDownHandler)}static{this.properties={activeEl:[16,{},{state:!0}],showFractionalSecond:[16,{},{state:!0}],showSecond:[16,{},{state:!0}],time:[0,{},{attribute:!1}],hourFormat:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],numberingSystem:1,scale:[3,{},{reflect:!0}],step:[11,{},{reflect:!0,type:Number}],value:1}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=Y}async setFocus(t){return this.focusSetter(()=>this.el,t)}connectedCallback(){super.connectedCallback(),this.toggleSecond()}willUpdate(t){t.has("step")&&(this.hasUpdated||this.step!==60)&&this.toggleSecond(),t.has("value")&&(this.hasUpdated||this.value!==null)&&this.time.setValue(this.value)}blurHandler(){this.activeEl=void 0,this.pointerActivated=!1}keyDownHandler(t){this.pointerActivated=!1;let{defaultPrevented:o,key:r}=t;if(o)return;let{hourFormat:u}=this.time;switch(this.activeEl){case this.hourRef.value:r==="ArrowRight"&&(this.focusPart("minute"),t.preventDefault());break;case this.minuteRef.value:switch(r){case"ArrowLeft":this.focusPart("hour"),t.preventDefault();break;case"ArrowRight":this.step!==60?(this.focusPart("second"),t.preventDefault()):u==="12"&&(this.focusPart("meridiem"),t.preventDefault());break}break;case this.secondRef.value:switch(r){case"ArrowLeft":this.focusPart("minute"),t.preventDefault();break;case"ArrowRight":this.showFractionalSecond?this.focusPart("fractionalSecond"):u==="12"&&(this.focusPart("meridiem"),t.preventDefault());break}break;case this.fractionalSecondRef.value:switch(r){case"ArrowLeft":this.focusPart("second"),t.preventDefault();break;case"ArrowRight":u==="12"&&(this.focusPart("meridiem"),t.preventDefault());break}break;case this.meridiemRef.value:switch(r){case"ArrowLeft":this.showFractionalSecond?this.focusPart("fractionalSecond"):this.step!==60?(this.focusPart("second"),t.preventDefault()):(this.focusPart("minute"),t.preventDefault());break}break}}pointerDownHandler(){this.pointerActivated=!0}async focusPart(t){await E(this),(t==="hour"?this.hourRef:t==="minute"?this.minuteRef:t==="second"?this.secondRef:t==="fractionalSecond"?this.fractionalSecondRef:this.meridiemRef).value?.focus()}focusHandler(t){this.pointerActivated||(this.activeEl=t.currentTarget)}fractionalSecondDownClickHandler(){this.activeEl=this.fractionalSecondRef.value,this.activeEl.focus(),this.time.nudgeFractionalSecond("down")}fractionalSecondUpClickHandler(){this.activeEl=this.fractionalSecondRef.value,this.activeEl.focus(),this.time.nudgeFractionalSecond("up")}hourDownClickHandler(){this.activeEl=this.hourRef.value,this.activeEl.focus(),this.time.decrementHour()}hourUpClickHandler(){this.activeEl=this.hourRef.value,this.activeEl.focus(),this.time.incrementHour()}inputClickHandler(t){this.activeEl=t.target}meridiemUpClickHandler(){this.activeEl=this.meridiemRef.value,this.activeEl.focus(),this.time.toggleMeridiem("up")}meridiemDownClickHandler(){this.activeEl=this.meridiemRef.value,this.activeEl.focus(),this.time.toggleMeridiem("down")}minuteDownClickHandler(){this.activeEl=this.minuteRef.value,this.activeEl.focus(),this.time.decrementMinute()}minuteUpClickHandler(){this.activeEl=this.minuteRef.value,this.activeEl.focus(),this.time.incrementMinute()}secondDownClickHandler(){this.activeEl=this.secondRef.value,this.activeEl.focus(),this.time.decrementSecond()}secondUpClickHandler(){this.activeEl=this.secondRef.value,this.activeEl.focus(),this.time.incrementSecond()}timeChangeHandler(t){t.stopPropagation();let o=t.detail;o!==this.value&&(this.value=o),this.calciteTimePickerChange.emit()}toggleSecond(){this.showSecond=this.step<60,this.stepPrecision=y(this.step),this.showFractionalSecond=this.stepPrecision>0}render(){let{activeEl:t,messages:o,scale:r}=this,{_lang:u}=o,{fractionalSecond:v,handleFractionalSecondKeyDownEvent:P,handleHourKeyDownEvent:M,handleMeridiemKeyDownEvent:z,handleMinuteKeyDownEvent:T,handleSecondKeyDownEvent:A,hour:h,hourFormat:V,localizedDecimalSeparator:N,localizedFractionalSecond:k,localizedHour:I,localizedHourSuffix:K,localizedMeridiem:B,localizedMinute:O,localizedMinuteSuffix:j,localizedSecond:_,localizedSecondSuffix:$,meridiem:w,meridiemOrder:q,minute:m,second:p}=this.time,G=d(h),c=C(r),J=d(m),Q=d(p),W=d(v),X=u!=="bg"&&$,g=V==="12";return n`<div class=${i({[e.timePicker]:!0,[e.showMeridiem]:g,[e.showSecond]:this.showSecond,[e.scale(r)]:!0})} dir=ltr><div class=${i(e.column)} role=group><span .ariaLabel=${o.hourUp} class=${i({[e.button]:!0,[e.buttonHourUp]:!0,[e.buttonTopLeft]:!0})} @click=${this.hourUpClickHandler} role=button><calcite-icon .icon=${a.chevronUp} .scale=${c}></calcite-icon></span><span .ariaLabel=${o.hour} aria-valuemax=23 aria-valuemin=1 .ariaValueNow=${G&&parseInt(h)||"0"} .ariaValueText=${h} class=${i({[e.input]:!0,[e.hour]:!0,[e.inputFocus]:t&&t===this.hourRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${M} role=spinbutton tabindex=0 ${l(this.hourRef)}>${I||"--"}</span><span .ariaLabel=${o.hourDown} class=${i({[e.button]:!0,[e.buttonHourDown]:!0,[e.buttonBottomLeft]:!0})} @click=${this.hourDownClickHandler} role=button><calcite-icon .icon=${a.chevronDown} .scale=${c}></calcite-icon></span></div><span class=${i({[e.delimiter]:!0,[e.hourSuffix]:!0})}>${K}</span><div class=${i(e.column)} role=group><span .ariaLabel=${o.minuteUp} class=${i({[e.button]:!0,[e.buttonMinuteUp]:!0})} @click=${this.minuteUpClickHandler} role=button><calcite-icon .icon=${a.chevronUp} .scale=${c}></calcite-icon></span><span .ariaLabel=${o.minute} aria-valuemax=12 aria-valuemin=1 .ariaValueNow=${J&&parseInt(m)||"0"} .ariaValueText=${m} class=${i({[e.input]:!0,[e.minute]:!0,[e.inputFocus]:t&&t===this.minuteRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${T} role=spinbutton tabindex=0 ${l(this.minuteRef)}>${O||"--"}</span><span .ariaLabel=${o.minuteDown} class=${i({[e.button]:!0,[e.buttonMinuteDown]:!0})} @click=${this.minuteDownClickHandler} role=button><calcite-icon .icon=${a.chevronDown} .scale=${c}></calcite-icon></span></div>${this.showSecond&&n`<span class=${i({[e.delimiter]:!0,[e.minuteSuffix]:!0})}>${j}</span>`||""}${this.showSecond&&n`<div class=${i(e.column)} role=group><span .ariaLabel=${o.secondUp} class=${i({[e.button]:!0,[e.buttonSecondUp]:!0})} @click=${this.secondUpClickHandler} role=button><calcite-icon .icon=${a.chevronUp} .scale=${c}></calcite-icon></span><span .ariaLabel=${o.second} aria-valuemax=59 aria-valuemin=0 .ariaValueNow=${Q&&parseInt(p)||"0"} .ariaValueText=${p} class=${i({[e.input]:!0,[e.second]:!0,[e.inputFocus]:t&&t===this.secondRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${A} role=spinbutton tabindex=0 ${l(this.secondRef)}>${_||"--"}</span><span .ariaLabel=${o.secondDown} class=${i({[e.button]:!0,[e.buttonSecondDown]:!0})} @click=${this.secondDownClickHandler} role=button><calcite-icon .icon=${a.chevronDown} .scale=${c}></calcite-icon></span></div>`||""}${this.showFractionalSecond&&n`<span class=${i({[e.delimiter]:!0,[e.decimalSeparator]:!0})}>${N}</span>`||""}${this.showFractionalSecond&&n`<div class=${i(e.column)} role=group><span .ariaLabel=${o.fractionalSecondUp} class=${i({[e.button]:!0,[e.buttonFractionalSecondUp]:!0})} @click=${this.fractionalSecondUpClickHandler} role=button><calcite-icon .icon=${a.chevronUp} .scale=${c}></calcite-icon></span><span .ariaLabel=${o.fractionalSecond} aria-valuemax=999 aria-valuemin=1 .ariaValueNow=${W&&parseInt(v)||"0"} .ariaValueText=${k} class=${i({[e.input]:!0,[e.fractionalSecond]:!0,[e.inputFocus]:t&&t===this.fractionalSecondRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${P} role=spinbutton tabindex=0 ${l(this.fractionalSecondRef)}>${k||"".padStart(this.stepPrecision,"-")}</span><span .ariaLabel=${o.fractionalSecondDown} class=${i({[e.button]:!0,[e.buttonFractionalSecondDown]:!0})} @click=${this.fractionalSecondDownClickHandler} role=button><calcite-icon .icon=${a.chevronDown} .scale=${c}></calcite-icon></span></div>`||""}${X&&n`<span class=${i({[e.delimiter]:!0,[e.secondSuffix]:!0})}>${$}</span>`||""}${g&&n`<div class=${i({[e.column]:!0,[e.meridiemStart]:q===0||R(this.el)==="rtl"})} role=group><span .ariaLabel=${o.meridiemUp} class=${i({[e.button]:!0,[e.buttonMeridiemUp]:!0,[e.buttonTopRight]:!0})} @click=${this.meridiemUpClickHandler} role=button><calcite-icon .icon=${a.chevronUp} .scale=${c}></calcite-icon></span><span .ariaLabel=${o.meridiem} aria-valuemax=2 aria-valuemin=1 .ariaValueNow=${w==="PM"&&"2"||"1"} .ariaValueText=${w} class=${i({[e.input]:!0,[e.meridiem]:!0,[e.inputFocus]:t&&t===this.meridiemRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${z} role=spinbutton tabindex=0 ${l(this.meridiemRef)}>${B||"--"}</span><span .ariaLabel=${o.meridiemDown} class=${i({[e.button]:!0,[e.buttonMeridiemDown]:!0,[e.buttonBottomRight]:!0})} @click=${this.meridiemDownClickHandler} role=button><calcite-icon .icon=${a.chevronDown} .scale=${c}></calcite-icon></span></div>`||""}</div>`}};H("calcite-time-picker",f);export{f as TimePicker};
@@ -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 t={container:"container",actionsStart:"actions-start",contentStart:"content-start",content:"content",contentEnd:"content-end",actionsEnd:"actions-end"},n={actionsStart:"actions-start",contentStart:"content-start",contentEnd:"content-end",actionsEnd:"actions-end"};export{t as a,n as b};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v5.0.0-next.3 */
4
- import{a as S}from"./MEERCHNE.js";import{c as h,e as C,f as L,g as O,h as R,i as p}from"./CNF3Q4TX.js";import{a as H}from"./TG4OK7FQ.js";import"./7WAFUV2T.js";import"./FPD3KMKK.js";import{h as k,j as y}from"./SLICSH62.js";import{a as b}from"./DNM3U3Z7.js";import{B as c,C as d,D as T,E as l,H as w,P as E,g as v,h as g,o as r}from"./ALOAVLGK.js";var P={positionContainer:"position-container",container:"container"},U="calcite-tooltip",z={host:n=>`${U}-${n}`},m=300,F=m/3,N=m*1.5,x="aria-describedby";function I(n){let{referenceElement:e}=n;return(typeof e=="string"?y(n,{id:e}):e)||null}var f=class{constructor(){this.registeredElements=new WeakMap,this.registeredShadowRootCounts=new WeakMap,this.hoverOpenTimeout=null,this.hoverCloseTimeout=null,this.activeTooltip=null,this.registeredElementCount=0,this.clickedTooltip=null,this.hoveredTooltip=null,this.queryTooltip=e=>{let{registeredElements:t}=this,i=e.find(o=>t.has(o));return t.get(i)},this.keyDownHandler=e=>{if(e.key==="Escape"&&!e.defaultPrevented){let{activeTooltip:t}=this;if(t?.open){this.clearHoverTimeout(),this.closeActiveTooltip();let i=I(t),o=e.composedPath();(i instanceof Element&&o.includes(i)||o.includes(t))&&e.preventDefault()}}},this.pointerLeaveHandler=e=>{e.defaultPrevented||(this.clearHoverTimeout(),this.closeHoveredTooltip())},this.pointerMoveHandler=e=>{if(e.defaultPrevented){this.closeHoveredTooltip();return}let t=e.composedPath(),i=this.queryTooltip(t);if(this.pathHasOpenTooltip(i,t)){this.clearHoverTimeout();return}i!==this.clickedTooltip&&(i!==this.hoveredTooltip&&this.clearHoverOpenTimeout(),this.hoveredTooltip=i,i?this.openHoveredTooltip(i):this.activeTooltip?.open&&this.closeHoveredTooltip(),this.clickedTooltip=null)},this.clickHandler=e=>{if(e.defaultPrevented)return;this.clickedTooltip=null;let t=e.composedPath(),i=this.queryTooltip(t);if(this.pathHasOpenTooltip(i,t)){this.clearHoverTimeout();return}if(this.closeActiveTooltip(),!!i){if(this.clearHoverTimeout(),i.closeOnClick){this.clickedTooltip=i,this.toggleTooltip(i,!1);return}this.toggleTooltip(i,!0)}},this.blurHandler=()=>{this.closeActiveTooltip()},this.focusInHandler=e=>{if(e.defaultPrevented)return;let t=e.composedPath(),i=this.queryTooltip(t);if(this.pathHasOpenTooltip(i,t)){this.clearHoverTimeout();return}i!==this.clickedTooltip&&(this.clickedTooltip=null,this.closeTooltipIfNotActive(i),i&&this.toggleFocusedTooltip(i,!0))},this.openHoveredTooltip=e=>{this.hoverOpenTimeout=window.setTimeout(()=>{this.hoverOpenTimeout===null||e!==this.hoveredTooltip||(this.clearHoverCloseTimeout(),this.closeTooltipIfNotActive(e),this.toggleTooltip(e,!0))},this.activeTooltip?.open?F:m)},this.closeHoveredTooltip=()=>{this.hoverCloseTimeout=window.setTimeout(()=>{this.hoverCloseTimeout!==null&&this.closeActiveTooltip()},N)}}registerElement(e,t){this.registeredElementCount++,this.registeredElements.set(e,t);let i=this.getReferenceElShadowRootNode(e);i&&this.registerShadowRoot(i),this.registeredElementCount===1&&this.addListeners()}unregisterElement(e){let t=this.getReferenceElShadowRootNode(e);t&&this.unregisterShadowRoot(t),this.registeredElements.delete(e)&&this.registeredElementCount--,this.registeredElementCount===0&&this.removeListeners()}pathHasOpenTooltip(e,t){let{activeTooltip:i}=this;return i?.open&&t.includes(i)||e?.open&&t.includes(e)}addShadowListeners(e){e.addEventListener("focusin",this.focusInHandler)}removeShadowListeners(e){e.removeEventListener("focusin",this.focusInHandler)}addListeners(){window.addEventListener("keydown",this.keyDownHandler),window.addEventListener("pointermove",this.pointerMoveHandler),window.addEventListener("click",this.clickHandler),window.addEventListener("focusin",this.focusInHandler),window.addEventListener("blur",this.blurHandler),document.addEventListener("pointerleave",this.pointerLeaveHandler)}removeListeners(){window.removeEventListener("keydown",this.keyDownHandler),window.removeEventListener("pointermove",this.pointerMoveHandler),window.removeEventListener("click",this.clickHandler),window.removeEventListener("focusin",this.focusInHandler),window.removeEventListener("blur",this.blurHandler),document.removeEventListener("pointerleave",this.pointerLeaveHandler)}clearHoverOpenTimeout(){window.clearTimeout(this.hoverOpenTimeout),this.hoverOpenTimeout=null}clearHoverCloseTimeout(){window.clearTimeout(this.hoverCloseTimeout),this.hoverCloseTimeout=null}clearHoverTimeout(){this.clearHoverOpenTimeout(),this.clearHoverCloseTimeout()}closeTooltipIfNotActive(e){this.activeTooltip!==e&&this.closeActiveTooltip()}closeActiveTooltip(){let{activeTooltip:e}=this;e?.open&&this.toggleTooltip(e,!1)}toggleFocusedTooltip(e,t){t&&this.clearHoverTimeout(),this.toggleTooltip(e,t)}toggleTooltip(e,t){e.open=t,this.activeTooltip=t?e:null}registerShadowRoot(e){let{registeredShadowRootCounts:t}=this,i=t.get(e),o=Math.min((typeof i=="number"?i:0)+1,1);o===1&&this.addShadowListeners(e),t.set(e,o)}unregisterShadowRoot(e){let{registeredShadowRootCounts:t}=this,i=t.get(e),o=Math.max((typeof i=="number"?i:1)-1,0);o===0&&this.removeShadowListeners(e),t.set(e,o)}getReferenceElShadowRootNode(e){return e instanceof Element?k(e):null}},B=v`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:contents}.position-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0}@starting-style{.position-container{opacity:0;inset-block-start:0;left:0}}.position-container{max-inline-size:var(--calcite-tooltip-max-size-x, 20rem);max-block-size:20rem}.position-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.position-container:popover-open{display:block}.position-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.position-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.position-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.position-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.position-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.calcite-floating-ui-arrow{pointer-events:none;position:absolute;z-index:calc(var(--calcite-z-index) * -1);fill:var(--calcite-color-foreground-1)}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-color-border-3)}.container{position:relative;overflow:hidden;padding:.75rem 1rem;font-size:var(--calcite-font-size--2);line-height:1.375;font-weight:var(--calcite-font-weight-medium);word-wrap:break-word;word-break:break-word;border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-corner-radius-round));color:var(--calcite-tooltip-text-color, var(--calcite-color-text-1));text-align:start}.position-container .calcite-floating-ui-anim{border-width:1px;border-style:solid;background-color:var(--calcite-tooltip-background-color, var(--calcite-color-foreground-1));border-color:var(--calcite-tooltip-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-corner-radius-round))}.calcite-floating-ui-arrow{fill:var(--calcite-tooltip-background-color, var(--calcite-color-foreground-1))}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-tooltip-border-color, var(--calcite-color-border-3))}:host([hidden]){display:none}[hidden]{display:none}`,A=new f,u=class extends T{constructor(){super(...arguments),this.arrowRef=c(),this.guid=z.host(b()),this.transitionProp="opacity",this.transitionRef=c(),this.floatingLayout="vertical",this.closeOnClick=!1,this.offsetDistance=p,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement="auto",this.calciteTooltipBeforeClose=r({cancelable:!1}),this.calciteTooltipBeforeOpen=r({cancelable:!1}),this.calciteTooltipClose=r({cancelable:!1}),this.calciteTooltipOpen=r({cancelable:!1})}static{this.properties={floatingLayout:[16,{},{state:!0}],referenceEl:[16,{},{state:!0}],closeOnClick:[7,{},{reflect:!0,type:Boolean}],label:1,offsetDistance:[11,{},{type:Number,reflect:!0}],offsetSkidding:[11,{},{reflect:!0,type:Number}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],referenceElement:1}}static{this.styles=B}async reposition(e=!1){let{referenceEl:t,placement:i,overlayPositioning:o,offsetDistance:s,offsetSkidding:a,arrowRef:D,floatingEl:_}=this;return C(this,{floatingEl:_,referenceEl:t,overlayPositioning:o,placement:i,offsetDistance:s,offsetSkidding:a,arrowEl:D.value,type:"tooltip"},e)}connectedCallback(){super.connectedCallback(),this.setUpReferenceElement(!0)}willUpdate(e){(e.has("offsetDistance")&&(this.hasUpdated||this.offsetDistance!==p)||e.has("offsetSkidding")&&(this.hasUpdated||this.offsetSkidding!==0)||e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||e.has("placement")&&(this.hasUpdated||this.placement!=="auto"))&&this.reposition(!0),e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("referenceElement")&&this.setUpReferenceElement()}loaded(){this.referenceElement&&!this.referenceEl&&this.setUpReferenceElement()}disconnectedCallback(){super.disconnectedCallback(),this.removeReferences(),R(this)}async handlePopover(){await this.componentOnReady(),this.floatingEl&&(this.open&&this.referenceEl?this.floatingEl.showPopover():this.floatingEl.hidePopover())}openHandler(){H(this),this.reposition(!0),this.handlePopover()}onBeforeOpen(){this.calciteTooltipBeforeOpen.emit()}onOpen(){this.calciteTooltipOpen.emit()}onBeforeClose(){this.calciteTooltipBeforeClose.emit()}onClose(){this.calciteTooltipClose.emit(),L(this)}setFloatingEl(e){this.floatingEl=e,e&&requestAnimationFrame(()=>this.setUpReferenceElement())}setUpReferenceElement(e=!0){this.removeReferences(),this.referenceEl=I(this.el),O(this);let{el:t,referenceElement:i,referenceEl:o}=this;e&&i&&!o&&console.warn(`${t.tagName}: reference-element id "${i}" was not found.`,{el:t}),this.addReferences(),this.handlePopover()}getId(){return this.el.id||this.guid}addReferences(){let{referenceEl:e}=this;if(!e)return;let t=this.getId();"setAttribute"in e&&e.setAttribute(x,t),A.registerElement(e,this.el)}removeReferences(){let{referenceEl:e}=this;e&&("removeAttribute"in e&&e.removeAttribute(x),A.unregisterElement(e))}render(){let{referenceEl:e,label:t,open:i,floatingLayout:o}=this,s=e&&i,a=!s;return this.el.inert=a,this.el.ariaLabel=t,this.el.ariaLive="polite",w(this.el,"id",this.getId()),this.el.role="tooltip",g`<div class=${l(P.positionContainer)} popover=manual ${d(this.setFloatingEl)}><div class=${l({[h.animation]:!0,[h.animationActive]:s})} ${d(this.transitionRef)}>${S({floatingLayout:o,ref:this.arrowRef})}<div class=${l(P.container)}><slot></slot></div></div></div>`}};E("calcite-tooltip",u);export{u as Tooltip};
3
+ v5.0.0-next.5 */
4
+ import{a as S}from"./2IWOXJH7.js";import{c as h,e as C,f as L,g as O,h as R,i as p}from"./5LAPR75M.js";import{a as H}from"./VQMSSO2U.js";import"./NULQJBCW.js";import"./W5OJOVZY.js";import{h as k,j as y}from"./5IPJANUU.js";import{a as b}from"./ZLR2B6GQ.js";import{B as c,C as d,D as T,E as l,H as w,P as E,g as v,h as g,o as r}from"./AUIOWPFN.js";var P={positionContainer:"position-container",container:"container"},U="calcite-tooltip",z={host:n=>`${U}-${n}`},m=300,F=m/3,N=m*1.5,x="aria-describedby";function I(n){let{referenceElement:e}=n;return(typeof e=="string"?y(n,{id:e}):e)||null}var f=class{constructor(){this.registeredElements=new WeakMap,this.registeredShadowRootCounts=new WeakMap,this.hoverOpenTimeout=null,this.hoverCloseTimeout=null,this.activeTooltip=null,this.registeredElementCount=0,this.clickedTooltip=null,this.hoveredTooltip=null,this.queryTooltip=e=>{let{registeredElements:t}=this,i=e.find(o=>t.has(o));return t.get(i)},this.keyDownHandler=e=>{if(e.key==="Escape"&&!e.defaultPrevented){let{activeTooltip:t}=this;if(t?.open){this.clearHoverTimeout(),this.closeActiveTooltip();let i=I(t),o=e.composedPath();(i instanceof Element&&o.includes(i)||o.includes(t))&&e.preventDefault()}}},this.pointerLeaveHandler=e=>{e.defaultPrevented||(this.clearHoverTimeout(),this.closeHoveredTooltip())},this.pointerMoveHandler=e=>{if(e.defaultPrevented){this.closeHoveredTooltip();return}let t=e.composedPath(),i=this.queryTooltip(t);if(this.pathHasOpenTooltip(i,t)){this.clearHoverTimeout();return}i!==this.clickedTooltip&&(i!==this.hoveredTooltip&&this.clearHoverOpenTimeout(),this.hoveredTooltip=i,i?this.openHoveredTooltip(i):this.activeTooltip?.open&&this.closeHoveredTooltip(),this.clickedTooltip=null)},this.clickHandler=e=>{if(e.defaultPrevented)return;this.clickedTooltip=null;let t=e.composedPath(),i=this.queryTooltip(t);if(this.pathHasOpenTooltip(i,t)){this.clearHoverTimeout();return}if(this.closeActiveTooltip(),!!i){if(this.clearHoverTimeout(),i.closeOnClick){this.clickedTooltip=i,this.toggleTooltip(i,!1);return}this.toggleTooltip(i,!0)}},this.blurHandler=()=>{this.closeActiveTooltip()},this.focusInHandler=e=>{if(e.defaultPrevented)return;let t=e.composedPath(),i=this.queryTooltip(t);if(this.pathHasOpenTooltip(i,t)){this.clearHoverTimeout();return}i!==this.clickedTooltip&&(this.clickedTooltip=null,this.closeTooltipIfNotActive(i),i&&this.toggleFocusedTooltip(i,!0))},this.openHoveredTooltip=e=>{this.hoverOpenTimeout=window.setTimeout(()=>{this.hoverOpenTimeout===null||e!==this.hoveredTooltip||(this.clearHoverCloseTimeout(),this.closeTooltipIfNotActive(e),this.toggleTooltip(e,!0))},this.activeTooltip?.open?F:m)},this.closeHoveredTooltip=()=>{this.hoverCloseTimeout=window.setTimeout(()=>{this.hoverCloseTimeout!==null&&this.closeActiveTooltip()},N)}}registerElement(e,t){this.registeredElementCount++,this.registeredElements.set(e,t);let i=this.getReferenceElShadowRootNode(e);i&&this.registerShadowRoot(i),this.registeredElementCount===1&&this.addListeners()}unregisterElement(e){let t=this.getReferenceElShadowRootNode(e);t&&this.unregisterShadowRoot(t),this.registeredElements.delete(e)&&this.registeredElementCount--,this.registeredElementCount===0&&this.removeListeners()}pathHasOpenTooltip(e,t){let{activeTooltip:i}=this;return i?.open&&t.includes(i)||e?.open&&t.includes(e)}addShadowListeners(e){e.addEventListener("focusin",this.focusInHandler)}removeShadowListeners(e){e.removeEventListener("focusin",this.focusInHandler)}addListeners(){window.addEventListener("keydown",this.keyDownHandler),window.addEventListener("pointermove",this.pointerMoveHandler),window.addEventListener("click",this.clickHandler),window.addEventListener("focusin",this.focusInHandler),window.addEventListener("blur",this.blurHandler),document.addEventListener("pointerleave",this.pointerLeaveHandler)}removeListeners(){window.removeEventListener("keydown",this.keyDownHandler),window.removeEventListener("pointermove",this.pointerMoveHandler),window.removeEventListener("click",this.clickHandler),window.removeEventListener("focusin",this.focusInHandler),window.removeEventListener("blur",this.blurHandler),document.removeEventListener("pointerleave",this.pointerLeaveHandler)}clearHoverOpenTimeout(){window.clearTimeout(this.hoverOpenTimeout),this.hoverOpenTimeout=null}clearHoverCloseTimeout(){window.clearTimeout(this.hoverCloseTimeout),this.hoverCloseTimeout=null}clearHoverTimeout(){this.clearHoverOpenTimeout(),this.clearHoverCloseTimeout()}closeTooltipIfNotActive(e){this.activeTooltip!==e&&this.closeActiveTooltip()}closeActiveTooltip(){let{activeTooltip:e}=this;e?.open&&this.toggleTooltip(e,!1)}toggleFocusedTooltip(e,t){t&&this.clearHoverTimeout(),this.toggleTooltip(e,t)}toggleTooltip(e,t){e.open=t,this.activeTooltip=t?e:null}registerShadowRoot(e){let{registeredShadowRootCounts:t}=this,i=t.get(e),o=Math.min((typeof i=="number"?i:0)+1,1);o===1&&this.addShadowListeners(e),t.set(e,o)}unregisterShadowRoot(e){let{registeredShadowRootCounts:t}=this,i=t.get(e),o=Math.max((typeof i=="number"?i:1)-1,0);o===0&&this.removeShadowListeners(e),t.set(e,o)}getReferenceElShadowRootNode(e){return e instanceof Element?k(e):null}},B=v`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:contents}.position-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0}@starting-style{.position-container{opacity:0;inset-block-start:0;left:0}}.position-container{max-inline-size:var(--calcite-tooltip-max-size-x, 20rem);max-block-size:20rem}.position-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.position-container:popover-open{display:block}.position-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.position-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.position-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.position-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.position-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.calcite-floating-ui-arrow{pointer-events:none;position:absolute;z-index:calc(var(--calcite-z-index) * -1);fill:var(--calcite-color-foreground-1)}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-color-border-3)}.container{position:relative;overflow:hidden;padding:.75rem 1rem;font-size:var(--calcite-font-size--2);line-height:1.375;font-weight:var(--calcite-font-weight-medium);word-wrap:break-word;word-break:break-word;border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-corner-radius-round));color:var(--calcite-tooltip-text-color, var(--calcite-color-text-1));text-align:start}.position-container .calcite-floating-ui-anim{border-width:1px;border-style:solid;background-color:var(--calcite-tooltip-background-color, var(--calcite-color-foreground-1));border-color:var(--calcite-tooltip-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-corner-radius-round))}.calcite-floating-ui-arrow{fill:var(--calcite-tooltip-background-color, var(--calcite-color-foreground-1))}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-tooltip-border-color, var(--calcite-color-border-3))}:host([hidden]){display:none}[hidden]{display:none}`,A=new f,u=class extends T{constructor(){super(...arguments),this.arrowRef=c(),this.guid=z.host(b()),this.transitionProp="opacity",this.transitionRef=c(),this.floatingLayout="vertical",this.closeOnClick=!1,this.offsetDistance=p,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement="auto",this.calciteTooltipBeforeClose=r({cancelable:!1}),this.calciteTooltipBeforeOpen=r({cancelable:!1}),this.calciteTooltipClose=r({cancelable:!1}),this.calciteTooltipOpen=r({cancelable:!1})}static{this.properties={floatingLayout:[16,{},{state:!0}],referenceEl:[16,{},{state:!0}],closeOnClick:[7,{},{reflect:!0,type:Boolean}],label:1,offsetDistance:[11,{},{type:Number,reflect:!0}],offsetSkidding:[11,{},{reflect:!0,type:Number}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],referenceElement:1}}static{this.styles=B}async reposition(e=!1){let{referenceEl:t,placement:i,overlayPositioning:o,offsetDistance:s,offsetSkidding:a,arrowRef:D,floatingEl:_}=this;return C(this,{floatingEl:_,referenceEl:t,overlayPositioning:o,placement:i,offsetDistance:s,offsetSkidding:a,arrowEl:D.value,type:"tooltip"},e)}connectedCallback(){super.connectedCallback(),this.setUpReferenceElement(!0)}willUpdate(e){(e.has("offsetDistance")&&(this.hasUpdated||this.offsetDistance!==p)||e.has("offsetSkidding")&&(this.hasUpdated||this.offsetSkidding!==0)||e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||e.has("placement")&&(this.hasUpdated||this.placement!=="auto"))&&this.reposition(!0),e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("referenceElement")&&this.setUpReferenceElement()}loaded(){this.referenceElement&&!this.referenceEl&&this.setUpReferenceElement()}disconnectedCallback(){super.disconnectedCallback(),this.removeReferences(),R(this)}async handlePopover(){await this.componentOnReady(),this.floatingEl&&(this.open&&this.referenceEl?this.floatingEl.showPopover():this.floatingEl.hidePopover())}openHandler(){H(this),this.reposition(!0),this.handlePopover()}onBeforeOpen(){this.calciteTooltipBeforeOpen.emit()}onOpen(){this.calciteTooltipOpen.emit()}onBeforeClose(){this.calciteTooltipBeforeClose.emit()}onClose(){this.calciteTooltipClose.emit(),L(this)}setFloatingEl(e){this.floatingEl=e,e&&requestAnimationFrame(()=>this.setUpReferenceElement())}setUpReferenceElement(e=!0){this.removeReferences(),this.referenceEl=I(this.el),O(this);let{el:t,referenceElement:i,referenceEl:o}=this;e&&i&&!o&&console.warn(`${t.tagName}: reference-element id "${i}" was not found.`,{el:t}),this.addReferences(),this.handlePopover()}getId(){return this.el.id||this.guid}addReferences(){let{referenceEl:e}=this;if(!e)return;let t=this.getId();"setAttribute"in e&&e.setAttribute(x,t),A.registerElement(e,this.el)}removeReferences(){let{referenceEl:e}=this;e&&("removeAttribute"in e&&e.removeAttribute(x),A.unregisterElement(e))}render(){let{referenceEl:e,label:t,open:i,floatingLayout:o}=this,s=e&&i,a=!s;return this.el.inert=a,this.el.ariaLabel=t,this.el.ariaLive="polite",w(this.el,"id",this.getId()),this.el.role="tooltip",g`<div class=${l(P.positionContainer)} popover=manual ${d(this.setFloatingEl)}><div class=${l({[h.animation]:!0,[h.animationActive]:s})} ${d(this.transitionRef)}>${S({floatingLayout:o,ref:this.arrowRef})}<div class=${l(P.container)}><slot></slot></div></div></div>`}};E("calcite-tooltip",u);export{u as Tooltip};
@@ -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{D as l,E as a,G as n,P as r,g as o,h as t}from"./ALOAVLGK.js";var i={container:"container",containerNoSpacing:"container--no-spacing",firstTitle:"first-title",heading:"heading",scale:c=>`scale--${c}`,separator:"separator"},g=o`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}.scale--s{font-size:var(--calcite-font-size--2);line-height:1rem;--calcite-internal-autocomplete-item-group-horizontal-spacing-unit: var(--calcite-spacing-sm);--calcite-internal-autocomplete-item-group-vertical-spacing-unit: var(--calcite-spacing-xxs)}.scale--s .first-title{padding-block-start:var(--calcite-spacing-sm)}.scale--s .separator{margin-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);margin-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}.scale--m{font-size:var(--calcite-font-size--1);line-height:1rem;--calcite-internal-autocomplete-item-group-horizontal-spacing-unit: var(--calcite-spacing-md);--calcite-internal-autocomplete-item-group-vertical-spacing-unit: var(--calcite-spacing-xs)}.scale--m .first-title{padding-block-start:var(--calcite-spacing-md)}.scale--m .separator{margin-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);margin-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}.scale--l{font-size:var(--calcite-font-size-0);line-height:1.25rem;--calcite-internal-autocomplete-item-group-horizontal-spacing-unit: var(--calcite-spacing-lg);--calcite-internal-autocomplete-item-group-vertical-spacing-unit: var(--calcite-spacing-sm-plus)}.scale--l .first-title{padding-block-start:var(--calcite-spacing-xl)}.scale--l .separator{margin-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);margin-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}:host{margin:0;display:flex;flex-direction:column}.container{display:flex;flex-direction:column;background-color:var(--calcite-autocomplete-background-color, var(--calcite-color-foreground-1))}.container--no-spacing{padding-block-start:0}.separator{block-size:var(--calcite-spacing-px);background-color:var(--calcite-autocomplete-border-color, var(--calcite-color-border-3))}.heading{box-sizing:border-box;inline-size:100%;min-inline-size:0px;max-inline-size:100%;font-weight:var(--calcite-font-weight-bold);word-wrap:break-word;word-break:break-word;color:var(--calcite-autocomplete-text-color, var(--calcite-color-text-1));padding-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);padding-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}:host([hidden]){display:none}[hidden]{display:none}`,e=class extends l{constructor(){super(...arguments),this.disableSpacing=!1,this.position=0,this.scale="m"}static{this.properties={disableSpacing:[5,{},{type:Boolean}],heading:1,label:1,position:[9,{},{type:Number}],scale:1}}static{this.styles=g}render(){let{scale:s}=this,p=this.position>0?t`<div class=${a(i.separator)} role=separator></div>`:null;return t`<div aria-label=${this.label??this.heading??n} class=${a({[i.container]:!0,[i.containerNoSpacing]:this.disableSpacing,[i.scale(s)]:!0})} role=group>${p}<div class=${a({[i.heading]:!0,[i.firstTitle]:this.position===0})}>${this.heading}</div><slot></slot></div>`}};r("calcite-autocomplete-item-group",e);export{e as AutocompleteItemGroup};
3
+ v5.0.0-next.5 */
4
+ import{D as l,E as a,G as n,P as r,g as o,h as t}from"./AUIOWPFN.js";var i={container:"container",containerNoSpacing:"container--no-spacing",firstTitle:"first-title",heading:"heading",scale:c=>`scale--${c}`,separator:"separator"},g=o`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}.scale--s{font-size:var(--calcite-font-size--2);line-height:1rem;--calcite-internal-autocomplete-item-group-horizontal-spacing-unit: var(--calcite-spacing-sm);--calcite-internal-autocomplete-item-group-vertical-spacing-unit: var(--calcite-spacing-xxs)}.scale--s .first-title{padding-block-start:var(--calcite-spacing-sm)}.scale--s .separator{margin-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);margin-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}.scale--m{font-size:var(--calcite-font-size--1);line-height:1rem;--calcite-internal-autocomplete-item-group-horizontal-spacing-unit: var(--calcite-spacing-md);--calcite-internal-autocomplete-item-group-vertical-spacing-unit: var(--calcite-spacing-xs)}.scale--m .first-title{padding-block-start:var(--calcite-spacing-md)}.scale--m .separator{margin-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);margin-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}.scale--l{font-size:var(--calcite-font-size-0);line-height:1.25rem;--calcite-internal-autocomplete-item-group-horizontal-spacing-unit: var(--calcite-spacing-lg);--calcite-internal-autocomplete-item-group-vertical-spacing-unit: var(--calcite-spacing-sm-plus)}.scale--l .first-title{padding-block-start:var(--calcite-spacing-xl)}.scale--l .separator{margin-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);margin-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}:host{margin:0;display:flex;flex-direction:column}.container{display:flex;flex-direction:column;background-color:var(--calcite-autocomplete-background-color, var(--calcite-color-foreground-1))}.container--no-spacing{padding-block-start:0}.separator{block-size:var(--calcite-spacing-px);background-color:var(--calcite-autocomplete-border-color, var(--calcite-color-border-3))}.heading{box-sizing:border-box;inline-size:100%;min-inline-size:0px;max-inline-size:100%;font-weight:var(--calcite-font-weight-bold);word-wrap:break-word;word-break:break-word;color:var(--calcite-autocomplete-text-color, var(--calcite-color-text-1));padding-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);padding-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}:host([hidden]){display:none}[hidden]{display:none}`,e=class extends l{constructor(){super(...arguments),this.disableSpacing=!1,this.position=0,this.scale="m"}static{this.properties={disableSpacing:[5,{},{type:Boolean}],heading:1,label:1,position:[9,{},{type:Number}],scale:1}}static{this.styles=g}render(){let{scale:s}=this,p=this.position>0?t`<div class=${a(i.separator)} role=separator></div>`:null;return t`<div aria-label=${this.label??this.heading??n} class=${a({[i.container]:!0,[i.containerNoSpacing]:this.disableSpacing,[i.scale(s)]:!0})} role=group>${p}<div class=${a({[i.heading]:!0,[i.firstTitle]:this.position===0})}>${this.heading}</div><slot></slot></div>`}};r("calcite-autocomplete-item-group",e);export{e as AutocompleteItemGroup};
@@ -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 z,b as k}from"./6RMUSGEC.js";import{a as u,b as n,c as o,h as r,j as g,k as d,m as f,n as h,p as D}from"./LSTKQGBO.js";import{k as b,l as C}from"./I2EB746H.js";import"./L6HFE67F.js";import{a as E}from"./WIJWBGXQ.js";import{a as R}from"./XWXCOJUO.js";import"./UXWFYSWM.js";import"./JW4SOJWB.js";import"./P2RYGBBZ.js";import"./SLICSH62.js";import"./DNM3U3Z7.js";import{D as y,E as x,P as S,g as p,h as v,o as m}from"./ALOAVLGK.js";var M=2,P={dateStyle:"full"},w={container:"container"},F=p`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host{display:inline-block;inline-size:100%;overflow:visible;border-width:1px;border-style:solid;vertical-align:top;border-color:var(--calcite-date-picker-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-date-picker-corner-radius, 0)}:host([scale=s]){inline-size:236px;min-inline-size:216px;max-inline-size:380px}:host([scale=s][range][layout=horizontal][calendars="2"]){inline-size:480px;min-inline-size:432px;max-inline-size:772px}:host([scale=m]){inline-size:298px;min-inline-size:272px;max-inline-size:480px}:host([scale=m][layout=horizontal][range][calendars="2"]){inline-size:608px;min-inline-size:544px;max-inline-size:972px}:host([scale=l]){inline-size:334px;min-inline-size:320px;max-inline-size:600px}:host([scale=l][layout=horizontal][range][calendars="2"]){inline-size:684px;min-inline-size:640px;max-inline-size:1212px}.container{outline:2px solid transparent;outline-offset:2px}:host([hidden]){display:none}[hidden]{display:none}`,A=class extends y{constructor(){super(),this.rangeValueChangedByUser=!1,this.messages=E({blocking:!0}),this.focusSetter=R()(this),this.calendars=2,this.layout="horizontal",this.monthStyle="wide",this.proximitySelectionDisabled=!1,this.range=!1,this.scale="m",this.calciteDatePickerChange=m({cancelable:!1}),this.calciteDatePickerRangeChange=m({cancelable:!1}),this.listen("keydown",this.keyDownHandler)}static{this.properties={activeEndDate:[16,{},{state:!0}],activeStartDate:[16,{},{state:!0}],dateTimeFormat:[16,{},{state:!0}],endAsDate:[16,{},{state:!0}],hoverRange:[16,{},{state:!0}],localeData:[16,{},{state:!0}],startAsDate:[16,{},{state:!0}],activeDate:[0,{},{attribute:!1}],activeRange:[3,{},{reflect:!0}],calendars:[11,{},{type:Number,reflect:!0}],headingLevel:[11,{},{type:Number,reflect:!0}],layout:[3,{},{reflect:!0}],max:[3,{},{reflect:!0}],maxAsDate:[0,{},{attribute:!1}],messageOverrides:[0,{},{attribute:!1}],min:[3,{},{reflect:!0}],minAsDate:[0,{},{attribute:!1}],monthStyle:1,numberingSystem:[3,{},{reflect:!0}],proximitySelectionDisabled:[7,{},{reflect:!0,type:Boolean}],range:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],value:1,valueAsDate:[0,{},{attribute:!1}]}}static{this.styles=F}async reset(){this.resetActiveDates(),this.rangeValueChangedByUser=!1}async setFocus(t){return this.focusSetter(()=>this.el,t)}async load(){await this.loadLocaleData()}willUpdate(t){t.has("value")&&this.valueHandler(this.value),t.has("valueAsDate")&&this.valueAsDateWatcher(this.valueAsDate);let e,a;t.has("min")&&!t.has("minAsDate")?e="min":t.has("minAsDate")&&!t.has("min")&&(e="minAsDate"),t.has("max")&&!t.has("maxAsDate")?a="max":t.has("maxAsDate")&&!t.has("max")&&(a="maxAsDate"),e==="min"?this.minAsDate=o(this.min):e==="minAsDate"&&(this.minAsDate=o(r(this.minAsDate))),a==="max"?this.maxAsDate=o(this.max):a==="maxAsDate"&&(this.maxAsDate=o(r(this.maxAsDate))),(t.has("range")&&this.range||t.has("maxAsDate")||t.has("minAsDate"))&&this.setActiveStartAndEndDates(),t.has("activeDate")&&this.activeDateWatcher(this.activeDate),t.has("messages")&&this.hasUpdated&&this.loadLocaleData().catch(console.error)}activeDateWatcher(t){this.range&&(this.rangeValueChangedByUser||(t?(this.activeStartDate=t,this.activeEndDate=h(this.activeStartDate)):this.resetActiveDates()))}valueHandler(t){Array.isArray(t)?(this.valueAsDate=k(t),this.rangeValueChangedByUser||this.resetActiveDates()):t&&(this.valueAsDate=o(t))}valueAsDateWatcher(t){this.range&&Array.isArray(t)&&!this.rangeValueChangedByUser?this.setActiveStartAndEndDates():t&&t!==this.activeDate&&(this.activeDate=t)}keyDownHandler(t){t.key==="Escape"&&this.resetActiveDates()}async loadLocaleData(){b.numberFormatOptions={numberingSystem:this.numberingSystem,locale:this.messages._lang,useGrouping:!1},this.localeData=await z(this.messages._lang),this.dateTimeFormat=C(this.messages._lang,P)}monthHeaderSelectChange(t){let e=new Date(t.detail.date),a=t.detail.position;this.range?a==="end"?(this.activeEndDate=e,this.activeStartDate=d(e)):(this.activeStartDate=e,this.activeEndDate=h(e)):this.activeDate=e,t.stopPropagation()}monthActiveDateChange(t){let e=new Date(t.detail);if(!this.range)this.activeDate=e;else{let a=e.getMonth(),i=a!==this.activeStartDate.getMonth()&&(this.calendars===1||a!==h(this.activeStartDate).getMonth());this.activeRange==="end"?(!this.activeEndDate||this.activeStartDate&&i)&&(this.activeEndDate=e,this.activeStartDate=d(e)):(this.activeStartDate&&i||!this.activeStartDate)&&(this.activeStartDate=e,this.activeEndDate=h(e))}t.stopPropagation()}monthHoverChange(t){if(!this.range){this.hoverRange=void 0;return}let{valueAsDate:e}=this,a=Array.isArray(e)&&e[0],i=Array.isArray(e)&&e[1],s=new Date(t.detail);if(this.hoverRange={focused:this.activeRange||"start",start:a,end:i},this.proximitySelectionDisabled)i&&a||!i&&s>=a?(this.hoverRange.focused="end",this.hoverRange.end=s):!i&&s<a?this.hoverRange={focused:"start",start:s,end:a}:this.hoverRange=void 0;else if(this.activeRange)this.activeRange==="end"?(this.hoverRange.end=s,this.hoverRange.focused="end"):(this.hoverRange.start=s,this.hoverRange.focused="start");else if(a&&i){let l=Math.abs(D(s,a)),c=Math.abs(D(s,i));s>i?(this.hoverRange.end=s,this.hoverRange.focused="end"):s<a?(this.hoverRange.start=s,this.hoverRange.focused="start"):s>a&&s<i&&(l<c?(this.hoverRange.start=s,this.hoverRange.focused="start"):(this.hoverRange.end=s,this.hoverRange.focused="end"))}else a&&(s<a?this.hoverRange={focused:"start",start:s,end:a}:(this.hoverRange.end=s,this.hoverRange.focused="end"));t.stopPropagation()}monthMouseOutChange(t){this.hoverRange&&(this.hoverRange=void 0),t.stopPropagation()}resetActiveDates(){let{valueAsDate:t}=this;!Array.isArray(t)&&t&&t!==this.activeDate&&(this.activeDate=new Date(t)),Array.isArray(t)&&(t[0]&&t[0]!==this.activeStartDate&&(this.activeStartDate=new Date(t[0])),t[1]&&t[1]!==this.activeEndDate&&(this.activeEndDate=new Date(t[1]))),this.hoverRange=void 0}getEndDate(){return Array.isArray(this.valueAsDate)&&this.valueAsDate[1]||void 0}setEndDate(t,e=!0){let a=this.getStartDate();this.rangeValueChangedByUser=!0,this.value=[r(a),r(t)],this.valueAsDate=[a,t],e&&this.calciteDatePickerRangeChange.emit()}getStartDate(){return Array.isArray(this.valueAsDate)&&this.valueAsDate[0]}setStartDate(t,e=!0){let a=this.getEndDate();this.rangeValueChangedByUser=!0,this.value=[r(t),r(a)],this.valueAsDate=[t,a],e&&this.calciteDatePickerRangeChange.emit()}monthDateChange(t){let e=new Date(t.detail),a=r(e);if(!this.range&&a===r(this.valueAsDate))return;if(!this.range){this.value=a||"",this.valueAsDate=e||null,this.activeDate=e||null,this.calciteDatePickerChange.emit();return}let i=this.getStartDate(),s=this.getEndDate();if(!i||!s&&e<i)i&&this.setEndDate(new Date(i)),this.activeRange=="end"?this.setEndDate(e):this.setStartDate(e);else if(!s)this.setEndDate(e);else if(this.proximitySelectionDisabled)this.setStartDate(e,!1),this.setEndDate(null,!1),this.calciteDatePickerRangeChange.emit();else if(this.activeRange)this.activeRange=="end"?this.setEndDate(e):(e>s&&(this.setEndDate(null,!1),this.activeEndDate=null),this.setStartDate(e));else{let l=D(e,i),c=D(e,s);c===0||l<0?this.setStartDate(e):l===0||c<0?this.setEndDate(e):l<c?this.setStartDate(e):this.setEndDate(e)}t.stopPropagation(),this.calciteDatePickerChange.emit()}getActiveDate(t,e,a){let i=n(new Date,e,a);return n(this.activeDate,e,a)||t||(g(a,i)&&!this.range?f(i,e,a):i)}getActiveEndDate(t,e,a){return n(this.activeEndDate,e,a)||t||n(h(new Date),e,a)}setActiveStartAndEndDates(){if(this.range){let t=n(Array.isArray(this.valueAsDate)?this.valueAsDate[0]:this.valueAsDate,this.minAsDate,this.maxAsDate),e=n(Array.isArray(this.valueAsDate)?this.valueAsDate[1]:null,this.minAsDate,this.maxAsDate);if(this.activeStartDate=this.getActiveDate(t,this.minAsDate,this.maxAsDate),this.activeEndDate=this.getActiveEndDate(e,this.minAsDate,this.maxAsDate),g(this.activeStartDate,this.activeEndDate)){let a=f(d(this.activeEndDate),this.minAsDate,this.maxAsDate),i=h(this.activeEndDate);u(a,this.minAsDate,this.maxAsDate)?this.activeStartDate=a:u(i,this.minAsDate,this.maxAsDate)&&(this.activeEndDate=i)}}}render(){let t=n(this.range&&Array.isArray(this.valueAsDate)?this.valueAsDate[0]:this.valueAsDate,this.minAsDate,this.maxAsDate),e=this.getActiveDate(t,this.minAsDate,this.maxAsDate),a=this.range&&Array.isArray(this.valueAsDate)?n(this.valueAsDate[1],this.minAsDate,this.maxAsDate):null,i=this.range&&this.activeRange?this.activeRange==="start"?this.minAsDate:t:this.minAsDate,s=this.range?this.activeStartDate:e;return v`<div aria-hidden class=${x(w.container)} tabindex=-1>${this.renderMonth(s,this.maxAsDate,i,t,a)}</div>`}renderMonth(t,e,a,i,s){return v`<calcite-date-picker-month .activeDate=${t} .calendars=${this.calendars} .dateTimeFormat=${this.dateTimeFormat} .endDate=${this.range?s:void 0} .headingLevel=${this.headingLevel||M} .hoverRange=${this.hoverRange} .layout=${this.layout} .localeData=${this.localeData} .max=${e} .messages=${this.messages} .min=${a} .monthStyle=${this.monthStyle} @calciteInternalDatePickerDayHover=${this.monthHoverChange} @calciteInternalDatePickerDaySelect=${this.monthDateChange} @calciteInternalDatePickerMonthActiveDateChange=${this.monthActiveDateChange} @calciteInternalDatePickerMonthChange=${this.monthHeaderSelectChange} @calciteInternalDatePickerMonthMouseOut=${this.monthMouseOutChange} .range=${this.range} .scale=${this.scale} .selectedDate=${this.activeRange==="end"?s:i} .startDate=${this.range?i:void 0}></calcite-date-picker-month>`}};S("calcite-date-picker",A);export{A as DatePicker};
3
+ v5.0.0-next.5 */
4
+ import{a as z,b as k}from"./BE5OB2TH.js";import{a as u,b as n,c as o,h as r,j as g,k as d,m as f,n as h,p as D}from"./2HKRJLBG.js";import{k as b,l as C}from"./CVLFEMH2.js";import"./S5CLKCGJ.js";import{a as E}from"./LH7245HX.js";import{a as R}from"./WOTQIMPZ.js";import"./B5JXPZDV.js";import"./3YZG7MA3.js";import"./CIU4VM7X.js";import"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{D as y,E as x,P as S,g as p,h as v,o as m}from"./AUIOWPFN.js";var M=2,P={dateStyle:"full"},w={container:"container"},F=p`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host{display:inline-block;inline-size:100%;overflow:visible;border-width:1px;border-style:solid;vertical-align:top;border-color:var(--calcite-date-picker-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-date-picker-corner-radius, 0)}:host([scale=s]){inline-size:236px;min-inline-size:216px;max-inline-size:380px}:host([scale=s][range][layout=horizontal][calendars="2"]){inline-size:480px;min-inline-size:432px;max-inline-size:772px}:host([scale=m]){inline-size:298px;min-inline-size:272px;max-inline-size:480px}:host([scale=m][layout=horizontal][range][calendars="2"]){inline-size:608px;min-inline-size:544px;max-inline-size:972px}:host([scale=l]){inline-size:334px;min-inline-size:320px;max-inline-size:600px}:host([scale=l][layout=horizontal][range][calendars="2"]){inline-size:684px;min-inline-size:640px;max-inline-size:1212px}.container{outline:2px solid transparent;outline-offset:2px}:host([hidden]){display:none}[hidden]{display:none}`,A=class extends y{constructor(){super(),this.rangeValueChangedByUser=!1,this.messages=E({blocking:!0}),this.focusSetter=R()(this),this.calendars=2,this.layout="horizontal",this.monthStyle="wide",this.proximitySelectionDisabled=!1,this.range=!1,this.scale="m",this.calciteDatePickerChange=m({cancelable:!1}),this.calciteDatePickerRangeChange=m({cancelable:!1}),this.listen("keydown",this.keyDownHandler)}static{this.properties={activeEndDate:[16,{},{state:!0}],activeStartDate:[16,{},{state:!0}],dateTimeFormat:[16,{},{state:!0}],endAsDate:[16,{},{state:!0}],hoverRange:[16,{},{state:!0}],localeData:[16,{},{state:!0}],startAsDate:[16,{},{state:!0}],activeDate:[0,{},{attribute:!1}],activeRange:[3,{},{reflect:!0}],calendars:[11,{},{type:Number,reflect:!0}],headingLevel:[11,{},{type:Number,reflect:!0}],layout:[3,{},{reflect:!0}],max:[3,{},{reflect:!0}],maxAsDate:[0,{},{attribute:!1}],messageOverrides:[0,{},{attribute:!1}],min:[3,{},{reflect:!0}],minAsDate:[0,{},{attribute:!1}],monthStyle:1,numberingSystem:[3,{},{reflect:!0}],proximitySelectionDisabled:[7,{},{reflect:!0,type:Boolean}],range:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],value:1,valueAsDate:[0,{},{attribute:!1}]}}static{this.styles=F}async reset(){this.resetActiveDates(),this.rangeValueChangedByUser=!1}async setFocus(t){return this.focusSetter(()=>this.el,t)}async load(){await this.loadLocaleData()}willUpdate(t){t.has("value")&&this.valueHandler(this.value),t.has("valueAsDate")&&this.valueAsDateWatcher(this.valueAsDate);let e,a;t.has("min")&&!t.has("minAsDate")?e="min":t.has("minAsDate")&&!t.has("min")&&(e="minAsDate"),t.has("max")&&!t.has("maxAsDate")?a="max":t.has("maxAsDate")&&!t.has("max")&&(a="maxAsDate"),e==="min"?this.minAsDate=o(this.min):e==="minAsDate"&&(this.minAsDate=o(r(this.minAsDate))),a==="max"?this.maxAsDate=o(this.max):a==="maxAsDate"&&(this.maxAsDate=o(r(this.maxAsDate))),(t.has("range")&&this.range||t.has("maxAsDate")||t.has("minAsDate"))&&this.setActiveStartAndEndDates(),t.has("activeDate")&&this.activeDateWatcher(this.activeDate),t.has("messages")&&this.hasUpdated&&this.loadLocaleData().catch(console.error)}activeDateWatcher(t){this.range&&(this.rangeValueChangedByUser||(t?(this.activeStartDate=t,this.activeEndDate=h(this.activeStartDate)):this.resetActiveDates()))}valueHandler(t){Array.isArray(t)?(this.valueAsDate=k(t),this.rangeValueChangedByUser||this.resetActiveDates()):t&&(this.valueAsDate=o(t))}valueAsDateWatcher(t){this.range&&Array.isArray(t)&&!this.rangeValueChangedByUser?this.setActiveStartAndEndDates():t&&t!==this.activeDate&&(this.activeDate=t)}keyDownHandler(t){t.key==="Escape"&&this.resetActiveDates()}async loadLocaleData(){b.numberFormatOptions={numberingSystem:this.numberingSystem,locale:this.messages._lang,useGrouping:!1},this.localeData=await z(this.messages._lang),this.dateTimeFormat=C(this.messages._lang,P)}monthHeaderSelectChange(t){let e=new Date(t.detail.date),a=t.detail.position;this.range?a==="end"?(this.activeEndDate=e,this.activeStartDate=d(e)):(this.activeStartDate=e,this.activeEndDate=h(e)):this.activeDate=e,t.stopPropagation()}monthActiveDateChange(t){let e=new Date(t.detail);if(!this.range)this.activeDate=e;else{let a=e.getMonth(),i=a!==this.activeStartDate.getMonth()&&(this.calendars===1||a!==h(this.activeStartDate).getMonth());this.activeRange==="end"?(!this.activeEndDate||this.activeStartDate&&i)&&(this.activeEndDate=e,this.activeStartDate=d(e)):(this.activeStartDate&&i||!this.activeStartDate)&&(this.activeStartDate=e,this.activeEndDate=h(e))}t.stopPropagation()}monthHoverChange(t){if(!this.range){this.hoverRange=void 0;return}let{valueAsDate:e}=this,a=Array.isArray(e)&&e[0],i=Array.isArray(e)&&e[1],s=new Date(t.detail);if(this.hoverRange={focused:this.activeRange||"start",start:a,end:i},this.proximitySelectionDisabled)i&&a||!i&&s>=a?(this.hoverRange.focused="end",this.hoverRange.end=s):!i&&s<a?this.hoverRange={focused:"start",start:s,end:a}:this.hoverRange=void 0;else if(this.activeRange)this.activeRange==="end"?(this.hoverRange.end=s,this.hoverRange.focused="end"):(this.hoverRange.start=s,this.hoverRange.focused="start");else if(a&&i){let l=Math.abs(D(s,a)),c=Math.abs(D(s,i));s>i?(this.hoverRange.end=s,this.hoverRange.focused="end"):s<a?(this.hoverRange.start=s,this.hoverRange.focused="start"):s>a&&s<i&&(l<c?(this.hoverRange.start=s,this.hoverRange.focused="start"):(this.hoverRange.end=s,this.hoverRange.focused="end"))}else a&&(s<a?this.hoverRange={focused:"start",start:s,end:a}:(this.hoverRange.end=s,this.hoverRange.focused="end"));t.stopPropagation()}monthMouseOutChange(t){this.hoverRange&&(this.hoverRange=void 0),t.stopPropagation()}resetActiveDates(){let{valueAsDate:t}=this;!Array.isArray(t)&&t&&t!==this.activeDate&&(this.activeDate=new Date(t)),Array.isArray(t)&&(t[0]&&t[0]!==this.activeStartDate&&(this.activeStartDate=new Date(t[0])),t[1]&&t[1]!==this.activeEndDate&&(this.activeEndDate=new Date(t[1]))),this.hoverRange=void 0}getEndDate(){return Array.isArray(this.valueAsDate)&&this.valueAsDate[1]||void 0}setEndDate(t,e=!0){let a=this.getStartDate();this.rangeValueChangedByUser=!0,this.value=[r(a),r(t)],this.valueAsDate=[a,t],e&&this.calciteDatePickerRangeChange.emit()}getStartDate(){return Array.isArray(this.valueAsDate)&&this.valueAsDate[0]}setStartDate(t,e=!0){let a=this.getEndDate();this.rangeValueChangedByUser=!0,this.value=[r(t),r(a)],this.valueAsDate=[t,a],e&&this.calciteDatePickerRangeChange.emit()}monthDateChange(t){let e=new Date(t.detail),a=r(e);if(!this.range&&a===r(this.valueAsDate))return;if(!this.range){this.value=a||"",this.valueAsDate=e||null,this.activeDate=e||null,this.calciteDatePickerChange.emit();return}let i=this.getStartDate(),s=this.getEndDate();if(!i||!s&&e<i)i&&this.setEndDate(new Date(i)),this.activeRange=="end"?this.setEndDate(e):this.setStartDate(e);else if(!s)this.setEndDate(e);else if(this.proximitySelectionDisabled)this.setStartDate(e,!1),this.setEndDate(null,!1),this.calciteDatePickerRangeChange.emit();else if(this.activeRange)this.activeRange=="end"?this.setEndDate(e):(e>s&&(this.setEndDate(null,!1),this.activeEndDate=null),this.setStartDate(e));else{let l=D(e,i),c=D(e,s);c===0||l<0?this.setStartDate(e):l===0||c<0?this.setEndDate(e):l<c?this.setStartDate(e):this.setEndDate(e)}t.stopPropagation(),this.calciteDatePickerChange.emit()}getActiveDate(t,e,a){let i=n(new Date,e,a);return n(this.activeDate,e,a)||t||(g(a,i)&&!this.range?f(i,e,a):i)}getActiveEndDate(t,e,a){return n(this.activeEndDate,e,a)||t||n(h(new Date),e,a)}setActiveStartAndEndDates(){if(this.range){let t=n(Array.isArray(this.valueAsDate)?this.valueAsDate[0]:this.valueAsDate,this.minAsDate,this.maxAsDate),e=n(Array.isArray(this.valueAsDate)?this.valueAsDate[1]:null,this.minAsDate,this.maxAsDate);if(this.activeStartDate=this.getActiveDate(t,this.minAsDate,this.maxAsDate),this.activeEndDate=this.getActiveEndDate(e,this.minAsDate,this.maxAsDate),g(this.activeStartDate,this.activeEndDate)){let a=f(d(this.activeEndDate),this.minAsDate,this.maxAsDate),i=h(this.activeEndDate);u(a,this.minAsDate,this.maxAsDate)?this.activeStartDate=a:u(i,this.minAsDate,this.maxAsDate)&&(this.activeEndDate=i)}}}render(){let t=n(this.range&&Array.isArray(this.valueAsDate)?this.valueAsDate[0]:this.valueAsDate,this.minAsDate,this.maxAsDate),e=this.getActiveDate(t,this.minAsDate,this.maxAsDate),a=this.range&&Array.isArray(this.valueAsDate)?n(this.valueAsDate[1],this.minAsDate,this.maxAsDate):null,i=this.range&&this.activeRange?this.activeRange==="start"?this.minAsDate:t:this.minAsDate,s=this.range?this.activeStartDate:e;return v`<div aria-hidden class=${x(w.container)} tabindex=-1>${this.renderMonth(s,this.maxAsDate,i,t,a)}</div>`}renderMonth(t,e,a,i,s){return v`<calcite-date-picker-month .activeDate=${t} .calendars=${this.calendars} .dateTimeFormat=${this.dateTimeFormat} .endDate=${this.range?s:void 0} .headingLevel=${this.headingLevel||M} .hoverRange=${this.hoverRange} .layout=${this.layout} .localeData=${this.localeData} .max=${e} .messages=${this.messages} .min=${a} .monthStyle=${this.monthStyle} @calciteInternalDatePickerDayHover=${this.monthHoverChange} @calciteInternalDatePickerDaySelect=${this.monthDateChange} @calciteInternalDatePickerMonthActiveDateChange=${this.monthActiveDateChange} @calciteInternalDatePickerMonthChange=${this.monthHeaderSelectChange} @calciteInternalDatePickerMonthMouseOut=${this.monthMouseOutChange} .range=${this.range} .scale=${this.scale} .selectedDate=${this.activeRange==="end"?s:i} .startDate=${this.range?i:void 0}></calcite-date-picker-month>`}};S("calcite-date-picker",A);export{A as DatePicker};
@@ -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 S,c as F}from"./KIGAOJGV.js";import{b as f,f as z,g as N,k as w,l as U}from"./I2EB746H.js";import{a as C}from"./6J3DGER2.js";import{b as P}from"./L6HFE67F.js";import{c as $}from"./UXWFYSWM.js";import{o as y,q as O}from"./ALOAVLGK.js";var B=5;function x({locale:r,numberingSystem:e,includeSeconds:t=!0,fractionalSecondDigits:i,hour12:n}){let o={hour:"2-digit",minute:"2-digit",timeZone:"UTC",numberingSystem:N(e)};return typeof n=="boolean"&&(o.hour12=n),t&&(o.second="2-digit",i&&(o.fractionalSecondDigits=i)),U(r,o)}function W(r,e){return parseFloat(`0.${r}`).toFixed(S(e)).replace("0.","")}function g(r,e){if(r==null)return;let t=r.toString(),i=S(r);if(r<1&&i>0&&i<4){let n=t.replace("0.","");return!e||n.length===e?n:n.length<e?n.padEnd(e,"0"):n}if(r>=0&&r<10)return t.padStart(2,"0");if(r>=10)return t}function J(r){return parseInt((parseFloat(`0.${r}`)/.001).toFixed(3))}function Q(r){let e={locale:r};return r==="mk"?e.hour12=!1:r.toLowerCase()==="es-mx"&&(e.hour12=!0),x(e).formatToParts(new Date(Date.UTC(0,0,0,0,0,0))).find(({type:n})=>n==="dayPeriod")?.value?"12":"24"}function K({locale:r,meridiem:e,parts:t}){let i=["he","bs","mk"],n;if(t){if(n=t.find(({type:o})=>o==="dayPeriod")?.value||null,r&&i.includes(r)){let o=z.get(r);n==="PM"&&(n=o.pm),n==="AM"&&(n=o.am)}}else if(e)if(i.includes(r)){let o=z.get(r);n=e==="PM"?o.pm:o.am}else{let o=x({locale:r,hour12:!0}),s=6,a=18,l=new Date(Date.UTC(0,0,0,e==="AM"?s:a,0));n=o.formatToParts(l).find(({type:d})=>d==="dayPeriod")?.value||null}return n}function k(r,e){return w.numberFormatOptions={locale:r,numberingSystem:e},w.localize("1.1").split("")[1]}function I(r,e,t="latn"){let n=x({locale:e,numberingSystem:t}).formatToParts(new Date(Date.UTC(0,0,0,0,0,0)));return h(`${r}Suffix`,n)}function h(r,e,t="en"){if(!r||!e)return null;if(r==="hourSuffix"){let i=e.indexOf(e.find(({type:s})=>s==="hour")),n=e.indexOf(e.find(({type:s})=>s==="minute")),o=e[i+1];return o&&o.type==="literal"&&n-i===2&&o.value?.trim()||null}if(r==="minuteSuffix"){let i=e.indexOf(e.find(({type:s})=>s==="minute")),n=e.indexOf(e.find(({type:s})=>s==="second")),o=e[i+1];return o&&o.type==="literal"&&n-i===2&&o.value?.trim()||null}if(r==="secondSuffix"){let i,n=e.indexOf(e.find(({type:o})=>o==="fractionalSecond"));if(n)i=e[n+1];else{let o=e.indexOf(e.find(({type:s})=>s==="second"));i=e[o+1]}return i?.type==="literal"&&i.value?.trim()||null}return r==="meridiem"&&(e.find(({type:n})=>n==="dayPeriod")?.value||null)?K({locale:t,parts:e}):e.find(({type:i})=>i===r)?.value||null}function E(r){if(!f(r))return null;let e=parseInt(r);return e>=0&&e<=11?"AM":"PM"}function X(r){return new Intl.DateTimeFormat(r,{hour:"2-digit",hour12:!0,minute:"2-digit",timeZone:"UTC"}).formatToParts(new Date(Date.UTC(0,0,0,0,0))).findIndex(i=>i.type==="dayPeriod")}function V(r){let e=typeof r=="string";if(!r||e&&(r.startsWith(":")||r.endsWith(":"))||!e&&(!r.hour||!r.minute))return!1;let t,i,n;if(e?[t,i,n]=r.split(":"):{hour:t,minute:i,second:n}=r,!t||!i)return!1;let o=parseInt(t),s=parseInt(i),a=parseInt(n),l=f(t)&&o>=0&&o<24,u=f(i)&&s>=0&&s<60,d=f(n)&&a>=0&&a<60;return!!(l&&u&&!n||l&&u&&d)}function Y(r,e){if(e==="meridiem")return r==="AM"||r==="PM";if(!f(r))return!1;let t=Number(r),i=t>=0,n=t<24,o=t<60,s=t<=999;return e==="hour"?i&&n:e==="fractionalSecond"?i&&s:i&&o}function A({value:r,part:e,locale:t,numberingSystem:i="latn",hour12:n}){if(!Y(r,e))return;if(e==="fractionalSecond"){let u=k(t,i),d=null;if(r){w.numberFormatOptions={locale:t,numberingSystem:i};let m=w.localize("0");parseInt(r)===0?d="".padStart(r.length,m):(d=w.localize(`0.${r}`).replace(`${m}${u}`,""),d.length<r.length&&(d=d.padEnd(r.length,m)))}return d}let o=parseInt(r),s=new Date(Date.UTC(0,0,0,e==="hour"?o:e==="meridiem"?r==="AM"?0:12:0,e==="minute"?o:0,e==="second"?o:0));if(!s)return;let l=x({hour12:n,locale:t,numberingSystem:i}).formatToParts(s);return h(e,l,t)}function v({hour12:r,includeSeconds:e=!0,locale:t,numberingSystem:i="latn",parts:n=!1,step:o,value:s}){if(!V(s))return null;let{hour:a,minute:l,second:u="0",fractionalSecond:d}=_(s,o),m=new Date(Date.UTC(0,0,0,parseInt(a),parseInt(l),parseInt(u),d&&J(d))),b=x({fractionalSecondDigits:S(o),hour12:r,includeSeconds:e,locale:t,numberingSystem:i});if(n){let c=b.formatToParts(m);return{hour:h("hour",c),hourSuffix:h("hourSuffix",c),minute:h("minute",c),minuteSuffix:h("minuteSuffix",c),second:h("second",c),decimalSeparator:k(t,i),fractionalSecond:h("fractionalSecond",c),secondSuffix:t!=="bg"&&h("secondSuffix",c),meridiem:h("meridiem",c,t)}}else{let c=b.format(m)||null;if(!n&&typeof c=="string"&&t==="bg"&&c&&c.includes(" \u0447.")&&(c=c.replaceAll(" \u0447.","")),["he","bs","mk"].includes(t)){let M=z.get(t);c.includes("AM")?c=c.replaceAll("AM",M.am):c.includes("PM")&&(c=c.replaceAll("PM",M.pm)),t!=="he"&&c.indexOf(".")!==c.length-1&&(c=c.replace(".",","))}return c}}function _(r,e){if(V(r)){let[t,i,n]=r.split(":"),o=n,s=null;return n?.includes(".")&&([o,s]=n.split(".")),e&&(s=W(s,e)),{fractionalSecond:s,hour:t,minute:i,second:o}}return{fractionalSecond:null,hour:null,minute:null,second:null}}function L(r,e=60){if(!V(r))return null;let t,i,n,o,s,a=null;return typeof r=="string"?([t,i,o]=r.split(":"),[n,s]=o?.split(".")||["0"]):(t=r.hour,i=r.minute,n=r.second,s=r.fractionalSecond),t&&i&&(a=`${g(parseInt(t))}:${g(parseInt(i))}`,e<60&&(a+=`:${g(parseInt(n||"0"))}`,e<1&&(a+=`.${W(s||"0",e)}`))),a}var T=class extends O{constructor(){super(...arguments),this.localizedDecimalSeparator=".",this.userChangedValue=!1,this.handleHourKeyDownEvent=e=>{let t=e.key;if(P.includes(t)){let i=parseInt(t),n;if(f(this.hour))switch(this.hourFormat){case"12":n=this.hour==="01"&&i>=0&&i<=2?`1${i}`:i;break;case"24":this.hour==="01"?n=`1${i}`:this.hour==="02"&&i>=0&&i<=3?n=`2${i}`:n=i;break}else n=i;this.setValuePart("hour",n)}else switch(t){case"Backspace":case"Delete":e.preventDefault(),this.setValuePart("hour",null);break;case"ArrowDown":e.preventDefault(),this.decrementHour();break;case"ArrowUp":e.preventDefault(),this.incrementHour();break;case" ":case"Spacebar":e.preventDefault();break}},this.handleMinuteKeyDownEvent=e=>{let t=e.key;if(P.includes(t)){let i=parseInt(t),n;if(f(this.minute)&&this.minute.startsWith("0")){let o=parseInt(this.minute);n=o>B?i:`${o}${i}`}else n=i;this.setValuePart("minute",n)}else switch(t){case"Backspace":case"Delete":e.preventDefault(),this.setValuePart("minute",null);break;case"ArrowDown":e.preventDefault(),this.decrementMinute();break;case"ArrowUp":e.preventDefault(),this.incrementMinute();break;case" ":case"Spacebar":e.preventDefault();break}},this.handleSecondKeyDownEvent=e=>{let t=e.key;if(P.includes(t)){let i=parseInt(t),n;if(f(this.second)&&this.second.startsWith("0")){let o=parseInt(this.second);n=o>B?i:`${o}${i}`}else n=i;this.setValuePart("second",n)}else switch(t){case"Backspace":case"Delete":e.preventDefault(),this.setValuePart("second",null);break;case"ArrowDown":e.preventDefault(),this.decrementSecond();break;case"ArrowUp":e.preventDefault(),this.incrementSecond();break;case" ":case"Spacebar":e.preventDefault();break}},this.handleFractionalSecondKeyDownEvent=e=>{let{key:t}=e;if(P.includes(t)){let i=S(this.component.step),n=parseInt(this.fractionalSecond),o=n.toString().length,s;o>=i?s=t.padStart(i,"0"):o<i&&(s=`${n}${t}`.padStart(i,"0")),this.setValuePart("fractionalSecond",parseFloat(`0.${s}`))}else switch(t){case"Backspace":case"Delete":e.preventDefault(),this.setValuePart("fractionalSecond",null);break;case"ArrowDown":e.preventDefault(),this.nudgeFractionalSecond("down");break;case"ArrowUp":e.preventDefault(),this.nudgeFractionalSecond("up");break;case" ":e.preventDefault();break}},this.handleMeridiemKeyDownEvent=e=>{switch(e.key){case"a":this.setValuePart("meridiem","AM");break;case"p":this.setValuePart("meridiem","PM");break;case"Backspace":case"Delete":e.preventDefault(),this.setValuePart("meridiem");break;case"ArrowUp":e.preventDefault(),this.toggleMeridiem("up");break;case"ArrowDown":e.preventDefault(),this.toggleMeridiem("down");break;case" ":case"Spacebar":e.preventDefault();break}},this.calciteTimeChange=y()}decrementHour(){let e=this.hour?this.hour==="00"?23:parseInt(this.hour)-1:0;this.setValuePart("hour",e)}decrementMinute(){this.decrementMinuteOrSecond("minute")}decrementSecond(){this.decrementMinuteOrSecond("second")}incrementHour(){let e=f(this.hour)?this.hour==="23"?0:parseInt(this.hour)+1:1;this.setValuePart("hour",e)}incrementMinute(){this.incrementMinuteOrSecond("minute")}incrementSecond(){this.incrementMinuteOrSecond("second")}nudgeFractionalSecond(e){let t=F(this.component.step),i=S(this.component.step),n=parseInt(this.fractionalSecond),o=parseFloat(`0.${this.fractionalSecond}`),s,a,l,u;e==="up"&&(s=isNaN(n)?0:o+t,a=parseFloat(s.toFixed(i)),l=F(a),u=a<1&&S(l)>0?g(l,i):"".padStart(i,"0")),e==="down"&&(s=isNaN(n)||n===0?1-t:o-t,a=parseFloat(s.toFixed(i)),l=F(a),u=a<1&&S(l)>0&&Math.sign(l)===1?g(l,i):"".padStart(i,"0")),this.setValuePart("fractionalSecond",u)}toggleMeridiem(e){let t;this.meridiem?t=this.meridiem==="AM"?"PM":"AM":t=e==="down"?"PM":"AM",this.setValuePart("meridiem",t)}hostConnected(){this.setHourFormat(),this.setMeridiemOrder(),this.setValue(this.component.value)}hostUpdate(e){let t=!1,i=!1,n=!1;if(e.has("hourFormat")&&(t=!0,n=!0),e.has("messages")&&e.get("messages")?._lang!==this.component.messages._lang&&(t=!0,i=!0,n=!0),e.has("numberingSystem")&&(n=!0),e.has("step")){let o=this.component.step,s=e.get("step");(o>=60&&s>0&&s<60||s>=60&&o>0&&o<60)&&(n=!0)}t&&this.setHourFormat(),i&&this.setMeridiemOrder(),n&&this.setValue(this.component.value),this.userChangedValue=!1}decrementMinuteOrSecond(e){let t;if(f(this[e])){let i=parseInt(this[e]);t=i===0?59:i-1}else t=59;this.setValuePart(e,t)}incrementMinuteOrSecond(e){let t=f(this[e])?this[e]==="59"?0:parseInt(this[e])+1:0;this.setValuePart(e,t)}setHourFormat(){let{hourFormat:e,messages:t}=this.component,i=t._lang;this.hourFormat=e==="user"?Q(i):e}setMeridiemOrder(){let{messages:e}=this.component,t=e._lang;this.meridiemOrder=X(t)}setValue(e,t=!1){let{messages:i,numberingSystem:n,step:o,value:s}=this.component,a=i._lang,l=this.hourFormat==="12",u=L(e,o);if(V(e)){let{hour:d,minute:m,second:b,fractionalSecond:c}=_(u,o),{hour:M,hourSuffix:D,minute:p,minuteSuffix:q,second:Z,secondSuffix:G,decimalSeparator:R,fractionalSecond:j,meridiem:H}=v({hour12:l,locale:a,numberingSystem:n,parts:!0,step:o,value:u});this.hour=d,this.minute=m,this.second=b,this.fractionalSecond=c,this.localizedHour=M,this.localizedHourSuffix=D,this.localizedMinute=p,this.localizedMinuteSuffix=q,this.localizedSecond=Z,this.localizedDecimalSeparator=R,this.localizedFractionalSecond=j,this.localizedSecondSuffix=G,H&&(this.meridiem=E(this.hour),this.localizedMeridiem=H)}else this.hour=null,this.minute=null,this.second=null,this.fractionalSecond=null,this.meridiem=null,this.localizedHour=null,this.localizedHourSuffix=I("hour",a,n),this.localizedMinute=null,this.localizedMinuteSuffix=I("minute",a,n),this.localizedSecond=null,this.localizedDecimalSeparator=k(a,n),this.localizedFractionalSecond=null,this.localizedSecondSuffix=I("second",a,n),this.localizedMeridiem=null;u!==s?(this.userChangedValue=t,this.component.value=u??""):this.component.requestUpdate()}setValuePart(e,t){let{hourFormat:i}=this,{messages:n,numberingSystem:o,step:s}=this.component,a=n._lang,l=i==="12",u=this.component.value;if(e==="meridiem"){let D=this.meridiem;if(this.meridiem=t,this.localizedMeridiem=A({hour12:l,locale:a,numberingSystem:o,part:"meridiem",value:this.meridiem}),f(this.hour)){let p=parseInt(this.hour);switch(t){case"AM":p>=12&&(this.hour=g(p-12));break;case"PM":p<12&&(this.hour=g(p+12));break;default:this.component.value="";break}this.localizedHour=A({hour12:l,locale:a,numberingSystem:o,part:"hour",value:this.hour})}D!==this.meridiem&&this.component.requestUpdate()}else if(e==="fractionalSecond"){let D=this.fractionalSecond,p=S(s);typeof t=="number"?this.fractionalSecond=t===0?"".padStart(p,"0"):g(t,p):this.fractionalSecond=t,this.localizedFractionalSecond=A({value:this.fractionalSecond,part:"fractionalSecond",locale:a,numberingSystem:o,hour12:l}),D!==this.fractionalSecond&&this.component.requestUpdate()}else{let D=this[e];this[e]=typeof t=="number"?g(t):t,this[`localized${C(e)}`]=A({value:this[e],part:e,locale:a,numberingSystem:o,hour12:l}),D!==this[e]&&this.component.requestUpdate()}let{hour:d,minute:m,second:b,fractionalSecond:c}=this,M=L({hour:d,minute:m,second:b,fractionalSecond:c},s);u!==M&&(e==="hour"&&i==="12"&&(this.meridiem=E(d),this.localizedMeridiem=K({locale:a,meridiem:this.meridiem})),this.userChangedValue=!0,this.calciteTimeChange.emit(M??""))}},se=$(T);export{se as a};
3
+ v5.0.0-next.5 */
4
+ import{b as S,c as F}from"./2VKJIYLT.js";import{b as f,f as z,g as N,k as w,l as U}from"./CVLFEMH2.js";import{a as C}from"./UOZDXXIF.js";import{b as P}from"./S5CLKCGJ.js";import{c as $}from"./B5JXPZDV.js";import{o as y,q as O}from"./AUIOWPFN.js";var B=5;function x({locale:r,numberingSystem:e,includeSeconds:t=!0,fractionalSecondDigits:i,hour12:n}){let o={hour:"2-digit",minute:"2-digit",timeZone:"UTC",numberingSystem:N(e)};return typeof n=="boolean"&&(o.hour12=n),t&&(o.second="2-digit",i&&(o.fractionalSecondDigits=i)),U(r,o)}function W(r,e){return parseFloat(`0.${r}`).toFixed(S(e)).replace("0.","")}function g(r,e){if(r==null)return;let t=r.toString(),i=S(r);if(r<1&&i>0&&i<4){let n=t.replace("0.","");return!e||n.length===e?n:n.length<e?n.padEnd(e,"0"):n}if(r>=0&&r<10)return t.padStart(2,"0");if(r>=10)return t}function J(r){return parseInt((parseFloat(`0.${r}`)/.001).toFixed(3))}function Q(r){let e={locale:r};return r==="mk"?e.hour12=!1:r.toLowerCase()==="es-mx"&&(e.hour12=!0),x(e).formatToParts(new Date(Date.UTC(0,0,0,0,0,0))).find(({type:n})=>n==="dayPeriod")?.value?"12":"24"}function K({locale:r,meridiem:e,parts:t}){let i=["he","bs","mk"],n;if(t){if(n=t.find(({type:o})=>o==="dayPeriod")?.value||null,r&&i.includes(r)){let o=z.get(r);n==="PM"&&(n=o.pm),n==="AM"&&(n=o.am)}}else if(e)if(i.includes(r)){let o=z.get(r);n=e==="PM"?o.pm:o.am}else{let o=x({locale:r,hour12:!0}),s=6,a=18,l=new Date(Date.UTC(0,0,0,e==="AM"?s:a,0));n=o.formatToParts(l).find(({type:d})=>d==="dayPeriod")?.value||null}return n}function k(r,e){return w.numberFormatOptions={locale:r,numberingSystem:e},w.localize("1.1").split("")[1]}function I(r,e,t="latn"){let n=x({locale:e,numberingSystem:t}).formatToParts(new Date(Date.UTC(0,0,0,0,0,0)));return h(`${r}Suffix`,n)}function h(r,e,t="en"){if(!r||!e)return null;if(r==="hourSuffix"){let i=e.indexOf(e.find(({type:s})=>s==="hour")),n=e.indexOf(e.find(({type:s})=>s==="minute")),o=e[i+1];return o&&o.type==="literal"&&n-i===2&&o.value?.trim()||null}if(r==="minuteSuffix"){let i=e.indexOf(e.find(({type:s})=>s==="minute")),n=e.indexOf(e.find(({type:s})=>s==="second")),o=e[i+1];return o&&o.type==="literal"&&n-i===2&&o.value?.trim()||null}if(r==="secondSuffix"){let i,n=e.indexOf(e.find(({type:o})=>o==="fractionalSecond"));if(n)i=e[n+1];else{let o=e.indexOf(e.find(({type:s})=>s==="second"));i=e[o+1]}return i?.type==="literal"&&i.value?.trim()||null}return r==="meridiem"&&(e.find(({type:n})=>n==="dayPeriod")?.value||null)?K({locale:t,parts:e}):e.find(({type:i})=>i===r)?.value||null}function E(r){if(!f(r))return null;let e=parseInt(r);return e>=0&&e<=11?"AM":"PM"}function X(r){return new Intl.DateTimeFormat(r,{hour:"2-digit",hour12:!0,minute:"2-digit",timeZone:"UTC"}).formatToParts(new Date(Date.UTC(0,0,0,0,0))).findIndex(i=>i.type==="dayPeriod")}function V(r){let e=typeof r=="string";if(!r||e&&(r.startsWith(":")||r.endsWith(":"))||!e&&(!r.hour||!r.minute))return!1;let t,i,n;if(e?[t,i,n]=r.split(":"):{hour:t,minute:i,second:n}=r,!t||!i)return!1;let o=parseInt(t),s=parseInt(i),a=parseInt(n),l=f(t)&&o>=0&&o<24,u=f(i)&&s>=0&&s<60,d=f(n)&&a>=0&&a<60;return!!(l&&u&&!n||l&&u&&d)}function Y(r,e){if(e==="meridiem")return r==="AM"||r==="PM";if(!f(r))return!1;let t=Number(r),i=t>=0,n=t<24,o=t<60,s=t<=999;return e==="hour"?i&&n:e==="fractionalSecond"?i&&s:i&&o}function A({value:r,part:e,locale:t,numberingSystem:i="latn",hour12:n}){if(!Y(r,e))return;if(e==="fractionalSecond"){let u=k(t,i),d=null;if(r){w.numberFormatOptions={locale:t,numberingSystem:i};let m=w.localize("0");parseInt(r)===0?d="".padStart(r.length,m):(d=w.localize(`0.${r}`).replace(`${m}${u}`,""),d.length<r.length&&(d=d.padEnd(r.length,m)))}return d}let o=parseInt(r),s=new Date(Date.UTC(0,0,0,e==="hour"?o:e==="meridiem"?r==="AM"?0:12:0,e==="minute"?o:0,e==="second"?o:0));if(!s)return;let l=x({hour12:n,locale:t,numberingSystem:i}).formatToParts(s);return h(e,l,t)}function v({hour12:r,includeSeconds:e=!0,locale:t,numberingSystem:i="latn",parts:n=!1,step:o,value:s}){if(!V(s))return null;let{hour:a,minute:l,second:u="0",fractionalSecond:d}=_(s,o),m=new Date(Date.UTC(0,0,0,parseInt(a),parseInt(l),parseInt(u),d&&J(d))),b=x({fractionalSecondDigits:S(o),hour12:r,includeSeconds:e,locale:t,numberingSystem:i});if(n){let c=b.formatToParts(m);return{hour:h("hour",c),hourSuffix:h("hourSuffix",c),minute:h("minute",c),minuteSuffix:h("minuteSuffix",c),second:h("second",c),decimalSeparator:k(t,i),fractionalSecond:h("fractionalSecond",c),secondSuffix:t!=="bg"&&h("secondSuffix",c),meridiem:h("meridiem",c,t)}}else{let c=b.format(m)||null;if(!n&&typeof c=="string"&&t==="bg"&&c&&c.includes(" \u0447.")&&(c=c.replaceAll(" \u0447.","")),["he","bs","mk"].includes(t)){let M=z.get(t);c.includes("AM")?c=c.replaceAll("AM",M.am):c.includes("PM")&&(c=c.replaceAll("PM",M.pm)),t!=="he"&&c.indexOf(".")!==c.length-1&&(c=c.replace(".",","))}return c}}function _(r,e){if(V(r)){let[t,i,n]=r.split(":"),o=n,s=null;return n?.includes(".")&&([o,s]=n.split(".")),e&&(s=W(s,e)),{fractionalSecond:s,hour:t,minute:i,second:o}}return{fractionalSecond:null,hour:null,minute:null,second:null}}function L(r,e=60){if(!V(r))return null;let t,i,n,o,s,a=null;return typeof r=="string"?([t,i,o]=r.split(":"),[n,s]=o?.split(".")||["0"]):(t=r.hour,i=r.minute,n=r.second,s=r.fractionalSecond),t&&i&&(a=`${g(parseInt(t))}:${g(parseInt(i))}`,e<60&&(a+=`:${g(parseInt(n||"0"))}`,e<1&&(a+=`.${W(s||"0",e)}`))),a}var T=class extends O{constructor(){super(...arguments),this.localizedDecimalSeparator=".",this.userChangedValue=!1,this.handleHourKeyDownEvent=e=>{let t=e.key;if(P.includes(t)){let i=parseInt(t),n;if(f(this.hour))switch(this.hourFormat){case"12":n=this.hour==="01"&&i>=0&&i<=2?`1${i}`:i;break;case"24":this.hour==="01"?n=`1${i}`:this.hour==="02"&&i>=0&&i<=3?n=`2${i}`:n=i;break}else n=i;this.setValuePart("hour",n)}else switch(t){case"Backspace":case"Delete":e.preventDefault(),this.setValuePart("hour",null);break;case"ArrowDown":e.preventDefault(),this.decrementHour();break;case"ArrowUp":e.preventDefault(),this.incrementHour();break;case" ":case"Spacebar":e.preventDefault();break}},this.handleMinuteKeyDownEvent=e=>{let t=e.key;if(P.includes(t)){let i=parseInt(t),n;if(f(this.minute)&&this.minute.startsWith("0")){let o=parseInt(this.minute);n=o>B?i:`${o}${i}`}else n=i;this.setValuePart("minute",n)}else switch(t){case"Backspace":case"Delete":e.preventDefault(),this.setValuePart("minute",null);break;case"ArrowDown":e.preventDefault(),this.decrementMinute();break;case"ArrowUp":e.preventDefault(),this.incrementMinute();break;case" ":case"Spacebar":e.preventDefault();break}},this.handleSecondKeyDownEvent=e=>{let t=e.key;if(P.includes(t)){let i=parseInt(t),n;if(f(this.second)&&this.second.startsWith("0")){let o=parseInt(this.second);n=o>B?i:`${o}${i}`}else n=i;this.setValuePart("second",n)}else switch(t){case"Backspace":case"Delete":e.preventDefault(),this.setValuePart("second",null);break;case"ArrowDown":e.preventDefault(),this.decrementSecond();break;case"ArrowUp":e.preventDefault(),this.incrementSecond();break;case" ":case"Spacebar":e.preventDefault();break}},this.handleFractionalSecondKeyDownEvent=e=>{let{key:t}=e;if(P.includes(t)){let i=S(this.component.step),n=parseInt(this.fractionalSecond),o=n.toString().length,s;o>=i?s=t.padStart(i,"0"):o<i&&(s=`${n}${t}`.padStart(i,"0")),this.setValuePart("fractionalSecond",parseFloat(`0.${s}`))}else switch(t){case"Backspace":case"Delete":e.preventDefault(),this.setValuePart("fractionalSecond",null);break;case"ArrowDown":e.preventDefault(),this.nudgeFractionalSecond("down");break;case"ArrowUp":e.preventDefault(),this.nudgeFractionalSecond("up");break;case" ":e.preventDefault();break}},this.handleMeridiemKeyDownEvent=e=>{switch(e.key){case"a":this.setValuePart("meridiem","AM");break;case"p":this.setValuePart("meridiem","PM");break;case"Backspace":case"Delete":e.preventDefault(),this.setValuePart("meridiem");break;case"ArrowUp":e.preventDefault(),this.toggleMeridiem("up");break;case"ArrowDown":e.preventDefault(),this.toggleMeridiem("down");break;case" ":case"Spacebar":e.preventDefault();break}},this.calciteTimeChange=y()}decrementHour(){let e=this.hour?this.hour==="00"?23:parseInt(this.hour)-1:0;this.setValuePart("hour",e)}decrementMinute(){this.decrementMinuteOrSecond("minute")}decrementSecond(){this.decrementMinuteOrSecond("second")}incrementHour(){let e=f(this.hour)?this.hour==="23"?0:parseInt(this.hour)+1:1;this.setValuePart("hour",e)}incrementMinute(){this.incrementMinuteOrSecond("minute")}incrementSecond(){this.incrementMinuteOrSecond("second")}nudgeFractionalSecond(e){let t=F(this.component.step),i=S(this.component.step),n=parseInt(this.fractionalSecond),o=parseFloat(`0.${this.fractionalSecond}`),s,a,l,u;e==="up"&&(s=isNaN(n)?0:o+t,a=parseFloat(s.toFixed(i)),l=F(a),u=a<1&&S(l)>0?g(l,i):"".padStart(i,"0")),e==="down"&&(s=isNaN(n)||n===0?1-t:o-t,a=parseFloat(s.toFixed(i)),l=F(a),u=a<1&&S(l)>0&&Math.sign(l)===1?g(l,i):"".padStart(i,"0")),this.setValuePart("fractionalSecond",u)}toggleMeridiem(e){let t;this.meridiem?t=this.meridiem==="AM"?"PM":"AM":t=e==="down"?"PM":"AM",this.setValuePart("meridiem",t)}hostConnected(){this.setHourFormat(),this.setMeridiemOrder(),this.setValue(this.component.value)}hostUpdate(e){let t=!1,i=!1,n=!1;if(e.has("hourFormat")&&(t=!0,n=!0),e.has("messages")&&e.get("messages")?._lang!==this.component.messages._lang&&(t=!0,i=!0,n=!0),e.has("numberingSystem")&&(n=!0),e.has("step")){let o=this.component.step,s=e.get("step");(o>=60&&s>0&&s<60||s>=60&&o>0&&o<60)&&(n=!0)}t&&this.setHourFormat(),i&&this.setMeridiemOrder(),n&&this.setValue(this.component.value),this.userChangedValue=!1}decrementMinuteOrSecond(e){let t;if(f(this[e])){let i=parseInt(this[e]);t=i===0?59:i-1}else t=59;this.setValuePart(e,t)}incrementMinuteOrSecond(e){let t=f(this[e])?this[e]==="59"?0:parseInt(this[e])+1:0;this.setValuePart(e,t)}setHourFormat(){let{hourFormat:e,messages:t}=this.component,i=t._lang;this.hourFormat=e==="user"?Q(i):e}setMeridiemOrder(){let{messages:e}=this.component,t=e._lang;this.meridiemOrder=X(t)}setValue(e,t=!1){let{messages:i,numberingSystem:n,step:o,value:s}=this.component,a=i._lang,l=this.hourFormat==="12",u=L(e,o);if(V(e)){let{hour:d,minute:m,second:b,fractionalSecond:c}=_(u,o),{hour:M,hourSuffix:D,minute:p,minuteSuffix:q,second:Z,secondSuffix:G,decimalSeparator:R,fractionalSecond:j,meridiem:H}=v({hour12:l,locale:a,numberingSystem:n,parts:!0,step:o,value:u});this.hour=d,this.minute=m,this.second=b,this.fractionalSecond=c,this.localizedHour=M,this.localizedHourSuffix=D,this.localizedMinute=p,this.localizedMinuteSuffix=q,this.localizedSecond=Z,this.localizedDecimalSeparator=R,this.localizedFractionalSecond=j,this.localizedSecondSuffix=G,H&&(this.meridiem=E(this.hour),this.localizedMeridiem=H)}else this.hour=null,this.minute=null,this.second=null,this.fractionalSecond=null,this.meridiem=null,this.localizedHour=null,this.localizedHourSuffix=I("hour",a,n),this.localizedMinute=null,this.localizedMinuteSuffix=I("minute",a,n),this.localizedSecond=null,this.localizedDecimalSeparator=k(a,n),this.localizedFractionalSecond=null,this.localizedSecondSuffix=I("second",a,n),this.localizedMeridiem=null;u!==s?(this.userChangedValue=t,this.component.value=u??""):this.component.requestUpdate()}setValuePart(e,t){let{hourFormat:i}=this,{messages:n,numberingSystem:o,step:s}=this.component,a=n._lang,l=i==="12",u=this.component.value;if(e==="meridiem"){let D=this.meridiem;if(this.meridiem=t,this.localizedMeridiem=A({hour12:l,locale:a,numberingSystem:o,part:"meridiem",value:this.meridiem}),f(this.hour)){let p=parseInt(this.hour);switch(t){case"AM":p>=12&&(this.hour=g(p-12));break;case"PM":p<12&&(this.hour=g(p+12));break;default:this.component.value="";break}this.localizedHour=A({hour12:l,locale:a,numberingSystem:o,part:"hour",value:this.hour})}D!==this.meridiem&&this.component.requestUpdate()}else if(e==="fractionalSecond"){let D=this.fractionalSecond,p=S(s);typeof t=="number"?this.fractionalSecond=t===0?"".padStart(p,"0"):g(t,p):this.fractionalSecond=t,this.localizedFractionalSecond=A({value:this.fractionalSecond,part:"fractionalSecond",locale:a,numberingSystem:o,hour12:l}),D!==this.fractionalSecond&&this.component.requestUpdate()}else{let D=this[e];this[e]=typeof t=="number"?g(t):t,this[`localized${C(e)}`]=A({value:this[e],part:e,locale:a,numberingSystem:o,hour12:l}),D!==this[e]&&this.component.requestUpdate()}let{hour:d,minute:m,second:b,fractionalSecond:c}=this,M=L({hour:d,minute:m,second:b,fractionalSecond:c},s);u!==M&&(e==="hour"&&i==="12"&&(this.meridiem=E(d),this.localizedMeridiem=K({locale:a,meridiem:this.meridiem})),this.userChangedValue=!0,this.calciteTimeChange.emit(M??""))}},se=$(T);export{se as a};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v5.0.0-next.3 */
4
- import{a as T}from"./MBIDNSLG.js";import{a as E,c as I,d as B,e as q,f as R,g as p,h as U}from"./CNF3Q4TX.js";import{a as z}from"./TG4OK7FQ.js";import{a as F,b as A}from"./EU6IVBMM.js";import"./FPD3KMKK.js";import{a as H}from"./L6HFE67F.js";import{a as b,b as v}from"./RSQ6RL3K.js";import{a as $}from"./XWXCOJUO.js";import"./UXWFYSWM.js";import"./JW4SOJWB.js";import"./P2RYGBBZ.js";import{C as D,l as y,y as d}from"./SLICSH62.js";import{a as P}from"./DNM3U3Z7.js";import{C as f,D as O,E as u,P as C,g as S,h as k,l as c,o as n}from"./ALOAVLGK.js";var l=(r,e,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(r,e,t),t);function L(r){return(e,t)=>{let{slot:i,selector:s}=r??{},o="slot"+(i?`[name=${i}]`:":not([name])");return l(e,t,{get(){let a=this.renderRoot?.querySelector(o),h=a?.assignedElements(r)??[];return s===void 0?h:h.filter((w=>w.matches(s)))}})}}var j={trigger:"trigger"},x={content:"content",wrapper:"wrapper",triggerContainer:"trigger-container"},G="calcite-dropdown",m={menuButton:r=>`${G}-${r}-menubutton`,menu:r=>`${G}-${r}-menu`},K=S`: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:inline-block}.wrapper{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0}@starting-style{.wrapper{opacity:0;inset-block-start:0;left:0}}.wrapper[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.wrapper:popover-open{display:block}.wrapper .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.wrapper[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.wrapper[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.wrapper[data-placement^=left] .calcite-floating-ui-anim{left:5px}.wrapper[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.wrapper[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.wrapper[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.content{max-height:45vh;width:auto;overflow-y:auto;overflow-x:hidden;inline-size:var(--calcite-dropdown-width, var(--calcite-internal-dropdown-width));background-color:var(--calcite-dropdown-background-color, var(--calcite-color-foreground-1))}.trigger-container{position:relative;display:flex;height:100%;flex:1 1 auto;word-wrap:break-word;word-break:break-word}.width-s{--calcite-internal-dropdown-width: 12rem}.width-m{--calcite-internal-dropdown-width: 14rem}.width-l{--calcite-internal-dropdown-width: 16rem}@media(forced-colors:active){:host([open]) .wrapper{border:var(--calcite-border-width-sm) solid canvasText}}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,M=Object.defineProperty,N=(r,e,t,i)=>{for(var s=void 0,o=r.length-1,a;o>=0;o--)(a=r[o])&&(s=a(e,t,s)||s);return s&&M(e,t,s),s},g=class extends O{constructor(){super(),this.focusLastDropdownItem=!1,this.groups=[],this.guid=P(),this.items=[],this.mutationObserver=b("mutation",()=>this.updateItems()),this.transitionProp="opacity",this.resizeObserver=b("resize",e=>this.resizeObserverCallback(e)),this.focusSetter=$()(this),this.closeOnSelectDisabled=!1,this.disabled=!1,this.maxItems=0,this.offsetDistance=0,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement=E,this.scale="m",this.selectedItems=[],this.type="click",this.calciteDropdownBeforeClose=n({cancelable:!1}),this.calciteDropdownBeforeOpen=n({cancelable:!1}),this.calciteDropdownClose=n({cancelable:!1}),this.calciteDropdownOpen=n({cancelable:!1}),this.calciteDropdownSelect=n({cancelable:!1}),this.listenOn(window,"click",this.closeCalciteDropdownOnClick),this.listen("calciteInternalDropdownCloseRequest",this.closeCalciteDropdownOnEvent),this.listenOn(window,"calciteDropdownOpen",this.closeCalciteDropdownOnOpenEvent),this.listen("pointerenter",this.pointerEnterHandler),this.listen("pointerleave",this.pointerLeaveHandler),this.listen("calciteInternalDropdownItemKeyEvent",this.calciteInternalDropdownItemKeyEvent),this.listen("calciteInternalDropdownItemSelect",this.handleItemSelect)}static{this.properties={closeOnSelectDisabled:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],flipPlacements:[0,{},{attribute:!1}],maxItems:[11,{},{reflect:!0,type:Number}],offsetDistance:[11,{},{type:Number,reflect:!0}],offsetSkidding:[11,{},{reflect:!0,type:Number}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selectedItems:[0,{},{attribute:!1}],type:[3,{},{reflect:!0}],widthScale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=K}async reposition(e=!1){let{filteredFlipPlacements:t,floatingEl:i,offsetDistance:s,offsetSkidding:o,overlayPositioning:a,placement:h,referenceEl:w}=this;return q(this,{floatingEl:i,referenceEl:w,offsetDistance:s,offsetSkidding:o,overlayPositioning:a,placement:h,flipPlacements:t,type:"menu"},e)}async setFocus(e){return this.focusSetter(()=>this.referenceEl,e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),this.updateItems(),p(this)}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),e.has("flipPlacements")&&this.flipPlacementsHandler(),e.has("maxItems")&&this.hasUpdated&&this.setMaxScrollerHeight(),this.hasUpdated&&(e.has("offsetDistance")&&this.offsetDistance!==0||e.has("offsetSkidding")&&this.offsetSkidding!==0||e.has("overlayPositioning")&&this.overlayPositioning!=="absolute"||e.has("placement")&&this.placement!==E)&&this.reposition(!0),e.has("scale")&&(this.hasUpdated||this.scale!=="m")&&this.handlePropsChange()}updated(){F(this)}loaded(){this.updateSelectedItems(),p(this)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),U(this)}async handlePopover(){await this.componentOnReady(),this.floatingEl&&(this.open?this.floatingEl.showPopover():this.floatingEl.hidePopover())}openHandler(){z(this),!this.disabled&&(this.reposition(!0),this.handlePopover())}handleDisabledChange(e){e||(this.open=!1)}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}handlePropsChange(){this.updateItems(),this.updateGroupProps()}closeCalciteDropdownOnClick(e){this.disabled||!this.open||e.composedPath().includes(this.el)||this.closeCalciteDropdown(!1)}closeCalciteDropdownOnEvent(e){this.closeCalciteDropdown(),e.stopPropagation()}closeCalciteDropdownOnOpenEvent(e){e.composedPath().includes(this.el)||(this.open=!1)}pointerEnterHandler(){this.disabled||this.type!=="hover"||this.toggleDropdown()}pointerLeaveHandler(){this.disabled||this.type!=="hover"||this.closeCalciteDropdown()}getTraversableItems(){return this.items.filter(e=>!e.disabled&&!e.hidden)}calciteInternalDropdownItemKeyEvent(e){let{keyboardEvent:t}=e.detail,i=t.target,s=this.getTraversableItems();switch(t.key){case"Tab":this.open=!1,this.updateTabIndexOfItems(i);break;case"ArrowDown":d(s,i,"next");break;case"ArrowUp":d(s,i,"previous");break;case"Home":d(s,i,"first");break;case"End":d(s,i,"last");break}e.stopPropagation()}handleItemSelect(e){this.updateSelectedItems(),e.stopPropagation(),this.calciteDropdownSelect.emit(),this.closeOnSelectDisabled||this.closeCalciteDropdown()}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?B(t,e):null}updateItems(){this.items=this.groups.map(e=>Array.from(e?.querySelectorAll("calcite-dropdown-item"))).reduce((e,t)=>[...e,...t],[]),this.updateSelectedItems(),this.reposition(!0),this.items.forEach(e=>e.scale=this.scale)}updateGroups(e){let t=e.target.assignedElements({flatten:!0}).filter(i=>i?.matches("calcite-dropdown-group"));this.groups=t,this.updateItems(),this.updateGroupProps()}updateGroupProps(){this.groups.forEach((e,t)=>{e.scale=this.scale,e.position=t})}resizeObserverCallback(e){e.forEach(({target:t})=>{t===this.referenceEl?this.setDropdownWidth():t===this.scrollerEl&&this.setMaxScrollerHeight()})}setDropdownWidth(){let{referenceEl:e,scrollerEl:t}=this;!t||!e||(t.style.minWidth=`${e.clientWidth}px`)}setMaxScrollerHeight(){let{maxItems:e,items:t,scrollerEl:i}=this;if(!i)return;let s=t.length>=e&&e>0?this.getYDistanceFromScroller(t.at(e-1)):0;i.style.maxBlockSize=s>0?`${s}px`:"",this.reposition(!0)}setScrollerAndTransitionEl(e){v(this.resizeObserver,this.scrollerEl,e),this.scrollerEl=e,this.transitionEl=e}onBeforeOpen(){this.focusOnFirstActiveOrDefaultItem(),this.calciteDropdownBeforeOpen.emit()}onOpen(){this.calciteDropdownOpen.emit()}onBeforeClose(){this.calciteDropdownBeforeClose.emit()}onClose(){this.calciteDropdownClose.emit(),R(this)}setReferenceEl(e){v(this.resizeObserver,this.referenceEl,e),this.referenceEl=e,p(this)}setFloatingEl(e){this.floatingEl=e,p(this),this.handlePopover()}keyDownHandler(e){if(!e.composedPath().includes(this.referenceEl))return;let{defaultPrevented:t,key:i}=e;if(!t){if(i==="Escape"){this.closeCalciteDropdown(),e.preventDefault();return}if(this.open&&e.shiftKey&&i==="Tab"){this.closeCalciteDropdown(),e.preventDefault();return}H(i)?(this.toggleDropdown(),e.preventDefault()):(i==="ArrowDown"||i==="ArrowUp")&&(e.preventDefault(),this.focusLastDropdownItem=i==="ArrowUp",this.open=!0)}}updateSelectedItems(){this.selectedItems=this.items.filter(e=>e.selected)}getYDistanceFromScroller(e){let t=e.getBoundingClientRect();return e.offsetTop+t.height}closeCalciteDropdown(e=!0){this.open=!1,e&&y(this.triggerEls[0])}async focusOnFirstActiveOrDefaultItem(){let t=this.getTraversableItems().find(i=>i.selected)||(this.focusLastDropdownItem?this.items.at(-1):this.items[0]);this.focusLastDropdownItem=!1,t&&(await this.updateComplete,await D(),await D(),await y(t),t.scrollIntoView({block:"nearest"}))}toggleDropdown(){this.open=!this.open}updateTabIndexOfItems(e){this.items.forEach(t=>{t.tabIndex=e!==t?-1:0})}render(){let{open:e,guid:t}=this;return A({disabled:this.disabled,children:k`<div class=${u(x.triggerContainer)} id=${m.menuButton(t)??c} @click=${this.toggleDropdown} @keydown=${this.keyDownHandler} ${f(this.setReferenceEl)}><slot aria-controls=${m.menu(t)??c} .ariaExpanded=${e} aria-haspopup=menu name=${j.trigger}></slot></div><div .ariaHidden=${!e} class=${u({[x.wrapper]:!0,[T("width",this.width,this.widthScale)]:!!(this.width||this.widthScale)})} popover=manual ${f(this.setFloatingEl)}><div aria-labelledby=${m.menuButton(t)??c} class=${u({[x.content]:!0,[I.animation]:!0,[I.animationActive]:e})} id=${m.menu(t)??c} role=menu ${f(this.setScrollerAndTransitionEl)}><slot @slotchange=${this.updateGroups}></slot></div></div>`})}};N([L({slot:j.trigger})],g.prototype,"triggerEls");C("calcite-dropdown",g);export{g as Dropdown};
3
+ v5.0.0-next.5 */
4
+ import{a as T}from"./XRSYDXWZ.js";import{a as E,c as I,d as B,e as q,f as R,g as p,h as U}from"./5LAPR75M.js";import{a as z}from"./VQMSSO2U.js";import{a as F,b as A}from"./NSBK36H4.js";import"./W5OJOVZY.js";import{a as H}from"./S5CLKCGJ.js";import{a as b,b as v}from"./ALDDSDTX.js";import{a as $}from"./WOTQIMPZ.js";import"./B5JXPZDV.js";import"./3YZG7MA3.js";import"./CIU4VM7X.js";import{C as D,l as y,y as d}from"./5IPJANUU.js";import{a as P}from"./ZLR2B6GQ.js";import{C as f,D as O,E as u,P as C,g as S,h as k,l as c,o as n}from"./AUIOWPFN.js";var l=(r,e,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(r,e,t),t);function L(r){return(e,t)=>{let{slot:i,selector:s}=r??{},o="slot"+(i?`[name=${i}]`:":not([name])");return l(e,t,{get(){let a=this.renderRoot?.querySelector(o),h=a?.assignedElements(r)??[];return s===void 0?h:h.filter((w=>w.matches(s)))}})}}var j={trigger:"trigger"},x={content:"content",wrapper:"wrapper",triggerContainer:"trigger-container"},G="calcite-dropdown",m={menuButton:r=>`${G}-${r}-menubutton`,menu:r=>`${G}-${r}-menu`},K=S`: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:inline-block}.wrapper{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0}@starting-style{.wrapper{opacity:0;inset-block-start:0;left:0}}.wrapper[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.wrapper:popover-open{display:block}.wrapper .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.wrapper[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.wrapper[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.wrapper[data-placement^=left] .calcite-floating-ui-anim{left:5px}.wrapper[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.wrapper[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.wrapper[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.content{max-height:45vh;width:auto;overflow-y:auto;overflow-x:hidden;inline-size:var(--calcite-dropdown-width, var(--calcite-internal-dropdown-width));background-color:var(--calcite-dropdown-background-color, var(--calcite-color-foreground-1))}.trigger-container{position:relative;display:flex;height:100%;flex:1 1 auto;word-wrap:break-word;word-break:break-word}.width-s{--calcite-internal-dropdown-width: 12rem}.width-m{--calcite-internal-dropdown-width: 14rem}.width-l{--calcite-internal-dropdown-width: 16rem}@media(forced-colors:active){:host([open]) .wrapper{border:var(--calcite-border-width-sm) solid canvasText}}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,M=Object.defineProperty,N=(r,e,t,i)=>{for(var s=void 0,o=r.length-1,a;o>=0;o--)(a=r[o])&&(s=a(e,t,s)||s);return s&&M(e,t,s),s},g=class extends O{constructor(){super(),this.focusLastDropdownItem=!1,this.groups=[],this.guid=P(),this.items=[],this.mutationObserver=b("mutation",()=>this.updateItems()),this.transitionProp="opacity",this.resizeObserver=b("resize",e=>this.resizeObserverCallback(e)),this.focusSetter=$()(this),this.closeOnSelectDisabled=!1,this.disabled=!1,this.maxItems=0,this.offsetDistance=0,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement=E,this.scale="m",this.selectedItems=[],this.type="click",this.calciteDropdownBeforeClose=n({cancelable:!1}),this.calciteDropdownBeforeOpen=n({cancelable:!1}),this.calciteDropdownClose=n({cancelable:!1}),this.calciteDropdownOpen=n({cancelable:!1}),this.calciteDropdownSelect=n({cancelable:!1}),this.listenOn(window,"click",this.closeCalciteDropdownOnClick),this.listen("calciteInternalDropdownCloseRequest",this.closeCalciteDropdownOnEvent),this.listenOn(window,"calciteDropdownOpen",this.closeCalciteDropdownOnOpenEvent),this.listen("pointerenter",this.pointerEnterHandler),this.listen("pointerleave",this.pointerLeaveHandler),this.listen("calciteInternalDropdownItemKeyEvent",this.calciteInternalDropdownItemKeyEvent),this.listen("calciteInternalDropdownItemSelect",this.handleItemSelect)}static{this.properties={closeOnSelectDisabled:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],flipPlacements:[0,{},{attribute:!1}],maxItems:[11,{},{reflect:!0,type:Number}],offsetDistance:[11,{},{type:Number,reflect:!0}],offsetSkidding:[11,{},{reflect:!0,type:Number}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selectedItems:[0,{},{attribute:!1}],type:[3,{},{reflect:!0}],widthScale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=K}async reposition(e=!1){let{filteredFlipPlacements:t,floatingEl:i,offsetDistance:s,offsetSkidding:o,overlayPositioning:a,placement:h,referenceEl:w}=this;return q(this,{floatingEl:i,referenceEl:w,offsetDistance:s,offsetSkidding:o,overlayPositioning:a,placement:h,flipPlacements:t,type:"menu"},e)}async setFocus(e){return this.focusSetter(()=>this.referenceEl,e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),this.updateItems(),p(this)}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),e.has("flipPlacements")&&this.flipPlacementsHandler(),e.has("maxItems")&&this.hasUpdated&&this.setMaxScrollerHeight(),this.hasUpdated&&(e.has("offsetDistance")&&this.offsetDistance!==0||e.has("offsetSkidding")&&this.offsetSkidding!==0||e.has("overlayPositioning")&&this.overlayPositioning!=="absolute"||e.has("placement")&&this.placement!==E)&&this.reposition(!0),e.has("scale")&&(this.hasUpdated||this.scale!=="m")&&this.handlePropsChange()}updated(){F(this)}loaded(){this.updateSelectedItems(),p(this)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),U(this)}async handlePopover(){await this.componentOnReady(),this.floatingEl&&(this.open?this.floatingEl.showPopover():this.floatingEl.hidePopover())}openHandler(){z(this),!this.disabled&&(this.reposition(!0),this.handlePopover())}handleDisabledChange(e){e||(this.open=!1)}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}handlePropsChange(){this.updateItems(),this.updateGroupProps()}closeCalciteDropdownOnClick(e){this.disabled||!this.open||e.composedPath().includes(this.el)||this.closeCalciteDropdown(!1)}closeCalciteDropdownOnEvent(e){this.closeCalciteDropdown(),e.stopPropagation()}closeCalciteDropdownOnOpenEvent(e){e.composedPath().includes(this.el)||(this.open=!1)}pointerEnterHandler(){this.disabled||this.type!=="hover"||this.toggleDropdown()}pointerLeaveHandler(){this.disabled||this.type!=="hover"||this.closeCalciteDropdown()}getTraversableItems(){return this.items.filter(e=>!e.disabled&&!e.hidden)}calciteInternalDropdownItemKeyEvent(e){let{keyboardEvent:t}=e.detail,i=t.target,s=this.getTraversableItems();switch(t.key){case"Tab":this.open=!1,this.updateTabIndexOfItems(i);break;case"ArrowDown":d(s,i,"next");break;case"ArrowUp":d(s,i,"previous");break;case"Home":d(s,i,"first");break;case"End":d(s,i,"last");break}e.stopPropagation()}handleItemSelect(e){this.updateSelectedItems(),e.stopPropagation(),this.calciteDropdownSelect.emit(),this.closeOnSelectDisabled||this.closeCalciteDropdown()}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?B(t,e):null}updateItems(){this.items=this.groups.map(e=>Array.from(e?.querySelectorAll("calcite-dropdown-item"))).reduce((e,t)=>[...e,...t],[]),this.updateSelectedItems(),this.reposition(!0),this.items.forEach(e=>e.scale=this.scale)}updateGroups(e){let t=e.target.assignedElements({flatten:!0}).filter(i=>i?.matches("calcite-dropdown-group"));this.groups=t,this.updateItems(),this.updateGroupProps()}updateGroupProps(){this.groups.forEach((e,t)=>{e.scale=this.scale,e.position=t})}resizeObserverCallback(e){e.forEach(({target:t})=>{t===this.referenceEl?this.setDropdownWidth():t===this.scrollerEl&&this.setMaxScrollerHeight()})}setDropdownWidth(){let{referenceEl:e,scrollerEl:t}=this;!t||!e||(t.style.minWidth=`${e.clientWidth}px`)}setMaxScrollerHeight(){let{maxItems:e,items:t,scrollerEl:i}=this;if(!i)return;let s=t.length>=e&&e>0?this.getYDistanceFromScroller(t.at(e-1)):0;i.style.maxBlockSize=s>0?`${s}px`:"",this.reposition(!0)}setScrollerAndTransitionEl(e){v(this.resizeObserver,this.scrollerEl,e),this.scrollerEl=e,this.transitionEl=e}onBeforeOpen(){this.focusOnFirstActiveOrDefaultItem(),this.calciteDropdownBeforeOpen.emit()}onOpen(){this.calciteDropdownOpen.emit()}onBeforeClose(){this.calciteDropdownBeforeClose.emit()}onClose(){this.calciteDropdownClose.emit(),R(this)}setReferenceEl(e){v(this.resizeObserver,this.referenceEl,e),this.referenceEl=e,p(this)}setFloatingEl(e){this.floatingEl=e,p(this),this.handlePopover()}keyDownHandler(e){if(!e.composedPath().includes(this.referenceEl))return;let{defaultPrevented:t,key:i}=e;if(!t){if(i==="Escape"){this.closeCalciteDropdown(),e.preventDefault();return}if(this.open&&e.shiftKey&&i==="Tab"){this.closeCalciteDropdown(),e.preventDefault();return}H(i)?(this.toggleDropdown(),e.preventDefault()):(i==="ArrowDown"||i==="ArrowUp")&&(e.preventDefault(),this.focusLastDropdownItem=i==="ArrowUp",this.open=!0)}}updateSelectedItems(){this.selectedItems=this.items.filter(e=>e.selected)}getYDistanceFromScroller(e){let t=e.getBoundingClientRect();return e.offsetTop+t.height}closeCalciteDropdown(e=!0){this.open=!1,e&&y(this.triggerEls[0])}async focusOnFirstActiveOrDefaultItem(){let t=this.getTraversableItems().find(i=>i.selected)||(this.focusLastDropdownItem?this.items.at(-1):this.items[0]);this.focusLastDropdownItem=!1,t&&(await this.updateComplete,await D(),await D(),await y(t),t.scrollIntoView({block:"nearest"}))}toggleDropdown(){this.open=!this.open}updateTabIndexOfItems(e){this.items.forEach(t=>{t.tabIndex=e!==t?-1:0})}render(){let{open:e,guid:t}=this;return A({disabled:this.disabled,children:k`<div class=${u(x.triggerContainer)} id=${m.menuButton(t)??c} @click=${this.toggleDropdown} @keydown=${this.keyDownHandler} ${f(this.setReferenceEl)}><slot aria-controls=${m.menu(t)??c} .ariaExpanded=${e} aria-haspopup=menu name=${j.trigger}></slot></div><div .ariaHidden=${!e} class=${u({[x.wrapper]:!0,[T("width",this.width,this.widthScale)]:!!(this.width||this.widthScale)})} popover=manual ${f(this.setFloatingEl)}><div aria-labelledby=${m.menuButton(t)??c} class=${u({[x.content]:!0,[I.animation]:!0,[I.animationActive]:e})} id=${m.menu(t)??c} role=menu ${f(this.setScrollerAndTransitionEl)}><slot @slotchange=${this.updateGroups}></slot></div></div>`})}};N([L({slot:j.trigger})],g.prototype,"triggerEls");C("calcite-dropdown",g);export{g as Dropdown};
@@ -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={max:"320px"},a={max:"476px"},i={max:"768px"},t={max:"1152px"},e="8px",n="12px",s="16px",x="2px",o="0.25rem",p="0.5rem";export{c as a,a as b,i as c,t as d,e,n as f,s as g,x as h,o as i,p as j};