@esri/calcite-components 5.0.0-next.6 → 5.0.0-next.7
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/{XQAX6FNF.js → 24UNOSYB.js} +2 -2
- package/dist/calcite/{2IIGKMQ6.js → 2ECRIOED.js} +2 -2
- package/dist/calcite/{WBXWOFF6.js → 2HYBRHEU.js} +2 -2
- package/dist/calcite/{LX3J3Q7Q.js → 2IQPS5BW.js} +1 -1
- package/dist/calcite/{PMWGEAYN.js → 2KVMN7YW.js} +2 -2
- package/dist/calcite/{FSNEMWMV.js → 2OCIK6EF.js} +2 -2
- package/dist/calcite/{EOWCTVN7.js → 2RX7VGW7.js} +2 -2
- package/dist/calcite/{JSS6WCPJ.js → 35ODAW6Y.js} +2 -2
- package/dist/calcite/{6EKZQPKT.js → 3BUYFS42.js} +2 -2
- package/dist/calcite/{7EIPWPP6.js → 3DKJFWNF.js} +1 -1
- package/dist/calcite/{VCXMHEPN.js → 3HF47TJO.js} +2 -2
- package/dist/calcite/{JD5Y5FIJ.js → 3I3IVUOR.js} +2 -2
- package/dist/calcite/{NHRWRXH2.js → 3ND3NKAM.js} +2 -2
- package/dist/calcite/{DN6V2M24.js → 3Y3BABEA.js} +1 -1
- package/dist/calcite/{5T7WLABP.js → 4I7T7O63.js} +2 -2
- package/dist/calcite/{A7OBU3ZB.js → 4PHM5LVD.js} +1 -1
- package/dist/calcite/{JD35MQMV.js → 4VLHPNAN.js} +2 -2
- package/dist/calcite/{B36ZLEKI.js → 4ZGFBBWU.js} +2 -2
- package/dist/calcite/{43KOILAW.js → 54C7JZCX.js} +2 -2
- package/dist/calcite/{QYN6LQ5J.js → 5CNBXVWP.js} +2 -2
- package/dist/calcite/{OXZ2Y5YM.js → 5RCYTHKP.js} +1 -1
- package/dist/calcite/{FWMD4ANX.js → 63DWWG4C.js} +2 -2
- package/dist/calcite/{4FSJL2OC.js → 64ADIWEN.js} +2 -2
- package/dist/calcite/{PBO64SRK.js → 6LFC7HO5.js} +1 -1
- package/dist/calcite/{GWC7UZVN.js → 6PCOKKOU.js} +2 -2
- package/dist/calcite/{VUYRIPVA.js → 6V5G43HO.js} +2 -2
- package/dist/calcite/{AANSYYFF.js → 6YPBRY3A.js} +2 -2
- package/dist/calcite/{5HV6X5DX.js → 76NBXXTM.js} +2 -2
- package/dist/calcite/{6GKHPG2T.js → 77YWD3SD.js} +2 -2
- package/dist/calcite/{WYLLIW2W.js → 7AGPEFKM.js} +2 -2
- package/dist/calcite/{X46HC2YH.js → 7EYTTVZ5.js} +2 -2
- package/dist/calcite/{RLF4GWLJ.js → 7IYMG4ER.js} +2 -2
- package/dist/calcite/{6YVXONLB.js → 7LUAHEOY.js} +2 -2
- package/dist/calcite/{XJ4SR7WO.js → 7RLP2DKK.js} +1 -1
- package/dist/calcite/{MYWUD5PR.js → 7TMYLJNL.js} +2 -2
- package/dist/calcite/{PPV5DY5L.js → 7TUINXH2.js} +2 -2
- package/dist/calcite/{NKYR42W6.js → 7ZHPTFVA.js} +2 -2
- package/dist/calcite/{CZF6KYOX.js → AD2NNFBJ.js} +1 -1
- package/dist/calcite/{KR5QX3PG.js → AK3MQKBH.js} +2 -2
- package/dist/calcite/{VS3YLYMZ.js → AKL3TSYT.js} +1 -1
- package/dist/calcite/{JTAYXV5Y.js → ALBSZ4AH.js} +1 -1
- package/dist/calcite/{UROEAN4Q.js → ATPINFYW.js} +2 -2
- package/dist/calcite/{JNCHO6X5.js → B45OJKRH.js} +2 -2
- package/dist/calcite/{3COSYM4H.js → B7BMLZ2H.js} +2 -2
- package/dist/calcite/{LFYXGVGK.js → BAESWKYQ.js} +2 -2
- package/dist/calcite/{6PMY6MUE.js → BC4ZMTFC.js} +2 -2
- package/dist/calcite/{NSIT4HJE.js → BES467QA.js} +2 -2
- package/dist/calcite/{SL3VKZG5.js → BOWHKIKV.js} +2 -2
- package/dist/calcite/{CYUZWU4F.js → D54UBP4E.js} +2 -2
- package/dist/calcite/{U74QHS5H.js → D6WKHYT4.js} +2 -2
- package/dist/calcite/{PCGNN5RO.js → DDSPVSLH.js} +2 -2
- package/dist/calcite/{BTK24FM2.js → DIWZOGSO.js} +2 -2
- package/dist/calcite/{OFHMIOCW.js → DQ3HNJFH.js} +2 -2
- package/dist/calcite/{WXESTAXY.js → EFJ3XPYN.js} +2 -2
- package/dist/calcite/{ABRDCSJF.js → ENP5M2UC.js} +1 -1
- package/dist/calcite/{53JXVKUS.js → EZFMZ526.js} +2 -2
- package/dist/calcite/{ZAD5LV3P.js → F3FMRPUL.js} +2 -2
- package/dist/calcite/{A6ZYDDPX.js → FJGFRFXA.js} +2 -2
- package/dist/calcite/{VYLJCYTD.js → FSBWTOKG.js} +2 -2
- package/dist/calcite/{ZOBQ5UTK.js → FZSVZEO4.js} +2 -2
- package/dist/calcite/{EHZXDIG5.js → G5DFRKUT.js} +2 -2
- package/dist/calcite/{IODUDIBK.js → G6YXDPGD.js} +2 -2
- package/dist/calcite/{B53J7Q5J.js → G7Z7TBM3.js} +2 -2
- package/dist/calcite/{XTDUXEIX.js → GCM5UXYU.js} +2 -2
- package/dist/calcite/{UCG3QU7A.js → GQKPWPHX.js} +2 -2
- package/dist/calcite/{6EEMG3AJ.js → GZGGTN2Z.js} +2 -2
- package/dist/calcite/{OYVYZ6ZO.js → H4XP55OC.js} +2 -2
- package/dist/calcite/{KDHLLH5G.js → HIAAXHAL.js} +1 -1
- package/dist/calcite/{K2RWUB5W.js → HIJA3ZQC.js} +2 -2
- package/dist/calcite/{56HP62NE.js → HJDKPRY3.js} +1 -1
- package/dist/calcite/{44XNJNTA.js → HWDBQK2D.js} +1 -1
- package/dist/calcite/{NOOPM2CL.js → HZH2MCFD.js} +1 -1
- package/dist/calcite/{SLWHNU7X.js → HZPG2SWG.js} +2 -2
- package/dist/calcite/{ZPU3MCWK.js → IC5WCEPX.js} +2 -2
- package/dist/calcite/{SZXBPZ7S.js → IDJNYNZL.js} +2 -2
- package/dist/calcite/{2XFESLAQ.js → IGUWR4FW.js} +2 -2
- package/dist/calcite/{ID4WJFNU.js → ILIB7POV.js} +2 -2
- package/dist/calcite/{UKQ6KSXO.js → IQOVIHRV.js} +2 -2
- package/dist/calcite/{FQKP2XIR.js → IQROUFUT.js} +2 -2
- package/dist/calcite/{P6BUUDOL.js → IQY3P34D.js} +2 -2
- package/dist/calcite/{YG5VYPTQ.js → J4UVTWRA.js} +2 -2
- package/dist/calcite/{WC4TGTDM.js → J5N7X673.js} +2 -2
- package/dist/calcite/{ZEMRH6DW.js → JDCUDQFO.js} +2 -2
- package/dist/calcite/{RW5EELAZ.js → JERKEE6O.js} +2 -2
- package/dist/calcite/{LFSTWFMB.js → JOGTHWSZ.js} +2 -2
- package/dist/calcite/{LNKZ4ULL.js → JSFR3YQ3.js} +2 -2
- package/dist/calcite/{OFO7DXMT.js → JVPR6YZA.js} +1 -1
- package/dist/calcite/{IFQNEPTP.js → K5KOFFWP.js} +2 -2
- package/dist/calcite/{76DFVIQ3.js → KEVLNRNX.js} +2 -2
- package/dist/calcite/{3M2X4DMO.js → KINXAP24.js} +2 -2
- package/dist/calcite/{HZJQA7EQ.js → KJ6B56VZ.js} +2 -2
- package/dist/calcite/{TYPQP3Q3.js → KPSSR45E.js} +2 -2
- package/dist/calcite/{65HZ2HOS.js → LDHSD3M6.js} +2 -2
- package/dist/calcite/{OBY2JHHI.js → LHYFZTCS.js} +2 -2
- package/dist/calcite/{3W422TPV.js → LKORF2QC.js} +2 -2
- package/dist/calcite/{ULXDFGLX.js → LLZVI27K.js} +2 -2
- package/dist/calcite/{4YTONN4P.js → LOPTIQJU.js} +2 -2
- package/dist/calcite/{TBM5T67T.js → LZ3EBLID.js} +2 -2
- package/dist/calcite/{JVYKUU2B.js → M3RKWDE5.js} +2 -2
- package/dist/calcite/{E5NO42AW.js → M4K4HY3K.js} +1 -1
- package/dist/calcite/{OD7IPBKO.js → MJWAQ2DA.js} +2 -2
- package/dist/calcite/{TWGPU2HX.js → MXNI5GI4.js} +2 -2
- package/dist/calcite/{NKMBE4R4.js → MYURWUJP.js} +2 -2
- package/dist/calcite/{PRLHDLWI.js → N6NZ2GPW.js} +2 -2
- package/dist/calcite/{ZJD56MA6.js → NNOPKVPT.js} +2 -2
- package/dist/calcite/{6OLYWF6Z.js → O7MZFL34.js} +2 -2
- package/dist/calcite/{57TYRZR3.js → OOLTKMQJ.js} +2 -2
- package/dist/calcite/{HBSTMWBE.js → OVNV2JKE.js} +2 -2
- package/dist/calcite/{PQDB6CTL.js → OVVNV5BW.js} +2 -2
- package/dist/calcite/{MPYXWS5E.js → OWSWQHLM.js} +1 -1
- package/dist/calcite/{FMB23RBB.js → OZ3WSD3P.js} +1 -1
- package/dist/calcite/{DUM3R2CL.js → OZMAX3VQ.js} +2 -2
- package/dist/calcite/{L63HBU2O.js → PN64O3P6.js} +2 -2
- package/dist/calcite/{SHFV6LYT.js → POAMCSPF.js} +2 -2
- package/dist/calcite/{T3QJCLEX.js → PUPMRTUL.js} +2 -2
- package/dist/calcite/{AIANT2RL.js → PWZGTFQO.js} +2 -2
- package/dist/calcite/{JJP2FEER.js → Q3THBLRM.js} +1 -1
- package/dist/calcite/{LX7GBILP.js → QGI3TWNX.js} +2 -2
- package/dist/calcite/{XIXFKVFZ.js → QR2HL6XI.js} +1 -1
- package/dist/calcite/{5BQ76NQW.js → QVSPMDDW.js} +2 -2
- package/dist/calcite/{7AG2R6XN.js → QYBWEPW5.js} +2 -2
- package/dist/calcite/{SSLEHUOY.js → R7Q2LFGI.js} +2 -2
- package/dist/calcite/{XTYQVPDC.js → REXSF55X.js} +2 -2
- package/dist/calcite/{FHRBYILV.js → RHBRNWUQ.js} +2 -2
- package/dist/calcite/{TOSB6ECB.js → RIB7K6T6.js} +2 -2
- package/dist/calcite/{7DQ4G2FS.js → SBARVI35.js} +2 -2
- package/dist/calcite/{IJDY7EKO.js → SBJ5HVNQ.js} +2 -2
- package/dist/calcite/{DATE73WS.js → SH7VNOTQ.js} +2 -2
- package/dist/calcite/{6FCYAKPP.js → SIVW7YY5.js} +2 -2
- package/dist/calcite/{EFDQMGZP.js → SJGZNFSY.js} +2 -2
- package/dist/calcite/{4M5YCJ4Q.js → T36PZDA3.js} +2 -2
- package/dist/calcite/{Q4IQBOWU.js → T7VT42NJ.js} +2 -2
- package/dist/calcite/{IAOITTID.js → THGJ3ZD3.js} +2 -2
- package/dist/calcite/{A6DNGYP7.js → TPQICMSC.js} +2 -2
- package/dist/calcite/{QCGVJHJ6.js → TRYMHQWX.js} +2 -2
- package/dist/calcite/TSJA4LWX.js +4 -0
- package/dist/calcite/{H2NP25UI.js → UE627G6U.js} +1 -1
- package/dist/calcite/{GWYUQTSG.js → UERWI2LS.js} +2 -2
- package/dist/calcite/{SXOKB2BX.js → UFHAJ3AG.js} +2 -2
- package/dist/calcite/{REY2OA4D.js → UHKUQQRT.js} +2 -2
- package/dist/calcite/{SXMKRRD6.js → UIHFYOPH.js} +2 -2
- package/dist/calcite/{7XEO6UJ3.js → ULUKHLQN.js} +2 -2
- package/dist/calcite/{MTRDCPVY.js → USBSH7KC.js} +2 -2
- package/dist/calcite/{KLLDUBU7.js → UTWEOJW6.js} +2 -2
- package/dist/calcite/{CFWXX2ZT.js → UVFQM6FI.js} +2 -2
- package/dist/calcite/{NQF73COG.js → UWREJ25T.js} +2 -2
- package/dist/calcite/{BKNGM5YO.js → UWUSKJIU.js} +2 -2
- package/dist/calcite/{HURJRVCG.js → V6VV5MRC.js} +2 -2
- package/dist/calcite/{ZOINAXKM.js → VFQAYOAN.js} +2 -2
- package/dist/calcite/{H3GTITDX.js → W4XITGKA.js} +2 -2
- package/dist/calcite/{TTLR3A5P.js → W4Y22TCR.js} +2 -2
- package/dist/calcite/{AHOADFZ7.js → WG7RY7HV.js} +2 -2
- package/dist/calcite/{GLUJXIHJ.js → WR7PEL2H.js} +2 -2
- package/dist/calcite/{ABFHGJOG.js → WW6CS7FX.js} +2 -2
- package/dist/calcite/{BOFKO4PD.js → WZGZ5PZT.js} +2 -2
- package/dist/calcite/{N3QXJKKO.js → X7OME6SM.js} +2 -2
- package/dist/calcite/{LDFECFWX.js → XECJM3YP.js} +2 -2
- package/dist/calcite/{YQQN42G5.js → XGARHDI3.js} +2 -2
- package/dist/calcite/{SXK4ATVN.js → XGPCFFL2.js} +2 -2
- package/dist/calcite/{HM4RW4PL.js → XLJGRDO4.js} +2 -2
- package/dist/calcite/{GS2BRYGH.js → XU6PDNU5.js} +2 -2
- package/dist/calcite/{3ISWQGU4.js → Y3X3JA73.js} +2 -2
- package/dist/calcite/{VMEYQQVI.js → YFY6OPEB.js} +2 -2
- package/dist/calcite/{62XLJEVX.js → YHUESRZY.js} +2 -2
- package/dist/calcite/{MEWZXHJ6.js → YNIG5SX5.js} +2 -2
- package/dist/calcite/{O72KETNZ.js → YR554YXQ.js} +2 -2
- package/dist/calcite/{TUAQEJC4.js → YUOZM346.js} +2 -2
- package/dist/calcite/{BMB7PJZB.js → ZIA4F7R5.js} +2 -2
- package/dist/calcite/{GSSIFYMO.js → ZIABK7KW.js} +2 -2
- package/dist/calcite/{UQ4HIO7J.js → ZOYJ4343.js} +2 -2
- package/dist/calcite/{7GYHOBTA.js → ZV3IGLDE.js} +2 -2
- package/dist/calcite/{POOA337X.js → ZVCPJCBM.js} +1 -1
- package/dist/calcite/calcite.esm.js +2 -2
- package/dist/chunks/runtime.js +4 -4
- package/dist/components/calcite-card/customElement.js +1 -1
- package/dist/docs/api.json +26 -26
- package/dist/docs/docs.json +76 -76
- package/dist/docs/supported-browsers.json +1 -1
- package/dist/docs/web-types.json +26 -26
- package/package.json +2 -2
- package/dist/calcite/DEJFI4YA.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{k as l}from"./ZOBQ5UTK.js";import{a as x,b as z}from"./UQ4HIO7J.js";import"./OFO7DXMT.js";import{a as y}from"./CFWXX2ZT.js";import{a as f}from"./SXK4ATVN.js";import"./6PMY6MUE.js";import{c as g}from"./PCGNN5RO.js";import"./H3GTITDX.js";import{r as v}from"./7DQ4G2FS.js";import"./44XNJNTA.js";import{B as d,C as h,D as m,E as t,H as u,P as b,g as n,h as i,l as p,o}from"./2IIGKMQ6.js";var r={container:"container",hasSlottedContent:"has-slotted-content",stepperItemContent:"stepper-item-content",stepperItemDescription:"stepper-item-description",stepperItemHeader:"stepper-item-header",stepperItemHeading:"stepper-item-heading",stepperItemHeaderText:"stepper-item-header-text",stepperItemIcon:"stepper-item-icon",stepperItemNumber:"stepper-item-number",visuallyHidden:"visually-hidden"},a={circle:"circle",circleF:"circleF",exclamationMarkCircleF:"exclamationMarkCircleF",checkCircleF:"checkCircleF"},I=n`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]),:host([layout=horizontal][disabled]) .stepper-item-header,:host([layout=horizontal-single][disabled]) .stepper-item-header{cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([layout=horizontal][disabled]) .stepper-item-header *,:host([layout=horizontal-single][disabled]) .stepper-item-header *,:host([disabled]) ::slotted(*),:host([layout=horizontal][disabled]) .stepper-item-header ::slotted(*),:host([layout=horizontal-single][disabled]) .stepper-item-header ::slotted(*){pointer-events:none}:host([scale=s]){--calcite-internal-stepper-item-spacing-unit-s: .25rem;--calcite-internal-stepper-item-spacing-unit-m: .75rem;--calcite-internal-stepper-item-spacing-unit-l: 1rem;--calcite-internal-stepper-action-inline-size: 2rem;font-size:var(--calcite-font-size--1);line-height:1rem;margin-inline-end:.25rem}:host([scale=s]) .stepper-item-description{font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]){--calcite-internal-stepper-item-spacing-unit-s: .5rem;--calcite-internal-stepper-item-spacing-unit-m: 1rem;--calcite-internal-stepper-item-spacing-unit-l: 1.25rem;--calcite-internal-stepper-action-inline-size: 2.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;margin-inline-end:.5rem}:host([scale=m]) .stepper-item-description{font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]){--calcite-internal-stepper-item-spacing-unit-s: .75rem;--calcite-internal-stepper-item-spacing-unit-m: 1.25rem;--calcite-internal-stepper-item-spacing-unit-l: 1.5rem;--calcite-internal-stepper-action-inline-size: 3rem;font-size:var(--calcite-font-size-1);line-height:1.5rem;margin-inline-end:.75rem}:host([scale=l]) .stepper-item-description{font-size:var(--calcite-font-size-0);line-height:1.25rem}:host{position:relative;display:flex;flex-grow:1;flex-direction:column;align-self:flex-start;margin-block-end:var(--calcite-stepper-bar-gap, var(--calcite-internal-stepper-item-spacing-unit-s))}:host .container{position:relative;display:flex;flex-grow:1;cursor:pointer;flex-direction:column;border-width:0px;border-block-start-width:2px;border-style:solid;border-color:var(--calcite-color-border-3);color:var(--calcite-color-text-3);text-decoration-line:none;outline:2px solid transparent;outline-offset:2px}:host .container:active{background-color:var(--calcite-stepper-item-background-color-press, var(--calcite-color-foreground-3))}:host{outline-color:transparent}:host(:focus){outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host .stepper-item-header{display:flex;cursor:pointer;align-items:flex-start}:host .stepper-item-header:active{background-color:var(--calcite-stepper-item-background-color-press, var(--calcite-color-foreground-3))}:host .stepper-item-content,:host .stepper-item-header{padding-block:var(--calcite-internal-stepper-item-spacing-unit-l);padding-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);text-align:start}:host .stepper-item-header *{display:inline-flex;align-items:center}:host .stepper-item-content{display:none;inline-size:100%;flex-direction:column;font-size:var(--calcite-font-size--2);line-height:1.375}:host .stepper-item-icon{margin-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);margin-block-start:1px;display:inline-flex;block-size:.75rem;flex-shrink:0;align-self:flex-start;color:var(--calcite-stepper-item-icon-color, var(--calcite-color-border-input))}:host([complete]) .stepper-item-icon{opacity:var(--calcite-opacity-disabled)}:host .stepper-item-header-text{flex-direction:column;text-align:initial;margin-inline-end:auto}:host .stepper-item-heading,:host .stepper-item-description{display:flex;inline-size:100%}:host .stepper-item-heading{margin-block-end:.25rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-stepper-item-header-text-color, var(--calcite-color-text-2))}:host .stepper-item-description{color:var(--calcite-stepper-item-description-text-color, var(--calcite-color-text-3))}:host .stepper-item-number{font-weight:var(--calcite-font-weight-medium);margin-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);color:var(--calcite-stepper-item-description-text-color, var(--calcite-color-text-3))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([complete]) .container{border-color:#007ac280}:host([complete]) .container .stepper-item-icon{color:var(--calcite-stepper-item-complete-icon-color, var(--calcite-color-brand))}:host([error]) .container{border-block-start-color:var(--calcite-color-status-danger)}:host([error]) .container .stepper-item-number{color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([error]) .container .stepper-item-icon{opacity:1;color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host(:hover:not([disabled]):not([selected])) .container,:host(:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-color-brand)}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-heading,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-heading{color:var(--calcite-stepper-item-header-text-color-hover, var(--calcite-color-text-1))}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-description,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-description{color:var(--calcite-stepper-item-description-text-color-hover, var(--calcite-color-text-2))}:host([error]:hover:not([disabled]):not([selected])) .container,:host([error]:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-color-status-danger-hover)}:host([selected]) .container{border-block-start-color:var(--calcite-color-brand)}:host([selected]) .container .stepper-item-heading{color:var(--calcite-stepper-item-selected-header-text-color, var(--calcite-color-text-1))}:host([selected]) .container .stepper-item-description{color:var(--calcite-stepper-item-description-text-color-hover, var(--calcite-color-text-2))}:host([selected]) .container .stepper-item-number{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-brand))}:host([selected]) .container .stepper-item-icon{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-brand));opacity:1}:host([selected]) .container .stepper-item-content{display:flex}:host([layout=vertical]){inline-size:100%}:host([layout=vertical]) .container{margin-inline:0px;margin-block-start:0px;flex:1 1 auto;border-block-start-width:0px;border-style:solid;padding-block:0px;border-inline-start-width:2px;padding-inline-start:var(--calcite-internal-stepper-item-spacing-unit-l);border-color:var(--calcite-stepper-bar-fill-color, var(--calcite-color-border-2))}:host([layout=vertical]) .container .stepper-item-icon{order:3;margin-block:1px 0px;padding-inline-start:var(--calcite-internal-stepper-item-spacing-unit-s);margin-inline-start:auto}:host([layout=vertical]) .container .stepper-item-header{padding-inline-end:0px}:host([layout=vertical]) .container .stepper-item-content{padding:0}:host([layout=vertical][complete]) .container{border-color:var(--calcite-stepper-bar-complete-fill-color, rgba(0, 122, 194, .5))}:host([layout=vertical][complete]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][complete]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-complete-fill-color-hover, var(--calcite-color-brand))}:host([layout=vertical][error]) .container{border-color:var(--calcite-stepper-bar-error-fill-color, var(--calcite-color-status-danger))}:host([layout=vertical][selected]) .container{border-color:var(--calcite-stepper-bar-selected-fill-color, var(--calcite-color-brand))}:host([layout=vertical][selected]) .container .stepper-item-content.has-slotted-content{margin-block-end:var(--calcite-internal-stepper-item-spacing-unit-l)}:host([layout=vertical]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-fill-color-hover, rgba(0, 122, 194, .5))}:host([layout=vertical][error]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][error]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-error-fill-color-hover, var(--calcite-color-status-danger-hover))}:host([layout=horizontal]),:host([layout=horizontal-single]){display:contents}:host([layout=horizontal]) .container,:host([layout=horizontal-single]) .container{display:contents}:host([layout=horizontal]) .stepper-item-header,:host([layout=horizontal-single]) .stepper-item-header{border-width:0px;border-block-start-width:2px;border-style:solid;outline-color:transparent;grid-row:items;border-color:var(--calcite-stepper-bar-fill-color, var(--calcite-color-border-2))}:host([layout=horizontal]) .stepper-item-header:focus,:host([layout=horizontal-single]) .stepper-item-header: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))))}:host([layout=horizontal]) .stepper-item-content,:host([layout=horizontal-single]) .stepper-item-content{cursor:auto;transition-timing-function:cubic-bezier(.4,0,.2,1);padding-block:0;padding-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);text-align:start}:host([layout=horizontal-single]) .stepper-item-header{grid-area:1/1/1/-1}:host([layout=horizontal]) .stepper-item-content,:host([layout=horizontal-single]) .stepper-item-content{grid-area:2/1/2/-1}:host([layout=horizontal][complete]) .stepper-item-header,:host([layout=horizontal-single][complete]) .stepper-item-header{border-color:var(--calcite-stepper-bar-complete-fill-color, rgba(0, 122, 194, .5))}:host([layout=horizontal][complete]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][complete]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][complete]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][complete]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-complete-fill-color-hover, var(--calcite-color-brand))}:host([layout=horizontal][error]) .stepper-item-header,:host([layout=horizontal-single][error]) .stepper-item-header{border-color:var(--calcite-stepper-bar-error-fill-color, var(--calcite-color-status-danger))}:host([layout=horizontal][selected]) .stepper-item-header,:host([layout=horizontal-single][selected]) .stepper-item-header{border-color:var(--calcite-stepper-bar-selected-fill-color, var(--calcite-color-brand))}:host([layout=horizontal]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-fill-color-hover, rgba(0, 122, 194, .5))}:host([layout=horizontal][error]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][error]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][error]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][error]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-error-fill-color-hover, var(--calcite-color-status-danger-hover))}@media(forced-colors:active){:host .container{outline-width:0;outline-offset:0}:host(:focus),:host(:focus-visible){outline-color:canvasText}:host([selected]) .container{border-block-start-color:highlight}:host([selected]) .container .stepper-item-number{color:highlight}:host([selected]) .container .stepper-item-icon{color:highlight}:host([layout=vertical][selected]) .container{border-color:highlight}}:host([layout=horizontal-single]) .stepper-item-header{margin-inline-end:0px;box-sizing:border-box;border-style:none;inline-size:100%;padding-inline:calc(var(--calcite-internal-stepper-action-inline-size) + .5rem)}:host([layout=horizontal-single][error]) .container .stepper-item-number{color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([layout=horizontal-single][error]) .container .stepper-item-icon{opacity:1;color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([layout=horizontal-single][error][selected]),:host([layout=horizontal-single][complete][selected]) .container{color:var(--calcite-color-text-3)}:host([layout=horizontal-single][error][selected]) .stepper-item-heading,:host([layout=horizontal-single][complete][selected]) .container .stepper-item-heading{color:var(--calcite-stepper-item-header-text-color, var(--calcite-color-text-2))}:host([layout=horizontal-single][complete][selected]) .container .stepper-item-icon{opacity:var(--calcite-opacity-disabled)}:host([layout=horizontal-single][complete][selected]) .container .stepper-item-number{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-text-3))}.visually-hidden{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}:host([hidden]){display:none}[hidden]{display:none}:host([item-hidden]){display:none}`,c=class extends m{constructor(){super(),this.headerRef=d(),this.messages=y(),this.focusSetter=f()(this),this.complete=!1,this.disabled=!1,this.error=!1,this.icon=!1,this.iconFlipRtl=!1,this.itemHidden=!1,this.numbered=!1,this.scale="m",this.selected=!1,this.calciteInternalStepperItemKeyEvent=o({cancelable:!1}),this.calciteInternalStepperItemRegister=o({cancelable:!1}),this.calciteInternalStepperItemSelect=o({cancelable:!1}),this.calciteStepperItemSelect=o({cancelable:!1}),this.listenOn(document.body,"calciteInternalStepperItemChange",this.updateActiveItemOnChange),this.listen("click",this.handleItemClick),this.listen("keydown",this.keyDownHandler)}static{this.properties={stepperItemHasContent:[16,{},{state:!0}],complete:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],error:[7,{},{reflect:!0,type:Boolean}],heading:1,icon:[5,{},{type:Boolean}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],itemHidden:[7,{},{reflect:!0,type:Boolean}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],numbered:[5,{},{type:Boolean}],numberingSystem:1,scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=I}async setFocus(e){return this.focusSetter(()=>this.layout==="vertical"?this.el:this.headerRef.value,e)}async load(){this.parentStepperEl=this.el.parentElement,this.itemPosition=this.getItemPosition(),this.registerStepperItem(),this.selected&&this.emitRequestedItem()}willUpdate(e){e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.selectedHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.registerStepperItem(),e.has("messages")&&this.effectiveLocaleWatcher(this.messages._lang)}updated(){x(this),u(this.el,"tabindex",this.disabled||this.layout==="horizontal"?null:0)}selectedHandler(){this.selected&&this.emitRequestedItem()}effectiveLocaleWatcher(e){l.numberFormatOptions={locale:e,numberingSystem:this.numberingSystem,useGrouping:!1}}updateActiveItemOnChange(e){(e.target===this.parentStepperEl||e.composedPath().includes(this.parentStepperEl))&&(this.selectedPosition=e.detail.position,this.determineSelectedItem())}keyDownHandler(e){if(!this.disabled&&e.target===this.el)switch(e.key){case" ":case"Enter":this.emitUserRequestedItem(),e.preventDefault();break;case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"Home":case"End":this.calciteInternalStepperItemKeyEvent.emit({item:e}),e.preventDefault();break}}determineSelectedItem(){this.selected=!this.disabled&&this.itemPosition===this.selectedPosition}registerStepperItem(){this.calciteInternalStepperItemRegister.emit({position:this.itemPosition})}handleItemClick(e){this.disabled||g(this.el)||this.layout==="horizontal"&&e.composedPath().some(s=>s.classList?.contains("stepper-item-content"))||this.emitUserRequestedItem()}emitUserRequestedItem(){this.emitRequestedItem(),this.disabled||this.calciteStepperItemSelect.emit()}emitRequestedItem(){if(!this.disabled){let e=this.itemPosition;this.calciteInternalStepperItemSelect.emit({position:e})}}getItemPosition(){return Array.from(this.parentStepperEl?.querySelectorAll("calcite-stepper-item:not([hidden]):not([item-hidden])")).indexOf(this.el)}render(){this.el.ariaCurrent=this.selected?"step":"false";let e=this.layout==="horizontal"&&!this.disabled?0:null;return z({disabled:this.disabled,children:i`<div class=${t(r.container)}>${this.complete&&i`<span aria-live=polite class=${t(r.visuallyHidden)}>${this.messages.complete}</span>`||""}<div class=${t(r.stepperItemHeader)} tabindex=${e??p} ${h(this.headerRef)}>${this.icon?this.renderIcon():null}${this.numbered?i`<div class=${t(r.stepperItemNumber)}>${this.renderNumbers()}.</div>`:null}<div class=${t(r.stepperItemHeaderText)}><span class=${t(r.stepperItemHeading)}>${this.heading}</span><span class=${t(r.stepperItemDescription)}>${this.description}</span></div></div><div class=${t({[r.stepperItemContent]:!0,[r.hasSlottedContent]:this.stepperItemHasContent})}><slot @slotchange=${s=>this.stepperItemHasContent=v(s)}></slot></div></div>`})}renderIcon(){let e=a.circle;return this.selected&&(this.layout!=="horizontal-single"||!this.error&&!this.complete)?e=a.circleF:this.error?e=a.exclamationMarkCircleF:this.complete&&(e=a.checkCircleF),i`<calcite-icon class=${t(r.stepperItemIcon)} .flipRtl=${this.iconFlipRtl} .icon=${e} scale=s></calcite-icon>`}renderNumbers(){return l.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:!1},l.numberFormatter.format(this.itemPosition+1)}};b("calcite-stepper-item",c);export{c as StepperItem};
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{k as l}from"./FZSVZEO4.js";import{a as x,b as z}from"./ZOYJ4343.js";import"./JVPR6YZA.js";import{a as y}from"./UVFQM6FI.js";import{a as f}from"./XGPCFFL2.js";import"./BC4ZMTFC.js";import{c as g}from"./DDSPVSLH.js";import"./W4XITGKA.js";import{r as v}from"./SBARVI35.js";import"./HWDBQK2D.js";import{B as d,C as h,D as m,E as t,H as u,P as b,g as n,h as i,l as p,o}from"./2ECRIOED.js";var r={container:"container",hasSlottedContent:"has-slotted-content",stepperItemContent:"stepper-item-content",stepperItemDescription:"stepper-item-description",stepperItemHeader:"stepper-item-header",stepperItemHeading:"stepper-item-heading",stepperItemHeaderText:"stepper-item-header-text",stepperItemIcon:"stepper-item-icon",stepperItemNumber:"stepper-item-number",visuallyHidden:"visually-hidden"},a={circle:"circle",circleF:"circleF",exclamationMarkCircleF:"exclamationMarkCircleF",checkCircleF:"checkCircleF"},I=n`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]),:host([layout=horizontal][disabled]) .stepper-item-header,:host([layout=horizontal-single][disabled]) .stepper-item-header{cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([layout=horizontal][disabled]) .stepper-item-header *,:host([layout=horizontal-single][disabled]) .stepper-item-header *,:host([disabled]) ::slotted(*),:host([layout=horizontal][disabled]) .stepper-item-header ::slotted(*),:host([layout=horizontal-single][disabled]) .stepper-item-header ::slotted(*){pointer-events:none}:host([scale=s]){--calcite-internal-stepper-item-spacing-unit-s: .25rem;--calcite-internal-stepper-item-spacing-unit-m: .75rem;--calcite-internal-stepper-item-spacing-unit-l: 1rem;--calcite-internal-stepper-action-inline-size: 2rem;font-size:var(--calcite-font-size--1);line-height:1rem;margin-inline-end:.25rem}:host([scale=s]) .stepper-item-description{font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]){--calcite-internal-stepper-item-spacing-unit-s: .5rem;--calcite-internal-stepper-item-spacing-unit-m: 1rem;--calcite-internal-stepper-item-spacing-unit-l: 1.25rem;--calcite-internal-stepper-action-inline-size: 2.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;margin-inline-end:.5rem}:host([scale=m]) .stepper-item-description{font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]){--calcite-internal-stepper-item-spacing-unit-s: .75rem;--calcite-internal-stepper-item-spacing-unit-m: 1.25rem;--calcite-internal-stepper-item-spacing-unit-l: 1.5rem;--calcite-internal-stepper-action-inline-size: 3rem;font-size:var(--calcite-font-size-1);line-height:1.5rem;margin-inline-end:.75rem}:host([scale=l]) .stepper-item-description{font-size:var(--calcite-font-size-0);line-height:1.25rem}:host{position:relative;display:flex;flex-grow:1;flex-direction:column;align-self:flex-start;margin-block-end:var(--calcite-stepper-bar-gap, var(--calcite-internal-stepper-item-spacing-unit-s))}:host .container{position:relative;display:flex;flex-grow:1;cursor:pointer;flex-direction:column;border-width:0px;border-block-start-width:2px;border-style:solid;border-color:var(--calcite-color-border-3);color:var(--calcite-color-text-3);text-decoration-line:none;outline:2px solid transparent;outline-offset:2px}:host .container:active{background-color:var(--calcite-stepper-item-background-color-press, var(--calcite-color-foreground-3))}:host{outline-color:transparent}:host(:focus){outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host .stepper-item-header{display:flex;cursor:pointer;align-items:flex-start}:host .stepper-item-header:active{background-color:var(--calcite-stepper-item-background-color-press, var(--calcite-color-foreground-3))}:host .stepper-item-content,:host .stepper-item-header{padding-block:var(--calcite-internal-stepper-item-spacing-unit-l);padding-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);text-align:start}:host .stepper-item-header *{display:inline-flex;align-items:center}:host .stepper-item-content{display:none;inline-size:100%;flex-direction:column;font-size:var(--calcite-font-size--2);line-height:1.375}:host .stepper-item-icon{margin-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);margin-block-start:1px;display:inline-flex;block-size:.75rem;flex-shrink:0;align-self:flex-start;color:var(--calcite-stepper-item-icon-color, var(--calcite-color-border-input))}:host([complete]) .stepper-item-icon{opacity:var(--calcite-opacity-disabled)}:host .stepper-item-header-text{flex-direction:column;text-align:initial;margin-inline-end:auto}:host .stepper-item-heading,:host .stepper-item-description{display:flex;inline-size:100%}:host .stepper-item-heading{margin-block-end:.25rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-stepper-item-header-text-color, var(--calcite-color-text-2))}:host .stepper-item-description{color:var(--calcite-stepper-item-description-text-color, var(--calcite-color-text-3))}:host .stepper-item-number{font-weight:var(--calcite-font-weight-medium);margin-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);color:var(--calcite-stepper-item-description-text-color, var(--calcite-color-text-3))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([complete]) .container{border-color:#007ac280}:host([complete]) .container .stepper-item-icon{color:var(--calcite-stepper-item-complete-icon-color, var(--calcite-color-brand))}:host([error]) .container{border-block-start-color:var(--calcite-color-status-danger)}:host([error]) .container .stepper-item-number{color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([error]) .container .stepper-item-icon{opacity:1;color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host(:hover:not([disabled]):not([selected])) .container,:host(:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-color-brand)}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-heading,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-heading{color:var(--calcite-stepper-item-header-text-color-hover, var(--calcite-color-text-1))}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-description,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-description{color:var(--calcite-stepper-item-description-text-color-hover, var(--calcite-color-text-2))}:host([error]:hover:not([disabled]):not([selected])) .container,:host([error]:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-color-status-danger-hover)}:host([selected]) .container{border-block-start-color:var(--calcite-color-brand)}:host([selected]) .container .stepper-item-heading{color:var(--calcite-stepper-item-selected-header-text-color, var(--calcite-color-text-1))}:host([selected]) .container .stepper-item-description{color:var(--calcite-stepper-item-description-text-color-hover, var(--calcite-color-text-2))}:host([selected]) .container .stepper-item-number{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-brand))}:host([selected]) .container .stepper-item-icon{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-brand));opacity:1}:host([selected]) .container .stepper-item-content{display:flex}:host([layout=vertical]){inline-size:100%}:host([layout=vertical]) .container{margin-inline:0px;margin-block-start:0px;flex:1 1 auto;border-block-start-width:0px;border-style:solid;padding-block:0px;border-inline-start-width:2px;padding-inline-start:var(--calcite-internal-stepper-item-spacing-unit-l);border-color:var(--calcite-stepper-bar-fill-color, var(--calcite-color-border-2))}:host([layout=vertical]) .container .stepper-item-icon{order:3;margin-block:1px 0px;padding-inline-start:var(--calcite-internal-stepper-item-spacing-unit-s);margin-inline-start:auto}:host([layout=vertical]) .container .stepper-item-header{padding-inline-end:0px}:host([layout=vertical]) .container .stepper-item-content{padding:0}:host([layout=vertical][complete]) .container{border-color:var(--calcite-stepper-bar-complete-fill-color, rgba(0, 122, 194, .5))}:host([layout=vertical][complete]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][complete]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-complete-fill-color-hover, var(--calcite-color-brand))}:host([layout=vertical][error]) .container{border-color:var(--calcite-stepper-bar-error-fill-color, var(--calcite-color-status-danger))}:host([layout=vertical][selected]) .container{border-color:var(--calcite-stepper-bar-selected-fill-color, var(--calcite-color-brand))}:host([layout=vertical][selected]) .container .stepper-item-content.has-slotted-content{margin-block-end:var(--calcite-internal-stepper-item-spacing-unit-l)}:host([layout=vertical]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-fill-color-hover, rgba(0, 122, 194, .5))}:host([layout=vertical][error]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][error]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-error-fill-color-hover, var(--calcite-color-status-danger-hover))}:host([layout=horizontal]),:host([layout=horizontal-single]){display:contents}:host([layout=horizontal]) .container,:host([layout=horizontal-single]) .container{display:contents}:host([layout=horizontal]) .stepper-item-header,:host([layout=horizontal-single]) .stepper-item-header{border-width:0px;border-block-start-width:2px;border-style:solid;outline-color:transparent;grid-row:items;border-color:var(--calcite-stepper-bar-fill-color, var(--calcite-color-border-2))}:host([layout=horizontal]) .stepper-item-header:focus,:host([layout=horizontal-single]) .stepper-item-header: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))))}:host([layout=horizontal]) .stepper-item-content,:host([layout=horizontal-single]) .stepper-item-content{cursor:auto;transition-timing-function:cubic-bezier(.4,0,.2,1);padding-block:0;padding-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);text-align:start}:host([layout=horizontal-single]) .stepper-item-header{grid-area:1/1/1/-1}:host([layout=horizontal]) .stepper-item-content,:host([layout=horizontal-single]) .stepper-item-content{grid-area:2/1/2/-1}:host([layout=horizontal][complete]) .stepper-item-header,:host([layout=horizontal-single][complete]) .stepper-item-header{border-color:var(--calcite-stepper-bar-complete-fill-color, rgba(0, 122, 194, .5))}:host([layout=horizontal][complete]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][complete]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][complete]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][complete]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-complete-fill-color-hover, var(--calcite-color-brand))}:host([layout=horizontal][error]) .stepper-item-header,:host([layout=horizontal-single][error]) .stepper-item-header{border-color:var(--calcite-stepper-bar-error-fill-color, var(--calcite-color-status-danger))}:host([layout=horizontal][selected]) .stepper-item-header,:host([layout=horizontal-single][selected]) .stepper-item-header{border-color:var(--calcite-stepper-bar-selected-fill-color, var(--calcite-color-brand))}:host([layout=horizontal]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-fill-color-hover, rgba(0, 122, 194, .5))}:host([layout=horizontal][error]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][error]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][error]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][error]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-error-fill-color-hover, var(--calcite-color-status-danger-hover))}@media(forced-colors:active){:host .container{outline-width:0;outline-offset:0}:host(:focus),:host(:focus-visible){outline-color:canvasText}:host([selected]) .container{border-block-start-color:highlight}:host([selected]) .container .stepper-item-number{color:highlight}:host([selected]) .container .stepper-item-icon{color:highlight}:host([layout=vertical][selected]) .container{border-color:highlight}}:host([layout=horizontal-single]) .stepper-item-header{margin-inline-end:0px;box-sizing:border-box;border-style:none;inline-size:100%;padding-inline:calc(var(--calcite-internal-stepper-action-inline-size) + .5rem)}:host([layout=horizontal-single][error]) .container .stepper-item-number{color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([layout=horizontal-single][error]) .container .stepper-item-icon{opacity:1;color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([layout=horizontal-single][error][selected]),:host([layout=horizontal-single][complete][selected]) .container{color:var(--calcite-color-text-3)}:host([layout=horizontal-single][error][selected]) .stepper-item-heading,:host([layout=horizontal-single][complete][selected]) .container .stepper-item-heading{color:var(--calcite-stepper-item-header-text-color, var(--calcite-color-text-2))}:host([layout=horizontal-single][complete][selected]) .container .stepper-item-icon{opacity:var(--calcite-opacity-disabled)}:host([layout=horizontal-single][complete][selected]) .container .stepper-item-number{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-text-3))}.visually-hidden{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}:host([hidden]){display:none}[hidden]{display:none}:host([item-hidden]){display:none}`,c=class extends m{constructor(){super(),this.headerRef=d(),this.messages=y(),this.focusSetter=f()(this),this.complete=!1,this.disabled=!1,this.error=!1,this.icon=!1,this.iconFlipRtl=!1,this.itemHidden=!1,this.numbered=!1,this.scale="m",this.selected=!1,this.calciteInternalStepperItemKeyEvent=o({cancelable:!1}),this.calciteInternalStepperItemRegister=o({cancelable:!1}),this.calciteInternalStepperItemSelect=o({cancelable:!1}),this.calciteStepperItemSelect=o({cancelable:!1}),this.listenOn(document.body,"calciteInternalStepperItemChange",this.updateActiveItemOnChange),this.listen("click",this.handleItemClick),this.listen("keydown",this.keyDownHandler)}static{this.properties={stepperItemHasContent:[16,{},{state:!0}],complete:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],error:[7,{},{reflect:!0,type:Boolean}],heading:1,icon:[5,{},{type:Boolean}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],itemHidden:[7,{},{reflect:!0,type:Boolean}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],numbered:[5,{},{type:Boolean}],numberingSystem:1,scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=I}async setFocus(e){return this.focusSetter(()=>this.layout==="vertical"?this.el:this.headerRef.value,e)}async load(){this.parentStepperEl=this.el.parentElement,this.itemPosition=this.getItemPosition(),this.registerStepperItem(),this.selected&&this.emitRequestedItem()}willUpdate(e){e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.selectedHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.registerStepperItem(),e.has("messages")&&this.effectiveLocaleWatcher(this.messages._lang)}updated(){x(this),u(this.el,"tabindex",this.disabled||this.layout==="horizontal"?null:0)}selectedHandler(){this.selected&&this.emitRequestedItem()}effectiveLocaleWatcher(e){l.numberFormatOptions={locale:e,numberingSystem:this.numberingSystem,useGrouping:!1}}updateActiveItemOnChange(e){(e.target===this.parentStepperEl||e.composedPath().includes(this.parentStepperEl))&&(this.selectedPosition=e.detail.position,this.determineSelectedItem())}keyDownHandler(e){if(!this.disabled&&e.target===this.el)switch(e.key){case" ":case"Enter":this.emitUserRequestedItem(),e.preventDefault();break;case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"Home":case"End":this.calciteInternalStepperItemKeyEvent.emit({item:e}),e.preventDefault();break}}determineSelectedItem(){this.selected=!this.disabled&&this.itemPosition===this.selectedPosition}registerStepperItem(){this.calciteInternalStepperItemRegister.emit({position:this.itemPosition})}handleItemClick(e){this.disabled||g(this.el)||this.layout==="horizontal"&&e.composedPath().some(s=>s.classList?.contains("stepper-item-content"))||this.emitUserRequestedItem()}emitUserRequestedItem(){this.emitRequestedItem(),this.disabled||this.calciteStepperItemSelect.emit()}emitRequestedItem(){if(!this.disabled){let e=this.itemPosition;this.calciteInternalStepperItemSelect.emit({position:e})}}getItemPosition(){return Array.from(this.parentStepperEl?.querySelectorAll("calcite-stepper-item:not([hidden]):not([item-hidden])")).indexOf(this.el)}render(){this.el.ariaCurrent=this.selected?"step":"false";let e=this.layout==="horizontal"&&!this.disabled?0:null;return z({disabled:this.disabled,children:i`<div class=${t(r.container)}>${this.complete&&i`<span aria-live=polite class=${t(r.visuallyHidden)}>${this.messages.complete}</span>`||""}<div class=${t(r.stepperItemHeader)} tabindex=${e??p} ${h(this.headerRef)}>${this.icon?this.renderIcon():null}${this.numbered?i`<div class=${t(r.stepperItemNumber)}>${this.renderNumbers()}.</div>`:null}<div class=${t(r.stepperItemHeaderText)}><span class=${t(r.stepperItemHeading)}>${this.heading}</span><span class=${t(r.stepperItemDescription)}>${this.description}</span></div></div><div class=${t({[r.stepperItemContent]:!0,[r.hasSlottedContent]:this.stepperItemHasContent})}><slot @slotchange=${s=>this.stepperItemHasContent=v(s)}></slot></div></div>`})}renderIcon(){let e=a.circle;return this.selected&&(this.layout!=="horizontal-single"||!this.error&&!this.complete)?e=a.circleF:this.error?e=a.exclamationMarkCircleF:this.complete&&(e=a.checkCircleF),i`<calcite-icon class=${t(r.stepperItemIcon)} .flipRtl=${this.iconFlipRtl} .icon=${e} scale=s></calcite-icon>`}renderNumbers(){return l.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:!1},l.numberFormatter.format(this.itemPosition+1)}};b("calcite-stepper-item",c);export{c as StepperItem};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as Q}from"./JVYKUU2B.js";import{b as q}from"./ABFHGJOG.js";import{a as R}from"./YG5VYPTQ.js";import{a as J}from"./6YVXONLB.js";import{c as K,d as N,e as j}from"./O72KETNZ.js";import{a as v,c as x,e as G,g as p,h as W}from"./IJDY7EKO.js";import{a as U}from"./LFYXGVGK.js";import{a as D,c as F,e as P,f as V,h as H}from"./OBY2JHHI.js";import{a as z,b as B}from"./UQ4HIO7J.js";import{a as M}from"./ZAD5LV3P.js";import{a as L}from"./MPYXWS5E.js";import{a as g,b as w}from"./CZF6KYOX.js";import{a as O}from"./CFWXX2ZT.js";import{a as S}from"./SXK4ATVN.js";import{b as E}from"./6PMY6MUE.js";import"./PCGNN5RO.js";import"./H3GTITDX.js";import{t as b}from"./7DQ4G2FS.js";import{a as T}from"./44XNJNTA.js";import{B as C,C as m,D as k,E as r,I as f,P as A,g as $,h as d,l as n,o as c}from"./2IIGKMQ6.js";var Z=$`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:block}.input-container{position:relative;display:flex;flex:1 1 auto;flex-wrap:nowrap}.input{width:100%;--calcite-input-prefix-size: var(--calcite-autocomplete-input-prefix-size);--calcite-input-suffix-size: var(--calcite-autocomplete-input-suffix-size);--calcite-input-background-color: var(--calcite-autocomplete-input-background-color);--calcite-input-border-color: var(--calcite-autocomplete-input-border-color);--calcite-input-corner-radius: var(--calcite-autocomplete-input-corner-radius);--calcite-input-shadow: var(--calcite-autocomplete-input-shadow);--calcite-input-icon-color: var(--calcite-autocomplete-input-icon-color);--calcite-input-text-color: var(--calcite-autocomplete-input-text-color);--calcite-input-placeholder-text-color: var(--calcite-autocomplete-input-placeholder-text-color);--calcite-input-actions-background-color: var(--calcite-autocomplete-input-actions-background-color);--calcite-input-actions-background-color-hover: var(--calcite-autocomplete-input-actions-background-color-hover);--calcite-input-actions-background-color-press: var(--calcite-autocomplete-input-actions-background-color-press);--calcite-input-actions-icon-color: var(--calcite-autocomplete-input-actions-icon-color);--calcite-input-actions-icon-color-hover: var(--calcite-autocomplete-input-actions-icon-color-hover);--calcite-input-actions-icon-color-press: var(--calcite-autocomplete-input-actions-icon-color-press);--calcite-input-loading-background-color: var(--calcite-autocomplete-input-loading-background-color);--calcite-input-loading-fill-color: var(--calcite-autocomplete-input-loading-fill-color);--calcite-input-prefix-text-color: var(--calcite-autocomplete-input-prefix-text-color);--calcite-input-suffix-text-color: var(--calcite-autocomplete-input-suffix-text-color)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.content-container{box-sizing:border-box;width:100%}.floating-ui-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0}@starting-style{.floating-ui-container{opacity:0;inset-block-start:0;left:0}}.floating-ui-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.floating-ui-container:popover-open{display:block}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.content-container .calcite-floating-ui-anim{max-height:45vh;width:100%;overflow-y:auto;color:var(--calcite-autocomplete-text-color, var(--calcite-color-text-1));background-color:var(--calcite-autocomplete-background-color, var(--calcite-color-foreground-1));border-radius:var(--calcite-autocomplete-corner-radius, var(--calcite-corner-radius-round))}.content--hidden{display:none}@media(forced-colors:active){.floating-ui-container--active{border:1px solid canvasText}}.screen-readers-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`,X={contentBottom:"content-bottom",contentTop:"content-top"},s={inputContainer:"input-container",input:"input",contentContainer:"content-container",contentAnimation:"content-animation",content:"content",contentHidden:"content--hidden",floatingUIContainer:"floating-ui-container",floatingUIContainerActive:"floating-ui-container--active",screenReadersOnly:"screen-readers-only"},Y="autocomplete",y={validationMessage:"autocompleteValidationMessage",input:h=>`${Y}-input-${h}`,list:h=>`${Y}-list-${h}`},_="calcite-autocomplete-item-group",tt="calcite-autocomplete-item",I=class extends k{constructor(){super(),this.guid=T(),this.attributeWatch=E(["autofocus","enterkeyhint","inputmode"],this.handleGlobalAttributesChanged),this.inputId=y.input(this.guid),this.listId=y.list(this.guid),this.messages=O(),this.transitionProp="opacity",this.transitionRef=C(),this.mutationObserver=g("mutation",()=>this.getAllItemsDebounced()),this.focusSetter=S()(this),this.resizeObserver=g("resize",()=>{this.setFloatingElSize()}),this.cancelable=M()(this),this.getAllItemsDebounced=L(this.getAllItems,0),this.activeDescendant="",this.activeIndex=-1,this.hasContentBottom=!1,this.hasContentTop=!1,this.items=[],this.groups=[],this.alignment="start",this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.open=!1,this.overlayPositioning="absolute",this.placement=v,this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.value="",this.calciteAutocompleteBeforeClose=c({cancelable:!1}),this.calciteAutocompleteBeforeOpen=c({cancelable:!1}),this.calciteAutocompleteChange=c({cancelable:!1}),this.calciteAutocompleteClose=c({cancelable:!1}),this.calciteAutocompleteOpen=c({cancelable:!1}),this.calciteAutocompleteTextChange=c({cancelable:!1}),this.calciteAutocompleteTextInput=c({cancelable:!1}),this.listenOn(document,"click",this.documentClickHandler),this.listen("calciteAutocompleteItemSelect",this.handleAutocompleteItemSelect)}static{this.properties={activeDescendant:[16,{},{state:!0}],activeIndex:[16,{},{state:!0}],hasContentBottom:[16,{},{state:!0}],hasContentTop:[16,{},{state:!0}],items:[16,{},{state:!0}],groups:[16,{},{state:!0}],alignment:[3,{},{reflect:!0}],autocomplete:[0,{},{attribute:!1}],disabled:[7,{},{reflect:!0,type:Boolean}],flipPlacements:[0,{},{attribute:!1}],form:[3,{},{reflect:!0}],icon:[3,{converter:f,type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],inputValue:1,label:1,labelText:1,loading:[7,{},{reflect:!0,type:Boolean}],maxLength:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],minLength:[11,{},{reflect:!0,type:Number}],name:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],pattern:1,placeholder:1,placement:[3,{},{reflect:!0}],prefixText:1,readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],suffixText:1,validationIcon:[3,{converter:f,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:1}}static{this.styles=Z}get isOpen(){return this.open&&(this.hasContentTop||this.hasContentBottom||this.items.length>0)}get enabledItems(){return this.items.filter(t=>!t.disabled)}async reposition(t=!1){let{floatingEl:e,referenceEl:l,placement:i,overlayPositioning:o,flipPlacements:a}=this;return G(this,{floatingEl:e,referenceEl:l,overlayPositioning:o,placement:i,flipPlacements:a,type:"menu"},t)}async scrollContentTo(t){this.transitionRef.value?.scrollTo(t)}async selectText(){return this.referenceEl.selectText()}async setFocus(t){return this.focusSetter(()=>this.referenceEl,t)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),K(this),F(this),this.defaultInputValue=this.inputValue||"",this.getAllItemsDebounced(),p(this),this.cancelable.add(this.getAllItemsDebounced)}async load(){this.getAllItemsDebounced()}willUpdate(t){t.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),t.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),(t.has("flipPlacements")||t.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||t.has("placement")&&(this.hasUpdated||this.placement!==v))&&this.reposition(!0);let e=!1;t.has("inputValue")&&(this.hasUpdated||this.inputValue)&&(this.inputValueMatchPattern=this.inputValue&&new RegExp(`(${q(this.inputValue)})`,"i"),this.updateItems(),this.updateGroups(),e=!0),!e&&t.has("scale")&&(this.hasUpdated||this.scale!=="m")&&(this.updateItems(),this.updateGroups(),e=!0),!e&&t.has("activeIndex")&&(this.hasUpdated||this.activeIndex!==-1)&&this.updateItems()}updated(){z(this)}loaded(){V(this,this.value||""),this.defaultInputValue=this.inputValue||"",p(this)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),N(this),P(this),W(this)}async handlePopover(){await this.componentOnReady(),this.floatingEl&&(this.open?this.floatingEl.showPopover():this.floatingEl.hidePopover())}setFloatingElSize(){let{referenceEl:t,floatingEl:e}=this;!t||!e||(e.style.inlineSize=`${t.clientWidth}px`)}handleGlobalAttributesChanged(){this.requestUpdate()}handleDisabledChange(t){t||(this.open=!1)}openHandler(){if(U(this),this.open||(this.activeIndex=-1),this.disabled){this.open=!1;return}this.setFloatingElSize(),this.reposition(!0),this.handlePopover()}async documentClickHandler(t){this.disabled||t.composedPath().includes(this.el)||(this.open=!1)}async handleAutocompleteItemSelect(t){this.value=t.target.value,this.emitChange(),await this.setFocus(),this.open=!1}onLabelClick(){this.setFocus()}onFormReset(){this.inputValue=this.defaultInputValue}onBeforeOpen(){this.calciteAutocompleteBeforeOpen.emit()}onOpen(){this.calciteAutocompleteOpen.emit()}onBeforeClose(){this.calciteAutocompleteBeforeClose.emit()}onClose(){this.calciteAutocompleteClose.emit()}emitChange(){this.calciteAutocompleteChange.emit()}updateGroups(){this.groups.forEach((t,e,l)=>{t.scale=this.scale,t.position=e,e===0&&(t.disableSpacing=!0);let i=l[e+1];i&&(i.disableSpacing=t.children.length===0)})}updateItems(){let t=null;this.items.forEach(e=>{e.scale=this.scale,e.inputValueMatchPattern=this.inputValueMatchPattern}),this.enabledItems.forEach((e,l)=>{let i=l===this.activeIndex;i&&(t=e.guid),e.active=i}),this.activeDescendant=t}handleInputFocus(){this.open=!0}handleContentTopSlotChange(t){this.hasContentTop=b(t)}handleContentBottomSlotChange(t){this.hasContentBottom=b(t)}getAllItems(){let{el:t}=this;this.groups=Array.from(t.querySelectorAll(_)),this.items=Array.from(t.querySelectorAll(tt)),this.updateItems(),this.updateGroups()}setReferenceEl(t){w(this.resizeObserver,this.referenceEl,t),this.referenceEl=t,p(this)}keyDownHandler(t){let{defaultPrevented:e,key:l}=t;if(e)return;let{open:i,activeIndex:o,enabledItems:a}=this,u=a.length&&o>-1?a[o]:null;switch(l){case"Escape":i&&(this.open=!1,t.preventDefault());break;case"Tab":this.open=!1;break;case"Enter":i&&u?(this.value=u.value,u.emitSelectEvent(),this.open=!1,t.preventDefault()):t.defaultPrevented||D(this)&&t.preventDefault();break;case"ArrowDown":a.length&&(this.open=!0,this.activeIndex=o!==-1?Math.min(o+1,a.length-1):0,this.scrollToActiveItem(),t.preventDefault());break;case"ArrowUp":a.length&&(this.open=!0,this.activeIndex=o!==-1?Math.max(o-1,0):a.length-1,this.scrollToActiveItem(),t.preventDefault());break;case"Home":a.length&&(this.open=!0,this.activeIndex=0,this.scrollToActiveItem(),t.preventDefault());break;case"End":a.length&&(this.open=!0,this.activeIndex=a.length-1,this.scrollToActiveItem(),t.preventDefault());break}}scrollToActiveItem(){this.enabledItems[this.activeIndex]?.scrollIntoView({block:"nearest"})}changeHandler(t){t.stopPropagation(),this.inputValue=t.target.value,this.calciteAutocompleteTextChange.emit()}inputClickHandler(t){t.defaultPrevented||(this.open=!0)}inputHandler(t){t.stopPropagation(),this.inputValue=t.target.value,this.open=this.inputValue?.length>0,this.calciteAutocompleteTextInput.emit()}setFloatingEl(t){this.floatingEl=t,p(this),this.handlePopover()}render(){let{disabled:t,listId:e,inputId:l,isOpen:i}=this,o=this.el.autofocus,a=this.el.enterKeyHint,u=this.el.inputMode;return B({disabled:t,children:d`${this.labelText&&J({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div class=${r(s.inputContainer)}><calcite-input .alignment=${this.alignment} aria-activedescendant=${this.activeDescendant??n} aria-controls=${e??n} aria-label=${j(this)??n} aria-owns=${e??n} aria-autocomplete=list .ariaExpanded=${i} aria-haspopup=listbox .autocomplete=${this.autocomplete} .autofocus=${o} class=${r(s.input)} clearable .disabled=${t} enterkeyhint=${a??n} .form=${this.form} .icon=${this.icon??!0} .iconFlipRtl=${this.iconFlipRtl} id=${l??n} inputmode=${u??n} .label=${this.label} .loading=${this.loading} .maxLength=${this.maxLength} .messageOverrides=${this.messages} .minLength=${this.minLength} .name=${this.name} @click=${this.inputClickHandler} @keydown=${this.keyDownHandler} @calciteInputChange=${this.changeHandler} @calciteInputInput=${this.inputHandler} @calciteInternalInputFocus=${this.handleInputFocus} .pattern=${this.pattern} .placeholder=${this.placeholder} .prefixText=${this.prefixText} .readOnly=${this.readOnly} .required=${this.required} role=combobox .scale=${this.scale} .status=${this.status} .suffixText=${this.suffixText} type=search .value=${this.inputValue} ${m(this.setReferenceEl)}></calcite-input>${this.renderListBox()}<div class=${r({[s.contentContainer]:!0,[s.floatingUIContainer]:!0,[s.floatingUIContainerActive]:i})} popover=manual ${m(this.setFloatingEl)}><div class=${r({[s.contentAnimation]:!0,[x.animation]:!0,[x.animationActive]:i})} ${m(this.transitionRef)}><div class=${r({[s.content]:!0,[s.contentHidden]:!i})}><slot name=${X.contentTop} @slotchange=${this.handleContentTopSlotChange}></slot><slot aria-hidden=true></slot><slot name=${X.contentBottom} @slotchange=${this.handleContentBottomSlotChange}></slot></div></div></div></div>${H({component:this})}${this.validationMessage&&this.status==="invalid"?Q({icon:this.validationIcon,id:y.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}renderListBox(){return d`<ul aria-labelledby=${this.inputId??n} aria-live=polite class=${r(s.screenReadersOnly)} id=${this.listId??n} role=listbox tabindex=-1>${this.renderListBoxOptions()}</ul>`}renderListBoxOptions(){return R(this.items.filter(t=>!!(t.label||t.heading)),t=>t.guid,t=>d`<li .ariaDisabled=${t.disabled} .ariaLabel=${t.label} id=${t.guid??n} role=option tabindex=-1>${t.heading}${t.description}</li>`)}};A("calcite-autocomplete",I);export{I as Autocomplete};
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{a as Q}from"./M3RKWDE5.js";import{b as q}from"./WW6CS7FX.js";import{a as R}from"./J4UVTWRA.js";import{a as J}from"./7LUAHEOY.js";import{c as K,d as N,e as j}from"./YR554YXQ.js";import{a as v,c as x,e as G,g as p,h as W}from"./SBJ5HVNQ.js";import{a as U}from"./BAESWKYQ.js";import{a as D,c as F,e as P,f as V,h as H}from"./LHYFZTCS.js";import{a as z,b as B}from"./ZOYJ4343.js";import{a as M}from"./F3FMRPUL.js";import{a as L}from"./OWSWQHLM.js";import{a as g,b as w}from"./AD2NNFBJ.js";import{a as O}from"./UVFQM6FI.js";import{a as S}from"./XGPCFFL2.js";import{b as E}from"./BC4ZMTFC.js";import"./DDSPVSLH.js";import"./W4XITGKA.js";import{t as b}from"./SBARVI35.js";import{a as T}from"./HWDBQK2D.js";import{B as C,C as m,D as k,E as r,I as f,P as A,g as $,h as d,l as n,o as c}from"./2ECRIOED.js";var Z=$`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:block}.input-container{position:relative;display:flex;flex:1 1 auto;flex-wrap:nowrap}.input{width:100%;--calcite-input-prefix-size: var(--calcite-autocomplete-input-prefix-size);--calcite-input-suffix-size: var(--calcite-autocomplete-input-suffix-size);--calcite-input-background-color: var(--calcite-autocomplete-input-background-color);--calcite-input-border-color: var(--calcite-autocomplete-input-border-color);--calcite-input-corner-radius: var(--calcite-autocomplete-input-corner-radius);--calcite-input-shadow: var(--calcite-autocomplete-input-shadow);--calcite-input-icon-color: var(--calcite-autocomplete-input-icon-color);--calcite-input-text-color: var(--calcite-autocomplete-input-text-color);--calcite-input-placeholder-text-color: var(--calcite-autocomplete-input-placeholder-text-color);--calcite-input-actions-background-color: var(--calcite-autocomplete-input-actions-background-color);--calcite-input-actions-background-color-hover: var(--calcite-autocomplete-input-actions-background-color-hover);--calcite-input-actions-background-color-press: var(--calcite-autocomplete-input-actions-background-color-press);--calcite-input-actions-icon-color: var(--calcite-autocomplete-input-actions-icon-color);--calcite-input-actions-icon-color-hover: var(--calcite-autocomplete-input-actions-icon-color-hover);--calcite-input-actions-icon-color-press: var(--calcite-autocomplete-input-actions-icon-color-press);--calcite-input-loading-background-color: var(--calcite-autocomplete-input-loading-background-color);--calcite-input-loading-fill-color: var(--calcite-autocomplete-input-loading-fill-color);--calcite-input-prefix-text-color: var(--calcite-autocomplete-input-prefix-text-color);--calcite-input-suffix-text-color: var(--calcite-autocomplete-input-suffix-text-color)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.content-container{box-sizing:border-box;width:100%}.floating-ui-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0}@starting-style{.floating-ui-container{opacity:0;inset-block-start:0;left:0}}.floating-ui-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.floating-ui-container:popover-open{display:block}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.content-container .calcite-floating-ui-anim{max-height:45vh;width:100%;overflow-y:auto;color:var(--calcite-autocomplete-text-color, var(--calcite-color-text-1));background-color:var(--calcite-autocomplete-background-color, var(--calcite-color-foreground-1));border-radius:var(--calcite-autocomplete-corner-radius, var(--calcite-corner-radius-round))}.content--hidden{display:none}@media(forced-colors:active){.floating-ui-container--active{border:1px solid canvasText}}.screen-readers-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`,X={contentBottom:"content-bottom",contentTop:"content-top"},s={inputContainer:"input-container",input:"input",contentContainer:"content-container",contentAnimation:"content-animation",content:"content",contentHidden:"content--hidden",floatingUIContainer:"floating-ui-container",floatingUIContainerActive:"floating-ui-container--active",screenReadersOnly:"screen-readers-only"},Y="autocomplete",y={validationMessage:"autocompleteValidationMessage",input:h=>`${Y}-input-${h}`,list:h=>`${Y}-list-${h}`},_="calcite-autocomplete-item-group",tt="calcite-autocomplete-item",I=class extends k{constructor(){super(),this.guid=T(),this.attributeWatch=E(["autofocus","enterkeyhint","inputmode"],this.handleGlobalAttributesChanged),this.inputId=y.input(this.guid),this.listId=y.list(this.guid),this.messages=O(),this.transitionProp="opacity",this.transitionRef=C(),this.mutationObserver=g("mutation",()=>this.getAllItemsDebounced()),this.focusSetter=S()(this),this.resizeObserver=g("resize",()=>{this.setFloatingElSize()}),this.cancelable=M()(this),this.getAllItemsDebounced=L(this.getAllItems,0),this.activeDescendant="",this.activeIndex=-1,this.hasContentBottom=!1,this.hasContentTop=!1,this.items=[],this.groups=[],this.alignment="start",this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.open=!1,this.overlayPositioning="absolute",this.placement=v,this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.value="",this.calciteAutocompleteBeforeClose=c({cancelable:!1}),this.calciteAutocompleteBeforeOpen=c({cancelable:!1}),this.calciteAutocompleteChange=c({cancelable:!1}),this.calciteAutocompleteClose=c({cancelable:!1}),this.calciteAutocompleteOpen=c({cancelable:!1}),this.calciteAutocompleteTextChange=c({cancelable:!1}),this.calciteAutocompleteTextInput=c({cancelable:!1}),this.listenOn(document,"click",this.documentClickHandler),this.listen("calciteAutocompleteItemSelect",this.handleAutocompleteItemSelect)}static{this.properties={activeDescendant:[16,{},{state:!0}],activeIndex:[16,{},{state:!0}],hasContentBottom:[16,{},{state:!0}],hasContentTop:[16,{},{state:!0}],items:[16,{},{state:!0}],groups:[16,{},{state:!0}],alignment:[3,{},{reflect:!0}],autocomplete:[0,{},{attribute:!1}],disabled:[7,{},{reflect:!0,type:Boolean}],flipPlacements:[0,{},{attribute:!1}],form:[3,{},{reflect:!0}],icon:[3,{converter:f,type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],inputValue:1,label:1,labelText:1,loading:[7,{},{reflect:!0,type:Boolean}],maxLength:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],minLength:[11,{},{reflect:!0,type:Number}],name:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],pattern:1,placeholder:1,placement:[3,{},{reflect:!0}],prefixText:1,readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],suffixText:1,validationIcon:[3,{converter:f,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:1}}static{this.styles=Z}get isOpen(){return this.open&&(this.hasContentTop||this.hasContentBottom||this.items.length>0)}get enabledItems(){return this.items.filter(t=>!t.disabled)}async reposition(t=!1){let{floatingEl:e,referenceEl:l,placement:i,overlayPositioning:o,flipPlacements:a}=this;return G(this,{floatingEl:e,referenceEl:l,overlayPositioning:o,placement:i,flipPlacements:a,type:"menu"},t)}async scrollContentTo(t){this.transitionRef.value?.scrollTo(t)}async selectText(){return this.referenceEl.selectText()}async setFocus(t){return this.focusSetter(()=>this.referenceEl,t)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),K(this),F(this),this.defaultInputValue=this.inputValue||"",this.getAllItemsDebounced(),p(this),this.cancelable.add(this.getAllItemsDebounced)}async load(){this.getAllItemsDebounced()}willUpdate(t){t.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),t.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),(t.has("flipPlacements")||t.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||t.has("placement")&&(this.hasUpdated||this.placement!==v))&&this.reposition(!0);let e=!1;t.has("inputValue")&&(this.hasUpdated||this.inputValue)&&(this.inputValueMatchPattern=this.inputValue&&new RegExp(`(${q(this.inputValue)})`,"i"),this.updateItems(),this.updateGroups(),e=!0),!e&&t.has("scale")&&(this.hasUpdated||this.scale!=="m")&&(this.updateItems(),this.updateGroups(),e=!0),!e&&t.has("activeIndex")&&(this.hasUpdated||this.activeIndex!==-1)&&this.updateItems()}updated(){z(this)}loaded(){V(this,this.value||""),this.defaultInputValue=this.inputValue||"",p(this)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),N(this),P(this),W(this)}async handlePopover(){await this.componentOnReady(),this.floatingEl&&(this.open?this.floatingEl.showPopover():this.floatingEl.hidePopover())}setFloatingElSize(){let{referenceEl:t,floatingEl:e}=this;!t||!e||(e.style.inlineSize=`${t.clientWidth}px`)}handleGlobalAttributesChanged(){this.requestUpdate()}handleDisabledChange(t){t||(this.open=!1)}openHandler(){if(U(this),this.open||(this.activeIndex=-1),this.disabled){this.open=!1;return}this.setFloatingElSize(),this.reposition(!0),this.handlePopover()}async documentClickHandler(t){this.disabled||t.composedPath().includes(this.el)||(this.open=!1)}async handleAutocompleteItemSelect(t){this.value=t.target.value,this.emitChange(),await this.setFocus(),this.open=!1}onLabelClick(){this.setFocus()}onFormReset(){this.inputValue=this.defaultInputValue}onBeforeOpen(){this.calciteAutocompleteBeforeOpen.emit()}onOpen(){this.calciteAutocompleteOpen.emit()}onBeforeClose(){this.calciteAutocompleteBeforeClose.emit()}onClose(){this.calciteAutocompleteClose.emit()}emitChange(){this.calciteAutocompleteChange.emit()}updateGroups(){this.groups.forEach((t,e,l)=>{t.scale=this.scale,t.position=e,e===0&&(t.disableSpacing=!0);let i=l[e+1];i&&(i.disableSpacing=t.children.length===0)})}updateItems(){let t=null;this.items.forEach(e=>{e.scale=this.scale,e.inputValueMatchPattern=this.inputValueMatchPattern}),this.enabledItems.forEach((e,l)=>{let i=l===this.activeIndex;i&&(t=e.guid),e.active=i}),this.activeDescendant=t}handleInputFocus(){this.open=!0}handleContentTopSlotChange(t){this.hasContentTop=b(t)}handleContentBottomSlotChange(t){this.hasContentBottom=b(t)}getAllItems(){let{el:t}=this;this.groups=Array.from(t.querySelectorAll(_)),this.items=Array.from(t.querySelectorAll(tt)),this.updateItems(),this.updateGroups()}setReferenceEl(t){w(this.resizeObserver,this.referenceEl,t),this.referenceEl=t,p(this)}keyDownHandler(t){let{defaultPrevented:e,key:l}=t;if(e)return;let{open:i,activeIndex:o,enabledItems:a}=this,u=a.length&&o>-1?a[o]:null;switch(l){case"Escape":i&&(this.open=!1,t.preventDefault());break;case"Tab":this.open=!1;break;case"Enter":i&&u?(this.value=u.value,u.emitSelectEvent(),this.open=!1,t.preventDefault()):t.defaultPrevented||D(this)&&t.preventDefault();break;case"ArrowDown":a.length&&(this.open=!0,this.activeIndex=o!==-1?Math.min(o+1,a.length-1):0,this.scrollToActiveItem(),t.preventDefault());break;case"ArrowUp":a.length&&(this.open=!0,this.activeIndex=o!==-1?Math.max(o-1,0):a.length-1,this.scrollToActiveItem(),t.preventDefault());break;case"Home":a.length&&(this.open=!0,this.activeIndex=0,this.scrollToActiveItem(),t.preventDefault());break;case"End":a.length&&(this.open=!0,this.activeIndex=a.length-1,this.scrollToActiveItem(),t.preventDefault());break}}scrollToActiveItem(){this.enabledItems[this.activeIndex]?.scrollIntoView({block:"nearest"})}changeHandler(t){t.stopPropagation(),this.inputValue=t.target.value,this.calciteAutocompleteTextChange.emit()}inputClickHandler(t){t.defaultPrevented||(this.open=!0)}inputHandler(t){t.stopPropagation(),this.inputValue=t.target.value,this.open=this.inputValue?.length>0,this.calciteAutocompleteTextInput.emit()}setFloatingEl(t){this.floatingEl=t,p(this),this.handlePopover()}render(){let{disabled:t,listId:e,inputId:l,isOpen:i}=this,o=this.el.autofocus,a=this.el.enterKeyHint,u=this.el.inputMode;return B({disabled:t,children:d`${this.labelText&&J({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div class=${r(s.inputContainer)}><calcite-input .alignment=${this.alignment} aria-activedescendant=${this.activeDescendant??n} aria-controls=${e??n} aria-label=${j(this)??n} aria-owns=${e??n} aria-autocomplete=list .ariaExpanded=${i} aria-haspopup=listbox .autocomplete=${this.autocomplete} .autofocus=${o} class=${r(s.input)} clearable .disabled=${t} enterkeyhint=${a??n} .form=${this.form} .icon=${this.icon??!0} .iconFlipRtl=${this.iconFlipRtl} id=${l??n} inputmode=${u??n} .label=${this.label} .loading=${this.loading} .maxLength=${this.maxLength} .messageOverrides=${this.messages} .minLength=${this.minLength} .name=${this.name} @click=${this.inputClickHandler} @keydown=${this.keyDownHandler} @calciteInputChange=${this.changeHandler} @calciteInputInput=${this.inputHandler} @calciteInternalInputFocus=${this.handleInputFocus} .pattern=${this.pattern} .placeholder=${this.placeholder} .prefixText=${this.prefixText} .readOnly=${this.readOnly} .required=${this.required} role=combobox .scale=${this.scale} .status=${this.status} .suffixText=${this.suffixText} type=search .value=${this.inputValue} ${m(this.setReferenceEl)}></calcite-input>${this.renderListBox()}<div class=${r({[s.contentContainer]:!0,[s.floatingUIContainer]:!0,[s.floatingUIContainerActive]:i})} popover=manual ${m(this.setFloatingEl)}><div class=${r({[s.contentAnimation]:!0,[x.animation]:!0,[x.animationActive]:i})} ${m(this.transitionRef)}><div class=${r({[s.content]:!0,[s.contentHidden]:!i})}><slot name=${X.contentTop} @slotchange=${this.handleContentTopSlotChange}></slot><slot aria-hidden=true></slot><slot name=${X.contentBottom} @slotchange=${this.handleContentBottomSlotChange}></slot></div></div></div></div>${H({component:this})}${this.validationMessage&&this.status==="invalid"?Q({icon:this.validationIcon,id:y.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}renderListBox(){return d`<ul aria-labelledby=${this.inputId??n} aria-live=polite class=${r(s.screenReadersOnly)} id=${this.listId??n} role=listbox tabindex=-1>${this.renderListBoxOptions()}</ul>`}renderListBoxOptions(){return R(this.items.filter(t=>!!(t.label||t.heading)),t=>t.guid,t=>d`<li .ariaDisabled=${t.disabled} .ariaLabel=${t.label} id=${t.guid??n} role=option tabindex=-1>${t.heading}${t.description}</li>`)}};A("calcite-autocomplete",I);export{I as Autocomplete};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as l}from"./
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{a as l}from"./BC4ZMTFC.js";import{d as a}from"./DDSPVSLH.js";import{g as s,l as u}from"./SBARVI35.js";var L=()=>l((e,n)=>{let t;function r(){t?.abort()}return n.onLoad(()=>{e.listen("focus",()=>{t=new AbortController,e.el.addEventListener("focusout",r,{signal:t.signal})})}),n.onDisconnected(()=>{e.el.removeEventListener("focusout",r)}),async(c,d)=>{if(e.disabled)return;let o=b(c());if(!o)return;let{target:f,includeContainer:v,strategy:C}=o,i=s(e.el),g=i.activeElement;if(await a(e),!(g!==i.activeElement||t&&!t?.signal.aborted))return e.el.removeEventListener("focus",r),u(f,v,C,e.el,d)}});function m(e){return"target"in e&&("includeContainer"in e||"strategy"in e)}function b(e){if(e)return m(e)?e:{target:e}}export{L 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 o}from"./
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{a as o}from"./ULUKHLQN.js";import{a as l}from"./XGPCFFL2.js";import"./BC4ZMTFC.js";import"./DDSPVSLH.js";import"./W4XITGKA.js";import"./SBARVI35.js";import"./HWDBQK2D.js";import{D as n,E as a,P as c,g as r,h as e}from"./2ECRIOED.js";var t={textContainer:"text-container",fullName:"full-name",username:"username",button:"button"},u=r`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:inline-flex;outline:2px solid transparent;outline-offset:2px}:host .button{margin:0;display:flex;cursor:pointer;align-items:center;justify-content:center;font-size:var(--calcite-font-size-0);line-height:1.25rem;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;outline-color:transparent;font-family:inherit;border:none;background-color:var(--calcite-navigation-background-color, var(--calcite-internal-navigation-user-background-color, var(--calcite-color-transparent)));border-block-end:2px solid var(--calcite-color-transparent)}.text-container{margin-block-start:.125rem;display:flex;flex-direction:column;padding-inline:1rem;text-align:start}calcite-avatar{padding-inline:1rem;--calcite-avatar-corner-radius: var(--calcite-navigation-user-avatar-corner-radius);--calcite-avatar-color: var(--calcite-navigation-user-avatar-color)}calcite-avatar~.text-container{padding-inline-start:0px}.full-name{margin-inline-start:0px;font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-navigation-user-full-name-text-color, var(--calcite-color-text-1))}.username{font-size:var(--calcite-font-size--1);color:var(--calcite-navigation-user-name-text-color, var(--calcite-color-text-2))}:host(:hover) .button,:host(:focus) .button{--calcite-internal-navigation-user-background-color: var(--calcite-color-foreground-2)}:host(:focus) .button{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host(:active) .button{--calcite-internal-navigation-user-background-color: var(--calcite-color-foreground-3)}:host([active]) .button{border-block-end-color:var(--calcite-navigation-accent-color, var(--calcite-color-brand))}:host([hidden]){display:none}[hidden]{display:none}`,i=class extends n{constructor(){super(...arguments),this.focusSetter=l()(this),this.textDisabled=!1}static{this.properties={active:[7,{},{reflect:!0,type:Boolean}],fullName:1,label:1,textDisabled:[7,{},{reflect:!0,type:Boolean}],thumbnail:1,userId:1,username:1}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=u}async setFocus(s){return this.focusSetter(()=>this.el,s)}render(){return e`<button .ariaLabel=${this.label} class=${a(t.button)}><calcite-avatar .fullName=${this.fullName} .label=${this.label} .thumbnail=${this.thumbnail} .userId=${this.userId} .username=${this.username}></calcite-avatar>${(this.fullName||this.username)&&!this.textDisabled&&e`<div class=${a(t.textContainer)}>${this.fullName&&o(t.fullName,e`<span class=${a(t.fullName)}>${this.fullName}</span>`)||""}${this.username&&o(t.username,e`<span class=${a(t.username)}>${this.username}</span>`)||""}</div>`||""}</button>`}};c("calcite-navigation-user",i);export{i as NavigationUser};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{q as u,r as b}from"./
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{q as u,r as b}from"./SBARVI35.js";import"./HWDBQK2D.js";import{D as g,E as a,P as m,g as d,h as l,o as h}from"./2ECRIOED.js";var f={input:"input"},t={label:"label",labelScale:i=>`label--scale-${i}`,labelHorizontal:"label--horizontal",labelOutline:"label--outline",labelOutlineFill:"label--outline-fill",icon:"icon",iconSolo:"icon--solo"},v=d`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:flex;cursor:pointer;align-self:stretch;font-weight:var(--calcite-font-weight-normal);outline-color:transparent;transition:background-color var(--calcite-internal-animation-timing-fast) ease-in-out,border-color var(--calcite-animation-timing) ease-in-out}.label{pointer-events:none;margin:.125rem;box-sizing:border-box;display:flex;flex:1 1 0%;align-items:center;color:var(--calcite-segmented-control-color, var(--calcite-color-text-3));background-color:var(--calcite-segmented-control-background-color);box-shadow:var(--calcite-segmented-control-shadow);border-color:var(--calcite-segmented-control-border-color);transition:background-color var(--calcite-internal-animation-timing-fast) ease-in-out,border-color var(--calcite-internal-animation-timing-fast) ease-in-out,color var(--calcite-internal-animation-timing-fast) ease-in-out}.label--horizontal{justify-content:center}:host(:focus){outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))));outline-offset:-1px;z-index:var(--calcite-z-index)}.label--scale-s{padding-inline:.5rem;font-size:var(--calcite-font-size--2);line-height:1rem;padding-block:.125rem}.label--scale-m{padding-inline:.75rem;font-size:var(--calcite-font-size--1);line-height:1rem;padding-block:.375rem}.label--scale-l{padding-inline:1rem;padding-block:.625rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host(:hover) .label{background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-foreground-2));color:var(--calcite-segmented-control-color, var(--calcite-color-text-1))}:host(:active) .label{background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-foreground-3))}:host([checked]) .label{cursor:default;background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-brand));border-color:var(--calcite-segmented-control-border-color, var(--calcite-color-brand));color:var(--calcite-segmented-control-color, var(--calcite-color-text-inverse))}:host([checked]) .label--outline,:host([checked]) .label--outline-fill{background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-foreground-1));border-color:var(--calcite-segmented-control-border-color, var(--calcite-color-brand));box-shadow:var(--calcite-segmented-control-shadow, inset 0 0 0 1px var(--calcite-color-brand));color:var(--calcite-segmented-control-color, var(--calcite-color-brand))}:host([checked]) .label--outline{background-color:var(--calcite-segmented-control-background-color, transparent)}::slotted(input){display:none}@media(forced-colors:active){:host([checked]) .label{background-color:highlight}:host([checked]) .label--outline,:host([checked]) .label--outline-fill{outline:2px solid transparent;outline-offset:2px}:host([checked]) .label:not([class~=label--outline]) .icon{color:highlightText}}.icon{position:relative;margin:0;display:inline-flex;line-height:inherit;margin-inline-start:var(--calcite-internal-segmented-control-icon-margin-start);margin-inline-end:var(--calcite-internal-segmented-control-icon-margin-end);--calcite-icon-color: var(--calcite-segmented-control-icon-color)}:host([icon-start]) .label--scale-s{--calcite-internal-segmented-control-icon-margin-end: .5rem}:host([icon-end]) .label--scale-s{--calcite-internal-segmented-control-icon-margin-start: .5rem}:host([icon-start]) .label--scale-m{--calcite-internal-segmented-control-icon-margin-end: .75rem}:host([icon-end]) .label--scale-m{--calcite-internal-segmented-control-icon-margin-start: .75rem}:host([icon-start]) .label--scale-l{--calcite-internal-segmented-control-icon-margin-end: 1rem}:host([icon-end]) .label--scale-l{--calcite-internal-segmented-control-icon-margin-start: 1rem}.label .icon--solo{--calcite-internal-segmented-control-icon-margin-start: 0;--calcite-internal-segmented-control-icon-margin-end: 0}:host([hidden]){display:none}[hidden]{display:none}`,r=class extends g{constructor(){super(...arguments),this.hasSlottedContent=!1,this.appearance="solid",this.checked=!1,this.iconFlipRtl=!1,this.layout="horizontal",this.scale="m",this.calciteInternalSegmentedControlItemChange=h({cancelable:!1})}static{this.properties={hasSlottedContent:[16,{},{state:!0}],appearance:1,checked:[7,{},{reflect:!0,type:Boolean}],iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],iconStart:[3,{type:String},{reflect:!0}],layout:1,scale:1,value:1}}static{this.styles=v}willUpdate(e){e.has("checked")&&(this.hasUpdated||this.checked!==!1)&&this.calciteInternalSegmentedControlItemChange.emit()}handleSlotChange(e){this.hasSlottedContent=b(e)}renderIcon(e,o=!1){return e?l`<calcite-icon class=${a({[t.icon]:!0,[t.iconSolo]:o})} .flipRtl=${this.iconFlipRtl} .icon=${e} scale=s></calcite-icon>`:null}render(){let{appearance:e,checked:o,layout:c,scale:n,value:s}=this;return this.el.ariaChecked=u(o),this.el.ariaLabel=s,this.el.role="radio",l`<label class=${a({[t.label]:!0,[t.labelScale(n)]:!0,[t.labelHorizontal]:c==="horizontal",[t.labelOutline]:e==="outline",[t.labelOutlineFill]:e==="outline-fill"})}>${this.renderContent()}</label>`}renderContent(){let{hasSlottedContent:e,iconEnd:o,iconStart:c}=this,n=c||o;return!e&&n?[this.renderIcon(n,!0),l`<slot @slotchange=${this.handleSlotChange}></slot>`]:[this.renderIcon(c),l`<slot @slotchange=${this.handleSlotChange}></slot>`,l`<slot name=${f.input}></slot>`,this.renderIcon(o)]}};m("calcite-segmented-control-item",r);export{r as SegmentedControlItem};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as s}from"./
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{a as s}from"./AD2NNFBJ.js";import{D as o,E as n,P as r,g as c,h as i,o as a}from"./2ECRIOED.js";var l={accordion:"accordion",transparent:"accordion--transparent"},d=c`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{position:relative;display:block;max-inline-size:100%;line-height:1.5rem}.accordion{border-width:1px;border-block-end-width:0px;border-style:solid;border-color:var(--calcite-accordion-border-color, var(--calcite-color-border-2));background-color:var(--calcite-accordion-background-color, var(--calcite-color-foreground-1))}.accordion--transparent{--calcite-accordion-border-color: transparent;border-color:var(--calcite-color-transparent);background-color:var(--calcite-color-transparent)}:host([scale=s]){--calcite-internal-accordion-item-spacing-unit: .25rem;--calcite-internal-accordion-icon-margin: .5rem;--calcite-internal-accordion-item-padding: var(--calcite-internal-accordion-item-spacing-unit) .5rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]){--calcite-internal-accordion-item-spacing-unit: .5rem;--calcite-internal-accordion-icon-margin: .75rem;--calcite-internal-accordion-item-padding: var(--calcite-internal-accordion-item-spacing-unit) .75rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]){--calcite-internal-accordion-item-spacing-unit: .75rem;--calcite-internal-accordion-icon-margin: 1rem;--calcite-internal-accordion-item-padding: var(--calcite-internal-accordion-item-spacing-unit) 1rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([hidden]){display:none}[hidden]{display:none}`,t=class extends o{constructor(){super(),this.mutationObserver=s("mutation",()=>this.updateAccordionItems()),this.appearance="solid",this.iconPosition="end",this.iconType="chevron",this.scale="m",this.selectionMode="multiple",this.calciteInternalAccordionChange=a({cancelable:!1}),this.listen("calciteInternalAccordionItemSelect",this.updateActiveItemOnChange)}static{this.properties={appearance:[3,{},{reflect:!0}],iconPosition:[3,{},{reflect:!0}],iconType:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}]}}static{this.styles=d}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0}),this.updateAccordionItems()}willUpdate(e){(e.has("appearance")&&(this.hasUpdated||this.appearance!=="solid")||e.has("iconPosition")&&(this.hasUpdated||this.iconPosition!=="end")||e.has("iconType")&&(this.hasUpdated||this.iconType!=="chevron")||e.has("scale")&&(this.hasUpdated||this.scale!=="m")||e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="multiple"))&&this.updateAccordionItems()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}updateActiveItemOnChange(e){this.calciteInternalAccordionChange.emit({requestedAccordionItem:e.detail.requestedAccordionItem}),e.stopPropagation()}updateAccordionItems(){this.el.querySelectorAll("calcite-accordion-item").forEach(e=>{e.appearance=this.appearance,e.iconPosition=this.iconPosition,e.iconType=this.iconType,e.scale=this.scale}),document.dispatchEvent(new CustomEvent("calciteInternalAccordionItemsSync"))}render(){let e=this.appearance==="transparent";return i`<div class=${n({[l.transparent]:e,[l.accordion]:!e})}><slot></slot></div>`}};r("calcite-accordion",t);export{t as Accordion};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{b as o,c as r}from"./
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{b as o,c as r}from"./QR2HL6XI.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 T,d as O,e as R}from"./O72KETNZ.js";import{b as l,c as w}from"./BTK24FM2.js";import{a as E,b as C,d as S}from"./OBY2JHHI.js";import{a as z,b as $}from"./UQ4HIO7J.js";import{a as c,b as f}from"./CZF6KYOX.js";import{a as y}from"./CFWXX2ZT.js";import{a as x}from"./SXK4ATVN.js";import{b as m}from"./6PMY6MUE.js";import{a as i}from"./PCGNN5RO.js";import"./H3GTITDX.js";import{s as k}from"./7DQ4G2FS.js";import"./44XNJNTA.js";import{B as p,C as r,D as h,E as a,I as v,P as g,g as b,h as o,l as n}from"./2IIGKMQ6.js";var e={buttonLoader:"calcite-button--loader",content:"content",contentSlotted:"content--slotted",icon:"icon",iconStart:"icon--start",iconEnd:"icon--end",loadingIn:"loading-in",loadingOut:"loading-out",iconStartEmpty:"icon-start-empty",iconEndEmpty:"icon-end-empty",buttonPadding:"button-padding",buttonPaddingShrunk:"button-padding--shrunk"},A=b`: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:inline-block;inline-size:auto;vertical-align:middle;border-radius:var(--calcite-button-corner-radius, var(--calcite-internal-button-corner-radius, 0))}:host a,:host button{--calcite-internal-button-content-margin: .5rem;--calcite-internal-button-padding-x: 7px;--calcite-internal-button-padding-y: 3px;position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;-webkit-user-select:none;user-select:none;appearance:none;align-items:center;justify-content:center;border-style:none;text-align:center;font-family:inherit;font-weight:var(--calcite-font-weight-normal);text-decoration-line:none;outline-color:transparent;box-shadow:var(--calcite-button-shadow, var(--calcite-shadow-none));background-color:var(--calcite-button-background-color, var(--calcite-internal-button-background-color, var(--calcite-color-transparent)));border-block-start-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-block-start-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-block-end-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-block-end-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-inline-start-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-inline-start-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-inline-end-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-inline-end-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-style:solid;border-width:var(--calcite-border-width-sm);border-radius:var(--calcite-button-corner-radius, var(--calcite-internal-button-corner-radius, 0));color:var(--calcite-button-text-color, var(--calcite-internal-button-text-color, currentColor));padding-block:var(--calcite-internal-button-padding-y);padding-inline:var(--calcite-internal-button-padding-x);transition:color var(--calcite-animation-timing) ease-in-out,background-color var(--calcite-animation-timing) ease-in-out,box-shadow var(--calcite-animation-timing) ease-in-out,outline-color var(--calcite-internal-animation-timing-fast) ease-in-out}:host a:hover,:host button:hover{text-decoration-line:none}:host a:focus,:host button: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))))}:host a span,:host button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host a calcite-loader,:host button calcite-loader{color:var(--calcite-button-loader-color, var(--calcite-internal-button-loader-color, var(--calcite-button-text-color, var(--calcite-internal-button-text-color))))}:host([round]){--calcite-internal-button-corner-radius: 50px}.content{margin-inline:var(--calcite-internal-button-content-margin)}.icon-start-empty .content{margin-inline-start:unset}.icon-end-empty .content{margin-inline-end:unset}:host([scale=m]) button,:host([scale=m]) a{--calcite-internal-button-content-margin: .75rem}:host([scale=l]) button,:host([scale=l]) a{--calcite-internal-button-content-margin: 1rem}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}:host([alignment=center]:not([width=auto])) a,:host([alignment=center]:not([width=auto])) button{justify-content:center}:host([alignment=start]:not([width=auto])) a,:host([alignment=start]:not([width=auto])) button{justify-content:flex-start}:host([alignment=end]:not([width=auto])) a,:host([alignment=end]:not([width=auto])) button{justify-content:flex-end}:host([alignment*=space-between]:not([width=auto])) a,:host([alignment*=space-between]:not([width=auto])) button{justify-content:space-between}:host([alignment=icon-start-space-between]:not([width=auto])) .icon--start{margin-inline-end:auto}:host([alignment=icon-start-space-between]:not([width=auto])) a,:host([alignment=icon-start-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=icon-end-space-between]:not([width=auto])) .icon--end{margin-inline-start:auto}:host([alignment=icon-end-space-between]:not([width=auto])) a,:host([alignment=icon-end-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=center]) a:not(.content--slotted) .icon--start+.icon--end,:host([alignment=center]) button:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:var(--calcite-internal-button-content-margin)}.icon--start,.icon--end{color:var(--calcite-button-icon-color, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}@keyframes loader-in{0%{inline-size:0;opacity:0;transform:scale(.5)}to{inline-size:1em;opacity:1;transform:scale(1)}}@keyframes loader-out{0%{inline-size:1em;opacity:1;transform:scale(1)}to{inline-size:0;opacity:0;transform:scale(.5)}}.calcite-button--loader{display:flex}.calcite-button--loader calcite-loader{margin:0}:host([loading]) button.content--slotted .calcite-button--loader calcite-loader,:host([loading]) a.content--slotted .calcite-button--loader calcite-loader{margin-inline-end:var(--calcite-internal-button-content-margin)}:host([loading]) button:not(.content--slotted) .icon--start,:host([loading]) button:not(.content--slotted) .icon--end,:host([loading]) a:not(.content--slotted) .icon--start,:host([loading]) a:not(.content--slotted) .icon--end{display:none}:host([appearance]) button,:host([appearance]) a{--calcite-internal-button-border-color: var(--calcite-color-transparent);border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([kind=brand]) button,:host([kind=brand]) a{--calcite-internal-button-text-color: var(--calcite-color-text-inverse);--calcite-internal-button-background-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-text-inverse)}:host([kind=brand]) button:hover,:host([kind=brand]) a:hover{--calcite-internal-button-background-color: var(--calcite-color-brand-hover)}:host([kind=brand]) button:active,:host([kind=brand]) a:active{--calcite-internal-button-background-color: var(--calcite-color-brand-press)}:host([kind=danger]) button,:host([kind=danger]) a{--calcite-internal-button-text-color: var(--calcite-color-text-inverse);--calcite-internal-button-background-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-text-inverse)}:host([kind=danger]) button:hover,:host([kind=danger]) a:hover{--calcite-internal-button-background-color: var(--calcite-color-status-danger-hover)}:host([kind=danger]) button:active,:host([kind=danger]) a:active{--calcite-internal-button-background-color: var(--calcite-color-status-danger-press)}:host([kind=neutral]) button,:host([kind=neutral]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-background-color: var(--calcite-color-foreground-3);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([kind=neutral]) button:hover,:host([kind=neutral]) a:hover{--calcite-internal-button-background-color: var(--calcite-color-foreground-2)}:host([kind=neutral]) button:active,:host([kind=neutral]) a:active{--calcite-internal-button-background-color: var(--calcite-color-foreground-1)}:host([kind=inverse]) button,:host([kind=inverse]) a{--calcite-internal-button-text-color: var(--calcite-color-text-inverse);--calcite-internal-button-background-color: var(--calcite-color-inverse);--calcite-internal-button-loader-color: var(--calcite-color-text-inverse)}:host([kind=inverse]) button:hover,:host([kind=inverse]) a:hover{--calcite-internal-button-background-color: var(--calcite-color-inverse-hover)}:host([kind=inverse]) button:active,:host([kind=inverse]) a:active{--calcite-internal-button-background-color: var(--calcite-color-inverse-press)}:host([appearance=outline-fill]) button,:host([appearance=outline-fill]) a{--calcite-internal-button-background-color: var(--calcite-color-foreground-1);border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([appearance=outline-fill]) button:hover,:host([appearance=outline-fill]) a:hover{--calcite-internal-button-background-color: var(--calcite-color-foreground-2)}:host([appearance=outline-fill]) button:active,:host([appearance=outline-fill]) a:active{--calcite-internal-button-background-color: var(--calcite-color-foreground-3)}:host([appearance=outline-fill][kind=brand]) button,:host([appearance=outline-fill][kind=brand]) a{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=brand]) button:hover,:host([appearance=outline-fill][kind=brand]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-brand-hover);--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=outline-fill][kind=brand]) button:focus,:host([appearance=outline-fill][kind=brand]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=brand]) button:active,:host([appearance=outline-fill][kind=brand]) a:active{--calcite-internal-button-border-color: var(--calcite-color-brand-press);--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=outline-fill][kind=brand]) button calcite-loader,:host([appearance=outline-fill][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=danger]) button,:host([appearance=outline-fill][kind=danger]) a{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=danger]) button:hover,:host([appearance=outline-fill][kind=danger]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-status-danger-hover);--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=outline-fill][kind=danger]) button:focus,:host([appearance=outline-fill][kind=danger]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=danger]) button:active,:host([appearance=outline-fill][kind=danger]) a:active{--calcite-internal-button-border-color: var(--calcite-color-status-danger-press);--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=outline-fill][kind=danger]) button calcite-loader,:host([appearance=outline-fill][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=neutral]) button,:host([appearance=outline-fill][kind=neutral]) a{--calcite-internal-button-border-color: var(--calcite-color-border-1);--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline-fill][kind=neutral]) button:hover,:host([appearance=outline-fill][kind=neutral]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-border-input)}:host([appearance=outline-fill][kind=neutral]) button:focus,:host([appearance=outline-fill][kind=neutral]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-foreground-3)}:host([appearance=outline-fill][kind=neutral]) button:active,:host([appearance=outline-fill][kind=neutral]) a:active{--calcite-internal-button-border-color: var(--calcite-color-text-3)}:host([appearance=solid][kind=neutral]) button:hover,:host([appearance=solid][kind=neutral]) a:hover{--calcite-internal-button-background-color: var(--calcite-color-border-2)}:host([appearance=solid][kind=neutral]) button:active,:host([appearance=solid][kind=neutral]) a:active{--calcite-internal-button-background-color: var(--calcite-color-border-1)}:host([appearance=outline-fill][kind=inverse]) button,:host([appearance=outline-fill][kind=inverse]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-border-color: var(--calcite-color-inverse);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline-fill][kind=inverse]) button:hover,:host([appearance=outline-fill][kind=inverse]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-inverse-hover)}:host([appearance=outline-fill][kind=inverse]) button:focus,:host([appearance=outline-fill][kind=inverse]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-inverse)}:host([appearance=outline-fill][kind=inverse]) button:active,:host([appearance=outline-fill][kind=inverse]) a:active{--calcite-internal-button-border-color: var(--calcite-color-inverse-press)}:host([appearance=outline]) button,:host([appearance=outline]) a{--calcite-internal-button-background-color: var(--calcite-color-transparent);border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([appearance=outline]) button:hover,:host([appearance=outline]) a:hover{--calcite-internal-button-background-color: var(--calcite-color-transparent-hover)}:host([appearance=outline]) button:active,:host([appearance=outline]) a:active{--calcite-internal-button-background-color: var(--calcite-color-transparent-press)}:host([appearance=outline][kind=brand]) button,:host([appearance=outline][kind=brand]) a{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline][kind=brand]) button:hover,:host([appearance=outline][kind=brand]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-brand-hover);--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=outline][kind=brand]) button:focus,:host([appearance=outline][kind=brand]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=outline][kind=brand]) button:active,:host([appearance=outline][kind=brand]) a:active{--calcite-internal-button-border-color: var(--calcite-color-brand-press);--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=outline][kind=brand]) button calcite-loader,:host([appearance=outline][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline][kind=danger]) button,:host([appearance=outline][kind=danger]) a{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=danger]) button:hover,:host([appearance=outline][kind=danger]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-status-danger-hover);--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=outline][kind=danger]) button:focus,:host([appearance=outline][kind=danger]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=danger]) button:active,:host([appearance=outline][kind=danger]) a:active{--calcite-internal-button-border-color: var(--calcite-color-status-danger-press);--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=outline][kind=danger]) button calcite-loader,:host([appearance=outline][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=neutral]) button,:host([appearance=outline][kind=neutral]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-border-color: var(--calcite-color-border-1);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline][kind=neutral]) button:hover,:host([appearance=outline][kind=neutral]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-border-input)}:host([appearance=outline][kind=neutral]) button:focus,:host([appearance=outline][kind=neutral]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-foreground-3)}:host([appearance=outline][kind=neutral]) button:active,:host([appearance=outline][kind=neutral]) a:active{--calcite-internal-button-border-color: var(--calcite-color-text-3)}:host([appearance=outline][kind=inverse]) button,:host([appearance=outline][kind=inverse]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-border-color: var(--calcite-color-inverse);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline][kind=inverse]) button:hover,:host([appearance=outline][kind=inverse]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-inverse-hover)}:host([appearance=outline][kind=inverse]) button:focus,:host([appearance=outline][kind=inverse]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-inverse)}:host([appearance=outline][kind=inverse]) button:active,:host([appearance=outline][kind=inverse]) a:active{--calcite-internal-button-border-color: var(--calcite-color-inverse-press)}:host([appearance=outline-fill][split-child=primary]) button,:host([appearance=outline][split-child=primary]) button,:host([appearance=outline-fill][split-child=primary]) a,:host([appearance=outline][split-child=primary]) a{border-inline-end-width:0;border-inline-start-width:1px}:host([appearance=outline-fill][split-child=secondary]) button,:host([appearance=outline][split-child=secondary]) button,:host([appearance=outline-fill][split-child=secondary]) a,:host([appearance=outline][split-child=secondary]) a{border-inline-start-width:0;border-inline-end-width:1px}:host([appearance=transparent]) button,:host([appearance=transparent]) a{--calcite-internal-button-background-color: var(--calcite-color-transparent)}:host([appearance=transparent]) button:hover,:host([appearance=transparent]) button:focus,:host([appearance=transparent]) a:hover,:host([appearance=transparent]) a:focus{--calcite-internal-button-background-color: var(--calcite-color-transparent-hover)}:host([appearance=transparent]) button:active,:host([appearance=transparent]) a:active{--calcite-internal-button-background-color: var(--calcite-color-transparent-press)}:host([appearance=transparent]:not(.enable-editing-button)) button,:host([appearance=transparent]:not(.enable-editing-button)) a{background-color:var(--calcite-color-transparent)}:host([appearance=transparent]:not(.enable-editing-button)) button:hover,:host([appearance=transparent]:not(.enable-editing-button)) a:hover{background-color:var(--calcite-color-transparent-hover)}:host([appearance=transparent]:not(.enable-editing-button)) button:active,:host([appearance=transparent]:not(.enable-editing-button)) a:active{background-color:var(--calcite-color-transparent-press)}:host([appearance=transparent][kind=brand]) button,:host([appearance=transparent][kind=brand]) a{--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=brand]) button:hover,:host([appearance=transparent][kind=brand]) a:hover{--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=transparent][kind=brand]) button:focus,:host([appearance=transparent][kind=brand]) a:focus{--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=brand]) button:active,:host([appearance=transparent][kind=brand]) a:active{--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=transparent][kind=brand]) button calcite-loader,:host([appearance=transparent][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=danger]) button,:host([appearance=transparent][kind=danger]) a{--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=danger]) button:hover,:host([appearance=transparent][kind=danger]) a:hover{--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=transparent][kind=danger]) button:focus,:host([appearance=transparent][kind=danger]) a:focus{--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=danger]) button:active,:host([appearance=transparent][kind=danger]) a:active{--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=transparent][kind=danger]) button calcite-loader,:host([appearance=transparent][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) button,:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) a,:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) calcite-loader{--calcite-internal-button-text-color: var(--calcite-color-text-1)}:host([appearance=transparent][kind=neutral].cancel-editing-button) button{--calcite-internal-button-text-color: var(--calcite-color-text-3)}:host([appearance=transparent][kind=neutral].cancel-editing-button) button:hover{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-padding-y: 0}:host(.confirm-changes-button) button:focus,:host(.cancel-editing-button) button:focus,:host(.enable-editing-button) button:focus{outline-offset:-2px}:host([appearance=transparent][kind=inverse]) button:hover,:host([appearance=transparent][kind=inverse]) a:hover{background-color:var(--calcite-color-transparent-inverse-hover)}:host([appearance=transparent][kind=inverse]) button:active,:host([appearance=transparent][kind=inverse]) a:active{background-color:var(--calcite-color-transparent-inverse-press)}:host([appearance=transparent][kind=inverse]) button calcite-loader,:host([appearance=transparent][kind=inverse]) a calcite-loader{--calcite-internal-button-text-color: var(--calcite-color-text-inverse)}:host([scale=s]) button.content--slotted,:host([scale=s]) a.content--slotted{font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s][appearance=transparent]) button.content--slotted,:host([scale=s][appearance=transparent]) a.content--slotted{--calcite-internal-button-padding-x: .5rem}:host([scale=s]) button,:host([scale=s]) a{--calcite-internal-button-padding-y: 3px}:host([scale=m]) button.content--slotted,:host([scale=m]) a.content--slotted{--calcite-internal-button-padding-x: 11px;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) button,:host([scale=m]) a{--calcite-internal-button-padding-y: 7px}:host([scale=m][appearance=transparent]) button.content--slotted,:host([scale=m][appearance=transparent]) a.content--slotted{--calcite-internal-button-padding-x: .75rem}:host([scale=l]) button.content--slotted,:host([scale=l]) a.content--slotted{--calcite-internal-button-padding-x: 15px;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .button-padding{--calcite-internal-button-padding-x: 1rem;--calcite-internal-button-padding-y: 11px}:host([scale=l]) .button-padding--shrunk{--calcite-internal-button-padding-y: 9px}:host([scale=s]) button:not(.content--slotted),:host([scale=s]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y: 3px;inline-size:1.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:1.5rem}:host([scale=m]) button:not(.content--slotted),:host([scale=m]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y: 7px;inline-size:2rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:2rem}:host([scale=l]) button:not(.content--slotted),:host([scale=l]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y: 9px;inline-size:2.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:2.75rem}:host(:is([scale=s],[scale=m],[scale=l])[width=full]) a:not(.content--slotted),:host(:is([scale=s],[scale=m],[scale=l])[width=full]) button:not(.content--slotted){inline-size:var(--calcite-container-size-content-fluid)}:host([scale=l][appearance=transparent]) button:not(.content--slotted),:host([scale=l][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-y: .625rem}:host([scale=s][icon-start][icon-end]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 23px;block-size:1.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=s][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 1.5rem}:host([scale=m][icon-start][icon-end]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 2rem;block-size:2rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=m][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 33px}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 43px;block-size:2.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted) .icon--start+.icon--end,:host([scale=l][icon-start][icon-end]) a:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:1rem}:host([scale=l][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 2.75rem}:host([hidden]){display:none}[hidden]{display:none}`,s=class extends h{constructor(){super(...arguments),this.attributeWatch=m(["aria-expanded"],this.handleGlobalAttributesChanged),this.contentRef=p(),this.mutationObserver=c("mutation",()=>this.updateHasContent()),this.resizeObserver=c("resize",()=>this.setTooltipText()),this.focusSetter=x()(this),this.messages=y(),this.hasContent=!1,this.alignment="center",this.appearance="solid",this.disabled=!1,this.download=!1,this.kind="brand",this.loading=!1,this.round=!1,this.scale="m",this.splitChild=!1,this.type="button",this.width="auto"}static{this.properties={hasContent:[16,{},{state:!0}],tooltipText:[16,{},{state:!0}],alignment:[3,{},{reflect:!0}],appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],download:[3,{converter:v},{reflect:!0}],form:[3,{},{reflect:!0}],href:[3,{},{reflect:!0}],iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{type:String},{reflect:!0}],kind:[3,{},{reflect:!0}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],rel:[3,{},{reflect:!0}],round:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],splitChild:[3,{},{reflect:!0}],target:[3,{},{reflect:!0}],type:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=A}async setFocus(t){return this.focusSetter(()=>this.childEl,t)}connectedCallback(){super.connectedCallback(),this.setupTextContentObserver(),T(this),this.formEl=S(this)}async load(){this.updateHasContent()}updated(){z(this)}loaded(){this.setTooltipText()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),O(this),this.resizeObserver?.disconnect(),this.formEl=null}handleGlobalAttributesChanged(){this.requestUpdate()}updateHasContent(){this.hasContent=k(this.el)}setupTextContentObserver(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}onLabelClick(){this.handleClick(),this.setFocus()}handleClick(){let{type:t}=this;this.href||(t==="submit"?E(this):t==="reset"&&C(this))}setTooltipText(){let{contentRef:{value:t}}=this;t&&(this.tooltipText=t.offsetWidth<t.scrollWidth&&this.el.innerText||null)}setChildEl(t){f(this.resizeObserver,this.childEl,t),this.childEl=t}render(){let t=this.href?"a":"button",d=this.href?l`a`:l`button`,F=this.loading?o`<div class=${a(e.buttonLoader)}><calcite-loader class=${a(this.loading?e.loadingIn:e.loadingOut)} inline .label=${this.messages.loading} .scale=${this.scale==="l"?"m":"s"}></calcite-loader></div>`:null,u=!this.iconStart&&!this.iconEnd,L=o`<calcite-icon class=${a({[e.icon]:!0,[e.iconStart]:!0})} .flipRtl=${this.iconFlipRtl==="start"||this.iconFlipRtl==="both"} .icon=${this.iconStart} .scale=${i(this.scale)}></calcite-icon>`,I=o`<calcite-icon class=${a({[e.icon]:!0,[e.iconEnd]:!0})} .flipRtl=${this.iconFlipRtl==="end"||this.iconFlipRtl==="both"} .icon=${this.iconEnd} .scale=${i(this.scale)}></calcite-icon>`,j=o`<span class=${a(e.content)} ${r(this.contentRef)}><slot></slot></span>`;return $({disabled:this.disabled,children:w`<${d} .ariaBusy=${this.loading} .ariaExpanded=${this.el.ariaExpanded?this.el.ariaExpanded:null} .ariaLabel=${this.loading?this.messages.loading:R(this)} aria-live=polite class=${a({[e.buttonPadding]:u,[e.buttonPaddingShrunk]:!u,[e.contentSlotted]:this.hasContent,[e.iconStartEmpty]:!this.iconStart,[e.iconEndEmpty]:!this.iconEnd})} .disabled=${t==="button"?this.disabled:null} download=${(t==="a"?this.download===!0||this.download===""?"":this.download||null:null)??n} href=${(t==="a"&&this.href)??n} name=${(t==="button"&&this.name)??n} @click=${this.handleClick} rel=${(t==="a"&&this.rel)??n} tabindex=${(this.disabled?-1:null)??n} target=${(t==="a"&&this.target)??n} title=${this.tooltipText??n} type=${(t==="button"?this.type:null)??n} ${r(this.setChildEl)}>${F}${this.iconStart?L:null}${this.hasContent?j:null}${this.iconEnd?I:null}</${d}>`})}};g("calcite-button",s);export{s as Button};
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{c as T,d as O,e as R}from"./YR554YXQ.js";import{b as l,c as w}from"./DIWZOGSO.js";import{a as E,b as C,d as S}from"./LHYFZTCS.js";import{a as z,b as $}from"./ZOYJ4343.js";import{a as c,b as f}from"./AD2NNFBJ.js";import{a as y}from"./UVFQM6FI.js";import{a as x}from"./XGPCFFL2.js";import{b as m}from"./BC4ZMTFC.js";import{a as i}from"./DDSPVSLH.js";import"./W4XITGKA.js";import{s as k}from"./SBARVI35.js";import"./HWDBQK2D.js";import{B as p,C as r,D as h,E as a,I as v,P as g,g as b,h as o,l as n}from"./2ECRIOED.js";var e={buttonLoader:"calcite-button--loader",content:"content",contentSlotted:"content--slotted",icon:"icon",iconStart:"icon--start",iconEnd:"icon--end",loadingIn:"loading-in",loadingOut:"loading-out",iconStartEmpty:"icon-start-empty",iconEndEmpty:"icon-end-empty",buttonPadding:"button-padding",buttonPaddingShrunk:"button-padding--shrunk"},A=b`: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:inline-block;inline-size:auto;vertical-align:middle;border-radius:var(--calcite-button-corner-radius, var(--calcite-internal-button-corner-radius, 0))}:host a,:host button{--calcite-internal-button-content-margin: .5rem;--calcite-internal-button-padding-x: 7px;--calcite-internal-button-padding-y: 3px;position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;-webkit-user-select:none;user-select:none;appearance:none;align-items:center;justify-content:center;border-style:none;text-align:center;font-family:inherit;font-weight:var(--calcite-font-weight-normal);text-decoration-line:none;outline-color:transparent;box-shadow:var(--calcite-button-shadow, var(--calcite-shadow-none));background-color:var(--calcite-button-background-color, var(--calcite-internal-button-background-color, var(--calcite-color-transparent)));border-block-start-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-block-start-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-block-end-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-block-end-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-inline-start-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-inline-start-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-inline-end-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-inline-end-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-style:solid;border-width:var(--calcite-border-width-sm);border-radius:var(--calcite-button-corner-radius, var(--calcite-internal-button-corner-radius, 0));color:var(--calcite-button-text-color, var(--calcite-internal-button-text-color, currentColor));padding-block:var(--calcite-internal-button-padding-y);padding-inline:var(--calcite-internal-button-padding-x);transition:color var(--calcite-animation-timing) ease-in-out,background-color var(--calcite-animation-timing) ease-in-out,box-shadow var(--calcite-animation-timing) ease-in-out,outline-color var(--calcite-internal-animation-timing-fast) ease-in-out}:host a:hover,:host button:hover{text-decoration-line:none}:host a:focus,:host button: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))))}:host a span,:host button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host a calcite-loader,:host button calcite-loader{color:var(--calcite-button-loader-color, var(--calcite-internal-button-loader-color, var(--calcite-button-text-color, var(--calcite-internal-button-text-color))))}:host([round]){--calcite-internal-button-corner-radius: 50px}.content{margin-inline:var(--calcite-internal-button-content-margin)}.icon-start-empty .content{margin-inline-start:unset}.icon-end-empty .content{margin-inline-end:unset}:host([scale=m]) button,:host([scale=m]) a{--calcite-internal-button-content-margin: .75rem}:host([scale=l]) button,:host([scale=l]) a{--calcite-internal-button-content-margin: 1rem}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}:host([alignment=center]:not([width=auto])) a,:host([alignment=center]:not([width=auto])) button{justify-content:center}:host([alignment=start]:not([width=auto])) a,:host([alignment=start]:not([width=auto])) button{justify-content:flex-start}:host([alignment=end]:not([width=auto])) a,:host([alignment=end]:not([width=auto])) button{justify-content:flex-end}:host([alignment*=space-between]:not([width=auto])) a,:host([alignment*=space-between]:not([width=auto])) button{justify-content:space-between}:host([alignment=icon-start-space-between]:not([width=auto])) .icon--start{margin-inline-end:auto}:host([alignment=icon-start-space-between]:not([width=auto])) a,:host([alignment=icon-start-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=icon-end-space-between]:not([width=auto])) .icon--end{margin-inline-start:auto}:host([alignment=icon-end-space-between]:not([width=auto])) a,:host([alignment=icon-end-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=center]) a:not(.content--slotted) .icon--start+.icon--end,:host([alignment=center]) button:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:var(--calcite-internal-button-content-margin)}.icon--start,.icon--end{color:var(--calcite-button-icon-color, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}@keyframes loader-in{0%{inline-size:0;opacity:0;transform:scale(.5)}to{inline-size:1em;opacity:1;transform:scale(1)}}@keyframes loader-out{0%{inline-size:1em;opacity:1;transform:scale(1)}to{inline-size:0;opacity:0;transform:scale(.5)}}.calcite-button--loader{display:flex}.calcite-button--loader calcite-loader{margin:0}:host([loading]) button.content--slotted .calcite-button--loader calcite-loader,:host([loading]) a.content--slotted .calcite-button--loader calcite-loader{margin-inline-end:var(--calcite-internal-button-content-margin)}:host([loading]) button:not(.content--slotted) .icon--start,:host([loading]) button:not(.content--slotted) .icon--end,:host([loading]) a:not(.content--slotted) .icon--start,:host([loading]) a:not(.content--slotted) .icon--end{display:none}:host([appearance]) button,:host([appearance]) a{--calcite-internal-button-border-color: var(--calcite-color-transparent);border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([kind=brand]) button,:host([kind=brand]) a{--calcite-internal-button-text-color: var(--calcite-color-text-inverse);--calcite-internal-button-background-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-text-inverse)}:host([kind=brand]) button:hover,:host([kind=brand]) a:hover{--calcite-internal-button-background-color: var(--calcite-color-brand-hover)}:host([kind=brand]) button:active,:host([kind=brand]) a:active{--calcite-internal-button-background-color: var(--calcite-color-brand-press)}:host([kind=danger]) button,:host([kind=danger]) a{--calcite-internal-button-text-color: var(--calcite-color-text-inverse);--calcite-internal-button-background-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-text-inverse)}:host([kind=danger]) button:hover,:host([kind=danger]) a:hover{--calcite-internal-button-background-color: var(--calcite-color-status-danger-hover)}:host([kind=danger]) button:active,:host([kind=danger]) a:active{--calcite-internal-button-background-color: var(--calcite-color-status-danger-press)}:host([kind=neutral]) button,:host([kind=neutral]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-background-color: var(--calcite-color-foreground-3);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([kind=neutral]) button:hover,:host([kind=neutral]) a:hover{--calcite-internal-button-background-color: var(--calcite-color-foreground-2)}:host([kind=neutral]) button:active,:host([kind=neutral]) a:active{--calcite-internal-button-background-color: var(--calcite-color-foreground-1)}:host([kind=inverse]) button,:host([kind=inverse]) a{--calcite-internal-button-text-color: var(--calcite-color-text-inverse);--calcite-internal-button-background-color: var(--calcite-color-inverse);--calcite-internal-button-loader-color: var(--calcite-color-text-inverse)}:host([kind=inverse]) button:hover,:host([kind=inverse]) a:hover{--calcite-internal-button-background-color: var(--calcite-color-inverse-hover)}:host([kind=inverse]) button:active,:host([kind=inverse]) a:active{--calcite-internal-button-background-color: var(--calcite-color-inverse-press)}:host([appearance=outline-fill]) button,:host([appearance=outline-fill]) a{--calcite-internal-button-background-color: var(--calcite-color-foreground-1);border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([appearance=outline-fill]) button:hover,:host([appearance=outline-fill]) a:hover{--calcite-internal-button-background-color: var(--calcite-color-foreground-2)}:host([appearance=outline-fill]) button:active,:host([appearance=outline-fill]) a:active{--calcite-internal-button-background-color: var(--calcite-color-foreground-3)}:host([appearance=outline-fill][kind=brand]) button,:host([appearance=outline-fill][kind=brand]) a{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=brand]) button:hover,:host([appearance=outline-fill][kind=brand]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-brand-hover);--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=outline-fill][kind=brand]) button:focus,:host([appearance=outline-fill][kind=brand]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=brand]) button:active,:host([appearance=outline-fill][kind=brand]) a:active{--calcite-internal-button-border-color: var(--calcite-color-brand-press);--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=outline-fill][kind=brand]) button calcite-loader,:host([appearance=outline-fill][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=danger]) button,:host([appearance=outline-fill][kind=danger]) a{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=danger]) button:hover,:host([appearance=outline-fill][kind=danger]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-status-danger-hover);--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=outline-fill][kind=danger]) button:focus,:host([appearance=outline-fill][kind=danger]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=danger]) button:active,:host([appearance=outline-fill][kind=danger]) a:active{--calcite-internal-button-border-color: var(--calcite-color-status-danger-press);--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=outline-fill][kind=danger]) button calcite-loader,:host([appearance=outline-fill][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=neutral]) button,:host([appearance=outline-fill][kind=neutral]) a{--calcite-internal-button-border-color: var(--calcite-color-border-1);--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline-fill][kind=neutral]) button:hover,:host([appearance=outline-fill][kind=neutral]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-border-input)}:host([appearance=outline-fill][kind=neutral]) button:focus,:host([appearance=outline-fill][kind=neutral]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-foreground-3)}:host([appearance=outline-fill][kind=neutral]) button:active,:host([appearance=outline-fill][kind=neutral]) a:active{--calcite-internal-button-border-color: var(--calcite-color-text-3)}:host([appearance=solid][kind=neutral]) button:hover,:host([appearance=solid][kind=neutral]) a:hover{--calcite-internal-button-background-color: var(--calcite-color-border-2)}:host([appearance=solid][kind=neutral]) button:active,:host([appearance=solid][kind=neutral]) a:active{--calcite-internal-button-background-color: var(--calcite-color-border-1)}:host([appearance=outline-fill][kind=inverse]) button,:host([appearance=outline-fill][kind=inverse]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-border-color: var(--calcite-color-inverse);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline-fill][kind=inverse]) button:hover,:host([appearance=outline-fill][kind=inverse]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-inverse-hover)}:host([appearance=outline-fill][kind=inverse]) button:focus,:host([appearance=outline-fill][kind=inverse]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-inverse)}:host([appearance=outline-fill][kind=inverse]) button:active,:host([appearance=outline-fill][kind=inverse]) a:active{--calcite-internal-button-border-color: var(--calcite-color-inverse-press)}:host([appearance=outline]) button,:host([appearance=outline]) a{--calcite-internal-button-background-color: var(--calcite-color-transparent);border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([appearance=outline]) button:hover,:host([appearance=outline]) a:hover{--calcite-internal-button-background-color: var(--calcite-color-transparent-hover)}:host([appearance=outline]) button:active,:host([appearance=outline]) a:active{--calcite-internal-button-background-color: var(--calcite-color-transparent-press)}:host([appearance=outline][kind=brand]) button,:host([appearance=outline][kind=brand]) a{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline][kind=brand]) button:hover,:host([appearance=outline][kind=brand]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-brand-hover);--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=outline][kind=brand]) button:focus,:host([appearance=outline][kind=brand]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=outline][kind=brand]) button:active,:host([appearance=outline][kind=brand]) a:active{--calcite-internal-button-border-color: var(--calcite-color-brand-press);--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=outline][kind=brand]) button calcite-loader,:host([appearance=outline][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline][kind=danger]) button,:host([appearance=outline][kind=danger]) a{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=danger]) button:hover,:host([appearance=outline][kind=danger]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-status-danger-hover);--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=outline][kind=danger]) button:focus,:host([appearance=outline][kind=danger]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=danger]) button:active,:host([appearance=outline][kind=danger]) a:active{--calcite-internal-button-border-color: var(--calcite-color-status-danger-press);--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=outline][kind=danger]) button calcite-loader,:host([appearance=outline][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=neutral]) button,:host([appearance=outline][kind=neutral]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-border-color: var(--calcite-color-border-1);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline][kind=neutral]) button:hover,:host([appearance=outline][kind=neutral]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-border-input)}:host([appearance=outline][kind=neutral]) button:focus,:host([appearance=outline][kind=neutral]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-foreground-3)}:host([appearance=outline][kind=neutral]) button:active,:host([appearance=outline][kind=neutral]) a:active{--calcite-internal-button-border-color: var(--calcite-color-text-3)}:host([appearance=outline][kind=inverse]) button,:host([appearance=outline][kind=inverse]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-border-color: var(--calcite-color-inverse);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline][kind=inverse]) button:hover,:host([appearance=outline][kind=inverse]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-inverse-hover)}:host([appearance=outline][kind=inverse]) button:focus,:host([appearance=outline][kind=inverse]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-inverse)}:host([appearance=outline][kind=inverse]) button:active,:host([appearance=outline][kind=inverse]) a:active{--calcite-internal-button-border-color: var(--calcite-color-inverse-press)}:host([appearance=outline-fill][split-child=primary]) button,:host([appearance=outline][split-child=primary]) button,:host([appearance=outline-fill][split-child=primary]) a,:host([appearance=outline][split-child=primary]) a{border-inline-end-width:0;border-inline-start-width:1px}:host([appearance=outline-fill][split-child=secondary]) button,:host([appearance=outline][split-child=secondary]) button,:host([appearance=outline-fill][split-child=secondary]) a,:host([appearance=outline][split-child=secondary]) a{border-inline-start-width:0;border-inline-end-width:1px}:host([appearance=transparent]) button,:host([appearance=transparent]) a{--calcite-internal-button-background-color: var(--calcite-color-transparent)}:host([appearance=transparent]) button:hover,:host([appearance=transparent]) button:focus,:host([appearance=transparent]) a:hover,:host([appearance=transparent]) a:focus{--calcite-internal-button-background-color: var(--calcite-color-transparent-hover)}:host([appearance=transparent]) button:active,:host([appearance=transparent]) a:active{--calcite-internal-button-background-color: var(--calcite-color-transparent-press)}:host([appearance=transparent]:not(.enable-editing-button)) button,:host([appearance=transparent]:not(.enable-editing-button)) a{background-color:var(--calcite-color-transparent)}:host([appearance=transparent]:not(.enable-editing-button)) button:hover,:host([appearance=transparent]:not(.enable-editing-button)) a:hover{background-color:var(--calcite-color-transparent-hover)}:host([appearance=transparent]:not(.enable-editing-button)) button:active,:host([appearance=transparent]:not(.enable-editing-button)) a:active{background-color:var(--calcite-color-transparent-press)}:host([appearance=transparent][kind=brand]) button,:host([appearance=transparent][kind=brand]) a{--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=brand]) button:hover,:host([appearance=transparent][kind=brand]) a:hover{--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=transparent][kind=brand]) button:focus,:host([appearance=transparent][kind=brand]) a:focus{--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=brand]) button:active,:host([appearance=transparent][kind=brand]) a:active{--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=transparent][kind=brand]) button calcite-loader,:host([appearance=transparent][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=danger]) button,:host([appearance=transparent][kind=danger]) a{--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=danger]) button:hover,:host([appearance=transparent][kind=danger]) a:hover{--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=transparent][kind=danger]) button:focus,:host([appearance=transparent][kind=danger]) a:focus{--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=danger]) button:active,:host([appearance=transparent][kind=danger]) a:active{--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=transparent][kind=danger]) button calcite-loader,:host([appearance=transparent][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) button,:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) a,:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) calcite-loader{--calcite-internal-button-text-color: var(--calcite-color-text-1)}:host([appearance=transparent][kind=neutral].cancel-editing-button) button{--calcite-internal-button-text-color: var(--calcite-color-text-3)}:host([appearance=transparent][kind=neutral].cancel-editing-button) button:hover{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-padding-y: 0}:host(.confirm-changes-button) button:focus,:host(.cancel-editing-button) button:focus,:host(.enable-editing-button) button:focus{outline-offset:-2px}:host([appearance=transparent][kind=inverse]) button:hover,:host([appearance=transparent][kind=inverse]) a:hover{background-color:var(--calcite-color-transparent-inverse-hover)}:host([appearance=transparent][kind=inverse]) button:active,:host([appearance=transparent][kind=inverse]) a:active{background-color:var(--calcite-color-transparent-inverse-press)}:host([appearance=transparent][kind=inverse]) button calcite-loader,:host([appearance=transparent][kind=inverse]) a calcite-loader{--calcite-internal-button-text-color: var(--calcite-color-text-inverse)}:host([scale=s]) button.content--slotted,:host([scale=s]) a.content--slotted{font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s][appearance=transparent]) button.content--slotted,:host([scale=s][appearance=transparent]) a.content--slotted{--calcite-internal-button-padding-x: .5rem}:host([scale=s]) button,:host([scale=s]) a{--calcite-internal-button-padding-y: 3px}:host([scale=m]) button.content--slotted,:host([scale=m]) a.content--slotted{--calcite-internal-button-padding-x: 11px;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) button,:host([scale=m]) a{--calcite-internal-button-padding-y: 7px}:host([scale=m][appearance=transparent]) button.content--slotted,:host([scale=m][appearance=transparent]) a.content--slotted{--calcite-internal-button-padding-x: .75rem}:host([scale=l]) button.content--slotted,:host([scale=l]) a.content--slotted{--calcite-internal-button-padding-x: 15px;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .button-padding{--calcite-internal-button-padding-x: 1rem;--calcite-internal-button-padding-y: 11px}:host([scale=l]) .button-padding--shrunk{--calcite-internal-button-padding-y: 9px}:host([scale=s]) button:not(.content--slotted),:host([scale=s]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y: 3px;inline-size:1.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:1.5rem}:host([scale=m]) button:not(.content--slotted),:host([scale=m]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y: 7px;inline-size:2rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:2rem}:host([scale=l]) button:not(.content--slotted),:host([scale=l]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y: 9px;inline-size:2.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:2.75rem}:host(:is([scale=s],[scale=m],[scale=l])[width=full]) a:not(.content--slotted),:host(:is([scale=s],[scale=m],[scale=l])[width=full]) button:not(.content--slotted){inline-size:var(--calcite-container-size-content-fluid)}:host([scale=l][appearance=transparent]) button:not(.content--slotted),:host([scale=l][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-y: .625rem}:host([scale=s][icon-start][icon-end]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 23px;block-size:1.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=s][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 1.5rem}:host([scale=m][icon-start][icon-end]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 2rem;block-size:2rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=m][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 33px}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 43px;block-size:2.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted) .icon--start+.icon--end,:host([scale=l][icon-start][icon-end]) a:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:1rem}:host([scale=l][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 2.75rem}:host([hidden]){display:none}[hidden]{display:none}`,s=class extends h{constructor(){super(...arguments),this.attributeWatch=m(["aria-expanded"],this.handleGlobalAttributesChanged),this.contentRef=p(),this.mutationObserver=c("mutation",()=>this.updateHasContent()),this.resizeObserver=c("resize",()=>this.setTooltipText()),this.focusSetter=x()(this),this.messages=y(),this.hasContent=!1,this.alignment="center",this.appearance="solid",this.disabled=!1,this.download=!1,this.kind="brand",this.loading=!1,this.round=!1,this.scale="m",this.splitChild=!1,this.type="button",this.width="auto"}static{this.properties={hasContent:[16,{},{state:!0}],tooltipText:[16,{},{state:!0}],alignment:[3,{},{reflect:!0}],appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],download:[3,{converter:v},{reflect:!0}],form:[3,{},{reflect:!0}],href:[3,{},{reflect:!0}],iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{type:String},{reflect:!0}],kind:[3,{},{reflect:!0}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],rel:[3,{},{reflect:!0}],round:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],splitChild:[3,{},{reflect:!0}],target:[3,{},{reflect:!0}],type:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=A}async setFocus(t){return this.focusSetter(()=>this.childEl,t)}connectedCallback(){super.connectedCallback(),this.setupTextContentObserver(),T(this),this.formEl=S(this)}async load(){this.updateHasContent()}updated(){z(this)}loaded(){this.setTooltipText()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),O(this),this.resizeObserver?.disconnect(),this.formEl=null}handleGlobalAttributesChanged(){this.requestUpdate()}updateHasContent(){this.hasContent=k(this.el)}setupTextContentObserver(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}onLabelClick(){this.handleClick(),this.setFocus()}handleClick(){let{type:t}=this;this.href||(t==="submit"?E(this):t==="reset"&&C(this))}setTooltipText(){let{contentRef:{value:t}}=this;t&&(this.tooltipText=t.offsetWidth<t.scrollWidth&&this.el.innerText||null)}setChildEl(t){f(this.resizeObserver,this.childEl,t),this.childEl=t}render(){let t=this.href?"a":"button",d=this.href?l`a`:l`button`,F=this.loading?o`<div class=${a(e.buttonLoader)}><calcite-loader class=${a(this.loading?e.loadingIn:e.loadingOut)} inline .label=${this.messages.loading} .scale=${this.scale==="l"?"m":"s"}></calcite-loader></div>`:null,u=!this.iconStart&&!this.iconEnd,L=o`<calcite-icon class=${a({[e.icon]:!0,[e.iconStart]:!0})} .flipRtl=${this.iconFlipRtl==="start"||this.iconFlipRtl==="both"} .icon=${this.iconStart} .scale=${i(this.scale)}></calcite-icon>`,I=o`<calcite-icon class=${a({[e.icon]:!0,[e.iconEnd]:!0})} .flipRtl=${this.iconFlipRtl==="end"||this.iconFlipRtl==="both"} .icon=${this.iconEnd} .scale=${i(this.scale)}></calcite-icon>`,j=o`<span class=${a(e.content)} ${r(this.contentRef)}><slot></slot></span>`;return $({disabled:this.disabled,children:w`<${d} .ariaBusy=${this.loading} .ariaExpanded=${this.el.ariaExpanded?this.el.ariaExpanded:null} .ariaLabel=${this.loading?this.messages.loading:R(this)} aria-live=polite class=${a({[e.buttonPadding]:u,[e.buttonPaddingShrunk]:!u,[e.contentSlotted]:this.hasContent,[e.iconStartEmpty]:!this.iconStart,[e.iconEndEmpty]:!this.iconEnd})} .disabled=${t==="button"?this.disabled:null} download=${(t==="a"?this.download===!0||this.download===""?"":this.download||null:null)??n} href=${(t==="a"&&this.href)??n} name=${(t==="button"&&this.name)??n} @click=${this.handleClick} rel=${(t==="a"&&this.rel)??n} tabindex=${(this.disabled?-1:null)??n} target=${(t==="a"&&this.target)??n} title=${this.tooltipText??n} type=${(t==="button"?this.type:null)??n} ${r(this.setChildEl)}>${F}${this.iconStart?L:null}${this.hasContent?j:null}${this.iconEnd?I:null}</${d}>`})}};g("calcite-button",s);export{s as Button};
|
|
@@ -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 g,d as b}from"./
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{c as g,d as b}from"./DQ3HNJFH.js";import{a as u}from"./AD2NNFBJ.js";import"./ALBSZ4AH.js";import{a as f}from"./UVFQM6FI.js";import"./ENP5M2UC.js";import{a as m}from"./XGPCFFL2.js";import"./BC4ZMTFC.js";import"./DDSPVSLH.js";import{a as x}from"./W4XITGKA.js";import{u as h}from"./SBARVI35.js";import"./HWDBQK2D.js";import{D as d,E as s,P as p,g as r,h as i,o as a}from"./2ECRIOED.js";var y={actionGroupEnd:"action-group--end",container:"container"},G={expandTooltip:"expand-tooltip"},C=r`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host{display:block}@keyframes in{0%{opacity:0}to{opacity:1}}:host{animation:in var(--calcite-internal-animation-timing-slow) ease-in-out;border-radius:var(--calcite-action-pad-corner-radius, .125rem);background:transparent}:host([expanded][layout=vertical]) .container{max-inline-size:var(--calcite-action-pad-expanded-max-width, auto)}:host([layout=vertical]) ::slotted(calcite-action-group:not(:last-of-type)){border-block-end-width:1px}.container{display:inline-flex;flex-direction:column;overflow:hidden;--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);gap:var(--calcite-action-pad-items-space, 0);border-radius:calc(var(--calcite-action-pad-corner-radius, .125rem) * 2);background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-1))}.action-group--bottom{flex-grow:1;justify-content:flex-end;padding-block-end:0px}:host([layout=horizontal]) .container{flex-direction:row}:host([layout=horizontal]) .container .action-group--bottom{padding:0}:host([layout=horizontal]) .container ::slotted(calcite-action-group:not(:last-of-type)){border-inline-end-width:1px}:host([hidden]){display:none}[hidden]{display:none}`,n=class extends d{constructor(){super(),this.actions=[],this.mutationObserver=u("mutation",()=>this.mutationObserverHandler()),this.toggleExpand=()=>{this.expanded=!this.expanded,this.calciteActionPadToggle.emit()},this.messages=f(),this.focusSetter=m()(this),this.expandDisabled=!1,this.expanded=!1,this.layout="vertical",this.overlayPositioning="absolute",this.scale="m",this.selectionAppearance="neutral",this.calciteActionPadCollapse=a({cancelable:!1}),this.calciteActionPadExpand=a({cancelable:!1}),this.calciteActionPadToggle=a({cancelable:!1}),this.listen("calciteActionMenuOpen",this.actionMenuOpenHandler)}static{this.properties={expandTooltip:[16,{},{state:!0}],actionsEndGroupLabel:1,expandDisabled:[7,{},{reflect:!0,type:Boolean}],expanded:[7,{},{reflect:!0,type:Boolean}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],position:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=C}async setFocus(t){return this.focusSetter(()=>this.el,t)}connectedCallback(){super.connectedCallback(),this.updateActions(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}async load(){x.deprecated("component",{name:"action-pad",removalVersion:4,suggested:"action-bar"})}willUpdate(t){t.has("expanded")&&this.hasUpdated&&g({el:this.el,expanded:this.expanded}),t.has("layout")&&(this.hasUpdated||this.layout!=="vertical")&&this.updateGroups(),t.has("expanded")&&this.hasUpdated&&(this.expanded?this.calciteActionPadExpand.emit():this.calciteActionPadCollapse.emit()),t.has("selectionAppearance")&&(this.hasUpdated||this.selectionAppearance!=="neutral")&&this.updateActions()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}actionMenuOpenHandler(t){if(t.target.menuOpen){let o=t.composedPath();this.actionGroups?.forEach(e=>{o.includes(e)||(e.menuOpen=!1)})}}updateGroups(){let t=Array.from(this.el.querySelectorAll("calcite-action-group"));this.actionGroups=t,this.setGroupLayout(t)}setGroupLayout(t){t.forEach(o=>o.layout=this.layout)}handleDefaultSlotChange(){this.updateGroups(),this.queryAndStoreActions(),this.updateActions()}handleTooltipSlotChange(t){let o=h(t).filter(e=>e?.matches("calcite-tooltip"));this.expandTooltip=o[0]}updateActions(){this.actions.forEach(t=>{t.selectionAppearance=this.selectionAppearance})}queryAndStoreActions(){this.actions=Array.from(this.el.querySelectorAll("calcite-action"))}mutationObserverHandler(){this.updateGroups(),this.queryAndStoreActions(),this.updateActions()}renderBottomActionGroup(){let{expanded:t,expandDisabled:o,messages:e,el:v,position:A,toggleExpand:w,scale:l,layout:E,actionsEndGroupLabel:S,overlayPositioning:T}=this,c=o?null:b({collapseLabel:e.collapseLabel,collapseText:e.collapse,el:v,expandLabel:e.expandLabel,expandText:e.expand,expanded:t,position:A,scale:l,toggle:w,tooltip:this.expandTooltip});return c?i`<calcite-action-group class=${s(y.actionGroupEnd)} .label=${S} .layout=${E} .overlayPositioning=${T} .scale=${l}><slot name=${G.expandTooltip} @slotchange=${this.handleTooltipSlotChange}></slot>${c}</calcite-action-group>`:null}render(){return i`<div class=${s(y.container)}><slot @slotchange=${this.handleDefaultSlotChange}></slot>${this.renderBottomActionGroup()}</div>`}};p("calcite-action-pad",n);export{n as ActionPad};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{j as L,k as C,z as h}from"./
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{j as L,k as C,z as h}from"./SBARVI35.js";var k="calciteInternalLabelClick",E="calciteInternalLabelConnected",f="calciteInternalLabelDisconnected",v="calcite-label",r=new WeakMap,i=new WeakMap,c=new WeakMap,d=new WeakMap,s=new Set,y=e=>{let{id:t}=e,l=t&&L(e,{selector:`${v}[for="${t}"]`});if(l)return l;let a=C(e,v);return!a||M(a,e)?null:a};function M(e,t){let l,a="custom-element-ancestor-check",b=n=>{n.stopImmediatePropagation();let u=n.composedPath();l=u.slice(u.indexOf(t),u.indexOf(e))};return e.addEventListener(a,b,{once:!0}),t.dispatchEvent(new CustomEvent(a,{composed:!0,bubbles:!0})),e.removeEventListener(a,b),l.filter(n=>n!==t&&n!==e).filter(n=>n.tagName?.includes("-")).length>0}function m(e){if(!e)return;let t=y(e.el);if(i.has(t)&&t===e.labelEl||!t&&s.has(e))return;let l=O.bind(e);if(t){e.labelEl=t;let a=r.get(t)||[];a.push(e),r.set(t,a.sort(w)),i.has(e.labelEl)||(i.set(e.labelEl,g),e.labelEl.addEventListener(k,g)),s.delete(e),document.removeEventListener(E,c.get(e)),d.set(e,l),document.addEventListener(f,l)}else s.has(e)||(l(),document.removeEventListener(f,d.get(e)))}function T(e){if(!e||(s.delete(e),document.removeEventListener(E,c.get(e)),document.removeEventListener(f,d.get(e)),c.delete(e),d.delete(e),!e.labelEl))return;let t=r.get(e.labelEl);t.length===1&&(e.labelEl.removeEventListener(k,i.get(e.labelEl)),i.delete(e.labelEl)),r.set(e.labelEl,t.filter(l=>l!==e).sort(w)),e.labelEl=null}function w(e,t){return h(e.el,t.el)?-1:1}function I(e){return e.label||e.labelEl?.textContent?.trim()||""}function g(e){let t=e.detail.sourceEvent.target,l=r.get(this),a=l.find(n=>n.el===t);if(l.includes(a))return;let o=l[0];o.disabled||o.onLabelClick(e)}function D(){s.has(this)&&m(this)}function O(){s.add(this);let e=c.get(this)||D.bind(this);c.set(this,e),document.addEventListener(E,e)}async function B(e){if(await e.componentOnReady(),r.has(e))return;let l=e.ownerDocument?.getElementById(e.for);l&&requestAnimationFrame(()=>{for(let a of s)if(a.el===l){m(a);break}})}export{E as a,f as b,m as c,T as d,I as e,B as f};
|
|
@@ -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 z,b as k}from"./KLLDUBU7.js";import{a as u,b as n,c as o,h as r,j as g,k as d,m as f,n as h,p as D}from"./MYWUD5PR.js";import{k as b,l as C}from"./ZOBQ5UTK.js";import"./OFO7DXMT.js";import{a as E}from"./CFWXX2ZT.js";import{a as R}from"./SXK4ATVN.js";import"./6PMY6MUE.js";import"./PCGNN5RO.js";import"./H3GTITDX.js";import"./7DQ4G2FS.js";import"./44XNJNTA.js";import{D as y,E as x,P as S,g as p,h as v,o as m}from"./2IIGKMQ6.js";var M=2,P={dateStyle:"full"},w={container:"container"},F=p`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host{display:inline-block;inline-size:100%;overflow:visible;border-width:1px;border-style:solid;vertical-align:top;border-color:var(--calcite-date-picker-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-date-picker-corner-radius, 0)}:host([scale=s]){inline-size:236px;min-inline-size:216px;max-inline-size:380px}:host([scale=s][range][layout=horizontal][calendars="2"]){inline-size:480px;min-inline-size:432px;max-inline-size:772px}:host([scale=m]){inline-size:298px;min-inline-size:272px;max-inline-size:480px}:host([scale=m][layout=horizontal][range][calendars="2"]){inline-size:608px;min-inline-size:544px;max-inline-size:972px}:host([scale=l]){inline-size:334px;min-inline-size:320px;max-inline-size:600px}:host([scale=l][layout=horizontal][range][calendars="2"]){inline-size:684px;min-inline-size:640px;max-inline-size:1212px}.container{outline:2px solid transparent;outline-offset:2px}:host([hidden]){display:none}[hidden]{display:none}`,A=class extends y{constructor(){super(),this.rangeValueChangedByUser=!1,this.messages=E({blocking:!0}),this.focusSetter=R()(this),this.calendars=2,this.layout="horizontal",this.monthStyle="wide",this.proximitySelectionDisabled=!1,this.range=!1,this.scale="m",this.calciteDatePickerChange=m({cancelable:!1}),this.calciteDatePickerRangeChange=m({cancelable:!1}),this.listen("keydown",this.keyDownHandler)}static{this.properties={activeEndDate:[16,{},{state:!0}],activeStartDate:[16,{},{state:!0}],dateTimeFormat:[16,{},{state:!0}],endAsDate:[16,{},{state:!0}],hoverRange:[16,{},{state:!0}],localeData:[16,{},{state:!0}],startAsDate:[16,{},{state:!0}],activeDate:[0,{},{attribute:!1}],activeRange:[3,{},{reflect:!0}],calendars:[11,{},{type:Number,reflect:!0}],headingLevel:[11,{},{type:Number,reflect:!0}],layout:[3,{},{reflect:!0}],max:[3,{},{reflect:!0}],maxAsDate:[0,{},{attribute:!1}],messageOverrides:[0,{},{attribute:!1}],min:[3,{},{reflect:!0}],minAsDate:[0,{},{attribute:!1}],monthStyle:1,numberingSystem:[3,{},{reflect:!0}],proximitySelectionDisabled:[7,{},{reflect:!0,type:Boolean}],range:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],value:1,valueAsDate:[0,{},{attribute:!1}]}}static{this.styles=F}async reset(){this.resetActiveDates(),this.rangeValueChangedByUser=!1}async setFocus(t){return this.focusSetter(()=>this.el,t)}async load(){await this.loadLocaleData()}willUpdate(t){t.has("value")&&this.valueHandler(this.value),t.has("valueAsDate")&&this.valueAsDateWatcher(this.valueAsDate);let e,a;t.has("min")&&!t.has("minAsDate")?e="min":t.has("minAsDate")&&!t.has("min")&&(e="minAsDate"),t.has("max")&&!t.has("maxAsDate")?a="max":t.has("maxAsDate")&&!t.has("max")&&(a="maxAsDate"),e==="min"?this.minAsDate=o(this.min):e==="minAsDate"&&(this.minAsDate=o(r(this.minAsDate))),a==="max"?this.maxAsDate=o(this.max):a==="maxAsDate"&&(this.maxAsDate=o(r(this.maxAsDate))),(t.has("range")&&this.range||t.has("maxAsDate")||t.has("minAsDate"))&&this.setActiveStartAndEndDates(),t.has("activeDate")&&this.activeDateWatcher(this.activeDate),t.has("messages")&&this.hasUpdated&&this.loadLocaleData().catch(console.error)}activeDateWatcher(t){this.range&&(this.rangeValueChangedByUser||(t?(this.activeStartDate=t,this.activeEndDate=h(this.activeStartDate)):this.resetActiveDates()))}valueHandler(t){Array.isArray(t)?(this.valueAsDate=k(t),this.rangeValueChangedByUser||this.resetActiveDates()):t&&(this.valueAsDate=o(t))}valueAsDateWatcher(t){this.range&&Array.isArray(t)&&!this.rangeValueChangedByUser?this.setActiveStartAndEndDates():t&&t!==this.activeDate&&(this.activeDate=t)}keyDownHandler(t){t.key==="Escape"&&this.resetActiveDates()}async loadLocaleData(){b.numberFormatOptions={numberingSystem:this.numberingSystem,locale:this.messages._lang,useGrouping:!1},this.localeData=await z(this.messages._lang),this.dateTimeFormat=C(this.messages._lang,P)}monthHeaderSelectChange(t){let e=new Date(t.detail.date),a=t.detail.position;this.range?a==="end"?(this.activeEndDate=e,this.activeStartDate=d(e)):(this.activeStartDate=e,this.activeEndDate=h(e)):this.activeDate=e,t.stopPropagation()}monthActiveDateChange(t){let e=new Date(t.detail);if(!this.range)this.activeDate=e;else{let a=e.getMonth(),i=a!==this.activeStartDate.getMonth()&&(this.calendars===1||a!==h(this.activeStartDate).getMonth());this.activeRange==="end"?(!this.activeEndDate||this.activeStartDate&&i)&&(this.activeEndDate=e,this.activeStartDate=d(e)):(this.activeStartDate&&i||!this.activeStartDate)&&(this.activeStartDate=e,this.activeEndDate=h(e))}t.stopPropagation()}monthHoverChange(t){if(!this.range){this.hoverRange=void 0;return}let{valueAsDate:e}=this,a=Array.isArray(e)&&e[0],i=Array.isArray(e)&&e[1],s=new Date(t.detail);if(this.hoverRange={focused:this.activeRange||"start",start:a,end:i},this.proximitySelectionDisabled)i&&a||!i&&s>=a?(this.hoverRange.focused="end",this.hoverRange.end=s):!i&&s<a?this.hoverRange={focused:"start",start:s,end:a}:this.hoverRange=void 0;else if(this.activeRange)this.activeRange==="end"?(this.hoverRange.end=s,this.hoverRange.focused="end"):(this.hoverRange.start=s,this.hoverRange.focused="start");else if(a&&i){let l=Math.abs(D(s,a)),c=Math.abs(D(s,i));s>i?(this.hoverRange.end=s,this.hoverRange.focused="end"):s<a?(this.hoverRange.start=s,this.hoverRange.focused="start"):s>a&&s<i&&(l<c?(this.hoverRange.start=s,this.hoverRange.focused="start"):(this.hoverRange.end=s,this.hoverRange.focused="end"))}else a&&(s<a?this.hoverRange={focused:"start",start:s,end:a}:(this.hoverRange.end=s,this.hoverRange.focused="end"));t.stopPropagation()}monthMouseOutChange(t){this.hoverRange&&(this.hoverRange=void 0),t.stopPropagation()}resetActiveDates(){let{valueAsDate:t}=this;!Array.isArray(t)&&t&&t!==this.activeDate&&(this.activeDate=new Date(t)),Array.isArray(t)&&(t[0]&&t[0]!==this.activeStartDate&&(this.activeStartDate=new Date(t[0])),t[1]&&t[1]!==this.activeEndDate&&(this.activeEndDate=new Date(t[1]))),this.hoverRange=void 0}getEndDate(){return Array.isArray(this.valueAsDate)&&this.valueAsDate[1]||void 0}setEndDate(t,e=!0){let a=this.getStartDate();this.rangeValueChangedByUser=!0,this.value=[r(a),r(t)],this.valueAsDate=[a,t],e&&this.calciteDatePickerRangeChange.emit()}getStartDate(){return Array.isArray(this.valueAsDate)&&this.valueAsDate[0]}setStartDate(t,e=!0){let a=this.getEndDate();this.rangeValueChangedByUser=!0,this.value=[r(t),r(a)],this.valueAsDate=[t,a],e&&this.calciteDatePickerRangeChange.emit()}monthDateChange(t){let e=new Date(t.detail),a=r(e);if(!this.range&&a===r(this.valueAsDate))return;if(!this.range){this.value=a||"",this.valueAsDate=e||null,this.activeDate=e||null,this.calciteDatePickerChange.emit();return}let i=this.getStartDate(),s=this.getEndDate();if(!i||!s&&e<i)i&&this.setEndDate(new Date(i)),this.activeRange=="end"?this.setEndDate(e):this.setStartDate(e);else if(!s)this.setEndDate(e);else if(this.proximitySelectionDisabled)this.setStartDate(e,!1),this.setEndDate(null,!1),this.calciteDatePickerRangeChange.emit();else if(this.activeRange)this.activeRange=="end"?this.setEndDate(e):(e>s&&(this.setEndDate(null,!1),this.activeEndDate=null),this.setStartDate(e));else{let l=D(e,i),c=D(e,s);c===0||l<0?this.setStartDate(e):l===0||c<0?this.setEndDate(e):l<c?this.setStartDate(e):this.setEndDate(e)}t.stopPropagation(),this.calciteDatePickerChange.emit()}getActiveDate(t,e,a){let i=n(new Date,e,a);return n(this.activeDate,e,a)||t||(g(a,i)&&!this.range?f(i,e,a):i)}getActiveEndDate(t,e,a){return n(this.activeEndDate,e,a)||t||n(h(new Date),e,a)}setActiveStartAndEndDates(){if(this.range){let t=n(Array.isArray(this.valueAsDate)?this.valueAsDate[0]:this.valueAsDate,this.minAsDate,this.maxAsDate),e=n(Array.isArray(this.valueAsDate)?this.valueAsDate[1]:null,this.minAsDate,this.maxAsDate);if(this.activeStartDate=this.getActiveDate(t,this.minAsDate,this.maxAsDate),this.activeEndDate=this.getActiveEndDate(e,this.minAsDate,this.maxAsDate),g(this.activeStartDate,this.activeEndDate)){let a=f(d(this.activeEndDate),this.minAsDate,this.maxAsDate),i=h(this.activeEndDate);u(a,this.minAsDate,this.maxAsDate)?this.activeStartDate=a:u(i,this.minAsDate,this.maxAsDate)&&(this.activeEndDate=i)}}}render(){let t=n(this.range&&Array.isArray(this.valueAsDate)?this.valueAsDate[0]:this.valueAsDate,this.minAsDate,this.maxAsDate),e=this.getActiveDate(t,this.minAsDate,this.maxAsDate),a=this.range&&Array.isArray(this.valueAsDate)?n(this.valueAsDate[1],this.minAsDate,this.maxAsDate):null,i=this.range&&this.activeRange?this.activeRange==="start"?this.minAsDate:t:this.minAsDate,s=this.range?this.activeStartDate:e;return v`<div aria-hidden class=${x(w.container)} tabindex=-1>${this.renderMonth(s,this.maxAsDate,i,t,a)}</div>`}renderMonth(t,e,a,i,s){return v`<calcite-date-picker-month .activeDate=${t} .calendars=${this.calendars} .dateTimeFormat=${this.dateTimeFormat} .endDate=${this.range?s:void 0} .headingLevel=${this.headingLevel||M} .hoverRange=${this.hoverRange} .layout=${this.layout} .localeData=${this.localeData} .max=${e} .messages=${this.messages} .min=${a} .monthStyle=${this.monthStyle} @calciteInternalDatePickerDayHover=${this.monthHoverChange} @calciteInternalDatePickerDaySelect=${this.monthDateChange} @calciteInternalDatePickerMonthActiveDateChange=${this.monthActiveDateChange} @calciteInternalDatePickerMonthChange=${this.monthHeaderSelectChange} @calciteInternalDatePickerMonthMouseOut=${this.monthMouseOutChange} .range=${this.range} .scale=${this.scale} .selectedDate=${this.activeRange==="end"?s:i} .startDate=${this.range?i:void 0}></calcite-date-picker-month>`}};S("calcite-date-picker",A);export{A as DatePicker};
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{a as z,b as k}from"./UTWEOJW6.js";import{a as u,b as n,c as o,h as r,j as g,k as d,m as f,n as h,p as D}from"./7TMYLJNL.js";import{k as b,l as C}from"./FZSVZEO4.js";import"./JVPR6YZA.js";import{a as E}from"./UVFQM6FI.js";import{a as R}from"./XGPCFFL2.js";import"./BC4ZMTFC.js";import"./DDSPVSLH.js";import"./W4XITGKA.js";import"./SBARVI35.js";import"./HWDBQK2D.js";import{D as y,E as x,P as S,g as p,h as v,o as m}from"./2ECRIOED.js";var M=2,P={dateStyle:"full"},w={container:"container"},F=p`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host{display:inline-block;inline-size:100%;overflow:visible;border-width:1px;border-style:solid;vertical-align:top;border-color:var(--calcite-date-picker-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-date-picker-corner-radius, 0)}:host([scale=s]){inline-size:236px;min-inline-size:216px;max-inline-size:380px}:host([scale=s][range][layout=horizontal][calendars="2"]){inline-size:480px;min-inline-size:432px;max-inline-size:772px}:host([scale=m]){inline-size:298px;min-inline-size:272px;max-inline-size:480px}:host([scale=m][layout=horizontal][range][calendars="2"]){inline-size:608px;min-inline-size:544px;max-inline-size:972px}:host([scale=l]){inline-size:334px;min-inline-size:320px;max-inline-size:600px}:host([scale=l][layout=horizontal][range][calendars="2"]){inline-size:684px;min-inline-size:640px;max-inline-size:1212px}.container{outline:2px solid transparent;outline-offset:2px}:host([hidden]){display:none}[hidden]{display:none}`,A=class extends y{constructor(){super(),this.rangeValueChangedByUser=!1,this.messages=E({blocking:!0}),this.focusSetter=R()(this),this.calendars=2,this.layout="horizontal",this.monthStyle="wide",this.proximitySelectionDisabled=!1,this.range=!1,this.scale="m",this.calciteDatePickerChange=m({cancelable:!1}),this.calciteDatePickerRangeChange=m({cancelable:!1}),this.listen("keydown",this.keyDownHandler)}static{this.properties={activeEndDate:[16,{},{state:!0}],activeStartDate:[16,{},{state:!0}],dateTimeFormat:[16,{},{state:!0}],endAsDate:[16,{},{state:!0}],hoverRange:[16,{},{state:!0}],localeData:[16,{},{state:!0}],startAsDate:[16,{},{state:!0}],activeDate:[0,{},{attribute:!1}],activeRange:[3,{},{reflect:!0}],calendars:[11,{},{type:Number,reflect:!0}],headingLevel:[11,{},{type:Number,reflect:!0}],layout:[3,{},{reflect:!0}],max:[3,{},{reflect:!0}],maxAsDate:[0,{},{attribute:!1}],messageOverrides:[0,{},{attribute:!1}],min:[3,{},{reflect:!0}],minAsDate:[0,{},{attribute:!1}],monthStyle:1,numberingSystem:[3,{},{reflect:!0}],proximitySelectionDisabled:[7,{},{reflect:!0,type:Boolean}],range:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],value:1,valueAsDate:[0,{},{attribute:!1}]}}static{this.styles=F}async reset(){this.resetActiveDates(),this.rangeValueChangedByUser=!1}async setFocus(t){return this.focusSetter(()=>this.el,t)}async load(){await this.loadLocaleData()}willUpdate(t){t.has("value")&&this.valueHandler(this.value),t.has("valueAsDate")&&this.valueAsDateWatcher(this.valueAsDate);let e,a;t.has("min")&&!t.has("minAsDate")?e="min":t.has("minAsDate")&&!t.has("min")&&(e="minAsDate"),t.has("max")&&!t.has("maxAsDate")?a="max":t.has("maxAsDate")&&!t.has("max")&&(a="maxAsDate"),e==="min"?this.minAsDate=o(this.min):e==="minAsDate"&&(this.minAsDate=o(r(this.minAsDate))),a==="max"?this.maxAsDate=o(this.max):a==="maxAsDate"&&(this.maxAsDate=o(r(this.maxAsDate))),(t.has("range")&&this.range||t.has("maxAsDate")||t.has("minAsDate"))&&this.setActiveStartAndEndDates(),t.has("activeDate")&&this.activeDateWatcher(this.activeDate),t.has("messages")&&this.hasUpdated&&this.loadLocaleData().catch(console.error)}activeDateWatcher(t){this.range&&(this.rangeValueChangedByUser||(t?(this.activeStartDate=t,this.activeEndDate=h(this.activeStartDate)):this.resetActiveDates()))}valueHandler(t){Array.isArray(t)?(this.valueAsDate=k(t),this.rangeValueChangedByUser||this.resetActiveDates()):t&&(this.valueAsDate=o(t))}valueAsDateWatcher(t){this.range&&Array.isArray(t)&&!this.rangeValueChangedByUser?this.setActiveStartAndEndDates():t&&t!==this.activeDate&&(this.activeDate=t)}keyDownHandler(t){t.key==="Escape"&&this.resetActiveDates()}async loadLocaleData(){b.numberFormatOptions={numberingSystem:this.numberingSystem,locale:this.messages._lang,useGrouping:!1},this.localeData=await z(this.messages._lang),this.dateTimeFormat=C(this.messages._lang,P)}monthHeaderSelectChange(t){let e=new Date(t.detail.date),a=t.detail.position;this.range?a==="end"?(this.activeEndDate=e,this.activeStartDate=d(e)):(this.activeStartDate=e,this.activeEndDate=h(e)):this.activeDate=e,t.stopPropagation()}monthActiveDateChange(t){let e=new Date(t.detail);if(!this.range)this.activeDate=e;else{let a=e.getMonth(),i=a!==this.activeStartDate.getMonth()&&(this.calendars===1||a!==h(this.activeStartDate).getMonth());this.activeRange==="end"?(!this.activeEndDate||this.activeStartDate&&i)&&(this.activeEndDate=e,this.activeStartDate=d(e)):(this.activeStartDate&&i||!this.activeStartDate)&&(this.activeStartDate=e,this.activeEndDate=h(e))}t.stopPropagation()}monthHoverChange(t){if(!this.range){this.hoverRange=void 0;return}let{valueAsDate:e}=this,a=Array.isArray(e)&&e[0],i=Array.isArray(e)&&e[1],s=new Date(t.detail);if(this.hoverRange={focused:this.activeRange||"start",start:a,end:i},this.proximitySelectionDisabled)i&&a||!i&&s>=a?(this.hoverRange.focused="end",this.hoverRange.end=s):!i&&s<a?this.hoverRange={focused:"start",start:s,end:a}:this.hoverRange=void 0;else if(this.activeRange)this.activeRange==="end"?(this.hoverRange.end=s,this.hoverRange.focused="end"):(this.hoverRange.start=s,this.hoverRange.focused="start");else if(a&&i){let l=Math.abs(D(s,a)),c=Math.abs(D(s,i));s>i?(this.hoverRange.end=s,this.hoverRange.focused="end"):s<a?(this.hoverRange.start=s,this.hoverRange.focused="start"):s>a&&s<i&&(l<c?(this.hoverRange.start=s,this.hoverRange.focused="start"):(this.hoverRange.end=s,this.hoverRange.focused="end"))}else a&&(s<a?this.hoverRange={focused:"start",start:s,end:a}:(this.hoverRange.end=s,this.hoverRange.focused="end"));t.stopPropagation()}monthMouseOutChange(t){this.hoverRange&&(this.hoverRange=void 0),t.stopPropagation()}resetActiveDates(){let{valueAsDate:t}=this;!Array.isArray(t)&&t&&t!==this.activeDate&&(this.activeDate=new Date(t)),Array.isArray(t)&&(t[0]&&t[0]!==this.activeStartDate&&(this.activeStartDate=new Date(t[0])),t[1]&&t[1]!==this.activeEndDate&&(this.activeEndDate=new Date(t[1]))),this.hoverRange=void 0}getEndDate(){return Array.isArray(this.valueAsDate)&&this.valueAsDate[1]||void 0}setEndDate(t,e=!0){let a=this.getStartDate();this.rangeValueChangedByUser=!0,this.value=[r(a),r(t)],this.valueAsDate=[a,t],e&&this.calciteDatePickerRangeChange.emit()}getStartDate(){return Array.isArray(this.valueAsDate)&&this.valueAsDate[0]}setStartDate(t,e=!0){let a=this.getEndDate();this.rangeValueChangedByUser=!0,this.value=[r(t),r(a)],this.valueAsDate=[t,a],e&&this.calciteDatePickerRangeChange.emit()}monthDateChange(t){let e=new Date(t.detail),a=r(e);if(!this.range&&a===r(this.valueAsDate))return;if(!this.range){this.value=a||"",this.valueAsDate=e||null,this.activeDate=e||null,this.calciteDatePickerChange.emit();return}let i=this.getStartDate(),s=this.getEndDate();if(!i||!s&&e<i)i&&this.setEndDate(new Date(i)),this.activeRange=="end"?this.setEndDate(e):this.setStartDate(e);else if(!s)this.setEndDate(e);else if(this.proximitySelectionDisabled)this.setStartDate(e,!1),this.setEndDate(null,!1),this.calciteDatePickerRangeChange.emit();else if(this.activeRange)this.activeRange=="end"?this.setEndDate(e):(e>s&&(this.setEndDate(null,!1),this.activeEndDate=null),this.setStartDate(e));else{let l=D(e,i),c=D(e,s);c===0||l<0?this.setStartDate(e):l===0||c<0?this.setEndDate(e):l<c?this.setStartDate(e):this.setEndDate(e)}t.stopPropagation(),this.calciteDatePickerChange.emit()}getActiveDate(t,e,a){let i=n(new Date,e,a);return n(this.activeDate,e,a)||t||(g(a,i)&&!this.range?f(i,e,a):i)}getActiveEndDate(t,e,a){return n(this.activeEndDate,e,a)||t||n(h(new Date),e,a)}setActiveStartAndEndDates(){if(this.range){let t=n(Array.isArray(this.valueAsDate)?this.valueAsDate[0]:this.valueAsDate,this.minAsDate,this.maxAsDate),e=n(Array.isArray(this.valueAsDate)?this.valueAsDate[1]:null,this.minAsDate,this.maxAsDate);if(this.activeStartDate=this.getActiveDate(t,this.minAsDate,this.maxAsDate),this.activeEndDate=this.getActiveEndDate(e,this.minAsDate,this.maxAsDate),g(this.activeStartDate,this.activeEndDate)){let a=f(d(this.activeEndDate),this.minAsDate,this.maxAsDate),i=h(this.activeEndDate);u(a,this.minAsDate,this.maxAsDate)?this.activeStartDate=a:u(i,this.minAsDate,this.maxAsDate)&&(this.activeEndDate=i)}}}render(){let t=n(this.range&&Array.isArray(this.valueAsDate)?this.valueAsDate[0]:this.valueAsDate,this.minAsDate,this.maxAsDate),e=this.getActiveDate(t,this.minAsDate,this.maxAsDate),a=this.range&&Array.isArray(this.valueAsDate)?n(this.valueAsDate[1],this.minAsDate,this.maxAsDate):null,i=this.range&&this.activeRange?this.activeRange==="start"?this.minAsDate:t:this.minAsDate,s=this.range?this.activeStartDate:e;return v`<div aria-hidden class=${x(w.container)} tabindex=-1>${this.renderMonth(s,this.maxAsDate,i,t,a)}</div>`}renderMonth(t,e,a,i,s){return v`<calcite-date-picker-month .activeDate=${t} .calendars=${this.calendars} .dateTimeFormat=${this.dateTimeFormat} .endDate=${this.range?s:void 0} .headingLevel=${this.headingLevel||M} .hoverRange=${this.hoverRange} .layout=${this.layout} .localeData=${this.localeData} .max=${e} .messages=${this.messages} .min=${a} .monthStyle=${this.monthStyle} @calciteInternalDatePickerDayHover=${this.monthHoverChange} @calciteInternalDatePickerDaySelect=${this.monthDateChange} @calciteInternalDatePickerMonthActiveDateChange=${this.monthActiveDateChange} @calciteInternalDatePickerMonthChange=${this.monthHeaderSelectChange} @calciteInternalDatePickerMonthMouseOut=${this.monthMouseOutChange} .range=${this.range} .scale=${this.scale} .selectedDate=${this.activeRange==="end"?s:i} .startDate=${this.range?i:void 0}></calcite-date-picker-month>`}};S("calcite-date-picker",A);export{A as DatePicker};
|
|
@@ -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 m,b as i,c as s}from"./
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{a as m,b as i,c as s}from"./DIWZOGSO.js";import{a as l}from"./ULUKHLQN.js";import{E as t}from"./2ECRIOED.js";var f=({children:r,...e})=>{let a=e.level?m(`h${e.level}`):i`div`;return l(e.key,s`<${a} class=${t(e.class)}>${r}</${a}>`)};export{f as a};
|