@esri/calcite-components 5.0.0-next.3 → 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/{VBT5FAGS.js → 2GG4AF5T.js} +1 -1
- package/dist/calcite/{LSTKQGBO.js → 2HKRJLBG.js} +2 -2
- package/dist/calcite/{MEERCHNE.js → 2IWOXJH7.js} +2 -2
- package/dist/calcite/{RQU4NRTA.js → 2KH3AUCG.js} +2 -2
- package/dist/calcite/{KIGAOJGV.js → 2VKJIYLT.js} +1 -1
- package/dist/calcite/{KZSABN6Z.js → 2YBCAJSV.js} +2 -2
- package/dist/calcite/{QDR7A47F.js → 3266GV6Z.js} +2 -2
- package/dist/calcite/{FQH6NA2N.js → 3HXEF55M.js} +2 -2
- package/dist/calcite/{J3FSCDUX.js → 3KUVOQAL.js} +2 -2
- package/dist/calcite/{AYEIZT5Y.js → 3NOZ7M75.js} +2 -2
- package/dist/calcite/{JW4SOJWB.js → 3YZG7MA3.js} +2 -2
- package/dist/calcite/{GPIMJEMU.js → 45F6XOYY.js} +2 -2
- package/dist/calcite/{SKKSLFHT.js → 4ARTWEEZ.js} +2 -2
- package/dist/calcite/4GHB4NY4.js +4 -0
- package/dist/calcite/{2FBU6T3T.js → 4JZMONLD.js} +2 -2
- package/dist/calcite/{2OBK2KGK.js → 5AL5GWRD.js} +2 -2
- package/dist/calcite/{SLICSH62.js → 5IPJANUU.js} +2 -2
- package/dist/calcite/{SN7NAXJ7.js → 5K2Z2TMW.js} +2 -2
- package/dist/calcite/{CNF3Q4TX.js → 5LAPR75M.js} +2 -2
- package/dist/calcite/{BGDALDXM.js → 62OUMNJ6.js} +2 -2
- package/dist/calcite/{XXYGNCPD.js → 67HVFNHP.js} +2 -2
- package/dist/calcite/{HXDER6NO.js → 6J5W2PAJ.js} +2 -2
- package/dist/calcite/{S5TFXGHY.js → 6VPACZP5.js} +2 -2
- package/dist/calcite/{VGOGYBOG.js → 6VQ5IL36.js} +2 -2
- package/dist/calcite/{6RQZN7N2.js → 73LRFHS4.js} +2 -2
- package/dist/calcite/{JXRRZQUL.js → 7DTG5KDL.js} +2 -2
- package/dist/calcite/{OT4HMOKY.js → 7IHVHMIY.js} +2 -2
- package/dist/calcite/{MIR3A75I.js → 7IYAKB7Q.js} +2 -2
- package/dist/calcite/{GT3B6N5Y.js → 7NUC3WBG.js} +1 -1
- package/dist/calcite/{PSYXUHRF.js → 7PFVW4JF.js} +1 -1
- package/dist/calcite/{WRVSFB7L.js → 7QP5BUGE.js} +2 -2
- package/dist/calcite/{FXAVGIBO.js → 7XJU5OTS.js} +2 -2
- package/dist/calcite/{35QUJIVR.js → 7ZNR3GNI.js} +2 -2
- package/dist/calcite/{6BL35Y24.js → A4CO6B7Z.js} +2 -2
- package/dist/calcite/{OBEAWB6Y.js → AHOXXRX5.js} +2 -2
- package/dist/calcite/{RSQ6RL3K.js → ALDDSDTX.js} +1 -1
- package/dist/calcite/{DY2XHFEN.js → APIFFM3O.js} +2 -2
- package/dist/calcite/{PO2U44AW.js → AQ4DKRX6.js} +2 -2
- package/dist/calcite/{BCBU5ZR6.js → AUF6YLAM.js} +2 -2
- package/dist/calcite/{ALOAVLGK.js → AUIOWPFN.js} +2 -2
- package/dist/calcite/{UXWFYSWM.js → B5JXPZDV.js} +2 -2
- package/dist/calcite/{6RMUSGEC.js → BE5OB2TH.js} +2 -2
- package/dist/calcite/{UTGJTZUE.js → BEUZYBM5.js} +3 -3
- package/dist/calcite/{WWH2YWKG.js → BFINWHLX.js} +2 -2
- package/dist/calcite/{KGALTIIM.js → BHBYSC5H.js} +2 -2
- package/dist/calcite/{S5R35RX3.js → BHU252WA.js} +2 -2
- package/dist/calcite/{6UGLHCRO.js → BNKVQYLQ.js} +2 -2
- package/dist/calcite/{JDVZQ6HH.js → BYZPKQRD.js} +2 -2
- package/dist/calcite/{EWPZP6OD.js → C2X6VADY.js} +2 -2
- package/dist/calcite/{XYJQXYRM.js → C3BQ4W7K.js} +2 -2
- package/dist/calcite/{QP5GAAB3.js → C4S2BOWK.js} +2 -2
- package/dist/calcite/{BVHWNNF7.js → CF6DTFNX.js} +2 -2
- package/dist/calcite/{P2RYGBBZ.js → CIU4VM7X.js} +2 -2
- package/dist/calcite/{WVP5XPLP.js → CJWGQETT.js} +2 -2
- package/dist/calcite/{YG7PWF3G.js → CQMVTE7J.js} +2 -2
- package/dist/calcite/{VFZYB7KV.js → CTLGVBKW.js} +2 -2
- package/dist/calcite/{QTBEVUXO.js → CUL3VHSD.js} +2 -2
- package/dist/calcite/{I2EB746H.js → CVLFEMH2.js} +2 -2
- package/dist/calcite/{2U5DG73Y.js → DDW4WTS2.js} +2 -2
- package/dist/calcite/{GTQBX3SK.js → DDXY7TRY.js} +2 -2
- package/dist/calcite/{57WVJI5D.js → DJVVGNTK.js} +1 -1
- package/dist/calcite/{777CURPL.js → DOH3ZW2R.js} +2 -2
- package/dist/calcite/{ICWMT556.js → DONAES6Q.js} +2 -2
- package/dist/calcite/{52U5HSRZ.js → DSEMLW7Z.js} +2 -2
- package/dist/calcite/{4IBSL24S.js → DZWPXJWV.js} +2 -2
- package/dist/calcite/{ZN5NGGVV.js → F6EDNLSI.js} +2 -2
- package/dist/calcite/{3GUK3G7C.js → FZIUTVKD.js} +1 -1
- package/dist/calcite/{XRAT3TME.js → GE7SQF7S.js} +2 -2
- package/dist/calcite/{ZTZGAKAG.js → GUT2GKDG.js} +2 -2
- package/dist/calcite/{XAUVURWR.js → H2FWQITV.js} +1 -1
- package/dist/calcite/{QX6ZGXUA.js → H5ANNFJC.js} +2 -2
- package/dist/calcite/{WTV3W5WN.js → H5DKF7F3.js} +2 -2
- package/dist/calcite/{KMS2JCWI.js → HBHSBTMM.js} +1 -1
- package/dist/calcite/{WWKRJ5BW.js → HT5KXL4J.js} +2 -2
- package/dist/calcite/{5E23KXQW.js → HU4SHWE7.js} +2 -2
- package/dist/calcite/{K6F4PVVD.js → HVF3RXXI.js} +2 -2
- package/dist/calcite/{34B5K3VC.js → HXGFAPCM.js} +2 -2
- package/dist/calcite/{CSBYILHE.js → I53JH7YD.js} +2 -2
- package/dist/calcite/{DQJ4CTWW.js → IEL7YV5C.js} +2 -2
- package/dist/calcite/{XWOGKL32.js → IHEW664E.js} +2 -2
- package/dist/calcite/{HZVXI5VT.js → IKDSO2OB.js} +2 -2
- package/dist/calcite/{P5PS2PVQ.js → JJWGSKGI.js} +2 -2
- package/dist/calcite/{ANAWJ75J.js → K3AHNZL7.js} +2 -2
- package/dist/calcite/{YT4SL4T4.js → K5GJLIBR.js} +2 -2
- package/dist/calcite/{VAG4CLRN.js → KH3UKQ2D.js} +2 -2
- package/dist/calcite/{E2ETQPML.js → KRHM7ACI.js} +2 -2
- package/dist/calcite/{BHCRRG5K.js → KT4EQWT6.js} +2 -2
- package/dist/calcite/{WIJWBGXQ.js → LH7245HX.js} +2 -2
- package/dist/calcite/{KNTW4634.js → LJI5SYGA.js} +1 -1
- package/dist/calcite/{4BE5CM4R.js → LQ3URZCB.js} +2 -2
- package/dist/calcite/{LT2NMLTM.js → LRKWQ3C3.js} +2 -2
- package/dist/calcite/{YANBAVXH.js → LROCCBRV.js} +2 -2
- package/dist/calcite/{X3IVLT67.js → LYDOM6VQ.js} +2 -2
- package/dist/calcite/{HJBVI5HP.js → MEFMO7UB.js} +2 -2
- package/dist/calcite/{BE4UHKT6.js → MP3OWQ2A.js} +2 -2
- package/dist/calcite/{TKNM6PGC.js → MVLJJOH2.js} +2 -2
- package/dist/calcite/{XXNZUORE.js → N5MSFOLW.js} +2 -2
- package/dist/calcite/{425YTQUT.js → N7OO7R2S.js} +2 -2
- package/dist/calcite/{UA4KBTNZ.js → NID6WJOW.js} +2 -2
- package/dist/calcite/{EFEUKCWA.js → NLYYOFNV.js} +1 -1
- package/dist/calcite/{IVEARGFQ.js → NQJMDHT5.js} +2 -2
- package/dist/calcite/{EU6IVBMM.js → NSBK36H4.js} +2 -2
- package/dist/calcite/{PBJYTCZQ.js → NU57UAAO.js} +1 -1
- package/dist/calcite/{7WAFUV2T.js → NULQJBCW.js} +2 -2
- package/dist/calcite/{PDC2HFCE.js → OCT7LR2O.js} +1 -1
- package/dist/calcite/{UCRIU7RD.js → OFZACK2Y.js} +2 -2
- package/dist/calcite/{KEKHXXG2.js → OMKDUGKV.js} +2 -2
- package/dist/calcite/{FJ6DIGL4.js → PFDLGOVS.js} +2 -2
- package/dist/calcite/{4T2MXJFD.js → PFKUB7JD.js} +2 -2
- package/dist/calcite/{5MVGEBA4.js → PJOGMC7F.js} +2 -2
- package/dist/calcite/{WRHL43TZ.js → PLD7OLLJ.js} +2 -2
- package/dist/calcite/{3QKRHYDR.js → PSCEW76J.js} +2 -2
- package/dist/calcite/{WJT34A4V.js → PSNA5FAF.js} +2 -2
- package/dist/calcite/{E22QVECL.js → PU5TGCQG.js} +2 -2
- package/dist/calcite/{N4VKIVPS.js → PVL2DQVP.js} +2 -2
- package/dist/calcite/{5MCNWZT7.js → PZL4QWV5.js} +2 -2
- package/dist/calcite/{NL3LLRLQ.js → Q23OEAP2.js} +2 -2
- package/dist/calcite/{D2QA5PI3.js → Q2GRCTSJ.js} +2 -2
- package/dist/calcite/{YTEVYZWQ.js → Q3MUDXRY.js} +2 -2
- package/dist/calcite/{EH4IJP5H.js → QF6F6CY3.js} +2 -2
- package/dist/calcite/{WWUSLEON.js → QFT74HW3.js} +2 -2
- package/dist/calcite/{C47YSH7C.js → R73QB7MJ.js} +2 -2
- package/dist/calcite/{N5LX4COS.js → RFALVOKT.js} +2 -2
- package/dist/calcite/{IWU3WQTA.js → RI3NRBMI.js} +2 -2
- package/dist/calcite/{PAKKXMW6.js → RND3V33U.js} +1 -1
- package/dist/calcite/{K6E5LSS6.js → ROWPIQLT.js} +2 -2
- package/dist/calcite/{6CFV5RKV.js → RRP2E2T3.js} +2 -2
- package/dist/calcite/{L6HFE67F.js → S5CLKCGJ.js} +1 -1
- package/dist/calcite/{7CSKQBJD.js → SGJU36YV.js} +2 -2
- package/dist/calcite/{KUUFM5EV.js → SMRCCHJE.js} +2 -2
- package/dist/calcite/{RQFHIC47.js → SXB76NOR.js} +2 -2
- package/dist/calcite/{ZLSS7CXL.js → SZWYWOXZ.js} +2 -2
- package/dist/calcite/{KXG3JNXH.js → T6Y6ZTWW.js} +2 -2
- package/dist/calcite/{6HTHE64W.js → U3KRKTQY.js} +2 -2
- package/dist/calcite/{ZMYI2UVC.js → UGI3YWJM.js} +2 -2
- package/dist/calcite/{AEYCEODJ.js → UN7GLLXI.js} +2 -2
- package/dist/calcite/{2QSQXOI5.js → UNJRBV2R.js} +2 -2
- package/dist/calcite/{6J3DGER2.js → UOZDXXIF.js} +2 -2
- package/dist/calcite/{XO5ETFTI.js → V3ZR6RFK.js} +1 -1
- package/dist/calcite/{HXF4YIAH.js → V4NPQ4WA.js} +2 -2
- package/dist/calcite/{JEZYPF4D.js → VBRBI7IU.js} +2 -2
- package/dist/calcite/{NHJ736R2.js → VIWDW2WZ.js} +2 -2
- package/dist/calcite/{DLM7KEK5.js → VKRWRFEJ.js} +2 -2
- package/dist/calcite/{PX5VW7CA.js → VMWAAH5B.js} +2 -2
- package/dist/calcite/{TG4OK7FQ.js → VQMSSO2U.js} +2 -2
- package/dist/calcite/{VQT3LLC7.js → VYFT5EAY.js} +1 -1
- package/dist/calcite/{FPD3KMKK.js → W5OJOVZY.js} +1 -1
- package/dist/calcite/{WLATCKTT.js → W6EWFSR3.js} +2 -2
- package/dist/calcite/{43SYTK5U.js → W72YZH73.js} +2 -2
- package/dist/calcite/{YPBCS4NA.js → WBGRGCXR.js} +2 -2
- package/dist/calcite/{XWXCOJUO.js → WOTQIMPZ.js} +2 -2
- package/dist/calcite/{NHUHCQ4J.js → WPTOKN7K.js} +1 -1
- package/dist/calcite/{P2MLMFIB.js → WTY55PPZ.js} +2 -2
- package/dist/calcite/{R7GSVJN5.js → WWJXVV6U.js} +2 -2
- package/dist/calcite/{2IUZ3YR2.js → X374PRV7.js} +2 -2
- package/dist/calcite/{BSQIX4WQ.js → XNFJXDQ6.js} +2 -2
- package/dist/calcite/{HS3YVIY4.js → XNLWKJLM.js} +2 -2
- package/dist/calcite/{MBIDNSLG.js → XRSYDXWZ.js} +1 -1
- package/dist/calcite/{QSCN7J3O.js → XZTRPLLK.js} +2 -2
- package/dist/calcite/{RWVRFF3I.js → Y3HXK6MO.js} +2 -2
- package/dist/calcite/{OPTERABQ.js → Y442PVMQ.js} +2 -2
- package/dist/calcite/{A7PQJDZZ.js → YCLOS6NX.js} +2 -2
- package/dist/calcite/{2526AKXE.js → YSBWKH76.js} +1 -1
- package/dist/calcite/{7STMP4B2.js → YSP6WWQB.js} +1 -1
- package/dist/calcite/{U235MJ2F.js → YV7DKMEQ.js} +2 -2
- package/dist/calcite/{OWE3TUYA.js → ZAQTILTS.js} +2 -2
- package/dist/calcite/{DNM3U3Z7.js → ZLR2B6GQ.js} +1 -1
- package/dist/calcite/{ZCDYIKPL.js → ZSMNT5VS.js} +2 -2
- package/dist/calcite/{3DRRZPK3.js → ZTOBC3PN.js} +2 -2
- package/dist/calcite/{PHQB3YSI.js → ZV7YL7QG.js} +2 -2
- package/dist/calcite/{5JALWDSF.js → ZVWKN3G7.js} +2 -2
- package/dist/calcite/{4AHB62J2.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/components/calcite-block/customElement.js +1 -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
- package/dist/calcite/HGI7ZMWJ.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{q as u,r as b}from"./
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{q as u,r as b}from"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{D as g,E as a,P as m,g as d,h as l,o as h}from"./AUIOWPFN.js";var f={input:"input"},t={label:"label",labelScale:i=>`label--scale-${i}`,labelHorizontal:"label--horizontal",labelOutline:"label--outline",labelOutlineFill:"label--outline-fill",icon:"icon",iconSolo:"icon--solo"},v=d`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:flex;cursor:pointer;align-self:stretch;font-weight:var(--calcite-font-weight-normal);outline-color:transparent;transition:background-color var(--calcite-internal-animation-timing-fast) ease-in-out,border-color var(--calcite-animation-timing) ease-in-out}.label{pointer-events:none;margin:.125rem;box-sizing:border-box;display:flex;flex:1 1 0%;align-items:center;color:var(--calcite-segmented-control-color, var(--calcite-color-text-3));background-color:var(--calcite-segmented-control-background-color);box-shadow:var(--calcite-segmented-control-shadow);border-color:var(--calcite-segmented-control-border-color);transition:background-color var(--calcite-internal-animation-timing-fast) ease-in-out,border-color var(--calcite-internal-animation-timing-fast) ease-in-out,color var(--calcite-internal-animation-timing-fast) ease-in-out}.label--horizontal{justify-content:center}:host(: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))));outline-offset:-1px;z-index:var(--calcite-z-index)}.label--scale-s{padding-inline:.5rem;font-size:var(--calcite-font-size--2);line-height:1rem;padding-block:.125rem}.label--scale-m{padding-inline:.75rem;font-size:var(--calcite-font-size--1);line-height:1rem;padding-block:.375rem}.label--scale-l{padding-inline:1rem;padding-block:.625rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host(:hover) .label{background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-foreground-2));color:var(--calcite-segmented-control-color, var(--calcite-color-text-1))}:host(:active) .label{background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-foreground-3))}:host([checked]) .label{cursor:default;background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-brand));border-color:var(--calcite-segmented-control-border-color, var(--calcite-color-brand));color:var(--calcite-segmented-control-color, var(--calcite-color-text-inverse))}:host([checked]) .label--outline,:host([checked]) .label--outline-fill{background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-foreground-1));border-color:var(--calcite-segmented-control-border-color, var(--calcite-color-brand));box-shadow:var(--calcite-segmented-control-shadow, inset 0 0 0 1px var(--calcite-color-brand));color:var(--calcite-segmented-control-color, var(--calcite-color-brand))}:host([checked]) .label--outline{background-color:var(--calcite-segmented-control-background-color, transparent)}::slotted(input){display:none}@media(forced-colors:active){:host([checked]) .label{background-color:highlight}:host([checked]) .label--outline,:host([checked]) .label--outline-fill{outline:2px solid transparent;outline-offset:2px}:host([checked]) .label:not([class~=label--outline]) .icon{color:highlightText}}.icon{position:relative;margin:0;display:inline-flex;line-height:inherit;margin-inline-start:var(--calcite-internal-segmented-control-icon-margin-start);margin-inline-end:var(--calcite-internal-segmented-control-icon-margin-end);--calcite-icon-color: var(--calcite-segmented-control-icon-color)}:host([icon-start]) .label--scale-s{--calcite-internal-segmented-control-icon-margin-end: .5rem}:host([icon-end]) .label--scale-s{--calcite-internal-segmented-control-icon-margin-start: .5rem}:host([icon-start]) .label--scale-m{--calcite-internal-segmented-control-icon-margin-end: .75rem}:host([icon-end]) .label--scale-m{--calcite-internal-segmented-control-icon-margin-start: .75rem}:host([icon-start]) .label--scale-l{--calcite-internal-segmented-control-icon-margin-end: 1rem}:host([icon-end]) .label--scale-l{--calcite-internal-segmented-control-icon-margin-start: 1rem}.label .icon--solo{--calcite-internal-segmented-control-icon-margin-start: 0;--calcite-internal-segmented-control-icon-margin-end: 0}:host([hidden]){display:none}[hidden]{display:none}`,r=class extends g{constructor(){super(...arguments),this.hasSlottedContent=!1,this.appearance="solid",this.checked=!1,this.iconFlipRtl=!1,this.layout="horizontal",this.scale="m",this.calciteInternalSegmentedControlItemChange=h({cancelable:!1})}static{this.properties={hasSlottedContent:[16,{},{state:!0}],appearance:1,checked:[7,{},{reflect:!0,type:Boolean}],iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],iconStart:[3,{type:String},{reflect:!0}],layout:1,scale:1,value:1}}static{this.styles=v}willUpdate(e){e.has("checked")&&(this.hasUpdated||this.checked!==!1)&&this.calciteInternalSegmentedControlItemChange.emit()}handleSlotChange(e){this.hasSlottedContent=b(e)}renderIcon(e,o=!1){return e?l`<calcite-icon class=${a({[t.icon]:!0,[t.iconSolo]:o})} .flipRtl=${this.iconFlipRtl} .icon=${e} scale=s></calcite-icon>`:null}render(){let{appearance:e,checked:o,layout:c,scale:n,value:s}=this;return this.el.ariaChecked=u(o),this.el.ariaLabel=s,this.el.role="radio",l`<label class=${a({[t.label]:!0,[t.labelScale(n)]:!0,[t.labelHorizontal]:c==="horizontal",[t.labelOutline]:e==="outline",[t.labelOutlineFill]:e==="outline-fill"})}>${this.renderContent()}</label>`}renderContent(){let{hasSlottedContent:e,iconEnd:o,iconStart:c}=this,n=c||o;return!e&&n?[this.renderIcon(n,!0),l`<slot @slotchange=${this.handleSlotChange}></slot>`]:[this.renderIcon(c),l`<slot @slotchange=${this.handleSlotChange}></slot>`,l`<slot name=${f.input}></slot>`,this.renderIcon(o)]}};m("calcite-segmented-control-item",r);export{r as SegmentedControlItem};
|
|
@@ -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 n,E as o,h as a,l as t}from"./
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{C as n,E as o,h as a,l as t}from"./AUIOWPFN.js";var m={validationContainer:"validation-container"},d=()=>{},$=({scale:e,status:s,id:r,icon:l,message:c,ref:i})=>a`<div class=${o(m.validationContainer)} ${n(i||d)}><calcite-input-message aria-live=polite .icon=${l} id=${r??t} .scale=${e} .status=${s}>${c}</calcite-input-message></div>`;export{$ 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.
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
4
|
function fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,o)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fe(Object(n),!0).forEach(function(o){Xe(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fe(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Mt(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Mt=function(t){return typeof t}:Mt=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mt(e)}function Xe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $(){return $=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},$.apply(this,arguments)}function Ye(e,t){if(e==null)return{};var n={},o=Object.keys(e),i,r;for(r=0;r<o.length;r++)i=o[r],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Be(e,t){if(e==null)return{};var n=Ye(e,t),o,i;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}var Ge="1.15.6";function U(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var q=U(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Tt=U(/Edge/i),ce=U(/firefox/i),Et=U(/safari/i)&&!U(/chrome/i)&&!U(/android/i),ie=U(/iP(ad|od|hone)/i),we=U(/chrome/i)&&U(/android/i),ye={capture:!1,passive:!1};function v(e,t,n){e.addEventListener(t,n,!q&&ye)}function m(e,t,n){e.removeEventListener(t,n,!q&&ye)}function Yt(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function Ee(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function H(e,t,n,o){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&Yt(e,t):Yt(e,t))||o&&e===n)return e;if(e===n)break}while(e=Ee(e))}return null}var de=/\s+/g;function R(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(de," ").replace(" "+t+" "," ");e.className=(o+(n?" "+t:"")).replace(de," ")}}function h(e,t,n){var o=e&&e.style;if(o){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in o)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),o[t]=n+(typeof n=="string"?"":"px")}}function ct(e,t){var n="";if(typeof e=="string")n=e;else do{var o=h(e,"transform");o&&o!=="none"&&(n=o+" "+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function De(e,t,n){if(e){var o=e.getElementsByTagName(t),i=0,r=o.length;if(n)for(;i<r;i++)n(o[i],i);return o}return[]}function K(){var e=document.scrollingElement;return e||document.documentElement}function T(e,t,n,o,i){if(!(!e.getBoundingClientRect&&e!==window)){var r,a,l,s,u,c,d;if(e!==window&&e.parentNode&&e!==K()?(r=e.getBoundingClientRect(),a=r.top,l=r.left,s=r.bottom,u=r.right,c=r.height,d=r.width):(a=0,l=0,s=window.innerHeight,u=window.innerWidth,c=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(i=i||e.parentNode,!q))do if(i&&i.getBoundingClientRect&&(h(i,"transform")!=="none"||n&&h(i,"position")!=="static")){var b=i.getBoundingClientRect();a-=b.top+parseInt(h(i,"border-top-width")),l-=b.left+parseInt(h(i,"border-left-width")),s=a+r.height,u=l+r.width;break}while(i=i.parentNode);if(o&&e!==window){var E=ct(i||e),w=E&&E.a,y=E&&E.d;E&&(a/=y,l/=w,d/=w,c/=y,s=a+c,u=l+d)}return{top:a,left:l,bottom:s,right:u,width:d,height:c}}}function he(e,t,n){for(var o=tt(e,!0),i=T(e)[t];o;){var r=T(o)[n],a=void 0;if(n==="top"||n==="left"?a=i>=r:a=i<=r,!a)return o;if(o===K())break;o=tt(o,!1)}return!1}function dt(e,t,n,o){for(var i=0,r=0,a=e.children;r<a.length;){if(a[r].style.display!=="none"&&a[r]!==p.ghost&&(o||a[r]!==p.dragged)&&H(a[r],n.draggable,e,!1)){if(i===t)return a[r];i++}r++}return null}function re(e,t){for(var n=e.lastElementChild;n&&(n===p.ghost||h(n,"display")==="none"||t&&!Yt(n,t));)n=n.previousElementSibling;return n||null}function X(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==p.clone&&(!t||Yt(e,t))&&n++;return n}function pe(e){var t=0,n=0,o=K();if(e)do{var i=ct(e),r=i.a,a=i.d;t+=e.scrollLeft*r,n+=e.scrollTop*a}while(e!==o&&(e=e.parentNode));return[t,n]}function He(e,t){for(var n in e)if(e.hasOwnProperty(n)){for(var o in t)if(t.hasOwnProperty(o)&&t[o]===e[n][o])return Number(n)}return-1}function tt(e,t){if(!e||!e.getBoundingClientRect)return K();var n=e,o=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=h(n);if(n.clientWidth<n.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return K();if(o||t)return n;o=!0}}while(n=n.parentNode);return K()}function We(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function jt(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var Dt;function Se(e,t){return function(){if(!Dt){var n=arguments,o=this;n.length===1?e.call(o,n[0]):e.apply(o,n),Dt=setTimeout(function(){Dt=void 0},t)}}}function Ke(){clearTimeout(Dt),Dt=void 0}function _e(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function Ce(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function Te(e,t,n){var o={};return Array.from(e.children).forEach(function(i){var r,a,l,s;if(!(!H(i,t.draggable,e,!1)||i.animated||i===n)){var u=T(i);o.left=Math.min((r=o.left)!==null&&r!==void 0?r:1/0,u.left),o.top=Math.min((a=o.top)!==null&&a!==void 0?a:1/0,u.top),o.right=Math.max((l=o.right)!==null&&l!==void 0?l:-1/0,u.right),o.bottom=Math.max((s=o.bottom)!==null&&s!==void 0?s:-1/0,u.bottom)}}),o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}var P="Sortable"+new Date().getTime();function Le(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var o=[].slice.call(this.el.children);o.forEach(function(i){if(!(h(i,"display")==="none"||i===p.ghost)){e.push({target:i,rect:T(i)});var r=L({},e[e.length-1].rect);if(i.thisAnimationDuration){var a=ct(i,!0);a&&(r.top-=a.f,r.left-=a.e)}i.fromRect=r}})}},addAnimationState:function(o){e.push(o)},removeAnimationState:function(o){e.splice(He(e,{target:o}),1)},animateAll:function(o){var i=this;if(!this.options.animation){clearTimeout(t),typeof o=="function"&&o();return}var r=!1,a=0;e.forEach(function(l){var s=0,u=l.target,c=u.fromRect,d=T(u),b=u.prevFromRect,E=u.prevToRect,w=l.rect,y=ct(u,!0);y&&(d.top-=y.f,d.left-=y.e),u.toRect=d,u.thisAnimationDuration&&jt(b,d)&&!jt(c,d)&&(w.top-d.top)/(w.left-d.left)===(c.top-d.top)/(c.left-d.left)&&(s=ze(w,b,E,i.options)),jt(d,c)||(u.prevFromRect=c,u.prevToRect=d,s||(s=i.options.animation),i.animate(u,w,d,s)),s&&(r=!0,a=Math.max(a,s),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},s),u.thisAnimationDuration=s)}),clearTimeout(t),r?t=setTimeout(function(){typeof o=="function"&&o()},a):typeof o=="function"&&o(),e=[]},animate:function(o,i,r,a){if(a){h(o,"transition",""),h(o,"transform","");var l=ct(this.el),s=l&&l.a,u=l&&l.d,c=(i.left-r.left)/(s||1),d=(i.top-r.top)/(u||1);o.animatingX=!!c,o.animatingY=!!d,h(o,"transform","translate3d("+c+"px,"+d+"px,0)"),this.forRepaintDummy=je(o),h(o,"transition","transform "+a+"ms"+(this.options.easing?" "+this.options.easing:"")),h(o,"transform","translate3d(0,0,0)"),typeof o.animated=="number"&&clearTimeout(o.animated),o.animated=setTimeout(function(){h(o,"transition",""),h(o,"transform",""),o.animated=!1,o.animatingX=!1,o.animatingY=!1},a)}}}}function je(e){return e.offsetWidth}function ze(e,t,n,o){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*o.animation}var lt=[],zt={initializeByDefault:!0},Ot={mount:function(t){for(var n in zt)zt.hasOwnProperty(n)&&!(n in t)&&(t[n]=zt[n]);lt.forEach(function(o){if(o.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),lt.push(t)},pluginEvent:function(t,n,o){var i=this;this.eventCanceled=!1,o.cancel=function(){i.eventCanceled=!0};var r=t+"Global";lt.forEach(function(a){n[a.pluginName]&&(n[a.pluginName][r]&&n[a.pluginName][r](L({sortable:n},o)),n.options[a.pluginName]&&n[a.pluginName][t]&&n[a.pluginName][t](L({sortable:n},o)))})},initializePlugins:function(t,n,o,i){lt.forEach(function(l){var s=l.pluginName;if(!(!t.options[s]&&!l.initializeByDefault)){var u=new l(t,n,t.options);u.sortable=t,u.options=t.options,t[s]=u,$(o,u.defaults)}});for(var r in t.options)if(t.options.hasOwnProperty(r)){var a=this.modifyOption(t,r,t.options[r]);typeof a<"u"&&(t.options[r]=a)}},getEventProperties:function(t,n){var o={};return lt.forEach(function(i){typeof i.eventProperties=="function"&&$(o,i.eventProperties.call(n[i.pluginName],t))}),o},modifyOption:function(t,n,o){var i;return lt.forEach(function(r){t[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[n]=="function"&&(i=r.optionListeners[n].call(t[r.pluginName],o))}),i}};function Ue(e){var t=e.sortable,n=e.rootEl,o=e.name,i=e.targetEl,r=e.cloneEl,a=e.toEl,l=e.fromEl,s=e.oldIndex,u=e.newIndex,c=e.oldDraggableIndex,d=e.newDraggableIndex,b=e.originalEvent,E=e.putSortable,w=e.extraEventProperties;if(t=t||n&&n[P],!!t){var y,Y=t.options,j="on"+o.charAt(0).toUpperCase()+o.substr(1);window.CustomEvent&&!q&&!Tt?y=new CustomEvent(o,{bubbles:!0,cancelable:!0}):(y=document.createEvent("Event"),y.initEvent(o,!0,!0)),y.to=a||n,y.from=l||n,y.item=i||n,y.clone=r,y.oldIndex=s,y.newIndex=u,y.oldDraggableIndex=c,y.newDraggableIndex=d,y.originalEvent=b,y.pullMode=E?E.lastPutMode:void 0;var I=L(L({},w),Ot.getEventProperties(o,t));for(var B in I)y[B]=I[B];n&&n.dispatchEvent(y),Y[j]&&Y[j].call(t,y)}}var $e=["evt"],N=function(t,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.evt,r=Be(o,$e);Ot.pluginEvent.bind(p)(t,n,L({dragEl:f,parentEl:_,ghostEl:g,rootEl:D,nextEl:at,lastDownEl:Ft,cloneEl:S,cloneHidden:J,dragStarted:bt,putSortable:O,activeSortable:p.active,originalEvent:i,oldIndex:ft,oldDraggableIndex:St,newIndex:k,newDraggableIndex:Q,hideGhostForTarget:xe,unhideGhostForTarget:Ne,cloneNowHidden:function(){J=!0},cloneNowShown:function(){J=!1},dispatchSortableEvent:function(l){x({sortable:n,name:l,originalEvent:i})}},r))};function x(e){Ue(L({putSortable:O,cloneEl:S,targetEl:f,rootEl:D,oldIndex:ft,oldDraggableIndex:St,newIndex:k,newDraggableIndex:Q},e))}var f,_,g,D,at,Ft,S,J,ft,k,St,Q,It,O,ut=!1,Bt=!1,Gt=[],it,G,Ut,$t,ge,me,bt,st,_t,Ct=!1,xt=!1,Rt,A,qt=[],te=!1,Ht=[],Kt=typeof document<"u",Nt=ie,ve=Tt||q?"cssFloat":"float",qe=Kt&&!we&&!ie&&"draggable"in document.createElement("div"),Oe=(function(){if(Kt){if(q)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}})(),Ae=function(t,n){var o=h(t),i=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),r=dt(t,0,n),a=dt(t,1,n),l=r&&h(r),s=a&&h(a),u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+T(r).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+T(a).width;if(o.display==="flex")return o.flexDirection==="column"||o.flexDirection==="column-reverse"?"vertical":"horizontal";if(o.display==="grid")return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&l.float&&l.float!=="none"){var d=l.float==="left"?"left":"right";return a&&(s.clear==="both"||s.clear===d)?"vertical":"horizontal"}return r&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||u>=i&&o[ve]==="none"||a&&o[ve]==="none"&&u+c>i)?"vertical":"horizontal"},Ve=function(t,n,o){var i=o?t.left:t.top,r=o?t.right:t.bottom,a=o?t.width:t.height,l=o?n.left:n.top,s=o?n.right:n.bottom,u=o?n.width:n.height;return i===l||r===s||i+a/2===l+u/2},Ze=function(t,n){var o;return Gt.some(function(i){var r=i[P].options.emptyInsertThreshold;if(!(!r||re(i))){var a=T(i),l=t>=a.left-r&&t<=a.right+r,s=n>=a.top-r&&n<=a.bottom+r;if(l&&s)return o=i}}),o},Ie=function(t){function n(r,a){return function(l,s,u,c){var d=l.options.group.name&&s.options.group.name&&l.options.group.name===s.options.group.name;if(r==null&&(a||d))return!0;if(r==null||r===!1)return!1;if(a&&r==="clone")return r;if(typeof r=="function")return n(r(l,s,u,c),a)(l,s,u,c);var b=(a?l:s).options.group.name;return r===!0||typeof r=="string"&&r===b||r.join&&r.indexOf(b)>-1}}var o={},i=t.group;(!i||Mt(i)!="object")&&(i={name:i}),o.name=i.name,o.checkPull=n(i.pull,!0),o.checkPut=n(i.put),o.revertClone=i.revertClone,t.group=o},xe=function(){!Oe&&g&&h(g,"display","none")},Ne=function(){!Oe&&g&&h(g,"display","")};Kt&&!we&&document.addEventListener("click",function(e){if(Bt)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Bt=!1,!1},!0);var rt=function(t){if(f){t=t.touches?t.touches[0]:t;var n=Ze(t.clientX,t.clientY);if(n){var o={};for(var i in t)t.hasOwnProperty(i)&&(o[i]=t[i]);o.target=o.rootEl=n,o.preventDefault=void 0,o.stopPropagation=void 0,n[P]._onDragOver(o)}}},Qe=function(t){f&&f.parentNode[P]._isOutsideThisEl(t.target)};function p(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=$({},t),e[P]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ae(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(a,l){a.setData("Text",l.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:p.supportPointer!==!1&&"PointerEvent"in window&&(!Et||ie),emptyInsertThreshold:5};Ot.initializePlugins(this,e,n);for(var o in n)!(o in t)&&(t[o]=n[o]);Ie(t);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=t.forceFallback?!1:qe,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?v(e,"pointerdown",this._onTapStart):(v(e,"mousedown",this._onTapStart),v(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(v(e,"dragover",this),v(e,"dragenter",this)),Gt.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),$(this,Le())}p.prototype={constructor:p,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(st=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,f):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,o=this.el,i=this.options,r=i.preventOnFilter,a=t.type,l=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,s=(l||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,c=i.filter;if(ln(o),!f&&!(/mousedown|pointerdown/.test(a)&&t.button!==0||i.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&Et&&s&&s.tagName.toUpperCase()==="SELECT")&&(s=H(s,i.draggable,o,!1),!(s&&s.animated)&&Ft!==s)){if(ft=X(s),St=X(s,i.draggable),typeof c=="function"){if(c.call(this,t,s,this)){x({sortable:n,rootEl:u,name:"filter",targetEl:s,toEl:o,fromEl:o}),N("filter",n,{evt:t}),r&&t.preventDefault();return}}else if(c&&(c=c.split(",").some(function(d){if(d=H(u,d.trim(),o,!1),d)return x({sortable:n,rootEl:d,name:"filter",targetEl:s,fromEl:o,toEl:o}),N("filter",n,{evt:t}),!0}),c)){r&&t.preventDefault();return}i.handle&&!H(u,i.handle,o,!1)||this._prepareDragStart(t,l,s)}}},_prepareDragStart:function(t,n,o){var i=this,r=i.el,a=i.options,l=r.ownerDocument,s;if(o&&!f&&o.parentNode===r){var u=T(o);if(D=r,f=o,_=f.parentNode,at=f.nextSibling,Ft=o,It=a.group,p.dragged=f,it={target:f,clientX:(n||t).clientX,clientY:(n||t).clientY},ge=it.clientX-u.left,me=it.clientY-u.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,f.style["will-change"]="all",s=function(){if(N("delayEnded",i,{evt:t}),p.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!ce&&i.nativeDraggable&&(f.draggable=!0),i._triggerDragStart(t,n),x({sortable:i,name:"choose",originalEvent:t}),R(f,a.chosenClass,!0)},a.ignore.split(",").forEach(function(c){De(f,c.trim(),Vt)}),v(l,"dragover",rt),v(l,"mousemove",rt),v(l,"touchmove",rt),a.supportPointer?(v(l,"pointerup",i._onDrop),!this.nativeDraggable&&v(l,"pointercancel",i._onDrop)):(v(l,"mouseup",i._onDrop),v(l,"touchend",i._onDrop),v(l,"touchcancel",i._onDrop)),ce&&this.nativeDraggable&&(this.options.touchStartThreshold=4,f.draggable=!0),N("delayStart",this,{evt:t}),a.delay&&(!a.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Tt||q))){if(p.eventCanceled){this._onDrop();return}a.supportPointer?(v(l,"pointerup",i._disableDelayedDrag),v(l,"pointercancel",i._disableDelayedDrag)):(v(l,"mouseup",i._disableDelayedDrag),v(l,"touchend",i._disableDelayedDrag),v(l,"touchcancel",i._disableDelayedDrag)),v(l,"mousemove",i._delayedDragTouchMoveHandler),v(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&v(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(s,a.delay)}else s()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){f&&Vt(f),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;m(t,"mouseup",this._disableDelayedDrag),m(t,"touchend",this._disableDelayedDrag),m(t,"touchcancel",this._disableDelayedDrag),m(t,"pointerup",this._disableDelayedDrag),m(t,"pointercancel",this._disableDelayedDrag),m(t,"mousemove",this._delayedDragTouchMoveHandler),m(t,"touchmove",this._delayedDragTouchMoveHandler),m(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?v(document,"pointermove",this._onTouchMove):n?v(document,"touchmove",this._onTouchMove):v(document,"mousemove",this._onTouchMove):(v(f,"dragend",this),v(D,"dragstart",this._onDragStart));try{document.selection?kt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(ut=!1,D&&f){N("dragStarted",this,{evt:n}),this.nativeDraggable&&v(document,"dragover",Qe);var o=this.options;!t&&R(f,o.dragClass,!1),R(f,o.ghostClass,!0),p.active=this,t&&this._appendGhost(),x({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(G){this._lastX=G.clientX,this._lastY=G.clientY,xe();for(var t=document.elementFromPoint(G.clientX,G.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(G.clientX,G.clientY),t!==n);)n=t;if(f.parentNode[P]._isOutsideThisEl(t),n)do{if(n[P]){var o=void 0;if(o=n[P]._onDragOver({clientX:G.clientX,clientY:G.clientY,target:t,rootEl:n}),o&&!this.options.dragoverBubble)break}t=n}while(n=Ee(n));Ne()}},_onTouchMove:function(t){if(it){var n=this.options,o=n.fallbackTolerance,i=n.fallbackOffset,r=t.touches?t.touches[0]:t,a=g&&ct(g,!0),l=g&&a&&a.a,s=g&&a&&a.d,u=Nt&&A&&pe(A),c=(r.clientX-it.clientX+i.x)/(l||1)+(u?u[0]-qt[0]:0)/(l||1),d=(r.clientY-it.clientY+i.y)/(s||1)+(u?u[1]-qt[1]:0)/(s||1);if(!p.active&&!ut){if(o&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<o)return;this._onDragStart(t,!0)}if(g){a?(a.e+=c-(Ut||0),a.f+=d-($t||0)):a={a:1,b:0,c:0,d:1,e:c,f:d};var b="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");h(g,"webkitTransform",b),h(g,"mozTransform",b),h(g,"msTransform",b),h(g,"transform",b),Ut=c,$t=d,G=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!g){var t=this.options.fallbackOnBody?document.body:D,n=T(f,!0,Nt,!0,t),o=this.options;if(Nt){for(A=t;h(A,"position")==="static"&&h(A,"transform")==="none"&&A!==document;)A=A.parentNode;A!==document.body&&A!==document.documentElement?(A===document&&(A=K()),n.top+=A.scrollTop,n.left+=A.scrollLeft):A=K(),qt=pe(A)}g=f.cloneNode(!0),R(g,o.ghostClass,!1),R(g,o.fallbackClass,!0),R(g,o.dragClass,!0),h(g,"transition",""),h(g,"transform",""),h(g,"box-sizing","border-box"),h(g,"margin",0),h(g,"top",n.top),h(g,"left",n.left),h(g,"width",n.width),h(g,"height",n.height),h(g,"opacity","0.8"),h(g,"position",Nt?"absolute":"fixed"),h(g,"zIndex","100000"),h(g,"pointerEvents","none"),p.ghost=g,t.appendChild(g),h(g,"transform-origin",ge/parseInt(g.style.width)*100+"% "+me/parseInt(g.style.height)*100+"%")}},_onDragStart:function(t,n){var o=this,i=t.dataTransfer,r=o.options;if(N("dragStart",this,{evt:t}),p.eventCanceled){this._onDrop();return}N("setupClone",this),p.eventCanceled||(S=Ce(f),S.removeAttribute("id"),S.draggable=!1,S.style["will-change"]="",this._hideClone(),R(S,this.options.chosenClass,!1),p.clone=S),o.cloneId=kt(function(){N("clone",o),!p.eventCanceled&&(o.options.removeCloneOnHide||D.insertBefore(S,f),o._hideClone(),x({sortable:o,name:"clone"}))}),!n&&R(f,r.dragClass,!0),n?(Bt=!0,o._loopId=setInterval(o._emulateDragOver,50)):(m(document,"mouseup",o._onDrop),m(document,"touchend",o._onDrop),m(document,"touchcancel",o._onDrop),i&&(i.effectAllowed="move",r.setData&&r.setData.call(o,i,f)),v(document,"drop",o),h(f,"transform","translateZ(0)")),ut=!0,o._dragStartId=kt(o._dragStarted.bind(o,n,t)),v(document,"selectstart",o),bt=!0,window.getSelection().removeAllRanges(),Et&&h(document.body,"user-select","none")},_onDragOver:function(t){var n=this.el,o=t.target,i,r,a,l=this.options,s=l.group,u=p.active,c=It===s,d=l.sort,b=O||u,E,w=this,y=!1;if(te)return;function Y(vt,Re){N(vt,w,L({evt:t,isOwner:c,axis:E?"vertical":"horizontal",revert:a,dragRect:i,targetRect:r,canSort:d,fromSortable:b,target:o,completed:I,onMove:function(ue,ke){return Pt(D,n,f,i,ue,T(ue),t,ke)},changed:B},Re))}function j(){Y("dragOverAnimationCapture"),w.captureAnimationState(),w!==b&&b.captureAnimationState()}function I(vt){return Y("dragOverCompleted",{insertion:vt}),vt&&(c?u._hideClone():u._showClone(w),w!==b&&(R(f,O?O.options.ghostClass:u.options.ghostClass,!1),R(f,l.ghostClass,!0)),O!==w&&w!==p.active?O=w:w===p.active&&O&&(O=null),b===w&&(w._ignoreWhileAnimating=o),w.animateAll(function(){Y("dragOverAnimationComplete"),w._ignoreWhileAnimating=null}),w!==b&&(b.animateAll(),b._ignoreWhileAnimating=null)),(o===f&&!f.animated||o===n&&!o.animated)&&(st=null),!l.dragoverBubble&&!t.rootEl&&o!==document&&(f.parentNode[P]._isOutsideThisEl(t.target),!vt&&rt(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),y=!0}function B(){k=X(f),Q=X(f,l.draggable),x({sortable:w,name:"change",toEl:n,newIndex:k,newDraggableIndex:Q,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),o=H(o,l.draggable,n,!0),Y("dragOver"),p.eventCanceled)return y;if(f.contains(t.target)||o.animated&&o.animatingX&&o.animatingY||w._ignoreWhileAnimating===o)return I(!1);if(Bt=!1,u&&!l.disabled&&(c?d||(a=_!==D):O===this||(this.lastPutMode=It.checkPull(this,u,f,t))&&s.checkPut(this,u,f,t))){if(E=this._getDirection(t,o)==="vertical",i=T(f),Y("dragOverValid"),p.eventCanceled)return y;if(a)return _=D,j(),this._hideClone(),Y("revert"),p.eventCanceled||(at?D.insertBefore(f,at):D.appendChild(f)),I(!0);var M=re(n,l.draggable);if(!M||nn(t,E,this)&&!M.animated){if(M===f)return I(!1);if(M&&n===t.target&&(o=M),o&&(r=T(o)),Pt(D,n,f,i,o,r,t,!!o)!==!1)return j(),M&&M.nextSibling?n.insertBefore(f,M.nextSibling):n.appendChild(f),_=n,B(),I(!0)}else if(M&&en(t,E,this)){var et=dt(n,0,l,!0);if(et===f)return I(!1);if(o=et,r=T(o),Pt(D,n,f,i,o,r,t,!1)!==!1)return j(),n.insertBefore(f,et),_=n,B(),I(!0)}else if(o.parentNode===n){r=T(o);var W=0,nt,ht=f.parentNode!==n,F=!Ve(f.animated&&f.toRect||i,o.animated&&o.toRect||r,E),pt=E?"top":"left",V=he(o,"top","top")||he(f,"top","top"),gt=V?V.scrollTop:void 0;st!==o&&(nt=r[pt],Ct=!1,xt=!F&&l.invertSwap||ht),W=on(t,o,r,E,F?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,xt,st===o);var z;if(W!==0){var ot=X(f);do ot-=W,z=_.children[ot];while(z&&(h(z,"display")==="none"||z===g))}if(W===0||z===o)return I(!1);st=o,_t=W;var mt=o.nextElementSibling,Z=!1;Z=W===1;var At=Pt(D,n,f,i,o,r,t,Z);if(At!==!1)return(At===1||At===-1)&&(Z=At===1),te=!0,setTimeout(tn,30),j(),Z&&!mt?n.appendChild(f):o.parentNode.insertBefore(f,Z?mt:o),V&&_e(V,0,gt-V.scrollTop),_=f.parentNode,nt!==void 0&&!xt&&(Rt=Math.abs(nt-T(o)[pt])),B(),I(!0)}if(n.contains(f))return I(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){m(document,"mousemove",this._onTouchMove),m(document,"touchmove",this._onTouchMove),m(document,"pointermove",this._onTouchMove),m(document,"dragover",rt),m(document,"mousemove",rt),m(document,"touchmove",rt)},_offUpEvents:function(){var t=this.el.ownerDocument;m(t,"mouseup",this._onDrop),m(t,"touchend",this._onDrop),m(t,"pointerup",this._onDrop),m(t,"pointercancel",this._onDrop),m(t,"touchcancel",this._onDrop),m(document,"selectstart",this)},_onDrop:function(t){var n=this.el,o=this.options;if(k=X(f),Q=X(f,o.draggable),N("drop",this,{evt:t}),_=f&&f.parentNode,k=X(f),Q=X(f,o.draggable),p.eventCanceled){this._nulling();return}ut=!1,xt=!1,Ct=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),ee(this.cloneId),ee(this._dragStartId),this.nativeDraggable&&(m(document,"drop",this),m(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Et&&h(document.body,"user-select",""),h(f,"transform",""),t&&(bt&&(t.cancelable&&t.preventDefault(),!o.dropBubble&&t.stopPropagation()),g&&g.parentNode&&g.parentNode.removeChild(g),(D===_||O&&O.lastPutMode!=="clone")&&S&&S.parentNode&&S.parentNode.removeChild(S),f&&(this.nativeDraggable&&m(f,"dragend",this),Vt(f),f.style["will-change"]="",bt&&!ut&&R(f,O?O.options.ghostClass:this.options.ghostClass,!1),R(f,this.options.chosenClass,!1),x({sortable:this,name:"unchoose",toEl:_,newIndex:null,newDraggableIndex:null,originalEvent:t}),D!==_?(k>=0&&(x({rootEl:_,name:"add",toEl:_,fromEl:D,originalEvent:t}),x({sortable:this,name:"remove",toEl:_,originalEvent:t}),x({rootEl:_,name:"sort",toEl:_,fromEl:D,originalEvent:t}),x({sortable:this,name:"sort",toEl:_,originalEvent:t})),O&&O.save()):k!==ft&&k>=0&&(x({sortable:this,name:"update",toEl:_,originalEvent:t}),x({sortable:this,name:"sort",toEl:_,originalEvent:t})),p.active&&((k==null||k===-1)&&(k=ft,Q=St),x({sortable:this,name:"end",toEl:_,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){N("nulling",this),D=f=_=g=at=S=Ft=J=it=G=bt=k=Q=ft=St=st=_t=O=It=p.dragged=p.ghost=p.clone=p.active=null,Ht.forEach(function(t){t.checked=!0}),Ht.length=Ut=$t=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":f&&(this._onDragOver(t),Je(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,o=this.el.children,i=0,r=o.length,a=this.options;i<r;i++)n=o[i],H(n,a.draggable,this.el,!1)&&t.push(n.getAttribute(a.dataIdAttr)||an(n));return t},sort:function(t,n){var o={},i=this.el;this.toArray().forEach(function(r,a){var l=i.children[a];H(l,this.options.draggable,i,!1)&&(o[r]=l)},this),n&&this.captureAnimationState(),t.forEach(function(r){o[r]&&(i.removeChild(o[r]),i.appendChild(o[r]))}),n&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,n){return H(t,n||this.options.draggable,this.el,!1)},option:function(t,n){var o=this.options;if(n===void 0)return o[t];var i=Ot.modifyOption(this,t,n);typeof i<"u"?o[t]=i:o[t]=n,t==="group"&&Ie(o)},destroy:function(){N("destroy",this);var t=this.el;t[P]=null,m(t,"mousedown",this._onTapStart),m(t,"touchstart",this._onTapStart),m(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(m(t,"dragover",this),m(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Gt.splice(Gt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!J){if(N("hideClone",this),p.eventCanceled)return;h(S,"display","none"),this.options.removeCloneOnHide&&S.parentNode&&S.parentNode.removeChild(S),J=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(J){if(N("showClone",this),p.eventCanceled)return;f.parentNode==D&&!this.options.group.revertClone?D.insertBefore(S,f):at?D.insertBefore(S,at):D.appendChild(S),this.options.group.revertClone&&this.animate(f,S),h(S,"display",""),J=!1}}};function Je(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function Pt(e,t,n,o,i,r,a,l){var s,u=e[P],c=u.options.onMove,d;return window.CustomEvent&&!q&&!Tt?s=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(s=document.createEvent("Event"),s.initEvent("move",!0,!0)),s.to=t,s.from=e,s.dragged=n,s.draggedRect=o,s.related=i||t,s.relatedRect=r||T(t),s.willInsertAfter=l,s.originalEvent=a,e.dispatchEvent(s),c&&(d=c.call(u,s,a)),d}function Vt(e){e.draggable=!1}function tn(){te=!1}function en(e,t,n){var o=T(dt(n.el,0,n.options,!0)),i=Te(n.el,n.options,g),r=10;return t?e.clientX<i.left-r||e.clientY<o.top&&e.clientX<o.right:e.clientY<i.top-r||e.clientY<o.bottom&&e.clientX<o.left}function nn(e,t,n){var o=T(re(n.el,n.options.draggable)),i=Te(n.el,n.options,g),r=10;return t?e.clientX>i.right+r||e.clientY>o.bottom&&e.clientX>o.left:e.clientY>i.bottom+r||e.clientX>o.right&&e.clientY>o.top}function on(e,t,n,o,i,r,a,l){var s=o?e.clientY:e.clientX,u=o?n.height:n.width,c=o?n.top:n.left,d=o?n.bottom:n.right,b=!1;if(!a){if(l&&Rt<u*i){if(!Ct&&(_t===1?s>c+u*r/2:s<d-u*r/2)&&(Ct=!0),Ct)b=!0;else if(_t===1?s<c+Rt:s>d-Rt)return-_t}else if(s>c+u*(1-i)/2&&s<d-u*(1-i)/2)return rn(t)}return b=b||a,b&&(s<c+u*r/2||s>d-u*r/2)?s>c+u/2?1:-1:0}function rn(e){return X(f)<X(e)?1:-1}function an(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,o=0;n--;)o+=t.charCodeAt(n);return o.toString(36)}function ln(e){Ht.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var o=t[n];o.checked&&Ht.push(o)}}function kt(e){return setTimeout(e,0)}function ee(e){return clearTimeout(e)}Kt&&v(document,"touchmove",function(e){(p.active||ut)&&e.cancelable&&e.preventDefault()});p.utils={on:v,off:m,css:h,find:De,is:function(t,n){return!!H(t,n,t,!1)},extend:We,throttle:Se,closest:H,toggleClass:R,clone:Ce,index:X,nextTick:kt,cancelNextTick:ee,detectDirection:Ae,getChild:dt,expando:P};p.get=function(e){return e[P]};p.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(o){if(!o.prototype||!o.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));o.utils&&(p.utils=L(L({},p.utils),o.utils)),Ot.mount(o)})};p.create=function(e,t){return new p(e,t)};p.version=Ge;var C=[],wt,ne,oe=!1,Zt,Qt,Wt,yt;function sn(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(n){var o=n.originalEvent;this.sortable.nativeDraggable?v(document,"dragover",this._handleAutoScroll):this.options.supportPointer?v(document,"pointermove",this._handleFallbackAutoScroll):o.touches?v(document,"touchmove",this._handleFallbackAutoScroll):v(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var o=n.originalEvent;!this.options.dragOverBubble&&!o.rootEl&&this._handleAutoScroll(o)},drop:function(){this.sortable.nativeDraggable?m(document,"dragover",this._handleAutoScroll):(m(document,"pointermove",this._handleFallbackAutoScroll),m(document,"touchmove",this._handleFallbackAutoScroll),m(document,"mousemove",this._handleFallbackAutoScroll)),be(),Xt(),Ke()},nulling:function(){Wt=ne=wt=oe=yt=Zt=Qt=null,C.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,o){var i=this,r=(n.touches?n.touches[0]:n).clientX,a=(n.touches?n.touches[0]:n).clientY,l=document.elementFromPoint(r,a);if(Wt=n,o||this.options.forceAutoScrollFallback||Tt||q||Et){Jt(n,this.options,l,o);var s=tt(l,!0);oe&&(!yt||r!==Zt||a!==Qt)&&(yt&&be(),yt=setInterval(function(){var u=tt(document.elementFromPoint(r,a),!0);u!==s&&(s=u,Xt()),Jt(n,i.options,u,o)},10),Zt=r,Qt=a)}else{if(!this.options.bubbleScroll||tt(l,!0)===K()){Xt();return}Jt(n,this.options,tt(l,!1),!1)}}},$(e,{pluginName:"scroll",initializeByDefault:!0})}function Xt(){C.forEach(function(e){clearInterval(e.pid)}),C=[]}function be(){clearInterval(yt)}var Jt=Se(function(e,t,n,o){if(t.scroll){var i=(e.touches?e.touches[0]:e).clientX,r=(e.touches?e.touches[0]:e).clientY,a=t.scrollSensitivity,l=t.scrollSpeed,s=K(),u=!1,c;ne!==n&&(ne=n,Xt(),wt=t.scroll,c=t.scrollFn,wt===!0&&(wt=tt(n,!0)));var d=0,b=wt;do{var E=b,w=T(E),y=w.top,Y=w.bottom,j=w.left,I=w.right,B=w.width,M=w.height,et=void 0,W=void 0,nt=E.scrollWidth,ht=E.scrollHeight,F=h(E),pt=E.scrollLeft,V=E.scrollTop;E===s?(et=B<nt&&(F.overflowX==="auto"||F.overflowX==="scroll"||F.overflowX==="visible"),W=M<ht&&(F.overflowY==="auto"||F.overflowY==="scroll"||F.overflowY==="visible")):(et=B<nt&&(F.overflowX==="auto"||F.overflowX==="scroll"),W=M<ht&&(F.overflowY==="auto"||F.overflowY==="scroll"));var gt=et&&(Math.abs(I-i)<=a&&pt+B<nt)-(Math.abs(j-i)<=a&&!!pt),z=W&&(Math.abs(Y-r)<=a&&V+M<ht)-(Math.abs(y-r)<=a&&!!V);if(!C[d])for(var ot=0;ot<=d;ot++)C[ot]||(C[ot]={});(C[d].vx!=gt||C[d].vy!=z||C[d].el!==E)&&(C[d].el=E,C[d].vx=gt,C[d].vy=z,clearInterval(C[d].pid),(gt!=0||z!=0)&&(u=!0,C[d].pid=setInterval(function(){o&&this.layer===0&&p.active._onTouchMove(Wt);var mt=C[this.layer].vy?C[this.layer].vy*l:0,Z=C[this.layer].vx?C[this.layer].vx*l:0;typeof c=="function"&&c.call(p.dragged.parentNode[P],Z,mt,e,Wt,C[this.layer].el)!=="continue"||_e(C[this.layer].el,Z,mt)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&b!==s&&(b=tt(b,!1)));oe=u}},30),Pe=function(t){var n=t.originalEvent,o=t.putSortable,i=t.dragEl,r=t.activeSortable,a=t.dispatchSortableEvent,l=t.hideGhostForTarget,s=t.unhideGhostForTarget;if(n){var u=o||r;l();var c=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,d=document.elementFromPoint(c.clientX,c.clientY);s(),u&&!u.el.contains(d)&&(a("spill"),this.onSpill({dragEl:i,putSortable:o}))}};function ae(){}ae.prototype={startIndex:null,dragStart:function(t){var n=t.oldDraggableIndex;this.startIndex=n},onSpill:function(t){var n=t.dragEl,o=t.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var i=dt(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(n,i):this.sortable.el.appendChild(n),this.sortable.animateAll(),o&&o.animateAll()},drop:Pe};$(ae,{pluginName:"revertOnSpill"});function le(){}le.prototype={onSpill:function(t){var n=t.dragEl,o=t.putSortable,i=o||this.sortable;i.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),i.animateAll()},drop:Pe};$(le,{pluginName:"removeOnSpill"});p.mount(new sn);p.mount(le,ae);var Me=p;var Lt=new Set,un={ghostClass:"calcite-sortable--ghost",chosenClass:"calcite-sortable--chosen",dragClass:"calcite-sortable--drag",fallbackClass:"calcite-sortable--fallback"};function mn(e){if(Fe(e))return;fn(e),Lt.add(e);let t="id",{group:n,handleSelector:o,dragSelector:i,sortDisabled:r}=e;e.sortable=Me.create(e.el,{dataIdAttr:t,swapThreshold:.5,...un,...!!i&&{draggable:i},...!!n&&{sort:!r,group:{name:n,...!!e.canPull&&{pull:(a,l,s,{newDraggableIndex:u,oldDraggableIndex:c})=>e.canPull({toEl:a.el,fromEl:l.el,dragEl:s,newIndex:u,oldIndex:c})},...!!e.canPut&&{put:(a,l,s,{newDraggableIndex:u,oldDraggableIndex:c})=>e.canPut({toEl:a.el,fromEl:l.el,dragEl:s,newIndex:u,oldIndex:c})}}},onMove:({from:a,dragged:l,to:s,related:u})=>{e.onDragMove&&e.onDragMove({fromEl:a,dragEl:l,toEl:s,relatedEl:u})},handle:o,filter:`${o}[disabled]`,onStart:({from:a,item:l,to:s,newDraggableIndex:u,oldDraggableIndex:c})=>{se.active=!0,cn(),e.onDragStart({fromEl:a,dragEl:l,toEl:s,newIndex:u,oldIndex:c})},onEnd:({from:a,item:l,to:s,newDraggableIndex:u,oldDraggableIndex:c})=>{se.active=!1,dn(),e.onDragEnd({fromEl:a,dragEl:l,toEl:s,newIndex:u,oldIndex:c})},onSort:({from:a,item:l,to:s,newDraggableIndex:u,oldDraggableIndex:c})=>{e.onDragSort({fromEl:a,dragEl:l,toEl:s,newIndex:u,oldIndex:c})}})}function fn(e){Fe(e)||(Lt.delete(e),e.sortable?.destroy(),e.sortable=null)}var se={active:!1};function Fe(e){return e.dragEnabled&&se.active}function cn(){Array.from(Lt).forEach(e=>e.onGlobalDragStart())}function dn(){Array.from(Lt).forEach(e=>e.onGlobalDragEnd())}export{mn as a,fn 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 m}from"./
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{h as m}from"./2HKRJLBG.js";import{k as c}from"./CVLFEMH2.js";import{a as y,b as g}from"./NSBK36H4.js";import{a as b}from"./S5CLKCGJ.js";import{a as p}from"./WOTQIMPZ.js";import"./B5JXPZDV.js";import"./3YZG7MA3.js";import"./CIU4VM7X.js";import{k as f,q as v}from"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{D as h,E as t,H as o,P as u,g as n,h as d,o as a}from"./AUIOWPFN.js";var z=n`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:flex;cursor:pointer;outline:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.day-wrapper{position:relative;display:flex;inline-size:100%;flex-direction:column;align-items:center;justify-content:center}.day{position:relative;display:flex;inline-size:100%;align-items:center;justify-content:center;font-size:var(--calcite-font-size--2);line-height:1rem;line-height:1;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;line-height:var(--calcite-font-line-height-fixed-base);block-size:var(--calcite-internal-day-size);outline-color:var(--calcite-color-transparent);background-color:var(--calcite-date-picker-day-background-color);color:var(--calcite-date-picker-day-text-color, var(--calcite-color-text-1))}.text{margin-block:1px 0px;margin-inline-start:0px}:host([scale=s]){--calcite-internal-day-size: 32px}:host([scale=s]) .day{font-size:var(--calcite-font-size--2)}:host([scale=m]){--calcite-internal-day-size: 40px}:host([scale=m]) .day{font-size:var(--calcite-font-size--1)}:host([scale=l]){--calcite-internal-day-size: 44px}:host([scale=l]) .day{font-size:var(--calcite-font-size-0)}:host(:not([current-month])) .day{opacity:var(--calcite-opacity-full);color:var(--calcite-color-text-3)}:host(:focus:not([disabled]):not([selected]):not([current-month])) .day{color:var(--calcite-color-text-1)}:host(:hover:not([disabled]):not([selected])) .day{background-color:var(--calcite-date-picker-day-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-date-picker-day-text-color-hover, var(--calcite-color-text-1))}:host(:not([range]):not([selected]).current-day) .day{color:var(--calcite-date-picker-current-day-text-color, var(--calcite-color-brand));font-weight:var(--calcite-font-weight-bold)}:host(:focus[selected]) .day{z-index:var(--calcite-z-index);outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))));box-shadow:0 0 0 2px var(--calcite-color-foreground-1)}:host(:focus:not([disabled]):not([selected])) .day{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host(:hover:not([disabled]):not([selected])) .day{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([selected]) .day{font-weight:var(--calcite-font-weight-medium);background-color:var(--calcite-date-picker-day-background-color-selected, var(--calcite-color-brand));color:var(--calcite-date-picker-day-text-color-selected, var(--calcite-color-foreground-1))}:host([range-hover]:not([selected])) .day{background-color:var(--calcite-date-picker-day-outside-range-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-date-picker-day-outside-range-text-color-hover, var(--calcite-color-text-1))}:host([highlighted]:not([selected])) .day,:host(:hover[highlighted]:not([selected])) .day{color:var(--calcite-date-picker-day-range-text-color, var(--calcite-color-text-highlight));background-color:var(--calcite-date-picker-day-range-background-color, var(--calcite-color-surface-highlight))}:host([disabled]) .day{color:var(--calcite-color-text-2);text-decoration-line:line-through;opacity:var(--calcite-opacity-disabled)}@media(forced-colors:active){.day{border-radius:0}:host([selected]){outline:2px solid canvasText}:host(:hover:not([selected])) .day{border-radius:50%}:host([range][selected]) .day,:host([highlighted]) .day,:host([range-hover]:not([selected])) .day{background-color:highlight}:host([range-hover]) .day,:host([range][selected][start-of-range]) .day,:host([range][selected][end-of-range]) .day{background-color:canvas}}:host([hidden]){display:none}[hidden]{display:none}`,r={dayWrapper:"day-wrapper",day:"day",text:"text"},i=class extends h{constructor(){super(),this.focusSetter=p()(this),this.active=!1,this.currentMonth=!1,this.disabled=!1,this.endOfRange=!1,this.highlighted=!1,this.range=!1,this.rangeHover=!1,this.selected=!1,this.startOfRange=!1,this.calciteInternalDayHover=a({cancelable:!1}),this.calciteInternalDaySelect=a({cancelable:!1}),this.listen("pointerover",this.pointerOverHandler),this.listen("click",this.onClick),this.listen("keydown",this.keyDownHandler)}static{this.properties={active:[7,{},{reflect:!0,type:Boolean}],currentMonth:[7,{},{reflect:!0,type:Boolean}],dateTimeFormat:[0,{},{attribute:!1}],day:[9,{},{type:Number}],disabled:[7,{},{reflect:!0,type:Boolean}],endOfRange:[7,{},{reflect:!0,type:Boolean}],highlighted:[7,{},{reflect:!0,type:Boolean}],range:[7,{},{reflect:!0,type:Boolean}],rangeEdge:[3,{},{reflect:!0}],rangeHover:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],startOfRange:[7,{},{reflect:!0,type:Boolean}],value:[0,{},{attribute:!1}]}}static{this.styles=z}async setFocus(e){return this.focusSetter(()=>this.el,e)}load(){this.parentDatePickerEl=f(this.el,"calcite-date-picker")}updated(){y(this)}onClick(){this.disabled||this.calciteInternalDaySelect.emit()}keyDownHandler(e){b(e.key)&&(this.disabled||this.calciteInternalDaySelect.emit(),e.preventDefault())}pointerOverHandler(){this.disabled||this.calciteInternalDayHover.emit()}render(){let e=m(this.value).replaceAll("-","");if(this.parentDatePickerEl){let{numberingSystem:l,lang:s}=this.parentDatePickerEl;c.numberFormatOptions={useGrouping:!1,...l&&{numberingSystem:l},...s&&{locale:s}}}let k=c.localize(String(this.day)),x=this.dateTimeFormat.format(this.value);return this.el.ariaLabel=x,this.el.ariaSelected=v(this.active),o(this.el,"id",e),this.el.role="button",o(this.el,"tabIndex",this.active&&!this.disabled?0:-1),g({disabled:this.disabled,children:d`<div aria-hidden=true class=${t(r.dayWrapper)}><span class=${t(r.day)}><span class=${t(r.text)}>${k}</span></span></div>`})}};u("calcite-date-picker-day",i);export{i as DatePickerDay};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as p}from"./
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{a as p}from"./RI3NRBMI.js";import{a as h}from"./KRHM7ACI.js";import{a as o}from"./ALDDSDTX.js";import{a as u}from"./LH7245HX.js";import{a as d}from"./WOTQIMPZ.js";import"./B5JXPZDV.js";import"./3YZG7MA3.js";import"./CIU4VM7X.js";import"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{D as l,E as n,I as r,P as c,g as a,h as i,o as s}from"./AUIOWPFN.js";var g={itemWrapper:"item-wrapper"},m={validationMessage:"radioButtonGroupValidationMessage"},b=a`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:flex;flex-direction:column}:host>.item-wrapper{display:flex;max-inline-size:100vw}:host([layout=horizontal])>.item-wrapper{flex-direction:row;flex-wrap:wrap}:host([layout=horizontal][scale=s])>.item-wrapper{column-gap:var(--calcite-radio-button-group-gap, var(--calcite-spacing-lg))}:host([layout=horizontal][scale=m])>.item-wrapper{column-gap:var(--calcite-radio-button-group-gap, var(--calcite-spacing-xl))}:host([layout=horizontal][scale=l])>.item-wrapper{column-gap:var(--calcite-radio-button-group-gap, var(--calcite-spacing-xxl))}:host([layout=vertical])>.item-wrapper{flex-direction:column;inline-size:fit-content}:host([scale=s]) calcite-input-message{--calcite-input-message-spacing: var( --calcite-radio-button-input-message-spacing, calc(var(--calcite-spacing-xxs) * -1) )}:host([scale=m]) calcite-input-message{--calcite-input-message-spacing: var( --calcite-radio-button-input-message-spacing, calc(var(--calcite-spacing-sm) * -1) )}:host([scale=l]) calcite-input-message{--calcite-input-message-spacing: var( --calcite-radio-button-input-message-spacing, calc(var(--calcite-spacing-md) * -1) )}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}:host([hidden]){display:none}[hidden]{display:none}`,t=class extends l{constructor(){super(),this.messages=u(),this.mutationObserver=o("mutation",()=>this.passPropsToRadioButtons()),this.focusSetter=d()(this),this.radioButtons=[],this.disabled=!1,this.layout="horizontal",this.required=!1,this.scale="m",this.selectedItem=null,this.status="idle",this.calciteRadioButtonGroupChange=s({cancelable:!1}),this.listen("calciteRadioButtonChange",this.radioButtonChangeHandler)}static{this.properties={radioButtons:[16,{},{state:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],labelText:1,layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectedItem:[0,{},{attribute:!1}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:r,type:String},{reflect:!0}],validationMessage:1}}static{this.styles=b}async setFocus(e){return this.focusSetter(()=>this.selectedItem&&!this.selectedItem.disabled?this.selectedItem:this.getFocusableRadioButton(),e)}connectedCallback(){super.connectedCallback(),this.passPropsToRadioButtons(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}willUpdate(e){(e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)||e.has("layout")&&(this.hasUpdated||this.layout!=="horizontal")||e.has("scale")&&(this.hasUpdated||this.scale!=="m"))&&this.passPropsToRadioButtons()}loaded(){this.passPropsToRadioButtons()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}passPropsToRadioButtons(){this.radioButtons=Array.from(this.el.querySelectorAll("calcite-radio-button")),this.selectedItem=Array.from(this.radioButtons).reverse().find(e=>e.checked)||null,this.radioButtons.length>0&&this.radioButtons.forEach(e=>{this.hasUpdated&&(e.disabled=this.disabled||e.disabled),e.name=this.name,e.required=this.required,e.scale=this.scale})}getFocusableRadioButton(){return this.radioButtons.find(e=>!e.disabled)??null}radioButtonChangeHandler(e){this.selectedItem=e.target,this.calciteRadioButtonGroupChange.emit()}render(){return this.el.role="radiogroup",i`${this.labelText&&h({labelText:this.labelText,required:this.required,tooltipText:this.messages.required})||""}<div aria-errormessage=${m.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaRequired=${this.required} class=${n(g.itemWrapper)}><slot></slot></div>${this.validationMessage&&this.status==="invalid"?p({icon:this.validationIcon,id:m.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`}};c("calcite-radio-button-group",t);export{t as RadioButtonGroup};
|
|
@@ -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 t(n){return n==="Enter"||n===" "}var e=["0","1","2","3","4","5","6","7","8","9"];export{t as a,e 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{a as i,b as t,c as e,d as n}from"./
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{a as i,b as t,c as e,d as n}from"./FZIUTVKD.js";var r={width:{medium:a(n.max),small:a(e.max),xsmall:a(t.max),xxsmall:a(i.max)}};function a(s){return parseInt(s)}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{g as e}from"./
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{g as e}from"./AUIOWPFN.js";var a=e`.header{margin:0;display:flex;align-content:space-between;align-items:center;fill:var(--calcite-color-text-2);color:var(--calcite-color-text-2)}.heading{margin:0;padding:0;font-weight:var(--calcite-font-weight-medium)}.header .heading{flex:1 1 auto;padding:.5rem}`;export{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 $}from"./
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{a as $}from"./NULQJBCW.js";import{a as E}from"./S5CLKCGJ.js";import{a as y}from"./LH7245HX.js";import{a as w}from"./WOTQIMPZ.js";import"./B5JXPZDV.js";import{a as g}from"./3YZG7MA3.js";import{a as S}from"./CIU4VM7X.js";import{t as k}from"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{D as f,E as c,G as m,P as b,g as x,h as l,o as d}from"./AUIOWPFN.js";var i={content:"content",toggle:"toggle"},t={chevronIcon:"chevron-icon",content:"content",iconStart:"icon--start",iconEnd:"icon--end",invalid:"invalid",sectionHeaderText:"section-header__text",statusIcon:"status-icon",switch:"switch",toggle:"toggle",toggleContainer:"toggle-container",toggleSwitchContent:"toggle--switch__content",toggleSwitchText:"toggle--switch__text",valid:"valid"},p={menuExpanded:"chevron-up",menuCollapsed:"chevron-down",valid:"check-circle",invalid:"exclamation-mark-triangle"},I=x`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{box-sizing:border-box;display:block;color:var(--calcite-block-section-header-text-color, var(--calcite-color-text-2))}:host([expanded]){border-width:0px;border-block-end-width:1px;border-style:solid;border-block-end-color:var(--calcite-block-section-border-color, var(--calcite-color-border-3))}:host([expanded]) .toggle{color:var(--calcite-block-section-text-color-hover, var(--calcite-color-text-1))}:host([expanded]) .toggle:hover{color:var(--calcite-block-section-text-color-hover, var(--calcite-color-text-1))}:host([expanded]) .chevron-icon{color:var(--calcite-block-section-text-color, var(--calcite-color-text-3))}:host([expanded]) .chevron-icon:hover{color:var(--calcite-block-section-text-color-hover, var(--calcite-color-text-1))}:host(:last-child){border-block-end-width:0px}:host([scale=s]) .toggle{padding-block:var(--calcite-spacing-xxs);gap:var(--calcite-spacing-sm);font-size:var(--calcite-font-size-sm)}:host([scale=s]) .content{padding-block:var(--calcite-block-section-content-space, var(--calcite-spacing-xxs))}:host([scale=m]) .toggle{padding-block:var(--calcite-spacing-sm);gap:var(--calcite-spacing-md);font-size:var(--calcite-font-size)}:host([scale=m]) .content{padding-block:var(--calcite-block-section-content-space, var(--calcite-spacing-sm))}:host([scale=l]) .toggle{padding-block:var(--calcite-spacing-md);gap:var(--calcite-spacing-lg);font-size:var(--calcite-font-size-md)}:host([scale=l]) .content{padding-block:var(--calcite-block-section-content-space, var(--calcite-spacing-md))}.toggle{display:flex;inline-size:100%;cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;border-width:0px;outline-color:transparent;font-family:inherit;color:var(--calcite-block-section-header-text-color, var(--calcite-color-text-2));background-color:var(--calcite-block-section-background-color, var(--calcite-color-foreground-1));font-weight:var(--calcite-font-weight-regular);padding-inline:0;line-height:var(--calcite-font-line-height-relative-snug)}.toggle: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);z-index:var(--calcite-z-index)}.toggle:hover{color:var(--calcite-block-section-text-color-hover, var(--calcite-color-text-1))}.section-header__text{margin-block:0px;flex:1 1 auto;text-align:initial;word-wrap:anywhere}.toggle-container{position:relative;display:flex;align-items:center;word-break:break-word}.toggle-container .toggle--switch__content{display:flex;flex:1 1 auto;align-items:center}.toggle-container .icon--end,.toggle-container .icon--start,.toggle-container .chevron-icon{display:flex;align-items:center;color:var(--calcite-block-section-text-color, var(--calcite-color-text-3))}.toggle-container .icon--end:hover,.toggle-container .icon--start:hover,.toggle-container .chevron-icon:hover{color:var(--calcite-block-section-text-color-hover, var(--calcite-color-text-1))}.status-icon{display:flex;align-items:center}.status-icon.valid{color:var(--calcite-color-status-success)}.status-icon.invalid{color:var(--calcite-color-status-danger)}:host([hidden]){display:none}[hidden]{display:none}`,v=class extends f{constructor(){super(...arguments),this.messages=y(),this.focusSetter=w()(this),this.defaultSlotHasElements=!1,this.expanded=!1,this.scale="m",this.toggleDisplay="button",this.calciteBlockSectionCollapse=d({cancelable:!1}),this.calciteBlockSectionExpand=d({cancelable:!1}),this.calciteBlockSectionToggle=d({cancelable:!1})}static{this.properties={defaultSlotHasElements:[16,{},{state:!0}],expanded:[7,{},{reflect:!0,type:Boolean}],iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{type:String},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],open:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],text:1,toggleDisplay:[3,{},{reflect:!0}]}}static{this.styles=I}get open(){return this.expanded}set open(e){S.deprecated("property",{name:"open",removalVersion:4,suggested:"expanded"}),this.expanded=e}async setFocus(e){return this.focusSetter(()=>this.el,e)}willUpdate(e){e.has("expanded")&&this.hasUpdated&&(this.expanded?this.calciteBlockSectionExpand.emit():this.calciteBlockSectionCollapse.emit())}handleHeaderKeyDown(e){E(e.key)&&(this.toggleSection(),e.preventDefault(),e.stopPropagation())}toggleSection(){this.expanded=!this.expanded,this.calciteBlockSectionToggle.emit()}handleDefaultSlot(e){this.defaultSlotHasElements=k(e)}renderStatusIcon(){let{status:e}=this,o=p[e]??!1,a={[t.statusIcon]:!0,[t.valid]:e=="valid",[t.invalid]:e=="invalid"};return o?l`<calcite-icon class=${c(a)} .icon=${o} .scale=${g(this.scale)}></calcite-icon>`:null}renderIcon(e){let{iconFlipRtl:o,iconStart:a,iconEnd:n}=this;if((e==="start"?a:n)===void 0)return null;let s=o==="both"||o==="start",h=o==="both"||o==="end",r=e==="start";return $(r?a:n,l`<calcite-icon class=${c(r?t.iconStart:t.iconEnd)} .flipRtl=${r?s:h} .icon=${r?a:n} .scale=${g(this.scale)}></calcite-icon>`)}render(){let{messages:e,expanded:o,text:a,toggleDisplay:n}=this,u=o?p.menuExpanded:p.menuCollapsed,s=o?e.collapse:e.expand,h=n==="switch"?l`<div class=${c({[t.toggleContainer]:!0})}><div aria-controls=${i.content} .ariaExpanded=${o} class=${c({[t.toggle]:!0})} id=${i.toggle} @click=${this.toggleSection} @keydown=${this.handleHeaderKeyDown} role=button tabindex=0 title=${s??m}>${this.renderIcon("start")}<div class=${c(t.toggleSwitchContent)}><span class=${c(t.toggleSwitchText)}>${a}</span></div>${this.renderIcon("end")}${this.renderStatusIcon()}<calcite-switch .checked=${o} class=${c(t.switch)} inert .label=${s} .scale=${this.scale}></calcite-switch></div></div>`:l`<div class=${c({[t.toggleContainer]:!0})}><button aria-controls=${i.content} .ariaExpanded=${o} class=${c({[t.toggle]:!0})} id=${i.toggle} @click=${this.toggleSection}>${this.renderIcon("start")}<span class=${c(t.sectionHeaderText)}>${a}</span>${this.renderIcon("end")}${this.renderStatusIcon()}<calcite-icon class=${c(t.chevronIcon)} .icon=${u} .scale=${g(this.scale)}></calcite-icon></button></div>`;return l`${h}<section aria-labelledby=${i.toggle} class=${c({[t.content]:this.defaultSlotHasElements})} .hidden=${!o} id=${i.content}><slot @slotchange=${this.handleDefaultSlot}></slot></section>`}};b("calcite-block-section",v);export{v as BlockSection};
|
|
@@ -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 Q}from"./IWU3WQTA.js";import{b as q}from"./OPTERABQ.js";import{a as R}from"./OBEAWB6Y.js";import{a as J}from"./E2ETQPML.js";import{c as K,d as N,e as j}from"./5JALWDSF.js";import{a as v,c as x,e as G,g as p,h as W}from"./CNF3Q4TX.js";import{a as U}from"./TG4OK7FQ.js";import{a as D,c as F,e as P,f as V,h as H}from"./RWVRFF3I.js";import{a as z,b as B}from"./EU6IVBMM.js";import{a as M}from"./3QKRHYDR.js";import{a as L}from"./FPD3KMKK.js";import{a as g,b as w}from"./RSQ6RL3K.js";import{a as O}from"./WIJWBGXQ.js";import{a as S}from"./XWXCOJUO.js";import{b as E}from"./UXWFYSWM.js";import"./JW4SOJWB.js";import"./P2RYGBBZ.js";import{t as b}from"./SLICSH62.js";import{a as T}from"./DNM3U3Z7.js";import{B as C,C as m,D as k,E as r,I as f,P as A,g as $,h as d,l as n,o as c}from"./ALOAVLGK.js";var 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{position:relative;display:block}.input-container{position:relative;display:flex;flex:1 1 auto;flex-wrap:nowrap}.input{width:100%;--calcite-input-prefix-size: var(--calcite-autocomplete-input-prefix-size);--calcite-input-suffix-size: var(--calcite-autocomplete-input-suffix-size);--calcite-input-background-color: var(--calcite-autocomplete-input-background-color);--calcite-input-border-color: var(--calcite-autocomplete-input-border-color);--calcite-input-corner-radius: var(--calcite-autocomplete-input-corner-radius);--calcite-input-shadow: var(--calcite-autocomplete-input-shadow);--calcite-input-icon-color: var(--calcite-autocomplete-input-icon-color);--calcite-input-text-color: var(--calcite-autocomplete-input-text-color);--calcite-input-placeholder-text-color: var(--calcite-autocomplete-input-placeholder-text-color);--calcite-input-actions-background-color: var(--calcite-autocomplete-input-actions-background-color);--calcite-input-actions-background-color-hover: var(--calcite-autocomplete-input-actions-background-color-hover);--calcite-input-actions-background-color-press: var(--calcite-autocomplete-input-actions-background-color-press);--calcite-input-actions-icon-color: var(--calcite-autocomplete-input-actions-icon-color);--calcite-input-actions-icon-color-hover: var(--calcite-autocomplete-input-actions-icon-color-hover);--calcite-input-actions-icon-color-press: var(--calcite-autocomplete-input-actions-icon-color-press);--calcite-input-loading-background-color: var(--calcite-autocomplete-input-loading-background-color);--calcite-input-loading-fill-color: var(--calcite-autocomplete-input-loading-fill-color);--calcite-input-prefix-text-color: var(--calcite-autocomplete-input-prefix-text-color);--calcite-input-suffix-text-color: var(--calcite-autocomplete-input-suffix-text-color)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.content-container{box-sizing:border-box;width:100%}.floating-ui-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0}@starting-style{.floating-ui-container{opacity:0;inset-block-start:0;left:0}}.floating-ui-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.floating-ui-container:popover-open{display:block}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.content-container .calcite-floating-ui-anim{max-height:45vh;width:100%;overflow-y:auto;color:var(--calcite-autocomplete-text-color, var(--calcite-color-text-1));background-color:var(--calcite-autocomplete-background-color, var(--calcite-color-foreground-1));border-radius:var(--calcite-autocomplete-corner-radius, var(--calcite-corner-radius-round))}.content--hidden{display:none}@media(forced-colors:active){.floating-ui-container--active{border:1px solid canvasText}}.screen-readers-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`,X={contentBottom:"content-bottom",contentTop:"content-top"},s={inputContainer:"input-container",input:"input",contentContainer:"content-container",contentAnimation:"content-animation",content:"content",contentHidden:"content--hidden",floatingUIContainer:"floating-ui-container",floatingUIContainerActive:"floating-ui-container--active",screenReadersOnly:"screen-readers-only"},Y="autocomplete",y={validationMessage:"autocompleteValidationMessage",input:h=>`${Y}-input-${h}`,list:h=>`${Y}-list-${h}`},_="calcite-autocomplete-item-group",tt="calcite-autocomplete-item",I=class extends k{constructor(){super(),this.guid=T(),this.attributeWatch=E(["autofocus","enterkeyhint","inputmode"],this.handleGlobalAttributesChanged),this.inputId=y.input(this.guid),this.listId=y.list(this.guid),this.messages=O(),this.transitionProp="opacity",this.transitionRef=C(),this.mutationObserver=g("mutation",()=>this.getAllItemsDebounced()),this.focusSetter=S()(this),this.resizeObserver=g("resize",()=>{this.setFloatingElSize()}),this.cancelable=M()(this),this.getAllItemsDebounced=L(this.getAllItems,0),this.activeDescendant="",this.activeIndex=-1,this.hasContentBottom=!1,this.hasContentTop=!1,this.items=[],this.groups=[],this.alignment="start",this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.open=!1,this.overlayPositioning="absolute",this.placement=v,this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.value="",this.calciteAutocompleteBeforeClose=c({cancelable:!1}),this.calciteAutocompleteBeforeOpen=c({cancelable:!1}),this.calciteAutocompleteChange=c({cancelable:!1}),this.calciteAutocompleteClose=c({cancelable:!1}),this.calciteAutocompleteOpen=c({cancelable:!1}),this.calciteAutocompleteTextChange=c({cancelable:!1}),this.calciteAutocompleteTextInput=c({cancelable:!1}),this.listenOn(document,"click",this.documentClickHandler),this.listen("calciteAutocompleteItemSelect",this.handleAutocompleteItemSelect)}static{this.properties={activeDescendant:[16,{},{state:!0}],activeIndex:[16,{},{state:!0}],hasContentBottom:[16,{},{state:!0}],hasContentTop:[16,{},{state:!0}],items:[16,{},{state:!0}],groups:[16,{},{state:!0}],alignment:[3,{},{reflect:!0}],autocomplete:[0,{},{attribute:!1}],disabled:[7,{},{reflect:!0,type:Boolean}],flipPlacements:[0,{},{attribute:!1}],form:[3,{},{reflect:!0}],icon:[3,{converter:f,type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],inputValue:1,label:1,labelText:1,loading:[7,{},{reflect:!0,type:Boolean}],maxLength:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],minLength:[11,{},{reflect:!0,type:Number}],name:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],pattern:1,placeholder:1,placement:[3,{},{reflect:!0}],prefixText:1,readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],suffixText:1,validationIcon:[3,{converter:f,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:1}}static{this.styles=Z}get isOpen(){return this.open&&(this.hasContentTop||this.hasContentBottom||this.items.length>0)}get enabledItems(){return this.items.filter(t=>!t.disabled)}async reposition(t=!1){let{floatingEl:e,referenceEl:l,placement:i,overlayPositioning:o,flipPlacements:a}=this;return G(this,{floatingEl:e,referenceEl:l,overlayPositioning:o,placement:i,flipPlacements:a,type:"menu"},t)}async scrollContentTo(t){this.transitionRef.value?.scrollTo(t)}async selectText(){return this.referenceEl.selectText()}async setFocus(t){return this.focusSetter(()=>this.referenceEl,t)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),K(this),F(this),this.defaultInputValue=this.inputValue||"",this.getAllItemsDebounced(),p(this),this.cancelable.add(this.getAllItemsDebounced)}async load(){this.getAllItemsDebounced()}willUpdate(t){t.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),t.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),(t.has("flipPlacements")||t.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||t.has("placement")&&(this.hasUpdated||this.placement!==v))&&this.reposition(!0);let e=!1;t.has("inputValue")&&(this.hasUpdated||this.inputValue)&&(this.inputValueMatchPattern=this.inputValue&&new RegExp(`(${q(this.inputValue)})`,"i"),this.updateItems(),this.updateGroups(),e=!0),!e&&t.has("scale")&&(this.hasUpdated||this.scale!=="m")&&(this.updateItems(),this.updateGroups(),e=!0),!e&&t.has("activeIndex")&&(this.hasUpdated||this.activeIndex!==-1)&&this.updateItems()}updated(){z(this)}loaded(){V(this,this.value||""),this.defaultInputValue=this.inputValue||"",p(this)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),N(this),P(this),W(this)}async handlePopover(){await this.componentOnReady(),this.floatingEl&&(this.open?this.floatingEl.showPopover():this.floatingEl.hidePopover())}setFloatingElSize(){let{referenceEl:t,floatingEl:e}=this;!t||!e||(e.style.inlineSize=`${t.clientWidth}px`)}handleGlobalAttributesChanged(){this.requestUpdate()}handleDisabledChange(t){t||(this.open=!1)}openHandler(){if(U(this),this.open||(this.activeIndex=-1),this.disabled){this.open=!1;return}this.setFloatingElSize(),this.reposition(!0),this.handlePopover()}async documentClickHandler(t){this.disabled||t.composedPath().includes(this.el)||(this.open=!1)}async handleAutocompleteItemSelect(t){this.value=t.target.value,this.emitChange(),await this.setFocus(),this.open=!1}onLabelClick(){this.setFocus()}onFormReset(){this.inputValue=this.defaultInputValue}onBeforeOpen(){this.calciteAutocompleteBeforeOpen.emit()}onOpen(){this.calciteAutocompleteOpen.emit()}onBeforeClose(){this.calciteAutocompleteBeforeClose.emit()}onClose(){this.calciteAutocompleteClose.emit()}emitChange(){this.calciteAutocompleteChange.emit()}updateGroups(){this.groups.forEach((t,e,l)=>{t.scale=this.scale,t.position=e,e===0&&(t.disableSpacing=!0);let i=l[e+1];i&&(i.disableSpacing=t.children.length===0)})}updateItems(){let t=null;this.items.forEach(e=>{e.scale=this.scale,e.inputValueMatchPattern=this.inputValueMatchPattern}),this.enabledItems.forEach((e,l)=>{let i=l===this.activeIndex;i&&(t=e.guid),e.active=i}),this.activeDescendant=t}handleInputFocus(){this.open=!0}handleContentTopSlotChange(t){this.hasContentTop=b(t)}handleContentBottomSlotChange(t){this.hasContentBottom=b(t)}getAllItems(){let{el:t}=this;this.groups=Array.from(t.querySelectorAll(_)),this.items=Array.from(t.querySelectorAll(tt)),this.updateItems(),this.updateGroups()}setReferenceEl(t){w(this.resizeObserver,this.referenceEl,t),this.referenceEl=t,p(this)}keyDownHandler(t){let{defaultPrevented:e,key:l}=t;if(e)return;let{open:i,activeIndex:o,enabledItems:a}=this,u=a.length&&o>-1?a[o]:null;switch(l){case"Escape":i&&(this.open=!1,t.preventDefault());break;case"Tab":this.open=!1;break;case"Enter":i&&u?(this.value=u.value,u.emitSelectEvent(),this.open=!1,t.preventDefault()):t.defaultPrevented||D(this)&&t.preventDefault();break;case"ArrowDown":a.length&&(this.open=!0,this.activeIndex=o!==-1?Math.min(o+1,a.length-1):0,this.scrollToActiveItem(),t.preventDefault());break;case"ArrowUp":a.length&&(this.open=!0,this.activeIndex=o!==-1?Math.max(o-1,0):a.length-1,this.scrollToActiveItem(),t.preventDefault());break;case"Home":a.length&&(this.open=!0,this.activeIndex=0,this.scrollToActiveItem(),t.preventDefault());break;case"End":a.length&&(this.open=!0,this.activeIndex=a.length-1,this.scrollToActiveItem(),t.preventDefault());break}}scrollToActiveItem(){this.enabledItems[this.activeIndex]?.scrollIntoView({block:"nearest"})}changeHandler(t){t.stopPropagation(),this.inputValue=t.target.value,this.calciteAutocompleteTextChange.emit()}inputClickHandler(t){t.defaultPrevented||(this.open=!0)}inputHandler(t){t.stopPropagation(),this.inputValue=t.target.value,this.open=this.inputValue?.length>0,this.calciteAutocompleteTextInput.emit()}setFloatingEl(t){this.floatingEl=t,p(this),this.handlePopover()}render(){let{disabled:t,listId:e,inputId:l,isOpen:i}=this,o=this.el.autofocus,a=this.el.enterKeyHint,u=this.el.inputMode;return B({disabled:t,children:d`${this.labelText&&J({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div class=${r(s.inputContainer)}><calcite-input .alignment=${this.alignment} aria-activedescendant=${this.activeDescendant??n} aria-controls=${e??n} aria-label=${j(this)??n} aria-owns=${e??n} aria-autocomplete=list .ariaExpanded=${i} aria-haspopup=listbox .autocomplete=${this.autocomplete} .autofocus=${o} class=${r(s.input)} clearable .disabled=${t} enterkeyhint=${a??n} .form=${this.form} .icon=${this.icon??!0} .iconFlipRtl=${this.iconFlipRtl} id=${l??n} inputmode=${u??n} .label=${this.label} .loading=${this.loading} .maxLength=${this.maxLength} .messageOverrides=${this.messages} .minLength=${this.minLength} .name=${this.name} @click=${this.inputClickHandler} @keydown=${this.keyDownHandler} @calciteInputChange=${this.changeHandler} @calciteInputInput=${this.inputHandler} @calciteInternalInputFocus=${this.handleInputFocus} .pattern=${this.pattern} .placeholder=${this.placeholder} .prefixText=${this.prefixText} .readOnly=${this.readOnly} .required=${this.required} role=combobox .scale=${this.scale} .status=${this.status} .suffixText=${this.suffixText} type=search .value=${this.inputValue} ${m(this.setReferenceEl)}></calcite-input>${this.renderListBox()}<div class=${r({[s.contentContainer]:!0,[s.floatingUIContainer]:!0,[s.floatingUIContainerActive]:i})} popover=manual ${m(this.setFloatingEl)}><div class=${r({[s.contentAnimation]:!0,[x.animation]:!0,[x.animationActive]:i})} ${m(this.transitionRef)}><div class=${r({[s.content]:!0,[s.contentHidden]:!i})}><slot name=${X.contentTop} @slotchange=${this.handleContentTopSlotChange}></slot><slot aria-hidden=true></slot><slot name=${X.contentBottom} @slotchange=${this.handleContentBottomSlotChange}></slot></div></div></div></div>${H({component:this})}${this.validationMessage&&this.status==="invalid"?Q({icon:this.validationIcon,id:y.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}renderListBox(){return d`<ul aria-labelledby=${this.inputId??n} aria-live=polite class=${r(s.screenReadersOnly)} id=${this.listId??n} role=listbox tabindex=-1>${this.renderListBoxOptions()}</ul>`}renderListBoxOptions(){return R(this.items.filter(t=>!!(t.label||t.heading)),t=>t.guid,t=>d`<li .ariaDisabled=${t.disabled} .ariaLabel=${t.label} id=${t.guid??n} role=option tabindex=-1>${t.heading}${t.description}</li>`)}};A("calcite-autocomplete",I);export{I as Autocomplete};
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{a as Q}from"./RI3NRBMI.js";import{b as q}from"./Y442PVMQ.js";import{a as R}from"./AHOXXRX5.js";import{a as J}from"./KRHM7ACI.js";import{c as K,d as N,e as j}from"./ZVWKN3G7.js";import{a as v,c as x,e as G,g as p,h as W}from"./5LAPR75M.js";import{a as U}from"./VQMSSO2U.js";import{a as D,c as F,e as P,f as V,h as H}from"./Y3HXK6MO.js";import{a as z,b as B}from"./NSBK36H4.js";import{a as M}from"./PSCEW76J.js";import{a as L}from"./W5OJOVZY.js";import{a as g,b as w}from"./ALDDSDTX.js";import{a as O}from"./LH7245HX.js";import{a as S}from"./WOTQIMPZ.js";import{b as E}from"./B5JXPZDV.js";import"./3YZG7MA3.js";import"./CIU4VM7X.js";import{t as b}from"./5IPJANUU.js";import{a as T}from"./ZLR2B6GQ.js";import{B as C,C as m,D as k,E as r,I as f,P as A,g as $,h as d,l as n,o as c}from"./AUIOWPFN.js";var 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{position:relative;display:block}.input-container{position:relative;display:flex;flex:1 1 auto;flex-wrap:nowrap}.input{width:100%;--calcite-input-prefix-size: var(--calcite-autocomplete-input-prefix-size);--calcite-input-suffix-size: var(--calcite-autocomplete-input-suffix-size);--calcite-input-background-color: var(--calcite-autocomplete-input-background-color);--calcite-input-border-color: var(--calcite-autocomplete-input-border-color);--calcite-input-corner-radius: var(--calcite-autocomplete-input-corner-radius);--calcite-input-shadow: var(--calcite-autocomplete-input-shadow);--calcite-input-icon-color: var(--calcite-autocomplete-input-icon-color);--calcite-input-text-color: var(--calcite-autocomplete-input-text-color);--calcite-input-placeholder-text-color: var(--calcite-autocomplete-input-placeholder-text-color);--calcite-input-actions-background-color: var(--calcite-autocomplete-input-actions-background-color);--calcite-input-actions-background-color-hover: var(--calcite-autocomplete-input-actions-background-color-hover);--calcite-input-actions-background-color-press: var(--calcite-autocomplete-input-actions-background-color-press);--calcite-input-actions-icon-color: var(--calcite-autocomplete-input-actions-icon-color);--calcite-input-actions-icon-color-hover: var(--calcite-autocomplete-input-actions-icon-color-hover);--calcite-input-actions-icon-color-press: var(--calcite-autocomplete-input-actions-icon-color-press);--calcite-input-loading-background-color: var(--calcite-autocomplete-input-loading-background-color);--calcite-input-loading-fill-color: var(--calcite-autocomplete-input-loading-fill-color);--calcite-input-prefix-text-color: var(--calcite-autocomplete-input-prefix-text-color);--calcite-input-suffix-text-color: var(--calcite-autocomplete-input-suffix-text-color)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.content-container{box-sizing:border-box;width:100%}.floating-ui-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0}@starting-style{.floating-ui-container{opacity:0;inset-block-start:0;left:0}}.floating-ui-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.floating-ui-container:popover-open{display:block}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.content-container .calcite-floating-ui-anim{max-height:45vh;width:100%;overflow-y:auto;color:var(--calcite-autocomplete-text-color, var(--calcite-color-text-1));background-color:var(--calcite-autocomplete-background-color, var(--calcite-color-foreground-1));border-radius:var(--calcite-autocomplete-corner-radius, var(--calcite-corner-radius-round))}.content--hidden{display:none}@media(forced-colors:active){.floating-ui-container--active{border:1px solid canvasText}}.screen-readers-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`,X={contentBottom:"content-bottom",contentTop:"content-top"},s={inputContainer:"input-container",input:"input",contentContainer:"content-container",contentAnimation:"content-animation",content:"content",contentHidden:"content--hidden",floatingUIContainer:"floating-ui-container",floatingUIContainerActive:"floating-ui-container--active",screenReadersOnly:"screen-readers-only"},Y="autocomplete",y={validationMessage:"autocompleteValidationMessage",input:h=>`${Y}-input-${h}`,list:h=>`${Y}-list-${h}`},_="calcite-autocomplete-item-group",tt="calcite-autocomplete-item",I=class extends k{constructor(){super(),this.guid=T(),this.attributeWatch=E(["autofocus","enterkeyhint","inputmode"],this.handleGlobalAttributesChanged),this.inputId=y.input(this.guid),this.listId=y.list(this.guid),this.messages=O(),this.transitionProp="opacity",this.transitionRef=C(),this.mutationObserver=g("mutation",()=>this.getAllItemsDebounced()),this.focusSetter=S()(this),this.resizeObserver=g("resize",()=>{this.setFloatingElSize()}),this.cancelable=M()(this),this.getAllItemsDebounced=L(this.getAllItems,0),this.activeDescendant="",this.activeIndex=-1,this.hasContentBottom=!1,this.hasContentTop=!1,this.items=[],this.groups=[],this.alignment="start",this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.open=!1,this.overlayPositioning="absolute",this.placement=v,this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.value="",this.calciteAutocompleteBeforeClose=c({cancelable:!1}),this.calciteAutocompleteBeforeOpen=c({cancelable:!1}),this.calciteAutocompleteChange=c({cancelable:!1}),this.calciteAutocompleteClose=c({cancelable:!1}),this.calciteAutocompleteOpen=c({cancelable:!1}),this.calciteAutocompleteTextChange=c({cancelable:!1}),this.calciteAutocompleteTextInput=c({cancelable:!1}),this.listenOn(document,"click",this.documentClickHandler),this.listen("calciteAutocompleteItemSelect",this.handleAutocompleteItemSelect)}static{this.properties={activeDescendant:[16,{},{state:!0}],activeIndex:[16,{},{state:!0}],hasContentBottom:[16,{},{state:!0}],hasContentTop:[16,{},{state:!0}],items:[16,{},{state:!0}],groups:[16,{},{state:!0}],alignment:[3,{},{reflect:!0}],autocomplete:[0,{},{attribute:!1}],disabled:[7,{},{reflect:!0,type:Boolean}],flipPlacements:[0,{},{attribute:!1}],form:[3,{},{reflect:!0}],icon:[3,{converter:f,type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],inputValue:1,label:1,labelText:1,loading:[7,{},{reflect:!0,type:Boolean}],maxLength:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],minLength:[11,{},{reflect:!0,type:Number}],name:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],pattern:1,placeholder:1,placement:[3,{},{reflect:!0}],prefixText:1,readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],suffixText:1,validationIcon:[3,{converter:f,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:1}}static{this.styles=Z}get isOpen(){return this.open&&(this.hasContentTop||this.hasContentBottom||this.items.length>0)}get enabledItems(){return this.items.filter(t=>!t.disabled)}async reposition(t=!1){let{floatingEl:e,referenceEl:l,placement:i,overlayPositioning:o,flipPlacements:a}=this;return G(this,{floatingEl:e,referenceEl:l,overlayPositioning:o,placement:i,flipPlacements:a,type:"menu"},t)}async scrollContentTo(t){this.transitionRef.value?.scrollTo(t)}async selectText(){return this.referenceEl.selectText()}async setFocus(t){return this.focusSetter(()=>this.referenceEl,t)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),K(this),F(this),this.defaultInputValue=this.inputValue||"",this.getAllItemsDebounced(),p(this),this.cancelable.add(this.getAllItemsDebounced)}async load(){this.getAllItemsDebounced()}willUpdate(t){t.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),t.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),(t.has("flipPlacements")||t.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||t.has("placement")&&(this.hasUpdated||this.placement!==v))&&this.reposition(!0);let e=!1;t.has("inputValue")&&(this.hasUpdated||this.inputValue)&&(this.inputValueMatchPattern=this.inputValue&&new RegExp(`(${q(this.inputValue)})`,"i"),this.updateItems(),this.updateGroups(),e=!0),!e&&t.has("scale")&&(this.hasUpdated||this.scale!=="m")&&(this.updateItems(),this.updateGroups(),e=!0),!e&&t.has("activeIndex")&&(this.hasUpdated||this.activeIndex!==-1)&&this.updateItems()}updated(){z(this)}loaded(){V(this,this.value||""),this.defaultInputValue=this.inputValue||"",p(this)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),N(this),P(this),W(this)}async handlePopover(){await this.componentOnReady(),this.floatingEl&&(this.open?this.floatingEl.showPopover():this.floatingEl.hidePopover())}setFloatingElSize(){let{referenceEl:t,floatingEl:e}=this;!t||!e||(e.style.inlineSize=`${t.clientWidth}px`)}handleGlobalAttributesChanged(){this.requestUpdate()}handleDisabledChange(t){t||(this.open=!1)}openHandler(){if(U(this),this.open||(this.activeIndex=-1),this.disabled){this.open=!1;return}this.setFloatingElSize(),this.reposition(!0),this.handlePopover()}async documentClickHandler(t){this.disabled||t.composedPath().includes(this.el)||(this.open=!1)}async handleAutocompleteItemSelect(t){this.value=t.target.value,this.emitChange(),await this.setFocus(),this.open=!1}onLabelClick(){this.setFocus()}onFormReset(){this.inputValue=this.defaultInputValue}onBeforeOpen(){this.calciteAutocompleteBeforeOpen.emit()}onOpen(){this.calciteAutocompleteOpen.emit()}onBeforeClose(){this.calciteAutocompleteBeforeClose.emit()}onClose(){this.calciteAutocompleteClose.emit()}emitChange(){this.calciteAutocompleteChange.emit()}updateGroups(){this.groups.forEach((t,e,l)=>{t.scale=this.scale,t.position=e,e===0&&(t.disableSpacing=!0);let i=l[e+1];i&&(i.disableSpacing=t.children.length===0)})}updateItems(){let t=null;this.items.forEach(e=>{e.scale=this.scale,e.inputValueMatchPattern=this.inputValueMatchPattern}),this.enabledItems.forEach((e,l)=>{let i=l===this.activeIndex;i&&(t=e.guid),e.active=i}),this.activeDescendant=t}handleInputFocus(){this.open=!0}handleContentTopSlotChange(t){this.hasContentTop=b(t)}handleContentBottomSlotChange(t){this.hasContentBottom=b(t)}getAllItems(){let{el:t}=this;this.groups=Array.from(t.querySelectorAll(_)),this.items=Array.from(t.querySelectorAll(tt)),this.updateItems(),this.updateGroups()}setReferenceEl(t){w(this.resizeObserver,this.referenceEl,t),this.referenceEl=t,p(this)}keyDownHandler(t){let{defaultPrevented:e,key:l}=t;if(e)return;let{open:i,activeIndex:o,enabledItems:a}=this,u=a.length&&o>-1?a[o]:null;switch(l){case"Escape":i&&(this.open=!1,t.preventDefault());break;case"Tab":this.open=!1;break;case"Enter":i&&u?(this.value=u.value,u.emitSelectEvent(),this.open=!1,t.preventDefault()):t.defaultPrevented||D(this)&&t.preventDefault();break;case"ArrowDown":a.length&&(this.open=!0,this.activeIndex=o!==-1?Math.min(o+1,a.length-1):0,this.scrollToActiveItem(),t.preventDefault());break;case"ArrowUp":a.length&&(this.open=!0,this.activeIndex=o!==-1?Math.max(o-1,0):a.length-1,this.scrollToActiveItem(),t.preventDefault());break;case"Home":a.length&&(this.open=!0,this.activeIndex=0,this.scrollToActiveItem(),t.preventDefault());break;case"End":a.length&&(this.open=!0,this.activeIndex=a.length-1,this.scrollToActiveItem(),t.preventDefault());break}}scrollToActiveItem(){this.enabledItems[this.activeIndex]?.scrollIntoView({block:"nearest"})}changeHandler(t){t.stopPropagation(),this.inputValue=t.target.value,this.calciteAutocompleteTextChange.emit()}inputClickHandler(t){t.defaultPrevented||(this.open=!0)}inputHandler(t){t.stopPropagation(),this.inputValue=t.target.value,this.open=this.inputValue?.length>0,this.calciteAutocompleteTextInput.emit()}setFloatingEl(t){this.floatingEl=t,p(this),this.handlePopover()}render(){let{disabled:t,listId:e,inputId:l,isOpen:i}=this,o=this.el.autofocus,a=this.el.enterKeyHint,u=this.el.inputMode;return B({disabled:t,children:d`${this.labelText&&J({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div class=${r(s.inputContainer)}><calcite-input .alignment=${this.alignment} aria-activedescendant=${this.activeDescendant??n} aria-controls=${e??n} aria-label=${j(this)??n} aria-owns=${e??n} aria-autocomplete=list .ariaExpanded=${i} aria-haspopup=listbox .autocomplete=${this.autocomplete} .autofocus=${o} class=${r(s.input)} clearable .disabled=${t} enterkeyhint=${a??n} .form=${this.form} .icon=${this.icon??!0} .iconFlipRtl=${this.iconFlipRtl} id=${l??n} inputmode=${u??n} .label=${this.label} .loading=${this.loading} .maxLength=${this.maxLength} .messageOverrides=${this.messages} .minLength=${this.minLength} .name=${this.name} @click=${this.inputClickHandler} @keydown=${this.keyDownHandler} @calciteInputChange=${this.changeHandler} @calciteInputInput=${this.inputHandler} @calciteInternalInputFocus=${this.handleInputFocus} .pattern=${this.pattern} .placeholder=${this.placeholder} .prefixText=${this.prefixText} .readOnly=${this.readOnly} .required=${this.required} role=combobox .scale=${this.scale} .status=${this.status} .suffixText=${this.suffixText} type=search .value=${this.inputValue} ${m(this.setReferenceEl)}></calcite-input>${this.renderListBox()}<div class=${r({[s.contentContainer]:!0,[s.floatingUIContainer]:!0,[s.floatingUIContainerActive]:i})} popover=manual ${m(this.setFloatingEl)}><div class=${r({[s.contentAnimation]:!0,[x.animation]:!0,[x.animationActive]:i})} ${m(this.transitionRef)}><div class=${r({[s.content]:!0,[s.contentHidden]:!i})}><slot name=${X.contentTop} @slotchange=${this.handleContentTopSlotChange}></slot><slot aria-hidden=true></slot><slot name=${X.contentBottom} @slotchange=${this.handleContentBottomSlotChange}></slot></div></div></div></div>${H({component:this})}${this.validationMessage&&this.status==="invalid"?Q({icon:this.validationIcon,id:y.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}renderListBox(){return d`<ul aria-labelledby=${this.inputId??n} aria-live=polite class=${r(s.screenReadersOnly)} id=${this.listId??n} role=listbox tabindex=-1>${this.renderListBoxOptions()}</ul>`}renderListBoxOptions(){return R(this.items.filter(t=>!!(t.label||t.heading)),t=>t.guid,t=>d`<li .ariaDisabled=${t.disabled} .ariaLabel=${t.label} id=${t.guid??n} role=option tabindex=-1>${t.heading}${t.description}</li>`)}};A("calcite-autocomplete",I);export{I as Autocomplete};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as y}from"./
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{a as y}from"./ALDDSDTX.js";import{a as z}from"./LH7245HX.js";import"./B5JXPZDV.js";import{c as d}from"./3YZG7MA3.js";import"./CIU4VM7X.js";import{u as x,y as c}from"./5IPJANUU.js";import{a as A}from"./ZLR2B6GQ.js";import{B as g,C as v,D as S,E as r,P as I,g as b,h as n,i as f,l as m,o as p}from"./AUIOWPFN.js";var h={actionIcon:"action-icon",actionContainer:"action-container",stepBarContainer:"step-bar-container",singleView:"single-view"},C={chevronLeft:"chevron-left",chevronRight:"chevron-right"},B="calcite-stepper-action",R={position:(o,e)=>`${B}-${o}-${e?"start":"end"}`},l={stepBar:"step-bar",stepBarActive:"step-bar--active",stepBarComplete:"step-bar--complete",stepBarDisabled:"step-bar--disabled",stepBarError:"step-bar--error",stepBarInActive:"step-bar--inactive"},M=({disabled:o,active:e,complete:t,error:i})=>n`<svg class=${r({[l.stepBar]:!0})}>${f`<rect class=${r({[l.stepBarActive]:e,[l.stepBarComplete]:t,[l.stepBarDisabled]:o,[l.stepBarError]:i,[l.stepBarInActive]:!0})} width=100% x=0 y=0 />`}</svg>`,T=b`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([scale=s]){--calcite-internal-stepper-item-spacing-unit-s: .25rem;--calcite-internal-stepper-action-block-size: 2.75rem;--calcite-internal-stepper-action-inline-size: 2rem;--calcite-internal-step-bar-gap: .25rem}:host([scale=m]){--calcite-internal-stepper-item-spacing-unit-s: .5rem;--calcite-internal-stepper-action-block-size: 3.25rem;--calcite-internal-stepper-action-inline-size: 2.5rem}:host([scale=l]){--calcite-internal-stepper-item-spacing-unit-s: .75rem;--calcite-internal-stepper-action-block-size: 4rem;--calcite-internal-stepper-action-inline-size: 3rem;--calcite-internal-step-bar-gap: .75rem}:host{display:flex}.container{position:relative;display:flex;inline-size:100%;min-inline-size:fit-content;flex-direction:row;flex-wrap:wrap;align-items:stretch;justify-content:space-between}:host([layout=vertical]) .container{flex:1 1 auto;flex-direction:column}:host([layout=horizontal]) .container,:host([layout=horizontal-single]) .container{display:grid;grid-template-areas:"items" "content";gap:.5rem var(--calcite-stepper-bar-gap, var(--calcite-internal-stepper-item-spacing-unit-s))}:host([layout=horizontal][scale=s]) .container,:host([layout=horizontal-single][scale=s]) .container{gap:.25rem var(--calcite-stepper-bar-gap, var(--calcite-internal-stepper-item-spacing-unit-s))}:host([layout=horizontal][scale=l]) .container,:host([layout=horizontal-single][scale=l]) .container{gap:.75rem var(--calcite-stepper-bar-gap, var(--calcite-internal-stepper-item-spacing-unit-s))}:host([layout=horizontal]) .container.single-view{display:flex;grid-template-columns:none}.action-icon{position:relative;display:flex;flex-grow:0;block-size:var(--calcite-internal-stepper-action-block-size);inline-size:var(--calcite-internal-stepper-action-inline-size)}.action-container{position:absolute;display:flex;justify-content:space-between;padding-block:.25rem;inline-size:100%}.step-bar{display:flex;block-size:100%;inline-size:100%}.step-bar-container{position:absolute;display:flex;align-items:flex-start;justify-content:space-between;block-size:.125rem;inline-size:100%;gap:var(--calcite-stepper-bar-gap, var(--calcite-internal-step-bar-gap, .5rem))}.step-bar--inactive{fill:var(--calcite-stepper-bar-inactive-fill-color, var(--calcite-color-border-3, #dfdfdf));fill-opacity:1;block-size:100%}.step-bar--active{fill:var(--calcite-stepper-bar-active-fill-color, var(--calcite-color-brand))}.step-bar--complete{fill:var(--calcite-stepper-bar-complete-fill-color, var(--calcite-color-brand));fill-opacity:.5}.step-bar--error{fill:var(--calcite-stepper-bar-error-fill-color, var(--calcite-color-status-danger))}.step-bar--disabled{opacity:.5}:host([hidden]){display:none}[hidden]{display:none}`,u=class extends S{constructor(){super(),this.containerRef=g(),this.enabledItems=[],this.guid=A(),this.itemMap=new Map,this.items=[],this.multipleViewMode=!1,this.mutationObserver=y("mutation",()=>this.updateItems()),this.messages=z(),this.icon=!1,this.layout="horizontal",this.numbered=!1,this.scale="m",this.selectedItem=null,this.calciteInternalStepperItemChange=p({cancelable:!1}),this.calciteStepperChange=p({cancelable:!1}),this.calciteStepperItemChange=p({cancelable:!1}),this.listen("calciteInternalStepperItemKeyEvent",this.calciteInternalStepperItemKeyEvent),this.listen("calciteInternalStepperItemRegister",this.registerItem),this.listen("calciteInternalStepperItemSelect",this.updateItem),this.listen("calciteStepperItemSelect",this.handleItemSelect)}static{this.properties={currentActivePosition:[16,{},{state:!0}],icon:[7,{},{reflect:!0,type:Boolean}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],numbered:[7,{},{reflect:!0,type:Boolean}],numberingSystem:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selectedItem:[0,{},{attribute:!1}]}}static{this.styles=T}async endStep(){let e=this.getEnabledStepIndex(this.items.length-1,"previous");typeof e=="number"&&this.updateStep(e)}async goToStep(e){let t=e-1;this.currentActivePosition!==t&&this.updateStep(t)}async nextStep(){let e=this.getEnabledStepIndex(this.currentActivePosition+1,"next");typeof e=="number"&&this.updateStep(e)}async prevStep(){let e=this.getEnabledStepIndex(this.currentActivePosition-1,"previous");typeof e=="number"&&this.updateStep(e)}async startStep(){let e=this.getEnabledStepIndex(0,"next");typeof e=="number"&&this.updateStep(e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0}),this.updateItems()}willUpdate(e){(e.has("icon")&&(this.hasUpdated||this.icon!==!1)||e.has("layout")&&(this.hasUpdated||this.layout!=="horizontal")||e.has("numbered")&&(this.hasUpdated||this.numbered!==!1)||e.has("scale")&&(this.hasUpdated||this.scale!=="m"))&&(this.updateItems(),this.determineActiveStepper()),e.has("numberingSystem")&&this.setStepperItemNumberingSystem(),e.has("currentActivePosition")&&requestAnimationFrame(()=>{this.determineActiveStepper()})}loaded(){if(typeof this.currentActivePosition!="number"){let e=this.getFirstEnabledStepperPosition();e===0&&(this.currentActivePosition=e),this.calciteInternalStepperItemChange.emit({position:e})}}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}calciteInternalStepperItemKeyEvent(e){let t=e.detail.item,i=e.target;switch(t.key){case"ArrowDown":case"ArrowRight":c(this.enabledItems,i,"next");break;case"ArrowUp":case"ArrowLeft":c(this.enabledItems,i,"previous");break;case"Home":c(this.enabledItems,i,"first");break;case"End":c(this.enabledItems,i,"last");break}e.stopPropagation()}registerItem(e){let t=e.target,{content:i,position:a}=e.detail;this.itemMap.set(t,{position:a,content:i}),this.enabledItems=this.filterItems(),e.stopPropagation()}updateItem(e){let{position:t}=e.detail;typeof t=="number"&&(this.currentActivePosition=t,this.selectedItem=e.target),this.calciteInternalStepperItemChange.emit({position:t})}handleItemSelect(){this.emitItemSelect()}emitItemSelect(){this.calciteStepperItemChange.emit(),this.calciteStepperChange.emit()}updateItems(){this.el.querySelectorAll("calcite-stepper-item").forEach(e=>{e.icon=this.icon,e.numbered=this.numbered,e.layout=this.layout,e.scale=this.scale})}determineActiveStepper(){let{items:e}=this;if(e.length<2)return;let{currentActivePosition:t,layout:i}=this;this.multipleViewMode=i!=="horizontal-single",e.forEach((a,s)=>{a.itemHidden=i==="horizontal-single"&&s!==(t||0)})}getEnabledStepIndex(e,t="next"){let{items:i,currentActivePosition:a}=this,s=e;for(;s>=0&&s<i.length&&i[s]?.disabled;)s=s+(t==="previous"?-1:1);return s!==a&&s<i.length&&s>=0?s:null}updateStep(e){this.currentActivePosition=e,this.calciteInternalStepperItemChange.emit({position:e})}filterItems(){return this.items.filter(e=>!e.disabled&&!d(e))}setStepperItemNumberingSystem(){this.items.forEach(e=>{e.numberingSystem=this.numberingSystem})}handleActionClick(e){let t=this.currentActivePosition;e.target.getAttribute("data-position")==="start"?this.prevStep():this.nextStep(),typeof this.currentActivePosition=="number"&&t!==this.currentActivePosition&&!this.items[this.currentActivePosition].disabled&&this.emitItemSelect()}getFirstEnabledStepperPosition(){let e=this.items.findIndex(t=>!t.disabled);return e>-1?e:0}handleDefaultSlotChange(e){let t=x(e).filter(a=>a?.tagName==="CALCITE-STEPPER-ITEM"&&!d(a));this.items=t;let i=Array(t.length).fill("1fr").join(" ");this.containerRef.value.style.gridTemplateAreas=i,this.containerRef.value.style.gridTemplateColumns=i,this.setStepperItemNumberingSystem()}render(){return this.el.ariaLabel=this.messages.label,this.el.role="region",n`<div class=${r({container:!0,[h.singleView]:this.layout==="horizontal-single"})} ${v(this.containerRef)}>${this.layout==="horizontal-single"&&n`<div class=${r({[h.stepBarContainer]:!0})}>${this.items.map((e,t)=>M({active:t===this.currentActivePosition,complete:e.complete&&t!==this.currentActivePosition&&!e.error,disabled:e.disabled&&t!==this.currentActivePosition,error:e.error&&t!==this.currentActivePosition}))}</div>`||""}${this.layout==="horizontal-single"&&n`<div class=${r({[h.actionContainer]:!0})}>${this.renderAction("start")}${this.renderAction("end")}</div>`||""}<slot @slotchange=${this.handleDefaultSlotChange}></slot></div>`}renderAction(e){let t=e==="start",i=t?C.chevronLeft:C.chevronRight,{currentActivePosition:a,multipleViewMode:s,layout:P}=this,E=R.position(this.guid,t),$=t?-1:1,w=t?"previous":"next",k=this.getEnabledStepIndex(a+$,w)===null;return P==="horizontal-single"&&!s?n`<calcite-action alignment=center appearance=transparent class=${r({[h.actionIcon]:!0})} compact data-position=${e??m} .disabled=${k} .icon=${i} icon-flip-rtl id=${E??m} @click=${this.handleActionClick} .scale=${this.scale} .text=${t?this.messages.previousStep:this.messages.nextStep}></calcite-action>`:null}};I("calcite-stepper",u);export{u as Stepper};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{c as p}from"./
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{c as p}from"./5IPJANUU.js";import{a as h}from"./ZLR2B6GQ.js";import{D as d,E as c,H as i,P as b,g as o,h as r}from"./AUIOWPFN.js";var l={container:"container",content:"content",scale:t=>`scale-${t}`},u={tabTitleId:t=>`calcite-tab-title-${t}`},f=o`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:none}:host,.container,.content{block-size:100%;inline-size:100%}:host([selected]),:host([selected]) .container{display:flex;flex-direction:column}.content{box-sizing:border-box;padding-block:var(--calcite-tab-content-space-y, var(--calcite-tab-content-block-padding, var(--calcite-internal-tab-content-space-y)))}.scale-s{--calcite-internal-tab-content-space-y: .25rem;font-size:var(--calcite-font-size-sm);line-height:1rem}.scale-m{--calcite-internal-tab-content-space-y: .5rem;font-size:var(--calcite-font-size);line-height:1rem}.scale-l{--calcite-internal-tab-content-space-y: .625rem;font-size:var(--calcite-font-size-md);line-height:1.25rem}.container{display:none;block-size:100%;inline-size:100%;overflow:auto;outline-color:transparent}.container:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([hidden]){display:none}[hidden]{display:none}`,n=class extends d{constructor(){super(),this.guid=u.tabTitleId(h()),this.scale="m",this.selected=!1,this.listenOn(document.body,"calciteInternalTabChange",this.internalTabChangeHandler)}static{this.properties={labeledBy:[16,{},{state:!0}],scale:1,selected:[7,{},{reflect:!0,type:Boolean}],tab:[3,{},{reflect:!0}]}}static{this.styles=f}async getTabIndex(){return Array.prototype.indexOf.call(p(this.el.parentElement.children).filter(e=>e.matches("calcite-tab")),this.el)}_updateAriaInfo(e=[],s=[]){this.labeledBy=s[e.indexOf(this.el.id)]||null}connectedCallback(){super.connectedCallback(),this.parentTabsEl=this.el.closest("calcite-tabs")}disconnectedCallback(){super.disconnectedCallback(),document.body?.dispatchEvent(new CustomEvent("calciteTabUnregister",{detail:this.el}))}internalTabChangeHandler(e){e.composedPath().find(a=>a.tagName==="CALCITE-TABS")===this.parentTabsEl&&(this.tab?this.selected=this.tab===e.detail.tab:this.getTabIndex().then(a=>{this.selected=a===e.detail.tab}),e.stopPropagation())}render(){let e=this.el.id||this.guid;return i(this.el,"aria-labelledby",this.labeledBy),i(this.el,"id",e),r`<div class=${c({[l.container]:!0,[l.scale(this.scale)]:!0})} role=tabpanel .tabIndex=${this.selected?0:-1}><section class=${c(l.content)}><slot></slot></section></div>`}};b("calcite-tab",n);export{n as Tab};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as S,b as g}from"./
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{a as S,b as g}from"./NSBK36H4.js";import{a as f}from"./WOTQIMPZ.js";import"./B5JXPZDV.js";import"./3YZG7MA3.js";import"./CIU4VM7X.js";import{u,y as i}from"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{B as n,C as d,D as h,E as p,P as m,g as l,h as o,o as r}from"./AUIOWPFN.js";var I={container:"container"},b=l`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex}.container{display:flex;flex-wrap:wrap;gap:var(--calcite-swatch-group-space, var(--calcite-spacing-sm))}:host([scale=s]) .container{gap:var(--calcite-swatch-group-space, var(--calcite-spacing-xs))}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,c=class extends h{constructor(){super(),this.items=[],this.slotRef=n(),this.focusSetter=f()(this),this.disabled=!1,this.scale="m",this.selectedItems=[],this.selectionMode="none",this.calciteSwatchGroupSelect=r({cancelable:!1}),this.listen("calciteInternalSwatchKeyEvent",this.calciteInternalSwatchKeyEventListener),this.listen("calciteSwatchSelect",this.calciteSwatchSelectListener),this.listen("calciteInternalSwatchSelect",this.calciteInternalSwatchSelectListener),this.listen("calciteInternalSyncSelectedSwatches",this.calciteInternalSyncSelectedSwatches)}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],label:1,scale:[3,{},{reflect:!0}],selectedItems:[0,{},{attribute:!1}],selectionMode:[3,{},{reflect:!0}]}}static{this.styles=b}async setFocus(e){return this.focusSetter(()=>this.el,e)}willUpdate(e){e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="none")&&this.updateItems()}updated(){S(this)}calciteInternalSwatchKeyEventListener(e){if(e.composedPath().includes(this.el)){let s=this.items?.filter(t=>!t.disabled);switch(e.detail.key){case"ArrowRight":i(s,e.detail.target,"next");break;case"ArrowLeft":i(s,e.detail.target,"previous");break;case"Home":i(s,e.detail.target,"first");break;case"End":i(s,e.detail.target,"last");break}}e.stopPropagation()}calciteSwatchSelectListener(e){e.composedPath().includes(this.el)&&this.setSelectedItems(!0,e.target),e.stopPropagation()}calciteInternalSwatchSelectListener(e){e.composedPath().includes(this.el)&&this.setSelectedItems(!1,e.target),e.stopPropagation()}calciteInternalSyncSelectedSwatches(e){e.composedPath().includes(this.el)&&(this.updateSelectedItems(),this.selectionMode==="single"&&this.selectedItems.length>1&&this.setSelectedItems(!1,e.target)),e.stopPropagation()}updateItems(e){let s=this.slotRef.value?.assignedElements({flatten:!0}).filter(t=>t?.matches("calcite-swatch"));this.items=e?u(e):s,!(this.items?.length<1)&&(this.items?.forEach(t=>{t.interactive=!0,t.scale=this.scale,t.selectionMode=this.selectionMode,t.parentSwatchGroup=this.el}),this.setSelectedItems(!1))}updateSelectedItems(){this.selectedItems=this.items?.filter(e=>e.selected)}setSelectedItems(e,s){s&&this.items?.forEach(t=>{let a=s===t;switch(this.selectionMode){case"multiple":a&&(t.selected=!t.selected);break;case"single":t.selected=a?!t.selected:!1;break;case"single-persist":t.selected=!!a;break}}),this.updateSelectedItems(),e&&this.calciteSwatchGroupSelect.emit()}render(){let e=this.selectionMode==="none"||this.selectionMode==="multiple"?"group":"radiogroup",{disabled:s}=this;return g({disabled:s,children:o`<div .ariaLabel=${this.label} class=${p(I.container)} .role=${e}><slot @slotchange=${this.updateItems} ${d(this.slotRef)}></slot></div>`})}};m("calcite-swatch-group",c);export{c as SwatchGroup};
|