@esri/solutions-components 0.2.2 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/t9n/solution-config-modal/resources.json +22 -0
- package/dist/assets/t9n/solution-config-modal/resources_en.json +22 -0
- package/dist/cjs/calcite-action-menu_2.cjs.entry.js +18 -401
- package/dist/cjs/calcite-action-menu_2.cjs.entry.js.map +1 -1
- package/dist/cjs/calcite-action_2.cjs.entry.js +423 -71
- package/dist/cjs/calcite-action_2.cjs.entry.js.map +1 -1
- package/dist/cjs/calcite-loader.cjs.entry.js +97 -0
- package/dist/cjs/calcite-loader.cjs.entry.js.map +1 -0
- package/dist/cjs/{solution-configuration.cjs.entry.js → calcite-modal_2.cjs.entry.js} +451 -13
- package/dist/cjs/calcite-modal_2.cjs.entry.js.map +1 -0
- package/dist/cjs/{calcite-shell-panel_14.cjs.entry.js → calcite-panel_12.cjs.entry.js} +455 -709
- package/dist/cjs/calcite-panel_12.cjs.entry.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/solution-config-modal.cjs.entry.js +131 -0
- package/dist/cjs/solution-config-modal.cjs.entry.js.map +1 -0
- package/dist/cjs/{solution-contents_3.cjs.entry.js → solution-contents_7.cjs.entry.js} +664 -5
- package/dist/cjs/solution-contents_7.cjs.entry.js.map +1 -0
- package/dist/cjs/{solution-store-893499a5.js → solution-store-09b3fc53.js} +4 -6
- package/dist/cjs/solution-store-09b3fc53.js.map +1 -0
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/solution-config-modal/solution-config-modal.css +91 -0
- package/dist/collection/components/solution-config-modal/solution-config-modal.js +245 -0
- package/dist/collection/components/solution-config-modal/solution-config-modal.js.map +1 -0
- package/dist/collection/components/solution-configuration/solution-configuration.js +23 -17
- package/dist/collection/components/solution-configuration/solution-configuration.js.map +1 -1
- package/dist/collection/components/solution-item/solution-item.js +0 -2
- package/dist/collection/components/solution-item/solution-item.js.map +1 -1
- package/dist/collection/components/solution-item-details/solution-item-details.js +0 -13
- package/dist/collection/components/solution-item-details/solution-item-details.js.map +1 -1
- package/dist/collection/utils/solution-store.js +3 -5
- package/dist/collection/utils/solution-store.js.map +1 -1
- package/dist/collection/utils/solution-store.ts +3 -5
- package/dist/esm/buffer-tools_6.entry.js +2 -2
- package/dist/esm/calcite-action-bar_6.entry.js +2 -2
- package/dist/esm/calcite-action-menu_2.entry.js +20 -403
- package/dist/esm/calcite-action-menu_2.entry.js.map +1 -1
- package/dist/esm/calcite-action_2.entry.js +424 -72
- package/dist/esm/calcite-action_2.entry.js.map +1 -1
- package/dist/esm/calcite-combobox_3.entry.js +2 -2
- package/dist/esm/calcite-loader.entry.js +93 -0
- package/dist/esm/calcite-loader.entry.js.map +1 -0
- package/dist/esm/{solution-configuration.entry.js → calcite-modal_2.entry.js} +453 -16
- package/dist/esm/calcite-modal_2.entry.js.map +1 -0
- package/dist/esm/{calcite-shell-panel_14.entry.js → calcite-panel_12.entry.js} +454 -706
- package/dist/esm/calcite-panel_12.entry.js.map +1 -0
- package/dist/esm/config-layer-picker.entry.js +2 -2
- package/dist/esm/{interfaces-e2a2064d.js → interfaces-1bdfc3a8.js} +2 -2
- package/dist/esm/{interfaces-e2a2064d.js.map → interfaces-1bdfc3a8.js.map} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{mapViewUtils-09f1e7bd.js → mapViewUtils-809947c8.js} +2 -2
- package/dist/esm/{mapViewUtils-09f1e7bd.js.map → mapViewUtils-809947c8.js.map} +1 -1
- package/dist/esm/public-notification.entry.js +2 -2
- package/dist/esm/solution-config-modal.entry.js +127 -0
- package/dist/esm/solution-config-modal.entry.js.map +1 -0
- package/dist/esm/{solution-contents_3.entry.js → solution-contents_7.entry.js} +661 -6
- package/dist/esm/solution-contents_7.entry.js.map +1 -0
- package/dist/esm/{solution-store-0c58c852.js → solution-store-d8519c64.js} +5 -7
- package/dist/esm/solution-store-d8519c64.js.map +1 -0
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/{p-be1ed982.entry.js → p-11068040.entry.js} +3 -3
- package/dist/solutions-components/{p-be1ed982.entry.js.map → p-11068040.entry.js.map} +0 -0
- package/dist/solutions-components/{p-659edb14.js → p-2910dd9e.js} +5 -7
- package/dist/{cjs/solution-store-893499a5.js.map → solutions-components/p-2910dd9e.js.map} +1 -1
- package/dist/solutions-components/{p-291fd295.entry.js → p-30810b45.entry.js} +3 -3
- package/dist/solutions-components/{p-291fd295.entry.js.map → p-30810b45.entry.js.map} +0 -0
- package/dist/solutions-components/p-38ddadf2.entry.js +342 -0
- package/dist/solutions-components/p-38ddadf2.entry.js.map +1 -0
- package/dist/solutions-components/{p-77c75f3a.entry.js → p-5b20090f.entry.js} +661 -6
- package/dist/solutions-components/p-5b20090f.entry.js.map +1 -0
- package/dist/solutions-components/{p-9393631c.entry.js → p-9ef1328a.entry.js} +3 -3
- package/dist/solutions-components/{p-9393631c.entry.js.map → p-9ef1328a.entry.js.map} +0 -0
- package/dist/solutions-components/{p-984cb687.entry.js → p-a1786d11.entry.js} +454 -706
- package/dist/solutions-components/p-a1786d11.entry.js.map +1 -0
- package/dist/solutions-components/{p-fe0fdd8b.js → p-c20bd963.js} +2 -2
- package/dist/solutions-components/{p-fe0fdd8b.js.map → p-c20bd963.js.map} +1 -1
- package/dist/solutions-components/p-c5721b0f.entry.js +127 -0
- package/dist/solutions-components/p-c5721b0f.entry.js.map +1 -0
- package/dist/solutions-components/{p-24d75151.entry.js → p-c818e661.entry.js} +3 -3
- package/dist/solutions-components/{p-24d75151.entry.js.map → p-c818e661.entry.js.map} +0 -0
- package/dist/solutions-components/{p-90629c1d.entry.js → p-cf59eb16.entry.js} +453 -16
- package/dist/solutions-components/p-cf59eb16.entry.js.map +1 -0
- package/dist/solutions-components/p-e405ebe8.entry.js +93 -0
- package/dist/solutions-components/p-e405ebe8.entry.js.map +1 -0
- package/dist/solutions-components/{p-77e6b03c.entry.js → p-e6fb9cde.entry.js} +3 -3
- package/dist/solutions-components/{p-77e6b03c.entry.js.map → p-e6fb9cde.entry.js.map} +0 -0
- package/dist/solutions-components/{p-97c4a268.entry.js → p-ef6f9e24.entry.js} +113 -229
- package/dist/solutions-components/p-ef6f9e24.entry.js.map +1 -0
- package/dist/solutions-components/{p-6b9dc092.js → p-f04fdb9a.js} +2 -2
- package/dist/solutions-components/{p-6b9dc092.js.map → p-f04fdb9a.js.map} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/solution-store.ts +3 -5
- package/dist/solutions-components_commit.txt +8 -8
- package/dist/types/components/solution-config-modal/solution-config-modal.d.ts +69 -0
- package/dist/types/components/solution-configuration/solution-configuration.d.ts +4 -2
- package/dist/types/components/solution-item-details/solution-item-details.d.ts +0 -1
- package/dist/types/components.d.ts +43 -5
- package/dist/types/preact.d.ts +4 -0
- package/package.json +1 -1
- package/dist/cjs/calcite-modal.cjs.entry.js +0 -449
- package/dist/cjs/calcite-modal.cjs.entry.js.map +0 -1
- package/dist/cjs/calcite-panel_2.cjs.entry.js +0 -439
- package/dist/cjs/calcite-panel_2.cjs.entry.js.map +0 -1
- package/dist/cjs/calcite-scrim.cjs.entry.js +0 -64
- package/dist/cjs/calcite-scrim.cjs.entry.js.map +0 -1
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js.map +0 -1
- package/dist/cjs/solution-configuration.cjs.entry.js.map +0 -1
- package/dist/cjs/solution-contents_3.cjs.entry.js.map +0 -1
- package/dist/esm/calcite-modal.entry.js +0 -445
- package/dist/esm/calcite-modal.entry.js.map +0 -1
- package/dist/esm/calcite-panel_2.entry.js +0 -434
- package/dist/esm/calcite-panel_2.entry.js.map +0 -1
- package/dist/esm/calcite-scrim.entry.js +0 -60
- package/dist/esm/calcite-scrim.entry.js.map +0 -1
- package/dist/esm/calcite-shell-panel_14.entry.js.map +0 -1
- package/dist/esm/solution-configuration.entry.js.map +0 -1
- package/dist/esm/solution-contents_3.entry.js.map +0 -1
- package/dist/esm/solution-store-0c58c852.js.map +0 -1
- package/dist/solutions-components/p-0fda7d9e.entry.js +0 -434
- package/dist/solutions-components/p-0fda7d9e.entry.js.map +0 -1
- package/dist/solutions-components/p-2ff754ce.entry.js +0 -257
- package/dist/solutions-components/p-2ff754ce.entry.js.map +0 -1
- package/dist/solutions-components/p-30a6199a.entry.js +0 -445
- package/dist/solutions-components/p-30a6199a.entry.js.map +0 -1
- package/dist/solutions-components/p-659edb14.js.map +0 -1
- package/dist/solutions-components/p-77c75f3a.entry.js.map +0 -1
- package/dist/solutions-components/p-90629c1d.entry.js.map +0 -1
- package/dist/solutions-components/p-97c4a268.entry.js.map +0 -1
- package/dist/solutions-components/p-984cb687.entry.js.map +0 -1
- package/dist/solutions-components/p-f5268b4f.entry.js +0 -60
- package/dist/solutions-components/p-f5268b4f.entry.js.map +0 -1
@@ -3,17 +3,13 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import { r as registerInstance, c as createEvent, h, F as Fragment, g as getElement
|
6
|
+
import { r as registerInstance, c as createEvent, h, F as Fragment, g as getElement } from './index-15022d11.js';
|
7
7
|
import { C as CSS$1, I as ICONS, S as SLOTS } from './resources-d60362c3.js';
|
8
|
-
import { t as toAriaBoolean, i as isPrimaryPointerButton, f as focusElement
|
8
|
+
import { t as toAriaBoolean, i as isPrimaryPointerButton, f as focusElement } from './dom-e593bf85.js';
|
9
9
|
import { g as getRoundRobinIndex } from './array-2ab3b18f.js';
|
10
10
|
import { g as guid } from './guid-15fce7c0.js';
|
11
11
|
import { i as isActivationKey } from './key-acb660e7.js';
|
12
|
-
import { b as defaultOffsetDistance, f as filterComputedPlacements, c as connectFloatingUI, u as updateAfterClose, a as disconnectFloatingUI, r as reposition, F as FloatingCSS } from './floating-ui-69a55a27.js';
|
13
|
-
import { c as connectOpenCloseComponent, d as disconnectOpenCloseComponent } from './openCloseComponent-5caff873.js';
|
14
|
-
import { H as Heading } from './Heading-1efb4837.js';
|
15
12
|
import './resources-436ae282.js';
|
16
|
-
import './debounce-4c884e5c.js';
|
17
13
|
|
18
14
|
const actionMenuCss = "@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}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--calcite-ui-foreground-1);font-size:var(--calcite-font-size-1);color:var(--calcite-ui-text-2)}.menu ::slotted(calcite-action){margin:0.125rem;display:flex;outline-color:transparent}.menu ::slotted(calcite-action[active]){outline:2px solid var(--calcite-ui-brand);outline-offset:0px}.default-trigger{position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}slot[name=trigger]::slotted(calcite-action),calcite-action::slotted([slot=trigger]){position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}.menu{flex-direction:column;flex-wrap:nowrap;outline:2px solid transparent;outline-offset:2px}";
|
19
15
|
|
@@ -297,429 +293,50 @@ ActionMenu.style = actionMenuCss;
|
|
297
293
|
* v1.0.0-beta.97
|
298
294
|
*/
|
299
295
|
const CSS = {
|
300
|
-
|
301
|
-
|
302
|
-
imageContainer: "image-container",
|
303
|
-
closeButtonContainer: "close-button-container",
|
304
|
-
closeButton: "close-button",
|
305
|
-
content: "content",
|
306
|
-
hasHeader: "has-header",
|
307
|
-
header: "header",
|
308
|
-
headerContent: "header-content",
|
309
|
-
heading: "heading"
|
296
|
+
scrim: "scrim",
|
297
|
+
content: "content"
|
310
298
|
};
|
311
299
|
const TEXT = {
|
312
|
-
|
300
|
+
loading: "Loading"
|
313
301
|
};
|
314
|
-
const defaultPopoverPlacement = "auto";
|
315
|
-
const ARIA_CONTROLS = "aria-controls";
|
316
|
-
const ARIA_EXPANDED = "aria-expanded";
|
317
|
-
const HEADING_LEVEL = 2;
|
318
302
|
|
319
|
-
|
320
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
321
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
322
|
-
* v1.0.0-beta.97
|
323
|
-
*/
|
324
|
-
class PopoverManager {
|
325
|
-
constructor() {
|
326
|
-
// --------------------------------------------------------------------------
|
327
|
-
//
|
328
|
-
// Private Properties
|
329
|
-
//
|
330
|
-
// --------------------------------------------------------------------------
|
331
|
-
this.registeredElements = new Map();
|
332
|
-
this.registeredElementCount = 0;
|
333
|
-
// --------------------------------------------------------------------------
|
334
|
-
//
|
335
|
-
// Private Methods
|
336
|
-
//
|
337
|
-
// --------------------------------------------------------------------------
|
338
|
-
this.queryPopover = (composedPath) => {
|
339
|
-
const { registeredElements } = this;
|
340
|
-
const registeredElement = composedPath.find((pathEl) => registeredElements.has(pathEl));
|
341
|
-
return registeredElements.get(registeredElement);
|
342
|
-
};
|
343
|
-
this.togglePopovers = (event) => {
|
344
|
-
const composedPath = event.composedPath();
|
345
|
-
const togglePopover = this.queryPopover(composedPath);
|
346
|
-
if (togglePopover && !togglePopover.triggerDisabled) {
|
347
|
-
togglePopover.toggle();
|
348
|
-
}
|
349
|
-
Array.from(this.registeredElements.values())
|
350
|
-
.filter((popover) => popover !== togglePopover && popover.autoClose && popover.open && !composedPath.includes(popover))
|
351
|
-
.forEach((popover) => popover.toggle(false));
|
352
|
-
};
|
353
|
-
this.keyHandler = (event) => {
|
354
|
-
if (event.defaultPrevented || !isActivationKey(event.key)) {
|
355
|
-
return;
|
356
|
-
}
|
357
|
-
this.togglePopovers(event);
|
358
|
-
};
|
359
|
-
this.clickHandler = (event) => {
|
360
|
-
if (isPrimaryPointerButton(event)) {
|
361
|
-
this.togglePopovers(event);
|
362
|
-
}
|
363
|
-
};
|
364
|
-
}
|
365
|
-
// --------------------------------------------------------------------------
|
366
|
-
//
|
367
|
-
// Public Methods
|
368
|
-
//
|
369
|
-
// --------------------------------------------------------------------------
|
370
|
-
registerElement(referenceEl, popover) {
|
371
|
-
this.registeredElementCount++;
|
372
|
-
this.registeredElements.set(referenceEl, popover);
|
373
|
-
if (this.registeredElementCount === 1) {
|
374
|
-
this.addListeners();
|
375
|
-
}
|
376
|
-
}
|
377
|
-
unregisterElement(referenceEl) {
|
378
|
-
if (this.registeredElements.delete(referenceEl)) {
|
379
|
-
this.registeredElementCount--;
|
380
|
-
}
|
381
|
-
if (this.registeredElementCount === 0) {
|
382
|
-
this.removeListeners();
|
383
|
-
}
|
384
|
-
}
|
385
|
-
addListeners() {
|
386
|
-
document.addEventListener("pointerdown", this.clickHandler, { capture: true });
|
387
|
-
document.addEventListener("keydown", this.keyHandler, { capture: true });
|
388
|
-
}
|
389
|
-
removeListeners() {
|
390
|
-
document.removeEventListener("pointerdown", this.clickHandler, { capture: true });
|
391
|
-
document.removeEventListener("keydown", this.keyHandler, { capture: true });
|
392
|
-
}
|
393
|
-
}
|
394
|
-
|
395
|
-
const popoverCss = "@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}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:block;position:absolute;z-index:900}.calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);visibility:hidden;transition-property:transform, visibility, opacity;opacity:0;box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);z-index:1;border-radius:0.25rem}:host([data-placement^=bottom]) .calcite-floating-ui-anim{transform:translateY(-5px)}:host([data-placement^=top]) .calcite-floating-ui-anim{transform:translateY(5px)}:host([data-placement^=left]) .calcite-floating-ui-anim{transform:translateX(5px)}:host([data-placement^=right]) .calcite-floating-ui-anim{transform:translateX(-5px)}:host([data-placement]) .calcite-floating-ui-anim--active{opacity:1;visibility:visible;transform:translate(0)}:host([calcite-hydrated-hidden]){visibility:hidden !important;pointer-events:none}.arrow,.arrow::before{position:absolute;inline-size:8px;block-size:8px;z-index:-1}.arrow::before{content:\"\";--tw-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);--tw-shadow-colored:0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);transform:rotate(45deg);background:var(--calcite-ui-foreground-1)}:host([data-placement^=top]) .arrow{inset-block-end:-4px}:host([data-placement^=bottom]) .arrow{inset-block-start:-4px}:host([data-placement^=left]) .arrow{direction:ltr;inset-inline-end:-4px}:host([data-placement^=right]) .arrow{direction:ltr;inset-inline-start:-4px}:host{pointer-events:none}:host([open]){pointer-events:initial}.calcite-floating-ui-anim{border-radius:0.25rem;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);background-color:var(--calcite-ui-foreground-1)}.arrow::before{outline:1px solid var(--calcite-ui-border-3)}.header{display:flex;flex:1 1 auto;align-items:stretch;justify-content:flex-start;border-width:0px;border-block-end-width:1px;border-style:solid;background-color:var(--calcite-ui-foreground-1);border-block-end-color:var(--calcite-ui-border-3)}.heading{margin:0px;display:block;flex:1 1 auto;align-self:center;white-space:normal;padding-inline:1rem;padding-block:0.75rem;font-size:var(--calcite-font-size-0);line-height:1.375;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1);word-wrap:break-word;word-break:break-word}.container{position:relative;display:flex;block-size:100%;flex-direction:row;flex-wrap:nowrap;border-radius:0.25rem;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1)}.container.has-header{flex-direction:column}.content{display:flex;block-size:100%;inline-size:100%;flex-direction:column;flex-wrap:nowrap;align-self:center;word-wrap:break-word;word-break:break-word}.close-button-container{display:flex;overflow:hidden;flex:0 0 auto;border-start-end-radius:0.25rem;border-end-end-radius:0.25rem}::slotted(calcite-panel),::slotted(calcite-flow){block-size:100%}";
|
303
|
+
const scrimCss = "@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}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:absolute;inset:0px;z-index:700;display:flex;block-size:100%;inline-size:100%;flex-direction:column;align-items:stretch}@keyframes calcite-scrim-fade-in{0%{--tw-bg-opacity:0}100%{--tw-text-opacity:1}}.scrim{position:absolute;inset:0px;display:flex;flex-direction:column;align-content:center;align-items:center;justify-content:center;overflow:hidden;animation:calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;background-color:var(--calcite-scrim-background)}.content{padding:1rem}";
|
396
304
|
|
397
|
-
const
|
398
|
-
const Popover = class {
|
305
|
+
const Scrim = class {
|
399
306
|
constructor(hostRef) {
|
400
307
|
registerInstance(this, hostRef);
|
401
|
-
this.calcitePopoverBeforeClose = createEvent(this, "calcitePopoverBeforeClose", 6);
|
402
|
-
this.calcitePopoverClose = createEvent(this, "calcitePopoverClose", 6);
|
403
|
-
this.calcitePopoverBeforeOpen = createEvent(this, "calcitePopoverBeforeOpen", 6);
|
404
|
-
this.calcitePopoverOpen = createEvent(this, "calcitePopoverOpen", 6);
|
405
308
|
// --------------------------------------------------------------------------
|
406
309
|
//
|
407
310
|
// Properties
|
408
311
|
//
|
409
312
|
// --------------------------------------------------------------------------
|
410
313
|
/**
|
411
|
-
*
|
412
|
-
*/
|
413
|
-
this.autoClose = false;
|
414
|
-
/**
|
415
|
-
* When `true`, a close button is added to the component.
|
416
|
-
*
|
417
|
-
* @deprecated use dismissible instead.
|
418
|
-
*/
|
419
|
-
this.closeButton = false;
|
420
|
-
/**
|
421
|
-
* When `true`, a close button is added to the component.
|
422
|
-
*
|
423
|
-
* @deprecated use `closable` instead.
|
424
|
-
*/
|
425
|
-
this.dismissible = false;
|
426
|
-
/** When `true`, display a close button within the component. */
|
427
|
-
this.closable = false;
|
428
|
-
/**
|
429
|
-
* When `true`, prevents flipping the component's placement when overlapping its `referenceElement`.
|
430
|
-
*/
|
431
|
-
this.disableFlip = false;
|
432
|
-
/**
|
433
|
-
* When `true`, removes the caret pointer.
|
434
|
-
*/
|
435
|
-
this.disablePointer = false;
|
436
|
-
/**
|
437
|
-
* Offsets the position of the component away from the `referenceElement`.
|
438
|
-
*
|
439
|
-
* @default 6
|
440
|
-
*/
|
441
|
-
this.offsetDistance = defaultOffsetDistance;
|
442
|
-
/**
|
443
|
-
* Offsets the position of the component along the `referenceElement`.
|
444
|
-
*/
|
445
|
-
this.offsetSkidding = 0;
|
446
|
-
/**
|
447
|
-
* When `true`, displays and positions the component.
|
448
|
-
*/
|
449
|
-
this.open = false;
|
450
|
-
/**
|
451
|
-
* Determines the type of positioning to use for the overlaid content.
|
452
|
-
*
|
453
|
-
* Using `"absolute"` will work for most cases. The component will be positioned inside of overflowing parent containers and will affect the container's layout.
|
454
|
-
*
|
455
|
-
* `"fixed"` value should be used to escape an overflowing parent container, or when the reference element's `position` CSS property is `"fixed"`.
|
456
|
-
*
|
457
|
-
*/
|
458
|
-
this.overlayPositioning = "absolute";
|
459
|
-
/**
|
460
|
-
* Determines where the component will be positioned relative to the `referenceElement`.
|
314
|
+
* Accessible name when the component is loading.
|
461
315
|
*
|
462
|
-
* @
|
316
|
+
* @default "Loading"
|
463
317
|
*/
|
464
|
-
this.
|
318
|
+
this.intlLoading = TEXT.loading;
|
465
319
|
/**
|
466
|
-
* When `true`,
|
467
|
-
*
|
468
|
-
* This property can be set to `true` to manage when the component is open.
|
320
|
+
* When `true`, a busy indicator is displayed.
|
469
321
|
*/
|
470
|
-
this.
|
471
|
-
/**
|
472
|
-
* Accessible name for the component's close button.
|
473
|
-
*
|
474
|
-
* @default "Close"
|
475
|
-
*/
|
476
|
-
this.intlClose = TEXT.close;
|
477
|
-
this.guid = `calcite-popover-${guid()}`;
|
478
|
-
this.openTransitionProp = "opacity";
|
479
|
-
this.hasLoaded = false;
|
480
|
-
// --------------------------------------------------------------------------
|
481
|
-
//
|
482
|
-
// Private Methods
|
483
|
-
//
|
484
|
-
// --------------------------------------------------------------------------
|
485
|
-
this.setTransitionEl = (el) => {
|
486
|
-
this.transitionEl = el;
|
487
|
-
connectOpenCloseComponent(this);
|
488
|
-
};
|
489
|
-
this.setFilteredPlacements = () => {
|
490
|
-
const { el, flipPlacements } = this;
|
491
|
-
this.filteredFlipPlacements = flipPlacements
|
492
|
-
? filterComputedPlacements(flipPlacements, el)
|
493
|
-
: null;
|
494
|
-
};
|
495
|
-
this.setUpReferenceElement = (warn = true) => {
|
496
|
-
this.removeReferences();
|
497
|
-
this.effectiveReferenceElement = this.getReferenceElement();
|
498
|
-
connectFloatingUI(this, this.effectiveReferenceElement, this.el);
|
499
|
-
const { el, referenceElement, effectiveReferenceElement } = this;
|
500
|
-
if (warn && referenceElement && !effectiveReferenceElement) {
|
501
|
-
console.warn(`${el.tagName}: reference-element id "${referenceElement}" was not found.`, {
|
502
|
-
el
|
503
|
-
});
|
504
|
-
}
|
505
|
-
this.addReferences();
|
506
|
-
};
|
507
|
-
this.getId = () => {
|
508
|
-
return this.el.id || this.guid;
|
509
|
-
};
|
510
|
-
this.setExpandedAttr = () => {
|
511
|
-
const { effectiveReferenceElement, open } = this;
|
512
|
-
if (!effectiveReferenceElement) {
|
513
|
-
return;
|
514
|
-
}
|
515
|
-
if ("setAttribute" in effectiveReferenceElement) {
|
516
|
-
effectiveReferenceElement.setAttribute(ARIA_EXPANDED, toAriaBoolean(open));
|
517
|
-
}
|
518
|
-
};
|
519
|
-
this.addReferences = () => {
|
520
|
-
const { effectiveReferenceElement } = this;
|
521
|
-
if (!effectiveReferenceElement) {
|
522
|
-
return;
|
523
|
-
}
|
524
|
-
const id = this.getId();
|
525
|
-
if ("setAttribute" in effectiveReferenceElement) {
|
526
|
-
effectiveReferenceElement.setAttribute(ARIA_CONTROLS, id);
|
527
|
-
}
|
528
|
-
manager.registerElement(effectiveReferenceElement, this.el);
|
529
|
-
this.setExpandedAttr();
|
530
|
-
};
|
531
|
-
this.removeReferences = () => {
|
532
|
-
const { effectiveReferenceElement } = this;
|
533
|
-
if (!effectiveReferenceElement) {
|
534
|
-
return;
|
535
|
-
}
|
536
|
-
if ("removeAttribute" in effectiveReferenceElement) {
|
537
|
-
effectiveReferenceElement.removeAttribute(ARIA_CONTROLS);
|
538
|
-
effectiveReferenceElement.removeAttribute(ARIA_EXPANDED);
|
539
|
-
}
|
540
|
-
manager.unregisterElement(effectiveReferenceElement);
|
541
|
-
};
|
542
|
-
this.hide = () => {
|
543
|
-
this.open = false;
|
544
|
-
};
|
545
|
-
this.storeArrowEl = (el) => {
|
546
|
-
this.arrowEl = el;
|
547
|
-
this.reposition(true);
|
548
|
-
};
|
549
|
-
}
|
550
|
-
handleDismissible(value) {
|
551
|
-
this.closable = value;
|
552
|
-
}
|
553
|
-
handleClosable(value) {
|
554
|
-
this.dismissible = value;
|
555
|
-
}
|
556
|
-
flipPlacementsHandler() {
|
557
|
-
this.setFilteredPlacements();
|
558
|
-
this.reposition(true);
|
559
|
-
}
|
560
|
-
offsetDistanceOffsetHandler() {
|
561
|
-
this.reposition(true);
|
562
|
-
}
|
563
|
-
offsetSkiddingHandler() {
|
564
|
-
this.reposition(true);
|
565
|
-
}
|
566
|
-
openHandler(value) {
|
567
|
-
if (value) {
|
568
|
-
this.reposition(true);
|
569
|
-
}
|
570
|
-
else {
|
571
|
-
updateAfterClose(this.el);
|
572
|
-
}
|
573
|
-
this.setExpandedAttr();
|
574
|
-
}
|
575
|
-
overlayPositioningHandler() {
|
576
|
-
this.reposition(true);
|
577
|
-
}
|
578
|
-
placementHandler() {
|
579
|
-
this.reposition(true);
|
580
|
-
}
|
581
|
-
referenceElementHandler() {
|
582
|
-
this.setUpReferenceElement();
|
583
|
-
this.reposition(true);
|
322
|
+
this.loading = false;
|
584
323
|
}
|
585
324
|
// --------------------------------------------------------------------------
|
586
325
|
//
|
587
|
-
//
|
326
|
+
// Render Method
|
588
327
|
//
|
589
328
|
// --------------------------------------------------------------------------
|
590
|
-
connectedCallback() {
|
591
|
-
this.setFilteredPlacements();
|
592
|
-
connectOpenCloseComponent(this);
|
593
|
-
const closable = this.closable || this.dismissible;
|
594
|
-
if (closable) {
|
595
|
-
this.handleDismissible(closable);
|
596
|
-
}
|
597
|
-
if (closable) {
|
598
|
-
this.handleClosable(closable);
|
599
|
-
}
|
600
|
-
this.setUpReferenceElement(this.hasLoaded);
|
601
|
-
}
|
602
|
-
componentDidLoad() {
|
603
|
-
if (this.referenceElement && !this.effectiveReferenceElement) {
|
604
|
-
this.setUpReferenceElement();
|
605
|
-
}
|
606
|
-
this.reposition();
|
607
|
-
this.hasLoaded = true;
|
608
|
-
}
|
609
|
-
disconnectedCallback() {
|
610
|
-
this.removeReferences();
|
611
|
-
disconnectFloatingUI(this, this.effectiveReferenceElement, this.el);
|
612
|
-
disconnectOpenCloseComponent(this);
|
613
|
-
}
|
614
|
-
// --------------------------------------------------------------------------
|
615
|
-
//
|
616
|
-
// Public Methods
|
617
|
-
//
|
618
|
-
// --------------------------------------------------------------------------
|
619
|
-
/**
|
620
|
-
* Updates the position of the component.
|
621
|
-
*
|
622
|
-
* @param delayed
|
623
|
-
*/
|
624
|
-
async reposition(delayed = false) {
|
625
|
-
const { el, effectiveReferenceElement, placement, overlayPositioning, disableFlip, filteredFlipPlacements, offsetDistance, offsetSkidding, arrowEl } = this;
|
626
|
-
return reposition(this, {
|
627
|
-
floatingEl: el,
|
628
|
-
referenceEl: effectiveReferenceElement,
|
629
|
-
overlayPositioning,
|
630
|
-
placement,
|
631
|
-
disableFlip,
|
632
|
-
flipPlacements: filteredFlipPlacements,
|
633
|
-
offsetDistance,
|
634
|
-
offsetSkidding,
|
635
|
-
includeArrow: !this.disablePointer,
|
636
|
-
arrowEl,
|
637
|
-
type: "popover"
|
638
|
-
}, delayed);
|
639
|
-
}
|
640
|
-
/**
|
641
|
-
* Sets focus on the component.
|
642
|
-
*
|
643
|
-
* @param focusId
|
644
|
-
*/
|
645
|
-
async setFocus(focusId) {
|
646
|
-
var _a;
|
647
|
-
const { closeButtonEl } = this;
|
648
|
-
if (focusId === "close-button" && closeButtonEl) {
|
649
|
-
forceUpdate(closeButtonEl);
|
650
|
-
closeButtonEl.setFocus();
|
651
|
-
return;
|
652
|
-
}
|
653
|
-
(_a = this.el) === null || _a === void 0 ? void 0 : _a.focus();
|
654
|
-
}
|
655
|
-
/**
|
656
|
-
* Toggles the component's open property.
|
657
|
-
*
|
658
|
-
* @param value
|
659
|
-
*/
|
660
|
-
async toggle(value = !this.open) {
|
661
|
-
this.open = value;
|
662
|
-
}
|
663
|
-
getReferenceElement() {
|
664
|
-
const { referenceElement, el } = this;
|
665
|
-
return ((typeof referenceElement === "string"
|
666
|
-
? queryElementRoots(el, { id: referenceElement })
|
667
|
-
: referenceElement) || null);
|
668
|
-
}
|
669
|
-
onBeforeOpen() {
|
670
|
-
this.calcitePopoverBeforeOpen.emit();
|
671
|
-
}
|
672
|
-
onOpen() {
|
673
|
-
this.calcitePopoverOpen.emit();
|
674
|
-
}
|
675
|
-
onBeforeClose() {
|
676
|
-
this.calcitePopoverBeforeClose.emit();
|
677
|
-
}
|
678
|
-
onClose() {
|
679
|
-
this.calcitePopoverClose.emit();
|
680
|
-
}
|
681
|
-
// --------------------------------------------------------------------------
|
682
|
-
//
|
683
|
-
// Render Methods
|
684
|
-
//
|
685
|
-
// --------------------------------------------------------------------------
|
686
|
-
renderCloseButton() {
|
687
|
-
const { closeButton, intlClose, heading, closable } = this;
|
688
|
-
return closable || closeButton ? (h("div", { class: CSS.closeButtonContainer }, h("calcite-action", { class: CSS.closeButton, onClick: this.hide, ref: (closeButtonEl) => (this.closeButtonEl = closeButtonEl), scale: heading ? "s" : "m", text: intlClose }, h("calcite-icon", { icon: "x", scale: heading ? "s" : "m" })))) : null;
|
689
|
-
}
|
690
|
-
renderHeader() {
|
691
|
-
const { heading, headingLevel } = this;
|
692
|
-
const headingNode = heading ? (h(Heading, { class: CSS.heading, level: headingLevel || HEADING_LEVEL }, heading)) : null;
|
693
|
-
return headingNode ? (h("div", { class: CSS.header }, headingNode, this.renderCloseButton())) : null;
|
694
|
-
}
|
695
329
|
render() {
|
696
|
-
const {
|
697
|
-
const
|
698
|
-
const
|
699
|
-
const
|
700
|
-
return (h(
|
701
|
-
[FloatingCSS.animation]: true,
|
702
|
-
[FloatingCSS.animationActive]: displayed
|
703
|
-
}, ref: this.setTransitionEl }, arrowNode, h("div", { class: {
|
704
|
-
[CSS.hasHeader]: !!heading,
|
705
|
-
[CSS.container]: true
|
706
|
-
} }, this.renderHeader(), h("div", { class: CSS.content }, h("slot", null)), !heading ? this.renderCloseButton() : null))));
|
330
|
+
const { el, loading, intlLoading } = this;
|
331
|
+
const hasContent = el.innerHTML.trim().length > 0;
|
332
|
+
const loaderNode = loading ? h("calcite-loader", { active: true, label: intlLoading }) : null;
|
333
|
+
const contentNode = hasContent ? (h("div", { class: CSS.content }, h("slot", null))) : null;
|
334
|
+
return (h("div", { class: CSS.scrim }, loaderNode, contentNode));
|
707
335
|
}
|
708
336
|
get el() { return getElement(this); }
|
709
|
-
static get watchers() { return {
|
710
|
-
"dismissible": ["handleDismissible"],
|
711
|
-
"closable": ["handleClosable"],
|
712
|
-
"flipPlacements": ["flipPlacementsHandler"],
|
713
|
-
"offsetDistance": ["offsetDistanceOffsetHandler"],
|
714
|
-
"offsetSkidding": ["offsetSkiddingHandler"],
|
715
|
-
"open": ["openHandler"],
|
716
|
-
"overlayPositioning": ["overlayPositioningHandler"],
|
717
|
-
"placement": ["placementHandler"],
|
718
|
-
"referenceElement": ["referenceElementHandler"]
|
719
|
-
}; }
|
720
337
|
};
|
721
|
-
|
338
|
+
Scrim.style = scrimCss;
|
722
339
|
|
723
|
-
export { ActionMenu as calcite_action_menu,
|
340
|
+
export { ActionMenu as calcite_action_menu, Scrim as calcite_scrim };
|
724
341
|
|
725
342
|
//# sourceMappingURL=calcite-action-menu_2.entry.js.map
|