@esri/calcite-components 5.0.0-next.83 → 5.0.0-next.84
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/{KUNXBHLV.js → 256DLKVQ.js} +2 -2
- package/dist/cdn/{7PC5CSOH.js → 2AROYJKG.js} +2 -2
- package/dist/cdn/{EZED5ZZS.js → 2IOJLJCO.js} +2 -2
- package/dist/cdn/{ZI3HE65I.js → 2K35TAVP.js} +2 -2
- package/dist/cdn/{KXEMALMQ.js → 2NKSTXS2.js} +2 -2
- package/dist/cdn/{PHRNNGYG.js → 2OODGSZF.js} +2 -2
- package/dist/cdn/{PFPEPHMM.js → 2UPQ46LQ.js} +2 -2
- package/dist/cdn/{WYU65B3Q.js → 2YFE5VGA.js} +2 -2
- package/dist/cdn/{3QMYEJFC.js → 36C5HYRD.js} +2 -2
- package/dist/cdn/{L66RQXXG.js → 3NW6TUBJ.js} +2 -2
- package/dist/cdn/{HB2DR3ZB.js → 3OI5D63L.js} +2 -2
- package/dist/cdn/{OVHJHBPK.js → 3QI2UMXG.js} +2 -2
- package/dist/cdn/{CH4ADILW.js → 3SRUJCMV.js} +1 -1
- package/dist/cdn/{P6YYTQ6L.js → 3XF7CZ6K.js} +2 -2
- package/dist/cdn/{4XHSKQYK.js → 3XHBEPRS.js} +1 -1
- package/dist/cdn/{YQ6XRLOV.js → 4APF5JTD.js} +2 -2
- package/dist/cdn/{5KQCFZEG.js → 4JB672QM.js} +2 -2
- package/dist/cdn/{BFWF7IBD.js → 4NAC5EP5.js} +2 -2
- package/dist/cdn/{AHCQGQ2O.js → 4RFS2S7X.js} +2 -2
- package/dist/cdn/{WJATZFZ5.js → 4YZQQ4CN.js} +2 -2
- package/dist/cdn/{MG3OIASA.js → 54YHX7YY.js} +2 -2
- package/dist/cdn/{VSS43MMB.js → 57I6IBKN.js} +2 -2
- package/dist/cdn/{TC762UQ3.js → 5ELLUD73.js} +2 -2
- package/dist/cdn/{O75YZFIM.js → 5FKFHET7.js} +2 -2
- package/dist/cdn/{6CP3TN72.js → 5ILY2FW5.js} +2 -2
- package/dist/cdn/{2RPOBJ4R.js → 5JNCBF7X.js} +2 -2
- package/dist/cdn/{IFQM47QK.js → 5KDDBRMR.js} +2 -2
- package/dist/cdn/{A3D36AMP.js → 5VSEW66J.js} +2 -2
- package/dist/cdn/{VRV5UHHY.js → 5XSSIY7H.js} +2 -2
- package/dist/cdn/{JHMXCXAB.js → 63D4VKJK.js} +2 -2
- package/dist/cdn/{ZG5PZ6MI.js → 6RA6FTIB.js} +2 -2
- package/dist/cdn/{P5LY2AU7.js → 74GBYBG6.js} +2 -2
- package/dist/cdn/{2NMU37OA.js → 7CYK7EBI.js} +2 -2
- package/dist/cdn/{DXHUSDRO.js → 7IM4VKWX.js} +2 -2
- package/dist/cdn/{27SYCLZ5.js → 7IXHPQXZ.js} +2 -2
- package/dist/cdn/{Q3PK3TAG.js → 7TDI5PCU.js} +1 -1
- package/dist/cdn/{RGG3JG2M.js → 7XVHEAGT.js} +2 -2
- package/dist/cdn/{FU4I6BUA.js → ABMY4SGK.js} +2 -2
- package/dist/cdn/{AQZEYT5S.js → AC2VEVYH.js} +2 -2
- package/dist/cdn/{OMPSBEEV.js → AMQ26Q3F.js} +2 -2
- package/dist/cdn/{65DJJJOA.js → AWRGXPC2.js} +2 -2
- package/dist/cdn/{Z4QDVFRA.js → BHH2ETCR.js} +2 -2
- package/dist/cdn/{VREEPM6K.js → BKZWITAQ.js} +2 -2
- package/dist/cdn/{OWXDI47D.js → BLQCK445.js} +2 -2
- package/dist/cdn/{PDICBNKX.js → BTXVDVST.js} +2 -2
- package/dist/cdn/{YIYL2UWK.js → BU4V35JV.js} +2 -2
- package/dist/cdn/{BBTMZGGI.js → CLRHLRBZ.js} +2 -2
- package/dist/cdn/{65SZ5YSC.js → CMP4I3Q6.js} +1 -1
- package/dist/cdn/{YDCO5J7F.js → CSAL4F67.js} +2 -2
- package/dist/cdn/{ZICOBB7Y.js → CX3ZJFQQ.js} +2 -2
- package/dist/cdn/{YTOJ2D4N.js → D3W7YIIT.js} +2 -2
- package/dist/cdn/{GI3CYDKN.js → D5CJCZYW.js} +2 -2
- package/dist/cdn/{BPE7SICP.js → D653VBSC.js} +2 -2
- package/dist/cdn/{A3FJCRUH.js → DEDFJREY.js} +2 -2
- package/dist/cdn/{DCJSJUXW.js → DKF5IBNP.js} +2 -2
- package/dist/cdn/{5AT46KNL.js → DQD53EKE.js} +2 -2
- package/dist/cdn/{XM66TSXT.js → EB4KZWFP.js} +2 -2
- package/dist/cdn/{J3OTBQDW.js → EDUBMLAP.js} +1 -1
- package/dist/cdn/{ZNMCST5F.js → EJX6DTQ3.js} +2 -2
- package/dist/cdn/{HTZMPH3A.js → EV5OY76U.js} +2 -2
- package/dist/cdn/{P3VYNO26.js → F7ZUM7XL.js} +2 -2
- package/dist/cdn/{TIKWNPFF.js → FAEXP5ZV.js} +2 -2
- package/dist/cdn/{2NYT7OAC.js → FQMVJPE4.js} +1 -1
- package/dist/cdn/{TFXFEHM5.js → FXNAKQIO.js} +2 -2
- package/dist/cdn/{4M2H7IP2.js → FYQRHXOM.js} +2 -2
- package/dist/cdn/{QQPH3S2T.js → G7CDSEFW.js} +2 -2
- package/dist/cdn/{J7LQWPY3.js → GBM54MYQ.js} +2 -2
- package/dist/cdn/{MCCP52OW.js → GJOSP242.js} +2 -2
- package/dist/cdn/{XHNX5HZD.js → GKZY3EKL.js} +1 -1
- package/dist/cdn/{2TG34U4J.js → GXT6G7P5.js} +2 -2
- package/dist/cdn/{DLACP2J3.js → HB2YDZ5S.js} +2 -2
- package/dist/cdn/{XUWZYOBH.js → HKSPYZ2T.js} +1 -1
- package/dist/cdn/{2IWIQJDO.js → HM7GKSVW.js} +2 -2
- package/dist/cdn/{OTWBZROF.js → HQ2J4422.js} +2 -2
- package/dist/cdn/{W7IX6SP4.js → IGQMYEU7.js} +2 -2
- package/dist/cdn/{H7EAQDYK.js → IQHIBXEX.js} +2 -2
- package/dist/cdn/{F62O7UCC.js → ITSWEKRF.js} +1 -1
- package/dist/cdn/{LYLSSAPS.js → IUGGJ23G.js} +2 -2
- package/dist/cdn/{C6RFBD7D.js → IVUYYBIN.js} +2 -2
- package/dist/cdn/{HXNQXP24.js → J2ZBDITI.js} +1 -1
- package/dist/cdn/{HAU3OKBS.js → J6HPR7L5.js} +2 -2
- package/dist/cdn/{FTSLLBXE.js → JOJ3JDL6.js} +2 -2
- package/dist/cdn/{IHGZ3OYA.js → JPQAMOUL.js} +1 -1
- package/dist/cdn/{CVOIHWDZ.js → JS2XCEV3.js} +2 -2
- package/dist/cdn/{Z6JSJ2ZP.js → JSL5H4FG.js} +2 -2
- package/dist/cdn/{FVN3GE7F.js → JTVRJCPH.js} +2 -2
- package/dist/cdn/{HY7I6UZX.js → JVWAJALA.js} +2 -2
- package/dist/cdn/{BYWKEYQW.js → JX2AXSYH.js} +2 -2
- package/dist/cdn/{XYZVKVZX.js → JY3QUWZM.js} +1 -1
- package/dist/cdn/{KGRUAYGU.js → JYG2A535.js} +2 -2
- package/dist/cdn/{BZPQ7AJV.js → KHQYT3K4.js} +2 -2
- package/dist/cdn/{ZJHRUBF6.js → KPU5ZT6L.js} +2 -2
- package/dist/cdn/{NFF3T2RF.js → KRVWOD6C.js} +2 -2
- package/dist/cdn/{X7NZBBQ6.js → KZR3TNUB.js} +1 -1
- package/dist/cdn/{TWYXTCUY.js → L2VPLTYE.js} +1 -1
- package/dist/cdn/{NX5GWBWO.js → L325X7WP.js} +1 -1
- package/dist/cdn/{7EJ26CW6.js → LAM6N563.js} +1 -1
- package/dist/cdn/{DFAA5C4F.js → LJ2YG7C3.js} +2 -2
- package/dist/cdn/{25O7RMOL.js → LK4GVUOR.js} +1 -1
- package/dist/cdn/{NQHFQCZT.js → M26OEUBI.js} +2 -2
- package/dist/cdn/{6FT36EIZ.js → MH4MUOJM.js} +2 -2
- package/dist/cdn/{6AQKYIMI.js → MQKIF5U4.js} +2 -2
- package/dist/cdn/{PTKDMDNC.js → MWVBEQWD.js} +1 -1
- package/dist/cdn/{DCTYUMQQ.js → MWY35H67.js} +2 -2
- package/dist/cdn/{4A5LJCVG.js → NV3BLFYF.js} +2 -2
- package/dist/cdn/{HEO2FDK2.js → NVIVPBGF.js} +2 -2
- package/dist/cdn/{HVD5AK2A.js → NXN5OMGF.js} +2 -2
- package/dist/cdn/{NWQYZ5HC.js → NY3WVGFS.js} +2 -2
- package/dist/cdn/{ALFZE4EE.js → O4424VXQ.js} +2 -2
- package/dist/cdn/{3SVRIKHA.js → O7LQ7IQJ.js} +1 -1
- package/dist/cdn/{OJFOCOVP.js → OA5PYYHO.js} +2 -2
- package/dist/cdn/{2F2VMRPX.js → OD6UYLJ5.js} +2 -2
- package/dist/cdn/{7KW7AAY4.js → ODTNLC62.js} +2 -2
- package/dist/cdn/{YJ2A7ICR.js → OVFNZHQT.js} +2 -2
- package/dist/cdn/{HLEIEP4H.js → PA55K7HN.js} +2 -2
- package/dist/cdn/{7MQPSVH7.js → PNULS2GU.js} +2 -2
- package/dist/cdn/{F4TJNVNZ.js → PR6RTBCH.js} +2 -2
- package/dist/cdn/{OYY5RTVE.js → Q2NZVUYA.js} +2 -2
- package/dist/cdn/{QUZBO5AS.js → QEWHLVPD.js} +2 -2
- package/dist/cdn/{3D2YIHNF.js → QKNKQWIG.js} +2 -2
- package/dist/cdn/{OI3KHJNN.js → QN3BZTTO.js} +2 -2
- package/dist/cdn/{63D22FZ5.js → QROWRB45.js} +2 -2
- package/dist/cdn/{J5IIUWKX.js → QYUG2P5H.js} +2 -2
- package/dist/cdn/{3XWVEV4A.js → QZLIMHYC.js} +1 -1
- package/dist/cdn/{UHEAJGQN.js → RER3Y4UI.js} +1 -1
- package/dist/cdn/{SQJZORI7.js → RNXWFN73.js} +2 -2
- package/dist/cdn/{FBQEECE2.js → RPQFOHOO.js} +2 -2
- package/dist/cdn/{MNWBEQEV.js → RWYR7AF6.js} +2 -2
- package/dist/cdn/{H5J73U42.js → RY4FVBEE.js} +2 -2
- package/dist/cdn/{U73LX45D.js → S7BIZAIK.js} +1 -1
- package/dist/cdn/{AW6R4N36.js → S7K3NMTR.js} +2 -2
- package/dist/cdn/{AXWDPBQP.js → SH7VKCD7.js} +2 -2
- package/dist/cdn/{DEEBPBJD.js → SKOSI2L5.js} +2 -2
- package/dist/cdn/{7R5YPAGW.js → SLFEZAD2.js} +2 -2
- package/dist/cdn/{HWJRK2SH.js → T6OOQJ33.js} +2 -2
- package/dist/cdn/{BZRFPK7B.js → TA34PD5U.js} +2 -2
- package/dist/cdn/{QHNL3SBY.js → TADGNOQY.js} +2 -2
- package/dist/cdn/{H33U6CMZ.js → TAGW4GD7.js} +2 -2
- package/dist/cdn/{QQ2E5EZS.js → TAVHZWON.js} +2 -2
- package/dist/cdn/{6WAFXMIU.js → THNDLL6T.js} +2 -2
- package/dist/cdn/{4AZADF4D.js → TK7CIS5T.js} +2 -2
- package/dist/cdn/{TNYNO53M.js → TSRIREBS.js} +2 -2
- package/dist/cdn/{4AGIQKNY.js → U3Y4O52N.js} +2 -2
- package/dist/cdn/{EMQJYA3U.js → U4ZCHG6H.js} +2 -2
- package/dist/cdn/{KZQWWSAW.js → UD7CFFCS.js} +2 -2
- package/dist/cdn/{WG22SUPD.js → UJ3GAJDY.js} +2 -2
- package/dist/cdn/{UDCFTZHN.js → UNTK3KPP.js} +2 -2
- package/dist/cdn/{AEUQZU6O.js → VCA4ZXWE.js} +2 -2
- package/dist/cdn/{GJWHI6TT.js → VFFCSONC.js} +2 -2
- package/dist/cdn/{AAESPKRS.js → VJHW23JU.js} +2 -2
- package/dist/cdn/{Z5ASKF57.js → VMB52NFS.js} +2 -2
- package/dist/cdn/{SMJWMLQF.js → VOAVNFSX.js} +2 -2
- package/dist/cdn/{ACVQO5BO.js → VSMZDCR6.js} +2 -2
- package/dist/cdn/{QORWSDXX.js → VWOQBOTI.js} +1 -1
- package/dist/cdn/{DGIQMZ4F.js → VYDZTZN4.js} +2 -2
- package/dist/cdn/{6XCSLRWU.js → W72RGYCB.js} +2 -2
- package/dist/cdn/{PYELZOZ4.js → WIJTBWXF.js} +2 -2
- package/dist/cdn/{AHFAS6KM.js → WMDEBPZ5.js} +1 -1
- package/dist/cdn/{FEHCW5II.js → WQ4TSI5O.js} +2 -2
- package/dist/cdn/{CHWM5JUW.js → WVEFIZXY.js} +2 -2
- package/dist/cdn/{TTGLMI6P.js → WZSEDAFK.js} +2 -2
- package/dist/cdn/{UVRQFE72.js → X2Y2D5JN.js} +1 -1
- package/dist/cdn/{CKVC7TYC.js → XCBFD4US.js} +2 -2
- package/dist/cdn/{GCD6F3XJ.js → XE5HJKTW.js} +2 -2
- package/dist/cdn/{V6KT7Y5N.js → XP6WHEJA.js} +2 -2
- package/dist/cdn/{ZB5KAKSH.js → XRVE2TDS.js} +2 -2
- package/dist/cdn/{ATAIEK5L.js → XVUYM6HE.js} +2 -2
- package/dist/cdn/{JD4Z6LPX.js → Y6MWRNZY.js} +2 -2
- package/dist/cdn/{A7C6XZKY.js → YPYLZUV3.js} +2 -2
- package/dist/cdn/{YY64LTAM.js → YYPAH3KM.js} +2 -2
- package/dist/cdn/{5A7J2WM5.js → YZM7SEPY.js} +2 -2
- package/dist/cdn/{WC4JUZNF.js → ZE4R4LGC.js} +2 -2
- package/dist/cdn/{COXEUB7G.js → ZRSRJMZG.js} +2 -2
- package/dist/cdn/{LUHYJMUJ.js → ZZZZNTPM.js} +2 -2
- package/dist/cdn/index.js +2 -2
- package/dist/chunks/ExpandToggle.js +1 -1
- package/dist/chunks/FloatingArrow.js +1 -1
- package/dist/chunks/Heading.js +1 -1
- package/dist/chunks/InternalLabel.js +1 -1
- package/dist/chunks/Validation.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/useTopLayer.js +1 -1
- package/dist/chunks/utils.js +1 -1
- package/dist/chunks/utils2.js +1 -1
- package/dist/chunks/utils3.js +1 -1
- package/dist/chunks/utils4.js +1 -1
- package/dist/components/calcite-accordion/customElement.js +1 -1
- package/dist/components/calcite-accordion-item/customElement.js +1 -1
- package/dist/components/calcite-action/customElement.js +1 -1
- package/dist/components/calcite-action-bar/customElement.js +1 -1
- package/dist/components/calcite-action-group/customElement.js +1 -1
- package/dist/components/calcite-action-menu/customElement.js +1 -1
- package/dist/components/calcite-action-pad/customElement.js +1 -1
- package/dist/components/calcite-alert/customElement.js +1 -1
- package/dist/components/calcite-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 +2 -2
- 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.d.ts +2 -2
- 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 +1 -1
- package/dist/components/calcite-list-item-group/customElement.js +1 -1
- package/dist/components/calcite-loader/customElement.js +1 -1
- package/dist/components/calcite-menu/customElement.js +1 -1
- package/dist/components/calcite-menu-item/customElement.js +1 -1
- package/dist/components/calcite-meter/customElement.js +1 -1
- package/dist/components/calcite-navigation/customElement.js +1 -1
- package/dist/components/calcite-navigation-logo/customElement.js +1 -1
- package/dist/components/calcite-navigation-user/customElement.js +1 -1
- package/dist/components/calcite-notice/customElement.js +1 -1
- package/dist/components/calcite-option/customElement.js +1 -1
- package/dist/components/calcite-option-group/customElement.js +1 -1
- package/dist/components/calcite-pagination/customElement.js +1 -1
- package/dist/components/calcite-panel/customElement.js +1 -1
- package/dist/components/calcite-popover/customElement.js +1 -1
- package/dist/components/calcite-progress/customElement.js +1 -1
- package/dist/components/calcite-radio-button/customElement.js +1 -1
- package/dist/components/calcite-radio-button-group/customElement.js +1 -1
- package/dist/components/calcite-rating/customElement.js +1 -1
- package/dist/components/calcite-scrim/customElement.js +1 -1
- package/dist/components/calcite-segmented-control/customElement.js +1 -1
- package/dist/components/calcite-segmented-control-item/customElement.js +1 -1
- package/dist/components/calcite-select/customElement.js +1 -1
- package/dist/components/calcite-sheet/customElement.d.ts +2 -2
- 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.d.ts +5 -1
- package/dist/components/calcite-shell-panel/customElement.js +1 -1
- package/dist/components/calcite-slider/customElement.d.ts +21 -17
- package/dist/components/calcite-slider/customElement.js +1 -1
- package/dist/components/calcite-sort-handle/customElement.d.ts +3 -3
- package/dist/components/calcite-sort-handle/customElement.js +1 -1
- package/dist/components/calcite-sortable-list/customElement.d.ts +3 -3
- package/dist/components/calcite-sortable-list/customElement.js +1 -1
- package/dist/components/calcite-split-button/customElement.d.ts +3 -3
- 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.d.ts +8 -8
- package/dist/components/calcite-stepper/customElement.js +1 -1
- package/dist/components/calcite-stepper-item/customElement.d.ts +12 -12
- package/dist/components/calcite-stepper-item/customElement.js +1 -1
- package/dist/components/calcite-swatch/customElement.d.ts +1 -1
- package/dist/components/calcite-swatch/customElement.js +1 -1
- package/dist/components/calcite-swatch-group/customElement.d.ts +1 -1
- package/dist/components/calcite-swatch-group/customElement.js +1 -1
- package/dist/components/calcite-switch/customElement.d.ts +1 -1
- package/dist/components/calcite-switch/customElement.js +1 -1
- package/dist/components/calcite-tab/customElement.js +1 -1
- package/dist/components/calcite-tab-nav/customElement.js +1 -1
- package/dist/components/calcite-tab-title/customElement.js +1 -1
- package/dist/components/calcite-table/customElement.js +1 -1
- package/dist/components/calcite-table-cell/customElement.js +1 -1
- package/dist/components/calcite-table-header/customElement.js +1 -1
- package/dist/components/calcite-table-row/customElement.js +1 -1
- package/dist/components/calcite-tabs/customElement.js +1 -1
- package/dist/components/calcite-text-area/customElement.js +1 -1
- package/dist/components/calcite-tile/customElement.js +1 -1
- package/dist/components/calcite-tile-group/customElement.js +1 -1
- package/dist/components/calcite-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 +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.css-custom-data.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +1 -1
- package/package.json +2 -2
|
@@ -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 q}from"./XHNX5HZD.js";import{j as c}from"./PYELZOZ4.js";import{a as j}from"./DXHUSDRO.js";import{a as F}from"./2TG34U4J.js";import{c as R,d as W,e as B}from"./AAESPKRS.js";import{c as O,e as A,h as H}from"./4A5LJCVG.js";import{a as T}from"./OJFOCOVP.js";import{a as M}from"./CHWM5JUW.js";import{c as I}from"./UHEAJGQN.js";import"./CH4ADILW.js";import{a as k,b as L}from"./4XHSKQYK.js";import{a as E}from"./YTOJ2D4N.js";import{a as C}from"./TFXFEHM5.js";import"./U73LX45D.js";import{c as $}from"./DFAA5C4F.js";import"./EMQJYA3U.js";import{t as u}from"./PHRNNGYG.js";import{a as S}from"./2NYT7OAC.js";import{B as x,C as b,D as m,E as y,F as r,H as l,J as z,Q as w,g as v,h as s,p as g}from"./2F2VMRPX.js";var t={assistiveText:"assistive-text",characterLimit:"character-limit",content:"content",container:"container",footer:"footer",characterOverLimit:"character--over-limit",readOnly:"readonly",textAreaInvalid:"text-area--invalid",footerSlotted:"footer--slotted",hide:"hide",footerEndSlotOnly:"footer--end-only",textArea:"text-area",textAreaOnly:"text-area--only",wrapper:"wrapper",loaderContainer:"loader-container",loader:"loader"},N={validationMessage:"textAreaValidationMessage"},V={footerStart:"footer-start",footerEnd:"footer-end"},P=100,p=Object.freeze({height:0,width:0}),U=v`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;box-sizing:border-box;display:inline-block;block-size:100%;inline-size:100%;--calcite-internal-text-area-border-color: var(--calcite-text-area-border-color, var(--calcite-color-border-input));--calcite-internal-text-area-footer-border-color: var( --calcite-text-area-footer-border-color, var(--calcite-internal-text-area-border-color) );--calcite-internal-text-area-corner-radius: var( --calcite-text-area-corner-radius, var(--calcite-corner-radius-default) );--calcite-internal-text-area-shadow: var(--calcite-text-area-shadow, var(--calcite-shadow-none));--calcite-internal-text-area-footer-background-color: var( --calcite-text-area-footer-background-color, var(--calcite-text-area-background-color, var(--calcite-color-foreground-1)) );min-block-size:var(--calcite-text-area-min-height, calc(2 * var(--calcite-internal-text-area-padding-block) + 2 * var(--calcite-border-width-sm)));min-inline-size:var(--calcite-text-area-min-width, 12rem)}.wrapper{box-sizing:border-box;block-size:100%;inline-size:100%;box-shadow:var(--calcite-internal-text-area-shadow);border-radius:var(--calcite-internal-text-area-corner-radius)}.text-area,.footer{font-size:var(--calcite-text-area-font-size, var(--calcite-font-size--1));padding-block:var(--calcite-internal-text-area-padding-block);padding-inline:var(--calcite-internal-text-area-padding-inline)}.footer{background-color:var(--calcite-internal-text-area-footer-background-color);border-radius:0 0 var(--calcite-internal-text-area-corner-radius) var(--calcite-internal-text-area-corner-radius)}.text-area{position:relative;margin:0;box-sizing:border-box;display:block;inline-size:100%;--calcite-internal-text-area-border-block-end-color: var(--calcite-internal-text-area-border-color);border:var(--calcite-border-width-sm) solid var(--calcite-internal-text-area-border-color);border-block-end-color:var(--calcite-internal-text-area-border-block-end-color);color:var(--calcite-text-area-text-color, var(--calcite-color-text-1));font-family:inherit;max-block-size:var(--calcite-text-area-max-height);min-block-size:calc(var(--calcite-text-area-min-height, 0px) - var(--calcite-internal-text-area-footer-min-height, 0px));max-inline-size:var(--calcite-text-area-max-width);min-inline-size:var(--calcite-text-area-min-width, 12rem);background-color:var(--calcite-text-area-background-color, var(--calcite-color-foreground-1));border-radius:var(--calcite-internal-text-area-corner-radius) var(--calcite-internal-text-area-corner-radius) 0 0}.text-area::placeholder{font-weight:var(--calcite-font-weight-normal)}@media screen and (max-width:480px){.text-area{resize:none}}.text-area:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.text-area.text-area--invalid{--calcite-internal-text-area-border-color: var(--calcite-color-status-danger)}.text-area.text-area--invalid:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.text-area.footer--slotted{min-inline-size:18rem}.text-area.text-area--only{border-radius:var(--calcite-internal-text-area-corner-radius)}.text-area:not(.text-area--only,.text-area--invalid){--calcite-internal-text-area-border-block-end-color: var( --calcite-text-area-divider-color, var(--calcite-color-border-3) )}.loader-container{position:relative;block-size:inherit}.loader{position:absolute;inset-block-start:0;inset-block-start:var(--calcite-spacing-px);inset-inline:var(--calcite-spacing-px)}.footer{box-sizing:border-box;display:flex;align-items:center;border:var(--calcite-border-width-sm) solid var(--calcite-internal-text-area-footer-border-color);border-block-start:var(--calcite-border-width-none);min-block-size:var(--calcite-internal-text-area-footer-min-height)}.character-limit{display:flex;align-items:center;justify-content:flex-end;white-space:nowrap;font-size:var(--calcite-text-area-font-size, var(--calcite-font-size--1));font-weight:var(--calcite-font-weight-regular);color:var(--calcite-text-area-character-limit-text-color, var(--calcite-color-text-2));padding-inline-start:var(--calcite-spacing-md)}.character--over-limit{font-weight:var(--calcite-font-weight-bold);color:var(--calcite-color-status-danger)}.readonly{background-color:var(--calcite-text-area-background-color, var(--calcite-color-background));font-weight:var(--calcite-font-weight-medium)}.footer.readonly{background-color:var(--calcite-internal-text-area-footer-background-color, var(--calcite-color-background))}.content,.hide{display:none}.container{display:flex;inline-size:100%;justify-content:space-between}.footer--end-only{justify-content:flex-end}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.text-area.text-area--only{block-size:100%;min-block-size:var(--calcite-text-area-min-height, 0)}:host([resize=none]) .text-area{resize:none}:host([resize=horizontal]) .text-area{resize:horizontal}:host([resize=vertical]) .text-area{resize:vertical}:host([scale=s]){--calcite-internal-text-area-padding-block: var(--calcite-spacing-xxs);--calcite-internal-text-area-padding-inline: var(--calcite-spacing-sm);--calcite-internal-text-area-footer-min-height: 1.75rem}:host([scale=s]) .text-area,:host([scale=s]) .footer,:host([scale=s]) .character-limit{font-size:var(--calcite-text-area-font-size, var(--calcite-font-size--2))}:host([scale=s]) .character-limit{padding-inline-start:var(--calcite-spacing-sm)}:host([scale=m]){--calcite-internal-text-area-padding-block: var(--calcite-spacing-sm);--calcite-internal-text-area-padding-inline: var(--calcite-spacing-md);--calcite-internal-text-area-footer-min-height: 2.25rem}:host([scale=l]){--calcite-internal-text-area-padding-block: var(--calcite-spacing-md);--calcite-internal-text-area-padding-inline: var(--calcite-spacing-lg);--calcite-internal-text-area-footer-min-height: 2.75rem}:host([scale=l]) .text-area,:host([scale=l]) .footer,:host([scale=l]) .character-limit{font-size:var(--calcite-text-area-font-size, var(--calcite-font-size-0))}:host([scale=l]) .character-limit{padding-inline-start:var(--calcite-spacing-lg)}:host([status=invalid]){--calcite-internal-text-area-border-color: var(--calcite-color-status-danger)}:host([status=invalid]) .text-area:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([disabled]) .text-area,:host([disabled]) .footer{opacity:var(--calcite-opacity-half)}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}::placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-placeholder-text-color, var(--calcite-color-text-3))}`,f=class extends y{constructor(){super(...arguments),this.attributeWatch=$(["autofocus","spellcheck"],this.handleGlobalAttributesChanged),this.footerRef=b(),this.guid=S(),this.resizeObserver=k("resize",async()=>{await this.componentOnReady();let{textAreaHeight:e,textAreaWidth:a,elHeight:i,elWidth:n,footerHeight:d,footerWidth:o,validationMessageHeight:h}=this.getHeightAndWidthOfElements();if(o>0&&o!==a&&(this.footerRef.value.style.width=`${a}px`),this.resize==="none")return;let{width:D,height:G}=getComputedStyle(this.el);n!==a&&D!=="auto"&&this.updateSizeToAuto("width"),i!==e+d+h&&G!=="auto"&&this.updateSizeToAuto("height")}),this.cancelable=M()(this),this.updateSizeToAuto=I(e=>{this.el.style[e]="auto"},P,{edges:["trailing"]}),this.messages=E({blocking:!0}),this.focusSetter=C()(this),this.interactiveContainer=T(this),this.disabled=!1,this.groupSeparator=!1,this.limitText=!1,this.loading=!1,this.readOnly=!1,this.required=!1,this.resize="both",this.scale="m",this.status="idle",this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.value="",this.wrap="soft",this.calciteTextAreaChange=g(),this.calciteTextAreaInput=g()}static{this.properties={endSlotHasElements:[16,{},{state:!0}],startSlotHasElements:[16,{},{state:!0}],columns:[11,{},{reflect:!0,type:Number}],disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],groupSeparator:[7,{},{reflect:!0,type:Boolean}],label:1,labelText:1,limitText:[7,{},{reflect:!0,type:Boolean}],loading:[7,{},{reflect:!0,type:Boolean}],maxLength:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],minLength:[11,{},{reflect:!0,type:Number}],name:[3,{},{reflect:!0}],numberingSystem:1,placeholder:1,readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],resize:[3,{},{reflect:!0}],rows:[11,{},{reflect:!0,type:Number}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:z,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:1,wrap:[3,{},{reflect:!0}]}}static{this.styles=U}async selectText(){await this.componentOnReady(),this.textAreaEl?.select()}async setFocus(e){return this.focusSetter(()=>this.textAreaEl,e)}connectedCallback(){super.connectedCallback(),R(this),O(this),this.cancelable.add(this.updateSizeToAuto)}updated(){this.setTextAreaHeight()}disconnectedCallback(){super.disconnectedCallback(),W(this),A(this),this.resizeObserver?.disconnect()}handleGlobalAttributesChanged(){this.requestUpdate()}onLabelClick(){this.setFocus()}handleInput(e){this.value=e.target.value,this.calciteTextAreaInput.emit()}handleChange(){this.calciteTextAreaChange.emit()}contentSlotChangeHandler(){this.value||this.el.childNodes.forEach(a=>{a.nodeName==="#text"&&(this.value=a.nodeValue.trim())})}getLocalizedCharacterLength(){let e=this.value?this.value.length.toString():"0",a=this.maxLength.toString();return this.numberingSystem==="latn"?{currentLength:e,maxLength:a}:(c.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,signDisplay:"never",useGrouping:this.groupSeparator},{currentLength:c.localize(e),maxLength:c.localize(a)})}syncHiddenFormInput(e){e.setCustomValidity(""),this.isCharacterLimitExceeded()&&e.setCustomValidity(this.replacePlaceholdersInMessages()),q("textarea",this,e)}setTextAreaEl(e){L(this.resizeObserver,this.textAreaEl,e),this.textAreaEl=e}setTextAreaHeight(){let{textAreaHeight:e,elHeight:a,footerHeight:i,validationMessageHeight:n}=this.getHeightAndWidthOfElements();i>0&&e+i+n!=a&&(this.textAreaEl.style.height=`${a-i}px`)}getHeightAndWidthOfElements(){let{height:e,width:a}=this.textAreaEl?this.textAreaEl.getBoundingClientRect():p,{height:i,width:n}=this.el.getBoundingClientRect(),{height:d,width:o}=this.footerRef.value?this.footerRef.value.getBoundingClientRect():p,{height:h}=this.validationMessageEl?this.validationMessageEl.getBoundingClientRect():p;return{textAreaHeight:e,textAreaWidth:a,elHeight:i,elWidth:n,footerHeight:d,footerWidth:o,validationMessageHeight:h}}replacePlaceholdersInMessages(){return this.messages.tooLong.replace("{maxLength}",this.localizedCharacterLengthObj.maxLength).replace("{currentLength}",this.localizedCharacterLengthObj.currentLength)}isCharacterLimitExceeded(){return this.value?.length>this.maxLength}setValidationRef(e){e&&(this.validationMessageEl=e)}render(){let e=this.startSlotHasElements||this.endSlotHasElements||!!this.maxLength,a=s`<div class=${r(t.loader)}><calcite-progress .label=${this.messages.loading} type=indeterminate></calcite-progress></div>`;return this.interactiveContainer({disabled:this.disabled,children:s`<div class=${r(t.wrapper)}>${this.labelText&&F({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div class=${r(t.loaderContainer)}>${this.loading?a:null}<textarea aria-describedby=${this.guid??l} aria-errormessage=${N.validationMessage} .ariaInvalid=${this.status==="invalid"||this.isCharacterLimitExceeded()} .ariaLabel=${B(this)} .autofocus=${this.el.autofocus} class=${r({[t.textArea]:!0,[t.readOnly]:this.readOnly,[t.textAreaInvalid]:this.isCharacterLimitExceeded(),[t.footerSlotted]:this.endSlotHasElements&&this.startSlotHasElements,[t.textAreaOnly]:!e})} .cols=${this.columns} .disabled=${this.disabled} maxlength=${(this.limitText?this.maxLength:void 0)??l} name=${this.name??l} @change=${this.handleChange} @input=${this.handleInput} placeholder=${this.placeholder??l} .readOnly=${this.readOnly} .required=${this.required} .rows=${this.rows} spellcheck=${this.el.spellcheck??l} .value=${x(this.value??"")} wrap=${this.wrap??l} ${m(this.setTextAreaEl)}></textarea><span class=${r({[t.content]:!0})}><slot @slotchange=${this.contentSlotChangeHandler}></slot></span><footer class=${r({[t.footer]:!0,[t.readOnly]:this.readOnly,[t.hide]:!e})} ${m(this.footerRef)}><div class=${r({[t.container]:!0,[t.footerEndSlotOnly]:!this.startSlotHasElements&&this.endSlotHasElements})}><slot name=${V.footerStart} @slotchange=${i=>this.startSlotHasElements=u(i)}></slot><slot name=${V.footerEnd} @slotchange=${i=>this.endSlotHasElements=u(i)}></slot></div>${this.renderCharacterLimit()}</footer>${H({component:this})}${this.isCharacterLimitExceeded()&&s`<span aria-live=polite class=${r(t.assistiveText)} id=${this.guid??l}>${this.replacePlaceholdersInMessages()}</span>`||""}</div>${this.validationMessage&&this.status==="invalid"?j({icon:this.validationIcon,id:N.validationMessage,message:this.validationMessage,ref:this.setValidationRef,scale:this.scale,status:this.status}):null}</div>`})}renderCharacterLimit(){return this.maxLength?(this.localizedCharacterLengthObj=this.getLocalizedCharacterLength(),s`<span class=${r(t.characterLimit)}><span class=${r({[t.characterOverLimit]:this.isCharacterLimitExceeded()})}>${this.localizedCharacterLengthObj.currentLength}</span>/${this.localizedCharacterLengthObj.maxLength}</span>`):null}};w("calcite-text-area",f);export{f as TextArea};
|
|
3
|
+
v5.0.0-next.84 */
|
|
4
|
+
import{a as q}from"./GKZY3EKL.js";import{j as c}from"./WIJTBWXF.js";import{a as j}from"./7IM4VKWX.js";import{a as F}from"./GXT6G7P5.js";import{c as R,d as W,e as B}from"./VJHW23JU.js";import{c as O,e as A,h as H}from"./NV3BLFYF.js";import{a as T}from"./OA5PYYHO.js";import{a as M}from"./WVEFIZXY.js";import{c as I}from"./RER3Y4UI.js";import"./3SRUJCMV.js";import{a as k,b as L}from"./3XHBEPRS.js";import{a as E}from"./D3W7YIIT.js";import{a as C}from"./FXNAKQIO.js";import"./S7BIZAIK.js";import{c as $}from"./LJ2YG7C3.js";import"./U4ZCHG6H.js";import{t as u}from"./2OODGSZF.js";import{a as S}from"./FQMVJPE4.js";import{B as x,C as b,D as m,E as y,F as r,H as l,J as z,Q as w,g as v,h as s,p as g}from"./OD6UYLJ5.js";var t={assistiveText:"assistive-text",characterLimit:"character-limit",content:"content",container:"container",footer:"footer",characterOverLimit:"character--over-limit",readOnly:"readonly",textAreaInvalid:"text-area--invalid",footerSlotted:"footer--slotted",hide:"hide",footerEndSlotOnly:"footer--end-only",textArea:"text-area",textAreaOnly:"text-area--only",wrapper:"wrapper",loaderContainer:"loader-container",loader:"loader"},N={validationMessage:"textAreaValidationMessage"},V={footerStart:"footer-start",footerEnd:"footer-end"},P=100,p=Object.freeze({height:0,width:0}),U=v`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;box-sizing:border-box;display:inline-block;block-size:100%;inline-size:100%;--calcite-internal-text-area-border-color: var(--calcite-text-area-border-color, var(--calcite-color-border-input));--calcite-internal-text-area-footer-border-color: var( --calcite-text-area-footer-border-color, var(--calcite-internal-text-area-border-color) );--calcite-internal-text-area-corner-radius: var( --calcite-text-area-corner-radius, var(--calcite-corner-radius-default) );--calcite-internal-text-area-shadow: var(--calcite-text-area-shadow, var(--calcite-shadow-none));--calcite-internal-text-area-footer-background-color: var( --calcite-text-area-footer-background-color, var(--calcite-text-area-background-color, var(--calcite-color-foreground-1)) );min-block-size:var(--calcite-text-area-min-height, calc(2 * var(--calcite-internal-text-area-padding-block) + 2 * var(--calcite-border-width-sm)));min-inline-size:var(--calcite-text-area-min-width, 12rem)}.wrapper{box-sizing:border-box;block-size:100%;inline-size:100%;box-shadow:var(--calcite-internal-text-area-shadow);border-radius:var(--calcite-internal-text-area-corner-radius)}.text-area,.footer{font-size:var(--calcite-text-area-font-size, var(--calcite-font-size--1));padding-block:var(--calcite-internal-text-area-padding-block);padding-inline:var(--calcite-internal-text-area-padding-inline)}.footer{background-color:var(--calcite-internal-text-area-footer-background-color);border-radius:0 0 var(--calcite-internal-text-area-corner-radius) var(--calcite-internal-text-area-corner-radius)}.text-area{position:relative;margin:0;box-sizing:border-box;display:block;inline-size:100%;--calcite-internal-text-area-border-block-end-color: var(--calcite-internal-text-area-border-color);border:var(--calcite-border-width-sm) solid var(--calcite-internal-text-area-border-color);border-block-end-color:var(--calcite-internal-text-area-border-block-end-color);color:var(--calcite-text-area-text-color, var(--calcite-color-text-1));font-family:inherit;max-block-size:var(--calcite-text-area-max-height);min-block-size:calc(var(--calcite-text-area-min-height, 0px) - var(--calcite-internal-text-area-footer-min-height, 0px));max-inline-size:var(--calcite-text-area-max-width);min-inline-size:var(--calcite-text-area-min-width, 12rem);background-color:var(--calcite-text-area-background-color, var(--calcite-color-foreground-1));border-radius:var(--calcite-internal-text-area-corner-radius) var(--calcite-internal-text-area-corner-radius) 0 0}.text-area::placeholder{font-weight:var(--calcite-font-weight-normal)}@media screen and (max-width:480px){.text-area{resize:none}}.text-area:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.text-area.text-area--invalid{--calcite-internal-text-area-border-color: var(--calcite-color-status-danger)}.text-area.text-area--invalid:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.text-area.footer--slotted{min-inline-size:18rem}.text-area.text-area--only{border-radius:var(--calcite-internal-text-area-corner-radius)}.text-area:not(.text-area--only,.text-area--invalid){--calcite-internal-text-area-border-block-end-color: var( --calcite-text-area-divider-color, var(--calcite-color-border-3) )}.loader-container{position:relative;block-size:inherit}.loader{position:absolute;inset-block-start:0;inset-block-start:var(--calcite-spacing-px);inset-inline:var(--calcite-spacing-px)}.footer{box-sizing:border-box;display:flex;align-items:center;border:var(--calcite-border-width-sm) solid var(--calcite-internal-text-area-footer-border-color);border-block-start:var(--calcite-border-width-none);min-block-size:var(--calcite-internal-text-area-footer-min-height)}.character-limit{display:flex;align-items:center;justify-content:flex-end;white-space:nowrap;font-size:var(--calcite-text-area-font-size, var(--calcite-font-size--1));font-weight:var(--calcite-font-weight-regular);color:var(--calcite-text-area-character-limit-text-color, var(--calcite-color-text-2));padding-inline-start:var(--calcite-spacing-md)}.character--over-limit{font-weight:var(--calcite-font-weight-bold);color:var(--calcite-color-status-danger)}.readonly{background-color:var(--calcite-text-area-background-color, var(--calcite-color-background));font-weight:var(--calcite-font-weight-medium)}.footer.readonly{background-color:var(--calcite-internal-text-area-footer-background-color, var(--calcite-color-background))}.content,.hide{display:none}.container{display:flex;inline-size:100%;justify-content:space-between}.footer--end-only{justify-content:flex-end}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.text-area.text-area--only{block-size:100%;min-block-size:var(--calcite-text-area-min-height, 0)}:host([resize=none]) .text-area{resize:none}:host([resize=horizontal]) .text-area{resize:horizontal}:host([resize=vertical]) .text-area{resize:vertical}:host([scale=s]){--calcite-internal-text-area-padding-block: var(--calcite-spacing-xxs);--calcite-internal-text-area-padding-inline: var(--calcite-spacing-sm);--calcite-internal-text-area-footer-min-height: 1.75rem}:host([scale=s]) .text-area,:host([scale=s]) .footer,:host([scale=s]) .character-limit{font-size:var(--calcite-text-area-font-size, var(--calcite-font-size--2))}:host([scale=s]) .character-limit{padding-inline-start:var(--calcite-spacing-sm)}:host([scale=m]){--calcite-internal-text-area-padding-block: var(--calcite-spacing-sm);--calcite-internal-text-area-padding-inline: var(--calcite-spacing-md);--calcite-internal-text-area-footer-min-height: 2.25rem}:host([scale=l]){--calcite-internal-text-area-padding-block: var(--calcite-spacing-md);--calcite-internal-text-area-padding-inline: var(--calcite-spacing-lg);--calcite-internal-text-area-footer-min-height: 2.75rem}:host([scale=l]) .text-area,:host([scale=l]) .footer,:host([scale=l]) .character-limit{font-size:var(--calcite-text-area-font-size, var(--calcite-font-size-0))}:host([scale=l]) .character-limit{padding-inline-start:var(--calcite-spacing-lg)}:host([status=invalid]){--calcite-internal-text-area-border-color: var(--calcite-color-status-danger)}:host([status=invalid]) .text-area:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([disabled]) .text-area,:host([disabled]) .footer{opacity:var(--calcite-opacity-half)}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}::placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-placeholder-text-color, var(--calcite-color-text-3))}`,f=class extends y{constructor(){super(...arguments),this.attributeWatch=$(["autofocus","spellcheck"],this.handleGlobalAttributesChanged),this.footerRef=b(),this.guid=S(),this.resizeObserver=k("resize",async()=>{await this.componentOnReady();let{textAreaHeight:e,textAreaWidth:a,elHeight:i,elWidth:n,footerHeight:d,footerWidth:o,validationMessageHeight:h}=this.getHeightAndWidthOfElements();if(o>0&&o!==a&&(this.footerRef.value.style.width=`${a}px`),this.resize==="none")return;let{width:D,height:G}=getComputedStyle(this.el);n!==a&&D!=="auto"&&this.updateSizeToAuto("width"),i!==e+d+h&&G!=="auto"&&this.updateSizeToAuto("height")}),this.cancelable=M()(this),this.updateSizeToAuto=I(e=>{this.el.style[e]="auto"},P,{edges:["trailing"]}),this.messages=E({blocking:!0}),this.focusSetter=C()(this),this.interactiveContainer=T(this),this.disabled=!1,this.groupSeparator=!1,this.limitText=!1,this.loading=!1,this.readOnly=!1,this.required=!1,this.resize="both",this.scale="m",this.status="idle",this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.value="",this.wrap="soft",this.calciteTextAreaChange=g(),this.calciteTextAreaInput=g()}static{this.properties={endSlotHasElements:[16,{},{state:!0}],startSlotHasElements:[16,{},{state:!0}],columns:[11,{},{reflect:!0,type:Number}],disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],groupSeparator:[7,{},{reflect:!0,type:Boolean}],label:1,labelText:1,limitText:[7,{},{reflect:!0,type:Boolean}],loading:[7,{},{reflect:!0,type:Boolean}],maxLength:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],minLength:[11,{},{reflect:!0,type:Number}],name:[3,{},{reflect:!0}],numberingSystem:1,placeholder:1,readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],resize:[3,{},{reflect:!0}],rows:[11,{},{reflect:!0,type:Number}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:z,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:1,wrap:[3,{},{reflect:!0}]}}static{this.styles=U}async selectText(){await this.componentOnReady(),this.textAreaEl?.select()}async setFocus(e){return this.focusSetter(()=>this.textAreaEl,e)}connectedCallback(){super.connectedCallback(),R(this),O(this),this.cancelable.add(this.updateSizeToAuto)}updated(){this.setTextAreaHeight()}disconnectedCallback(){super.disconnectedCallback(),W(this),A(this),this.resizeObserver?.disconnect()}handleGlobalAttributesChanged(){this.requestUpdate()}onLabelClick(){this.setFocus()}handleInput(e){this.value=e.target.value,this.calciteTextAreaInput.emit()}handleChange(){this.calciteTextAreaChange.emit()}contentSlotChangeHandler(){this.value||this.el.childNodes.forEach(a=>{a.nodeName==="#text"&&(this.value=a.nodeValue.trim())})}getLocalizedCharacterLength(){let e=this.value?this.value.length.toString():"0",a=this.maxLength.toString();return this.numberingSystem==="latn"?{currentLength:e,maxLength:a}:(c.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,signDisplay:"never",useGrouping:this.groupSeparator},{currentLength:c.localize(e),maxLength:c.localize(a)})}syncHiddenFormInput(e){e.setCustomValidity(""),this.isCharacterLimitExceeded()&&e.setCustomValidity(this.replacePlaceholdersInMessages()),q("textarea",this,e)}setTextAreaEl(e){L(this.resizeObserver,this.textAreaEl,e),this.textAreaEl=e}setTextAreaHeight(){let{textAreaHeight:e,elHeight:a,footerHeight:i,validationMessageHeight:n}=this.getHeightAndWidthOfElements();i>0&&e+i+n!=a&&(this.textAreaEl.style.height=`${a-i}px`)}getHeightAndWidthOfElements(){let{height:e,width:a}=this.textAreaEl?this.textAreaEl.getBoundingClientRect():p,{height:i,width:n}=this.el.getBoundingClientRect(),{height:d,width:o}=this.footerRef.value?this.footerRef.value.getBoundingClientRect():p,{height:h}=this.validationMessageEl?this.validationMessageEl.getBoundingClientRect():p;return{textAreaHeight:e,textAreaWidth:a,elHeight:i,elWidth:n,footerHeight:d,footerWidth:o,validationMessageHeight:h}}replacePlaceholdersInMessages(){return this.messages.tooLong.replace("{maxLength}",this.localizedCharacterLengthObj.maxLength).replace("{currentLength}",this.localizedCharacterLengthObj.currentLength)}isCharacterLimitExceeded(){return this.value?.length>this.maxLength}setValidationRef(e){e&&(this.validationMessageEl=e)}render(){let e=this.startSlotHasElements||this.endSlotHasElements||!!this.maxLength,a=s`<div class=${r(t.loader)}><calcite-progress .label=${this.messages.loading} type=indeterminate></calcite-progress></div>`;return this.interactiveContainer({disabled:this.disabled,children:s`<div class=${r(t.wrapper)}>${this.labelText&&F({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div class=${r(t.loaderContainer)}>${this.loading?a:null}<textarea aria-describedby=${this.guid??l} aria-errormessage=${N.validationMessage} .ariaInvalid=${this.status==="invalid"||this.isCharacterLimitExceeded()} .ariaLabel=${B(this)} .autofocus=${this.el.autofocus} class=${r({[t.textArea]:!0,[t.readOnly]:this.readOnly,[t.textAreaInvalid]:this.isCharacterLimitExceeded(),[t.footerSlotted]:this.endSlotHasElements&&this.startSlotHasElements,[t.textAreaOnly]:!e})} .cols=${this.columns} .disabled=${this.disabled} maxlength=${(this.limitText?this.maxLength:void 0)??l} name=${this.name??l} @change=${this.handleChange} @input=${this.handleInput} placeholder=${this.placeholder??l} .readOnly=${this.readOnly} .required=${this.required} .rows=${this.rows} spellcheck=${this.el.spellcheck??l} .value=${x(this.value??"")} wrap=${this.wrap??l} ${m(this.setTextAreaEl)}></textarea><span class=${r({[t.content]:!0})}><slot @slotchange=${this.contentSlotChangeHandler}></slot></span><footer class=${r({[t.footer]:!0,[t.readOnly]:this.readOnly,[t.hide]:!e})} ${m(this.footerRef)}><div class=${r({[t.container]:!0,[t.footerEndSlotOnly]:!this.startSlotHasElements&&this.endSlotHasElements})}><slot name=${V.footerStart} @slotchange=${i=>this.startSlotHasElements=u(i)}></slot><slot name=${V.footerEnd} @slotchange=${i=>this.endSlotHasElements=u(i)}></slot></div>${this.renderCharacterLimit()}</footer>${H({component:this})}${this.isCharacterLimitExceeded()&&s`<span aria-live=polite class=${r(t.assistiveText)} id=${this.guid??l}>${this.replacePlaceholdersInMessages()}</span>`||""}</div>${this.validationMessage&&this.status==="invalid"?j({icon:this.validationIcon,id:N.validationMessage,message:this.validationMessage,ref:this.setValidationRef,scale:this.scale,status:this.status}):null}</div>`})}renderCharacterLimit(){return this.maxLength?(this.localizedCharacterLengthObj=this.getLocalizedCharacterLength(),s`<span class=${r(t.characterLimit)}><span class=${r({[t.characterOverLimit]:this.isCharacterLimitExceeded()})}>${this.localizedCharacterLengthObj.currentLength}</span>/${this.localizedCharacterLengthObj.maxLength}</span>`):null}};w("calcite-text-area",f);export{f as TextArea};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.84 */
|
|
4
4
|
function t(n){return n==="Enter"||n===" "}var e=["0","1","2","3","4","5","6","7","8","9"];export{t as a,e 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 t,b as E}from"./
|
|
3
|
+
v5.0.0-next.84 */
|
|
4
|
+
import{a as t,b as E}from"./KZR3TNUB.js";import{a as D}from"./OA5PYYHO.js";import{a as y}from"./FXNAKQIO.js";import{a as r}from"./S7BIZAIK.js";import"./LJ2YG7C3.js";import"./U4ZCHG6H.js";import{q as I}from"./2OODGSZF.js";import"./FQMVJPE4.js";import{C as b,D as g,E as w,F as o,H as s,I as k,Q as x,g as v,h as i,p as n}from"./OD6UYLJ5.js";var q=v`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:flex;flex-grow:1;align-items:center;outline:2px solid transparent;outline-offset:2px}.container{position:relative;display:flex;flex-grow:1;cursor:pointer;align-items:center;text-decoration-line:none;color:var(--calcite-dropdown-item-text-color, var(--calcite-color-text-1));text-align:start}.container a{outline:none;position:relative;display:flex;flex-grow:1;cursor:pointer;align-items:center;text-decoration-line:none;color:var(--calcite-dropdown-item-text-color, var(--calcite-color-text-1))}.content{flex:1 1 auto}.icon{position:relative;opacity:0;transition-timing-function:cubic-bezier(.4,0,.2,1);transform:scale(.9)}.icon--start,.icon--end{--calcite-icon-color: var(--calcite-dropdown-item-text-color, var(--calcite-color-text-3))}:host([scale=s]) .container{padding-block:.25rem;padding-inline:.5rem;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm)}:host([scale=s]) .icon,:host([scale=s]) .icon--start{padding-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .icon--end{padding-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .container{padding-block:.5rem;padding-inline:.75rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}:host([scale=m]) .icon,:host([scale=m]) .icon--start{padding-inline-end:var(--calcite-spacing-md)}:host([scale=m]) .icon--end{padding-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .container{padding-block:.625rem;padding-inline:1rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=l]) .icon,:host([scale=l]) .icon--start{padding-inline-end:var(--calcite-spacing-lg)}:host([scale=l]) .icon--end{padding-inline-start:var(--calcite-spacing-lg)}:host(:focus) .container{text-decoration-line:none;outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host(:hover:not([disabled])) .container{background-color:var(--calcite-dropdown-item-background-color-hover, var(--calcite-color-foreground-2))}:host(:active:not([disabled])) .container{background-color:var(--calcite-dropdown-item-background-color-press, var(--calcite-color-foreground-3))}:host(:hover:not([disabled])) .container,:host(:active:not([disabled])) .container{text-decoration-line:none;color:var(--calcite-dropdown-item-text-color-press, var(--calcite-color-text-1))}:host(:hover:not([disabled])) .icon--start,:host(:hover:not([disabled])) .icon--end,:host(:active:not([disabled])) .icon--start,:host(:active:not([disabled])) .icon--end{--calcite-icon-color: var(--calcite-dropdown-item-text-color-press, var(--calcite-color-text-1))}:host(:hover:not([disabled])) .link,:host(:active:not([disabled])) .link{color:var(--calcite-dropdown-item-text-color-press, var(--calcite-color-text-1))}:host([selected]) .container:not(.container--none-selection),:host([selected]) .link{font-weight:var(--calcite-font-weight-medium);--calcite-internal-dropdown-item-text-color: var( --calcite-dropdown-item-text-color-press, var(--calcite-color-text-1) );color:var(--calcite-internal-dropdown-item-text-color)}:host([selected]) .container:not(.container--none-selection) .icon,:host([selected]) .link .icon{--calcite-icon-color: var(--calcite-dropdown-item-icon-color-press, var(--calcite-color-brand))}:host([selected]) .container:not(.container--none-selection) .icon--start,:host([selected]) .container:not(.container--none-selection) .icon--end,:host([selected]) .link .icon--start,:host([selected]) .link .icon--end{--calcite-icon-color: var(--calcite-internal-dropdown-item-text-color)}:host(:hover:not([disabled])) .icon{--calcite-icon-color: var(--calcite-dropdown-item-icon-color-hover)}:host([selected]) .icon{opacity:1}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,d=class extends w{constructor(){super(),this.childLinkRef=b(),this.focusSetter=y()(this),this.interactiveContainer=D(this),this.disabled=!1,this.scale="m",this.selected=!1,this.selectionMode="single",this.calciteDropdownItemSelect=n({cancelable:!1}),this.calciteInternalDropdownCloseRequest=n({cancelable:!1}),this.calciteInternalDropdownItemKeyEvent=n({cancelable:!1}),this.calciteInternalDropdownItemSelect=n({cancelable:!1}),this.listen("click",this.onClick),this.listen("keydown",this.keyDownHandler),this.listenOn(document.body,"calciteInternalDropdownItemChange",this.updateActiveItemOnChange)}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],href:[3,{},{reflect:!0}],iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{type:String},{reflect:!0}],label:1,rel:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],selectionMode:1,target:[3,{},{reflect:!0}]}}static{this.styles=q}async setFocus(e){return this.focusSetter(()=>this.el,e)}connectedCallback(){super.connectedCallback(),this.initialize()}load(){this.initialize()}onClick(){this.emitRequestedItem()}keyDownHandler(e){switch(e.key){case" ":case"Enter":this.emitRequestedItem(),this.href&&this.childLinkRef.value.click(),e.preventDefault();break;case"Escape":this.calciteInternalDropdownCloseRequest.emit(),e.preventDefault();break;case"Tab":this.calciteInternalDropdownItemKeyEvent.emit({keyboardEvent:e});break;case"ArrowUp":case"ArrowDown":case"Home":case"End":e.preventDefault(),this.calciteInternalDropdownItemKeyEvent.emit({keyboardEvent:e});break}}updateActiveItemOnChange(e){e.composedPath().includes(this.parentDropdownGroupEl)&&(this.requestedDropdownGroup=e.detail.requestedDropdownGroup,this.requestedDropdownItem=e.detail.requestedDropdownItem,this.determineActiveItem()),e.stopPropagation()}initialize(){this.parentDropdownGroupEl=this.el.closest("calcite-dropdown-group"),this.selectionMode==="none"&&(this.selected=!1)}determineActiveItem(){switch(this.selectionMode){case"multiple":this.el===this.requestedDropdownItem&&(this.selected=!this.selected);break;case"single":this.el===this.requestedDropdownItem?this.selected=!0:this.requestedDropdownGroup===this.parentDropdownGroupEl&&(this.selected=!1);break;case"none":this.selected=!1;break}}emitRequestedItem(){this.calciteDropdownItemSelect.emit(),this.calciteInternalDropdownItemSelect.emit({requestedDropdownItem:this.el,requestedDropdownGroup:this.parentDropdownGroupEl})}render(){let{href:e,selectionMode:c,label:h,iconFlipRtl:a}=this,p=i`<calcite-icon class=${o(t.iconStart)} .flipRtl=${a==="start"||a==="both"} .icon=${this.iconStart} .scale=${r(this.scale)}></calcite-icon>`,l=i`<span class=${o(t.itemContent)}><slot></slot></span>`,m=i`<calcite-icon class=${o(t.iconEnd)} .flipRtl=${a==="end"||a==="both"} .icon=${this.iconEnd} .scale=${r(this.scale)}></calcite-icon>`,u=this.iconStart&&this.iconEnd?[p,l,m]:this.iconStart?[p,l]:this.iconEnd?[l,m]:l,$=e?i`<a .ariaLabel=${h} class=${o(t.link)} href=${e??s} rel=${this.rel??s} tabindex=-1 target=${this.target??s} ${g(this.childLinkRef)}>${u}</a>`:u,C=e?null:c==="single"?"menuitemradio":c==="multiple"?"menuitemcheckbox":"menuitem",S=c!=="none"?I(this.selected):null,{disabled:f}=this;return this.el.ariaChecked=S,this.el.ariaLabel=e?"":h,this.el.role=C,k(this.el,"tabIndex",f?-1:0),this.interactiveContainer({disabled:f,children:i`<div class=${o({[t.container]:!0,[t.containerNone]:c==="none"})}>${c!=="none"?i`<calcite-icon class=${o(t.icon)} .icon=${E.check} .scale=${r(this.scale)}></calcite-icon>`:null}${$}</div>`})}};x("calcite-dropdown-item",d);export{d as DropdownItem};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.84 */
|
|
4
4
|
function v(r,t,n){if(!1)return;let e=u(r);return new e(t,n)}function u(r){class t extends window.MutationObserver{constructor(e){super(e),this.observedEntry=[],this.callback=e}observe(e,s){return this.observedEntry.push({target:e,options:s}),super.observe(e,s)}unobserve(e){let s=this.observedEntry.filter(i=>i.target!==e);this.observedEntry=[],this.callback(super.takeRecords(),this),this.disconnect(),s.forEach(i=>this.observe(i.target,i.options))}}return(function(){return r==="intersection"?window.IntersectionObserver:r==="mutation"?t:window.ResizeObserver})()}function b(r,t,n,e){if(r&&(t&&r.unobserve(t),!!n)){if(r instanceof MutationObserver){r.observe(n,e);return}r.observe(n)}}export{v as a,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{d as t}from"./
|
|
3
|
+
v5.0.0-next.84 */
|
|
4
|
+
import{d as t}from"./EDUBMLAP.js";import{a as y}from"./OA5PYYHO.js";import{a as v}from"./ABMY4SGK.js";import{a as B}from"./D3W7YIIT.js";import{a as k}from"./FXNAKQIO.js";import"./S7BIZAIK.js";import"./LJ2YG7C3.js";import"./U4ZCHG6H.js";import{e as w}from"./2OODGSZF.js";import"./FQMVJPE4.js";import{C as h,D as f,E as m,F as g,Q as $,g as u,h as d,l as b,p as a}from"./OD6UYLJ5.js";var A={backButton:"back-button"},C={backLeft:"chevron-left",backRight:"chevron-right"},o={actionBar:"action-bar",alerts:"alerts",contentTop:"content-top",contentBottom:"content-bottom",headerActionsStart:"header-actions-start",headerActionsEnd:"header-actions-end",headerMenuActions:"header-menu-actions",headerContent:"header-content",fab:"fab",footer:"footer",footerEnd:"footer-end",footerStart:"footer-start"},D=u`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([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:none;inline-size:100%;flex:1 1 auto;overflow:hidden}:host([selected]){display:flex}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}calcite-panel{--calcite-panel-background-color: var(--calcite-flow-background-color);--calcite-panel-border-color: var(--calcite-flow-border-color, var(--calcite-flow-item-header-border-block-end));--calcite-panel-corner-radius: var(--calcite-flow-corner-radius);--calcite-panel-description-text-color: var(--calcite-flow-description-text-color);--calcite-panel-footer-background-color: var(--calcite-flow-footer-background-color);--calcite-panel-footer-space: var(--calcite-flow-footer-space, var(--calcite-flow-item-footer-padding));--calcite-panel-header-action-background-color-hover: var(--calcite-flow-header-action-background-color-hover);--calcite-panel-header-action-background-color-press: var(--calcite-flow-header-action-background-color-press);--calcite-panel-header-action-background-color: var(--calcite-flow-header-action-background-color);--calcite-panel-header-action-indicator-color: var(--calcite-flow-header-action-indicator-color);--calcite-panel-header-action-text-color-press: var(--calcite-flow-header-action-text-color-press);--calcite-panel-header-action-text-color: var(--calcite-flow-header-action-text-color);--calcite-panel-header-background-color: var(--calcite-flow-header-background-color);--calcite-panel-header-content-space: var(--calcite-flow-header-content-space);--calcite-panel-heading-text-color: var(--calcite-flow-heading-text-color);--calcite-panel-icon-color: var(--calcite-flow-icon-color);--calcite-panel-space: var(--calcite-flow-space)}:host([hidden]){display:none}[hidden]{display:none}`,p=class extends m{constructor(){super(...arguments),this.backButtonRef=h(),this.containerRef=h(),this.messages=B(),this.focusSetter=k()(this),this.interactiveContainer=y(this),this.closable=!1,this.closed=!1,this.collapseDirection="down",this.collapsed=!1,this.collapsible=!1,this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.menuOpen=!1,this.overlayPositioning="absolute",this.scale="m",this.selected=!1,this.showBackButton=!1,this.topLayerDisabled=!1,this.calciteFlowItemBack=a(),this.calciteFlowItemClose=a({cancelable:!1}),this.calciteFlowItemCollapse=a({cancelable:!1}),this.calciteFlowItemExpand=a({cancelable:!1}),this.calciteFlowItemScroll=a({cancelable:!1}),this.calciteFlowItemToggle=a({cancelable:!1}),this.calciteInternalFlowItemChange=a({cancelable:!1})}static{this.properties={beforeBack:[0,{},{attribute:!1}],beforeClose:[0,{},{attribute:!1}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],collapseDirection:1,collapsed:[7,{},{reflect:!0,type:Boolean}],collapsible:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],icon:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],loading:[7,{},{reflect:!0,type:Boolean}],menuOpen:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],showBackButton:[5,{},{type:Boolean}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=D}async scrollContentTo(e){await this.containerRef.value?.scrollContentTo(e)}async setFocus(e){return this.focusSetter(()=>this.backButtonRef.value||this.containerRef.value,e)}willUpdate(e){e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.calciteInternalFlowItemChange.emit(),e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calciteFlowItemCollapse.emit():this.calciteFlowItemExpand.emit())}handleInternalPanelScroll(e){e.target===this.containerRef.value&&(e.stopPropagation(),this.calciteFlowItemScroll.emit())}handleInternalPanelClose(e){e.target===this.containerRef.value&&(e.stopPropagation(),this.closed=!0,this.calciteFlowItemClose.emit())}handleInternalPanelToggle(e){e.target===this.containerRef.value&&(e.stopPropagation(),this.collapsed=e.target.collapsed,this.calciteFlowItemToggle.emit())}backButtonClick(){this.calciteFlowItemBack.emit()}renderBackButton(){let{el:e}=this,i=w(e)==="rtl",{showBackButton:s,backButtonClick:n,messages:r}=this,l=r.back,c=i?C.backRight:C.backLeft;return s?v("flow-back-button",d`<calcite-action .ariaLabel=${l} class=${g(A.backButton)} .icon=${c} @click=${n} .scale=${this.scale} slot=${o.headerActionsStart} .text=${l} title=${l??b} ${f(this.backButtonRef)}></calcite-action>`):null}render(){let{collapsed:e,collapseDirection:i,collapsible:s,closable:n,closed:r,description:l,disabled:c,heading:S,headingLevel:I,loading:x,menuOpen:F,messages:R,overlayPositioning:P,beforeClose:L,icon:T,iconFlipRtl:E}=this;return this.interactiveContainer({disabled:c,children:d`<calcite-panel .beforeClose=${L} .closable=${n} .closed=${r} .collapseDirection=${i} .collapsed=${e} .collapsible=${s} .description=${l} .disabled=${c} .heading=${S} .headingLevel=${I} .icon=${T} .iconFlipRtl=${E} .loading=${x} .menuOpen=${F} .messageOverrides=${R} @calcitePanelClose=${this.handleInternalPanelClose} @calcitePanelScroll=${this.handleInternalPanelScroll} @calcitePanelToggle=${this.handleInternalPanelToggle} .overlayPositioning=${P} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled} ${f(this.containerRef)}>${this.renderBackButton()}<slot name=${o.actionBar} slot=${t.actionBar}></slot><slot name=${o.alerts} slot=${t.alerts}></slot><slot name=${o.headerActionsStart} slot=${t.headerActionsStart}></slot><slot name=${o.headerActionsEnd} slot=${t.headerActionsEnd}></slot><slot name=${o.headerContent} slot=${t.headerContent}></slot><slot name=${o.headerMenuActions} slot=${t.headerMenuActions}></slot><slot name=${o.fab} slot=${t.fab}></slot><slot name=${o.contentTop} slot=${t.contentTop}></slot><slot name=${o.contentBottom} slot=${t.contentBottom}></slot><slot name=${o.footerStart} slot=${t.footerStart}></slot><slot name=${o.footer} slot=${t.footer}></slot><slot name=${o.footerEnd} slot=${t.footerEnd}></slot><slot></slot></calcite-panel>`})}};$("calcite-flow-item",p);export{p as FlowItem};
|
|
@@ -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 A}from"./
|
|
3
|
+
v5.0.0-next.84 */
|
|
4
|
+
import{a as A}from"./AMQ26Q3F.js";import{c as b,d as y,e as v}from"./D653VBSC.js";import{a as g}from"./3XHBEPRS.js";import"./LK4GVUOR.js";import{a as x}from"./D3W7YIIT.js";import"./L325X7WP.js";import{a as f}from"./FXNAKQIO.js";import"./S7BIZAIK.js";import"./LJ2YG7C3.js";import"./U4ZCHG6H.js";import{u as m,y as o}from"./2OODGSZF.js";import"./FQMVJPE4.js";import{E as u,F as c,Q as h,g as p,h as s,p as i}from"./OD6UYLJ5.js";var w={actionGroupEnd:"action-group--end",container:"container"},G={expandTooltip:"expand-tooltip"},L=p`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([scale=s]){--calcite-internal-action-pad-gap: var(--calcite-action-pad-items-space, var(--calcite-spacing-xxs));--calcite-internal-action-pad-padding: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-action-pad-gap: var(--calcite-action-pad-items-space, var(--calcite-spacing-sm));--calcite-internal-action-pad-padding: var(--calcite-spacing-sm)}:host([scale=l]){--calcite-internal-action-pad-gap: var(--calcite-action-pad-items-space, var(--calcite-space-sm-plus));--calcite-internal-action-pad-padding: var(--calcite-spacing-sm-plus)}:host{display:block}@keyframes in{0%{opacity:0}to{opacity:1}}:host{animation:in var(--calcite-internal-animation-timing-slow) ease-in-out;border-radius:var(--calcite-action-pad-corner-radius, .125rem);background:transparent}:host([expanded][layout=vertical]) .container{max-inline-size:var(--calcite-action-pad-expanded-max-width, auto)}:host([layout=vertical]) ::slotted(calcite-action-group:not(:last-of-type)){border-block-end-width:1px;padding-block-end:var(--calcite-internal-action-pad-padding)}.container{display:inline-flex;flex-direction:column;overflow:hidden;--tw-shadow: 0 6px 20px -4px rgba(0, 0, 0, .1), 0 4px 12px -2px rgba(0, 0, 0, .08);--tw-shadow-colored: 0 6px 20px -4px var(--tw-shadow-color), 0 4px 12px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);border-radius:calc(var(--calcite-action-pad-corner-radius, .125rem) * 2);background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-1));gap:var(--calcite-internal-action-pad-gap);padding:var(--calcite-internal-action-pad-padding)}.action-group--bottom{flex-grow:1;justify-content:flex-end;padding-block-end:0px}:host([layout=horizontal]) .container{flex-direction:row}:host([layout=horizontal]) .container .action-group--bottom{padding:0}:host([layout=horizontal]) .container ::slotted(calcite-action-group:not(:last-of-type)){border-inline-end-width:1px;padding-inline-end:var(--calcite-internal-action-pad-padding)}:host([hidden]){display:none}[hidden]{display:none}`,l=class extends u{constructor(){super(),this.actions=[],this.mutationObserver=g("mutation",()=>this.mutationObserverHandler()),this.toggleExpand=()=>{this.expanded=!this.expanded,this.calciteActionPadToggle.emit()},this.messages=x(),this.focusSetter=f()(this),this.expandDisabled=!1,this.expanded=!1,this.layout="vertical",this.overlayPositioning="absolute",this.scale="m",this.selectionAppearance="neutral",this.topLayerDisabled=!1,this.calciteActionPadCollapse=i({cancelable:!1}),this.calciteActionPadExpand=i({cancelable:!1}),this.calciteActionPadToggle=i({cancelable:!1}),this.listen("calciteActionMenuOpen",this.actionMenuOpenHandler),this.listen("keydown",this.handleKeyDown)}static{this.properties={expandTooltip:[16,{},{state:!0}],actionsEndGroupLabel:1,expandDisabled:[7,{},{reflect:!0,type:Boolean}],expanded:[7,{},{reflect:!0,type:Boolean}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],position:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=L}async setFocus(t){return this.focusSetter(()=>this.el,t)}connectedCallback(){super.connectedCallback(),this.updateActions(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}async load(){A.deprecated("component",{component:this,name:"action-pad",removalVersion:5,suggested:"action-bar"})}willUpdate(t){t.has("expanded")&&this.hasUpdated&&y({el:this.el,expanded:this.expanded}),t.has("layout")&&(this.hasUpdated||this.layout!=="vertical")&&this.updateGroups(),t.has("expanded")&&this.hasUpdated&&(this.expanded?this.calciteActionPadExpand.emit():this.calciteActionPadCollapse.emit()),t.has("selectionAppearance")&&(this.hasUpdated||this.selectionAppearance!=="neutral")&&this.updateActions()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}actionMenuOpenHandler(t){if(t.target.menuOpen){let a=t.composedPath();this.actionGroups?.forEach(e=>{a.includes(e)||(e.menuOpen=!1)})}}updateGroups(){let t=Array.from(this.el.querySelectorAll("calcite-action-group"));this.actionGroups=t,this.setGroupLayout(t)}setGroupLayout(t){t.forEach(a=>a.layout=this.layout)}handleDefaultSlotChange(){this.updateGroups(),this.queryAndStoreActions(),this.updateActions()}handleTooltipSlotChange(t){let a=m(t).filter(e=>e?.matches("calcite-tooltip"));this.expandTooltip=a[0]}handleKeyDown(t){this.queryAndStoreActions();let a=this.actions.filter(n=>!n.disabled),e=document.activeElement;if(b(e))switch(t.key){case"ArrowRight":case"ArrowDown":o(a,e,"next",!0),t.preventDefault();break;case"ArrowLeft":case"ArrowUp":o(a,e,"previous",!0),t.preventDefault();break;case"Home":o(a,e,"first",!0),t.preventDefault();break;case"End":o(a,e,"last",!0),t.preventDefault();break;case"Tab":this.updateTabIndexOfItems(e);break}}updateActions(){this.actions.forEach(t=>{t.selectionAppearance=this.selectionAppearance})}updateTabIndexOfItems(t){this.actions.forEach(a=>{a.tabIndex=t!==a?-1:0})}queryAndStoreActions(){this.actions=Array.from(this.el.querySelectorAll("calcite-action"))}mutationObserverHandler(){this.updateGroups(),this.queryAndStoreActions(),this.updateActions()}renderBottomActionGroup(){let{expanded:t,expandDisabled:a,messages:e,el:n,position:E,toggleExpand:k,scale:r,layout:T,actionsEndGroupLabel:S,overlayPositioning:D}=this,d=a?null:v({collapseLabel:e.collapseLabel,collapseText:e.collapse,el:n,expandLabel:e.expandLabel,expandText:e.expand,expanded:t,position:E,scale:r,toggle:k,tooltip:this.expandTooltip});return d?s`<calcite-action-group class=${c(w.actionGroupEnd)} .label=${S} .layout=${T} .overlayPositioning=${D} .scale=${r} .topLayerDisabled=${this.topLayerDisabled}><slot name=${G.expandTooltip} @slotchange=${this.handleTooltipSlotChange}></slot>${d}</calcite-action-group>`:null}render(){return s`<div class=${c(w.container)}><slot @slotchange=${this.handleDefaultSlotChange}></slot>${this.renderBottomActionGroup()}</div>`}};h("calcite-action-pad",l);export{l as ActionPad};
|
|
@@ -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 l}from"./
|
|
3
|
+
v5.0.0-next.84 */
|
|
4
|
+
import{a as l}from"./ABMY4SGK.js";import{D as c,F as a,h,i as e,l as s}from"./OD6UYLJ5.js";var d={arrow:"calcite-floating-ui-arrow",arrowStroke:"calcite-floating-ui-arrow__stroke"},m={width:12,height:6,strokeWidth:1},S=({floatingLayout:w,key:g,ref:f})=>{let{width:t,height:r,strokeWidth:o}=m,i=t/2,$=w==="vertical",n=`M0,0 H${t} L${t-i},${r} Q${i},${r} ${i},${r} Z`;return l(g,h`<svg aria-hidden=true class=${a(d.arrow)} height=${t} viewBox=${`0 0 ${t} ${t+($?0:o)}`} width=${t+($?o:0)} ${c(f)}>${e`${e`<path class=${a(d.arrowStroke)} d=${n??s} fill=none stroke-width=${o+1} />`||""}<path d=${n??s} stroke=none />`}</svg>`)};export{S 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 c}from"./
|
|
3
|
+
v5.0.0-next.84 */
|
|
4
|
+
import{a as c}from"./7XVHEAGT.js";import{b as m}from"./HM7GKSVW.js";import"./ITSWEKRF.js";var u=n=>n.map(o=>{let{label:a}=o,t=m(a);return{...o,continent:t}});async function v(){let n=[],o=c.map(t=>({label:t})),a=u(o);for(let t of a){let{label:e,continent:l}=t;if(t.visited)continue;t.visited=!0;let i={label:l,tzs:[{label:e}]};for(let r of a.filter(s=>!s.visited)){let{label:s,continent:b}=r;if(l===b){let p={label:s};i.tzs.push(p),r.visited=!0}}n.push(i)}return n.map(t=>(t.tzs=t.tzs.sort((e,l)=>e.label.localeCompare(l.label)),{label:t.label,tzs:t.tzs.map(e=>e.label)})).sort((t,e)=>t.label.localeCompare(e.label))}export{v as groupByRegion};
|
|
@@ -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"./OJFOCOVP.js";import{a as p}from"./TFXFEHM5.js";import"./U73LX45D.js";import"./DFAA5C4F.js";import"./EMQJYA3U.js";import"./PHRNNGYG.js";import"./2NYT7OAC.js";import{E as l,F as t,J as s,Q as d,g as n,h as c,p as o}from"./2F2VMRPX.js";var r={container:"container",dividerContainer:"divider-container",divider:"divider"},h={trigger:"trigger"},e={chevronDown:"chevronDown",caretDown:"caretDown",ellipsis:"ellipsis",handleVertical:"handle-vertical"},b=n`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}:host([kind=brand]){--calcite-internal-split-button-divider-border-color: var(--calcite-color-brand);--calcite-internal-split-button-divider-color: var(--calcite-color-foreground-1)}:host([kind=danger]){--calcite-internal-split-button-divider-border-color: var(--calcite-color-status-danger);--calcite-internal-split-button-divider-color: var(--calcite-color-foreground-1)}:host([kind=neutral]){--calcite-internal-split-button-divider-border-color: var(--calcite-color-foreground-3);--calcite-internal-split-button-divider-color: var(--calcite-color-text-1)}:host([kind=inverse]){--calcite-internal-split-button-divider-border-color: var(--calcite-color-inverse);--calcite-internal-split-button-divider-color: var(--calcite-color-foreground-1)}:host([appearance=transparent]){--calcite-internal-split-button-divider-border-color: transparent}:host([appearance=transparent]):host([kind=brand]){--calcite-internal-split-button-divider-color: var(--calcite-color-brand)}:host([appearance=transparent]):host([kind=danger]){--calcite-internal-split-button-divider-color: var(--calcite-color-status-danger)}:host([appearance=transparent]):host([kind=neutral]){--calcite-internal-split-button-divider-color: var(--calcite-color-text-1)}:host([appearance=transparent]):host([kind=inverse]){--calcite-internal-split-button-divider-color: var(--calcite-color-foreground-1)}:host([appearance=outline]):host([kind=brand]),:host([appearance=outline]):host([kind=danger]),:host([appearance=outline]):host([kind=neutral]),:host([appearance=outline]):host([kind=inverse]){--calcite-internal-split-button-divider-border-color: transparent}:host([appearance=outline-fill]):host([kind=brand]),:host([appearance=outline-fill]):host([kind=danger]),:host([appearance=outline-fill]):host([kind=neutral]),:host([appearance=outline-fill]):host([kind=inverse]){--calcite-internal-split-button-divider-border-color: var(--calcite-color-background)}:host([appearance=outline]):host([kind=brand]),:host([appearance=outline-fill]):host([kind=brand]){--calcite-internal-split-button-divider-color: var(--calcite-color-brand)}:host([appearance=outline]):host([kind=danger]),:host([appearance=outline-fill]):host([kind=danger]){--calcite-internal-split-button-divider-color: var(--calcite-color-status-danger)}:host([appearance=outline]):host([kind=neutral]),:host([appearance=outline-fill]):host([kind=neutral]){--calcite-internal-split-button-divider-color: var(--calcite-color-border-1)}:host([appearance=outline]):host([kind=inverse]),:host([appearance=outline-fill]):host([kind=inverse]){--calcite-internal-split-button-divider-color: var(--calcite-color-inverse)}.container{display:flex;align-items:stretch}.container>calcite-dropdown>calcite-button{block-size:100%;vertical-align:top}.divider-container{display:flex;inline-size:1px;align-items:stretch;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;background-color:var(--calcite-split-button-divider-color, var(--calcite-internal-split-button-divider-border-color))}.divider{margin-block:.25rem;display:inline-block;inline-size:1px;background-color:var(--calcite-split-button-divider-border-color, var(--calcite-internal-split-button-divider-color))}:host([appearance=outline-fill]) .divider-container,:host([appearance=outline]) .divider-container{border-block:1px solid var(--calcite-internal-split-button-divider-color)}:host([appearance=outline-fill]):hover .divider-container,:host([appearance=outline]):hover .divider-container{background-color:var(--calcite-internal-split-button-divider-color)}:host([appearance=outline-fill]:hover) .divider-container,:host([appearance=outline]:hover) .divider-container{background-color:var(--calcite-internal-split-button-divider-color)}:host([appearance=outline-fill]:focus-within):host([kind=brand]),:host([appearance=outline]:focus-within):host([kind=brand]){--calcite-internal-split-button-divider-color: var(--calcite-color-brand-press)}:host([appearance=outline-fill]:focus-within):host([kind=danger]),:host([appearance=outline]:focus-within):host([kind=danger]){--calcite-internal-split-button-divider-color: var(--calcite-color-danger-press)}:host([appearance=outline-fill]:focus-within) .divider-container,:host([appearance=outline]:focus-within) .divider-container{background-color:var(--calcite-internal-split-button-divider-color)}calcite-button[split-child=primary],calcite-button[split-child=secondary]{--calcite-button-background-color: var(--calcite-split-button-background-color);--calcite-button-border-color: var(--calcite-split-button-border-color);--calcite-button-text-color: var(--calcite-split-button-text-color);--calcite-button-icon-color: var(--calcite-split-button-icon-color);--calcite-button-loading-color: var(--calcite-split-button-loading-color);--calcite-button-shadow: var(--calcite-split-button-shadow)}calcite-button[split-child=primary]:hover,calcite-button[split-child=secondary]:hover{--calcite-button-background-color: var(--calcite-split-button-background-color-hover)}calcite-button[split-child=primary]:focus,calcite-button[split-child=secondary]:focus{--calcite-button-background-color: var(--calcite-split-button-background-color-focus)}calcite-button[split-child=primary]:active,calcite-button[split-child=secondary]:active{--calcite-button-background-color: var(--calcite-split-button-background-color-press)}calcite-button[split-child=primary]{--calcite-button-corner-radius: var(--calcite-split-button-corner-radius) var(--calcite-corner-radius-none) var(--calcite-corner-radius-none) var(--calcite-split-button-corner-radius)}calcite-button[split-child=secondary]{--calcite-button-corner-radius: var(--calcite-corner-radius-none) var(--calcite-split-button-corner-radius) var(--calcite-split-button-corner-radius) var(--calcite-corner-radius-none)}calcite-dropdown{--calcite-dropdown-shadow: var(--calcite-split-button-dropdown-shadow);--calcite-dropdown-background-color: var(--calcite-split-button-dropdown-background-color);--calcite-dropdown-width: var(--calcite-split-button-dropdown-width)}:host([disabled]) calcite-dropdown>calcite-button{pointer-events:none}:host([disabled]):host([appearance=outline-fill]) .divider-container{background-color:var(--calcite-color-background)}:host([disabled]):host([appearance=outline]) .divider-container{background-color:transparent}: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 l{constructor(){super(...arguments),this.focusSetter=p()(this),this.interactiveContainer=u(this),this.active=!1,this.appearance="solid",this.disabled=!1,this.download=!1,this.dropdownIconType="chevron",this.kind="brand",this.loading=!1,this.overlayPositioning="absolute",this.placement="bottom-end",this.scale="m",this.topLayerDisabled=!1,this.width="auto",this.calciteSplitButtonPrimaryClick=o({cancelable:!1}),this.calciteSplitButtonSecondaryClick=o({cancelable:!1})}static{this.properties={active:[7,{},{reflect:!0,type:Boolean}],appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],download:[3,{converter:s},{reflect:!0}],dropdownIconType:[3,{},{reflect:!0}],dropdownLabel:[3,{},{reflect:!0}],flipPlacements:[0,{},{attribute:!1}],href:[3,{},{reflect:!0}],kind:[3,{},{reflect:!0}],loading:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],rel:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],primaryIconEnd:[3,{type:String},{reflect:!0}],primaryIconFlipRtl:[3,{},{reflect:!0}],primaryIconStart:[3,{type:String},{reflect:!0}],primaryLabel:[3,{},{reflect:!0}],primaryText:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],target:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],width:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=b}get dropdownIcon(){return this.dropdownIconType==="chevron"?e.chevronDown:this.dropdownIconType==="caret"?e.caretDown:this.dropdownIconType==="ellipsis"?e.ellipsis:e.handleVertical}async setFocus(i){return this.focusSetter(()=>this.el,i)}calciteSplitButtonPrimaryClickHandler(){this.calciteSplitButtonPrimaryClick.emit()}calciteSplitButtonSecondaryClickHandler(){this.calciteSplitButtonSecondaryClick.emit()}render(){let i=this.width==="auto"?"auto":"full";return this.interactiveContainer({disabled:this.disabled,children:c`<div class=${t(r.container)}><calcite-button .appearance=${this.appearance} .disabled=${this.disabled} .download=${this.download} .href=${this.href} .iconEnd=${this.primaryIconEnd?this.primaryIconEnd:null} .iconFlipRtl=${this.primaryIconFlipRtl?this.primaryIconFlipRtl:null} .iconStart=${this.primaryIconStart?this.primaryIconStart:null} .kind=${this.kind} .label=${this.primaryLabel} .loading=${this.loading} @click=${this.calciteSplitButtonPrimaryClickHandler} .rel=${this.rel} .scale=${this.scale} split-child=primary .target=${this.target} type=button .width=${i}>${this.primaryText}</calcite-button><div class=${t(r.dividerContainer)}><div class=${t(r.divider)}></div></div><calcite-dropdown .disabled=${this.disabled} .flipPlacements=${this.flipPlacements} @click=${this.calciteSplitButtonSecondaryClickHandler} .open=${this.active} .overlayPositioning=${this.overlayPositioning} .placement=${this.placement} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled} .widthScale=${this.scale}><calcite-button .appearance=${this.appearance} .disabled=${this.disabled} .iconStart=${this.dropdownIcon} .kind=${this.kind} .label=${this.dropdownLabel} .scale=${this.scale} slot=${h.trigger} split-child=secondary type=button></calcite-button><slot></slot></calcite-dropdown></div>`})}};d("calcite-split-button",a);export{a as SplitButton};
|
|
3
|
+
v5.0.0-next.84 */
|
|
4
|
+
import{a as u}from"./OA5PYYHO.js";import{a as p}from"./FXNAKQIO.js";import"./S7BIZAIK.js";import"./LJ2YG7C3.js";import"./U4ZCHG6H.js";import"./2OODGSZF.js";import"./FQMVJPE4.js";import{E as l,F as t,J as s,Q as d,g as n,h as c,p as o}from"./OD6UYLJ5.js";var r={container:"container",dividerContainer:"divider-container",divider:"divider"},h={trigger:"trigger"},e={chevronDown:"chevronDown",caretDown:"caretDown",ellipsis:"ellipsis",handleVertical:"handle-vertical"},b=n`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}:host([kind=brand]){--calcite-internal-split-button-divider-border-color: var(--calcite-color-brand);--calcite-internal-split-button-divider-color: var(--calcite-color-foreground-1)}:host([kind=danger]){--calcite-internal-split-button-divider-border-color: var(--calcite-color-status-danger);--calcite-internal-split-button-divider-color: var(--calcite-color-foreground-1)}:host([kind=neutral]){--calcite-internal-split-button-divider-border-color: var(--calcite-color-foreground-3);--calcite-internal-split-button-divider-color: var(--calcite-color-text-1)}:host([kind=inverse]){--calcite-internal-split-button-divider-border-color: var(--calcite-color-inverse);--calcite-internal-split-button-divider-color: var(--calcite-color-foreground-1)}:host([appearance=transparent]){--calcite-internal-split-button-divider-border-color: transparent}:host([appearance=transparent]):host([kind=brand]){--calcite-internal-split-button-divider-color: var(--calcite-color-brand)}:host([appearance=transparent]):host([kind=danger]){--calcite-internal-split-button-divider-color: var(--calcite-color-status-danger)}:host([appearance=transparent]):host([kind=neutral]){--calcite-internal-split-button-divider-color: var(--calcite-color-text-1)}:host([appearance=transparent]):host([kind=inverse]){--calcite-internal-split-button-divider-color: var(--calcite-color-foreground-1)}:host([appearance=outline]):host([kind=brand]),:host([appearance=outline]):host([kind=danger]),:host([appearance=outline]):host([kind=neutral]),:host([appearance=outline]):host([kind=inverse]){--calcite-internal-split-button-divider-border-color: transparent}:host([appearance=outline-fill]):host([kind=brand]),:host([appearance=outline-fill]):host([kind=danger]),:host([appearance=outline-fill]):host([kind=neutral]),:host([appearance=outline-fill]):host([kind=inverse]){--calcite-internal-split-button-divider-border-color: var(--calcite-color-background)}:host([appearance=outline]):host([kind=brand]),:host([appearance=outline-fill]):host([kind=brand]){--calcite-internal-split-button-divider-color: var(--calcite-color-brand)}:host([appearance=outline]):host([kind=danger]),:host([appearance=outline-fill]):host([kind=danger]){--calcite-internal-split-button-divider-color: var(--calcite-color-status-danger)}:host([appearance=outline]):host([kind=neutral]),:host([appearance=outline-fill]):host([kind=neutral]){--calcite-internal-split-button-divider-color: var(--calcite-color-border-1)}:host([appearance=outline]):host([kind=inverse]),:host([appearance=outline-fill]):host([kind=inverse]){--calcite-internal-split-button-divider-color: var(--calcite-color-inverse)}.container{display:flex;align-items:stretch}.container>calcite-dropdown>calcite-button{block-size:100%;vertical-align:top}.divider-container{display:flex;inline-size:1px;align-items:stretch;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;background-color:var(--calcite-split-button-divider-color, var(--calcite-internal-split-button-divider-border-color))}.divider{margin-block:.25rem;display:inline-block;inline-size:1px;background-color:var(--calcite-split-button-divider-border-color, var(--calcite-internal-split-button-divider-color))}:host([appearance=outline-fill]) .divider-container,:host([appearance=outline]) .divider-container{border-block:1px solid var(--calcite-internal-split-button-divider-color)}:host([appearance=outline-fill]):hover .divider-container,:host([appearance=outline]):hover .divider-container{background-color:var(--calcite-internal-split-button-divider-color)}:host([appearance=outline-fill]:hover) .divider-container,:host([appearance=outline]:hover) .divider-container{background-color:var(--calcite-internal-split-button-divider-color)}:host([appearance=outline-fill]:focus-within):host([kind=brand]),:host([appearance=outline]:focus-within):host([kind=brand]){--calcite-internal-split-button-divider-color: var(--calcite-color-brand-press)}:host([appearance=outline-fill]:focus-within):host([kind=danger]),:host([appearance=outline]:focus-within):host([kind=danger]){--calcite-internal-split-button-divider-color: var(--calcite-color-danger-press)}:host([appearance=outline-fill]:focus-within) .divider-container,:host([appearance=outline]:focus-within) .divider-container{background-color:var(--calcite-internal-split-button-divider-color)}calcite-button[split-child=primary],calcite-button[split-child=secondary]{--calcite-button-background-color: var(--calcite-split-button-background-color);--calcite-button-border-color: var(--calcite-split-button-border-color);--calcite-button-text-color: var(--calcite-split-button-text-color);--calcite-button-icon-color: var(--calcite-split-button-icon-color);--calcite-button-loading-color: var(--calcite-split-button-loading-color);--calcite-button-shadow: var(--calcite-split-button-shadow)}calcite-button[split-child=primary]:hover,calcite-button[split-child=secondary]:hover{--calcite-button-background-color: var(--calcite-split-button-background-color-hover)}calcite-button[split-child=primary]:focus,calcite-button[split-child=secondary]:focus{--calcite-button-background-color: var(--calcite-split-button-background-color-focus)}calcite-button[split-child=primary]:active,calcite-button[split-child=secondary]:active{--calcite-button-background-color: var(--calcite-split-button-background-color-press)}calcite-button[split-child=primary]{--calcite-button-corner-radius: var(--calcite-split-button-corner-radius) var(--calcite-corner-radius-none) var(--calcite-corner-radius-none) var(--calcite-split-button-corner-radius)}calcite-button[split-child=secondary]{--calcite-button-corner-radius: var(--calcite-corner-radius-none) var(--calcite-split-button-corner-radius) var(--calcite-split-button-corner-radius) var(--calcite-corner-radius-none)}calcite-dropdown{--calcite-dropdown-shadow: var(--calcite-split-button-dropdown-shadow);--calcite-dropdown-background-color: var(--calcite-split-button-dropdown-background-color);--calcite-dropdown-width: var(--calcite-split-button-dropdown-width)}:host([disabled]) calcite-dropdown>calcite-button{pointer-events:none}:host([disabled]):host([appearance=outline-fill]) .divider-container{background-color:var(--calcite-color-background)}:host([disabled]):host([appearance=outline]) .divider-container{background-color:transparent}: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 l{constructor(){super(...arguments),this.focusSetter=p()(this),this.interactiveContainer=u(this),this.active=!1,this.appearance="solid",this.disabled=!1,this.download=!1,this.dropdownIconType="chevron",this.kind="brand",this.loading=!1,this.overlayPositioning="absolute",this.placement="bottom-end",this.scale="m",this.topLayerDisabled=!1,this.width="auto",this.calciteSplitButtonPrimaryClick=o({cancelable:!1}),this.calciteSplitButtonSecondaryClick=o({cancelable:!1})}static{this.properties={active:[7,{},{reflect:!0,type:Boolean}],appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],download:[3,{converter:s},{reflect:!0}],dropdownIconType:[3,{},{reflect:!0}],dropdownLabel:[3,{},{reflect:!0}],flipPlacements:[0,{},{attribute:!1}],href:[3,{},{reflect:!0}],kind:[3,{},{reflect:!0}],loading:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],rel:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],primaryIconEnd:[3,{type:String},{reflect:!0}],primaryIconFlipRtl:[3,{},{reflect:!0}],primaryIconStart:[3,{type:String},{reflect:!0}],primaryLabel:[3,{},{reflect:!0}],primaryText:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],target:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],width:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=b}get dropdownIcon(){return this.dropdownIconType==="chevron"?e.chevronDown:this.dropdownIconType==="caret"?e.caretDown:this.dropdownIconType==="ellipsis"?e.ellipsis:e.handleVertical}async setFocus(i){return this.focusSetter(()=>this.el,i)}calciteSplitButtonPrimaryClickHandler(){this.calciteSplitButtonPrimaryClick.emit()}calciteSplitButtonSecondaryClickHandler(){this.calciteSplitButtonSecondaryClick.emit()}render(){let i=this.width==="auto"?"auto":"full";return this.interactiveContainer({disabled:this.disabled,children:c`<div class=${t(r.container)}><calcite-button .appearance=${this.appearance} .disabled=${this.disabled} .download=${this.download} .href=${this.href} .iconEnd=${this.primaryIconEnd?this.primaryIconEnd:null} .iconFlipRtl=${this.primaryIconFlipRtl?this.primaryIconFlipRtl:null} .iconStart=${this.primaryIconStart?this.primaryIconStart:null} .kind=${this.kind} .label=${this.primaryLabel} .loading=${this.loading} @click=${this.calciteSplitButtonPrimaryClickHandler} .rel=${this.rel} .scale=${this.scale} split-child=primary .target=${this.target} type=button .width=${i}>${this.primaryText}</calcite-button><div class=${t(r.dividerContainer)}><div class=${t(r.divider)}></div></div><calcite-dropdown .disabled=${this.disabled} .flipPlacements=${this.flipPlacements} @click=${this.calciteSplitButtonSecondaryClickHandler} .open=${this.active} .overlayPositioning=${this.overlayPositioning} .placement=${this.placement} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled} .widthScale=${this.scale}><calcite-button .appearance=${this.appearance} .disabled=${this.disabled} .iconStart=${this.dropdownIcon} .kind=${this.kind} .label=${this.dropdownLabel} .scale=${this.scale} slot=${h.trigger} split-child=secondary type=button></calcite-button><slot></slot></calcite-dropdown></div>`})}};d("calcite-split-button",a);export{a as SplitButton};
|
|
@@ -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.84 */
|
|
4
|
+
import{a as u}from"./OA5PYYHO.js";import{a as f}from"./FXNAKQIO.js";import"./S7BIZAIK.js";import"./LJ2YG7C3.js";import"./U4ZCHG6H.js";import{u as m,y as l}from"./2OODGSZF.js";import"./FQMVJPE4.js";import{C as r,D as h,E as d,Q as p,g as c,h as o,p as n}from"./OD6UYLJ5.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,5 +1,5 @@
|
|
|
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{b as oe}from"./
|
|
3
|
+
v5.0.0-next.84 */
|
|
4
|
+
import{b as oe}from"./LJ2YG7C3.js";import{a as ne,l as ie}from"./2OODGSZF.js";import{O as re}from"./OD6UYLJ5.js";var se=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],B=se.join(","),ce=typeof Element>"u",D=ce?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,j=!ce&&Element.prototype.getRootNode?function(a){var e;return a==null||(e=a.getRootNode)===null||e===void 0?void 0:e.call(a)}:function(a){return a?.ownerDocument},K=function a(e,t){var r;t===void 0&&(t=!0);var u=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),s=u===""||u==="true",n=s||t&&e&&a(e.parentNode);return n},Se=function(e){var t,r=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return r===""||r==="true"},le=function(e,t,r){if(K(e))return[];var u=Array.prototype.slice.apply(e.querySelectorAll(B));return t&&D.call(e,B)&&u.unshift(e),u=u.filter(r),u},fe=function a(e,t,r){for(var u=[],s=Array.from(e);s.length;){var n=s.shift();if(!K(n,!1))if(n.tagName==="SLOT"){var d=n.assignedElements(),l=d.length?d:n.children,y=a(l,!0,r);r.flatten?u.push.apply(u,y):u.push({scopeParent:n,candidates:y})}else{var T=D.call(n,B);T&&r.filter(n)&&(t||!e.includes(n))&&u.push(n);var w=n.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(n),S=!K(w,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(n));if(w&&S){var C=a(w===!0?n.children:w.children,!0,r);r.flatten?u.push.apply(u,C):u.push({scopeParent:n,candidates:C})}else s.unshift.apply(s,n.children)}}return u},de=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},E=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Se(e))&&!de(e)?0:e.tabIndex},ke=function(e,t){var r=E(e);return r<0&&t&&!de(e)?0:r},De=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},ve=function(e){return e.tagName==="INPUT"},Re=function(e){return ve(e)&&e.type==="hidden"},Ce=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return t},Oe=function(e,t){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===t)return e[r]},Ae=function(e){if(!e.name)return!0;var t=e.form||j(e),r=function(d){return t.querySelectorAll('input[type="radio"][name="'+d+'"]')},u;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")u=r(window.CSS.escape(e.name));else try{u=r(e.name)}catch(n){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",n.message),!1}var s=Oe(u,e.form);return!s||s===e},Ie=function(e){return ve(e)&&e.type==="radio"},Pe=function(e){return Ie(e)&&!Ae(e)},xe=function(e){var t,r=e&&j(e),u=(t=r)===null||t===void 0?void 0:t.host,s=!1;if(r&&r!==e){var n,d,l;for(s=!!((n=u)!==null&&n!==void 0&&(d=n.ownerDocument)!==null&&d!==void 0&&d.contains(u)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!s&&u;){var y,T,w;r=j(u),u=(y=r)===null||y===void 0?void 0:y.host,s=!!((T=u)!==null&&T!==void 0&&(w=T.ownerDocument)!==null&&w!==void 0&&w.contains(u))}}return s},ue=function(e){var t=e.getBoundingClientRect(),r=t.width,u=t.height;return r===0&&u===0},Le=function(e,t){var r=t.displayCheck,u=t.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var s=D.call(e,"details>summary:first-of-type"),n=s?e.parentElement:e;if(D.call(n,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof u=="function"){for(var d=e;e;){var l=e.parentElement,y=j(e);if(l&&!l.shadowRoot&&u(l)===!0)return ue(e);e.assignedSlot?e=e.assignedSlot:!l&&y!==e.ownerDocument?e=y.host:e=l}e=d}if(xe(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return ue(e);return!1},Be=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var r=0;r<t.children.length;r++){var u=t.children.item(r);if(u.tagName==="LEGEND")return D.call(t,"fieldset[disabled] *")?!0:!u.contains(e)}return!0}t=t.parentElement}return!1},M=function(e,t){return!(t.disabled||K(t)||Re(t)||Le(t,e)||Ce(t)||Be(t))},$=function(e,t){return!(Pe(t)||E(t)<0||!M(e,t))},je=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Ke=function a(e){var t=[],r=[];return e.forEach(function(u,s){var n=!!u.scopeParent,d=n?u.scopeParent:u,l=ke(d,n),y=n?a(u.candidates):d;l===0?n?t.push.apply(t,y):t.push(d):r.push({documentOrder:s,tabIndex:l,item:u,isScope:n,content:y})}),r.sort(De).reduce(function(u,s){return s.isScope?u.push.apply(u,s.content):u.push(s.content),u},[]).concat(t)},be=function(e,t){t=t||{};var r;return t.getShadowRoot?r=fe([e],t.includeContainer,{filter:$.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:je}):r=le(e,t.includeContainer,$.bind(null,t)),Ke(r)},he=function(e,t){t=t||{};var r;return t.getShadowRoot?r=fe([e],t.includeContainer,{filter:M.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):r=le(e,t.includeContainer,M.bind(null,t)),r},R=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return D.call(e,B)===!1?!1:$(t,e)},Me=se.concat("iframe").join(","),G=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return D.call(e,Me)===!1?!1:M(t,e)};function Y(a,e){(e==null||e>a.length)&&(e=a.length);for(var t=0,r=Array(e);t<e;t++)r[t]=a[t];return r}function Ge(a){if(Array.isArray(a))return Y(a)}function _e(a,e,t){return(e=$e(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function qe(a){if(typeof Symbol<"u"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function Ve(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
5
5
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pe(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(a);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(a,u).enumerable})),t.push.apply(t,r)}return t}function ye(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?pe(Object(t),!0).forEach(function(r){_e(a,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):pe(Object(t)).forEach(function(r){Object.defineProperty(a,r,Object.getOwnPropertyDescriptor(t,r))})}return a}function Ue(a){return Ge(a)||qe(a)||Ye(a)||Ve()}function We(a,e){if(typeof a!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var r=t.call(a,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function $e(a){var e=We(a,"string");return typeof e=="symbol"?e:e+""}function Ye(a,e){if(a){if(typeof a=="string")return Y(a,e);var t={}.toString.call(a).slice(8,-1);return t==="Object"&&a.constructor&&(t=a.constructor.name),t==="Map"||t==="Set"?Array.from(a):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Y(a,e):void 0}}var ge={activateTrap:function(e,t){if(e.length>0){var r=e[e.length-1];r!==t&&r._setPausedState(!0)}var u=e.indexOf(t);u===-1||e.splice(u,1),e.push(t)},deactivateTrap:function(e,t){var r=e.indexOf(t);r!==-1&&e.splice(r,1),e.length>0&&!e[e.length-1]._isManuallyPaused()&&e[e.length-1]._setPausedState(!1)}},Ze=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},ze=function(e){return e?.key==="Escape"||e?.key==="Esc"||e?.keyCode===27},x=function(e){return e?.key==="Tab"||e?.keyCode===9},Xe=function(e){return x(e)&&!e.shiftKey},He=function(e){return x(e)&&e.shiftKey},me=function(e){return setTimeout(e,0)},P=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),u=1;u<t;u++)r[u-1]=arguments[u];return typeof e=="function"?e.apply(void 0,r):e},_=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},Je=[],we=function(e,t){var r=t?.document||document,u=t?.trapStack||Je,s=ye({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:Xe,isKeyBackward:He},t),n={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},d,l=function(i,o,c){return i&&i[o]!==void 0?i[o]:s[c||o]},y=function(i,o){var c=typeof o?.composedPath=="function"?o.composedPath():void 0;return n.containerGroups.findIndex(function(v){var b=v.container,p=v.tabbableNodes;return b.contains(i)||c?.includes(b)||p.find(function(f){return f===i})})},T=function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=o.hasFallback,v=c===void 0?!1:c,b=o.params,p=b===void 0?[]:b,f=s[i];if(typeof f=="function"&&(f=f.apply(void 0,Ue(p))),f===!0&&(f=void 0),!f){if(f===void 0||f===!1)return f;throw new Error("`".concat(i,"` was specified but was not a node, or did not return a node"))}var g=f;if(typeof f=="string"){try{g=r.querySelector(f)}catch(m){throw new Error("`".concat(i,'` appears to be an invalid selector; error="').concat(m.message,'"'))}if(!g&&!v)throw new Error("`".concat(i,"` as selector refers to no known node"))}return g},w=function(){var i=T("initialFocus",{hasFallback:!0});if(i===!1)return!1;if(i===void 0||i&&!G(i,s.tabbableOptions))if(y(r.activeElement)>=0)i=r.activeElement;else{var o=n.tabbableGroups[0],c=o&&o.firstTabbableNode;i=c||T("fallbackFocus")}else i===null&&(i=T("fallbackFocus"));if(!i)throw new Error("Your focus-trap needs to have at least one focusable element");return i},S=function(){if(n.containerGroups=n.containers.map(function(i){var o=be(i,s.tabbableOptions),c=he(i,s.tabbableOptions),v=o.length>0?o[0]:void 0,b=o.length>0?o[o.length-1]:void 0,p=c.find(function(m){return R(m)}),f=c.slice().reverse().find(function(m){return R(m)}),g=!!o.find(function(m){return E(m)>0});return{container:i,tabbableNodes:o,focusableNodes:c,posTabIndexesFound:g,firstTabbableNode:v,lastTabbableNode:b,firstDomTabbableNode:p,lastDomTabbableNode:f,nextTabbableNode:function(k){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,N=o.indexOf(k);return N<0?A?c.slice(c.indexOf(k)+1).find(function(I){return R(I)}):c.slice(0,c.indexOf(k)).reverse().find(function(I){return R(I)}):o[N+(A?1:-1)]}}}),n.tabbableGroups=n.containerGroups.filter(function(i){return i.tabbableNodes.length>0}),n.tabbableGroups.length<=0&&!T("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(n.containerGroups.find(function(i){return i.posTabIndexesFound})&&n.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},C=function(i){var o=i.activeElement;if(o)return o.shadowRoot&&o.shadowRoot.activeElement!==null?C(o.shadowRoot):o},F=function(i){if(i!==!1&&i!==C(document)){if(!i||!i.focus){F(w());return}i.focus({preventScroll:!!s.preventScroll}),n.mostRecentlyFocusedNode=i,Ze(i)&&i.select()}},Z=function(i){var o=T("setReturnFocus",{params:[i]});return o||(o===!1?!1:i)},z=function(i){var o=i.target,c=i.event,v=i.isBackward,b=v===void 0?!1:v;o=o||_(c),S();var p=null;if(n.tabbableGroups.length>0){var f=y(o,c),g=f>=0?n.containerGroups[f]:void 0;if(f<0)b?p=n.tabbableGroups[n.tabbableGroups.length-1].lastTabbableNode:p=n.tabbableGroups[0].firstTabbableNode;else if(b){var m=n.tabbableGroups.findIndex(function(U){var W=U.firstTabbableNode;return o===W});if(m<0&&(g.container===o||G(o,s.tabbableOptions)&&!R(o,s.tabbableOptions)&&!g.nextTabbableNode(o,!1))&&(m=f),m>=0){var k=m===0?n.tabbableGroups.length-1:m-1,A=n.tabbableGroups[k];p=E(o)>=0?A.lastTabbableNode:A.lastDomTabbableNode}else x(c)||(p=g.nextTabbableNode(o,!1))}else{var N=n.tabbableGroups.findIndex(function(U){var W=U.lastTabbableNode;return o===W});if(N<0&&(g.container===o||G(o,s.tabbableOptions)&&!R(o,s.tabbableOptions)&&!g.nextTabbableNode(o))&&(N=f),N>=0){var I=N===n.tabbableGroups.length-1?0:N+1,ae=n.tabbableGroups[I];p=E(o)>=0?ae.firstTabbableNode:ae.firstDomTabbableNode}else x(c)||(p=g.nextTabbableNode(o))}}else p=T("fallbackFocus");return p},L=function(i){var o=_(i);if(!(y(o,i)>=0)){if(P(s.clickOutsideDeactivates,i)){d.deactivate({returnFocus:s.returnFocusOnDeactivate});return}P(s.allowOutsideClick,i)||i.preventDefault()}},X=function(i){var o=_(i),c=y(o,i)>=0;if(c||o instanceof Document)c&&(n.mostRecentlyFocusedNode=o);else{i.stopImmediatePropagation();var v,b=!0;if(n.mostRecentlyFocusedNode)if(E(n.mostRecentlyFocusedNode)>0){var p=y(n.mostRecentlyFocusedNode),f=n.containerGroups[p].tabbableNodes;if(f.length>0){var g=f.findIndex(function(m){return m===n.mostRecentlyFocusedNode});g>=0&&(s.isKeyForward(n.recentNavEvent)?g+1<f.length&&(v=f[g+1],b=!1):g-1>=0&&(v=f[g-1],b=!1))}}else n.containerGroups.some(function(m){return m.tabbableNodes.some(function(k){return E(k)>0})})||(b=!1);else b=!1;b&&(v=z({target:n.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(n.recentNavEvent)})),F(v||n.mostRecentlyFocusedNode||w())}n.recentNavEvent=void 0},Ne=function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;n.recentNavEvent=i;var c=z({event:i,isBackward:o});c&&(x(i)&&i.preventDefault(),F(c))},H=function(i){(s.isKeyForward(i)||s.isKeyBackward(i))&&Ne(i,s.isKeyBackward(i))},J=function(i){ze(i)&&P(s.escapeDeactivates,i)!==!1&&(i.preventDefault(),d.deactivate())},Q=function(i){var o=_(i);y(o,i)>=0||P(s.clickOutsideDeactivates,i)||P(s.allowOutsideClick,i)||(i.preventDefault(),i.stopImmediatePropagation())},ee=function(){if(n.active)return ge.activateTrap(u,d),n.delayInitialFocusTimer=s.delayInitialFocus?me(function(){F(w())}):F(w()),r.addEventListener("focusin",X,!0),r.addEventListener("mousedown",L,{capture:!0,passive:!1}),r.addEventListener("touchstart",L,{capture:!0,passive:!1}),r.addEventListener("click",Q,{capture:!0,passive:!1}),r.addEventListener("keydown",H,{capture:!0,passive:!1}),r.addEventListener("keydown",J),d},te=function(){if(n.active)return r.removeEventListener("focusin",X,!0),r.removeEventListener("mousedown",L,!0),r.removeEventListener("touchstart",L,!0),r.removeEventListener("click",Q,!0),r.removeEventListener("keydown",H,!0),r.removeEventListener("keydown",J),d},Ee=function(i){var o=i.some(function(c){var v=Array.from(c.removedNodes);return v.some(function(b){return b===n.mostRecentlyFocusedNode})});o&&F(w())},V=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(Ee):void 0,O=function(){V&&(V.disconnect(),n.active&&!n.paused&&n.containers.map(function(i){V.observe(i,{subtree:!0,childList:!0})}))};return d={get active(){return n.active},get paused(){return n.paused},activate:function(i){if(n.active)return this;var o=l(i,"onActivate"),c=l(i,"onPostActivate"),v=l(i,"checkCanFocusTrap");v||S(),n.active=!0,n.paused=!1,n.nodeFocusedBeforeActivation=C(r),o?.();var b=function(){v&&S(),ee(),O(),c?.()};return v?(v(n.containers.concat()).then(b,b),this):(b(),this)},deactivate:function(i){if(!n.active)return this;var o=ye({onDeactivate:s.onDeactivate,onPostDeactivate:s.onPostDeactivate,checkCanReturnFocus:s.checkCanReturnFocus},i);clearTimeout(n.delayInitialFocusTimer),n.delayInitialFocusTimer=void 0,te(),n.active=!1,n.paused=!1,O(),ge.deactivateTrap(u,d);var c=l(o,"onDeactivate"),v=l(o,"onPostDeactivate"),b=l(o,"checkCanReturnFocus"),p=l(o,"returnFocus","returnFocusOnDeactivate");c?.();var f=function(){me(function(){p&&F(Z(n.nodeFocusedBeforeActivation)),v?.()})};return p&&b?(b(Z(n.nodeFocusedBeforeActivation)).then(f,f),this):(f(),this)},pause:function(i){return n.active?(n.manuallyPaused=!0,this._setPausedState(!0,i)):this},unpause:function(i){return n.active?(n.manuallyPaused=!1,u[u.length-1]!==this?this:this._setPausedState(!1,i)):this},updateContainerElements:function(i){var o=[].concat(i).filter(Boolean);return n.containers=o.map(function(c){return typeof c=="string"?r.querySelector(c):c}),n.active&&S(),O(),this}},Object.defineProperties(d,{_isManuallyPaused:{value:function(){return n.manuallyPaused}},_setPausedState:{value:function(i,o){if(n.paused===i)return this;if(n.paused=i,i){var c=l(o,"onPause"),v=l(o,"onPostPause");c?.(),te(),O(),v?.()}else{var b=l(o,"onUnpause"),p=l(o,"onPostUnpause");b?.(),S(),ee(),O(),p?.()}return this}}}),d.updateContainerElements(e),d};function Te(a,{focusTrapOptions:e},t){return!e?.extraContainers&&!t?a:[a,...Fe(e?.extraContainers),...Fe(t)]}function Fe(a=[]){return Array.isArray(a)?a:[a]}var q=new WeakSet;function Qe(a,e){let t=e&&e!==document.body&&e!==document.documentElement;return!q.has(a)&&t&&ie(e),!1}function et(a,e){let t=e?.fallbackFocus||a,r=e?.clickOutsideDeactivates??!0;return{fallbackFocus:t,...e,document:a.ownerDocument,tabbableOptions:ne,trapStack:re().focusTrapStack,clickOutsideDeactivates:u=>(q.has(a)||q.add(a),typeof r=="function"?r(u):r),onPostDeactivate:()=>{q.delete(a)},setReturnFocus:u=>{let s=typeof e?.setReturnFocus=="function"?e.setReturnFocus(u):e?.setReturnFocus;return s===void 0?Qe(a,u):s}}}var st=a=>oe((e,t)=>{let r,u,s,n=a.focusTrapOptions;t.onConnected(()=>{e[a.triggerProp]&&r&&d.activate()}),t.onUpdate(l=>{e.hasUpdated&&l.has("focusTrapDisabled")&&(e.focusTrapDisabled?d.deactivate():d.activate())}),t.onDisconnected(()=>d.deactivate());let d={get _instance(){},activate:()=>{let l=u||e.el;l.isConnected&&(r||(s||=Te(l,e),r=we(s,et(l,{...n,...e.focusTrapOptions}))),(typeof e.focusTrapDisabledOverride=="function"?!e.focusTrapDisabledOverride():!e.focusTrapDisabled)&&r.activate())},deactivate:()=>r?.deactivate(),overrideFocusTrapEl:l=>{if(r)throw new Error("Focus trap already created");u=l},setExtraContainers:l=>{let y=u||e.el;s=Te(y,e,l)},updateContainerElements:()=>r?.updateContainerElements(s)};return d});export{st as a};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as N}from"./
|
|
3
|
+
v5.0.0-next.84 */
|
|
4
|
+
import{a as N}from"./3XHBEPRS.js";import{a as O}from"./FQMVJPE4.js";import{E as S,F as x,H as o,Q as G,g as X,h as z,i as g}from"./OD6UYLJ5.js";function I(t,s,a){let i=s[0]-t[0],h=a[0]-s[0],l=s[1]-t[1],c=a[1]-s[1],r=l/(i||h<0&&0),n=c/(h||i<0&&0),e=(r*h+n*i)/(i+h);return(Math.sign(r)+Math.sign(n))*Math.min(Math.abs(r),Math.abs(n),.5*Math.abs(e))||0}function Y(t,s,a){let i=s[0]-t[0],h=s[1]-t[1];return i?(3*h/i-a)/2:a}function Z(t,s,a,i,h){let[l,c]=t,[r,n]=s,e=(r-l)/3,$=h([l+e,c+e*a]).join(","),d=h([r-e,n-e*i]).join(","),m=h([r,n]).join(",");return`C ${$} ${d} ${m}`}function A({width:t,height:s,min:a,max:i}){let h=i[0]-a[0],l=i[1]-a[1];return c=>{let r=(c[0]-a[0])/h*t,n=s-(c[1]-a[1])/l*s;return[r,n]}}function B(t){let[s,a]=t[0],i=[s,a],h=[s,a];return t.reduce(({min:l,max:c},[r,n])=>({min:[Math.min(l[0],r),Math.min(l[1],n)],max:[Math.max(c[0],r),Math.max(c[1],n)]}),{min:i,max:h})}function E({data:t,min:s,max:a,t:i}){if(t.length===0)return"";let[h,l]=i(t[0]),[c,r]=i(s),[n]=i(a),e,$,d,m=t.reduce((v,M,p)=>{if($=t[p-2],d=t[p-1],p>1){let u=I($,d,M),b=e===void 0?Y($,d,u):e,w=Z($,d,b,u,i);return e=u,`${v} ${w}`}return v},`M ${c},${r} L ${c},${l} L ${h},${l}`),L=t[t.length-1],k=Z(d,L,e,Y(d,L,e),i);return`${m} ${k} L ${n},${r} Z`}var R=X`:host{display:block;block-size:100%}.svg{fill:currentColor;stroke:transparent;margin:0;display:block;block-size:100%;inline-size:100%;padding:0}.svg .graph-path--highlight{fill:var(--calcite-graph-highlight-fill-color, var(--calcite-color-brand));opacity:.5}:host([hidden]){display:none}[hidden]{display:none}`,y={svg:"svg",graphPath:"graph-path",graphPathHighlight:"graph-path--highlight"},C="calcite-graph",f={host:t=>`${C}-${t}`,linearGradient:t=>`linear-gradient-${C}-${t}`,mask:(t,s)=>`${C}-${t}${s}`},P=class extends S{constructor(){super(...arguments),this.graphId=O(),this.resizeObserver=N("resize",()=>this.requestUpdate()),this.data=[]}static{this.properties={colorStops:[0,{},{attribute:!1}],data:[0,{},{attribute:!1}],highlightMax:[9,{},{type:Number}],highlightMin:[9,{},{type:Number}],max:[11,{},{reflect:!0,type:Number}],min:[11,{},{reflect:!0,type:Number}]}}static{this.styles=R}connectedCallback(){super.connectedCallback(),this.resizeObserver?.observe(this.el)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}render(){let{data:s,colorStops:a,el:i,highlightMax:h,highlightMin:l,min:c,max:r}=this,n=this.graphId,{clientHeight:e,clientWidth:$}=i;if(!s||s.length===0)return z`<svg aria-hidden=true class=${x(y.svg)} height=${e??o} preserveAspectRatio=none viewBox=${`0 0 ${$} ${e}`} width=${$??o}></svg>`;let{min:d,max:m}=B(s),L=d,k=m;(c<d[0]||c>d[0])&&(L=[c,0]),(r>m[0]||r<m[0])&&(k=[r,m[1]]);let v=A({min:L,max:k,width:$,height:e}),[M]=v([l,k[1]]),[p]=v([h,k[1]]),u=E({data:s,min:d,max:m,t:v}),b=a?`url(#${f.linearGradient(n)})`:void 0;return z`<svg aria-hidden=true class=${x(y.svg)} height=${e??o} preserveAspectRatio=none viewBox=${`0 0 ${$} ${e}`} width=${$??o}>${a?g`<defs><linearGradient id=${f.linearGradient(n)??o} x1=0 x2=1 y1=0 y2=0>${a.map(({offset:w,color:j,opacity:H})=>g`<stop offset=${`${w*100}%`} stop-color=${j??o} stop-opacity=${H??o} />`)}</linearGradient></defs>`:null}${l!==void 0?[g`<mask height=100% id=${f.mask(n,1)??o} width=100% x=0% y=0%><path d=${`
|
|
5
5
|
M 0,0
|
|
6
6
|
L ${M-1},0
|
|
7
7
|
L ${M-1},${e}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as Q}from"./DXHUSDRO.js";import{b as q}from"./H5J73U42.js";import{a as R}from"./FVN3GE7F.js";import{a as J}from"./2TG34U4J.js";import{c as K,d as N,e as j}from"./AAESPKRS.js";import{a as U}from"./GJWHI6TT.js";import{a as v,c as x,e as G,g as u,h as W}from"./QUZBO5AS.js";import{a as M}from"./HB2DR3ZB.js";import{a as O,c as D,e as L,f as B,h as F}from"./4A5LJCVG.js";import{a as V}from"./OJFOCOVP.js";import{a as P}from"./CHWM5JUW.js";import{a as H}from"./UHEAJGQN.js";import{a as g,b as w}from"./4XHSKQYK.js";import{a as z}from"./YTOJ2D4N.js";import{a as E}from"./TFXFEHM5.js";import"./U73LX45D.js";import{c as S}from"./DFAA5C4F.js";import"./EMQJYA3U.js";import{t as b}from"./PHRNNGYG.js";import{a as T}from"./2NYT7OAC.js";import{C,D as m,E as k,F as r,J as f,Q as A,g as $,h as d,l as n,p as c}from"./2F2VMRPX.js";var Z=$`: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}.input-container{position:relative;display:flex;flex:1 1 auto;flex-wrap:nowrap}.input{width:100%;--calcite-input-prefix-size: var(--calcite-autocomplete-input-prefix-size);--calcite-input-suffix-size: var(--calcite-autocomplete-input-suffix-size);--calcite-input-background-color: var(--calcite-autocomplete-input-background-color);--calcite-input-border-color: var(--calcite-autocomplete-input-border-color);--calcite-input-corner-radius: var(--calcite-autocomplete-input-corner-radius);--calcite-input-shadow: var(--calcite-autocomplete-input-shadow);--calcite-input-icon-color: var(--calcite-autocomplete-input-icon-color);--calcite-input-text-color: var(--calcite-autocomplete-input-text-color);--calcite-input-placeholder-text-color: var(--calcite-autocomplete-input-placeholder-text-color);--calcite-input-actions-background-color: var(--calcite-autocomplete-input-actions-background-color);--calcite-input-actions-background-color-hover: var(--calcite-autocomplete-input-actions-background-color-hover);--calcite-input-actions-background-color-press: var(--calcite-autocomplete-input-actions-background-color-press);--calcite-input-actions-icon-color: var(--calcite-autocomplete-input-actions-icon-color);--calcite-input-actions-icon-color-hover: var(--calcite-autocomplete-input-actions-icon-color-hover);--calcite-input-actions-icon-color-press: var(--calcite-autocomplete-input-actions-icon-color-press);--calcite-input-loading-background-color: var(--calcite-autocomplete-input-loading-background-color);--calcite-input-loading-fill-color: var(--calcite-autocomplete-input-loading-fill-color);--calcite-input-prefix-text-color: var(--calcite-autocomplete-input-prefix-text-color);--calcite-input-suffix-text-color: var(--calcite-autocomplete-input-suffix-text-color)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.content-container{box-sizing:border-box;width:100%}.floating-ui-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}@starting-style{.floating-ui-container{opacity:0;inset-block-start:0;left:0}}:host([top-layer-disabled]) .floating-ui-container{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown)}.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}}.content-container .calcite-floating-ui-anim{width:100%;overflow-y:auto;max-block-size:var(--calcite-autocomplete-menu-max-size-y, 45vh);color:var(--calcite-autocomplete-text-color, var(--calcite-color-text-1));background-color:var(--calcite-autocomplete-background-color, var(--calcite-color-foreground-1));border-radius:var(--calcite-autocomplete-corner-radius, var(--calcite-corner-radius-round))}.content--hidden{display:none}@media(forced-colors:active){.floating-ui-container--active{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}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`,X={contentBottom:"content-bottom",contentTop:"content-top"},s={inputContainer:"input-container",input:"input",contentContainer:"content-container",contentAnimation:"content-animation",content:"content",contentHidden:"content--hidden",floatingUIContainer:"floating-ui-container",floatingUIContainerActive:"floating-ui-container--active",screenReadersOnly:"screen-readers-only"},Y="autocomplete",y={validationMessage:"autocompleteValidationMessage",input:h=>`${Y}-input-${h}`,list:h=>`${Y}-list-${h}`},_="calcite-autocomplete-item-group",tt="calcite-autocomplete-item",I=class extends k{constructor(){super(),this.guid=T(),this.attributeWatch=S(["autofocus","enterkeyhint","inputmode"],this.handleGlobalAttributesChanged),this.inputId=y.input(this.guid),this.listId=y.list(this.guid),this.messages=z(),this.transitionProp="opacity",this.transitionRef=C(),this.mutationObserver=g("mutation",()=>this.getAllItemsDebounced()),this.focusSetter=E()(this),this.resizeObserver=g("resize",()=>{this.setFloatingElSize()}),this.cancelable=P()(this),this.getAllItemsDebounced=H(this.getAllItems,0),this.interactiveContainer=V(this),this.topLayer=U({target:()=>this.floatingEl})(this),this.activeDescendant="",this.activeIndex=-1,this.hasContentBottom=!1,this.hasContentTop=!1,this.items=[],this.groups=[],this.alignment="start",this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.open=!1,this.overlayPositioning="absolute",this.placement=v,this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.topLayerDisabled=!1,this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.value="",this.calciteAutocompleteBeforeClose=c({cancelable:!1}),this.calciteAutocompleteBeforeOpen=c({cancelable:!1}),this.calciteAutocompleteChange=c({cancelable:!1}),this.calciteAutocompleteClose=c({cancelable:!1}),this.calciteAutocompleteOpen=c({cancelable:!1}),this.calciteAutocompleteTextChange=c({cancelable:!1}),this.calciteAutocompleteTextInput=c({cancelable:!1}),this.listenOn(document,"click",this.documentClickHandler),this.listen("calciteAutocompleteItemSelect",this.handleAutocompleteItemSelect)}static{this.properties={activeDescendant:[16,{},{state:!0}],activeIndex:[16,{},{state:!0}],hasContentBottom:[16,{},{state:!0}],hasContentTop:[16,{},{state:!0}],items:[16,{},{state:!0}],groups:[16,{},{state:!0}],alignment:[3,{},{reflect:!0}],autocomplete:1,disabled:[7,{},{reflect:!0,type:Boolean}],flipPlacements:[0,{},{attribute:!1}],form:[3,{},{reflect:!0}],icon:[3,{converter:f,type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],inputValue:1,label:1,labelText:1,loading:[7,{},{reflect:!0,type:Boolean}],maxLength:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],minLength:[11,{},{reflect:!0,type:Number}],name:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],pattern:1,placeholder:1,placement:[3,{},{reflect:!0}],prefixText:1,readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],suffixText:1,topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],validationIcon:[3,{converter:f,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:1}}static{this.styles=Z}get isOpen(){return this.open&&(this.hasContentTop||this.hasContentBottom||this.items.length>0)}get enabledItems(){return this.items.filter(t=>!t.disabled)}async reposition(t=!1){let{floatingEl:e,referenceEl:l,placement:i,overlayPositioning:o,flipPlacements:a}=this;return G(this,{floatingEl:e,referenceEl:l,overlayPositioning:o,placement:i,flipPlacements:a,type:"menu"},t)}async scrollContentTo(t){this.transitionRef.value?.scrollTo(t)}async selectText(){return this.referenceEl.selectText()}async setFocus(t){return this.focusSetter(()=>this.referenceEl,t)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),K(this),D(this),this.defaultInputValue=this.inputValue||"",this.getAllItemsDebounced(),u(this),this.cancelable.add(this.getAllItemsDebounced)}async load(){this.getAllItemsDebounced()}willUpdate(t){t.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),t.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),(t.has("flipPlacements")||t.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||t.has("placement")&&(this.hasUpdated||this.placement!==v))&&this.reposition(!0);let e=!1;t.has("inputValue")&&(this.hasUpdated||this.inputValue)&&(this.inputValueMatchPattern=this.inputValue&&new RegExp(`(${q(this.inputValue)})`,"i"),this.updateItems(),this.updateGroups(),e=!0),!e&&t.has("scale")&&(this.hasUpdated||this.scale!=="m")&&(this.updateItems(),this.updateGroups(),e=!0),!e&&t.has("activeIndex")&&(this.hasUpdated||this.activeIndex!==-1)&&this.updateItems()}loaded(){B(this,this.value||""),this.defaultInputValue=this.inputValue||"",u(this)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),N(this),L(this),W(this)}setFloatingElSize(){let{referenceEl:t,floatingEl:e}=this;!t||!e||(e.style.inlineSize=`${t.clientWidth}px`)}handleGlobalAttributesChanged(){this.requestUpdate()}handleDisabledChange(t){t||(this.open=!1)}openHandler(){if(this.disabled){this.open=!1;return}this.open||(this.activeIndex=-1),M(this),this.setFloatingElSize(),this.reposition(!0)}async documentClickHandler(t){this.disabled||t.composedPath().includes(this.el)||(this.open=!1)}async handleAutocompleteItemSelect(t){this.value=t.target.value,this.emitChange(),await this.setFocus(),this.open=!1}onLabelClick(){this.setFocus()}onFormReset(){this.inputValue=this.defaultInputValue}onBeforeOpen(){this.calciteAutocompleteBeforeOpen.emit(),this.topLayer.show()}onOpen(){this.calciteAutocompleteOpen.emit()}onBeforeClose(){this.calciteAutocompleteBeforeClose.emit()}onClose(){this.calciteAutocompleteClose.emit(),this.topLayer.hide()}emitChange(){this.calciteAutocompleteChange.emit()}updateGroups(){this.groups.forEach((t,e,l)=>{t.scale=this.scale,t.position=e,e===0&&(t.disableSpacing=!0);let i=l[e+1];i&&(i.disableSpacing=t.children.length===0)})}updateItems(){let t=null;this.items.forEach(e=>{e.scale=this.scale,e.inputValueMatchPattern=this.inputValueMatchPattern}),this.enabledItems.forEach((e,l)=>{let i=l===this.activeIndex;i&&(t=e.guid),e.active=i}),this.activeDescendant=t}handleInputFocus(){this.open=!0}handleContentTopSlotChange(t){this.hasContentTop=b(t)}handleContentBottomSlotChange(t){this.hasContentBottom=b(t)}getAllItems(){let{el:t}=this;this.groups=Array.from(t.querySelectorAll(_)),this.items=Array.from(t.querySelectorAll(tt)),this.updateItems(),this.updateGroups()}setReferenceEl(t){w(this.resizeObserver,this.referenceEl,t),this.referenceEl=t,u(this)}keyDownHandler(t){let{defaultPrevented:e,key:l}=t;if(e)return;let{open:i,activeIndex:o,enabledItems:a}=this,p=a.length&&o>-1?a[o]:null;switch(l){case"Escape":i&&(this.open=!1,t.preventDefault());break;case"Tab":this.open=!1;break;case"Enter":i&&p?(this.value=p.value,p.emitSelectEvent(),this.open=!1,t.preventDefault()):t.defaultPrevented||O(this)&&t.preventDefault();break;case"ArrowDown":a.length&&(this.open=!0,this.activeIndex=o!==-1?Math.min(o+1,a.length-1):0,this.scrollToActiveItem(),t.preventDefault());break;case"ArrowUp":a.length&&(this.open=!0,this.activeIndex=o!==-1?Math.max(o-1,0):a.length-1,this.scrollToActiveItem(),t.preventDefault());break;case"Home":a.length&&(this.open=!0,this.activeIndex=0,this.scrollToActiveItem(),t.preventDefault());break;case"End":a.length&&(this.open=!0,this.activeIndex=a.length-1,this.scrollToActiveItem(),t.preventDefault());break}}scrollToActiveItem(){this.enabledItems[this.activeIndex]?.scrollIntoView({block:"nearest"})}changeHandler(t){t.stopPropagation(),this.inputValue=t.target.value,this.calciteAutocompleteTextChange.emit()}inputClickHandler(t){t.defaultPrevented||(this.open=!0)}inputHandler(t){t.stopPropagation(),this.inputValue=t.target.value,this.open=this.inputValue?.length>0,this.calciteAutocompleteTextInput.emit()}setFloatingEl(t){this.floatingEl=t,u(this)}render(){let{disabled:t,listId:e,inputId:l,isOpen:i}=this,o=this.el.autofocus,a=this.el.enterKeyHint,p=this.el.inputMode;return this.interactiveContainer({disabled:t,children:d`${this.labelText&&J({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div class=${r(s.inputContainer)}><calcite-input .alignment=${this.alignment} aria-activedescendant=${this.activeDescendant??n} aria-controls=${e??n} aria-label=${j(this)??n} aria-owns=${e??n} aria-autocomplete=list .ariaExpanded=${i} aria-haspopup=listbox .autocomplete=${this.autocomplete} .autofocus=${o} class=${r(s.input)} clearable .disabled=${t} enterkeyhint=${a??n} .form=${this.form} .icon=${this.icon??!0} .iconFlipRtl=${this.iconFlipRtl} id=${l??n} inputmode=${p??n} .label=${this.label} .loading=${this.loading} .maxLength=${this.maxLength} .messageOverrides=${this.messages} .minLength=${this.minLength} .name=${this.name} @click=${this.inputClickHandler} @keydown=${this.keyDownHandler} @calciteInputChange=${this.changeHandler} @calciteInputInput=${this.inputHandler} @calciteInternalInputFocus=${this.handleInputFocus} .pattern=${this.pattern} .placeholder=${this.placeholder} .prefixText=${this.prefixText} .readOnly=${this.readOnly} .required=${this.required} role=combobox .scale=${this.scale} .status=${this.status} .suffixText=${this.suffixText} type=search .value=${this.inputValue} ${m(this.setReferenceEl)}></calcite-input>${this.renderListBox()}<div class=${r({[s.contentContainer]:!0,[s.floatingUIContainer]:!0,[s.floatingUIContainerActive]:i})} popover=manual ${m(this.setFloatingEl)}><div class=${r({[s.contentAnimation]:!0,[x.animation]:!0,[x.animationActive]:i})} ${m(this.transitionRef)}><div class=${r({[s.content]:!0,[s.contentHidden]:!i})}><slot name=${X.contentTop} @slotchange=${this.handleContentTopSlotChange}></slot><slot aria-hidden=true></slot><slot name=${X.contentBottom} @slotchange=${this.handleContentBottomSlotChange}></slot></div></div></div></div>${F({component:this})}${this.validationMessage&&this.status==="invalid"?Q({icon:this.validationIcon,id:y.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}renderListBox(){return d`<ul aria-labelledby=${this.inputId??n} aria-live=polite class=${r(s.screenReadersOnly)} id=${this.listId??n} role=listbox tabindex=-1>${this.renderListBoxOptions()}</ul>`}renderListBoxOptions(){return R(this.items.filter(t=>!!(t.label||t.heading)),t=>t.guid,t=>d`<li .ariaDisabled=${t.disabled} .ariaLabel=${t.label} id=${t.guid??n} role=option tabindex=-1>${t.heading}${t.description}</li>`)}};A("calcite-autocomplete",I);export{I as Autocomplete};
|
|
3
|
+
v5.0.0-next.84 */
|
|
4
|
+
import{a as Q}from"./7IM4VKWX.js";import{b as q}from"./RY4FVBEE.js";import{a as R}from"./JTVRJCPH.js";import{a as J}from"./GXT6G7P5.js";import{c as K,d as N,e as j}from"./VJHW23JU.js";import{a as U}from"./VFFCSONC.js";import{a as v,c as x,e as G,g as u,h as W}from"./QEWHLVPD.js";import{a as M}from"./3OI5D63L.js";import{a as O,c as D,e as L,f as B,h as F}from"./NV3BLFYF.js";import{a as V}from"./OA5PYYHO.js";import{a as P}from"./WVEFIZXY.js";import{a as H}from"./RER3Y4UI.js";import{a as g,b as w}from"./3XHBEPRS.js";import{a as z}from"./D3W7YIIT.js";import{a as E}from"./FXNAKQIO.js";import"./S7BIZAIK.js";import{c as S}from"./LJ2YG7C3.js";import"./U4ZCHG6H.js";import{t as b}from"./2OODGSZF.js";import{a as T}from"./FQMVJPE4.js";import{C,D as m,E as k,F as r,J as f,Q as A,g as $,h as d,l as n,p as c}from"./OD6UYLJ5.js";var Z=$`: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}.input-container{position:relative;display:flex;flex:1 1 auto;flex-wrap:nowrap}.input{width:100%;--calcite-input-prefix-size: var(--calcite-autocomplete-input-prefix-size);--calcite-input-suffix-size: var(--calcite-autocomplete-input-suffix-size);--calcite-input-background-color: var(--calcite-autocomplete-input-background-color);--calcite-input-border-color: var(--calcite-autocomplete-input-border-color);--calcite-input-corner-radius: var(--calcite-autocomplete-input-corner-radius);--calcite-input-shadow: var(--calcite-autocomplete-input-shadow);--calcite-input-icon-color: var(--calcite-autocomplete-input-icon-color);--calcite-input-text-color: var(--calcite-autocomplete-input-text-color);--calcite-input-placeholder-text-color: var(--calcite-autocomplete-input-placeholder-text-color);--calcite-input-actions-background-color: var(--calcite-autocomplete-input-actions-background-color);--calcite-input-actions-background-color-hover: var(--calcite-autocomplete-input-actions-background-color-hover);--calcite-input-actions-background-color-press: var(--calcite-autocomplete-input-actions-background-color-press);--calcite-input-actions-icon-color: var(--calcite-autocomplete-input-actions-icon-color);--calcite-input-actions-icon-color-hover: var(--calcite-autocomplete-input-actions-icon-color-hover);--calcite-input-actions-icon-color-press: var(--calcite-autocomplete-input-actions-icon-color-press);--calcite-input-loading-background-color: var(--calcite-autocomplete-input-loading-background-color);--calcite-input-loading-fill-color: var(--calcite-autocomplete-input-loading-fill-color);--calcite-input-prefix-text-color: var(--calcite-autocomplete-input-prefix-text-color);--calcite-input-suffix-text-color: var(--calcite-autocomplete-input-suffix-text-color)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.content-container{box-sizing:border-box;width:100%}.floating-ui-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}@starting-style{.floating-ui-container{opacity:0;inset-block-start:0;left:0}}:host([top-layer-disabled]) .floating-ui-container{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown)}.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}}.content-container .calcite-floating-ui-anim{width:100%;overflow-y:auto;max-block-size:var(--calcite-autocomplete-menu-max-size-y, 45vh);color:var(--calcite-autocomplete-text-color, var(--calcite-color-text-1));background-color:var(--calcite-autocomplete-background-color, var(--calcite-color-foreground-1));border-radius:var(--calcite-autocomplete-corner-radius, var(--calcite-corner-radius-round))}.content--hidden{display:none}@media(forced-colors:active){.floating-ui-container--active{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}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`,X={contentBottom:"content-bottom",contentTop:"content-top"},s={inputContainer:"input-container",input:"input",contentContainer:"content-container",contentAnimation:"content-animation",content:"content",contentHidden:"content--hidden",floatingUIContainer:"floating-ui-container",floatingUIContainerActive:"floating-ui-container--active",screenReadersOnly:"screen-readers-only"},Y="autocomplete",y={validationMessage:"autocompleteValidationMessage",input:h=>`${Y}-input-${h}`,list:h=>`${Y}-list-${h}`},_="calcite-autocomplete-item-group",tt="calcite-autocomplete-item",I=class extends k{constructor(){super(),this.guid=T(),this.attributeWatch=S(["autofocus","enterkeyhint","inputmode"],this.handleGlobalAttributesChanged),this.inputId=y.input(this.guid),this.listId=y.list(this.guid),this.messages=z(),this.transitionProp="opacity",this.transitionRef=C(),this.mutationObserver=g("mutation",()=>this.getAllItemsDebounced()),this.focusSetter=E()(this),this.resizeObserver=g("resize",()=>{this.setFloatingElSize()}),this.cancelable=P()(this),this.getAllItemsDebounced=H(this.getAllItems,0),this.interactiveContainer=V(this),this.topLayer=U({target:()=>this.floatingEl})(this),this.activeDescendant="",this.activeIndex=-1,this.hasContentBottom=!1,this.hasContentTop=!1,this.items=[],this.groups=[],this.alignment="start",this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.open=!1,this.overlayPositioning="absolute",this.placement=v,this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.topLayerDisabled=!1,this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.value="",this.calciteAutocompleteBeforeClose=c({cancelable:!1}),this.calciteAutocompleteBeforeOpen=c({cancelable:!1}),this.calciteAutocompleteChange=c({cancelable:!1}),this.calciteAutocompleteClose=c({cancelable:!1}),this.calciteAutocompleteOpen=c({cancelable:!1}),this.calciteAutocompleteTextChange=c({cancelable:!1}),this.calciteAutocompleteTextInput=c({cancelable:!1}),this.listenOn(document,"click",this.documentClickHandler),this.listen("calciteAutocompleteItemSelect",this.handleAutocompleteItemSelect)}static{this.properties={activeDescendant:[16,{},{state:!0}],activeIndex:[16,{},{state:!0}],hasContentBottom:[16,{},{state:!0}],hasContentTop:[16,{},{state:!0}],items:[16,{},{state:!0}],groups:[16,{},{state:!0}],alignment:[3,{},{reflect:!0}],autocomplete:1,disabled:[7,{},{reflect:!0,type:Boolean}],flipPlacements:[0,{},{attribute:!1}],form:[3,{},{reflect:!0}],icon:[3,{converter:f,type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],inputValue:1,label:1,labelText:1,loading:[7,{},{reflect:!0,type:Boolean}],maxLength:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],minLength:[11,{},{reflect:!0,type:Number}],name:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],pattern:1,placeholder:1,placement:[3,{},{reflect:!0}],prefixText:1,readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],suffixText:1,topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],validationIcon:[3,{converter:f,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:1}}static{this.styles=Z}get isOpen(){return this.open&&(this.hasContentTop||this.hasContentBottom||this.items.length>0)}get enabledItems(){return this.items.filter(t=>!t.disabled)}async reposition(t=!1){let{floatingEl:e,referenceEl:l,placement:i,overlayPositioning:o,flipPlacements:a}=this;return G(this,{floatingEl:e,referenceEl:l,overlayPositioning:o,placement:i,flipPlacements:a,type:"menu"},t)}async scrollContentTo(t){this.transitionRef.value?.scrollTo(t)}async selectText(){return this.referenceEl.selectText()}async setFocus(t){return this.focusSetter(()=>this.referenceEl,t)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),K(this),D(this),this.defaultInputValue=this.inputValue||"",this.getAllItemsDebounced(),u(this),this.cancelable.add(this.getAllItemsDebounced)}async load(){this.getAllItemsDebounced()}willUpdate(t){t.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),t.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),(t.has("flipPlacements")||t.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||t.has("placement")&&(this.hasUpdated||this.placement!==v))&&this.reposition(!0);let e=!1;t.has("inputValue")&&(this.hasUpdated||this.inputValue)&&(this.inputValueMatchPattern=this.inputValue&&new RegExp(`(${q(this.inputValue)})`,"i"),this.updateItems(),this.updateGroups(),e=!0),!e&&t.has("scale")&&(this.hasUpdated||this.scale!=="m")&&(this.updateItems(),this.updateGroups(),e=!0),!e&&t.has("activeIndex")&&(this.hasUpdated||this.activeIndex!==-1)&&this.updateItems()}loaded(){B(this,this.value||""),this.defaultInputValue=this.inputValue||"",u(this)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),N(this),L(this),W(this)}setFloatingElSize(){let{referenceEl:t,floatingEl:e}=this;!t||!e||(e.style.inlineSize=`${t.clientWidth}px`)}handleGlobalAttributesChanged(){this.requestUpdate()}handleDisabledChange(t){t||(this.open=!1)}openHandler(){if(this.disabled){this.open=!1;return}this.open||(this.activeIndex=-1),M(this),this.setFloatingElSize(),this.reposition(!0)}async documentClickHandler(t){this.disabled||t.composedPath().includes(this.el)||(this.open=!1)}async handleAutocompleteItemSelect(t){this.value=t.target.value,this.emitChange(),await this.setFocus(),this.open=!1}onLabelClick(){this.setFocus()}onFormReset(){this.inputValue=this.defaultInputValue}onBeforeOpen(){this.calciteAutocompleteBeforeOpen.emit(),this.topLayer.show()}onOpen(){this.calciteAutocompleteOpen.emit()}onBeforeClose(){this.calciteAutocompleteBeforeClose.emit()}onClose(){this.calciteAutocompleteClose.emit(),this.topLayer.hide()}emitChange(){this.calciteAutocompleteChange.emit()}updateGroups(){this.groups.forEach((t,e,l)=>{t.scale=this.scale,t.position=e,e===0&&(t.disableSpacing=!0);let i=l[e+1];i&&(i.disableSpacing=t.children.length===0)})}updateItems(){let t=null;this.items.forEach(e=>{e.scale=this.scale,e.inputValueMatchPattern=this.inputValueMatchPattern}),this.enabledItems.forEach((e,l)=>{let i=l===this.activeIndex;i&&(t=e.guid),e.active=i}),this.activeDescendant=t}handleInputFocus(){this.open=!0}handleContentTopSlotChange(t){this.hasContentTop=b(t)}handleContentBottomSlotChange(t){this.hasContentBottom=b(t)}getAllItems(){let{el:t}=this;this.groups=Array.from(t.querySelectorAll(_)),this.items=Array.from(t.querySelectorAll(tt)),this.updateItems(),this.updateGroups()}setReferenceEl(t){w(this.resizeObserver,this.referenceEl,t),this.referenceEl=t,u(this)}keyDownHandler(t){let{defaultPrevented:e,key:l}=t;if(e)return;let{open:i,activeIndex:o,enabledItems:a}=this,p=a.length&&o>-1?a[o]:null;switch(l){case"Escape":i&&(this.open=!1,t.preventDefault());break;case"Tab":this.open=!1;break;case"Enter":i&&p?(this.value=p.value,p.emitSelectEvent(),this.open=!1,t.preventDefault()):t.defaultPrevented||O(this)&&t.preventDefault();break;case"ArrowDown":a.length&&(this.open=!0,this.activeIndex=o!==-1?Math.min(o+1,a.length-1):0,this.scrollToActiveItem(),t.preventDefault());break;case"ArrowUp":a.length&&(this.open=!0,this.activeIndex=o!==-1?Math.max(o-1,0):a.length-1,this.scrollToActiveItem(),t.preventDefault());break;case"Home":a.length&&(this.open=!0,this.activeIndex=0,this.scrollToActiveItem(),t.preventDefault());break;case"End":a.length&&(this.open=!0,this.activeIndex=a.length-1,this.scrollToActiveItem(),t.preventDefault());break}}scrollToActiveItem(){this.enabledItems[this.activeIndex]?.scrollIntoView({block:"nearest"})}changeHandler(t){t.stopPropagation(),this.inputValue=t.target.value,this.calciteAutocompleteTextChange.emit()}inputClickHandler(t){t.defaultPrevented||(this.open=!0)}inputHandler(t){t.stopPropagation(),this.inputValue=t.target.value,this.open=this.inputValue?.length>0,this.calciteAutocompleteTextInput.emit()}setFloatingEl(t){this.floatingEl=t,u(this)}render(){let{disabled:t,listId:e,inputId:l,isOpen:i}=this,o=this.el.autofocus,a=this.el.enterKeyHint,p=this.el.inputMode;return this.interactiveContainer({disabled:t,children:d`${this.labelText&&J({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div class=${r(s.inputContainer)}><calcite-input .alignment=${this.alignment} aria-activedescendant=${this.activeDescendant??n} aria-controls=${e??n} aria-label=${j(this)??n} aria-owns=${e??n} aria-autocomplete=list .ariaExpanded=${i} aria-haspopup=listbox .autocomplete=${this.autocomplete} .autofocus=${o} class=${r(s.input)} clearable .disabled=${t} enterkeyhint=${a??n} .form=${this.form} .icon=${this.icon??!0} .iconFlipRtl=${this.iconFlipRtl} id=${l??n} inputmode=${p??n} .label=${this.label} .loading=${this.loading} .maxLength=${this.maxLength} .messageOverrides=${this.messages} .minLength=${this.minLength} .name=${this.name} @click=${this.inputClickHandler} @keydown=${this.keyDownHandler} @calciteInputChange=${this.changeHandler} @calciteInputInput=${this.inputHandler} @calciteInternalInputFocus=${this.handleInputFocus} .pattern=${this.pattern} .placeholder=${this.placeholder} .prefixText=${this.prefixText} .readOnly=${this.readOnly} .required=${this.required} role=combobox .scale=${this.scale} .status=${this.status} .suffixText=${this.suffixText} type=search .value=${this.inputValue} ${m(this.setReferenceEl)}></calcite-input>${this.renderListBox()}<div class=${r({[s.contentContainer]:!0,[s.floatingUIContainer]:!0,[s.floatingUIContainerActive]:i})} popover=manual ${m(this.setFloatingEl)}><div class=${r({[s.contentAnimation]:!0,[x.animation]:!0,[x.animationActive]:i})} ${m(this.transitionRef)}><div class=${r({[s.content]:!0,[s.contentHidden]:!i})}><slot name=${X.contentTop} @slotchange=${this.handleContentTopSlotChange}></slot><slot aria-hidden=true></slot><slot name=${X.contentBottom} @slotchange=${this.handleContentBottomSlotChange}></slot></div></div></div></div>${F({component:this})}${this.validationMessage&&this.status==="invalid"?Q({icon:this.validationIcon,id:y.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}renderListBox(){return d`<ul aria-labelledby=${this.inputId??n} aria-live=polite class=${r(s.screenReadersOnly)} id=${this.listId??n} role=listbox tabindex=-1>${this.renderListBoxOptions()}</ul>`}renderListBoxOptions(){return R(this.items.filter(t=>!!(t.label||t.heading)),t=>t.guid,t=>d`<li .ariaDisabled=${t.disabled} .ariaLabel=${t.label} id=${t.guid??n} role=option tabindex=-1>${t.heading}${t.description}</li>`)}};A("calcite-autocomplete",I);export{I as Autocomplete};
|
|
@@ -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 x}from"./
|
|
3
|
+
v5.0.0-next.84 */
|
|
4
|
+
import{a as x}from"./X2Y2D5JN.js";import{a as u,b as A,c as y}from"./LK4GVUOR.js";import{a as b}from"./D3W7YIIT.js";import{c as h}from"./L325X7WP.js";import{a as v}from"./FXNAKQIO.js";import"./S7BIZAIK.js";import"./LJ2YG7C3.js";import"./U4ZCHG6H.js";import{t as f}from"./2OODGSZF.js";import"./FQMVJPE4.js";import{E as d,F as m,Q as g,g as p,h as l,p as r}from"./OD6UYLJ5.js";var O=p`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([scale=s]){--calcite-internal-action-group-gap: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-action-group-gap: var(--calcite-spacing-sm)}:host([scale=l]){--calcite-internal-action-group-gap: var(--calcite-spacing-sm-plus)}:host{display:flex;flex-direction:column;padding:0;background-color:transparent;border-color:var(--calcite-action-group-border-color, var(--calcite-color-border-3));border-style:solid;border-width:0;gap:var(--calcite-internal-action-group-gap)}.container{display:flex;flex-grow:1;flex-direction:column;gap:inherit}:host([columns="1"]){--calcite-internal-action-group-columns: 1}:host([columns="2"]){--calcite-internal-action-group-columns: 2}:host([columns="3"]){--calcite-internal-action-group-columns: 3}:host([columns="4"]){--calcite-internal-action-group-columns: 4}:host([columns="5"]){--calcite-internal-action-group-columns: 5}:host([columns="6"]){--calcite-internal-action-group-columns: 6}:host(:first-child){padding-block-start:0px}:host([layout=horizontal]),:host([layout=horizontal]) .container{flex-direction:row}:host([layout=grid]){display:grid}:host([layout=grid]) .container{display:grid;place-content:stretch;background-color:transparent;gap:var(--calcite-action-group-gap, var(--calcite-internal-action-group-gap));grid-template-columns:repeat(var(--calcite-action-group-columns, var(--calcite-internal-action-group-columns, 3)),auto);padding:var(--calcite-action-group-gap, 1px)}:host([layout=horizontal]) ::slotted(calcite-action-group){border-inline-end:var(--calcite-size-px)}:host([hidden]){display:none}[hidden]{display:none}`,k=Object.defineProperty,S=(c,e,t,i)=>{for(var o=void 0,a=c.length-1,s;a>=0;a--)(s=c[a])&&(o=s(e,t,o)||o);return o&&k(e,t,o),o},n=class extends d{constructor(){super(),this.messages=b(),this.focusSetter=v()(this),this.hasMenuActions=!1,this.expanded=!1,this.layout="vertical",this.menuOpen=!1,this.overlayPositioning="absolute",this.scale="m",this.selectionMode="none",this.topLayerDisabled=!1,this.calciteActionGroupCollapse=r({cancelable:!1}),this.calciteActionGroupExpand=r({cancelable:!1}),this.listen("click",this.handleActionClick)}static{this.properties={hasMenuActions:[16,{},{state:!0}],columns:[11,{},{type:Number,reflect:!0}],expanded:[7,{},{reflect:!0,type:Boolean}],label:1,layout:[3,{},{reflect:!0}],menuFlipPlacements:[0,{},{attribute:!1}],menuOpen:[7,{},{reflect:!0,type:Boolean}],menuPlacement:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=O}async setFocus(e){return this.focusSetter(()=>this.el,e)}willUpdate(e){(this.hasUpdated||e.has("selectionMode"))&&(this.selectionMode!=="none"?this.setRoleOnActions():this.selectionMode==="none"&&this.clearActionAriaAttributes()),e.has("expanded")&&((this.hasUpdated||this.expanded!==!1)&&(this.menuOpen=!1),this.hasUpdated&&(this.expanded?this.calciteActionGroupExpand.emit():this.calciteActionGroupCollapse.emit()))}setActiveAction(e,t){if(this.selectionMode==="multiple"){t.active=!t.active,this.setActionAriaChecked(t,t.active);return}if(this.selectionMode==="single"){this.actions.forEach((i,o)=>{i.active=o===e&&!i.active,this.setActionAriaChecked(i,i.active)});return}if(this.selectionMode==="single-persist"){this.actions[e].active||this.actions.forEach((i,o)=>{i.active=o===e,this.setActionAriaChecked(i,i.active)});return}}setMenuOpen(e){this.menuOpen=!!e.currentTarget.open}handleMenuActionsSlotChange(e){this.hasMenuActions=f(e)}handleActionClick(e){let t=e.target;if(!t)return;let i=this.actions.indexOf(t);i===-1||this.selectionMode==="none"||this.setActiveAction(i,t)}setRoleOnActions(){this.actions.forEach(e=>{e.aria={...e.aria,role:this.selectionMode==="single"||this.selectionMode==="single-persist"?"radio":"checkbox"},this.setActionAriaChecked(e,e.active)})}setActionAriaChecked(e,t){e.aria={...e.aria,checked:t?"true":"false"}}clearActionAriaAttributes(){this.selectionMode==="none"&&this.actions.forEach(e=>{e.aria&&(e.aria.checked=void 0,e.aria.role=void 0,e.aria={...e.aria})})}renderMenu(){let{expanded:e,menuOpen:t,scale:i,layout:o,messages:a,overlayPositioning:s,hasMenuActions:M,menuFlipPlacements:$,menuPlacement:C}=this;return l`<calcite-action-menu .expanded=${e} .flipPlacements=${$??(o==="horizontal"?["top","bottom"]:["left","right"])} .hidden=${!M} .label=${a.more} @calciteActionMenuOpen=${this.setMenuOpen} .open=${t} .overlayPositioning=${s} .placement=${C??(o==="horizontal"?"bottom-start":"leading-start")} .scale=${i} .topLayerDisabled=${this.topLayerDisabled}><calcite-action .aria=${{expanded:e}} .icon=${A.menu} .scale=${i} slot=${h.trigger} .text=${a.more} .textEnabled=${e}></calcite-action><slot name=${u.menuActions} @slotchange=${this.handleMenuActionsSlotChange}></slot><slot name=${u.menuTooltip} slot=${h.tooltip}></slot></calcite-action-menu>`}render(){return l`<div .ariaLabel=${this.label} class=${m(y.container)} .role=${this.selectionMode==="multiple"||this.selectionMode==="none"?"group":"radiogroup"}><slot></slot>${this.renderMenu()}</div>`}};S([x({selector:"calcite-action"})],n.prototype,"actions");g("calcite-action-group",n);export{n as ActionGroup};
|