@esri/calcite-components 5.0.0-next.5 → 5.0.0-next.6
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/{AUIOWPFN.js → 2IIGKMQ6.js} +2 -2
- package/dist/calcite/{7ZNR3GNI.js → 2XFESLAQ.js} +2 -2
- package/dist/calcite/{6VPACZP5.js → 3COSYM4H.js} +2 -2
- package/dist/calcite/{XZTRPLLK.js → 3ISWQGU4.js} +2 -2
- package/dist/calcite/{APIFFM3O.js → 3M2X4DMO.js} +2 -2
- package/dist/calcite/{U3KRKTQY.js → 3W422TPV.js} +2 -2
- package/dist/calcite/{F6EDNLSI.js → 43KOILAW.js} +2 -2
- package/dist/calcite/{ZLR2B6GQ.js → 44XNJNTA.js} +1 -1
- package/dist/calcite/{4JZMONLD.js → 4FSJL2OC.js} +2 -2
- package/dist/calcite/{JJWGSKGI.js → 4M5YCJ4Q.js} +2 -2
- package/dist/calcite/{3HXEF55M.js → 4YTONN4P.js} +2 -2
- package/dist/calcite/{NQJMDHT5.js → 53JXVKUS.js} +2 -2
- package/dist/calcite/{YSBWKH76.js → 56HP62NE.js} +1 -1
- package/dist/calcite/{K3AHNZL7.js → 57TYRZR3.js} +2 -2
- package/dist/calcite/{V4NPQ4WA.js → 5BQ76NQW.js} +2 -2
- package/dist/calcite/{C2X6VADY.js → 5HV6X5DX.js} +2 -2
- package/dist/calcite/{6VQ5IL36.js → 5T7WLABP.js} +2 -2
- package/dist/calcite/{BHBYSC5H.js → 62XLJEVX.js} +2 -2
- package/dist/calcite/{GUT2GKDG.js → 65HZ2HOS.js} +2 -2
- package/dist/calcite/{UOZDXXIF.js → 6EEMG3AJ.js} +2 -2
- package/dist/calcite/{X374PRV7.js → 6EKZQPKT.js} +2 -2
- package/dist/calcite/{OMKDUGKV.js → 6FCYAKPP.js} +2 -2
- package/dist/calcite/{BHU252WA.js → 6GKHPG2T.js} +2 -2
- package/dist/calcite/{W72YZH73.js → 6OLYWF6Z.js} +2 -2
- package/dist/calcite/{B5JXPZDV.js → 6PMY6MUE.js} +2 -2
- package/dist/calcite/{KRHM7ACI.js → 6YVXONLB.js} +2 -2
- package/dist/calcite/{HT5KXL4J.js → 76DFVIQ3.js} +2 -2
- package/dist/calcite/{DZWPXJWV.js → 7AG2R6XN.js} +2 -2
- package/dist/calcite/{5IPJANUU.js → 7DQ4G2FS.js} +2 -2
- package/dist/calcite/{RND3V33U.js → 7EIPWPP6.js} +1 -1
- package/dist/calcite/{4ARTWEEZ.js → 7GYHOBTA.js} +2 -2
- package/dist/calcite/{NULQJBCW.js → 7XEO6UJ3.js} +2 -2
- package/dist/calcite/{VIWDW2WZ.js → A6DNGYP7.js} +2 -2
- package/dist/calcite/{I53JH7YD.js → A6ZYDDPX.js} +2 -2
- package/dist/calcite/{YSP6WWQB.js → A7OBU3ZB.js} +1 -1
- package/dist/calcite/{BEUZYBM5.js → AANSYYFF.js} +2 -2
- package/dist/calcite/{Y442PVMQ.js → ABFHGJOG.js} +2 -2
- package/dist/calcite/{H2FWQITV.js → ABRDCSJF.js} +1 -1
- package/dist/calcite/{PFKUB7JD.js → AHOADFZ7.js} +2 -2
- package/dist/calcite/{PSNA5FAF.js → AIANT2RL.js} +2 -2
- package/dist/calcite/{BNKVQYLQ.js → B36ZLEKI.js} +2 -2
- package/dist/calcite/{PFDLGOVS.js → B53J7Q5J.js} +2 -2
- package/dist/calcite/{SXB76NOR.js → BKNGM5YO.js} +2 -2
- package/dist/calcite/{LYDOM6VQ.js → BMB7PJZB.js} +2 -2
- package/dist/calcite/{ZV7YL7QG.js → BOFKO4PD.js} +2 -2
- package/dist/calcite/{AQ4DKRX6.js → BTK24FM2.js} +2 -2
- package/dist/calcite/{LH7245HX.js → CFWXX2ZT.js} +2 -2
- package/dist/calcite/{IKDSO2OB.js → CYUZWU4F.js} +2 -2
- package/dist/calcite/{ALDDSDTX.js → CZF6KYOX.js} +1 -1
- package/dist/calcite/{HVF3RXXI.js → DATE73WS.js} +2 -2
- package/dist/calcite/{VBRBI7IU.js → DEJFI4YA.js} +2 -2
- package/dist/calcite/{2VKJIYLT.js → DN6V2M24.js} +1 -1
- package/dist/calcite/{C4S2BOWK.js → DUM3R2CL.js} +2 -2
- package/dist/calcite/{7PFVW4JF.js → E5NO42AW.js} +1 -1
- package/dist/calcite/{2YBCAJSV.js → EFDQMGZP.js} +2 -2
- package/dist/calcite/{MVLJJOH2.js → EHZXDIG5.js} +2 -2
- package/dist/calcite/{HU4SHWE7.js → EOWCTVN7.js} +2 -2
- package/dist/calcite/{VMWAAH5B.js → FHRBYILV.js} +2 -2
- package/dist/calcite/{LJI5SYGA.js → FMB23RBB.js} +1 -1
- package/dist/calcite/{6J5W2PAJ.js → FQKP2XIR.js} +2 -2
- package/dist/calcite/{ROWPIQLT.js → FSNEMWMV.js} +2 -2
- package/dist/calcite/{2KH3AUCG.js → FWMD4ANX.js} +2 -2
- package/dist/calcite/{R73QB7MJ.js → GLUJXIHJ.js} +2 -2
- package/dist/calcite/{RFALVOKT.js → GS2BRYGH.js} +2 -2
- package/dist/calcite/{PJOGMC7F.js → GSSIFYMO.js} +2 -2
- package/dist/calcite/{3NOZ7M75.js → GWC7UZVN.js} +2 -2
- package/dist/calcite/{K5GJLIBR.js → GWYUQTSG.js} +2 -2
- package/dist/calcite/{7NUC3WBG.js → H2NP25UI.js} +1 -1
- package/dist/calcite/{CIU4VM7X.js → H3GTITDX.js} +2 -2
- package/dist/calcite/{IHEW664E.js → HBSTMWBE.js} +2 -2
- package/dist/calcite/{5AL5GWRD.js → HM4RW4PL.js} +2 -2
- package/dist/calcite/{C3BQ4W7K.js → HURJRVCG.js} +2 -2
- package/dist/calcite/{ZSMNT5VS.js → HZJQA7EQ.js} +2 -2
- package/dist/calcite/{UGI3YWJM.js → IAOITTID.js} +2 -2
- package/dist/calcite/{XNLWKJLM.js → ID4WJFNU.js} +2 -2
- package/dist/calcite/{H5ANNFJC.js → IFQNEPTP.js} +2 -2
- package/dist/calcite/{5LAPR75M.js → IJDY7EKO.js} +2 -2
- package/dist/calcite/{7DTG5KDL.js → IODUDIBK.js} +2 -2
- package/dist/calcite/{7QP5BUGE.js → JD35MQMV.js} +2 -2
- package/dist/calcite/{LROCCBRV.js → JD5Y5FIJ.js} +2 -2
- package/dist/calcite/{HBHSBTMM.js → JJP2FEER.js} +1 -1
- package/dist/calcite/{WBGRGCXR.js → JNCHO6X5.js} +2 -2
- package/dist/calcite/{LRKWQ3C3.js → JSS6WCPJ.js} +2 -2
- package/dist/calcite/{NLYYOFNV.js → JTAYXV5Y.js} +1 -1
- package/dist/calcite/{RI3NRBMI.js → JVYKUU2B.js} +2 -2
- package/dist/calcite/{DOH3ZW2R.js → K2RWUB5W.js} +2 -2
- package/dist/calcite/{XRSYDXWZ.js → KDHLLH5G.js} +1 -1
- package/dist/calcite/{BE5OB2TH.js → KLLDUBU7.js} +2 -2
- package/dist/calcite/{5K2Z2TMW.js → KR5QX3PG.js} +2 -2
- package/dist/calcite/{DONAES6Q.js → L63HBU2O.js} +2 -2
- package/dist/calcite/{GE7SQF7S.js → LDFECFWX.js} +2 -2
- package/dist/calcite/{2IWOXJH7.js → LFSTWFMB.js} +2 -2
- package/dist/calcite/{VQMSSO2U.js → LFYXGVGK.js} +2 -2
- package/dist/calcite/{Q23OEAP2.js → LNKZ4ULL.js} +2 -2
- package/dist/calcite/{DJVVGNTK.js → LX3J3Q7Q.js} +1 -1
- package/dist/calcite/{DDW4WTS2.js → LX7GBILP.js} +2 -2
- package/dist/calcite/{KT4EQWT6.js → MEWZXHJ6.js} +2 -2
- package/dist/calcite/{W5OJOVZY.js → MPYXWS5E.js} +1 -1
- package/dist/calcite/{UN7GLLXI.js → MTRDCPVY.js} +2 -2
- package/dist/calcite/{2HKRJLBG.js → MYWUD5PR.js} +2 -2
- package/dist/calcite/{7XJU5OTS.js → N3QXJKKO.js} +2 -2
- package/dist/calcite/{Q2GRCTSJ.js → NHRWRXH2.js} +2 -2
- package/dist/calcite/{AUF6YLAM.js → NKMBE4R4.js} +2 -2
- package/dist/calcite/{KH3UKQ2D.js → NKYR42W6.js} +2 -2
- package/dist/calcite/{VYFT5EAY.js → NOOPM2CL.js} +1 -1
- package/dist/calcite/{DDXY7TRY.js → NQF73COG.js} +2 -2
- package/dist/calcite/{YV7DKMEQ.js → NSIT4HJE.js} +2 -2
- package/dist/calcite/{ZVWKN3G7.js → O72KETNZ.js} +2 -2
- package/dist/calcite/{Y3HXK6MO.js → OBY2JHHI.js} +2 -2
- package/dist/calcite/{MP3OWQ2A.js → OD7IPBKO.js} +2 -2
- package/dist/calcite/{HXGFAPCM.js → OFHMIOCW.js} +2 -2
- package/dist/calcite/{S5CLKCGJ.js → OFO7DXMT.js} +1 -1
- package/dist/calcite/{2GG4AF5T.js → OXZ2Y5YM.js} +1 -1
- package/dist/calcite/{PVL2DQVP.js → OYVYZ6ZO.js} +2 -2
- package/dist/calcite/{WWJXVV6U.js → P6BUUDOL.js} +2 -2
- package/dist/calcite/{OCT7LR2O.js → PBO64SRK.js} +1 -1
- package/dist/calcite/{3YZG7MA3.js → PCGNN5RO.js} +2 -2
- package/dist/calcite/{PU5TGCQG.js → PMWGEAYN.js} +2 -2
- package/dist/calcite/{V3ZR6RFK.js → POOA337X.js} +1 -1
- package/dist/calcite/{ZAQTILTS.js → PPV5DY5L.js} +2 -2
- package/dist/calcite/{4GHB4NY4.js → PQDB6CTL.js} +2 -2
- package/dist/calcite/{A4CO6B7Z.js → PRLHDLWI.js} +2 -2
- package/dist/calcite/{QF6F6CY3.js → Q4IQBOWU.js} +2 -2
- package/dist/calcite/{CUL3VHSD.js → QCGVJHJ6.js} +2 -2
- package/dist/calcite/{IEL7YV5C.js → QYN6LQ5J.js} +2 -2
- package/dist/calcite/{N5MSFOLW.js → REY2OA4D.js} +2 -2
- package/dist/calcite/{62OUMNJ6.js → RLF4GWLJ.js} +2 -2
- package/dist/calcite/{OFZACK2Y.js → RW5EELAZ.js} +2 -2
- package/dist/calcite/{MEFMO7UB.js → SHFV6LYT.js} +2 -2
- package/dist/calcite/{PLD7OLLJ.js → SL3VKZG5.js} +2 -2
- package/dist/calcite/{ZZGPQLEW.js → SLWHNU7X.js} +2 -2
- package/dist/calcite/{W6EWFSR3.js → SSLEHUOY.js} +2 -2
- package/dist/calcite/{WOTQIMPZ.js → SXK4ATVN.js} +2 -2
- package/dist/calcite/{CTLGVBKW.js → SXMKRRD6.js} +2 -2
- package/dist/calcite/{RRP2E2T3.js → SXOKB2BX.js} +2 -2
- package/dist/calcite/{ZTOBC3PN.js → SZXBPZ7S.js} +2 -2
- package/dist/calcite/{73LRFHS4.js → T3QJCLEX.js} +2 -2
- package/dist/calcite/{3266GV6Z.js → TBM5T67T.js} +2 -2
- package/dist/calcite/{CQMVTE7J.js → TOSB6ECB.js} +2 -2
- package/dist/calcite/{BFINWHLX.js → TTLR3A5P.js} +2 -2
- package/dist/calcite/{DSEMLW7Z.js → TUAQEJC4.js} +2 -2
- package/dist/calcite/{7IYAKB7Q.js → TWGPU2HX.js} +2 -2
- package/dist/calcite/{WTY55PPZ.js → TYPQP3Q3.js} +2 -2
- package/dist/calcite/{YCLOS6NX.js → U74QHS5H.js} +2 -2
- package/dist/calcite/{UNJRBV2R.js → UCG3QU7A.js} +2 -2
- package/dist/calcite/{7IHVHMIY.js → UKQ6KSXO.js} +2 -2
- package/dist/calcite/{LQ3URZCB.js → ULXDFGLX.js} +2 -2
- package/dist/calcite/{NSBK36H4.js → UQ4HIO7J.js} +2 -2
- package/dist/calcite/{N7OO7R2S.js → UROEAN4Q.js} +2 -2
- package/dist/calcite/{QFT74HW3.js → VCXMHEPN.js} +2 -2
- package/dist/calcite/{NID6WJOW.js → VMEYQQVI.js} +2 -2
- package/dist/calcite/{NU57UAAO.js → VS3YLYMZ.js} +1 -1
- package/dist/calcite/{H5DKF7F3.js → VUYRIPVA.js} +2 -2
- package/dist/calcite/{BYZPKQRD.js → VYLJCYTD.js} +2 -2
- package/dist/calcite/{Q3MUDXRY.js → WBXWOFF6.js} +2 -2
- package/dist/calcite/{SMRCCHJE.js → WC4TGTDM.js} +2 -2
- package/dist/calcite/WXESTAXY.js +4 -0
- package/dist/calcite/{VKRWRFEJ.js → WYLLIW2W.js} +2 -2
- package/dist/calcite/{3KUVOQAL.js → X46HC2YH.js} +2 -2
- package/dist/calcite/{WPTOKN7K.js → XIXFKVFZ.js} +1 -1
- package/dist/calcite/{FZIUTVKD.js → XJ4SR7WO.js} +1 -1
- package/dist/calcite/{SGJU36YV.js → XQAX6FNF.js} +2 -2
- package/dist/calcite/{CF6DTFNX.js → XTDUXEIX.js} +2 -2
- package/dist/calcite/{45F6XOYY.js → XTYQVPDC.js} +2 -2
- package/dist/calcite/{AHOXXRX5.js → YG5VYPTQ.js} +2 -2
- package/dist/calcite/{SZWYWOXZ.js → YQQN42G5.js} +2 -2
- package/dist/calcite/{PSCEW76J.js → ZAD5LV3P.js} +2 -2
- package/dist/calcite/{67HVFNHP.js → ZEMRH6DW.js} +2 -2
- package/dist/calcite/{XNFJXDQ6.js → ZJD56MA6.js} +2 -2
- package/dist/calcite/{CVLFEMH2.js → ZOBQ5UTK.js} +2 -2
- package/dist/calcite/{CJWGQETT.js → ZOINAXKM.js} +2 -2
- package/dist/calcite/{PZL4QWV5.js → ZPU3MCWK.js} +2 -2
- package/dist/calcite/calcite.esm.js +2 -2
- package/dist/chunks/runtime.js +3 -3
- package/dist/components/calcite-stepper/customElement.d.ts +0 -6
- package/dist/components/calcite-stepper/customElement.js +0 -2
- package/dist/docs/api.json +1 -10
- package/dist/docs/docs.json +1 -16
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +2 -12
- package/dist/index.d.ts +0 -1
- package/dist/types/lumina.d.ts +0 -1
- package/dist/types/preact.d.ts +0 -1
- package/dist/types/preact10.d.ts +0 -1
- package/dist/types/react.d.ts +0 -1
- package/dist/types/stencil.d.ts +0 -1
- package/package.json +2 -2
- package/dist/calcite/T6Y6ZTWW.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{h as O,k as L}from"./CVLFEMH2.js";import{c as M,e as F,f as E}from"./Y3HXK6MO.js";import{a as v}from"./NULQJBCW.js";import"./S5CLKCGJ.js";import{a as T}from"./ALDDSDTX.js";import{a as S}from"./LH7245HX.js";import"./B5JXPZDV.js";import{p as V}from"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{B as d,C as m,D as k,E as b,F as p,P as C,g as z,h}from"./AUIOWPFN.js";var r={container:"container",fill:"fill",stepLine:"step-line",label:"label",labelHidden:"label-hidden",labelRange:"label-range",labelValue:"label-value",unitLabel:"unit-label",stepsVisible:"steps-visible",valueVisible:"value-visible",success:"fill-success",warning:"fill-warning",danger:"fill-danger"},U=z`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host{display:flex;--calcite-internal-meter-space: var(--calcite-spacing-base);--calcite-internal-meter-height: var(--calcite-spacing-lg);--calcite-internal-meter-font-size: var(--calcite-font-size--1);--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-brand));--calcite-internal-meter-background-color: var(--calcite-meter-background-color, var(--calcite-color-foreground-2));--calcite-internal-meter-border-color: var(--calcite-meter-border-color, var(--calcite-color-border-3));--calcite-internal-meter-shadow: var(--calcite-meter-shadow, var(--calcite-shadow-none));--calcite-internal-meter-corner-radius: var(--calcite-meter-corner-radius, 9999px);--calcite-internal-meter-value-text-color: var(--calcite-meter-value-text-color, var(--calcite-color-text-1));--calcite-internal-meter-range-text-color: var(--calcite-meter-range-text-color, var(--calcite-color-text-3))}:host([scale=s]){--calcite-internal-meter-height: var(--calcite-spacing-md);--calcite-internal-meter-font-size: var(--calcite-font-size--2)}:host([scale=l]){--calcite-internal-meter-height: var(--calcite-spacing-xxl);--calcite-internal-meter-font-size: var(--calcite-font-size-0)}:host([appearance=solid]){--calcite-internal-meter-border-color: var(--calcite-color-foreground-3);--calcite-internal-meter-background-color: var(--calcite-color-foreground-3)}:host([appearance=outline]){--calcite-internal-meter-background-color: transparent}.fill{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-brand))}.fill-danger{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-status-danger))}.fill-success{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-status-success))}.fill-warning{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-status-warning))}.container{position:relative;display:flex;align-items:center;margin:0;inline-size:var(--calcite-container-size-content-fluid);block-size:var(--calcite-internal-meter-height);background-color:var(--calcite-internal-meter-background-color);border:var(--calcite-border-width-sm) solid var(--calcite-internal-meter-border-color);border-radius:var(--calcite-internal-meter-corner-radius);box-shadow:var(--calcite-internal-meter-shadow)}.value-visible{margin-block-start:var(--calcite-spacing-xxl)}.steps-visible{margin-block-end:var(--calcite-spacing-xxl)}.step-line{position:absolute;inset-block:0px;display:block;inline-size:var(--calcite-internal-meter-space);background-color:var(--calcite-internal-meter-border-color)}.label{position:absolute;font-size:var(--calcite-internal-meter-font-size)}.label-hidden{visibility:hidden;opacity:0}.label-value{inset-block-end:calc(100% + .5em);font-weight:var(--calcite-font-weight-bold);color:var(--calcite-internal-meter-value-text-color)}.label-range{color:var(--calcite-internal-meter-range-text-color);inset-block-start:calc(100% + .5em)}.label-range .unit-label{font-weight:var(--calcite-font-weight-medium)}.fill{position:absolute;z-index:var(--calcite-z-index);display:block;transition-timing-function:cubic-bezier(.4,0,.2,1);inset-inline-start:var(--calcite-internal-meter-space);inset-block:var(--calcite-internal-meter-space);border-radius:var(--calcite-internal-meter-corner-radius);max-inline-size:calc(100% - var(--calcite-internal-meter-space) * 2);min-inline-size:calc(var(--calcite-internal-meter-height) - var(--calcite-internal-meter-space) * 2);background-color:var(--calcite-internal-meter-fill-color);transition-property:inline-size,background-color,box-shadow}.solid .fill{inset-block:0;inset-inline-start:0;max-inline-size:100%;min-inline-size:calc(var(--calcite-internal-meter-height));box-shadow:0 0 0 1px var(--calcite-internal-meter-fill-color)}`,y=class extends k{constructor(){super(...arguments),this.highLabelRef=d(),this.labelFlipMax=.8,this.labelFlipProximity=.15,this.lowLabelRef=d(),this.maxLabelRef=d(),this.maxPercent=100,this.messages=S({name:null}),this.meterContainerRef=d(),this.minLabelRef=d(),this.minPercent=0,this.resizeObserver=T("resize",()=>this.resizeHandler()),this.valueLabelRef=d(),this.appearance="outline-fill",this.disabled=!1,this.fillType="range",this.groupSeparator=!1,this.max=100,this.min=0,this.rangeLabelType="percent",this.rangeLabels=!1,this.scale="m",this.unitLabel="",this.valueLabel=!1,this.valueLabelType="percent"}static{this.properties={currentPercent:[16,{},{state:!0}],highActive:[16,{},{state:!0}],highPercent:[16,{},{state:!0}],lowActive:[16,{},{state:!0}],lowPercent:[16,{},{state:!0}],appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],fillType:[3,{},{reflect:!0}],form:[3,{},{reflect:!0}],groupSeparator:[7,{},{reflect:!0,type:Boolean}],high:[11,{},{reflect:!0,type:Number}],label:1,low:[11,{},{reflect:!0,type:Number}],max:[11,{},{reflect:!0,type:Number}],min:[11,{},{reflect:!0,type:Number}],name:[3,{},{reflect:!0}],numberingSystem:1,rangeLabelType:[3,{},{reflect:!0}],rangeLabels:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],unitLabel:1,value:[9,{},{type:Number}],valueLabel:[7,{},{reflect:!0,type:Boolean}],valueLabelType:[3,{},{reflect:!0}]}}static{this.styles=U}connectedCallback(){super.connectedCallback(),M(this),this.resizeObserver?.observe(this.el)}load(){this.calculateValues(),E(this,this.value)}willUpdate(e){(e.has("min")&&(this.hasUpdated||this.min!==0)||e.has("max")&&(this.hasUpdated||this.max!==100)||e.has("low")||e.has("high")||e.has("value"))&&this.handleRangeChange(),(e.has("rangeLabels")&&(this.hasUpdated||this.rangeLabels!==!1)||e.has("rangeLabelType")&&(this.hasUpdated||this.rangeLabelType!=="percent")||e.has("unitLabel")&&(this.hasUpdated||this.unitLabel!=="")||e.has("valueLabel")&&(this.hasUpdated||this.valueLabel!==!1)||e.has("valueLabelType")&&(this.hasUpdated||this.valueLabelType!=="percent"))&&this.updateLabels()}loaded(){this.updateLabels()}disconnectedCallback(){super.disconnectedCallback(),F(this),this.resizeObserver?.disconnect()}handleRangeChange(){this.calculateValues(),this.updateLabels()}resizeHandler(){this.updateLabels()}updateLabels(){this.valueLabelRef.value&&this.determineValueLabelPosition(),this.rangeLabels&&this.determineVisibleLabels()}calculateValues(){let{min:e,max:l,low:t,high:a,value:i}=this,n=100*(t-e)/(l-e),s=100*(a-e)/(l-e),c=100*(i-e)/(l-e);(!t||t<e||t>a||t>l)&&(this.low=e),(!a||a>l||a<t||a<e)&&(this.high=l),i||(this.value=e),this.lowPercent=n,this.highPercent=s,this.currentPercent=i?c:0,this.lowActive=!!t&&t>e&&(!i||t>i)&&(!a||t<a),this.highActive=!!a&&e<=a&&a<l&&(!i||a>i)&&(!t||a>t)}formatLabel(e,l){if(l==="percent"){if(!this.percentFormatting){let t=O(this.messages._lang),a=new Intl.NumberFormat(t,{useGrouping:this.groupSeparator,style:"percent"});this.percentFormatting={formatter:a,locale:t}}return this.percentFormatting.formatter.format(e)}else return L.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},L.localize(e.toString())}getMeterKindCssClass(){let{low:e,high:l,min:t,max:a,value:i}=this,n=e||t,s=l||a,c=i>=n,u=i<n,f=i>=s,o=i<s;return!i||!e&&o||u?r.success:c&&o?r.warning:f?r.danger:r.success}intersects(e,l){return e&&l&&V(e.getBoundingClientRect(),l.getBoundingClientRect())}determineVisibleLabels(){let{minLabelRef:{value:e},lowLabelRef:{value:l},highLabelRef:{value:t},maxLabelRef:{value:a}}=this,i=this.intersects(t,a),n=this.intersects(l,t),s=this.intersects(l,a),c=this.intersects(e,t),u=this.intersects(e,l),f=this.intersects(e,a),o=r.labelHidden;l&&(u||s||n?l.classList.add(o):l.classList.remove(o)),t&&(c||s||i?t.classList.add(o):t.classList.remove(o)),e&&a&&(f?a.classList.add(o):a.classList.remove(o))}determineValueLabelPosition(){let{valueLabelRef:{value:e},meterContainerRef:{value:l},currentPercent:t}=this,a=t>100?100:t>0?t:0,i=e.getBoundingClientRect().width,n=l.getBoundingClientRect().width,s=100*(i-0)/(n-0);a+s>=100?(e.style.insetInlineEnd="0%",e.style.removeProperty("inset-inline-start")):(e.style.insetInlineStart=`${a}% `,e.style.removeProperty("inset-inline-end"))}renderMeterFill(){let{currentPercent:e,fillType:l}=this,t=this.getMeterKindCssClass();return h`<div class=${b({[r.fill]:!0,[t]:l!=="single"})} style=${p({width:`${e}%`})}></div>`}renderRangeLine(e){let l={insetInlineStart:`${e}%`};return h`<div class=${b(r.stepLine)} style=${p(l)}></div>`}renderValueLabel(){let{currentPercent:e,valueLabelType:l,unitLabel:t,value:a}=this,i=this.formatLabel(l==="percent"?e/100:a||0,l);return v("low-label-line",h`<div class=${b({[r.label]:!0,[r.labelValue]:!0})} ${m(this.valueLabelRef)}>${i}${t&&l!=="percent"&&h`<span class=${b(r.unitLabel)}> ${t}</span>`||""}</div>`)}renderMinLabel(){let{rangeLabelType:e,min:l,minPercent:t,unitLabel:a}=this,i={insetInlineStart:`${t}%`},n=this.formatLabel(e==="percent"?t:l,e);return v("min-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(i)} ${m(this.minLabelRef)}>${n}${a&&e!=="percent"&&h`<span class=${b(r.unitLabel)}> ${a}</span>`||""}</div>`)}renderLowLabel(){let{rangeLabelType:e,low:l,lowPercent:t,highPercent:a,labelFlipProximity:i}=this,n=l?this.formatLabel(e==="percent"?t/100:l,e):"",s={insetInlineStart:`${t}%`},c={insetInlineEnd:`${100-t}%`},u=(a-t)/100<i?c:s;return v("low-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(u)} ${m(this.lowLabelRef)}>${n}</div>`)}renderHighLabel(){let{rangeLabelType:e,high:l,highPercent:t,labelFlipMax:a}=this,i=l?this.formatLabel(e==="percent"?t/100:l,e):"",n={insetInlineStart:`${t}%`},s={insetInlineEnd:`${100-t}%`},c=t/100>=a?s:n;return v("high-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(c)} ${m(this.highLabelRef)}>${i}</div>`)}renderMaxLabel(){let{rangeLabelType:e,max:l,maxPercent:t}=this,a={insetInlineEnd:`${100-t}%`},i=this.formatLabel(e==="percent"?t/100:l,e);return v("max-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(a)} ${m(this.maxLabelRef)}>${i}</div>`)}render(){let{appearance:e,currentPercent:l,highActive:t,highPercent:a,label:i,lowActive:n,lowPercent:s,max:c,maxPercent:u,min:f,minPercent:o,rangeLabels:g,rangeLabelType:x,unitLabel:$,value:w,valueLabel:P,valueLabelType:R}=this,H=this.formatLabel(l/100,"percent"),I=`${w} ${$}`;return h`<div .ariaLabel=${i} .ariaValueMax=${x==="percent"?u:c} .ariaValueMin=${x==="percent"?o:f} .ariaValueNow=${R==="percent"?l:w} .ariaValueText=${R==="percent"?H:$?I:void 0} class=${b({[r.container]:!0,[r.stepsVisible]:g,[r.valueVisible]:P,[e]:e!=="outline-fill"})} role=meter ${m(this.meterContainerRef)}>${this.renderMeterFill()}${P&&this.renderValueLabel()||""}${n&&this.renderRangeLine(s)||""}${t&&this.renderRangeLine(a)||""}${g&&this.renderMinLabel()||""}${g&&n&&this.renderLowLabel()||""}${g&&t&&this.renderHighLabel()||""}${g&&this.renderMaxLabel()||""}</div>`}};C("calcite-meter",y);export{y as Meter};
|
|
3
|
+
v5.0.0-next.6 */
|
|
4
|
+
import{h as O,k as L}from"./ZOBQ5UTK.js";import{c as M,e as F,f as E}from"./OBY2JHHI.js";import{a as v}from"./7XEO6UJ3.js";import"./OFO7DXMT.js";import{a as T}from"./CZF6KYOX.js";import{a as S}from"./CFWXX2ZT.js";import"./6PMY6MUE.js";import{p as V}from"./7DQ4G2FS.js";import"./44XNJNTA.js";import{B as d,C as m,D as k,E as b,F as p,P as C,g as z,h}from"./2IIGKMQ6.js";var r={container:"container",fill:"fill",stepLine:"step-line",label:"label",labelHidden:"label-hidden",labelRange:"label-range",labelValue:"label-value",unitLabel:"unit-label",stepsVisible:"steps-visible",valueVisible:"value-visible",success:"fill-success",warning:"fill-warning",danger:"fill-danger"},U=z`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host{display:flex;--calcite-internal-meter-space: var(--calcite-spacing-base);--calcite-internal-meter-height: var(--calcite-spacing-lg);--calcite-internal-meter-font-size: var(--calcite-font-size--1);--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-brand));--calcite-internal-meter-background-color: var(--calcite-meter-background-color, var(--calcite-color-foreground-2));--calcite-internal-meter-border-color: var(--calcite-meter-border-color, var(--calcite-color-border-3));--calcite-internal-meter-shadow: var(--calcite-meter-shadow, var(--calcite-shadow-none));--calcite-internal-meter-corner-radius: var(--calcite-meter-corner-radius, 9999px);--calcite-internal-meter-value-text-color: var(--calcite-meter-value-text-color, var(--calcite-color-text-1));--calcite-internal-meter-range-text-color: var(--calcite-meter-range-text-color, var(--calcite-color-text-3))}:host([scale=s]){--calcite-internal-meter-height: var(--calcite-spacing-md);--calcite-internal-meter-font-size: var(--calcite-font-size--2)}:host([scale=l]){--calcite-internal-meter-height: var(--calcite-spacing-xxl);--calcite-internal-meter-font-size: var(--calcite-font-size-0)}:host([appearance=solid]){--calcite-internal-meter-border-color: var(--calcite-color-foreground-3);--calcite-internal-meter-background-color: var(--calcite-color-foreground-3)}:host([appearance=outline]){--calcite-internal-meter-background-color: transparent}.fill{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-brand))}.fill-danger{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-status-danger))}.fill-success{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-status-success))}.fill-warning{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-status-warning))}.container{position:relative;display:flex;align-items:center;margin:0;inline-size:var(--calcite-container-size-content-fluid);block-size:var(--calcite-internal-meter-height);background-color:var(--calcite-internal-meter-background-color);border:var(--calcite-border-width-sm) solid var(--calcite-internal-meter-border-color);border-radius:var(--calcite-internal-meter-corner-radius);box-shadow:var(--calcite-internal-meter-shadow)}.value-visible{margin-block-start:var(--calcite-spacing-xxl)}.steps-visible{margin-block-end:var(--calcite-spacing-xxl)}.step-line{position:absolute;inset-block:0px;display:block;inline-size:var(--calcite-internal-meter-space);background-color:var(--calcite-internal-meter-border-color)}.label{position:absolute;font-size:var(--calcite-internal-meter-font-size)}.label-hidden{visibility:hidden;opacity:0}.label-value{inset-block-end:calc(100% + .5em);font-weight:var(--calcite-font-weight-bold);color:var(--calcite-internal-meter-value-text-color)}.label-range{color:var(--calcite-internal-meter-range-text-color);inset-block-start:calc(100% + .5em)}.label-range .unit-label{font-weight:var(--calcite-font-weight-medium)}.fill{position:absolute;z-index:var(--calcite-z-index);display:block;transition-timing-function:cubic-bezier(.4,0,.2,1);inset-inline-start:var(--calcite-internal-meter-space);inset-block:var(--calcite-internal-meter-space);border-radius:var(--calcite-internal-meter-corner-radius);max-inline-size:calc(100% - var(--calcite-internal-meter-space) * 2);min-inline-size:calc(var(--calcite-internal-meter-height) - var(--calcite-internal-meter-space) * 2);background-color:var(--calcite-internal-meter-fill-color);transition-property:inline-size,background-color,box-shadow}.solid .fill{inset-block:0;inset-inline-start:0;max-inline-size:100%;min-inline-size:calc(var(--calcite-internal-meter-height));box-shadow:0 0 0 1px var(--calcite-internal-meter-fill-color)}`,y=class extends k{constructor(){super(...arguments),this.highLabelRef=d(),this.labelFlipMax=.8,this.labelFlipProximity=.15,this.lowLabelRef=d(),this.maxLabelRef=d(),this.maxPercent=100,this.messages=S({name:null}),this.meterContainerRef=d(),this.minLabelRef=d(),this.minPercent=0,this.resizeObserver=T("resize",()=>this.resizeHandler()),this.valueLabelRef=d(),this.appearance="outline-fill",this.disabled=!1,this.fillType="range",this.groupSeparator=!1,this.max=100,this.min=0,this.rangeLabelType="percent",this.rangeLabels=!1,this.scale="m",this.unitLabel="",this.valueLabel=!1,this.valueLabelType="percent"}static{this.properties={currentPercent:[16,{},{state:!0}],highActive:[16,{},{state:!0}],highPercent:[16,{},{state:!0}],lowActive:[16,{},{state:!0}],lowPercent:[16,{},{state:!0}],appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],fillType:[3,{},{reflect:!0}],form:[3,{},{reflect:!0}],groupSeparator:[7,{},{reflect:!0,type:Boolean}],high:[11,{},{reflect:!0,type:Number}],label:1,low:[11,{},{reflect:!0,type:Number}],max:[11,{},{reflect:!0,type:Number}],min:[11,{},{reflect:!0,type:Number}],name:[3,{},{reflect:!0}],numberingSystem:1,rangeLabelType:[3,{},{reflect:!0}],rangeLabels:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],unitLabel:1,value:[9,{},{type:Number}],valueLabel:[7,{},{reflect:!0,type:Boolean}],valueLabelType:[3,{},{reflect:!0}]}}static{this.styles=U}connectedCallback(){super.connectedCallback(),M(this),this.resizeObserver?.observe(this.el)}load(){this.calculateValues(),E(this,this.value)}willUpdate(e){(e.has("min")&&(this.hasUpdated||this.min!==0)||e.has("max")&&(this.hasUpdated||this.max!==100)||e.has("low")||e.has("high")||e.has("value"))&&this.handleRangeChange(),(e.has("rangeLabels")&&(this.hasUpdated||this.rangeLabels!==!1)||e.has("rangeLabelType")&&(this.hasUpdated||this.rangeLabelType!=="percent")||e.has("unitLabel")&&(this.hasUpdated||this.unitLabel!=="")||e.has("valueLabel")&&(this.hasUpdated||this.valueLabel!==!1)||e.has("valueLabelType")&&(this.hasUpdated||this.valueLabelType!=="percent"))&&this.updateLabels()}loaded(){this.updateLabels()}disconnectedCallback(){super.disconnectedCallback(),F(this),this.resizeObserver?.disconnect()}handleRangeChange(){this.calculateValues(),this.updateLabels()}resizeHandler(){this.updateLabels()}updateLabels(){this.valueLabelRef.value&&this.determineValueLabelPosition(),this.rangeLabels&&this.determineVisibleLabels()}calculateValues(){let{min:e,max:l,low:t,high:a,value:i}=this,n=100*(t-e)/(l-e),s=100*(a-e)/(l-e),c=100*(i-e)/(l-e);(!t||t<e||t>a||t>l)&&(this.low=e),(!a||a>l||a<t||a<e)&&(this.high=l),i||(this.value=e),this.lowPercent=n,this.highPercent=s,this.currentPercent=i?c:0,this.lowActive=!!t&&t>e&&(!i||t>i)&&(!a||t<a),this.highActive=!!a&&e<=a&&a<l&&(!i||a>i)&&(!t||a>t)}formatLabel(e,l){if(l==="percent"){if(!this.percentFormatting){let t=O(this.messages._lang),a=new Intl.NumberFormat(t,{useGrouping:this.groupSeparator,style:"percent"});this.percentFormatting={formatter:a,locale:t}}return this.percentFormatting.formatter.format(e)}else return L.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},L.localize(e.toString())}getMeterKindCssClass(){let{low:e,high:l,min:t,max:a,value:i}=this,n=e||t,s=l||a,c=i>=n,u=i<n,f=i>=s,o=i<s;return!i||!e&&o||u?r.success:c&&o?r.warning:f?r.danger:r.success}intersects(e,l){return e&&l&&V(e.getBoundingClientRect(),l.getBoundingClientRect())}determineVisibleLabels(){let{minLabelRef:{value:e},lowLabelRef:{value:l},highLabelRef:{value:t},maxLabelRef:{value:a}}=this,i=this.intersects(t,a),n=this.intersects(l,t),s=this.intersects(l,a),c=this.intersects(e,t),u=this.intersects(e,l),f=this.intersects(e,a),o=r.labelHidden;l&&(u||s||n?l.classList.add(o):l.classList.remove(o)),t&&(c||s||i?t.classList.add(o):t.classList.remove(o)),e&&a&&(f?a.classList.add(o):a.classList.remove(o))}determineValueLabelPosition(){let{valueLabelRef:{value:e},meterContainerRef:{value:l},currentPercent:t}=this,a=t>100?100:t>0?t:0,i=e.getBoundingClientRect().width,n=l.getBoundingClientRect().width,s=100*(i-0)/(n-0);a+s>=100?(e.style.insetInlineEnd="0%",e.style.removeProperty("inset-inline-start")):(e.style.insetInlineStart=`${a}% `,e.style.removeProperty("inset-inline-end"))}renderMeterFill(){let{currentPercent:e,fillType:l}=this,t=this.getMeterKindCssClass();return h`<div class=${b({[r.fill]:!0,[t]:l!=="single"})} style=${p({width:`${e}%`})}></div>`}renderRangeLine(e){let l={insetInlineStart:`${e}%`};return h`<div class=${b(r.stepLine)} style=${p(l)}></div>`}renderValueLabel(){let{currentPercent:e,valueLabelType:l,unitLabel:t,value:a}=this,i=this.formatLabel(l==="percent"?e/100:a||0,l);return v("low-label-line",h`<div class=${b({[r.label]:!0,[r.labelValue]:!0})} ${m(this.valueLabelRef)}>${i}${t&&l!=="percent"&&h`<span class=${b(r.unitLabel)}> ${t}</span>`||""}</div>`)}renderMinLabel(){let{rangeLabelType:e,min:l,minPercent:t,unitLabel:a}=this,i={insetInlineStart:`${t}%`},n=this.formatLabel(e==="percent"?t:l,e);return v("min-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(i)} ${m(this.minLabelRef)}>${n}${a&&e!=="percent"&&h`<span class=${b(r.unitLabel)}> ${a}</span>`||""}</div>`)}renderLowLabel(){let{rangeLabelType:e,low:l,lowPercent:t,highPercent:a,labelFlipProximity:i}=this,n=l?this.formatLabel(e==="percent"?t/100:l,e):"",s={insetInlineStart:`${t}%`},c={insetInlineEnd:`${100-t}%`},u=(a-t)/100<i?c:s;return v("low-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(u)} ${m(this.lowLabelRef)}>${n}</div>`)}renderHighLabel(){let{rangeLabelType:e,high:l,highPercent:t,labelFlipMax:a}=this,i=l?this.formatLabel(e==="percent"?t/100:l,e):"",n={insetInlineStart:`${t}%`},s={insetInlineEnd:`${100-t}%`},c=t/100>=a?s:n;return v("high-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(c)} ${m(this.highLabelRef)}>${i}</div>`)}renderMaxLabel(){let{rangeLabelType:e,max:l,maxPercent:t}=this,a={insetInlineEnd:`${100-t}%`},i=this.formatLabel(e==="percent"?t/100:l,e);return v("max-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(a)} ${m(this.maxLabelRef)}>${i}</div>`)}render(){let{appearance:e,currentPercent:l,highActive:t,highPercent:a,label:i,lowActive:n,lowPercent:s,max:c,maxPercent:u,min:f,minPercent:o,rangeLabels:g,rangeLabelType:x,unitLabel:$,value:w,valueLabel:P,valueLabelType:R}=this,H=this.formatLabel(l/100,"percent"),I=`${w} ${$}`;return h`<div .ariaLabel=${i} .ariaValueMax=${x==="percent"?u:c} .ariaValueMin=${x==="percent"?o:f} .ariaValueNow=${R==="percent"?l:w} .ariaValueText=${R==="percent"?H:$?I:void 0} class=${b({[r.container]:!0,[r.stepsVisible]:g,[r.valueVisible]:P,[e]:e!=="outline-fill"})} role=meter ${m(this.meterContainerRef)}>${this.renderMeterFill()}${P&&this.renderValueLabel()||""}${n&&this.renderRangeLine(s)||""}${t&&this.renderRangeLine(a)||""}${g&&this.renderMinLabel()||""}${g&&n&&this.renderLowLabel()||""}${g&&t&&this.renderHighLabel()||""}${g&&this.renderMaxLabel()||""}</div>`}};C("calcite-meter",y);export{y as Meter};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{e as d}from"./
|
|
3
|
+
v5.0.0-next.6 */
|
|
4
|
+
import{e as d}from"./7DQ4G2FS.js";import"./44XNJNTA.js";import{D as l,E as t,F as n,J as s,P as c,g as o,h as r}from"./2IIGKMQ6.js";var v=o`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{position:relative;display:block;inline-size:100%}.track,.bar{position:absolute;inset-block-start:0px;block-size:2px}.track{z-index:var(--calcite-z-index);inline-size:100%;overflow:hidden;background-color:var(--calcite-progress-background-color, var(--calcite-color-border-3))}.bar{z-index:var(--calcite-z-index);background-color:var(--calcite-progress-fill-color, var(--calcite-color-brand))}@media(forced-colors:active){.track{background-color:highlightText}.bar{background-color:linkText}}.indeterminate{inline-size:20%;animation:looping-progress-bar-ani calc(var(--calcite-internal-animation-timing-medium) / var(--calcite-internal-duration-factor) * 11 / var(--calcite-internal-duration-factor)) linear infinite}.indeterminate.calcite--rtl{animation-name:looping-progress-bar-ani-rtl}.reversed{animation-direction:reverse}.text{padding-inline:0px;padding-block:1rem 0px;text-align:center;font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-progress-text-color, var(--calcite-color-text-2))}@keyframes looping-progress-bar-ani{0%{transform:translate3d(-100%,0,0)}50%{inline-size:40%}to{transform:translate3d(600%,0,0)}}@keyframes looping-progress-bar-ani-rtl{0%{transform:translate3d(100%,0,0)}50%{inline-size:40%}to{transform:translate3d(-600%,0,0)}}:host([hidden]){display:none}[hidden]{display:none}`,i={track:"track",bar:"bar",text:"text"},a=class extends l{constructor(){super(...arguments),this.reversed=!1,this.type="determinate",this.value=0}static{this.properties={label:1,reversed:[7,{},{reflect:!0,type:Boolean}],text:1,type:[3,{},{reflect:!0}],value:[9,{},{type:Number}]}}static{this.styles=v}render(){let e=this.type==="determinate",m=e?{width:`${this.value}%`}:{},p=d(this.el);return r`<div .ariaLabel=${this.label||this.text} .ariaValueMax=${e?"100":void 0} .ariaValueMin=${e?"0":void 0} .ariaValueNow=${e?this.value:void 0} role=progressbar><div class=${t(i.track)}><div class=${t({[i.bar]:!0,indeterminate:this.type==="indeterminate",[s.rtl]:p==="rtl",reversed:this.reversed})} style=${n(m)}></div></div>${this.text?r`<div class=${t(i.text)}>${this.text}</div>`:null}</div>`}};c("calcite-progress",a);export{a as Progress};
|
|
@@ -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"./RI3NRBMI.js";import{a as O}from"./KRHM7ACI.js";import{c as k,d as T,e as S}from"./ZVWKN3G7.js";import{c as y,e as I,f as z,h as N}from"./Y3HXK6MO.js";import{a as E,b as C}from"./NSBK36H4.js";import{a as b}from"./ALDDSDTX.js";import{a as x}from"./LH7245HX.js";import{a as w}from"./WOTQIMPZ.js";import"./B5JXPZDV.js";import{a as g}from"./3YZG7MA3.js";import"./CIU4VM7X.js";import"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{B as p,C as u,D as v,E as l,I as m,P as f,g as d,h as r,o as h}from"./AUIOWPFN.js";var A=d`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex;flex-direction:column;font-size:var(--calcite-select-font-size);font-weight:var(--calcite-internal-select-font-weight, var(--calcite-font-weight-regular))}.wrapper{position:relative;display:flex;align-items:stretch;inline-size:var(--select-width);block-size:var(--calcite-internal-select-block-size, 32px)}.wrapper:focus-within .icon,.wrapper:active .icon,.wrapper:hover .icon{color:var(--calcite-select-icon-color-hover, var(--calcite-color-text-1))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){--calcite-internal-select-font-size: var(--calcite-font-size--2);--calcite-select-spacing-inline: .5rem 2rem;--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-sm);--calcite-internal-select-block-size: 24px}:host([scale=m]){--calcite-internal-select-font-size: var(--calcite-font-size--1);--calcite-select-spacing-inline: .75rem 2.5rem;--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-md)}:host([scale=l]){--calcite-internal-select-font-size: var(--calcite-font-size-0);--calcite-select-spacing-inline: 1rem 3rem;--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-lg);--calcite-internal-select-block-size: 44px}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}.select{margin:0;box-sizing:border-box;inline-size:100%;cursor:pointer;appearance:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-style:solid;font-family:inherit;outline-color:transparent;font-weight:inherit;font-size:var(--calcite-select-font-size, var(--calcite-internal-select-font-size));color:var(--calcite-select-text-color, var(--calcite-color-text-2));border-color:var(--calcite-select-border-color, var(--calcite-color-border-input));border-width:var(--calcite-select-internal-border-width, var(--calcite-border-width-sm));padding-inline:var(--calcite-select-spacing-inline);padding-block:var(--calcite-internal-select-spacing-block);border-inline-end-width:0;line-height:var(--calcite-internal-select-line-height, normal);background-color:var(--calcite-select-background-color, var(--calcite-color-foreground-1));border-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));box-shadow:var(--calcite-select-shadow, var(--calcite-shadow-small))}.select: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))))}select:disabled{border-color:var(--calcite-color-border-input);--tw-bg-opacity: 1}.icon-container{pointer-events:none;position:absolute;inset-block:0px;display:flex;align-items:center;border-width:0px;border-style:solid;border-color:var(--calcite-color-border-input);background-color:transparent;color:var(--calcite-color-text-2);inset-inline-end:0px;border-start-start-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));border-start-end-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));border-end-start-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));border-end-end-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));border-color:var(--calcite-select-border-color, var(--calcite-color-border-input));border-inline-width:0 var(--calcite-select-internal-icon-border-inline-end-width, var(--calcite-border-width-sm));padding-inline:var(--calcite-internal-select-icon-container-padding-inline)}.icon-container .icon{color:var(--calcite-select-icon-color, var(--calcite-color-text-3))}:host([status=invalid]) select,:host([status=invalid]) .icon-container{border-color:var(--calcite-color-status-danger)}:host([status=invalid]) select:focus,:host([status=invalid]) .icon-container:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.select:focus~.icon-container{border-color:transparent}.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}`,c={icon:"icon",iconContainer:"icon-container",select:"select",wrapper:"wrapper"},L={validationMessage:"selectValidationMessage"};function s(n){return n.tagName==="CALCITE-OPTION"}function F(n){return n.tagName==="CALCITE-OPTION-GROUP"}var o=class extends v{constructor(){super(),this.componentToNativeEl=new Map,this.mutationObserver=b("mutation",()=>this.populateInternalSelect()),this.selectRef=p(),this.messages=x(),this.focusSetter=w()(this),this.disabled=!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=null,this.width="auto",this.calciteSelectChange=h({cancelable:!1}),this.listen("calciteInternalOptionChange",this.handleOptionOrGroupChange),this.listen("calciteInternalOptionGroupChange",this.handleOptionOrGroupChange)}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],label:1,labelText:1,name:[3,{},{reflect:!0}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectedOption:[0,{},{attribute:!1}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:m,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:1,width:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}]}}static{this.styles=A}async setFocus(e){return this.focusSetter(()=>this.selectRef.value,e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{subtree:!0,childList:!0}),k(this),y(this)}willUpdate(e){e.has("value")&&(this.hasUpdated||this.value!==null)&&this.updateItemsFromValue(this.value),e.has("selectedOption")&&(this.value=this.selectedOption?.value)}updated(){E(this)}loaded(){typeof this.value=="string"&&this.updateItemsFromValue(this.value),this.populateInternalSelect();let e=this.selectRef.value?.selectedOptions[0];this.selectFromNativeOption(e),z(this,this.selectedOption?.value??"")}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),T(this),I(this)}handleInternalSelectChange(){let e=this.selectRef.value.selectedOptions[0];this.selectFromNativeOption(e),requestAnimationFrame(()=>this.emitChangeEvent())}handleOptionOrGroupChange(e){e.stopPropagation();let t=e.target,a=this.componentToNativeEl.get(t);a&&(this.updateNativeElement(t,a),s(t)&&t.selected&&(this.deselectAllExcept(t),this.selectedOption=t))}onLabelClick(){this.setFocus()}updateItemsFromValue(e){this.el.querySelectorAll("calcite-option").forEach(t=>t.selected=t.value===e)}updateNativeElement(e,t){if(t.disabled=e.disabled,t.label=e.label,s(e)){let a=t;a.selected=e.selected,a.value=e.value,a.innerText=e.label}}populateInternalSelect(){let e=Array.from(this.el.children).filter(t=>t.tagName==="CALCITE-OPTION"||t.tagName==="CALCITE-OPTION-GROUP");this.clearInternalSelect(),e.forEach(t=>this.selectRef.value?.append(this.toNativeElement(t)))}clearInternalSelect(){this.componentToNativeEl.forEach(e=>e.remove()),this.componentToNativeEl.clear()}selectFromNativeOption(e){if(!e)return;let t;this.componentToNativeEl.forEach((a,i)=>{s(i)&&a===e&&(i.selected=!0,t=i,this.deselectAllExcept(i))}),t&&(this.selectedOption=t)}toNativeElement(e){if(s(e)){let t=document.createElement("option");return this.updateNativeElement(e,t),this.componentToNativeEl.set(e,t),t}if(F(e)){let t=document.createElement("optgroup");return this.updateNativeElement(e,t),Array.from(e.children).forEach(a=>{let i=this.toNativeElement(a);t.append(i),this.componentToNativeEl.set(e,i)}),this.componentToNativeEl.set(e,t),t}throw new Error("unsupported element child provided")}deselectAllExcept(e){this.el.querySelectorAll("calcite-option").forEach(t=>{t!==e&&(t.selected=!1)})}emitChangeEvent(){this.calciteSelectChange.emit()}renderChevron(){return r`<div class=${l(c.iconContainer)}><calcite-icon class=${l(c.icon)} icon=chevron-down .scale=${g(this.scale)}></calcite-icon></div>`}render(){let{disabled:e}=this;return C({disabled:e,children:r`${this.labelText&&O({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div class=${l(c.wrapper)}><select aria-errormessage=${L.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaLabel=${S(this)} class=${l(c.select)} .disabled=${e} @change=${this.handleInternalSelectChange} .required=${this.required} ${u(this.selectRef)}><slot></slot></select>${this.renderChevron()}${N({component:this})}</div>${this.validationMessage&&this.status==="invalid"?$({icon:this.validationIcon,id:L.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}};f("calcite-select",o);export{o as Select};
|
|
3
|
+
v5.0.0-next.6 */
|
|
4
|
+
import{a as $}from"./JVYKUU2B.js";import{a as O}from"./6YVXONLB.js";import{c as k,d as T,e as S}from"./O72KETNZ.js";import{c as y,e as I,f as z,h as N}from"./OBY2JHHI.js";import{a as E,b as C}from"./UQ4HIO7J.js";import{a as b}from"./CZF6KYOX.js";import{a as x}from"./CFWXX2ZT.js";import{a as w}from"./SXK4ATVN.js";import"./6PMY6MUE.js";import{a as g}from"./PCGNN5RO.js";import"./H3GTITDX.js";import"./7DQ4G2FS.js";import"./44XNJNTA.js";import{B as p,C as u,D as v,E as l,I as m,P as f,g as d,h as r,o as h}from"./2IIGKMQ6.js";var A=d`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex;flex-direction:column;font-size:var(--calcite-select-font-size);font-weight:var(--calcite-internal-select-font-weight, var(--calcite-font-weight-regular))}.wrapper{position:relative;display:flex;align-items:stretch;inline-size:var(--select-width);block-size:var(--calcite-internal-select-block-size, 32px)}.wrapper:focus-within .icon,.wrapper:active .icon,.wrapper:hover .icon{color:var(--calcite-select-icon-color-hover, var(--calcite-color-text-1))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){--calcite-internal-select-font-size: var(--calcite-font-size--2);--calcite-select-spacing-inline: .5rem 2rem;--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-sm);--calcite-internal-select-block-size: 24px}:host([scale=m]){--calcite-internal-select-font-size: var(--calcite-font-size--1);--calcite-select-spacing-inline: .75rem 2.5rem;--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-md)}:host([scale=l]){--calcite-internal-select-font-size: var(--calcite-font-size-0);--calcite-select-spacing-inline: 1rem 3rem;--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-lg);--calcite-internal-select-block-size: 44px}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}.select{margin:0;box-sizing:border-box;inline-size:100%;cursor:pointer;appearance:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-style:solid;font-family:inherit;outline-color:transparent;font-weight:inherit;font-size:var(--calcite-select-font-size, var(--calcite-internal-select-font-size));color:var(--calcite-select-text-color, var(--calcite-color-text-2));border-color:var(--calcite-select-border-color, var(--calcite-color-border-input));border-width:var(--calcite-select-internal-border-width, var(--calcite-border-width-sm));padding-inline:var(--calcite-select-spacing-inline);padding-block:var(--calcite-internal-select-spacing-block);border-inline-end-width:0;line-height:var(--calcite-internal-select-line-height, normal);background-color:var(--calcite-select-background-color, var(--calcite-color-foreground-1));border-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));box-shadow:var(--calcite-select-shadow, var(--calcite-shadow-small))}.select: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))))}select:disabled{border-color:var(--calcite-color-border-input);--tw-bg-opacity: 1}.icon-container{pointer-events:none;position:absolute;inset-block:0px;display:flex;align-items:center;border-width:0px;border-style:solid;border-color:var(--calcite-color-border-input);background-color:transparent;color:var(--calcite-color-text-2);inset-inline-end:0px;border-start-start-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));border-start-end-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));border-end-start-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));border-end-end-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));border-color:var(--calcite-select-border-color, var(--calcite-color-border-input));border-inline-width:0 var(--calcite-select-internal-icon-border-inline-end-width, var(--calcite-border-width-sm));padding-inline:var(--calcite-internal-select-icon-container-padding-inline)}.icon-container .icon{color:var(--calcite-select-icon-color, var(--calcite-color-text-3))}:host([status=invalid]) select,:host([status=invalid]) .icon-container{border-color:var(--calcite-color-status-danger)}:host([status=invalid]) select:focus,:host([status=invalid]) .icon-container:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.select:focus~.icon-container{border-color:transparent}.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}`,c={icon:"icon",iconContainer:"icon-container",select:"select",wrapper:"wrapper"},L={validationMessage:"selectValidationMessage"};function s(n){return n.tagName==="CALCITE-OPTION"}function F(n){return n.tagName==="CALCITE-OPTION-GROUP"}var o=class extends v{constructor(){super(),this.componentToNativeEl=new Map,this.mutationObserver=b("mutation",()=>this.populateInternalSelect()),this.selectRef=p(),this.messages=x(),this.focusSetter=w()(this),this.disabled=!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=null,this.width="auto",this.calciteSelectChange=h({cancelable:!1}),this.listen("calciteInternalOptionChange",this.handleOptionOrGroupChange),this.listen("calciteInternalOptionGroupChange",this.handleOptionOrGroupChange)}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],label:1,labelText:1,name:[3,{},{reflect:!0}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectedOption:[0,{},{attribute:!1}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:m,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:1,width:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}]}}static{this.styles=A}async setFocus(e){return this.focusSetter(()=>this.selectRef.value,e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{subtree:!0,childList:!0}),k(this),y(this)}willUpdate(e){e.has("value")&&(this.hasUpdated||this.value!==null)&&this.updateItemsFromValue(this.value),e.has("selectedOption")&&(this.value=this.selectedOption?.value)}updated(){E(this)}loaded(){typeof this.value=="string"&&this.updateItemsFromValue(this.value),this.populateInternalSelect();let e=this.selectRef.value?.selectedOptions[0];this.selectFromNativeOption(e),z(this,this.selectedOption?.value??"")}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),T(this),I(this)}handleInternalSelectChange(){let e=this.selectRef.value.selectedOptions[0];this.selectFromNativeOption(e),requestAnimationFrame(()=>this.emitChangeEvent())}handleOptionOrGroupChange(e){e.stopPropagation();let t=e.target,a=this.componentToNativeEl.get(t);a&&(this.updateNativeElement(t,a),s(t)&&t.selected&&(this.deselectAllExcept(t),this.selectedOption=t))}onLabelClick(){this.setFocus()}updateItemsFromValue(e){this.el.querySelectorAll("calcite-option").forEach(t=>t.selected=t.value===e)}updateNativeElement(e,t){if(t.disabled=e.disabled,t.label=e.label,s(e)){let a=t;a.selected=e.selected,a.value=e.value,a.innerText=e.label}}populateInternalSelect(){let e=Array.from(this.el.children).filter(t=>t.tagName==="CALCITE-OPTION"||t.tagName==="CALCITE-OPTION-GROUP");this.clearInternalSelect(),e.forEach(t=>this.selectRef.value?.append(this.toNativeElement(t)))}clearInternalSelect(){this.componentToNativeEl.forEach(e=>e.remove()),this.componentToNativeEl.clear()}selectFromNativeOption(e){if(!e)return;let t;this.componentToNativeEl.forEach((a,i)=>{s(i)&&a===e&&(i.selected=!0,t=i,this.deselectAllExcept(i))}),t&&(this.selectedOption=t)}toNativeElement(e){if(s(e)){let t=document.createElement("option");return this.updateNativeElement(e,t),this.componentToNativeEl.set(e,t),t}if(F(e)){let t=document.createElement("optgroup");return this.updateNativeElement(e,t),Array.from(e.children).forEach(a=>{let i=this.toNativeElement(a);t.append(i),this.componentToNativeEl.set(e,i)}),this.componentToNativeEl.set(e,t),t}throw new Error("unsupported element child provided")}deselectAllExcept(e){this.el.querySelectorAll("calcite-option").forEach(t=>{t!==e&&(t.selected=!1)})}emitChangeEvent(){this.calciteSelectChange.emit()}renderChevron(){return r`<div class=${l(c.iconContainer)}><calcite-icon class=${l(c.icon)} icon=chevron-down .scale=${g(this.scale)}></calcite-icon></div>`}render(){let{disabled:e}=this;return C({disabled:e,children:r`${this.labelText&&O({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div class=${l(c.wrapper)}><select aria-errormessage=${L.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaLabel=${S(this)} class=${l(c.select)} .disabled=${e} @change=${this.handleInternalSelectChange} .required=${this.required} ${u(this.selectRef)}><slot></slot></select>${this.renderChevron()}${N({component:this})}</div>${this.validationMessage&&this.status==="invalid"?$({icon:this.validationIcon,id:L.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}};f("calcite-select",o);export{o as Select};
|
|
@@ -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 T}from"./LYDOM6VQ.js";import"./AQ4DKRX6.js";import{a as g}from"./NULQJBCW.js";import{a as I}from"./LH7245HX.js";import{a as w}from"./WOTQIMPZ.js";import"./B5JXPZDV.js";import{a as s}from"./3YZG7MA3.js";import"./CIU4VM7X.js";import{e as A,k as u,t as d}from"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{B as $,C,D as E,E as c,J as y,P as k,g as b,h as i,l as S,o as l}from"./AUIOWPFN.js";var h={actionsStart:"actions-start",actionsEnd:"actions-end",contentEnd:"content-end",contentStart:"content-start"},t={actionsEnd:"actions-end",actionsStart:"actions-start",content:"content",description:"description",expandIcon:"expand-icon",header:"header",headerContainer:"header-container",headerContent:"header-content",headerText:"header-text",headerAppearance:r=>`header--${r}`,heading:"heading",icon:"icon",iconEnd:"icon--end",iconStart:"icon--start",iconPosition:r=>`icon-position--${r}`,iconType:r=>`icon-type--${r}`,item:"item",slotContentEnd:"slot-content-end",slotContentStart:"slot-content-start"},m={section:"section",sectionToggle:"section-toggle"},p={chevronDown:"chevronDown",caretDown:"caretDown",plus:"plus",minus:"minus"},z=b`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}.icon-position--end,.icon-position--start{--calcite-internal-accordion-item-icon-rotation: -90deg ;--calcite-internal-accordion-item-active-icon-rotation: 0deg;--calcite-internal-accordion-item-icon-rotation-rtl: 90deg;--calcite-internal-accordion-item-active-icon-rotation-rtl: 0deg}:host{position:relative;display:flex;flex-direction:column;text-decoration-line:none;color:var(--calcite-accordion-text-color, var(--calcite-accordion-item-text-color, var(--calcite-color-text-3)));background-color:var(--calcite-accordion-background-color, var(--calcite-accordion-item-background-color));border-width:0}:host .header{background-color:var(--calcite-accordion-item-header-background-color)}:host .header:hover{background-color:var(--calcite-internal-accordion-item-header-background-color-hover)}:host .header:active{background-color:var(--calcite-internal-accordion-item-header-background-color-press)}.header--solid{--calcite-internal-accordion-item-header-background-color-hover: var( --calcite-accordion-item-header-background-color-hover, var(--calcite-color-foreground-2) );--calcite-internal-accordion-item-header-background-color-press: var( --calcite-accordion-item-header-background-color-press, var(--calcite-color-foreground-3) )}.header--transparent{--calcite-internal-accordion-item-header-background-color-hover: var( --calcite-accordion-item-header-background-color-hover, var(--calcite-color-transparent-hover) );--calcite-internal-accordion-item-header-background-color-press: var( --calcite-accordion-item-header-background-color-press, var(--calcite-color-transparent-press) )}.icon-position--start{--calcite-internal-accordion-item-flex-direction: row-reverse;--calcite-internal-accordion-item-icon-spacing-start: 0;--calcite-internal-accordion-item-icon-spacing-end: var(--calcite-internal-accordion-icon-margin)}.icon-position--end{--calcite-internal-accordion-item-flex-direction: row;--calcite-internal-accordion-item-icon-spacing-start: var(--calcite-internal-accordion-icon-margin);--calcite-internal-accordion-item-icon-spacing-end: 0}.icon-position--end:not(.icon-type--plus-minus){--calcite-internal-accordion-item-icon-rotation: 0deg;--calcite-internal-accordion-item-active-icon-rotation: 180deg;--calcite-internal-accordion-item-icon-rotation-rtl: 0deg;--calcite-internal-accordion-item-active-icon-rotation-rtl: -180deg }.content,.header{border-block-end-width:var(--calcite-border-width-sm);border-block-end-style:solid;border-color:var(--calcite-accordion-border-color, var(--calcite-accordion-item-border-color, var(--calcite-color-border-2)))}.header-content{padding:var(--calcite-internal-accordion-item-padding, var(--calcite-internal-accordion-item-spacing-unit, .5rem .75rem))}.content{padding:var(--calcite-accordion-item-content-space, var(--calcite-internal-accordion-item-padding, var(--calcite-internal-accordion-item-spacing-unit, .5rem .75rem)))}.header{display:flex;align-items:stretch}.header-content,.header-container,.header .actions-start,.header .actions-end{display:flex;align-items:center;transition-timing-function:cubic-bezier(.4,0,.2,1);word-wrap:break-word;word-break:break-word}.header-content{flex-grow:1;cursor:pointer;outline-color:transparent;flex-direction:var(--calcite-internal-accordion-item-flex-direction);color:var(--calcite-accordion-item-heading-text-color, var(--calcite-accordion-text-color, inherit))}.header-content: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))))}.header-content:focus,.header-content:hover,.header-content:active{color:var(--calcite-accordion-item-heading-text-color, var(--calcite-accordion-text-color-hover))}.header-content:focus .heading,.header-content:hover .heading,.header-content:active .heading{color:var(--calcite-accordion-item-heading-text-color, var(--calcite-accordion-text-color-press))}.header-container{inline-size:100%}.slot-content-end{margin-inline-start:var(--calcite-internal-accordion-icon-margin)}.slot-content-start{margin-inline-end:var(--calcite-internal-accordion-icon-margin)}.header-text{margin-block:0px;flex-grow:1;flex-direction:column;padding-block:0px;text-align:initial;margin-inline-end:auto}.heading,.description{display:flex;inline-size:100%}.heading{margin:0;padding:0;font-weight:var(--calcite-font-weight-medium)}:host([scale=s]) .heading{font-size:var(--calcite-font-size--2)}:host([scale=m]) .heading{font-size:var(--calcite-font-size--1)}:host([scale=l]) .heading{font-size:var(--calcite-font-size-0)}.actions-start ::slotted(calcite-action),.actions-end ::slotted(calcite-action){align-self:stretch}.icon{display:flex;align-items:center;transition-timing-function:cubic-bezier(.4,0,.2,1);margin-inline-end:var(--calcite-internal-accordion-item-icon-spacing-start);margin-inline-start:var(--calcite-internal-accordion-item-icon-spacing-end)}.icon--start{color:var(--calcite-accordion-item-icon-color-start, var(--calcite-accordion-item-start-icon-color, var(--calcite-accordion-item-icon-color, currentColor)));margin-inline-end:var(--calcite-internal-accordion-icon-margin)}.icon--end{color:var(--calcite-accordion-item-icon-color-end, var(--calcite-accordion-item-end-icon-color, var(--calcite-accordion-item-icon-color, currentColor)));margin-inline-end:var(--calcite-internal-accordion-icon-margin);margin-inline-start:var(--calcite-internal-accordion-icon-margin)}.expand-icon{color:var(--calcite-accordion-item-expand-icon-color, var(--calcite-accordion-text-color, var(--calcite-accordion-item-text-color, var(--calcite-color-text-3))));margin-inline-start:var(--calcite-internal-accordion-item-icon-spacing-start);margin-inline-end:var(--calcite-internal-accordion-item-icon-spacing-end);transform:rotate(var(--calcite-internal-accordion-item-icon-rotation))}.calcite--rtl .expand-icon{transform:rotate(var(--calcite-internal-accordion-item-icon-rotation-rtl))}.description{margin-block-start:.25rem}.content{display:none;text-align:initial}:host(:not([expanded])) .heading{color:var(--calcite-accordion-item-heading-text-color, var(--calcite-accordion-text-color-hover, var(--calcite-accordion-item-text-color-hover, var(--calcite-color-text-2))))}:host([expanded]){color:var(--calcite-accordion-text-color-press, var(--calcite-accordion-text-color, var(--calcite-accordion-item-text-color, var(--calcite-color-text-1))))}:host([expanded]) .header{border-block-end-color:transparent}:host([expanded]) .expand-icon{color:var(--calcite-accordion-item-expand-icon-color, var(--calcite-accordion-text-color-hover, var(--calcite-accordion-text-color, var(--calcite-accordion-item-text-color, var(--calcite-accordion-item-text-color-hover, var(--calcite-color-text-2))))));transform:rotate(var(--calcite-internal-accordion-item-active-icon-rotation))}:host([expanded]) .calcite--rtl .expand-icon{transform:rotate(var(--calcite-internal-accordion-item-active-icon-rotation-rtl))}:host([expanded]) .description{color:var(--calcite-accordion-text-color-hover, var(--calcite-accordion-text-color, var(--calcite-accordion-item-text-color, var(--calcite-accordion-item-text-color-hover, var(--calcite-color-text-2)))))}:host([expanded]) .content{display:block}@media(forced-colors:active){:host([expanded]) .header{border-block-end:none}:host([expanded]) .heading{font-weight:bolder}.header-content:hover .heading,.header-content:focus .heading{text-decoration:underline}}:host([hidden]){display:none}[hidden]{display:none}`,f=class extends E{constructor(){super(),this.headerRef=$(),this.focusSetter=w()(this),this.messages=I(),this.hasActionsEnd=!1,this.hasActionsStart=!1,this.hasContentEnd=!1,this.hasContentStart=!1,this.expanded=!1,this.calciteAccordionItemCollapse=l({cancelable:!1}),this.calciteAccordionItemExpand=l({cancelable:!1}),this.calciteInternalAccordionItemClose=l({cancelable:!1}),this.calciteInternalAccordionItemSelect=l({cancelable:!1}),this.listen("keydown",this.keyDownHandler),this.listenOn(document.body,"calciteInternalAccordionChange",this.updateActiveItemOnChange),this.listenOn(document,"calciteInternalAccordionItemsSync",this.accordionItemSyncHandler)}static{this.properties={hasActionsEnd:[16,{},{state:!0}],hasActionsStart:[16,{},{state:!0}],hasContentEnd:[16,{},{state:!0}],hasContentStart:[16,{},{state:!0}],accordionParent:[0,{},{attribute:!1}],description:1,expanded:[7,{},{reflect:!0,type:Boolean}],heading:1,iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],appearance:1,headingLevel:[11,{},{type:Number,reflect:!0}],iconPosition:1,iconStart:[3,{type:String},{reflect:!0}],iconType:1,scale:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}]}}static{this.styles=z}async setFocus(e){return this.focusSetter(()=>this.headerRef.value,e)}willUpdate(e){e.has("expanded")&&this.hasUpdated&&(this.expanded?this.calciteAccordionItemExpand.emit():this.calciteAccordionItemCollapse.emit())}keyDownHandler(e){if(e.target===this.el)switch(e.key){case" ":case"Enter":this.emitRequestedItem(),e.preventDefault();break}}updateActiveItemOnChange(e){let[n]=e.composedPath(),a=u(this.el,"calcite-accordion");n===a&&(this.determineActiveItem(a.selectionMode,e.detail.requestedAccordionItem),e.stopPropagation())}accordionItemSyncHandler(e){let[n]=e.composedPath(),a=this.el;if(a.parentElement===n)return;let o=u(a,"calcite-accordion");n===o&&(this.appearance=o.appearance,this.iconPosition=o.iconPosition,this.iconType=o.iconType,this.scale=o.scale,e.stopPropagation())}handleActionsStartSlotChange(e){this.hasActionsStart=d(e)}handleActionsEndSlotChange(e){this.hasActionsEnd=d(e)}handleContentEndSlotChange(e){this.hasContentEnd=d(e)}handleContentStartSlotChange(e){this.hasContentStart=d(e)}itemHeaderClickHandler(){this.emitRequestedItem()}determineActiveItem(e,n){switch(e){case"multiple":this.el===n&&(this.expanded=!this.expanded);break;case"single":this.expanded=this.el===n?!this.expanded:!1;break;case"single-persist":this.expanded=this.el===n;break}}emitRequestedItem(){this.calciteInternalAccordionItemSelect.emit({requestedAccordionItem:this.el})}renderActionsStart(){return i`<div class=${c(t.actionsStart)} .hidden=${!this.hasActionsStart}><slot name=${h.actionsStart} @slotchange=${this.handleActionsStartSlotChange}></slot></div>`}renderActionsEnd(){return i`<div class=${c(t.actionsEnd)} .hidden=${!this.hasActionsEnd}><slot name=${h.actionsEnd} @slotchange=${this.handleActionsEndSlotChange}></slot></div>`}renderContentEnd(){return i`<div class=${c(t.slotContentEnd)} .hidden=${!this.hasContentEnd}><slot name=${h.contentEnd} @slotchange=${this.handleContentEndSlotChange}></slot></div>`}renderContentStart(){return i`<div class=${c(t.slotContentStart)} .hidden=${!this.hasContentStart}><slot name=${h.contentStart} @slotchange=${this.handleContentStartSlotChange}></slot></div>`}render(){let{iconFlipRtl:e,heading:n,headingLevel:a,messages:v,expanded:o}=this,P=A(this.el),D=o?v.collapse:v.expand,H=this.iconStart?g("icon-start",i`<calcite-icon class=${c({[t.icon]:!0,[t.iconStart]:!0})} .flipRtl=${e==="both"||e==="start"} .icon=${this.iconStart} .scale=${s(this.scale)}></calcite-icon>`):null,R=this.iconEnd?g("icon-end",i`<calcite-icon class=${c({[t.iconEnd]:!0,[t.icon]:!0})} .flipRtl=${e==="both"||e==="end"} .icon=${this.iconEnd} .scale=${s(this.scale)}></calcite-icon>`):null,{description:x}=this;return i`<div class=${c({[t.iconPosition(this.iconPosition)]:!0,[t.iconType(this.iconType)]:!0})}><div class=${c({[t.header]:!0,[y.rtl]:P==="rtl",[t.headerAppearance(this.appearance)]:!0})}>${this.renderActionsStart()}<div aria-controls=${m.section} .ariaExpanded=${o} class=${c(t.headerContent)} id=${m.sectionToggle} @click=${this.itemHeaderClickHandler} role=button tabindex=0 ${C(this.headerRef)}><div class=${c(t.headerContainer)}>${this.renderContentStart()}${H}<div class=${c(t.headerText)}>${T({class:t.heading,level:a,children:n})}${x?i`<span class=${c(t.description)}>${x}</span>`:null}</div>${R}${this.renderContentEnd()}</div><calcite-icon class=${c(t.expandIcon)} .icon=${this.iconType==="chevron"?p.chevronDown:this.iconType==="caret"?p.caretDown:o?p.minus:p.plus} .scale=${s(this.scale)} title=${D??S}></calcite-icon></div>${this.renderActionsEnd()}</div><section aria-labelledby=${m.sectionToggle} class=${c(t.content)} id=${m.section}><slot></slot></section></div>`}};k("calcite-accordion-item",f);export{f as AccordionItem};
|
|
3
|
+
v5.0.0-next.6 */
|
|
4
|
+
import{a as T}from"./BMB7PJZB.js";import"./BTK24FM2.js";import{a as g}from"./7XEO6UJ3.js";import{a as I}from"./CFWXX2ZT.js";import{a as w}from"./SXK4ATVN.js";import"./6PMY6MUE.js";import{a as s}from"./PCGNN5RO.js";import"./H3GTITDX.js";import{e as A,k as u,t as d}from"./7DQ4G2FS.js";import"./44XNJNTA.js";import{B as $,C,D as E,E as c,J as y,P as k,g as b,h as i,l as S,o as l}from"./2IIGKMQ6.js";var h={actionsStart:"actions-start",actionsEnd:"actions-end",contentEnd:"content-end",contentStart:"content-start"},t={actionsEnd:"actions-end",actionsStart:"actions-start",content:"content",description:"description",expandIcon:"expand-icon",header:"header",headerContainer:"header-container",headerContent:"header-content",headerText:"header-text",headerAppearance:r=>`header--${r}`,heading:"heading",icon:"icon",iconEnd:"icon--end",iconStart:"icon--start",iconPosition:r=>`icon-position--${r}`,iconType:r=>`icon-type--${r}`,item:"item",slotContentEnd:"slot-content-end",slotContentStart:"slot-content-start"},m={section:"section",sectionToggle:"section-toggle"},p={chevronDown:"chevronDown",caretDown:"caretDown",plus:"plus",minus:"minus"},z=b`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}.icon-position--end,.icon-position--start{--calcite-internal-accordion-item-icon-rotation: -90deg ;--calcite-internal-accordion-item-active-icon-rotation: 0deg;--calcite-internal-accordion-item-icon-rotation-rtl: 90deg;--calcite-internal-accordion-item-active-icon-rotation-rtl: 0deg}:host{position:relative;display:flex;flex-direction:column;text-decoration-line:none;color:var(--calcite-accordion-text-color, var(--calcite-accordion-item-text-color, var(--calcite-color-text-3)));background-color:var(--calcite-accordion-background-color, var(--calcite-accordion-item-background-color));border-width:0}:host .header{background-color:var(--calcite-accordion-item-header-background-color)}:host .header:hover{background-color:var(--calcite-internal-accordion-item-header-background-color-hover)}:host .header:active{background-color:var(--calcite-internal-accordion-item-header-background-color-press)}.header--solid{--calcite-internal-accordion-item-header-background-color-hover: var( --calcite-accordion-item-header-background-color-hover, var(--calcite-color-foreground-2) );--calcite-internal-accordion-item-header-background-color-press: var( --calcite-accordion-item-header-background-color-press, var(--calcite-color-foreground-3) )}.header--transparent{--calcite-internal-accordion-item-header-background-color-hover: var( --calcite-accordion-item-header-background-color-hover, var(--calcite-color-transparent-hover) );--calcite-internal-accordion-item-header-background-color-press: var( --calcite-accordion-item-header-background-color-press, var(--calcite-color-transparent-press) )}.icon-position--start{--calcite-internal-accordion-item-flex-direction: row-reverse;--calcite-internal-accordion-item-icon-spacing-start: 0;--calcite-internal-accordion-item-icon-spacing-end: var(--calcite-internal-accordion-icon-margin)}.icon-position--end{--calcite-internal-accordion-item-flex-direction: row;--calcite-internal-accordion-item-icon-spacing-start: var(--calcite-internal-accordion-icon-margin);--calcite-internal-accordion-item-icon-spacing-end: 0}.icon-position--end:not(.icon-type--plus-minus){--calcite-internal-accordion-item-icon-rotation: 0deg;--calcite-internal-accordion-item-active-icon-rotation: 180deg;--calcite-internal-accordion-item-icon-rotation-rtl: 0deg;--calcite-internal-accordion-item-active-icon-rotation-rtl: -180deg }.content,.header{border-block-end-width:var(--calcite-border-width-sm);border-block-end-style:solid;border-color:var(--calcite-accordion-border-color, var(--calcite-accordion-item-border-color, var(--calcite-color-border-2)))}.header-content{padding:var(--calcite-internal-accordion-item-padding, var(--calcite-internal-accordion-item-spacing-unit, .5rem .75rem))}.content{padding:var(--calcite-accordion-item-content-space, var(--calcite-internal-accordion-item-padding, var(--calcite-internal-accordion-item-spacing-unit, .5rem .75rem)))}.header{display:flex;align-items:stretch}.header-content,.header-container,.header .actions-start,.header .actions-end{display:flex;align-items:center;transition-timing-function:cubic-bezier(.4,0,.2,1);word-wrap:break-word;word-break:break-word}.header-content{flex-grow:1;cursor:pointer;outline-color:transparent;flex-direction:var(--calcite-internal-accordion-item-flex-direction);color:var(--calcite-accordion-item-heading-text-color, var(--calcite-accordion-text-color, inherit))}.header-content: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))))}.header-content:focus,.header-content:hover,.header-content:active{color:var(--calcite-accordion-item-heading-text-color, var(--calcite-accordion-text-color-hover))}.header-content:focus .heading,.header-content:hover .heading,.header-content:active .heading{color:var(--calcite-accordion-item-heading-text-color, var(--calcite-accordion-text-color-press))}.header-container{inline-size:100%}.slot-content-end{margin-inline-start:var(--calcite-internal-accordion-icon-margin)}.slot-content-start{margin-inline-end:var(--calcite-internal-accordion-icon-margin)}.header-text{margin-block:0px;flex-grow:1;flex-direction:column;padding-block:0px;text-align:initial;margin-inline-end:auto}.heading,.description{display:flex;inline-size:100%}.heading{margin:0;padding:0;font-weight:var(--calcite-font-weight-medium)}:host([scale=s]) .heading{font-size:var(--calcite-font-size--2)}:host([scale=m]) .heading{font-size:var(--calcite-font-size--1)}:host([scale=l]) .heading{font-size:var(--calcite-font-size-0)}.actions-start ::slotted(calcite-action),.actions-end ::slotted(calcite-action){align-self:stretch}.icon{display:flex;align-items:center;transition-timing-function:cubic-bezier(.4,0,.2,1);margin-inline-end:var(--calcite-internal-accordion-item-icon-spacing-start);margin-inline-start:var(--calcite-internal-accordion-item-icon-spacing-end)}.icon--start{color:var(--calcite-accordion-item-icon-color-start, var(--calcite-accordion-item-start-icon-color, var(--calcite-accordion-item-icon-color, currentColor)));margin-inline-end:var(--calcite-internal-accordion-icon-margin)}.icon--end{color:var(--calcite-accordion-item-icon-color-end, var(--calcite-accordion-item-end-icon-color, var(--calcite-accordion-item-icon-color, currentColor)));margin-inline-end:var(--calcite-internal-accordion-icon-margin);margin-inline-start:var(--calcite-internal-accordion-icon-margin)}.expand-icon{color:var(--calcite-accordion-item-expand-icon-color, var(--calcite-accordion-text-color, var(--calcite-accordion-item-text-color, var(--calcite-color-text-3))));margin-inline-start:var(--calcite-internal-accordion-item-icon-spacing-start);margin-inline-end:var(--calcite-internal-accordion-item-icon-spacing-end);transform:rotate(var(--calcite-internal-accordion-item-icon-rotation))}.calcite--rtl .expand-icon{transform:rotate(var(--calcite-internal-accordion-item-icon-rotation-rtl))}.description{margin-block-start:.25rem}.content{display:none;text-align:initial}:host(:not([expanded])) .heading{color:var(--calcite-accordion-item-heading-text-color, var(--calcite-accordion-text-color-hover, var(--calcite-accordion-item-text-color-hover, var(--calcite-color-text-2))))}:host([expanded]){color:var(--calcite-accordion-text-color-press, var(--calcite-accordion-text-color, var(--calcite-accordion-item-text-color, var(--calcite-color-text-1))))}:host([expanded]) .header{border-block-end-color:transparent}:host([expanded]) .expand-icon{color:var(--calcite-accordion-item-expand-icon-color, var(--calcite-accordion-text-color-hover, var(--calcite-accordion-text-color, var(--calcite-accordion-item-text-color, var(--calcite-accordion-item-text-color-hover, var(--calcite-color-text-2))))));transform:rotate(var(--calcite-internal-accordion-item-active-icon-rotation))}:host([expanded]) .calcite--rtl .expand-icon{transform:rotate(var(--calcite-internal-accordion-item-active-icon-rotation-rtl))}:host([expanded]) .description{color:var(--calcite-accordion-text-color-hover, var(--calcite-accordion-text-color, var(--calcite-accordion-item-text-color, var(--calcite-accordion-item-text-color-hover, var(--calcite-color-text-2)))))}:host([expanded]) .content{display:block}@media(forced-colors:active){:host([expanded]) .header{border-block-end:none}:host([expanded]) .heading{font-weight:bolder}.header-content:hover .heading,.header-content:focus .heading{text-decoration:underline}}:host([hidden]){display:none}[hidden]{display:none}`,f=class extends E{constructor(){super(),this.headerRef=$(),this.focusSetter=w()(this),this.messages=I(),this.hasActionsEnd=!1,this.hasActionsStart=!1,this.hasContentEnd=!1,this.hasContentStart=!1,this.expanded=!1,this.calciteAccordionItemCollapse=l({cancelable:!1}),this.calciteAccordionItemExpand=l({cancelable:!1}),this.calciteInternalAccordionItemClose=l({cancelable:!1}),this.calciteInternalAccordionItemSelect=l({cancelable:!1}),this.listen("keydown",this.keyDownHandler),this.listenOn(document.body,"calciteInternalAccordionChange",this.updateActiveItemOnChange),this.listenOn(document,"calciteInternalAccordionItemsSync",this.accordionItemSyncHandler)}static{this.properties={hasActionsEnd:[16,{},{state:!0}],hasActionsStart:[16,{},{state:!0}],hasContentEnd:[16,{},{state:!0}],hasContentStart:[16,{},{state:!0}],accordionParent:[0,{},{attribute:!1}],description:1,expanded:[7,{},{reflect:!0,type:Boolean}],heading:1,iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],appearance:1,headingLevel:[11,{},{type:Number,reflect:!0}],iconPosition:1,iconStart:[3,{type:String},{reflect:!0}],iconType:1,scale:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}]}}static{this.styles=z}async setFocus(e){return this.focusSetter(()=>this.headerRef.value,e)}willUpdate(e){e.has("expanded")&&this.hasUpdated&&(this.expanded?this.calciteAccordionItemExpand.emit():this.calciteAccordionItemCollapse.emit())}keyDownHandler(e){if(e.target===this.el)switch(e.key){case" ":case"Enter":this.emitRequestedItem(),e.preventDefault();break}}updateActiveItemOnChange(e){let[n]=e.composedPath(),a=u(this.el,"calcite-accordion");n===a&&(this.determineActiveItem(a.selectionMode,e.detail.requestedAccordionItem),e.stopPropagation())}accordionItemSyncHandler(e){let[n]=e.composedPath(),a=this.el;if(a.parentElement===n)return;let o=u(a,"calcite-accordion");n===o&&(this.appearance=o.appearance,this.iconPosition=o.iconPosition,this.iconType=o.iconType,this.scale=o.scale,e.stopPropagation())}handleActionsStartSlotChange(e){this.hasActionsStart=d(e)}handleActionsEndSlotChange(e){this.hasActionsEnd=d(e)}handleContentEndSlotChange(e){this.hasContentEnd=d(e)}handleContentStartSlotChange(e){this.hasContentStart=d(e)}itemHeaderClickHandler(){this.emitRequestedItem()}determineActiveItem(e,n){switch(e){case"multiple":this.el===n&&(this.expanded=!this.expanded);break;case"single":this.expanded=this.el===n?!this.expanded:!1;break;case"single-persist":this.expanded=this.el===n;break}}emitRequestedItem(){this.calciteInternalAccordionItemSelect.emit({requestedAccordionItem:this.el})}renderActionsStart(){return i`<div class=${c(t.actionsStart)} .hidden=${!this.hasActionsStart}><slot name=${h.actionsStart} @slotchange=${this.handleActionsStartSlotChange}></slot></div>`}renderActionsEnd(){return i`<div class=${c(t.actionsEnd)} .hidden=${!this.hasActionsEnd}><slot name=${h.actionsEnd} @slotchange=${this.handleActionsEndSlotChange}></slot></div>`}renderContentEnd(){return i`<div class=${c(t.slotContentEnd)} .hidden=${!this.hasContentEnd}><slot name=${h.contentEnd} @slotchange=${this.handleContentEndSlotChange}></slot></div>`}renderContentStart(){return i`<div class=${c(t.slotContentStart)} .hidden=${!this.hasContentStart}><slot name=${h.contentStart} @slotchange=${this.handleContentStartSlotChange}></slot></div>`}render(){let{iconFlipRtl:e,heading:n,headingLevel:a,messages:v,expanded:o}=this,P=A(this.el),D=o?v.collapse:v.expand,H=this.iconStart?g("icon-start",i`<calcite-icon class=${c({[t.icon]:!0,[t.iconStart]:!0})} .flipRtl=${e==="both"||e==="start"} .icon=${this.iconStart} .scale=${s(this.scale)}></calcite-icon>`):null,R=this.iconEnd?g("icon-end",i`<calcite-icon class=${c({[t.iconEnd]:!0,[t.icon]:!0})} .flipRtl=${e==="both"||e==="end"} .icon=${this.iconEnd} .scale=${s(this.scale)}></calcite-icon>`):null,{description:x}=this;return i`<div class=${c({[t.iconPosition(this.iconPosition)]:!0,[t.iconType(this.iconType)]:!0})}><div class=${c({[t.header]:!0,[y.rtl]:P==="rtl",[t.headerAppearance(this.appearance)]:!0})}>${this.renderActionsStart()}<div aria-controls=${m.section} .ariaExpanded=${o} class=${c(t.headerContent)} id=${m.sectionToggle} @click=${this.itemHeaderClickHandler} role=button tabindex=0 ${C(this.headerRef)}><div class=${c(t.headerContainer)}>${this.renderContentStart()}${H}<div class=${c(t.headerText)}>${T({class:t.heading,level:a,children:n})}${x?i`<span class=${c(t.description)}>${x}</span>`:null}</div>${R}${this.renderContentEnd()}</div><calcite-icon class=${c(t.expandIcon)} .icon=${this.iconType==="chevron"?p.chevronDown:this.iconType==="caret"?p.caretDown:o?p.minus:p.plus} .scale=${s(this.scale)} title=${D??S}></calcite-icon></div>${this.renderActionsEnd()}</div><section aria-labelledby=${m.sectionToggle} class=${c(t.content)} id=${m.section}><slot></slot></section></div>`}};k("calcite-accordion-item",f);export{f as AccordionItem};
|
|
@@ -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{E as r,h as i}from"./
|
|
3
|
+
v5.0.0-next.6 */
|
|
4
|
+
import{E as r,h as i}from"./2IIGKMQ6.js";function s(){let{disabled:e}=this;e||HTMLElement.prototype.click.call(this)}function a(e){e.target.disabled&&e.preventDefault()}var o=["mousedown","mouseup","click"];function c(e){e.target.disabled&&(e.stopImmediatePropagation(),e.preventDefault())}var n={capture:!0};function m(e){if(e.disabled){e.el.setAttribute("aria-disabled","true"),e.el.contains(document.activeElement)&&document.activeElement.blur(),l(e);return}u(e),e.el.removeAttribute("aria-disabled")}function l(e){e.el.click=s,d(e.el)}function d(e){e.addEventListener("pointerdown",a,n),o.forEach(t=>e.addEventListener(t,c,n))}function u(e){delete e.el.click,f(e.el)}function f(e){e.removeEventListener("pointerdown",a,n),o.forEach(t=>e.removeEventListener(t,c,n))}var v={container:"interaction-container"},p=({children:e,disabled:t})=>i`<div class=${r(v.container)} .inert=${t}>${e}</div>`;export{m as a,p 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 d}from"./
|
|
3
|
+
v5.0.0-next.6 */
|
|
4
|
+
import{a as d}from"./CZF6KYOX.js";import{a as m}from"./CFWXX2ZT.js";import"./6PMY6MUE.js";import{r as h}from"./7DQ4G2FS.js";import"./44XNJNTA.js";import{B as c,C as l,D as o,E as s,P as r,g as n,h as t}from"./2IIGKMQ6.js";var f={scrim:"scrim",content:"content"},u={s:72,l:480},v=n`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{position:absolute;inset:0;z-index:var(--calcite-z-index-overlay);display:flex;block-size:100%;inline-size:100%;flex-direction:column;align-items:stretch}@keyframes calcite-scrim-fade-in{0%{--tw-bg-opacity: 0}to{--tw-text-opacity: 1}}.scrim{position:absolute;inset:0;display:flex;flex-direction:column;align-content:center;align-items:center;justify-content:center;overflow:hidden;animation:calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;background-color:var(--calcite-scrim-background, var(--calcite-color-transparent-scrim))}.content{padding:1rem}:host([hidden]){display:none}[hidden]{display:none}`,i=class extends o{constructor(){super(...arguments),this.loaderRef=c(),this.resizeObserver=d("resize",()=>this.handleResize()),this.messages=m(),this.hasContent=!1,this.loading=!1}static{this.properties={hasContent:[16,{},{state:!0}],loaderScale:[16,{},{state:!0}],loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}]}}static{this.styles=v}connectedCallback(){super.connectedCallback(),this.resizeObserver?.observe(this.el)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}handleDefaultSlotChange(e){this.hasContent=h(e)}getScale(e){return e<u.s?"s":e>=u.l?"l":"m"}handleResize(){let{el:e}=this;this.loaderScale=this.getScale(Math.min(e.clientHeight,e.clientWidth)??0)}render(){let{hasContent:e,loading:p,loaderScale:a,messages:g}=this;return t`<div class=${s(f.scrim)}>${p&&a?t`<calcite-loader .label=${g.loading} .scale=${a} ${l(this.loaderRef)}></calcite-loader>`:null}<div class=${s(f.content)} .hidden=${!e}><slot @slotchange=${this.handleDefaultSlotChange}></slot></div></div>`}};r("calcite-scrim",i);export{i as Scrim};
|
|
@@ -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 o}from"./
|
|
3
|
+
v5.0.0-next.6 */
|
|
4
|
+
import{a as o}from"./NHRWRXH2.js";import"./XIXFKVFZ.js";async function m(){return o.sort().map(r=>({label:r}))}export{m as groupByName};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{b as o,c as r}from"./
|
|
3
|
+
v5.0.0-next.6 */
|
|
4
|
+
import{b as o,c as r}from"./XIXFKVFZ.js";var t="Global";function i(n){return o(n).countries.length===0}function a(n){if(i(n))return t;let e=n.indexOf("/");return e===-1?n:n.slice(0,e)}function c(n){return r(n)?.id??n}export{t as a,a as b,c};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{c as h,l as M,q as S,u as C}from"./
|
|
3
|
+
v5.0.0-next.6 */
|
|
4
|
+
import{c as h,l as M,q as S,u as C}from"./7DQ4G2FS.js";import"./44XNJNTA.js";import{D as b,H as A,P as T,g as x,h as y,o as E}from"./2IIGKMQ6.js";function w(u){return u?.tagName==="CALCITE-TREE-ITEM"}function D(u){return Array.from(u.querySelectorAll("calcite-tree-item:not([disabled])")).filter(t=>{let e=t;for(;e!==u&&e!==void 0;){let i=e.parentElement;if(!(!w(i)||!i.hasChildren||i.expanded))return!1;e=e.parentElement}return!0})}var k=x`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:block}:host(:focus){outline:2px solid transparent;outline-offset:2px}:host([hidden]){display:none}[hidden]{display:none}`,g=class extends b{constructor(){super(),this.items=[],this.lines=!1,this.parentExpanded=!1,this.scale="m",this.selectedItems=[],this.selectionMode="single",this.calciteTreeSelect=E({cancelable:!1}),this.listen("focus",this.onFocus),this.listen("focusin",this.onFocusIn),this.listen("focusout",this.onFocusOut),this.listen("calciteInternalTreeItemSelect",this.onInternalTreeItemSelect),this.listen("keydown",this.keyDownHandler)}static{this.properties={child:[7,{},{reflect:!0,type:Boolean}],lines:[7,{},{reflect:!0,type:Boolean}],parentExpanded:[5,{},{type:Boolean}],scale:[3,{},{reflect:!0}],selectedItems:[0,{},{attribute:!1}],selectionMode:[3,{},{reflect:!0}]}}static{this.styles=k}willUpdate(t){t.has("parentExpanded")&&(this.hasUpdated||this.parentExpanded!==!1)&&this.updateItems();let e=this.el.parentElement?.closest("calcite-tree");this.lines=e?e.lines:this.lines,this.scale=e?e.scale:this.scale,this.selectionMode=e?e.selectionMode:this.selectionMode,this.child=!!e}onFocus(){if(!this.child){let t=this.el.querySelector("calcite-tree-item[selected]:not([disabled])")||this.el.querySelector("calcite-tree-item:not([disabled])");M(t)}}onFocusIn(t){(t.relatedTarget===this.el||!this.el.contains(t.relatedTarget))&&this.el.removeAttribute("tabindex")}onFocusOut(t){!this.el.contains(t.relatedTarget)&&(this.el.tabIndex=this.getRootTabIndex())}onInternalTreeItemSelect(t){if(this.child)return;let e=t.target,i=h(e.querySelectorAll("calcite-tree-item"));if(t.preventDefault(),t.stopPropagation(),this.selectionMode==="ancestors"){this.updateAncestorTree(t);return}let o=this.selectionMode==="none",n=this.selectionMode!==null&&(!e.hasChildren||e.hasChildren&&(this.selectionMode==="children"||this.selectionMode==="multichildren")),l=this.selectionMode==="multichildren"&&e.hasChildren,c=!o&&t.detail.modifyCurrentSelection&&(this.selectionMode==="multiple"||this.selectionMode==="multichildren"),f=!c&&((this.selectionMode==="single"||this.selectionMode==="multiple")&&i.length<=0||this.selectionMode==="children"||this.selectionMode==="multichildren"||this.selectionMode==="single-persist"&&!e.hasChildren),d=["multiple","none","single","single-persist"].includes(this.selectionMode)&&e.hasChildren,a=[];n&&a.push(e),f&&h(this.el.querySelectorAll("calcite-tree-item[selected]")).forEach(r=>{a.includes(r)||(r.selected=!1)}),d&&["multiple","none","single","single-persist"].includes(this.selectionMode)&&(e.expanded=!e.expanded),l&&i.forEach(s=>{s.selected=!1,s.hasChildren&&(s.expanded=!1)}),c&&window.getSelection().removeAllRanges(),c&&e.selected?a.forEach(s=>{s.disabled||(s.selected=!1)}):o||a.forEach(s=>{s.disabled||(s.selected=this.selectionMode!=="single"||!s.selected)}),this.selectedItems=o?[]:h(this.el.querySelectorAll("calcite-tree-item")).filter(s=>s.selected),this.calciteTreeSelect.emit(),t.stopPropagation()}keyDownHandler(t){if(this.child)return;let e=this.el,i=t.target,o=["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End","Tab"];if(!(w(i)&&this.el.contains(i))||!o.includes(t.key))return;let n=D(e);if(t.key==="Tab"){n.forEach(l=>l.tabIndex=-1);return}if(t.key==="ArrowDown"){let l=n.indexOf(i);n[l+1]?.focus(),t.preventDefault();return}if(t.key==="ArrowUp"){let l=n.indexOf(i);n[l-1]?.focus(),t.preventDefault();return}if(t.key==="ArrowLeft"){if(i.hasChildren&&i.expanded){i.expanded=!1,t.preventDefault();return}n.slice(0,n.indexOf(i)).reverse().find(f=>f.depth===i.depth-1)?.focus(),t.preventDefault();return}if(t.key==="ArrowRight"){if(!i.disabled&&i.hasChildren)if(!i.expanded)i.expanded=!0,t.preventDefault();else{let l=n.indexOf(i);n[l+1]?.focus(),t.preventDefault()}return}if(t.key==="Home"){let l=n.shift();l&&(l.focus(),t.preventDefault());return}if(t.key==="End"){let l=n.pop();l&&(l.focus(),t.preventDefault());return}}updateAncestorTree(t){let e=t.target,i=t.detail.updateItem;if(e.disabled||e.indeterminate&&!i)return;let o=[],n=e.parentElement.closest("calcite-tree-item");for(;n;)o.push(n),n=n.parentElement.closest("calcite-tree-item");let l=Array.from(e.querySelectorAll("calcite-tree-item:not([disabled])")),c=l.filter(s=>!s.hasChildren),f=l.filter(s=>s.hasChildren),d;i?d=e.hasChildren?!(e.selected||e.indeterminate):!e.selected:d=e.selected,c.forEach(s=>{s.selected=d,s.indeterminate=!1});function a(s,r){let m=s.filter(p=>p.selected),I=s.filter(p=>!p.selected);r.selected=m.length===s.length,r.indeterminate=m.length>0&&I.length>0}f.reverse().forEach(s=>{let r=Array.from(s.querySelectorAll(":scope > calcite-tree > calcite-tree-item"));a(r,s)}),i&&(e.hasChildren?a(l,e):(e.selected=d,e.indeterminate=!1)),o.forEach(s=>{let r=h(s.querySelectorAll("calcite-tree-item")),m=r.filter(p=>p.selected);if(m.length===0){s.selected=!1,s.indeterminate=!1;return}let I=m.length<r.length;s.indeterminate=I,s.selected=!I}),this.selectedItems=h(this.el.querySelectorAll("calcite-tree-item")).filter(s=>s.selected),i&&this.calciteTreeSelect.emit()}updateItems(){this.items.forEach(t=>t.parentExpanded=this.parentExpanded)}handleDefaultSlotChange(t){let e=C(t).filter(i=>i.matches("calcite-tree-item"));this.items=e,this.updateItems()}getRootTabIndex(){return this.child?-1:0}render(){return this.el.ariaMultiSelectable=this.child?void 0:S(this.selectionMode==="multiple"||this.selectionMode==="multichildren"),this.el.role=this.child?void 0:"tree",A(this.el,"tabIndex",this.getRootTabIndex()),y`<slot @slotchange=${this.handleDefaultSlotChange}></slot>`}};T("calcite-tree",g);export{g as Tree};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{g as o}from"./
|
|
3
|
+
v5.0.0-next.6 */
|
|
4
|
+
import{g as o}from"./2IIGKMQ6.js";var r=o`:host(.calcite-sortable--chosen),:host(.calcite-sortable--drag),:host(.calcite-sortable--fallback),:host(.calcite-sortable--ghost){position:relative;overflow:hidden}:host(.calcite-sortable--ghost):before{content:"";position:absolute;inset-block:0px;inset-inline-start:0px;inset-inline-end:0px;z-index:var(--calcite-z-index);box-sizing:border-box;border-width:1px;border-style:dashed;border-color:var(--calcite-color-brand);background-color:var(--calcite-color-foreground-2)}:host(.calcite-sortable--drag){--tw-shadow: 0 6px 20px -4px rgba(0, 0, 0, .1), 0 4px 12px -2px rgba(0, 0, 0, .08);--tw-shadow-colored: 0 6px 20px -4px var(--tw-shadow-color), 0 4px 12px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}`;export{r as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as E,t as g}from"./V4NPQ4WA.js";import"./FZIUTVKD.js";import{a as k,b as I}from"./NSBK36H4.js";import{a as C}from"./NULQJBCW.js";import{a as z}from"./WOTQIMPZ.js";import"./B5JXPZDV.js";import"./3YZG7MA3.js";import"./CIU4VM7X.js";import{t as x}from"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{B as S,C as $,D as b,E as c,P as y,g as m,h as l,i as o,l as i,o as d}from"./AUIOWPFN.js";var t={imageContainer:"image-container",container:"container",selectable:"selectable",nonInteractive:"non-interactive",selected:"selected",internalSvgContainer:"internal-svg-container",internalSvgDisabled:"internal-svg-disabled",internalSvgEmpty:"internal-svg-empty",swatch:"swatch",checker:"checker",noColorSwatch:"swatch--no-color"},P={image:"image"},M=4,n={squareSize:M,size:M*2},w={checker:"checker",shape:"shape",swatchRect:"swatch-rect",swatchSolid:"swatch-solid",swatchTransparent:"swatch-transparent"},R=m`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:block;--calcite-internal-swatch-inset: var(--calcite-spacing-xxs)}:host([scale=s]) .container{--calcite-internal-swatch-size: var(--calcite-spacing-xl)}:host([scale=m]) .container{--calcite-internal-swatch-size: var(--calcite-spacing-xxl)}:host([scale=l]) .container{--calcite-internal-swatch-size: var(--calcite-spacing-xxxl)}.container{position:relative;box-sizing:border-box;justify-content:center;overflow:hidden;outline-color:transparent;font-size:var(--calcite-internal-swatch-font-size, var(--calcite-font-size));block-size:var(--calcite-internal-swatch-size, auto);inline-size:var(--calcite-internal-swatch-size, auto);min-inline-size:var(--calcite-internal-swatch-size, auto);border-radius:var(--calcite-swatch-corner-radius, 0)}.container:not(.non-interactive):hover{cursor:pointer;box-shadow:0 0 0 var(--calcite-border-width-md) var(--calcite-color-border-1)}.container.selectable{cursor:pointer}.container:not(.non-interactive):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(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.swatch{position:absolute;display:inline-flex;overflow:hidden;z-index:calc(var(--calcite-z-index) + 1);block-size:var(--calcite-internal-swatch-size, auto);inline-size:var(--calcite-internal-swatch-size, auto);min-inline-size:var(--calcite-internal-swatch-size, auto);border-radius:var(--calcite-swatch-corner-radius, 0)}:host([selected]) .swatch{inset:var(--calcite-internal-swatch-inset);block-size:calc(var(--calcite-internal-swatch-size, auto) - 2 * var(--calcite-internal-swatch-inset));inline-size:calc(var(--calcite-internal-swatch-size, auto) - 2 * var(--calcite-internal-swatch-inset));min-inline-size:calc(var(--calcite-internal-swatch-size, auto) - 2 * var(--calcite-internal-swatch-inset))}:host([selected]) .container{box-shadow:inset 0 0 0 var(--calcite-border-width-md) var(--calcite-color-text-1),inset 0 0 0 var(--calcite-border-width-lg) var(--calcite-color-foreground-1)}:host([selected]) .image-container{inset:var(--calcite-internal-swatch-inset)}.image-container{position:absolute;display:inline-flex;overflow:hidden;z-index:calc(var(--calcite-z-index) + 2);inset:var(--calcite-spacing-px);display:flex;align-items:center;justify-content:center;pointer-events:none;border-radius:var(--calcite-swatch-corner-radius, 0)}.internal-svg-container{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:calc(var(--calcite-z-index) + 2)}.swatch{overflow:hidden;block-size:inherit;inline-size:inherit}.swatch--no-color rect{fill:var(--calcite-color-foreground-1)}:host([selected]) #swatch-rect,:host([selected]) #swatch-solid,:host([selected]) #swatch-transparent{stroke-width:0}#swatch-rect,#swatch-solid,#swatch-transparent{stroke:var(--calcite-color-text-1);stroke-width:var(--calcite-border-width-md);stroke-opacity:.3;rx:var(--calcite-swatch-corner-radius)}.internal-svg-disabled{stroke:#6a6a6a;fill:#fff}.internal-svg-empty{stroke:var(--calcite-color-status-danger);stroke-width:3}.checker{fill:#cacaca}:host([hidden]){display:none}[hidden]{display:none}`,u=class extends b{constructor(){super(),this.containerRef=S(),this.focusSetter=z()(this),this.hasImage=!1,this.disabled=!1,this.interactive=!1,this.scale="m",this.selected=!1,this.selectionMode="none",this.calciteInternalSwatchKeyEvent=d({cancelable:!1}),this.calciteInternalSwatchSelect=d({cancelable:!1}),this.calciteInternalSyncSelectedSwatches=d({cancelable:!1}),this.calciteSwatchSelect=d({cancelable:!1}),this.listen("keydown",this.keyDownHandler)}static{this.properties={hasImage:[16,{},{state:!0}],color:1,disabled:[7,{},{reflect:!0,type:Boolean}],interactive:[5,{},{type:Boolean}],label:1,parentSwatchGroup:[0,{},{attribute:!1}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],selectionMode:1,value:1}}static{this.styles=R}async setFocus(e){return this.focusSetter(()=>this.el,e)}async load(){this.handleColorChange(this.color)}willUpdate(e){e.has("selected")&&this.hasUpdated&&this.watchSelected(this.selected),e.has("color")&&this.handleColorChange(this.color)}updated(){k(this)}loaded(){this.selectionMode!=="none"&&this.interactive&&this.selected&&this.handleSelectionPropertyChange(this.selected)}watchSelected(e){this.selectionMode!=="none"&&this.handleSelectionPropertyChange(e)}keyDownHandler(e){if(e.target===this.el)switch(e.key){case" ":case"Enter":this.handleEmittingEvent(),e.preventDefault();break;case"ArrowRight":case"ArrowLeft":case"Home":case"End":this.calciteInternalSwatchKeyEvent.emit(e),e.preventDefault();break}}handleSlotImageChange(e){this.hasImage=x(e)}handleEmittingEvent(){this.interactive&&this.calciteSwatchSelect.emit()}handleSelectionPropertyChange(e){this.selectionMode==="single"&&this.calciteInternalSyncSelectedSwatches.emit(),!this.parentSwatchGroup.selectedItems.includes(this.el)&&e&&this.selectionMode!=="multiple"&&this.calciteInternalSwatchSelect.emit(),this.selectionMode!=="single"&&this.calciteInternalSyncSelectedSwatches.emit()}handleColorChange(e){this.internalColor=e?E(e):null}renderSwatchImage(){return l`<div class=${c(t.imageContainer)}><slot name=${P.image} @slotchange=${this.handleSlotImageChange}></slot></div>`}renderEmptyDisplay(){let e=this.scale==="s"?"12":this.scale==="m"?"16":"20";return l`<div class=${c(t.internalSvgContainer)}><svg fill=none height=${e??i} viewBox=${`0 0 ${e} ${e}`} width=${e??i} xmlns=http://www.w3.org/2000/svg>${o`<path class=${c(t.internalSvgEmpty)} d=${`M${e} 0L0 ${e}`} />`}</svg></div>`}renderDisabledDisplay(){let e=l`<svg fill=none height=14 viewBox="0 0 14 14" width=14 xmlns=http://www.w3.org/2000/svg>${o`<path class=${c(t.internalSvgDisabled)} d="M7 0.5C10.5899 0.5 13.5 3.41015 13.5 7C13.5 10.5899 10.5899 13.5 7 13.5C3.41015 13.5 0.5 10.5899 0.5 7C0.5 3.41015 3.41015 0.5 7 0.5ZM4.78906 10.917C5.44221 11.2866 6.19529 11.5 7 11.5C9.48528 11.5 11.5 9.48528 11.5 7C11.5 6.19529 11.2866 5.44221 10.917 4.78906L4.78906 10.917ZM7 2.5C4.51472 2.5 2.5 4.51472 2.5 7C2.5 7.95644 2.79808 8.84235 3.30664 9.57129L9.57129 3.30664C8.84235 2.79808 7.95644 2.5 7 2.5Z" />`}</svg>`,a=l`<svg fill=none height=18 viewBox="0 0 18 18" width=18 xmlns=http://www.w3.org/2000/svg>${o`<path class=${c(t.internalSvgDisabled)} d="M9 0.5C13.6944 0.5 17.5 4.30558 17.5 9C17.5 13.6944 13.6944 17.5 9 17.5C4.30558 17.5 0.5 13.6944 0.5 9C0.5 4.30558 4.30558 0.5 9 0.5ZM5.78125 14.2588C6.71828 14.8337 7.81941 15.167 9 15.167C12.4058 15.167 15.167 12.4058 15.167 9C15.167 7.81941 14.8337 6.71828 14.2588 5.78125L5.78125 14.2588ZM9 2.83301C5.59424 2.83301 2.83301 5.59424 2.83301 9C2.83301 10.3817 3.28731 11.6565 4.05469 12.6846L12.6846 4.05469C11.6565 3.28731 10.3817 2.83301 9 2.83301Z" />`}</svg>`;return l`<div class=${c(t.internalSvgContainer)}>${this.scale==="l"?a:e}</div>`}renderSwatch(){let{internalColor:e}=this,a="0",h=!e,s={height:"100%",rx:a,width:"100%"};if(h)return o`<clipPath id=${w.shape}><rect height=100% rx=${a} width=100% /></clipPath>${this.renderSwatchRect({clipPath:`inset(0 round "${a}")`,...s})}<line clip-path=url(#shape) x1=100% x2=0 y1=0 y2=100% />`;let r=e.alpha(),v=g(e),p=g(e,r<1);return o`<defs><pattern height=${n.size} id=${w.checker} patternUnits=userSpaceOnUse width=${n.size} x=0 y=0><rect class=${c(t.checker)} height=${n.squareSize} width=${n.squareSize} x=0 y=0 /><rect class=${c(t.checker)} height=${n.squareSize} width=${n.squareSize} x=${n.squareSize} y=${n.squareSize} /></pattern></defs>${this.renderSwatchRect({fill:"url(#checker)",rx:s.rx,height:s.height,width:s.width})}${this.renderSwatchRect({clipPath:r<1?"polygon(100% 0, 0 0, 0 100%)":`inset(0 round "${a}")`,fill:v,id:w.swatchSolid,...s})}${r<1?this.renderSwatchRect({clipPath:"polygon(100% 0, 100% 100%, 0 100%)",fill:p,id:w.swatchTransparent,key:"opacity-fill",...s}):null}`}renderSwatchRect({clipPath:e,fill:a,height:h,key:s,rx:r,stroke:v,strokeWidth:p,width:D,id:f}){return C(s,o`<rect clip-path=${e??i} fill=${a??i} height=${h??i} id=${(f||w.swatchRect)??i} rx=${r??i} stroke=${v??i} stroke-width=${p??i} width=${D??i} />`)}render(){let{disabled:e}=this,a=e||!e&&!this.interactive,h=this.selectionMode==="multiple"&&this.interactive?"checkbox":this.selectionMode!=="none"&&this.interactive?"radio":this.interactive?"button":"presentation",s=!this.internalColor,r={[t.swatch]:!0,[t.noColorSwatch]:s||this.hasImage&&!this.internalColor};return I({disabled:e,children:l`<div .ariaChecked=${this.selectionMode!=="none"&&this.interactive?this.selected:void 0} .ariaLabel=${h!=="presentation"?this.label:""} class=${c({[t.container]:!0,[t.selectable]:this.selectionMode!=="none",[t.selected]:this.selected,[t.nonInteractive]:!this.interactive})} @click=${this.handleEmittingEvent} .role=${h} .tabIndex=${a?-1:0} title=${this.label??i} ${$(this.containerRef)}>${this.renderSwatchImage()}${!this.internalColor&&!this.hasImage&&this.renderEmptyDisplay()||""}${this.disabled&&this.renderDisabledDisplay()||""}<svg class=${c(r)} role=presentation xmlns=http://www.w3.org/2000/svg>${this.renderSwatch()}</svg></div>`})}};y("calcite-swatch",u);export{u as Swatch};
|
|
3
|
+
v5.0.0-next.6 */
|
|
4
|
+
import{a as E,t as g}from"./5BQ76NQW.js";import"./XJ4SR7WO.js";import{a as k,b as I}from"./UQ4HIO7J.js";import{a as C}from"./7XEO6UJ3.js";import{a as z}from"./SXK4ATVN.js";import"./6PMY6MUE.js";import"./PCGNN5RO.js";import"./H3GTITDX.js";import{t as x}from"./7DQ4G2FS.js";import"./44XNJNTA.js";import{B as S,C as $,D as b,E as c,P as y,g as m,h as l,i as o,l as i,o as d}from"./2IIGKMQ6.js";var t={imageContainer:"image-container",container:"container",selectable:"selectable",nonInteractive:"non-interactive",selected:"selected",internalSvgContainer:"internal-svg-container",internalSvgDisabled:"internal-svg-disabled",internalSvgEmpty:"internal-svg-empty",swatch:"swatch",checker:"checker",noColorSwatch:"swatch--no-color"},P={image:"image"},M=4,n={squareSize:M,size:M*2},w={checker:"checker",shape:"shape",swatchRect:"swatch-rect",swatchSolid:"swatch-solid",swatchTransparent:"swatch-transparent"},R=m`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:block;--calcite-internal-swatch-inset: var(--calcite-spacing-xxs)}:host([scale=s]) .container{--calcite-internal-swatch-size: var(--calcite-spacing-xl)}:host([scale=m]) .container{--calcite-internal-swatch-size: var(--calcite-spacing-xxl)}:host([scale=l]) .container{--calcite-internal-swatch-size: var(--calcite-spacing-xxxl)}.container{position:relative;box-sizing:border-box;justify-content:center;overflow:hidden;outline-color:transparent;font-size:var(--calcite-internal-swatch-font-size, var(--calcite-font-size));block-size:var(--calcite-internal-swatch-size, auto);inline-size:var(--calcite-internal-swatch-size, auto);min-inline-size:var(--calcite-internal-swatch-size, auto);border-radius:var(--calcite-swatch-corner-radius, 0)}.container:not(.non-interactive):hover{cursor:pointer;box-shadow:0 0 0 var(--calcite-border-width-md) var(--calcite-color-border-1)}.container.selectable{cursor:pointer}.container:not(.non-interactive):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(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.swatch{position:absolute;display:inline-flex;overflow:hidden;z-index:calc(var(--calcite-z-index) + 1);block-size:var(--calcite-internal-swatch-size, auto);inline-size:var(--calcite-internal-swatch-size, auto);min-inline-size:var(--calcite-internal-swatch-size, auto);border-radius:var(--calcite-swatch-corner-radius, 0)}:host([selected]) .swatch{inset:var(--calcite-internal-swatch-inset);block-size:calc(var(--calcite-internal-swatch-size, auto) - 2 * var(--calcite-internal-swatch-inset));inline-size:calc(var(--calcite-internal-swatch-size, auto) - 2 * var(--calcite-internal-swatch-inset));min-inline-size:calc(var(--calcite-internal-swatch-size, auto) - 2 * var(--calcite-internal-swatch-inset))}:host([selected]) .container{box-shadow:inset 0 0 0 var(--calcite-border-width-md) var(--calcite-color-text-1),inset 0 0 0 var(--calcite-border-width-lg) var(--calcite-color-foreground-1)}:host([selected]) .image-container{inset:var(--calcite-internal-swatch-inset)}.image-container{position:absolute;display:inline-flex;overflow:hidden;z-index:calc(var(--calcite-z-index) + 2);inset:var(--calcite-spacing-px);display:flex;align-items:center;justify-content:center;pointer-events:none;border-radius:var(--calcite-swatch-corner-radius, 0)}.internal-svg-container{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:calc(var(--calcite-z-index) + 2)}.swatch{overflow:hidden;block-size:inherit;inline-size:inherit}.swatch--no-color rect{fill:var(--calcite-color-foreground-1)}:host([selected]) #swatch-rect,:host([selected]) #swatch-solid,:host([selected]) #swatch-transparent{stroke-width:0}#swatch-rect,#swatch-solid,#swatch-transparent{stroke:var(--calcite-color-text-1);stroke-width:var(--calcite-border-width-md);stroke-opacity:.3;rx:var(--calcite-swatch-corner-radius)}.internal-svg-disabled{stroke:#6a6a6a;fill:#fff}.internal-svg-empty{stroke:var(--calcite-color-status-danger);stroke-width:3}.checker{fill:#cacaca}:host([hidden]){display:none}[hidden]{display:none}`,u=class extends b{constructor(){super(),this.containerRef=S(),this.focusSetter=z()(this),this.hasImage=!1,this.disabled=!1,this.interactive=!1,this.scale="m",this.selected=!1,this.selectionMode="none",this.calciteInternalSwatchKeyEvent=d({cancelable:!1}),this.calciteInternalSwatchSelect=d({cancelable:!1}),this.calciteInternalSyncSelectedSwatches=d({cancelable:!1}),this.calciteSwatchSelect=d({cancelable:!1}),this.listen("keydown",this.keyDownHandler)}static{this.properties={hasImage:[16,{},{state:!0}],color:1,disabled:[7,{},{reflect:!0,type:Boolean}],interactive:[5,{},{type:Boolean}],label:1,parentSwatchGroup:[0,{},{attribute:!1}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],selectionMode:1,value:1}}static{this.styles=R}async setFocus(e){return this.focusSetter(()=>this.el,e)}async load(){this.handleColorChange(this.color)}willUpdate(e){e.has("selected")&&this.hasUpdated&&this.watchSelected(this.selected),e.has("color")&&this.handleColorChange(this.color)}updated(){k(this)}loaded(){this.selectionMode!=="none"&&this.interactive&&this.selected&&this.handleSelectionPropertyChange(this.selected)}watchSelected(e){this.selectionMode!=="none"&&this.handleSelectionPropertyChange(e)}keyDownHandler(e){if(e.target===this.el)switch(e.key){case" ":case"Enter":this.handleEmittingEvent(),e.preventDefault();break;case"ArrowRight":case"ArrowLeft":case"Home":case"End":this.calciteInternalSwatchKeyEvent.emit(e),e.preventDefault();break}}handleSlotImageChange(e){this.hasImage=x(e)}handleEmittingEvent(){this.interactive&&this.calciteSwatchSelect.emit()}handleSelectionPropertyChange(e){this.selectionMode==="single"&&this.calciteInternalSyncSelectedSwatches.emit(),!this.parentSwatchGroup.selectedItems.includes(this.el)&&e&&this.selectionMode!=="multiple"&&this.calciteInternalSwatchSelect.emit(),this.selectionMode!=="single"&&this.calciteInternalSyncSelectedSwatches.emit()}handleColorChange(e){this.internalColor=e?E(e):null}renderSwatchImage(){return l`<div class=${c(t.imageContainer)}><slot name=${P.image} @slotchange=${this.handleSlotImageChange}></slot></div>`}renderEmptyDisplay(){let e=this.scale==="s"?"12":this.scale==="m"?"16":"20";return l`<div class=${c(t.internalSvgContainer)}><svg fill=none height=${e??i} viewBox=${`0 0 ${e} ${e}`} width=${e??i} xmlns=http://www.w3.org/2000/svg>${o`<path class=${c(t.internalSvgEmpty)} d=${`M${e} 0L0 ${e}`} />`}</svg></div>`}renderDisabledDisplay(){let e=l`<svg fill=none height=14 viewBox="0 0 14 14" width=14 xmlns=http://www.w3.org/2000/svg>${o`<path class=${c(t.internalSvgDisabled)} d="M7 0.5C10.5899 0.5 13.5 3.41015 13.5 7C13.5 10.5899 10.5899 13.5 7 13.5C3.41015 13.5 0.5 10.5899 0.5 7C0.5 3.41015 3.41015 0.5 7 0.5ZM4.78906 10.917C5.44221 11.2866 6.19529 11.5 7 11.5C9.48528 11.5 11.5 9.48528 11.5 7C11.5 6.19529 11.2866 5.44221 10.917 4.78906L4.78906 10.917ZM7 2.5C4.51472 2.5 2.5 4.51472 2.5 7C2.5 7.95644 2.79808 8.84235 3.30664 9.57129L9.57129 3.30664C8.84235 2.79808 7.95644 2.5 7 2.5Z" />`}</svg>`,a=l`<svg fill=none height=18 viewBox="0 0 18 18" width=18 xmlns=http://www.w3.org/2000/svg>${o`<path class=${c(t.internalSvgDisabled)} d="M9 0.5C13.6944 0.5 17.5 4.30558 17.5 9C17.5 13.6944 13.6944 17.5 9 17.5C4.30558 17.5 0.5 13.6944 0.5 9C0.5 4.30558 4.30558 0.5 9 0.5ZM5.78125 14.2588C6.71828 14.8337 7.81941 15.167 9 15.167C12.4058 15.167 15.167 12.4058 15.167 9C15.167 7.81941 14.8337 6.71828 14.2588 5.78125L5.78125 14.2588ZM9 2.83301C5.59424 2.83301 2.83301 5.59424 2.83301 9C2.83301 10.3817 3.28731 11.6565 4.05469 12.6846L12.6846 4.05469C11.6565 3.28731 10.3817 2.83301 9 2.83301Z" />`}</svg>`;return l`<div class=${c(t.internalSvgContainer)}>${this.scale==="l"?a:e}</div>`}renderSwatch(){let{internalColor:e}=this,a="0",h=!e,s={height:"100%",rx:a,width:"100%"};if(h)return o`<clipPath id=${w.shape}><rect height=100% rx=${a} width=100% /></clipPath>${this.renderSwatchRect({clipPath:`inset(0 round "${a}")`,...s})}<line clip-path=url(#shape) x1=100% x2=0 y1=0 y2=100% />`;let r=e.alpha(),v=g(e),p=g(e,r<1);return o`<defs><pattern height=${n.size} id=${w.checker} patternUnits=userSpaceOnUse width=${n.size} x=0 y=0><rect class=${c(t.checker)} height=${n.squareSize} width=${n.squareSize} x=0 y=0 /><rect class=${c(t.checker)} height=${n.squareSize} width=${n.squareSize} x=${n.squareSize} y=${n.squareSize} /></pattern></defs>${this.renderSwatchRect({fill:"url(#checker)",rx:s.rx,height:s.height,width:s.width})}${this.renderSwatchRect({clipPath:r<1?"polygon(100% 0, 0 0, 0 100%)":`inset(0 round "${a}")`,fill:v,id:w.swatchSolid,...s})}${r<1?this.renderSwatchRect({clipPath:"polygon(100% 0, 100% 100%, 0 100%)",fill:p,id:w.swatchTransparent,key:"opacity-fill",...s}):null}`}renderSwatchRect({clipPath:e,fill:a,height:h,key:s,rx:r,stroke:v,strokeWidth:p,width:D,id:f}){return C(s,o`<rect clip-path=${e??i} fill=${a??i} height=${h??i} id=${(f||w.swatchRect)??i} rx=${r??i} stroke=${v??i} stroke-width=${p??i} width=${D??i} />`)}render(){let{disabled:e}=this,a=e||!e&&!this.interactive,h=this.selectionMode==="multiple"&&this.interactive?"checkbox":this.selectionMode!=="none"&&this.interactive?"radio":this.interactive?"button":"presentation",s=!this.internalColor,r={[t.swatch]:!0,[t.noColorSwatch]:s||this.hasImage&&!this.internalColor};return I({disabled:e,children:l`<div .ariaChecked=${this.selectionMode!=="none"&&this.interactive?this.selected:void 0} .ariaLabel=${h!=="presentation"?this.label:""} class=${c({[t.container]:!0,[t.selectable]:this.selectionMode!=="none",[t.selected]:this.selected,[t.nonInteractive]:!this.interactive})} @click=${this.handleEmittingEvent} .role=${h} .tabIndex=${a?-1:0} title=${this.label??i} ${$(this.containerRef)}>${this.renderSwatchImage()}${!this.internalColor&&!this.hasImage&&this.renderEmptyDisplay()||""}${this.disabled&&this.renderDisabledDisplay()||""}<svg class=${c(r)} role=presentation xmlns=http://www.w3.org/2000/svg>${this.renderSwatch()}</svg></div>`})}};y("calcite-swatch",u);export{u as Swatch};
|
|
@@ -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.6 */
|
|
4
|
+
import{g as e}from"./2IIGKMQ6.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};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
|
+
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
+
v5.0.0-next.6 */
|
|
4
|
+
import{a as y}from"./CZF6KYOX.js";import{a as z}from"./CFWXX2ZT.js";import"./6PMY6MUE.js";import{c as d}from"./PCGNN5RO.js";import"./H3GTITDX.js";import{u as x,y as c}from"./7DQ4G2FS.js";import{a as A}from"./44XNJNTA.js";import{B as g,C as v,D as S,E as r,P as I,g as b,h as a,i as f,l as h,o as m}from"./2IIGKMQ6.js";var p={actionIcon:"action-icon",actionContainer:"action-container",stepBarContainer:"step-bar-container",singleView:"single-view"},P={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})=>a`<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=m({cancelable:!1}),this.calciteStepperChange=m({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:n}=e.detail;this.itemMap.set(t,{position:n,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.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((n,s)=>{n.itemHidden=i==="horizontal-single"&&s!==(t||0)})}getEnabledStepIndex(e,t="next"){let{items:i,currentActivePosition:n}=this,s=e;for(;s>=0&&s<i.length&&i[s]?.disabled;)s=s+(t==="previous"?-1:1);return s!==n&&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(n=>n?.tagName==="CALCITE-STEPPER-ITEM"&&!d(n));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",a`<div class=${r({container:!0,[p.singleView]:this.layout==="horizontal-single"})} ${v(this.containerRef)}>${this.layout==="horizontal-single"&&a`<div class=${r({[p.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"&&a`<div class=${r({[p.actionContainer]:!0})}>${this.renderAction("start")}${this.renderAction("end")}</div>`||""}<slot @slotchange=${this.handleDefaultSlotChange}></slot></div>`}renderAction(e){let t=e==="start",i=t?P.chevronLeft:P.chevronRight,{currentActivePosition:n,multipleViewMode:s,layout:C}=this,E=R.position(this.guid,t),$=t?-1:1,w=t?"previous":"next",k=this.getEnabledStepIndex(n+$,w)===null;return C==="horizontal-single"&&!s?a`<calcite-action alignment=center appearance=transparent class=${r({[p.actionIcon]:!0})} compact data-position=${e??h} .disabled=${k} .icon=${i} icon-flip-rtl id=${E??h} @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{a as I}from"./
|
|
3
|
+
v5.0.0-next.6 */
|
|
4
|
+
import{a as I}from"./IJDY7EKO.js";import{a as v,b as T}from"./UQ4HIO7J.js";import{a}from"./7XEO6UJ3.js";import"./MPYXWS5E.js";import{a as S}from"./CFWXX2ZT.js";import{a as w}from"./SXK4ATVN.js";import"./6PMY6MUE.js";import"./PCGNN5RO.js";import"./H3GTITDX.js";import"./7DQ4G2FS.js";import"./44XNJNTA.js";import{C as b,D as g,E as h,P as $,g as f,h as r,l,o as i}from"./2IIGKMQ6.js";var y={handle:"handle",dropdown:"dropdown"},D={drag:"drag",blank:"blank"},p={label:"{label}",position:"{position}",total:"{total}"},P=["top","up","down","bottom"],C={trigger:"trigger"},m={add:"add",move:"move",reorder:"reorder"},E=f`: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}.dropdown{block-size:100%}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,u=class extends g{constructor(){super(...arguments),this.focusSetter=w()(this),this.disabled=!1,this.messages=S({blocking:!0}),this.addToItems=[],this.moveToItems=[],this.open=!1,this.overlayPositioning="absolute",this.placement=I,this.scale="m",this.sortDisabled=!1,this.calciteSortHandleBeforeClose=i({cancelable:!1}),this.calciteSortHandleBeforeOpen=i({cancelable:!1}),this.calciteSortHandleClose=i({cancelable:!1}),this.calciteSortHandleMove=i({cancelable:!0}),this.calciteSortHandleAdd=i({cancelable:!0}),this.calciteSortHandleOpen=i({cancelable:!1}),this.calciteSortHandleReorder=i({cancelable:!0})}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],flipPlacements:[0,{},{attribute:!1}],label:1,messageOverrides:[0,{},{attribute:!1}],messages:[0,{},{attribute:!1}],addToItems:[0,{},{attribute:!1}],moveToItems:[0,{},{attribute:!1}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],setPosition:[9,{},{type:Number}],setSize:[9,{},{type:Number}],sortDisabled:[7,{},{reflect:!0,type:Boolean}],widthScale:[3,{},{reflect:!0}]}}static{this.styles=E}get hasSetInfo(){return typeof this.setPosition=="number"&&typeof this.setSize=="number"}get hasValidSetInfo(){return this.hasSetInfo?this.setPosition>0&&this.setSize>1:!0}get hasReorderItems(){return!this.sortDisabled&&this.hasValidSetInfo}get hasNoItems(){return!this.hasReorderItems&&this.moveToItems.length<1&&this.addToItems.length<1}async setFocus(e){return this.focusSetter(()=>this.dropdownEl,e)}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler()}updated(){v(this)}openHandler(){if(this.disabled){this.open=!1;return}this.dropdownEl&&(this.dropdownEl.open=this.open)}setDropdownEl(e){e&&(this.dropdownEl=e,this.openHandler())}getLabel(){let{label:e,messages:t,setPosition:o,setSize:s,hasSetInfo:d}=this;if(!d)return e??"";let n=e?t.repositionLabel.replace(p.label,e):t.reposition;return n=n.replace(p.position,o?o.toString():""),n.replace(p.total,s?s.toString():"")}handleBeforeOpen(e){e.stopPropagation(),this.calciteSortHandleBeforeOpen.emit()}handleOpen(e){e.stopPropagation(),this.calciteSortHandleOpen.emit(),this.open=!0}handleBeforeClose(e){e.stopPropagation(),this.calciteSortHandleBeforeClose.emit()}handleClose(e){e.stopPropagation(),this.calciteSortHandleClose.emit(),this.open=!1}handleReorder(e){this.calciteSortHandleReorder.emit({reorder:e.target.dataset.value})}handleMoveTo(e){let t=e.target.dataset.id,o=this.moveToItems.find(s=>s.id===t);this.calciteSortHandleMove.emit({moveTo:o})}handleAddTo(e){let t=e.target.dataset.id,o=this.addToItems.find(s=>s.id===t);this.calciteSortHandleAdd.emit({addTo:o})}render(){let{disabled:e,flipPlacements:t,open:o,overlayPositioning:s,placement:d,scale:n,widthScale:H,hasNoItems:B}=this,c=this.getLabel(),O=e||B;return T({disabled:e,children:r`<calcite-dropdown class=${h(y.dropdown)} .disabled=${O} .flipPlacements=${t} @calciteDropdownBeforeClose=${this.handleBeforeClose} @calciteDropdownBeforeOpen=${this.handleBeforeOpen} @calciteDropdownClose=${this.handleClose} @calciteDropdownOpen=${this.handleOpen} .overlayPositioning=${s} .placement=${d} .scale=${n} .widthScale=${H} ${b(this.setDropdownEl)}><calcite-action .active=${o} appearance=transparent .aria=${{expanded:o}} class=${h(y.handle)} .dragHandle=${!0} .icon=${e?D.blank:D.drag} .label=${c} .scale=${n} slot=${C.trigger} .text=${c} title=${c??l}></calcite-action>${this.renderReorderGroup()}${this.renderMoveToGroup()}${this.renderAddToGroup()}</calcite-dropdown>`})}renderAddToItem(e){return a(e.id,r`<calcite-dropdown-item data-id=${e.id??l} .label=${e.label} @calciteDropdownItemSelect=${this.handleAddTo}>${e.label}</calcite-dropdown-item>`)}renderMoveToItem(e){return a(e.id,r`<calcite-dropdown-item data-id=${e.id??l} .label=${e.label} @calciteDropdownItemSelect=${this.handleMoveTo}>${e.label}</calcite-dropdown-item>`)}renderReorderGroup(){return this.hasReorderItems?a("reorder",r`<calcite-dropdown-group .groupTitle=${this.messages.reorder} id=${m.reorder} .scale=${this.scale} selection-mode=none>${this.renderTop()}${this.renderUp()}${this.renderDown()}${this.renderBottom()}</calcite-dropdown-group>`):null}renderAddToGroup(){let{messages:e,addToItems:t,scale:o}=this;return t.length?a("add-to-items",r`<calcite-dropdown-group .groupTitle=${e.addTo} id=${m.add} .scale=${o} selection-mode=none>${t.map(s=>this.renderAddToItem(s))}</calcite-dropdown-group>`):null}renderMoveToGroup(){let{messages:e,moveToItems:t,scale:o}=this;return t.length?a("move-to-items",r`<calcite-dropdown-group .groupTitle=${e.moveTo} id=${m.move} .scale=${o} selection-mode=none>${t.map(s=>this.renderMoveToItem(s))}</calcite-dropdown-group>`):null}renderDropdownItem(e,t){return a(P[e],r`<calcite-dropdown-item data-value=${P[e]??l} .label=${t} @calciteDropdownItemSelect=${this.handleReorder}>${t}</calcite-dropdown-item>`)}renderTop(){let{setPosition:e}=this;return e!==1&&e!==2?this.renderDropdownItem(0,this.messages.moveToTop):null}renderUp(){return this.setPosition!==1?this.renderDropdownItem(1,this.messages.moveUp):null}renderDown(){return this.setPosition!==this.setSize?this.renderDropdownItem(2,this.messages.moveDown):null}renderBottom(){let{setPosition:e,setSize:t}=this;return e!==t&&e!==t-1?this.renderDropdownItem(3,this.messages.moveToBottom):null}};$("calcite-sort-handle",u);export{u as SortHandle};
|