@esri/calcite-components 5.0.0-next.24 → 5.0.0-next.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{RXMFCMPL.js → 2CFMML7J.js} +2 -2
- package/dist/cdn/{P2QT6AS5.js → 2FZFM5NL.js} +2 -2
- package/dist/cdn/{JGASNMHN.js → 2U3HRPBE.js} +2 -2
- package/dist/cdn/{ROD5TPA7.js → 2XHAGMKL.js} +2 -2
- package/dist/cdn/{INRPXIYH.js → 3ILU5HMO.js} +2 -2
- package/dist/cdn/{DUEETZLL.js → 3LX4UEMG.js} +2 -2
- package/dist/cdn/{QDJATE7S.js → 3RCYATIP.js} +1 -1
- package/dist/cdn/{DQ42326G.js → 3S24RP6Q.js} +2 -2
- package/dist/cdn/{7AS7XMSH.js → 3T7FBLY4.js} +2 -2
- package/dist/cdn/{HZ57T5MG.js → 3YNQI3NO.js} +2 -2
- package/dist/cdn/{B3PJ7WKM.js → 432I5L6K.js} +2 -2
- package/dist/cdn/{64OWR3JT.js → 47DFYWT7.js} +1 -1
- package/dist/cdn/{MLXLOWSQ.js → 4A5BQ3P6.js} +2 -2
- package/dist/cdn/{XVYK6WRH.js → 4FZKOFIT.js} +2 -2
- package/dist/cdn/{5Z4VZS4K.js → 4VRO7HIK.js} +2 -2
- package/dist/cdn/{VKUS34R6.js → 52WSL3OS.js} +2 -2
- package/dist/cdn/{W35ZAP2H.js → 5DDVN7VT.js} +2 -2
- package/dist/cdn/{SF7R62RN.js → 5N76V6DK.js} +2 -2
- package/dist/cdn/{ZT6GWFZI.js → 5O4F6PZJ.js} +2 -2
- package/dist/cdn/{HKWN6UGZ.js → 5U7ADNIZ.js} +2 -2
- package/dist/cdn/{A23GHMZS.js → 5XAHBWEI.js} +1 -1
- package/dist/cdn/{ABX4FUH2.js → 62ZCKEBN.js} +2 -2
- package/dist/cdn/{UIOMWJYX.js → 6AV5OUAI.js} +1 -1
- package/dist/cdn/{EQ25YK3K.js → 6F7MIVOD.js} +2 -2
- package/dist/cdn/{FHFC32UV.js → 6FPWFMQD.js} +2 -2
- package/dist/cdn/{VKYWVVT7.js → 6L2CD66G.js} +2 -2
- package/dist/cdn/{T6I2EM3C.js → 6N2MAGTM.js} +2 -2
- package/dist/cdn/{3PXVP76T.js → 6SRTCZUL.js} +2 -2
- package/dist/cdn/{FR2S7C3P.js → 77223OGR.js} +2 -2
- package/dist/cdn/{E77DQ4KK.js → 7A5GUUXX.js} +2 -2
- package/dist/cdn/{SXCRQKQY.js → 7BPYHEOW.js} +2 -2
- package/dist/cdn/{IVLZA447.js → 7DAYYO7G.js} +2 -2
- package/dist/cdn/7JL3ZCM4.js +4 -0
- package/dist/cdn/{VKBFZH3Q.js → 7UWIO6G4.js} +2 -2
- package/dist/cdn/{DS3SRYAQ.js → AHIQKX5F.js} +2 -2
- package/dist/cdn/{LRVS2JUS.js → AQU252UZ.js} +2 -2
- package/dist/cdn/{YMVT43WJ.js → ARB4Q3GY.js} +2 -2
- package/dist/cdn/{N6LPJTW6.js → B4QK4RBC.js} +2 -2
- package/dist/cdn/{UU5FHZ2A.js → B5UWHKTV.js} +2 -2
- package/dist/cdn/{TSV5UHSA.js → BC6T7LXX.js} +2 -2
- package/dist/cdn/{XZO7FJUM.js → BJWZNEE6.js} +1 -1
- package/dist/cdn/{VD6FGGZF.js → BOOYLMNS.js} +2 -2
- package/dist/cdn/{HV2P4FIA.js → BS6FO7VM.js} +2 -2
- package/dist/cdn/{65JNHBZY.js → BY6FQDGD.js} +2 -2
- package/dist/cdn/{CXUNMY3L.js → BYDTCRJO.js} +2 -2
- package/dist/cdn/{FOE57QJC.js → CHVB7IKL.js} +2 -2
- package/dist/cdn/{UMESQ2SZ.js → CWNLGPSB.js} +1 -1
- package/dist/cdn/{TGVFSTVL.js → D5UX7ECF.js} +2 -2
- package/dist/cdn/{6VG4XLEA.js → D7OBAVZT.js} +2 -2
- package/dist/cdn/{IWBVUYFH.js → DJVTADL7.js} +2 -2
- package/dist/cdn/{CIXVZEV7.js → DT3IOU7S.js} +2 -2
- package/dist/cdn/{CVJIPPM6.js → DTSRU6CW.js} +2 -2
- package/dist/cdn/{XSY4ZNEV.js → DXQFA7YZ.js} +1 -1
- package/dist/cdn/{J3RGQY47.js → E2CJ3WMN.js} +2 -2
- package/dist/cdn/{SYBWNCBH.js → E4EYXCOT.js} +1 -1
- package/dist/cdn/{MDZPHKB4.js → E5D5DLBW.js} +2 -2
- package/dist/cdn/{7LRIRIIW.js → E5QC5ISI.js} +2 -2
- package/dist/cdn/{6N3LZJTK.js → EC6EAHTF.js} +2 -2
- package/dist/cdn/{2ZOH7S3X.js → EPA5EBO4.js} +2 -2
- package/dist/cdn/{GVMJTZ2P.js → ET5LOAXJ.js} +2 -2
- package/dist/cdn/{LNVURAF5.js → EVY5PGRH.js} +2 -2
- package/dist/cdn/{OGYCI2CL.js → EYU5DTMI.js} +1 -1
- package/dist/cdn/{A7AWHUCH.js → FAT3Y2BN.js} +1 -1
- package/dist/cdn/{ZK5AVU4C.js → FE7MC2RS.js} +2 -2
- package/dist/cdn/{5N3W5VQK.js → FMKQR3NY.js} +2 -2
- package/dist/cdn/FRO3DRWQ.js +4 -0
- package/dist/cdn/{I7ZBOKLZ.js → FW2WJAMV.js} +2 -2
- package/dist/cdn/{MP7KZIIK.js → GA2OVDMV.js} +2 -2
- package/dist/cdn/{JSENW2PE.js → H7FAIOG4.js} +2 -2
- package/dist/cdn/{UFYXZGUB.js → HBGTAWK3.js} +1 -1
- package/dist/cdn/{FGML73RG.js → HKSOVKSS.js} +2 -2
- package/dist/cdn/{XTRBN5YJ.js → HMQK4NHX.js} +2 -2
- package/dist/cdn/{ZXFBTRZK.js → HN42KFKY.js} +2 -2
- package/dist/cdn/{EK3BWMVE.js → HTSVYMIU.js} +1 -1
- package/dist/cdn/{ROMI2N47.js → HWAZHT5V.js} +2 -2
- package/dist/cdn/{POEYFZSS.js → HXVXKTPF.js} +2 -2
- package/dist/cdn/{3GTQIH43.js → HY7V66E2.js} +2 -2
- package/dist/cdn/{B7FZNIZA.js → IEHTF4JJ.js} +2 -2
- package/dist/cdn/{FWBHWDFV.js → IIG6KL5B.js} +2 -2
- package/dist/cdn/{7YBTXCJ6.js → IILDTQRG.js} +2 -2
- package/dist/cdn/{MZFN2QZ5.js → IMNNSECB.js} +2 -2
- package/dist/cdn/{ZR6O4LWY.js → IOMZGRK4.js} +2 -2
- package/dist/cdn/{P5TBKTLI.js → IZG6SCFX.js} +1 -1
- package/dist/cdn/{QVASZAU7.js → JALLQ642.js} +2 -2
- package/dist/cdn/{7JHWOII6.js → JHMUWWQC.js} +2 -2
- package/dist/cdn/K424XZFZ.js +4 -0
- package/dist/cdn/KNWKHZDP.js +4 -0
- package/dist/cdn/{RW2TFUMT.js → KQHZTEQA.js} +2 -2
- package/dist/cdn/{XLFAHCLR.js → KQUCKRP3.js} +2 -2
- package/dist/cdn/{4L3PUFV5.js → L2HPOBTI.js} +2 -2
- package/dist/cdn/{EEP4X23G.js → LJHB3MJX.js} +2 -2
- package/dist/cdn/{ZOMCYKBQ.js → LKLTEHWQ.js} +2 -2
- package/dist/cdn/{MT4G6FVR.js → LLHJY7FO.js} +2 -2
- package/dist/cdn/{FBB3QKEK.js → M7GQJBGE.js} +2 -2
- package/dist/cdn/{VKQIGKNF.js → MAHGPUV2.js} +2 -2
- package/dist/cdn/{3DZK3RG7.js → MD5WJSZN.js} +1 -1
- package/dist/cdn/{7TNANCRK.js → MI2ILVKK.js} +2 -2
- package/dist/cdn/{QAENC5XP.js → MIOMU44N.js} +2 -2
- package/dist/cdn/{SCBC66SJ.js → MUXHUU6U.js} +1 -1
- package/dist/cdn/{EF4DIHKW.js → MW5EJLCT.js} +2 -2
- package/dist/cdn/{TDVBV4VJ.js → MYTCFLOM.js} +2 -2
- package/dist/cdn/{KG2CHPZF.js → N4XJYQRH.js} +2 -2
- package/dist/cdn/{37Y6G3TP.js → NBGXBSR4.js} +2 -2
- package/dist/cdn/{4HT7QTCF.js → NFJBMBKC.js} +2 -2
- package/dist/cdn/{ROUUIU6Y.js → NZM73CDI.js} +2 -2
- package/dist/cdn/{EHS7VTJ2.js → OEZPBK7R.js} +2 -2
- package/dist/cdn/{N5L6H66L.js → OIC2PJSR.js} +2 -2
- package/dist/cdn/{KT64TXJN.js → ONWB4LLN.js} +2 -2
- package/dist/cdn/{PGIQOKHX.js → P4SFTOL2.js} +2 -2
- package/dist/cdn/{VEAPKWDV.js → PGQ556IU.js} +2 -2
- package/dist/cdn/{E7UJ63CV.js → PIS5J4L6.js} +2 -2
- package/dist/cdn/{FGRR2V5E.js → PJPCM6TA.js} +2 -2
- package/dist/cdn/{FECXXF6W.js → PLDBKZJU.js} +2 -2
- package/dist/cdn/{HPUWSQFC.js → PUM2TUJT.js} +2 -2
- package/dist/cdn/{SZSUAKMM.js → QIWQPYMD.js} +2 -2
- package/dist/cdn/{RXUXWSUW.js → QKW5HNIF.js} +1 -1
- package/dist/cdn/{RXQFLYN4.js → QOYXWNLB.js} +2 -2
- package/dist/cdn/{K6FSYEUE.js → QPLV643W.js} +2 -2
- package/dist/cdn/{TIER2ZLB.js → QZKEE2GW.js} +2 -2
- package/dist/cdn/{M7JPJNTA.js → RBBDKUN4.js} +2 -2
- package/dist/cdn/{6A4TA3W6.js → RC6OSJIM.js} +2 -2
- package/dist/cdn/{YJJIQDE4.js → RLKDPOH2.js} +1 -1
- package/dist/cdn/{LLUKLUGG.js → RSG7A2EY.js} +2 -2
- package/dist/cdn/{GAXQ53KY.js → S3LMUVIR.js} +2 -2
- package/dist/cdn/{6FS7L25A.js → SBRSHLCL.js} +2 -2
- package/dist/cdn/{W2BGQHG5.js → SLBOIPUI.js} +2 -2
- package/dist/cdn/{CD3UAK2W.js → SMB2EQKM.js} +2 -2
- package/dist/cdn/{BXP3OZKK.js → SOCINMJ3.js} +2 -2
- package/dist/cdn/{FTNFA7JP.js → SRXKNFWZ.js} +2 -2
- package/dist/cdn/{YI6NNNSO.js → SUF3BEFB.js} +2 -2
- package/dist/cdn/{OYAC2J2Y.js → SVGBKLP3.js} +2 -2
- package/dist/cdn/{VYBIOJ5F.js → SZYDF2UZ.js} +1 -1
- package/dist/cdn/{E76C5Q66.js → TB54TF7D.js} +2 -2
- package/dist/cdn/{VATCFN3O.js → TGB6THII.js} +2 -2
- package/dist/cdn/{5BSD56V7.js → TJQWEEWG.js} +2 -2
- package/dist/cdn/{L2VNGTSR.js → TOJWPJZO.js} +2 -2
- package/dist/cdn/{DE3MMB5H.js → TQDSVXLJ.js} +2 -2
- package/dist/cdn/{HA5H546A.js → TU3YLD2E.js} +2 -2
- package/dist/cdn/{YOIIQPES.js → TVHBJX3S.js} +2 -2
- package/dist/cdn/{FNUQ3EYP.js → UE6N72DC.js} +2 -2
- package/dist/cdn/{P32RYVRE.js → UFXOUOBW.js} +2 -2
- package/dist/cdn/{CF3UKACA.js → UGKRXWQA.js} +2 -2
- package/dist/cdn/{HSHIW42B.js → UJORWXAT.js} +2 -2
- package/dist/cdn/{PDKKWI65.js → UK5M4QCY.js} +2 -2
- package/dist/cdn/{7N6CMTWP.js → UQIFZG6A.js} +2 -2
- package/dist/cdn/{FSCKWGCN.js → UR6UPX4T.js} +2 -2
- package/dist/cdn/{SZFWQYM7.js → USQILMSK.js} +2 -2
- package/dist/cdn/{EGNG7FQV.js → UTDL752M.js} +2 -2
- package/dist/cdn/{FVRYO4N6.js → VMAECY3E.js} +2 -2
- package/dist/cdn/{W5MT6SED.js → VMISRU6U.js} +2 -2
- package/dist/cdn/{RSBYLF4I.js → VR7J7K4K.js} +2 -2
- package/dist/cdn/{3BDPJILM.js → VRI45OLI.js} +1 -1
- package/dist/cdn/{XQNQRWRJ.js → W7GKGD7L.js} +2 -2
- package/dist/cdn/{Y357OZZO.js → WHUJJZKU.js} +2 -2
- package/dist/cdn/{MFBAIO26.js → WIKB25QH.js} +1 -1
- package/dist/cdn/WL4H37YF.js +4 -0
- package/dist/cdn/{4JL57EDA.js → WUWREGJO.js} +1 -1
- package/dist/cdn/{B6CQHSFM.js → WVPOSWB7.js} +2 -2
- package/dist/cdn/{NA32NW6F.js → WYWH3B2F.js} +2 -2
- package/dist/cdn/{MHSOQCTX.js → X5M5H7V5.js} +2 -2
- package/dist/cdn/{VJ7Q2QJV.js → XHNHEAWO.js} +1 -1
- package/dist/cdn/{7T2AINDJ.js → XTCTFLEI.js} +2 -2
- package/dist/cdn/{ETB57U7D.js → XUXUXKVY.js} +2 -2
- package/dist/cdn/{ZGJEWTXH.js → YL6AVWLZ.js} +2 -2
- package/dist/cdn/{THL7ZCGZ.js → YNSRHIEC.js} +2 -2
- package/dist/cdn/{7NLFZEAY.js → YOAHZBK4.js} +2 -2
- package/dist/cdn/YRXGH5DY.js +4 -0
- package/dist/cdn/{L25S477Y.js → YSWB2MUY.js} +1 -1
- package/dist/cdn/{SEJUC6NB.js → YX3LSUMD.js} +2 -2
- package/dist/cdn/{6AIJERHD.js → ZFALE3R5.js} +2 -2
- package/dist/cdn/{GS362P6K.js → ZKY4KTD2.js} +1 -1
- package/dist/cdn/{LKTMTZEF.js → ZMB25IZB.js} +2 -2
- package/dist/cdn/{WNAJZNVH.js → ZOG53OH5.js} +2 -2
- package/dist/cdn/assets/icon/fileEsl16.json +1 -0
- package/dist/cdn/assets/icon/fileEsl24.json +1 -0
- package/dist/cdn/assets/icon/fileEsl32.json +1 -0
- package/dist/cdn/index.js +2 -2
- package/dist/chunks/ExpandToggle.js +5 -1
- package/dist/chunks/FloatingArrow.js +1 -1
- package/dist/chunks/Heading.js +1 -1
- package/dist/chunks/InternalLabel.js +1 -1
- package/dist/chunks/Validation.js +1 -1
- package/dist/chunks/XButton.js +1 -1
- package/dist/chunks/array.js +1 -1
- package/dist/chunks/component.js +1 -1
- package/dist/chunks/core.js +1 -1
- package/dist/chunks/date.js +1 -1
- package/dist/chunks/dom.js +1 -1
- package/dist/chunks/dynamicClasses.js +1 -1
- package/dist/chunks/filter.js +1 -1
- package/dist/chunks/floating-ui.js +1 -1
- package/dist/chunks/form.js +1 -1
- package/dist/chunks/global.js +1 -1
- package/dist/chunks/guid.js +1 -1
- package/dist/chunks/header.js +1 -1
- package/dist/chunks/input.js +1 -1
- package/dist/chunks/interact.min.js +1 -1
- package/dist/chunks/key.js +1 -1
- package/dist/chunks/label.js +1 -1
- package/dist/chunks/locale.js +1 -1
- package/dist/chunks/logger.js +1 -1
- package/dist/chunks/math.js +1 -1
- package/dist/chunks/observers.js +1 -1
- package/dist/chunks/openCloseComponent.js +1 -1
- package/dist/chunks/resources.js +1 -1
- package/dist/chunks/resources2.js +1 -1
- package/dist/chunks/resources3.js +1 -1
- package/dist/chunks/resources4.js +1 -1
- package/dist/chunks/resources5.js +1 -1
- package/dist/chunks/resources6.js +1 -1
- package/dist/chunks/resources7.js +1 -1
- package/dist/chunks/resources8.js +1 -1
- package/dist/chunks/responsive.js +1 -1
- package/dist/chunks/runtime.js +4 -4
- package/dist/chunks/sortable.js +1 -1
- package/dist/chunks/sortableComponent.js +1 -1
- package/dist/chunks/text.js +1 -1
- package/dist/chunks/useCancelable.js +1 -1
- package/dist/chunks/useFocusTrap.js +1 -1
- package/dist/chunks/useInteractive.js +1 -1
- package/dist/chunks/usePreventDocumentScroll.js +1 -1
- package/dist/chunks/useSetFocus.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/chunks/useTime.js +1 -1
- package/dist/chunks/utils.js +1 -1
- package/dist/chunks/utils2.js +1 -1
- package/dist/chunks/utils3.js +1 -1
- package/dist/chunks/utils4.js +1 -1
- package/dist/components/calcite-accordion/customElement.js +1 -1
- package/dist/components/calcite-accordion-item/customElement.js +1 -1
- package/dist/components/calcite-action/customElement.d.ts +2 -2
- package/dist/components/calcite-action/customElement.js +2 -2
- package/dist/components/calcite-action-bar/customElement.js +41 -4
- package/dist/components/calcite-action-bar/utils.d.ts +1 -0
- package/dist/components/calcite-action-group/customElement.d.ts +15 -1
- package/dist/components/calcite-action-group/customElement.js +72 -4
- package/dist/components/calcite-action-menu/customElement.js +1 -1
- package/dist/components/calcite-action-pad/customElement.js +40 -3
- package/dist/components/calcite-alert/customElement.js +1 -1
- package/dist/components/calcite-autocomplete/customElement.js +1 -1
- package/dist/components/calcite-autocomplete-item/customElement.js +1 -1
- package/dist/components/calcite-autocomplete-item-group/customElement.js +1 -1
- package/dist/components/calcite-avatar/customElement.js +1 -1
- package/dist/components/calcite-block/customElement.js +1 -1
- package/dist/components/calcite-block-group/customElement.js +1 -1
- package/dist/components/calcite-block-section/customElement.js +1 -1
- package/dist/components/calcite-button/customElement.js +1 -1
- package/dist/components/calcite-card/customElement.js +1 -1
- package/dist/components/calcite-card-group/customElement.js +1 -1
- package/dist/components/calcite-carousel/customElement.js +1 -1
- package/dist/components/calcite-carousel-item/customElement.js +1 -1
- package/dist/components/calcite-checkbox/customElement.js +1 -1
- package/dist/components/calcite-chip/customElement.js +1 -1
- package/dist/components/calcite-chip-group/customElement.js +1 -1
- package/dist/components/calcite-color-picker/customElement.js +1 -1
- package/dist/components/calcite-color-picker-hex-input/customElement.js +1 -1
- package/dist/components/calcite-color-picker-swatch/customElement.js +1 -1
- package/dist/components/calcite-combobox/customElement.js +1 -1
- package/dist/components/calcite-combobox-item/customElement.js +1 -1
- package/dist/components/calcite-combobox-item-group/customElement.js +1 -1
- package/dist/components/calcite-date-picker/customElement.js +1 -1
- package/dist/components/calcite-date-picker-day/customElement.js +1 -1
- package/dist/components/calcite-date-picker-month/customElement.js +1 -1
- package/dist/components/calcite-date-picker-month-header/customElement.js +1 -1
- package/dist/components/calcite-dialog/customElement.js +1 -1
- package/dist/components/calcite-dropdown/customElement.js +1 -1
- package/dist/components/calcite-dropdown-group/customElement.js +1 -1
- package/dist/components/calcite-dropdown-item/customElement.js +1 -1
- package/dist/components/calcite-fab/customElement.js +1 -1
- package/dist/components/calcite-filter/customElement.js +1 -1
- package/dist/components/calcite-flow/customElement.js +1 -1
- package/dist/components/calcite-flow-item/customElement.js +1 -1
- package/dist/components/calcite-graph/customElement.js +1 -1
- package/dist/components/calcite-handle/customElement.js +1 -1
- package/dist/components/calcite-icon/customElement.js +1 -1
- package/dist/components/calcite-inline-editable/customElement.js +1 -1
- package/dist/components/calcite-input/customElement.js +1 -1
- package/dist/components/calcite-input-date-picker/customElement.js +1 -1
- package/dist/components/calcite-input-message/customElement.js +1 -1
- package/dist/components/calcite-input-number/customElement.js +1 -1
- package/dist/components/calcite-input-text/customElement.js +1 -1
- package/dist/components/calcite-input-time-picker/customElement.js +1 -1
- package/dist/components/calcite-input-time-zone/customElement.js +1 -1
- package/dist/components/calcite-label/customElement.js +1 -1
- package/dist/components/calcite-link/customElement.js +1 -1
- package/dist/components/calcite-list/customElement.js +1 -1
- package/dist/components/calcite-list-item/customElement.js +2 -2
- package/dist/components/calcite-list-item-group/customElement.js +1 -1
- package/dist/components/calcite-loader/customElement.js +1 -1
- package/dist/components/calcite-menu/customElement.js +1 -1
- package/dist/components/calcite-menu-item/customElement.js +1 -1
- package/dist/components/calcite-meter/customElement.js +1 -1
- package/dist/components/calcite-navigation/customElement.js +1 -1
- package/dist/components/calcite-navigation-logo/customElement.js +1 -1
- package/dist/components/calcite-navigation-user/customElement.js +1 -1
- package/dist/components/calcite-notice/customElement.js +1 -1
- package/dist/components/calcite-option/customElement.js +1 -1
- package/dist/components/calcite-option-group/customElement.js +1 -1
- package/dist/components/calcite-pagination/customElement.js +1 -1
- package/dist/components/calcite-panel/customElement.js +1 -1
- package/dist/components/calcite-popover/customElement.js +2 -2
- package/dist/components/calcite-progress/customElement.js +1 -1
- package/dist/components/calcite-radio-button/customElement.js +1 -1
- package/dist/components/calcite-radio-button-group/customElement.js +1 -1
- package/dist/components/calcite-rating/customElement.js +1 -1
- package/dist/components/calcite-scrim/customElement.js +1 -1
- package/dist/components/calcite-segmented-control/customElement.js +1 -1
- package/dist/components/calcite-segmented-control-item/customElement.js +1 -1
- package/dist/components/calcite-select/customElement.js +1 -1
- package/dist/components/calcite-sheet/customElement.js +1 -1
- package/dist/components/calcite-shell/customElement.js +1 -1
- package/dist/components/calcite-shell-panel/customElement.js +2 -2
- package/dist/components/calcite-slider/customElement.js +1 -1
- package/dist/components/calcite-sort-handle/customElement.js +2 -2
- package/dist/components/calcite-sortable-list/customElement.js +1 -1
- package/dist/components/calcite-split-button/customElement.js +1 -1
- package/dist/components/calcite-stack/customElement.js +1 -1
- package/dist/components/calcite-stepper/customElement.js +2 -2
- package/dist/components/calcite-stepper-item/customElement.js +1 -1
- package/dist/components/calcite-swatch/customElement.js +1 -1
- package/dist/components/calcite-swatch-group/customElement.js +1 -1
- package/dist/components/calcite-switch/customElement.js +1 -1
- package/dist/components/calcite-tab/customElement.js +1 -1
- package/dist/components/calcite-tab-nav/customElement.js +2 -2
- package/dist/components/calcite-tab-title/customElement.js +1 -1
- package/dist/components/calcite-table/customElement.js +1 -1
- package/dist/components/calcite-table-cell/customElement.js +1 -1
- package/dist/components/calcite-table-header/customElement.js +1 -1
- package/dist/components/calcite-table-row/customElement.js +1 -1
- package/dist/components/calcite-tabs/customElement.js +1 -1
- package/dist/components/calcite-text-area/customElement.js +1 -1
- package/dist/components/calcite-tile/customElement.js +1 -1
- package/dist/components/calcite-tile-group/customElement.js +1 -1
- package/dist/components/calcite-time-picker/customElement.js +1 -1
- package/dist/components/calcite-tooltip/customElement.js +1 -1
- package/dist/components/calcite-tree/customElement.js +1 -1
- package/dist/components/calcite-tree-item/customElement.js +1 -1
- package/dist/docs/api.json +66 -10
- package/dist/docs/docs.json +39 -4
- package/dist/docs/vscode.html-custom-data.json +18 -0
- package/dist/docs/web-types.json +20 -2
- package/dist/index.js +1 -1
- package/dist/loader.js +2 -2
- package/dist/types/lumina.d.ts +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/dist/types/preact10.d.ts +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/stencil.d.ts +1 -1
- package/package.json +3 -3
- package/dist/cdn/3YP7PDPY.js +0 -4
- package/dist/cdn/I2COEUMU.js +0 -4
- package/dist/cdn/KRXG7RTQ.js +0 -4
- package/dist/cdn/WMFPEE5T.js +0 -4
- package/dist/cdn/WQ2CNT76.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as C}from"./VYBIOJ5F.js";import{a as H}from"./3DZK3RG7.js";import{a as P}from"./MFBAIO26.js";import{a as y}from"./VKUS34R6.js";import{a as O}from"./EQ25YK3K.js";import"./VKBFZH3Q.js";import{D as u,e as B,t as L,u as M}from"./W35ZAP2H.js";import"./EK3BWMVE.js";import{B as R,C as $,D,E as s,J as z,L as _,M as E,P as V,g as I,h as p,o as w}from"./GAXQ53KY.js";var K=I`.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-right{animation-name:in-right}.calcite-animate__in-left{animation-name:in-left}.calcite-animate__in-scale{animation-name:in-scale}@keyframes in{0%{opacity:0}to{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0,-5px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0,5px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-right{0%{opacity:0;transform:translate3D(-5px,0,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-left{0%{opacity:0;transform:translate3D(5px,0,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(.95,.95,1)}to{opacity:1;transform:scaleZ(1)}}`,o={container:"container",actionBarContainer:"action-bar-container",contentContainer:"content-container",content:"content",contentHeader:"content__header",contentBody:"content__body",contentOverlay:"content--overlay",floatAll:"float-all",floatContent:"float--content",resizeHandle:"resize-handle",resizeHandleBar:"resize-handle-bar"},N={actionBar:"action-bar",header:"header"},U={dragVertical:"drag-resize-vertical",dragHorizontal:"drag-resize-horizontal"},T=I`:host{pointer-events:none;position:relative;display:flex;flex:0 1 auto;align-items:stretch;z-index:var(--calcite-shell-panel-z-index, var(--calcite-z-index));--calcite-shell-panel-max-height: unset;--calcite-internal-shell-panel-shadow-block-start: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-block-end: 0 -4px 8px -1px rgba(0, 0, 0, .08), 0 -2px 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-inline-start: 4px 0 8px -1px rgba(0, 0, 0, .08), 2px 0 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-inline-end: -4px 0 8px -1px rgba(0, 0, 0, .08), -2px 0 4px -1px rgba(0, 0, 0, .04)}.calcite--rtl.content--overlay{--calcite-internal-shell-panel-shadow-inline-start: -4px 0 8px -1px rgba(0, 0, 0, .08), -2px 0 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-inline-end: 4px 0 8px -1px rgba(0, 0, 0, .08), 2px 0 4px -1px rgba(0, 0, 0, .04)}:host([layout=vertical]){z-index:var(--calcite-shell-panel-z-index, calc(var(--calcite-z-index) + 1))}:host([layout=vertical][display-mode=overlay]){z-index:var(--calcite-shell-panel-z-index, calc(var(--calcite-z-index-header) + 1))}:host([layout=vertical][display-mode=float-all]) .content{flex:2}:host([layout=vertical]:not([display-mode=float-all])) .width-s{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 12vw);--calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 300px);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 150px)}:host([layout=vertical][display-mode=float-all]) .width-s{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 12vw);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 150px)}:host([layout=vertical]:not([display-mode=float-all])) .width-m{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 20vw);--calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 420px);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 240px)}:host([layout=vertical][display-mode=float-all]) .width-m{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 20vw);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 240px)}:host([layout=vertical]:not([display-mode=float-all])) .width-l{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 45vw);--calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 680px);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 340px)}:host([layout=vertical][display-mode=float-all]) .width-l{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 45vw);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 340px)}:host([display-mode=float-all][layout]) .content,:host([display-mode=float-all][layout]) .float-all{block-size:var(--calcite-shell-panel-height, var(--calcite-internal-shell-panel-max-height))}:host([layout=horizontal]) .content{--calcite-internal-shell-panel-height: var(--calcite-shell-panel-height);--calcite-internal-shell-panel-min-height: var(--calcite-shell-panel-min-height, 5vh);--calcite-internal-shell-panel-max-height: var(--calcite-shell-panel-max-height, 30vh)}:host([layout=horizontal]) .height-s{--calcite-internal-shell-panel-height: var(--calcite-shell-panel-height);--calcite-internal-shell-panel-min-height: var(--calcite-shell-panel-min-height, 5vh);--calcite-internal-shell-panel-max-height: var(--calcite-shell-panel-max-height, 20vh)}:host([layout=horizontal]) .height-l{--calcite-internal-shell-panel-height: var(--calcite-shell-panel-height);--calcite-internal-shell-panel-min-height: var(--calcite-shell-panel-min-height, 5vh);--calcite-internal-shell-panel-max-height: var(--calcite-shell-panel-max-height, 40vh)}.container{pointer-events:none;box-sizing:border-box;display:flex;block-size:100%;flex:1 1 auto;align-items:stretch;background-color:transparent;font-size:var(--calcite-font-size--1);color:var(--calcite-shell-panel-text-color, var(--calcite-color-text-2))}.container *{box-sizing:border-box}.container.float-all{margin-block:var(--calcite-spacing-sm);margin-inline:var(--calcite-spacing-sm)}.float-all{min-block-size:var(--calcite-internal-shell-panel-min-height);max-block-size:var(--calcite-internal-shell-panel-max-height, calc(100% - 1rem) );box-shadow:var(--calcite-shell-panel-shadow, var(--calcite-shadow-sm));border-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));overflow:hidden}:host([layout=vertical][position=start]) .float-all{border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-shell-panel-border-color, var(--calcite-color-border-3))}:host([layout=vertical][position=end]) .float-all{border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-shell-panel-border-color, var(--calcite-color-border-3)))}:host([layout=horizontal]) .float-all{border-inline:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-shell-panel-border-color, var(--calcite-color-border-3)))}:host([layout=horizontal]) .container{block-size:auto;inline-size:100%;flex-direction:column}.resize-handle{position:absolute;box-sizing:border-box;display:flex;-webkit-user-select:none;user-select:none;align-items:center;justify-content:center;outline:2px solid transparent;outline-offset:2px;--calcite-internal-shell-panel-resize-handle-offset: calc( (var(--calcite-size-fixed-xxl) - var(--calcite-size-fixed-sm-plus)) / 2 * -1 );z-index:var(--calcite-z-index-header)}.resize-handle:active .resize-handle-bar,.resize-handle:hover .resize-handle-bar{color:var(--calcite-shell-panel-resize-icon-color, var(--calcite-color-text-1));background-color:var(--calcite-shell-panel-resize-background-color, var(--calcite-color-foreground-3))}.resize-handle-bar{pointer-events:none;display:flex;align-items:center;justify-content:center;color:var(--calcite-shell-panel-resize-icon-color, var(--calcite-color-border-input));background-color:var(--calcite-shell-panel-resize-background-color, var(--calcite-color-background))}.resize-handle:focus .resize-handle-bar{outline-color:transparent;outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)))}:host([position=start][layout=vertical]) .resize-handle{inline-size:var(--calcite-size-fixed-xxl);inset-inline-end:var(--calcite-internal-shell-panel-resize-handle-offset);block-size:100%}:host([position=start][layout=vertical]) .resize-handle-bar{block-size:100%;inline-size:var(--calcite-size-fixed-sm-plus);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=start][layout=vertical]):host([display-mode^=float]) .resize-handle-bar{border-start-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-end-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}:host([position=end][layout=vertical]) .resize-handle{inline-size:var(--calcite-size-fixed-xxl);inset-inline-start:var(--calcite-internal-shell-panel-resize-handle-offset);block-size:100%}:host([position=end][layout=vertical]) .resize-handle-bar{block-size:100%;inline-size:var(--calcite-size-fixed-sm-plus);border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=end][layout=vertical]):host([display-mode^=float]) .resize-handle-bar{border-start-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-end-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}:host([position=start][layout=horizontal]) .resize-handle{block-size:var(--calcite-size-fixed-xxl);inline-size:100%;inset-block-end:var(--calcite-internal-shell-panel-resize-handle-offset)}:host([position=start][layout=horizontal]) .resize-handle-bar{inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);border-block-start:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=start][layout=horizontal]):host([display-mode^=float]) .resize-handle-bar{border-end-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-end-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}:host([position=end][layout=horizontal]) .resize-handle{block-size:var(--calcite-size-fixed-xxl);inline-size:100%;inset-block-start:var(--calcite-internal-shell-panel-resize-handle-offset)}:host([position=end][layout=horizontal]) .resize-handle-bar{inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);border-block-end:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=end][layout=horizontal]):host([display-mode^=float]) .resize-handle-bar{border-start-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-start-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}::slotted(calcite-panel),::slotted(calcite-flow){block-size:100%;inline-size:100%;flex:1 1 auto;max-block-size:unset;max-inline-size:unset}.action-bar-container{pointer-events:auto;box-sizing:border-box;display:flex;flex:1 1 auto}.content-container{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;align-items:stretch;align-self:stretch}:host([layout=horizontal]) .action-bar-container,:host([layout=horizontal]) .content-container{flex-direction:column}.content{pointer-events:auto;position:relative;box-sizing:border-box;display:flex;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;align-self:stretch;padding:0;background-color:var(--calcite-shell-panel-background-color, var(--calcite-color-background));transition:max-block-size var(--calcite-animation-timing),max-inline-size var(--calcite-animation-timing)}:host([layout=vertical]:not([display-mode=float-all])) .content{inline-size:var(--calcite-internal-shell-panel-width);max-inline-size:var(--calcite-internal-shell-panel-max-width);min-inline-size:var(--calcite-internal-shell-panel-min-width)}:host([layout=vertical][display-mode=float-all]) .content{inline-size:var(--calcite-internal-shell-panel-width);min-inline-size:var(--calcite-internal-shell-panel-min-width)}:host([layout=horizontal]:not([display-mode=float-all])) .content{block-size:var(--calcite-internal-shell-panel-height);max-block-size:var(--calcite-internal-shell-panel-max-height);min-block-size:var(--calcite-internal-shell-panel-min-height)}:host([resizable][layout=vertical][position=start]) .content{padding-inline-end:var(--calcite-size-fixed-sm-plus)}:host([resizable][layout=vertical][position=end]) .content{padding-inline-start:var(--calcite-size-fixed-sm-plus)}:host([resizable][layout=horizontal][position=start]) .content{padding-block-end:var(--calcite-size-fixed-sm-plus)}:host([resizable][layout=horizontal][position=end]) .content{padding-block-start:var(--calcite-size-fixed-sm-plus)}.content__header{display:flex;flex:0 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch}.content__body{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.content--overlay{position:absolute;--tw-shadow: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--tw-shadow-colored: 0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--calcite-shell-panel-shadow, var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow))}:host([layout=vertical]) .content--overlay{inset-block-start:0px;block-size:100%}:host([layout=horizontal]) .content--overlay{inset-inline-start:0px;inline-size:100%}:host([layout=vertical][position=start]) .content--overlay{inset-inline-start:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-inline-start)}:host([layout=vertical][position=end]) .content--overlay{inset-inline-end:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-inline-end)}:host([layout=horizontal][position=start]) .content--overlay{inset-block-start:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-block-start)}:host([layout=horizontal][position=end]) .content--overlay{inset-block-end:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-block-end)}.float--content{margin-block-end:auto;block-size:auto;overflow:hidden;--tw-shadow: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--tw-shadow-colored: 0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--calcite-shell-panel-shadow, var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow));border-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));margin-inline:var(--calcite-spacing-sm);margin-block-start:var(--calcite-spacing-sm);max-block-size:var(--calcite-internal-shell-panel-max-height, calc(100% - 1rem) )}.float--content ::slotted(calcite-panel),.float--content ::slotted(calcite-flow){max-block-size:unset}:host([layout=horizontal]) .float--content{margin-block:var(--calcite-spacing-sm)}:host([position=start]) .float--content ::slotted(calcite-panel),:host([position=start]) .float--content ::slotted(calcite-flow),:host([position=end]) .float--content ::slotted(calcite-panel),:host([position=end]) .float--content ::slotted(calcite-flow){border-style:none}slot[name=action-bar]::slotted(calcite-action-bar),.content ::slotted(calcite-flow),.content ::slotted(calcite-panel:not([closed])){border:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=start]:not([slot=panel-end])) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=start]:not([slot=panel-end])) .content ::slotted(calcite-flow),:host([position=start]:not([slot=panel-end])) .content ::slotted(calcite-panel),:host([position=end][slot=panel-start]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=end][slot=panel-start]) .content ::slotted(calcite-flow),:host([position=end][slot=panel-start]) .content ::slotted(calcite-panel){border-inline-start:none}:host([resizable][layout=vertical]) .content ::slotted(calcite-flow),:host([resizable][layout=vertical]) .content ::slotted(calcite-panel){border-inline-start:none;border-inline-end:none}:host([resizable][layout=horizontal]) .content ::slotted(calcite-flow),:host([resizable][layout=horizontal]) .content ::slotted(calcite-panel){border-block-start:none;border-block-end:none}:host([position=end]:not([slot=panel-start])) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=end]:not([slot=panel-start])) .content ::slotted(calcite-flow),:host([position=end]:not([slot=panel-start])) .content ::slotted(calcite-panel),:host([position=start][slot=panel-end]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=start][slot=panel-end]) .content ::slotted(calcite-flow),:host([position=start][slot=panel-end]) .content ::slotted(calcite-panel){border-inline-end:none}:host([layout=horizontal]) slot[name=action-bar]::slotted(calcite-action-bar){border-inline:0}:host([layout=horizontal][position=start]) .content ::slotted(calcite-flow),:host([layout=horizontal][position=start]) .content ::slotted(calcite-panel){border-inline:0;border-block-start:0}:host([layout=horizontal][position=end]) .content ::slotted(calcite-flow),:host([layout=horizontal][position=end]) .content ::slotted(calcite-panel){border-inline:0;border-block-end:0}:host([hidden]){display:none}[hidden]{display:none}`,A=class extends D{constructor(){super(...arguments),this.actionBars=[],this.contentRef=R(),this.messages=O(),this.resizeValues={inlineSize:null,blockSize:null,minInlineSize:null,minBlockSize:null,maxInlineSize:null,maxBlockSize:null},this.hasHeader=!1,this.collapsed=!1,this.displayMode="dock",this.layout="vertical",this.position="start",this.resizable=!1,this.widthScale="m",this.calciteInternalShellPanelResizeEnd=w({cancelable:!1}),this.calciteInternalShellPanelResizeStart=w({cancelable:!1}),this.calciteShellPanelCollapse=w({cancelable:!1}),this.calciteShellPanelExpand=w({cancelable:!1})}static{this.properties={resizeValues:[16,{},{state:!0}],hasHeader:[16,{},{state:!0}],collapsed:[7,{},{reflect:!0,type:Boolean}],displayMode:[3,{},{reflect:!0}],heightScale:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],position:[3,{},{reflect:!0}],resizable:[7,{},{reflect:!0,type:Boolean}],height:[3,{},{reflect:!0}],widthScale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=[T,K]}willUpdate(e){e.has("layout")&&(this.hasUpdated||this.layout!=="vertical")&&this.setActionBarsLayout(this.actionBars),e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calciteShellPanelCollapse.emit():this.calciteShellPanelExpand.emit())}disconnectedCallback(){super.disconnectedCallback(),this.cleanupInteractions()}getContentElDOMRect(){return this.contentRef.value.getBoundingClientRect()}handleKeyDown(e){let{key:a,defaultPrevented:r,shiftKey:l}=e,{position:i,layout:t,resizable:n,contentRef:c,el:b,resizeValues:{maxBlockSize:x,maxInlineSize:g,minBlockSize:v,minInlineSize:k}}=this,S=[...t==="horizontal"?["ArrowUp","ArrowDown"]:["ArrowLeft","ArrowRight"],"Home","End"];if(!n||!c.value||r||!S.includes(a))return;let d=this.getContentElDOMRect(),f=B(b)==="rtl"?-1:1,h=l?E:_;switch(a){case"ArrowUp":this.updateSize({size:d.height+(t==="horizontal"&&i==="end"?h:-h),type:"blockSize"}),e.preventDefault();break;case"ArrowDown":this.updateSize({size:d.height+(t==="horizontal"&&i==="end"?-h:h),type:"blockSize"}),e.preventDefault();break;case"ArrowLeft":this.updateSize({size:d.width+(t==="vertical"&&i==="end"?h:-h)*f,type:"inlineSize"}),e.preventDefault();break;case"ArrowRight":this.updateSize({size:d.width+(t==="vertical"&&i==="end"?-h:h)*f,type:"inlineSize"}),e.preventDefault();break;case"Home":this.updateSize({size:t==="horizontal"?v:k,type:t==="horizontal"?"blockSize":"inlineSize"}),e.preventDefault();break;case"End":this.updateSize({size:t==="horizontal"?x:g,type:t==="horizontal"?"blockSize":"inlineSize"}),e.preventDefault();break}}updateSize({type:e,size:a}){let{contentRef:r,resizeValues:l}=this;if(!r.value)return;let i=e==="blockSize"?"minBlockSize":"minInlineSize",t=e==="blockSize"?"maxBlockSize":"maxInlineSize",n=l[i]&&l[t]?P(a,l[i],l[t]):a,c=Math.round(n);this.resizeValues={...l,[e]:c},r.value.style[e]=a!==null?`${c}px`:null}cleanupInteractions(){this.interaction?.unset()}async setupInteractions(){this.cleanupInteractions();let{el:e,contentRef:a,resizable:r,position:l,collapsed:i,resizeHandleEl:t,layout:n}=this;if(!a.value||i||!r||!t)return;await this.el.componentOnReady();let{inlineSize:c,minInlineSize:b,blockSize:x,minBlockSize:g,maxInlineSize:v,maxBlockSize:k}=window.getComputedStyle(a.value),m={inlineSize:u(c),blockSize:u(x),minInlineSize:u(b),minBlockSize:u(g),maxInlineSize:u(v)||window.innerWidth,maxBlockSize:u(k)||window.innerHeight};this.resizeValues=m;let S=B(e)==="rtl";this.interaction=C(a.value,{context:e.ownerDocument}).resizable({edges:{top:l==="end"&&n==="horizontal"?t:!1,right:l===(S?"end":"start")&&n==="vertical"?t:!1,bottom:l==="start"&&n==="horizontal"?t:!1,left:l===(S?"start":"end")&&n==="vertical"?t:!1},modifiers:[C.modifiers.restrictSize({min:{width:m.minInlineSize,height:m.minBlockSize},max:{width:m.maxInlineSize,height:m.maxBlockSize}})],listeners:{resizestart:()=>{this.calciteInternalShellPanelResizeStart.emit()},resizeend:()=>{this.calciteInternalShellPanelResizeEnd.emit()},move:({rect:d})=>{let f=n==="horizontal";this.updateSize({size:f?d.height:d.width,type:f?"blockSize":"inlineSize"})}}})}setResizeHandleEl(e){this.resizeHandleEl=e,this.setupInteractions()}setActionBarsLayout(e){e.forEach(a=>a.layout=this.layout)}handleActionBarSlotChange(e){let a=M(e).filter(r=>r?.matches("calcite-action-bar"));this.actionBars=a,this.setActionBarsLayout(a)}handleHeaderSlotChange(e){this.hasHeader=L(e)}getResizeIcon(){let{layout:e}=this;return e==="horizontal"?U.dragVertical:U.dragHorizontal}renderHeader(){return y("header",p`<div class=${s(o.contentHeader)} .hidden=${!this.hasHeader}><slot name=${N.header} @slotchange=${this.handleHeaderSlotChange}></slot></div>`)}render(){let{collapsed:e,position:a,resizable:r,layout:l,displayMode:i,resizeValues:t}=this,n=B(this.el),c=!e&&r?y("resize-handle",p`<div .ariaLabel=${this.messages.resize} .ariaOrientation=${l==="horizontal"?"vertical":"horizontal"} .ariaValueMax=${l=="horizontal"?t.maxBlockSize:t.maxInlineSize} .ariaValueMin=${l=="horizontal"?t.minBlockSize:t.minInlineSize} .ariaValueNow=${l=="horizontal"?t.blockSize:t.inlineSize} class=${s(o.resizeHandle)} @keydown=${this.handleKeyDown} role=separator tabindex=0 touch-action=none ${$(this.setResizeHandleEl)}><div class=${s(o.resizeHandleBar)}><calcite-icon .icon=${this.getResizeIcon()} scale=s></calcite-icon></div></div>`):null,b=()=>l==="horizontal"?a==="start"?z.calciteAnimateInDown:z.calciteAnimateInUp:n==="ltr"&&a==="end"||n==="rtl"&&a==="start"?z.calciteAnimateInLeft:z.calciteAnimateInRight,x=p`<div class=${s(o.contentContainer)}>${y("content",p`<div class=${s({[z.rtl]:n==="rtl",[o.content]:!0,[o.contentOverlay]:i==="overlay",[o.floatContent]:i==="float-content"||i==="float",[z.calciteAnimate]:i==="overlay",[b()]:i==="overlay",[H("width",this.width,this.widthScale)]:!!(this.width||this.widthScale),[H("height",this.height,this.heightScale)]:!!(this.height||this.heightScale)})} .hidden=${e} ${$(this.contentRef)}>${this.renderHeader()}<div class=${s(o.contentBody)}><slot></slot></div>${c}</div>`)}</div>`,v=[y("action-bar-container",p`<div class=${s(o.actionBarContainer)}><slot name=${N.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`),x];return a==="end"&&v.reverse(),p`<div class=${s({[o.container]:!0,[o.floatAll]:i==="float-all"})}>${v}</div>`}};V("calcite-shell-panel",A);export{A as ShellPanel};
|
|
3
|
+
v5.0.0-next.26 */
|
|
4
|
+
import{a as C}from"./SZYDF2UZ.js";import{a as H}from"./MD5WJSZN.js";import{a as P}from"./WIKB25QH.js";import{a as y}from"./52WSL3OS.js";import{a as O}from"./6F7MIVOD.js";import"./7UWIO6G4.js";import{D as u,e as B,t as L,u as M}from"./5DDVN7VT.js";import"./HTSVYMIU.js";import{B as R,C as $,D,E as s,J as z,L as _,M as E,P as V,g as I,h as p,o as w}from"./S3LMUVIR.js";var K=I`.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-right{animation-name:in-right}.calcite-animate__in-left{animation-name:in-left}.calcite-animate__in-scale{animation-name:in-scale}@keyframes in{0%{opacity:0}to{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0,-5px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0,5px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-right{0%{opacity:0;transform:translate3D(-5px,0,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-left{0%{opacity:0;transform:translate3D(5px,0,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(.95,.95,1)}to{opacity:1;transform:scaleZ(1)}}`,o={container:"container",actionBarContainer:"action-bar-container",contentContainer:"content-container",content:"content",contentHeader:"content__header",contentBody:"content__body",contentOverlay:"content--overlay",floatAll:"float-all",floatContent:"float--content",resizeHandle:"resize-handle",resizeHandleBar:"resize-handle-bar"},N={actionBar:"action-bar",header:"header"},U={dragVertical:"drag-resize-vertical",dragHorizontal:"drag-resize-horizontal"},T=I`:host{pointer-events:none;position:relative;display:flex;flex:0 1 auto;align-items:stretch;z-index:var(--calcite-shell-panel-z-index, var(--calcite-z-index));--calcite-shell-panel-max-height: unset;--calcite-internal-shell-panel-shadow-block-start: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-block-end: 0 -4px 8px -1px rgba(0, 0, 0, .08), 0 -2px 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-inline-start: 4px 0 8px -1px rgba(0, 0, 0, .08), 2px 0 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-inline-end: -4px 0 8px -1px rgba(0, 0, 0, .08), -2px 0 4px -1px rgba(0, 0, 0, .04)}.calcite--rtl.content--overlay{--calcite-internal-shell-panel-shadow-inline-start: -4px 0 8px -1px rgba(0, 0, 0, .08), -2px 0 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-inline-end: 4px 0 8px -1px rgba(0, 0, 0, .08), 2px 0 4px -1px rgba(0, 0, 0, .04)}:host([layout=vertical]){z-index:var(--calcite-shell-panel-z-index, calc(var(--calcite-z-index) + 1))}:host([layout=vertical][display-mode=overlay]){z-index:var(--calcite-shell-panel-z-index, calc(var(--calcite-z-index-header) + 1))}:host([layout=vertical][display-mode=float-all]) .content{flex:2}:host([layout=vertical]:not([display-mode=float-all])) .width-s{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 12vw);--calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 300px);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 150px)}:host([layout=vertical][display-mode=float-all]) .width-s{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 12vw);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 150px)}:host([layout=vertical]:not([display-mode=float-all])) .width-m{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 20vw);--calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 420px);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 240px)}:host([layout=vertical][display-mode=float-all]) .width-m{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 20vw);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 240px)}:host([layout=vertical]:not([display-mode=float-all])) .width-l{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 45vw);--calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 680px);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 340px)}:host([layout=vertical][display-mode=float-all]) .width-l{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 45vw);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 340px)}:host([display-mode=float-all][layout]) .content,:host([display-mode=float-all][layout]) .float-all{block-size:var(--calcite-shell-panel-height, var(--calcite-internal-shell-panel-max-height))}:host([layout=horizontal]) .content{--calcite-internal-shell-panel-height: var(--calcite-shell-panel-height);--calcite-internal-shell-panel-min-height: var(--calcite-shell-panel-min-height, 5vh);--calcite-internal-shell-panel-max-height: var(--calcite-shell-panel-max-height, 30vh)}:host([layout=horizontal]) .height-s{--calcite-internal-shell-panel-height: var(--calcite-shell-panel-height);--calcite-internal-shell-panel-min-height: var(--calcite-shell-panel-min-height, 5vh);--calcite-internal-shell-panel-max-height: var(--calcite-shell-panel-max-height, 20vh)}:host([layout=horizontal]) .height-l{--calcite-internal-shell-panel-height: var(--calcite-shell-panel-height);--calcite-internal-shell-panel-min-height: var(--calcite-shell-panel-min-height, 5vh);--calcite-internal-shell-panel-max-height: var(--calcite-shell-panel-max-height, 40vh)}.container{pointer-events:none;box-sizing:border-box;display:flex;block-size:100%;flex:1 1 auto;align-items:stretch;background-color:transparent;font-size:var(--calcite-font-size--1);color:var(--calcite-shell-panel-text-color, var(--calcite-color-text-2))}.container *{box-sizing:border-box}.container.float-all{margin-block:var(--calcite-spacing-sm);margin-inline:var(--calcite-spacing-sm)}.float-all{min-block-size:var(--calcite-internal-shell-panel-min-height);max-block-size:var(--calcite-internal-shell-panel-max-height, calc(100% - 1rem) );box-shadow:var(--calcite-shell-panel-shadow, var(--calcite-shadow-sm));border-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));overflow:hidden}:host([layout=vertical][position=start]) .float-all{border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-shell-panel-border-color, var(--calcite-color-border-3))}:host([layout=vertical][position=end]) .float-all{border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-shell-panel-border-color, var(--calcite-color-border-3)))}:host([layout=horizontal]) .float-all{border-inline:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-shell-panel-border-color, var(--calcite-color-border-3)))}:host([layout=horizontal]) .container{block-size:auto;inline-size:100%;flex-direction:column}.resize-handle{position:absolute;box-sizing:border-box;display:flex;-webkit-user-select:none;user-select:none;align-items:center;justify-content:center;outline:2px solid transparent;outline-offset:2px;--calcite-internal-shell-panel-resize-handle-offset: calc( (var(--calcite-size-fixed-xxl) - var(--calcite-size-fixed-sm-plus)) / 2 * -1 );z-index:var(--calcite-z-index-header)}.resize-handle:active .resize-handle-bar,.resize-handle:hover .resize-handle-bar{color:var(--calcite-shell-panel-resize-icon-color, var(--calcite-color-text-1));background-color:var(--calcite-shell-panel-resize-background-color, var(--calcite-color-foreground-3))}.resize-handle-bar{pointer-events:none;display:flex;align-items:center;justify-content:center;color:var(--calcite-shell-panel-resize-icon-color, var(--calcite-color-border-input));background-color:var(--calcite-shell-panel-resize-background-color, var(--calcite-color-background))}.resize-handle:focus .resize-handle-bar{outline-color:transparent;outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)))}:host([position=start][layout=vertical]) .resize-handle{inline-size:var(--calcite-size-fixed-xxl);inset-inline-end:var(--calcite-internal-shell-panel-resize-handle-offset);block-size:100%}:host([position=start][layout=vertical]) .resize-handle-bar{block-size:100%;inline-size:var(--calcite-size-fixed-sm-plus);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=start][layout=vertical]):host([display-mode^=float]) .resize-handle-bar{border-start-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-end-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}:host([position=end][layout=vertical]) .resize-handle{inline-size:var(--calcite-size-fixed-xxl);inset-inline-start:var(--calcite-internal-shell-panel-resize-handle-offset);block-size:100%}:host([position=end][layout=vertical]) .resize-handle-bar{block-size:100%;inline-size:var(--calcite-size-fixed-sm-plus);border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=end][layout=vertical]):host([display-mode^=float]) .resize-handle-bar{border-start-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-end-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}:host([position=start][layout=horizontal]) .resize-handle{block-size:var(--calcite-size-fixed-xxl);inline-size:100%;inset-block-end:var(--calcite-internal-shell-panel-resize-handle-offset)}:host([position=start][layout=horizontal]) .resize-handle-bar{inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);border-block-start:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=start][layout=horizontal]):host([display-mode^=float]) .resize-handle-bar{border-end-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-end-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}:host([position=end][layout=horizontal]) .resize-handle{block-size:var(--calcite-size-fixed-xxl);inline-size:100%;inset-block-start:var(--calcite-internal-shell-panel-resize-handle-offset)}:host([position=end][layout=horizontal]) .resize-handle-bar{inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);border-block-end:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=end][layout=horizontal]):host([display-mode^=float]) .resize-handle-bar{border-start-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-start-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}::slotted(calcite-panel),::slotted(calcite-flow){block-size:100%;inline-size:100%;flex:1 1 auto;max-block-size:unset;max-inline-size:unset}.action-bar-container{pointer-events:auto;box-sizing:border-box;display:flex;flex:1 1 auto}.content-container{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;align-items:stretch;align-self:stretch}:host([layout=horizontal]) .action-bar-container,:host([layout=horizontal]) .content-container{flex-direction:column}.content{pointer-events:auto;position:relative;box-sizing:border-box;display:flex;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;align-self:stretch;padding:0;background-color:var(--calcite-shell-panel-background-color, var(--calcite-color-background));transition:max-block-size var(--calcite-animation-timing),max-inline-size var(--calcite-animation-timing)}:host([layout=vertical]:not([display-mode=float-all])) .content{inline-size:var(--calcite-internal-shell-panel-width);max-inline-size:var(--calcite-internal-shell-panel-max-width);min-inline-size:var(--calcite-internal-shell-panel-min-width)}:host([layout=vertical][display-mode=float-all]) .content{inline-size:var(--calcite-internal-shell-panel-width);min-inline-size:var(--calcite-internal-shell-panel-min-width)}:host([layout=horizontal]) .content{block-size:var(--calcite-internal-shell-panel-height);max-block-size:var(--calcite-internal-shell-panel-max-height);min-block-size:var(--calcite-internal-shell-panel-min-height)}:host([resizable][layout=vertical][position=start]) .content{padding-inline-end:var(--calcite-size-fixed-sm-plus)}:host([resizable][layout=vertical][position=end]) .content{padding-inline-start:var(--calcite-size-fixed-sm-plus)}:host([resizable][layout=horizontal][position=start]) .content{padding-block-end:var(--calcite-size-fixed-sm-plus)}:host([resizable][layout=horizontal][position=end]) .content{padding-block-start:var(--calcite-size-fixed-sm-plus)}.content__header{display:flex;flex:0 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch}.content__body{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.content--overlay{position:absolute;--tw-shadow: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--tw-shadow-colored: 0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--calcite-shell-panel-shadow, var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow))}:host([layout=vertical]) .content--overlay{inset-block-start:0px;block-size:100%}:host([layout=horizontal]) .content--overlay{inset-inline-start:0px;inline-size:100%}:host([layout=vertical][position=start]) .content--overlay{inset-inline-start:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-inline-start)}:host([layout=vertical][position=end]) .content--overlay{inset-inline-end:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-inline-end)}:host([layout=horizontal][position=start]) .content--overlay{inset-block-start:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-block-start)}:host([layout=horizontal][position=end]) .content--overlay{inset-block-end:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-block-end)}.float--content{margin-block-end:auto;block-size:auto;overflow:hidden;--tw-shadow: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--tw-shadow-colored: 0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--calcite-shell-panel-shadow, var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow));border-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));margin-inline:var(--calcite-spacing-sm);margin-block-start:var(--calcite-spacing-sm);max-block-size:var(--calcite-internal-shell-panel-max-height, calc(100% - 1rem) )}.float--content ::slotted(calcite-panel),.float--content ::slotted(calcite-flow){max-block-size:unset}:host([layout=horizontal]) .float--content{margin-block:var(--calcite-spacing-sm)}:host([position=start]) .float--content ::slotted(calcite-panel),:host([position=start]) .float--content ::slotted(calcite-flow),:host([position=end]) .float--content ::slotted(calcite-panel),:host([position=end]) .float--content ::slotted(calcite-flow){border-style:none}slot[name=action-bar]::slotted(calcite-action-bar),.content ::slotted(calcite-flow),.content ::slotted(calcite-panel:not([closed])){border:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=start]:not([slot=panel-end])) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=start]:not([slot=panel-end])) .content ::slotted(calcite-flow),:host([position=start]:not([slot=panel-end])) .content ::slotted(calcite-panel),:host([position=end][slot=panel-start]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=end][slot=panel-start]) .content ::slotted(calcite-flow),:host([position=end][slot=panel-start]) .content ::slotted(calcite-panel){border-inline-start:none}:host([resizable][layout=vertical]) .content ::slotted(calcite-flow),:host([resizable][layout=vertical]) .content ::slotted(calcite-panel){border-inline-start:none;border-inline-end:none}:host([resizable][layout=horizontal]) .content ::slotted(calcite-flow),:host([resizable][layout=horizontal]) .content ::slotted(calcite-panel){border-block-start:none;border-block-end:none}:host([position=end]:not([slot=panel-start])) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=end]:not([slot=panel-start])) .content ::slotted(calcite-flow),:host([position=end]:not([slot=panel-start])) .content ::slotted(calcite-panel),:host([position=start][slot=panel-end]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=start][slot=panel-end]) .content ::slotted(calcite-flow),:host([position=start][slot=panel-end]) .content ::slotted(calcite-panel){border-inline-end:none}:host([layout=horizontal]) slot[name=action-bar]::slotted(calcite-action-bar){border-inline:0}:host([layout=horizontal][position=start]) .content ::slotted(calcite-flow),:host([layout=horizontal][position=start]) .content ::slotted(calcite-panel){border-inline:0;border-block-start:0}:host([layout=horizontal][position=end]) .content ::slotted(calcite-flow),:host([layout=horizontal][position=end]) .content ::slotted(calcite-panel){border-inline:0;border-block-end:0}:host([hidden]){display:none}[hidden]{display:none}`,A=class extends D{constructor(){super(...arguments),this.actionBars=[],this.contentRef=R(),this.messages=O(),this.resizeValues={inlineSize:null,blockSize:null,minInlineSize:null,minBlockSize:null,maxInlineSize:null,maxBlockSize:null},this.hasHeader=!1,this.collapsed=!1,this.displayMode="dock",this.layout="vertical",this.position="start",this.resizable=!1,this.widthScale="m",this.calciteInternalShellPanelResizeEnd=w({cancelable:!1}),this.calciteInternalShellPanelResizeStart=w({cancelable:!1}),this.calciteShellPanelCollapse=w({cancelable:!1}),this.calciteShellPanelExpand=w({cancelable:!1})}static{this.properties={resizeValues:[16,{},{state:!0}],hasHeader:[16,{},{state:!0}],collapsed:[7,{},{reflect:!0,type:Boolean}],displayMode:[3,{},{reflect:!0}],heightScale:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],position:[3,{},{reflect:!0}],resizable:[7,{},{reflect:!0,type:Boolean}],height:[3,{},{reflect:!0}],widthScale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=[T,K]}willUpdate(e){e.has("layout")&&(this.hasUpdated||this.layout!=="vertical")&&this.setActionBarsLayout(this.actionBars),e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calciteShellPanelCollapse.emit():this.calciteShellPanelExpand.emit())}disconnectedCallback(){super.disconnectedCallback(),this.cleanupInteractions()}getContentElDOMRect(){return this.contentRef.value.getBoundingClientRect()}handleKeyDown(e){let{key:a,defaultPrevented:r,shiftKey:l}=e,{position:i,layout:t,resizable:n,contentRef:c,el:b,resizeValues:{maxBlockSize:x,maxInlineSize:g,minBlockSize:v,minInlineSize:k}}=this,S=[...t==="horizontal"?["ArrowUp","ArrowDown"]:["ArrowLeft","ArrowRight"],"Home","End"];if(!n||!c.value||r||!S.includes(a))return;let d=this.getContentElDOMRect(),f=B(b)==="rtl"?-1:1,h=l?E:_;switch(a){case"ArrowUp":this.updateSize({size:d.height+(t==="horizontal"&&i==="end"?h:-h),type:"blockSize"}),e.preventDefault();break;case"ArrowDown":this.updateSize({size:d.height+(t==="horizontal"&&i==="end"?-h:h),type:"blockSize"}),e.preventDefault();break;case"ArrowLeft":this.updateSize({size:d.width+(t==="vertical"&&i==="end"?h:-h)*f,type:"inlineSize"}),e.preventDefault();break;case"ArrowRight":this.updateSize({size:d.width+(t==="vertical"&&i==="end"?-h:h)*f,type:"inlineSize"}),e.preventDefault();break;case"Home":this.updateSize({size:t==="horizontal"?v:k,type:t==="horizontal"?"blockSize":"inlineSize"}),e.preventDefault();break;case"End":this.updateSize({size:t==="horizontal"?x:g,type:t==="horizontal"?"blockSize":"inlineSize"}),e.preventDefault();break}}updateSize({type:e,size:a}){let{contentRef:r,resizeValues:l}=this;if(!r.value)return;let i=e==="blockSize"?"minBlockSize":"minInlineSize",t=e==="blockSize"?"maxBlockSize":"maxInlineSize",n=l[i]&&l[t]?P(a,l[i],l[t]):a,c=Math.round(n);this.resizeValues={...l,[e]:c},r.value.style[e]=a!==null?`${c}px`:null}cleanupInteractions(){this.interaction?.unset()}async setupInteractions(){this.cleanupInteractions();let{el:e,contentRef:a,resizable:r,position:l,collapsed:i,resizeHandleEl:t,layout:n}=this;if(!a.value||i||!r||!t)return;await this.el.componentOnReady();let{inlineSize:c,minInlineSize:b,blockSize:x,minBlockSize:g,maxInlineSize:v,maxBlockSize:k}=window.getComputedStyle(a.value),m={inlineSize:u(c),blockSize:u(x),minInlineSize:u(b),minBlockSize:u(g),maxInlineSize:u(v)||window.innerWidth,maxBlockSize:u(k)||window.innerHeight};this.resizeValues=m;let S=B(e)==="rtl";this.interaction=C(a.value,{context:e.ownerDocument}).resizable({edges:{top:l==="end"&&n==="horizontal"?t:!1,right:l===(S?"end":"start")&&n==="vertical"?t:!1,bottom:l==="start"&&n==="horizontal"?t:!1,left:l===(S?"start":"end")&&n==="vertical"?t:!1},modifiers:[C.modifiers.restrictSize({min:{width:m.minInlineSize,height:m.minBlockSize},max:{width:m.maxInlineSize,height:m.maxBlockSize}})],listeners:{resizestart:()=>{this.calciteInternalShellPanelResizeStart.emit()},resizeend:()=>{this.calciteInternalShellPanelResizeEnd.emit()},move:({rect:d})=>{let f=n==="horizontal";this.updateSize({size:f?d.height:d.width,type:f?"blockSize":"inlineSize"})}}})}setResizeHandleEl(e){this.resizeHandleEl=e,this.setupInteractions()}setActionBarsLayout(e){e.forEach(a=>a.layout=this.layout)}handleActionBarSlotChange(e){let a=M(e).filter(r=>r?.matches("calcite-action-bar"));this.actionBars=a,this.setActionBarsLayout(a)}handleHeaderSlotChange(e){this.hasHeader=L(e)}getResizeIcon(){let{layout:e}=this;return e==="horizontal"?U.dragVertical:U.dragHorizontal}renderHeader(){return y("header",p`<div class=${s(o.contentHeader)} .hidden=${!this.hasHeader}><slot name=${N.header} @slotchange=${this.handleHeaderSlotChange}></slot></div>`)}render(){let{collapsed:e,position:a,resizable:r,layout:l,displayMode:i,resizeValues:t}=this,n=B(this.el),c=!e&&r?y("resize-handle",p`<div .ariaLabel=${this.messages.resize} .ariaOrientation=${l==="horizontal"?"vertical":"horizontal"} .ariaValueMax=${l=="horizontal"?t.maxBlockSize:t.maxInlineSize} .ariaValueMin=${l=="horizontal"?t.minBlockSize:t.minInlineSize} .ariaValueNow=${l=="horizontal"?t.blockSize:t.inlineSize} class=${s(o.resizeHandle)} @keydown=${this.handleKeyDown} role=separator tabindex=0 touch-action=none ${$(this.setResizeHandleEl)}><div class=${s(o.resizeHandleBar)}><calcite-icon .icon=${this.getResizeIcon()} scale=s></calcite-icon></div></div>`):null,b=()=>l==="horizontal"?a==="start"?z.calciteAnimateInDown:z.calciteAnimateInUp:n==="ltr"&&a==="end"||n==="rtl"&&a==="start"?z.calciteAnimateInLeft:z.calciteAnimateInRight,x=p`<div class=${s(o.contentContainer)}>${y("content",p`<div class=${s({[z.rtl]:n==="rtl",[o.content]:!0,[o.contentOverlay]:i==="overlay",[o.floatContent]:i==="float-content"||i==="float",[z.calciteAnimate]:i==="overlay",[b()]:i==="overlay",[H("width",this.width,this.widthScale)]:!!(this.width||this.widthScale),[H("height",this.height,this.heightScale)]:!!(this.height||this.heightScale)})} .hidden=${e} ${$(this.contentRef)}>${this.renderHeader()}<div class=${s(o.contentBody)}><slot></slot></div>${c}</div>`)}</div>`,v=[y("action-bar-container",p`<div class=${s(o.actionBarContainer)}><slot name=${N.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`),x];return a==="end"&&v.reverse(),p`<div class=${s({[o.container]:!0,[o.floatAll]:i==="float-all"})}>${v}</div>`}};V("calcite-shell-panel",A);export{A as ShellPanel};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{m as l}from"./HA5H546A.js";import{a as x}from"./L2VNGTSR.js";import"./VJ7Q2QJV.js";import{a as y}from"./EQ25YK3K.js";import{a as f}from"./MT4G6FVR.js";import{b as g}from"./4JL57EDA.js";import"./VKBFZH3Q.js";import{r as v}from"./W35ZAP2H.js";import"./EK3BWMVE.js";import{B as d,C as h,D as m,E as t,H as u,P as b,g as n,h as i,l as p,o}from"./GAXQ53KY.js";var r={container:"container",hasSlottedContent:"has-slotted-content",stepperItemContent:"stepper-item-content",stepperItemDescription:"stepper-item-description",stepperItemHeader:"stepper-item-header",stepperItemHeading:"stepper-item-heading",stepperItemHeaderText:"stepper-item-header-text",stepperItemIcon:"stepper-item-icon",stepperItemNumber:"stepper-item-number",visuallyHidden:"visually-hidden"},a={circle:"circle",circleF:"circleF",exclamationMarkCircleF:"exclamationMarkCircleF",checkCircleF:"checkCircleF"},z=n`:host([disabled]),:host([layout=horizontal][disabled]) .stepper-item-header,:host([layout=horizontal-single][disabled]) .stepper-item-header{cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([layout=horizontal][disabled]) .stepper-item-header *,:host([layout=horizontal-single][disabled]) .stepper-item-header *,:host([disabled]) ::slotted(*),:host([layout=horizontal][disabled]) .stepper-item-header ::slotted(*),:host([layout=horizontal-single][disabled]) .stepper-item-header ::slotted(*){pointer-events:none}:host([scale=s]){--calcite-internal-stepper-item-spacing-unit-s: .25rem;--calcite-internal-stepper-item-spacing-unit-m: .75rem;--calcite-internal-stepper-item-spacing-unit-l: 1rem;--calcite-internal-stepper-action-inline-size: 2rem;font-size:var(--calcite-font-size--1);line-height:1rem;margin-inline-end:.25rem}:host([scale=s]) .stepper-item-description{font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]){--calcite-internal-stepper-item-spacing-unit-s: .5rem;--calcite-internal-stepper-item-spacing-unit-m: 1rem;--calcite-internal-stepper-item-spacing-unit-l: 1.25rem;--calcite-internal-stepper-action-inline-size: 2.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;margin-inline-end:.5rem}:host([scale=m]) .stepper-item-description{font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]){--calcite-internal-stepper-item-spacing-unit-s: .75rem;--calcite-internal-stepper-item-spacing-unit-m: 1.25rem;--calcite-internal-stepper-item-spacing-unit-l: 1.5rem;--calcite-internal-stepper-action-inline-size: 3rem;font-size:var(--calcite-font-size-1);line-height:1.5rem;margin-inline-end:.75rem}:host([scale=l]) .stepper-item-description{font-size:var(--calcite-font-size-0);line-height:1.25rem}:host{position:relative;display:flex;flex-grow:1;flex-direction:column;align-self:flex-start;margin-block-end:var(--calcite-stepper-bar-gap, var(--calcite-internal-stepper-item-spacing-unit-s))}:host .container{position:relative;display:flex;flex-grow:1;cursor:pointer;flex-direction:column;border-width:0px;border-block-start-width:2px;border-style:solid;border-color:var(--calcite-color-border-3);color:var(--calcite-color-text-3);text-decoration-line:none;outline:2px solid transparent;outline-offset:2px}:host .container:active{background-color:var(--calcite-stepper-item-background-color-press, var(--calcite-color-foreground-3))}:host{outline-color:transparent}:host(:focus){outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host .stepper-item-header{display:flex;cursor:pointer;align-items:flex-start}:host .stepper-item-header:active{background-color:var(--calcite-stepper-item-background-color-press, var(--calcite-color-foreground-3))}:host .stepper-item-content,:host .stepper-item-header{padding-block:var(--calcite-internal-stepper-item-spacing-unit-l);padding-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);text-align:start}:host .stepper-item-header *{display:inline-flex;align-items:center}:host .stepper-item-content{display:none;inline-size:100%;flex-direction:column;font-size:var(--calcite-font-size--2);line-height:1.375}:host .stepper-item-icon{margin-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);margin-block-start:1px;display:inline-flex;block-size:.75rem;flex-shrink:0;align-self:flex-start;color:var(--calcite-stepper-item-icon-color, var(--calcite-color-border-input))}:host([complete]) .stepper-item-icon{opacity:var(--calcite-opacity-disabled)}:host .stepper-item-header-text{flex-direction:column;text-align:initial;margin-inline-end:auto}:host .stepper-item-heading,:host .stepper-item-description{display:flex;inline-size:100%}:host .stepper-item-heading{margin-block-end:.25rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-stepper-item-header-text-color, var(--calcite-color-text-2))}:host .stepper-item-description{color:var(--calcite-stepper-item-description-text-color, var(--calcite-color-text-3))}:host .stepper-item-number{font-weight:var(--calcite-font-weight-medium);margin-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);color:var(--calcite-stepper-item-description-text-color, var(--calcite-color-text-3))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([complete]) .container{border-color:#007ac280}:host([complete]) .container .stepper-item-icon{color:var(--calcite-stepper-item-complete-icon-color, var(--calcite-color-brand))}:host([error]) .container{border-block-start-color:var(--calcite-color-status-danger)}:host([error]) .container .stepper-item-number{color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([error]) .container .stepper-item-icon{opacity:1;color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host(:hover:not([disabled]):not([selected])) .container,:host(:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-color-brand)}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-heading,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-heading{color:var(--calcite-stepper-item-header-text-color-hover, var(--calcite-color-text-1))}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-description,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-description{color:var(--calcite-stepper-item-description-text-color-hover, var(--calcite-color-text-2))}:host([error]:hover:not([disabled]):not([selected])) .container,:host([error]:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-color-status-danger-hover)}:host([selected]) .container{border-block-start-color:var(--calcite-color-brand)}:host([selected]) .container .stepper-item-heading{color:var(--calcite-stepper-item-selected-header-text-color, var(--calcite-color-text-1))}:host([selected]) .container .stepper-item-description{color:var(--calcite-stepper-item-description-text-color-hover, var(--calcite-color-text-2))}:host([selected]) .container .stepper-item-number{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-brand))}:host([selected]) .container .stepper-item-icon{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-brand));opacity:1}:host([selected]) .container .stepper-item-content{display:flex}:host([layout=vertical]){inline-size:100%}:host([layout=vertical]) .container{margin-inline:0px;margin-block-start:0px;flex:1 1 auto;border-block-start-width:0px;border-style:solid;padding-block:0px;border-inline-start-width:2px;padding-inline-start:var(--calcite-internal-stepper-item-spacing-unit-l);border-color:var(--calcite-stepper-bar-fill-color, var(--calcite-color-border-2))}:host([layout=vertical]) .container .stepper-item-icon{order:3;margin-block:1px 0px;padding-inline-start:var(--calcite-internal-stepper-item-spacing-unit-s);margin-inline-start:auto}:host([layout=vertical]) .container .stepper-item-header{padding-inline-end:0px}:host([layout=vertical]) .container .stepper-item-content{padding:0}:host([layout=vertical][complete]) .container{border-color:var(--calcite-stepper-bar-complete-fill-color, rgba(0, 122, 194, .5))}:host([layout=vertical][complete]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][complete]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-complete-fill-color-hover, var(--calcite-color-brand))}:host([layout=vertical][error]) .container{border-color:var(--calcite-stepper-bar-error-fill-color, var(--calcite-color-status-danger))}:host([layout=vertical][selected]) .container{border-color:var(--calcite-stepper-bar-selected-fill-color, var(--calcite-color-brand))}:host([layout=vertical][selected]) .container .stepper-item-content.has-slotted-content{margin-block-end:var(--calcite-internal-stepper-item-spacing-unit-l)}:host([layout=vertical]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-fill-color-hover, rgba(0, 122, 194, .5))}:host([layout=vertical][error]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][error]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-error-fill-color-hover, var(--calcite-color-status-danger-hover))}:host([layout=horizontal]),:host([layout=horizontal-single]){display:contents}:host([layout=horizontal]) .container,:host([layout=horizontal-single]) .container{display:contents}:host([layout=horizontal]) .stepper-item-header,:host([layout=horizontal-single]) .stepper-item-header{border-width:0px;border-block-start-width:2px;border-style:solid;outline-color:transparent;grid-row:items;border-color:var(--calcite-stepper-bar-fill-color, var(--calcite-color-border-2))}:host([layout=horizontal]) .stepper-item-header:focus,:host([layout=horizontal-single]) .stepper-item-header:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([layout=horizontal]) .stepper-item-content,:host([layout=horizontal-single]) .stepper-item-content{cursor:auto;transition-timing-function:cubic-bezier(.4,0,.2,1);padding-block:0;padding-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);text-align:start}:host([layout=horizontal-single]) .stepper-item-header{grid-area:1/1/1/-1}:host([layout=horizontal]) .stepper-item-content,:host([layout=horizontal-single]) .stepper-item-content{grid-area:2/1/2/-1}:host([layout=horizontal][complete]) .stepper-item-header,:host([layout=horizontal-single][complete]) .stepper-item-header{border-color:var(--calcite-stepper-bar-complete-fill-color, rgba(0, 122, 194, .5))}:host([layout=horizontal][complete]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][complete]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][complete]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][complete]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-complete-fill-color-hover, var(--calcite-color-brand))}:host([layout=horizontal][error]) .stepper-item-header,:host([layout=horizontal-single][error]) .stepper-item-header{border-color:var(--calcite-stepper-bar-error-fill-color, var(--calcite-color-status-danger))}:host([layout=horizontal][selected]) .stepper-item-header,:host([layout=horizontal-single][selected]) .stepper-item-header{border-color:var(--calcite-stepper-bar-selected-fill-color, var(--calcite-color-brand))}:host([layout=horizontal]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-fill-color-hover, rgba(0, 122, 194, .5))}:host([layout=horizontal][error]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][error]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][error]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][error]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-error-fill-color-hover, var(--calcite-color-status-danger-hover))}@media(forced-colors:active){:host .container{outline-width:0;outline-offset:0}:host(:focus),:host(:focus-visible){outline-color:canvasText}:host([selected]) .container{border-block-start-color:highlight}:host([selected]) .container .stepper-item-number{color:highlight}:host([selected]) .container .stepper-item-icon{color:highlight}:host([layout=vertical][selected]) .container{border-color:highlight}}:host([layout=horizontal-single]) .stepper-item-header{margin-inline-end:0px;box-sizing:border-box;border-style:none;inline-size:100%;padding-inline:calc(var(--calcite-internal-stepper-action-inline-size) + .5rem)}:host([layout=horizontal-single][error]) .container .stepper-item-number{color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([layout=horizontal-single][error]) .container .stepper-item-icon{opacity:1;color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([layout=horizontal-single][error][selected]),:host([layout=horizontal-single][complete][selected]) .container{color:var(--calcite-color-text-3)}:host([layout=horizontal-single][error][selected]) .stepper-item-heading,:host([layout=horizontal-single][complete][selected]) .container .stepper-item-heading{color:var(--calcite-stepper-item-header-text-color, var(--calcite-color-text-2))}:host([layout=horizontal-single][complete][selected]) .container .stepper-item-icon{opacity:var(--calcite-opacity-disabled)}:host([layout=horizontal-single][complete][selected]) .container .stepper-item-number{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-text-3))}.visually-hidden{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}:host([hidden]){display:none}[hidden]{display:none}:host([item-hidden]){display:none}`,c=class extends m{constructor(){super(),this.headerRef=d(),this.messages=y(),this.focusSetter=f()(this),this.interactiveContainer=x(this),this.complete=!1,this.disabled=!1,this.error=!1,this.icon=!1,this.iconFlipRtl=!1,this.itemHidden=!1,this.numbered=!1,this.scale="m",this.selected=!1,this.calciteInternalStepperItemKeyEvent=o({cancelable:!1}),this.calciteInternalStepperItemRegister=o({cancelable:!1}),this.calciteInternalStepperItemSelect=o({cancelable:!1}),this.calciteStepperItemSelect=o({cancelable:!1}),this.listenOn(document.body,"calciteInternalStepperItemChange",this.updateActiveItemOnChange),this.listen("click",this.handleItemClick),this.listen("keydown",this.keyDownHandler)}static{this.properties={stepperItemHasContent:[16,{},{state:!0}],complete:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],error:[7,{},{reflect:!0,type:Boolean}],heading:1,icon:[5,{},{type:Boolean}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],itemHidden:[7,{},{reflect:!0,type:Boolean}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],numbered:[5,{},{type:Boolean}],numberingSystem:1,scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=z}async setFocus(e){return this.focusSetter(()=>this.layout==="vertical"?this.el:this.headerRef.value,e)}async load(){this.parentStepperEl=this.el.parentElement,this.itemPosition=this.getItemPosition(),this.registerStepperItem(),this.selected&&this.emitRequestedItem()}willUpdate(e){e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.selectedHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.registerStepperItem(),e.has("messages")&&this.effectiveLocaleWatcher(this.messages._lang)}updated(){u(this.el,"tabindex",this.disabled||this.layout==="horizontal"?null:0)}selectedHandler(){this.selected&&this.emitRequestedItem()}effectiveLocaleWatcher(e){l.numberFormatOptions={locale:e,numberingSystem:this.numberingSystem,useGrouping:!1}}updateActiveItemOnChange(e){(e.target===this.parentStepperEl||e.composedPath().includes(this.parentStepperEl))&&(this.selectedPosition=e.detail.position,this.determineSelectedItem())}keyDownHandler(e){if(!this.disabled&&e.target===this.el)switch(e.key){case" ":case"Enter":this.emitUserRequestedItem(),e.preventDefault();break;case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"Home":case"End":this.calciteInternalStepperItemKeyEvent.emit({item:e}),e.preventDefault();break}}determineSelectedItem(){this.selected=!this.disabled&&this.itemPosition===this.selectedPosition}registerStepperItem(){this.calciteInternalStepperItemRegister.emit({position:this.itemPosition})}handleItemClick(e){this.disabled||g(this.el)||this.layout==="horizontal"&&e.composedPath().some(s=>s.classList?.contains("stepper-item-content"))||this.emitUserRequestedItem()}emitUserRequestedItem(){this.emitRequestedItem(),this.disabled||this.calciteStepperItemSelect.emit()}emitRequestedItem(){if(!this.disabled){let e=this.itemPosition;this.calciteInternalStepperItemSelect.emit({position:e})}}getItemPosition(){return Array.from(this.parentStepperEl?.querySelectorAll("calcite-stepper-item:not([hidden]):not([item-hidden])")).indexOf(this.el)}render(){this.el.ariaCurrent=this.selected?"step":"false";let e=this.layout==="horizontal"&&!this.disabled?0:null;return this.interactiveContainer({disabled:this.disabled,children:i`<div class=${t(r.container)}>${this.complete&&i`<span aria-live=polite class=${t(r.visuallyHidden)}>${this.messages.complete}</span>`||""}<div class=${t(r.stepperItemHeader)} tabindex=${e??p} ${h(this.headerRef)}>${this.icon?this.renderIcon():null}${this.numbered?i`<div class=${t(r.stepperItemNumber)}>${this.renderNumbers()}.</div>`:null}<div class=${t(r.stepperItemHeaderText)}><span class=${t(r.stepperItemHeading)}>${this.heading}</span><span class=${t(r.stepperItemDescription)}>${this.description}</span></div></div><div class=${t({[r.stepperItemContent]:!0,[r.hasSlottedContent]:this.stepperItemHasContent})}><slot @slotchange=${s=>this.stepperItemHasContent=v(s)}></slot></div></div>`})}renderIcon(){let e=a.circle;return this.selected&&(this.layout!=="horizontal-single"||!this.error&&!this.complete)?e=a.circleF:this.error?e=a.exclamationMarkCircleF:this.complete&&(e=a.checkCircleF),i`<calcite-icon class=${t(r.stepperItemIcon)} .flipRtl=${this.iconFlipRtl} .icon=${e} scale=s></calcite-icon>`}renderNumbers(){return l.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:!1},l.numberFormatter.format(this.itemPosition+1)}};b("calcite-stepper-item",c);export{c as StepperItem};
|
|
3
|
+
v5.0.0-next.26 */
|
|
4
|
+
import{m as l}from"./TU3YLD2E.js";import{a as x}from"./TOJWPJZO.js";import"./XHNHEAWO.js";import{a as y}from"./6F7MIVOD.js";import{a as f}from"./LLHJY7FO.js";import{b as g}from"./WUWREGJO.js";import"./7UWIO6G4.js";import{r as v}from"./5DDVN7VT.js";import"./HTSVYMIU.js";import{B as d,C as h,D as m,E as t,H as u,P as b,g as n,h as i,l as p,o}from"./S3LMUVIR.js";var r={container:"container",hasSlottedContent:"has-slotted-content",stepperItemContent:"stepper-item-content",stepperItemDescription:"stepper-item-description",stepperItemHeader:"stepper-item-header",stepperItemHeading:"stepper-item-heading",stepperItemHeaderText:"stepper-item-header-text",stepperItemIcon:"stepper-item-icon",stepperItemNumber:"stepper-item-number",visuallyHidden:"visually-hidden"},a={circle:"circle",circleF:"circleF",exclamationMarkCircleF:"exclamationMarkCircleF",checkCircleF:"checkCircleF"},z=n`:host([disabled]),:host([layout=horizontal][disabled]) .stepper-item-header,:host([layout=horizontal-single][disabled]) .stepper-item-header{cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([layout=horizontal][disabled]) .stepper-item-header *,:host([layout=horizontal-single][disabled]) .stepper-item-header *,:host([disabled]) ::slotted(*),:host([layout=horizontal][disabled]) .stepper-item-header ::slotted(*),:host([layout=horizontal-single][disabled]) .stepper-item-header ::slotted(*){pointer-events:none}:host([scale=s]){--calcite-internal-stepper-item-spacing-unit-s: .25rem;--calcite-internal-stepper-item-spacing-unit-m: .75rem;--calcite-internal-stepper-item-spacing-unit-l: 1rem;--calcite-internal-stepper-action-inline-size: 2rem;font-size:var(--calcite-font-size--1);line-height:1rem;margin-inline-end:.25rem}:host([scale=s]) .stepper-item-description{font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]){--calcite-internal-stepper-item-spacing-unit-s: .5rem;--calcite-internal-stepper-item-spacing-unit-m: 1rem;--calcite-internal-stepper-item-spacing-unit-l: 1.25rem;--calcite-internal-stepper-action-inline-size: 2.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;margin-inline-end:.5rem}:host([scale=m]) .stepper-item-description{font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]){--calcite-internal-stepper-item-spacing-unit-s: .75rem;--calcite-internal-stepper-item-spacing-unit-m: 1.25rem;--calcite-internal-stepper-item-spacing-unit-l: 1.5rem;--calcite-internal-stepper-action-inline-size: 3rem;font-size:var(--calcite-font-size-1);line-height:1.5rem;margin-inline-end:.75rem}:host([scale=l]) .stepper-item-description{font-size:var(--calcite-font-size-0);line-height:1.25rem}:host{position:relative;display:flex;flex-grow:1;flex-direction:column;align-self:flex-start;margin-block-end:var(--calcite-stepper-bar-gap, var(--calcite-internal-stepper-item-spacing-unit-s))}:host .container{position:relative;display:flex;flex-grow:1;cursor:pointer;flex-direction:column;border-width:0px;border-block-start-width:2px;border-style:solid;border-color:var(--calcite-color-border-3);color:var(--calcite-color-text-3);text-decoration-line:none;outline:2px solid transparent;outline-offset:2px}:host .container:active{background-color:var(--calcite-stepper-item-background-color-press, var(--calcite-color-foreground-3))}:host{outline-color:transparent}:host(:focus){outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host .stepper-item-header{display:flex;cursor:pointer;align-items:flex-start}:host .stepper-item-header:active{background-color:var(--calcite-stepper-item-background-color-press, var(--calcite-color-foreground-3))}:host .stepper-item-content,:host .stepper-item-header{padding-block:var(--calcite-internal-stepper-item-spacing-unit-l);padding-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);text-align:start}:host .stepper-item-header *{display:inline-flex;align-items:center}:host .stepper-item-content{display:none;inline-size:100%;flex-direction:column;font-size:var(--calcite-font-size--2);line-height:1.375}:host .stepper-item-icon{margin-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);margin-block-start:1px;display:inline-flex;block-size:.75rem;flex-shrink:0;align-self:flex-start;color:var(--calcite-stepper-item-icon-color, var(--calcite-color-border-input))}:host([complete]) .stepper-item-icon{opacity:var(--calcite-opacity-disabled)}:host .stepper-item-header-text{flex-direction:column;text-align:initial;margin-inline-end:auto}:host .stepper-item-heading,:host .stepper-item-description{display:flex;inline-size:100%}:host .stepper-item-heading{margin-block-end:.25rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-stepper-item-header-text-color, var(--calcite-color-text-2))}:host .stepper-item-description{color:var(--calcite-stepper-item-description-text-color, var(--calcite-color-text-3))}:host .stepper-item-number{font-weight:var(--calcite-font-weight-medium);margin-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);color:var(--calcite-stepper-item-description-text-color, var(--calcite-color-text-3))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([complete]) .container{border-color:#007ac280}:host([complete]) .container .stepper-item-icon{color:var(--calcite-stepper-item-complete-icon-color, var(--calcite-color-brand))}:host([error]) .container{border-block-start-color:var(--calcite-color-status-danger)}:host([error]) .container .stepper-item-number{color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([error]) .container .stepper-item-icon{opacity:1;color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host(:hover:not([disabled]):not([selected])) .container,:host(:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-color-brand)}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-heading,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-heading{color:var(--calcite-stepper-item-header-text-color-hover, var(--calcite-color-text-1))}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-description,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-description{color:var(--calcite-stepper-item-description-text-color-hover, var(--calcite-color-text-2))}:host([error]:hover:not([disabled]):not([selected])) .container,:host([error]:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-color-status-danger-hover)}:host([selected]) .container{border-block-start-color:var(--calcite-color-brand)}:host([selected]) .container .stepper-item-heading{color:var(--calcite-stepper-item-selected-header-text-color, var(--calcite-color-text-1))}:host([selected]) .container .stepper-item-description{color:var(--calcite-stepper-item-description-text-color-hover, var(--calcite-color-text-2))}:host([selected]) .container .stepper-item-number{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-brand))}:host([selected]) .container .stepper-item-icon{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-brand));opacity:1}:host([selected]) .container .stepper-item-content{display:flex}:host([layout=vertical]){inline-size:100%}:host([layout=vertical]) .container{margin-inline:0px;margin-block-start:0px;flex:1 1 auto;border-block-start-width:0px;border-style:solid;padding-block:0px;border-inline-start-width:2px;padding-inline-start:var(--calcite-internal-stepper-item-spacing-unit-l);border-color:var(--calcite-stepper-bar-fill-color, var(--calcite-color-border-2))}:host([layout=vertical]) .container .stepper-item-icon{order:3;margin-block:1px 0px;padding-inline-start:var(--calcite-internal-stepper-item-spacing-unit-s);margin-inline-start:auto}:host([layout=vertical]) .container .stepper-item-header{padding-inline-end:0px}:host([layout=vertical]) .container .stepper-item-content{padding:0}:host([layout=vertical][complete]) .container{border-color:var(--calcite-stepper-bar-complete-fill-color, rgba(0, 122, 194, .5))}:host([layout=vertical][complete]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][complete]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-complete-fill-color-hover, var(--calcite-color-brand))}:host([layout=vertical][error]) .container{border-color:var(--calcite-stepper-bar-error-fill-color, var(--calcite-color-status-danger))}:host([layout=vertical][selected]) .container{border-color:var(--calcite-stepper-bar-selected-fill-color, var(--calcite-color-brand))}:host([layout=vertical][selected]) .container .stepper-item-content.has-slotted-content{margin-block-end:var(--calcite-internal-stepper-item-spacing-unit-l)}:host([layout=vertical]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-fill-color-hover, rgba(0, 122, 194, .5))}:host([layout=vertical][error]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][error]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-error-fill-color-hover, var(--calcite-color-status-danger-hover))}:host([layout=horizontal]),:host([layout=horizontal-single]){display:contents}:host([layout=horizontal]) .container,:host([layout=horizontal-single]) .container{display:contents}:host([layout=horizontal]) .stepper-item-header,:host([layout=horizontal-single]) .stepper-item-header{border-width:0px;border-block-start-width:2px;border-style:solid;outline-color:transparent;grid-row:items;border-color:var(--calcite-stepper-bar-fill-color, var(--calcite-color-border-2))}:host([layout=horizontal]) .stepper-item-header:focus,:host([layout=horizontal-single]) .stepper-item-header:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([layout=horizontal]) .stepper-item-content,:host([layout=horizontal-single]) .stepper-item-content{cursor:auto;transition-timing-function:cubic-bezier(.4,0,.2,1);padding-block:0;padding-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);text-align:start}:host([layout=horizontal-single]) .stepper-item-header{grid-area:1/1/1/-1}:host([layout=horizontal]) .stepper-item-content,:host([layout=horizontal-single]) .stepper-item-content{grid-area:2/1/2/-1}:host([layout=horizontal][complete]) .stepper-item-header,:host([layout=horizontal-single][complete]) .stepper-item-header{border-color:var(--calcite-stepper-bar-complete-fill-color, rgba(0, 122, 194, .5))}:host([layout=horizontal][complete]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][complete]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][complete]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][complete]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-complete-fill-color-hover, var(--calcite-color-brand))}:host([layout=horizontal][error]) .stepper-item-header,:host([layout=horizontal-single][error]) .stepper-item-header{border-color:var(--calcite-stepper-bar-error-fill-color, var(--calcite-color-status-danger))}:host([layout=horizontal][selected]) .stepper-item-header,:host([layout=horizontal-single][selected]) .stepper-item-header{border-color:var(--calcite-stepper-bar-selected-fill-color, var(--calcite-color-brand))}:host([layout=horizontal]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-fill-color-hover, rgba(0, 122, 194, .5))}:host([layout=horizontal][error]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][error]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][error]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][error]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-error-fill-color-hover, var(--calcite-color-status-danger-hover))}@media(forced-colors:active){:host .container{outline-width:0;outline-offset:0}:host(:focus),:host(:focus-visible){outline-color:canvasText}:host([selected]) .container{border-block-start-color:highlight}:host([selected]) .container .stepper-item-number{color:highlight}:host([selected]) .container .stepper-item-icon{color:highlight}:host([layout=vertical][selected]) .container{border-color:highlight}}:host([layout=horizontal-single]) .stepper-item-header{margin-inline-end:0px;box-sizing:border-box;border-style:none;inline-size:100%;padding-inline:calc(var(--calcite-internal-stepper-action-inline-size) + .5rem)}:host([layout=horizontal-single][error]) .container .stepper-item-number{color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([layout=horizontal-single][error]) .container .stepper-item-icon{opacity:1;color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([layout=horizontal-single][error][selected]),:host([layout=horizontal-single][complete][selected]) .container{color:var(--calcite-color-text-3)}:host([layout=horizontal-single][error][selected]) .stepper-item-heading,:host([layout=horizontal-single][complete][selected]) .container .stepper-item-heading{color:var(--calcite-stepper-item-header-text-color, var(--calcite-color-text-2))}:host([layout=horizontal-single][complete][selected]) .container .stepper-item-icon{opacity:var(--calcite-opacity-disabled)}:host([layout=horizontal-single][complete][selected]) .container .stepper-item-number{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-text-3))}.visually-hidden{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}:host([hidden]){display:none}[hidden]{display:none}:host([item-hidden]){display:none}`,c=class extends m{constructor(){super(),this.headerRef=d(),this.messages=y(),this.focusSetter=f()(this),this.interactiveContainer=x(this),this.complete=!1,this.disabled=!1,this.error=!1,this.icon=!1,this.iconFlipRtl=!1,this.itemHidden=!1,this.numbered=!1,this.scale="m",this.selected=!1,this.calciteInternalStepperItemKeyEvent=o({cancelable:!1}),this.calciteInternalStepperItemRegister=o({cancelable:!1}),this.calciteInternalStepperItemSelect=o({cancelable:!1}),this.calciteStepperItemSelect=o({cancelable:!1}),this.listenOn(document.body,"calciteInternalStepperItemChange",this.updateActiveItemOnChange),this.listen("click",this.handleItemClick),this.listen("keydown",this.keyDownHandler)}static{this.properties={stepperItemHasContent:[16,{},{state:!0}],complete:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],error:[7,{},{reflect:!0,type:Boolean}],heading:1,icon:[5,{},{type:Boolean}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],itemHidden:[7,{},{reflect:!0,type:Boolean}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],numbered:[5,{},{type:Boolean}],numberingSystem:1,scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=z}async setFocus(e){return this.focusSetter(()=>this.layout==="vertical"?this.el:this.headerRef.value,e)}async load(){this.parentStepperEl=this.el.parentElement,this.itemPosition=this.getItemPosition(),this.registerStepperItem(),this.selected&&this.emitRequestedItem()}willUpdate(e){e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.selectedHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.registerStepperItem(),e.has("messages")&&this.effectiveLocaleWatcher(this.messages._lang)}updated(){u(this.el,"tabindex",this.disabled||this.layout==="horizontal"?null:0)}selectedHandler(){this.selected&&this.emitRequestedItem()}effectiveLocaleWatcher(e){l.numberFormatOptions={locale:e,numberingSystem:this.numberingSystem,useGrouping:!1}}updateActiveItemOnChange(e){(e.target===this.parentStepperEl||e.composedPath().includes(this.parentStepperEl))&&(this.selectedPosition=e.detail.position,this.determineSelectedItem())}keyDownHandler(e){if(!this.disabled&&e.target===this.el)switch(e.key){case" ":case"Enter":this.emitUserRequestedItem(),e.preventDefault();break;case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"Home":case"End":this.calciteInternalStepperItemKeyEvent.emit({item:e}),e.preventDefault();break}}determineSelectedItem(){this.selected=!this.disabled&&this.itemPosition===this.selectedPosition}registerStepperItem(){this.calciteInternalStepperItemRegister.emit({position:this.itemPosition})}handleItemClick(e){this.disabled||g(this.el)||this.layout==="horizontal"&&e.composedPath().some(s=>s.classList?.contains("stepper-item-content"))||this.emitUserRequestedItem()}emitUserRequestedItem(){this.emitRequestedItem(),this.disabled||this.calciteStepperItemSelect.emit()}emitRequestedItem(){if(!this.disabled){let e=this.itemPosition;this.calciteInternalStepperItemSelect.emit({position:e})}}getItemPosition(){return Array.from(this.parentStepperEl?.querySelectorAll("calcite-stepper-item:not([hidden]):not([item-hidden])")).indexOf(this.el)}render(){this.el.ariaCurrent=this.selected?"step":"false";let e=this.layout==="horizontal"&&!this.disabled?0:null;return this.interactiveContainer({disabled:this.disabled,children:i`<div class=${t(r.container)}>${this.complete&&i`<span aria-live=polite class=${t(r.visuallyHidden)}>${this.messages.complete}</span>`||""}<div class=${t(r.stepperItemHeader)} tabindex=${e??p} ${h(this.headerRef)}>${this.icon?this.renderIcon():null}${this.numbered?i`<div class=${t(r.stepperItemNumber)}>${this.renderNumbers()}.</div>`:null}<div class=${t(r.stepperItemHeaderText)}><span class=${t(r.stepperItemHeading)}>${this.heading}</span><span class=${t(r.stepperItemDescription)}>${this.description}</span></div></div><div class=${t({[r.stepperItemContent]:!0,[r.hasSlottedContent]:this.stepperItemHasContent})}><slot @slotchange=${s=>this.stepperItemHasContent=v(s)}></slot></div></div>`})}renderIcon(){let e=a.circle;return this.selected&&(this.layout!=="horizontal-single"||!this.error&&!this.complete)?e=a.circleF:this.error?e=a.exclamationMarkCircleF:this.complete&&(e=a.checkCircleF),i`<calcite-icon class=${t(r.stepperItemIcon)} .flipRtl=${this.iconFlipRtl} .icon=${e} scale=s></calcite-icon>`}renderNumbers(){return l.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:!1},l.numberFormatter.format(this.itemPosition+1)}};b("calcite-stepper-item",c);export{c as StepperItem};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.26 */
|
|
4
4
|
var a=class{constructor(){this._formatterCache=new Map,this._commonDateTimeFormatterOptions={year:"numeric",month:"2-digit",day:"2-digit",timeZoneName:"shortOffset"}}get name(){return"native"}create(t){return new Date(t)}increase(t){return new Date(t.getTime()+864e5)}formatToIsoDateString(t){let e=t.getFullYear(),n=t.getMonth()+1,r=t.getDate();return`${e}-${n.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}`}isoToTimeZone(t,e){let n=this._toDate(t),o=this._getFormatter(e).formatToParts(n),[i]=o.filter(({type:s})=>s==="timeZoneName").map(({value:s})=>s),m=this._getTimeZoneOffsetInMins(i),c=n.getMinutes()-(n.getTimezoneOffset()-m);return n.setMinutes(c),n}same(t,e){return t.getTime()===e.getTime()}_toDate(t){return new Date(t)}_getFormatter(t){t==="Factory"&&(t="Etc/GMT");let e=this._formatterCache.get(t);return e||(e=new Intl.DateTimeFormat("en-US",{timeZone:t,...this._commonDateTimeFormatterOptions}),this._formatterCache.set(t,e)),e}_getTimeZoneOffsetInMins(t){let[e,...n]=t.slice(3),[r,o]=n.join("").split(":");return(e==="+"?1:-1)*(Number(r)*60+Number(o||0))}};export{a as DateEngine};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as m}from"./
|
|
3
|
+
v5.0.0-next.26 */
|
|
4
|
+
import{a as m}from"./SUF3BEFB.js";import"./4A5BQ3P6.js";import{a as s}from"./52WSL3OS.js";import{a as u}from"./LLHJY7FO.js";import"./WUWREGJO.js";import"./7UWIO6G4.js";import"./5DDVN7VT.js";import"./HTSVYMIU.js";import{D as f,E as i,G as n,P as v,g as p,h as t}from"./S3LMUVIR.js";var e={container:"container",containerLink:"container--link",textContainer:"text-container",heading:"heading",description:"description",image:"image",standalone:"standalone",icon:"icon"},x=p`:host{display:inline-flex}.container{margin:0;display:flex;align-items:center;justify-content:center;font-size:var(--calcite-font-size-0);line-height:1.25rem;background-color:var(--calcite-navigation-background-color, var(--calcite-internal-navigation-logo-background-color, var(--calcite-color-foreground-1)));border-block-end:2px solid var(--calcite-color-transparent);transition-property:background-color;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out}.container--link{cursor:pointer;text-decoration-line:none;outline-color:transparent}:host(:focus) .container--link{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.image,.icon{margin:0;display:flex;block-size:1.75rem;padding-inline:1rem;color:var(--calcite-navigation-logo-text-color, var(--calcite-icon-color, var(--calcite-internal-navigation-logo-text-color, inherit)))}.image~.icon{padding-inline-start:0px}.image~.text-container,.icon~.text-container{padding-inline-start:0px}:host([href]:hover),:host([href]:focus){--calcite-internal-navigation-logo-background-color: var(--calcite-color-foreground-2)}:host([href]:active){--calcite-internal-navigation-logo-background-color: var(--calcite-color-foreground-3)}:host([active]) .container{border-block-end-color:var(--calcite-navigation-accent-color, var(--calcite-color-brand))}:host([active]),:host([href]:active){--calcite-internal-navigation-logo-text-color: var(--calcite-color-brand)}.text-container{margin-block-start:.125rem;display:flex;flex-direction:column;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-inline:1rem;text-align:start}.heading{margin-inline-start:0px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-navigation-logo-heading-text-color, var(--calcite-color-text-1))}.standalone{font-size:var(--calcite-font-size-1)}.description{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--calcite-color-text-2);color:var(--calcite-navigation-logo-text-color, var(--calcite-color-text-2));font-size:var(--calcite-font-size--1)}:host([hidden]){display:none}[hidden]{display:none}`,d=class extends f{constructor(){super(...arguments),this.focusSetter=u()(this),this.iconFlipRtl=!1}static{this.properties={active:[7,{},{reflect:!0,type:Boolean}],description:1,heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],href:[3,{},{reflect:!0}],icon:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],label:1,rel:[3,{},{reflect:!0}],target:[3,{},{reflect:!0}],thumbnail:1}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=x}async setFocus(o){return this.focusSetter(()=>this.href?this.el:void 0,o)}renderIcon(){return t`<calcite-icon class=${i(e.icon)} .flipRtl=${this.iconFlipRtl} .icon=${this.icon} scale=l></calcite-icon>`}renderHeaderContent(){let{heading:o,headingLevel:r,description:a}=this,c=o?s(e.heading,m({class:{[e.heading]:!0,[e.standalone]:!this.description},level:r,children:o})):null,l=a?s(e.description,t`<span class=${i(e.description)}>${a}</span>`):null;return c||l?s(e.textContainer,t`<div class=${i(e.textContainer)}>${c}${l}</div>`):null}render(){let{icon:o,href:r,label:a,rel:c,target:l,thumbnail:g}=this,h=t`${g&&t`<img alt=${(a||"")??n} class=${i(e.image)} src=${g??n}>`||""}${o&&this.renderIcon()||""}${this.renderHeaderContent()}`;return r?t`<a class=${i({[e.container]:!0,[e.containerLink]:!0})} href=${r??n} rel=${c??n} target=${l??n}>${h}</a>`:t`<div class=${i(e.container)}>${h}</div>`}};v("calcite-navigation-logo",d);export{d as NavigationLogo};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as W,b as F,c as z}from"./XZO7FJUM.js";import{a as y}from"./VKUS34R6.js";import{a as g}from"./A7AWHUCH.js";import{a as O}from"./EQ25YK3K.js";import"./VKBFZH3Q.js";import{e as k,l as B,n as p,y as E}from"./W35ZAP2H.js";import"./EK3BWMVE.js";import{C as w,D as C,E as b,J as x,P as S,g as I,h as u,o as T}from"./GAXQ53KY.js";var $={chevronRight:"chevron-right",chevronLeft:"chevron-left"},c={container:"container",scrollButton:"scroll-button",scrollButtonContainer:"scroll-button-container",scrollBackwardButton:"scroll-button--backward",scrollForwardButton:"scroll-button--forward",tabTitleSlotWrapper:"tab-titles-slot-wrapper",scale:h=>`scale-${h}`,position:h=>`position-${h}`},V=I`:host{position:relative;display:flex}:host([bordered]) .scroll-button--forward calcite-button{--calcite-internal-button-border-inline-end-color: var(--calcite-tab-border-color, var(--calcite-color-border-1))}:host([bordered]) .scroll-button--backward calcite-button{--calcite-internal-button-border-inline-start-color: var( --calcite-tab-border-color, var(--calcite-color-border-1) )}.scale-s{--calcite-internal-tab-nav-button-width: 24px;min-block-size:1.5rem}.scale-m{--calcite-internal-tab-nav-button-width: 32px;min-block-size:2rem}.scale-l{--calcite-internal-tab-nav-button-width: 44px;min-block-size:2.75rem}.container::-webkit-scrollbar{display:none;-ms-overflow-style:none;scrollbar-width:none}:host([layout=center]) ::slotted(calcite-tab-title){display:flex;flex-grow:1;flex-shrink:0;min-inline-size:auto;white-space:nowrap}:host([layout=center]) ::slotted(calcite-tab-title[selected]){overflow:unset}:host(:not([bordered])) .scale-l{--calcite-internal-tab-nav-gap: var(--calcite-spacing-xxl)}:host(:not([bordered])) .scale-m{--calcite-internal-tab-nav-gap: var(--calcite-spacing-xl)}:host(:not([bordered])) .scale-s{--calcite-internal-tab-nav-gap: var(--calcite-spacing-lg)}:host(:not([bordered])) .tab-titles-slot-wrapper{gap:var(--calcite-internal-tab-nav-gap)}:host([layout=center]:not([bordered])) .tab-titles-slot-wrapper{padding-inline:var(--calcite-spacing-xl)}.tab-titles-slot-wrapper{flex:1 1 0%}.container,.tab-titles-slot-wrapper{display:flex;inline-size:100%;justify-content:flex-start;overflow:hidden;white-space:nowrap}.scroll-button{position:absolute;inset-block:0px}.scroll-button calcite-button{--calcite-button-text-color: var(--calcite-tab-text-color, var(--calcite-color-text-3));--calcite-button-background-color: var(--calcite-color-transparent);--calcite-offset-invert-focus: 1;block-size:var(--calcite-container-size-content-fluid)}.scroll-button-container{display:flex;inset-block-start:var(--calcite-border-width-md);inset-block-end:var(--calcite-border-width-md);inset-inline-end:0;inline-size:calc(2 * var(--calcite-internal-tab-nav-button-width))}.scroll-button--forward{inset-inline-end:0;z-index:var(--calcite-z-index)}.scroll-button--backward{inset-inline-end:var(--calcite-internal-tab-nav-button-width);z-index:var(--calcite-z-index)}:host(:not([bordered])) .scroll-button--backward:before{background-color:var(--calcite-tab-border-color, var(--calcite-color-border-3));content:"";inline-size:var(--calcite-border-width-sm);inset-block-start:var(--calcite-border-width-md);inset-block-end:var(--calcite-border-width-md);position:absolute;inset-inline-start:0}:host([hidden]){display:none}[hidden]{display:none}`,v=class extends C{constructor(){super(),this.effectiveDir="ltr",this.lastScrollWheelAxis="x",this.resizeObserver=g("resize",()=>{this.updateScrollingState()}),this.makeFirstVisibleTabClosable=!1,this.messages=O(),this.hasOverflowingEndTabTitle=!1,this.hasOverflowingStartTabTitle=!1,this.bordered=!1,this.layout="inline",this.position="bottom",this.scale="m",this.selectedTitle=null,this.calciteInternalTabChange=T({cancelable:!1}),this.calciteInternalTabNavSlotChange=T(),this.calciteTabChange=T({cancelable:!1}),this.listen("calciteInternalTabsFocusPrevious",this.focusPreviousTabHandler),this.listen("calciteInternalTabsFocusNext",this.focusNextTabHandler),this.listen("calciteInternalTabsFocusFirst",this.focusFirstTabHandler),this.listen("calciteInternalTabsFocusLast",this.focusLastTabHandler),this.listen("calciteInternalTabsActivate",this.internalActivateTabHandler),this.listen("calciteInternalTabsClose",this.internalCloseTabHandler),this.listen("calciteInternalTabTitleRegister",this.updateTabTitles),this.listenOn(document.body,"calciteInternalTabChange",this.globalInternalTabChangeHandler)}static{this.properties={hasOverflowingEndTabTitle:[16,{},{state:!0}],hasOverflowingStartTabTitle:[16,{},{state:!0}],selectedTabId:[16,{},{state:!0}],bordered:[7,{},{reflect:!0,type:Boolean}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],position:1,scale:1,selectedTitle:[0,{},{attribute:!1}],storageId:[3,{},{reflect:!0}],syncId:[3,{},{reflect:!0}]}}static{this.styles=V}connectedCallback(){super.connectedCallback(),this.parentTabsEl=this.el.closest("calcite-tabs"),this.resizeObserver?.observe(this.el)}async load(){let t=`calcite-tab-nav-${this.storageId}`;if(localStorage&&this.storageId&&localStorage.getItem(t)){let e=JSON.parse(localStorage.getItem(t));this.selectedTabId=e}}willUpdate(t){t.has("selectedTitle")&&(this.hasUpdated||this.selectedTitle!==null)&&this.calciteInternalTabChange.emit({tab:this.selectedTabId}),t.has("selectedTabId")&&this.selectedTabIdChanged();let{parentTabsEl:e}=this;this.layout=e?.layout,this.bordered=e?.bordered,this.effectiveDir=k(this.el)}loaded(){this.scrollTabTitleIntoView(this.selectedTitle,"instant"),this.tabTitles.length&&this.tabTitles.every(t=>!t.selected)&&!this.selectedTabId&&this.tabTitles[0].getTabIdentifier().then(t=>{this.calciteInternalTabChange.emit({tab:t})})}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}get enabledTabTitles(){return p(this.el,"calcite-tab-title:not([disabled])").filter(t=>!t.closed)}get scrollerButtonWidth(){let{scale:t}=this;return parseInt(t==="s"?W:t==="m"?F:z)}get tabTitles(){return p(this.el,"calcite-tab-title")}focusPreviousTabHandler(t){this.handleTabFocus(t,t.target,"previous")}focusNextTabHandler(t){this.handleTabFocus(t,t.target,"next")}focusFirstTabHandler(t){this.handleTabFocus(t,t.target,"first")}focusLastTabHandler(t){this.handleTabFocus(t,t.target,"last")}internalActivateTabHandler(t){let e=t.target,i=this.selectedTitle;this.selectedTabId=t.detail.tab?t.detail.tab:this.getIndexOfTabTitle(e),t.stopPropagation(),this.selectedTitle=e,i?.id!==e.id&&t.detail.userTriggered&&this.calciteTabChange.emit(),this.scrollTabTitleIntoView(e)}scrollTabTitleIntoView(t,e="smooth"){t&&requestAnimationFrame(()=>{let i=this.tabTitleContainerEl;if(!i)return;let l=i.getBoundingClientRect(),a=t.getBoundingClientRect(),s=i.scrollLeft;if(a.left<l.left){let o=s+(a.left-l.left);i.scrollTo({left:o,behavior:e})}else if(a.right>l.right){let o=s+(a.right-l.right);i.scrollTo({left:o,behavior:e})}})}internalCloseTabHandler(t){let e=t.target;this.handleTabTitleClose(e),t.stopPropagation()}async updateTabTitles(t){t.target.selected&&(this.selectedTabId=t.detail,this.selectedTitle=await this.getTabTitleById(this.selectedTabId))}globalInternalTabChangeHandler(t){this.syncId&&t.target!==this.el&&t.target.syncId===this.syncId&&this.selectedTabId!==t.detail.tab&&(this.selectedTabId=t.detail.tab),t.stopPropagation()}async selectedTabIdChanged(){await this.componentOnReady(),localStorage&&this.storageId&&this.selectedTabId!==void 0&&this.selectedTabId!==null&&localStorage.setItem(`calcite-tab-nav-${this.storageId}`,JSON.stringify(this.selectedTabId)),this.calciteInternalTabChange.emit({tab:this.selectedTabId})}onTabTitleWheel(t){t.preventDefault();let{deltaX:e,deltaY:i}=t,l=Math.abs(e),a=Math.abs(i),s;l===a?s=this.lastScrollWheelAxis==="x"?e:i:l>a?(s=e,this.lastScrollWheelAxis="x"):(s=i,this.lastScrollWheelAxis="y");let o=(this.effectiveDir==="rtl"?-1:1)*s;t.currentTarget.scrollBy(o,0)}onSlotChange(){this.intersectionObserver?.disconnect();let t=this.tabTitles;t.forEach(l=>{this.intersectionObserver?.observe(l)});let e=this.getVisibleTabTitlesIndices(t);e.length>1&&this.makeFirstVisibleTabClosable&&(t[e[0]].closable=!0,this.makeFirstVisibleTabClosable=!1),this.calciteInternalTabNavSlotChange.emit(t)}setTabTitleContainerEl(t){this.tabTitleContainerEl=t,this.intersectionObserver?.disconnect(),t&&(this.intersectionObserver=g("intersection",()=>this.updateScrollingState(),{root:t,threshold:[0,.5,1]}))}updateScrollingState(){let t=this.tabTitleContainerEl;if(!t)return;let e,i,l=t.scrollLeft,a=t.clientWidth,s=t.scrollWidth;this.effectiveDir==="ltr"?(e=l>0,i=l+a<s):(e=l<0,i=l!==-(s-a)),this.hasOverflowingStartTabTitle=e,this.hasOverflowingEndTabTitle=i}scrollToTabTitles(t){requestAnimationFrame(()=>{let e=this.tabTitleContainerEl;if(!e)return;let i=e.getBoundingClientRect(),l=Array.from(this.el.querySelectorAll("calcite-tab-title")),{effectiveDir:a}=this;t==="forward"&&l.reverse();let s=null;l.forEach(n=>{let r=n.getBoundingClientRect(),f=i.x+i.width,d=r.x+r.width;t==="forward"&&a==="ltr"||t==="backward"&&a==="rtl"?(r.x>f||d>f&&r.x>i.x)&&(s=n):(d<i.x||r.x<i.x&&d>i.x)&&(s=n)});let o;if(s){let n=2*this.scrollerButtonWidth,r=t==="forward"&&a==="ltr"||t==="backward"&&a==="rtl"?-n:s.offsetWidth-(e.clientWidth+n);o=s.offsetLeft+r}else{let n=e.scrollLeft,r=i.width,d=e.scrollWidth-(r+Math.abs(n));d>0&&(o=n+(a==="ltr"?1:-1)*d)}e.scrollTo({left:o,behavior:"smooth"})})}scrollToNextTabTitles(){this.scrollToTabTitles("forward")}scrollToPreviousTabTitles(){this.scrollToTabTitles("backward")}handleTabFocus(t,e,i){let l=E(this.enabledTabTitles,e,i);this.scrollTabTitleIntoView(l,"instant"),t.stopPropagation()}getIndexOfTabTitle(t,e=this.tabTitles){return e.indexOf(t)}onTabTitleScroll(){this.updateScrollingState()}async getTabTitleById(t){return Promise.all(this.tabTitles.map(e=>e.getTabIdentifier())).then(e=>this.tabTitles[e.indexOf(t)])}getVisibleTabTitlesIndices(t){return t.reduce((e,i,l)=>i.closed?e:[...e,l],[])}handleTabTitleClose(t){let{tabTitles:e}=this,i=t.selected,l=this.getVisibleTabTitlesIndices(e),a=l.length;if(a===1&&e[l[0]].closable)this.makeFirstVisibleTabClosable=!0,e[l[0]].closable=!1,this.selectedTabId=l[0],i&&e[l[0]].activateTab();else if(a>1){let s=e.findIndex(n=>n===t),o=l.find(n=>n>s);this.selectedTabId===s&&(this.selectedTabId=o||a-1,e[this.selectedTabId].activateTab())}requestAnimationFrame(()=>{B(e[this.selectedTabId])})}render(){return this.el.role="tablist",u`<div class=${b({[c.container]:!0,[c.scale(this.scale)]:!0,[c.position(this.position)]:!0,[x.rtl]:this.effectiveDir==="rtl"})}><div class=${b({[c.tabTitleSlotWrapper]:!0})} @scroll=${this.onTabTitleScroll} @wheel=${this.onTabTitleWheel} ${w(this.setTabTitleContainerEl)}><slot @slotchange=${this.onSlotChange}></slot></div><div class=${b(c.scrollButtonContainer)} .hidden=${!this.hasOverflowingEndTabTitle&&!this.hasOverflowingStartTabTitle}>${this.renderScrollButton("start")}${this.renderScrollButton("end")}</div></div>`}renderScrollButton(t){let{messages:e,scale:i,hasOverflowingEndTabTitle:l,hasOverflowingStartTabTitle:a}=this,s=t==="end";return y(t,u`<div class=${b({[c.scrollButton]:!0,[c.scrollBackwardButton]:!s,[c.scrollForwardButton]:s})}><calcite-button appearance=transparent .ariaLabel=${s?e.nextTabTitles:e.previousTabTitles} .disabled=${s?!l:!a} icon-flip-rtl=both .iconStart=${s?$.chevronRight:$.chevronLeft} kind=neutral @click=${s?this.scrollToNextTabTitles:this.scrollToPreviousTabTitles} .scale=${i} tabindex=-1></calcite-button></div>`)}};S("calcite-tab-nav",v);export{v as TabNav};
|
|
3
|
+
v5.0.0-next.26 */
|
|
4
|
+
import{a as W,b as F,c as z}from"./BJWZNEE6.js";import{a as y}from"./52WSL3OS.js";import{a as g}from"./FAT3Y2BN.js";import{a as O}from"./6F7MIVOD.js";import"./7UWIO6G4.js";import{e as k,l as B,n as p,y as E}from"./5DDVN7VT.js";import"./HTSVYMIU.js";import{C as w,D as C,E as b,J as x,P as S,g as I,h as u,o as T}from"./S3LMUVIR.js";var $={chevronRight:"chevron-right",chevronLeft:"chevron-left"},c={container:"container",scrollButton:"scroll-button",scrollButtonContainer:"scroll-button-container",scrollBackwardButton:"scroll-button--backward",scrollForwardButton:"scroll-button--forward",tabTitleSlotWrapper:"tab-titles-slot-wrapper",scale:h=>`scale-${h}`,position:h=>`position-${h}`},V=I`:host{position:relative;display:flex}:host([bordered]) .scroll-button--forward calcite-button{--calcite-internal-button-border-inline-end-color: var(--calcite-tab-border-color, var(--calcite-color-border-1))}:host([bordered]) .scroll-button--backward calcite-button{--calcite-internal-button-border-inline-start-color: var( --calcite-tab-border-color, var(--calcite-color-border-1) )}.scale-s{--calcite-internal-tab-nav-button-width: 24px;min-block-size:1.5rem}.scale-m{--calcite-internal-tab-nav-button-width: 32px;min-block-size:2rem}.scale-l{--calcite-internal-tab-nav-button-width: 44px;min-block-size:2.75rem}.container::-webkit-scrollbar{display:none;-ms-overflow-style:none;scrollbar-width:none}:host([layout=center]) ::slotted(calcite-tab-title){display:flex;flex-grow:1;flex-shrink:0;min-inline-size:auto;white-space:nowrap}:host([layout=center]) ::slotted(calcite-tab-title[selected]){overflow:unset}:host(:not([bordered])) .scale-l{--calcite-internal-tab-nav-gap: var(--calcite-spacing-xxl)}:host(:not([bordered])) .scale-m{--calcite-internal-tab-nav-gap: var(--calcite-spacing-xl)}:host(:not([bordered])) .scale-s{--calcite-internal-tab-nav-gap: var(--calcite-spacing-lg)}:host(:not([bordered])) .tab-titles-slot-wrapper{gap:var(--calcite-internal-tab-nav-gap)}:host([layout=center]:not([bordered])) .tab-titles-slot-wrapper{padding-inline:var(--calcite-spacing-xl)}.tab-titles-slot-wrapper{flex:1 1 0%}.container,.tab-titles-slot-wrapper{display:flex;inline-size:100%;justify-content:flex-start;overflow:hidden;white-space:nowrap}.scroll-button{position:absolute;inset-block:0px}.scroll-button calcite-button{--calcite-button-text-color: var(--calcite-tab-text-color, var(--calcite-color-text-3));--calcite-button-background-color: var(--calcite-color-transparent);--calcite-offset-invert-focus: 1;block-size:var(--calcite-container-size-content-fluid)}.scroll-button-container{display:flex;inset-block-start:var(--calcite-border-width-md);inset-block-end:var(--calcite-border-width-md);inset-inline-end:0;inline-size:calc(2 * var(--calcite-internal-tab-nav-button-width))}.scroll-button--forward{inset-inline-end:0;z-index:var(--calcite-z-index)}.scroll-button--backward{inset-inline-end:var(--calcite-internal-tab-nav-button-width);z-index:var(--calcite-z-index)}:host(:not([bordered])) .scroll-button--backward:before{background-color:var(--calcite-tab-border-color, var(--calcite-color-border-3));content:"";inline-size:var(--calcite-border-width-sm);inset-block-start:var(--calcite-border-width-md);inset-block-end:var(--calcite-border-width-md);position:absolute;inset-inline-start:0}:host([hidden]){display:none}[hidden]{display:none}`,v=class extends C{constructor(){super(),this.effectiveDir="ltr",this.lastScrollWheelAxis="x",this.resizeObserver=g("resize",()=>{this.updateScrollingState()}),this.makeFirstVisibleTabClosable=!1,this.messages=O(),this.hasOverflowingEndTabTitle=!1,this.hasOverflowingStartTabTitle=!1,this.bordered=!1,this.layout="inline",this.position="bottom",this.scale="m",this.selectedTitle=null,this.calciteInternalTabChange=T({cancelable:!1}),this.calciteInternalTabNavSlotChange=T(),this.calciteTabChange=T({cancelable:!1}),this.listen("calciteInternalTabsFocusPrevious",this.focusPreviousTabHandler),this.listen("calciteInternalTabsFocusNext",this.focusNextTabHandler),this.listen("calciteInternalTabsFocusFirst",this.focusFirstTabHandler),this.listen("calciteInternalTabsFocusLast",this.focusLastTabHandler),this.listen("calciteInternalTabsActivate",this.internalActivateTabHandler),this.listen("calciteInternalTabsClose",this.internalCloseTabHandler),this.listen("calciteInternalTabTitleRegister",this.updateTabTitles),this.listenOn(document.body,"calciteInternalTabChange",this.globalInternalTabChangeHandler)}static{this.properties={hasOverflowingEndTabTitle:[16,{},{state:!0}],hasOverflowingStartTabTitle:[16,{},{state:!0}],selectedTabId:[16,{},{state:!0}],bordered:[7,{},{reflect:!0,type:Boolean}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],position:1,scale:1,selectedTitle:[0,{},{attribute:!1}],storageId:[3,{},{reflect:!0}],syncId:[3,{},{reflect:!0}]}}static{this.styles=V}connectedCallback(){super.connectedCallback(),this.parentTabsEl=this.el.closest("calcite-tabs"),this.resizeObserver?.observe(this.el)}async load(){let t=`calcite-tab-nav-${this.storageId}`;if(localStorage&&this.storageId&&localStorage.getItem(t)){let e=JSON.parse(localStorage.getItem(t));this.selectedTabId=e}}willUpdate(t){t.has("selectedTitle")&&(this.hasUpdated||this.selectedTitle!==null)&&this.calciteInternalTabChange.emit({tab:this.selectedTabId}),t.has("selectedTabId")&&this.selectedTabIdChanged();let{parentTabsEl:e}=this;this.layout=e?.layout,this.bordered=e?.bordered,this.effectiveDir=k(this.el)}loaded(){this.scrollTabTitleIntoView(this.selectedTitle,"instant"),this.tabTitles.length&&this.tabTitles.every(t=>!t.selected)&&!this.selectedTabId&&this.tabTitles[0].getTabIdentifier().then(t=>{this.calciteInternalTabChange.emit({tab:t})})}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}get enabledTabTitles(){return p(this.el,"calcite-tab-title:not([disabled])").filter(t=>!t.closed)}get scrollerButtonWidth(){let{scale:t}=this;return parseInt(t==="s"?W:t==="m"?F:z)}get tabTitles(){return p(this.el,"calcite-tab-title")}focusPreviousTabHandler(t){this.handleTabFocus(t,t.target,"previous")}focusNextTabHandler(t){this.handleTabFocus(t,t.target,"next")}focusFirstTabHandler(t){this.handleTabFocus(t,t.target,"first")}focusLastTabHandler(t){this.handleTabFocus(t,t.target,"last")}internalActivateTabHandler(t){let e=t.target,i=this.selectedTitle;this.selectedTabId=t.detail.tab?t.detail.tab:this.getIndexOfTabTitle(e),t.stopPropagation(),this.selectedTitle=e,i?.id!==e.id&&t.detail.userTriggered&&this.calciteTabChange.emit(),this.scrollTabTitleIntoView(e)}scrollTabTitleIntoView(t,e="smooth"){t&&requestAnimationFrame(()=>{let i=this.tabTitleContainerEl;if(!i)return;let l=i.getBoundingClientRect(),a=t.getBoundingClientRect(),s=i.scrollLeft;if(a.left<l.left){let o=s+(a.left-l.left);i.scrollTo({left:o,behavior:e})}else if(a.right>l.right){let o=s+(a.right-l.right);i.scrollTo({left:o,behavior:e})}})}internalCloseTabHandler(t){let e=t.target;this.handleTabTitleClose(e),t.stopPropagation()}async updateTabTitles(t){t.target.selected&&(this.selectedTabId=t.detail,this.selectedTitle=await this.getTabTitleById(this.selectedTabId))}globalInternalTabChangeHandler(t){this.syncId&&t.target!==this.el&&t.target.syncId===this.syncId&&this.selectedTabId!==t.detail.tab&&(this.selectedTabId=t.detail.tab),t.stopPropagation()}async selectedTabIdChanged(){await this.componentOnReady(),localStorage&&this.storageId&&this.selectedTabId!==void 0&&this.selectedTabId!==null&&localStorage.setItem(`calcite-tab-nav-${this.storageId}`,JSON.stringify(this.selectedTabId)),this.calciteInternalTabChange.emit({tab:this.selectedTabId})}onTabTitleWheel(t){t.preventDefault();let{deltaX:e,deltaY:i}=t,l=Math.abs(e),a=Math.abs(i),s;l===a?s=this.lastScrollWheelAxis==="x"?e:i:l>a?(s=e,this.lastScrollWheelAxis="x"):(s=i,this.lastScrollWheelAxis="y");let o=(this.effectiveDir==="rtl"?-1:1)*s;t.currentTarget.scrollBy(o,0)}onSlotChange(){this.intersectionObserver?.disconnect();let t=this.tabTitles;t.forEach(l=>{this.intersectionObserver?.observe(l)});let e=this.getVisibleTabTitlesIndices(t);e.length>1&&this.makeFirstVisibleTabClosable&&(t[e[0]].closable=!0,this.makeFirstVisibleTabClosable=!1),this.calciteInternalTabNavSlotChange.emit(t)}setTabTitleContainerEl(t){this.tabTitleContainerEl=t,this.intersectionObserver?.disconnect(),t&&(this.intersectionObserver=g("intersection",()=>this.updateScrollingState(),{root:t,threshold:[0,.5,1]}))}updateScrollingState(){let t=this.tabTitleContainerEl;if(!t)return;let e,i,l=t.scrollLeft,a=t.clientWidth,s=t.scrollWidth;this.effectiveDir==="ltr"?(e=l>0,i=l+a<s):(e=l<0,i=l!==-(s-a)),this.hasOverflowingStartTabTitle=e,this.hasOverflowingEndTabTitle=i}scrollToTabTitles(t){requestAnimationFrame(()=>{let e=this.tabTitleContainerEl;if(!e)return;let i=e.getBoundingClientRect(),l=Array.from(this.el.querySelectorAll("calcite-tab-title")),{effectiveDir:a}=this;t==="forward"&&l.reverse();let s=null;l.forEach(n=>{let r=n.getBoundingClientRect(),f=i.x+i.width,d=r.x+r.width;t==="forward"&&a==="ltr"||t==="backward"&&a==="rtl"?(r.x>f||d>f&&r.x>i.x)&&(s=n):(d<i.x||r.x<i.x&&d>i.x)&&(s=n)});let o;if(s){let n=2*this.scrollerButtonWidth,r=t==="forward"&&a==="ltr"||t==="backward"&&a==="rtl"?-n:s.offsetWidth-(e.clientWidth+n);o=s.offsetLeft+r}else{let n=e.scrollLeft,r=i.width,d=e.scrollWidth-(r+Math.abs(n));d>0&&(o=n+(a==="ltr"?1:-1)*d)}e.scrollTo({left:o,behavior:"smooth"})})}scrollToNextTabTitles(){this.scrollToTabTitles("forward")}scrollToPreviousTabTitles(){this.scrollToTabTitles("backward")}handleTabFocus(t,e,i){let l=E(this.enabledTabTitles,e,i);this.scrollTabTitleIntoView(l,"instant"),t.stopPropagation()}getIndexOfTabTitle(t,e=this.tabTitles){return e.indexOf(t)}onTabTitleScroll(){this.updateScrollingState()}async getTabTitleById(t){return Promise.all(this.tabTitles.map(e=>e.getTabIdentifier())).then(e=>this.tabTitles[e.indexOf(t)])}getVisibleTabTitlesIndices(t){return t.reduce((e,i,l)=>i.closed?e:[...e,l],[])}handleTabTitleClose(t){let{tabTitles:e}=this,i=t.selected,l=this.getVisibleTabTitlesIndices(e),a=l.length;if(a===1&&e[l[0]].closable)this.makeFirstVisibleTabClosable=!0,e[l[0]].closable=!1,this.selectedTabId=l[0],i&&e[l[0]].activateTab();else if(a>1){let s=e.findIndex(n=>n===t),o=l.find(n=>n>s);this.selectedTabId===s&&(this.selectedTabId=o||a-1,e[this.selectedTabId].activateTab())}requestAnimationFrame(()=>{B(e[this.selectedTabId])})}render(){return this.el.role="tablist",u`<div class=${b({[c.container]:!0,[c.scale(this.scale)]:!0,[c.position(this.position)]:!0,[x.rtl]:this.effectiveDir==="rtl"})}><div class=${b({[c.tabTitleSlotWrapper]:!0})} @scroll=${this.onTabTitleScroll} @wheel=${this.onTabTitleWheel} ${w(this.setTabTitleContainerEl)}><slot @slotchange=${this.onSlotChange}></slot></div><div class=${b(c.scrollButtonContainer)} .hidden=${!this.hasOverflowingEndTabTitle&&!this.hasOverflowingStartTabTitle}>${this.renderScrollButton("start")}${this.renderScrollButton("end")}</div></div>`}renderScrollButton(t){let{messages:e,scale:i,hasOverflowingEndTabTitle:l,hasOverflowingStartTabTitle:a}=this,s=t==="end";return y(t,u`<div class=${b({[c.scrollButton]:!0,[c.scrollBackwardButton]:!s,[c.scrollForwardButton]:s})}><calcite-button .ariaLabel=${s?e.nextTabTitles:e.previousTabTitles} .disabled=${s?!l:!a} icon-flip-rtl=both .iconStart=${s?$.chevronRight:$.chevronLeft} kind=neutral @click=${s?this.scrollToNextTabTitles:this.scrollToPreviousTabTitles} .scale=${i} tabindex=-1></calcite-button></div>`)}};S("calcite-tab-nav",v);export{v as TabNav};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as S,b as H,d as O}from"./FVRYO4N6.js";import{a as D}from"./L2VNGTSR.js";import{a as p}from"./VKUS34R6.js";import{a as I}from"./A7AWHUCH.js";import{a as L}from"./EQ25YK3K.js";import{a as F}from"./MT4G6FVR.js";import{a as T}from"./4JL57EDA.js";import"./VKBFZH3Q.js";import"./W35ZAP2H.js";import{a as R}from"./EK3BWMVE.js";import{B as x,C as h,D as E,E as a,G as l,P as B,g as w,h as e}from"./GAXQ53KY.js";var i={button:"button",buttonTextVisible:"button--text-visible",buttonCompact:"button--compact",indicatorText:"indicator-text",iconContainer:"icon-container",slotContainer:"slot-container",slotContainerHidden:"slot-container--hidden",textContainer:"text-container",textContainerVisible:"text-container--visible",indicatorWithIcon:"indicator-with-icon",indicatorWithoutIcon:"indicator-without-icon"},P="calcite-action",N={button:s=>`${P}-${s}-button`,indicator:s=>`${P}-${s}-indicator`},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([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host([scale=s]){--calcite-internal-action-font-size: var(--calcite-font-size--2);--calcite-internal-action-height: var(--calcite-size-sm);--calcite-internal-action-line-height: 1rem;--calcite-internal-action-spacing: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-action-font-size: var(--calcite-font-size--1);--calcite-internal-action-height: var(--calcite-size-md);--calcite-internal-action-line-height: 1rem;--calcite-internal-action-spacing: var(--calcite-spacing-sm)}:host([scale=l]){--calcite-internal-action-font-size: var(--calcite-font-size-0);--calcite-internal-action-height: var(--calcite-size-lg);--calcite-internal-action-line-height: 1.25rem;--calcite-internal-action-spacing: var(--calcite-spacing-sm-plus)}:host{display:flex;cursor:pointer;background-color:transparent;--calcite-internal-action-text-color: var(--calcite-color-text-3);border-radius:var(--calcite-action-corner-radius, var(--calcite-action-corner-radius-start-start, var(--calcite-corner-radius-xs)) var(--calcite-action-corner-radius-start-end, var(--calcite-corner-radius-xs)) var(--calcite-action-corner-radius-end-end, var(--calcite-corner-radius-xs)) var(--calcite-action-corner-radius-end-start, var(--calcite-corner-radius-xs)))}.interaction-container{border-radius:inherit}:host([width=full]){flex:1 0 auto}:host([width=full]) .button{justify-content:center}:host([width=full]) .button .text-container--visible{flex:none}:host([drag-handle]){cursor:move;--calcite-internal-action-text-color: var(--calcite-color-border-input);--calcite-internal-action-padding-inline: var(--calcite-spacing-xxs)}.button{position:relative;margin:0;display:flex;inline-size:auto;align-items:center;justify-content:flex-start;border-style:none;outline-color:transparent;background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-1));border-radius:inherit;color:var(--calcite-action-text-color, var(--calcite-internal-action-text-color));cursor:inherit;flex:1 0 auto;font-family:inherit;font-size:var(--calcite-internal-action-font-size);font-weight:var(--calcite-font-weight-normal);line-height:var(--calcite-internal-action-line-height);min-block-size:var(--calcite-internal-action-height);padding-block:var(--calcite-internal-action-padding-block, var(--calcite-internal-action-spacing));padding-inline:var(--calcite-internal-action-padding-inline, var(--calcite-internal-action-spacing));text-align:start}.button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-action-text-color-press, var(--calcite-action-text-color-pressed, var(--calcite-color-text-1)))}.button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-foreground-3)))}.button--text-visible{gap:var(--calcite-internal-action-spacing);inline-size:100%}.icon-container{pointer-events:none;margin:0;display:flex;align-items:center;justify-content:center}.text-container{margin:0;inline-size:0px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:0;transition-property:opacity;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1);transition-property:inline-size}.text-container--visible{inline-size:auto;flex:1 1 auto;opacity:1}:host([active]) .button{background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-3));color:var(--calcite-action-text-color-press, var(--calcite-action-text-color-pressed, var(--calcite-color-text-1)))}:host([active]) .button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-color-foreground-3))}:host([active]) .button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-foreground-3)))}:host([loading]) .button:hover,:host([loading]) .button:focus{background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-1))}:host([loading]) .text-container{opacity:var(--calcite-opacity-disabled)}:host([loading]) calcite-loader[inline]{margin-inline-end:0px}:host([appearance=transparent]):host([active]) .button{background-color:var(--calcite-color-transparent-press)}:host([appearance=transparent]) .button{background-color:transparent;transition-property:box-shadow;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1)}:host([appearance=transparent]) .button:hover{background-color:var(--calcite-color-transparent-hover)}:host([appearance=transparent]) .button:active{background-color:var(--calcite-color-transparent-press)}:host([selection-appearance=highlight][active]) .button{background-color:var(--calcite-color-surface-highlight);color:var(--calcite-color-text-highlight)}:host([active-descendant]) .button{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([alignment=center]) .button{justify-content:center}:host([alignment=end]) .button{justify-content:flex-end}:host([alignment=center]) .button .text-container--visible,:host([alignment=end]) .button .text-container--visible{flex:0 1 auto}:host([scale=s][compact]) .button,:host([scale=m][compact]) .button,:host([scale=l][compact]) .button{padding-inline:0px}.slot-container{display:flex}.slot-container--hidden{display:none}.indicator-with-icon{position:relative}.indicator-with-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.275rem;inset-inline-end:-.275rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}:host([scale=s]) .indicator-with-icon{position:relative}:host([scale=s]) .indicator-with-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.075rem;inset-inline-end:-.075rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}.indicator-without-icon{margin-inline:.25rem;inline-size:1rem;position:relative}.indicator-without-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.275rem;inset-inline-end:-.275rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}:host([scale=s]) .indicator-without-icon{position:relative}:host([scale=s]) .indicator-without-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.075rem;inset-inline-end:-.075rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}.indicator-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}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) .button,:host([disabled]) .button:hover,:host([disabled]) .button:focus{cursor:default;opacity:var(--calcite-opacity-disabled);background-color:var(--calcite-action-background-color, var(--calcite-action-background-color, var(--calcite-color-foreground-1)))}:host([disabled]):host([active]) .button,:host([disabled]):host([active]) .button:hover,:host([disabled]):host([active]) .button:focus{opacity:var(--calcite-opacity-disabled);background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-foreground-3))))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,y=class extends E{constructor(){super(...arguments),this.guid=R(),this.buttonRef=x(),this.buttonId=N.button(this.guid),this.mutationObserver=I("mutation",()=>this.requestUpdate()),this.messages=L({blocking:!0}),this.focusSetter=F()(this),this.indicatorRef=x(),this.interactiveContainer=D(this),this.active=!1,this.activeDescendant=!1,this.appearance="transparent",this.compact=!1,this.disabled=!1,this.dragHandle=!1,this.iconFlipRtl=!1,this.indicator=!1,this.loading=!1,this.scale="m",this.width="auto",this.textEnabled=!1,this.type="button"}static{this.properties={aria:[0,{},{attribute:!1}],active:[7,{},{reflect:!0,type:Boolean}],activeDescendant:[7,{},{reflect:!0,type:Boolean}],alignment:[3,{},{reflect:!0}],appearance:[3,{},{reflect:!0}],compact:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],dragHandle:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],icon:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],indicator:[7,{},{reflect:!0,type:Boolean}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],scale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}],text:1,textEnabled:[7,{},{reflect:!0,type:Boolean}],type:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}]}}static{this.styles=V}async setFocus(t){return this.focusSetter(()=>this.buttonRef.value,t)}connectedCallback(){super.connectedCallback(),this.formEl=O(this),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}disconnectedCallback(){super.disconnectedCallback(),this.formEl=null,this.mutationObserver?.disconnect()}handleClick(){let{type:t}=this;t==="submit"?S(this):t==="reset"&&H(this)}renderTextContainer(){let{text:t,textEnabled:o}=this,n={[i.textContainer]:!0,[i.textContainerVisible]:o};return t?p("text-container",e`<div class=${a(n)}>${t}</div>`):null}renderIndicatorText(){let{indicator:t,messages:o,buttonId:n}=this;return e`<div aria-labelledby=${n??l} aria-live=polite class=${a(i.indicatorText)} role=region ${h(this.indicatorRef)}>${t?o.indicator:null}</div>`}renderIconContainer(){let{loading:t,icon:o,scale:n,el:d,iconFlipRtl:v,indicator:f}=this,g=n==="l"?"l":"m",c=t?e`<calcite-loader inline .label=${this.messages.loading} .scale=${g}></calcite-loader>`:null,u=o?e`<calcite-icon class=${a({[i.indicatorWithIcon]:f})} .flipRtl=${v} .icon=${o} .scale=${T(this.scale)}></calcite-icon>`:null,r=c||u,m=r||d.children?.length,b=e`<div class=${a({[i.slotContainer]:!0,[i.slotContainerHidden]:t})}><slot></slot></div>`;return m?p("icon-container",e`<div aria-hidden=true class=${a(i.iconContainer)}>${r}${b}</div>`):null}renderButton(){let{compact:t,disabled:o,icon:n,loading:d,textEnabled:v,label:f,text:g,indicator:c,indicatorRef:u,buttonId:r,messages:m}=this,b=f||g||"",k=c?m.indicatorLabel.replace("{label}",b):b,$={[i.button]:!0,[i.buttonTextVisible]:v,[i.buttonCompact]:t},C=e`${this.renderIconContainer()}${this.renderTextContainer()}${!n&&c&&p("indicator-no-icon",e`<div class=${a(i.indicatorWithoutIcon)}></div>`)||""}`,j=c&&u.value?[u.value]:[],z=[...this.aria?.controlsElements??[],...j];return this.dragHandle?e`<span .ariaBusy=${d} .ariaControlsElements=${z} .ariaDescribedByElements=${this.aria?.describedByElements} .ariaExpanded=${this.aria?.expanded} .ariaHasPopup=${this.aria?.hasPopup} .ariaLabel=${k} .ariaLabelledByElements=${this.aria?.labelledByElements} .ariaOwnsElements=${this.aria?.ownsElements} .ariaPressed=${this.aria?.pressed} class=${a($)} id=${r??l} role=button tabindex=${(this.disabled?null:0)??l} ${h(this.buttonRef)}>${C}</span>`:e`<button .ariaBusy=${d} .ariaControlsElements=${z} .ariaDescribedByElements=${this.aria?.describedByElements} .ariaExpanded=${this.aria?.expanded} .ariaHasPopup=${this.aria?.hasPopup} .ariaLabel=${k} .ariaLabelledByElements=${this.aria?.labelledByElements} .ariaOwnsElements=${this.aria?.ownsElements} .ariaPressed=${this.aria?.pressed} class=${a($)} .disabled=${o} id=${r??l} @click=${this.handleClick} ${h(this.buttonRef)}>${C}</button>`}render(){return this.interactiveContainer({disabled:this.disabled,children:e`${this.renderButton()}${this.renderIndicatorText()}`})}};B("calcite-action",y);export{y as Action};
|
|
3
|
+
v5.0.0-next.26 */
|
|
4
|
+
import{a as S,b as H,d as O}from"./VMAECY3E.js";import{a as D}from"./TOJWPJZO.js";import{a as p}from"./52WSL3OS.js";import{a as I}from"./FAT3Y2BN.js";import{a as L}from"./6F7MIVOD.js";import{a as F}from"./LLHJY7FO.js";import{a as T}from"./WUWREGJO.js";import"./7UWIO6G4.js";import"./5DDVN7VT.js";import{a as R}from"./HTSVYMIU.js";import{B as x,C as h,D as E,E as a,G as l,P as B,g as w,h as e}from"./S3LMUVIR.js";var i={button:"button",buttonTextVisible:"button--text-visible",buttonCompact:"button--compact",indicatorText:"indicator-text",iconContainer:"icon-container",slotContainer:"slot-container",slotContainerHidden:"slot-container--hidden",textContainer:"text-container",textContainerVisible:"text-container--visible",indicatorWithIcon:"indicator-with-icon",indicatorWithoutIcon:"indicator-without-icon"},P="calcite-action",N={button:s=>`${P}-${s}-button`,indicator:s=>`${P}-${s}-indicator`},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([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host([scale=s]){--calcite-internal-action-font-size: var(--calcite-font-size--2);--calcite-internal-action-height: var(--calcite-size-sm);--calcite-internal-action-line-height: 1rem;--calcite-internal-action-spacing: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-action-font-size: var(--calcite-font-size--1);--calcite-internal-action-height: var(--calcite-size-md);--calcite-internal-action-line-height: 1rem;--calcite-internal-action-spacing: var(--calcite-spacing-sm)}:host([scale=l]){--calcite-internal-action-font-size: var(--calcite-font-size-0);--calcite-internal-action-height: var(--calcite-size-lg);--calcite-internal-action-line-height: 1.25rem;--calcite-internal-action-spacing: var(--calcite-spacing-sm-plus)}:host{display:flex;cursor:pointer;background-color:transparent;--calcite-internal-action-text-color: var(--calcite-color-text-3);border-radius:var(--calcite-action-corner-radius, var(--calcite-action-corner-radius-start-start, var(--calcite-corner-radius-xs)) var(--calcite-action-corner-radius-start-end, var(--calcite-corner-radius-xs)) var(--calcite-action-corner-radius-end-end, var(--calcite-corner-radius-xs)) var(--calcite-action-corner-radius-end-start, var(--calcite-corner-radius-xs)))}.interaction-container{border-radius:inherit}:host([width=full]){flex:1 0 auto}:host([width=full]) .button{justify-content:center}:host([width=full]) .button .text-container--visible{flex:none}:host([drag-handle]){cursor:move;--calcite-internal-action-text-color: var(--calcite-color-border-input);--calcite-internal-action-padding-inline: var(--calcite-spacing-xxs)}.button{position:relative;margin:0;display:flex;inline-size:auto;align-items:center;justify-content:flex-start;border-style:none;outline-color:transparent;background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-1));border-radius:inherit;color:var(--calcite-action-text-color, var(--calcite-internal-action-text-color));cursor:inherit;flex:1 0 auto;font-family:inherit;font-size:var(--calcite-internal-action-font-size);font-weight:var(--calcite-font-weight-normal);line-height:var(--calcite-internal-action-line-height);min-block-size:var(--calcite-internal-action-height);padding-block:var(--calcite-internal-action-padding-block, var(--calcite-internal-action-spacing));padding-inline:var(--calcite-internal-action-padding-inline, var(--calcite-internal-action-spacing));text-align:start}.button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-action-text-color-press, var(--calcite-action-text-color-pressed, var(--calcite-color-text-1)))}.button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-foreground-3)))}.button--text-visible{gap:var(--calcite-internal-action-spacing);inline-size:100%}.icon-container{pointer-events:none;margin:0;display:flex;align-items:center;justify-content:center}.text-container{margin:0;inline-size:0px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:0;transition-property:opacity;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1);transition-property:inline-size}.text-container--visible{inline-size:auto;flex:1 1 auto;opacity:1}:host([active]) .button{background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-3));color:var(--calcite-action-text-color-press, var(--calcite-action-text-color-pressed, var(--calcite-color-text-1)))}:host([active]) .button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-color-foreground-3))}:host([active]) .button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-foreground-3)))}:host([loading]) .button:hover,:host([loading]) .button:focus{background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-1))}:host([loading]) .text-container{opacity:var(--calcite-opacity-disabled)}:host([loading]) calcite-loader[inline]{margin-inline-end:0px}:host([appearance=transparent]):host([active]) .button{background-color:var(--calcite-color-transparent-press)}:host([appearance=transparent]) .button{background-color:transparent;transition-property:box-shadow;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1)}:host([appearance=transparent]) .button:hover{background-color:var(--calcite-color-transparent-hover)}:host([appearance=transparent]) .button:active{background-color:var(--calcite-color-transparent-press)}:host([selection-appearance=highlight][active]) .button{background-color:var(--calcite-color-surface-highlight);color:var(--calcite-color-text-highlight)}:host([active-descendant]) .button{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([alignment=center]) .button{justify-content:center}:host([alignment=end]) .button{justify-content:flex-end}:host([alignment=center]) .button .text-container--visible,:host([alignment=end]) .button .text-container--visible{flex:0 1 auto}:host([scale=s][compact]) .button,:host([scale=m][compact]) .button,:host([scale=l][compact]) .button{padding-inline:0px}.slot-container{display:flex}.slot-container--hidden{display:none}.indicator-with-icon{position:relative}.indicator-with-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.275rem;inset-inline-end:-.275rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}:host([scale=s]) .indicator-with-icon{position:relative}:host([scale=s]) .indicator-with-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.075rem;inset-inline-end:-.075rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}.indicator-without-icon{margin-inline:.25rem;inline-size:1rem;position:relative}.indicator-without-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.275rem;inset-inline-end:-.275rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}:host([scale=s]) .indicator-without-icon{position:relative}:host([scale=s]) .indicator-without-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.075rem;inset-inline-end:-.075rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}.indicator-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}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) .button,:host([disabled]) .button:hover,:host([disabled]) .button:focus{cursor:default;opacity:var(--calcite-opacity-disabled);background-color:var(--calcite-action-background-color, var(--calcite-action-background-color, var(--calcite-color-foreground-1)))}:host([disabled]):host([active]) .button,:host([disabled]):host([active]) .button:hover,:host([disabled]):host([active]) .button:focus{opacity:var(--calcite-opacity-disabled);background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-foreground-3))))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,y=class extends E{constructor(){super(...arguments),this.guid=R(),this.buttonRef=x(),this.buttonId=N.button(this.guid),this.mutationObserver=I("mutation",()=>this.requestUpdate()),this.messages=L({blocking:!0}),this.focusSetter=F()(this),this.indicatorRef=x(),this.interactiveContainer=D(this),this.active=!1,this.activeDescendant=!1,this.appearance="transparent",this.compact=!1,this.disabled=!1,this.dragHandle=!1,this.iconFlipRtl=!1,this.indicator=!1,this.loading=!1,this.scale="m",this.width="auto",this.textEnabled=!1,this.type="button"}static{this.properties={aria:[0,{},{attribute:!1}],active:[7,{},{reflect:!0,type:Boolean}],activeDescendant:[7,{},{reflect:!0,type:Boolean}],alignment:[3,{},{reflect:!0}],appearance:[3,{},{reflect:!0}],compact:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],dragHandle:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],icon:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],indicator:[7,{},{reflect:!0,type:Boolean}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],scale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}],text:1,textEnabled:[7,{},{reflect:!0,type:Boolean}],type:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}]}}static{this.styles=V}async setFocus(t){return this.focusSetter(()=>this.buttonRef.value,t)}connectedCallback(){super.connectedCallback(),this.formEl=O(this),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}disconnectedCallback(){super.disconnectedCallback(),this.formEl=null,this.mutationObserver?.disconnect()}handleClick(){let{type:t}=this;t==="submit"?S(this):t==="reset"&&H(this)}renderTextContainer(){let{text:t,textEnabled:o}=this,n={[i.textContainer]:!0,[i.textContainerVisible]:o};return t?p("text-container",e`<div class=${a(n)}>${t}</div>`):null}renderIndicatorText(){let{indicator:t,messages:o,buttonId:n}=this;return e`<div aria-labelledby=${n??l} aria-live=polite class=${a(i.indicatorText)} role=region ${h(this.indicatorRef)}>${t?o.indicator:null}</div>`}renderIconContainer(){let{loading:t,icon:o,scale:n,el:d,iconFlipRtl:v,indicator:f}=this,g=n==="l"?"l":"m",c=t?e`<calcite-loader inline .label=${this.messages.loading} .scale=${g}></calcite-loader>`:null,u=o?e`<calcite-icon class=${a({[i.indicatorWithIcon]:f})} .flipRtl=${v} .icon=${o} .scale=${T(this.scale)}></calcite-icon>`:null,r=c||u,m=r||d.children?.length,b=e`<div class=${a({[i.slotContainer]:!0,[i.slotContainerHidden]:t})}><slot></slot></div>`;return m?p("icon-container",e`<div aria-hidden=true class=${a(i.iconContainer)}>${r}${b}</div>`):null}renderButton(){let{compact:t,disabled:o,icon:n,loading:d,textEnabled:v,label:f,text:g,indicator:c,indicatorRef:u,buttonId:r,messages:m}=this,b=f||g||"",k=c?m.indicatorLabel.replace("{label}",b):b,$={[i.button]:!0,[i.buttonTextVisible]:v,[i.buttonCompact]:t},C=e`${this.renderIconContainer()}${this.renderTextContainer()}${!n&&c&&p("indicator-no-icon",e`<div class=${a(i.indicatorWithoutIcon)}></div>`)||""}`,j=c&&u.value?[u.value]:[],z=[...this.aria?.controlsElements??[],...j];return this.dragHandle?e`<span .ariaBusy=${d} .ariaControlsElements=${z} .ariaDescribedByElements=${this.aria?.describedByElements} .ariaExpanded=${this.aria?.expanded} .ariaHasPopup=${this.aria?.hasPopup} .ariaLabel=${k} .ariaLabelledByElements=${this.aria?.labelledByElements} .ariaOwnsElements=${this.aria?.ownsElements} .ariaPressed=${this.aria?.pressed} class=${a($)} id=${r??l} role=button tabindex=${(this.disabled?null:0)??l} ${h(this.buttonRef)}>${C}</span>`:e`<button .ariaBusy=${d} .ariaChecked=${this.aria?.checked} .ariaControlsElements=${z} .ariaDescribedByElements=${this.aria?.describedByElements} .ariaExpanded=${this.aria?.expanded} .ariaHasPopup=${this.aria?.hasPopup} .ariaLabel=${k} .ariaLabelledByElements=${this.aria?.labelledByElements} .ariaOwnsElements=${this.aria?.ownsElements} .ariaPressed=${this.aria?.pressed} class=${a($)} .disabled=${o} id=${r??l} @click=${this.handleClick} .role=${this.aria?.role} ${h(this.buttonRef)}>${C}</button>`}render(){return this.interactiveContainer({disabled:this.disabled,children:e`${this.renderButton()}${this.renderIndicatorText()}`})}};B("calcite-action",y);export{y as Action};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.26 */
|
|
4
4
|
function e(r){return r.map(o=>{let t="";for(let n=0;n<o;n++)t+=((1+Math.random())*65536|0).toString(16).substring(1);return t}).join("-")}var i=()=>e([2,1,1,1,3]);export{i as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as p}from"./
|
|
3
|
+
v5.0.0-next.26 */
|
|
4
|
+
import{a as p}from"./FAT3Y2BN.js";import{a as w}from"./LLHJY7FO.js";import"./WUWREGJO.js";import"./7UWIO6G4.js";import{A as g}from"./5DDVN7VT.js";import"./HTSVYMIU.js";import{B as d,C as m,D as f,E as h,P as u,g as c,h as l}from"./S3LMUVIR.js";var n={frame:"frame",frameAdvancing:"frame--advancing",frameRetreating:"frame--retreating"},b=c`: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:relative;display:flex;inline-size:100%;flex:1 1 auto;align-items:stretch;overflow:hidden;background-color:transparent}:host .frame{position:relative;margin:0;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;padding:0;animation-name:none;animation-duration:var(--calcite-animation-timing);background-color:var(--calcite-flow-background-color)}:host ::slotted(*){display:none;block-size:100%}:host ::slotted(*[selected]){display:flex}:host .frame--advancing{animation-name:calcite-frame-advance}:host .frame--retreating{animation-name:calcite-frame-retreat}@keyframes calcite-frame-advance{0%{--tw-bg-opacity: .5;transform:translate3d(50px,0,0)}to{--tw-bg-opacity: 1;transform:translateZ(0)}}@keyframes calcite-frame-retreat{0%{--tw-bg-opacity: .5;transform:translate3d(-50px,0,0)}to{--tw-bg-opacity: 1;transform:translateZ(0)}}:host([hidden]){display:none}[hidden]{display:none}`,r=class extends f{constructor(){super(),this.frameRef=d(),this.itemMutationObserver=p("mutation",()=>this.updateItemsAndProps()),this.items=[],this.selectedIndex=-1,this.focusSetter=w()(this),this.flowDirection="standby",this.listen("calciteInternalFlowItemChange",this.handleCalciteInternalFlowItemChange),this.listen("calciteFlowItemBack",this.handleItemBackClick)}static{this.properties={flowDirection:[16,{},{state:!0}],customItemSelectors:1}}static{this.styles=b}async back(){let{items:e,selectedIndex:i}=this,t=e[i],a=e[i-1];if(!t||!a)return;let s=t.beforeBack?t.beforeBack:()=>Promise.resolve();try{await s.call(t)}catch{return}return t.selected=!1,a.selected=!0,a}async setFocus(e){return this.focusSetter(()=>this.items[this.selectedIndex],e)}connectedCallback(){super.connectedCallback(),this.itemMutationObserver?.observe(this.el,{childList:!0,subtree:!0})}willUpdate(e){e.has("flowDirection")&&(this.hasUpdated||this.flowDirection!=="standby")&&this.handleFlowDirectionChange(this.flowDirection)}loaded(){this.updateItemsAndProps()}disconnectedCallback(){super.disconnectedCallback(),this.itemMutationObserver?.disconnect()}async handleFlowDirectionChange(e){e==="standby"||!this.frameRef.value||(await g(this.frameRef.value,e==="retreating"?"calcite-frame-retreat":"calcite-frame-advance"),this.resetFlowDirection())}handleCalciteInternalFlowItemChange(e){e.stopPropagation(),this.updateFlowProps()}async handleItemBackClick(e){if(!e.defaultPrevented)return await this.back(),this.setFocus()}resetFlowDirection(){this.flowDirection="standby"}getFlowDirection(e,i){let t=e>0;return!(e>-1&&i>0)&&!t?"standby":i<e?"retreating":"advancing"}updateItemsAndProps(){let{customItemSelectors:e,el:i}=this,t=Array.from(i.querySelectorAll(`calcite-flow-item${e?`,${e}`:""}`)).filter(a=>a.closest("calcite-flow")===i);this.items=t,this.ensureSelectedFlowItemExists(),this.updateFlowProps()}updateFlowProps(){let{selectedIndex:e,items:i}=this,t=this.findSelectedFlowItemIndex(i);i.forEach((a,s)=>{let o=s===t;o||(a.menuOpen=!1),a.showBackButton=o&&t>0}),t!==-1&&(e!==t&&(this.flowDirection=this.getFlowDirection(e,t)),this.selectedIndex=t)}findSelectedFlowItemIndex(e){let i=e.slice(0).reverse().find(t=>!!t.selected);return e.indexOf(i)}ensureSelectedFlowItemExists(){let{items:e}=this;if(this.findSelectedFlowItemIndex(e)!==-1)return;let t=e[e.length-1];t&&(t.selected=!0)}render(){let{flowDirection:e}=this,i={[n.frame]:!0,[n.frameAdvancing]:e==="advancing",[n.frameRetreating]:e==="retreating"};return l`<div class=${h(i)} ${m(this.frameRef)}><slot></slot></div>`}};u("calcite-flow",r);export{r as Flow};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as T}from"./
|
|
3
|
+
v5.0.0-next.26 */
|
|
4
|
+
import{a as T}from"./P4SFTOL2.js";import{a as v}from"./TOJWPJZO.js";import{a}from"./52WSL3OS.js";import"./CWNLGPSB.js";import{a as S}from"./6F7MIVOD.js";import{a as w}from"./LLHJY7FO.js";import"./WUWREGJO.js";import"./7UWIO6G4.js";import"./5DDVN7VT.js";import"./HTSVYMIU.js";import{C as b,D as g,E as h,P as $,g as f,h as r,l,o as i}from"./S3LMUVIR.js";var I={handle:"handle",dropdown:"dropdown"},y={drag:"drag",blank:"blank"},p={label:"{label}",position:"{position}",total:"{total}"},D=["top","up","down","bottom"],C={trigger:"trigger"},m={add:"add",move:"move",reorder:"reorder"},O=f`: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}.dropdown{block-size:100%}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,u=class extends g{constructor(){super(...arguments),this.focusSetter=w()(this),this.interactiveContainer=v(this),this.disabled=!1,this.messages=S({blocking:!0}),this.addToItems=[],this.moveToItems=[],this.open=!1,this.overlayPositioning="absolute",this.placement=T,this.scale="m",this.sortDisabled=!1,this.calciteSortHandleAdd=i({cancelable:!0}),this.calciteSortHandleBeforeClose=i({cancelable:!1}),this.calciteSortHandleBeforeOpen=i({cancelable:!1}),this.calciteSortHandleClose=i({cancelable:!1}),this.calciteSortHandleMove=i({cancelable:!0}),this.calciteSortHandleOpen=i({cancelable:!1}),this.calciteSortHandleReorder=i({cancelable:!0})}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],flipPlacements:[0,{},{attribute:!1}],label:1,messageOverrides:[0,{},{attribute:!1}],messages:[0,{},{attribute:!1}],addToItems:[0,{},{attribute:!1}],moveToItems:[0,{},{attribute:!1}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],setPosition:[9,{},{type:Number}],setSize:[9,{},{type:Number}],sortDisabled:[7,{},{reflect:!0,type:Boolean}],widthScale:[3,{},{reflect:!0}]}}static{this.styles=O}get hasSetInfo(){return typeof this.setPosition=="number"&&typeof this.setSize=="number"}get hasValidSetInfo(){return this.hasSetInfo?this.setPosition>0&&this.setSize>1:!0}get hasReorderItems(){return!this.sortDisabled&&this.hasValidSetInfo}get hasNoItems(){return!this.hasReorderItems&&this.moveToItems.length<1&&this.addToItems.length<1}async setFocus(e){return this.focusSetter(()=>this.dropdownEl,e)}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler()}openHandler(){if(this.disabled){this.open=!1;return}this.dropdownEl&&(this.dropdownEl.open=this.open)}setDropdownEl(e){e&&(this.dropdownEl=e,this.openHandler())}getLabel(){let{label:e,messages:t,setPosition:o,setSize:s,hasSetInfo:d}=this;if(!d)return e??"";let n=e?t.repositionLabel.replace(p.label,e):t.reposition;return n=n.replace(p.position,o?o.toString():""),n.replace(p.total,s?s.toString():"")}handleBeforeOpen(e){e.stopPropagation(),this.calciteSortHandleBeforeOpen.emit()}handleOpen(e){e.stopPropagation(),this.calciteSortHandleOpen.emit(),this.open=!0}handleBeforeClose(e){e.stopPropagation(),this.calciteSortHandleBeforeClose.emit()}handleClose(e){e.stopPropagation(),this.calciteSortHandleClose.emit(),this.open=!1}handleReorder(e){this.calciteSortHandleReorder.emit({reorder:e.target.dataset.value})}handleMoveTo(e){let t=e.target.dataset.id,o=this.moveToItems.find(s=>s.id===t);this.calciteSortHandleMove.emit({moveTo:o})}handleAddTo(e){let t=e.target.dataset.id,o=this.addToItems.find(s=>s.id===t);this.calciteSortHandleAdd.emit({addTo:o})}render(){let{disabled:e,flipPlacements:t,open:o,overlayPositioning:s,placement:d,scale:n,widthScale:P,hasNoItems:B}=this,c=this.getLabel(),H=e||B;return this.interactiveContainer({disabled:e,children:r`<calcite-dropdown class=${h(I.dropdown)} .disabled=${H} .flipPlacements=${t} @calciteDropdownBeforeClose=${this.handleBeforeClose} @calciteDropdownBeforeOpen=${this.handleBeforeOpen} @calciteDropdownClose=${this.handleClose} @calciteDropdownOpen=${this.handleOpen} .overlayPositioning=${s} .placement=${d} .scale=${n} .widthScale=${P} ${b(this.setDropdownEl)}><calcite-action .active=${o} .aria=${{expanded:o}} class=${h(I.handle)} .dragHandle=${!0} .icon=${e?y.blank:y.drag} .label=${c} .scale=${n} slot=${C.trigger} .text=${c} title=${c??l}></calcite-action>${this.renderReorderGroup()}${this.renderMoveToGroup()}${this.renderAddToGroup()}</calcite-dropdown>`})}renderAddToItem(e){return a(e.id,r`<calcite-dropdown-item data-id=${e.id??l} .label=${e.label} @calciteDropdownItemSelect=${this.handleAddTo}>${e.label}</calcite-dropdown-item>`)}renderMoveToItem(e){return a(e.id,r`<calcite-dropdown-item data-id=${e.id??l} .label=${e.label} @calciteDropdownItemSelect=${this.handleMoveTo}>${e.label}</calcite-dropdown-item>`)}renderReorderGroup(){return this.hasReorderItems?a("reorder",r`<calcite-dropdown-group .groupTitle=${this.messages.reorder} id=${m.reorder} .scale=${this.scale} selection-mode=none>${this.renderTop()}${this.renderUp()}${this.renderDown()}${this.renderBottom()}</calcite-dropdown-group>`):null}renderAddToGroup(){let{messages:e,addToItems:t,scale:o}=this;return t.length?a("add-to-items",r`<calcite-dropdown-group .groupTitle=${e.addTo} id=${m.add} .scale=${o} selection-mode=none>${t.map(s=>this.renderAddToItem(s))}</calcite-dropdown-group>`):null}renderMoveToGroup(){let{messages:e,moveToItems:t,scale:o}=this;return t.length?a("move-to-items",r`<calcite-dropdown-group .groupTitle=${e.moveTo} id=${m.move} .scale=${o} selection-mode=none>${t.map(s=>this.renderMoveToItem(s))}</calcite-dropdown-group>`):null}renderDropdownItem(e,t){return a(D[e],r`<calcite-dropdown-item data-value=${D[e]??l} .label=${t} @calciteDropdownItemSelect=${this.handleReorder}>${t}</calcite-dropdown-item>`)}renderTop(){let{setPosition:e}=this;return e!==1&&e!==2?this.renderDropdownItem(0,this.messages.moveToTop):null}renderUp(){return this.setPosition!==1?this.renderDropdownItem(1,this.messages.moveUp):null}renderDown(){return this.setPosition!==this.setSize?this.renderDropdownItem(2,this.messages.moveDown):null}renderBottom(){let{setPosition:e,setSize:t}=this;return e!==t&&e!==t-1?this.renderDropdownItem(3,this.messages.moveToBottom):null}};$("calcite-sort-handle",u);export{u as SortHandle};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as y}from"./
|
|
3
|
+
v5.0.0-next.26 */
|
|
4
|
+
import{a as y}from"./FAT3Y2BN.js";import{a as z}from"./6F7MIVOD.js";import{b as d}from"./WUWREGJO.js";import"./7UWIO6G4.js";import{u as x,y as o}from"./5DDVN7VT.js";import{a as A}from"./HTSVYMIU.js";import{B as g,C as v,D as S,E as r,P as I,g as b,h as a,i as f,l as h,o as m}from"./S3LMUVIR.js";var p={actionIcon:"action-icon",actionContainer:"action-container",stepBarContainer:"step-bar-container",singleView:"single-view"},P={chevronLeft:"chevron-left",chevronRight:"chevron-right"},B="calcite-stepper-action",R={position:(c,e)=>`${B}-${c}-${e?"start":"end"}`},l={stepBar:"step-bar",stepBarActive:"step-bar--active",stepBarComplete:"step-bar--complete",stepBarDisabled:"step-bar--disabled",stepBarError:"step-bar--error",stepBarInActive:"step-bar--inactive"},M=({disabled:c,active:e,complete:t,error:i})=>a`<svg class=${r({[l.stepBar]:!0})}>${f`<rect class=${r({[l.stepBarActive]:e,[l.stepBarComplete]:t,[l.stepBarDisabled]:c,[l.stepBarError]:i,[l.stepBarInActive]:!0})} width=100% x=0 y=0 />`}</svg>`,T=b`:host([scale=s]){--calcite-internal-stepper-item-spacing-unit-s: .25rem;--calcite-internal-stepper-action-block-size: 2.75rem;--calcite-internal-stepper-action-inline-size: 2rem;--calcite-internal-step-bar-gap: .25rem}:host([scale=m]){--calcite-internal-stepper-item-spacing-unit-s: .5rem;--calcite-internal-stepper-action-block-size: 3.25rem;--calcite-internal-stepper-action-inline-size: 2.5rem}:host([scale=l]){--calcite-internal-stepper-item-spacing-unit-s: .75rem;--calcite-internal-stepper-action-block-size: 4rem;--calcite-internal-stepper-action-inline-size: 3rem;--calcite-internal-step-bar-gap: .75rem}:host{display:flex}.container{position:relative;display:flex;inline-size:100%;min-inline-size:fit-content;flex-direction:row;flex-wrap:wrap;align-items:stretch;justify-content:space-between}:host([layout=vertical]) .container{flex:1 1 auto;flex-direction:column}:host([layout=horizontal]) .container,:host([layout=horizontal-single]) .container{display:grid;grid-template-areas:"items" "content";gap:.5rem var(--calcite-stepper-bar-gap, var(--calcite-internal-stepper-item-spacing-unit-s))}:host([layout=horizontal][scale=s]) .container,:host([layout=horizontal-single][scale=s]) .container{gap:.25rem var(--calcite-stepper-bar-gap, var(--calcite-internal-stepper-item-spacing-unit-s))}:host([layout=horizontal][scale=l]) .container,:host([layout=horizontal-single][scale=l]) .container{gap:.75rem var(--calcite-stepper-bar-gap, var(--calcite-internal-stepper-item-spacing-unit-s))}:host([layout=horizontal]) .container.single-view{display:flex;grid-template-columns:none}.action-icon{position:relative;display:flex;flex-grow:0;block-size:var(--calcite-internal-stepper-action-block-size);inline-size:var(--calcite-internal-stepper-action-inline-size)}.action-container{position:absolute;display:flex;justify-content:space-between;padding-block:.25rem;inline-size:100%}.step-bar{display:flex;block-size:100%;inline-size:100%}.step-bar-container{position:absolute;display:flex;align-items:flex-start;justify-content:space-between;block-size:.125rem;inline-size:100%;gap:var(--calcite-stepper-bar-gap, var(--calcite-internal-step-bar-gap, .5rem))}.step-bar--inactive{fill:var(--calcite-stepper-bar-inactive-fill-color, var(--calcite-color-border-3, #dfdfdf));fill-opacity:1;block-size:100%}.step-bar--active{fill:var(--calcite-stepper-bar-active-fill-color, var(--calcite-color-brand))}.step-bar--complete{fill:var(--calcite-stepper-bar-complete-fill-color, var(--calcite-color-brand));fill-opacity:.5}.step-bar--error{fill:var(--calcite-stepper-bar-error-fill-color, var(--calcite-color-status-danger))}.step-bar--disabled{opacity:.5}:host([hidden]){display:none}[hidden]{display:none}`,u=class extends S{constructor(){super(),this.containerRef=g(),this.enabledItems=[],this.guid=A(),this.itemMap=new Map,this.items=[],this.multipleViewMode=!1,this.mutationObserver=y("mutation",()=>this.updateItems()),this.messages=z(),this.icon=!1,this.layout="horizontal",this.numbered=!1,this.scale="m",this.selectedItem=null,this.calciteInternalStepperItemChange=m({cancelable:!1}),this.calciteStepperChange=m({cancelable:!1}),this.listen("calciteInternalStepperItemKeyEvent",this.calciteInternalStepperItemKeyEvent),this.listen("calciteInternalStepperItemRegister",this.registerItem),this.listen("calciteInternalStepperItemSelect",this.updateItem),this.listen("calciteStepperItemSelect",this.handleItemSelect)}static{this.properties={currentActivePosition:[16,{},{state:!0}],icon:[7,{},{reflect:!0,type:Boolean}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],numbered:[7,{},{reflect:!0,type:Boolean}],numberingSystem:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selectedItem:[0,{},{attribute:!1}]}}static{this.styles=T}async endStep(){let e=this.getEnabledStepIndex(this.items.length-1,"previous");typeof e=="number"&&this.updateStep(e)}async goToStep(e){let t=e-1;this.currentActivePosition!==t&&this.updateStep(t)}async nextStep(){let e=this.getEnabledStepIndex(this.currentActivePosition+1,"next");typeof e=="number"&&this.updateStep(e)}async prevStep(){let e=this.getEnabledStepIndex(this.currentActivePosition-1,"previous");typeof e=="number"&&this.updateStep(e)}async startStep(){let e=this.getEnabledStepIndex(0,"next");typeof e=="number"&&this.updateStep(e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0}),this.updateItems()}willUpdate(e){(e.has("icon")&&(this.hasUpdated||this.icon!==!1)||e.has("layout")&&(this.hasUpdated||this.layout!=="horizontal")||e.has("numbered")&&(this.hasUpdated||this.numbered!==!1)||e.has("scale")&&(this.hasUpdated||this.scale!=="m"))&&(this.updateItems(),this.determineActiveStepper()),e.has("numberingSystem")&&this.setStepperItemNumberingSystem(),e.has("currentActivePosition")&&requestAnimationFrame(()=>{this.determineActiveStepper()})}loaded(){if(typeof this.currentActivePosition!="number"){let e=this.getFirstEnabledStepperPosition();e===0&&(this.currentActivePosition=e),this.calciteInternalStepperItemChange.emit({position:e})}}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}calciteInternalStepperItemKeyEvent(e){let t=e.detail.item,i=e.target;switch(t.key){case"ArrowDown":case"ArrowRight":o(this.enabledItems,i,"next");break;case"ArrowUp":case"ArrowLeft":o(this.enabledItems,i,"previous");break;case"Home":o(this.enabledItems,i,"first");break;case"End":o(this.enabledItems,i,"last");break}e.stopPropagation()}registerItem(e){let t=e.target,{content:i,position:n}=e.detail;this.itemMap.set(t,{position:n,content:i}),this.enabledItems=this.filterItems(),e.stopPropagation()}updateItem(e){let{position:t}=e.detail;typeof t=="number"&&(this.currentActivePosition=t,this.selectedItem=e.target),this.calciteInternalStepperItemChange.emit({position:t})}handleItemSelect(){this.emitItemSelect()}emitItemSelect(){this.calciteStepperChange.emit()}updateItems(){this.el.querySelectorAll("calcite-stepper-item").forEach(e=>{e.icon=this.icon,e.numbered=this.numbered,e.layout=this.layout,e.scale=this.scale})}determineActiveStepper(){let{items:e}=this;if(e.length<2)return;let{currentActivePosition:t,layout:i}=this;this.multipleViewMode=i!=="horizontal-single",e.forEach((n,s)=>{n.itemHidden=i==="horizontal-single"&&s!==(t||0)})}getEnabledStepIndex(e,t="next"){let{items:i,currentActivePosition:n}=this,s=e;for(;s>=0&&s<i.length&&i[s]?.disabled;)s=s+(t==="previous"?-1:1);return s!==n&&s<i.length&&s>=0?s:null}updateStep(e){this.currentActivePosition=e,this.calciteInternalStepperItemChange.emit({position:e})}filterItems(){return this.items.filter(e=>!e.disabled&&!d(e))}setStepperItemNumberingSystem(){this.items.forEach(e=>{e.numberingSystem=this.numberingSystem})}handleActionClick(e){let t=this.currentActivePosition;e.target.getAttribute("data-position")==="start"?this.prevStep():this.nextStep(),typeof this.currentActivePosition=="number"&&t!==this.currentActivePosition&&!this.items[this.currentActivePosition].disabled&&this.emitItemSelect()}getFirstEnabledStepperPosition(){let e=this.items.findIndex(t=>!t.disabled);return e>-1?e:0}handleDefaultSlotChange(e){let t=x(e).filter(n=>n?.tagName==="CALCITE-STEPPER-ITEM"&&!d(n));this.items=t;let i=Array(t.length).fill("1fr").join(" ");this.containerRef.value.style.gridTemplateAreas=i,this.containerRef.value.style.gridTemplateColumns=i,this.setStepperItemNumberingSystem()}render(){return this.el.ariaLabel=this.messages.label,this.el.role="region",a`<div class=${r({container:!0,[p.singleView]:this.layout==="horizontal-single"})} ${v(this.containerRef)}>${this.layout==="horizontal-single"&&a`<div class=${r({[p.stepBarContainer]:!0})}>${this.items.map((e,t)=>M({active:t===this.currentActivePosition,complete:e.complete&&t!==this.currentActivePosition&&!e.error,disabled:e.disabled&&t!==this.currentActivePosition,error:e.error&&t!==this.currentActivePosition}))}</div>`||""}${this.layout==="horizontal-single"&&a`<div class=${r({[p.actionContainer]:!0})}>${this.renderAction("start")}${this.renderAction("end")}</div>`||""}<slot @slotchange=${this.handleDefaultSlotChange}></slot></div>`}renderAction(e){let t=e==="start",i=t?P.chevronLeft:P.chevronRight,{currentActivePosition:n,multipleViewMode:s,layout:C}=this,E=R.position(this.guid,t),$=t?-1:1,w=t?"previous":"next",k=this.getEnabledStepIndex(n+$,w)===null;return C==="horizontal-single"&&!s?a`<calcite-action alignment=center class=${r({[p.actionIcon]:!0})} compact data-position=${e??h} .disabled=${k} .icon=${i} icon-flip-rtl id=${E??h} @click=${this.handleActionClick} .scale=${this.scale} .text=${t?this.messages.previousStep:this.messages.nextStep}></calcite-action>`:null}};I("calcite-stepper",u);export{u as Stepper};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{u as f,v as g}from"./
|
|
3
|
+
v5.0.0-next.26 */
|
|
4
|
+
import{u as f,v as g}from"./5DDVN7VT.js";import"./HTSVYMIU.js";import{B as b,C as h,D as p,E as m,P as u,g as d,h as n}from"./S3LMUVIR.js";var v={section:"section"},x={titleGroup:"title-group"},y=d`:host{display:flex;flex-direction:column;background-color:var(--calcite-tab-background-color, var(--calcite-color-transparent))}:host([bordered]){box-shadow:inset 0 1px 0 var(--calcite-tab-border-color, var(--calcite-color-border-1));background-color:var(--calcite-tab-background-color, var(--calcite-color-foreground-1))}:host([bordered]) section{border-color:var(--calcite-tab-border-color, var(--calcite-color-border-1));border-style:solid}section{display:flex;flex-grow:1;overflow:hidden;border-width:1px;border-block-start-style:solid;border-block-start-color:var(--calcite-tab-border-color, var(--calcite-color-border-1))}:host([bordered][position=bottom]){box-shadow:inset 0 1px 0 var(--calcite-tab-border-color, var(--calcite-color-border-1)),inset 0 -1px 0 var(--calcite-tab-border-color, var(--calcite-color-border-1))}:host([bordered]:not([position=bottom])) ::slotted(calcite-tab-nav){margin-block-end:-1px}:host([position=bottom]){flex-direction:column-reverse}:host([position=bottom]) section{flex-direction:column-reverse;border-block-start-width:0px;border-block-end-width:1px}:host([bordered][scale=s]) section{padding:.75rem}:host([bordered][scale=m]) section{padding:.5rem}:host([bordered][scale=l]) section{padding:1rem}:host([position=bottom]:not([bordered])) section{border-block-end-style:solid;border-block-end-color:var(--calcite-tab-border-color, var(--calcite-color-border-1))}@media(forced-colors:active){:host([bordered]) section{border-block-start-width:0px;border-block-end-width:1px}:host([position=bottom][bordered]) section{border-block-start-width:1px;border-block-end-width:0px}}:host([hidden]){display:none}[hidden]{display:none}`,c=class extends p{constructor(){super(),this.slotRef=b(),this.tabs=[],this.titles=[],this.bordered=!1,this.layout="inline",this.position="top",this.scale="m",this.listen("calciteInternalTabNavSlotChange",this.calciteInternalTabNavSlotChangeHandler)}static{this.properties={tabs:[16,{},{state:!0}],titles:[16,{},{state:!0}],bordered:[5,{},{type:Boolean}],layout:[3,{},{reflect:!0}],position:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}]}}static{this.styles=y}connectedCallback(){super.connectedCallback(),this.updateItems()}load(){this.updateItems()}willUpdate(e){(e.has("position")&&(this.hasUpdated||this.position!=="top")||e.has("scale")&&(this.hasUpdated||this.scale!=="m"))&&this.updateItems(),(e.has("titles")||e.has("tabs"))&&this.hasUpdated&&this.titles?.length>0&&this.tabs?.length>0&&(this.updateAriaSettings(),this.updateItems())}calciteInternalTabNavSlotChangeHandler(e){e.stopPropagation(),e.detail.length!==this.titles.length&&(this.titles=e.detail)}defaultSlotChangeHandler(e){this.tabs=f(e,"calcite-tab")}async updateAriaSettings(){if(await this.componentOnReady(),!this.slotRef.value)return;let e,s,o=g(this.slotRef.value,"calcite-tab");if(o.some(t=>t.tab)||this.titles.some(t=>t.tab))e=o.sort((t,a)=>t.tab.localeCompare(a.tab)).map(t=>t.id),s=this.titles.sort((t,a)=>t.tab.localeCompare(a.tab)).map(t=>t.id);else{let t=await Promise.all(o.map(r=>r.getTabIndex())),a=await Promise.all(this.titles.map(r=>r.getTabIndex()));e=t.reduce((r,i,l)=>(r[i]=o[l].id,r),[]),s=a.reduce((r,i,l)=>(r[i]=this.titles[l].id,r),[])}o.forEach(t=>t._updateAriaInfo(e,s)),this.titles.forEach(t=>t._updateAriaInfo(e,s))}updateItems(){let{position:e,scale:s}=this,o=this.el.querySelector("calcite-tab-nav");o&&(o.position=e,o.scale=s),Array.from(this.el.querySelectorAll("calcite-tab")).forEach(t=>{t.parentElement===this.el&&(t.scale=s)}),Array.from(this.el.querySelectorAll("calcite-tab-nav > calcite-tab-title")).forEach(t=>{t.position=e,t.scale=s})}render(){return n`<slot name=${x.titleGroup}></slot><section class=${m(v.section)}><slot @slotchange=${this.defaultSlotChangeHandler} ${h(this.slotRef)}></slot></section>`}};u("calcite-tabs",c);export{c as Tabs};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as c,b as r,f as d}from"./
|
|
3
|
+
v5.0.0-next.26 */
|
|
4
|
+
import{a as c,b as r,f as d}from"./5O4F6PZJ.js";import"./5DDVN7VT.js";import"./HTSVYMIU.js";import{D as n,E as o,P as s,g as a,h as l,o as i}from"./S3LMUVIR.js";var b={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=block]) .container,: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=i({bubbles:!1,cancelable:!1}),this.listen("click",this.labelClickHandler)}static{this.properties={alignment:[3,{},{reflect:!0}],for:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}]}}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 l`<div class=${o(b.container)}><slot></slot></div>`}};s("calcite-label",t);export{t as Label};
|