@esri/calcite-components 5.1.0-next.42 → 5.1.0-next.43
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/cdn/{ZGMNMVE6.js → 24GPNKV7.js} +1 -1
- package/dist/cdn/{LLIVQLYI.js → 2BB53E36.js} +1 -1
- package/dist/cdn/{ZX3OFVBE.js → 2RICINDY.js} +1 -1
- package/dist/cdn/{YLSKIDPZ.js → 3HGJACZB.js} +1 -1
- package/dist/cdn/{DLZLKA4T.js → 3SITVGTE.js} +1 -1
- package/dist/cdn/{XF3M5MQV.js → 3UY2ASYF.js} +1 -1
- package/dist/cdn/{J2S7JUOG.js → 3VTZNCUO.js} +1 -1
- package/dist/cdn/{EUJZPMHT.js → 4NYITE75.js} +1 -1
- package/dist/cdn/{P5BNCDUR.js → 4NZGIFOM.js} +1 -1
- package/dist/cdn/{XA3UTTKM.js → 555SDRUZ.js} +1 -1
- package/dist/cdn/{G655RHCC.js → 5BUR7I6A.js} +1 -1
- package/dist/cdn/{OW4PP6H6.js → 5RPSB6JK.js} +1 -1
- package/dist/cdn/{GPNRDGRG.js → 5SLE5OTV.js} +1 -1
- package/dist/cdn/{6CBC7O2L.js → 5XHCDQFZ.js} +1 -1
- package/dist/cdn/{VKNBO4H5.js → 5XSD4F2U.js} +1 -1
- package/dist/cdn/{IAIGNDF6.js → 64ZTPB46.js} +1 -1
- package/dist/cdn/{AUMIVOTT.js → 6BGGPXMX.js} +1 -1
- package/dist/cdn/{6I6KIIFZ.js → 6S5EWY5E.js} +1 -1
- package/dist/cdn/{VCRKEKZN.js → 7A2PGF7W.js} +1 -1
- package/dist/cdn/7CO2P5IJ.js +2 -0
- package/dist/cdn/{JSY36PGK.js → 7L5PN44P.js} +1 -1
- package/dist/cdn/{HYLBJYLD.js → 7MX6K7I6.js} +1 -1
- package/dist/cdn/{ONGJTZME.js → 7S5HZRYB.js} +1 -1
- package/dist/cdn/{ZIPC4VCA.js → 7VJGRTI2.js} +1 -1
- package/dist/cdn/A45SZDQV.js +2 -0
- package/dist/cdn/{D7AS4CIT.js → A6MVMCXA.js} +1 -1
- package/dist/cdn/{3F3D4BJ6.js → A6VHKAIA.js} +1 -1
- package/dist/cdn/{EJNEFXBB.js → AIMJAYF5.js} +1 -1
- package/dist/cdn/{M72OX2NI.js → AP2ELCOL.js} +1 -1
- package/dist/cdn/{6NMPQ7IK.js → ATBTFTHL.js} +1 -1
- package/dist/cdn/{FBU7VQQU.js → AVNNKHNX.js} +1 -1
- package/dist/cdn/{5F3HT5EX.js → B2LLJTRB.js} +1 -1
- package/dist/cdn/{KVNPKHJE.js → B5BJEF6W.js} +1 -1
- package/dist/cdn/{VLOGLRQW.js → BQNPOOMS.js} +1 -1
- package/dist/cdn/{RGKZUYDU.js → BYKYE7CW.js} +1 -1
- package/dist/cdn/{IGBSJW7P.js → CQEZT7CQ.js} +1 -1
- package/dist/cdn/{BEBCUZFX.js → D2P3RJ55.js} +1 -1
- package/dist/cdn/{RNCI46OL.js → DCG527KT.js} +1 -1
- package/dist/cdn/{HHRSNWVJ.js → DICEHD76.js} +1 -1
- package/dist/cdn/{MNWU4JG6.js → DKXGE3CW.js} +1 -1
- package/dist/cdn/{DNJP6SCZ.js → DMB3J5AA.js} +1 -1
- package/dist/cdn/{MWXXO2IF.js → DNOXMQDS.js} +1 -1
- package/dist/cdn/{7UIJGCNT.js → DPOTI7IX.js} +1 -1
- package/dist/cdn/{UWHVFXWB.js → EKDWQZ2F.js} +1 -1
- package/dist/cdn/{GCI4G5CC.js → GEXBHRBO.js} +1 -1
- package/dist/cdn/{DVTWHLVS.js → GK4OCOP2.js} +1 -1
- package/dist/cdn/{YRKWU5DH.js → GLWYDOXQ.js} +1 -1
- package/dist/cdn/{YVTCTKMY.js → GP7XSV5A.js} +1 -1
- package/dist/cdn/{F52J6R6Y.js → GQGPEPRZ.js} +1 -1
- package/dist/cdn/{VO5MQPE6.js → H3ZT7OKY.js} +1 -1
- package/dist/cdn/{IROIUJI7.js → HAOWQAZA.js} +1 -1
- package/dist/cdn/{UL4OE7TO.js → HBJF6FOJ.js} +1 -1
- package/dist/cdn/{V6MIIYPL.js → HJBXD2RY.js} +1 -1
- package/dist/cdn/{Y74NH24P.js → HWI7HSYY.js} +1 -1
- package/dist/cdn/{Y2SWMC2J.js → IKKIGQHK.js} +1 -1
- package/dist/cdn/{KWM5PO5E.js → INLGIRKT.js} +1 -1
- package/dist/cdn/{5F2MOSTC.js → IQCRJABI.js} +1 -1
- package/dist/cdn/{CVWXK3WH.js → IRRSSLTA.js} +1 -1
- package/dist/cdn/{S37UIKHR.js → J35AD3PZ.js} +1 -1
- package/dist/cdn/{WAPQVFTP.js → J6E2YQ2Y.js} +1 -1
- package/dist/cdn/{ZG55RM66.js → JAIZ2T5E.js} +1 -1
- package/dist/cdn/{ZQL5B4WP.js → JFCOTF4X.js} +1 -1
- package/dist/cdn/{CN4KGWO7.js → JMN7KYK5.js} +1 -1
- package/dist/cdn/{F74SA3H7.js → JNABQYBK.js} +1 -1
- package/dist/cdn/{7VQ2OKJE.js → JTFUSPQO.js} +1 -1
- package/dist/cdn/{HCTMBHQC.js → K3G7H6HP.js} +1 -1
- package/dist/cdn/{TNDJCXNK.js → KAPFLKLZ.js} +1 -1
- package/dist/cdn/{DDCJYR7L.js → KFED2RWY.js} +1 -1
- package/dist/cdn/{MIW54I6U.js → KUPS36J3.js} +1 -1
- package/dist/cdn/{UBKHHZJ4.js → KYPH442R.js} +1 -1
- package/dist/cdn/{55SHOESH.js → L2S4PCK6.js} +1 -1
- package/dist/cdn/{DFEKS3S3.js → L43RMTAP.js} +1 -1
- package/dist/cdn/{KGCK5EOF.js → L5KBXV6Y.js} +1 -1
- package/dist/cdn/{2DH3FWEI.js → LDY5MXXT.js} +1 -1
- package/dist/cdn/{XHJ3URCF.js → LFXHGOMV.js} +1 -1
- package/dist/cdn/{6BM6TWQ2.js → LMBRHECU.js} +1 -1
- package/dist/cdn/{TC7GHL27.js → LPKNS5AG.js} +1 -1
- package/dist/cdn/{7N33UB6K.js → LX4PMP3X.js} +1 -1
- package/dist/cdn/{UU32DKVL.js → LYY5PKKO.js} +1 -1
- package/dist/cdn/MC7VIWBS.js +2 -0
- package/dist/cdn/{VBECIGU3.js → MDHWIWT5.js} +1 -1
- package/dist/cdn/{DU3DPRSW.js → MPQHQY2O.js} +1 -1
- package/dist/cdn/{SWGJ5M7Q.js → NEDMRCOF.js} +1 -1
- package/dist/cdn/{7PA7GRRE.js → NN5QIMEH.js} +1 -1
- package/dist/cdn/{2ICOSO2N.js → O2H6HNOD.js} +1 -1
- package/dist/cdn/{4XDDF7QJ.js → O5QY4PM5.js} +1 -1
- package/dist/cdn/{OBDWNMT4.js → PG3YI3LJ.js} +1 -1
- package/dist/cdn/{EKZ27R6P.js → PQJAXQQE.js} +1 -1
- package/dist/cdn/{Q2QADI72.js → PYCAWNDZ.js} +1 -1
- package/dist/cdn/{36NKWNCT.js → PZTXPQU2.js} +1 -1
- package/dist/cdn/{4J5GPFW4.js → Q4P6Z6E5.js} +1 -1
- package/dist/cdn/{CLH4YTVT.js → QC6TIX3T.js} +1 -1
- package/dist/cdn/{2LIAGA6D.js → QHGI7X2A.js} +1 -1
- package/dist/cdn/{NUL2KWCK.js → QJGDW4A3.js} +1 -1
- package/dist/cdn/{JO67U7O6.js → R2MDKHXD.js} +1 -1
- package/dist/cdn/{OD2OFTAW.js → R7TTHQY6.js} +1 -1
- package/dist/cdn/{CBPLAPZD.js → RMBCP4P6.js} +1 -1
- package/dist/cdn/{FQQVFFDC.js → RMQMFLJJ.js} +1 -1
- package/dist/cdn/{FS3FP3E7.js → RVK7AGJY.js} +1 -1
- package/dist/cdn/{PUEYOG5S.js → SCCN3HH6.js} +1 -1
- package/dist/cdn/{4VA2M4Z6.js → SFTGKQSB.js} +1 -1
- package/dist/cdn/{PD7IE5T5.js → SLPX32KY.js} +1 -1
- package/dist/cdn/{33U2YP4W.js → SVKOELUR.js} +1 -1
- package/dist/cdn/{7ALGUDRK.js → TKZ7DC2I.js} +1 -1
- package/dist/cdn/{5ITO27ET.js → TM5CULPA.js} +1 -1
- package/dist/cdn/{KTF3HRSC.js → TMTITIYU.js} +1 -1
- package/dist/cdn/{HBEKRRFA.js → TN4GX3CY.js} +1 -1
- package/dist/cdn/{2SQTFFUH.js → U36XLIJO.js} +1 -1
- package/dist/cdn/{SZUV2NPG.js → UPPM5CEL.js} +1 -1
- package/dist/cdn/{EOILUVEC.js → UUEBQ77O.js} +1 -1
- package/dist/cdn/{7BIMPQHS.js → V2GF3JT4.js} +1 -1
- package/dist/cdn/{CF4WXYS6.js → VAZMO2Z7.js} +1 -1
- package/dist/cdn/{2TLYQB3H.js → VHPBKL2E.js} +1 -1
- package/dist/cdn/{EQWOSRJS.js → VHR5TDB3.js} +1 -1
- package/dist/cdn/{IELQCDZV.js → VJM5IWD3.js} +1 -1
- package/dist/cdn/{IK5QGRIX.js → VKDMNBGB.js} +1 -1
- package/dist/cdn/{HONIHA7Y.js → VKKNNVSC.js} +1 -1
- package/dist/cdn/{HBFFSKHQ.js → VNVUBN26.js} +1 -1
- package/dist/cdn/{HKBFAZAP.js → VOLITLZQ.js} +1 -1
- package/dist/cdn/{6D52GNCZ.js → VYNP23UO.js} +1 -1
- package/dist/cdn/{TPRQEKIG.js → WDH6SQXQ.js} +1 -1
- package/dist/cdn/{W23ALSYA.js → WKISVZXP.js} +1 -1
- package/dist/cdn/{KOTGZOPG.js → WN6ABOQ2.js} +1 -1
- package/dist/cdn/{3JZWLIUO.js → WQPHWUXI.js} +1 -1
- package/dist/cdn/{3RNGMZJL.js → WXL4CDTV.js} +1 -1
- package/dist/cdn/{Q75NF4J3.js → WZFVGOB6.js} +1 -1
- package/dist/cdn/{TCECVX5W.js → X7IZ6MVC.js} +1 -1
- package/dist/cdn/{YT7UFIFK.js → XBC2NZ37.js} +1 -1
- package/dist/cdn/{OY6ERUHE.js → XQOIEFK4.js} +1 -1
- package/dist/cdn/{GDO67NG3.js → XXUEJ7P4.js} +1 -1
- package/dist/cdn/{AZ6SVWDM.js → YGWAEV4M.js} +1 -1
- package/dist/cdn/{3LLRSOPX.js → YU5BN3HW.js} +1 -1
- package/dist/cdn/{UTW3AV2W.js → YVDXSNF7.js} +1 -1
- package/dist/cdn/{24VCNUH5.js → Z3LUJ6AB.js} +1 -1
- package/dist/cdn/{QCRJVL4W.js → Z6W2R7TV.js} +1 -1
- package/dist/cdn/{FRNKX4RT.js → Z72HN4IE.js} +1 -1
- package/dist/cdn/{X5XG2XVZ.js → ZEEKQWVY.js} +1 -1
- package/dist/cdn/{PLB3J3MR.js → ZFQIX6UA.js} +1 -1
- package/dist/cdn/{C5YMLOZK.js → ZMI2A2ER.js} +1 -1
- package/dist/cdn/{HJEIJ4CJ.js → ZNY5I77U.js} +1 -1
- package/dist/cdn/{FKAW7VF2.js → ZV5MIE6S.js} +1 -1
- package/dist/cdn/{WQUJEW2K.js → ZXRGCNES.js} +1 -1
- package/dist/cdn/{QJ2KZL5V.js → ZYUBA3AR.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/runtime.js +3 -3
- package/dist/components/calcite-navigation/customElement.d.ts +7 -0
- package/dist/components/calcite-navigation/customElement.js +42 -3
- package/dist/components/calcite-navigation-logo/customElement.js +4 -3
- package/dist/components/calcite-navigation-user/customElement.js +7 -6
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +3 -3
- package/dist/types/lumina.d.ts +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/stencil.d.ts +1 -1
- package/package.json +2 -2
- package/dist/cdn/M77PVNA5.js +0 -2
- package/dist/cdn/RP767HLZ.js +0 -2
- package/dist/cdn/SAITVIPI.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as p}from"./
|
|
2
|
+
import{a as p}from"./DICEHD76.js";import{a as c}from"./Z6W2R7TV.js";import"./RH6ZIP65.js";import{c as h}from"./SLPX32KY.js";import"./RVK7AGJY.js";import{l as m,u as f,y as l}from"./QHGI7X2A.js";import"./OAOQ5BXS.js";import{G as u,S as r,g as o,h as n}from"./WDH6SQXQ.js";var d=o`:host{display:flex;line-height:var(--calcite-font-line-height-fixed-lg)}ul{margin:0;display:inline-flex;block-size:100%;align-items:center;padding:0}:host([layout=vertical]) ul{display:flex;inline-size:100%;flex-direction:column}:host([hidden]){display:none}[hidden]{display:none}`,a=class extends u{constructor(){super(),this.attributeWatch=h(["role"],this.handleGlobalAttributesChanged),this.menuItems=[],this.messages=p(),this.focusSetter=c()(this),this.layout="horizontal",this.listen("calciteInternalMenuItemKeyEvent",this.calciteInternalNavMenuItemKeyEvent)}static{this.properties={label:1,layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=d}async setFocus(e){return this.focusSetter(()=>this.menuItems[0],e)}willUpdate(e){e.has("layout")&&(this.hasUpdated||this.layout!=="horizontal")&&this.setMenuItemLayout(this.menuItems,this.layout)}handleGlobalAttributesChanged(){this.requestUpdate(),this.setMenuItemLayout(this.menuItems,this.layout)}calciteInternalNavMenuItemKeyEvent(e){let t=e.target,s=e.detail.children,i=e.detail.event.key;e.stopPropagation(),i==="ArrowDown"?t.layout==="vertical"?l(this.menuItems,t,"next",!1,!1):e.detail.isSubmenuOpen&&s[0].setFocus():i==="ArrowUp"?this.layout==="vertical"?l(this.menuItems,t,"previous",!1,!1):e.detail.isSubmenuOpen&&s[s.length-1].setFocus():i==="ArrowRight"?this.layout==="horizontal"?l(this.menuItems,t,"next",!1,!1):e.detail.isSubmenuOpen&&s[0].setFocus():i==="ArrowLeft"?this.layout==="horizontal"?l(this.menuItems,t,"previous",!1,!1):e.detail.isSubmenuOpen&&this.focusParentElement(e.target):i==="Escape"&&this.focusParentElement(e.target),e.preventDefault()}handleMenuSlotChange(e){this.menuItems=f(e),this.setMenuItemLayout(this.menuItems,this.layout)}focusParentElement(e){let t=e.parentElement;t&&(m(t),t.open=!1)}setMenuItemLayout(e,t){e.forEach(s=>{s.layout=t,this.getEffectiveRole()==="menubar"&&(s.isTopLevelItem=!0,s.topLevelMenuLayout=this.layout)})}getEffectiveRole(){return this.el.role||"menubar"}render(){return n`<ul .ariaLabel=${this.label} .role=${this.getEffectiveRole()}><slot @slotchange=${this.handleMenuSlotChange}></slot></ul>`}};r("calcite-menu",a);export{a as Menu};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{d as ge}from"./Y2OS6UOH.js";import{a as xe}from"./AZ6SVWDM.js";import{a as ve}from"./ISATMK3J.js";import{b as W,c as Ie,d as I,f as w,g as A}from"./DVTWHLVS.js";import{a as H,b as M,d as c,e as p,f as L}from"./MYDCGCGV.js";import{a as me}from"./EQWOSRJS.js";import{b as z}from"./6URRYJJC.js";import{a as ue}from"./4J5GPFW4.js";import{a as fe}from"./CN4KGWO7.js";import{c as he,d as de,e as pe}from"./YVTCTKMY.js";import{a as ae}from"./Q75NF4J3.js";import{b as be}from"./EUJZPMHT.js";import{a as P,c as B,d as ce,e as ne,f as oe,g as D,h as re}from"./X5XG2XVZ.js";import{a as se}from"./EJNEFXBB.js";import{a as te}from"./6CBC7O2L.js";import{a as S}from"./36NKWNCT.js";import{a as le}from"./V6MIIYPL.js";import{a as ie}from"./AP2LDRUV.js";import{a as R,b as F}from"./ENDXE7YY.js";import{a as ee}from"./HHRSNWVJ.js";import{a as Z}from"./QCRJVL4W.js";import{a as O,b as V}from"./RH6ZIP65.js";import{e as K}from"./PD7IE5T5.js";import"./FS3FP3E7.js";import{e as k,h as X,l as Y}from"./2LIAGA6D.js";import{a as Q}from"./OAOQ5BXS.js";import{D as U,E as $,F as v,G,H as h,L as _,N as j,S as J,g as N,h as d,l as f,p as x}from"./TPRQEKIG.js";var Se=N`: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}:host([scale=s]){font-size:var(--calcite-font-size-relative-sm);--calcite-internal-combobox-spacing-unit-l: .5rem;--calcite-internal-combobox-spacing-unit-s: .25rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-2xs);--calcite-internal-combobox-no-matches-spacing-unit-s: .25rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.25rem - 1px) ;--calcite-internal-close-size: 1rem}:host([scale=m]){font-size:var(--calcite-font-size-relative-base);--calcite-internal-combobox-spacing-unit-l: .75rem;--calcite-internal-combobox-spacing-unit-s: .5rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-sm);--calcite-internal-combobox-no-matches-spacing-unit-s: .375rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.5rem - 1px) ;--calcite-internal-close-size: 1.5rem}:host([scale=l]){font-size:var(--calcite-font-size-relative-md);--calcite-internal-combobox-spacing-unit-l: 1rem;--calcite-internal-combobox-spacing-unit-s: .75rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-sm-plus);--calcite-internal-combobox-no-matches-spacing-unit-s: var(--calcite-space-sm-plus);--calcite-combobox-input-height: 1.5rem;--calcite-internal-combobox-input-margin-block: calc(var(--calcite-space-sm-plus) - 1px);--calcite-internal-close-size: 2rem}.wrapper{display:flex;border-width:1px;border-style:solid;outline-color:transparent;padding-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);padding-inline:var(--calcite-internal-combobox-spacing-unit-l) var(--calcite-internal-combobox-padding-inline-end);background-color:var(--calcite-combobox-input-background-color, var(--calcite-color-foreground-1));color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));border-color:var(--calcite-combobox-input-border-color, var(--calcite-color-border-input))}.wrapper:hover .icon{color:var(--calcite-combobox-icon-color-hover, var(--calcite-color-text-1))}:host(:focus-within) .wrapper,.wrapper--active{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([read-only]) .wrapper{background-color:var(--calcite-color-background)}:host([read-only]) .label{font-weight:var(--calcite-font-weight-medium)}:host([status=invalid]) .wrapper{border-color:var(--calcite-color-status-danger)}:host([status=invalid]:focus-within) .wrapper{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.wrapper--single{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l) var(--calcite-internal-combobox-padding-inline-end);cursor:pointer;flex-wrap:nowrap}.grid-input{position:relative;display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;gap:var(--calcite-internal-combobox-spacing-unit-s);margin-inline-end:var(--calcite-internal-combobox-spacing-unit-s)}.grid-input.selection-display--fit,.grid-input.selection-display--single{flex-wrap:nowrap;overflow:hidden}.input{flex-grow:1;appearance:none;overflow:hidden;text-overflow:ellipsis;border-style:none;background-color:transparent;padding:0;font-family:inherit;color:var(--calcite-color-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);inline-size:100%;margin-block-end:var(--calcite-internal-combobox-spacing-unit-s);min-inline-size:4.8125rem}.input:focus{outline:2px solid transparent;outline-offset:2px}.input:placeholder-shown{text-overflow:ellipsis}.input--single{padding:0;margin-block:var(--calcite-internal-combobox-input-margin-block)}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;width:0px;min-width:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.placeholder-icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.input-wrap{display:flex;flex-grow:1;align-items:center}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;max-width:100%;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;font-weight:var(--calcite-font-weight-normal);block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--icon{padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.icon-end,.icon-start{display:flex;cursor:pointer;align-items:center}.icon-end{flex:none}.icon-end .icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.floating-ui-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}@starting-style{.floating-ui-container{opacity:0;inset-block-start:0;left:0}}:host([top-layer-disabled]) .floating-ui-container{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown)}.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}}@media(forced-colors:active){.wrapper,.floating-ui-container{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}.list-container{max-height:45vh;overflow-y:auto;inline-size:var(--calcite-dropdown-width, 100%);background-color:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1))}.list{margin:0;display:block;padding:0;line-height:var(--calcite-font-line-height-relative-snug)}.list--hide{height:0px;overflow:hidden}calcite-chip{--calcite-animation-timing: 0}.chip{margin-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);max-inline-size:100%}.chip--invisible{visibility:hidden;position:absolute}.item{display:block}.select-all{background-color:var(--calcite-combobox-item-background-color-active, var(--calcite-color-foreground-1));border-block-end-color:var(--calcite-combobox-divider-color, var(--calcite-combobox-item-border-color, var(--calcite-color-border-3)));border-block-end-style:solid;border-block-end-width:var(--calcite-border-width-sm);inset-block-start:0;position:sticky;z-index:var(--calcite-z-index-sticky)}.no-matches{padding-block:var(--calcite-internal-combobox-no-matches-spacing-unit-s);padding-inline:var(--calcite-internal-combobox-spacing-unit-l);color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));background:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1));cursor:pointer}.no-matches-placeholder{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3));cursor:default}.disabled{opacity:.5}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.clear-button--container{display:flex;cursor:pointer;align-items:center}.clear-button--container:hover calcite-action{--calcite-action-background-color: var(--calcite-clear-button-background-color-hover, var(--calcite-color-foreground-3));--calcite-action-text-color: var(--calcite-clear-button-icon-color-hover, var(--calcite-color-text-1))}.clear-button--container:active calcite-action{--calcite-action-background-color: var(--calcite-clear-button-background-color-press, var(--calcite-color-border-2));--calcite-action-text-color: var(--calcite-clear-button-icon-color-press, var(--calcite-color-text-1))}.clear-button--container calcite-action{--calcite-internal-action-height: 100%;--calcite-internal-action-padding-inline: var(--calcite-spacing-none);--calcite-internal-action-padding-block: var(--calcite-spacing-none);--calcite-action-background-color: var(--calcite-clear-button-background-color, var(--calcite-color-foreground-2));--calcite-action-text-color: var(--calcite-clear-button-icon-color)}.clear-button--container calcite-action:hover{--calcite-action-background-color-hover: var(--calcite-clear-button-background-color-hover, var(--calcite-color-foreground-3));--calcite-action-text-color-press: var(--calcite-clear-button-icon-color-hover)}.clear-button--container calcite-action:active{--calcite-action-background-color-press: var(--calcite-clear-button-background-color-press, var(--calcite-color-border-2));--calcite-action-text-color-press: var(--calcite-clear-button-icon-color-press)}:host([scale=s]) .clear-button--container{padding:var(--calcite-spacing-xxs)}:host([scale=m]) .clear-button--container{padding:var(--calcite-spacing-xxs);padding-inline-end:var(--calcite-space-sm)}:host([scale=l]) .clear-button--container{padding-inline-end:var(--calcite-spacing-sm-plus)}.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}.text-match{background-color:transparent;color:inherit;font-weight:var(--calcite-font-weight-bold)}.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)}::placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-placeholder-text-color, var(--calcite-color-text-3))}`,q=class extends G{constructor(){super(),this.direction=K(),this.formSupport=fe({inputType:"text"})(this),this.selectAllComboboxItemRef=$(),this.allSelectedIndicatorChipRef=$(),this.cancelable=le()(this),this.filterItems=(()=>{let e=(t,l)=>t&&l.some(({el:i})=>t===i);return ie((t,l=!1,i=!0)=>{let s=ve([...this.data,...this.groupData],t,this.effectiveFilterProps),n=this.getItemsAndGroups(),a=t==="";n.forEach(o=>{if(a){o.itemHidden=!1;return}let r=!e(o,s);o.itemHidden=r;let[u,b]=o.ancestors;(e(u,s)||e(b,s))&&(o.itemHidden=!1),r||o.ancestors.forEach(g=>g.itemHidden=!1)}),this.noMatchesFound=this.filteredItems.length===0&&!!this.filterText,this.filterTextMatchPattern=this.filterText&&new RegExp(`(${z(this.filterText)})`,"i"),this.keyboardNavItems.forEach(o=>{o.filterTextMatchPattern=this.filterTextMatchPattern}),l&&(this.open=this.filterText.trim().length>0),i&&this.calciteComboboxFilterChange.emit()},j.filter)})(),this._filterText="",this.getSelectedItems=()=>{if(!this.isMulti()){let e=this.items.find(({selected:t})=>t);return e?[e]:[]}return this.items.filter(e=>e.selected&&(this.selectionMode!=="ancestors"||!I(e))).sort((e,t)=>{let l=this.selectedItems.indexOf(e),i=this.selectedItems.indexOf(t);return l>-1&&i>-1?l-i:i-l})},this.groupItems=[],this.guid=Q(),this.ignoreSelectedEventsFlag=!1,this.internalValueChangeFlag=!1,this.mutationObserver=R("mutation",()=>this.updateItems()),this.onLabelClick=()=>{this.setFocus()},this.transitionProp="opacity",this.resizeObserver=R("resize",()=>{this.setMaxScrollerHeight(),this.refreshSelectionDisplay()}),this.selectedIndicatorChipRef=$(),this.clearButtonRef=$(),this._selectedItems=[],this.textInputRef=$(),this._value=null,this.messages=ee(),this.focusSetter=Z()(this),this.customChipAddHandler=()=>{this.addCustomChip(this.filterText,!0)},this.interactiveContainer=te(this),this.topLayer=ae({target:()=>this.floatingEl})(this),this.activeChipIndex=-1,this.activeDescendant="",this.activeItemIndex=-1,this.compactSelectionDisplay=!1,this.selectedHiddenChipsCount=0,this.selectedVisibleChipsCount=0,this.allItems=[],this.items=[],this.clearDisabled=!1,this.disabled=!1,this.maxItems=0,this.open=!1,this.overlayPositioning="absolute",this.placeholderIconFlipRtl=!1,this.placement=P,this.readOnly=!1,this.required=!1,this.scale="m",this.selectAllEnabled=!1,this.selectionDisplay="all",this.selectionAppearance="icon",this.selectionMode="multiple",this.status="idle",this.topLayerDisabled=!1,this.calciteComboboxBeforeClose=x({cancelable:!1}),this.calciteComboboxBeforeOpen=x({cancelable:!1}),this.calciteComboboxChange=x({cancelable:!1}),this.calciteComboboxChipClose=x({cancelable:!1}),this.calciteComboboxClose=x({cancelable:!1}),this.calciteComboboxFilterChange=x({cancelable:!1}),this.calciteComboboxOpen=x({cancelable:!1}),this.listenOn(document,"click",this.documentClickHandler),this.listen("calciteComboboxItemChange",this.calciteComboboxItemChangeHandler),this.listen("calciteInternalComboboxItemChange",this.calciteInternalComboboxItemChangeHandler),this.listen("click",this.comboboxFocusHandler)}static{this.properties={activeChipIndex:[16,{},{state:!0}],activeDescendant:[16,{},{state:!0}],activeItemIndex:[16,{},{state:!0}],compactSelectionDisplay:[16,{},{state:!0}],selectedHiddenChipsCount:[16,{},{state:!0}],selectedVisibleChipsCount:[16,{},{state:!0}],allItems:[16,{},{state:!0}],items:[16,{},{state:!0}],noMatchesFound:[16,{},{state:!0}],allowCustomValues:[7,{},{reflect:!0,type:Boolean}],clearDisabled:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],filterText:[3,{},{reflect:!0}],filterProps:[0,{},{attribute:!1}],filteredItems:[32,{},{attribute:!1,readOnly:!0}],flipPlacements:[0,{},{attribute:!1}],form:[3,{},{reflect:!0}],label:1,labelText:1,maxItems:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placeholder:1,placeholderIcon:[3,{type:String},{reflect:!0}],placeholderIconFlipRtl:[7,{},{reflect:!0,type:Boolean}],placement:[3,{},{reflect:!0}],readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectAllEnabled:[7,{},{reflect:!0,type:Boolean}],selectedItems:[0,{},{attribute:!1}],selectionDisplay:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],validationIcon:[3,{converter:_,type:String},{reflect:!0}],validationMessage:1,validity:[32,{},{readOnly:!0,attribute:!1}],value:1}}static{this.formAssociated=!0}static{this.styles=Se}get effectiveFilterProps(){return this.filterProps?this.filterProps.filter(e=>e!=="el"):["description","label","metadata","shortHeading"]}get showingInlineIcon(){let{placeholderIcon:e,selectionMode:t,selectedItems:l,open:i}=this,s=l[0],n=s?.icon,a=w(t);return!i&&s?!!n&&a:!!e&&(!s||a)}get allSelected(){let e=this.allItems.filter(t=>!t.disabled);return e.length>0&&e.every(t=>t.selected)}get hasDisabledItems(){return this.allItems.some(e=>e.disabled)}get hasDisabledSelected(){return this.allItems.some(e=>e.disabled&&e.selected)}get indeterminate(){let e=this.selectedItems.length>0||this.hasDisabledSelected;return this.selectAllEnabled?!this.allSelected&&e:this.selectedItems.length>0&&!this.allSelected}get keyboardNavItems(){let{selectAllComboboxItemRef:e}=this,t=this.filteredItems.filter(l=>!l.disabled);return e.value?[e.value,...t]:t}get filterText(){return this._filterText}set filterText(e){let t=this._filterText;e!==t&&(this._filterText=e,this.filterTextChange(e))}get filteredItems(){return this.items.filter(e=>!V(e))}get selectedItems(){return this._selectedItems}set selectedItems(e){let t=this._selectedItems;e!==t&&(this._selectedItems=e,this.selectedItemsHandler())}get value(){return this._value}set value(e){let t=this._value;e!==t&&(this._value=e,this.valueHandler(e))}async reposition(e=!1){let{floatingEl:t,referenceEl:l,placement:i,overlayPositioning:s,filteredFlipPlacements:n}=this;return ne(this,{direction:this.direction,floatingEl:t,referenceEl:l,overlayPositioning:s,placement:i,flipPlacements:n,type:"menu"},e)}async setFocus(e){return this.focusSetter(()=>(this.activeChipIndex=-1,this.activeItemIndex=-1,this.textInputRef.value),e)}connectedCallback(){super.connectedCallback(),he(this),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),D(this),this.cancelable.add(this.filterItems)}async load(){this.handleSelectionModeWarning()}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),e.has("maxItems")&&(this.hasUpdated||this.maxItems!==0)&&this.setMaxScrollerHeight(),(e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||e.has("placement")&&(this.hasUpdated||this.placement!==P))&&this.reposition(!0),(e.has("selectionMode")||e.has("scale")||e.has("selectionAppearance"))&&this.updateItems(),e.has("flipPlacements")&&this.flipPlacementsHandler()}loaded(){D(this),this.updateItems(),this.filterItems(this.filterText,!1,!1)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),de(this),re(this)}emitComboboxChange(){this.calciteComboboxChange.emit()}filterTextChange(e){this.updateActiveItemIndex(-1),this.filterItems(e,!0)}openHandler(){this.disabled||se(this)}handleDisabledChange(e){e||(this.open=!1)}valueHandler(e){this.internalValueChangeFlag||(this.items.forEach(t=>{t.selected=Array.isArray(e)?e.includes(t.value):e===t.value}),this.updateItems())}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}selectedItemsHandler(){this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,this.selectionDisplay==="fit"&&this.isMulti()&&this.refreshSelectionDisplay()}async documentClickHandler(e){this.disabled||e.composedPath().includes(this.el)||(await this.componentOnReady(),!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1)),this.allowCustomValues&&this.filterText.trim().length&&this.addCustomChip(this.filterText),this.open=!1)}handleSelectAll(e){e&&this.toggleSelectAll(),this.allSelected&&(!this.hasDisabledItems||this.hasDisabledSelected)&&this.selectedItems.forEach(t=>{let l=this.referenceEl.querySelector(`#${p.chip(t.guid)}`);l&&this.hideChip(l)})}calciteComboboxItemChangeHandler(e){if(this.ignoreSelectedEventsFlag)return;let t=e.target,l=e.composedPath().includes(this.selectAllComboboxItemRef.value);this.selectAllEnabled&&this.handleSelectAll(l);let i=this.keyboardNavItems.indexOf(l?this.selectAllComboboxItemRef.value:t);this.updateActiveItemIndex(i),this.toggleSelection(t,t.selected),this.selectedItems=this.getSelectedItems()}calciteInternalComboboxItemChangeHandler(e){e.stopPropagation(),this.hasUpdated&&this.updateItems()}clearValue(){this.ignoreSelectedEventsFlag=!0,this.items.forEach(e=>e.selected=!1),this.ignoreSelectedEventsFlag=!1,this.selectedItems=[],this.emitComboboxChange(),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems(""),this.setFocus()}clearInputValue(){this.textInputRef.value&&(this.textInputRef.value.value=""),this.filterText=""}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?ce(t,e):null}getValue(){let e=this.selectedItems.map(t=>t.value?.toString());return e.length?e.length>1?e:e[0]:""}comboboxInViewport(){let e=this.el.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.right<=(window.innerWidth||document.documentElement.clientWidth)&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)}toggleSelectAll(){let e=!this.allSelected;this.allItems.forEach(t=>{t.disabled||(t.selected=e)}),this.selectedItems=this.getSelectedItems(),this.emitComboboxChange()}keyDownHandler(e){if(this.readOnly)return;let{key:t}=e;switch(t){case"Tab":this.activeChipIndex=-1,this.activeItemIndex=-1,this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):this.open?(this.open=!1,e.preventDefault()):!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1));break;case"ArrowLeft":(this.activeChipIndex!==-1||this.textInputRef.value.selectionStart===0)&&(this.previousChip(),e.preventDefault());break;case"ArrowRight":this.activeChipIndex!==-1&&(this.nextChip(),e.preventDefault());break;case"ArrowUp":this.keyboardNavItems.length&&(e.preventDefault(),this.open&&this.shiftActiveItemIndex(-1),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView()),this.scrollToActiveOrSelectedItem();break;case"ArrowDown":this.keyboardNavItems.length&&(e.preventDefault(),this.open?this.shiftActiveItemIndex(1):(this.open=!0,this.ensureRecentSelectedItemIsActive()),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView());break;case" ":!this.textInputRef.value.value&&!e.defaultPrevented&&(this.open||(this.open=!0,this.shiftActiveItemIndex(1)),e.preventDefault());break;case"Home":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(0),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"End":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(this.filteredItems.length-1),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"Escape":!this.clearDisabled&&!this.open&&this.clearValue(),this.open=!1,e.preventDefault();break;case"Enter":this.open&&this.activeItemIndex>-1?(this.keyboardNavItems[this.activeItemIndex].toggleSelection(),e.preventDefault()):this.activeChipIndex>-1?(this.removeActiveChip(e.target),e.preventDefault()):this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):!e.defaultPrevented&&this.formSupport.active&&(e.preventDefault(),this.formSupport.requestSubmit());break;case"Delete":case"Backspace":{if(this.selectionDisplay==="single"||this.selectionDisplay==="fit"&&this.selectedHiddenChipsCount>0)return;this.activeChipIndex>-1?(e.preventDefault(),this.removeActiveChip(e.target)):!this.filterText&&this.isMulti()&&(e.preventDefault(),this.removeLastChip());break}}}onBeforeOpen(){this.topLayer.show(),this.reposition(),this.calciteComboboxBeforeOpen.emit(),setTimeout(()=>this.scrollToActiveOrSelectedItem(!0),0)}onOpen(){this.calciteComboboxOpen.emit()}onBeforeClose(){this.calciteComboboxBeforeClose.emit()}onClose(){this.calciteComboboxClose.emit(),oe(this),this.topLayer.hide()}async setMaxScrollerHeight(){let{listContainerEl:e,open:t,referenceEl:l}=this;if(!e||!t)return;let i=this.getMaxScrollerHeight();e.style.maxBlockSize=i>0?`${i}px`:"",e.style.inlineSize=`${l.clientWidth}px`}calciteChipCloseHandler(e){this.open=!1;let t=this.items.find(l=>l===e);t&&this.toggleSelection(t,!1),this.calciteComboboxChipClose.emit()}clickHandler(e){if(this.readOnly)return;let t=e.composedPath();if(t.some(l=>l.tagName==="CALCITE-CHIP")){this.open=!1,e.preventDefault();return}if(t.includes(this.clearButtonRef.value)){this.clearValue(),e.preventDefault();return}this.open=!this.open,this.ensureRecentSelectedItemIsActive()}ensureRecentSelectedItemIsActive(){let{selectedItems:e}=this,t=e.length===0?0:this.items.indexOf(e[e.length-1]);this.updateActiveItemIndex(t)}hideChip(e){e.classList.add(c.chipInvisible)}showChip(e){e.classList.remove(c.chipInvisible)}refreshChipDisplay({chipEls:e,availableHorizontalChipElSpace:t,chipContainerElGap:l}){e.forEach(i=>{if(!i.selected)this.hideChip(i);else{let s=k(i);if(s&&s<t){t-=s+l,this.showChip(i);return}}this.hideChip(i)})}async refreshSelectionDisplay(){if(this.componentOnReady(),w(this.selectionMode)||!this.textInputRef.value||!this.chipContainerEl)return;let{allSelectedIndicatorChipRef:e,chipContainerEl:t,selectionDisplay:l,placeholder:i,selectedIndicatorChipRef:s,textInputRef:n}=this,a=parseInt(getComputedStyle(t).gap.replace("px","")),o=k(t),{fontSize:r,fontFamily:u}=getComputedStyle(n.value),g=(X(i,`${r} ${u}`)||parseInt(ge))+a,E=k(e.value),T=k(s.value),m=Math.max(E,T);if(this.setCompactSelectionDisplay({chipContainerElGap:a,chipContainerElWidth:o,inputWidth:g,largestSelectedIndicatorChipWidth:m}),this.allSelected&&this.selectAllEnabled&&(!this.hasDisabledItems||this.hasDisabledSelected)&&this.selectedItems.forEach(y=>{let C=this.referenceEl.querySelector(`#${p.chip(y.guid)}`);C&&this.hideChip(C)}),this.indeterminate&&this.selectedItems.forEach(y=>{let C=this.referenceEl.querySelector(`#${p.chip(y.guid)}`);C&&this.showChip(C)}),l==="fit"){let y=Array.from(this.el.shadowRoot.querySelectorAll("calcite-chip")).filter(Ce=>Ce.closable),C=Math.round(o-((this.selectedHiddenChipsCount>0?T:0)+a+g+a));this.refreshChipDisplay({availableHorizontalChipElSpace:C,chipContainerElGap:a,chipEls:y}),this.setVisibleAndHiddenChips(y)}}setFloatingEl(e){this.floatingEl=e,D(this)}setCompactSelectionDisplay({chipContainerElGap:e,chipContainerElWidth:t,inputWidth:l,largestSelectedIndicatorChipWidth:i}){let s=Math.round(i+e+l);(!this.maxCompactBreakpoint||this.maxCompactBreakpoint<s)&&(this.maxCompactBreakpoint=s),this.compactSelectionDisplay=t<this.maxCompactBreakpoint}setContainerEl(e){F(this.resizeObserver,this.listContainerEl,e),this.listContainerEl=e,this.transitionEl=e}setChipContainerEl(e){F(this.resizeObserver,this.chipContainerEl,e),this.chipContainerEl=e}setReferenceEl(e){this.referenceEl=e,D(this)}setVisibleAndHiddenChips(e){let t=0;e.forEach(i=>{i.selected&&!i.classList.contains(c.chipInvisible)&&t++}),t!==this.selectedVisibleChipsCount&&(this.selectedVisibleChipsCount=t);let l=Math.max(0,this.getSelectedItems().length-t);l!==this.selectedHiddenChipsCount&&(this.selectedHiddenChipsCount=l)}getMaxScrollerHeight(){let t=this.getItemsAndGroups(!0).filter(n=>!V(n)),{maxItems:l}=this,i=0,s=0;return t.length>=l&&t.forEach(n=>{if(i<l){let a=this.calculateScrollerHeight(n);s+=a,i+=1}}),s}calculateScrollerHeight(e){if(!e)return 0;let t=e.getBoundingClientRect().height,l=`:scope > ${H}, :scope > ${M}`,i=Array.from(e.querySelectorAll(l)).reduce((s,n)=>s+n.getBoundingClientRect().height,0);return t-i}inputHandler(e){let t=e.target.value;this.filterText=t}getItemsAndGroups(e=!1){return e?Array.from(this.el.querySelectorAll(`${H}, ${M}`)):[...this.groupItems,...this.items]}toggleSelection(e,t){!e||this.selectionMode==="single-persist"&&e.selected&&e.value===this.value&&!t||(this.isMulti()?this.handleMultiSelection(e,t):this.handleSingleSelection(e,t))}handleMultiSelection(e,t){e.selected=t,this.updateAncestors(e),this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.resetText(),this.filterItems("")}handleSingleSelection(e,t){this.ignoreSelectedEventsFlag=!0,this.items.forEach(l=>l.selected=l===e?t:!1),this.ignoreSelectedEventsFlag=!1,this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.textInputRef.value&&(this.textInputRef.value.value=A(e)),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")}updateAncestors(e){if(this.selectionMode!=="ancestors")return;let t=W(e),l=Ie(e);e.selected?t.forEach(i=>{i.selected=!0}):(l.forEach(i=>{i.disabled||(i.selected=!1)}),[...t].forEach(i=>{I(i)||(i.selected=!1)}))}updateItems(){this.allItems=this.getItems(!0),this.items=this.allItems.filter(e=>!e.disabled),this.groupItems=this.getGroupItems(),this.data=this.getData(),this.groupData=this.getGroupData(),this.updateItemProps(),this.selectedItems=this.getSelectedItems()}updateItemProps(){this.allItems.forEach(e=>{e.selectionMode=this.selectionMode,e.selectionAppearance=this.selectionAppearance,e.scale=this.scale}),this.groupItems.forEach((e,t)=>(e.scale=this.scale,e.position=t)),this.allowCustomValues||this.setMaxScrollerHeight(),this.groupItems.forEach((e,t,l)=>{t===0&&(e.afterEmptyGroup=!1);let i=l[t+1];i&&(i.afterEmptyGroup=e.children.length===0)})}getData(){return this.items.map(e=>({description:e.description,filterDisabled:e.filterDisabled,label:e.heading,metadata:e.metadata,shortHeading:e.shortHeading,el:e}))}getGroupData(){return this.groupItems.map(e=>({label:e.label,el:e}))}resetText(){this.textInputRef.value&&(this.textInputRef.value.value=""),this.filterText=""}getItems(e=!1){return Array.from(this.el.querySelectorAll(H)).filter(l=>e||!l.disabled)}getGroupItems(){return Array.from(this.el.querySelectorAll(M))}addCustomChip(e,t){let l=this.items.find(i=>i.heading===e);if(l)this.toggleSelection(l,!0);else{let i=document.createElement("calcite-combobox-item");i.value=e,i.heading=e,this.el.prepend(i),this.updateItems(),this.toggleSelection(i,!0),this.open=!0,t&&this.setFocus()}}removeActiveChip(e){let t=this.selectedItems[this.activeChipIndex];t&&`${p.chip(t.guid)}`===e.id&&this.toggleSelection(t,!1),this.setFocus()}removeLastChip(){this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1),this.setFocus()}previousChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex;this.activeChipIndex=t===-1?e:Math.max(t-1,0),this.updateActiveItemIndex(-1),this.focusChip()}nextChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex+1;t>e?(this.activeChipIndex=-1,Y(this.textInputRef.value)):(this.activeChipIndex=t,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){let e=this.selectedItems[this.activeChipIndex]?.guid;(e?this.referenceEl.querySelector(`#${p.chip(e)}`):null)?.setFocus()}scrollToActiveOrSelectedItem(e=!1){let t=e&&this.selectedItems?.length?this.selectedItems[0]:this.keyboardNavItems[this.activeItemIndex],l=this.listContainerEl;if(!t||!l)return;t.scrollIntoView({block:"nearest"});let s=this.selectAllComboboxItemRef.value?.offsetHeight||0,n=t.getBoundingClientRect(),a=l.getBoundingClientRect();n.top<a.top+s&&(l.scrollTop-=a.top+s-n.top)}shiftActiveItemIndex(e){let{length:t}=this.keyboardNavItems,l=(this.activeItemIndex+t+e)%t;this.updateActiveItemIndex(l),this.scrollToActiveOrSelectedItem()}updateActiveItemIndex(e){this.activeItemIndex=e;let t=null;this.keyboardNavItems.forEach((l,i)=>{i===e?(l.active=!0,t=`${p.item(l.guid)}`):l.active=!1}),this.activeDescendant=t,this.activeItemIndex>-1&&(this.activeChipIndex=-1)}isMulti(){return!w(this.selectionMode)}comboboxFocusHandler(){this.disabled||this.textInputRef.value.focus()}createScreenReaderItem({ariaLabel:e,ariaSelected:t,id:l,textContent:i}){return d`<li aria-label=${e??f} aria-selected=${t??f} id=${l??f} role=option tabindex=-1>${i}</li>`}handleSelectionModeWarning(){this.selectionMode==="single-persist"&&this.clearDisabled&&console.warn('clearDisabled is ignored when selection-mode is set to "single-persist"')}getDescriptionMessage(){let e=Array.isArray(this.value)?this.value.join(", "):this.value;return this.readOnly?this.messages.nonEditable?.replace("{value}",`${e}`):e}getChipLabel(e,t){return t?[...[...W(e)].reverse(),e].map(i=>A(i)).join(" / "):A(e)}renderChip({activeChipIndex:e,disabled:t,index:l,item:i,messages:s,readOnly:n,scale:a,isAncestors:o}){let r=this.getChipLabel(i,o);return S(i.guid||i.value||r,d`<calcite-chip .appearance=${n?"outline":"solid"} class=${h({[c.chip]:!0,[c.disabled]:t})} .closable=${!t&&!n} .disabled=${t} .icon=${i.icon} .iconFlipRtl=${i.iconFlipRtl} id=${(!t&&i.guid?`${p.chip(i.guid)}`:null)??f} .label=${r} .messageOverrides=${t?null:{dismissLabel:s.removeTag}} @focusin=${t?null:()=>this.activeChipIndex=l} @calciteChipClose=${t?null:()=>this.calciteChipCloseHandler(i)} .scale=${a} .selected=${i.selected} .tabIndex=${!t&&e===l?0:-1} title=${r??f} .value=${i.value}>${r}</calcite-chip>`)}renderChipCount(e,t){let l=this.messages.disabledSelectedCount?.replace("{count}",`${e}`)??`+${e}`;return d`<calcite-chip appearance=solid class=${h({[c.chip]:!0})} .label=${l} .scale=${t} tabindex=-1 title=${l??f}>${l}</calcite-chip>`}renderChips(){let{activeChipIndex:e,readOnly:t,scale:l,selectionDisplay:i,selectionMode:s,messages:n}=this,a=[],o=s==="ancestors",r=this.allSelected&&!this.hasDisabledItems,u=this.allSelected&&this.hasDisabledSelected,b=this.allItems.filter(m=>m.disabled&&m.selected&&(!o||!I(m))),g=i==="all";if(i==="fit"&&(r||u)||i==="all"&&this.selectAllEnabled&&u||this.selectAllEnabled&&this.allSelected&&!this.hasDisabledItems)return null;let E=0,T=0;return g?this.allItems.forEach(m=>{if(m.disabled){m.selected&&(!o||!I(m))&&a.push(this.renderChip({activeChipIndex:e,disabled:!0,index:T++,item:m,messages:n,readOnly:t,scale:l,isAncestors:o}));return}(!this.selectAllEnabled||!this.allSelected||this.hasDisabledItems)&&m.selected&&(!o||!I(m))&&a.push(this.renderChip({activeChipIndex:e,disabled:!1,index:E++,item:m,messages:n,readOnly:t,scale:l,isAncestors:o}))}):(!this.selectAllEnabled||!this.allSelected||this.hasDisabledItems)&&this.selectedItems.forEach(m=>{a.push(this.renderChip({activeChipIndex:e,disabled:!1,index:E++,item:m,messages:n,readOnly:t,scale:l,isAncestors:o}))}),i==="fit"&&b.length&&a.push(this.renderChipCount(b.length,l)),a.length?a:null}renderAllSelectedIndicatorChip(){let{allSelectedIndicatorChipRef:e,compactSelectionDisplay:t,scale:l,selectedVisibleChipsCount:i}=this,s=t?this.messages.all:this.messages.allSelected,n=this.allSelected&&(this.selectionDisplay==="single"||!i||this.selectionDisplay==="fit"&&this.hasDisabledSelected||this.selectionDisplay==="all"&&this.hasDisabledSelected);return d`<calcite-chip class=${h({[c.chip]:!0,[c.chipInvisible]:!n,[c.allSelected]:!0})} .label=${s} .scale=${l} title=${s??f} value ${v(e)}>${s}</calcite-chip>`}renderSelectedIndicatorChip(){let{compactSelectionDisplay:e,selectionDisplay:t,scale:l,selectedHiddenChipsCount:i,selectedVisibleChipsCount:s,selectedIndicatorChipRef:n}=this,a=this.allSelected&&!this.hasDisabledItems,o=this.allSelected&&this.hasDisabledSelected,r,u;if(e)r=!0;else if(t==="single"){let b=this.allItems.filter(g=>g.selected&&(this.selectionMode!=="ancestors"||!I(g))).length;this.allSelected?r=!0:b>0?r=!1:r=!0,u=`${b} ${this.messages.selected}`}else t==="fit"&&(r=!!((a||o)&&s===0||i===0),u=s>0?`+${i}`:`${i} ${this.messages.selected}`);return d`<calcite-chip class=${h({[c.chip]:!0,[c.chipInvisible]:r})} .label=${u} .scale=${l} title=${u??f} value ${v(n)}>${u}</calcite-chip>`}renderSelectedIndicatorChipCompact(){let{compactSelectionDisplay:e,selectionDisplay:t,scale:l,selectedHiddenChipsCount:i}=this,s=this.allSelected&&!this.hasDisabledItems,n=this.allSelected&&this.hasDisabledSelected,a,o;if(e){let r=this.allItems.filter(u=>u.selected&&(this.selectionMode!=="ancestors"||!I(u))).length;s||n||t==="single"&&this.allSelected?a=!0:t==="fit"?(a=!(i>0),o=`${i||0}`):t==="single"&&(a=!(r>0),o=`${r}`)}else a=!0;return d`<calcite-chip class=${h({[c.chip]:!0,[c.chipInvisible]:a})} .label=${o} .scale=${l} title=${o??f} value>${o}</calcite-chip>`}renderInput(){let{guid:e,disabled:t,placeholder:l,selectionMode:i,selectedItems:s,open:n}=this,a=w(i),o=s[0],r=!n&&a&&!!o&&!this.filterText;return d`<span class=${h({[c.inputWrap]:!0,[c.inputWrapSingle]:a})}>${r&&S("label",d`<span class=${h({[c.label]:!0,[c.labelIcon]:!!o?.icon})}>${A(o)}</span>`)||""}${S("input",d`<input aria-activedescendant=${this.activeDescendant??f} aria-controls=${`${p.listbox(e)}`} aria-errormessage=${p.validationMessage} aria-owns=${`${p.listbox(e)}`} aria-autocomplete=list .ariaDescription=${this.getDescriptionMessage()} .ariaExpanded=${n} aria-haspopup=listbox .ariaInvalid=${this.status==="invalid"} .ariaLabel=${pe(this)} class=${h({[c.input]:!0,[c.inputSingle]:!0,[c.inputHidden]:r,[c.inputIcon]:this.showingInlineIcon&&!!this.placeholderIcon})} .disabled=${t} .id=${`${p.input(e)}`} @focus=${this.comboboxFocusHandler} @input=${this.inputHandler} placeholder=${l??f} .readOnly=${this.readOnly} .required=${this.required} role=combobox .tabIndex=${this.activeChipIndex===-1?0:-1} type=text .value=${U(this.filterText??"")} ${v(this.textInputRef)}>`)}</span>`}renderListBoxOptions(){let e=this.keyboardNavItems.map(t=>this.createScreenReaderItem({ariaLabel:t.label,ariaSelected:t.selected,id:`${p.item(t.guid)}`,textContent:t.heading}));if(this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"){let t=this.createScreenReaderItem({ariaLabel:this.messages.selectAll,ariaSelected:this.allSelected,textContent:this.messages.selectAll});t&&e.unshift(t)}return e}renderFloatingUIContainer(){let{messages:e,setFloatingEl:t,setContainerEl:l,open:i,scale:s}=this,n={[c.listContainer]:!0,[B.animation]:!0,[B.animationActive]:i},a=(this.filterText&&e.add?.replace("{text}",`${this.filterText}`))??"";return d`<div aria-hidden=true class=${h(c.floatingUIContainer)} popover=manual ${v(t)}><div class=${h(n)} ${v(l)}><ul class=${h({[c.list]:!0,[c.listHide]:!i})}>${this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"&&d`<calcite-combobox-item class=${h(c.selectAll)} .heading=${e.selectAll} .id=${`${this.guid}-select-all-enabled-interactive`} .indeterminate=${this.indeterminate} .label=${e.selectAll} .scale=${s} .selected=${this.allSelected} tabindex=-1 value=select-all ${v(this.selectAllComboboxItemRef)}></calcite-combobox-item>`||""}<slot></slot>${this.noMatchesFound&&(this.allowCustomValues?d`<li aria-label=${a??f} class=${h(c.noMatches)} @click=${this.customChipAddHandler} role=option tabindex=0>${be({text:a,pattern:new RegExp(`(${z(this.filterText)})`,"i")})}</li>`:d`<li class=${h({[c.noMatchesPlaceholder]:!0,[c.noMatches]:!0})}>${e.noMatches}</li>`)||""}</ul></div></div>`}renderSelectedOrPlaceholderIcon(){let{open:e,placeholderIcon:t,placeholderIconFlipRtl:l,selectedItems:i}=this,s=i[0],n=s?.icon,a=t&&(e||!s);return this.showingInlineIcon&&S("selected-placeholder-icon",d`<span class=${h(c.iconStart)}><calcite-icon class=${h({[c.selectedIcon]:!a,[c.placeholderIcon]:a})} .flipRtl=${a?l:s.iconFlipRtl} .icon=${a?t:n} .scale=${O(this.scale)}></calcite-icon></span>`)||""}renderChevronIcon(){let{open:e}=this;return S("chevron",d`<span class=${h(c.iconEnd)}><calcite-icon class=${h(c.icon)} .icon=${e?L.chevronUp:L.chevronDown} .scale=${O(this.scale)}></calcite-icon></span>`)}render(){let{selectionDisplay:e,guid:t,label:l,open:i,readOnly:s}=this,n=w(this.selectionMode),a=e==="all",o=e==="single",r=!n&&e==="fit",u=!this.clearDisabled&&this.selectionMode!=="single-persist"&&!!this.value?.length,b=this.hasDisabledItems;return this.interactiveContainer({disabled:this.disabled,children:d`${this.labelText&&ue({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div aria-live=polite class=${h({[c.wrapper]:!0,[c.wrapperSingle]:n||!this.selectedItems.length,[c.wrapperActive]:i})} @click=${this.clickHandler} @keydown=${this.keyDownHandler} ${v(this.setReferenceEl)}>${this.renderSelectedOrPlaceholderIcon()}${S("grid",d`<div class=${h({[c.gridInput]:!0,[c.selectionDisplayFit]:r,[c.selectionDisplaySingle]:o})} ${v(this.setChipContainerEl)}>${!n&&!o&&this.renderChips()||""}${!n&&!o&&this.selectAllEnabled&&a&&(!b||this.hasDisabledSelected)&&this.renderAllSelectedIndicatorChip()||""}${!n&&!a&&[this.renderSelectedIndicatorChip(),this.renderSelectedIndicatorChipCompact(),this.renderAllSelectedIndicatorChip()]||""}<label class=${h(c.screenReadersOnly)} .htmlFor=${`${p.input(t)}`} .id=${`${p.label(t)}`}>${l}</label>${this.renderInput()}</div>`)}${!s&&u?xe({ariaLabel:this.messages.clear,disabled:this.disabled,ref:this.clearButtonRef,scale:this.scale,title:this.messages.clear}):null}${!s&&this.renderChevronIcon()||""}</div><ul aria-labelledby=${`${p.label(t)}`} aria-multiselectable=true class=${h(c.screenReadersOnly)} .id=${`${p.listbox(t)}`} role=listbox tabindex=-1>${this.renderListBoxOptions()}</ul>${this.renderFloatingUIContainer()}${this.validationMessage&&this.status==="invalid"?me({icon:this.validationIcon,id:p.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}};J("calcite-combobox",q);export{q as Combobox};
|
|
2
|
+
import{d as ge}from"./Y2OS6UOH.js";import{a as xe}from"./YGWAEV4M.js";import{a as ve}from"./ISATMK3J.js";import{b as W,c as Ie,d as I,f as w,g as A}from"./GK4OCOP2.js";import{a as H,b as M,d as c,e as p,f as L}from"./MYDCGCGV.js";import{a as me}from"./VHR5TDB3.js";import{b as z}from"./6URRYJJC.js";import{a as ue}from"./Q4P6Z6E5.js";import{a as fe}from"./JMN7KYK5.js";import{c as he,d as de,e as pe}from"./GP7XSV5A.js";import{a as ae}from"./WZFVGOB6.js";import{b as be}from"./4NYITE75.js";import{a as P,c as B,d as ce,e as ne,f as oe,g as D,h as re}from"./ZEEKQWVY.js";import{a as se}from"./AIMJAYF5.js";import{a as te}from"./5XHCDQFZ.js";import{a as S}from"./PZTXPQU2.js";import{a as le}from"./HJBXD2RY.js";import{a as ie}from"./AP2LDRUV.js";import{a as R,b as F}from"./ENDXE7YY.js";import{a as ee}from"./DICEHD76.js";import{a as Z}from"./Z6W2R7TV.js";import{a as O,b as V}from"./RH6ZIP65.js";import{e as K}from"./SLPX32KY.js";import"./RVK7AGJY.js";import{e as k,h as X,l as Y}from"./QHGI7X2A.js";import{a as Q}from"./OAOQ5BXS.js";import{D as U,E as $,F as v,G,H as h,L as _,N as j,S as J,g as N,h as d,l as f,p as x}from"./WDH6SQXQ.js";var Se=N`: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}:host([scale=s]){font-size:var(--calcite-font-size-relative-sm);--calcite-internal-combobox-spacing-unit-l: .5rem;--calcite-internal-combobox-spacing-unit-s: .25rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-2xs);--calcite-internal-combobox-no-matches-spacing-unit-s: .25rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.25rem - 1px) ;--calcite-internal-close-size: 1rem}:host([scale=m]){font-size:var(--calcite-font-size-relative-base);--calcite-internal-combobox-spacing-unit-l: .75rem;--calcite-internal-combobox-spacing-unit-s: .5rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-sm);--calcite-internal-combobox-no-matches-spacing-unit-s: .375rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.5rem - 1px) ;--calcite-internal-close-size: 1.5rem}:host([scale=l]){font-size:var(--calcite-font-size-relative-md);--calcite-internal-combobox-spacing-unit-l: 1rem;--calcite-internal-combobox-spacing-unit-s: .75rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-sm-plus);--calcite-internal-combobox-no-matches-spacing-unit-s: var(--calcite-space-sm-plus);--calcite-combobox-input-height: 1.5rem;--calcite-internal-combobox-input-margin-block: calc(var(--calcite-space-sm-plus) - 1px);--calcite-internal-close-size: 2rem}.wrapper{display:flex;border-width:1px;border-style:solid;outline-color:transparent;padding-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);padding-inline:var(--calcite-internal-combobox-spacing-unit-l) var(--calcite-internal-combobox-padding-inline-end);background-color:var(--calcite-combobox-input-background-color, var(--calcite-color-foreground-1));color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));border-color:var(--calcite-combobox-input-border-color, var(--calcite-color-border-input))}.wrapper:hover .icon{color:var(--calcite-combobox-icon-color-hover, var(--calcite-color-text-1))}:host(:focus-within) .wrapper,.wrapper--active{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([read-only]) .wrapper{background-color:var(--calcite-color-background)}:host([read-only]) .label{font-weight:var(--calcite-font-weight-medium)}:host([status=invalid]) .wrapper{border-color:var(--calcite-color-status-danger)}:host([status=invalid]:focus-within) .wrapper{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.wrapper--single{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l) var(--calcite-internal-combobox-padding-inline-end);cursor:pointer;flex-wrap:nowrap}.grid-input{position:relative;display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;gap:var(--calcite-internal-combobox-spacing-unit-s);margin-inline-end:var(--calcite-internal-combobox-spacing-unit-s)}.grid-input.selection-display--fit,.grid-input.selection-display--single{flex-wrap:nowrap;overflow:hidden}.input{flex-grow:1;appearance:none;overflow:hidden;text-overflow:ellipsis;border-style:none;background-color:transparent;padding:0;font-family:inherit;color:var(--calcite-color-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);inline-size:100%;margin-block-end:var(--calcite-internal-combobox-spacing-unit-s);min-inline-size:4.8125rem}.input:focus{outline:2px solid transparent;outline-offset:2px}.input:placeholder-shown{text-overflow:ellipsis}.input--single{padding:0;margin-block:var(--calcite-internal-combobox-input-margin-block)}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;width:0px;min-width:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.placeholder-icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.input-wrap{display:flex;flex-grow:1;align-items:center}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;max-width:100%;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;font-weight:var(--calcite-font-weight-normal);block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--icon{padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.icon-end,.icon-start{display:flex;cursor:pointer;align-items:center}.icon-end{flex:none}.icon-end .icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.floating-ui-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}@starting-style{.floating-ui-container{opacity:0;inset-block-start:0;left:0}}:host([top-layer-disabled]) .floating-ui-container{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown)}.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}}@media(forced-colors:active){.wrapper,.floating-ui-container{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}.list-container{max-height:45vh;overflow-y:auto;inline-size:var(--calcite-dropdown-width, 100%);background-color:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1))}.list{margin:0;display:block;padding:0;line-height:var(--calcite-font-line-height-relative-snug)}.list--hide{height:0px;overflow:hidden}calcite-chip{--calcite-animation-timing: 0}.chip{margin-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);max-inline-size:100%}.chip--invisible{visibility:hidden;position:absolute}.item{display:block}.select-all{background-color:var(--calcite-combobox-item-background-color-active, var(--calcite-color-foreground-1));border-block-end-color:var(--calcite-combobox-divider-color, var(--calcite-combobox-item-border-color, var(--calcite-color-border-3)));border-block-end-style:solid;border-block-end-width:var(--calcite-border-width-sm);inset-block-start:0;position:sticky;z-index:var(--calcite-z-index-sticky)}.no-matches{padding-block:var(--calcite-internal-combobox-no-matches-spacing-unit-s);padding-inline:var(--calcite-internal-combobox-spacing-unit-l);color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));background:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1));cursor:pointer}.no-matches-placeholder{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3));cursor:default}.disabled{opacity:.5}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.clear-button--container{display:flex;cursor:pointer;align-items:center}.clear-button--container:hover calcite-action{--calcite-action-background-color: var(--calcite-clear-button-background-color-hover, var(--calcite-color-foreground-3));--calcite-action-text-color: var(--calcite-clear-button-icon-color-hover, var(--calcite-color-text-1))}.clear-button--container:active calcite-action{--calcite-action-background-color: var(--calcite-clear-button-background-color-press, var(--calcite-color-border-2));--calcite-action-text-color: var(--calcite-clear-button-icon-color-press, var(--calcite-color-text-1))}.clear-button--container calcite-action{--calcite-internal-action-height: 100%;--calcite-internal-action-padding-inline: var(--calcite-spacing-none);--calcite-internal-action-padding-block: var(--calcite-spacing-none);--calcite-action-background-color: var(--calcite-clear-button-background-color, var(--calcite-color-foreground-2));--calcite-action-text-color: var(--calcite-clear-button-icon-color)}.clear-button--container calcite-action:hover{--calcite-action-background-color-hover: var(--calcite-clear-button-background-color-hover, var(--calcite-color-foreground-3));--calcite-action-text-color-press: var(--calcite-clear-button-icon-color-hover)}.clear-button--container calcite-action:active{--calcite-action-background-color-press: var(--calcite-clear-button-background-color-press, var(--calcite-color-border-2));--calcite-action-text-color-press: var(--calcite-clear-button-icon-color-press)}:host([scale=s]) .clear-button--container{padding:var(--calcite-spacing-xxs)}:host([scale=m]) .clear-button--container{padding:var(--calcite-spacing-xxs);padding-inline-end:var(--calcite-space-sm)}:host([scale=l]) .clear-button--container{padding-inline-end:var(--calcite-spacing-sm-plus)}.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}.text-match{background-color:transparent;color:inherit;font-weight:var(--calcite-font-weight-bold)}.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)}::placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-placeholder-text-color, var(--calcite-color-text-3))}`,q=class extends G{constructor(){super(),this.direction=K(),this.formSupport=fe({inputType:"text"})(this),this.selectAllComboboxItemRef=$(),this.allSelectedIndicatorChipRef=$(),this.cancelable=le()(this),this.filterItems=(()=>{let e=(t,l)=>t&&l.some(({el:i})=>t===i);return ie((t,l=!1,i=!0)=>{let s=ve([...this.data,...this.groupData],t,this.effectiveFilterProps),n=this.getItemsAndGroups(),a=t==="";n.forEach(o=>{if(a){o.itemHidden=!1;return}let r=!e(o,s);o.itemHidden=r;let[u,b]=o.ancestors;(e(u,s)||e(b,s))&&(o.itemHidden=!1),r||o.ancestors.forEach(g=>g.itemHidden=!1)}),this.noMatchesFound=this.filteredItems.length===0&&!!this.filterText,this.filterTextMatchPattern=this.filterText&&new RegExp(`(${z(this.filterText)})`,"i"),this.keyboardNavItems.forEach(o=>{o.filterTextMatchPattern=this.filterTextMatchPattern}),l&&(this.open=this.filterText.trim().length>0),i&&this.calciteComboboxFilterChange.emit()},j.filter)})(),this._filterText="",this.getSelectedItems=()=>{if(!this.isMulti()){let e=this.items.find(({selected:t})=>t);return e?[e]:[]}return this.items.filter(e=>e.selected&&(this.selectionMode!=="ancestors"||!I(e))).sort((e,t)=>{let l=this.selectedItems.indexOf(e),i=this.selectedItems.indexOf(t);return l>-1&&i>-1?l-i:i-l})},this.groupItems=[],this.guid=Q(),this.ignoreSelectedEventsFlag=!1,this.internalValueChangeFlag=!1,this.mutationObserver=R("mutation",()=>this.updateItems()),this.onLabelClick=()=>{this.setFocus()},this.transitionProp="opacity",this.resizeObserver=R("resize",()=>{this.setMaxScrollerHeight(),this.refreshSelectionDisplay()}),this.selectedIndicatorChipRef=$(),this.clearButtonRef=$(),this._selectedItems=[],this.textInputRef=$(),this._value=null,this.messages=ee(),this.focusSetter=Z()(this),this.customChipAddHandler=()=>{this.addCustomChip(this.filterText,!0)},this.interactiveContainer=te(this),this.topLayer=ae({target:()=>this.floatingEl})(this),this.activeChipIndex=-1,this.activeDescendant="",this.activeItemIndex=-1,this.compactSelectionDisplay=!1,this.selectedHiddenChipsCount=0,this.selectedVisibleChipsCount=0,this.allItems=[],this.items=[],this.clearDisabled=!1,this.disabled=!1,this.maxItems=0,this.open=!1,this.overlayPositioning="absolute",this.placeholderIconFlipRtl=!1,this.placement=P,this.readOnly=!1,this.required=!1,this.scale="m",this.selectAllEnabled=!1,this.selectionDisplay="all",this.selectionAppearance="icon",this.selectionMode="multiple",this.status="idle",this.topLayerDisabled=!1,this.calciteComboboxBeforeClose=x({cancelable:!1}),this.calciteComboboxBeforeOpen=x({cancelable:!1}),this.calciteComboboxChange=x({cancelable:!1}),this.calciteComboboxChipClose=x({cancelable:!1}),this.calciteComboboxClose=x({cancelable:!1}),this.calciteComboboxFilterChange=x({cancelable:!1}),this.calciteComboboxOpen=x({cancelable:!1}),this.listenOn(document,"click",this.documentClickHandler),this.listen("calciteComboboxItemChange",this.calciteComboboxItemChangeHandler),this.listen("calciteInternalComboboxItemChange",this.calciteInternalComboboxItemChangeHandler),this.listen("click",this.comboboxFocusHandler)}static{this.properties={activeChipIndex:[16,{},{state:!0}],activeDescendant:[16,{},{state:!0}],activeItemIndex:[16,{},{state:!0}],compactSelectionDisplay:[16,{},{state:!0}],selectedHiddenChipsCount:[16,{},{state:!0}],selectedVisibleChipsCount:[16,{},{state:!0}],allItems:[16,{},{state:!0}],items:[16,{},{state:!0}],noMatchesFound:[16,{},{state:!0}],allowCustomValues:[7,{},{reflect:!0,type:Boolean}],clearDisabled:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],filterText:[3,{},{reflect:!0}],filterProps:[0,{},{attribute:!1}],filteredItems:[32,{},{attribute:!1,readOnly:!0}],flipPlacements:[0,{},{attribute:!1}],form:[3,{},{reflect:!0}],label:1,labelText:1,maxItems:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placeholder:1,placeholderIcon:[3,{type:String},{reflect:!0}],placeholderIconFlipRtl:[7,{},{reflect:!0,type:Boolean}],placement:[3,{},{reflect:!0}],readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectAllEnabled:[7,{},{reflect:!0,type:Boolean}],selectedItems:[0,{},{attribute:!1}],selectionDisplay:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],validationIcon:[3,{converter:_,type:String},{reflect:!0}],validationMessage:1,validity:[32,{},{readOnly:!0,attribute:!1}],value:1}}static{this.formAssociated=!0}static{this.styles=Se}get effectiveFilterProps(){return this.filterProps?this.filterProps.filter(e=>e!=="el"):["description","label","metadata","shortHeading"]}get showingInlineIcon(){let{placeholderIcon:e,selectionMode:t,selectedItems:l,open:i}=this,s=l[0],n=s?.icon,a=w(t);return!i&&s?!!n&&a:!!e&&(!s||a)}get allSelected(){let e=this.allItems.filter(t=>!t.disabled);return e.length>0&&e.every(t=>t.selected)}get hasDisabledItems(){return this.allItems.some(e=>e.disabled)}get hasDisabledSelected(){return this.allItems.some(e=>e.disabled&&e.selected)}get indeterminate(){let e=this.selectedItems.length>0||this.hasDisabledSelected;return this.selectAllEnabled?!this.allSelected&&e:this.selectedItems.length>0&&!this.allSelected}get keyboardNavItems(){let{selectAllComboboxItemRef:e}=this,t=this.filteredItems.filter(l=>!l.disabled);return e.value?[e.value,...t]:t}get filterText(){return this._filterText}set filterText(e){let t=this._filterText;e!==t&&(this._filterText=e,this.filterTextChange(e))}get filteredItems(){return this.items.filter(e=>!V(e))}get selectedItems(){return this._selectedItems}set selectedItems(e){let t=this._selectedItems;e!==t&&(this._selectedItems=e,this.selectedItemsHandler())}get value(){return this._value}set value(e){let t=this._value;e!==t&&(this._value=e,this.valueHandler(e))}async reposition(e=!1){let{floatingEl:t,referenceEl:l,placement:i,overlayPositioning:s,filteredFlipPlacements:n}=this;return ne(this,{direction:this.direction,floatingEl:t,referenceEl:l,overlayPositioning:s,placement:i,flipPlacements:n,type:"menu"},e)}async setFocus(e){return this.focusSetter(()=>(this.activeChipIndex=-1,this.activeItemIndex=-1,this.textInputRef.value),e)}connectedCallback(){super.connectedCallback(),he(this),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),D(this),this.cancelable.add(this.filterItems)}async load(){this.handleSelectionModeWarning()}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),e.has("maxItems")&&(this.hasUpdated||this.maxItems!==0)&&this.setMaxScrollerHeight(),(e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||e.has("placement")&&(this.hasUpdated||this.placement!==P))&&this.reposition(!0),(e.has("selectionMode")||e.has("scale")||e.has("selectionAppearance"))&&this.updateItems(),e.has("flipPlacements")&&this.flipPlacementsHandler()}loaded(){D(this),this.updateItems(),this.filterItems(this.filterText,!1,!1)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),de(this),re(this)}emitComboboxChange(){this.calciteComboboxChange.emit()}filterTextChange(e){this.updateActiveItemIndex(-1),this.filterItems(e,!0)}openHandler(){this.disabled||se(this)}handleDisabledChange(e){e||(this.open=!1)}valueHandler(e){this.internalValueChangeFlag||(this.items.forEach(t=>{t.selected=Array.isArray(e)?e.includes(t.value):e===t.value}),this.updateItems())}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}selectedItemsHandler(){this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,this.selectionDisplay==="fit"&&this.isMulti()&&this.refreshSelectionDisplay()}async documentClickHandler(e){this.disabled||e.composedPath().includes(this.el)||(await this.componentOnReady(),!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1)),this.allowCustomValues&&this.filterText.trim().length&&this.addCustomChip(this.filterText),this.open=!1)}handleSelectAll(e){e&&this.toggleSelectAll(),this.allSelected&&(!this.hasDisabledItems||this.hasDisabledSelected)&&this.selectedItems.forEach(t=>{let l=this.referenceEl.querySelector(`#${p.chip(t.guid)}`);l&&this.hideChip(l)})}calciteComboboxItemChangeHandler(e){if(this.ignoreSelectedEventsFlag)return;let t=e.target,l=e.composedPath().includes(this.selectAllComboboxItemRef.value);this.selectAllEnabled&&this.handleSelectAll(l);let i=this.keyboardNavItems.indexOf(l?this.selectAllComboboxItemRef.value:t);this.updateActiveItemIndex(i),this.toggleSelection(t,t.selected),this.selectedItems=this.getSelectedItems()}calciteInternalComboboxItemChangeHandler(e){e.stopPropagation(),this.hasUpdated&&this.updateItems()}clearValue(){this.ignoreSelectedEventsFlag=!0,this.items.forEach(e=>e.selected=!1),this.ignoreSelectedEventsFlag=!1,this.selectedItems=[],this.emitComboboxChange(),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems(""),this.setFocus()}clearInputValue(){this.textInputRef.value&&(this.textInputRef.value.value=""),this.filterText=""}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?ce(t,e):null}getValue(){let e=this.selectedItems.map(t=>t.value?.toString());return e.length?e.length>1?e:e[0]:""}comboboxInViewport(){let e=this.el.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.right<=(window.innerWidth||document.documentElement.clientWidth)&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)}toggleSelectAll(){let e=!this.allSelected;this.allItems.forEach(t=>{t.disabled||(t.selected=e)}),this.selectedItems=this.getSelectedItems(),this.emitComboboxChange()}keyDownHandler(e){if(this.readOnly)return;let{key:t}=e;switch(t){case"Tab":this.activeChipIndex=-1,this.activeItemIndex=-1,this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):this.open?(this.open=!1,e.preventDefault()):!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1));break;case"ArrowLeft":(this.activeChipIndex!==-1||this.textInputRef.value.selectionStart===0)&&(this.previousChip(),e.preventDefault());break;case"ArrowRight":this.activeChipIndex!==-1&&(this.nextChip(),e.preventDefault());break;case"ArrowUp":this.keyboardNavItems.length&&(e.preventDefault(),this.open&&this.shiftActiveItemIndex(-1),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView()),this.scrollToActiveOrSelectedItem();break;case"ArrowDown":this.keyboardNavItems.length&&(e.preventDefault(),this.open?this.shiftActiveItemIndex(1):(this.open=!0,this.ensureRecentSelectedItemIsActive()),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView());break;case" ":!this.textInputRef.value.value&&!e.defaultPrevented&&(this.open||(this.open=!0,this.shiftActiveItemIndex(1)),e.preventDefault());break;case"Home":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(0),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"End":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(this.filteredItems.length-1),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"Escape":!this.clearDisabled&&!this.open&&this.clearValue(),this.open=!1,e.preventDefault();break;case"Enter":this.open&&this.activeItemIndex>-1?(this.keyboardNavItems[this.activeItemIndex].toggleSelection(),e.preventDefault()):this.activeChipIndex>-1?(this.removeActiveChip(e.target),e.preventDefault()):this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):!e.defaultPrevented&&this.formSupport.active&&(e.preventDefault(),this.formSupport.requestSubmit());break;case"Delete":case"Backspace":{if(this.selectionDisplay==="single"||this.selectionDisplay==="fit"&&this.selectedHiddenChipsCount>0)return;this.activeChipIndex>-1?(e.preventDefault(),this.removeActiveChip(e.target)):!this.filterText&&this.isMulti()&&(e.preventDefault(),this.removeLastChip());break}}}onBeforeOpen(){this.topLayer.show(),this.reposition(),this.calciteComboboxBeforeOpen.emit(),setTimeout(()=>this.scrollToActiveOrSelectedItem(!0),0)}onOpen(){this.calciteComboboxOpen.emit()}onBeforeClose(){this.calciteComboboxBeforeClose.emit()}onClose(){this.calciteComboboxClose.emit(),oe(this),this.topLayer.hide()}async setMaxScrollerHeight(){let{listContainerEl:e,open:t,referenceEl:l}=this;if(!e||!t)return;let i=this.getMaxScrollerHeight();e.style.maxBlockSize=i>0?`${i}px`:"",e.style.inlineSize=`${l.clientWidth}px`}calciteChipCloseHandler(e){this.open=!1;let t=this.items.find(l=>l===e);t&&this.toggleSelection(t,!1),this.calciteComboboxChipClose.emit()}clickHandler(e){if(this.readOnly)return;let t=e.composedPath();if(t.some(l=>l.tagName==="CALCITE-CHIP")){this.open=!1,e.preventDefault();return}if(t.includes(this.clearButtonRef.value)){this.clearValue(),e.preventDefault();return}this.open=!this.open,this.ensureRecentSelectedItemIsActive()}ensureRecentSelectedItemIsActive(){let{selectedItems:e}=this,t=e.length===0?0:this.items.indexOf(e[e.length-1]);this.updateActiveItemIndex(t)}hideChip(e){e.classList.add(c.chipInvisible)}showChip(e){e.classList.remove(c.chipInvisible)}refreshChipDisplay({chipEls:e,availableHorizontalChipElSpace:t,chipContainerElGap:l}){e.forEach(i=>{if(!i.selected)this.hideChip(i);else{let s=k(i);if(s&&s<t){t-=s+l,this.showChip(i);return}}this.hideChip(i)})}async refreshSelectionDisplay(){if(this.componentOnReady(),w(this.selectionMode)||!this.textInputRef.value||!this.chipContainerEl)return;let{allSelectedIndicatorChipRef:e,chipContainerEl:t,selectionDisplay:l,placeholder:i,selectedIndicatorChipRef:s,textInputRef:n}=this,a=parseInt(getComputedStyle(t).gap.replace("px","")),o=k(t),{fontSize:r,fontFamily:u}=getComputedStyle(n.value),g=(X(i,`${r} ${u}`)||parseInt(ge))+a,E=k(e.value),T=k(s.value),m=Math.max(E,T);if(this.setCompactSelectionDisplay({chipContainerElGap:a,chipContainerElWidth:o,inputWidth:g,largestSelectedIndicatorChipWidth:m}),this.allSelected&&this.selectAllEnabled&&(!this.hasDisabledItems||this.hasDisabledSelected)&&this.selectedItems.forEach(y=>{let C=this.referenceEl.querySelector(`#${p.chip(y.guid)}`);C&&this.hideChip(C)}),this.indeterminate&&this.selectedItems.forEach(y=>{let C=this.referenceEl.querySelector(`#${p.chip(y.guid)}`);C&&this.showChip(C)}),l==="fit"){let y=Array.from(this.el.shadowRoot.querySelectorAll("calcite-chip")).filter(Ce=>Ce.closable),C=Math.round(o-((this.selectedHiddenChipsCount>0?T:0)+a+g+a));this.refreshChipDisplay({availableHorizontalChipElSpace:C,chipContainerElGap:a,chipEls:y}),this.setVisibleAndHiddenChips(y)}}setFloatingEl(e){this.floatingEl=e,D(this)}setCompactSelectionDisplay({chipContainerElGap:e,chipContainerElWidth:t,inputWidth:l,largestSelectedIndicatorChipWidth:i}){let s=Math.round(i+e+l);(!this.maxCompactBreakpoint||this.maxCompactBreakpoint<s)&&(this.maxCompactBreakpoint=s),this.compactSelectionDisplay=t<this.maxCompactBreakpoint}setContainerEl(e){F(this.resizeObserver,this.listContainerEl,e),this.listContainerEl=e,this.transitionEl=e}setChipContainerEl(e){F(this.resizeObserver,this.chipContainerEl,e),this.chipContainerEl=e}setReferenceEl(e){this.referenceEl=e,D(this)}setVisibleAndHiddenChips(e){let t=0;e.forEach(i=>{i.selected&&!i.classList.contains(c.chipInvisible)&&t++}),t!==this.selectedVisibleChipsCount&&(this.selectedVisibleChipsCount=t);let l=Math.max(0,this.getSelectedItems().length-t);l!==this.selectedHiddenChipsCount&&(this.selectedHiddenChipsCount=l)}getMaxScrollerHeight(){let t=this.getItemsAndGroups(!0).filter(n=>!V(n)),{maxItems:l}=this,i=0,s=0;return t.length>=l&&t.forEach(n=>{if(i<l){let a=this.calculateScrollerHeight(n);s+=a,i+=1}}),s}calculateScrollerHeight(e){if(!e)return 0;let t=e.getBoundingClientRect().height,l=`:scope > ${H}, :scope > ${M}`,i=Array.from(e.querySelectorAll(l)).reduce((s,n)=>s+n.getBoundingClientRect().height,0);return t-i}inputHandler(e){let t=e.target.value;this.filterText=t}getItemsAndGroups(e=!1){return e?Array.from(this.el.querySelectorAll(`${H}, ${M}`)):[...this.groupItems,...this.items]}toggleSelection(e,t){!e||this.selectionMode==="single-persist"&&e.selected&&e.value===this.value&&!t||(this.isMulti()?this.handleMultiSelection(e,t):this.handleSingleSelection(e,t))}handleMultiSelection(e,t){e.selected=t,this.updateAncestors(e),this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.resetText(),this.filterItems("")}handleSingleSelection(e,t){this.ignoreSelectedEventsFlag=!0,this.items.forEach(l=>l.selected=l===e?t:!1),this.ignoreSelectedEventsFlag=!1,this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.textInputRef.value&&(this.textInputRef.value.value=A(e)),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")}updateAncestors(e){if(this.selectionMode!=="ancestors")return;let t=W(e),l=Ie(e);e.selected?t.forEach(i=>{i.selected=!0}):(l.forEach(i=>{i.disabled||(i.selected=!1)}),[...t].forEach(i=>{I(i)||(i.selected=!1)}))}updateItems(){this.allItems=this.getItems(!0),this.items=this.allItems.filter(e=>!e.disabled),this.groupItems=this.getGroupItems(),this.data=this.getData(),this.groupData=this.getGroupData(),this.updateItemProps(),this.selectedItems=this.getSelectedItems()}updateItemProps(){this.allItems.forEach(e=>{e.selectionMode=this.selectionMode,e.selectionAppearance=this.selectionAppearance,e.scale=this.scale}),this.groupItems.forEach((e,t)=>(e.scale=this.scale,e.position=t)),this.allowCustomValues||this.setMaxScrollerHeight(),this.groupItems.forEach((e,t,l)=>{t===0&&(e.afterEmptyGroup=!1);let i=l[t+1];i&&(i.afterEmptyGroup=e.children.length===0)})}getData(){return this.items.map(e=>({description:e.description,filterDisabled:e.filterDisabled,label:e.heading,metadata:e.metadata,shortHeading:e.shortHeading,el:e}))}getGroupData(){return this.groupItems.map(e=>({label:e.label,el:e}))}resetText(){this.textInputRef.value&&(this.textInputRef.value.value=""),this.filterText=""}getItems(e=!1){return Array.from(this.el.querySelectorAll(H)).filter(l=>e||!l.disabled)}getGroupItems(){return Array.from(this.el.querySelectorAll(M))}addCustomChip(e,t){let l=this.items.find(i=>i.heading===e);if(l)this.toggleSelection(l,!0);else{let i=document.createElement("calcite-combobox-item");i.value=e,i.heading=e,this.el.prepend(i),this.updateItems(),this.toggleSelection(i,!0),this.open=!0,t&&this.setFocus()}}removeActiveChip(e){let t=this.selectedItems[this.activeChipIndex];t&&`${p.chip(t.guid)}`===e.id&&this.toggleSelection(t,!1),this.setFocus()}removeLastChip(){this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1),this.setFocus()}previousChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex;this.activeChipIndex=t===-1?e:Math.max(t-1,0),this.updateActiveItemIndex(-1),this.focusChip()}nextChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex+1;t>e?(this.activeChipIndex=-1,Y(this.textInputRef.value)):(this.activeChipIndex=t,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){let e=this.selectedItems[this.activeChipIndex]?.guid;(e?this.referenceEl.querySelector(`#${p.chip(e)}`):null)?.setFocus()}scrollToActiveOrSelectedItem(e=!1){let t=e&&this.selectedItems?.length?this.selectedItems[0]:this.keyboardNavItems[this.activeItemIndex],l=this.listContainerEl;if(!t||!l)return;t.scrollIntoView({block:"nearest"});let s=this.selectAllComboboxItemRef.value?.offsetHeight||0,n=t.getBoundingClientRect(),a=l.getBoundingClientRect();n.top<a.top+s&&(l.scrollTop-=a.top+s-n.top)}shiftActiveItemIndex(e){let{length:t}=this.keyboardNavItems,l=(this.activeItemIndex+t+e)%t;this.updateActiveItemIndex(l),this.scrollToActiveOrSelectedItem()}updateActiveItemIndex(e){this.activeItemIndex=e;let t=null;this.keyboardNavItems.forEach((l,i)=>{i===e?(l.active=!0,t=`${p.item(l.guid)}`):l.active=!1}),this.activeDescendant=t,this.activeItemIndex>-1&&(this.activeChipIndex=-1)}isMulti(){return!w(this.selectionMode)}comboboxFocusHandler(){this.disabled||this.textInputRef.value.focus()}createScreenReaderItem({ariaLabel:e,ariaSelected:t,id:l,textContent:i}){return d`<li aria-label=${e??f} aria-selected=${t??f} id=${l??f} role=option tabindex=-1>${i}</li>`}handleSelectionModeWarning(){this.selectionMode==="single-persist"&&this.clearDisabled&&console.warn('clearDisabled is ignored when selection-mode is set to "single-persist"')}getDescriptionMessage(){let e=Array.isArray(this.value)?this.value.join(", "):this.value;return this.readOnly?this.messages.nonEditable?.replace("{value}",`${e}`):e}getChipLabel(e,t){return t?[...[...W(e)].reverse(),e].map(i=>A(i)).join(" / "):A(e)}renderChip({activeChipIndex:e,disabled:t,index:l,item:i,messages:s,readOnly:n,scale:a,isAncestors:o}){let r=this.getChipLabel(i,o);return S(i.guid||i.value||r,d`<calcite-chip .appearance=${n?"outline":"solid"} class=${h({[c.chip]:!0,[c.disabled]:t})} .closable=${!t&&!n} .disabled=${t} .icon=${i.icon} .iconFlipRtl=${i.iconFlipRtl} id=${(!t&&i.guid?`${p.chip(i.guid)}`:null)??f} .label=${r} .messageOverrides=${t?null:{dismissLabel:s.removeTag}} @focusin=${t?null:()=>this.activeChipIndex=l} @calciteChipClose=${t?null:()=>this.calciteChipCloseHandler(i)} .scale=${a} .selected=${i.selected} .tabIndex=${!t&&e===l?0:-1} title=${r??f} .value=${i.value}>${r}</calcite-chip>`)}renderChipCount(e,t){let l=this.messages.disabledSelectedCount?.replace("{count}",`${e}`)??`+${e}`;return d`<calcite-chip appearance=solid class=${h({[c.chip]:!0})} .label=${l} .scale=${t} tabindex=-1 title=${l??f}>${l}</calcite-chip>`}renderChips(){let{activeChipIndex:e,readOnly:t,scale:l,selectionDisplay:i,selectionMode:s,messages:n}=this,a=[],o=s==="ancestors",r=this.allSelected&&!this.hasDisabledItems,u=this.allSelected&&this.hasDisabledSelected,b=this.allItems.filter(m=>m.disabled&&m.selected&&(!o||!I(m))),g=i==="all";if(i==="fit"&&(r||u)||i==="all"&&this.selectAllEnabled&&u||this.selectAllEnabled&&this.allSelected&&!this.hasDisabledItems)return null;let E=0,T=0;return g?this.allItems.forEach(m=>{if(m.disabled){m.selected&&(!o||!I(m))&&a.push(this.renderChip({activeChipIndex:e,disabled:!0,index:T++,item:m,messages:n,readOnly:t,scale:l,isAncestors:o}));return}(!this.selectAllEnabled||!this.allSelected||this.hasDisabledItems)&&m.selected&&(!o||!I(m))&&a.push(this.renderChip({activeChipIndex:e,disabled:!1,index:E++,item:m,messages:n,readOnly:t,scale:l,isAncestors:o}))}):(!this.selectAllEnabled||!this.allSelected||this.hasDisabledItems)&&this.selectedItems.forEach(m=>{a.push(this.renderChip({activeChipIndex:e,disabled:!1,index:E++,item:m,messages:n,readOnly:t,scale:l,isAncestors:o}))}),i==="fit"&&b.length&&a.push(this.renderChipCount(b.length,l)),a.length?a:null}renderAllSelectedIndicatorChip(){let{allSelectedIndicatorChipRef:e,compactSelectionDisplay:t,scale:l,selectedVisibleChipsCount:i}=this,s=t?this.messages.all:this.messages.allSelected,n=this.allSelected&&(this.selectionDisplay==="single"||!i||this.selectionDisplay==="fit"&&this.hasDisabledSelected||this.selectionDisplay==="all"&&this.hasDisabledSelected);return d`<calcite-chip class=${h({[c.chip]:!0,[c.chipInvisible]:!n,[c.allSelected]:!0})} .label=${s} .scale=${l} title=${s??f} value ${v(e)}>${s}</calcite-chip>`}renderSelectedIndicatorChip(){let{compactSelectionDisplay:e,selectionDisplay:t,scale:l,selectedHiddenChipsCount:i,selectedVisibleChipsCount:s,selectedIndicatorChipRef:n}=this,a=this.allSelected&&!this.hasDisabledItems,o=this.allSelected&&this.hasDisabledSelected,r,u;if(e)r=!0;else if(t==="single"){let b=this.allItems.filter(g=>g.selected&&(this.selectionMode!=="ancestors"||!I(g))).length;this.allSelected?r=!0:b>0?r=!1:r=!0,u=`${b} ${this.messages.selected}`}else t==="fit"&&(r=!!((a||o)&&s===0||i===0),u=s>0?`+${i}`:`${i} ${this.messages.selected}`);return d`<calcite-chip class=${h({[c.chip]:!0,[c.chipInvisible]:r})} .label=${u} .scale=${l} title=${u??f} value ${v(n)}>${u}</calcite-chip>`}renderSelectedIndicatorChipCompact(){let{compactSelectionDisplay:e,selectionDisplay:t,scale:l,selectedHiddenChipsCount:i}=this,s=this.allSelected&&!this.hasDisabledItems,n=this.allSelected&&this.hasDisabledSelected,a,o;if(e){let r=this.allItems.filter(u=>u.selected&&(this.selectionMode!=="ancestors"||!I(u))).length;s||n||t==="single"&&this.allSelected?a=!0:t==="fit"?(a=!(i>0),o=`${i||0}`):t==="single"&&(a=!(r>0),o=`${r}`)}else a=!0;return d`<calcite-chip class=${h({[c.chip]:!0,[c.chipInvisible]:a})} .label=${o} .scale=${l} title=${o??f} value>${o}</calcite-chip>`}renderInput(){let{guid:e,disabled:t,placeholder:l,selectionMode:i,selectedItems:s,open:n}=this,a=w(i),o=s[0],r=!n&&a&&!!o&&!this.filterText;return d`<span class=${h({[c.inputWrap]:!0,[c.inputWrapSingle]:a})}>${r&&S("label",d`<span class=${h({[c.label]:!0,[c.labelIcon]:!!o?.icon})}>${A(o)}</span>`)||""}${S("input",d`<input aria-activedescendant=${this.activeDescendant??f} aria-controls=${`${p.listbox(e)}`} aria-errormessage=${p.validationMessage} aria-owns=${`${p.listbox(e)}`} aria-autocomplete=list .ariaDescription=${this.getDescriptionMessage()} .ariaExpanded=${n} aria-haspopup=listbox .ariaInvalid=${this.status==="invalid"} .ariaLabel=${pe(this)} class=${h({[c.input]:!0,[c.inputSingle]:!0,[c.inputHidden]:r,[c.inputIcon]:this.showingInlineIcon&&!!this.placeholderIcon})} .disabled=${t} .id=${`${p.input(e)}`} @focus=${this.comboboxFocusHandler} @input=${this.inputHandler} placeholder=${l??f} .readOnly=${this.readOnly} .required=${this.required} role=combobox .tabIndex=${this.activeChipIndex===-1?0:-1} type=text .value=${U(this.filterText??"")} ${v(this.textInputRef)}>`)}</span>`}renderListBoxOptions(){let e=this.keyboardNavItems.map(t=>this.createScreenReaderItem({ariaLabel:t.label,ariaSelected:t.selected,id:`${p.item(t.guid)}`,textContent:t.heading}));if(this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"){let t=this.createScreenReaderItem({ariaLabel:this.messages.selectAll,ariaSelected:this.allSelected,textContent:this.messages.selectAll});t&&e.unshift(t)}return e}renderFloatingUIContainer(){let{messages:e,setFloatingEl:t,setContainerEl:l,open:i,scale:s}=this,n={[c.listContainer]:!0,[B.animation]:!0,[B.animationActive]:i},a=(this.filterText&&e.add?.replace("{text}",`${this.filterText}`))??"";return d`<div aria-hidden=true class=${h(c.floatingUIContainer)} popover=manual ${v(t)}><div class=${h(n)} ${v(l)}><ul class=${h({[c.list]:!0,[c.listHide]:!i})}>${this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"&&d`<calcite-combobox-item class=${h(c.selectAll)} .heading=${e.selectAll} .id=${`${this.guid}-select-all-enabled-interactive`} .indeterminate=${this.indeterminate} .label=${e.selectAll} .scale=${s} .selected=${this.allSelected} tabindex=-1 value=select-all ${v(this.selectAllComboboxItemRef)}></calcite-combobox-item>`||""}<slot></slot>${this.noMatchesFound&&(this.allowCustomValues?d`<li aria-label=${a??f} class=${h(c.noMatches)} @click=${this.customChipAddHandler} role=option tabindex=0>${be({text:a,pattern:new RegExp(`(${z(this.filterText)})`,"i")})}</li>`:d`<li class=${h({[c.noMatchesPlaceholder]:!0,[c.noMatches]:!0})}>${e.noMatches}</li>`)||""}</ul></div></div>`}renderSelectedOrPlaceholderIcon(){let{open:e,placeholderIcon:t,placeholderIconFlipRtl:l,selectedItems:i}=this,s=i[0],n=s?.icon,a=t&&(e||!s);return this.showingInlineIcon&&S("selected-placeholder-icon",d`<span class=${h(c.iconStart)}><calcite-icon class=${h({[c.selectedIcon]:!a,[c.placeholderIcon]:a})} .flipRtl=${a?l:s.iconFlipRtl} .icon=${a?t:n} .scale=${O(this.scale)}></calcite-icon></span>`)||""}renderChevronIcon(){let{open:e}=this;return S("chevron",d`<span class=${h(c.iconEnd)}><calcite-icon class=${h(c.icon)} .icon=${e?L.chevronUp:L.chevronDown} .scale=${O(this.scale)}></calcite-icon></span>`)}render(){let{selectionDisplay:e,guid:t,label:l,open:i,readOnly:s}=this,n=w(this.selectionMode),a=e==="all",o=e==="single",r=!n&&e==="fit",u=!this.clearDisabled&&this.selectionMode!=="single-persist"&&!!this.value?.length,b=this.hasDisabledItems;return this.interactiveContainer({disabled:this.disabled,children:d`${this.labelText&&ue({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div aria-live=polite class=${h({[c.wrapper]:!0,[c.wrapperSingle]:n||!this.selectedItems.length,[c.wrapperActive]:i})} @click=${this.clickHandler} @keydown=${this.keyDownHandler} ${v(this.setReferenceEl)}>${this.renderSelectedOrPlaceholderIcon()}${S("grid",d`<div class=${h({[c.gridInput]:!0,[c.selectionDisplayFit]:r,[c.selectionDisplaySingle]:o})} ${v(this.setChipContainerEl)}>${!n&&!o&&this.renderChips()||""}${!n&&!o&&this.selectAllEnabled&&a&&(!b||this.hasDisabledSelected)&&this.renderAllSelectedIndicatorChip()||""}${!n&&!a&&[this.renderSelectedIndicatorChip(),this.renderSelectedIndicatorChipCompact(),this.renderAllSelectedIndicatorChip()]||""}<label class=${h(c.screenReadersOnly)} .htmlFor=${`${p.input(t)}`} .id=${`${p.label(t)}`}>${l}</label>${this.renderInput()}</div>`)}${!s&&u?xe({ariaLabel:this.messages.clear,disabled:this.disabled,ref:this.clearButtonRef,scale:this.scale,title:this.messages.clear}):null}${!s&&this.renderChevronIcon()||""}</div><ul aria-labelledby=${`${p.label(t)}`} aria-multiselectable=true class=${h(c.screenReadersOnly)} .id=${`${p.listbox(t)}`} role=listbox tabindex=-1>${this.renderListBoxOptions()}</ul>${this.renderFloatingUIContainer()}${this.validationMessage&&this.status==="invalid"?me({icon:this.validationIcon,id:p.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}};J("calcite-combobox",q);export{q as Combobox};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{b as o}from"./
|
|
2
|
+
import{b as o}from"./SLPX32KY.js";import{H as r,h as i}from"./WDH6SQXQ.js";var l={container:"interaction-container"},d=({children:e,disabled:t})=>i`<div class=${r(l.container)} .inert=${t}>${e}</div>`,k=o((e,t)=>(t.onUpdated(()=>f(e)),d));function u(){let{disabled:e}=this;e||HTMLElement.prototype.click.call(this)}function a(e){e.target.disabled&&e.preventDefault()}var c=["mousedown","mouseup","click"];function s(e){e.target.disabled&&(e.stopImmediatePropagation(),e.preventDefault())}var n={capture:!0};function f(e){if(e.disabled){e.el.setAttribute("aria-disabled","true"),e.el.contains(document.activeElement)&&document.activeElement.blur(),v(e);return}m(e),e.el.removeAttribute("aria-disabled")}function v(e){e.el.click=u,b(e.el)}function b(e){e.addEventListener("pointerdown",a,n),c.forEach(t=>e.addEventListener(t,s,n))}function m(e){delete e.el.click,E(e.el)}function E(e){e.removeEventListener("pointerdown",a,n),c.forEach(t=>e.removeEventListener(t,s,n))}export{k as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as A}from"./
|
|
2
|
+
import{a as A}from"./VHR5TDB3.js";import{a as S}from"./Q4P6Z6E5.js";import{a as D}from"./JMN7KYK5.js";import{c as I,d as k,e as C}from"./GP7XSV5A.js";import{a as w}from"./5XHCDQFZ.js";import{a as x}from"./DICEHD76.js";import{a as y}from"./Z6W2R7TV.js";import"./RH6ZIP65.js";import{e as b}from"./SLPX32KY.js";import"./RVK7AGJY.js";import{u as v}from"./QHGI7X2A.js";import"./OAOQ5BXS.js";import{G as p,H as u,L as f,S as g,g as d,h as o,l as h,p as m}from"./WDH6SQXQ.js";var $={itemWrapper:"item-wrapper"},z={validationMessage:"segmentedControlValidationMessage"},E=d`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex;flex-direction:column}.item-wrapper{display:flex;background-color:var(--calcite-color-foreground-1);inline-size:fit-content;outline:1px solid var(--calcite-segmented-control-border-color, var(--calcite-color-border-input));outline-offset:-1px}:host([appearance=outline])>.item-wrapper{background-color:transparent}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([layout=vertical])>.item-wrapper{flex-direction:column;align-items:flex-start;align-self:flex-start}:host([width=full])>.item-wrapper{inline-size:100%;min-inline-size:fit-content}:host([width=full])>.item-wrapper ::slotted(calcite-segmented-control-item){flex:1 1 auto}:host([width=full][layout=vertical])>.item-wrapper ::slotted(calcite-segmented-control-item){justify-content:flex-start}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`,c=class extends p{constructor(){super(),this.direction=b(),this.formSupport=D({inputType:"text"})(this),this.items=[],this.messages=x(),this.focusSetter=y()(this),this.interactiveContainer=w(this),this.appearance="solid",this.disabled=!1,this.layout="horizontal",this.required=!1,this.scale="m",this.status="idle",this.value=null,this.width="auto",this.calciteSegmentedControlChange=m({cancelable:!1}),this.listen("calciteInternalSegmentedControlItemChange",this.handleSelected),this.listen("keydown",this.handleKeyDown),this.listen("click",this.handleClick)}static{this.properties={appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],labelText:1,messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectedItem:[0,{},{attribute:!1}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:f,type:String},{reflect:!0}],validationMessage:1,validity:[32,{},{readOnly:!0,attribute:!1}],value:1,width:[3,{},{reflect:!0}]}}static{this.formAssociated=!0}static{this.styles=E}async setFocus(e){return this.focusSetter(()=>this.selectedItem||this.items[0],e)}connectedCallback(){super.connectedCallback(),I(this)}willUpdate(e){(e.has("appearance")&&(this.hasUpdated||this.appearance!=="solid")||e.has("layout")&&(this.hasUpdated||this.layout!=="horizontal")||e.has("scale")&&(this.hasUpdated||this.scale!=="m"))&&this.handleItemPropChange(),e.has("value")&&(this.hasUpdated||this.value!==null)&&this.valueHandler(this.value),e.has("selectedItem")&&this.handleSelectedItemChange(this.selectedItem,e.get("selectedItem"))}loaded(){this.formSupport.overrideDefaultValue(this.value)}disconnectedCallback(){super.disconnectedCallback(),k(this)}valueHandler(e){let{items:t}=this;t.forEach(a=>a.checked=a.value===e)}handleSelectedItemChange(e,t){if(this.value=e?.value,e===t)return;let{items:a}=this,l=a.filter(s=>s===e).pop();l?this.selectItem(l):a[0]&&(a[0].tabIndex=0)}handleClick(e){this.disabled||e.target.localName==="calcite-segmented-control-item"&&this.selectItem(e.target,!0)}handleSelected(e){e.preventDefault();let t=e.target;t.checked&&this.selectItem(t),e.stopPropagation()}handleKeyDown(e){let t=["ArrowLeft","ArrowUp","ArrowRight","ArrowDown"," "],{key:a}=e,{selectedItem:l}=this;if(t.indexOf(a)===-1)return;let s=a;this.direction==="rtl"&&(a==="ArrowRight"&&(s="ArrowLeft"),a==="ArrowLeft"&&(s="ArrowRight"));let{items:i}=this,n=-1;switch(i.forEach((r,L)=>{r===l&&(n=L)}),s){case"ArrowLeft":case"ArrowUp":{e.preventDefault();let r=n<1?i[i.length-1]:i[n-1];this.selectItem(r,!0);return}case"ArrowRight":case"ArrowDown":{e.preventDefault();let r=n===-1?i[1]:i[n+1]||i[0];this.selectItem(r,!0);return}case" ":e.preventDefault(),this.selectItem(e.target,!0);return;default:return}}handleItemPropChange(){let{items:e}=this;e.forEach(t=>{t.appearance=this.appearance,t.layout=this.layout,t.scale=this.scale})}handleSelectedItem(){let{items:e}=this,t=e.filter(a=>a.checked).pop();t?this.selectItem(t):e[0]&&(e[0].tabIndex=0)}async handleDefaultSlotChange(e){let t=v(e).filter(a=>a.matches("calcite-segmented-control-item"));await Promise.all(t.map(a=>a.componentOnReady())),this.items=t,this.handleSelectedItem(),this.handleItemPropChange()}onLabelClick(){this.setFocus()}async selectItem(e,t=!1){if(e===this.selectedItem)return;let{items:a}=this,l=null;a.forEach(s=>{let i=s===e;(i&&!s.checked||!i&&s.checked)&&(s.checked=i),s.tabIndex=i?0:-1,i&&(l=s)}),this.selectedItem=l,l&&t&&(await this.updateComplete,this.calciteSegmentedControlChange.emit(),l.focus())}render(){return this.el.role="radiogroup",o`${this.labelText&&S({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div aria-errormessage=${z.validationMessage} aria-label=${C(this)??h} .ariaInvalid=${this.status==="invalid"} .ariaRequired=${this.required} class=${u($.itemWrapper)}>${this.interactiveContainer({disabled:this.disabled,children:o`<slot @slotchange=${this.handleDefaultSlotChange}></slot>`})}</div>${this.validationMessage&&this.status==="invalid"?A({icon:this.validationIcon,id:z.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`}};g("calcite-segmented-control",c);export{c as SegmentedControl};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as o,b as r,f as d}from"./
|
|
2
|
+
import{a as o,b as r,f as d}from"./GP7XSV5A.js";import"./QHGI7X2A.js";import"./OAOQ5BXS.js";import{G as n,H as c,S as s,g as a,h as l,p as i}from"./WDH6SQXQ.js";var h={container:"container"},b=a`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex}:host([alignment=start]){text-align:start}:host([alignment=end]){text-align:end}:host([alignment=center]){text-align:center}:host([scale=s]) .container{gap:.25rem;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);margin-block-end:var(--calcite-label-margin-bottom, .5rem)}:host([scale=m]) .container{gap:.5rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);margin-block-end:var(--calcite-label-margin-bottom, .75rem)}:host([scale=l]) .container{gap:.5rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);margin-block-end:var(--calcite-label-margin-bottom, 1rem)}:host .container{margin-inline:0px;margin-block-start:0px;inline-size:100%;line-height:1.375;color:var(--calcite-color-text-1);color:var(--calcite-label-text-color, var(--calcite-color-text-1))}:host([layout=block]) .container,:host([layout=default]) .container{display:flex;flex-direction:column}:host([layout=inline]) .container,:host([layout=inline-space-between]) .container{display:flex;flex-direction:row;align-items:center;gap:.5rem}:host([layout=inline][scale=l]) .container{gap:.75rem}:host([layout=inline-space-between]) .container{justify-content:space-between}:host([disabled])>.container{opacity:var(--calcite-opacity-disabled)}:host([disabled]) ::slotted(*[disabled]),:host([disabled]) ::slotted(*[disabled] *){--tw-bg-opacity: 1}:host([disabled]) ::slotted(calcite-input-message:not([active])){--tw-bg-opacity: 0}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,t=class extends n{constructor(){super(),this.alignment="start",this.layout="default",this.scale="m",this.calciteInternalLabelClick=i({bubbles:!1,cancelable:!1}),this.listen("click",this.labelClickHandler)}static{this.properties={alignment:[3,{},{reflect:!0}],for:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}]}}static{this.styles=b}connectedCallback(){super.connectedCallback(),document.dispatchEvent(new CustomEvent(o))}willUpdate(e){e.has("for")&&d(this.el)}disconnectedCallback(){super.disconnectedCallback(),document.dispatchEvent(new CustomEvent(r))}labelClickHandler(e){window.getSelection()?.type!=="Range"&&this.calciteInternalLabelClick.emit({sourceEvent:e})}render(){return l`<div class=${c(h.container)}><slot></slot></div>`}};s("calcite-label",t);export{t as Label};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as $,b as U}from"./6D52GNCZ.js";import{a as C}from"./3PITBECR.js";import{a as g}from"./36NKWNCT.js";import{a as S}from"./WKR7R7AZ.js";import{a as P}from"./HHRSNWVJ.js";import{e as V}from"./PD7IE5T5.js";import"./FS3FP3E7.js";import{D as u,t as O,u as L}from"./2LIAGA6D.js";import"./OAOQ5BXS.js";import{E as H,F as B,G as A,H as s,M as v,O as D,P as _,S as E,g as I,h as m,p as y}from"./TPRQEKIG.js";var K=I`.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-right{animation-name:in-right}.calcite-animate__in-left{animation-name:in-left}.calcite-animate__in-scale{animation-name:in-scale}@keyframes in{0%{opacity:0}to{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0,-5px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0,5px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-right{0%{opacity:0;transform:translate3D(-5px,0,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-left{0%{opacity:0;transform:translate3D(5px,0,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(.95,.95,1)}to{opacity:1;transform:scaleZ(1)}}`,n={container:"container",actionBarContainer:"action-bar-container",contentContainer:"content-container",content:"content",contentHeader:"content__header",contentBody:"content__body",contentOverlay:"content--overlay",floatAll:"float-all",floatContent:"float--content",resizeHandle:"resize-handle",resizeHandleBar:"resize-handle-bar"},M={actionBar:"action-bar",header:"header"},N={dragVertical:"drag-resize-vertical",dragHorizontal:"drag-resize-horizontal"},T=I`:host{pointer-events:none;position:relative;display:flex;flex:0 1 auto;align-items:stretch;z-index:var(--calcite-shell-panel-z-index, var(--calcite-z-index));--calcite-shell-panel-max-height: unset;--calcite-internal-shell-panel-shadow-block-start: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-block-end: 0 -4px 8px -1px rgba(0, 0, 0, .08), 0 -2px 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-inline-start: 4px 0 8px -1px rgba(0, 0, 0, .08), 2px 0 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-inline-end: -4px 0 8px -1px rgba(0, 0, 0, .08), -2px 0 4px -1px rgba(0, 0, 0, .04)}.calcite--rtl.content--overlay{--calcite-internal-shell-panel-shadow-inline-start: -4px 0 8px -1px rgba(0, 0, 0, .08), -2px 0 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-inline-end: 4px 0 8px -1px rgba(0, 0, 0, .08), 2px 0 4px -1px rgba(0, 0, 0, .04)}:host([layout=vertical]){z-index:var(--calcite-shell-panel-z-index, calc(var(--calcite-z-index) + 1))}:host([layout=vertical][display-mode=overlay]){z-index:var(--calcite-shell-panel-z-index, calc(var(--calcite-z-index-header) + 1))}:host([layout=vertical][display-mode=float-all]) .content{flex:2}:host([layout=vertical]:not([display-mode=float-all])) .width-s{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 12vw);--calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 300px);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 150px)}:host([layout=vertical][display-mode=float-all]) .width-s{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 12vw);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 150px)}:host([layout=vertical]:not([display-mode=float-all])) .width-m{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 20vw);--calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 420px);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 240px)}:host([layout=vertical][display-mode=float-all]) .width-m{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 20vw);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 240px)}:host([layout=vertical]:not([display-mode=float-all])) .width-l{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 45vw);--calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 680px);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 340px)}:host([layout=vertical][display-mode=float-all]) .width-l{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 45vw);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 340px)}:host([layout=horizontal]) .content{--calcite-internal-shell-panel-height: var(--calcite-shell-panel-height);--calcite-internal-shell-panel-min-height: var(--calcite-shell-panel-min-height, 5vh);--calcite-internal-shell-panel-max-height: var(--calcite-shell-panel-max-height, 30vh)}:host([layout=horizontal]) .height-s{--calcite-internal-shell-panel-height: var(--calcite-shell-panel-height);--calcite-internal-shell-panel-min-height: var(--calcite-shell-panel-min-height, 5vh);--calcite-internal-shell-panel-max-height: var(--calcite-shell-panel-max-height, 20vh)}:host([layout=horizontal]) .height-l{--calcite-internal-shell-panel-height: var(--calcite-shell-panel-height);--calcite-internal-shell-panel-min-height: var(--calcite-shell-panel-min-height, 5vh);--calcite-internal-shell-panel-max-height: var(--calcite-shell-panel-max-height, 40vh)}:host([display-mode=float-all][height=s]),:host([display-mode=float-all][height-scale=s]) .content{min-block-size:var(--calcite-shell-panel-height, 20vh)}:host([display-mode=float-all][height=m]),:host([display-mode=float-all][height-scale=m]) .content{min-block-size:var(--calcite-shell-panel-height, 30vh)}:host([display-mode=float-all][height=l]),:host([display-mode=float-all][height-scale=l]) .content{min-block-size:var(--calcite-shell-panel-height, 40vh)}.container{pointer-events:none;box-sizing:border-box;display:flex;block-size:100%;flex:1 1 auto;align-items:stretch;background-color:transparent;font-size:var(--calcite-font-size-relative-base);color:var(--calcite-shell-panel-text-color, var(--calcite-color-text-2))}.container *{box-sizing:border-box}.container.float-all{margin-block:var(--calcite-spacing-sm);margin-inline:var(--calcite-spacing-sm)}.float-all{max-block-size:var(--calcite-internal-shell-panel-max-height, calc(100% - 1rem) );box-shadow:var(--calcite-shell-panel-shadow, var(--calcite-shadow-sm));border-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));overflow:hidden}:host([layout=vertical][position=start]) .float-all{border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-shell-panel-border-color, var(--calcite-color-border-3))}:host([layout=vertical][position=end]) .float-all{border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-shell-panel-border-color, var(--calcite-color-border-3)))}:host([layout=horizontal]) .float-all{border-inline:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-shell-panel-border-color, var(--calcite-color-border-3)))}:host([layout=horizontal]) .container{block-size:auto;inline-size:100%;flex-direction:column}.resize-handle{position:absolute;box-sizing:border-box;display:flex;-webkit-user-select:none;user-select:none;align-items:center;justify-content:center;outline:2px solid transparent;outline-offset:2px;--calcite-internal-shell-panel-resize-handle-offset: calc( (var(--calcite-size-fixed-xxl) - var(--calcite-size-fixed-sm-plus)) / 2 * -1 );z-index:var(--calcite-z-index-header)}.resize-handle:active .resize-handle-bar,.resize-handle:hover .resize-handle-bar{color:var(--calcite-shell-panel-resize-icon-color, var(--calcite-color-text-1));background-color:var(--calcite-shell-panel-resize-background-color, var(--calcite-color-foreground-3))}.resize-handle-bar{pointer-events:none;display:flex;align-items:center;justify-content:center;color:var(--calcite-shell-panel-resize-icon-color, var(--calcite-color-border-input));background-color:var(--calcite-shell-panel-resize-background-color, var(--calcite-color-background))}.resize-handle:focus .resize-handle-bar{outline-color:transparent;outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)))}:host([position=start][layout=vertical]) .resize-handle{inline-size:var(--calcite-size-fixed-xxl);inset-inline-end:var(--calcite-internal-shell-panel-resize-handle-offset);block-size:100%}:host([position=start][layout=vertical]) .resize-handle-bar{block-size:100%;inline-size:var(--calcite-size-fixed-sm-plus);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=start][layout=vertical]):host([display-mode^=float]) .resize-handle-bar{border-start-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-end-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}:host([position=end][layout=vertical]) .resize-handle{inline-size:var(--calcite-size-fixed-xxl);inset-inline-start:var(--calcite-internal-shell-panel-resize-handle-offset);block-size:100%}:host([position=end][layout=vertical]) .resize-handle-bar{block-size:100%;inline-size:var(--calcite-size-fixed-sm-plus);border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=end][layout=vertical]):host([display-mode^=float]) .resize-handle-bar{border-start-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-end-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}:host([position=start][layout=horizontal]) .resize-handle{block-size:var(--calcite-size-fixed-xxl);inline-size:100%;inset-block-end:var(--calcite-internal-shell-panel-resize-handle-offset)}:host([position=start][layout=horizontal]) .resize-handle-bar{inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);border-block-start:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=start][layout=horizontal]):host([display-mode^=float]) .resize-handle-bar{border-end-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-end-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}:host([position=end][layout=horizontal]) .resize-handle{block-size:var(--calcite-size-fixed-xxl);inline-size:100%;inset-block-start:var(--calcite-internal-shell-panel-resize-handle-offset)}:host([position=end][layout=horizontal]) .resize-handle-bar{inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);border-block-end:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=end][layout=horizontal]):host([display-mode^=float]) .resize-handle-bar{border-start-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-start-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}::slotted(calcite-panel),::slotted(calcite-flow){block-size:100%;inline-size:100%;flex:1 1 auto;max-block-size:unset;max-inline-size:unset}.action-bar-container{pointer-events:auto;box-sizing:border-box;display:flex;flex:1 1 auto}.content-container{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;align-items:stretch;align-self:stretch}:host([layout=horizontal]) .action-bar-container,:host([layout=horizontal]) .content-container{flex-direction:column}.content{pointer-events:auto;position:relative;box-sizing:border-box;display:flex;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;align-self:stretch;padding:0;background-color:var(--calcite-shell-panel-background-color, var(--calcite-color-background));transition:max-block-size var(--calcite-animation-timing),max-inline-size var(--calcite-animation-timing)}:host([layout=vertical]:not([display-mode=float-all])) .content{inline-size:var(--calcite-internal-shell-panel-width);max-inline-size:var(--calcite-internal-shell-panel-max-width);min-inline-size:var(--calcite-internal-shell-panel-min-width)}:host([layout=vertical][display-mode=float-all]) .content{inline-size:var(--calcite-internal-shell-panel-width);min-inline-size:var(--calcite-internal-shell-panel-min-width)}:host([layout=horizontal]) .content{block-size:var(--calcite-internal-shell-panel-height);max-block-size:var(--calcite-internal-shell-panel-max-height);min-block-size:var(--calcite-internal-shell-panel-min-height)}:host([resizable][layout=vertical][position=start]) .content{padding-inline-end:var(--calcite-size-fixed-sm-plus)}:host([resizable][layout=vertical][position=end]) .content{padding-inline-start:var(--calcite-size-fixed-sm-plus)}:host([resizable][layout=horizontal][position=start]) .content{padding-block-end:var(--calcite-size-fixed-sm-plus)}:host([resizable][layout=horizontal][position=end]) .content{padding-block-start:var(--calcite-size-fixed-sm-plus)}.content__header{display:flex;flex:0 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch}.content__body{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.content--overlay{position:absolute;--tw-shadow: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--tw-shadow-colored: 0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--calcite-shell-panel-shadow, var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow))}:host([layout=vertical]) .content--overlay{inset-block-start:0px;block-size:100%}:host([layout=horizontal]) .content--overlay{inset-inline-start:0px;inline-size:100%}:host([layout=vertical][position=start]) .content--overlay{inset-inline-start:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-inline-start)}:host([layout=vertical][position=end]) .content--overlay{inset-inline-end:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-inline-end)}:host([layout=horizontal][position=start]) .content--overlay{inset-block-start:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-block-start)}:host([layout=horizontal][position=end]) .content--overlay{inset-block-end:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-block-end)}.float--content{margin-block-end:auto;block-size:auto;overflow:hidden;--tw-shadow: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--tw-shadow-colored: 0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--calcite-shell-panel-shadow, var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow));border-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));margin-inline:var(--calcite-spacing-sm);margin-block-start:var(--calcite-spacing-sm);max-block-size:var(--calcite-internal-shell-panel-max-height, calc(100% - 1rem) )}.float--content ::slotted(calcite-panel),.float--content ::slotted(calcite-flow){max-block-size:unset}:host([layout=horizontal]) .float--content{margin-block:var(--calcite-spacing-sm)}:host([position=start]) .float--content ::slotted(calcite-panel),:host([position=start]) .float--content ::slotted(calcite-flow),:host([position=end]) .float--content ::slotted(calcite-panel),:host([position=end]) .float--content ::slotted(calcite-flow){border-style:none}slot[name=action-bar]::slotted(calcite-action-bar),.content ::slotted(calcite-flow),.content ::slotted(calcite-panel:not([closed])){border:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=start]:not([slot=panel-end])) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=start]:not([slot=panel-end])) .content ::slotted(calcite-flow),:host([position=start]:not([slot=panel-end])) .content ::slotted(calcite-panel),:host([position=end][slot=panel-start]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=end][slot=panel-start]) .content ::slotted(calcite-flow),:host([position=end][slot=panel-start]) .content ::slotted(calcite-panel){border-inline-start:none}:host([resizable][layout=vertical]) .content ::slotted(calcite-flow),:host([resizable][layout=vertical]) .content ::slotted(calcite-panel){border-inline-start:none;border-inline-end:none}:host([resizable][layout=horizontal]) .content ::slotted(calcite-flow),:host([resizable][layout=horizontal]) .content ::slotted(calcite-panel){border-block-start:none;border-block-end:none}:host([position=end]:not([slot=panel-start])) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=end]:not([slot=panel-start])) .content ::slotted(calcite-flow),:host([position=end]:not([slot=panel-start])) .content ::slotted(calcite-panel),:host([position=start][slot=panel-end]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=start][slot=panel-end]) .content ::slotted(calcite-flow),:host([position=start][slot=panel-end]) .content ::slotted(calcite-panel){border-inline-end:none}:host([layout=horizontal]) slot[name=action-bar]::slotted(calcite-action-bar){border-inline:0}:host([layout=horizontal][position=start]) .content ::slotted(calcite-flow),:host([layout=horizontal][position=start]) .content ::slotted(calcite-panel){border-inline:0;border-block-start:0}:host([layout=horizontal][position=end]) .content ::slotted(calcite-flow),:host([layout=horizontal][position=end]) .content ::slotted(calcite-panel){border-inline:0;border-block-end:0}:host([display-mode=dock]) .resize-handle-bar,:host([display-mode=float-all]) .resize-handle-bar,:host([display-mode=overlay]) .resize-handle-bar{border-block-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);border-block-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}:host([hidden]){display:none}[hidden]{display:none}`,R=class extends A{constructor(){super(...arguments),this.direction=V(),this.actionBars=[],this.contentRef=H(),this.messages=P(),this.sizeOverride=U({targetElement:this.contentRef,getBounds:()=>({inline:{min:this.resizeValues.minInlineSize,max:this.resizeValues.maxInlineSize},block:{min:this.resizeValues.minBlockSize,max:this.resizeValues.maxBlockSize}}),onResize:e=>{this.resizeValues=e}}),this.resizeValues={inlineSize:null,blockSize:null,minInlineSize:null,minBlockSize:null,maxInlineSize:null,maxBlockSize:null},this.hasHeader=!1,this.collapsed=!1,this.displayMode="dock",this.layout="vertical",this.position="start",this.resizable=!1,this.widthScale="m",this.calciteInternalShellPanelResizeEnd=y({cancelable:!1}),this.calciteInternalShellPanelResizeStart=y({cancelable:!1}),this.calciteShellPanelCollapse=y({cancelable:!1}),this.calciteShellPanelExpand=y({cancelable:!1})}static{this.properties={resizeValues:[16,{},{state:!0}],hasHeader:[16,{},{state:!0}],collapsed:[7,{},{reflect:!0,type:Boolean}],displayMode:[3,{},{reflect:!0}],heightScale:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],position:[3,{},{reflect:!0}],resizable:[7,{},{reflect:!0,type:Boolean}],height:[3,{},{reflect:!0}],widthScale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=[T,K]}async updateSize(e){this.updateSizeInternal(e)}willUpdate(e){e.has("layout")&&(this.hasUpdated||this.layout!=="vertical")&&(this.setActionBarsLayout(this.actionBars),this.setupInteractions()),(e.has("direction")&&this.hasUpdated||e.has("position")&&(this.hasUpdated||this.position!=="start"))&&this.setupInteractions(),e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calciteShellPanelCollapse.emit():this.calciteShellPanelExpand.emit())}disconnectedCallback(){super.disconnectedCallback(),this.cleanupInteractions()}getContentElDOMRect(){return this.contentRef.value.getBoundingClientRect()}updateSizeInternal(e){this.contentRef.value&&this.sizeOverride.resize(e)}handleKeyDown(e){let{key:a,defaultPrevented:h,shiftKey:r}=e,{position:l,layout:t,resizable:i,contentRef:c,resizeValues:{maxBlockSize:b,maxInlineSize:z,minBlockSize:f,minInlineSize:k}}=this,d=[...t==="horizontal"?["ArrowUp","ArrowDown"]:["ArrowLeft","ArrowRight"],"Home","End"];if(!i||!c.value||h||!d.includes(a))return;let p=this.getContentElDOMRect(),w=this.direction==="rtl"?-1:1,o=r?_:D;switch(a){case"ArrowUp":this.updateSizeInternal({block:p.height+(t==="horizontal"&&l==="end"?o:-o)}),e.preventDefault();break;case"ArrowDown":this.updateSizeInternal({block:p.height+(t==="horizontal"&&l==="end"?-o:o)}),e.preventDefault();break;case"ArrowLeft":this.updateSizeInternal({inline:p.width+(t==="vertical"&&l==="end"?o:-o)*w}),e.preventDefault();break;case"ArrowRight":this.updateSizeInternal({inline:p.width+(t==="vertical"&&l==="end"?-o:o)*w}),e.preventDefault();break;case"Home":this.updateSizeInternal(t==="horizontal"?{block:f}:{inline:k}),e.preventDefault();break;case"End":this.updateSizeInternal(t==="horizontal"?{block:b}:{inline:z}),e.preventDefault();break}}cleanupInteractions(){this.interaction?.unset()}async setupInteractions(){this.cleanupInteractions();let{el:e,contentRef:a,resizable:h,position:r,collapsed:l,resizeHandleEl:t,layout:i}=this;if(!a.value||l||!h||!t)return;await this.el.componentOnReady();let{inlineSize:c,minInlineSize:b,blockSize:z,minBlockSize:f,maxInlineSize:k,maxBlockSize:x}=window.getComputedStyle(a.value),d={inlineSize:u(c),blockSize:u(z),minInlineSize:u(b),minBlockSize:u(f),maxInlineSize:u(k)||window.innerWidth,maxBlockSize:u(x)||window.innerHeight};this.resizeValues=d;let p=this.direction==="rtl";this.interaction=$(a.value,{context:e.ownerDocument}).resizable({edges:{top:r==="end"&&i==="horizontal"?t:!1,right:r===(p?"end":"start")&&i==="vertical"?t:!1,bottom:r==="start"&&i==="horizontal"?t:!1,left:r===(p?"start":"end")&&i==="vertical"?t:!1},modifiers:[$.modifiers.restrictSize({min:{width:d.minInlineSize,height:d.minBlockSize},max:{width:d.maxInlineSize,height:d.maxBlockSize}})],listeners:{resizestart:()=>{this.calciteInternalShellPanelResizeStart.emit()},resizeend:()=>{this.calciteInternalShellPanelResizeEnd.emit()},move:({rect:w})=>{let o=i==="horizontal";this.updateSize(o?{block:w.height}:{inline:w.width})}}})}setResizeHandleEl(e){this.resizeHandleEl=e,this.setupInteractions()}setActionBarsLayout(e){e.forEach(a=>a.layout=this.layout)}handleActionBarSlotChange(e){let a=L(e).filter(h=>h?.matches("calcite-action-bar"));this.actionBars=a,this.setActionBarsLayout(a)}handleHeaderSlotChange(e){this.hasHeader=O(e)}getResizeIcon(){let{layout:e}=this;return e==="horizontal"?N.dragVertical:N.dragHorizontal}renderHeader(){return g("header",m`<div class=${s(n.contentHeader)} .hidden=${!this.hasHeader}><slot name=${M.header} @slotchange=${this.handleHeaderSlotChange}></slot></div>`)}render(){let{collapsed:e,position:a,resizable:h,layout:r,displayMode:l,resizeValues:t}=this,i=this.direction,c=r==="horizontal",b=!e&&h?g("resize-handle",m`<div .ariaLabel=${this.messages.resize} .ariaOrientation=${c?"vertical":"horizontal"} .ariaValueMax=${S(c?"block":"inline",t.maxBlockSize,t.maxInlineSize)} .ariaValueMin=${S(c?"block":"inline",t.minBlockSize,t.minInlineSize)} .ariaValueNow=${S(c?"block":"inline",t.blockSize,t.inlineSize)} class=${s(n.resizeHandle)} @keydown=${this.handleKeyDown} role=separator tabindex=0 touch-action=none ${B(this.setResizeHandleEl)}><div class=${s(n.resizeHandleBar)}><calcite-icon .icon=${this.getResizeIcon()} scale=s></calcite-icon></div></div>`):null,z=()=>r==="horizontal"?a==="start"?v.calciteAnimateInDown:v.calciteAnimateInUp:i==="ltr"&&a==="end"||i==="rtl"&&a==="start"?v.calciteAnimateInLeft:v.calciteAnimateInRight,f=m`<div class=${s(n.contentContainer)}>${g("content",m`<div class=${s({[v.rtl]:i==="rtl",[n.content]:!0,[n.contentOverlay]:l==="overlay",[n.floatContent]:l==="float-content"||l==="float",[v.calciteAnimate]:l==="overlay",[z()]:l==="overlay",[C("width",this.width,this.widthScale)]:!!(this.width||this.widthScale),[C("height",this.height,this.heightScale)]:!!(this.height||this.heightScale)})} .hidden=${e} ${B(this.contentRef)}>${this.renderHeader()}<div class=${s(n.contentBody)}><slot></slot></div>${b}</div>`)}</div>`,x=[g("action-bar-container",m`<div class=${s(n.actionBarContainer)}><slot name=${M.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`),f];return a==="end"&&x.reverse(),m`<div class=${s({[n.container]:!0,[n.floatAll]:l==="float-all"})}>${x}</div>`}};E("calcite-shell-panel",R);export{R as ShellPanel};
|
|
2
|
+
import{a as $,b as U}from"./VYNP23UO.js";import{a as C}from"./3PITBECR.js";import{a as g}from"./PZTXPQU2.js";import{a as S}from"./WKR7R7AZ.js";import{a as P}from"./DICEHD76.js";import{e as V}from"./SLPX32KY.js";import"./RVK7AGJY.js";import{D as u,t as O,u as L}from"./QHGI7X2A.js";import"./OAOQ5BXS.js";import{E as H,F as B,G as A,H as s,M as v,O as D,P as _,S as E,g as I,h as m,p as y}from"./WDH6SQXQ.js";var K=I`.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-right{animation-name:in-right}.calcite-animate__in-left{animation-name:in-left}.calcite-animate__in-scale{animation-name:in-scale}@keyframes in{0%{opacity:0}to{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0,-5px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0,5px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-right{0%{opacity:0;transform:translate3D(-5px,0,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-left{0%{opacity:0;transform:translate3D(5px,0,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(.95,.95,1)}to{opacity:1;transform:scaleZ(1)}}`,n={container:"container",actionBarContainer:"action-bar-container",contentContainer:"content-container",content:"content",contentHeader:"content__header",contentBody:"content__body",contentOverlay:"content--overlay",floatAll:"float-all",floatContent:"float--content",resizeHandle:"resize-handle",resizeHandleBar:"resize-handle-bar"},M={actionBar:"action-bar",header:"header"},N={dragVertical:"drag-resize-vertical",dragHorizontal:"drag-resize-horizontal"},T=I`:host{pointer-events:none;position:relative;display:flex;flex:0 1 auto;align-items:stretch;z-index:var(--calcite-shell-panel-z-index, var(--calcite-z-index));--calcite-shell-panel-max-height: unset;--calcite-internal-shell-panel-shadow-block-start: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-block-end: 0 -4px 8px -1px rgba(0, 0, 0, .08), 0 -2px 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-inline-start: 4px 0 8px -1px rgba(0, 0, 0, .08), 2px 0 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-inline-end: -4px 0 8px -1px rgba(0, 0, 0, .08), -2px 0 4px -1px rgba(0, 0, 0, .04)}.calcite--rtl.content--overlay{--calcite-internal-shell-panel-shadow-inline-start: -4px 0 8px -1px rgba(0, 0, 0, .08), -2px 0 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-inline-end: 4px 0 8px -1px rgba(0, 0, 0, .08), 2px 0 4px -1px rgba(0, 0, 0, .04)}:host([layout=vertical]){z-index:var(--calcite-shell-panel-z-index, calc(var(--calcite-z-index) + 1))}:host([layout=vertical][display-mode=overlay]){z-index:var(--calcite-shell-panel-z-index, calc(var(--calcite-z-index-header) + 1))}:host([layout=vertical][display-mode=float-all]) .content{flex:2}:host([layout=vertical]:not([display-mode=float-all])) .width-s{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 12vw);--calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 300px);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 150px)}:host([layout=vertical][display-mode=float-all]) .width-s{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 12vw);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 150px)}:host([layout=vertical]:not([display-mode=float-all])) .width-m{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 20vw);--calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 420px);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 240px)}:host([layout=vertical][display-mode=float-all]) .width-m{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 20vw);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 240px)}:host([layout=vertical]:not([display-mode=float-all])) .width-l{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 45vw);--calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 680px);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 340px)}:host([layout=vertical][display-mode=float-all]) .width-l{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 45vw);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 340px)}:host([layout=horizontal]) .content{--calcite-internal-shell-panel-height: var(--calcite-shell-panel-height);--calcite-internal-shell-panel-min-height: var(--calcite-shell-panel-min-height, 5vh);--calcite-internal-shell-panel-max-height: var(--calcite-shell-panel-max-height, 30vh)}:host([layout=horizontal]) .height-s{--calcite-internal-shell-panel-height: var(--calcite-shell-panel-height);--calcite-internal-shell-panel-min-height: var(--calcite-shell-panel-min-height, 5vh);--calcite-internal-shell-panel-max-height: var(--calcite-shell-panel-max-height, 20vh)}:host([layout=horizontal]) .height-l{--calcite-internal-shell-panel-height: var(--calcite-shell-panel-height);--calcite-internal-shell-panel-min-height: var(--calcite-shell-panel-min-height, 5vh);--calcite-internal-shell-panel-max-height: var(--calcite-shell-panel-max-height, 40vh)}:host([display-mode=float-all][height=s]),:host([display-mode=float-all][height-scale=s]) .content{min-block-size:var(--calcite-shell-panel-height, 20vh)}:host([display-mode=float-all][height=m]),:host([display-mode=float-all][height-scale=m]) .content{min-block-size:var(--calcite-shell-panel-height, 30vh)}:host([display-mode=float-all][height=l]),:host([display-mode=float-all][height-scale=l]) .content{min-block-size:var(--calcite-shell-panel-height, 40vh)}.container{pointer-events:none;box-sizing:border-box;display:flex;block-size:100%;flex:1 1 auto;align-items:stretch;background-color:transparent;font-size:var(--calcite-font-size-relative-base);color:var(--calcite-shell-panel-text-color, var(--calcite-color-text-2))}.container *{box-sizing:border-box}.container.float-all{margin-block:var(--calcite-spacing-sm);margin-inline:var(--calcite-spacing-sm)}.float-all{max-block-size:var(--calcite-internal-shell-panel-max-height, calc(100% - 1rem) );box-shadow:var(--calcite-shell-panel-shadow, var(--calcite-shadow-sm));border-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));overflow:hidden}:host([layout=vertical][position=start]) .float-all{border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-shell-panel-border-color, var(--calcite-color-border-3))}:host([layout=vertical][position=end]) .float-all{border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-shell-panel-border-color, var(--calcite-color-border-3)))}:host([layout=horizontal]) .float-all{border-inline:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-shell-panel-border-color, var(--calcite-color-border-3)))}:host([layout=horizontal]) .container{block-size:auto;inline-size:100%;flex-direction:column}.resize-handle{position:absolute;box-sizing:border-box;display:flex;-webkit-user-select:none;user-select:none;align-items:center;justify-content:center;outline:2px solid transparent;outline-offset:2px;--calcite-internal-shell-panel-resize-handle-offset: calc( (var(--calcite-size-fixed-xxl) - var(--calcite-size-fixed-sm-plus)) / 2 * -1 );z-index:var(--calcite-z-index-header)}.resize-handle:active .resize-handle-bar,.resize-handle:hover .resize-handle-bar{color:var(--calcite-shell-panel-resize-icon-color, var(--calcite-color-text-1));background-color:var(--calcite-shell-panel-resize-background-color, var(--calcite-color-foreground-3))}.resize-handle-bar{pointer-events:none;display:flex;align-items:center;justify-content:center;color:var(--calcite-shell-panel-resize-icon-color, var(--calcite-color-border-input));background-color:var(--calcite-shell-panel-resize-background-color, var(--calcite-color-background))}.resize-handle:focus .resize-handle-bar{outline-color:transparent;outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)))}:host([position=start][layout=vertical]) .resize-handle{inline-size:var(--calcite-size-fixed-xxl);inset-inline-end:var(--calcite-internal-shell-panel-resize-handle-offset);block-size:100%}:host([position=start][layout=vertical]) .resize-handle-bar{block-size:100%;inline-size:var(--calcite-size-fixed-sm-plus);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=start][layout=vertical]):host([display-mode^=float]) .resize-handle-bar{border-start-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-end-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}:host([position=end][layout=vertical]) .resize-handle{inline-size:var(--calcite-size-fixed-xxl);inset-inline-start:var(--calcite-internal-shell-panel-resize-handle-offset);block-size:100%}:host([position=end][layout=vertical]) .resize-handle-bar{block-size:100%;inline-size:var(--calcite-size-fixed-sm-plus);border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=end][layout=vertical]):host([display-mode^=float]) .resize-handle-bar{border-start-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-end-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}:host([position=start][layout=horizontal]) .resize-handle{block-size:var(--calcite-size-fixed-xxl);inline-size:100%;inset-block-end:var(--calcite-internal-shell-panel-resize-handle-offset)}:host([position=start][layout=horizontal]) .resize-handle-bar{inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);border-block-start:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=start][layout=horizontal]):host([display-mode^=float]) .resize-handle-bar{border-end-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-end-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}:host([position=end][layout=horizontal]) .resize-handle{block-size:var(--calcite-size-fixed-xxl);inline-size:100%;inset-block-start:var(--calcite-internal-shell-panel-resize-handle-offset)}:host([position=end][layout=horizontal]) .resize-handle-bar{inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);border-block-end:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=end][layout=horizontal]):host([display-mode^=float]) .resize-handle-bar{border-start-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-start-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}::slotted(calcite-panel),::slotted(calcite-flow){block-size:100%;inline-size:100%;flex:1 1 auto;max-block-size:unset;max-inline-size:unset}.action-bar-container{pointer-events:auto;box-sizing:border-box;display:flex;flex:1 1 auto}.content-container{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;align-items:stretch;align-self:stretch}:host([layout=horizontal]) .action-bar-container,:host([layout=horizontal]) .content-container{flex-direction:column}.content{pointer-events:auto;position:relative;box-sizing:border-box;display:flex;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;align-self:stretch;padding:0;background-color:var(--calcite-shell-panel-background-color, var(--calcite-color-background));transition:max-block-size var(--calcite-animation-timing),max-inline-size var(--calcite-animation-timing)}:host([layout=vertical]:not([display-mode=float-all])) .content{inline-size:var(--calcite-internal-shell-panel-width);max-inline-size:var(--calcite-internal-shell-panel-max-width);min-inline-size:var(--calcite-internal-shell-panel-min-width)}:host([layout=vertical][display-mode=float-all]) .content{inline-size:var(--calcite-internal-shell-panel-width);min-inline-size:var(--calcite-internal-shell-panel-min-width)}:host([layout=horizontal]) .content{block-size:var(--calcite-internal-shell-panel-height);max-block-size:var(--calcite-internal-shell-panel-max-height);min-block-size:var(--calcite-internal-shell-panel-min-height)}:host([resizable][layout=vertical][position=start]) .content{padding-inline-end:var(--calcite-size-fixed-sm-plus)}:host([resizable][layout=vertical][position=end]) .content{padding-inline-start:var(--calcite-size-fixed-sm-plus)}:host([resizable][layout=horizontal][position=start]) .content{padding-block-end:var(--calcite-size-fixed-sm-plus)}:host([resizable][layout=horizontal][position=end]) .content{padding-block-start:var(--calcite-size-fixed-sm-plus)}.content__header{display:flex;flex:0 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch}.content__body{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.content--overlay{position:absolute;--tw-shadow: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--tw-shadow-colored: 0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--calcite-shell-panel-shadow, var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow))}:host([layout=vertical]) .content--overlay{inset-block-start:0px;block-size:100%}:host([layout=horizontal]) .content--overlay{inset-inline-start:0px;inline-size:100%}:host([layout=vertical][position=start]) .content--overlay{inset-inline-start:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-inline-start)}:host([layout=vertical][position=end]) .content--overlay{inset-inline-end:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-inline-end)}:host([layout=horizontal][position=start]) .content--overlay{inset-block-start:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-block-start)}:host([layout=horizontal][position=end]) .content--overlay{inset-block-end:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-block-end)}.float--content{margin-block-end:auto;block-size:auto;overflow:hidden;--tw-shadow: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--tw-shadow-colored: 0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--calcite-shell-panel-shadow, var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow));border-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));margin-inline:var(--calcite-spacing-sm);margin-block-start:var(--calcite-spacing-sm);max-block-size:var(--calcite-internal-shell-panel-max-height, calc(100% - 1rem) )}.float--content ::slotted(calcite-panel),.float--content ::slotted(calcite-flow){max-block-size:unset}:host([layout=horizontal]) .float--content{margin-block:var(--calcite-spacing-sm)}:host([position=start]) .float--content ::slotted(calcite-panel),:host([position=start]) .float--content ::slotted(calcite-flow),:host([position=end]) .float--content ::slotted(calcite-panel),:host([position=end]) .float--content ::slotted(calcite-flow){border-style:none}slot[name=action-bar]::slotted(calcite-action-bar),.content ::slotted(calcite-flow),.content ::slotted(calcite-panel:not([closed])){border:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=start]:not([slot=panel-end])) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=start]:not([slot=panel-end])) .content ::slotted(calcite-flow),:host([position=start]:not([slot=panel-end])) .content ::slotted(calcite-panel),:host([position=end][slot=panel-start]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=end][slot=panel-start]) .content ::slotted(calcite-flow),:host([position=end][slot=panel-start]) .content ::slotted(calcite-panel){border-inline-start:none}:host([resizable][layout=vertical]) .content ::slotted(calcite-flow),:host([resizable][layout=vertical]) .content ::slotted(calcite-panel){border-inline-start:none;border-inline-end:none}:host([resizable][layout=horizontal]) .content ::slotted(calcite-flow),:host([resizable][layout=horizontal]) .content ::slotted(calcite-panel){border-block-start:none;border-block-end:none}:host([position=end]:not([slot=panel-start])) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=end]:not([slot=panel-start])) .content ::slotted(calcite-flow),:host([position=end]:not([slot=panel-start])) .content ::slotted(calcite-panel),:host([position=start][slot=panel-end]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=start][slot=panel-end]) .content ::slotted(calcite-flow),:host([position=start][slot=panel-end]) .content ::slotted(calcite-panel){border-inline-end:none}:host([layout=horizontal]) slot[name=action-bar]::slotted(calcite-action-bar){border-inline:0}:host([layout=horizontal][position=start]) .content ::slotted(calcite-flow),:host([layout=horizontal][position=start]) .content ::slotted(calcite-panel){border-inline:0;border-block-start:0}:host([layout=horizontal][position=end]) .content ::slotted(calcite-flow),:host([layout=horizontal][position=end]) .content ::slotted(calcite-panel){border-inline:0;border-block-end:0}:host([display-mode=dock]) .resize-handle-bar,:host([display-mode=float-all]) .resize-handle-bar,:host([display-mode=overlay]) .resize-handle-bar{border-block-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);border-block-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}:host([hidden]){display:none}[hidden]{display:none}`,R=class extends A{constructor(){super(...arguments),this.direction=V(),this.actionBars=[],this.contentRef=H(),this.messages=P(),this.sizeOverride=U({targetElement:this.contentRef,getBounds:()=>({inline:{min:this.resizeValues.minInlineSize,max:this.resizeValues.maxInlineSize},block:{min:this.resizeValues.minBlockSize,max:this.resizeValues.maxBlockSize}}),onResize:e=>{this.resizeValues=e}}),this.resizeValues={inlineSize:null,blockSize:null,minInlineSize:null,minBlockSize:null,maxInlineSize:null,maxBlockSize:null},this.hasHeader=!1,this.collapsed=!1,this.displayMode="dock",this.layout="vertical",this.position="start",this.resizable=!1,this.widthScale="m",this.calciteInternalShellPanelResizeEnd=y({cancelable:!1}),this.calciteInternalShellPanelResizeStart=y({cancelable:!1}),this.calciteShellPanelCollapse=y({cancelable:!1}),this.calciteShellPanelExpand=y({cancelable:!1})}static{this.properties={resizeValues:[16,{},{state:!0}],hasHeader:[16,{},{state:!0}],collapsed:[7,{},{reflect:!0,type:Boolean}],displayMode:[3,{},{reflect:!0}],heightScale:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],position:[3,{},{reflect:!0}],resizable:[7,{},{reflect:!0,type:Boolean}],height:[3,{},{reflect:!0}],widthScale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=[T,K]}async updateSize(e){this.updateSizeInternal(e)}willUpdate(e){e.has("layout")&&(this.hasUpdated||this.layout!=="vertical")&&(this.setActionBarsLayout(this.actionBars),this.setupInteractions()),(e.has("direction")&&this.hasUpdated||e.has("position")&&(this.hasUpdated||this.position!=="start"))&&this.setupInteractions(),e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calciteShellPanelCollapse.emit():this.calciteShellPanelExpand.emit())}disconnectedCallback(){super.disconnectedCallback(),this.cleanupInteractions()}getContentElDOMRect(){return this.contentRef.value.getBoundingClientRect()}updateSizeInternal(e){this.contentRef.value&&this.sizeOverride.resize(e)}handleKeyDown(e){let{key:a,defaultPrevented:h,shiftKey:r}=e,{position:l,layout:t,resizable:i,contentRef:c,resizeValues:{maxBlockSize:b,maxInlineSize:z,minBlockSize:f,minInlineSize:k}}=this,d=[...t==="horizontal"?["ArrowUp","ArrowDown"]:["ArrowLeft","ArrowRight"],"Home","End"];if(!i||!c.value||h||!d.includes(a))return;let p=this.getContentElDOMRect(),w=this.direction==="rtl"?-1:1,o=r?_:D;switch(a){case"ArrowUp":this.updateSizeInternal({block:p.height+(t==="horizontal"&&l==="end"?o:-o)}),e.preventDefault();break;case"ArrowDown":this.updateSizeInternal({block:p.height+(t==="horizontal"&&l==="end"?-o:o)}),e.preventDefault();break;case"ArrowLeft":this.updateSizeInternal({inline:p.width+(t==="vertical"&&l==="end"?o:-o)*w}),e.preventDefault();break;case"ArrowRight":this.updateSizeInternal({inline:p.width+(t==="vertical"&&l==="end"?-o:o)*w}),e.preventDefault();break;case"Home":this.updateSizeInternal(t==="horizontal"?{block:f}:{inline:k}),e.preventDefault();break;case"End":this.updateSizeInternal(t==="horizontal"?{block:b}:{inline:z}),e.preventDefault();break}}cleanupInteractions(){this.interaction?.unset()}async setupInteractions(){this.cleanupInteractions();let{el:e,contentRef:a,resizable:h,position:r,collapsed:l,resizeHandleEl:t,layout:i}=this;if(!a.value||l||!h||!t)return;await this.el.componentOnReady();let{inlineSize:c,minInlineSize:b,blockSize:z,minBlockSize:f,maxInlineSize:k,maxBlockSize:x}=window.getComputedStyle(a.value),d={inlineSize:u(c),blockSize:u(z),minInlineSize:u(b),minBlockSize:u(f),maxInlineSize:u(k)||window.innerWidth,maxBlockSize:u(x)||window.innerHeight};this.resizeValues=d;let p=this.direction==="rtl";this.interaction=$(a.value,{context:e.ownerDocument}).resizable({edges:{top:r==="end"&&i==="horizontal"?t:!1,right:r===(p?"end":"start")&&i==="vertical"?t:!1,bottom:r==="start"&&i==="horizontal"?t:!1,left:r===(p?"start":"end")&&i==="vertical"?t:!1},modifiers:[$.modifiers.restrictSize({min:{width:d.minInlineSize,height:d.minBlockSize},max:{width:d.maxInlineSize,height:d.maxBlockSize}})],listeners:{resizestart:()=>{this.calciteInternalShellPanelResizeStart.emit()},resizeend:()=>{this.calciteInternalShellPanelResizeEnd.emit()},move:({rect:w})=>{let o=i==="horizontal";this.updateSize(o?{block:w.height}:{inline:w.width})}}})}setResizeHandleEl(e){this.resizeHandleEl=e,this.setupInteractions()}setActionBarsLayout(e){e.forEach(a=>a.layout=this.layout)}handleActionBarSlotChange(e){let a=L(e).filter(h=>h?.matches("calcite-action-bar"));this.actionBars=a,this.setActionBarsLayout(a)}handleHeaderSlotChange(e){this.hasHeader=O(e)}getResizeIcon(){let{layout:e}=this;return e==="horizontal"?N.dragVertical:N.dragHorizontal}renderHeader(){return g("header",m`<div class=${s(n.contentHeader)} .hidden=${!this.hasHeader}><slot name=${M.header} @slotchange=${this.handleHeaderSlotChange}></slot></div>`)}render(){let{collapsed:e,position:a,resizable:h,layout:r,displayMode:l,resizeValues:t}=this,i=this.direction,c=r==="horizontal",b=!e&&h?g("resize-handle",m`<div .ariaLabel=${this.messages.resize} .ariaOrientation=${c?"vertical":"horizontal"} .ariaValueMax=${S(c?"block":"inline",t.maxBlockSize,t.maxInlineSize)} .ariaValueMin=${S(c?"block":"inline",t.minBlockSize,t.minInlineSize)} .ariaValueNow=${S(c?"block":"inline",t.blockSize,t.inlineSize)} class=${s(n.resizeHandle)} @keydown=${this.handleKeyDown} role=separator tabindex=0 touch-action=none ${B(this.setResizeHandleEl)}><div class=${s(n.resizeHandleBar)}><calcite-icon .icon=${this.getResizeIcon()} scale=s></calcite-icon></div></div>`):null,z=()=>r==="horizontal"?a==="start"?v.calciteAnimateInDown:v.calciteAnimateInUp:i==="ltr"&&a==="end"||i==="rtl"&&a==="start"?v.calciteAnimateInLeft:v.calciteAnimateInRight,f=m`<div class=${s(n.contentContainer)}>${g("content",m`<div class=${s({[v.rtl]:i==="rtl",[n.content]:!0,[n.contentOverlay]:l==="overlay",[n.floatContent]:l==="float-content"||l==="float",[v.calciteAnimate]:l==="overlay",[z()]:l==="overlay",[C("width",this.width,this.widthScale)]:!!(this.width||this.widthScale),[C("height",this.height,this.heightScale)]:!!(this.height||this.heightScale)})} .hidden=${e} ${B(this.contentRef)}>${this.renderHeader()}<div class=${s(n.contentBody)}><slot></slot></div>${b}</div>`)}</div>`,x=[g("action-bar-container",m`<div class=${s(n.actionBarContainer)}><slot name=${M.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`),f];return a==="end"&&x.reverse(),m`<div class=${s({[n.container]:!0,[n.floatAll]:l==="float-all"})}>${x}</div>`}};E("calcite-shell-panel",R);export{R as ShellPanel};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as y}from"./
|
|
2
|
+
import{a as y}from"./Q4P6Z6E5.js";import{a as z}from"./JMN7KYK5.js";import{c as k,d as f,e as x}from"./GP7XSV5A.js";import{a as m}from"./5XHCDQFZ.js";import{a as p}from"./YGX7CUXN.js";import{a as u}from"./DICEHD76.js";import{a as v}from"./Z6W2R7TV.js";import"./RH6ZIP65.js";import{e as b}from"./SLPX32KY.js";import"./RVK7AGJY.js";import"./QHGI7X2A.js";import"./OAOQ5BXS.js";import{E as r,F as n,G as h,H as i,J as a,M as d,S as g,g as o,h as s,i as l,p as t}from"./WDH6SQXQ.js";var w={toggle:"toggle",check:"check-svg"},C=o`: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([scale=s]) .check-svg,:host([scale=s]) .toggle{inline-size:var(--calcite-checkbox-size, .75rem);block-size:var(--calcite-checkbox-size, .75rem)}:host([scale=m]) .check-svg,:host([scale=m]) .toggle{inline-size:var(--calcite-checkbox-size, var(--calcite-font-size-relative-base));block-size:var(--calcite-checkbox-size, var(--calcite-font-size-relative-base))}:host([scale=l]) .check-svg,:host([scale=l]) .toggle{inline-size:var(--calcite-checkbox-size, 1rem);block-size:var(--calcite-checkbox-size, 1rem)}:host{position:relative;display:inline-flex;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}:host .check-svg{pointer-events:none;box-sizing:border-box;display:block;overflow:hidden;background-color:var(--calcite-color-foreground-1);fill:currentColor;stroke:currentColor;stroke-width:1;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;box-shadow:inset 0 0 0 1px var(--calcite-checkbox-border-color, var(--calcite-color-border-input));color:var(--calcite-checkbox-icon-color, var(--calcite-color-background))}:host([status=invalid]:not([checked])) .check-svg{box-shadow:inset 0 0 0 1px var(--calcite-color-status-danger)}:host([status=invalid]:not([checked])) .toggle:hover .check-svg{box-shadow:inset 0 0 0 2px var(--calcite-color-brand-hover)}:host([status=invalid]:not([checked])) .toggle:active .check-svg{box-shadow:inset 0 0 0 2px var(--calcite-color-brand-press)}:host([status=invalid]:not([checked])) .toggle:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([checked]) .check-svg,:host([indeterminate]) .check-svg{background-color:var(--calcite-color-brand);box-shadow:inset 0 0 0 1px var(--calcite-color-brand)}:host([checked]) .toggle:hover .check-svg,:host([indeterminate]) .toggle:hover .check-svg{background-color:var(--calcite-checkbox-border-color-hover, var(--calcite-color-brand-hover))}:host([checked]) .toggle:active .check-svg,:host([indeterminate]) .toggle:active .check-svg{background-color:var(--calcite-checkbox-border-color-press, var(--calcite-color-brand-press));box-shadow:inset 0 0 0 2px var(--calcite-checkbox-border-color-press, var(--calcite-color-brand-press))}:host([hovered]) .toggle .check-svg,:host .toggle:hover .check-svg{box-shadow:inset 0 0 0 2px var(--calcite-checkbox-border-color-hover, var(--calcite-color-brand-hover))}.toggle:active .check-svg{box-shadow:inset 0 0 0 2px var(--calcite-checkbox-border-color-press, var(--calcite-color-brand-press))}.toggle{position:relative;outline-color:transparent}.toggle:active,.toggle:focus,.toggle:focus-visible{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.toggle:after,.toggle:before{inset-block-start:50%;inset-inline-start:50%;min-block-size:1.5rem;min-inline-size:1.5rem;position:absolute}.toggle:not(.calcite--rtl):after{content:"";transform:translate(-50%) translateY(-50%)}.toggle.calcite--rtl:before{content:"";transform:translate(50%) translateY(-50%)}@media(forced-colors:active){.check-svg{border:1px solid currentColor}}.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)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`,c=class extends h{constructor(){super(),this.checkedPath="M5.5 12L2 8.689l.637-.636L5.5 10.727l8.022-7.87.637.637z",this.direction=b(),this.formSupport=z({inputType:"checkbox"})(this),this.indeterminatePath="M13 8v1H3V8z",this.onLabelClick=()=>{this.toggle()},this.toggleRef=r(),this.messages=u(),this.focusSetter=v()(this),this.interactiveContainer=m(this),this.checked=!1,this.disabled=!1,this.hovered=!1,this.indeterminate=!1,this.required=!1,this.scale="m",this.status="idle",this.calciteCheckboxChange=t({cancelable:!1}),this.calciteInternalCheckboxBlur=t({cancelable:!1}),this.calciteInternalCheckboxFocus=t({cancelable:!1}),this.listen("click",this.clickHandler),this.listen("keydown",this.keyDownHandler)}static{this.properties={checked:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],hovered:[7,{},{reflect:!0,type:Boolean}],indeterminate:[7,{},{reflect:!0,type:Boolean}],label:1,labelText:1,messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],validity:[32,{},{readOnly:!0,attribute:!1}],value:1}}static{this.formAssociated=!0}static{this.styles=C}async setFocus(e){return this.focusSetter(()=>this.toggleRef.value,e)}connectedCallback(){super.connectedCallback(),k(this)}disconnectedCallback(){super.disconnectedCallback(),f(this)}getPath(){return this.indeterminate?this.indeterminatePath:this.checked?this.checkedPath:""}toggle(){this.disabled||(this.checked=!this.checked,this.setFocus(),this.indeterminate=!1,this.calciteCheckboxChange.emit())}keyDownHandler(e){p(e.key)&&(this.toggle(),e.preventDefault())}clickHandler(){this.toggle()}onToggleBlur(){this.calciteInternalCheckboxBlur.emit(!1)}onToggleFocus(){this.calciteInternalCheckboxFocus.emit(!0)}render(){let e=this.direction==="rtl";return this.interactiveContainer({disabled:this.disabled,children:s`<div .ariaChecked=${this.checked} .ariaLabel=${x(this)} .ariaRequired=${this.required} class=${i({[w.toggle]:!0,[d.rtl]:e})} @blur=${this.onToggleBlur} @focus=${this.onToggleFocus} role=checkbox tabindex=${(this.disabled?void 0:0)??a} ${n(this.toggleRef)}><svg aria-hidden=true class=${i(w.check)} viewBox="0 0 16 16">${l`<path d=${this.getPath()??a} />`}</svg><slot></slot></div>${this.labelText&&y({bottomSpacingDisabled:!0,labelText:this.labelText,required:this.required,spacingInlineStart:!0,tooltipText:this.messages.required})||""}`})}};g("calcite-checkbox",c);export{c as Checkbox};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{b as M}from"./WKR7R7AZ.js";import{a as m}from"./YSDXNIIL.js";import{a as A}from"./YGX7CUXN.js";import{a as p,b as r,c as h,d as B}from"./RRXOB3GM.js";import{c as b}from"./G52BPUIA.js";import{a as I}from"./
|
|
2
|
+
import{b as M}from"./WKR7R7AZ.js";import{a as m}from"./YSDXNIIL.js";import{a as A}from"./YGX7CUXN.js";import{a as p,b as r,c as h,d as B}from"./RRXOB3GM.js";import{c as b}from"./G52BPUIA.js";import{a as I}from"./Z6W2R7TV.js";import"./RH6ZIP65.js";import"./SLPX32KY.js";import"./RVK7AGJY.js";import"./QHGI7X2A.js";import{a as x}from"./OAOQ5BXS.js";import{F as u,G as E,H as d,S as v,g,h as o,l,p as c}from"./WDH6SQXQ.js";var D=g`:host([scale=s]){--calcite-internal-action-menu-gap: var(--calcite-action-menu-items-space, var(--calcite-spacing-xxs));--calcite-internal-action-menu-padding: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-action-menu-gap: var(--calcite-action-menu-items-space, var(--calcite-spacing-sm));--calcite-internal-action-menu-padding: var(--calcite-spacing-sm)}:host([scale=l]){--calcite-internal-action-menu-gap: var(--calcite-action-menu-items-space, var(--calcite-spacing-sm-plus));--calcite-internal-action-menu-padding: var(--calcite-spacing-sm-plus)}:host{box-sizing:border-box;display:flex;flex-direction:column;font-size:var(--calcite-font-size-relative-lg)}::slotted(calcite-action-group:not(:last-of-type)){border-block-end-width:var(--calcite-border-width-sm);padding-block-end:var(--calcite-internal-action-menu-padding)}.default-trigger{position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}slot[name=trigger]::slotted(calcite-action),calcite-action::slotted([slot=trigger]){position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}.menu{display:flex;max-block-size:45vh;flex-direction:column;flex-wrap:nowrap;overflow-y:auto;overflow-x:hidden;outline:2px solid transparent;outline-offset:2px;gap:var(--calcite-internal-action-menu-gap);padding:var(--calcite-internal-action-menu-padding)}:host([hidden]){display:none}[hidden]{display:none}`,C=["ArrowUp","ArrowDown","End","Home"],f=class extends E{constructor(){super(...arguments),this.guid=x(),this.actionElements=[],this.menuButtonClick=()=>{this.toggleOpen()},this.menuButtonId=r.button(this.guid),this.menuButtonKeyDown=e=>{let{key:t}=e,{actionElements:n,activeMenuItemIndex:i,open:a}=this;if(n.length){if(A(t)){if(e.preventDefault(),!a){this.toggleOpen();return}let s=n[i];s?s.click():this.toggleOpen(!1)}if(t==="Tab"){this.open=!1;return}if(t==="Escape"){this.toggleOpen(!1),e.preventDefault();return}this.handleActionNavigation(e,t,n)}},this.menuId=r.menu(this.guid),this._open=!1,this.updateAction=(e,t)=>{let{guid:n,activeMenuItemIndex:i}=this,a=r.action(n,t);e.tabIndex=-1,e.setAttribute("role","menuitem"),e.id||(e.id=a),e.activeDescendant=t===i},this.focusSetter=I()(this),this.mouseDownHandler=e=>{e.composedPath().some(b)&&(this.activeMenuItemIndex=this.actionElements?.findIndex(t=>t===e.target))},this.activeMenuItemIndex=-1,this.appearance="solid",this.expanded=!1,this.overlayPositioning="absolute",this.placement="auto",this.topLayerDisabled=!1,this.scale="m",this.calciteActionMenuCollapse=c({cancelable:!1}),this.calciteActionMenuExpand=c({cancelable:!1}),this.calciteActionMenuOpen=c({cancelable:!1})}static{this.properties={activeMenuItemIndex:[16,{},{state:!0}],menuButtonEl:[16,{},{state:!0}],appearance:[3,{},{reflect:!0}],expanded:[7,{},{reflect:!0,type:Boolean}],flipPlacements:[0,{},{attribute:!1}],label:1,open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}]}}static{this.styles=D}get open(){return this._open}set open(e){let t=this._open;e!==t&&(this._open=e,this.openHandler(e))}async setFocus(e){return this.focusSetter(()=>this.menuButtonEl,e)}connectedCallback(){super.connectedCallback(),this.connectMenuButtonEl(),this.listen("mousedown",this.mouseDownHandler)}willUpdate(e){e.has("expanded")&&(this.hasUpdated||this.expanded!==!1)&&this.expandedHandler(),e.has("activeMenuItemIndex")&&(this.hasUpdated||this.activeMenuItemIndex!==-1)&&this.updateActions(this.actionElements),e.has("expanded")&&this.hasUpdated&&(this.expanded?this.calciteActionMenuExpand.emit():this.calciteActionMenuCollapse.emit())}disconnectedCallback(){super.disconnectedCallback(),this.disconnectMenuButtonEl()}expandedHandler(){this.open=!1,this.setTooltipReferenceElement()}openHandler(e){this.menuButtonEl&&(this.menuButtonEl.active=e,this.menuButtonEl.aria={expanded:e}),this.popoverEl&&(this.popoverEl.open=e),this.activeMenuItemIndex=this.open?0:-1,this.calciteActionMenuOpen.emit(),this.setTooltipReferenceElement()}connectMenuButtonEl(){let{menuButtonId:e,menuId:t,open:n,label:i}=this,a=this.slottedMenuButtonEl||this.defaultMenuButtonEl;this.menuButtonEl!==a&&(this.disconnectMenuButtonEl(),this.menuButtonEl=a,this.setTooltipReferenceElement(),a&&(a.active=n,a.setAttribute("aria-controls",t),a.setAttribute("aria-expanded",M(n)),a.setAttribute("aria-haspopup","true"),a.id||(a.id=e),a.label||(a.label=i),a.text||(a.text=i),a.addEventListener("click",this.menuButtonClick),a.addEventListener("keydown",this.menuButtonKeyDown)))}disconnectMenuButtonEl(){let{menuButtonEl:e}=this;e&&(e.removeEventListener("click",this.menuButtonClick),e.removeEventListener("keydown",this.menuButtonKeyDown),this.menuButtonEl=null)}setMenuButtonEl(e){let t=e.target.assignedElements({flatten:!0}).filter(n=>n?.matches("calcite-action"));this.slottedMenuButtonEl=t[0],this.connectMenuButtonEl()}setDefaultMenuButtonEl(e){this.defaultMenuButtonEl=e,this.connectMenuButtonEl()}setPopoverEl(e){e&&(this.popoverEl=e,e.open=this.open)}handleCalciteActionClick(e){this.actionElements?.some(t=>e.composedPath().includes(t))&&(this.open=!1,this.setFocus())}updateTooltip(e){let t=e.target.assignedElements({flatten:!0}).filter(n=>n?.matches("calcite-tooltip"));this.tooltipEl=t[0],this.setTooltipReferenceElement()}setTooltipReferenceElement(){let{tooltipEl:e,expanded:t,menuButtonEl:n,open:i}=this;e&&(e.referenceElement=!t&&!i?n:null)}updateActions(e){e?.forEach(this.updateAction)}async handleDefaultSlotChange(e){let t=e.target.assignedElements({flatten:!0}).reduce((n,i)=>i?.matches("calcite-action")?(n.push(i),n):i?.matches("calcite-action-group")?n.concat(Array.from(i.querySelectorAll("calcite-action"))):n,[]);await this.componentOnReady(),this.actionElements=t.filter(n=>!n.disabled&&!n.hidden)}isValidKey(e,t){return!!t.find(n=>n===e)}handleActionNavigation(e,t,n){if(!this.isValidKey(t,C))return;if(e.preventDefault(),!this.open){this.toggleOpen(),(t==="Home"||t==="ArrowDown")&&(this.activeMenuItemIndex=0),(t==="End"||t==="ArrowUp")&&(this.activeMenuItemIndex=n.length-1);return}t==="Home"&&(this.activeMenuItemIndex=0),t==="End"&&(this.activeMenuItemIndex=n.length-1);let i=this.activeMenuItemIndex;t==="ArrowUp"&&(this.activeMenuItemIndex=m(Math.max(i-1,-1),n.length)),t==="ArrowDown"&&(this.activeMenuItemIndex=m(i+1,n.length))}toggleOpen(e=!this.open){this.open=e}handlePopoverOpen(e){e.stopPropagation(),this.open=!0,this.setFocus()}handlePopoverClose(e){e.stopPropagation(),this.open=!1}renderMenuButton(){let{appearance:e,label:t,scale:n,expanded:i}=this;return o`<slot name=${h.trigger} @slotchange=${this.setMenuButtonEl}><calcite-action .appearance=${e} .aria=${{expanded:i}} class=${d(p.defaultTrigger)} .icon=${B.menu} .scale=${n} .text=${t} .textEnabled=${i} ${u(this.setDefaultMenuButtonEl)}></calcite-action></slot>`}renderMenuItems(){let{actionElements:e,activeMenuItemIndex:t,menuId:n,menuButtonEl:i,label:a,placement:s,overlayPositioning:$,flipPlacements:y}=this,w=e[t]?.id||null;return o`<calcite-popover auto-close .flipPlacements=${y} focus-trap-disabled .label=${a} offset-distance=0 @calcitePopoverClose=${this.handlePopoverClose} @calcitePopoverOpen=${this.handlePopoverOpen} .overlayPositioning=${$} .placement=${s} pointer-disabled .referenceElement=${i} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled} trigger-disabled ${u(this.setPopoverEl)}><div aria-activedescendant=${w??l} aria-labelledby=${i?.id??l} class=${d(p.menu)} id=${n??l} @click=${this.handleCalciteActionClick} role=menu tabindex=-1><slot @slotchange=${this.handleDefaultSlotChange}></slot></div></calcite-popover>`}render(){return o`${this.renderMenuButton()}${this.renderMenuItems()}<slot name=${h.tooltip} @slotchange=${this.updateTooltip}></slot>`}};v("calcite-action-menu",f);export{f as ActionMenu};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{a as m}from"./KUPS36J3.js";import"./RMQMFLJJ.js";import{a as s}from"./PZTXPQU2.js";import{a as u}from"./Z6W2R7TV.js";import"./RH6ZIP65.js";import"./SLPX32KY.js";import"./RVK7AGJY.js";import"./QHGI7X2A.js";import"./OAOQ5BXS.js";import{G as p,H as t,J as n,S as f,g as h,h as e}from"./WDH6SQXQ.js";var i={container:"container",containerLink:"container--link",textContainer:"text-container",heading:"heading",description:"description",image:"image",standalone:"standalone",icon:"icon"},x=h`:host{display:inline-flex}:host([scale=s]){--calcite-internal-navigation-logo-padding-inline: var(--calcite-space-md);--calcite-internal-navigation-logo-image-size: 1.75rem;--calcite-internal-navigation-logo-heading-font-size: var(--calcite-font-size-relative-base);--calcite-internal-navigation-logo-heading-standalone-font-size: var(--calcite-font-size-1);--calcite-internal-navigation-logo-description-font-size: var(--calcite-font-size-relative-sm);--calcite-internal-navigation-logo-heading-line-height: var(--calcite-space-lg);--calcite-internal-navigation-logo-description-line-height: var(--calcite-space-lg)}:host([scale=m]){--calcite-internal-navigation-logo-padding-inline: var(--calcite-space-lg);--calcite-internal-navigation-logo-image-size: 1.75rem;--calcite-internal-navigation-logo-heading-font-size: var(--calcite-font-size-relative-md);--calcite-internal-navigation-logo-heading-standalone-font-size: var(--calcite-font-size-relative-lg);--calcite-internal-navigation-logo-description-font-size: var(--calcite-font-size-relative-base);--calcite-internal-navigation-logo-heading-line-height: var(--calcite-space-xl);--calcite-internal-navigation-logo-description-line-height: var(--calcite-space-lg)}:host([scale=l]){--calcite-internal-navigation-logo-padding-inline: var(--calcite-space-xl);--calcite-internal-navigation-logo-image-size: 2.75rem;--calcite-internal-navigation-logo-heading-font-size: var(--calcite-font-size-relative-xl);--calcite-internal-navigation-logo-heading-standalone-font-size: var(--calcite-font-size-relative-xl);--calcite-internal-navigation-logo-description-font-size: var(--calcite-font-size-relative-lg);--calcite-internal-navigation-logo-heading-line-height: var(--calcite-space-2xl);--calcite-internal-navigation-logo-description-line-height: var(--calcite-space-2xl)}.container{margin:0;display:flex;align-items:center;justify-content:center;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);background-color:var(--calcite-navigation-background-color, var(--calcite-internal-navigation-logo-background-color, var(--calcite-color-foreground-1)));border-block-end:2px solid var(--calcite-color-transparent);transition-property:background-color;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out}.container--link{cursor:pointer;text-decoration-line:none;outline-color:transparent}:host(:focus) .container--link{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.image{block-size:var(--calcite-internal-navigation-logo-image-size)}.image,.icon{margin:0;display:flex;color:var(--calcite-navigation-logo-text-color, var(--calcite-icon-color, var(--calcite-internal-navigation-logo-text-color, var(--calcite-ui-icon-color, inherit))));padding-inline:var(--calcite-internal-navigation-logo-padding-inline)}.image~.icon{padding-inline-start:0px}.image~.text-container,.icon~.text-container{padding-inline-start:0px}:host([href]:hover),:host([href]:focus){--calcite-internal-navigation-logo-background-color: var(--calcite-color-foreground-2)}:host([href]:active){--calcite-internal-navigation-logo-background-color: var(--calcite-color-foreground-3)}:host([active]) .container{border-block-end-color:var(--calcite-navigation-accent-color, var(--calcite-color-brand))}:host([active]),:host([href]:active){--calcite-internal-navigation-logo-text-color: var(--calcite-color-brand)}.text-container{margin-block-start:.125rem;display:flex;flex-direction:column;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:start;padding-inline:var(--calcite-internal-navigation-logo-padding-inline)}.heading{margin-inline-start:0px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-navigation-logo-heading-text-color, var(--calcite-color-text-1));font-size:var(--calcite-internal-navigation-logo-heading-font-size);padding-block-start:var(--calcite-space-2xs);line-height:var(--calcite-internal-navigation-logo-heading-line-height)}.standalone{font-size:var(--calcite-internal-navigation-logo-heading-standalone-font-size)}.description{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--calcite-color-text-2);color:var(--calcite-navigation-logo-text-color, var(--calcite-color-text-2));font-size:var(--calcite-internal-navigation-logo-description-font-size);line-height:var(--calcite-internal-navigation-logo-description-line-height)}:host([hidden]){display:none}[hidden]{display:none}`,g=class extends p{constructor(){super(...arguments),this.focusSetter=u()(this),this.iconFlipRtl=!1,this.scale="m"}static{this.properties={active:[7,{},{reflect:!0,type:Boolean}],description:1,heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],href:[3,{},{reflect:!0}],icon:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],label:1,rel:[3,{},{reflect:!0}],target:[3,{},{reflect:!0}],thumbnail:1,scale:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=x}async setFocus(a){return this.focusSetter(()=>this.href?this.el:void 0,a)}renderIcon(){return e`<calcite-icon class=${t(i.icon)} .flipRtl=${this.iconFlipRtl} .icon=${this.icon} .scale=${this.scale==="s"?"m":"l"}></calcite-icon>`}renderHeaderContent(){let{heading:a,headingLevel:o,description:l}=this,c=a?s(i.heading,m({class:{[i.heading]:!0,[i.standalone]:!this.description},level:o,children:a})):null,r=l?s(i.description,e`<span class=${t(i.description)}>${l}</span>`):null;return c||r?s(i.textContainer,e`<div class=${t(i.textContainer)}>${c}${r}</div>`):null}render(){let{icon:a,href:o,label:l,rel:c,target:r,thumbnail:d}=this,v=e`${d&&e`<img alt=${(l||"")??n} class=${t(i.image)} src=${d??n}>`||""}${a&&this.renderIcon()||""}${this.renderHeaderContent()}`;return o?e`<a class=${t({[i.container]:!0,[i.containerLink]:!0})} href=${o??n} rel=${c??n} target=${r??n}>${v}</a>`:e`<div class=${t(i.container)}>${v}</div>`}};f("calcite-navigation-logo",g);export{g as NavigationLogo};
|