@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.
Files changed (131) hide show
  1. package/dist/assets/t9n/solution-config-modal/resources.json +22 -0
  2. package/dist/assets/t9n/solution-config-modal/resources_en.json +22 -0
  3. package/dist/cjs/calcite-action-menu_2.cjs.entry.js +18 -401
  4. package/dist/cjs/calcite-action-menu_2.cjs.entry.js.map +1 -1
  5. package/dist/cjs/calcite-action_2.cjs.entry.js +423 -71
  6. package/dist/cjs/calcite-action_2.cjs.entry.js.map +1 -1
  7. package/dist/cjs/calcite-loader.cjs.entry.js +97 -0
  8. package/dist/cjs/calcite-loader.cjs.entry.js.map +1 -0
  9. package/dist/cjs/{solution-configuration.cjs.entry.js → calcite-modal_2.cjs.entry.js} +451 -13
  10. package/dist/cjs/calcite-modal_2.cjs.entry.js.map +1 -0
  11. package/dist/cjs/{calcite-shell-panel_14.cjs.entry.js → calcite-panel_12.cjs.entry.js} +455 -709
  12. package/dist/cjs/calcite-panel_12.cjs.entry.js.map +1 -0
  13. package/dist/cjs/loader.cjs.js +1 -1
  14. package/dist/cjs/solution-config-modal.cjs.entry.js +131 -0
  15. package/dist/cjs/solution-config-modal.cjs.entry.js.map +1 -0
  16. package/dist/cjs/{solution-contents_3.cjs.entry.js → solution-contents_7.cjs.entry.js} +664 -5
  17. package/dist/cjs/solution-contents_7.cjs.entry.js.map +1 -0
  18. package/dist/cjs/{solution-store-893499a5.js → solution-store-09b3fc53.js} +4 -6
  19. package/dist/cjs/solution-store-09b3fc53.js.map +1 -0
  20. package/dist/cjs/solutions-components.cjs.js +1 -1
  21. package/dist/collection/collection-manifest.json +1 -0
  22. package/dist/collection/components/solution-config-modal/solution-config-modal.css +91 -0
  23. package/dist/collection/components/solution-config-modal/solution-config-modal.js +245 -0
  24. package/dist/collection/components/solution-config-modal/solution-config-modal.js.map +1 -0
  25. package/dist/collection/components/solution-configuration/solution-configuration.js +23 -17
  26. package/dist/collection/components/solution-configuration/solution-configuration.js.map +1 -1
  27. package/dist/collection/components/solution-item/solution-item.js +0 -2
  28. package/dist/collection/components/solution-item/solution-item.js.map +1 -1
  29. package/dist/collection/components/solution-item-details/solution-item-details.js +0 -13
  30. package/dist/collection/components/solution-item-details/solution-item-details.js.map +1 -1
  31. package/dist/collection/utils/solution-store.js +3 -5
  32. package/dist/collection/utils/solution-store.js.map +1 -1
  33. package/dist/collection/utils/solution-store.ts +3 -5
  34. package/dist/esm/buffer-tools_6.entry.js +2 -2
  35. package/dist/esm/calcite-action-bar_6.entry.js +2 -2
  36. package/dist/esm/calcite-action-menu_2.entry.js +20 -403
  37. package/dist/esm/calcite-action-menu_2.entry.js.map +1 -1
  38. package/dist/esm/calcite-action_2.entry.js +424 -72
  39. package/dist/esm/calcite-action_2.entry.js.map +1 -1
  40. package/dist/esm/calcite-combobox_3.entry.js +2 -2
  41. package/dist/esm/calcite-loader.entry.js +93 -0
  42. package/dist/esm/calcite-loader.entry.js.map +1 -0
  43. package/dist/esm/{solution-configuration.entry.js → calcite-modal_2.entry.js} +453 -16
  44. package/dist/esm/calcite-modal_2.entry.js.map +1 -0
  45. package/dist/esm/{calcite-shell-panel_14.entry.js → calcite-panel_12.entry.js} +454 -706
  46. package/dist/esm/calcite-panel_12.entry.js.map +1 -0
  47. package/dist/esm/config-layer-picker.entry.js +2 -2
  48. package/dist/esm/{interfaces-e2a2064d.js → interfaces-1bdfc3a8.js} +2 -2
  49. package/dist/esm/{interfaces-e2a2064d.js.map → interfaces-1bdfc3a8.js.map} +1 -1
  50. package/dist/esm/loader.js +1 -1
  51. package/dist/esm/{mapViewUtils-09f1e7bd.js → mapViewUtils-809947c8.js} +2 -2
  52. package/dist/esm/{mapViewUtils-09f1e7bd.js.map → mapViewUtils-809947c8.js.map} +1 -1
  53. package/dist/esm/public-notification.entry.js +2 -2
  54. package/dist/esm/solution-config-modal.entry.js +127 -0
  55. package/dist/esm/solution-config-modal.entry.js.map +1 -0
  56. package/dist/esm/{solution-contents_3.entry.js → solution-contents_7.entry.js} +661 -6
  57. package/dist/esm/solution-contents_7.entry.js.map +1 -0
  58. package/dist/esm/{solution-store-0c58c852.js → solution-store-d8519c64.js} +5 -7
  59. package/dist/esm/solution-store-d8519c64.js.map +1 -0
  60. package/dist/esm/solutions-components.js +1 -1
  61. package/dist/solutions-components/{p-be1ed982.entry.js → p-11068040.entry.js} +3 -3
  62. package/dist/solutions-components/{p-be1ed982.entry.js.map → p-11068040.entry.js.map} +0 -0
  63. package/dist/solutions-components/{p-659edb14.js → p-2910dd9e.js} +5 -7
  64. package/dist/{cjs/solution-store-893499a5.js.map → solutions-components/p-2910dd9e.js.map} +1 -1
  65. package/dist/solutions-components/{p-291fd295.entry.js → p-30810b45.entry.js} +3 -3
  66. package/dist/solutions-components/{p-291fd295.entry.js.map → p-30810b45.entry.js.map} +0 -0
  67. package/dist/solutions-components/p-38ddadf2.entry.js +342 -0
  68. package/dist/solutions-components/p-38ddadf2.entry.js.map +1 -0
  69. package/dist/solutions-components/{p-77c75f3a.entry.js → p-5b20090f.entry.js} +661 -6
  70. package/dist/solutions-components/p-5b20090f.entry.js.map +1 -0
  71. package/dist/solutions-components/{p-9393631c.entry.js → p-9ef1328a.entry.js} +3 -3
  72. package/dist/solutions-components/{p-9393631c.entry.js.map → p-9ef1328a.entry.js.map} +0 -0
  73. package/dist/solutions-components/{p-984cb687.entry.js → p-a1786d11.entry.js} +454 -706
  74. package/dist/solutions-components/p-a1786d11.entry.js.map +1 -0
  75. package/dist/solutions-components/{p-fe0fdd8b.js → p-c20bd963.js} +2 -2
  76. package/dist/solutions-components/{p-fe0fdd8b.js.map → p-c20bd963.js.map} +1 -1
  77. package/dist/solutions-components/p-c5721b0f.entry.js +127 -0
  78. package/dist/solutions-components/p-c5721b0f.entry.js.map +1 -0
  79. package/dist/solutions-components/{p-24d75151.entry.js → p-c818e661.entry.js} +3 -3
  80. package/dist/solutions-components/{p-24d75151.entry.js.map → p-c818e661.entry.js.map} +0 -0
  81. package/dist/solutions-components/{p-90629c1d.entry.js → p-cf59eb16.entry.js} +453 -16
  82. package/dist/solutions-components/p-cf59eb16.entry.js.map +1 -0
  83. package/dist/solutions-components/p-e405ebe8.entry.js +93 -0
  84. package/dist/solutions-components/p-e405ebe8.entry.js.map +1 -0
  85. package/dist/solutions-components/{p-77e6b03c.entry.js → p-e6fb9cde.entry.js} +3 -3
  86. package/dist/solutions-components/{p-77e6b03c.entry.js.map → p-e6fb9cde.entry.js.map} +0 -0
  87. package/dist/solutions-components/{p-97c4a268.entry.js → p-ef6f9e24.entry.js} +113 -229
  88. package/dist/solutions-components/p-ef6f9e24.entry.js.map +1 -0
  89. package/dist/solutions-components/{p-6b9dc092.js → p-f04fdb9a.js} +2 -2
  90. package/dist/solutions-components/{p-6b9dc092.js.map → p-f04fdb9a.js.map} +1 -1
  91. package/dist/solutions-components/solutions-components.esm.js +1 -1
  92. package/dist/solutions-components/utils/solution-store.ts +3 -5
  93. package/dist/solutions-components_commit.txt +8 -8
  94. package/dist/types/components/solution-config-modal/solution-config-modal.d.ts +69 -0
  95. package/dist/types/components/solution-configuration/solution-configuration.d.ts +4 -2
  96. package/dist/types/components/solution-item-details/solution-item-details.d.ts +0 -1
  97. package/dist/types/components.d.ts +43 -5
  98. package/dist/types/preact.d.ts +4 -0
  99. package/package.json +1 -1
  100. package/dist/cjs/calcite-modal.cjs.entry.js +0 -449
  101. package/dist/cjs/calcite-modal.cjs.entry.js.map +0 -1
  102. package/dist/cjs/calcite-panel_2.cjs.entry.js +0 -439
  103. package/dist/cjs/calcite-panel_2.cjs.entry.js.map +0 -1
  104. package/dist/cjs/calcite-scrim.cjs.entry.js +0 -64
  105. package/dist/cjs/calcite-scrim.cjs.entry.js.map +0 -1
  106. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js.map +0 -1
  107. package/dist/cjs/solution-configuration.cjs.entry.js.map +0 -1
  108. package/dist/cjs/solution-contents_3.cjs.entry.js.map +0 -1
  109. package/dist/esm/calcite-modal.entry.js +0 -445
  110. package/dist/esm/calcite-modal.entry.js.map +0 -1
  111. package/dist/esm/calcite-panel_2.entry.js +0 -434
  112. package/dist/esm/calcite-panel_2.entry.js.map +0 -1
  113. package/dist/esm/calcite-scrim.entry.js +0 -60
  114. package/dist/esm/calcite-scrim.entry.js.map +0 -1
  115. package/dist/esm/calcite-shell-panel_14.entry.js.map +0 -1
  116. package/dist/esm/solution-configuration.entry.js.map +0 -1
  117. package/dist/esm/solution-contents_3.entry.js.map +0 -1
  118. package/dist/esm/solution-store-0c58c852.js.map +0 -1
  119. package/dist/solutions-components/p-0fda7d9e.entry.js +0 -434
  120. package/dist/solutions-components/p-0fda7d9e.entry.js.map +0 -1
  121. package/dist/solutions-components/p-2ff754ce.entry.js +0 -257
  122. package/dist/solutions-components/p-2ff754ce.entry.js.map +0 -1
  123. package/dist/solutions-components/p-30a6199a.entry.js +0 -445
  124. package/dist/solutions-components/p-30a6199a.entry.js.map +0 -1
  125. package/dist/solutions-components/p-659edb14.js.map +0 -1
  126. package/dist/solutions-components/p-77c75f3a.entry.js.map +0 -1
  127. package/dist/solutions-components/p-90629c1d.entry.js.map +0 -1
  128. package/dist/solutions-components/p-97c4a268.entry.js.map +0 -1
  129. package/dist/solutions-components/p-984cb687.entry.js.map +0 -1
  130. package/dist/solutions-components/p-f5268b4f.entry.js +0 -60
  131. package/dist/solutions-components/p-f5268b4f.entry.js.map +0 -1
