@esri/calcite-components 5.0.0-next.4 → 5.0.0-next.5
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/{TS65SISB.js → 2GG4AF5T.js} +1 -1
- package/dist/calcite/{CDLGLCFD.js → 2HKRJLBG.js} +2 -2
- package/dist/calcite/{RBJEATU3.js → 2IWOXJH7.js} +2 -2
- package/dist/calcite/{WLLFG3M7.js → 2KH3AUCG.js} +2 -2
- package/dist/calcite/{H3EPIYLG.js → 2VKJIYLT.js} +1 -1
- package/dist/calcite/{JBMFTM4R.js → 2YBCAJSV.js} +2 -2
- package/dist/calcite/{26KO5WLB.js → 3266GV6Z.js} +2 -2
- package/dist/calcite/{WGQ2SERU.js → 3HXEF55M.js} +2 -2
- package/dist/calcite/{MHGTLCFX.js → 3KUVOQAL.js} +2 -2
- package/dist/calcite/{6OSIXZYU.js → 3NOZ7M75.js} +2 -2
- package/dist/calcite/{TLLHA7VC.js → 3YZG7MA3.js} +2 -2
- package/dist/calcite/{R2KPGC7W.js → 45F6XOYY.js} +2 -2
- package/dist/calcite/{EWNCXKJC.js → 4ARTWEEZ.js} +2 -2
- package/dist/calcite/{544AASIY.js → 4GHB4NY4.js} +2 -2
- package/dist/calcite/{ETHM6IZM.js → 4JZMONLD.js} +2 -2
- package/dist/calcite/{BG5JIUF3.js → 5AL5GWRD.js} +2 -2
- package/dist/calcite/{Z6CRZOOK.js → 5IPJANUU.js} +2 -2
- package/dist/calcite/{AK4EMEY2.js → 5K2Z2TMW.js} +2 -2
- package/dist/calcite/{VLOLYD36.js → 5LAPR75M.js} +2 -2
- package/dist/calcite/{7TJP2ISL.js → 62OUMNJ6.js} +2 -2
- package/dist/calcite/{DNVDDGB7.js → 67HVFNHP.js} +2 -2
- package/dist/calcite/{HZVCGOQL.js → 6J5W2PAJ.js} +2 -2
- package/dist/calcite/{MM5GOLON.js → 6VPACZP5.js} +2 -2
- package/dist/calcite/{Y6BDELTJ.js → 6VQ5IL36.js} +2 -2
- package/dist/calcite/{U3RNUZF6.js → 73LRFHS4.js} +2 -2
- package/dist/calcite/{QW2OFS26.js → 7DTG5KDL.js} +2 -2
- package/dist/calcite/{SBO2DPVJ.js → 7IHVHMIY.js} +2 -2
- package/dist/calcite/{QNVFFZ3F.js → 7IYAKB7Q.js} +2 -2
- package/dist/calcite/{3PSVZRKA.js → 7NUC3WBG.js} +1 -1
- package/dist/calcite/{RSHJ2ULC.js → 7PFVW4JF.js} +1 -1
- package/dist/calcite/{6CJF3ZME.js → 7QP5BUGE.js} +2 -2
- package/dist/calcite/{2J5IS422.js → 7XJU5OTS.js} +2 -2
- package/dist/calcite/{POOH5QBE.js → 7ZNR3GNI.js} +2 -2
- package/dist/calcite/{PQACJ4N6.js → A4CO6B7Z.js} +2 -2
- package/dist/calcite/{AKR5JHPW.js → AHOXXRX5.js} +2 -2
- package/dist/calcite/{J2NLU7RP.js → ALDDSDTX.js} +1 -1
- package/dist/calcite/{VV3MILRZ.js → APIFFM3O.js} +2 -2
- package/dist/calcite/{FNH5JSBK.js → AQ4DKRX6.js} +2 -2
- package/dist/calcite/{SQ25UCSA.js → AUF6YLAM.js} +2 -2
- package/dist/calcite/{CSQVLDPF.js → AUIOWPFN.js} +2 -2
- package/dist/calcite/{D5SFHDV6.js → B5JXPZDV.js} +2 -2
- package/dist/calcite/{TCB3D44T.js → BE5OB2TH.js} +2 -2
- package/dist/calcite/{PWWVHZBN.js → BEUZYBM5.js} +3 -3
- package/dist/calcite/{WYHGKROL.js → BFINWHLX.js} +2 -2
- package/dist/calcite/{QRBJKU6C.js → BHBYSC5H.js} +2 -2
- package/dist/calcite/{GTU5X7O7.js → BHU252WA.js} +2 -2
- package/dist/calcite/{NI3OLQU4.js → BNKVQYLQ.js} +2 -2
- package/dist/calcite/{P2J4VCQF.js → BYZPKQRD.js} +2 -2
- package/dist/calcite/{AAV5EWQK.js → C2X6VADY.js} +2 -2
- package/dist/calcite/{G73EBLG4.js → C3BQ4W7K.js} +2 -2
- package/dist/calcite/{YASA2V4I.js → C4S2BOWK.js} +2 -2
- package/dist/calcite/{GU5MLWDX.js → CF6DTFNX.js} +2 -2
- package/dist/calcite/{VZVYZPXQ.js → CIU4VM7X.js} +2 -2
- package/dist/calcite/{X2PZLQSO.js → CJWGQETT.js} +2 -2
- package/dist/calcite/{VBGPBKJL.js → CQMVTE7J.js} +2 -2
- package/dist/calcite/{CAHGZMOM.js → CTLGVBKW.js} +2 -2
- package/dist/calcite/{K6FTZ2ZF.js → CUL3VHSD.js} +2 -2
- package/dist/calcite/{RUMWLVIQ.js → CVLFEMH2.js} +2 -2
- package/dist/calcite/{Q2KBZ6FQ.js → DDW4WTS2.js} +2 -2
- package/dist/calcite/{WDKPAPPB.js → DDXY7TRY.js} +2 -2
- package/dist/calcite/{2C6PV6LO.js → DJVVGNTK.js} +1 -1
- package/dist/calcite/{5FUKNERA.js → DOH3ZW2R.js} +2 -2
- package/dist/calcite/{2GMLRXCX.js → DONAES6Q.js} +2 -2
- package/dist/calcite/{4VQGRHEV.js → DSEMLW7Z.js} +2 -2
- package/dist/calcite/{N7QD2WXH.js → DZWPXJWV.js} +2 -2
- package/dist/calcite/{6G3IVAVE.js → F6EDNLSI.js} +2 -2
- package/dist/calcite/{U5ZHIRE4.js → FZIUTVKD.js} +1 -1
- package/dist/calcite/{ETUOSTGW.js → GE7SQF7S.js} +2 -2
- package/dist/calcite/{BK2W2RW3.js → GUT2GKDG.js} +2 -2
- package/dist/calcite/{63S6JWID.js → H2FWQITV.js} +1 -1
- package/dist/calcite/{35DVUKKJ.js → H5ANNFJC.js} +2 -2
- package/dist/calcite/{PLRKNZ2Y.js → H5DKF7F3.js} +2 -2
- package/dist/calcite/{M5QNDD4X.js → HBHSBTMM.js} +1 -1
- package/dist/calcite/{NPXLX7L5.js → HT5KXL4J.js} +2 -2
- package/dist/calcite/{WSETKDK2.js → HU4SHWE7.js} +2 -2
- package/dist/calcite/{QYCVH2VH.js → HVF3RXXI.js} +2 -2
- package/dist/calcite/{E3C36U7C.js → HXGFAPCM.js} +2 -2
- package/dist/calcite/{XYU7WBO7.js → I53JH7YD.js} +2 -2
- package/dist/calcite/{SLUOB5WF.js → IEL7YV5C.js} +2 -2
- package/dist/calcite/{GV755OVW.js → IHEW664E.js} +2 -2
- package/dist/calcite/{NS7XIDPL.js → IKDSO2OB.js} +2 -2
- package/dist/calcite/{2VXNPHIO.js → JJWGSKGI.js} +2 -2
- package/dist/calcite/{FX45OPBE.js → K3AHNZL7.js} +2 -2
- package/dist/calcite/{BQI7TWVC.js → K5GJLIBR.js} +2 -2
- package/dist/calcite/{R534LDNQ.js → KH3UKQ2D.js} +2 -2
- package/dist/calcite/{SHXU5GEM.js → KRHM7ACI.js} +2 -2
- package/dist/calcite/{XQGQJEI2.js → KT4EQWT6.js} +2 -2
- package/dist/calcite/{PNBL2IVW.js → LH7245HX.js} +2 -2
- package/dist/calcite/{32YCYEKN.js → LJI5SYGA.js} +1 -1
- package/dist/calcite/{HBVWYA2B.js → LQ3URZCB.js} +2 -2
- package/dist/calcite/{JJNFTIBI.js → LRKWQ3C3.js} +2 -2
- package/dist/calcite/{HPWHHEM4.js → LROCCBRV.js} +2 -2
- package/dist/calcite/{JRPSHIET.js → LYDOM6VQ.js} +2 -2
- package/dist/calcite/{X7GVFGBQ.js → MEFMO7UB.js} +2 -2
- package/dist/calcite/{CYVISXIT.js → MP3OWQ2A.js} +2 -2
- package/dist/calcite/{TU2PNKWS.js → MVLJJOH2.js} +2 -2
- package/dist/calcite/{HOUDAAST.js → N5MSFOLW.js} +2 -2
- package/dist/calcite/{YGYOIYMF.js → N7OO7R2S.js} +2 -2
- package/dist/calcite/{XGLTZ4HO.js → NID6WJOW.js} +2 -2
- package/dist/calcite/{FKYJEFNP.js → NLYYOFNV.js} +1 -1
- package/dist/calcite/{RPLPMP3J.js → NQJMDHT5.js} +2 -2
- package/dist/calcite/{PRB44CR7.js → NSBK36H4.js} +2 -2
- package/dist/calcite/{AS2E2XYE.js → NU57UAAO.js} +1 -1
- package/dist/calcite/{H42LHYUA.js → NULQJBCW.js} +2 -2
- package/dist/calcite/{7SVIAOHO.js → OCT7LR2O.js} +1 -1
- package/dist/calcite/{JDPMMX2J.js → OFZACK2Y.js} +2 -2
- package/dist/calcite/{Y7L5PL4A.js → OMKDUGKV.js} +2 -2
- package/dist/calcite/{TDROT2JJ.js → PFDLGOVS.js} +2 -2
- package/dist/calcite/{AICLNUQ5.js → PFKUB7JD.js} +2 -2
- package/dist/calcite/{QSTLY3DQ.js → PJOGMC7F.js} +2 -2
- package/dist/calcite/{HKNQLLG7.js → PLD7OLLJ.js} +2 -2
- package/dist/calcite/{MPZ73UTT.js → PSCEW76J.js} +2 -2
- package/dist/calcite/{JIKG4DHH.js → PSNA5FAF.js} +2 -2
- package/dist/calcite/{SOFELOS3.js → PU5TGCQG.js} +2 -2
- package/dist/calcite/{TPG23UCD.js → PVL2DQVP.js} +2 -2
- package/dist/calcite/{GCPYRD7U.js → PZL4QWV5.js} +2 -2
- package/dist/calcite/{ZCWFURSE.js → Q23OEAP2.js} +2 -2
- package/dist/calcite/{WJA2X3C2.js → Q2GRCTSJ.js} +2 -2
- package/dist/calcite/{C7C75GTM.js → Q3MUDXRY.js} +2 -2
- package/dist/calcite/{M7H4RC23.js → QF6F6CY3.js} +2 -2
- package/dist/calcite/{T3UNO6JW.js → QFT74HW3.js} +2 -2
- package/dist/calcite/{EKOGELYT.js → R73QB7MJ.js} +2 -2
- package/dist/calcite/{ZUMJB5U3.js → RFALVOKT.js} +2 -2
- package/dist/calcite/{6TAH2TAT.js → RI3NRBMI.js} +2 -2
- package/dist/calcite/{WNEJDZTS.js → RND3V33U.js} +1 -1
- package/dist/calcite/{M6OBWXQN.js → ROWPIQLT.js} +2 -2
- package/dist/calcite/{JJOW6LLC.js → RRP2E2T3.js} +2 -2
- package/dist/calcite/{2DX2SAQ7.js → S5CLKCGJ.js} +1 -1
- package/dist/calcite/{INNXW35W.js → SGJU36YV.js} +2 -2
- package/dist/calcite/{RFA6VADW.js → SMRCCHJE.js} +2 -2
- package/dist/calcite/{R4PTX2BD.js → SXB76NOR.js} +2 -2
- package/dist/calcite/{YA3YNL2F.js → SZWYWOXZ.js} +2 -2
- package/dist/calcite/{NFBDMCMY.js → T6Y6ZTWW.js} +2 -2
- package/dist/calcite/{XHCNKCYX.js → U3KRKTQY.js} +2 -2
- package/dist/calcite/{QWN5XHMG.js → UGI3YWJM.js} +2 -2
- package/dist/calcite/{QK7SZUAI.js → UN7GLLXI.js} +2 -2
- package/dist/calcite/{W2KQ3FF5.js → UNJRBV2R.js} +2 -2
- package/dist/calcite/{YUOVY5RN.js → UOZDXXIF.js} +2 -2
- package/dist/calcite/{JAM3DZYC.js → V3ZR6RFK.js} +1 -1
- package/dist/calcite/{V6JTY5IT.js → V4NPQ4WA.js} +2 -2
- package/dist/calcite/{AILXQSIJ.js → VBRBI7IU.js} +2 -2
- package/dist/calcite/{INNX6VTE.js → VIWDW2WZ.js} +2 -2
- package/dist/calcite/{XM6I5JZM.js → VKRWRFEJ.js} +2 -2
- package/dist/calcite/{MDLPBZOZ.js → VMWAAH5B.js} +2 -2
- package/dist/calcite/{6PIHPAZF.js → VQMSSO2U.js} +2 -2
- package/dist/calcite/{OTRRBSYY.js → VYFT5EAY.js} +1 -1
- package/dist/calcite/{EQC2JW3I.js → W5OJOVZY.js} +1 -1
- package/dist/calcite/{AE4AQEU5.js → W6EWFSR3.js} +2 -2
- package/dist/calcite/{KSITDI7Y.js → W72YZH73.js} +2 -2
- package/dist/calcite/{JCGVWBAA.js → WBGRGCXR.js} +2 -2
- package/dist/calcite/{HKVRX5SD.js → WOTQIMPZ.js} +2 -2
- package/dist/calcite/{SU2JQIB4.js → WPTOKN7K.js} +1 -1
- package/dist/calcite/{2JFH2WAM.js → WTY55PPZ.js} +2 -2
- package/dist/calcite/{C77NX62C.js → WWJXVV6U.js} +2 -2
- package/dist/calcite/{VVCB7N7V.js → X374PRV7.js} +2 -2
- package/dist/calcite/{A2TCAPW4.js → XNFJXDQ6.js} +2 -2
- package/dist/calcite/{A5CVK7TL.js → XNLWKJLM.js} +2 -2
- package/dist/calcite/{HIB3Q63Z.js → XRSYDXWZ.js} +1 -1
- package/dist/calcite/{ALQH5DCZ.js → XZTRPLLK.js} +2 -2
- package/dist/calcite/{U3G47NPB.js → Y3HXK6MO.js} +2 -2
- package/dist/calcite/{QDXVT7UF.js → Y442PVMQ.js} +2 -2
- package/dist/calcite/{EDVRYPYX.js → YCLOS6NX.js} +2 -2
- package/dist/calcite/{S6HTKBNB.js → YSBWKH76.js} +1 -1
- package/dist/calcite/{C3BIK3DY.js → YSP6WWQB.js} +1 -1
- package/dist/calcite/{KCVWP63F.js → YV7DKMEQ.js} +2 -2
- package/dist/calcite/{TXZPVAH4.js → ZAQTILTS.js} +2 -2
- package/dist/calcite/{XRJOD24G.js → ZLR2B6GQ.js} +1 -1
- package/dist/calcite/{2CJWVM4R.js → ZSMNT5VS.js} +2 -2
- package/dist/calcite/{B3KV4G2W.js → ZTOBC3PN.js} +2 -2
- package/dist/calcite/{IXK4BTNI.js → ZV7YL7QG.js} +2 -2
- package/dist/calcite/{J2ACTXE5.js → ZVWKN3G7.js} +2 -2
- package/dist/calcite/{LAAEPNIM.js → ZZGPQLEW.js} +2 -2
- package/dist/calcite/calcite.esm.js +2 -2
- package/dist/chunks/runtime.js +4 -4
- package/dist/chunks/useFocusTrap.js +2 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as P,b as H}from"./
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{a as P,b as H}from"./RND3V33U.js";import{a as y,b as G}from"./NSBK36H4.js";import{a as M}from"./PSCEW76J.js";import{a as A}from"./W5OJOVZY.js";import{a as S}from"./ALDDSDTX.js";import{a as x}from"./WOTQIMPZ.js";import"./B5JXPZDV.js";import"./3YZG7MA3.js";import"./CIU4VM7X.js";import{g as D,u as C}from"./5IPJANUU.js";import{a as O}from"./ZLR2B6GQ.js";import{D as I,E as h,K as E,P as B,g as k,h as u,o as d}from"./AUIOWPFN.js";function p(c){return c.tagName==="CALCITE-BLOCK"}var m={container:"container",groupContainer:"group-container",scrim:"scrim",assistiveText:"assistive-text"},b="calcite-block-group",f="calcite-block",T=k`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block}.container{position:relative}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`;function w(c){c.forEach(e=>{e.setPosition=c.indexOf(e)+1,e.setSize=c.length})}var g=class extends I{constructor(){super(),this.dragSelector=f,this.handleSelector="calcite-sort-handle",this.mutationObserver=S("mutation",()=>{this.updateBlockItemsDebounced()}),this.blockAndGroups=[],this.cancelable=M()(this),this.focusSetter=x()(this),this.updateBlockItemsDebounced=A(this.updateBlockItems,E.nextTick),this.sortHandleMenuItems=[],this.disabled=!1,this.dragEnabled=!1,this.loading=!1,this.scale="m",this.sortDisabled=!1,this.calciteBlockGroupDragEnd=d({cancelable:!1}),this.calciteBlockGroupDragStart=d({cancelable:!1}),this.calciteBlockGroupOrderChange=d({cancelable:!1}),this.calciteBlockGroupMoveHalt=d({cancelable:!1}),this.listen("calciteInternalAssistiveTextChange",this.handleCalciteInternalAssistiveTextChange),this.listen("calciteBlockSortHandleBeforeOpen",this.updateBlockItemsDebounced),this.listen("calciteSortHandleReorder",this.handleSortReorder),this.listen("calciteSortHandleMove",this.handleSortMove),this.listen("calciteSortHandleAdd",this.handleSortAdd)}static{this.properties={assistiveText:[16,{},{state:!0}],sortHandleMenuItems:[16,{},{state:!0}],canPull:[0,{},{attribute:!1}],canPut:[0,{},{attribute:!1}],disabled:[7,{},{reflect:!0,type:Boolean}],dragEnabled:[7,{},{reflect:!0,type:Boolean}],group:[3,{},{reflect:!0}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],sortDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=T}async setFocus(e){return this.focusSetter(()=>this.el,e)}emitOrderChangeEvent(e){this.calciteBlockGroupOrderChange.emit(e)}connectedCallback(){super.connectedCallback(),this.connectObserver(),this.updateBlockItemsDebounced(),this.setUpSorting(),this.setParentBlockGroup(),this.cancelable.add(this.updateBlockItemsDebounced)}willUpdate(e){(e.has("group")||e.has("canPull")&&this.hasUpdated||e.has("canPut")&&this.hasUpdated||e.has("dragEnabled")&&(this.hasUpdated||this.dragEnabled!==!1)||e.has("sortDisabled")&&(this.hasUpdated||this.sortDisabled!==!1))&&this.updateBlockItemsDebounced(),e.has("scale")&&this.hasUpdated&&this.updateBlockAndGroupScale()}updated(){y(this)}disconnectedCallback(){super.disconnectedCallback(),this.disconnectObserver(),H(this)}updateBlockItems(){this.updateGroupItems();let{dragEnabled:e,el:a,sortDisabled:t,sortHandleMenuItems:o}=this,s=Array.from(this.el.querySelectorAll(f)),l=a,n=Array.from(l.children).filter(p);s.forEach(r=>{r.closest(b)===a&&(r.moveToItems=o.filter(i=>this.validateSortMenuItem({type:"move",fromEl:l,toEl:i.element,dragEl:r,newIndex:0,oldIndex:n.indexOf(r)})),r.addToItems=this.sortHandleMenuItems.filter(i=>this.validateSortMenuItem({type:"add",fromEl:l,toEl:i.element,dragEl:r,newIndex:0,oldIndex:n.indexOf(r)})),r.dragHandle=e,r.sortDisabled=t)}),this.setUpSorting()}updateGroupItems(){let{el:e,group:a}=this,t=D(e),o=a?Array.from(t.querySelectorAll(`${b}[group="${a}"]`)).filter(s=>!s.disabled&&s.dragEnabled):[];this.sortHandleMenuItems=o.map(s=>({element:s,label:s.label??s.id,id:O()}))}handleCalciteInternalAssistiveTextChange(e){this.assistiveText=e.detail.message,e.stopPropagation()}handleSortReorder(e){this.parentBlockGroupEl||e.defaultPrevented||(e.preventDefault(),this.handleReorder(e))}handleSortAdd(e){this.parentBlockGroupEl||e.defaultPrevented||(e.preventDefault(),this.handleAdd(e))}handleSortMove(e){this.parentBlockGroupEl||e.defaultPrevented||(e.preventDefault(),this.handleMove(e))}connectObserver(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}disconnectObserver(){this.mutationObserver?.disconnect()}setUpSorting(){let{dragEnabled:e}=this;e&&P(this)}onGlobalDragStart(){this.disconnectObserver()}onGlobalDragEnd(){this.connectObserver()}onDragEnd(e){this.calciteBlockGroupDragEnd.emit(e)}onDragStart(e){e.dragEl.sortHandleOpen=!1,this.calciteBlockGroupDragStart.emit(e)}onDragSort(e){this.setParentBlockGroup(),this.updateBlockItemsDebounced(),this.calciteBlockGroupOrderChange.emit(e)}setParentBlockGroup(){this.parentBlockGroupEl=this.el.parentElement?.closest(b)}handleDefaultSlotChange(e){let a=[];this.blockAndGroups=C(e).filter(t=>(t.matches(f)&&a.push(t),t.matches(f)||t.matches(b))),w(a),this.updateBlockAndGroupScale()}updateBlockAndGroupScale(){this.blockAndGroups.forEach(e=>{e.scale=this.scale})}validateSortMenuItem({fromEl:e,toEl:a,dragEl:t,newIndex:o,oldIndex:s,type:l}){if(!e||!a||a===e||t.contains(a))return!1;let n=e.canPull?.({toEl:a,fromEl:e,dragEl:t,newIndex:o,oldIndex:s})??!0,r=a.canPut?.({toEl:a,fromEl:e,dragEl:t,newIndex:o,oldIndex:s})??!0;return(l==="add"?n==="clone":n===!0)&&r}handleAdd(e){let{addTo:a}=e.detail,t=e.target,o=t?.parentElement,s=a.element,n=Array.from(o.children).filter(p).indexOf(t),r=0;if(!this.validateSortMenuItem({type:"add",fromEl:o,toEl:s,dragEl:t,newIndex:r,oldIndex:n}))return;t.sortHandleOpen=!1,this.disconnectObserver();let i=t.cloneNode();s.prepend(i),this.updateBlockItemsDebounced(),this.connectObserver();let v={dragEl:t,fromEl:o,toEl:s,newIndex:r,oldIndex:n};this.calciteBlockGroupOrderChange.emit(v),s.emitOrderChangeEvent(v)}handleMove(e){let{moveTo:a}=e.detail,t=e.target,o=t?.parentElement,s=a.element,n=Array.from(o.children).filter(p).indexOf(t),r=0;if(!this.validateSortMenuItem({type:"move",fromEl:o,toEl:s,dragEl:t,newIndex:r,oldIndex:n}))return;t.sortHandleOpen=!1,this.disconnectObserver(),s.prepend(t),this.updateBlockItemsDebounced(),this.connectObserver();let i={dragEl:t,fromEl:o,toEl:s,newIndex:r,oldIndex:n};this.calciteBlockGroupOrderChange.emit(i),s.emitOrderChangeEvent(i)}handleReorder(e){let{reorder:a}=e.detail,t=e.target,o=t?.parentElement;if(!o)return;t.sortHandleOpen=!1;let s=Array.from(o.children).filter(p),l=s.length-1,n=s.indexOf(t),r=n;switch(a){case"top":r=0;break;case"bottom":r=l;break;case"up":r=n===0?0:n-1;break;case"down":r=n===l?l:n+1;break}this.disconnectObserver();let i=a==="up"||a==="top"?s[r]:s[r].nextSibling;o.insertBefore(t,i),this.updateBlockItemsDebounced(),this.connectObserver(),this.calciteBlockGroupOrderChange.emit({dragEl:t,fromEl:o,toEl:o,newIndex:r,oldIndex:n})}render(){let{loading:e,label:a}=this;return G({disabled:this.disabled,children:u`<div class=${h(m.container)}>${this.dragEnabled?u`<span aria-live=assertive class=${h(m.assistiveText)}>${this.assistiveText}</span>`:null}${e?u`<calcite-scrim class=${h(m.scrim)} .loading=${e}></calcite-scrim>`:null}<div .ariaBusy=${e} .ariaLabel=${a||""} class=${h(m.groupContainer)} role=group><slot @slotchange=${this.handleDefaultSlotChange}></slot></div></div>`})}};B("calcite-block-group",g);export{g as BlockGroup};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as g,b as T}from"./
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{a as g,b as T}from"./NSBK36H4.js";import{a}from"./NULQJBCW.js";import{a as k}from"./S5CLKCGJ.js";import{a as y}from"./3YZG7MA3.js";import"./CIU4VM7X.js";import{y as c}from"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{B as m,C as h,D as f,E as C,P as R,g as p,h as o,m as w,o as r}from"./AUIOWPFN.js";var S={lastVisibleRow:"last-visible-row"},d={checkSquare:"check-square-f",square:"square",circleF:"circle-f",circle:"circle"},A=p`@charset "UTF-8";:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:contents}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) tr{pointer-events:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}calcite-table-cell{--calcite-internal-table-cell-background-color: var( --calcite-table-row-background-color, var(--calcite-table-row-background, var(--calcite-color-foreground-1)) )}:host([selected]) calcite-table-cell{--calcite-internal-table-cell-background-color: var( --calcite-table-row-background-color-selected, var(--calcite-color-foreground-1) )}tr{border-block-end:var(--calcite-border-width-sm) solid var(--calcite-table-row-border-color, transparent);background-color:var(--calcite-table-row-background-color, var(--calcite-table-row-background, var(--calcite-color-foreground-1)))}tr.last-visible-row{border-block-end:0}@-moz-document url-prefix(){tr{box-shadow:inset 0 -1px 0 0 var(--calcite-table-row-border-color)}tr.last-visible-row{box-shadow:inset 0 -1px 0 0 transparent}}:host([item-hidden]){display:none}`,u=class extends f{constructor(){super(),this.rowCells=[],this.tableRowSlotRef=m(),this.userTriggered=!1,this._selected=!1,this.clickHandler=()=>{this.handleRowSelection()},this.handleKeyboardSelection=e=>{k(e.key)&&(e.key===" "&&e.preventDefault(),this.handleRowSelection())},this.itemHidden=!1,this.disabled=!1,this.interactionMode="interactive",this.numbered=!1,this.selectionMode="none",this.calciteInternalTableRowFocusRequest=r({cancelable:!1}),this.calciteInternalTableRowSelect=r({cancelable:!1}),this.calciteTableRowSelect=r({cancelable:!1}),this.listenOn(document,"calciteInternalTableRowFocusChange",this.calciteInternalTableRowFocusChangeHandler)}static{this.properties={alignment:[3,{},{reflect:!0}],itemHidden:[7,{},{reflect:!0,type:Boolean}],bodyRowCount:[9,{},{type:Number}],cellCount:[9,{},{type:Number}],disabled:[7,{},{reflect:!0,type:Boolean}],interactionMode:1,lastVisibleRow:[5,{},{type:Boolean}],numbered:[5,{},{type:Boolean}],positionAll:[9,{},{type:Number}],positionSection:[9,{},{type:Number}],positionSectionLocalized:1,readCellContentsToAT:[5,{},{type:Boolean}],rowType:1,scale:1,selected:[7,{},{reflect:!0,type:Boolean}],selectedRowCount:[9,{},{type:Number}],selectedRowCountLocalized:1,selectionMode:1}}static{this.styles=A}get selected(){return this._selected}set selected(e){let l=this._selected;e!==l&&(this._selected=e,this.handleCellChanges())}load(){this.listenOn(this.el.shadowRoot,"slotchange",this.handleSlotChange)}willUpdate(e){(e.has("bodyRowCount")||e.has("scale")||e.has("selectedRowCount")||e.has("interactionMode")&&(this.hasUpdated||this.interactionMode!=="interactive"))&&this.handleCellChanges(),(e.has("numbered")&&(this.hasUpdated||this.numbered!==!1)||e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="none"))&&this.handleDelayedCellChanges(),e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&!this.userTriggered&&this.calciteInternalTableRowSelect.emit()}updated(){g(this)}loaded(){this.tableRowEl&&this.rowCells.length>0&&this.updateCells()}handleSlotChange(){this.updateCells()}handleCellChanges(){this.tableRowEl&&this.rowCells.length>0&&this.updateCells()}handleDelayedCellChanges(){this.tableRowEl&&this.rowCells.length>0&&requestAnimationFrame(()=>this.updateCells())}calciteInternalTableRowFocusChangeHandler(e){if(e.target.contains(this.el)){let l=e.detail.cellPosition,s=e.detail.rowPosition,i=e.detail.destination,t=e.detail.lastCell;if(s===this.positionAll){if(this.disabled){let b=i==="last"?"previous":i==="first"?"next":i;this.emitTableRowFocusRequest(l,this.positionAll,b);return}let n=t?this.rowCells[this.rowCells.length-1]:this.rowCells?.find((b,$)=>$+1===l);n&&n.setFocus()}}}keyDownHandler(e){if(this.interactionMode!=="interactive")return;let l=e.target,s=e.key,i=e.ctrlKey,t=this.rowCells;if(l.matches("calcite-table-cell")||l.matches("calcite-table-header"))switch(s){case"ArrowUp":this.emitTableRowFocusRequest(l.positionInRow,this.positionAll,"previous"),e.preventDefault();break;case"ArrowDown":this.emitTableRowFocusRequest(l.positionInRow,this.positionAll,"next"),e.preventDefault();break;case"PageUp":this.emitTableRowFocusRequest(l.positionInRow,this.positionAll,"first"),e.preventDefault();break;case"PageDown":this.emitTableRowFocusRequest(l.positionInRow,this.positionAll,"last"),e.preventDefault();break;case"ArrowLeft":c(t,l,"previous",!1,!1),e.preventDefault();break;case"ArrowRight":c(t,l,"next",!1,!1),e.preventDefault();break;case"Home":i?(this.emitTableRowFocusRequest(1,this.positionAll,"first"),e.preventDefault()):(c(t,l,"first",!1,!1),e.preventDefault());break;case"End":i?(this.emitTableRowFocusRequest(this.rowCells?.length,this.positionAll,"last",!0),e.preventDefault()):(c(t,l,"last",!1,!1),e.preventDefault());break}}emitTableRowFocusRequest(e,l,s,i){this.calciteInternalTableRowFocusRequest.emit({cellPosition:e,rowPosition:l,destination:s,lastCell:i})}updateCells(){let e=this.alignment?this.alignment:this.rowType!=="head"?"center":"start",l=this.tableRowSlotRef.value?.assignedElements({flatten:!0})?.filter(t=>t.matches("calcite-table-cell")||t.matches("calcite-table-header")),s=Array.from(this.tableRowEl?.querySelectorAll("calcite-table-header, calcite-table-cell"))?.filter(t=>t.numberCell||t.selectionCell),i=s?s.concat(l):l;i.length>0&&i?.forEach((t,n)=>{t.interactionMode=this.interactionMode,t.lastCell=n===i.length-1,t.parentRowAlignment=e,t.parentRowIsSelected=this.selected,t.parentRowType=this.rowType,t.positionInRow=n+1,t.scale=this.scale,t.nodeName==="CALCITE-TABLE-CELL"&&(t.readCellContentsToAT=this.readCellContentsToAT,t.disabled=this.disabled)}),this.rowCells=i||[],this.cellCount=i?.length}async handleRowSelection(){(this.rowType==="body"||this.rowType==="head"&&this.selectionMode==="multiple")&&(this.userTriggered=!0,this.selected=!this.selected,await this.updateComplete,this.calciteTableRowSelect.emit())}renderSelectionIcon(){let e=this.selectionMode==="multiple"&&this.selected?d.checkSquare:this.selectionMode==="multiple"?d.square:this.selected?d.circleF:d.circle;return o`<calcite-icon .icon=${e} .scale=${y(this.scale)}></calcite-icon>`}renderSelectableCell(){return this.rowType==="head"?a("selection-head",o`<calcite-table-header alignment=center .bodyRowCount=${this.bodyRowCount} @click=${this.clickHandler} @keydown=${this.handleKeyboardSelection} .parentRowAlignment=${this.alignment} .selectedRowCount=${this.selectedRowCount} .selectedRowCountLocalized=${this.selectedRowCountLocalized} .selectionCell=${!0} .selectionMode=${this.selectionMode}></calcite-table-header>`):this.rowType==="body"?a("selection-body",o`<calcite-table-cell alignment=center @click=${this.clickHandler} @keydown=${this.handleKeyboardSelection} .parentRowAlignment=${this.alignment} .parentRowIsSelected=${this.selected} .parentRowPositionLocalized=${this.positionSectionLocalized} .selectionCell=${!0}>${this.renderSelectionIcon()}</calcite-table-cell>`):a("selection-foot",o`<calcite-table-cell alignment=center .parentRowAlignment=${this.alignment} .selectionCell=${!0}></calcite-table-cell>`)}renderNumberedCell(){return this.rowType==="head"?a("numbered-head",o`<calcite-table-header alignment=center .numberCell=${!0} .parentRowAlignment=${this.alignment}></calcite-table-header>`):this.rowType==="body"?a("numbered-body",o`<calcite-table-cell alignment=center .numberCell=${!0} .parentRowAlignment=${this.alignment}>${this.positionSectionLocalized}</calcite-table-cell>`):a("numbered-foot",o`<calcite-table-cell alignment=center .numberCell=${!0} .parentRowAlignment=${this.alignment}></calcite-table-cell>`)}render(){return T({disabled:this.disabled,children:o`<tr .ariaRowIndex=${this.positionAll+1} .ariaSelected=${this.selected} class=${C({[S.lastVisibleRow]:this.lastVisibleRow})} @keydown=${this.keyDownHandler} ${h(e=>{e&&(this.tableRowEl=e,w(o`${this.numbered&&this.renderNumberedCell()||""}${this.selectionMode!=="none"&&this.renderSelectableCell()||""}<slot ${h(this.tableRowSlotRef)}></slot>`,e))})}></tr>`})}};R("calcite-table-row",u);export{u as TableRow};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as S,b as C}from"./
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{a as S,b as C}from"./RND3V33U.js";import{a as O,b as x}from"./NSBK36H4.js";import{a as g}from"./ALDDSDTX.js";import{a as y}from"./CIU4VM7X.js";import{l as v}from"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{D as b,E as p,P as f,g as h,h as u,o as m}from"./AUIOWPFN.js";var l={container:"container",containerHorizontal:"container--horizontal",containerVertical:"container--vertical"},E=h`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.container{display:flex;flex:1 1 auto}.container--vertical{flex-direction:column}.container--horizontal{flex-direction:row}:host([hidden]){display:none}[hidden]{display:none}`,c=class extends b{constructor(){super(),this.dragEnabled=!0,this.items=[],this.mutationObserver=g("mutation",()=>{this.setUpSorting()}),this.disabled=!1,this.handleSelector="calcite-handle",this.layout="vertical",this.loading=!1,this.calciteListOrderChange=m({cancelable:!1}),this.listen("calciteHandleNudge",this.calciteHandleNudgeNextHandler)}static{this.properties={canPull:[0,{},{attribute:!1}],canPut:[0,{},{attribute:!1}],disabled:[7,{},{reflect:!0,type:Boolean}],dragSelector:[3,{},{reflect:!0}],group:[3,{},{reflect:!0}],handleSelector:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],loading:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=E}connectedCallback(){super.connectedCallback(),this.setUpSorting(),this.beginObserving()}load(){y.deprecated("component",{name:"sortable-list",removalVersion:4,suggested:"block-group"})}updated(){O(this)}disconnectedCallback(){super.disconnectedCallback(),C(this),this.endObserving()}calciteHandleNudgeNextHandler(e){this.handleNudgeEvent(e)}onGlobalDragStart(){this.endObserving()}onGlobalDragEnd(){this.beginObserving()}onDragEnd(){}onDragStart(){}onDragSort(){this.items=Array.from(this.el.children),this.calciteListOrderChange.emit()}handleNudgeEvent(e){let{direction:a}=e.detail,t=e.composedPath().find(r=>r.matches(this.handleSelector)),i=this.items.find(r=>r.contains(t)||e.composedPath().includes(r)),d=this.items.length-1,s=this.items.indexOf(i),o=!1,n;a==="up"?s===0?o=!0:n=s-1:s===d?n=0:s===d-1?o=!0:n=s+2,this.endObserving(),o?i.parentElement.appendChild(i):i.parentElement.insertBefore(i,this.items[n]),this.items=Array.from(this.el.children),this.beginObserving(),requestAnimationFrame(()=>v(t)),"selected"in t&&(t.selected=!0)}setUpSorting(){this.items=Array.from(this.el.children),S(this)}beginObserving(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}endObserving(){this.mutationObserver?.disconnect()}render(){let{disabled:e,layout:a}=this,t=a==="horizontal"||!1;return x({disabled:e,children:u`<div class=${p({[l.container]:!0,[l.containerVertical]:!t,[l.containerHorizontal]:t})}><slot></slot></div>`})}};f("calcite-sortable-list",c);export{c as SortableList};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as r}from"./
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{a as r}from"./B5JXPZDV.js";var n=0,u="",f=()=>{function t(){n++,n===1&&(u=document.documentElement.style.overflow,document.documentElement.style.overflow="hidden")}function o(){n--,n===0&&(document.documentElement.style.overflow=u)}return r((e,l)=>{l.onConnected(()=>{e.opened&&e.preventDocumentScroll&&t()}),l.onUpdate(d=>{e.hasUpdated&&(d.has("opened")&&e.preventDocumentScroll?e.opened?t():o():d.has("preventDocumentScroll")&&e.opened&&(e.preventDocumentScroll?t():o()))}),l.onDisconnected(()=>{e.opened&&e.preventDocumentScroll&&o()})})};export{f as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{c as r}from"./
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{c as r}from"./V3ZR6RFK.js";import{a as n,b as o}from"./NSBK36H4.js";import{D as l,E as e,P as s,g as a,h as i,o as c}from"./AUIOWPFN.js";var d={container:"container",heading:"heading"},p=a`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex;flex-direction:column}:host([filter-hidden]){display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.container{margin:0;display:flex;flex:1 1 0%;background-color:var(--calcite-list-background-color, var(--calcite-color-foreground-1));color:var(--calcite-list-color, var(--calcite-color-text-1))}.heading{font-weight:var(--calcite-font-weight-bold)}:host([scale=s]) .container{padding-inline:var(--calcite-spacing-sm)}:host([scale=s]) .heading{font-size:var(--calcite-font-size-sm);line-height:var(--calcite-font-line-height-fixed-base);padding-block:var(--calcite-spacing-sm) var(--calcite-spacing-xxs)}:host([scale=s]:not(:first-child)) .container{padding-block-start:var(--calcite-spacing-sm)}:host([scale=m]) .container{padding-inline:var(--calcite-spacing-md)}:host([scale=m]) .heading{font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-fixed-base);padding-block:var(--calcite-spacing-lg) var(--calcite-spacing-sm)}:host([scale=m]:not(:first-child)) .container{padding-block-start:var(--calcite-spacing-md)}:host([scale=l]) .container{padding-inline:var(--calcite-spacing-lg)}:host([scale=l]) .heading{font-size:var(--calcite-font-size-md);line-height:var(--calcite-font-line-height-fixed-lg);padding-block:var(--calcite-spacing-xl) var(--calcite-spacing-sm-plus, .625rem)}:host([scale=l]:not(:first-child)) .container{padding-block-start:var(--calcite-spacing-md-plus, .875rem)}.heading{padding:0}:host([hidden]){display:none}[hidden]{display:none}`,t=class extends l{constructor(){super(...arguments),this.disabled=!1,this.filterHidden=!1,this.scale="m",this.calciteInternalListItemGroupDefaultSlotChange=c({cancelable:!1})}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],filterHidden:[7,{},{reflect:!0,type:Boolean}],heading:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}]}}static{this.styles=p}updated(){n(this)}handleDefaultSlotChange(){this.calciteInternalListItemGroupDefaultSlotChange.emit()}render(){let{disabled:h,heading:g}=this;return o({disabled:h,children:i`<div class=${e(d.container)} role=row><div .ariaColSpan=${r} class=${e(d.heading)} role=cell>${g}</div></div><slot @slotchange=${this.handleDefaultSlotChange}></slot>`})}};s("calcite-list-item-group",t);export{t as ListItemGroup};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
4
|
function r(n,$,o){return $?`${n}-${$}`:o?`${n}-${o}`:`${n}-m`}export{r as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as s}from"./
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{a as s}from"./ALDDSDTX.js";import{D as o,E as n,P as r,g as c,h as i,o as a}from"./AUIOWPFN.js";var l={accordion:"accordion",transparent:"accordion--transparent"},d=c`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{position:relative;display:block;max-inline-size:100%;line-height:1.5rem}.accordion{border-width:1px;border-block-end-width:0px;border-style:solid;border-color:var(--calcite-accordion-border-color, var(--calcite-color-border-2));background-color:var(--calcite-accordion-background-color, var(--calcite-color-foreground-1))}.accordion--transparent{--calcite-accordion-border-color: transparent;border-color:var(--calcite-color-transparent);background-color:var(--calcite-color-transparent)}:host([scale=s]){--calcite-internal-accordion-item-spacing-unit: .25rem;--calcite-internal-accordion-icon-margin: .5rem;--calcite-internal-accordion-item-padding: var(--calcite-internal-accordion-item-spacing-unit) .5rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]){--calcite-internal-accordion-item-spacing-unit: .5rem;--calcite-internal-accordion-icon-margin: .75rem;--calcite-internal-accordion-item-padding: var(--calcite-internal-accordion-item-spacing-unit) .75rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]){--calcite-internal-accordion-item-spacing-unit: .75rem;--calcite-internal-accordion-icon-margin: 1rem;--calcite-internal-accordion-item-padding: var(--calcite-internal-accordion-item-spacing-unit) 1rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([hidden]){display:none}[hidden]{display:none}`,t=class extends o{constructor(){super(),this.mutationObserver=s("mutation",()=>this.updateAccordionItems()),this.appearance="solid",this.iconPosition="end",this.iconType="chevron",this.scale="m",this.selectionMode="multiple",this.calciteInternalAccordionChange=a({cancelable:!1}),this.listen("calciteInternalAccordionItemSelect",this.updateActiveItemOnChange)}static{this.properties={appearance:[3,{},{reflect:!0}],iconPosition:[3,{},{reflect:!0}],iconType:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}]}}static{this.styles=d}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0}),this.updateAccordionItems()}willUpdate(e){(e.has("appearance")&&(this.hasUpdated||this.appearance!=="solid")||e.has("iconPosition")&&(this.hasUpdated||this.iconPosition!=="end")||e.has("iconType")&&(this.hasUpdated||this.iconType!=="chevron")||e.has("scale")&&(this.hasUpdated||this.scale!=="m")||e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="multiple"))&&this.updateAccordionItems()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}updateActiveItemOnChange(e){this.calciteInternalAccordionChange.emit({requestedAccordionItem:e.detail.requestedAccordionItem}),e.stopPropagation()}updateAccordionItems(){this.el.querySelectorAll("calcite-accordion-item").forEach(e=>{e.appearance=this.appearance,e.iconPosition=this.iconPosition,e.iconType=this.iconType,e.scale=this.scale}),document.dispatchEvent(new CustomEvent("calciteInternalAccordionItemsSync"))}render(){let e=this.appearance==="transparent";return i`<div class=${n({[l.transparent]:e,[l.accordion]:!e})}><slot></slot></div>`}};r("calcite-accordion",t);export{t as Accordion};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{j as C,k as v}from"./
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{j as C,k as v}from"./5IPJANUU.js";import{h as I}from"./AUIOWPFN.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
|
-
v5.0.0-next.
|
|
4
|
-
import{b as p,d as f}from"./
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{b as p,d as f}from"./W5OJOVZY.js";function e(r){if(r==null)return"";if(typeof r=="string")return r;if(Array.isArray(r))return r.map(e).join(",");let o=String(r);return o==="0"&&Object.is(Number(r),-0)?"-0":o}function m(r){return f(e(r))}function x(r,o=p){if(r==null)return r;for(let t in r)if(o(r[t],t,r)===!1)break;return r}export{x as a,m as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{h as O,k as L}from"./RUMWLVIQ.js";import{c as M,e as F,f as E}from"./U3G47NPB.js";import{a as v}from"./H42LHYUA.js";import"./2DX2SAQ7.js";import{a as T}from"./J2NLU7RP.js";import{a as S}from"./PNBL2IVW.js";import"./D5SFHDV6.js";import{p as V}from"./Z6CRZOOK.js";import"./XRJOD24G.js";import{B as d,C as m,D as k,E as b,F as p,P as C,g as z,h}from"./CSQVLDPF.js";var r={container:"container",fill:"fill",stepLine:"step-line",label:"label",labelHidden:"label-hidden",labelRange:"label-range",labelValue:"label-value",unitLabel:"unit-label",stepsVisible:"steps-visible",valueVisible:"value-visible",success:"fill-success",warning:"fill-warning",danger:"fill-danger"},U=z`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host{display:flex;--calcite-internal-meter-space: var(--calcite-spacing-base);--calcite-internal-meter-height: var(--calcite-spacing-lg);--calcite-internal-meter-font-size: var(--calcite-font-size--1);--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-brand));--calcite-internal-meter-background-color: var(--calcite-meter-background-color, var(--calcite-color-foreground-2));--calcite-internal-meter-border-color: var(--calcite-meter-border-color, var(--calcite-color-border-3));--calcite-internal-meter-shadow: var(--calcite-meter-shadow, var(--calcite-shadow-none));--calcite-internal-meter-corner-radius: var(--calcite-meter-corner-radius, 9999px);--calcite-internal-meter-value-text-color: var(--calcite-meter-value-text-color, var(--calcite-color-text-1));--calcite-internal-meter-range-text-color: var(--calcite-meter-range-text-color, var(--calcite-color-text-3))}:host([scale=s]){--calcite-internal-meter-height: var(--calcite-spacing-md);--calcite-internal-meter-font-size: var(--calcite-font-size--2)}:host([scale=l]){--calcite-internal-meter-height: var(--calcite-spacing-xxl);--calcite-internal-meter-font-size: var(--calcite-font-size-0)}:host([appearance=solid]){--calcite-internal-meter-border-color: var(--calcite-color-foreground-3);--calcite-internal-meter-background-color: var(--calcite-color-foreground-3)}:host([appearance=outline]){--calcite-internal-meter-background-color: transparent}.fill{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-brand))}.fill-danger{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-status-danger))}.fill-success{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-status-success))}.fill-warning{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-status-warning))}.container{position:relative;display:flex;align-items:center;margin:0;inline-size:var(--calcite-container-size-content-fluid);block-size:var(--calcite-internal-meter-height);background-color:var(--calcite-internal-meter-background-color);border:var(--calcite-border-width-sm) solid var(--calcite-internal-meter-border-color);border-radius:var(--calcite-internal-meter-corner-radius);box-shadow:var(--calcite-internal-meter-shadow)}.value-visible{margin-block-start:var(--calcite-spacing-xxl)}.steps-visible{margin-block-end:var(--calcite-spacing-xxl)}.step-line{position:absolute;inset-block:0px;display:block;inline-size:var(--calcite-internal-meter-space);background-color:var(--calcite-internal-meter-border-color)}.label{position:absolute;font-size:var(--calcite-internal-meter-font-size)}.label-hidden{visibility:hidden;opacity:0}.label-value{inset-block-end:calc(100% + .5em);font-weight:var(--calcite-font-weight-bold);color:var(--calcite-internal-meter-value-text-color)}.label-range{color:var(--calcite-internal-meter-range-text-color);inset-block-start:calc(100% + .5em)}.label-range .unit-label{font-weight:var(--calcite-font-weight-medium)}.fill{position:absolute;z-index:var(--calcite-z-index);display:block;transition-timing-function:cubic-bezier(.4,0,.2,1);inset-inline-start:var(--calcite-internal-meter-space);inset-block:var(--calcite-internal-meter-space);border-radius:var(--calcite-internal-meter-corner-radius);max-inline-size:calc(100% - var(--calcite-internal-meter-space) * 2);min-inline-size:calc(var(--calcite-internal-meter-height) - var(--calcite-internal-meter-space) * 2);background-color:var(--calcite-internal-meter-fill-color);transition-property:inline-size,background-color,box-shadow}.solid .fill{inset-block:0;inset-inline-start:0;max-inline-size:100%;min-inline-size:calc(var(--calcite-internal-meter-height));box-shadow:0 0 0 1px var(--calcite-internal-meter-fill-color)}`,y=class extends k{constructor(){super(...arguments),this.highLabelRef=d(),this.labelFlipMax=.8,this.labelFlipProximity=.15,this.lowLabelRef=d(),this.maxLabelRef=d(),this.maxPercent=100,this.messages=S({name:null}),this.meterContainerRef=d(),this.minLabelRef=d(),this.minPercent=0,this.resizeObserver=T("resize",()=>this.resizeHandler()),this.valueLabelRef=d(),this.appearance="outline-fill",this.disabled=!1,this.fillType="range",this.groupSeparator=!1,this.max=100,this.min=0,this.rangeLabelType="percent",this.rangeLabels=!1,this.scale="m",this.unitLabel="",this.valueLabel=!1,this.valueLabelType="percent"}static{this.properties={currentPercent:[16,{},{state:!0}],highActive:[16,{},{state:!0}],highPercent:[16,{},{state:!0}],lowActive:[16,{},{state:!0}],lowPercent:[16,{},{state:!0}],appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],fillType:[3,{},{reflect:!0}],form:[3,{},{reflect:!0}],groupSeparator:[7,{},{reflect:!0,type:Boolean}],high:[11,{},{reflect:!0,type:Number}],label:1,low:[11,{},{reflect:!0,type:Number}],max:[11,{},{reflect:!0,type:Number}],min:[11,{},{reflect:!0,type:Number}],name:[3,{},{reflect:!0}],numberingSystem:1,rangeLabelType:[3,{},{reflect:!0}],rangeLabels:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],unitLabel:1,value:[9,{},{type:Number}],valueLabel:[7,{},{reflect:!0,type:Boolean}],valueLabelType:[3,{},{reflect:!0}]}}static{this.styles=U}connectedCallback(){super.connectedCallback(),M(this),this.resizeObserver?.observe(this.el)}load(){this.calculateValues(),E(this,this.value)}willUpdate(e){(e.has("min")&&(this.hasUpdated||this.min!==0)||e.has("max")&&(this.hasUpdated||this.max!==100)||e.has("low")||e.has("high")||e.has("value"))&&this.handleRangeChange(),(e.has("rangeLabels")&&(this.hasUpdated||this.rangeLabels!==!1)||e.has("rangeLabelType")&&(this.hasUpdated||this.rangeLabelType!=="percent")||e.has("unitLabel")&&(this.hasUpdated||this.unitLabel!=="")||e.has("valueLabel")&&(this.hasUpdated||this.valueLabel!==!1)||e.has("valueLabelType")&&(this.hasUpdated||this.valueLabelType!=="percent"))&&this.updateLabels()}loaded(){this.updateLabels()}disconnectedCallback(){super.disconnectedCallback(),F(this),this.resizeObserver?.disconnect()}handleRangeChange(){this.calculateValues(),this.updateLabels()}resizeHandler(){this.updateLabels()}updateLabels(){this.valueLabelRef.value&&this.determineValueLabelPosition(),this.rangeLabels&&this.determineVisibleLabels()}calculateValues(){let{min:e,max:l,low:t,high:a,value:i}=this,n=100*(t-e)/(l-e),s=100*(a-e)/(l-e),c=100*(i-e)/(l-e);(!t||t<e||t>a||t>l)&&(this.low=e),(!a||a>l||a<t||a<e)&&(this.high=l),i||(this.value=e),this.lowPercent=n,this.highPercent=s,this.currentPercent=i?c:0,this.lowActive=!!t&&t>e&&(!i||t>i)&&(!a||t<a),this.highActive=!!a&&e<=a&&a<l&&(!i||a>i)&&(!t||a>t)}formatLabel(e,l){if(l==="percent"){if(!this.percentFormatting){let t=O(this.messages._lang),a=new Intl.NumberFormat(t,{useGrouping:this.groupSeparator,style:"percent"});this.percentFormatting={formatter:a,locale:t}}return this.percentFormatting.formatter.format(e)}else return L.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},L.localize(e.toString())}getMeterKindCssClass(){let{low:e,high:l,min:t,max:a,value:i}=this,n=e||t,s=l||a,c=i>=n,u=i<n,f=i>=s,o=i<s;return!i||!e&&o||u?r.success:c&&o?r.warning:f?r.danger:r.success}intersects(e,l){return e&&l&&V(e.getBoundingClientRect(),l.getBoundingClientRect())}determineVisibleLabels(){let{minLabelRef:{value:e},lowLabelRef:{value:l},highLabelRef:{value:t},maxLabelRef:{value:a}}=this,i=this.intersects(t,a),n=this.intersects(l,t),s=this.intersects(l,a),c=this.intersects(e,t),u=this.intersects(e,l),f=this.intersects(e,a),o=r.labelHidden;l&&(u||s||n?l.classList.add(o):l.classList.remove(o)),t&&(c||s||i?t.classList.add(o):t.classList.remove(o)),e&&a&&(f?a.classList.add(o):a.classList.remove(o))}determineValueLabelPosition(){let{valueLabelRef:{value:e},meterContainerRef:{value:l},currentPercent:t}=this,a=t>100?100:t>0?t:0,i=e.getBoundingClientRect().width,n=l.getBoundingClientRect().width,s=100*(i-0)/(n-0);a+s>=100?(e.style.insetInlineEnd="0%",e.style.removeProperty("inset-inline-start")):(e.style.insetInlineStart=`${a}% `,e.style.removeProperty("inset-inline-end"))}renderMeterFill(){let{currentPercent:e,fillType:l}=this,t=this.getMeterKindCssClass();return h`<div class=${b({[r.fill]:!0,[t]:l!=="single"})} style=${p({width:`${e}%`})}></div>`}renderRangeLine(e){let l={insetInlineStart:`${e}%`};return h`<div class=${b(r.stepLine)} style=${p(l)}></div>`}renderValueLabel(){let{currentPercent:e,valueLabelType:l,unitLabel:t,value:a}=this,i=this.formatLabel(l==="percent"?e/100:a||0,l);return v("low-label-line",h`<div class=${b({[r.label]:!0,[r.labelValue]:!0})} ${m(this.valueLabelRef)}>${i}${t&&l!=="percent"&&h`<span class=${b(r.unitLabel)}> ${t}</span>`||""}</div>`)}renderMinLabel(){let{rangeLabelType:e,min:l,minPercent:t,unitLabel:a}=this,i={insetInlineStart:`${t}%`},n=this.formatLabel(e==="percent"?t:l,e);return v("min-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(i)} ${m(this.minLabelRef)}>${n}${a&&e!=="percent"&&h`<span class=${b(r.unitLabel)}> ${a}</span>`||""}</div>`)}renderLowLabel(){let{rangeLabelType:e,low:l,lowPercent:t,highPercent:a,labelFlipProximity:i}=this,n=l?this.formatLabel(e==="percent"?t/100:l,e):"",s={insetInlineStart:`${t}%`},c={insetInlineEnd:`${100-t}%`},u=(a-t)/100<i?c:s;return v("low-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(u)} ${m(this.lowLabelRef)}>${n}</div>`)}renderHighLabel(){let{rangeLabelType:e,high:l,highPercent:t,labelFlipMax:a}=this,i=l?this.formatLabel(e==="percent"?t/100:l,e):"",n={insetInlineStart:`${t}%`},s={insetInlineEnd:`${100-t}%`},c=t/100>=a?s:n;return v("high-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(c)} ${m(this.highLabelRef)}>${i}</div>`)}renderMaxLabel(){let{rangeLabelType:e,max:l,maxPercent:t}=this,a={insetInlineEnd:`${100-t}%`},i=this.formatLabel(e==="percent"?t/100:l,e);return v("max-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(a)} ${m(this.maxLabelRef)}>${i}</div>`)}render(){let{appearance:e,currentPercent:l,highActive:t,highPercent:a,label:i,lowActive:n,lowPercent:s,max:c,maxPercent:u,min:f,minPercent:o,rangeLabels:g,rangeLabelType:x,unitLabel:$,value:w,valueLabel:P,valueLabelType:R}=this,H=this.formatLabel(l/100,"percent"),I=`${w} ${$}`;return h`<div .ariaLabel=${i} .ariaValueMax=${x==="percent"?u:c} .ariaValueMin=${x==="percent"?o:f} .ariaValueNow=${R==="percent"?l:w} .ariaValueText=${R==="percent"?H:$?I:void 0} class=${b({[r.container]:!0,[r.stepsVisible]:g,[r.valueVisible]:P,[e]:e!=="outline-fill"})} role=meter ${m(this.meterContainerRef)}>${this.renderMeterFill()}${P&&this.renderValueLabel()||""}${n&&this.renderRangeLine(s)||""}${t&&this.renderRangeLine(a)||""}${g&&this.renderMinLabel()||""}${g&&n&&this.renderLowLabel()||""}${g&&t&&this.renderHighLabel()||""}${g&&this.renderMaxLabel()||""}</div>`}};C("calcite-meter",y);export{y as Meter};
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{h as O,k as L}from"./CVLFEMH2.js";import{c as M,e as F,f as E}from"./Y3HXK6MO.js";import{a as v}from"./NULQJBCW.js";import"./S5CLKCGJ.js";import{a as T}from"./ALDDSDTX.js";import{a as S}from"./LH7245HX.js";import"./B5JXPZDV.js";import{p as V}from"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{B as d,C as m,D as k,E as b,F as p,P as C,g as z,h}from"./AUIOWPFN.js";var r={container:"container",fill:"fill",stepLine:"step-line",label:"label",labelHidden:"label-hidden",labelRange:"label-range",labelValue:"label-value",unitLabel:"unit-label",stepsVisible:"steps-visible",valueVisible:"value-visible",success:"fill-success",warning:"fill-warning",danger:"fill-danger"},U=z`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host{display:flex;--calcite-internal-meter-space: var(--calcite-spacing-base);--calcite-internal-meter-height: var(--calcite-spacing-lg);--calcite-internal-meter-font-size: var(--calcite-font-size--1);--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-brand));--calcite-internal-meter-background-color: var(--calcite-meter-background-color, var(--calcite-color-foreground-2));--calcite-internal-meter-border-color: var(--calcite-meter-border-color, var(--calcite-color-border-3));--calcite-internal-meter-shadow: var(--calcite-meter-shadow, var(--calcite-shadow-none));--calcite-internal-meter-corner-radius: var(--calcite-meter-corner-radius, 9999px);--calcite-internal-meter-value-text-color: var(--calcite-meter-value-text-color, var(--calcite-color-text-1));--calcite-internal-meter-range-text-color: var(--calcite-meter-range-text-color, var(--calcite-color-text-3))}:host([scale=s]){--calcite-internal-meter-height: var(--calcite-spacing-md);--calcite-internal-meter-font-size: var(--calcite-font-size--2)}:host([scale=l]){--calcite-internal-meter-height: var(--calcite-spacing-xxl);--calcite-internal-meter-font-size: var(--calcite-font-size-0)}:host([appearance=solid]){--calcite-internal-meter-border-color: var(--calcite-color-foreground-3);--calcite-internal-meter-background-color: var(--calcite-color-foreground-3)}:host([appearance=outline]){--calcite-internal-meter-background-color: transparent}.fill{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-brand))}.fill-danger{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-status-danger))}.fill-success{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-status-success))}.fill-warning{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-status-warning))}.container{position:relative;display:flex;align-items:center;margin:0;inline-size:var(--calcite-container-size-content-fluid);block-size:var(--calcite-internal-meter-height);background-color:var(--calcite-internal-meter-background-color);border:var(--calcite-border-width-sm) solid var(--calcite-internal-meter-border-color);border-radius:var(--calcite-internal-meter-corner-radius);box-shadow:var(--calcite-internal-meter-shadow)}.value-visible{margin-block-start:var(--calcite-spacing-xxl)}.steps-visible{margin-block-end:var(--calcite-spacing-xxl)}.step-line{position:absolute;inset-block:0px;display:block;inline-size:var(--calcite-internal-meter-space);background-color:var(--calcite-internal-meter-border-color)}.label{position:absolute;font-size:var(--calcite-internal-meter-font-size)}.label-hidden{visibility:hidden;opacity:0}.label-value{inset-block-end:calc(100% + .5em);font-weight:var(--calcite-font-weight-bold);color:var(--calcite-internal-meter-value-text-color)}.label-range{color:var(--calcite-internal-meter-range-text-color);inset-block-start:calc(100% + .5em)}.label-range .unit-label{font-weight:var(--calcite-font-weight-medium)}.fill{position:absolute;z-index:var(--calcite-z-index);display:block;transition-timing-function:cubic-bezier(.4,0,.2,1);inset-inline-start:var(--calcite-internal-meter-space);inset-block:var(--calcite-internal-meter-space);border-radius:var(--calcite-internal-meter-corner-radius);max-inline-size:calc(100% - var(--calcite-internal-meter-space) * 2);min-inline-size:calc(var(--calcite-internal-meter-height) - var(--calcite-internal-meter-space) * 2);background-color:var(--calcite-internal-meter-fill-color);transition-property:inline-size,background-color,box-shadow}.solid .fill{inset-block:0;inset-inline-start:0;max-inline-size:100%;min-inline-size:calc(var(--calcite-internal-meter-height));box-shadow:0 0 0 1px var(--calcite-internal-meter-fill-color)}`,y=class extends k{constructor(){super(...arguments),this.highLabelRef=d(),this.labelFlipMax=.8,this.labelFlipProximity=.15,this.lowLabelRef=d(),this.maxLabelRef=d(),this.maxPercent=100,this.messages=S({name:null}),this.meterContainerRef=d(),this.minLabelRef=d(),this.minPercent=0,this.resizeObserver=T("resize",()=>this.resizeHandler()),this.valueLabelRef=d(),this.appearance="outline-fill",this.disabled=!1,this.fillType="range",this.groupSeparator=!1,this.max=100,this.min=0,this.rangeLabelType="percent",this.rangeLabels=!1,this.scale="m",this.unitLabel="",this.valueLabel=!1,this.valueLabelType="percent"}static{this.properties={currentPercent:[16,{},{state:!0}],highActive:[16,{},{state:!0}],highPercent:[16,{},{state:!0}],lowActive:[16,{},{state:!0}],lowPercent:[16,{},{state:!0}],appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],fillType:[3,{},{reflect:!0}],form:[3,{},{reflect:!0}],groupSeparator:[7,{},{reflect:!0,type:Boolean}],high:[11,{},{reflect:!0,type:Number}],label:1,low:[11,{},{reflect:!0,type:Number}],max:[11,{},{reflect:!0,type:Number}],min:[11,{},{reflect:!0,type:Number}],name:[3,{},{reflect:!0}],numberingSystem:1,rangeLabelType:[3,{},{reflect:!0}],rangeLabels:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],unitLabel:1,value:[9,{},{type:Number}],valueLabel:[7,{},{reflect:!0,type:Boolean}],valueLabelType:[3,{},{reflect:!0}]}}static{this.styles=U}connectedCallback(){super.connectedCallback(),M(this),this.resizeObserver?.observe(this.el)}load(){this.calculateValues(),E(this,this.value)}willUpdate(e){(e.has("min")&&(this.hasUpdated||this.min!==0)||e.has("max")&&(this.hasUpdated||this.max!==100)||e.has("low")||e.has("high")||e.has("value"))&&this.handleRangeChange(),(e.has("rangeLabels")&&(this.hasUpdated||this.rangeLabels!==!1)||e.has("rangeLabelType")&&(this.hasUpdated||this.rangeLabelType!=="percent")||e.has("unitLabel")&&(this.hasUpdated||this.unitLabel!=="")||e.has("valueLabel")&&(this.hasUpdated||this.valueLabel!==!1)||e.has("valueLabelType")&&(this.hasUpdated||this.valueLabelType!=="percent"))&&this.updateLabels()}loaded(){this.updateLabels()}disconnectedCallback(){super.disconnectedCallback(),F(this),this.resizeObserver?.disconnect()}handleRangeChange(){this.calculateValues(),this.updateLabels()}resizeHandler(){this.updateLabels()}updateLabels(){this.valueLabelRef.value&&this.determineValueLabelPosition(),this.rangeLabels&&this.determineVisibleLabels()}calculateValues(){let{min:e,max:l,low:t,high:a,value:i}=this,n=100*(t-e)/(l-e),s=100*(a-e)/(l-e),c=100*(i-e)/(l-e);(!t||t<e||t>a||t>l)&&(this.low=e),(!a||a>l||a<t||a<e)&&(this.high=l),i||(this.value=e),this.lowPercent=n,this.highPercent=s,this.currentPercent=i?c:0,this.lowActive=!!t&&t>e&&(!i||t>i)&&(!a||t<a),this.highActive=!!a&&e<=a&&a<l&&(!i||a>i)&&(!t||a>t)}formatLabel(e,l){if(l==="percent"){if(!this.percentFormatting){let t=O(this.messages._lang),a=new Intl.NumberFormat(t,{useGrouping:this.groupSeparator,style:"percent"});this.percentFormatting={formatter:a,locale:t}}return this.percentFormatting.formatter.format(e)}else return L.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},L.localize(e.toString())}getMeterKindCssClass(){let{low:e,high:l,min:t,max:a,value:i}=this,n=e||t,s=l||a,c=i>=n,u=i<n,f=i>=s,o=i<s;return!i||!e&&o||u?r.success:c&&o?r.warning:f?r.danger:r.success}intersects(e,l){return e&&l&&V(e.getBoundingClientRect(),l.getBoundingClientRect())}determineVisibleLabels(){let{minLabelRef:{value:e},lowLabelRef:{value:l},highLabelRef:{value:t},maxLabelRef:{value:a}}=this,i=this.intersects(t,a),n=this.intersects(l,t),s=this.intersects(l,a),c=this.intersects(e,t),u=this.intersects(e,l),f=this.intersects(e,a),o=r.labelHidden;l&&(u||s||n?l.classList.add(o):l.classList.remove(o)),t&&(c||s||i?t.classList.add(o):t.classList.remove(o)),e&&a&&(f?a.classList.add(o):a.classList.remove(o))}determineValueLabelPosition(){let{valueLabelRef:{value:e},meterContainerRef:{value:l},currentPercent:t}=this,a=t>100?100:t>0?t:0,i=e.getBoundingClientRect().width,n=l.getBoundingClientRect().width,s=100*(i-0)/(n-0);a+s>=100?(e.style.insetInlineEnd="0%",e.style.removeProperty("inset-inline-start")):(e.style.insetInlineStart=`${a}% `,e.style.removeProperty("inset-inline-end"))}renderMeterFill(){let{currentPercent:e,fillType:l}=this,t=this.getMeterKindCssClass();return h`<div class=${b({[r.fill]:!0,[t]:l!=="single"})} style=${p({width:`${e}%`})}></div>`}renderRangeLine(e){let l={insetInlineStart:`${e}%`};return h`<div class=${b(r.stepLine)} style=${p(l)}></div>`}renderValueLabel(){let{currentPercent:e,valueLabelType:l,unitLabel:t,value:a}=this,i=this.formatLabel(l==="percent"?e/100:a||0,l);return v("low-label-line",h`<div class=${b({[r.label]:!0,[r.labelValue]:!0})} ${m(this.valueLabelRef)}>${i}${t&&l!=="percent"&&h`<span class=${b(r.unitLabel)}> ${t}</span>`||""}</div>`)}renderMinLabel(){let{rangeLabelType:e,min:l,minPercent:t,unitLabel:a}=this,i={insetInlineStart:`${t}%`},n=this.formatLabel(e==="percent"?t:l,e);return v("min-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(i)} ${m(this.minLabelRef)}>${n}${a&&e!=="percent"&&h`<span class=${b(r.unitLabel)}> ${a}</span>`||""}</div>`)}renderLowLabel(){let{rangeLabelType:e,low:l,lowPercent:t,highPercent:a,labelFlipProximity:i}=this,n=l?this.formatLabel(e==="percent"?t/100:l,e):"",s={insetInlineStart:`${t}%`},c={insetInlineEnd:`${100-t}%`},u=(a-t)/100<i?c:s;return v("low-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(u)} ${m(this.lowLabelRef)}>${n}</div>`)}renderHighLabel(){let{rangeLabelType:e,high:l,highPercent:t,labelFlipMax:a}=this,i=l?this.formatLabel(e==="percent"?t/100:l,e):"",n={insetInlineStart:`${t}%`},s={insetInlineEnd:`${100-t}%`},c=t/100>=a?s:n;return v("high-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(c)} ${m(this.highLabelRef)}>${i}</div>`)}renderMaxLabel(){let{rangeLabelType:e,max:l,maxPercent:t}=this,a={insetInlineEnd:`${100-t}%`},i=this.formatLabel(e==="percent"?t/100:l,e);return v("max-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(a)} ${m(this.maxLabelRef)}>${i}</div>`)}render(){let{appearance:e,currentPercent:l,highActive:t,highPercent:a,label:i,lowActive:n,lowPercent:s,max:c,maxPercent:u,min:f,minPercent:o,rangeLabels:g,rangeLabelType:x,unitLabel:$,value:w,valueLabel:P,valueLabelType:R}=this,H=this.formatLabel(l/100,"percent"),I=`${w} ${$}`;return h`<div .ariaLabel=${i} .ariaValueMax=${x==="percent"?u:c} .ariaValueMin=${x==="percent"?o:f} .ariaValueNow=${R==="percent"?l:w} .ariaValueText=${R==="percent"?H:$?I:void 0} class=${b({[r.container]:!0,[r.stepsVisible]:g,[r.valueVisible]:P,[e]:e!=="outline-fill"})} role=meter ${m(this.meterContainerRef)}>${this.renderMeterFill()}${P&&this.renderValueLabel()||""}${n&&this.renderRangeLine(s)||""}${t&&this.renderRangeLine(a)||""}${g&&this.renderMinLabel()||""}${g&&n&&this.renderLowLabel()||""}${g&&t&&this.renderHighLabel()||""}${g&&this.renderMaxLabel()||""}</div>`}};C("calcite-meter",y);export{y as Meter};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
4
|
var a=class{constructor(){this._formatterCache=new Map,this._commonDateTimeFormatterOptions={year:"numeric",month:"2-digit",day:"2-digit",timeZoneName:"shortOffset"}}get name(){return"native"}create(t){return new Date(t)}increase(t){return new Date(t.getTime()+864e5)}formatToIsoDateString(t){let e=t.getFullYear(),n=t.getMonth()+1,r=t.getDate();return`${e}-${n.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}`}isoToTimeZone(t,e){let n=this._toDate(t),o=this._getFormatter(e).formatToParts(n),[i]=o.filter(({type:s})=>s==="timeZoneName").map(({value:s})=>s),m=this._getTimeZoneOffsetInMins(i),c=n.getMinutes()-(n.getTimezoneOffset()-m);return n.setMinutes(c),n}same(t,e){return t.getTime()===e.getTime()}_toDate(t){return new Date(t)}_getFormatter(t){t==="Factory"&&(t="Etc/GMT");let e=this._formatterCache.get(t);return e||(e=new Intl.DateTimeFormat("en-US",{timeZone:t,...this._commonDateTimeFormatterOptions}),this._formatterCache.set(t,e)),e}_getTimeZoneOffsetInMins(t){let[e,...n]=t.slice(3),[r,o]=n.join("").split(":");return(e==="+"?1:-1)*(Number(r)*60+Number(o||0))}};export{a as DateEngine};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
4
|
var i="CALCITE-COMBOBOX-ITEM",l="CALCITE-COMBOBOX-ITEM-GROUP",t=`${i}, ${l}`,o={allSelected:"all-selected",chip:"chip",chipInvisible:"chip--invisible",icon:"icon",input:"input",inputHidden:"input--hidden",label:"label",labelIcon:"label--icon",listContainer:"list-container",noMatches:"no-matches",noMatchesPlaceholder:"no-matches-placeholder",placeholderIcon:"placeholder-icon",selectAll:"select-all",selectionDisplayFit:"selection-display--fit",selectionDisplaySingle:"selection-display--single",selectedIcon:"selected-icon",floatingUIContainer:"floating-ui-container",screenReadersOnly:"screen-readers-only",wrapper:"wrapper",wrapperSingle:"wrapper--single",wrapperActive:"wrapper--active",gridInput:"grid-input",inputSingle:"input--single",inputIcon:"input--icon",inputWrap:"input-wrap",inputWrapSingle:"input-wrap--single",iconEnd:"icon-end",iconStart:"icon-start",list:"list",listHide:"list--hide"},n="combobox",c={validationMessage:"comboboxValidationMessage",item:e=>`${n}-item-${e}`,chip:e=>`${n}-chip-${e}`,label:e=>`${n}-label-${e}`,listbox:e=>`${n}-listbox-${e}`,input:e=>`${n}-input-${e}`},a={chevronUp:"chevron-up",chevronDown:"chevron-down"},s={labelContent:"label-content"};export{i as a,l as b,t as c,o as d,c as e,a as f,s as g};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{d as t}from"./
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{d as t}from"./VYFT5EAY.js";import{a as y,b as I}from"./NSBK36H4.js";import{a as v}from"./NULQJBCW.js";import{a as B}from"./LH7245HX.js";import{a as k}from"./WOTQIMPZ.js";import"./B5JXPZDV.js";import"./3YZG7MA3.js";import"./CIU4VM7X.js";import{e as w}from"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{B as h,C as f,D as m,E as g,P as $,g as u,h as d,l as b,o as a}from"./AUIOWPFN.js";var O={backButton:"back-button"},S={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",footerEnd:"footer-end",footerStart:"footer-start"},z=u`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{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-icon-color: var(--calcite-flow-icon-color);--calcite-panel-space: var(--calcite-flow-space)}:host([hidden]){display:none}[hidden]{display:none}`,p=class extends m{constructor(){super(...arguments),this.backButtonRef=h(),this.containerRef=h(),this.messages=B(),this.focusSetter=k()(this),this.closable=!1,this.closed=!1,this.collapseDirection="down",this.collapsed=!1,this.collapsible=!1,this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.menuOpen=!1,this.overlayPositioning="absolute",this.scale="m",this.selected=!1,this.showBackButton=!1,this.calciteFlowItemBack=a(),this.calciteFlowItemClose=a({cancelable:!1}),this.calciteFlowItemCollapse=a({cancelable:!1}),this.calciteFlowItemExpand=a({cancelable:!1}),this.calciteFlowItemScroll=a({cancelable:!1}),this.calciteFlowItemToggle=a({cancelable:!1}),this.calciteInternalFlowItemChange=a({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}],icon:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],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=z}async scrollContentTo(e){await this.containerRef.value?.scrollContentTo(e)}async setFocus(e){return this.focusSetter(()=>this.backButtonRef.value||this.containerRef.value,e)}willUpdate(e){e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.calciteInternalFlowItemChange.emit(),e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calciteFlowItemCollapse.emit():this.calciteFlowItemExpand.emit())}updated(){y(this)}handleInternalPanelScroll(e){e.target===this.containerRef.value&&(e.stopPropagation(),this.calciteFlowItemScroll.emit())}handleInternalPanelClose(e){e.target===this.containerRef.value&&(e.stopPropagation(),this.closed=!0,this.calciteFlowItemClose.emit())}handleInternalPanelToggle(e){e.target===this.containerRef.value&&(e.stopPropagation(),this.collapsed=e.target.collapsed,this.calciteFlowItemToggle.emit())}backButtonClick(){this.calciteFlowItemBack.emit()}renderBackButton(){let{el:e}=this,r=w(e)==="rtl",{showBackButton:i,backButtonClick:n,messages:s}=this,l=s.back,c=r?S.backRight:S.backLeft;return i?v("flow-back-button",d`<calcite-action .ariaLabel=${l} class=${g(O.backButton)} .icon=${c} @click=${n} scale=s slot=${o.headerActionsStart} .text=${l} title=${l??b} ${f(this.backButtonRef)}></calcite-action>`):null}render(){let{collapsed:e,collapseDirection:r,collapsible:i,closable:n,closed:s,description:l,disabled:c,heading:C,headingLevel:x,loading:F,menuOpen:R,messages:P,overlayPositioning:T,beforeClose:E,icon:A,iconFlipRtl:L}=this;return I({disabled:c,children:d`<calcite-panel .beforeClose=${E} .closable=${n} .closed=${s} .collapseDirection=${r} .collapsed=${e} .collapsible=${i} .description=${l} .disabled=${c} .heading=${C} .headingLevel=${x} .icon=${A} .iconFlipRtl=${L} .loading=${F} .menuOpen=${R} .messageOverrides=${P} @calcitePanelClose=${this.handleInternalPanelClose} @calcitePanelScroll=${this.handleInternalPanelScroll} @calcitePanelToggle=${this.handleInternalPanelToggle} .overlayPositioning=${T} .scale=${this.scale} ${f(this.containerRef)}>${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></slot></calcite-panel>`})}};$("calcite-flow-item",p);export{p 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
|
-
v5.0.0-next.
|
|
4
|
-
import{a as g,b as h,e as O,f as W,k as x,l as b,n as y,o as F,q as p}from"./CDLGLCFD.js";import{k as d}from"./RUMWLVIQ.js";import{h as I,i as P,j as A}from"./U5ZHIRE4.js";import{a as u}from"./2DX2SAQ7.js";import{i as S,k as R}from"./Z6CRZOOK.js";import"./XRJOD24G.js";import{A as z,B as m,C as v,D as Y,E as r,P as w,g as D,h as l,l as $,o as C}from"./CSQVLDPF.js";var E=D`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:block}.header{display:flex;block-size:100%;align-items:center;justify-content:space-between}.chevron-container{display:flex;align-items:center}:host([scale=s]){block-size:24px;margin:var(--calcite-spacing-xs);margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .chevron-container,:host([scale=s]) .chevron{min-inline-size:24px;block-size:24px}:host([scale=m]){block-size:32px;margin:var(--calcite-spacing-sm);margin-inline-start:var(--calcite-spacing-sm-plus)}:host([scale=m]) .chevron-container,:host([scale=m]) .chevron{min-inline-size:32px;block-size:32px;--calcite-internal-action-padding-block: var(--calcite-spacing-xxs)}:host([scale=l]){block-size:44px;margin:var(--calcite-spacing-xs);margin-inline-start:var(--calcite-spacing-sm)}:host([scale=l]) .chevron-container,:host([scale=l]) .chevron{min-inline-size:44px;block-size:44px;--calcite-internal-action-padding-block: var(--calcite-spacing-sm-plus)}.chevron{box-sizing:content-box;display:flex;block-size:100%;inline-size:100%;flex-grow:0;cursor:pointer;align-items:center;justify-content:center;border-style:none;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;outline-color:transparent;--calcite-internal-action-padding-block: 0;--calcite-action-background-color: var(--calcite-date-picker-header-action-background-color);--calcite-action-background-color-hover: var(--calcite-date-picker-header-action-background-color-hover);--calcite-action-background-color-press: var(--calcite-date-picker-header-action-background-color-press);--calcite-action-text-color: var(--calcite-date-picker-header-action-text-color);--calcite-action-text-color-press: var(--calcite-date-picker-header-action-text-color-press)}.chevron:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.chevron[aria-disabled=true]{pointer-events:none}.month-year-container{display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;align-items:center;justify-content:flex-start;text-align:center;line-height:1;gap:var(--calcite-spacing-xxs)}.month-year-container.range-calendar{justify-content:center}.year-container{position:relative;display:flex;block-size:100%}.suffix{display:flex;align-items:center}.year,.suffix{margin-inline:var(--calcite-spacing-xxs);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-date-picker-year-text-color, var(--calcite-color-text-1));font-size:var(--calcite-font-size-md);line-height:var(--calcite-font-line-height-fixed-lg)}.year{position:relative;display:inline-block;border-style:none;background-color:transparent;text-align:center;font-family:inherit;outline-color:transparent;inline-size:44px}.year:hover{transition-timing-function:cubic-bezier(.4,0,.2,1);transition-property:outline-color;outline:2px solid var(--calcite-color-border-2);outline-offset:-2px}.year:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.month-select{--calcite-select-internal-border-width: 0;--calcite-select-internal-icon-border-inline-end-width: 0;--calcite-select-spacing-inline: var(--calcite-spacing-xxs);--calcite-select-font-size: var(--calcite-date-picker-month-select-font-size, var(--calcite-font-size-md));--calcite-select-text-color: var(--calcite-date-picker-month-select-text-color, var(--calcite-color-text-1));--calcite-select-icon-color: var(--calcite-date-picker-month-select-icon-color);--calcite-select-icon-color-hover: var(--calcite-date-picker-month-select-icon-color-hover);--calcite-internal-select-spacing-block: var(--calcite-spacing-xxs);--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-xxs);--calcite-internal-select-line-height: var(--calcite-font-line-height-fixed-lg);--calcite-internal-select-font-weight: var(--calcite-font-weight-medium)}:host([scale=s]) .month-year-container .month-select{--calcite-select-spacing-inline: var(--calcite-spacing-base);--calcite-select-font-size: var(--calcite-date-picker-month-select-font-size, var(--calcite-font-size));--calcite-internal-select-spacing-block: var(--calcite-spacing-base);--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-base);--calcite-internal-select-block-size: 24px;--calcite-internal-select-line-height: var(--calcite-font-line-height-fixed-base)}:host([scale=s]) .month-year-container .year{inline-size:40px}:host([scale=s]) .month-year-container .year,:host([scale=s]) .month-year-container .suffix{font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-fixed-base)}:host([scale=l]) .month-year-container .month-select{--calcite-select-spacing-inline: var(--calcite-spacing-sm);--calcite-select-font-size: var(--calcite-date-picker-month-select-font-size, var(--calcite-font-size-lg));--calcite-internal-select-spacing-block: var(--calcite-spacing-sm);--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-sm);--calcite-internal-select-block-size: 44px;--calcite-internal-select-line-height: var(--calcite-font-line-height-fixed-xl)}:host([scale=l]) .month-year-container .year{inline-size:48px}:host([scale=l]) .month-year-container .year,:host([scale=l]) .month-year-container .suffix{font-size:var(--calcite-font-size-lg);line-height:var(--calcite-font-line-height-fixed-xl)}:host([hidden]){display:none}[hidden]{display:none}`,s={header:"header",chevron:"chevron",chevronContainer:"chevron-container",monthYearContainer:"month-year-container",monthPicker:"month-select",rangeCalendar:"range-calendar",suffix:"suffix",yearContainer:"year-container",year:"year"},N={chevronLeft:"chevron-left",chevronRight:"chevron-right"},K=16,k=class extends Y{constructor(){super(...arguments),this.monthPickerRef=m(),this.nextMonthActionRef=m(),this.prevMonthActionRef=m(),this.yearInputRef=m(),this.calciteInternalDatePickerMonthHeaderSelectChange=C({cancelable:!1})}static{this.properties={nextMonthDate:[16,{},{state:!0}],prevMonthDate:[16,{},{state:!0}],activeDate:[0,{},{attribute:!1}],headingLevel:[9,{},{type:Number}],localeData:[0,{},{attribute:!1}],max:[0,{},{attribute:!1}],messages:[0,{},{attribute:!1}],min:[0,{},{attribute:!1}],monthStyle:1,position:1,scale:[3,{},{reflect:!0}],selectedDate:[0,{},{attribute:!1}]}}static{this.styles=E}connectedCallback(){super.connectedCallback(),this.setNextPrevMonthDates()}load(){this.parentDatePickerEl=R(this.el,"calcite-date-picker")}willUpdate(e){this.hasUpdated&&(e.has("activeDate")||e.has("localeData"))&&this.setYearSelectMenuWidth(),this.hasUpdated&&e.has("scale")&&this.setYearSelectWidthOffset(),(e.has("min")||e.has("max")||e.has("activeDate"))&&this.setNextPrevMonthDates()}loaded(){this.setYearSelectWidthOffset()}setNextPrevMonthDates(){this.activeDate&&(this.nextMonthDate=h(y(this.activeDate),this.min,this.max),this.prevMonthDate=h(x(this.activeDate),this.min,this.max))}onYearKey(e){let t=this.parseCalendarYear(e.target.value);switch(e.key){case"ArrowDown":e.preventDefault(),this.setYear({localizedYear:t,offset:-1});break;case"ArrowUp":e.preventDefault(),this.setYear({localizedYear:t,offset:1});break}}formatCalendarYear(e){return d.localize(`${W(e,this.localeData)}`)}parseCalendarYear(e){return d.localize(`${O(Number(d.delocalize(e)),this.localeData)}`)}onYearChange(e){this.setYear({localizedYear:this.parseCalendarYear(e.target.value)})}onYearInput(e){this.setYear({localizedYear:this.parseCalendarYear(e.target.value),commit:!1})}prevMonthClick(e){this.handleArrowClick(e,this.prevMonthDate)}prevMonthKeydown(e){u(e.key)&&this.prevMonthClick(e)}nextMonthClick(e){this.handleArrowClick(e,this.nextMonthDate)}nextMonthKeydown(e){u(e.key)&&this.nextMonthClick(e)}async handleArrowClick(e,t){e.preventDefault(),await this.handlePenultimateValidMonth(e),this.calciteInternalDatePickerMonthHeaderSelectChange.emit(t)}handleMonthChange(e){let t=e.target,{abbreviated:a,wide:n}=this.localeData.months,i=(this.monthStyle==="wide"?n:a).indexOf(t.value),o=b(this.activeDate,i);g(o,this.min,this.max)||(o=h(o,this.min,this.max)),this.calciteInternalDatePickerMonthHeaderSelectChange.emit(o),this.setYearSelectMenuWidth()}getInRangeDate({localizedYear:e,offset:t=0}){let{min:a,max:n,activeDate:c}=this,i=Number(d.delocalize(e)),o=i.toString().length,f=isNaN(i)?!1:i+t,L=f&&(!a||a.getFullYear()<=f)&&(!n||n.getFullYear()>=f);if(f&&L&&o===e.length){let M=new Date(c);return M.setFullYear(f),h(M,a,n)}}setYear({localizedYear:e,commit:t=!0,offset:a=0}){let{yearInputRef:n,activeDate:c}=this,i=this.getInRangeDate({localizedYear:e,offset:a});i&&this.calciteInternalDatePickerMonthHeaderSelectChange.emit(i),t&&(n.value.value=this.formatCalendarYear((i||c).getFullYear()))}setYearSelectWidthOffset(){this.yearSelectWidthOffset=K+3*parseInt(this.getYearSelectPadding()),this.setYearSelectMenuWidth()}setYearSelectMenuWidth(){let e=this.monthPickerRef.value;e&&requestAnimationFrame(()=>{let t=getComputedStyle(e),a=`${t.fontStyle} ${t.fontVariant} ${t.fontWeight} ${t.fontSize}/${t.lineHeight} ${t.fontFamily}`,c=this.localeData.months[this.monthStyle][this.activeDate.getMonth()],i=Math.ceil(S(c,a));e.style.width=`${i+this.yearSelectWidthOffset}px`})}isMonthInRange(e){let t=b(this.activeDate,e);return!this.min&&!this.max||g(t,this.min,this.max)?!0:p(t,this.max)||p(t,this.min)}async handlePenultimateValidMonth(e){let n=e.target.getAttribute("data-direction")==="left",c;if(n&&this.min){let i=h(x(this.activeDate),this.min,this.max);c=p(i,this.min)}else if(this.max){let i=h(y(this.activeDate),this.min,this.max);c=p(i,this.max)}if(c)if(this.position)this.yearInputRef.value?.focus();else{let o=(n?this.nextMonthActionRef:this.prevMonthActionRef).value;if(!o)return;o.disabled=!1,await o.setFocus()}}getPx(e){let t=Number(e.replace(/[rem|px]/g,"")),a=16;return e.includes("rem")?`${t*a}px`:`${t}px`}getYearSelectPadding(){let e;switch(this.scale){case"l":e=A;break;case"s":e=I;break;default:e=P;break}return this.getPx(e)}render(){return l`<div class=${r(s.header)}>${this.renderContent()}</div>`}renderContent(){let{localeData:e,activeDate:t}=this;if(!t||!e)return null;if(this.parentDatePickerEl){let{numberingSystem:c,lang:i}=this.parentDatePickerEl;d.numberFormatOptions={useGrouping:!1,...c&&{numberingSystem:c},...i&&{locale:i}}}let a=F(e.unitOrder),n=a.indexOf("y")<a.indexOf("m");return l`${this.position&&l`<div class=${r({[s.chevronContainer]:!0})}>${this.position==="start"&&this.renderChevron("left")||""}</div>`||""}<div class=${r({[s.monthYearContainer]:!0,[s.rangeCalendar]:!!this.position})}>${this.renderMonthYearContainer(n)}</div>${!this.position&&l`<div class=${r({[s.chevronContainer]:!0})}>${this.renderChevron("left")}</div>`||""}<div class=${r({[s.chevronContainer]:!0})}>${this.position!=="start"&&this.renderChevron("right")||""}</div>`}renderMonthYearContainer(e){return e?[this.renderYearInput(),this.renderMonthPicker()]:[this.renderMonthPicker(),this.renderYearInput()]}renderMonthPicker(){let e=this.activeDate.getMonth(),t=this.localeData.months[this.monthStyle];return l`<calcite-select class=${r(s.monthPicker)} .label=${this.messages.monthMenu} @calciteSelectChange=${this.handleMonthChange} width=auto ${v(this.monthPickerRef)}>${t.map((a,n)=>l`<calcite-option .disabled=${!this.isMonthInRange(n)} .selected=${n===e} .value=${a}>${a}</calcite-option>`)}</calcite-select>`}renderYearInput(){let e=this.localeData.year?.suffix,t=this.formatCalendarYear(this.activeDate.getFullYear());return l`<span class=${r(s.yearContainer)}><input .ariaLabel=${this.messages.year} class=${r({[s.year]:!0})} inputmode=numeric maxlength=4 minlength=1 @change=${this.onYearChange} @input=${this.onYearInput} @keydown=${this.onYearKey} pattern=\\d* type=text .value=${z(t??"")} ${v(this.yearInputRef)}>${e&&l`<span class=${r(s.suffix)}>${e}</span>`||""}</span>`}renderChevron(e){let t=e==="right",a=p(t?this.nextMonthDate:this.prevMonthDate,this.activeDate)||!g(this.activeDate,this.min,this.max);return l`<calcite-action alignment=center .ariaDisabled=${a} .ariaLabel=${t?this.messages.nextMonth:this.messages.prevMonth} class=${r(s.chevron)} compact data-direction=${e??$} .disabled=${a} .icon=${t?N.chevronRight:N.chevronLeft} icon-flip-rtl @click=${t?this.nextMonthClick:this.prevMonthClick} @keydown=${t?this.nextMonthKeydown:this.prevMonthKeydown} role=button .scale=${this.scale==="l"?"l":"m"} .text=${t?this.messages.nextMonth:this.messages.prevMonth} ${v(t?this.nextMonthActionRef:this.prevMonthActionRef)}></calcite-action>`}};w("calcite-date-picker-month-header",k);export{k as DatePickerMonthHeader};
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{a as g,b as h,e as O,f as W,k as x,l as b,n as y,o as F,q as p}from"./2HKRJLBG.js";import{k as d}from"./CVLFEMH2.js";import{h as I,i as P,j as A}from"./FZIUTVKD.js";import{a as u}from"./S5CLKCGJ.js";import{i as S,k as R}from"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{A as z,B as m,C as v,D as Y,E as r,P as w,g as D,h as l,l as $,o as C}from"./AUIOWPFN.js";var E=D`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:block}.header{display:flex;block-size:100%;align-items:center;justify-content:space-between}.chevron-container{display:flex;align-items:center}:host([scale=s]){block-size:24px;margin:var(--calcite-spacing-xs);margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .chevron-container,:host([scale=s]) .chevron{min-inline-size:24px;block-size:24px}:host([scale=m]){block-size:32px;margin:var(--calcite-spacing-sm);margin-inline-start:var(--calcite-spacing-sm-plus)}:host([scale=m]) .chevron-container,:host([scale=m]) .chevron{min-inline-size:32px;block-size:32px;--calcite-internal-action-padding-block: var(--calcite-spacing-xxs)}:host([scale=l]){block-size:44px;margin:var(--calcite-spacing-xs);margin-inline-start:var(--calcite-spacing-sm)}:host([scale=l]) .chevron-container,:host([scale=l]) .chevron{min-inline-size:44px;block-size:44px;--calcite-internal-action-padding-block: var(--calcite-spacing-sm-plus)}.chevron{box-sizing:content-box;display:flex;block-size:100%;inline-size:100%;flex-grow:0;cursor:pointer;align-items:center;justify-content:center;border-style:none;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;outline-color:transparent;--calcite-internal-action-padding-block: 0;--calcite-action-background-color: var(--calcite-date-picker-header-action-background-color);--calcite-action-background-color-hover: var(--calcite-date-picker-header-action-background-color-hover);--calcite-action-background-color-press: var(--calcite-date-picker-header-action-background-color-press);--calcite-action-text-color: var(--calcite-date-picker-header-action-text-color);--calcite-action-text-color-press: var(--calcite-date-picker-header-action-text-color-press)}.chevron:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.chevron[aria-disabled=true]{pointer-events:none}.month-year-container{display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;align-items:center;justify-content:flex-start;text-align:center;line-height:1;gap:var(--calcite-spacing-xxs)}.month-year-container.range-calendar{justify-content:center}.year-container{position:relative;display:flex;block-size:100%}.suffix{display:flex;align-items:center}.year,.suffix{margin-inline:var(--calcite-spacing-xxs);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-date-picker-year-text-color, var(--calcite-color-text-1));font-size:var(--calcite-font-size-md);line-height:var(--calcite-font-line-height-fixed-lg)}.year{position:relative;display:inline-block;border-style:none;background-color:transparent;text-align:center;font-family:inherit;outline-color:transparent;inline-size:44px}.year:hover{transition-timing-function:cubic-bezier(.4,0,.2,1);transition-property:outline-color;outline:2px solid var(--calcite-color-border-2);outline-offset:-2px}.year:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.month-select{--calcite-select-internal-border-width: 0;--calcite-select-internal-icon-border-inline-end-width: 0;--calcite-select-spacing-inline: var(--calcite-spacing-xxs);--calcite-select-font-size: var(--calcite-date-picker-month-select-font-size, var(--calcite-font-size-md));--calcite-select-text-color: var(--calcite-date-picker-month-select-text-color, var(--calcite-color-text-1));--calcite-select-icon-color: var(--calcite-date-picker-month-select-icon-color);--calcite-select-icon-color-hover: var(--calcite-date-picker-month-select-icon-color-hover);--calcite-internal-select-spacing-block: var(--calcite-spacing-xxs);--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-xxs);--calcite-internal-select-line-height: var(--calcite-font-line-height-fixed-lg);--calcite-internal-select-font-weight: var(--calcite-font-weight-medium)}:host([scale=s]) .month-year-container .month-select{--calcite-select-spacing-inline: var(--calcite-spacing-base);--calcite-select-font-size: var(--calcite-date-picker-month-select-font-size, var(--calcite-font-size));--calcite-internal-select-spacing-block: var(--calcite-spacing-base);--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-base);--calcite-internal-select-block-size: 24px;--calcite-internal-select-line-height: var(--calcite-font-line-height-fixed-base)}:host([scale=s]) .month-year-container .year{inline-size:40px}:host([scale=s]) .month-year-container .year,:host([scale=s]) .month-year-container .suffix{font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-fixed-base)}:host([scale=l]) .month-year-container .month-select{--calcite-select-spacing-inline: var(--calcite-spacing-sm);--calcite-select-font-size: var(--calcite-date-picker-month-select-font-size, var(--calcite-font-size-lg));--calcite-internal-select-spacing-block: var(--calcite-spacing-sm);--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-sm);--calcite-internal-select-block-size: 44px;--calcite-internal-select-line-height: var(--calcite-font-line-height-fixed-xl)}:host([scale=l]) .month-year-container .year{inline-size:48px}:host([scale=l]) .month-year-container .year,:host([scale=l]) .month-year-container .suffix{font-size:var(--calcite-font-size-lg);line-height:var(--calcite-font-line-height-fixed-xl)}:host([hidden]){display:none}[hidden]{display:none}`,s={header:"header",chevron:"chevron",chevronContainer:"chevron-container",monthYearContainer:"month-year-container",monthPicker:"month-select",rangeCalendar:"range-calendar",suffix:"suffix",yearContainer:"year-container",year:"year"},N={chevronLeft:"chevron-left",chevronRight:"chevron-right"},K=16,k=class extends Y{constructor(){super(...arguments),this.monthPickerRef=m(),this.nextMonthActionRef=m(),this.prevMonthActionRef=m(),this.yearInputRef=m(),this.calciteInternalDatePickerMonthHeaderSelectChange=C({cancelable:!1})}static{this.properties={nextMonthDate:[16,{},{state:!0}],prevMonthDate:[16,{},{state:!0}],activeDate:[0,{},{attribute:!1}],headingLevel:[9,{},{type:Number}],localeData:[0,{},{attribute:!1}],max:[0,{},{attribute:!1}],messages:[0,{},{attribute:!1}],min:[0,{},{attribute:!1}],monthStyle:1,position:1,scale:[3,{},{reflect:!0}],selectedDate:[0,{},{attribute:!1}]}}static{this.styles=E}connectedCallback(){super.connectedCallback(),this.setNextPrevMonthDates()}load(){this.parentDatePickerEl=R(this.el,"calcite-date-picker")}willUpdate(e){this.hasUpdated&&(e.has("activeDate")||e.has("localeData"))&&this.setYearSelectMenuWidth(),this.hasUpdated&&e.has("scale")&&this.setYearSelectWidthOffset(),(e.has("min")||e.has("max")||e.has("activeDate"))&&this.setNextPrevMonthDates()}loaded(){this.setYearSelectWidthOffset()}setNextPrevMonthDates(){this.activeDate&&(this.nextMonthDate=h(y(this.activeDate),this.min,this.max),this.prevMonthDate=h(x(this.activeDate),this.min,this.max))}onYearKey(e){let t=this.parseCalendarYear(e.target.value);switch(e.key){case"ArrowDown":e.preventDefault(),this.setYear({localizedYear:t,offset:-1});break;case"ArrowUp":e.preventDefault(),this.setYear({localizedYear:t,offset:1});break}}formatCalendarYear(e){return d.localize(`${W(e,this.localeData)}`)}parseCalendarYear(e){return d.localize(`${O(Number(d.delocalize(e)),this.localeData)}`)}onYearChange(e){this.setYear({localizedYear:this.parseCalendarYear(e.target.value)})}onYearInput(e){this.setYear({localizedYear:this.parseCalendarYear(e.target.value),commit:!1})}prevMonthClick(e){this.handleArrowClick(e,this.prevMonthDate)}prevMonthKeydown(e){u(e.key)&&this.prevMonthClick(e)}nextMonthClick(e){this.handleArrowClick(e,this.nextMonthDate)}nextMonthKeydown(e){u(e.key)&&this.nextMonthClick(e)}async handleArrowClick(e,t){e.preventDefault(),await this.handlePenultimateValidMonth(e),this.calciteInternalDatePickerMonthHeaderSelectChange.emit(t)}handleMonthChange(e){let t=e.target,{abbreviated:a,wide:n}=this.localeData.months,i=(this.monthStyle==="wide"?n:a).indexOf(t.value),o=b(this.activeDate,i);g(o,this.min,this.max)||(o=h(o,this.min,this.max)),this.calciteInternalDatePickerMonthHeaderSelectChange.emit(o),this.setYearSelectMenuWidth()}getInRangeDate({localizedYear:e,offset:t=0}){let{min:a,max:n,activeDate:c}=this,i=Number(d.delocalize(e)),o=i.toString().length,f=isNaN(i)?!1:i+t,L=f&&(!a||a.getFullYear()<=f)&&(!n||n.getFullYear()>=f);if(f&&L&&o===e.length){let M=new Date(c);return M.setFullYear(f),h(M,a,n)}}setYear({localizedYear:e,commit:t=!0,offset:a=0}){let{yearInputRef:n,activeDate:c}=this,i=this.getInRangeDate({localizedYear:e,offset:a});i&&this.calciteInternalDatePickerMonthHeaderSelectChange.emit(i),t&&(n.value.value=this.formatCalendarYear((i||c).getFullYear()))}setYearSelectWidthOffset(){this.yearSelectWidthOffset=K+3*parseInt(this.getYearSelectPadding()),this.setYearSelectMenuWidth()}setYearSelectMenuWidth(){let e=this.monthPickerRef.value;e&&requestAnimationFrame(()=>{let t=getComputedStyle(e),a=`${t.fontStyle} ${t.fontVariant} ${t.fontWeight} ${t.fontSize}/${t.lineHeight} ${t.fontFamily}`,c=this.localeData.months[this.monthStyle][this.activeDate.getMonth()],i=Math.ceil(S(c,a));e.style.width=`${i+this.yearSelectWidthOffset}px`})}isMonthInRange(e){let t=b(this.activeDate,e);return!this.min&&!this.max||g(t,this.min,this.max)?!0:p(t,this.max)||p(t,this.min)}async handlePenultimateValidMonth(e){let n=e.target.getAttribute("data-direction")==="left",c;if(n&&this.min){let i=h(x(this.activeDate),this.min,this.max);c=p(i,this.min)}else if(this.max){let i=h(y(this.activeDate),this.min,this.max);c=p(i,this.max)}if(c)if(this.position)this.yearInputRef.value?.focus();else{let o=(n?this.nextMonthActionRef:this.prevMonthActionRef).value;if(!o)return;o.disabled=!1,await o.setFocus()}}getPx(e){let t=Number(e.replace(/[rem|px]/g,"")),a=16;return e.includes("rem")?`${t*a}px`:`${t}px`}getYearSelectPadding(){let e;switch(this.scale){case"l":e=A;break;case"s":e=I;break;default:e=P;break}return this.getPx(e)}render(){return l`<div class=${r(s.header)}>${this.renderContent()}</div>`}renderContent(){let{localeData:e,activeDate:t}=this;if(!t||!e)return null;if(this.parentDatePickerEl){let{numberingSystem:c,lang:i}=this.parentDatePickerEl;d.numberFormatOptions={useGrouping:!1,...c&&{numberingSystem:c},...i&&{locale:i}}}let a=F(e.unitOrder),n=a.indexOf("y")<a.indexOf("m");return l`${this.position&&l`<div class=${r({[s.chevronContainer]:!0})}>${this.position==="start"&&this.renderChevron("left")||""}</div>`||""}<div class=${r({[s.monthYearContainer]:!0,[s.rangeCalendar]:!!this.position})}>${this.renderMonthYearContainer(n)}</div>${!this.position&&l`<div class=${r({[s.chevronContainer]:!0})}>${this.renderChevron("left")}</div>`||""}<div class=${r({[s.chevronContainer]:!0})}>${this.position!=="start"&&this.renderChevron("right")||""}</div>`}renderMonthYearContainer(e){return e?[this.renderYearInput(),this.renderMonthPicker()]:[this.renderMonthPicker(),this.renderYearInput()]}renderMonthPicker(){let e=this.activeDate.getMonth(),t=this.localeData.months[this.monthStyle];return l`<calcite-select class=${r(s.monthPicker)} .label=${this.messages.monthMenu} @calciteSelectChange=${this.handleMonthChange} width=auto ${v(this.monthPickerRef)}>${t.map((a,n)=>l`<calcite-option .disabled=${!this.isMonthInRange(n)} .selected=${n===e} .value=${a}>${a}</calcite-option>`)}</calcite-select>`}renderYearInput(){let e=this.localeData.year?.suffix,t=this.formatCalendarYear(this.activeDate.getFullYear());return l`<span class=${r(s.yearContainer)}><input .ariaLabel=${this.messages.year} class=${r({[s.year]:!0})} inputmode=numeric maxlength=4 minlength=1 @change=${this.onYearChange} @input=${this.onYearInput} @keydown=${this.onYearKey} pattern=\\d* type=text .value=${z(t??"")} ${v(this.yearInputRef)}>${e&&l`<span class=${r(s.suffix)}>${e}</span>`||""}</span>`}renderChevron(e){let t=e==="right",a=p(t?this.nextMonthDate:this.prevMonthDate,this.activeDate)||!g(this.activeDate,this.min,this.max);return l`<calcite-action alignment=center .ariaDisabled=${a} .ariaLabel=${t?this.messages.nextMonth:this.messages.prevMonth} class=${r(s.chevron)} compact data-direction=${e??$} .disabled=${a} .icon=${t?N.chevronRight:N.chevronLeft} icon-flip-rtl @click=${t?this.nextMonthClick:this.prevMonthClick} @keydown=${t?this.nextMonthKeydown:this.prevMonthKeydown} role=button .scale=${this.scale==="l"?"l":"m"} .text=${t?this.messages.nextMonth:this.messages.prevMonth} ${v(t?this.nextMonthActionRef:this.prevMonthActionRef)}></calcite-action>`}};w("calcite-date-picker-month-header",k);export{k as DatePickerMonthHeader};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
4
|
function e(r){return r.map(o=>{let t="";for(let n=0;n<o;n++)t+=((1+Math.random())*65536|0).toString(16).substring(1);return t}).join("-")}var i=()=>e([2,1,1,1,3]);export{i as a};
|