@esri/calcite-components 5.0.0-next.22 → 5.0.0-next.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{67KX6UQJ.js → 2ZOH7S3X.js} +2 -2
- package/dist/cdn/{BMRA5ST6.js → 37Y6G3TP.js} +2 -2
- package/dist/cdn/{HLOHW3HC.js → 3BDPJILM.js} +1 -1
- package/dist/cdn/{7Z7MDHP5.js → 3DZK3RG7.js} +1 -1
- package/dist/cdn/{RINDCRZM.js → 3GTQIH43.js} +2 -2
- package/dist/cdn/{YXBICT7M.js → 3PXVP76T.js} +2 -2
- package/dist/cdn/{IQYQ5FMI.js → 3YP7PDPY.js} +2 -2
- package/dist/cdn/{7NA3W4P2.js → 4HT7QTCF.js} +2 -2
- package/dist/cdn/{SVPH24SK.js → 4JL57EDA.js} +1 -1
- package/dist/cdn/{O5XW2W3N.js → 4L3PUFV5.js} +2 -2
- package/dist/cdn/{H2YNJG5I.js → 5BSD56V7.js} +2 -2
- package/dist/cdn/{5WBWTEWE.js → 5N3W5VQK.js} +2 -2
- package/dist/cdn/{6KEA3HP7.js → 5Z4VZS4K.js} +2 -2
- package/dist/cdn/{CVXPA33U.js → 64OWR3JT.js} +1 -1
- package/dist/cdn/{KDMBYWBP.js → 65JNHBZY.js} +2 -2
- package/dist/cdn/{ITPMNVSN.js → 6A4TA3W6.js} +2 -2
- package/dist/cdn/{PEZKBPAP.js → 6AIJERHD.js} +2 -2
- package/dist/cdn/{ZBBFGTGJ.js → 6FS7L25A.js} +2 -2
- package/dist/cdn/{WMMMF3QS.js → 6N3LZJTK.js} +2 -2
- package/dist/cdn/{XTVHUWKO.js → 6VG4XLEA.js} +2 -2
- package/dist/cdn/{57DGFDHH.js → 7AS7XMSH.js} +2 -2
- package/dist/cdn/{L6VETJE7.js → 7JHWOII6.js} +2 -2
- package/dist/cdn/{AGCED3RQ.js → 7LRIRIIW.js} +2 -2
- package/dist/cdn/{XNUDVLWR.js → 7N6CMTWP.js} +2 -2
- package/dist/cdn/{D6PUUQ36.js → 7NLFZEAY.js} +2 -2
- package/dist/cdn/{E5RNFT52.js → 7T2AINDJ.js} +2 -2
- package/dist/cdn/{QOKGNFI5.js → 7TNANCRK.js} +2 -2
- package/dist/cdn/{ISVLQ33O.js → 7YBTXCJ6.js} +2 -2
- package/dist/cdn/{FPA3LX46.js → A23GHMZS.js} +1 -1
- package/dist/cdn/{2IW6XXMN.js → A7AWHUCH.js} +1 -1
- package/dist/cdn/{TUL5IRJ3.js → ABX4FUH2.js} +2 -2
- package/dist/cdn/{DCR6NOTZ.js → B3PJ7WKM.js} +2 -2
- package/dist/cdn/{KYGPAK6E.js → B6CQHSFM.js} +2 -2
- package/dist/cdn/{NLJNCTZJ.js → B7FZNIZA.js} +2 -2
- package/dist/cdn/{ZZ7IW4EN.js → BXP3OZKK.js} +2 -2
- package/dist/cdn/{LFHO5RGS.js → CD3UAK2W.js} +2 -2
- package/dist/cdn/{WC5KEHA5.js → CF3UKACA.js} +2 -2
- package/dist/cdn/{MDUEXGAY.js → CIXVZEV7.js} +2 -2
- package/dist/cdn/{ID72TG4A.js → CVJIPPM6.js} +2 -2
- package/dist/cdn/CXUNMY3L.js +4 -0
- package/dist/cdn/{CPGHBNOO.js → DE3MMB5H.js} +2 -2
- package/dist/cdn/{D4ZCR65R.js → DQ42326G.js} +2 -2
- package/dist/cdn/{QKY4UDHD.js → DS3SRYAQ.js} +2 -2
- package/dist/cdn/{2GB6JN77.js → DUEETZLL.js} +2 -2
- package/dist/cdn/{OUQLWQG7.js → E76C5Q66.js} +2 -2
- package/dist/cdn/{VWADXFDP.js → E77DQ4KK.js} +2 -2
- package/dist/cdn/{6D6FT6QA.js → E7UJ63CV.js} +2 -2
- package/dist/cdn/{RPJGKPPW.js → EEP4X23G.js} +2 -2
- package/dist/cdn/{Q4FFQR4A.js → EF4DIHKW.js} +2 -2
- package/dist/cdn/{5YBPXYJZ.js → EGNG7FQV.js} +2 -2
- package/dist/cdn/{2PBM6B5O.js → EHS7VTJ2.js} +2 -2
- package/dist/cdn/{TCBKBDOC.js → EK3BWMVE.js} +1 -1
- package/dist/cdn/{LBBTSMHU.js → EQ25YK3K.js} +2 -2
- package/dist/cdn/{LGDJX7RL.js → ETB57U7D.js} +2 -2
- package/dist/cdn/{5WZUXZ5B.js → FBB3QKEK.js} +2 -2
- package/dist/cdn/{Z47Y3GEW.js → FECXXF6W.js} +2 -2
- package/dist/cdn/{NFTS23CV.js → FGML73RG.js} +2 -2
- package/dist/cdn/{AEVR6ZK2.js → FGRR2V5E.js} +2 -2
- package/dist/cdn/{2XPHCHWH.js → FHFC32UV.js} +2 -2
- package/dist/cdn/{ISZMFQQH.js → FNUQ3EYP.js} +2 -2
- package/dist/cdn/{VJHWSK24.js → FOE57QJC.js} +2 -2
- package/dist/cdn/{OXVZPNMT.js → FR2S7C3P.js} +2 -2
- package/dist/cdn/{6DEHZOEV.js → FSCKWGCN.js} +2 -2
- package/dist/cdn/{TMFSE6VW.js → FTNFA7JP.js} +2 -2
- package/dist/cdn/{J5L5B4RM.js → FVRYO4N6.js} +2 -2
- package/dist/cdn/{4EGIU5J3.js → FWBHWDFV.js} +2 -2
- package/dist/cdn/{HHXCNSRO.js → GAXQ53KY.js} +2 -2
- package/dist/cdn/{KUXM3FYV.js → GS362P6K.js} +1 -1
- package/dist/cdn/{I26Z5MSK.js → GVMJTZ2P.js} +2 -2
- package/dist/cdn/{NDKJMPH3.js → HA5H546A.js} +2 -2
- package/dist/cdn/{F37KDDOB.js → HKWN6UGZ.js} +2 -2
- package/dist/cdn/{XWQG2KRU.js → HPUWSQFC.js} +2 -2
- package/dist/cdn/{BNXRPXJI.js → HSHIW42B.js} +2 -2
- package/dist/cdn/{H6JY4TLT.js → HV2P4FIA.js} +2 -2
- package/dist/cdn/{ESI4A5LT.js → HZ57T5MG.js} +2 -2
- package/dist/cdn/{XFY2FPPE.js → I2COEUMU.js} +2 -2
- package/dist/cdn/{T57ROLBK.js → I7ZBOKLZ.js} +2 -2
- package/dist/cdn/{44DLCOHW.js → INRPXIYH.js} +2 -2
- package/dist/cdn/{Q5Z6YMDD.js → IVLZA447.js} +2 -2
- package/dist/cdn/{SDCGE6UY.js → IWBVUYFH.js} +2 -2
- package/dist/cdn/{B6SXDZLB.js → J3RGQY47.js} +2 -2
- package/dist/cdn/{CPWCSL4X.js → JGASNMHN.js} +2 -2
- package/dist/cdn/{3V2B5S5O.js → JSENW2PE.js} +2 -2
- package/dist/cdn/{WAVZTVOV.js → K6FSYEUE.js} +2 -2
- package/dist/cdn/{EWOTUOZA.js → KG2CHPZF.js} +2 -2
- package/dist/cdn/{7FXMJXF5.js → KRXG7RTQ.js} +2 -2
- package/dist/cdn/{A2Y6CXFO.js → KT64TXJN.js} +2 -2
- package/dist/cdn/{KRRWBYLT.js → L25S477Y.js} +1 -1
- package/dist/cdn/{6PA7NX4D.js → L2VNGTSR.js} +2 -2
- package/dist/cdn/{S3ITSR2P.js → LKTMTZEF.js} +2 -2
- package/dist/cdn/{NE73M6V2.js → LLUKLUGG.js} +2 -2
- package/dist/cdn/{GLB66Z4X.js → LNVURAF5.js} +2 -2
- package/dist/cdn/{MGJB7QBD.js → LRVS2JUS.js} +2 -2
- package/dist/cdn/{3ZMH6VLB.js → M7JPJNTA.js} +2 -2
- package/dist/cdn/{7EHFM3SB.js → MDZPHKB4.js} +2 -2
- package/dist/cdn/{AWVXLTPD.js → MFBAIO26.js} +1 -1
- package/dist/cdn/{V6XJN4JW.js → MHSOQCTX.js} +2 -2
- package/dist/cdn/{JH724KDX.js → MLXLOWSQ.js} +2 -2
- package/dist/cdn/{G3ZOH3X6.js → MP7KZIIK.js} +2 -2
- package/dist/cdn/{G6J7J6UV.js → MT4G6FVR.js} +2 -2
- package/dist/cdn/{YJINJXYU.js → MZFN2QZ5.js} +2 -2
- package/dist/cdn/{CBYIGLON.js → N5L6H66L.js} +2 -2
- package/dist/cdn/{VNESHNZU.js → N6LPJTW6.js} +2 -2
- package/dist/cdn/{GFK7W6KG.js → NA32NW6F.js} +2 -2
- package/dist/cdn/{QKXHA3YM.js → OGYCI2CL.js} +1 -1
- package/dist/cdn/{SCREIKXF.js → OYAC2J2Y.js} +2 -2
- package/dist/cdn/{5JMFREUA.js → P2QT6AS5.js} +2 -2
- package/dist/cdn/{RBLHUDYM.js → P32RYVRE.js} +2 -2
- package/dist/cdn/{BN3ESSJB.js → P5TBKTLI.js} +1 -1
- package/dist/cdn/{V3BAYGCS.js → PDKKWI65.js} +2 -2
- package/dist/cdn/{TNDG4F6U.js → PGIQOKHX.js} +2 -2
- package/dist/cdn/{POQ4DRFT.js → POEYFZSS.js} +2 -2
- package/dist/cdn/{AF5ENX46.js → QAENC5XP.js} +2 -2
- package/dist/cdn/{NB2WCFCL.js → QDJATE7S.js} +1 -1
- package/dist/cdn/{BIDVORW5.js → QVASZAU7.js} +2 -2
- package/dist/cdn/{XOMZIOVS.js → ROD5TPA7.js} +2 -2
- package/dist/cdn/{7ZJ45FKL.js → ROMI2N47.js} +2 -2
- package/dist/cdn/{PFTAY2JN.js → ROUUIU6Y.js} +2 -2
- package/dist/cdn/{PM27AOKE.js → RSBYLF4I.js} +2 -2
- package/dist/cdn/{HEVQ2LCU.js → RW2TFUMT.js} +2 -2
- package/dist/cdn/{M45EPFWM.js → RXMFCMPL.js} +2 -2
- package/dist/cdn/{C4SV65BC.js → RXQFLYN4.js} +2 -2
- package/dist/cdn/{J4F5F6WX.js → RXUXWSUW.js} +1 -1
- package/dist/cdn/{VZO2EICR.js → SCBC66SJ.js} +1 -1
- package/dist/cdn/{MLZ6SYFA.js → SEJUC6NB.js} +2 -2
- package/dist/cdn/{AYQ76DRU.js → SF7R62RN.js} +2 -2
- package/dist/cdn/{6ZTC2XUO.js → SXCRQKQY.js} +2 -2
- package/dist/cdn/{VYXI77LW.js → SYBWNCBH.js} +1 -1
- package/dist/cdn/{SXCU7LW4.js → SZFWQYM7.js} +2 -2
- package/dist/cdn/{UVJFQXD2.js → SZSUAKMM.js} +2 -2
- package/dist/cdn/{3MVOZNRJ.js → T6I2EM3C.js} +2 -2
- package/dist/cdn/{6K6QAG2O.js → TDVBV4VJ.js} +2 -2
- package/dist/cdn/{FDCHEZ7C.js → TGVFSTVL.js} +2 -2
- package/dist/cdn/{SMCJVJBQ.js → THL7ZCGZ.js} +2 -2
- package/dist/cdn/{GBKUICES.js → TIER2ZLB.js} +2 -2
- package/dist/cdn/{XMYNPJ52.js → TSV5UHSA.js} +2 -2
- package/dist/cdn/{3CML55ZK.js → UFYXZGUB.js} +1 -1
- package/dist/cdn/{ZSWBVPI4.js → UIOMWJYX.js} +1 -1
- package/dist/cdn/{CKPSZAQE.js → UMESQ2SZ.js} +1 -1
- package/dist/cdn/{5VEK4JDT.js → UU5FHZ2A.js} +2 -2
- package/dist/cdn/{T534H6HD.js → VATCFN3O.js} +2 -2
- package/dist/cdn/{OTWUK5WT.js → VD6FGGZF.js} +2 -2
- package/dist/cdn/{SYAVEZ6X.js → VEAPKWDV.js} +2 -2
- package/dist/cdn/{4YRGPHDD.js → VJ7Q2QJV.js} +1 -1
- package/dist/cdn/{OB6IN7GG.js → VKBFZH3Q.js} +2 -2
- package/dist/cdn/{FAHNZEUF.js → VKQIGKNF.js} +2 -2
- package/dist/cdn/{HUS6FFRJ.js → VKUS34R6.js} +2 -2
- package/dist/cdn/{FMWOYWG2.js → VKYWVVT7.js} +2 -2
- package/dist/cdn/{R5SEYYAN.js → VYBIOJ5F.js} +1 -1
- package/dist/cdn/{LOUMN74F.js → W2BGQHG5.js} +2 -2
- package/dist/cdn/{YK6VE25V.js → W35ZAP2H.js} +2 -2
- package/dist/cdn/{4AWEYVR4.js → W5MT6SED.js} +2 -2
- package/dist/cdn/{PCXLRABT.js → WMFPEE5T.js} +2 -2
- package/dist/cdn/WNAJZNVH.js +4 -0
- package/dist/cdn/{3TXLQFKA.js → WQ2CNT76.js} +2 -2
- package/dist/cdn/{CJYOZS2W.js → XLFAHCLR.js} +2 -2
- package/dist/cdn/{P4NYZCMY.js → XQNQRWRJ.js} +2 -2
- package/dist/cdn/{FHHZH3YZ.js → XSY4ZNEV.js} +1 -1
- package/dist/cdn/{PUXCZLJX.js → XTRBN5YJ.js} +2 -2
- package/dist/cdn/{WJBRIJ4A.js → XVYK6WRH.js} +2 -2
- package/dist/cdn/{LPOWOAP7.js → XZO7FJUM.js} +1 -1
- package/dist/cdn/{POTFFZRX.js → Y357OZZO.js} +2 -2
- package/dist/cdn/{BN2BFTMK.js → YI6NNNSO.js} +2 -2
- package/dist/cdn/{RGN2XYYG.js → YJJIQDE4.js} +1 -1
- package/dist/cdn/{VIIIQSGC.js → YMVT43WJ.js} +2 -2
- package/dist/cdn/{TVWYD7RE.js → YOIIQPES.js} +2 -2
- package/dist/cdn/{YIMEQ6CS.js → ZGJEWTXH.js} +2 -2
- package/dist/cdn/{PR4YPPZ2.js → ZK5AVU4C.js} +2 -2
- package/dist/cdn/{QJU2P6E3.js → ZOMCYKBQ.js} +2 -2
- package/dist/cdn/{PYLK2BNZ.js → ZR6O4LWY.js} +2 -2
- package/dist/cdn/{LI5YPUR2.js → ZT6GWFZI.js} +2 -2
- package/dist/cdn/{Q7HZHE7C.js → ZXFBTRZK.js} +2 -2
- package/dist/cdn/index.js +2 -2
- package/dist/chunks/ExpandToggle.js +1 -1
- package/dist/chunks/FloatingArrow.js +1 -1
- package/dist/chunks/Heading.js +1 -1
- package/dist/chunks/InternalLabel.js +1 -1
- package/dist/chunks/Validation.js +1 -1
- package/dist/chunks/XButton.js +1 -1
- package/dist/chunks/array.js +1 -1
- package/dist/chunks/component.js +1 -1
- package/dist/chunks/core.js +1 -1
- package/dist/chunks/date.js +1 -1
- package/dist/chunks/dom.js +1 -1
- package/dist/chunks/dynamicClasses.js +1 -1
- package/dist/chunks/filter.js +1 -1
- package/dist/chunks/floating-ui.js +1 -1
- package/dist/chunks/form.js +1 -1
- package/dist/chunks/global.js +1 -1
- package/dist/chunks/guid.js +1 -1
- package/dist/chunks/header.js +1 -1
- package/dist/chunks/input.js +1 -1
- package/dist/chunks/interact.min.js +1 -1
- package/dist/chunks/key.js +1 -1
- package/dist/chunks/label.js +1 -1
- package/dist/chunks/locale.js +1 -1
- package/dist/chunks/logger.js +1 -1
- package/dist/chunks/math.js +1 -1
- package/dist/chunks/observers.js +1 -1
- package/dist/chunks/openCloseComponent.js +1 -1
- package/dist/chunks/resources.js +1 -1
- package/dist/chunks/resources2.js +1 -1
- package/dist/chunks/resources3.js +1 -1
- package/dist/chunks/resources4.js +1 -1
- package/dist/chunks/resources5.js +1 -1
- package/dist/chunks/resources6.js +1 -1
- package/dist/chunks/resources7.js +1 -1
- package/dist/chunks/resources8.js +1 -1
- package/dist/chunks/responsive.js +1 -1
- package/dist/chunks/runtime.js +5 -5
- package/dist/chunks/sortable.js +1 -1
- package/dist/chunks/sortableComponent.js +1 -1
- package/dist/chunks/text.js +1 -1
- package/dist/chunks/useCancelable.js +1 -1
- package/dist/chunks/useFocusTrap.js +1 -1
- package/dist/chunks/useInteractive.js +1 -1
- package/dist/chunks/usePreventDocumentScroll.js +1 -1
- package/dist/chunks/useSetFocus.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/chunks/useTime.js +1 -1
- package/dist/chunks/utils.js +1 -1
- package/dist/chunks/utils2.js +1 -1
- package/dist/chunks/utils3.js +1 -1
- package/dist/chunks/utils4.js +1 -1
- package/dist/components/calcite-accordion/customElement.js +1 -1
- package/dist/components/calcite-accordion-item/customElement.js +1 -1
- package/dist/components/calcite-action/customElement.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-navigation/customElement.js +2 -2
- 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 +2 -2
- 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-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-time-picker/customElement.js +1 -1
- package/dist/components/calcite-tooltip/customElement.js +1 -1
- package/dist/components/calcite-tree/customElement.js +1 -1
- package/dist/components/calcite-tree-item/customElement.js +1 -1
- package/dist/docs/api.json +5 -1
- package/dist/docs/docs.json +6 -1
- package/dist/docs/supported-browsers.json +1 -1
- package/dist/docs/vscode.css-custom-data.json +4 -0
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +6 -2
- package/dist/index.js +1 -1
- package/dist/loader.js +1 -1
- package/package.json +2 -2
- package/dist/cdn/7P6DMNJV.js +0 -4
- package/dist/cdn/AWVDNW63.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as ie,b as H}from"./AWVXLTPD.js";import{d as Q,m as S}from"./NDKJMPH3.js";import{a as ae}from"./LFHO5RGS.js";import{a as te}from"./BNXRPXJI.js";import{c as Y,d as Z,e as ee}from"./LI5YPUR2.js";import{c as N,e as j,f as G,h as K}from"./J5L5B4RM.js";import{a as W}from"./6PA7NX4D.js";import{a as q}from"./HUS6FFRJ.js";import{a as J}from"./4YRGPHDD.js";import{a as U}from"./LBBTSMHU.js";import{a as X}from"./G6J7J6UV.js";import"./SVPH24SK.js";import"./OB6IN7GG.js";import{p as R,w as _}from"./YK6VE25V.js";import{a as I}from"./TCBKBDOC.js";import{B,C as T,D as F,E as p,F as M,H as O,I as E,P as A,g as z,h as k,l as C,o as w}from"./HHXCNSRO.js";var l={container:"container",containerRange:"container--range",graph:"graph",handle:"handle",handleExtension:"handle-extension",handleLabel:"handle__label",handleLabelMinValue:"handle__label--minValue",handleLabelValue:"handle__label--value",hyphen:"hyphen",hyphenWrap:"hyphen--wrap",static:"static",thumb:"thumb",thumbActive:"thumb--active",thumbContainer:"thumb-container",thumbMinValue:"thumb--minValue",thumbPrecise:"thumb--precise",thumbValue:"thumb--value",tick:"tick",tickActive:"tick--active",tickLabel:"tick__label",tickMax:"tick__label--max",tickMin:"tick__label--min",ticks:"ticks",track:"track",trackRange:"track__range",transformed:"transformed",scale:$=>`scale--${$}`},se="calcite-slider",D={validationMessage:"validationMessage",host:$=>`${se}-${$}`},le=250,ne=z`@charset "UTF-8";:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}.scale--s{--calcite-slider-handle-size: .625rem;--calcite-slider-handle-extension-height: .4rem;--calcite-slider-container-font-size: var(--calcite-font-size--3)}.scale--s .handle__label,.scale--s .tick__label{line-height:.75rem}.scale--m{--calcite-slider-handle-size: .875rem;--calcite-slider-handle-extension-height: .5rem;--calcite-slider-container-font-size: var(--calcite-font-size--2)}.scale--m .handle__label,.scale--m .tick__label{line-height:1rem}.scale--l{--calcite-slider-handle-size: 1rem;--calcite-slider-handle-extension-height: .65rem;--calcite-slider-container-font-size: var(--calcite-font-size--1)}.scale--l .handle__label,.scale--l .tick__label{line-height:1rem}.handle__label,.tick__label{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-slider-text-color, var(--calcite-color-text-2));font-size:var(--calcite-slider-container-font-size)}:host{display:block}:host .validation-container{padding-block-start:0!important}.container{position:relative;display:block;overflow-wrap:normal;word-break:normal;padding-inline:calc(var(--calcite-slider-handle-size) * .5);padding-block:calc(var(--calcite-slider-handle-size) * .5);margin-block:calc(var(--calcite-slider-handle-size) * .5);margin-inline:0;--calcite-slider-full-handle-height: calc( var(--calcite-slider-handle-size) + var(--calcite-slider-handle-extension-height) );touch-action:none;-webkit-user-select:none;user-select:none}:host([disabled]) .track__range,:host([disabled]) .tick--active{background-color:var(--calcite-color-text-3)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.scale--s .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -.375rem}.scale--m .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -.5rem}.scale--l .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -.55rem}:host([precise]:not([has-histogram])) .container .thumb--value{--calcite-slider-thumb-y-offset: calc(var(--calcite-slider-full-handle-height) * -1)}.thumb-container{position:relative;max-inline-size:100%}.thumb{--calcite-slider-thumb-x-offset: calc(var(--calcite-slider-handle-size) * .5);position:absolute;margin:0;display:flex;cursor:pointer;flex-direction:column;align-items:center;border-style:none;background-color:transparent;padding:0;font-family:inherit;outline:2px solid transparent;outline-offset:2px;transform:translate(var(--calcite-slider-thumb-x-offset),var(--calcite-slider-thumb-y-offset))}.thumb .handle__label{white-space:nowrap}.thumb .handle__label.static,.thumb .handle__label.transformed{position:absolute;inset-block:0px;opacity:0}.thumb .handle__label.hyphen:after{content:"—";display:inline-block;inline-size:1em}.thumb .handle__label.hyphen--wrap{display:flex}.thumb .handle{box-sizing:border-box;border-radius:9999px;outline-color:transparent;background-color:var(--calcite-slider-handle-fill-color, var(--calcite-color-foreground-1));block-size:var(--calcite-slider-handle-size);inline-size:var(--calcite-slider-handle-size);box-shadow:0 0 0 2px var(--calcite-color-text-3) inset;transition:border var(--calcite-internal-animation-timing-medium) ease,background-color var(--calcite-internal-animation-timing-medium) ease,box-shadow var(--calcite-animation-timing) ease}.thumb .handle-extension{inline-size:.125rem;block-size:var(--calcite-slider-handle-extension-height);background-color:var(--calcite-slider-handle-extension-color, var(--calcite-color-text-3))}.thumb:hover .handle{box-shadow:0 0 0 3px var(--calcite-color-brand) inset}.thumb:hover .handle-extension{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand))}.thumb:focus .handle{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.thumb:focus .handle-extension{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand))}.thumb.thumb--minValue{transform:translate(calc(var(--calcite-slider-thumb-x-offset) * -1),var(--calcite-slider-thumb-y-offset))}.thumb.thumb--precise{--calcite-slider-thumb-y-offset: -.125rem}:host([label-handles]) .thumb{--calcite-slider-thumb-x-offset: 50%}:host([label-handles]):host(:not([has-histogram])) .scale--s .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -1.4375rem}:host([label-handles]):host(:not([has-histogram])) .scale--m .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -1.875rem}:host([label-handles]):host(:not([has-histogram])) .scale--l .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -2rem}:host([has-histogram][label-handles]) .handle__label,:host([label-handles]:not([has-histogram])) .thumb--minValue.thumb--precise .handle__label{margin-block-start:.5em}:host(:not([has-histogram]):not([precise])) .handle__label,:host([label-handles]:not([has-histogram])) .thumb--value .handle__label{margin-block-end:.5em}:host([label-handles][precise]):host(:not([has-histogram])) .scale--s .thumb--value{--calcite-slider-thumb-y-offset: -2.075rem}:host([label-handles][precise]):host(:not([has-histogram])) .scale--m .thumb--value{--calcite-slider-thumb-y-offset: -2.75rem}:host([label-handles][precise]):host(:not([has-histogram])) .scale--l .thumb--value{--calcite-slider-thumb-y-offset: -3.0625rem}.thumb:focus .handle,.thumb--active .handle{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand));box-shadow:0 0 8px #00000029}.thumb:hover.thumb--precise:after,.thumb:focus.thumb--precise:after,.thumb--active.thumb--precise:after{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand))}.track{position:relative;block-size:.125rem;border-radius:0;background-color:var(--calcite-slider-track-color, var(--calcite-color-border-2));transition:all var(--calcite-internal-animation-timing-medium) ease-in}.track__range{position:absolute;inset-block-start:0px;block-size:.125rem;background-color:var(--calcite-slider-track-fill-color, var(--calcite-color-brand))}.container--range .track__range:hover{cursor:ew-resize}.container--range .track__range:after{position:absolute;inline-size:100%;content:"";inset-block-start:calc(var(--calcite-slider-full-handle-height) * .5 * -1);block-size:calc(var(--calcite-slider-handle-size) + var(--calcite-slider-handle-extension-height))}@media(forced-colors:active){.thumb{outline-width:0;outline-offset:0}.handle{outline:2px solid transparent;outline-offset:2px}.thumb:focus .handle,.thumb .handle-extension,.thumb:hover .handle-extension,.thumb:focus .handle-extension,.thumb:active .handle-extension{background-color:canvasText}.track{background-color:canvasText}.track__range{background-color:highlight}}.tick{position:absolute;block-size:.25rem;inline-size:.125rem;border-width:1px;border-style:solid;background-color:var(--calcite-slider-tick-color, var(--calcite-color-border-input));border-color:var(--calcite-slider-tick-border-color, var(--calcite-color-foreground-1));inset-block-start:-2px;pointer-events:none;margin-inline-start:-.125rem}.tick--active{background-color:var(--calcite-slider-tick-selected-color, var(--calcite-color-brand))}.tick__label{pointer-events:none;margin-block-start:.875rem;display:flex;justify-content:center}.tick__label--min{transition:opacity var(--calcite-animation-timing)}.tick__label--max{transition:opacity var(--calcite-internal-animation-timing-fast)}:host([has-histogram][label-handles]) .tick__label--min,:host([has-histogram][label-handles]) .tick__label--max,:host([has-histogram][precise]) .tick__label--min,:host([has-histogram][precise]) .tick__label--max{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-3)}.graph{color:var(--calcite-slider-graph-color, var(--calcite-color-foreground-3));block-size:48px}:host([label-ticks][ticks]) .container{padding-block-end:calc(.875rem + var(--calcite-slider-container-font-size))}:host([has-histogram]):host([precise][label-handles]) .container{padding-block-end:calc(var(--calcite-slider-full-handle-height) + 1em)}:host([has-histogram]):host([label-handles]:not([precise])) .container{padding-block-end:calc(var(--calcite-slider-handle-size) * .5 + 1em)}:host([has-histogram]):host([precise]:not([label-handles])) .container{padding-block-end:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([precise]:not([label-handles])) .container{padding-block-start:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([precise]:not([label-handles])) .container--range{padding-block-end:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([label-handles]:not([precise])) .container{padding-block-start:calc(var(--calcite-slider-full-handle-height) + 4px)}:host(:not([has-histogram])):host([label-handles][precise]) .container{padding-block-start:calc(var(--calcite-slider-full-handle-height) + var(--calcite-slider-container-font-size) + 4px)}:host(:not([has-histogram])):host([label-handles][precise]) .container--range{padding-block-end:calc(var(--calcite-slider-full-handle-height) + var(--calcite-slider-container-font-size) + 4px)}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`;function b($){return Array.isArray($)}var P=class extends F{constructor(){super(),this.dragEnd=e=>{this.disabled||(this.removeDragListeners(),this.focusActiveHandle(e.clientX),this.lastDragPropValue!=this[this.dragProp]&&this.emitChange(),this.dragProp=null,this.lastDragPropValue=null,this.minValueDragRange=null,this.maxValueDragRange=null,this.minMaxValueRange=null)},this.dragUpdate=e=>{if(!(this.disabled||!this.trackRef.value)&&(e.preventDefault(),this.dragProp)){let t=this.mapToRange(e.clientX||e.pageX);if(b(this.value)&&this.dragProp==="minMaxValue")if(this.minValueDragRange&&this.maxValueDragRange&&this.minMaxValueRange){let i=t-this.minValueDragRange,a=t+this.maxValueDragRange;a<=this.max&&i>=this.min&&a-i===this.minMaxValueRange&&this.setValue({minValue:this.clamp(i,"minValue"),maxValue:this.clamp(a,"maxValue")})}else this.minValueDragRange=t-this.minValue,this.maxValueDragRange=this.maxValue-t,this.minMaxValueRange=this.maxValue-this.minValue;else if(b(this.value)&&b(this.previousEmittedValue)&&this.dragProp==="maxValue"){let[i,a]=this.previousEmittedValue;i===a&&t<i?(this.dragProp="minValue",this.minHandle.focus()):this.setValue({[this.dragProp]:this.clamp(t,this.dragProp)})}else this.setValue({[this.dragProp]:this.clamp(t,this.dragProp)})}},this.formatValue=e=>(S.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},S.localize(e.toString())),this.guid=D.host(I()),this.messages=U(),this.pointerUpDragEnd=e=>{this.disabled||!_(e)||this.dragEnd(e)},this.trackRef=B(),this.focusSetter=X()(this),this.interactiveContainer=W(this),this.activeProp="value",this.maxValueDragRange=null,this.minMaxValueRange=null,this.minValueDragRange=null,this.tickValues=[],this.disabled=!1,this.fillPlacement="start",this.groupSeparator=!1,this.hasHistogram=!1,this.labelHandles=!1,this.labelTicks=!1,this.max=100,this.min=0,this.mirrored=!1,this.precise=!1,this.required=!1,this.scale="m",this.snap=!1,this.status="idle",this.step=1,this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.value=0,this.calciteSliderChange=w({cancelable:!1}),this.calciteSliderInput=w({cancelable:!1}),this.listen("pointerdown",this.pointerDownHandler),this.listen("keydown",this.handleKeyDown),this.listen("touchstart",this.handleTouchStart)}static{this.properties={activeProp:[16,{},{state:!0}],maxValueDragRange:[16,{},{state:!0}],minMaxValueRange:[16,{},{state:!0}],minValueDragRange:[16,{},{state:!0}],tickValues:[16,{},{state:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],fillPlacement:[3,{},{reflect:!0}],form:[3,{},{reflect:!0}],groupSeparator:[7,{},{reflect:!0,type:Boolean}],hasHistogram:[7,{},{reflect:!0,type:Boolean}],histogram:[0,{},{attribute:!1}],histogramStops:[0,{},{attribute:!1}],labelFormatter:[0,{},{attribute:!1}],labelHandles:[7,{},{reflect:!0,type:Boolean}],labelTicks:[7,{},{reflect:!0,type:Boolean}],max:[11,{},{reflect:!0,type:Number}],maxLabel:1,maxValue:[9,{},{type:Number}],min:[11,{},{reflect:!0,type:Number}],minLabel:1,labelText:1,messageOverrides:[0,{},{attribute:!1}],minValue:[9,{},{type:Number}],mirrored:[7,{},{reflect:!0,type:Boolean}],name:[3,{},{reflect:!0}],numberingSystem:1,pageStep:[11,{},{reflect:!0,type:Number}],precise:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],snap:[7,{},{reflect:!0,type:Boolean}],status:[3,{},{reflect:!0}],step:[11,{},{reflect:!0,type:Number}],ticks:[11,{},{reflect:!0,type:Number}],validationIcon:[3,{converter:E,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:[11,{},{type:Number,reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=ne}async setFocus(e){return this.focusSetter(()=>this.minHandle||this.maxHandle,e)}connectedCallback(){super.connectedCallback(),this.setMinMaxFromValue(),this.setValueFromMinMax(),Y(this),N(this),this.previousEmittedValue=this.value}load(){b(this.value)||(this.value=this.snap?this.getClosestStep(this.value):this.clamp(this.value)),G(this,this.value)}willUpdate(e){e.has("histogram")&&(this.hasHistogram=!!this.histogram),e.has("ticks")&&(this.tickValues=this.generateTickValues()),e.has("value")&&(this.hasUpdated||this.value!==0)&&this.setMinMaxFromValue(),(e.has("minValue")||e.has("maxValue"))&&this.setValueFromMinMax()}updated(){this.labelHandles&&(this.adjustHostObscuredHandleLabel("value"),b(this.value)&&(this.adjustHostObscuredHandleLabel("minValue"),this.precise&&!this.hasHistogram||this.hyphenateCollidingRangeHandleLabels())),this.hideObscuredBoundingTickLabels()}disconnectedCallback(){super.disconnectedCallback(),Z(this),j(this),this.removeDragListeners()}handleKeyDown(e){let t=this.shouldMirror(),{activeProp:i,max:a,min:s,pageStep:n,step:o}=this,r=this[i],{key:c}=e;if(J(c)){e.preventDefault();return}let d;if(c==="ArrowUp"||c==="ArrowRight"?d=r+o*(t&&c==="ArrowRight"?-1:1):c==="ArrowDown"||c==="ArrowLeft"?d=r-o*(t&&c==="ArrowLeft"?-1:1):c==="PageUp"?n&&(d=r+n):c==="PageDown"?n&&(d=r-n):c==="Home"?d=s:c==="End"&&(d=a),isNaN(d))return;e.preventDefault();let u=Number(d.toFixed(H(o)));this.setValue({[i]:this.clamp(u,i)})}pointerDownHandler(e){if(this.disabled||!_(e))return;let t=e.clientX||e.pageX,i=this.mapToRange(t),a="value";b(this.value)&&(i>=this.minValue&&i<=this.maxValue&&this.lastDragProp==="minMaxValue"?a="minMaxValue":a=Math.abs(this.maxValue-i)<Math.abs(this.minValue-i)||i>=this.maxValue?"maxValue":"minValue"),this.lastDragPropValue=this[a],this.dragStart(a),this.el.shadowRoot.querySelector(`.${l.thumb}:active`)||this.setValue({[a]:this.clamp(i,a)}),this.focusActiveHandle(t)}handleTouchStart(e){e.preventDefault()}buildThumbType(e){let t=[e];return this.labelHandles&&t.push("labeled"),this.precise&&t.push("precise"),this.hasHistogram&&t.push("histogram"),t.join("-")}setValueFromMinMax(){let{minValue:e,maxValue:t}=this;typeof e=="number"&&typeof t=="number"&&(this.value=[e,t])}setMinMaxFromValue(){let{value:e}=this;b(e)&&(this.minValue=e[0],this.maxValue=e[1])}onLabelClick(){this.setFocus()}shouldMirror(){return this.mirrored&&!this.hasHistogram}shouldUseMinValue(){return b(this.value)?this.hasHistogram&&this.maxValue===0||!this.hasHistogram&&this.minValue===0:!1}getTickDensity(){let e=(this.max-this.min)/this.ticks/le;return e<1?1:e}generateTickValues(){let e=this.ticks??0;if(e<=0)return[];let t=[this.min],i=this.getTickDensity(),a=e*i,s=this.min;for(;s<this.max;)s+=a,t.push(Math.min(s,this.max));return t.includes(this.max)||t.push(this.max),t}onThumbBlur(){this.activeProp=null}onThumbFocus(e){let t=e.currentTarget;this.activeProp=t.getAttribute("data-value-prop")}onThumbPointerDown(e){let t=e.currentTarget;this.pointerDownDragStart(e,t.getAttribute("data-value-prop"))}onTrackPointerDown(e){this.pointerDownDragStart(e,"minMaxValue")}pointerDownDragStart(e,t){_(e)&&this.dragStart(t)}dragStart(e){this.dragProp=e,this.lastDragProp=this.dragProp,this.activeProp=e,window.addEventListener("pointermove",this.dragUpdate),window.addEventListener("pointerup",this.pointerUpDragEnd),window.addEventListener("pointercancel",this.dragEnd)}focusActiveHandle(e){this.dragProp==="minValue"?this.minHandle.focus():this.dragProp==="maxValue"||this.dragProp==="value"?this.maxHandle.focus():this.dragProp==="minMaxValue"&&this.getClosestHandle(e).focus()}emitInput(){this.calciteSliderInput.emit()}emitChange(){this.calciteSliderChange.emit(),this.previousEmittedValue=this.value}removeDragListeners(){window.removeEventListener("pointermove",this.dragUpdate),window.removeEventListener("pointerup",this.pointerUpDragEnd),window.removeEventListener("pointercancel",this.dragEnd)}setValue(e){let t;if(Object.keys(e).forEach(a=>{let s=e[a];t||(t=this[a]!==s),this[a]=s}),!t)return;this.dragProp||this.emitChange(),this.emitInput()}setThumbEl(e){if(!e)return;e.getAttribute("data-value-prop")==="minValue"?this.minHandle=e:this.maxHandle=e}clamp(e,t){return e=ie(e,this.min,this.max),t==="maxValue"&&(e=Math.max(e,this.minValue)),t==="minValue"&&(e=Math.min(e,this.maxValue)),e}mapToRange(e){let t=this.max-this.min,{left:i,width:a}=this.trackRef.value.getBoundingClientRect()||{left:0,width:0},s=(e-i)/a,n=this.shouldMirror(),o=this.clamp(this.min+t*(n?1-s:s)),r=Number(o.toFixed(H(this.step)));return this.snap&&this.step?this.getClosestStep(r):r}getClosestStep(e){let{max:t,min:i,step:a}=this,s=new Q(`${Math.floor((e-i)/a)}`).multiply(`${a}`).add(`${i}`).toString(),n=this.clamp(Number(s));return n>t&&(n-=a),n}getClosestHandle(e){return this.getDistanceX(this.maxHandle,e)>this.getDistanceX(this.minHandle,e)?this.minHandle:this.maxHandle}getDistanceX(e,t){return Math.abs(e.getBoundingClientRect().left-t)}getFontSizeForElement(e){return Number(window.getComputedStyle(e).getPropertyValue("font-size").match(/\d+/)[0])}getUnitInterval(e){e=this.clamp(e);let t=this.max-this.min;return(e-this.min)/t}adjustHostObscuredHandleLabel(e){let t=this.el.shadowRoot.querySelector(`.handle__label--${e}`),i=this.el.shadowRoot.querySelector(`.handle__label--${e}.static`),a=this.el.shadowRoot.querySelector(`.handle__label--${e}.transformed`),s=i.getBoundingClientRect(),n=this.getHostOffset(s.left,s.right);t.style.transform=`translateX(${n}px)`,a.style.transform=`translateX(${n}px)`}hyphenateCollidingRangeHandleLabels(){let{shadowRoot:e}=this.el,t=this.shouldMirror(),i=t?"value":"minValue",a=t?"minValue":"value",s=e.querySelector(`.handle__label--${i}`),n=e.querySelector(`.handle__label--${i}.static`),o=e.querySelector(`.handle__label--${i}.transformed`),r=this.getHostOffset(n.getBoundingClientRect().left,n.getBoundingClientRect().right),c=e.querySelector(`.handle__label--${a}`),d=e.querySelector(`.handle__label--${a}.static`),u=e.querySelector(`.handle__label--${a}.transformed`),m=this.getHostOffset(d.getBoundingClientRect().left,d.getBoundingClientRect().right),v=this.getFontSizeForElement(s),f=this.getRangeLabelOverlap(o,u),x=s,g=v/2;if(f>0){if(x.classList.add(l.hyphen,l.hyphenWrap),m===0&&r===0){let h=f/2-g;h=Math.sign(h)===-1?Math.abs(h):-h;let V=this.getHostOffset(o.getBoundingClientRect().left+h-g,o.getBoundingClientRect().right+h-g),y=f/2,L=this.getHostOffset(u.getBoundingClientRect().left+y,u.getBoundingClientRect().right+y);V!==0&&(h+=V,y+=V),L!==0&&(h+=L,y+=L),s.style.transform=`translateX(${h}px)`,o.style.transform=`translateX(${h-g}px)`,c.style.transform=`translateX(${y}px)`,u.style.transform=`translateX(${y}px)`}else if(r>0||m>0)s.style.transform=`translateX(${r+g}px)`,c.style.transform=`translateX(${f+m}px)`,u.style.transform=`translateX(${f+m}px)`;else if(r<0||m<0){let h=Math.abs(r)+f-g;h=Math.sign(h)===-1?Math.abs(h):-h,s.style.transform=`translateX(${h}px)`,o.style.transform=`translateX(${h-g}px)`}}else x.classList.remove(l.hyphen,l.hyphenWrap),s.style.transform=`translateX(${r}px)`,o.style.transform=`translateX(${r}px)`,c.style.transform=`translateX(${m}px)`,u.style.transform=`translateX(${m}px)`}hideObscuredBoundingTickLabels(){let e=b(this.value);if(!this.hasHistogram&&!e&&!this.labelHandles&&!this.precise||!this.hasHistogram&&!e&&this.labelHandles&&!this.precise||!this.hasHistogram&&!e&&!this.labelHandles&&this.precise||!this.hasHistogram&&!e&&this.labelHandles&&this.precise||!this.hasHistogram&&e&&!this.precise||this.hasHistogram&&!this.precise&&!this.labelHandles)return;let t=this.el.shadowRoot.querySelector(`.${l.thumbMinValue}`),i=this.el.shadowRoot.querySelector(`.${l.thumbValue}`),a=this.el.shadowRoot.querySelector(`.${l.tickMin}`),s=this.el.shadowRoot.querySelector(`.${l.tickMax}`);!t&&i&&a&&s&&(a.style.opacity=this.isMinTickLabelObscured(a,i)?"0":"1",s.style.opacity=this.isMaxTickLabelObscured(s,i)?"0":"1"),t&&i&&a&&s&&(a.style.opacity=this.isMinTickLabelObscured(a,t)||this.isMinTickLabelObscured(a,i)?"0":"1",s.style.opacity=this.isMaxTickLabelObscured(s,t)||this.isMaxTickLabelObscured(s,i)&&this.hasHistogram?"0":"1")}getHostOffset(e,t){let{left:i,right:a}=this.el.getBoundingClientRect();return e<i?i-e:t>a?-(t-a):0}getRangeLabelOverlap(e,t){let i=e.getBoundingClientRect(),a=t.getBoundingClientRect(),s=this.getFontSizeForElement(e),n=i.right+s-a.left;return Math.max(n,0)}isMinTickLabelObscured(e,t){let i=e.getBoundingClientRect(),a=t.getBoundingClientRect();return R(i,a)}isMaxTickLabelObscured(e,t){let i=e.getBoundingClientRect(),a=t.getBoundingClientRect();return R(i,a)}internalLabelFormatter(e,t){let i=this.labelFormatter;if(!i)return this.formatValue(e);let a=i(e,t,this.formatValue);return a??this.formatValue(e)}render(){let e=this.el.id||this.guid,t=b(this.value)?this.maxValue:this.value,i=this.minValue||this.min,a=this.shouldUseMinValue(),s=this.getUnitInterval(a?this.minValue:i)*100,n=this.getUnitInterval(t)*100,o=this.shouldMirror(),r=b(this.value),c=this.buildThumbType("max"),d=this.renderThumb({type:c,thumbPlacement:c.includes("histogram")?"below":"above",maxInterval:n,minInterval:s,mirror:o}),u=this.buildThumbType("min"),m=r?this.renderThumb({type:u,thumbPlacement:u.includes("histogram")||u.includes("precise")?"below":"above",maxInterval:n,minInterval:s,mirror:o}):null,v=r?"start":this.fillPlacement,f=v==="none"?{left:"unset",right:"unset"}:v==="end"?{left:`${o?s:n}%`,right:`${o?n:s}%`}:{left:`${o?100-n:s}%`,right:`${o?s:100-n}%`};return O(this.el,"id",e),this.interactiveContainer({disabled:this.disabled,children:k`${this.labelText&&te({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div aria-errormessage=${D.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaLabel=${ee(this)} .ariaRequired=${this.required} class=${p({[l.container]:!0,[l.containerRange]:r,[l.scale(this.scale)]:!0})}>${this.renderGraph()}<div class=${p(l.track)} ${T(this.trackRef)}><div class=${p(l.trackRange)} @pointerdown=${this.onTrackPointerDown} style=${M(f)}></div><div class=${p(l.ticks)}>${this.tickValues.map(x=>{let g=`${this.getUnitInterval(x)*100}%`,h=!1;if(v==="start"||v==="end")if(a)h=x>=this.minValue&&x<=this.maxValue;else{let V=v==="start"?i:t,y=v==="start"?t:this.max;h=x>=V&&x<=y}return k`<span class=${p({[l.tick]:!0,[l.tickActive]:h})} style=${M({left:o?"":g,right:o?g:""})}>${this.renderTickLabel(x)}</span>`})}</div></div><div class=${p(l.thumbContainer)}>${m}${d}${K({component:this})}</div></div>${this.validationMessage&&this.status==="invalid"?ae({icon:this.validationIcon,id:D.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}renderThumb({type:e,mirror:t,thumbPlacement:i,minInterval:a,maxInterval:s}){let n=e.includes("labeled"),o=e.includes("precise"),r=e.includes("min"),c=b(this.value),d=r?this.minValue:c?this.maxValue:this.value,u=r?"minValue":c?"maxValue":"value",m=r?this.minLabel:c?this.maxLabel:this.minLabel,v=r?this.minValue:d,f=u==="minValue"?this.internalLabelFormatter(this.minValue,"min"):u==="maxValue"?this.internalLabelFormatter(this.maxValue,"max"):this.internalLabelFormatter(d,"value"),x=r?{left:`${t?100-a:a}%`}:{right:`${t?s:100-s}%`},g=`${l.handleLabel} ${r?l.handleLabelMinValue:l.handleLabelValue}`,V=[...n?[k`<span aria-hidden=true class=${p(g)}>${f}</span>`,k`<span aria-hidden=true class=${`${g} ${l.static}`}>${f}</span>`,k`<span aria-hidden=true class=${`${g} ${l.transformed}`}>${f}</span>`]:[],k`<div class=${p(l.handle)}></div>`,o&&k`<div class=${p(l.handleExtension)}></div>`||""];return i==="below"&&V.reverse(),q(e,k`<div .ariaLabel=${m} aria-orientation=horizontal .ariaValueMax=${this.max} .ariaValueMin=${this.min} .ariaValueNow=${v} class=${p({[l.thumb]:!0,[l.thumbValue]:!r,[l.thumbActive]:this.lastDragProp!=="minMaxValue"&&this.dragProp===u,[l.thumbPrecise]:o,[l.thumbMinValue]:r})} data-value-prop=${u??C} @blur=${this.onThumbBlur} @focus=${this.onThumbFocus} @pointerdown=${this.onThumbPointerDown} role=slider style=${M(x)} tabindex=0 ${T(this.setThumbEl)}>${V}</div>`)}renderGraph(){return this.histogram?k`<calcite-graph class=${p(l.graph)} .colorStops=${this.histogramStops} .data=${this.histogram} .highlightMax=${b(this.value)?this.maxValue:this.value} .highlightMin=${b(this.value)?this.minValue:this.min} .max=${this.max} .min=${this.min}></calcite-graph>`:null}renderTickLabel(e){let{hasHistogram:t,labelHandles:i,labelTicks:a,max:s,min:n,precise:o,value:r}=this,c=b(r),d=e===n,u=e===s,m=d||u;return a&&(!t&&(m||!o||!c)||t&&(m||!o&&!i))?k`<span class=${p({[l.tickLabel]:!0,[l.tickMin]:d,[l.tickMax]:u})}>${this.internalLabelFormatter(e,"tick")}</span>`:null}};A("calcite-slider",P);export{P as Slider};
|
|
3
|
+
v5.0.0-next.24 */
|
|
4
|
+
import{a as ie,b as H}from"./MFBAIO26.js";import{d as Q,m as S}from"./HA5H546A.js";import{a as ae}from"./CD3UAK2W.js";import{a as te}from"./HSHIW42B.js";import{c as Y,d as Z,e as ee}from"./ZT6GWFZI.js";import{c as N,e as j,f as G,h as K}from"./FVRYO4N6.js";import{a as W}from"./L2VNGTSR.js";import{a as q}from"./VKUS34R6.js";import{a as J}from"./VJ7Q2QJV.js";import{a as U}from"./EQ25YK3K.js";import{a as X}from"./MT4G6FVR.js";import"./4JL57EDA.js";import"./VKBFZH3Q.js";import{p as R,w as _}from"./W35ZAP2H.js";import{a as I}from"./EK3BWMVE.js";import{B,C as T,D as F,E as p,F as M,H as O,I as E,P as A,g as z,h as k,l as C,o as w}from"./GAXQ53KY.js";var l={container:"container",containerRange:"container--range",graph:"graph",handle:"handle",handleExtension:"handle-extension",handleLabel:"handle__label",handleLabelMinValue:"handle__label--minValue",handleLabelValue:"handle__label--value",hyphen:"hyphen",hyphenWrap:"hyphen--wrap",static:"static",thumb:"thumb",thumbActive:"thumb--active",thumbContainer:"thumb-container",thumbMinValue:"thumb--minValue",thumbPrecise:"thumb--precise",thumbValue:"thumb--value",tick:"tick",tickActive:"tick--active",tickLabel:"tick__label",tickMax:"tick__label--max",tickMin:"tick__label--min",ticks:"ticks",track:"track",trackRange:"track__range",transformed:"transformed",scale:$=>`scale--${$}`},se="calcite-slider",D={validationMessage:"validationMessage",host:$=>`${se}-${$}`},le=250,ne=z`@charset "UTF-8";:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}.scale--s{--calcite-slider-handle-size: .625rem;--calcite-slider-handle-extension-height: .4rem;--calcite-slider-container-font-size: var(--calcite-font-size--3)}.scale--s .handle__label,.scale--s .tick__label{line-height:.75rem}.scale--m{--calcite-slider-handle-size: .875rem;--calcite-slider-handle-extension-height: .5rem;--calcite-slider-container-font-size: var(--calcite-font-size--2)}.scale--m .handle__label,.scale--m .tick__label{line-height:1rem}.scale--l{--calcite-slider-handle-size: 1rem;--calcite-slider-handle-extension-height: .65rem;--calcite-slider-container-font-size: var(--calcite-font-size--1)}.scale--l .handle__label,.scale--l .tick__label{line-height:1rem}.handle__label,.tick__label{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-slider-text-color, var(--calcite-color-text-2));font-size:var(--calcite-slider-container-font-size)}:host{display:block}:host .validation-container{padding-block-start:0!important}.container{position:relative;display:block;overflow-wrap:normal;word-break:normal;padding-inline:calc(var(--calcite-slider-handle-size) * .5);padding-block:calc(var(--calcite-slider-handle-size) * .5);margin-block:calc(var(--calcite-slider-handle-size) * .5);margin-inline:0;--calcite-slider-full-handle-height: calc( var(--calcite-slider-handle-size) + var(--calcite-slider-handle-extension-height) );touch-action:none;-webkit-user-select:none;user-select:none}:host([disabled]) .track__range,:host([disabled]) .tick--active{background-color:var(--calcite-color-text-3)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.scale--s .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -.375rem}.scale--m .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -.5rem}.scale--l .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -.55rem}:host([precise]:not([has-histogram])) .container .thumb--value{--calcite-slider-thumb-y-offset: calc(var(--calcite-slider-full-handle-height) * -1)}.thumb-container{position:relative;max-inline-size:100%}.thumb{--calcite-slider-thumb-x-offset: calc(var(--calcite-slider-handle-size) * .5);position:absolute;margin:0;display:flex;cursor:pointer;flex-direction:column;align-items:center;border-style:none;background-color:transparent;padding:0;font-family:inherit;outline:2px solid transparent;outline-offset:2px;transform:translate(var(--calcite-slider-thumb-x-offset),var(--calcite-slider-thumb-y-offset))}.thumb .handle__label{white-space:nowrap}.thumb .handle__label.static,.thumb .handle__label.transformed{position:absolute;inset-block:0px;opacity:0}.thumb .handle__label.hyphen:after{content:"—";display:inline-block;inline-size:1em}.thumb .handle__label.hyphen--wrap{display:flex}.thumb .handle{box-sizing:border-box;border-radius:9999px;outline-color:transparent;background-color:var(--calcite-slider-handle-fill-color, var(--calcite-color-foreground-1));block-size:var(--calcite-slider-handle-size);inline-size:var(--calcite-slider-handle-size);box-shadow:0 0 0 2px var(--calcite-color-text-3) inset;transition:border var(--calcite-internal-animation-timing-medium) ease,background-color var(--calcite-internal-animation-timing-medium) ease,box-shadow var(--calcite-animation-timing) ease}.thumb .handle-extension{inline-size:.125rem;block-size:var(--calcite-slider-handle-extension-height);background-color:var(--calcite-slider-handle-extension-color, var(--calcite-color-text-3))}.thumb:hover .handle{box-shadow:0 0 0 3px var(--calcite-color-brand) inset}.thumb:hover .handle-extension{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand))}.thumb:focus .handle{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.thumb:focus .handle-extension{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand))}.thumb.thumb--minValue{transform:translate(calc(var(--calcite-slider-thumb-x-offset) * -1),var(--calcite-slider-thumb-y-offset))}.thumb.thumb--precise{--calcite-slider-thumb-y-offset: -.125rem}:host([label-handles]) .thumb{--calcite-slider-thumb-x-offset: 50%}:host([label-handles]):host(:not([has-histogram])) .scale--s .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -1.4375rem}:host([label-handles]):host(:not([has-histogram])) .scale--m .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -1.875rem}:host([label-handles]):host(:not([has-histogram])) .scale--l .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -2rem}:host([has-histogram][label-handles]) .handle__label,:host([label-handles]:not([has-histogram])) .thumb--minValue.thumb--precise .handle__label{margin-block-start:.5em}:host(:not([has-histogram]):not([precise])) .handle__label,:host([label-handles]:not([has-histogram])) .thumb--value .handle__label{margin-block-end:.5em}:host([label-handles][precise]):host(:not([has-histogram])) .scale--s .thumb--value{--calcite-slider-thumb-y-offset: -2.075rem}:host([label-handles][precise]):host(:not([has-histogram])) .scale--m .thumb--value{--calcite-slider-thumb-y-offset: -2.75rem}:host([label-handles][precise]):host(:not([has-histogram])) .scale--l .thumb--value{--calcite-slider-thumb-y-offset: -3.0625rem}.thumb:focus .handle,.thumb--active .handle{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand));box-shadow:0 0 8px #00000029}.thumb:hover.thumb--precise:after,.thumb:focus.thumb--precise:after,.thumb--active.thumb--precise:after{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand))}.track{position:relative;block-size:.125rem;border-radius:0;background-color:var(--calcite-slider-track-color, var(--calcite-color-border-2));transition:all var(--calcite-internal-animation-timing-medium) ease-in}.track__range{position:absolute;inset-block-start:0px;block-size:.125rem;background-color:var(--calcite-slider-track-fill-color, var(--calcite-color-brand))}.container--range .track__range:hover{cursor:ew-resize}.container--range .track__range:after{position:absolute;inline-size:100%;content:"";inset-block-start:calc(var(--calcite-slider-full-handle-height) * .5 * -1);block-size:calc(var(--calcite-slider-handle-size) + var(--calcite-slider-handle-extension-height))}@media(forced-colors:active){.thumb{outline-width:0;outline-offset:0}.handle{outline:2px solid transparent;outline-offset:2px}.thumb:focus .handle,.thumb .handle-extension,.thumb:hover .handle-extension,.thumb:focus .handle-extension,.thumb:active .handle-extension{background-color:canvasText}.track{background-color:canvasText}.track__range{background-color:highlight}}.tick{position:absolute;block-size:.25rem;inline-size:.125rem;border-width:1px;border-style:solid;background-color:var(--calcite-slider-tick-color, var(--calcite-color-border-input));border-color:var(--calcite-slider-tick-border-color, var(--calcite-color-foreground-1));inset-block-start:-2px;pointer-events:none;margin-inline-start:-.125rem}.tick--active{background-color:var(--calcite-slider-tick-selected-color, var(--calcite-color-brand))}.tick__label{pointer-events:none;margin-block-start:.875rem;display:flex;justify-content:center}.tick__label--min{transition:opacity var(--calcite-animation-timing)}.tick__label--max{transition:opacity var(--calcite-internal-animation-timing-fast)}:host([has-histogram][label-handles]) .tick__label--min,:host([has-histogram][label-handles]) .tick__label--max,:host([has-histogram][precise]) .tick__label--min,:host([has-histogram][precise]) .tick__label--max{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-3)}.graph{color:var(--calcite-slider-graph-color, var(--calcite-color-foreground-3));block-size:48px}:host([label-ticks][ticks]) .container{padding-block-end:calc(.875rem + var(--calcite-slider-container-font-size))}:host([has-histogram]):host([precise][label-handles]) .container{padding-block-end:calc(var(--calcite-slider-full-handle-height) + 1em)}:host([has-histogram]):host([label-handles]:not([precise])) .container{padding-block-end:calc(var(--calcite-slider-handle-size) * .5 + 1em)}:host([has-histogram]):host([precise]:not([label-handles])) .container{padding-block-end:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([precise]:not([label-handles])) .container{padding-block-start:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([precise]:not([label-handles])) .container--range{padding-block-end:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([label-handles]:not([precise])) .container{padding-block-start:calc(var(--calcite-slider-full-handle-height) + 4px)}:host(:not([has-histogram])):host([label-handles][precise]) .container{padding-block-start:calc(var(--calcite-slider-full-handle-height) + var(--calcite-slider-container-font-size) + 4px)}:host(:not([has-histogram])):host([label-handles][precise]) .container--range{padding-block-end:calc(var(--calcite-slider-full-handle-height) + var(--calcite-slider-container-font-size) + 4px)}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`;function b($){return Array.isArray($)}var P=class extends F{constructor(){super(),this.dragEnd=e=>{this.disabled||(this.removeDragListeners(),this.focusActiveHandle(e.clientX),this.lastDragPropValue!=this[this.dragProp]&&this.emitChange(),this.dragProp=null,this.lastDragPropValue=null,this.minValueDragRange=null,this.maxValueDragRange=null,this.minMaxValueRange=null)},this.dragUpdate=e=>{if(!(this.disabled||!this.trackRef.value)&&(e.preventDefault(),this.dragProp)){let t=this.mapToRange(e.clientX||e.pageX);if(b(this.value)&&this.dragProp==="minMaxValue")if(this.minValueDragRange&&this.maxValueDragRange&&this.minMaxValueRange){let i=t-this.minValueDragRange,a=t+this.maxValueDragRange;a<=this.max&&i>=this.min&&a-i===this.minMaxValueRange&&this.setValue({minValue:this.clamp(i,"minValue"),maxValue:this.clamp(a,"maxValue")})}else this.minValueDragRange=t-this.minValue,this.maxValueDragRange=this.maxValue-t,this.minMaxValueRange=this.maxValue-this.minValue;else if(b(this.value)&&b(this.previousEmittedValue)&&this.dragProp==="maxValue"){let[i,a]=this.previousEmittedValue;i===a&&t<i?(this.dragProp="minValue",this.minHandle.focus()):this.setValue({[this.dragProp]:this.clamp(t,this.dragProp)})}else this.setValue({[this.dragProp]:this.clamp(t,this.dragProp)})}},this.formatValue=e=>(S.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},S.localize(e.toString())),this.guid=D.host(I()),this.messages=U(),this.pointerUpDragEnd=e=>{this.disabled||!_(e)||this.dragEnd(e)},this.trackRef=B(),this.focusSetter=X()(this),this.interactiveContainer=W(this),this.activeProp="value",this.maxValueDragRange=null,this.minMaxValueRange=null,this.minValueDragRange=null,this.tickValues=[],this.disabled=!1,this.fillPlacement="start",this.groupSeparator=!1,this.hasHistogram=!1,this.labelHandles=!1,this.labelTicks=!1,this.max=100,this.min=0,this.mirrored=!1,this.precise=!1,this.required=!1,this.scale="m",this.snap=!1,this.status="idle",this.step=1,this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.value=0,this.calciteSliderChange=w({cancelable:!1}),this.calciteSliderInput=w({cancelable:!1}),this.listen("pointerdown",this.pointerDownHandler),this.listen("keydown",this.handleKeyDown),this.listen("touchstart",this.handleTouchStart)}static{this.properties={activeProp:[16,{},{state:!0}],maxValueDragRange:[16,{},{state:!0}],minMaxValueRange:[16,{},{state:!0}],minValueDragRange:[16,{},{state:!0}],tickValues:[16,{},{state:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],fillPlacement:[3,{},{reflect:!0}],form:[3,{},{reflect:!0}],groupSeparator:[7,{},{reflect:!0,type:Boolean}],hasHistogram:[7,{},{reflect:!0,type:Boolean}],histogram:[0,{},{attribute:!1}],histogramStops:[0,{},{attribute:!1}],labelFormatter:[0,{},{attribute:!1}],labelHandles:[7,{},{reflect:!0,type:Boolean}],labelTicks:[7,{},{reflect:!0,type:Boolean}],max:[11,{},{reflect:!0,type:Number}],maxLabel:1,maxValue:[9,{},{type:Number}],min:[11,{},{reflect:!0,type:Number}],minLabel:1,labelText:1,messageOverrides:[0,{},{attribute:!1}],minValue:[9,{},{type:Number}],mirrored:[7,{},{reflect:!0,type:Boolean}],name:[3,{},{reflect:!0}],numberingSystem:1,pageStep:[11,{},{reflect:!0,type:Number}],precise:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],snap:[7,{},{reflect:!0,type:Boolean}],status:[3,{},{reflect:!0}],step:[11,{},{reflect:!0,type:Number}],ticks:[11,{},{reflect:!0,type:Number}],validationIcon:[3,{converter:E,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:[11,{},{type:Number,reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=ne}async setFocus(e){return this.focusSetter(()=>this.minHandle||this.maxHandle,e)}connectedCallback(){super.connectedCallback(),this.setMinMaxFromValue(),this.setValueFromMinMax(),Y(this),N(this),this.previousEmittedValue=this.value}load(){b(this.value)||(this.value=this.snap?this.getClosestStep(this.value):this.clamp(this.value)),G(this,this.value)}willUpdate(e){e.has("histogram")&&(this.hasHistogram=!!this.histogram),e.has("ticks")&&(this.tickValues=this.generateTickValues()),e.has("value")&&(this.hasUpdated||this.value!==0)&&this.setMinMaxFromValue(),(e.has("minValue")||e.has("maxValue"))&&this.setValueFromMinMax()}updated(){this.labelHandles&&(this.adjustHostObscuredHandleLabel("value"),b(this.value)&&(this.adjustHostObscuredHandleLabel("minValue"),this.precise&&!this.hasHistogram||this.hyphenateCollidingRangeHandleLabels())),this.hideObscuredBoundingTickLabels()}disconnectedCallback(){super.disconnectedCallback(),Z(this),j(this),this.removeDragListeners()}handleKeyDown(e){let t=this.shouldMirror(),{activeProp:i,max:a,min:s,pageStep:n,step:o}=this,r=this[i],{key:c}=e;if(J(c)){e.preventDefault();return}let d;if(c==="ArrowUp"||c==="ArrowRight"?d=r+o*(t&&c==="ArrowRight"?-1:1):c==="ArrowDown"||c==="ArrowLeft"?d=r-o*(t&&c==="ArrowLeft"?-1:1):c==="PageUp"?n&&(d=r+n):c==="PageDown"?n&&(d=r-n):c==="Home"?d=s:c==="End"&&(d=a),isNaN(d))return;e.preventDefault();let u=Number(d.toFixed(H(o)));this.setValue({[i]:this.clamp(u,i)})}pointerDownHandler(e){if(this.disabled||!_(e))return;let t=e.clientX||e.pageX,i=this.mapToRange(t),a="value";b(this.value)&&(i>=this.minValue&&i<=this.maxValue&&this.lastDragProp==="minMaxValue"?a="minMaxValue":a=Math.abs(this.maxValue-i)<Math.abs(this.minValue-i)||i>=this.maxValue?"maxValue":"minValue"),this.lastDragPropValue=this[a],this.dragStart(a),this.el.shadowRoot.querySelector(`.${l.thumb}:active`)||this.setValue({[a]:this.clamp(i,a)}),this.focusActiveHandle(t)}handleTouchStart(e){e.preventDefault()}buildThumbType(e){let t=[e];return this.labelHandles&&t.push("labeled"),this.precise&&t.push("precise"),this.hasHistogram&&t.push("histogram"),t.join("-")}setValueFromMinMax(){let{minValue:e,maxValue:t}=this;typeof e=="number"&&typeof t=="number"&&(this.value=[e,t])}setMinMaxFromValue(){let{value:e}=this;b(e)&&(this.minValue=e[0],this.maxValue=e[1])}onLabelClick(){this.setFocus()}shouldMirror(){return this.mirrored&&!this.hasHistogram}shouldUseMinValue(){return b(this.value)?this.hasHistogram&&this.maxValue===0||!this.hasHistogram&&this.minValue===0:!1}getTickDensity(){let e=(this.max-this.min)/this.ticks/le;return e<1?1:e}generateTickValues(){let e=this.ticks??0;if(e<=0)return[];let t=[this.min],i=this.getTickDensity(),a=e*i,s=this.min;for(;s<this.max;)s+=a,t.push(Math.min(s,this.max));return t.includes(this.max)||t.push(this.max),t}onThumbBlur(){this.activeProp=null}onThumbFocus(e){let t=e.currentTarget;this.activeProp=t.getAttribute("data-value-prop")}onThumbPointerDown(e){let t=e.currentTarget;this.pointerDownDragStart(e,t.getAttribute("data-value-prop"))}onTrackPointerDown(e){this.pointerDownDragStart(e,"minMaxValue")}pointerDownDragStart(e,t){_(e)&&this.dragStart(t)}dragStart(e){this.dragProp=e,this.lastDragProp=this.dragProp,this.activeProp=e,window.addEventListener("pointermove",this.dragUpdate),window.addEventListener("pointerup",this.pointerUpDragEnd),window.addEventListener("pointercancel",this.dragEnd)}focusActiveHandle(e){this.dragProp==="minValue"?this.minHandle.focus():this.dragProp==="maxValue"||this.dragProp==="value"?this.maxHandle.focus():this.dragProp==="minMaxValue"&&this.getClosestHandle(e).focus()}emitInput(){this.calciteSliderInput.emit()}emitChange(){this.calciteSliderChange.emit(),this.previousEmittedValue=this.value}removeDragListeners(){window.removeEventListener("pointermove",this.dragUpdate),window.removeEventListener("pointerup",this.pointerUpDragEnd),window.removeEventListener("pointercancel",this.dragEnd)}setValue(e){let t;if(Object.keys(e).forEach(a=>{let s=e[a];t||(t=this[a]!==s),this[a]=s}),!t)return;this.dragProp||this.emitChange(),this.emitInput()}setThumbEl(e){if(!e)return;e.getAttribute("data-value-prop")==="minValue"?this.minHandle=e:this.maxHandle=e}clamp(e,t){return e=ie(e,this.min,this.max),t==="maxValue"&&(e=Math.max(e,this.minValue)),t==="minValue"&&(e=Math.min(e,this.maxValue)),e}mapToRange(e){let t=this.max-this.min,{left:i,width:a}=this.trackRef.value.getBoundingClientRect()||{left:0,width:0},s=(e-i)/a,n=this.shouldMirror(),o=this.clamp(this.min+t*(n?1-s:s)),r=Number(o.toFixed(H(this.step)));return this.snap&&this.step?this.getClosestStep(r):r}getClosestStep(e){let{max:t,min:i,step:a}=this,s=new Q(`${Math.floor((e-i)/a)}`).multiply(`${a}`).add(`${i}`).toString(),n=this.clamp(Number(s));return n>t&&(n-=a),n}getClosestHandle(e){return this.getDistanceX(this.maxHandle,e)>this.getDistanceX(this.minHandle,e)?this.minHandle:this.maxHandle}getDistanceX(e,t){return Math.abs(e.getBoundingClientRect().left-t)}getFontSizeForElement(e){return Number(window.getComputedStyle(e).getPropertyValue("font-size").match(/\d+/)[0])}getUnitInterval(e){e=this.clamp(e);let t=this.max-this.min;return(e-this.min)/t}adjustHostObscuredHandleLabel(e){let t=this.el.shadowRoot.querySelector(`.handle__label--${e}`),i=this.el.shadowRoot.querySelector(`.handle__label--${e}.static`),a=this.el.shadowRoot.querySelector(`.handle__label--${e}.transformed`),s=i.getBoundingClientRect(),n=this.getHostOffset(s.left,s.right);t.style.transform=`translateX(${n}px)`,a.style.transform=`translateX(${n}px)`}hyphenateCollidingRangeHandleLabels(){let{shadowRoot:e}=this.el,t=this.shouldMirror(),i=t?"value":"minValue",a=t?"minValue":"value",s=e.querySelector(`.handle__label--${i}`),n=e.querySelector(`.handle__label--${i}.static`),o=e.querySelector(`.handle__label--${i}.transformed`),r=this.getHostOffset(n.getBoundingClientRect().left,n.getBoundingClientRect().right),c=e.querySelector(`.handle__label--${a}`),d=e.querySelector(`.handle__label--${a}.static`),u=e.querySelector(`.handle__label--${a}.transformed`),m=this.getHostOffset(d.getBoundingClientRect().left,d.getBoundingClientRect().right),v=this.getFontSizeForElement(s),f=this.getRangeLabelOverlap(o,u),x=s,g=v/2;if(f>0){if(x.classList.add(l.hyphen,l.hyphenWrap),m===0&&r===0){let h=f/2-g;h=Math.sign(h)===-1?Math.abs(h):-h;let V=this.getHostOffset(o.getBoundingClientRect().left+h-g,o.getBoundingClientRect().right+h-g),y=f/2,L=this.getHostOffset(u.getBoundingClientRect().left+y,u.getBoundingClientRect().right+y);V!==0&&(h+=V,y+=V),L!==0&&(h+=L,y+=L),s.style.transform=`translateX(${h}px)`,o.style.transform=`translateX(${h-g}px)`,c.style.transform=`translateX(${y}px)`,u.style.transform=`translateX(${y}px)`}else if(r>0||m>0)s.style.transform=`translateX(${r+g}px)`,c.style.transform=`translateX(${f+m}px)`,u.style.transform=`translateX(${f+m}px)`;else if(r<0||m<0){let h=Math.abs(r)+f-g;h=Math.sign(h)===-1?Math.abs(h):-h,s.style.transform=`translateX(${h}px)`,o.style.transform=`translateX(${h-g}px)`}}else x.classList.remove(l.hyphen,l.hyphenWrap),s.style.transform=`translateX(${r}px)`,o.style.transform=`translateX(${r}px)`,c.style.transform=`translateX(${m}px)`,u.style.transform=`translateX(${m}px)`}hideObscuredBoundingTickLabels(){let e=b(this.value);if(!this.hasHistogram&&!e&&!this.labelHandles&&!this.precise||!this.hasHistogram&&!e&&this.labelHandles&&!this.precise||!this.hasHistogram&&!e&&!this.labelHandles&&this.precise||!this.hasHistogram&&!e&&this.labelHandles&&this.precise||!this.hasHistogram&&e&&!this.precise||this.hasHistogram&&!this.precise&&!this.labelHandles)return;let t=this.el.shadowRoot.querySelector(`.${l.thumbMinValue}`),i=this.el.shadowRoot.querySelector(`.${l.thumbValue}`),a=this.el.shadowRoot.querySelector(`.${l.tickMin}`),s=this.el.shadowRoot.querySelector(`.${l.tickMax}`);!t&&i&&a&&s&&(a.style.opacity=this.isMinTickLabelObscured(a,i)?"0":"1",s.style.opacity=this.isMaxTickLabelObscured(s,i)?"0":"1"),t&&i&&a&&s&&(a.style.opacity=this.isMinTickLabelObscured(a,t)||this.isMinTickLabelObscured(a,i)?"0":"1",s.style.opacity=this.isMaxTickLabelObscured(s,t)||this.isMaxTickLabelObscured(s,i)&&this.hasHistogram?"0":"1")}getHostOffset(e,t){let{left:i,right:a}=this.el.getBoundingClientRect();return e<i?i-e:t>a?-(t-a):0}getRangeLabelOverlap(e,t){let i=e.getBoundingClientRect(),a=t.getBoundingClientRect(),s=this.getFontSizeForElement(e),n=i.right+s-a.left;return Math.max(n,0)}isMinTickLabelObscured(e,t){let i=e.getBoundingClientRect(),a=t.getBoundingClientRect();return R(i,a)}isMaxTickLabelObscured(e,t){let i=e.getBoundingClientRect(),a=t.getBoundingClientRect();return R(i,a)}internalLabelFormatter(e,t){let i=this.labelFormatter;if(!i)return this.formatValue(e);let a=i(e,t,this.formatValue);return a??this.formatValue(e)}render(){let e=this.el.id||this.guid,t=b(this.value)?this.maxValue:this.value,i=this.minValue||this.min,a=this.shouldUseMinValue(),s=this.getUnitInterval(a?this.minValue:i)*100,n=this.getUnitInterval(t)*100,o=this.shouldMirror(),r=b(this.value),c=this.buildThumbType("max"),d=this.renderThumb({type:c,thumbPlacement:c.includes("histogram")?"below":"above",maxInterval:n,minInterval:s,mirror:o}),u=this.buildThumbType("min"),m=r?this.renderThumb({type:u,thumbPlacement:u.includes("histogram")||u.includes("precise")?"below":"above",maxInterval:n,minInterval:s,mirror:o}):null,v=r?"start":this.fillPlacement,f=v==="none"?{left:"unset",right:"unset"}:v==="end"?{left:`${o?s:n}%`,right:`${o?n:s}%`}:{left:`${o?100-n:s}%`,right:`${o?s:100-n}%`};return O(this.el,"id",e),this.interactiveContainer({disabled:this.disabled,children:k`${this.labelText&&te({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div aria-errormessage=${D.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaLabel=${ee(this)} .ariaRequired=${this.required} class=${p({[l.container]:!0,[l.containerRange]:r,[l.scale(this.scale)]:!0})}>${this.renderGraph()}<div class=${p(l.track)} ${T(this.trackRef)}><div class=${p(l.trackRange)} @pointerdown=${this.onTrackPointerDown} style=${M(f)}></div><div class=${p(l.ticks)}>${this.tickValues.map(x=>{let g=`${this.getUnitInterval(x)*100}%`,h=!1;if(v==="start"||v==="end")if(a)h=x>=this.minValue&&x<=this.maxValue;else{let V=v==="start"?i:t,y=v==="start"?t:this.max;h=x>=V&&x<=y}return k`<span class=${p({[l.tick]:!0,[l.tickActive]:h})} style=${M({left:o?"":g,right:o?g:""})}>${this.renderTickLabel(x)}</span>`})}</div></div><div class=${p(l.thumbContainer)}>${m}${d}${K({component:this})}</div></div>${this.validationMessage&&this.status==="invalid"?ae({icon:this.validationIcon,id:D.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}renderThumb({type:e,mirror:t,thumbPlacement:i,minInterval:a,maxInterval:s}){let n=e.includes("labeled"),o=e.includes("precise"),r=e.includes("min"),c=b(this.value),d=r?this.minValue:c?this.maxValue:this.value,u=r?"minValue":c?"maxValue":"value",m=r?this.minLabel:c?this.maxLabel:this.minLabel,v=r?this.minValue:d,f=u==="minValue"?this.internalLabelFormatter(this.minValue,"min"):u==="maxValue"?this.internalLabelFormatter(this.maxValue,"max"):this.internalLabelFormatter(d,"value"),x=r?{left:`${t?100-a:a}%`}:{right:`${t?s:100-s}%`},g=`${l.handleLabel} ${r?l.handleLabelMinValue:l.handleLabelValue}`,V=[...n?[k`<span aria-hidden=true class=${p(g)}>${f}</span>`,k`<span aria-hidden=true class=${`${g} ${l.static}`}>${f}</span>`,k`<span aria-hidden=true class=${`${g} ${l.transformed}`}>${f}</span>`]:[],k`<div class=${p(l.handle)}></div>`,o&&k`<div class=${p(l.handleExtension)}></div>`||""];return i==="below"&&V.reverse(),q(e,k`<div .ariaLabel=${m} aria-orientation=horizontal .ariaValueMax=${this.max} .ariaValueMin=${this.min} .ariaValueNow=${v} class=${p({[l.thumb]:!0,[l.thumbValue]:!r,[l.thumbActive]:this.lastDragProp!=="minMaxValue"&&this.dragProp===u,[l.thumbPrecise]:o,[l.thumbMinValue]:r})} data-value-prop=${u??C} @blur=${this.onThumbBlur} @focus=${this.onThumbFocus} @pointerdown=${this.onThumbPointerDown} role=slider style=${M(x)} tabindex=0 ${T(this.setThumbEl)}>${V}</div>`)}renderGraph(){return this.histogram?k`<calcite-graph class=${p(l.graph)} .colorStops=${this.histogramStops} .data=${this.histogram} .highlightMax=${b(this.value)?this.maxValue:this.value} .highlightMin=${b(this.value)?this.minValue:this.min} .max=${this.max} .min=${this.min}></calcite-graph>`:null}renderTickLabel(e){let{hasHistogram:t,labelHandles:i,labelTicks:a,max:s,min:n,precise:o,value:r}=this,c=b(r),d=e===n,u=e===s,m=d||u;return a&&(!t&&(m||!o||!c)||t&&(m||!o&&!i))?k`<span class=${p({[l.tickLabel]:!0,[l.tickMin]:d,[l.tickMax]:u})}>${this.internalLabelFormatter(e,"tick")}</span>`:null}};A("calcite-slider",P);export{P as Slider};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.24 */
|
|
4
4
|
var c={max:"320px"},a={max:"476px"},i={max:"768px"},t={max:"1152px"},e="8px",n="12px",s="16px",x="2px",o="0.25rem",p="0.5rem";export{c as a,a as b,i as c,t as d,e,n as f,s as g,x as h,o as i,p as j};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{c as h,l as M,q as S,u as C}from"./
|
|
3
|
+
v5.0.0-next.24 */
|
|
4
|
+
import{c as h,l as M,q as S,u as C}from"./W35ZAP2H.js";import"./EK3BWMVE.js";import{D as A,H as T,P as b,g as x,h as y,o as E}from"./GAXQ53KY.js";function w(u){return u?.tagName==="CALCITE-TREE-ITEM"}function D(u){return Array.from(u.querySelectorAll("calcite-tree-item:not([disabled])")).filter(t=>{let e=t;for(;e!==u&&e!==void 0;){let i=e.parentElement;if(!(!w(i)||!i.hasChildren||i.expanded))return!1;e=e.parentElement}return!0})}var k=x`:host{display:block}:host(:focus){outline:2px solid transparent;outline-offset:2px}:host([hidden]){display:none}[hidden]{display:none}`,g=class extends A{constructor(){super(),this.items=[],this.lines=!1,this.parentExpanded=!1,this.scale="m",this.selectedItems=[],this.selectionMode="single",this.calciteTreeSelect=E({cancelable:!1}),this.listen("focus",this.onFocus),this.listen("focusin",this.onFocusIn),this.listen("focusout",this.onFocusOut),this.listen("calciteInternalTreeItemSelect",this.onInternalTreeItemSelect),this.listen("keydown",this.keyDownHandler)}static{this.properties={child:[7,{},{reflect:!0,type:Boolean}],lines:[7,{},{reflect:!0,type:Boolean}],parentExpanded:[5,{},{type:Boolean}],scale:[3,{},{reflect:!0}],selectedItems:[0,{},{attribute:!1}],selectionMode:[3,{},{reflect:!0}]}}static{this.styles=k}willUpdate(t){t.has("parentExpanded")&&(this.hasUpdated||this.parentExpanded!==!1)&&this.updateItems();let e=this.el.parentElement?.closest("calcite-tree");this.lines=e?e.lines:this.lines,this.scale=e?e.scale:this.scale,this.selectionMode=e?e.selectionMode:this.selectionMode,this.child=!!e}onFocus(){if(!this.child){let t=this.el.querySelector("calcite-tree-item[selected]:not([disabled])")||this.el.querySelector("calcite-tree-item:not([disabled])");M(t)}}onFocusIn(t){(t.relatedTarget===this.el||!this.el.contains(t.relatedTarget))&&this.el.removeAttribute("tabindex")}onFocusOut(t){!this.el.contains(t.relatedTarget)&&(this.el.tabIndex=this.getRootTabIndex())}onInternalTreeItemSelect(t){if(this.child)return;let e=t.target,i=h(e.querySelectorAll("calcite-tree-item"));if(t.preventDefault(),t.stopPropagation(),this.selectionMode==="ancestors"){this.updateAncestorTree(t);return}let o=this.selectionMode==="none",n=this.selectionMode!==null&&(!e.hasChildren||e.hasChildren&&(this.selectionMode==="children"||this.selectionMode==="multichildren")),l=this.selectionMode==="multichildren"&&e.hasChildren,c=!o&&t.detail.modifyCurrentSelection&&(this.selectionMode==="multiple"||this.selectionMode==="multichildren"),f=!c&&((this.selectionMode==="single"||this.selectionMode==="multiple")&&i.length<=0||this.selectionMode==="children"||this.selectionMode==="multichildren"||this.selectionMode==="single-persist"&&!e.hasChildren),d=["multiple","none","single","single-persist"].includes(this.selectionMode)&&e.hasChildren,a=[];n&&a.push(e),f&&h(this.el.querySelectorAll("calcite-tree-item[selected]")).forEach(r=>{a.includes(r)||(r.selected=!1)}),d&&["multiple","none","single","single-persist"].includes(this.selectionMode)&&(e.expanded=!e.expanded),l&&i.forEach(s=>{s.selected=!1,s.hasChildren&&(s.expanded=!1)}),c&&window.getSelection().removeAllRanges(),c&&e.selected?a.forEach(s=>{s.disabled||(s.selected=!1)}):o||a.forEach(s=>{s.disabled||(s.selected=this.selectionMode!=="single"||!s.selected)}),this.selectedItems=o?[]:h(this.el.querySelectorAll("calcite-tree-item")).filter(s=>s.selected),this.calciteTreeSelect.emit(),t.stopPropagation()}keyDownHandler(t){if(this.child)return;let e=this.el,i=t.target,o=["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End","Tab"];if(!(w(i)&&this.el.contains(i))||!o.includes(t.key))return;let n=D(e);if(t.key==="Tab"){n.forEach(l=>l.tabIndex=-1);return}if(t.key==="ArrowDown"){let l=n.indexOf(i);n[l+1]?.focus(),t.preventDefault();return}if(t.key==="ArrowUp"){let l=n.indexOf(i);n[l-1]?.focus(),t.preventDefault();return}if(t.key==="ArrowLeft"){if(i.hasChildren&&i.expanded){i.expanded=!1,t.preventDefault();return}n.slice(0,n.indexOf(i)).reverse().find(f=>f.depth===i.depth-1)?.focus(),t.preventDefault();return}if(t.key==="ArrowRight"){if(!i.disabled&&i.hasChildren)if(!i.expanded)i.expanded=!0,t.preventDefault();else{let l=n.indexOf(i);n[l+1]?.focus(),t.preventDefault()}return}if(t.key==="Home"){let l=n.shift();l&&(l.focus(),t.preventDefault());return}if(t.key==="End"){let l=n.pop();l&&(l.focus(),t.preventDefault());return}}updateAncestorTree(t){let e=t.target,i=t.detail.updateItem;if(e.disabled||e.indeterminate&&!i)return;let o=[],n=e.parentElement.closest("calcite-tree-item");for(;n;)o.push(n),n=n.parentElement.closest("calcite-tree-item");let l=Array.from(e.querySelectorAll("calcite-tree-item:not([disabled])")),c=l.filter(s=>!s.hasChildren),f=l.filter(s=>s.hasChildren),d;i?d=e.hasChildren?!(e.selected||e.indeterminate):!e.selected:d=e.selected,c.forEach(s=>{s.selected=d,s.indeterminate=!1});function a(s,r){let m=s.filter(p=>p.selected),I=s.filter(p=>!p.selected);r.selected=m.length===s.length,r.indeterminate=m.length>0&&I.length>0}f.reverse().forEach(s=>{let r=Array.from(s.querySelectorAll(":scope > calcite-tree > calcite-tree-item"));a(r,s)}),i&&(e.hasChildren?a(l,e):(e.selected=d,e.indeterminate=!1)),o.forEach(s=>{let r=h(s.querySelectorAll("calcite-tree-item")),m=r.filter(p=>p.selected);if(m.length===0){s.selected=!1,s.indeterminate=!1;return}let I=m.length<r.length;s.indeterminate=I,s.selected=!I}),this.selectedItems=h(this.el.querySelectorAll("calcite-tree-item")).filter(s=>s.selected),i&&this.calciteTreeSelect.emit()}updateItems(){this.items.forEach(t=>t.parentExpanded=this.parentExpanded)}handleDefaultSlotChange(t){let e=C(t).filter(i=>i.matches("calcite-tree-item"));this.items=e,this.updateItems()}getRootTabIndex(){return this.child?-1:0}render(){return this.el.ariaMultiSelectable=this.child?void 0:S(this.selectionMode==="multiple"||this.selectionMode==="multichildren"),this.el.role=this.child?void 0:"tree",T(this.el,"tabIndex",this.getRootTabIndex()),y`<slot @slotchange=${this.handleDefaultSlotChange}></slot>`}};b("calcite-tree",g);export{g as Tree};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{h as b}from"./
|
|
3
|
+
v5.0.0-next.24 */
|
|
4
|
+
import{h as b}from"./B3PJ7WKM.js";import{m as c}from"./HA5H546A.js";import{a as p}from"./L2VNGTSR.js";import{a as g}from"./VJ7Q2QJV.js";import{a as y}from"./MT4G6FVR.js";import"./4JL57EDA.js";import"./VKBFZH3Q.js";import{k as f,q as v}from"./W35ZAP2H.js";import"./EK3BWMVE.js";import{D as h,E as t,H as o,P as u,g as n,h as d,o as a}from"./GAXQ53KY.js";var x=n`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:flex;cursor:pointer;outline:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.day-wrapper{position:relative;display:flex;inline-size:100%;flex-direction:column;align-items:center;justify-content:center}.day{position:relative;display:flex;inline-size:100%;align-items:center;justify-content:center;font-size:var(--calcite-font-size--2);line-height:1rem;line-height: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;line-height:var(--calcite-font-line-height-fixed-base);block-size:var(--calcite-internal-day-size);outline-color:var(--calcite-color-transparent);background-color:var(--calcite-date-picker-day-background-color);color:var(--calcite-date-picker-day-text-color, var(--calcite-color-text-1))}.text{margin-block:1px 0px;margin-inline-start:0px}:host([scale=s]){--calcite-internal-day-size: 32px}:host([scale=s]) .day{font-size:var(--calcite-font-size--2)}:host([scale=m]){--calcite-internal-day-size: 40px}:host([scale=m]) .day{font-size:var(--calcite-font-size--1)}:host([scale=l]){--calcite-internal-day-size: 44px}:host([scale=l]) .day{font-size:var(--calcite-font-size-0)}:host(:not([current-month])) .day{opacity:var(--calcite-opacity-full);color:var(--calcite-color-text-3)}:host(:focus:not([disabled]):not([selected]):not([current-month])) .day{color:var(--calcite-color-text-1)}:host(:hover:not([disabled]):not([selected])) .day{background-color:var(--calcite-date-picker-day-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-date-picker-day-text-color-hover, var(--calcite-color-text-1))}:host(:not([range]):not([selected]).current-day) .day{color:var(--calcite-date-picker-current-day-text-color, var(--calcite-color-brand));font-weight:var(--calcite-font-weight-bold)}:host(:focus[selected]) .day{z-index:var(--calcite-z-index);outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))));box-shadow:0 0 0 2px var(--calcite-color-foreground-1)}:host(:focus:not([disabled]):not([selected])) .day{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host(:hover:not([disabled]):not([selected])) .day{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([selected]) .day{font-weight:var(--calcite-font-weight-medium);background-color:var(--calcite-date-picker-day-background-color-selected, var(--calcite-color-brand));color:var(--calcite-date-picker-day-text-color-selected, var(--calcite-color-foreground-1))}:host([range-hover]:not([selected])) .day{background-color:var(--calcite-date-picker-day-outside-range-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-date-picker-day-outside-range-text-color-hover, var(--calcite-color-text-1))}:host([highlighted]:not([selected])) .day,:host(:hover[highlighted]:not([selected])) .day{color:var(--calcite-date-picker-day-range-text-color, var(--calcite-color-text-highlight));background-color:var(--calcite-date-picker-day-range-background-color, var(--calcite-color-surface-highlight))}:host([disabled]) .day{color:var(--calcite-color-text-2);text-decoration-line:line-through;opacity:var(--calcite-opacity-disabled)}@media(forced-colors:active){.day{border-radius:0}:host([selected]){outline:2px solid canvasText}:host(:hover:not([selected])) .day{border-radius:50%}:host([range][selected]) .day,:host([highlighted]) .day,:host([range-hover]:not([selected])) .day{background-color:highlight}:host([range-hover]) .day,:host([range][selected][start-of-range]) .day,:host([range][selected][end-of-range]) .day{background-color:canvas}}:host([hidden]){display:none}[hidden]{display:none}`,r={dayWrapper:"day-wrapper",day:"day",text:"text"},i=class extends h{constructor(){super(),this.focusSetter=y()(this),this.interactiveContainer=p(this),this.active=!1,this.currentMonth=!1,this.disabled=!1,this.endOfRange=!1,this.highlighted=!1,this.range=!1,this.rangeHover=!1,this.selected=!1,this.startOfRange=!1,this.calciteInternalDayHover=a({cancelable:!1}),this.calciteInternalDaySelect=a({cancelable:!1}),this.listen("pointerover",this.pointerOverHandler),this.listen("click",this.onClick),this.listen("keydown",this.keyDownHandler)}static{this.properties={active:[7,{},{reflect:!0,type:Boolean}],currentMonth:[7,{},{reflect:!0,type:Boolean}],dateTimeFormat:[0,{},{attribute:!1}],day:[9,{},{type:Number}],disabled:[7,{},{reflect:!0,type:Boolean}],endOfRange:[7,{},{reflect:!0,type:Boolean}],highlighted:[7,{},{reflect:!0,type:Boolean}],range:[7,{},{reflect:!0,type:Boolean}],rangeEdge:[3,{},{reflect:!0}],rangeHover:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],startOfRange:[7,{},{reflect:!0,type:Boolean}],value:[0,{},{attribute:!1}]}}static{this.styles=x}async setFocus(e){return this.focusSetter(()=>this.el,e)}load(){this.parentDatePickerEl=f(this.el,"calcite-date-picker")}onClick(){this.disabled||this.calciteInternalDaySelect.emit()}keyDownHandler(e){g(e.key)&&(this.disabled||this.calciteInternalDaySelect.emit(),e.preventDefault())}pointerOverHandler(){this.disabled||this.calciteInternalDayHover.emit()}render(){let e=b(this.value).replaceAll("-","");if(this.parentDatePickerEl){let{numberingSystem:l,lang:s}=this.parentDatePickerEl;c.numberFormatOptions={useGrouping:!1,...l&&{numberingSystem:l},...s&&{locale:s}}}let m=c.localize(String(this.day)),k=this.dateTimeFormat.format(this.value);return this.el.ariaLabel=k,this.el.ariaSelected=v(this.active),o(this.el,"id",e),this.el.role="button",o(this.el,"tabIndex",this.active&&!this.disabled?0:-1),this.interactiveContainer({disabled:this.disabled,children:d`<div aria-hidden=true class=${t(r.dayWrapper)}><span class=${t(r.day)}><span class=${t(r.text)}>${m}</span></span></div>`})}};u("calcite-date-picker-day",i);export{i as DatePickerDay};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a,b,c}from"./
|
|
3
|
+
v5.0.0-next.24 */
|
|
4
|
+
import{a,b,c}from"./ROD5TPA7.js";import"./OGYCI2CL.js";export{b as extractRegion,c as getCountry,a as global};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as s,b as o}from"./
|
|
3
|
+
v5.0.0-next.24 */
|
|
4
|
+
import{a as s,b as o}from"./YJJIQDE4.js";import{a as i}from"./VKUS34R6.js";import{t as a}from"./W35ZAP2H.js";import"./EK3BWMVE.js";import{D as d,E as e,P as r,g as l,h as n}from"./GAXQ53KY.js";var h=l`:host([disabled]) .content{cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) .content *,:host([disabled]) .content ::slotted(*){pointer-events:none}:host{display:flex;flex:1 1 0%;flex-direction:column}.container{display:flex;flex:1 1 auto;align-items:stretch;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-2)}.content{display:flex;flex:1 1 auto;flex-direction:column;justify-content:center;font-size:var(--calcite-font-size--2);line-height:1.375;padding-inline:var(--calcite-stack-padding-inline, .75rem);padding-block:var(--calcite-stack-padding-block, .5rem)}.content-start{justify-content:flex-start}.content-end{justify-content:flex-end}.content-start,.content-end{flex:0 1 auto}.content-start ::slotted(calcite-icon),.content-end ::slotted(calcite-icon){margin-inline:.75rem;align-self:center}.actions-start,.actions-end,.content-start,.content-end{display:flex;align-items:center}.actions-start ::slotted(calcite-action),.actions-start ::slotted(calcite-action-menu),.actions-start ::slotted(calcite-handle),.actions-start ::slotted(calcite-dropdown),.actions-end ::slotted(calcite-action),.actions-end ::slotted(calcite-action-menu),.actions-end ::slotted(calcite-handle),.actions-end ::slotted(calcite-dropdown){align-self:stretch;color:inherit}:host([hidden]){display:none}[hidden]{display:none}`,c=class extends d{constructor(){super(...arguments),this.hasActionsEnd=!1,this.hasActionsStart=!1,this.hasContentEnd=!1,this.hasContentStart=!1,this.disabled=!1}static{this.properties={hasActionsEnd:[16,{},{state:!0}],hasActionsStart:[16,{},{state:!0}],hasContentEnd:[16,{},{state:!0}],hasContentStart:[16,{},{state:!0}],disabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=h}handleActionsStartSlotChange(t){this.hasActionsStart=a(t)}handleActionsEndSlotChange(t){this.hasActionsEnd=a(t)}handleContentStartSlotChange(t){this.hasContentStart=a(t)}handleContentEndSlotChange(t){this.hasContentEnd=a(t)}renderActionsStart(){let{hasActionsStart:t}=this;return i("actions-start-container",n`<div class=${e(s.actionsStart)} .hidden=${!t}><slot name=${o.actionsStart} @slotchange=${this.handleActionsStartSlotChange}></slot></div>`)}renderActionsEnd(){let{hasActionsEnd:t}=this;return i("actions-end-container",n`<div class=${e(s.actionsEnd)} .hidden=${!t}><slot name=${o.actionsEnd} @slotchange=${this.handleActionsEndSlotChange}></slot></div>`)}renderContentStart(){let{hasContentStart:t}=this;return n`<div class=${e(s.contentStart)} .hidden=${!t}><slot name=${o.contentStart} @slotchange=${this.handleContentStartSlotChange}></slot></div>`}renderDefaultContent(){return n`<div class=${e(s.content)}><slot></slot></div>`}renderContentEnd(){let{hasContentEnd:t}=this;return n`<div class=${e(s.contentEnd)} .hidden=${!t}><slot name=${o.contentEnd} @slotchange=${this.handleContentEndSlotChange}></slot></div>`}render(){return n`<div class=${e(s.container)}>${this.renderActionsStart()}${this.renderContentStart()}${this.renderDefaultContent()}${this.renderContentEnd()}${this.renderActionsEnd()}</div>`}};r("calcite-stack",c);export{c as Stack};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{m}from"./NDKJMPH3.js";import"./4YRGPHDD.js";import{a as P}from"./LBBTSMHU.js";import{b as g}from"./SVPH24SK.js";import"./OB6IN7GG.js";import{B as u,C as h,D as A,E as s,P as k,g as x,h as n,l as z,m as T,o as p}from"./HHXCNSRO.js";function L(){return navigator.userAgentData}function N(){if(!1)return"";let f=L();return f?.brands?f.brands.map(({brand:e,version:i})=>`${e}/${i}`).join(" "):navigator.userAgent}var l={bordered:"bordered",striped:"striped",selectionArea:"selection-area",paginationArea:"pagination-area",container:"container",tableContainer:"table-container",tableFixed:"table--fixed",assistiveText:"assistive-text",selectionActions:"selection-actions",dismissButton:"dismiss-button",selectionChipActive:"selection-chip--active",selectionCountChip:"selection-chip",selectionOutOfViewChip:"selection-chip--out-of-view"},v={selectionActions:"selection-actions",tableHeader:"table-header",tableFooter:"table-footer"},I={hideEmpty:"hide-empty",clear:"x"},D=x`@charset "UTF-8";:host([scale=s]){--calcite-internal-table-cell-padding: .25rem;--calcite-internal-table-cell-font-size: var(--calcite-font-size--2);--calcite-internal-table-cell-font-size-secondary: var(--calcite-font-size--3)}:host([scale=m]){--calcite-internal-table-cell-padding: .5rem;--calcite-internal-table-cell-font-size: var(--calcite-font-size--1);--calcite-internal-table-cell-font-size-secondary: var(--calcite-font-size--2)}:host(:is([scale=s],[scale=m])){--calcite-internal-table-selection-action-spacing: var(--calcite-spacing-xxs)}:host([scale=l]){--calcite-internal-table-selection-action-spacing: var(--calcite-spacing-xs);--calcite-internal-table-cell-padding: 1rem;--calcite-internal-table-cell-font-size: var(--calcite-font-size-0);--calcite-internal-table-cell-font-size-secondary: var(--calcite-font-size--1)}:host{display:flex}.container{display:flex;flex-direction:column;inline-size:var(--calcite-container-size-content-fluid);block-size:var(--calcite-container-size-content-fluid)}.table-container{overflow:auto;white-space:nowrap;border:var(--calcite-border-width-sm) solid var(--calcite-table-border-color, var(--calcite-color-border-2));border-radius:var(--calcite-table-corner-radius, var(--calcite-corner-radius-sharp));box-shadow:var(--calcite-table-shadow, var(--calcite-shadow-none))}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}table{border-collapse:collapse;overflow-x:scroll;inline-size:var(--calcite-container-size-content-fluid)}@-moz-document url-prefix(){table{border-collapse:separate;border-spacing:0}}.table--fixed{table-layout:fixed}.bordered ::slotted(calcite-table-row){--calcite-table-row-border-color: var(--calcite-table-border-color, var(--calcite-color-border-2))}.striped ::slotted(calcite-table-row:nth-child(2n+1)){--calcite-table-row-background-color: var( --calcite-table-row-background-color-striped, var(--calcite-color-foreground-2) )}.selection-actions{display:flex;flex-direction:row;gap:var(--calcite-internal-table-selection-action-spacing);margin-inline-start:auto}.selection-area{display:flex;flex-direction:row;align-items:center;padding-block:var(--calcite-internal-table-cell-padding)}.selection-area calcite-chip:last-of-type{margin-inline-end:.5rem}.selection-area calcite-chip:last-of-type:not(:first-of-type){margin-inline-start:.5rem}.selection-area calcite-button{margin-inline-end:1rem}.selection-chip{--calcite-chip-background-color: var(--calcite-table-selection-chip-background-color);--calcite-chip-border-color: var(--calcite-table-selection-chip-border-color);--calcite-chip-corner-radius: var(--calcite-table-selection-chip-corner-radius);--calcite-chip-shadow: var(--calcite-table-selection-chip-shadow);--calcite-chip-text-color: var(--calcite-table-selection-chip-text-color)}.selection-chip.selection-chip--active{--calcite-chip-background-color: var(--calcite-table-selection-chip-background-color-selected);--calcite-chip-border-color: var(--calcite-table-selection-chip-border-color-selected);--calcite-chip-text-color: var(--calcite-table-selection-chip-text-color-selected)}.selection-chip--out-of-view{--calcite-chip-background-color: var(--calcite-table-selection-out-of-view-chip-background-color);--calcite-chip-border-color: var(--calcite-table-selection-out-of-view-chip-border-color);--calcite-chip-corner-radius: var(--calcite-table-selection-out-of-view-chip-corner-radius);--calcite-chip-shadow: var(--calcite-table-selection-out-of-view-chip-shadow);--calcite-chip-text-color: var(--calcite-table-selection-out-of-view-chip-text-color);--calcite-chip-icon-color: var(--calcite-table-selection-out-of-view-chip-icon-color)}.pagination-area{display:flex;inline-size:100%;flex-direction:row;justify-content:center;padding-block:var(--calcite-internal-table-cell-padding)}calcite-pagination{flex:1;justify-content:center;--calcite-pagination-color: var(--calcite-table-pagination-color);--calcite-pagination-color-hover: var(--calcite-table-pagination-color-hover);--calcite-pagination-color-border-hover: var(--calcite-table-pagination-color-border-hover);--calcite-pagination-color-border-active: var(--calcite-table-pagination-color-border-active);--calcite-pagination-background-color: var(--calcite-table-pagination-background-color);--calcite-pagination-icon-color-background-hover: var(--calcite-table-pagination-icon-color-background-hover)}.dismiss-button{margin-inline-end:1rem;--calcite-button-background-color: var(--calcite-table-selection-dismiss-button-background-color);--calcite-button-border-color: var(--calcite-table-selection-dismiss-button-border-color);--calcite-button-corner-radius: var(--calcite-table-selection-dismiss-button-corner-radius);--calcite-button-shadow: var(--calcite-table-selection-dismiss-button-shadow);--calcite-button-text-color: var(--calcite-table-selection-dismiss-button-text-color)}.dismiss-button:hover{--calcite-button-background-color: var(--calcite-table-selection-dismiss-button-background-color-hover);--calcite-button-border-color: var(--calcite-table-selection-dismiss-button-border-color-hover);--calcite-button-text-color: var(--calcite-table-selection-dismiss-button-text-color-hover)}.dismiss-button:active{--calcite-button-background-color: var(--calcite-table-selection-dismiss-button-background-color-active);--calcite-button-border-color: var(--calcite-table-selection-dismiss-button-border-color-active);--calcite-button-text-color: var(--calcite-table-selection-dismiss-button-text-color-active)}:host([hidden]){display:none}[hidden]{display:none}`,w=class extends A{constructor(){super(),this.paginationRef=u(),this.tableBodySlotRef=u(),this.tableFootSlotRef=u(),this.tableHeadSlotRef=u(),this.messages=P({blocking:!0}),this.colCount=0,this.pageStartRow=1,this.selectedCount=0,this._selectedItems=[],this.bordered=!1,this.currentPage=0,this.groupSeparator=!1,this.interactionMode="interactive",this.layout="auto",this.numbered=!1,this.pageSize=0,this.scale="m",this.selectionDisplay="top",this.selectionMode="none",this.striped=!1,this.calciteInternalTableRowFocusChange=p({cancelable:!1}),this.calciteTablePageChange=p({cancelable:!1}),this.calciteTableSelect=p({cancelable:!1}),this.listen("calciteTableRowSelect",this.calciteTableRowSelectListener),this.listen("calciteInternalTableRowSelect",this.calciteInternalTableRowSelectListener),this.listen("calciteInternalTableRowFocusRequest",this.calciteInternalTableRowFocusEvent)}static{this.properties={colCount:[16,{},{state:!0}],pageStartRow:[16,{},{state:!0}],readCellContentsToAT:[16,{},{state:!0}],selectedCount:[16,{},{state:!0}],_selectedItems:[16,{},{state:!0}],bordered:[7,{},{reflect:!0,type:Boolean}],caption:1,currentPage:[11,{},{reflect:!0,type:Number}],groupSeparator:[7,{},{reflect:!0,type:Boolean}],interactionMode:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],numbered:[7,{},{reflect:!0,type:Boolean}],numberingSystem:[3,{},{reflect:!0}],pageSize:[11,{},{reflect:!0,type:Number}],scale:[3,{},{reflect:!0}],selectedItems:[32,{},{attribute:!1,readOnly:!0}],selectionDisplay:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],striped:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=D}get selectedItems(){return this._selectedItems}async load(){this.readCellContentsToAT=/safari/i.test(N()),this.listenOn(this.el.shadowRoot,"slotchange",this.handleSlotChange)}willUpdate(e){(e.has("groupSeparator")&&(this.hasUpdated||this.groupSeparator!==!1)||e.has("interactionMode")&&(this.hasUpdated||this.interactionMode!=="interactive")||e.has("numbered")&&(this.hasUpdated||this.numbered!==!1)||e.has("numberingSystem")||e.has("pageSize")&&(this.hasUpdated||this.pageSize!==0)||e.has("scale")&&(this.hasUpdated||this.scale!=="m")||e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="none")||e.has("currentPage")&&(this.hasUpdated||this.currentPage>1)&&this.pageSize>0)&&this.updateRows()}handleSlotChange(){this.updateRows()}calciteTableRowSelectListener(e){e.composedPath().includes(this.el)&&this.setSelectedItems(e.target)}calciteInternalTableRowSelectListener(e){e.composedPath().includes(this.el)&&(this.updateSelectedItems(!1),e.stopPropagation())}calciteInternalTableRowFocusEvent(e){let i=e.detail.cellPosition,o=e.detail.rowPosition,a=e.detail.destination,r=e.detail.lastCell,t=this.bodyRows?.filter(b=>!g(b)),c=this.allRows?.filter(b=>!g(b)),S=this.headRows[this.headRows.length-1]?.positionAll,R=t[0]?.positionAll,y=t[t.length-1]?.positionAll,$=this.footRows[0]?.positionAll,M=c[c.length-1]?.positionAll,F=a==="next"&&o===S,O=a==="previous"&&o===$,E=a==="previous"&&o===R,B=a==="next"&&o===y,d;switch(a){case"first":d=0;break;case"last":d=M;break;case"next":d=F?R:B?$:o+1;break;case"previous":d=O?y:E?S:o-1;break}let C=this.allRows?.find(b=>b.positionAll===d)?.cellCount,H=i>C?C:i;d!==void 0&&this.calciteInternalTableRowFocusChange.emit({cellPosition:H,rowPosition:d,destination:a,lastCell:r})}getSlottedRows(e){return e?.assignedElements({flatten:!0})?.filter(i=>i?.matches("calcite-table-row"))}updateRows(){let e=this.getSlottedRows(this.tableHeadSlotRef.value)||[],i=this.getSlottedRows(this.tableBodySlotRef.value)||[],o=this.getSlottedRows(this.tableFootSlotRef.value)||[],a=[...e,...i,...o];e?.forEach(t=>{let c=e?.indexOf(t);t.rowType="head",t.positionSection=c,t.positionSectionLocalized=this.localizeNumber((c+1).toString())}),i?.forEach(t=>{let c=i?.indexOf(t);t.rowType="body",t.positionSection=c,t.positionSectionLocalized=this.localizeNumber((c+1).toString())}),o?.forEach(t=>{let c=o?.indexOf(t);t.rowType="foot",t.positionSection=c,t.positionSectionLocalized=this.localizeNumber((c+1).toString())}),a?.forEach(t=>{t.interactionMode=this.interactionMode,t.selectionMode=this.selectionMode,t.bodyRowCount=i?.length,t.positionAll=a?.indexOf(t),t.numbered=this.numbered,t.scale=this.scale,t.readCellContentsToAT=this.readCellContentsToAT,t.lastVisibleRow=a?.indexOf(t)===a.length-1});let r=e[0]?.cellCount||e[0]?.querySelectorAll("calcite-table-header")?.length;this.colCount=r,this.headRows=e,this.bodyRows=i,this.footRows=o,this.allRows=a,this.handleCurrentPageRange(),this.updateSelectedItems()}handleCurrentPageRange(){let e=this.currentPage,i=this.bodyRows?.length||0,o=this.pageSize>0?Math.ceil(i/this.pageSize):1;if(o>0){let a=Math.min(Math.max(e,1),o);this.currentPage=a,this.pageStartRow=(a-1)*this.pageSize+1}this.paginateRows()}handlePaginationChange(){let e=this.paginationRef.value?.startItem;this.pageStartRow=e||1,this.currentPage=Math.ceil(this.pageStartRow/this.pageSize),this.calciteTablePageChange.emit(),this.updateRows()}paginateRows(){this.bodyRows?.forEach(e=>{let i=e.positionSection+1,o=i>=this.pageStartRow&&i<this.pageStartRow+this.pageSize;e.itemHidden=this.pageSize>0&&!o&&!this.footRows.includes(e),e.lastVisibleRow=i===this.pageStartRow+this.pageSize-1||i===this.bodyRows.length})}async updateSelectedItems(e){let i=this.bodyRows?.filter(o=>o.selected);this._selectedItems=i,this.selectedCount=i?.length,this.allRows?.forEach(o=>{o.selectedRowCount=this.selectedCount,o.selectedRowCountLocalized=this.localizeNumber(this.selectedCount)}),e&&this.calciteTableSelect.emit()}handleDeselectAllRows(){this.bodyRows?.forEach(e=>{e.selected=!1}),this.updateSelectedItems(!0)}setSelectedItems(e){this.bodyRows?.forEach(i=>{e?.rowType==="head"?i.selected=this.selectedCount!==this.bodyRows?.length:i.selected=this.selectionMode==="multiple"||e===i?i.selected:!1}),this.updateSelectedItems(!0)}localizeNumber(e){return m.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},m.localize(e.toString())}renderSelectionArea(){let e=this._selectedItems?.filter(t=>g(t))?.length,i=this.localizeNumber(e?.toString()),a=`${this.localizeNumber(this.selectedCount?.toString())} ${this.messages.selected}`,r=`${i} ${this.messages.hiddenSelected}`;return n`<div class=${s(l.selectionArea)}><calcite-chip class=${s({[l.selectionCountChip]:!0,[l.selectionChipActive]:this.selectedCount>0})} .kind=${this.selectedCount>0?"brand":"neutral"} .label=${a} .scale=${this.scale} .value=${a}>${a}</calcite-chip>${e>0&&n`<calcite-chip class=${s(l.selectionOutOfViewChip)} .icon=${I.hideEmpty} .label=${r} .scale=${this.scale} title=${r??z} .value=${r}>${i}</calcite-chip>`||""}${this.selectedCount>0&&n`<calcite-button class=${s(l.dismissButton)} .iconStart=${I.clear} kind=neutral @click=${this.handleDeselectAllRows} round .scale=${this.scale} .title=${`${this.messages.clear} ${a} ${this.messages.row}`}>${this.messages.clear}</calcite-button>`||""}<div class=${s(l.selectionActions)}><slot name=${v.selectionActions}></slot></div></div>`}renderPaginationArea(){return n`<div class=${s(l.paginationArea)}><calcite-pagination .groupSeparator=${this.groupSeparator} .numberingSystem=${this.numberingSystem} @calcitePaginationChange=${this.handlePaginationChange} .pageSize=${this.pageSize} .scale=${this.scale} .startItem=${this.pageStartRow} .totalItems=${this.bodyRows?.length} ${h(this.paginationRef)}></calcite-pagination></div>`}renderTHead(){return n`<thead><slot name=${v.tableHeader} ${h(this.tableHeadSlotRef)}></slot></thead>`}renderTBody(){return n`<tbody><slot ${h(this.tableBodySlotRef)}></slot></tbody>`}renderTFoot(){return n`<tfoot><slot name=${v.tableFooter} ${h(this.tableFootSlotRef)}></slot></tfoot>`}render(){return n`<div class=${s(l.container)}>${this.selectionMode!=="none"&&this.selectionDisplay!=="none"&&this.renderSelectionArea()||""}<div class=${s({[l.bordered]:this.bordered,[l.striped]:this.striped,[l.tableContainer]:!0})}><table .ariaColCount=${this.colCount} .ariaMultiSelectable=${this.selectionMode==="multiple"?"true":null} .ariaRowCount=${this.allRows?.length} class=${s({[l.tableFixed]:this.layout==="fixed"})} .role=${this.interactionMode==="interactive"?"grid":"table"} ${h(e=>{e&&T(n`<caption class=${s(l.assistiveText)}>${this.caption}</caption>${this.renderTHead()}${this.renderTBody()}${this.renderTFoot()}`,e)})}></table></div>${this.pageSize>0&&this.renderPaginationArea()||""}</div>`}};k("calcite-table",w);export{w as Table};
|
|
3
|
+
v5.0.0-next.24 */
|
|
4
|
+
import{m}from"./HA5H546A.js";import"./VJ7Q2QJV.js";import{a as P}from"./EQ25YK3K.js";import{b as g}from"./4JL57EDA.js";import"./VKBFZH3Q.js";import{B as u,C as h,D as A,E as s,P as k,g as x,h as n,l as z,m as T,o as p}from"./GAXQ53KY.js";function L(){return navigator.userAgentData}function N(){if(!1)return"";let f=L();return f?.brands?f.brands.map(({brand:e,version:i})=>`${e}/${i}`).join(" "):navigator.userAgent}var l={bordered:"bordered",striped:"striped",selectionArea:"selection-area",paginationArea:"pagination-area",container:"container",tableContainer:"table-container",tableFixed:"table--fixed",assistiveText:"assistive-text",selectionActions:"selection-actions",dismissButton:"dismiss-button",selectionChipActive:"selection-chip--active",selectionCountChip:"selection-chip",selectionOutOfViewChip:"selection-chip--out-of-view"},v={selectionActions:"selection-actions",tableHeader:"table-header",tableFooter:"table-footer"},I={hideEmpty:"hide-empty",clear:"x"},D=x`@charset "UTF-8";:host([scale=s]){--calcite-internal-table-cell-padding: .25rem;--calcite-internal-table-cell-font-size: var(--calcite-font-size--2);--calcite-internal-table-cell-font-size-secondary: var(--calcite-font-size--3)}:host([scale=m]){--calcite-internal-table-cell-padding: .5rem;--calcite-internal-table-cell-font-size: var(--calcite-font-size--1);--calcite-internal-table-cell-font-size-secondary: var(--calcite-font-size--2)}:host(:is([scale=s],[scale=m])){--calcite-internal-table-selection-action-spacing: var(--calcite-spacing-xxs)}:host([scale=l]){--calcite-internal-table-selection-action-spacing: var(--calcite-spacing-xs);--calcite-internal-table-cell-padding: 1rem;--calcite-internal-table-cell-font-size: var(--calcite-font-size-0);--calcite-internal-table-cell-font-size-secondary: var(--calcite-font-size--1)}:host{display:flex}.container{display:flex;flex-direction:column;inline-size:var(--calcite-container-size-content-fluid);block-size:var(--calcite-container-size-content-fluid)}.table-container{overflow:auto;white-space:nowrap;border:var(--calcite-border-width-sm) solid var(--calcite-table-border-color, var(--calcite-color-border-2));border-radius:var(--calcite-table-corner-radius, var(--calcite-corner-radius-sharp));box-shadow:var(--calcite-table-shadow, var(--calcite-shadow-none))}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}table{border-collapse:collapse;overflow-x:scroll;inline-size:var(--calcite-container-size-content-fluid)}@-moz-document url-prefix(){table{border-collapse:separate;border-spacing:0}}.table--fixed{table-layout:fixed}.bordered ::slotted(calcite-table-row){--calcite-table-row-border-color: var(--calcite-table-border-color, var(--calcite-color-border-2))}.striped ::slotted(calcite-table-row:nth-child(2n+1)){--calcite-table-row-background-color: var( --calcite-table-row-background-color-striped, var(--calcite-color-foreground-2) )}.selection-actions{display:flex;flex-direction:row;gap:var(--calcite-internal-table-selection-action-spacing);margin-inline-start:auto}.selection-area{display:flex;flex-direction:row;align-items:center;padding-block:var(--calcite-internal-table-cell-padding)}.selection-area calcite-chip:last-of-type{margin-inline-end:.5rem}.selection-area calcite-chip:last-of-type:not(:first-of-type){margin-inline-start:.5rem}.selection-area calcite-button{margin-inline-end:1rem}.selection-chip{--calcite-chip-background-color: var(--calcite-table-selection-chip-background-color);--calcite-chip-border-color: var(--calcite-table-selection-chip-border-color);--calcite-chip-corner-radius: var(--calcite-table-selection-chip-corner-radius);--calcite-chip-shadow: var(--calcite-table-selection-chip-shadow);--calcite-chip-text-color: var(--calcite-table-selection-chip-text-color)}.selection-chip.selection-chip--active{--calcite-chip-background-color: var(--calcite-table-selection-chip-background-color-selected);--calcite-chip-border-color: var(--calcite-table-selection-chip-border-color-selected);--calcite-chip-text-color: var(--calcite-table-selection-chip-text-color-selected)}.selection-chip--out-of-view{--calcite-chip-background-color: var(--calcite-table-selection-out-of-view-chip-background-color);--calcite-chip-border-color: var(--calcite-table-selection-out-of-view-chip-border-color);--calcite-chip-corner-radius: var(--calcite-table-selection-out-of-view-chip-corner-radius);--calcite-chip-shadow: var(--calcite-table-selection-out-of-view-chip-shadow);--calcite-chip-text-color: var(--calcite-table-selection-out-of-view-chip-text-color);--calcite-chip-icon-color: var(--calcite-table-selection-out-of-view-chip-icon-color)}.pagination-area{display:flex;inline-size:100%;flex-direction:row;justify-content:center;padding-block:var(--calcite-internal-table-cell-padding)}calcite-pagination{flex:1;justify-content:center;--calcite-pagination-color: var(--calcite-table-pagination-color);--calcite-pagination-color-hover: var(--calcite-table-pagination-color-hover);--calcite-pagination-color-border-hover: var(--calcite-table-pagination-color-border-hover);--calcite-pagination-color-border-active: var(--calcite-table-pagination-color-border-active);--calcite-pagination-background-color: var(--calcite-table-pagination-background-color);--calcite-pagination-icon-color-background-hover: var(--calcite-table-pagination-icon-color-background-hover)}.dismiss-button{margin-inline-end:1rem;--calcite-button-background-color: var(--calcite-table-selection-dismiss-button-background-color);--calcite-button-border-color: var(--calcite-table-selection-dismiss-button-border-color);--calcite-button-corner-radius: var(--calcite-table-selection-dismiss-button-corner-radius);--calcite-button-shadow: var(--calcite-table-selection-dismiss-button-shadow);--calcite-button-text-color: var(--calcite-table-selection-dismiss-button-text-color)}.dismiss-button:hover{--calcite-button-background-color: var(--calcite-table-selection-dismiss-button-background-color-hover);--calcite-button-border-color: var(--calcite-table-selection-dismiss-button-border-color-hover);--calcite-button-text-color: var(--calcite-table-selection-dismiss-button-text-color-hover)}.dismiss-button:active{--calcite-button-background-color: var(--calcite-table-selection-dismiss-button-background-color-active);--calcite-button-border-color: var(--calcite-table-selection-dismiss-button-border-color-active);--calcite-button-text-color: var(--calcite-table-selection-dismiss-button-text-color-active)}:host([hidden]){display:none}[hidden]{display:none}`,w=class extends A{constructor(){super(),this.paginationRef=u(),this.tableBodySlotRef=u(),this.tableFootSlotRef=u(),this.tableHeadSlotRef=u(),this.messages=P({blocking:!0}),this.colCount=0,this.pageStartRow=1,this.selectedCount=0,this._selectedItems=[],this.bordered=!1,this.currentPage=0,this.groupSeparator=!1,this.interactionMode="interactive",this.layout="auto",this.numbered=!1,this.pageSize=0,this.scale="m",this.selectionDisplay="top",this.selectionMode="none",this.striped=!1,this.calciteInternalTableRowFocusChange=p({cancelable:!1}),this.calciteTablePageChange=p({cancelable:!1}),this.calciteTableSelect=p({cancelable:!1}),this.listen("calciteTableRowSelect",this.calciteTableRowSelectListener),this.listen("calciteInternalTableRowSelect",this.calciteInternalTableRowSelectListener),this.listen("calciteInternalTableRowFocusRequest",this.calciteInternalTableRowFocusEvent)}static{this.properties={colCount:[16,{},{state:!0}],pageStartRow:[16,{},{state:!0}],readCellContentsToAT:[16,{},{state:!0}],selectedCount:[16,{},{state:!0}],_selectedItems:[16,{},{state:!0}],bordered:[7,{},{reflect:!0,type:Boolean}],caption:1,currentPage:[11,{},{reflect:!0,type:Number}],groupSeparator:[7,{},{reflect:!0,type:Boolean}],interactionMode:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],numbered:[7,{},{reflect:!0,type:Boolean}],numberingSystem:[3,{},{reflect:!0}],pageSize:[11,{},{reflect:!0,type:Number}],scale:[3,{},{reflect:!0}],selectedItems:[32,{},{attribute:!1,readOnly:!0}],selectionDisplay:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],striped:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=D}get selectedItems(){return this._selectedItems}async load(){this.readCellContentsToAT=/safari/i.test(N()),this.listenOn(this.el.shadowRoot,"slotchange",this.handleSlotChange)}willUpdate(e){(e.has("groupSeparator")&&(this.hasUpdated||this.groupSeparator!==!1)||e.has("interactionMode")&&(this.hasUpdated||this.interactionMode!=="interactive")||e.has("numbered")&&(this.hasUpdated||this.numbered!==!1)||e.has("numberingSystem")||e.has("pageSize")&&(this.hasUpdated||this.pageSize!==0)||e.has("scale")&&(this.hasUpdated||this.scale!=="m")||e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="none")||e.has("currentPage")&&(this.hasUpdated||this.currentPage>1)&&this.pageSize>0)&&this.updateRows()}handleSlotChange(){this.updateRows()}calciteTableRowSelectListener(e){e.composedPath().includes(this.el)&&this.setSelectedItems(e.target)}calciteInternalTableRowSelectListener(e){e.composedPath().includes(this.el)&&(this.updateSelectedItems(!1),e.stopPropagation())}calciteInternalTableRowFocusEvent(e){let i=e.detail.cellPosition,o=e.detail.rowPosition,a=e.detail.destination,r=e.detail.lastCell,t=this.bodyRows?.filter(b=>!g(b)),c=this.allRows?.filter(b=>!g(b)),S=this.headRows[this.headRows.length-1]?.positionAll,R=t[0]?.positionAll,y=t[t.length-1]?.positionAll,$=this.footRows[0]?.positionAll,M=c[c.length-1]?.positionAll,F=a==="next"&&o===S,O=a==="previous"&&o===$,E=a==="previous"&&o===R,B=a==="next"&&o===y,d;switch(a){case"first":d=0;break;case"last":d=M;break;case"next":d=F?R:B?$:o+1;break;case"previous":d=O?y:E?S:o-1;break}let C=this.allRows?.find(b=>b.positionAll===d)?.cellCount,H=i>C?C:i;d!==void 0&&this.calciteInternalTableRowFocusChange.emit({cellPosition:H,rowPosition:d,destination:a,lastCell:r})}getSlottedRows(e){return e?.assignedElements({flatten:!0})?.filter(i=>i?.matches("calcite-table-row"))}updateRows(){let e=this.getSlottedRows(this.tableHeadSlotRef.value)||[],i=this.getSlottedRows(this.tableBodySlotRef.value)||[],o=this.getSlottedRows(this.tableFootSlotRef.value)||[],a=[...e,...i,...o];e?.forEach(t=>{let c=e?.indexOf(t);t.rowType="head",t.positionSection=c,t.positionSectionLocalized=this.localizeNumber((c+1).toString())}),i?.forEach(t=>{let c=i?.indexOf(t);t.rowType="body",t.positionSection=c,t.positionSectionLocalized=this.localizeNumber((c+1).toString())}),o?.forEach(t=>{let c=o?.indexOf(t);t.rowType="foot",t.positionSection=c,t.positionSectionLocalized=this.localizeNumber((c+1).toString())}),a?.forEach(t=>{t.interactionMode=this.interactionMode,t.selectionMode=this.selectionMode,t.bodyRowCount=i?.length,t.positionAll=a?.indexOf(t),t.numbered=this.numbered,t.scale=this.scale,t.readCellContentsToAT=this.readCellContentsToAT,t.lastVisibleRow=a?.indexOf(t)===a.length-1});let r=e[0]?.cellCount||e[0]?.querySelectorAll("calcite-table-header")?.length;this.colCount=r,this.headRows=e,this.bodyRows=i,this.footRows=o,this.allRows=a,this.handleCurrentPageRange(),this.updateSelectedItems()}handleCurrentPageRange(){let e=this.currentPage,i=this.bodyRows?.length||0,o=this.pageSize>0?Math.ceil(i/this.pageSize):1;if(o>0){let a=Math.min(Math.max(e,1),o);this.currentPage=a,this.pageStartRow=(a-1)*this.pageSize+1}this.paginateRows()}handlePaginationChange(){let e=this.paginationRef.value?.startItem;this.pageStartRow=e||1,this.currentPage=Math.ceil(this.pageStartRow/this.pageSize),this.calciteTablePageChange.emit(),this.updateRows()}paginateRows(){this.bodyRows?.forEach(e=>{let i=e.positionSection+1,o=i>=this.pageStartRow&&i<this.pageStartRow+this.pageSize;e.itemHidden=this.pageSize>0&&!o&&!this.footRows.includes(e),e.lastVisibleRow=i===this.pageStartRow+this.pageSize-1||i===this.bodyRows.length})}async updateSelectedItems(e){let i=this.bodyRows?.filter(o=>o.selected);this._selectedItems=i,this.selectedCount=i?.length,this.allRows?.forEach(o=>{o.selectedRowCount=this.selectedCount,o.selectedRowCountLocalized=this.localizeNumber(this.selectedCount)}),e&&this.calciteTableSelect.emit()}handleDeselectAllRows(){this.bodyRows?.forEach(e=>{e.selected=!1}),this.updateSelectedItems(!0)}setSelectedItems(e){this.bodyRows?.forEach(i=>{e?.rowType==="head"?i.selected=this.selectedCount!==this.bodyRows?.length:i.selected=this.selectionMode==="multiple"||e===i?i.selected:!1}),this.updateSelectedItems(!0)}localizeNumber(e){return m.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},m.localize(e.toString())}renderSelectionArea(){let e=this._selectedItems?.filter(t=>g(t))?.length,i=this.localizeNumber(e?.toString()),a=`${this.localizeNumber(this.selectedCount?.toString())} ${this.messages.selected}`,r=`${i} ${this.messages.hiddenSelected}`;return n`<div class=${s(l.selectionArea)}><calcite-chip class=${s({[l.selectionCountChip]:!0,[l.selectionChipActive]:this.selectedCount>0})} .kind=${this.selectedCount>0?"brand":"neutral"} .label=${a} .scale=${this.scale} .value=${a}>${a}</calcite-chip>${e>0&&n`<calcite-chip class=${s(l.selectionOutOfViewChip)} .icon=${I.hideEmpty} .label=${r} .scale=${this.scale} title=${r??z} .value=${r}>${i}</calcite-chip>`||""}${this.selectedCount>0&&n`<calcite-button class=${s(l.dismissButton)} .iconStart=${I.clear} kind=neutral @click=${this.handleDeselectAllRows} round .scale=${this.scale} .title=${`${this.messages.clear} ${a} ${this.messages.row}`}>${this.messages.clear}</calcite-button>`||""}<div class=${s(l.selectionActions)}><slot name=${v.selectionActions}></slot></div></div>`}renderPaginationArea(){return n`<div class=${s(l.paginationArea)}><calcite-pagination .groupSeparator=${this.groupSeparator} .numberingSystem=${this.numberingSystem} @calcitePaginationChange=${this.handlePaginationChange} .pageSize=${this.pageSize} .scale=${this.scale} .startItem=${this.pageStartRow} .totalItems=${this.bodyRows?.length} ${h(this.paginationRef)}></calcite-pagination></div>`}renderTHead(){return n`<thead><slot name=${v.tableHeader} ${h(this.tableHeadSlotRef)}></slot></thead>`}renderTBody(){return n`<tbody><slot ${h(this.tableBodySlotRef)}></slot></tbody>`}renderTFoot(){return n`<tfoot><slot name=${v.tableFooter} ${h(this.tableFootSlotRef)}></slot></tfoot>`}render(){return n`<div class=${s(l.container)}>${this.selectionMode!=="none"&&this.selectionDisplay!=="none"&&this.renderSelectionArea()||""}<div class=${s({[l.bordered]:this.bordered,[l.striped]:this.striped,[l.tableContainer]:!0})}><table .ariaColCount=${this.colCount} .ariaMultiSelectable=${this.selectionMode==="multiple"?"true":null} .ariaRowCount=${this.allRows?.length} class=${s({[l.tableFixed]:this.layout==="fixed"})} .role=${this.interactionMode==="interactive"?"grid":"table"} ${h(e=>{e&&T(n`<caption class=${s(l.assistiveText)}>${this.caption}</caption>${this.renderTHead()}${this.renderTBody()}${this.renderTFoot()}`,e)})}></table></div>${this.pageSize>0&&this.renderPaginationArea()||""}</div>`}};k("calcite-table",w);export{w as Table};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as u}from"./
|
|
3
|
+
v5.0.0-next.24 */
|
|
4
|
+
import{a as u}from"./VKUS34R6.js";import{a}from"./4JL57EDA.js";import{C as e,E as r,h as o,l as n}from"./GAXQ53KY.js";var i={button:"x-button",buttonRound:"x-button--round"},k=({disabled:c,focusable:b,key:m,label:s,onClick:l,ref:$,round:f=!0,scale:t,title:p})=>u(m,o`<button .ariaLabel=${s} class=${r({[(d=>`x-button--${d}`)(t)]:!0,[i.button]:!0,[i.buttonRound]:f})} .disabled=${c} @click=${l} .tabIndex=${b?0:-1} title=${p??n} type=button ${e($)}><calcite-icon icon=x .scale=${a(t)}></calcite-icon></button>`);export{i as a,k as b};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{e as u}from"./
|
|
3
|
+
v5.0.0-next.24 */
|
|
4
|
+
import{e as u}from"./UMESQ2SZ.js";import{a as d}from"./A7AWHUCH.js";import{D as c,P as h,h as r,o}from"./GAXQ53KY.js";var b=[" ",`
|
|
5
5
|
`," ","\r"],m=/[^\S\u00A0]+/g,a=class extends c{constructor(){super(...arguments),this.mutationObserver=d("mutation",()=>{this.ensureTextContentDependentProps(),this.calciteInternalOptionChange.emit()}),this.disabled=!1,this.calciteInternalOptionChange=o({cancelable:!1})}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],label:1,selected:[7,{},{reflect:!0,type:Boolean}],value:1}}connectedCallback(){super.connectedCallback(),this.ensureTextContentDependentProps(),this.mutationObserver?.observe(this.el,{attributeFilter:["label","value"],characterData:!0,childList:!0,subtree:!0})}willUpdate(e){e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handlePropChange(this.disabled,e.get("disabled"),"disabled"),e.has("label")&&this.handlePropChange(this.label,e.get("label"),"label"),e.has("selected")&&this.handlePropChange(this.selected,e.get("selected"),"selected"),e.has("value")&&this.handlePropChange(this.value,e.get("value"),"value")}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}handlePropChange(e,s,t){(t==="label"||t==="value")&&this.ensureTextContentDependentProps(),this.calciteInternalOptionChange.emit()}ensureTextContentDependentProps(){let{el:e,internallySetLabel:s,internallySetValue:t,label:p,value:i}=this,l=u(e.textContent,b).replaceAll(m," "),n=p;(!n||n===s)&&(this.label=l,this.internallySetLabel=l),(i==null||i===t)&&(this.value=l,this.internallySetValue=l)}render(){return r`<slot>${this.label}</slot>`}};h("calcite-option",a);export{a as Option};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as R}from"./LFHO5RGS.js";import{a as O}from"./BNXRPXJI.js";import{c as q,d as M,e as E}from"./LI5YPUR2.js";import{c as I,e as z,h as F}from"./J5L5B4RM.js";import{a as S}from"./6PA7NX4D.js";import{a as C}from"./LBBTSMHU.js";import{a as L}from"./G6J7J6UV.js";import"./SVPH24SK.js";import"./OB6IN7GG.js";import"./YK6VE25V.js";import{a as V}from"./TCBKBDOC.js";import{A as y,D as $,E as s,F as x,G as o,I as k,P as w,g as b,h as n,o as f}from"./HHXCNSRO.js";var T=({full:h,scale:e,partial:t})=>n`<calcite-icon class=${s(t?void 0:"icon")} .icon=${h?"star-f":"star"} .scale=${e}></calcite-icon>`,l={fieldSet:"fieldset",star:"star",fraction:"fraction",numberAverage:"number--average",numberCount:"number--count",wrapper:"wrapper",visuallyHidden:"visually-hidden"},D="calcite-ratings",m={validationMessage:"validationMessage",host:h=>`${D}-${h}`},K=b`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([read-only]) *,:host([disabled]) *,:host([read-only]) ::slotted(*),:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:flex;align-items:center;inline-size:fit-content}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){block-size:1.5rem;--calcite-internal-rating-spacing: .25rem}:host([scale=m]){block-size:2rem;--calcite-internal-rating-spacing: .5rem}:host([scale=l]){block-size:2.75rem;--calcite-internal-rating-spacing: .75rem}.fieldset{margin:0;display:flex;border-width:0;padding:0;align-items:center;gap:var(--calcite-rating-spacing, var(--calcite-internal-rating-spacing))}.wrapper{display:inline-block}.star{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;position:relative;display:flex;flex-direction:column;cursor:pointer;color:var(--calcite-rating-color, var(--calcite-color-border-input))}.star:hover{color:var(--calcite-rating-color-hover, var(--calcite-color-brand-hover))}.star:active{color:var(--calcite-rating-color-press, var(--calcite-color-brand-press))}.star:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.average,.fraction{color:var(--calcite-rating-average-color, var(--calcite-color-status-warning))}.hovered,.selected{color:var(--calcite-rating-color, var(--calcite-color-brand))}.fraction{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;position:absolute;pointer-events:none;inset-block-start:0;overflow:hidden;inset-inline-start:0}calcite-chip{pointer-events:none;cursor:default}.number--average{font-weight:700;color:var(--calcite-rating-average-text-color)}.number--count{color:var(--calcite-rating-count-text-color, var(--calcite-color-text-2));font-style:italic}.number--count:not(:first-child){margin-inline-start:var(--calcite-rating-spacing, var(--calcite-internal-rating-spacing))}.visually-hidden{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`,v=class extends ${constructor(){super(),this.emit=!1,this.guid=m.host(V()),this.isKeyboardInteraction=!0,this.labelElements=[],this.max=5,this._value=0,this.messages=C({blocking:!0}),this.focusSetter=L()(this),this.interactiveContainer=S(this),this.disabled=!1,this.readOnly=!1,this.required=!1,this.scale="m",this.showChip=!1,this.status="idle",this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.calciteRatingChange=f({cancelable:!1}),this.listen("keydown",this.handleHostKeyDown),this.listen("pointerout",this.handleRatingPointerOut),this.listen("pointerover",this.handleRatingPointerOver)}static{this.properties={hoverValue:[16,{},{state:!0}],average:[11,{},{reflect:!0,type:Number}],count:[11,{},{reflect:!0,type:Number}],disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],labelText:1,messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],showChip:[7,{},{reflect:!0,type:Boolean}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:k,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:[11,{},{reflect:!0,type:Number}]}}static{this.styles=K}get value(){return this._value}set value(e){let t=this._value;e!==t&&(this._value=e,this.hasUpdated&&this.handleValueUpdate(e))}async setFocus(e){return this.focusSetter(()=>this.el,e)}connectedCallback(){super.connectedCallback(),q(this),I(this)}async load(){this.requestUpdate("value")}willUpdate(){this.starsMap=Array.from({length:this.max},(e,t)=>{let a=t+1,i=!this.hoverValue&&this.average&&!this.value&&a<=this.average,u=a===this.value,r=this.average&&this.average+1-a,c=a<=this.hoverValue,p=`${this.guid}-${a}`,d=!this.hoverValue&&!this.value&&!c&&r>0&&r<1,g=this.value>=a,P=this.getTabIndex(a);return{average:i,checked:u,fraction:r,hovered:c,id:p,partial:d,selected:g,value:a,tabIndex:P}})}loaded(){this.labelElements=Array.from(this.renderRoot.querySelectorAll("label"))}disconnectedCallback(){super.disconnectedCallback(),M(this),z(this)}handleValueUpdate(e){this.hoverValue=e,this.emit&&this.calciteRatingChange.emit(),this.emit=!1}onLabelClick(){this.setFocus()}handleRatingPointerOver(){this.isKeyboardInteraction=!1}handleRatingPointerOut(){this.isKeyboardInteraction=!0,this.hoverValue=null}handleHostKeyDown(){this.isKeyboardInteraction=!0}handleLabelKeyDown(e){let t=this.getValueFromLabelEvent(e),a=e.key,i=a==" "?void 0:Number(a);if(this.emit=!0,isNaN(i))switch(a){case"Enter":case" ":this.value=!this.required&&this.value===t?0:t;break;case"ArrowLeft":this.value=this.getPreviousRatingValue(t),this.updateFocus(),e.preventDefault();break;case"ArrowRight":this.value=this.getNextRatingValue(t),this.updateFocus(),e.preventDefault();break;case"Tab":this.hoverValue=null;break}else!this.required&&i>=0&&i<=this.max?this.value=i:this.required&&i>0&&i<=this.max&&(this.value=i),this.updateFocus()}handleInputChange(e){if(this.isKeyboardInteraction===!0){let t=Number(e.target.value);this.hoverValue=t,this.value=t}}handleLabelPointerOver(e){this.hoverValue=this.getValueFromLabelEvent(e)}handleLabelPointerDown(e){let t=e.currentTarget,a=this.getValueFromLabelEvent(e);this.hoverValue=a,this.emit=!0,this.value=!this.required&&this.value===a?0:a,t.focus()}handleLabelClick(e){e.preventDefault()}handleLabelFocus(e){let t=this.getValueFromLabelEvent(e);this.hoverValue=t}updateFocus(){this.hoverValue=this.value,this.labelElements[this.value-1].focus()}getTabIndex(e){return this.readOnly||this.value!==e&&(this.value||e!==1)?-1:0}getValueFromLabelEvent(e){let t=e.currentTarget;return Number(t.getAttribute("data-value"))}getNextRatingValue(e){return e===5?1:e+1}getPreviousRatingValue(e){return e===1?5:e-1}render(){let e=this.count?.toString();return this.interactiveContainer({disabled:this.disabled,children:n`<span class=${s(l.wrapper)}>${this.labelText&&O({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<fieldset class=${s(l.fieldSet)} .disabled=${this.disabled}><legend class=${s(l.visuallyHidden)}>${this.messages.rating}</legend>${this.starsMap.map(({average:t,checked:a,fraction:i,hovered:u,id:r,partial:c,selected:p,value:d,tabIndex:g})=>n`<label class=${s({[l.star]:!0,selected:p,hovered:u,average:t,partial:c})} data-value=${d??o} for=${r??o} @click=${this.handleLabelClick} @focus=${this.handleLabelFocus} @keydown=${this.handleLabelKeyDown} @pointerdown=${this.handleLabelPointerDown} @pointerover=${this.handleLabelPointerOver} tabindex=${g??o}><input aria-errormessage=${m.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaLabel=${E(this)} .ariaRequired=${this.required} .checked=${a} class=${s(l.visuallyHidden)} .disabled=${this.disabled||this.readOnly} id=${r??o} name=${this.guid??o} @change=${this.handleInputChange} tabindex=-1 type=radio .value=${y(d??"")}>${T({full:p||t||u,scale:this.scale})}${c&&n`<div class=${s(l.fraction)} style=${x({width:`${i*100}%`})}>${T({full:!0,partial:!0,scale:this.scale})}</div>`||""}<span class=${s(l.visuallyHidden)}>${this.messages.stars.replace("{num}",`${d}`)}</span></label>`)}${(this.count||this.average)&&this.showChip?n`<calcite-chip .label=${e} .scale=${this.scale} .value=${e}>${!!this.average&&n`<span class=${s(l.numberAverage)}>${this.average.toString()}</span>`||""}${!!this.count&&n`<span class=${s(l.numberCount)}>(${e})</span>`||""}</calcite-chip>`:null}</fieldset>${F({component:this})}${this.validationMessage&&this.status==="invalid"?R({icon:this.validationIcon,id:m.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}</span>`})}};w("calcite-rating",v);export{v as Rating};
|
|
3
|
+
v5.0.0-next.24 */
|
|
4
|
+
import{a as R}from"./CD3UAK2W.js";import{a as O}from"./HSHIW42B.js";import{c as q,d as M,e as E}from"./ZT6GWFZI.js";import{c as I,e as z,h as F}from"./FVRYO4N6.js";import{a as S}from"./L2VNGTSR.js";import{a as C}from"./EQ25YK3K.js";import{a as L}from"./MT4G6FVR.js";import"./4JL57EDA.js";import"./VKBFZH3Q.js";import"./W35ZAP2H.js";import{a as V}from"./EK3BWMVE.js";import{A as y,D as $,E as s,F as x,G as o,I as k,P as w,g as b,h as n,o as f}from"./GAXQ53KY.js";var T=({full:h,scale:e,partial:t})=>n`<calcite-icon class=${s(t?void 0:"icon")} .icon=${h?"star-f":"star"} .scale=${e}></calcite-icon>`,l={fieldSet:"fieldset",star:"star",fraction:"fraction",numberAverage:"number--average",numberCount:"number--count",wrapper:"wrapper",visuallyHidden:"visually-hidden"},D="calcite-ratings",m={validationMessage:"validationMessage",host:h=>`${D}-${h}`},K=b`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([read-only]) *,:host([disabled]) *,:host([read-only]) ::slotted(*),:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:flex;align-items:center;inline-size:fit-content}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){block-size:1.5rem;--calcite-internal-rating-spacing: .25rem}:host([scale=m]){block-size:2rem;--calcite-internal-rating-spacing: .5rem}:host([scale=l]){block-size:2.75rem;--calcite-internal-rating-spacing: .75rem}.fieldset{margin:0;display:flex;border-width:0;padding:0;align-items:center;gap:var(--calcite-rating-spacing, var(--calcite-internal-rating-spacing))}.wrapper{display:inline-block}.star{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;position:relative;display:flex;flex-direction:column;cursor:pointer;color:var(--calcite-rating-color, var(--calcite-color-border-input))}.star:hover{color:var(--calcite-rating-color-hover, var(--calcite-color-brand-hover))}.star:active{color:var(--calcite-rating-color-press, var(--calcite-color-brand-press))}.star:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.average,.fraction{color:var(--calcite-rating-average-color, var(--calcite-color-status-warning))}.hovered,.selected{color:var(--calcite-rating-color, var(--calcite-color-brand))}.fraction{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;position:absolute;pointer-events:none;inset-block-start:0;overflow:hidden;inset-inline-start:0}calcite-chip{pointer-events:none;cursor:default}.number--average{font-weight:700;color:var(--calcite-rating-average-text-color)}.number--count{color:var(--calcite-rating-count-text-color, var(--calcite-color-text-2));font-style:italic}.number--count:not(:first-child){margin-inline-start:var(--calcite-rating-spacing, var(--calcite-internal-rating-spacing))}.visually-hidden{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`,v=class extends ${constructor(){super(),this.emit=!1,this.guid=m.host(V()),this.isKeyboardInteraction=!0,this.labelElements=[],this.max=5,this._value=0,this.messages=C({blocking:!0}),this.focusSetter=L()(this),this.interactiveContainer=S(this),this.disabled=!1,this.readOnly=!1,this.required=!1,this.scale="m",this.showChip=!1,this.status="idle",this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.calciteRatingChange=f({cancelable:!1}),this.listen("keydown",this.handleHostKeyDown),this.listen("pointerout",this.handleRatingPointerOut),this.listen("pointerover",this.handleRatingPointerOver)}static{this.properties={hoverValue:[16,{},{state:!0}],average:[11,{},{reflect:!0,type:Number}],count:[11,{},{reflect:!0,type:Number}],disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],labelText:1,messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],showChip:[7,{},{reflect:!0,type:Boolean}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:k,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:[11,{},{reflect:!0,type:Number}]}}static{this.styles=K}get value(){return this._value}set value(e){let t=this._value;e!==t&&(this._value=e,this.hasUpdated&&this.handleValueUpdate(e))}async setFocus(e){return this.focusSetter(()=>this.el,e)}connectedCallback(){super.connectedCallback(),q(this),I(this)}async load(){this.requestUpdate("value")}willUpdate(){this.starsMap=Array.from({length:this.max},(e,t)=>{let a=t+1,i=!this.hoverValue&&this.average&&!this.value&&a<=this.average,u=a===this.value,r=this.average&&this.average+1-a,c=a<=this.hoverValue,p=`${this.guid}-${a}`,d=!this.hoverValue&&!this.value&&!c&&r>0&&r<1,g=this.value>=a,P=this.getTabIndex(a);return{average:i,checked:u,fraction:r,hovered:c,id:p,partial:d,selected:g,value:a,tabIndex:P}})}loaded(){this.labelElements=Array.from(this.renderRoot.querySelectorAll("label"))}disconnectedCallback(){super.disconnectedCallback(),M(this),z(this)}handleValueUpdate(e){this.hoverValue=e,this.emit&&this.calciteRatingChange.emit(),this.emit=!1}onLabelClick(){this.setFocus()}handleRatingPointerOver(){this.isKeyboardInteraction=!1}handleRatingPointerOut(){this.isKeyboardInteraction=!0,this.hoverValue=null}handleHostKeyDown(){this.isKeyboardInteraction=!0}handleLabelKeyDown(e){let t=this.getValueFromLabelEvent(e),a=e.key,i=a==" "?void 0:Number(a);if(this.emit=!0,isNaN(i))switch(a){case"Enter":case" ":this.value=!this.required&&this.value===t?0:t;break;case"ArrowLeft":this.value=this.getPreviousRatingValue(t),this.updateFocus(),e.preventDefault();break;case"ArrowRight":this.value=this.getNextRatingValue(t),this.updateFocus(),e.preventDefault();break;case"Tab":this.hoverValue=null;break}else!this.required&&i>=0&&i<=this.max?this.value=i:this.required&&i>0&&i<=this.max&&(this.value=i),this.updateFocus()}handleInputChange(e){if(this.isKeyboardInteraction===!0){let t=Number(e.target.value);this.hoverValue=t,this.value=t}}handleLabelPointerOver(e){this.hoverValue=this.getValueFromLabelEvent(e)}handleLabelPointerDown(e){let t=e.currentTarget,a=this.getValueFromLabelEvent(e);this.hoverValue=a,this.emit=!0,this.value=!this.required&&this.value===a?0:a,t.focus()}handleLabelClick(e){e.preventDefault()}handleLabelFocus(e){let t=this.getValueFromLabelEvent(e);this.hoverValue=t}updateFocus(){this.hoverValue=this.value,this.labelElements[this.value-1].focus()}getTabIndex(e){return this.readOnly||this.value!==e&&(this.value||e!==1)?-1:0}getValueFromLabelEvent(e){let t=e.currentTarget;return Number(t.getAttribute("data-value"))}getNextRatingValue(e){return e===5?1:e+1}getPreviousRatingValue(e){return e===1?5:e-1}render(){let e=this.count?.toString();return this.interactiveContainer({disabled:this.disabled,children:n`<span class=${s(l.wrapper)}>${this.labelText&&O({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<fieldset class=${s(l.fieldSet)} .disabled=${this.disabled}><legend class=${s(l.visuallyHidden)}>${this.messages.rating}</legend>${this.starsMap.map(({average:t,checked:a,fraction:i,hovered:u,id:r,partial:c,selected:p,value:d,tabIndex:g})=>n`<label class=${s({[l.star]:!0,selected:p,hovered:u,average:t,partial:c})} data-value=${d??o} for=${r??o} @click=${this.handleLabelClick} @focus=${this.handleLabelFocus} @keydown=${this.handleLabelKeyDown} @pointerdown=${this.handleLabelPointerDown} @pointerover=${this.handleLabelPointerOver} tabindex=${g??o}><input aria-errormessage=${m.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaLabel=${E(this)} .ariaRequired=${this.required} .checked=${a} class=${s(l.visuallyHidden)} .disabled=${this.disabled||this.readOnly} id=${r??o} name=${this.guid??o} @change=${this.handleInputChange} tabindex=-1 type=radio .value=${y(d??"")}>${T({full:p||t||u,scale:this.scale})}${c&&n`<div class=${s(l.fraction)} style=${x({width:`${i*100}%`})}>${T({full:!0,partial:!0,scale:this.scale})}</div>`||""}<span class=${s(l.visuallyHidden)}>${this.messages.stars.replace("{num}",`${d}`)}</span></label>`)}${(this.count||this.average)&&this.showChip?n`<calcite-chip .label=${e} .scale=${this.scale} .value=${e}>${!!this.average&&n`<span class=${s(l.numberAverage)}>${this.average.toString()}</span>`||""}${!!this.count&&n`<span class=${s(l.numberCount)}>(${e})</span>`||""}</calcite-chip>`:null}</fieldset>${F({component:this})}${this.validationMessage&&this.status==="invalid"?R({icon:this.validationIcon,id:m.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}</span>`})}};w("calcite-rating",v);export{v as Rating};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.24 */
|
|
4
4
|
var a=class{constructor(){this._formatterCache=new Map,this._commonDateTimeFormatterOptions={year:"numeric",month:"2-digit",day:"2-digit",timeZoneName:"shortOffset"}}get name(){return"native"}create(t){return new Date(t)}increase(t){return new Date(t.getTime()+864e5)}formatToIsoDateString(t){let e=t.getFullYear(),n=t.getMonth()+1,r=t.getDate();return`${e}-${n.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}`}isoToTimeZone(t,e){let n=this._toDate(t),o=this._getFormatter(e).formatToParts(n),[i]=o.filter(({type:s})=>s==="timeZoneName").map(({value:s})=>s),m=this._getTimeZoneOffsetInMins(i),c=n.getMinutes()-(n.getTimezoneOffset()-m);return n.setMinutes(c),n}same(t,e){return t.getTime()===e.getTime()}_toDate(t){return new Date(t)}_getFormatter(t){t==="Factory"&&(t="Etc/GMT");let e=this._formatterCache.get(t);return e||(e=new Intl.DateTimeFormat("en-US",{timeZone:t,...this._commonDateTimeFormatterOptions}),this._formatterCache.set(t,e)),e}_getTimeZoneOffsetInMins(t){let[e,...n]=t.slice(3),[r,o]=n.join("").split(":");return(e==="+"?1:-1)*(Number(r)*60+Number(o||0))}};export{a as DateEngine};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.24 */
|
|
4
4
|
var n={container:"container",containerNone:"container--none-selection",icon:"dropdown-item-icon",iconEnd:"dropdown-item-icon--end",iconStart:"dropdown-item-icon--start",itemContent:"dropdown-item-content",link:"dropdown-link"},o={check:"check",bulletPoint:"bullet-point"};export{n as a,o as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.24 */
|
|
4
4
|
function s(r,e,{signal:o,edges:m}={}){let p,t=null,i=m!=null&&m.includes("leading"),x=m==null||m.includes("trailing"),l=()=>{t!==null&&(r.apply(p,t),p=void 0,t=null)},h=()=>{x&&l(),a()},f=null,u=()=>{f!=null&&clearTimeout(f),f=setTimeout(()=>{f=null,h()},e)},y=()=>{f!==null&&(clearTimeout(f),f=null)},a=()=>{y(),p=void 0,t=null},g=()=>{l()},n=function(...b){if(o?.aborted)return;p=this,t=b;let B=f==null;u(),i&&B&&l()};return n.schedule=u,n.cancel=a,n.flush=g,o?.addEventListener("abort",a,{once:!0}),n}function w(r,e,{signal:o,edges:m=["leading","trailing"]}={}){let p=null,t=s(r,e,{signal:o,edges:m}),i=function(...x){p==null?p=Date.now():Date.now()-p>=e&&(p=Date.now(),t.cancel()),t.apply(this,x)};return i.cancel=t.cancel,i.flush=t.flush,i}function c(r,e){if(e===void 0)return r.trimEnd();let o=r.length;switch(typeof e){case"string":{if(e.length!==1)throw new Error("The 'chars' parameter should be a single character string.");for(;o>0&&r[o-1]===e;)o--;break}case"object":for(;o>0&&e.includes(r[o-1]);)o--}return r.substring(0,o)}function d(r,e){if(e===void 0)return r.trimStart();let o=0;switch(typeof e){case"string":{for(;o<r.length&&r[o]===e;)o++;break}case"object":for(;o<r.length&&e.includes(r[o]);)o++}return r.substring(o)}function S(r,e){return e===void 0?r.trim():d(c(r,e),e)}function z(r){return r}function D(r){return r.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&")}export{s as a,z as b,w as c,D as d,S as e};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as oe}from"./
|
|
3
|
+
v5.0.0-next.24 */
|
|
4
|
+
import{a as oe}from"./VKBFZH3Q.js";import{a as ne,l as ie}from"./W35ZAP2H.js";import{N as re}from"./GAXQ53KY.js";var se=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],B=se.join(","),ce=typeof Element>"u",D=ce?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,K=!ce&&Element.prototype.getRootNode?function(a){var e;return a==null||(e=a.getRootNode)===null||e===void 0?void 0:e.call(a)}:function(a){return a?.ownerDocument},j=function a(e,t){var r;t===void 0&&(t=!0);var u=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),s=u===""||u==="true",n=s||t&&e&&a(e.parentNode);return n},Se=function(e){var t,r=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return r===""||r==="true"},le=function(e,t,r){if(j(e))return[];var u=Array.prototype.slice.apply(e.querySelectorAll(B));return t&&D.call(e,B)&&u.unshift(e),u=u.filter(r),u},fe=function a(e,t,r){for(var u=[],s=Array.from(e);s.length;){var n=s.shift();if(!j(n,!1))if(n.tagName==="SLOT"){var d=n.assignedElements(),l=d.length?d:n.children,y=a(l,!0,r);r.flatten?u.push.apply(u,y):u.push({scopeParent:n,candidates:y})}else{var T=D.call(n,B);T&&r.filter(n)&&(t||!e.includes(n))&&u.push(n);var w=n.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(n),S=!j(w,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(n));if(w&&S){var C=a(w===!0?n.children:w.children,!0,r);r.flatten?u.push.apply(u,C):u.push({scopeParent:n,candidates:C})}else s.unshift.apply(s,n.children)}}return u},de=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},E=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Se(e))&&!de(e)?0:e.tabIndex},ke=function(e,t){var r=E(e);return r<0&&t&&!de(e)?0:r},De=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},ve=function(e){return e.tagName==="INPUT"},Re=function(e){return ve(e)&&e.type==="hidden"},Ce=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return t},Oe=function(e,t){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===t)return e[r]},Ae=function(e){if(!e.name)return!0;var t=e.form||K(e),r=function(d){return t.querySelectorAll('input[type="radio"][name="'+d+'"]')},u;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")u=r(window.CSS.escape(e.name));else try{u=r(e.name)}catch(n){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",n.message),!1}var s=Oe(u,e.form);return!s||s===e},Ie=function(e){return ve(e)&&e.type==="radio"},Pe=function(e){return Ie(e)&&!Ae(e)},xe=function(e){var t,r=e&&K(e),u=(t=r)===null||t===void 0?void 0:t.host,s=!1;if(r&&r!==e){var n,d,l;for(s=!!((n=u)!==null&&n!==void 0&&(d=n.ownerDocument)!==null&&d!==void 0&&d.contains(u)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!s&&u;){var y,T,w;r=K(u),u=(y=r)===null||y===void 0?void 0:y.host,s=!!((T=u)!==null&&T!==void 0&&(w=T.ownerDocument)!==null&&w!==void 0&&w.contains(u))}}return s},ue=function(e){var t=e.getBoundingClientRect(),r=t.width,u=t.height;return r===0&&u===0},Le=function(e,t){var r=t.displayCheck,u=t.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var s=D.call(e,"details>summary:first-of-type"),n=s?e.parentElement:e;if(D.call(n,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof u=="function"){for(var d=e;e;){var l=e.parentElement,y=K(e);if(l&&!l.shadowRoot&&u(l)===!0)return ue(e);e.assignedSlot?e=e.assignedSlot:!l&&y!==e.ownerDocument?e=y.host:e=l}e=d}if(xe(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return ue(e);return!1},Be=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var r=0;r<t.children.length;r++){var u=t.children.item(r);if(u.tagName==="LEGEND")return D.call(t,"fieldset[disabled] *")?!0:!u.contains(e)}return!0}t=t.parentElement}return!1},M=function(e,t){return!(t.disabled||j(t)||Re(t)||Le(t,e)||Ce(t)||Be(t))},$=function(e,t){return!(Pe(t)||E(t)<0||!M(e,t))},Ke=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},je=function a(e){var t=[],r=[];return e.forEach(function(u,s){var n=!!u.scopeParent,d=n?u.scopeParent:u,l=ke(d,n),y=n?a(u.candidates):d;l===0?n?t.push.apply(t,y):t.push(d):r.push({documentOrder:s,tabIndex:l,item:u,isScope:n,content:y})}),r.sort(De).reduce(function(u,s){return s.isScope?u.push.apply(u,s.content):u.push(s.content),u},[]).concat(t)},be=function(e,t){t=t||{};var r;return t.getShadowRoot?r=fe([e],t.includeContainer,{filter:$.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Ke}):r=le(e,t.includeContainer,$.bind(null,t)),je(r)},he=function(e,t){t=t||{};var r;return t.getShadowRoot?r=fe([e],t.includeContainer,{filter:M.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):r=le(e,t.includeContainer,M.bind(null,t)),r},R=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return D.call(e,B)===!1?!1:$(t,e)},Me=se.concat("iframe").join(","),G=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return D.call(e,Me)===!1?!1:M(t,e)};function Y(a,e){(e==null||e>a.length)&&(e=a.length);for(var t=0,r=Array(e);t<e;t++)r[t]=a[t];return r}function Ge(a){if(Array.isArray(a))return Y(a)}function _e(a,e,t){return(e=$e(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function qe(a){if(typeof Symbol<"u"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function Ve(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
5
5
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pe(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(a);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(a,u).enumerable})),t.push.apply(t,r)}return t}function ye(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?pe(Object(t),!0).forEach(function(r){_e(a,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):pe(Object(t)).forEach(function(r){Object.defineProperty(a,r,Object.getOwnPropertyDescriptor(t,r))})}return a}function Ue(a){return Ge(a)||qe(a)||Ye(a)||Ve()}function We(a,e){if(typeof a!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var r=t.call(a,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function $e(a){var e=We(a,"string");return typeof e=="symbol"?e:e+""}function Ye(a,e){if(a){if(typeof a=="string")return Y(a,e);var t={}.toString.call(a).slice(8,-1);return t==="Object"&&a.constructor&&(t=a.constructor.name),t==="Map"||t==="Set"?Array.from(a):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Y(a,e):void 0}}var ge={activateTrap:function(e,t){if(e.length>0){var r=e[e.length-1];r!==t&&r._setPausedState(!0)}var u=e.indexOf(t);u===-1||e.splice(u,1),e.push(t)},deactivateTrap:function(e,t){var r=e.indexOf(t);r!==-1&&e.splice(r,1),e.length>0&&!e[e.length-1]._isManuallyPaused()&&e[e.length-1]._setPausedState(!1)}},Ze=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},ze=function(e){return e?.key==="Escape"||e?.key==="Esc"||e?.keyCode===27},x=function(e){return e?.key==="Tab"||e?.keyCode===9},Xe=function(e){return x(e)&&!e.shiftKey},He=function(e){return x(e)&&e.shiftKey},me=function(e){return setTimeout(e,0)},P=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),u=1;u<t;u++)r[u-1]=arguments[u];return typeof e=="function"?e.apply(void 0,r):e},_=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},Je=[],we=function(e,t){var r=t?.document||document,u=t?.trapStack||Je,s=ye({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:Xe,isKeyBackward:He},t),n={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},d,l=function(i,o,c){return i&&i[o]!==void 0?i[o]:s[c||o]},y=function(i,o){var c=typeof o?.composedPath=="function"?o.composedPath():void 0;return n.containerGroups.findIndex(function(v){var b=v.container,p=v.tabbableNodes;return b.contains(i)||c?.includes(b)||p.find(function(f){return f===i})})},T=function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=o.hasFallback,v=c===void 0?!1:c,b=o.params,p=b===void 0?[]:b,f=s[i];if(typeof f=="function"&&(f=f.apply(void 0,Ue(p))),f===!0&&(f=void 0),!f){if(f===void 0||f===!1)return f;throw new Error("`".concat(i,"` was specified but was not a node, or did not return a node"))}var g=f;if(typeof f=="string"){try{g=r.querySelector(f)}catch(m){throw new Error("`".concat(i,'` appears to be an invalid selector; error="').concat(m.message,'"'))}if(!g&&!v)throw new Error("`".concat(i,"` as selector refers to no known node"))}return g},w=function(){var i=T("initialFocus",{hasFallback:!0});if(i===!1)return!1;if(i===void 0||i&&!G(i,s.tabbableOptions))if(y(r.activeElement)>=0)i=r.activeElement;else{var o=n.tabbableGroups[0],c=o&&o.firstTabbableNode;i=c||T("fallbackFocus")}else i===null&&(i=T("fallbackFocus"));if(!i)throw new Error("Your focus-trap needs to have at least one focusable element");return i},S=function(){if(n.containerGroups=n.containers.map(function(i){var o=be(i,s.tabbableOptions),c=he(i,s.tabbableOptions),v=o.length>0?o[0]:void 0,b=o.length>0?o[o.length-1]:void 0,p=c.find(function(m){return R(m)}),f=c.slice().reverse().find(function(m){return R(m)}),g=!!o.find(function(m){return E(m)>0});return{container:i,tabbableNodes:o,focusableNodes:c,posTabIndexesFound:g,firstTabbableNode:v,lastTabbableNode:b,firstDomTabbableNode:p,lastDomTabbableNode:f,nextTabbableNode:function(k){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,N=o.indexOf(k);return N<0?A?c.slice(c.indexOf(k)+1).find(function(I){return R(I)}):c.slice(0,c.indexOf(k)).reverse().find(function(I){return R(I)}):o[N+(A?1:-1)]}}}),n.tabbableGroups=n.containerGroups.filter(function(i){return i.tabbableNodes.length>0}),n.tabbableGroups.length<=0&&!T("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(n.containerGroups.find(function(i){return i.posTabIndexesFound})&&n.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},C=function(i){var o=i.activeElement;if(o)return o.shadowRoot&&o.shadowRoot.activeElement!==null?C(o.shadowRoot):o},F=function(i){if(i!==!1&&i!==C(document)){if(!i||!i.focus){F(w());return}i.focus({preventScroll:!!s.preventScroll}),n.mostRecentlyFocusedNode=i,Ze(i)&&i.select()}},Z=function(i){var o=T("setReturnFocus",{params:[i]});return o||(o===!1?!1:i)},z=function(i){var o=i.target,c=i.event,v=i.isBackward,b=v===void 0?!1:v;o=o||_(c),S();var p=null;if(n.tabbableGroups.length>0){var f=y(o,c),g=f>=0?n.containerGroups[f]:void 0;if(f<0)b?p=n.tabbableGroups[n.tabbableGroups.length-1].lastTabbableNode:p=n.tabbableGroups[0].firstTabbableNode;else if(b){var m=n.tabbableGroups.findIndex(function(U){var W=U.firstTabbableNode;return o===W});if(m<0&&(g.container===o||G(o,s.tabbableOptions)&&!R(o,s.tabbableOptions)&&!g.nextTabbableNode(o,!1))&&(m=f),m>=0){var k=m===0?n.tabbableGroups.length-1:m-1,A=n.tabbableGroups[k];p=E(o)>=0?A.lastTabbableNode:A.lastDomTabbableNode}else x(c)||(p=g.nextTabbableNode(o,!1))}else{var N=n.tabbableGroups.findIndex(function(U){var W=U.lastTabbableNode;return o===W});if(N<0&&(g.container===o||G(o,s.tabbableOptions)&&!R(o,s.tabbableOptions)&&!g.nextTabbableNode(o))&&(N=f),N>=0){var I=N===n.tabbableGroups.length-1?0:N+1,ae=n.tabbableGroups[I];p=E(o)>=0?ae.firstTabbableNode:ae.firstDomTabbableNode}else x(c)||(p=g.nextTabbableNode(o))}}else p=T("fallbackFocus");return p},L=function(i){var o=_(i);if(!(y(o,i)>=0)){if(P(s.clickOutsideDeactivates,i)){d.deactivate({returnFocus:s.returnFocusOnDeactivate});return}P(s.allowOutsideClick,i)||i.preventDefault()}},X=function(i){var o=_(i),c=y(o,i)>=0;if(c||o instanceof Document)c&&(n.mostRecentlyFocusedNode=o);else{i.stopImmediatePropagation();var v,b=!0;if(n.mostRecentlyFocusedNode)if(E(n.mostRecentlyFocusedNode)>0){var p=y(n.mostRecentlyFocusedNode),f=n.containerGroups[p].tabbableNodes;if(f.length>0){var g=f.findIndex(function(m){return m===n.mostRecentlyFocusedNode});g>=0&&(s.isKeyForward(n.recentNavEvent)?g+1<f.length&&(v=f[g+1],b=!1):g-1>=0&&(v=f[g-1],b=!1))}}else n.containerGroups.some(function(m){return m.tabbableNodes.some(function(k){return E(k)>0})})||(b=!1);else b=!1;b&&(v=z({target:n.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(n.recentNavEvent)})),F(v||n.mostRecentlyFocusedNode||w())}n.recentNavEvent=void 0},Ne=function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;n.recentNavEvent=i;var c=z({event:i,isBackward:o});c&&(x(i)&&i.preventDefault(),F(c))},H=function(i){(s.isKeyForward(i)||s.isKeyBackward(i))&&Ne(i,s.isKeyBackward(i))},J=function(i){ze(i)&&P(s.escapeDeactivates,i)!==!1&&(i.preventDefault(),d.deactivate())},Q=function(i){var o=_(i);y(o,i)>=0||P(s.clickOutsideDeactivates,i)||P(s.allowOutsideClick,i)||(i.preventDefault(),i.stopImmediatePropagation())},ee=function(){if(n.active)return ge.activateTrap(u,d),n.delayInitialFocusTimer=s.delayInitialFocus?me(function(){F(w())}):F(w()),r.addEventListener("focusin",X,!0),r.addEventListener("mousedown",L,{capture:!0,passive:!1}),r.addEventListener("touchstart",L,{capture:!0,passive:!1}),r.addEventListener("click",Q,{capture:!0,passive:!1}),r.addEventListener("keydown",H,{capture:!0,passive:!1}),r.addEventListener("keydown",J),d},te=function(){if(n.active)return r.removeEventListener("focusin",X,!0),r.removeEventListener("mousedown",L,!0),r.removeEventListener("touchstart",L,!0),r.removeEventListener("click",Q,!0),r.removeEventListener("keydown",H,!0),r.removeEventListener("keydown",J),d},Ee=function(i){var o=i.some(function(c){var v=Array.from(c.removedNodes);return v.some(function(b){return b===n.mostRecentlyFocusedNode})});o&&F(w())},V=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(Ee):void 0,O=function(){V&&(V.disconnect(),n.active&&!n.paused&&n.containers.map(function(i){V.observe(i,{subtree:!0,childList:!0})}))};return d={get active(){return n.active},get paused(){return n.paused},activate:function(i){if(n.active)return this;var o=l(i,"onActivate"),c=l(i,"onPostActivate"),v=l(i,"checkCanFocusTrap");v||S(),n.active=!0,n.paused=!1,n.nodeFocusedBeforeActivation=C(r),o?.();var b=function(){v&&S(),ee(),O(),c?.()};return v?(v(n.containers.concat()).then(b,b),this):(b(),this)},deactivate:function(i){if(!n.active)return this;var o=ye({onDeactivate:s.onDeactivate,onPostDeactivate:s.onPostDeactivate,checkCanReturnFocus:s.checkCanReturnFocus},i);clearTimeout(n.delayInitialFocusTimer),n.delayInitialFocusTimer=void 0,te(),n.active=!1,n.paused=!1,O(),ge.deactivateTrap(u,d);var c=l(o,"onDeactivate"),v=l(o,"onPostDeactivate"),b=l(o,"checkCanReturnFocus"),p=l(o,"returnFocus","returnFocusOnDeactivate");c?.();var f=function(){me(function(){p&&F(Z(n.nodeFocusedBeforeActivation)),v?.()})};return p&&b?(b(Z(n.nodeFocusedBeforeActivation)).then(f,f),this):(f(),this)},pause:function(i){return n.active?(n.manuallyPaused=!0,this._setPausedState(!0,i)):this},unpause:function(i){return n.active?(n.manuallyPaused=!1,u[u.length-1]!==this?this:this._setPausedState(!1,i)):this},updateContainerElements:function(i){var o=[].concat(i).filter(Boolean);return n.containers=o.map(function(c){return typeof c=="string"?r.querySelector(c):c}),n.active&&S(),O(),this}},Object.defineProperties(d,{_isManuallyPaused:{value:function(){return n.manuallyPaused}},_setPausedState:{value:function(i,o){if(n.paused===i)return this;if(n.paused=i,i){var c=l(o,"onPause"),v=l(o,"onPostPause");c?.(),te(),O(),v?.()}else{var b=l(o,"onUnpause"),p=l(o,"onPostUnpause");b?.(),S(),ee(),O(),p?.()}return this}}}),d.updateContainerElements(e),d};function Te(a,{focusTrapOptions:e},t){return!e?.extraContainers&&!t?a:[a,...Fe(e?.extraContainers),...Fe(t)]}function Fe(a=[]){return Array.isArray(a)?a:[a]}var q=new WeakSet;function Qe(a,e){let t=e&&e!==document.body&&e!==document.documentElement;return!q.has(a)&&t&&ie(e),!1}function et(a,e){let t=e?.fallbackFocus||a,r=e?.clickOutsideDeactivates??!0;return{fallbackFocus:t,...e,document:a.ownerDocument,tabbableOptions:ne,trapStack:re().focusTrapStack,clickOutsideDeactivates:u=>(q.has(a)||q.add(a),typeof r=="function"?r(u):r),onPostDeactivate:()=>{q.delete(a)},setReturnFocus:u=>{let s=typeof e?.setReturnFocus=="function"?e.setReturnFocus(u):e?.setReturnFocus;return s===void 0?Qe(a,u):s}}}var st=a=>oe((e,t)=>{let r,u,s,n=a.focusTrapOptions;t.onConnected(()=>{e[a.triggerProp]&&r&&d.activate()}),t.onUpdate(l=>{e.hasUpdated&&l.has("focusTrapDisabled")&&(e.focusTrapDisabled?d.deactivate():d.activate())}),t.onDisconnected(()=>d.deactivate());let d={get _instance(){},activate:()=>{let l=u||e.el;l.isConnected&&(r||(s||=Te(l,e),r=we(s,et(l,{...n,...e.focusTrapOptions}))),(typeof e.focusTrapDisabledOverride=="function"?!e.focusTrapDisabledOverride():!e.focusTrapDisabled)&&r.activate())},deactivate:()=>r?.deactivate(),overrideFocusTrapEl:l=>{if(r)throw new Error("Focus trap already created");u=l},setExtraContainers:l=>{let y=u||e.el;s=Te(y,e,l)},updateContainerElements:()=>r?.updateContainerElements(s)};return d});export{st as a};
|