@@ -6,16 +6,21 @@
6
6
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement, f as forceUpdate } from './index-15022d11.js';
7
7
  import { c as createObserver } from './observers-31601001.js';
8
8
  import { u as updateHostInteraction } from './interactive-822ffed6.js';
9
- import { t as toAriaBoolean } from './dom-e593bf85.js';
9
+ import { t as toAriaBoolean, i as isPrimaryPointerButton, q as queryElementRoots } from './dom-e593bf85.js';
10
+ 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';
10
11
  import { g as guid } from './guid-15fce7c0.js';
12
+ import { c as connectOpenCloseComponent, d as disconnectOpenCloseComponent } from './openCloseComponent-5caff873.js';
13
+ import { H as Heading } from './Heading-1efb4837.js';
14
+ import { i as isActivationKey } from './key-acb660e7.js';
11
15
  import './resources-436ae282.js';
16
+ import './debounce-4c884e5c.js';
12
17
 
13
18
  /*!
14
19
  * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
15
20
  * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
16
21
  * v1.0.0-beta.97
17
22
  */
18
- const CSS = {
23
+ const CSS$1 = {
19
24
  button: "button",
20
25
  buttonTextVisible: "button--text-visible",
21
26
  buttonCompact: "button--compact",
@@ -25,7 +30,7 @@ const CSS = {
25
30
  textContainer: "text-container",
26
31
  textContainerVisible: "text-container--visible"
27
32
  };
28
- const TEXT = {
33
+ const TEXT$1 = {
29
34
  loading: "Loading"
30
35
  };
31
36
  const SLOTS = {
@@ -66,7 +71,7 @@ const Action = class {
66
71
  *
67
72
  * @default "Loading"
68
73
  */
69
- this.intlLoading = TEXT.loading;
74
+ this.intlLoading = TEXT$1.loading;
70
75
  /**
71
76
  * When `true`, a busy indicator is displayed.
72
77
  */
@@ -136,8 +141,8 @@ const Action = class {
136
141
  renderTextContainer() {
137
142
  const { text, textEnabled } = this;
138
143
  const textContainerClasses = {
139
- [CSS.textContainer]: true,
140
- [CSS.textContainerVisible]: textEnabled
144
+ [CSS$1.textContainer]: true,
145
+ [CSS$1.textContainerVisible]: textEnabled
141
146
  };
142
147
  return text ? (h("div", { class: textContainerClasses, key: "text-container" }, text)) : null;
143
148
  }
@@ -151,18 +156,18 @@ const Action = class {
151
156
  const iconNode = calciteLoaderNode || calciteIconNode;
152
157
  const hasIconToDisplay = iconNode || ((_a = el.children) === null || _a === void 0 ? void 0 : _a.length);
153
158
  const slotContainerNode = (h("div", { class: {
154
- [CSS.slotContainer]: true,
155
- [CSS.slotContainerHidden]: loading
159
+ [CSS$1.slotContainer]: true,
160
+ [CSS$1.slotContainerHidden]: loading
156
161
  } }, h("slot", null)));
157
- return hasIconToDisplay ? (h("div", { "aria-hidden": "true", class: CSS.iconContainer, key: "icon-container" }, iconNode, slotContainerNode)) : null;
162
+ return hasIconToDisplay ? (h("div", { "aria-hidden": "true", class: CSS$1.iconContainer, key: "icon-container" }, iconNode, slotContainerNode)) : null;
158
163
  }
159
164
  render() {
160
165
  const { compact, disabled, loading, textEnabled, label, text } = this;
161
166
  const ariaLabel = label || text;
162
167
  const buttonClasses = {
163
- [CSS.button]: true,
164
- [CSS.buttonTextVisible]: textEnabled,
165
- [CSS.buttonCompact]: compact
168
+ [CSS$1.button]: true,
169
+ [CSS$1.buttonTextVisible]: textEnabled,
170
+ [CSS$1.buttonCompact]: compact
166
171
  };
167
172
  return (h(Host, { onClick: this.calciteActionClickHandler }, h("button", { "aria-busy": toAriaBoolean(loading), "aria-disabled": toAriaBoolean(disabled), "aria-label": ariaLabel, class: buttonClasses, disabled: disabled, ref: (buttonEl) => (this.buttonEl = buttonEl) }, this.renderIconContainer(), this.renderTextContainer()), h("slot", { name: SLOTS.tooltip, onSlotchange: this.handleTooltipSlotChange })));
168
173
  }
@@ -170,88 +175,435 @@ const Action = class {
170
175
  };
171
176
  Action.style = actionCss;
172
177
 
173
- const loaderCss = "@charset \"UTF-8\";@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:relative;margin-inline:auto;display:none;align-items:center;justify-content:center;opacity:1;min-block-size:var(--calcite-loader-size);font-size:var(--calcite-loader-font-size);stroke:var(--calcite-ui-brand);stroke-width:3;fill:none;transform:scale(1, 1);animation:loader-color-shift calc(var(--calcite-internal-animation-timing-slow) * 2) alternate-reverse infinite linear;padding-block:var(--calcite-loader-padding, 4rem)}:host([scale=s]){--calcite-loader-font-size:var(--calcite-font-size--2);--calcite-loader-size:2rem;--calcite-loader-size-inline:0.75rem}:host([scale=m]){--calcite-loader-font-size:var(--calcite-font-size-0);--calcite-loader-size:4rem;--calcite-loader-size-inline:1rem}:host([scale=l]){--calcite-loader-font-size:var(--calcite-font-size-2);--calcite-loader-size:6rem;--calcite-loader-size-inline:1.5rem}:host([no-padding]){padding-block:0px}:host{display:none}:host([active]){display:flex}.loader__text{display:block;text-align:center;font-size:var(--calcite-font-size--2);line-height:1rem;color:var(--calcite-ui-text-1);-webkit-margin-before:calc(var(--calcite-loader-size) + 1.5rem);margin-block-start:calc(var(--calcite-loader-size) + 1.5rem)}.loader__percentage{position:absolute;display:block;text-align:center;color:var(--calcite-ui-text-1);font-size:var(--calcite-loader-font-size);inline-size:var(--calcite-loader-size);inset-inline-start:50%;-webkit-margin-start:calc(var(--calcite-loader-size) / 2 * -1);margin-inline-start:calc(var(--calcite-loader-size) / 2 * -1);line-height:0.25;transform:scale(1, 1)}.loader__svgs{position:absolute;overflow:visible;opacity:1;inline-size:var(--calcite-loader-size);block-size:var(--calcite-loader-size);inset-inline-start:50%;-webkit-margin-start:calc(var(--calcite-loader-size) / 2 * -1);margin-inline-start:calc(var(--calcite-loader-size) / 2 * -1);transform:scale(1, 1)}.loader__svg{position:absolute;inset-block-start:0px;transform-origin:center;overflow:visible;inset-inline-start:0;inline-size:var(--calcite-loader-size);block-size:var(--calcite-loader-size);animation-iteration-count:infinite;animation-timing-function:linear;animation-name:loader-clockwise}@supports (display: grid){.loader__svg--1{animation-name:loader-offset-1}.loader__svg--2{animation-name:loader-offset-2}.loader__svg--3{animation-name:loader-offset-3}}:host([type=determinate]){animation:none;stroke:var(--calcite-ui-border-3)}:host([type=determinate]) .loader__svg--3{animation:none;stroke:var(--calcite-ui-brand);stroke-dasharray:150.79632;transform:rotate(-90deg);transition:all var(--calcite-internal-animation-timing-fast) linear}:host([inline]){position:relative;margin:0px;animation:none;stroke:currentColor;stroke-width:2;padding-block:0px;block-size:var(--calcite-loader-size-inline);min-block-size:var(--calcite-loader-size-inline);inline-size:var(--calcite-loader-size-inline);-webkit-margin-end:calc(var(--calcite-loader-size-inline) * 0.5);margin-inline-end:calc(var(--calcite-loader-size-inline) * 0.5);vertical-align:calc(var(--calcite-loader-size-inline) * -1 * 0.2)}:host([active][inline]){display:inline-block}:host([inline]) .loader__svgs{inset-block-start:0px;margin:0px;inset-inline-start:0;inline-size:var(--calcite-loader-size-inline);block-size:var(--calcite-loader-size-inline)}:host([inline]) .loader__svg{inline-size:var(--calcite-loader-size-inline);block-size:var(--calcite-loader-size-inline)}:host([complete]){opacity:0;transform:scale(0.75, 0.75);transform-origin:center;transition:opacity var(--calcite-internal-animation-timing-medium) linear 1000ms, transform var(--calcite-internal-animation-timing-medium) linear 1000ms}:host([complete]) .loader__svgs{opacity:0;transform:scale(0.75, 0.75);transform-origin:center;transition:opacity calc(180ms * var(--calcite-internal-duration-factor)) linear 800ms, transform calc(180ms * var(--calcite-internal-duration-factor)) linear 800ms}:host([complete]) .loader__percentage{color:var(--calcite-ui-brand);transform:scale(1.05, 1.05);transform-origin:center;transition:color var(--calcite-internal-animation-timing-medium) linear, transform var(--calcite-internal-animation-timing-medium) linear}.loader__svg--1{stroke-dasharray:27.9252444444% 139.6262222222%;animation-duration:calc(var(--calcite-internal-animation-timing-slow) * 2.4)}@keyframes loader-offset-1{0%{stroke-dasharray:27.9252444444% 251.3272%;stroke-dashoffset:0}50%{stroke-dasharray:139.6262222222% 139.6262222222%;stroke-dashoffset:-83.7757333333%}100%{stroke-dasharray:27.9252444444% 251.3272%;stroke-dashoffset:-279.2524444444%}}.loader__svg--2{stroke-dasharray:55.8504888889% 139.6262222222%;animation-duration:calc(var(--calcite-internal-animation-timing-slow) * 3.2)}@keyframes loader-offset-2{0%{stroke-dasharray:55.8504888889% 223.4019555556%;stroke-dashoffset:0}50%{stroke-dasharray:139.6262222222% 139.6262222222%;stroke-dashoffset:-97.7383555556%}100%{stroke-dasharray:55.8504888889% 223.4019555556%;stroke-dashoffset:-279.2524444444%}}.loader__svg--3{stroke-dasharray:13.9626222222% 139.6262222222%;animation-duration:calc(var(--calcite-internal-animation-timing-slow) * 3.867)}@keyframes loader-offset-3{0%{stroke-dasharray:13.9626222222% 265.2898222222%;stroke-dashoffset:0}50%{stroke-dasharray:139.6262222222% 139.6262222222%;stroke-dashoffset:-76.7944222222%}100%{stroke-dasharray:13.9626222222% 265.2898222222%;stroke-dashoffset:-279.2524444444%}}@keyframes loader-color-shift{0%{stroke:var(--calcite-ui-brand)}33%{stroke:var(--calcite-ui-brand-press)}66%{stroke:var(--calcite-ui-brand-hover)}100%{stroke:var(--calcite-ui-brand)}}@keyframes loader-clockwise{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
178
+ /*!
179
+ * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
180
+ * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
181
+ * v1.0.0-beta.97
182
+ */
183
+ const CSS = {
184
+ container: "container",
185
+ arrow: "arrow",
186
+ imageContainer: "image-container",
187
+ closeButtonContainer: "close-button-container",
188
+ closeButton: "close-button",
189
+ content: "content",
190
+ hasHeader: "has-header",
191
+ header: "header",
192
+ headerContent: "header-content",
193
+ heading: "heading"
194
+ };
195
+ const TEXT = {
196
+ close: "Close"
197
+ };
198
+ const defaultPopoverPlacement = "auto";
199
+ const ARIA_CONTROLS = "aria-controls";
200
+ const ARIA_EXPANDED = "aria-expanded";
201
+ const HEADING_LEVEL = 2;
174
202
 
175
- const Loader = class {
203
+ /*!
204
+ * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
205
+ * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
206
+ * v1.0.0-beta.97
207
+ */
208
+ class PopoverManager {
209
+ constructor() {
210
+ // --------------------------------------------------------------------------
211
+ //
212
+ // Private Properties
213
+ //
214
+ // --------------------------------------------------------------------------
215
+ this.registeredElements = new Map();
216
+ this.registeredElementCount = 0;
217
+ // --------------------------------------------------------------------------
218
+ //
219
+ // Private Methods
220
+ //
221
+ // --------------------------------------------------------------------------
222
+ this.queryPopover = (composedPath) => {
223
+ const { registeredElements } = this;
224
+ const registeredElement = composedPath.find((pathEl) => registeredElements.has(pathEl));
225
+ return registeredElements.get(registeredElement);
226
+ };
227
+ this.togglePopovers = (event) => {
228
+ const composedPath = event.composedPath();
229
+ const togglePopover = this.queryPopover(composedPath);
230
+ if (togglePopover && !togglePopover.triggerDisabled) {
231
+ togglePopover.toggle();
232
+ }
233
+ Array.from(this.registeredElements.values())
234
+ .filter((popover) => popover !== togglePopover && popover.autoClose && popover.open && !composedPath.includes(popover))
235
+ .forEach((popover) => popover.toggle(false));
236
+ };
237
+ this.keyHandler = (event) => {
238
+ if (event.defaultPrevented || !isActivationKey(event.key)) {
239
+ return;
240
+ }
241
+ this.togglePopovers(event);
242
+ };
243
+ this.clickHandler = (event) => {
244
+ if (isPrimaryPointerButton(event)) {
245
+ this.togglePopovers(event);
246
+ }
247
+ };
248
+ }
249
+ // --------------------------------------------------------------------------
250
+ //
251
+ // Public Methods
252
+ //
253
+ // --------------------------------------------------------------------------
254
+ registerElement(referenceEl, popover) {
255
+ this.registeredElementCount++;
256
+ this.registeredElements.set(referenceEl, popover);
257
+ if (this.registeredElementCount === 1) {
258
+ this.addListeners();
259
+ }
260
+ }
261
+ unregisterElement(referenceEl) {
262
+ if (this.registeredElements.delete(referenceEl)) {
263
+ this.registeredElementCount--;
264
+ }
265
+ if (this.registeredElementCount === 0) {
266
+ this.removeListeners();
267
+ }
268
+ }
269
+ addListeners() {
270
+ document.addEventListener("pointerdown", this.clickHandler, { capture: true });
271
+ document.addEventListener("keydown", this.keyHandler, { capture: true });
272
+ }
273
+ removeListeners() {
274
+ document.removeEventListener("pointerdown", this.clickHandler, { capture: true });
275
+ document.removeEventListener("keydown", this.keyHandler, { capture: true });
276
+ }
277
+ }
278
+
279
+ 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%}";
280
+
281
+ const manager = new PopoverManager();
282
+ const Popover = class {
176
283
  constructor(hostRef) {
177
284
  registerInstance(this, hostRef);
178
- //--------------------------------------------------------------------------
285
+ this.calcitePopoverBeforeClose = createEvent(this, "calcitePopoverBeforeClose", 6);
286
+ this.calcitePopoverClose = createEvent(this, "calcitePopoverClose", 6);
287
+ this.calcitePopoverBeforeOpen = createEvent(this, "calcitePopoverBeforeOpen", 6);
288
+ this.calcitePopoverOpen = createEvent(this, "calcitePopoverOpen", 6);
289
+ // --------------------------------------------------------------------------
179
290
  //
180
291
  // Properties
181
292
  //
182
- //--------------------------------------------------------------------------
183
- /** When `true`, the component is active. */
184
- this.active = false;
185
- /** When `true`, displays smaller and appears to the left of the text. */
186
- this.inline = false;
187
- /** Specifies the size of the component. */
188
- this.scale = "m";
189
- /** The component's value. Valid only for `"determinate"` indicators. Percent complete of 100. */
190
- this.value = 0;
191
- /** Text that displays under the component's indicator. */
192
- this.text = "";
293
+ // --------------------------------------------------------------------------
294
+ /**
295
+ * When `true`, clicking outside of the component automatically closes open `calcite-popover`s.
296
+ */
297
+ this.autoClose = false;
298
+ /**
299
+ * When `true`, a close button is added to the component.
300
+ *
301
+ * @deprecated use dismissible instead.
302
+ */
303
+ this.closeButton = false;
304
+ /**
305
+ * When `true`, a close button is added to the component.
306
+ *
307
+ * @deprecated use `closable` instead.
308
+ */
309
+ this.dismissible = false;
310
+ /** When `true`, display a close button within the component. */
311
+ this.closable = false;
312
+ /**
313
+ * When `true`, prevents flipping the component's placement when overlapping its `referenceElement`.
314
+ */
315
+ this.disableFlip = false;
316
+ /**
317
+ * When `true`, removes the caret pointer.
318
+ */
319
+ this.disablePointer = false;
193
320
  /**
194
- * Disables spacing around the component.
321
+ * Offsets the position of the component away from the `referenceElement`.
195
322
  *
196
- * @deprecated Use `--calcite-loader-padding` CSS variable instead.
323
+ * @default 6
324
+ */
325
+ this.offsetDistance = defaultOffsetDistance;
326
+ /**
327
+ * Offsets the position of the component along the `referenceElement`.
197
328
  */
198
- this.noPadding = false;
329
+ this.offsetSkidding = 0;
330
+ /**
331
+ * When `true`, displays and positions the component.
332
+ */
333
+ this.open = false;
334
+ /**
335
+ * Determines the type of positioning to use for the overlaid content.
336
+ *
337
+ * Using `"absolute"` will work for most cases. The component will be positioned inside of overflowing parent containers and will affect the container's layout.
338
+ *
339
+ * `"fixed"` value should be used to escape an overflowing parent container, or when the reference element's `position` CSS property is `"fixed"`.
340
+ *
341
+ */
342
+ this.overlayPositioning = "absolute";
343
+ /**
344
+ * Determines where the component will be positioned relative to the `referenceElement`.
345
+ *
346
+ * @see [LogicalPlacement](https://github.com/Esri/calcite-components/blob/master/src/utils/floating-ui.ts#L25)
347
+ */
348
+ this.placement = defaultPopoverPlacement;
349
+ /**
350
+ * When `true`, disables automatically toggling the component when its `referenceElement` has been triggered.
351
+ *
352
+ * This property can be set to `true` to manage when the component is open.
353
+ */
354
+ this.triggerDisabled = false;
355
+ /**
356
+ * Accessible name for the component's close button.
357
+ *
358
+ * @default "Close"
359
+ */
360
+ this.intlClose = TEXT.close;
361
+ this.guid = `calcite-popover-${guid()}`;
362
+ this.openTransitionProp = "opacity";
363
+ this.hasLoaded = false;
364
+ // --------------------------------------------------------------------------
365
+ //
366
+ // Private Methods
367
+ //
368
+ // --------------------------------------------------------------------------
369
+ this.setTransitionEl = (el) => {
370
+ this.transitionEl = el;
371
+ connectOpenCloseComponent(this);
372
+ };
373
+ this.setFilteredPlacements = () => {
374
+ const { el, flipPlacements } = this;
375
+ this.filteredFlipPlacements = flipPlacements
376
+ ? filterComputedPlacements(flipPlacements, el)
377
+ : null;
378
+ };
379
+ this.setUpReferenceElement = (warn = true) => {
380
+ this.removeReferences();
381
+ this.effectiveReferenceElement = this.getReferenceElement();
382
+ connectFloatingUI(this, this.effectiveReferenceElement, this.el);
383
+ const { el, referenceElement, effectiveReferenceElement } = this;
384
+ if (warn && referenceElement && !effectiveReferenceElement) {
385
+ console.warn(`${el.tagName}: reference-element id "${referenceElement}" was not found.`, {
386
+ el
387
+ });
388
+ }
389
+ this.addReferences();
390
+ };
391
+ this.getId = () => {
392
+ return this.el.id || this.guid;
393
+ };
394
+ this.setExpandedAttr = () => {
395
+ const { effectiveReferenceElement, open } = this;
396
+ if (!effectiveReferenceElement) {
397
+ return;
398
+ }
399
+ if ("setAttribute" in effectiveReferenceElement) {
400
+ effectiveReferenceElement.setAttribute(ARIA_EXPANDED, toAriaBoolean(open));
401
+ }
402
+ };
403
+ this.addReferences = () => {
404
+ const { effectiveReferenceElement } = this;
405
+ if (!effectiveReferenceElement) {
406
+ return;
407
+ }
408
+ const id = this.getId();
409
+ if ("setAttribute" in effectiveReferenceElement) {
410
+ effectiveReferenceElement.setAttribute(ARIA_CONTROLS, id);
411
+ }
412
+ manager.registerElement(effectiveReferenceElement, this.el);
413
+ this.setExpandedAttr();
414
+ };
415
+ this.removeReferences = () => {
416
+ const { effectiveReferenceElement } = this;
417
+ if (!effectiveReferenceElement) {
418
+ return;
419
+ }
420
+ if ("removeAttribute" in effectiveReferenceElement) {
421
+ effectiveReferenceElement.removeAttribute(ARIA_CONTROLS);
422
+ effectiveReferenceElement.removeAttribute(ARIA_EXPANDED);
423
+ }
424
+ manager.unregisterElement(effectiveReferenceElement);
425
+ };
426
+ this.hide = () => {
427
+ this.open = false;
428
+ };
429
+ this.storeArrowEl = (el) => {
430
+ this.arrowEl = el;
431
+ this.reposition(true);
432
+ };
199
433
  }
200
- //--------------------------------------------------------------------------
434
+ handleDismissible(value) {
435
+ this.closable = value;
436
+ }
437
+ handleClosable(value) {
438
+ this.dismissible = value;
439
+ }
440
+ flipPlacementsHandler() {
441
+ this.setFilteredPlacements();
442
+ this.reposition(true);
443
+ }
444
+ offsetDistanceOffsetHandler() {
445
+ this.reposition(true);
446
+ }
447
+ offsetSkiddingHandler() {
448
+ this.reposition(true);
449
+ }
450
+ openHandler(value) {
451
+ if (value) {
452
+ this.reposition(true);
453
+ }
454
+ else {
455
+ updateAfterClose(this.el);
456
+ }
457
+ this.setExpandedAttr();
458
+ }
459
+ overlayPositioningHandler() {
460
+ this.reposition(true);
461
+ }
462
+ placementHandler() {
463
+ this.reposition(true);
464
+ }
465
+ referenceElementHandler() {
466
+ this.setUpReferenceElement();
467
+ this.reposition(true);
468
+ }
469
+ // --------------------------------------------------------------------------
201
470
  //
202
471
  // Lifecycle
203
472
  //
204
- //--------------------------------------------------------------------------
205
- render() {
206
- const { el, inline, label, scale, text, type, value } = this;
207
- const id = el.id || guid();
208
- const radiusRatio = 0.45;
209
- const size = inline ? this.getInlineSize(scale) : this.getSize(scale);
210
- const radius = size * radiusRatio;
211
- const viewbox = `0 0 ${size} ${size}`;
212
- const isDeterminate = type === "determinate";
213
- const circumference = 2 * radius * Math.PI;
214
- const progress = (value / 100) * circumference;
215
- const remaining = circumference - progress;
216
- const valueNow = Math.floor(value);
217
- const hostAttributes = {
218
- "aria-valuenow": valueNow,
219
- "aria-valuemin": 0,
220
- "aria-valuemax": 100,
221
- complete: valueNow === 100
222
- };
223
- const svgAttributes = { r: radius, cx: size / 2, cy: size / 2 };
224
- const determinateStyle = { "stroke-dasharray": `${progress} ${remaining}` };
225
- return (h(Host, Object.assign({ "aria-label": label, id: id, role: "progressbar" }, (isDeterminate ? hostAttributes : {})), h("div", { class: "loader__svgs" }, h("svg", { class: "loader__svg loader__svg--1", viewBox: viewbox }, h("circle", Object.assign({}, svgAttributes))), h("svg", { class: "loader__svg loader__svg--2", viewBox: viewbox }, h("circle", Object.assign({}, svgAttributes))), h("svg", Object.assign({ class: "loader__svg loader__svg--3", viewBox: viewbox }, (isDeterminate ? { style: determinateStyle } : {})), h("circle", Object.assign({}, svgAttributes)))), text && h("div", { class: "loader__text" }, text), isDeterminate && h("div", { class: "loader__percentage" }, value)));
473
+ // --------------------------------------------------------------------------
474
+ connectedCallback() {
475
+ this.setFilteredPlacements();
476
+ connectOpenCloseComponent(this);
477
+ const closable = this.closable || this.dismissible;
478
+ if (closable) {
479
+ this.handleDismissible(closable);
480
+ }
481
+ if (closable) {
482
+ this.handleClosable(closable);
483
+ }
484
+ this.setUpReferenceElement(this.hasLoaded);
226
485
  }
227
- //--------------------------------------------------------------------------
486
+ componentDidLoad() {
487
+ if (this.referenceElement && !this.effectiveReferenceElement) {
488
+ this.setUpReferenceElement();
489
+ }
490
+ this.reposition();
491
+ this.hasLoaded = true;
492
+ }
493
+ disconnectedCallback() {
494
+ this.removeReferences();
495
+ disconnectFloatingUI(this, this.effectiveReferenceElement, this.el);
496
+ disconnectOpenCloseComponent(this);
497
+ }
498
+ // --------------------------------------------------------------------------
228
499
  //
229
- // Private Methods
500
+ // Public Methods
230
501
  //
231
- //--------------------------------------------------------------------------
502
+ // --------------------------------------------------------------------------
503
+ /**
504
+ * Updates the position of the component.
505
+ *
506
+ * @param delayed
507
+ */
508
+ async reposition(delayed = false) {
509
+ const { el, effectiveReferenceElement, placement, overlayPositioning, disableFlip, filteredFlipPlacements, offsetDistance, offsetSkidding, arrowEl } = this;
510
+ return reposition(this, {
511
+ floatingEl: el,
512
+ referenceEl: effectiveReferenceElement,
513
+ overlayPositioning,
514
+ placement,
515
+ disableFlip,
516
+ flipPlacements: filteredFlipPlacements,
517
+ offsetDistance,
518
+ offsetSkidding,
519
+ includeArrow: !this.disablePointer,
520
+ arrowEl,
521
+ type: "popover"
522
+ }, delayed);
523
+ }
524
+ /**
525
+ * Sets focus on the component.
526
+ *
527
+ * @param focusId
528
+ */
529
+ async setFocus(focusId) {
530
+ var _a;
531
+ const { closeButtonEl } = this;
532
+ if (focusId === "close-button" && closeButtonEl) {
533
+ forceUpdate(closeButtonEl);
534
+ closeButtonEl.setFocus();
535
+ return;
536
+ }
537
+ (_a = this.el) === null || _a === void 0 ? void 0 : _a.focus();
538
+ }
232
539
  /**
233
- * Return the proper sizes based on the scale property
540
+ * Toggles the component's open property.
234
541
  *
235
- * @param scale
542
+ * @param value
236
543
  */
237
- getSize(scale) {
238
- return {
239
- s: 32,
240
- m: 56,
241
- l: 80
242
- }[scale];
243
- }
244
- getInlineSize(scale) {
245
- return {
246
- s: 12,
247
- m: 16,
248
- l: 20
249
- }[scale];
544
+ async toggle(value = !this.open) {
545
+ this.open = value;
546
+ }
547
+ getReferenceElement() {
548
+ const { referenceElement, el } = this;
549
+ return ((typeof referenceElement === "string"
550
+ ? queryElementRoots(el, { id: referenceElement })
551
+ : referenceElement) || null);
552
+ }
553
+ onBeforeOpen() {
554
+ this.calcitePopoverBeforeOpen.emit();
555
+ }
556
+ onOpen() {
557
+ this.calcitePopoverOpen.emit();
558
+ }
559
+ onBeforeClose() {
560
+ this.calcitePopoverBeforeClose.emit();
561
+ }
562
+ onClose() {
563
+ this.calcitePopoverClose.emit();
564
+ }
565
+ // --------------------------------------------------------------------------
566
+ //
567
+ // Render Methods
568
+ //
569
+ // --------------------------------------------------------------------------
570
+ renderCloseButton() {
571
+ const { closeButton, intlClose, heading, closable } = this;
572
+ 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;
573
+ }
574
+ renderHeader() {
575
+ const { heading, headingLevel } = this;
576
+ const headingNode = heading ? (h(Heading, { class: CSS.heading, level: headingLevel || HEADING_LEVEL }, heading)) : null;
577
+ return headingNode ? (h("div", { class: CSS.header }, headingNode, this.renderCloseButton())) : null;
578
+ }
579
+ render() {
580
+ const { effectiveReferenceElement, heading, label, open, disablePointer } = this;
581
+ const displayed = effectiveReferenceElement && open;
582
+ const hidden = !displayed;
583
+ const arrowNode = !disablePointer ? h("div", { class: CSS.arrow, ref: this.storeArrowEl }) : null;
584
+ return (h(Host, { "aria-hidden": toAriaBoolean(hidden), "aria-label": label, "aria-live": "polite", "calcite-hydrated-hidden": hidden, id: this.getId(), role: "dialog" }, h("div", { class: {
585
+ [FloatingCSS.animation]: true,
586
+ [FloatingCSS.animationActive]: displayed
587
+ }, ref: this.setTransitionEl }, arrowNode, h("div", { class: {
588
+ [CSS.hasHeader]: !!heading,
589
+ [CSS.container]: true
590
+ } }, this.renderHeader(), h("div", { class: CSS.content }, h("slot", null)), !heading ? this.renderCloseButton() : null))));
250
591
  }
251
592
  get el() { return getElement(this); }
593
+ static get watchers() { return {
594
+ "dismissible": ["handleDismissible"],
595
+ "closable": ["handleClosable"],
596
+ "flipPlacements": ["flipPlacementsHandler"],
597
+ "offsetDistance": ["offsetDistanceOffsetHandler"],
598
+ "offsetSkidding": ["offsetSkiddingHandler"],
599
+ "open": ["openHandler"],
600
+ "overlayPositioning": ["overlayPositioningHandler"],
601
+ "placement": ["placementHandler"],
602
+ "referenceElement": ["referenceElementHandler"]
603
+ }; }
252
604
  };
253
- Loader.style = loaderCss;
605
+ Popover.style = popoverCss;
254
606
 
255
- export { Action as calcite_action, Loader as calcite_loader };
607
+ export { Action as calcite_action, Popover as calcite_popover };
256
608
 
257
609
  //# sourceMappingURL=calcite-action_2.entry.js.map