@esri/calcite-components 5.1.0-next.7 → 5.1.0-next.9
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/{3L54WMSL.js → 24BVOJIY.js} +1 -1
- package/dist/cdn/{VLKT7UVD.js → 34EJXQYF.js} +1 -1
- package/dist/cdn/{BCLXCJEM.js → 3GXLGKZV.js} +1 -1
- package/dist/cdn/{BYWKKEUK.js → 3IHT5FIP.js} +1 -1
- package/dist/cdn/{GS2OPY5B.js → 3O7NXGXJ.js} +1 -1
- package/dist/cdn/{S6HRAHQS.js → 43FMFYKZ.js} +1 -1
- package/dist/cdn/{3YNOEWLR.js → 43SP7K3P.js} +1 -1
- package/dist/cdn/{UFKZPJGX.js → 45Z5R6GR.js} +1 -1
- package/dist/cdn/{2YZJ5SK5.js → 47RTCYTX.js} +1 -1
- package/dist/cdn/{7MBOUDMI.js → 4AQ3DQDN.js} +1 -1
- package/dist/cdn/{J7B4VKUB.js → 4DJKUEBQ.js} +1 -1
- package/dist/cdn/4IBKGKIH.js +2 -0
- package/dist/cdn/{I6I5D5MI.js → 4JVVYRDW.js} +1 -1
- package/dist/cdn/{7BJTVAGJ.js → 4U633XVG.js} +1 -1
- package/dist/cdn/55GOZN42.js +2 -0
- package/dist/cdn/{IX7RXOMC.js → 575ZYV35.js} +1 -1
- package/dist/cdn/{LTPGJM6S.js → 5LUEFKD3.js} +1 -1
- package/dist/cdn/{RPXB3OIR.js → 5RDU2ZNH.js} +1 -1
- package/dist/cdn/{NRBJ3VOF.js → 5TJGOI64.js} +1 -1
- package/dist/cdn/{GC4LUWE2.js → 67QHQNZF.js} +1 -1
- package/dist/cdn/{SYSRTPLT.js → 6C76CPWO.js} +1 -1
- package/dist/cdn/{R72JHGCT.js → 6LA4PLL2.js} +1 -1
- package/dist/cdn/{AOSKB4O3.js → 6OKASMD7.js} +1 -1
- package/dist/cdn/{Q6OXR72I.js → 7ECYZZBW.js} +1 -1
- package/dist/cdn/{YVLGTYKI.js → 7JGWCRII.js} +1 -1
- package/dist/cdn/{3WREYYM5.js → 7XBTO6NQ.js} +1 -1
- package/dist/cdn/A6XPQQWN.js +2 -0
- package/dist/cdn/{K3YSAFRD.js → ANQRSTGE.js} +1 -1
- package/dist/cdn/{GFUL7D7M.js → AS2M2ZWD.js} +1 -1
- package/dist/cdn/{PFVIFFID.js → BAMCFG7H.js} +1 -1
- package/dist/cdn/{ZPR4DBFS.js → BDQCESE7.js} +1 -1
- package/dist/cdn/{5BL7R465.js → BG7CCT2Q.js} +1 -1
- package/dist/cdn/{3ARW44US.js → BMRN6G4T.js} +1 -1
- package/dist/cdn/{B6LFHYRQ.js → BPIG37CO.js} +1 -1
- package/dist/cdn/{RL55PUKO.js → BZGE52YU.js} +1 -1
- package/dist/cdn/{A5BBQLSY.js → C25ETLQX.js} +1 -1
- package/dist/cdn/{PZMLAOBO.js → CKMZY3H7.js} +1 -1
- package/dist/cdn/{WOUDT7QM.js → CMVTCAFL.js} +1 -1
- package/dist/cdn/{ETLJSBPM.js → CNR7IJIS.js} +1 -1
- package/dist/cdn/{PYIFXBJK.js → CSOE3CJR.js} +1 -1
- package/dist/cdn/{QKCQY33W.js → DRQCOAQ4.js} +1 -1
- package/dist/cdn/{GHLGH22R.js → DTUD5FAT.js} +1 -1
- package/dist/cdn/{BFOWFEX3.js → DYBHFMG7.js} +1 -1
- package/dist/cdn/{W7C3ZKLA.js → E6EGKXUX.js} +1 -1
- package/dist/cdn/{M2EEQG72.js → EB4M47KA.js} +1 -1
- package/dist/cdn/{Z5RVFQRM.js → EIXE62NK.js} +1 -1
- package/dist/cdn/{CFN4BIZL.js → EQZPTVS3.js} +1 -1
- package/dist/cdn/{HIOWL6WU.js → ESATITDD.js} +1 -1
- package/dist/cdn/ETIO6SPJ.js +2 -0
- package/dist/cdn/EY7FPNVS.js +2 -0
- package/dist/cdn/{TCCEQ7MN.js → FIEDEHAP.js} +1 -1
- package/dist/cdn/{J435BGYU.js → FZ6ZUHKQ.js} +1 -1
- package/dist/cdn/{77ZP6SXN.js → GGGN54CY.js} +1 -1
- package/dist/cdn/{WGALRMGQ.js → GH34TDLL.js} +1 -1
- package/dist/cdn/{7GGO2CZM.js → HG2EYXWI.js} +1 -1
- package/dist/cdn/{DRDD2NOI.js → HQDFIE2B.js} +1 -1
- package/dist/cdn/{6HLSG3XA.js → HZGU4N3I.js} +1 -1
- package/dist/cdn/{XU6Y5UJM.js → I5G3H4D4.js} +1 -1
- package/dist/cdn/{3OKBFBPD.js → I7BWPAOF.js} +1 -1
- package/dist/cdn/{PP3ZYBZZ.js → IBQYZCFQ.js} +1 -1
- package/dist/cdn/{GNJJTXA5.js → IJ7V345Q.js} +1 -1
- package/dist/cdn/{MCTFB7GO.js → IQ4VNR4Q.js} +1 -1
- package/dist/cdn/{MOO6RSVL.js → IWG7JAQJ.js} +1 -1
- package/dist/cdn/{CWAS32KR.js → IZLDBAPA.js} +1 -1
- package/dist/cdn/{ODAPCLKU.js → J2OGE3DI.js} +1 -1
- package/dist/cdn/{RGTWEZAQ.js → JPWQ44GC.js} +1 -1
- package/dist/cdn/{EZCA7WQG.js → JRF656V5.js} +1 -1
- package/dist/cdn/{RPTMX4W3.js → JRWW665Q.js} +1 -1
- package/dist/cdn/{4FGXGSCS.js → JVAE3MLA.js} +1 -1
- package/dist/cdn/{6PUUPFDX.js → K2H2TINH.js} +1 -1
- package/dist/cdn/{4YVKX7KL.js → KDZRPYFR.js} +1 -1
- package/dist/cdn/{2QXTLDZ6.js → KHIMNKVO.js} +1 -1
- package/dist/cdn/{B74N65HB.js → KMOFSKZF.js} +1 -1
- package/dist/cdn/{LWILKWNQ.js → KQNOWW4C.js} +1 -1
- package/dist/cdn/{KME7ZZCF.js → KYKC2CK2.js} +1 -1
- package/dist/cdn/{UHGCQVOL.js → L24DVRWE.js} +1 -1
- package/dist/cdn/{JSRHPQ52.js → L5LBH4FP.js} +1 -1
- package/dist/cdn/LKRLVAVK.js +2 -0
- package/dist/cdn/{7FWJSF56.js → LQD663MA.js} +1 -1
- package/dist/cdn/{PBYPABMK.js → M6MHKAA5.js} +1 -1
- package/dist/cdn/MMEADS6E.js +2 -0
- package/dist/cdn/{OOTSFWEM.js → MVA4NE6I.js} +1 -1
- package/dist/cdn/{3JNFU6KC.js → NGXAYCAR.js} +1 -1
- package/dist/cdn/{LD7LTIBH.js → NJRKH5Q7.js} +1 -1
- package/dist/cdn/{YELDC3QJ.js → NVHH3XZJ.js} +1 -1
- package/dist/cdn/{FS6JTDJK.js → NVSO6GLT.js} +1 -1
- package/dist/cdn/{IIZ3STBY.js → NY7A5LKZ.js} +1 -1
- package/dist/cdn/{MIHUMK4H.js → O7BFREIB.js} +1 -1
- package/dist/cdn/{B6HWVI4Y.js → OLYLT2L5.js} +1 -1
- package/dist/cdn/{BF5X3NKJ.js → OPHJLVOH.js} +1 -1
- package/dist/cdn/{YHMDHOC5.js → OQ2UCUQP.js} +1 -1
- package/dist/cdn/{HMXVJFQG.js → OXCJDMGQ.js} +1 -1
- package/dist/cdn/{PPZ47NEL.js → P4JFMLKY.js} +1 -1
- package/dist/cdn/{IJLVEBB7.js → PCTQTX5N.js} +1 -1
- package/dist/cdn/{55SG4TFB.js → PFKFYB45.js} +1 -1
- package/dist/cdn/{FZX5RPOG.js → PHGT3YNE.js} +1 -1
- package/dist/cdn/{TG2Q5JYE.js → PIU3YYLU.js} +1 -1
- package/dist/cdn/{JJVYITPX.js → QCDS2TXE.js} +1 -1
- package/dist/cdn/{QDHV7HSF.js → QR4JRFEP.js} +1 -1
- package/dist/cdn/QULVDSNJ.js +2 -0
- package/dist/cdn/{II65AX2Y.js → QWALXRY6.js} +1 -1
- package/dist/cdn/{T7KRQA2S.js → RCUNETDY.js} +1 -1
- package/dist/cdn/{PUI672KC.js → RPT5BJMD.js} +1 -1
- package/dist/cdn/{72UQHKZB.js → S7XHDLIF.js} +1 -1
- package/dist/cdn/{VLRV4R6U.js → SAQAAU52.js} +1 -1
- package/dist/cdn/{NEP2GKTJ.js → SG24GAXY.js} +1 -1
- package/dist/cdn/{5Q5XOD7Y.js → SHD6TE4R.js} +1 -1
- package/dist/cdn/{6EIEBFGZ.js → SIMNCT4V.js} +1 -1
- package/dist/cdn/{XGQPFD4F.js → SJSCENKK.js} +1 -1
- package/dist/cdn/{YCCYLLDK.js → SLVFP6JA.js} +1 -1
- package/dist/cdn/{WPVR4P6L.js → TKH5LW5O.js} +1 -1
- package/dist/cdn/{EUTZTNZS.js → TMOOTRK4.js} +1 -1
- package/dist/cdn/{4RM7IDEC.js → TTFCVVON.js} +1 -1
- package/dist/cdn/{CEKWE7MI.js → TXRFE5GH.js} +1 -1
- package/dist/cdn/{6PPA5ENT.js → TXYWJHYI.js} +1 -1
- package/dist/cdn/{JSPE4OG7.js → U4MTAQRM.js} +1 -1
- package/dist/cdn/UHQ454NG.js +2 -0
- package/dist/cdn/{NIOMLRZP.js → UKC7JB7P.js} +1 -1
- package/dist/cdn/{CJGFEG4P.js → UTQKB5CS.js} +1 -1
- package/dist/cdn/{MXIVUGX2.js → V2EVNXUV.js} +1 -1
- package/dist/cdn/{FZUCWEY4.js → VOTW2RMD.js} +1 -1
- package/dist/cdn/{KF4IOR4S.js → VQHTMUYJ.js} +1 -1
- package/dist/cdn/{LZ5FKMVP.js → WBJUAZ65.js} +1 -1
- package/dist/cdn/{QTH6ZO2M.js → WEAILY72.js} +1 -1
- package/dist/cdn/WITGQRKF.js +2 -0
- package/dist/cdn/WM4NZNNA.js +2 -0
- package/dist/cdn/{RABVM5D7.js → XJZLGVT6.js} +1 -1
- package/dist/cdn/{N3AYJLQ3.js → XUSE3II4.js} +1 -1
- package/dist/cdn/{PIAOVZIP.js → XW3UC4FN.js} +1 -1
- package/dist/cdn/{K3MWE3BD.js → YANXY6FO.js} +1 -1
- package/dist/cdn/{6ASYMYYE.js → YJHXVSEP.js} +1 -1
- package/dist/cdn/{S6Q2RWZQ.js → YM6QAFEQ.js} +1 -1
- package/dist/cdn/{BDV62ZVL.js → YMHR4PKM.js} +1 -1
- package/dist/cdn/{CWCZZTTC.js → YMSZKTCN.js} +1 -1
- package/dist/cdn/{MRGLBHY6.js → YYDYHAP7.js} +1 -1
- package/dist/cdn/{O6DG6EWV.js → ZEASFJJQ.js} +1 -1
- package/dist/cdn/{IOTVOWSQ.js → ZGCRVGEK.js} +1 -1
- package/dist/cdn/{V7UCCXSG.js → ZGJRTQBX.js} +1 -1
- package/dist/cdn/{V3YAFJPI.js → ZPZI63EH.js} +1 -1
- package/dist/cdn/{7JU6PR2F.js → ZTV4V5SF.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/dom.js +5 -5
- package/dist/chunks/floating-ui.js +1 -4
- package/dist/chunks/input.js +2 -2
- package/dist/chunks/runtime.js +4 -4
- package/dist/chunks/useForm.js +165 -0
- package/dist/chunks/useReferenceElement.js +505 -0
- package/dist/components/calcite-block/customElement.js +1 -1
- package/dist/components/calcite-checkbox/customElement.d.ts +1 -1
- package/dist/components/calcite-checkbox/customElement.js +6 -7
- package/dist/components/calcite-combobox/customElement.d.ts +1 -1
- package/dist/components/calcite-combobox/customElement.js +11 -12
- package/dist/components/calcite-input/customElement.js +1 -1
- package/dist/components/calcite-input-date-picker/customElement.js +1 -1
- package/dist/components/calcite-input-number/customElement.js +1 -1
- package/dist/components/calcite-input-text/customElement.js +2 -161
- package/dist/components/calcite-input-time-picker/customElement.js +1 -1
- package/dist/components/calcite-list/customElement.js +25 -3
- package/dist/components/calcite-list-item-group/customElement.js +1 -1
- package/dist/components/calcite-meter/customElement.d.ts +7 -1
- package/dist/components/calcite-meter/customElement.js +0 -4
- package/dist/components/calcite-popover/customElement.js +11 -176
- package/dist/components/calcite-sheet/customElement.js +1 -1
- package/dist/components/calcite-tab-nav/customElement.js +1 -1
- package/dist/components/calcite-tabs/customElement.js +1 -1
- package/dist/components/calcite-text-area/customElement.js +1 -1
- package/dist/components/calcite-tooltip/customElement.js +11 -310
- package/dist/components/calcite-tree-item/customElement.js +1 -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/loader.js +2 -2
- package/package.json +2 -2
- package/dist/cdn/6AYITVWB.js +0 -2
- package/dist/cdn/CFGMG4DH.js +0 -2
- package/dist/cdn/DAUSY6FZ.js +0 -2
- package/dist/cdn/ECD3C5ZE.js +0 -2
- package/dist/cdn/GRA7E3RF.js +0 -2
- package/dist/cdn/K6ZO6PJL.js +0 -2
- package/dist/cdn/SHGMG2W2.js +0 -2
- package/dist/cdn/V5MTQXYJ.js +0 -2
- package/dist/cdn/WKUBLKRJ.js +0 -2
- package/dist/cdn/ZGL65NS5.js +0 -2
- package/dist/chunks/FloatingArrow.js +0 -24
|
@@ -2,115 +2,18 @@
|
|
|
2
2
|
import { c as customElement } from "../../chunks/runtime.js";
|
|
3
3
|
import { keyed } from "lit/directives/keyed.js";
|
|
4
4
|
import { css, html } from "lit";
|
|
5
|
-
import { LitElement, createEvent, safeClassMap
|
|
5
|
+
import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
|
|
6
6
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
7
7
|
import { useDirection } from "@arcgis/lumina/controllers";
|
|
8
|
-
import { e as defaultOffsetDistance, r as reposition,
|
|
9
|
-
import { j as isPrimaryPointerButton, x as isKeyboardTriggeredClick, q as queryElementRoots } from "../../chunks/dom.js";
|
|
10
|
-
import { t as toAriaBoolean } from "../../chunks/aria.js";
|
|
11
|
-
import { g as guid } from "../../chunks/guid.js";
|
|
8
|
+
import { e as defaultOffsetDistance, r as reposition, c as connectFloatingUI, a as disconnectFloatingUI, f as filterValidFlipPlacements, h as hideFloatingUI, F as FloatingCSS } from "../../chunks/floating-ui.js";
|
|
12
9
|
import { t as toggleOpenClose } from "../../chunks/openCloseComponent.js";
|
|
13
10
|
import { H as Heading } from "../../chunks/Heading.js";
|
|
14
11
|
import { c as createObserver } from "../../chunks/observers.js";
|
|
15
|
-
import { F as FloatingArrow } from "../../chunks/
|
|
12
|
+
import { u as useReferenceElement, F as FloatingArrow, r as referenceElementManager } from "../../chunks/useReferenceElement.js";
|
|
16
13
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
17
14
|
import { u as useFocusTrap } from "../../chunks/useFocusTrap.js";
|
|
18
15
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|
|
19
16
|
import { u as useTopLayer } from "../../chunks/useTopLayer.js";
|
|
20
|
-
import { i as isActivationKey } from "../../chunks/key.js";
|
|
21
|
-
const clickTolerance = 5;
|
|
22
|
-
function isDrag({
|
|
23
|
-
startX,
|
|
24
|
-
startY,
|
|
25
|
-
endX,
|
|
26
|
-
endY
|
|
27
|
-
}) {
|
|
28
|
-
const distance = Math.hypot(endX - startX, endY - startY);
|
|
29
|
-
return distance > clickTolerance;
|
|
30
|
-
}
|
|
31
|
-
class PopoverManager {
|
|
32
|
-
constructor() {
|
|
33
|
-
this.registeredElements = /* @__PURE__ */ new Map();
|
|
34
|
-
this.registeredElementCount = 0;
|
|
35
|
-
this.queryPopover = (composedPath) => {
|
|
36
|
-
const { registeredElements } = this;
|
|
37
|
-
const registeredElement = composedPath.find((pathEl) => registeredElements.has(pathEl));
|
|
38
|
-
return registeredElements.get(registeredElement);
|
|
39
|
-
};
|
|
40
|
-
this.togglePopovers = (event) => {
|
|
41
|
-
const composedPath = event.composedPath();
|
|
42
|
-
const togglePopover = this.queryPopover(composedPath);
|
|
43
|
-
if (togglePopover && !togglePopover.triggerDisabled) {
|
|
44
|
-
togglePopover.open = !togglePopover.open;
|
|
45
|
-
}
|
|
46
|
-
Array.from(this.registeredElements.values()).filter(
|
|
47
|
-
(popover) => popover !== togglePopover && popover.autoClose && popover.open && !composedPath.includes(popover)
|
|
48
|
-
).forEach((popover) => popover.open = false);
|
|
49
|
-
};
|
|
50
|
-
this.keyDownHandler = (event) => {
|
|
51
|
-
if (event.defaultPrevented) {
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
if (event.key === "Escape") {
|
|
55
|
-
this.closeAllPopovers();
|
|
56
|
-
} else if (isActivationKey(event.key)) {
|
|
57
|
-
this.togglePopovers(event);
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
this.pointerDownHandler = (event) => {
|
|
61
|
-
if (event.defaultPrevented || !isPrimaryPointerButton(event)) {
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
const { clientX, clientY } = event;
|
|
65
|
-
this.pointerDownPosition = { x: clientX, y: clientY };
|
|
66
|
-
};
|
|
67
|
-
this.clickHandler = (event) => {
|
|
68
|
-
if (isKeyboardTriggeredClick(event) || event.defaultPrevented || this.pointerDownPosition && isDrag({
|
|
69
|
-
endY: event.clientY,
|
|
70
|
-
endX: event.clientX,
|
|
71
|
-
startY: this.pointerDownPosition.y,
|
|
72
|
-
startX: this.pointerDownPosition.x
|
|
73
|
-
})) {
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
this.pointerDownPosition = void 0;
|
|
77
|
-
this.togglePopovers(event);
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
// --------------------------------------------------------------------------
|
|
81
|
-
//
|
|
82
|
-
// Public Methods
|
|
83
|
-
//
|
|
84
|
-
// --------------------------------------------------------------------------
|
|
85
|
-
registerElement(referenceEl, popover) {
|
|
86
|
-
this.registeredElementCount++;
|
|
87
|
-
this.registeredElements.set(referenceEl, popover);
|
|
88
|
-
if (this.registeredElementCount === 1) {
|
|
89
|
-
this.addListeners();
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
unregisterElement(referenceEl) {
|
|
93
|
-
if (this.registeredElements.delete(referenceEl)) {
|
|
94
|
-
this.registeredElementCount--;
|
|
95
|
-
}
|
|
96
|
-
if (this.registeredElementCount === 0) {
|
|
97
|
-
this.removeListeners();
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
closeAllPopovers() {
|
|
101
|
-
Array.from(this.registeredElements.values()).forEach((popover) => popover.open = false);
|
|
102
|
-
}
|
|
103
|
-
addListeners() {
|
|
104
|
-
window.addEventListener("pointerdown", this.pointerDownHandler);
|
|
105
|
-
window.addEventListener("click", this.clickHandler);
|
|
106
|
-
window.addEventListener("keydown", this.keyDownHandler);
|
|
107
|
-
}
|
|
108
|
-
removeListeners() {
|
|
109
|
-
window.removeEventListener("pointerdown", this.pointerDownHandler);
|
|
110
|
-
window.removeEventListener("click", this.clickHandler);
|
|
111
|
-
window.removeEventListener("keydown", this.keyDownHandler);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
17
|
const CSS = {
|
|
115
18
|
positionContainer: "position-container",
|
|
116
19
|
container: "container",
|
|
@@ -123,13 +26,13 @@ const CSS = {
|
|
|
123
26
|
heading: "heading"
|
|
124
27
|
};
|
|
125
28
|
const defaultPopoverPlacement = "auto";
|
|
126
|
-
const ARIA_CONTROLS = "aria-controls";
|
|
127
|
-
const ARIA_EXPANDED = "aria-expanded";
|
|
128
29
|
const styles = css`:host{display:contents}:host([top-layer-disabled]){--calcite-floating-ui-z-index: var(--calcite-z-index-popup)}.position-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{.position-container{opacity:0;inset-block-start:0;left:0}}.position-container{max-inline-size:var(--calcite-popover-max-size-x, 100vw)}.position-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.position-container:popover-open{display:block}.position-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}.position-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.position-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.position-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.position-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.calcite-floating-ui-arrow{pointer-events:none;position:absolute;z-index:calc(var(--calcite-z-index) * -1);fill:var(--calcite-color-foreground-1)}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-color-border-3)}:host([scale=s]) .heading{padding:.5rem .75rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}:host(:is([scale=s],[scale=m])){--calcite-internal-popover-close-spacing: var(--calcite-spacing-xs)}:host([scale=m]) .heading{padding:.75rem 1rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]){--calcite-internal-popover-close-spacing: var(--calcite-spacing-sm)}:host([scale=l]) .heading{padding:1rem 1.25rem;font-size:var(--calcite-font-size-relative-lg);line-height:var(--calcite-font-line-height-relative-snug)}.position-container .calcite-floating-ui-anim{border-width:1px;border-style:solid;background-color:var(--calcite-popover-background-color, var(--calcite-color-foreground-1));border-color:var(--calcite-popover-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-popover-corner-radius, var(--calcite-corner-radius-round))}.calcite-floating-ui-arrow{fill:var(--calcite-popover-background-color, var(--calcite-color-foreground-1))}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-popover-border-color, var(--calcite-color-border-3))}.header{display:flex;flex:1 1 auto;align-items:stretch;justify-content:flex-start;border-width:0px;border-bottom-width:1px;border-style:solid;border-block-end-color:var(--calcite-popover-border-color, var(--calcite-color-border-3))}.heading{margin:0;display:block;flex:1 1 auto;align-self:center;white-space:normal;font-weight:var(--calcite-font-weight-medium);word-wrap:break-word;word-break:break-word;color:var(--calcite-popover-text-color, var(--calcite-color-text-1))}.header-container{position:relative;display:flex;height:100%;flex-direction:row;flex-wrap:nowrap;border-radius:.25rem;color:var(--calcite-popover-text-color, var(--calcite-color-text-1))}.header-container.has-header{flex-direction:column}.content{display:flex;height:100%;width:100%;flex-direction:column;flex-wrap:nowrap;align-self:center;word-wrap:break-word;word-break:break-word}.close-button{margin:auto;margin-inline-end:var(--calcite-internal-popover-close-spacing)}.close-button-container{display:flex;flex:0 0 auto}::slotted(calcite-panel),::slotted(calcite-flow){height:100%}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
129
|
-
const manager =
|
|
30
|
+
const manager = referenceElementManager({ click: true });
|
|
130
31
|
class Popover extends LitElement {
|
|
131
32
|
constructor() {
|
|
132
33
|
super(...arguments);
|
|
34
|
+
this.referenceElementType = "click";
|
|
35
|
+
this.referenceElementController = useReferenceElement({ manager })(this);
|
|
133
36
|
this.direction = useDirection();
|
|
134
37
|
this.focusTrap = useFocusTrap({
|
|
135
38
|
triggerProp: "open",
|
|
@@ -144,8 +47,6 @@ class Popover extends LitElement {
|
|
|
144
47
|
}
|
|
145
48
|
}
|
|
146
49
|
})(this);
|
|
147
|
-
this.guid = `calcite-popover-${guid()}`;
|
|
148
|
-
this.hasLoaded = false;
|
|
149
50
|
this.mutationObserver = createObserver("mutation", () => this.focusTrap.updateContainerElements());
|
|
150
51
|
this.transitionProp = "opacity";
|
|
151
52
|
this.transitionRef = createRef();
|
|
@@ -207,7 +108,6 @@ class Popover extends LitElement {
|
|
|
207
108
|
super.connectedCallback();
|
|
208
109
|
this.mutationObserver?.observe(this.el, { childList: true, subtree: true });
|
|
209
110
|
this.setFilteredPlacements();
|
|
210
|
-
requestAnimationFrame(() => this.setUpReferenceElement(this.hasLoaded));
|
|
211
111
|
}
|
|
212
112
|
willUpdate(changes) {
|
|
213
113
|
if (changes.has("flipPlacements")) {
|
|
@@ -219,23 +119,18 @@ class Popover extends LitElement {
|
|
|
219
119
|
if (changes.has("offsetDistance") && (this.hasUpdated || this.offsetDistance !== defaultOffsetDistance) || changes.has("offsetSkidding") && (this.hasUpdated || this.offsetSkidding !== 0) || changes.has("overlayPositioning") && (this.hasUpdated || this.overlayPositioning !== "absolute") || changes.has("placement") && (this.hasUpdated || this.placement !== defaultPopoverPlacement)) {
|
|
220
120
|
this.reposition(true);
|
|
221
121
|
}
|
|
222
|
-
if (changes.has("referenceElement")) {
|
|
223
|
-
this.
|
|
224
|
-
if (!this.referenceElement && this.open) {
|
|
225
|
-
this.topLayer.hide();
|
|
226
|
-
}
|
|
122
|
+
if (changes.has("referenceElement") && !this.referenceElement && this.open) {
|
|
123
|
+
this.topLayer.hide();
|
|
227
124
|
}
|
|
228
125
|
}
|
|
229
|
-
|
|
230
|
-
if (
|
|
231
|
-
this
|
|
126
|
+
updated(changes) {
|
|
127
|
+
if (changes.has("referenceEl")) {
|
|
128
|
+
connectFloatingUI(this);
|
|
232
129
|
}
|
|
233
|
-
this.hasLoaded = true;
|
|
234
130
|
}
|
|
235
131
|
disconnectedCallback() {
|
|
236
132
|
super.disconnectedCallback();
|
|
237
133
|
this.mutationObserver?.disconnect();
|
|
238
|
-
this.removeReferences();
|
|
239
134
|
disconnectFloatingUI(this);
|
|
240
135
|
}
|
|
241
136
|
flipPlacementsHandler() {
|
|
@@ -245,73 +140,14 @@ class Popover extends LitElement {
|
|
|
245
140
|
openHandler() {
|
|
246
141
|
toggleOpenClose(this);
|
|
247
142
|
this.reposition(true);
|
|
248
|
-
this.setExpandedAttr();
|
|
249
|
-
}
|
|
250
|
-
referenceElementHandler() {
|
|
251
|
-
this.setUpReferenceElement();
|
|
252
|
-
this.reposition(true);
|
|
253
143
|
}
|
|
254
144
|
setFloatingEl(el) {
|
|
255
145
|
this.floatingEl = el;
|
|
256
|
-
if (el) {
|
|
257
|
-
requestAnimationFrame(() => this.setUpReferenceElement());
|
|
258
|
-
}
|
|
259
146
|
}
|
|
260
147
|
setFilteredPlacements() {
|
|
261
148
|
const { el, flipPlacements } = this;
|
|
262
149
|
this.filteredFlipPlacements = flipPlacements ? filterValidFlipPlacements(flipPlacements, el) : null;
|
|
263
150
|
}
|
|
264
|
-
setUpReferenceElement(warn = true) {
|
|
265
|
-
this.removeReferences();
|
|
266
|
-
this.referenceEl = this.getReferenceElement();
|
|
267
|
-
connectFloatingUI(this);
|
|
268
|
-
const { el, referenceElement, referenceEl } = this;
|
|
269
|
-
if (warn && referenceElement && !referenceEl) {
|
|
270
|
-
console.warn(`${el.tagName}: reference-element id "${referenceElement}" was not found.`, {
|
|
271
|
-
el
|
|
272
|
-
});
|
|
273
|
-
}
|
|
274
|
-
this.addReferences();
|
|
275
|
-
}
|
|
276
|
-
getId() {
|
|
277
|
-
return this.el.id || this.guid;
|
|
278
|
-
}
|
|
279
|
-
setExpandedAttr() {
|
|
280
|
-
const { referenceEl, open } = this;
|
|
281
|
-
if (!referenceEl) {
|
|
282
|
-
return;
|
|
283
|
-
}
|
|
284
|
-
if ("setAttribute" in referenceEl) {
|
|
285
|
-
referenceEl.setAttribute(ARIA_EXPANDED, toAriaBoolean(open));
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
addReferences() {
|
|
289
|
-
const { referenceEl } = this;
|
|
290
|
-
if (!referenceEl) {
|
|
291
|
-
return;
|
|
292
|
-
}
|
|
293
|
-
const id = this.getId();
|
|
294
|
-
if ("setAttribute" in referenceEl) {
|
|
295
|
-
referenceEl.setAttribute(ARIA_CONTROLS, id);
|
|
296
|
-
}
|
|
297
|
-
manager.registerElement(referenceEl, this.el);
|
|
298
|
-
this.setExpandedAttr();
|
|
299
|
-
}
|
|
300
|
-
removeReferences() {
|
|
301
|
-
const { referenceEl } = this;
|
|
302
|
-
if (!referenceEl) {
|
|
303
|
-
return;
|
|
304
|
-
}
|
|
305
|
-
if ("removeAttribute" in referenceEl) {
|
|
306
|
-
referenceEl.removeAttribute(ARIA_CONTROLS);
|
|
307
|
-
referenceEl.removeAttribute(ARIA_EXPANDED);
|
|
308
|
-
}
|
|
309
|
-
manager.unregisterElement(referenceEl);
|
|
310
|
-
}
|
|
311
|
-
getReferenceElement() {
|
|
312
|
-
const { referenceElement, el } = this;
|
|
313
|
-
return (typeof referenceElement === "string" ? queryElementRoots(el, { id: referenceElement }) : referenceElement) || null;
|
|
314
|
-
}
|
|
315
151
|
hide() {
|
|
316
152
|
this.open = false;
|
|
317
153
|
}
|
|
@@ -353,7 +189,6 @@ class Popover extends LitElement {
|
|
|
353
189
|
this.el.inert = hidden;
|
|
354
190
|
this.el.ariaLabel = label;
|
|
355
191
|
this.el.ariaLive = "polite";
|
|
356
|
-
setAttribute(this.el, "id", this.getId());
|
|
357
192
|
this.el.role = "dialog";
|
|
358
193
|
return html`<div class=${safeClassMap(CSS.positionContainer)} popover=manual ${ref(this.setFloatingEl)}><div class=${safeClassMap({
|
|
359
194
|
[CSS.container]: true,
|
|
@@ -6,7 +6,7 @@ import { css, html } from "lit";
|
|
|
6
6
|
import { LitElement, createEvent, setAttribute, safeClassMap } from "@arcgis/lumina";
|
|
7
7
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
8
8
|
import { useDirection } from "@arcgis/lumina/controllers";
|
|
9
|
-
import {
|
|
9
|
+
import { z as ensureId, g as getStylePixelValue } from "../../chunks/dom.js";
|
|
10
10
|
import { c as createObserver } from "../../chunks/observers.js";
|
|
11
11
|
import { t as toggleOpenClose } from "../../chunks/openCloseComponent.js";
|
|
12
12
|
import { g as getDimensionClass } from "../../chunks/dynamicClasses.js";
|
|
@@ -6,7 +6,7 @@ import { a as calciteSize24, b as calciteSize32, d as calciteSize44 } from "../.
|
|
|
6
6
|
import { css, html } from "lit";
|
|
7
7
|
import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
|
|
8
8
|
import { useDirection } from "@arcgis/lumina/controllers";
|
|
9
|
-
import {
|
|
9
|
+
import { A as filterDirectChildren, f as focusElementInGroup, i as focusElement } from "../../chunks/dom.js";
|
|
10
10
|
import { c as createObserver } from "../../chunks/observers.js";
|
|
11
11
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
12
12
|
const ICON = {
|
|
@@ -3,7 +3,7 @@ import { c as customElement } from "../../chunks/runtime.js";
|
|
|
3
3
|
import { css, html } from "lit";
|
|
4
4
|
import { LitElement, safeClassMap } from "@arcgis/lumina";
|
|
5
5
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
6
|
-
import { a as slotChangeGetAssignedElements,
|
|
6
|
+
import { a as slotChangeGetAssignedElements, B as getSlotAssignedElements } from "../../chunks/dom.js";
|
|
7
7
|
const CSS = {
|
|
8
8
|
section: "section"
|
|
9
9
|
};
|
|
@@ -14,7 +14,7 @@ import { c as createObserver, u as updateRefObserver } from "../../chunks/observ
|
|
|
14
14
|
import { g as guid } from "../../chunks/guid.js";
|
|
15
15
|
import { I as InternalLabel } from "../../chunks/InternalLabel.js";
|
|
16
16
|
import { V as Validation } from "../../chunks/Validation.js";
|
|
17
|
-
import {
|
|
17
|
+
import { a as syncHiddenFormInput } from "../../chunks/input.js";
|
|
18
18
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
19
19
|
import { u as useCancelable } from "../../chunks/useCancelable.js";
|
|
20
20
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|