@esri/calcite-components 3.2.0 → 3.2.1-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/calcite/{IH3P3OTS.js → 2A7GECH3.js} +2 -2
- package/dist/calcite/{IKVKGIXU.js → 2AULMW25.js} +2 -2
- package/dist/calcite/{YPQ2SFHJ.js → 2EZSWEZ5.js} +2 -2
- package/dist/calcite/{KNKTO7BF.js → 32VWPPXA.js} +2 -2
- package/dist/calcite/{7T6XJUIF.js → 3ADK4OV7.js} +2 -2
- package/dist/calcite/{LFMPTQHL.js → 3EEE3VIA.js} +2 -2
- package/dist/calcite/{UXQGRKED.js → 3GL7EH7P.js} +2 -2
- package/dist/calcite/{BRNVT3TW.js → 3PERKLCL.js} +2 -2
- package/dist/calcite/{BTG3ZQHR.js → 3SKYNMLV.js} +1 -1
- package/dist/calcite/{W27T3IZZ.js → 44NGUS6C.js} +2 -2
- package/dist/calcite/{OYLV6C5O.js → 4EBDWG6W.js} +2 -2
- package/dist/calcite/{YUCOP2VX.js → 4FQY25HJ.js} +2 -2
- package/dist/calcite/{RIPCYHYN.js → 4HSGYKDX.js} +2 -2
- package/dist/calcite/{MN7FASIH.js → 5BUUF5G7.js} +2 -2
- package/dist/calcite/{Z7R3MZGO.js → 5LKE3YPL.js} +2 -2
- package/dist/calcite/{TOJOSNQO.js → 5M7HNCPS.js} +2 -2
- package/dist/calcite/{DHVU76YN.js → 62BYT7BQ.js} +2 -2
- package/dist/calcite/{CBCJC3QL.js → 62KCTA23.js} +2 -2
- package/dist/calcite/{GWTJU2YA.js → 63GHB2UQ.js} +2 -2
- package/dist/calcite/{OXIG3UQX.js → 6DWOUQHW.js} +2 -2
- package/dist/calcite/{OTR7EFHA.js → 6MZZWWCT.js} +2 -2
- package/dist/calcite/{7MKN2HK4.js → 6XERCURU.js} +1 -1
- package/dist/calcite/{D6JA6XN7.js → 743WGJSC.js} +2 -2
- package/dist/calcite/{4ZUPNG3R.js → 74SL7MJL.js} +2 -2
- package/dist/calcite/{5QTBLU5A.js → 777PRCMY.js} +2 -2
- package/dist/calcite/{KTLYNRYB.js → 7DBERQCQ.js} +2 -2
- package/dist/calcite/{3YMJIQXL.js → 7ERISF3O.js} +1 -1
- package/dist/calcite/{EPTT6FOG.js → 7NLQXQCN.js} +2 -2
- package/dist/calcite/{IDBLX5MO.js → 7TQDAMN6.js} +2 -2
- package/dist/calcite/{CPPK4EL6.js → AHFV5MFX.js} +2 -2
- package/dist/calcite/{NIF4A2CN.js → AHZTTUTD.js} +2 -2
- package/dist/calcite/{2ZPYAPUV.js → ANVKSV6L.js} +1 -1
- package/dist/calcite/{JHMJHPB7.js → B6O4KE6E.js} +2 -2
- package/dist/calcite/{JMNH6CX4.js → BGMUWA3J.js} +1 -1
- package/dist/calcite/{XQ3BDEY3.js → BNVZ66T2.js} +2 -2
- package/dist/calcite/{ORUBBEG4.js → BWLRBGWS.js} +2 -2
- package/dist/calcite/{QDUF6PLE.js → C2ORZVQK.js} +1 -1
- package/dist/calcite/{H77KJPTL.js → CL4545AB.js} +2 -2
- package/dist/calcite/{COBNOPHA.js → CTEMG3A5.js} +2 -2
- package/dist/calcite/{ZJPKOYKY.js → CYHTOKT7.js} +2 -2
- package/dist/calcite/{JO5PFPNE.js → CYIJAC6L.js} +2 -2
- package/dist/calcite/{U3ASAMB5.js → D4IJYQFL.js} +2 -2
- package/dist/calcite/{W5KETLAD.js → D4YG2RRE.js} +2 -2
- package/dist/calcite/{A7GNZ3QS.js → D5GFJLXB.js} +2 -2
- package/dist/calcite/{SGERRLJ6.js → DB3DOXMW.js} +2 -2
- package/dist/calcite/{D77FEDVT.js → DBXI7K5W.js} +2 -2
- package/dist/calcite/{LPBOLYYY.js → DEKHFAFV.js} +2 -2
- package/dist/calcite/{6XKL4KIC.js → DRDXXHV2.js} +2 -2
- package/dist/calcite/{ZXTMKTM3.js → DYOXWON3.js} +2 -2
- package/dist/calcite/{4X4WSYXE.js → E7CLQGNE.js} +2 -2
- package/dist/calcite/{6YNUUPAM.js → EFSXJUXH.js} +2 -2
- package/dist/calcite/{ZP55CECM.js → EKWFZB26.js} +2 -2
- package/dist/calcite/{TNGZVW6J.js → F2GFE4YL.js} +2 -2
- package/dist/calcite/{BZLUPMH7.js → FLEHMMUC.js} +1 -1
- package/dist/calcite/{S3OWE3OZ.js → FPGTPUZM.js} +2 -2
- package/dist/calcite/{PLAT5F6Z.js → G3GJRTNN.js} +2 -2
- package/dist/calcite/{ARQGD5AY.js → GDCWWMPB.js} +2 -2
- package/dist/calcite/{4LKLXJQ3.js → GTSXIPY3.js} +2 -2
- package/dist/calcite/{SR7WIFHH.js → GUIZUDJM.js} +2 -2
- package/dist/calcite/{5Z5PVQME.js → GZ7JECMD.js} +2 -2
- package/dist/calcite/{BIZ5KGJ4.js → HBAK4CXZ.js} +2 -2
- package/dist/calcite/{IET7BEH6.js → HH7IRVQO.js} +2 -2
- package/dist/calcite/{6GGGMC6V.js → HHBVANUK.js} +2 -2
- package/dist/calcite/{JNUM2VBP.js → HHH43UIN.js} +2 -2
- package/dist/calcite/{JWDWKQES.js → HNKSCGBU.js} +2 -2
- package/dist/calcite/{EYQ4MKP4.js → IIEPNQWR.js} +2 -2
- package/dist/calcite/{YSRW4TZC.js → IQADRY3C.js} +1 -1
- package/dist/calcite/{M6O66VHM.js → ITCQDHGU.js} +2 -2
- package/dist/calcite/{RP5ZF7Z4.js → ITO4MNAX.js} +2 -2
- package/dist/calcite/{F5HXSDNY.js → IVGXSV66.js} +1 -1
- package/dist/calcite/{VL3H5XEC.js → JC25IFZJ.js} +2 -2
- package/dist/calcite/{FYZ3GMZG.js → JCXDZW2A.js} +2 -2
- package/dist/calcite/{J7M4MHMP.js → JHZSNJJ6.js} +2 -2
- package/dist/calcite/{ZKLMMLWH.js → JIQ3YVIK.js} +1 -1
- package/dist/calcite/{4KW4L2NG.js → JLM2UZO7.js} +2 -2
- package/dist/calcite/{FR6DFQYT.js → JP5V3RRD.js} +2 -2
- package/dist/calcite/{GDY6EEGJ.js → JRBUMLDA.js} +2 -2
- package/dist/calcite/{F3SWCYBI.js → K6D5IUOV.js} +2 -2
- package/dist/calcite/{NT65MCOL.js → K7ROPEKR.js} +2 -2
- package/dist/calcite/{SELO3ARM.js → KCMC35C3.js} +2 -2
- package/dist/calcite/{FS2CKSAW.js → KGDCB6EO.js} +2 -2
- package/dist/calcite/{ZCWNMSG2.js → KM6TLQGF.js} +2 -2
- package/dist/calcite/{5EXDVQNV.js → KPIIGYAU.js} +2 -2
- package/dist/calcite/{XRHSWUWV.js → KPNICZ3S.js} +2 -2
- package/dist/calcite/{KSX4MO62.js → KXLNTGFL.js} +2 -2
- package/dist/calcite/{EDY2FMMS.js → KZ35D5J3.js} +2 -2
- package/dist/calcite/{VGL3WVHU.js → L6WXEDTA.js} +2 -2
- package/dist/calcite/{5ZIDO3WK.js → LC6DJODI.js} +1 -1
- package/dist/calcite/{NOQW64ZT.js → LD5UBODC.js} +2 -2
- package/dist/calcite/{WMQZRSQB.js → LJPD2TU7.js} +2 -2
- package/dist/calcite/{JYXQGOKN.js → LJZF2PSK.js} +1 -1
- package/dist/calcite/{S2CYF2UT.js → M4YHLTST.js} +1 -1
- package/dist/calcite/{HFKSCF6J.js → M6BCTJTU.js} +2 -2
- package/dist/calcite/{33LF6V2F.js → M7XTENWQ.js} +2 -2
- package/dist/calcite/{2VWSWHUO.js → MAO7Y65A.js} +2 -2
- package/dist/calcite/{R4RIHSHB.js → MHP3ZWOD.js} +1 -1
- package/dist/calcite/{FRFT53GA.js → MLPZGERD.js} +2 -2
- package/dist/calcite/{C3MM7YIK.js → MMYTMW2M.js} +2 -2
- package/dist/calcite/{N7VCH2CZ.js → N5IM2RJX.js} +2 -2
- package/dist/calcite/{AGGZYDSJ.js → NBV6QU3W.js} +2 -2
- package/dist/calcite/{5W7APHDH.js → NGY32CJA.js} +1 -1
- package/dist/calcite/{GBG57GTY.js → NW2FUTBX.js} +2 -2
- package/dist/calcite/{WOIUHABN.js → OAULZXHL.js} +2 -2
- package/dist/calcite/{MAUHZXDA.js → OEXUKBWB.js} +1 -1
- package/dist/calcite/{4LYUPSQL.js → OK3C6P6X.js} +1 -1
- package/dist/calcite/{WSN3L2FK.js → OMGS7KX3.js} +2 -2
- package/dist/calcite/{F7IBMSKP.js → ORICNOAV.js} +2 -2
- package/dist/calcite/{EFSPPMQZ.js → OXS6ITW2.js} +2 -2
- package/dist/calcite/{D6ZFQYBQ.js → PCAXMTLP.js} +2 -2
- package/dist/calcite/{XEDUET37.js → PCCURG2N.js} +2 -2
- package/dist/calcite/{5ED2MDFW.js → PGEKYIHX.js} +2 -2
- package/dist/calcite/{O3OCUHQX.js → PRVJHFOO.js} +2 -2
- package/dist/calcite/{4PW5TCQQ.js → PSJRZBEU.js} +2 -2
- package/dist/calcite/{SIJ4YJOE.js → PZHJHDUL.js} +2 -2
- package/dist/calcite/{WQMVF7FU.js → Q2SFGXK2.js} +2 -2
- package/dist/calcite/{AROVLRPQ.js → QEWJR4RX.js} +2 -2
- package/dist/calcite/{PZWAMXZN.js → QHAAONP5.js} +2 -2
- package/dist/calcite/{UAIMJEKZ.js → QITKQK5Q.js} +2 -2
- package/dist/calcite/{JO4MYWKA.js → QJRQ54TT.js} +2 -2
- package/dist/calcite/{A4ZVVA7X.js → QT2JJ7QV.js} +2 -2
- package/dist/calcite/{AMVXXWNE.js → QWSHCC6K.js} +2 -2
- package/dist/calcite/{RCGAFOG2.js → QYP24RCH.js} +2 -2
- package/dist/calcite/{BV4RQJCP.js → RBQXKNWJ.js} +1 -1
- package/dist/calcite/{WQASJHDE.js → RDYIWF5B.js} +2 -2
- package/dist/calcite/{A6PXYMIR.js → RLDQAG62.js} +2 -2
- package/dist/calcite/{LKMYJMH6.js → RNTDC4WC.js} +2 -2
- package/dist/calcite/{MMABND5P.js → RRCCRHQ7.js} +2 -2
- package/dist/calcite/{VFQBULT7.js → RVGKPXOP.js} +2 -2
- package/dist/calcite/{7PMKHZBL.js → RVH6GLG4.js} +2 -2
- package/dist/calcite/{O26S5KNA.js → RYZPI3A3.js} +2 -2
- package/dist/calcite/{XDXZC7TK.js → SGRUNYKB.js} +2 -2
- package/dist/calcite/{UBFWUWDR.js → ST5QN2SZ.js} +2 -2
- package/dist/calcite/{NTYF4BYL.js → SYWNB3MR.js} +2 -2
- package/dist/calcite/{TJVULDS6.js → T42LLC3R.js} +2 -2
- package/dist/calcite/{GXX53HP4.js → TU44I7GA.js} +2 -2
- package/dist/calcite/{KMO43TL6.js → TXDJE4P3.js} +2 -2
- package/dist/calcite/{7F2T2TZB.js → U2F7EJQM.js} +2 -2
- package/dist/calcite/{TV4RA23F.js → U4R7QQRY.js} +2 -2
- package/dist/calcite/{PXSMRHY6.js → U7T7OIS7.js} +2 -2
- package/dist/calcite/{YMW6PFGO.js → UFON7XFP.js} +1 -1
- package/dist/calcite/{OI2S43L6.js → UJPFVFWD.js} +2 -2
- package/dist/calcite/{57JX5UY5.js → UKT7K6QJ.js} +2 -2
- package/dist/calcite/{VS5DUK5N.js → UPFRPLHL.js} +2 -2
- package/dist/calcite/{JZ7LMAA4.js → USHY63NR.js} +2 -2
- package/dist/calcite/UVNAKX7X.js +4 -0
- package/dist/calcite/{I6U5TCK6.js → V2D2UEEN.js} +2 -2
- package/dist/calcite/{L4MGQ327.js → V3BOIT6Y.js} +2 -2
- package/dist/calcite/{TZX6J2CY.js → VTSYVGAN.js} +2 -2
- package/dist/calcite/{BLX3NI2A.js → W45GVAC2.js} +2 -2
- package/dist/calcite/{2XJXDX35.js → WDMQWBHT.js} +2 -2
- package/dist/calcite/{724E4DCX.js → XMEAIQAL.js} +2 -2
- package/dist/calcite/{Q6D3SXPB.js → XOMA5362.js} +1 -1
- package/dist/calcite/{I7DJ6W5P.js → XRA2GVJU.js} +2 -2
- package/dist/calcite/XS75N4LJ.js +4 -0
- package/dist/calcite/{VZKQBOJM.js → Y3OA6OHY.js} +2 -2
- package/dist/calcite/{USZDNB3N.js → Y4KRSQNS.js} +1 -1
- package/dist/calcite/{YGX5ZVDM.js → YAUL3VHY.js} +2 -2
- package/dist/calcite/{NIGVBTMJ.js → YK2WY4LH.js} +2 -2
- package/dist/calcite/{HL2RUMZE.js → YKPNRYYE.js} +2 -2
- package/dist/calcite/{RFLLPTVQ.js → YKYUGHPW.js} +2 -2
- package/dist/calcite/{EQGLLJWZ.js → YOSUE3YV.js} +2 -2
- package/dist/calcite/{AE3GS3TO.js → YV2UI5WA.js} +2 -2
- package/dist/calcite/{P7SDV27A.js → Z2EOFRMY.js} +2 -2
- package/dist/calcite/{AIAWPDXP.js → Z2T7K3UW.js} +2 -2
- package/dist/calcite/{FPUJ7TY4.js → Z7CVNLKA.js} +2 -2
- package/dist/calcite/{CXROJX6Z.js → ZD3ACXU2.js} +2 -2
- package/dist/calcite/{4LWRPTS6.js → ZDNLHT4M.js} +1 -1
- package/dist/calcite/{HKVYLC2Z.js → ZECMA6JE.js} +2 -2
- package/dist/calcite/{6FWOJZJZ.js → ZPJW4M4H.js} +2 -2
- package/dist/calcite/{VMKYGMQE.js → ZVPNP5OB.js} +2 -2
- package/dist/calcite/{XJN5Z3JP.js → ZYM4CHQG.js} +2 -2
- package/dist/calcite/calcite.esm.js +2 -2
- package/dist/chunks/ExpandToggle.js +1 -1
- package/dist/chunks/FloatingArrow.js +1 -1
- package/dist/chunks/Heading.js +1 -1
- package/dist/chunks/Validation.js +1 -1
- package/dist/chunks/XButton.js +1 -1
- package/dist/chunks/_sortable.js +1 -1
- package/dist/chunks/array.js +1 -1
- package/dist/chunks/component.js +1 -1
- package/dist/chunks/core.js +1 -1
- package/dist/chunks/date.js +1 -1
- package/dist/chunks/dom.js +1 -1
- package/dist/chunks/dynamicClasses.js +1 -1
- package/dist/chunks/filter.js +1 -1
- package/dist/chunks/floating-ui.js +1 -1
- package/dist/chunks/form.js +1 -1
- package/dist/chunks/global.js +1 -1
- package/dist/chunks/guid.js +1 -1
- package/dist/chunks/input.js +1 -1
- package/dist/chunks/interact.min.js +1 -1
- package/dist/chunks/interactive.js +1 -1
- package/dist/chunks/key.js +1 -1
- package/dist/chunks/label.js +1 -1
- package/dist/chunks/locale.js +1 -1
- package/dist/chunks/logger.js +1 -1
- package/dist/chunks/math.js +1 -1
- package/dist/chunks/observers.js +1 -1
- package/dist/chunks/openCloseComponent.js +1 -1
- package/dist/chunks/resources.js +1 -1
- package/dist/chunks/resources2.js +1 -1
- package/dist/chunks/resources3.js +1 -1
- package/dist/chunks/resources4.js +1 -1
- package/dist/chunks/resources5.js +1 -1
- package/dist/chunks/resources6.js +1 -1
- package/dist/chunks/resources7.js +1 -1
- package/dist/chunks/responsive.js +1 -1
- package/dist/chunks/runtime.js +5 -5
- package/dist/chunks/sortableComponent.js +1 -1
- package/dist/chunks/text.js +1 -1
- package/dist/chunks/time.js +46 -46
- package/dist/chunks/useFocusTrap.js +1 -1
- package/dist/chunks/usePreventDocumentScroll.js +1 -1
- package/dist/chunks/useT9n.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 +2 -2
- 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 +29 -17
- package/dist/components/calcite-input-time-zone/customElement.js +1 -1
- package/dist/components/calcite-label/customElement.js +1 -1
- package/dist/components/calcite-link/customElement.js +1 -1
- package/dist/components/calcite-list/customElement.js +1 -1
- package/dist/components/calcite-list-item/customElement.js +1 -1
- package/dist/components/calcite-list-item-group/customElement.js +1 -1
- package/dist/components/calcite-loader/customElement.js +1 -1
- package/dist/components/calcite-menu/customElement.js +1 -1
- package/dist/components/calcite-menu-item/customElement.js +1 -1
- package/dist/components/calcite-meter/customElement.js +1 -1
- package/dist/components/calcite-modal/customElement.js +1 -1
- package/dist/components/calcite-navigation/customElement.js +1 -1
- package/dist/components/calcite-navigation-logo/customElement.js +1 -1
- package/dist/components/calcite-navigation-user/customElement.js +1 -1
- package/dist/components/calcite-notice/customElement.js +1 -1
- package/dist/components/calcite-option/customElement.js +1 -1
- package/dist/components/calcite-option-group/customElement.js +1 -1
- package/dist/components/calcite-pagination/customElement.js +1 -1
- package/dist/components/calcite-panel/customElement.js +1 -1
- package/dist/components/calcite-popover/customElement.js +1 -1
- package/dist/components/calcite-progress/customElement.js +1 -1
- package/dist/components/calcite-radio-button/customElement.js +1 -1
- package/dist/components/calcite-radio-button-group/customElement.js +1 -1
- package/dist/components/calcite-rating/customElement.js +1 -1
- package/dist/components/calcite-scrim/customElement.js +1 -1
- package/dist/components/calcite-segmented-control/customElement.js +1 -1
- package/dist/components/calcite-segmented-control-item/customElement.js +1 -1
- package/dist/components/calcite-select/customElement.js +1 -1
- package/dist/components/calcite-sheet/customElement.js +1 -1
- package/dist/components/calcite-shell/customElement.js +1 -1
- package/dist/components/calcite-shell-center-row/customElement.js +1 -1
- package/dist/components/calcite-shell-panel/customElement.js +1 -1
- package/dist/components/calcite-slider/customElement.js +1 -1
- package/dist/components/calcite-sort-handle/customElement.js +1 -1
- package/dist/components/calcite-sortable-list/customElement.js +1 -1
- package/dist/components/calcite-split-button/customElement.js +1 -1
- package/dist/components/calcite-stack/customElement.js +1 -1
- package/dist/components/calcite-stepper/customElement.js +1 -1
- package/dist/components/calcite-stepper-item/customElement.js +1 -1
- package/dist/components/calcite-switch/customElement.js +1 -1
- package/dist/components/calcite-tab/customElement.js +1 -1
- package/dist/components/calcite-tab-nav/customElement.js +1 -1
- package/dist/components/calcite-tab-title/customElement.js +1 -1
- package/dist/components/calcite-table/customElement.js +1 -1
- package/dist/components/calcite-table-cell/customElement.js +1 -1
- package/dist/components/calcite-table-header/customElement.js +1 -1
- package/dist/components/calcite-table-row/customElement.js +1 -1
- package/dist/components/calcite-tabs/customElement.js +1 -1
- package/dist/components/calcite-text-area/customElement.js +1 -1
- package/dist/components/calcite-tile/customElement.js +1 -1
- package/dist/components/calcite-tile-group/customElement.js +1 -1
- package/dist/components/calcite-tile-select/customElement.js +1 -1
- package/dist/components/calcite-tile-select-group/customElement.js +1 -1
- package/dist/components/calcite-time-picker/customElement.js +3 -3
- package/dist/components/calcite-tip/customElement.js +1 -1
- package/dist/components/calcite-tip-group/customElement.js +1 -1
- package/dist/components/calcite-tip-manager/customElement.js +1 -1
- package/dist/components/calcite-tooltip/customElement.js +1 -1
- package/dist/components/calcite-tree/customElement.js +1 -1
- package/dist/components/calcite-tree-item/customElement.js +1 -1
- package/dist/docs/api.json +15 -15
- package/dist/docs/docs.json +15 -15
- package/dist/docs/vscode.css-custom-data.json +14 -14
- package/dist/docs/vscode.html-custom-data.json +5 -5
- package/dist/docs/web-types.json +20 -20
- package/dist/extras/vscode-data.json +5 -5
- package/dist/index.js +1 -1
- package/dist/loader.js +1 -1
- package/dist/utils/time.d.ts +9 -9
- package/package.json +6 -6
- package/dist/calcite/HNYHSIBT.js +0 -4
- package/dist/calcite/JJ3TNPPG.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
|
-
v3.2.0 */
|
|
4
|
-
import{a as r,b as a}from"./
|
|
3
|
+
v3.2.1-next.0 */
|
|
4
|
+
import{a as r,b as a}from"./IVGXSV66.js";var s={CET:"Europe/Brussels",CST6CDT:"America/Chicago",EET:"Europe/Athens",EST:"America/Panama",EST5EDT:"America/New_York",HST:"Pacific/Honolulu",MET:"Europe/Brussels",MST:"America/Phoenix",MST7MDT:"America/Denver",PST8PDT:"America/Los_Angeles",WET:"Europe/Lisbon"},t=(()=>{let e=Object.keys(s);return Object.keys(r()).filter(o=>!e.includes(o))})();function c(e){let o=s[e];return o||(a(e)?.aliasOf??e)}export{t as a,c 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
|
-
v3.2.0 */
|
|
4
|
-
import{a as c,b as r,f as d}from"./
|
|
3
|
+
v3.2.1-next.0 */
|
|
4
|
+
import{a as c,b as r,f as d}from"./UJPFVFWD.js";import"./KM6TLQGF.js";import"./3SKYNMLV.js";import{E as n,F as s,R as o,c as a,d as l,q as i}from"./RLDQAG62.js";var m={container:"container"},b=a`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex}:host([alignment=start]){text-align:start}:host([alignment=end]){text-align:end}:host([alignment=center]){text-align:center}:host([scale=s]) .container{gap:.25rem;font-size:var(--calcite-font-size--2);line-height:1rem;margin-block-end:var(--calcite-label-margin-bottom, .5rem)}:host([scale=m]) .container{gap:.5rem;font-size:var(--calcite-font-size--1);line-height:1rem;margin-block-end:var(--calcite-label-margin-bottom, .75rem)}:host([scale=l]) .container{gap:.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;margin-block-end:var(--calcite-label-margin-bottom, 1rem)}:host .container{margin-inline:0px;margin-block-start:0px;inline-size:100%;line-height:1.375;color:var(--calcite-color-text-1);color:var(--calcite-label-text-color, var(--calcite-color-text-1))}:host([layout=default]) .container{display:flex;flex-direction:column}:host([layout=inline]) .container,:host([layout=inline-space-between]) .container{display:flex;flex-direction:row;align-items:center;gap:.5rem}:host([layout=inline][scale=l]) .container{gap:.75rem}:host([layout=inline-space-between]) .container{justify-content:space-between}:host([disabled])>.container{opacity:var(--calcite-opacity-disabled)}:host([disabled]) ::slotted(*[disabled]),:host([disabled]) ::slotted(*[disabled] *){--tw-bg-opacity: 1}:host([disabled]) ::slotted(calcite-input-message:not([active])){--tw-bg-opacity: 0}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,t=class extends n{constructor(){super(),this.alignment="start",this.layout="default",this.scale="m",this.calciteInternalLabelClick=i({bubbles:!1,cancelable:!1}),this.listen("click",this.labelClickHandler)}static{this.properties={alignment:[3,{},{reflect:!0}],for:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}]}}static{this.styles=b}connectedCallback(){super.connectedCallback(),document.dispatchEvent(new CustomEvent(c))}willUpdate(e){e.has("for")&&d(this.el)}disconnectedCallback(){super.disconnectedCallback(),document.dispatchEvent(new CustomEvent(r))}labelClickHandler(e){window.getSelection()?.type!=="Range"&&this.calciteInternalLabelClick.emit({sourceEvent:e})}render(){return l`<div class=${s(m.container)}><slot></slot></div>`}};o("calcite-label",t);export{t as Label};
|
|
@@ -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
|
-
v3.2.0 */
|
|
4
|
-
import{a as te,b as H}from"./4LYUPSQL.js";import{a as j,k as R}from"./RP5ZF7Z4.js";import{a as ee}from"./VL3H5XEC.js";import{c as J,e as Q,f as Y,h as Z}from"./4ZUPNG3R.js";import{c as G,d as K,e as W}from"./OI2S43L6.js";import{a as X,b as U}from"./XEDUET37.js";import{a as E}from"./LFMPTQHL.js";import{a as N}from"./USZDNB3N.js";import{c as q}from"./IDBLX5MO.js";import{b as w}from"./AE3GS3TO.js";import{q as T,x as _}from"./ZCWNMSG2.js";import{d as I}from"./VGL3WVHU.js";import"./WQASJHDE.js";import{a as A}from"./BTG3ZQHR.js";import{E as C,F as g,G as $,I as B,J as F,R as O,c as P,d as k,h as z,q as L}from"./A6PXYMIR.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"},ae={validationMessage:"validationMessage"},ie=250,se=P`@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:"\u2014";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:2px solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.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)}.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 p(D){return Array.isArray(D)}var S=class extends C{constructor(){super(),this.activeProp="value",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&&(e.preventDefault(),this.dragProp)){let t=this.mapToRange(e.clientX||e.pageX);if(p(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 this.setValue({[this.dragProp]:this.clamp(t,this.dragProp)})}},this.formatValue=e=>(R.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},R.localize(e.toString())),this.guid=`calcite-slider-${A()}`,this.messages=q({name:null}),this.pointerUpDragEnd=e=>{this.disabled||!_(e)||this.dragEnd(e)},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=L({cancelable:!1}),this.calciteSliderInput=L({cancelable:!1}),this.listen("pointerdown",this.pointerDownHandler),this.listen("keydown",this.handleKeyDown),this.listen("touchstart",this.handleTouchStart)}static{this.properties={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,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:F},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:[11,{},{type:Number,reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=se}async setFocus(){await I(this),(this.minHandle?this.minHandle:this.maxHandle)?.focus()}connectedCallback(){super.connectedCallback(),this.setMinMaxFromValue(),this.setValueFromMinMax(),G(this),J(this)}load(){p(this.value)||(this.value=this.snap?this.getClosestStep(this.value):this.clamp(this.value)),Y(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"),p(this.value)&&(this.adjustHostObscuredHandleLabel("minValue"),this.precise&&!this.hasHistogram||this.hyphenateCollidingRangeHandleLabels())),this.hideObscuredBoundingTickLabels(),X(this)}disconnectedCallback(){super.disconnectedCallback(),K(this),Q(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(N(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";p(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;p(e)&&(this.minValue=e[0],this.maxValue=e[1])}onLabelClick(){this.setFocus()}shouldMirror(){return this.mirrored&&!this.hasHistogram}shouldUseMinValue(){return p(this.value)?this.hasHistogram&&this.maxValue===0||!this.hasHistogram&&this.minValue===0:!1}getTickDensity(){let e=(this.max-this.min)/this.ticks/ie;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()}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()}storeTrackRef(e){this.trackEl=e}storeThumbRef(e){if(!e)return;e.getAttribute("data-value-prop")==="minValue"?this.minHandle=e:this.maxHandle=e}clamp(e,t){return e=te(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.trackEl.getBoundingClientRect(),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 j(`${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,b=v/2;if(f>0){if(x.classList.add(l.hyphen,l.hyphenWrap),m===0&&r===0){let h=f/2-b;h=Math.sign(h)===-1?Math.abs(h):-h;let V=this.getHostOffset(o.getBoundingClientRect().left+h-b,o.getBoundingClientRect().right+h-b),y=f/2,M=this.getHostOffset(u.getBoundingClientRect().left+y,u.getBoundingClientRect().right+y);V!==0&&(h+=V,y+=V),M!==0&&(h+=M,y+=M),s.style.transform=`translateX(${h}px)`,o.style.transform=`translateX(${h-b}px)`,c.style.transform=`translateX(${y}px)`,u.style.transform=`translateX(${y}px)`}else if(r>0||m>0)s.style.transform=`translateX(${r+b}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-b;h=Math.sign(h)===-1?Math.abs(h):-h,s.style.transform=`translateX(${h}px)`,o.style.transform=`translateX(${h-b}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=p(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 T(i,a)}isMaxTickLabelObscured(e,t){let i=e.getBoundingClientRect(),a=t.getBoundingClientRect();return T(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=p(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=p(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 B(this.el,"id",e),U({disabled:this.disabled,children:k`<div aria-errormessage=${ae.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaLabel=${W(this)} class=${g({[l.container]:!0,[l.containerRange]:r,[`scale--${this.scale}`]:!0})}>${this.renderGraph()}<div class=${g(l.track)} ${w(this.storeTrackRef)}><div class=${g(l.trackRange)} @pointerdown=${this.onTrackPointerDown} style=${$(f)}></div><div class=${g(l.ticks)}>${this.tickValues.map(x=>{let b=`${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=${g({[l.tick]:!0,[l.tickActive]:h})} style=${$({left:o?"":b,right:o?b:""})}>${this.renderTickLabel(x)}</span>`})}</div></div><div class=${g(l.thumbContainer)}>${m}${d}${Z({component:this})}</div></div>${this.validationMessage&&this.status==="invalid"?ee({icon:this.validationIcon,id:ae.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=p(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}%`},b=`${l.handleLabel} ${r?l.handleLabelMinValue:l.handleLabelValue}`,V=[...n?[k`<span aria-hidden=true class=${g(b)}>${f}</span>`,k`<span aria-hidden=true class=${`${b} ${l.static}`}>${f}</span>`,k`<span aria-hidden=true class=${`${b} ${l.transformed}`}>${f}</span>`]:[],k`<div class=${g(l.handle)}></div>`,o&&k`<div class=${g(l.handleExtension)}></div>`||""];return i==="below"&&V.reverse(),E(e,k`<div .ariaLabel=${m} aria-orientation=horizontal .ariaValueMax=${this.max} .ariaValueMin=${this.min} .ariaValueNow=${v} class=${g({[l.thumb]:!0,[l.thumbValue]:!r,[l.thumbActive]:this.lastDragProp!=="minMaxValue"&&this.dragProp===u,[l.thumbPrecise]:o,[l.thumbMinValue]:r})} data-value-prop=${u??z} @blur=${this.onThumbBlur} @focus=${this.onThumbFocus} @pointerdown=${this.onThumbPointerDown} role=slider style=${$(x)} tabindex=0 ${w(this.storeThumbRef)}>${V}</div>`)}renderGraph(){return this.histogram?k`<calcite-graph class=${g(l.graph)} .colorStops=${this.histogramStops} .data=${this.histogram} .highlightMax=${p(this.value)?this.maxValue:this.value} .highlightMin=${p(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=p(r),d=e===n,u=e===s,m=d||u;return a&&(!t&&(m||!o||!c)||t&&(m||!o&&!i))?k`<span class=${g({[l.tickLabel]:!0,[l.tickMin]:d,[l.tickMax]:u})}>${this.internalLabelFormatter(e,"tick")}</span>`:null}};O("calcite-slider",S);export{S as Slider};
|
|
3
|
+
v3.2.1-next.0 */
|
|
4
|
+
import{a as te,b as H}from"./OK3C6P6X.js";import{a as j,k as R}from"./ITO4MNAX.js";import{a as ee}from"./JC25IFZJ.js";import{c as J,e as Q,f as Y,h as Z}from"./74SL7MJL.js";import{c as G,d as K,e as W}from"./UJPFVFWD.js";import{a as X,b as U}from"./PCCURG2N.js";import{a as E}from"./3EEE3VIA.js";import{a as N}from"./Y4KRSQNS.js";import{c as q}from"./7TQDAMN6.js";import{b as w}from"./YV2UI5WA.js";import{q as T,x as _}from"./KM6TLQGF.js";import{d as I}from"./L6WXEDTA.js";import"./RDYIWF5B.js";import{a as A}from"./3SKYNMLV.js";import{E as C,F as g,G as $,I as B,J as F,R as O,c as P,d as k,h as z,q as L}from"./RLDQAG62.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"},ae={validationMessage:"validationMessage"},ie=250,se=P`@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:"\u2014";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:2px solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.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)}.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 p(D){return Array.isArray(D)}var S=class extends C{constructor(){super(),this.activeProp="value",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&&(e.preventDefault(),this.dragProp)){let t=this.mapToRange(e.clientX||e.pageX);if(p(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 this.setValue({[this.dragProp]:this.clamp(t,this.dragProp)})}},this.formatValue=e=>(R.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},R.localize(e.toString())),this.guid=`calcite-slider-${A()}`,this.messages=q({name:null}),this.pointerUpDragEnd=e=>{this.disabled||!_(e)||this.dragEnd(e)},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=L({cancelable:!1}),this.calciteSliderInput=L({cancelable:!1}),this.listen("pointerdown",this.pointerDownHandler),this.listen("keydown",this.handleKeyDown),this.listen("touchstart",this.handleTouchStart)}static{this.properties={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,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:F},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:[11,{},{type:Number,reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=se}async setFocus(){await I(this),(this.minHandle?this.minHandle:this.maxHandle)?.focus()}connectedCallback(){super.connectedCallback(),this.setMinMaxFromValue(),this.setValueFromMinMax(),G(this),J(this)}load(){p(this.value)||(this.value=this.snap?this.getClosestStep(this.value):this.clamp(this.value)),Y(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"),p(this.value)&&(this.adjustHostObscuredHandleLabel("minValue"),this.precise&&!this.hasHistogram||this.hyphenateCollidingRangeHandleLabels())),this.hideObscuredBoundingTickLabels(),X(this)}disconnectedCallback(){super.disconnectedCallback(),K(this),Q(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(N(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";p(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;p(e)&&(this.minValue=e[0],this.maxValue=e[1])}onLabelClick(){this.setFocus()}shouldMirror(){return this.mirrored&&!this.hasHistogram}shouldUseMinValue(){return p(this.value)?this.hasHistogram&&this.maxValue===0||!this.hasHistogram&&this.minValue===0:!1}getTickDensity(){let e=(this.max-this.min)/this.ticks/ie;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()}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()}storeTrackRef(e){this.trackEl=e}storeThumbRef(e){if(!e)return;e.getAttribute("data-value-prop")==="minValue"?this.minHandle=e:this.maxHandle=e}clamp(e,t){return e=te(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.trackEl.getBoundingClientRect(),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 j(`${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,b=v/2;if(f>0){if(x.classList.add(l.hyphen,l.hyphenWrap),m===0&&r===0){let h=f/2-b;h=Math.sign(h)===-1?Math.abs(h):-h;let V=this.getHostOffset(o.getBoundingClientRect().left+h-b,o.getBoundingClientRect().right+h-b),y=f/2,M=this.getHostOffset(u.getBoundingClientRect().left+y,u.getBoundingClientRect().right+y);V!==0&&(h+=V,y+=V),M!==0&&(h+=M,y+=M),s.style.transform=`translateX(${h}px)`,o.style.transform=`translateX(${h-b}px)`,c.style.transform=`translateX(${y}px)`,u.style.transform=`translateX(${y}px)`}else if(r>0||m>0)s.style.transform=`translateX(${r+b}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-b;h=Math.sign(h)===-1?Math.abs(h):-h,s.style.transform=`translateX(${h}px)`,o.style.transform=`translateX(${h-b}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=p(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 T(i,a)}isMaxTickLabelObscured(e,t){let i=e.getBoundingClientRect(),a=t.getBoundingClientRect();return T(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=p(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=p(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 B(this.el,"id",e),U({disabled:this.disabled,children:k`<div aria-errormessage=${ae.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaLabel=${W(this)} class=${g({[l.container]:!0,[l.containerRange]:r,[`scale--${this.scale}`]:!0})}>${this.renderGraph()}<div class=${g(l.track)} ${w(this.storeTrackRef)}><div class=${g(l.trackRange)} @pointerdown=${this.onTrackPointerDown} style=${$(f)}></div><div class=${g(l.ticks)}>${this.tickValues.map(x=>{let b=`${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=${g({[l.tick]:!0,[l.tickActive]:h})} style=${$({left:o?"":b,right:o?b:""})}>${this.renderTickLabel(x)}</span>`})}</div></div><div class=${g(l.thumbContainer)}>${m}${d}${Z({component:this})}</div></div>${this.validationMessage&&this.status==="invalid"?ee({icon:this.validationIcon,id:ae.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=p(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}%`},b=`${l.handleLabel} ${r?l.handleLabelMinValue:l.handleLabelValue}`,V=[...n?[k`<span aria-hidden=true class=${g(b)}>${f}</span>`,k`<span aria-hidden=true class=${`${b} ${l.static}`}>${f}</span>`,k`<span aria-hidden=true class=${`${b} ${l.transformed}`}>${f}</span>`]:[],k`<div class=${g(l.handle)}></div>`,o&&k`<div class=${g(l.handleExtension)}></div>`||""];return i==="below"&&V.reverse(),E(e,k`<div .ariaLabel=${m} aria-orientation=horizontal .ariaValueMax=${this.max} .ariaValueMin=${this.min} .ariaValueNow=${v} class=${g({[l.thumb]:!0,[l.thumbValue]:!r,[l.thumbActive]:this.lastDragProp!=="minMaxValue"&&this.dragProp===u,[l.thumbPrecise]:o,[l.thumbMinValue]:r})} data-value-prop=${u??z} @blur=${this.onThumbBlur} @focus=${this.onThumbFocus} @pointerdown=${this.onThumbPointerDown} role=slider style=${$(x)} tabindex=0 ${w(this.storeThumbRef)}>${V}</div>`)}renderGraph(){return this.histogram?k`<calcite-graph class=${g(l.graph)} .colorStops=${this.histogramStops} .data=${this.histogram} .highlightMax=${p(this.value)?this.maxValue:this.value} .highlightMin=${p(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=p(r),d=e===n,u=e===s,m=d||u;return a&&(!t&&(m||!o||!c)||t&&(m||!o&&!i))?k`<span class=${g({[l.tickLabel]:!0,[l.tickMin]:d,[l.tickMax]:u})}>${this.internalLabelFormatter(e,"tick")}</span>`:null}};O("calcite-slider",S);export{S 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
|
-
v3.2.0 */
|
|
4
|
-
import{a as r}from"./
|
|
3
|
+
v3.2.1-next.0 */
|
|
4
|
+
import{a as r}from"./JIQ3YVIK.js";import{a as k}from"./WDMQWBHT.js";import{c as v}from"./7TQDAMN6.js";import{a as f,b as a}from"./YV2UI5WA.js";import{p as s,u}from"./KM6TLQGF.js";import{a as l,d as b}from"./L6WXEDTA.js";import"./RDYIWF5B.js";import"./3SKYNMLV.js";import{E as m,F as e,J as g,R as p,c as h,d as n,q as o}from"./RLDQAG62.js";var c={title:"title",message:"message",link:"link",actionsEnd:"actions-end"},i={actionsEnd:"actions-end",close:"notice-close",container:"container",content:"notice-content",icon:"notice-icon"},x=h`:host([scale=s]){--calcite-notice-spacing-token-small: .5rem;--calcite-notice-spacing-token-large: .75rem}:host([scale=s]) .container slot[name=title]::slotted(*),:host([scale=s]) .container *::slotted([slot=title]){margin-block:.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=s]) .container slot[name=message]::slotted(*),:host([scale=s]) .container *::slotted([slot=message]){margin-block:.125rem;font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) ::slotted(calcite-link){margin-block:.125rem;font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) .notice-close{padding:.5rem}:host([scale=m]){--calcite-notice-spacing-token-small: .75rem;--calcite-notice-spacing-token-large: 1rem}:host([scale=m]) .container slot[name=title]::slotted(*),:host([scale=m]) .container *::slotted([slot=title]){margin-block:.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=m]) .container slot[name=message]::slotted(*),:host([scale=m]) .container *::slotted([slot=message]){margin-block:.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=m]) ::slotted(calcite-link){margin-block:.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=l]){--calcite-notice-spacing-token-small: 1rem;--calcite-notice-spacing-token-large: 1.25rem}:host([scale=l]) .container slot[name=title]::slotted(*),:host([scale=l]) .container *::slotted([slot=title]){margin-block:.125rem;font-size:var(--calcite-font-size-1);line-height:1.375}:host([scale=l]) .container slot[name=message]::slotted(*),:host([scale=l]) .container *::slotted([slot=message]){margin-block:.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]) ::slotted(calcite-link){margin-block:.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([width=auto]){--calcite-notice-width: auto}:host([width=half]){--calcite-notice-width: 50%}:host([width=full]){--calcite-notice-width: 100%}:host{margin-inline:auto;display:none;max-inline-size:100%;align-items:center;inline-size:var(--calcite-notice-width)}.container{pointer-events:none;margin-block:0px;box-sizing:border-box;display:flex;inline-size:100%;opacity:0;overflow:hidden;max-block-size:0;transition-property:opacity,max-block-size;transition-duration:var(--calcite-animation-timing);text-align:start;border-inline-start:var(--calcite-border-width-md) solid;box-shadow:0 0 0 0 transparent;background-color:var(--calcite-notice-background-color, var(--calcite-color-foreground-1))}.notice-close{outline-color:transparent}.notice-close:focus{outline:2px solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(-2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host{display:flex}:host([open]) .container{pointer-events:auto;max-block-size:100%;align-items:center;opacity:1;--tw-shadow: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--tw-shadow-colored: 0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);overflow:visible}.container slot[name=title]::slotted(*),.container *::slotted([slot=title]){margin:0;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-notice-title-text-color, var(--calcite-color-text-1))}.container slot[name=message]::slotted(*),.container *::slotted([slot=message]){margin:0;display:inline;font-weight:var(--calcite-font-weight-normal);margin-inline-end:var(--calcite-notice-spacing-token-small);color:var(--calcite-notice-content-text-color, var(--calcite-color-text-2))}.notice-content{box-sizing:border-box;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;padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;display:flex;min-inline-size:0px;flex-direction:column;overflow-wrap:break-word;flex:1 1 0;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:0 var(--calcite-notice-spacing-token-small)}.notice-content:first-of-type:not(:only-child){padding-inline-start:var(--calcite-notice-spacing-token-large)}.notice-content:only-of-type{padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large)}.notice-icon{display:flex;align-items:center;box-sizing:border-box;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;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto}.notice-close{display:flex;cursor:pointer;align-items:center;align-self:stretch;border-style:none;background-color:transparent;outline:2px solid transparent;outline-offset:2px;box-sizing:border-box;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;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;-webkit-appearance:none;color:var(--calcite-notice-close-icon-color, var(--calcite-color-text-3))}.notice-close:hover,.notice-close:focus{background-color:var(--calcite-notice-close-background-color-focus, var(--calcite-color-foreground-2));color:var(--calcite-notice-close-icon-color-hover, var(--calcite-color-text-1))}.notice-close:active{background-color:var(--calcite-notice-close-background-color-press, var(--calcite-color-foreground-3))}.actions-end{display:flex;align-self:stretch}:host([kind=brand]) .container{border-color:var(--calcite-color-brand)}:host([kind=brand]) .container .notice-icon{color:var(--calcite-color-brand)}:host([kind=info]) .container{border-color:var(--calcite-color-status-info)}:host([kind=info]) .container .notice-icon{color:var(--calcite-color-status-info)}:host([kind=danger]) .container{border-color:var(--calcite-color-status-danger)}:host([kind=danger]) .container .notice-icon{color:var(--calcite-color-status-danger)}:host([kind=success]) .container{border-color:var(--calcite-color-status-success)}:host([kind=success]) .container .notice-icon{color:var(--calcite-color-status-success)}:host([kind=warning]) .container{border-color:var(--calcite-color-status-warning)}:host([kind=warning]) .container .notice-icon{color:var(--calcite-color-status-warning)}:host([hidden]){display:none}[hidden]{display:none}`,d=class extends m{constructor(){super(...arguments),this.closeButton=f(),this.transitionProp="opacity",this.messages=v(),this.hasActionEnd=!1,this.closable=!1,this.iconFlipRtl=!1,this.kind="brand",this.open=!1,this.scale="m",this.width="auto",this.calciteNoticeBeforeClose=o({cancelable:!1}),this.calciteNoticeBeforeOpen=o({cancelable:!1}),this.calciteNoticeClose=o({cancelable:!1}),this.calciteNoticeOpen=o({cancelable:!1})}static{this.properties={hasActionEnd:[16,{},{state:!0}],closable:[7,{},{reflect:!0,type:Boolean}],icon:[3,{converter:g},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],kind:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],open:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=x}async setFocus(){await b(this);let t=this.el.querySelector("calcite-link");if(!(!this.closeButton.value&&!t)){if(t)return t.setFocus();this.closeButton.value&&this.closeButton.value.focus()}}async load(){this.requestedIcon=s(r,this.icon,this.kind)}willUpdate(t){t.has("open")&&(this.hasUpdated||this.open!==!1)&&k(this),(t.has("icon")||t.has("kind")&&(this.hasUpdated||this.kind!=="brand"))&&(this.requestedIcon=s(r,this.icon,this.kind))}onBeforeClose(){this.calciteNoticeBeforeClose.emit()}onBeforeOpen(){this.calciteNoticeBeforeOpen.emit()}onClose(){this.calciteNoticeClose.emit()}onOpen(){this.calciteNoticeOpen.emit()}setTransitionEl(t){t&&(this.transitionEl=t)}close(){this.open=!1}handleActionsEndSlotChange(t){this.hasActionEnd=u(t)}render(){let t=n`<button .ariaLabel=${this.messages.close} class=${e(i.close)} @click=${this.close} ${a(this.closeButton)}><calcite-icon icon=x .scale=${l(this.scale)}></calcite-icon></button>`;return n`<div class=${e(i.container)} ${a(this.setTransitionEl)}>${this.requestedIcon?n`<div class=${e(i.icon)}><calcite-icon .flipRtl=${this.iconFlipRtl} .icon=${this.requestedIcon} .scale=${l(this.scale)}></calcite-icon></div>`:null}<div class=${e(i.content)}><slot name=${c.title}></slot><slot name=${c.message}></slot><slot name=${c.link}></slot></div><div class=${e(i.actionsEnd)} .hidden=${!this.hasActionEnd}><slot name=${c.actionsEnd} @slotchange=${this.handleActionsEndSlotChange}></slot></div>${this.closable?t:null}</div>`}};p("calcite-notice",d);export{d as Notice};
|
|
@@ -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
|
-
v3.2.0 */
|
|
4
|
-
import{a as Ft}from"./YSRW4TZC.js";import{e as Dt}from"./ZCWNMSG2.js";import{L as vt}from"./A6PXYMIR.js";var bt=["top","right","bottom","left"],Mt=["start","end"],At=bt.reduce((t,e)=>t.concat(e,e+"-"+Mt[0],e+"-"+Mt[1]),[]),j=Math.min,V=Math.max,ct=Math.round,lt=Math.floor,D=t=>({x:t,y:t}),be={left:"right",right:"left",bottom:"top",top:"bottom"},Ae={start:"end",end:"start"};function dt(t,e,n){return V(t,j(e,n))}function Y(t,e){return typeof t=="function"?t(e):t}function W(t){return t.split("-")[0]}function F(t){return t.split("-")[1]}function Ot(t){return t==="x"?"y":"x"}function mt(t){return t==="y"?"height":"width"}function X(t){return["top","bottom"].includes(W(t))?"y":"x"}function gt(t){return Ot(X(t))}function Rt(t,e,n){n===void 0&&(n=!1);let o=F(t),i=gt(t),r=mt(i),s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=rt(s)),[s,rt(s)]}function kt(t){let e=rt(t);return[st(t),e,st(e)]}function st(t){return t.replace(/start|end/g,e=>Ae[e])}function Oe(t,e,n){let o=["left","right"],i=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:o:e?o:i;case"left":case"right":return e?r:s;default:return[]}}function Nt(t,e,n,o){let i=F(t),r=Oe(W(t),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(st)))),r}function rt(t){return t.replace(/left|right|bottom|top/g,e=>be[e])}function Re(t){return{top:0,right:0,bottom:0,left:0,...t}}function Pt(t){return typeof t!="number"?Re(t):{top:t,right:t,bottom:t,left:t}}function G(t){let{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Bt(t,e,n){let{reference:o,floating:i}=t,r=X(e),s=gt(e),c=mt(s),l=W(e),a=r==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2,f;switch(l){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}switch(F(e)){case"start":f[s]-=m*(n&&a?-1:1);break;case"end":f[s]+=m*(n&&a?-1:1);break}return f}var Ht=async(t,e,n)=>{let{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,c=r.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e)),a=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Bt(a,o,l),m=o,f={},g=0;for(let h=0;h<c.length;h++){let{name:p,fn:w}=c[h],{x,y,data:b,reset:v}=await w({x:d,y:u,initialPlacement:o,placement:m,strategy:i,middlewareData:f,rects:a,platform:s,elements:{reference:t,floating:e}});d=x??d,u=y??u,f={...f,[p]:{...f[p],...b}},v&&g<=50&&(g++,typeof v=="object"&&(v.placement&&(m=v.placement),v.rects&&(a=v.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):v.rects),{x:d,y:u}=Bt(a,m,l)),h=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:f}};async function tt(t,e){var n;e===void 0&&(e={});let{x:o,y:i,platform:r,rects:s,elements:c,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=Y(e,t),g=Pt(f),p=c[m?u==="floating"?"reference":"floating":u],w=G(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(p)))==null||n?p:p.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:a,rootBoundary:d,strategy:l})),x=u==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,y=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),b=await(r.isElement==null?void 0:r.isElement(y))?await(r.getScale==null?void 0:r.getScale(y))||{x:1,y:1}:{x:1,y:1},v=G(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:y,strategy:l}):x);return{top:(w.top-v.top+g.top)/b.y,bottom:(v.bottom-w.bottom+g.bottom)/b.y,left:(w.left-v.left+g.left)/b.x,right:(v.right-w.right+g.right)/b.x}}var Vt=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:o,placement:i,rects:r,platform:s,elements:c,middlewareData:l}=e,{element:a,padding:d=0}=Y(t,e)||{};if(a==null)return{};let u=Pt(d),m={x:n,y:o},f=gt(i),g=mt(f),h=await s.getDimensions(a),p=f==="y",w=p?"top":"left",x=p?"bottom":"right",y=p?"clientHeight":"clientWidth",b=r.reference[g]+r.reference[f]-m[f]-r.floating[g],v=m[f]-r.reference[f],R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a)),O=R?R[y]:0;(!O||!await(s.isElement==null?void 0:s.isElement(R)))&&(O=c.floating[y]||r.floating[g]);let _=b/2-v/2,C=O/2-h[g]/2-1,A=j(u[w],C),T=j(u[x],C),$=A,q=O-h[g]-T,N=O/2-h[g]/2+_,L=dt($,N,q),K=!l.arrow&&F(i)!=null&&N!==L&&r.reference[g]/2-(N<$?A:T)-h[g]/2<0,H=K?N<$?N-$:N-q:0;return{[f]:m[f]+H,data:{[f]:L,centerOffset:N-L-H,...K&&{alignmentOffset:H}},reset:K}}});function Pe(t,e,n){return(t?[...n.filter(i=>F(i)===t),...n.filter(i=>F(i)!==t)]:n.filter(i=>W(i)===i)).filter(i=>t?F(i)===t||(e?st(i)!==i:!1):!0)}var zt=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;let{rects:r,middlewareData:s,placement:c,platform:l,elements:a}=e,{crossAxis:d=!1,alignment:u,allowedPlacements:m=At,autoAlignment:f=!0,...g}=Y(t,e),h=u!==void 0||m===At?Pe(u||null,f,m):m,p=await tt(e,g),w=((n=s.autoPlacement)==null?void 0:n.index)||0,x=h[w];if(x==null)return{};let y=Rt(x,r,await(l.isRTL==null?void 0:l.isRTL(a.floating)));if(c!==x)return{reset:{placement:h[0]}};let b=[p[W(x)],p[y[0]],p[y[1]]],v=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:x,overflows:b}],R=h[w+1];if(R)return{data:{index:w+1,overflows:v},reset:{placement:R}};let O=v.map(A=>{let T=F(A.placement);return[A.placement,T&&d?A.overflows.slice(0,2).reduce(($,q)=>$+q,0):A.overflows[0],A.overflows]}).sort((A,T)=>A[1]-T[1]),C=((i=O.filter(A=>A[2].slice(0,F(A[0])?2:3).every(T=>T<=0))[0])==null?void 0:i[0])||O[0][0];return C!==c?{data:{index:w+1,overflows:v},reset:{placement:C}}:{}}}},_t=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;let{placement:i,middlewareData:r,rects:s,initialPlacement:c,platform:l,elements:a}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...p}=Y(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};let w=W(i),x=X(c),y=W(c)===c,b=await(l.isRTL==null?void 0:l.isRTL(a.floating)),v=m||(y||!h?[rt(c)]:kt(c)),R=g!=="none";!m&&R&&v.push(...Nt(c,h,g,b));let O=[c,...v],_=await tt(e,p),C=[],A=((o=r.flip)==null?void 0:o.overflows)||[];if(d&&C.push(_[w]),u){let L=Rt(i,s,b);C.push(_[L[0]],_[L[1]])}if(A=[...A,{placement:i,overflows:C}],!C.every(L=>L<=0)){var T,$;let L=(((T=r.flip)==null?void 0:T.index)||0)+1,K=O[L];if(K){var q;let I=u==="alignment"?x!==X(K):!1,B=((q=A[0])==null?void 0:q.overflows[0])>0;if(!I||B)return{data:{index:L,overflows:A},reset:{placement:K}}}let H=($=A.filter(I=>I.overflows[0]<=0).sort((I,B)=>I.overflows[1]-B.overflows[1])[0])==null?void 0:$.placement;if(!H)switch(f){case"bestFit":{var N;let I=(N=A.filter(B=>{if(R){let U=X(B.placement);return U===x||U==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(U=>U>0).reduce((U,ve)=>U+ve,0)]).sort((B,U)=>B[1]-U[1])[0])==null?void 0:N[0];I&&(H=I);break}case"initialPlacement":H=c;break}if(i!==H)return{reset:{placement:H}}}return{}}}};function Wt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function $t(t){return bt.some(e=>t[e]>=0)}var It=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:n}=e,{strategy:o="referenceHidden",...i}=Y(t,e);switch(o){case"referenceHidden":{let r=await tt(e,{...i,elementContext:"reference"}),s=Wt(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:$t(s)}}}case"escaped":{let r=await tt(e,{...i,altBoundary:!0}),s=Wt(r,n.floating);return{data:{escapedOffsets:s,escaped:$t(s)}}}default:return{}}}}};async function Ce(t,e){let{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=W(n),c=F(n),l=X(n)==="y",a=["left","top"].includes(s)?-1:1,d=r&&l?-1:1,u=Y(e,t),{mainAxis:m,crossAxis:f,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof g=="number"&&(f=c==="end"?g*-1:g),l?{x:f*d,y:m*a}:{x:m*a,y:f*d}}var Ut=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;let{x:i,y:r,placement:s,middlewareData:c}=e,l=await Ce(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:r+l.y,data:{...l,placement:s}}}}},jt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:c={fn:p=>{let{x:w,y:x}=p;return{x:w,y:x}}},...l}=Y(t,e),a={x:n,y:o},d=await tt(e,l),u=X(W(i)),m=Ot(u),f=a[m],g=a[u];if(r){let p=m==="y"?"top":"left",w=m==="y"?"bottom":"right",x=f+d[p],y=f-d[w];f=dt(x,f,y)}if(s){let p=u==="y"?"top":"left",w=u==="y"?"bottom":"right",x=g+d[p],y=g-d[w];g=dt(x,g,y)}let h=c.fn({...e,[m]:f,[u]:g});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[m]:r,[u]:s}}}}}};function ht(){return typeof window<"u"}function J(t){return Xt(t)?(t.nodeName||"").toLowerCase():"#document"}function P(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function M(t){var e;return(e=(Xt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Xt(t){return ht()?t instanceof Node||t instanceof P(t).Node:!1}function S(t){return ht()?t instanceof Element||t instanceof P(t).Element:!1}function k(t){return ht()?t instanceof HTMLElement||t instanceof P(t).HTMLElement:!1}function Yt(t){return!ht()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof P(t).ShadowRoot}function nt(t){let{overflow:e,overflowX:n,overflowY:o,display:i}=E(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function qt(t){return["table","td","th"].includes(J(t))}function at(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function ot(t){let e=pt(),n=S(t)?E(t):t;return["transform","translate","scale","rotate","perspective"].some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function Kt(t){let e=z(t);for(;k(e)&&!Q(e);){if(ot(e))return e;if(at(e))return null;e=z(e)}return null}function pt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Q(t){return["html","body","#document"].includes(J(t))}function E(t){return P(t).getComputedStyle(t)}function ft(t){return S(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function z(t){if(J(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Yt(t)&&t.host||M(t);return Yt(e)?e.host:e}function Gt(t){let e=z(t);return Q(e)?t.ownerDocument?t.ownerDocument.body:t.body:k(e)&&nt(e)?e:Gt(e)}function et(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);let i=Gt(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),s=P(i);if(r){let c=wt(s);return e.concat(s,s.visualViewport||[],nt(i)?i:[],c&&n?et(c):[])}return e.concat(i,et(i,[],n))}function wt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Zt(t){let e=E(t),n=parseFloat(e.width)||0,o=parseFloat(e.height)||0,i=k(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,c=ct(n)!==r||ct(o)!==s;return c&&(n=r,o=s),{width:n,height:o,$:c}}function St(t){return S(t)?t:t.contextElement}function it(t){let e=St(t);if(!k(e))return D(1);let n=e.getBoundingClientRect(),{width:o,height:i,$:r}=Zt(e),s=(r?ct(n.width):n.width)/o,c=(r?ct(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}var Se=D(0);function te(t){let e=P(t);return!pt()||!e.visualViewport?Se:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ee(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==P(t)?!1:e}function Z(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);let i=t.getBoundingClientRect(),r=St(t),s=D(1);e&&(o?S(o)&&(s=it(o)):s=it(t));let c=Ee(r,n,o)?te(r):D(0),l=(i.left+c.x)/s.x,a=(i.top+c.y)/s.y,d=i.width/s.x,u=i.height/s.y;if(r){let m=P(r),f=o&&S(o)?P(o):o,g=m,h=wt(g);for(;h&&o&&f!==g;){let p=it(h),w=h.getBoundingClientRect(),x=E(h),y=w.left+(h.clientLeft+parseFloat(x.paddingLeft))*p.x,b=w.top+(h.clientTop+parseFloat(x.paddingTop))*p.y;l*=p.x,a*=p.y,d*=p.x,u*=p.y,l+=y,a+=b,g=P(h),h=wt(g)}}return G({width:d,height:u,x:l,y:a})}function Et(t,e){let n=ft(t).scrollLeft;return e?e.left+n:Z(M(t)).left+n}function ee(t,e,n){n===void 0&&(n=!1);let o=t.getBoundingClientRect(),i=o.left+e.scrollLeft-(n?0:Et(t,o)),r=o.top+e.scrollTop;return{x:i,y:r}}function Te(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t,r=i==="fixed",s=M(o),c=e?at(e.floating):!1;if(o===s||c&&r)return n;let l={scrollLeft:0,scrollTop:0},a=D(1),d=D(0),u=k(o);if((u||!u&&!r)&&((J(o)!=="body"||nt(s))&&(l=ft(o)),k(o))){let f=Z(o);a=it(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}let m=s&&!u&&!r?ee(s,l,!0):D(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+d.x+m.x,y:n.y*a.y-l.scrollTop*a.y+d.y+m.y}}function Le(t){return Array.from(t.getClientRects())}function De(t){let e=M(t),n=ft(t),o=t.ownerDocument.body,i=V(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=V(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),s=-n.scrollLeft+Et(t),c=-n.scrollTop;return E(o).direction==="rtl"&&(s+=V(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:c}}function Fe(t,e){let n=P(t),o=M(t),i=n.visualViewport,r=o.clientWidth,s=o.clientHeight,c=0,l=0;if(i){r=i.width,s=i.height;let a=pt();(!a||a&&e==="fixed")&&(c=i.offsetLeft,l=i.offsetTop)}return{width:r,height:s,x:c,y:l}}function Me(t,e){let n=Z(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=k(t)?it(t):D(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,l=i*r.x,a=o*r.y;return{width:s,height:c,x:l,y:a}}function Jt(t,e,n){let o;if(e==="viewport")o=Fe(t,n);else if(e==="document")o=De(M(t));else if(S(e))o=Me(e,n);else{let i=te(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return G(o)}function ne(t,e){let n=z(t);return n===e||!S(n)||Q(n)?!1:E(n).position==="fixed"||ne(n,e)}function ke(t,e){let n=e.get(t);if(n)return n;let o=et(t,[],!1).filter(c=>S(c)&&J(c)!=="body"),i=null,r=E(t).position==="fixed",s=r?z(t):t;for(;S(s)&&!Q(s);){let c=E(s),l=ot(s);!l&&c.position==="fixed"&&(i=null),(r?!l&&!i:!l&&c.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||nt(s)&&!l&&ne(t,s))?o=o.filter(d=>d!==s):i=c,s=z(s)}return e.set(t,o),o}function Ne(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t,s=[...n==="clippingAncestors"?at(e)?[]:ke(e,this._c):[].concat(n),o],c=s[0],l=s.reduce((a,d)=>{let u=Jt(e,d,i);return a.top=V(u.top,a.top),a.right=j(u.right,a.right),a.bottom=j(u.bottom,a.bottom),a.left=V(u.left,a.left),a},Jt(e,c,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Be(t){let{width:e,height:n}=Zt(t);return{width:e,height:n}}function We(t,e,n){let o=k(e),i=M(e),r=n==="fixed",s=Z(t,!0,r,e),c={scrollLeft:0,scrollTop:0},l=D(0);function a(){l.x=Et(i)}if(o||!o&&!r)if((J(e)!=="body"||nt(i))&&(c=ft(e)),o){let f=Z(e,!0,r,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else i&&a();r&&!o&&i&&a();let d=i&&!o&&!r?ee(i,c):D(0),u=s.left+c.scrollLeft-l.x-d.x,m=s.top+c.scrollTop-l.y-d.y;return{x:u,y:m,width:s.width,height:s.height}}function Ct(t){return E(t).position==="static"}function Qt(t,e){if(!k(t)||E(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return M(t)===n&&(n=n.ownerDocument.body),n}function oe(t,e){let n=P(t);if(at(t))return n;if(!k(t)){let i=z(t);for(;i&&!Q(i);){if(S(i)&&!Ct(i))return i;i=z(i)}return n}let o=Qt(t,e);for(;o&&qt(o)&&Ct(o);)o=Qt(o,e);return o&&Q(o)&&Ct(o)&&!ot(o)?n:o||Kt(t)||n}var $e=async function(t){let e=this.getOffsetParent||oe,n=this.getDimensions,o=await n(t.floating);return{reference:We(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function He(t){return E(t).direction==="rtl"}var xt={convertOffsetParentRelativeRectToViewportRelativeRect:Te,getDocumentElement:M,getClippingRect:Ne,getOffsetParent:oe,getElementRects:$e,getClientRects:Le,getDimensions:Be,getScale:it,isElement:S,isRTL:He};function ie(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Ve(t,e){let n=null,o,i=M(t);function r(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),r();let a=t.getBoundingClientRect(),{left:d,top:u,width:m,height:f}=a;if(c||e(),!m||!f)return;let g=lt(u),h=lt(i.clientWidth-(d+m)),p=lt(i.clientHeight-(u+f)),w=lt(d),y={rootMargin:-g+"px "+-h+"px "+-p+"px "+-w+"px",threshold:V(0,j(1,l))||1},b=!0;function v(R){let O=R[0].intersectionRatio;if(O!==l){if(!b)return s();O?s(!1,O):o=setTimeout(()=>{s(!1,1e-7)},1e3)}O===1&&!ie(a,t.getBoundingClientRect())&&s(),b=!1}try{n=new IntersectionObserver(v,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(v,y)}n.observe(t)}return s(!0),r}function se(t,e,n,o){o===void 0&&(o={});let{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=St(t),d=i||r?[...a?et(a):[],...et(e)]:[];d.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),r&&w.addEventListener("resize",n)});let u=a&&c?Ve(a,n):null,m=-1,f=null;s&&(f=new ResizeObserver(w=>{let[x]=w;x&&x.target===a&&f&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=f)==null||y.observe(e)})),n()}),a&&!l&&f.observe(a),f.observe(e));let g,h=l?Z(t):null;l&&p();function p(){let w=Z(t);h&&!ie(h,w)&&n(),h=w,g=requestAnimationFrame(p)}return n(),()=>{var w;d.forEach(x=>{i&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),u?.(),(w=f)==null||w.disconnect(),f=null,l&&cancelAnimationFrame(g)}}var re=Ut,ce=zt,le=jt,Tt=_t;var ae=It,fe=Vt;var ue=(t,e,n)=>{let o=new Map,i={platform:xt,...n},r={...i.platform,_c:o};return Ht(t,e,{...i,platform:r})};function de(t){return ze(t)}function Lt(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function ze(t){for(let e=t;e;e=Lt(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Lt(t);e;e=Lt(e)){if(!(e instanceof Element))continue;let n=getComputedStyle(e);if(n.display!=="contents"&&(n.position!=="static"||ot(n)||e.tagName==="BODY"))return e}return null}(function(){if(!!1){let e=xt.getOffsetParent;xt.getOffsetParent=n=>e(n,de)}})();function me(t){let e=window.devicePixelRatio||1;return Math.round(t*e)/e}var xe=async(t,{referenceEl:e,floatingEl:n,overlayPositioning:o="absolute",placement:i,flipDisabled:r,flipPlacements:s,offsetDistance:c,offsetSkidding:l,arrowEl:a,type:d})=>{if(!e||!n)return;let u=Dt(n)==="rtl",{x:m,y:f,placement:g,strategy:h,middlewareData:p}=await ue(e,n,{strategy:o,placement:i==="auto"||i==="auto-start"||i==="auto-end"?void 0:he(i,u),middleware:Ie({placement:i,flipDisabled:r,flipPlacements:s?.map(b=>he(b,u)),offsetDistance:c,offsetSkidding:l,arrowEl:a,type:d})});if(a&&p.arrow){let{x:b,y:v}=p.arrow,R=g.split("-")[0],O=b!=null?"left":"top",_=je[R],C={left:"",top:"",bottom:"",right:""};"floatingLayout"in t&&(t.floatingLayout=R==="left"||R==="right"?"horizontal":"vertical"),Object.assign(a.style,{...C,[O]:`${O=="left"?b:v}px`,[R]:"100%",transform:_})}let x=p.hide?.referenceHidden?"hidden":null,y=x?"none":null;n.setAttribute(_e,g),Object.assign(n.style,{pointerEvents:y,position:h,transform:`translate(${me(m)}px,${me(f)}px)`,visibility:x})},_e="data-placement",ge=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end","leading","trailing","leading-start","leading-end","trailing-start","trailing-end"],hn="bottom-start",pn="bottom-end",wn={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function Ie({placement:t,flipDisabled:e,flipPlacements:n,offsetDistance:o,offsetSkidding:i,arrowEl:r,type:s}){let c=[le(),ae()];return s==="menu"&&c.push(Tt({fallbackPlacements:n||["top-start","top","top-end","bottom-start","bottom","bottom-end"]})),c.push(re({mainAxis:typeof o=="number"?o:0,crossAxis:typeof i=="number"?i:0})),t==="auto"||t==="auto-start"||t==="auto-end"?c.push(ce({alignment:t==="auto-start"?"start":t==="auto-end"?"end":null})):e||c.push(Tt(n?{fallbackPlacements:n}:{})),r&&c.push(fe({element:r})),c}function xn(t,e){let n=t.filter(o=>ge.includes(o));return n.length!==t.length&&console.warn(`${e.tagName}: Invalid value found in: flipPlacements. Try any of these: ${ge.map(o=>`"${o}"`).join(", ").trim()}`,{el:e}),n}function he(t,e=!1){let n=["left","right"];return e&&n.reverse(),t.replace(/leading/gi,n[0]).replace(/trailing/gi,n[1])}async function yn(t,e,n=!1){if(!t.open||!e.floatingEl||!e.referenceEl)return;if(Object.assign(e.floatingEl.style,{display:"block",position:e.overlayPositioning??"absolute"}),!ut.get(t))return ye(t);await(n?Ue(t):xe)(t,e)}function Ue(t){let e=yt.get(t);return e||(e=Ft(xe,vt.reposition,{leading:!0,maxWait:vt.reposition}),yt.set(t,e),e)}var je={top:"",left:"rotate(-90deg)",bottom:"rotate(180deg)",right:"rotate(90deg)"},ut=new WeakMap,yt=new WeakMap;async function ye(t){let{referenceEl:e,floatingEl:n}=t;if(!n.isConnected)return;let o=se;ut.set(t,{state:"pending"});let i,r=o(e,n,()=>{let s=t.reposition();i||(i=s)});return ut.set(t,{state:"active",cleanUp:r}),i}function Ye(t){let{floatingEl:e}=t;e&&Object.assign(e.style,{display:"",pointerEvents:"",position:"",transform:"",visibility:""})}async function vn(t){let{floatingEl:e,referenceEl:n}=t;if(Ye(t),!(!e||!n)&&(Xe(t),!!t.open))return ye(t)}function Xe(t){let e=ut.get(t);e?.state==="active"&&e.cleanUp(),ut.delete(t),yt.get(t)?.cancel(),yt.delete(t)}var pe=4,bn=Math.ceil(Math.hypot(pe,pe));export{hn as a,pn as b,wn as c,xn as d,yn as e,Ye as f,vn as g,Xe as h,bn as i};
|
|
3
|
+
v3.2.1-next.0 */
|
|
4
|
+
import{a as Ft}from"./IQADRY3C.js";import{e as Dt}from"./KM6TLQGF.js";import{L as vt}from"./RLDQAG62.js";var bt=["top","right","bottom","left"],Mt=["start","end"],At=bt.reduce((t,e)=>t.concat(e,e+"-"+Mt[0],e+"-"+Mt[1]),[]),j=Math.min,V=Math.max,ct=Math.round,lt=Math.floor,D=t=>({x:t,y:t}),be={left:"right",right:"left",bottom:"top",top:"bottom"},Ae={start:"end",end:"start"};function dt(t,e,n){return V(t,j(e,n))}function Y(t,e){return typeof t=="function"?t(e):t}function W(t){return t.split("-")[0]}function F(t){return t.split("-")[1]}function Ot(t){return t==="x"?"y":"x"}function mt(t){return t==="y"?"height":"width"}function X(t){return["top","bottom"].includes(W(t))?"y":"x"}function gt(t){return Ot(X(t))}function Rt(t,e,n){n===void 0&&(n=!1);let o=F(t),i=gt(t),r=mt(i),s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=rt(s)),[s,rt(s)]}function kt(t){let e=rt(t);return[st(t),e,st(e)]}function st(t){return t.replace(/start|end/g,e=>Ae[e])}function Oe(t,e,n){let o=["left","right"],i=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:o:e?o:i;case"left":case"right":return e?r:s;default:return[]}}function Nt(t,e,n,o){let i=F(t),r=Oe(W(t),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(st)))),r}function rt(t){return t.replace(/left|right|bottom|top/g,e=>be[e])}function Re(t){return{top:0,right:0,bottom:0,left:0,...t}}function Pt(t){return typeof t!="number"?Re(t):{top:t,right:t,bottom:t,left:t}}function G(t){let{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Bt(t,e,n){let{reference:o,floating:i}=t,r=X(e),s=gt(e),c=mt(s),l=W(e),a=r==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2,f;switch(l){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}switch(F(e)){case"start":f[s]-=m*(n&&a?-1:1);break;case"end":f[s]+=m*(n&&a?-1:1);break}return f}var Ht=async(t,e,n)=>{let{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,c=r.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e)),a=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Bt(a,o,l),m=o,f={},g=0;for(let h=0;h<c.length;h++){let{name:p,fn:w}=c[h],{x,y,data:b,reset:v}=await w({x:d,y:u,initialPlacement:o,placement:m,strategy:i,middlewareData:f,rects:a,platform:s,elements:{reference:t,floating:e}});d=x??d,u=y??u,f={...f,[p]:{...f[p],...b}},v&&g<=50&&(g++,typeof v=="object"&&(v.placement&&(m=v.placement),v.rects&&(a=v.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):v.rects),{x:d,y:u}=Bt(a,m,l)),h=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:f}};async function tt(t,e){var n;e===void 0&&(e={});let{x:o,y:i,platform:r,rects:s,elements:c,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=Y(e,t),g=Pt(f),p=c[m?u==="floating"?"reference":"floating":u],w=G(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(p)))==null||n?p:p.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:a,rootBoundary:d,strategy:l})),x=u==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,y=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),b=await(r.isElement==null?void 0:r.isElement(y))?await(r.getScale==null?void 0:r.getScale(y))||{x:1,y:1}:{x:1,y:1},v=G(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:y,strategy:l}):x);return{top:(w.top-v.top+g.top)/b.y,bottom:(v.bottom-w.bottom+g.bottom)/b.y,left:(w.left-v.left+g.left)/b.x,right:(v.right-w.right+g.right)/b.x}}var Vt=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:o,placement:i,rects:r,platform:s,elements:c,middlewareData:l}=e,{element:a,padding:d=0}=Y(t,e)||{};if(a==null)return{};let u=Pt(d),m={x:n,y:o},f=gt(i),g=mt(f),h=await s.getDimensions(a),p=f==="y",w=p?"top":"left",x=p?"bottom":"right",y=p?"clientHeight":"clientWidth",b=r.reference[g]+r.reference[f]-m[f]-r.floating[g],v=m[f]-r.reference[f],R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a)),O=R?R[y]:0;(!O||!await(s.isElement==null?void 0:s.isElement(R)))&&(O=c.floating[y]||r.floating[g]);let _=b/2-v/2,C=O/2-h[g]/2-1,A=j(u[w],C),T=j(u[x],C),$=A,q=O-h[g]-T,N=O/2-h[g]/2+_,L=dt($,N,q),K=!l.arrow&&F(i)!=null&&N!==L&&r.reference[g]/2-(N<$?A:T)-h[g]/2<0,H=K?N<$?N-$:N-q:0;return{[f]:m[f]+H,data:{[f]:L,centerOffset:N-L-H,...K&&{alignmentOffset:H}},reset:K}}});function Pe(t,e,n){return(t?[...n.filter(i=>F(i)===t),...n.filter(i=>F(i)!==t)]:n.filter(i=>W(i)===i)).filter(i=>t?F(i)===t||(e?st(i)!==i:!1):!0)}var zt=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;let{rects:r,middlewareData:s,placement:c,platform:l,elements:a}=e,{crossAxis:d=!1,alignment:u,allowedPlacements:m=At,autoAlignment:f=!0,...g}=Y(t,e),h=u!==void 0||m===At?Pe(u||null,f,m):m,p=await tt(e,g),w=((n=s.autoPlacement)==null?void 0:n.index)||0,x=h[w];if(x==null)return{};let y=Rt(x,r,await(l.isRTL==null?void 0:l.isRTL(a.floating)));if(c!==x)return{reset:{placement:h[0]}};let b=[p[W(x)],p[y[0]],p[y[1]]],v=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:x,overflows:b}],R=h[w+1];if(R)return{data:{index:w+1,overflows:v},reset:{placement:R}};let O=v.map(A=>{let T=F(A.placement);return[A.placement,T&&d?A.overflows.slice(0,2).reduce(($,q)=>$+q,0):A.overflows[0],A.overflows]}).sort((A,T)=>A[1]-T[1]),C=((i=O.filter(A=>A[2].slice(0,F(A[0])?2:3).every(T=>T<=0))[0])==null?void 0:i[0])||O[0][0];return C!==c?{data:{index:w+1,overflows:v},reset:{placement:C}}:{}}}},_t=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;let{placement:i,middlewareData:r,rects:s,initialPlacement:c,platform:l,elements:a}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...p}=Y(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};let w=W(i),x=X(c),y=W(c)===c,b=await(l.isRTL==null?void 0:l.isRTL(a.floating)),v=m||(y||!h?[rt(c)]:kt(c)),R=g!=="none";!m&&R&&v.push(...Nt(c,h,g,b));let O=[c,...v],_=await tt(e,p),C=[],A=((o=r.flip)==null?void 0:o.overflows)||[];if(d&&C.push(_[w]),u){let L=Rt(i,s,b);C.push(_[L[0]],_[L[1]])}if(A=[...A,{placement:i,overflows:C}],!C.every(L=>L<=0)){var T,$;let L=(((T=r.flip)==null?void 0:T.index)||0)+1,K=O[L];if(K){var q;let I=u==="alignment"?x!==X(K):!1,B=((q=A[0])==null?void 0:q.overflows[0])>0;if(!I||B)return{data:{index:L,overflows:A},reset:{placement:K}}}let H=($=A.filter(I=>I.overflows[0]<=0).sort((I,B)=>I.overflows[1]-B.overflows[1])[0])==null?void 0:$.placement;if(!H)switch(f){case"bestFit":{var N;let I=(N=A.filter(B=>{if(R){let U=X(B.placement);return U===x||U==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(U=>U>0).reduce((U,ve)=>U+ve,0)]).sort((B,U)=>B[1]-U[1])[0])==null?void 0:N[0];I&&(H=I);break}case"initialPlacement":H=c;break}if(i!==H)return{reset:{placement:H}}}return{}}}};function Wt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function $t(t){return bt.some(e=>t[e]>=0)}var It=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:n}=e,{strategy:o="referenceHidden",...i}=Y(t,e);switch(o){case"referenceHidden":{let r=await tt(e,{...i,elementContext:"reference"}),s=Wt(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:$t(s)}}}case"escaped":{let r=await tt(e,{...i,altBoundary:!0}),s=Wt(r,n.floating);return{data:{escapedOffsets:s,escaped:$t(s)}}}default:return{}}}}};async function Ce(t,e){let{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=W(n),c=F(n),l=X(n)==="y",a=["left","top"].includes(s)?-1:1,d=r&&l?-1:1,u=Y(e,t),{mainAxis:m,crossAxis:f,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof g=="number"&&(f=c==="end"?g*-1:g),l?{x:f*d,y:m*a}:{x:m*a,y:f*d}}var Ut=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;let{x:i,y:r,placement:s,middlewareData:c}=e,l=await Ce(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:r+l.y,data:{...l,placement:s}}}}},jt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:c={fn:p=>{let{x:w,y:x}=p;return{x:w,y:x}}},...l}=Y(t,e),a={x:n,y:o},d=await tt(e,l),u=X(W(i)),m=Ot(u),f=a[m],g=a[u];if(r){let p=m==="y"?"top":"left",w=m==="y"?"bottom":"right",x=f+d[p],y=f-d[w];f=dt(x,f,y)}if(s){let p=u==="y"?"top":"left",w=u==="y"?"bottom":"right",x=g+d[p],y=g-d[w];g=dt(x,g,y)}let h=c.fn({...e,[m]:f,[u]:g});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[m]:r,[u]:s}}}}}};function ht(){return typeof window<"u"}function J(t){return Xt(t)?(t.nodeName||"").toLowerCase():"#document"}function P(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function M(t){var e;return(e=(Xt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Xt(t){return ht()?t instanceof Node||t instanceof P(t).Node:!1}function S(t){return ht()?t instanceof Element||t instanceof P(t).Element:!1}function k(t){return ht()?t instanceof HTMLElement||t instanceof P(t).HTMLElement:!1}function Yt(t){return!ht()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof P(t).ShadowRoot}function nt(t){let{overflow:e,overflowX:n,overflowY:o,display:i}=E(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function qt(t){return["table","td","th"].includes(J(t))}function at(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function ot(t){let e=pt(),n=S(t)?E(t):t;return["transform","translate","scale","rotate","perspective"].some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function Kt(t){let e=z(t);for(;k(e)&&!Q(e);){if(ot(e))return e;if(at(e))return null;e=z(e)}return null}function pt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Q(t){return["html","body","#document"].includes(J(t))}function E(t){return P(t).getComputedStyle(t)}function ft(t){return S(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function z(t){if(J(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Yt(t)&&t.host||M(t);return Yt(e)?e.host:e}function Gt(t){let e=z(t);return Q(e)?t.ownerDocument?t.ownerDocument.body:t.body:k(e)&&nt(e)?e:Gt(e)}function et(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);let i=Gt(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),s=P(i);if(r){let c=wt(s);return e.concat(s,s.visualViewport||[],nt(i)?i:[],c&&n?et(c):[])}return e.concat(i,et(i,[],n))}function wt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Zt(t){let e=E(t),n=parseFloat(e.width)||0,o=parseFloat(e.height)||0,i=k(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,c=ct(n)!==r||ct(o)!==s;return c&&(n=r,o=s),{width:n,height:o,$:c}}function St(t){return S(t)?t:t.contextElement}function it(t){let e=St(t);if(!k(e))return D(1);let n=e.getBoundingClientRect(),{width:o,height:i,$:r}=Zt(e),s=(r?ct(n.width):n.width)/o,c=(r?ct(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}var Se=D(0);function te(t){let e=P(t);return!pt()||!e.visualViewport?Se:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ee(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==P(t)?!1:e}function Z(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);let i=t.getBoundingClientRect(),r=St(t),s=D(1);e&&(o?S(o)&&(s=it(o)):s=it(t));let c=Ee(r,n,o)?te(r):D(0),l=(i.left+c.x)/s.x,a=(i.top+c.y)/s.y,d=i.width/s.x,u=i.height/s.y;if(r){let m=P(r),f=o&&S(o)?P(o):o,g=m,h=wt(g);for(;h&&o&&f!==g;){let p=it(h),w=h.getBoundingClientRect(),x=E(h),y=w.left+(h.clientLeft+parseFloat(x.paddingLeft))*p.x,b=w.top+(h.clientTop+parseFloat(x.paddingTop))*p.y;l*=p.x,a*=p.y,d*=p.x,u*=p.y,l+=y,a+=b,g=P(h),h=wt(g)}}return G({width:d,height:u,x:l,y:a})}function Et(t,e){let n=ft(t).scrollLeft;return e?e.left+n:Z(M(t)).left+n}function ee(t,e,n){n===void 0&&(n=!1);let o=t.getBoundingClientRect(),i=o.left+e.scrollLeft-(n?0:Et(t,o)),r=o.top+e.scrollTop;return{x:i,y:r}}function Te(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t,r=i==="fixed",s=M(o),c=e?at(e.floating):!1;if(o===s||c&&r)return n;let l={scrollLeft:0,scrollTop:0},a=D(1),d=D(0),u=k(o);if((u||!u&&!r)&&((J(o)!=="body"||nt(s))&&(l=ft(o)),k(o))){let f=Z(o);a=it(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}let m=s&&!u&&!r?ee(s,l,!0):D(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+d.x+m.x,y:n.y*a.y-l.scrollTop*a.y+d.y+m.y}}function Le(t){return Array.from(t.getClientRects())}function De(t){let e=M(t),n=ft(t),o=t.ownerDocument.body,i=V(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=V(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),s=-n.scrollLeft+Et(t),c=-n.scrollTop;return E(o).direction==="rtl"&&(s+=V(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:c}}function Fe(t,e){let n=P(t),o=M(t),i=n.visualViewport,r=o.clientWidth,s=o.clientHeight,c=0,l=0;if(i){r=i.width,s=i.height;let a=pt();(!a||a&&e==="fixed")&&(c=i.offsetLeft,l=i.offsetTop)}return{width:r,height:s,x:c,y:l}}function Me(t,e){let n=Z(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=k(t)?it(t):D(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,l=i*r.x,a=o*r.y;return{width:s,height:c,x:l,y:a}}function Jt(t,e,n){let o;if(e==="viewport")o=Fe(t,n);else if(e==="document")o=De(M(t));else if(S(e))o=Me(e,n);else{let i=te(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return G(o)}function ne(t,e){let n=z(t);return n===e||!S(n)||Q(n)?!1:E(n).position==="fixed"||ne(n,e)}function ke(t,e){let n=e.get(t);if(n)return n;let o=et(t,[],!1).filter(c=>S(c)&&J(c)!=="body"),i=null,r=E(t).position==="fixed",s=r?z(t):t;for(;S(s)&&!Q(s);){let c=E(s),l=ot(s);!l&&c.position==="fixed"&&(i=null),(r?!l&&!i:!l&&c.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||nt(s)&&!l&&ne(t,s))?o=o.filter(d=>d!==s):i=c,s=z(s)}return e.set(t,o),o}function Ne(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t,s=[...n==="clippingAncestors"?at(e)?[]:ke(e,this._c):[].concat(n),o],c=s[0],l=s.reduce((a,d)=>{let u=Jt(e,d,i);return a.top=V(u.top,a.top),a.right=j(u.right,a.right),a.bottom=j(u.bottom,a.bottom),a.left=V(u.left,a.left),a},Jt(e,c,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Be(t){let{width:e,height:n}=Zt(t);return{width:e,height:n}}function We(t,e,n){let o=k(e),i=M(e),r=n==="fixed",s=Z(t,!0,r,e),c={scrollLeft:0,scrollTop:0},l=D(0);function a(){l.x=Et(i)}if(o||!o&&!r)if((J(e)!=="body"||nt(i))&&(c=ft(e)),o){let f=Z(e,!0,r,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else i&&a();r&&!o&&i&&a();let d=i&&!o&&!r?ee(i,c):D(0),u=s.left+c.scrollLeft-l.x-d.x,m=s.top+c.scrollTop-l.y-d.y;return{x:u,y:m,width:s.width,height:s.height}}function Ct(t){return E(t).position==="static"}function Qt(t,e){if(!k(t)||E(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return M(t)===n&&(n=n.ownerDocument.body),n}function oe(t,e){let n=P(t);if(at(t))return n;if(!k(t)){let i=z(t);for(;i&&!Q(i);){if(S(i)&&!Ct(i))return i;i=z(i)}return n}let o=Qt(t,e);for(;o&&qt(o)&&Ct(o);)o=Qt(o,e);return o&&Q(o)&&Ct(o)&&!ot(o)?n:o||Kt(t)||n}var $e=async function(t){let e=this.getOffsetParent||oe,n=this.getDimensions,o=await n(t.floating);return{reference:We(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function He(t){return E(t).direction==="rtl"}var xt={convertOffsetParentRelativeRectToViewportRelativeRect:Te,getDocumentElement:M,getClippingRect:Ne,getOffsetParent:oe,getElementRects:$e,getClientRects:Le,getDimensions:Be,getScale:it,isElement:S,isRTL:He};function ie(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Ve(t,e){let n=null,o,i=M(t);function r(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),r();let a=t.getBoundingClientRect(),{left:d,top:u,width:m,height:f}=a;if(c||e(),!m||!f)return;let g=lt(u),h=lt(i.clientWidth-(d+m)),p=lt(i.clientHeight-(u+f)),w=lt(d),y={rootMargin:-g+"px "+-h+"px "+-p+"px "+-w+"px",threshold:V(0,j(1,l))||1},b=!0;function v(R){let O=R[0].intersectionRatio;if(O!==l){if(!b)return s();O?s(!1,O):o=setTimeout(()=>{s(!1,1e-7)},1e3)}O===1&&!ie(a,t.getBoundingClientRect())&&s(),b=!1}try{n=new IntersectionObserver(v,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(v,y)}n.observe(t)}return s(!0),r}function se(t,e,n,o){o===void 0&&(o={});let{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=St(t),d=i||r?[...a?et(a):[],...et(e)]:[];d.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),r&&w.addEventListener("resize",n)});let u=a&&c?Ve(a,n):null,m=-1,f=null;s&&(f=new ResizeObserver(w=>{let[x]=w;x&&x.target===a&&f&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=f)==null||y.observe(e)})),n()}),a&&!l&&f.observe(a),f.observe(e));let g,h=l?Z(t):null;l&&p();function p(){let w=Z(t);h&&!ie(h,w)&&n(),h=w,g=requestAnimationFrame(p)}return n(),()=>{var w;d.forEach(x=>{i&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),u?.(),(w=f)==null||w.disconnect(),f=null,l&&cancelAnimationFrame(g)}}var re=Ut,ce=zt,le=jt,Tt=_t;var ae=It,fe=Vt;var ue=(t,e,n)=>{let o=new Map,i={platform:xt,...n},r={...i.platform,_c:o};return Ht(t,e,{...i,platform:r})};function de(t){return ze(t)}function Lt(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function ze(t){for(let e=t;e;e=Lt(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Lt(t);e;e=Lt(e)){if(!(e instanceof Element))continue;let n=getComputedStyle(e);if(n.display!=="contents"&&(n.position!=="static"||ot(n)||e.tagName==="BODY"))return e}return null}(function(){if(!!1){let e=xt.getOffsetParent;xt.getOffsetParent=n=>e(n,de)}})();function me(t){let e=window.devicePixelRatio||1;return Math.round(t*e)/e}var xe=async(t,{referenceEl:e,floatingEl:n,overlayPositioning:o="absolute",placement:i,flipDisabled:r,flipPlacements:s,offsetDistance:c,offsetSkidding:l,arrowEl:a,type:d})=>{if(!e||!n)return;let u=Dt(n)==="rtl",{x:m,y:f,placement:g,strategy:h,middlewareData:p}=await ue(e,n,{strategy:o,placement:i==="auto"||i==="auto-start"||i==="auto-end"?void 0:he(i,u),middleware:Ie({placement:i,flipDisabled:r,flipPlacements:s?.map(b=>he(b,u)),offsetDistance:c,offsetSkidding:l,arrowEl:a,type:d})});if(a&&p.arrow){let{x:b,y:v}=p.arrow,R=g.split("-")[0],O=b!=null?"left":"top",_=je[R],C={left:"",top:"",bottom:"",right:""};"floatingLayout"in t&&(t.floatingLayout=R==="left"||R==="right"?"horizontal":"vertical"),Object.assign(a.style,{...C,[O]:`${O=="left"?b:v}px`,[R]:"100%",transform:_})}let x=p.hide?.referenceHidden?"hidden":null,y=x?"none":null;n.setAttribute(_e,g),Object.assign(n.style,{pointerEvents:y,position:h,transform:`translate(${me(m)}px,${me(f)}px)`,visibility:x})},_e="data-placement",ge=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end","leading","trailing","leading-start","leading-end","trailing-start","trailing-end"],hn="bottom-start",pn="bottom-end",wn={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function Ie({placement:t,flipDisabled:e,flipPlacements:n,offsetDistance:o,offsetSkidding:i,arrowEl:r,type:s}){let c=[le(),ae()];return s==="menu"&&c.push(Tt({fallbackPlacements:n||["top-start","top","top-end","bottom-start","bottom","bottom-end"]})),c.push(re({mainAxis:typeof o=="number"?o:0,crossAxis:typeof i=="number"?i:0})),t==="auto"||t==="auto-start"||t==="auto-end"?c.push(ce({alignment:t==="auto-start"?"start":t==="auto-end"?"end":null})):e||c.push(Tt(n?{fallbackPlacements:n}:{})),r&&c.push(fe({element:r})),c}function xn(t,e){let n=t.filter(o=>ge.includes(o));return n.length!==t.length&&console.warn(`${e.tagName}: Invalid value found in: flipPlacements. Try any of these: ${ge.map(o=>`"${o}"`).join(", ").trim()}`,{el:e}),n}function he(t,e=!1){let n=["left","right"];return e&&n.reverse(),t.replace(/leading/gi,n[0]).replace(/trailing/gi,n[1])}async function yn(t,e,n=!1){if(!t.open||!e.floatingEl||!e.referenceEl)return;if(Object.assign(e.floatingEl.style,{display:"block",position:e.overlayPositioning??"absolute"}),!ut.get(t))return ye(t);await(n?Ue(t):xe)(t,e)}function Ue(t){let e=yt.get(t);return e||(e=Ft(xe,vt.reposition,{leading:!0,maxWait:vt.reposition}),yt.set(t,e),e)}var je={top:"",left:"rotate(-90deg)",bottom:"rotate(180deg)",right:"rotate(90deg)"},ut=new WeakMap,yt=new WeakMap;async function ye(t){let{referenceEl:e,floatingEl:n}=t;if(!n.isConnected)return;let o=se;ut.set(t,{state:"pending"});let i,r=o(e,n,()=>{let s=t.reposition();i||(i=s)});return ut.set(t,{state:"active",cleanUp:r}),i}function Ye(t){let{floatingEl:e}=t;e&&Object.assign(e.style,{display:"",pointerEvents:"",position:"",transform:"",visibility:""})}async function vn(t){let{floatingEl:e,referenceEl:n}=t;if(Ye(t),!(!e||!n)&&(Xe(t),!!t.open))return ye(t)}function Xe(t){let e=ut.get(t);e?.state==="active"&&e.cleanUp(),ut.delete(t),yt.get(t)?.cancel(),yt.delete(t)}var pe=4,bn=Math.ceil(Math.hypot(pe,pe));export{hn as a,pn as b,wn as c,xn as d,yn as e,Ye as f,vn as g,Xe as h,bn as i};
|
|
@@ -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
|
-
v3.2.0 */
|
|
3
|
+
v3.2.1-next.0 */
|
|
4
4
|
var e={actionBarContainer:"action-bar-container",container:"container",contentBottom:"content-bottom",contentTop:"content-top",header:"header",headerContainer:"header-container",headerContainerBorderEnd:"header-container--border-end",heading:"heading",description:"description",headerContent:"header-content",headerActions:"header-actions",headerActionsEnd:"header-actions--end",headerActionsStart:"header-actions--start",contentWrapper:"content-wrapper",fabContainer:"fab-container",footer:"footer",footerContent:"footer-content",footerActions:"footer-actions",footerStart:"footer-start",footerEnd:"footer-end",headerSlottedContent:"header-slotted-content",menuAction:"menu-action"},t={close:"close",collapse:"collapse"},o={close:"x",menu:"ellipsis",expand:"chevron-down",collapse:"chevron-up"},n={actionBar:"action-bar",alerts:"alerts",contentBottom:"content-bottom",contentTop:"content-top",headerActionsStart:"header-actions-start",headerActionsEnd:"header-actions-end",headerMenuActions:"header-menu-actions",headerContent:"header-content",fab:"fab",footer:"footer",footerEnd:"footer-end",footerStart:"footer-start",footerActions:"footer-actions"};export{e as a,t as b,o as c,n as d};
|
|
@@ -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
|
-
v3.2.0 */
|
|
4
|
-
import{a as o}from"./
|
|
3
|
+
v3.2.1-next.0 */
|
|
4
|
+
import{a as o}from"./3EEE3VIA.js";import{d as c}from"./L6WXEDTA.js";import"./RDYIWF5B.js";import{E as r,F as a,R as l,c as n,d as e}from"./RLDQAG62.js";var t={textContainer:"text-container",fullName:"full-name",username:"username",button:"button"},s=n`:host{display:inline-flex;outline:2px solid transparent;outline-offset:2px}:host .button{margin:0;display:flex;cursor:pointer;align-items:center;justify-content:center;font-family:var(--calcite-font-family);font-size:var(--calcite-font-size-0);line-height:1.25rem;outline-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;border:none;background-color:var(--calcite-navigation-background-color, var(--calcite-internal-navigation-user-background-color, var(--calcite-color-transparent)));border-block-end:2px solid var(--calcite-color-transparent)}.text-container{margin-block-start:.125rem;display:flex;flex-direction:column;padding-inline:1rem;text-align:start}calcite-avatar{padding-inline:1rem;--calcite-avatar-corner-radius: var(--calcite-navigation-user-avatar-corner-radius);--calcite-avatar-color: var(--calcite-navigation-user-avatar-color)}calcite-avatar~.text-container{padding-inline-start:0px}.full-name{margin-inline-start:0px;font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-navigation-user-full-name-text-color, var(--calcite-color-text-1))}.username{font-size:var(--calcite-font-size--1);color:var(--calcite-navigation-user-name-text-color, var(--calcite-color-text-2))}:host(:hover) .button,:host(:focus) .button{--calcite-internal-navigation-user-background-color: var(--calcite-color-foreground-2)}:host(:focus) .button{outline:2px solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(-2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host(:active) .button{--calcite-internal-navigation-user-background-color: var(--calcite-color-foreground-3)}:host([active]) .button{border-block-end-color:var(--calcite-navigation-accent-color, var(--calcite-color-brand))}:host([hidden]){display:none}[hidden]{display:none}`,i=class extends r{constructor(){super(...arguments),this.textDisabled=!1}static{this.properties={active:[7,{},{reflect:!0,type:Boolean}],fullName:1,label:1,textDisabled:[7,{},{reflect:!0,type:Boolean}],thumbnail:1,userId:1,username:1}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=s}async setFocus(){await c(this),this.el.focus()}render(){return e`<button .ariaLabel=${this.label} class=${a(t.button)}><calcite-avatar .fullName=${this.fullName} .label=${this.label} .thumbnail=${this.thumbnail} .userId=${this.userId} .username=${this.username}></calcite-avatar>${(this.fullName||this.username)&&!this.textDisabled&&e`<div class=${a(t.textContainer)}>${this.fullName&&o(t.fullName,e`<span class=${a(t.fullName)}>${this.fullName}</span>`)||""}${this.username&&o(t.username,e`<span class=${a(t.username)}>${this.username}</span>`)||""}</div>`||""}</button>`}};l("calcite-navigation-user",i);export{i as NavigationUser};
|
|
@@ -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
|
-
v3.2.0 */
|
|
4
|
-
import{j as C,k as v}from"./
|
|
3
|
+
v3.2.1-next.0 */
|
|
4
|
+
import{j as C,k as v}from"./KM6TLQGF.js";import{d as I}from"./RLDQAG62.js";var V=["calcite-input","calcite-input-number","calcite-input-text","calcite-text-area"];function H(e){return`${e.split("-").map((n,i)=>i===0?n:`${n[0].toUpperCase()}${n.slice(1)}`).join("")}${V.includes(e)?"Input":"Change"}`}var m="hidden-form-input";function E(e){return"checked"in e}var h=new WeakMap,g=new WeakSet;function L(e,t){if(v(t.parentElement,"[form]"))return!0;let n="calciteInternalFormComponentRegister",i=!1;return e.addEventListener(n,o=>{i=o.composedPath().some(l=>g.has(l)),o.stopPropagation()},{once:!0}),t.dispatchEvent(new CustomEvent(n,{bubbles:!0,composed:!0})),i}function R(e,{status:t,message:a,icon:n}){"status"in e&&(e.status=t),"validationIcon"in e&&typeof e.validationIcon!="string"&&(e.validationIcon=n),"validationMessage"in e&&!e.validationMessage&&(e.validationMessage=a)}function y(e){return e.nodeName==="CALCITE-RADIO-BUTTON"?v(e,"calcite-radio-button-group"):e}var A=new CustomEvent("calciteInvalid",{bubbles:!0,composed:!0});function p(e){let t=e?.target,a=t?.validationMessage,n=y(t?.parentElement);if(!n)return;let i=n?.nodeName?.toLowerCase(),o=i?.split("-");if(o.length<2||o[0]!=="calcite")return;e?.preventDefault(),"validity"in n&&(n.validity=t?.validity),n.dispatchEvent(A),R(n,{message:a,icon:!0,status:"invalid"});let l=H(i);n.addEventListener(l,()=>{"status"in n&&(n.status="idle"),"validationIcon"in n&&(n.validationIcon===""||n.validationIcon===!0)&&(n.validationIcon=!1),"validationMessage"in n&&n.validationMessage===a&&(n.validationMessage=""),"validity"in n&&(n.validity=t?.validity)},{once:!0})}function x(e){let{formEl:t}=e;return t?(t.addEventListener("invalid",p,!0),t.requestSubmit(),t.removeEventListener("invalid",p,!0),requestAnimationFrame(()=>{let a=t.querySelectorAll("[status=invalid]");for(let n of a)if(n?.validationMessage){n?.setFocus();break}}),!0):!1}function D(e){e.formEl?.reset()}function W(e){let{el:t,value:a}=e,n=w(e);if(!n||L(n,t))return;e.formEl=n,e.defaultValue=a,E(e)&&(e.defaultChecked=e.checked);let i=q.bind(e);n.addEventListener("reset",i),h.set(e.el,i),g.add(t)}function w(e){let{el:t,form:a}=e;return a?C(t,{id:a}):v(t,"form")}function q(){if("status"in this&&(this.status="idle"),"validationIcon"in this&&(this.validationIcon=!1),"validationMessage"in this&&(this.validationMessage=""),E(this)){this.checked=this.defaultChecked;return}this.value=this.defaultValue,this.onFormReset?.()}function O(e){let{el:t,formEl:a}=e;if(!a)return;let n=h.get(t);a.removeEventListener("reset",n),h.delete(t),e.formEl=null,g.delete(t)}function B(e,t){e.defaultValue=t}var P="calciteInternalHiddenInputInput",k=e=>{e.target.dispatchEvent(new CustomEvent(P,{bubbles:!0}))},F=e=>e.removeEventListener("input",k);function N(e){let{el:t,formEl:a,name:n,value:i}=e,{ownerDocument:o}=t;if(!1)return;let l=t.querySelectorAll(`input[slot="${m}"]`);if(!a||!n){l.forEach(s=>{F(s),s.remove()});return}let f=Array.isArray(i)?i:[i],d=[],u=new Set;l.forEach(s=>{let r=f.find(M=>M==s.value);r!=null?(u.add(r),b(e,s,r)):d.push(s)});let c;f.forEach(s=>{if(u.has(s))return;let r=d.pop();r||(r=o.createElement("input"),r.ariaHidden="true",r.slot=m),c||(c=o.createDocumentFragment()),c.append(r),r.addEventListener("input",k),b(e,r,s)}),c&&t.append(c),d.forEach(s=>{F(s),s.remove()})}function b(e,t,a){let{defaultValue:n,disabled:i,form:o,name:l,required:f}=e;t.defaultValue=n,t.disabled=i,t.name=l,t.required=f,t.tabIndex=-1,o?t.setAttribute("form",o):t.removeAttribute("form"),E(e)?(t.checked=e.checked,t.defaultChecked=e.defaultChecked,t.value=e.checked?a||"on":""):t.value=a||"",e.syncHiddenFormInput?.(t);let d=y(e.el);if(d&&"validity"in d)for(let u in{...t?.validity})d.validity[u]=t.validity[u]}var U=({component:e})=>(N(e),I`<slot name=${m}></slot>`);export{x as a,D as b,W as c,w as d,O as e,B as f,P as g,U as h};
|
|
@@ -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
|
-
v3.2.0 */
|
|
4
|
-
import{a}from"./
|
|
3
|
+
v3.2.1-next.0 */
|
|
4
|
+
import{a}from"./MHP3ZWOD.js";import{b as A}from"./YV2UI5WA.js";import{b as E}from"./UFON7XFP.js";import{e as S}from"./KM6TLQGF.js";import{d as g,h as v}from"./RLDQAG62.js";var b=t=>Array.from(t.querySelectorAll("calcite-action")).filter(e=>e.closest("calcite-action-menu")?e.slot===E.trigger:!0),D=({actionGroups:t,expanded:e,overflowCount:o})=>{let c=o;t.reverse().forEach(l=>{let i=0,s=b(l).reverse();s.forEach(n=>{n.slot===a.menuActions&&(n.removeAttribute("slot"),n.textEnabled=e)}),c>0&&s.some(n=>(s.filter(u=>!u.slot).length>1&&s.length>2&&!n.closest("calcite-action-menu")&&(n.textEnabled=!0,n.setAttribute("slot",a.menuActions),i++,i>1&&c--),c<1)),l.manager.component.requestUpdate()})},$={chevronsLeft:"chevrons-left",chevronsRight:"chevrons-right"};function y(t,e){return t||e.closest("calcite-shell-panel")?.position||"start"}function G({el:t,expanded:e}){b(t).filter(o=>o.slot!==a.menuActions).forEach(o=>o.textEnabled=e),t.querySelectorAll("calcite-action-group, calcite-action-menu").forEach(o=>o.expanded=e)}var L=({tooltip:t,referenceElement:e,expanded:o,ref:c})=>(t&&(t.referenceElement=!o&&e?e:null),c&&c(e),e),P=({expanded:t,expandText:e,collapseText:o,expandLabel:c,collapseLabel:l,toggle:i,el:s,position:n,tooltip:f,ref:u,scale:d})=>{let p=S(s)==="rtl",m=t?o:e,x=t?l:c,r=[$.chevronsLeft,$.chevronsRight];p&&r.reverse();let h=y(n,s)==="end",T=h?r[1]:r[0],q=h?r[0]:r[1];return g`<calcite-action .icon=${t?T:q} id=expand-toggle .label=${x} @click=${i} .scale=${d} .text=${m} .textEnabled=${t} title=${(!t&&!f?m:null)??v} ${A(C=>L({tooltip:f,referenceElement:C,expanded:t,ref:u}))}></calcite-action>`};export{b as a,D as b,G as c,P as d};
|
|
@@ -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
|
-
v3.2.0 */
|
|
4
|
-
import{a as n}from"./
|
|
3
|
+
v3.2.1-next.0 */
|
|
4
|
+
import{a as n}from"./3SKYNMLV.js";import{E as i,F as l,I as o,R as c,c as t,d as s}from"./RLDQAG62.js";var a={container:"container",selected:"selected"},d=t`:host{display:flex}.container{display:none;inline-size:var(--calcite-container-size-content-fluid)}:host([selected]) .container{display:block}:host([hidden]){display:none}[hidden]{display:none}`,e=class extends i{constructor(){super(...arguments),this.guid=`calcite-carousel-item-${n()}`,this.selected=!1}static{this.properties={label:1,selected:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=d}render(){let r=this.el.id||this.guid;return o(this.el,"id",r),s`<div .ariaLabel=${this.label} class=${l({[a.container]:!0,[a.selected]:this.selected})} role=tabpanel><slot></slot></div>`}};c("calcite-carousel-item",e);export{e as CarouselItem};
|
|
@@ -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
|
-
v3.2.0 */
|
|
3
|
+
v3.2.1-next.0 */
|
|
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
|
-
v3.2.0 */
|
|
4
|
-
import{a as p,b as h}from"./
|
|
3
|
+
v3.2.1-next.0 */
|
|
4
|
+
import{a as p,b as h}from"./PCCURG2N.js";import{a as r,b as d}from"./YV2UI5WA.js";import{l as b}from"./KM6TLQGF.js";import{d as u}from"./L6WXEDTA.js";import"./RDYIWF5B.js";import"./3SKYNMLV.js";import{E as i,F as c,H as s,R as n,c as l,d as o}from"./RLDQAG62.js";var w={button:"button"},F={plus:"plus"},R=l`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex;background-color:transparent}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}calcite-button{--calcite-fab-shadow-internal: 0 6px 20px -4px rgba(0, 0, 0, .1), 0 4px 12px -2px rgba(0, 0, 0, .08);box-shadow:var(--calcite-fab-shadow, var(--calcite-fab-shadow-internal));--calcite-button-background-color: var(--calcite-fab-background-color);--calcite-button-border-color: var(--calcite-fab-border-color);--calcite-button-corner-radius: var(--calcite-fab-corner-radius);--calcite-button-text-color: var(--calcite-fab-text-color);--calcite-button-loader-color: var(--calcite-fab-loader-color)}:host([hidden]){display:none}[hidden]{display:none}`,t=class extends i{constructor(){super(...arguments),this.buttonEl=r(),this.appearance="solid",this.disabled=!1,this.icon=F.plus,this.iconFlipRtl=!1,this.kind="brand",this.loading=!1,this.scale="m",this.textEnabled=!1}static{this.properties={appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],icon:[3,{},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],kind:[3,{},{reflect:!0}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],text:1,textEnabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=R}async setFocus(){await u(this),b(this.buttonEl.value)}updated(){p(this)}render(){let{appearance:f,kind:m,disabled:e,loading:x,scale:y,textEnabled:$,icon:g,label:a,text:v,iconFlipRtl:E}=this,k=$?null:a||v||null;return h({disabled:e,children:o`<calcite-button .appearance=${f==="solid"?"solid":"outline-fill"} class=${c(w.button)} .disabled=${e} .iconFlipRtl=${E?"start":null} .iconStart=${g} .kind=${m} .label=${a} .loading=${x} round .scale=${y} title=${k??s} type=button width=auto ${d(this.buttonEl)}>${this.textEnabled?this.text:null}</calcite-button>`})}};n("calcite-fab",t);export{t as Fab};
|
|
@@ -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
|
-
v3.2.0 */
|
|
4
|
-
import{S as w,a as b,b as C,j as _,k as P,l as u,m,n as O,o as f,p as v,r as g}from"./
|
|
3
|
+
v3.2.1-next.0 */
|
|
4
|
+
import{S as w,a as b,b as C,j as _,k as P,l as u,m,n as O,o as f,p as v,r as g}from"./RLDQAG62.js";var L=e=>(...o)=>{let t=m(),r=new e(...o),s=r.exports;u(t.at(-1));let n=r.component.manager;n._markExports(r,s),r.watchExports(a=>n._markExports(r,a)),O(r);let i=[r.component,...t].reverse();return v(i,a=>a===void 0?void 0:V(r,a,s),s)};function V(e,{host:o,key:t,isReactive:r},s){let n=o,i=n[t]!==e.exports,a=n[t]!==s,c=s!==e.exports;if(i&&!a&&c&&(n[t]=e.exports),o===e.component){if(r){let p=e.component.manager;a&&p._markExports(e,n[t]),e.onUpdate(h=>{if(h.has(t)){let E=n[t];E!==e.exports&&p._markExports(e,E)}})}e.assignedProperty=r?void 0:t}let d=e.component.constructor.elementProperties.get(t)?.readOnly;e.watchExports(()=>{n[t]!==e.exports&&(d?f(()=>{n[t]=e.exports}):n[t]=e.exports)})}var M=e=>N(void 0,e),ee=e=>o=>N(o,e),x=class extends g{constructor(o,t){super(o);let r=this.exports;try{P(this.component);let s=t(this.component,this),n=this.exports!==r;if(_(s)){n||this.setProvisionalExports(s);let i=s.then(a=>{this.exports=a,super.catchUpLifecycle()}).catch(a=>{this._ready.reject(a),console.error(a)});this.onLoad(async()=>await i)}else(!n||s!==void 0)&&(this.exports=s),queueMicrotask(()=>super.catchUpLifecycle())}catch(s){this._ready.reject(s),console.error(s)}}catchUpLifecycle(){}},N=L(x),te=(e,o)=>new y(e,o),y=class extends g{constructor(o,t){super(),this._attributes=o,this._callback=t,!!1&&(this._observer=new MutationObserver(r=>{r.forEach(s=>{o.includes(s.attributeName)&&t.call(this.component,this.component.el.getAttribute(s.attributeName),s.oldValue,s.attributeName)})}))}hostConnected(){this._attributes.forEach(o=>{this.component.el.hasAttribute(o)&&this._callback.call(this.component,null,this.component.el.getAttribute(o),o)}),this._observer.observe(this.component.el,{attributes:!0,attributeOldValue:!0,attributeFilter:this._attributes})}hostDisconnected(){this._observer.disconnect()}};var k=e=>(o={})=>M((t,r)=>{let s=b(t.el),n={_lang:s.lang,_t9nLocale:s.t9nLocale,_loading:!0},i=t;r.onLifecycle(()=>C(t.el,()=>e("./assets"),({t9nLocale:c,t9nStrings:l,lang:d})=>{let p={...l,_lang:d,_t9nLocale:c,_loading:!1};r.exports=p;let h=l.componentLabel;typeof h=="string"&&"label"in t&&t.label==null&&(t.label??=h),a(i.messageOverrides)},o.name));function a(c){let l=r.exports,d=l._original??l,p=A(d,c);c&&(p._original=d),r.exports=p}return"messageOverrides"in i&&r.onUpdate(c=>{c.has("messageOverrides")&&a(i.messageOverrides)}),o.blocking?(r.setProvisionalExports(n,!1),r.ready):n});function A(e,o){if(!o)return e;let t={...e};return Object.entries(o).forEach(([r,s])=>{typeof s=="object"?t[r]=A(e[r],s):t[r]=s??e[r]}),t}var ne=k(w);export{ee as a,te as b,ne as c};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v3.2.0 */
|
|
4
|
-
import{a as c}from"./
|
|
3
|
+
v3.2.1-next.0 */
|
|
4
|
+
import{a as c}from"./62BYT7BQ.js";import{b as m}from"./QHAAONP5.js";import"./IVGXSV66.js";var u=n=>n.map(o=>{let{label:a}=o,t=m(a);return{...o,continent:t}});async function v(){let n=[],o=c.map(t=>({label:t})),a=u(o);for(let t of a){let{label:e,continent:l}=t;if(t.visited)continue;t.visited=!0;let i={label:l,tzs:[{label:e}]};for(let r of a.filter(s=>!s.visited)){let{label:s,continent:b}=r;if(l===b){let p={label:s};i.tzs.push(p),r.visited=!0}}n.push(i)}return n.map(t=>(t.tzs=t.tzs.sort((e,l)=>e.label.localeCompare(l.label)),{label:t.label,tzs:t.tzs.map(e=>e.label)})).sort((t,e)=>t.label.localeCompare(e.label))}export{v as groupByRegion};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v3.2.0 */
|
|
4
|
-
import{k as f}from"./
|
|
3
|
+
v3.2.1-next.0 */
|
|
4
|
+
import{k as f}from"./ITO4MNAX.js";function m(t,n,e){if(!t)return;let r=t.getTime(),a=!(n instanceof Date)||r>=n.getTime(),o=!(e instanceof Date)||r<=e.getTime();return a&&o}function p(t,n,e){if(!(t instanceof Date))return null;let r=t.getTime(),a=n instanceof Date&&r<n.getTime(),o=e instanceof Date&&r>e.getTime();return a?n:o?e:t}function O(t,n=!1){if(t instanceof Date)return t;if(!t||typeof t!="string")return null;let e=t.split(/[: T-]/).map(parseFloat),r=new Date(e[0],(e[1]||1)-1,e[2]||1);if(r.setFullYear(e[0]),isNaN(r.getTime()))throw new Error(`Invalid ISO 8601 date: "${t}"`);return n?T(r):r}function w(t,n){if(!n)return null;let{separator:e}=n,r=y(t,n),{day:a,month:o}=r,s=M(r.year,n),i=new Date(s,o,a);i.setFullYear(s);let c=a>0,u=o>-1,l=!isNaN(i.getTime()),D=t.split(e).filter(d=>d).length>2,h=s.toString().length>0;return c&&u&&l&&D&&h?i:null}function M(t,n){return g(t,n,"read")}function I(t,n){return g(t,n,"write")}function g(t,n,e){if(n["default-calendar"]!=="buddhist")return t;let a=543*(e==="read"?-1:1);return t+a}function F(t,n){let{separator:e,unitOrder:r}=n,a=S(r),o=t.split(e).map(u=>f.delocalize(u)),s=o[a.indexOf("d")],i=o[a.indexOf("m")],c=o[a.indexOf("y")];return{day:s,month:i,year:c}}function x(t){if(t instanceof Date){let n=String(t.getMonth()+1).padStart(2,"0"),e=String(t.getDate()).padStart(2,"0");return`${String(t.getFullYear()).padStart(4,"0")}-${n}-${e}`}return""}function E(t){let n=t.split("-");return{day:n[2],month:n[1],year:n[0]}}function v(t,n){return t instanceof Date&&n instanceof Date&&t.getDate()===n.getDate()&&t.getMonth()===n.getMonth()&&t.getFullYear()===n.getFullYear()}function A(t){let n=t.getMonth(),e=new Date(t);return e.setMonth(n-1),n===e.getMonth()?new Date(t.getFullYear(),n,0):e}function C(t,n){let e=new Date(t);return e.setMonth(n),e}function L(t,n,e){let r=new Date(t);return r.setDate(1),m(r,n,e)?r:p(r,n,e)}function N(t){let n=t.getMonth(),e=new Date(t);return e.setMonth(n+1),(n+2)%7===e.getMonth()%7?new Date(t.getFullYear(),n+2,0):e}function y(t,n){let{day:e,month:r,year:a}=F(t,n);return{day:parseInt(e),month:parseInt(r)-1,year:parseInt(a)}}function S(t){let n=["d","m","y"],e=t.toLowerCase();return n.sort((r,a)=>e.indexOf(r)-e.indexOf(a))}function R(t,n){let e=t.getTime(),r=n.getTime();return(e-r)/(1e3*3600*24)}function T(t){return t.setHours(23,59,59,999),t}function _(t,n){return t&&n&&t.getMonth()===n.getMonth()&&t.getFullYear()===n.getFullYear()}export{m as a,p as b,O as c,w as d,M as e,I as f,F as g,x as h,E as i,v as j,A as k,C as l,L as m,N as n,S as o,R as p,_ as q};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v3.2.0 */
|
|
4
|
-
import{d as t}from"./
|
|
3
|
+
v3.2.1-next.0 */
|
|
4
|
+
import{d as t}from"./6XERCURU.js";import{a as v,b as B}from"./PCCURG2N.js";import{a as $}from"./3EEE3VIA.js";import{c as y}from"./7TQDAMN6.js";import{b as h}from"./YV2UI5WA.js";import{e as k}from"./KM6TLQGF.js";import{d as w}from"./L6WXEDTA.js";import"./RDYIWF5B.js";import"./3SKYNMLV.js";import{E as u,F as m,R as g,c as p,d,h as b,q as l}from"./RLDQAG62.js";var A={backButton:"back-button"},C={backLeft:"chevron-left",backRight:"chevron-right"},o={actionBar:"action-bar",alerts:"alerts",contentTop:"content-top",contentBottom:"content-bottom",headerActionsStart:"header-actions-start",headerActionsEnd:"header-actions-end",headerMenuActions:"header-menu-actions",headerContent:"header-content",fab:"fab",footer:"footer",footerActions:"footer-actions",footerEnd:"footer-end",footerStart:"footer-start"},L=p`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:none;inline-size:100%;flex:1 1 auto;overflow:hidden}:host([selected]){display:flex}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.back-button{border-width:0px;border-style:solid;border-inline-end-width:1px;border-color:var(--calcite-flow-border-color, var(--calcite-color-border-3))}calcite-panel{--calcite-panel-background-color: var(--calcite-flow-background-color);--calcite-panel-border-color: var(--calcite-flow-border-color, var(--calcite-flow-item-header-border-block-end));--calcite-panel-corner-radius: var(--calcite-flow-corner-radius);--calcite-panel-description-text-color: var(--calcite-flow-description-text-color);--calcite-panel-footer-background-color: var(--calcite-flow-footer-background-color);--calcite-panel-footer-space: var(--calcite-flow-footer-space, var(--calcite-flow-item-footer-padding));--calcite-panel-header-action-background-color-hover: var(--calcite-flow-header-action-background-color-hover);--calcite-panel-header-action-background-color-press: var(--calcite-flow-header-action-background-color-press);--calcite-panel-header-action-background-color: var(--calcite-flow-header-action-background-color);--calcite-panel-header-action-indicator-color: var(--calcite-flow-header-action-indicator-color);--calcite-panel-header-action-text-color-press: var(--calcite-flow-header-action-text-color-press);--calcite-panel-header-action-text-color: var(--calcite-flow-header-action-text-color);--calcite-panel-header-background-color: var(--calcite-flow-header-background-color);--calcite-panel-header-content-space: var(--calcite-flow-header-content-space);--calcite-panel-heading-text-color: var(--calcite-flow-heading-text-color);--calcite-panel-space: var(--calcite-flow-space)}:host([hidden]){display:none}[hidden]{display:none}`,f=class extends u{constructor(){super(...arguments),this.messages=y(),this.closable=!1,this.closed=!1,this.collapseDirection="down",this.collapsed=!1,this.collapsible=!1,this.disabled=!1,this.loading=!1,this.menuOpen=!1,this.overlayPositioning="absolute",this.scale="m",this.selected=!1,this.showBackButton=!1,this.calciteFlowItemBack=l(),this.calciteFlowItemClose=l({cancelable:!1}),this.calciteFlowItemScroll=l({cancelable:!1}),this.calciteFlowItemToggle=l({cancelable:!1}),this.calciteInternalFlowItemChange=l({cancelable:!1})}static{this.properties={beforeBack:[0,{},{attribute:!1}],beforeClose:[0,{},{attribute:!1}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],collapseDirection:1,collapsed:[7,{},{reflect:!0,type:Boolean}],collapsible:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],loading:[7,{},{reflect:!0,type:Boolean}],menuOpen:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],showBackButton:[5,{},{type:Boolean}]}}static{this.styles=L}async scrollContentTo(e){await this.containerEl?.scrollContentTo(e)}async setFocus(){await w(this);let{backButtonEl:e,containerEl:a}=this;if(e)return e.setFocus();if(a)return a.setFocus()}willUpdate(e){e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.calciteInternalFlowItemChange.emit()}updated(){v(this)}handleInternalPanelScroll(e){e.target===this.containerEl&&(e.stopPropagation(),this.calciteFlowItemScroll.emit())}handleInternalPanelClose(e){e.target===this.containerEl&&(e.stopPropagation(),this.closed=!0,this.calciteFlowItemClose.emit())}handleInternalPanelToggle(e){e.target===this.containerEl&&(e.stopPropagation(),this.collapsed=e.target.collapsed,this.calciteFlowItemToggle.emit())}backButtonClick(){this.calciteFlowItemBack.emit()}setBackRef(e){this.backButtonEl=e}setContainerRef(e){this.containerEl=e}renderBackButton(){let{el:e}=this,a=k(e)==="rtl",{showBackButton:n,backButtonClick:s,messages:i}=this,c=i.back,r=a?C.backRight:C.backLeft;return n?$("flow-back-button",d`<calcite-action .ariaLabel=${c} class=${m(A.backButton)} .icon=${r} @click=${s} scale=s slot=header-actions-start .text=${c} title=${c??b} ${h(this.setBackRef)}></calcite-action>`):null}render(){let{collapsed:e,collapseDirection:a,collapsible:n,closable:s,closed:i,description:c,disabled:r,heading:I,headingLevel:x,loading:S,menuOpen:E,messages:P,overlayPositioning:F,beforeClose:T}=this;return B({disabled:r,children:d`<calcite-panel .beforeClose=${T} .closable=${s} .closed=${i} .collapseDirection=${a} .collapsed=${e} .collapsible=${n} .description=${c} .disabled=${r} .heading=${I} .headingLevel=${x} .loading=${S} .menuOpen=${E} .messageOverrides=${P} @calcitePanelClose=${this.handleInternalPanelClose} @calcitePanelScroll=${this.handleInternalPanelScroll} @calcitePanelToggle=${this.handleInternalPanelToggle} .overlayPositioning=${F} .scale=${this.scale} ${h(this.setContainerRef)}>${this.renderBackButton()}<slot name=${o.actionBar} slot=${t.actionBar}></slot><slot name=${o.alerts} slot=${t.alerts}></slot><slot name=${o.headerActionsStart} slot=${t.headerActionsStart}></slot><slot name=${o.headerActionsEnd} slot=${t.headerActionsEnd}></slot><slot name=${o.headerContent} slot=${t.headerContent}></slot><slot name=${o.headerMenuActions} slot=${t.headerMenuActions}></slot><slot name=${o.fab} slot=${t.fab}></slot><slot name=${o.contentTop} slot=${t.contentTop}></slot><slot name=${o.contentBottom} slot=${t.contentBottom}></slot><slot name=${o.footerStart} slot=${t.footerStart}></slot><slot name=${o.footer} slot=${t.footer}></slot><slot name=${o.footerEnd} slot=${t.footerEnd}></slot><slot name=${o.footerActions} slot=${t.footerActions}></slot><slot></slot></calcite-panel>`})}};g("calcite-flow-item",f);export{f as FlowItem};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v3.2.0 */
|
|
3
|
+
v3.2.1-next.0 */
|
|
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};
|