@esri/calcite-components 5.2.0-next.2 → 5.2.0-next.4
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/README.md +1 -1
- package/dist/cdn/{QXVZRQDN.js → 24XW36XW.js} +1 -1
- package/dist/cdn/{GNF44UQG.js → 2BIW77FS.js} +1 -1
- package/dist/cdn/{IOBH7Q3C.js → 2CPNDRJN.js} +1 -1
- package/dist/cdn/{V3ADMKIU.js → 2GFEIPYA.js} +1 -1
- package/dist/cdn/{DJIJFKYH.js → 2GIYJ5S4.js} +1 -1
- package/dist/cdn/{ENNOBBY4.js → 2NVBHC4D.js} +1 -1
- package/dist/cdn/2OKTIK5P.js +2 -0
- package/dist/cdn/{YL4XYPPL.js → 2WTFQ6VU.js} +1 -1
- package/dist/cdn/{TD2P54UR.js → 3AZFSAZW.js} +1 -1
- package/dist/cdn/{SVEPQ765.js → 3GYZZNF6.js} +1 -1
- package/dist/cdn/{R2DOA2MN.js → 3VTWLNYM.js} +1 -1
- package/dist/cdn/{W7DJIM2F.js → 3W6YYTUS.js} +1 -1
- package/dist/cdn/{J32XKCXC.js → 44WTMUOU.js} +1 -1
- package/dist/cdn/{RC3UVUK3.js → 4ENZX7JD.js} +1 -1
- package/dist/cdn/{FPVMYG6A.js → 4XXCMSYK.js} +1 -1
- package/dist/cdn/{4PN5ZOFS.js → 5BRHCY56.js} +1 -1
- package/dist/cdn/{FEMVD7MC.js → 5F5N45N2.js} +1 -1
- package/dist/cdn/{JW2SKWED.js → 5HQW2B4L.js} +1 -1
- package/dist/cdn/{XR4GGZRV.js → 5J5YPAQF.js} +1 -1
- package/dist/cdn/{XNAMWMN5.js → 5MJOA2EC.js} +1 -1
- package/dist/cdn/{KZUHKTIQ.js → 5Z6Y27PN.js} +1 -1
- package/dist/cdn/{7JMYJBWS.js → 6M54QVXX.js} +1 -1
- package/dist/cdn/{6A4WSEWS.js → 7CTKDBNP.js} +1 -1
- package/dist/cdn/{WYJ5MJ5T.js → 7KZDKRE5.js} +1 -1
- package/dist/cdn/{CC6MIBOX.js → AC3VJGBR.js} +1 -1
- package/dist/cdn/{5EY2EEDX.js → AH2ILKOU.js} +1 -1
- package/dist/cdn/{T5VR3PV2.js → ARJXIE5E.js} +1 -1
- package/dist/cdn/{AV53YUYO.js → AV2KGCM3.js} +1 -1
- package/dist/cdn/{BDJAXYZ6.js → B255QVJJ.js} +1 -1
- package/dist/cdn/{BUNBY5RM.js → BC2RGQAT.js} +1 -1
- package/dist/cdn/{TWT5XRCW.js → BKETK56P.js} +1 -1
- package/dist/cdn/{RQVOT4ZO.js → BQXZQXDH.js} +1 -1
- package/dist/cdn/{GLH6ZAVP.js → BUA4VQLY.js} +1 -1
- package/dist/cdn/{N7DI6G6M.js → BXPPKXA4.js} +1 -1
- package/dist/cdn/C5UFPB7M.js +2 -0
- package/dist/cdn/{U5IWCBXE.js → C7G4TGZX.js} +1 -1
- package/dist/cdn/{KQN3IXDE.js → CARY3C4R.js} +1 -1
- package/dist/cdn/{B34QFBVX.js → CCXEESJV.js} +1 -1
- package/dist/cdn/{BETERP4W.js → CF6R3CEF.js} +1 -1
- package/dist/cdn/CHVPHDET.js +2 -0
- package/dist/cdn/{YEFCURY4.js → CKNWJGRW.js} +1 -1
- package/dist/cdn/CMY74TQR.js +2 -0
- package/dist/cdn/{EGQ75QVP.js → CORQ5EDZ.js} +1 -1
- package/dist/cdn/{RXXRSLAB.js → CP4Z56ZR.js} +1 -1
- package/dist/cdn/{MSB35HIA.js → CTLPGOB7.js} +1 -1
- package/dist/cdn/{A2QVKNTN.js → CYYQXD64.js} +1 -1
- package/dist/cdn/{3FH6QU7Y.js → D7PUB2VW.js} +1 -1
- package/dist/cdn/{JQVKQIWK.js → DFHWYAUO.js} +1 -1
- package/dist/cdn/{TE3IGQZH.js → DGXWUFHV.js} +1 -1
- package/dist/cdn/{4CHUXMKI.js → DM5PCYTC.js} +1 -1
- package/dist/cdn/{43MK3FDM.js → DYLGNP2R.js} +1 -1
- package/dist/cdn/{DJL42XA3.js → EPBMP22J.js} +1 -1
- package/dist/cdn/{QNSEEZF5.js → EW27G33J.js} +1 -1
- package/dist/cdn/{6WR7WF5X.js → EWIM5HH4.js} +1 -1
- package/dist/cdn/{LZDIBXYZ.js → F2DLFMMQ.js} +1 -1
- package/dist/cdn/{PKAYPMQL.js → FSYJWUBV.js} +1 -1
- package/dist/cdn/{ATPHVTBE.js → FWMASCBJ.js} +1 -1
- package/dist/cdn/{FVB2OZEH.js → G2WKLE63.js} +1 -1
- package/dist/cdn/{XZJNPGQT.js → GBYDFEYR.js} +1 -1
- package/dist/cdn/{W7BKEQCB.js → GCQOLCYX.js} +1 -1
- package/dist/cdn/{GUSPFAZS.js → GLB7VDX7.js} +1 -1
- package/dist/cdn/{KVWHPPP5.js → GWO7M4CB.js} +1 -1
- package/dist/cdn/{D6PPMEQM.js → HHOCH2WQ.js} +1 -1
- package/dist/cdn/{GGCO6DJE.js → HPI37X3H.js} +1 -1
- package/dist/cdn/HUHXPX4S.js +2 -0
- package/dist/cdn/{UOQXEKIF.js → I2YZCTNB.js} +1 -1
- package/dist/cdn/I62TONNU.js +2 -0
- package/dist/cdn/{HBRGGPQS.js → IC76575N.js} +1 -1
- package/dist/cdn/{SU44IFYE.js → IKJKNZRO.js} +1 -1
- package/dist/cdn/{QLMCMCFN.js → IOQX4VTU.js} +1 -1
- package/dist/cdn/{QIW2VXWS.js → IWFPWFJR.js} +1 -1
- package/dist/cdn/{QXIJOBKX.js → JACGCENG.js} +1 -1
- package/dist/cdn/{F25HCCSH.js → JJRBBNII.js} +1 -1
- package/dist/cdn/{UMHABPZB.js → JL6EDIGB.js} +1 -1
- package/dist/cdn/{CYCLHZ3A.js → JMOU4F7W.js} +1 -1
- package/dist/cdn/{7Q57OJ6S.js → JNWSTJU6.js} +1 -1
- package/dist/cdn/{IJZH5BV3.js → JOSZJ4U5.js} +1 -1
- package/dist/cdn/JXHQEAMO.js +2 -0
- package/dist/cdn/{2RCOMSJ4.js → KAINKHTB.js} +1 -1
- package/dist/cdn/{GBNEJ7ZF.js → L4565LYV.js} +1 -1
- package/dist/cdn/{SVIANZ3V.js → L7ZU6UHP.js} +1 -1
- package/dist/cdn/{YAQRXHHQ.js → LQPCOJZC.js} +1 -1
- package/dist/cdn/{G4ZSDWUZ.js → MFPSZIXT.js} +1 -1
- package/dist/cdn/{AA7ZRB5K.js → MHDQTRTS.js} +1 -1
- package/dist/cdn/{2AZU4JLL.js → MU324X7S.js} +1 -1
- package/dist/cdn/{B5M44JJO.js → N5DDKO3N.js} +1 -1
- package/dist/cdn/{MIE7SGGW.js → NKZDXCA3.js} +1 -1
- package/dist/cdn/{GBGFI7SS.js → NNVS72ZQ.js} +1 -1
- package/dist/cdn/{KPR7F2IQ.js → NO2IBH5N.js} +1 -1
- package/dist/cdn/{2U7LTQ5E.js → NTTXPITY.js} +1 -1
- package/dist/cdn/NUPS67PK.js +2 -0
- package/dist/cdn/{AOWO3CEE.js → NY4L6FEN.js} +1 -1
- package/dist/cdn/{JL5V6LHI.js → O7X3EP3R.js} +1 -1
- package/dist/cdn/{KQ322MPA.js → OGL4GEZF.js} +1 -1
- package/dist/cdn/{GOBJFJO6.js → OH6YFLLX.js} +1 -1
- package/dist/cdn/{MNBJJORH.js → P6AYQBI6.js} +1 -1
- package/dist/cdn/{RE4YAX46.js → PFQXFR3J.js} +1 -1
- package/dist/cdn/{45HPDOT4.js → PQIVVLWM.js} +1 -1
- package/dist/cdn/{FFUBSUZQ.js → PT3URJPT.js} +1 -1
- package/dist/cdn/{C7C55I5S.js → Q6D2HYAM.js} +1 -1
- package/dist/cdn/{AFNW6NWU.js → Q74VIYYT.js} +1 -1
- package/dist/cdn/{JZCXLE2H.js → QNANJC5N.js} +1 -1
- package/dist/cdn/{DI3IXSN2.js → QURCJOLS.js} +1 -1
- package/dist/cdn/{ZLOMPF4H.js → QZXRRHZI.js} +1 -1
- package/dist/cdn/{C4VPLSW7.js → R2HCYTV3.js} +1 -1
- package/dist/cdn/{NF3TF2WJ.js → R4LR6JBT.js} +1 -1
- package/dist/cdn/{OLCC5YK5.js → RLQPAL3G.js} +1 -1
- package/dist/cdn/{EL7GGALP.js → S6A7QIY2.js} +1 -1
- package/dist/cdn/{4AM5CFW2.js → S6CBIU4I.js} +1 -1
- package/dist/cdn/{TJC3KPVJ.js → S7RFXIID.js} +1 -1
- package/dist/cdn/T2LA26T7.js +2 -0
- package/dist/cdn/{5GA4KYR2.js → TFI32YIW.js} +1 -1
- package/dist/cdn/{AO3S4HXU.js → TJKKXO65.js} +1 -1
- package/dist/cdn/{CQ6NGNY6.js → TTBDTS7V.js} +1 -1
- package/dist/cdn/{NFPHYIMY.js → TWVG44TI.js} +1 -1
- package/dist/cdn/{X33GQ3A3.js → TZEYHRND.js} +1 -1
- package/dist/cdn/{W6UFYWVG.js → U6OTDRDG.js} +1 -1
- package/dist/cdn/{CFFCEFZK.js → U7OV6L43.js} +1 -1
- package/dist/cdn/{LVF7G7IY.js → UF2N6ABQ.js} +1 -1
- package/dist/cdn/{EXXGZUR3.js → UFPS5THO.js} +1 -1
- package/dist/cdn/{57I2TDEP.js → UJQUDROZ.js} +1 -1
- package/dist/cdn/{LRPJV2DQ.js → UJRHNVSJ.js} +1 -1
- package/dist/cdn/{3GSXR65T.js → UMVL2A7E.js} +1 -1
- package/dist/cdn/{LJJZC4QK.js → USMDWOOR.js} +1 -1
- package/dist/cdn/{OTKKHBLB.js → UZLV6ZKB.js} +1 -1
- package/dist/cdn/{S5JJMYDX.js → VFE65IIH.js} +1 -1
- package/dist/cdn/{BBQFFEZH.js → VIAY4ZRC.js} +1 -1
- package/dist/cdn/{TEGKHQ5W.js → VMUOIKWP.js} +1 -1
- package/dist/cdn/{5ISZFTOQ.js → VXQU67VG.js} +1 -1
- package/dist/cdn/{PO4GQAOO.js → WV7Y7ZAG.js} +1 -1
- package/dist/cdn/{FLX6RAXY.js → X4J4PEMW.js} +1 -1
- package/dist/cdn/{OGWGMCYY.js → XCKTCFWS.js} +1 -1
- package/dist/cdn/{HIXRGJPQ.js → XFLOOJCN.js} +1 -1
- package/dist/cdn/{7IOEAAJN.js → XI3FBKU5.js} +1 -1
- package/dist/cdn/{I2ZCMXRB.js → XJQE4TBM.js} +1 -1
- package/dist/cdn/{IVJANKWM.js → XL7EXU56.js} +1 -1
- package/dist/cdn/XSDBVOII.js +2 -0
- package/dist/cdn/{E3RE3E2N.js → XUGBNEVM.js} +1 -1
- package/dist/cdn/{XD2JOD4K.js → XZ3BWCEM.js} +1 -1
- package/dist/cdn/Y6TCI7PY.js +2 -0
- package/dist/cdn/{4XBIPWD2.js → YM3XWOJY.js} +1 -1
- package/dist/cdn/{F7AKW6A4.js → YZTUQM6P.js} +1 -1
- package/dist/cdn/{CAWTUKNX.js → Z32RDX4L.js} +1 -1
- package/dist/cdn/Z3TMJ6KM.js +2 -0
- package/dist/cdn/{OQY72DXY.js → ZN2URSJV.js} +1 -1
- package/dist/cdn/assets/icon/buildingIndex16.json +1 -0
- package/dist/cdn/assets/icon/buildingIndex24.json +1 -0
- package/dist/cdn/assets/icon/buildingIndex32.json +1 -0
- package/dist/cdn/assets/icon/fireIndex16.json +1 -0
- package/dist/cdn/assets/icon/fireIndex24.json +1 -0
- package/dist/cdn/assets/icon/fireIndex32.json +1 -0
- package/dist/cdn/assets/icon/geologyIndex16.json +1 -0
- package/dist/cdn/assets/icon/geologyIndex24.json +1 -0
- package/dist/cdn/assets/icon/geologyIndex32.json +1 -0
- package/dist/cdn/assets/icon/returnToDefault16.json +1 -1
- package/dist/cdn/assets/icon/returnToDefault32.json +1 -1
- package/dist/cdn/assets/icon/smartSearch16.json +1 -0
- package/dist/cdn/assets/icon/smartSearch24.json +1 -0
- package/dist/cdn/assets/icon/smartSearch32.json +1 -0
- package/dist/cdn/assets/icon/snowIndex16.json +1 -0
- package/dist/cdn/assets/icon/snowIndex24.json +1 -0
- package/dist/cdn/assets/icon/snowIndex32.json +1 -0
- package/dist/cdn/assets/icon/soilAdjustedVegetationIndex16.json +1 -0
- package/dist/cdn/assets/icon/soilAdjustedVegetationIndex24.json +1 -0
- package/dist/cdn/assets/icon/soilAdjustedVegetationIndex32.json +1 -0
- package/dist/cdn/assets/icon/vegetationIndex16.json +1 -0
- package/dist/cdn/assets/icon/vegetationIndex24.json +1 -0
- package/dist/cdn/assets/icon/vegetationIndex32.json +1 -0
- package/dist/cdn/assets/input/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/input/t9n/messages.json +1 -1
- package/dist/cdn/assets/input-number/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/input-number/t9n/messages.json +1 -1
- package/dist/cdn/assets/input-text/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/input-text/t9n/messages.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/ClearButton.js +1 -1
- package/dist/chunks/resources12.js +27 -0
- package/dist/chunks/runtime.js +4 -4
- package/dist/chunks/useSizeOverride.js +1 -1
- package/dist/chunks/useTime.js +3 -0
- package/dist/chunks/utils2.js +58 -5
- package/dist/components/calcite-action/customElement.d.ts +1 -5
- package/dist/components/calcite-action-group/customElement.d.ts +2 -4
- package/dist/components/calcite-action-menu/customElement.d.ts +2 -4
- package/dist/components/calcite-alert/customElement.d.ts +1 -3
- package/dist/components/calcite-autocomplete/customElement.d.ts +3 -9
- package/dist/components/calcite-autocomplete-item/customElement.d.ts +1 -1
- package/dist/components/calcite-block/customElement.d.ts +3 -5
- package/dist/components/calcite-button/customElement.d.ts +1 -5
- package/dist/components/calcite-checkbox/customElement.d.ts +1 -5
- package/dist/components/calcite-combobox/customElement.d.ts +3 -9
- package/dist/components/calcite-combobox/customElement.js +44 -42
- package/dist/components/calcite-combobox-item/customElement.d.ts +1 -1
- package/dist/components/calcite-combobox-item/customElement.js +1 -1
- package/dist/components/calcite-combobox-item-group/customElement.js +1 -1
- package/dist/components/calcite-dialog/customElement.d.ts +1 -3
- package/dist/components/calcite-dropdown/customElement.d.ts +2 -4
- package/dist/components/calcite-filter/customElement.js +1 -1
- package/dist/components/calcite-flow-item/customElement.d.ts +2 -4
- package/dist/components/calcite-icon/customElement.d.ts +2 -2
- package/dist/components/calcite-icon/customElement.js +4 -4
- package/dist/components/calcite-inline-editable/customElement.d.ts +1 -1
- package/dist/components/calcite-inline-editable/customElement.js +4 -2
- package/dist/components/calcite-input/customElement.d.ts +23 -24
- package/dist/components/calcite-input/customElement.js +14 -12
- package/dist/components/calcite-input-date-picker/customElement.d.ts +17 -23
- package/dist/components/calcite-input-date-picker/customElement.js +23 -23
- package/dist/components/calcite-input-message/customElement.d.ts +1 -1
- package/dist/components/calcite-input-number/customElement.d.ts +22 -25
- package/dist/components/calcite-input-number/customElement.js +14 -12
- package/dist/components/calcite-input-text/customElement.d.ts +18 -19
- package/dist/components/calcite-input-text/customElement.js +3 -3
- package/dist/components/calcite-input-time-picker/customElement.d.ts +11 -13
- package/dist/components/calcite-input-time-picker/customElement.js +34 -10
- package/dist/components/calcite-input-time-zone/customElement.d.ts +9 -15
- package/dist/components/calcite-input-time-zone/customElement.js +11 -9
- package/dist/components/calcite-list-item/customElement.d.ts +1 -3
- package/dist/components/calcite-meter/customElement.d.ts +1 -3
- package/dist/components/calcite-panel/customElement.d.ts +4 -6
- package/dist/components/calcite-popover/customElement.d.ts +2 -4
- package/dist/components/calcite-radio-button/customElement.d.ts +1 -5
- package/dist/components/calcite-rating/customElement.d.ts +1 -5
- package/dist/components/calcite-segmented-control/customElement.d.ts +1 -5
- package/dist/components/calcite-select/customElement.d.ts +1 -5
- package/dist/components/calcite-sheet/customElement.d.ts +1 -3
- package/dist/components/calcite-slider/customElement.d.ts +13 -17
- package/dist/components/calcite-slider/customElement.js +19 -20
- package/dist/components/calcite-sort-handle/customElement.d.ts +2 -4
- package/dist/components/calcite-split-button/customElement.d.ts +12 -14
- package/dist/components/calcite-split-button/customElement.js +1 -1
- package/dist/components/calcite-stepper/customElement.d.ts +1 -1
- package/dist/components/calcite-stepper/customElement.js +10 -10
- package/dist/components/calcite-stepper-item/customElement.d.ts +3 -3
- package/dist/components/calcite-stepper-item/customElement.js +8 -24
- package/dist/components/calcite-swatch/customElement.d.ts +1 -1
- package/dist/components/calcite-swatch/customElement.js +2 -2
- package/dist/components/calcite-swatch-group/customElement.js +8 -6
- package/dist/components/calcite-switch/customElement.d.ts +6 -10
- package/dist/components/calcite-table-header/customElement.d.ts +1 -1
- package/dist/components/calcite-text-area/customElement.d.ts +1 -5
- package/dist/components/calcite-tile/customElement.d.ts +1 -1
- package/dist/components/calcite-tooltip/customElement.d.ts +1 -3
- package/dist/controllers/useTime.d.ts +3 -0
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/translations.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +1 -1
- package/dist/types/lumina.d.ts +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/stencil.d.ts +1 -1
- package/package.json +4 -3
- package/dist/cdn/2C57GVL7.js +0 -2
- package/dist/cdn/4C4FXK46.js +0 -2
- package/dist/cdn/6ZDUL7DM.js +0 -2
- package/dist/cdn/AI4EP5I7.js +0 -2
- package/dist/cdn/GMY4OPXB.js +0 -2
- package/dist/cdn/H2JTOLL2.js +0 -2
- package/dist/cdn/PYEU7ILW.js +0 -2
- package/dist/cdn/TDOPUO3L.js +0 -2
- package/dist/cdn/W5TTJ4T3.js +0 -2
- package/dist/cdn/Y3U2N2BQ.js +0 -2
- package/dist/cdn/YYGQFOZ7.js +0 -2
|
@@ -29,7 +29,7 @@ import { u as useTopLayer } from "../../chunks/useTopLayer.js";
|
|
|
29
29
|
import { u as useForm } from "../../chunks/useForm.js";
|
|
30
30
|
import { i as isChip } from "../../chunks/resources6.js";
|
|
31
31
|
import { I as IDS, C as CSS, a as ComboboxItemSelector, b as ComboboxItemGroupSelector, c as ICONS } from "../../chunks/resources7.js";
|
|
32
|
-
import { h as hasActiveChildren, i as isSingleLike, g as getLabel,
|
|
32
|
+
import { h as hasActiveChildren, i as isSingleLike, o as orderValuesByPrevious, a as orderByPrevious, g as getLabel, b as getItemAncestors, c as getItemChildren } from "../../chunks/utils2.js";
|
|
33
33
|
const styles = css`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:block}:host([scale=s]){font-size:var(--calcite-font-size-relative-sm);--calcite-internal-combobox-spacing-unit-l: .5rem;--calcite-internal-combobox-spacing-unit-s: .25rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-2xs);--calcite-internal-combobox-no-matches-spacing-unit-s: .25rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.25rem - 1px) ;--calcite-internal-close-size: 1rem}:host([scale=m]){font-size:var(--calcite-font-size-relative-base);--calcite-internal-combobox-spacing-unit-l: .75rem;--calcite-internal-combobox-spacing-unit-s: .5rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-sm);--calcite-internal-combobox-no-matches-spacing-unit-s: .375rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.5rem - 1px) ;--calcite-internal-close-size: 1.5rem}:host([scale=l]){font-size:var(--calcite-font-size-relative-md);--calcite-internal-combobox-spacing-unit-l: 1rem;--calcite-internal-combobox-spacing-unit-s: .75rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-sm-plus);--calcite-internal-combobox-no-matches-spacing-unit-s: var(--calcite-space-sm-plus);--calcite-combobox-input-height: 1.5rem;--calcite-internal-combobox-input-margin-block: calc(var(--calcite-space-sm-plus) - 1px);--calcite-internal-close-size: 2rem}.wrapper{display:flex;border-width:1px;border-style:solid;outline-color:transparent;padding-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);padding-inline:var(--calcite-internal-combobox-spacing-unit-l) var(--calcite-internal-combobox-padding-inline-end);background-color:var(--calcite-combobox-input-background-color, var(--calcite-color-foreground-1));color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));border-color:var(--calcite-combobox-input-border-color, var(--calcite-color-border-input))}.wrapper:hover .icon{color:var(--calcite-combobox-icon-color-hover, var(--calcite-color-text-1))}:host(:focus-within) .wrapper,.wrapper--active{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([read-only]) .wrapper{background-color:var(--calcite-color-background)}:host([read-only]) .label{font-weight:var(--calcite-font-weight-medium)}:host([status=invalid]) .wrapper{border-color:var(--calcite-color-status-danger)}:host([status=invalid]:focus-within) .wrapper{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.wrapper--single{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l) var(--calcite-internal-combobox-padding-inline-end);cursor:pointer;flex-wrap:nowrap}.grid-input{position:relative;display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;gap:var(--calcite-internal-combobox-spacing-unit-s);margin-inline-end:var(--calcite-internal-combobox-spacing-unit-s)}.grid-input.selection-display--fit,.grid-input.selection-display--single{flex-wrap:nowrap;overflow:hidden}.input{flex-grow:1;appearance:none;overflow:hidden;text-overflow:ellipsis;border-style:none;background-color:transparent;padding:0;font-family:inherit;color:var(--calcite-color-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);inline-size:100%;margin-block-end:var(--calcite-internal-combobox-spacing-unit-s);min-inline-size:4.8125rem}.input:focus{outline:2px solid transparent;outline-offset:2px}.input:placeholder-shown{text-overflow:ellipsis}.input--single{padding:0;margin-block:var(--calcite-internal-combobox-input-margin-block)}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;width:0px;min-width:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.placeholder-icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.input-wrap{display:flex;flex-grow:1;align-items:center}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;max-width:100%;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;font-weight:var(--calcite-font-weight-normal);block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--icon{padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.icon-end,.icon-start{display:flex;cursor:pointer;align-items:center}.icon-end{flex:none}.icon-end .icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.floating-ui-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}@starting-style{.floating-ui-container{opacity:0;inset-block-start:0;left:0}}:host([top-layer-disabled]) .floating-ui-container{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown)}.floating-ui-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.floating-ui-container:popover-open{display:block}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.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}}.screen-readers-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.list-container{max-height:45vh;overflow-y:auto;inline-size:var(--calcite-dropdown-width, 100%);background-color:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1))}.list{margin:0;display:block;padding:0;line-height:var(--calcite-font-line-height-relative-snug)}.list--hide{height:0px;overflow:hidden}calcite-chip{--calcite-animation-timing: 0}.chip{margin-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);max-inline-size:100%}.chip--invisible{visibility:hidden;position:absolute}.item{display:block}.select-all{background-color:var(--calcite-combobox-item-background-color-active, var(--calcite-color-foreground-1));border-block-end-color:var(--calcite-combobox-divider-color, var(--calcite-combobox-item-border-color, var(--calcite-color-border-3)));border-block-end-style:solid;border-block-end-width:var(--calcite-border-width-sm);inset-block-start:0;position:sticky;z-index:var(--calcite-z-index-sticky)}.no-matches{padding-block:var(--calcite-internal-combobox-no-matches-spacing-unit-s);padding-inline:var(--calcite-internal-combobox-spacing-unit-l);color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));background:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1));cursor:pointer}.no-matches-placeholder{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3));cursor:default}.disabled{opacity:.5}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.clear-button--container{display:flex;cursor:pointer;align-items:center}.clear-button--container:hover calcite-action{--calcite-action-background-color: var(--calcite-clear-button-background-color-hover, var(--calcite-color-foreground-3));--calcite-action-text-color: var(--calcite-clear-button-icon-color-hover, var(--calcite-color-text-1))}.clear-button--container:active calcite-action{--calcite-action-background-color: var(--calcite-clear-button-background-color-press, var(--calcite-color-border-2));--calcite-action-text-color: var(--calcite-clear-button-icon-color-press, var(--calcite-color-text-1))}.clear-button--container calcite-action{--calcite-internal-action-height: 100%;--calcite-internal-action-padding-inline: var(--calcite-spacing-none);--calcite-internal-action-padding-block: var(--calcite-spacing-none);--calcite-action-background-color: var(--calcite-clear-button-background-color, var(--calcite-color-foreground-2));--calcite-action-text-color: var(--calcite-clear-button-icon-color)}.clear-button--container calcite-action:hover{--calcite-action-background-color-hover: var(--calcite-clear-button-background-color-hover, var(--calcite-color-foreground-3));--calcite-action-text-color-press: var(--calcite-clear-button-icon-color-hover)}.clear-button--container calcite-action:active{--calcite-action-background-color-press: var(--calcite-clear-button-background-color-press, var(--calcite-color-border-2));--calcite-action-text-color-press: var(--calcite-clear-button-icon-color-press)}:host([scale=s]) .clear-button--container{padding:var(--calcite-spacing-xxs)}:host([scale=m]) .clear-button--container{padding:var(--calcite-spacing-xxs);padding-inline-end:var(--calcite-space-sm)}:host([scale=l]) .clear-button--container{padding-inline-end:var(--calcite-spacing-sm-plus)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}.text-match{background-color:transparent;color:inherit;font-weight:var(--calcite-font-weight-bold)}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}::placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-placeholder-text-color, var(--calcite-color-text-3))}`;
|
|
34
34
|
class Combobox extends LitElement {
|
|
35
35
|
constructor() {
|
|
@@ -81,14 +81,7 @@ class Combobox extends LitElement {
|
|
|
81
81
|
const match = this.allItems.find(({ selected }) => selected);
|
|
82
82
|
return match ? [match] : [];
|
|
83
83
|
}
|
|
84
|
-
return this.allItems.filter((item) => item.selected && (this.selectionMode !== "ancestors" || !hasActiveChildren(item)))
|
|
85
|
-
const aIdx = this.selectedItems.indexOf(a);
|
|
86
|
-
const bIdx = this.selectedItems.indexOf(b);
|
|
87
|
-
if (aIdx > -1 && bIdx > -1) {
|
|
88
|
-
return aIdx - bIdx;
|
|
89
|
-
}
|
|
90
|
-
return bIdx - aIdx;
|
|
91
|
-
});
|
|
84
|
+
return this.allItems.filter((item) => item.selected && (this.selectionMode !== "ancestors" || !hasActiveChildren(item)));
|
|
92
85
|
};
|
|
93
86
|
this.groupItems = [];
|
|
94
87
|
this.guid = guid();
|
|
@@ -396,6 +389,9 @@ class Combobox extends LitElement {
|
|
|
396
389
|
});
|
|
397
390
|
}
|
|
398
391
|
}
|
|
392
|
+
updateSelectedItems() {
|
|
393
|
+
this.selectedItems = this.getOrderedSelectedItems(this.getSelectedItems());
|
|
394
|
+
}
|
|
399
395
|
calciteComboboxItemChangeHandler(event) {
|
|
400
396
|
if (this.ignoreSelectedEventsFlag) {
|
|
401
397
|
return;
|
|
@@ -421,7 +417,7 @@ class Combobox extends LitElement {
|
|
|
421
417
|
this.ignoreSelectedEventsFlag = true;
|
|
422
418
|
enabledSelectedItems.forEach((el) => el.selected = false);
|
|
423
419
|
this.ignoreSelectedEventsFlag = false;
|
|
424
|
-
this.
|
|
420
|
+
this.updateSelectedItems();
|
|
425
421
|
this.emitComboboxChange();
|
|
426
422
|
}
|
|
427
423
|
this.open = false;
|
|
@@ -441,9 +437,19 @@ class Combobox extends LitElement {
|
|
|
441
437
|
this.filteredFlipPlacements = flipPlacements ? filterValidFlipPlacements(flipPlacements, el) : null;
|
|
442
438
|
}
|
|
443
439
|
getValue() {
|
|
444
|
-
const items = this.selectedItems.map((item) => item.value?.toString());
|
|
440
|
+
const items = this.getOrderedSelectedValues(this.selectedItems.map((item) => item.value?.toString()));
|
|
445
441
|
return items.length ? items.length > 1 ? items : items[0] : "";
|
|
446
442
|
}
|
|
443
|
+
getOrderedSelectedValues(selectedValues) {
|
|
444
|
+
if (!this.isMulti()) {
|
|
445
|
+
return selectedValues;
|
|
446
|
+
}
|
|
447
|
+
const previousValues = Array.isArray(this.value) ? this.value : this.value ? [this.value] : [];
|
|
448
|
+
return orderValuesByPrevious(selectedValues, previousValues);
|
|
449
|
+
}
|
|
450
|
+
getOrderedSelectedItems(selectedItems) {
|
|
451
|
+
return this.isMulti() ? orderByPrevious(selectedItems, this.selectedItems) : selectedItems;
|
|
452
|
+
}
|
|
447
453
|
comboboxInViewport() {
|
|
448
454
|
const bounding = this.el.getBoundingClientRect();
|
|
449
455
|
return bounding.top >= 0 && bounding.left >= 0 && bounding.right <= (window.innerWidth || document.documentElement.clientWidth) && bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight);
|
|
@@ -456,7 +462,7 @@ class Combobox extends LitElement {
|
|
|
456
462
|
}
|
|
457
463
|
item.selected = toggledValue;
|
|
458
464
|
});
|
|
459
|
-
this.
|
|
465
|
+
this.updateSelectedItems();
|
|
460
466
|
this.emitComboboxChange();
|
|
461
467
|
}
|
|
462
468
|
hasHiddenSelectedFitChips() {
|
|
@@ -910,7 +916,7 @@ class Combobox extends LitElement {
|
|
|
910
916
|
handleMultiSelection(item, value) {
|
|
911
917
|
item.selected = value;
|
|
912
918
|
this.updateAncestors(item);
|
|
913
|
-
this.
|
|
919
|
+
this.updateSelectedItems();
|
|
914
920
|
this.emitComboboxChange();
|
|
915
921
|
this.resetText();
|
|
916
922
|
this.filterItems("");
|
|
@@ -919,7 +925,7 @@ class Combobox extends LitElement {
|
|
|
919
925
|
this.ignoreSelectedEventsFlag = true;
|
|
920
926
|
this.items.forEach((el) => el.selected = el === item ? value : false);
|
|
921
927
|
this.ignoreSelectedEventsFlag = false;
|
|
922
|
-
this.
|
|
928
|
+
this.updateSelectedItems();
|
|
923
929
|
this.emitComboboxChange();
|
|
924
930
|
if (this.textInputRef.value) {
|
|
925
931
|
this.textInputRef.value.value = getLabel(item);
|
|
@@ -963,7 +969,7 @@ class Combobox extends LitElement {
|
|
|
963
969
|
this.data = this.getData();
|
|
964
970
|
this.groupData = this.getGroupData();
|
|
965
971
|
this.updateItemProps();
|
|
966
|
-
this.
|
|
972
|
+
this.updateSelectedItems();
|
|
967
973
|
this.previousAllSelected = this.allSelected;
|
|
968
974
|
}
|
|
969
975
|
updateItemProps() {
|
|
@@ -1169,36 +1175,32 @@ class Combobox extends LitElement {
|
|
|
1169
1175
|
let selectedIndex = 0;
|
|
1170
1176
|
let disabledIndex = 0;
|
|
1171
1177
|
if (preserveOrder) {
|
|
1172
|
-
this.allItems.
|
|
1178
|
+
const selectedChipItems = this.allItems.filter((item) => item.selected && (!isAncestors || !hasActiveChildren(item)));
|
|
1179
|
+
const orderedSelectedChipItems = orderByPrevious(selectedChipItems, this.selectedItems);
|
|
1180
|
+
orderedSelectedChipItems.forEach((item) => {
|
|
1173
1181
|
if (item.disabled) {
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
}));
|
|
1185
|
-
}
|
|
1182
|
+
chips.push(this.renderChip({
|
|
1183
|
+
activeChipIndex,
|
|
1184
|
+
disabled: true,
|
|
1185
|
+
index: disabledIndex++,
|
|
1186
|
+
item,
|
|
1187
|
+
messages,
|
|
1188
|
+
readOnly,
|
|
1189
|
+
scale,
|
|
1190
|
+
isAncestors
|
|
1191
|
+
}));
|
|
1186
1192
|
return;
|
|
1187
1193
|
}
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
isAncestors
|
|
1199
|
-
}));
|
|
1200
|
-
}
|
|
1201
|
-
}
|
|
1194
|
+
chips.push(this.renderChip({
|
|
1195
|
+
activeChipIndex,
|
|
1196
|
+
disabled: false,
|
|
1197
|
+
index: selectedIndex++,
|
|
1198
|
+
item,
|
|
1199
|
+
messages,
|
|
1200
|
+
readOnly,
|
|
1201
|
+
scale,
|
|
1202
|
+
isAncestors
|
|
1203
|
+
}));
|
|
1202
1204
|
});
|
|
1203
1205
|
} else if (!hideSelectedChipsForSelectAll) {
|
|
1204
1206
|
this.selectedItems.forEach((item) => {
|
|
@@ -27,7 +27,7 @@ export abstract class ComboboxItem extends LitElement {
|
|
|
27
27
|
accessor active: boolean;
|
|
28
28
|
/** Specifies the parent and grandparent `calcite-combobox-item`s, which are set on `calcite-combobox`. */
|
|
29
29
|
accessor ancestors: ComboboxChildElement[];
|
|
30
|
-
/** Specifies a description for the component. Displays below the heading
|
|
30
|
+
/** Specifies a description for the component. Displays below the `heading`. */
|
|
31
31
|
accessor description: string;
|
|
32
32
|
/**
|
|
33
33
|
* When `true`, prevents interaction and decreases the component's opacity.
|
|
@@ -4,7 +4,7 @@ import { keyed } from "lit/directives/keyed.js";
|
|
|
4
4
|
import { css, html, nothing } from "lit";
|
|
5
5
|
import { LitElement, createEvent, safeClassMap, safeStyleMap } from "@arcgis/lumina";
|
|
6
6
|
import { g as guid } from "../../chunks/guid.js";
|
|
7
|
-
import {
|
|
7
|
+
import { d as getAncestors, i as isSingleLike, e as getDepth } from "../../chunks/utils2.js";
|
|
8
8
|
import { g as getIconScale } from "../../chunks/component.js";
|
|
9
9
|
import { m as slotChangeHasContent } from "../../chunks/dom.js";
|
|
10
10
|
import { h as highlightText } from "../../chunks/text.js";
|
|
@@ -3,7 +3,7 @@ import { c as customElement } from "../../chunks/runtime.js";
|
|
|
3
3
|
import { css, html } from "lit";
|
|
4
4
|
import { LitElement, safeClassMap, safeStyleMap, nothing } from "@arcgis/lumina";
|
|
5
5
|
import { g as guid } from "../../chunks/guid.js";
|
|
6
|
-
import {
|
|
6
|
+
import { d as getAncestors, e as getDepth } from "../../chunks/utils2.js";
|
|
7
7
|
const CSS = {
|
|
8
8
|
firstTitle: "first-title",
|
|
9
9
|
list: "list",
|
|
@@ -182,9 +182,7 @@ export abstract class Dialog extends LitElement {
|
|
|
182
182
|
*/
|
|
183
183
|
accessor scale: Scale;
|
|
184
184
|
/**
|
|
185
|
-
* When `true` and the component is `open`, disables top layer placement.
|
|
186
|
-
*
|
|
187
|
-
* Only set this if you need complex z-index control or if top layer placement causes conflicts with third-party components.
|
|
185
|
+
* When `true` and the component is `open`, disables top layer placement. Only set this if you need complex z-index control or if top layer placement causes conflicts with third-party components.
|
|
188
186
|
*
|
|
189
187
|
* @default false
|
|
190
188
|
* @see [MDN - Top Layer](https://developer.mozilla.org/en-US/docs/Glossary/Top_layer)
|
|
@@ -25,7 +25,7 @@ export abstract class Dropdown extends LitElement {
|
|
|
25
25
|
* @default false
|
|
26
26
|
*/
|
|
27
27
|
accessor disabled: boolean;
|
|
28
|
-
/** Specifies the component's fallback `placement` for slotted `calcite-dropdown-item`s when
|
|
28
|
+
/** Specifies the component's fallback `placement` for slotted `calcite-dropdown-item`s when its initial or specified `placement` has insufficient space available. */
|
|
29
29
|
accessor flipPlacements: FlipPlacement[];
|
|
30
30
|
/**
|
|
31
31
|
* Specifies the maximum number of `calcite-dropdown-item`s to display before showing a scrollbar.
|
|
@@ -87,9 +87,7 @@ export abstract class Dropdown extends LitElement {
|
|
|
87
87
|
/** The component's selected items. */
|
|
88
88
|
get selectedItems(): DropdownItem[];
|
|
89
89
|
/**
|
|
90
|
-
* When `true` and the component is `open`, disables top layer placement.
|
|
91
|
-
*
|
|
92
|
-
* Only set this if you need complex z-index control or if top layer placement causes conflicts with third-party components.
|
|
90
|
+
* When `true` and the component is `open`, disables top layer placement. Only set this if you need complex z-index control or if top layer placement causes conflicts with third-party components.
|
|
93
91
|
*
|
|
94
92
|
* @default false
|
|
95
93
|
* @see [MDN - Top Layer](https://developer.mozilla.org/en-US/docs/Glossary/Top_layer)
|
|
@@ -108,7 +108,7 @@ class Filter extends LitElement {
|
|
|
108
108
|
}
|
|
109
109
|
render() {
|
|
110
110
|
const { disabled, scale } = this;
|
|
111
|
-
return this.interactiveContainer({ disabled, children: html`<div class=${safeClassMap(CSS.container)}><label><calcite-input clearable .disabled=${disabled} .icon=${ICONS.search} .label=${this.label ?? this.messages.label} .messageOverrides=${{ clear: this.messages.clear }} @
|
|
111
|
+
return this.interactiveContainer({ disabled, children: html`<div class=${safeClassMap(CSS.container)}><label><calcite-input clearable .disabled=${disabled} .icon=${ICONS.search} .label=${this.label ?? this.messages.label} .messageOverrides=${{ clear: this.messages.clear }} @calciteInputInput=${this.inputHandler} @keydown=${this.keyDownHandler} .placeholder=${this.placeholder} .scale=${scale} type=text .value=${this.value} ${ref(this.textInputRef)}></calcite-input></label></div>` });
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
customElement("calcite-filter", Filter);
|
|
@@ -85,7 +85,7 @@ export abstract class FlowItem extends LitElement {
|
|
|
85
85
|
* @default false
|
|
86
86
|
*/
|
|
87
87
|
accessor collapsible: boolean;
|
|
88
|
-
/** Specifies a the component
|
|
88
|
+
/** Specifies a description for the component. */
|
|
89
89
|
accessor description: string;
|
|
90
90
|
/**
|
|
91
91
|
* When `true`, prevents interaction and decreases the component's opacity.
|
|
@@ -153,9 +153,7 @@ export abstract class FlowItem extends LitElement {
|
|
|
153
153
|
*/
|
|
154
154
|
accessor showBackButton: boolean;
|
|
155
155
|
/**
|
|
156
|
-
* When `true` and the component is `open`, disables top layer placement.
|
|
157
|
-
*
|
|
158
|
-
* Only set this if you need complex z-index control or if top layer placement causes conflicts with third-party components.
|
|
156
|
+
* When `true` and the component is `open`, disables top layer placement. Only set this if you need complex z-index control or if top layer placement causes conflicts with third-party components.
|
|
159
157
|
*
|
|
160
158
|
* @default false
|
|
161
159
|
* @see [MDN - Top Layer](https://developer.mozilla.org/en-US/docs/Glossary/Top_layer)
|
|
@@ -19,7 +19,7 @@ export abstract class Icon extends LitElement {
|
|
|
19
19
|
*
|
|
20
20
|
* @see [Calcite UI Icons](https://developers.arcgis.com/calcite-design-system/icons).
|
|
21
21
|
*/
|
|
22
|
-
accessor icon: IconName;
|
|
22
|
+
accessor icon: IconName | null;
|
|
23
23
|
/**
|
|
24
24
|
* When `true`, preloads the `icon` data.
|
|
25
25
|
*
|
|
@@ -37,5 +37,5 @@ export abstract class Icon extends LitElement {
|
|
|
37
37
|
*
|
|
38
38
|
* It is recommended to set this value if your icon is semantic.
|
|
39
39
|
*/
|
|
40
|
-
accessor textLabel: string;
|
|
40
|
+
accessor textLabel: string | undefined;
|
|
41
41
|
}
|
|
@@ -103,7 +103,7 @@ class Icon extends LitElement {
|
|
|
103
103
|
disconnectedCallback() {
|
|
104
104
|
super.disconnectedCallback();
|
|
105
105
|
this.intersectionObserver?.disconnect();
|
|
106
|
-
this.intersectionObserver =
|
|
106
|
+
this.intersectionObserver = void 0;
|
|
107
107
|
}
|
|
108
108
|
async loadIconPathData() {
|
|
109
109
|
const { icon, scale, visible } = this;
|
|
@@ -121,8 +121,8 @@ class Icon extends LitElement {
|
|
|
121
121
|
this.intersectionObserver = createObserver("intersection", (entries) => {
|
|
122
122
|
entries.forEach((entry) => {
|
|
123
123
|
if (entry.isIntersecting) {
|
|
124
|
-
this.intersectionObserver
|
|
125
|
-
this.intersectionObserver =
|
|
124
|
+
this.intersectionObserver?.disconnect();
|
|
125
|
+
this.intersectionObserver = void 0;
|
|
126
126
|
callback();
|
|
127
127
|
}
|
|
128
128
|
});
|
|
@@ -138,7 +138,7 @@ class Icon extends LitElement {
|
|
|
138
138
|
const dir = this.direction;
|
|
139
139
|
const size = scaleToPx[scale];
|
|
140
140
|
const semantic = !!textLabel;
|
|
141
|
-
const paths =
|
|
141
|
+
const paths = Array.isArray(pathData) ? pathData : [pathData ?? ""];
|
|
142
142
|
this.el.ariaHidden = toAriaBoolean(!semantic);
|
|
143
143
|
this.el.ariaLabel = semantic ? textLabel : null;
|
|
144
144
|
this.el.role = semantic ? "img" : null;
|
|
@@ -13,7 +13,7 @@ import type { Scale } from "../interfaces.js";
|
|
|
13
13
|
*/
|
|
14
14
|
export abstract class InlineEditable extends LitElement {
|
|
15
15
|
/** Specifies a callback to be executed prior to disabling editing via the controls. When provided, the component's loading state will be handled automatically. */
|
|
16
|
-
accessor afterConfirm: () => Promise<void
|
|
16
|
+
accessor afterConfirm: (() => Promise<void>) | undefined;
|
|
17
17
|
/**
|
|
18
18
|
* When `true` and `editingEnabled` is `true`, displays save and cancel controls.
|
|
19
19
|
*
|
|
@@ -30,6 +30,8 @@ class InlineEditable extends LitElement {
|
|
|
30
30
|
this.cancelEditingButtonRef = createRef();
|
|
31
31
|
this._editingEnabled = false;
|
|
32
32
|
this.enableEditingButtonRef = createRef();
|
|
33
|
+
this.shouldEmitCancel = false;
|
|
34
|
+
this.valuePriorToEditing = "";
|
|
33
35
|
this.messages = useT9n();
|
|
34
36
|
this.focusSetter = useSetFocus()(this);
|
|
35
37
|
this.interactiveContainer = useInteractive(this);
|
|
@@ -102,7 +104,7 @@ class InlineEditable extends LitElement {
|
|
|
102
104
|
this.setFocus();
|
|
103
105
|
}
|
|
104
106
|
enableEditing() {
|
|
105
|
-
this.valuePriorToEditing = this.inputEl?.value;
|
|
107
|
+
this.valuePriorToEditing = this.inputEl?.value ?? "";
|
|
106
108
|
this.editingEnabled = true;
|
|
107
109
|
this.inputEl?.setFocus();
|
|
108
110
|
this.calciteInternalInlineEditableEnableEditingChange.emit();
|
|
@@ -131,7 +133,7 @@ class InlineEditable extends LitElement {
|
|
|
131
133
|
if (event.key === "Tab" && this.shouldShowControls) {
|
|
132
134
|
if (!event.shiftKey && event.target === this.inputEl) {
|
|
133
135
|
event.preventDefault();
|
|
134
|
-
this.cancelEditingButtonRef.value
|
|
136
|
+
this.cancelEditingButtonRef.value?.setFocus();
|
|
135
137
|
}
|
|
136
138
|
if (!!event.shiftKey && event.target === this.cancelEditingButtonRef.value) {
|
|
137
139
|
event.preventDefault();
|
|
@@ -35,7 +35,7 @@ export abstract class Input extends LitElement {
|
|
|
35
35
|
*
|
|
36
36
|
* @see [MDN - step](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern)
|
|
37
37
|
*/
|
|
38
|
-
accessor accept: string;
|
|
38
|
+
accessor accept: string | undefined;
|
|
39
39
|
/**
|
|
40
40
|
* Specifies the text alignment of the component's `value`.
|
|
41
41
|
*
|
|
@@ -48,7 +48,7 @@ export abstract class Input extends LitElement {
|
|
|
48
48
|
*
|
|
49
49
|
* @see [MDN - autocomplete](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete)
|
|
50
50
|
*/
|
|
51
|
-
accessor autocomplete: AutoFill;
|
|
51
|
+
accessor autocomplete: AutoFill | undefined;
|
|
52
52
|
/**
|
|
53
53
|
* When `true` and the component has a `value`, a clear button is displayed. The clear button shows by default for `"search"`, `"time"`, and `"date"` types.
|
|
54
54
|
*
|
|
@@ -68,12 +68,8 @@ export abstract class Input extends LitElement {
|
|
|
68
68
|
* @see [MDN - files](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/files)
|
|
69
69
|
*/
|
|
70
70
|
accessor files: FileList | undefined;
|
|
71
|
-
/**
|
|
72
|
-
|
|
73
|
-
*
|
|
74
|
-
* When not set, the component is associated with its ancestor form element, if one exists.
|
|
75
|
-
*/
|
|
76
|
-
accessor form: string;
|
|
71
|
+
/** Specifies the `id` of the component's associated form. When not set, the component is associated with its ancestor form element, if one exists. */
|
|
72
|
+
accessor form: string | undefined;
|
|
77
73
|
/**
|
|
78
74
|
* When `true`, number values are displayed with a group separator corresponding to the language and country format.
|
|
79
75
|
*
|
|
@@ -81,7 +77,7 @@ export abstract class Input extends LitElement {
|
|
|
81
77
|
*/
|
|
82
78
|
accessor groupSeparator: boolean;
|
|
83
79
|
/** When `true`, displays a default recommended icon. Alternatively, pass a Calcite UI Icon name to display a specific icon. */
|
|
84
|
-
accessor icon: IconName | boolean;
|
|
80
|
+
accessor icon: IconName | boolean | undefined;
|
|
85
81
|
/**
|
|
86
82
|
* When `true` and the element direction is right-to-left (`"rtl"`), flips the component`s `icon`.
|
|
87
83
|
*
|
|
@@ -89,9 +85,9 @@ export abstract class Input extends LitElement {
|
|
|
89
85
|
*/
|
|
90
86
|
accessor iconFlipRtl: boolean;
|
|
91
87
|
/** Specifies an accessible label for the component. */
|
|
92
|
-
accessor label: string;
|
|
88
|
+
accessor label: string | undefined;
|
|
93
89
|
/** Specifies the component's label text. */
|
|
94
|
-
accessor labelText: string;
|
|
90
|
+
accessor labelText: string | undefined;
|
|
95
91
|
/**
|
|
96
92
|
* When `true`, a busy indicator is displayed.
|
|
97
93
|
*
|
|
@@ -104,17 +100,20 @@ export abstract class Input extends LitElement {
|
|
|
104
100
|
*
|
|
105
101
|
* @see [MDN - max](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#max)
|
|
106
102
|
*/
|
|
107
|
-
accessor max: number;
|
|
103
|
+
accessor max: number | undefined;
|
|
108
104
|
/**
|
|
109
105
|
* When the component resides in a form,
|
|
110
106
|
* specifies the maximum length of text for the component's `value`.
|
|
111
107
|
*
|
|
112
108
|
* @see [MDN - maxlength](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#maxlength)
|
|
113
109
|
*/
|
|
114
|
-
accessor maxLength: number;
|
|
110
|
+
accessor maxLength: number | undefined;
|
|
115
111
|
/** Overrides individual strings used by the component. */
|
|
116
112
|
accessor messageOverrides: {
|
|
113
|
+
cancelInlineEditing?: string;
|
|
117
114
|
clear?: string;
|
|
115
|
+
confirmInlineEditingChanges?: string;
|
|
116
|
+
enableInlineEditing?: string;
|
|
118
117
|
loading?: string;
|
|
119
118
|
required?: string;
|
|
120
119
|
};
|
|
@@ -124,14 +123,14 @@ export abstract class Input extends LitElement {
|
|
|
124
123
|
*
|
|
125
124
|
* @see [MDN - min](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#min)
|
|
126
125
|
*/
|
|
127
|
-
accessor min: number;
|
|
126
|
+
accessor min: number | undefined;
|
|
128
127
|
/**
|
|
129
128
|
* When the component resides in a form,
|
|
130
129
|
* specifies the minimum length of text for the component's `value`.
|
|
131
130
|
*
|
|
132
131
|
* @see [MDN - minlength](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#minlength)
|
|
133
132
|
*/
|
|
134
|
-
accessor minLength: number;
|
|
133
|
+
accessor minLength: number | undefined;
|
|
135
134
|
/**
|
|
136
135
|
* When `true` and `type` is `"email"` or `"file"`, the component can accept more than one value.
|
|
137
136
|
* Read the native attribute's documentation on MDN for more info.
|
|
@@ -147,7 +146,7 @@ export abstract class Input extends LitElement {
|
|
|
147
146
|
*
|
|
148
147
|
* @see [MDN - name](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#name)
|
|
149
148
|
*/
|
|
150
|
-
accessor name: string;
|
|
149
|
+
accessor name: string | undefined;
|
|
151
150
|
/**
|
|
152
151
|
* When `type="number"`, specifies the placement of the buttons.
|
|
153
152
|
*
|
|
@@ -155,7 +154,7 @@ export abstract class Input extends LitElement {
|
|
|
155
154
|
*/
|
|
156
155
|
accessor numberButtonType: InputPlacement;
|
|
157
156
|
/** Specifies the Unicode numeral system used by the component for localization. */
|
|
158
|
-
accessor numberingSystem: NumberingSystem;
|
|
157
|
+
accessor numberingSystem: NumberingSystem | undefined;
|
|
159
158
|
/**
|
|
160
159
|
* When the component resides in a form,
|
|
161
160
|
* specifies a regular expression (regex) pattern the component's `value` must match for validation.
|
|
@@ -163,15 +162,15 @@ export abstract class Input extends LitElement {
|
|
|
163
162
|
*
|
|
164
163
|
* @see [MDN - step](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern)
|
|
165
164
|
*/
|
|
166
|
-
accessor pattern: string;
|
|
165
|
+
accessor pattern: string | undefined;
|
|
167
166
|
/**
|
|
168
167
|
* Specifies the component's placeholder text.
|
|
169
168
|
*
|
|
170
169
|
* @see [MDN - placeholder](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#placeholder)
|
|
171
170
|
*/
|
|
172
|
-
accessor placeholder: string;
|
|
171
|
+
accessor placeholder: string | undefined;
|
|
173
172
|
/** Specifies text to display at the start of the component. */
|
|
174
|
-
accessor prefixText: string;
|
|
173
|
+
accessor prefixText: string | undefined;
|
|
175
174
|
/**
|
|
176
175
|
* When `true`, the component's `value` can be read, but cannot be modified.
|
|
177
176
|
*
|
|
@@ -203,9 +202,9 @@ export abstract class Input extends LitElement {
|
|
|
203
202
|
*
|
|
204
203
|
* @see [MDN - step](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/step)
|
|
205
204
|
*/
|
|
206
|
-
accessor step: number | "any";
|
|
205
|
+
accessor step: number | "any" | undefined;
|
|
207
206
|
/** Specifies text to display at the end of the component. */
|
|
208
|
-
accessor suffixText: string;
|
|
207
|
+
accessor suffixText: string | undefined;
|
|
209
208
|
/**
|
|
210
209
|
* Specifies the component type.
|
|
211
210
|
*
|
|
@@ -215,9 +214,9 @@ export abstract class Input extends LitElement {
|
|
|
215
214
|
*/
|
|
216
215
|
accessor type: "color" | "date" | "datetime-local" | "email" | "file" | "image" | "month" | "number" | "password" | "search" | "tel" | "text" | "time" | "url" | "week";
|
|
217
216
|
/** Specifies the validation icon to display under the component. */
|
|
218
|
-
accessor validationIcon: IconName | boolean;
|
|
217
|
+
accessor validationIcon: IconName | boolean | undefined;
|
|
219
218
|
/** Specifies the validation message to display under the component. */
|
|
220
|
-
accessor validationMessage: string;
|
|
219
|
+
accessor validationMessage: string | undefined;
|
|
221
220
|
/**
|
|
222
221
|
* The component's current validation state.
|
|
223
222
|
*
|
|
@@ -138,7 +138,7 @@ class Input extends LitElement {
|
|
|
138
138
|
}
|
|
139
139
|
connectedCallback() {
|
|
140
140
|
super.connectedCallback();
|
|
141
|
-
this.inlineEditableEl = this.el.closest("calcite-inline-editable");
|
|
141
|
+
this.inlineEditableEl = this.el.closest("calcite-inline-editable") ?? void 0;
|
|
142
142
|
if (this.inlineEditableEl) {
|
|
143
143
|
this.editingEnabled = this.inlineEditableEl.editingEnabled || false;
|
|
144
144
|
}
|
|
@@ -165,10 +165,10 @@ class Input extends LitElement {
|
|
|
165
165
|
}
|
|
166
166
|
willUpdate(changes) {
|
|
167
167
|
if (changes.has("max")) {
|
|
168
|
-
this.maxString = this.max?.toString()
|
|
168
|
+
this.maxString = this.max?.toString() ?? void 0;
|
|
169
169
|
}
|
|
170
170
|
if (changes.has("min")) {
|
|
171
|
-
this.minString = this.min?.toString()
|
|
171
|
+
this.minString = this.min?.toString() ?? void 0;
|
|
172
172
|
}
|
|
173
173
|
if (changes.has("icon") || changes.has("type") && (this.hasUpdated || this.type !== "text")) {
|
|
174
174
|
this.requestedIcon = setRequestedIcon(INPUT_TYPE_ICONS, this.icon, this.type);
|
|
@@ -279,7 +279,7 @@ class Input extends LitElement {
|
|
|
279
279
|
return;
|
|
280
280
|
}
|
|
281
281
|
if (this.type === "file") {
|
|
282
|
-
this.files = this.childRef.value.files;
|
|
282
|
+
this.files = this.childRef.value.files ?? void 0;
|
|
283
283
|
}
|
|
284
284
|
this.setValue({
|
|
285
285
|
nativeEvent,
|
|
@@ -318,7 +318,9 @@ class Input extends LitElement {
|
|
|
318
318
|
origin: "user",
|
|
319
319
|
value: parseNumberString(delocalizedValue)
|
|
320
320
|
});
|
|
321
|
-
this.childNumberRef.value
|
|
321
|
+
if (this.childNumberRef.value) {
|
|
322
|
+
this.childNumberRef.value.value = this.displayedValue;
|
|
323
|
+
}
|
|
322
324
|
} else {
|
|
323
325
|
this.setValue({
|
|
324
326
|
nativeEvent,
|
|
@@ -373,26 +375,26 @@ class Input extends LitElement {
|
|
|
373
375
|
useGrouping: this.groupSeparator
|
|
374
376
|
};
|
|
375
377
|
if (event.key === numberStringFormatter.decimal) {
|
|
376
|
-
if (!this.value && !this.childNumberRef.value
|
|
378
|
+
if (!this.value && !this.childNumberRef.value?.value) {
|
|
377
379
|
return;
|
|
378
380
|
}
|
|
379
|
-
if (this.value && this.childNumberRef.value
|
|
381
|
+
if (this.value && this.childNumberRef.value?.value.indexOf(numberStringFormatter.decimal) === -1) {
|
|
380
382
|
return;
|
|
381
383
|
}
|
|
382
384
|
}
|
|
383
385
|
if (/[eE]/.test(event.key)) {
|
|
384
|
-
if (!this.value && !this.childNumberRef.value
|
|
386
|
+
if (!this.value && !this.childNumberRef.value?.value) {
|
|
385
387
|
return;
|
|
386
388
|
}
|
|
387
|
-
if (this.value && !/[eE]/.test(this.childNumberRef.value.value)) {
|
|
389
|
+
if (this.value && this.childNumberRef.value && !/[eE]/.test(this.childNumberRef.value.value)) {
|
|
388
390
|
return;
|
|
389
391
|
}
|
|
390
392
|
}
|
|
391
393
|
if (event.key === "-") {
|
|
392
|
-
if (!this.value && !this.childNumberRef.value
|
|
394
|
+
if (!this.value && !this.childNumberRef.value?.value) {
|
|
393
395
|
return;
|
|
394
396
|
}
|
|
395
|
-
if (this.value && this.childNumberRef.value.value.split("-").length <= 2) {
|
|
397
|
+
if (this.value && this.childNumberRef.value && this.childNumberRef.value.value.split("-").length <= 2) {
|
|
396
398
|
return;
|
|
397
399
|
}
|
|
398
400
|
}
|
|
@@ -516,7 +518,7 @@ class Input extends LitElement {
|
|
|
516
518
|
const childEl = this.type !== "number" ? html`<input accept=${this.accept ?? nothing} aria-errormessage=${IDS.validationMessage} .ariaInvalid=${this.status === "invalid"} .ariaLabel=${getLabelText(this)} autocomplete=${this.autocomplete ?? nothing} .autofocus=${autofocus} class=${safeClassMap({
|
|
517
519
|
[CSS.editingEnabled]: this.editingEnabled,
|
|
518
520
|
[CSS.inlineChild]: !!this.inlineEditableEl
|
|
519
|
-
})} value=${this.defaultValue ?? nothing} .disabled=${this.disabled} enterkeyhint=${enterKeyHint ?? nothing} inputmode=${inputMode ?? nothing} max=${this.maxString ?? nothing} maxlength=${this.maxLength ?? nothing} min=${this.minString ?? nothing} minlength=${this.minLength ?? nothing} .multiple=${this.multiple} name=${this.name ?? nothing} @blur=${this.inputBlurHandler} @focus=${this.inputFocusHandler} @input=${this.inputInputHandler} @keydown=${this.inputKeyDownHandler} @keyup=${this.inputKeyUpHandler} pattern=${this.pattern ?? nothing} placeholder=${(this.placeholder || "") ?? nothing} .readOnly=${this.readOnly} .required=${this.required} spellcheck=${this.el.spellcheck ?? nothing} step=${this.step ?? nothing} tabindex=${(this.disabled || this.inlineEditableEl && !this.editingEnabled ? -1 :
|
|
521
|
+
})} value=${this.defaultValue ?? nothing} .disabled=${this.disabled} enterkeyhint=${enterKeyHint ?? nothing} inputmode=${inputMode ?? nothing} max=${this.maxString ?? nothing} maxlength=${this.maxLength ?? nothing} min=${this.minString ?? nothing} minlength=${this.minLength ?? nothing} .multiple=${this.multiple} name=${this.name ?? nothing} @blur=${this.inputBlurHandler} @focus=${this.inputFocusHandler} @input=${this.inputInputHandler} @keydown=${this.inputKeyDownHandler} @keyup=${this.inputKeyUpHandler} pattern=${this.pattern ?? nothing} placeholder=${(this.placeholder || "") ?? nothing} .readOnly=${this.readOnly} .required=${this.required} spellcheck=${this.el.spellcheck ?? nothing} step=${this.step ?? nothing} tabindex=${(this.disabled || this.inlineEditableEl && !this.editingEnabled ? -1 : void 0) ?? nothing} type=${this.type ?? nothing} .value=${live(this.value ?? "")} ${ref(this.childRef)}>` : null;
|
|
520
522
|
return this.interactiveContainer({ disabled: this.disabled, children: html`${this.labelText && InternalLabel({ labelText: this.labelText, onClick: this.onLabelClick, required: this.required, tooltipText: this.messages.required }) || ""}<div class=${safeClassMap({
|
|
521
523
|
[CSS.inputWrapper]: true,
|
|
522
524
|
[CSS_UTILITY.rtl]: dir === "rtl",
|