@esri/calcite-components 4.0.0-next.3 → 4.0.0-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/calcite/{46MFURVW.js → 25OFXHSI.js} +2 -2
- package/dist/calcite/{DO5PBDB6.js → 26D6VZXM.js} +2 -2
- package/dist/calcite/{3B6M2I6R.js → 26Y4UGWG.js} +1 -1
- package/dist/calcite/{RVNNZO5S.js → 27YLFCXU.js} +2 -2
- package/dist/calcite/{I4ZG47IO.js → 2AHIQP7N.js} +2 -2
- package/dist/calcite/{JK6ZJR4Q.js → 2WFCA2D3.js} +2 -2
- package/dist/calcite/{SCHU7X7E.js → 2YBVE3TW.js} +2 -2
- package/dist/calcite/{LGF2MB23.js → 3RQLJCWI.js} +2 -2
- package/dist/calcite/{XL3D57ZT.js → 3XBL6EUI.js} +2 -2
- package/dist/calcite/{YC37GP56.js → 4UPCZ7VK.js} +2 -2
- package/dist/calcite/{M54OK4H5.js → 4ZQYHM3U.js} +2 -2
- package/dist/calcite/{23CXGK3O.js → 4ZZGZODA.js} +2 -2
- package/dist/calcite/{VWQGQAWM.js → 524AP6CT.js} +2 -2
- package/dist/calcite/{IWNYCGDV.js → 52W2Q65V.js} +2 -2
- package/dist/calcite/{RZYZ7LOR.js → 555W4UG6.js} +2 -2
- package/dist/calcite/{UCSBV6SP.js → 5LLCTAQL.js} +2 -2
- package/dist/calcite/{CNO6QWY4.js → 5M6IZTKW.js} +2 -2
- package/dist/calcite/{FAZWRASR.js → 5OAPH5VA.js} +1 -1
- package/dist/calcite/{B4QUUEPR.js → 5T2UFPM2.js} +2 -2
- package/dist/calcite/{3SYQIRYZ.js → 5UBV3MVC.js} +2 -2
- package/dist/calcite/{HRTYXKZQ.js → 5V4GYIRU.js} +2 -2
- package/dist/calcite/{ZWOA2XYG.js → 63KJAOS2.js} +2 -2
- package/dist/calcite/{3AOLNIV5.js → 64V6P37K.js} +1 -1
- package/dist/calcite/{FN4LWOIX.js → 66KZTTEJ.js} +2 -2
- package/dist/calcite/{AQCNX3Y2.js → 6F4PGB65.js} +2 -2
- package/dist/calcite/{L4F6KUVL.js → 6W54BYFI.js} +2 -2
- package/dist/calcite/{FM5WXATQ.js → 6Z5XNRPT.js} +2 -2
- package/dist/calcite/{WZKVQNQP.js → 6ZP5CQEK.js} +2 -2
- package/dist/calcite/{XGRA5YOH.js → 77ATPRPI.js} +2 -2
- package/dist/calcite/{YIPNGSJJ.js → 77CEHENL.js} +2 -2
- package/dist/calcite/{ANOO25GS.js → 7CDGMT3L.js} +2 -2
- package/dist/calcite/{BZN5ANXH.js → 7LHMDTDV.js} +2 -2
- package/dist/calcite/{DR4G43FK.js → 7NVUJQYM.js} +2 -2
- package/dist/calcite/{FG2OFPX6.js → 7Y25ZXMO.js} +2 -2
- package/dist/calcite/{AQ7OYGKM.js → 7Y3FJ23A.js} +2 -2
- package/dist/calcite/{5RJSXC5P.js → 7ZRRYQWR.js} +2 -2
- package/dist/calcite/{3S2JUE2K.js → 7ZUVU2OJ.js} +2 -2
- package/dist/calcite/{MQ5IVRZ3.js → AKCLZ5OX.js} +2 -2
- package/dist/calcite/{FNK73N2G.js → AQGE4ANS.js} +1 -1
- package/dist/calcite/{2XRTKIKZ.js → AWJ4RHUN.js} +2 -2
- package/dist/calcite/{IH2RTW5V.js → AXGCJJTV.js} +2 -2
- package/dist/calcite/{DG6EZXQ6.js → BFCXWP2B.js} +2 -2
- package/dist/calcite/{ZMHFSRV5.js → BJGMYDKB.js} +2 -2
- package/dist/calcite/{Y2I4XR3D.js → BMEJ5LMT.js} +1 -1
- package/dist/calcite/{K7H5QY4F.js → BQBIHMEW.js} +2 -2
- package/dist/calcite/{7EMHDUXC.js → BQQMBDFV.js} +2 -2
- package/dist/calcite/{H2FYAEBZ.js → BWEFSITI.js} +2 -2
- package/dist/calcite/{KP6Y6EZF.js → C2ZGX23D.js} +2 -2
- package/dist/calcite/{4O6YCKDR.js → CC3ESRNH.js} +2 -2
- package/dist/calcite/{2NN344P3.js → CCXVAFEC.js} +1 -1
- package/dist/calcite/{CD5RJWWF.js → CF7B5GCD.js} +1 -1
- package/dist/calcite/{P7NDHLJ2.js → CU3XSBBG.js} +2 -2
- package/dist/calcite/{RPBQGEFV.js → CWRWB3H2.js} +2 -2
- package/dist/calcite/{RPXHLMNA.js → D6LSCJS7.js} +2 -2
- package/dist/calcite/{Y3E6MFPG.js → DJTOCBJB.js} +2 -2
- package/dist/calcite/{YHE5JK3Y.js → DQQ3BZWX.js} +2 -2
- package/dist/calcite/{4EYKSPLW.js → DWUN65US.js} +2 -2
- package/dist/calcite/{NEN3L3UJ.js → DX3Q3J3M.js} +2 -2
- package/dist/calcite/{VOLWNOYU.js → DZRV43LK.js} +1 -1
- package/dist/calcite/{VPM4VAQS.js → ED5EYIOZ.js} +2 -2
- package/dist/calcite/{MMZLLXKL.js → EDVEGZB5.js} +2 -2
- package/dist/calcite/{EGFNRBX4.js → EFLLD7A7.js} +2 -2
- package/dist/calcite/{7PD5EZ6H.js → ETR4LHFD.js} +2 -2
- package/dist/calcite/{USSMO5NY.js → EWHFLRNJ.js} +2 -2
- package/dist/calcite/{HS6ZZZA5.js → F3OJEWFJ.js} +2 -2
- package/dist/calcite/{K7FDPOMV.js → FDIAU2TL.js} +1 -1
- package/dist/calcite/{4J5DZNYG.js → FI2RI6FT.js} +2 -2
- package/dist/calcite/{SUL7GGVW.js → FJWUWJ4S.js} +2 -2
- package/dist/calcite/{2HPACDEM.js → G4LW54FY.js} +2 -2
- package/dist/calcite/{3ZGNB6SX.js → G5KKIH2H.js} +2 -2
- package/dist/calcite/{FKHWDV3U.js → G6QEE36U.js} +2 -2
- package/dist/calcite/{BPDARA3I.js → GAMUVUY6.js} +2 -2
- package/dist/calcite/{W35V7PHC.js → GB6NHN5V.js} +2 -2
- package/dist/calcite/{XFYMY2A4.js → GBUVSTMM.js} +2 -2
- package/dist/calcite/{CY6TGXXV.js → GHWM2VDQ.js} +2 -2
- package/dist/calcite/{TMVNRL5X.js → GLDAYX7B.js} +2 -2
- package/dist/calcite/{WM2DRLYS.js → GS3M4RAZ.js} +2 -2
- package/dist/calcite/{FK5WDHUS.js → H7V7V5GB.js} +1 -1
- package/dist/calcite/{3TGQA5FY.js → HAKKL4OQ.js} +2 -2
- package/dist/calcite/{J3MH3BGG.js → HN4627DU.js} +2 -2
- package/dist/calcite/{GYIEDQXF.js → J5IIWCOB.js} +2 -2
- package/dist/calcite/{7QN3EBP3.js → J745G2VZ.js} +1 -1
- package/dist/calcite/{PN2PH5AH.js → J7ZWKGNU.js} +2 -2
- package/dist/calcite/{AV3O2VQK.js → JCYJRVEH.js} +2 -2
- package/dist/calcite/{4ARPR4CQ.js → JF3TTIHH.js} +2 -2
- package/dist/calcite/{XA4X2WNO.js → JNG6C2SX.js} +2 -2
- package/dist/calcite/{P74NTHUY.js → JW6FEYNW.js} +2 -2
- package/dist/calcite/{I3QKAJYK.js → KHDD57AL.js} +2 -2
- package/dist/calcite/{4GGTXBTI.js → KPEZ6H4Q.js} +2 -2
- package/dist/calcite/{WSH2R63M.js → L2FREOE7.js} +2 -2
- package/dist/calcite/{ECZH5AQK.js → L6MIQ37K.js} +2 -2
- package/dist/calcite/{BXD7SE4L.js → LA4RIDJI.js} +2 -2
- package/dist/calcite/{7CNB556C.js → LEVVKKHK.js} +2 -2
- package/dist/calcite/{MPJ7BMVQ.js → LKICUMMK.js} +1 -1
- package/dist/calcite/{6EAMW3MS.js → M4W5D5YF.js} +2 -2
- package/dist/calcite/{FAM4IJZC.js → M5MLQ5IY.js} +2 -2
- package/dist/calcite/{U3FIRWRT.js → M66QXQWY.js} +2 -2
- package/dist/calcite/{GTD2PXEP.js → MGTABHQK.js} +2 -2
- package/dist/calcite/{EIFGFZ3O.js → MLSQLIRR.js} +2 -2
- package/dist/calcite/{AHEGGAVD.js → MU7IVKBS.js} +2 -2
- package/dist/calcite/{EU7PX2HM.js → N3PU6TLG.js} +2 -2
- package/dist/calcite/{33O55RS5.js → N5KAJJWQ.js} +2 -2
- package/dist/calcite/{ZGVMZW7Z.js → N7E4DVIL.js} +2 -2
- package/dist/calcite/{COCHJJG7.js → NHUW2NNV.js} +1 -1
- package/dist/calcite/{2WMIQ3VV.js → NPQHSNJR.js} +2 -2
- package/dist/calcite/{OMLHSF4H.js → NPSWP2IA.js} +2 -2
- package/dist/calcite/{H7TBOYEU.js → NVEDSCKM.js} +2 -2
- package/dist/calcite/{C45JXY6S.js → O4F45EEN.js} +2 -2
- package/dist/calcite/{R52EH66J.js → OIKLLWDJ.js} +2 -2
- package/dist/calcite/{MEPZMRUG.js → OOQZNSRJ.js} +2 -2
- package/dist/calcite/{A34TNM6K.js → OU5KR3C6.js} +2 -2
- package/dist/calcite/{IUSYC4H6.js → OZQAHIV6.js} +1 -1
- package/dist/calcite/{4QF2FMTJ.js → PCST45ZP.js} +2 -2
- package/dist/calcite/{ISLD6IXA.js → PEGKJDEF.js} +1 -1
- package/dist/calcite/{2RZUEPQT.js → PGBDHGLD.js} +2 -2
- package/dist/calcite/{L37KV4AA.js → PH37YEZG.js} +2 -2
- package/dist/calcite/{3CHNSDZT.js → PRZB6ESX.js} +2 -2
- package/dist/calcite/{C2R3C2HO.js → Q2TTNVO5.js} +2 -2
- package/dist/calcite/{765RELVZ.js → QAETGDNO.js} +2 -2
- package/dist/calcite/{IOUF4NVV.js → QE5MPILV.js} +2 -2
- package/dist/calcite/{U36NQYUH.js → QRMD4AB7.js} +1 -1
- package/dist/calcite/{D4SSWNU5.js → QUGEUWIO.js} +2 -2
- package/dist/calcite/{ESUCT4DQ.js → QZEMGVG2.js} +2 -2
- package/dist/calcite/{RCJIRS2F.js → R62QOX3F.js} +2 -2
- package/dist/calcite/{623YBKZL.js → RBHLX53W.js} +1 -1
- package/dist/calcite/{LKW3J4ZK.js → RENJQLCN.js} +2 -2
- package/dist/calcite/{7HBMH5YL.js → RFSXRTAB.js} +2 -2
- package/dist/calcite/{KRBNHSXW.js → RHF56UK4.js} +2 -2
- package/dist/calcite/{E3PRVBSJ.js → RPLMITDM.js} +2 -2
- package/dist/calcite/{GR3MW45V.js → RZHS5GIV.js} +2 -2
- package/dist/calcite/{ITXDIL7B.js → S3U2E3MK.js} +2 -2
- package/dist/calcite/{YH26YQAN.js → S4NLZ3IA.js} +2 -2
- package/dist/calcite/{ZUIFX3HI.js → S4ZIARTB.js} +2 -2
- package/dist/calcite/{E7ZTQXO5.js → SBHAOLPL.js} +2 -2
- package/dist/calcite/{CU5YNWNL.js → SI3ZNJI2.js} +2 -2
- package/dist/calcite/{BZGXJ63N.js → SI3ZRXDX.js} +2 -2
- package/dist/calcite/{4622UBXZ.js → SIRLHOHW.js} +2 -2
- package/dist/calcite/{BRLUKLE7.js → SN7NJMSO.js} +2 -2
- package/dist/calcite/{XHTMXWND.js → SRAWEQAJ.js} +2 -2
- package/dist/calcite/{5FVSIWOG.js → SUVCY2IR.js} +2 -2
- package/dist/calcite/{OYB3L6ZY.js → T6HXNJHK.js} +2 -2
- package/dist/calcite/{IQG5KL6R.js → TS7KA6OB.js} +2 -2
- package/dist/calcite/{QW2DWWWA.js → TUUMAAED.js} +1 -1
- package/dist/calcite/{ICD4EBGA.js → U2AHF4YO.js} +2 -2
- package/dist/calcite/{4SZGIGPI.js → U7IQST2D.js} +2 -2
- package/dist/calcite/{MV2S7CB2.js → U7TTHC3N.js} +2 -2
- package/dist/calcite/{KRMLTVBN.js → URIZ7RAS.js} +2 -2
- package/dist/calcite/{7SU5VGJW.js → UYBNLS3J.js} +2 -2
- package/dist/calcite/{SDDPCCQY.js → V25KF2RI.js} +2 -2
- package/dist/calcite/{Q6LVGJX3.js → V2PJWQ75.js} +2 -2
- package/dist/calcite/{TOGUGKVY.js → V5FI2X4L.js} +2 -2
- package/dist/calcite/{NDDIOILE.js → V5YY6PBZ.js} +2 -2
- package/dist/calcite/{PKTB23FY.js → VIQ2UCI6.js} +2 -2
- package/dist/calcite/{V4BRWS5N.js → VK73GE6D.js} +2 -2
- package/dist/calcite/{NBJLGZNL.js → VLIMMRO5.js} +2 -2
- package/dist/calcite/{J4SPFGDV.js → VSQBUDBI.js} +2 -2
- package/dist/calcite/{CUUPOSRV.js → VYG7QGSR.js} +2 -2
- package/dist/calcite/{JNYG6QOL.js → W5QVDJD3.js} +2 -2
- package/dist/calcite/{3KPV2PWD.js → WEDVB7MQ.js} +2 -2
- package/dist/calcite/{N6MPXDP6.js → WEJUJY2W.js} +2 -2
- package/dist/calcite/{KONPZXR5.js → WKL5Y2CL.js} +2 -2
- package/dist/calcite/{S4E7UUW3.js → WYH5N5ZE.js} +2 -2
- package/dist/calcite/{7AO56O4Q.js → XEOHRJW5.js} +2 -2
- package/dist/calcite/{3BMAR3T6.js → XQ5MM2RZ.js} +2 -2
- package/dist/calcite/{U5VZJACX.js → XWTVAC4E.js} +2 -2
- package/dist/calcite/{ZMWCEPB6.js → Y4GGYZUE.js} +2 -2
- package/dist/calcite/{3H4HYTM3.js → Y4TH3PJK.js} +2 -2
- package/dist/calcite/{SBCGWHXI.js → YP26NZEH.js} +2 -2
- package/dist/calcite/{2YZWN5W6.js → YQE5RNYG.js} +2 -2
- package/dist/calcite/{53PUYMUK.js → YXDQJAP7.js} +1 -1
- package/dist/calcite/{V63UZJBX.js → Z4HPZNWK.js} +2 -2
- package/dist/calcite/{GH5ASTKB.js → ZDS5QXQH.js} +2 -2
- package/dist/calcite/{SFDQ3VO4.js → ZGP4W7SI.js} +2 -2
- package/dist/calcite/{TYXM2S4Y.js → ZLMLHCRA.js} +1 -1
- package/dist/calcite/{ZOLGAOVV.js → ZNKJ3RZ7.js} +1 -1
- package/dist/calcite/{Z6E34DRB.js → ZSJDOLWH.js} +2 -2
- package/dist/calcite/{QZFKLS7T.js → ZUVK5C5D.js} +1 -1
- package/dist/calcite/{5R67XFU7.js → ZVRNP3XH.js} +1 -1
- package/dist/calcite/calcite.esm.js +2 -2
- package/dist/chunks/ExpandToggle.js +1 -1
- package/dist/chunks/FloatingArrow.js +1 -1
- package/dist/chunks/Heading.js +1 -1
- package/dist/chunks/InternalLabel.js +1 -1
- package/dist/chunks/Validation.js +1 -1
- package/dist/chunks/XButton.js +1 -1
- package/dist/chunks/_sortable.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/input.js +1 -1
- package/dist/chunks/interact.min.js +1 -1
- package/dist/chunks/interactive.js +1 -1
- package/dist/chunks/key.js +1 -1
- package/dist/chunks/label.js +1 -1
- package/dist/chunks/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/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/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.js +1 -1
- package/dist/components/calcite-action-bar/customElement.js +1 -1
- package/dist/components/calcite-action-group/customElement.js +1 -1
- package/dist/components/calcite-action-menu/customElement.js +1 -1
- package/dist/components/calcite-action-pad/customElement.js +1 -1
- package/dist/components/calcite-alert/customElement.js +1 -1
- package/dist/components/calcite-autocomplete/customElement.js +1 -1
- package/dist/components/calcite-autocomplete-item/customElement.js +1 -1
- package/dist/components/calcite-autocomplete-item-group/customElement.js +1 -1
- package/dist/components/calcite-avatar/customElement.js +1 -1
- package/dist/components/calcite-block/customElement.js +1 -1
- package/dist/components/calcite-block-group/customElement.js +1 -1
- package/dist/components/calcite-block-section/customElement.js +1 -1
- package/dist/components/calcite-button/customElement.js +1 -1
- package/dist/components/calcite-card/customElement.js +1 -1
- package/dist/components/calcite-card-group/customElement.js +1 -1
- package/dist/components/calcite-carousel/customElement.js +1 -1
- package/dist/components/calcite-carousel-item/customElement.js +1 -1
- package/dist/components/calcite-checkbox/customElement.js +1 -1
- package/dist/components/calcite-chip/customElement.js +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 +1 -1
- package/dist/components/calcite-list-item-group/customElement.js +1 -1
- package/dist/components/calcite-loader/customElement.js +1 -1
- package/dist/components/calcite-menu/customElement.js +1 -1
- package/dist/components/calcite-menu-item/customElement.js +1 -1
- package/dist/components/calcite-meter/customElement.js +1 -1
- package/dist/components/calcite-modal/customElement.js +1 -1
- package/dist/components/calcite-navigation/customElement.js +1 -1
- package/dist/components/calcite-navigation-logo/customElement.js +1 -1
- package/dist/components/calcite-navigation-user/customElement.js +1 -1
- package/dist/components/calcite-notice/customElement.js +1 -1
- package/dist/components/calcite-option/customElement.js +1 -1
- package/dist/components/calcite-option-group/customElement.js +1 -1
- package/dist/components/calcite-pagination/customElement.js +1 -1
- package/dist/components/calcite-panel/customElement.js +1 -1
- package/dist/components/calcite-popover/customElement.js +1 -1
- package/dist/components/calcite-progress/customElement.js +1 -1
- package/dist/components/calcite-radio-button/customElement.js +1 -1
- package/dist/components/calcite-radio-button-group/customElement.js +1 -1
- package/dist/components/calcite-rating/customElement.js +1 -1
- package/dist/components/calcite-scrim/customElement.js +1 -1
- package/dist/components/calcite-segmented-control/customElement.js +1 -1
- package/dist/components/calcite-segmented-control-item/customElement.js +1 -1
- package/dist/components/calcite-select/customElement.js +1 -1
- package/dist/components/calcite-sheet/customElement.js +1 -1
- package/dist/components/calcite-shell/customElement.js +1 -1
- package/dist/components/calcite-shell-center-row/customElement.js +1 -1
- package/dist/components/calcite-shell-panel/customElement.js +1 -1
- package/dist/components/calcite-slider/customElement.js +1 -1
- package/dist/components/calcite-sort-handle/customElement.js +1 -1
- package/dist/components/calcite-sortable-list/customElement.js +1 -1
- package/dist/components/calcite-split-button/customElement.js +1 -1
- package/dist/components/calcite-stack/customElement.js +1 -1
- package/dist/components/calcite-stepper/customElement.js +1 -1
- package/dist/components/calcite-stepper-item/customElement.js +1 -1
- package/dist/components/calcite-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 +1 -1
- package/dist/components/calcite-tab-title/customElement.js +1 -1
- package/dist/components/calcite-table/customElement.js +1 -1
- package/dist/components/calcite-table-cell/customElement.js +1 -1
- package/dist/components/calcite-table-header/customElement.js +1 -1
- package/dist/components/calcite-table-row/customElement.js +1 -1
- package/dist/components/calcite-tabs/customElement.js +1 -1
- package/dist/components/calcite-text-area/customElement.js +1 -1
- package/dist/components/calcite-tile/customElement.js +1 -1
- package/dist/components/calcite-tile-group/customElement.js +1 -1
- package/dist/components/calcite-tile-select/customElement.js +1 -1
- package/dist/components/calcite-tile-select-group/customElement.js +1 -1
- package/dist/components/calcite-time-picker/customElement.js +1 -1
- package/dist/components/calcite-tip/customElement.js +1 -1
- package/dist/components/calcite-tip-group/customElement.js +1 -1
- package/dist/components/calcite-tip-manager/customElement.js +1 -1
- package/dist/components/calcite-tooltip/customElement.js +1 -1
- package/dist/components/calcite-tree/customElement.js +1 -1
- package/dist/components/calcite-tree-item/customElement.d.ts +2 -0
- package/dist/components/calcite-tree-item/customElement.js +6 -1
- package/dist/docs/api.json +9 -1
- package/dist/docs/docs.json +15 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +12 -2
- package/dist/extras/vscode-data.json +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/loader.js +1 -1
- package/dist/types/lumina.d.ts +1 -0
- package/dist/types/preact.d.ts +1 -0
- package/dist/types/react.d.ts +1 -0
- package/dist/types/stencil.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v4.0.0-next.
|
|
4
|
-
import{c as p}from"./
|
|
3
|
+
v4.0.0-next.4 */
|
|
4
|
+
import{c as p}from"./2WFCA2D3.js";import{a as h}from"./DZRV43LK.js";import{D as d,E as c,H as i,Q as b,g as o,h as r}from"./BFCXWP2B.js";var l={container:"container",content:"content",scale:t=>`scale-${t}`},u={tabTitleId:t=>`calcite-tab-title-${t}`},f=o`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:none}:host,.container,.content{block-size:100%;inline-size:100%}:host([selected]),:host([selected]) .container{display:flex;flex-direction:column}.content{box-sizing:border-box;padding-block:var(--calcite-tab-content-space-y, var(--calcite-tab-content-block-padding, var(--calcite-internal-tab-content-space-y)))}.scale-s{--calcite-internal-tab-content-space-y: .25rem;font-size:var(--calcite-font-size-sm);line-height:1rem}.scale-m{--calcite-internal-tab-content-space-y: .5rem;font-size:var(--calcite-font-size);line-height:1rem}.scale-l{--calcite-internal-tab-content-space-y: .625rem;font-size:var(--calcite-font-size-md);line-height:1.25rem}.container{display:none;block-size:100%;inline-size:100%;overflow:auto;outline-color:transparent}.container:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([hidden]){display:none}[hidden]{display:none}`,n=class extends d{constructor(){super(),this.guid=u.tabTitleId(h()),this.scale="m",this.selected=!1,this.listenOn(document.body,"calciteInternalTabChange",this.internalTabChangeHandler)}static{this.properties={labeledBy:[16,{},{state:!0}],scale:1,selected:[7,{},{reflect:!0,type:Boolean}],tab:[3,{},{reflect:!0}]}}static{this.styles=f}async getTabIndex(){return Array.prototype.indexOf.call(p(this.el.parentElement.children).filter(e=>e.matches("calcite-tab")),this.el)}_updateAriaInfo(e=[],s=[]){this.labeledBy=s[e.indexOf(this.el.id)]||null}connectedCallback(){super.connectedCallback(),this.parentTabsEl=this.el.closest("calcite-tabs")}disconnectedCallback(){super.disconnectedCallback(),document.body?.dispatchEvent(new CustomEvent("calciteTabUnregister",{detail:this.el}))}internalTabChangeHandler(e){e.composedPath().find(a=>a.tagName==="CALCITE-TABS")===this.parentTabsEl&&(this.tab?this.selected=this.tab===e.detail.tab:this.getTabIndex().then(a=>{this.selected=a===e.detail.tab}),e.stopPropagation())}render(){let e=this.el.id||this.guid;return i(this.el,"aria-labelledby",this.labeledBy),i(this.el,"id",e),r`<div class=${c({[l.container]:!0,[l.scale(this.scale)]:!0})} role=tabpanel .tabIndex=${this.selected?0:-1}><section class=${c(l.content)}><slot></slot></section></div>`}};b("calcite-tab",n);export{n as Tab};
|
|
@@ -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
|
-
v4.0.0-next.
|
|
4
|
-
import{k as f}from"./
|
|
3
|
+
v4.0.0-next.4 */
|
|
4
|
+
import{k as f}from"./WEDVB7MQ.js";function m(t,n,e){if(!t)return;let r=t.getTime(),a=!(n instanceof Date)||r>=n.getTime(),o=!(e instanceof Date)||r<=e.getTime();return a&&o}function p(t,n,e){if(!(t instanceof Date))return null;let r=t.getTime(),a=n instanceof Date&&r<n.getTime(),o=e instanceof Date&&r>e.getTime();return a?n:o?e:t}function O(t,n=!1){if(t instanceof Date)return t;if(!t||typeof t!="string")return null;let e=t.split(/[: T-]/).map(parseFloat),r=new Date(e[0],(e[1]||1)-1,e[2]||1);if(r.setFullYear(e[0]),isNaN(r.getTime()))throw new Error(`Invalid ISO 8601 date: "${t}"`);return n?T(r):r}function w(t,n){if(!n)return null;let{separator:e}=n,r=y(t,n),{day:a,month:o}=r,s=M(r.year,n),i=new Date(s,o,a);i.setFullYear(s);let c=a>0,u=o>-1,l=!isNaN(i.getTime()),D=t.split(e).filter(d=>d).length>2,h=s.toString().length>0;return c&&u&&l&&D&&h?i:null}function M(t,n){return g(t,n,"read")}function I(t,n){return g(t,n,"write")}function g(t,n,e){if(n["default-calendar"]!=="buddhist")return t;let a=543*(e==="read"?-1:1);return t+a}function F(t,n){let{separator:e,unitOrder:r}=n,a=S(r),o=t.split(e).map(u=>f.delocalize(u)),s=o[a.indexOf("d")],i=o[a.indexOf("m")],c=o[a.indexOf("y")];return{day:s,month:i,year:c}}function x(t){if(t instanceof Date){let n=String(t.getMonth()+1).padStart(2,"0"),e=String(t.getDate()).padStart(2,"0");return`${String(t.getFullYear()).padStart(4,"0")}-${n}-${e}`}return""}function E(t){let n=t.split("-");return{day:n[2],month:n[1],year:n[0]}}function v(t,n){return t instanceof Date&&n instanceof Date&&t.getDate()===n.getDate()&&t.getMonth()===n.getMonth()&&t.getFullYear()===n.getFullYear()}function A(t){let n=t.getMonth(),e=new Date(t);return e.setMonth(n-1),n===e.getMonth()?new Date(t.getFullYear(),n,0):e}function C(t,n){let e=new Date(t);return e.setMonth(n),e}function L(t,n,e){let r=new Date(t);return r.setDate(1),m(r,n,e)?r:p(r,n,e)}function N(t){let n=t.getMonth(),e=new Date(t);return e.setMonth(n+1),(n+2)%7===e.getMonth()%7?new Date(t.getFullYear(),n+2,0):e}function y(t,n){let{day:e,month:r,year:a}=F(t,n);return{day:parseInt(e),month:parseInt(r)-1,year:parseInt(a)}}function S(t){let n=["d","m","y"],e=t.toLowerCase();return n.sort((r,a)=>e.indexOf(r)-e.indexOf(a))}function R(t,n){let e=t.getTime(),r=n.getTime();return(e-r)/(1e3*3600*24)}function T(t){return t.setHours(23,59,59,999),t}function _(t,n){return t&&n&&t.getMonth()===n.getMonth()&&t.getFullYear()===n.getFullYear()}export{m as a,p as b,O as c,w as d,M as e,I as f,F as g,x as h,E as i,v as j,A as k,C as l,L as m,N as n,S as o,R as p,_ as q};
|
|
@@ -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
|
-
v4.0.0-next.
|
|
3
|
+
v4.0.0-next.4 */
|
|
4
4
|
var t={container:"container",actionsStart:"actions-start",contentStart:"content-start",content:"content",contentEnd:"content-end",actionsEnd:"actions-end"},n={actionsStart:"actions-start",contentStart:"content-start",contentEnd:"content-end",actionsEnd:"actions-end"};export{t as a,n as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v4.0.0-next.
|
|
4
|
-
import{o as e}from"./
|
|
3
|
+
v4.0.0-next.4 */
|
|
4
|
+
import{o as e}from"./2WFCA2D3.js";import"./DZRV43LK.js";import{D as o,E as n,H as a,I as l,Q as r,g as c,h as i}from"./BFCXWP2B.js";var u={valid:"check-circle",invalid:"exclamation-mark-triangle",idle:"information"},d=c`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{box-sizing:border-box;display:flex;block-size:auto;inline-size:100%;align-items:center;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1);opacity:1;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;margin-block-start:var(--calcite-input-message-spacing, var(--calcite-input-message-spacing-value, var(--calcite-spacing-xxs)))}.calcite-input-message-icon{pointer-events:none;display:inline-flex;flex-shrink:0;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;margin-inline-end:var(--calcite-spacing-sm)}:host([status=invalid]) .calcite-input-message-icon{color:var(--calcite-input-message-icon-color, var(--calcite-icon-color, var(--calcite-color-status-danger)))}:host([status=valid]) .calcite-input-message-icon{color:var(--calcite-input-message-icon-color, var(--calcite-icon-color, var(--calcite-color-status-success)))}:host([status=idle]) .calcite-input-message-icon{color:var(--calcite-input-message-icon-color, var(--calcite-icon-color, var(--calcite-color-brand)))}:host([scale=s]){font-size:var(--calcite-font-size--3);line-height:.75rem}:host([scale=m]){font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=l]){font-size:var(--calcite-font-size--1);line-height:1rem}:host([hidden]){display:none}[hidden]{display:none}`,h={inputMessageIcon:"calcite-input-message-icon"},s=class extends o{constructor(){super(...arguments),this.iconFlipRtl=!1,this.scale="m",this.status="idle"}static{this.properties={icon:[3,{converter:l},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}]}}static{this.styles=d}connectedCallback(){super.connectedCallback(),this.requestedIcon=e(u,this.icon,this.status)}willUpdate(t){(t.has("status")&&(this.hasUpdated||this.status!=="idle")||t.has("icon"))&&(this.requestedIcon=e(u,this.icon,this.status))}render(){let t=this.el.hidden;return a(this.el,"calcite-hydrated-hidden",t),i`${this.renderIcon(this.requestedIcon)}<slot></slot>`}renderIcon(t){if(t)return i`<calcite-icon class=${n(h.inputMessageIcon)} .flipRtl=${this.iconFlipRtl} .icon=${t} scale=s></calcite-icon>`}};r("calcite-input-message",s);export{s as InputMessage};
|
|
@@ -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
|
-
v4.0.0-next.
|
|
4
|
-
import{a as b}from"./
|
|
3
|
+
v4.0.0-next.4 */
|
|
4
|
+
import{a as b}from"./N7E4DVIL.js";import"./J7ZWKGNU.js";import{a as x}from"./DZRV43LK.js";import{D as u,E as l,F as z,H as k,Q as y,g as h,h as r,i as p,l as f}from"./BFCXWP2B.js";var a={percentage:"percentage",progressRing:"ring--progress",ring:"ring",rings:"rings",text:"text",trackRing:"ring--track"},w=h`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{position:relative;margin-inline:auto;display:flex;align-items:center;justify-content:center;opacity:1;flex-direction:column;min-block-size:var(--calcite-loader-size);font-size:var(--calcite-loader-font-size);stroke-width:var(--calcite-internal-stroke-width);fill:none;transform:scale(1);padding-block:var(--calcite-loader-spacing, 4rem)}:host([scale=s]){--calcite-internal-stroke-width: 3;--calcite-internal-text-offset: var(--calcite-spacing-xxs);--calcite-internal-loader-font-size: var(--calcite-font-size--3);--calcite-internal-loader-size: 2rem;--calcite-internal-loader-size-inline: .75rem;--calcite-internal-loader-value-line-height: .625rem}:host([scale=m]){--calcite-internal-stroke-width: 6;--calcite-internal-text-offset: var(--calcite-spacing-sm);--calcite-internal-loader-font-size: var(--calcite-font-size-0);--calcite-internal-loader-size: 4rem;--calcite-internal-loader-size-inline: 1rem;--calcite-internal-loader-value-line-height: 1.375rem}:host([scale=l]){--calcite-internal-stroke-width: 8;--calcite-internal-text-offset: var(--calcite-spacing-md);--calcite-internal-loader-font-size: var(--calcite-font-size-2);--calcite-internal-loader-size: 6rem;--calcite-internal-loader-size-inline: 1.5rem;--calcite-internal-loader-value-line-height: 1.71875rem}.text{display:block;text-align:center;font-size:var(--calcite-font-size--2);line-height:1rem;margin-block-start:var(--calcite-loader-text-spacing, var(--calcite-internal-text-offset));font-weight:var(--calcite-loader-text-weight, var(--calcite-font-weight-normal));color:var(--calcite-loader-text-color, var(--calcite-color-text-1))}.percentage{display:block;text-align:center;font-size:var(--calcite-loader-font-size);inline-size:var(--calcite-loader-size, var(--calcite-internal-loader-size));line-height:var(--calcite-internal-loader-value-line-height);align-self:center;color:var(--calcite-loader-text-color, var(--calcite-color-text-1))}.rings{position:relative;display:flex;overflow:visible;opacity:1;inline-size:var(--calcite-loader-size, var(--calcite-internal-loader-size));block-size:var(--calcite-loader-size, var(--calcite-internal-loader-size))}.ring{position:absolute;inset-block-start:0px;transform-origin:center;overflow:visible;inset-inline-start:0;inline-size:var(--calcite-loader-size, var(--calcite-internal-loader-size));block-size:var(--calcite-loader-size, var(--calcite-internal-loader-size))}.ring--track{stroke:var(--calcite-loader-track-color, var(--calcite-color-transparent-press))}.ring--progress{stroke:var(--calcite-loader-progress-color, var(--calcite-color-brand));transform:rotate(-90deg);transition:all var(--calcite-internal-animation-timing-fast) linear}:host([type=indeterminate]) .ring--progress{animation:loader-clockwise calc(var(--calcite-internal-animation-timing-slow) / var(--calcite-internal-duration-factor) * 2 / var(--calcite-internal-duration-factor)) linear infinite}:host([inline]){--calcite-internal-stroke-width: 2;position:relative;margin:0;stroke:currentColor;stroke-width:2;padding-block:0px;block-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)));min-block-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)));inline-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)));vertical-align:calc(var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline))) * -1 * .2)}:host([inline]) .rings{inset-block-start:0px;margin:0;inset-inline-start:0;inline-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)));block-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)))}:host([inline]) .ring{inline-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)));block-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)))}:host([inline]) .ring--progress{stroke:var(--calcite-loader-progress-color-inline, currentColor)}:host([complete]){opacity:0;transform:scale(.75);transform-origin:center;transition:opacity var(--calcite-internal-animation-timing-medium) linear 1s,transform var(--calcite-internal-animation-timing-medium) linear 1s}:host([complete]) .rings{opacity:0;transform:scale(.75);transform-origin:center;transition:opacity calc(.18s * var(--calcite-internal-duration-factor)) linear .8s,transform calc(.18s * var(--calcite-internal-duration-factor)) linear .8s}:host([complete]) .percentage{color:var(--calcite-color-brand);transform:scale(1.05);transform-origin:center;transition:color var(--calcite-internal-animation-timing-medium) linear,transform var(--calcite-internal-animation-timing-medium) linear}@keyframes loader-clockwise{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host([hidden]){display:none}[hidden]{display:none}`,v=class extends u{constructor(){super(...arguments),this.messages=b({name:null}),this.complete=!1,this.inline=!1,this.scale="m",this.text="",this.type="indeterminate",this.value=0}static{this.properties={complete:[7,{},{reflect:!0,type:Boolean}],inline:[7,{},{reflect:!0,type:Boolean}],label:1,scale:[3,{},{reflect:!0}],text:1,type:[3,{},{reflect:!0}],value:[9,{},{type:Number}]}}static{this.styles=w}connectedCallback(){super.connectedCallback(),this.updateFormatter()}load(){requestAnimationFrame(()=>this.valueChangeHandler())}willUpdate(e){e.has("value")&&(this.hasUpdated||this.value!==0)&&this.valueChangeHandler(),(e.has("type")&&(this.hasUpdated||this.type!=="indeterminate")||e.has("messages"))&&this.updateFormatter()}valueChangeHandler(){this.complete=this.type.startsWith("determinate")&&this.value===100}formatValue(){return this.type!=="determinate-value"?`${this.value}`:this.formatter.format(this.value/100)}getSize(e){return{s:32,m:64,l:96}[e]}getInlineSize(e){return{s:12,m:16,l:24}[e]}updateFormatter(){this.type!=="determinate-value"||this.formatter?.resolvedOptions().locale===this.messages._lang||(this.formatter=new Intl.NumberFormat(this.messages._lang,{style:"percent"}))}render(){let{el:e,inline:n,label:c,text:s,type:i,value:m}=this,o=e.id||x(),t=i!=="indeterminate",d=Math.floor(m);return this.el.ariaLabel=c,this.el.ariaValueMax=t?"100":void 0,this.el.ariaValueMin=t?"0":void 0,this.el.ariaValueNow=t?d.toString():void 0,k(this.el,"id",o),this.el.role="progressbar",r`<div class=${l(a.rings)}>${this.renderRing("track")}${this.renderRing("progress")}${!n&&t&&r`<div class=${l(a.percentage)}>${this.formatValue()}</div>`||""}</div>${!n&&s&&r`<div class=${l(a.text)}>${s}</div>`||""}`}renderRing(e){let{inline:n,scale:c,value:s}=this,i=n?this.getInlineSize(c):this.getSize(c),o=i*.45,t;if(e==="progress"){let d=2*o*Math.PI,g=(this.type.startsWith("determinate")?s:24)/100*d,$=d-g;t={"stroke-dasharray":`${g} ${$}`}}return r`<svg aria-hidden=true class=${l({[a.ring]:!0,[a.trackRing]:e==="track",[a.progressRing]:e==="progress"})} style=${z(t)} viewBox=${`0 0 ${i} ${i}`}>${p`<circle cx=${i/2} cy=${i/2} r=${o??f} />`}</svg>`}};y("calcite-loader",v);export{v as Loader};
|
|
@@ -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
|
-
v4.0.0-next.
|
|
4
|
-
import{a as T}from"./
|
|
3
|
+
v4.0.0-next.4 */
|
|
4
|
+
import{a as T}from"./DZRV43LK.js";import{J as h}from"./BFCXWP2B.js";var P=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],b=P.join(","),I=typeof Element>"u",d=I?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,g=!I&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},v=function e(t,r){var n;r===void 0&&(r=!0);var a=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert"),o=a===""||a==="true",i=o||r&&t&&e(t.parentNode);return i},L=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},x=function(t,r,n){if(v(t))return[];var a=Array.prototype.slice.apply(t.querySelectorAll(b));return r&&d.call(t,b)&&a.unshift(t),a=a.filter(n),a},A=function e(t,r,n){for(var a=[],o=Array.from(t);o.length;){var i=o.shift();if(!v(i,!1))if(i.tagName==="SLOT"){var s=i.assignedElements(),l=s.length?s:i.children,u=e(l,!0,n);n.flatten?a.push.apply(a,u):a.push({scopeParent:i,candidates:u})}else{var f=d.call(i,b);f&&n.filter(i)&&(r||!t.includes(i))&&a.push(i);var c=i.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(i),B=!v(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(c&&B){var S=e(c===!0?i.children:c.children,!0,n);n.flatten?a.push.apply(a,S):a.push({scopeParent:i,candidates:S})}else o.unshift.apply(o,i.children)}}return a},R=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},F=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||L(t))&&!R(t)?0:t.tabIndex},q=function(t,r){var n=F(t);return n<0&&r&&!R(t)?0:n},W=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},O=function(t){return t.tagName==="INPUT"},$=function(t){return O(t)&&t.type==="hidden"},U=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return r},G=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},j=function(t){if(!t.name)return!0;var r=t.form||g(t),n=function(s){return r.querySelectorAll('input[type="radio"][name="'+s+'"]')},a;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")a=n(window.CSS.escape(t.name));else try{a=n(t.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var o=G(a,t.form);return!o||o===t},z=function(t){return O(t)&&t.type==="radio"},X=function(t){return z(t)&&!j(t)},H=function(t){var r,n=t&&g(t),a=(r=n)===null||r===void 0?void 0:r.host,o=!1;if(n&&n!==t){var i,s,l;for(o=!!((i=a)!==null&&i!==void 0&&(s=i.ownerDocument)!==null&&s!==void 0&&s.contains(a)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!o&&a;){var u,f,c;n=g(a),a=(u=n)===null||u===void 0?void 0:u.host,o=!!((f=a)!==null&&f!==void 0&&(c=f.ownerDocument)!==null&&c!==void 0&&c.contains(a))}}return o},w=function(t){var r=t.getBoundingClientRect(),n=r.width,a=r.height;return n===0&&a===0},V=function(t,r){var n=r.displayCheck,a=r.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var o=d.call(t,"details>summary:first-of-type"),i=o?t.parentElement:t;if(d.call(i,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof a=="function"){for(var s=t;t;){var l=t.parentElement,u=g(t);if(l&&!l.shadowRoot&&a(l)===!0)return w(t);t.assignedSlot?t=t.assignedSlot:!l&&u!==t.ownerDocument?t=u.host:t=l}t=s}if(H(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return w(t);return!1},Y=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n<r.children.length;n++){var a=r.children.item(n);if(a.tagName==="LEGEND")return d.call(r,"fieldset[disabled] *")?!0:!a.contains(t)}return!0}r=r.parentElement}return!1},y=function(t,r){return!(r.disabled||v(r)||$(r)||V(r,t)||U(r)||Y(r))},C=function(t,r){return!(X(r)||F(r)<0||!y(t,r))},Z=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},K=function e(t){var r=[],n=[];return t.forEach(function(a,o){var i=!!a.scopeParent,s=i?a.scopeParent:a,l=q(s,i),u=i?e(a.candidates):s;l===0?i?r.push.apply(r,u):r.push(s):n.push({documentOrder:o,tabIndex:l,item:a,isScope:i,content:u})}),n.sort(W).reduce(function(a,o){return o.isScope?a.push.apply(a,o.content):a.push(o.content),a},[]).concat(r)},J=function(t,r){r=r||{};var n;return r.getShadowRoot?n=A([t],r.includeContainer,{filter:C.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:Z}):n=x(t,r.includeContainer,C.bind(null,r)),K(n)},Q=function(t,r){r=r||{};var n;return r.getShadowRoot?n=A([t],r.includeContainer,{filter:y.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=x(t,r.includeContainer,y.bind(null,r)),n},D={getShadowRoot:!0};function bt(e){return e?e.id=e.id||`${e.tagName.toLowerCase()}-${T()}`:""}function yt(e){return Array.isArray(e)?e:Array.from(e)}function pt(e){let t=m(e,`.${h.darkMode}, .${h.lightMode}, .${h.autoMode}`);return t?.classList.contains("calcite-mode-dark")||t?.classList.contains("calcite-mode-auto")&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function mt(e){let n=m(e,"[dir]");return n?n.getAttribute("dir"):"ltr"}function St(e){return e?parseFloat(getComputedStyle(e).inlineSize):0}function p(e){return e.getRootNode()}function Tt(e){let t=p(e);return"host"in t?t:null}function wt(e,t){if(!e)return 0;let n=document.createElement("canvas").getContext("2d");return n.font=t,n.measureText(e).width}function M(e){return e.host||null}function _(e,{selector:t,id:r}){if(!e)return null;e.assignedSlot&&(e=e.assignedSlot);let n=p(e);return(r?"getElementById"in n?n.getElementById(r):null:t?n.querySelector(t):null)||_(M(n),{selector:t,id:r})}function m(e,t){return e?e.closest(t)||m(M(p(e)),t):null}function tt(e){return typeof e?.setFocus=="function"}async function et(e,t=!1,r="tabbable",n,a){return e?tt(e)&&n!==e?e.setFocus(a):(r==="tabbable"?nt:it)(e,t,a):void 0}function rt(e,t){if(e)return J(e,{...D,includeContainer:t})[0]??e}function nt(e,t,r){rt(e,t)?.focus(r)}function at(e,t){if(e)return Q(e,{...D,includeContainer:t})[0]??e}function it(e,t,r){at(e,t)?.focus(r)}function Ct(e,t){return Array.from(e.children).filter(r=>r.matches(t))}function ot(e,t){return e.filter(r=>r.matches(t))}function Et(e,t,r){if(typeof t=="string"&&t!=="")return t;if(t===""||t===!0)return e[r]}function Nt(e,t){return!(t.left>e.right||t.right<e.left||t.top>e.bottom||t.bottom<e.top)}function It(e){return(!!e).toString()}function xt(e){return ct(e)||st(e)}function ut(e){return lt(e).filter(t=>t.nodeType===Node.TEXT_NODE).map(t=>t.textContent).join("").trim()}function At(e){for(let t of e.childNodes)if(t.nodeType===Node.TEXT_NODE&&t.textContent?.trim()!==""||t.nodeType===Node.ELEMENT_NODE)return!0;return!1}function st(e){return!!ut(e)}function lt(e){return e.currentTarget.assignedNodes({flatten:!0})}function ct(e){return!!ft(e).length}function ft(e,t){return dt(e.currentTarget,t)}function dt(e,t){let r=e.assignedElements({flatten:!0});return t?ot(r,t):r}function Rt(e){return!!(e.isPrimary&&e.button===0)}function Ft(e){return e.detail===0}var Ot=(e,t,r,n=!0,a=!0,o=!1)=>{let i=e.indexOf(t),s=i===0,l=i===e.length-1;n&&(r=r==="previous"&&s?"last":r==="next"&&l?"first":r);let u;return r==="previous"?u=e[i-1]||e[n?e.length-1:i]:r==="next"?u=e[i+1]||e[n?0:i]:r==="last"?u=e[e.length-1]:u=e[0],et(u,a,"tabbable",o?u:void 0),u};function Dt(e,t){if(e.parentNode!==t.parentNode)return!1;let r=Array.from(e.parentNode.children);return r.indexOf(e)<r.indexOf(t)}async function Mt(e,t){return k(e,t,"animation")}async function kt(e,t){return k(e,t,"transition")}function E(e,t,r){let n=t==="transition"?"transitionProperty":"animationName";return e.getAnimations().find(a=>a[n]===r)}async function k(e,t,r){let n=E(e,r,t);if(n||(await ht(),n=E(e,r,t)),!!n)try{await n.finished}catch{}}function ht(){return new Promise(e=>requestAnimationFrame(()=>e()))}function Bt(e){return e.endsWith("px")?parseFloat(e):e.endsWith("vw")?N(parseFloat(e),window.innerWidth):e.endsWith("vh")?N(parseFloat(e),window.innerHeight):0}function N(e,t){return e*t/100}export{D as a,bt as b,yt as c,pt as d,mt as e,St as f,p as g,Tt as h,wt as i,_ as j,m as k,et as l,rt as m,Ct as n,Et as o,Nt as p,It as q,xt as r,At as s,ct as t,ft as u,dt as v,Rt as w,Ft as x,Ot as y,Dt as z,Mt as A,kt as B,Bt as C};
|
|
@@ -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
|
-
v4.0.0-next.
|
|
4
|
-
import{a as w,b as y}from"./ESUCT4DQ.js";import{a as C}from"./LGF2MB23.js";import"./PN2PH5AH.js";import"./33O55RS5.js";import"./J3MH3BGG.js";import{t as z}from"./JK6ZJR4Q.js";import"./VOLWNOYU.js";import{C as g,D as x,E as n,Q as k,g as m,h as i,o as p}from"./DG6EZXQ6.js";var t={container:"container",contentContainer:"content-container",contentContainerHasContent:"content-container--has-content",contentContainerHasOnlyContentTopAndBottom:"content-container--has-only-content-top-and-bottom",textContentContainer:"text-content-container",description:"description",heading:"heading",icon:"icon",interactive:"interactive",largeVisualDeprecated:"large-visual-deprecated",row:"row",selected:"selected",selectionIcon:"selection-icon",textContent:"text-content"},s={selectedMultiple:"check-square-f",selectedSingle:"circle-f",unselectedMultiple:"square",unselectedSingle:"circle"},d={contentBottom:"content-bottom",contentEnd:"content-end",contentStart:"content-start",contentTop:"content-top"},H=m`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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{box-shadow:var(--calcite-tile-shadow, var(--calcite-shadow-none));box-sizing:border-box;display:inline-block}calcite-link{--calcite-link-text-color: var(--calcite-tile-link-text-color)}.container{background-color:var(--calcite-tile-background-color, var(--calcite-color-foreground-1));block-size:var(--calcite-container-size-content-fluid);border-radius:var(--calcite-tile-corner-radius, var(--calcite-corner-radius));box-sizing:border-box;color:var(--calcite-tile-text-color, var(--calcite-color-text-3));inline-size:var(--calcite-container-size-content-fluid);outline:var(--calcite-border-width-sm, 1px) solid var(--calcite-tile-border-color, var(--calcite-color-border-2));padding:var(--calcite-internal-tile-spacing);position:relative;-webkit-user-select:none;user-select:none}.container .selection-icon{color:var(--calcite-tile-text-color, var(--calcite-color-text-3))}.container.interactive{cursor:pointer}.container.interactive:hover,.container.interactive:focus,.container.interactive.selected{outline-color:var(--calcite-tile-accent-color-press, var(--calcite-color-brand));z-index:var(--calcite-z-index)}.container.interactive:hover .selection-icon,.container.interactive:focus .selection-icon,.container.interactive.selected .selection-icon{color:var(--calcite-tile-accent-color-press, var(--calcite-color-brand))}.container.interactive:focus{box-shadow:inset 0 0 0 1px var(--calcite-tile-accent-color-press, var(--calcite-color-brand));z-index:calc(var(--calcite-z-index) + 1)}.content-container,.row{align-items:flex-start;display:flex}.content-container{flex-direction:column;word-wrap:break-word;word-break:break-word;inline-size:var(--calcite-container-size-content-fluid)}.text-content-container{inline-size:100%;outline-color:transparent;padding:0}.text-content{display:flex;flex-direction:column}.heading{color:var(--calcite-tile-heading-text-color, var(--calcite-color-text-2));font-weight:var(--calcite-font-weight-medium);line-height:1.20313rem;overflow-wrap:break-word}.description{font-weight:var(--calcite-font-weight-regular);overflow-wrap:break-word}.large-visual-deprecated{align-items:center;justify-content:center;min-block-size:12rem;text-align:center}.large-visual-deprecated .icon{align-self:center;block-size:64px;inline-size:64px}.large-visual-deprecated .selection-icon{position:absolute;inset-inline-start:var(--calcite-internal-tile-spacing);inset-block-start:var(--calcite-internal-tile-spacing);z-index:var(--calcite-z-index)}.large-visual-deprecated .text-content-container{justify-content:center}:host([alignment=center]) .icon{align-self:center}:host([alignment=center]) .text-content{text-align:center}:host([alignment=center]) slot[name=content-bottom]::slotted(*),:host([alignment=center]) slot[name=content-top]::slotted(*),:host([alignment=center]) slot[name=content-start]::slotted(*),:host([alignment=center]) slot[name=content-end]::slotted(*){align-self:center}:host([scale=s]){--calcite-internal-tile-spacing: var(--calcite-spacing-sm);max-inline-size:400px;min-inline-size:100px}:host([scale=s]) .heading{font-size:var(--calcite-font-size--2);line-height:1.03125rem}:host([scale=s]) .description{font-size:var(--calcite-font-size--3);line-height:.85938rem}:host([scale=m]){--calcite-internal-tile-spacing: var(--calcite-spacing-md);max-inline-size:460px;min-inline-size:140px}:host([scale=m]) .heading{font-size:var(--calcite-font-size--1);line-height:1.20313rem}:host([scale=m]) .description{font-size:var(--calcite-font-size--2);line-height:1.03125rem}:host([scale=l]){--calcite-internal-tile-spacing: var(--calcite-spacing-lg);max-inline-size:520px;min-inline-size:160px}:host([scale=l]) .heading{font-size:var(--calcite-font-size-0);line-height:1.375rem}:host([scale=l]) .description{font-size:var(--calcite-font-size--1);line-height:1.20313rem}.content-container--has-content,.row{gap:var(--calcite-internal-tile-spacing)}.content-container--has-only-content-top-and-bottom slot[name=content-top]::slotted(*){margin-block-end:var(--calcite-internal-tile-spacing)}:host([selection-appearance=border][layout=horizontal]) .container.selected:focus:before,:host([selection-appearance=border][layout=vertical]) .container.selected:focus:before{block-size:100%;box-shadow:inset 0 0 0 1px var(--calcite-tile-accent-color-press, var(--calcite-color-brand));content:"";display:block;inline-size:100%;inset-block-start:0;inset-inline-start:0;position:absolute}:host([selection-appearance=border][layout=horizontal]) .container.selected{box-shadow:inset 0 -4px 0 0 var(--calcite-tile-accent-color-press, var(--calcite-color-brand))}:host([selection-appearance=border][layout=vertical]) .container.selected{box-shadow:inset 4px 0 0 0 var(--calcite-tile-accent-color-press, var(--calcite-color-brand))}:host(:hover:not([disabled])) .heading,:host([active]:not([disabled])) .heading{color:var(--calcite-tile-heading-text-color, var(--calcite-color-text-1))}:host(:hover:not([disabled])) .description,:host([active]:not([disabled])) .description{color:var(--calcite-tile-text-color, var(--calcite-color-text-2))}:host([href]:focus:not([disabled])) .container,:host([href]:hover:not([disabled])) .container{outline-color:var(--calcite-tile-link-color, var(--calcite-color-text-link));z-index:var(--calcite-z-index)}:host([href]:focus:not([disabled])) .icon,:host([href]:hover:not([disabled])) .icon{color:var(--calcite-tile-link-color, var(--calcite-color-text-link))}:host([href]:focus:not([disabled])) .heading,:host([href]:hover:not([disabled])) .heading{color:var(--calcite-tile-link-color, var(--calcite-color-text-link))}:host([href]:active:not([disabled])) .container{box-shadow:inset 0 0 0 1px var(--calcite-tile-link-color, var(--calcite-color-text-link));outline-color:var(--calcite-tile-link-color, var(--calcite-color-text-link))}:host([embed]) .container{padding:0}:host([selection-mode=none]) .container:hover,:host([selection-mode=none]) .container.selected{outline-color:var(--calcite-tile-border-color, var(--calcite-color-border-2))}:host([selection-mode=none]) .container:focus{outline-color:var(--calcite-tile-accent-color-press, var(--calcite-color-brand))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}::slotted(*){max-inline-size:100%}`,v=class extends x{constructor(){super(),this.focusSetter=C()(this),this.hasContentBottom=!1,this.hasContentEnd=!1,this.hasContentStart=!1,this.hasContentTop=!1,this.active=!1,this.alignment="start",this.disabled=!1,this.embed=!1,this.iconFlipRtl=!1,this.interactive=!1,this.layout="horizontal",this.scale="m",this.selected=!1,this.selectionAppearance="icon",this.selectionMode="none",this.calciteInternalTileKeyEvent=p({cancelable:!1}),this.calciteTileSelect=p(),this.listen("keydown",this.keyDownHandler)}static{this.properties={hasContentBottom:[16,{},{state:!0}],hasContentEnd:[16,{},{state:!0}],hasContentStart:[16,{},{state:!0}],hasContentTop:[16,{},{state:!0}],active:[7,{},{reflect:!0,type:Boolean}],alignment:[3,{},{reflect:!0}],description:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],embed:[7,{},{reflect:!0,type:Boolean}],heading:[3,{},{reflect:!0}],href:[3,{},{reflect:!0}],icon:[3,{},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],interactive:[5,{},{type:Boolean}],label:1,layout:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],selectionAppearance:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}]}}static{this.styles=H}async setFocus(e){return this.focusSetter(()=>this.interactive?this.containerEl:void 0,e)}updated(){w(this)}clickHandler(){this.interactive&&(this.setFocus(),this.handleSelectEvent())}handleSelectEvent(){this.disabled||!this.interactive||this.selectionMode==="single-persist"&&this.selected===!0||this.calciteTileSelect.emit()}handleSlotChange(e){let c=e.target.dataset.name;this[`has${c}`]=z(e)}setContainerEl(e){this.containerEl=e}keyDownHandler(e){if(e.target===this.el)switch(e.key){case" ":case"Enter":this.handleSelectEvent(),e.preventDefault();break;case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"Home":case"End":this.calciteInternalTileKeyEvent.emit(e),e.preventDefault();break}}renderSelectionIcon(){let{selected:e,selectionAppearance:c,selectionMode:a}=this;if(c==="icon"&&a!=="none")return i`<calcite-icon class=${n(t.selectionIcon)} .icon=${e?a==="multiple"?s.selectedMultiple:s.selectedSingle:a==="multiple"?s.unselectedMultiple:s.unselectedSingle} scale=s></calcite-icon>`}renderTile(){let{description:e,disabled:c,hasContentBottom:a,hasContentEnd:$,hasContentStart:S,hasContentTop:E,heading:l,icon:r,iconFlipRtl:B,interactive:o,selectionMode:h}=this,T=l&&r&&!e,u=!!this.href||!o,f=h==="multiple"&&o?"checkbox":h!=="none"&&o?"radio":o?"button":void 0,b=!!(e||$||S||l||r),A=!b&&E&&a;return i`<div .ariaChecked=${h!=="none"&&o?this.selected:void 0} .ariaDisabled=${u?c:void 0} .ariaLabel=${f&&this.label} class=${n({[t.container]:!0,[t.interactive]:o,[t.largeVisualDeprecated]:T,[t.row]:!0,[t.selected]:this.selected})} @click=${this.clickHandler} .role=${f} tabindex=${u?void 0:0} ${g(this.setContainerEl)}>${this.renderSelectionIcon()}<div class=${n({[t.contentContainer]:!0,[t.contentContainerHasContent]:b,[t.contentContainerHasOnlyContentTopAndBottom]:A})}><slot name=${d.contentTop} @slotchange=${this.handleSlotChange}></slot>${r&&i`<calcite-icon class=${n(t.icon)} .flipRtl=${B} .icon=${r} scale=l></calcite-icon>`||""}<div class=${n({[t.textContentContainer]:!0,[t.row]:!0})}><slot name=${d.contentStart} @slotchange=${this.handleSlotChange}></slot><div class=${n(t.textContent)}>${l&&i`<div class=${n(t.heading)}>${l}</div>`||""}${e&&i`<div class=${n(t.description)}>${e}</div>`||""}</div><slot name=${d.contentEnd} @slotchange=${this.handleSlotChange}></slot></div><slot name=${d.contentBottom} @slotchange=${this.handleSlotChange}></slot></div></div>`}render(){let{disabled:e}=this;return y({disabled:e,children:this.href?i`<calcite-link .disabled=${e} .href=${this.href}>${this.renderTile()}</calcite-link>`:this.renderTile()})}};k("calcite-tile",v);export{v as Tile};
|
|
3
|
+
v4.0.0-next.4 */
|
|
4
|
+
import{a as w,b as y}from"./QZEMGVG2.js";import{a as C}from"./3RQLJCWI.js";import"./J7ZWKGNU.js";import"./N5KAJJWQ.js";import"./HN4627DU.js";import{t as z}from"./2WFCA2D3.js";import"./DZRV43LK.js";import{C as g,D as x,E as n,Q as k,g as m,h as i,o as p}from"./BFCXWP2B.js";var t={container:"container",contentContainer:"content-container",contentContainerHasContent:"content-container--has-content",contentContainerHasOnlyContentTopAndBottom:"content-container--has-only-content-top-and-bottom",textContentContainer:"text-content-container",description:"description",heading:"heading",icon:"icon",interactive:"interactive",largeVisualDeprecated:"large-visual-deprecated",row:"row",selected:"selected",selectionIcon:"selection-icon",textContent:"text-content"},s={selectedMultiple:"check-square-f",selectedSingle:"circle-f",unselectedMultiple:"square",unselectedSingle:"circle"},d={contentBottom:"content-bottom",contentEnd:"content-end",contentStart:"content-start",contentTop:"content-top"},H=m`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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{box-shadow:var(--calcite-tile-shadow, var(--calcite-shadow-none));box-sizing:border-box;display:inline-block}calcite-link{--calcite-link-text-color: var(--calcite-tile-link-text-color)}.container{background-color:var(--calcite-tile-background-color, var(--calcite-color-foreground-1));block-size:var(--calcite-container-size-content-fluid);border-radius:var(--calcite-tile-corner-radius, var(--calcite-corner-radius));box-sizing:border-box;color:var(--calcite-tile-text-color, var(--calcite-color-text-3));inline-size:var(--calcite-container-size-content-fluid);outline:var(--calcite-border-width-sm, 1px) solid var(--calcite-tile-border-color, var(--calcite-color-border-2));padding:var(--calcite-internal-tile-spacing);position:relative;-webkit-user-select:none;user-select:none}.container .selection-icon{color:var(--calcite-tile-text-color, var(--calcite-color-text-3))}.container.interactive{cursor:pointer}.container.interactive:hover,.container.interactive:focus,.container.interactive.selected{outline-color:var(--calcite-tile-accent-color-press, var(--calcite-color-brand));z-index:var(--calcite-z-index)}.container.interactive:hover .selection-icon,.container.interactive:focus .selection-icon,.container.interactive.selected .selection-icon{color:var(--calcite-tile-accent-color-press, var(--calcite-color-brand))}.container.interactive:focus{box-shadow:inset 0 0 0 1px var(--calcite-tile-accent-color-press, var(--calcite-color-brand));z-index:calc(var(--calcite-z-index) + 1)}.content-container,.row{align-items:flex-start;display:flex}.content-container{flex-direction:column;word-wrap:break-word;word-break:break-word;inline-size:var(--calcite-container-size-content-fluid)}.text-content-container{inline-size:100%;outline-color:transparent;padding:0}.text-content{display:flex;flex-direction:column}.heading{color:var(--calcite-tile-heading-text-color, var(--calcite-color-text-2));font-weight:var(--calcite-font-weight-medium);line-height:1.20313rem;overflow-wrap:break-word}.description{font-weight:var(--calcite-font-weight-regular);overflow-wrap:break-word}.large-visual-deprecated{align-items:center;justify-content:center;min-block-size:12rem;text-align:center}.large-visual-deprecated .icon{align-self:center;block-size:64px;inline-size:64px}.large-visual-deprecated .selection-icon{position:absolute;inset-inline-start:var(--calcite-internal-tile-spacing);inset-block-start:var(--calcite-internal-tile-spacing);z-index:var(--calcite-z-index)}.large-visual-deprecated .text-content-container{justify-content:center}:host([alignment=center]) .icon{align-self:center}:host([alignment=center]) .text-content{text-align:center}:host([alignment=center]) slot[name=content-bottom]::slotted(*),:host([alignment=center]) slot[name=content-top]::slotted(*),:host([alignment=center]) slot[name=content-start]::slotted(*),:host([alignment=center]) slot[name=content-end]::slotted(*){align-self:center}:host([scale=s]){--calcite-internal-tile-spacing: var(--calcite-spacing-sm);max-inline-size:400px;min-inline-size:100px}:host([scale=s]) .heading{font-size:var(--calcite-font-size--2);line-height:1.03125rem}:host([scale=s]) .description{font-size:var(--calcite-font-size--3);line-height:.85938rem}:host([scale=m]){--calcite-internal-tile-spacing: var(--calcite-spacing-md);max-inline-size:460px;min-inline-size:140px}:host([scale=m]) .heading{font-size:var(--calcite-font-size--1);line-height:1.20313rem}:host([scale=m]) .description{font-size:var(--calcite-font-size--2);line-height:1.03125rem}:host([scale=l]){--calcite-internal-tile-spacing: var(--calcite-spacing-lg);max-inline-size:520px;min-inline-size:160px}:host([scale=l]) .heading{font-size:var(--calcite-font-size-0);line-height:1.375rem}:host([scale=l]) .description{font-size:var(--calcite-font-size--1);line-height:1.20313rem}.content-container--has-content,.row{gap:var(--calcite-internal-tile-spacing)}.content-container--has-only-content-top-and-bottom slot[name=content-top]::slotted(*){margin-block-end:var(--calcite-internal-tile-spacing)}:host([selection-appearance=border][layout=horizontal]) .container.selected:focus:before,:host([selection-appearance=border][layout=vertical]) .container.selected:focus:before{block-size:100%;box-shadow:inset 0 0 0 1px var(--calcite-tile-accent-color-press, var(--calcite-color-brand));content:"";display:block;inline-size:100%;inset-block-start:0;inset-inline-start:0;position:absolute}:host([selection-appearance=border][layout=horizontal]) .container.selected{box-shadow:inset 0 -4px 0 0 var(--calcite-tile-accent-color-press, var(--calcite-color-brand))}:host([selection-appearance=border][layout=vertical]) .container.selected{box-shadow:inset 4px 0 0 0 var(--calcite-tile-accent-color-press, var(--calcite-color-brand))}:host(:hover:not([disabled])) .heading,:host([active]:not([disabled])) .heading{color:var(--calcite-tile-heading-text-color, var(--calcite-color-text-1))}:host(:hover:not([disabled])) .description,:host([active]:not([disabled])) .description{color:var(--calcite-tile-text-color, var(--calcite-color-text-2))}:host([href]:focus:not([disabled])) .container,:host([href]:hover:not([disabled])) .container{outline-color:var(--calcite-tile-link-color, var(--calcite-color-text-link));z-index:var(--calcite-z-index)}:host([href]:focus:not([disabled])) .icon,:host([href]:hover:not([disabled])) .icon{color:var(--calcite-tile-link-color, var(--calcite-color-text-link))}:host([href]:focus:not([disabled])) .heading,:host([href]:hover:not([disabled])) .heading{color:var(--calcite-tile-link-color, var(--calcite-color-text-link))}:host([href]:active:not([disabled])) .container{box-shadow:inset 0 0 0 1px var(--calcite-tile-link-color, var(--calcite-color-text-link));outline-color:var(--calcite-tile-link-color, var(--calcite-color-text-link))}:host([embed]) .container{padding:0}:host([selection-mode=none]) .container:hover,:host([selection-mode=none]) .container.selected{outline-color:var(--calcite-tile-border-color, var(--calcite-color-border-2))}:host([selection-mode=none]) .container:focus{outline-color:var(--calcite-tile-accent-color-press, var(--calcite-color-brand))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}::slotted(*){max-inline-size:100%}`,v=class extends x{constructor(){super(),this.focusSetter=C()(this),this.hasContentBottom=!1,this.hasContentEnd=!1,this.hasContentStart=!1,this.hasContentTop=!1,this.active=!1,this.alignment="start",this.disabled=!1,this.embed=!1,this.iconFlipRtl=!1,this.interactive=!1,this.layout="horizontal",this.scale="m",this.selected=!1,this.selectionAppearance="icon",this.selectionMode="none",this.calciteInternalTileKeyEvent=p({cancelable:!1}),this.calciteTileSelect=p(),this.listen("keydown",this.keyDownHandler)}static{this.properties={hasContentBottom:[16,{},{state:!0}],hasContentEnd:[16,{},{state:!0}],hasContentStart:[16,{},{state:!0}],hasContentTop:[16,{},{state:!0}],active:[7,{},{reflect:!0,type:Boolean}],alignment:[3,{},{reflect:!0}],description:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],embed:[7,{},{reflect:!0,type:Boolean}],heading:[3,{},{reflect:!0}],href:[3,{},{reflect:!0}],icon:[3,{},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],interactive:[5,{},{type:Boolean}],label:1,layout:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],selectionAppearance:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}]}}static{this.styles=H}async setFocus(e){return this.focusSetter(()=>this.interactive?this.containerEl:void 0,e)}updated(){w(this)}clickHandler(){this.interactive&&(this.setFocus(),this.handleSelectEvent())}handleSelectEvent(){this.disabled||!this.interactive||this.selectionMode==="single-persist"&&this.selected===!0||this.calciteTileSelect.emit()}handleSlotChange(e){let c=e.target.dataset.name;this[`has${c}`]=z(e)}setContainerEl(e){this.containerEl=e}keyDownHandler(e){if(e.target===this.el)switch(e.key){case" ":case"Enter":this.handleSelectEvent(),e.preventDefault();break;case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"Home":case"End":this.calciteInternalTileKeyEvent.emit(e),e.preventDefault();break}}renderSelectionIcon(){let{selected:e,selectionAppearance:c,selectionMode:a}=this;if(c==="icon"&&a!=="none")return i`<calcite-icon class=${n(t.selectionIcon)} .icon=${e?a==="multiple"?s.selectedMultiple:s.selectedSingle:a==="multiple"?s.unselectedMultiple:s.unselectedSingle} scale=s></calcite-icon>`}renderTile(){let{description:e,disabled:c,hasContentBottom:a,hasContentEnd:$,hasContentStart:S,hasContentTop:E,heading:l,icon:r,iconFlipRtl:B,interactive:o,selectionMode:h}=this,T=l&&r&&!e,u=!!this.href||!o,f=h==="multiple"&&o?"checkbox":h!=="none"&&o?"radio":o?"button":void 0,b=!!(e||$||S||l||r),A=!b&&E&&a;return i`<div .ariaChecked=${h!=="none"&&o?this.selected:void 0} .ariaDisabled=${u?c:void 0} .ariaLabel=${f&&this.label} class=${n({[t.container]:!0,[t.interactive]:o,[t.largeVisualDeprecated]:T,[t.row]:!0,[t.selected]:this.selected})} @click=${this.clickHandler} .role=${f} tabindex=${u?void 0:0} ${g(this.setContainerEl)}>${this.renderSelectionIcon()}<div class=${n({[t.contentContainer]:!0,[t.contentContainerHasContent]:b,[t.contentContainerHasOnlyContentTopAndBottom]:A})}><slot name=${d.contentTop} @slotchange=${this.handleSlotChange}></slot>${r&&i`<calcite-icon class=${n(t.icon)} .flipRtl=${B} .icon=${r} scale=l></calcite-icon>`||""}<div class=${n({[t.textContentContainer]:!0,[t.row]:!0})}><slot name=${d.contentStart} @slotchange=${this.handleSlotChange}></slot><div class=${n(t.textContent)}>${l&&i`<div class=${n(t.heading)}>${l}</div>`||""}${e&&i`<div class=${n(t.description)}>${e}</div>`||""}</div><slot name=${d.contentEnd} @slotchange=${this.handleSlotChange}></slot></div><slot name=${d.contentBottom} @slotchange=${this.handleSlotChange}></slot></div></div>`}render(){let{disabled:e}=this;return y({disabled:e,children:this.href?i`<calcite-link .disabled=${e} .href=${this.href}>${this.renderTile()}</calcite-link>`:this.renderTile()})}};k("calcite-tile",v);export{v as Tile};
|
|
@@ -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
|
-
v4.0.0-next.
|
|
4
|
-
import{a as l}from"./
|
|
3
|
+
v4.0.0-next.4 */
|
|
4
|
+
import{a as l}from"./J7ZWKGNU.js";import{d as a}from"./N5KAJJWQ.js";import{g as s,l as u}from"./2WFCA2D3.js";var L=()=>l((e,n)=>{let t;function r(){t?.abort()}return n.onLoad(()=>{e.listen("focus",()=>{t=new AbortController,e.el.addEventListener("focusout",r,{signal:t.signal})})}),n.onDisconnected(()=>{e.el.removeEventListener("focusout",r)}),async(c,d)=>{if(e.disabled)return;let o=m(c());if(!o)return;let{target:f,includeContainer:v,strategy:C}=o,i=s(e.el),g=i.activeElement;if(await a(e),!(g!==i.activeElement||t&&!t?.signal.aborted))return e.el.removeEventListener("focus",r),u(f,v,C,e.el,d)}});function b(e){return"target"in e&&("includeContainer"in e||"strategy"in e)}function m(e){if(e)return b(e)?e:{target:e}}export{L 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
|
-
v4.0.0-next.
|
|
4
|
-
import{a as t,b as S,c as m,d as c}from"./53PUYMUK.js";import{b as j}from"./MQ5IVRZ3.js";import{b as I}from"./7CNB556C.js";import"./BZGXJ63N.js";import{a as M,b as O}from"./ESUCT4DQ.js";import{a as p}from"./6EAMW3MS.js";import"./K7FDPOMV.js";import{a as E,b as B}from"./QW2DWWWA.js";import{a as N}from"./ZGVMZW7Z.js";import{c as R}from"./ZOLGAOVV.js";import{a as T}from"./LGF2MB23.js";import"./PN2PH5AH.js";import{a as P}from"./33O55RS5.js";import"./J3MH3BGG.js";import{t as r,u as x}from"./JK6ZJR4Q.js";import"./VOLWNOYU.js";import{B as w,C,D as z,E as o,Q as F,g as k,h as n,l as $,o as u}from"./DG6EZXQ6.js";var _=k`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;overflow:hidden;--calcite-min-header-height: calc(var(--calcite-icon-size) * 3);border-radius:var(--calcite-panel-corner-radius, var(--calcite-corner-radius-sharp))}slot[name=alerts]::slotted(calcite-alert){block-size:0}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.header{margin:0;display:flex;align-content:space-between;align-items:center;fill:var(--calcite-color-text-2);color:var(--calcite-color-text-2)}.heading{margin:0;padding:0;font-weight:var(--calcite-font-weight-medium)}.header .heading{flex:1 1 auto;padding:.5rem}:host([scale=s]){--calcite-internal-panel-default-space: var(--calcite-spacing-sm);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-sm-plus)}:host([scale=s]) .header-content .heading{font-size:var(--calcite-font-size--1)}:host([scale=s]) .header-content .description{font-size:var(--calcite-font-size--2)}:host([scale=s]) .header-content .icon{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]){--calcite-internal-panel-default-space: var(--calcite-spacing-md);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-md-plus)}:host([scale=m]) .header-content .heading{font-size:var(--calcite-font-size-0)}:host([scale=m]) .header-content .description{font-size:var(--calcite-font-size--1)}:host([scale=m]) .header-content .icon{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]){--calcite-internal-panel-default-space: var(--calcite-spacing-lg);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-xl)}:host([scale=l]) .header-content .heading{font-size:var(--calcite-font-size-1)}:host([scale=l]) .header-content .description{font-size:var(--calcite-font-size-0)}:host([scale=l]) .header-content .icon{margin-inline-end:var(--calcite-spacing-lg)}.content-top,.content-bottom{display:flex;align-items:flex-start;align-self:stretch;padding:var(--calcite-internal-panel-default-space);border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));background-color:var(--calcite-panel-background-color, var(--calcite-color-foreground-1))}.container{position:relative;margin:0;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;overflow:hidden;background-color:var(--calcite-color-background);padding:0;color:var(--calcite-color-text-2);transition:max-block-size var(--calcite-animation-timing),inline-size var(--calcite-animation-timing);box-sizing:border-box;font-size:var(--calcite-font-size--1)}.container *{box-sizing:border-box}.header{z-index:var(--calcite-z-index-header);display:flex;flex-direction:column;background-color:var(--calcite-panel-header-background-color, var(--calcite-color-foreground-1));border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-panel-header-border-block-end, var(--calcite-color-border-3)))}.header-container{display:flex;inline-size:100%;flex-direction:row;align-items:stretch;justify-content:flex-start;flex:0 0 auto}.header-container--border-end{border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3))}.action-bar-container{inline-size:100%}.action-bar-container ::slotted(calcite-action-bar){inline-size:100%}.header-content{display:flex;flex-direction:column;overflow:hidden;padding-inline:.75rem;padding-block:.875rem;margin-inline-end:auto;justify-content:center}.header-content .heading-text-content{flex:1 1 auto}.header-content .heading,.header-content .description{display:block;flex:none;overflow-wrap:break-word;padding:0;line-height:var(--calcite-font-line-height-relative-snug)}.header-content .heading{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-panel-heading-text-color, var(--calcite-color-text-1))}.header-content .heading:only-child{margin-block-end:0px}.header-content .description{color:var(--calcite-panel-description-text-color, var(--calcite-color-text-2))}#close,#collapse,.back-button,calcite-action-menu{--calcite-action-background-color: var(--calcite-panel-header-action-background-color);--calcite-action-background-color-hover: var(--calcite-panel-header-action-background-color-hover);--calcite-action-background-color-press: var(--calcite-panel-header-action-background-color-press);--calcite-action-text-color: var(--calcite-panel-header-action-text-color);--calcite-action-text-color-press: var(--calcite-panel-header-action-text-color-press)}.back-button{border-width:0px;border-style:solid;border-inline-end-width:1px;border-color:var(--calcite-panel-border-color, var(--calcite-color-border-3))}.header-actions{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:stretch}.header-actions--end{margin-inline-start:auto}.content-wrapper{position:relative;display:flex;block-size:100%;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;overflow:auto;color:var(--calcite-color-text-2);outline-color:transparent;padding:var(--calcite-panel-space, var(--calcite-panel-content-space, 0));background:var(--calcite-panel-background-color, var(--calcite-color-background))}.content-wrapper:focus-visible{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.header-content{flex:1 1 auto;justify-content:center;padding-block:var(--calcite-internal-panel-header-vertical-padding);padding-inline:var(--calcite-internal-panel-default-space)}.header-content.header--slotted-content{padding:var(--calcite-panel-header-content-space, var(--calcite-internal-panel-header-vertical-padding) var(--calcite-internal-panel-default-space))}.header-content.header--non-slotted-content{align-items:center;flex-direction:row}.footer{margin-block-start:auto;display:flex;flex-direction:row;align-content:space-between;align-items:center;justify-content:center;font-size:var(--calcite-font-size--2);line-height:1.375;border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));padding:var(--calcite-panel-footer-space, var(--calcite-panel-footer-padding, var(--calcite-internal-panel-default-space)));background-color:var(--calcite-panel-footer-background-color, var(--calcite-color-foreground-1))}.footer-content{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:center}.footer-actions{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:space-evenly;gap:var(--calcite-internal-panel-default-space)}.footer-start{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-start;margin-inline-end:auto;gap:var(--calcite-internal-panel-default-space)}.footer-end{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-end;margin-inline-start:auto;gap:var(--calcite-internal-panel-default-space)}.fab-container{position:sticky;inset-block-end:0px;z-index:var(--calcite-z-index-sticky);margin-block:0px;margin-inline:auto;display:block;padding:.5rem;inset-inline:0;inline-size:fit-content}calcite-icon{--calcite-icon-color: var(--calcite-panel-icon-color, var(--calcite-color-text-1))}:host([hidden]){display:none}[hidden]{display:none}`,y=class extends z{constructor(){super(),this.containerRef=w(),this.resizeObserver=E("resize",()=>this.resizeHandler()),this.messages=N(),this._closed=!1,this.focusSetter=T()(this),this.hasActionBar=!1,this.hasContentBottom=!1,this.hasContentTop=!1,this.hasEndActions=!1,this.hasFab=!1,this.hasFooterActions=!1,this.hasFooterContent=!1,this.hasFooterEndContent=!1,this.hasFooterStartContent=!1,this.hasHeaderContent=!1,this.hasMenuItems=!1,this.hasStartActions=!1,this.showHeaderContent=!1,this.closable=!1,this.collapseDirection="down",this.collapsed=!1,this.collapsible=!1,this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.menuOpen=!1,this.menuPlacement=j,this.overlayPositioning="absolute",this.scale="m",this.calcitePanelClose=u({cancelable:!0}),this.calcitePanelCollapse=u({cancelable:!1}),this.calcitePanelExpand=u({cancelable:!1}),this.calcitePanelScroll=u({cancelable:!1}),this.calcitePanelToggle=u({cancelable:!1}),this.listen("keydown",this.panelKeyDownHandler),this.listen("calcitePanelClose",this.panelCloseHandler)}static{this.properties={hasActionBar:[16,{},{state:!0}],hasContentBottom:[16,{},{state:!0}],hasContentTop:[16,{},{state:!0}],hasEndActions:[16,{},{state:!0}],hasFab:[16,{},{state:!0}],hasFooterActions:[16,{},{state:!0}],hasFooterContent:[16,{},{state:!0}],hasFooterEndContent:[16,{},{state:!0}],hasFooterStartContent:[16,{},{state:!0}],hasHeaderContent:[16,{},{state:!0}],hasMenuItems:[16,{},{state:!0}],hasStartActions:[16,{},{state:!0}],showHeaderContent:[16,{},{state:!0}],beforeClose:[0,{},{attribute:!1}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],collapseDirection:1,collapsed:[7,{},{reflect:!0,type:Boolean}],collapsible:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],icon:[3,{},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],loading:[7,{},{reflect:!0,type:Boolean}],menuFlipPlacements:[0,{},{attribute:!1}],menuOpen:[7,{},{reflect:!0,type:Boolean}],menuPlacement:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}]}}static{this.styles=_}get closed(){return this._closed}set closed(e){let a=this._closed;e!==a&&this.setClosedState(e)}async scrollContentTo(e){this.panelScrollEl?.scrollTo(e)}async setFocus(e){return this.focusSetter(()=>this.containerRef.value,e)}willUpdate(e){e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calcitePanelCollapse.emit():this.calcitePanelExpand.emit())}updated(){M(this)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}async setClosedState(e){if(this.beforeClose&&e)try{await this.beforeClose?.()}catch{return}this._closed=e}resizeHandler(){let{panelScrollEl:e}=this;if(!e||typeof e.scrollHeight!="number"||typeof e.offsetHeight!="number")return;e.scrollHeight>e.offsetHeight?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}closeClickHandler(){this.emitCloseEvent()}emitCloseEvent(){this.calcitePanelClose.emit()}panelKeyDownHandler(e){this.closable&&e.key==="Escape"&&!e.defaultPrevented&&(this.emitCloseEvent(),e.preventDefault())}panelCloseHandler(e){e.defaultPrevented||e.target!==this.el||(this.closed=!0)}collapse(){this.collapsed=!this.collapsed,this.calcitePanelToggle.emit()}panelScrollHandler(){this.calcitePanelScroll.emit()}handleHeaderActionsStartSlotChange(e){this.hasStartActions=r(e)}handleHeaderActionsEndSlotChange(e){this.hasEndActions=r(e)}handleHeaderMenuActionsSlotChange(e){this.hasMenuItems=r(e)}handleActionBarSlotChange(e){let a=x(e).filter(l=>l?.matches("calcite-action-bar"));a.forEach(l=>l.layout="horizontal"),this.hasActionBar=!!a.length}handleHeaderContentSlotChange(e){this.hasHeaderContent=r(e)}handleFabSlotChange(e){this.hasFab=r(e)}handleFooterActionsSlotChange(e){this.hasFooterActions=r(e)}handleFooterEndSlotChange(e){this.hasFooterEndContent=r(e)}handleFooterStartSlotChange(e){this.hasFooterStartContent=r(e)}handleFooterSlotChange(e){this.hasFooterContent=r(e)}contentBottomSlotChangeHandler(e){this.hasContentBottom=r(e)}contentTopSlotChangeHandler(e){this.hasContentTop=r(e)}setPanelScrollEl(e){B(this.resizeObserver,this.panelScrollEl,e),this.panelScrollEl=e}handleAlertsSlotChange(e){x(e)?.map(a=>{a.nodeName==="CALCITE-ALERT"&&(a.embedded=!0)})}renderHeaderContent(){let{heading:e,headingLevel:a,description:l,hasHeaderContent:i,icon:s,scale:g}=this,f=s?n`<calcite-icon class=${o(t.icon)} .flipRtl=${this.iconFlipRtl} .icon=${s} .scale=${P(g)}></calcite-icon>`:null,d=e?I({class:t.heading,level:a,children:e}):null,h=l?n`<span class=${o(t.description)}>${l}</span>`:null;return!i&&(d||h)?p("header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerNonSlottedContent]:!0})}>${f}<div class=${o(t.headingTextContent)}>${d}${h}</div></div>`):null}renderActionBar(){return n`<div class=${o(t.actionBarContainer)} .hidden=${!this.hasActionBar}><slot name=${c.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`}renderHeaderSlottedContent(){return p("slotted-header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerSlottedContent]:!0})} .hidden=${!this.hasHeaderContent}><slot name=${c.headerContent} @slotchange=${this.handleHeaderContentSlotChange}></slot></div>`)}renderHeaderStartActions(){let{hasStartActions:e}=this;return p("header-actions-start",n`<div class=${o({[t.headerActionsStart]:!0,[t.headerActions]:!0})} .hidden=${!e}><slot name=${c.headerActionsStart} @slotchange=${this.handleHeaderActionsStartSlotChange}></slot></div>`)}renderHeaderActionsEnd(){let{hasEndActions:e,messages:a,closable:l,collapsed:i,collapseDirection:s,collapsible:g,hasMenuItems:f}=this,{collapse:d,expand:h,close:v}=a,b=[m.expand,m.collapse];s==="up"&&b.reverse();let A=g?n`<calcite-action .aria=${{expanded:!i}} .icon=${i?b[0]:b[1]} id=${S.collapse} .label=${d} @click=${this.collapse} .scale=${this.scale} .text=${d} title=${(i?h:d)??$}></calcite-action>`:null,H=l?n`<calcite-action .ariaLabel=${v} .icon=${m.close} id=${S.close} @click=${this.closeClickHandler} .scale=${this.scale} .text=${v} title=${v??$}></calcite-action>`:null,L=n`<slot name=${c.headerActionsEnd} @slotchange=${this.handleHeaderActionsEndSlotChange}></slot>`,D=e||A||H||f;return p("header-actions-end",n`<div class=${o({[t.headerActionsEnd]:!0,[t.headerActions]:!0})} .hidden=${!D}>${L}${this.renderMenu()}${A}${H}</div>`)}renderMenu(){let{hasMenuItems:e,messages:a,menuOpen:l,menuFlipPlacements:i,menuPlacement:s}=this;return p("menu",n`<calcite-action-menu .flipPlacements=${i??["top","bottom"]} .hidden=${!e} .label=${a.options} .open=${l} .overlayPositioning=${this.overlayPositioning} .placement=${s}><calcite-action class=${o(t.menuAction)} .icon=${m.menu} .scale=${this.scale} slot=${R.trigger} .text=${a.options}></calcite-action><slot name=${c.headerMenuActions} @slotchange=${this.handleHeaderMenuActionsSlotChange}></slot></calcite-action-menu>`)}renderHeaderNode(){let{hasHeaderContent:e,hasStartActions:a,hasEndActions:l,closable:i,collapsible:s,hasMenuItems:g,hasActionBar:f}=this,d=this.renderHeaderContent(),h=e||!!d||a||l||s||i||g;return this.showHeaderContent=h,n`<header class=${o(t.header)} .hidden=${!(h||f)}><div class=${o({[t.headerContainer]:!0,[t.headerContainerBorderEnd]:f})} .hidden=${!h}>${this.renderHeaderStartActions()}${this.renderHeaderSlottedContent()}${d}${this.renderHeaderActionsEnd()}</div>${this.renderActionBar()}${this.renderContentTop()}</header>`}renderFooterNode(){let{hasFooterEndContent:e,hasFooterStartContent:a,hasFooterContent:l,hasFooterActions:i}=this,s=a||e||l||i;return n`<footer class=${o(t.footer)} .hidden=${!s}><div class=${o(t.footerContent)} .hidden=${!l}><slot name=${c.footer} @slotchange=${this.handleFooterSlotChange}></slot></div><div class=${o(t.footerStart)} .hidden=${l||!a}><slot name=${c.footerStart} @slotchange=${this.handleFooterStartSlotChange}></slot></div><div class=${o(t.footerEnd)} .hidden=${l||!e}><slot name=${c.footerEnd} @slotchange=${this.handleFooterEndSlotChange}></slot></div><div class=${o(t.footerActions)} .hidden=${l||!i}>${p("footer-actions-slot",n`<slot name=${c.footerActions} @slotchange=${this.handleFooterActionsSlotChange}></slot>`)}</div></footer>`}renderContent(){return n`<div class=${o(t.contentWrapper)} .hidden=${this.collapsible&&this.collapsed} @scroll=${this.panelScrollHandler} ${C(this.setPanelScrollEl)}><slot></slot>${this.renderFab()}</div>`}renderContentBottom(){return n`<div class=${o(t.contentBottom)} .hidden=${!this.hasContentBottom}><slot name=${c.contentBottom} @slotchange=${this.contentBottomSlotChangeHandler}></slot></div>`}renderContentTop(){return n`<div class=${o(t.contentTop)} .hidden=${!this.hasContentTop}><slot name=${c.contentTop} @slotchange=${this.contentTopSlotChangeHandler}></slot></div>`}renderFab(){return n`<div class=${o(t.fabContainer)} .hidden=${!this.hasFab}><slot name=${c.fab} @slotchange=${this.handleFabSlotChange}></slot></div>`}render(){let{disabled:e,loading:a,closed:l}=this,i=n`<article .ariaBusy=${a} class=${o(t.container)} .hidden=${l} ${C(this.containerRef)}>${this.renderHeaderNode()}${this.renderContent()}${this.renderContentBottom()}${this.renderFooterNode()}${p("alerts",n`<slot name=${c.alerts} @slotchange=${this.handleAlertsSlotChange}></slot>`)}</article>`;return O({disabled:e,children:n`${a?n`<calcite-scrim .loading=${a}></calcite-scrim>`:null}${i}`})}};F("calcite-panel",y);export{y as Panel};
|
|
3
|
+
v4.0.0-next.4 */
|
|
4
|
+
import{a as t,b as S,c as m,d as c}from"./YXDQJAP7.js";import{b as j}from"./AKCLZ5OX.js";import{b as I}from"./LEVVKKHK.js";import"./SI3ZRXDX.js";import{a as M,b as O}from"./QZEMGVG2.js";import{a as p}from"./M4W5D5YF.js";import"./FDIAU2TL.js";import{a as E,b as B}from"./TUUMAAED.js";import{a as N}from"./N7E4DVIL.js";import{c as R}from"./ZNKJ3RZ7.js";import{a as T}from"./3RQLJCWI.js";import"./J7ZWKGNU.js";import{a as P}from"./N5KAJJWQ.js";import"./HN4627DU.js";import{t as r,u as x}from"./2WFCA2D3.js";import"./DZRV43LK.js";import{B as w,C,D as z,E as o,Q as F,g as k,h as n,l as $,o as u}from"./BFCXWP2B.js";var _=k`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;overflow:hidden;--calcite-min-header-height: calc(var(--calcite-icon-size) * 3);border-radius:var(--calcite-panel-corner-radius, var(--calcite-corner-radius-sharp))}slot[name=alerts]::slotted(calcite-alert){block-size:0}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.header{margin:0;display:flex;align-content:space-between;align-items:center;fill:var(--calcite-color-text-2);color:var(--calcite-color-text-2)}.heading{margin:0;padding:0;font-weight:var(--calcite-font-weight-medium)}.header .heading{flex:1 1 auto;padding:.5rem}:host([scale=s]){--calcite-internal-panel-default-space: var(--calcite-spacing-sm);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-sm-plus)}:host([scale=s]) .header-content .heading{font-size:var(--calcite-font-size--1)}:host([scale=s]) .header-content .description{font-size:var(--calcite-font-size--2)}:host([scale=s]) .header-content .icon{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]){--calcite-internal-panel-default-space: var(--calcite-spacing-md);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-md-plus)}:host([scale=m]) .header-content .heading{font-size:var(--calcite-font-size-0)}:host([scale=m]) .header-content .description{font-size:var(--calcite-font-size--1)}:host([scale=m]) .header-content .icon{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]){--calcite-internal-panel-default-space: var(--calcite-spacing-lg);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-xl)}:host([scale=l]) .header-content .heading{font-size:var(--calcite-font-size-1)}:host([scale=l]) .header-content .description{font-size:var(--calcite-font-size-0)}:host([scale=l]) .header-content .icon{margin-inline-end:var(--calcite-spacing-lg)}.content-top,.content-bottom{display:flex;align-items:flex-start;align-self:stretch;padding:var(--calcite-internal-panel-default-space);border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));background-color:var(--calcite-panel-background-color, var(--calcite-color-foreground-1))}.container{position:relative;margin:0;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;overflow:hidden;background-color:var(--calcite-color-background);padding:0;color:var(--calcite-color-text-2);transition:max-block-size var(--calcite-animation-timing),inline-size var(--calcite-animation-timing);box-sizing:border-box;font-size:var(--calcite-font-size--1)}.container *{box-sizing:border-box}.header{z-index:var(--calcite-z-index-header);display:flex;flex-direction:column;background-color:var(--calcite-panel-header-background-color, var(--calcite-color-foreground-1));border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-panel-header-border-block-end, var(--calcite-color-border-3)))}.header-container{display:flex;inline-size:100%;flex-direction:row;align-items:stretch;justify-content:flex-start;flex:0 0 auto}.header-container--border-end{border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3))}.action-bar-container{inline-size:100%}.action-bar-container ::slotted(calcite-action-bar){inline-size:100%}.header-content{display:flex;flex-direction:column;overflow:hidden;padding-inline:.75rem;padding-block:.875rem;margin-inline-end:auto;justify-content:center}.header-content .heading-text-content{flex:1 1 auto}.header-content .heading,.header-content .description{display:block;flex:none;overflow-wrap:break-word;padding:0;line-height:var(--calcite-font-line-height-relative-snug)}.header-content .heading{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-panel-heading-text-color, var(--calcite-color-text-1))}.header-content .heading:only-child{margin-block-end:0px}.header-content .description{color:var(--calcite-panel-description-text-color, var(--calcite-color-text-2))}#close,#collapse,.back-button,calcite-action-menu{--calcite-action-background-color: var(--calcite-panel-header-action-background-color);--calcite-action-background-color-hover: var(--calcite-panel-header-action-background-color-hover);--calcite-action-background-color-press: var(--calcite-panel-header-action-background-color-press);--calcite-action-text-color: var(--calcite-panel-header-action-text-color);--calcite-action-text-color-press: var(--calcite-panel-header-action-text-color-press)}.back-button{border-width:0px;border-style:solid;border-inline-end-width:1px;border-color:var(--calcite-panel-border-color, var(--calcite-color-border-3))}.header-actions{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:stretch}.header-actions--end{margin-inline-start:auto}.content-wrapper{position:relative;display:flex;block-size:100%;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;overflow:auto;color:var(--calcite-color-text-2);outline-color:transparent;padding:var(--calcite-panel-space, var(--calcite-panel-content-space, 0));background:var(--calcite-panel-background-color, var(--calcite-color-background))}.content-wrapper:focus-visible{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.header-content{flex:1 1 auto;justify-content:center;padding-block:var(--calcite-internal-panel-header-vertical-padding);padding-inline:var(--calcite-internal-panel-default-space)}.header-content.header--slotted-content{padding:var(--calcite-panel-header-content-space, var(--calcite-internal-panel-header-vertical-padding) var(--calcite-internal-panel-default-space))}.header-content.header--non-slotted-content{align-items:center;flex-direction:row}.footer{margin-block-start:auto;display:flex;flex-direction:row;align-content:space-between;align-items:center;justify-content:center;font-size:var(--calcite-font-size--2);line-height:1.375;border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));padding:var(--calcite-panel-footer-space, var(--calcite-panel-footer-padding, var(--calcite-internal-panel-default-space)));background-color:var(--calcite-panel-footer-background-color, var(--calcite-color-foreground-1))}.footer-content{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:center}.footer-actions{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:space-evenly;gap:var(--calcite-internal-panel-default-space)}.footer-start{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-start;margin-inline-end:auto;gap:var(--calcite-internal-panel-default-space)}.footer-end{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-end;margin-inline-start:auto;gap:var(--calcite-internal-panel-default-space)}.fab-container{position:sticky;inset-block-end:0px;z-index:var(--calcite-z-index-sticky);margin-block:0px;margin-inline:auto;display:block;padding:.5rem;inset-inline:0;inline-size:fit-content}calcite-icon{--calcite-icon-color: var(--calcite-panel-icon-color, var(--calcite-color-text-1))}:host([hidden]){display:none}[hidden]{display:none}`,y=class extends z{constructor(){super(),this.containerRef=w(),this.resizeObserver=E("resize",()=>this.resizeHandler()),this.messages=N(),this._closed=!1,this.focusSetter=T()(this),this.hasActionBar=!1,this.hasContentBottom=!1,this.hasContentTop=!1,this.hasEndActions=!1,this.hasFab=!1,this.hasFooterActions=!1,this.hasFooterContent=!1,this.hasFooterEndContent=!1,this.hasFooterStartContent=!1,this.hasHeaderContent=!1,this.hasMenuItems=!1,this.hasStartActions=!1,this.showHeaderContent=!1,this.closable=!1,this.collapseDirection="down",this.collapsed=!1,this.collapsible=!1,this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.menuOpen=!1,this.menuPlacement=j,this.overlayPositioning="absolute",this.scale="m",this.calcitePanelClose=u({cancelable:!0}),this.calcitePanelCollapse=u({cancelable:!1}),this.calcitePanelExpand=u({cancelable:!1}),this.calcitePanelScroll=u({cancelable:!1}),this.calcitePanelToggle=u({cancelable:!1}),this.listen("keydown",this.panelKeyDownHandler),this.listen("calcitePanelClose",this.panelCloseHandler)}static{this.properties={hasActionBar:[16,{},{state:!0}],hasContentBottom:[16,{},{state:!0}],hasContentTop:[16,{},{state:!0}],hasEndActions:[16,{},{state:!0}],hasFab:[16,{},{state:!0}],hasFooterActions:[16,{},{state:!0}],hasFooterContent:[16,{},{state:!0}],hasFooterEndContent:[16,{},{state:!0}],hasFooterStartContent:[16,{},{state:!0}],hasHeaderContent:[16,{},{state:!0}],hasMenuItems:[16,{},{state:!0}],hasStartActions:[16,{},{state:!0}],showHeaderContent:[16,{},{state:!0}],beforeClose:[0,{},{attribute:!1}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],collapseDirection:1,collapsed:[7,{},{reflect:!0,type:Boolean}],collapsible:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],icon:[3,{},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],loading:[7,{},{reflect:!0,type:Boolean}],menuFlipPlacements:[0,{},{attribute:!1}],menuOpen:[7,{},{reflect:!0,type:Boolean}],menuPlacement:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}]}}static{this.styles=_}get closed(){return this._closed}set closed(e){let a=this._closed;e!==a&&this.setClosedState(e)}async scrollContentTo(e){this.panelScrollEl?.scrollTo(e)}async setFocus(e){return this.focusSetter(()=>this.containerRef.value,e)}willUpdate(e){e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calcitePanelCollapse.emit():this.calcitePanelExpand.emit())}updated(){M(this)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}async setClosedState(e){if(this.beforeClose&&e)try{await this.beforeClose?.()}catch{return}this._closed=e}resizeHandler(){let{panelScrollEl:e}=this;if(!e||typeof e.scrollHeight!="number"||typeof e.offsetHeight!="number")return;e.scrollHeight>e.offsetHeight?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}closeClickHandler(){this.emitCloseEvent()}emitCloseEvent(){this.calcitePanelClose.emit()}panelKeyDownHandler(e){this.closable&&e.key==="Escape"&&!e.defaultPrevented&&(this.emitCloseEvent(),e.preventDefault())}panelCloseHandler(e){e.defaultPrevented||e.target!==this.el||(this.closed=!0)}collapse(){this.collapsed=!this.collapsed,this.calcitePanelToggle.emit()}panelScrollHandler(){this.calcitePanelScroll.emit()}handleHeaderActionsStartSlotChange(e){this.hasStartActions=r(e)}handleHeaderActionsEndSlotChange(e){this.hasEndActions=r(e)}handleHeaderMenuActionsSlotChange(e){this.hasMenuItems=r(e)}handleActionBarSlotChange(e){let a=x(e).filter(l=>l?.matches("calcite-action-bar"));a.forEach(l=>l.layout="horizontal"),this.hasActionBar=!!a.length}handleHeaderContentSlotChange(e){this.hasHeaderContent=r(e)}handleFabSlotChange(e){this.hasFab=r(e)}handleFooterActionsSlotChange(e){this.hasFooterActions=r(e)}handleFooterEndSlotChange(e){this.hasFooterEndContent=r(e)}handleFooterStartSlotChange(e){this.hasFooterStartContent=r(e)}handleFooterSlotChange(e){this.hasFooterContent=r(e)}contentBottomSlotChangeHandler(e){this.hasContentBottom=r(e)}contentTopSlotChangeHandler(e){this.hasContentTop=r(e)}setPanelScrollEl(e){B(this.resizeObserver,this.panelScrollEl,e),this.panelScrollEl=e}handleAlertsSlotChange(e){x(e)?.map(a=>{a.nodeName==="CALCITE-ALERT"&&(a.embedded=!0)})}renderHeaderContent(){let{heading:e,headingLevel:a,description:l,hasHeaderContent:i,icon:s,scale:g}=this,f=s?n`<calcite-icon class=${o(t.icon)} .flipRtl=${this.iconFlipRtl} .icon=${s} .scale=${P(g)}></calcite-icon>`:null,d=e?I({class:t.heading,level:a,children:e}):null,h=l?n`<span class=${o(t.description)}>${l}</span>`:null;return!i&&(d||h)?p("header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerNonSlottedContent]:!0})}>${f}<div class=${o(t.headingTextContent)}>${d}${h}</div></div>`):null}renderActionBar(){return n`<div class=${o(t.actionBarContainer)} .hidden=${!this.hasActionBar}><slot name=${c.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`}renderHeaderSlottedContent(){return p("slotted-header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerSlottedContent]:!0})} .hidden=${!this.hasHeaderContent}><slot name=${c.headerContent} @slotchange=${this.handleHeaderContentSlotChange}></slot></div>`)}renderHeaderStartActions(){let{hasStartActions:e}=this;return p("header-actions-start",n`<div class=${o({[t.headerActionsStart]:!0,[t.headerActions]:!0})} .hidden=${!e}><slot name=${c.headerActionsStart} @slotchange=${this.handleHeaderActionsStartSlotChange}></slot></div>`)}renderHeaderActionsEnd(){let{hasEndActions:e,messages:a,closable:l,collapsed:i,collapseDirection:s,collapsible:g,hasMenuItems:f}=this,{collapse:d,expand:h,close:v}=a,b=[m.expand,m.collapse];s==="up"&&b.reverse();let A=g?n`<calcite-action .aria=${{expanded:!i}} .icon=${i?b[0]:b[1]} id=${S.collapse} .label=${d} @click=${this.collapse} .scale=${this.scale} .text=${d} title=${(i?h:d)??$}></calcite-action>`:null,H=l?n`<calcite-action .ariaLabel=${v} .icon=${m.close} id=${S.close} @click=${this.closeClickHandler} .scale=${this.scale} .text=${v} title=${v??$}></calcite-action>`:null,L=n`<slot name=${c.headerActionsEnd} @slotchange=${this.handleHeaderActionsEndSlotChange}></slot>`,D=e||A||H||f;return p("header-actions-end",n`<div class=${o({[t.headerActionsEnd]:!0,[t.headerActions]:!0})} .hidden=${!D}>${L}${this.renderMenu()}${A}${H}</div>`)}renderMenu(){let{hasMenuItems:e,messages:a,menuOpen:l,menuFlipPlacements:i,menuPlacement:s}=this;return p("menu",n`<calcite-action-menu .flipPlacements=${i??["top","bottom"]} .hidden=${!e} .label=${a.options} .open=${l} .overlayPositioning=${this.overlayPositioning} .placement=${s}><calcite-action class=${o(t.menuAction)} .icon=${m.menu} .scale=${this.scale} slot=${R.trigger} .text=${a.options}></calcite-action><slot name=${c.headerMenuActions} @slotchange=${this.handleHeaderMenuActionsSlotChange}></slot></calcite-action-menu>`)}renderHeaderNode(){let{hasHeaderContent:e,hasStartActions:a,hasEndActions:l,closable:i,collapsible:s,hasMenuItems:g,hasActionBar:f}=this,d=this.renderHeaderContent(),h=e||!!d||a||l||s||i||g;return this.showHeaderContent=h,n`<header class=${o(t.header)} .hidden=${!(h||f)}><div class=${o({[t.headerContainer]:!0,[t.headerContainerBorderEnd]:f})} .hidden=${!h}>${this.renderHeaderStartActions()}${this.renderHeaderSlottedContent()}${d}${this.renderHeaderActionsEnd()}</div>${this.renderActionBar()}${this.renderContentTop()}</header>`}renderFooterNode(){let{hasFooterEndContent:e,hasFooterStartContent:a,hasFooterContent:l,hasFooterActions:i}=this,s=a||e||l||i;return n`<footer class=${o(t.footer)} .hidden=${!s}><div class=${o(t.footerContent)} .hidden=${!l}><slot name=${c.footer} @slotchange=${this.handleFooterSlotChange}></slot></div><div class=${o(t.footerStart)} .hidden=${l||!a}><slot name=${c.footerStart} @slotchange=${this.handleFooterStartSlotChange}></slot></div><div class=${o(t.footerEnd)} .hidden=${l||!e}><slot name=${c.footerEnd} @slotchange=${this.handleFooterEndSlotChange}></slot></div><div class=${o(t.footerActions)} .hidden=${l||!i}>${p("footer-actions-slot",n`<slot name=${c.footerActions} @slotchange=${this.handleFooterActionsSlotChange}></slot>`)}</div></footer>`}renderContent(){return n`<div class=${o(t.contentWrapper)} .hidden=${this.collapsible&&this.collapsed} @scroll=${this.panelScrollHandler} ${C(this.setPanelScrollEl)}><slot></slot>${this.renderFab()}</div>`}renderContentBottom(){return n`<div class=${o(t.contentBottom)} .hidden=${!this.hasContentBottom}><slot name=${c.contentBottom} @slotchange=${this.contentBottomSlotChangeHandler}></slot></div>`}renderContentTop(){return n`<div class=${o(t.contentTop)} .hidden=${!this.hasContentTop}><slot name=${c.contentTop} @slotchange=${this.contentTopSlotChangeHandler}></slot></div>`}renderFab(){return n`<div class=${o(t.fabContainer)} .hidden=${!this.hasFab}><slot name=${c.fab} @slotchange=${this.handleFabSlotChange}></slot></div>`}render(){let{disabled:e,loading:a,closed:l}=this,i=n`<article .ariaBusy=${a} class=${o(t.container)} .hidden=${l} ${C(this.containerRef)}>${this.renderHeaderNode()}${this.renderContent()}${this.renderContentBottom()}${this.renderFooterNode()}${p("alerts",n`<slot name=${c.alerts} @slotchange=${this.handleAlertsSlotChange}></slot>`)}</article>`;return O({disabled:e,children:n`${a?n`<calcite-scrim .loading=${a}></calcite-scrim>`:null}${i}`})}};F("calcite-panel",y);export{y as Panel};
|
|
@@ -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
|
-
v4.0.0-next.
|
|
4
|
-
import{a as S,b as g}from"./
|
|
3
|
+
v4.0.0-next.4 */
|
|
4
|
+
import{a as S,b as g}from"./QZEMGVG2.js";import{a as f}from"./3RQLJCWI.js";import"./J7ZWKGNU.js";import"./N5KAJJWQ.js";import"./HN4627DU.js";import{u,y as i}from"./2WFCA2D3.js";import"./DZRV43LK.js";import{B as n,C as d,D as h,E as p,Q as m,g as l,h as o,o as r}from"./BFCXWP2B.js";var I={container:"container"},b=l`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex}.container{display:flex;flex-wrap:wrap;gap:var(--calcite-swatch-group-space, var(--calcite-spacing-sm))}:host([scale=s]) .container{gap:var(--calcite-swatch-group-space, var(--calcite-spacing-xs))}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,c=class extends h{constructor(){super(),this.items=[],this.slotRef=n(),this.focusSetter=f()(this),this.disabled=!1,this.scale="m",this.selectedItems=[],this.selectionMode="none",this.calciteSwatchGroupSelect=r({cancelable:!1}),this.listen("calciteInternalSwatchKeyEvent",this.calciteInternalSwatchKeyEventListener),this.listen("calciteSwatchSelect",this.calciteSwatchSelectListener),this.listen("calciteInternalSwatchSelect",this.calciteInternalSwatchSelectListener),this.listen("calciteInternalSyncSelectedSwatches",this.calciteInternalSyncSelectedSwatches)}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],label:1,scale:[3,{},{reflect:!0}],selectedItems:[0,{},{attribute:!1}],selectionMode:[3,{},{reflect:!0}]}}static{this.styles=b}async setFocus(e){return this.focusSetter(()=>this.el,e)}willUpdate(e){e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="none")&&this.updateItems()}updated(){S(this)}calciteInternalSwatchKeyEventListener(e){if(e.composedPath().includes(this.el)){let s=this.items?.filter(t=>!t.disabled);switch(e.detail.key){case"ArrowRight":i(s,e.detail.target,"next");break;case"ArrowLeft":i(s,e.detail.target,"previous");break;case"Home":i(s,e.detail.target,"first");break;case"End":i(s,e.detail.target,"last");break}}e.stopPropagation()}calciteSwatchSelectListener(e){e.composedPath().includes(this.el)&&this.setSelectedItems(!0,e.target),e.stopPropagation()}calciteInternalSwatchSelectListener(e){e.composedPath().includes(this.el)&&this.setSelectedItems(!1,e.target),e.stopPropagation()}calciteInternalSyncSelectedSwatches(e){e.composedPath().includes(this.el)&&(this.updateSelectedItems(),this.selectionMode==="single"&&this.selectedItems.length>1&&this.setSelectedItems(!1,e.target)),e.stopPropagation()}updateItems(e){let s=this.slotRef.value?.assignedElements({flatten:!0}).filter(t=>t?.matches("calcite-swatch"));this.items=e?u(e):s,!(this.items?.length<1)&&(this.items?.forEach(t=>{t.interactive=!0,t.scale=this.scale,t.selectionMode=this.selectionMode,t.parentSwatchGroup=this.el}),this.setSelectedItems(!1))}updateSelectedItems(){this.selectedItems=this.items?.filter(e=>e.selected)}setSelectedItems(e,s){s&&this.items?.forEach(t=>{let a=s===t;switch(this.selectionMode){case"multiple":a&&(t.selected=!t.selected);break;case"single":t.selected=a?!t.selected:!1;break;case"single-persist":t.selected=!!a;break}}),this.updateSelectedItems(),e&&this.calciteSwatchGroupSelect.emit()}render(){let e=this.selectionMode==="none"||this.selectionMode==="multiple"?"group":"radiogroup",{disabled:s}=this;return g({disabled:s,children:o`<div .ariaLabel=${this.label} class=${p(I.container)} .role=${e}><slot @slotchange=${this.updateItems} ${d(this.slotRef)}></slot></div>`})}};m("calcite-swatch-group",c);export{c as SwatchGroup};
|
|
@@ -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
|
-
v4.0.0-next.
|
|
4
|
-
import{a}from"./
|
|
3
|
+
v4.0.0-next.4 */
|
|
4
|
+
import{a}from"./5V4GYIRU.js";import{c as f,d as x,e as w}from"./NPQHSNJR.js";import{c as u,e as g,h as v}from"./DQQ3BZWX.js";import{a as m,b as p}from"./QZEMGVG2.js";import{a as k}from"./CCXVAFEC.js";import{a as b}from"./3RQLJCWI.js";import"./J7ZWKGNU.js";import"./N5KAJJWQ.js";import"./HN4627DU.js";import"./2WFCA2D3.js";import"./DZRV43LK.js";import{B as o,C as s,D as d,E as t,Q as h,g as n,h as l,o as r}from"./BFCXWP2B.js";var i={container:"container",track:"track",handle:"handle"},y=n`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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]) .container{block-size:.75rem}:host([scale=s]) .track{block-size:.75rem;inline-size:1.5rem}:host([scale=s]) .handle{block-size:.5rem;inline-size:.5rem}:host([scale=m]) .container{block-size:1rem}:host([scale=m]) .track{block-size:1rem;inline-size:2rem}:host([scale=m]) .handle{block-size:.75rem;inline-size:.75rem}:host([scale=l]) .container{block-size:1.5rem}:host([scale=l]) .track{block-size:1.5rem;inline-size:3rem}:host([scale=l]) .handle{block-size:1.25rem;inline-size:1.25rem}:host{position:relative;display:inline-block;inline-size:auto;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:middle;tap-highlight-color:transparent}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.container{outline-width:0px;display:flex}.track{pointer-events:none;position:relative;box-sizing:border-box;display:inline-block;vertical-align:top;outline-color:transparent;border-radius:var(--calcite-switch-corner-radius, 9999px);border-color:var(--calcite-switch-border-color);background-color:var(--calcite-switch-background-color, var(--calcite-color-border-input))}.container:focus .track{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.container:hover .track{background-color:var(--calcite-switch-background-color-hover, var(--calcite-color-text-3))}.handle{pointer-events:none;position:absolute;display:block;transition-property:all;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1);inset-block-start:var(--calcite-spacing-base);inset-inline:var(--calcite-spacing-base) auto;background-color:var(--calcite-switch-handle-background-color, var(--calcite-color-foreground-1));border-color:var(--calcite-switch-handle-border-color);border-radius:var(--calcite-switch-corner-radius, 9999px);box-shadow:var(--calcite-switch-handle-shadow)}:host([checked]) .track{background-color:var(--calcite-switch-background-color, var(--calcite-color-brand))}:host([checked]) .handle{inset-inline:auto var(--calcite-spacing-base)}:host([checked]):host(:hover:not([disabled])) .track{background-color:var(--calcite-switch-background-color-hover, var(--calcite-color-brand-hover))}@media (forced-colors: active){:host([checked]) .track{background-color:canvasText}}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`,c=class extends d{constructor(){super(),this.switchRef=o(),this.focusSetter=b()(this),this.checked=!1,this.disabled=!1,this.scale="m",this.calciteSwitchChange=r({cancelable:!1}),this.listen("click",this.clickHandler),this.listen("keydown",this.keyDownHandler)}static{this.properties={checked:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],label:1,labelTextEnd:1,labelTextStart:1,name:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],value:1}}static{this.styles=y}async setFocus(e){return this.focusSetter(()=>this.switchRef.value,e)}connectedCallback(){super.connectedCallback(),f(this),u(this)}updated(){m(this)}disconnectedCallback(){super.disconnectedCallback(),x(this),g(this)}syncHiddenFormInput(e){e.type="checkbox"}keyDownHandler(e){!this.disabled&&k(e.key)&&(this.toggle(),e.preventDefault())}onLabelClick(){this.disabled||(this.toggle(),this.setFocus())}toggle(){this.checked=!this.checked,this.calciteSwitchChange.emit()}clickHandler(){this.disabled||this.toggle()}render(){return p({disabled:this.disabled,children:l`<div .ariaChecked=${this.checked} .ariaLabel=${w(this)} class=${t(i.container)} role=switch tabindex=0 ${s(this.switchRef)}>${this.labelTextStart&&a({alignmentCenter:!0,bottomSpacingDisabled:!0,labelText:this.labelTextStart,spacingInlineEnd:!0})||""}<div class=${t(i.track)}><div class=${t(i.handle)}></div></div>${this.labelTextEnd&&a({alignmentCenter:!0,bottomSpacingDisabled:!0,labelText:this.labelTextEnd,spacingInlineStart:!0})||""}${v({component:this})}</div>`})}};h("calcite-switch",c);export{c as Switch};
|
|
@@ -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
|
-
v4.0.0-next.
|
|
4
|
-
import{a as l}from"./
|
|
3
|
+
v4.0.0-next.4 */
|
|
4
|
+
import{a as l}from"./M4W5D5YF.js";import{a as h}from"./HN4627DU.js";import{u as d}from"./2WFCA2D3.js";import"./DZRV43LK.js";import{D as n,E as a,Q as c,g as s,h as o}from"./BFCXWP2B.js";var p={actionBarContainer:"action-bar-container",content:"content"},m={actionBar:"action-bar"},f=s`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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{z-index:var(--calcite-z-index);display:flex;flex:1 1 auto;overflow:hidden;background-color:transparent}.content{margin:0;display:flex;block-size:100%;inline-size:100%;overflow:hidden;flex:1 0 0}.action-bar-container{display:flex}:host([detached]){margin-inline:.5rem;margin-block:.5rem 1.5rem}@keyframes in-up{0%{opacity:0;transform:translate3D(0,5px,0)}to{opacity:1;transform:translateZ(0)}}:host([detached]){animation:in-up var(--calcite-internal-animation-timing-slow) ease-in-out;border-radius:.25rem;border-width:0px;--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(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}:host([position=end]){align-self:flex-end}:host([position=start]){align-self:flex-start}:host([height-scale=s]){block-size:33.333333%}:host([height-scale=m]){block-size:70%}:host([height-scale=l]){block-size:100%}:host([height-scale=l][detached]){block-size:calc(100% - 2rem)}::slotted(calcite-panel){block-size:100%;inline-size:100%}::slotted(calcite-action-bar),::slotted(calcite-action-bar[position=end]){border-inline-end:1px solid;border-color:var(--calcite-color-border-3)}:host([hidden]){display:none}[hidden]{display:none}`,i=class extends n{constructor(){super(...arguments),this.detached=!1,this.heightScale="s",this.position="end"}static{this.properties={actionBar:[16,{},{state:!0}],detached:[7,{},{reflect:!0,type:Boolean}],heightScale:[3,{},{reflect:!0}],position:[3,{},{reflect:!0}]}}static{this.styles=f}load(){h.deprecated("component",{name:"shell-center-row",removalVersion:4,suggested:"shell-panel"})}loaded(){this.actionBar?.position==="end"&&this.requestUpdate()}handleActionBarSlotChange(t){this.actionBar=d(t).filter(e=>e.matches("calcite-action-bar"))[0]}render(){let{actionBar:t}=this,e=o`<div class=${a(p.content)}><slot></slot></div>`,r=[l("action-bar",o`<div class=${a(p.actionBarContainer)} .hidden=${!this.actionBar}><slot name=${m.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`),e];return t?.position==="end"&&r.reverse(),r}};c("calcite-shell-center-row",i);export{i as ShellCenterRow};
|
|
@@ -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
|
-
v4.0.0-next.
|
|
4
|
-
import{a as O,b as B,c as E}from"./TYXM2S4Y.js";import{a as x}from"./6EAMW3MS.js";import{a as u}from"./QW2DWWWA.js";import{a as k}from"./ZGVMZW7Z.js";import"./PN2PH5AH.js";import{e as S,n as g,y}from"./JK6ZJR4Q.js";import"./VOLWNOYU.js";import{C as w,D as m,E as b,J as I,Q as C,g as p,h as f,o as T}from"./DG6EZXQ6.js";var W={chevronRight:"chevron-right",chevronLeft:"chevron-left"},o={container:"container",containerHasEndTabTitleOverflow:"container--end-overflow",containerHasStartTabTitleOverflow:"container--start-overflow",scrollButton:"scroll-button",scrollButtonContainer:"scroll-button-container",scrollBackwardContainerButton:"scroll-button-container--backward",scrollForwardContainerButton:"scroll-button-container--forward",tabTitleSlotWrapper:"tab-titles-slot-wrapper",scale:h=>`scale-${h}`,position:h=>`position-${h}`},z=p`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{--calcite-internal-tab-nav-gradient-start-side: left;--calcite-internal-tab-nav-gradient-end-side: right;position:relative;display:flex}:host([bordered]):not([selected]) .container{background-color:var(--calcite-tab-background-color, var(--calcite-color-foreground-1))}:host([bordered]) calcite-button{--calcite-button-border-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}.calcite--rtl{--calcite-internal-tab-nav-gradient-start-side: right;--calcite-internal-tab-nav-gradient-end-side: left}.container--start-overflow .tab-titles-slot-wrapper{mask-image:linear-gradient(to var(--calcite-internal-tab-nav-gradient-end-side),transparent,transparent var(--calcite-internal-tab-nav-button-width),white var(--calcite-internal-tab-nav-button-width),white 51%)}.container--end-overflow .tab-titles-slot-wrapper{mask-image:linear-gradient(to var(--calcite-internal-tab-nav-gradient-start-side),transparent,transparent var(--calcite-internal-tab-nav-button-width),white var(--calcite-internal-tab-nav-button-width),white 51%)}.container--start-overflow.container--end-overflow .tab-titles-slot-wrapper{mask-image:linear-gradient(to var(--calcite-internal-tab-nav-gradient-end-side),transparent,transparent var(--calcite-internal-tab-nav-button-width),white var(--calcite-internal-tab-nav-button-width),white 51%,transparent 51%),linear-gradient(to var(--calcite-internal-tab-nav-gradient-start-side),transparent,transparent var(--calcite-internal-tab-nav-button-width),white var(--calcite-internal-tab-nav-button-width),white 51%,transparent 51%)}.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)}.container,.tab-titles-slot-wrapper{display:flex;inline-size:100%;justify-content:flex-start;overflow:hidden;white-space:nowrap}.scroll-button-container{position:absolute;inset-block:0px}.scroll-button-container 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 calcite-button:hover .scroll-button-container calcite-button:focus{--calcite-button-background-color: var(--calcite-color-transparent-hover)}.scroll-button-container calcite-button:active{--calcite-button-background-color: var(--calcite-color-transparent-press)}.scroll-button-container--forward{inset-inline-end:0;z-index:var(--calcite-z-index)}.scroll-button-container--backward{inset-inline-start:0;z-index:var(--calcite-z-index)}:host(:not([bordered])) .scroll-button-container--backward:before,:host(:not([bordered])) .scroll-button-container--forward:before{background-color:var(--calcite-tab-border-color, var(--calcite-color-border-1));opacity:.5;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}:host(:not([bordered])) .scroll-button-container--backward:before{inset-inline-end:0}:host(:not([bordered])) .scroll-button-container--forward:before{inset-inline-start:0}:host([hidden]){display:none}[hidden]{display:none}`,v=class extends m{constructor(){super(),this.effectiveDir="ltr",this.lastScrollWheelAxis="x",this.resizeObserver=u("resize",()=>{this.updateScrollingState()}),this.makeFirstVisibleTabClosable=!1,this.messages=k(),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=z}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=S(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 g(this.el,"calcite-tab-title:not([disabled])").filter(t=>!t.closed)}get scrollerButtonWidth(){let{scale:t}=this;return parseInt(t==="s"?O:t==="m"?B:E)}get tabTitles(){return g(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.effectiveDir==="ltr",a=this.tabTitleContainerEl,r=a.getBoundingClientRect(),l=t.getBoundingClientRect(),s=a.scrollLeft,n=i?this.hasOverflowingStartTabTitle:this.hasOverflowingEndTabTitle,c=i?this.hasOverflowingEndTabTitle:this.hasOverflowingStartTabTitle;if(l.left<r.left+(n?this.scrollerButtonWidth:0)){let d=s+(l.left-r.left)-this.scrollerButtonWidth;a.scrollTo({left:d,behavior:e})}else if(l.right>r.right-(c?this.scrollerButtonWidth:0)){let d=s+(l.right-r.right)+this.scrollerButtonWidth;a.scrollTo({left:d,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,a=Math.abs(e),r=Math.abs(i),l;a===r?l=this.lastScrollWheelAxis==="x"?e:i:a>r?(l=e,this.lastScrollWheelAxis="x"):(l=i,this.lastScrollWheelAxis="y");let s=(this.effectiveDir==="rtl"?-1:1)*l;t.currentTarget.scrollBy(s,0)}onSlotChange(){this.intersectionObserver?.disconnect();let t=this.tabTitles;t.forEach(a=>{this.intersectionObserver?.observe(a)});let e=this.getVisibleTabTitlesIndices(t);e.length>1&&this.makeFirstVisibleTabClosable&&(t[e[0]].closable=!0,this.makeFirstVisibleTabClosable=!1),this.calciteInternalTabNavSlotChange.emit(t)}storeTabTitleWrapperRef(t){t&&(this.tabTitleContainerEl=t,this.intersectionObserver=u("intersection",()=>this.updateScrollingState(),{root:t,threshold:[0,.5,1]}))}updateScrollingState(){let t=this.tabTitleContainerEl;if(!t)return;let e,i,a=t.scrollLeft,r=t.clientWidth,l=t.scrollWidth;this.effectiveDir==="ltr"?(e=a>0,i=a+r<l):(e=a<0,i=a!==-(l-r)),this.hasOverflowingStartTabTitle=e,this.hasOverflowingEndTabTitle=i}scrollToTabTitles(t){requestAnimationFrame(()=>{let e=this.tabTitleContainerEl,i=e.getBoundingClientRect(),a=Array.from(this.el.querySelectorAll("calcite-tab-title")),{effectiveDir:r}=this;t==="forward"&&a.reverse();let l=null;if(a.forEach(s=>{let n=s.getBoundingClientRect(),c=i.x+i.width,d=n.x+n.width;t==="forward"&&r==="ltr"||t==="backward"&&r==="rtl"?(n.x>c||d>c&&n.x>i.x)&&(l=s):(d<i.x||d<c&&n.x<i.x)&&(l=s)}),l){let{scrollerButtonWidth:s}=this,n=t==="forward"&&r==="ltr"||t==="backward"&&r==="rtl"?-s:l.offsetWidth-e.clientWidth+s,c=l.offsetLeft+n;e.scrollTo({left:c,behavior:"smooth"})}})}scrollToNextTabTitles(){this.scrollToTabTitles("forward")}scrollToPreviousTabTitles(){this.scrollToTabTitles("backward")}handleTabFocus(t,e,i){let a=y(this.enabledTabTitles,e,i);this.scrollTabTitleIntoView(a,"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,a)=>i.closed?e:[...e,a],[])}handleTabTitleClose(t){let{tabTitles:e}=this,i=t.selected,a=this.getVisibleTabTitlesIndices(e),r=a.length;if(r===1&&e[a[0]].closable)this.makeFirstVisibleTabClosable=!0,e[a[0]].closable=!1,this.selectedTabId=a[0],i&&e[a[0]].activateTab();else if(r>1){let l=e.findIndex(n=>n===t),s=a.find(n=>n>l);this.selectedTabId===l&&(this.selectedTabId=s||r-1,e[this.selectedTabId].activateTab())}requestAnimationFrame(()=>{e[this.selectedTabId].focus()})}render(){return this.el.role="tablist",f`<div class=${b({[o.container]:!0,[o.containerHasStartTabTitleOverflow]:!!this.hasOverflowingStartTabTitle,[o.containerHasEndTabTitleOverflow]:!!this.hasOverflowingEndTabTitle,[o.scale(this.scale)]:!0,[o.position(this.position)]:!0,[I.rtl]:this.effectiveDir==="rtl"})}>${this.renderScrollButton("start")}<div class=${b({[o.tabTitleSlotWrapper]:!0})} @scroll=${this.onTabTitleScroll} @wheel=${this.onTabTitleWheel} ${w(this.storeTabTitleWrapperRef)}><slot @slotchange=${this.onSlotChange}></slot></div>${this.renderScrollButton("end")}</div>`}renderScrollButton(t){let{bordered:e,messages:i,hasOverflowingStartTabTitle:a,hasOverflowingEndTabTitle:r,scale:l}=this,s=t==="end";return x(t,f`<div class=${b({[o.scrollButtonContainer]:!0,[o.scrollBackwardContainerButton]:!s,[o.scrollForwardContainerButton]:s})} .hidden=${s&&!r||!s&&!a}><calcite-button .appearance=${e?"outline-fill":"transparent"} .ariaLabel=${s?i.nextTabTitles:i.previousTabTitles} class=${b({[o.scrollButton]:!0})} icon-flip-rtl=both .iconStart=${s?W.chevronRight:W.chevronLeft} kind=neutral @click=${s?this.scrollToNextTabTitles:this.scrollToPreviousTabTitles} .scale=${l} tabindex=-1></calcite-button></div>`)}};C("calcite-tab-nav",v);export{v as TabNav};
|
|
3
|
+
v4.0.0-next.4 */
|
|
4
|
+
import{a as O,b as B,c as E}from"./ZLMLHCRA.js";import{a as x}from"./M4W5D5YF.js";import{a as u}from"./TUUMAAED.js";import{a as k}from"./N7E4DVIL.js";import"./J7ZWKGNU.js";import{e as S,n as g,y}from"./2WFCA2D3.js";import"./DZRV43LK.js";import{C as w,D as m,E as b,J as I,Q as C,g as p,h as f,o as T}from"./BFCXWP2B.js";var W={chevronRight:"chevron-right",chevronLeft:"chevron-left"},o={container:"container",containerHasEndTabTitleOverflow:"container--end-overflow",containerHasStartTabTitleOverflow:"container--start-overflow",scrollButton:"scroll-button",scrollButtonContainer:"scroll-button-container",scrollBackwardContainerButton:"scroll-button-container--backward",scrollForwardContainerButton:"scroll-button-container--forward",tabTitleSlotWrapper:"tab-titles-slot-wrapper",scale:h=>`scale-${h}`,position:h=>`position-${h}`},z=p`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{--calcite-internal-tab-nav-gradient-start-side: left;--calcite-internal-tab-nav-gradient-end-side: right;position:relative;display:flex}:host([bordered]):not([selected]) .container{background-color:var(--calcite-tab-background-color, var(--calcite-color-foreground-1))}:host([bordered]) calcite-button{--calcite-button-border-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}.calcite--rtl{--calcite-internal-tab-nav-gradient-start-side: right;--calcite-internal-tab-nav-gradient-end-side: left}.container--start-overflow .tab-titles-slot-wrapper{mask-image:linear-gradient(to var(--calcite-internal-tab-nav-gradient-end-side),transparent,transparent var(--calcite-internal-tab-nav-button-width),white var(--calcite-internal-tab-nav-button-width),white 51%)}.container--end-overflow .tab-titles-slot-wrapper{mask-image:linear-gradient(to var(--calcite-internal-tab-nav-gradient-start-side),transparent,transparent var(--calcite-internal-tab-nav-button-width),white var(--calcite-internal-tab-nav-button-width),white 51%)}.container--start-overflow.container--end-overflow .tab-titles-slot-wrapper{mask-image:linear-gradient(to var(--calcite-internal-tab-nav-gradient-end-side),transparent,transparent var(--calcite-internal-tab-nav-button-width),white var(--calcite-internal-tab-nav-button-width),white 51%,transparent 51%),linear-gradient(to var(--calcite-internal-tab-nav-gradient-start-side),transparent,transparent var(--calcite-internal-tab-nav-button-width),white var(--calcite-internal-tab-nav-button-width),white 51%,transparent 51%)}.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)}.container,.tab-titles-slot-wrapper{display:flex;inline-size:100%;justify-content:flex-start;overflow:hidden;white-space:nowrap}.scroll-button-container{position:absolute;inset-block:0px}.scroll-button-container 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 calcite-button:hover .scroll-button-container calcite-button:focus{--calcite-button-background-color: var(--calcite-color-transparent-hover)}.scroll-button-container calcite-button:active{--calcite-button-background-color: var(--calcite-color-transparent-press)}.scroll-button-container--forward{inset-inline-end:0;z-index:var(--calcite-z-index)}.scroll-button-container--backward{inset-inline-start:0;z-index:var(--calcite-z-index)}:host(:not([bordered])) .scroll-button-container--backward:before,:host(:not([bordered])) .scroll-button-container--forward:before{background-color:var(--calcite-tab-border-color, var(--calcite-color-border-1));opacity:.5;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}:host(:not([bordered])) .scroll-button-container--backward:before{inset-inline-end:0}:host(:not([bordered])) .scroll-button-container--forward:before{inset-inline-start:0}:host([hidden]){display:none}[hidden]{display:none}`,v=class extends m{constructor(){super(),this.effectiveDir="ltr",this.lastScrollWheelAxis="x",this.resizeObserver=u("resize",()=>{this.updateScrollingState()}),this.makeFirstVisibleTabClosable=!1,this.messages=k(),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=z}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=S(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 g(this.el,"calcite-tab-title:not([disabled])").filter(t=>!t.closed)}get scrollerButtonWidth(){let{scale:t}=this;return parseInt(t==="s"?O:t==="m"?B:E)}get tabTitles(){return g(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.effectiveDir==="ltr",a=this.tabTitleContainerEl,r=a.getBoundingClientRect(),l=t.getBoundingClientRect(),s=a.scrollLeft,n=i?this.hasOverflowingStartTabTitle:this.hasOverflowingEndTabTitle,c=i?this.hasOverflowingEndTabTitle:this.hasOverflowingStartTabTitle;if(l.left<r.left+(n?this.scrollerButtonWidth:0)){let d=s+(l.left-r.left)-this.scrollerButtonWidth;a.scrollTo({left:d,behavior:e})}else if(l.right>r.right-(c?this.scrollerButtonWidth:0)){let d=s+(l.right-r.right)+this.scrollerButtonWidth;a.scrollTo({left:d,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,a=Math.abs(e),r=Math.abs(i),l;a===r?l=this.lastScrollWheelAxis==="x"?e:i:a>r?(l=e,this.lastScrollWheelAxis="x"):(l=i,this.lastScrollWheelAxis="y");let s=(this.effectiveDir==="rtl"?-1:1)*l;t.currentTarget.scrollBy(s,0)}onSlotChange(){this.intersectionObserver?.disconnect();let t=this.tabTitles;t.forEach(a=>{this.intersectionObserver?.observe(a)});let e=this.getVisibleTabTitlesIndices(t);e.length>1&&this.makeFirstVisibleTabClosable&&(t[e[0]].closable=!0,this.makeFirstVisibleTabClosable=!1),this.calciteInternalTabNavSlotChange.emit(t)}storeTabTitleWrapperRef(t){t&&(this.tabTitleContainerEl=t,this.intersectionObserver=u("intersection",()=>this.updateScrollingState(),{root:t,threshold:[0,.5,1]}))}updateScrollingState(){let t=this.tabTitleContainerEl;if(!t)return;let e,i,a=t.scrollLeft,r=t.clientWidth,l=t.scrollWidth;this.effectiveDir==="ltr"?(e=a>0,i=a+r<l):(e=a<0,i=a!==-(l-r)),this.hasOverflowingStartTabTitle=e,this.hasOverflowingEndTabTitle=i}scrollToTabTitles(t){requestAnimationFrame(()=>{let e=this.tabTitleContainerEl,i=e.getBoundingClientRect(),a=Array.from(this.el.querySelectorAll("calcite-tab-title")),{effectiveDir:r}=this;t==="forward"&&a.reverse();let l=null;if(a.forEach(s=>{let n=s.getBoundingClientRect(),c=i.x+i.width,d=n.x+n.width;t==="forward"&&r==="ltr"||t==="backward"&&r==="rtl"?(n.x>c||d>c&&n.x>i.x)&&(l=s):(d<i.x||d<c&&n.x<i.x)&&(l=s)}),l){let{scrollerButtonWidth:s}=this,n=t==="forward"&&r==="ltr"||t==="backward"&&r==="rtl"?-s:l.offsetWidth-e.clientWidth+s,c=l.offsetLeft+n;e.scrollTo({left:c,behavior:"smooth"})}})}scrollToNextTabTitles(){this.scrollToTabTitles("forward")}scrollToPreviousTabTitles(){this.scrollToTabTitles("backward")}handleTabFocus(t,e,i){let a=y(this.enabledTabTitles,e,i);this.scrollTabTitleIntoView(a,"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,a)=>i.closed?e:[...e,a],[])}handleTabTitleClose(t){let{tabTitles:e}=this,i=t.selected,a=this.getVisibleTabTitlesIndices(e),r=a.length;if(r===1&&e[a[0]].closable)this.makeFirstVisibleTabClosable=!0,e[a[0]].closable=!1,this.selectedTabId=a[0],i&&e[a[0]].activateTab();else if(r>1){let l=e.findIndex(n=>n===t),s=a.find(n=>n>l);this.selectedTabId===l&&(this.selectedTabId=s||r-1,e[this.selectedTabId].activateTab())}requestAnimationFrame(()=>{e[this.selectedTabId].focus()})}render(){return this.el.role="tablist",f`<div class=${b({[o.container]:!0,[o.containerHasStartTabTitleOverflow]:!!this.hasOverflowingStartTabTitle,[o.containerHasEndTabTitleOverflow]:!!this.hasOverflowingEndTabTitle,[o.scale(this.scale)]:!0,[o.position(this.position)]:!0,[I.rtl]:this.effectiveDir==="rtl"})}>${this.renderScrollButton("start")}<div class=${b({[o.tabTitleSlotWrapper]:!0})} @scroll=${this.onTabTitleScroll} @wheel=${this.onTabTitleWheel} ${w(this.storeTabTitleWrapperRef)}><slot @slotchange=${this.onSlotChange}></slot></div>${this.renderScrollButton("end")}</div>`}renderScrollButton(t){let{bordered:e,messages:i,hasOverflowingStartTabTitle:a,hasOverflowingEndTabTitle:r,scale:l}=this,s=t==="end";return x(t,f`<div class=${b({[o.scrollButtonContainer]:!0,[o.scrollBackwardContainerButton]:!s,[o.scrollForwardContainerButton]:s})} .hidden=${s&&!r||!s&&!a}><calcite-button .appearance=${e?"outline-fill":"transparent"} .ariaLabel=${s?i.nextTabTitles:i.previousTabTitles} class=${b({[o.scrollButton]:!0})} icon-flip-rtl=both .iconStart=${s?W.chevronRight:W.chevronLeft} kind=neutral @click=${s?this.scrollToNextTabTitles:this.scrollToPreviousTabTitles} .scale=${l} tabindex=-1></calcite-button></div>`)}};C("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
|
-
v4.0.0-next.
|
|
4
|
-
import{a as O,b as D,d as P}from"./YHE5JK3Y.js";import{a as F,b as H}from"./ESUCT4DQ.js";import{a as p}from"./6EAMW3MS.js";import{a as I}from"./QW2DWWWA.js";import{a as R}from"./ZGVMZW7Z.js";import{a as L}from"./LGF2MB23.js";import"./PN2PH5AH.js";import{a as S}from"./33O55RS5.js";import"./J3MH3BGG.js";import"./JK6ZJR4Q.js";import{a as T}from"./VOLWNOYU.js";import{B as E,C as b,D as z,E as n,G as h,Q as B,g as C,h as e}from"./DG6EZXQ6.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"},j="calcite-action",V={button:s=>`${j}-${s}-button`,indicator:s=>`${j}-${s}-indicator`},W={tooltip:"tooltip"},q=C`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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{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)) var(--calcite-action-corner-radius-start-end, var(--calcite-corner-radius)) var(--calcite-action-corner-radius-end-end, var(--calcite-corner-radius)) var(--calcite-action-corner-radius-end-start, var(--calcite-corner-radius)))}.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{border-radius:inherit;position:relative;margin:0;display:flex;inline-size:auto;align-items:center;justify-content:flex-start;border-style:none;font-family:var(--calcite-font-family);font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-medium);outline-color:transparent;background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-1));color:var(--calcite-action-text-color, var(--calcite-internal-action-text-color));text-align:unset;flex:1 0 auto;cursor:inherit}.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:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);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)))}.icon-container{pointer-events:none;margin:0;display:flex;align-items:center;justify-content:center;min-inline-size:1rem;min-block-size:1.5rem}.text-container{margin:0;inline-size:0px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.5rem;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([active-descendant]) .button{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([scale=s]) .button{font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-normal);padding-inline:var(--calcite-internal-action-padding-inline, .5rem);padding-block:var(--calcite-internal-action-padding-block, var(--calcite-spacing-xxs))}:host([scale=s]) .button--text-visible .icon-container{margin-inline-end:.5rem}:host([scale=m]) .button{font-size:var(--calcite-font-size--1);line-height:1rem;font-weight:var(--calcite-font-weight-normal);padding-inline:var(--calcite-internal-action-padding-inline, 1rem);padding-block:var(--calcite-internal-action-padding-block, var(--calcite-spacing-md))}:host([scale=m]) .button--text-visible .icon-container{margin-inline-end:.75rem}:host([scale=l]) .button{font-size:var(--calcite-font-size-0);line-height:1.25rem;font-weight:var(--calcite-font-weight-normal);padding-inline:var(--calcite-internal-action-padding-inline, 1.25rem);padding-block:var(--calcite-internal-action-padding-block, var(--calcite-spacing-xl))}:host([scale=l]) .button--text-visible .icon-container{margin-inline-end:1rem}: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}.button--text-visible{inline-size:100%}.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))}.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))}.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}`,x=class extends z{constructor(){super(...arguments),this.guid=T(),this.buttonRef=E(),this.buttonId=V.button(this.guid),this.mutationObserver=I("mutation",()=>this.requestUpdate()),this.messages=R({blocking:!0}),this.focusSetter=L()(this),this.active=!1,this.activeDescendant=!1,this.appearance="solid",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,{},{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}]}}static{this.styles=q}async setFocus(t){return this.focusSetter(()=>this.buttonRef.value,t)}connectedCallback(){super.connectedCallback(),this.formEl=P(this),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}updated(){F(this)}disconnectedCallback(){super.disconnectedCallback(),this.formEl=null,this.mutationObserver?.disconnect()}handleClick(){let{type:t}=this;t==="submit"?O(this):t==="reset"&&D(this)}handleTooltipSlotChange(t){let o=t.target.assignedElements({flatten:!0}).filter(r=>r?.matches("calcite-tooltip"))[0];o&&(o.referenceElement=this.buttonRef.value)}storeIndicatorEl(t){this.indicatorEl=t}renderTextContainer(){let{text:t,textEnabled:a}=this,o={[i.textContainer]:!0,[i.textContainerVisible]:a};return t?p("text-container",e`<div class=${n(o)}>${t}</div>`):null}renderIndicatorText(){let{indicator:t,messages:a,buttonId:o}=this;return e`<div aria-labelledby=${o??h} aria-live=polite class=${n(i.indicatorText)} role=region ${b(this.storeIndicatorEl)}>${t?a.indicator:null}</div>`}renderIconContainer(){let{loading:t,icon:a,scale:o,el:r,iconFlipRtl:v,indicator:f}=this,m=o==="l"?"l":"m",c=t?e`<calcite-loader inline .label=${this.messages.loading} .scale=${m}></calcite-loader>`:null,d=a?e`<calcite-icon class=${n({[i.indicatorWithIcon]:f})} .flipRtl=${v} .icon=${a} .scale=${S(this.scale)}></calcite-icon>`:null,l=c||d,g=l||r.children?.length,u=e`<div class=${n({[i.slotContainer]:!0,[i.slotContainerHidden]:t})}><slot></slot></div>`;return g?p("icon-container",e`<div aria-hidden=true class=${n(i.iconContainer)}>${l}${u}</div>`):null}renderButton(){let{compact:t,disabled:a,icon:o,loading:r,textEnabled:v,label:f,text:m,indicator:c,indicatorEl:d,buttonId:l,messages:g}=this,u=f||m||"",y=c?g.indicatorLabel.replace("{label}",u):u,$={[i.button]:!0,[i.buttonTextVisible]:v,[i.buttonCompact]:t},k=e`${this.renderIconContainer()}${this.renderTextContainer()}${!o&&c&&p("indicator-no-icon",e`<div class=${n(i.indicatorWithoutIcon)}></div>`)||""}`,N=c&&d?[d]:[],w=[...this.aria?.controlsElements??[],...N];return this.dragHandle?e`<span .ariaBusy=${r} .ariaControlsElements=${w} .ariaDescribedByElements=${this.aria?.describedByElements} .ariaExpanded=${this.aria?.expanded} .ariaHasPopup=${this.aria?.hasPopup} .ariaLabel=${y} .ariaLabelledByElements=${this.aria?.labelledByElements} .ariaOwnsElements=${this.aria?.ownsElements} .ariaPressed=${this.aria?.pressed} class=${n($)} id=${l??h} role=button tabindex=${this.disabled?null:0} ${b(this.buttonRef)}>${k}</span>`:e`<button .ariaBusy=${r} .ariaControlsElements=${w} .ariaDescribedByElements=${this.aria?.describedByElements} .ariaExpanded=${this.aria?.expanded} .ariaHasPopup=${this.aria?.hasPopup} .ariaLabel=${y} .ariaLabelledByElements=${this.aria?.labelledByElements} .ariaOwnsElements=${this.aria?.ownsElements} .ariaPressed=${this.aria?.pressed} class=${n($)} .disabled=${a} id=${l??h} @click=${this.handleClick} ${b(this.buttonRef)}>${k}</button>`}render(){return H({disabled:this.disabled,children:e`${this.renderButton()}<slot name=${W.tooltip} @slotchange=${this.handleTooltipSlotChange}></slot>${this.renderIndicatorText()}`})}};B("calcite-action",x);export{x as Action};
|
|
3
|
+
v4.0.0-next.4 */
|
|
4
|
+
import{a as O,b as D,d as P}from"./DQQ3BZWX.js";import{a as F,b as H}from"./QZEMGVG2.js";import{a as p}from"./M4W5D5YF.js";import{a as I}from"./TUUMAAED.js";import{a as R}from"./N7E4DVIL.js";import{a as L}from"./3RQLJCWI.js";import"./J7ZWKGNU.js";import{a as S}from"./N5KAJJWQ.js";import"./HN4627DU.js";import"./2WFCA2D3.js";import{a as T}from"./DZRV43LK.js";import{B as E,C as b,D as z,E as n,G as h,Q as B,g as C,h as e}from"./BFCXWP2B.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"},j="calcite-action",V={button:s=>`${j}-${s}-button`,indicator:s=>`${j}-${s}-indicator`},W={tooltip:"tooltip"},q=C`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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{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)) var(--calcite-action-corner-radius-start-end, var(--calcite-corner-radius)) var(--calcite-action-corner-radius-end-end, var(--calcite-corner-radius)) var(--calcite-action-corner-radius-end-start, var(--calcite-corner-radius)))}.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{border-radius:inherit;position:relative;margin:0;display:flex;inline-size:auto;align-items:center;justify-content:flex-start;border-style:none;font-family:var(--calcite-font-family);font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-medium);outline-color:transparent;background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-1));color:var(--calcite-action-text-color, var(--calcite-internal-action-text-color));text-align:unset;flex:1 0 auto;cursor:inherit}.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:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);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)))}.icon-container{pointer-events:none;margin:0;display:flex;align-items:center;justify-content:center;min-inline-size:1rem;min-block-size:1.5rem}.text-container{margin:0;inline-size:0px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.5rem;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([active-descendant]) .button{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([scale=s]) .button{font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-normal);padding-inline:var(--calcite-internal-action-padding-inline, .5rem);padding-block:var(--calcite-internal-action-padding-block, var(--calcite-spacing-xxs))}:host([scale=s]) .button--text-visible .icon-container{margin-inline-end:.5rem}:host([scale=m]) .button{font-size:var(--calcite-font-size--1);line-height:1rem;font-weight:var(--calcite-font-weight-normal);padding-inline:var(--calcite-internal-action-padding-inline, 1rem);padding-block:var(--calcite-internal-action-padding-block, var(--calcite-spacing-md))}:host([scale=m]) .button--text-visible .icon-container{margin-inline-end:.75rem}:host([scale=l]) .button{font-size:var(--calcite-font-size-0);line-height:1.25rem;font-weight:var(--calcite-font-weight-normal);padding-inline:var(--calcite-internal-action-padding-inline, 1.25rem);padding-block:var(--calcite-internal-action-padding-block, var(--calcite-spacing-xl))}:host([scale=l]) .button--text-visible .icon-container{margin-inline-end:1rem}: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}.button--text-visible{inline-size:100%}.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))}.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))}.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}`,x=class extends z{constructor(){super(...arguments),this.guid=T(),this.buttonRef=E(),this.buttonId=V.button(this.guid),this.mutationObserver=I("mutation",()=>this.requestUpdate()),this.messages=R({blocking:!0}),this.focusSetter=L()(this),this.active=!1,this.activeDescendant=!1,this.appearance="solid",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,{},{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}]}}static{this.styles=q}async setFocus(t){return this.focusSetter(()=>this.buttonRef.value,t)}connectedCallback(){super.connectedCallback(),this.formEl=P(this),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}updated(){F(this)}disconnectedCallback(){super.disconnectedCallback(),this.formEl=null,this.mutationObserver?.disconnect()}handleClick(){let{type:t}=this;t==="submit"?O(this):t==="reset"&&D(this)}handleTooltipSlotChange(t){let o=t.target.assignedElements({flatten:!0}).filter(r=>r?.matches("calcite-tooltip"))[0];o&&(o.referenceElement=this.buttonRef.value)}storeIndicatorEl(t){this.indicatorEl=t}renderTextContainer(){let{text:t,textEnabled:a}=this,o={[i.textContainer]:!0,[i.textContainerVisible]:a};return t?p("text-container",e`<div class=${n(o)}>${t}</div>`):null}renderIndicatorText(){let{indicator:t,messages:a,buttonId:o}=this;return e`<div aria-labelledby=${o??h} aria-live=polite class=${n(i.indicatorText)} role=region ${b(this.storeIndicatorEl)}>${t?a.indicator:null}</div>`}renderIconContainer(){let{loading:t,icon:a,scale:o,el:r,iconFlipRtl:v,indicator:f}=this,m=o==="l"?"l":"m",c=t?e`<calcite-loader inline .label=${this.messages.loading} .scale=${m}></calcite-loader>`:null,d=a?e`<calcite-icon class=${n({[i.indicatorWithIcon]:f})} .flipRtl=${v} .icon=${a} .scale=${S(this.scale)}></calcite-icon>`:null,l=c||d,g=l||r.children?.length,u=e`<div class=${n({[i.slotContainer]:!0,[i.slotContainerHidden]:t})}><slot></slot></div>`;return g?p("icon-container",e`<div aria-hidden=true class=${n(i.iconContainer)}>${l}${u}</div>`):null}renderButton(){let{compact:t,disabled:a,icon:o,loading:r,textEnabled:v,label:f,text:m,indicator:c,indicatorEl:d,buttonId:l,messages:g}=this,u=f||m||"",y=c?g.indicatorLabel.replace("{label}",u):u,$={[i.button]:!0,[i.buttonTextVisible]:v,[i.buttonCompact]:t},k=e`${this.renderIconContainer()}${this.renderTextContainer()}${!o&&c&&p("indicator-no-icon",e`<div class=${n(i.indicatorWithoutIcon)}></div>`)||""}`,N=c&&d?[d]:[],w=[...this.aria?.controlsElements??[],...N];return this.dragHandle?e`<span .ariaBusy=${r} .ariaControlsElements=${w} .ariaDescribedByElements=${this.aria?.describedByElements} .ariaExpanded=${this.aria?.expanded} .ariaHasPopup=${this.aria?.hasPopup} .ariaLabel=${y} .ariaLabelledByElements=${this.aria?.labelledByElements} .ariaOwnsElements=${this.aria?.ownsElements} .ariaPressed=${this.aria?.pressed} class=${n($)} id=${l??h} role=button tabindex=${this.disabled?null:0} ${b(this.buttonRef)}>${k}</span>`:e`<button .ariaBusy=${r} .ariaControlsElements=${w} .ariaDescribedByElements=${this.aria?.describedByElements} .ariaExpanded=${this.aria?.expanded} .ariaHasPopup=${this.aria?.hasPopup} .ariaLabel=${y} .ariaLabelledByElements=${this.aria?.labelledByElements} .ariaOwnsElements=${this.aria?.ownsElements} .ariaPressed=${this.aria?.pressed} class=${n($)} .disabled=${a} id=${l??h} @click=${this.handleClick} ${b(this.buttonRef)}>${k}</button>`}render(){return H({disabled:this.disabled,children:e`${this.renderButton()}<slot name=${W.tooltip} @slotchange=${this.handleTooltipSlotChange}></slot>${this.renderIndicatorText()}`})}};B("calcite-action",x);export{x as Action};
|