@esri/calcite-components 5.0.0-next.24 → 5.0.0-next.26
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/cdn/{RXMFCMPL.js → 2CFMML7J.js} +2 -2
- package/dist/cdn/{P2QT6AS5.js → 2FZFM5NL.js} +2 -2
- package/dist/cdn/{JGASNMHN.js → 2U3HRPBE.js} +2 -2
- package/dist/cdn/{ROD5TPA7.js → 2XHAGMKL.js} +2 -2
- package/dist/cdn/{INRPXIYH.js → 3ILU5HMO.js} +2 -2
- package/dist/cdn/{DUEETZLL.js → 3LX4UEMG.js} +2 -2
- package/dist/cdn/{QDJATE7S.js → 3RCYATIP.js} +1 -1
- package/dist/cdn/{DQ42326G.js → 3S24RP6Q.js} +2 -2
- package/dist/cdn/{7AS7XMSH.js → 3T7FBLY4.js} +2 -2
- package/dist/cdn/{HZ57T5MG.js → 3YNQI3NO.js} +2 -2
- package/dist/cdn/{B3PJ7WKM.js → 432I5L6K.js} +2 -2
- package/dist/cdn/{64OWR3JT.js → 47DFYWT7.js} +1 -1
- package/dist/cdn/{MLXLOWSQ.js → 4A5BQ3P6.js} +2 -2
- package/dist/cdn/{XVYK6WRH.js → 4FZKOFIT.js} +2 -2
- package/dist/cdn/{5Z4VZS4K.js → 4VRO7HIK.js} +2 -2
- package/dist/cdn/{VKUS34R6.js → 52WSL3OS.js} +2 -2
- package/dist/cdn/{W35ZAP2H.js → 5DDVN7VT.js} +2 -2
- package/dist/cdn/{SF7R62RN.js → 5N76V6DK.js} +2 -2
- package/dist/cdn/{ZT6GWFZI.js → 5O4F6PZJ.js} +2 -2
- package/dist/cdn/{HKWN6UGZ.js → 5U7ADNIZ.js} +2 -2
- package/dist/cdn/{A23GHMZS.js → 5XAHBWEI.js} +1 -1
- package/dist/cdn/{ABX4FUH2.js → 62ZCKEBN.js} +2 -2
- package/dist/cdn/{UIOMWJYX.js → 6AV5OUAI.js} +1 -1
- package/dist/cdn/{EQ25YK3K.js → 6F7MIVOD.js} +2 -2
- package/dist/cdn/{FHFC32UV.js → 6FPWFMQD.js} +2 -2
- package/dist/cdn/{VKYWVVT7.js → 6L2CD66G.js} +2 -2
- package/dist/cdn/{T6I2EM3C.js → 6N2MAGTM.js} +2 -2
- package/dist/cdn/{3PXVP76T.js → 6SRTCZUL.js} +2 -2
- package/dist/cdn/{FR2S7C3P.js → 77223OGR.js} +2 -2
- package/dist/cdn/{E77DQ4KK.js → 7A5GUUXX.js} +2 -2
- package/dist/cdn/{SXCRQKQY.js → 7BPYHEOW.js} +2 -2
- package/dist/cdn/{IVLZA447.js → 7DAYYO7G.js} +2 -2
- package/dist/cdn/7JL3ZCM4.js +4 -0
- package/dist/cdn/{VKBFZH3Q.js → 7UWIO6G4.js} +2 -2
- package/dist/cdn/{DS3SRYAQ.js → AHIQKX5F.js} +2 -2
- package/dist/cdn/{LRVS2JUS.js → AQU252UZ.js} +2 -2
- package/dist/cdn/{YMVT43WJ.js → ARB4Q3GY.js} +2 -2
- package/dist/cdn/{N6LPJTW6.js → B4QK4RBC.js} +2 -2
- package/dist/cdn/{UU5FHZ2A.js → B5UWHKTV.js} +2 -2
- package/dist/cdn/{TSV5UHSA.js → BC6T7LXX.js} +2 -2
- package/dist/cdn/{XZO7FJUM.js → BJWZNEE6.js} +1 -1
- package/dist/cdn/{VD6FGGZF.js → BOOYLMNS.js} +2 -2
- package/dist/cdn/{HV2P4FIA.js → BS6FO7VM.js} +2 -2
- package/dist/cdn/{65JNHBZY.js → BY6FQDGD.js} +2 -2
- package/dist/cdn/{CXUNMY3L.js → BYDTCRJO.js} +2 -2
- package/dist/cdn/{FOE57QJC.js → CHVB7IKL.js} +2 -2
- package/dist/cdn/{UMESQ2SZ.js → CWNLGPSB.js} +1 -1
- package/dist/cdn/{TGVFSTVL.js → D5UX7ECF.js} +2 -2
- package/dist/cdn/{6VG4XLEA.js → D7OBAVZT.js} +2 -2
- package/dist/cdn/{IWBVUYFH.js → DJVTADL7.js} +2 -2
- package/dist/cdn/{CIXVZEV7.js → DT3IOU7S.js} +2 -2
- package/dist/cdn/{CVJIPPM6.js → DTSRU6CW.js} +2 -2
- package/dist/cdn/{XSY4ZNEV.js → DXQFA7YZ.js} +1 -1
- package/dist/cdn/{J3RGQY47.js → E2CJ3WMN.js} +2 -2
- package/dist/cdn/{SYBWNCBH.js → E4EYXCOT.js} +1 -1
- package/dist/cdn/{MDZPHKB4.js → E5D5DLBW.js} +2 -2
- package/dist/cdn/{7LRIRIIW.js → E5QC5ISI.js} +2 -2
- package/dist/cdn/{6N3LZJTK.js → EC6EAHTF.js} +2 -2
- package/dist/cdn/{2ZOH7S3X.js → EPA5EBO4.js} +2 -2
- package/dist/cdn/{GVMJTZ2P.js → ET5LOAXJ.js} +2 -2
- package/dist/cdn/{LNVURAF5.js → EVY5PGRH.js} +2 -2
- package/dist/cdn/{OGYCI2CL.js → EYU5DTMI.js} +1 -1
- package/dist/cdn/{A7AWHUCH.js → FAT3Y2BN.js} +1 -1
- package/dist/cdn/{ZK5AVU4C.js → FE7MC2RS.js} +2 -2
- package/dist/cdn/{5N3W5VQK.js → FMKQR3NY.js} +2 -2
- package/dist/cdn/FRO3DRWQ.js +4 -0
- package/dist/cdn/{I7ZBOKLZ.js → FW2WJAMV.js} +2 -2
- package/dist/cdn/{MP7KZIIK.js → GA2OVDMV.js} +2 -2
- package/dist/cdn/{JSENW2PE.js → H7FAIOG4.js} +2 -2
- package/dist/cdn/{UFYXZGUB.js → HBGTAWK3.js} +1 -1
- package/dist/cdn/{FGML73RG.js → HKSOVKSS.js} +2 -2
- package/dist/cdn/{XTRBN5YJ.js → HMQK4NHX.js} +2 -2
- package/dist/cdn/{ZXFBTRZK.js → HN42KFKY.js} +2 -2
- package/dist/cdn/{EK3BWMVE.js → HTSVYMIU.js} +1 -1
- package/dist/cdn/{ROMI2N47.js → HWAZHT5V.js} +2 -2
- package/dist/cdn/{POEYFZSS.js → HXVXKTPF.js} +2 -2
- package/dist/cdn/{3GTQIH43.js → HY7V66E2.js} +2 -2
- package/dist/cdn/{B7FZNIZA.js → IEHTF4JJ.js} +2 -2
- package/dist/cdn/{FWBHWDFV.js → IIG6KL5B.js} +2 -2
- package/dist/cdn/{7YBTXCJ6.js → IILDTQRG.js} +2 -2
- package/dist/cdn/{MZFN2QZ5.js → IMNNSECB.js} +2 -2
- package/dist/cdn/{ZR6O4LWY.js → IOMZGRK4.js} +2 -2
- package/dist/cdn/{P5TBKTLI.js → IZG6SCFX.js} +1 -1
- package/dist/cdn/{QVASZAU7.js → JALLQ642.js} +2 -2
- package/dist/cdn/{7JHWOII6.js → JHMUWWQC.js} +2 -2
- package/dist/cdn/K424XZFZ.js +4 -0
- package/dist/cdn/KNWKHZDP.js +4 -0
- package/dist/cdn/{RW2TFUMT.js → KQHZTEQA.js} +2 -2
- package/dist/cdn/{XLFAHCLR.js → KQUCKRP3.js} +2 -2
- package/dist/cdn/{4L3PUFV5.js → L2HPOBTI.js} +2 -2
- package/dist/cdn/{EEP4X23G.js → LJHB3MJX.js} +2 -2
- package/dist/cdn/{ZOMCYKBQ.js → LKLTEHWQ.js} +2 -2
- package/dist/cdn/{MT4G6FVR.js → LLHJY7FO.js} +2 -2
- package/dist/cdn/{FBB3QKEK.js → M7GQJBGE.js} +2 -2
- package/dist/cdn/{VKQIGKNF.js → MAHGPUV2.js} +2 -2
- package/dist/cdn/{3DZK3RG7.js → MD5WJSZN.js} +1 -1
- package/dist/cdn/{7TNANCRK.js → MI2ILVKK.js} +2 -2
- package/dist/cdn/{QAENC5XP.js → MIOMU44N.js} +2 -2
- package/dist/cdn/{SCBC66SJ.js → MUXHUU6U.js} +1 -1
- package/dist/cdn/{EF4DIHKW.js → MW5EJLCT.js} +2 -2
- package/dist/cdn/{TDVBV4VJ.js → MYTCFLOM.js} +2 -2
- package/dist/cdn/{KG2CHPZF.js → N4XJYQRH.js} +2 -2
- package/dist/cdn/{37Y6G3TP.js → NBGXBSR4.js} +2 -2
- package/dist/cdn/{4HT7QTCF.js → NFJBMBKC.js} +2 -2
- package/dist/cdn/{ROUUIU6Y.js → NZM73CDI.js} +2 -2
- package/dist/cdn/{EHS7VTJ2.js → OEZPBK7R.js} +2 -2
- package/dist/cdn/{N5L6H66L.js → OIC2PJSR.js} +2 -2
- package/dist/cdn/{KT64TXJN.js → ONWB4LLN.js} +2 -2
- package/dist/cdn/{PGIQOKHX.js → P4SFTOL2.js} +2 -2
- package/dist/cdn/{VEAPKWDV.js → PGQ556IU.js} +2 -2
- package/dist/cdn/{E7UJ63CV.js → PIS5J4L6.js} +2 -2
- package/dist/cdn/{FGRR2V5E.js → PJPCM6TA.js} +2 -2
- package/dist/cdn/{FECXXF6W.js → PLDBKZJU.js} +2 -2
- package/dist/cdn/{HPUWSQFC.js → PUM2TUJT.js} +2 -2
- package/dist/cdn/{SZSUAKMM.js → QIWQPYMD.js} +2 -2
- package/dist/cdn/{RXUXWSUW.js → QKW5HNIF.js} +1 -1
- package/dist/cdn/{RXQFLYN4.js → QOYXWNLB.js} +2 -2
- package/dist/cdn/{K6FSYEUE.js → QPLV643W.js} +2 -2
- package/dist/cdn/{TIER2ZLB.js → QZKEE2GW.js} +2 -2
- package/dist/cdn/{M7JPJNTA.js → RBBDKUN4.js} +2 -2
- package/dist/cdn/{6A4TA3W6.js → RC6OSJIM.js} +2 -2
- package/dist/cdn/{YJJIQDE4.js → RLKDPOH2.js} +1 -1
- package/dist/cdn/{LLUKLUGG.js → RSG7A2EY.js} +2 -2
- package/dist/cdn/{GAXQ53KY.js → S3LMUVIR.js} +2 -2
- package/dist/cdn/{6FS7L25A.js → SBRSHLCL.js} +2 -2
- package/dist/cdn/{W2BGQHG5.js → SLBOIPUI.js} +2 -2
- package/dist/cdn/{CD3UAK2W.js → SMB2EQKM.js} +2 -2
- package/dist/cdn/{BXP3OZKK.js → SOCINMJ3.js} +2 -2
- package/dist/cdn/{FTNFA7JP.js → SRXKNFWZ.js} +2 -2
- package/dist/cdn/{YI6NNNSO.js → SUF3BEFB.js} +2 -2
- package/dist/cdn/{OYAC2J2Y.js → SVGBKLP3.js} +2 -2
- package/dist/cdn/{VYBIOJ5F.js → SZYDF2UZ.js} +1 -1
- package/dist/cdn/{E76C5Q66.js → TB54TF7D.js} +2 -2
- package/dist/cdn/{VATCFN3O.js → TGB6THII.js} +2 -2
- package/dist/cdn/{5BSD56V7.js → TJQWEEWG.js} +2 -2
- package/dist/cdn/{L2VNGTSR.js → TOJWPJZO.js} +2 -2
- package/dist/cdn/{DE3MMB5H.js → TQDSVXLJ.js} +2 -2
- package/dist/cdn/{HA5H546A.js → TU3YLD2E.js} +2 -2
- package/dist/cdn/{YOIIQPES.js → TVHBJX3S.js} +2 -2
- package/dist/cdn/{FNUQ3EYP.js → UE6N72DC.js} +2 -2
- package/dist/cdn/{P32RYVRE.js → UFXOUOBW.js} +2 -2
- package/dist/cdn/{CF3UKACA.js → UGKRXWQA.js} +2 -2
- package/dist/cdn/{HSHIW42B.js → UJORWXAT.js} +2 -2
- package/dist/cdn/{PDKKWI65.js → UK5M4QCY.js} +2 -2
- package/dist/cdn/{7N6CMTWP.js → UQIFZG6A.js} +2 -2
- package/dist/cdn/{FSCKWGCN.js → UR6UPX4T.js} +2 -2
- package/dist/cdn/{SZFWQYM7.js → USQILMSK.js} +2 -2
- package/dist/cdn/{EGNG7FQV.js → UTDL752M.js} +2 -2
- package/dist/cdn/{FVRYO4N6.js → VMAECY3E.js} +2 -2
- package/dist/cdn/{W5MT6SED.js → VMISRU6U.js} +2 -2
- package/dist/cdn/{RSBYLF4I.js → VR7J7K4K.js} +2 -2
- package/dist/cdn/{3BDPJILM.js → VRI45OLI.js} +1 -1
- package/dist/cdn/{XQNQRWRJ.js → W7GKGD7L.js} +2 -2
- package/dist/cdn/{Y357OZZO.js → WHUJJZKU.js} +2 -2
- package/dist/cdn/{MFBAIO26.js → WIKB25QH.js} +1 -1
- package/dist/cdn/WL4H37YF.js +4 -0
- package/dist/cdn/{4JL57EDA.js → WUWREGJO.js} +1 -1
- package/dist/cdn/{B6CQHSFM.js → WVPOSWB7.js} +2 -2
- package/dist/cdn/{NA32NW6F.js → WYWH3B2F.js} +2 -2
- package/dist/cdn/{MHSOQCTX.js → X5M5H7V5.js} +2 -2
- package/dist/cdn/{VJ7Q2QJV.js → XHNHEAWO.js} +1 -1
- package/dist/cdn/{7T2AINDJ.js → XTCTFLEI.js} +2 -2
- package/dist/cdn/{ETB57U7D.js → XUXUXKVY.js} +2 -2
- package/dist/cdn/{ZGJEWTXH.js → YL6AVWLZ.js} +2 -2
- package/dist/cdn/{THL7ZCGZ.js → YNSRHIEC.js} +2 -2
- package/dist/cdn/{7NLFZEAY.js → YOAHZBK4.js} +2 -2
- package/dist/cdn/YRXGH5DY.js +4 -0
- package/dist/cdn/{L25S477Y.js → YSWB2MUY.js} +1 -1
- package/dist/cdn/{SEJUC6NB.js → YX3LSUMD.js} +2 -2
- package/dist/cdn/{6AIJERHD.js → ZFALE3R5.js} +2 -2
- package/dist/cdn/{GS362P6K.js → ZKY4KTD2.js} +1 -1
- package/dist/cdn/{LKTMTZEF.js → ZMB25IZB.js} +2 -2
- package/dist/cdn/{WNAJZNVH.js → ZOG53OH5.js} +2 -2
- package/dist/cdn/assets/icon/fileEsl16.json +1 -0
- package/dist/cdn/assets/icon/fileEsl24.json +1 -0
- package/dist/cdn/assets/icon/fileEsl32.json +1 -0
- package/dist/cdn/index.js +2 -2
- package/dist/chunks/ExpandToggle.js +5 -1
- package/dist/chunks/FloatingArrow.js +1 -1
- package/dist/chunks/Heading.js +1 -1
- package/dist/chunks/InternalLabel.js +1 -1
- package/dist/chunks/Validation.js +1 -1
- package/dist/chunks/XButton.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/form.js +1 -1
- package/dist/chunks/global.js +1 -1
- package/dist/chunks/guid.js +1 -1
- package/dist/chunks/header.js +1 -1
- package/dist/chunks/input.js +1 -1
- package/dist/chunks/interact.min.js +1 -1
- package/dist/chunks/key.js +1 -1
- package/dist/chunks/label.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/resources8.js +1 -1
- package/dist/chunks/responsive.js +1 -1
- package/dist/chunks/runtime.js +4 -4
- package/dist/chunks/sortable.js +1 -1
- package/dist/chunks/sortableComponent.js +1 -1
- package/dist/chunks/text.js +1 -1
- package/dist/chunks/useCancelable.js +1 -1
- package/dist/chunks/useFocusTrap.js +1 -1
- package/dist/chunks/useInteractive.js +1 -1
- package/dist/chunks/usePreventDocumentScroll.js +1 -1
- package/dist/chunks/useSetFocus.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/chunks/useTime.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.d.ts +2 -2
- package/dist/components/calcite-action/customElement.js +2 -2
- package/dist/components/calcite-action-bar/customElement.js +41 -4
- package/dist/components/calcite-action-bar/utils.d.ts +1 -0
- package/dist/components/calcite-action-group/customElement.d.ts +15 -1
- package/dist/components/calcite-action-group/customElement.js +72 -4
- package/dist/components/calcite-action-menu/customElement.js +1 -1
- package/dist/components/calcite-action-pad/customElement.js +40 -3
- package/dist/components/calcite-alert/customElement.js +1 -1
- package/dist/components/calcite-autocomplete/customElement.js +1 -1
- package/dist/components/calcite-autocomplete-item/customElement.js +1 -1
- package/dist/components/calcite-autocomplete-item-group/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-group/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 +1 -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 +2 -2
- 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-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 +2 -2
- 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-panel/customElement.js +2 -2
- package/dist/components/calcite-slider/customElement.js +1 -1
- package/dist/components/calcite-sort-handle/customElement.js +2 -2
- 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 +2 -2
- package/dist/components/calcite-stepper-item/customElement.js +1 -1
- package/dist/components/calcite-swatch/customElement.js +1 -1
- package/dist/components/calcite-swatch-group/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 +2 -2
- 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-time-picker/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 +66 -10
- package/dist/docs/docs.json +39 -4
- package/dist/docs/vscode.html-custom-data.json +18 -0
- package/dist/docs/web-types.json +20 -2
- package/dist/index.js +1 -1
- package/dist/loader.js +2 -2
- package/dist/types/lumina.d.ts +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/dist/types/preact10.d.ts +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/stencil.d.ts +1 -1
- package/package.json +3 -3
- package/dist/cdn/3YP7PDPY.js +0 -4
- package/dist/cdn/I2COEUMU.js +0 -4
- package/dist/cdn/KRXG7RTQ.js +0 -4
- package/dist/cdn/WMFPEE5T.js +0 -4
- package/dist/cdn/WQ2CNT76.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as S}from"./J3RGQY47.js";import{c as h,e as C,f as L,g as O,h as R,i as p}from"./PGIQOKHX.js";import{a as H}from"./7NLFZEAY.js";import"./VKUS34R6.js";import"./UMESQ2SZ.js";import{h as k,j as y}from"./W35ZAP2H.js";import{a as b}from"./EK3BWMVE.js";import{B as c,C as d,D as T,E as l,H as w,P as E,g as v,h as g,o as s}from"./GAXQ53KY.js";var P={positionContainer:"position-container",container:"container"},U="calcite-tooltip",z={host:n=>`${U}-${n}`},m=300,F=m/3,N=m*1.5,x="aria-describedby";function I(n){let{referenceElement:e}=n;return(typeof e=="string"?y(n,{id:e}):e)||null}var f=class{constructor(){this.registeredElements=new WeakMap,this.registeredShadowRootCounts=new WeakMap,this.hoverOpenTimeout=null,this.hoverCloseTimeout=null,this.activeTooltip=null,this.registeredElementCount=0,this.clickedTooltip=null,this.hoveredTooltip=null,this.queryTooltip=e=>{let{registeredElements:t}=this,i=e.find(o=>t.has(o));return t.get(i)},this.keyDownHandler=e=>{if(e.key==="Escape"&&!e.defaultPrevented){let{activeTooltip:t}=this;if(t?.open){this.clearHoverTimeout(),this.closeActiveTooltip();let i=I(t),o=e.composedPath();(i instanceof Element&&o.includes(i)||o.includes(t))&&e.preventDefault()}}},this.pointerLeaveHandler=e=>{e.defaultPrevented||(this.clearHoverTimeout(),this.closeHoveredTooltip())},this.pointerMoveHandler=e=>{if(e.defaultPrevented){this.closeHoveredTooltip();return}let t=e.composedPath(),i=this.queryTooltip(t);if(this.pathHasOpenTooltip(i,t)){this.clearHoverTimeout();return}i!==this.clickedTooltip&&(i!==this.hoveredTooltip&&this.clearHoverOpenTimeout(),this.hoveredTooltip=i,i?this.openHoveredTooltip(i):this.activeTooltip?.open&&this.closeHoveredTooltip(),this.clickedTooltip=null)},this.clickHandler=e=>{if(e.defaultPrevented)return;this.clickedTooltip=null;let t=e.composedPath(),i=this.queryTooltip(t);if(this.pathHasOpenTooltip(i,t)){this.clearHoverTimeout();return}if(this.closeActiveTooltip(),!!i){if(this.clearHoverTimeout(),i.closeOnClick){this.clickedTooltip=i,this.toggleTooltip(i,!1);return}this.toggleTooltip(i,!0)}},this.blurHandler=()=>{this.closeActiveTooltip()},this.focusInHandler=e=>{if(e.defaultPrevented)return;let t=e.composedPath(),i=this.queryTooltip(t);if(this.pathHasOpenTooltip(i,t)){this.clearHoverTimeout();return}i!==this.clickedTooltip&&(this.clickedTooltip=null,this.closeTooltipIfNotActive(i),i&&this.toggleFocusedTooltip(i,!0))},this.openHoveredTooltip=e=>{this.hoverOpenTimeout=window.setTimeout(()=>{this.hoverOpenTimeout===null||e!==this.hoveredTooltip||(this.clearHoverCloseTimeout(),this.closeTooltipIfNotActive(e),this.toggleTooltip(e,!0))},this.activeTooltip?.open?F:m)},this.closeHoveredTooltip=()=>{this.hoverCloseTimeout=window.setTimeout(()=>{this.hoverCloseTimeout!==null&&this.closeActiveTooltip()},N)}}registerElement(e,t){this.registeredElementCount++,this.registeredElements.set(e,t);let i=this.getReferenceElShadowRootNode(e);i&&this.registerShadowRoot(i),this.registeredElementCount===1&&this.addListeners()}unregisterElement(e){let t=this.getReferenceElShadowRootNode(e);t&&this.unregisterShadowRoot(t),this.registeredElements.delete(e)&&this.registeredElementCount--,this.registeredElementCount===0&&this.removeListeners()}pathHasOpenTooltip(e,t){let{activeTooltip:i}=this;return i?.open&&t.includes(i)||e?.open&&t.includes(e)}addShadowListeners(e){e.addEventListener("focusin",this.focusInHandler)}removeShadowListeners(e){e.removeEventListener("focusin",this.focusInHandler)}addListeners(){window.addEventListener("keydown",this.keyDownHandler),window.addEventListener("pointermove",this.pointerMoveHandler),window.addEventListener("click",this.clickHandler),window.addEventListener("focusin",this.focusInHandler),window.addEventListener("blur",this.blurHandler),document.addEventListener("pointerleave",this.pointerLeaveHandler)}removeListeners(){window.removeEventListener("keydown",this.keyDownHandler),window.removeEventListener("pointermove",this.pointerMoveHandler),window.removeEventListener("click",this.clickHandler),window.removeEventListener("focusin",this.focusInHandler),window.removeEventListener("blur",this.blurHandler),document.removeEventListener("pointerleave",this.pointerLeaveHandler)}clearHoverOpenTimeout(){window.clearTimeout(this.hoverOpenTimeout),this.hoverOpenTimeout=null}clearHoverCloseTimeout(){window.clearTimeout(this.hoverCloseTimeout),this.hoverCloseTimeout=null}clearHoverTimeout(){this.clearHoverOpenTimeout(),this.clearHoverCloseTimeout()}closeTooltipIfNotActive(e){this.activeTooltip!==e&&this.closeActiveTooltip()}closeActiveTooltip(){let{activeTooltip:e}=this;e?.open&&this.toggleTooltip(e,!1)}toggleFocusedTooltip(e,t){t&&this.clearHoverTimeout(),this.toggleTooltip(e,t)}toggleTooltip(e,t){e.open=t,this.activeTooltip=t?e:null}registerShadowRoot(e){let{registeredShadowRootCounts:t}=this,i=t.get(e),o=Math.min((typeof i=="number"?i:0)+1,1);o===1&&this.addShadowListeners(e),t.set(e,o)}unregisterShadowRoot(e){let{registeredShadowRootCounts:t}=this,i=t.get(e),o=Math.max((typeof i=="number"?i:1)-1,0);o===0&&this.removeShadowListeners(e),t.set(e,o)}getReferenceElShadowRootNode(e){return e instanceof Element?k(e):null}},B=v`:host{display:contents}.position-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0}@starting-style{.position-container{opacity:0;inset-block-start:0;left:0}}.position-container{max-inline-size:var(--calcite-tooltip-max-size-x, 20rem);max-block-size:20rem}.position-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.position-container:popover-open{display:block}.position-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.position-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.position-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.position-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.position-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.calcite-floating-ui-arrow{pointer-events:none;position:absolute;z-index:calc(var(--calcite-z-index) * -1);fill:var(--calcite-color-foreground-1)}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-color-border-3)}.container{position:relative;overflow:hidden;padding:.75rem 1rem;font-size:var(--calcite-font-size--2);line-height:1.375;font-weight:var(--calcite-font-weight-medium);word-wrap:break-word;word-break:break-word;border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-corner-radius-round));color:var(--calcite-tooltip-text-color, var(--calcite-color-text-1));text-align:start}.position-container .calcite-floating-ui-anim{border-width:1px;border-style:solid;background-color:var(--calcite-tooltip-background-color, var(--calcite-color-foreground-1));border-color:var(--calcite-tooltip-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-corner-radius-round))}.calcite-floating-ui-arrow{fill:var(--calcite-tooltip-background-color, var(--calcite-color-foreground-1))}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-tooltip-border-color, var(--calcite-color-border-3))}:host([hidden]){display:none}[hidden]{display:none}`,A=new f,u=class extends T{constructor(){super(...arguments),this.arrowRef=c(),this.guid=z.host(b()),this.transitionProp="opacity",this.transitionRef=c(),this.floatingLayout="vertical",this.closeOnClick=!1,this.offsetDistance=p,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement="auto",this.calciteTooltipBeforeClose=s({cancelable:!1}),this.calciteTooltipBeforeOpen=s({cancelable:!1}),this.calciteTooltipClose=s({cancelable:!1}),this.calciteTooltipOpen=s({cancelable:!1})}static{this.properties={floatingLayout:[16,{},{state:!0}],referenceEl:[16,{},{state:!0}],closeOnClick:[7,{},{reflect:!0,type:Boolean}],label:1,offsetDistance:[11,{},{type:Number,reflect:!0}],offsetSkidding:[11,{},{reflect:!0,type:Number}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],referenceElement:1}}static{this.styles=B}async reposition(e=!1){let{referenceEl:t,placement:i,overlayPositioning:o,offsetDistance:r,offsetSkidding:a,arrowRef:D,floatingEl:_}=this;return C(this,{floatingEl:_,referenceEl:t,overlayPositioning:o,placement:i,offsetDistance:r,offsetSkidding:a,arrowEl:D.value,type:"tooltip"},e)}connectedCallback(){super.connectedCallback(),this.setUpReferenceElement(!0)}willUpdate(e){(e.has("offsetDistance")&&(this.hasUpdated||this.offsetDistance!==p)||e.has("offsetSkidding")&&(this.hasUpdated||this.offsetSkidding!==0)||e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||e.has("placement")&&(this.hasUpdated||this.placement!=="auto"))&&this.reposition(!0),e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("referenceElement")&&this.setUpReferenceElement()}loaded(){this.referenceElement&&!this.referenceEl&&this.setUpReferenceElement()}disconnectedCallback(){super.disconnectedCallback(),this.removeReferences(),R(this)}async handlePopover(){await this.componentOnReady(),this.floatingEl&&(this.open&&this.referenceEl?this.floatingEl.showPopover():this.floatingEl.hidePopover())}openHandler(){H(this),this.reposition(!0),this.handlePopover()}onBeforeOpen(){this.calciteTooltipBeforeOpen.emit()}onOpen(){this.calciteTooltipOpen.emit()}onBeforeClose(){this.calciteTooltipBeforeClose.emit()}onClose(){this.calciteTooltipClose.emit(),L(this)}setFloatingEl(e){this.floatingEl=e,e&&requestAnimationFrame(()=>this.setUpReferenceElement())}setUpReferenceElement(e=!0){this.removeReferences(),this.referenceEl=I(this.el),O(this);let{el:t,referenceElement:i,referenceEl:o}=this;e&&i&&!o&&console.warn(`${t.tagName}: reference-element id "${i}" was not found.`,{el:t}),this.addReferences(),this.handlePopover()}getId(){return this.el.id||this.guid}addReferences(){let{referenceEl:e}=this;if(!e)return;let t=this.getId();"setAttribute"in e&&e.setAttribute(x,t),A.registerElement(e,this.el)}removeReferences(){let{referenceEl:e}=this;e&&("removeAttribute"in e&&e.removeAttribute(x),A.unregisterElement(e))}render(){let{referenceEl:e,label:t,open:i,floatingLayout:o}=this,r=e&&i,a=!r;return this.el.inert=a,this.el.ariaLabel=t,this.el.ariaLive="polite",w(this.el,"id",this.getId()),this.el.role="tooltip",g`<div class=${l(P.positionContainer)} popover=manual ${d(this.setFloatingEl)}><div class=${l({[h.animation]:!0,[h.animationActive]:r})} ${d(this.transitionRef)}>${S({floatingLayout:o,ref:this.arrowRef})}<div class=${l(P.container)}><slot></slot></div></div></div>`}};E("calcite-tooltip",u);export{u as Tooltip};
|
|
3
|
+
v5.0.0-next.26 */
|
|
4
|
+
import{a as S}from"./E2CJ3WMN.js";import{c as h,e as C,f as L,g as O,h as R,i as p}from"./P4SFTOL2.js";import{a as H}from"./YOAHZBK4.js";import"./52WSL3OS.js";import"./CWNLGPSB.js";import{h as k,j as y}from"./5DDVN7VT.js";import{a as b}from"./HTSVYMIU.js";import{B as c,C as d,D as T,E as l,H as w,P as E,g as v,h as g,o as s}from"./S3LMUVIR.js";var P={positionContainer:"position-container",container:"container"},U="calcite-tooltip",z={host:n=>`${U}-${n}`},m=300,F=m/3,N=m*1.5,x="aria-describedby";function I(n){let{referenceElement:e}=n;return(typeof e=="string"?y(n,{id:e}):e)||null}var f=class{constructor(){this.registeredElements=new WeakMap,this.registeredShadowRootCounts=new WeakMap,this.hoverOpenTimeout=null,this.hoverCloseTimeout=null,this.activeTooltip=null,this.registeredElementCount=0,this.clickedTooltip=null,this.hoveredTooltip=null,this.queryTooltip=e=>{let{registeredElements:t}=this,i=e.find(o=>t.has(o));return t.get(i)},this.keyDownHandler=e=>{if(e.key==="Escape"&&!e.defaultPrevented){let{activeTooltip:t}=this;if(t?.open){this.clearHoverTimeout(),this.closeActiveTooltip();let i=I(t),o=e.composedPath();(i instanceof Element&&o.includes(i)||o.includes(t))&&e.preventDefault()}}},this.pointerLeaveHandler=e=>{e.defaultPrevented||(this.clearHoverTimeout(),this.closeHoveredTooltip())},this.pointerMoveHandler=e=>{if(e.defaultPrevented){this.closeHoveredTooltip();return}let t=e.composedPath(),i=this.queryTooltip(t);if(this.pathHasOpenTooltip(i,t)){this.clearHoverTimeout();return}i!==this.clickedTooltip&&(i!==this.hoveredTooltip&&this.clearHoverOpenTimeout(),this.hoveredTooltip=i,i?this.openHoveredTooltip(i):this.activeTooltip?.open&&this.closeHoveredTooltip(),this.clickedTooltip=null)},this.clickHandler=e=>{if(e.defaultPrevented)return;this.clickedTooltip=null;let t=e.composedPath(),i=this.queryTooltip(t);if(this.pathHasOpenTooltip(i,t)){this.clearHoverTimeout();return}if(this.closeActiveTooltip(),!!i){if(this.clearHoverTimeout(),i.closeOnClick){this.clickedTooltip=i,this.toggleTooltip(i,!1);return}this.toggleTooltip(i,!0)}},this.blurHandler=()=>{this.closeActiveTooltip()},this.focusInHandler=e=>{if(e.defaultPrevented)return;let t=e.composedPath(),i=this.queryTooltip(t);if(this.pathHasOpenTooltip(i,t)){this.clearHoverTimeout();return}i!==this.clickedTooltip&&(this.clickedTooltip=null,this.closeTooltipIfNotActive(i),i&&this.toggleFocusedTooltip(i,!0))},this.openHoveredTooltip=e=>{this.hoverOpenTimeout=window.setTimeout(()=>{this.hoverOpenTimeout===null||e!==this.hoveredTooltip||(this.clearHoverCloseTimeout(),this.closeTooltipIfNotActive(e),this.toggleTooltip(e,!0))},this.activeTooltip?.open?F:m)},this.closeHoveredTooltip=()=>{this.hoverCloseTimeout=window.setTimeout(()=>{this.hoverCloseTimeout!==null&&this.closeActiveTooltip()},N)}}registerElement(e,t){this.registeredElementCount++,this.registeredElements.set(e,t);let i=this.getReferenceElShadowRootNode(e);i&&this.registerShadowRoot(i),this.registeredElementCount===1&&this.addListeners()}unregisterElement(e){let t=this.getReferenceElShadowRootNode(e);t&&this.unregisterShadowRoot(t),this.registeredElements.delete(e)&&this.registeredElementCount--,this.registeredElementCount===0&&this.removeListeners()}pathHasOpenTooltip(e,t){let{activeTooltip:i}=this;return i?.open&&t.includes(i)||e?.open&&t.includes(e)}addShadowListeners(e){e.addEventListener("focusin",this.focusInHandler)}removeShadowListeners(e){e.removeEventListener("focusin",this.focusInHandler)}addListeners(){window.addEventListener("keydown",this.keyDownHandler),window.addEventListener("pointermove",this.pointerMoveHandler),window.addEventListener("click",this.clickHandler),window.addEventListener("focusin",this.focusInHandler),window.addEventListener("blur",this.blurHandler),document.addEventListener("pointerleave",this.pointerLeaveHandler)}removeListeners(){window.removeEventListener("keydown",this.keyDownHandler),window.removeEventListener("pointermove",this.pointerMoveHandler),window.removeEventListener("click",this.clickHandler),window.removeEventListener("focusin",this.focusInHandler),window.removeEventListener("blur",this.blurHandler),document.removeEventListener("pointerleave",this.pointerLeaveHandler)}clearHoverOpenTimeout(){window.clearTimeout(this.hoverOpenTimeout),this.hoverOpenTimeout=null}clearHoverCloseTimeout(){window.clearTimeout(this.hoverCloseTimeout),this.hoverCloseTimeout=null}clearHoverTimeout(){this.clearHoverOpenTimeout(),this.clearHoverCloseTimeout()}closeTooltipIfNotActive(e){this.activeTooltip!==e&&this.closeActiveTooltip()}closeActiveTooltip(){let{activeTooltip:e}=this;e?.open&&this.toggleTooltip(e,!1)}toggleFocusedTooltip(e,t){t&&this.clearHoverTimeout(),this.toggleTooltip(e,t)}toggleTooltip(e,t){e.open=t,this.activeTooltip=t?e:null}registerShadowRoot(e){let{registeredShadowRootCounts:t}=this,i=t.get(e),o=Math.min((typeof i=="number"?i:0)+1,1);o===1&&this.addShadowListeners(e),t.set(e,o)}unregisterShadowRoot(e){let{registeredShadowRootCounts:t}=this,i=t.get(e),o=Math.max((typeof i=="number"?i:1)-1,0);o===0&&this.removeShadowListeners(e),t.set(e,o)}getReferenceElShadowRootNode(e){return e instanceof Element?k(e):null}},B=v`:host{display:contents}.position-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0}@starting-style{.position-container{opacity:0;inset-block-start:0;left:0}}.position-container{max-inline-size:var(--calcite-tooltip-max-size-x, 20rem);max-block-size:20rem}.position-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.position-container:popover-open{display:block}.position-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.position-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.position-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.position-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.position-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.calcite-floating-ui-arrow{pointer-events:none;position:absolute;z-index:calc(var(--calcite-z-index) * -1);fill:var(--calcite-color-foreground-1)}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-color-border-3)}.container{position:relative;overflow:hidden;padding:.75rem 1rem;font-size:var(--calcite-font-size--2);line-height:1.375;font-weight:var(--calcite-font-weight-medium);word-wrap:break-word;word-break:break-word;border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-corner-radius-round));color:var(--calcite-tooltip-text-color, var(--calcite-color-text-1));text-align:start}.position-container .calcite-floating-ui-anim{border-width:1px;border-style:solid;background-color:var(--calcite-tooltip-background-color, var(--calcite-color-foreground-1));border-color:var(--calcite-tooltip-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-corner-radius-round))}.calcite-floating-ui-arrow{fill:var(--calcite-tooltip-background-color, var(--calcite-color-foreground-1))}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-tooltip-border-color, var(--calcite-color-border-3))}:host([hidden]){display:none}[hidden]{display:none}`,A=new f,u=class extends T{constructor(){super(...arguments),this.arrowRef=c(),this.guid=z.host(b()),this.transitionProp="opacity",this.transitionRef=c(),this.floatingLayout="vertical",this.closeOnClick=!1,this.offsetDistance=p,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement="auto",this.calciteTooltipBeforeClose=s({cancelable:!1}),this.calciteTooltipBeforeOpen=s({cancelable:!1}),this.calciteTooltipClose=s({cancelable:!1}),this.calciteTooltipOpen=s({cancelable:!1})}static{this.properties={floatingLayout:[16,{},{state:!0}],referenceEl:[16,{},{state:!0}],closeOnClick:[7,{},{reflect:!0,type:Boolean}],label:1,offsetDistance:[11,{},{type:Number,reflect:!0}],offsetSkidding:[11,{},{reflect:!0,type:Number}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],referenceElement:1}}static{this.styles=B}async reposition(e=!1){let{referenceEl:t,placement:i,overlayPositioning:o,offsetDistance:r,offsetSkidding:a,arrowRef:D,floatingEl:_}=this;return C(this,{floatingEl:_,referenceEl:t,overlayPositioning:o,placement:i,offsetDistance:r,offsetSkidding:a,arrowEl:D.value,type:"tooltip"},e)}connectedCallback(){super.connectedCallback(),this.setUpReferenceElement(!0)}willUpdate(e){(e.has("offsetDistance")&&(this.hasUpdated||this.offsetDistance!==p)||e.has("offsetSkidding")&&(this.hasUpdated||this.offsetSkidding!==0)||e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||e.has("placement")&&(this.hasUpdated||this.placement!=="auto"))&&this.reposition(!0),e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("referenceElement")&&this.setUpReferenceElement()}loaded(){this.referenceElement&&!this.referenceEl&&this.setUpReferenceElement()}disconnectedCallback(){super.disconnectedCallback(),this.removeReferences(),R(this)}async handlePopover(){await this.componentOnReady(),this.floatingEl&&(this.open&&this.referenceEl?this.floatingEl.showPopover():this.floatingEl.hidePopover())}openHandler(){H(this),this.reposition(!0),this.handlePopover()}onBeforeOpen(){this.calciteTooltipBeforeOpen.emit()}onOpen(){this.calciteTooltipOpen.emit()}onBeforeClose(){this.calciteTooltipBeforeClose.emit()}onClose(){this.calciteTooltipClose.emit(),L(this)}setFloatingEl(e){this.floatingEl=e,e&&requestAnimationFrame(()=>this.setUpReferenceElement())}setUpReferenceElement(e=!0){this.removeReferences(),this.referenceEl=I(this.el),O(this);let{el:t,referenceElement:i,referenceEl:o}=this;e&&i&&!o&&console.warn(`${t.tagName}: reference-element id "${i}" was not found.`,{el:t}),this.addReferences(),this.handlePopover()}getId(){return this.el.id||this.guid}addReferences(){let{referenceEl:e}=this;if(!e)return;let t=this.getId();"setAttribute"in e&&e.setAttribute(x,t),A.registerElement(e,this.el)}removeReferences(){let{referenceEl:e}=this;e&&("removeAttribute"in e&&e.removeAttribute(x),A.unregisterElement(e))}render(){let{referenceEl:e,label:t,open:i,floatingLayout:o}=this,r=e&&i,a=!r;return this.el.inert=a,this.el.ariaLabel=t,this.el.ariaLive="polite",w(this.el,"id",this.getId()),this.el.role="tooltip",g`<div class=${l(P.positionContainer)} popover=manual ${d(this.setFloatingEl)}><div class=${l({[h.animation]:!0,[h.animationActive]:r})} ${d(this.transitionRef)}>${S({floatingLayout:o,ref:this.arrowRef})}<div class=${l(P.container)}><slot></slot></div></div></div>`}};E("calcite-tooltip",u);export{u as Tooltip};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.26 */
|
|
4
4
|
function r(n,$,o){return $?`${n}-${$}`:o?`${n}-${o}`:`${n}-m`}export{r as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as K}from"./EHS7VTJ2.js";import{a as S}from"./VYBIOJ5F.js";import{a as F}from"./UU5FHZ2A.js";import{a as C}from"./3DZK3RG7.js";import{a as U}from"./MFBAIO26.js";import{a as L}from"./7NLFZEAY.js";import{a as V}from"./VKUS34R6.js";import{a as P}from"./A7AWHUCH.js";import{a as A}from"./EQ25YK3K.js";import{a as R}from"./MT4G6FVR.js";import"./4JL57EDA.js";import"./VKBFZH3Q.js";import{D as d,b as M,e as f}from"./W35ZAP2H.js";import"./EK3BWMVE.js";import{C as v,D as B,E as c,H as I,J as O,L as $,M as T,P as H,g as E,h as y,o as u}from"./GAXQ53KY.js";var r={scrim:"scrim",container:"container",containerOpen:"container--open",content:"content",contentContainer:"content-container",containerEmbedded:"container--embedded",resizeHandle:"resize-handle",resizeHandleBar:"resize-handle-bar"},j={sheetContent:"sheet-content"},_={dragVertical:"drag-resize-vertical",dragHorizontal:"drag-resize-horizontal"},N=E`:host{position:absolute;inset:0;display:flex;visibility:hidden!important;--calcite-sheet-scrim-background-internal: rgba(0, 0, 0, .85);--calcite-scrim-shadow-block-start-internal: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--calcite-scrim-shadow-block-end-internal: 0 -4px 8px -1px rgba(0, 0, 0, .08), 0 -2px 4px -1px rgba(0, 0, 0, .04);--calcite-scrim-shadow-inline-start-internal: 4px 0 8px -1px rgba(0, 0, 0, .08), 2px 0 4px -1px rgba(0, 0, 0, .04);--calcite-scrim-shadow-inline-end-internal: -4px 0 8px -1px rgba(0, 0, 0, .08), -2px 0 4px -1px rgba(0, 0, 0, .04)}:host([embedded]){z-index:var(--calcite-z-index-overlay)}.calcite--rtl{--calcite-scrim-shadow-inline-start-internal: -4px 0 8px -1px rgba(0, 0, 0, .08), -2px 0 4px -1px rgba(0, 0, 0, .04);--calcite-scrim-shadow-inline-end-internal: 4px 0 8px -1px rgba(0, 0, 0, .08), 2px 0 4px -1px rgba(0, 0, 0, .04)}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.container{visibility:hidden;position:fixed;box-sizing:border-box;display:flex;opacity:0;color:var(--calcite-sheet-text-color, var(--calcite-color-text-2));transition:visibility 0ms linear var(--calcite-internal-animation-timing-medium),opacity var(--calcite-internal-animation-timing-medium) cubic-bezier(.215,.44,.42,.88)}:host([embedded]) .container{z-index:var(--calcite-z-index-overlay)}:host([position=inline-start]) .container{justify-content:flex-start;inset-block:0;inset-inline:0 auto;--calcite-sheet-hidden-position-internal: translate3d(-1rem, 0, 0)}:host([position=inline-end]) .container{justify-content:flex-end;inset-block:0;inset-inline:auto 0;--calcite-sheet-hidden-position-internal: translate3d(1rem, 0, 0)}:host([position=block-start]) .container{align-items:flex-start;inset-block:0 auto;inset-inline:0;--calcite-sheet-hidden-position-internal: translate3d(0, -1rem, 0)}:host([position=block-end]) .container{align-items:flex-end;inset-block:auto 0;inset-inline:0;--calcite-sheet-hidden-position-internal: translate3d(0, 1rem, 0)}:host([display-mode=float]) .content{--tw-shadow: 0 2px 12px -4px rgba(0, 0, 0, .2), 0 2px 4px -2px rgba(0, 0, 0, .16);--tw-shadow-colored: 0 2px 12px -4px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--calcite-sheet-shadow, var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow))}:host([display-mode=overlay][position=inline-start]) .container{box-shadow:var(--calcite-scrim-shadow-inline-start-internal)}:host([display-mode=overlay][position=inline-end]) .container{box-shadow:var(--calcite-scrim-shadow-inline-end-internal)}:host([display-mode=overlay][position=block-start]) .container{box-shadow:var(--calcite-scrim-shadow-block-start-internal)}:host([display-mode=overlay][position=block-end]) .container{box-shadow:var(--calcite-scrim-shadow-block-end-internal)}:host([position^=inline]) .content{inline-size:var(--calcite-sheet-width-internal);max-inline-size:var(--calcite-sheet-max-width-internal);min-inline-size:var(--calcite-sheet-min-width-internal)}:host([position^=block]) .content{block-size:var(--calcite-sheet-height-internal);max-block-size:var(--calcite-sheet-max-height-internal);min-block-size:var(--calcite-sheet-min-height-internal)}:host([position^=inline]) .width-s{--calcite-sheet-width-internal: var(--calcite-sheet-width, 15vw);--calcite-sheet-max-width-internal: var(--calcite-sheet-max-width, 360px);--calcite-sheet-min-width-internal: var(--calcite-sheet-min-width, 260px)}:host([position^=inline]) .width-m{--calcite-sheet-width-internal: var(--calcite-sheet-width, 25vw);--calcite-sheet-max-width-internal: var(--calcite-sheet-max-width, 420px);--calcite-sheet-min-width-internal: var(--calcite-sheet-min-width, 300px)}:host([position^=inline]) .width-l{--calcite-sheet-width-internal: var(--calcite-sheet-width, 45vw);--calcite-sheet-max-width-internal: var(--calcite-sheet-max-width, 680px);--calcite-sheet-min-width-internal: var(--calcite-sheet-min-width, 340px)}:host([position^=block]) .height-s{--calcite-sheet-min-height-internal: var(--calcite-sheet-min-height, 160px);--calcite-sheet-height-internal: var(--calcite-sheet-height, 30vh);--calcite-sheet-max-height-internal: var(--calcite-sheet-max-height, 30vh)}:host([position^=block]) .height-m{--calcite-sheet-min-height-internal: var(--calcite-sheet-min-height, 200px);--calcite-sheet-height-internal: var(--calcite-sheet-height, 45vh);--calcite-sheet-max-height-internal: var(--calcite-sheet-max-height, 50vh)}:host([position^=block]) .height-l{--calcite-sheet-min-height-internal: var(--calcite-sheet-min-height, 240px);--calcite-sheet-height-internal: var(--calcite-sheet-height, 60vh);--calcite-sheet-max-height-internal: var(--calcite-sheet-max-height, 70vh)}.scrim{--calcite-scrim-background: var(--calcite-sheet-scrim-background, var(--calcite-sheet-scrim-background-internal));position:fixed;inset:0;z-index:calc(var(--calcite-z-index) * -1);display:flex;overflow:hidden}[popover]{padding:0;margin:0;border:none;background-color:transparent;position:fixed;display:flex;inline-size:100%;block-size:100%}[popover]:popover-open{display:flex}:host([opened]){visibility:visible!important}.content{position:relative;box-sizing:border-box;display:flex;max-inline-size:100%;padding:0;background-color:var(--calcite-sheet-background-color, var(--calcite-color-foreground-1));max-block-size:100%;visibility:hidden;transition:transform var(--calcite-internal-animation-timing-medium) cubic-bezier(.215,.44,.42,.88),visibility 0ms linear var(--calcite-internal-animation-timing-medium),opacity var(--calcite-internal-animation-timing-medium) cubic-bezier(.215,.44,.42,.88);transform:var(--calcite-sheet-hidden-position-internal)}:host([embedded]) .content{z-index:var(--calcite-z-index-modal)}.content-container{position:relative;display:flex;max-block-size:100%;max-inline-size:100%;flex:1 1 0%;overflow:hidden}.container--open .content{transform:translateZ(0)}:host([display-mode=float]) .content,:host([display-mode=float]) .container,:host([display-mode=float]) .content-container{border-radius:var(--calcite-sheet-corner-radius, var(--calcite-corner-radius-round))}:host([display-mode=float]) .container{padding:var(--calcite-spacing-md)}.container--open{visibility:visible;opacity:1;transition-delay:0ms}.container--open .content{pointer-events:auto;visibility:visible;opacity:1;transition:transform var(--calcite-internal-animation-timing-medium) cubic-bezier(.215,.44,.42,.88),visibility 0ms linear,opacity var(--calcite-internal-animation-timing-medium) cubic-bezier(.215,.44,.42,.88),max-inline-size var(--calcite-internal-animation-timing-medium) cubic-bezier(.215,.44,.42,.88),max-block-size var(--calcite-internal-animation-timing-medium) cubic-bezier(.215,.44,.42,.88);transition-delay:0ms}:host([position=inline-start]) .content,:host([position=inline-end]) .content{block-size:100%}:host([position=inline-start]) .content{flex-direction:row}:host([position=inline-end]) .content{flex-direction:row-reverse}:host([position=block-start]) .content,:host([position=block-end]) .content{inline-size:100%}:host([position=block-start]) .content{flex-direction:column}:host([position=block-end]) .content{flex-direction:column-reverse}:host([resizable][position=inline-start]) .content{padding-inline-end:var(--calcite-size-fixed-sm-plus)}:host([resizable][position=inline-end]) .content{padding-inline-start:var(--calcite-size-fixed-sm-plus)}:host([resizable][position=block-start]) .content{padding-block-end:var(--calcite-size-fixed-sm-plus)}:host([resizable][position=block-end]) .content{padding-block-start:var(--calcite-size-fixed-sm-plus)}.resize-handle{position:absolute;box-sizing:border-box;display:flex;-webkit-user-select:none;user-select:none;align-items:center;justify-content:center;outline:2px solid transparent;outline-offset:2px;--calcite-internal-sheet-resize-handle-offset: calc( (var(--calcite-size-fixed-xxl) - var(--calcite-size-fixed-sm-plus)) / 2 * -1 );z-index:var(--calcite-z-index-header)}.resize-handle:active .resize-handle-bar,.resize-handle:hover .resize-handle-bar{color:var(--calcite-sheet-resize-icon-color, var(--calcite-color-text-1));background-color:var(--calcite-sheet-resize-background-color, var(--calcite-color-foreground-3))}.resize-handle-bar{pointer-events:none;display:flex;align-items:center;justify-content:center;color:var(--calcite-sheet-resize-icon-color, var(--calcite-color-border-input));background-color:var(--calcite-sheet-resize-background-color, var(--calcite-color-background))}.resize-handle:focus .resize-handle-bar{outline-color:transparent;outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)))}:host([position=inline-start]) .resize-handle{inline-size:var(--calcite-size-fixed-xxl);inset-inline-end:var(--calcite-internal-sheet-resize-handle-offset);block-size:100%}:host([position=inline-start]) .resize-handle-bar{block-size:100%;inline-size:var(--calcite-size-fixed-sm-plus);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-sheet-border-color, var(--calcite-color-border-3))}:host([position=inline-start]):host([display-mode=float]) .resize-handle-bar{border-start-end-radius:var(--calcite-sheet-corner-radius, var(--calcite-corner-radius-round));border-end-end-radius:var(--calcite-sheet-corner-radius, var(--calcite-corner-radius-round))}:host([position=inline-end]) .resize-handle{inline-size:var(--calcite-size-fixed-xxl);inset-inline-start:var(--calcite-internal-sheet-resize-handle-offset);block-size:100%}:host([position=inline-end]) .resize-handle-bar{block-size:100%;inline-size:var(--calcite-size-fixed-sm-plus);border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-sheet-border-color, var(--calcite-color-border-3))}:host([position=inline-end]):host([display-mode=float]) .resize-handle-bar{border-start-start-radius:.25rem;border-end-start-radius:.25rem}:host([position=block-start]) .resize-handle{block-size:var(--calcite-size-fixed-xxl);inline-size:100%;inset-block-end:var(--calcite-internal-sheet-resize-handle-offset)}:host([position=block-start]) .resize-handle-bar{inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);border-block-start:var(--calcite-border-width-sm) solid var(--calcite-sheet-border-color, var(--calcite-color-border-3))}:host([position=block-start]):host([display-mode=float]) .resize-handle-bar{border-end-end-radius:.25rem;border-end-start-radius:.25rem}:host([position=block-end]) .resize-handle{block-size:var(--calcite-size-fixed-xxl);inline-size:100%;inset-block-start:var(--calcite-internal-sheet-resize-handle-offset)}:host([position=block-end]) .resize-handle-bar{inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);border-block-end:var(--calcite-border-width-sm) solid var(--calcite-sheet-border-color, var(--calcite-color-border-3))}:host([position=block-end]):host([display-mode=float]) .resize-handle-bar{border-start-start-radius:var(--calcite-sheet-corner-radius, var(--calcite-corner-radius-round));border-start-end-radius:var(--calcite-sheet-corner-radius, var(--calcite-corner-radius-round))}:host([position]) .container--embedded{pointer-events:auto;position:absolute;inline-size:100%;max-inline-size:100%;min-inline-size:100%;block-size:100%;max-block-size:100%;min-block-size:100%}:host([position]) .container--embedded calcite-scrim{position:absolute}:host([hidden]){display:none}[hidden]{display:none}`,D=class extends B{constructor(){super(),this.focusTrap=F({triggerProp:"open",focusTrapOptions:{clickOutsideDeactivates:()=>this.embedded,escapeDeactivates:e=>(!e.defaultPrevented&&!this.escapeDisabled&&(this.open=!1,e.preventDefault()),!1)}})(this),this.usePreventDocumentScroll=K()(this),this.messages=A(),this.mutationObserver=P("mutation",()=>this.handleMutationObserver()),this._open=!1,this.openProp="opened",this.transitionProp="opacity",this.focusSetter=R()(this),this.keyDownHandler=e=>{let{defaultPrevented:t,key:a}=e;!t&&!this.escapeDisabled&&this.focusTrapDisabled&&this.open&&a==="Escape"&&(e.preventDefault(),this.open=!1)},this.resizeValues={inlineSize:null,blockSize:null,minInlineSize:null,minBlockSize:null,maxInlineSize:null,maxBlockSize:null},this.displayMode="overlay",this.embedded=!1,this.escapeDisabled=!1,this.focusTrapDisabled=!1,this.heightScale="m",this.opened=!1,this.outsideCloseDisabled=!1,this.position="inline-start",this.resizable=!1,this.widthScale="m",this.calciteSheetBeforeClose=u({cancelable:!1}),this.calciteSheetBeforeOpen=u({cancelable:!1}),this.calciteSheetClose=u({cancelable:!1}),this.calciteSheetOpen=u({cancelable:!1}),this.listen("keydown",this.keyDownHandler)}static{this.properties={resizeValues:[16,{},{state:!0}],beforeClose:[0,{},{attribute:!1}],displayMode:[3,{},{reflect:!0}],embedded:[7,{},{reflect:!0,type:Boolean}],escapeDisabled:[7,{},{reflect:!0,type:Boolean}],focusTrapDisabled:[7,{},{reflect:!0,type:Boolean}],focusTrapOptions:[0,{},{attribute:!1}],heightScale:[3,{},{reflect:!0}],height:[3,{},{reflect:!0}],label:1,messageOverrides:[0,{},{attribute:!1}],open:[7,{},{reflect:!0,type:Boolean}],opened:[7,{},{reflect:!0,type:Boolean}],outsideCloseDisabled:[7,{},{reflect:!0,type:Boolean}],position:[3,{},{reflect:!0}],resizable:[7,{},{reflect:!0,type:Boolean}],widthScale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=N}get preventDocumentScroll(){return!this.embedded}get open(){return this._open}set open(e){let t=this._open;e!==t&&this.setOpenState(e)}async setFocus(e){return this.focusSetter(()=>this.el,e)}async updateFocusTrapElements(e){this.focusTrap.setExtraContainers(e),this.focusTrap.updateContainerElements()}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setupInteractions()}willUpdate(e){e.has("opened")&&(this.hasUpdated||this.opened!==!1)&&(L(this),this.handlePopover()),(e.has("open")&&(this.hasUpdated||this.open!==!1)||e.has("position")&&(this.hasUpdated||this.position!=="inline-start")||e.has("resizable")&&(this.hasUpdated||this.resizable!==!1))&&this.setupInteractions()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.embedded=!1,this.cleanupInteractions()}async handlePopover(){await this.componentOnReady(),!(this.embedded||!this.transitionEl)&&(this.opened?this.transitionEl.showPopover():this.transitionEl.hidePopover())}async setOpenState(e){if(this.beforeClose&&!e)try{await this.beforeClose?.(this.el)}catch{return}this._open=e,e&&await this.componentOnReady(),this.opened=e}getResizeIcon(){let{position:e}=this;return e==="block-start"||e==="block-end"?_.dragVertical:_.dragHorizontal}getContentElDOMRect(){return this.contentEl.getBoundingClientRect()}handleKeyDown(e){let{key:t,defaultPrevented:a,shiftKey:n}=e,{position:i,resizable:s,contentEl:b,el:h,resizeValues:{maxBlockSize:x,maxInlineSize:k,minBlockSize:g,minInlineSize:w}}=this,z=[...i==="block-end"||i==="block-start"?["ArrowUp","ArrowDown"]:["ArrowLeft","ArrowRight"],"Home","End"];if(!s||!b||a||!z.includes(t))return;let l=this.getContentElDOMRect(),m=f(h)==="rtl"?-1:1,o=n?T:$;switch(t){case"ArrowUp":this.updateSize({size:l.height+(i==="block-end"?o:-o),type:"blockSize"}),e.preventDefault();break;case"ArrowDown":this.updateSize({size:l.height+(i==="block-end"?-o:o),type:"blockSize"}),e.preventDefault();break;case"ArrowLeft":this.updateSize({size:l.width+(i==="inline-end"?o:-o)*m,type:"inlineSize"}),e.preventDefault();break;case"ArrowRight":this.updateSize({size:l.width+(i==="inline-end"?-o:o)*m,type:"inlineSize"}),e.preventDefault();break;case"Home":this.updateSize({size:i==="block-start"||i==="block-end"?g:w,type:i==="block-start"||i==="block-end"?"blockSize":"inlineSize"}),e.preventDefault();break;case"End":this.updateSize({size:i==="block-start"||i==="block-end"?x:k,type:i==="block-start"||i==="block-end"?"blockSize":"inlineSize"}),e.preventDefault();break}}updateSize({type:e,size:t}){let{contentEl:a,resizeValues:n}=this;if(!a)return;let i=e==="blockSize"?"minBlockSize":"minInlineSize",s=e==="blockSize"?"maxBlockSize":"maxInlineSize",b=n[i]&&n[s]?U(t,n[i],n[s]):t,h=Math.round(b);this.resizeValues={...n,[e]:h},a.style[e]=t!==null?`${h}px`:null}cleanupInteractions(){this.interaction?.unset(),this.updateSize({size:null,type:"inlineSize"}),this.updateSize({size:null,type:"blockSize"})}async setupInteractions(){this.cleanupInteractions();let{el:e,contentEl:t,resizable:a,position:n,open:i,resizeHandleEl:s}=this;if(!t||!i||!a||!s)return;await this.el.componentOnReady();let{inlineSize:b,minInlineSize:h,blockSize:x,minBlockSize:k,maxInlineSize:g,maxBlockSize:w}=window.getComputedStyle(t),p={inlineSize:d(b),blockSize:d(x),minInlineSize:d(h),minBlockSize:d(k),maxInlineSize:d(g)||window.innerWidth,maxBlockSize:d(w)||window.innerHeight};this.resizeValues=p;let z=f(e)==="rtl";this.interaction=S(t,{context:e.ownerDocument}).resizable({edges:{top:n==="block-end"?s:!1,right:n===(z?"inline-end":"inline-start")?s:!1,bottom:n==="block-start"?s:!1,left:n===(z?"inline-start":"inline-end")?s:!1},modifiers:[S.modifiers.restrictSize({min:{width:p.minInlineSize,height:p.minBlockSize},max:{width:p.maxInlineSize,height:p.maxBlockSize}})],listeners:{move:({rect:l})=>{let m=n==="block-start"||n==="block-end";this.updateSize({size:m?l.height:l.width,type:m?"blockSize":"inlineSize"})}}})}onBeforeOpen(){this.calciteSheetBeforeOpen.emit()}onOpen(){this.focusTrapDisabled&&this.setFocus(),this.focusTrap.activate(),this.calciteSheetOpen.emit()}onBeforeClose(){this.calciteSheetBeforeClose.emit()}onClose(){this.calciteSheetClose.emit(),this.focusTrap.deactivate()}setResizeHandleEl(e){this.resizeHandleEl=e,this.setupInteractions()}setContentEl(e){this.contentEl=e,this.contentId=M(e)}setTransitionEl(e){e&&(this.transitionEl=e,this.handlePopover())}handleOutsideClose(){this.outsideCloseDisabled||(this.open=!1)}handleMutationObserver(){this.focusTrap.updateContainerElements()}render(){let{resizable:e,position:t,resizeValues:a}=this,n=f(this.el),i=t==="block-start"||t==="block-end";return I(this.el,"aria-describedby",this.contentId),this.el.ariaLabel=this.label,this.el.ariaModal="true",this.el.role="dialog",y`<div class=${c({[r.container]:!0,[r.containerOpen]:this.opened,[r.containerEmbedded]:this.embedded,[O.rtl]:n==="rtl",[C("width",this.width,this.widthScale)]:!!(this.width||this.widthScale),[C("height",this.height,this.heightScale)]:!!(this.height||this.heightScale)})} .popover=${this.embedded?null:"manual"} ${v(this.setTransitionEl)}><calcite-scrim class=${c(r.scrim)} @click=${this.handleOutsideClose}></calcite-scrim><div class=${c(r.content)} id=${j.sheetContent} ${v(this.setContentEl)}><div class=${c(r.contentContainer)}><slot></slot></div>${e?V("resize-handle",y`<div .ariaLabel=${this.messages.resizeEnabled} .ariaOrientation=${i?"vertical":"horizontal"} .ariaValueMax=${i?a.maxBlockSize:a.maxInlineSize} .ariaValueMin=${i?a.minBlockSize:a.minInlineSize} .ariaValueNow=${i?a.blockSize:a.inlineSize} class=${c(r.resizeHandle)} @keydown=${this.handleKeyDown} role=separator tabindex=0 touch-action=none ${v(this.setResizeHandleEl)}><div class=${c(r.resizeHandleBar)}><calcite-icon .icon=${this.getResizeIcon()} scale=s></calcite-icon></div></div>`):null}</div></div>`}};H("calcite-sheet",D);export{D as Sheet};
|
|
3
|
+
v5.0.0-next.26 */
|
|
4
|
+
import{a as K}from"./OEZPBK7R.js";import{a as S}from"./SZYDF2UZ.js";import{a as F}from"./B5UWHKTV.js";import{a as C}from"./MD5WJSZN.js";import{a as U}from"./WIKB25QH.js";import{a as L}from"./YOAHZBK4.js";import{a as V}from"./52WSL3OS.js";import{a as P}from"./FAT3Y2BN.js";import{a as A}from"./6F7MIVOD.js";import{a as R}from"./LLHJY7FO.js";import"./WUWREGJO.js";import"./7UWIO6G4.js";import{D as d,b as M,e as f}from"./5DDVN7VT.js";import"./HTSVYMIU.js";import{C as v,D as B,E as c,H as I,J as O,L as $,M as T,P as H,g as E,h as y,o as u}from"./S3LMUVIR.js";var r={scrim:"scrim",container:"container",containerOpen:"container--open",content:"content",contentContainer:"content-container",containerEmbedded:"container--embedded",resizeHandle:"resize-handle",resizeHandleBar:"resize-handle-bar"},j={sheetContent:"sheet-content"},_={dragVertical:"drag-resize-vertical",dragHorizontal:"drag-resize-horizontal"},N=E`:host{position:absolute;inset:0;display:flex;visibility:hidden!important;--calcite-sheet-scrim-background-internal: rgba(0, 0, 0, .85);--calcite-scrim-shadow-block-start-internal: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--calcite-scrim-shadow-block-end-internal: 0 -4px 8px -1px rgba(0, 0, 0, .08), 0 -2px 4px -1px rgba(0, 0, 0, .04);--calcite-scrim-shadow-inline-start-internal: 4px 0 8px -1px rgba(0, 0, 0, .08), 2px 0 4px -1px rgba(0, 0, 0, .04);--calcite-scrim-shadow-inline-end-internal: -4px 0 8px -1px rgba(0, 0, 0, .08), -2px 0 4px -1px rgba(0, 0, 0, .04)}:host([embedded]){z-index:var(--calcite-z-index-overlay)}.calcite--rtl{--calcite-scrim-shadow-inline-start-internal: -4px 0 8px -1px rgba(0, 0, 0, .08), -2px 0 4px -1px rgba(0, 0, 0, .04);--calcite-scrim-shadow-inline-end-internal: 4px 0 8px -1px rgba(0, 0, 0, .08), 2px 0 4px -1px rgba(0, 0, 0, .04)}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.container{visibility:hidden;position:fixed;box-sizing:border-box;display:flex;opacity:0;color:var(--calcite-sheet-text-color, var(--calcite-color-text-2));transition:visibility 0ms linear var(--calcite-internal-animation-timing-medium),opacity var(--calcite-internal-animation-timing-medium) cubic-bezier(.215,.44,.42,.88)}:host([embedded]) .container{z-index:var(--calcite-z-index-overlay)}:host([position=inline-start]) .container{justify-content:flex-start;inset-block:0;inset-inline:0 auto;--calcite-sheet-hidden-position-internal: translate3d(-1rem, 0, 0)}:host([position=inline-end]) .container{justify-content:flex-end;inset-block:0;inset-inline:auto 0;--calcite-sheet-hidden-position-internal: translate3d(1rem, 0, 0)}:host([position=block-start]) .container{align-items:flex-start;inset-block:0 auto;inset-inline:0;--calcite-sheet-hidden-position-internal: translate3d(0, -1rem, 0)}:host([position=block-end]) .container{align-items:flex-end;inset-block:auto 0;inset-inline:0;--calcite-sheet-hidden-position-internal: translate3d(0, 1rem, 0)}:host([display-mode=float]) .content{--tw-shadow: 0 2px 12px -4px rgba(0, 0, 0, .2), 0 2px 4px -2px rgba(0, 0, 0, .16);--tw-shadow-colored: 0 2px 12px -4px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--calcite-sheet-shadow, var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow))}:host([display-mode=overlay][position=inline-start]) .container{box-shadow:var(--calcite-scrim-shadow-inline-start-internal)}:host([display-mode=overlay][position=inline-end]) .container{box-shadow:var(--calcite-scrim-shadow-inline-end-internal)}:host([display-mode=overlay][position=block-start]) .container{box-shadow:var(--calcite-scrim-shadow-block-start-internal)}:host([display-mode=overlay][position=block-end]) .container{box-shadow:var(--calcite-scrim-shadow-block-end-internal)}:host([position^=inline]) .content{inline-size:var(--calcite-sheet-width-internal);max-inline-size:var(--calcite-sheet-max-width-internal);min-inline-size:var(--calcite-sheet-min-width-internal)}:host([position^=block]) .content{block-size:var(--calcite-sheet-height-internal);max-block-size:var(--calcite-sheet-max-height-internal);min-block-size:var(--calcite-sheet-min-height-internal)}:host([position^=inline]) .width-s{--calcite-sheet-width-internal: var(--calcite-sheet-width, 15vw);--calcite-sheet-max-width-internal: var(--calcite-sheet-max-width, 360px);--calcite-sheet-min-width-internal: var(--calcite-sheet-min-width, 260px)}:host([position^=inline]) .width-m{--calcite-sheet-width-internal: var(--calcite-sheet-width, 25vw);--calcite-sheet-max-width-internal: var(--calcite-sheet-max-width, 420px);--calcite-sheet-min-width-internal: var(--calcite-sheet-min-width, 300px)}:host([position^=inline]) .width-l{--calcite-sheet-width-internal: var(--calcite-sheet-width, 45vw);--calcite-sheet-max-width-internal: var(--calcite-sheet-max-width, 680px);--calcite-sheet-min-width-internal: var(--calcite-sheet-min-width, 340px)}:host([position^=block]) .height-s{--calcite-sheet-min-height-internal: var(--calcite-sheet-min-height, 160px);--calcite-sheet-height-internal: var(--calcite-sheet-height, 30vh);--calcite-sheet-max-height-internal: var(--calcite-sheet-max-height, 30vh)}:host([position^=block]) .height-m{--calcite-sheet-min-height-internal: var(--calcite-sheet-min-height, 200px);--calcite-sheet-height-internal: var(--calcite-sheet-height, 45vh);--calcite-sheet-max-height-internal: var(--calcite-sheet-max-height, 50vh)}:host([position^=block]) .height-l{--calcite-sheet-min-height-internal: var(--calcite-sheet-min-height, 240px);--calcite-sheet-height-internal: var(--calcite-sheet-height, 60vh);--calcite-sheet-max-height-internal: var(--calcite-sheet-max-height, 70vh)}.scrim{--calcite-scrim-background: var(--calcite-sheet-scrim-background, var(--calcite-sheet-scrim-background-internal));position:fixed;inset:0;z-index:calc(var(--calcite-z-index) * -1);display:flex;overflow:hidden}[popover]{padding:0;margin:0;border:none;background-color:transparent;position:fixed;display:flex;inline-size:100%;block-size:100%}[popover]:popover-open{display:flex}:host([opened]){visibility:visible!important}.content{position:relative;box-sizing:border-box;display:flex;max-inline-size:100%;padding:0;background-color:var(--calcite-sheet-background-color, var(--calcite-color-foreground-1));max-block-size:100%;visibility:hidden;transition:transform var(--calcite-internal-animation-timing-medium) cubic-bezier(.215,.44,.42,.88),visibility 0ms linear var(--calcite-internal-animation-timing-medium),opacity var(--calcite-internal-animation-timing-medium) cubic-bezier(.215,.44,.42,.88);transform:var(--calcite-sheet-hidden-position-internal)}:host([embedded]) .content{z-index:var(--calcite-z-index-modal)}.content-container{position:relative;display:flex;max-block-size:100%;max-inline-size:100%;flex:1 1 0%;overflow:hidden}.container--open .content{transform:translateZ(0)}:host([display-mode=float]) .content,:host([display-mode=float]) .container,:host([display-mode=float]) .content-container{border-radius:var(--calcite-sheet-corner-radius, var(--calcite-corner-radius-round))}:host([display-mode=float]) .container{padding:var(--calcite-spacing-md)}.container--open{visibility:visible;opacity:1;transition-delay:0ms}.container--open .content{pointer-events:auto;visibility:visible;opacity:1;transition:transform var(--calcite-internal-animation-timing-medium) cubic-bezier(.215,.44,.42,.88),visibility 0ms linear,opacity var(--calcite-internal-animation-timing-medium) cubic-bezier(.215,.44,.42,.88),max-inline-size var(--calcite-internal-animation-timing-medium) cubic-bezier(.215,.44,.42,.88),max-block-size var(--calcite-internal-animation-timing-medium) cubic-bezier(.215,.44,.42,.88);transition-delay:0ms}:host([position=inline-start]) .content,:host([position=inline-end]) .content{block-size:100%}:host([position=inline-start]) .content{flex-direction:row}:host([position=inline-end]) .content{flex-direction:row-reverse}:host([position=block-start]) .content,:host([position=block-end]) .content{inline-size:100%}:host([position=block-start]) .content{flex-direction:column}:host([position=block-end]) .content{flex-direction:column-reverse}:host([resizable][position=inline-start]) .content{padding-inline-end:var(--calcite-size-fixed-sm-plus)}:host([resizable][position=inline-end]) .content{padding-inline-start:var(--calcite-size-fixed-sm-plus)}:host([resizable][position=block-start]) .content{padding-block-end:var(--calcite-size-fixed-sm-plus)}:host([resizable][position=block-end]) .content{padding-block-start:var(--calcite-size-fixed-sm-plus)}.resize-handle{position:absolute;box-sizing:border-box;display:flex;-webkit-user-select:none;user-select:none;align-items:center;justify-content:center;outline:2px solid transparent;outline-offset:2px;--calcite-internal-sheet-resize-handle-offset: calc( (var(--calcite-size-fixed-xxl) - var(--calcite-size-fixed-sm-plus)) / 2 * -1 );z-index:var(--calcite-z-index-header)}.resize-handle:active .resize-handle-bar,.resize-handle:hover .resize-handle-bar{color:var(--calcite-sheet-resize-icon-color, var(--calcite-color-text-1));background-color:var(--calcite-sheet-resize-background-color, var(--calcite-color-foreground-3))}.resize-handle-bar{pointer-events:none;display:flex;align-items:center;justify-content:center;color:var(--calcite-sheet-resize-icon-color, var(--calcite-color-border-input));background-color:var(--calcite-sheet-resize-background-color, var(--calcite-color-background))}.resize-handle:focus .resize-handle-bar{outline-color:transparent;outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)))}:host([position=inline-start]) .resize-handle{inline-size:var(--calcite-size-fixed-xxl);inset-inline-end:var(--calcite-internal-sheet-resize-handle-offset);block-size:100%}:host([position=inline-start]) .resize-handle-bar{block-size:100%;inline-size:var(--calcite-size-fixed-sm-plus);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-sheet-border-color, var(--calcite-color-border-3))}:host([position=inline-start]):host([display-mode=float]) .resize-handle-bar{border-start-end-radius:var(--calcite-sheet-corner-radius, var(--calcite-corner-radius-round));border-end-end-radius:var(--calcite-sheet-corner-radius, var(--calcite-corner-radius-round))}:host([position=inline-end]) .resize-handle{inline-size:var(--calcite-size-fixed-xxl);inset-inline-start:var(--calcite-internal-sheet-resize-handle-offset);block-size:100%}:host([position=inline-end]) .resize-handle-bar{block-size:100%;inline-size:var(--calcite-size-fixed-sm-plus);border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-sheet-border-color, var(--calcite-color-border-3))}:host([position=inline-end]):host([display-mode=float]) .resize-handle-bar{border-start-start-radius:.25rem;border-end-start-radius:.25rem}:host([position=block-start]) .resize-handle{block-size:var(--calcite-size-fixed-xxl);inline-size:100%;inset-block-end:var(--calcite-internal-sheet-resize-handle-offset)}:host([position=block-start]) .resize-handle-bar{inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);border-block-start:var(--calcite-border-width-sm) solid var(--calcite-sheet-border-color, var(--calcite-color-border-3))}:host([position=block-start]):host([display-mode=float]) .resize-handle-bar{border-end-end-radius:.25rem;border-end-start-radius:.25rem}:host([position=block-end]) .resize-handle{block-size:var(--calcite-size-fixed-xxl);inline-size:100%;inset-block-start:var(--calcite-internal-sheet-resize-handle-offset)}:host([position=block-end]) .resize-handle-bar{inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);border-block-end:var(--calcite-border-width-sm) solid var(--calcite-sheet-border-color, var(--calcite-color-border-3))}:host([position=block-end]):host([display-mode=float]) .resize-handle-bar{border-start-start-radius:var(--calcite-sheet-corner-radius, var(--calcite-corner-radius-round));border-start-end-radius:var(--calcite-sheet-corner-radius, var(--calcite-corner-radius-round))}:host([position]) .container--embedded{pointer-events:auto;position:absolute;inline-size:100%;max-inline-size:100%;min-inline-size:100%;block-size:100%;max-block-size:100%;min-block-size:100%}:host([position]) .container--embedded calcite-scrim{position:absolute}:host([hidden]){display:none}[hidden]{display:none}`,D=class extends B{constructor(){super(),this.focusTrap=F({triggerProp:"open",focusTrapOptions:{clickOutsideDeactivates:()=>this.embedded,escapeDeactivates:e=>(!e.defaultPrevented&&!this.escapeDisabled&&(this.open=!1,e.preventDefault()),!1)}})(this),this.usePreventDocumentScroll=K()(this),this.messages=A(),this.mutationObserver=P("mutation",()=>this.handleMutationObserver()),this._open=!1,this.openProp="opened",this.transitionProp="opacity",this.focusSetter=R()(this),this.keyDownHandler=e=>{let{defaultPrevented:t,key:a}=e;!t&&!this.escapeDisabled&&this.focusTrapDisabled&&this.open&&a==="Escape"&&(e.preventDefault(),this.open=!1)},this.resizeValues={inlineSize:null,blockSize:null,minInlineSize:null,minBlockSize:null,maxInlineSize:null,maxBlockSize:null},this.displayMode="overlay",this.embedded=!1,this.escapeDisabled=!1,this.focusTrapDisabled=!1,this.heightScale="m",this.opened=!1,this.outsideCloseDisabled=!1,this.position="inline-start",this.resizable=!1,this.widthScale="m",this.calciteSheetBeforeClose=u({cancelable:!1}),this.calciteSheetBeforeOpen=u({cancelable:!1}),this.calciteSheetClose=u({cancelable:!1}),this.calciteSheetOpen=u({cancelable:!1}),this.listen("keydown",this.keyDownHandler)}static{this.properties={resizeValues:[16,{},{state:!0}],beforeClose:[0,{},{attribute:!1}],displayMode:[3,{},{reflect:!0}],embedded:[7,{},{reflect:!0,type:Boolean}],escapeDisabled:[7,{},{reflect:!0,type:Boolean}],focusTrapDisabled:[7,{},{reflect:!0,type:Boolean}],focusTrapOptions:[0,{},{attribute:!1}],heightScale:[3,{},{reflect:!0}],height:[3,{},{reflect:!0}],label:1,messageOverrides:[0,{},{attribute:!1}],open:[7,{},{reflect:!0,type:Boolean}],opened:[7,{},{reflect:!0,type:Boolean}],outsideCloseDisabled:[7,{},{reflect:!0,type:Boolean}],position:[3,{},{reflect:!0}],resizable:[7,{},{reflect:!0,type:Boolean}],widthScale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=N}get preventDocumentScroll(){return!this.embedded}get open(){return this._open}set open(e){let t=this._open;e!==t&&this.setOpenState(e)}async setFocus(e){return this.focusSetter(()=>this.el,e)}async updateFocusTrapElements(e){this.focusTrap.setExtraContainers(e),this.focusTrap.updateContainerElements()}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setupInteractions()}willUpdate(e){e.has("opened")&&(this.hasUpdated||this.opened!==!1)&&(L(this),this.handlePopover()),(e.has("open")&&(this.hasUpdated||this.open!==!1)||e.has("position")&&(this.hasUpdated||this.position!=="inline-start")||e.has("resizable")&&(this.hasUpdated||this.resizable!==!1))&&this.setupInteractions()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.embedded=!1,this.cleanupInteractions()}async handlePopover(){await this.componentOnReady(),!(this.embedded||!this.transitionEl)&&(this.opened?this.transitionEl.showPopover():this.transitionEl.hidePopover())}async setOpenState(e){if(this.beforeClose&&!e)try{await this.beforeClose?.(this.el)}catch{return}this._open=e,e&&await this.componentOnReady(),this.opened=e}getResizeIcon(){let{position:e}=this;return e==="block-start"||e==="block-end"?_.dragVertical:_.dragHorizontal}getContentElDOMRect(){return this.contentEl.getBoundingClientRect()}handleKeyDown(e){let{key:t,defaultPrevented:a,shiftKey:n}=e,{position:i,resizable:s,contentEl:b,el:h,resizeValues:{maxBlockSize:x,maxInlineSize:k,minBlockSize:g,minInlineSize:w}}=this,z=[...i==="block-end"||i==="block-start"?["ArrowUp","ArrowDown"]:["ArrowLeft","ArrowRight"],"Home","End"];if(!s||!b||a||!z.includes(t))return;let l=this.getContentElDOMRect(),m=f(h)==="rtl"?-1:1,o=n?T:$;switch(t){case"ArrowUp":this.updateSize({size:l.height+(i==="block-end"?o:-o),type:"blockSize"}),e.preventDefault();break;case"ArrowDown":this.updateSize({size:l.height+(i==="block-end"?-o:o),type:"blockSize"}),e.preventDefault();break;case"ArrowLeft":this.updateSize({size:l.width+(i==="inline-end"?o:-o)*m,type:"inlineSize"}),e.preventDefault();break;case"ArrowRight":this.updateSize({size:l.width+(i==="inline-end"?-o:o)*m,type:"inlineSize"}),e.preventDefault();break;case"Home":this.updateSize({size:i==="block-start"||i==="block-end"?g:w,type:i==="block-start"||i==="block-end"?"blockSize":"inlineSize"}),e.preventDefault();break;case"End":this.updateSize({size:i==="block-start"||i==="block-end"?x:k,type:i==="block-start"||i==="block-end"?"blockSize":"inlineSize"}),e.preventDefault();break}}updateSize({type:e,size:t}){let{contentEl:a,resizeValues:n}=this;if(!a)return;let i=e==="blockSize"?"minBlockSize":"minInlineSize",s=e==="blockSize"?"maxBlockSize":"maxInlineSize",b=n[i]&&n[s]?U(t,n[i],n[s]):t,h=Math.round(b);this.resizeValues={...n,[e]:h},a.style[e]=t!==null?`${h}px`:null}cleanupInteractions(){this.interaction?.unset(),this.updateSize({size:null,type:"inlineSize"}),this.updateSize({size:null,type:"blockSize"})}async setupInteractions(){this.cleanupInteractions();let{el:e,contentEl:t,resizable:a,position:n,open:i,resizeHandleEl:s}=this;if(!t||!i||!a||!s)return;await this.el.componentOnReady();let{inlineSize:b,minInlineSize:h,blockSize:x,minBlockSize:k,maxInlineSize:g,maxBlockSize:w}=window.getComputedStyle(t),p={inlineSize:d(b),blockSize:d(x),minInlineSize:d(h),minBlockSize:d(k),maxInlineSize:d(g)||window.innerWidth,maxBlockSize:d(w)||window.innerHeight};this.resizeValues=p;let z=f(e)==="rtl";this.interaction=S(t,{context:e.ownerDocument}).resizable({edges:{top:n==="block-end"?s:!1,right:n===(z?"inline-end":"inline-start")?s:!1,bottom:n==="block-start"?s:!1,left:n===(z?"inline-start":"inline-end")?s:!1},modifiers:[S.modifiers.restrictSize({min:{width:p.minInlineSize,height:p.minBlockSize},max:{width:p.maxInlineSize,height:p.maxBlockSize}})],listeners:{move:({rect:l})=>{let m=n==="block-start"||n==="block-end";this.updateSize({size:m?l.height:l.width,type:m?"blockSize":"inlineSize"})}}})}onBeforeOpen(){this.calciteSheetBeforeOpen.emit()}onOpen(){this.focusTrapDisabled&&this.setFocus(),this.focusTrap.activate(),this.calciteSheetOpen.emit()}onBeforeClose(){this.calciteSheetBeforeClose.emit()}onClose(){this.calciteSheetClose.emit(),this.focusTrap.deactivate()}setResizeHandleEl(e){this.resizeHandleEl=e,this.setupInteractions()}setContentEl(e){this.contentEl=e,this.contentId=M(e)}setTransitionEl(e){e&&(this.transitionEl=e,this.handlePopover())}handleOutsideClose(){this.outsideCloseDisabled||(this.open=!1)}handleMutationObserver(){this.focusTrap.updateContainerElements()}render(){let{resizable:e,position:t,resizeValues:a}=this,n=f(this.el),i=t==="block-start"||t==="block-end";return I(this.el,"aria-describedby",this.contentId),this.el.ariaLabel=this.label,this.el.ariaModal="true",this.el.role="dialog",y`<div class=${c({[r.container]:!0,[r.containerOpen]:this.opened,[r.containerEmbedded]:this.embedded,[O.rtl]:n==="rtl",[C("width",this.width,this.widthScale)]:!!(this.width||this.widthScale),[C("height",this.height,this.heightScale)]:!!(this.height||this.heightScale)})} .popover=${this.embedded?null:"manual"} ${v(this.setTransitionEl)}><calcite-scrim class=${c(r.scrim)} @click=${this.handleOutsideClose}></calcite-scrim><div class=${c(r.content)} id=${j.sheetContent} ${v(this.setContentEl)}><div class=${c(r.contentContainer)}><slot></slot></div>${e?V("resize-handle",y`<div .ariaLabel=${this.messages.resizeEnabled} .ariaOrientation=${i?"vertical":"horizontal"} .ariaValueMax=${i?a.maxBlockSize:a.maxInlineSize} .ariaValueMin=${i?a.minBlockSize:a.minInlineSize} .ariaValueNow=${i?a.blockSize:a.inlineSize} class=${c(r.resizeHandle)} @keydown=${this.handleKeyDown} role=separator tabindex=0 touch-action=none ${v(this.setResizeHandleEl)}><div class=${c(r.resizeHandleBar)}><calcite-icon .icon=${this.getResizeIcon()} scale=s></calcite-icon></div></div>`):null}</div></div>`}};H("calcite-sheet",D);export{D as Sheet};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as y}from"./
|
|
3
|
+
v5.0.0-next.26 */
|
|
4
|
+
import{a as y}from"./TOJWPJZO.js";import{a as x}from"./ET5LOAXJ.js";import{a as v}from"./6F7MIVOD.js";import{a as g}from"./LLHJY7FO.js";import"./WUWREGJO.js";import"./7UWIO6G4.js";import"./5DDVN7VT.js";import"./HTSVYMIU.js";import{B as u,C as b,D as p,E as f,P as m,g as d,h,l as s,o as l}from"./S3LMUVIR.js";var S={handle:"handle",handleSelected:"handle--selected"},k={drag:"drag"},i={itemLabel:"{itemLabel}",position:"{position}",total:"{total}"},C=d`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex}.handle{display:flex;align-items:center;justify-content:center;align-self:stretch;border-style:none;outline-color:transparent;color:var(--calcite-handle-icon-color, var(--calcite-color-border-input));background-color:var(--calcite-handle-background-color, transparent);padding-block:.75rem;padding-inline:.25rem;line-height:0}.handle calcite-icon{color:inherit}:host(:not([disabled])) .handle{cursor:move}:host(:not([disabled])) .handle:hover{color:var(--calcite-handle-icon-color-hover, var(--calcite-color-text-1));background-color:var(--calcite-handle-background-color-hover, var(--calcite-color-foreground-2))}:host(:not([disabled])) .handle:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))));color:var(--calcite-handle-icon-color-hover, var(--calcite-color-text-1))}:host(:not([disabled])) .handle--selected{color:var(--calcite-handle-icon-color-selected, var(--calcite-color-text-1));background-color:var(--calcite-handle-background-color-selected, var(--calcite-color-foreground-3))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,o=class extends p{constructor(){super(...arguments),this.handleButtonRef=u(),this.messages=v({blocking:!0}),this.focusSetter=g()(this),this.interactiveContainer=y(this),this.blurUnselectDisabled=!1,this.disabled=!1,this.selected=!1,this.calciteHandleChange=l({cancelable:!1}),this.calciteHandleNudge=l({cancelable:!1}),this.calciteInternalAssistiveTextChange=l({cancelable:!1})}static{this.properties={blurUnselectDisabled:[5,{},{type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],dragHandle:[3,{},{reflect:!0}],label:1,messageOverrides:[0,{},{attribute:!1}],selected:[7,{},{reflect:!0,type:Boolean}],setPosition:[9,{},{type:Number}],setSize:[9,{},{type:Number}]}}static{this.styles=C}async setFocus(e){return this.focusSetter(()=>this.handleButtonRef.value,e)}willUpdate(e){(e.has("messages")||e.has("label")||e.has("selected")&&(this.hasUpdated||this.selected!==!1)||e.has("setPosition")||e.has("setSize"))&&this.handleAriaTextChange()}loaded(){x.deprecated("component",{component:this,name:"handle",removalVersion:5,suggested:"sort-handle"})}handleAriaTextChange(){let e=this.getAriaText("live");e&&this.calciteInternalAssistiveTextChange.emit({message:e})}getTooltip(){let{label:e,messages:t}=this;return t?e?t.dragHandle.replace(i.itemLabel,e):t.dragHandleUntitled:""}getAriaText(e){let{setPosition:t,setSize:r,label:c,messages:a,selected:n}=this;return!a||!c||typeof r!="number"||typeof t!="number"?null:(e==="label"?n?a.dragHandleChange:a.dragHandleIdle:n?a.dragHandleActive:a.dragHandleCommit).replace(i.position,t.toString()).replace(i.itemLabel,c).replace(i.total,r.toString())}handleKeyDown(e){if(!this.disabled)switch(e.key){case" ":this.selected=!this.selected,this.calciteHandleChange.emit(),e.preventDefault();break;case"ArrowUp":if(!this.selected)return;e.preventDefault(),this.calciteHandleNudge.emit({direction:"up"});break;case"ArrowDown":if(!this.selected)return;e.preventDefault(),this.calciteHandleNudge.emit({direction:"down"});break}}handleBlur(){this.blurUnselectDisabled||this.disabled||this.selected&&(this.selected=!1,this.calciteHandleChange.emit())}render(){return this.interactiveContainer({disabled:this.disabled,children:h`<span .ariaChecked=${this.disabled?null:this.selected} .ariaDisabled=${this.disabled?this.disabled:null} .ariaLabel=${this.disabled?null:this.getAriaText("label")} class=${f({[S.handle]:!0,[S.handleSelected]:!this.disabled&&this.selected})} @blur=${this.handleBlur} @keydown=${this.handleKeyDown} role=radio tabindex=${(this.disabled?null:0)??s} title=${this.getTooltip()??s} ${b(this.handleButtonRef)}><calcite-icon .icon=${k.drag} scale=s></calcite-icon></span>`})}};m("calcite-handle",o);export{o as Handle};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.26 */
|
|
4
4
|
function fe(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?fe(Object(n),!0).forEach(function(o){Xe(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fe(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Mt(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Mt=function(t){return typeof t}:Mt=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mt(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.6";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),Tt=U(/Edge/i),ce=U(/firefox/i),Et=U(/safari/i)&&!U(/chrome/i)&&!U(/android/i),ie=U(/iP(ad|od|hone)/i),we=U(/chrome/i)&&U(/android/i),ye={capture:!1,passive:!1};function v(e,t,n){e.addEventListener(t,n,!q&&ye)}function m(e,t,n){e.removeEventListener(t,n,!q&&ye)}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 Ee(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=Ee(e))}return null}var de=/\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(de," ").replace(" "+t+" "," ");e.className=(o+(n?" "+t:"")).replace(de," ")}}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 ct(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 De(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 T(e,t,n,o,i){if(!(!e.getBoundingClientRect&&e!==window)){var r,a,l,s,u,c,d;if(e!==window&&e.parentNode&&e!==K()?(r=e.getBoundingClientRect(),a=r.top,l=r.left,s=r.bottom,u=r.right,c=r.height,d=r.width):(a=0,l=0,s=window.innerHeight,u=window.innerWidth,c=window.innerHeight,d=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 b=i.getBoundingClientRect();a-=b.top+parseInt(h(i,"border-top-width")),l-=b.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 E=ct(i||e),w=E&&E.a,y=E&&E.d;E&&(a/=y,l/=w,d/=w,c/=y,s=a+c,u=l+d)}return{top:a,left:l,bottom:s,right:u,width:d,height:c}}}function he(e,t,n){for(var o=tt(e,!0),i=T(e)[t];o;){var r=T(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 re(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 pe(e){var t=0,n=0,o=K();if(e)do{var i=ct(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 Dt;function Se(e,t){return function(){if(!Dt){var n=arguments,o=this;n.length===1?e.call(o,n[0]):e.apply(o,n),Dt=setTimeout(function(){Dt=void 0},t)}}}function Ke(){clearTimeout(Dt),Dt=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 Te(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=T(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 P="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:T(i)});var r=L({},e[e.length-1].rect);if(i.thisAnimationDuration){var a=ct(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,c=u.fromRect,d=T(u),b=u.prevFromRect,E=u.prevToRect,w=l.rect,y=ct(u,!0);y&&(d.top-=y.f,d.left-=y.e),u.toRect=d,u.thisAnimationDuration&&jt(b,d)&&!jt(c,d)&&(w.top-d.top)/(w.left-d.left)===(c.top-d.top)/(c.left-d.left)&&(s=ze(w,b,E,i.options)),jt(d,c)||(u.prevFromRect=c,u.prevToRect=d,s||(s=i.options.animation),i.animate(u,w,d,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=ct(this.el),s=l&&l.a,u=l&&l.d,c=(i.left-r.left)/(s||1),d=(i.top-r.top)/(u||1);o.animatingX=!!c,o.animatingY=!!d,h(o,"transform","translate3d("+c+"px,"+d+"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,c=e.oldDraggableIndex,d=e.newDraggableIndex,b=e.originalEvent,E=e.putSortable,w=e.extraEventProperties;if(t=t||n&&n[P],!!t){var y,Y=t.options,j="on"+o.charAt(0).toUpperCase()+o.substr(1);window.CustomEvent&&!q&&!Tt?y=new CustomEvent(o,{bubbles:!0,cancelable:!0}):(y=document.createEvent("Event"),y.initEvent(o,!0,!0)),y.to=a||n,y.from=l||n,y.item=i||n,y.clone=r,y.oldIndex=s,y.newIndex=u,y.oldDraggableIndex=c,y.newDraggableIndex=d,y.originalEvent=b,y.pullMode=E?E.lastPutMode:void 0;var I=L(L({},w),Ot.getEventProperties(o,t));for(var B in I)y[B]=I[B];n&&n.dispatchEvent(y),Y[j]&&Y[j].call(t,y)}}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:f,parentEl:_,ghostEl:g,rootEl:D,nextEl:at,lastDownEl:Ft,cloneEl:S,cloneHidden:J,dragStarted:bt,putSortable:O,activeSortable:p.active,originalEvent:i,oldIndex:ft,oldDraggableIndex:St,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:S,targetEl:f,rootEl:D,oldIndex:ft,oldDraggableIndex:St,newIndex:k,newDraggableIndex:Q},e))}var f,_,g,D,at,Ft,S,J,ft,k,St,Q,It,O,ut=!1,Bt=!1,Gt=[],it,G,Ut,$t,ge,me,bt,st,_t,Ct=!1,xt=!1,Rt,A,qt=[],te=!1,Ht=[],Kt=typeof document<"u",Nt=ie,ve=Tt||q?"cssFloat":"float",qe=Kt&&!we&&!ie&&"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"}})(),Ae=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)+T(r).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+T(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 d=l.float==="left"?"left":"right";return a&&(s.clear==="both"||s.clear===d)?"vertical":"horizontal"}return r&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||u>=i&&o[ve]==="none"||a&&o[ve]==="none"&&u+c>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[P].options.emptyInsertThreshold;if(!(!r||re(i))){var a=T(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},Ie=function(t){function n(r,a){return function(l,s,u,c){var d=l.options.group.name&&s.options.group.name&&l.options.group.name===s.options.group.name;if(r==null&&(a||d))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,c),a)(l,s,u,c);var b=(a?l:s).options.group.name;return r===!0||typeof r=="string"&&r===b||r.join&&r.indexOf(b)>-1}}var o={},i=t.group;(!i||Mt(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&&!we&&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(f){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[P]._onDragOver(o)}}},Qe=function(t){f&&f.parentNode[P]._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[P]=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 Ae(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&&(!Et||ie),emptyInsertThreshold:5};Ot.initializePlugins(this,e,n);for(var o in n)!(o in t)&&(t[o]=n[o]);Ie(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?v(e,"pointerdown",this._onTapStart):(v(e,"mousedown",this._onTapStart),v(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(v(e,"dragover",this),v(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,f):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,c=i.filter;if(ln(o),!f&&!(/mousedown|pointerdown/.test(a)&&t.button!==0||i.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&Et&&s&&s.tagName.toUpperCase()==="SELECT")&&(s=H(s,i.draggable,o,!1),!(s&&s.animated)&&Ft!==s)){if(ft=X(s),St=X(s,i.draggable),typeof c=="function"){if(c.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.preventDefault();return}}else if(c&&(c=c.split(",").some(function(d){if(d=H(u,d.trim(),o,!1),d)return x({sortable:n,rootEl:d,name:"filter",targetEl:s,fromEl:o,toEl:o}),N("filter",n,{evt:t}),!0}),c)){r&&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&&!f&&o.parentNode===r){var u=T(o);if(D=r,f=o,_=f.parentNode,at=f.nextSibling,Ft=o,It=a.group,p.dragged=f,it={target:f,clientX:(n||t).clientX,clientY:(n||t).clientY},ge=it.clientX-u.left,me=it.clientY-u.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,f.style["will-change"]="all",s=function(){if(N("delayEnded",i,{evt:t}),p.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!ce&&i.nativeDraggable&&(f.draggable=!0),i._triggerDragStart(t,n),x({sortable:i,name:"choose",originalEvent:t}),R(f,a.chosenClass,!0)},a.ignore.split(",").forEach(function(c){De(f,c.trim(),Vt)}),v(l,"dragover",rt),v(l,"mousemove",rt),v(l,"touchmove",rt),a.supportPointer?(v(l,"pointerup",i._onDrop),!this.nativeDraggable&&v(l,"pointercancel",i._onDrop)):(v(l,"mouseup",i._onDrop),v(l,"touchend",i._onDrop),v(l,"touchcancel",i._onDrop)),ce&&this.nativeDraggable&&(this.options.touchStartThreshold=4,f.draggable=!0),N("delayStart",this,{evt:t}),a.delay&&(!a.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Tt||q))){if(p.eventCanceled){this._onDrop();return}a.supportPointer?(v(l,"pointerup",i._disableDelayedDrag),v(l,"pointercancel",i._disableDelayedDrag)):(v(l,"mouseup",i._disableDelayedDrag),v(l,"touchend",i._disableDelayedDrag),v(l,"touchcancel",i._disableDelayedDrag)),v(l,"mousemove",i._delayedDragTouchMoveHandler),v(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&v(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(){f&&Vt(f),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;m(t,"mouseup",this._disableDelayedDrag),m(t,"touchend",this._disableDelayedDrag),m(t,"touchcancel",this._disableDelayedDrag),m(t,"pointerup",this._disableDelayedDrag),m(t,"pointercancel",this._disableDelayedDrag),m(t,"mousemove",this._delayedDragTouchMoveHandler),m(t,"touchmove",this._delayedDragTouchMoveHandler),m(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?v(document,"pointermove",this._onTouchMove):n?v(document,"touchmove",this._onTouchMove):v(document,"mousemove",this._onTouchMove):(v(f,"dragend",this),v(D,"dragstart",this._onDragStart));try{document.selection?kt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(ut=!1,D&&f){N("dragStarted",this,{evt:n}),this.nativeDraggable&&v(document,"dragover",Qe);var o=this.options;!t&&R(f,o.dragClass,!1),R(f,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(f.parentNode[P]._isOutsideThisEl(t),n)do{if(n[P]){var o=void 0;if(o=n[P]._onDragOver({clientX:G.clientX,clientY:G.clientY,target:t,rootEl:n}),o&&!this.options.dragoverBubble)break}t=n}while(n=Ee(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&&ct(g,!0),l=g&&a&&a.a,s=g&&a&&a.d,u=Nt&&A&&pe(A),c=(r.clientX-it.clientX+i.x)/(l||1)+(u?u[0]-qt[0]:0)/(l||1),d=(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+=c-(Ut||0),a.f+=d-($t||0)):a={a:1,b:0,c:0,d:1,e:c,f:d};var b="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");h(g,"webkitTransform",b),h(g,"mozTransform",b),h(g,"msTransform",b),h(g,"transform",b),Ut=c,$t=d,G=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!g){var t=this.options.fallbackOnBody?document.body:D,n=T(f,!0,Nt,!0,t),o=this.options;if(Nt){for(A=t;h(A,"position")==="static"&&h(A,"transform")==="none"&&A!==document;)A=A.parentNode;A!==document.body&&A!==document.documentElement?(A===document&&(A=K()),n.top+=A.scrollTop,n.left+=A.scrollLeft):A=K(),qt=pe(A)}g=f.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",ge/parseInt(g.style.width)*100+"% "+me/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||(S=Ce(f),S.removeAttribute("id"),S.draggable=!1,S.style["will-change"]="",this._hideClone(),R(S,this.options.chosenClass,!1),p.clone=S),o.cloneId=kt(function(){N("clone",o),!p.eventCanceled&&(o.options.removeCloneOnHide||D.insertBefore(S,f),o._hideClone(),x({sortable:o,name:"clone"}))}),!n&&R(f,r.dragClass,!0),n?(Bt=!0,o._loopId=setInterval(o._emulateDragOver,50)):(m(document,"mouseup",o._onDrop),m(document,"touchend",o._onDrop),m(document,"touchcancel",o._onDrop),i&&(i.effectAllowed="move",r.setData&&r.setData.call(o,i,f)),v(document,"drop",o),h(f,"transform","translateZ(0)")),ut=!0,o._dragStartId=kt(o._dragStarted.bind(o,n,t)),v(document,"selectstart",o),bt=!0,window.getSelection().removeAllRanges(),Et&&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,c=It===s,d=l.sort,b=O||u,E,w=this,y=!1;if(te)return;function Y(vt,Re){N(vt,w,L({evt:t,isOwner:c,axis:E?"vertical":"horizontal",revert:a,dragRect:i,targetRect:r,canSort:d,fromSortable:b,target:o,completed:I,onMove:function(ue,ke){return Pt(D,n,f,i,ue,T(ue),t,ke)},changed:B},Re))}function j(){Y("dragOverAnimationCapture"),w.captureAnimationState(),w!==b&&b.captureAnimationState()}function I(vt){return Y("dragOverCompleted",{insertion:vt}),vt&&(c?u._hideClone():u._showClone(w),w!==b&&(R(f,O?O.options.ghostClass:u.options.ghostClass,!1),R(f,l.ghostClass,!0)),O!==w&&w!==p.active?O=w:w===p.active&&O&&(O=null),b===w&&(w._ignoreWhileAnimating=o),w.animateAll(function(){Y("dragOverAnimationComplete"),w._ignoreWhileAnimating=null}),w!==b&&(b.animateAll(),b._ignoreWhileAnimating=null)),(o===f&&!f.animated||o===n&&!o.animated)&&(st=null),!l.dragoverBubble&&!t.rootEl&&o!==document&&(f.parentNode[P]._isOutsideThisEl(t.target),!vt&&rt(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),y=!0}function B(){k=X(f),Q=X(f,l.draggable),x({sortable:w,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 y;if(f.contains(t.target)||o.animated&&o.animatingX&&o.animatingY||w._ignoreWhileAnimating===o)return I(!1);if(Bt=!1,u&&!l.disabled&&(c?d||(a=_!==D):O===this||(this.lastPutMode=It.checkPull(this,u,f,t))&&s.checkPut(this,u,f,t))){if(E=this._getDirection(t,o)==="vertical",i=T(f),Y("dragOverValid"),p.eventCanceled)return y;if(a)return _=D,j(),this._hideClone(),Y("revert"),p.eventCanceled||(at?D.insertBefore(f,at):D.appendChild(f)),I(!0);var M=re(n,l.draggable);if(!M||nn(t,E,this)&&!M.animated){if(M===f)return I(!1);if(M&&n===t.target&&(o=M),o&&(r=T(o)),Pt(D,n,f,i,o,r,t,!!o)!==!1)return j(),M&&M.nextSibling?n.insertBefore(f,M.nextSibling):n.appendChild(f),_=n,B(),I(!0)}else if(M&&en(t,E,this)){var et=dt(n,0,l,!0);if(et===f)return I(!1);if(o=et,r=T(o),Pt(D,n,f,i,o,r,t,!1)!==!1)return j(),n.insertBefore(f,et),_=n,B(),I(!0)}else if(o.parentNode===n){r=T(o);var W=0,nt,ht=f.parentNode!==n,F=!Ve(f.animated&&f.toRect||i,o.animated&&o.toRect||r,E),pt=E?"top":"left",V=he(o,"top","top")||he(f,"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,E,F?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,xt,st===o);var z;if(W!==0){var ot=X(f);do ot-=W,z=_.children[ot];while(z&&(h(z,"display")==="none"||z===g))}if(W===0||z===o)return I(!1);st=o,_t=W;var mt=o.nextElementSibling,Z=!1;Z=W===1;var At=Pt(D,n,f,i,o,r,t,Z);if(At!==!1)return(At===1||At===-1)&&(Z=At===1),te=!0,setTimeout(tn,30),j(),Z&&!mt?n.appendChild(f):o.parentNode.insertBefore(f,Z?mt:o),V&&_e(V,0,gt-V.scrollTop),_=f.parentNode,nt!==void 0&&!xt&&(Rt=Math.abs(nt-T(o)[pt])),B(),I(!0)}if(n.contains(f))return I(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){m(document,"mousemove",this._onTouchMove),m(document,"touchmove",this._onTouchMove),m(document,"pointermove",this._onTouchMove),m(document,"dragover",rt),m(document,"mousemove",rt),m(document,"touchmove",rt)},_offUpEvents:function(){var t=this.el.ownerDocument;m(t,"mouseup",this._onDrop),m(t,"touchend",this._onDrop),m(t,"pointerup",this._onDrop),m(t,"pointercancel",this._onDrop),m(t,"touchcancel",this._onDrop),m(document,"selectstart",this)},_onDrop:function(t){var n=this.el,o=this.options;if(k=X(f),Q=X(f,o.draggable),N("drop",this,{evt:t}),_=f&&f.parentNode,k=X(f),Q=X(f,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&&(m(document,"drop",this),m(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Et&&h(document.body,"user-select",""),h(f,"transform",""),t&&(bt&&(t.cancelable&&t.preventDefault(),!o.dropBubble&&t.stopPropagation()),g&&g.parentNode&&g.parentNode.removeChild(g),(D===_||O&&O.lastPutMode!=="clone")&&S&&S.parentNode&&S.parentNode.removeChild(S),f&&(this.nativeDraggable&&m(f,"dragend",this),Vt(f),f.style["will-change"]="",bt&&!ut&&R(f,O?O.options.ghostClass:this.options.ghostClass,!1),R(f,this.options.chosenClass,!1),x({sortable:this,name:"unchoose",toEl:_,newIndex:null,newDraggableIndex:null,originalEvent:t}),D!==_?(k>=0&&(x({rootEl:_,name:"add",toEl:_,fromEl:D,originalEvent:t}),x({sortable:this,name:"remove",toEl:_,originalEvent:t}),x({rootEl:_,name:"sort",toEl:_,fromEl:D,originalEvent:t}),x({sortable:this,name:"sort",toEl:_,originalEvent:t})),O&&O.save()):k!==ft&&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=ft,Q=St),x({sortable:this,name:"end",toEl:_,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){N("nulling",this),D=f=_=g=at=S=Ft=J=it=G=bt=k=Q=ft=St=st=_t=O=It=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":f&&(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"&&Ie(o)},destroy:function(){N("destroy",this);var t=this.el;t[P]=null,m(t,"mousedown",this._onTapStart),m(t,"touchstart",this._onTapStart),m(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(m(t,"dragover",this),m(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(S,"display","none"),this.options.removeCloneOnHide&&S.parentNode&&S.parentNode.removeChild(S),J=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(J){if(N("showClone",this),p.eventCanceled)return;f.parentNode==D&&!this.options.group.revertClone?D.insertBefore(S,f):at?D.insertBefore(S,at):D.appendChild(S),this.options.group.revertClone&&this.animate(f,S),h(S,"display",""),J=!1}}};function Je(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function Pt(e,t,n,o,i,r,a,l){var s,u=e[P],c=u.options.onMove,d;return window.CustomEvent&&!q&&!Tt?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||T(t),s.willInsertAfter=l,s.originalEvent=a,e.dispatchEvent(s),c&&(d=c.call(u,s,a)),d}function Vt(e){e.draggable=!1}function tn(){te=!1}function en(e,t,n){var o=T(dt(n.el,0,n.options,!0)),i=Te(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=T(re(n.el,n.options.draggable)),i=Te(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,c=o?n.top:n.left,d=o?n.bottom:n.right,b=!1;if(!a){if(l&&Rt<u*i){if(!Ct&&(_t===1?s>c+u*r/2:s<d-u*r/2)&&(Ct=!0),Ct)b=!0;else if(_t===1?s<c+Rt:s>d-Rt)return-_t}else if(s>c+u*(1-i)/2&&s<d-u*(1-i)/2)return rn(t)}return b=b||a,b&&(s<c+u*r/2||s>d-u*r/2)?s>c+u/2?1:-1:0}function rn(e){return X(f)<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&&v(document,"touchmove",function(e){(p.active||ut)&&e.cancelable&&e.preventDefault()});p.utils={on:v,off:m,css:h,find:De,is:function(t,n){return!!H(t,n,t,!1)},extend:We,throttle:Se,closest:H,toggleClass:R,clone:Ce,index:X,nextTick:kt,cancelNextTick:ee,detectDirection:Ae,getChild:dt,expando:P};p.get=function(e){return e[P]};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=[],wt,ne,oe=!1,Zt,Qt,Wt,yt;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?v(document,"dragover",this._handleAutoScroll):this.options.supportPointer?v(document,"pointermove",this._handleFallbackAutoScroll):o.touches?v(document,"touchmove",this._handleFallbackAutoScroll):v(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var o=n.originalEvent;!this.options.dragOverBubble&&!o.rootEl&&this._handleAutoScroll(o)},drop:function(){this.sortable.nativeDraggable?m(document,"dragover",this._handleAutoScroll):(m(document,"pointermove",this._handleFallbackAutoScroll),m(document,"touchmove",this._handleFallbackAutoScroll),m(document,"mousemove",this._handleFallbackAutoScroll)),be(),Xt(),Ke()},nulling:function(){Wt=ne=wt=oe=yt=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||Tt||q||Et){Jt(n,this.options,l,o);var s=tt(l,!0);oe&&(!yt||r!==Zt||a!==Qt)&&(yt&&be(),yt=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 be(){clearInterval(yt)}var Jt=Se(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,c;ne!==n&&(ne=n,Xt(),wt=t.scroll,c=t.scrollFn,wt===!0&&(wt=tt(n,!0)));var d=0,b=wt;do{var E=b,w=T(E),y=w.top,Y=w.bottom,j=w.left,I=w.right,B=w.width,M=w.height,et=void 0,W=void 0,nt=E.scrollWidth,ht=E.scrollHeight,F=h(E),pt=E.scrollLeft,V=E.scrollTop;E===s?(et=B<nt&&(F.overflowX==="auto"||F.overflowX==="scroll"||F.overflowX==="visible"),W=M<ht&&(F.overflowY==="auto"||F.overflowY==="scroll"||F.overflowY==="visible")):(et=B<nt&&(F.overflowX==="auto"||F.overflowX==="scroll"),W=M<ht&&(F.overflowY==="auto"||F.overflowY==="scroll"));var gt=et&&(Math.abs(I-i)<=a&&pt+B<nt)-(Math.abs(j-i)<=a&&!!pt),z=W&&(Math.abs(Y-r)<=a&&V+M<ht)-(Math.abs(y-r)<=a&&!!V);if(!C[d])for(var ot=0;ot<=d;ot++)C[ot]||(C[ot]={});(C[d].vx!=gt||C[d].vy!=z||C[d].el!==E)&&(C[d].el=E,C[d].vx=gt,C[d].vy=z,clearInterval(C[d].pid),(gt!=0||z!=0)&&(u=!0,C[d].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 c=="function"&&c.call(p.dragged.parentNode[P],Z,mt,e,Wt,C[this.layer].el)!=="continue"||_e(C[this.layer].el,Z,mt)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&b!==s&&(b=tt(b,!1)));oe=u}},30),Pe=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 c=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,d=document.elementFromPoint(c.clientX,c.clientY);s(),u&&!u.el.contains(d)&&(a("spill"),this.onSpill({dragEl:i,putSortable:o}))}};function ae(){}ae.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:Pe};$(ae,{pluginName:"revertOnSpill"});function le(){}le.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:Pe};$(le,{pluginName:"removeOnSpill"});p.mount(new sn);p.mount(le,ae);var Me=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;fn(e),Lt.add(e);let t="id",{group:n,handleSelector:o,dragSelector:i,sortDisabled:r}=e;e.sortable=Me.create(e.el,{dataIdAttr:t,swapThreshold:.5,...un,...!!i&&{draggable:i},...!!n&&{sort:!r,group:{name:n,...!!e.canPull&&{pull:(a,l,s,{newDraggableIndex:u,oldDraggableIndex:c})=>e.canPull({toEl:a.el,fromEl:l.el,dragEl:s,newIndex:u,oldIndex:c})},...!!e.canPut&&{put:(a,l,s,{newDraggableIndex:u,oldDraggableIndex:c})=>e.canPut({toEl:a.el,fromEl:l.el,dragEl:s,newIndex:u,oldIndex:c})}}},onMove:({from:a,dragged:l,to:s,related:u})=>{e.onDragMove&&e.onDragMove({fromEl:a,dragEl:l,toEl:s,relatedEl:u})},handle:o,filter:`${o}[disabled]`,onStart:({from:a,item:l,to:s,newDraggableIndex:u,oldDraggableIndex:c})=>{se.active=!0,cn(),e.onDragStart({fromEl:a,dragEl:l,toEl:s,newIndex:u,oldIndex:c})},onEnd:({from:a,item:l,to:s,newDraggableIndex:u,oldDraggableIndex:c})=>{se.active=!1,dn(),e.onDragEnd({fromEl:a,dragEl:l,toEl:s,newIndex:u,oldIndex:c})},onSort:({from:a,item:l,to:s,newDraggableIndex:u,oldDraggableIndex:c})=>{e.onDragSort({fromEl:a,dragEl:l,toEl:s,newIndex:u,oldIndex:c})}})}function fn(e){Fe(e)||(Lt.delete(e),e.sortable?.destroy(),e.sortable=null)}var se={active:!1};function Fe(e){return e.dragEnabled&&se.active}function cn(){Array.from(Lt).forEach(e=>e.onGlobalDragStart())}function dn(){Array.from(Lt).forEach(e=>e.onGlobalDragEnd())}export{mn as a,fn as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as u}from"./
|
|
3
|
+
v5.0.0-next.26 */
|
|
4
|
+
import{a as u}from"./TOJWPJZO.js";import{a as f}from"./LLHJY7FO.js";import"./WUWREGJO.js";import"./7UWIO6G4.js";import{u as m,y as l}from"./5DDVN7VT.js";import"./HTSVYMIU.js";import{B as r,C as h,D as d,P as p,g as c,h as o,o as n}from"./S3LMUVIR.js";var g=c`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex}.container{display:flex;inline-size:100%;flex-wrap:wrap;gap:.5rem}::slotted(calcite-chip){flex:none}:host([scale=s]) .container{gap:.25rem}:host([scale=l]) .container{gap:.75rem}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,a=class extends d{constructor(){super(),this.items=[],this.slotRef=r(),this.focusSetter=f()(this),this.interactiveContainer=u(this),this.disabled=!1,this.scale="m",this.selectedItems=[],this.selectionMode="none",this.calciteChipGroupSelect=n({cancelable:!1}),this.listen("calciteInternalChipKeyEvent",this.calciteInternalChipKeyEventListener),this.listen("calciteChipClose",this.calciteChipCloseListener),this.listen("calciteChipSelect",this.calciteChipSelectListener),this.listen("calciteInternalChipSelect",this.calciteInternalChipSelectListener),this.listen("calciteInternalSyncSelectedChips",this.calciteInternalSyncSelectedChips)}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],label:1,scale:[3,{},{reflect:!0}],selectedItems:[0,{},{attribute:!1}],selectionMode:[3,{},{reflect:!0}]}}static{this.styles=g}async setFocus(e){return this.focusSetter(()=>this.selectedItems[0]||this.items[0],e)}willUpdate(e){e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="none")&&this.updateItems()}calciteInternalChipKeyEventListener(e){if(e.composedPath().includes(this.el)){let t={ArrowRight:"next",ArrowLeft:"previous",Home:"first",End:"last"}[e.detail.key];if(t){let i=this.items?.filter(I=>!I.disabled);l(i,e.detail.target,t,!0,!0,!0)}}e.stopPropagation()}calciteChipCloseListener(e){let s=e.target;this.items?.includes(s)&&(this.items?.indexOf(s)>0?l(this.items,s,"previous",!1,!1):this.items?.indexOf(s)===0?l(this.items,s,"next",!1,!1):l(this.items,s,"first",!1,!1)),this.items=this.items?.filter(t=>t!==s),e.stopPropagation()}calciteChipSelectListener(e){e.composedPath().includes(this.el)&&this.setSelectedItems(!0,e.target),e.stopPropagation()}calciteInternalChipSelectListener(e){e.composedPath().includes(this.el)&&this.setSelectedItems(!1,e.target),e.stopPropagation()}calciteInternalSyncSelectedChips(e){e.composedPath().includes(this.el)&&(this.updateSelectedItems(),this.selectionMode==="single"&&this.selectedItems.length>1&&this.setSelectedItems(!1,e.target)),e.stopPropagation()}updateItems(e){let s=this.slotRef.value?.assignedElements({flatten:!0}).filter(t=>t?.matches("calcite-chip"));this.items=e?m(e):s,!(this.items?.length<1)&&(this.items?.forEach(t=>{t.interactive=!0,t.scale=this.scale,t.selectionMode=this.selectionMode,t.parentChipGroup=this.el}),this.setSelectedItems(!1))}updateSelectedItems(){this.selectedItems=this.items?.filter(e=>e.selected)}setSelectedItems(e,s){s&&this.items?.forEach(t=>{let i=s===t;switch(this.selectionMode){case"multiple":i&&(t.selected=!t.selected);break;case"single":t.selected=i?!t.selected:!1;break;case"single-persist":t.selected=!!i;break}}),this.updateSelectedItems(),e&&this.calciteChipGroupSelect.emit()}render(){let e=this.selectionMode==="none"||this.selectionMode==="multiple"?"group":"radiogroup",{disabled:s}=this;return this.interactiveContainer({disabled:s,children:o`<div .ariaLabel=${this.label} class="container" .role=${e}><slot @slotchange=${this.updateItems} ${h(this.slotRef)}></slot></div>`})}};p("calcite-chip-group",a);export{a as ChipGroup};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as s,b as o}from"./
|
|
3
|
+
v5.0.0-next.26 */
|
|
4
|
+
import{a as s,b as o}from"./RLKDPOH2.js";import{a as i}from"./52WSL3OS.js";import{t as a}from"./5DDVN7VT.js";import"./HTSVYMIU.js";import{D as d,E as e,P as r,g as l,h as n}from"./S3LMUVIR.js";var h=l`:host([disabled]) .content{cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) .content *,:host([disabled]) .content ::slotted(*){pointer-events:none}:host{display:flex;flex:1 1 0%;flex-direction:column}.container{display:flex;flex:1 1 auto;align-items:stretch;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-2)}.content{display:flex;flex:1 1 auto;flex-direction:column;justify-content:center;font-size:var(--calcite-font-size--2);line-height:1.375;padding-inline:var(--calcite-stack-padding-inline, .75rem);padding-block:var(--calcite-stack-padding-block, .5rem)}.content-start{justify-content:flex-start}.content-end{justify-content:flex-end}.content-start,.content-end{flex:0 1 auto}.content-start ::slotted(calcite-icon),.content-end ::slotted(calcite-icon){margin-inline:.75rem;align-self:center}.actions-start,.actions-end,.content-start,.content-end{display:flex;align-items:center}.actions-start ::slotted(calcite-action),.actions-start ::slotted(calcite-action-menu),.actions-start ::slotted(calcite-handle),.actions-start ::slotted(calcite-dropdown),.actions-end ::slotted(calcite-action),.actions-end ::slotted(calcite-action-menu),.actions-end ::slotted(calcite-handle),.actions-end ::slotted(calcite-dropdown){align-self:stretch;color:inherit}:host([hidden]){display:none}[hidden]{display:none}`,c=class extends d{constructor(){super(...arguments),this.hasActionsEnd=!1,this.hasActionsStart=!1,this.hasContentEnd=!1,this.hasContentStart=!1,this.disabled=!1}static{this.properties={hasActionsEnd:[16,{},{state:!0}],hasActionsStart:[16,{},{state:!0}],hasContentEnd:[16,{},{state:!0}],hasContentStart:[16,{},{state:!0}],disabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=h}handleActionsStartSlotChange(t){this.hasActionsStart=a(t)}handleActionsEndSlotChange(t){this.hasActionsEnd=a(t)}handleContentStartSlotChange(t){this.hasContentStart=a(t)}handleContentEndSlotChange(t){this.hasContentEnd=a(t)}renderActionsStart(){let{hasActionsStart:t}=this;return i("actions-start-container",n`<div class=${e(s.actionsStart)} .hidden=${!t}><slot name=${o.actionsStart} @slotchange=${this.handleActionsStartSlotChange}></slot></div>`)}renderActionsEnd(){let{hasActionsEnd:t}=this;return i("actions-end-container",n`<div class=${e(s.actionsEnd)} .hidden=${!t}><slot name=${o.actionsEnd} @slotchange=${this.handleActionsEndSlotChange}></slot></div>`)}renderContentStart(){let{hasContentStart:t}=this;return n`<div class=${e(s.contentStart)} .hidden=${!t}><slot name=${o.contentStart} @slotchange=${this.handleContentStartSlotChange}></slot></div>`}renderDefaultContent(){return n`<div class=${e(s.content)}><slot></slot></div>`}renderContentEnd(){let{hasContentEnd:t}=this;return n`<div class=${e(s.contentEnd)} .hidden=${!t}><slot name=${o.contentEnd} @slotchange=${this.handleContentEndSlotChange}></slot></div>`}render(){return n`<div class=${e(s.container)}>${this.renderActionsStart()}${this.renderContentStart()}${this.renderDefaultContent()}${this.renderContentEnd()}${this.renderActionsEnd()}</div>`}};r("calcite-stack",c);export{c as Stack};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{d as ve}from"./XZO7FJUM.js";import{a as Ie,b as Ce}from"./THL7ZCGZ.js";import{a as xe}from"./Y357OZZO.js";import{b as V,c as ye,d as P,f as y,g as w}from"./FHFC32UV.js";import{a as F,b as O,d as n,e as p,f as z}from"./64OWR3JT.js";import{a as be}from"./CD3UAK2W.js";import{b as M}from"./LNVURAF5.js";import{a as fe}from"./HSHIW42B.js";import{c as pe,d as ue,e as me}from"./ZT6GWFZI.js";import{b as ge}from"./B6CQHSFM.js";import{a as oe,c as R,d as ce,e as re,f as he,g as $,h as de}from"./PGIQOKHX.js";import{a as ne}from"./7NLFZEAY.js";import{a as Y,c as Z,e as ee,f as te,h as ie}from"./FVRYO4N6.js";import{a as se}from"./L2VNGTSR.js";import{a as v}from"./VKUS34R6.js";import{a as ae}from"./HV2P4FIA.js";import{a as le}from"./UMESQ2SZ.js";import{a as E,b as D}from"./A7AWHUCH.js";import{a as Q}from"./EQ25YK3K.js";import{a as K}from"./MT4G6FVR.js";import{a as H,b as T}from"./4JL57EDA.js";import"./VKBFZH3Q.js";import{f as S,i as X,l as J}from"./W35ZAP2H.js";import{a as j}from"./EK3BWMVE.js";import{A as W,B as C,C as f,D as U,E as r,I as G,K as N,P as _,g as q,h as d,l as u,o as g}from"./GAXQ53KY.js";var we=q`: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([scale=s]){font-size:var(--calcite-font-size--2);--calcite-internal-combobox-spacing-unit-l: .5rem;--calcite-internal-combobox-spacing-unit-s: .25rem;--calcite-internal-combobox-no-matches-spacing-unit-s: .25rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.25rem - 1px) ;--calcite-internal-close-size: 1rem}:host([scale=s]) .x-button{margin-inline:.5rem}:host([scale=m]){font-size:var(--calcite-font-size--1);--calcite-internal-combobox-spacing-unit-l: .75rem;--calcite-internal-combobox-spacing-unit-s: .5rem;--calcite-internal-combobox-no-matches-spacing-unit-s: .375rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.5rem - 1px) ;--calcite-internal-close-size: 1.5rem}:host([scale=m]) .x-button{margin-inline-end:.75rem}:host([scale=l]){font-size:var(--calcite-font-size-0);--calcite-internal-combobox-spacing-unit-l: 1rem;--calcite-internal-combobox-spacing-unit-s: .75rem;--calcite-internal-combobox-no-matches-spacing-unit-s: .625rem;--calcite-combobox-input-height: 1.5rem;--calcite-internal-combobox-input-margin-block: calc(.625rem - 1px) ;--calcite-internal-close-size: 2rem}:host([scale=l]) .x-button{margin-inline-end:1rem}.x-button{align-self:center}.wrapper{display:flex;border-width:1px;border-style:solid;outline-color:transparent;padding-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);padding-inline:var(--calcite-internal-combobox-spacing-unit-l);background-color:var(--calcite-combobox-input-background-color, var(--calcite-color-foreground-1));color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));border-color:var(--calcite-combobox-input-border-color, var(--calcite-color-border-input))}.wrapper:hover .icon{color:var(--calcite-combobox-icon-color-hover, var(--calcite-color-text-1))}:host(:focus-within) .wrapper,.wrapper--active{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([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:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.wrapper--single{padding-block:0;padding-inline:var(--calcite-internal-combobox-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-internal-combobox-spacing-unit-s);margin-inline-end:var(--calcite-internal-combobox-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-internal-combobox-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;width:0px;min-width:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.placeholder-icon{color:var(--calcite-combobox-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-width: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-internal-combobox-spacing-unit-l)}.icon-end,.icon-start{display:flex;cursor:pointer;align-items:center}.icon-end{flex:none}.icon-end .icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.floating-ui-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0}@starting-style{.floating-ui-container{opacity:0;inset-block-start:0;left:0}}.floating-ui-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.floating-ui-container:popover-open{display:block}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.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}@starting-style{.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}@media(forced-colors:active){.wrapper,.floating-ui-container{border:1px solid canvasText}}.screen-readers-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.list-container{max-height:45vh;overflow-y:auto;inline-size:var(--calcite-dropdown-width, 100%);background-color:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1))}.list{margin:0;display:block;padding:0}.list--hide{height:0px;overflow:hidden}calcite-chip{--calcite-animation-timing: 0}.chip{margin-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);max-inline-size:100%}.chip--invisible{visibility:hidden;position:absolute}.item{display:block}.select-all{background-color:var(--calcite-combobox-item-background-color-active, var(--calcite-color-foreground-1));border-block-end-color:var(--calcite-combobox-divider-color, var(--calcite-combobox-item-border-color, var(--calcite-color-border-3)));border-block-end-style:solid;border-block-end-width:var(--calcite-border-width-sm);inset-block-start:0;position:sticky;z-index:var(--calcite-z-index-sticky)}.no-matches{padding-block:var(--calcite-internal-combobox-no-matches-spacing-unit-s);padding-inline:var(--calcite-internal-combobox-spacing-unit-l);color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));background:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1));cursor:pointer}.no-matches-placeholder{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3));cursor:default}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.x-button{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-style:none;cursor:pointer;outline-color:transparent;align-items:center;margin:0;background-color:var(--calcite-close-background-color, var(--calcite-color-foreground-2));-webkit-appearance:none;display:flex;align-content:center;justify-content:center;color:var(--calcite-close-icon-color, var(--calcite-color-text-3));block-size:var(--calcite-internal-close-size, 1.5rem);inline-size:var(--calcite-internal-close-size, 1.5rem);min-block-size:var(--calcite-internal-close-size, 1.5rem);min-inline-size:var(--calcite-internal-close-size, 1.5rem);padding:0}.x-button:hover,.x-button:focus{background-color:var(--calcite-close-background-color-hover, var(--calcite-color-foreground-3))}.x-button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.x-button:active{background-color:var(--calcite-close-background-color-press, var(--calcite-color-transparent-press))}.x-button calcite-icon{color:inherit}.x-button--round{border-radius:9999px}.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}.text-match{background-color:transparent;color:inherit;font-weight:var(--calcite-font-weight-bold)}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}::placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-placeholder-text-color, var(--calcite-color-text-3))}`,B=class extends U{constructor(){super(),this.closeButtonRef=C(),this.selectAllComboboxItemRef=C(),this.allSelectedIndicatorChipRef=C(),this.cancelable=ae()(this),this.filterItems=(()=>{let e=(t,i)=>t&&i.some(({el:s})=>t===s);return le((t,i=!1,s=!0)=>{let l=xe([...this.data,...this.groupData],t,this.effectiveFilterProps),a=this.getItemsAndGroups(),o=t==="";a.forEach(c=>{if(o){c.itemHidden=!1;return}let h=!e(c,l);c.itemHidden=h;let[m,k]=c.ancestors;(e(m,l)||e(k,l))&&(c.itemHidden=!1),h||c.ancestors.forEach(b=>b.itemHidden=!1)}),this.noMatchesFound=this.filteredItems.length===0&&!!this.filterText,this.filterTextMatchPattern=this.filterText&&new RegExp(`(${M(this.filterText)})`,"i"),this.keyboardNavItems.forEach(c=>{c.filterTextMatchPattern=this.filterTextMatchPattern}),i&&(this.open=this.filterText.trim().length>0),s&&this.calciteComboboxFilterChange.emit()},N.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"||!P(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.groupItems=[],this.guid=j(),this.ignoreSelectedEventsFlag=!1,this.inputHeight=0,this.internalValueChangeFlag=!1,this.mutationObserver=E("mutation",()=>this.updateItems()),this.onLabelClick=()=>{this.setFocus()},this.transitionProp="opacity",this.placement=oe,this.resizeObserver=E("resize",()=>{this.setMaxScrollerHeight(),this.refreshSelectionDisplay()}),this.selectedIndicatorChipRef=C(),this._selectedItems=[],this.textInputRef=C(),this._value=null,this.messages=Q(),this.focusSetter=K()(this),this.customChipAddHandler=()=>{this.addCustomChip(this.filterText,!0)},this.interactiveContainer=se(this),this.activeChipIndex=-1,this.activeDescendant="",this.activeItemIndex=-1,this.compactSelectionDisplay=!1,this.selectedHiddenChipsCount=0,this.selectedVisibleChipsCount=0,this.items=[],this.clearDisabled=!1,this.disabled=!1,this.maxItems=0,this.open=!1,this.overlayPositioning="absolute",this.placeholderIconFlipRtl=!1,this.readOnly=!1,this.required=!1,this.scale="m",this.selectAllEnabled=!1,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=g({cancelable:!1}),this.calciteComboboxBeforeOpen=g({cancelable:!1}),this.calciteComboboxChange=g({cancelable:!1}),this.calciteComboboxChipClose=g({cancelable:!1}),this.calciteComboboxClose=g({cancelable:!1}),this.calciteComboboxFilterChange=g({cancelable:!1}),this.calciteComboboxOpen=g({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,{},{state:!0}],activeDescendant:[16,{},{state:!0}],activeItemIndex:[16,{},{state:!0}],compactSelectionDisplay:[16,{},{state:!0}],selectedHiddenChipsCount:[16,{},{state:!0}],selectedVisibleChipsCount:[16,{},{state:!0}],items:[16,{},{state:!0}],noMatchesFound:[16,{},{state:!0}],allowCustomValues:[7,{},{reflect:!0,type:Boolean}],clearDisabled:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],filterText:[3,{},{reflect:!0}],filterProps:[0,{},{attribute:!1}],filteredItems:[32,{},{attribute:!1,readOnly:!0}],flipPlacements:[0,{},{attribute:!1}],form:[3,{},{reflect:!0}],label:1,labelText:1,maxItems:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placeholder:1,placeholderIcon:[3,{type:String},{reflect:!0}],placeholderIconFlipRtl:[7,{},{reflect:!0,type:Boolean}],readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectAllEnabled:[7,{},{reflect:!0,type:Boolean}],selectedItems:[0,{},{attribute:!1}],selectionDisplay:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:G,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:1}}static{this.styles=we}get effectiveFilterProps(){return this.filterProps?this.filterProps.filter(e=>e!=="el"):["description","label","metadata","shortHeading"]}get showingInlineIcon(){let{placeholderIcon:e,selectionMode:t,selectedItems:i,open:s}=this,l=i[0],a=l?.icon,o=y(t);return!s&&l?!!a&&o:!!e&&(!l||o)}get allSelected(){return this.selectedItems.length===this.items.length}get indeterminate(){return this.selectedItems.length>0&&!this.allSelected}get keyboardNavItems(){let{selectAllComboboxItemRef:e}=this,t=this.filteredItems.filter(i=>!i.disabled);return e.value?[e.value,...t]:t}get filterText(){return this._filterText}set filterText(e){let t=this._filterText;e!==t&&(this._filterText=e,this.filterTextChange(e))}get filteredItems(){return this.items.filter(e=>!T(e))}get selectedItems(){return this._selectedItems}set selectedItems(e){let t=this._selectedItems;e!==t&&(this._selectedItems=e,this.selectedItemsHandler())}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 re(this,{floatingEl:t,referenceEl:i,overlayPositioning:l,placement:s,flipPlacements:a,type:"menu"},e)}async setFocus(e){return this.focusSetter(()=>(this.activeChipIndex=-1,this.activeItemIndex=-1,this.textInputRef.value),e)}connectedCallback(){super.connectedCallback(),pe(this),Z(this),this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),$(this),this.cancelable.add(this.filterItems)}async load(){this.handleSelectionModeWarning()}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")||e.has("scale"))&&this.updateItems(),e.has("flipPlacements")&&this.flipPlacementsHandler()}updated(){this.el.offsetHeight!==this.inputHeight&&(this.reposition(!0),this.inputHeight=this.el.offsetHeight),this.refreshSelectionDisplay()}loaded(){te(this,this.getValue()),$(this),this.updateItems(),this.filterItems(this.filterText,!1,!1)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),ue(this),ee(this),de(this)}async handlePopover(){await this.componentOnReady(),this.floatingEl&&(this.open?this.floatingEl.showPopover():this.floatingEl.hidePopover())}emitComboboxChange(){this.calciteComboboxChange.emit()}filterTextChange(e){this.updateActiveItemIndex(-1),this.filterItems(e,!0)}openHandler(){ne(this),!this.disabled&&(this.setMaxScrollerHeight(),this.handlePopover())}handleDisabledChange(e){e||(this.open=!1)}valueHandler(e){this.internalValueChangeFlag||(this.getItems().forEach(t=>{t.selected=Array.isArray(e)?e.includes(t.value):e===t.value}),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)}handleSelectAll(e){e&&this.toggleSelectAll(),this.allSelected&&this.selectedItems.forEach(t=>{let i=this.referenceEl.querySelector(`#${p.chip(t.guid)}`);i&&this.hideChip(i)})}calciteComboboxItemChangeHandler(e){if(this.ignoreSelectedEventsFlag)return;let t=e.target,i=e.composedPath().includes(this.selectAllComboboxItemRef.value);this.selectAllEnabled&&this.handleSelectAll(i);let s=this.keyboardNavItems.indexOf(i?this.selectAllComboboxItemRef.value:t);this.updateActiveItemIndex(s),this.toggleSelection(t,t.selected),this.selectedItems=this.getSelectedItems()}calciteInternalComboboxItemChangeHandler(e){e.stopPropagation(),this.hasUpdated&&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.textInputRef.value&&(this.textInputRef.value.value=""),this.filterText=""}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?ce(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)}toggleSelectAll(){let e=!this.allSelected;this.items.forEach(t=>t.selected=e),this.selectedItems=e?this.items:[],this.emitComboboxChange()}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.textInputRef.value.selectionStart===0)&&(this.previousChip(),e.preventDefault());break;case"ArrowRight":this.activeChipIndex!==-1&&(this.nextChip(),e.preventDefault());break;case"ArrowUp":this.keyboardNavItems.length&&(e.preventDefault(),this.open&&this.shiftActiveItemIndex(-1),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView()),this.scrollToActiveOrSelectedItem();break;case"ArrowDown":this.keyboardNavItems.length&&(e.preventDefault(),this.open?this.shiftActiveItemIndex(1):(this.open=!0,this.ensureRecentSelectedItemIsActive()),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView());break;case" ":!this.textInputRef.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.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"End":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(this.filteredItems.length-1),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"Escape":!this.clearDisabled&&!this.open&&this.clearValue(),this.open=!1,e.preventDefault();break;case"Enter":this.open&&this.activeItemIndex>-1?(this.keyboardNavItems[this.activeItemIndex].toggleSelection(),e.preventDefault()):this.activeChipIndex>-1?(this.removeActiveChip(),e.preventDefault()):this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):e.defaultPrevented||Y(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.scrollToActiveOrSelectedItem(),this.calciteComboboxBeforeOpen.emit()}onOpen(){this.scrollToActiveOrSelectedItem(!0),this.calciteComboboxOpen.emit()}onBeforeClose(){this.calciteComboboxBeforeClose.emit()}onClose(){this.calciteComboboxClose.emit(),he(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.maxBlockSize=s>0?`${s}px`:"",e.style.inlineSize=`${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(Ie.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(n.chipInvisible)}showChip(e){e.classList.remove(n.chipInvisible)}refreshChipDisplay({chipEls:e,availableHorizontalChipElSpace:t,chipContainerElGap:i}){e.forEach(s=>{if(!s.selected)this.hideChip(s);else{let l=S(s);if(l&&l<t){t-=l+i,this.showChip(s);return}}this.hideChip(s)})}async refreshSelectionDisplay(){if(this.componentOnReady(),y(this.selectionMode)||!this.textInputRef.value||!this.chipContainerEl)return;let{allSelectedIndicatorChipRef:e,chipContainerEl:t,selectionDisplay:i,placeholder:s,selectedIndicatorChipRef:l,textInputRef:a}=this,o=parseInt(getComputedStyle(t).gap.replace("px","")),c=S(t),{fontSize:h,fontFamily:m}=getComputedStyle(a.value),b=(X(s,`${h} ${m}`)||parseInt(ve))+o,A=S(e.value),L=S(l.value),Se=Math.max(A,L);if(this.setCompactSelectionDisplay({chipContainerElGap:o,chipContainerElWidth:c,inputWidth:b,largestSelectedIndicatorChipWidth:Se}),this.allSelected&&this.selectAllEnabled&&this.selectedItems.forEach(I=>{let x=this.referenceEl.querySelector(`#${p.chip(I.guid)}`);x&&this.hideChip(x)}),this.indeterminate&&this.selectedItems.forEach(I=>{let x=this.referenceEl.querySelector(`#${p.chip(I.guid)}`);x&&this.showChip(x)}),i==="fit"){let I=Array.from(this.el.shadowRoot.querySelectorAll("calcite-chip")).filter($e=>$e.closable),x=Math.round(c-((this.selectedHiddenChipsCount>0?L:0)+o+b+o));this.refreshChipDisplay({availableHorizontalChipElSpace:x,chipContainerElGap:o,chipEls:I}),this.setVisibleAndHiddenChips(I)}}setFloatingEl(e){this.floatingEl=e,$(this),this.handlePopover()}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){D(this.resizeObserver,this.listContainerEl,e),this.listContainerEl=e,this.transitionEl=e}setChipContainerEl(e){D(this.resizeObserver,this.chipContainerEl,e),this.chipContainerEl=e}setReferenceEl(e){this.referenceEl=e,$(this)}setVisibleAndHiddenChips(e){let t=0;e.forEach(s=>{s.selected&&!s.classList.contains(n.chipInvisible)&&t++}),t!==this.selectedVisibleChipsCount&&(this.selectedVisibleChipsCount=t);let i=this.getSelectedItems().length-t;i!==this.selectedHiddenChipsCount&&(this.selectedHiddenChipsCount=i)}getMaxScrollerHeight(){let t=[...this.groupItems,...this.getItems(!0)].filter(a=>!T(a)),{maxItems:i}=this,s=0,l=0;return t.length>=i&&t.forEach(a=>{if(s<i){let o=this.calculateScrollerHeight(a);l+=o,s+=1}}),l}calculateScrollerHeight(e){if(!e)return 0;let t=e.getBoundingClientRect().height,i=`:scope > ${F}, :scope > ${O}`,s=Array.from(e.querySelectorAll(i)).reduce((l,a)=>l+a.getBoundingClientRect().height,0);return t-s}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()?this.handleMultiSelection(e,t):this.handleSingleSelection(e,t))}handleMultiSelection(e,t){e.selected=t,this.updateAncestors(e),this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.resetText(),this.filterItems("")}handleSingleSelection(e,t){this.ignoreSelectedEventsFlag=!0,this.items.forEach(i=>i.selected=i===e?t:!1),this.ignoreSelectedEventsFlag=!1,this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.textInputRef.value&&(this.textInputRef.value.value=w(e)),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")}updateAncestors(e){if(this.selectionMode!=="ancestors")return;let t=V(e),i=ye(e);e.selected?t.forEach(s=>{s.selected=!0}):(i.forEach(s=>s.selected=!1),[...t].forEach(s=>{P(s)||(s.selected=!1)}))}updateItems(){this.items=this.getItems(),this.groupItems=this.getGroupItems(),this.data=this.getData(),this.groupData=this.getGroupData(),this.updateItemProps(),this.selectedItems=this.getSelectedItems()}updateItemProps(){this.getItems(!0).forEach(e=>{e.selectionMode=this.selectionMode,e.scale=this.scale}),this.groupItems.forEach((e,t)=>(e.scale=this.scale,e.position=t)),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,metadata:e.metadata,shortHeading:e.shortHeading,el:e}))}getGroupData(){return this.groupItems.map(e=>({label:e.label,el:e}))}resetText(){this.textInputRef.value&&(this.textInputRef.value.value=""),this.filterText=""}getItems(e=!1){return Array.from(this.el.querySelectorAll(F)).filter(i=>e||!i.disabled)}getGroupItems(){return Array.from(this.el.querySelectorAll(O))}addCustomChip(e,t){let i=this.items.find(s=>s.heading===e);if(i)this.toggleSelection(i,!0);else{let s=document.createElement("calcite-combobox-item");s.value=e,s.heading=e,this.el.prepend(s),this.updateItems(),this.toggleSelection(s,!0),this.open=!0,t&&this.setFocus()}}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,J(this.textInputRef.value)):(this.activeChipIndex=t,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){let e=this.selectedItems[this.activeChipIndex]?.guid;(e?this.referenceEl.querySelector(`#${p.chip(e)}`):null)?.setFocus()}scrollToActiveOrSelectedItem(e=!1){let t=e&&this.selectedItems?.length?this.selectedItems[0]:this.keyboardNavItems[this.activeItemIndex],i=this.listContainerEl;if(!t||!i)return;t.scrollIntoView({block:"nearest"});let l=this.selectAllComboboxItemRef.value?.offsetHeight||0,a=t.getBoundingClientRect(),o=i.getBoundingClientRect();a.top<o.top+l&&(i.scrollTop-=o.top+l-a.top)}shiftActiveItemIndex(e){let{length:t}=this.keyboardNavItems,i=(this.activeItemIndex+t+e)%t;this.updateActiveItemIndex(i),this.scrollToActiveOrSelectedItem()}updateActiveItemIndex(e){this.activeItemIndex=e;let t=null;this.keyboardNavItems.forEach((i,s)=>{s===e?(i.active=!0,t=`${p.item(i.guid)}`):i.active=!1}),this.activeDescendant=t,this.activeItemIndex>-1&&(this.activeChipIndex=-1)}isMulti(){return!y(this.selectionMode)}comboboxFocusHandler(){this.disabled||this.textInputRef.value.focus()}createScreenReaderItem({ariaLabel:e,ariaSelected:t,id:i,textContent:s}){return d`<li aria-label=${e??u} aria-selected=${t??u} id=${i??u} role=option tabindex=-1>${s}</li>`}handleSelectionModeWarning(){this.selectionMode==="single-persist"&&this.clearDisabled&&console.warn('clearDisabled is ignored when selection-mode is set to "single-persist"')}getDescriptionMessage(){let e=Array.isArray(this.value)?this.value.join(", "):this.value;return this.readOnly?this.messages.nonEditable?.replace("{value}",`${e}`):e}renderChips(){let{activeChipIndex:e,readOnly:t,scale:i,selectionMode:s,messages:l}=this;return this.selectAllEnabled&&this.allSelected?null:this.selectedItems.map((a,o)=>{let c={[n.chip]:!0},h=[...V(a)].reverse(),m=w(a),k=[...h,a].map(A=>w(A)),b=s!=="ancestors"?m:k.join(" / ");return v(m,d`<calcite-chip .appearance=${t?"outline":"solid"} class=${r(c)} .closable=${!t} .icon=${a.icon} .iconFlipRtl=${a.iconFlipRtl} id=${(a.guid?`${p.chip(a.guid)}`:null)??u} .label=${b} .messageOverrides=${{dismissLabel:l.removeTag}} @focusin=${()=>this.activeChipIndex=o} @calciteChipClose=${()=>this.calciteChipCloseHandler(a)} .scale=${i} .selected=${a.selected} .tabIndex=${e===o?0:-1} title=${b??u} .value=${a.value}>${b}</calcite-chip>`)})}renderAllSelectedIndicatorChip(){let{allSelectedIndicatorChipRef:e,compactSelectionDisplay:t,scale:i,selectedVisibleChipsCount:s}=this,l=t?this.messages.all:this.messages.allSelected;return d`<calcite-chip class=${r({[n.chip]:!0,[n.chipInvisible]:!(this.allSelected&&!s),[n.allSelected]:!0})} .label=${l} .scale=${i} title=${l??u} value ${f(e)}>${l}</calcite-chip>`}renderSelectedIndicatorChip(){let{compactSelectionDisplay:e,selectionDisplay:t,getSelectedItems:i,scale:s,selectedHiddenChipsCount:l,selectedVisibleChipsCount:a,selectedIndicatorChipRef:o}=this,c,h;if(e)c=!0;else if(t==="single"){let m=i().length;this.allSelected?c=!0:m>0?c=!1:c=!0,h=`${m} ${this.messages.selected}`}else t==="fit"&&(c=!!(this.allSelected&&a===0||l===0),h=a>0?`+${l}`:`${l} ${this.messages.selected}`);return d`<calcite-chip class=${r({[n.chip]:!0,[n.chipInvisible]:c})} .label=${h} .scale=${s} title=${h??u} value ${f(o)}>${h}</calcite-chip>`}renderSelectedIndicatorChipCompact(){let{compactSelectionDisplay:e,selectionDisplay:t,getSelectedItems:i,scale:s,selectedHiddenChipsCount:l}=this,a,o;if(e){let c=i().length;this.allSelected?a=!0:t==="fit"?(a=!(l>0),o=`${l||0}`):t==="single"&&(a=!(c>0),o=`${c}`)}else a=!0;return d`<calcite-chip class=${r({[n.chip]:!0,[n.chipInvisible]:a})} .label=${o} .scale=${s} title=${o??u} value>${o}</calcite-chip>`}renderInput(){let{guid:e,disabled:t,placeholder:i,selectionMode:s,selectedItems:l,open:a}=this,o=y(s),c=l[0],h=!a&&o&&!!c&&!this.filterText;return d`<span class=${r({[n.inputWrap]:!0,[n.inputWrapSingle]:o})}>${h&&v("label",d`<span class=${r({[n.label]:!0,[n.labelIcon]:!!c?.icon})}>${w(c)}</span>`)||""}${v("input",d`<input aria-activedescendant=${this.activeDescendant??u} aria-controls=${`${p.listbox(e)}`} aria-errormessage=${p.validationMessage} aria-owns=${`${p.listbox(e)}`} aria-autocomplete=list .ariaDescription=${this.getDescriptionMessage()} .ariaExpanded=${a} aria-haspopup=listbox .ariaInvalid=${this.status==="invalid"} .ariaLabel=${me(this)} class=${r({[n.input]:!0,[n.inputSingle]:!0,[n.inputHidden]:h,[n.inputIcon]:this.showingInlineIcon&&!!this.placeholderIcon})} .disabled=${t} .id=${`${p.input(e)}`} @focus=${this.comboboxFocusHandler} @input=${this.inputHandler} placeholder=${i??u} .readOnly=${this.readOnly} .required=${this.required} role=combobox .tabIndex=${this.activeChipIndex===-1?0:-1} type=text .value=${W(this.filterText??"")} ${f(this.textInputRef)}>`)}</span>`}renderListBoxOptions(){let e=this.keyboardNavItems.map(t=>this.createScreenReaderItem({ariaLabel:t.label,ariaSelected:t.selected,id:`${p.item(t.guid)}`,textContent:t.heading}));if(this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"){let t=this.createScreenReaderItem({ariaLabel:this.messages.selectAll,ariaSelected:this.allSelected,textContent:this.messages.selectAll});t&&e.unshift(t)}return e}renderFloatingUIContainer(){let{messages:e,setFloatingEl:t,setContainerEl:i,open:s,scale:l}=this,a={[n.listContainer]:!0,[R.animation]:!0,[R.animationActive]:s},o=(this.filterText&&e.add?.replace("{text}",`${this.filterText}`))??"";return d`<div aria-hidden=true class=${r(n.floatingUIContainer)} popover=manual ${f(t)}><div class=${r(a)} ${f(i)}><ul class=${r({[n.list]:!0,[n.listHide]:!s})}>${this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"&&d`<calcite-combobox-item class=${r(n.selectAll)} .heading=${e.selectAll} .id=${`${this.guid}-select-all-enabled-interactive`} .indeterminate=${this.indeterminate} .label=${e.selectAll} .scale=${l} .selected=${this.allSelected} tabindex=-1 value=select-all ${f(this.selectAllComboboxItemRef)}></calcite-combobox-item>`||""}<slot></slot>${this.noMatchesFound&&(this.allowCustomValues?d`<li aria-label=${o??u} class=${r(n.noMatches)} @click=${this.customChipAddHandler} role=option tabindex=0>${ge({text:o,pattern:new RegExp(`(${M(this.filterText)})`,"i")})}</li>`:d`<li class=${r({[n.noMatchesPlaceholder]:!0,[n.noMatches]:!0})}>${e.noMatches}</li>`)||""}</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&&v("selected-placeholder-icon",d`<span class=${r(n.iconStart)}><calcite-icon class=${r({[n.selectedIcon]:!o,[n.placeholderIcon]:o})} .flipRtl=${o?i:l.iconFlipRtl} .icon=${o?t:a} .scale=${H(this.scale)}></calcite-icon></span>`)||""}renderChevronIcon(){let{open:e}=this;return v("chevron",d`<span class=${r(n.iconEnd)}><calcite-icon class=${r(n.icon)} .icon=${e?z.chevronUp:z.chevronDown} .scale=${H(this.scale)}></calcite-icon></span>`)}render(){let{selectionDisplay:e,guid:t,label:i,open:s,readOnly:l}=this,a=y(this.selectionMode),o=e==="all",c=e==="single",h=!a&&e==="fit",m=!this.clearDisabled&&this.selectionMode!=="single-persist"&&!!this.value?.length;return this.interactiveContainer({disabled:this.disabled,children:d`${this.labelText&&fe({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div aria-live=polite class=${r({[n.wrapper]:!0,[n.wrapperSingle]:a||!this.selectedItems.length,[n.wrapperActive]:s})} @click=${this.clickHandler} @keydown=${this.keyDownHandler} ${f(this.setReferenceEl)}>${this.renderSelectedOrPlaceholderIcon()}${v("grid",d`<div class=${r({[n.gridInput]:!0,[n.selectionDisplayFit]:h,[n.selectionDisplaySingle]:c})} ${f(this.setChipContainerEl)}>${!a&&!c&&this.renderChips()||""}${!a&&!c&&this.selectAllEnabled&&this.renderAllSelectedIndicatorChip()||""}${!a&&!o&&[this.renderSelectedIndicatorChip(),this.renderSelectedIndicatorChipCompact(),this.renderAllSelectedIndicatorChip()]||""}<label class=${r(n.screenReadersOnly)} .htmlFor=${`${p.input(t)}`} .id=${`${p.label(t)}`}>${i}</label>${this.renderInput()}</div>`)}${!l&&m?v("close-button",Ce({disabled:this.disabled,label:this.messages.clear,ref:this.closeButtonRef,scale:this.scale})):null}${!l&&this.renderChevronIcon()||""}</div><ul aria-labelledby=${`${p.label(t)}`} aria-multiselectable=true class=${r(n.screenReadersOnly)} .id=${`${p.listbox(t)}`} role=listbox tabindex=-1>${this.renderListBoxOptions()}</ul>${this.renderFloatingUIContainer()}${ie({component:this})}${this.validationMessage&&this.status==="invalid"?be({icon:this.validationIcon,id:p.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}};_("calcite-combobox",B);export{B as Combobox};
|
|
3
|
+
v5.0.0-next.26 */
|
|
4
|
+
import{d as ve}from"./BJWZNEE6.js";import{a as Ie,b as Ce}from"./YNSRHIEC.js";import{a as xe}from"./WHUJJZKU.js";import{b as V,c as ye,d as P,f as y,g as w}from"./6FPWFMQD.js";import{a as F,b as O,d as n,e as p,f as z}from"./47DFYWT7.js";import{a as be}from"./SMB2EQKM.js";import{b as M}from"./EVY5PGRH.js";import{a as fe}from"./UJORWXAT.js";import{c as pe,d as ue,e as me}from"./5O4F6PZJ.js";import{b as ge}from"./WVPOSWB7.js";import{a as oe,c as R,d as ce,e as re,f as he,g as $,h as de}from"./P4SFTOL2.js";import{a as ne}from"./YOAHZBK4.js";import{a as Y,c as Z,e as ee,f as te,h as ie}from"./VMAECY3E.js";import{a as se}from"./TOJWPJZO.js";import{a as v}from"./52WSL3OS.js";import{a as ae}from"./BS6FO7VM.js";import{a as le}from"./CWNLGPSB.js";import{a as E,b as D}from"./FAT3Y2BN.js";import{a as Q}from"./6F7MIVOD.js";import{a as K}from"./LLHJY7FO.js";import{a as H,b as T}from"./WUWREGJO.js";import"./7UWIO6G4.js";import{f as S,i as X,l as J}from"./5DDVN7VT.js";import{a as j}from"./HTSVYMIU.js";import{A as W,B as C,C as f,D as U,E as r,I as G,K as N,P as _,g as q,h as d,l as u,o as g}from"./S3LMUVIR.js";var we=q`: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([scale=s]){font-size:var(--calcite-font-size--2);--calcite-internal-combobox-spacing-unit-l: .5rem;--calcite-internal-combobox-spacing-unit-s: .25rem;--calcite-internal-combobox-no-matches-spacing-unit-s: .25rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.25rem - 1px) ;--calcite-internal-close-size: 1rem}:host([scale=s]) .x-button{margin-inline:.5rem}:host([scale=m]){font-size:var(--calcite-font-size--1);--calcite-internal-combobox-spacing-unit-l: .75rem;--calcite-internal-combobox-spacing-unit-s: .5rem;--calcite-internal-combobox-no-matches-spacing-unit-s: .375rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.5rem - 1px) ;--calcite-internal-close-size: 1.5rem}:host([scale=m]) .x-button{margin-inline-end:.75rem}:host([scale=l]){font-size:var(--calcite-font-size-0);--calcite-internal-combobox-spacing-unit-l: 1rem;--calcite-internal-combobox-spacing-unit-s: .75rem;--calcite-internal-combobox-no-matches-spacing-unit-s: .625rem;--calcite-combobox-input-height: 1.5rem;--calcite-internal-combobox-input-margin-block: calc(.625rem - 1px) ;--calcite-internal-close-size: 2rem}:host([scale=l]) .x-button{margin-inline-end:1rem}.x-button{align-self:center}.wrapper{display:flex;border-width:1px;border-style:solid;outline-color:transparent;padding-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);padding-inline:var(--calcite-internal-combobox-spacing-unit-l);background-color:var(--calcite-combobox-input-background-color, var(--calcite-color-foreground-1));color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));border-color:var(--calcite-combobox-input-border-color, var(--calcite-color-border-input))}.wrapper:hover .icon{color:var(--calcite-combobox-icon-color-hover, var(--calcite-color-text-1))}:host(:focus-within) .wrapper,.wrapper--active{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([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:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.wrapper--single{padding-block:0;padding-inline:var(--calcite-internal-combobox-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-internal-combobox-spacing-unit-s);margin-inline-end:var(--calcite-internal-combobox-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-internal-combobox-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;width:0px;min-width:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.placeholder-icon{color:var(--calcite-combobox-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-width: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-internal-combobox-spacing-unit-l)}.icon-end,.icon-start{display:flex;cursor:pointer;align-items:center}.icon-end{flex:none}.icon-end .icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.floating-ui-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0}@starting-style{.floating-ui-container{opacity:0;inset-block-start:0;left:0}}.floating-ui-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.floating-ui-container:popover-open{display:block}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.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}@starting-style{.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}@media(forced-colors:active){.wrapper,.floating-ui-container{border:1px solid canvasText}}.screen-readers-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.list-container{max-height:45vh;overflow-y:auto;inline-size:var(--calcite-dropdown-width, 100%);background-color:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1))}.list{margin:0;display:block;padding:0}.list--hide{height:0px;overflow:hidden}calcite-chip{--calcite-animation-timing: 0}.chip{margin-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);max-inline-size:100%}.chip--invisible{visibility:hidden;position:absolute}.item{display:block}.select-all{background-color:var(--calcite-combobox-item-background-color-active, var(--calcite-color-foreground-1));border-block-end-color:var(--calcite-combobox-divider-color, var(--calcite-combobox-item-border-color, var(--calcite-color-border-3)));border-block-end-style:solid;border-block-end-width:var(--calcite-border-width-sm);inset-block-start:0;position:sticky;z-index:var(--calcite-z-index-sticky)}.no-matches{padding-block:var(--calcite-internal-combobox-no-matches-spacing-unit-s);padding-inline:var(--calcite-internal-combobox-spacing-unit-l);color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));background:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1));cursor:pointer}.no-matches-placeholder{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3));cursor:default}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.x-button{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-style:none;cursor:pointer;outline-color:transparent;align-items:center;margin:0;background-color:var(--calcite-close-background-color, var(--calcite-color-foreground-2));-webkit-appearance:none;display:flex;align-content:center;justify-content:center;color:var(--calcite-close-icon-color, var(--calcite-color-text-3));block-size:var(--calcite-internal-close-size, 1.5rem);inline-size:var(--calcite-internal-close-size, 1.5rem);min-block-size:var(--calcite-internal-close-size, 1.5rem);min-inline-size:var(--calcite-internal-close-size, 1.5rem);padding:0}.x-button:hover,.x-button:focus{background-color:var(--calcite-close-background-color-hover, var(--calcite-color-foreground-3))}.x-button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.x-button:active{background-color:var(--calcite-close-background-color-press, var(--calcite-color-transparent-press))}.x-button calcite-icon{color:inherit}.x-button--round{border-radius:9999px}.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}.text-match{background-color:transparent;color:inherit;font-weight:var(--calcite-font-weight-bold)}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}::placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-placeholder-text-color, var(--calcite-color-text-3))}`,B=class extends U{constructor(){super(),this.closeButtonRef=C(),this.selectAllComboboxItemRef=C(),this.allSelectedIndicatorChipRef=C(),this.cancelable=ae()(this),this.filterItems=(()=>{let e=(t,i)=>t&&i.some(({el:s})=>t===s);return le((t,i=!1,s=!0)=>{let l=xe([...this.data,...this.groupData],t,this.effectiveFilterProps),a=this.getItemsAndGroups(),o=t==="";a.forEach(c=>{if(o){c.itemHidden=!1;return}let h=!e(c,l);c.itemHidden=h;let[m,k]=c.ancestors;(e(m,l)||e(k,l))&&(c.itemHidden=!1),h||c.ancestors.forEach(b=>b.itemHidden=!1)}),this.noMatchesFound=this.filteredItems.length===0&&!!this.filterText,this.filterTextMatchPattern=this.filterText&&new RegExp(`(${M(this.filterText)})`,"i"),this.keyboardNavItems.forEach(c=>{c.filterTextMatchPattern=this.filterTextMatchPattern}),i&&(this.open=this.filterText.trim().length>0),s&&this.calciteComboboxFilterChange.emit()},N.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"||!P(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.groupItems=[],this.guid=j(),this.ignoreSelectedEventsFlag=!1,this.inputHeight=0,this.internalValueChangeFlag=!1,this.mutationObserver=E("mutation",()=>this.updateItems()),this.onLabelClick=()=>{this.setFocus()},this.transitionProp="opacity",this.placement=oe,this.resizeObserver=E("resize",()=>{this.setMaxScrollerHeight(),this.refreshSelectionDisplay()}),this.selectedIndicatorChipRef=C(),this._selectedItems=[],this.textInputRef=C(),this._value=null,this.messages=Q(),this.focusSetter=K()(this),this.customChipAddHandler=()=>{this.addCustomChip(this.filterText,!0)},this.interactiveContainer=se(this),this.activeChipIndex=-1,this.activeDescendant="",this.activeItemIndex=-1,this.compactSelectionDisplay=!1,this.selectedHiddenChipsCount=0,this.selectedVisibleChipsCount=0,this.items=[],this.clearDisabled=!1,this.disabled=!1,this.maxItems=0,this.open=!1,this.overlayPositioning="absolute",this.placeholderIconFlipRtl=!1,this.readOnly=!1,this.required=!1,this.scale="m",this.selectAllEnabled=!1,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=g({cancelable:!1}),this.calciteComboboxBeforeOpen=g({cancelable:!1}),this.calciteComboboxChange=g({cancelable:!1}),this.calciteComboboxChipClose=g({cancelable:!1}),this.calciteComboboxClose=g({cancelable:!1}),this.calciteComboboxFilterChange=g({cancelable:!1}),this.calciteComboboxOpen=g({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,{},{state:!0}],activeDescendant:[16,{},{state:!0}],activeItemIndex:[16,{},{state:!0}],compactSelectionDisplay:[16,{},{state:!0}],selectedHiddenChipsCount:[16,{},{state:!0}],selectedVisibleChipsCount:[16,{},{state:!0}],items:[16,{},{state:!0}],noMatchesFound:[16,{},{state:!0}],allowCustomValues:[7,{},{reflect:!0,type:Boolean}],clearDisabled:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],filterText:[3,{},{reflect:!0}],filterProps:[0,{},{attribute:!1}],filteredItems:[32,{},{attribute:!1,readOnly:!0}],flipPlacements:[0,{},{attribute:!1}],form:[3,{},{reflect:!0}],label:1,labelText:1,maxItems:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placeholder:1,placeholderIcon:[3,{type:String},{reflect:!0}],placeholderIconFlipRtl:[7,{},{reflect:!0,type:Boolean}],readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectAllEnabled:[7,{},{reflect:!0,type:Boolean}],selectedItems:[0,{},{attribute:!1}],selectionDisplay:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:G,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:1}}static{this.styles=we}get effectiveFilterProps(){return this.filterProps?this.filterProps.filter(e=>e!=="el"):["description","label","metadata","shortHeading"]}get showingInlineIcon(){let{placeholderIcon:e,selectionMode:t,selectedItems:i,open:s}=this,l=i[0],a=l?.icon,o=y(t);return!s&&l?!!a&&o:!!e&&(!l||o)}get allSelected(){return this.selectedItems.length===this.items.length}get indeterminate(){return this.selectedItems.length>0&&!this.allSelected}get keyboardNavItems(){let{selectAllComboboxItemRef:e}=this,t=this.filteredItems.filter(i=>!i.disabled);return e.value?[e.value,...t]:t}get filterText(){return this._filterText}set filterText(e){let t=this._filterText;e!==t&&(this._filterText=e,this.filterTextChange(e))}get filteredItems(){return this.items.filter(e=>!T(e))}get selectedItems(){return this._selectedItems}set selectedItems(e){let t=this._selectedItems;e!==t&&(this._selectedItems=e,this.selectedItemsHandler())}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 re(this,{floatingEl:t,referenceEl:i,overlayPositioning:l,placement:s,flipPlacements:a,type:"menu"},e)}async setFocus(e){return this.focusSetter(()=>(this.activeChipIndex=-1,this.activeItemIndex=-1,this.textInputRef.value),e)}connectedCallback(){super.connectedCallback(),pe(this),Z(this),this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),$(this),this.cancelable.add(this.filterItems)}async load(){this.handleSelectionModeWarning()}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")||e.has("scale"))&&this.updateItems(),e.has("flipPlacements")&&this.flipPlacementsHandler()}updated(){this.el.offsetHeight!==this.inputHeight&&(this.reposition(!0),this.inputHeight=this.el.offsetHeight),this.refreshSelectionDisplay()}loaded(){te(this,this.getValue()),$(this),this.updateItems(),this.filterItems(this.filterText,!1,!1)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),ue(this),ee(this),de(this)}async handlePopover(){await this.componentOnReady(),this.floatingEl&&(this.open?this.floatingEl.showPopover():this.floatingEl.hidePopover())}emitComboboxChange(){this.calciteComboboxChange.emit()}filterTextChange(e){this.updateActiveItemIndex(-1),this.filterItems(e,!0)}openHandler(){ne(this),!this.disabled&&(this.setMaxScrollerHeight(),this.handlePopover())}handleDisabledChange(e){e||(this.open=!1)}valueHandler(e){this.internalValueChangeFlag||(this.getItems().forEach(t=>{t.selected=Array.isArray(e)?e.includes(t.value):e===t.value}),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)}handleSelectAll(e){e&&this.toggleSelectAll(),this.allSelected&&this.selectedItems.forEach(t=>{let i=this.referenceEl.querySelector(`#${p.chip(t.guid)}`);i&&this.hideChip(i)})}calciteComboboxItemChangeHandler(e){if(this.ignoreSelectedEventsFlag)return;let t=e.target,i=e.composedPath().includes(this.selectAllComboboxItemRef.value);this.selectAllEnabled&&this.handleSelectAll(i);let s=this.keyboardNavItems.indexOf(i?this.selectAllComboboxItemRef.value:t);this.updateActiveItemIndex(s),this.toggleSelection(t,t.selected),this.selectedItems=this.getSelectedItems()}calciteInternalComboboxItemChangeHandler(e){e.stopPropagation(),this.hasUpdated&&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.textInputRef.value&&(this.textInputRef.value.value=""),this.filterText=""}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?ce(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)}toggleSelectAll(){let e=!this.allSelected;this.items.forEach(t=>t.selected=e),this.selectedItems=e?this.items:[],this.emitComboboxChange()}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.textInputRef.value.selectionStart===0)&&(this.previousChip(),e.preventDefault());break;case"ArrowRight":this.activeChipIndex!==-1&&(this.nextChip(),e.preventDefault());break;case"ArrowUp":this.keyboardNavItems.length&&(e.preventDefault(),this.open&&this.shiftActiveItemIndex(-1),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView()),this.scrollToActiveOrSelectedItem();break;case"ArrowDown":this.keyboardNavItems.length&&(e.preventDefault(),this.open?this.shiftActiveItemIndex(1):(this.open=!0,this.ensureRecentSelectedItemIsActive()),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView());break;case" ":!this.textInputRef.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.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"End":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(this.filteredItems.length-1),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"Escape":!this.clearDisabled&&!this.open&&this.clearValue(),this.open=!1,e.preventDefault();break;case"Enter":this.open&&this.activeItemIndex>-1?(this.keyboardNavItems[this.activeItemIndex].toggleSelection(),e.preventDefault()):this.activeChipIndex>-1?(this.removeActiveChip(),e.preventDefault()):this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):e.defaultPrevented||Y(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.scrollToActiveOrSelectedItem(),this.calciteComboboxBeforeOpen.emit()}onOpen(){this.scrollToActiveOrSelectedItem(!0),this.calciteComboboxOpen.emit()}onBeforeClose(){this.calciteComboboxBeforeClose.emit()}onClose(){this.calciteComboboxClose.emit(),he(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.maxBlockSize=s>0?`${s}px`:"",e.style.inlineSize=`${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(Ie.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(n.chipInvisible)}showChip(e){e.classList.remove(n.chipInvisible)}refreshChipDisplay({chipEls:e,availableHorizontalChipElSpace:t,chipContainerElGap:i}){e.forEach(s=>{if(!s.selected)this.hideChip(s);else{let l=S(s);if(l&&l<t){t-=l+i,this.showChip(s);return}}this.hideChip(s)})}async refreshSelectionDisplay(){if(this.componentOnReady(),y(this.selectionMode)||!this.textInputRef.value||!this.chipContainerEl)return;let{allSelectedIndicatorChipRef:e,chipContainerEl:t,selectionDisplay:i,placeholder:s,selectedIndicatorChipRef:l,textInputRef:a}=this,o=parseInt(getComputedStyle(t).gap.replace("px","")),c=S(t),{fontSize:h,fontFamily:m}=getComputedStyle(a.value),b=(X(s,`${h} ${m}`)||parseInt(ve))+o,A=S(e.value),L=S(l.value),Se=Math.max(A,L);if(this.setCompactSelectionDisplay({chipContainerElGap:o,chipContainerElWidth:c,inputWidth:b,largestSelectedIndicatorChipWidth:Se}),this.allSelected&&this.selectAllEnabled&&this.selectedItems.forEach(I=>{let x=this.referenceEl.querySelector(`#${p.chip(I.guid)}`);x&&this.hideChip(x)}),this.indeterminate&&this.selectedItems.forEach(I=>{let x=this.referenceEl.querySelector(`#${p.chip(I.guid)}`);x&&this.showChip(x)}),i==="fit"){let I=Array.from(this.el.shadowRoot.querySelectorAll("calcite-chip")).filter($e=>$e.closable),x=Math.round(c-((this.selectedHiddenChipsCount>0?L:0)+o+b+o));this.refreshChipDisplay({availableHorizontalChipElSpace:x,chipContainerElGap:o,chipEls:I}),this.setVisibleAndHiddenChips(I)}}setFloatingEl(e){this.floatingEl=e,$(this),this.handlePopover()}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){D(this.resizeObserver,this.listContainerEl,e),this.listContainerEl=e,this.transitionEl=e}setChipContainerEl(e){D(this.resizeObserver,this.chipContainerEl,e),this.chipContainerEl=e}setReferenceEl(e){this.referenceEl=e,$(this)}setVisibleAndHiddenChips(e){let t=0;e.forEach(s=>{s.selected&&!s.classList.contains(n.chipInvisible)&&t++}),t!==this.selectedVisibleChipsCount&&(this.selectedVisibleChipsCount=t);let i=this.getSelectedItems().length-t;i!==this.selectedHiddenChipsCount&&(this.selectedHiddenChipsCount=i)}getMaxScrollerHeight(){let t=[...this.groupItems,...this.getItems(!0)].filter(a=>!T(a)),{maxItems:i}=this,s=0,l=0;return t.length>=i&&t.forEach(a=>{if(s<i){let o=this.calculateScrollerHeight(a);l+=o,s+=1}}),l}calculateScrollerHeight(e){if(!e)return 0;let t=e.getBoundingClientRect().height,i=`:scope > ${F}, :scope > ${O}`,s=Array.from(e.querySelectorAll(i)).reduce((l,a)=>l+a.getBoundingClientRect().height,0);return t-s}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()?this.handleMultiSelection(e,t):this.handleSingleSelection(e,t))}handleMultiSelection(e,t){e.selected=t,this.updateAncestors(e),this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.resetText(),this.filterItems("")}handleSingleSelection(e,t){this.ignoreSelectedEventsFlag=!0,this.items.forEach(i=>i.selected=i===e?t:!1),this.ignoreSelectedEventsFlag=!1,this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.textInputRef.value&&(this.textInputRef.value.value=w(e)),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")}updateAncestors(e){if(this.selectionMode!=="ancestors")return;let t=V(e),i=ye(e);e.selected?t.forEach(s=>{s.selected=!0}):(i.forEach(s=>s.selected=!1),[...t].forEach(s=>{P(s)||(s.selected=!1)}))}updateItems(){this.items=this.getItems(),this.groupItems=this.getGroupItems(),this.data=this.getData(),this.groupData=this.getGroupData(),this.updateItemProps(),this.selectedItems=this.getSelectedItems()}updateItemProps(){this.getItems(!0).forEach(e=>{e.selectionMode=this.selectionMode,e.scale=this.scale}),this.groupItems.forEach((e,t)=>(e.scale=this.scale,e.position=t)),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,metadata:e.metadata,shortHeading:e.shortHeading,el:e}))}getGroupData(){return this.groupItems.map(e=>({label:e.label,el:e}))}resetText(){this.textInputRef.value&&(this.textInputRef.value.value=""),this.filterText=""}getItems(e=!1){return Array.from(this.el.querySelectorAll(F)).filter(i=>e||!i.disabled)}getGroupItems(){return Array.from(this.el.querySelectorAll(O))}addCustomChip(e,t){let i=this.items.find(s=>s.heading===e);if(i)this.toggleSelection(i,!0);else{let s=document.createElement("calcite-combobox-item");s.value=e,s.heading=e,this.el.prepend(s),this.updateItems(),this.toggleSelection(s,!0),this.open=!0,t&&this.setFocus()}}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,J(this.textInputRef.value)):(this.activeChipIndex=t,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){let e=this.selectedItems[this.activeChipIndex]?.guid;(e?this.referenceEl.querySelector(`#${p.chip(e)}`):null)?.setFocus()}scrollToActiveOrSelectedItem(e=!1){let t=e&&this.selectedItems?.length?this.selectedItems[0]:this.keyboardNavItems[this.activeItemIndex],i=this.listContainerEl;if(!t||!i)return;t.scrollIntoView({block:"nearest"});let l=this.selectAllComboboxItemRef.value?.offsetHeight||0,a=t.getBoundingClientRect(),o=i.getBoundingClientRect();a.top<o.top+l&&(i.scrollTop-=o.top+l-a.top)}shiftActiveItemIndex(e){let{length:t}=this.keyboardNavItems,i=(this.activeItemIndex+t+e)%t;this.updateActiveItemIndex(i),this.scrollToActiveOrSelectedItem()}updateActiveItemIndex(e){this.activeItemIndex=e;let t=null;this.keyboardNavItems.forEach((i,s)=>{s===e?(i.active=!0,t=`${p.item(i.guid)}`):i.active=!1}),this.activeDescendant=t,this.activeItemIndex>-1&&(this.activeChipIndex=-1)}isMulti(){return!y(this.selectionMode)}comboboxFocusHandler(){this.disabled||this.textInputRef.value.focus()}createScreenReaderItem({ariaLabel:e,ariaSelected:t,id:i,textContent:s}){return d`<li aria-label=${e??u} aria-selected=${t??u} id=${i??u} role=option tabindex=-1>${s}</li>`}handleSelectionModeWarning(){this.selectionMode==="single-persist"&&this.clearDisabled&&console.warn('clearDisabled is ignored when selection-mode is set to "single-persist"')}getDescriptionMessage(){let e=Array.isArray(this.value)?this.value.join(", "):this.value;return this.readOnly?this.messages.nonEditable?.replace("{value}",`${e}`):e}renderChips(){let{activeChipIndex:e,readOnly:t,scale:i,selectionMode:s,messages:l}=this;return this.selectAllEnabled&&this.allSelected?null:this.selectedItems.map((a,o)=>{let c={[n.chip]:!0},h=[...V(a)].reverse(),m=w(a),k=[...h,a].map(A=>w(A)),b=s!=="ancestors"?m:k.join(" / ");return v(m,d`<calcite-chip .appearance=${t?"outline":"solid"} class=${r(c)} .closable=${!t} .icon=${a.icon} .iconFlipRtl=${a.iconFlipRtl} id=${(a.guid?`${p.chip(a.guid)}`:null)??u} .label=${b} .messageOverrides=${{dismissLabel:l.removeTag}} @focusin=${()=>this.activeChipIndex=o} @calciteChipClose=${()=>this.calciteChipCloseHandler(a)} .scale=${i} .selected=${a.selected} .tabIndex=${e===o?0:-1} title=${b??u} .value=${a.value}>${b}</calcite-chip>`)})}renderAllSelectedIndicatorChip(){let{allSelectedIndicatorChipRef:e,compactSelectionDisplay:t,scale:i,selectedVisibleChipsCount:s}=this,l=t?this.messages.all:this.messages.allSelected;return d`<calcite-chip class=${r({[n.chip]:!0,[n.chipInvisible]:!(this.allSelected&&!s),[n.allSelected]:!0})} .label=${l} .scale=${i} title=${l??u} value ${f(e)}>${l}</calcite-chip>`}renderSelectedIndicatorChip(){let{compactSelectionDisplay:e,selectionDisplay:t,getSelectedItems:i,scale:s,selectedHiddenChipsCount:l,selectedVisibleChipsCount:a,selectedIndicatorChipRef:o}=this,c,h;if(e)c=!0;else if(t==="single"){let m=i().length;this.allSelected?c=!0:m>0?c=!1:c=!0,h=`${m} ${this.messages.selected}`}else t==="fit"&&(c=!!(this.allSelected&&a===0||l===0),h=a>0?`+${l}`:`${l} ${this.messages.selected}`);return d`<calcite-chip class=${r({[n.chip]:!0,[n.chipInvisible]:c})} .label=${h} .scale=${s} title=${h??u} value ${f(o)}>${h}</calcite-chip>`}renderSelectedIndicatorChipCompact(){let{compactSelectionDisplay:e,selectionDisplay:t,getSelectedItems:i,scale:s,selectedHiddenChipsCount:l}=this,a,o;if(e){let c=i().length;this.allSelected?a=!0:t==="fit"?(a=!(l>0),o=`${l||0}`):t==="single"&&(a=!(c>0),o=`${c}`)}else a=!0;return d`<calcite-chip class=${r({[n.chip]:!0,[n.chipInvisible]:a})} .label=${o} .scale=${s} title=${o??u} value>${o}</calcite-chip>`}renderInput(){let{guid:e,disabled:t,placeholder:i,selectionMode:s,selectedItems:l,open:a}=this,o=y(s),c=l[0],h=!a&&o&&!!c&&!this.filterText;return d`<span class=${r({[n.inputWrap]:!0,[n.inputWrapSingle]:o})}>${h&&v("label",d`<span class=${r({[n.label]:!0,[n.labelIcon]:!!c?.icon})}>${w(c)}</span>`)||""}${v("input",d`<input aria-activedescendant=${this.activeDescendant??u} aria-controls=${`${p.listbox(e)}`} aria-errormessage=${p.validationMessage} aria-owns=${`${p.listbox(e)}`} aria-autocomplete=list .ariaDescription=${this.getDescriptionMessage()} .ariaExpanded=${a} aria-haspopup=listbox .ariaInvalid=${this.status==="invalid"} .ariaLabel=${me(this)} class=${r({[n.input]:!0,[n.inputSingle]:!0,[n.inputHidden]:h,[n.inputIcon]:this.showingInlineIcon&&!!this.placeholderIcon})} .disabled=${t} .id=${`${p.input(e)}`} @focus=${this.comboboxFocusHandler} @input=${this.inputHandler} placeholder=${i??u} .readOnly=${this.readOnly} .required=${this.required} role=combobox .tabIndex=${this.activeChipIndex===-1?0:-1} type=text .value=${W(this.filterText??"")} ${f(this.textInputRef)}>`)}</span>`}renderListBoxOptions(){let e=this.keyboardNavItems.map(t=>this.createScreenReaderItem({ariaLabel:t.label,ariaSelected:t.selected,id:`${p.item(t.guid)}`,textContent:t.heading}));if(this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"){let t=this.createScreenReaderItem({ariaLabel:this.messages.selectAll,ariaSelected:this.allSelected,textContent:this.messages.selectAll});t&&e.unshift(t)}return e}renderFloatingUIContainer(){let{messages:e,setFloatingEl:t,setContainerEl:i,open:s,scale:l}=this,a={[n.listContainer]:!0,[R.animation]:!0,[R.animationActive]:s},o=(this.filterText&&e.add?.replace("{text}",`${this.filterText}`))??"";return d`<div aria-hidden=true class=${r(n.floatingUIContainer)} popover=manual ${f(t)}><div class=${r(a)} ${f(i)}><ul class=${r({[n.list]:!0,[n.listHide]:!s})}>${this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"&&d`<calcite-combobox-item class=${r(n.selectAll)} .heading=${e.selectAll} .id=${`${this.guid}-select-all-enabled-interactive`} .indeterminate=${this.indeterminate} .label=${e.selectAll} .scale=${l} .selected=${this.allSelected} tabindex=-1 value=select-all ${f(this.selectAllComboboxItemRef)}></calcite-combobox-item>`||""}<slot></slot>${this.noMatchesFound&&(this.allowCustomValues?d`<li aria-label=${o??u} class=${r(n.noMatches)} @click=${this.customChipAddHandler} role=option tabindex=0>${ge({text:o,pattern:new RegExp(`(${M(this.filterText)})`,"i")})}</li>`:d`<li class=${r({[n.noMatchesPlaceholder]:!0,[n.noMatches]:!0})}>${e.noMatches}</li>`)||""}</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&&v("selected-placeholder-icon",d`<span class=${r(n.iconStart)}><calcite-icon class=${r({[n.selectedIcon]:!o,[n.placeholderIcon]:o})} .flipRtl=${o?i:l.iconFlipRtl} .icon=${o?t:a} .scale=${H(this.scale)}></calcite-icon></span>`)||""}renderChevronIcon(){let{open:e}=this;return v("chevron",d`<span class=${r(n.iconEnd)}><calcite-icon class=${r(n.icon)} .icon=${e?z.chevronUp:z.chevronDown} .scale=${H(this.scale)}></calcite-icon></span>`)}render(){let{selectionDisplay:e,guid:t,label:i,open:s,readOnly:l}=this,a=y(this.selectionMode),o=e==="all",c=e==="single",h=!a&&e==="fit",m=!this.clearDisabled&&this.selectionMode!=="single-persist"&&!!this.value?.length;return this.interactiveContainer({disabled:this.disabled,children:d`${this.labelText&&fe({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div aria-live=polite class=${r({[n.wrapper]:!0,[n.wrapperSingle]:a||!this.selectedItems.length,[n.wrapperActive]:s})} @click=${this.clickHandler} @keydown=${this.keyDownHandler} ${f(this.setReferenceEl)}>${this.renderSelectedOrPlaceholderIcon()}${v("grid",d`<div class=${r({[n.gridInput]:!0,[n.selectionDisplayFit]:h,[n.selectionDisplaySingle]:c})} ${f(this.setChipContainerEl)}>${!a&&!c&&this.renderChips()||""}${!a&&!c&&this.selectAllEnabled&&this.renderAllSelectedIndicatorChip()||""}${!a&&!o&&[this.renderSelectedIndicatorChip(),this.renderSelectedIndicatorChipCompact(),this.renderAllSelectedIndicatorChip()]||""}<label class=${r(n.screenReadersOnly)} .htmlFor=${`${p.input(t)}`} .id=${`${p.label(t)}`}>${i}</label>${this.renderInput()}</div>`)}${!l&&m?v("close-button",Ce({disabled:this.disabled,label:this.messages.clear,ref:this.closeButtonRef,scale:this.scale})):null}${!l&&this.renderChevronIcon()||""}</div><ul aria-labelledby=${`${p.label(t)}`} aria-multiselectable=true class=${r(n.screenReadersOnly)} .id=${`${p.listbox(t)}`} role=listbox tabindex=-1>${this.renderListBoxOptions()}</ul>${this.renderFloatingUIContainer()}${ie({component:this})}${this.validationMessage&&this.status==="invalid"?be({icon:this.validationIcon,id:p.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}};_("calcite-combobox",B);export{B as Combobox};
|