@esri/calcite-components 3.0.0-next.99 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/calcite/2AP6YLXQ.js +4 -0
- package/dist/calcite/2M5DP5VS.js +4 -0
- package/dist/calcite/2MTW4RBX.js +4 -0
- package/dist/calcite/2TEERBTI.js +4 -0
- package/dist/calcite/{4TWMM7Z6.js → 3BOJE7XV.js} +4 -6
- package/dist/calcite/3EQ32UON.js +4 -0
- package/dist/calcite/3LOOBSHJ.js +4 -0
- package/dist/calcite/3LXK5OEB.js +5 -0
- package/dist/calcite/{4OYBMKUB.js → 3NJWAHVN.js} +4 -6
- package/dist/calcite/{2JRSKQML.js → 3TGA6ACB.js} +4 -6
- package/dist/calcite/3TJZ3VMN.js +4 -0
- package/dist/calcite/3U4EUW42.js +4 -0
- package/dist/calcite/45R3L3J2.js +4 -0
- package/dist/calcite/45YXH4D4.js +4 -0
- package/dist/calcite/{ZWGCNMZF.js → 46ICVIVW.js} +4 -6
- package/dist/calcite/{UZAQE6XP.js → 47FXQ37G.js} +4 -6
- package/dist/calcite/{JFBHBHJE.js → 4GUL5QXY.js} +4 -6
- package/dist/calcite/{AUEN6VFD.js → 4PKLCHA5.js} +4 -6
- package/dist/calcite/4QSXDJ3I.js +4 -0
- package/dist/calcite/{BGQR3WLU.js → 4TLHW2N3.js} +4 -6
- package/dist/calcite/{XFHDAVBK.js → 54O5ASY6.js} +4 -6
- package/dist/calcite/{FSQJ72IH.js → 57MQUGHN.js} +4 -6
- package/dist/calcite/5FYVM4AX.js +4 -0
- package/dist/calcite/5KCZZJGZ.js +4 -0
- package/dist/calcite/5OWSKBSV.js +4 -0
- package/dist/calcite/{3SE2Z2VK.js → 5X666Z33.js} +5 -7
- package/dist/calcite/5YBMD5MK.js +4 -0
- package/dist/calcite/5ZA467A4.js +4 -0
- package/dist/calcite/62M3DNDT.js +4 -0
- package/dist/calcite/{DF7SVAJW.js → 6AN3H3R6.js} +4 -6
- package/dist/calcite/{W4D5O4P2.js → 6GK2OTHZ.js} +3 -5
- package/dist/calcite/6HEZO2KI.js +4 -0
- package/dist/calcite/{BZOCG27F.js → 6KFLYQ3F.js} +4 -6
- package/dist/calcite/6OPQR7PL.js +4 -0
- package/dist/calcite/{3QV5TGZD.js → 6ZNTK2O2.js} +4 -6
- package/dist/calcite/7C3Y7SM7.js +4 -0
- package/dist/calcite/{L4IJ6KQT.js → 7C4KHH7U.js} +4 -6
- package/dist/calcite/{AASA6526.js → 7COKCZTB.js} +4 -6
- package/dist/calcite/{KA53KK35.js → 7CQS22FK.js} +3 -5
- package/dist/calcite/{2YSVELPG.js → 7NLQECEF.js} +3 -5
- package/dist/calcite/7SVWZ5TZ.js +4 -0
- package/dist/calcite/{I2N2BRJR.js → 7URHQAUN.js} +3 -5
- package/dist/calcite/ACFEDJWV.js +4 -0
- package/dist/calcite/{MNBTRJLH.js → AFJ2UDEO.js} +4 -6
- package/dist/calcite/{5MEU7SU4.js → AQANFQEK.js} +4 -6
- package/dist/calcite/{GU2SFYM4.js → AZPKU6ON.js} +4 -6
- package/dist/calcite/{SZP7YBVQ.js → B2GDIYRL.js} +4 -6
- package/dist/calcite/{26ES3CRO.js → BETB6YPW.js} +4 -6
- package/dist/calcite/BJQEZXFS.js +4 -0
- package/dist/calcite/BKB5MWFT.js +4 -0
- package/dist/calcite/BYRVP24K.js +22 -0
- package/dist/calcite/{UPY24BFQ.js → C3XHCMBP.js} +3 -5
- package/dist/calcite/C52QQAFR.js +4 -0
- package/dist/calcite/CE3TSSYN.js +4 -0
- package/dist/calcite/CHVHH4L7.js +4 -0
- package/dist/calcite/CNTBFQBL.js +4 -0
- package/dist/calcite/CPH3OCUO.js +4 -0
- package/dist/calcite/CWBUDJKG.js +4 -0
- package/dist/calcite/CWJKJUCU.js +4 -0
- package/dist/calcite/{XOA2TSHC.js → CYKAIRKP.js} +4 -6
- package/dist/calcite/D7X7U5LL.js +6 -0
- package/dist/calcite/DH73QGXJ.js +4 -0
- package/dist/calcite/{EWQKTTIO.js → DJU4LSIS.js} +4 -6
- package/dist/calcite/DNKJTXCY.js +4 -0
- package/dist/calcite/DO7AVVBP.js +4 -0
- package/dist/calcite/DVFRWPOF.js +4 -0
- package/dist/calcite/{3KND2KKH.js → DX5LTGNX.js} +4 -6
- package/dist/calcite/DYHX5C6J.js +4 -0
- package/dist/calcite/E6LODM5C.js +4 -0
- package/dist/calcite/{6LWRLBVD.js → EB432BS5.js} +4 -6
- package/dist/calcite/{ZQSF4K7D.js → EFUCITW3.js} +4 -6
- package/dist/calcite/ETK7F3KI.js +4 -0
- package/dist/calcite/{UCGUHOUO.js → EWAQVZXY.js} +4 -6
- package/dist/calcite/{O7B4THLC.js → EWBW2GOP.js} +4 -6
- package/dist/calcite/{GIRDDKPZ.js → F52GIETG.js} +4 -6
- package/dist/calcite/F6CK7P7G.js +4 -0
- package/dist/calcite/FA3DOLYY.js +4 -0
- package/dist/calcite/FBUTQVLY.js +4 -0
- package/dist/calcite/FF2SNYC6.js +4 -0
- package/dist/calcite/FGCSO5KT.js +4 -0
- package/dist/calcite/FJLPIBCZ.js +4 -0
- package/dist/calcite/{DO5AYUNU.js → FL63KFPW.js} +4 -6
- package/dist/calcite/{KHDHQPVO.js → FMALNIBL.js} +4 -6
- package/dist/calcite/{ARFAFPKS.js → FNTHRMT3.js} +4 -6
- package/dist/calcite/{KWWKG3YN.js → FOFSX3FY.js} +4 -6
- package/dist/calcite/FSQRHBBB.js +4 -0
- package/dist/calcite/FYCT4FES.js +4 -0
- package/dist/calcite/{G4Q2QH6B.js → FYUK2GME.js} +4 -6
- package/dist/calcite/G4CQ5QPF.js +4 -0
- package/dist/calcite/G5AYPPXM.js +4 -0
- package/dist/calcite/{EUXG27WD.js → GGNAK2N6.js} +4 -6
- package/dist/calcite/{57L4ZYLO.js → GKVYSG3G.js} +4 -6
- package/dist/calcite/{W3WKINVO.js → GR3JRBW6.js} +4 -6
- package/dist/calcite/GS4K4IEJ.js +4 -0
- package/dist/calcite/{EBQYJBDQ.js → GZBMMB2V.js} +4 -6
- package/dist/calcite/HD2NABQD.js +4 -0
- package/dist/calcite/{P64WY2HI.js → HEVM6SRJ.js} +4 -6
- package/dist/calcite/HMZA4X6S.js +4 -0
- package/dist/calcite/HPFCIR5F.js +4 -0
- package/dist/calcite/HRDRO2MA.js +4 -0
- package/dist/calcite/I54F3V4F.js +4 -0
- package/dist/calcite/{BNYX7IBO.js → IBLJGOPM.js} +4 -6
- package/dist/calcite/IGQGPBGN.js +4 -0
- package/dist/calcite/{QLJX2F4K.js → IITTEDPS.js} +4 -6
- package/dist/calcite/IJOUQRZG.js +4 -0
- package/dist/calcite/IKHZ7MAG.js +4 -0
- package/dist/calcite/{SYOTV4D4.js → J3ZEXA7Z.js} +4 -6
- package/dist/calcite/{OMBBOPRI.js → J6ES4ZTD.js} +4 -6
- package/dist/calcite/J6V2OKQD.js +4 -0
- package/dist/calcite/JHWO2CVD.js +4 -0
- package/dist/calcite/JUW7VCPP.js +4 -0
- package/dist/calcite/KAZVOPHR.js +4 -0
- package/dist/calcite/{3ATQZBKY.js → KCA2V6ZH.js} +4 -6
- package/dist/calcite/{QNGBOTGF.js → KJYAPBB2.js} +4 -6
- package/dist/calcite/KLG62CS4.js +4 -0
- package/dist/calcite/{SFWNFANJ.js → KOPH76Z4.js} +4 -6
- package/dist/calcite/KP4G4VQ3.js +4 -0
- package/dist/calcite/{ELXZUEDC.js → KPJGFWME.js} +4 -6
- package/dist/calcite/KPP5CUG6.js +4 -0
- package/dist/calcite/{3RLXG3NR.js → KT3W2WN7.js} +4 -6
- package/dist/calcite/{AGLAEQKV.js → KW4WGJWX.js} +4 -6
- package/dist/calcite/{B77QRUX7.js → LAE3F72I.js} +4 -6
- package/dist/calcite/LDJND26G.js +4 -0
- package/dist/calcite/LWAXFXVK.js +4 -0
- package/dist/calcite/LWKIGIQ7.js +4 -0
- package/dist/calcite/M5RSVI77.js +4 -0
- package/dist/calcite/{4JU7BKXB.js → M6GGWFWP.js} +4 -6
- package/dist/calcite/{QBG5T6W3.js → MCYHITP5.js} +4 -6
- package/dist/calcite/{J7RY7DXT.js → MCZED6UJ.js} +3 -5
- package/dist/calcite/MD4KKJXR.js +4 -0
- package/dist/calcite/{G75XVKLZ.js → MFGDUWWU.js} +4 -6
- package/dist/calcite/MGC5QBVT.js +4 -0
- package/dist/calcite/MKMTLSBP.js +4 -0
- package/dist/calcite/{QFH3VN2R.js → MRRSD5GQ.js} +4 -6
- package/dist/calcite/{Y5IWWVKB.js → MUYFLMXN.js} +4 -6
- package/dist/calcite/{XR2WLB7D.js → MVBR6FNF.js} +3 -5
- package/dist/calcite/MYXXA6E5.js +4 -0
- package/dist/calcite/{AFH6KP7M.js → N2AFATQQ.js} +4 -6
- package/dist/calcite/N2Q46D75.js +4 -0
- package/dist/calcite/NBX4LUWL.js +4 -0
- package/dist/calcite/NLK3OCCK.js +4 -0
- package/dist/calcite/{3Z3RDAUW.js → NPTN6OGZ.js} +4 -6
- package/dist/calcite/{Z2ZTWA3F.js → NQPJICFQ.js} +3 -5
- package/dist/calcite/{FMI6FJW4.js → NWTXX6JY.js} +4 -6
- package/dist/calcite/{WIGL5RKK.js → O627WVJG.js} +4 -6
- package/dist/calcite/{CM4U5UKC.js → O6BU5DYY.js} +4 -6
- package/dist/calcite/OAD7JJOE.js +4 -0
- package/dist/calcite/{6FI3WN2Y.js → OEK7OZTX.js} +4 -6
- package/dist/calcite/OENBCW7D.js +4 -0
- package/dist/calcite/OLP7ABVK.js +4 -0
- package/dist/calcite/OOHSVUO2.js +4 -0
- package/dist/calcite/OOWC3DHW.js +4 -0
- package/dist/calcite/OREMH3DL.js +4 -0
- package/dist/calcite/OUKBJ6J3.js +4 -0
- package/dist/calcite/PA6PSCEP.js +4 -0
- package/dist/calcite/{KMLCSDZJ.js → PFRWMYU6.js} +4 -6
- package/dist/calcite/PPMXW2CH.js +4 -0
- package/dist/calcite/{3LYDW23E.js → PU7HI4RM.js} +4 -6
- package/dist/calcite/{6YQ42X6L.js → PV7FS57L.js} +4 -6
- package/dist/calcite/PYT6F7XN.js +4 -0
- package/dist/calcite/QGSMNFLV.js +4 -0
- package/dist/calcite/{N7NWH5SX.js → QLL7IT53.js} +3 -5
- package/dist/calcite/{CTQ5YHOP.js → QV6PXGLB.js} +4 -6
- package/dist/calcite/{ESS6BUTG.js → QZ4S4NPD.js} +4 -6
- package/dist/calcite/{VFBPWVKE.js → R5GIKUFX.js} +4 -6
- package/dist/calcite/{XEW3B3B5.js → RD2YKJMP.js} +4 -6
- package/dist/calcite/{6EFD6XES.js → RI6ANEBM.js} +4 -6
- package/dist/calcite/RIXZG4AD.js +4 -0
- package/dist/calcite/RIYYUHQ7.js +4 -0
- package/dist/calcite/RRNZ4FU5.js +4 -0
- package/dist/calcite/{S6AE7RHT.js → RRPMD5OW.js} +4 -6
- package/dist/calcite/RSI5VQHT.js +4 -0
- package/dist/calcite/RYQPXZK6.js +4 -0
- package/dist/calcite/S3TERCKZ.js +4 -0
- package/dist/calcite/{7NVGCG7Q.js → S6DJKPG5.js} +3 -5
- package/dist/calcite/{3JQJ24PZ.js → S6SBHJIV.js} +4 -6
- package/dist/calcite/SM6GCEH6.js +4 -0
- package/dist/calcite/STCRUA4G.js +4 -0
- package/dist/calcite/{G27BUJJG.js → SVTZCS25.js} +3 -5
- package/dist/calcite/T246IHBX.js +4 -0
- package/dist/calcite/T5I34CKY.js +4 -0
- package/dist/calcite/{2UYJUU43.js → TC73OO6B.js} +4 -6
- package/dist/calcite/{3PJ42556.js → TFRMRELY.js} +4 -6
- package/dist/calcite/TTARWRVZ.js +4 -0
- package/dist/calcite/TTPB5NUF.js +4 -0
- package/dist/calcite/{5LAQP62T.js → TV2JMAEX.js} +4 -6
- package/dist/calcite/{PB4E6L52.js → U3A4ZFDA.js} +4 -6
- package/dist/calcite/{LQ5ITYNE.js → U3J436K5.js} +4 -6
- package/dist/calcite/{KBVTFWRR.js → U4KFLUXN.js} +4 -6
- package/dist/calcite/U5LWIQFM.js +4 -0
- package/dist/calcite/UAPP5RN3.js +4 -0
- package/dist/calcite/{MYJH43DB.js → UJ2DNCBI.js} +4 -6
- package/dist/calcite/UVQWXGAE.js +4 -0
- package/dist/calcite/{UFV4E5V5.js → V7P5NO5D.js} +4 -6
- package/dist/calcite/VGKMOO66.js +4 -0
- package/dist/calcite/VIVZTWDT.js +4 -0
- package/dist/calcite/VLUVMJLJ.js +4 -0
- package/dist/calcite/VPCQX3JS.js +4 -0
- package/dist/calcite/VQZMYHUR.js +4 -0
- package/dist/calcite/{JLIVSPKC.js → VRJOLF5U.js} +4 -6
- package/dist/calcite/VSACPVTO.js +4 -0
- package/dist/calcite/{VP4IW6MN.js → VSVGJIKO.js} +4 -6
- package/dist/calcite/{LR6EXHT2.js → W2IMTPXZ.js} +4 -6
- package/dist/calcite/{K3F2CI4A.js → W35EGCBV.js} +4 -6
- package/dist/calcite/{VM4VUQ54.js → W7BTFAAV.js} +4 -6
- package/dist/calcite/{RWW7CETF.js → WB2APVPE.js} +4 -6
- package/dist/calcite/WODNJF5Z.js +4 -0
- package/dist/calcite/{MRVEUN2O.js → X6EDNQN2.js} +4 -6
- package/dist/calcite/X7JJZRMI.js +4 -0
- package/dist/calcite/{OU4N4K2U.js → XDEHQTPQ.js} +4 -6
- package/dist/calcite/XFRASDZI.js +4 -0
- package/dist/calcite/XK4FISIX.js +4 -0
- package/dist/calcite/{XFKIMAJU.js → XL665FTR.js} +4 -6
- package/dist/calcite/XPMURWBT.js +4 -0
- package/dist/calcite/XUCTBMBM.js +4 -0
- package/dist/calcite/Y3MFFLOP.js +4 -0
- package/dist/calcite/YHIHWSGP.js +4 -0
- package/dist/calcite/YJWS4TZW.js +4 -0
- package/dist/calcite/YUYVD6B5.js +4 -0
- package/dist/calcite/YW6YWFXE.js +4 -0
- package/dist/calcite/YW7G4LA7.js +4 -0
- package/dist/calcite/YXYKAROM.js +4 -0
- package/dist/calcite/{O2KBYT33.js → Z7RQIFXO.js} +4 -6
- package/dist/calcite/ZYBMEVEB.js +4 -0
- package/dist/calcite/assets/icon/crosshair16.json +1 -0
- package/dist/calcite/assets/icon/crosshair24.json +1 -0
- package/dist/calcite/assets/icon/crosshair32.json +1 -0
- package/dist/calcite/assets/icon/dualImageArea16.json +1 -0
- package/dist/calcite/assets/icon/dualImageArea24.json +1 -0
- package/dist/calcite/assets/icon/dualImageArea32.json +1 -0
- package/dist/calcite/assets/icon/dualImageDistance16.json +1 -0
- package/dist/calcite/assets/icon/dualImageDistance24.json +1 -0
- package/dist/calcite/assets/icon/dualImageDistance32.json +1 -0
- package/dist/calcite/assets/icon/dualImageLocation16.json +1 -0
- package/dist/calcite/assets/icon/dualImageLocation24.json +1 -0
- package/dist/calcite/assets/icon/dualImageLocation32.json +1 -0
- package/dist/calcite/assets/icon/hammerCoin16.json +1 -0
- package/dist/calcite/assets/icon/hammerCoin24.json +1 -0
- package/dist/calcite/assets/icon/hammerCoin32.json +1 -0
- package/dist/calcite/assets/icon/hammerLock16.json +1 -0
- package/dist/calcite/assets/icon/hammerLock24.json +1 -0
- package/dist/calcite/assets/icon/hammerLock32.json +1 -0
- package/dist/calcite/assets/icon/utilityNetworkLayer16.json +1 -0
- package/dist/calcite/assets/icon/utilityNetworkLayer24.json +1 -0
- package/dist/calcite/assets/icon/utilityNetworkLayer32.json +1 -0
- package/dist/calcite/calcite.css +1 -1
- package/dist/calcite/calcite.esm.js +4 -6
- package/dist/chunks/ExpandToggle.js +3 -5
- package/dist/chunks/FloatingArrow.js +6 -8
- package/dist/chunks/Heading.js +3 -5
- package/dist/chunks/Validation.js +3 -5
- package/dist/chunks/_commonjsHelpers.js +3 -5
- package/dist/chunks/array.js +3 -5
- package/dist/chunks/component.js +13 -11
- package/dist/chunks/core.js +3 -5
- package/dist/chunks/date.js +3 -5
- package/dist/chunks/dom.js +218 -234
- package/dist/chunks/dynamicClasses.js +3 -5
- package/dist/chunks/filter.js +3 -5
- package/dist/chunks/floating-ui.js +61 -65
- package/dist/chunks/focusTrapComponent.js +25 -30
- package/dist/chunks/form.js +19 -21
- package/dist/chunks/global.js +14 -14
- package/dist/chunks/guid.js +3 -5
- package/dist/chunks/input.js +3 -5
- package/dist/chunks/interact.min.js +3 -5
- package/dist/chunks/interactive.js +3 -5
- package/dist/chunks/key.js +3 -5
- package/dist/chunks/label.js +7 -9
- package/dist/chunks/loadable.js +11 -22
- package/dist/chunks/locale.js +3 -5
- package/dist/chunks/logger.js +3 -5
- package/dist/chunks/math.js +3 -5
- package/dist/chunks/observers.js +3 -5
- package/dist/chunks/openCloseComponent.js +5 -7
- package/dist/chunks/resources.js +3 -5
- package/dist/chunks/resources2.js +3 -5
- package/dist/chunks/resources3.js +8 -14
- package/dist/chunks/resources4.js +3 -5
- package/dist/chunks/resources5.js +3 -5
- package/dist/chunks/resources6.js +3 -5
- package/dist/chunks/resources7.js +3 -5
- package/dist/chunks/responsive.js +9 -12
- package/dist/chunks/runtime.js +39 -43
- package/dist/chunks/sortableComponent.js +49 -39
- package/dist/chunks/text.js +3 -5
- package/dist/chunks/time.js +12 -14
- package/dist/chunks/useFocusTrap.js +47 -0
- package/dist/chunks/useT9n.js +3 -5
- package/dist/chunks/utils.js +19 -17
- package/dist/chunks/utils2.js +3 -5
- package/dist/chunks/utils3.js +15 -16
- package/dist/chunks/utils4.js +264 -271
- package/dist/components/calcite-accordion/customElement.js +3 -5
- package/dist/components/calcite-accordion-item/customElement.js +10 -14
- package/dist/components/calcite-action/customElement.js +38 -42
- package/dist/components/calcite-action-bar/customElement.js +24 -27
- package/dist/components/calcite-action-group/customElement.js +20 -24
- package/dist/components/calcite-action-menu/customElement.js +14 -18
- package/dist/components/calcite-action-pad/customElement.js +21 -25
- package/dist/components/calcite-alert/customElement.js +50 -63
- package/dist/components/calcite-autocomplete/customElement.d.ts +10 -4
- package/dist/components/calcite-autocomplete/customElement.js +50 -52
- package/dist/components/calcite-autocomplete-item/customElement.js +17 -21
- package/dist/components/calcite-autocomplete-item-group/customElement.js +3 -5
- package/dist/components/calcite-avatar/customElement.js +8 -10
- package/dist/components/calcite-block/customElement.d.ts +18 -1
- package/dist/components/calcite-block/customElement.js +54 -40
- package/dist/components/calcite-block/index.d.ts +1 -1
- package/dist/components/calcite-block/index.js +1 -1
- package/dist/components/calcite-block/utils.d.ts +2 -0
- package/dist/components/calcite-block-group/customElement.d.ts +50 -0
- package/dist/components/calcite-block-group/customElement.js +177 -0
- package/dist/components/calcite-block-group/index.d.ts +2 -0
- package/dist/components/calcite-block-group/index.js +2 -0
- package/dist/components/calcite-block-group/interfaces.d.ts +14 -0
- package/dist/components/calcite-block-group/resources.d.ts +8 -0
- package/dist/components/calcite-block-group/utils.d.ts +1 -0
- package/dist/components/calcite-block-section/customElement.js +19 -23
- package/dist/components/calcite-button/customElement.js +28 -30
- package/dist/components/calcite-card/customElement.js +17 -23
- package/dist/components/calcite-card-group/customElement.js +15 -18
- package/dist/components/calcite-carousel/customElement.js +29 -32
- package/dist/components/calcite-carousel-item/customElement.js +3 -5
- package/dist/components/calcite-checkbox/customElement.d.ts +4 -1
- package/dist/components/calcite-checkbox/customElement.js +18 -22
- package/dist/components/calcite-chip/customElement.js +42 -44
- package/dist/components/calcite-chip-group/customElement.js +10 -14
- package/dist/components/calcite-color-picker/customElement.d.ts +1 -1
- package/dist/components/calcite-color-picker/customElement.js +200 -178
- package/dist/components/calcite-color-picker/resources.d.ts +7 -16
- package/dist/components/calcite-color-picker/utils.d.ts +4 -3
- package/dist/components/calcite-color-picker-hex-input/customElement.js +27 -31
- package/dist/components/calcite-color-picker-swatch/customElement.js +3 -5
- package/dist/components/calcite-combobox/customElement.d.ts +5 -3
- package/dist/components/calcite-combobox/customElement.js +166 -160
- package/dist/components/calcite-combobox/resources.d.ts +1 -0
- package/dist/components/calcite-combobox-item/customElement.d.ts +2 -1
- package/dist/components/calcite-combobox-item/customElement.js +47 -38
- package/dist/components/calcite-combobox-item-group/customElement.js +13 -15
- package/dist/components/calcite-date-picker/customElement.d.ts +8 -2
- package/dist/components/calcite-date-picker/customElement.js +28 -31
- package/dist/components/calcite-date-picker-day/customElement.js +16 -19
- package/dist/components/calcite-date-picker-month/customElement.js +39 -41
- package/dist/components/calcite-date-picker-month-header/customElement.js +40 -44
- package/dist/components/calcite-dialog/customElement.d.ts +20 -4
- package/dist/components/calcite-dialog/customElement.js +78 -72
- package/dist/components/calcite-dialog/resources.d.ts +1 -0
- package/dist/components/calcite-dropdown/customElement.d.ts +1 -1
- package/dist/components/calcite-dropdown/customElement.js +63 -70
- package/dist/components/calcite-dropdown/resources.d.ts +1 -0
- package/dist/components/calcite-dropdown-group/customElement.js +4 -6
- package/dist/components/calcite-dropdown-item/customElement.js +20 -23
- package/dist/components/calcite-fab/customElement.js +19 -23
- package/dist/components/calcite-filter/customElement.js +20 -25
- package/dist/components/calcite-flow/customElement.js +19 -22
- package/dist/components/calcite-flow-item/customElement.js +26 -30
- package/dist/components/calcite-graph/customElement.js +52 -50
- package/dist/components/calcite-graph/interfaces.d.ts +1 -5
- package/dist/components/calcite-graph/resources.d.ts +5 -0
- package/dist/components/calcite-handle/customElement.d.ts +3 -0
- package/dist/components/calcite-handle/customElement.js +20 -18
- package/dist/components/calcite-icon/customElement.js +23 -25
- package/dist/components/calcite-inline-editable/customElement.js +25 -29
- package/dist/components/calcite-input/customElement.d.ts +14 -6
- package/dist/components/calcite-input/customElement.js +26 -29
- package/dist/components/calcite-input-date-picker/customElement.d.ts +12 -3
- package/dist/components/calcite-input-date-picker/customElement.js +84 -88
- package/dist/components/calcite-input-message/customElement.js +3 -5
- package/dist/components/calcite-input-number/customElement.d.ts +12 -5
- package/dist/components/calcite-input-number/customElement.js +30 -36
- package/dist/components/calcite-input-text/customElement.d.ts +10 -4
- package/dist/components/calcite-input-text/customElement.js +61 -65
- package/dist/components/calcite-input-time-picker/customElement.d.ts +8 -3
- package/dist/components/calcite-input-time-picker/customElement.js +45 -47
- package/dist/components/calcite-input-time-zone/customElement.js +53 -55
- package/dist/components/calcite-label/customElement.js +3 -5
- package/dist/components/calcite-link/customElement.js +10 -14
- package/dist/components/calcite-list/customElement.js +67 -70
- package/dist/components/calcite-list-item/customElement.js +54 -73
- package/dist/components/calcite-list-item/utils.d.ts +1 -0
- package/dist/components/calcite-list-item-group/customElement.js +3 -5
- package/dist/components/calcite-loader/customElement.d.ts +2 -2
- package/dist/components/calcite-loader/customElement.js +3 -7
- package/dist/components/calcite-menu/customElement.js +12 -16
- package/dist/components/calcite-menu-item/customElement.js +12 -16
- package/dist/components/calcite-meter/customElement.js +26 -28
- package/dist/components/calcite-modal/customElement.d.ts +16 -3
- package/dist/components/calcite-modal/customElement.js +61 -61
- package/dist/components/calcite-navigation/customElement.js +17 -21
- package/dist/components/calcite-navigation-logo/customElement.js +12 -16
- package/dist/components/calcite-navigation-user/customElement.js +10 -14
- package/dist/components/calcite-notice/customElement.js +25 -28
- package/dist/components/calcite-option/customElement.js +3 -5
- package/dist/components/calcite-option-group/customElement.js +3 -5
- package/dist/components/calcite-pagination/customElement.js +15 -17
- package/dist/components/calcite-panel/customElement.js +45 -48
- package/dist/components/calcite-popover/customElement.d.ts +10 -7
- package/dist/components/calcite-popover/customElement.js +70 -79
- package/dist/components/calcite-progress/customElement.js +3 -5
- package/dist/components/calcite-radio-button/customElement.d.ts +4 -1
- package/dist/components/calcite-radio-button/customElement.js +17 -20
- package/dist/components/calcite-radio-button-group/customElement.d.ts +4 -1
- package/dist/components/calcite-radio-button-group/customElement.js +14 -17
- package/dist/components/calcite-rating/customElement.js +21 -23
- package/dist/components/calcite-scrim/customElement.js +3 -5
- package/dist/components/calcite-segmented-control/customElement.d.ts +4 -1
- package/dist/components/calcite-segmented-control/customElement.js +14 -17
- package/dist/components/calcite-segmented-control-item/customElement.js +28 -30
- package/dist/components/calcite-select/customElement.d.ts +4 -1
- package/dist/components/calcite-select/customElement.js +19 -22
- package/dist/components/calcite-sheet/customElement.d.ts +17 -3
- package/dist/components/calcite-sheet/customElement.js +59 -62
- package/dist/components/calcite-shell/customElement.js +3 -6
- package/dist/components/calcite-shell-center-row/customElement.js +3 -5
- package/dist/components/calcite-shell-panel/customElement.js +16 -20
- package/dist/components/calcite-slider/customElement.d.ts +4 -1
- package/dist/components/calcite-slider/customElement.js +18 -21
- package/dist/components/calcite-sort-handle/customElement.js +45 -35
- package/dist/components/calcite-sort-handle/index.d.ts +1 -1
- package/dist/components/calcite-sort-handle/index.js +1 -1
- package/dist/components/calcite-sortable-list/customElement.d.ts +4 -1
- package/dist/components/calcite-sortable-list/customElement.js +21 -16
- package/dist/components/calcite-split-button/customElement.js +13 -20
- package/dist/components/calcite-stack/customElement.js +4 -6
- package/dist/components/calcite-stepper/customElement.js +36 -39
- package/dist/components/calcite-stepper-item/customElement.js +23 -22
- package/dist/components/calcite-switch/customElement.js +10 -14
- package/dist/components/calcite-tab/customElement.js +3 -5
- package/dist/components/calcite-tab-nav/customElement.js +3 -5
- package/dist/components/calcite-tab-title/customElement.js +3 -5
- package/dist/components/calcite-table/customElement.js +44 -47
- package/dist/components/calcite-table-cell/customElement.js +22 -25
- package/dist/components/calcite-table-header/customElement.js +18 -21
- package/dist/components/calcite-table-row/customElement.js +6 -8
- package/dist/components/calcite-tabs/customElement.js +3 -5
- package/dist/components/calcite-text-area/customElement.d.ts +10 -3
- package/dist/components/calcite-text-area/customElement.js +30 -37
- package/dist/components/calcite-tile/customElement.js +16 -20
- package/dist/components/calcite-tile-group/customElement.js +3 -5
- package/dist/components/calcite-tile-select/customElement.js +17 -22
- package/dist/components/calcite-tile-select-group/customElement.js +3 -5
- package/dist/components/calcite-time-picker/customElement.d.ts +1 -0
- package/dist/components/calcite-time-picker/customElement.js +19 -23
- package/dist/components/calcite-tip/customElement.js +3 -5
- package/dist/components/calcite-tip-group/customElement.js +3 -5
- package/dist/components/calcite-tip-manager/customElement.js +3 -5
- package/dist/components/calcite-tooltip/customElement.js +41 -40
- package/dist/components/calcite-tree/customElement.js +3 -5
- package/dist/components/calcite-tree-item/customElement.js +16 -14
- package/dist/components/interfaces.d.ts +4 -0
- package/dist/controllers/useFocusTrap.d.ts +71 -0
- package/dist/custom-theme/block.d.ts +4 -5
- package/dist/custom-theme/calcite-shell-panel.d.ts +13 -0
- package/dist/custom-theme/date-picker.d.ts +28 -0
- package/dist/custom-theme/flow.d.ts +21 -0
- package/dist/custom-theme/graph.d.ts +4 -0
- package/dist/custom-theme/inline-editable.d.ts +10 -0
- package/dist/custom-theme/segmented-control.d.ts +7 -0
- package/dist/docs/api.json +1152 -170
- package/dist/docs/docs.json +1102 -135
- package/dist/docs/supported-browsers.json +1 -1
- package/dist/docs/vscode.css-custom-data.json +322 -14
- package/dist/docs/vscode.html-custom-data.json +110 -63
- package/dist/docs/web-types.json +671 -131
- package/dist/extras/vscode-data.json +110 -63
- package/dist/index.d.ts +25 -0
- package/dist/index.js +3 -5
- package/dist/loader.js +16 -17
- package/dist/types/lumina.d.ts +18 -6
- package/dist/types/preact.d.ts +19 -6
- package/dist/types/react.d.ts +180 -165
- package/dist/types/stencil.d.ts +18 -6
- package/dist/utils/component.d.ts +4 -0
- package/dist/utils/focusTrapComponent.d.ts +9 -0
- package/dist/utils/loadable.d.ts +26 -43
- package/dist/utils/openCloseComponent.d.ts +17 -18
- package/hydrate/index.d.ts +1 -0
- package/hydrate/index.js +1 -0
- package/hydrate/index.mjs +1 -0
- package/package.json +11 -12
- package/readme.md +5 -69
- package/dist/calcite/2AZY343I.js +0 -6
- package/dist/calcite/2CPZ6K5L.js +0 -6
- package/dist/calcite/2M35C4DF.js +0 -6
- package/dist/calcite/2VVNNU7Q.js +0 -6
- package/dist/calcite/2XACBT2N.js +0 -6
- package/dist/calcite/32P7BAVF.js +0 -6
- package/dist/calcite/3HC2LTHR.js +0 -6
- package/dist/calcite/455MOJA6.js +0 -6
- package/dist/calcite/4DVWRXRA.js +0 -6
- package/dist/calcite/4TF5UO7R.js +0 -6
- package/dist/calcite/572RARTY.js +0 -6
- package/dist/calcite/5I36CFLM.js +0 -6
- package/dist/calcite/5OJMVZTI.js +0 -6
- package/dist/calcite/5YZTHYBK.js +0 -6
- package/dist/calcite/6L5EBECQ.js +0 -6
- package/dist/calcite/73JK3C3F.js +0 -6
- package/dist/calcite/7557S5FH.js +0 -6
- package/dist/calcite/7FJOFJBG.js +0 -6
- package/dist/calcite/7KUN772K.js +0 -6
- package/dist/calcite/7LABYE24.js +0 -6
- package/dist/calcite/7NPWRWEK.js +0 -6
- package/dist/calcite/7PQTHMQD.js +0 -6
- package/dist/calcite/AEIISXUM.js +0 -6
- package/dist/calcite/AT2QAEKC.js +0 -6
- package/dist/calcite/BHLCJMB4.js +0 -6
- package/dist/calcite/BOMPAJVU.js +0 -6
- package/dist/calcite/BYURAML5.js +0 -6
- package/dist/calcite/CRBGPV2Y.js +0 -6
- package/dist/calcite/CY2QE4I2.js +0 -6
- package/dist/calcite/D26RI2OE.js +0 -6
- package/dist/calcite/DCAWR655.js +0 -6
- package/dist/calcite/DSYDJ57C.js +0 -6
- package/dist/calcite/E2PVAX5K.js +0 -6
- package/dist/calcite/EH7S4XKL.js +0 -6
- package/dist/calcite/FGCHRTFU.js +0 -6
- package/dist/calcite/FIJQNNLL.js +0 -6
- package/dist/calcite/FIVGOTUL.js +0 -6
- package/dist/calcite/FPZSDG22.js +0 -6
- package/dist/calcite/FQJWCM6B.js +0 -6
- package/dist/calcite/FRK56FXW.js +0 -6
- package/dist/calcite/FSORFWYW.js +0 -6
- package/dist/calcite/FWSMKN2T.js +0 -6
- package/dist/calcite/GGQW5H6B.js +0 -6
- package/dist/calcite/GHY53YEU.js +0 -6
- package/dist/calcite/GWGCBSIN.js +0 -6
- package/dist/calcite/HH5FL6GD.js +0 -6
- package/dist/calcite/HNNE5R46.js +0 -6
- package/dist/calcite/HRVN7KZA.js +0 -6
- package/dist/calcite/I3TEC7IS.js +0 -6
- package/dist/calcite/I5SQS3SN.js +0 -6
- package/dist/calcite/I74ZLJFG.js +0 -6
- package/dist/calcite/I7SBXLRM.js +0 -6
- package/dist/calcite/IEJMBPJU.js +0 -6
- package/dist/calcite/IK3QCAZN.js +0 -6
- package/dist/calcite/IKOOMPAX.js +0 -6
- package/dist/calcite/IPDH2LDG.js +0 -6
- package/dist/calcite/IUBUCDD6.js +0 -6
- package/dist/calcite/JCMCWR7J.js +0 -6
- package/dist/calcite/JHGP2C56.js +0 -6
- package/dist/calcite/JMNIVK3R.js +0 -6
- package/dist/calcite/KDCUMRGX.js +0 -6
- package/dist/calcite/KEFBUO23.js +0 -6
- package/dist/calcite/KHNXDA3R.js +0 -6
- package/dist/calcite/KLEV3IGL.js +0 -6
- package/dist/calcite/LIT6HBCV.js +0 -6
- package/dist/calcite/LKXA7MRG.js +0 -6
- package/dist/calcite/LMTPIXJD.js +0 -6
- package/dist/calcite/M3MFRN64.js +0 -6
- package/dist/calcite/M5MPF4VA.js +0 -6
- package/dist/calcite/MWGGE65N.js +0 -6
- package/dist/calcite/MXNAKF47.js +0 -6
- package/dist/calcite/NNKZWGGT.js +0 -6
- package/dist/calcite/NVQN43XK.js +0 -6
- package/dist/calcite/OHLVZUJX.js +0 -6
- package/dist/calcite/OHR7IMVY.js +0 -6
- package/dist/calcite/OJ5D52RG.js +0 -6
- package/dist/calcite/OJ5H4H4N.js +0 -6
- package/dist/calcite/OTT2SAVW.js +0 -6
- package/dist/calcite/OTYNRKUI.js +0 -6
- package/dist/calcite/PO4EKM6H.js +0 -6
- package/dist/calcite/PPU55N5C.js +0 -6
- package/dist/calcite/PRGXXMHF.js +0 -6
- package/dist/calcite/PZ34QZ44.js +0 -6
- package/dist/calcite/PZ65523C.js +0 -6
- package/dist/calcite/PZGFP3J5.js +0 -6
- package/dist/calcite/Q2OAKI4L.js +0 -7
- package/dist/calcite/QIOSM7C2.js +0 -6
- package/dist/calcite/QS2B427U.js +0 -6
- package/dist/calcite/QVG465DZ.js +0 -6
- package/dist/calcite/RJU34JMH.js +0 -6
- package/dist/calcite/RL6ENWBS.js +0 -6
- package/dist/calcite/RWRTOY74.js +0 -6
- package/dist/calcite/S66ATD4V.js +0 -6
- package/dist/calcite/SHIZHTEP.js +0 -6
- package/dist/calcite/SY776R43.js +0 -6
- package/dist/calcite/T2M3KJPZ.js +0 -6
- package/dist/calcite/T7AHSVKE.js +0 -6
- package/dist/calcite/TBZM4XEW.js +0 -6
- package/dist/calcite/THTH4FYX.js +0 -6
- package/dist/calcite/TI4ZYY5Y.js +0 -6
- package/dist/calcite/TKE6VYZT.js +0 -6
- package/dist/calcite/TR3TLSTJ.js +0 -6
- package/dist/calcite/TSUCKRY4.js +0 -6
- package/dist/calcite/TWZNPBFB.js +0 -6
- package/dist/calcite/U5AZRHO7.js +0 -6
- package/dist/calcite/UE43U5QZ.js +0 -6
- package/dist/calcite/UHCCT74Q.js +0 -6
- package/dist/calcite/USP47AIY.js +0 -6
- package/dist/calcite/V3ZZW4SK.js +0 -6
- package/dist/calcite/WBOLRFTK.js +0 -6
- package/dist/calcite/WH3NETOG.js +0 -6
- package/dist/calcite/WHD4MFC3.js +0 -6
- package/dist/calcite/WJ6LOMWZ.js +0 -6
- package/dist/calcite/WKI76QXV.js +0 -6
- package/dist/calcite/WRQMW4QF.js +0 -24
- package/dist/calcite/X4RLJXN2.js +0 -6
- package/dist/calcite/XDGCDDNX.js +0 -8
- package/dist/calcite/XL6QBGWC.js +0 -6
- package/dist/calcite/XVBU5M6P.js +0 -6
- package/dist/calcite/Z4XCJ5VE.js +0 -6
- package/dist/calcite/ZQERQE2F.js +0 -6
- package/dist/calcite/ZYUUIPOD.js +0 -6
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
|
+
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{a as S}from"./VGKMOO66.js";import{a as p,c as h,d as x,e as C,f as k,g as n,h as P}from"./IBLJGOPM.js";import"./7NLQECEF.js";import{a as I}from"./YUYVD6B5.js";import{a as E,b as y}from"./X6EDNQN2.js";import"./NQPJICFQ.js";import{a as O}from"./5YBMD5MK.js";import{a as c}from"./NPTN6OGZ.js";import{b as r}from"./QV6PXGLB.js";import{l as d,n as v,z as a}from"./NLK3OCCK.js";import{b as D}from"./6OPQR7PL.js";import{a as b}from"./OLP7ABVK.js";import{J as g,e as w,f as u,v as o,w as f,x as l}from"./D7X7U5LL.js";var T={dropdownTrigger:"trigger"},$={content:"calcite-dropdown-content",wrapper:"calcite-dropdown-wrapper"},F=w`: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}.calcite-dropdown-wrapper{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown);inline-size:max-content;display:none;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}.calcite-dropdown-wrapper .calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);transition-property:inset,left,opacity;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.calcite-dropdown-wrapper[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.calcite-dropdown-wrapper[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.calcite-dropdown-wrapper[data-placement^=left] .calcite-floating-ui-anim{left:5px}.calcite-dropdown-wrapper[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.calcite-dropdown-wrapper[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}.calcite-dropdown-content{max-height:45vh;width:auto;overflow-y:auto;overflow-x:hidden;background-color:var(--calcite-color-foreground-1);inline-size:var(--calcite-dropdown-width)}.calcite-trigger-container{position:relative;display:flex;height:100%;flex:1 1 auto;word-wrap:break-word;word-break:break-word}.width-s{--calcite-dropdown-width: 12rem}.width-m{--calcite-dropdown-width: 14rem}.width-l{--calcite-dropdown-width: 16rem}@media (forced-colors: active){:host([open]) .calcite-dropdown-wrapper{border:1px solid canvasText}}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,m=class extends f{constructor(){super(),this.focusLastDropdownItem=!1,this.groups=[],this.guid=`calcite-dropdown-${b()}`,this.items=[],this.mutationObserver=c("mutation",()=>this.updateItems()),this.onOpenEnd=()=>{this.focusOnFirstActiveOrDefaultItem(),this.el.removeEventListener("calciteDropdownOpen",this.onOpenEnd)},this.transitionProp="opacity",this.resizeObserver=c("resize",e=>this.resizeObserverCallback(e)),this.closeOnSelectDisabled=!1,this.disabled=!1,this.maxItems=0,this.open=!1,this.overlayPositioning="absolute",this.placement=p,this.scale="m",this.selectedItems=[],this.type="click",this.calciteDropdownBeforeClose=o({cancelable:!1}),this.calciteDropdownBeforeOpen=o({cancelable:!1}),this.calciteDropdownClose=o({cancelable:!1}),this.calciteDropdownOpen=o({cancelable:!1}),this.calciteDropdownSelect=o({cancelable:!1}),this.listenOn(window,"click",this.closeCalciteDropdownOnClick),this.listen("calciteInternalDropdownCloseRequest",this.closeCalciteDropdownOnEvent),this.listenOn(window,"calciteDropdownOpen",this.closeCalciteDropdownOnOpenEvent),this.listen("pointerenter",this.pointerEnterHandler),this.listen("pointerleave",this.pointerLeaveHandler),this.listen("calciteInternalDropdownItemKeyEvent",this.calciteInternalDropdownItemKeyEvent),this.listen("calciteInternalDropdownItemSelect",this.handleItemSelect)}static{this.properties={closeOnSelectDisabled:7,disabled:7,flipPlacements:0,maxItems:11,open:7,overlayPositioning:3,placement:3,scale:3,selectedItems:0,type:3,widthScale:3,width:3}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=F}async reposition(e=!1){let{floatingEl:t,referenceEl:i,placement:s,overlayPositioning:H,filteredFlipPlacements:z}=this;return C(this,{floatingEl:t,referenceEl:i,overlayPositioning:H,placement:s,flipPlacements:z,type:"menu"},e)}async setFocus(){await D(this),v(this.referenceEl)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),this.updateItems(),n(this)}load(){}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),e.has("flipPlacements")&&this.flipPlacementsHandler(),e.has("maxItems")&&this.hasUpdated&&this.setMaxScrollerHeight(),(e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||e.has("placement")&&(this.hasUpdated||this.placement!==p))&&this.reposition(!0),e.has("scale")&&(this.hasUpdated||this.scale!=="m")&&this.handlePropsChange()}updated(){E(this)}loaded(){this.updateSelectedItems(),n(this)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),P(this)}openHandler(){I(this),!this.disabled&&this.reposition(!0)}handleDisabledChange(e){e||(this.open=!1)}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}handlePropsChange(){this.updateItems(),this.updateGroupScale()}closeCalciteDropdownOnClick(e){this.disabled||!this.open||e.composedPath().includes(this.el)||this.closeCalciteDropdown(!1)}closeCalciteDropdownOnEvent(e){this.closeCalciteDropdown(),e.stopPropagation()}closeCalciteDropdownOnOpenEvent(e){e.composedPath().includes(this.el)||(this.open=!1)}pointerEnterHandler(){this.disabled||this.type!=="hover"||this.toggleDropdown()}pointerLeaveHandler(){this.disabled||this.type!=="hover"||this.closeCalciteDropdown()}getTraversableItems(){return this.items.filter(e=>!e.disabled&&!e.hidden)}calciteInternalDropdownItemKeyEvent(e){let{keyboardEvent:t}=e.detail,i=t.target,s=this.getTraversableItems();switch(t.key){case"Tab":this.open=!1,this.updateTabIndexOfItems(i);break;case"ArrowDown":a(s,i,"next");break;case"ArrowUp":a(s,i,"previous");break;case"Home":a(s,i,"first");break;case"End":a(s,i,"last");break}e.stopPropagation()}handleItemSelect(e){this.updateSelectedItems(),e.stopPropagation(),this.calciteDropdownSelect.emit(),(!this.closeOnSelectDisabled||e.detail.requestedDropdownGroup.selectionMode==="none")&&this.closeCalciteDropdown(),e.stopPropagation()}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?x(t,e):null}updateTriggers(e){this.triggers=e.target.assignedElements({flatten:!0}),this.reposition(!0)}updateItems(){this.items=this.groups.map(e=>Array.from(e?.querySelectorAll("calcite-dropdown-item"))).reduce((e,t)=>[...e,...t],[]),this.updateSelectedItems(),this.reposition(!0),this.items.forEach(e=>e.scale=this.scale)}updateGroups(e){let t=e.target.assignedElements({flatten:!0}).filter(i=>i?.matches("calcite-dropdown-group"));this.groups=t,this.updateItems(),this.updateGroupScale()}updateGroupScale(){this.groups?.forEach(e=>e.scale=this.scale)}resizeObserverCallback(e){e.forEach(t=>{let{target:i}=t;this.hasUpdated&&(i===this.referenceEl?this.setDropdownWidth():i===this.scrollerEl&&this.setMaxScrollerHeight())})}setDropdownWidth(){let{referenceEl:e,scrollerEl:t}=this,i=e?.clientWidth;t.style.minWidth=`${i}px`}setMaxScrollerHeight(){let e=this.getMaxScrollerHeight();this.scrollerEl.style.maxBlockSize=e>0?`${e}px`:"",this.reposition(!0)}setScrollerAndTransitionEl(e){e&&this.resizeObserver?.observe(e),this.scrollerEl=e,this.transitionEl=e}onBeforeOpen(){this.calciteDropdownBeforeOpen.emit()}onOpen(){this.calciteDropdownOpen.emit()}onBeforeClose(){this.calciteDropdownBeforeClose.emit()}onClose(){this.calciteDropdownClose.emit(),k(this)}setReferenceEl(e){this.referenceEl=e,n(this),e&&this.resizeObserver?.observe(e)}setFloatingEl(e){this.floatingEl=e,n(this)}keyDownHandler(e){if(!e.composedPath().includes(this.referenceEl))return;let{defaultPrevented:t,key:i}=e;if(!t){if(i==="Escape"){this.closeCalciteDropdown(),e.preventDefault();return}if(this.open&&e.shiftKey&&i==="Tab"){this.closeCalciteDropdown(),e.preventDefault();return}O(i)?(this.toggleDropdown(),e.preventDefault()):(i==="ArrowDown"||i==="ArrowUp")&&(e.preventDefault(),this.focusLastDropdownItem=i==="ArrowUp",this.open=!0,this.el.addEventListener("calciteDropdownOpen",this.onOpenEnd))}}updateSelectedItems(){this.selectedItems=this.items.filter(e=>e.selected)}getMaxScrollerHeight(){let{maxItems:e,items:t}=this;return t.length>=e&&e>0?this.getYDistance(this.scrollerEl,t[e-1]):0}getYDistance(e,t){let i=e.getBoundingClientRect();return t.getBoundingClientRect().bottom-i.top}closeCalciteDropdown(e=!0){this.open=!1,e&&d(this.triggers[0])}focusOnFirstActiveOrDefaultItem(){let e=this.getTraversableItems().find(t=>t.selected)||(this.focusLastDropdownItem?this.items[this.items.length-1]:this.items[0]);this.focusLastDropdownItem=!1,e&&d(e)}toggleDropdown(){this.open=!this.open,this.open&&this.el.addEventListener("calciteDropdownOpen",this.onOpenEnd)}updateTabIndexOfItems(e){this.items.forEach(t=>{t.tabIndex=e!==t?-1:0})}render(){let{open:e,guid:t}=this;return y({disabled:this.disabled,children:u`<div class="calcite-trigger-container" .id=${`${t}-menubutton`} @click=${this.toggleDropdown} @keydown=${this.keyDownHandler} ${r(this.setReferenceEl)}><slot aria-controls=${`${t}-menu`} .ariaExpanded=${e} aria-haspopup=menu name=${T.dropdownTrigger} @slotchange=${this.updateTriggers}></slot></div><div .ariaHidden=${!e} class=${l({[$.wrapper]:!0,[S("width",this.width,this.widthScale)]:!!(this.width||this.widthScale)})} ${r(this.setFloatingEl)}><div aria-labelledby=${`${t}-menubutton`} class=${l({[$.content]:!0,[h.animation]:!0,[h.animationActive]:e})} .id=${`${t}-menu`} role=menu ${r(this.setScrollerAndTransitionEl)}><slot @slotchange=${this.updateGroups}></slot></div></div>`})}};g("calcite-dropdown",m);export{m as Dropdown};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
|
+
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{k as m}from"./FYUK2GME.js";import{c as g}from"./HMZA4X6S.js";import"./4GUL5QXY.js";import"./5YBMD5MK.js";import{a as I}from"./RSI5VQHT.js";import{a as b,b as d}from"./QV6PXGLB.js";import{H as A,J as E,e as C,f as o,j as z,k as x,v as u,w as T,x as c}from"./D7X7U5LL.js";var n={bordered:"bordered",striped:"striped",selectionArea:"selection-area",paginationArea:"pagination-area",container:"container",tableContainer:"table-container",tableFixed:"table--fixed",assistiveText:"assistive-text",selectionActions:"selection-actions"},w={selectionActions:"selection-actions",tableHeader:"table-header",tableFooter:"table-footer"},L=C`@charset "UTF-8";:host([scale=s]){--calcite-internal-table-cell-padding: .25rem;--calcite-internal-table-cell-font-size: var(--calcite-font-size--2);--calcite-internal-table-cell-font-size-secondary: var(--calcite-font-size--3)}:host([scale=m]){--calcite-internal-table-cell-padding: .5rem;--calcite-internal-table-cell-font-size: var(--calcite-font-size--1);--calcite-internal-table-cell-font-size-secondary: var(--calcite-font-size--2)}:host([scale=l]){--calcite-internal-table-cell-padding: 1rem;--calcite-internal-table-cell-font-size: var(--calcite-font-size-0);--calcite-internal-table-cell-font-size-secondary: var(--calcite-font-size--1)}:host{display:flex}.container{display:flex;block-size:100%;inline-size:100%;flex-direction:column}.table-container{overflow:auto;white-space:nowrap;border:1px solid var(--calcite-color-border-3)}.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}table{inline-size:100%;border-collapse:collapse;overflow-x:scroll}@-moz-document url-prefix(){table{border-collapse:separate;border-spacing:0}}.table--fixed{table-layout:fixed}.bordered ::slotted(calcite-table-row){--calcite-table-row-border-color: var(--calcite-color-border-3)}.striped ::slotted(calcite-table-row:nth-child(2n+1)){--calcite-table-row-background: var(--calcite-color-foreground-2)}.selection-actions{display:flex;flex-direction:row;margin-inline-start:auto}.selection-area{display:flex;flex-direction:row;align-items:center;padding-block:var(--calcite-internal-table-cell-padding)}.selection-area calcite-chip:last-of-type{margin-inline-end:.5rem}.selection-area calcite-chip:last-of-type:not(:first-of-type){margin-inline-start:.5rem}.selection-area calcite-button{margin-inline-end:1rem}.pagination-area{display:flex;inline-size:100%;flex-direction:row;justify-content:center;padding-block:var(--calcite-internal-table-cell-padding)}calcite-pagination{flex:1;justify-content:center}:host([hidden]){display:none}[hidden]{display:none}`,f=class extends T{constructor(){super(),this.paginationEl=b(),this.tableBodySlotEl=b(),this.tableFootSlotEl=b(),this.tableHeadSlotEl=b(),this.colCount=0,this.pageStartRow=1,this.selectedCount=0,this.bordered=!1,this.groupSeparator=!1,this.interactionMode="interactive",this.layout="auto",this.messages=I({blocking:!0}),this.numbered=!1,this.pageSize=0,this.scale="m",this._selectedItems=[],this.selectionDisplay="top",this.selectionMode="none",this.striped=!1,this.calciteInternalTableRowFocusChange=u({cancelable:!1}),this.calciteTablePageChange=u({cancelable:!1}),this.calciteTableSelect=u({cancelable:!1}),this.listen("calciteTableRowSelect",this.calciteTableRowSelectListener),this.listen("calciteInternalTableRowSelect",this.calciteInternalTableRowSelectListener),this.listen("calciteInternalTableRowFocusRequest",this.calciteInternalTableRowFocusEvent)}static{this.properties={colCount:16,pageStartRow:16,readCellContentsToAT:16,selectedCount:16,bordered:7,caption:1,groupSeparator:7,interactionMode:3,layout:3,messageOverrides:0,numbered:7,numberingSystem:3,pageSize:11,scale:3,selectedItems:32,_selectedItems:16,selectionDisplay:3,selectionMode:3,striped:7}}static{this.styles=L}get selectedItems(){return this._selectedItems}async load(){this.readCellContentsToAT=/safari/i.test(A()),this.listenOn(this.el.shadowRoot,"slotchange",this.handleSlotChange)}willUpdate(e){(e.has("groupSeparator")&&(this.hasUpdated||this.groupSeparator!==!1)||e.has("interactionMode")&&(this.hasUpdated||this.interactionMode!=="interactive")||e.has("numbered")&&(this.hasUpdated||this.numbered!==!1)||e.has("numberingSystem")||e.has("pageSize")&&(this.hasUpdated||this.pageSize!==0)||e.has("scale")&&(this.hasUpdated||this.scale!=="m")||e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="none"))&&this.updateRows()}loaded(){}handleSlotChange(){this.updateRows()}calciteTableRowSelectListener(e){e.composedPath().includes(this.el)&&this.setSelectedItems(e.target)}calciteInternalTableRowSelectListener(e){e.composedPath().includes(this.el)&&this.updateSelectedItems(!1)}calciteInternalTableRowFocusEvent(e){let i=e.detail.cellPosition,s=e.detail.rowPosition,a=e.detail.destination,h=e.detail.lastCell,t=this.bodyRows?.filter(p=>!g(p)),l=this.allRows?.filter(p=>!g(p)),S=this.headRows[this.headRows.length-1]?.positionAll,R=t[0]?.positionAll,y=t[t.length-1]?.positionAll,$=this.footRows[0]?.positionAll,M=l[l.length-1]?.positionAll,F=a==="next"&&s===S,k=a==="previous"&&s===$,P=a==="previous"&&s===R,H=a==="next"&&s===y,r;switch(a){case"first":r=0;break;case"last":r=M;break;case"next":r=F?R:H?$:s+1;break;case"previous":r=k?y:P?S:s-1;break}let v=this.allRows?.find(p=>p.positionAll===r)?.cellCount,O=i>v?v:i;r!==void 0&&this.calciteInternalTableRowFocusChange.emit({cellPosition:O,rowPosition:r,destination:a,lastCell:h})}getSlottedRows(e){return e?.assignedElements({flatten:!0})?.filter(i=>i?.matches("calcite-table-row"))}updateRows(){let e=this.getSlottedRows(this.tableHeadSlotEl.value)||[],i=this.getSlottedRows(this.tableBodySlotEl.value)||[],s=this.getSlottedRows(this.tableFootSlotEl.value)||[],a=[...e,...i,...s];e?.forEach(t=>{let l=e?.indexOf(t);t.rowType="head",t.positionSection=l,t.positionSectionLocalized=this.localizeNumber((l+1).toString())}),i?.forEach(t=>{let l=i?.indexOf(t);t.rowType="body",t.positionSection=l,t.positionSectionLocalized=this.localizeNumber((l+1).toString())}),s?.forEach(t=>{let l=s?.indexOf(t);t.rowType="foot",t.positionSection=l,t.positionSectionLocalized=this.localizeNumber((l+1).toString())}),a?.forEach(t=>{t.interactionMode=this.interactionMode,t.selectionMode=this.selectionMode,t.bodyRowCount=i?.length,t.positionAll=a?.indexOf(t),t.numbered=this.numbered,t.scale=this.scale,t.readCellContentsToAT=this.readCellContentsToAT,t.lastVisibleRow=a?.indexOf(t)===a.length-1});let h=e[0]?.cellCount||e[0]?.querySelectorAll("calcite-table-header")?.length;this.colCount=h,this.headRows=e,this.bodyRows=i,this.footRows=s,this.allRows=a,this.updateSelectedItems(),this.paginateRows()}handlePaginationChange(){let e=this.paginationEl.value?.startItem;this.pageStartRow=e||1,this.calciteTablePageChange.emit(),this.updateRows()}paginateRows(){this.bodyRows?.forEach(e=>{let i=e.positionSection+1,s=i>=this.pageStartRow&&i<this.pageStartRow+this.pageSize;e.itemHidden=this.pageSize>0&&!s&&!this.footRows.includes(e),e.lastVisibleRow=i===this.pageStartRow+this.pageSize-1||i===this.bodyRows.length})}updateSelectedItems(e){let i=this.bodyRows?.filter(s=>s.selected);this._selectedItems=i,this.selectedCount=i?.length,this.allRows?.forEach(s=>{s.selectedRowCount=this.selectedCount,s.selectedRowCountLocalized=this.localizeNumber(this.selectedCount)}),e&&this.calciteTableSelect.emit()}handleDeselectAllRows(){this.bodyRows?.forEach(e=>{e.selected=!1}),this.updateSelectedItems(!0)}setSelectedItems(e){this.bodyRows?.forEach(i=>{e?.rowType==="head"?i.selected=this.selectedCount!==this.bodyRows?.length:i.selected=e===i?!i.selected:this.selectionMode==="multiple"?i.selected:!1}),this.updateSelectedItems(!0)}localizeNumber(e){return m.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},m.localize(e.toString())}renderSelectionArea(){let e=this._selectedItems?.filter(h=>g(h))?.length,i=this.localizeNumber(e?.toString()),s=`${this.localizeNumber(this.selectedCount?.toString())} ${this.messages.selected}`,a=`${i} ${this.messages.hiddenSelected}`;return o`<div class=${c(n.selectionArea)}><calcite-chip .kind=${this.selectedCount>0?"brand":"neutral"} .label=${s} .scale=${this.scale} .value=${s}>${s}</calcite-chip>${e>0&&o`<calcite-chip icon=hide-empty .label=${a} .scale=${this.scale} title=${a??z} .value=${a}>${i}</calcite-chip>`||""}${this.selectedCount>0&&o`<calcite-button icon-start=x kind=neutral @click=${this.handleDeselectAllRows} round .scale=${this.scale} .title=${`${this.messages.clear} ${s} ${this.messages.row}`}>${this.messages.clear}</calcite-button>`||""}<div class=${c(n.selectionActions)}><slot name=${w.selectionActions}></slot></div></div>`}renderPaginationArea(){return o`<div class=${c(n.paginationArea)}><calcite-pagination .groupSeparator=${this.groupSeparator} .numberingSystem=${this.numberingSystem} @calcitePaginationChange=${this.handlePaginationChange} .pageSize=${this.pageSize} .scale=${this.scale} start-item=1 .totalItems=${this.bodyRows?.length} ${d(this.paginationEl)}></calcite-pagination></div>`}renderTHead(){return o`<thead><slot name=${w.tableHeader} ${d(this.tableHeadSlotEl)}></slot></thead>`}renderTBody(){return o`<tbody><slot ${d(this.tableBodySlotEl)}></slot></tbody>`}renderTFoot(){return o`<tfoot><slot name=${w.tableFooter} ${d(this.tableFootSlotEl)}></slot></tfoot>`}render(){return o`<div class=${c(n.container)}>${this.selectionMode!=="none"&&this.selectionDisplay!=="none"&&this.renderSelectionArea()||""}<div class=${c({[n.bordered]:this.bordered,[n.striped]:this.striped,[n.tableContainer]:!0})}><table .ariaColCount=${this.colCount} .ariaMultiSelectable=${this.selectionMode==="multiple"?"true":null} .ariaRowCount=${this.allRows?.length} class=${c({[n.tableFixed]:this.layout==="fixed"})} .role=${this.interactionMode==="interactive"?"grid":"table"} ${d(e=>{e&&x(o`<caption class=${c(n.assistiveText)}>${this.caption}</caption>${this.renderTHead()}${this.renderTBody()}${this.renderTFoot()}`,e)})}></table></div>${this.pageSize>0&&this.renderPaginationArea()||""}</div>`}};E("calcite-table",f);export{f as Table};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
|
+
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{a as h}from"./PA6PSCEP.js";import{a as $}from"./5YBMD5MK.js";import{b as r}from"./QV6PXGLB.js";import{a as u,b as d,c as M,d as B}from"./TTPB5NUF.js";import{l as x,r as b}from"./NLK3OCCK.js";import{b as I}from"./6OPQR7PL.js";import{a as v}from"./OLP7ABVK.js";import{J as E,e as m,f as a,j as l,v as f,w as g,x as c}from"./D7X7U5LL.js";var k=m`:host{box-sizing:border-box;display:flex;flex-direction:column;font-size:var(--calcite-font-size-1)}::slotted(calcite-action-group:not(:last-of-type)){border-block-end-width:var(--calcite-border-width-sm)}.default-trigger{position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}slot[name=trigger]::slotted(calcite-action),calcite-action::slotted([slot=trigger]){position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}.menu{display:flex;max-block-size:45vh;flex-direction:column;flex-wrap:nowrap;overflow-y:auto;overflow-x:hidden;outline:2px solid transparent;outline-offset:2px;gap:var(--calcite-action-menu-items-space, 0)}:host([hidden]){display:none}[hidden]{display:none}`,C=["ArrowUp","ArrowDown","End","Home"],p=class extends g{constructor(){super(...arguments),this.guid=`calcite-action-menu-${v()}`,this.actionElements=[],this.menuButtonClick=()=>{this.toggleOpen()},this.menuButtonId=`${this.guid}-menu-button`,this.menuButtonKeyDown=e=>{let{key:t}=e,{actionElements:n,activeMenuItemIndex:i,open:o}=this;if(n.length){if($(t)){if(e.preventDefault(),!o){this.toggleOpen();return}let s=n[i];s?s.click():this.toggleOpen(!1)}if(t==="Tab"){this.open=!1;return}if(t==="Escape"){this.toggleOpen(!1),e.preventDefault();return}this.handleActionNavigation(e,t,n)}},this.menuId=`${this.guid}-menu`,this._open=!1,this.updateAction=(e,t)=>{let{guid:n,activeMenuItemIndex:i}=this,o=`${n}-action-${t}`;e.tabIndex=-1,e.setAttribute("role","menuitem"),e.id||(e.id=o),e.toggleAttribute(B,t===i)},this.activeMenuItemIndex=-1,this.appearance="solid",this.expanded=!1,this.overlayPositioning="absolute",this.placement="auto",this.scale="m",this.calciteActionMenuOpen=f({cancelable:!1})}static{this.properties={activeMenuItemIndex:16,menuButtonEl:16,appearance:3,expanded:7,flipPlacements:0,label:1,open:7,overlayPositioning:3,placement:3,scale:3}}static{this.styles=k}get open(){return this._open}set open(e){let t=this._open;e!==t&&(this._open=e,this.openHandler(e))}async setFocus(){return await I(this),x(this.menuButtonEl)}connectedCallback(){super.connectedCallback(),this.connectMenuButtonEl()}load(){}willUpdate(e){e.has("expanded")&&(this.hasUpdated||this.expanded!==!1)&&this.expandedHandler(),e.has("activeMenuItemIndex")&&(this.hasUpdated||this.activeMenuItemIndex!==-1)&&this.updateActions(this.actionElements)}loaded(){}disconnectedCallback(){super.disconnectedCallback(),this.disconnectMenuButtonEl()}expandedHandler(){this.open=!1,this.setTooltipReferenceElement()}openHandler(e){this.menuButtonEl&&(this.menuButtonEl.active=e),this.popoverEl&&(this.popoverEl.open=e),this.activeMenuItemIndex=this.open?0:-1,this.calciteActionMenuOpen.emit(),this.setTooltipReferenceElement()}connectMenuButtonEl(){let{menuButtonId:e,menuId:t,open:n,label:i}=this,o=this.slottedMenuButtonEl||this.defaultMenuButtonEl;this.menuButtonEl!==o&&(this.disconnectMenuButtonEl(),this.menuButtonEl=o,this.setTooltipReferenceElement(),o&&(o.active=n,o.setAttribute("aria-controls",t),o.setAttribute("aria-expanded",b(n)),o.setAttribute("aria-haspopup","true"),o.id||(o.id=e),o.label||(o.label=i),o.text||(o.text=i),o.addEventListener("click",this.menuButtonClick),o.addEventListener("keydown",this.menuButtonKeyDown)))}disconnectMenuButtonEl(){let{menuButtonEl:e}=this;e&&(e.removeEventListener("click",this.menuButtonClick),e.removeEventListener("keydown",this.menuButtonKeyDown),this.menuButtonEl=null)}setMenuButtonEl(e){let t=e.target.assignedElements({flatten:!0}).filter(n=>n?.matches("calcite-action"));this.slottedMenuButtonEl=t[0],this.connectMenuButtonEl()}setDefaultMenuButtonEl(e){this.defaultMenuButtonEl=e,e&&this.connectMenuButtonEl()}setPopoverEl(e){e&&(this.popoverEl=e,e.open=this.open)}handleCalciteActionClick(){this.open=!1,this.setFocus()}updateTooltip(e){let t=e.target.assignedElements({flatten:!0}).filter(n=>n?.matches("calcite-tooltip"));this.tooltipEl=t[0],this.setTooltipReferenceElement()}setTooltipReferenceElement(){let{tooltipEl:e,expanded:t,menuButtonEl:n,open:i}=this;e&&(e.referenceElement=!t&&!i?n:null)}updateActions(e){e?.forEach(this.updateAction)}handleDefaultSlotChange(e){let t=e.target.assignedElements({flatten:!0}).reduce((n,i)=>i?.matches("calcite-action")?(n.push(i),n):i?.matches("calcite-action-group")?n.concat(Array.from(i.querySelectorAll("calcite-action"))):n,[]);this.actionElements=t.filter(n=>!n.disabled&&!n.hidden)}isValidKey(e,t){return!!t.find(n=>n===e)}handleActionNavigation(e,t,n){if(!this.isValidKey(t,C))return;if(e.preventDefault(),!this.open){this.toggleOpen(),(t==="Home"||t==="ArrowDown")&&(this.activeMenuItemIndex=0),(t==="End"||t==="ArrowUp")&&(this.activeMenuItemIndex=n.length-1);return}t==="Home"&&(this.activeMenuItemIndex=0),t==="End"&&(this.activeMenuItemIndex=n.length-1);let i=this.activeMenuItemIndex;t==="ArrowUp"&&(this.activeMenuItemIndex=h(Math.max(i-1,-1),n.length)),t==="ArrowDown"&&(this.activeMenuItemIndex=h(i+1,n.length))}toggleOpen(e=!this.open){this.open=e}handlePopoverOpen(){this.open=!0,this.setFocus()}handlePopoverClose(){this.open=!1}renderMenuButton(){let{appearance:e,label:t,scale:n,expanded:i}=this;return a`<slot name=${d.trigger} @slotchange=${this.setMenuButtonEl}><calcite-action .appearance=${e} class=${c(u.defaultTrigger)} .icon=${M.menu} .scale=${n} .text=${t} .textEnabled=${i} ${r(this.setDefaultMenuButtonEl)}></calcite-action></slot>`}renderMenuItems(){let{actionElements:e,activeMenuItemIndex:t,menuId:n,menuButtonEl:i,label:o,placement:s,overlayPositioning:A,flipPlacements:y}=this,w=e[t]?.id||null;return a`<calcite-popover auto-close .flipPlacements=${y} focus-trap-disabled .label=${o} offset-distance=0 @calcitePopoverClose=${this.handlePopoverClose} @calcitePopoverOpen=${this.handlePopoverOpen} .overlayPositioning=${A} .placement=${s} pointer-disabled .referenceElement=${i} trigger-disabled ${r(this.setPopoverEl)}><div aria-activedescendant=${w??l} aria-labelledby=${i?.id??l} class=${c(u.menu)} id=${n??l} @click=${this.handleCalciteActionClick} role=menu tabindex=-1><slot @slotchange=${this.handleDefaultSlotChange}></slot></div></calcite-popover>`}render(){return a`${this.renderMenuButton()}${this.renderMenuItems()}<slot name=${d.tooltip} @slotchange=${this.updateTooltip}></slot>`}};E("calcite-action-menu",p);export{p as ActionMenu};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
|
+
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{a as ne}from"./6GK2OTHZ.js";import{a as q,b as m,c as _,d as G,e as J,k as l}from"./FYUK2GME.js";import{a as ie}from"./DYHX5C6J.js";import{a as Y,c as Z,e as ee,g as I,h as te}from"./DJU4LSIS.js";import{c as Q,d as X,e as z}from"./HEVM6SRJ.js";import{b as E,c as ae}from"./F52GIETG.js";import{a as L,b as j}from"./X6EDNQN2.js";import{a as g}from"./HMZA4X6S.js";import"./4GUL5QXY.js";import{a as P}from"./TTARWRVZ.js";import{b as R}from"./5YBMD5MK.js";import{a as K}from"./RSI5VQHT.js";import{a as w,b as f}from"./QV6PXGLB.js";import{e as M,n as A,p as $,x as U}from"./NLK3OCCK.js";import{b as W}from"./6OPQR7PL.js";import"./OLP7ABVK.js";import{B as k,C as T,J as F,c as S,e as C,f as s,j as i,u as x,v,w as D,x as o}from"./D7X7U5LL.js";var r={loader:"loader",clearButton:"clear-button",editingEnabled:"editing-enabled",inlineChild:"inline-child",inputIcon:"icon",prefix:"prefix",suffix:"suffix",numberButtonWrapper:"number-button-wrapper",buttonItemHorizontal:"number-button-item--horizontal",wrapper:"element-wrapper",inputWrapper:"wrapper",actionWrapper:"action-wrapper",numberButtonItem:"number-button-item",hasSuffix:"has-suffix",hasPrefix:"has-prefix"},V={validationMessage:"inputValidationMessage"},re={tel:"phone",password:"lock",email:"email-address",date:"calendar",time:"clock",search:"search"},le={action:"action"},ce=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:block}:host([scale=s]) input,:host([scale=s]) .prefix,:host([scale=s]) .suffix{block-size:1.5rem;padding-inline:.5rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s]) input[type=file],:host([scale=s]) textarea{min-block-size:1.5rem}:host([scale=s]) .number-button-wrapper,:host([scale=s]) .action-wrapper calcite-button,:host([scale=s]) .action-wrapper calcite-button button{block-size:1.5rem}:host([scale=s]) .clear-button{min-block-size:1.5rem;min-inline-size:1.5rem}:host([scale=s]) textarea{block-size:auto;padding-block:.25rem;padding-inline:.5rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]) input,:host([scale=m]) .prefix,:host([scale=m]) .suffix{block-size:2rem;padding-inline:.75rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) textarea,:host([scale=m]) input[type=file]{min-block-size:2rem}:host([scale=m]) .number-button-wrapper,:host([scale=m]) .action-wrapper calcite-button,:host([scale=m]) .action-wrapper calcite-button button{block-size:2rem}:host([scale=m]) .clear-button{min-block-size:2rem;min-inline-size:2rem}:host([scale=m]) textarea{block-size:auto;padding-block:.5rem;padding-inline:.75rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]) input,:host([scale=l]) .prefix,:host([scale=l]) .suffix{block-size:2.75rem;padding-inline:1rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) textarea,:host([scale=l]) input[type=file]{min-block-size:2.75rem}:host([scale=l]) .number-button-wrapper,:host([scale=l]) .action-wrapper calcite-button,:host([scale=l]) .action-wrapper calcite-button button{block-size:2.75rem}:host([scale=l]) .clear-button{min-block-size:2.75rem;min-inline-size:2.75rem}:host([scale=l]) textarea{block-size:auto;padding-block:.75rem;padding-inline:1rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([disabled]) textarea{resize:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}textarea,input{position:relative;margin:0;box-sizing:border-box;display:flex;max-block-size:100%;inline-size:100%;max-inline-size:100%;flex:1 1 0%;text-overflow:ellipsis;border-width:1px;border-style:solid;font-family:inherit;font-weight:var(--calcite-font-weight-normal);border-color:var(--calcite-input-border-color, var(--calcite-color-border-input));background-color:var(--calcite-input-background-color, var(--calcite-color-foreground-1));color:var(--calcite-input-text-color, var(--calcite-color-text-1));transition:var(--calcite-animation-timing),block-size 0,outline-offset 0s;-webkit-appearance:none}textarea:placeholder-shown,input:placeholder-shown{text-overflow:ellipsis}::placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-placeholder-text-color, var(--calcite-color-text-3))}textarea{border-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp))}input{border-start-start-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp));border-start-end-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp));border-end-start-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp));border-end-end-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp))}.has-prefix input{border-start-start-radius:0;border-end-start-radius:0}.has-suffix input,.element-wrapper:has(.clear-button) input,:host([number-button-type=vertical][type=number]) input,:host([number-button-type=horizontal]) .has-suffix .suffix,:host([number-button-type=vertical][type=number]) .has-suffix .suffix,:host([number-button-type=vertical][type=number]) .clear-button,:host([number-button-type=horizontal][type=number]) .clear-button{border-start-end-radius:0;border-end-end-radius:0}:host([number-button-type=horizontal]) input{border-start-start-radius:0;border-start-end-radius:0;border-end-start-radius:0;border-end-end-radius:0}.has-prefix .prefix:first-child,:host([number-button-type=horizontal]) .number-button-item[data-adjustment=down]{border-start-start-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp));border-end-start-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp))}.has-suffix .suffix,:host([number-button-type=vertical][type=number][read-only]) .has-suffix .suffix,:host([clearable]) .clear-button,:host([number-button-type=horizontal]) .number-button-item[data-adjustment=up]{border-end-end-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp));border-start-end-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp))}:host([clearable]) .has-suffix .clear-button{border-end-end-radius:0;border-start-end-radius:0}:host([number-button-type=vertical]) .number-button-item[data-adjustment=down]{border-block-start-width:0px;border-end-end-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp))}:host([number-button-type=vertical]) .number-button-item[data-adjustment=up]{border-start-end-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp))}input[type=search]::-webkit-search-decoration{-webkit-appearance:none}input:focus,textarea:focus{border-color:var(--calcite-color-brand);color:var(--calcite-input-text-color, var(--calcite-color-text-1))}input[readonly],textarea[readonly]{font-weight:var(--calcite-font-weight-medium);background-color:var(--calcite-input-background-color, var(--calcite-color-background))}input[readonly]:focus,textarea[readonly]:focus{color:var(--calcite-input-text-color, var(--calcite-color-text-1))}textarea,input{outline-color:transparent}textarea:focus,input:focus{outline:2px solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(-2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([status=invalid]) input,:host([status=invalid]) textarea{border-color:var(--calcite-color-status-danger)}:host([status=invalid]) input:focus,:host([status=invalid]) textarea:focus{outline:2px solid var(--calcite-color-status-danger);outline-offset:calc(-2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([scale=s]) .icon{inset-inline-start:.5rem}:host([scale=m]) .icon{inset-inline-start:.75rem}:host([scale=l]) .icon{inset-inline-start:1rem}:host([icon][scale=s]) input{padding-inline-start:2rem}:host([icon][scale=m]) input{padding-inline-start:2.5rem}:host([icon][scale=l]) input{padding-inline-start:3.5rem}.element-wrapper{position:relative;order:3;display:inline-flex;flex:1 1 0%;align-items:center}.icon{pointer-events:none;position:absolute;display:block;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;color:var(--calcite-input-icon-color, var(--calcite-color-text-3));z-index:var(--calcite-z-index)}input[type=text]::-ms-clear,input[type=text]::-ms-reveal{display:none;block-size:0px;inline-size:0px}input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration,input[type=date]::-webkit-clear-button,input[type=time]::-webkit-clear-button{display:none}.clear-button{pointer-events:initial;order:4;margin:0;box-sizing:border-box;display:flex;min-block-size:100%;cursor:pointer;align-items:center;justify-content:center;align-self:stretch;border-width:1px;border-style:solid;outline-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;border-color:var(--calcite-input-border-color, var(--calcite-color-border-input));background-color:var(--calcite-input-actions-background-color, var(--calcite-color-foreground-1));border-inline-start-width:0px}.clear-button calcite-icon{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;color:var(--calcite-input-actions-icon-color, var(--calcite-color-text-3))}.clear-button:hover{background-color:var(--calcite-input-actions-background-color-hover, var(--calcite-color-foreground-2))}.clear-button:hover calcite-icon{color:var(--calcite-input-actions-icon-color-hover, var(--calcite-color-text-1))}.clear-button:active{background-color:var(--calcite-input-actions-background-color-press, var(--calcite-color-foreground-3))}.clear-button:active calcite-icon{color:var(--calcite-input-actions-icon-color-press, var(--calcite-color-text-1))}.clear-button:focus{outline:2px solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(-2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.clear-button:disabled{opacity:var(--calcite-opacity-disabled)}.loader{inset-block-start:1px;inset-inline:1px;pointer-events:none;position:absolute;display:block;--calcite-progress-background-color: var(--calcite-input-loading-background-color);--calcite-progress-fill-color: var(--calcite-input-loading-fill-color)}.action-wrapper{order:7;display:flex}.prefix,.suffix{box-sizing:border-box;display:flex;block-size:auto;min-block-size:100%;-webkit-user-select:none;user-select:none;align-content:center;align-items:center;overflow-wrap:break-word;border-width:1px;border-style:solid;font-weight:var(--calcite-font-weight-medium);line-height:1;border-color:var(--calcite-input-border-color, var(--calcite-color-border-input))}.prefix{order:2;border-inline-end-width:0px;inline-size:var(--calcite-input-prefix-size, auto);background-color:var(--calcite-input-prefix-background-color, var(--calcite-color-background));color:var(--calcite-input-prefix-text-color, var(--calcite-color-text-2))}.suffix{order:5;border-inline-start-width:0px;inline-size:var(--calcite-input-suffix-size, auto);background-color:var(--calcite-input-suffix-background-color, var(--calcite-color-background));color:var(--calcite-input-suffix-text-color, var(--calcite-color-text-2))}:host([alignment=start]) textarea,:host([alignment=start]) input{text-align:start}:host([alignment=end]) textarea,:host([alignment=end]) input{text-align:end}input[type=number]{-moz-appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;-moz-appearance:textfield;margin:0}.number-button-wrapper{pointer-events:none;order:6;box-sizing:border-box;display:flex;flex-direction:column;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}:host([number-button-type=vertical]) .wrapper{flex-direction:row;display:flex}:host([number-button-type=vertical]) input,:host([number-button-type=vertical]) textarea{order:2}:host([number-button-type=horizontal]) .calcite--rtl .number-button-item[data-adjustment=down] calcite-icon{transform:rotate(-90deg)}:host([number-button-type=horizontal]) .calcite--rtl .number-button-item[data-adjustment=up] calcite-icon{transform:rotate(-90deg)}.number-button-item.number-button-item--horizontal{border-color:var(--calcite-input-border-color, var(--calcite-color-border-input));order:1;max-block-size:100%;min-block-size:100%;align-self:stretch;border-width:1px;border-style:solid}.number-button-item.number-button-item--horizontal[data-adjustment=down] calcite-icon,.number-button-item.number-button-item--horizontal[data-adjustment=up] calcite-icon{transform:rotate(90deg)}.number-button-item.number-button-item--horizontal[data-adjustment=down]{border-inline-end-width:0px}.number-button-item.number-button-item--horizontal[data-adjustment=up]{border-inline-start-width:0px;order:5}.number-button-item{max-block-size:50%;min-block-size:50%;pointer-events:initial;margin:0;box-sizing:border-box;display:flex;cursor:pointer;align-items:center;align-self:center;border-width:1px;border-style:solid;background-color:var(--calcite-color-foreground-1);padding-block:0px;padding-inline:.5rem;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;border-color:var(--calcite-input-border-color, var(--calcite-color-border-input));background-color:var(--calcite-input-actions-background-color, var(--calcite-color-foreground-1));border-inline-start-width:0px}.number-button-item calcite-icon{pointer-events:none;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;color:var(--calcite-input-actions-icon-color, var(--calcite-color-text-3))}.number-button-item:hover{background-color:var(--calcite-input-actions-background-color-hover, var(--calcite-color-foreground-2))}.number-button-item:hover calcite-icon{color:var(--calcite-input-actions-icon-color-hover, var(--calcite-color-text-1))}.number-button-item:active{background-color:var(--calcite-input-actions-background-color-press, var(--calcite-color-foreground-3))}.number-button-item:active calcite-icon{color:var(--calcite-input-actions-icon-color-press, var(--calcite-color-text-1))}.number-button-item:disabled{pointer-events:none}.wrapper{position:relative;display:flex;flex-direction:row;align-items:center;border-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp));box-shadow:var(--calcite-input-shadow, var(--calcite-shadow-none))}input[type=date]::-webkit-input-placeholder{visibility:hidden!important}:host([type=color]) input{padding:.25rem}:host([type=file]) input{cursor:pointer;border-width:1px;border-style:dashed;background-color:var(--calcite-color-foreground-1);text-align:center;border-color:var(--calcite-input-border-color, var(--calcite-color-border-input));block-size:initial}:host([type=file][scale=s]) input{padding-block:1px;padding-inline:.5rem}:host([type=file][scale=m]) input{padding-block:.25rem;padding-inline:.75rem}:host([type=file][scale=l]) input{padding-block:.5rem;padding-inline:1rem}:host(.no-bottom-border) input{border-block-end-width:0px}:host(.border-top-color-one) input{border-block-start-color:var(--calcite-color-border-1)}input.inline-child{background-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out}input.inline-child .editing-enabled{background-color:inherit}input.inline-child:not(.editing-enabled){display:flex;cursor:pointer;text-overflow:ellipsis;border-color:transparent;padding-inline-start: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}`,N=class extends D{constructor(){super(),this.actionWrapperEl=w(),this.attributeWatch=S(["autofocus","enterkeyhint","inputmode","spellcheck"],this.handleGlobalAttributesChanged),this.childElType="input",this.inputWrapperEl=w(),this.onHiddenFormInputInput=e=>{e.target.name===this.name&&this.setValue({value:e.target.value,origin:"direct"}),this.setFocus(),e.stopPropagation()},this.previousValueOrigin="initial",this.userChangedValue=!1,this._value="",this.slottedActionElDisabledInternally=!1,this.alignment="start",this.clearable=!1,this.disabled=!1,this.editingEnabled=!1,this.groupSeparator=!1,this.iconFlipRtl=!1,this.loading=!1,this.localeFormat=!1,this.messages=K(),this.multiple=!1,this.numberButtonType="vertical",this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.type="text",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.calciteInputChange=v({cancelable:!1}),this.calciteInputInput=v(),this.calciteInternalInputBlur=v({cancelable:!1}),this.calciteInternalInputFocus=v({cancelable:!1}),this.listen("click",this.clickHandler),this.listen("keydown",this.keyDownHandler)}static{this.properties={displayedValue:16,slottedActionElDisabledInternally:16,accept:1,alignment:3,autocomplete:0,clearable:7,disabled:7,editingEnabled:7,files:0,form:3,groupSeparator:7,icon:[3,{converter:k}],iconFlipRtl:7,label:1,loading:7,localeFormat:5,max:11,maxLength:11,messageOverrides:0,min:11,minLength:11,multiple:5,name:3,numberButtonType:3,numberingSystem:3,pattern:1,placeholder:1,prefixText:1,readOnly:7,required:7,scale:3,status:3,step:3,suffixText:1,type:3,validationIcon:[3,{converter:k}],validationMessage:1,validity:0,value:1}}static{this.styles=ce}get isClearable(){return!this.isTextarea&&(this.clearable||this.type==="search")&&this.value?.length>0}get isTextarea(){return this.childElType==="textarea"}get value(){return this._value}set value(e){let t=this._value;e!==t&&(this._value=e,this.valueWatcher(e,t),e&&this._value===""&&this.setValue({origin:"reset",value:t}))}async selectText(){this.type==="number"?this.childNumberEl?.select():this.childEl?.select()}async setFocus(){await W(this),A(this.type==="number"?this.childNumberEl:this.childEl)}connectedCallback(){super.connectedCallback(),this.inlineEditableEl=this.el.closest("calcite-inline-editable"),this.inlineEditableEl&&(this.editingEnabled=this.inlineEditableEl.editingEnabled||!1),Q(this),Z(this),this.el.addEventListener(I,this.onHiddenFormInputInput)}async load(){this.childElType=this.type==="textarea"?"textarea":"input",this.maxString=this.max?.toString(),this.minString=this.min?.toString(),this.requestedIcon=$(re,this.icon,this.type),this.setPreviousEmittedValue(this.value),this.setPreviousValue(this.value),this.type==="number"&&(this.value==="Infinity"||this.value==="-Infinity"?(this.displayedValue=this.value,this.previousEmittedValue=this.value):(this.warnAboutInvalidNumberValue(this.value),this.setValue({origin:"connected",value:m(this.value)?this.value:""})))}willUpdate(e){e.has("max")&&(this.maxString=this.max?.toString()||null),e.has("min")&&(this.minString=this.min?.toString()||null),(e.has("icon")||e.has("type")&&(this.hasUpdated||this.type!=="text"))&&(this.requestedIcon=$(re,this.icon,this.type))}updated(){L(this)}loaded(){}disconnectedCallback(){super.disconnectedCallback(),X(this),ee(this),this.el.removeEventListener(I,this.onHiddenFormInputInput)}handleGlobalAttributesChanged(){this.requestUpdate()}valueWatcher(e,t){if(!this.userChangedValue){if(this.type==="number"&&(e==="Infinity"||e==="-Infinity")){this.displayedValue=e,this.previousEmittedValue=e;return}this.setValue({origin:"direct",previousValue:t,value:e==null||e==""?"":this.type==="number"?m(e)?e:this.previousValue||"":e}),this.warnAboutInvalidNumberValue(e)}this.userChangedValue=!1}keyDownHandler(e){this.readOnly||this.disabled||e.defaultPrevented||(this.isClearable&&e.key==="Escape"&&(this.clearInputValue(e),e.preventDefault()),e.key==="Enter"&&Y(this)&&e.preventDefault())}onLabelClick(){this.setFocus()}incrementOrDecrementNumberValue(e,t,a,d){let{value:n}=this;if(n==="Infinity"||n==="-Infinity")return;let c=e==="up"?1:-1,p=this.step==="any"?1:Math.abs(this.step||1),h=new q(n!==""?n:"0").add(`${p*c}`),u=()=>typeof a=="number"&&!isNaN(a)&&h.subtract(`${a}`).isNegative,b=()=>typeof t=="number"&&!isNaN(t)&&!h.subtract(`${t}`).isNegative,y=u()?`${a}`:b()?`${t}`:h.toString();this.setValue({committing:!0,nativeEvent:d,origin:"user",value:y})}clearInputValue(e){this.setValue({committing:!0,nativeEvent:e,origin:"user",value:""})}emitChangeIfUserModified(){this.previousValueOrigin==="user"&&this.value!==this.previousEmittedValue&&(this.calciteInputChange.emit(),this.setPreviousEmittedValue(this.value))}inputBlurHandler(){window.clearInterval(this.nudgeNumberValueIntervalId),this.calciteInternalInputBlur.emit(),this.emitChangeIfUserModified()}clickHandler(e){if(this.disabled)return;let t=e.composedPath();!t.includes(this.inputWrapperEl.value)||t.includes(this.actionWrapperEl.value)||this.setFocus()}inputFocusHandler(){this.calciteInternalInputFocus.emit()}inputInputHandler(e){this.disabled||this.readOnly||(this.type==="file"&&(this.files=this.childEl.files),this.setValue({nativeEvent:e,origin:"user",value:e.target.value}))}inputKeyDownHandler(e){this.disabled||this.readOnly||e.key==="Enter"&&this.emitChangeIfUserModified()}inputNumberInputHandler(e){if(this.disabled||this.readOnly||this.value==="Infinity"||this.value==="-Infinity")return;let t=e.target.value;l.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator};let a=l.delocalize(t);e.inputType==="insertFromPaste"?(m(a)||e.preventDefault(),this.setValue({nativeEvent:e,origin:"user",value:_(a)}),this.childNumberEl.value=this.displayedValue):this.setValue({nativeEvent:e,origin:"user",value:a})}inputNumberKeyDownHandler(e){if(this.type!=="number"||this.disabled||this.readOnly)return;if(this.value==="Infinity"||this.value==="-Infinity"){e.preventDefault(),(e.key==="Backspace"||e.key==="Delete")&&this.clearInputValue(e);return}if(e.key==="ArrowUp"){e.preventDefault(),this.nudgeNumberValue("up",e);return}if(e.key==="ArrowDown"){this.nudgeNumberValue("down",e);return}let t=[...R,"ArrowLeft","ArrowRight","Backspace","Delete","Enter","Escape","Tab"];if(e.altKey||e.ctrlKey||e.metaKey)return;let a=e.shiftKey&&e.key==="Tab";if(t.includes(e.key)||a){e.key==="Enter"&&this.emitChangeIfUserModified();return}l.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},!(e.key===l.decimal&&(!this.value&&!this.childNumberEl.value||this.value&&this.childNumberEl.value.indexOf(l.decimal)===-1))&&(/[eE]/.test(e.key)&&(!this.value&&!this.childNumberEl.value||this.value&&!/[eE]/.test(this.childNumberEl.value))||e.key==="-"&&(!this.value&&!this.childNumberEl.value||this.value&&this.childNumberEl.value.split("-").length<=2)||e.preventDefault())}nudgeNumberValue(e,t){if(t instanceof KeyboardEvent&&t.repeat||this.type!=="number")return;let a=this.maxString?parseFloat(this.maxString):null,d=this.minString?parseFloat(this.minString):null,n=150;this.incrementOrDecrementNumberValue(e,a,d,t),this.nudgeNumberValueIntervalId&&window.clearInterval(this.nudgeNumberValueIntervalId);let c=!0;this.nudgeNumberValueIntervalId=window.setInterval(()=>{if(c){c=!1;return}this.incrementOrDecrementNumberValue(e,a,d,t)},n)}numberButtonPointerUpAndOutHandler(){window.clearInterval(this.nudgeNumberValueIntervalId)}numberButtonPointerDownHandler(e){if(!U(e))return;e.preventDefault();let t=e.target.dataset.adjustment;this.disabled||this.nudgeNumberValue(t,e)}syncHiddenFormInput(e){ne(this.type,this,e)}setChildElRef(e){this.childEl=e}setChildNumberElRef(e){this.childNumberEl=e}setInputValue(e){this.type==="number"&&this.childNumberEl?this.childNumberEl.value=e:this.childEl&&(this.childEl.value=e)}setPreviousEmittedValue(e){this.previousEmittedValue=this.normalizeValue(e)}normalizeValue(e){return this.type==="number"?m(e)?e:"":e}setPreviousValue(e){this.previousValue=this.normalizeValue(e)}setValue({committing:e=!1,nativeEvent:t,origin:a,previousValue:d,value:n}){if(this.setPreviousValue(d??this.value),this.previousValueOrigin=a,this.type==="number"){l.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator,signDisplay:"never"};let c=this.previousValue?.length>n.length||this.value?.length>n.length,p=n.charAt(n.length-1)===".",h=p&&c?n:G(n),u=n&&!h?m(this.previousValue)?this.previousValue:"":h,b=l.localize(u);a!=="connected"&&!p&&(b=J(b,u,l)),this.displayedValue=p&&c?`${b}${l.decimal}`:b,this.userChangedValue=a==="user"&&this.value!==u,this.value=["-","."].includes(u)?"":u}else this.userChangedValue=a==="user"&&this.value!==n,this.value=n;a==="direct"&&(this.setInputValue(n),this.previousEmittedValue=n),t&&(this.calciteInputInput.emit().defaultPrevented?(this.value=this.previousValue,this.displayedValue=this.type==="number"?l.localize(this.previousValue):this.previousValue):e&&this.emitChangeIfUserModified())}inputKeyUpHandler(){window.clearInterval(this.nudgeNumberValueIntervalId)}warnAboutInvalidNumberValue(e){this.type==="number"&&e&&!m(e)&&console.warn(`The specified value "${e}" cannot be parsed, or is out of range.`)}render(){let e=M(this.el),t=s`<div class=${o(r.loader)}><calcite-progress .label=${this.messages.loading} type=indeterminate></calcite-progress></div>`,a=s`<button .ariaLabel=${this.messages.clear} class=${o(r.clearButton)} .disabled=${this.disabled||this.readOnly} @click=${this.clearInputValue} tabindex=-1 type=button><calcite-icon icon=x .scale=${g(this.scale)}></calcite-icon></button>`,d=s`<calcite-icon class=${o(r.inputIcon)} .flipRtl=${this.iconFlipRtl} .icon=${this.requestedIcon} .scale=${g(this.scale)}></calcite-icon>`,n=this.numberButtonType==="horizontal",c=s`<button aria-hidden=true class=${o({[r.numberButtonItem]:!0,[r.buttonItemHorizontal]:n})} data-adjustment=up .disabled=${this.disabled||this.readOnly} @pointerdown=${this.numberButtonPointerDownHandler} @pointerout=${this.numberButtonPointerUpAndOutHandler} @pointerup=${this.numberButtonPointerUpAndOutHandler} tabindex=-1 type=button><calcite-icon icon=chevron-up .scale=${g(this.scale)}></calcite-icon></button>`,p=s`<button aria-hidden=true class=${o({[r.numberButtonItem]:!0,[r.buttonItemHorizontal]:n})} data-adjustment=down .disabled=${this.disabled||this.readOnly} @pointerdown=${this.numberButtonPointerDownHandler} @pointerout=${this.numberButtonPointerUpAndOutHandler} @pointerup=${this.numberButtonPointerUpAndOutHandler} tabindex=-1 type=button><calcite-icon icon=chevron-down .scale=${g(this.scale)}></calcite-icon></button>`,h=s`<div class=${o(r.numberButtonWrapper)}>${c}${p}</div>`,u=s`<div class=${o(r.prefix)}>${this.prefixText}</div>`,b=s`<div class=${o(r.suffix)}>${this.suffixText}</div>`,y=this.el.autofocus,H=this.el.enterKeyHint,O=this.el.inputMode,oe=this.type==="number"?P("localized-input",s`<input accept=${this.accept??i} aria-errormessage=${V.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaLabel=${z(this)} autocomplete=${this.autocomplete??i} .autofocus=${y} value=${this.defaultValue??i} .disabled=${this.disabled?!0:null} enterkeyhint=${H??i} inputmode=${O??i} maxlength=${this.maxLength??i} minlength=${this.minLength??i} .multiple=${this.multiple} name=${i} @blur=${this.inputBlurHandler} @focus=${this.inputFocusHandler} @input=${this.inputNumberInputHandler} @keydown=${this.inputNumberKeyDownHandler} @keyup=${this.inputKeyUpHandler} pattern=${this.pattern??i} placeholder=${(this.placeholder||"")??i} .readOnly=${this.readOnly} type=text .value=${x(this.displayedValue??"")} ${f(this.setChildNumberElRef)}>`):null,B=this.childElType==="input"?E`input`:E`textarea`,se=this.type!=="number"?ae`<${B} accept=${this.accept??i} aria-errormessage=${V.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaLabel=${z(this)} autocomplete=${this.autocomplete??i} .autofocus=${y} class=${o({[r.editingEnabled]:this.editingEnabled,[r.inlineChild]:!!this.inlineEditableEl})} .defaultValue=${this.defaultValue??""} .disabled=${this.disabled?!0:null} enterkeyhint=${H??i} inputmode=${O??i} max=${this.maxString??i} maxlength=${this.maxLength??i} min=${this.minString??i} minlength=${this.minLength??i} .multiple=${this.multiple} name=${this.name??i} @blur=${this.inputBlurHandler} @focus=${this.inputFocusHandler} @input=${this.inputInputHandler} @keydown=${this.inputKeyDownHandler} @keyup=${this.inputKeyUpHandler} pattern=${this.pattern??i} placeholder=${(this.placeholder||"")??i} .readOnly=${this.readOnly} .required=${this.required?!0:null} spellcheck=${this.el.spellcheck??i} step=${this.step??i} tabindex=${(this.disabled||this.inlineEditableEl&&!this.editingEnabled?-1:null)??i} type=${this.type??i} .value=${x(this.value??"")} ${f(this.setChildElRef)}></${B}>`:null;return j({disabled:this.disabled,children:s`<div class=${o({[r.inputWrapper]:!0,[T.rtl]:e==="rtl",[r.hasSuffix]:this.suffixText,[r.hasPrefix]:this.prefixText})} ${f(this.inputWrapperEl)}>${this.type==="number"&&this.numberButtonType==="horizontal"&&!this.readOnly?p:null}${this.prefixText?u:null}<div class=${o(r.wrapper)}>${oe}${se}${this.isClearable?a:null}${this.requestedIcon?d:null}${this.loading?t:null}</div><div class=${o(r.actionWrapper)} ${f(this.actionWrapperEl)}><slot name=${le.action}></slot></div>${this.type==="number"&&this.numberButtonType==="vertical"&&!this.readOnly?h:null}${this.suffixText?b:null}${this.type==="number"&&this.numberButtonType==="horizontal"&&!this.readOnly?c:null}${te({component:this})}</div>${this.validationMessage&&this.status==="invalid"?ie({icon:this.validationIcon,id:V.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}};F("calcite-input",N);export{N as Input};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
import{b as m}from"./6LWRLBVD.js";import"./J7RY7DXT.js";var a="\u044F\u043D\u0432\u0430\u0440\u044F_\u0444\u0435\u0432\u0440\u0430\u043B\u044F_\u043C\u0430\u0440\u0442\u0430_\u0430\u043F\u0440\u0435\u043B\u044F_\u043C\u0430\u044F_\u0438\u044E\u043D\u044F_\u0438\u044E\u043B\u044F_\u0430\u0432\u0433\u0443\u0441\u0442\u0430_\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044F_\u043E\u043A\u0442\u044F\u0431\u0440\u044F_\u043D\u043E\u044F\u0431\u0440\u044F_\u0434\u0435\u043A\u0430\u0431\u0440\u044F".split("_"),i="\u044F\u043D\u0432\u0430\u0440\u044C_\u0444\u0435\u0432\u0440\u0430\u043B\u044C_\u043C\u0430\u0440\u0442_\u0430\u043F\u0440\u0435\u043B\u044C_\u043C\u0430\u0439_\u0438\u044E\u043D\u044C_\u0438\u044E\u043B\u044C_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044C_\u043E\u043A\u0442\u044F\u0431\u0440\u044C_\u043D\u043E\u044F\u0431\u0440\u044C_\u0434\u0435\u043A\u0430\u0431\u0440\u044C".split("_"),s="\u044F\u043D\u0432._\u0444\u0435\u0432\u0440._\u043C\u0430\u0440._\u0430\u043F\u0440._\u043C\u0430\u044F_\u0438\u044E\u043D\u044F_\u0438\u044E\u043B\u044F_\u0430\u0432\u0433._\u0441\u0435\u043D\u0442._\u043E\u043A\u0442._\u043D\u043E\u044F\u0431._\u0434\u0435\u043A.".split("_"),l="\u044F\u043D\u0432._\u0444\u0435\u0432\u0440._\u043C\u0430\u0440\u0442_\u0430\u043F\u0440._\u043C\u0430\u0439_\u0438\u044E\u043D\u044C_\u0438\u044E\u043B\u044C_\u0430\u0432\u0433._\u0441\u0435\u043D\u0442._\u043E\u043A\u0442._\u043D\u043E\u044F\u0431._\u0434\u0435\u043A.".split("_"),M=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;function f(r,_){var t=r.split("_");return _%10===1&&_%100!==11?t[0]:_%10>=2&&_%10<=4&&(_%100<10||_%100>=20)?t[1]:t[2]}function e(r,_,t){var d={mm:_?"\u043C\u0438\u043D\u0443\u0442\u0430_\u043C\u0438\u043D\u0443\u0442\u044B_\u043C\u0438\u043D\u0443\u0442":"\u043C\u0438\u043D\u0443\u0442\u0443_\u043C\u0438\u043D\u0443\u0442\u044B_\u043C\u0438\u043D\u0443\u0442",hh:"\u0447\u0430\u0441_\u0447\u0430\u0441\u0430_\u0447\u0430\u0441\u043E\u0432",dd:"\u0434\u0435\u043D\u044C_\u0434\u043D\u044F_\u0434\u043D\u0435\u0439",MM:"\u043C\u0435\u0441\u044F\u0446_\u043C\u0435\u0441\u044F\u0446\u0430_\u043C\u0435\u0441\u044F\u0446\u0435\u0432",yy:"\u0433\u043E\u0434_\u0433\u043E\u0434\u0430_\u043B\u0435\u0442"};return t==="m"?_?"\u043C\u0438\u043D\u0443\u0442\u0430":"\u043C\u0438\u043D\u0443\u0442\u0443":r+" "+f(d[t],+r)}var o=function(_,t){return M.test(t)?a[_.month()]:i[_.month()]};o.s=i;o.f=a;var n=function(_,t){return M.test(t)?s[_.month()]:l[_.month()]};n.s=l;n.f=s;var h={name:"ru",weekdays:"\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435_\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A_\u0432\u0442\u043E\u0440\u043D\u0438\u043A_\u0441\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0435\u0440\u0433_\u043F\u044F\u0442\u043D\u0438\u0446\u0430_\u0441\u0443\u0431\u0431\u043E\u0442\u0430".split("_"),weekdaysShort:"\u0432\u0441\u043A_\u043F\u043D\u0434_\u0432\u0442\u0440_\u0441\u0440\u0434_\u0447\u0442\u0432_\u043F\u0442\u043D_\u0441\u0431\u0442".split("_"),weekdaysMin:"\u0432\u0441_\u043F\u043D_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043F\u0442_\u0441\u0431".split("_"),months:o,monthsShort:n,weekStart:1,yearStart:4,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0433.",LLL:"D MMMM YYYY \u0433., H:mm",LLLL:"dddd, D MMMM YYYY \u0433., H:mm"},relativeTime:{future:"\u0447\u0435\u0440\u0435\u0437 %s",past:"%s \u043D\u0430\u0437\u0430\u0434",s:"\u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0441\u0435\u043A\u0443\u043D\u0434",m:e,mm:e,h:"\u0447\u0430\u0441",hh:e,d:"\u0434\u0435\u043D\u044C",dd:e,M:"\u043C\u0435\u0441\u044F\u0446",MM:e,y:"\u0433\u043E\u0434",yy:e},ordinal:function(_){return _},meridiem:function(_){return _<4?"\u043D\u043E\u0447\u0438":_<12?"\u0443\u0442\u0440\u0430":_<17?"\u0434\u043D\u044F":"\u0432\u0435\u0447\u0435\u0440\u0430"}};m.locale(h,null,!0);var Y=h;export{Y as default};
|
|
1
|
+
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
|
+
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{b as m}from"./EB432BS5.js";import"./MCZED6UJ.js";var a="\u044F\u043D\u0432\u0430\u0440\u044F_\u0444\u0435\u0432\u0440\u0430\u043B\u044F_\u043C\u0430\u0440\u0442\u0430_\u0430\u043F\u0440\u0435\u043B\u044F_\u043C\u0430\u044F_\u0438\u044E\u043D\u044F_\u0438\u044E\u043B\u044F_\u0430\u0432\u0433\u0443\u0441\u0442\u0430_\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044F_\u043E\u043A\u0442\u044F\u0431\u0440\u044F_\u043D\u043E\u044F\u0431\u0440\u044F_\u0434\u0435\u043A\u0430\u0431\u0440\u044F".split("_"),i="\u044F\u043D\u0432\u0430\u0440\u044C_\u0444\u0435\u0432\u0440\u0430\u043B\u044C_\u043C\u0430\u0440\u0442_\u0430\u043F\u0440\u0435\u043B\u044C_\u043C\u0430\u0439_\u0438\u044E\u043D\u044C_\u0438\u044E\u043B\u044C_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044C_\u043E\u043A\u0442\u044F\u0431\u0440\u044C_\u043D\u043E\u044F\u0431\u0440\u044C_\u0434\u0435\u043A\u0430\u0431\u0440\u044C".split("_"),s="\u044F\u043D\u0432._\u0444\u0435\u0432\u0440._\u043C\u0430\u0440._\u0430\u043F\u0440._\u043C\u0430\u044F_\u0438\u044E\u043D\u044F_\u0438\u044E\u043B\u044F_\u0430\u0432\u0433._\u0441\u0435\u043D\u0442._\u043E\u043A\u0442._\u043D\u043E\u044F\u0431._\u0434\u0435\u043A.".split("_"),l="\u044F\u043D\u0432._\u0444\u0435\u0432\u0440._\u043C\u0430\u0440\u0442_\u0430\u043F\u0440._\u043C\u0430\u0439_\u0438\u044E\u043D\u044C_\u0438\u044E\u043B\u044C_\u0430\u0432\u0433._\u0441\u0435\u043D\u0442._\u043E\u043A\u0442._\u043D\u043E\u044F\u0431._\u0434\u0435\u043A.".split("_"),M=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;function f(r,_){var t=r.split("_");return _%10===1&&_%100!==11?t[0]:_%10>=2&&_%10<=4&&(_%100<10||_%100>=20)?t[1]:t[2]}function e(r,_,t){var d={mm:_?"\u043C\u0438\u043D\u0443\u0442\u0430_\u043C\u0438\u043D\u0443\u0442\u044B_\u043C\u0438\u043D\u0443\u0442":"\u043C\u0438\u043D\u0443\u0442\u0443_\u043C\u0438\u043D\u0443\u0442\u044B_\u043C\u0438\u043D\u0443\u0442",hh:"\u0447\u0430\u0441_\u0447\u0430\u0441\u0430_\u0447\u0430\u0441\u043E\u0432",dd:"\u0434\u0435\u043D\u044C_\u0434\u043D\u044F_\u0434\u043D\u0435\u0439",MM:"\u043C\u0435\u0441\u044F\u0446_\u043C\u0435\u0441\u044F\u0446\u0430_\u043C\u0435\u0441\u044F\u0446\u0435\u0432",yy:"\u0433\u043E\u0434_\u0433\u043E\u0434\u0430_\u043B\u0435\u0442"};return t==="m"?_?"\u043C\u0438\u043D\u0443\u0442\u0430":"\u043C\u0438\u043D\u0443\u0442\u0443":r+" "+f(d[t],+r)}var o=function(_,t){return M.test(t)?a[_.month()]:i[_.month()]};o.s=i;o.f=a;var n=function(_,t){return M.test(t)?s[_.month()]:l[_.month()]};n.s=l;n.f=s;var h={name:"ru",weekdays:"\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435_\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A_\u0432\u0442\u043E\u0440\u043D\u0438\u043A_\u0441\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0435\u0440\u0433_\u043F\u044F\u0442\u043D\u0438\u0446\u0430_\u0441\u0443\u0431\u0431\u043E\u0442\u0430".split("_"),weekdaysShort:"\u0432\u0441\u043A_\u043F\u043D\u0434_\u0432\u0442\u0440_\u0441\u0440\u0434_\u0447\u0442\u0432_\u043F\u0442\u043D_\u0441\u0431\u0442".split("_"),weekdaysMin:"\u0432\u0441_\u043F\u043D_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043F\u0442_\u0441\u0431".split("_"),months:o,monthsShort:n,weekStart:1,yearStart:4,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0433.",LLL:"D MMMM YYYY \u0433., H:mm",LLLL:"dddd, D MMMM YYYY \u0433., H:mm"},relativeTime:{future:"\u0447\u0435\u0440\u0435\u0437 %s",past:"%s \u043D\u0430\u0437\u0430\u0434",s:"\u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0441\u0435\u043A\u0443\u043D\u0434",m:e,mm:e,h:"\u0447\u0430\u0441",hh:e,d:"\u0434\u0435\u043D\u044C",dd:e,M:"\u043C\u0435\u0441\u044F\u0446",MM:e,y:"\u0433\u043E\u0434",yy:e},ordinal:function(_){return _},meridiem:function(_){return _<4?"\u043D\u043E\u0447\u0438":_<12?"\u0443\u0442\u0440\u0430":_<17?"\u0434\u043D\u044F":"\u0432\u0435\u0447\u0435\u0440\u0430"}};m.locale(h,null,!0);var Y=h;export{Y as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
|
+
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{a as m,b as s,c as t,d as x}from"./LWAXFXVK.js";var r={width:{medium:a(x.max),small:a(t.max),xsmall:a(s.max),xxsmall:a(m.max)}};function a(l){return parseInt(l)}export{r as a};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
|
+
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{a as re,l as ne}from"./NLK3OCCK.js";import{E as ae}from"./D7X7U5LL.js";var ue=["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=ue.join(","),oe=typeof Element>"u",D=oe?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,K=!oe&&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},j=function a(e,t){var r;t===void 0&&(t=!0);var o=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),s=o===""||o==="true",i=s||t&&e&&a(e.parentNode);return i},Te=function(e){var t,r=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return r===""||r==="true"},se=function(e,t,r){if(j(e))return[];var o=Array.prototype.slice.apply(e.querySelectorAll(B));return t&&D.call(e,B)&&o.unshift(e),o=o.filter(r),o},ce=function a(e,t,r){for(var o=[],s=Array.from(e);s.length;){var i=s.shift();if(!j(i,!1))if(i.tagName==="SLOT"){var b=i.assignedElements(),v=b.length?b:i.children,y=a(v,!0,r);r.flatten?o.push.apply(o,y):o.push({scopeParent:i,candidates:y})}else{var T=D.call(i,B);T&&r.filter(i)&&(t||!e.includes(i))&&o.push(i);var w=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),S=!j(w,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(w&&S){var I=a(w===!0?i.children:w.children,!0,r);r.flatten?o.push.apply(o,I):o.push({scopeParent:i,candidates:I})}else s.unshift.apply(s,i.children)}}return o},le=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)||Te(e))&&!le(e)?0:e.tabIndex},Ne=function(e,t){var r=E(e);return r<0&&t&&!le(e)?0:r},Fe=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},fe=function(e){return e.tagName==="INPUT"},Ee=function(e){return fe(e)&&e.type==="hidden"},Se=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return t},ke=function(e,t){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===t)return e[r]},De=function(e){if(!e.name)return!0;var t=e.form||K(e),r=function(b){return t.querySelectorAll('input[type="radio"][name="'+b+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(e.name));else try{o=r(e.name)}catch(i){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",i.message),!1}var s=ke(o,e.form);return!s||s===e},Re=function(e){return fe(e)&&e.type==="radio"},Ie=function(e){return Re(e)&&!De(e)},Oe=function(e){var t,r=e&&K(e),o=(t=r)===null||t===void 0?void 0:t.host,s=!1;if(r&&r!==e){var i,b,v;for(s=!!((i=o)!==null&&i!==void 0&&(b=i.ownerDocument)!==null&&b!==void 0&&b.contains(o)||e!=null&&(v=e.ownerDocument)!==null&&v!==void 0&&v.contains(e));!s&&o;){var y,T,w;r=K(o),o=(y=r)===null||y===void 0?void 0:y.host,s=!!((T=o)!==null&&T!==void 0&&(w=T.ownerDocument)!==null&&w!==void 0&&w.contains(o))}}return s},ie=function(e){var t=e.getBoundingClientRect(),r=t.width,o=t.height;return r===0&&o===0},Ae=function(e,t){var r=t.displayCheck,o=t.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var s=D.call(e,"details>summary:first-of-type"),i=s?e.parentElement:e;if(D.call(i,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var b=e;e;){var v=e.parentElement,y=K(e);if(v&&!v.shadowRoot&&o(v)===!0)return ie(e);e.assignedSlot?e=e.assignedSlot:!v&&y!==e.ownerDocument?e=y.host:e=v}e=b}if(Oe(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return ie(e);return!1},Pe=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 o=t.children.item(r);if(o.tagName==="LEGEND")return D.call(t,"fieldset[disabled] *")?!0:!o.contains(e)}return!0}t=t.parentElement}return!1},M=function(e,t){return!(t.disabled||j(t)||Ee(t)||Ae(t,e)||Se(t)||Pe(t))},U=function(e,t){return!(Ie(t)||E(t)<0||!M(e,t))},Ce=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},xe=function a(e){var t=[],r=[];return e.forEach(function(o,s){var i=!!o.scopeParent,b=i?o.scopeParent:o,v=Ne(b,i),y=i?a(o.candidates):b;v===0?i?t.push.apply(t,y):t.push(b):r.push({documentOrder:s,tabIndex:v,item:o,isScope:i,content:y})}),r.sort(Fe).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(t)},de=function(e,t){t=t||{};var r;return t.getShadowRoot?r=ce([e],t.includeContainer,{filter:U.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Ce}):r=se(e,t.includeContainer,U.bind(null,t)),xe(r)},ve=function(e,t){t=t||{};var r;return t.getShadowRoot?r=ce([e],t.includeContainer,{filter:M.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):r=se(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:U(t,e)},Le=ue.concat("iframe").join(","),G=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return D.call(e,Le)===!1?!1:M(t,e)};function W(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 Be(a){if(Array.isArray(a))return W(a)}function Ke(a,e,t){return(e=Ve(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function je(a){if(typeof Symbol<"u"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function Me(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
5
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function be(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(a);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(a,o).enumerable})),t.push.apply(t,r)}return t}function he(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?be(Object(t),!0).forEach(function(r){Ke(a,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):be(Object(t)).forEach(function(r){Object.defineProperty(a,r,Object.getOwnPropertyDescriptor(t,r))})}return a}function Ge(a){return Be(a)||je(a)||_e(a)||Me()}function qe(a,e){if(typeof a!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var r=t.call(a,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function Ve(a){var e=qe(a,"string");return typeof e=="symbol"?e:e+""}function _e(a,e){if(a){if(typeof a=="string")return W(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)?W(a,e):void 0}}var pe={activateTrap:function(e,t){if(e.length>0){var r=e[e.length-1];r!==t&&r._setPausedState(!0)}var o=e.indexOf(t);o===-1||e.splice(o,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)}},$e=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},Ue=function(e){return e?.key==="Escape"||e?.key==="Esc"||e?.keyCode===27},x=function(e){return e?.key==="Tab"||e?.keyCode===9},We=function(e){return x(e)&&!e.shiftKey},Ye=function(e){return x(e)&&e.shiftKey},ye=function(e){return setTimeout(e,0)},C=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];return typeof e=="function"?e.apply(void 0,r):e},q=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},Ze=[],me=function(e,t){var r=t?.document||document,o=t?.trapStack||Ze,s=he({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:We,isKeyBackward:Ye},t),i={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},b,v=function(n,u,c){return n&&n[u]!==void 0?n[u]:s[c||u]},y=function(n,u){var c=typeof u?.composedPath=="function"?u.composedPath():void 0;return i.containerGroups.findIndex(function(f){var d=f.container,p=f.tabbableNodes;return d.contains(n)||c?.includes(d)||p.find(function(l){return l===n})})},T=function(n){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=u.hasFallback,f=c===void 0?!1:c,d=u.params,p=d===void 0?[]:d,l=s[n];if(typeof l=="function"&&(l=l.apply(void 0,Ge(p))),l===!0&&(l=void 0),!l){if(l===void 0||l===!1)return l;throw new Error("`".concat(n,"` was specified but was not a node, or did not return a node"))}var m=l;if(typeof l=="string"){try{m=r.querySelector(l)}catch(g){throw new Error("`".concat(n,'` appears to be an invalid selector; error="').concat(g.message,'"'))}if(!m&&!f)throw new Error("`".concat(n,"` as selector refers to no known node"))}return m},w=function(){var n=T("initialFocus",{hasFallback:!0});if(n===!1)return!1;if(n===void 0||n&&!G(n,s.tabbableOptions))if(y(r.activeElement)>=0)n=r.activeElement;else{var u=i.tabbableGroups[0],c=u&&u.firstTabbableNode;n=c||T("fallbackFocus")}else n===null&&(n=T("fallbackFocus"));if(!n)throw new Error("Your focus-trap needs to have at least one focusable element");return n},S=function(){if(i.containerGroups=i.containers.map(function(n){var u=de(n,s.tabbableOptions),c=ve(n,s.tabbableOptions),f=u.length>0?u[0]:void 0,d=u.length>0?u[u.length-1]:void 0,p=c.find(function(g){return R(g)}),l=c.slice().reverse().find(function(g){return R(g)}),m=!!u.find(function(g){return E(g)>0});return{container:n,tabbableNodes:u,focusableNodes:c,posTabIndexesFound:m,firstTabbableNode:f,lastTabbableNode:d,firstDomTabbableNode:p,lastDomTabbableNode:l,nextTabbableNode:function(k){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,F=u.indexOf(k);return F<0?A?c.slice(c.indexOf(k)+1).find(function(P){return R(P)}):c.slice(0,c.indexOf(k)).reverse().find(function(P){return R(P)}):u[F+(A?1:-1)]}}}),i.tabbableGroups=i.containerGroups.filter(function(n){return n.tabbableNodes.length>0}),i.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(i.containerGroups.find(function(n){return n.posTabIndexesFound})&&i.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.")},I=function(n){var u=n.activeElement;if(u)return u.shadowRoot&&u.shadowRoot.activeElement!==null?I(u.shadowRoot):u},N=function(n){if(n!==!1&&n!==I(document)){if(!n||!n.focus){N(w());return}n.focus({preventScroll:!!s.preventScroll}),i.mostRecentlyFocusedNode=n,$e(n)&&n.select()}},Y=function(n){var u=T("setReturnFocus",{params:[n]});return u||(u===!1?!1:n)},Z=function(n){var u=n.target,c=n.event,f=n.isBackward,d=f===void 0?!1:f;u=u||q(c),S();var p=null;if(i.tabbableGroups.length>0){var l=y(u,c),m=l>=0?i.containerGroups[l]:void 0;if(l<0)d?p=i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:p=i.tabbableGroups[0].firstTabbableNode;else if(d){var g=i.tabbableGroups.findIndex(function(_){var $=_.firstTabbableNode;return u===$});if(g<0&&(m.container===u||G(u,s.tabbableOptions)&&!R(u,s.tabbableOptions)&&!m.nextTabbableNode(u,!1))&&(g=l),g>=0){var k=g===0?i.tabbableGroups.length-1:g-1,A=i.tabbableGroups[k];p=E(u)>=0?A.lastTabbableNode:A.lastDomTabbableNode}else x(c)||(p=m.nextTabbableNode(u,!1))}else{var F=i.tabbableGroups.findIndex(function(_){var $=_.lastTabbableNode;return u===$});if(F<0&&(m.container===u||G(u,s.tabbableOptions)&&!R(u,s.tabbableOptions)&&!m.nextTabbableNode(u))&&(F=l),F>=0){var P=F===i.tabbableGroups.length-1?0:F+1,te=i.tabbableGroups[P];p=E(u)>=0?te.firstTabbableNode:te.firstDomTabbableNode}else x(c)||(p=m.nextTabbableNode(u))}}else p=T("fallbackFocus");return p},L=function(n){var u=q(n);if(!(y(u,n)>=0)){if(C(s.clickOutsideDeactivates,n)){b.deactivate({returnFocus:s.returnFocusOnDeactivate});return}C(s.allowOutsideClick,n)||n.preventDefault()}},z=function(n){var u=q(n),c=y(u,n)>=0;if(c||u instanceof Document)c&&(i.mostRecentlyFocusedNode=u);else{n.stopImmediatePropagation();var f,d=!0;if(i.mostRecentlyFocusedNode)if(E(i.mostRecentlyFocusedNode)>0){var p=y(i.mostRecentlyFocusedNode),l=i.containerGroups[p].tabbableNodes;if(l.length>0){var m=l.findIndex(function(g){return g===i.mostRecentlyFocusedNode});m>=0&&(s.isKeyForward(i.recentNavEvent)?m+1<l.length&&(f=l[m+1],d=!1):m-1>=0&&(f=l[m-1],d=!1))}}else i.containerGroups.some(function(g){return g.tabbableNodes.some(function(k){return E(k)>0})})||(d=!1);else d=!1;d&&(f=Z({target:i.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(i.recentNavEvent)})),N(f||i.mostRecentlyFocusedNode||w())}i.recentNavEvent=void 0},ge=function(n){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;i.recentNavEvent=n;var c=Z({event:n,isBackward:u});c&&(x(n)&&n.preventDefault(),N(c))},X=function(n){(s.isKeyForward(n)||s.isKeyBackward(n))&&ge(n,s.isKeyBackward(n))},H=function(n){Ue(n)&&C(s.escapeDeactivates,n)!==!1&&(n.preventDefault(),b.deactivate())},J=function(n){var u=q(n);y(u,n)>=0||C(s.clickOutsideDeactivates,n)||C(s.allowOutsideClick,n)||(n.preventDefault(),n.stopImmediatePropagation())},Q=function(){if(i.active)return pe.activateTrap(o,b),i.delayInitialFocusTimer=s.delayInitialFocus?ye(function(){N(w())}):N(w()),r.addEventListener("focusin",z,!0),r.addEventListener("mousedown",L,{capture:!0,passive:!1}),r.addEventListener("touchstart",L,{capture:!0,passive:!1}),r.addEventListener("click",J,{capture:!0,passive:!1}),r.addEventListener("keydown",X,{capture:!0,passive:!1}),r.addEventListener("keydown",H),b},ee=function(){if(i.active)return r.removeEventListener("focusin",z,!0),r.removeEventListener("mousedown",L,!0),r.removeEventListener("touchstart",L,!0),r.removeEventListener("click",J,!0),r.removeEventListener("keydown",X,!0),r.removeEventListener("keydown",H),b},we=function(n){var u=n.some(function(c){var f=Array.from(c.removedNodes);return f.some(function(d){return d===i.mostRecentlyFocusedNode})});u&&N(w())},V=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(we):void 0,O=function(){V&&(V.disconnect(),i.active&&!i.paused&&i.containers.map(function(n){V.observe(n,{subtree:!0,childList:!0})}))};return b={get active(){return i.active},get paused(){return i.paused},activate:function(n){if(i.active)return this;var u=v(n,"onActivate"),c=v(n,"onPostActivate"),f=v(n,"checkCanFocusTrap");f||S(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=r.activeElement,u?.();var d=function(){f&&S(),Q(),O(),c?.()};return f?(f(i.containers.concat()).then(d,d),this):(d(),this)},deactivate:function(n){if(!i.active)return this;var u=he({onDeactivate:s.onDeactivate,onPostDeactivate:s.onPostDeactivate,checkCanReturnFocus:s.checkCanReturnFocus},n);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,ee(),i.active=!1,i.paused=!1,O(),pe.deactivateTrap(o,b);var c=v(u,"onDeactivate"),f=v(u,"onPostDeactivate"),d=v(u,"checkCanReturnFocus"),p=v(u,"returnFocus","returnFocusOnDeactivate");c?.();var l=function(){ye(function(){p&&N(Y(i.nodeFocusedBeforeActivation)),f?.()})};return p&&d?(d(Y(i.nodeFocusedBeforeActivation)).then(l,l),this):(l(),this)},pause:function(n){return i.active?(i.manuallyPaused=!0,this._setPausedState(!0,n)):this},unpause:function(n){return i.active?(i.manuallyPaused=!1,o[o.length-1]!==this?this:this._setPausedState(!1,n)):this},updateContainerElements:function(n){var u=[].concat(n).filter(Boolean);return i.containers=u.map(function(c){return typeof c=="string"?r.querySelector(c):c}),i.active&&S(),O(),this}},Object.defineProperties(b,{_isManuallyPaused:{value:function(){return i.manuallyPaused}},_setPausedState:{value:function(n,u){if(i.paused===n)return this;if(i.paused=n,n){var c=v(u,"onPause"),f=v(u,"onPostPause");c?.(),ee(),O(),f?.()}else{var d=v(u,"onUnpause"),p=v(u,"onPostUnpause");d?.(),S(),Q(),O(),p?.()}return this}}}),b.updateContainerElements(e),b};function at(a,e){let{el:t}=a,r=e?.focusTrapEl||t;r&&(a.focusTrap=me(r,ze(t,e?.focusTrapOptions)))}function ze(a,e){return{clickOutsideDeactivates:!0,fallbackFocus:e?.fallbackFocus||a,setReturnFocus:t=>(ne(t),!1),...e,document:a.ownerDocument,tabbableOptions:re,trapStack:ae}}function rt(a,e){(a.focusTrapDisabledOverride?!a.focusTrapDisabledOverride():!a.focusTrapDisabled)&&a.focusTrap?.activate(e)}function nt(a,e){a.focusTrap?.deactivate(e)}export{me as a,at as b,ze as c,rt as d,nt as e};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
import{b as s}from"./6LWRLBVD.js";import"./J7RY7DXT.js";function m(r){return r>1&&r<5&&~~(r/10)!==1}function n(r,e,t,a){var _=r+" ";switch(t){case"s":return e||a?"p\xE1r sek\xFAnd":"p\xE1r sekundami";case"m":return e?"min\xFAta":a?"min\xFAtu":"min\xFAtou";case"mm":return e||a?_+(m(r)?"min\xFAty":"min\xFAt"):_+"min\xFAtami";case"h":return e?"hodina":a?"hodinu":"hodinou";case"hh":return e||a?_+(m(r)?"hodiny":"hod\xEDn"):_+"hodinami";case"d":return e||a?"de\u0148":"d\u0148om";case"dd":return e||a?_+(m(r)?"dni":"dn\xED"):_+"d\u0148ami";case"M":return e||a?"mesiac":"mesiacom";case"MM":return e||a?_+(m(r)?"mesiace":"mesiacov"):_+"mesiacmi";case"y":return e||a?"rok":"rokom";case"yy":return e||a?_+(m(r)?"roky":"rokov"):_+"rokmi"}}var o={name:"sk",weekdays:"nede\u013Ea_pondelok_utorok_streda_\u0161tvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_\u0161t_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_\u0161t_pi_so".split("_"),months:"janu\xE1r_febru\xE1r_marec_apr\xEDl_m\xE1j_j\xFAn_j\xFAl_august_september_okt\xF3ber_november_december".split("_"),monthsShort:"jan_feb_mar_apr_m\xE1j_j\xFAn_j\xFAl_aug_sep_okt_nov_dec".split("_"),weekStart:1,yearStart:4,ordinal:function(e){return e+"."},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},relativeTime:{future:"za %s",past:"pred %s",s:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n}};s.locale(o,null,!0);var c=o;export{c as default};
|
|
1
|
+
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
|
+
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{b as s}from"./EB432BS5.js";import"./MCZED6UJ.js";function m(r){return r>1&&r<5&&~~(r/10)!==1}function n(r,e,t,a){var _=r+" ";switch(t){case"s":return e||a?"p\xE1r sek\xFAnd":"p\xE1r sekundami";case"m":return e?"min\xFAta":a?"min\xFAtu":"min\xFAtou";case"mm":return e||a?_+(m(r)?"min\xFAty":"min\xFAt"):_+"min\xFAtami";case"h":return e?"hodina":a?"hodinu":"hodinou";case"hh":return e||a?_+(m(r)?"hodiny":"hod\xEDn"):_+"hodinami";case"d":return e||a?"de\u0148":"d\u0148om";case"dd":return e||a?_+(m(r)?"dni":"dn\xED"):_+"d\u0148ami";case"M":return e||a?"mesiac":"mesiacom";case"MM":return e||a?_+(m(r)?"mesiace":"mesiacov"):_+"mesiacmi";case"y":return e||a?"rok":"rokom";case"yy":return e||a?_+(m(r)?"roky":"rokov"):_+"rokmi"}}var o={name:"sk",weekdays:"nede\u013Ea_pondelok_utorok_streda_\u0161tvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_\u0161t_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_\u0161t_pi_so".split("_"),months:"janu\xE1r_febru\xE1r_marec_apr\xEDl_m\xE1j_j\xFAn_j\xFAl_august_september_okt\xF3ber_november_december".split("_"),monthsShort:"jan_feb_mar_apr_m\xE1j_j\xFAn_j\xFAl_aug_sep_okt_nov_dec".split("_"),weekStart:1,yearStart:4,ordinal:function(e){return e+"."},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},relativeTime:{future:"za %s",past:"pred %s",s:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n}};s.locale(o,null,!0);var c=o;export{c as default};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
import{b as e}from"./6LWRLBVD.js";import"./J7RY7DXT.js";var _={name:"it",weekdays:"domenica_luned\xEC_marted\xEC_mercoled\xEC_gioved\xEC_venerd\xEC_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",m:"un minuto",mm:"%d minuti",h:"un' ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(o){return o+"\xBA"}};e.locale(_,null,!0);var n=_;export{n as default};
|
|
1
|
+
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
|
+
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{b as e}from"./EB432BS5.js";import"./MCZED6UJ.js";var _={name:"it",weekdays:"domenica_luned\xEC_marted\xEC_mercoled\xEC_gioved\xEC_venerd\xEC_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",m:"un minuto",mm:"%d minuti",h:"un' ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(o){return o+"\xBA"}};e.locale(_,null,!0);var n=_;export{n as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
|
+
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{a as de,d as j,e as pe}from"./MVBR6FNF.js";import{a as le}from"./HPFCIR5F.js";import{A as re,B as N,C as ce,D as he,a as b,b as s,c as m,d as F,e as $,f as p,g as L,h as S,i as k,j as U,l as O,m as H,q as P,r as y,t as ne,u as se,w as K,x as E,y as W,z as D}from"./CNTBFQBL.js";import"./7CQS22FK.js";import"./LWAXFXVK.js";import{a as te,b as ie}from"./X6EDNQN2.js";import{a as A}from"./TTARWRVZ.js";import{d as M}from"./NQPJICFQ.js";import{a as oe}from"./5YBMD5MK.js";import{a as Y}from"./NPTN6OGZ.js";import{a as ae}from"./RSI5VQHT.js";import{b as f}from"./QV6PXGLB.js";import{e as Q,n as Z,x as R}from"./NLK3OCCK.js";import{b as ee}from"./6OPQR7PL.js";import"./OLP7ABVK.js";import{J,e as X,f as C,j as w,v as z,w as G,x as c,y as x}from"./D7X7U5LL.js";var ke=X`: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;font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-normal);inline-size:var(--calcite-internal-color-picker-min-width);min-inline-size:var(--calcite-internal-color-picker-min-width)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){--calcite-internal-color-picker-min-width: 200px;--calcite-color-picker-spacing: 8px}:host([scale=s]) .saved-colors{gap:.25rem;grid-template-columns:repeat(auto-fill,20px)}:host([scale=m]){--calcite-internal-color-picker-min-width: 240px;--calcite-color-picker-spacing: 12px}:host([scale=l]){--calcite-internal-color-picker-min-width: 304px;--calcite-color-picker-spacing: 16px;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]) .section:first-of-type{padding-block-start:var(--calcite-color-picker-spacing)}:host([scale=l]) .saved-colors{grid-template-columns:repeat(auto-fill,32px)}:host([scale=l]) .control-section{display:flex;flex-direction:column;flex-wrap:wrap;align-items:baseline}:host([scale=l]) .color-hex-options{inline-size:100%;display:flex;flex-shrink:1;flex-direction:column;justify-content:space-around}:host([scale=l]) .color-mode-container{flex-shrink:3}.container{background-color:var(--calcite-color-foreground-1);display:flex;flex-direction:column;block-size:min-content;border:1px solid var(--calcite-color-border-1)}.control-and-scope{position:relative;display:flex;cursor:pointer;touch-action:none}.color-field,.control-and-scope{-webkit-user-select:none;user-select:none}.scope{pointer-events:none;position:absolute;z-index:var(--calcite-z-index);block-size:1px;inline-size:1px;border-radius:9999px;background-color:transparent;font-size:var(--calcite-font-size--1);outline-color:transparent}.scope:focus{outline:2px solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))));outline-offset:6px}.hex-and-channels-group{display:flex;inline-size:100%;flex-direction:column;flex-wrap:wrap}.section{padding-block:0 var(--calcite-color-picker-spacing);padding-inline:var(--calcite-color-picker-spacing)}.section:first-of-type{padding-block-start:var(--calcite-color-picker-spacing)}.sliders{display:flex;flex-direction:column;justify-content:space-between;margin-inline-start:var(--calcite-color-picker-spacing);gap:var(--calcite-spacing-xxs)}.preview-and-sliders{display:flex;align-items:center;padding:var(--calcite-color-picker-spacing)}.color-hex-options,.section--split{flex-grow:1}.header{display:flex;align-items:center;justify-content:space-between;color:var(--calcite-color-text-1)}.color-mode-container{padding-block-start:var(--calcite-color-picker-spacing)}.channels{display:flex}.channel{flex-grow:1}.channel[data-channel-index="3"]{margin-inline-start:-1px;min-inline-size:81px}:host([scale=s]) .channel[data-channel-index="3"]{min-inline-size:68px}:host([scale=l]) .channel[data-channel-index="3"]{min-inline-size:88px}.saved-colors{display:grid;gap:.5rem;padding-block-start:var(--calcite-color-picker-spacing);grid-template-columns:repeat(auto-fill,24px)}.saved-colors-buttons{display:flex}.saved-color{outline-offset:0;outline-color:transparent;cursor:pointer}.saved-color:focus{outline:2px solid var(--calcite-color-brand);outline-offset:2px}.saved-color:hover{transition:outline-color var(--calcite-internal-animation-timing-fast) ease-in-out;outline:2px solid var(--calcite-color-border-2);outline-offset:2px}:host([hidden]){display:none}[hidden]{display:none}`,ue=16,V=class extends G{constructor(){super(),this._color=m,this.internalColorUpdateContext=null,this.isActiveChannelInputEmpty=!1,this.mode=K.HEX,this.resizeObserver=Y("resize",e=>this.resizeCanvas(e)),this.shiftKeyChannelAdjustment=0,this.upOrDownArrowKeyTracker=null,this._valueWasSet=!1,this.channelMode="rgb",this.channels=this.toChannels(m),this.staticDimensions=k.m,this.savedColors=[],this.allowEmpty=!1,this.alphaChannel=!1,this.channelsDisabled=!1,this.clearable=!1,this.disabled=!1,this.format="auto",this.hexDisabled=!1,this.messages=ae({blocking:!0}),this.savedDisabled=!1,this.scale="m",this.calciteColorPickerChange=z({cancelable:!1}),this.calciteColorPickerInput=z({cancelable:!1}),this.captureColorFieldColor=(e,t,i=!0)=>{let{width:a,height:o}=this.dynamicDimensions.colorField,l=Math.round(p.s/a*e),n=Math.round(p.v/o*(o-t));this.internalColorSet(this.baseColorFieldColor.hsv().saturationv(l).value(n),i)},this.drawColorControls=M((e="all")=>{(e==="all"||e==="color-field")&&this.colorFieldRenderingContext&&this.drawColorField(),(e==="all"||e==="hue-slider")&&this.hueSliderRenderingContext&&this.drawHueSlider(),this.alphaChannel&&(e==="all"||e==="opacity-slider")&&this.opacitySliderRenderingContext&&this.drawOpacitySlider()},ue),this.globalPointerMoveHandler=e=>{let{activeCanvasInfo:t,el:i}=this;if(!i.isConnected||!t)return;let{context:a,bounds:o}=t,l,n,{clientX:r,clientY:h}=e;a.canvas.matches(":hover")?(l=r-o.x,n=h-o.y):(r<o.x+o.width&&r>o.x?l=r-o.x:r<o.x?l=0:l=o.width,h<o.y+o.height&&h>o.y?n=h-o.y:h<o.y?n=0:n=o.height),a===this.colorFieldRenderingContext?this.captureColorFieldColor(l,n,!1):a===this.hueSliderRenderingContext?this.captureHueSliderColor(l):a===this.opacitySliderRenderingContext&&this.captureOpacitySliderValue(l)},this.globalPointerUpHandler=e=>{if(!R(e))return;let t=this.activeCanvasInfo;this.activeCanvasInfo=null,this.drawColorControls(),t&&this.calciteColorPickerChange.emit()},this.resizeCanvas=M(e=>{if(!this.hasUpdated)return;let[t]=e,i=Math.floor(t.contentBoxSize[0].inlineSize);this.dynamicDimensions.colorField.width!==i&&(this.updateDynamicDimensions(i),this.updateCanvasSize(),this.drawColorControls())},ue),this.updateDynamicDimensions=e=>{let t={width:ce(e,this.staticDimensions,this.alphaChannel),height:this.staticDimensions.slider.height};this.dynamicDimensions={colorField:he(e),slider:t}},this.listen("keydown",this.handleChannelKeyUpOrDown,{capture:!0}),this.listen("keyup",this.handleChannelKeyUpOrDown,{capture:!0})}static{this.properties={channelMode:16,channels:16,colorFieldScopeLeft:16,colorFieldScopeTop:16,staticDimensions:16,hueScopeLeft:16,opacityScopeLeft:16,savedColors:16,scopeOrientation:16,allowEmpty:7,alphaChannel:5,channelsDisabled:5,clearable:7,color:0,disabled:7,format:3,hexDisabled:5,messageOverrides:0,numberingSystem:3,savedDisabled:7,scale:3,storageId:3,value:1}}static{this.styles=ke}get baseColorFieldColor(){return this.color||this.previousColor||m}get effectiveSliderWidth(){return this.dynamicDimensions.slider.width}get color(){return this._color}set color(e){let t=this._color;this._color=e,this.handleColorChange(e,t)}get value(){return this._value}set value(e){let t=this._value;this._value=e,this.handleValueChange(e,t),this._valueWasSet=!0}async setFocus(){await ee(this),Z(this.el)}connectedCallback(){super.connectedCallback(),this.observeResize()}async load(){this._valueWasSet||(this._value??=P(y(m,this.alphaChannel))),this.handleAllowEmptyOrClearableChange();let{isClearable:e,color:t,format:i,value:a}=this,o=e&&!a,l=E(a),n=o||i==="auto"&&l||i===l,r=o?null:n?b(a):t;n||this.showIncompatibleColorWarning(a,i),this.setMode(i,!1),this.internalColorSet(r,!1,"initial"),this.updateStaticDimensions(this.scale),this.updateDynamicDimensions(k[this.scale].minWidth);let h=`${F}${this.storageId}`;this.storageId&&localStorage.getItem(h)&&(this.savedColors=JSON.parse(localStorage.getItem(h)))}willUpdate(e){(e.has("allowEmpty")&&(this.hasUpdated||this.allowEmpty!==!1)||e.has("clearable")&&(this.hasUpdated||this.clearable!==!1))&&this.handleAllowEmptyOrClearableChange(),e.has("alphaChannel")&&(this.hasUpdated||this.alphaChannel!==!1)&&this.handleAlphaChannelChange(this.alphaChannel),this.hasUpdated&&(e.has("alphaChannel")&&this.alphaChannel!==!1||e.has("staticDimensions")&&this.staticDimensions!==k.m)&&this.handleAlphaChannelDimensionsChange(),(e.has("alphaChannel")&&(this.hasUpdated||this.alphaChannel!==!1)||e.has("format")&&(this.hasUpdated||this.format!=="auto"))&&this.handleFormatOrAlphaChannelChange(),e.has("scale")&&(this.hasUpdated||this.scale!=="m")&&this.handleScaleChange(this.scale)}updated(){te(this)}loaded(){this.handleAlphaChannelDimensionsChange()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("pointermove",this.globalPointerMoveHandler),window.removeEventListener("pointerup",this.globalPointerUpHandler),this.resizeObserver?.disconnect()}observeResize(){this.resizeObserver?.observe(this.el)}handleAllowEmptyOrClearableChange(){this.isClearable=this.clearable||this.allowEmpty}handleAlphaChannelChange(e){let{format:t}=this;e&&t!=="auto"&&!D(t)&&(console.warn(`ignoring alphaChannel as the current format (${t}) does not support alpha`),this.alphaChannel=!1)}handleAlphaChannelDimensionsChange(){this.drawColorControls()}handleColorChange(e,t){this.drawColorControls(),this.updateChannelsFromColor(e),this.previousColor=t}handleFormatOrAlphaChannelChange(){this.setMode(this.format),this.internalColorSet(this.color,!1,"internal")}handleScaleChange(e="m"){this.updateStaticDimensions(e),this.updateCanvasSize(),this.drawColorControls()}handleValueChange(e,t){let{isClearable:i,format:a}=this,o=!i||e,l=!1;if(o){let d=E(e);if(!d||a!=="auto"&&d!==a){this.showIncompatibleColorWarning(e,a),this._value=t;return}l=this.mode!==d,this.setMode(d,this.internalColorUpdateContext===null)}let n=this.activeCanvasInfo;if(this.internalColorUpdateContext==="initial")return;if(this.internalColorUpdateContext==="user-interaction"){this.calciteColorPickerInput.emit(),n||this.calciteColorPickerChange.emit();return}let r=i&&!e?null:b(e!=null&&typeof e=="object"&&D(this.mode)?se(e):e),h=!W(r,this.color);(l||h)&&this.internalColorSet(r,this.alphaChannel&&!(this.mode.endsWith("a")||this.mode.endsWith("a-css"))||this.internalColorUpdateContext==="internal","internal")}handleTabActivate(e){this.channelMode=e.currentTarget.getAttribute("data-color-mode"),this.updateChannelsFromColor(this.color)}handleColorFieldScopeKeyDown(e){let{key:t}=e,i={ArrowUp:{x:0,y:-10},ArrowRight:{x:10,y:0},ArrowDown:{x:0,y:10},ArrowLeft:{x:-10,y:0}};i[t]&&(e.preventDefault(),this.scopeOrientation=t==="ArrowDown"||t==="ArrowUp"?"vertical":"horizontal",this.captureColorFieldColor(this.colorFieldScopeLeft+i[t].x||0,this.colorFieldScopeTop+i[t].y||0,!1))}handleHueScopeKeyDown(e){let t=e.shiftKey?10:1,{key:i}=e,a={ArrowUp:1,ArrowRight:1,ArrowDown:-1,ArrowLeft:-1};if(a[i]){e.preventDefault();let o=a[i]*t,l=this.baseColorFieldColor.hue(),n=this.baseColorFieldColor.hue(l+o);this.internalColorSet(n,!1)}}handleHexInputChange(e){e.stopPropagation();let{isClearable:t,color:i}=this,a=e.target.value;if(t&&!a){this.internalColorSet(null);return}let o=i&&P(y(i,D(this.mode)));a!==o&&this.internalColorSet(b(a))}handleSavedColorSelect(e){let t=e.currentTarget;this.internalColorSet(b(t.color))}handleChannelInput(e){let t=e.currentTarget,i=Number(t.getAttribute("data-channel-index")),a=i===3?S.max:this.channelMode==="rgb"?$[Object.keys($)[i]]:p[Object.keys(p)[i]],o;if(!t.value)o="",this.isActiveChannelInputEmpty=!0,this.upOrDownArrowKeyTracker=null;else{let l=Number(t.value)+this.shiftKeyChannelAdjustment;o=de(l,0,a).toString()}t.value=o,o!==""&&this.shiftKeyChannelAdjustment!==0?this.handleChannelChange(e):o!==""&&this.handleChannelChange(e)}handleChannelBlur(e){let t=e.currentTarget,i=Number(t.getAttribute("data-channel-index")),a=[...this.channels];!t.value&&!this.isClearable&&(t.value=a[i]?.toString())}handleChannelFocus(e){e.currentTarget.selectText()}handleChannelKeyUpOrDown(e){this.shiftKeyChannelAdjustment=0;let{key:t}=e;if(t!=="ArrowUp"&&t!=="ArrowDown"||!e.composedPath().some(o=>o.classList?.contains(s.channel)))return;let{shiftKey:i}=e;if(e.preventDefault(),!this.color){this.internalColorSet(this.previousColor),e.stopPropagation();return}let a=9;this.shiftKeyChannelAdjustment=t==="ArrowUp"&&i?a:t==="ArrowDown"&&i?-9:0,t==="ArrowUp"&&(this.upOrDownArrowKeyTracker="up"),t==="ArrowDown"&&(this.upOrDownArrowKeyTracker="down")}getChannelInputLimit(e){return this.channelMode==="rgb"?$[Object.keys($)[e]]:p[Object.keys(p)[e]]}handleChannelChange(e){let t=e.currentTarget,i=Number(t.getAttribute("data-channel-index")),a=[...this.channels];if(this.isClearable&&!t.value){this.channels=[null,null,null,null],this.internalColorSet(null);return}let o=i===3;this.isActiveChannelInputEmpty&&this.upOrDownArrowKeyTracker&&(t.value=this.upOrDownArrowKeyTracker==="up"?(a[i]+1<=this.getChannelInputLimit(i)?a[i]+1:this.getChannelInputLimit(i)).toString():(a[i]-1>=0?a[i]-1:0).toString(),this.isActiveChannelInputEmpty=!1,this.upOrDownArrowKeyTracker=null);let l=t.value?Number(t.value):a[i];a[i]=o?H(l):l,this.updateColorFromChannels(a)}handleSavedColorKeyDown(e){oe(e.key)&&(e.preventDefault(),this.handleSavedColorSelect(e))}handleColorFieldPointerDown(e){this.handleCanvasControlPointerDown(e,this.colorFieldRenderingContext,this.captureColorFieldColor,this.colorFieldScopeNode)}focusScope(e){requestAnimationFrame(()=>{e.focus()})}handleHueSliderPointerDown(e){this.handleCanvasControlPointerDown(e,this.hueSliderRenderingContext,this.captureHueSliderColor,this.hueScopeNode)}handleOpacitySliderPointerDown(e){this.handleCanvasControlPointerDown(e,this.opacitySliderRenderingContext,this.captureOpacitySliderValue,this.opacityScopeNode)}handleCanvasControlPointerDown(e,t,i,a){R(e)&&(window.addEventListener("pointermove",this.globalPointerMoveHandler),window.addEventListener("pointerup",this.globalPointerUpHandler,{once:!0}),this.activeCanvasInfo={context:t,bounds:t.canvas.getBoundingClientRect()},i.call(this,e.offsetX,e.offsetY),this.focusScope(a))}storeColorFieldScope(e){this.colorFieldScopeNode=e}storeHueScope(e){this.hueScopeNode=e}handleKeyDown(e){e.key==="Enter"&&e.preventDefault()}showIncompatibleColorWarning(e,t){console.warn(`ignoring color value (${e}) as it is not compatible with the current format (${t})`)}setMode(e,t=!0){let i=e==="auto"?this.mode:e;this.mode=this.ensureCompatibleMode(i,t)}ensureCompatibleMode(e,t){let{alphaChannel:i}=this,a=D(e);if(i&&!a){let o=re(e);return t&&console.warn(`setting format to (${o}) as the provided one (${e}) does not support alpha`),o}if(!i&&a){let o=N(e);return t&&console.warn(`setting format to (${o}) as the provided one (${e}) does not support alpha`),o}return e}captureHueSliderColor(e){let t=L/this.effectiveSliderWidth*e;this.internalColorSet(this.baseColorFieldColor.hue(t),!1)}captureOpacitySliderValue(e){let t=H(S.max/this.effectiveSliderWidth*e);this.internalColorSet(this.baseColorFieldColor.alpha(t),!1)}internalColorSet(e,t=!0,i="user-interaction"){t&&W(e,this.color)||(this.internalColorUpdateContext=i,this.color=e,this.value=this.toValue(e),this.internalColorUpdateContext=null)}toValue(e,t=this.mode){if(!e)return null;if(t.includes("hex")){let a=t===K.HEXA;return P(y(e.round(),a),a)}if(t.includes("-css")){let a=e[t.replace("-css","").replace("a","")]().round().string();if((t.endsWith("a")||t.endsWith("a-css"))&&e.alpha()===1){let o=a.slice(0,3),l=a.slice(4,-1);return`${o}a(${l}, ${e.alpha()})`}return a}let i=e[N(t)]().round().object();return t.endsWith("a")?ne(i):i}getSliderCapSpacing(){let{staticDimensions:{slider:{height:e},thumb:{radius:t}}}=this;return t*2-e}updateStaticDimensions(e="m"){this.staticDimensions=k[e]}deleteColor(){let e=y(this.color,this.alphaChannel);if(!(this.savedColors.indexOf(e)>-1))return;let t=this.savedColors.filter(a=>a!==e);this.savedColors=t;let i=`${F}${this.storageId}`;this.storageId&&localStorage.setItem(i,JSON.stringify(t))}saveColor(){let e=y(this.color,this.alphaChannel);if(this.savedColors.indexOf(e)>-1)return;let t=[...this.savedColors,e];this.savedColors=t;let i=`${F}${this.storageId}`;this.storageId&&localStorage.setItem(i,JSON.stringify(t))}drawColorField(){let e=this.colorFieldRenderingContext,{width:t,height:i}=this.dynamicDimensions.colorField;e.fillStyle=this.baseColorFieldColor.hsv().saturationv(100).value(100).alpha(1).string(),e.fillRect(0,0,t,i);let a=e.createLinearGradient(0,0,t,0);a.addColorStop(0,"rgba(255,255,255,1)"),a.addColorStop(1,"rgba(255,255,255,0)"),e.fillStyle=a,e.fillRect(0,0,t,i);let o=e.createLinearGradient(0,0,0,i);o.addColorStop(0,"rgba(0,0,0,0)"),o.addColorStop(1,"rgba(0,0,0,1)"),e.fillStyle=o,e.fillRect(0,0,t,i),this.drawActiveColorFieldColor()}setCanvasContextSize(e,{height:t,width:i}){if(!e)return;let a=window.devicePixelRatio||1;e.width=i*a,e.height=t*a,e.style.height=`${t}px`,e.style.width=`${i}px`,e.getContext("2d").scale(a,a)}initColorField(e){e&&(this.colorFieldRenderingContext=e.getContext("2d"),this.updateCanvasSize("color-field"),this.drawColorControls())}initHueSlider(e){e&&(this.hueSliderRenderingContext=e.getContext("2d"),this.updateCanvasSize("hue-slider"),this.drawHueSlider())}initOpacitySlider(e){e&&(this.opacitySliderRenderingContext=e.getContext("2d"),this.updateCanvasSize("opacity-slider"),this.drawOpacitySlider())}updateCanvasSize(e="all"){let{dynamicDimensions:t,staticDimensions:i}=this;(e==="all"||e==="color-field")&&this.setCanvasContextSize(this.colorFieldRenderingContext?.canvas,t.colorField);let a={width:this.effectiveSliderWidth,height:i.slider.height+(i.thumb.radius-t.slider.height/2)*2};(e==="all"||e==="hue-slider")&&this.setCanvasContextSize(this.hueSliderRenderingContext?.canvas,a),(e==="all"||e==="opacity-slider")&&this.setCanvasContextSize(this.opacitySliderRenderingContext?.canvas,a)}drawActiveColorFieldColor(){let{color:e}=this;if(!e)return;let t=e.hsv(),{staticDimensions:{thumb:{radius:i}}}=this,{width:a,height:o}=this.dynamicDimensions.colorField,l=t.saturationv()/(p.s/a),n=o-t.value()/(p.v/o);requestAnimationFrame(()=>{this.colorFieldScopeLeft=l,this.colorFieldScopeTop=n}),this.drawThumb(this.colorFieldRenderingContext,i,l,n,t,!1)}drawThumb(e,t,i,a,o,l){let n=2*Math.PI,r=1;if(e.beginPath(),e.arc(i,a,t,0,n),e.fillStyle="#fff",e.fill(),e.strokeStyle="rgba(0,0,0,0.3)",e.lineWidth=r,e.stroke(),l&&o.alpha()<1){let d=e.createPattern(this.getCheckeredBackgroundPattern(),"repeat");e.beginPath(),e.arc(i,a,t-3,0,n),e.fillStyle=d,e.fill()}e.globalCompositeOperation="source-atop",e.beginPath(),e.arc(i,a,t-3,0,n);let h=l?o.alpha():1;e.fillStyle=o.rgb().alpha(h).string(),e.fill(),e.globalCompositeOperation="source-over"}drawActiveHueSliderColor(){let{color:e}=this;if(!e)return;let t=e.hsv().saturationv(100).value(100),{staticDimensions:{thumb:{radius:i}}}=this,a=this.effectiveSliderWidth,o=t.hue()/(L/a),l=i,n=this.getSliderBoundX(o,a,i);requestAnimationFrame(()=>{this.hueScopeLeft=n}),this.drawThumb(this.hueSliderRenderingContext,i,n,l,t,!1)}drawHueSlider(){let e=this.hueSliderRenderingContext,{staticDimensions:{slider:{height:t},thumb:{radius:i}}}=this,a=0,o=i-t/2,l=this.effectiveSliderWidth,n=e.createLinearGradient(0,0,l,0),r=["red","yellow","lime","cyan","blue","magenta","#ff0004"],h=1/(r.length-1),d=0;r.forEach(u=>{n.addColorStop(d,b(u).string()),d+=h}),e.clearRect(0,0,l,t+this.getSliderCapSpacing()*2),this.drawSliderPath(e,t,l,a,o),e.fillStyle=n,e.fill(),e.strokeStyle="rgba(0,0,0,0.3)",e.lineWidth=1,e.stroke(),this.drawActiveHueSliderColor()}drawOpacitySlider(){let e=this.opacitySliderRenderingContext,{baseColorFieldColor:t,staticDimensions:{slider:{height:i},thumb:{radius:a}}}=this,o=0,l=a-i/2,n=this.effectiveSliderWidth;e.clearRect(0,0,n,i+this.getSliderCapSpacing()*2);let r=e.createLinearGradient(0,l,n,0),h=t.rgb().alpha(0),d=t.rgb().alpha(.5),u=t.rgb().alpha(1);r.addColorStop(0,h.string()),r.addColorStop(.5,d.string()),r.addColorStop(1,u.string()),this.drawSliderPath(e,i,n,o,l);let g=e.createPattern(this.getCheckeredBackgroundPattern(),"repeat");e.fillStyle=g,e.fill(),e.fillStyle=r,e.fill(),e.strokeStyle="rgba(0,0,0,0.3)",e.lineWidth=1,e.stroke(),this.drawActiveOpacitySliderColor()}drawSliderPath(e,t,i,a,o){let l=t/2+1;e.beginPath(),e.moveTo(a+l,o),e.lineTo(a+i-l,o),e.quadraticCurveTo(a+i,o,a+i,o+l),e.lineTo(a+i,o+t-l),e.quadraticCurveTo(a+i,o+t,a+i-l,o+t),e.lineTo(a+l,o+t),e.quadraticCurveTo(a,o+t,a,o+t-l),e.lineTo(a,o+l),e.quadraticCurveTo(a,o,a+l,o),e.closePath()}getCheckeredBackgroundPattern(){if(this.checkerPattern)return this.checkerPattern;let e=document.createElement("canvas");e.width=10,e.height=10;let t=e.getContext("2d");return t.fillStyle="#ccc",t.fillRect(0,0,10,10),t.fillStyle="#fff",t.fillRect(0,0,5,5),t.fillRect(5,5,5,5),this.checkerPattern=e,e}drawActiveOpacitySliderColor(){let{color:e}=this;if(!e)return;let t=e,{staticDimensions:{thumb:{radius:i}}}=this,a=this.effectiveSliderWidth,o=O(t.alpha())/(S.max/a),l=i,n=this.getSliderBoundX(o,a,i);requestAnimationFrame(()=>{this.opacityScopeLeft=n}),this.drawThumb(this.opacitySliderRenderingContext,i,n,l,t,!0)}getSliderBoundX(e,t,i){let a=pe(e,t,i);return a===0?e:a===-1?j(e,0,t,i,i*2):j(e,0,t,t-i*2,t-i)}storeOpacityScope(e){this.opacityScopeNode=e}handleOpacityScopeKeyDown(e){let t=e.shiftKey?10:1,{key:i}=e,a={ArrowUp:.01,ArrowRight:.01,ArrowDown:-.01,ArrowLeft:-.01};if(a[i]){e.preventDefault();let o=a[i]*t,l=this.baseColorFieldColor.alpha(),n=this.baseColorFieldColor.alpha(l+o);this.internalColorSet(n,!1)}}updateColorFromChannels(e){this.internalColorSet(b(e,this.channelMode))}updateChannelsFromColor(e){this.channels=e?this.toChannels(e):[null,null,null,null]}toChannels(e){let{channelMode:t}=this,i=e[t]().array().map((a,o)=>o===3?a:Math.floor(a));return i.length===3&&i.push(1),i}getAdjustedScopePosition(e,t){return[e-U/2,t-U/2]}render(){let{channelsDisabled:e,color:t,colorFieldScopeLeft:i,colorFieldScopeTop:a,staticDimensions:{thumb:{radius:o}},hexDisabled:l,hueScopeLeft:n,messages:r,alphaChannel:h,opacityScopeLeft:d,savedColors:u,savedDisabled:g,scale:v,scopeOrientation:Ce}=this,_=this.effectiveSliderWidth,B=t?y(t,h):null,me=o,ve=n??_*m.hue()/p.h,ge=o,fe=d??_*O(m.alpha())/S.max,q=t===void 0,T=Ce==="vertical",[be,Se]=this.getAdjustedScopePosition(i,a),[ye,we]=this.getAdjustedScopePosition(ve,me),[xe,$e]=this.getAdjustedScopePosition(fe,ge);return ie({disabled:this.disabled,children:C`<div class=${c(s.container)}><div class=${c(s.controlAndScope)}><canvas class=${c(s.colorField)} @pointerdown=${this.handleColorFieldPointerDown} ${f(this.initColorField)}></canvas><div .ariaLabel=${T?r.value:r.saturation} .ariaValueMax=${T?p.v:p.s} aria-valuemin=0 .ariaValueNow=${(T?t?.saturationv():t?.value())||"0"} class=${c({[s.scope]:!0,[s.colorFieldScope]:!0})} @keydown=${this.handleColorFieldScopeKeyDown} role=slider style=${x({top:`${Se||0}px`,left:`${be||0}px`})} tabindex=0 ${f(this.storeColorFieldScope)}></div></div><div class=${c(s.previewAndSliders)}><calcite-color-picker-swatch class=${c(s.preview)} .color=${B} .scale=${this.alphaChannel?"l":this.scale}></calcite-color-picker-swatch><div class=${c(s.sliders)}><div class=${c(s.controlAndScope)}><canvas class=${c({[s.slider]:!0,[s.hueSlider]:!0})} @pointerdown=${this.handleHueSliderPointerDown} ${f(this.initHueSlider)}></canvas><div .ariaLabel=${r.hue} .ariaValueMax=${p.h} aria-valuemin=0 .ariaValueNow=${t?.round().hue()||m.round().hue()} class=${c({[s.scope]:!0,[s.hueScope]:!0})} @keydown=${this.handleHueScopeKeyDown} role=slider style=${x({top:`${we}px`,left:`${ye}px`})} tabindex=0 ${f(this.storeHueScope)}></div></div>${h?C`<div class=${c(s.controlAndScope)}><canvas class=${c({[s.slider]:!0,[s.opacitySlider]:!0})} @pointerdown=${this.handleOpacitySliderPointerDown} ${f(this.initOpacitySlider)}></canvas><div .ariaLabel=${r.opacity} .ariaValueMax=${S.max} .ariaValueMin=${S.min} .ariaValueNow=${(t||m).round().alpha()} class=${c({[s.scope]:!0,[s.opacityScope]:!0})} @keydown=${this.handleOpacityScopeKeyDown} role=slider style=${x({top:`${$e}px`,left:`${xe}px`})} tabindex=0 ${f(this.storeOpacityScope)}></div></div>`:null}</div></div>${l&&e?null:C`<div class=${c({[s.controlSection]:!0,[s.section]:!0})}><div class=${c(s.hexAndChannelsGroup)}>${l?null:C`<div class=${c(s.hexOptions)}><calcite-color-picker-hex-input .allowEmpty=${this.isClearable} .alphaChannel=${h} class=${c(s.control)} .messages=${r} .numberingSystem=${this.numberingSystem} @calciteColorPickerHexInputChange=${this.handleHexInputChange} .scale=${v} .value=${B}></calcite-color-picker-hex-input></div>`}${e?null:C`<calcite-tabs class=${c({[s.colorModeContainer]:!0,[s.splitSection]:!0})} .scale=${v==="l"?"m":"s"}><calcite-tab-nav slot=title-group>${this.renderChannelsTabTitle("rgb")}${this.renderChannelsTabTitle("hsv")}</calcite-tab-nav>${this.renderChannelsTab("rgb")}${this.renderChannelsTab("hsv")}</calcite-tabs>`}</div></div>`}${g?null:C`<div class=${c({[s.savedColorsSection]:!0,[s.section]:!0})}><div class=${c(s.header)}><label>${r.saved}</label><div class=${c(s.savedColorsButtons)}><calcite-button appearance=transparent class=${c(s.deleteColor)} .disabled=${q} icon-start=minus kind=neutral .label=${r.deleteColor} @click=${this.deleteColor} .scale=${v} type=button></calcite-button><calcite-button appearance=transparent class=${c(s.saveColor)} .disabled=${q} icon-start=plus kind=neutral .label=${r.saveColor} @click=${this.saveColor} .scale=${v} type=button></calcite-button></div></div>${u.length>0?C`<div class=${c(s.savedColors)}>${le(u,I=>I,I=>C`<calcite-color-picker-swatch class=${c(s.savedColor)} .color=${I} @click=${this.handleSavedColorSelect} @keydown=${this.handleSavedColorKeyDown} .scale=${v} tabindex=0></calcite-color-picker-swatch>`)}</div>`:null}</div>`}</div>`})}renderChannelsTabTitle(e){let{channelMode:t,messages:i}=this,a=e===t,o=e==="rgb"?i.rgb:i.hsv;return A(e,C`<calcite-tab-title class=${c(s.colorMode)} data-color-mode=${e??w} @calciteTabsActivate=${this.handleTabActivate} .selected=${a}>${o}</calcite-tab-title>`)}renderChannelsTab(e){let{isClearable:t,channelMode:i,channels:a,messages:o,alphaChannel:l}=this,n=e===i,r=e==="rgb"?[o.red,o.green,o.blue]:[o.hue,o.saturation,o.value],h=Q(this.el),d=l?a:a.slice(0,3);return A(e,C`<calcite-tab class=${c(s.control)} .selected=${n}><div class=${c(s.channels)} dir=ltr>${d.map((u,g)=>{let v=g===3;return v&&(u=t&&!u?u:O(u)),this.renderChannel(u,g,r[g],h,v?"%":"")})}</div></calcite-tab>`)}renderChannel(e,t,i,a,o){return A(t,C`<calcite-input-number class=${c(s.channel)} data-channel-index=${t??w} dir=${a??w} .label=${i} lang=${this.messages._lang??w} number-button-type=none .numberingSystem=${this.numberingSystem} @keydown=${this.handleKeyDown} @calciteInputNumberChange=${this.handleChannelChange} @calciteInputNumberInput=${this.handleChannelInput} @calciteInternalInputNumberBlur=${this.handleChannelBlur} @calciteInternalInputNumberFocus=${this.handleChannelFocus} .scale=${this.scale==="l"?"m":"s"} style=${x({marginLeft:t>0&&!(this.scale==="s"&&this.alphaChannel&&t===3)?"-1px":""})} .suffixText=${o} .value=${e?.toString()}></calcite-input-number>`)}};J("calcite-color-picker",V);export{V as ColorPicker};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
|
+
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{a as M}from"./FGCSO5KT.js";import{a as I}from"./YHIHWSGP.js";import"./3LXK5OEB.js";import{b as _}from"./FYCT4FES.js";import"./F52GIETG.js";import{c as u,d as R,e as T,f as U,g as q,h as S,i as v}from"./IBLJGOPM.js";import"./7NLQECEF.js";import{a as O}from"./YUYVD6B5.js";import{a as H}from"./HMZA4X6S.js";import"./4GUL5QXY.js";import{a as c}from"./TTARWRVZ.js";import"./NQPJICFQ.js";import{a as F}from"./5YBMD5MK.js";import{a as x}from"./NPTN6OGZ.js";import{a as B}from"./RSI5VQHT.js";import{a as P,b as d}from"./QV6PXGLB.js";import{j as D,n as $,r as L,y as A}from"./NLK3OCCK.js";import{b as z}from"./6OPQR7PL.js";import{a as C}from"./OLP7ABVK.js";import{A as y,J as k,e as E,f as l,v as s,w,x as a}from"./D7X7U5LL.js";var g=class{constructor(){this.registeredElements=new Map,this.registeredElementCount=0,this.queryPopover=e=>{let{registeredElements:t}=this,i=e.find(r=>t.has(r));return t.get(i)},this.togglePopovers=e=>{let t=e.composedPath(),i=this.queryPopover(t);i&&!i.triggerDisabled&&(i.open=!i.open),Array.from(this.registeredElements.values()).filter(r=>r!==i&&r.autoClose&&r.open&&!t.includes(r)).forEach(r=>r.open=!1)},this.keyDownHandler=e=>{e.defaultPrevented||(e.key==="Escape"?this.closeAllPopovers():F(e.key)&&this.togglePopovers(e))},this.clickHandler=e=>{A(e)||e.defaultPrevented||this.togglePopovers(e)}}registerElement(e,t){this.registeredElementCount++,this.registeredElements.set(e,t),this.registeredElementCount===1&&this.addListeners()}unregisterElement(e){this.registeredElements.delete(e)&&this.registeredElementCount--,this.registeredElementCount===0&&this.removeListeners()}closeAllPopovers(){Array.from(this.registeredElements.values()).forEach(e=>e.open=!1)}addListeners(){window.addEventListener("click",this.clickHandler),window.addEventListener("keydown",this.keyDownHandler)}removeListeners(){window.removeEventListener("click",this.clickHandler),window.removeEventListener("keydown",this.keyDownHandler)}},o={positionContainer:"position-container",container:"container",closeButtonContainer:"close-button-container",closeButton:"close-button",content:"content",hasHeader:"has-header",header:"header",headerContainer:"headerContainer",heading:"heading"},j="auto",N="aria-controls",G="aria-expanded",W=E`:host{display:contents;--calcite-floating-ui-z-index: var(--calcite-popover-z-index, var(--calcite-z-index-popup))}.position-container{inline-size:max-content;display:none;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}.position-container .calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);transition-property:inset,left,opacity;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.position-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.position-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.position-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.position-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}.calcite-floating-ui-arrow{pointer-events:none;position:absolute;z-index:calc(var(--calcite-z-index) * -1);fill:var(--calcite-color-foreground-1)}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-color-border-3)}:host([scale=s]) .heading{padding:.5rem .75rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=m]) .heading{padding:.75rem 1rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]) .heading{padding:1rem 1.25rem;font-size:var(--calcite-font-size-1);line-height:1.375}.position-container .calcite-floating-ui-anim{border-width:1px;border-style:solid;background-color:var(--calcite-popover-background-color, var(--calcite-color-foreground-1));border-color:var(--calcite-popover-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-popover-corner-radius, var(--calcite-corner-radius-round))}.calcite-floating-ui-arrow{fill:var(--calcite-popover-background-color, var(--calcite-color-foreground-1))}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-popover-border-color, var(--calcite-color-border-3))}.header{display:flex;flex:1 1 auto;align-items:stretch;justify-content:flex-start;border-width:0px;border-bottom-width:1px;border-style:solid;border-block-end-color:var(--calcite-popover-border-color, var(--calcite-color-border-3))}.heading{margin:0;display:block;flex:1 1 auto;align-self:center;white-space:normal;font-weight:var(--calcite-font-weight-medium);word-wrap:break-word;word-break:break-word;color:var(--calcite-popover-text-color, var(--calcite-color-text-1))}.headerContainer{position:relative;display:flex;height:100%;flex-direction:row;flex-wrap:nowrap;border-radius:.25rem;color:var(--calcite-popover-text-color, var(--calcite-color-text-1))}.headerContainer.has-header{flex-direction:column}.content{display:flex;height:100%;width:100%;flex-direction:column;flex-wrap:nowrap;align-self:center;word-wrap:break-word;word-break:break-word}.close-button-container{display:flex;overflow:hidden;flex:0 0 auto;border-start-end-radius:var(--calcite-popover-corner-radius, var(--calcite-corner-radius-round));border-end-end-radius:var(--calcite-popover-corner-radius, var(--calcite-corner-radius-round));--calcite-action-corner-radius-start-end: var(--calcite-popover-corner-radius, var(--calcite-corner-radius-sharp));--calcite-action-corner-radius-end-end: var(--calcite-popover-corner-radius, var(--calcite-corner-radius-sharp))}::slotted(calcite-panel),::slotted(calcite-flow){height:100%}:host([hidden]){display:none}[hidden]{display:none}`,K=new g,b=class extends w{constructor(){super(...arguments),this.closeButtonEl=P(),this.focusTrap=I({triggerProp:"open",focusTrapOptions:{allowOutsideClick:!0,escapeDeactivates:e=>(e.defaultPrevented||(this.open=!1,e.preventDefault()),!1)}})(this),this.guid=`calcite-popover-${C()}`,this.hasLoaded=!1,this.mutationObserver=x("mutation",()=>this.updateFocusTrapElements()),this.transitionProp="opacity",this.floatingLayout="vertical",this.autoClose=!1,this.closable=!1,this.flipDisabled=!1,this.focusTrapDisabled=!1,this.messages=B(),this.offsetDistance=v,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement=j,this.pointerDisabled=!1,this.scale="m",this.triggerDisabled=!1,this.calcitePopoverBeforeClose=s({cancelable:!1}),this.calcitePopoverBeforeOpen=s({cancelable:!1}),this.calcitePopoverClose=s({cancelable:!1}),this.calcitePopoverOpen=s({cancelable:!1})}static{this.properties={floatingLayout:16,referenceEl:16,autoClose:7,closable:7,flipDisabled:7,flipPlacements:0,focusTrapDisabled:7,focusTrapOptions:0,heading:1,headingLevel:11,label:1,messageOverrides:0,offsetDistance:11,offsetSkidding:11,open:7,overlayPositioning:3,placement:3,pointerDisabled:7,referenceElement:1,scale:3,triggerDisabled:7}}static{this.styles=W}async reposition(e=!1){let{referenceEl:t,placement:i,overlayPositioning:r,flipDisabled:h,filteredFlipPlacements:p,offsetDistance:n,offsetSkidding:f,arrowEl:m,floatingEl:Q}=this;return T(this,{floatingEl:Q,referenceEl:t,overlayPositioning:r,placement:i,flipDisabled:h,flipPlacements:p,offsetDistance:n,offsetSkidding:f,arrowEl:m,type:"popover"},e)}async setFocus(){await z(this),this.requestUpdate(),$(this.el)}async updateFocusTrapElements(){this.focusTrap.updateContainerElements()}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),requestAnimationFrame(()=>this.setUpReferenceElement(this.hasLoaded))}async load(){}willUpdate(e){e.has("flipPlacements")&&this.flipPlacementsHandler(),e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),(e.has("offsetDistance")&&(this.hasUpdated||this.offsetDistance!==v)||e.has("offsetSkidding")&&(this.hasUpdated||this.offsetSkidding!==0)||e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||e.has("placement")&&(this.hasUpdated||this.placement!==j))&&this.reposition(!0),e.has("referenceElement")&&this.referenceElementHandler()}loaded(){this.referenceElement&&!this.referenceEl&&this.setUpReferenceElement(),this.hasLoaded=!0}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.removeReferences(),S(this)}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}openHandler(){O(this),this.reposition(!0),this.setExpandedAttr()}referenceElementHandler(){this.setUpReferenceElement(),this.reposition(!0)}setFloatingEl(e){this.floatingEl=e,e&&requestAnimationFrame(()=>this.setUpReferenceElement())}setTransitionEl(e){this.transitionEl=e}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?R(t,e):null}setUpReferenceElement(e=!0){this.removeReferences(),this.referenceEl=this.getReferenceElement(),q(this);let{el:t,referenceElement:i,referenceEl:r}=this;e&&i&&!r&&console.warn(`${t.tagName}: reference-element id "${i}" was not found.`,{el:t}),this.addReferences()}getId(){return this.el.id||this.guid}setExpandedAttr(){let{referenceEl:e,open:t}=this;e&&"setAttribute"in e&&e.setAttribute(G,L(t))}addReferences(){let{referenceEl:e}=this;if(!e)return;let t=this.getId();"setAttribute"in e&&e.setAttribute(N,t),K.registerElement(e,this.el),this.setExpandedAttr()}removeReferences(){let{referenceEl:e}=this;e&&("removeAttribute"in e&&(e.removeAttribute(N),e.removeAttribute(G)),K.unregisterElement(e))}getReferenceElement(){let{referenceElement:e,el:t}=this;return(typeof e=="string"?D(t,{id:e}):e)||null}hide(){this.open=!1}onBeforeOpen(){this.calcitePopoverBeforeOpen.emit()}onOpen(){this.calcitePopoverOpen.emit(),this.focusTrap.activate()}onBeforeClose(){this.calcitePopoverBeforeClose.emit()}onClose(){this.calcitePopoverClose.emit(),U(this),this.focusTrap.deactivate()}storeArrowEl(e){this.arrowEl=e,this.reposition(!0)}renderCloseButton(){let{messages:e,closable:t}=this;return t?c(o.closeButtonContainer,l`<div class=${a(o.closeButtonContainer)}><calcite-action appearance=transparent class=${a(o.closeButton)} @click=${this.hide} .scale=${this.scale} .text=${e.close} ${d(this.closeButtonEl)}><calcite-icon icon=x .scale=${H(this.scale)}></calcite-icon></calcite-action></div>`):null}renderHeader(){let{heading:e,headingLevel:t}=this,i=e?_({class:o.heading,level:t,children:e}):null;return i?c(o.header,l`<div class=${a(o.header)}>${i}${this.renderCloseButton()}</div>`):null}render(){let{referenceEl:e,heading:t,label:i,open:r,pointerDisabled:h,floatingLayout:p}=this,n=e&&r,f=!n,m=h?null:c("floating-arrow",M({floatingLayout:p,ref:this.storeArrowEl}));return this.el.inert=f,this.el.ariaLabel=i,this.el.ariaLive="polite",y(this.el,"id",this.getId()),this.el.role="dialog",l`<div class=${a(o.positionContainer)} ${d(this.setFloatingEl)}><div class=${a({[o.container]:!0,[u.animation]:!0,[u.animationActive]:n})} ${d(this.setTransitionEl)}>${m}<div class=${a({[o.hasHeader]:!!t,[o.headerContainer]:!0})}>${this.renderHeader()}<div class=${a(o.content)}><slot></slot></div>${t?null:this.renderCloseButton()}</div></div></div>`}};k("calcite-popover",b);export{b as Popover};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
|
+
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{b as o,c as r}from"./7URHQAUN.js";var t="Global";function i(n){return o(n).countries.length===0}function a(n){if(i(n))return t;let e=n.indexOf("/");return e===-1?n:n.slice(0,e)}function c(n){return r(n)?.id??n}export{t as a,a as b,c};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
|
+
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{a as n}from"./TTARWRVZ.js";import{u as l,v as r}from"./NLK3OCCK.js";import"./OLP7ABVK.js";import{J as f,e as w,f as t,w as $,x as i}from"./D7X7U5LL.js";var v=w`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host{position:absolute;inset:0;display:flex;block-size:100%;inline-size:100%;flex-direction:column;overflow:hidden;--calcite-shell-tip-spacing: 26vw}.main{position:relative;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;flex-direction:row;justify-content:space-between;overflow:hidden}.content{display:flex;block-size:100%;inline-size:100%;flex-direction:column;flex-wrap:nowrap;overflow:auto;justify-content:space-between}.content ::slotted(calcite-shell-center-row),.content ::slotted(calcite-panel),.content ::slotted(calcite-flow){flex:1 1 auto;align-self:stretch;max-block-size:unset}.content--behind{position:absolute;inset:0;border-width:0px;z-index:calc(var(--calcite-z-index) - 1);display:initial}.content--non-interactive{pointer-events:none;display:flex;block-size:100%;inline-size:100%;flex-direction:column;flex-wrap:nowrap}::slotted(calcite-shell-center-row){inline-size:unset}::slotted(.header .heading){font-size:var(--calcite-font-size--2);line-height:1.375;font-weight:var(--calcite-font-weight-normal)}slot[name=panel-start]::slotted(calcite-shell-panel),slot[name=panel-end]::slotted(calcite-shell-panel){position:relative;z-index:calc(var(--calcite-z-index) + 1)}slot[name=panel-end]::slotted(calcite-shell-panel){margin-inline-start:auto}::slotted(calcite-panel),::slotted(calcite-flow){border-width:1px;border-inline-start-width:0px;border-inline-end-width:0px;border-style:solid;border-color:var(--calcite-color-border-3)}slot[name=center-row]::slotted(calcite-shell-center-row:not([detached])),slot[name=panel-top]::slotted(calcite-shell-center-row:not([detached])),slot[name=panel-bottom]::slotted(calcite-shell-center-row:not([detached])){border-inline-start-width:1px;border-inline-end-width:1px;border-color:var(--calcite-color-border-3)}.center-content{display:flex;flex-direction:column;justify-content:space-between;block-size:100%;inline-size:100%;min-inline-size:0}.content-bottom{justify-content:flex-end}::slotted(calcite-shell-center-row){flex:none;align-self:stretch}::slotted(calcite-tip-manager){position:absolute;z-index:var(--calcite-z-index-toast);box-sizing:border-box}@keyframes in-up{0%{opacity:0;transform:translate3D(0,5px,0)}to{opacity:1;transform:translateZ(0)}}::slotted(calcite-tip-manager){animation:in-up var(--calcite-internal-animation-timing-slow) ease-in-out;border-radius:.25rem;--tw-shadow: 0 6px 20px -4px rgba(0, 0, 0, .1), 0 4px 12px -2px rgba(0, 0, 0, .08);--tw-shadow-colored: 0 6px 20px -4px var(--tw-shadow-color), 0 4px 12px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);inset-block-end:.5rem;inset-inline:var(--calcite-shell-tip-spacing)}slot[name=center-row]::slotted(calcite-shell-center-row),slot[name=panel-bottom]::slotted(calcite-shell-center-row){margin-block-start:auto}slot[name=panel-top]::slotted(calcite-shell-center-row){margin-block-end:auto}.position-wrapper{position:absolute;pointer-events:none;inset:0}slot[name=modals]::slotted(calcite-modal){position:absolute}:host([hidden]){display:none}[hidden]{display:none}`,s={main:"main",content:"content",contentBehind:"content--behind",contentBottom:"content-bottom",contentNonInteractive:"content--non-interactive",footer:"footer",positionedSlotWrapper:"positioned-slot-wrapper",contentBehindCenterContent:"center-content"},a={centerRow:"center-row",panelStart:"panel-start",panelEnd:"panel-end",panelTop:"panel-top",panelBottom:"panel-bottom",header:"header",footer:"footer",alerts:"alerts",sheets:"sheets",modals:"modals",dialogs:"dialogs"},d=class extends ${constructor(){super(),this.hasAlerts=!1,this.hasDialogs=!1,this.hasFooter=!1,this.hasHeader=!1,this.hasModals=!1,this.hasOnlyPanelBottom=!1,this.hasPanelBottom=!1,this.hasPanelTop=!1,this.hasSheets=!1,this.panelIsResizing=!1,this.contentBehind=!1,this.listen("calciteInternalShellPanelResizeStart",this.handleCalciteInternalShellPanelResizeStart),this.listen("calciteInternalShellPanelResizeEnd",this.handleCalciteInternalShellPanelResizeEnd)}static{this.properties={hasAlerts:16,hasDialogs:16,hasFooter:16,hasHeader:16,hasModals:16,hasOnlyPanelBottom:16,hasPanelBottom:16,hasPanelTop:16,hasSheets:16,panelIsResizing:16,contentBehind:7}}static{this.styles=v}willUpdate(e){(e.has("hasPanelTop")&&(this.hasUpdated||this.hasPanelTop!==!1)||e.has("hasPanelBottom")&&(this.hasUpdated||this.hasPanelBottom!==!1))&&(this.hasOnlyPanelBottom=!this.hasPanelTop&&this.hasPanelBottom)}handleCalciteInternalShellPanelResizeStart(e){this.panelIsResizing=!0,e.stopPropagation()}handleCalciteInternalShellPanelResizeEnd(e){this.panelIsResizing=!1,e.stopPropagation()}handleHeaderSlotChange(e){this.hasHeader=!!l(e)}handleFooterSlotChange(e){this.hasFooter=!!l(e)}handleAlertsSlotChange(e){this.hasAlerts=!!l(e),r(e)?.map(o=>{o.tagName==="CALCITE-ALERT"&&(o.embedded=!0)})}handleSheetsSlotChange(e){this.hasSheets=!!l(e),r(e)?.map(o=>{o.tagName==="CALCITE-SHEET"&&(o.embedded=!0)})}handleModalsSlotChange(e){this.hasModals=!!l(e)}handlePanelTopChange(e){this.hasPanelTop=l(e)}handlePanelBottomChange(e){this.hasPanelBottom=l(e)}handleDialogsSlotChange(e){this.hasDialogs=!!l(e),r(e)?.map(o=>{o.tagName==="CALCITE-DIALOG"&&(o.embedded=!0)})}renderHeader(){return t`<div .hidden=${!this.hasHeader}>${n("header",t`<slot name=${a.header} @slotchange=${this.handleHeaderSlotChange}></slot>`)}</div>`}renderFooter(){return n("footer",t`<div class=${i(s.footer)} .hidden=${!this.hasFooter}><slot name=${a.footer} @slotchange=${this.handleFooterSlotChange}></slot></div>`)}renderAlerts(){return t`<div .hidden=${!this.hasAlerts}>${n("alerts",t`<slot name=${a.alerts} @slotchange=${this.handleAlertsSlotChange}></slot>`)}</div>`}renderSheets(){return t`<div .hidden=${!this.hasSheets}>${n("sheets",t`<slot name=${a.sheets} @slotchange=${this.handleSheetsSlotChange}></slot>`)}</div>`}renderModals(){return t`<div .hidden=${!this.hasModals}>${n("modals",t`<slot name=${a.modals} @slotchange=${this.handleModalsSlotChange}></slot>`)}</div>`}renderDialogs(){return t`<div .hidden=${!this.hasDialogs}>${n("dialogs",t`<slot name=${a.dialogs} @slotchange=${this.handleDialogsSlotChange}></slot>`)}</div>`}renderContent(){let{panelIsResizing:e}=this,o=n("default-slot",t`<slot></slot>`),h=e?t`<div class=${i(s.contentNonInteractive)}>${o}</div>`:o,c=n("center-row-slot",t`<slot name=${a.centerRow}></slot>`),p=n("panel-bottom-slot",t`<slot name=${a.panelBottom} @slotchange=${this.handlePanelBottomChange}></slot>`),m=n("panel-top-slot",t`<slot name=${a.panelTop} @slotchange=${this.handlePanelTopChange}></slot>`),g="content-container";return this.contentBehind?[n(g,t`<div class=${i({[s.content]:!0,[s.contentBehind]:!0})}>${h}</div>`),t`<div class=${i({[s.contentBehindCenterContent]:!0,[s.contentBottom]:this.hasOnlyPanelBottom})}>${m}${p}${c}</div>`]:[n(g,t`<div class=${i({[s.content]:!0,[s.contentBottom]:this.hasOnlyPanelBottom})}>${m}${h}${p}${c}</div>`)]}renderMain(){return t`<div class=${i(s.main)}><slot name=${a.panelStart}></slot>${this.renderContent()}<slot name=${a.panelEnd}></slot></div>`}renderPositionedSlots(){return t`<div class=${i(s.positionedSlotWrapper)}>${this.renderAlerts()}${this.renderModals()}${this.renderDialogs()}${this.renderSheets()}</div>`}render(){return t`${this.renderHeader()}${this.renderMain()}${this.renderFooter()}${this.renderPositionedSlots()}`}};f("calcite-shell",d);export{d as Shell};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
import{b as d}from"./6LWRLBVD.js";import"./J7RY7DXT.js";function a(n){return n>1&&n<5&&~~(n/10)!==1}function _(n,e,m,r){var s=n+" ";switch(m){case"s":return e||r?"p\xE1r sekund":"p\xE1r sekundami";case"m":return e?"minuta":r?"minutu":"minutou";case"mm":return e||r?s+(a(n)?"minuty":"minut"):s+"minutami";case"h":return e?"hodina":r?"hodinu":"hodinou";case"hh":return e||r?s+(a(n)?"hodiny":"hodin"):s+"hodinami";case"d":return e||r?"den":"dnem";case"dd":return e||r?s+(a(n)?"dny":"dn\xED"):s+"dny";case"M":return e||r?"m\u011Bs\xEDc":"m\u011Bs\xEDcem";case"MM":return e||r?s+(a(n)?"m\u011Bs\xEDce":"m\u011Bs\xEDc\u016F"):s+"m\u011Bs\xEDci";case"y":return e||r?"rok":"rokem";case"yy":return e||r?s+(a(n)?"roky":"let"):s+"lety"}}var t={name:"cs",weekdays:"ned\u011Ble_pond\u011Bl\xED_\xFAter\xFD_st\u0159eda_\u010Dtvrtek_p\xE1tek_sobota".split("_"),weekdaysShort:"ne_po_\xFAt_st_\u010Dt_p\xE1_so".split("_"),weekdaysMin:"ne_po_\xFAt_st_\u010Dt_p\xE1_so".split("_"),months:"leden_\xFAnor_b\u0159ezen_duben_kv\u011Bten_\u010Derven_\u010Dervenec_srpen_z\xE1\u0159\xED_\u0159\xEDjen_listopad_prosinec".split("_"),monthsShort:"led_\xFAno_b\u0159e_dub_kv\u011B_\u010Dvn_\u010Dvc_srp_z\xE1\u0159_\u0159\xEDj_lis_pro".split("_"),weekStart:1,yearStart:4,ordinal:function(e){return e+"."},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},relativeTime:{future:"za %s",past:"p\u0159ed %s",s:_,m:_,mm:_,h:_,hh:_,d:_,dd:_,M:_,MM:_,y:_,yy:_}};d.locale(t,null,!0);var o=t;export{o as default};
|
|
1
|
+
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
|
+
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{b as d}from"./EB432BS5.js";import"./MCZED6UJ.js";function a(n){return n>1&&n<5&&~~(n/10)!==1}function _(n,e,m,r){var s=n+" ";switch(m){case"s":return e||r?"p\xE1r sekund":"p\xE1r sekundami";case"m":return e?"minuta":r?"minutu":"minutou";case"mm":return e||r?s+(a(n)?"minuty":"minut"):s+"minutami";case"h":return e?"hodina":r?"hodinu":"hodinou";case"hh":return e||r?s+(a(n)?"hodiny":"hodin"):s+"hodinami";case"d":return e||r?"den":"dnem";case"dd":return e||r?s+(a(n)?"dny":"dn\xED"):s+"dny";case"M":return e||r?"m\u011Bs\xEDc":"m\u011Bs\xEDcem";case"MM":return e||r?s+(a(n)?"m\u011Bs\xEDce":"m\u011Bs\xEDc\u016F"):s+"m\u011Bs\xEDci";case"y":return e||r?"rok":"rokem";case"yy":return e||r?s+(a(n)?"roky":"let"):s+"lety"}}var t={name:"cs",weekdays:"ned\u011Ble_pond\u011Bl\xED_\xFAter\xFD_st\u0159eda_\u010Dtvrtek_p\xE1tek_sobota".split("_"),weekdaysShort:"ne_po_\xFAt_st_\u010Dt_p\xE1_so".split("_"),weekdaysMin:"ne_po_\xFAt_st_\u010Dt_p\xE1_so".split("_"),months:"leden_\xFAnor_b\u0159ezen_duben_kv\u011Bten_\u010Derven_\u010Dervenec_srpen_z\xE1\u0159\xED_\u0159\xEDjen_listopad_prosinec".split("_"),monthsShort:"led_\xFAno_b\u0159e_dub_kv\u011B_\u010Dvn_\u010Dvc_srp_z\xE1\u0159_\u0159\xEDj_lis_pro".split("_"),weekStart:1,yearStart:4,ordinal:function(e){return e+"."},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},relativeTime:{future:"za %s",past:"p\u0159ed %s",s:_,m:_,mm:_,h:_,hh:_,d:_,dd:_,M:_,MM:_,y:_,yy:_}};d.locale(t,null,!0);var o=t;export{o as default};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*
|
|
5
|
-
*/
|
|
6
|
-
import{a as c,b as r,f as d}from"./P64WY2HI.js";import"./QIOSM7C2.js";import"./OJ5D52RG.js";import{I as o,d as a,e as i,u as l,v as n,w as s}from"./XDGCDDNX.js";var m={container:"container"},h=a`: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}:host([alignment=start]){text-align:start}:host([alignment=end]){text-align:end}:host([alignment=center]){text-align:center}:host([scale=s]) .container{gap:.25rem;font-size:var(--calcite-font-size--2);line-height:1rem;margin-block-end:var(--calcite-label-margin-bottom, .5rem)}:host([scale=m]) .container{gap:.5rem;font-size:var(--calcite-font-size--1);line-height:1rem;margin-block-end:var(--calcite-label-margin-bottom, .75rem)}:host([scale=l]) .container{gap:.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;margin-block-end:var(--calcite-label-margin-bottom, 1rem)}:host .container{margin-inline:0px;margin-block-start:0px;inline-size:100%;line-height:1.375;color:var(--calcite-color-text-1);color:var(--calcite-label-text-color, var(--calcite-color-text-1))}:host([layout=default]) .container{display:flex;flex-direction:column}:host([layout=inline]) .container,:host([layout=inline-space-between]) .container{display:flex;flex-direction:row;align-items:center;gap:.5rem}:host([layout=inline][scale=l]) .container{gap:.75rem}:host([layout=inline-space-between]) .container{justify-content:space-between}:host([disabled])>.container{opacity:var(--calcite-opacity-disabled)}:host([disabled]) ::slotted(*[disabled]),:host([disabled]) ::slotted(*[disabled] *){--tw-bg-opacity: 1}:host([disabled]) ::slotted(calcite-input-message:not([active])){--tw-bg-opacity: 0}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,t=class extends n{constructor(){super(),this.alignment="start",this.layout="default",this.scale="m",this.calciteInternalLabelClick=l({bubbles:!1,cancelable:!1}),this.listen("click",this.labelClickHandler)}static{this.properties={alignment:3,for:3,layout:3,scale:3}}static{this.styles=h}connectedCallback(){super.connectedCallback(),document.dispatchEvent(new CustomEvent(c))}willUpdate(e){e.has("for")&&d(this.el)}disconnectedCallback(){super.disconnectedCallback(),document.dispatchEvent(new CustomEvent(r))}labelClickHandler(e){window.getSelection()?.type!=="Range"&&this.calciteInternalLabelClick.emit({sourceEvent:e})}render(){return i`<div class=${s(m.container)}><slot></slot></div>`}};o("calcite-label",t);export{t as Label};
|
|
1
|
+
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
|
+
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{a as c,b as r,f as d}from"./HEVM6SRJ.js";import"./NLK3OCCK.js";import"./OLP7ABVK.js";import{J as o,e as a,f as i,v as l,w as n,x as s}from"./D7X7U5LL.js";var m={container:"container"},h=a`: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}:host([alignment=start]){text-align:start}:host([alignment=end]){text-align:end}:host([alignment=center]){text-align:center}:host([scale=s]) .container{gap:.25rem;font-size:var(--calcite-font-size--2);line-height:1rem;margin-block-end:var(--calcite-label-margin-bottom, .5rem)}:host([scale=m]) .container{gap:.5rem;font-size:var(--calcite-font-size--1);line-height:1rem;margin-block-end:var(--calcite-label-margin-bottom, .75rem)}:host([scale=l]) .container{gap:.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;margin-block-end:var(--calcite-label-margin-bottom, 1rem)}:host .container{margin-inline:0px;margin-block-start:0px;inline-size:100%;line-height:1.375;color:var(--calcite-color-text-1);color:var(--calcite-label-text-color, var(--calcite-color-text-1))}:host([layout=default]) .container{display:flex;flex-direction:column}:host([layout=inline]) .container,:host([layout=inline-space-between]) .container{display:flex;flex-direction:row;align-items:center;gap:.5rem}:host([layout=inline][scale=l]) .container{gap:.75rem}:host([layout=inline-space-between]) .container{justify-content:space-between}:host([disabled])>.container{opacity:var(--calcite-opacity-disabled)}:host([disabled]) ::slotted(*[disabled]),:host([disabled]) ::slotted(*[disabled] *){--tw-bg-opacity: 1}:host([disabled]) ::slotted(calcite-input-message:not([active])){--tw-bg-opacity: 0}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,t=class extends n{constructor(){super(),this.alignment="start",this.layout="default",this.scale="m",this.calciteInternalLabelClick=l({bubbles:!1,cancelable:!1}),this.listen("click",this.labelClickHandler)}static{this.properties={alignment:3,for:3,layout:3,scale:3}}static{this.styles=h}connectedCallback(){super.connectedCallback(),document.dispatchEvent(new CustomEvent(c))}willUpdate(e){e.has("for")&&d(this.el)}disconnectedCallback(){super.disconnectedCallback(),document.dispatchEvent(new CustomEvent(r))}labelClickHandler(e){window.getSelection()?.type!=="Range"&&this.calciteInternalLabelClick.emit({sourceEvent:e})}render(){return i`<div class=${s(m.container)}><slot></slot></div>`}};o("calcite-label",t);export{t as Label};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
import{E as d}from"./XDGCDDNX.js";var f=new Set,u={trace:0,debug:1,info:2,warn:4,error:8,off:10};function $(r){return u[r]>=u[d]}function e(r,...t){$(r)&&console[r].call(this,"%ccalcite","background: #007AC2; color: #fff; border-radius: 4px; padding: 2px 4px;",...t)}var o,w={debug:r=>e("debug",r),info:r=>e("info",r),warn:r=>e("warn",r),error:r=>e("error",r),trace:r=>e("trace",r),deprecated:m};function m(r,{component:t,name:a,suggested:n,removalVersion:c}){let s=`${r}:${r==="component"?"":t}${a}`;if(f.has(s))return;f.add(s);let i=Array.isArray(n);i&&!o&&(o=new Intl.ListFormat("en",{style:"long",type:"disjunction"}));let l=`[${a}] ${r} is deprecated and will be removed in ${c==="future"?"a future version":`v${c}`}.${n?` Use ${i?o.format(n.map(p=>`"${p}"`)):`"${n}"`} instead.`:""}`;e("warn",l)}export{w as a};
|
|
1
|
+
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
|
+
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{F as d}from"./D7X7U5LL.js";var f=new Set,u={trace:0,debug:1,info:2,warn:4,error:8,off:10};function $(r){return u[r]>=u[d]}function e(r,...t){$(r)&&console[r].call(this,"%ccalcite","background: #007AC2; color: #fff; border-radius: 4px; padding: 2px 4px;",...t)}var o,w={debug:r=>e("debug",r),info:r=>e("info",r),warn:r=>e("warn",r),error:r=>e("error",r),trace:r=>e("trace",r),deprecated:m};function m(r,{component:t,name:a,suggested:n,removalVersion:c}){let s=`${r}:${r==="component"?"":t}${a}`;if(f.has(s))return;f.add(s);let i=Array.isArray(n);i&&!o&&(o=new Intl.ListFormat("en",{style:"long",type:"disjunction"}));let l=`[${a}] ${r} is deprecated and will be removed in ${c==="future"?"a future version":`v${c}`}.${n?` Use ${i?o.format(n.map(p=>`"${p}"`)):`"${n}"`} instead.`:""}`;e("warn",l)}export{w as a};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
import{b as t}from"./6LWRLBVD.js";import"./J7RY7DXT.js";var _={name:"vi",weekdays:"ch\u1EE7 nh\u1EADt_th\u1EE9 hai_th\u1EE9 ba_th\u1EE9 t\u01B0_th\u1EE9 n\u0103m_th\u1EE9 s\xE1u_th\u1EE9 b\u1EA3y".split("_"),months:"th\xE1ng 1_th\xE1ng 2_th\xE1ng 3_th\xE1ng 4_th\xE1ng 5_th\xE1ng 6_th\xE1ng 7_th\xE1ng 8_th\xE1ng 9_th\xE1ng 10_th\xE1ng 11_th\xE1ng 12".split("_"),weekStart:1,weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),ordinal:function(h){return h},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [n\u0103m] YYYY",LLL:"D MMMM [n\u0103m] YYYY HH:mm",LLLL:"dddd, D MMMM [n\u0103m] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},relativeTime:{future:"%s t\u1EDBi",past:"%s tr\u01B0\u1EDBc",s:"v\xE0i gi\xE2y",m:"m\u1ED9t ph\xFAt",mm:"%d ph\xFAt",h:"m\u1ED9t gi\u1EDD",hh:"%d gi\u1EDD",d:"m\u1ED9t ng\xE0y",dd:"%d ng\xE0y",M:"m\u1ED9t th\xE1ng",MM:"%d th\xE1ng",y:"m\u1ED9t n\u0103m",yy:"%d n\u0103m"}};t.locale(_,null,!0);var Y=_;export{Y as default};
|
|
1
|
+
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
|
+
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{b as t}from"./EB432BS5.js";import"./MCZED6UJ.js";var _={name:"vi",weekdays:"ch\u1EE7 nh\u1EADt_th\u1EE9 hai_th\u1EE9 ba_th\u1EE9 t\u01B0_th\u1EE9 n\u0103m_th\u1EE9 s\xE1u_th\u1EE9 b\u1EA3y".split("_"),months:"th\xE1ng 1_th\xE1ng 2_th\xE1ng 3_th\xE1ng 4_th\xE1ng 5_th\xE1ng 6_th\xE1ng 7_th\xE1ng 8_th\xE1ng 9_th\xE1ng 10_th\xE1ng 11_th\xE1ng 12".split("_"),weekStart:1,weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),ordinal:function(h){return h},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [n\u0103m] YYYY",LLL:"D MMMM [n\u0103m] YYYY HH:mm",LLLL:"dddd, D MMMM [n\u0103m] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},relativeTime:{future:"%s t\u1EDBi",past:"%s tr\u01B0\u1EDBc",s:"v\xE0i gi\xE2y",m:"m\u1ED9t ph\xFAt",mm:"%d ph\xFAt",h:"m\u1ED9t gi\u1EDD",hh:"%d gi\u1EDD",d:"m\u1ED9t ng\xE0y",dd:"%d ng\xE0y",M:"m\u1ED9t th\xE1ng",MM:"%d th\xE1ng",y:"m\u1ED9t n\u0103m",yy:"%d n\u0103m"}};t.locale(_,null,!0);var Y=_;export{Y as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
|
+
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{h as R,k as f}from"./FYUK2GME.js";import{c as S,e as F,f as I}from"./DJU4LSIS.js";import{a as g}from"./TTARWRVZ.js";import"./5YBMD5MK.js";import{a as V}from"./NPTN6OGZ.js";import{a as M}from"./RSI5VQHT.js";import{a as p,b as m}from"./QV6PXGLB.js";import{q as C}from"./NLK3OCCK.js";import"./OLP7ABVK.js";import{J as T,e as z,f as h,w as E,x as d,y as u}from"./D7X7U5LL.js";var s={container:"container",fill:"fill",stepLine:"step-line",label:"label",labelHidden:"label-hidden",labelRange:"label-range",labelValue:"label-value",unitLabel:"unit-label",stepsVisible:"steps-visible",valueVisible:"value-visible",success:"fill-success",warning:"fill-warning",danger:"fill-danger"},A=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([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host{display:flex;--calcite-meter-space-internal: .125rem;--calcite-meter-height-internal: 1rem;--calcite-meter-font-size-internal: var(--calcite-font-size--1)}:host([scale=s]){--calcite-meter-height-internal: .75rem;--calcite-meter-font-size-internal: var(--calcite-font-size--2)}:host([scale=l]){--calcite-meter-height-internal: 1.5rem;--calcite-meter-font-size-internal: var(--calcite-font-size-0)}.container{position:relative;margin:0;display:flex;inline-size:100%;align-items:center;block-size:var(--calcite-meter-height-internal);background-color:var(--calcite-color-foreground-2);border:1px solid var(--calcite-color-border-3);border-radius:var(--calcite-meter-height-internal)}.solid{border:1px solid var(--calcite-color-foreground-3);background-color:var(--calcite-color-foreground-3)}.outline{background-color:transparent}.value-visible{margin-block-start:1.5rem}.steps-visible{margin-block-end:1.5rem}.step-line{position:absolute;inset-block:0px;display:block;inline-size:var(--calcite-meter-space-internal);background-color:var(--calcite-color-border-3)}.label{position:absolute;font-size:var(--calcite-meter-font-size-internal)}.label-hidden{visibility:hidden;opacity:0}.label-value{inset-block-end:calc(100% + .5em);font-weight:var(--calcite-font-weight-bold);color:var(--calcite-color-text-1)}.label-range{color:var(--calcite-color-text-3);inset-block-start:calc(100% + .5em)}.unit-label{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-3)}.label-value .unit-label{font-weight:var(--calcite-font-weight-bold);color:var(--calcite-color-text-2)}.fill{position:absolute;z-index:var(--calcite-z-index);display:block;background-color:var(--calcite-color-brand);transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);inset-inline-start:var(--calcite-meter-space-internal);inset-block:var(--calcite-meter-space-internal);border-radius:var(--calcite-meter-height-internal);max-inline-size:calc(100% - var(--calcite-meter-space-internal) * 2);min-inline-size:calc(var(--calcite-meter-height-internal) - var(--calcite-meter-space-internal) * 2);transition-property:inline-size,background-color,box-shadow}.fill-danger{background-color:var(--calcite-color-status-danger)}.fill-success{background-color:var(--calcite-color-status-success)}.fill-warning{background-color:var(--calcite-color-status-warning)}.solid .fill{inset-block:0;inset-inline-start:0;max-inline-size:100%;min-inline-size:calc(var(--calcite-meter-height-internal));box-shadow:0 0 0 1px var(--calcite-color-brand)}.solid .fill-danger{box-shadow:0 0 0 1px var(--calcite-color-status-danger)}.solid .fill-success{box-shadow:0 0 0 1px var(--calcite-color-status-success)}.solid .fill-warning{box-shadow:0 0 0 1px var(--calcite-color-status-warning)}@media (forced-colors: active){.fill,.fill-danger,.fill-success,.fill-warning{background-color:Highlight}}`,$=class extends E{constructor(){super(...arguments),this.highLabelEl=p(),this.labelFlipMax=.8,this.labelFlipProximity=.15,this.lowLabelEl=p(),this.maxLabelEl=p(),this.maxPercent=100,this.messages=M({name:null}),this.meterContainerEl=p(),this.minLabelEl=p(),this.minPercent=0,this.resizeObserver=V("resize",()=>this.resizeHandler()),this.valueLabelEl=p(),this.appearance="outline-fill",this.disabled=!1,this.fillType="range",this.groupSeparator=!1,this.max=100,this.min=0,this.rangeLabelType="percent",this.rangeLabels=!1,this.scale="m",this.unitLabel="",this.valueLabel=!1,this.valueLabelType="percent"}static{this.properties={currentPercent:16,highActive:16,highPercent:16,lowActive:16,lowPercent:16,appearance:3,disabled:7,fillType:3,form:3,groupSeparator:7,high:11,label:1,low:11,max:11,min:11,name:3,numberingSystem:1,rangeLabelType:3,rangeLabels:7,scale:3,unitLabel:1,value:9,valueLabel:7,valueLabelType:3}}static{this.styles=A}connectedCallback(){super.connectedCallback(),S(this),this.resizeObserver?.observe(this.el)}load(){this.calculateValues(),I(this,this.value)}willUpdate(e){(e.has("min")&&(this.hasUpdated||this.min!==0)||e.has("max")&&(this.hasUpdated||this.max!==100)||e.has("low")||e.has("high")||e.has("value"))&&this.handleRangeChange(),(e.has("rangeLabels")&&(this.hasUpdated||this.rangeLabels!==!1)||e.has("rangeLabelType")&&(this.hasUpdated||this.rangeLabelType!=="percent")||e.has("unitLabel")&&(this.hasUpdated||this.unitLabel!=="")||e.has("valueLabel")&&(this.hasUpdated||this.valueLabel!==!1)||e.has("valueLabelType")&&(this.hasUpdated||this.valueLabelType!=="percent"))&&this.updateLabels()}loaded(){this.updateLabels()}disconnectedCallback(){super.disconnectedCallback(),F(this),this.resizeObserver?.disconnect()}handleRangeChange(){this.calculateValues(),this.updateLabels()}resizeHandler(){this.updateLabels()}updateLabels(){this.valueLabelEl.value&&this.determineValueLabelPosition(),this.rangeLabels&&this.determineVisibleLabels()}calculateValues(){let{min:e,max:a,low:t,high:i,value:l}=this,n=100*(t-e)/(a-e),r=100*(i-e)/(a-e),c=100*(l-e)/(a-e);(!t||t<e||t>i||t>a)&&(this.low=e),(!i||i>a||i<t||i<e)&&(this.high=a),l||(this.value=e),this.lowPercent=n,this.highPercent=r,this.currentPercent=l?c:0,this.lowActive=!!t&&t>e&&(!l||t>l)&&(!i||t<i),this.highActive=!!i&&e<=i&&i<a&&(!l||i>l)&&(!t||i>t)}formatLabel(e,a){if(a==="percent"){if(!this.percentFormatting){let t=R(this.messages._lang),i=new Intl.NumberFormat(t,{useGrouping:this.groupSeparator,style:"percent"});this.percentFormatting={formatter:i,locale:t}}return this.percentFormatting.formatter.format(e)}else return f.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},f.localize(e.toString())}getMeterKindCssClass(){let{low:e,high:a,min:t,max:i,value:l}=this,n=e||t,r=a||i,c=l>=n,b=l<n,v=l>=r,o=l<r;return!l||!e&&o||b?s.success:c&&o?s.warning:v?s.danger:s.success}intersects(e,a){return e&&a&&C(e.getBoundingClientRect(),a.getBoundingClientRect())}determineVisibleLabels(){let{minLabelEl:{value:e},lowLabelEl:{value:a},highLabelEl:{value:t},maxLabelEl:{value:i}}=this,l=this.intersects(t,i),n=this.intersects(a,t),r=this.intersects(a,i),c=this.intersects(e,t),b=this.intersects(e,a),v=this.intersects(e,i),o=s.labelHidden;a&&(b||r||n?a.classList.add(o):a.classList.remove(o)),t&&(c||r||l?t.classList.add(o):t.classList.remove(o)),e&&i&&(v?i.classList.add(o):i.classList.remove(o))}determineValueLabelPosition(){let{valueLabelEl:{value:e},meterContainerEl:{value:a},currentPercent:t}=this,i=t>100?100:t>0?t:0,l=e.getBoundingClientRect().width,n=a.getBoundingClientRect().width,r=100*(l-0)/(n-0);i+r>=100?(e.style.insetInlineEnd="0%",e.style.removeProperty("inset-inline-start")):(e.style.insetInlineStart=`${i}% `,e.style.removeProperty("inset-inline-end"))}renderMeterFill(){let{currentPercent:e,fillType:a}=this,t=this.getMeterKindCssClass();return h`<div class=${d({[s.fill]:!0,[t]:a!=="single"})} style=${u({width:`${e}%`})}></div>`}renderRangeLine(e){let a={insetInlineStart:`${e}%`};return h`<div class=${d(s.stepLine)} style=${u(a)}></div>`}renderValueLabel(){let{currentPercent:e,valueLabelType:a,unitLabel:t,value:i}=this,l=this.formatLabel(a==="percent"?e/100:i||0,a);return g("low-label-line",h`<div class=${d({[s.label]:!0,[s.labelValue]:!0})} ${m(this.valueLabelEl)}>${l}${t&&a!=="percent"&&h`<span class=${d(s.unitLabel)}> ${t}</span>`||""}</div>`)}renderMinLabel(){let{rangeLabelType:e,min:a,minPercent:t,unitLabel:i}=this,l={insetInlineStart:`${t}%`},n=this.formatLabel(e==="percent"?t:a,e);return g("min-label-line",h`<div class=${d({[s.label]:!0,[s.labelRange]:!0})} style=${u(l)} ${m(this.minLabelEl)}>${n}${i&&e!=="percent"&&h`<span class=${d(s.unitLabel)}> ${i}</span>`||""}</div>`)}renderLowLabel(){let{rangeLabelType:e,low:a,lowPercent:t,highPercent:i,labelFlipProximity:l}=this,n=a?this.formatLabel(e==="percent"?t/100:a,e):"",r={insetInlineStart:`${t}%`},c={insetInlineEnd:`${100-t}%`},b=(i-t)/100<l?c:r;return g("low-label-line",h`<div class=${d({[s.label]:!0,[s.labelRange]:!0})} style=${u(b)} ${m(this.lowLabelEl)}>${n}</div>`)}renderHighLabel(){let{rangeLabelType:e,high:a,highPercent:t,labelFlipMax:i}=this,l=a?this.formatLabel(e==="percent"?t/100:a,e):"",n={insetInlineStart:`${t}%`},r={insetInlineEnd:`${100-t}%`},c=t/100>=i?r:n;return g("high-label-line",h`<div class=${d({[s.label]:!0,[s.labelRange]:!0})} style=${u(c)} ${m(this.highLabelEl)}>${l}</div>`)}renderMaxLabel(){let{rangeLabelType:e,max:a,maxPercent:t}=this,i={insetInlineEnd:`${100-t}%`},l=this.formatLabel(e==="percent"?t/100:a,e);return g("max-label-line",h`<div class=${d({[s.label]:!0,[s.labelRange]:!0})} style=${u(i)} ${m(this.maxLabelEl)}>${l}</div>`)}render(){let{appearance:e,currentPercent:a,highActive:t,highPercent:i,label:l,lowActive:n,lowPercent:r,max:c,maxPercent:b,min:v,minPercent:o,rangeLabels:L,rangeLabelType:y,unitLabel:x,value:w,valueLabel:P,valueLabelType:k}=this,H=this.formatLabel(a/100,"percent"),U=`${w} ${x}`;return h`<div .ariaLabel=${l} .ariaValueMax=${y==="percent"?b:c} .ariaValueMin=${y==="percent"?o:v} .ariaValueNow=${k==="percent"?a:w} .ariaValueText=${k==="percent"?H:x?U:void 0} class=${d({[s.container]:!0,[s.stepsVisible]:L,[s.valueVisible]:P,[e]:e!=="outline-fill"})} role=meter ${m(this.meterContainerEl)}>${this.renderMeterFill()}${P&&this.renderValueLabel()||""}${n&&this.renderRangeLine(r)||""}${t&&this.renderRangeLine(i)||""}${L&&this.renderMinLabel()||""}${L&&n&&this.renderLowLabel()||""}${L&&t&&this.renderHighLabel()||""}${L&&this.renderMaxLabel()||""}</div>`}};T("calcite-meter",$);export{$ as Meter};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*
|
|
5
|
-
*/
|
|
6
|
-
import{k as f}from"./G4Q2QH6B.js";function D(e,t,n){if(!e)return;let r=e.getTime(),a=!(t instanceof Date)||r>=t.getTime(),o=!(n instanceof Date)||r<=n.getTime();return a&&o}function p(e,t,n){if(!(e instanceof Date))return null;let r=e.getTime(),a=t instanceof Date&&r<t.getTime(),o=n instanceof Date&&r>n.getTime();return a?t:o?n:e}function Y(e,t=!1){if(e instanceof Date)return e;if(!e||typeof e!="string")return null;let n=e.split(/[: T-]/).map(parseFloat),r=new Date(n[0],(n[1]||1)-1,n[2]||1);if(r.setFullYear(n[0]),isNaN(r.getTime()))throw new Error(`Invalid ISO 8601 date: "${e}"`);return t?F(r):r}function O(e,t){if(!t)return null;let{separator:n}=t,r=M(e,t),{day:a,month:o}=r,i=y(r.year,t),s=new Date(i,o,a);s.setFullYear(i);let u=a>0,c=o>-1,g=!isNaN(s.getTime()),d=e.split(n).filter(h=>h).length>2,m=i.toString().length>0;return u&&c&&g&&d&&m?s:null}function y(e,t){return l(e,t,"read")}function x(e,t){return l(e,t,"write")}function l(e,t,n){if(t["default-calendar"]!=="buddhist")return e;let r=543*(n==="read"?-1:1);return e+r}function w(e,t){let{separator:n,unitOrder:r}=t,a=T(r),o=e.split(n).map(c=>f.delocalize(c)),i=o[a.indexOf("d")],s=o[a.indexOf("m")],u=o[a.indexOf("y")];return{day:i,month:s,year:u}}function I(e){if(e instanceof Date){let t=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${String(e.getFullYear()).padStart(4,"0")}-${t}-${n}`}return""}function N(e){let t=e.split("-");return{day:t[2],month:t[1],year:t[0]}}function $(e,t){return e instanceof Date&&t instanceof Date&&e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function b(e){let t=e.getMonth(),n=new Date(e);return n.setMonth(t-1),t===n.getMonth()?new Date(e.getFullYear(),t,0):n}function v(e,t){let n=new Date(e);return n.setMonth(t),n}function C(e,t,n){let r=new Date(e);return r.setDate(1),D(r,t,n)?r:p(r,t,n)}function E(e){let t=e.getMonth(),n=new Date(e);return n.setMonth(t+1),(t+2)%7===n.getMonth()%7?new Date(e.getFullYear(),t+2,0):n}function M(e,t){let{day:n,month:r,year:a}=w(e,t);return{day:parseInt(n),month:parseInt(r)-1,year:parseInt(a)}}function T(e){let t=["d","m","y"],n=e.toLowerCase();return t.sort((r,a)=>n.indexOf(r)-n.indexOf(a))}function L(e,t){let n=e.getTime(),r=t.getTime();return(n-r)/(1e3*3600*24)}function F(e){return e.setHours(23,59,59,999),e}function j(e,t){return e&&t&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}export{D as a,p as b,Y as c,O as d,y as e,x as f,w as g,I as h,N as i,$ as j,b as k,v as l,C as m,E as n,T as o,L as p,j as q};
|
|
1
|
+
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
|
+
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{k as f}from"./FYUK2GME.js";function D(e,t,n){if(!e)return;let r=e.getTime(),a=!(t instanceof Date)||r>=t.getTime(),o=!(n instanceof Date)||r<=n.getTime();return a&&o}function p(e,t,n){if(!(e instanceof Date))return null;let r=e.getTime(),a=t instanceof Date&&r<t.getTime(),o=n instanceof Date&&r>n.getTime();return a?t:o?n:e}function Y(e,t=!1){if(e instanceof Date)return e;if(!e||typeof e!="string")return null;let n=e.split(/[: T-]/).map(parseFloat),r=new Date(n[0],(n[1]||1)-1,n[2]||1);if(r.setFullYear(n[0]),isNaN(r.getTime()))throw new Error(`Invalid ISO 8601 date: "${e}"`);return t?F(r):r}function O(e,t){if(!t)return null;let{separator:n}=t,r=M(e,t),{day:a,month:o}=r,i=y(r.year,t),s=new Date(i,o,a);s.setFullYear(i);let u=a>0,c=o>-1,g=!isNaN(s.getTime()),d=e.split(n).filter(h=>h).length>2,m=i.toString().length>0;return u&&c&&g&&d&&m?s:null}function y(e,t){return l(e,t,"read")}function x(e,t){return l(e,t,"write")}function l(e,t,n){if(t["default-calendar"]!=="buddhist")return e;let r=543*(n==="read"?-1:1);return e+r}function w(e,t){let{separator:n,unitOrder:r}=t,a=T(r),o=e.split(n).map(c=>f.delocalize(c)),i=o[a.indexOf("d")],s=o[a.indexOf("m")],u=o[a.indexOf("y")];return{day:i,month:s,year:u}}function I(e){if(e instanceof Date){let t=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${String(e.getFullYear()).padStart(4,"0")}-${t}-${n}`}return""}function N(e){let t=e.split("-");return{day:t[2],month:t[1],year:t[0]}}function $(e,t){return e instanceof Date&&t instanceof Date&&e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function b(e){let t=e.getMonth(),n=new Date(e);return n.setMonth(t-1),t===n.getMonth()?new Date(e.getFullYear(),t,0):n}function v(e,t){let n=new Date(e);return n.setMonth(t),n}function C(e,t,n){let r=new Date(e);return r.setDate(1),D(r,t,n)?r:p(r,t,n)}function E(e){let t=e.getMonth(),n=new Date(e);return n.setMonth(t+1),(t+2)%7===n.getMonth()%7?new Date(e.getFullYear(),t+2,0):n}function M(e,t){let{day:n,month:r,year:a}=w(e,t);return{day:parseInt(n),month:parseInt(r)-1,year:parseInt(a)}}function T(e){let t=["d","m","y"],n=e.toLowerCase();return t.sort((r,a)=>n.indexOf(r)-n.indexOf(a))}function L(e,t){let n=e.getTime(),r=t.getTime();return(n-r)/(1e3*3600*24)}function F(e){return e.setHours(23,59,59,999),e}function j(e,t){return e&&t&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}export{D as a,p as b,Y as c,O as d,y as e,x as f,w as g,I as h,N as i,$ as j,b as k,v as l,C as m,E as n,T as o,L as p,j as q};
|