@esri/calcite-components 3.0.0-next.29 → 3.0.0-next.30
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.
- package/dist/calcite/{XES2BSBQ.js → 2ATCSX4P.js} +2 -2
- package/dist/calcite/{7KYNK43B.js → 2EXXFND2.js} +2 -2
- package/dist/calcite/{WFJSDKSF.js → 2MEH4JF5.js} +1 -1
- package/dist/calcite/{4KRJ3KJF.js → 2QVLJCCJ.js} +2 -2
- package/dist/calcite/{TPHZSAYC.js → 3AROYMRX.js} +2 -2
- package/dist/calcite/{CTMLLA6Z.js → 3GP4JNMC.js} +2 -2
- package/dist/calcite/{ZWDDOHBL.js → 3NELNBGH.js} +2 -2
- package/dist/calcite/{MK2FXQWO.js → 3Q6POBL5.js} +2 -2
- package/dist/calcite/{OKSJRXBT.js → 3TCKNORC.js} +2 -2
- package/dist/calcite/{LSS7F6NI.js → 3UAHHGGY.js} +2 -2
- package/dist/calcite/{LR3R45OV.js → 4EERBHPN.js} +2 -2
- package/dist/calcite/{3MGU2455.js → 4EHQLEYT.js} +2 -2
- package/dist/calcite/{U2JZXZYN.js → 4JAP2NOF.js} +2 -2
- package/dist/calcite/{JEZBVNBZ.js → 4KUOXH5G.js} +1 -1
- package/dist/calcite/{P2PFO24N.js → 4S6HLBRD.js} +2 -2
- package/dist/calcite/{OU35HYNI.js → 4XFXNSKH.js} +2 -2
- package/dist/calcite/{GSACIBBY.js → 4Y343BDY.js} +1 -1
- package/dist/calcite/{SARNR3FE.js → 4YRN562K.js} +2 -2
- package/dist/calcite/{GLMISJRW.js → 5AI7KIDV.js} +2 -2
- package/dist/calcite/{QNQ4J6UT.js → 5CFSXQ2L.js} +2 -2
- package/dist/calcite/{I6NY6T2K.js → 5IACYI6A.js} +2 -2
- package/dist/calcite/{OLNVOLUG.js → 5MHZSGFZ.js} +2 -2
- package/dist/calcite/{ZLJ3CRT6.js → 5SQPLZII.js} +2 -2
- package/dist/calcite/{R4HS7NOK.js → 63BRJDZ5.js} +2 -2
- package/dist/calcite/{BFKLMEQY.js → 67IDRTDM.js} +1 -1
- package/dist/calcite/{JIDXKIPE.js → 6Q322XH2.js} +2 -2
- package/dist/calcite/{XU4AVBGZ.js → 6USN5VQR.js} +2 -2
- package/dist/calcite/{FGNTO2B5.js → 6V74LMNI.js} +2 -2
- package/dist/calcite/{CFLWTGTQ.js → 6WTD722G.js} +2 -2
- package/dist/calcite/{CUOJSXEH.js → 6Y3QG44P.js} +2 -2
- package/dist/calcite/{KFS2NTGK.js → 73OGYT5Q.js} +2 -2
- package/dist/calcite/{TACCHS4N.js → 74BYIAQC.js} +2 -2
- package/dist/calcite/{WFXYVNIV.js → 77UC7HTW.js} +2 -2
- package/dist/calcite/{RVCNK6FG.js → 7FIVVOWD.js} +2 -2
- package/dist/calcite/{WIVTXQBW.js → 7M7EXA4Z.js} +2 -2
- package/dist/calcite/{JX56R6MW.js → 7ND6FZK2.js} +2 -2
- package/dist/calcite/{W5W6CJ55.js → 7UPJONRK.js} +2 -2
- package/dist/calcite/{PKTS7TW7.js → A2RB23DC.js} +2 -2
- package/dist/calcite/{Q3ALR3L6.js → A7ZRKRDZ.js} +2 -2
- package/dist/calcite/{NOXGPFTJ.js → AEZGW6LM.js} +2 -2
- package/dist/calcite/{FBEGEJWN.js → AFPVODDR.js} +1 -1
- package/dist/calcite/{EYYNT4E7.js → AHPFRNGN.js} +2 -2
- package/dist/calcite/{IIL6TYCF.js → AHT5NP3L.js} +2 -2
- package/dist/calcite/{N52X2IZN.js → ANXDWHCJ.js} +2 -2
- package/dist/calcite/{BVWYWB6O.js → AP5UB5XT.js} +2 -2
- package/dist/calcite/{FT7E254Q.js → ATIXO2XO.js} +2 -2
- package/dist/calcite/{N3LXAO3F.js → AU6SLID2.js} +2 -2
- package/dist/calcite/{4JW3UAH2.js → AZMUMFMH.js} +2 -2
- package/dist/calcite/{6FBEPACL.js → BAE4NVZ5.js} +2 -2
- package/dist/calcite/{P2GAK5BI.js → BAQJPIM4.js} +2 -2
- package/dist/calcite/{AQHD6H5H.js → BGBUZL5V.js} +2 -2
- package/dist/calcite/{SOFWSTRQ.js → BNSQPM5A.js} +2 -2
- package/dist/calcite/{Y42OK37D.js → C35VBHZF.js} +2 -2
- package/dist/calcite/{ISABHRKM.js → C7BQALYO.js} +1 -1
- package/dist/calcite/{BFMQXSD2.js → CAAYA4ZG.js} +2 -2
- package/dist/calcite/{XNFEYYKY.js → CGKWGNOG.js} +2 -2
- package/dist/calcite/{6FJS4P2K.js → CHAYQM5B.js} +2 -2
- package/dist/calcite/{5TL7NWNA.js → CMK4VROZ.js} +2 -2
- package/dist/calcite/{6KAPBPXJ.js → CW7XF4TH.js} +1 -1
- package/dist/calcite/{ISSF6BQ7.js → DIIVLQDG.js} +2 -2
- package/dist/calcite/{WPH2AH2M.js → DJOH6CBI.js} +2 -2
- package/dist/calcite/{F57MGMEF.js → DJVOAMEU.js} +2 -2
- package/dist/calcite/{3SEZCMQD.js → DZAV4X3C.js} +1 -1
- package/dist/calcite/{4SFGQ4EH.js → E3DEAIXK.js} +2 -2
- package/dist/calcite/{NHRG6U2S.js → E4THMDFD.js} +2 -2
- package/dist/calcite/{6BEN2VHX.js → E5CLE6HB.js} +2 -2
- package/dist/calcite/{QFYNZOCG.js → E5IF6WOR.js} +2 -2
- package/dist/calcite/{D7FEWRLE.js → E5SHGLUM.js} +2 -2
- package/dist/calcite/{OJUZTQBC.js → EELZ2HSF.js} +2 -2
- package/dist/calcite/{GRCWLF5V.js → EFIQZ2GY.js} +2 -2
- package/dist/calcite/{XFBMO5U3.js → EIC77ALO.js} +2 -2
- package/dist/calcite/{73LSLK6P.js → EN6CWRHH.js} +1 -1
- package/dist/calcite/{WNQCQTQC.js → F2EH456G.js} +2 -2
- package/dist/calcite/{EJEIIIKP.js → F2RUFKWO.js} +2 -2
- package/dist/calcite/{QS74U377.js → FCEKT3TW.js} +1 -1
- package/dist/calcite/{ZUBY7AA4.js → FCULDRFN.js} +2 -2
- package/dist/calcite/{3M2FVA4J.js → FDIYNL3G.js} +2 -2
- package/dist/calcite/{QEDGPYEG.js → FDZZRYRL.js} +2 -2
- package/dist/calcite/{2CY2SXL6.js → FHMJLOGG.js} +2 -2
- package/dist/calcite/{JQ2LFDWI.js → FMMYCS6N.js} +2 -2
- package/dist/calcite/{32SBOL6T.js → FNJAIXT3.js} +1 -1
- package/dist/calcite/{5NS37NGX.js → FPJLVXQ7.js} +2 -2
- package/dist/calcite/{N4DHJATZ.js → FSMSUOEP.js} +2 -2
- package/dist/calcite/{VMXMM2VP.js → GBT3LXUG.js} +2 -2
- package/dist/calcite/{GNJFENBG.js → GDTFAGA5.js} +2 -2
- package/dist/calcite/{SIV7JCPF.js → GEXGTFLG.js} +2 -2
- package/dist/calcite/{4OQLUDHF.js → GFFNNY3X.js} +2 -2
- package/dist/calcite/{ID647X3R.js → GIEPS7YF.js} +2 -2
- package/dist/calcite/{TER32667.js → GJQ7VM2Z.js} +1 -1
- package/dist/calcite/{4ULNVQYE.js → GMOS576G.js} +2 -2
- package/dist/calcite/{V45MKOJS.js → GQLY54UM.js} +2 -2
- package/dist/calcite/{NGO5XYE5.js → GSBCEQ55.js} +2 -2
- package/dist/calcite/{KLBYP2UE.js → GSFQUFE4.js} +1 -1
- package/dist/calcite/{6W4DZR5Y.js → GVWYMEFP.js} +2 -2
- package/dist/calcite/{GBIKIBKL.js → H2GODWUV.js} +2 -2
- package/dist/calcite/{2OF3SGOF.js → HEN472OH.js} +2 -2
- package/dist/calcite/{3XUFPL2T.js → HG6QJ2NN.js} +1 -1
- package/dist/calcite/{AHGJADVE.js → HGEDZ4CR.js} +2 -2
- package/dist/calcite/{DEU5L2DS.js → HJR7BO7P.js} +2 -2
- package/dist/calcite/{BWANPJN3.js → HM6UM2AO.js} +2 -2
- package/dist/calcite/{XDPQVKSJ.js → HTGVUUML.js} +2 -2
- package/dist/calcite/{DKAUK6SW.js → I64PFK6U.js} +1 -1
- package/dist/calcite/{3EUTQ4DG.js → I74MZ2MR.js} +2 -2
- package/dist/calcite/{QCIX3CWS.js → IHJBOZQT.js} +2 -2
- package/dist/calcite/{4OFHRDNF.js → IU7UXA62.js} +2 -2
- package/dist/calcite/{LTNOBDOU.js → IUAN4MFO.js} +2 -2
- package/dist/calcite/{WWEB3JUF.js → IYZKOQDZ.js} +2 -2
- package/dist/calcite/{TV2GAR3J.js → IZ2GQ4YY.js} +2 -2
- package/dist/calcite/{SARQE5QL.js → J4QS3J2X.js} +2 -2
- package/dist/calcite/{EFKWGXCA.js → JCRN5EO7.js} +2 -2
- package/dist/calcite/JF3U7537.js +6 -0
- package/dist/calcite/{DZ7KVDBL.js → JH5CQFO4.js} +2 -2
- package/dist/calcite/{MIN6CR7H.js → JUG243GW.js} +2 -2
- package/dist/calcite/{XXUXKLX5.js → K3Y4XTLW.js} +2 -2
- package/dist/calcite/{UHI3NS7Q.js → KHYPTS77.js} +2 -2
- package/dist/calcite/{ZRG7FOY3.js → KJBGT7DL.js} +1 -1
- package/dist/calcite/{AWZTGRPX.js → KPDJM5J6.js} +2 -2
- package/dist/calcite/{XJFECKAU.js → LTSJK5KE.js} +2 -2
- package/dist/calcite/{2JMQWZT2.js → LU5K7NN7.js} +2 -2
- package/dist/calcite/{BCGQDABZ.js → LVOCUTM2.js} +2 -2
- package/dist/calcite/{QDCN6TAA.js → LXWU4ITK.js} +2 -2
- package/dist/calcite/{CIETHR7D.js → LYS3FM3R.js} +2 -2
- package/dist/calcite/{F5Y7CMV5.js → LZ4ANRLX.js} +2 -2
- package/dist/calcite/{4UYW7OE3.js → MBSS3YYR.js} +2 -2
- package/dist/calcite/{FAYJQ3CA.js → ME476UAQ.js} +2 -2
- package/dist/calcite/{SMRTNMYF.js → MH4Q2LU5.js} +2 -2
- package/dist/calcite/{GYK3SP7N.js → MIZESBJQ.js} +2 -2
- package/dist/calcite/{EKPWSTNZ.js → MMDCALWK.js} +2 -2
- package/dist/calcite/{VAKSFJBY.js → MV2RGK44.js} +2 -2
- package/dist/calcite/{SNNOYZZS.js → MZHD4UOY.js} +2 -2
- package/dist/calcite/{WRXTSDV7.js → NBNQTNMO.js} +2 -2
- package/dist/calcite/{QMSUJJX2.js → NC43GHJV.js} +2 -2
- package/dist/calcite/{MH6M4R2Z.js → NKJ2IHQ3.js} +2 -2
- package/dist/calcite/{GXRWQ5H2.js → NNKEEDI6.js} +2 -2
- package/dist/calcite/{KMNWTZHC.js → NOMY76PJ.js} +2 -2
- package/dist/calcite/{JE7DAOSO.js → NPSYTXKG.js} +2 -2
- package/dist/calcite/{XHNJGRX5.js → NTJR7NFV.js} +1 -1
- package/dist/calcite/{WJZQ73HV.js → O4FLQQIC.js} +2 -2
- package/dist/calcite/{GOI5EDQX.js → O5PO6D6O.js} +1 -1
- package/dist/calcite/{MEYFOFI7.js → O75NUI7Z.js} +2 -2
- package/dist/calcite/{PWWBXWAU.js → ODZZX26U.js} +2 -2
- package/dist/calcite/{EHXDJHX3.js → OJXBPZS6.js} +2 -2
- package/dist/calcite/{TLT7GACK.js → OMG3TFBE.js} +1 -1
- package/dist/calcite/{2L2GRYO5.js → OO4LDR5Z.js} +2 -2
- package/dist/calcite/{JWZGL6DG.js → OOYFNAMS.js} +2 -2
- package/dist/calcite/{XKEU2LOL.js → OSZ6B6HR.js} +2 -2
- package/dist/calcite/{SVVBELHA.js → OWTKPHLB.js} +2 -2
- package/dist/calcite/{55T6OZRE.js → OXXWGOIK.js} +2 -2
- package/dist/calcite/{FB6UPGDM.js → OYXDLQAH.js} +2 -2
- package/dist/calcite/{TWGVS25T.js → PKMDEZTZ.js} +2 -2
- package/dist/calcite/{EU43L54M.js → PNREDOBM.js} +2 -2
- package/dist/calcite/{7JYIIPJE.js → PPAWJUC4.js} +2 -2
- package/dist/calcite/{3QJHPURP.js → PPQZUSCK.js} +2 -2
- package/dist/calcite/{3AALERDE.js → PXS3ZYLC.js} +1 -1
- package/dist/calcite/{Y75YB3TD.js → PXWTKREZ.js} +2 -2
- package/dist/calcite/{P7VQ2O5X.js → Q6736SMW.js} +2 -2
- package/dist/calcite/{Z2XYCFRU.js → QFOVQSZF.js} +2 -2
- package/dist/calcite/{KOBS7V26.js → QG32EK37.js} +2 -2
- package/dist/calcite/{ZLKCFJIV.js → R3QNT3BP.js} +2 -2
- package/dist/calcite/{Y54QZQUH.js → R7XHQS5V.js} +2 -2
- package/dist/calcite/{VEBT44RX.js → RFYMQLMG.js} +2 -2
- package/dist/calcite/{BOY4SZKZ.js → RIJ24KIF.js} +2 -2
- package/dist/calcite/{2XE6OXBW.js → RJHF26IM.js} +2 -2
- package/dist/calcite/{M4GZLKWH.js → RKICASLF.js} +2 -2
- package/dist/calcite/{5FBB6GF2.js → RLRWF6HB.js} +2 -2
- package/dist/calcite/{ESDALA4P.js → RMC7W2PT.js} +2 -2
- package/dist/calcite/{NEWFD36H.js → RUA7AM6F.js} +2 -2
- package/dist/calcite/{AKSU473T.js → RXEMVHWE.js} +2 -2
- package/dist/calcite/{LSRRX7ZA.js → S2WQBCKA.js} +2 -2
- package/dist/calcite/{ERCQDGGP.js → S6Z4UALO.js} +2 -2
- package/dist/calcite/{TEEIIBIV.js → SFRKWI2A.js} +2 -2
- package/dist/calcite/{FM4OGLB6.js → SGNLAIWF.js} +2 -2
- package/dist/calcite/{RV53RVPW.js → SKG5I4XZ.js} +2 -2
- package/dist/calcite/{OMNMJVFM.js → SWPZ3K6P.js} +2 -2
- package/dist/calcite/{FWJQSXZ5.js → SXR4IP4I.js} +2 -2
- package/dist/calcite/{HBOTVTKI.js → SYATRXJK.js} +2 -2
- package/dist/calcite/{L6MCECGR.js → TCYCH4IF.js} +2 -2
- package/dist/calcite/{WJVNDPFW.js → TFYBN3TF.js} +2 -2
- package/dist/calcite/{IVORLJMF.js → TJ5VSZMF.js} +2 -2
- package/dist/calcite/{XXMHTGTG.js → TJMMO2ZP.js} +2 -2
- package/dist/calcite/{C6RJICEQ.js → TSR7V57V.js} +2 -2
- package/dist/calcite/{ORHD26KT.js → TVKP4LJ6.js} +2 -2
- package/dist/calcite/{APIVWDWU.js → TXLHSTOJ.js} +2 -2
- package/dist/calcite/{LE4KOWO6.js → TZWDUBRU.js} +1 -1
- package/dist/calcite/{IOE6N7CG.js → U3GCRH7V.js} +2 -2
- package/dist/calcite/{WPJOEKH5.js → U72SEX7Z.js} +2 -2
- package/dist/calcite/{PEGFVIG2.js → UD5XHM6V.js} +2 -2
- package/dist/calcite/{6G6CPDNU.js → UPE3UND5.js} +2 -2
- package/dist/calcite/{L4U3ZVW7.js → URXP3WL5.js} +2 -2
- package/dist/calcite/{YOAJ5RIC.js → V2UGQBHN.js} +2 -2
- package/dist/calcite/{RKF3AZQ2.js → VAQ5DSWK.js} +2 -2
- package/dist/calcite/{JZ4HE4EE.js → VBE2SNOL.js} +2 -2
- package/dist/calcite/{E4XZSALC.js → VEQRBWYL.js} +2 -2
- package/dist/calcite/{AQ4YWJBN.js → VFK5RKRJ.js} +2 -2
- package/dist/calcite/{GRBFUXOI.js → VIUPLUC3.js} +2 -2
- package/dist/calcite/{XWEFOJTB.js → VSLWYTQI.js} +2 -2
- package/dist/calcite/{T4DCMK23.js → VUCIGXSW.js} +2 -2
- package/dist/calcite/{WZPXCPFT.js → VV5Q7F2Q.js} +2 -2
- package/dist/calcite/{ZXEVY6R3.js → VVHN4L5M.js} +2 -2
- package/dist/calcite/{KEJHA3SL.js → WEDCAFIJ.js} +2 -2
- package/dist/calcite/{53M5NJBO.js → WGVMTD36.js} +2 -2
- package/dist/calcite/{GQ2TWLHC.js → WKOXZ2OH.js} +1 -1
- package/dist/calcite/{NCLMA36Z.js → WLS56OKP.js} +2 -2
- package/dist/calcite/{ST2VYZJX.js → WLZ3P6Z7.js} +2 -2
- package/dist/calcite/{CGLYLBFG.js → WP2BL3UN.js} +2 -2
- package/dist/calcite/{CPL5MCP7.js → WT72CZMD.js} +2 -2
- package/dist/calcite/{P3MAEHVO.js → X7M6RUBM.js} +2 -2
- package/dist/calcite/{3EN6NT24.js → XG7NXXBT.js} +2 -2
- package/dist/calcite/{V33MXPRD.js → XJ6FBT7M.js} +2 -2
- package/dist/calcite/{XWLOXB26.js → XJKNSRIM.js} +2 -2
- package/dist/calcite/{LU4L5JUQ.js → YRGOAE3G.js} +2 -2
- package/dist/calcite/{AMHHY3SA.js → YV5I4LZU.js} +2 -2
- package/dist/calcite/{ZC7OTBQO.js → YXPEEQV6.js} +2 -2
- package/dist/calcite/{GVPRS4DV.js → Z2WNGHE2.js} +2 -2
- package/dist/calcite/{4EYADBXC.js → ZFID5A4I.js} +2 -2
- package/dist/calcite/{KY7I35KP.js → ZHAJN2SJ.js} +2 -2
- package/dist/calcite/{5H53KVVD.js → ZJODEDFO.js} +2 -2
- package/dist/calcite/calcite.esm.js +2 -2
- package/dist/chunks/ExpandToggle.js +1 -1
- package/dist/chunks/FloatingArrow.js +1 -1
- package/dist/chunks/Heading.js +1 -1
- package/dist/chunks/Validation.js +1 -1
- package/dist/chunks/_commonjsHelpers.js +1 -1
- package/dist/chunks/array.js +1 -1
- package/dist/chunks/component.js +1 -1
- package/dist/chunks/core.js +1 -1
- package/dist/chunks/date.js +1 -1
- package/dist/chunks/dom.js +1 -1
- package/dist/chunks/dynamicClasses.js +1 -1
- package/dist/chunks/filter.js +1 -1
- package/dist/chunks/floating-ui.js +1 -1
- package/dist/chunks/focusTrapComponent.js +1 -1
- package/dist/chunks/form.js +1 -1
- package/dist/chunks/global.js +1 -1
- package/dist/chunks/guid.js +1 -1
- package/dist/chunks/input.js +1 -1
- package/dist/chunks/interactive.js +1 -1
- package/dist/chunks/key.js +1 -1
- package/dist/chunks/label.js +1 -1
- package/dist/chunks/loadable.js +1 -1
- package/dist/chunks/locale.js +1 -1
- package/dist/chunks/logger.js +1 -1
- package/dist/chunks/math.js +1 -1
- package/dist/chunks/observers.js +1 -1
- package/dist/chunks/openCloseComponent.js +1 -1
- package/dist/chunks/resources.js +1 -1
- package/dist/chunks/resources2.js +1 -1
- package/dist/chunks/resources3.js +1 -1
- package/dist/chunks/resources4.js +1 -1
- package/dist/chunks/resources5.js +1 -1
- package/dist/chunks/resources6.js +1 -1
- package/dist/chunks/resources7.js +1 -1
- package/dist/chunks/responsive.js +1 -1
- package/dist/chunks/runtime.js +9 -9
- package/dist/chunks/sortableComponent.js +1 -1
- package/dist/chunks/time.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/chunks/utils.js +1 -1
- package/dist/chunks/utils2.js +1 -1
- package/dist/chunks/utils3.js +1 -1
- package/dist/chunks/utils4.js +1 -1
- package/dist/components/calcite-accordion/customElement.js +1 -1
- package/dist/components/calcite-accordion-item/customElement.js +1 -1
- package/dist/components/calcite-action/customElement.js +1 -1
- package/dist/components/calcite-action-bar/customElement.js +1 -1
- package/dist/components/calcite-action-group/customElement.js +1 -1
- package/dist/components/calcite-action-menu/customElement.js +1 -1
- package/dist/components/calcite-action-pad/customElement.js +1 -1
- package/dist/components/calcite-alert/customElement.js +1 -1
- package/dist/components/calcite-avatar/customElement.js +1 -1
- package/dist/components/calcite-block/customElement.js +1 -1
- package/dist/components/calcite-block-section/customElement.js +1 -1
- package/dist/components/calcite-button/customElement.js +1 -1
- package/dist/components/calcite-card/customElement.js +1 -1
- package/dist/components/calcite-card-group/customElement.js +1 -1
- package/dist/components/calcite-carousel/customElement.js +1 -1
- package/dist/components/calcite-carousel-item/customElement.js +1 -1
- package/dist/components/calcite-checkbox/customElement.js +1 -1
- package/dist/components/calcite-chip/customElement.js +1 -1
- package/dist/components/calcite-chip-group/customElement.js +1 -1
- package/dist/components/calcite-color-picker/customElement.js +1 -1
- package/dist/components/calcite-color-picker-hex-input/customElement.js +1 -1
- package/dist/components/calcite-color-picker-swatch/customElement.js +1 -1
- package/dist/components/calcite-combobox/customElement.js +1 -1
- package/dist/components/calcite-combobox-item/customElement.js +1 -1
- package/dist/components/calcite-combobox-item-group/customElement.js +1 -1
- package/dist/components/calcite-date-picker/customElement.js +1 -1
- package/dist/components/calcite-date-picker-day/customElement.js +1 -1
- package/dist/components/calcite-date-picker-month/customElement.js +1 -1
- package/dist/components/calcite-date-picker-month-header/customElement.js +1 -1
- package/dist/components/calcite-dialog/customElement.js +1 -1
- package/dist/components/calcite-dropdown/customElement.js +1 -1
- package/dist/components/calcite-dropdown-group/customElement.js +1 -1
- package/dist/components/calcite-dropdown-item/customElement.js +1 -1
- package/dist/components/calcite-fab/customElement.js +1 -1
- package/dist/components/calcite-filter/customElement.js +1 -1
- package/dist/components/calcite-flow/customElement.js +1 -1
- package/dist/components/calcite-flow-item/customElement.js +1 -1
- package/dist/components/calcite-graph/customElement.js +1 -1
- package/dist/components/calcite-handle/customElement.js +1 -1
- package/dist/components/calcite-icon/customElement.js +1 -1
- package/dist/components/calcite-inline-editable/customElement.js +1 -1
- package/dist/components/calcite-input/customElement.js +23 -27
- package/dist/components/calcite-input/resources.d.ts +0 -1
- package/dist/components/calcite-input-date-picker/customElement.js +1 -1
- package/dist/components/calcite-input-message/customElement.js +1 -1
- package/dist/components/calcite-input-number/customElement.js +1 -1
- package/dist/components/calcite-input-text/customElement.js +1 -1
- package/dist/components/calcite-input-time-picker/customElement.js +1 -1
- package/dist/components/calcite-input-time-zone/customElement.js +1 -1
- package/dist/components/calcite-label/customElement.js +1 -1
- package/dist/components/calcite-link/customElement.js +1 -1
- package/dist/components/calcite-list/customElement.js +1 -1
- package/dist/components/calcite-list-item/customElement.js +1 -1
- package/dist/components/calcite-list-item-group/customElement.js +1 -1
- package/dist/components/calcite-loader/customElement.js +1 -1
- package/dist/components/calcite-menu/customElement.js +1 -1
- package/dist/components/calcite-menu-item/customElement.js +1 -1
- package/dist/components/calcite-meter/customElement.js +1 -1
- package/dist/components/calcite-modal/customElement.js +1 -1
- package/dist/components/calcite-navigation/customElement.js +1 -1
- package/dist/components/calcite-navigation-logo/customElement.js +1 -1
- package/dist/components/calcite-navigation-user/customElement.js +1 -1
- package/dist/components/calcite-notice/customElement.js +1 -1
- package/dist/components/calcite-option/customElement.js +1 -1
- package/dist/components/calcite-option-group/customElement.js +1 -1
- package/dist/components/calcite-pagination/customElement.js +1 -1
- package/dist/components/calcite-panel/customElement.js +1 -1
- package/dist/components/calcite-popover/customElement.js +1 -1
- package/dist/components/calcite-progress/customElement.js +1 -1
- package/dist/components/calcite-radio-button/customElement.js +1 -1
- package/dist/components/calcite-radio-button-group/customElement.js +1 -1
- package/dist/components/calcite-rating/customElement.js +1 -1
- package/dist/components/calcite-scrim/customElement.js +1 -1
- package/dist/components/calcite-segmented-control/customElement.js +1 -1
- package/dist/components/calcite-segmented-control-item/customElement.js +1 -1
- package/dist/components/calcite-select/customElement.js +1 -1
- package/dist/components/calcite-sheet/customElement.js +1 -1
- package/dist/components/calcite-shell/customElement.js +1 -1
- package/dist/components/calcite-shell-center-row/customElement.js +1 -1
- package/dist/components/calcite-shell-panel/customElement.js +1 -1
- package/dist/components/calcite-slider/customElement.js +1 -1
- package/dist/components/calcite-sort-handle/customElement.js +1 -1
- package/dist/components/calcite-sortable-list/customElement.js +1 -1
- package/dist/components/calcite-split-button/customElement.js +1 -1
- package/dist/components/calcite-stack/customElement.js +1 -1
- package/dist/components/calcite-stepper/customElement.js +1 -1
- package/dist/components/calcite-stepper-item/customElement.js +1 -1
- package/dist/components/calcite-switch/customElement.js +1 -1
- package/dist/components/calcite-tab/customElement.js +1 -1
- package/dist/components/calcite-tab-nav/customElement.js +1 -1
- package/dist/components/calcite-tab-title/customElement.js +1 -1
- package/dist/components/calcite-table/customElement.js +1 -1
- package/dist/components/calcite-table-cell/customElement.js +1 -1
- package/dist/components/calcite-table-header/customElement.js +1 -1
- package/dist/components/calcite-table-row/customElement.js +1 -1
- package/dist/components/calcite-tabs/customElement.js +1 -1
- package/dist/components/calcite-text-area/customElement.js +1 -1
- package/dist/components/calcite-tile/customElement.js +1 -1
- package/dist/components/calcite-tile-group/customElement.js +1 -1
- package/dist/components/calcite-tile-select/customElement.js +1 -1
- package/dist/components/calcite-tile-select-group/customElement.js +1 -1
- package/dist/components/calcite-time-picker/customElement.js +1 -1
- package/dist/components/calcite-tip/customElement.js +1 -1
- package/dist/components/calcite-tip-group/customElement.js +1 -1
- package/dist/components/calcite-tip-manager/customElement.js +1 -1
- package/dist/components/calcite-tooltip/customElement.js +1 -1
- package/dist/components/calcite-tree/customElement.js +1 -1
- package/dist/components/calcite-tree-item/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +1 -1
- package/package.json +2 -2
- package/dist/calcite/NAWR2OOT.js +0 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
4
|
-
* v3.0.0-next.
|
|
4
|
+
* v3.0.0-next.30
|
|
5
5
|
*/
|
|
6
|
-
import{b as p}from"./
|
|
6
|
+
import{b as p}from"./AHPFRNGN.js";import{v as m,w as u}from"./LVOCUTM2.js";import"./TZWDUBRU.js";import{M as b,a as c,w as n,z as h}from"./BAQJPIM4.js";var f={titleGroup:"title-group"},g=n`:host{display:flex;flex-direction:column}:host([bordered]){box-shadow:inset 0 1px 0 var(--calcite-color-border-1);background-color:var(--calcite-color-foreground-1)}:host([bordered]) section{border-width:1px;border-style:solid;border-color:var(--calcite-color-border-1)}:host([bordered][position=bottom]){box-shadow:inset 0 1px 0 var(--calcite-color-border-1),inset 0 -1px 0 var(--calcite-color-border-1)}:host([bordered]:not([position=bottom])) ::slotted(calcite-tab-nav){margin-block-end:-1px}:host([bordered][scale=s]) section{padding:.75rem}:host([bordered][scale=m]) section{padding:.5rem}:host([bordered][scale=l]) section{padding:1rem}:host([position=bottom]){flex-direction:column-reverse}section{display:flex;flex-grow:1;overflow:hidden;border-block-start-width:1px;border-block-start-color:var(--calcite-color-border-1);border-block-start-style:solid}:host([position=bottom]) section{flex-direction:column-reverse;border-block-start-width:0px;border-block-end-width:1px;border-block-end-color:var(--calcite-color-border-1)}:host([position=bottom]:not([bordered])) section{border-block-end-style:solid}@media (forced-colors: active){:host([bordered]) section{border-block-start-width:0px;border-block-end-width:1px}:host([position=bottom][bordered]) section{border-block-start-width:1px;border-block-end-width:0px}}:host([hidden]){display:none}[hidden]{display:none}`,d=class extends h{constructor(){super(),this.tabs=[],this.titles=[],this.bordered=!1,this.layout="inline",this.position="top",this.scale="m",this.listen("calciteInternalTabNavSlotChange",this.calciteInternalTabNavSlotChangeHandler)}static{this.properties={tabs:16,titles:16,bordered:5,layout:3,position:3,scale:3}}static{this.styles=g}connectedCallback(){super.connectedCallback(),this.updateItems()}load(){this.updateItems()}willUpdate(e){(e.has("position")&&(this.hasUpdated||this.position!=="top")||e.has("scale")&&(this.hasUpdated||this.scale!=="m"))&&this.updateItems(),(e.has("titles")||e.has("tabs"))&&this.hasUpdated&&this.titles?.length>0&&this.tabs?.length>0&&(this.updateAriaSettings(),this.updateItems())}calciteInternalTabNavSlotChangeHandler(e){e.stopPropagation(),e.detail.length!==this.titles.length&&(this.titles=e.detail)}defaultSlotChangeHandler(e){this.tabs=m(e,"calcite-tab")}async updateAriaSettings(){await this.componentOnReady();let e,i,o=u(this.slotEl,"calcite-tab");if(o.some(t=>t.tab)||this.titles.some(t=>t.tab))e=o.sort((t,a)=>t.tab.localeCompare(a.tab)).map(t=>t.id),i=this.titles.sort((t,a)=>t.tab.localeCompare(a.tab)).map(t=>t.id);else{let t=await Promise.all(o.map(s=>s.getTabIndex())),a=await Promise.all(this.titles.map(s=>s.getTabIndex()));e=t.reduce((s,r,l)=>(s[r]=o[l].id,s),[]),i=a.reduce((s,r,l)=>(s[r]=this.titles[l].id,s),[])}o.forEach(t=>t._updateAriaInfo(e,i)),this.titles.forEach(t=>t._updateAriaInfo(e,i))}updateItems(){let{position:e,scale:i}=this,o=this.el.querySelector("calcite-tab-nav");o&&(o.position=e,o.scale=i),Array.from(this.el.querySelectorAll("calcite-tab")).forEach(t=>{t.parentElement===this.el&&(t.scale=i)}),Array.from(this.el.querySelectorAll("calcite-tab-nav > calcite-tab-title")).forEach(t=>{t.position=e,t.scale=i})}setDefaultSlotRef(e){this.slotEl=e}render(){return c`<slot name=${f.titleGroup}></slot><section><slot @slotchange=${this.defaultSlotChangeHandler} ${p(this.setDefaultSlotRef)}></slot></section>`}};b("calcite-tabs",d);export{d as Tabs};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
4
|
-
* v3.0.0-next.
|
|
4
|
+
* v3.0.0-next.30
|
|
5
5
|
*/
|
|
6
|
-
import{d as pe}from"./GSACIBBY.js";import{a as ue}from"./WJZQ73HV.js";import{a as me}from"./ZUBY7AA4.js";import{a as be,b as ge,c as fe,d,e as D,g as H,h as ve,i as T,k as v,l as $}from"./PEGFVIG2.js";import{a as Z,c as A,d as ee,e as te,f as ie,g as C,h as se}from"./P3MAEHVO.js";import"./6KAPBPXJ.js";import{a as k}from"./U2JZXZYN.js";import{a as le,c as ae,e as oe,f as ne,h as ce}from"./OKSJRXBT.js";import{c as re,d as he,e as de}from"./CIETHR7D.js";import{a as K,b as Q}from"./QMSUJJX2.js";import{a as u}from"./4ULNVQYE.js";import{a as w}from"./Y42OK37D.js";import"./JIDXKIPE.js";import{a as E,b as Y}from"./GQ2TWLHC.js";import{a as S}from"./LSRRX7ZA.js";import{a as X}from"./4UYW7OE3.js";import{a as G,b as g}from"./EYYNT4E7.js";import{f as I,i as _}from"./BCGQDABZ.js";import{a as q,b as j,c as N,d as J}from"./SOFWSTRQ.js";import{a as W}from"./LE4KOWO6.js";import{A as h,E as R,G as B,M as U,a as r,e as m,w as O,x as P,y as b,z as L}from"./P2GAK5BI.js";var ye={button:"x-button"},ke=({disabled:z,key:e,label:t,scale:i})=>u(e,r`<button .ariaLabel=${t} class=${h(ye.button)} .disabled=${z} tabindex=-1 type=button><calcite-icon icon=x .scale=${w(i)}></calcite-icon></button>`),Ae=O`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:block}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]) .x-button{inline-size:1rem;block-size:1rem}:host([scale=m]) .x-button{inline-size:1.5rem;block-size:1.5rem}:host([scale=l]) .x-button{inline-size:2rem;block-size:2rem}.x-button{margin:0;display:flex;cursor:pointer;appearance:none;align-content:center;align-items:center;justify-content:center;align-self:center;border-width:2px;background-color:transparent;color:var(--calcite-color-text-3);outline-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;border-radius:50%;border-color:transparent;background-color:var(--calcite-color-foreground-2)}.x-button:active,.x-button:hover{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-3)}.x-button:active{border-style:solid;border-color:var(--calcite-color-brand)}.x-button calcite-icon{color:inherit}:host([scale=s]){font-size:var(--calcite-font-size--2);--calcite-combobox-item-spacing-unit-l: .5rem;--calcite-combobox-item-spacing-unit-s: .25rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.25rem - 1px) }:host([scale=s]) .x-button{margin-inline:.5rem}:host([scale=m]){font-size:var(--calcite-font-size--1);--calcite-combobox-item-spacing-unit-l: .75rem;--calcite-combobox-item-spacing-unit-s: .5rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.5rem - 1px) }:host([scale=m]) .x-button{margin-inline-end:.75rem}:host([scale=l]){font-size:var(--calcite-font-size-0);--calcite-combobox-item-spacing-unit-l: 1rem;--calcite-combobox-item-spacing-unit-s: .75rem;--calcite-combobox-input-height: 1.5rem;--calcite-internal-combobox-input-margin-block: calc(.625rem - 1px) }:host([scale=l]) .x-button{margin-inline-end:1rem}.wrapper{display:flex;border-width:1px;border-style:solid;border-color:var(--calcite-color-border-input);background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-1);outline-color:transparent;padding-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.wrapper:hover .icon{color:var(--calcite-color-text-1)}:host(:focus-within) .wrapper,.wrapper--active{outline:2px solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(-2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([read-only]) .wrapper{background-color:var(--calcite-color-background)}:host([read-only]) .label{font-weight:var(--calcite-font-weight-medium)}:host([status=invalid]) .wrapper{border-color:var(--calcite-color-status-danger)}:host([status=invalid]:focus-within) .wrapper{outline:2px solid var(--calcite-color-status-danger);outline-offset:calc(-2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.wrapper--single{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l);cursor:pointer;flex-wrap:nowrap}.grid-input{position:relative;display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;gap:var(--calcite-combobox-item-spacing-unit-s);margin-inline-end:var(--calcite-combobox-item-spacing-unit-s)}.grid-input.selection-display-fit,.grid-input.selection-display-single{flex-wrap:nowrap;overflow:hidden}.input{flex-grow:1;appearance:none;overflow:hidden;text-overflow:ellipsis;border-style:none;background-color:transparent;padding:0;font-family:inherit;color:var(--calcite-color-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);inline-size:100%;margin-block-end:var(--calcite-combobox-item-spacing-unit-s);min-inline-size:4.8125rem}.input:focus{outline:2px solid transparent;outline-offset:2px}.input:placeholder-shown{text-overflow:ellipsis}.input--single{padding:0;margin-block:var(--calcite-internal-combobox-input-margin-block)}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;inline-size:0px;min-inline-size:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.placeholder-icon{color:var(--calcite-color-text-3)}.input-wrap{display:flex;flex-grow:1;align-items:center}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;max-inline-size:100%;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;font-weight:var(--calcite-font-weight-normal);block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--icon{padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.icon-end,.icon-start{display:flex;cursor:pointer;align-items:center}.icon-end{flex:none}.icon-end .icon{color:var(--calcite-color-text-3)}.floating-ui-container{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown);display:none;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);transition-property:inset,left,opacity;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@media (forced-colors: active){.wrapper,.floating-ui-container{border:1px solid canvasText}}.screen-readers-only{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.list-container{max-block-size:45vh;overflow-y:auto;background-color:var(--calcite-color-foreground-1);inline-size:var(--calcite-dropdown-width, 100%)}.list{margin:0;display:block;padding:0}.list--hide{block-size:0px;overflow:hidden}calcite-chip{--calcite-animation-timing: 0}.chip{margin-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);max-inline-size:100%}.chip--active{background-color:var(--calcite-color-foreground-3)}.chip--invisible{visibility:hidden;position:absolute}.item{display:block}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}::slotted(calcite-combobox-item-group:not(:first-child)){padding-block-start:var(--calcite-combobox-item-spacing-unit-l)}`,xe="combobox-item-",Ie="combobox-chip-",Ce="combobox-label-",F="combobox-listbox-",$e="combobox-input-",M=class extends L{constructor(){super(),this.internalComboboxChangeEvent=()=>{this.calciteComboboxChange.emit()},this.emitComboboxChange=E(this.internalComboboxChangeEvent,0),this.filterItems=(()=>{let e=(t,i)=>t&&i.some(({el:s})=>t===s);return E((t,i=!1,s=!0)=>{let l=me([...this.data,...this.groupData],t,["description","label","metadata","shortHeading"]),a=this.getItemsAndGroups(),o=t==="";a.forEach(n=>{if(o){n.hidden=!1;return}let c=!e(n,l);n.hidden=c;let[p,x]=n.ancestors;(e(p,l)||e(x,l))&&(n.hidden=!1),c||n.ancestors.forEach(f=>f.hidden=!1)}),this.filterTextMatchPattern=this.filterText&&new RegExp(`(${Y(this.filterText)})`,"i"),this.filteredItems=this.getFilteredItems(),this.filteredItems.forEach(n=>{n.filterTextMatchPattern=this.filterTextMatchPattern}),i&&(this.open=this.filterText.trim().length>0&&this.filteredItems.length>0),s&&this.calciteComboboxFilterChange.emit()},B.filter)})(),this._filterText="",this.getSelectedItems=()=>{if(!this.isMulti()){let e=this.items.find(({selected:t})=>t);return e?[e]:[]}return this.items.filter(e=>e.selected&&(this.selectionMode!=="ancestors"||!T(e))).sort((e,t)=>{let i=this.selectedItems.indexOf(e),s=this.selectedItems.indexOf(t);return i>-1&&s>-1?i-s:s-i})},this.guid=W(),this.ignoreSelectedEventsFlag=!1,this.inputHeight=0,this.internalValueChangeFlag=!1,this.mutationObserver=S("mutation",()=>this.updateItems()),this.onLabelClick=()=>{this.setFocus()},this.openTransitionProp="opacity",this.placement=Z,this.resizeObserver=S("resize",()=>{this.setMaxScrollerHeight(),this.refreshSelectionDisplay()}),this.textInput=G(),this._value=null,this.activeChipIndex=-1,this.activeDescendant="",this.activeItemIndex=-1,this.compactSelectionDisplay=!1,this.groupItems=[],this.items=[],this.selectedHiddenChipsCount=0,this.selectedVisibleChipsCount=0,this.clearDisabled=!1,this.disabled=!1,this.filteredItems=[],this.maxItems=0,this.messages=X(),this.open=!1,this.overlayPositioning="absolute",this.placeholderIconFlipRtl=!1,this.readOnly=!1,this.required=!1,this.scale="m",this.selectedItems=[],this.selectionDisplay="all",this.selectionMode="multiple",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.calciteComboboxBeforeClose=b({cancelable:!1}),this.calciteComboboxBeforeOpen=b({cancelable:!1}),this.calciteComboboxChange=b({cancelable:!1}),this.calciteComboboxChipClose=b({cancelable:!1}),this.calciteComboboxClose=b({cancelable:!1}),this.calciteComboboxFilterChange=b({cancelable:!1}),this.calciteComboboxOpen=b({cancelable:!1}),this.listenOn(document,"click",this.documentClickHandler),this.listen("calciteComboboxItemChange",this.calciteComboboxItemChangeHandler),this.listen("calciteInternalComboboxItemChange",this.calciteInternalComboboxItemChangeHandler),this.listen("click",this.comboboxFocusHandler)}static{this.properties={activeChipIndex:16,activeDescendant:16,activeItemIndex:16,compactSelectionDisplay:16,groupItems:16,items:16,needsIcon:16,selectedHiddenChipsCount:16,selectedVisibleChipsCount:16,allowCustomValues:7,clearDisabled:7,disabled:7,filterText:3,filteredItems:0,flipPlacements:0,form:3,label:1,maxItems:11,messageOverrides:0,name:3,open:7,overlayPositioning:3,placeholder:1,placeholderIcon:3,placeholderIconFlipRtl:7,readOnly:7,required:7,scale:3,selectedItems:0,selectionDisplay:3,selectionMode:3,status:3,validationIcon:[3,{converter:R}],validationMessage:1,validity:0,value:1}}static{this.styles=Ae}get showingInlineIcon(){let{placeholderIcon:e,selectionMode:t,selectedItems:i,open:s}=this,l=i[0],a=l?.icon,o=v(t);return!s&&l?!!a&&o:!!e&&(!l||o)}get filterText(){return this._filterText}set filterText(e){let t=this._filterText;e!==t&&(this._filterText=e,this.filterTextChange(e))}get value(){return this._value}set value(e){let t=this._value;e!==t&&(this._value=e,this.valueHandler(e))}async reposition(e=!1){let{floatingEl:t,referenceEl:i,placement:s,overlayPositioning:l,filteredFlipPlacements:a}=this;return te(this,{floatingEl:t,referenceEl:i,overlayPositioning:l,placement:s,flipPlacements:a,type:"menu"},e)}async setFocus(){await J(this),this.textInput.value?.focus(),this.activeChipIndex=-1,this.activeItemIndex=-1}connectedCallback(){super.connectedCallback(),re(this),ae(this),this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.updateItems(),this.setFilteredPlacements(),this.open&&(this.openHandler(),k(this)),C(this)}async load(){q(this),this.updateItems(),this.filterItems(this.filterText,!1,!1)}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("maxItems")&&(this.hasUpdated||this.maxItems!==0)&&this.setMaxScrollerHeight(),e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")&&this.reposition(!0),(e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="multiple")||e.has("scale")&&(this.hasUpdated||this.scale!=="m"))&&this.updateItems(),e.has("flipPlacements")&&this.flipPlacementsHandler(),e.has("selectedItems")&&(this.hasUpdated||this.selectedItems?.length>0)&&this.selectedItemsHandler()}updated(){this.el.offsetHeight!==this.inputHeight&&(this.reposition(!0),this.inputHeight=this.el.offsetHeight),K(this),this.hasUpdated||this.refreshSelectionDisplay()}loaded(){ne(this,this.getValue()),C(this),j(this)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),he(this),oe(this),se(this)}filterTextChange(e){this.updateActiveItemIndex(-1),this.filterItems(e,!0)}openHandler(){k(this),!this.disabled&&this.setMaxScrollerHeight()}handleDisabledChange(e){e||(this.open=!1)}valueHandler(e){if(!this.internalValueChangeFlag){let t=this.getItems();Array.isArray(e)?t.forEach(i=>i.selected=e.includes(i.value)):e?t.forEach(i=>i.selected=e===i.value):t.forEach(i=>i.selected=!1),this.updateItems()}}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}selectedItemsHandler(){this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1}async documentClickHandler(e){this.disabled||e.composedPath().includes(this.el)||(await this.componentOnReady(),!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1)),this.allowCustomValues&&this.filterText.trim().length&&this.addCustomChip(this.filterText),this.open=!1)}calciteComboboxItemChangeHandler(e){if(this.ignoreSelectedEventsFlag)return;let t=e.target,i=this.filteredItems.indexOf(t);this.updateActiveItemIndex(i),this.toggleSelection(t,t.selected)}calciteInternalComboboxItemChangeHandler(e){e.stopPropagation(),this.updateItems()}clearValue(){this.ignoreSelectedEventsFlag=!0,this.items.forEach(e=>e.selected=!1),this.ignoreSelectedEventsFlag=!1,this.selectedItems=[],this.emitComboboxChange(),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems(""),this.setFocus()}clearInputValue(){this.textInput.value.value="",this.filterText=""}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?ee(t,e):null}getValue(){let e=this.selectedItems.map(t=>t?.value?.toString());return e?.length?e.length>1?e:e[0]:""}comboboxInViewport(){let e=this.el.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.right<=(window.innerWidth||document.documentElement.clientWidth)&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)}keyDownHandler(e){if(this.readOnly)return;let{key:t}=e;switch(t){case"Tab":this.activeChipIndex=-1,this.activeItemIndex=-1,this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):this.open?(this.open=!1,e.preventDefault()):!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1));break;case"ArrowLeft":(this.activeChipIndex!==-1||this.textInput.value.selectionStart===0)&&(this.previousChip(),e.preventDefault());break;case"ArrowRight":this.activeChipIndex!==-1&&(this.nextChip(),e.preventDefault());break;case"ArrowUp":this.filteredItems.length&&(e.preventDefault(),this.open&&this.shiftActiveItemIndex(-1),this.comboboxInViewport()||this.el.scrollIntoView());break;case"ArrowDown":this.filteredItems.length&&(e.preventDefault(),this.open?this.shiftActiveItemIndex(1):(this.open=!0,this.ensureRecentSelectedItemIsActive()),this.comboboxInViewport()||this.el.scrollIntoView());break;case" ":!this.textInput.value.value&&!e.defaultPrevented&&(this.open||(this.open=!0,this.shiftActiveItemIndex(1)),e.preventDefault());break;case"Home":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(0),this.scrollToActiveItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"End":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(this.filteredItems.length-1),this.scrollToActiveItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"Escape":!this.clearDisabled&&!this.open&&this.clearValue(),this.open=!1,e.preventDefault();break;case"Enter":if(this.open&&this.activeItemIndex>-1){let i=this.filteredItems[this.activeItemIndex];this.toggleSelection(i,!i.selected),e.preventDefault()}else this.activeChipIndex>-1?(this.removeActiveChip(),e.preventDefault()):this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):e.defaultPrevented||le(this)&&e.preventDefault();break;case"Delete":case"Backspace":{if(this.selectionDisplay==="single"||this.selectionDisplay==="fit"&&this.selectedHiddenChipsCount>0)return;this.activeChipIndex>-1?(e.preventDefault(),this.removeActiveChip()):!this.filterText&&this.isMulti()&&(e.preventDefault(),this.removeLastChip());break}}}onBeforeOpen(){this.scrollToActiveItem(),this.calciteComboboxBeforeOpen.emit()}onOpen(){this.calciteComboboxOpen.emit()}onBeforeClose(){this.calciteComboboxBeforeClose.emit()}onClose(){this.calciteComboboxClose.emit(),ie(this)}async setMaxScrollerHeight(){let{listContainerEl:e,open:t,referenceEl:i}=this;if(!e||!t)return;await this.reposition(!0);let s=this.getMaxScrollerHeight();e.style.maxHeight=s>0?`${s}px`:"",e.style.minWidth=`${i.clientWidth}px`,await this.reposition(!0)}calciteChipCloseHandler(e){this.open=!1;let t=this.items.find(i=>i===e);t&&this.toggleSelection(t,!1),this.calciteComboboxChipClose.emit()}clickHandler(e){if(this.readOnly)return;let t=e.composedPath();if(t.some(i=>i.tagName==="CALCITE-CHIP")){this.open=!1,e.preventDefault();return}if(t.some(i=>i.classList?.contains(ye.button))){this.clearValue(),e.preventDefault();return}this.open=!this.open,this.ensureRecentSelectedItemIsActive()}ensureRecentSelectedItemIsActive(){let{selectedItems:e}=this,t=e.length===0?0:this.items.indexOf(e[e.length-1]);this.updateActiveItemIndex(t)}hideChip(e){e.classList.add(d.chipInvisible)}showChip(e){e.classList.remove(d.chipInvisible)}refreshChipDisplay({chipEls:e,availableHorizontalChipElSpace:t,chipContainerElGap:i}){e.forEach(s=>{if(!s.selected)this.hideChip(s);else{let l=I(s);if(l&&l<t){t-=l+i,this.showChip(s);return}}this.hideChip(s)})}async refreshSelectionDisplay(){if(await N(this),v(this.selectionMode)||!this.textInput.value)return;let{allSelectedIndicatorChipEl:e,chipContainerEl:t,selectionDisplay:i,placeholder:s,selectedIndicatorChipEl:l,textInput:{value:a}}=this,o=parseInt(getComputedStyle(t).gap.replace("px","")),n=I(t),{fontSize:c,fontFamily:p}=getComputedStyle(a),x=(_(s,`${c} ${p}`)||parseInt(pe))+o,f=I(e),y=I(l),we=Math.max(f,y);if(this.setCompactSelectionDisplay({chipContainerElGap:o,chipContainerElWidth:n,inputWidth:x,largestSelectedIndicatorChipWidth:we}),i==="fit"){let V=Array.from(this.el.shadowRoot.querySelectorAll("calcite-chip")).filter(Ee=>Ee.closable),Se=Math.round(n-((this.selectedHiddenChipsCount>0?y:0)+o+x+o));this.refreshChipDisplay({availableHorizontalChipElSpace:Se,chipContainerElGap:o,chipEls:V}),this.setVisibleAndHiddenChips(V)}}setFloatingEl(e){this.floatingEl=e,C(this)}setCompactSelectionDisplay({chipContainerElGap:e,chipContainerElWidth:t,inputWidth:i,largestSelectedIndicatorChipWidth:s}){let l=Math.round(s+e+i);(!this.maxCompactBreakpoint||this.maxCompactBreakpoint<l)&&(this.maxCompactBreakpoint=l),this.compactSelectionDisplay=t<this.maxCompactBreakpoint}setContainerEl(e){e&&this.resizeObserver?.observe(e),this.listContainerEl=e,this.transitionEl=e}setChipContainerEl(e){e&&this.resizeObserver?.observe(e),this.chipContainerEl=e}setReferenceEl(e){this.referenceEl=e,C(this)}setAllSelectedIndicatorChipEl(e){this.allSelectedIndicatorChipEl=e}setSelectedIndicatorChipEl(e){this.selectedIndicatorChipEl=e}setVisibleAndHiddenChips(e){let t=0;e.forEach(s=>{s.selected&&!s.classList.contains(d.chipInvisible)&&t++}),t!==this.selectedVisibleChipsCount&&(this.selectedVisibleChipsCount=t);let i=this.getSelectedItems().length-t;i!==this.selectedHiddenChipsCount&&(this.selectedHiddenChipsCount=i)}getMaxScrollerHeight(){let e=this.getItemsAndGroups().filter(l=>!l.hidden),{maxItems:t}=this,i=0,s=0;return e.length>t&&e.forEach(l=>{if(i<t){let a=this.calculateScrollerHeight(l);a>0&&(s+=a,i++)}}),s}calculateScrollerHeight(e){if(!e)return;let t=e.getBoundingClientRect().height,i=Array.from(e.querySelectorAll(fe)).reduce((s,l)=>s+l.getBoundingClientRect().height,0);return t-i}inputHandler(e){let t=e.target.value;this.filterText=t}getItemsAndGroups(){return[...this.groupItems,...this.items]}toggleSelection(e,t){!e||this.selectionMode==="single-persist"&&e.selected&&e.value===this.value&&!t||(this.isMulti()?(e.selected=t,this.updateAncestors(e),this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.resetText(),this.filterItems("")):(this.ignoreSelectedEventsFlag=!0,this.items.forEach(i=>i.selected=i===e?t:!1),this.ignoreSelectedEventsFlag=!1,this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.textInput.value&&(this.textInput.value.value=$(e)),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")))}updateAncestors(e){if(this.selectionMode!=="ancestors")return;let t=H(e),i=ve(e);e.selected?t.forEach(s=>{s.selected=!0}):(i.forEach(s=>s.selected=!1),[...t].forEach(s=>{T(s)||(s.selected=!1)}))}getFilteredItems(){return this.filterText===""?this.items:this.items.filter(e=>!e.hidden)}updateItems(){this.items=this.getItems(),this.groupItems=this.getGroupItems(),this.data=this.getData(),this.groupData=this.getGroupData(),this.selectedItems=this.getSelectedItems(),this.filteredItems=this.getFilteredItems(),this.needsIcon=this.getNeedsIcon(),this.items.forEach(e=>{e.selectionMode=this.selectionMode,e.scale=this.scale}),this.allowCustomValues||this.setMaxScrollerHeight(),this.groupItems.forEach((e,t,i)=>{t===0&&(e.afterEmptyGroup=!1);let s=i[t+1];s&&(s.afterEmptyGroup=e.children.length===0)})}getData(){return this.items.map(e=>({description:e.description,filterDisabled:e.filterDisabled,label:e.heading||e.textLabel,metadata:e.metadata,shortHeading:e.shortHeading,el:e}))}getGroupData(){return this.groupItems.map(e=>({label:e.label,el:e}))}getNeedsIcon(){return v(this.selectionMode)&&this.items.some(e=>e.icon)}resetText(){this.textInput.value&&(this.textInput.value.value=""),this.filterText=""}getItems(){return Array.from(this.el.querySelectorAll(be)).filter(e=>!e.disabled)}getGroupItems(){return Array.from(this.el.querySelectorAll(ge))}addCustomChip(e,t){let i=this.items.find(s=>s.textLabel===e);if(i)this.toggleSelection(i,!0);else{this.isMulti()||this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1);let s=document.createElement("calcite-combobox-item");s.value=e,s.textLabel=e,s.selected=!0,this.el.prepend(s),this.resetText(),t&&this.setFocus(),this.updateItems(),this.filterItems(""),this.open=!0,this.emitComboboxChange()}}removeActiveChip(){this.toggleSelection(this.selectedItems[this.activeChipIndex],!1),this.setFocus()}removeLastChip(){this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1),this.setFocus()}previousChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex;this.activeChipIndex=t===-1?e:Math.max(t-1,0),this.updateActiveItemIndex(-1),this.focusChip()}nextChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex+1;t>e?(this.activeChipIndex=-1,this.setFocus()):(this.activeChipIndex=t,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){let e=this.selectedItems[this.activeChipIndex]?.guid;(e?this.referenceEl.querySelector(`#${Ie}${e}`):null)?.setFocus()}scrollToActiveItem(){let e=this.filteredItems[this.activeItemIndex];if(!e)return;let t=this.calculateScrollerHeight(e),{offsetHeight:i,scrollTop:s}=this.listContainerEl;i+s<e.offsetTop+t?this.listContainerEl.scrollTop=e.offsetTop-i+t:e.offsetTop<s&&(this.listContainerEl.scrollTop=e.offsetTop)}shiftActiveItemIndex(e){let{length:t}=this.filteredItems,i=(this.activeItemIndex+t+e)%t;this.updateActiveItemIndex(i),this.scrollToActiveItem()}updateActiveItemIndex(e){this.activeItemIndex=e;let t=null;this.filteredItems.forEach((i,s)=>{s===e?(i.active=!0,t=`${xe}${i.guid}`):i.active=!1}),this.activeDescendant=t,this.activeItemIndex>-1&&(this.activeChipIndex=-1)}isAllSelected(){return this.getItems().length===this.getSelectedItems().length}isMulti(){return!v(this.selectionMode)}comboboxFocusHandler(){this.disabled||this.textInput.value?.focus()}renderChips(){let{activeChipIndex:e,readOnly:t,scale:i,selectionMode:s,messages:l}=this;return this.selectedItems.map((a,o)=>{let n={chip:!0,"chip--active":e===o},c=[...H(a)].reverse(),p=$(a),x=[...c,a].map(y=>$(y)),f=s!=="ancestors"?p:x.join(" / ");return u(p,r`<calcite-chip .appearance=${t?"outline":"solid"} class=${h(n)} .closable=${!t} data-test-id=${`chip-${o}`} .icon=${a.icon} .iconFlipRtl=${a.iconFlipRtl} id=${(a.guid?`${Ie}${a.guid}`:null)??m} .label=${f} .messageOverrides=${{dismissLabel:l.removeTag}} @focusin=${()=>this.activeChipIndex=o} @calciteChipClose=${()=>this.calciteChipCloseHandler(a)} .scale=${i} .selected=${a.selected} .tabIndex=${e===o?0:-1} title=${f??m} .value=${a.value}>${f}</calcite-chip>`)})}renderAllSelectedIndicatorChip(){let{compactSelectionDisplay:e,scale:t,selectedVisibleChipsCount:i,setAllSelectedIndicatorChipEl:s}=this,l=this.messages.allSelected;return r`<calcite-chip class=${h({chip:!0,[d.chipInvisible]:!(this.isAllSelected()&&!i&&!e)})} .label=${l} .scale=${t} title=${l??m} value ${g(s)}>${l}</calcite-chip>`}renderAllSelectedIndicatorChipCompact(){let{compactSelectionDisplay:e,scale:t,selectedVisibleChipsCount:i}=this,s=this.messages.all||"All";return r`<calcite-chip class=${h({chip:!0,[d.chipInvisible]:!(this.isAllSelected()&&!i&&e)})} .label=${s} .scale=${t} title=${s??m} value>${s}</calcite-chip>`}renderSelectedIndicatorChip(){let{compactSelectionDisplay:e,selectionDisplay:t,getSelectedItems:i,scale:s,selectedHiddenChipsCount:l,selectedVisibleChipsCount:a,setSelectedIndicatorChipEl:o}=this,n,c;if(e)n=!0;else if(t==="single"){let p=i().length;this.isAllSelected()?n=!0:p>0?n=!1:n=!0,c=`${p} ${this.messages.selected}`}else t==="fit"&&(n=!!(this.isAllSelected()&&a===0||l===0),c=a>0?`+${l}`:`${l} ${this.messages.selected}`);return r`<calcite-chip class=${h({chip:!0,[d.chipInvisible]:n})} .label=${c} .scale=${s} title=${c??m} value ${g(o)}>${c}</calcite-chip>`}renderSelectedIndicatorChipCompact(){let{compactSelectionDisplay:e,selectionDisplay:t,getSelectedItems:i,scale:s,selectedHiddenChipsCount:l}=this,a,o;if(e){let n=i().length;this.isAllSelected()?a=!0:t==="fit"?(a=!(l>0),o=`${l||0}`):t==="single"&&(a=!(n>0),o=`${n}`)}else a=!0;return r`<calcite-chip class=${h({chip:!0,[d.chipInvisible]:a})} .label=${o} .scale=${s} title=${o??m} value>${o}</calcite-chip>`}renderInput(){let{guid:e,disabled:t,placeholder:i,selectionMode:s,selectedItems:l,open:a}=this,o=v(s),n=l[0],c=!a&&o&&!!n&&!this.filterText;return r`<span class=${h({"input-wrap":!0,"input-wrap--single":o})}>${c&&u("label",r`<span class=${h({label:!0,"label--icon":!!n?.icon})}>${$(n)}</span>`)||""}${u("input",r`<input aria-activedescendant=${this.activeDescendant??m} aria-controls=${`${F}${e}`} aria-errormessage=${D.validationMessage} aria-owns=${`${F}${e}`} aria-autocomplete=list .ariaExpanded=${a} aria-haspopup=listbox .ariaInvalid=${this.status==="invalid"} .ariaLabel=${de(this)} class=${h({[d.input]:!0,"input--single":!0,[d.inputHidden]:c,"input--icon":this.showingInlineIcon&&!!this.placeholderIcon})} data-test-id=input .disabled=${t} .id=${`${$e}${e}`} @focus=${this.comboboxFocusHandler} @input=${this.inputHandler} placeholder=${i??m} .readOnly=${this.readOnly} role=combobox .tabIndex=${this.activeChipIndex===-1?0:-1} type=text .value=${P(this.filterText??"")} ${g(this.textInput)}>`)}</span>`}renderListBoxOptions(){return this.filteredItems.map(e=>r`<li .ariaSelected=${e.selected} id=${(e.guid?`${xe}${e.guid}`:null)??m} role=option tabindex=-1>${e.textLabel}</li>`)}renderFloatingUIContainer(){let{setFloatingEl:e,setContainerEl:t,open:i}=this,s={[d.listContainer]:!0,[A.animation]:!0,[A.animationActive]:i};return r`<div aria-hidden=true class=${h(d.floatingUIContainer)} ${g(e)}><div class=${h(s)} ${g(t)}><ul class=${h({list:!0,"list--hide":!i})}><slot></slot></ul></div></div>`}renderSelectedOrPlaceholderIcon(){let{open:e,placeholderIcon:t,placeholderIconFlipRtl:i,selectedItems:s}=this,l=s[0],a=l?.icon,o=t&&(e||!l);return this.showingInlineIcon&&u("selected-placeholder-icon",r`<span class="icon-start"><calcite-icon class=${h({[d.selectedIcon]:!o,[d.placeholderIcon]:o})} .flipRtl=${o?i:l.iconFlipRtl} .icon=${o?t:a} .scale=${w(this.scale)}></calcite-icon></span>`)||""}renderChevronIcon(){let{open:e}=this;return u("chevron",r`<span class="icon-end"><calcite-icon class=${h(d.icon)} .icon=${e?"chevron-up":"chevron-down"} .scale=${w(this.scale)}></calcite-icon></span>`)}render(){let{selectionDisplay:e,guid:t,label:i,open:s,readOnly:l}=this,a=v(this.selectionMode),o=e==="all",n=e==="single",c=!a&&e==="fit",p=!this.clearDisabled&&this.value?.length>0;return Q({disabled:this.disabled,children:r`<div aria-live=polite class=${h({wrapper:!0,"wrapper--single":a||!this.selectedItems.length,"wrapper--active":s})} @click=${this.clickHandler} @keydown=${this.keyDownHandler} ${g(this.setReferenceEl)}>${this.renderSelectedOrPlaceholderIcon()}${u("grid",r`<div class=${h({"grid-input":!0,[d.selectionDisplayFit]:c,[d.selectionDisplaySingle]:n})} ${g(this.setChipContainerEl)}>${!a&&!n&&this.renderChips()||""}${!a&&!o&&[this.renderSelectedIndicatorChip(),this.renderSelectedIndicatorChipCompact(),this.renderAllSelectedIndicatorChip(),this.renderAllSelectedIndicatorChipCompact()]||""}<label class="screen-readers-only" .htmlFor=${`${$e}${t}`} .id=${`${Ce}${t}`}>${i}</label>${this.renderInput()}</div>`)}${!l&&p?u("close-button",ke({disabled:this.disabled,label:this.messages.clear,scale:this.scale})):null}${!l&&this.renderChevronIcon()||""}</div><ul aria-labelledby=${`${Ce}${t}`} aria-multiselectable=true class="screen-readers-only" .id=${`${F}${t}`} role=listbox tabindex=-1>${this.renderListBoxOptions()}</ul>${this.renderFloatingUIContainer()}${ce({component:this})}${this.validationMessage&&this.status==="invalid"?ue({icon:this.validationIcon,id:D.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}};U("calcite-combobox",M);export{M as Combobox};
|
|
6
|
+
import{d as pe}from"./4Y343BDY.js";import{a as ue}from"./O4FLQQIC.js";import{a as me}from"./FCULDRFN.js";import{a as be,b as ge,c as fe,d,e as D,g as H,h as ve,i as T,k as v,l as $}from"./UD5XHM6V.js";import{a as Z,c as A,d as ee,e as te,f as ie,g as C,h as se}from"./X7M6RUBM.js";import"./CW7XF4TH.js";import{a as k}from"./4JAP2NOF.js";import{a as le,c as ae,e as oe,f as ne,h as ce}from"./3TCKNORC.js";import{c as re,d as he,e as de}from"./LYS3FM3R.js";import{a as K,b as Q}from"./NC43GHJV.js";import{a as u}from"./GMOS576G.js";import{a as w}from"./C35VBHZF.js";import"./6Q322XH2.js";import{a as E,b as Y}from"./WKOXZ2OH.js";import{a as S}from"./S2WQBCKA.js";import{a as X}from"./MBSS3YYR.js";import{a as G,b as g}from"./AHPFRNGN.js";import{f as I,i as _}from"./LVOCUTM2.js";import{a as q,b as j,c as N,d as J}from"./BNSQPM5A.js";import{a as W}from"./TZWDUBRU.js";import{A as h,E as R,G as B,M as U,a as r,e as m,w as O,x as P,y as b,z as L}from"./BAQJPIM4.js";var ye={button:"x-button"},ke=({disabled:z,key:e,label:t,scale:i})=>u(e,r`<button .ariaLabel=${t} class=${h(ye.button)} .disabled=${z} tabindex=-1 type=button><calcite-icon icon=x .scale=${w(i)}></calcite-icon></button>`),Ae=O`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:block}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]) .x-button{inline-size:1rem;block-size:1rem}:host([scale=m]) .x-button{inline-size:1.5rem;block-size:1.5rem}:host([scale=l]) .x-button{inline-size:2rem;block-size:2rem}.x-button{margin:0;display:flex;cursor:pointer;appearance:none;align-content:center;align-items:center;justify-content:center;align-self:center;border-width:2px;background-color:transparent;color:var(--calcite-color-text-3);outline-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;border-radius:50%;border-color:transparent;background-color:var(--calcite-color-foreground-2)}.x-button:active,.x-button:hover{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-3)}.x-button:active{border-style:solid;border-color:var(--calcite-color-brand)}.x-button calcite-icon{color:inherit}:host([scale=s]){font-size:var(--calcite-font-size--2);--calcite-combobox-item-spacing-unit-l: .5rem;--calcite-combobox-item-spacing-unit-s: .25rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.25rem - 1px) }:host([scale=s]) .x-button{margin-inline:.5rem}:host([scale=m]){font-size:var(--calcite-font-size--1);--calcite-combobox-item-spacing-unit-l: .75rem;--calcite-combobox-item-spacing-unit-s: .5rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.5rem - 1px) }:host([scale=m]) .x-button{margin-inline-end:.75rem}:host([scale=l]){font-size:var(--calcite-font-size-0);--calcite-combobox-item-spacing-unit-l: 1rem;--calcite-combobox-item-spacing-unit-s: .75rem;--calcite-combobox-input-height: 1.5rem;--calcite-internal-combobox-input-margin-block: calc(.625rem - 1px) }:host([scale=l]) .x-button{margin-inline-end:1rem}.wrapper{display:flex;border-width:1px;border-style:solid;border-color:var(--calcite-color-border-input);background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-1);outline-color:transparent;padding-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.wrapper:hover .icon{color:var(--calcite-color-text-1)}:host(:focus-within) .wrapper,.wrapper--active{outline:2px solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(-2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([read-only]) .wrapper{background-color:var(--calcite-color-background)}:host([read-only]) .label{font-weight:var(--calcite-font-weight-medium)}:host([status=invalid]) .wrapper{border-color:var(--calcite-color-status-danger)}:host([status=invalid]:focus-within) .wrapper{outline:2px solid var(--calcite-color-status-danger);outline-offset:calc(-2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.wrapper--single{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l);cursor:pointer;flex-wrap:nowrap}.grid-input{position:relative;display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;gap:var(--calcite-combobox-item-spacing-unit-s);margin-inline-end:var(--calcite-combobox-item-spacing-unit-s)}.grid-input.selection-display-fit,.grid-input.selection-display-single{flex-wrap:nowrap;overflow:hidden}.input{flex-grow:1;appearance:none;overflow:hidden;text-overflow:ellipsis;border-style:none;background-color:transparent;padding:0;font-family:inherit;color:var(--calcite-color-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);inline-size:100%;margin-block-end:var(--calcite-combobox-item-spacing-unit-s);min-inline-size:4.8125rem}.input:focus{outline:2px solid transparent;outline-offset:2px}.input:placeholder-shown{text-overflow:ellipsis}.input--single{padding:0;margin-block:var(--calcite-internal-combobox-input-margin-block)}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;inline-size:0px;min-inline-size:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.placeholder-icon{color:var(--calcite-color-text-3)}.input-wrap{display:flex;flex-grow:1;align-items:center}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;max-inline-size:100%;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;font-weight:var(--calcite-font-weight-normal);block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--icon{padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.icon-end,.icon-start{display:flex;cursor:pointer;align-items:center}.icon-end{flex:none}.icon-end .icon{color:var(--calcite-color-text-3)}.floating-ui-container{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown);display:none;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);transition-property:inset,left,opacity;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@media (forced-colors: active){.wrapper,.floating-ui-container{border:1px solid canvasText}}.screen-readers-only{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.list-container{max-block-size:45vh;overflow-y:auto;background-color:var(--calcite-color-foreground-1);inline-size:var(--calcite-dropdown-width, 100%)}.list{margin:0;display:block;padding:0}.list--hide{block-size:0px;overflow:hidden}calcite-chip{--calcite-animation-timing: 0}.chip{margin-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);max-inline-size:100%}.chip--active{background-color:var(--calcite-color-foreground-3)}.chip--invisible{visibility:hidden;position:absolute}.item{display:block}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}::slotted(calcite-combobox-item-group:not(:first-child)){padding-block-start:var(--calcite-combobox-item-spacing-unit-l)}`,xe="combobox-item-",Ie="combobox-chip-",Ce="combobox-label-",F="combobox-listbox-",$e="combobox-input-",M=class extends L{constructor(){super(),this.internalComboboxChangeEvent=()=>{this.calciteComboboxChange.emit()},this.emitComboboxChange=E(this.internalComboboxChangeEvent,0),this.filterItems=(()=>{let e=(t,i)=>t&&i.some(({el:s})=>t===s);return E((t,i=!1,s=!0)=>{let l=me([...this.data,...this.groupData],t,["description","label","metadata","shortHeading"]),a=this.getItemsAndGroups(),o=t==="";a.forEach(n=>{if(o){n.hidden=!1;return}let c=!e(n,l);n.hidden=c;let[p,x]=n.ancestors;(e(p,l)||e(x,l))&&(n.hidden=!1),c||n.ancestors.forEach(f=>f.hidden=!1)}),this.filterTextMatchPattern=this.filterText&&new RegExp(`(${Y(this.filterText)})`,"i"),this.filteredItems=this.getFilteredItems(),this.filteredItems.forEach(n=>{n.filterTextMatchPattern=this.filterTextMatchPattern}),i&&(this.open=this.filterText.trim().length>0&&this.filteredItems.length>0),s&&this.calciteComboboxFilterChange.emit()},B.filter)})(),this._filterText="",this.getSelectedItems=()=>{if(!this.isMulti()){let e=this.items.find(({selected:t})=>t);return e?[e]:[]}return this.items.filter(e=>e.selected&&(this.selectionMode!=="ancestors"||!T(e))).sort((e,t)=>{let i=this.selectedItems.indexOf(e),s=this.selectedItems.indexOf(t);return i>-1&&s>-1?i-s:s-i})},this.guid=W(),this.ignoreSelectedEventsFlag=!1,this.inputHeight=0,this.internalValueChangeFlag=!1,this.mutationObserver=S("mutation",()=>this.updateItems()),this.onLabelClick=()=>{this.setFocus()},this.openTransitionProp="opacity",this.placement=Z,this.resizeObserver=S("resize",()=>{this.setMaxScrollerHeight(),this.refreshSelectionDisplay()}),this.textInput=G(),this._value=null,this.activeChipIndex=-1,this.activeDescendant="",this.activeItemIndex=-1,this.compactSelectionDisplay=!1,this.groupItems=[],this.items=[],this.selectedHiddenChipsCount=0,this.selectedVisibleChipsCount=0,this.clearDisabled=!1,this.disabled=!1,this.filteredItems=[],this.maxItems=0,this.messages=X(),this.open=!1,this.overlayPositioning="absolute",this.placeholderIconFlipRtl=!1,this.readOnly=!1,this.required=!1,this.scale="m",this.selectedItems=[],this.selectionDisplay="all",this.selectionMode="multiple",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.calciteComboboxBeforeClose=b({cancelable:!1}),this.calciteComboboxBeforeOpen=b({cancelable:!1}),this.calciteComboboxChange=b({cancelable:!1}),this.calciteComboboxChipClose=b({cancelable:!1}),this.calciteComboboxClose=b({cancelable:!1}),this.calciteComboboxFilterChange=b({cancelable:!1}),this.calciteComboboxOpen=b({cancelable:!1}),this.listenOn(document,"click",this.documentClickHandler),this.listen("calciteComboboxItemChange",this.calciteComboboxItemChangeHandler),this.listen("calciteInternalComboboxItemChange",this.calciteInternalComboboxItemChangeHandler),this.listen("click",this.comboboxFocusHandler)}static{this.properties={activeChipIndex:16,activeDescendant:16,activeItemIndex:16,compactSelectionDisplay:16,groupItems:16,items:16,needsIcon:16,selectedHiddenChipsCount:16,selectedVisibleChipsCount:16,allowCustomValues:7,clearDisabled:7,disabled:7,filterText:3,filteredItems:0,flipPlacements:0,form:3,label:1,maxItems:11,messageOverrides:0,name:3,open:7,overlayPositioning:3,placeholder:1,placeholderIcon:3,placeholderIconFlipRtl:7,readOnly:7,required:7,scale:3,selectedItems:0,selectionDisplay:3,selectionMode:3,status:3,validationIcon:[3,{converter:R}],validationMessage:1,validity:0,value:1}}static{this.styles=Ae}get showingInlineIcon(){let{placeholderIcon:e,selectionMode:t,selectedItems:i,open:s}=this,l=i[0],a=l?.icon,o=v(t);return!s&&l?!!a&&o:!!e&&(!l||o)}get filterText(){return this._filterText}set filterText(e){let t=this._filterText;e!==t&&(this._filterText=e,this.filterTextChange(e))}get value(){return this._value}set value(e){let t=this._value;e!==t&&(this._value=e,this.valueHandler(e))}async reposition(e=!1){let{floatingEl:t,referenceEl:i,placement:s,overlayPositioning:l,filteredFlipPlacements:a}=this;return te(this,{floatingEl:t,referenceEl:i,overlayPositioning:l,placement:s,flipPlacements:a,type:"menu"},e)}async setFocus(){await J(this),this.textInput.value?.focus(),this.activeChipIndex=-1,this.activeItemIndex=-1}connectedCallback(){super.connectedCallback(),re(this),ae(this),this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.updateItems(),this.setFilteredPlacements(),this.open&&(this.openHandler(),k(this)),C(this)}async load(){q(this),this.updateItems(),this.filterItems(this.filterText,!1,!1)}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("maxItems")&&(this.hasUpdated||this.maxItems!==0)&&this.setMaxScrollerHeight(),e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")&&this.reposition(!0),(e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="multiple")||e.has("scale")&&(this.hasUpdated||this.scale!=="m"))&&this.updateItems(),e.has("flipPlacements")&&this.flipPlacementsHandler(),e.has("selectedItems")&&(this.hasUpdated||this.selectedItems?.length>0)&&this.selectedItemsHandler()}updated(){this.el.offsetHeight!==this.inputHeight&&(this.reposition(!0),this.inputHeight=this.el.offsetHeight),K(this),this.hasUpdated||this.refreshSelectionDisplay()}loaded(){ne(this,this.getValue()),C(this),j(this)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),he(this),oe(this),se(this)}filterTextChange(e){this.updateActiveItemIndex(-1),this.filterItems(e,!0)}openHandler(){k(this),!this.disabled&&this.setMaxScrollerHeight()}handleDisabledChange(e){e||(this.open=!1)}valueHandler(e){if(!this.internalValueChangeFlag){let t=this.getItems();Array.isArray(e)?t.forEach(i=>i.selected=e.includes(i.value)):e?t.forEach(i=>i.selected=e===i.value):t.forEach(i=>i.selected=!1),this.updateItems()}}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}selectedItemsHandler(){this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1}async documentClickHandler(e){this.disabled||e.composedPath().includes(this.el)||(await this.componentOnReady(),!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1)),this.allowCustomValues&&this.filterText.trim().length&&this.addCustomChip(this.filterText),this.open=!1)}calciteComboboxItemChangeHandler(e){if(this.ignoreSelectedEventsFlag)return;let t=e.target,i=this.filteredItems.indexOf(t);this.updateActiveItemIndex(i),this.toggleSelection(t,t.selected)}calciteInternalComboboxItemChangeHandler(e){e.stopPropagation(),this.updateItems()}clearValue(){this.ignoreSelectedEventsFlag=!0,this.items.forEach(e=>e.selected=!1),this.ignoreSelectedEventsFlag=!1,this.selectedItems=[],this.emitComboboxChange(),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems(""),this.setFocus()}clearInputValue(){this.textInput.value.value="",this.filterText=""}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?ee(t,e):null}getValue(){let e=this.selectedItems.map(t=>t?.value?.toString());return e?.length?e.length>1?e:e[0]:""}comboboxInViewport(){let e=this.el.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.right<=(window.innerWidth||document.documentElement.clientWidth)&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)}keyDownHandler(e){if(this.readOnly)return;let{key:t}=e;switch(t){case"Tab":this.activeChipIndex=-1,this.activeItemIndex=-1,this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):this.open?(this.open=!1,e.preventDefault()):!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1));break;case"ArrowLeft":(this.activeChipIndex!==-1||this.textInput.value.selectionStart===0)&&(this.previousChip(),e.preventDefault());break;case"ArrowRight":this.activeChipIndex!==-1&&(this.nextChip(),e.preventDefault());break;case"ArrowUp":this.filteredItems.length&&(e.preventDefault(),this.open&&this.shiftActiveItemIndex(-1),this.comboboxInViewport()||this.el.scrollIntoView());break;case"ArrowDown":this.filteredItems.length&&(e.preventDefault(),this.open?this.shiftActiveItemIndex(1):(this.open=!0,this.ensureRecentSelectedItemIsActive()),this.comboboxInViewport()||this.el.scrollIntoView());break;case" ":!this.textInput.value.value&&!e.defaultPrevented&&(this.open||(this.open=!0,this.shiftActiveItemIndex(1)),e.preventDefault());break;case"Home":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(0),this.scrollToActiveItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"End":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(this.filteredItems.length-1),this.scrollToActiveItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"Escape":!this.clearDisabled&&!this.open&&this.clearValue(),this.open=!1,e.preventDefault();break;case"Enter":if(this.open&&this.activeItemIndex>-1){let i=this.filteredItems[this.activeItemIndex];this.toggleSelection(i,!i.selected),e.preventDefault()}else this.activeChipIndex>-1?(this.removeActiveChip(),e.preventDefault()):this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):e.defaultPrevented||le(this)&&e.preventDefault();break;case"Delete":case"Backspace":{if(this.selectionDisplay==="single"||this.selectionDisplay==="fit"&&this.selectedHiddenChipsCount>0)return;this.activeChipIndex>-1?(e.preventDefault(),this.removeActiveChip()):!this.filterText&&this.isMulti()&&(e.preventDefault(),this.removeLastChip());break}}}onBeforeOpen(){this.scrollToActiveItem(),this.calciteComboboxBeforeOpen.emit()}onOpen(){this.calciteComboboxOpen.emit()}onBeforeClose(){this.calciteComboboxBeforeClose.emit()}onClose(){this.calciteComboboxClose.emit(),ie(this)}async setMaxScrollerHeight(){let{listContainerEl:e,open:t,referenceEl:i}=this;if(!e||!t)return;await this.reposition(!0);let s=this.getMaxScrollerHeight();e.style.maxHeight=s>0?`${s}px`:"",e.style.minWidth=`${i.clientWidth}px`,await this.reposition(!0)}calciteChipCloseHandler(e){this.open=!1;let t=this.items.find(i=>i===e);t&&this.toggleSelection(t,!1),this.calciteComboboxChipClose.emit()}clickHandler(e){if(this.readOnly)return;let t=e.composedPath();if(t.some(i=>i.tagName==="CALCITE-CHIP")){this.open=!1,e.preventDefault();return}if(t.some(i=>i.classList?.contains(ye.button))){this.clearValue(),e.preventDefault();return}this.open=!this.open,this.ensureRecentSelectedItemIsActive()}ensureRecentSelectedItemIsActive(){let{selectedItems:e}=this,t=e.length===0?0:this.items.indexOf(e[e.length-1]);this.updateActiveItemIndex(t)}hideChip(e){e.classList.add(d.chipInvisible)}showChip(e){e.classList.remove(d.chipInvisible)}refreshChipDisplay({chipEls:e,availableHorizontalChipElSpace:t,chipContainerElGap:i}){e.forEach(s=>{if(!s.selected)this.hideChip(s);else{let l=I(s);if(l&&l<t){t-=l+i,this.showChip(s);return}}this.hideChip(s)})}async refreshSelectionDisplay(){if(await N(this),v(this.selectionMode)||!this.textInput.value)return;let{allSelectedIndicatorChipEl:e,chipContainerEl:t,selectionDisplay:i,placeholder:s,selectedIndicatorChipEl:l,textInput:{value:a}}=this,o=parseInt(getComputedStyle(t).gap.replace("px","")),n=I(t),{fontSize:c,fontFamily:p}=getComputedStyle(a),x=(_(s,`${c} ${p}`)||parseInt(pe))+o,f=I(e),y=I(l),we=Math.max(f,y);if(this.setCompactSelectionDisplay({chipContainerElGap:o,chipContainerElWidth:n,inputWidth:x,largestSelectedIndicatorChipWidth:we}),i==="fit"){let V=Array.from(this.el.shadowRoot.querySelectorAll("calcite-chip")).filter(Ee=>Ee.closable),Se=Math.round(n-((this.selectedHiddenChipsCount>0?y:0)+o+x+o));this.refreshChipDisplay({availableHorizontalChipElSpace:Se,chipContainerElGap:o,chipEls:V}),this.setVisibleAndHiddenChips(V)}}setFloatingEl(e){this.floatingEl=e,C(this)}setCompactSelectionDisplay({chipContainerElGap:e,chipContainerElWidth:t,inputWidth:i,largestSelectedIndicatorChipWidth:s}){let l=Math.round(s+e+i);(!this.maxCompactBreakpoint||this.maxCompactBreakpoint<l)&&(this.maxCompactBreakpoint=l),this.compactSelectionDisplay=t<this.maxCompactBreakpoint}setContainerEl(e){e&&this.resizeObserver?.observe(e),this.listContainerEl=e,this.transitionEl=e}setChipContainerEl(e){e&&this.resizeObserver?.observe(e),this.chipContainerEl=e}setReferenceEl(e){this.referenceEl=e,C(this)}setAllSelectedIndicatorChipEl(e){this.allSelectedIndicatorChipEl=e}setSelectedIndicatorChipEl(e){this.selectedIndicatorChipEl=e}setVisibleAndHiddenChips(e){let t=0;e.forEach(s=>{s.selected&&!s.classList.contains(d.chipInvisible)&&t++}),t!==this.selectedVisibleChipsCount&&(this.selectedVisibleChipsCount=t);let i=this.getSelectedItems().length-t;i!==this.selectedHiddenChipsCount&&(this.selectedHiddenChipsCount=i)}getMaxScrollerHeight(){let e=this.getItemsAndGroups().filter(l=>!l.hidden),{maxItems:t}=this,i=0,s=0;return e.length>t&&e.forEach(l=>{if(i<t){let a=this.calculateScrollerHeight(l);a>0&&(s+=a,i++)}}),s}calculateScrollerHeight(e){if(!e)return;let t=e.getBoundingClientRect().height,i=Array.from(e.querySelectorAll(fe)).reduce((s,l)=>s+l.getBoundingClientRect().height,0);return t-i}inputHandler(e){let t=e.target.value;this.filterText=t}getItemsAndGroups(){return[...this.groupItems,...this.items]}toggleSelection(e,t){!e||this.selectionMode==="single-persist"&&e.selected&&e.value===this.value&&!t||(this.isMulti()?(e.selected=t,this.updateAncestors(e),this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.resetText(),this.filterItems("")):(this.ignoreSelectedEventsFlag=!0,this.items.forEach(i=>i.selected=i===e?t:!1),this.ignoreSelectedEventsFlag=!1,this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.textInput.value&&(this.textInput.value.value=$(e)),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")))}updateAncestors(e){if(this.selectionMode!=="ancestors")return;let t=H(e),i=ve(e);e.selected?t.forEach(s=>{s.selected=!0}):(i.forEach(s=>s.selected=!1),[...t].forEach(s=>{T(s)||(s.selected=!1)}))}getFilteredItems(){return this.filterText===""?this.items:this.items.filter(e=>!e.hidden)}updateItems(){this.items=this.getItems(),this.groupItems=this.getGroupItems(),this.data=this.getData(),this.groupData=this.getGroupData(),this.selectedItems=this.getSelectedItems(),this.filteredItems=this.getFilteredItems(),this.needsIcon=this.getNeedsIcon(),this.items.forEach(e=>{e.selectionMode=this.selectionMode,e.scale=this.scale}),this.allowCustomValues||this.setMaxScrollerHeight(),this.groupItems.forEach((e,t,i)=>{t===0&&(e.afterEmptyGroup=!1);let s=i[t+1];s&&(s.afterEmptyGroup=e.children.length===0)})}getData(){return this.items.map(e=>({description:e.description,filterDisabled:e.filterDisabled,label:e.heading||e.textLabel,metadata:e.metadata,shortHeading:e.shortHeading,el:e}))}getGroupData(){return this.groupItems.map(e=>({label:e.label,el:e}))}getNeedsIcon(){return v(this.selectionMode)&&this.items.some(e=>e.icon)}resetText(){this.textInput.value&&(this.textInput.value.value=""),this.filterText=""}getItems(){return Array.from(this.el.querySelectorAll(be)).filter(e=>!e.disabled)}getGroupItems(){return Array.from(this.el.querySelectorAll(ge))}addCustomChip(e,t){let i=this.items.find(s=>s.textLabel===e);if(i)this.toggleSelection(i,!0);else{this.isMulti()||this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1);let s=document.createElement("calcite-combobox-item");s.value=e,s.textLabel=e,s.selected=!0,this.el.prepend(s),this.resetText(),t&&this.setFocus(),this.updateItems(),this.filterItems(""),this.open=!0,this.emitComboboxChange()}}removeActiveChip(){this.toggleSelection(this.selectedItems[this.activeChipIndex],!1),this.setFocus()}removeLastChip(){this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1),this.setFocus()}previousChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex;this.activeChipIndex=t===-1?e:Math.max(t-1,0),this.updateActiveItemIndex(-1),this.focusChip()}nextChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex+1;t>e?(this.activeChipIndex=-1,this.setFocus()):(this.activeChipIndex=t,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){let e=this.selectedItems[this.activeChipIndex]?.guid;(e?this.referenceEl.querySelector(`#${Ie}${e}`):null)?.setFocus()}scrollToActiveItem(){let e=this.filteredItems[this.activeItemIndex];if(!e)return;let t=this.calculateScrollerHeight(e),{offsetHeight:i,scrollTop:s}=this.listContainerEl;i+s<e.offsetTop+t?this.listContainerEl.scrollTop=e.offsetTop-i+t:e.offsetTop<s&&(this.listContainerEl.scrollTop=e.offsetTop)}shiftActiveItemIndex(e){let{length:t}=this.filteredItems,i=(this.activeItemIndex+t+e)%t;this.updateActiveItemIndex(i),this.scrollToActiveItem()}updateActiveItemIndex(e){this.activeItemIndex=e;let t=null;this.filteredItems.forEach((i,s)=>{s===e?(i.active=!0,t=`${xe}${i.guid}`):i.active=!1}),this.activeDescendant=t,this.activeItemIndex>-1&&(this.activeChipIndex=-1)}isAllSelected(){return this.getItems().length===this.getSelectedItems().length}isMulti(){return!v(this.selectionMode)}comboboxFocusHandler(){this.disabled||this.textInput.value?.focus()}renderChips(){let{activeChipIndex:e,readOnly:t,scale:i,selectionMode:s,messages:l}=this;return this.selectedItems.map((a,o)=>{let n={chip:!0,"chip--active":e===o},c=[...H(a)].reverse(),p=$(a),x=[...c,a].map(y=>$(y)),f=s!=="ancestors"?p:x.join(" / ");return u(p,r`<calcite-chip .appearance=${t?"outline":"solid"} class=${h(n)} .closable=${!t} data-test-id=${`chip-${o}`} .icon=${a.icon} .iconFlipRtl=${a.iconFlipRtl} id=${(a.guid?`${Ie}${a.guid}`:null)??m} .label=${f} .messageOverrides=${{dismissLabel:l.removeTag}} @focusin=${()=>this.activeChipIndex=o} @calciteChipClose=${()=>this.calciteChipCloseHandler(a)} .scale=${i} .selected=${a.selected} .tabIndex=${e===o?0:-1} title=${f??m} .value=${a.value}>${f}</calcite-chip>`)})}renderAllSelectedIndicatorChip(){let{compactSelectionDisplay:e,scale:t,selectedVisibleChipsCount:i,setAllSelectedIndicatorChipEl:s}=this,l=this.messages.allSelected;return r`<calcite-chip class=${h({chip:!0,[d.chipInvisible]:!(this.isAllSelected()&&!i&&!e)})} .label=${l} .scale=${t} title=${l??m} value ${g(s)}>${l}</calcite-chip>`}renderAllSelectedIndicatorChipCompact(){let{compactSelectionDisplay:e,scale:t,selectedVisibleChipsCount:i}=this,s=this.messages.all||"All";return r`<calcite-chip class=${h({chip:!0,[d.chipInvisible]:!(this.isAllSelected()&&!i&&e)})} .label=${s} .scale=${t} title=${s??m} value>${s}</calcite-chip>`}renderSelectedIndicatorChip(){let{compactSelectionDisplay:e,selectionDisplay:t,getSelectedItems:i,scale:s,selectedHiddenChipsCount:l,selectedVisibleChipsCount:a,setSelectedIndicatorChipEl:o}=this,n,c;if(e)n=!0;else if(t==="single"){let p=i().length;this.isAllSelected()?n=!0:p>0?n=!1:n=!0,c=`${p} ${this.messages.selected}`}else t==="fit"&&(n=!!(this.isAllSelected()&&a===0||l===0),c=a>0?`+${l}`:`${l} ${this.messages.selected}`);return r`<calcite-chip class=${h({chip:!0,[d.chipInvisible]:n})} .label=${c} .scale=${s} title=${c??m} value ${g(o)}>${c}</calcite-chip>`}renderSelectedIndicatorChipCompact(){let{compactSelectionDisplay:e,selectionDisplay:t,getSelectedItems:i,scale:s,selectedHiddenChipsCount:l}=this,a,o;if(e){let n=i().length;this.isAllSelected()?a=!0:t==="fit"?(a=!(l>0),o=`${l||0}`):t==="single"&&(a=!(n>0),o=`${n}`)}else a=!0;return r`<calcite-chip class=${h({chip:!0,[d.chipInvisible]:a})} .label=${o} .scale=${s} title=${o??m} value>${o}</calcite-chip>`}renderInput(){let{guid:e,disabled:t,placeholder:i,selectionMode:s,selectedItems:l,open:a}=this,o=v(s),n=l[0],c=!a&&o&&!!n&&!this.filterText;return r`<span class=${h({"input-wrap":!0,"input-wrap--single":o})}>${c&&u("label",r`<span class=${h({label:!0,"label--icon":!!n?.icon})}>${$(n)}</span>`)||""}${u("input",r`<input aria-activedescendant=${this.activeDescendant??m} aria-controls=${`${F}${e}`} aria-errormessage=${D.validationMessage} aria-owns=${`${F}${e}`} aria-autocomplete=list .ariaExpanded=${a} aria-haspopup=listbox .ariaInvalid=${this.status==="invalid"} .ariaLabel=${de(this)} class=${h({[d.input]:!0,"input--single":!0,[d.inputHidden]:c,"input--icon":this.showingInlineIcon&&!!this.placeholderIcon})} data-test-id=input .disabled=${t} .id=${`${$e}${e}`} @focus=${this.comboboxFocusHandler} @input=${this.inputHandler} placeholder=${i??m} .readOnly=${this.readOnly} role=combobox .tabIndex=${this.activeChipIndex===-1?0:-1} type=text .value=${P(this.filterText??"")} ${g(this.textInput)}>`)}</span>`}renderListBoxOptions(){return this.filteredItems.map(e=>r`<li .ariaSelected=${e.selected} id=${(e.guid?`${xe}${e.guid}`:null)??m} role=option tabindex=-1>${e.textLabel}</li>`)}renderFloatingUIContainer(){let{setFloatingEl:e,setContainerEl:t,open:i}=this,s={[d.listContainer]:!0,[A.animation]:!0,[A.animationActive]:i};return r`<div aria-hidden=true class=${h(d.floatingUIContainer)} ${g(e)}><div class=${h(s)} ${g(t)}><ul class=${h({list:!0,"list--hide":!i})}><slot></slot></ul></div></div>`}renderSelectedOrPlaceholderIcon(){let{open:e,placeholderIcon:t,placeholderIconFlipRtl:i,selectedItems:s}=this,l=s[0],a=l?.icon,o=t&&(e||!l);return this.showingInlineIcon&&u("selected-placeholder-icon",r`<span class="icon-start"><calcite-icon class=${h({[d.selectedIcon]:!o,[d.placeholderIcon]:o})} .flipRtl=${o?i:l.iconFlipRtl} .icon=${o?t:a} .scale=${w(this.scale)}></calcite-icon></span>`)||""}renderChevronIcon(){let{open:e}=this;return u("chevron",r`<span class="icon-end"><calcite-icon class=${h(d.icon)} .icon=${e?"chevron-up":"chevron-down"} .scale=${w(this.scale)}></calcite-icon></span>`)}render(){let{selectionDisplay:e,guid:t,label:i,open:s,readOnly:l}=this,a=v(this.selectionMode),o=e==="all",n=e==="single",c=!a&&e==="fit",p=!this.clearDisabled&&this.value?.length>0;return Q({disabled:this.disabled,children:r`<div aria-live=polite class=${h({wrapper:!0,"wrapper--single":a||!this.selectedItems.length,"wrapper--active":s})} @click=${this.clickHandler} @keydown=${this.keyDownHandler} ${g(this.setReferenceEl)}>${this.renderSelectedOrPlaceholderIcon()}${u("grid",r`<div class=${h({"grid-input":!0,[d.selectionDisplayFit]:c,[d.selectionDisplaySingle]:n})} ${g(this.setChipContainerEl)}>${!a&&!n&&this.renderChips()||""}${!a&&!o&&[this.renderSelectedIndicatorChip(),this.renderSelectedIndicatorChipCompact(),this.renderAllSelectedIndicatorChip(),this.renderAllSelectedIndicatorChipCompact()]||""}<label class="screen-readers-only" .htmlFor=${`${$e}${t}`} .id=${`${Ce}${t}`}>${i}</label>${this.renderInput()}</div>`)}${!l&&p?u("close-button",ke({disabled:this.disabled,label:this.messages.clear,scale:this.scale})):null}${!l&&this.renderChevronIcon()||""}</div><ul aria-labelledby=${`${Ce}${t}`} aria-multiselectable=true class="screen-readers-only" .id=${`${F}${t}`} role=listbox tabindex=-1>${this.renderListBoxOptions()}</ul>${this.renderFloatingUIContainer()}${ce({component:this})}${this.validationMessage&&this.status==="invalid"?ue({icon:this.validationIcon,id:D.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}};U("calcite-combobox",M);export{M as Combobox};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
4
|
-
* v3.0.0-next.
|
|
4
|
+
* v3.0.0-next.30
|
|
5
5
|
*/
|
|
6
6
|
function ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,o)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ue(Object(n),!0).forEach(function(o){Xe(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ue(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Pt(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Pt=function(t){return typeof t}:Pt=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pt(e)}function Xe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $(){return $=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},$.apply(this,arguments)}function Ye(e,t){if(e==null)return{};var n={},o=Object.keys(e),i,r;for(r=0;r<o.length;r++)i=o[r],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Be(e,t){if(e==null)return{};var n=Ye(e,t),o,i;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}var Ge="1.15.3";function U(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var q=U(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),It=U(/Edge/i),ce=U(/firefox/i),yt=U(/safari/i)&&!U(/chrome/i)&&!U(/android/i),be=U(/iP(ad|od|hone)/i),Ee=U(/chrome/i)&&U(/android/i),we={capture:!1,passive:!1};function E(e,t,n){e.addEventListener(t,n,!q&&we)}function b(e,t,n){e.removeEventListener(t,n,!q&&we)}function Yt(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function ye(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function H(e,t,n,o){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&Yt(e,t):Yt(e,t))||o&&e===n)return e;if(e===n)break}while(e=ye(e))}return null}var fe=/\s+/g;function R(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(fe," ").replace(" "+t+" "," ");e.className=(o+(n?" "+t:"")).replace(fe," ")}}function h(e,t,n){var o=e&&e.style;if(o){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in o)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),o[t]=n+(typeof n=="string"?"":"px")}}function ft(e,t){var n="";if(typeof e=="string")n=e;else do{var o=h(e,"transform");o&&o!=="none"&&(n=o+" "+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function Se(e,t,n){if(e){var o=e.getElementsByTagName(t),i=0,r=o.length;if(n)for(;i<r;i++)n(o[i],i);return o}return[]}function K(){var e=document.scrollingElement;return e||document.documentElement}function I(e,t,n,o,i){if(!(!e.getBoundingClientRect&&e!==window)){var r,a,l,s,u,d,f;if(e!==window&&e.parentNode&&e!==K()?(r=e.getBoundingClientRect(),a=r.top,l=r.left,s=r.bottom,u=r.right,d=r.height,f=r.width):(a=0,l=0,s=window.innerHeight,u=window.innerWidth,d=window.innerHeight,f=window.innerWidth),(t||n)&&e!==window&&(i=i||e.parentNode,!q))do if(i&&i.getBoundingClientRect&&(h(i,"transform")!=="none"||n&&h(i,"position")!=="static")){var m=i.getBoundingClientRect();a-=m.top+parseInt(h(i,"border-top-width")),l-=m.left+parseInt(h(i,"border-left-width")),s=a+r.height,u=l+r.width;break}while(i=i.parentNode);if(o&&e!==window){var y=ft(i||e),v=y&&y.a,w=y&&y.d;y&&(a/=w,l/=v,f/=v,d/=w,s=a+d,u=l+f)}return{top:a,left:l,bottom:s,right:u,width:f,height:d}}}function de(e,t,n){for(var o=tt(e,!0),i=I(e)[t];o;){var r=I(o)[n],a=void 0;if(n==="top"||n==="left"?a=i>=r:a=i<=r,!a)return o;if(o===K())break;o=tt(o,!1)}return!1}function dt(e,t,n,o){for(var i=0,r=0,a=e.children;r<a.length;){if(a[r].style.display!=="none"&&a[r]!==p.ghost&&(o||a[r]!==p.dragged)&&H(a[r],n.draggable,e,!1)){if(i===t)return a[r];i++}r++}return null}function ie(e,t){for(var n=e.lastElementChild;n&&(n===p.ghost||h(n,"display")==="none"||t&&!Yt(n,t));)n=n.previousElementSibling;return n||null}function X(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==p.clone&&(!t||Yt(e,t))&&n++;return n}function he(e){var t=0,n=0,o=K();if(e)do{var i=ft(e),r=i.a,a=i.d;t+=e.scrollLeft*r,n+=e.scrollTop*a}while(e!==o&&(e=e.parentNode));return[t,n]}function He(e,t){for(var n in e)if(e.hasOwnProperty(n)){for(var o in t)if(t.hasOwnProperty(o)&&t[o]===e[n][o])return Number(n)}return-1}function tt(e,t){if(!e||!e.getBoundingClientRect)return K();var n=e,o=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=h(n);if(n.clientWidth<n.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return K();if(o||t)return n;o=!0}}while(n=n.parentNode);return K()}function We(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function jt(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var St;function De(e,t){return function(){if(!St){var n=arguments,o=this;n.length===1?e.call(o,n[0]):e.apply(o,n),St=setTimeout(function(){St=void 0},t)}}}function Ke(){clearTimeout(St),St=void 0}function _e(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function Ce(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function Ie(e,t,n){var o={};return Array.from(e.children).forEach(function(i){var r,a,l,s;if(!(!H(i,t.draggable,e,!1)||i.animated||i===n)){var u=I(i);o.left=Math.min((r=o.left)!==null&&r!==void 0?r:1/0,u.left),o.top=Math.min((a=o.top)!==null&&a!==void 0?a:1/0,u.top),o.right=Math.max((l=o.right)!==null&&l!==void 0?l:-1/0,u.right),o.bottom=Math.max((s=o.bottom)!==null&&s!==void 0?s:-1/0,u.bottom)}}),o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}var M="Sortable"+new Date().getTime();function Le(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var o=[].slice.call(this.el.children);o.forEach(function(i){if(!(h(i,"display")==="none"||i===p.ghost)){e.push({target:i,rect:I(i)});var r=L({},e[e.length-1].rect);if(i.thisAnimationDuration){var a=ft(i,!0);a&&(r.top-=a.f,r.left-=a.e)}i.fromRect=r}})}},addAnimationState:function(o){e.push(o)},removeAnimationState:function(o){e.splice(He(e,{target:o}),1)},animateAll:function(o){var i=this;if(!this.options.animation){clearTimeout(t),typeof o=="function"&&o();return}var r=!1,a=0;e.forEach(function(l){var s=0,u=l.target,d=u.fromRect,f=I(u),m=u.prevFromRect,y=u.prevToRect,v=l.rect,w=ft(u,!0);w&&(f.top-=w.f,f.left-=w.e),u.toRect=f,u.thisAnimationDuration&&jt(m,f)&&!jt(d,f)&&(v.top-f.top)/(v.left-f.left)===(d.top-f.top)/(d.left-f.left)&&(s=ze(v,m,y,i.options)),jt(f,d)||(u.prevFromRect=d,u.prevToRect=f,s||(s=i.options.animation),i.animate(u,v,f,s)),s&&(r=!0,a=Math.max(a,s),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},s),u.thisAnimationDuration=s)}),clearTimeout(t),r?t=setTimeout(function(){typeof o=="function"&&o()},a):typeof o=="function"&&o(),e=[]},animate:function(o,i,r,a){if(a){h(o,"transition",""),h(o,"transform","");var l=ft(this.el),s=l&&l.a,u=l&&l.d,d=(i.left-r.left)/(s||1),f=(i.top-r.top)/(u||1);o.animatingX=!!d,o.animatingY=!!f,h(o,"transform","translate3d("+d+"px,"+f+"px,0)"),this.forRepaintDummy=je(o),h(o,"transition","transform "+a+"ms"+(this.options.easing?" "+this.options.easing:"")),h(o,"transform","translate3d(0,0,0)"),typeof o.animated=="number"&&clearTimeout(o.animated),o.animated=setTimeout(function(){h(o,"transition",""),h(o,"transform",""),o.animated=!1,o.animatingX=!1,o.animatingY=!1},a)}}}}function je(e){return e.offsetWidth}function ze(e,t,n,o){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*o.animation}var lt=[],zt={initializeByDefault:!0},Ot={mount:function(t){for(var n in zt)zt.hasOwnProperty(n)&&!(n in t)&&(t[n]=zt[n]);lt.forEach(function(o){if(o.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),lt.push(t)},pluginEvent:function(t,n,o){var i=this;this.eventCanceled=!1,o.cancel=function(){i.eventCanceled=!0};var r=t+"Global";lt.forEach(function(a){n[a.pluginName]&&(n[a.pluginName][r]&&n[a.pluginName][r](L({sortable:n},o)),n.options[a.pluginName]&&n[a.pluginName][t]&&n[a.pluginName][t](L({sortable:n},o)))})},initializePlugins:function(t,n,o,i){lt.forEach(function(l){var s=l.pluginName;if(!(!t.options[s]&&!l.initializeByDefault)){var u=new l(t,n,t.options);u.sortable=t,u.options=t.options,t[s]=u,$(o,u.defaults)}});for(var r in t.options)if(t.options.hasOwnProperty(r)){var a=this.modifyOption(t,r,t.options[r]);typeof a<"u"&&(t.options[r]=a)}},getEventProperties:function(t,n){var o={};return lt.forEach(function(i){typeof i.eventProperties=="function"&&$(o,i.eventProperties.call(n[i.pluginName],t))}),o},modifyOption:function(t,n,o){var i;return lt.forEach(function(r){t[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[n]=="function"&&(i=r.optionListeners[n].call(t[r.pluginName],o))}),i}};function Ue(e){var t=e.sortable,n=e.rootEl,o=e.name,i=e.targetEl,r=e.cloneEl,a=e.toEl,l=e.fromEl,s=e.oldIndex,u=e.newIndex,d=e.oldDraggableIndex,f=e.newDraggableIndex,m=e.originalEvent,y=e.putSortable,v=e.extraEventProperties;if(t=t||n&&n[M],!!t){var w,Y=t.options,j="on"+o.charAt(0).toUpperCase()+o.substr(1);window.CustomEvent&&!q&&!It?w=new CustomEvent(o,{bubbles:!0,cancelable:!0}):(w=document.createEvent("Event"),w.initEvent(o,!0,!0)),w.to=a||n,w.from=l||n,w.item=i||n,w.clone=r,w.oldIndex=s,w.newIndex=u,w.oldDraggableIndex=d,w.newDraggableIndex=f,w.originalEvent=m,w.pullMode=y?y.lastPutMode:void 0;var A=L(L({},v),Ot.getEventProperties(o,t));for(var B in A)w[B]=A[B];n&&n.dispatchEvent(w),Y[j]&&Y[j].call(t,w)}}var $e=["evt"],N=function(t,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.evt,r=Be(o,$e);Ot.pluginEvent.bind(p)(t,n,L({dragEl:c,parentEl:_,ghostEl:g,rootEl:S,nextEl:at,lastDownEl:Ft,cloneEl:D,cloneHidden:J,dragStarted:bt,putSortable:O,activeSortable:p.active,originalEvent:i,oldIndex:ct,oldDraggableIndex:Dt,newIndex:k,newDraggableIndex:Q,hideGhostForTarget:xe,unhideGhostForTarget:Ne,cloneNowHidden:function(){J=!0},cloneNowShown:function(){J=!1},dispatchSortableEvent:function(l){x({sortable:n,name:l,originalEvent:i})}},r))};function x(e){Ue(L({putSortable:O,cloneEl:D,targetEl:c,rootEl:S,oldIndex:ct,oldDraggableIndex:Dt,newIndex:k,newDraggableIndex:Q},e))}var c,_,g,S,at,Ft,D,J,ct,k,Dt,Q,At,O,ut=!1,Bt=!1,Gt=[],it,G,Ut,$t,pe,ge,bt,st,_t,Ct=!1,xt=!1,Rt,T,qt=[],te=!1,Ht=[],Kt=typeof document<"u",Nt=be,me=It||q?"cssFloat":"float",qe=Kt&&!Ee&&!be&&"draggable"in document.createElement("div"),Oe=function(){if(Kt){if(q)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),Te=function(t,n){var o=h(t),i=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),r=dt(t,0,n),a=dt(t,1,n),l=r&&h(r),s=a&&h(a),u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+I(r).width,d=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+I(a).width;if(o.display==="flex")return o.flexDirection==="column"||o.flexDirection==="column-reverse"?"vertical":"horizontal";if(o.display==="grid")return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&l.float&&l.float!=="none"){var f=l.float==="left"?"left":"right";return a&&(s.clear==="both"||s.clear===f)?"vertical":"horizontal"}return r&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||u>=i&&o[me]==="none"||a&&o[me]==="none"&&u+d>i)?"vertical":"horizontal"},Ve=function(t,n,o){var i=o?t.left:t.top,r=o?t.right:t.bottom,a=o?t.width:t.height,l=o?n.left:n.top,s=o?n.right:n.bottom,u=o?n.width:n.height;return i===l||r===s||i+a/2===l+u/2},Ze=function(t,n){var o;return Gt.some(function(i){var r=i[M].options.emptyInsertThreshold;if(!(!r||ie(i))){var a=I(i),l=t>=a.left-r&&t<=a.right+r,s=n>=a.top-r&&n<=a.bottom+r;if(l&&s)return o=i}}),o},Ae=function(t){function n(r,a){return function(l,s,u,d){var f=l.options.group.name&&s.options.group.name&&l.options.group.name===s.options.group.name;if(r==null&&(a||f))return!0;if(r==null||r===!1)return!1;if(a&&r==="clone")return r;if(typeof r=="function")return n(r(l,s,u,d),a)(l,s,u,d);var m=(a?l:s).options.group.name;return r===!0||typeof r=="string"&&r===m||r.join&&r.indexOf(m)>-1}}var o={},i=t.group;(!i||Pt(i)!="object")&&(i={name:i}),o.name=i.name,o.checkPull=n(i.pull,!0),o.checkPut=n(i.put),o.revertClone=i.revertClone,t.group=o},xe=function(){!Oe&&g&&h(g,"display","none")},Ne=function(){!Oe&&g&&h(g,"display","")};Kt&&!Ee&&document.addEventListener("click",function(e){if(Bt)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Bt=!1,!1},!0);var rt=function(t){if(c){t=t.touches?t.touches[0]:t;var n=Ze(t.clientX,t.clientY);if(n){var o={};for(var i in t)t.hasOwnProperty(i)&&(o[i]=t[i]);o.target=o.rootEl=n,o.preventDefault=void 0,o.stopPropagation=void 0,n[M]._onDragOver(o)}}},Qe=function(t){c&&c.parentNode[M]._isOutsideThisEl(t.target)};function p(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=$({},t),e[M]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Te(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(a,l){a.setData("Text",l.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:p.supportPointer!==!1&&"PointerEvent"in window&&!yt,emptyInsertThreshold:5};Ot.initializePlugins(this,e,n);for(var o in n)!(o in t)&&(t[o]=n[o]);Ae(t);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=t.forceFallback?!1:qe,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?E(e,"pointerdown",this._onTapStart):(E(e,"mousedown",this._onTapStart),E(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(E(e,"dragover",this),E(e,"dragenter",this)),Gt.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),$(this,Le())}p.prototype={constructor:p,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(st=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,c):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,o=this.el,i=this.options,r=i.preventOnFilter,a=t.type,l=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,s=(l||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,d=i.filter;if(ln(o),!c&&!(/mousedown|pointerdown/.test(a)&&t.button!==0||i.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&yt&&s&&s.tagName.toUpperCase()==="SELECT")&&(s=H(s,i.draggable,o,!1),!(s&&s.animated)&&Ft!==s)){if(ct=X(s),Dt=X(s,i.draggable),typeof d=="function"){if(d.call(this,t,s,this)){x({sortable:n,rootEl:u,name:"filter",targetEl:s,toEl:o,fromEl:o}),N("filter",n,{evt:t}),r&&t.cancelable&&t.preventDefault();return}}else if(d&&(d=d.split(",").some(function(f){if(f=H(u,f.trim(),o,!1),f)return x({sortable:n,rootEl:f,name:"filter",targetEl:s,fromEl:o,toEl:o}),N("filter",n,{evt:t}),!0}),d)){r&&t.cancelable&&t.preventDefault();return}i.handle&&!H(u,i.handle,o,!1)||this._prepareDragStart(t,l,s)}}},_prepareDragStart:function(t,n,o){var i=this,r=i.el,a=i.options,l=r.ownerDocument,s;if(o&&!c&&o.parentNode===r){var u=I(o);if(S=r,c=o,_=c.parentNode,at=c.nextSibling,Ft=o,At=a.group,p.dragged=c,it={target:c,clientX:(n||t).clientX,clientY:(n||t).clientY},pe=it.clientX-u.left,ge=it.clientY-u.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,c.style["will-change"]="all",s=function(){if(N("delayEnded",i,{evt:t}),p.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!ce&&i.nativeDraggable&&(c.draggable=!0),i._triggerDragStart(t,n),x({sortable:i,name:"choose",originalEvent:t}),R(c,a.chosenClass,!0)},a.ignore.split(",").forEach(function(d){Se(c,d.trim(),Vt)}),E(l,"dragover",rt),E(l,"mousemove",rt),E(l,"touchmove",rt),E(l,"mouseup",i._onDrop),E(l,"touchend",i._onDrop),E(l,"touchcancel",i._onDrop),ce&&this.nativeDraggable&&(this.options.touchStartThreshold=4,c.draggable=!0),N("delayStart",this,{evt:t}),a.delay&&(!a.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(It||q))){if(p.eventCanceled){this._onDrop();return}E(l,"mouseup",i._disableDelayedDrag),E(l,"touchend",i._disableDelayedDrag),E(l,"touchcancel",i._disableDelayedDrag),E(l,"mousemove",i._delayedDragTouchMoveHandler),E(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&E(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(s,a.delay)}else s()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){c&&Vt(c),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;b(t,"mouseup",this._disableDelayedDrag),b(t,"touchend",this._disableDelayedDrag),b(t,"touchcancel",this._disableDelayedDrag),b(t,"mousemove",this._delayedDragTouchMoveHandler),b(t,"touchmove",this._delayedDragTouchMoveHandler),b(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?E(document,"pointermove",this._onTouchMove):n?E(document,"touchmove",this._onTouchMove):E(document,"mousemove",this._onTouchMove):(E(c,"dragend",this),E(S,"dragstart",this._onDragStart));try{document.selection?kt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(ut=!1,S&&c){N("dragStarted",this,{evt:n}),this.nativeDraggable&&E(document,"dragover",Qe);var o=this.options;!t&&R(c,o.dragClass,!1),R(c,o.ghostClass,!0),p.active=this,t&&this._appendGhost(),x({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(G){this._lastX=G.clientX,this._lastY=G.clientY,xe();for(var t=document.elementFromPoint(G.clientX,G.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(G.clientX,G.clientY),t!==n);)n=t;if(c.parentNode[M]._isOutsideThisEl(t),n)do{if(n[M]){var o=void 0;if(o=n[M]._onDragOver({clientX:G.clientX,clientY:G.clientY,target:t,rootEl:n}),o&&!this.options.dragoverBubble)break}t=n}while(n=ye(n));Ne()}},_onTouchMove:function(t){if(it){var n=this.options,o=n.fallbackTolerance,i=n.fallbackOffset,r=t.touches?t.touches[0]:t,a=g&&ft(g,!0),l=g&&a&&a.a,s=g&&a&&a.d,u=Nt&&T&&he(T),d=(r.clientX-it.clientX+i.x)/(l||1)+(u?u[0]-qt[0]:0)/(l||1),f=(r.clientY-it.clientY+i.y)/(s||1)+(u?u[1]-qt[1]:0)/(s||1);if(!p.active&&!ut){if(o&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<o)return;this._onDragStart(t,!0)}if(g){a?(a.e+=d-(Ut||0),a.f+=f-($t||0)):a={a:1,b:0,c:0,d:1,e:d,f};var m="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");h(g,"webkitTransform",m),h(g,"mozTransform",m),h(g,"msTransform",m),h(g,"transform",m),Ut=d,$t=f,G=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!g){var t=this.options.fallbackOnBody?document.body:S,n=I(c,!0,Nt,!0,t),o=this.options;if(Nt){for(T=t;h(T,"position")==="static"&&h(T,"transform")==="none"&&T!==document;)T=T.parentNode;T!==document.body&&T!==document.documentElement?(T===document&&(T=K()),n.top+=T.scrollTop,n.left+=T.scrollLeft):T=K(),qt=he(T)}g=c.cloneNode(!0),R(g,o.ghostClass,!1),R(g,o.fallbackClass,!0),R(g,o.dragClass,!0),h(g,"transition",""),h(g,"transform",""),h(g,"box-sizing","border-box"),h(g,"margin",0),h(g,"top",n.top),h(g,"left",n.left),h(g,"width",n.width),h(g,"height",n.height),h(g,"opacity","0.8"),h(g,"position",Nt?"absolute":"fixed"),h(g,"zIndex","100000"),h(g,"pointerEvents","none"),p.ghost=g,t.appendChild(g),h(g,"transform-origin",pe/parseInt(g.style.width)*100+"% "+ge/parseInt(g.style.height)*100+"%")}},_onDragStart:function(t,n){var o=this,i=t.dataTransfer,r=o.options;if(N("dragStart",this,{evt:t}),p.eventCanceled){this._onDrop();return}N("setupClone",this),p.eventCanceled||(D=Ce(c),D.removeAttribute("id"),D.draggable=!1,D.style["will-change"]="",this._hideClone(),R(D,this.options.chosenClass,!1),p.clone=D),o.cloneId=kt(function(){N("clone",o),!p.eventCanceled&&(o.options.removeCloneOnHide||S.insertBefore(D,c),o._hideClone(),x({sortable:o,name:"clone"}))}),!n&&R(c,r.dragClass,!0),n?(Bt=!0,o._loopId=setInterval(o._emulateDragOver,50)):(b(document,"mouseup",o._onDrop),b(document,"touchend",o._onDrop),b(document,"touchcancel",o._onDrop),i&&(i.effectAllowed="move",r.setData&&r.setData.call(o,i,c)),E(document,"drop",o),h(c,"transform","translateZ(0)")),ut=!0,o._dragStartId=kt(o._dragStarted.bind(o,n,t)),E(document,"selectstart",o),bt=!0,yt&&h(document.body,"user-select","none")},_onDragOver:function(t){var n=this.el,o=t.target,i,r,a,l=this.options,s=l.group,u=p.active,d=At===s,f=l.sort,m=O||u,y,v=this,w=!1;if(te)return;function Y(vt,Re){N(vt,v,L({evt:t,isOwner:d,axis:y?"vertical":"horizontal",revert:a,dragRect:i,targetRect:r,canSort:f,fromSortable:m,target:o,completed:A,onMove:function(se,ke){return Mt(S,n,c,i,se,I(se),t,ke)},changed:B},Re))}function j(){Y("dragOverAnimationCapture"),v.captureAnimationState(),v!==m&&m.captureAnimationState()}function A(vt){return Y("dragOverCompleted",{insertion:vt}),vt&&(d?u._hideClone():u._showClone(v),v!==m&&(R(c,O?O.options.ghostClass:u.options.ghostClass,!1),R(c,l.ghostClass,!0)),O!==v&&v!==p.active?O=v:v===p.active&&O&&(O=null),m===v&&(v._ignoreWhileAnimating=o),v.animateAll(function(){Y("dragOverAnimationComplete"),v._ignoreWhileAnimating=null}),v!==m&&(m.animateAll(),m._ignoreWhileAnimating=null)),(o===c&&!c.animated||o===n&&!o.animated)&&(st=null),!l.dragoverBubble&&!t.rootEl&&o!==document&&(c.parentNode[M]._isOutsideThisEl(t.target),!vt&&rt(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),w=!0}function B(){k=X(c),Q=X(c,l.draggable),x({sortable:v,name:"change",toEl:n,newIndex:k,newDraggableIndex:Q,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),o=H(o,l.draggable,n,!0),Y("dragOver"),p.eventCanceled)return w;if(c.contains(t.target)||o.animated&&o.animatingX&&o.animatingY||v._ignoreWhileAnimating===o)return A(!1);if(Bt=!1,u&&!l.disabled&&(d?f||(a=_!==S):O===this||(this.lastPutMode=At.checkPull(this,u,c,t))&&s.checkPut(this,u,c,t))){if(y=this._getDirection(t,o)==="vertical",i=I(c),Y("dragOverValid"),p.eventCanceled)return w;if(a)return _=S,j(),this._hideClone(),Y("revert"),p.eventCanceled||(at?S.insertBefore(c,at):S.appendChild(c)),A(!0);var P=ie(n,l.draggable);if(!P||nn(t,y,this)&&!P.animated){if(P===c)return A(!1);if(P&&n===t.target&&(o=P),o&&(r=I(o)),Mt(S,n,c,i,o,r,t,!!o)!==!1)return j(),P&&P.nextSibling?n.insertBefore(c,P.nextSibling):n.appendChild(c),_=n,B(),A(!0)}else if(P&&en(t,y,this)){var et=dt(n,0,l,!0);if(et===c)return A(!1);if(o=et,r=I(o),Mt(S,n,c,i,o,r,t,!1)!==!1)return j(),n.insertBefore(c,et),_=n,B(),A(!0)}else if(o.parentNode===n){r=I(o);var W=0,nt,ht=c.parentNode!==n,F=!Ve(c.animated&&c.toRect||i,o.animated&&o.toRect||r,y),pt=y?"top":"left",V=de(o,"top","top")||de(c,"top","top"),gt=V?V.scrollTop:void 0;st!==o&&(nt=r[pt],Ct=!1,xt=!F&&l.invertSwap||ht),W=on(t,o,r,y,F?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,xt,st===o);var z;if(W!==0){var ot=X(c);do ot-=W,z=_.children[ot];while(z&&(h(z,"display")==="none"||z===g))}if(W===0||z===o)return A(!1);st=o,_t=W;var mt=o.nextElementSibling,Z=!1;Z=W===1;var Tt=Mt(S,n,c,i,o,r,t,Z);if(Tt!==!1)return(Tt===1||Tt===-1)&&(Z=Tt===1),te=!0,setTimeout(tn,30),j(),Z&&!mt?n.appendChild(c):o.parentNode.insertBefore(c,Z?mt:o),V&&_e(V,0,gt-V.scrollTop),_=c.parentNode,nt!==void 0&&!xt&&(Rt=Math.abs(nt-I(o)[pt])),B(),A(!0)}if(n.contains(c))return A(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){b(document,"mousemove",this._onTouchMove),b(document,"touchmove",this._onTouchMove),b(document,"pointermove",this._onTouchMove),b(document,"dragover",rt),b(document,"mousemove",rt),b(document,"touchmove",rt)},_offUpEvents:function(){var t=this.el.ownerDocument;b(t,"mouseup",this._onDrop),b(t,"touchend",this._onDrop),b(t,"pointerup",this._onDrop),b(t,"touchcancel",this._onDrop),b(document,"selectstart",this)},_onDrop:function(t){var n=this.el,o=this.options;if(k=X(c),Q=X(c,o.draggable),N("drop",this,{evt:t}),_=c&&c.parentNode,k=X(c),Q=X(c,o.draggable),p.eventCanceled){this._nulling();return}ut=!1,xt=!1,Ct=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),ee(this.cloneId),ee(this._dragStartId),this.nativeDraggable&&(b(document,"drop",this),b(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),yt&&h(document.body,"user-select",""),h(c,"transform",""),t&&(bt&&(t.cancelable&&t.preventDefault(),!o.dropBubble&&t.stopPropagation()),g&&g.parentNode&&g.parentNode.removeChild(g),(S===_||O&&O.lastPutMode!=="clone")&&D&&D.parentNode&&D.parentNode.removeChild(D),c&&(this.nativeDraggable&&b(c,"dragend",this),Vt(c),c.style["will-change"]="",bt&&!ut&&R(c,O?O.options.ghostClass:this.options.ghostClass,!1),R(c,this.options.chosenClass,!1),x({sortable:this,name:"unchoose",toEl:_,newIndex:null,newDraggableIndex:null,originalEvent:t}),S!==_?(k>=0&&(x({rootEl:_,name:"add",toEl:_,fromEl:S,originalEvent:t}),x({sortable:this,name:"remove",toEl:_,originalEvent:t}),x({rootEl:_,name:"sort",toEl:_,fromEl:S,originalEvent:t}),x({sortable:this,name:"sort",toEl:_,originalEvent:t})),O&&O.save()):k!==ct&&k>=0&&(x({sortable:this,name:"update",toEl:_,originalEvent:t}),x({sortable:this,name:"sort",toEl:_,originalEvent:t})),p.active&&((k==null||k===-1)&&(k=ct,Q=Dt),x({sortable:this,name:"end",toEl:_,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){N("nulling",this),S=c=_=g=at=D=Ft=J=it=G=bt=k=Q=ct=Dt=st=_t=O=At=p.dragged=p.ghost=p.clone=p.active=null,Ht.forEach(function(t){t.checked=!0}),Ht.length=Ut=$t=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":c&&(this._onDragOver(t),Je(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,o=this.el.children,i=0,r=o.length,a=this.options;i<r;i++)n=o[i],H(n,a.draggable,this.el,!1)&&t.push(n.getAttribute(a.dataIdAttr)||an(n));return t},sort:function(t,n){var o={},i=this.el;this.toArray().forEach(function(r,a){var l=i.children[a];H(l,this.options.draggable,i,!1)&&(o[r]=l)},this),n&&this.captureAnimationState(),t.forEach(function(r){o[r]&&(i.removeChild(o[r]),i.appendChild(o[r]))}),n&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,n){return H(t,n||this.options.draggable,this.el,!1)},option:function(t,n){var o=this.options;if(n===void 0)return o[t];var i=Ot.modifyOption(this,t,n);typeof i<"u"?o[t]=i:o[t]=n,t==="group"&&Ae(o)},destroy:function(){N("destroy",this);var t=this.el;t[M]=null,b(t,"mousedown",this._onTapStart),b(t,"touchstart",this._onTapStart),b(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(b(t,"dragover",this),b(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Gt.splice(Gt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!J){if(N("hideClone",this),p.eventCanceled)return;h(D,"display","none"),this.options.removeCloneOnHide&&D.parentNode&&D.parentNode.removeChild(D),J=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(J){if(N("showClone",this),p.eventCanceled)return;c.parentNode==S&&!this.options.group.revertClone?S.insertBefore(D,c):at?S.insertBefore(D,at):S.appendChild(D),this.options.group.revertClone&&this.animate(c,D),h(D,"display",""),J=!1}}};function Je(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function Mt(e,t,n,o,i,r,a,l){var s,u=e[M],d=u.options.onMove,f;return window.CustomEvent&&!q&&!It?s=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(s=document.createEvent("Event"),s.initEvent("move",!0,!0)),s.to=t,s.from=e,s.dragged=n,s.draggedRect=o,s.related=i||t,s.relatedRect=r||I(t),s.willInsertAfter=l,s.originalEvent=a,e.dispatchEvent(s),d&&(f=d.call(u,s,a)),f}function Vt(e){e.draggable=!1}function tn(){te=!1}function en(e,t,n){var o=I(dt(n.el,0,n.options,!0)),i=Ie(n.el,n.options,g),r=10;return t?e.clientX<i.left-r||e.clientY<o.top&&e.clientX<o.right:e.clientY<i.top-r||e.clientY<o.bottom&&e.clientX<o.left}function nn(e,t,n){var o=I(ie(n.el,n.options.draggable)),i=Ie(n.el,n.options,g),r=10;return t?e.clientX>i.right+r||e.clientY>o.bottom&&e.clientX>o.left:e.clientY>i.bottom+r||e.clientX>o.right&&e.clientY>o.top}function on(e,t,n,o,i,r,a,l){var s=o?e.clientY:e.clientX,u=o?n.height:n.width,d=o?n.top:n.left,f=o?n.bottom:n.right,m=!1;if(!a){if(l&&Rt<u*i){if(!Ct&&(_t===1?s>d+u*r/2:s<f-u*r/2)&&(Ct=!0),Ct)m=!0;else if(_t===1?s<d+Rt:s>f-Rt)return-_t}else if(s>d+u*(1-i)/2&&s<f-u*(1-i)/2)return rn(t)}return m=m||a,m&&(s<d+u*r/2||s>f-u*r/2)?s>d+u/2?1:-1:0}function rn(e){return X(c)<X(e)?1:-1}function an(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,o=0;n--;)o+=t.charCodeAt(n);return o.toString(36)}function ln(e){Ht.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var o=t[n];o.checked&&Ht.push(o)}}function kt(e){return setTimeout(e,0)}function ee(e){return clearTimeout(e)}Kt&&E(document,"touchmove",function(e){(p.active||ut)&&e.cancelable&&e.preventDefault()});p.utils={on:E,off:b,css:h,find:Se,is:function(t,n){return!!H(t,n,t,!1)},extend:We,throttle:De,closest:H,toggleClass:R,clone:Ce,index:X,nextTick:kt,cancelNextTick:ee,detectDirection:Te,getChild:dt,expando:M};p.get=function(e){return e[M]};p.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(o){if(!o.prototype||!o.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));o.utils&&(p.utils=L(L({},p.utils),o.utils)),Ot.mount(o)})};p.create=function(e,t){return new p(e,t)};p.version=Ge;var C=[],Et,ne,oe=!1,Zt,Qt,Wt,wt;function sn(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(n){var o=n.originalEvent;this.sortable.nativeDraggable?E(document,"dragover",this._handleAutoScroll):this.options.supportPointer?E(document,"pointermove",this._handleFallbackAutoScroll):o.touches?E(document,"touchmove",this._handleFallbackAutoScroll):E(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var o=n.originalEvent;!this.options.dragOverBubble&&!o.rootEl&&this._handleAutoScroll(o)},drop:function(){this.sortable.nativeDraggable?b(document,"dragover",this._handleAutoScroll):(b(document,"pointermove",this._handleFallbackAutoScroll),b(document,"touchmove",this._handleFallbackAutoScroll),b(document,"mousemove",this._handleFallbackAutoScroll)),ve(),Xt(),Ke()},nulling:function(){Wt=ne=Et=oe=wt=Zt=Qt=null,C.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,o){var i=this,r=(n.touches?n.touches[0]:n).clientX,a=(n.touches?n.touches[0]:n).clientY,l=document.elementFromPoint(r,a);if(Wt=n,o||this.options.forceAutoScrollFallback||It||q||yt){Jt(n,this.options,l,o);var s=tt(l,!0);oe&&(!wt||r!==Zt||a!==Qt)&&(wt&&ve(),wt=setInterval(function(){var u=tt(document.elementFromPoint(r,a),!0);u!==s&&(s=u,Xt()),Jt(n,i.options,u,o)},10),Zt=r,Qt=a)}else{if(!this.options.bubbleScroll||tt(l,!0)===K()){Xt();return}Jt(n,this.options,tt(l,!1),!1)}}},$(e,{pluginName:"scroll",initializeByDefault:!0})}function Xt(){C.forEach(function(e){clearInterval(e.pid)}),C=[]}function ve(){clearInterval(wt)}var Jt=De(function(e,t,n,o){if(t.scroll){var i=(e.touches?e.touches[0]:e).clientX,r=(e.touches?e.touches[0]:e).clientY,a=t.scrollSensitivity,l=t.scrollSpeed,s=K(),u=!1,d;ne!==n&&(ne=n,Xt(),Et=t.scroll,d=t.scrollFn,Et===!0&&(Et=tt(n,!0)));var f=0,m=Et;do{var y=m,v=I(y),w=v.top,Y=v.bottom,j=v.left,A=v.right,B=v.width,P=v.height,et=void 0,W=void 0,nt=y.scrollWidth,ht=y.scrollHeight,F=h(y),pt=y.scrollLeft,V=y.scrollTop;y===s?(et=B<nt&&(F.overflowX==="auto"||F.overflowX==="scroll"||F.overflowX==="visible"),W=P<ht&&(F.overflowY==="auto"||F.overflowY==="scroll"||F.overflowY==="visible")):(et=B<nt&&(F.overflowX==="auto"||F.overflowX==="scroll"),W=P<ht&&(F.overflowY==="auto"||F.overflowY==="scroll"));var gt=et&&(Math.abs(A-i)<=a&&pt+B<nt)-(Math.abs(j-i)<=a&&!!pt),z=W&&(Math.abs(Y-r)<=a&&V+P<ht)-(Math.abs(w-r)<=a&&!!V);if(!C[f])for(var ot=0;ot<=f;ot++)C[ot]||(C[ot]={});(C[f].vx!=gt||C[f].vy!=z||C[f].el!==y)&&(C[f].el=y,C[f].vx=gt,C[f].vy=z,clearInterval(C[f].pid),(gt!=0||z!=0)&&(u=!0,C[f].pid=setInterval(function(){o&&this.layer===0&&p.active._onTouchMove(Wt);var mt=C[this.layer].vy?C[this.layer].vy*l:0,Z=C[this.layer].vx?C[this.layer].vx*l:0;typeof d=="function"&&d.call(p.dragged.parentNode[M],Z,mt,e,Wt,C[this.layer].el)!=="continue"||_e(C[this.layer].el,Z,mt)}.bind({layer:f}),24))),f++}while(t.bubbleScroll&&m!==s&&(m=tt(m,!1)));oe=u}},30),Me=function(t){var n=t.originalEvent,o=t.putSortable,i=t.dragEl,r=t.activeSortable,a=t.dispatchSortableEvent,l=t.hideGhostForTarget,s=t.unhideGhostForTarget;if(n){var u=o||r;l();var d=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,f=document.elementFromPoint(d.clientX,d.clientY);s(),u&&!u.el.contains(f)&&(a("spill"),this.onSpill({dragEl:i,putSortable:o}))}};function re(){}re.prototype={startIndex:null,dragStart:function(t){var n=t.oldDraggableIndex;this.startIndex=n},onSpill:function(t){var n=t.dragEl,o=t.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var i=dt(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(n,i):this.sortable.el.appendChild(n),this.sortable.animateAll(),o&&o.animateAll()},drop:Me};$(re,{pluginName:"revertOnSpill"});function ae(){}ae.prototype={onSpill:function(t){var n=t.dragEl,o=t.putSortable,i=o||this.sortable;i.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),i.animateAll()},drop:Me};$(ae,{pluginName:"removeOnSpill"});p.mount(new sn);p.mount(ae,re);var Pe=p;var Lt=new Set,un={ghostClass:"calcite-sortable--ghost",chosenClass:"calcite-sortable--chosen",dragClass:"calcite-sortable--drag",fallbackClass:"calcite-sortable--fallback"};function mn(e){if(Fe(e))return;cn(e),Lt.add(e);let t="id",{group:n,handleSelector:o,dragSelector:i}=e;e.sortable=Pe.create(e.el,{dataIdAttr:t,...un,...!!i&&{draggable:i},...!!n&&{group:{name:n,...!!e.canPull&&{pull:(r,a,l,{newIndex:s,oldIndex:u})=>e.canPull({toEl:r.el,fromEl:a.el,dragEl:l,newIndex:s,oldIndex:u})},...!!e.canPut&&{put:(r,a,l,{newIndex:s,oldIndex:u})=>e.canPut({toEl:r.el,fromEl:a.el,dragEl:l,newIndex:s,oldIndex:u})}}},onMove:({from:r,dragged:a,to:l,related:s})=>{e.onDragMove&&e.onDragMove({fromEl:r,dragEl:a,toEl:l,relatedEl:s})},handle:o,filter:`${o}[disabled]`,onStart:({from:r,item:a,to:l,newIndex:s,oldIndex:u})=>{le.active=!0,fn(),e.onDragStart({fromEl:r,dragEl:a,toEl:l,newIndex:s,oldIndex:u})},onEnd:({from:r,item:a,to:l,newIndex:s,oldIndex:u})=>{le.active=!1,dn(),e.onDragEnd({fromEl:r,dragEl:a,toEl:l,newIndex:s,oldIndex:u})},onSort:({from:r,item:a,to:l,newIndex:s,oldIndex:u})=>{e.onDragSort({fromEl:r,dragEl:a,toEl:l,newIndex:s,oldIndex:u})}})}function cn(e){Fe(e)||(Lt.delete(e),e.sortable?.destroy(),e.sortable=null)}var le={active:!1};function Fe(e){return e.dragEnabled&&le.active}function fn(){Array.from(Lt).forEach(e=>e.onGlobalDragStart())}function dn(){Array.from(Lt).forEach(e=>e.onGlobalDragEnd())}export{mn as a,cn as b};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
4
|
-
* v3.0.0-next.
|
|
4
|
+
* v3.0.0-next.30
|
|
5
5
|
*/
|
|
6
|
-
import{b as s}from"./
|
|
6
|
+
import{b as s}from"./RUA7AM6F.js";import"./DZAV4X3C.js";function r(t){return t%10<5&&t%10>1&&~~(t/10)%10!==1}function a(t,e,_){var i=t+" ";switch(_){case"m":return e?"minuta":"minut\u0119";case"mm":return i+(r(t)?"minuty":"minut");case"h":return e?"godzina":"godzin\u0119";case"hh":return i+(r(t)?"godziny":"godzin");case"MM":return i+(r(t)?"miesi\u0105ce":"miesi\u0119cy");case"yy":return i+(r(t)?"lata":"lat")}}var o="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_wrze\u015Bnia_pa\u017Adziernika_listopada_grudnia".split("_"),m="stycze\u0144_luty_marzec_kwiecie\u0144_maj_czerwiec_lipiec_sierpie\u0144_wrzesie\u0144_pa\u017Adziernik_listopad_grudzie\u0144".split("_"),d=/D MMMM/,n=function(e,_){return d.test(_)?o[e.month()]:m[e.month()]};n.s=m;n.f=o;var l={name:"pl",weekdays:"niedziela_poniedzia\u0142ek_wtorek_\u015Broda_czwartek_pi\u0105tek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_\u015Br_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_\u015Ar_Cz_Pt_So".split("_"),months:n,monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_pa\u017A_lis_gru".split("_"),ordinal:function(e){return e+"."},weekStart:1,yearStart:4,relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:a,mm:a,h:a,hh:a,d:"1 dzie\u0144",dd:"%d dni",M:"miesi\u0105c",MM:a,y:"rok",yy:a},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"}};s.locale(l,null,!0);var u=l;export{u as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
4
|
-
* v3.0.0-next.
|
|
4
|
+
* v3.0.0-next.30
|
|
5
5
|
*/
|
|
6
|
-
import{b as n}from"./
|
|
6
|
+
import{b as n}from"./RUA7AM6F.js";import"./DZAV4X3C.js";function u(t,a,s,k){var l={s:"muutama sekunti",m:"minuutti",mm:"%d minuuttia",h:"tunti",hh:"%d tuntia",d:"p\xE4iv\xE4",dd:"%d p\xE4iv\xE4\xE4",M:"kuukausi",MM:"%d kuukautta",y:"vuosi",yy:"%d vuotta",numbers:"nolla_yksi_kaksi_kolme_nelj\xE4_viisi_kuusi_seitsem\xE4n_kahdeksan_yhdeks\xE4n".split("_")},m={s:"muutaman sekunnin",m:"minuutin",mm:"%d minuutin",h:"tunnin",hh:"%d tunnin",d:"p\xE4iv\xE4n",dd:"%d p\xE4iv\xE4n",M:"kuukauden",MM:"%d kuukauden",y:"vuoden",yy:"%d vuoden",numbers:"nollan_yhden_kahden_kolmen_nelj\xE4n_viiden_kuuden_seitsem\xE4n_kahdeksan_yhdeks\xE4n".split("_")},i=k&&!a?m:l,e=i[s];return t<10?e.replace("%d",i.numbers[t]):e.replace("%d",t)}var _={name:"fi",weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kes\xE4kuu_hein\xE4kuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kes\xE4_hein\xE4_elo_syys_loka_marras_joulu".split("_"),ordinal:function(a){return a+"."},weekStart:1,yearStart:4,relativeTime:{future:"%s p\xE4\xE4st\xE4",past:"%s sitten",s:u,m:u,mm:u,h:u,hh:u,d:u,dd:u,M:u,MM:u,y:u,yy:u},formats:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM[ta] YYYY",LLL:"D. MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, D. MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"D. MMM YYYY",lll:"D. MMM YYYY, [klo] HH.mm",llll:"ddd, D. MMM YYYY, [klo] HH.mm"}};n.locale(_,null,!0);var o=_;export{o as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
4
|
-
* v3.0.0-next.
|
|
4
|
+
* v3.0.0-next.30
|
|
5
5
|
*/
|
|
6
|
-
import{a as H}from"./
|
|
6
|
+
import{a as H}from"./WKOXZ2OH.js";import{a as O,b as $,c as B,d as T,e as L,f as S}from"./XJKNSRIM.js";import{a as p}from"./S2WQBCKA.js";import"./GJQ7VM2Z.js";import{a as C}from"./MBSS3YYR.js";import"./AHPFRNGN.js";import"./GSFQUFE4.js";import{n as w,u,v as z}from"./LVOCUTM2.js";import{a as E,b as D,d as G}from"./BNSQPM5A.js";import"./TZWDUBRU.js";import{A as x,G as A,M as y,a as d,w as m,y as v,z as f}from"./BAQJPIM4.js";var M={actionGroupEnd:"action-group--end"},b={actionsEnd:"actions-end",bottomActions:"bottom-actions",expandTooltip:"expand-tooltip"},W=m`: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{pointer-events:auto;display:inline-flex;align-self:stretch;gap:var(--calcite-action-bar-items-space, 0)}:host([layout=vertical]){flex-direction:column}:host([layout=vertical]):host([overflow-actions-disabled]){overflow-y:auto}:host([layout=vertical]):host([expanded]){max-inline-size:var(--calcite-action-bar-expanded-max-width, auto)}:host([layout=vertical]) .action-group--end{margin-block-start:auto}:host([layout=vertical]) ::slotted(calcite-action-group:not(:last-of-type)){border-block-end-width:var(--calcite-border-width-sm)}:host([layout=horizontal]){flex-direction:row}:host([layout=horizontal]):host([overflow-actions-disabled]){overflow-x:auto}:host([layout=horizontal]) .action-group--end{margin-inline-start:auto}:host([layout=horizontal]) ::slotted(calcite-action-group:not(:last-of-type)){border-inline-end-width:var(--calcite-border-width-sm)}.action-group--end{justify-content:flex-end}:host([hidden]){display:none}[hidden]{display:none}`,g=class extends f{constructor(){super(),this.mutationObserver=p("mutation",()=>this.mutationObserverHandler()),this.resize=H(({width:t,height:o})=>{let{el:e,expanded:l,expandDisabled:n,layout:i,overflowActionsDisabled:r,actionGroups:s}=this;if(r||i==="vertical"&&!o||i==="horizontal"&&!t)return;let a=B(e),c=n?a.length:a.length+1;this.updateGroups();let h=this.hasActionsEnd||this.hasBottomActions||!n?s.length+1:s.length,{actionHeight:k,actionWidth:P}=O(a),U=$({layout:i,actionCount:c,actionHeight:k,actionWidth:P,height:o,width:t,groupCount:h});T({actionGroups:s,expanded:l,overflowCount:U})},A.resize),this.resizeHandler=t=>{let{width:o,height:e}=t.contentRect;this.resize({width:o,height:e})},this.resizeObserver=p("resize",t=>this.resizeHandlerEntries(t)),this.toggleExpand=()=>{this.expanded=!this.expanded,this.calciteActionBarToggle.emit()},this.hasActionsEnd=!1,this.hasBottomActions=!1,this.expandDisabled=!1,this.expanded=!1,this.layout="vertical",this.messages=C(),this.overflowActionsDisabled=!1,this.overlayPositioning="absolute",this.scale="m",this.calciteActionBarToggle=v({cancelable:!1}),this.listen("calciteActionMenuOpen",this.actionMenuOpenHandler)}static{this.properties={expandTooltip:16,hasActionsEnd:16,hasBottomActions:16,actionsEndGroupLabel:1,expandDisabled:7,expanded:7,layout:3,messageOverrides:0,overflowActionsDisabled:7,overlayPositioning:3,position:3,scale:3}}static{this.styles=W}async overflowActions(){this.resize({width:this.el.clientWidth,height:this.el.clientHeight})}async setFocus(){await G(this),w(this.el)}connectedCallback(){super.connectedCallback(),this.updateGroups(),this.overflowActions(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.overflowActionsDisabledHandler(this.overflowActionsDisabled)}async load(){E(this)}willUpdate(t){t.has("expandDisabled")&&(this.hasUpdated||this.expandDisabled!==!1)&&this.overflowActions(),t.has("expanded")&&this.hasUpdated&&this.expandedHandler(),t.has("layout")&&(this.hasUpdated||this.layout!=="vertical")&&this.updateGroups(),t.has("overflowActionsDisabled")&&(this.hasUpdated||this.overflowActionsDisabled!==!1)&&this.overflowActionsDisabledHandler(this.overflowActionsDisabled)}loaded(){D(this),this.overflowActions()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect()}expandedHandler(){let{el:t,expanded:o}=this;L({el:t,expanded:o}),this.overflowActions()}overflowActionsDisabledHandler(t){if(t){this.resizeObserver?.disconnect();return}this.resizeObserver?.observe(this.el),this.overflowActions()}actionMenuOpenHandler(t){if(t.target.menuOpen){let o=t.composedPath();this.actionGroups?.forEach(e=>{o.includes(e)||(e.menuOpen=!1)})}}mutationObserverHandler(){this.updateGroups(),this.overflowActions()}resizeHandlerEntries(t){t.forEach(this.resizeHandler)}updateGroups(){let t=Array.from(this.el.querySelectorAll("calcite-action-group"));this.actionGroups=t,this.setGroupLayout(t)}setGroupLayout(t){t.forEach(o=>o.layout=this.layout)}handleDefaultSlotChange(){this.updateGroups()}handleActionsEndSlotChange(t){this.hasActionsEnd=u(t)}handleBottomActionsSlotChange(t){this.hasBottomActions=u(t)}handleTooltipSlotChange(t){let o=z(t).filter(e=>e?.matches("calcite-tooltip"));this.expandTooltip=o[0]}renderBottomActionGroup(){let{expanded:t,expandDisabled:o,el:e,position:l,toggleExpand:n,scale:i,layout:r,messages:s,actionsEndGroupLabel:a,overlayPositioning:c}=this,h=o?null:S({collapseLabel:s.collapseLabel,collapseText:s.collapse,el:e,expandLabel:s.expandLabel,expandText:s.expand,expanded:t,position:l,scale:i,toggle:n,tooltip:this.expandTooltip});return d`<calcite-action-group class=${x(M.actionGroupEnd)} .hidden=${this.expandDisabled&&!(this.hasActionsEnd||this.hasBottomActions)} .label=${a} .layout=${r} .overlayPositioning=${c} .scale=${i}><slot name=${b.actionsEnd} @slotchange=${this.handleActionsEndSlotChange}></slot><slot name=${b.bottomActions} @slotchange=${this.handleBottomActionsSlotChange}></slot><slot name=${b.expandTooltip} @slotchange=${this.handleTooltipSlotChange}></slot>${h}</calcite-action-group>`}render(){return d`<slot @slotchange=${this.handleDefaultSlotChange}></slot>${this.renderBottomActionGroup()}`}};y("calcite-action-bar",g);export{g as ActionBar};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
4
|
-
* v3.0.0-next.
|
|
4
|
+
* v3.0.0-next.30
|
|
5
5
|
*/
|
|
6
|
-
import{a as ae,b as T}from"./ISABHRKM.js";import{a as ie}from"./WJZQ73HV.js";import{a as W,j as L}from"./CGLYLBFG.js";import{c as K,e as J,f as Q,h as Y}from"./OKSJRXBT.js";import{c as Z,d as ee,e as te}from"./CIETHR7D.js";import{a as q,b as j}from"./QMSUJJX2.js";import{a as B}from"./4ULNVQYE.js";import{a as G}from"./ZRG7FOY3.js";import{a as N}from"./4UYW7OE3.js";import{b as R}from"./EYYNT4E7.js";import{q as H,x as _}from"./BCGQDABZ.js";import{a as A,b as I,d as U}from"./SOFWSTRQ.js";import{a as X}from"./LE4KOWO6.js";import{A as g,B as $,D as F,E as O,M as E,a as x,e as z,w as P,y as w,z as C}from"./P2GAK5BI.js";var l={container:"container",containerRange:"container--range",graph:"graph",handle:"handle",handleExtension:"handle-extension",handleLabel:"handle__label",handleLabelMinValue:"handle__label--minValue",handleLabelValue:"handle__label--value",hyphen:"hyphen",hyphenWrap:"hyphen--wrap",static:"static",thumb:"thumb",thumbActive:"thumb--active",thumbContainer:"thumb-container",thumbMinValue:"thumb--minValue",thumbPrecise:"thumb--precise",thumbValue:"thumb--value",tick:"tick",tickActive:"tick--active",tickLabel:"tick__label",tickMax:"tick__label--max",tickMin:"tick__label--min",ticks:"ticks",track:"track",trackRange:"track__range",transformed:"transformed"},se={validationMessage:"validationMessage"},le=250,ne=P`@charset "UTF-8";:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}.scale--s{--calcite-slider-handle-size: .625rem;--calcite-slider-handle-extension-height: .4rem;--calcite-slider-container-font-size: var(--calcite-font-size--3)}.scale--s .handle__label,.scale--s .tick__label{line-height:.75rem}.scale--m{--calcite-slider-handle-size: .875rem;--calcite-slider-handle-extension-height: .5rem;--calcite-slider-container-font-size: var(--calcite-font-size--2)}.scale--m .handle__label,.scale--m .tick__label{line-height:1rem}.scale--l{--calcite-slider-handle-size: 1rem;--calcite-slider-handle-extension-height: .65rem;--calcite-slider-container-font-size: var(--calcite-font-size--1)}.scale--l .handle__label,.scale--l .tick__label{line-height:1rem}.handle__label,.tick__label{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-slider-text-color, var(--calcite-color-text-2));font-size:var(--calcite-slider-container-font-size)}:host{display:block}:host .validation-container{padding-block-start:0!important}.container{position:relative;display:block;overflow-wrap:normal;word-break:normal;padding-inline:calc(var(--calcite-slider-handle-size) * .5);padding-block:calc(var(--calcite-slider-handle-size) * .5);margin-block:calc(var(--calcite-slider-handle-size) * .5);margin-inline:0;--calcite-slider-full-handle-height: calc( var(--calcite-slider-handle-size) + var(--calcite-slider-handle-extension-height) );touch-action:none;-webkit-user-select:none;user-select:none}:host([disabled]) .track__range,:host([disabled]) .tick--active{background-color:var(--calcite-color-text-3)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.scale--s .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -.375rem}.scale--m .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -.5rem}.scale--l .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -.55rem}:host([precise]:not([has-histogram])) .container .thumb--value{--calcite-slider-thumb-y-offset: calc(var(--calcite-slider-full-handle-height) * -1)}.thumb-container{position:relative;max-inline-size:100%}.thumb{--calcite-slider-thumb-x-offset: calc(var(--calcite-slider-handle-size) * .5);position:absolute;margin:0;display:flex;cursor:pointer;flex-direction:column;align-items:center;border-style:none;background-color:transparent;padding:0;font-family:inherit;outline:2px solid transparent;outline-offset:2px;transform:translate(var(--calcite-slider-thumb-x-offset),var(--calcite-slider-thumb-y-offset))}.thumb .handle__label.static,.thumb .handle__label.transformed{position:absolute;inset-block:0px;opacity:0}.thumb .handle__label.hyphen:after{content:"\u2014";display:inline-block;inline-size:1em}.thumb .handle__label.hyphen--wrap{display:flex}.thumb .handle{box-sizing:border-box;border-radius:9999px;outline-color:transparent;background-color:var(--calcite-slider-handle-fill-color, var(--calcite-color-foreground-1));block-size:var(--calcite-slider-handle-size);inline-size:var(--calcite-slider-handle-size);box-shadow:0 0 0 2px var(--calcite-color-text-3) inset;transition:border var(--calcite-internal-animation-timing-medium) ease,background-color var(--calcite-internal-animation-timing-medium) ease,box-shadow var(--calcite-animation-timing) ease}.thumb .handle-extension{inline-size:.125rem;block-size:var(--calcite-slider-handle-extension-height);background-color:var(--calcite-slider-handle-extension-color, var(--calcite-color-text-3))}.thumb:hover .handle{box-shadow:0 0 0 3px var(--calcite-color-brand) inset}.thumb:hover .handle-extension{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand))}.thumb:focus .handle{outline:2px solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.thumb:focus .handle-extension{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand))}.thumb.thumb--minValue{transform:translate(calc(var(--calcite-slider-thumb-x-offset) * -1),var(--calcite-slider-thumb-y-offset))}.thumb.thumb--precise{--calcite-slider-thumb-y-offset: -.125rem}:host([label-handles]) .thumb{--calcite-slider-thumb-x-offset: 50%}:host([label-handles]):host(:not([has-histogram])) .scale--s .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -1.4375rem}:host([label-handles]):host(:not([has-histogram])) .scale--m .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -1.875rem}:host([label-handles]):host(:not([has-histogram])) .scale--l .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -2rem}:host([has-histogram][label-handles]) .handle__label,:host([label-handles]:not([has-histogram])) .thumb--minValue.thumb--precise .handle__label{margin-block-start:.5em}:host(:not([has-histogram]):not([precise])) .handle__label,:host([label-handles]:not([has-histogram])) .thumb--value .handle__label{margin-block-end:.5em}:host([label-handles][precise]):host(:not([has-histogram])) .scale--s .thumb--value{--calcite-slider-thumb-y-offset: -2.075rem}:host([label-handles][precise]):host(:not([has-histogram])) .scale--m .thumb--value{--calcite-slider-thumb-y-offset: -2.75rem}:host([label-handles][precise]):host(:not([has-histogram])) .scale--l .thumb--value{--calcite-slider-thumb-y-offset: -3.0625rem}.thumb:focus .handle,.thumb--active .handle{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand));box-shadow:0 0 8px #00000029}.thumb:hover.thumb--precise:after,.thumb:focus.thumb--precise:after,.thumb--active.thumb--precise:after{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand))}.track{position:relative;block-size:.125rem;border-radius:0;background-color:var(--calcite-slider-track-color, var(--calcite-color-border-2));transition:all var(--calcite-internal-animation-timing-medium) ease-in}.track__range{position:absolute;inset-block-start:0px;block-size:.125rem;background-color:var(--calcite-slider-track-fill-color, var(--calcite-color-brand))}.container--range .track__range:hover{cursor:ew-resize}.container--range .track__range:after{position:absolute;inline-size:100%;content:"";inset-block-start:calc(var(--calcite-slider-full-handle-height) * .5 * -1);block-size:calc(var(--calcite-slider-handle-size) + var(--calcite-slider-handle-extension-height))}@media (forced-colors: active){.thumb{outline-width:0;outline-offset:0}.handle{outline:2px solid transparent;outline-offset:2px}.thumb:focus .handle,.thumb .handle-extension,.thumb:hover .handle-extension,.thumb:focus .handle-extension,.thumb:active .handle-extension{background-color:canvasText}.track{background-color:canvasText}.track__range{background-color:highlight}}.tick{position:absolute;block-size:.25rem;inline-size:.125rem;border-width:1px;border-style:solid;background-color:var(--calcite-slider-tick-color, var(--calcite-color-border-input));border-color:var(--calcite-slider-tick-border-color, var(--calcite-color-foreground-1));inset-block-start:-2px;pointer-events:none;margin-inline-start:-.125rem}.tick--active{background-color:var(--calcite-slider-tick-selected-color, var(--calcite-color-brand))}.tick__label{pointer-events:none;margin-block-start:.875rem;display:flex;justify-content:center}.tick__label--min{transition:opacity var(--calcite-animation-timing)}.tick__label--max{transition:opacity var(--calcite-internal-animation-timing-fast)}:host([has-histogram][label-handles]) .tick__label--min,:host([has-histogram][label-handles]) .tick__label--max,:host([has-histogram][precise]) .tick__label--min,:host([has-histogram][precise]) .tick__label--max{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-3)}.graph{color:var(--calcite-slider-graph-color, var(--calcite-color-foreground-3));block-size:48px}:host([label-ticks][ticks]) .container{padding-block-end:calc(.875rem + var(--calcite-slider-container-font-size))}:host([has-histogram]):host([precise][label-handles]) .container{padding-block-end:calc(var(--calcite-slider-full-handle-height) + 1em)}:host([has-histogram]):host([label-handles]:not([precise])) .container{padding-block-end:calc(var(--calcite-slider-handle-size) * .5 + 1em)}:host([has-histogram]):host([precise]:not([label-handles])) .container{padding-block-end:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([precise]:not([label-handles])) .container{padding-block-start:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([precise]:not([label-handles])) .container--range{padding-block-end:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([label-handles]:not([precise])) .container{padding-block-start:calc(var(--calcite-slider-full-handle-height) + 4px)}:host(:not([has-histogram])):host([label-handles][precise]) .container{padding-block-start:calc(var(--calcite-slider-full-handle-height) + var(--calcite-slider-container-font-size) + 4px)}:host(:not([has-histogram])):host([label-handles][precise]) .container--range{padding-block-end:calc(var(--calcite-slider-full-handle-height) + var(--calcite-slider-container-font-size) + 4px)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`;function p(S){return Array.isArray(S)}var D=class extends C{constructor(){super(),this.activeProp="value",this.dragEnd=e=>{this.disabled||(this.removeDragListeners(),this.focusActiveHandle(e.clientX),this.lastDragPropValue!=this[this.dragProp]&&this.emitChange(),this.dragProp=null,this.lastDragPropValue=null,this.minValueDragRange=null,this.maxValueDragRange=null,this.minMaxValueRange=null)},this.dragUpdate=e=>{if(!this.disabled&&(e.preventDefault(),this.dragProp)){let t=this.mapToRange(e.clientX||e.pageX);if(p(this.value)&&this.dragProp==="minMaxValue")if(this.minValueDragRange&&this.maxValueDragRange&&this.minMaxValueRange){let a=t-this.minValueDragRange,i=t+this.maxValueDragRange;i<=this.max&&a>=this.min&&i-a===this.minMaxValueRange&&this.setValue({minValue:this.clamp(a,"minValue"),maxValue:this.clamp(i,"maxValue")})}else this.minValueDragRange=t-this.minValue,this.maxValueDragRange=this.maxValue-t,this.minMaxValueRange=this.maxValue-this.minValue;else this.setValue({[this.dragProp]:this.clamp(t,this.dragProp)})}},this.formatValue=e=>(L.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},L.localize(e.toString())),this.guid=`calcite-slider-${X()}`,this.messages=N({name:null}),this.pointerUpDragEnd=e=>{this.disabled||!_(e)||this.dragEnd(e)},this.maxValueDragRange=null,this.minMaxValueRange=null,this.minValueDragRange=null,this.tickValues=[],this.disabled=!1,this.fillPlacement="start",this.groupSeparator=!1,this.hasHistogram=!1,this.labelHandles=!1,this.labelTicks=!1,this.max=100,this.min=0,this.mirrored=!1,this.precise=!1,this.required=!1,this.scale="m",this.snap=!1,this.status="idle",this.step=1,this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.value=0,this.calciteSliderChange=w({cancelable:!1}),this.calciteSliderInput=w({cancelable:!1}),this.listen("pointerdown",this.pointerDownHandler),this.listen("keydown",this.handleKeyDown),this.listen("touchstart",this.handleTouchStart)}static{this.properties={maxValueDragRange:16,minMaxValueRange:16,minValueDragRange:16,tickValues:16,disabled:7,fillPlacement:3,form:3,groupSeparator:7,hasHistogram:7,histogram:0,histogramStops:0,labelFormatter:0,labelHandles:7,labelTicks:7,max:11,maxLabel:1,maxValue:9,min:11,minLabel:1,minValue:9,mirrored:7,name:3,numberingSystem:1,pageStep:11,precise:7,required:7,scale:3,snap:7,status:3,step:11,ticks:11,validationIcon:[3,{converter:O}],validationMessage:1,validity:0,value:11}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=ne}async setFocus(){await U(this),(this.minHandle?this.minHandle:this.maxHandle)?.focus()}connectedCallback(){super.connectedCallback(),this.setMinMaxFromValue(),this.setValueFromMinMax(),Z(this),K(this)}load(){A(this),p(this.value)||(this.value=this.snap?this.getClosestStep(this.value):this.clamp(this.value)),Q(this,this.value)}willUpdate(e){e.has("histogram")&&(this.hasHistogram=!!this.histogram),e.has("ticks")&&(this.tickValues=this.generateTickValues()),e.has("value")&&(this.hasUpdated||this.value!==0)&&this.setMinMaxFromValue(),(e.has("minValue")||e.has("maxValue"))&&this.setValueFromMinMax()}updated(){this.labelHandles&&(this.adjustHostObscuredHandleLabel("value"),p(this.value)&&(this.adjustHostObscuredHandleLabel("minValue"),this.precise&&!this.hasHistogram||this.hyphenateCollidingRangeHandleLabels())),this.hideObscuredBoundingTickLabels(),q(this)}loaded(){I(this)}disconnectedCallback(){super.disconnectedCallback(),ee(this),J(this),this.removeDragListeners()}handleKeyDown(e){let t=this.shouldMirror(),{activeProp:a,max:i,min:s,pageStep:r,step:o}=this,n=this[a],{key:h}=e;if(G(h)){e.preventDefault();return}let m;if(h==="ArrowUp"||h==="ArrowRight"?m=n+o*(t&&h==="ArrowRight"?-1:1):h==="ArrowDown"||h==="ArrowLeft"?m=n-o*(t&&h==="ArrowLeft"?-1:1):h==="PageUp"?r&&(m=n+r):h==="PageDown"?r&&(m=n-r):h==="Home"?m=s:h==="End"&&(m=i),isNaN(m))return;e.preventDefault();let d=Number(m.toFixed(T(o)));this.setValue({[a]:this.clamp(d,a)})}pointerDownHandler(e){if(this.disabled||!_(e))return;let t=e.clientX||e.pageX,a=this.mapToRange(t),i="value";p(this.value)&&(a>=this.minValue&&a<=this.maxValue&&this.lastDragProp==="minMaxValue"?i="minMaxValue":i=Math.abs(this.maxValue-a)<Math.abs(this.minValue-a)||a>=this.maxValue?"maxValue":"minValue"),this.lastDragPropValue=this[i],this.dragStart(i),this.el.shadowRoot.querySelector(`.${l.thumb}:active`)||this.setValue({[i]:this.clamp(a,i)}),this.focusActiveHandle(t)}handleTouchStart(e){e.preventDefault()}buildThumbType(e){let t=[e];return this.labelHandles&&t.push("labeled"),this.precise&&t.push("precise"),this.hasHistogram&&t.push("histogram"),t.join("-")}setValueFromMinMax(){let{minValue:e,maxValue:t}=this;typeof e=="number"&&typeof t=="number"&&(this.value=[e,t])}setMinMaxFromValue(){let{value:e}=this;p(e)&&(this.minValue=e[0],this.maxValue=e[1])}onLabelClick(){this.setFocus()}shouldMirror(){return this.mirrored&&!this.hasHistogram}shouldUseMinValue(){return p(this.value)?this.hasHistogram&&this.maxValue===0||!this.hasHistogram&&this.minValue===0:!1}getTickDensity(){let e=(this.max-this.min)/this.ticks/le;return e<1?1:e}generateTickValues(){let e=this.ticks??0;if(e<=0)return[];let t=[this.min],a=this.getTickDensity(),i=e*a,s=this.min;for(;s<this.max;)s+=i,t.push(Math.min(s,this.max));return t.includes(this.max)||t.push(this.max),t}onThumbBlur(){this.activeProp=null}onThumbFocus(e){let t=e.currentTarget;this.activeProp=t.getAttribute("data-value-prop")}onThumbPointerDown(e){let t=e.currentTarget;this.pointerDownDragStart(e,t.getAttribute("data-value-prop"))}onTrackPointerDown(e){this.pointerDownDragStart(e,"minMaxValue")}pointerDownDragStart(e,t){_(e)&&this.dragStart(t)}dragStart(e){this.dragProp=e,this.lastDragProp=this.dragProp,this.activeProp=e,window.addEventListener("pointermove",this.dragUpdate),window.addEventListener("pointerup",this.pointerUpDragEnd),window.addEventListener("pointercancel",this.dragEnd)}focusActiveHandle(e){this.dragProp==="minValue"?this.minHandle.focus():this.dragProp==="maxValue"||this.dragProp==="value"?this.maxHandle.focus():this.dragProp==="minMaxValue"&&this.getClosestHandle(e).focus()}emitInput(){this.calciteSliderInput.emit()}emitChange(){this.calciteSliderChange.emit()}removeDragListeners(){window.removeEventListener("pointermove",this.dragUpdate),window.removeEventListener("pointerup",this.pointerUpDragEnd),window.removeEventListener("pointercancel",this.dragEnd)}setValue(e){let t;Object.keys(e).forEach(a=>{let i=e[a];t||(t=this[a]!==i),this[a]=i}),t&&(this.dragProp||this.emitChange(),this.emitInput())}storeTrackRef(e){this.trackEl=e}storeThumbRef(e){e&&(e.getAttribute("data-value-prop")==="minValue"?this.minHandle=e:this.maxHandle=e)}clamp(e,t){return e=ae(e,this.min,this.max),t==="maxValue"&&(e=Math.max(e,this.minValue)),t==="minValue"&&(e=Math.min(e,this.maxValue)),e}mapToRange(e){let t=this.max-this.min,{left:a,width:i}=this.trackEl.getBoundingClientRect(),s=(e-a)/i,r=this.shouldMirror(),o=this.clamp(this.min+t*(r?1-s:s)),n=Number(o.toFixed(T(this.step)));return this.snap&&this.step?this.getClosestStep(n):n}getClosestStep(e){let{max:t,min:a,step:i}=this,s=new W(`${Math.floor((e-a)/i)}`).multiply(`${i}`).add(`${a}`).toString(),r=this.clamp(Number(s));return r>t&&(r-=i),r}getClosestHandle(e){return this.getDistanceX(this.maxHandle,e)>this.getDistanceX(this.minHandle,e)?this.minHandle:this.maxHandle}getDistanceX(e,t){return Math.abs(e.getBoundingClientRect().left-t)}getFontSizeForElement(e){return Number(window.getComputedStyle(e).getPropertyValue("font-size").match(/\d+/)[0])}getUnitInterval(e){e=this.clamp(e);let t=this.max-this.min;return(e-this.min)/t}adjustHostObscuredHandleLabel(e){let t=this.el.shadowRoot.querySelector(`.handle__label--${e}`),a=this.el.shadowRoot.querySelector(`.handle__label--${e}.static`),i=this.el.shadowRoot.querySelector(`.handle__label--${e}.transformed`),s=a.getBoundingClientRect(),r=this.getHostOffset(s.left,s.right);t.style.transform=`translateX(${r}px)`,i.style.transform=`translateX(${r}px)`}hyphenateCollidingRangeHandleLabels(){let{shadowRoot:e}=this.el,t=this.shouldMirror(),a=t?"value":"minValue",i=t?"minValue":"value",s=e.querySelector(`.handle__label--${a}`),r=e.querySelector(`.handle__label--${a}.static`),o=e.querySelector(`.handle__label--${a}.transformed`),n=this.getHostOffset(r.getBoundingClientRect().left,r.getBoundingClientRect().right),h=e.querySelector(`.handle__label--${i}`),m=e.querySelector(`.handle__label--${i}.static`),d=e.querySelector(`.handle__label--${i}.transformed`),u=this.getHostOffset(m.getBoundingClientRect().left,m.getBoundingClientRect().right),k=this.getFontSizeForElement(s),v=this.getRangeLabelOverlap(o,d),f=s,b=k/2;if(v>0){if(f.classList.add(l.hyphen,l.hyphenWrap),u===0&&n===0){let c=v/2-b;c=Math.sign(c)===-1?Math.abs(c):-c;let y=this.getHostOffset(o.getBoundingClientRect().left+c-b,o.getBoundingClientRect().right+c-b),V=v/2,M=this.getHostOffset(d.getBoundingClientRect().left+V,d.getBoundingClientRect().right+V);y!==0&&(c+=y,V+=y),M!==0&&(c+=M,V+=M),s.style.transform=`translateX(${c}px)`,o.style.transform=`translateX(${c-b}px)`,h.style.transform=`translateX(${V}px)`,d.style.transform=`translateX(${V}px)`}else if(n>0||u>0)s.style.transform=`translateX(${n+b}px)`,h.style.transform=`translateX(${v+u}px)`,d.style.transform=`translateX(${v+u}px)`;else if(n<0||u<0){let c=Math.abs(n)+v-b;c=Math.sign(c)===-1?Math.abs(c):-c,s.style.transform=`translateX(${c}px)`,o.style.transform=`translateX(${c-b}px)`}}else f.classList.remove(l.hyphen,l.hyphenWrap),s.style.transform=`translateX(${n}px)`,o.style.transform=`translateX(${n}px)`,h.style.transform=`translateX(${u}px)`,d.style.transform=`translateX(${u}px)`}hideObscuredBoundingTickLabels(){let e=p(this.value);if(!this.hasHistogram&&!e&&!this.labelHandles&&!this.precise||!this.hasHistogram&&!e&&this.labelHandles&&!this.precise||!this.hasHistogram&&!e&&!this.labelHandles&&this.precise||!this.hasHistogram&&!e&&this.labelHandles&&this.precise||!this.hasHistogram&&e&&!this.precise||this.hasHistogram&&!this.precise&&!this.labelHandles)return;let t=this.el.shadowRoot.querySelector(`.${l.thumbMinValue}`),a=this.el.shadowRoot.querySelector(`.${l.thumbValue}`),i=this.el.shadowRoot.querySelector(`.${l.tickMin}`),s=this.el.shadowRoot.querySelector(`.${l.tickMax}`);!t&&a&&i&&s&&(i.style.opacity=this.isMinTickLabelObscured(i,a)?"0":"1",s.style.opacity=this.isMaxTickLabelObscured(s,a)?"0":"1"),t&&a&&i&&s&&(i.style.opacity=this.isMinTickLabelObscured(i,t)||this.isMinTickLabelObscured(i,a)?"0":"1",s.style.opacity=this.isMaxTickLabelObscured(s,t)||this.isMaxTickLabelObscured(s,a)&&this.hasHistogram?"0":"1")}getHostOffset(e,t){let a=this.el.getBoundingClientRect(),i=7;return e+i<a.left?a.left-e-i:t-i>a.right?-(t-a.right)+i:0}getRangeLabelOverlap(e,t){let a=e.getBoundingClientRect(),i=t.getBoundingClientRect(),s=this.getFontSizeForElement(e),r=a.right+s-i.left;return Math.max(r,0)}isMinTickLabelObscured(e,t){let a=e.getBoundingClientRect(),i=t.getBoundingClientRect();return H(a,i)}isMaxTickLabelObscured(e,t){let a=e.getBoundingClientRect(),i=t.getBoundingClientRect();return H(a,i)}internalLabelFormatter(e,t){let a=this.labelFormatter;return a?a(e,t,this.formatValue)??this.formatValue(e):this.formatValue(e)}render(){let e=this.el.id||this.guid,t=p(this.value)?this.maxValue:this.value,a=this.minValue||this.min,i=this.shouldUseMinValue(),s=this.getUnitInterval(i?this.minValue:a)*100,r=this.getUnitInterval(t)*100,o=this.shouldMirror(),n=p(this.value),h=this.buildThumbType("max"),m=this.renderThumb({type:h,thumbPlacement:h.includes("histogram")?"below":"above",maxInterval:r,minInterval:s,mirror:o}),d=this.buildThumbType("min"),u=n?this.renderThumb({type:d,thumbPlacement:d.includes("histogram")||d.includes("precise")?"below":"above",maxInterval:r,minInterval:s,mirror:o}):null,k=n?"start":this.fillPlacement,v=k==="none"?{left:"unset",right:"unset"}:k==="end"?{left:`${o?s:r}%`,right:`${o?r:s}%`}:{left:`${o?100-r:s}%`,right:`${o?s:100-r}%`};return F(this.el,"id",e),j({disabled:this.disabled,children:x`<div aria-errormessage=${se.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaLabel=${te(this)} class=${g({[l.container]:!0,[l.containerRange]:n,[`scale--${this.scale}`]:!0})}>${this.renderGraph()}<div class=${g(l.track)} ${R(this.storeTrackRef)}><div class=${g(l.trackRange)} @pointerdown=${this.onTrackPointerDown} style=${$(v)}></div><div class=${g(l.ticks)}>${this.tickValues.map(f=>{let b=`${this.getUnitInterval(f)*100}%`,c=!1;if(k==="start"||k==="end")if(i)c=f>=this.minValue&&f<=this.maxValue;else{let y=k==="start"?a:t,V=k==="start"?t:this.max;c=f>=y&&f<=V}return x`<span class=${g({[l.tick]:!0,[l.tickActive]:c})} style=${$({left:o?"":b,right:o?b:""})}>${this.renderTickLabel(f)}</span>`})}</div></div><div class=${g(l.thumbContainer)}>${u}${m}${Y({component:this})}</div></div>${this.validationMessage&&this.status==="invalid"?ie({icon:this.validationIcon,id:se.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}renderThumb({type:e,mirror:t,thumbPlacement:a,minInterval:i,maxInterval:s}){let r=e.includes("labeled"),o=e.includes("precise"),n=e.includes("min"),h=p(this.value),m=n?this.minValue:h?this.maxValue:this.value,d=n?"minValue":h?"maxValue":"value",u=n?this.minLabel:h?this.maxLabel:this.minLabel,k=n?this.minValue:m,v=d==="minValue"?this.internalLabelFormatter(this.minValue,"min"):d==="maxValue"?this.internalLabelFormatter(this.maxValue,"max"):this.internalLabelFormatter(m,"value"),f=n?{left:`${t?100-i:i}%`}:{right:`${t?s:100-s}%`},b=`${l.handleLabel} ${n?l.handleLabelMinValue:l.handleLabelValue}`,c=[...r?[x`<span aria-hidden=true class=${g(b)}>${v}</span>`,x`<span aria-hidden=true class=${`${b} ${l.static}`}>${v}</span>`,x`<span aria-hidden=true class=${`${b} ${l.transformed}`}>${v}</span>`]:[],x`<div class=${g(l.handle)}></div>`,o&&x`<div class=${g(l.handleExtension)}></div>`||""];return a==="below"&&c.reverse(),B(e,x`<div .ariaLabel=${u} aria-orientation=horizontal .ariaValueMax=${this.max} .ariaValueMin=${this.min} .ariaValueNow=${k} class=${g({[l.thumb]:!0,[l.thumbValue]:!n,[l.thumbActive]:this.lastDragProp!=="minMaxValue"&&this.dragProp===d,[l.thumbPrecise]:o,[l.thumbMinValue]:n})} data-value-prop=${d??z} @blur=${this.onThumbBlur} @focus=${this.onThumbFocus} @pointerdown=${this.onThumbPointerDown} role=slider style=${$(f)} tabindex=0 ${R(this.storeThumbRef)}>${c}</div>`)}renderGraph(){return this.histogram?x`<calcite-graph class=${g(l.graph)} .colorStops=${this.histogramStops} .data=${this.histogram} .highlightMax=${p(this.value)?this.maxValue:this.value} .highlightMin=${p(this.value)?this.minValue:this.min} .max=${this.max} .min=${this.min}></calcite-graph>`:null}renderTickLabel(e){let{hasHistogram:t,labelHandles:a,labelTicks:i,max:s,min:r,precise:o,value:n}=this,h=p(n),m=e===r,d=e===s,u=m||d;return i&&(!t&&(u||!o||!h)||t&&(u||!o&&!a))?x`<span class=${g({[l.tickLabel]:!0,[l.tickMin]:m,[l.tickMax]:d})}>${this.internalLabelFormatter(e,"tick")}</span>`:null}};E("calcite-slider",D);export{D as Slider};
|
|
6
|
+
import{a as ae,b as T}from"./C7BQALYO.js";import{a as ie}from"./O4FLQQIC.js";import{a as W,j as L}from"./WP2BL3UN.js";import{c as K,e as J,f as Q,h as Y}from"./3TCKNORC.js";import{c as Z,d as ee,e as te}from"./LYS3FM3R.js";import{a as q,b as j}from"./NC43GHJV.js";import{a as B}from"./GMOS576G.js";import{a as G}from"./KJBGT7DL.js";import{a as N}from"./MBSS3YYR.js";import{b as R}from"./AHPFRNGN.js";import{q as H,x as _}from"./LVOCUTM2.js";import{a as A,b as I,d as U}from"./BNSQPM5A.js";import{a as X}from"./TZWDUBRU.js";import{A as g,B as $,D as F,E as O,M as E,a as x,e as z,w as P,y as w,z as C}from"./BAQJPIM4.js";var l={container:"container",containerRange:"container--range",graph:"graph",handle:"handle",handleExtension:"handle-extension",handleLabel:"handle__label",handleLabelMinValue:"handle__label--minValue",handleLabelValue:"handle__label--value",hyphen:"hyphen",hyphenWrap:"hyphen--wrap",static:"static",thumb:"thumb",thumbActive:"thumb--active",thumbContainer:"thumb-container",thumbMinValue:"thumb--minValue",thumbPrecise:"thumb--precise",thumbValue:"thumb--value",tick:"tick",tickActive:"tick--active",tickLabel:"tick__label",tickMax:"tick__label--max",tickMin:"tick__label--min",ticks:"ticks",track:"track",trackRange:"track__range",transformed:"transformed"},se={validationMessage:"validationMessage"},le=250,ne=P`@charset "UTF-8";:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}.scale--s{--calcite-slider-handle-size: .625rem;--calcite-slider-handle-extension-height: .4rem;--calcite-slider-container-font-size: var(--calcite-font-size--3)}.scale--s .handle__label,.scale--s .tick__label{line-height:.75rem}.scale--m{--calcite-slider-handle-size: .875rem;--calcite-slider-handle-extension-height: .5rem;--calcite-slider-container-font-size: var(--calcite-font-size--2)}.scale--m .handle__label,.scale--m .tick__label{line-height:1rem}.scale--l{--calcite-slider-handle-size: 1rem;--calcite-slider-handle-extension-height: .65rem;--calcite-slider-container-font-size: var(--calcite-font-size--1)}.scale--l .handle__label,.scale--l .tick__label{line-height:1rem}.handle__label,.tick__label{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-slider-text-color, var(--calcite-color-text-2));font-size:var(--calcite-slider-container-font-size)}:host{display:block}:host .validation-container{padding-block-start:0!important}.container{position:relative;display:block;overflow-wrap:normal;word-break:normal;padding-inline:calc(var(--calcite-slider-handle-size) * .5);padding-block:calc(var(--calcite-slider-handle-size) * .5);margin-block:calc(var(--calcite-slider-handle-size) * .5);margin-inline:0;--calcite-slider-full-handle-height: calc( var(--calcite-slider-handle-size) + var(--calcite-slider-handle-extension-height) );touch-action:none;-webkit-user-select:none;user-select:none}:host([disabled]) .track__range,:host([disabled]) .tick--active{background-color:var(--calcite-color-text-3)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.scale--s .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -.375rem}.scale--m .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -.5rem}.scale--l .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -.55rem}:host([precise]:not([has-histogram])) .container .thumb--value{--calcite-slider-thumb-y-offset: calc(var(--calcite-slider-full-handle-height) * -1)}.thumb-container{position:relative;max-inline-size:100%}.thumb{--calcite-slider-thumb-x-offset: calc(var(--calcite-slider-handle-size) * .5);position:absolute;margin:0;display:flex;cursor:pointer;flex-direction:column;align-items:center;border-style:none;background-color:transparent;padding:0;font-family:inherit;outline:2px solid transparent;outline-offset:2px;transform:translate(var(--calcite-slider-thumb-x-offset),var(--calcite-slider-thumb-y-offset))}.thumb .handle__label.static,.thumb .handle__label.transformed{position:absolute;inset-block:0px;opacity:0}.thumb .handle__label.hyphen:after{content:"\u2014";display:inline-block;inline-size:1em}.thumb .handle__label.hyphen--wrap{display:flex}.thumb .handle{box-sizing:border-box;border-radius:9999px;outline-color:transparent;background-color:var(--calcite-slider-handle-fill-color, var(--calcite-color-foreground-1));block-size:var(--calcite-slider-handle-size);inline-size:var(--calcite-slider-handle-size);box-shadow:0 0 0 2px var(--calcite-color-text-3) inset;transition:border var(--calcite-internal-animation-timing-medium) ease,background-color var(--calcite-internal-animation-timing-medium) ease,box-shadow var(--calcite-animation-timing) ease}.thumb .handle-extension{inline-size:.125rem;block-size:var(--calcite-slider-handle-extension-height);background-color:var(--calcite-slider-handle-extension-color, var(--calcite-color-text-3))}.thumb:hover .handle{box-shadow:0 0 0 3px var(--calcite-color-brand) inset}.thumb:hover .handle-extension{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand))}.thumb:focus .handle{outline:2px solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.thumb:focus .handle-extension{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand))}.thumb.thumb--minValue{transform:translate(calc(var(--calcite-slider-thumb-x-offset) * -1),var(--calcite-slider-thumb-y-offset))}.thumb.thumb--precise{--calcite-slider-thumb-y-offset: -.125rem}:host([label-handles]) .thumb{--calcite-slider-thumb-x-offset: 50%}:host([label-handles]):host(:not([has-histogram])) .scale--s .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -1.4375rem}:host([label-handles]):host(:not([has-histogram])) .scale--m .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -1.875rem}:host([label-handles]):host(:not([has-histogram])) .scale--l .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -2rem}:host([has-histogram][label-handles]) .handle__label,:host([label-handles]:not([has-histogram])) .thumb--minValue.thumb--precise .handle__label{margin-block-start:.5em}:host(:not([has-histogram]):not([precise])) .handle__label,:host([label-handles]:not([has-histogram])) .thumb--value .handle__label{margin-block-end:.5em}:host([label-handles][precise]):host(:not([has-histogram])) .scale--s .thumb--value{--calcite-slider-thumb-y-offset: -2.075rem}:host([label-handles][precise]):host(:not([has-histogram])) .scale--m .thumb--value{--calcite-slider-thumb-y-offset: -2.75rem}:host([label-handles][precise]):host(:not([has-histogram])) .scale--l .thumb--value{--calcite-slider-thumb-y-offset: -3.0625rem}.thumb:focus .handle,.thumb--active .handle{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand));box-shadow:0 0 8px #00000029}.thumb:hover.thumb--precise:after,.thumb:focus.thumb--precise:after,.thumb--active.thumb--precise:after{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand))}.track{position:relative;block-size:.125rem;border-radius:0;background-color:var(--calcite-slider-track-color, var(--calcite-color-border-2));transition:all var(--calcite-internal-animation-timing-medium) ease-in}.track__range{position:absolute;inset-block-start:0px;block-size:.125rem;background-color:var(--calcite-slider-track-fill-color, var(--calcite-color-brand))}.container--range .track__range:hover{cursor:ew-resize}.container--range .track__range:after{position:absolute;inline-size:100%;content:"";inset-block-start:calc(var(--calcite-slider-full-handle-height) * .5 * -1);block-size:calc(var(--calcite-slider-handle-size) + var(--calcite-slider-handle-extension-height))}@media (forced-colors: active){.thumb{outline-width:0;outline-offset:0}.handle{outline:2px solid transparent;outline-offset:2px}.thumb:focus .handle,.thumb .handle-extension,.thumb:hover .handle-extension,.thumb:focus .handle-extension,.thumb:active .handle-extension{background-color:canvasText}.track{background-color:canvasText}.track__range{background-color:highlight}}.tick{position:absolute;block-size:.25rem;inline-size:.125rem;border-width:1px;border-style:solid;background-color:var(--calcite-slider-tick-color, var(--calcite-color-border-input));border-color:var(--calcite-slider-tick-border-color, var(--calcite-color-foreground-1));inset-block-start:-2px;pointer-events:none;margin-inline-start:-.125rem}.tick--active{background-color:var(--calcite-slider-tick-selected-color, var(--calcite-color-brand))}.tick__label{pointer-events:none;margin-block-start:.875rem;display:flex;justify-content:center}.tick__label--min{transition:opacity var(--calcite-animation-timing)}.tick__label--max{transition:opacity var(--calcite-internal-animation-timing-fast)}:host([has-histogram][label-handles]) .tick__label--min,:host([has-histogram][label-handles]) .tick__label--max,:host([has-histogram][precise]) .tick__label--min,:host([has-histogram][precise]) .tick__label--max{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-3)}.graph{color:var(--calcite-slider-graph-color, var(--calcite-color-foreground-3));block-size:48px}:host([label-ticks][ticks]) .container{padding-block-end:calc(.875rem + var(--calcite-slider-container-font-size))}:host([has-histogram]):host([precise][label-handles]) .container{padding-block-end:calc(var(--calcite-slider-full-handle-height) + 1em)}:host([has-histogram]):host([label-handles]:not([precise])) .container{padding-block-end:calc(var(--calcite-slider-handle-size) * .5 + 1em)}:host([has-histogram]):host([precise]:not([label-handles])) .container{padding-block-end:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([precise]:not([label-handles])) .container{padding-block-start:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([precise]:not([label-handles])) .container--range{padding-block-end:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([label-handles]:not([precise])) .container{padding-block-start:calc(var(--calcite-slider-full-handle-height) + 4px)}:host(:not([has-histogram])):host([label-handles][precise]) .container{padding-block-start:calc(var(--calcite-slider-full-handle-height) + var(--calcite-slider-container-font-size) + 4px)}:host(:not([has-histogram])):host([label-handles][precise]) .container--range{padding-block-end:calc(var(--calcite-slider-full-handle-height) + var(--calcite-slider-container-font-size) + 4px)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`;function p(S){return Array.isArray(S)}var D=class extends C{constructor(){super(),this.activeProp="value",this.dragEnd=e=>{this.disabled||(this.removeDragListeners(),this.focusActiveHandle(e.clientX),this.lastDragPropValue!=this[this.dragProp]&&this.emitChange(),this.dragProp=null,this.lastDragPropValue=null,this.minValueDragRange=null,this.maxValueDragRange=null,this.minMaxValueRange=null)},this.dragUpdate=e=>{if(!this.disabled&&(e.preventDefault(),this.dragProp)){let t=this.mapToRange(e.clientX||e.pageX);if(p(this.value)&&this.dragProp==="minMaxValue")if(this.minValueDragRange&&this.maxValueDragRange&&this.minMaxValueRange){let a=t-this.minValueDragRange,i=t+this.maxValueDragRange;i<=this.max&&a>=this.min&&i-a===this.minMaxValueRange&&this.setValue({minValue:this.clamp(a,"minValue"),maxValue:this.clamp(i,"maxValue")})}else this.minValueDragRange=t-this.minValue,this.maxValueDragRange=this.maxValue-t,this.minMaxValueRange=this.maxValue-this.minValue;else this.setValue({[this.dragProp]:this.clamp(t,this.dragProp)})}},this.formatValue=e=>(L.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},L.localize(e.toString())),this.guid=`calcite-slider-${X()}`,this.messages=N({name:null}),this.pointerUpDragEnd=e=>{this.disabled||!_(e)||this.dragEnd(e)},this.maxValueDragRange=null,this.minMaxValueRange=null,this.minValueDragRange=null,this.tickValues=[],this.disabled=!1,this.fillPlacement="start",this.groupSeparator=!1,this.hasHistogram=!1,this.labelHandles=!1,this.labelTicks=!1,this.max=100,this.min=0,this.mirrored=!1,this.precise=!1,this.required=!1,this.scale="m",this.snap=!1,this.status="idle",this.step=1,this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.value=0,this.calciteSliderChange=w({cancelable:!1}),this.calciteSliderInput=w({cancelable:!1}),this.listen("pointerdown",this.pointerDownHandler),this.listen("keydown",this.handleKeyDown),this.listen("touchstart",this.handleTouchStart)}static{this.properties={maxValueDragRange:16,minMaxValueRange:16,minValueDragRange:16,tickValues:16,disabled:7,fillPlacement:3,form:3,groupSeparator:7,hasHistogram:7,histogram:0,histogramStops:0,labelFormatter:0,labelHandles:7,labelTicks:7,max:11,maxLabel:1,maxValue:9,min:11,minLabel:1,minValue:9,mirrored:7,name:3,numberingSystem:1,pageStep:11,precise:7,required:7,scale:3,snap:7,status:3,step:11,ticks:11,validationIcon:[3,{converter:O}],validationMessage:1,validity:0,value:11}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=ne}async setFocus(){await U(this),(this.minHandle?this.minHandle:this.maxHandle)?.focus()}connectedCallback(){super.connectedCallback(),this.setMinMaxFromValue(),this.setValueFromMinMax(),Z(this),K(this)}load(){A(this),p(this.value)||(this.value=this.snap?this.getClosestStep(this.value):this.clamp(this.value)),Q(this,this.value)}willUpdate(e){e.has("histogram")&&(this.hasHistogram=!!this.histogram),e.has("ticks")&&(this.tickValues=this.generateTickValues()),e.has("value")&&(this.hasUpdated||this.value!==0)&&this.setMinMaxFromValue(),(e.has("minValue")||e.has("maxValue"))&&this.setValueFromMinMax()}updated(){this.labelHandles&&(this.adjustHostObscuredHandleLabel("value"),p(this.value)&&(this.adjustHostObscuredHandleLabel("minValue"),this.precise&&!this.hasHistogram||this.hyphenateCollidingRangeHandleLabels())),this.hideObscuredBoundingTickLabels(),q(this)}loaded(){I(this)}disconnectedCallback(){super.disconnectedCallback(),ee(this),J(this),this.removeDragListeners()}handleKeyDown(e){let t=this.shouldMirror(),{activeProp:a,max:i,min:s,pageStep:r,step:o}=this,n=this[a],{key:h}=e;if(G(h)){e.preventDefault();return}let m;if(h==="ArrowUp"||h==="ArrowRight"?m=n+o*(t&&h==="ArrowRight"?-1:1):h==="ArrowDown"||h==="ArrowLeft"?m=n-o*(t&&h==="ArrowLeft"?-1:1):h==="PageUp"?r&&(m=n+r):h==="PageDown"?r&&(m=n-r):h==="Home"?m=s:h==="End"&&(m=i),isNaN(m))return;e.preventDefault();let d=Number(m.toFixed(T(o)));this.setValue({[a]:this.clamp(d,a)})}pointerDownHandler(e){if(this.disabled||!_(e))return;let t=e.clientX||e.pageX,a=this.mapToRange(t),i="value";p(this.value)&&(a>=this.minValue&&a<=this.maxValue&&this.lastDragProp==="minMaxValue"?i="minMaxValue":i=Math.abs(this.maxValue-a)<Math.abs(this.minValue-a)||a>=this.maxValue?"maxValue":"minValue"),this.lastDragPropValue=this[i],this.dragStart(i),this.el.shadowRoot.querySelector(`.${l.thumb}:active`)||this.setValue({[i]:this.clamp(a,i)}),this.focusActiveHandle(t)}handleTouchStart(e){e.preventDefault()}buildThumbType(e){let t=[e];return this.labelHandles&&t.push("labeled"),this.precise&&t.push("precise"),this.hasHistogram&&t.push("histogram"),t.join("-")}setValueFromMinMax(){let{minValue:e,maxValue:t}=this;typeof e=="number"&&typeof t=="number"&&(this.value=[e,t])}setMinMaxFromValue(){let{value:e}=this;p(e)&&(this.minValue=e[0],this.maxValue=e[1])}onLabelClick(){this.setFocus()}shouldMirror(){return this.mirrored&&!this.hasHistogram}shouldUseMinValue(){return p(this.value)?this.hasHistogram&&this.maxValue===0||!this.hasHistogram&&this.minValue===0:!1}getTickDensity(){let e=(this.max-this.min)/this.ticks/le;return e<1?1:e}generateTickValues(){let e=this.ticks??0;if(e<=0)return[];let t=[this.min],a=this.getTickDensity(),i=e*a,s=this.min;for(;s<this.max;)s+=i,t.push(Math.min(s,this.max));return t.includes(this.max)||t.push(this.max),t}onThumbBlur(){this.activeProp=null}onThumbFocus(e){let t=e.currentTarget;this.activeProp=t.getAttribute("data-value-prop")}onThumbPointerDown(e){let t=e.currentTarget;this.pointerDownDragStart(e,t.getAttribute("data-value-prop"))}onTrackPointerDown(e){this.pointerDownDragStart(e,"minMaxValue")}pointerDownDragStart(e,t){_(e)&&this.dragStart(t)}dragStart(e){this.dragProp=e,this.lastDragProp=this.dragProp,this.activeProp=e,window.addEventListener("pointermove",this.dragUpdate),window.addEventListener("pointerup",this.pointerUpDragEnd),window.addEventListener("pointercancel",this.dragEnd)}focusActiveHandle(e){this.dragProp==="minValue"?this.minHandle.focus():this.dragProp==="maxValue"||this.dragProp==="value"?this.maxHandle.focus():this.dragProp==="minMaxValue"&&this.getClosestHandle(e).focus()}emitInput(){this.calciteSliderInput.emit()}emitChange(){this.calciteSliderChange.emit()}removeDragListeners(){window.removeEventListener("pointermove",this.dragUpdate),window.removeEventListener("pointerup",this.pointerUpDragEnd),window.removeEventListener("pointercancel",this.dragEnd)}setValue(e){let t;Object.keys(e).forEach(a=>{let i=e[a];t||(t=this[a]!==i),this[a]=i}),t&&(this.dragProp||this.emitChange(),this.emitInput())}storeTrackRef(e){this.trackEl=e}storeThumbRef(e){e&&(e.getAttribute("data-value-prop")==="minValue"?this.minHandle=e:this.maxHandle=e)}clamp(e,t){return e=ae(e,this.min,this.max),t==="maxValue"&&(e=Math.max(e,this.minValue)),t==="minValue"&&(e=Math.min(e,this.maxValue)),e}mapToRange(e){let t=this.max-this.min,{left:a,width:i}=this.trackEl.getBoundingClientRect(),s=(e-a)/i,r=this.shouldMirror(),o=this.clamp(this.min+t*(r?1-s:s)),n=Number(o.toFixed(T(this.step)));return this.snap&&this.step?this.getClosestStep(n):n}getClosestStep(e){let{max:t,min:a,step:i}=this,s=new W(`${Math.floor((e-a)/i)}`).multiply(`${i}`).add(`${a}`).toString(),r=this.clamp(Number(s));return r>t&&(r-=i),r}getClosestHandle(e){return this.getDistanceX(this.maxHandle,e)>this.getDistanceX(this.minHandle,e)?this.minHandle:this.maxHandle}getDistanceX(e,t){return Math.abs(e.getBoundingClientRect().left-t)}getFontSizeForElement(e){return Number(window.getComputedStyle(e).getPropertyValue("font-size").match(/\d+/)[0])}getUnitInterval(e){e=this.clamp(e);let t=this.max-this.min;return(e-this.min)/t}adjustHostObscuredHandleLabel(e){let t=this.el.shadowRoot.querySelector(`.handle__label--${e}`),a=this.el.shadowRoot.querySelector(`.handle__label--${e}.static`),i=this.el.shadowRoot.querySelector(`.handle__label--${e}.transformed`),s=a.getBoundingClientRect(),r=this.getHostOffset(s.left,s.right);t.style.transform=`translateX(${r}px)`,i.style.transform=`translateX(${r}px)`}hyphenateCollidingRangeHandleLabels(){let{shadowRoot:e}=this.el,t=this.shouldMirror(),a=t?"value":"minValue",i=t?"minValue":"value",s=e.querySelector(`.handle__label--${a}`),r=e.querySelector(`.handle__label--${a}.static`),o=e.querySelector(`.handle__label--${a}.transformed`),n=this.getHostOffset(r.getBoundingClientRect().left,r.getBoundingClientRect().right),h=e.querySelector(`.handle__label--${i}`),m=e.querySelector(`.handle__label--${i}.static`),d=e.querySelector(`.handle__label--${i}.transformed`),u=this.getHostOffset(m.getBoundingClientRect().left,m.getBoundingClientRect().right),k=this.getFontSizeForElement(s),v=this.getRangeLabelOverlap(o,d),f=s,b=k/2;if(v>0){if(f.classList.add(l.hyphen,l.hyphenWrap),u===0&&n===0){let c=v/2-b;c=Math.sign(c)===-1?Math.abs(c):-c;let y=this.getHostOffset(o.getBoundingClientRect().left+c-b,o.getBoundingClientRect().right+c-b),V=v/2,M=this.getHostOffset(d.getBoundingClientRect().left+V,d.getBoundingClientRect().right+V);y!==0&&(c+=y,V+=y),M!==0&&(c+=M,V+=M),s.style.transform=`translateX(${c}px)`,o.style.transform=`translateX(${c-b}px)`,h.style.transform=`translateX(${V}px)`,d.style.transform=`translateX(${V}px)`}else if(n>0||u>0)s.style.transform=`translateX(${n+b}px)`,h.style.transform=`translateX(${v+u}px)`,d.style.transform=`translateX(${v+u}px)`;else if(n<0||u<0){let c=Math.abs(n)+v-b;c=Math.sign(c)===-1?Math.abs(c):-c,s.style.transform=`translateX(${c}px)`,o.style.transform=`translateX(${c-b}px)`}}else f.classList.remove(l.hyphen,l.hyphenWrap),s.style.transform=`translateX(${n}px)`,o.style.transform=`translateX(${n}px)`,h.style.transform=`translateX(${u}px)`,d.style.transform=`translateX(${u}px)`}hideObscuredBoundingTickLabels(){let e=p(this.value);if(!this.hasHistogram&&!e&&!this.labelHandles&&!this.precise||!this.hasHistogram&&!e&&this.labelHandles&&!this.precise||!this.hasHistogram&&!e&&!this.labelHandles&&this.precise||!this.hasHistogram&&!e&&this.labelHandles&&this.precise||!this.hasHistogram&&e&&!this.precise||this.hasHistogram&&!this.precise&&!this.labelHandles)return;let t=this.el.shadowRoot.querySelector(`.${l.thumbMinValue}`),a=this.el.shadowRoot.querySelector(`.${l.thumbValue}`),i=this.el.shadowRoot.querySelector(`.${l.tickMin}`),s=this.el.shadowRoot.querySelector(`.${l.tickMax}`);!t&&a&&i&&s&&(i.style.opacity=this.isMinTickLabelObscured(i,a)?"0":"1",s.style.opacity=this.isMaxTickLabelObscured(s,a)?"0":"1"),t&&a&&i&&s&&(i.style.opacity=this.isMinTickLabelObscured(i,t)||this.isMinTickLabelObscured(i,a)?"0":"1",s.style.opacity=this.isMaxTickLabelObscured(s,t)||this.isMaxTickLabelObscured(s,a)&&this.hasHistogram?"0":"1")}getHostOffset(e,t){let a=this.el.getBoundingClientRect(),i=7;return e+i<a.left?a.left-e-i:t-i>a.right?-(t-a.right)+i:0}getRangeLabelOverlap(e,t){let a=e.getBoundingClientRect(),i=t.getBoundingClientRect(),s=this.getFontSizeForElement(e),r=a.right+s-i.left;return Math.max(r,0)}isMinTickLabelObscured(e,t){let a=e.getBoundingClientRect(),i=t.getBoundingClientRect();return H(a,i)}isMaxTickLabelObscured(e,t){let a=e.getBoundingClientRect(),i=t.getBoundingClientRect();return H(a,i)}internalLabelFormatter(e,t){let a=this.labelFormatter;return a?a(e,t,this.formatValue)??this.formatValue(e):this.formatValue(e)}render(){let e=this.el.id||this.guid,t=p(this.value)?this.maxValue:this.value,a=this.minValue||this.min,i=this.shouldUseMinValue(),s=this.getUnitInterval(i?this.minValue:a)*100,r=this.getUnitInterval(t)*100,o=this.shouldMirror(),n=p(this.value),h=this.buildThumbType("max"),m=this.renderThumb({type:h,thumbPlacement:h.includes("histogram")?"below":"above",maxInterval:r,minInterval:s,mirror:o}),d=this.buildThumbType("min"),u=n?this.renderThumb({type:d,thumbPlacement:d.includes("histogram")||d.includes("precise")?"below":"above",maxInterval:r,minInterval:s,mirror:o}):null,k=n?"start":this.fillPlacement,v=k==="none"?{left:"unset",right:"unset"}:k==="end"?{left:`${o?s:r}%`,right:`${o?r:s}%`}:{left:`${o?100-r:s}%`,right:`${o?s:100-r}%`};return F(this.el,"id",e),j({disabled:this.disabled,children:x`<div aria-errormessage=${se.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaLabel=${te(this)} class=${g({[l.container]:!0,[l.containerRange]:n,[`scale--${this.scale}`]:!0})}>${this.renderGraph()}<div class=${g(l.track)} ${R(this.storeTrackRef)}><div class=${g(l.trackRange)} @pointerdown=${this.onTrackPointerDown} style=${$(v)}></div><div class=${g(l.ticks)}>${this.tickValues.map(f=>{let b=`${this.getUnitInterval(f)*100}%`,c=!1;if(k==="start"||k==="end")if(i)c=f>=this.minValue&&f<=this.maxValue;else{let y=k==="start"?a:t,V=k==="start"?t:this.max;c=f>=y&&f<=V}return x`<span class=${g({[l.tick]:!0,[l.tickActive]:c})} style=${$({left:o?"":b,right:o?b:""})}>${this.renderTickLabel(f)}</span>`})}</div></div><div class=${g(l.thumbContainer)}>${u}${m}${Y({component:this})}</div></div>${this.validationMessage&&this.status==="invalid"?ie({icon:this.validationIcon,id:se.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}renderThumb({type:e,mirror:t,thumbPlacement:a,minInterval:i,maxInterval:s}){let r=e.includes("labeled"),o=e.includes("precise"),n=e.includes("min"),h=p(this.value),m=n?this.minValue:h?this.maxValue:this.value,d=n?"minValue":h?"maxValue":"value",u=n?this.minLabel:h?this.maxLabel:this.minLabel,k=n?this.minValue:m,v=d==="minValue"?this.internalLabelFormatter(this.minValue,"min"):d==="maxValue"?this.internalLabelFormatter(this.maxValue,"max"):this.internalLabelFormatter(m,"value"),f=n?{left:`${t?100-i:i}%`}:{right:`${t?s:100-s}%`},b=`${l.handleLabel} ${n?l.handleLabelMinValue:l.handleLabelValue}`,c=[...r?[x`<span aria-hidden=true class=${g(b)}>${v}</span>`,x`<span aria-hidden=true class=${`${b} ${l.static}`}>${v}</span>`,x`<span aria-hidden=true class=${`${b} ${l.transformed}`}>${v}</span>`]:[],x`<div class=${g(l.handle)}></div>`,o&&x`<div class=${g(l.handleExtension)}></div>`||""];return a==="below"&&c.reverse(),B(e,x`<div .ariaLabel=${u} aria-orientation=horizontal .ariaValueMax=${this.max} .ariaValueMin=${this.min} .ariaValueNow=${k} class=${g({[l.thumb]:!0,[l.thumbValue]:!n,[l.thumbActive]:this.lastDragProp!=="minMaxValue"&&this.dragProp===d,[l.thumbPrecise]:o,[l.thumbMinValue]:n})} data-value-prop=${d??z} @blur=${this.onThumbBlur} @focus=${this.onThumbFocus} @pointerdown=${this.onThumbPointerDown} role=slider style=${$(f)} tabindex=0 ${R(this.storeThumbRef)}>${c}</div>`)}renderGraph(){return this.histogram?x`<calcite-graph class=${g(l.graph)} .colorStops=${this.histogramStops} .data=${this.histogram} .highlightMax=${p(this.value)?this.maxValue:this.value} .highlightMin=${p(this.value)?this.minValue:this.min} .max=${this.max} .min=${this.min}></calcite-graph>`:null}renderTickLabel(e){let{hasHistogram:t,labelHandles:a,labelTicks:i,max:s,min:r,precise:o,value:n}=this,h=p(n),m=e===r,d=e===s,u=m||d;return i&&(!t&&(u||!o||!h)||t&&(u||!o&&!a))?x`<span class=${g({[l.tickLabel]:!0,[l.tickMin]:m,[l.tickMax]:d})}>${this.internalLabelFormatter(e,"tick")}</span>`:null}};E("calcite-slider",D);export{D as Slider};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
4
|
-
* v3.0.0-next.
|
|
4
|
+
* v3.0.0-next.30
|
|
5
5
|
*/
|
|
6
|
-
import{f as m,j as b}from"./
|
|
6
|
+
import{f as m,j as b}from"./UD5XHM6V.js";import"./LVOCUTM2.js";import{a as r}from"./TZWDUBRU.js";import{A as e,B as s,C as i,M as n,a as c,w as a,z as l}from"./BAQJPIM4.js";var t={list:"list",label:"label",title:"title"},x=a`.scale--s{font-size:var(--calcite-font-size--2);line-height:1rem;--calcite-combobox-item-spacing-unit-l: .5rem;--calcite-combobox-item-spacing-unit-s: .25rem;--calcite-combobox-item-spacing-indent: .5rem}.scale--m{font-size:var(--calcite-font-size--1);line-height:1rem;--calcite-combobox-item-spacing-unit-l: .75rem;--calcite-combobox-item-spacing-unit-s: .5rem;--calcite-combobox-item-spacing-indent: .75rem}.scale--l{font-size:var(--calcite-font-size-0);line-height:1.25rem;--calcite-combobox-item-spacing-unit-l: 1rem;--calcite-combobox-item-spacing-unit-s: .75rem;--calcite-combobox-item-spacing-indent: 1rem}:host,.list{margin:0;display:flex;flex-direction:column;padding:0}:host(:focus),.list:focus{outline:2px solid transparent;outline-offset:2px}.label{box-sizing:border-box;display:flex;inline-size:100%;min-inline-size:0px;max-inline-size:100%;color:var(--calcite-color-text-3)}.title{--calcite-combobox-item-indent-value: calc( var(--calcite-combobox-item-spacing-indent) * var(--calcite-combobox-item-spacing-indent-multiplier) );border:0 solid;display:block;flex:1 1 0%;border-block-end-width:1px;font-weight:var(--calcite-font-weight-bold);color:var(--calcite-color-text-2);word-wrap:break-word;word-break:break-word;border-block-end-color:var(--calcite-color-border-3);padding-block:var(--calcite-combobox-item-spacing-unit-l);padding-inline:var(--calcite-combobox-item-spacing-unit-s);margin-inline-start:var(--calcite-combobox-item-indent-value)}::slotted(calcite-combobox-item-group:not([after-empty-group])){padding-block-start:var(--calcite-combobox-item-spacing-unit-l)}:host([hidden]){display:none}[hidden]{display:none}`,o=class extends l{constructor(){super(...arguments),this.guid=r(),this.afterEmptyGroup=!1,this.scale="m"}static{this.properties={afterEmptyGroup:7,ancestors:0,label:1,scale:1}}static{this.styles=x}connectedCallback(){super.connectedCallback(),this.ancestors=m(this.el)}render(){let{el:p,scale:d}=this,g=b(p);return c`<ul aria-labelledby=${this.guid??i} class=${e({[t.list]:!0,[`scale--${d}`]:!0})} role=group><li class=${e({[t.label]:!0})} id=${this.guid??i} role=presentation style=${s({"--calcite-combobox-item-spacing-indent-multiplier":`${g}`})}><span class=${e(t.title)}>${this.label}</span></li><slot></slot></ul>`}};n("calcite-combobox-item-group",o);export{o as ComboboxItemGroup};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
4
|
-
* v3.0.0-next.
|
|
4
|
+
* v3.0.0-next.30
|
|
5
5
|
*/
|
|
6
|
-
import{j as b,k as v}from"./
|
|
6
|
+
import{j as b,k as v}from"./LVOCUTM2.js";import{a as g}from"./BAQJPIM4.js";var A=["calcite-input","calcite-input-number","calcite-input-text","calcite-text-area"];function w(t){return`${t.split("-").map((e,i)=>i===0?e:`${e[0].toUpperCase()}${e.slice(1)}`).join("")}${A.includes(t)?"Input":"Change"}`}var m="hidden-form-input";function h(t){return"checked"in t}var p=new WeakMap,E=new WeakSet;function q(t,e){if(v(e.parentElement,"[form]"))return!0;let i="calciteInternalFormComponentRegister",n=!1;return t.addEventListener(i,a=>{n=a.composedPath().some(s=>E.has(s)),a.stopPropagation()},{once:!0}),e.dispatchEvent(new CustomEvent(i,{bubbles:!0,composed:!0})),n}function F(t,{status:e,message:i,icon:n}){"status"in t&&(t.status=e),"validationIcon"in t&&typeof t.validationIcon!="string"&&(t.validationIcon=n),"validationMessage"in t&&!t.validationMessage&&(t.validationMessage=i)}function C(t){return t.nodeName==="CALCITE-RADIO-BUTTON"?v(t,"calcite-radio-button-group"):t}var $=new CustomEvent("calciteInvalid",{bubbles:!0,composed:!0});function I(t){let e=t?.target,i=e?.validationMessage,n=C(e?.parentElement);if(!n)return;let a=n?.nodeName?.toLowerCase(),s=a?.split("-");if(s.length<2||s[0]!=="calcite")return;t?.preventDefault(),"validity"in n&&(n.validity=e?.validity),n.dispatchEvent($),F(n,{message:i,icon:!0,status:"invalid"});let c=w(a);n.addEventListener(c,()=>{"status"in n&&(n.status="idle"),"validationIcon"in n&&(n.validationIcon===""||n.validationIcon===!0)&&(n.validationIcon=!1),"validationMessage"in n&&n.validationMessage===i&&(n.validationMessage=""),"validity"in n&&(n.validity=e?.validity)},{once:!0})}function N(t){let{formEl:e}=t;return e?(e.addEventListener("invalid",I,!0),e.requestSubmit(),e.removeEventListener("invalid",I,!0),requestAnimationFrame(()=>{let i=e.querySelectorAll("[status=invalid]");for(let n of i)if(n?.validationMessage){n?.setFocus();break}}),!0):!1}function O(t){t.formEl?.reset()}function P(t){let{el:e,value:i}=t,n=S(t);if(!n||q(n,e))return;t.formEl=n,t.defaultValue=i,h(t)&&(t.defaultChecked=t.checked);let a=(t.onFormReset||V).bind(t);n.addEventListener("reset",a),p.set(t.el,a),E.add(e)}function S(t){let{el:e,form:i}=t;return i?b(e,{id:i}):v(e,"form")}function V(){if("status"in this&&(this.status="idle"),"validationIcon"in this&&(this.validationIcon=!1),"validationMessage"in this&&(this.validationMessage=""),h(this)){this.checked=this.defaultChecked;return}this.value=this.defaultValue}function T(t){let{el:e,formEl:i}=t;if(!i)return;let n=p.get(e);i.removeEventListener("reset",n),p.delete(e),t.formEl=null,E.delete(e)}function W(t,e){t.defaultValue=e}var x="calciteInternalHiddenInputInput",M=t=>{t.target.dispatchEvent(new CustomEvent(x,{bubbles:!0}))},y=t=>t.removeEventListener("input",M);function D(t){let{el:e,formEl:i,name:n,value:a}=t,{ownerDocument:s}=e,c=e.querySelectorAll(`input[slot="${m}"]`);if(!i||!n){c.forEach(o=>{y(o),o.remove()});return}let f=Array.isArray(a)?a:[a],r=[],d=new Set;c.forEach(o=>{let l=f.find(L=>L==o.value);l!=null?(d.add(l),k(t,o,l)):r.push(o)});let u;f.forEach(o=>{if(d.has(o))return;let l=r.pop();l||(l=s.createElement("input"),l.slot=m),u||(u=s.createDocumentFragment()),u.append(l),l.addEventListener("input",M),k(t,l,o)}),u&&e.append(u),r.forEach(o=>{y(o),o.remove()})}function k(t,e,i){let{defaultValue:n,disabled:a,form:s,name:c,required:f}=t;e.defaultValue=n,e.disabled=a,e.name=c,e.required=f,e.tabIndex=-1,s?e.setAttribute("form",s):e.removeAttribute("form"),h(t)?(e.checked=t.checked,e.defaultChecked=t.defaultChecked,e.value=t.checked?i||"on":""):e.value=i||"",t.syncHiddenFormInput?.(e);let r=C(t.el);if(r&&"validity"in r)for(let d in{...e?.validity})r.validity[d]=e.validity[d]}var B=({component:t})=>(D(t),g`<slot name=${m}></slot>`);export{N as a,O as b,P as c,S as d,T as e,W as f,x as g,B as h};
|