@esri/solutions-components 0.3.6 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/buffer-tools_6.cjs.entry.js +8 -5
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +2 -2
- package/dist/cjs/calcite-input-message_5.cjs.entry.js +6 -4
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +2 -2
- package/dist/cjs/{csvUtils-83af7ae1.js → csvUtils-34666909.js} +1 -1
- package/dist/cjs/{interfaces-772edf61.js → interfaces-17c631bf.js} +1 -1
- package/dist/cjs/layer-table.cjs.entry.js +3 -3
- package/dist/cjs/map-card.cjs.entry.js +1 -1
- package/dist/cjs/{mapViewUtils-55ac76cb.js → mapViewUtils-24d1d859.js} +1 -1
- package/dist/cjs/public-notification.cjs.entry.js +16 -10
- package/dist/cjs/solution-configuration.cjs.entry.js +2 -2
- package/dist/cjs/solution-contents_3.cjs.entry.js +2 -2
- package/dist/cjs/{solution-store-39726b81.js → solution-store-2dbab624.js} +1 -1
- package/dist/collection/components/buffer-tools/buffer-tools.js +2 -2
- package/dist/collection/components/map-draw-tools/map-draw-tools.js +2 -1
- package/dist/collection/components/public-notification/public-notification.js +14 -8
- package/dist/collection/components/refine-selection/refine-selection.js +4 -2
- package/dist/collection/components/refine-selection-tools/refine-selection-tools.css +1 -0
- package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +3 -1
- package/dist/collection/demos/new-public-notification.html +2 -1
- package/dist/collection/utils/interfaces.js +1 -1
- package/dist/collection/utils/interfaces.ts +2 -2
- package/dist/components/interfaces3.js +1 -1
- package/dist/components/map-draw-tools2.js +2 -1
- package/dist/components/public-notification.js +14 -8
- package/dist/components/refine-selection-tools2.js +4 -2
- package/dist/components/refine-selection2.js +4 -2
- package/dist/esm/buffer-tools_6.entry.js +8 -5
- package/dist/esm/calcite-combobox_3.entry.js +2 -2
- package/dist/esm/calcite-input-message_5.entry.js +6 -4
- package/dist/esm/calcite-shell-panel_14.entry.js +2 -2
- package/dist/esm/{csvUtils-eb231cfb.js → csvUtils-ae3004b9.js} +1 -1
- package/dist/esm/{interfaces-3b23a5f9.js → interfaces-d0d83efa.js} +1 -1
- package/dist/esm/layer-table.entry.js +3 -3
- package/dist/esm/map-card.entry.js +1 -1
- package/dist/esm/{mapViewUtils-e5d8a1e1.js → mapViewUtils-541e7a3c.js} +1 -1
- package/dist/esm/public-notification.entry.js +16 -10
- package/dist/esm/solution-configuration.entry.js +2 -2
- package/dist/esm/solution-contents_3.entry.js +2 -2
- package/dist/esm/{solution-store-c0bf9200.js → solution-store-41e15f1c.js} +1 -1
- package/dist/solutions-components/demos/new-public-notification.html +2 -1
- package/dist/solutions-components/p-05e64bd1.js +498 -2
- package/dist/solutions-components/p-08a95b33.entry.js +138 -0
- package/dist/solutions-components/p-0da5bbdf.entry.js +91 -0
- package/dist/solutions-components/p-0ef91144.entry.js +913 -0
- package/dist/solutions-components/p-0f523243.entry.js +1916 -0
- package/dist/solutions-components/p-11b9510e.entry.js +173 -0
- package/dist/solutions-components/p-1b875d94.entry.js +58 -0
- package/dist/solutions-components/p-1c567f3a.js +23 -16
- package/dist/solutions-components/p-1c883db9.entry.js +43 -0
- package/dist/solutions-components/p-1f225056.js +322 -0
- package/dist/solutions-components/p-1f499e67.entry.js +72 -0
- package/dist/solutions-components/p-20d3d758.entry.js +881 -0
- package/dist/solutions-components/p-2274ac9e.entry.js +160 -0
- package/dist/solutions-components/p-23ec5ac5.entry.js +93 -0
- package/dist/solutions-components/p-2447798c.entry.js +155 -0
- package/dist/solutions-components/p-2525e691.entry.js +432 -0
- package/dist/solutions-components/p-2561f5b5.js +4092 -0
- package/dist/solutions-components/p-29f887c0.entry.js +234 -0
- package/dist/solutions-components/p-2a0d8047.entry.js +345 -0
- package/dist/solutions-components/p-2c177e6a.entry.js +101 -0
- package/dist/solutions-components/p-2e9ed892.js +46 -1
- package/dist/solutions-components/p-316f56db.js +219 -2
- package/dist/solutions-components/p-327f3ebf.entry.js +98 -0
- package/dist/solutions-components/p-356f8b54.entry.js +138 -0
- package/dist/solutions-components/p-359c58de.entry.js +172 -0
- package/dist/solutions-components/p-37336c0d.entry.js +116 -0
- package/dist/solutions-components/p-374a5031.js +105 -2
- package/dist/solutions-components/p-39ea6ef4.entry.js +71 -0
- package/dist/solutions-components/p-3b010ce1.js +17 -1
- package/dist/solutions-components/p-4307dacd.js +194 -1
- package/dist/solutions-components/p-44da2507.js +405 -14
- package/dist/solutions-components/p-46bdffe8.entry.js +54 -0
- package/dist/solutions-components/p-4894bbeb.js +53 -2
- package/dist/solutions-components/p-4cd569f1.entry.js +1298 -0
- package/dist/solutions-components/p-4d4160f9.entry.js +121 -0
- package/dist/solutions-components/p-4e32bf8c.js +482 -1
- package/dist/solutions-components/p-4e9cbd32.entry.js +184 -0
- package/dist/solutions-components/p-508317b3.js +13 -2
- package/dist/solutions-components/p-54697d58.entry.js +198 -0
- package/dist/solutions-components/p-55c79103.entry.js +311 -0
- package/dist/solutions-components/p-57fd19c0.entry.js +706 -0
- package/dist/solutions-components/p-59b48fde.entry.js +443 -0
- package/dist/solutions-components/p-60e0e6a0.entry.js +214 -0
- package/dist/solutions-components/p-621d0534.entry.js +123 -0
- package/dist/solutions-components/p-63f6e8f1.js +14 -1
- package/dist/solutions-components/p-66aeec57.entry.js +61 -0
- package/dist/solutions-components/p-69834f46.entry.js +618 -0
- package/dist/solutions-components/p-6d9da8e5.entry.js +21530 -0
- package/dist/solutions-components/p-6e0da576.js +13 -1
- package/dist/solutions-components/p-6ec3f294.entry.js +106 -0
- package/dist/solutions-components/p-6fe17794.js +9 -1
- package/dist/solutions-components/p-7024cb16.entry.js +72 -0
- package/dist/solutions-components/p-70535506.entry.js +226 -0
- package/dist/solutions-components/p-708a63a8.js +12 -1
- package/dist/solutions-components/p-729708a3.js +14 -1
- package/dist/solutions-components/p-73e23995.js +6 -1
- package/dist/solutions-components/p-74b29d75.entry.js +231 -0
- package/dist/solutions-components/p-74b7ee25.entry.js +711 -0
- package/dist/solutions-components/p-77182c3a.js +3015 -1
- package/dist/solutions-components/p-78b3ef80.entry.js +456 -0
- package/dist/solutions-components/p-79709c19.js +60 -3
- package/dist/solutions-components/p-7a46ef97.js +181 -2
- package/dist/solutions-components/p-7be159e6.entry.js +175 -0
- package/dist/solutions-components/p-7d4451c2.entry.js +71 -0
- package/dist/solutions-components/p-7daea1df.js +41 -1
- package/dist/solutions-components/p-7e39e5ad.entry.js +102 -0
- package/dist/solutions-components/p-7fb45059.entry.js +43 -0
- package/dist/solutions-components/p-815533de.js +306 -3
- package/dist/solutions-components/p-816622ca.entry.js +248 -0
- package/dist/solutions-components/p-83166522.js +205 -2
- package/dist/solutions-components/p-83bd1991.entry.js +36 -0
- package/dist/solutions-components/p-856464d7.entry.js +572 -0
- package/dist/solutions-components/p-8c349bad.entry.js +347 -0
- package/dist/solutions-components/p-8dccb390.entry.js +1986 -0
- package/dist/solutions-components/p-904c185a.entry.js +228 -0
- package/dist/solutions-components/p-9092f8b3.entry.js +156 -0
- package/dist/solutions-components/p-9371145a.entry.js +477 -0
- package/dist/solutions-components/p-93d3119d.js +1948 -1
- package/dist/solutions-components/p-95ec8062.entry.js +173 -0
- package/dist/solutions-components/p-991ee695.js +109 -1
- package/dist/solutions-components/p-9a57dab7.entry.js +213 -0
- package/dist/solutions-components/p-9a9955db.js +41 -1
- package/dist/solutions-components/p-9c1ebc90.js +35 -16
- package/dist/solutions-components/p-9eba5c66.js +399 -3
- package/dist/solutions-components/p-a033a507.entry.js +252 -0
- package/dist/solutions-components/p-a3773415.entry.js +1132 -0
- package/dist/solutions-components/p-a44fe40f.entry.js +94 -0
- package/dist/solutions-components/p-a5b1ab03.js +33 -3
- package/dist/solutions-components/p-a5b2c13d.entry.js +723 -0
- package/dist/solutions-components/p-a6d729b7.entry.js +85 -0
- package/dist/solutions-components/p-a8005026.entry.js +565 -0
- package/dist/solutions-components/p-a80b3880.js +14 -1
- package/dist/solutions-components/p-a89198a3.entry.js +2620 -0
- package/dist/solutions-components/p-aa04bd1f.entry.js +95 -0
- package/dist/solutions-components/p-aa0a0922.entry.js +80 -0
- package/dist/solutions-components/p-ae1fd76b.js +11 -1
- package/dist/solutions-components/p-b2cf435e.entry.js +87 -0
- package/dist/solutions-components/p-b359dc78.js +41 -1
- package/dist/solutions-components/p-b57bc4eb.entry.js +71 -0
- package/dist/solutions-components/p-b75cc407.entry.js +145 -0
- package/dist/solutions-components/p-b911cb75.entry.js +71 -0
- package/dist/solutions-components/p-b965e177.entry.js +335 -0
- package/dist/solutions-components/p-b978636e.js +14 -1
- package/dist/solutions-components/p-ba10a5c8.entry.js +42 -0
- package/dist/solutions-components/p-bd67334c.js +122 -2
- package/dist/solutions-components/p-bde20dba.entry.js +212 -0
- package/dist/solutions-components/p-be0b5a94.entry.js +248 -0
- package/dist/solutions-components/p-c023e6a1.js +2028 -2
- package/dist/solutions-components/p-c27b0c2d.entry.js +150 -0
- package/dist/solutions-components/p-c579ed60.entry.js +447 -0
- package/dist/solutions-components/p-c92bc231.js +101 -2
- package/dist/solutions-components/p-cc815aca.js +839 -16
- package/dist/solutions-components/p-cc8beabb.entry.js +695 -0
- package/dist/solutions-components/p-cdc46c0c.js +1751 -2
- package/dist/solutions-components/p-d12e6992.entry.js +118 -0
- package/dist/solutions-components/p-d1dfed6b.entry.js +179 -0
- package/dist/solutions-components/p-d48a24e6.js +754 -2
- package/dist/solutions-components/p-d96ee3ef.entry.js +579 -0
- package/dist/solutions-components/p-dbc9a5a8.js +80 -0
- package/dist/solutions-components/p-dcdbe712.entry.js +278 -0
- package/dist/solutions-components/p-de39206f.entry.js +113 -0
- package/dist/solutions-components/p-de5416e8.js +28 -1
- package/dist/solutions-components/p-df420d54.entry.js +213 -0
- package/dist/solutions-components/p-e3138cf0.entry.js +20 -0
- package/dist/solutions-components/p-e4845fec.entry.js +152 -0
- package/dist/solutions-components/p-e611d8c8.js +28 -1
- package/dist/solutions-components/p-e947d3b0.js +5 -1
- package/dist/solutions-components/p-ea534300.js +41 -2
- package/dist/solutions-components/p-ec84ee85.entry.js +55 -0
- package/dist/solutions-components/p-ed36c637.entry.js +85 -0
- package/dist/solutions-components/p-f0add71c.js +74 -0
- package/dist/solutions-components/p-f42e014b.js +171 -2
- package/dist/solutions-components/p-fc02e7de.entry.js +308 -0
- package/dist/solutions-components/p-fc884dd6.js +28 -16
- package/dist/solutions-components/p-fcbfa59c.entry.js +181 -0
- package/dist/solutions-components/p-fdc5cf5f.entry.js +138 -0
- package/dist/solutions-components/solutions-components.esm.js +20 -1
- package/dist/solutions-components/utils/interfaces.ts +2 -2
- package/dist/types/components/buffer-tools/buffer-tools.d.ts +2 -2
- package/dist/types/components/public-notification/public-notification.d.ts +9 -1
- package/dist/types/components.d.ts +2 -2
- package/package.json +1 -1
- package/dist/solutions-components/p-021432b8.entry.js +0 -12
- package/dist/solutions-components/p-03440b1e.entry.js +0 -11
- package/dist/solutions-components/p-0512635b.entry.js +0 -6
- package/dist/solutions-components/p-086ef115.entry.js +0 -29
- package/dist/solutions-components/p-0b4bf57f.entry.js +0 -6
- package/dist/solutions-components/p-0c088725.entry.js +0 -6
- package/dist/solutions-components/p-0f820c08.entry.js +0 -6
- package/dist/solutions-components/p-164780a0.entry.js +0 -6
- package/dist/solutions-components/p-179a68a0.entry.js +0 -6
- package/dist/solutions-components/p-184b5005.entry.js +0 -11
- package/dist/solutions-components/p-1d082fee.entry.js +0 -11
- package/dist/solutions-components/p-1e6c02a2.entry.js +0 -11
- package/dist/solutions-components/p-20a58e62.entry.js +0 -17
- package/dist/solutions-components/p-20b2458c.entry.js +0 -11
- package/dist/solutions-components/p-245d47c1.entry.js +0 -6
- package/dist/solutions-components/p-2cb057a9.entry.js +0 -11
- package/dist/solutions-components/p-2cc72806.entry.js +0 -23
- package/dist/solutions-components/p-2de1db9c.entry.js +0 -11
- package/dist/solutions-components/p-2e9c7055.entry.js +0 -11
- package/dist/solutions-components/p-2ed5e6c8.entry.js +0 -11
- package/dist/solutions-components/p-3109d940.entry.js +0 -6
- package/dist/solutions-components/p-31a8bcfa.entry.js +0 -6
- package/dist/solutions-components/p-3649acb3.entry.js +0 -18
- package/dist/solutions-components/p-3f88ba73.entry.js +0 -6
- package/dist/solutions-components/p-3fa9b3c8.js +0 -36
- package/dist/solutions-components/p-40c41709.entry.js +0 -6
- package/dist/solutions-components/p-40e963c7.entry.js +0 -11
- package/dist/solutions-components/p-40f480da.entry.js +0 -11
- package/dist/solutions-components/p-49d5d2d3.entry.js +0 -11
- package/dist/solutions-components/p-4f7049a4.entry.js +0 -11
- package/dist/solutions-components/p-506e4d78.entry.js +0 -6
- package/dist/solutions-components/p-576fdcab.entry.js +0 -6
- package/dist/solutions-components/p-5bd0cf34.entry.js +0 -23
- package/dist/solutions-components/p-65e177f1.entry.js +0 -6
- package/dist/solutions-components/p-67d710c2.entry.js +0 -6
- package/dist/solutions-components/p-7268b445.entry.js +0 -11
- package/dist/solutions-components/p-75ea4667.entry.js +0 -6
- package/dist/solutions-components/p-778c0a36.entry.js +0 -17
- package/dist/solutions-components/p-7a22509b.entry.js +0 -12
- package/dist/solutions-components/p-7bff51db.entry.js +0 -6
- package/dist/solutions-components/p-7d2d0d5d.entry.js +0 -6
- package/dist/solutions-components/p-7f0036f1.entry.js +0 -11
- package/dist/solutions-components/p-8060fb94.entry.js +0 -6
- package/dist/solutions-components/p-80a1b305.entry.js +0 -6
- package/dist/solutions-components/p-81eae877.entry.js +0 -12
- package/dist/solutions-components/p-84e86b8b.entry.js +0 -6
- package/dist/solutions-components/p-851e04ae.entry.js +0 -6
- package/dist/solutions-components/p-9106950a.entry.js +0 -11
- package/dist/solutions-components/p-979804a4.entry.js +0 -11
- package/dist/solutions-components/p-9862baa8.entry.js +0 -11
- package/dist/solutions-components/p-9b5a9117.entry.js +0 -12
- package/dist/solutions-components/p-9deff0c2.entry.js +0 -6
- package/dist/solutions-components/p-9f400eeb.entry.js +0 -6
- package/dist/solutions-components/p-a0639ad1.entry.js +0 -11
- package/dist/solutions-components/p-a33c044e.entry.js +0 -6
- package/dist/solutions-components/p-a516c658.entry.js +0 -6
- package/dist/solutions-components/p-aa0ef36d.entry.js +0 -11
- package/dist/solutions-components/p-aaccbdf3.entry.js +0 -18
- package/dist/solutions-components/p-ab03a5c9.entry.js +0 -11
- package/dist/solutions-components/p-ad469b92.entry.js +0 -11
- package/dist/solutions-components/p-adc86ac3.entry.js +0 -6
- package/dist/solutions-components/p-addc1156.entry.js +0 -11
- package/dist/solutions-components/p-ae846934.entry.js +0 -11
- package/dist/solutions-components/p-b0572fc4.entry.js +0 -37
- package/dist/solutions-components/p-b4e476b7.js +0 -257
- package/dist/solutions-components/p-b668daf8.js +0 -21
- package/dist/solutions-components/p-b6e6eae1.entry.js +0 -6
- package/dist/solutions-components/p-bc317a7f.entry.js +0 -6
- package/dist/solutions-components/p-be41429f.js +0 -21
- package/dist/solutions-components/p-bf6b6353.entry.js +0 -11
- package/dist/solutions-components/p-c2e3dfbb.entry.js +0 -11
- package/dist/solutions-components/p-c4afae53.entry.js +0 -12
- package/dist/solutions-components/p-c9da1c26.entry.js +0 -6
- package/dist/solutions-components/p-cbf8cd49.entry.js +0 -6
- package/dist/solutions-components/p-cc1a064a.entry.js +0 -11
- package/dist/solutions-components/p-d09a168c.entry.js +0 -6
- package/dist/solutions-components/p-d377f913.entry.js +0 -11
- package/dist/solutions-components/p-d4cefead.entry.js +0 -37
- package/dist/solutions-components/p-d7bc0baf.entry.js +0 -16
- package/dist/solutions-components/p-d8968487.entry.js +0 -11
- package/dist/solutions-components/p-e00a0b86.entry.js +0 -11
- package/dist/solutions-components/p-e9a7ed49.entry.js +0 -11
- package/dist/solutions-components/p-ec27e493.entry.js +0 -11
- package/dist/solutions-components/p-ed6404eb.entry.js +0 -6
- package/dist/solutions-components/p-ef21e195.entry.js +0 -23
- package/dist/solutions-components/p-f6068a2d.entry.js +0 -11
- package/dist/solutions-components/p-f6c4cff3.entry.js +0 -11
- package/dist/solutions-components/p-f847291f.entry.js +0 -6
- package/dist/solutions-components/p-f90fd262.entry.js +0 -11
- package/dist/solutions-components/p-fc973005.entry.js +0 -6
- package/dist/solutions-components/p-ff9fb6bc.entry.js +0 -11
@@ -3,9 +3,505 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import{e as
|
6
|
+
import { e as rectToClientRect } from './p-cdc46c0c.js';
|
7
|
+
import './p-83166522.js';
|
8
|
+
import './p-729708a3.js';
|
9
|
+
import './p-a80b3880.js';
|
10
|
+
import './p-4e32bf8c.js';
|
11
|
+
|
7
12
|
/*!
|
8
13
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
14
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
10
15
|
* v1.0.0-beta.97
|
11
|
-
*/
|
16
|
+
*/
|
17
|
+
/**
|
18
|
+
* This module provides utils to fix positioning across shadow DOM in non-Chromium browsers
|
19
|
+
*
|
20
|
+
* It is based on floating-ui's distributable
|
21
|
+
*/
|
22
|
+
/**
|
23
|
+
* 👇 the following are needed to fix shadow DOM positioning 👇️
|
24
|
+
*
|
25
|
+
* @param element
|
26
|
+
*/
|
27
|
+
function getTrueOffsetParent(element) {
|
28
|
+
if (!isHTMLElement(element) || getComputedStyle(element).position === "fixed") {
|
29
|
+
return null;
|
30
|
+
}
|
31
|
+
return composedOffsetParent(element);
|
32
|
+
}
|
33
|
+
/**
|
34
|
+
* Polyfills the old offsetParent behavior from before the spec was changed:
|
35
|
+
* https://github.com/w3c/csswg-drafts/issues/159
|
36
|
+
*
|
37
|
+
* @param element
|
38
|
+
*/
|
39
|
+
function composedOffsetParent(element) {
|
40
|
+
let { offsetParent } = element;
|
41
|
+
let ancestor = element;
|
42
|
+
let foundInsideSlot = false;
|
43
|
+
while (ancestor && ancestor !== offsetParent) {
|
44
|
+
const { assignedSlot } = ancestor;
|
45
|
+
if (assignedSlot) {
|
46
|
+
let newOffsetParent = assignedSlot.offsetParent;
|
47
|
+
if (getComputedStyle(assignedSlot).display === "contents") {
|
48
|
+
const hadStyleAttribute = assignedSlot.hasAttribute("style");
|
49
|
+
const oldDisplay = assignedSlot.style.display;
|
50
|
+
assignedSlot.style.display = getComputedStyle(ancestor).display;
|
51
|
+
newOffsetParent = assignedSlot.offsetParent;
|
52
|
+
assignedSlot.style.display = oldDisplay;
|
53
|
+
if (!hadStyleAttribute) {
|
54
|
+
assignedSlot.removeAttribute("style");
|
55
|
+
}
|
56
|
+
}
|
57
|
+
ancestor = assignedSlot;
|
58
|
+
if (offsetParent !== newOffsetParent) {
|
59
|
+
offsetParent = newOffsetParent;
|
60
|
+
foundInsideSlot = true;
|
61
|
+
}
|
62
|
+
}
|
63
|
+
else if (isShadowRoot(ancestor) && ancestor.host && foundInsideSlot) {
|
64
|
+
break;
|
65
|
+
}
|
66
|
+
ancestor = (isShadowRoot(ancestor) && ancestor.host) || ancestor.parentNode;
|
67
|
+
}
|
68
|
+
return offsetParent;
|
69
|
+
}
|
70
|
+
function getElementRects(_ref) {
|
71
|
+
const { reference, floating, strategy } = _ref;
|
72
|
+
return {
|
73
|
+
reference: getRectRelativeToOffsetParent(reference, getOffsetParent(floating), strategy),
|
74
|
+
floating: { ...getDimensions(floating), x: 0, y: 0 }
|
75
|
+
};
|
76
|
+
}
|
77
|
+
/**
|
78
|
+
* ☝️ the following are needed to fix shadow DOM positioning ☝️
|
79
|
+
*/
|
80
|
+
/**
|
81
|
+
* 👇 the following are taken directly from floating-ui's ESM distributable to support the exports above 👇️
|
82
|
+
*
|
83
|
+
* **Notes**:
|
84
|
+
* unused functions are removed
|
85
|
+
* ESLint is disabled
|
86
|
+
* TS-warnings are suppressed
|
87
|
+
*/
|
88
|
+
/* eslint-disable */
|
89
|
+
function isWindow(value) {
|
90
|
+
return value && value.document && value.location && value.alert && value.setInterval;
|
91
|
+
}
|
92
|
+
function getWindow(node) {
|
93
|
+
if (node == null) {
|
94
|
+
return window;
|
95
|
+
}
|
96
|
+
if (!isWindow(node)) {
|
97
|
+
const ownerDocument = node.ownerDocument;
|
98
|
+
return ownerDocument ? ownerDocument.defaultView || window : window;
|
99
|
+
}
|
100
|
+
return node;
|
101
|
+
}
|
102
|
+
function getComputedStyle(element) {
|
103
|
+
return getWindow(element).getComputedStyle(element);
|
104
|
+
}
|
105
|
+
function getNodeName(node) {
|
106
|
+
return isWindow(node) ? "" : node ? (node.nodeName || "").toLowerCase() : "";
|
107
|
+
}
|
108
|
+
function getUAString() {
|
109
|
+
// @ts-ignore
|
110
|
+
const uaData = navigator.userAgentData;
|
111
|
+
if (uaData != null && uaData.brands) {
|
112
|
+
return uaData.brands.map((item) => item.brand + "/" + item.version).join(" ");
|
113
|
+
}
|
114
|
+
return navigator.userAgent;
|
115
|
+
}
|
116
|
+
function isHTMLElement(value) {
|
117
|
+
return value instanceof getWindow(value).HTMLElement;
|
118
|
+
}
|
119
|
+
function isElement(value) {
|
120
|
+
return value instanceof getWindow(value).Element;
|
121
|
+
}
|
122
|
+
function isNode(value) {
|
123
|
+
return value instanceof getWindow(value).Node;
|
124
|
+
}
|
125
|
+
function isShadowRoot(node) {
|
126
|
+
// Browsers without `ShadowRoot` support
|
127
|
+
if (typeof ShadowRoot === "undefined") {
|
128
|
+
return false;
|
129
|
+
}
|
130
|
+
const OwnElement = getWindow(node).ShadowRoot;
|
131
|
+
return node instanceof OwnElement || node instanceof ShadowRoot;
|
132
|
+
}
|
133
|
+
function isOverflowElement(element) {
|
134
|
+
// Firefox wants us to check `-x` and `-y` variations as well
|
135
|
+
const { overflow, overflowX, overflowY, display } = getComputedStyle(element);
|
136
|
+
return (/auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX) && !["inline", "contents"].includes(display));
|
137
|
+
}
|
138
|
+
function isTableElement(element) {
|
139
|
+
return ["table", "td", "th"].includes(getNodeName(element));
|
140
|
+
}
|
141
|
+
function isContainingBlock(element) {
|
142
|
+
// TODO: Try and use feature detection here instead
|
143
|
+
const isFirefox = /firefox/i.test(getUAString());
|
144
|
+
const css = getComputedStyle(element); // This is non-exhaustive but covers the most common CSS properties that
|
145
|
+
// create a containing block.
|
146
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
147
|
+
return (css.transform !== "none" ||
|
148
|
+
css.perspective !== "none" ||
|
149
|
+
(isFirefox && css.willChange === "filter") ||
|
150
|
+
(isFirefox && (css.filter ? css.filter !== "none" : false)) ||
|
151
|
+
["transform", "perspective"].some((value) => css.willChange.includes(value)) ||
|
152
|
+
["paint", "layout", "strict", "content"].some(
|
153
|
+
// TS 4.1 compat
|
154
|
+
(value) => {
|
155
|
+
const contain = css.contain;
|
156
|
+
return contain != null ? contain.includes(value) : false;
|
157
|
+
}));
|
158
|
+
}
|
159
|
+
function isLayoutViewport() {
|
160
|
+
// Not Safari
|
161
|
+
return !/^((?!chrome|android).)*safari/i.test(getUAString()); // Feature detection for this fails in various ways
|
162
|
+
// • Always-visible scrollbar or not
|
163
|
+
// • Width of <html>, etc.
|
164
|
+
// const vV = win.visualViewport;
|
165
|
+
// return vV ? Math.abs(win.innerWidth / vV.scale - vV.width) < 0.5 : true;
|
166
|
+
}
|
167
|
+
function isLastTraversableNode(node) {
|
168
|
+
return ["html", "body", "#document"].includes(getNodeName(node));
|
169
|
+
}
|
170
|
+
const min = Math.min;
|
171
|
+
const max = Math.max;
|
172
|
+
const round = Math.round;
|
173
|
+
function getBoundingClientRect(element, includeScale, isFixedStrategy) {
|
174
|
+
var _win$visualViewport$o, _win$visualViewport, _win$visualViewport$o2, _win$visualViewport2;
|
175
|
+
if (includeScale === void 0) {
|
176
|
+
includeScale = false;
|
177
|
+
}
|
178
|
+
if (isFixedStrategy === void 0) {
|
179
|
+
isFixedStrategy = false;
|
180
|
+
}
|
181
|
+
const clientRect = element.getBoundingClientRect();
|
182
|
+
let scaleX = 1;
|
183
|
+
let scaleY = 1;
|
184
|
+
if (includeScale && isHTMLElement(element)) {
|
185
|
+
scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
|
186
|
+
scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
|
187
|
+
}
|
188
|
+
const win = isElement(element) ? getWindow(element) : window;
|
189
|
+
const addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
|
190
|
+
const x = (clientRect.left +
|
191
|
+
(addVisualOffsets
|
192
|
+
? (_win$visualViewport$o =
|
193
|
+
(_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) != null
|
194
|
+
? _win$visualViewport$o
|
195
|
+
: 0
|
196
|
+
: 0)) /
|
197
|
+
scaleX;
|
198
|
+
const y = (clientRect.top +
|
199
|
+
(addVisualOffsets
|
200
|
+
? (_win$visualViewport$o2 =
|
201
|
+
(_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) != null
|
202
|
+
? _win$visualViewport$o2
|
203
|
+
: 0
|
204
|
+
: 0)) /
|
205
|
+
scaleY;
|
206
|
+
const width = clientRect.width / scaleX;
|
207
|
+
const height = clientRect.height / scaleY;
|
208
|
+
return {
|
209
|
+
width,
|
210
|
+
height,
|
211
|
+
top: y,
|
212
|
+
right: x + width,
|
213
|
+
bottom: y + height,
|
214
|
+
left: x,
|
215
|
+
x,
|
216
|
+
y
|
217
|
+
};
|
218
|
+
}
|
219
|
+
function getDocumentElement(node) {
|
220
|
+
return ((isNode(node) ? node.ownerDocument : node.document) || window.document).documentElement;
|
221
|
+
}
|
222
|
+
function getNodeScroll(element) {
|
223
|
+
if (isElement(element)) {
|
224
|
+
return {
|
225
|
+
scrollLeft: element.scrollLeft,
|
226
|
+
scrollTop: element.scrollTop
|
227
|
+
};
|
228
|
+
}
|
229
|
+
return {
|
230
|
+
scrollLeft: element.pageXOffset,
|
231
|
+
scrollTop: element.pageYOffset
|
232
|
+
};
|
233
|
+
}
|
234
|
+
function getWindowScrollBarX(element) {
|
235
|
+
// If <html> has a CSS width greater than the viewport, then this will be
|
236
|
+
// incorrect for RTL.
|
237
|
+
// @ts-ignore
|
238
|
+
return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
|
239
|
+
}
|
240
|
+
function isScaled(element) {
|
241
|
+
// @ts-ignore
|
242
|
+
const rect = getBoundingClientRect(element);
|
243
|
+
return round(rect.width) !== element.offsetWidth || round(rect.height) !== element.offsetHeight;
|
244
|
+
}
|
245
|
+
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
246
|
+
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
247
|
+
const documentElement = getDocumentElement(offsetParent);
|
248
|
+
const rect = getBoundingClientRect(element, // @ts-ignore - checked above (TS 4.1 compat)
|
249
|
+
isOffsetParentAnElement && isScaled(offsetParent), strategy === "fixed");
|
250
|
+
let scroll = {
|
251
|
+
scrollLeft: 0,
|
252
|
+
scrollTop: 0
|
253
|
+
};
|
254
|
+
const offsets = {
|
255
|
+
x: 0,
|
256
|
+
y: 0
|
257
|
+
};
|
258
|
+
if (isOffsetParentAnElement || (!isOffsetParentAnElement && strategy !== "fixed")) {
|
259
|
+
if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
|
260
|
+
scroll = getNodeScroll(offsetParent);
|
261
|
+
}
|
262
|
+
if (isHTMLElement(offsetParent)) {
|
263
|
+
// @ts-ignore
|
264
|
+
const offsetRect = getBoundingClientRect(offsetParent, true);
|
265
|
+
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
266
|
+
offsets.y = offsetRect.y + offsetParent.clientTop;
|
267
|
+
}
|
268
|
+
else if (documentElement) {
|
269
|
+
offsets.x = getWindowScrollBarX(documentElement);
|
270
|
+
}
|
271
|
+
}
|
272
|
+
return {
|
273
|
+
x: rect.left + scroll.scrollLeft - offsets.x,
|
274
|
+
y: rect.top + scroll.scrollTop - offsets.y,
|
275
|
+
width: rect.width,
|
276
|
+
height: rect.height
|
277
|
+
};
|
278
|
+
}
|
279
|
+
function getParentNode(node) {
|
280
|
+
if (getNodeName(node) === "html") {
|
281
|
+
return node;
|
282
|
+
}
|
283
|
+
return (
|
284
|
+
// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
285
|
+
// @ts-ignore
|
286
|
+
node.assignedSlot || // step into the shadow DOM of the parent of a slotted node
|
287
|
+
node.parentNode || // DOM Element detected
|
288
|
+
(isShadowRoot(node) ? node.host : null) || // ShadowRoot detected
|
289
|
+
getDocumentElement(node) // fallback
|
290
|
+
);
|
291
|
+
}
|
292
|
+
function getContainingBlock(element) {
|
293
|
+
let currentNode = getParentNode(element);
|
294
|
+
if (isShadowRoot(currentNode)) {
|
295
|
+
currentNode = currentNode.host;
|
296
|
+
}
|
297
|
+
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
298
|
+
if (isContainingBlock(currentNode)) {
|
299
|
+
return currentNode;
|
300
|
+
}
|
301
|
+
else {
|
302
|
+
const parent = currentNode.parentNode;
|
303
|
+
currentNode = isShadowRoot(parent) ? parent.host : parent;
|
304
|
+
}
|
305
|
+
}
|
306
|
+
return null;
|
307
|
+
} // Gets the closest ancestor positioned element. Handles some edge cases,
|
308
|
+
// such as table ancestors and cross browser bugs.
|
309
|
+
function getOffsetParent(element) {
|
310
|
+
const window = getWindow(element);
|
311
|
+
let offsetParent = getTrueOffsetParent(element);
|
312
|
+
while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === "static") {
|
313
|
+
offsetParent = getTrueOffsetParent(offsetParent);
|
314
|
+
}
|
315
|
+
if (offsetParent &&
|
316
|
+
(getNodeName(offsetParent) === "html" ||
|
317
|
+
(getNodeName(offsetParent) === "body" &&
|
318
|
+
getComputedStyle(offsetParent).position === "static" &&
|
319
|
+
!isContainingBlock(offsetParent)))) {
|
320
|
+
return window;
|
321
|
+
}
|
322
|
+
return offsetParent || getContainingBlock(element) || window;
|
323
|
+
}
|
324
|
+
function getDimensions(element) {
|
325
|
+
if (isHTMLElement(element)) {
|
326
|
+
return {
|
327
|
+
width: element.offsetWidth,
|
328
|
+
height: element.offsetHeight
|
329
|
+
};
|
330
|
+
}
|
331
|
+
// @ts-ignore
|
332
|
+
const rect = getBoundingClientRect(element);
|
333
|
+
return {
|
334
|
+
width: rect.width,
|
335
|
+
height: rect.height
|
336
|
+
};
|
337
|
+
}
|
338
|
+
function getViewportRect(element, strategy) {
|
339
|
+
const win = getWindow(element);
|
340
|
+
const html = getDocumentElement(element);
|
341
|
+
const visualViewport = win.visualViewport;
|
342
|
+
let width = html.clientWidth;
|
343
|
+
let height = html.clientHeight;
|
344
|
+
let x = 0;
|
345
|
+
let y = 0;
|
346
|
+
if (visualViewport) {
|
347
|
+
width = visualViewport.width;
|
348
|
+
height = visualViewport.height;
|
349
|
+
const layoutViewport = isLayoutViewport();
|
350
|
+
if (layoutViewport || (!layoutViewport && strategy === "fixed")) {
|
351
|
+
x = visualViewport.offsetLeft;
|
352
|
+
y = visualViewport.offsetTop;
|
353
|
+
}
|
354
|
+
}
|
355
|
+
return {
|
356
|
+
width,
|
357
|
+
height,
|
358
|
+
x,
|
359
|
+
y
|
360
|
+
};
|
361
|
+
}
|
362
|
+
// of the `<html>` and `<body>` rect bounds if horizontally scrollable
|
363
|
+
function getDocumentRect(element) {
|
364
|
+
var _element$ownerDocumen;
|
365
|
+
const html = getDocumentElement(element);
|
366
|
+
const scroll = getNodeScroll(element);
|
367
|
+
const body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
|
368
|
+
const width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
|
369
|
+
const height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
|
370
|
+
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
371
|
+
const y = -scroll.scrollTop;
|
372
|
+
if (getComputedStyle(body || html).direction === "rtl") {
|
373
|
+
x += max(html.clientWidth, body ? body.clientWidth : 0) - width;
|
374
|
+
}
|
375
|
+
return {
|
376
|
+
width,
|
377
|
+
height,
|
378
|
+
x,
|
379
|
+
y
|
380
|
+
};
|
381
|
+
}
|
382
|
+
function getNearestOverflowAncestor(node) {
|
383
|
+
const parentNode = getParentNode(node);
|
384
|
+
if (isLastTraversableNode(parentNode)) {
|
385
|
+
// @ts-ignore assume body is always available
|
386
|
+
return node.ownerDocument.body;
|
387
|
+
}
|
388
|
+
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
389
|
+
return parentNode;
|
390
|
+
}
|
391
|
+
return getNearestOverflowAncestor(parentNode);
|
392
|
+
}
|
393
|
+
function getOverflowAncestors(node, list) {
|
394
|
+
var _node$ownerDocument;
|
395
|
+
if (list === void 0) {
|
396
|
+
list = [];
|
397
|
+
}
|
398
|
+
const scrollableAncestor = getNearestOverflowAncestor(node);
|
399
|
+
const isBody = scrollableAncestor === ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.body);
|
400
|
+
const win = getWindow(scrollableAncestor);
|
401
|
+
const target = isBody
|
402
|
+
? [win].concat(win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [])
|
403
|
+
: scrollableAncestor;
|
404
|
+
const updatedList = list.concat(target);
|
405
|
+
return isBody
|
406
|
+
? updatedList // @ts-ignore: isBody tells us target will be an HTMLElement here
|
407
|
+
: updatedList.concat(getOverflowAncestors(target));
|
408
|
+
}
|
409
|
+
function contains(parent, child) {
|
410
|
+
const rootNode = child.getRootNode == null ? void 0 : child.getRootNode(); // First, attempt with faster native method
|
411
|
+
if (parent.contains(child)) {
|
412
|
+
return true;
|
413
|
+
} // then fallback to custom implementation with Shadow DOM support
|
414
|
+
else if (rootNode && isShadowRoot(rootNode)) {
|
415
|
+
let next = child;
|
416
|
+
do {
|
417
|
+
// use `===` replace node.isSameNode()
|
418
|
+
if (next && parent === next) {
|
419
|
+
return true;
|
420
|
+
} // @ts-ignore: need a better way to handle this...
|
421
|
+
next = next.parentNode || next.host;
|
422
|
+
} while (next);
|
423
|
+
}
|
424
|
+
return false;
|
425
|
+
}
|
426
|
+
function getNearestParentCapableOfEscapingClipping(element, clippingAncestors) {
|
427
|
+
let currentNode = element;
|
428
|
+
while (currentNode && !isLastTraversableNode(currentNode) && !clippingAncestors.includes(currentNode)) {
|
429
|
+
if (isElement(currentNode) && ["absolute", "fixed"].includes(getComputedStyle(currentNode).position)) {
|
430
|
+
break;
|
431
|
+
}
|
432
|
+
const parentNode = getParentNode(currentNode);
|
433
|
+
currentNode = isShadowRoot(parentNode) ? parentNode.host : parentNode;
|
434
|
+
}
|
435
|
+
return currentNode;
|
436
|
+
}
|
437
|
+
function getInnerBoundingClientRect(element, strategy) {
|
438
|
+
const clientRect = getBoundingClientRect(element, false, strategy === "fixed");
|
439
|
+
const top = clientRect.top + element.clientTop;
|
440
|
+
const left = clientRect.left + element.clientLeft;
|
441
|
+
return {
|
442
|
+
top,
|
443
|
+
left,
|
444
|
+
x: left,
|
445
|
+
y: top,
|
446
|
+
right: left + element.clientWidth,
|
447
|
+
bottom: top + element.clientHeight,
|
448
|
+
width: element.clientWidth,
|
449
|
+
height: element.clientHeight
|
450
|
+
};
|
451
|
+
}
|
452
|
+
function getClientRectFromClippingAncestor(element, clippingParent, strategy) {
|
453
|
+
if (clippingParent === "viewport") {
|
454
|
+
return rectToClientRect(getViewportRect(element, strategy));
|
455
|
+
}
|
456
|
+
if (isElement(clippingParent)) {
|
457
|
+
return getInnerBoundingClientRect(clippingParent, strategy);
|
458
|
+
}
|
459
|
+
return rectToClientRect(getDocumentRect(getDocumentElement(element)));
|
460
|
+
} // A "clipping ancestor" is an overflowable container with the characteristic of
|
461
|
+
// clipping (or hiding) overflowing elements with a position different from
|
462
|
+
// `initial`
|
463
|
+
function getClippingAncestors(element) {
|
464
|
+
// @ts-ignore
|
465
|
+
const clippingAncestors = getOverflowAncestors(element);
|
466
|
+
const nearestEscapableParent = getNearestParentCapableOfEscapingClipping(element, clippingAncestors);
|
467
|
+
let clipperElement = null;
|
468
|
+
if (nearestEscapableParent && isHTMLElement(nearestEscapableParent)) {
|
469
|
+
const offsetParent = getOffsetParent(nearestEscapableParent);
|
470
|
+
if (isOverflowElement(nearestEscapableParent)) {
|
471
|
+
clipperElement = nearestEscapableParent;
|
472
|
+
}
|
473
|
+
else if (isHTMLElement(offsetParent)) {
|
474
|
+
clipperElement = offsetParent;
|
475
|
+
}
|
476
|
+
}
|
477
|
+
if (!isElement(clipperElement)) {
|
478
|
+
return [];
|
479
|
+
} // @ts-ignore isElement check ensures we return Array<Element>
|
480
|
+
return clippingAncestors.filter((clippingAncestors) => clipperElement &&
|
481
|
+
isElement(clippingAncestors) &&
|
482
|
+
contains(clippingAncestors, clipperElement) &&
|
483
|
+
getNodeName(clippingAncestors) !== "body");
|
484
|
+
} // Gets the maximum area that the element is visible in due to any number of
|
485
|
+
// clipping ancestors
|
486
|
+
function getClippingRect(_ref) {
|
487
|
+
let { element, boundary, rootBoundary, strategy } = _ref;
|
488
|
+
const mainClippingAncestors = boundary === "clippingAncestors" ? getClippingAncestors(element) : [].concat(boundary);
|
489
|
+
const clippingAncestors = [...mainClippingAncestors, rootBoundary];
|
490
|
+
const firstClippingAncestor = clippingAncestors[0];
|
491
|
+
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
|
492
|
+
const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
|
493
|
+
accRect.top = max(rect.top, accRect.top);
|
494
|
+
accRect.right = min(rect.right, accRect.right);
|
495
|
+
accRect.bottom = min(rect.bottom, accRect.bottom);
|
496
|
+
accRect.left = max(rect.left, accRect.left);
|
497
|
+
return accRect;
|
498
|
+
}, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
|
499
|
+
return {
|
500
|
+
width: clippingRect.right - clippingRect.left,
|
501
|
+
height: clippingRect.bottom - clippingRect.top,
|
502
|
+
x: clippingRect.left,
|
503
|
+
y: clippingRect.top
|
504
|
+
};
|
505
|
+
}
|
506
|
+
|
507
|
+
export { getClippingRect, getElementRects, getOffsetParent };
|
@@ -0,0 +1,138 @@
|
|
1
|
+
/*!
|
2
|
+
* Copyright 2022 Esri
|
3
|
+
* Licensed under the Apache License, Version 2.0
|
4
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
+
*/
|
6
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './p-c023e6a1.js';
|
7
|
+
import { t as toggleChildActionText, E as ExpandToggle } from './p-c92bc231.js';
|
8
|
+
import { f as focusElement, a as getSlotted } from './p-83166522.js';
|
9
|
+
import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './p-ea534300.js';
|
10
|
+
import './p-6e0da576.js';
|
11
|
+
import './p-708a63a8.js';
|
12
|
+
import './p-729708a3.js';
|
13
|
+
import './p-a80b3880.js';
|
14
|
+
import './p-9a9955db.js';
|
15
|
+
|
16
|
+
/*!
|
17
|
+
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
18
|
+
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
19
|
+
* v1.0.0-beta.97
|
20
|
+
*/
|
21
|
+
const CSS = {
|
22
|
+
actionGroupBottom: "action-group--bottom",
|
23
|
+
container: "container"
|
24
|
+
};
|
25
|
+
const TEXT = {
|
26
|
+
expand: "Expand",
|
27
|
+
collapse: "Collapse"
|
28
|
+
};
|
29
|
+
const SLOTS = {
|
30
|
+
expandTooltip: "expand-tooltip"
|
31
|
+
};
|
32
|
+
|
33
|
+
const actionPadCss = "@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:host{box-sizing:border-box;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:block}@keyframes in{0%{opacity:0}100%{opacity:1}}:host{animation:in var(--calcite-internal-animation-timing-slow) ease-in-out;border-radius:0.125rem;--calcite-action-pad-expanded-max-width:auto;background:transparent}:host([expanded][layout=vertical]) .container{max-inline-size:var(--calcite-action-pad-expanded-max-width)}::slotted(calcite-action-group){border-width:0px;border-block-end-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);padding-block:0px}.container{display:inline-flex;flex-direction:column;overflow-y:auto;border-radius:0.25rem;background-color:var(--calcite-ui-background);--tw-shadow:0 6px 20px -4px rgba(0, 0, 0, 0.1), 0 4px 12px -2px rgba(0, 0, 0, 0.08);--tw-shadow-colored:0 6px 20px -4px var(--tw-shadow-color), 0 4px 12px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.action-group--bottom{flex-grow:1;justify-content:flex-end;-webkit-padding-after:0px;padding-block-end:0px}:host([layout=horizontal]) .container{flex-direction:row}:host([layout=horizontal]) .container .action-group--bottom{padding:0px}:host([layout=horizontal]) .container ::slotted(calcite-action-group){border-width:0px;padding:0px;border-inline-end-width:1px}::slotted(calcite-action-group:last-child){border-block-end-width:0px}";
|
34
|
+
|
35
|
+
const ActionPad = class {
|
36
|
+
constructor(hostRef) {
|
37
|
+
registerInstance(this, hostRef);
|
38
|
+
this.calciteActionPadToggle = createEvent(this, "calciteActionPadToggle", 6);
|
39
|
+
// --------------------------------------------------------------------------
|
40
|
+
//
|
41
|
+
// Properties
|
42
|
+
//
|
43
|
+
// --------------------------------------------------------------------------
|
44
|
+
/**
|
45
|
+
* When `true`, the expand-toggling behavior is disabled.
|
46
|
+
*/
|
47
|
+
this.expandDisabled = false;
|
48
|
+
/**
|
49
|
+
* When `true`, the component is expanded.
|
50
|
+
*/
|
51
|
+
this.expanded = false;
|
52
|
+
/**
|
53
|
+
* Indicates the layout of the component.
|
54
|
+
*/
|
55
|
+
this.layout = "vertical";
|
56
|
+
// --------------------------------------------------------------------------
|
57
|
+
//
|
58
|
+
// Private Methods
|
59
|
+
//
|
60
|
+
// --------------------------------------------------------------------------
|
61
|
+
this.actionMenuOpenChangeHandler = (event) => {
|
62
|
+
if (event.detail) {
|
63
|
+
const composedPath = event.composedPath();
|
64
|
+
Array.from(this.el.querySelectorAll("calcite-action-group")).forEach((group) => {
|
65
|
+
if (!composedPath.includes(group)) {
|
66
|
+
group.menuOpen = false;
|
67
|
+
}
|
68
|
+
});
|
69
|
+
}
|
70
|
+
};
|
71
|
+
this.toggleExpand = () => {
|
72
|
+
this.expanded = !this.expanded;
|
73
|
+
this.calciteActionPadToggle.emit();
|
74
|
+
};
|
75
|
+
this.setExpandToggleRef = (el) => {
|
76
|
+
this.expandToggleEl = el;
|
77
|
+
};
|
78
|
+
}
|
79
|
+
expandedHandler(expanded) {
|
80
|
+
toggleChildActionText({ parent: this.el, expanded });
|
81
|
+
}
|
82
|
+
// --------------------------------------------------------------------------
|
83
|
+
//
|
84
|
+
// Lifecycle
|
85
|
+
//
|
86
|
+
// --------------------------------------------------------------------------
|
87
|
+
connectedCallback() {
|
88
|
+
connectConditionalSlotComponent(this);
|
89
|
+
}
|
90
|
+
disconnectedCallback() {
|
91
|
+
disconnectConditionalSlotComponent(this);
|
92
|
+
}
|
93
|
+
componentWillLoad() {
|
94
|
+
const { el, expanded } = this;
|
95
|
+
toggleChildActionText({ parent: el, expanded });
|
96
|
+
}
|
97
|
+
// --------------------------------------------------------------------------
|
98
|
+
//
|
99
|
+
// Methods
|
100
|
+
//
|
101
|
+
// --------------------------------------------------------------------------
|
102
|
+
/**
|
103
|
+
* Sets focus on the component.
|
104
|
+
*
|
105
|
+
* @param focusId
|
106
|
+
*/
|
107
|
+
async setFocus(focusId) {
|
108
|
+
var _a;
|
109
|
+
if (focusId === "expand-toggle") {
|
110
|
+
await focusElement(this.expandToggleEl);
|
111
|
+
return;
|
112
|
+
}
|
113
|
+
(_a = this.el) === null || _a === void 0 ? void 0 : _a.focus();
|
114
|
+
}
|
115
|
+
// --------------------------------------------------------------------------
|
116
|
+
//
|
117
|
+
// Component Methods
|
118
|
+
//
|
119
|
+
// --------------------------------------------------------------------------
|
120
|
+
renderBottomActionGroup() {
|
121
|
+
const { expanded, expandDisabled, intlExpand, intlCollapse, el, position, toggleExpand, scale, layout } = this;
|
122
|
+
const tooltip = getSlotted(el, SLOTS.expandTooltip);
|
123
|
+
const expandLabel = intlExpand || TEXT.expand;
|
124
|
+
const collapseLabel = intlCollapse || TEXT.collapse;
|
125
|
+
const expandToggleNode = !expandDisabled ? (h(ExpandToggle, { el: el, expanded: expanded, intlCollapse: collapseLabel, intlExpand: expandLabel, position: position, ref: this.setExpandToggleRef, scale: scale, toggle: toggleExpand, tooltip: tooltip })) : null;
|
126
|
+
return expandToggleNode ? (h("calcite-action-group", { class: CSS.actionGroupBottom, layout: layout, scale: scale }, h("slot", { name: SLOTS.expandTooltip }), expandToggleNode)) : null;
|
127
|
+
}
|
128
|
+
render() {
|
129
|
+
return (h(Host, { onCalciteActionMenuOpenChange: this.actionMenuOpenChangeHandler }, h("div", { class: CSS.container }, h("slot", null), this.renderBottomActionGroup())));
|
130
|
+
}
|
131
|
+
get el() { return getElement(this); }
|
132
|
+
static get watchers() { return {
|
133
|
+
"expanded": ["expandedHandler"]
|
134
|
+
}; }
|
135
|
+
};
|
136
|
+
ActionPad.style = actionPadCss;
|
137
|
+
|
138
|
+
export { ActionPad as calcite_action_pad };
|