@esri/calcite-components 5.1.0-next.61 → 5.1.0-next.62
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/{V4UFOBN6.js → 2456UMRT.js} +1 -1
- package/dist/cdn/{3R4ULAV5.js → 2KTMYHAW.js} +1 -1
- package/dist/cdn/{DACPQES6.js → 2LF53GB4.js} +1 -1
- package/dist/cdn/{KUTCWUCT.js → 2P632G2E.js} +1 -1
- package/dist/cdn/{GZ532Z3A.js → 3267GWQD.js} +1 -1
- package/dist/cdn/{TQ4EMWFH.js → 3G3CIXEX.js} +1 -1
- package/dist/cdn/{MYDCGCGV.js → 3GV45XL7.js} +1 -1
- package/dist/cdn/{G5EDVDJN.js → 3ICV5SHE.js} +1 -1
- package/dist/cdn/{PVSY2FB5.js → 3JBKSYIS.js} +1 -1
- package/dist/cdn/{GS4P7CZ6.js → 3LQM4AAW.js} +1 -1
- package/dist/cdn/{QOSRAAKR.js → 4N52UXP2.js} +1 -1
- package/dist/cdn/{I2MVFTTS.js → 4UDQDHK5.js} +1 -1
- package/dist/cdn/{ATK6PI6Y.js → 5LCZW2JQ.js} +1 -1
- package/dist/cdn/{45UXS3RT.js → 5PKID2AH.js} +1 -1
- package/dist/cdn/{5NRNHAOT.js → 5U6ATQG2.js} +1 -1
- package/dist/cdn/{VYF67743.js → 66VJLV4W.js} +1 -1
- package/dist/cdn/{I5JGKSOP.js → 6PFKKSZI.js} +1 -1
- package/dist/cdn/{LZ27X6AP.js → 7H6OSVSN.js} +1 -1
- package/dist/cdn/{5RBJZDCW.js → A2DIOMIO.js} +1 -1
- package/dist/cdn/{CAGGDKGQ.js → AEJJ7V3Q.js} +1 -1
- package/dist/cdn/{VB5PPLXP.js → AFENOOWR.js} +1 -1
- package/dist/cdn/{XBPB6GCE.js → AHFXAGCE.js} +3 -3
- package/dist/cdn/{TOC2QZHZ.js → ASB2P36T.js} +1 -1
- package/dist/cdn/{LPFVHKB3.js → AVBTCVUC.js} +1 -1
- package/dist/cdn/{7SSHIFZA.js → AZBS776X.js} +1 -1
- package/dist/cdn/{N6P5V7JQ.js → B3FW2QQG.js} +1 -1
- package/dist/cdn/{6TTZSRPY.js → B47INK6Q.js} +1 -1
- package/dist/cdn/{CIUGR4AG.js → B6MITN2K.js} +1 -1
- package/dist/cdn/{BWGOISO2.js → B7C6K5PT.js} +1 -1
- package/dist/cdn/{3SYW63DP.js → BGDVANS5.js} +1 -1
- package/dist/cdn/{BPW3YZSA.js → BL6QXAIV.js} +1 -1
- package/dist/cdn/{N5X6SX5X.js → C5PHBALC.js} +1 -1
- package/dist/cdn/{7OTD22EB.js → C7TKNMVD.js} +1 -1
- package/dist/cdn/{6PGPW4U3.js → CZW6Z5FA.js} +1 -1
- package/dist/cdn/{E4766PJX.js → DJ4O4DWV.js} +1 -1
- package/dist/cdn/{FEOZCEUL.js → DLSWM3OM.js} +1 -1
- package/dist/cdn/{YHFKLTMV.js → DOSMWYGZ.js} +1 -1
- package/dist/cdn/{BBCZRAXL.js → E5MESPLW.js} +1 -1
- package/dist/cdn/{FPB4I6V3.js → EJXO3S2W.js} +1 -1
- package/dist/cdn/{2PP6M4EM.js → EN6ZD5OF.js} +1 -1
- package/dist/cdn/{EJE24FAS.js → EPRMGB6L.js} +1 -1
- package/dist/cdn/{HHYQ5CSO.js → FBXFQU7S.js} +1 -1
- package/dist/cdn/{FYDP2JUF.js → FFCH7PVK.js} +1 -1
- package/dist/cdn/{TKOBLH76.js → FMIJ6OQV.js} +1 -1
- package/dist/cdn/{OAKVIV3V.js → FTWL27SP.js} +1 -1
- package/dist/cdn/{AEYF7JUY.js → FWXQAY43.js} +1 -1
- package/dist/cdn/G23XNOBO.js +2 -0
- package/dist/cdn/{CBDAQLDM.js → GBN3633U.js} +1 -1
- package/dist/cdn/{TQHOYBNL.js → GHOEAWCM.js} +1 -1
- package/dist/cdn/{XALWGFUY.js → GLU53ZGB.js} +1 -1
- package/dist/cdn/{X3WUTG7G.js → GMICWUSH.js} +1 -1
- package/dist/cdn/{7D5QAR2D.js → GMRRH74L.js} +1 -1
- package/dist/cdn/{3G7XYB6W.js → GPMTIDBR.js} +1 -1
- package/dist/cdn/{FRA7Q463.js → GZGT4GLG.js} +1 -1
- package/dist/cdn/{VUECDKXP.js → HCXIF3OP.js} +1 -1
- package/dist/cdn/{52WHW2NV.js → HNFET2H6.js} +1 -1
- package/dist/cdn/{PB7BFHBD.js → HTB7GYZQ.js} +1 -1
- package/dist/cdn/{J3ZOZ66B.js → HWWLSUZX.js} +1 -1
- package/dist/cdn/{HKCWKF2E.js → I5C45WH2.js} +1 -1
- package/dist/cdn/{KIAEJJAU.js → I6TNSRCR.js} +1 -1
- package/dist/cdn/{CFFB5KBR.js → I7CKEJAQ.js} +1 -1
- package/dist/cdn/{7TYPTEUO.js → IHKBCO4P.js} +1 -1
- package/dist/cdn/{XWIKKEHN.js → IUSDNEJY.js} +1 -1
- package/dist/cdn/{B6C2VUVA.js → J3F7PUOE.js} +1 -1
- package/dist/cdn/{JLNU7XYB.js → J6IE5RA5.js} +1 -1
- package/dist/cdn/{RRWPSIBP.js → JA6HLFQV.js} +1 -1
- package/dist/cdn/{J6NA5WXY.js → JFB67ZZQ.js} +1 -1
- package/dist/cdn/{K3VO2DX3.js → JGOENALN.js} +1 -1
- package/dist/cdn/{BV4Q7DF7.js → JJGSG6YO.js} +1 -1
- package/dist/cdn/{QIAN72XU.js → K7XDIX5M.js} +1 -1
- package/dist/cdn/{55MBZL5L.js → KBPGN6ZH.js} +1 -1
- package/dist/cdn/{KPZKEOBT.js → L3SPHSWD.js} +1 -1
- package/dist/cdn/L3Y6BWR5.js +2 -0
- package/dist/cdn/{562RKTDK.js → L6MIVBMM.js} +1 -1
- package/dist/cdn/{V27H7YFB.js → LY7K6SCT.js} +1 -1
- package/dist/cdn/{P3PFZTXG.js → MBJOKQR6.js} +1 -1
- package/dist/cdn/{SYAOC57W.js → MRCKTLRG.js} +1 -1
- package/dist/cdn/{MTV62SLS.js → MWUSBIC2.js} +1 -1
- package/dist/cdn/{NDHZMLZD.js → N3HAQCT6.js} +1 -1
- package/dist/cdn/{HDWI7YLK.js → NG5VUKCT.js} +1 -1
- package/dist/cdn/{UL42RNNR.js → NGYSVNFH.js} +1 -1
- package/dist/cdn/{BB4YRNXH.js → NHH2NEOP.js} +1 -1
- package/dist/cdn/{BKFGRTKA.js → NNO62MLH.js} +1 -1
- package/dist/cdn/{B2TVMTK6.js → NXNOIDYZ.js} +1 -1
- package/dist/cdn/{4Y5PAWL2.js → OHQNMVVO.js} +1 -1
- package/dist/cdn/{BPE5SLWI.js → OISCWGNR.js} +1 -1
- package/dist/cdn/{432F3C6X.js → OJZLHJNK.js} +1 -1
- package/dist/cdn/{IO6EAMXC.js → OQ4Z2SCH.js} +1 -1
- package/dist/cdn/OQQJLO2I.js +2 -0
- package/dist/cdn/{THHEXAON.js → P5HAUIOI.js} +1 -1
- package/dist/cdn/{6ELKBP5R.js → PFLVX7RA.js} +1 -1
- package/dist/cdn/{24CRUZU7.js → PGZHXJMQ.js} +1 -1
- package/dist/cdn/{DLYP3NIU.js → PJ33FI62.js} +1 -1
- package/dist/cdn/{WAX52NHM.js → PJXZACOR.js} +1 -1
- package/dist/cdn/{L6D5G4PH.js → PNIYH7XD.js} +1 -1
- package/dist/cdn/{JZ6UIN5N.js → PY6PVTN6.js} +1 -1
- package/dist/cdn/{A4N2CCY5.js → QBAAXS5L.js} +1 -1
- package/dist/cdn/{KFJPR56Q.js → QH46LW6S.js} +1 -1
- package/dist/cdn/{JSV4G3DZ.js → QHNNYEVQ.js} +1 -1
- package/dist/cdn/{MCX3YRKM.js → QQXTZJLP.js} +1 -1
- package/dist/cdn/{7ELQVRBB.js → QVQEDT6H.js} +1 -1
- package/dist/cdn/{H5PDBFBD.js → QVQVNGVA.js} +1 -1
- package/dist/cdn/{XNYL74DD.js → R7MSRSPB.js} +1 -1
- package/dist/cdn/{YZQARQHE.js → RC3RB2VW.js} +1 -1
- package/dist/cdn/{SA737JVH.js → RD6THAYH.js} +1 -1
- package/dist/cdn/{PQM4JOP2.js → RE33LTVM.js} +1 -1
- package/dist/cdn/{FEOT4U4H.js → RL2KYS5O.js} +1 -1
- package/dist/cdn/{IQNGXNMD.js → RLNHANC2.js} +1 -1
- package/dist/cdn/{2C262SX5.js → RTG7EPX3.js} +1 -1
- package/dist/cdn/{NDCRHHU5.js → SA4YRMIE.js} +1 -1
- package/dist/cdn/{K6YCV7VU.js → SD36U6CI.js} +1 -1
- package/dist/cdn/{QM2QUQ6K.js → SGUS5ZQV.js} +1 -1
- package/dist/cdn/{DXV44RVX.js → SIZZ7WQ4.js} +1 -1
- package/dist/cdn/SJNDQ7TC.js +2 -0
- package/dist/cdn/{SXNSAXIE.js → SLL3ELBW.js} +1 -1
- package/dist/cdn/{6ABE4RHK.js → SMFSZPV5.js} +1 -1
- package/dist/cdn/{GWCMQXMH.js → SXJ7IEBH.js} +1 -1
- package/dist/cdn/{N7ZZAOXK.js → TB6XPCPQ.js} +1 -1
- package/dist/cdn/{S4DCY5II.js → TBJB7W5S.js} +1 -1
- package/dist/cdn/{OLUFWQ3T.js → TRY7YNZT.js} +1 -1
- package/dist/cdn/{JKUIS3HG.js → TSCLVZQM.js} +1 -1
- package/dist/cdn/{RXQFAYCF.js → TTAONSUU.js} +1 -1
- package/dist/cdn/{V5NGKYQX.js → UIUVKU2D.js} +1 -1
- package/dist/cdn/V2ZWESGR.js +2 -0
- package/dist/cdn/{62ZHSWM4.js → VEZNGDUO.js} +1 -1
- package/dist/cdn/{Z3KSPCNP.js → VKHCA6NQ.js} +1 -1
- package/dist/cdn/{D7CVIMMH.js → VM3QUD5F.js} +1 -1
- package/dist/cdn/{QUU7OA3L.js → VQVA24SC.js} +1 -1
- package/dist/cdn/{MYAF7KQG.js → VSUNQZ5W.js} +1 -1
- package/dist/cdn/{BEKIVNIV.js → VW6XUMIE.js} +1 -1
- package/dist/cdn/{RY3WILWW.js → W7GPI4BG.js} +1 -1
- package/dist/cdn/{6MT7Z75P.js → WCQUYGWM.js} +1 -1
- package/dist/cdn/{KMV4MSCP.js → WIRFNL6Q.js} +1 -1
- package/dist/cdn/{OW22V3CN.js → WOES5LWQ.js} +1 -1
- package/dist/cdn/{KLEO54DZ.js → WWS67KOX.js} +1 -1
- package/dist/cdn/{FDA2HEEU.js → WXKFFPLR.js} +1 -1
- package/dist/cdn/{7W4VZ63Q.js → XC7SC3HR.js} +1 -1
- package/dist/cdn/{TLJNCGWA.js → XKG3LNT2.js} +1 -1
- package/dist/cdn/{VGH4MGHG.js → YIX6JSV2.js} +1 -1
- package/dist/cdn/{U6X3AKZ4.js → YKW3TVW3.js} +1 -1
- package/dist/cdn/{KO34TYAW.js → YOPS33PA.js} +1 -1
- package/dist/cdn/{EDK4CIKN.js → YSQVHYFC.js} +1 -1
- package/dist/cdn/{LDHR3HDV.js → Z2QLYWHS.js} +1 -1
- package/dist/cdn/{N5WAVHRO.js → ZGTGVG23.js} +1 -1
- package/dist/cdn/{UH7ME6US.js → ZZDA66AR.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/resources5.js +1 -2
- package/dist/chunks/runtime.js +4 -4
- package/dist/chunks/useFocusTrap.js +45 -28
- package/dist/chunks/useForm.js +33 -14
- package/dist/components/calcite-combobox/customElement.js +33 -133
- package/dist/components/calcite-focus-trap/customElement.d.ts +46 -0
- package/dist/components/calcite-focus-trap/customElement.js +56 -0
- package/dist/components/calcite-focus-trap/index.d.ts +1 -0
- package/dist/components/calcite-focus-trap/index.js +1 -0
- package/dist/components/calcite-radio-button/customElement.d.ts +14 -1
- package/dist/components/calcite-radio-button/customElement.js +4 -3
- package/dist/components/calcite-radio-button-group/customElement.js +20 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +10 -0
- package/dist/loader.js +2 -1
- package/dist/types/lumina.d.ts +7 -1
- package/dist/types/preact.d.ts +8 -1
- package/dist/types/react.d.ts +9 -1
- package/dist/types/stencil.d.ts +7 -1
- package/package.json +2 -2
- package/dist/cdn/3PNK54IV.js +0 -2
- package/dist/cdn/KUQ4U67J.js +0 -2
- package/dist/cdn/W6MK2ZLN.js +0 -2
- package/dist/cdn/YKK5VHKP.js +0 -2
package/dist/index.d.ts
CHANGED
|
@@ -79,6 +79,7 @@ import type { Fab } from "./components/calcite-fab/customElement.js";
|
|
|
79
79
|
import type { Filter } from "./components/calcite-filter/customElement.js";
|
|
80
80
|
import type { Flow } from "./components/calcite-flow/customElement.js";
|
|
81
81
|
import type { FlowItem } from "./components/calcite-flow-item/customElement.js";
|
|
82
|
+
import type { FocusTrap } from "./components/calcite-focus-trap/customElement.js";
|
|
82
83
|
import type { Graph } from "./components/calcite-graph/customElement.js";
|
|
83
84
|
import type { Handle } from "./components/calcite-handle/customElement.js";
|
|
84
85
|
import type { Icon } from "./components/calcite-icon/customElement.js";
|
|
@@ -282,6 +283,11 @@ export interface CalciteFlowItemCustomEvent<T> extends CustomEvent<T> {
|
|
|
282
283
|
target: FlowItem;
|
|
283
284
|
currentTarget: FlowItem;
|
|
284
285
|
}
|
|
286
|
+
export interface CalciteFocusTrapCustomEvent<T> extends CustomEvent<T> {
|
|
287
|
+
detail: T;
|
|
288
|
+
target: FocusTrap;
|
|
289
|
+
currentTarget: FocusTrap;
|
|
290
|
+
}
|
|
285
291
|
export interface CalciteHandleCustomEvent<T> extends CustomEvent<T> {
|
|
286
292
|
detail: T;
|
|
287
293
|
target: Handle;
|
|
@@ -541,6 +547,7 @@ declare global {
|
|
|
541
547
|
"calcite-filter": Filter;
|
|
542
548
|
"calcite-flow": Flow;
|
|
543
549
|
"calcite-flow-item": FlowItem;
|
|
550
|
+
"calcite-focus-trap": FocusTrap;
|
|
544
551
|
"calcite-graph": Graph;
|
|
545
552
|
"calcite-handle": Handle;
|
|
546
553
|
"calcite-icon": Icon;
|
|
@@ -716,6 +723,9 @@ declare global {
|
|
|
716
723
|
type HTMLCalciteFlowItemElementEventMap = FlowItem["@eventTypes"];
|
|
717
724
|
type HTMLCalciteFlowItemElement = FlowItem;
|
|
718
725
|
|
|
726
|
+
type HTMLCalciteFocusTrapElementEventMap = FocusTrap["@eventTypes"];
|
|
727
|
+
type HTMLCalciteFocusTrapElement = FocusTrap;
|
|
728
|
+
|
|
719
729
|
type HTMLCalciteGraphElement = Graph;
|
|
720
730
|
|
|
721
731
|
type HTMLCalciteHandleElementEventMap = Handle["@eventTypes"];
|
package/dist/loader.js
CHANGED
|
@@ -43,6 +43,7 @@ const defineCustomElements = makeDefineCustomElements(runtime, {
|
|
|
43
43
|
"calcite-filter": [() => import("./components/calcite-filter/customElement.js"), "disabled,filteredItems:,filterProps:,items:,label,messageOverrides:,placeholder,scale,value;filter,setFocus"],
|
|
44
44
|
"calcite-flow": [() => import("./components/calcite-flow/customElement.js"), "customItemSelectors;back,setFocus"],
|
|
45
45
|
"calcite-flow-item": [() => import("./components/calcite-flow-item/customElement.js"), "beforeBack:,beforeClose:,closable,closed,collapsed,collapseDirection,collapsible,description,disabled,heading,headingLevel,icon,iconFlipRtl,loading,menuOpen,messageOverrides:,overlayPositioning,scale,selected,showBackButton,topLayerDisabled;scrollContentTo,setFocus"],
|
|
46
|
+
"calcite-focus-trap": [() => import("./components/calcite-focus-trap/customElement.js"), "active:,focusTrapDisabled,focusTrapDisabledOverride:,focusTrapOptions:;activate,deactivate,updateFocusTrapElements"],
|
|
46
47
|
"calcite-graph": [() => import("./components/calcite-graph/customElement.js"), "colorStops:,data:,highlightMax,highlightMin,max,min"],
|
|
47
48
|
"calcite-handle": [() => import("./components/calcite-handle/customElement.js"), "blurUnselectDisabled,disabled,dragHandle,label,messageOverrides:,selected,setPosition,setSize;setFocus"],
|
|
48
49
|
"calcite-icon": [() => import("./components/calcite-icon/customElement.js"), "flipRtl,icon,preload,scale,textLabel"],
|
|
@@ -73,7 +74,7 @@ const defineCustomElements = makeDefineCustomElements(runtime, {
|
|
|
73
74
|
"calcite-panel": [() => import("./components/calcite-panel/customElement.js"), "beforeClose:,closable,closed,collapsed,collapseDirection,collapsible,description,disabled,heading,headingLevel,icon,iconFlipRtl,loading,menuFlipPlacements:,menuOpen,menuPlacement,messageOverrides:,overlayPositioning,scale,topLayerDisabled;scrollContentTo,setFocus"],
|
|
74
75
|
"calcite-popover": [() => import("./components/calcite-popover/customElement.js"), "autoClose,closable,flipDisabled,flipPlacements:,focusTrapDisabled,focusTrapOptions:,heading,headingLevel,label,messageOverrides:,offsetDistance,offsetSkidding,open,overlayPositioning,placement,pointerDisabled,referenceElement,scale,topLayerDisabled,triggerDisabled;reposition,setFocus,updateFocusTrapElements"],
|
|
75
76
|
"calcite-progress": [() => import("./components/calcite-progress/customElement.js"), "label,reversed,text,type,value"],
|
|
76
|
-
"calcite-radio-button": [() => import("./components/calcite-radio-button/customElement.js"), "checked,disabled,focused,form,hovered,label,labelText,name,required,scale,validity:,value;emitCheckedChange,setFocus,setValidity", 1],
|
|
77
|
+
"calcite-radio-button": [() => import("./components/calcite-radio-button/customElement.js"), "checked,disabled,focused,form,hovered,label,labelText,name,required,scale,status,validationMessage,validity:,value;emitCheckedChange,setFocus,setValidity", 1],
|
|
77
78
|
"calcite-radio-button-group": [() => import("./components/calcite-radio-button-group/customElement.js"), "disabled,labelText,layout,messageOverrides:,name,required,scale,selectedItem:,status,validationIcon,validationMessage;setFocus"],
|
|
78
79
|
"calcite-rating": [() => import("./components/calcite-rating/customElement.js"), "average,count,disabled,form,labelText,messageOverrides:,name,readOnly,required,scale,showChip,status,validationIcon,validationMessage,validity:,value;setFocus", 1],
|
|
79
80
|
"calcite-scrim": [() => import("./components/calcite-scrim/customElement.js"), "loading,messageOverrides:"],
|
package/dist/types/lumina.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ import type { Fab } from "../components/calcite-fab/customElement.js";
|
|
|
39
39
|
import type { Filter } from "../components/calcite-filter/customElement.js";
|
|
40
40
|
import type { Flow } from "../components/calcite-flow/customElement.js";
|
|
41
41
|
import type { FlowItem } from "../components/calcite-flow-item/customElement.js";
|
|
42
|
+
import type { FocusTrap } from "../components/calcite-focus-trap/customElement.js";
|
|
42
43
|
import type { Graph } from "../components/calcite-graph/customElement.js";
|
|
43
44
|
import type { Handle } from "../components/calcite-handle/customElement.js";
|
|
44
45
|
import type { Icon } from "../components/calcite-icon/customElement.js";
|
|
@@ -312,6 +313,10 @@ interface LuminaCalciteFlowItem extends Partial<Pick<FlowItem, "beforeBack" | "b
|
|
|
312
313
|
oncalciteFlowItemToggle?: EventHandler<FlowItem["calciteFlowItemToggle"]>;
|
|
313
314
|
}
|
|
314
315
|
|
|
316
|
+
interface LuminaCalciteFocusTrap extends Partial<Pick<FocusTrap, "focusTrapDisabled" | "focusTrapDisabledOverride" | "focusTrapOptions">>, h.JSX.HTMLAttributes<FocusTrap> {
|
|
317
|
+
oncalciteFocusTrapActiveChange?: EventHandler<FocusTrap["calciteFocusTrapActiveChange"]>;
|
|
318
|
+
}
|
|
319
|
+
|
|
315
320
|
interface LuminaCalciteGraph extends Required<Pick<Graph, "max" | "min">>, Partial<Pick<Graph, "colorStops" | "data" | "highlightMax" | "highlightMin">>, h.JSX.HTMLAttributes<Graph> {
|
|
316
321
|
}
|
|
317
322
|
|
|
@@ -458,7 +463,7 @@ interface LuminaCalcitePopover extends Required<Pick<Popover, "label" | "referen
|
|
|
458
463
|
interface LuminaCalciteProgress extends Partial<Pick<Progress, "label" | "reversed" | "text" | "type" | "value">>, h.JSX.HTMLAttributes<Progress> {
|
|
459
464
|
}
|
|
460
465
|
|
|
461
|
-
interface LuminaCalciteRadioButton extends Required<Pick<RadioButton, "value">>, Partial<Pick<RadioButton, "checked" | "disabled" | "form" | "labelText" | "name" | "required" | "scale">>, h.JSX.HTMLAttributes<RadioButton> {
|
|
466
|
+
interface LuminaCalciteRadioButton extends Required<Pick<RadioButton, "value">>, Partial<Pick<RadioButton, "checked" | "disabled" | "form" | "labelText" | "name" | "required" | "scale" | "status" | "validationMessage">>, h.JSX.HTMLAttributes<RadioButton> {
|
|
462
467
|
oncalciteRadioButtonChange?: EventHandler<RadioButton["calciteRadioButtonChange"]>;
|
|
463
468
|
}
|
|
464
469
|
|
|
@@ -653,6 +658,7 @@ declare module "@arcgis/lumina" {
|
|
|
653
658
|
"calcite-filter": LuminaCalciteFilter;
|
|
654
659
|
"calcite-flow": LuminaCalciteFlow;
|
|
655
660
|
"calcite-flow-item": LuminaCalciteFlowItem;
|
|
661
|
+
"calcite-focus-trap": LuminaCalciteFocusTrap;
|
|
656
662
|
"calcite-graph": LuminaCalciteGraph;
|
|
657
663
|
"calcite-handle": LuminaCalciteHandle;
|
|
658
664
|
"calcite-icon": LuminaCalciteIcon;
|
package/dist/types/preact.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ import type { Fab } from "../components/calcite-fab/customElement.js";
|
|
|
39
39
|
import type { Filter } from "../components/calcite-filter/customElement.js";
|
|
40
40
|
import type { Flow } from "../components/calcite-flow/customElement.js";
|
|
41
41
|
import type { FlowItem } from "../components/calcite-flow-item/customElement.js";
|
|
42
|
+
import type { FocusTrap } from "../components/calcite-focus-trap/customElement.js";
|
|
42
43
|
import type { Graph } from "../components/calcite-graph/customElement.js";
|
|
43
44
|
import type { Handle } from "../components/calcite-handle/customElement.js";
|
|
44
45
|
import type { Icon } from "../components/calcite-icon/customElement.js";
|
|
@@ -313,6 +314,10 @@ interface PreactCalciteFlowItem extends Partial<Pick<FlowItem, "beforeBack" | "b
|
|
|
313
314
|
oncalciteFlowItemToggle?: EventHandler<FlowItem["calciteFlowItemToggle"]>;
|
|
314
315
|
}
|
|
315
316
|
|
|
317
|
+
interface PreactCalciteFocusTrap extends Partial<Pick<FocusTrap, "focusTrapDisabled" | "focusTrapDisabledOverride" | "focusTrapOptions">>, HTMLAttributes<FocusTrap> {
|
|
318
|
+
oncalciteFocusTrapActiveChange?: EventHandler<FocusTrap["calciteFocusTrapActiveChange"]>;
|
|
319
|
+
}
|
|
320
|
+
|
|
316
321
|
interface PreactCalciteGraph extends Required<Pick<Graph, "max" | "min">>, Partial<Pick<Graph, "colorStops" | "data" | "highlightMax" | "highlightMin">>, HTMLAttributes<Graph> {
|
|
317
322
|
}
|
|
318
323
|
|
|
@@ -459,7 +464,7 @@ interface PreactCalcitePopover extends Required<Pick<Popover, "label" | "referen
|
|
|
459
464
|
interface PreactCalciteProgress extends Partial<Pick<Progress, "label" | "reversed" | "text" | "type" | "value">>, HTMLAttributes<Progress> {
|
|
460
465
|
}
|
|
461
466
|
|
|
462
|
-
interface PreactCalciteRadioButton extends Required<Pick<RadioButton, "value">>, Partial<Pick<RadioButton, "checked" | "disabled" | "form" | "labelText" | "name" | "required" | "scale">>, HTMLAttributes<RadioButton> {
|
|
467
|
+
interface PreactCalciteRadioButton extends Required<Pick<RadioButton, "value">>, Partial<Pick<RadioButton, "checked" | "disabled" | "form" | "labelText" | "name" | "required" | "scale" | "status" | "validationMessage">>, HTMLAttributes<RadioButton> {
|
|
463
468
|
oncalciteRadioButtonChange?: EventHandler<RadioButton["calciteRadioButtonChange"]>;
|
|
464
469
|
}
|
|
465
470
|
|
|
@@ -654,6 +659,7 @@ declare module 'preact' {
|
|
|
654
659
|
"calcite-filter": PreactCalciteFilter;
|
|
655
660
|
"calcite-flow": PreactCalciteFlow;
|
|
656
661
|
"calcite-flow-item": PreactCalciteFlowItem;
|
|
662
|
+
"calcite-focus-trap": PreactCalciteFocusTrap;
|
|
657
663
|
"calcite-graph": PreactCalciteGraph;
|
|
658
664
|
"calcite-handle": PreactCalciteHandle;
|
|
659
665
|
"calcite-icon": PreactCalciteIcon;
|
|
@@ -763,6 +769,7 @@ declare module 'preact' {
|
|
|
763
769
|
"calcite-filter": PreactCalciteFilter;
|
|
764
770
|
"calcite-flow": PreactCalciteFlow;
|
|
765
771
|
"calcite-flow-item": PreactCalciteFlowItem;
|
|
772
|
+
"calcite-focus-trap": PreactCalciteFocusTrap;
|
|
766
773
|
"calcite-graph": PreactCalciteGraph;
|
|
767
774
|
"calcite-handle": PreactCalciteHandle;
|
|
768
775
|
"calcite-icon": PreactCalciteIcon;
|
package/dist/types/react.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ import type { Fab } from "../components/calcite-fab/customElement.js";
|
|
|
39
39
|
import type { Filter } from "../components/calcite-filter/customElement.js";
|
|
40
40
|
import type { Flow } from "../components/calcite-flow/customElement.js";
|
|
41
41
|
import type { FlowItem } from "../components/calcite-flow-item/customElement.js";
|
|
42
|
+
import type { FocusTrap } from "../components/calcite-focus-trap/customElement.js";
|
|
42
43
|
import type { Graph } from "../components/calcite-graph/customElement.js";
|
|
43
44
|
import type { Handle } from "../components/calcite-handle/customElement.js";
|
|
44
45
|
import type { Icon } from "../components/calcite-icon/customElement.js";
|
|
@@ -313,6 +314,10 @@ interface ReactCalciteFlowItem extends Partial<Pick<FlowItem, "beforeBack" | "be
|
|
|
313
314
|
oncalciteFlowItemToggle?: EventHandler<FlowItem["calciteFlowItemToggle"]>;
|
|
314
315
|
}
|
|
315
316
|
|
|
317
|
+
interface ReactCalciteFocusTrap extends Partial<Pick<FocusTrap, "focusTrapDisabled" | "focusTrapDisabledOverride" | "focusTrapOptions">>, HTMLProps<FocusTrap> {
|
|
318
|
+
oncalciteFocusTrapActiveChange?: EventHandler<FocusTrap["calciteFocusTrapActiveChange"]>;
|
|
319
|
+
}
|
|
320
|
+
|
|
316
321
|
interface ReactCalciteGraph extends Required<Pick<Graph, "max" | "min">>, Partial<Pick<Graph, "colorStops" | "data" | "highlightMax" | "highlightMin">>, HTMLProps<Graph> {
|
|
317
322
|
}
|
|
318
323
|
|
|
@@ -459,7 +464,7 @@ interface ReactCalcitePopover extends Required<Pick<Popover, "label" | "referenc
|
|
|
459
464
|
interface ReactCalciteProgress extends Partial<Pick<Progress, "label" | "reversed" | "text" | "type" | "value">>, HTMLProps<Progress> {
|
|
460
465
|
}
|
|
461
466
|
|
|
462
|
-
interface ReactCalciteRadioButton extends Required<Pick<RadioButton, "value">>, Partial<Pick<RadioButton, "checked" | "disabled" | "form" | "labelText" | "name" | "required" | "scale">>, HTMLProps<RadioButton> {
|
|
467
|
+
interface ReactCalciteRadioButton extends Required<Pick<RadioButton, "value">>, Partial<Pick<RadioButton, "checked" | "disabled" | "form" | "labelText" | "name" | "required" | "scale" | "status" | "validationMessage">>, HTMLProps<RadioButton> {
|
|
463
468
|
oncalciteRadioButtonChange?: EventHandler<RadioButton["calciteRadioButtonChange"]>;
|
|
464
469
|
}
|
|
465
470
|
|
|
@@ -654,6 +659,7 @@ declare module "react" {
|
|
|
654
659
|
"calcite-filter": ReactCalciteFilter;
|
|
655
660
|
"calcite-flow": ReactCalciteFlow;
|
|
656
661
|
"calcite-flow-item": ReactCalciteFlowItem;
|
|
662
|
+
"calcite-focus-trap": ReactCalciteFocusTrap;
|
|
657
663
|
"calcite-graph": ReactCalciteGraph;
|
|
658
664
|
"calcite-handle": ReactCalciteHandle;
|
|
659
665
|
"calcite-icon": ReactCalciteIcon;
|
|
@@ -765,6 +771,7 @@ declare module "react/jsx-runtime" {
|
|
|
765
771
|
"calcite-filter": ReactCalciteFilter;
|
|
766
772
|
"calcite-flow": ReactCalciteFlow;
|
|
767
773
|
"calcite-flow-item": ReactCalciteFlowItem;
|
|
774
|
+
"calcite-focus-trap": ReactCalciteFocusTrap;
|
|
768
775
|
"calcite-graph": ReactCalciteGraph;
|
|
769
776
|
"calcite-handle": ReactCalciteHandle;
|
|
770
777
|
"calcite-icon": ReactCalciteIcon;
|
|
@@ -876,6 +883,7 @@ declare module "react/jsx-dev-runtime" {
|
|
|
876
883
|
"calcite-filter": ReactCalciteFilter;
|
|
877
884
|
"calcite-flow": ReactCalciteFlow;
|
|
878
885
|
"calcite-flow-item": ReactCalciteFlowItem;
|
|
886
|
+
"calcite-focus-trap": ReactCalciteFocusTrap;
|
|
879
887
|
"calcite-graph": ReactCalciteGraph;
|
|
880
888
|
"calcite-handle": ReactCalciteHandle;
|
|
881
889
|
"calcite-icon": ReactCalciteIcon;
|
package/dist/types/stencil.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ import type { Fab } from "../components/calcite-fab/customElement.js";
|
|
|
39
39
|
import type { Filter } from "../components/calcite-filter/customElement.js";
|
|
40
40
|
import type { Flow } from "../components/calcite-flow/customElement.js";
|
|
41
41
|
import type { FlowItem } from "../components/calcite-flow-item/customElement.js";
|
|
42
|
+
import type { FocusTrap } from "../components/calcite-focus-trap/customElement.js";
|
|
42
43
|
import type { Graph } from "../components/calcite-graph/customElement.js";
|
|
43
44
|
import type { Handle } from "../components/calcite-handle/customElement.js";
|
|
44
45
|
import type { Icon } from "../components/calcite-icon/customElement.js";
|
|
@@ -313,6 +314,10 @@ interface StencilCalciteFlowItem extends Partial<Pick<FlowItem, "beforeBack" | "
|
|
|
313
314
|
onCalciteFlowItemToggle?: EventHandler<FlowItem["calciteFlowItemToggle"]>;
|
|
314
315
|
}
|
|
315
316
|
|
|
317
|
+
interface StencilCalciteFocusTrap extends Partial<Pick<FocusTrap, "focusTrapDisabled" | "focusTrapDisabledOverride" | "focusTrapOptions">>, StencilJsx.HTMLAttributes<FocusTrap> {
|
|
318
|
+
onCalciteFocusTrapActiveChange?: EventHandler<FocusTrap["calciteFocusTrapActiveChange"]>;
|
|
319
|
+
}
|
|
320
|
+
|
|
316
321
|
interface StencilCalciteGraph extends Required<Pick<Graph, "max" | "min">>, Partial<Pick<Graph, "colorStops" | "data" | "highlightMax" | "highlightMin">>, StencilJsx.HTMLAttributes<Graph> {
|
|
317
322
|
}
|
|
318
323
|
|
|
@@ -459,7 +464,7 @@ interface StencilCalcitePopover extends Required<Pick<Popover, "label" | "refere
|
|
|
459
464
|
interface StencilCalciteProgress extends Partial<Pick<Progress, "label" | "reversed" | "text" | "type" | "value">>, StencilJsx.HTMLAttributes<Progress> {
|
|
460
465
|
}
|
|
461
466
|
|
|
462
|
-
interface StencilCalciteRadioButton extends Required<Pick<RadioButton, "value">>, Partial<Pick<RadioButton, "checked" | "disabled" | "form" | "labelText" | "name" | "required" | "scale">>, StencilJsx.HTMLAttributes<RadioButton> {
|
|
467
|
+
interface StencilCalciteRadioButton extends Required<Pick<RadioButton, "value">>, Partial<Pick<RadioButton, "checked" | "disabled" | "form" | "labelText" | "name" | "required" | "scale" | "status" | "validationMessage">>, StencilJsx.HTMLAttributes<RadioButton> {
|
|
463
468
|
onCalciteRadioButtonChange?: EventHandler<RadioButton["calciteRadioButtonChange"]>;
|
|
464
469
|
}
|
|
465
470
|
|
|
@@ -652,6 +657,7 @@ interface ExposedElements {
|
|
|
652
657
|
"calcite-filter": StencilCalciteFilter;
|
|
653
658
|
"calcite-flow": StencilCalciteFlow;
|
|
654
659
|
"calcite-flow-item": StencilCalciteFlowItem;
|
|
660
|
+
"calcite-focus-trap": StencilCalciteFocusTrap;
|
|
655
661
|
"calcite-graph": StencilCalciteGraph;
|
|
656
662
|
"calcite-handle": StencilCalciteHandle;
|
|
657
663
|
"calcite-icon": StencilCalciteIcon;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@esri/calcite-components",
|
|
3
|
-
"version": "5.1.0-next.
|
|
3
|
+
"version": "5.1.0-next.62",
|
|
4
4
|
"description": "Web Components for Esri's Calcite Design System.",
|
|
5
5
|
"homepage": "https://developers.arcgis.com/calcite-design-system/",
|
|
6
6
|
"repository": {
|
|
@@ -106,5 +106,5 @@
|
|
|
106
106
|
"dist/docs/vscode.html-custom-data.json"
|
|
107
107
|
],
|
|
108
108
|
"web-types": "dist/docs/web-types.json",
|
|
109
|
-
"gitHead": "
|
|
109
|
+
"gitHead": "34161861730a129f1b62ea2a11c936d831154b4e"
|
|
110
110
|
}
|
package/dist/cdn/3PNK54IV.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as I}from"./LPFVHKB3.js";import{a as R}from"./YKK5VHKP.js";import{c as y,d as B,e as w}from"./6ELKBP5R.js";import{a as x}from"./TQHOYBNL.js";import{a as l}from"./YSDXNIIL.js";import{a as k}from"./VYF67743.js";import"./WGGFNK4Z.js";import{e as g}from"./WAX52NHM.js";import"./QIAN72XU.js";import"./NDHZMLZD.js";import"./OAOQ5BXS.js";import{E as f,F as p,G as m,H as s,S as v,g as h,h as u,l as b,p as c}from"./SYAOC57W.js";var C={container:"container",radio:"radio"},A=h`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block;cursor:pointer}:host .container{position:relative;outline:2px solid transparent;outline-offset:2px;display:flex}:host .radio{cursor:pointer;outline-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;border-radius:var(--calcite-radio-button-corner-radius, var(--calcite-corner-radius-pill));background-color:var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1));box-shadow:inset 0 0 0 var(--calcite-border-width-sm) var(--calcite-radio-button-border-color, var(--calcite-color-border-input))}:host([hovered]) .radio,:host(:not([checked])[focused]:not([disabled])) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-md) var(--calcite-radio-button-border-color, var(--calcite-color-brand-hover))}:host([hovered]) .radio:active,:host(:not([checked])[focused]:not([disabled])) .radio:active{box-shadow:inset 0 0 0 var(--calcite-border-width-md) var(--calcite-color-brand-press)}:host([focused]) .radio{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([disabled]) .radio{cursor:default;opacity:var(--calcite-opacity-disabled)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hovered][disabled]) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-sm) var(--calcite-radio-button-border-color, var(--calcite-color-border-input))}:host([scale=s]){--calcite-internal-radio-size: var(--calcite-radio-button-size, var(--calcite-size-fixed-md))}:host([scale=m]){--calcite-internal-radio-size: var(--calcite-radio-button-size, var(--calcite-size-fixed-md-plus))}:host([scale=l]){--calcite-internal-radio-size: var(--calcite-radio-button-size, var(--calcite-size-fixed-lg))}.radio{block-size:var(--calcite-internal-radio-size);inline-size:var(--calcite-internal-radio-size);size:var(--calcite-internal-radio-size)}:host([scale=s][checked]) .radio,:host([hovered][scale=s][checked][disabled]) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-lg) var(--calcite-radio-button-border-color, var(--calcite-color-brand))}:host([scale=s][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-lg) var(--calcite-radio-button-border-color, var(--calcite-color-brand)),0 0 0 2px var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1))}:host([scale=m][checked]) .radio,:host([hovered][scale=m][checked][disabled]) .radio{box-shadow:inset 0 0 0 5px var(--calcite-radio-button-border-color, var(--calcite-color-brand))}:host([scale=m][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 5px var(--calcite-radio-button-border-color, var(--calcite-color-brand)),0 0 0 2px var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1))}:host([scale=l][checked]) .radio,:host([hovered][scale=l][checked][disabled]) .radio{box-shadow:inset 0 0 0 6px var(--calcite-radio-button-border-color, var(--calcite-color-brand))}:host([scale=l][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 6px var(--calcite-radio-button-border-color, var(--calcite-color-brand)),0 0 0 2px var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1))}@media(forced-colors:active){:host([checked]) .radio:after,:host([checked][disabled]) .radio:after{content:"";inline-size:var(--calcite-internal-radio-size);block-size:var(--calcite-internal-radio-size);background-color:CanvasText;display:block}}.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)}::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}`,d=class extends m{constructor(){super(),this.containerRef=f(),this.direction=g(),this.formSupport=R({inputType:"radio"})(this),this.focusSetter=k()(this),this.interactiveContainer=x(this),this.checked=!1,this.disabled=!1,this.focused=!1,this.hovered=!1,this.required=!1,this.scale="m",this.calciteInternalRadioButtonBlur=c({cancelable:!1}),this.calciteInternalRadioButtonCheckedChange=c({cancelable:!1}),this.calciteInternalRadioButtonFocus=c({cancelable:!1}),this.calciteRadioButtonChange=c({cancelable:!1}),this.listen("pointerenter",this.pointerEnterHandler),this.listen("pointerleave",this.pointerLeaveHandler),this.listen("click",this.clickHandler),this.listen("keydown",this.handleKeyDown)}static{this.properties={checked:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],focused:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],hovered:[7,{},{reflect:!0,type:Boolean}],label:1,labelText:1,name:[3,{},{reflect:!0}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],validity:[32,{},{readOnly:!0,attribute:!1}],value:1}}static{this.formAssociated=!0}static{this.styles=A}async emitCheckedChange(){this.calciteInternalRadioButtonCheckedChange.emit()}async setFocus(e){return this.focusSetter(()=>this.containerRef.value,e)}async setValidity(e,i=""){this.elementInternals.setValidity(e,i)}connectedCallback(){this.rootNode=this.el.getRootNode(),this.name&&this.checkLastRadioButton(),y(this),this.updateTabIndexOfOtherRadioButtonsInGroup(),super.connectedCallback()}willUpdate(e){this.hasUpdated&&e.has("checked")&&this.checkedChanged(this.checked),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.updateTabIndexOfOtherRadioButtonsInGroup(),e.has("name")&&this.checkLastRadioButton()}loaded(){this.focused&&!this.disabled&&this.setFocus()}disconnectedCallback(){super.disconnectedCallback(),B(this),this.updateTabIndexOfOtherRadioButtonsInGroup()}checkedChanged(e){e&&this.uncheckOtherRadioButtonsInGroup(),this.calciteInternalRadioButtonCheckedChange.emit()}selectItem(e,i){e[i].click()}queryButtons(){return Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden])")).filter(e=>e.name===this.name)}isFocusable(){let e=this.queryButtons(),i=e.find(a=>!a.disabled),t=e.find(a=>a.checked);return i===this.el&&!t}check(){this.disabled||(this.focused=!0,this.setFocus(),!this.checked&&(this.checked=!0,this.calciteRadioButtonChange.emit()))}clickHandler(){this.disabled||this.check()}onLabelClick(e){if(this.disabled||this.el.hidden)return;let i=e.currentTarget,t=i.for?this.rootNode.querySelector(`calcite-radio-button[id="${i.for}"]`):i.querySelector(`calcite-radio-button[name="${this.name}"]`);t&&(t.focused=!0,this.setFocus(),!t.checked&&(this.uncheckOtherRadioButtonsInGroup(),t.checked=!0,this.calciteRadioButtonChange.emit()))}checkLastRadioButton(){let i=this.queryButtons().filter(t=>t.checked);if(i?.length>1){let t=i[i.length-1];i.filter(a=>a!==t).forEach(a=>{a.checked=!1,a.emitCheckedChange()})}}uncheckOtherRadioButtonsInGroup(){this.queryButtons().filter(t=>t!==this.el).forEach(t=>{t.checked&&(t.checked=!1,t.focused=!1)})}updateTabIndexOfOtherRadioButtonsInGroup(){this.queryButtons().filter(t=>t!==this.el&&!t.disabled).forEach(t=>{t.manager?.component.requestUpdate()})}getTabIndex(){if(!this.disabled)return this.checked||this.isFocusable()?0:-1}pointerEnterHandler(){this.disabled||(this.hovered=!0)}pointerLeaveHandler(){this.disabled||(this.hovered=!1)}handleKeyDown(e){let i=["ArrowLeft","ArrowUp","ArrowRight","ArrowDown"," "],{key:t}=e;if(i.indexOf(t)===-1)return;if(t===" "){this.check(),e.preventDefault();return}let a=t;this.direction==="rtl"&&(t==="ArrowRight"&&(a="ArrowLeft"),t==="ArrowLeft"&&(a="ArrowRight"));let o=Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden])")).filter(n=>n.name===this.name),r=0;switch(o.some((n,z)=>{if(n.checked)return r=z,!0}),a){case"ArrowLeft":case"ArrowUp":e.preventDefault(),this.selectItem(o,this.getNextNonDisabledIndex(o,r,"left"));return;case"ArrowRight":case"ArrowDown":e.preventDefault(),this.selectItem(o,this.getNextNonDisabledIndex(o,r,"right"));return;default:return}}getNextNonDisabledIndex(e,i,t){let a=e.length,o=t==="left"?-1:1,r=l(i+o,a);for(;e[r].disabled;)r=l(r+o,a);return r}onContainerBlur(){this.focused=!1,this.calciteInternalRadioButtonBlur.emit()}onContainerFocus(){this.disabled||(this.focused=!0,this.calciteInternalRadioButtonFocus.emit())}render(){let e=this.getTabIndex();return this.interactiveContainer({disabled:this.disabled,children:u`<div .ariaChecked=${this.checked} .ariaLabel=${w(this)} class=${s(C.container)} @blur=${this.onContainerBlur} @focus=${this.onContainerFocus} role=radio tabindex=${e??b} ${p(this.containerRef)}><div class=${s(C.radio)}></div>${this.labelText&&I({labelText:this.labelText,spacingInlineStart:!0})||""}</div>`})}};v("calcite-radio-button",d);export{d as RadioButton};
|
package/dist/cdn/KUQ4U67J.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{d as ge}from"./Y2OS6UOH.js";import{a as xe}from"./G5EDVDJN.js";import{a as ve}from"./ISATMK3J.js";import{b as W,c as Ie,d as I,f as w,g as A}from"./KPZKEOBT.js";import{a as H,b as M,d as n,e as p,f as L}from"./MYDCGCGV.js";import{a as me}from"./IO6EAMXC.js";import{b as z}from"./6URRYJJC.js";import{a as ue}from"./LPFVHKB3.js";import{a as fe}from"./YKK5VHKP.js";import{c as he,d as de,e as pe}from"./6ELKBP5R.js";import{a as ae}from"./2C262SX5.js";import{b as be}from"./7ELQVRBB.js";import{a as P,c as B,d as ne,e as ce,f as oe,g as k,h as re}from"./P3PFZTXG.js";import{a as se}from"./BPW3YZSA.js";import{a as te}from"./TQHOYBNL.js";import{a as S}from"./Z3KSPCNP.js";import{a as le}from"./DACPQES6.js";import{a as ie}from"./AP2LDRUV.js";import{a as R,b as F}from"./ENDXE7YY.js";import{a as ee}from"./3SYW63DP.js";import{a as Z}from"./VYF67743.js";import{a as O,b as V}from"./WGGFNK4Z.js";import{e as K}from"./WAX52NHM.js";import"./QIAN72XU.js";import{e as D,h as X,l as Y}from"./NDHZMLZD.js";import{a as Q}from"./OAOQ5BXS.js";import{D as U,E as $,F as v,G,H as h,L as _,N as j,S as J,g as N,h as d,l as f,p as x}from"./SYAOC57W.js";var Se=N`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:block}:host([scale=s]){font-size:var(--calcite-font-size-relative-sm);--calcite-internal-combobox-spacing-unit-l: .5rem;--calcite-internal-combobox-spacing-unit-s: .25rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-2xs);--calcite-internal-combobox-no-matches-spacing-unit-s: .25rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.25rem - 1px) ;--calcite-internal-close-size: 1rem}:host([scale=m]){font-size:var(--calcite-font-size-relative-base);--calcite-internal-combobox-spacing-unit-l: .75rem;--calcite-internal-combobox-spacing-unit-s: .5rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-sm);--calcite-internal-combobox-no-matches-spacing-unit-s: .375rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.5rem - 1px) ;--calcite-internal-close-size: 1.5rem}:host([scale=l]){font-size:var(--calcite-font-size-relative-md);--calcite-internal-combobox-spacing-unit-l: 1rem;--calcite-internal-combobox-spacing-unit-s: .75rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-sm-plus);--calcite-internal-combobox-no-matches-spacing-unit-s: var(--calcite-space-sm-plus);--calcite-combobox-input-height: 1.5rem;--calcite-internal-combobox-input-margin-block: calc(var(--calcite-space-sm-plus) - 1px);--calcite-internal-close-size: 2rem}.wrapper{display:flex;border-width:1px;border-style:solid;outline-color:transparent;padding-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);padding-inline:var(--calcite-internal-combobox-spacing-unit-l) var(--calcite-internal-combobox-padding-inline-end);background-color:var(--calcite-combobox-input-background-color, var(--calcite-color-foreground-1));color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));border-color:var(--calcite-combobox-input-border-color, var(--calcite-color-border-input))}.wrapper:hover .icon{color:var(--calcite-combobox-icon-color-hover, var(--calcite-color-text-1))}:host(:focus-within) .wrapper,.wrapper--active{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([read-only]) .wrapper{background-color:var(--calcite-color-background)}:host([read-only]) .label{font-weight:var(--calcite-font-weight-medium)}:host([status=invalid]) .wrapper{border-color:var(--calcite-color-status-danger)}:host([status=invalid]:focus-within) .wrapper{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.wrapper--single{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l) var(--calcite-internal-combobox-padding-inline-end);cursor:pointer;flex-wrap:nowrap}.grid-input{position:relative;display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;gap:var(--calcite-internal-combobox-spacing-unit-s);margin-inline-end:var(--calcite-internal-combobox-spacing-unit-s)}.grid-input.selection-display--fit,.grid-input.selection-display--single{flex-wrap:nowrap;overflow:hidden}.input{flex-grow:1;appearance:none;overflow:hidden;text-overflow:ellipsis;border-style:none;background-color:transparent;padding:0;font-family:inherit;color:var(--calcite-color-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);inline-size:100%;margin-block-end:var(--calcite-internal-combobox-spacing-unit-s);min-inline-size:4.8125rem}.input:focus{outline:2px solid transparent;outline-offset:2px}.input:placeholder-shown{text-overflow:ellipsis}.input--single{padding:0;margin-block:var(--calcite-internal-combobox-input-margin-block)}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;width:0px;min-width:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.placeholder-icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.input-wrap{display:flex;flex-grow:1;align-items:center}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;max-width:100%;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;font-weight:var(--calcite-font-weight-normal);block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--icon{padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.icon-end,.icon-start{display:flex;cursor:pointer;align-items:center}.icon-end{flex:none}.icon-end .icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.floating-ui-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}@starting-style{.floating-ui-container{opacity:0;inset-block-start:0;left:0}}:host([top-layer-disabled]) .floating-ui-container{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown)}.floating-ui-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.floating-ui-container:popover-open{display:block}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.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))}`,q=class extends G{constructor(){super(),this.direction=K(),this.formSupport=fe({inputType:"text"})(this),this.selectAllComboboxItemRef=$(),this.allSelectedIndicatorChipRef=$(),this.cancelable=le()(this),this.filterItems=(()=>{let e=(t,l)=>t&&l.some(({el:i})=>t===i);return ie((t,l=!1,i=!0)=>{let s=ve([...this.data,...this.groupData],t,this.effectiveFilterProps),c=this.getItemsAndGroups(),a=t==="";c.forEach(o=>{if(a){o.itemHidden=!1;return}let r=!e(o,s);o.itemHidden=r;let[u,b]=o.ancestors;(e(u,s)||e(b,s))&&(o.itemHidden=!1),r||o.ancestors.forEach(g=>g.itemHidden=!1)}),this.noMatchesFound=this.filteredItems.length===0&&!!this.filterText,this.filterTextMatchPattern=this.filterText&&new RegExp(`(${z(this.filterText)})`,"i"),this.keyboardNavItems.forEach(o=>{o.filterTextMatchPattern=this.filterTextMatchPattern}),l&&(this.open=this.filterText.trim().length>0),i&&this.calciteComboboxFilterChange.emit()},j.filter)})(),this._filterText="",this.getSelectedItems=()=>{if(!this.isMulti()){let e=this.items.find(({selected:t})=>t);return e?[e]:[]}return this.items.filter(e=>e.selected&&(this.selectionMode!=="ancestors"||!I(e))).sort((e,t)=>{let l=this.selectedItems.indexOf(e),i=this.selectedItems.indexOf(t);return l>-1&&i>-1?l-i:i-l})},this.groupItems=[],this.guid=Q(),this.ignoreSelectedEventsFlag=!1,this.internalValueChangeFlag=!1,this.mutationObserver=R("mutation",()=>this.updateItems()),this.onLabelClick=()=>{this.setFocus()},this.transitionProp="opacity",this.resizeObserver=R("resize",()=>{this.setMaxScrollerHeight(),this.refreshSelectionDisplay()}),this.selectedIndicatorChipRef=$(),this.clearButtonRef=$(),this._selectedItems=[],this.textInputRef=$(),this._value=null,this.messages=ee(),this.focusSetter=Z()(this),this.customChipAddHandler=()=>{this.addCustomChip(this.filterText,!0)},this.interactiveContainer=te(this),this.topLayer=ae({target:()=>this.floatingEl})(this),this.activeChipIndex=-1,this.activeDescendant="",this.activeItemIndex=-1,this.compactSelectionDisplay=!1,this.selectedHiddenChipsCount=0,this.selectedVisibleChipsCount=0,this.allItems=[],this.items=[],this.clearDisabled=!1,this.disabled=!1,this.maxItems=0,this.open=!1,this.overlayPositioning="absolute",this.placeholderIconFlipRtl=!1,this.placement=P,this.readOnly=!1,this.required=!1,this.scale="m",this.selectAllEnabled=!1,this.selectionDisplay="all",this.selectionAppearance="icon",this.selectionMode="multiple",this.status="idle",this.topLayerDisabled=!1,this.calciteComboboxBeforeClose=x({cancelable:!1}),this.calciteComboboxBeforeOpen=x({cancelable:!1}),this.calciteComboboxChange=x({cancelable:!1}),this.calciteComboboxChipClose=x({cancelable:!1}),this.calciteComboboxClose=x({cancelable:!1}),this.calciteComboboxFilterChange=x({cancelable:!1}),this.calciteComboboxOpen=x({cancelable:!1}),this.listenOn(document,"click",this.documentClickHandler),this.listen("calciteComboboxItemChange",this.calciteComboboxItemChangeHandler),this.listen("calciteInternalComboboxItemChange",this.calciteInternalComboboxItemChangeHandler),this.listen("click",this.comboboxFocusHandler)}static{this.properties={activeChipIndex:[16,{},{state:!0}],activeDescendant:[16,{},{state:!0}],activeItemIndex:[16,{},{state:!0}],compactSelectionDisplay:[16,{},{state:!0}],selectedHiddenChipsCount:[16,{},{state:!0}],selectedVisibleChipsCount:[16,{},{state:!0}],allItems:[16,{},{state:!0}],items:[16,{},{state:!0}],noMatchesFound:[16,{},{state:!0}],allowCustomValues:[7,{},{reflect:!0,type:Boolean}],clearDisabled:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],filterText:[3,{},{reflect:!0}],filterProps:[0,{},{attribute:!1}],filteredItems:[32,{},{attribute:!1,readOnly:!0}],flipPlacements:[0,{},{attribute:!1}],form:[3,{},{reflect:!0}],label:1,labelText:1,maxItems:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placeholder:1,placeholderIcon:[3,{type:String},{reflect:!0}],placeholderIconFlipRtl:[7,{},{reflect:!0,type:Boolean}],placement:[3,{},{reflect:!0}],readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectAllEnabled:[7,{},{reflect:!0,type:Boolean}],selectedItems:[0,{},{attribute:!1}],selectionDisplay:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],validationIcon:[3,{converter:_,type:String},{reflect:!0}],validationMessage:1,validity:[32,{},{readOnly:!0,attribute:!1}],value:1}}static{this.formAssociated=!0}static{this.styles=Se}get effectiveFilterProps(){return this.filterProps?this.filterProps.filter(e=>e!=="el"):["description","label","metadata","shortHeading"]}get showingInlineIcon(){let{placeholderIcon:e,selectionMode:t,selectedItems:l,open:i}=this,s=l[0],c=s?.icon,a=w(t);return!i&&s?!!c&&a:!!e&&(!s||a)}get allSelected(){let e=this.allItems.filter(t=>!t.disabled);return e.length>0&&e.every(t=>t.selected)}get hasDisabledItems(){return this.allItems.some(e=>e.disabled)}get hasDisabledSelected(){return this.allItems.some(e=>e.disabled&&e.selected)}get indeterminate(){let e=this.selectedItems.length>0||this.hasDisabledSelected;return this.selectAllEnabled?!this.allSelected&&e:this.selectedItems.length>0&&!this.allSelected}get keyboardNavItems(){let{selectAllComboboxItemRef:e}=this,t=this.filteredItems.filter(l=>!l.disabled);return e.value?[e.value,...t]:t}get filterText(){return this._filterText}set filterText(e){let t=this._filterText;e!==t&&(this._filterText=e,this.filterTextChange(e))}get filteredItems(){return this.items.filter(e=>!V(e))}get selectedItems(){return this._selectedItems}set selectedItems(e){let t=this._selectedItems;e!==t&&(this._selectedItems=e,this.selectedItemsHandler())}get value(){return this._value}set value(e){let t=this._value;e!==t&&(this._value=e,this.valueHandler(e))}async reposition(e=!1){let{floatingEl:t,referenceEl:l,placement:i,overlayPositioning:s,filteredFlipPlacements:c}=this;return ce(this,{direction:this.direction,floatingEl:t,referenceEl:l,overlayPositioning:s,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(),he(this),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),k(this),this.cancelable.add(this.filterItems)}async load(){this.handleSelectionModeWarning()}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),e.has("maxItems")&&(this.hasUpdated||this.maxItems!==0)&&this.setMaxScrollerHeight(),(e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||e.has("placement")&&(this.hasUpdated||this.placement!==P))&&this.reposition(!0),(e.has("selectionMode")||e.has("scale")||e.has("selectionAppearance"))&&this.updateItems(),e.has("flipPlacements")&&this.flipPlacementsHandler()}loaded(){k(this),this.updateItems(),this.filterItems(this.filterText,!1,!1)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),de(this),re(this)}emitComboboxChange(){this.calciteComboboxChange.emit()}filterTextChange(e){this.updateActiveItemIndex(-1),this.filterItems(e,!0)}openHandler(){this.disabled||se(this)}handleDisabledChange(e){e||(this.open=!1)}valueHandler(e){this.internalValueChangeFlag||(this.items.forEach(t=>{t.selected=Array.isArray(e)?e.includes(t.value):e===t.value}),this.updateItems())}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}selectedItemsHandler(){this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,this.selectionDisplay==="fit"&&this.isMulti()&&this.refreshSelectionDisplay()}async documentClickHandler(e){this.disabled||e.composedPath().includes(this.el)||(await this.componentOnReady(),!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1)),this.allowCustomValues&&this.filterText.trim().length&&this.addCustomChip(this.filterText),this.open=!1)}handleSelectAll(e){e&&this.toggleSelectAll(),this.allSelected&&(!this.hasDisabledItems||this.hasDisabledSelected)&&this.selectedItems.forEach(t=>{let l=this.referenceEl.querySelector(`#${p.chip(t.guid)}`);l&&this.hideChip(l)})}calciteComboboxItemChangeHandler(e){if(this.ignoreSelectedEventsFlag)return;let t=e.target,l=e.composedPath().includes(this.selectAllComboboxItemRef.value);this.selectAllEnabled&&this.handleSelectAll(l);let i=this.keyboardNavItems.indexOf(l?this.selectAllComboboxItemRef.value:t);this.updateActiveItemIndex(i),this.toggleSelection(t,t.selected),this.selectedItems=this.getSelectedItems()}calciteInternalComboboxItemChangeHandler(e){e.stopPropagation(),this.hasUpdated&&this.updateItems()}clearValue(){this.ignoreSelectedEventsFlag=!0,this.items.forEach(e=>e.selected=!1),this.ignoreSelectedEventsFlag=!1,this.selectedItems=[],this.emitComboboxChange(),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems(""),this.setFocus()}clearInputValue(){this.textInputRef.value&&(this.textInputRef.value.value=""),this.filterText=""}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?ne(t,e):null}getValue(){let e=this.selectedItems.map(t=>t.value?.toString());return e.length?e.length>1?e:e[0]:""}comboboxInViewport(){let e=this.el.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.right<=(window.innerWidth||document.documentElement.clientWidth)&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)}toggleSelectAll(){let e=!this.allSelected;this.allItems.forEach(t=>{t.disabled||(t.selected=e)}),this.selectedItems=this.getSelectedItems(),this.emitComboboxChange()}keyDownHandler(e){if(this.readOnly)return;let{key:t}=e;switch(t){case"Tab":this.activeChipIndex=-1,this.activeItemIndex=-1,this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):this.open?(this.open=!1,e.preventDefault()):!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1));break;case"ArrowLeft":(this.activeChipIndex!==-1||this.textInputRef.value.selectionStart===0)&&(this.previousChip(),e.preventDefault());break;case"ArrowRight":this.activeChipIndex!==-1&&(this.nextChip(),e.preventDefault());break;case"ArrowUp":this.keyboardNavItems.length&&(e.preventDefault(),this.open&&this.shiftActiveItemIndex(-1),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView()),this.scrollToActiveOrSelectedItem();break;case"ArrowDown":this.keyboardNavItems.length&&(e.preventDefault(),this.open?this.shiftActiveItemIndex(1):(this.open=!0,this.ensureRecentSelectedItemIsActive()),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView());break;case" ":!this.textInputRef.value.value&&!e.defaultPrevented&&(this.open||(this.open=!0,this.shiftActiveItemIndex(1)),e.preventDefault());break;case"Home":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(0),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"End":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(this.filteredItems.length-1),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"Escape":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":{if(this.selectionDisplay==="single"||this.selectionDisplay==="fit"&&this.selectedHiddenChipsCount>0)return;this.activeChipIndex>-1?(e.preventDefault(),this.removeActiveChip(e.target)):!this.filterText&&this.isMulti()&&(e.preventDefault(),this.removeLastChip());break}}}onBeforeOpen(){this.topLayer.show(),this.reposition(),this.calciteComboboxBeforeOpen.emit(),setTimeout(()=>this.scrollToActiveOrSelectedItem(!0),0)}onOpen(){this.calciteComboboxOpen.emit()}onBeforeClose(){this.calciteComboboxBeforeClose.emit()}onClose(){this.calciteComboboxClose.emit(),oe(this),this.topLayer.hide()}async setMaxScrollerHeight(){let{listContainerEl:e,open:t,referenceEl:l}=this;if(!e||!t)return;let i=this.getMaxScrollerHeight();e.style.maxBlockSize=i>0?`${i}px`:"",e.style.inlineSize=`${l.clientWidth}px`}calciteChipCloseHandler(e){this.open=!1;let t=this.items.find(l=>l===e);t&&this.toggleSelection(t,!1),this.calciteComboboxChipClose.emit()}clickHandler(e){if(this.readOnly)return;let t=e.composedPath();if(t.some(l=>l.tagName==="CALCITE-CHIP")){this.open=!1,e.preventDefault();return}if(t.includes(this.clearButtonRef.value)){this.clearValue(),e.preventDefault();return}this.open=!this.open,this.ensureRecentSelectedItemIsActive()}ensureRecentSelectedItemIsActive(){let{selectedItems:e}=this,t=e.length===0?0:this.items.indexOf(e[e.length-1]);this.updateActiveItemIndex(t)}hideChip(e){e.classList.add(n.chipInvisible)}showChip(e){e.classList.remove(n.chipInvisible)}refreshChipDisplay({chipEls:e,availableHorizontalChipElSpace:t,chipContainerElGap:l}){e.forEach(i=>{if(!i.selected)this.hideChip(i);else{let s=D(i);if(s&&s<t){t-=s+l,this.showChip(i);return}}this.hideChip(i)})}async refreshSelectionDisplay(){if(this.componentOnReady(),w(this.selectionMode)||!this.textInputRef.value||!this.chipContainerEl)return;let{allSelectedIndicatorChipRef:e,chipContainerEl:t,selectionDisplay:l,placeholder:i,selectedIndicatorChipRef:s,textInputRef:c}=this,a=parseInt(getComputedStyle(t).gap.replace("px","")),o=D(t),{fontSize:r,fontFamily:u}=getComputedStyle(c.value),g=(X(i,`${r} ${u}`)||parseInt(ge))+a,E=D(e.value),T=D(s.value),m=Math.max(E,T);if(this.setCompactSelectionDisplay({chipContainerElGap:a,chipContainerElWidth:o,inputWidth:g,largestSelectedIndicatorChipWidth:m}),this.allSelected&&this.selectAllEnabled&&(!this.hasDisabledItems||this.hasDisabledSelected)&&this.selectedItems.forEach(y=>{let C=this.referenceEl.querySelector(`#${p.chip(y.guid)}`);C&&this.hideChip(C)}),this.indeterminate&&this.selectedItems.forEach(y=>{let C=this.referenceEl.querySelector(`#${p.chip(y.guid)}`);C&&this.showChip(C)}),l==="fit"){let y=Array.from(this.el.shadowRoot.querySelectorAll("calcite-chip")).filter(Ce=>Ce.closable),C=Math.round(o-((this.selectedHiddenChipsCount>0?T:0)+a+g+a));this.refreshChipDisplay({availableHorizontalChipElSpace:C,chipContainerElGap:a,chipEls:y}),this.setVisibleAndHiddenChips(y)}}setFloatingEl(e){this.floatingEl=e,k(this)}setCompactSelectionDisplay({chipContainerElGap:e,chipContainerElWidth:t,inputWidth:l,largestSelectedIndicatorChipWidth:i}){let s=Math.round(i+e+l);(!this.maxCompactBreakpoint||this.maxCompactBreakpoint<s)&&(this.maxCompactBreakpoint=s),this.compactSelectionDisplay=t<this.maxCompactBreakpoint}setContainerEl(e){F(this.resizeObserver,this.listContainerEl,e),this.listContainerEl=e,this.transitionEl=e}setChipContainerEl(e){F(this.resizeObserver,this.chipContainerEl,e),this.chipContainerEl=e}setReferenceEl(e){this.referenceEl=e,k(this)}setVisibleAndHiddenChips(e){let t=0;e.forEach(i=>{i.selected&&!i.classList.contains(n.chipInvisible)&&t++}),t!==this.selectedVisibleChipsCount&&(this.selectedVisibleChipsCount=t);let l=Math.max(0,this.getSelectedItems().length-t);l!==this.selectedHiddenChipsCount&&(this.selectedHiddenChipsCount=l)}getMaxScrollerHeight(){let t=this.getItemsAndGroups(!0).filter(c=>!V(c)),{maxItems:l}=this,i=0,s=0;return t.length>=l&&t.forEach(c=>{if(i<l){let a=this.calculateScrollerHeight(c);s+=a,i+=1}}),s}calculateScrollerHeight(e){if(!e)return 0;let t=e.getBoundingClientRect().height,l=`:scope > ${H}, :scope > ${M}`,i=Array.from(e.querySelectorAll(l)).reduce((s,c)=>s+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(`${H}, ${M}`)):[...this.groupItems,...this.items]}toggleSelection(e,t){!e||this.selectionMode==="single-persist"&&e.selected&&e.value===this.value&&!t||(this.isMulti()?this.handleMultiSelection(e,t):this.handleSingleSelection(e,t))}handleMultiSelection(e,t){e.selected=t,this.updateAncestors(e),this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.resetText(),this.filterItems("")}handleSingleSelection(e,t){this.ignoreSelectedEventsFlag=!0,this.items.forEach(l=>l.selected=l===e?t:!1),this.ignoreSelectedEventsFlag=!1,this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.textInputRef.value&&(this.textInputRef.value.value=A(e)),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")}updateAncestors(e){if(this.selectionMode!=="ancestors")return;let t=W(e),l=Ie(e);e.selected?t.forEach(i=>{i.selected=!0}):(l.forEach(i=>{i.disabled||(i.selected=!1)}),[...t].forEach(i=>{I(i)||(i.selected=!1)}))}updateItems(){this.allItems=this.getItems(!0),this.items=this.allItems.filter(e=>!e.disabled),this.groupItems=this.getGroupItems(),this.data=this.getData(),this.groupData=this.getGroupData(),this.updateItemProps(),this.selectedItems=this.getSelectedItems()}updateItemProps(){this.allItems.forEach(e=>{e.selectionMode=this.selectionMode,e.selectionAppearance=this.selectionAppearance,e.scale=this.scale}),this.groupItems.forEach((e,t)=>(e.scale=this.scale,e.position=t)),this.allowCustomValues||this.setMaxScrollerHeight(),this.groupItems.forEach((e,t,l)=>{t===0&&(e.afterEmptyGroup=!1);let i=l[t+1];i&&(i.afterEmptyGroup=e.children.length===0)})}getData(){return this.items.map(e=>({description:e.description,filterDisabled:e.filterDisabled,label:e.heading,metadata:e.metadata,shortHeading:e.shortHeading,el:e}))}getGroupData(){return this.groupItems.map(e=>({label:e.label,el:e}))}resetText(){this.textInputRef.value&&(this.textInputRef.value.value=""),this.filterText=""}getItems(e=!1){return Array.from(this.el.querySelectorAll(H)).filter(l=>e||!l.disabled)}getGroupItems(){return Array.from(this.el.querySelectorAll(M))}addCustomChip(e,t){let l=this.items.find(i=>i.heading===e);if(l)this.toggleSelection(l,!0);else{let i=document.createElement("calcite-combobox-item");i.value=e,i.heading=e,this.el.prepend(i),this.updateItems(),this.toggleSelection(i,!0),this.open=!0,t&&this.setFocus()}}removeActiveChip(e){let t=this.selectedItems[this.activeChipIndex];t&&`${p.chip(t.guid)}`===e.id&&this.toggleSelection(t,!1),this.setFocus()}removeLastChip(){this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1),this.setFocus()}previousChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex;this.activeChipIndex=t===-1?e:Math.max(t-1,0),this.updateActiveItemIndex(-1),this.focusChip()}nextChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex+1;t>e?(this.activeChipIndex=-1,Y(this.textInputRef.value)):(this.activeChipIndex=t,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){let e=this.selectedItems[this.activeChipIndex]?.guid;(e?this.referenceEl.querySelector(`#${p.chip(e)}`):null)?.setFocus()}scrollToActiveOrSelectedItem(e=!1){let t=e&&this.selectedItems?.length?this.selectedItems[0]:this.keyboardNavItems[this.activeItemIndex],l=this.listContainerEl;if(!t||!l)return;t.scrollIntoView({block:"nearest"});let s=this.selectAllComboboxItemRef.value?.offsetHeight||0,c=t.getBoundingClientRect(),a=l.getBoundingClientRect();c.top<a.top+s&&(l.scrollTop-=a.top+s-c.top)}shiftActiveItemIndex(e){let{length:t}=this.keyboardNavItems,l=(this.activeItemIndex+t+e)%t;this.updateActiveItemIndex(l),this.scrollToActiveOrSelectedItem()}updateActiveItemIndex(e){this.activeItemIndex=e;let t=null;this.keyboardNavItems.forEach((l,i)=>{i===e?(l.active=!0,t=`${p.item(l.guid)}`):l.active=!1}),this.activeDescendant=t,this.activeItemIndex>-1&&(this.activeChipIndex=-1)}isMulti(){return!w(this.selectionMode)}comboboxFocusHandler(){this.disabled||this.textInputRef.value.focus()}createScreenReaderItem({ariaLabel:e,ariaSelected:t,id:l,textContent:i}){return d`<li aria-label=${e??f} aria-selected=${t??f} id=${l??f} role=option tabindex=-1>${i}</li>`}handleSelectionModeWarning(){this.selectionMode==="single-persist"&&this.clearDisabled&&console.warn('clearDisabled is ignored when selection-mode is set to "single-persist"')}getDescriptionMessage(){let e=Array.isArray(this.value)?this.value.join(", "):this.value;return this.readOnly?this.messages.nonEditable?.replace("{value}",`${e}`):e}getChipLabel(e,t){return t?[...[...W(e)].reverse(),e].map(i=>A(i)).join(" / "):A(e)}renderChip({activeChipIndex:e,disabled:t,index:l,item:i,messages:s,readOnly:c,scale:a,isAncestors:o}){let r=this.getChipLabel(i,o);return S(i.guid||i.value||r,d`<calcite-chip .appearance=${c?"outline":"solid"} class=${h({[n.chip]:!0,[n.disabled]:t})} .closable=${!t&&!c} .disabled=${t} .icon=${i.icon} .iconFlipRtl=${i.iconFlipRtl} id=${(!t&&i.guid?`${p.chip(i.guid)}`:null)??f} .label=${r} .messageOverrides=${t?null:{dismissLabel:s.removeTag}} @calciteChipClose=${t?null:()=>this.calciteChipCloseHandler(i)} @focusin=${t?null:()=>this.activeChipIndex=l} .scale=${a} .selected=${i.selected} .tabIndex=${!t&&e===l?0:-1} title=${r??f} .value=${i.value}>${r}</calcite-chip>`)}renderChipCount(e,t){let l=this.messages.disabledSelectedCount?.replace("{count}",`${e}`)??`+${e}`;return d`<calcite-chip appearance=solid class=${h({[n.chip]:!0})} .label=${l} .scale=${t} tabindex=-1 title=${l??f}>${l}</calcite-chip>`}renderChips(){let{activeChipIndex:e,readOnly:t,scale:l,selectionDisplay:i,selectionMode:s,messages:c}=this,a=[],o=s==="ancestors",r=this.allSelected&&!this.hasDisabledItems,u=this.allSelected&&this.hasDisabledSelected,b=this.allItems.filter(m=>m.disabled&&m.selected&&(!o||!I(m))),g=i==="all";if(i==="fit"&&(r||u)||i==="all"&&this.selectAllEnabled&&u||this.selectAllEnabled&&this.allSelected&&!this.hasDisabledItems)return null;let E=0,T=0;return g?this.allItems.forEach(m=>{if(m.disabled){m.selected&&(!o||!I(m))&&a.push(this.renderChip({activeChipIndex:e,disabled:!0,index:T++,item:m,messages:c,readOnly:t,scale:l,isAncestors:o}));return}(!this.selectAllEnabled||!this.allSelected||this.hasDisabledItems)&&m.selected&&(!o||!I(m))&&a.push(this.renderChip({activeChipIndex:e,disabled:!1,index:E++,item:m,messages:c,readOnly:t,scale:l,isAncestors:o}))}):(!this.selectAllEnabled||!this.allSelected||this.hasDisabledItems)&&this.selectedItems.forEach(m=>{a.push(this.renderChip({activeChipIndex:e,disabled:!1,index:E++,item:m,messages:c,readOnly:t,scale:l,isAncestors:o}))}),i==="fit"&&b.length&&a.push(this.renderChipCount(b.length,l)),a.length?a:null}renderAllSelectedIndicatorChip(){let{allSelectedIndicatorChipRef:e,compactSelectionDisplay:t,scale:l,selectedVisibleChipsCount:i}=this,s=t?this.messages.all:this.messages.allSelected,c=this.allSelected&&(this.selectionDisplay==="single"||!i||this.selectionDisplay==="fit"&&this.hasDisabledSelected||this.selectionDisplay==="all"&&this.hasDisabledSelected);return d`<calcite-chip class=${h({[n.chip]:!0,[n.chipInvisible]:!c,[n.allSelected]:!0})} .label=${s} .scale=${l} title=${s??f} value ${v(e)}>${s}</calcite-chip>`}renderSelectedIndicatorChip(){let{compactSelectionDisplay:e,selectionDisplay:t,scale:l,selectedHiddenChipsCount:i,selectedVisibleChipsCount:s,selectedIndicatorChipRef:c}=this,a=this.allSelected&&!this.hasDisabledItems,o=this.allSelected&&this.hasDisabledSelected,r,u;if(e)r=!0;else if(t==="single"){let b=this.allItems.filter(g=>g.selected&&(this.selectionMode!=="ancestors"||!I(g))).length;this.allSelected?r=!0:b>0?r=!1:r=!0,u=`${b} ${this.messages.selected}`}else t==="fit"&&(r=!!((a||o)&&s===0||i===0),u=s>0?`+${i}`:`${i} ${this.messages.selected}`);return d`<calcite-chip class=${h({[n.chip]:!0,[n.chipInvisible]:r})} .label=${u} .scale=${l} title=${u??f} value ${v(c)}>${u}</calcite-chip>`}renderSelectedIndicatorChipCompact(){let{compactSelectionDisplay:e,selectionDisplay:t,scale:l,selectedHiddenChipsCount:i}=this,s=this.allSelected&&!this.hasDisabledItems,c=this.allSelected&&this.hasDisabledSelected,a,o;if(e){let r=this.allItems.filter(u=>u.selected&&(this.selectionMode!=="ancestors"||!I(u))).length;s||c||t==="single"&&this.allSelected?a=!0:t==="fit"?(a=!(i>0),o=`${i||0}`):t==="single"&&(a=!(r>0),o=`${r}`)}else a=!0;return d`<calcite-chip class=${h({[n.chip]:!0,[n.chipInvisible]:a})} .label=${o} .scale=${l} title=${o??f} value>${o}</calcite-chip>`}renderInput(){let{guid:e,disabled:t,placeholder:l,selectionMode:i,selectedItems:s,open:c}=this,a=w(i),o=s[0],r=!c&&a&&!!o&&!this.filterText;return d`<span class=${h({[n.inputWrap]:!0,[n.inputWrapSingle]:a})}>${r&&S("label",d`<span class=${h({[n.label]:!0,[n.labelIcon]:!!o?.icon})}>${A(o)}</span>`)||""}${S("input",d`<input aria-activedescendant=${this.activeDescendant??f} aria-controls=${`${p.listbox(e)}`} aria-errormessage=${p.validationMessage} aria-owns=${`${p.listbox(e)}`} aria-autocomplete=list .ariaDescription=${this.getDescriptionMessage()} .ariaExpanded=${c} aria-haspopup=listbox .ariaInvalid=${this.status==="invalid"} .ariaLabel=${pe(this)} class=${h({[n.input]:!0,[n.inputSingle]:!0,[n.inputHidden]:r,[n.inputIcon]:this.showingInlineIcon&&!!this.placeholderIcon})} .disabled=${t} .id=${`${p.input(e)}`} @focus=${this.comboboxFocusHandler} @input=${this.inputHandler} placeholder=${l??f} .readOnly=${this.readOnly} .required=${this.required} role=combobox .tabIndex=${this.activeChipIndex===-1?0:-1} type=text .value=${U(this.filterText??"")} ${v(this.textInputRef)}>`)}</span>`}renderListBoxOptions(){let e=this.keyboardNavItems.map(t=>this.createScreenReaderItem({ariaLabel:t.label,ariaSelected:t.selected,id:`${p.item(t.guid)}`,textContent:t.heading}));if(this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"){let t=this.createScreenReaderItem({ariaLabel:this.messages.selectAll,ariaSelected:this.allSelected,textContent:this.messages.selectAll});t&&e.unshift(t)}return e}renderFloatingUIContainer(){let{messages:e,setFloatingEl:t,setContainerEl:l,open:i,scale:s}=this,c={[n.listContainer]:!0,[B.animation]:!0,[B.animationActive]:i},a=(this.filterText&&e.add?.replace("{text}",`${this.filterText}`))??"";return d`<div aria-hidden=true class=${h(n.floatingUIContainer)} popover=manual ${v(t)}><div class=${h(c)} ${v(l)}><ul class=${h({[n.list]:!0,[n.listHide]:!i})}>${this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"&&d`<calcite-combobox-item class=${h(n.selectAll)} .heading=${e.selectAll} .id=${`${this.guid}-select-all-enabled-interactive`} .indeterminate=${this.indeterminate} .label=${e.selectAll} .scale=${s} .selected=${this.allSelected} tabindex=-1 value=select-all ${v(this.selectAllComboboxItemRef)}></calcite-combobox-item>`||""}<slot></slot>${this.noMatchesFound&&(this.allowCustomValues?d`<li aria-label=${a??f} class=${h(n.noMatches)} @click=${this.customChipAddHandler} role=option tabindex=0>${be({text:a,pattern:new RegExp(`(${z(this.filterText)})`,"i")})}</li>`:d`<li class=${h({[n.noMatchesPlaceholder]:!0,[n.noMatches]:!0})}>${e.noMatches}</li>`)||""}</ul></div></div>`}renderSelectedOrPlaceholderIcon(){let{open:e,placeholderIcon:t,placeholderIconFlipRtl:l,selectedItems:i}=this,s=i[0],c=s?.icon,a=t&&(e||!s);return this.showingInlineIcon&&S("selected-placeholder-icon",d`<span class=${h(n.iconStart)}><calcite-icon class=${h({[n.selectedIcon]:!a,[n.placeholderIcon]:a})} .flipRtl=${a?l:s.iconFlipRtl} .icon=${a?t:c} .scale=${O(this.scale)}></calcite-icon></span>`)||""}renderChevronIcon(){let{open:e}=this;return S("chevron",d`<span class=${h(n.iconEnd)}><calcite-icon class=${h(n.icon)} .icon=${e?L.chevronUp:L.chevronDown} .scale=${O(this.scale)}></calcite-icon></span>`)}render(){let{selectionDisplay:e,guid:t,label:l,open:i,readOnly:s}=this,c=w(this.selectionMode),a=e==="all",o=e==="single",r=!c&&e==="fit",u=!this.clearDisabled&&this.selectionMode!=="single-persist"&&!!this.value?.length,b=this.hasDisabledItems;return this.interactiveContainer({disabled:this.disabled,children:d`${this.labelText&&ue({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div aria-live=polite class=${h({[n.wrapper]:!0,[n.wrapperSingle]:c||!this.selectedItems.length,[n.wrapperActive]:i})} @click=${this.clickHandler} @keydown=${this.keyDownHandler} ${v(this.setReferenceEl)}>${this.renderSelectedOrPlaceholderIcon()}${S("grid",d`<div class=${h({[n.gridInput]:!0,[n.selectionDisplayFit]:r,[n.selectionDisplaySingle]:o})} ${v(this.setChipContainerEl)}>${!c&&!o&&this.renderChips()||""}${!c&&!o&&this.selectAllEnabled&&a&&(!b||this.hasDisabledSelected)&&this.renderAllSelectedIndicatorChip()||""}${!c&&!a&&[this.renderSelectedIndicatorChip(),this.renderSelectedIndicatorChipCompact(),this.renderAllSelectedIndicatorChip()]||""}<label class=${h(n.screenReadersOnly)} .htmlFor=${`${p.input(t)}`} .id=${`${p.label(t)}`}>${l}</label>${this.renderInput()}</div>`)}${!s&&u?xe({ariaLabel:this.messages.clear,disabled:this.disabled,ref:this.clearButtonRef,scale:this.scale,title:this.messages.clear}):null}${!s&&this.renderChevronIcon()||""}</div><ul aria-labelledby=${`${p.label(t)}`} aria-multiselectable=true class=${h(n.screenReadersOnly)} .id=${`${p.listbox(t)}`} role=listbox tabindex=-1>${this.renderListBoxOptions()}</ul>${this.renderFloatingUIContainer()}${this.validationMessage&&this.status==="invalid"?me({icon:this.validationIcon,id:p.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}};J("calcite-combobox",q);export{q as Combobox};
|
package/dist/cdn/W6MK2ZLN.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as u}from"./IO6EAMXC.js";import{a as h}from"./LPFVHKB3.js";import{a as o}from"./ENDXE7YY.js";import{a as p}from"./3SYW63DP.js";import{a as d}from"./VYF67743.js";import"./WGGFNK4Z.js";import"./WAX52NHM.js";import"./QIAN72XU.js";import"./NDHZMLZD.js";import"./OAOQ5BXS.js";import{G as l,H as n,L as r,S as c,g as a,h as i,p as s}from"./SYAOC57W.js";var g={itemWrapper:"item-wrapper"},m={validationMessage:"radioButtonGroupValidationMessage"},b=a`:host{display:flex;flex-direction:column}:host>.item-wrapper{display:flex;max-inline-size:100vw}:host([layout=horizontal])>.item-wrapper{flex-direction:row;flex-wrap:wrap}:host([layout=horizontal][scale=s])>.item-wrapper{column-gap:var(--calcite-radio-button-group-gap, var(--calcite-spacing-lg))}:host([layout=horizontal][scale=m])>.item-wrapper{column-gap:var(--calcite-radio-button-group-gap, var(--calcite-spacing-xl))}:host([layout=horizontal][scale=l])>.item-wrapper{column-gap:var(--calcite-radio-button-group-gap, var(--calcite-spacing-xxl))}:host([layout=vertical])>.item-wrapper{flex-direction:column;inline-size:fit-content}:host([scale=s]) calcite-input-message{--calcite-input-message-spacing: var( --calcite-radio-button-input-message-spacing, calc(var(--calcite-spacing-xxs) * -1) )}:host([scale=m]) calcite-input-message{--calcite-input-message-spacing: var( --calcite-radio-button-input-message-spacing, calc(var(--calcite-spacing-sm) * -1) )}:host([scale=l]) calcite-input-message{--calcite-input-message-spacing: var( --calcite-radio-button-input-message-spacing, calc(var(--calcite-spacing-md) * -1) )}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}:host([hidden]){display:none}[hidden]{display:none}`,t=class extends l{constructor(){super(),this.messages=p(),this.mutationObserver=o("mutation",()=>this.passPropsToRadioButtons()),this.focusSetter=d()(this),this.radioButtons=[],this.disabled=!1,this.layout="horizontal",this.required=!1,this.scale="m",this.selectedItem=null,this.status="idle",this.calciteRadioButtonGroupChange=s({cancelable:!1}),this.listen("calciteRadioButtonChange",this.radioButtonChangeHandler)}static{this.properties={radioButtons:[16,{},{state:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],labelText:1,layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectedItem:[0,{},{attribute:!1}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:r,type:String},{reflect:!0}],validationMessage:1}}static{this.styles=b}async setFocus(e){return this.focusSetter(()=>this.selectedItem&&!this.selectedItem.disabled?this.selectedItem:this.getFocusableRadioButton(),e)}connectedCallback(){super.connectedCallback(),this.passPropsToRadioButtons(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}willUpdate(e){(e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)||e.has("layout")&&(this.hasUpdated||this.layout!=="horizontal")||e.has("scale")&&(this.hasUpdated||this.scale!=="m"))&&this.passPropsToRadioButtons()}loaded(){this.passPropsToRadioButtons()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}passPropsToRadioButtons(){this.radioButtons=Array.from(this.el.querySelectorAll("calcite-radio-button")),this.selectedItem=Array.from(this.radioButtons).reverse().find(e=>e.checked)||null,this.radioButtons.length>0&&this.radioButtons.forEach(e=>{this.hasUpdated&&(e.disabled=this.disabled||e.disabled),e.name=this.name,e.required=this.required,e.scale=this.scale})}getFocusableRadioButton(){return this.radioButtons.find(e=>!e.disabled)??null}radioButtonChangeHandler(e){this.selectedItem=e.target,this.calciteRadioButtonGroupChange.emit()}render(){return this.el.role="radiogroup",i`${this.labelText&&h({labelText:this.labelText,required:this.required,tooltipText:this.messages.required})||""}<div aria-errormessage=${m.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaRequired=${this.required} class=${n(g.itemWrapper)}><slot></slot></div>${this.validationMessage&&this.status==="invalid"?u({icon:this.validationIcon,id:m.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`}};c("calcite-radio-button-group",t);export{t as RadioButtonGroup};
|
package/dist/cdn/YKK5VHKP.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{b as E}from"./WAX52NHM.js";import{k as F}from"./NDHZMLZD.js";import{f as C,s as V,t as k}from"./SYAOC57W.js";var T=["date","datetime-local","month","number","range","time","week"],A=["email","password","search","tel","text","url"],L=["email","password","search","tel","text","textarea","url"];function o(a,e,i,s){let l=i.toLowerCase(),r=a[i];s&&r!=null?e.setAttribute(l,`${r}`):e.removeAttribute(l)}function q(a,e,i){i.type=a;let s=T.includes(a),l=e;o(l,i,"min",s),o(l,i,"max",s),o(l,i,"step",s);let r=L.includes(a),d=e;o(d,i,"minLength",r),o(d,i,"maxLength",r);let f=A.includes(a);o(d,i,"pattern",f)}function w(a){let e=a==="textarea"?"text":a;return T.includes(e)||A.includes(e)||L.includes(e)}var j=["text","email","search","hidden","tel","url"],x=Object.freeze({validity:{},validationMessage:""});function D({component:a,input:e,value:i}){if(!Array.isArray(i)){if(a&&e.type==="radio"){let r=a.elementInternals.form?.elements[a.name];if(r?.length>0){r=Array.from(r).filter(n=>n.tagName===a.el.tagName);let d=r.some(n=>n.required),f=r.some(n=>n.checked),h=r.filter(n=>n!==a.el),g=d&&!f;e.required=!!g;let v=I(e.validity),M=e.validationMessage;h?.length>0&&h.forEach(n=>{g!==n.validity?.valueMissing&&n.setValidity&&n.setValidity(v,M)})}}return b(e,i)?x:{validity:I(e.validity),validationMessage:e.validationMessage}}if(j.includes(e.type))return b(e,i.join(","))?x:{validity:I(e.validity),validationMessage:e.validationMessage};let s={},l=[];for(let r of i)b(e,r)||(Object.assign(s,I(e.validity)),e.validationMessage&&l.push(e.validationMessage));return{validity:s,validationMessage:l.join("; ")}}function b(a,e){return a.value=a.type==="file"||e==null?"":String(e),a.validity.valid}function I(a){let e={};for(let i in a)i!=="valid"&&a[i]&&(e[i]=!0);return e}var S=["calcite-input","calcite-input-number","calcite-input-text","calcite-text-area"];function N(a){return`${k(V(a))}${S.includes(a)?"Input":"Change"}`}function R(a){return"form"in a&&"name"in a&&F(a)}function O(a,{status:e,message:i,icon:s}){"status"in a&&(a.status=e),"validationIcon"in a&&typeof a.validationIcon!="string"&&(a.validationIcon=s),"validationMessage"in a&&!a.validationMessage&&(a.validationMessage=i)}function P(a,e){let{disabled:i,name:s,required:l}=a;e.disabled=i,e.name=s||"",e.required=!!l,y(a)?e.checked=a.checked:U(a,e)&&q(e.type,a,e)}function y(a){return"checked"in a}function U(a,e){return a&&w(e.type)}function $(a){let e=Array.from(a.elements);requestAnimationFrame(()=>{let i=e.filter(s=>s.matches("[status=invalid]")&&R(s));for(let s of i)if(s.validationMessage){s.setFocus();break}})}var B=a=>E((e,i)=>{let s="",l,r=null,d=a.inputType;d&&(l=document.createElement("input"));function f(t){if(t.defaultPrevented)return;t.preventDefault();let u=t.currentTarget;$(u)}function h(){"status"in e&&(e.status="idle"),"validationIcon"in e&&(e.validationIcon=!1),"validationMessage"in e&&(e.validationMessage=""),y(e)&&(e.checked=e.defaultChecked),e.value=e.defaultValue}e.listen("luminaFormResetCallback",()=>{h()}),e.listen("luminaFormAssociatedCallback",({detail:[t]})=>{t?t.addEventListener("invalid",f,{capture:!0}):r?.removeEventListener("invalid",f,{capture:!0}),r=t});function g(){let t=s||l?.validationMessage||"";e.el.dispatchEvent(new CustomEvent("calciteInvalid",{bubbles:!0,composed:!0})),O(e,{message:t,icon:!0,status:"invalid"});let u=N(e.el.tagName.toLowerCase());e.listen(u,()=>{"status"in e&&(e.status="idle"),"validationIcon"in e&&(!e.validationIcon||e.validationIcon===!0)&&(e.validationIcon=!1),"validationMessage"in e&&e.validationMessage===t&&(e.validationMessage="")},{once:!0})}i.onConnected(()=>{e.el.addEventListener("invalid",g)}),i.onDisconnected(()=>{e.el.removeEventListener("invalid",g)}),i.onUpdate(t=>{e.hasUpdated||(e.defaultValue=e.value,y(e)&&(e.defaultChecked=e.checked)),(t.has("name")||t.has("value")||y(e)&&t.has("checked"))&&e.elementInternals.setFormValue(n()),e.hasUpdated&&v()}),i.onLoaded(()=>v());function v(){let{disabled:t,elementInternals:u}=e;if(t)return;let c={},m="";l&&(l.type=d,P(e,l),{validity:c,validationMessage:m}=D({component:e,input:l,value:M()})),s&&(c={...c,customError:!0},m=s),u.setValidity(c,m),"validity"in e&&C(()=>{e.validity=u.validity})}function M(){return a.getValue?a.getValue():e.value}function n(){let t=M();if(Array.isArray(t)){let u=new FormData;return t.forEach(c=>u.append(e.name,c)),u}return y(e)?e.checked?t||"on":null:t}return{get active(){return!!e.elementInternals.form},overrideDefaultValue:t=>{e.defaultValue=t},overrideInputType:t=>{d=t,v()},requestSubmit:()=>{e.elementInternals.form?.requestSubmit()},setCustomValidity:t=>{s=t,v()}}});export{B as a};
|