@esri/calcite-components 5.2.0-next.87 → 5.2.0-next.89
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/{25WPUAQ6.js → 26LFYYFK.js} +1 -1
- package/dist/cdn/{WCY4HV7K.js → 2BNRRQOM.js} +1 -1
- package/dist/cdn/{CW2LSYVS.js → 2JKVTJMF.js} +1 -1
- package/dist/cdn/{2XLH4MRQ.js → 2KKKLKLS.js} +1 -1
- package/dist/cdn/{GYRB7IXS.js → 2WL5RWTS.js} +1 -1
- package/dist/cdn/{GOQNHOUH.js → 2YC6C6DV.js} +1 -1
- package/dist/cdn/{A6BETFHC.js → 32YSNEMV.js} +1 -1
- package/dist/cdn/{NUVSBIFZ.js → 3AQABKUH.js} +1 -1
- package/dist/cdn/{6ZLRMD27.js → 3FIQGT53.js} +1 -1
- package/dist/cdn/{ZMK465AW.js → 3MJUD5DK.js} +1 -1
- package/dist/cdn/{YU5XC4MR.js → 3N4CB3JF.js} +1 -1
- package/dist/cdn/{P4WBM2GV.js → 46RJGA37.js} +1 -1
- package/dist/cdn/{ZKZU3J4P.js → 4A4ELKGI.js} +1 -1
- package/dist/cdn/{IFV7R5OL.js → 4MLD7GED.js} +1 -1
- package/dist/cdn/{UFNGOAJQ.js → 4OJIHGWI.js} +1 -1
- package/dist/cdn/{M43QUBLO.js → 4ONAIXN6.js} +1 -1
- package/dist/cdn/{WO4YIR3U.js → 4SDMPRCV.js} +1 -1
- package/dist/cdn/{CHBHRWMB.js → 4YLLJSV5.js} +1 -1
- package/dist/cdn/{INGWAWHR.js → 4Z52O3ZU.js} +1 -1
- package/dist/cdn/{ROWZX6Q2.js → 5EFYAUXZ.js} +1 -1
- package/dist/cdn/{PJGNFGZM.js → 5JXLGXFB.js} +1 -1
- package/dist/cdn/{5PK6MLR3.js → 5OBZN5DY.js} +1 -1
- package/dist/cdn/{DFLZN3GV.js → 5QPGH3VE.js} +1 -1
- package/dist/cdn/{GOJITCV7.js → 5R66SDIW.js} +1 -1
- package/dist/cdn/{4AXX5R3P.js → 5SUB6LD5.js} +1 -1
- package/dist/cdn/{7CCX34HI.js → 5VIKMMR7.js} +1 -1
- package/dist/cdn/{UOQDCLGD.js → 627DG4WA.js} +1 -1
- package/dist/cdn/{MME4SYFJ.js → 62UX6F4M.js} +1 -1
- package/dist/cdn/{LRZENKUA.js → 6GZMSPRK.js} +1 -1
- package/dist/cdn/{BA7QWESV.js → 6HFE4F5X.js} +1 -1
- package/dist/cdn/{VRYDL5Z7.js → 6NAQTGPW.js} +1 -1
- package/dist/cdn/{6Z4CMKRB.js → 6VDNFDPN.js} +1 -1
- package/dist/cdn/{PPQPKSNR.js → 7DHCRQFB.js} +1 -1
- package/dist/cdn/{TGIRT532.js → 7UDLVZXL.js} +1 -1
- package/dist/cdn/{W5YEZ4UA.js → 7Y4FQ2I7.js} +1 -1
- package/dist/cdn/{VJFLGFIP.js → A2IKBYZS.js} +1 -1
- package/dist/cdn/{JF5T57HX.js → A4DMMTBY.js} +1 -1
- package/dist/cdn/{GYVJRAVU.js → AEWVLZKY.js} +1 -1
- package/dist/cdn/{D57IJD77.js → APMXUV5R.js} +1 -1
- package/dist/cdn/{72RCHIWX.js → AWROROOF.js} +1 -1
- package/dist/cdn/{IUFUHWRF.js → AXJPT3JP.js} +1 -1
- package/dist/cdn/{UYJY4BI3.js → AY76L4BR.js} +1 -1
- package/dist/cdn/{HRK2Y4U2.js → B6QS5FML.js} +1 -1
- package/dist/cdn/{ETO6NLPI.js → BIJZHMJI.js} +1 -1
- package/dist/cdn/{DMKG2CHE.js → BKAUO5NQ.js} +1 -1
- package/dist/cdn/{APNR7FLN.js → BWUSL74F.js} +1 -1
- package/dist/cdn/{GCDYN4UF.js → CFISKSOC.js} +1 -1
- package/dist/cdn/{WYCVFSCE.js → CIEXQXMT.js} +1 -1
- package/dist/cdn/{4D53A53I.js → CQPEF7LH.js} +1 -1
- package/dist/cdn/{3P7WOKE4.js → CWMXA6W6.js} +1 -1
- package/dist/cdn/{LYX2PVBO.js → D237EYZG.js} +1 -1
- package/dist/cdn/{HLZXNSSM.js → D72GZFJ4.js} +1 -1
- package/dist/cdn/{BENKWDGL.js → D7L3SKCG.js} +1 -1
- package/dist/cdn/{HTXB4R3O.js → DJIJWOST.js} +1 -1
- package/dist/cdn/{EI3XE3RW.js → DZWHEL5T.js} +1 -1
- package/dist/cdn/{YGOUBZ72.js → ELLCEQPW.js} +1 -1
- package/dist/cdn/{67L7W6CI.js → EOI7MXE5.js} +1 -1
- package/dist/cdn/{3LVRJOWC.js → G6EK753X.js} +1 -1
- package/dist/cdn/{XGIWKEEB.js → GT4XOEQF.js} +1 -1
- package/dist/cdn/{RACJFL3V.js → H2NKPQR6.js} +1 -1
- package/dist/cdn/{VCAQG5PF.js → HL2P2LHA.js} +1 -1
- package/dist/cdn/{WBMDWPSH.js → HZ2YWVP5.js} +1 -1
- package/dist/cdn/{YDNKGFXB.js → HZ5HCW62.js} +1 -1
- package/dist/cdn/{WY7D2KFR.js → IGNWGFRZ.js} +1 -1
- package/dist/cdn/{P5CK4AXE.js → INBPCXOL.js} +1 -1
- package/dist/cdn/{SHFY54TN.js → IR4MWUWE.js} +1 -1
- package/dist/cdn/{MSZZ6AUV.js → ITZJJT2W.js} +1 -1
- package/dist/cdn/{YJ4WWFPC.js → IUQ7BRH6.js} +1 -1
- package/dist/cdn/{AEHLNK4E.js → J4OWDBDV.js} +1 -1
- package/dist/cdn/{OYBCTSNB.js → JOL7FBJL.js} +1 -1
- package/dist/cdn/{RMSWXC6O.js → K5ZY2HGT.js} +1 -1
- package/dist/cdn/{FEZSX6ND.js → KND6NXX5.js} +1 -1
- package/dist/cdn/{QVOR7U7S.js → KNMGQWQA.js} +1 -1
- package/dist/cdn/{4EGLAP6O.js → KQ57G3ID.js} +1 -1
- package/dist/cdn/{U5WQPEJF.js → KR7QO7LA.js} +1 -1
- package/dist/cdn/{XTQ7GT6M.js → LEREUFUP.js} +1 -1
- package/dist/cdn/{XOEHEYXH.js → LFDRYRW3.js} +1 -1
- package/dist/cdn/{UQA4NM7C.js → LGO3TCAO.js} +1 -1
- package/dist/cdn/{VW2NPHDP.js → MG5KEVZ3.js} +1 -1
- package/dist/cdn/{SK5MOAPI.js → MPU5OGOV.js} +1 -1
- package/dist/cdn/{4BXM7HRC.js → MQJ4SXXG.js} +1 -1
- package/dist/cdn/{J2ON6JBP.js → MR4PDGYT.js} +1 -1
- package/dist/cdn/{FR2TCZOI.js → MXOE5AI6.js} +1 -1
- package/dist/cdn/{AI6PUPW4.js → N4XJ4OSG.js} +1 -1
- package/dist/cdn/{BRKFQRHS.js → ND7N7SZG.js} +1 -1
- package/dist/cdn/{3XWFB6SQ.js → NGZS5LXK.js} +1 -1
- package/dist/cdn/{2S7BOFLH.js → NJB26RSN.js} +1 -1
- package/dist/cdn/{4K4HUHYE.js → NPB47ODT.js} +1 -1
- package/dist/cdn/{6XFJJRVM.js → NPMXOTYG.js} +1 -1
- package/dist/cdn/{3645VQKZ.js → NUNR3S2C.js} +1 -1
- package/dist/cdn/{LOQF44XL.js → NVSQVYCR.js} +1 -1
- package/dist/cdn/{Q46U2MOZ.js → NYD3V53R.js} +1 -1
- package/dist/cdn/{7RPZNSJQ.js → O7G57ZIN.js} +1 -1
- package/dist/cdn/{3FJIQBGX.js → OCC67JRE.js} +1 -1
- package/dist/cdn/{VZVUABC7.js → OQ66BXKY.js} +1 -1
- package/dist/cdn/{56RJ6S2D.js → P3GVFMJT.js} +1 -1
- package/dist/cdn/{7F5JW6XI.js → P54KTU3K.js} +1 -1
- package/dist/cdn/{3DO6XONU.js → PA2BHIBQ.js} +3 -3
- package/dist/cdn/{BKFCUZYW.js → PADKOLRD.js} +1 -1
- package/dist/cdn/{NOC4QG5S.js → PCG3SIHG.js} +1 -1
- package/dist/cdn/{YJ4CPIT5.js → PVH27IB6.js} +1 -1
- package/dist/cdn/{AWFCHCE2.js → PW4CWXX5.js} +1 -1
- package/dist/cdn/{KFJT2YPH.js → Q6A7JJCH.js} +1 -1
- package/dist/cdn/{BU6CQ5WG.js → QEAQHUU5.js} +1 -1
- package/dist/cdn/{252COOIA.js → QM4T6NGO.js} +1 -1
- package/dist/cdn/{5QGEH2ZE.js → QMH5PWW5.js} +1 -1
- package/dist/cdn/{D7RPVHG7.js → QST22GTE.js} +1 -1
- package/dist/cdn/{4XCCOIFK.js → QU5TMZP7.js} +1 -1
- package/dist/cdn/{KUFAJTJ4.js → R2DPIOBF.js} +1 -1
- package/dist/cdn/{SNPJ7D2G.js → R6EW4636.js} +1 -1
- package/dist/cdn/{BEO5MDAJ.js → RB36HJW6.js} +1 -1
- package/dist/cdn/{T353MAH7.js → RKX3C5P4.js} +1 -1
- package/dist/cdn/{JUU3TFXT.js → S2FXQFW4.js} +1 -1
- package/dist/cdn/{O7Z4ZY7U.js → S3KI2KML.js} +1 -1
- package/dist/cdn/{R7T2HW7H.js → S4EGOEXA.js} +1 -1
- package/dist/cdn/{F3EK5MH2.js → S57DUWOX.js} +1 -1
- package/dist/cdn/{IW3M2WVP.js → SAFNBLHT.js} +1 -1
- package/dist/cdn/{ZLRJUXIO.js → SYTHB6CH.js} +1 -1
- package/dist/cdn/{YPZFT4IE.js → TAGX6ZWL.js} +1 -1
- package/dist/cdn/{CJINEN2F.js → TS6MVFYP.js} +1 -1
- package/dist/cdn/{3KRRCZM2.js → TU3E75CG.js} +1 -1
- package/dist/cdn/{BLGG65NV.js → TXVJB5BY.js} +1 -1
- package/dist/cdn/{K3GUYONM.js → UAXAA4KP.js} +1 -1
- package/dist/cdn/{W6KEATGH.js → UONWDKTV.js} +1 -1
- package/dist/cdn/{AEIKQVQH.js → VLX5ZWLQ.js} +1 -1
- package/dist/cdn/{VJ6B4D2J.js → VPEECFEV.js} +1 -1
- package/dist/cdn/{ADZIDL6S.js → VQ4XFBQC.js} +1 -1
- package/dist/cdn/{ZH64QMM6.js → VTD7T3J2.js} +1 -1
- package/dist/cdn/{FIYRBQXH.js → W4WNNUUC.js} +1 -1
- package/dist/cdn/WGHVM5XS.js +2 -0
- package/dist/cdn/{JG7BFGDP.js → X74QVZEV.js} +1 -1
- package/dist/cdn/{YKBXSS7D.js → XLFPFT4D.js} +1 -1
- package/dist/cdn/{SP7JFCNJ.js → XW67LSGZ.js} +1 -1
- package/dist/cdn/{Z775ZU7G.js → YBDSMRAI.js} +1 -1
- package/dist/cdn/{YGVHZJHO.js → YOBETSXI.js} +1 -1
- package/dist/cdn/{PWGN22BW.js → Z6P2B2Q6.js} +1 -1
- package/dist/cdn/{QKNVMRYD.js → ZDDD6PWQ.js} +1 -1
- package/dist/cdn/{E3QUZM4Y.js → ZMQDEPUR.js} +1 -1
- package/dist/cdn/{2GQG7U7C.js → ZNZ6CRNT.js} +1 -1
- package/dist/cdn/{ZUCYH7GT.js → ZP2V3H3Q.js} +1 -1
- package/dist/cdn/{J7PEFKO5.js → ZPFLVRNJ.js} +1 -1
- package/dist/cdn/{SGPAMMD2.js → ZPIWGXU2.js} +1 -1
- package/dist/cdn/assets/icon/blockHeightMedium16.json +1 -0
- package/dist/cdn/assets/icon/blockHeightMedium24.json +1 -0
- package/dist/cdn/assets/icon/blockHeightMedium32.json +1 -0
- package/dist/cdn/assets/icon/blockHeightShort16.json +1 -0
- package/dist/cdn/assets/icon/blockHeightShort24.json +1 -0
- package/dist/cdn/assets/icon/blockHeightShort32.json +1 -0
- package/dist/cdn/assets/icon/blockHeightTall16.json +1 -0
- package/dist/cdn/assets/icon/blockHeightTall24.json +1 -0
- package/dist/cdn/assets/icon/blockHeightTall32.json +1 -0
- package/dist/cdn/assets/icon/cursorCircle16.json +1 -0
- package/dist/cdn/assets/icon/cursorCircle24.json +1 -0
- package/dist/cdn/assets/icon/cursorCircle32.json +1 -0
- package/dist/cdn/assets/icon/dictionary16.json +1 -0
- package/dist/cdn/assets/icon/dictionary24.json +1 -0
- package/dist/cdn/assets/icon/dictionary32.json +1 -0
- package/dist/cdn/assets/icon/jobDependency16.json +1 -0
- package/dist/cdn/assets/icon/jobDependency24.json +1 -0
- package/dist/cdn/assets/icon/jobDependency32.json +1 -0
- package/dist/cdn/assets/icon/referenceChip16.json +1 -0
- package/dist/cdn/assets/icon/referenceChip24.json +1 -0
- package/dist/cdn/assets/icon/referenceChip32.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/runtime.js +4 -4
- package/dist/components/calcite-accordion/customElement.d.ts +15 -0
- package/dist/components/calcite-accordion/customElement.js +3 -3
- package/dist/components/calcite-accordion-item/customElement.d.ts +61 -0
- package/dist/components/calcite-action/customElement.d.ts +57 -0
- package/dist/components/calcite-action-bar/customElement.d.ts +15 -0
- package/dist/components/calcite-action-bar/customElement.js +8 -8
- package/dist/components/calcite-action-group/customElement.d.ts +13 -0
- package/dist/components/calcite-action-group/customElement.js +1 -1
- package/dist/components/calcite-action-menu/customElement.d.ts +7 -0
- package/dist/components/calcite-action-pad/customElement.d.ts +11 -0
- package/dist/components/calcite-alert/customElement.d.ts +15 -0
- package/dist/components/calcite-autocomplete/customElement.d.ts +51 -0
- package/dist/components/calcite-autocomplete/customElement.js +3 -3
- package/dist/components/calcite-autocomplete-item/customElement.d.ts +13 -0
- package/dist/components/calcite-autocomplete-item-group/customElement.d.ts +11 -0
- package/dist/components/calcite-avatar/customElement.d.ts +11 -0
- package/dist/components/calcite-block/customElement.d.ts +75 -0
- package/dist/components/calcite-block/customElement.js +1 -1
- package/dist/components/calcite-block-section/customElement.d.ts +17 -0
- package/dist/components/calcite-button/customElement.d.ts +19 -0
- package/dist/components/calcite-card/customElement.d.ts +41 -0
- package/dist/components/calcite-card-group/customElement.d.ts +13 -0
- package/dist/components/calcite-carousel/customElement.d.ts +27 -0
- package/dist/components/calcite-carousel/customElement.js +23 -13
- package/dist/components/calcite-checkbox/customElement.d.ts +15 -0
- package/dist/components/calcite-chip/customElement.d.ts +27 -0
- package/dist/components/calcite-color-picker/customElement.d.ts +39 -0
- package/dist/components/calcite-combobox/customElement.d.ts +23 -0
- package/dist/components/calcite-combobox-item/customElement.d.ts +29 -0
- package/dist/components/calcite-combobox-item-group/customElement.d.ts +9 -0
- package/dist/components/calcite-date-picker/customElement.d.ts +55 -0
- package/dist/components/calcite-dialog/customElement.d.ts +67 -0
- package/dist/components/calcite-dropdown/customElement.d.ts +12 -1
- package/dist/components/calcite-dropdown/customElement.js +4 -4
- package/dist/components/calcite-dropdown-group/customElement.d.ts +9 -0
- package/dist/components/calcite-dropdown-item/customElement.d.ts +21 -0
- package/dist/components/calcite-dropdown-item/customElement.js +3 -3
- package/dist/components/calcite-fab/customElement.d.ts +17 -0
- package/dist/components/calcite-filter/customElement.d.ts +33 -0
- package/dist/components/calcite-flow/customElement.d.ts +7 -0
- package/dist/components/calcite-flow-item/customElement.d.ts +69 -0
- package/dist/components/calcite-graph/customElement.d.ts +7 -0
- package/dist/components/calcite-handle/customElement.d.ts +17 -0
- package/dist/components/calcite-icon/customElement.d.ts +13 -0
- package/dist/components/calcite-inline-editable/customElement.d.ts +59 -0
- package/dist/components/calcite-input/customElement.d.ts +59 -0
- package/dist/components/calcite-input-date-picker/customElement.d.ts +91 -0
- package/dist/components/calcite-input-message/customElement.d.ts +15 -0
- package/dist/components/calcite-input-number/customElement.d.ts +61 -0
- package/dist/components/calcite-input-text/customElement.d.ts +59 -0
- package/dist/components/calcite-input-time-picker/customElement.d.ts +51 -0
- package/dist/components/calcite-input-time-zone/customElement.d.ts +7 -0
- package/dist/components/calcite-label/customElement.d.ts +9 -0
- package/dist/components/calcite-link/customElement.d.ts +7 -0
- package/dist/components/calcite-list/customElement.d.ts +7 -0
- package/dist/components/calcite-list-item/customElement.d.ts +23 -0
- package/dist/components/calcite-list-item-group/customElement.d.ts +9 -0
- package/dist/components/calcite-list-item-group/customElement.js +1 -1
- package/dist/components/calcite-loader/customElement.d.ts +29 -0
- package/dist/components/calcite-menu-item/customElement.d.ts +15 -0
- package/dist/components/calcite-meter/customElement.d.ts +19 -0
- package/dist/components/calcite-navigation/customElement.d.ts +17 -0
- package/dist/components/calcite-navigation-logo/customElement.d.ts +13 -0
- package/dist/components/calcite-navigation-user/customElement.d.ts +17 -0
- package/dist/components/calcite-notice/customElement.d.ts +39 -0
- package/dist/components/calcite-pagination/customElement.d.ts +17 -0
- package/dist/components/calcite-panel/customElement.d.ts +63 -0
- package/dist/components/calcite-panel/customElement.js +3 -3
- package/dist/components/calcite-popover/customElement.d.ts +15 -0
- package/dist/components/calcite-progress/customElement.d.ts +11 -0
- package/dist/components/calcite-radio-button/customElement.d.ts +13 -0
- package/dist/components/calcite-radio-button-group/customElement.d.ts +9 -0
- package/dist/components/calcite-rating/customElement.d.ts +19 -0
- package/dist/components/calcite-scrim/customElement.d.ts +7 -0
- package/dist/components/calcite-segmented-control/customElement.d.ts +9 -0
- package/dist/components/calcite-segmented-control-item/customElement.d.ts +13 -0
- package/dist/components/calcite-select/customElement.d.ts +21 -0
- package/dist/components/calcite-sheet/customElement.d.ts +31 -0
- package/dist/components/calcite-shell/customElement.d.ts +11 -0
- package/dist/components/calcite-shell-panel/customElement.d.ts +29 -0
- package/dist/components/calcite-slider/customElement.d.ts +25 -0
- package/dist/components/calcite-split-button/customElement.d.ts +33 -0
- package/dist/components/calcite-stack/customElement.d.ts +9 -0
- package/dist/components/calcite-stepper/customElement.d.ts +23 -0
- package/dist/components/calcite-stepper-item/customElement.d.ts +41 -0
- package/dist/components/calcite-stepper-item/customElement.js +1 -1
- package/dist/components/calcite-swatch/customElement.d.ts +7 -0
- package/dist/components/calcite-swatch-group/customElement.d.ts +7 -0
- package/dist/components/calcite-switch/customElement.d.ts +31 -0
- package/dist/components/calcite-tab/customElement.d.ts +13 -0
- package/dist/components/calcite-tab-nav/customElement.d.ts +11 -0
- package/dist/components/calcite-tab-nav/customElement.js +6 -6
- package/dist/components/calcite-tab-title/customElement.d.ts +35 -0
- package/dist/components/calcite-tab-title/customElement.js +1 -1
- package/dist/components/calcite-table/customElement.d.ts +85 -0
- package/dist/components/calcite-table/customElement.js +8 -8
- package/dist/components/calcite-table-cell/customElement.d.ts +17 -0
- package/dist/components/calcite-table-header/customElement.d.ts +19 -0
- package/dist/components/calcite-table-row/customElement.d.ts +21 -0
- package/dist/components/calcite-tabs/customElement.d.ts +9 -0
- package/dist/components/calcite-text-area/customElement.d.ts +33 -0
- package/dist/components/calcite-tile/customElement.d.ts +23 -0
- package/dist/components/calcite-time-picker/customElement.d.ts +23 -0
- package/dist/components/calcite-tooltip/customElement.d.ts +15 -0
- package/dist/components/calcite-tree-item/customElement.d.ts +11 -0
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.css-custom-data.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +9 -9
- package/dist/cdn/Y3INDLM2.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as t,b as A,c as x,d as l}from"./CZERUG3F.js";import{a as W}from"./BKFCUZYW.js";import{a as G}from"./7RPZNSJQ.js";import{b as V}from"./IUFUHWRF.js";import{a as I}from"./HTXB4R3O.js";import"./MME4SYFJ.js";import{a as j}from"./FIYRBQXH.js";import{a as m}from"./3LVRJOWC.js";import{c as U}from"./SZUPQ4CX.js";import"./3XS7XZAX.js";import{b as _}from"./7VTO7SRW.js";import{a as N,b as O}from"./VI7SBYXT.js";import{a as M}from"./VW2NPHDP.js";import{c as K}from"./XX43OXTK.js";import"./VUYX7MNO.js";import{a as L}from"./D57IJD77.js";import{a as R}from"./ZWPNZ5XW.js";import"./VRYDL5Z7.js";import"./UQA4NM7C.js";import{v as T,w as k,x as h,y as H}from"./7FW2RVVH.js";import{E as F,F as E,G as D,H as o,T as P,g as B,h as n,l as y,p as $}from"./3DO6XONU.js";var q=B`: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;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;overflow:hidden;border-radius:var(--calcite-panel-corner-radius, var(--calcite-corner-radius-sharp))}slot[name=alerts]::slotted(calcite-alert){block-size:0}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){--calcite-internal-panel-default-space: var(--calcite-spacing-sm);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-sm-plus)}:host([scale=s]) .header-content .heading{font-size:var(--calcite-font-size--1)}:host([scale=s]) .header-content .description{font-size:var(--calcite-font-size--2)}:host([scale=s]) .header-content .icon{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]){--calcite-internal-panel-default-space: var(--calcite-spacing-md);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-md-plus)}:host([scale=m]) .header-content .heading{font-size:var(--calcite-font-size-0)}:host([scale=m]) .header-content .description{font-size:var(--calcite-font-size--1)}:host([scale=m]) .header-content .icon{margin-inline-end:var(--calcite-spacing-md)}:host(:is([scale=s],[scale=m])){--calcite-internal-panel-action-spacing: var(--calcite-spacing-xxs)}:host([scale=l]){--calcite-internal-panel-action-spacing: var(--calcite-spacing-xs);--calcite-internal-panel-default-space: var(--calcite-spacing-lg);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-xl)}:host([scale=l]) .header-content .heading{font-size:var(--calcite-font-size-1)}:host([scale=l]) .header-content .description{font-size:var(--calcite-font-size-0)}:host([scale=l]) .header-content .icon{margin-inline-end:var(--calcite-spacing-lg)}.content-top,.content-bottom{display:flex;align-items:flex-start;align-self:stretch;border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));background-color:var(--calcite-panel-background-color, var(--calcite-color-foreground-1))}.content-top{padding:var(--calcite-panel-content-top-space, var(--calcite-internal-panel-default-space))}.content-bottom{padding:var(--calcite-panel-content-bottom-space, var(--calcite-internal-panel-default-space))}.container{position:relative;margin:0;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;overflow:hidden;background-color:var(--calcite-color-background);padding:0;font-size:var(--calcite-font-size-relative-base);color:var(--calcite-color-text-2);transition:max-block-size var(--calcite-animation-timing),inline-size var(--calcite-animation-timing);box-sizing:border-box;font-size:var(--calcite-font-size--1)}.container *{box-sizing:border-box}.header{z-index:var(--calcite-z-index-header);display:flex;flex-direction:column;background-color:var(--calcite-panel-header-background-color, var(--calcite-color-foreground-1));border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-panel-header-border-block-end, var(--calcite-color-border-3)))}.header--no-row{border-block-end:0}.content-top--no-border{border-block-start:0}.header-container{display:flex;inline-size:100%;flex-direction:row;align-items:stretch;justify-content:flex-start;flex:0 0 auto}.header-container--border-end{border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3))}.header-top{inline-size:100%;border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));padding:var(--calcite-panel-header-top-space, var(--calcite-internal-panel-default-space))}.action-bar-container{inline-size:100%}.action-bar-container ::slotted(calcite-action-bar){inline-size:100%}.header-content{display:flex;flex-direction:column;overflow:hidden;padding-inline:.75rem;padding-block:.875rem;margin-inline-end:auto;justify-content:center}.header-content .heading-text-content{flex:1 1 auto;overflow:hidden}.header-content .heading,.header-content .description{display:block;flex:none;overflow-wrap:break-word;padding:0;line-height:var(--calcite-font-line-height-relative-snug)}.header-content .heading{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-panel-heading-text-color, var(--calcite-color-text-1))}.header-content .heading:only-child{margin-block-end:0px}.header-content .description{color:var(--calcite-panel-description-text-color, var(--calcite-color-text-2))}#close,#collapse,calcite-action-menu{--calcite-action-background-color: var(--calcite-panel-header-action-background-color);--calcite-action-background-color-hover: var(--calcite-panel-header-action-background-color-hover);--calcite-action-background-color-press: var(--calcite-panel-header-action-background-color-press);--calcite-action-text-color: var(--calcite-panel-header-action-text-color);--calcite-action-text-color-press: var(--calcite-panel-header-action-text-color-press)}.header-actions{display:flex;flex-direction:row;flex-wrap:nowrap;margin:auto;gap:var(--calcite-internal-panel-action-spacing)}.header-actions--start{margin-inline-start:var(--calcite-internal-panel-action-spacing)}.header-actions--end{margin-inline-end:var(--calcite-internal-panel-action-spacing)}.content-wrapper{position:relative;display:flex;block-size:100%;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;overflow:auto;color:var(--calcite-color-text-2);outline-color:transparent;padding:var(--calcite-panel-space, var(--calcite-panel-content-space, 0));background:var(--calcite-panel-background-color, var(--calcite-color-background))}.content-wrapper: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(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.header-content{flex:1 1 auto;justify-content:center;padding-block:var(--calcite-internal-panel-header-vertical-padding);padding-inline:var(--calcite-internal-panel-default-space)}.header-content.header--slotted-content{padding:var(--calcite-panel-header-content-space, var(--calcite-internal-panel-header-vertical-padding) var(--calcite-internal-panel-default-space))}.header-content.header--non-slotted-content{align-items:center;flex-direction:row}.footer{margin-block-start:auto;display:flex;flex-direction:row;align-content:space-between;align-items:center;justify-content:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));padding:var(--calcite-panel-footer-space, var(--calcite-panel-footer-padding, var(--calcite-internal-panel-default-space)));background-color:var(--calcite-panel-footer-background-color, var(--calcite-color-foreground-1))}.footer-content{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:center}.footer-start{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-start;margin-inline-end:auto;gap:var(--calcite-internal-panel-default-space)}.footer-end{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-end;margin-inline-start:auto;gap:var(--calcite-internal-panel-default-space)}.fab-container{position:sticky;inset-block-end:0px;z-index:var(--calcite-z-index-sticky);margin-block:0px;margin-inline:auto;display:block;padding:.5rem;inset-inline:0;inline-size:fit-content}calcite-icon{--calcite-icon-color: var(--calcite-panel-icon-color, var(--calcite-ui-icon-color, var(--calcite-color-text-1)))}:host([hidden]){display:none}[hidden]{display:none}`,w=class extends D{constructor(){super(),this.containerRef=F(),this.resizeObserver=N("resize",()=>this.resizeHandler()),this.messages=M(),this._closed=!1,this.focusSetter=L()(this),this.focusTrapController=W({focusTrapOptions:{allowOutsideClick:!0,escapeDeactivates:e=>(!e.defaultPrevented&&this.closable&&(this.emitCloseEvent(),e.preventDefault()),!1)}})(this),this.interactiveContainer=j(this),this.hasActionBar=!1,this.hasContentBottom=!1,this.hasContentTop=!1,this.hasEndActions=!1,this.hasFab=!1,this.hasFooterContent=!1,this.hasFooterEndContent=!1,this.hasFooterStartContent=!1,this.hasHeaderContent=!1,this.hasHeaderDescription=!1,this.hasHeaderHeading=!1,this.hasHeaderTop=!1,this.hasMenuItems=!1,this.hasStartActions=!1,this.showHeaderContent=!1,this.closable=!1,this.collapseDirection="down",this.collapsed=!1,this.collapsible=!1,this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.focusTrapEnabled=!1,this.menuOpen=!1,this.menuPlacement=V,this.overlayPositioning="absolute",this.scale="m",this.topLayerDisabled=!1,this.calcitePanelClose=$({cancelable:!0}),this.calcitePanelCollapse=$({cancelable:!1}),this.calcitePanelExpand=$({cancelable:!1}),this.calcitePanelScroll=$({cancelable:!1}),this.calcitePanelToggle=$({cancelable:!1}),this.listen("keydown",this.panelKeyDownHandler),this.listen("calcitePanelClose",this.panelCloseHandler)}static{this.properties={hasActionBar:[16,{},{state:!0}],hasContentBottom:[16,{},{state:!0}],hasContentTop:[16,{},{state:!0}],hasEndActions:[16,{},{state:!0}],hasFab:[16,{},{state:!0}],hasFooterContent:[16,{},{state:!0}],hasFooterEndContent:[16,{},{state:!0}],hasFooterStartContent:[16,{},{state:!0}],hasHeaderContent:[16,{},{state:!0}],hasHeaderDescription:[16,{},{state:!0}],hasHeaderHeading:[16,{},{state:!0}],hasHeaderTop:[16,{},{state:!0}],hasMenuItems:[16,{},{state:!0}],hasStartActions:[16,{},{state:!0}],showHeaderContent:[16,{},{state:!0}],beforeClose:[0,{},{attribute:!1}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],collapseDirection:1,collapsed:[7,{},{reflect:!0,type:Boolean}],collapsible:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],icon:[3,{},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],loading:[7,{},{reflect:!0,type:Boolean}],focusTrapEnabled:[7,{},{reflect:!0,type:Boolean}],focusTrapOptions:[0,{},{attribute:!1}],menuFlipPlacements:[0,{},{attribute:!1}],menuOpen:[7,{},{reflect:!0,type:Boolean}],menuPlacement:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=[G,q]}get closed(){return this._closed}set closed(e){let a=this._closed;e!==a&&this.setClosedState(e)}async scrollContentTo(e){this.panelScrollEl?.scrollTo(e)}async setFocus(e){return this.focusSetter(()=>this.containerRef.value,e)}async updateFocusTrapElements(e){this.focusTrapController.setExtraContainers(e),this.focusTrapController.updateContainerElements()}willUpdate(e){e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calcitePanelCollapse.emit():this.calcitePanelExpand.emit())}updated(e){(e.has("focusTrapEnabled")||e.has("closable")||e.has("closed"))&&(!this.closed&&this.closable&&this.focusTrapEnabled?this.focusTrapController.activate():this.focusTrapController.deactivate())}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}focusTrapDisabledOverride(){return!this.focusTrapEnabled||!this.closable||this.closed}async setClosedState(e){if(this.beforeClose&&e)try{await this.beforeClose?.()}catch{return}this._closed=e}resizeHandler(){let{panelScrollEl:e}=this;if(!e||typeof e.scrollHeight!="number"||typeof e.offsetHeight!="number")return;e.scrollHeight>e.offsetHeight?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}closeClickHandler(){this.emitCloseEvent()}emitCloseEvent(){this.calcitePanelClose.emit()}panelKeyDownHandler(e){e.key!=="Escape"||e.defaultPrevented||this.closed||!this.closable||(e.preventDefault(),this.emitCloseEvent())}panelCloseHandler(e){e.defaultPrevented||e.target!==this.el||(this.closed=!0)}collapse(){this.collapsed=!this.collapsed,this.calcitePanelToggle.emit()}panelScrollHandler(){this.calcitePanelScroll.emit()}handleHeaderActionsStartSlotChange(e){this.hasStartActions=h(e)}handleHeaderActionsEndSlotChange(e){this.hasEndActions=h(e)}handleHeaderMenuActionsSlotChange(e){this.hasMenuItems=h(e)}handleActionBarSlotChange(e){let a=H(e).filter(U);a.forEach(i=>i.layout="horizontal"),this.hasActionBar=!!a.length}handleHeaderContentSlotChange(e){this.hasHeaderContent=h(e)}handleHeaderTopSlotChange(e){this.hasHeaderTop=h(e)}handleHeaderDescriptionSlotChange(e){this.hasHeaderDescription=k(e)||H(e).some(T)}handleHeaderHeadingSlotChange(e){this.hasHeaderHeading=k(e)||H(e).some(T)}handleFabSlotChange(e){this.hasFab=h(e)}handleFooterEndSlotChange(e){this.hasFooterEndContent=h(e)}handleFooterStartSlotChange(e){this.hasFooterStartContent=h(e)}handleFooterSlotChange(e){this.hasFooterContent=h(e)}contentBottomSlotChangeHandler(e){this.hasContentBottom=h(e)}contentTopSlotChangeHandler(e){this.hasContentTop=h(e)}setPanelScrollEl(e){O(this.resizeObserver,this.panelScrollEl,e),this.panelScrollEl=e}handleAlertsSlotChange(e){H(e)?.map(a=>{a.nodeName==="CALCITE-ALERT"&&(a.embedded=!0)})}get hasHeaderRow(){return this.hasHeaderContent||!!this.heading||!!this.description||this.hasHeaderHeading||this.hasHeaderDescription||this.hasStartActions||this.hasEndActions||this.collapsible||this.closable||this.hasMenuItems}renderHeaderContent(){let{heading:e,headingLevel:a,description:i,hasHeaderContent:s,hasHeaderDescription:r,hasHeaderHeading:c,icon:u,scale:d}=this,g=!!e||c,p=!!i||r,f=g||p,v=u?n`<calcite-icon class=${o(t.icon)} .flipRtl=${this.iconFlipRtl} .icon=${u} .scale=${R(d)}></calcite-icon>`:null,b=I({class:t.heading,hidden:!g,level:a,children:n`<slot .hidden=${!c} name=${l.heading} @slotchange=${this.handleHeaderHeadingSlotChange}></slot>${c?null:e}`}),C=n`<span class=${o(t.description)} .hidden=${!p}><slot .hidden=${!r} name=${l.description} @slotchange=${this.handleHeaderDescriptionSlotChange}></slot>${r?null:i}</span>`;return m("header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerNonSlottedContent]:!0})} .hidden=${s||!f}>${v}<div class=${o(t.headingTextContent)}>${b}${C}</div></div>`)}renderActionBar(){return n`<div class=${o(t.actionBarContainer)} .hidden=${!this.hasActionBar}><slot name=${l.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`}renderHeaderSlottedContent(){return m("slotted-header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerSlottedContent]:!0})} .hidden=${!this.hasHeaderContent}><slot name=${l.headerContent} @slotchange=${this.handleHeaderContentSlotChange}></slot></div>`)}renderHeaderTop(){return n`<div class=${o(t.headerTop)} .hidden=${!this.hasHeaderTop}><slot name=${l.headerTop} @slotchange=${this.handleHeaderTopSlotChange}></slot></div>`}renderHeaderStartActions(){let{hasStartActions:e}=this;return m("header-actions-start",n`<div class=${o({[t.headerActionsStart]:!0,[t.headerActions]:!0})} .hidden=${!e}><slot name=${l.headerActionsStart} @slotchange=${this.handleHeaderActionsStartSlotChange}></slot></div>`)}renderHeaderActionsEnd(){let{hasEndActions:e,messages:a,closable:i,collapsed:s,collapseDirection:r,collapsible:c,hasMenuItems:u}=this,{collapse:d,expand:g,close:p}=a,f=[x.expand,x.collapse];r==="up"&&f.reverse();let v=c?n`<calcite-action .aria=${{expanded:!s}} .icon=${s?f[0]:f[1]} id=${A.collapse} .label=${d} @click=${this.collapse} .scale=${this.scale} .text=${d} title=${(s?g:d)??y}></calcite-action>`:null,b=i?n`<calcite-action .ariaLabel=${p} .icon=${x.close} id=${A.close} @click=${this.closeClickHandler} .scale=${this.scale} .text=${p} title=${p??y}></calcite-action>`:null,C=n`<slot name=${l.headerActionsEnd} @slotchange=${this.handleHeaderActionsEndSlotChange}></slot>`,z=e||v||b||u;return m("header-actions-end",n`<div class=${o({[t.headerActionsEnd]:!0,[t.headerActions]:!0})} .hidden=${!z}>${C}${this.renderMenu()}${v}${b}</div>`)}renderMenu(){let{hasMenuItems:e,messages:a,menuOpen:i,menuFlipPlacements:s,menuPlacement:r,scale:c}=this;return m("menu",n`<calcite-action-menu .flipPlacements=${s??["top","bottom"]} .hidden=${!e} .label=${a.options} .open=${i} .overlayPositioning=${this.overlayPositioning} .placement=${r} .scale=${c} .topLayerDisabled=${this.topLayerDisabled}><calcite-action class=${o(t.menuAction)} .icon=${x.menu} .scale=${c} slot=${K.trigger} .text=${a.options}></calcite-action><slot name=${l.headerMenuActions} @slotchange=${this.handleHeaderMenuActionsSlotChange}></slot></calcite-action-menu>`)}renderHeaderNode(){let{hasHeaderContent:e,hasHeaderDescription:a,hasHeaderHeading:i,hasHeaderTop:s,hasStartActions:r,hasEndActions:c,closable:u,collapsible:d,hasMenuItems:g,hasActionBar:p,hasContentTop:f,heading:v,description:b}=this,C=this.renderHeaderContent(),S=e||(!!v||!!b||i||a)||s||r||c||d||u||g||p||f;return this.showHeaderContent=S,n`<header class=${o({[t.header]:!0,[t.headerNoRow]:s&&!this.hasHeaderRow&&!p&&!f})} .hidden=${!(S||p||f)}>${this.renderHeaderTop()}<div class=${o({[t.headerContainer]:!0,[t.headerContainerBorderEnd]:p&&this.hasHeaderRow})} .hidden=${!S}>${this.renderHeaderStartActions()}${this.renderHeaderSlottedContent()}${C}${this.renderHeaderActionsEnd()}</div>${this.renderActionBar()}${this.renderContentTop()}</header>`}renderFooterNode(){let{hasFooterEndContent:e,hasFooterStartContent:a,hasFooterContent:i}=this,s=a||e||i;return n`<footer class=${o(t.footer)} .hidden=${!s}><div class=${o(t.footerContent)} .hidden=${!i}><slot name=${l.footer} @slotchange=${this.handleFooterSlotChange}></slot></div><div class=${o(t.footerStart)} .hidden=${i||!a}><slot name=${l.footerStart} @slotchange=${this.handleFooterStartSlotChange}></slot></div><div class=${o(t.footerEnd)} .hidden=${i||!e}><slot name=${l.footerEnd} @slotchange=${this.handleFooterEndSlotChange}></slot></div></footer>`}renderContent(){return n`<div class=${o(t.contentWrapper)} .hidden=${this.collapsible&&this.collapsed} @scroll=${this.panelScrollHandler} ${E(this.setPanelScrollEl)}><slot></slot>${this.renderFab()}</div>`}renderContentBottom(){return n`<div class=${o(t.contentBottom)} .hidden=${!this.hasContentBottom}><slot name=${l.contentBottom} @slotchange=${this.contentBottomSlotChangeHandler}></slot></div>`}renderContentTop(){return n`<div class=${o({[t.contentTop]:!0,[t.contentTopNoBorder]:this.hasHeaderTop&&!this.hasHeaderRow&&!this.hasActionBar})} .hidden=${!this.hasContentTop}><slot name=${l.contentTop} @slotchange=${this.contentTopSlotChangeHandler}></slot></div>`}renderFab(){return n`<div class=${o(t.fabContainer)} .hidden=${!this.hasFab}><slot name=${l.fab} @slotchange=${this.handleFabSlotChange}></slot></div>`}render(){let{disabled:e,loading:a,closed:i,heading:s,description:r,focusTrapEnabled:c,closable:u}=this,d=c&&u,g=n`<div .ariaBusy=${_(a,void 0)} .ariaDescription=${d&&r?r:void 0} .ariaLabel=${d&&s?s:void 0} .ariaLive=${d?"polite":void 0} class=${o(t.container)} .hidden=${i} .role=${d?"dialog":"article"} ${E(this.containerRef)}>${this.renderHeaderNode()}${this.renderContent()}${this.renderContentBottom()}${this.renderFooterNode()}${m("alerts",n`<slot name=${l.alerts} @slotchange=${this.handleAlertsSlotChange}></slot>`)}</div>`;return this.interactiveContainer({disabled:e,children:n`${a?n`<calcite-scrim .loading=${a}></calcite-scrim>`:null}${g}`})}};P("calcite-panel",w);export{w as Panel};
|
|
2
|
+
import{a as t,b as A,c as x,d as l}from"./CZERUG3F.js";import{a as W}from"./PADKOLRD.js";import{a as G}from"./O7G57ZIN.js";import{b as V}from"./AXJPT3JP.js";import{a as I}from"./DJIJWOST.js";import"./62UX6F4M.js";import{a as j}from"./W4WNNUUC.js";import{a as m}from"./G6EK753X.js";import{c as U}from"./SZUPQ4CX.js";import"./3XS7XZAX.js";import{b as _}from"./7VTO7SRW.js";import{a as N,b as O}from"./VI7SBYXT.js";import{a as M}from"./MG5KEVZ3.js";import{c as K}from"./XX43OXTK.js";import"./VUYX7MNO.js";import{a as L}from"./APMXUV5R.js";import{a as R}from"./ZWPNZ5XW.js";import"./6NAQTGPW.js";import"./LGO3TCAO.js";import{v as T,w as k,x as h,y as H}from"./7FW2RVVH.js";import{E as F,F as E,G as D,H as o,T as P,g as B,h as n,l as y,p as $}from"./PA2BHIBQ.js";var q=B`: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;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;overflow:hidden;border-radius:var(--calcite-panel-corner-radius, var(--calcite-corner-radius-sharp))}slot[name=alerts]::slotted(calcite-alert){block-size:0}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){--calcite-internal-panel-default-space: var(--calcite-spacing-sm);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-sm-plus)}:host([scale=s]) .header-content .heading{font-size:var(--calcite-font-size--1)}:host([scale=s]) .header-content .description{font-size:var(--calcite-font-size--2)}:host([scale=s]) .header-content .icon{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]){--calcite-internal-panel-default-space: var(--calcite-spacing-md);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-md-plus)}:host([scale=m]) .header-content .heading{font-size:var(--calcite-font-size-0)}:host([scale=m]) .header-content .description{font-size:var(--calcite-font-size--1)}:host([scale=m]) .header-content .icon{margin-inline-end:var(--calcite-spacing-md)}:host(:is([scale=s],[scale=m])){--calcite-internal-panel-action-spacing: var(--calcite-spacing-xxs)}:host([scale=l]){--calcite-internal-panel-action-spacing: var(--calcite-spacing-xs);--calcite-internal-panel-default-space: var(--calcite-spacing-lg);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-xl)}:host([scale=l]) .header-content .heading{font-size:var(--calcite-font-size-1)}:host([scale=l]) .header-content .description{font-size:var(--calcite-font-size-0)}:host([scale=l]) .header-content .icon{margin-inline-end:var(--calcite-spacing-lg)}.content-top,.content-bottom{display:flex;align-items:flex-start;align-self:stretch;border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));background-color:var(--calcite-panel-background-color, var(--calcite-color-foreground-1))}.content-top{padding:var(--calcite-panel-content-top-space, var(--calcite-internal-panel-default-space))}.content-bottom{padding:var(--calcite-panel-content-bottom-space, var(--calcite-internal-panel-default-space))}.container{position:relative;margin:0;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;overflow:hidden;background-color:var(--calcite-color-background);padding:0;font-size:var(--calcite-font-size-relative-base);color:var(--calcite-color-text-2);transition:max-block-size var(--calcite-animation-timing),inline-size var(--calcite-animation-timing);box-sizing:border-box;font-size:var(--calcite-font-size--1)}.container *{box-sizing:border-box}.header{z-index:var(--calcite-z-index-header);display:flex;flex-direction:column;background-color:var(--calcite-panel-header-background-color, var(--calcite-color-foreground-1));border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-panel-header-border-block-end, var(--calcite-color-border-3)))}.header--no-row{border-block-end:0}.content-top--no-border{border-block-start:0}.header-container{display:flex;inline-size:100%;flex-direction:row;align-items:stretch;justify-content:flex-start;flex:0 0 auto}.header-container--border-end{border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3))}.header-top{inline-size:100%;border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));padding:var(--calcite-panel-header-top-space, var(--calcite-internal-panel-default-space))}.action-bar-container{inline-size:100%}.action-bar-container ::slotted(calcite-action-bar){inline-size:100%}.header-content{display:flex;flex-direction:column;overflow:hidden;padding-inline:.75rem;padding-block:.875rem;margin-inline-end:auto;justify-content:center}.header-content .heading-text-content{flex:1 1 auto;overflow:hidden}.header-content .heading,.header-content .description{display:block;flex:none;overflow-wrap:break-word;padding:0;line-height:var(--calcite-font-line-height-relative-snug)}.header-content .heading{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-panel-heading-text-color, var(--calcite-color-text-1))}.header-content .heading:only-child{margin-block-end:0px}.header-content .description{color:var(--calcite-panel-description-text-color, var(--calcite-color-text-2))}#close,#collapse,calcite-action-menu{--calcite-action-background-color: var(--calcite-panel-header-action-background-color);--calcite-action-background-color-hover: var(--calcite-panel-header-action-background-color-hover);--calcite-action-background-color-press: var(--calcite-panel-header-action-background-color-press);--calcite-action-text-color: var(--calcite-panel-header-action-text-color);--calcite-action-text-color-press: var(--calcite-panel-header-action-text-color-press)}.header-actions{display:flex;flex-direction:row;flex-wrap:nowrap;margin:auto;gap:var(--calcite-internal-panel-action-spacing)}.header-actions--start{margin-inline-start:var(--calcite-internal-panel-action-spacing)}.header-actions--end{margin-inline-end:var(--calcite-internal-panel-action-spacing)}.content-wrapper{position:relative;display:flex;block-size:100%;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;overflow:auto;color:var(--calcite-color-text-2);outline-color:transparent;padding:var(--calcite-panel-space, var(--calcite-panel-content-space, 0));background:var(--calcite-panel-background-color, var(--calcite-color-background))}.content-wrapper: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(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.header-content{flex:1 1 auto;justify-content:center;padding-block:var(--calcite-internal-panel-header-vertical-padding);padding-inline:var(--calcite-internal-panel-default-space)}.header-content.header--slotted-content{padding:var(--calcite-panel-header-content-space, var(--calcite-internal-panel-header-vertical-padding) var(--calcite-internal-panel-default-space))}.header-content.header--non-slotted-content{align-items:center;flex-direction:row}.footer{margin-block-start:auto;display:flex;flex-direction:row;align-content:space-between;align-items:center;justify-content:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));padding:var(--calcite-panel-footer-space, var(--calcite-panel-footer-padding, var(--calcite-internal-panel-default-space)));background-color:var(--calcite-panel-footer-background-color, var(--calcite-color-foreground-1))}.footer-content{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:center}.footer-start{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-start;margin-inline-end:auto;gap:var(--calcite-internal-panel-default-space)}.footer-end{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-end;margin-inline-start:auto;gap:var(--calcite-internal-panel-default-space)}.fab-container{position:sticky;inset-block-end:0px;z-index:var(--calcite-z-index-sticky);margin-block:0px;margin-inline:auto;display:block;padding:.5rem;inset-inline:0;inline-size:fit-content}calcite-icon{--calcite-icon-color: var(--calcite-panel-icon-color, var(--calcite-ui-icon-color, var(--calcite-color-text-1)))}:host([hidden]){display:none}[hidden]{display:none}`,w=class extends D{constructor(){super(),this.containerRef=F(),this.resizeObserver=N("resize",()=>this.resizeHandler()),this.messages=M(),this._closed=!1,this.focusSetter=L()(this),this.focusTrapController=W({focusTrapOptions:{allowOutsideClick:!0,escapeDeactivates:e=>(!e.defaultPrevented&&this.closable&&(this.emitCloseEvent(),e.preventDefault()),!1)}})(this),this.interactiveContainer=j(this),this.hasActionBar=!1,this.hasContentBottom=!1,this.hasContentTop=!1,this.hasEndActions=!1,this.hasFab=!1,this.hasFooterContent=!1,this.hasFooterEndContent=!1,this.hasFooterStartContent=!1,this.hasHeaderContent=!1,this.hasHeaderDescription=!1,this.hasHeaderHeading=!1,this.hasHeaderTop=!1,this.hasMenuItems=!1,this.hasStartActions=!1,this.showHeaderContent=!1,this.closable=!1,this.collapseDirection="down",this.collapsed=!1,this.collapsible=!1,this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.focusTrapEnabled=!1,this.menuOpen=!1,this.menuPlacement=V,this.overlayPositioning="absolute",this.scale="m",this.topLayerDisabled=!1,this.calcitePanelClose=$({cancelable:!0}),this.calcitePanelCollapse=$({cancelable:!1}),this.calcitePanelExpand=$({cancelable:!1}),this.calcitePanelScroll=$({cancelable:!1}),this.calcitePanelToggle=$({cancelable:!1}),this.listen("keydown",this.panelKeyDownHandler),this.listen("calcitePanelClose",this.panelCloseHandler)}static{this.properties={hasActionBar:[16,{},{state:!0}],hasContentBottom:[16,{},{state:!0}],hasContentTop:[16,{},{state:!0}],hasEndActions:[16,{},{state:!0}],hasFab:[16,{},{state:!0}],hasFooterContent:[16,{},{state:!0}],hasFooterEndContent:[16,{},{state:!0}],hasFooterStartContent:[16,{},{state:!0}],hasHeaderContent:[16,{},{state:!0}],hasHeaderDescription:[16,{},{state:!0}],hasHeaderHeading:[16,{},{state:!0}],hasHeaderTop:[16,{},{state:!0}],hasMenuItems:[16,{},{state:!0}],hasStartActions:[16,{},{state:!0}],showHeaderContent:[16,{},{state:!0}],beforeClose:[0,{},{attribute:!1}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],collapseDirection:1,collapsed:[7,{},{reflect:!0,type:Boolean}],collapsible:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],icon:[3,{},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],loading:[7,{},{reflect:!0,type:Boolean}],focusTrapEnabled:[7,{},{reflect:!0,type:Boolean}],focusTrapOptions:[0,{},{attribute:!1}],menuFlipPlacements:[0,{},{attribute:!1}],menuOpen:[7,{},{reflect:!0,type:Boolean}],menuPlacement:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=[G,q]}get hasHeaderRow(){return this.hasHeaderContent||!!this.heading||!!this.description||this.hasHeaderHeading||this.hasHeaderDescription||this.hasStartActions||this.hasEndActions||this.collapsible||this.closable||this.hasMenuItems}get closed(){return this._closed}set closed(e){let a=this._closed;e!==a&&this.setClosedState(e)}async scrollContentTo(e){this.panelScrollEl?.scrollTo(e)}async setFocus(e){return this.focusSetter(()=>this.containerRef.value,e)}async updateFocusTrapElements(e){this.focusTrapController.setExtraContainers(e),this.focusTrapController.updateContainerElements()}willUpdate(e){e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calcitePanelCollapse.emit():this.calcitePanelExpand.emit())}updated(e){(e.has("focusTrapEnabled")||e.has("closable")||e.has("closed"))&&(!this.closed&&this.closable&&this.focusTrapEnabled?this.focusTrapController.activate():this.focusTrapController.deactivate())}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}focusTrapDisabledOverride(){return!this.focusTrapEnabled||!this.closable||this.closed}async setClosedState(e){if(this.beforeClose&&e)try{await this.beforeClose?.()}catch{return}this._closed=e}resizeHandler(){let{panelScrollEl:e}=this;if(!e||typeof e.scrollHeight!="number"||typeof e.offsetHeight!="number")return;e.scrollHeight>e.offsetHeight?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}closeClickHandler(){this.emitCloseEvent()}emitCloseEvent(){this.calcitePanelClose.emit()}panelKeyDownHandler(e){e.key!=="Escape"||e.defaultPrevented||this.closed||!this.closable||(e.preventDefault(),this.emitCloseEvent())}panelCloseHandler(e){e.defaultPrevented||e.target!==this.el||(this.closed=!0)}collapse(){this.collapsed=!this.collapsed,this.calcitePanelToggle.emit()}panelScrollHandler(){this.calcitePanelScroll.emit()}handleHeaderActionsStartSlotChange(e){this.hasStartActions=h(e)}handleHeaderActionsEndSlotChange(e){this.hasEndActions=h(e)}handleHeaderMenuActionsSlotChange(e){this.hasMenuItems=h(e)}handleActionBarSlotChange(e){let a=H(e).filter(U);a.forEach(i=>i.layout="horizontal"),this.hasActionBar=!!a.length}handleHeaderContentSlotChange(e){this.hasHeaderContent=h(e)}handleHeaderTopSlotChange(e){this.hasHeaderTop=h(e)}handleHeaderDescriptionSlotChange(e){this.hasHeaderDescription=k(e)||H(e).some(T)}handleHeaderHeadingSlotChange(e){this.hasHeaderHeading=k(e)||H(e).some(T)}handleFabSlotChange(e){this.hasFab=h(e)}handleFooterEndSlotChange(e){this.hasFooterEndContent=h(e)}handleFooterStartSlotChange(e){this.hasFooterStartContent=h(e)}handleFooterSlotChange(e){this.hasFooterContent=h(e)}contentBottomSlotChangeHandler(e){this.hasContentBottom=h(e)}contentTopSlotChangeHandler(e){this.hasContentTop=h(e)}setPanelScrollEl(e){O(this.resizeObserver,this.panelScrollEl,e),this.panelScrollEl=e}handleAlertsSlotChange(e){H(e)?.map(a=>{a.nodeName==="CALCITE-ALERT"&&(a.embedded=!0)})}renderHeaderContent(){let{heading:e,headingLevel:a,description:i,hasHeaderContent:s,hasHeaderDescription:r,hasHeaderHeading:c,icon:u,scale:d}=this,g=!!e||c,p=!!i||r,f=g||p,v=u?n`<calcite-icon class=${o(t.icon)} .flipRtl=${this.iconFlipRtl} .icon=${u} .scale=${R(d)}></calcite-icon>`:null,b=I({class:t.heading,hidden:!g,level:a,children:n`<slot .hidden=${!c} name=${l.heading} @slotchange=${this.handleHeaderHeadingSlotChange}></slot>${c?null:e}`}),C=n`<span class=${o(t.description)} .hidden=${!p}><slot .hidden=${!r} name=${l.description} @slotchange=${this.handleHeaderDescriptionSlotChange}></slot>${r?null:i}</span>`;return m("header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerNonSlottedContent]:!0})} .hidden=${s||!f}>${v}<div class=${o(t.headingTextContent)}>${b}${C}</div></div>`)}renderActionBar(){return n`<div class=${o(t.actionBarContainer)} .hidden=${!this.hasActionBar}><slot name=${l.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`}renderHeaderSlottedContent(){return m("slotted-header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerSlottedContent]:!0})} .hidden=${!this.hasHeaderContent}><slot name=${l.headerContent} @slotchange=${this.handleHeaderContentSlotChange}></slot></div>`)}renderHeaderTop(){return n`<div class=${o(t.headerTop)} .hidden=${!this.hasHeaderTop}><slot name=${l.headerTop} @slotchange=${this.handleHeaderTopSlotChange}></slot></div>`}renderHeaderStartActions(){let{hasStartActions:e}=this;return m("header-actions-start",n`<div class=${o({[t.headerActionsStart]:!0,[t.headerActions]:!0})} .hidden=${!e}><slot name=${l.headerActionsStart} @slotchange=${this.handleHeaderActionsStartSlotChange}></slot></div>`)}renderHeaderActionsEnd(){let{hasEndActions:e,messages:a,closable:i,collapsed:s,collapseDirection:r,collapsible:c,hasMenuItems:u}=this,{collapse:d,expand:g,close:p}=a,f=[x.expand,x.collapse];r==="up"&&f.reverse();let v=c?n`<calcite-action .aria=${{expanded:!s}} .icon=${s?f[0]:f[1]} id=${A.collapse} .label=${d} @click=${this.collapse} .scale=${this.scale} .text=${d} title=${(s?g:d)??y}></calcite-action>`:null,b=i?n`<calcite-action .ariaLabel=${p} .icon=${x.close} id=${A.close} @click=${this.closeClickHandler} .scale=${this.scale} .text=${p} title=${p??y}></calcite-action>`:null,C=n`<slot name=${l.headerActionsEnd} @slotchange=${this.handleHeaderActionsEndSlotChange}></slot>`,z=e||v||b||u;return m("header-actions-end",n`<div class=${o({[t.headerActionsEnd]:!0,[t.headerActions]:!0})} .hidden=${!z}>${C}${this.renderMenu()}${v}${b}</div>`)}renderMenu(){let{hasMenuItems:e,messages:a,menuOpen:i,menuFlipPlacements:s,menuPlacement:r,scale:c}=this;return m("menu",n`<calcite-action-menu .flipPlacements=${s??["top","bottom"]} .hidden=${!e} .label=${a.options} .open=${i} .overlayPositioning=${this.overlayPositioning} .placement=${r} .scale=${c} .topLayerDisabled=${this.topLayerDisabled}><calcite-action class=${o(t.menuAction)} .icon=${x.menu} .scale=${c} slot=${K.trigger} .text=${a.options}></calcite-action><slot name=${l.headerMenuActions} @slotchange=${this.handleHeaderMenuActionsSlotChange}></slot></calcite-action-menu>`)}renderHeaderNode(){let{hasHeaderContent:e,hasHeaderDescription:a,hasHeaderHeading:i,hasHeaderTop:s,hasStartActions:r,hasEndActions:c,closable:u,collapsible:d,hasMenuItems:g,hasActionBar:p,hasContentTop:f,heading:v,description:b}=this,C=this.renderHeaderContent(),S=e||(!!v||!!b||i||a)||s||r||c||d||u||g||p||f;return this.showHeaderContent=S,n`<header class=${o({[t.header]:!0,[t.headerNoRow]:s&&!this.hasHeaderRow&&!p&&!f})} .hidden=${!(S||p||f)}>${this.renderHeaderTop()}<div class=${o({[t.headerContainer]:!0,[t.headerContainerBorderEnd]:p&&this.hasHeaderRow})} .hidden=${!S}>${this.renderHeaderStartActions()}${this.renderHeaderSlottedContent()}${C}${this.renderHeaderActionsEnd()}</div>${this.renderActionBar()}${this.renderContentTop()}</header>`}renderFooterNode(){let{hasFooterEndContent:e,hasFooterStartContent:a,hasFooterContent:i}=this,s=a||e||i;return n`<footer class=${o(t.footer)} .hidden=${!s}><div class=${o(t.footerContent)} .hidden=${!i}><slot name=${l.footer} @slotchange=${this.handleFooterSlotChange}></slot></div><div class=${o(t.footerStart)} .hidden=${i||!a}><slot name=${l.footerStart} @slotchange=${this.handleFooterStartSlotChange}></slot></div><div class=${o(t.footerEnd)} .hidden=${i||!e}><slot name=${l.footerEnd} @slotchange=${this.handleFooterEndSlotChange}></slot></div></footer>`}renderContent(){return n`<div class=${o(t.contentWrapper)} .hidden=${this.collapsible&&this.collapsed} @scroll=${this.panelScrollHandler} ${E(this.setPanelScrollEl)}><slot></slot>${this.renderFab()}</div>`}renderContentBottom(){return n`<div class=${o(t.contentBottom)} .hidden=${!this.hasContentBottom}><slot name=${l.contentBottom} @slotchange=${this.contentBottomSlotChangeHandler}></slot></div>`}renderContentTop(){return n`<div class=${o({[t.contentTop]:!0,[t.contentTopNoBorder]:this.hasHeaderTop&&!this.hasHeaderRow&&!this.hasActionBar})} .hidden=${!this.hasContentTop}><slot name=${l.contentTop} @slotchange=${this.contentTopSlotChangeHandler}></slot></div>`}renderFab(){return n`<div class=${o(t.fabContainer)} .hidden=${!this.hasFab}><slot name=${l.fab} @slotchange=${this.handleFabSlotChange}></slot></div>`}render(){let{disabled:e,loading:a,closed:i,heading:s,description:r,focusTrapEnabled:c,closable:u}=this,d=c&&u,g=n`<div .ariaBusy=${_(a,void 0)} .ariaDescription=${d&&r?r:void 0} .ariaLabel=${d&&s?s:void 0} .ariaLive=${d?"polite":void 0} class=${o(t.container)} .hidden=${i} .role=${d?"dialog":"article"} ${E(this.containerRef)}>${this.renderHeaderNode()}${this.renderContent()}${this.renderContentBottom()}${this.renderFooterNode()}${m("alerts",n`<slot name=${l.alerts} @slotchange=${this.handleAlertsSlotChange}></slot>`)}</div>`;return this.interactiveContainer({disabled:e,children:n`${a?n`<calcite-scrim .loading=${a}></calcite-scrim>`:null}${g}`})}};P("calcite-panel",w);export{w as Panel};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as b}from"./T6CCMW7H.js";import{a as y}from"./
|
|
2
|
+
import{a as b}from"./T6CCMW7H.js";import{a as y}from"./MG5KEVZ3.js";import"./6NAQTGPW.js";import"./LGO3TCAO.js";import{G as u,H as l,I as z,K as k,T as x,g as h,h as r,i as p,l as f}from"./PA2BHIBQ.js";var a={percentage:"percentage",progressRing:"ring--progress",ring:"ring",rings:"rings",text:"text",trackRing:"ring--track"},w=h`:host{position:relative;margin-inline:auto;display:flex;align-items:center;justify-content:center;opacity:1;flex-direction:column;min-block-size:var(--calcite-loader-size);font-size:var(--calcite-loader-font-size);stroke-width:var(--calcite-internal-stroke-width);fill:none;transform:scale(1);padding-block:var(--calcite-loader-spacing, 4rem)}:host([scale=s]){--calcite-internal-stroke-width: 3;--calcite-internal-text-offset: var(--calcite-spacing-xxs);--calcite-internal-loader-font-size: var(--calcite-font-size--3);--calcite-internal-loader-size: 2rem;--calcite-internal-loader-size-inline: .75rem;--calcite-internal-loader-value-line-height: .625rem}:host([scale=m]){--calcite-internal-stroke-width: 6;--calcite-internal-text-offset: var(--calcite-spacing-sm);--calcite-internal-loader-font-size: var(--calcite-font-size-relative-md);--calcite-internal-loader-size: 4rem;--calcite-internal-loader-size-inline: 1rem;--calcite-internal-loader-value-line-height: 1.375rem}:host([scale=l]){--calcite-internal-stroke-width: 8;--calcite-internal-text-offset: var(--calcite-spacing-md);--calcite-internal-loader-font-size: var(--calcite-font-size-relative-xl);--calcite-internal-loader-size: 6rem;--calcite-internal-loader-size-inline: 1.5rem;--calcite-internal-loader-value-line-height: 1.71875rem}.text{display:block;text-align:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);margin-block-start:var(--calcite-loader-text-spacing, var(--calcite-internal-text-offset));font-weight:var(--calcite-loader-text-weight, var(--calcite-font-weight-normal));color:var(--calcite-loader-text-color, var(--calcite-color-text-1))}.percentage{display:block;text-align:center;font-size:var(--calcite-loader-font-size);inline-size:var(--calcite-loader-size, var(--calcite-internal-loader-size));line-height:var(--calcite-internal-loader-value-line-height);align-self:center;color:var(--calcite-loader-text-color, var(--calcite-color-text-1))}.rings{position:relative;display:flex;overflow:visible;opacity:1;inline-size:var(--calcite-loader-size, var(--calcite-internal-loader-size));block-size:var(--calcite-loader-size, var(--calcite-internal-loader-size))}.ring{position:absolute;inset-block-start:0px;transform-origin:center;overflow:visible;inset-inline-start:0;inline-size:var(--calcite-loader-size, var(--calcite-internal-loader-size));block-size:var(--calcite-loader-size, var(--calcite-internal-loader-size))}.ring--track{stroke:var(--calcite-loader-track-color, var(--calcite-color-transparent-press))}.ring--progress{stroke:var(--calcite-loader-progress-color, var(--calcite-color-brand));transform:rotate(-90deg);transition:all var(--calcite-internal-animation-timing-fast) linear}:host([type=indeterminate]) .ring--progress{animation:loader-clockwise calc(var(--calcite-internal-animation-timing-slow) / var(--calcite-internal-duration-factor) * 2 / var(--calcite-internal-duration-factor)) linear infinite}:host([inline]){--calcite-internal-stroke-width: 2;position:relative;margin:0;stroke:currentColor;stroke-width:2;padding-block:0px;block-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)));min-block-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)));inline-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)));vertical-align:calc(var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline))) * -1 * .2)}:host([inline]) .rings{inset-block-start:0px;margin:0;inset-inline-start:0;inline-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)));block-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)))}:host([inline]) .ring{inline-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)));block-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)))}:host([inline]) .ring--progress{stroke:var(--calcite-loader-progress-color-inline, currentColor)}:host([complete]){opacity:0;transform:scale(.75);transform-origin:center;transition:opacity var(--calcite-internal-animation-timing-medium) linear 1s,transform var(--calcite-internal-animation-timing-medium) linear 1s}:host([complete]) .rings{opacity:0;transform:scale(.75);transform-origin:center;transition:opacity calc(.18s * var(--calcite-internal-duration-factor)) linear .8s,transform calc(.18s * var(--calcite-internal-duration-factor)) linear .8s}:host([complete]) .percentage{color:var(--calcite-color-brand);transform:scale(1.05);transform-origin:center;transition:color var(--calcite-internal-animation-timing-medium) linear,transform var(--calcite-internal-animation-timing-medium) linear}@keyframes loader-clockwise{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host([hidden]){display:none}[hidden]{display:none}`,m=class extends u{constructor(){super(...arguments),this.messages=y({name:null}),this.complete=!1,this.inline=!1,this.scale="m",this.text="",this.type="indeterminate",this.value=0}static{this.properties={complete:[7,{},{reflect:!0,type:Boolean}],inline:[7,{},{reflect:!0,type:Boolean}],label:1,scale:[3,{},{reflect:!0}],text:1,type:[3,{},{reflect:!0}],value:[9,{},{type:Number}]}}static{this.styles=w}connectedCallback(){super.connectedCallback(),this.updateFormatter()}load(){requestAnimationFrame(()=>this.valueChangeHandler())}willUpdate(e){e.has("value")&&(this.hasUpdated||this.value!==0)&&this.valueChangeHandler(),(e.has("type")&&(this.hasUpdated||this.type!=="indeterminate")||e.has("messages"))&&this.updateFormatter()}valueChangeHandler(){this.complete=this.type.startsWith("determinate")&&this.value===100}formatValue(){return this.type!=="determinate-value"?`${this.value}`:this.formatter.format(this.value/100)}getSize(e){return{s:32,m:64,l:96}[e]}getInlineSize(e){return{s:12,m:16,l:24}[e]}updateFormatter(){this.type!=="determinate-value"||this.formatter?.resolvedOptions().locale===this.messages._lang||(this.formatter=new Intl.NumberFormat(this.messages._lang,{style:"percent"}))}render(){let{el:e,inline:n,label:s,text:c,type:i,value:v}=this,o=e.id||b(),t=i!=="indeterminate",d=Math.floor(v);return this.el.ariaLabel=s,this.el.ariaValueMax=t?"100":null,this.el.ariaValueMin=t?"0":null,this.el.ariaValueNow=t?d.toString():null,k(this.el,"id",o),this.el.role="progressbar",r`<div class=${l(a.rings)}>${this.renderRing("track")}${this.renderRing("progress")}${!n&&t&&r`<div class=${l(a.percentage)}>${this.formatValue()}</div>`||""}</div>${!n&&c&&r`<div class=${l(a.text)}>${c}</div>`||""}`}renderRing(e){let{inline:n,scale:s,value:c}=this,i=n?this.getInlineSize(s):this.getSize(s),o=i*.45,t;if(e==="progress"){let d=2*o*Math.PI,g=(this.type.startsWith("determinate")?c:24)/100*d,$=d-g;t={"stroke-dasharray":`${g} ${$}`}}return r`<svg aria-hidden=true class=${l({[a.ring]:!0,[a.trackRing]:e==="track",[a.progressRing]:e==="progress"})} style=${z(t)} viewBox=${`0 0 ${i} ${i}`}>${p`<circle cx=${i/2} cy=${i/2} r=${o??f} />`}</svg>`}};x("calcite-loader",m);export{m as Loader};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{p as m,w as p}from"./TXTWTIAM.js";import"./EM6V55GC.js";import"./3XS7XZAX.js";import{G as b,H as c,I as g,J as h,T as v,g as f,h as o}from"./
|
|
2
|
+
import{p as m,w as p}from"./TXTWTIAM.js";import"./EM6V55GC.js";import"./3XS7XZAX.js";import{G as b,H as c,I as g,J as h,T as v,g as f,h as o}from"./PA2BHIBQ.js";var u={thumbnail:"thumbnail",background:"background",initials:"initials",icon:"icon"};function k(a){a=x(a);let e=0;for(let i=0;i<a.length;i++)e=a.charCodeAt(i)+((e<<5)-e);let t="#";for(let i=0;i<3;i++){let r=e>>i*8&255;t+=("00"+r.toString(16)).substr(-2)}return t}function x(a){let e=Math.floor(a.length/2),t=a.split("").reverse().join("");return t.substring(e)+t.slice(0,e)}function z(a){let{r:e,g:t,b:i}=a;e/=255,t/=255,i/=255;let r=Math.max(e,t,i),n=Math.min(e,t,i),l=r-n;if(r===n)return 0;let s=(r+n)/2;switch(r){case e:s=(t-i)/l+(t<i?6:0);break;case t:s=(i-e)/l+2;break;case i:s=(e-t)/l+4;break}return Math.round(s*60)}function $(a){return z(p(a))}var y=f`:host{display:inline-block;overflow:hidden;border-radius:var(--calcite-avatar-corner-radius, 50%);color:var(--calcite-avatar-color, var(--calcite-color-text-2))}:host([scale=s]){block-size:1.5rem;inline-size:1.5rem;font-size:var(--calcite-font-size-relative-xs)}:host([scale=m]){block-size:2rem;inline-size:2rem;font-size:var(--calcite-font-size-relative-sm)}:host([scale=l]){block-size:2.75rem;inline-size:2.75rem;font-size:var(--calcite-font-size-relative-md)}.icon{display:flex}.background{display:flex;block-size:100%;inline-size:100%;align-items:center;justify-content:center;border-radius:var(--calcite-avatar-corner-radius, 50%)}.initials{font-weight:var(--calcite-font-weight-bold);text-transform:uppercase}.thumbnail{block-size:100%;inline-size:100%;border-radius:var(--calcite-avatar-corner-radius, 50%)}:host([hidden]){display:none}[hidden]{display:none}`,d=class extends b{constructor(){super(...arguments),this.thumbnailFailedToLoad=!1,this.scale="m"}static{this.properties={thumbnailFailedToLoad:[16,{},{state:!0}],fullName:[3,{},{reflect:!0}],label:1,scale:[3,{},{reflect:!0}],thumbnail:[3,{},{reflect:!0}],userId:[3,{},{reflect:!0}],username:[3,{},{reflect:!0}]}}static{this.styles=y}determineContent(){if(this.thumbnail&&!this.thumbnailFailedToLoad)return o`<img alt=${(this.label||"")??h} class=${c(u.thumbnail)} @error=${()=>this.thumbnailFailedToLoad=!0} src=${this.thumbnail??h}>`;let e=this.generateInitials(),t=this.generateFillColor();return o`<span .ariaLabel=${this.label||this.fullName} class=${c(u.background)} role=figure style=${g({backgroundColor:t})}>${e?o`<span aria-hidden=true class=${c(u.initials)}>${e}</span>`:o`<calcite-icon class=${c(u.icon)} icon=user .scale=${this.scale}></calcite-icon>`}</span>`}generateFillColor(){let{userId:e,username:t,fullName:i}=this,r=e&&`#${e.substr(e.length-6)}`,n=t||i||"",l=r&&m(r)?r:k(n);if(!e&&!n||!m(l))return"var(--calcite-avatar-background-color, var(--calcite-color-foreground-2))";let s=$(l);return`var(--calcite-avatar-background-color, light-dark(hsl(${s}, 60%, 90%), hsl(${s}, 60%, 20%)))`}generateInitials(){let{fullName:e,username:t}=this;return e?e.trim().split(" ").map(i=>i.substring(0,1)).join(""):t?t.substring(0,2):!1}render(){return this.determineContent()}};v("calcite-avatar",d);export{d as Avatar};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as t,b as L,c as a}from"./FCCATXLE.js";import{a as l}from"./3LVRJOWC.js";import{a as I}from"./VW2NPHDP.js";import"./VUYX7MNO.js";import{a as z}from"./D57IJD77.js";import{a as s}from"./ZWPNZ5XW.js";import{e as k}from"./VRYDL5Z7.js";import"./UQA4NM7C.js";import{y as $}from"./7FW2RVVH.js";import{E as p,F as h,G as y,H as r,J as u,M as w,T as x,g as f,h as n,p as g}from"./3DO6XONU.js";var S=f`:host{--calcite-internal-menu-item-breadcrumb-icon-margin-inline-start: 0;--calcite-internal-menu-item-content-min-block-size: var(--calcite-size-xl);--calcite-internal-menu-item-dropdown-action-block-size: auto;--calcite-internal-menu-item-dropdown-action-divider-inset-block: var(--calcite-spacing-xxs);--calcite-internal-menu-item-dropdown-action-flex: initial;--calcite-internal-menu-item-font-size: var(--calcite-font-size-relative-md);--calcite-internal-menu-item-icon-spacing-start: var(--calcite-space-md);--calcite-internal-menu-item-icon-spacing-end: var(--calcite-space-md);--calcite-internal-menu-item-padding-inline: var(--calcite-space-lg);--calcite-internal-menu-item-border: 1px solid var(--calcite-menu-item-sub-menu-border-color, var(--calcite-color-border-3));position:relative;box-sizing:border-box;display:flex;align-items:center;flex-shrink:0}:host .container,:host .item-content,:host .content{min-block-size:var(--calcite-internal-menu-item-content-min-block-size)}:host([layout=vertical]){--calcite-internal-menu-item-breadcrumb-icon-margin-inline-start: auto;--calcite-internal-menu-item-padding-block: var(--calcite-space-md);--calcite-internal-menu-item-padding-inline: var(--calcite-space-md);inline-size:100%}:host(:not([layout=vertical])){block-size:100%}.container,.item-content{display:flex;block-size:100%;inline-size:100%;flex-direction:row;align-items:stretch}.item-content{background-color:var(--calcite-menu-background-color, var(--calcite-internal-menu-background-color, var(--calcite-color-foreground-1)))}.content{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;align-items:center;justify-content:center;outline:2px solid transparent;outline-offset:2px;text-decoration:none;padding-block-start:var(--calcite-space-base);border-block-end:var(--calcite-space-base) solid var(--calcite-color-transparent);font-size:var(--calcite-internal-menu-item-font-size);line-height:var(--calcite-internal-menu-item-line-height, inherit);padding-inline:var(--calcite-internal-menu-item-padding-inline);background-color:var(--calcite-menu-background-color, var(--calcite-internal-menu-background-color, var(--calcite-color-foreground-1)));color:var(--calcite-menu-text-color, var(--calcite-internal-menu-text-color, var(--calcite-color-text-2)))}.content:hover{--calcite-internal-menu-background-color: var(--calcite-color-foreground-2)}.content:focus{border-block-end-width:4px;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))));padding-block-start:var(--calcite-space-2xs);border-block-end-width:var(--calcite-space-2xs)}.content:active{--calcite-internal-menu-background-color: var(--calcite-color-foreground-3);--calcite-internal-menu-text-color: var(--calcite-color-text-1)}.content span{display:inline-flex}.content.layout--vertical{display:flex;inline-size:100%;justify-content:flex-start;padding-block:var(--calcite-internal-menu-item-padding-block);border-block-end:0;border-inline-end:var(--calcite-space-2xs) solid var(--calcite-color-transparent)}:host([scale=s]){--calcite-internal-menu-item-content-min-block-size: 2.25rem;--calcite-internal-menu-item-font-size: var(--calcite-font-size);--calcite-internal-menu-item-icon-spacing-start: var(--calcite-space-sm);--calcite-internal-menu-item-icon-spacing-end: var(--calcite-space-sm);--calcite-internal-menu-item-line-height: var(--calcite-space-lg);--calcite-internal-menu-item-padding-inline: var(--calcite-space-sm);min-block-size:var(--calcite-internal-menu-item-content-min-block-size)}:host([scale=s]:not([layout=vertical])){--calcite-internal-menu-item-dropdown-action-block-size: var(--calcite-space-2xl);--calcite-internal-menu-item-dropdown-action-divider-inset-block: var(--calcite-space-base);--calcite-internal-menu-item-dropdown-action-flex: 0 0 1.75rem}:host([scale=s]:not([layout=vertical])) .icon--dropdown{padding-inline-start:var(--calcite-space-xs)}:host([scale=s]:not([layout=vertical])) .dropdown-action{padding-block:0;padding-inline:0;padding-inline-start:var(--calcite-space-2xs)}:host([scale=s][layout=vertical]){--calcite-internal-menu-item-padding-block: var(--calcite-space-sm);--calcite-internal-menu-item-padding-inline: var(--calcite-space-sm)}:host([scale=s][layout=vertical]) .icon--end~.icon--dropdown{margin-inline-start:var(--calcite-space-sm);padding-inline-start:var(--calcite-space-xs)}:host([breadcrumb][scale=s]){--calcite-internal-menu-item-breadcrumb-icon-margin-inline-start: var(--calcite-space-xs)}:host([breadcrumb][scale=s]:not([layout=vertical])) .content{padding-inline-end:var(--calcite-space-sm)}:host(.is-child[scale=s][layout=vertical]) .parent--vertical{block-size:2.25rem}:host(.is-child[scale=s][layout=vertical]) .content{--calcite-internal-menu-item-content-min-block-size: 2.25rem}:host([scale=s][layout=vertical]):has(.dropdown-action){--calcite-internal-menu-item-dropdown-action-block-size: 2.25rem;--calcite-internal-menu-item-dropdown-action-divider-inset-block: var(--calcite-space-sm);--calcite-internal-menu-item-dropdown-action-flex: 0 0 var(--calcite-size-md)}:host([scale=s][layout=vertical]):has(.dropdown-action) .dropdown-action{align-items:center;box-sizing:border-box;padding-inline:var(--calcite-space-2xs)}:host([scale=s]) .dropdown-action,:host([scale=l]:not([layout=vertical])) .dropdown-action{margin-inline:0;margin-inline-start:var(--calcite-space-px)}:host([scale=s]) .dropdown-action:after,:host([scale=l]:not([layout=vertical])) .dropdown-action:after{inset-inline-start:calc(-1 * var(--calcite-space-px))}:host([scale=s][layout=vertical]) .content:not([href]){padding-inline-end:var(--calcite-space-2xs)}:host([scale=m][layout=vertical]) .content:not([href]){padding-inline-end:var(--calcite-space-sm)}:host([scale=l]){--calcite-internal-menu-item-content-min-block-size: var(--calcite-size-2xl);--calcite-internal-menu-item-font-size: var(--calcite-font-size-lg);--calcite-internal-menu-item-icon-spacing-start: var(--calcite-space-lg);--calcite-internal-menu-item-icon-spacing-end: var(--calcite-space-lg);--calcite-internal-menu-item-line-height: var(--calcite-space-2xl);--calcite-internal-menu-item-padding-inline: var(--calcite-space-lg);min-block-size:var(--calcite-internal-menu-item-content-min-block-size)}:host([scale=l]:not([layout=vertical])){--calcite-internal-menu-item-breadcrumb-icon-margin-inline-start: var(--calcite-space-sm-plus)}:host([scale=l]:not([layout=vertical])) .container,:host([scale=l]:not([layout=vertical])) .item-content,:host([scale=l]:not([layout=vertical])) .content{min-block-size:var(--calcite-size-2xl)}:host([scale=l]:not([layout=vertical])) .icon--dropdown{margin-inline-start:var(--calcite-space-sm-plus);padding-inline-start:0}:host([scale=l]:not([layout=vertical])) .dropdown-action{margin-inline-start:var(--calcite-space-xs)}:host([scale=l]:not([layout=vertical])) .dropdown-action:after{inset-inline-start:calc(-1 * var(--calcite-space-xs))}:host([scale=l][layout=vertical]){--calcite-internal-menu-item-padding-block: var(--calcite-space-lg);--calcite-internal-menu-item-padding-inline: var(--calcite-space-lg)}:host([scale=l][layout=vertical]) .content:has(.icon--end):has(.icon--dropdown) .icon--end~.icon--dropdown{margin-inline-start:var(--calcite-space-lg);padding-inline-start:var(--calcite-space-sm-plus)}:host([scale=l][layout=vertical]) .content:not([href]){padding-inline-end:var(--calcite-space-md)}:host([scale=l][layout=vertical]) .dropdown-action{margin-inline-end:0;padding-inline:var(--calcite-space-xs)}:host([scale=l]:not([layout=vertical])):has(.dropdown-action){--calcite-internal-menu-item-dropdown-action-block-size: var(--calcite-size-lg);--calcite-internal-menu-item-dropdown-action-divider-inset-block: var(--calcite-space-xs);--calcite-internal-menu-item-dropdown-action-flex: 0 0 3.125rem}:host([scale=l]:not([layout=vertical])):has(.dropdown-action) .content{padding-inline-end:var(--calcite-space-xl)}:host([scale=l]:not([layout=vertical])):has(.dropdown-action) .dropdown-action{box-sizing:border-box;padding-inline-start:var(--calcite-space-xs)}:host([scale=l][layout=vertical]):is([slot=submenu-item],.is-child) .parent--vertical{padding-inline-start:var(--calcite-size-md)}:host([active]) .content{--calcite-internal-menu-text-color: var(--calcite-color-text-1);border-color:var(--calcite-menu-item-accent-color, var(--calcite-color-brand))}:host([active]) .icon{--calcite-internal-menu-item-icon-color: var( --calcite-icon-color, var(--calcite-ui-icon-color, var(--calcite-color-brand)) )}:host([active][scale=l][layout=vertical]) .content{border-inline-end-color:var(--calcite-menu-item-accent-color, var(--calcite-color-brand))}:host(.is-child[layout=vertical]) .parent--vertical{box-sizing:border-box;padding-inline-start:var(--calcite-space-xl)}:host([slot=submenu-item]) .parent--vertical{padding-inline-start:1.5rem}:host([layout=vertical]) .text-container{flex:1}:host([scale=m][layout=vertical]) .text-container{flex:0 1 auto}.icon{color:var(--calcite-menu-text-color, var(--calcite-icon-color, var(--calcite-internal-menu-item-icon-color, var(--calcite-ui-icon-color, var(--calcite-color-text-3)))))}.icon--start{margin-inline-end:var(--calcite-internal-menu-item-icon-spacing-start)}.icon--end{margin-inline-start:var(--calcite-internal-menu-item-icon-spacing-end)}:host([layout=vertical]) .icon--end{padding-inline-start:0;--calcite-internal-menu-item-icon-spacing-end: auto}:host([layout=vertical][scale=m]) .icon--end{padding-inline-start:.75rem}.icon--dropdown{position:relative;margin-inline-start:auto;margin-inline-end:0px;padding-inline-start:.5rem}:host([layout=vertical]) .icon--end~.icon--dropdown{margin-inline-start:.75rem}:host([layout=vertical]) .hover-href-icon{padding-inline-start:.5rem}:host([layout=vertical]) .hover-href-icon~.icon--end{--calcite-internal-menu-item-icon-spacing-start: var(--calcite-space-sm)}:host([layout=vertical]) .hover-href-icon~.icon--breadcrumb{margin-inline-start:.75rem}.icon--breadcrumb{margin-inline-start:var(--calcite-internal-menu-item-breadcrumb-icon-margin-inline-start);padding-inline-start:0;margin-inline-end:0px}:host([scale=m]) .icon--breadcrumb{padding-inline-start:.5rem}:host([breadcrumb][scale=l][layout=vertical]) .icon--breadcrumb{margin-inline-start:var(--calcite-space-sm-plus)}:host([layout=vertical]) .icon--breadcrumb~.icon--dropdown{margin-inline-start:.5rem}:host([layout=vertical]) .icon--end~.icon--breadcrumb{margin-inline-start:.5rem}:host([breadcrumb]) .content{padding-inline-end:.75rem}.dropdown-action{position:relative;align-self:center;--calcite-action-background-color: var(--calcite-menu-background-color);--calcite-action-text-color: var(--calcite-menu-text-color);block-size:var(--calcite-internal-menu-item-dropdown-action-block-size);flex:var(--calcite-internal-menu-item-dropdown-action-flex);margin-inline-start:var(--calcite-spacing-xxs)}.dropdown-action:after{position:absolute;display:block;inline-size:1px;content:"";inset-inline-start:calc(-1 * var(--calcite-spacing-xxs));inset-block:var(--calcite-internal-menu-item-dropdown-action-divider-inset-block);background-color:var(--calcite-color-border-3)}.dropdown-action:active{--calcite-action-background-color-press: var(--calcite-menu-background-color)}:host([layout=vertical]) .dropdown-action{margin-inline-end:var(--calcite-spacing-xxs)}.dropdown-menu-items{position:absolute;display:none;block-size:auto;min-inline-size:100%;flex-direction:column;overflow:visible;box-shadow:var(--calcite-shadow-md);border:var(--calcite-internal-menu-item-border);border-radius:var(--calcite-menu-item-sub-menu-corner-radius, var(--calcite-corner-radius));inset-block-start:100%;z-index:var(--calcite-z-index-dropdown)}.dropdown-menu-items.open{display:block}.dropdown-menu-items.nested{position:absolute;inset-block-start:-1px;transform:translate(calc(100% - 2px))}.parent--vertical{flex-direction:column}.dropdown--vertical.dropdown-menu-items{position:relative;box-shadow:none;inset-block-start:0;transform:none}.dropdown--vertical.dropdown-menu-items:last-of-type{border-inline:0}:host([layout=vertical]:last-of-type) .dropdown-menu-items{border-block-end:0}:host([layout=vertical]) .dropdown--vertical.dropdown-menu-items{border:none}:host([layout=vertical]) .dropdown--vertical.dropdown-menu-items:after{content:"";border-block-start:var(--calcite-internal-menu-item-border);position:absolute;inset-block-start:0;inset-inline:var(--calcite-space-md) 0}.dropdown-menu-items.nested.calcite--rtl{transform:translate(calc(-100% + 2px))}.dropdown--vertical.dropdown-menu-items.nested.calcite--rtl{transform:none}.hover-href-icon{position:relative;inset-inline-end:.25rem;margin-inline-start:auto;opacity:0;transition:all var(--calcite-internal-animation-timing-medium) ease-in-out}.content:focus .hover-href-icon,.content:hover .hover-href-icon{inset-inline-end:-.25rem;opacity:1}:host([hidden]){display:none}[hidden]{display:none}`,v=class extends y{constructor(){super(),this.anchorRef=p(),this.direction=k(),this.dropdownActionRef=p(),this.isFocused=!1,this.messages=I(),this.focusSetter=z()(this),this.hasSubmenu=!1,this.active=!1,this.breadcrumb=!1,this.isTopLevelItem=!1,this.open=!1,this.scale="m",this.calciteMenuItemSelect=g(),this.listen("focusout",this.handleFocusOut),this.listen("blur",this.blurHandler),this.listen("focus",this.focusHandler)}static{this.properties={hasSubmenu:[16,{},{state:!0}],submenuItems:[16,{},{state:!0}],active:[7,{},{reflect:!0,type:Boolean}],breadcrumb:[7,{},{reflect:!0,type:Boolean}],href:1,iconEnd:[3,{},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{},{reflect:!0}],isTopLevelItem:[5,{},{type:Boolean}],label:1,layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],open:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],rel:[3,{},{reflect:!0}],target:[3,{},{reflect:!0}],text:1,topLevelMenuLayout:1}}static{this.styles=S}async setFocus(e){return this.focusSetter(()=>this.anchorRef.value,e)}load(){this.listenOn(document,"click",this.handleClickOut)}handleClickOut(e){this.topLevelMenuLayout!=="vertical"&&this.hasSubmenu&&this.open&&!e.composedPath().includes(this.el)&&(this.open=!1)}handleFocusOut(e){this.topLevelMenuLayout!=="vertical"&&!this.el.contains(e.relatedTarget)&&(this.open=!1)}blurHandler(){this.isFocused=!1}clickHandler(e){(this.href&&e.target===this.dropdownActionRef.value||!this.href&&this.hasSubmenu)&&(this.open=!this.open),this.selectMenuItem(e)}focusHandler(e){let i=e.target;this.isFocused=!0,i.open&&!this.open&&(i.open=!1)}handleMenuItemSlotChange(e){this.submenuItems=$(e),this.submenuItems.forEach(i=>{i.topLevelMenuLayout||(i.topLevelMenuLayout=this.topLevelMenuLayout)}),this.hasSubmenu=this.submenuItems.length>0}async keyDownHandler(e){let{hasSubmenu:i,href:c,layout:b,open:m}=this,o=e.key,d=e.target===this.dropdownActionRef.value;if(!e.defaultPrevented){if(o===" "||o==="Enter")i&&(!c||c&&d)&&(this.open=!m),!(c&&d)&&o!=="Enter"&&this.selectMenuItem(e),(o===" "||c&&d)&&e.preventDefault();else if(o==="Escape"){if(m){this.open=!1,e.preventDefault();return}}else if(o==="ArrowDown"||o==="ArrowUp"){if((d||!c)&&i&&!m&&b==="horizontal"){this.open=!0,e.preventDefault();return}}else if(o==="ArrowRight"&&(d||!c)&&i&&!m&&b==="vertical"){this.open=!0,e.preventDefault();return}}}selectMenuItem(e){e.target!==this.dropdownActionRef.value&&this.calciteMenuItemSelect.emit()}renderIconStart(){return l(t.iconStart,n`<calcite-icon class=${`${t.icon} ${t.iconStart}`} .flipRtl=${this.iconFlipRtl==="start"||this.iconFlipRtl==="both"} .icon=${this.iconStart} .scale=${s(this.scale)}></calcite-icon>`)}renderIconEnd(){return l(t.iconEnd,n`<calcite-icon class=${`${t.icon} ${t.iconEnd}`} .flipRtl=${this.iconFlipRtl==="end"||this.iconFlipRtl==="both"} .icon=${this.iconEnd} .scale=${s(this.scale)}></calcite-icon>`)}renderBreadcrumbIcon(e){return l(t.iconBreadcrumb,n`<calcite-icon class=${`${t.icon} ${t.iconBreadcrumb}`} .icon=${e==="rtl"?a.chevronLeft:a.chevronRight} .scale=${s(this.scale)}></calcite-icon>`)}renderDropdownIcon(e){let i=e==="rtl"?"chevron-left":"chevron-right";return l(t.iconDropdown,n`<calcite-icon class=${`${t.icon} ${t.iconDropdown}`} .icon=${this.topLevelMenuLayout==="vertical"||this.isTopLevelItem?this.open?a.chevronUp:a.chevronDown:i} .scale=${s(this.scale)}></calcite-icon>`)}renderDropdownAction(e){let i=e==="rtl"?"chevron-left":"chevron-right";return l(t.dropdownAction,n`<calcite-action .aria=${{expanded:this.open}} class=${r(t.dropdownAction)} .icon=${this.topLevelMenuLayout==="vertical"||this.isTopLevelItem?this.open?a.chevronUp:a.chevronDown:i} @click=${this.clickHandler} @keydown=${this.keyDownHandler} .scale=${this.scale} .text=${this.messages.open} ${h(this.dropdownActionRef)}></calcite-action>`)}renderSubmenuItems(e){return n`<calcite-menu class=${r({[t.dropdownMenuItems]:!0,[t.open]:this.open,[t.nested]:!this.isTopLevelItem,[w.rtl]:e==="rtl",[t.dropdownVertical]:this.topLevelMenuLayout==="vertical"})} .label=${this.messages.submenu} layout=vertical role=menu .scale=${this.scale}><slot name=${L.submenuItem} @slotchange=${this.handleMenuItemSlotChange}></slot></calcite-menu>`}renderHrefIcon(e){return l(t.hoverHrefIcon,n`<calcite-icon class=${r(t.hoverHrefIcon)} .icon=${e==="rtl"?a.arrowLeft:a.arrowRight} .scale=${s(this.scale)}></calcite-icon>`)}renderItemContent(e){let i=this.href&&(this.topLevelMenuLayout==="vertical"||!this.isTopLevelItem),c=!this.href&&this.hasSubmenu;return n`${this.iconStart&&this.renderIconStart()||""}<div class=${r(t.textContainer)}><span>${this.text}</span></div>${i&&this.renderHrefIcon(e)||""}${this.iconEnd&&this.renderIconEnd()||""}${this.breadcrumb?this.renderBreadcrumbIcon(e):null}${c?this.renderDropdownIcon(e):null}`}render(){let e=this.direction;return n`<li class=${r({[t.container]:!0,[t.isParentVertical]:this.topLevelMenuLayout==="vertical"})} role=none><div class=${r(t.itemContent)}><a .ariaCurrent=${this.isFocused?"page":!1} .ariaExpanded=${this.open} .ariaHasPopup=${this.hasSubmenu} .ariaLabel=${this.label} class=${r({[t.layoutVertical]:this.layout==="vertical",[t.content]:!0})} href=${this.href??u} @click=${this.clickHandler} @keydown=${this.keyDownHandler} rel=${this.rel??u} role=menuitem .tabIndex=${this.isTopLevelItem?0:-1} target=${this.target??u} ${h(this.anchorRef)}>${this.renderItemContent(e)}</a>${this.href&&this.hasSubmenu?this.renderDropdownAction(e):null}</div>${this.renderSubmenuItems(e)}</li>`}};x("calcite-menu-item",v);export{v as MenuItem};
|
|
2
|
+
import{a as t,b as L,c as a}from"./FCCATXLE.js";import{a as l}from"./G6EK753X.js";import{a as I}from"./MG5KEVZ3.js";import"./VUYX7MNO.js";import{a as z}from"./APMXUV5R.js";import{a as s}from"./ZWPNZ5XW.js";import{e as k}from"./6NAQTGPW.js";import"./LGO3TCAO.js";import{y as $}from"./7FW2RVVH.js";import{E as p,F as h,G as y,H as r,J as u,M as w,T as x,g as f,h as n,p as g}from"./PA2BHIBQ.js";var S=f`:host{--calcite-internal-menu-item-breadcrumb-icon-margin-inline-start: 0;--calcite-internal-menu-item-content-min-block-size: var(--calcite-size-xl);--calcite-internal-menu-item-dropdown-action-block-size: auto;--calcite-internal-menu-item-dropdown-action-divider-inset-block: var(--calcite-spacing-xxs);--calcite-internal-menu-item-dropdown-action-flex: initial;--calcite-internal-menu-item-font-size: var(--calcite-font-size-relative-md);--calcite-internal-menu-item-icon-spacing-start: var(--calcite-space-md);--calcite-internal-menu-item-icon-spacing-end: var(--calcite-space-md);--calcite-internal-menu-item-padding-inline: var(--calcite-space-lg);--calcite-internal-menu-item-border: 1px solid var(--calcite-menu-item-sub-menu-border-color, var(--calcite-color-border-3));position:relative;box-sizing:border-box;display:flex;align-items:center;flex-shrink:0}:host .container,:host .item-content,:host .content{min-block-size:var(--calcite-internal-menu-item-content-min-block-size)}:host([layout=vertical]){--calcite-internal-menu-item-breadcrumb-icon-margin-inline-start: auto;--calcite-internal-menu-item-padding-block: var(--calcite-space-md);--calcite-internal-menu-item-padding-inline: var(--calcite-space-md);inline-size:100%}:host(:not([layout=vertical])){block-size:100%}.container,.item-content{display:flex;block-size:100%;inline-size:100%;flex-direction:row;align-items:stretch}.item-content{background-color:var(--calcite-menu-background-color, var(--calcite-internal-menu-background-color, var(--calcite-color-foreground-1)))}.content{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;align-items:center;justify-content:center;outline:2px solid transparent;outline-offset:2px;text-decoration:none;padding-block-start:var(--calcite-space-base);border-block-end:var(--calcite-space-base) solid var(--calcite-color-transparent);font-size:var(--calcite-internal-menu-item-font-size);line-height:var(--calcite-internal-menu-item-line-height, inherit);padding-inline:var(--calcite-internal-menu-item-padding-inline);background-color:var(--calcite-menu-background-color, var(--calcite-internal-menu-background-color, var(--calcite-color-foreground-1)));color:var(--calcite-menu-text-color, var(--calcite-internal-menu-text-color, var(--calcite-color-text-2)))}.content:hover{--calcite-internal-menu-background-color: var(--calcite-color-foreground-2)}.content:focus{border-block-end-width:4px;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))));padding-block-start:var(--calcite-space-2xs);border-block-end-width:var(--calcite-space-2xs)}.content:active{--calcite-internal-menu-background-color: var(--calcite-color-foreground-3);--calcite-internal-menu-text-color: var(--calcite-color-text-1)}.content span{display:inline-flex}.content.layout--vertical{display:flex;inline-size:100%;justify-content:flex-start;padding-block:var(--calcite-internal-menu-item-padding-block);border-block-end:0;border-inline-end:var(--calcite-space-2xs) solid var(--calcite-color-transparent)}:host([scale=s]){--calcite-internal-menu-item-content-min-block-size: 2.25rem;--calcite-internal-menu-item-font-size: var(--calcite-font-size);--calcite-internal-menu-item-icon-spacing-start: var(--calcite-space-sm);--calcite-internal-menu-item-icon-spacing-end: var(--calcite-space-sm);--calcite-internal-menu-item-line-height: var(--calcite-space-lg);--calcite-internal-menu-item-padding-inline: var(--calcite-space-sm);min-block-size:var(--calcite-internal-menu-item-content-min-block-size)}:host([scale=s]:not([layout=vertical])){--calcite-internal-menu-item-dropdown-action-block-size: var(--calcite-space-2xl);--calcite-internal-menu-item-dropdown-action-divider-inset-block: var(--calcite-space-base);--calcite-internal-menu-item-dropdown-action-flex: 0 0 1.75rem}:host([scale=s]:not([layout=vertical])) .icon--dropdown{padding-inline-start:var(--calcite-space-xs)}:host([scale=s]:not([layout=vertical])) .dropdown-action{padding-block:0;padding-inline:0;padding-inline-start:var(--calcite-space-2xs)}:host([scale=s][layout=vertical]){--calcite-internal-menu-item-padding-block: var(--calcite-space-sm);--calcite-internal-menu-item-padding-inline: var(--calcite-space-sm)}:host([scale=s][layout=vertical]) .icon--end~.icon--dropdown{margin-inline-start:var(--calcite-space-sm);padding-inline-start:var(--calcite-space-xs)}:host([breadcrumb][scale=s]){--calcite-internal-menu-item-breadcrumb-icon-margin-inline-start: var(--calcite-space-xs)}:host([breadcrumb][scale=s]:not([layout=vertical])) .content{padding-inline-end:var(--calcite-space-sm)}:host(.is-child[scale=s][layout=vertical]) .parent--vertical{block-size:2.25rem}:host(.is-child[scale=s][layout=vertical]) .content{--calcite-internal-menu-item-content-min-block-size: 2.25rem}:host([scale=s][layout=vertical]):has(.dropdown-action){--calcite-internal-menu-item-dropdown-action-block-size: 2.25rem;--calcite-internal-menu-item-dropdown-action-divider-inset-block: var(--calcite-space-sm);--calcite-internal-menu-item-dropdown-action-flex: 0 0 var(--calcite-size-md)}:host([scale=s][layout=vertical]):has(.dropdown-action) .dropdown-action{align-items:center;box-sizing:border-box;padding-inline:var(--calcite-space-2xs)}:host([scale=s]) .dropdown-action,:host([scale=l]:not([layout=vertical])) .dropdown-action{margin-inline:0;margin-inline-start:var(--calcite-space-px)}:host([scale=s]) .dropdown-action:after,:host([scale=l]:not([layout=vertical])) .dropdown-action:after{inset-inline-start:calc(-1 * var(--calcite-space-px))}:host([scale=s][layout=vertical]) .content:not([href]){padding-inline-end:var(--calcite-space-2xs)}:host([scale=m][layout=vertical]) .content:not([href]){padding-inline-end:var(--calcite-space-sm)}:host([scale=l]){--calcite-internal-menu-item-content-min-block-size: var(--calcite-size-2xl);--calcite-internal-menu-item-font-size: var(--calcite-font-size-lg);--calcite-internal-menu-item-icon-spacing-start: var(--calcite-space-lg);--calcite-internal-menu-item-icon-spacing-end: var(--calcite-space-lg);--calcite-internal-menu-item-line-height: var(--calcite-space-2xl);--calcite-internal-menu-item-padding-inline: var(--calcite-space-lg);min-block-size:var(--calcite-internal-menu-item-content-min-block-size)}:host([scale=l]:not([layout=vertical])){--calcite-internal-menu-item-breadcrumb-icon-margin-inline-start: var(--calcite-space-sm-plus)}:host([scale=l]:not([layout=vertical])) .container,:host([scale=l]:not([layout=vertical])) .item-content,:host([scale=l]:not([layout=vertical])) .content{min-block-size:var(--calcite-size-2xl)}:host([scale=l]:not([layout=vertical])) .icon--dropdown{margin-inline-start:var(--calcite-space-sm-plus);padding-inline-start:0}:host([scale=l]:not([layout=vertical])) .dropdown-action{margin-inline-start:var(--calcite-space-xs)}:host([scale=l]:not([layout=vertical])) .dropdown-action:after{inset-inline-start:calc(-1 * var(--calcite-space-xs))}:host([scale=l][layout=vertical]){--calcite-internal-menu-item-padding-block: var(--calcite-space-lg);--calcite-internal-menu-item-padding-inline: var(--calcite-space-lg)}:host([scale=l][layout=vertical]) .content:has(.icon--end):has(.icon--dropdown) .icon--end~.icon--dropdown{margin-inline-start:var(--calcite-space-lg);padding-inline-start:var(--calcite-space-sm-plus)}:host([scale=l][layout=vertical]) .content:not([href]){padding-inline-end:var(--calcite-space-md)}:host([scale=l][layout=vertical]) .dropdown-action{margin-inline-end:0;padding-inline:var(--calcite-space-xs)}:host([scale=l]:not([layout=vertical])):has(.dropdown-action){--calcite-internal-menu-item-dropdown-action-block-size: var(--calcite-size-lg);--calcite-internal-menu-item-dropdown-action-divider-inset-block: var(--calcite-space-xs);--calcite-internal-menu-item-dropdown-action-flex: 0 0 3.125rem}:host([scale=l]:not([layout=vertical])):has(.dropdown-action) .content{padding-inline-end:var(--calcite-space-xl)}:host([scale=l]:not([layout=vertical])):has(.dropdown-action) .dropdown-action{box-sizing:border-box;padding-inline-start:var(--calcite-space-xs)}:host([scale=l][layout=vertical]):is([slot=submenu-item],.is-child) .parent--vertical{padding-inline-start:var(--calcite-size-md)}:host([active]) .content{--calcite-internal-menu-text-color: var(--calcite-color-text-1);border-color:var(--calcite-menu-item-accent-color, var(--calcite-color-brand))}:host([active]) .icon{--calcite-internal-menu-item-icon-color: var( --calcite-icon-color, var(--calcite-ui-icon-color, var(--calcite-color-brand)) )}:host([active][scale=l][layout=vertical]) .content{border-inline-end-color:var(--calcite-menu-item-accent-color, var(--calcite-color-brand))}:host(.is-child[layout=vertical]) .parent--vertical{box-sizing:border-box;padding-inline-start:var(--calcite-space-xl)}:host([slot=submenu-item]) .parent--vertical{padding-inline-start:1.5rem}:host([layout=vertical]) .text-container{flex:1}:host([scale=m][layout=vertical]) .text-container{flex:0 1 auto}.icon{color:var(--calcite-menu-text-color, var(--calcite-icon-color, var(--calcite-internal-menu-item-icon-color, var(--calcite-ui-icon-color, var(--calcite-color-text-3)))))}.icon--start{margin-inline-end:var(--calcite-internal-menu-item-icon-spacing-start)}.icon--end{margin-inline-start:var(--calcite-internal-menu-item-icon-spacing-end)}:host([layout=vertical]) .icon--end{padding-inline-start:0;--calcite-internal-menu-item-icon-spacing-end: auto}:host([layout=vertical][scale=m]) .icon--end{padding-inline-start:.75rem}.icon--dropdown{position:relative;margin-inline-start:auto;margin-inline-end:0px;padding-inline-start:.5rem}:host([layout=vertical]) .icon--end~.icon--dropdown{margin-inline-start:.75rem}:host([layout=vertical]) .hover-href-icon{padding-inline-start:.5rem}:host([layout=vertical]) .hover-href-icon~.icon--end{--calcite-internal-menu-item-icon-spacing-start: var(--calcite-space-sm)}:host([layout=vertical]) .hover-href-icon~.icon--breadcrumb{margin-inline-start:.75rem}.icon--breadcrumb{margin-inline-start:var(--calcite-internal-menu-item-breadcrumb-icon-margin-inline-start);padding-inline-start:0;margin-inline-end:0px}:host([scale=m]) .icon--breadcrumb{padding-inline-start:.5rem}:host([breadcrumb][scale=l][layout=vertical]) .icon--breadcrumb{margin-inline-start:var(--calcite-space-sm-plus)}:host([layout=vertical]) .icon--breadcrumb~.icon--dropdown{margin-inline-start:.5rem}:host([layout=vertical]) .icon--end~.icon--breadcrumb{margin-inline-start:.5rem}:host([breadcrumb]) .content{padding-inline-end:.75rem}.dropdown-action{position:relative;align-self:center;--calcite-action-background-color: var(--calcite-menu-background-color);--calcite-action-text-color: var(--calcite-menu-text-color);block-size:var(--calcite-internal-menu-item-dropdown-action-block-size);flex:var(--calcite-internal-menu-item-dropdown-action-flex);margin-inline-start:var(--calcite-spacing-xxs)}.dropdown-action:after{position:absolute;display:block;inline-size:1px;content:"";inset-inline-start:calc(-1 * var(--calcite-spacing-xxs));inset-block:var(--calcite-internal-menu-item-dropdown-action-divider-inset-block);background-color:var(--calcite-color-border-3)}.dropdown-action:active{--calcite-action-background-color-press: var(--calcite-menu-background-color)}:host([layout=vertical]) .dropdown-action{margin-inline-end:var(--calcite-spacing-xxs)}.dropdown-menu-items{position:absolute;display:none;block-size:auto;min-inline-size:100%;flex-direction:column;overflow:visible;box-shadow:var(--calcite-shadow-md);border:var(--calcite-internal-menu-item-border);border-radius:var(--calcite-menu-item-sub-menu-corner-radius, var(--calcite-corner-radius));inset-block-start:100%;z-index:var(--calcite-z-index-dropdown)}.dropdown-menu-items.open{display:block}.dropdown-menu-items.nested{position:absolute;inset-block-start:-1px;transform:translate(calc(100% - 2px))}.parent--vertical{flex-direction:column}.dropdown--vertical.dropdown-menu-items{position:relative;box-shadow:none;inset-block-start:0;transform:none}.dropdown--vertical.dropdown-menu-items:last-of-type{border-inline:0}:host([layout=vertical]:last-of-type) .dropdown-menu-items{border-block-end:0}:host([layout=vertical]) .dropdown--vertical.dropdown-menu-items{border:none}:host([layout=vertical]) .dropdown--vertical.dropdown-menu-items:after{content:"";border-block-start:var(--calcite-internal-menu-item-border);position:absolute;inset-block-start:0;inset-inline:var(--calcite-space-md) 0}.dropdown-menu-items.nested.calcite--rtl{transform:translate(calc(-100% + 2px))}.dropdown--vertical.dropdown-menu-items.nested.calcite--rtl{transform:none}.hover-href-icon{position:relative;inset-inline-end:.25rem;margin-inline-start:auto;opacity:0;transition:all var(--calcite-internal-animation-timing-medium) ease-in-out}.content:focus .hover-href-icon,.content:hover .hover-href-icon{inset-inline-end:-.25rem;opacity:1}:host([hidden]){display:none}[hidden]{display:none}`,v=class extends y{constructor(){super(),this.anchorRef=p(),this.direction=k(),this.dropdownActionRef=p(),this.isFocused=!1,this.messages=I(),this.focusSetter=z()(this),this.hasSubmenu=!1,this.active=!1,this.breadcrumb=!1,this.isTopLevelItem=!1,this.open=!1,this.scale="m",this.calciteMenuItemSelect=g(),this.listen("focusout",this.handleFocusOut),this.listen("blur",this.blurHandler),this.listen("focus",this.focusHandler)}static{this.properties={hasSubmenu:[16,{},{state:!0}],submenuItems:[16,{},{state:!0}],active:[7,{},{reflect:!0,type:Boolean}],breadcrumb:[7,{},{reflect:!0,type:Boolean}],href:1,iconEnd:[3,{},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{},{reflect:!0}],isTopLevelItem:[5,{},{type:Boolean}],label:1,layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],open:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],rel:[3,{},{reflect:!0}],target:[3,{},{reflect:!0}],text:1,topLevelMenuLayout:1}}static{this.styles=S}async setFocus(e){return this.focusSetter(()=>this.anchorRef.value,e)}load(){this.listenOn(document,"click",this.handleClickOut)}handleClickOut(e){this.topLevelMenuLayout!=="vertical"&&this.hasSubmenu&&this.open&&!e.composedPath().includes(this.el)&&(this.open=!1)}handleFocusOut(e){this.topLevelMenuLayout!=="vertical"&&!this.el.contains(e.relatedTarget)&&(this.open=!1)}blurHandler(){this.isFocused=!1}clickHandler(e){(this.href&&e.target===this.dropdownActionRef.value||!this.href&&this.hasSubmenu)&&(this.open=!this.open),this.selectMenuItem(e)}focusHandler(e){let i=e.target;this.isFocused=!0,i.open&&!this.open&&(i.open=!1)}handleMenuItemSlotChange(e){this.submenuItems=$(e),this.submenuItems.forEach(i=>{i.topLevelMenuLayout||(i.topLevelMenuLayout=this.topLevelMenuLayout)}),this.hasSubmenu=this.submenuItems.length>0}async keyDownHandler(e){let{hasSubmenu:i,href:c,layout:b,open:m}=this,o=e.key,d=e.target===this.dropdownActionRef.value;if(!e.defaultPrevented){if(o===" "||o==="Enter")i&&(!c||c&&d)&&(this.open=!m),!(c&&d)&&o!=="Enter"&&this.selectMenuItem(e),(o===" "||c&&d)&&e.preventDefault();else if(o==="Escape"){if(m){this.open=!1,e.preventDefault();return}}else if(o==="ArrowDown"||o==="ArrowUp"){if((d||!c)&&i&&!m&&b==="horizontal"){this.open=!0,e.preventDefault();return}}else if(o==="ArrowRight"&&(d||!c)&&i&&!m&&b==="vertical"){this.open=!0,e.preventDefault();return}}}selectMenuItem(e){e.target!==this.dropdownActionRef.value&&this.calciteMenuItemSelect.emit()}renderIconStart(){return l(t.iconStart,n`<calcite-icon class=${`${t.icon} ${t.iconStart}`} .flipRtl=${this.iconFlipRtl==="start"||this.iconFlipRtl==="both"} .icon=${this.iconStart} .scale=${s(this.scale)}></calcite-icon>`)}renderIconEnd(){return l(t.iconEnd,n`<calcite-icon class=${`${t.icon} ${t.iconEnd}`} .flipRtl=${this.iconFlipRtl==="end"||this.iconFlipRtl==="both"} .icon=${this.iconEnd} .scale=${s(this.scale)}></calcite-icon>`)}renderBreadcrumbIcon(e){return l(t.iconBreadcrumb,n`<calcite-icon class=${`${t.icon} ${t.iconBreadcrumb}`} .icon=${e==="rtl"?a.chevronLeft:a.chevronRight} .scale=${s(this.scale)}></calcite-icon>`)}renderDropdownIcon(e){let i=e==="rtl"?"chevron-left":"chevron-right";return l(t.iconDropdown,n`<calcite-icon class=${`${t.icon} ${t.iconDropdown}`} .icon=${this.topLevelMenuLayout==="vertical"||this.isTopLevelItem?this.open?a.chevronUp:a.chevronDown:i} .scale=${s(this.scale)}></calcite-icon>`)}renderDropdownAction(e){let i=e==="rtl"?"chevron-left":"chevron-right";return l(t.dropdownAction,n`<calcite-action .aria=${{expanded:this.open}} class=${r(t.dropdownAction)} .icon=${this.topLevelMenuLayout==="vertical"||this.isTopLevelItem?this.open?a.chevronUp:a.chevronDown:i} @click=${this.clickHandler} @keydown=${this.keyDownHandler} .scale=${this.scale} .text=${this.messages.open} ${h(this.dropdownActionRef)}></calcite-action>`)}renderSubmenuItems(e){return n`<calcite-menu class=${r({[t.dropdownMenuItems]:!0,[t.open]:this.open,[t.nested]:!this.isTopLevelItem,[w.rtl]:e==="rtl",[t.dropdownVertical]:this.topLevelMenuLayout==="vertical"})} .label=${this.messages.submenu} layout=vertical role=menu .scale=${this.scale}><slot name=${L.submenuItem} @slotchange=${this.handleMenuItemSlotChange}></slot></calcite-menu>`}renderHrefIcon(e){return l(t.hoverHrefIcon,n`<calcite-icon class=${r(t.hoverHrefIcon)} .icon=${e==="rtl"?a.arrowLeft:a.arrowRight} .scale=${s(this.scale)}></calcite-icon>`)}renderItemContent(e){let i=this.href&&(this.topLevelMenuLayout==="vertical"||!this.isTopLevelItem),c=!this.href&&this.hasSubmenu;return n`${this.iconStart&&this.renderIconStart()||""}<div class=${r(t.textContainer)}><span>${this.text}</span></div>${i&&this.renderHrefIcon(e)||""}${this.iconEnd&&this.renderIconEnd()||""}${this.breadcrumb?this.renderBreadcrumbIcon(e):null}${c?this.renderDropdownIcon(e):null}`}render(){let e=this.direction;return n`<li class=${r({[t.container]:!0,[t.isParentVertical]:this.topLevelMenuLayout==="vertical"})} role=none><div class=${r(t.itemContent)}><a .ariaCurrent=${this.isFocused?"page":!1} .ariaExpanded=${this.open} .ariaHasPopup=${this.hasSubmenu} .ariaLabel=${this.label} class=${r({[t.layoutVertical]:this.layout==="vertical",[t.content]:!0})} href=${this.href??u} @click=${this.clickHandler} @keydown=${this.keyDownHandler} rel=${this.rel??u} role=menuitem .tabIndex=${this.isTopLevelItem?0:-1} target=${this.target??u} ${h(this.anchorRef)}>${this.renderItemContent(e)}</a>${this.href&&this.hasSubmenu?this.renderDropdownAction(e):null}</div>${this.renderSubmenuItems(e)}</li>`}};x("calcite-menu-item",v);export{v as MenuItem};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as z,e as w,f as I}from"./M4XG6CGT.js";import"./LPMYRCBM.js";import{a as n}from"./
|
|
2
|
+
import{a as z,e as w,f as I}from"./M4XG6CGT.js";import"./LPMYRCBM.js";import{a as n}from"./2WL5RWTS.js";import{a as S}from"./W4WNNUUC.js";import{a as l}from"./G6EK753X.js";import{a as y}from"./T6CCMW7H.js";import{a as h}from"./ZWPNZ5XW.js";import"./6NAQTGPW.js";import"./LGO3TCAO.js";import{u as k}from"./7FW2RVVH.js";import{G as x,H as i,I as C,T as $,g as f,h as c,l as v,p as d}from"./PA2BHIBQ.js";var t={active:"label--active",centerContent:"center-content",container:"container",iconCustom:"icon--custom",description:"description",icon:"icon",label:"label",containerHighlightSelected:"container--highlight-selected",scale:b=>`scale--${b}`,shortText:"short-text",single:"label--single",textContainer:"text-container",heading:"heading"},o={checked:"check-square-f",circle:"circle",indeterminate:"minus-square-f",selectedSingle:"circle-inset-large",unchecked:"square"},H={contentEnd:"content-end",contentStart:"content-start"},E="--calcite-combobox-item-spacing-indent-multiplier",L=f`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host([hidden]){display:none}[hidden]{display:none}.scale--s{font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);--calcite-internal-combobox-item-spacing-unit-s: .25rem;--calcite-internal-combobox-item-spacing-unit-l: .5rem;--calcite-combobox-item-selector-icon-size: 1rem;--calcite-internal-combobox-item-description-font-size: var(--calcite-font-size-xs)}.scale--m{font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);--calcite-internal-combobox-item-spacing-unit-s: .375rem;--calcite-internal-combobox-item-spacing-unit-l: .75rem;--calcite-combobox-item-selector-icon-size: 1rem;--calcite-internal-combobox-item-description-font-size: var(--calcite-font-size-sm)}.scale--l{font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);--calcite-internal-combobox-item-spacing-unit-s: var(--calcite-space-sm-plus);--calcite-internal-combobox-item-spacing-unit-l: 1rem;--calcite-combobox-item-selector-icon-size: 1.5rem;--calcite-internal-combobox-item-description-font-size: var(--calcite-font-size)}.container{--calcite-combobox-item-indent-value: calc( var(--calcite-internal-combobox-item-spacing-unit-l) * var(--calcite-combobox-item-spacing-indent-multiplier) )}:host(:focus){box-shadow:var(--calcite-shadow-none)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host,ul{margin:0;display:flex;flex-direction:column;padding:0}:host(:focus),ul:focus{outline:var(--calcite-border-width-md) solid transparent;outline-offset:var(--calcite-border-width-md)}.label{overflow-wrap:break-word;word-break:break-word;outline-color:transparent;position:relative;box-sizing:border-box;display:flex;inline-size:100%;min-inline-size:100%;cursor:pointer;align-items:center;text-decoration-line:none;transition-timing-function:var(--calcite-animation-easing-function);justify-content:space-around;gap:var(--calcite-internal-combobox-item-spacing-unit-l);padding-block:var(--calcite-internal-combobox-item-spacing-unit-s);padding-inline-end:var(--calcite-internal-combobox-item-spacing-unit-l);padding-inline-start:var(--calcite-combobox-item-indent-value);color:var(--calcite-combobox-text-color, var(--calcite-color-text-3));transition-duration:var(--calcite-animation-timing)}:host([disabled]) .label{cursor:default}.label--active{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(-1 * var(--calcite-space-base) * (1 - 2 * clamp(0,var(--calcite-offset-invert-focus),1)))}.label:hover{background-color:var(--calcite-combobox-item-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-combobox-text-color-hover, var(--calcite-color-text-1))}.label:active{background-color:var(--calcite-combobox-item-background-color-active, var(--calcite-color-foreground-3))}:host([selected]) .label,.label:active{color:var(--calcite-combobox-text-color-hover, var(--calcite-color-text-1))}:host([selected]) .label .description,:host([selected]) .label .short-text,.label:active .description,.label:active .short-text{color:var(--calcite-combobox-description-text-color-press, var(--calcite-color-text-2))}.icon{display:inline-flex;transition-timing-function:var(--calcite-animation-easing-function);color:var(--calcite-color-border-input)}:host([selected]) .icon,:host([indeterminate]) .icon{color:var(--calcite-combobox-selected-icon-color, var(--calcite-color-brand))}.icon--custom{margin-block-start:-1px}.center-content{display:flex;flex-direction:column;flex-grow:1;padding-block:0}.description{font-size:var(--calcite-internal-combobox-item-description-font-size)}.short-text{white-space:nowrap}.heading{color:var(--calcite-combobox-heading-text-color, var(--calcite-color-text-1))}.description,.short-text{color:var(--calcite-combobox-description-text-color, var(--calcite-color-text-3))}:host([selected]) .heading{font-weight:var(--calcite-font-weight-medium)}.heading,.description,.short-text{line-height:var(--calcite-font-line-height-relative-snug)}.container--highlight-selected{background-color:var(--calcite-color-surface-highlight)}:host([item-hidden]){display:none}.text-match{background-color:transparent;color:inherit;font-weight:var(--calcite-font-weight-bold)}`,m=class extends x{constructor(){super(...arguments),this._selected=!1,this.interactiveContainer=S(this),this.hasContent=!1,this.active=!1,this.disabled=!1,this.filterDisabled=!1,this.guid=y(),this.iconFlipRtl=!1,this.scale="m",this.selectionMode="multiple",this.selectionAppearance="icon",this.itemHidden=!1,this.indeterminate=!1,this.calciteComboboxItemChange=d({cancelable:!1}),this.calciteInternalComboboxItemChange=d({cancelable:!1})}static{this.properties={hasContent:[16,{},{state:!0}],active:[7,{},{reflect:!0,type:Boolean}],ancestors:[0,{},{attribute:!1}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],filterDisabled:[7,{},{reflect:!0,type:Boolean}],filterTextMatchPattern:[3,{},{reflect:!0}],guid:[3,{},{reflect:!0}],heading:1,icon:[3,{},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],label:1,metadata:[0,{},{attribute:!1}],scale:1,selected:[7,{},{reflect:!0,type:Boolean}],selectionMode:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}],shortHeading:1,value:[3,{},{reflect:!0}],itemHidden:[7,{},{reflect:!0,type:Boolean}],indeterminate:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=L}get selected(){return this._selected}set selected(e){let a=this._selected;e!==a&&(this._selected=e,this.emitItemChange())}get value(){return this._value??this.heading}set value(e){this._value=e??this.heading}toggleSelection(){let e=this.selectionMode==="single-persist";this.disabled||e&&this.selected||(this.selected=!this.selected,this.calciteComboboxItemChange.emit())}connectedCallback(){super.connectedCallback(),this.ancestors=z(this.el)}willUpdate(e){this.hasUpdated&&(e.has("disabled")||e.has("heading")||e.has("label"))&&this.emitItemChange()}emitItemChange(){this.calciteInternalComboboxItemChange.emit()}handleDefaultSlotChange(e){this.hasContent=k(e)}itemClickHandler(){this.toggleSelection()}renderIcon(e){return this.icon?l("icon",c`<calcite-icon class=${i({[t.iconCustom]:!!this.icon})} .flipRtl=${this.iconFlipRtl} .icon=${this.icon||e} .scale=${h(this.scale)}></calcite-icon>`):null}renderSelectIndicator(e){return this.selectionAppearance==="highlight"?null:l("indicator",c`<calcite-icon class=${i({[t.icon]:!0})} .flipRtl=${this.iconFlipRtl} .icon=${e} .scale=${h(this.scale)}></calcite-icon>`)}renderChildren(){return l("default-slot-container",c`<ul .hidden=${!this.hasContent}><slot @slotchange=${this.handleDefaultSlotChange}></slot></ul>`)}render(){let{disabled:e,heading:a,label:M,value:u,filterTextMatchPattern:s,description:g,shortHeading:p}=this,r=I(this.selectionMode),B=e||r?void 0:o.checked,T=r?this.selected?o.selectedSingle:o.circle:this.indeterminate?o.indeterminate:this.selected?o.checked:o.unchecked,R=M||u||a,_=a||u,A={[t.label]:!0,[t.active]:this.active,[t.single]:r,[t.containerHighlightSelected]:this.selected&&this.selectionAppearance==="highlight"},D=w(this.el);return this.el.ariaHidden="true",this.el.ariaLabel=R,this.interactiveContainer({disabled:e,children:c`<div class=${i({[t.container]:!0,[t.scale(this.scale)]:!0})} style=${C({[E]:`${D}`})}><li class=${i(A)} id=${this.guid??v} @click=${this.itemClickHandler}>${this.renderSelectIndicator(T)}<slot name=${H.contentStart}></slot>${this.renderIcon(B)}<div class=${i(t.centerContent)}><div class=${i(t.heading)}>${n({text:_,pattern:s})}</div>${g?c`<div class=${i(t.description)}>${n({text:g,pattern:s})}</div>`:null}</div>${p?c`<div class=${i(t.shortText)}>${n({text:p,pattern:s})}</div>`:null}<slot name=${H.contentEnd}></slot></li>${this.renderChildren()}</div>`})}};$("calcite-combobox-item",m);export{m as ComboboxItem};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as i,b as m,c as o}from"./
|
|
2
|
+
import{a as i,b as m,c as o}from"./62UX6F4M.js";import{a as r}from"./G6EK753X.js";import{H as t}from"./PA2BHIBQ.js";var p=({children:e,class:n,hidden:c=!1,key:f,level:a})=>{let s=a?i(`h${a}`):m`div`;return r(f,o`<${s} class=${t(n)} .hidden=${c}>${e}</${s}>`)};export{p as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{c as d}from"./
|
|
2
|
+
import{c as d}from"./RB36HJW6.js";import{e as c,f as n,g as p}from"./LGO3TCAO.js";import{Q as u,U as f}from"./PA2BHIBQ.js";var a={},s={},g=["de-AT","de-CH","en-AU","en-CA","en-GB","es-MX","fr-CA","fr-CH","hi","it-CH","mk","pt"];[...c,...g];function h(t){if(!t)return n;let r=t.split("-");return t=`${r[0].toLowerCase()}${r.length>=2?`-${r[1].toUpperCase()}`:""}`,g.includes(t)?t:p(t)}async function C(t){return t=h(t),a[t]?a[t]:(s[t]||(s[t]=fetch(f(`./assets/date-picker/nls/${t}.json`)).then(r=>r.json()).catch(()=>(u.error(`Native Language Support data for "${t}" not found or invalid, falling back to english`),C(n)))),a[t]=await s[t])}function x(t){return{"ar-SA":"ar"}[t]||t}function M(t){return t.map((r,e)=>d(r,e===1))}function m(t,r,e){let i=t.has(r),o=t.has(e);if(i&&!o)return r;if(o&&!i)return e}function S(t,r){return r==="min"?m(t,"min","minAsDate"):m(t,"max","maxAsDate")}export{C as a,x as b,M as c,S as d};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as Ve}from"./BU6CQ5WG.js";import{a as Re}from"./IJGLEN77.js";import{b as Z,c as ke,d as Y,f as R,g as k,h as X,i as Oe}from"./M4XG6CGT.js";import{a as B,b as G,d as r,e as u,f as _}from"./LPMYRCBM.js";import{d as q}from"./C4WP5EBM.js";import{a as Me}from"./O7Z4ZY7U.js";import{b as N}from"./QSMCHMHV.js";import{a as Ie}from"./4K4HUHYE.js";import{c as He}from"./DFLZN3GV.js";import{a as we}from"./DKJI4BME.js";import{a as Le}from"./VCAQG5PF.js";import{a as me}from"./2S7BOFLH.js";import{a as ye}from"./GYRB7IXS.js";import{a as W,c as U,d as Ce,e as ge,f as Se,g as V,h as ve}from"./IUFUHWRF.js";import{a as be}from"./SAZM37N6.js";import{a as he}from"./3XWFB6SQ.js";import{a as ue}from"./FIYRBQXH.js";import{a as H}from"./3LVRJOWC.js";import{a as fe}from"./DMKG2CHE.js";import{a as xe}from"./3XS7XZAX.js";import{a as pe}from"./T6CCMW7H.js";import{a as z,b as F}from"./VI7SBYXT.js";import{a as de}from"./VW2NPHDP.js";import"./VUYX7MNO.js";import{a as se}from"./D57IJD77.js";import{a as E,b as T}from"./ZWPNZ5XW.js";import{e as re}from"./VRYDL5Z7.js";import"./UQA4NM7C.js";import{i as w,l as P,p as ne}from"./7FW2RVVH.js";import{D as oe,E as M,F as S,G as ie,H as p,L as ae,M as A,N as ce,T as le,g as te,h as x,l as m,p as v}from"./3DO6XONU.js";var O="48px";var ze=te`: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;--calcite-internal-combobox-max-block-size: 45vh}: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{outline-color:transparent;display:flex;border-width:var(--calcite-border-width-sm);border-style:solid;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);border-radius:var(--calcite-combobox-corner-radius, var(--calcite-corner-radius));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(-1 * var(--calcite-space-base) * (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(-1 * var(--calcite-spacing-base) * (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{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;position:relative;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{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;appearance:none;background-color:transparent;border-style:none;flex-grow:1;font-family:inherit;color:var(--calcite-color-text-1);padding:0;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:var(--calcite-border-width-md) solid transparent;outline-offset:var(--calcite-border-width-md)}.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;inline-size:0;min-inline-size:0;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{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;max-inline-size:100%;flex:1 1 auto;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}}.floating-ui-container .calcite-floating-ui-anim{box-shadow:var(--calcite-shadow-md)}@media(forced-colors:active){.wrapper,.floating-ui-container{border:1px solid canvasText}}.list-container{max-block-size:var(--calcite-internal-combobox-max-block-size);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{block-size:0;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{position:absolute;visibility:hidden}.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-clear-button-background-color));--calcite-action-text-color-press: var(--calcite-clear-button-icon-color-press)}:host([scale=s]) .clear-button--container{padding:var(--calcite-space-2xs)}:host([scale=m]) .clear-button--container{padding:var(--calcite-space-2xs);padding-inline-end:var(--calcite-space-sm)}:host([scale=l]) .clear-button--container{padding-inline-end:var(--calcite-space-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}: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))}`,j=class extends ie{constructor(){super(),this.direction=re(),this.formSupport=He({inputType:"text"})(this),this.selectAllComboboxItemRef=M(),this.allSelectedIndicatorChipRef=M(),this.data=[],this.cancelable=fe()(this),this.filterItems=(()=>{let e=(t,o)=>t&&o.some(({el:i})=>t===i);return xe((t,o=!1,i=!0)=>{let a=Re([...this.data,...this.groupData],t,this.effectiveFilterProps),c=this.getItemsAndGroups(),l=t==="";c.forEach(n=>{if(l){n.itemHidden=!1;return}let s=!e(n,a);n.itemHidden=s;let[C,d]=n.ancestors;(e(C,a)||e(d,a))&&(n.itemHidden=!1),s||n.ancestors.forEach(f=>f.itemHidden=!1)}),this.noMatchesFound=this.filteredItems.length===0&&!!this.filterText,this.filterTextMatchPattern=this.filterText?new RegExp(`(${N(this.filterText)})`,"i"):void 0,this.keyboardNavItems.forEach(n=>{n.filterTextMatchPattern=this.filterTextMatchPattern}),o&&(this.open=this.filterText.trim().length>0),i&&this.calciteComboboxFilterChange.emit()},ce.filter)})(),this._filterText="",this.getSelectedItems=()=>{if(!this.isMulti()){let e=this.allItems.find(({selected:t})=>t);return e?[e]:[]}return this.allItems.filter(e=>e.selected&&(this.selectionMode!=="ancestors"||!Y(e)))},this.groupData=[],this.groupItems=[],this.guid=pe(),this.ignoreSelectedEventsFlag=!1,this.internalValueChangeFlag=!1,this.previousAllSelected=!1,this.refreshingSelectionDisplay=!1,this.mutationObserver=z("mutation",()=>this.updateItems()),this.onLabelClick=()=>{this.setFocus()},this.transitionProp="opacity",this.resizeObserver=(()=>{let e=!1;return z("resize",()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1,this.setMaxScrollerHeight(),this.refreshSelectionDisplay()}))})})(),this.selectedIndicatorChipRef=M(),this.selectedChipCountRef=M(),this.clearButtonRef=M(),this._selectedItems=[],this.textInputRef=M(),this._value="",this.messages=de({blocking:!0}),this.focusSetter=se()(this),this.customChipAddHandler=()=>{this.addCustomChip(this.filterText,!0)},this.interactiveContainer=ue(this),this.topLayer=me({target:()=>this.floatingEl})(this),this.activeChipIndex=-1,this.activeDescendant="",this.activeItemIndex=-1,this.compactSelectionDisplay=!1,this.deferFitChipCountRender=!1,this.selectedHiddenChipsCount=0,this.selectedVisibleChipsCount=0,this.fitUsingCompactCountLabel=!1,this.allItems=[],this.items=[],this.noMatchesFound=!1,this.clearDisabled=!1,this.disabled=!1,this.maxItems=0,this.open=!1,this.overlayPositioning="absolute",this.placeholderIconFlipRtl=!1,this.placement=W,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=v({cancelable:!1}),this.calciteComboboxBeforeOpen=v({cancelable:!1}),this.calciteComboboxChange=v({cancelable:!1}),this.calciteComboboxChipClose=v({cancelable:!1}),this.calciteComboboxClose=v({cancelable:!1}),this.calciteComboboxFilterChange=v({cancelable:!1}),this.calciteComboboxOpen=v({cancelable:!1}),Le(this),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}],deferFitChipCountRender:[16,{},{state:!0}],selectedHiddenChipsCount:[16,{},{state:!0}],selectedVisibleChipsCount:[16,{},{state:!0}],fitUsingCompactCountLabel:[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,{},{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:ae},{reflect:!0}],validationMessage:1,validity:[32,{},{readOnly:!0,attribute:!1}],value:1}}static{this.formAssociated=!0}static{this.styles=[ze,he]}get effectiveFilterProps(){return this.filterProps?this.filterProps.filter(e=>e!=="el"):["description","label","metadata","shortHeading"]}get showingInlineIcon(){let{placeholderIcon:e,selectionMode:t,selectedItems:o,open:i}=this,a=o[0],c=a?.icon,l=R(t);return!i&&a?!!c&&l:!!e&&(!a||l)}get allSelected(){let e=this.allItems.filter(t=>!t.disabled);return e.length>0&&e.every(t=>t.selected)}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(o=>!o.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=>!T(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:o,placement:i,overlayPositioning:a,filteredFlipPlacements:c}=this;return ge(this,{direction:this.direction,floatingEl:t,referenceEl:o,overlayPositioning:a,placement:i,flipPlacements:c,type:"menu"},e)}async setFocus(e){return this.focusSetter(()=>(this.activeChipIndex=-1,this.activeItemIndex=-1,this.textInputRef.value),e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),V(this),this.cancelable.add(this.filterItems)}async load(){this.listenOn(document,"click",this.documentClickHandler),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!==W))&&this.reposition(!0),(e.has("selectionMode")||e.has("scale")||e.has("selectionAppearance"))&&this.updateItems(),e.has("flipPlacements")&&this.flipPlacementsHandler()}loaded(){V(this),this.updateItems(),this.filterItems(this.filterText,!1,!1)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),ve(this)}emitComboboxChange(){this.calciteComboboxChange.emit()}filterTextChange(e){this.updateActiveItemIndex(-1),this.filterItems(e,!0)}openHandler(){this.disabled||be(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(){let e=this.previousAllSelected,t=this.allSelected;if(this.previousAllSelected=t,this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,this.selectionDisplay==="fit"&&this.isMulti()){let o=e&&!t;e&&!t&&(this.selectedHiddenChipsCount=0,this.selectedItems.forEach(i=>{let a=this.referenceEl?.querySelector(`#${u.chip(i.guid)}`);a&&this.showChip(a)})),this.updateComplete.then(async()=>{o&&await this.updateComplete,await this.refreshSelectionDisplay(),this.fitFollowUpRefreshPromise&&await this.fitFollowUpRefreshPromise,this.deferFitChipCountRender=!1})}}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.selectionDisplay!=="fit"&&this.allSelected&&this.selectedItems.forEach(t=>{let o=this.referenceEl.querySelector(`#${u.chip(t.guid)}`);o&&this.hideChip(o)}))}updateSelectedItems(){this.selectedItems=this.getOrderedSelectedItems(this.getSelectedItems())}calciteComboboxItemChangeHandler(e){if(this.ignoreSelectedEventsFlag)return;let t=e.target,o=e.composedPath().includes(this.selectAllComboboxItemRef.value);this.selectAllEnabled&&this.handleSelectAll(o);let i=this.keyboardNavItems.indexOf(o?this.selectAllComboboxItemRef.value:t);this.updateActiveItemIndex(i),this.toggleSelection(t,t.selected)}calciteInternalComboboxItemChangeHandler(e){e.stopPropagation(),this.hasUpdated&&this.updateItems()}clearValue(){let e=this.items.filter(t=>t.selected&&!t.disabled);e.length&&(this.ignoreSelectedEventsFlag=!0,e.forEach(t=>t.selected=!1),this.ignoreSelectedEventsFlag=!1,this.updateSelectedItems(),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):void 0}getValue(){let e=this.getOrderedSelectedValues(this.selectedItems.map(t=>t.value?.toString()));return e.length?e.length>1?e:e[0]:""}getOrderedSelectedValues(e){if(!this.isMulti())return e;let t=Array.isArray(this.value)?this.value:this.value?[this.value]:[];return Oe(e,t)}getOrderedSelectedItems(e){return this.isMulti()?X(e,this.selectedItems):e}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.updateSelectedItems(),this.emitComboboxChange()}hasHiddenSelectedFitChips(){if(this.selectionDisplay!=="fit"||!this.isMulti())return!1;let e=this.selectedChipCountRef.value;return!!e&&!e.classList.contains(r.chipInvisible)}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.keyboardNavItems.length&&(this.open=!0,this.ensureRecentSelectedItemIsActive()),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":if(this.open){this.open=!1,e.preventDefault();break}this.clearDisabled||(this.textInputRef.value.value.length>0?(this.resetText(),e.preventDefault()):this.selectedItems.length>0&&this.selectionMode!=="single-persist"&&(this.clearValue(),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":{let i=this.hasHiddenSelectedFitChips()&&this.activeChipIndex===-1;if(this.selectionDisplay==="single"||i)return;let c=e.composedPath().find(q);this.activeChipIndex>-1&&c?(e.preventDefault(),this.removeActiveChip(c)):!this.filterText&&this.isMulti()&&(e.preventDefault(),this.removeLastChip());break}}}onBeforeOpen(){this.topLayer.show(),this.reposition(),this.calciteComboboxBeforeOpen.emit(),setTimeout(()=>this.scrollToActiveOrSelectedItem(this.activeItemIndex<0),0)}onOpen(){this.calciteComboboxOpen.emit()}onBeforeClose(){this.calciteComboboxBeforeClose.emit()}onClose(){this.calciteComboboxClose.emit(),Se(this),this.topLayer.hide()}async setMaxScrollerHeight(){let{listContainerEl:e,open:t,referenceEl:o}=this;if(!e||!t||!o)return;let i=this.getMaxScrollerHeight();e.style.maxBlockSize=i>0?`${i}px`:"",e.style.inlineSize=`${o.clientWidth}px`}calciteChipCloseHandler(e){this.open=!1;let t=this.items.find(o=>o===e);t&&this.toggleSelection(t,!1),this.calciteComboboxChipClose.emit()}clickHandler(e){if(this.readOnly)return;let t=e.composedPath();if(t.some(i=>q(i))){this.open=!1,e.preventDefault();return}let o=this.clearButtonRef.value;if(o&&t.includes(o)){this.clearValue(),e.preventDefault();return}this.open=!this.open,this.ensureRecentSelectedItemIsActive()}ensureRecentSelectedItemIsActive(){let{activeItemIndex:e,selectedItems:t,keyboardNavItems:o}=this;if(e>-1&&o[e]){this.updateActiveItemIndex(e);return}let i=t[t.length-1],a=i?o.indexOf(i):o.length?0:-1;this.updateActiveItemIndex(a>-1?a:o.length?0:-1)}hideChip(e){e.classList.add(r.chipInvisible)}showChip(e){e.classList.remove(r.chipInvisible)}refreshChipDisplay({chipEls:e,availableHorizontalChipElSpace:t,chipContainerElGap:o,hideSelectedChips:i}){let a=e.filter(d=>d.selected),c=a.filter(d=>!d.disabled),l=a.filter(d=>d.disabled),n=d=>{let f=w(d),h=d.getBoundingClientRect().width;return Number.isFinite(f)&&f>0?f:h};if(a.forEach(d=>n(d)),e.forEach(d=>{this.hideChip(d)}),i)return;let s=d=>{let f=0;return d.forEach(h=>{let b=n(h);b&&b<=t&&(t-=b+o,this.showChip(h),f++)}),f};s(c)<=1&&s(l)}async refreshSelectionDisplay(e=!0){if(this.refreshingSelectionDisplay)return;if(this.refreshingSelectionDisplay=!0,await this.componentOnReady(),R(this.selectionMode)){this.refreshingSelectionDisplay=!1;return}let{allSelectedIndicatorChipRef:t,chipContainerEl:o,selectionDisplay:i,placeholder:a,selectedIndicatorChipRef:c,textInputRef:l}=this;if(!l.value||!o){this.refreshingSelectionDisplay=!1;return}let n=parseInt(getComputedStyle(o).gap,10),s=w(o),{fontSize:C,fontFamily:d,minInlineSize:f}=getComputedStyle(l.value),h=.55,b=parseFloat(f)||parseInt(O,10),g=P(a,`${C} ${d}`),L=g>0?g:Math.max(b,Math.round((a?.length||0)*(parseFloat(C)||parseInt(O,10))*h)),$=Math.max(b,L),D=(i==="fit"?$:L)+n,Be=w(t.value),Q=w(c.value),Ge=Math.max(Be,Q);if(this.setCompactSelectionDisplay({chipContainerElGap:n,chipContainerElWidth:s,inputWidth:D,largestSelectedIndicatorChipWidth:Ge}),i!=="fit"&&this.allSelected&&this.selectAllEnabled&&this.selectedItems.forEach(y=>{let I=this.referenceEl?.querySelector(`#${u.chip(y.guid)}`);I&&this.hideChip(I)}),this.indeterminate&&this.selectedItems.forEach(y=>{let I=this.referenceEl?.querySelector(`#${u.chip(y.guid)}`);I&&this.showChip(I)}),i==="fit"){let y=Array.from(this.renderRoot.querySelectorAll("calcite-chip")).filter(K=>{let ee=K.value,Ae=ee!=null&&`${ee}`!="";return K.disabled||Ae}),{hiddenChipIndicatorWidth:I,hideSelectedChips:J,reservedPlaceholderInputWidth:Ye}=this.getFitCompactDisplayState({chipContainerElGap:n,chipContainerElWidth:s,inputMinWidth:b,placeholderWidth:L,selectedIndicatorChipElWidth:Q});this.fitUsingCompactCountLabel=J;let $e=Math.round(s-(I+n+Ye+n));this.refreshChipDisplay({availableHorizontalChipElSpace:$e,chipContainerElGap:n,chipEls:y,hideSelectedChips:J});let De=this.selectedHiddenChipsCount;this.syncChipVisibilityCounts(y),De!==this.selectedHiddenChipsCount&&e&&(this.fitFollowUpRefreshPromise=this.updateComplete.then(()=>this.refreshSelectionDisplay(!1)).then(()=>{this.fitFollowUpRefreshPromise=void 0}))}this.refreshingSelectionDisplay=!1}setFloatingEl(e){this.floatingEl=e,V(this)}shouldUseFitCompactDisplay({chipContainerElGap:e,chipContainerElWidth:t,hiddenChipIndicatorWidth:o,inputMinWidth:i,placeholderWidth:a,reservedPlaceholderInputWidth:c}){let l=Math.round(t-(o+e+c+e));return a>i*2&&l<=0}getFitCompactDisplayState({chipContainerElGap:e,chipContainerElWidth:t,inputMinWidth:o,placeholderWidth:i,selectedIndicatorChipElWidth:a}){let c=w(this.selectedChipCountRef.value),l=this.deferFitChipCountRender||this.selectedHiddenChipsCount<=0?0:c||a,n=Math.max(o,i),s=this.shouldUseFitCompactDisplay({chipContainerElGap:e,chipContainerElWidth:t,hiddenChipIndicatorWidth:l,inputMinWidth:o,placeholderWidth:i,reservedPlaceholderInputWidth:n});return{hiddenChipIndicatorWidth:l,hideSelectedChips:s,reservedPlaceholderInputWidth:n}}setCompactSelectionDisplay({chipContainerElGap:e,chipContainerElWidth:t,inputWidth:o,largestSelectedIndicatorChipWidth:i}){let a=Math.round(i+e+o);(!this.maxCompactBreakpoint||this.maxCompactBreakpoint<a)&&(this.maxCompactBreakpoint=a),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,V(this)}syncChipVisibilityCounts(e){let t=0,o=0;e.forEach(a=>{a.selected&&(o++,a.classList.contains(r.chipInvisible)||t++)}),t!==this.selectedVisibleChipsCount&&(this.selectedVisibleChipsCount=t);let i=Math.max(0,o-t);i!==this.selectedHiddenChipsCount&&(this.selectedHiddenChipsCount=i)}getMaxScrollerHeight(){let t=this.getItemsAndGroups(!0).filter(c=>!T(c)),{maxItems:o}=this,i=0,a=0;return t.length>=o&&t.forEach(c=>{if(i<o){let l=this.calculateScrollerHeight(c);a+=l,i+=1}}),a}calculateScrollerHeight(e){if(!e)return 0;let t=e.getBoundingClientRect().height,o=`:scope > ${B}, :scope > ${G}`,i=Array.from(e.querySelectorAll(o)).reduce((a,c)=>a+c.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(`${B}, ${G}`)):[...this.groupItems,...this.items]}toggleSelection(e,t){!e||this.selectionMode==="single-persist"&&e.selected&&e.value===this.value&&!t||(this.selectionDisplay==="fit"&&this.isMulti()&&(this.deferFitChipCountRender=!0),this.isMulti()?this.handleMultiSelection(e,t):this.handleSingleSelection(e,t))}handleMultiSelection(e,t){e.selected=t,this.updateAncestors(e),this.updateSelectedItems(),this.emitComboboxChange(),this.resetText(),this.filterItems("")}handleSingleSelection(e,t){this.ignoreSelectedEventsFlag=!0,this.items.forEach(o=>o.selected=o===e?t:!1),this.ignoreSelectedEventsFlag=!1,this.updateSelectedItems(),this.emitComboboxChange(),this.textInputRef.value&&(this.textInputRef.value.value=k(e)),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")}updateAncestors(e){if(this.selectionMode!=="ancestors")return;let t=Z(e),o=ke(e);e.selected?t.forEach(i=>{i.disabled||(i.selected=!0)}):([...o].forEach(i=>{i.disabled||(i.selected=!1)}),[...t].forEach(i=>{Y(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.updateSelectedItems(),this.previousAllSelected=this.allSelected}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,o)=>{t===0&&(e.afterEmptyGroup=!1);let i=o[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(B)).filter(o=>e||!o.disabled)}getGroupItems(){return Array.from(this.el.querySelectorAll(G))}addCustomChip(e,t){let o=this.items.find(i=>i.heading===e);if(o)this.toggleSelection(o,!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&&!t.disabled&&`${u.chip(t.guid)}`===e.id&&this.toggleSelection(t,!1),this.setFocus()}removeLastChip(){let e=this.selectedItems.findLast(t=>!t.disabled);e&&(this.toggleSelection(e,!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,ne(this.textInputRef.value)):(this.activeChipIndex=t,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){let e=this.selectedItems[this.activeChipIndex]?.guid;(e?this.referenceEl?.querySelector(`#${u.chip(e)}`):void 0)?.setFocus()}scrollToActiveOrSelectedItem(e=!1){let t=e&&this.selectedItems?.length?this.selectedItems[0]:this.keyboardNavItems[this.activeItemIndex],o=this.listContainerEl;if(!t||!o)return;t.scrollIntoView({block:"nearest"});let a=this.selectAllComboboxItemRef.value?.offsetHeight||0,c=t.getBoundingClientRect(),l=o.getBoundingClientRect();c.top<l.top+a&&(o.scrollTop-=l.top+a-c.top)}shiftActiveItemIndex(e){let{length:t}=this.keyboardNavItems,o=(this.activeItemIndex+t+e)%t;this.updateActiveItemIndex(o),this.scrollToActiveOrSelectedItem()}updateActiveItemIndex(e){this.activeItemIndex=e;let t="";this.keyboardNavItems.forEach((o,i)=>{i===e?(o.active=!0,t=`${u.item(o.guid)}`):o.active=!1}),this.activeDescendant=t,this.activeItemIndex>-1&&(this.activeChipIndex=-1)}isMulti(){return!R(this.selectionMode)}comboboxFocusHandler(){this.disabled||(this.activeChipIndex=-1,this.textInputRef.value?.focus(),this.open&&this.selectionDisplay==="fit"&&this.isMulti()&&this.refreshSelectionDisplay())}createScreenReaderItem({ariaLabel:e,ariaSelected:t,id:o,textContent:i}){return x`<li aria-label=${e??m} aria-selected=${t??m} id=${o??m} role=option tabindex=-1>${i}</li>`}handleSelectionModeWarning(){}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?[...[...Z(e)].reverse(),e].map(i=>k(i)).join(" / "):k(e)}renderChip({activeChipIndex:e,disabled:t,index:o,item:i,messages:a,readOnly:c,scale:l,isAncestors:n}){let s=this.getChipLabel(i,n);return H(i.guid||i.value||s,x`<calcite-chip .appearance=${c?"outline":"solid"} class=${p({[r.chip]:!0,[r.disabled]:t})} .closable=${!t&&!c} data-testid=${`${t?"disabled-chip":"chip"}-${o}`} .disabled=${t} .icon=${i.icon} .iconFlipRtl=${i.iconFlipRtl} id=${(!t&&i.guid?`${u.chip(i.guid)}`:void 0)??m} .label=${s} .messageOverrides=${t?void 0:{dismissLabel:a.removeTag.replace("{value}",`${s}`)}} @calciteChipClose=${t?void 0:()=>this.calciteChipCloseHandler(i)} @focusin=${t?void 0:()=>this.activeChipIndex=o} .scale=${l} .selected=${i.selected} .tabIndex=${!t&&e===o?0:-1} title=${s??m} .value=${i.value}>${s}</calcite-chip>`)}renderChipCount(e,t){let o=this.fitUsingCompactCountLabel?`${e}`:this.messages.disabledSelectedCount.replace("{count}",`${e}`)??`+${e}`;return x`<calcite-chip appearance=solid class=${p({[r.chip]:!0})} data-testid=selected-chip-count id=selected-chip-count .label=${o} .scale=${t} tabindex=-1 title=${o??m} ${S(this.selectedChipCountRef)}>${o}</calcite-chip>`}renderChips(){let{activeChipIndex:e,readOnly:t,scale:o,selectionDisplay:i,selectionMode:a,messages:c}=this,l=[],n=a==="ancestors",s=this.selectAllEnabled&&this.allSelected,C=i==="all";if(s)return null;let d=0,f=0;if(C){let h=this.allItems.filter(g=>g.selected&&(!n||!Y(g)));X(h,this.selectedItems).forEach(g=>{if(g.disabled){l.push(this.renderChip({activeChipIndex:e,disabled:!0,index:f++,item:g,messages:c,readOnly:t,scale:o,isAncestors:n}));return}l.push(this.renderChip({activeChipIndex:e,disabled:!1,index:d++,item:g,messages:c,readOnly:t,scale:o,isAncestors:n}))})}else s||this.selectedItems.forEach(h=>{l.push(this.renderChip({activeChipIndex:e,disabled:h.disabled,index:d++,item:h,messages:c,readOnly:t,scale:o,isAncestors:n}))});if(i==="fit"){let h=this.selectedHiddenChipsCount,b=this.selectedVisibleChipsCount===0?this.selectedItems.length:h;h>0&&!this.deferFitChipCountRender&&l.push(this.renderChipCount(b,o))}return l.length?l:null}renderAllSelectedIndicatorChip(){let{allSelectedIndicatorChipRef:e,compactSelectionDisplay:t,scale:o,selectedVisibleChipsCount:i}=this,a=!1;if(this.selectionDisplay==="fit"&&this.textInputRef.value&&this.chipContainerEl){let s=parseInt(getComputedStyle(this.chipContainerEl).gap,10),C=w(this.chipContainerEl),{fontSize:d,fontFamily:f,minInlineSize:h}=getComputedStyle(this.textInputRef.value),b=.55,g=parseFloat(h)||parseInt(O,10),L=P(this.placeholder,`${d} ${f}`),$=L>0?L:Math.max(g,Math.round((this.placeholder?.length||0)*(parseFloat(d)||parseInt(O,10))*b)),D=w(this.selectedIndicatorChipRef.value);a=this.getFitCompactDisplayState({chipContainerElGap:s,chipContainerElWidth:C,inputMinWidth:g,placeholderWidth:$,selectedIndicatorChipElWidth:D}).hideSelectedChips}let l=t||a?this.messages.all:this.messages.allSelected,n=this.allSelected&&(this.selectionDisplay==="single"||!i||this.selectionDisplay==="all");return x`<calcite-chip class=${p({[r.chip]:!0,[r.chipInvisible]:!n,[r.allSelected]:!0})} data-testid=all-selected-indicator-chip .label=${l} .scale=${o} title=${l??m} value ${S(e)}>${l}</calcite-chip>`}renderSelectedIndicatorChip(){let{compactSelectionDisplay:e,selectionDisplay:t,scale:o,selectedIndicatorChipRef:i}=this,a=!1,c,l=this.getSelectedItems().length;return e?a=!0:t==="single"&&(this.allSelected?a=!0:l>0?a=!1:a=!0,c=`${l} ${this.messages.selected}`),x`<calcite-chip class=${p({[r.chip]:!0,[r.chipInvisible]:a})} .label=${c} .scale=${o} title=${c??m} value ${S(i)}>${c}</calcite-chip>`}renderSelectedIndicatorChipCompact(){let{compactSelectionDisplay:e,selectionDisplay:t,scale:o}=this,i=!1,a,c=this.getSelectedItems().length;return e?this.allSelected?i=!0:t==="single"&&(i=!(c>0),a=`${c}`):i=!0,x`<calcite-chip class=${p({[r.chip]:!0,[r.chipInvisible]:i})} .label=${a} .scale=${o} title=${a??m} value>${a}</calcite-chip>`}renderInput(){let{guid:e,disabled:t,placeholder:o,selectionMode:i,selectedItems:a,open:c}=this,l=R(i),n=a[0],s=!c&&l&&!!n&&!this.filterText;return x`<span class=${p({[r.inputWrap]:!0,[r.inputWrapSingle]:l})}>${s&&H("label",x`<span class=${p({[r.label]:!0,[r.labelIcon]:!!n?.icon})}>${k(n)}</span>`)||""}${H("input",x`<input aria-activedescendant=${this.activeDescendant??m} aria-controls=${`${u.listbox(e)}`} aria-errormessage=${u.validationMessage} aria-owns=${`${u.listbox(e)}`} aria-autocomplete=list .ariaDescription=${this.getDescriptionMessage()} .ariaExpanded=${c} aria-haspopup=listbox .ariaInvalid=${this.status==="invalid"} .ariaLabel=${we(this)} class=${p({[r.input]:!0,[r.inputSingle]:!0,[r.inputHidden]:s,[r.inputIcon]:this.showingInlineIcon&&!!this.placeholderIcon})} data-testid=input .disabled=${t} .id=${`${u.input(e)}`} @focus=${this.comboboxFocusHandler} @input=${this.inputHandler} placeholder=${o??m} .readOnly=${this.readOnly} .required=${this.required} role=combobox .tabIndex=${this.activeChipIndex===-1?0:-1} type=text .value=${oe(this.filterText??"")} ${S(this.textInputRef)}>`)}</span>`}renderListBoxOptions(){let e=this.keyboardNavItems.map(t=>this.createScreenReaderItem({ariaLabel:t.label,ariaSelected:t.selected,id:`${u.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:o,open:i,scale:a}=this,c={[r.listContainer]:!0,[U.animation]:!0,[U.animationActive]:i},l=(this.filterText&&e.add.replace("{text}",`${this.filterText}`))??"";return x`<div aria-hidden=true class=${p(r.floatingUIContainer)} popover=manual ${S(t)}><div class=${p(c)} ${S(o)}><ul class=${p({[r.list]:!0,[r.listHide]:!i})}>${this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"&&x`<calcite-combobox-item class=${p(r.selectAll)} data-testid=select-all-item .heading=${e.selectAll} .id=${`${this.guid}-select-all-enabled-interactive`} .indeterminate=${this.indeterminate} .label=${e.selectAll} .scale=${a} .selected=${this.allSelected} tabindex=-1 value=select-all ${S(this.selectAllComboboxItemRef)}></calcite-combobox-item>`||""}<slot></slot>${this.noMatchesFound&&(this.allowCustomValues?x`<li aria-label=${l??m} class=${p(r.noMatches)} @click=${this.customChipAddHandler} role=option tabindex=0>${ye({text:l,pattern:new RegExp(`(${N(this.filterText)})`,"i")})}</li>`:x`<li class=${p({[r.noMatchesPlaceholder]:!0,[r.noMatches]:!0})}>${e.noMatches}</li>`)||""}</ul></div></div>`}renderSelectedOrPlaceholderIcon(){let{open:e,placeholderIcon:t,placeholderIconFlipRtl:o,selectedItems:i}=this,a=i[0],c=a?.icon,l=t&&(e||!a);return this.showingInlineIcon&&H("selected-placeholder-icon",x`<span class=${p(r.iconStart)}><calcite-icon class=${p({[r.selectedIcon]:!l,[r.placeholderIcon]:l})} .flipRtl=${l?o:a.iconFlipRtl} .icon=${l?t:c} .scale=${E(this.scale)}></calcite-icon></span>`)||""}renderChevronIcon(){let{open:e}=this;return H("chevron",x`<span class=${p(r.iconEnd)}><calcite-icon class=${p(r.icon)} .icon=${e?_.chevronUp:_.chevronDown} .scale=${E(this.scale)}></calcite-icon></span>`)}render(){let{selectionDisplay:e,guid:t,label:o,open:i,readOnly:a}=this,c=R(this.selectionMode),l=e==="all",n=e==="single",s=!c&&e==="fit",C=!c&&!l,d=C&&!s,f=this.items.some(b=>b.selected&&!b.disabled),h=!this.clearDisabled&&this.selectionMode!=="single-persist"&&!!this.value?.length&&f;return this.interactiveContainer({disabled:this.disabled,children:x`${this.labelText&&Ie({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div aria-live=polite class=${p({[r.wrapper]:!0,[r.wrapperSingle]:c||!this.selectedItems.length,[r.wrapperActive]:i})} @click=${this.clickHandler} @keydown=${this.keyDownHandler} ${S(this.setReferenceEl)}>${this.renderSelectedOrPlaceholderIcon()}${H("grid",x`<div class=${p({[r.gridInput]:!0,[r.selectionDisplayFit]:s,[r.selectionDisplaySingle]:n})} ${S(this.setChipContainerEl)}>${!c&&!n&&this.renderChips()||""}${!c&&!n&&this.selectAllEnabled&&l&&this.renderAllSelectedIndicatorChip()||""}${d&&this.renderSelectedIndicatorChip()||""}${d&&this.renderSelectedIndicatorChipCompact()||""}${C&&this.renderAllSelectedIndicatorChip()||""}<label class=${p(A.screenReaderText)} .htmlFor=${`${u.input(t)}`} .id=${`${u.label(t)}`}>${o}</label>${this.renderInput()}</div>`)}${!a&&h?Ve({ariaLabel:this.messages.clear,disabled:this.disabled,ref:this.clearButtonRef,scale:this.scale,title:this.messages.clear}):null}${!a&&this.renderChevronIcon()||""}</div><ul aria-labelledby=${`${u.label(t)}`} aria-multiselectable=true class=${p(A.screenReaderText)} .id=${`${u.listbox(t)}`} role=listbox tabindex=-1>${this.renderListBoxOptions()}</ul>${this.renderFloatingUIContainer()}${this.validationMessage&&this.status==="invalid"?Me({icon:this.validationIcon,id:u.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}};le("calcite-combobox",j);export{j as Combobox};
|
|
2
|
+
import{a as Ve}from"./QEAQHUU5.js";import{a as Re}from"./IJGLEN77.js";import{b as Z,c as ke,d as Y,f as R,g as k,h as X,i as Oe}from"./M4XG6CGT.js";import{a as B,b as G,d as r,e as u,f as _}from"./LPMYRCBM.js";import{d as q}from"./C4WP5EBM.js";import{a as Me}from"./S3KI2KML.js";import{b as N}from"./QSMCHMHV.js";import{a as Ie}from"./NPB47ODT.js";import{c as He}from"./5QPGH3VE.js";import{a as we}from"./DKJI4BME.js";import{a as Le}from"./HL2P2LHA.js";import{a as me}from"./NJB26RSN.js";import{a as ye}from"./2WL5RWTS.js";import{a as W,c as U,d as Ce,e as ge,f as Se,g as V,h as ve}from"./AXJPT3JP.js";import{a as be}from"./SAZM37N6.js";import{a as he}from"./NGZS5LXK.js";import{a as ue}from"./W4WNNUUC.js";import{a as H}from"./G6EK753X.js";import{a as fe}from"./BKAUO5NQ.js";import{a as xe}from"./3XS7XZAX.js";import{a as pe}from"./T6CCMW7H.js";import{a as z,b as F}from"./VI7SBYXT.js";import{a as de}from"./MG5KEVZ3.js";import"./VUYX7MNO.js";import{a as se}from"./APMXUV5R.js";import{a as E,b as T}from"./ZWPNZ5XW.js";import{e as re}from"./6NAQTGPW.js";import"./LGO3TCAO.js";import{i as w,l as P,p as ne}from"./7FW2RVVH.js";import{D as oe,E as M,F as S,G as ie,H as p,L as ae,M as A,N as ce,T as le,g as te,h as x,l as m,p as v}from"./PA2BHIBQ.js";var O="48px";var ze=te`: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;--calcite-internal-combobox-max-block-size: 45vh}: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{outline-color:transparent;display:flex;border-width:var(--calcite-border-width-sm);border-style:solid;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);border-radius:var(--calcite-combobox-corner-radius, var(--calcite-corner-radius));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(-1 * var(--calcite-space-base) * (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(-1 * var(--calcite-spacing-base) * (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{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;position:relative;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{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;appearance:none;background-color:transparent;border-style:none;flex-grow:1;font-family:inherit;color:var(--calcite-color-text-1);padding:0;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:var(--calcite-border-width-md) solid transparent;outline-offset:var(--calcite-border-width-md)}.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;inline-size:0;min-inline-size:0;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{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;max-inline-size:100%;flex:1 1 auto;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}}.floating-ui-container .calcite-floating-ui-anim{box-shadow:var(--calcite-shadow-md)}@media(forced-colors:active){.wrapper,.floating-ui-container{border:1px solid canvasText}}.list-container{max-block-size:var(--calcite-internal-combobox-max-block-size);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{block-size:0;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{position:absolute;visibility:hidden}.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-clear-button-background-color));--calcite-action-text-color-press: var(--calcite-clear-button-icon-color-press)}:host([scale=s]) .clear-button--container{padding:var(--calcite-space-2xs)}:host([scale=m]) .clear-button--container{padding:var(--calcite-space-2xs);padding-inline-end:var(--calcite-space-sm)}:host([scale=l]) .clear-button--container{padding-inline-end:var(--calcite-space-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}: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))}`,j=class extends ie{constructor(){super(),this.direction=re(),this.formSupport=He({inputType:"text"})(this),this.selectAllComboboxItemRef=M(),this.allSelectedIndicatorChipRef=M(),this.data=[],this.cancelable=fe()(this),this.filterItems=(()=>{let e=(t,o)=>t&&o.some(({el:i})=>t===i);return xe((t,o=!1,i=!0)=>{let a=Re([...this.data,...this.groupData],t,this.effectiveFilterProps),c=this.getItemsAndGroups(),l=t==="";c.forEach(n=>{if(l){n.itemHidden=!1;return}let s=!e(n,a);n.itemHidden=s;let[C,d]=n.ancestors;(e(C,a)||e(d,a))&&(n.itemHidden=!1),s||n.ancestors.forEach(f=>f.itemHidden=!1)}),this.noMatchesFound=this.filteredItems.length===0&&!!this.filterText,this.filterTextMatchPattern=this.filterText?new RegExp(`(${N(this.filterText)})`,"i"):void 0,this.keyboardNavItems.forEach(n=>{n.filterTextMatchPattern=this.filterTextMatchPattern}),o&&(this.open=this.filterText.trim().length>0),i&&this.calciteComboboxFilterChange.emit()},ce.filter)})(),this._filterText="",this.getSelectedItems=()=>{if(!this.isMulti()){let e=this.allItems.find(({selected:t})=>t);return e?[e]:[]}return this.allItems.filter(e=>e.selected&&(this.selectionMode!=="ancestors"||!Y(e)))},this.groupData=[],this.groupItems=[],this.guid=pe(),this.ignoreSelectedEventsFlag=!1,this.internalValueChangeFlag=!1,this.previousAllSelected=!1,this.refreshingSelectionDisplay=!1,this.mutationObserver=z("mutation",()=>this.updateItems()),this.onLabelClick=()=>{this.setFocus()},this.transitionProp="opacity",this.resizeObserver=(()=>{let e=!1;return z("resize",()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1,this.setMaxScrollerHeight(),this.refreshSelectionDisplay()}))})})(),this.selectedIndicatorChipRef=M(),this.selectedChipCountRef=M(),this.clearButtonRef=M(),this._selectedItems=[],this.textInputRef=M(),this._value="",this.messages=de({blocking:!0}),this.focusSetter=se()(this),this.customChipAddHandler=()=>{this.addCustomChip(this.filterText,!0)},this.interactiveContainer=ue(this),this.topLayer=me({target:()=>this.floatingEl})(this),this.activeChipIndex=-1,this.activeDescendant="",this.activeItemIndex=-1,this.compactSelectionDisplay=!1,this.deferFitChipCountRender=!1,this.selectedHiddenChipsCount=0,this.selectedVisibleChipsCount=0,this.fitUsingCompactCountLabel=!1,this.allItems=[],this.items=[],this.noMatchesFound=!1,this.clearDisabled=!1,this.disabled=!1,this.maxItems=0,this.open=!1,this.overlayPositioning="absolute",this.placeholderIconFlipRtl=!1,this.placement=W,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=v({cancelable:!1}),this.calciteComboboxBeforeOpen=v({cancelable:!1}),this.calciteComboboxChange=v({cancelable:!1}),this.calciteComboboxChipClose=v({cancelable:!1}),this.calciteComboboxClose=v({cancelable:!1}),this.calciteComboboxFilterChange=v({cancelable:!1}),this.calciteComboboxOpen=v({cancelable:!1}),Le(this),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}],deferFitChipCountRender:[16,{},{state:!0}],selectedHiddenChipsCount:[16,{},{state:!0}],selectedVisibleChipsCount:[16,{},{state:!0}],fitUsingCompactCountLabel:[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,{},{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:ae},{reflect:!0}],validationMessage:1,validity:[32,{},{readOnly:!0,attribute:!1}],value:1}}static{this.formAssociated=!0}static{this.styles=[ze,he]}get effectiveFilterProps(){return this.filterProps?this.filterProps.filter(e=>e!=="el"):["description","label","metadata","shortHeading"]}get showingInlineIcon(){let{placeholderIcon:e,selectionMode:t,selectedItems:o,open:i}=this,a=o[0],c=a?.icon,l=R(t);return!i&&a?!!c&&l:!!e&&(!a||l)}get allSelected(){let e=this.allItems.filter(t=>!t.disabled);return e.length>0&&e.every(t=>t.selected)}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(o=>!o.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=>!T(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:o,placement:i,overlayPositioning:a,filteredFlipPlacements:c}=this;return ge(this,{direction:this.direction,floatingEl:t,referenceEl:o,overlayPositioning:a,placement:i,flipPlacements:c,type:"menu"},e)}async setFocus(e){return this.focusSetter(()=>(this.activeChipIndex=-1,this.activeItemIndex=-1,this.textInputRef.value),e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),V(this),this.cancelable.add(this.filterItems)}async load(){this.listenOn(document,"click",this.documentClickHandler),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!==W))&&this.reposition(!0),(e.has("selectionMode")||e.has("scale")||e.has("selectionAppearance"))&&this.updateItems(),e.has("flipPlacements")&&this.flipPlacementsHandler()}loaded(){V(this),this.updateItems(),this.filterItems(this.filterText,!1,!1)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),ve(this)}emitComboboxChange(){this.calciteComboboxChange.emit()}filterTextChange(e){this.updateActiveItemIndex(-1),this.filterItems(e,!0)}openHandler(){this.disabled||be(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(){let e=this.previousAllSelected,t=this.allSelected;if(this.previousAllSelected=t,this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,this.selectionDisplay==="fit"&&this.isMulti()){let o=e&&!t;e&&!t&&(this.selectedHiddenChipsCount=0,this.selectedItems.forEach(i=>{let a=this.referenceEl?.querySelector(`#${u.chip(i.guid)}`);a&&this.showChip(a)})),this.updateComplete.then(async()=>{o&&await this.updateComplete,await this.refreshSelectionDisplay(),this.fitFollowUpRefreshPromise&&await this.fitFollowUpRefreshPromise,this.deferFitChipCountRender=!1})}}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.selectionDisplay!=="fit"&&this.allSelected&&this.selectedItems.forEach(t=>{let o=this.referenceEl.querySelector(`#${u.chip(t.guid)}`);o&&this.hideChip(o)}))}updateSelectedItems(){this.selectedItems=this.getOrderedSelectedItems(this.getSelectedItems())}calciteComboboxItemChangeHandler(e){if(this.ignoreSelectedEventsFlag)return;let t=e.target,o=e.composedPath().includes(this.selectAllComboboxItemRef.value);this.selectAllEnabled&&this.handleSelectAll(o);let i=this.keyboardNavItems.indexOf(o?this.selectAllComboboxItemRef.value:t);this.updateActiveItemIndex(i),this.toggleSelection(t,t.selected)}calciteInternalComboboxItemChangeHandler(e){e.stopPropagation(),this.hasUpdated&&this.updateItems()}clearValue(){let e=this.items.filter(t=>t.selected&&!t.disabled);e.length&&(this.ignoreSelectedEventsFlag=!0,e.forEach(t=>t.selected=!1),this.ignoreSelectedEventsFlag=!1,this.updateSelectedItems(),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):void 0}getValue(){let e=this.getOrderedSelectedValues(this.selectedItems.map(t=>t.value?.toString()));return e.length?e.length>1?e:e[0]:""}getOrderedSelectedValues(e){if(!this.isMulti())return e;let t=Array.isArray(this.value)?this.value:this.value?[this.value]:[];return Oe(e,t)}getOrderedSelectedItems(e){return this.isMulti()?X(e,this.selectedItems):e}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.updateSelectedItems(),this.emitComboboxChange()}hasHiddenSelectedFitChips(){if(this.selectionDisplay!=="fit"||!this.isMulti())return!1;let e=this.selectedChipCountRef.value;return!!e&&!e.classList.contains(r.chipInvisible)}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.keyboardNavItems.length&&(this.open=!0,this.ensureRecentSelectedItemIsActive()),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":if(this.open){this.open=!1,e.preventDefault();break}this.clearDisabled||(this.textInputRef.value.value.length>0?(this.resetText(),e.preventDefault()):this.selectedItems.length>0&&this.selectionMode!=="single-persist"&&(this.clearValue(),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":{let i=this.hasHiddenSelectedFitChips()&&this.activeChipIndex===-1;if(this.selectionDisplay==="single"||i)return;let c=e.composedPath().find(q);this.activeChipIndex>-1&&c?(e.preventDefault(),this.removeActiveChip(c)):!this.filterText&&this.isMulti()&&(e.preventDefault(),this.removeLastChip());break}}}onBeforeOpen(){this.topLayer.show(),this.reposition(),this.calciteComboboxBeforeOpen.emit(),setTimeout(()=>this.scrollToActiveOrSelectedItem(this.activeItemIndex<0),0)}onOpen(){this.calciteComboboxOpen.emit()}onBeforeClose(){this.calciteComboboxBeforeClose.emit()}onClose(){this.calciteComboboxClose.emit(),Se(this),this.topLayer.hide()}async setMaxScrollerHeight(){let{listContainerEl:e,open:t,referenceEl:o}=this;if(!e||!t||!o)return;let i=this.getMaxScrollerHeight();e.style.maxBlockSize=i>0?`${i}px`:"",e.style.inlineSize=`${o.clientWidth}px`}calciteChipCloseHandler(e){this.open=!1;let t=this.items.find(o=>o===e);t&&this.toggleSelection(t,!1),this.calciteComboboxChipClose.emit()}clickHandler(e){if(this.readOnly)return;let t=e.composedPath();if(t.some(i=>q(i))){this.open=!1,e.preventDefault();return}let o=this.clearButtonRef.value;if(o&&t.includes(o)){this.clearValue(),e.preventDefault();return}this.open=!this.open,this.ensureRecentSelectedItemIsActive()}ensureRecentSelectedItemIsActive(){let{activeItemIndex:e,selectedItems:t,keyboardNavItems:o}=this;if(e>-1&&o[e]){this.updateActiveItemIndex(e);return}let i=t[t.length-1],a=i?o.indexOf(i):o.length?0:-1;this.updateActiveItemIndex(a>-1?a:o.length?0:-1)}hideChip(e){e.classList.add(r.chipInvisible)}showChip(e){e.classList.remove(r.chipInvisible)}refreshChipDisplay({chipEls:e,availableHorizontalChipElSpace:t,chipContainerElGap:o,hideSelectedChips:i}){let a=e.filter(d=>d.selected),c=a.filter(d=>!d.disabled),l=a.filter(d=>d.disabled),n=d=>{let f=w(d),h=d.getBoundingClientRect().width;return Number.isFinite(f)&&f>0?f:h};if(a.forEach(d=>n(d)),e.forEach(d=>{this.hideChip(d)}),i)return;let s=d=>{let f=0;return d.forEach(h=>{let b=n(h);b&&b<=t&&(t-=b+o,this.showChip(h),f++)}),f};s(c)<=1&&s(l)}async refreshSelectionDisplay(e=!0){if(this.refreshingSelectionDisplay)return;if(this.refreshingSelectionDisplay=!0,await this.componentOnReady(),R(this.selectionMode)){this.refreshingSelectionDisplay=!1;return}let{allSelectedIndicatorChipRef:t,chipContainerEl:o,selectionDisplay:i,placeholder:a,selectedIndicatorChipRef:c,textInputRef:l}=this;if(!l.value||!o){this.refreshingSelectionDisplay=!1;return}let n=parseInt(getComputedStyle(o).gap,10),s=w(o),{fontSize:C,fontFamily:d,minInlineSize:f}=getComputedStyle(l.value),h=.55,b=parseFloat(f)||parseInt(O,10),g=P(a,`${C} ${d}`),L=g>0?g:Math.max(b,Math.round((a?.length||0)*(parseFloat(C)||parseInt(O,10))*h)),$=Math.max(b,L),D=(i==="fit"?$:L)+n,Be=w(t.value),Q=w(c.value),Ge=Math.max(Be,Q);if(this.setCompactSelectionDisplay({chipContainerElGap:n,chipContainerElWidth:s,inputWidth:D,largestSelectedIndicatorChipWidth:Ge}),i!=="fit"&&this.allSelected&&this.selectAllEnabled&&this.selectedItems.forEach(y=>{let I=this.referenceEl?.querySelector(`#${u.chip(y.guid)}`);I&&this.hideChip(I)}),this.indeterminate&&this.selectedItems.forEach(y=>{let I=this.referenceEl?.querySelector(`#${u.chip(y.guid)}`);I&&this.showChip(I)}),i==="fit"){let y=Array.from(this.renderRoot.querySelectorAll("calcite-chip")).filter(K=>{let ee=K.value,Ae=ee!=null&&`${ee}`!="";return K.disabled||Ae}),{hiddenChipIndicatorWidth:I,hideSelectedChips:J,reservedPlaceholderInputWidth:Ye}=this.getFitCompactDisplayState({chipContainerElGap:n,chipContainerElWidth:s,inputMinWidth:b,placeholderWidth:L,selectedIndicatorChipElWidth:Q});this.fitUsingCompactCountLabel=J;let $e=Math.round(s-(I+n+Ye+n));this.refreshChipDisplay({availableHorizontalChipElSpace:$e,chipContainerElGap:n,chipEls:y,hideSelectedChips:J});let De=this.selectedHiddenChipsCount;this.syncChipVisibilityCounts(y),De!==this.selectedHiddenChipsCount&&e&&(this.fitFollowUpRefreshPromise=this.updateComplete.then(()=>this.refreshSelectionDisplay(!1)).then(()=>{this.fitFollowUpRefreshPromise=void 0}))}this.refreshingSelectionDisplay=!1}setFloatingEl(e){this.floatingEl=e,V(this)}shouldUseFitCompactDisplay({chipContainerElGap:e,chipContainerElWidth:t,hiddenChipIndicatorWidth:o,inputMinWidth:i,placeholderWidth:a,reservedPlaceholderInputWidth:c}){let l=Math.round(t-(o+e+c+e));return a>i*2&&l<=0}getFitCompactDisplayState({chipContainerElGap:e,chipContainerElWidth:t,inputMinWidth:o,placeholderWidth:i,selectedIndicatorChipElWidth:a}){let c=w(this.selectedChipCountRef.value),l=this.deferFitChipCountRender||this.selectedHiddenChipsCount<=0?0:c||a,n=Math.max(o,i),s=this.shouldUseFitCompactDisplay({chipContainerElGap:e,chipContainerElWidth:t,hiddenChipIndicatorWidth:l,inputMinWidth:o,placeholderWidth:i,reservedPlaceholderInputWidth:n});return{hiddenChipIndicatorWidth:l,hideSelectedChips:s,reservedPlaceholderInputWidth:n}}setCompactSelectionDisplay({chipContainerElGap:e,chipContainerElWidth:t,inputWidth:o,largestSelectedIndicatorChipWidth:i}){let a=Math.round(i+e+o);(!this.maxCompactBreakpoint||this.maxCompactBreakpoint<a)&&(this.maxCompactBreakpoint=a),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,V(this)}syncChipVisibilityCounts(e){let t=0,o=0;e.forEach(a=>{a.selected&&(o++,a.classList.contains(r.chipInvisible)||t++)}),t!==this.selectedVisibleChipsCount&&(this.selectedVisibleChipsCount=t);let i=Math.max(0,o-t);i!==this.selectedHiddenChipsCount&&(this.selectedHiddenChipsCount=i)}getMaxScrollerHeight(){let t=this.getItemsAndGroups(!0).filter(c=>!T(c)),{maxItems:o}=this,i=0,a=0;return t.length>=o&&t.forEach(c=>{if(i<o){let l=this.calculateScrollerHeight(c);a+=l,i+=1}}),a}calculateScrollerHeight(e){if(!e)return 0;let t=e.getBoundingClientRect().height,o=`:scope > ${B}, :scope > ${G}`,i=Array.from(e.querySelectorAll(o)).reduce((a,c)=>a+c.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(`${B}, ${G}`)):[...this.groupItems,...this.items]}toggleSelection(e,t){!e||this.selectionMode==="single-persist"&&e.selected&&e.value===this.value&&!t||(this.selectionDisplay==="fit"&&this.isMulti()&&(this.deferFitChipCountRender=!0),this.isMulti()?this.handleMultiSelection(e,t):this.handleSingleSelection(e,t))}handleMultiSelection(e,t){e.selected=t,this.updateAncestors(e),this.updateSelectedItems(),this.emitComboboxChange(),this.resetText(),this.filterItems("")}handleSingleSelection(e,t){this.ignoreSelectedEventsFlag=!0,this.items.forEach(o=>o.selected=o===e?t:!1),this.ignoreSelectedEventsFlag=!1,this.updateSelectedItems(),this.emitComboboxChange(),this.textInputRef.value&&(this.textInputRef.value.value=k(e)),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")}updateAncestors(e){if(this.selectionMode!=="ancestors")return;let t=Z(e),o=ke(e);e.selected?t.forEach(i=>{i.disabled||(i.selected=!0)}):([...o].forEach(i=>{i.disabled||(i.selected=!1)}),[...t].forEach(i=>{Y(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.updateSelectedItems(),this.previousAllSelected=this.allSelected}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,o)=>{t===0&&(e.afterEmptyGroup=!1);let i=o[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(B)).filter(o=>e||!o.disabled)}getGroupItems(){return Array.from(this.el.querySelectorAll(G))}addCustomChip(e,t){let o=this.items.find(i=>i.heading===e);if(o)this.toggleSelection(o,!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&&!t.disabled&&`${u.chip(t.guid)}`===e.id&&this.toggleSelection(t,!1),this.setFocus()}removeLastChip(){let e=this.selectedItems.findLast(t=>!t.disabled);e&&(this.toggleSelection(e,!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,ne(this.textInputRef.value)):(this.activeChipIndex=t,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){let e=this.selectedItems[this.activeChipIndex]?.guid;(e?this.referenceEl?.querySelector(`#${u.chip(e)}`):void 0)?.setFocus()}scrollToActiveOrSelectedItem(e=!1){let t=e&&this.selectedItems?.length?this.selectedItems[0]:this.keyboardNavItems[this.activeItemIndex],o=this.listContainerEl;if(!t||!o)return;t.scrollIntoView({block:"nearest"});let a=this.selectAllComboboxItemRef.value?.offsetHeight||0,c=t.getBoundingClientRect(),l=o.getBoundingClientRect();c.top<l.top+a&&(o.scrollTop-=l.top+a-c.top)}shiftActiveItemIndex(e){let{length:t}=this.keyboardNavItems,o=(this.activeItemIndex+t+e)%t;this.updateActiveItemIndex(o),this.scrollToActiveOrSelectedItem()}updateActiveItemIndex(e){this.activeItemIndex=e;let t="";this.keyboardNavItems.forEach((o,i)=>{i===e?(o.active=!0,t=`${u.item(o.guid)}`):o.active=!1}),this.activeDescendant=t,this.activeItemIndex>-1&&(this.activeChipIndex=-1)}isMulti(){return!R(this.selectionMode)}comboboxFocusHandler(){this.disabled||(this.activeChipIndex=-1,this.textInputRef.value?.focus(),this.open&&this.selectionDisplay==="fit"&&this.isMulti()&&this.refreshSelectionDisplay())}createScreenReaderItem({ariaLabel:e,ariaSelected:t,id:o,textContent:i}){return x`<li aria-label=${e??m} aria-selected=${t??m} id=${o??m} role=option tabindex=-1>${i}</li>`}handleSelectionModeWarning(){}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?[...[...Z(e)].reverse(),e].map(i=>k(i)).join(" / "):k(e)}renderChip({activeChipIndex:e,disabled:t,index:o,item:i,messages:a,readOnly:c,scale:l,isAncestors:n}){let s=this.getChipLabel(i,n);return H(i.guid||i.value||s,x`<calcite-chip .appearance=${c?"outline":"solid"} class=${p({[r.chip]:!0,[r.disabled]:t})} .closable=${!t&&!c} data-testid=${`${t?"disabled-chip":"chip"}-${o}`} .disabled=${t} .icon=${i.icon} .iconFlipRtl=${i.iconFlipRtl} id=${(!t&&i.guid?`${u.chip(i.guid)}`:void 0)??m} .label=${s} .messageOverrides=${t?void 0:{dismissLabel:a.removeTag.replace("{value}",`${s}`)}} @calciteChipClose=${t?void 0:()=>this.calciteChipCloseHandler(i)} @focusin=${t?void 0:()=>this.activeChipIndex=o} .scale=${l} .selected=${i.selected} .tabIndex=${!t&&e===o?0:-1} title=${s??m} .value=${i.value}>${s}</calcite-chip>`)}renderChipCount(e,t){let o=this.fitUsingCompactCountLabel?`${e}`:this.messages.disabledSelectedCount.replace("{count}",`${e}`)??`+${e}`;return x`<calcite-chip appearance=solid class=${p({[r.chip]:!0})} data-testid=selected-chip-count id=selected-chip-count .label=${o} .scale=${t} tabindex=-1 title=${o??m} ${S(this.selectedChipCountRef)}>${o}</calcite-chip>`}renderChips(){let{activeChipIndex:e,readOnly:t,scale:o,selectionDisplay:i,selectionMode:a,messages:c}=this,l=[],n=a==="ancestors",s=this.selectAllEnabled&&this.allSelected,C=i==="all";if(s)return null;let d=0,f=0;if(C){let h=this.allItems.filter(g=>g.selected&&(!n||!Y(g)));X(h,this.selectedItems).forEach(g=>{if(g.disabled){l.push(this.renderChip({activeChipIndex:e,disabled:!0,index:f++,item:g,messages:c,readOnly:t,scale:o,isAncestors:n}));return}l.push(this.renderChip({activeChipIndex:e,disabled:!1,index:d++,item:g,messages:c,readOnly:t,scale:o,isAncestors:n}))})}else s||this.selectedItems.forEach(h=>{l.push(this.renderChip({activeChipIndex:e,disabled:h.disabled,index:d++,item:h,messages:c,readOnly:t,scale:o,isAncestors:n}))});if(i==="fit"){let h=this.selectedHiddenChipsCount,b=this.selectedVisibleChipsCount===0?this.selectedItems.length:h;h>0&&!this.deferFitChipCountRender&&l.push(this.renderChipCount(b,o))}return l.length?l:null}renderAllSelectedIndicatorChip(){let{allSelectedIndicatorChipRef:e,compactSelectionDisplay:t,scale:o,selectedVisibleChipsCount:i}=this,a=!1;if(this.selectionDisplay==="fit"&&this.textInputRef.value&&this.chipContainerEl){let s=parseInt(getComputedStyle(this.chipContainerEl).gap,10),C=w(this.chipContainerEl),{fontSize:d,fontFamily:f,minInlineSize:h}=getComputedStyle(this.textInputRef.value),b=.55,g=parseFloat(h)||parseInt(O,10),L=P(this.placeholder,`${d} ${f}`),$=L>0?L:Math.max(g,Math.round((this.placeholder?.length||0)*(parseFloat(d)||parseInt(O,10))*b)),D=w(this.selectedIndicatorChipRef.value);a=this.getFitCompactDisplayState({chipContainerElGap:s,chipContainerElWidth:C,inputMinWidth:g,placeholderWidth:$,selectedIndicatorChipElWidth:D}).hideSelectedChips}let l=t||a?this.messages.all:this.messages.allSelected,n=this.allSelected&&(this.selectionDisplay==="single"||!i||this.selectionDisplay==="all");return x`<calcite-chip class=${p({[r.chip]:!0,[r.chipInvisible]:!n,[r.allSelected]:!0})} data-testid=all-selected-indicator-chip .label=${l} .scale=${o} title=${l??m} value ${S(e)}>${l}</calcite-chip>`}renderSelectedIndicatorChip(){let{compactSelectionDisplay:e,selectionDisplay:t,scale:o,selectedIndicatorChipRef:i}=this,a=!1,c,l=this.getSelectedItems().length;return e?a=!0:t==="single"&&(this.allSelected?a=!0:l>0?a=!1:a=!0,c=`${l} ${this.messages.selected}`),x`<calcite-chip class=${p({[r.chip]:!0,[r.chipInvisible]:a})} .label=${c} .scale=${o} title=${c??m} value ${S(i)}>${c}</calcite-chip>`}renderSelectedIndicatorChipCompact(){let{compactSelectionDisplay:e,selectionDisplay:t,scale:o}=this,i=!1,a,c=this.getSelectedItems().length;return e?this.allSelected?i=!0:t==="single"&&(i=!(c>0),a=`${c}`):i=!0,x`<calcite-chip class=${p({[r.chip]:!0,[r.chipInvisible]:i})} .label=${a} .scale=${o} title=${a??m} value>${a}</calcite-chip>`}renderInput(){let{guid:e,disabled:t,placeholder:o,selectionMode:i,selectedItems:a,open:c}=this,l=R(i),n=a[0],s=!c&&l&&!!n&&!this.filterText;return x`<span class=${p({[r.inputWrap]:!0,[r.inputWrapSingle]:l})}>${s&&H("label",x`<span class=${p({[r.label]:!0,[r.labelIcon]:!!n?.icon})}>${k(n)}</span>`)||""}${H("input",x`<input aria-activedescendant=${this.activeDescendant??m} aria-controls=${`${u.listbox(e)}`} aria-errormessage=${u.validationMessage} aria-owns=${`${u.listbox(e)}`} aria-autocomplete=list .ariaDescription=${this.getDescriptionMessage()} .ariaExpanded=${c} aria-haspopup=listbox .ariaInvalid=${this.status==="invalid"} .ariaLabel=${we(this)} class=${p({[r.input]:!0,[r.inputSingle]:!0,[r.inputHidden]:s,[r.inputIcon]:this.showingInlineIcon&&!!this.placeholderIcon})} data-testid=input .disabled=${t} .id=${`${u.input(e)}`} @focus=${this.comboboxFocusHandler} @input=${this.inputHandler} placeholder=${o??m} .readOnly=${this.readOnly} .required=${this.required} role=combobox .tabIndex=${this.activeChipIndex===-1?0:-1} type=text .value=${oe(this.filterText??"")} ${S(this.textInputRef)}>`)}</span>`}renderListBoxOptions(){let e=this.keyboardNavItems.map(t=>this.createScreenReaderItem({ariaLabel:t.label,ariaSelected:t.selected,id:`${u.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:o,open:i,scale:a}=this,c={[r.listContainer]:!0,[U.animation]:!0,[U.animationActive]:i},l=(this.filterText&&e.add.replace("{text}",`${this.filterText}`))??"";return x`<div aria-hidden=true class=${p(r.floatingUIContainer)} popover=manual ${S(t)}><div class=${p(c)} ${S(o)}><ul class=${p({[r.list]:!0,[r.listHide]:!i})}>${this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"&&x`<calcite-combobox-item class=${p(r.selectAll)} data-testid=select-all-item .heading=${e.selectAll} .id=${`${this.guid}-select-all-enabled-interactive`} .indeterminate=${this.indeterminate} .label=${e.selectAll} .scale=${a} .selected=${this.allSelected} tabindex=-1 value=select-all ${S(this.selectAllComboboxItemRef)}></calcite-combobox-item>`||""}<slot></slot>${this.noMatchesFound&&(this.allowCustomValues?x`<li aria-label=${l??m} class=${p(r.noMatches)} @click=${this.customChipAddHandler} role=option tabindex=0>${ye({text:l,pattern:new RegExp(`(${N(this.filterText)})`,"i")})}</li>`:x`<li class=${p({[r.noMatchesPlaceholder]:!0,[r.noMatches]:!0})}>${e.noMatches}</li>`)||""}</ul></div></div>`}renderSelectedOrPlaceholderIcon(){let{open:e,placeholderIcon:t,placeholderIconFlipRtl:o,selectedItems:i}=this,a=i[0],c=a?.icon,l=t&&(e||!a);return this.showingInlineIcon&&H("selected-placeholder-icon",x`<span class=${p(r.iconStart)}><calcite-icon class=${p({[r.selectedIcon]:!l,[r.placeholderIcon]:l})} .flipRtl=${l?o:a.iconFlipRtl} .icon=${l?t:c} .scale=${E(this.scale)}></calcite-icon></span>`)||""}renderChevronIcon(){let{open:e}=this;return H("chevron",x`<span class=${p(r.iconEnd)}><calcite-icon class=${p(r.icon)} .icon=${e?_.chevronUp:_.chevronDown} .scale=${E(this.scale)}></calcite-icon></span>`)}render(){let{selectionDisplay:e,guid:t,label:o,open:i,readOnly:a}=this,c=R(this.selectionMode),l=e==="all",n=e==="single",s=!c&&e==="fit",C=!c&&!l,d=C&&!s,f=this.items.some(b=>b.selected&&!b.disabled),h=!this.clearDisabled&&this.selectionMode!=="single-persist"&&!!this.value?.length&&f;return this.interactiveContainer({disabled:this.disabled,children:x`${this.labelText&&Ie({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div aria-live=polite class=${p({[r.wrapper]:!0,[r.wrapperSingle]:c||!this.selectedItems.length,[r.wrapperActive]:i})} @click=${this.clickHandler} @keydown=${this.keyDownHandler} ${S(this.setReferenceEl)}>${this.renderSelectedOrPlaceholderIcon()}${H("grid",x`<div class=${p({[r.gridInput]:!0,[r.selectionDisplayFit]:s,[r.selectionDisplaySingle]:n})} ${S(this.setChipContainerEl)}>${!c&&!n&&this.renderChips()||""}${!c&&!n&&this.selectAllEnabled&&l&&this.renderAllSelectedIndicatorChip()||""}${d&&this.renderSelectedIndicatorChip()||""}${d&&this.renderSelectedIndicatorChipCompact()||""}${C&&this.renderAllSelectedIndicatorChip()||""}<label class=${p(A.screenReaderText)} .htmlFor=${`${u.input(t)}`} .id=${`${u.label(t)}`}>${o}</label>${this.renderInput()}</div>`)}${!a&&h?Ve({ariaLabel:this.messages.clear,disabled:this.disabled,ref:this.clearButtonRef,scale:this.scale,title:this.messages.clear}):null}${!a&&this.renderChevronIcon()||""}</div><ul aria-labelledby=${`${u.label(t)}`} aria-multiselectable=true class=${p(A.screenReaderText)} .id=${`${u.listbox(t)}`} role=listbox tabindex=-1>${this.renderListBoxOptions()}</ul>${this.renderFloatingUIContainer()}${this.validationMessage&&this.status==="invalid"?Me({icon:this.validationIcon,id:u.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}};le("calcite-combobox",j);export{j as Combobox};
|