@esri/solutions-components 0.2.2 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
@@ -11,15 +11,20 @@ const index = require('./index-a86078a0.js');
11
11
  const observers = require('./observers-5311faf8.js');
12
12
  const interactive = require('./interactive-0a68ab99.js');
13
13
  const dom = require('./dom-4a580af6.js');
14
+ const floatingUi = require('./floating-ui-ca1bcead.js');
14
15
  const guid = require('./guid-84ac4d91.js');
16
+ const openCloseComponent = require('./openCloseComponent-bf986132.js');
17
+ const Heading = require('./Heading-6b7b374c.js');
18
+ const key = require('./key-55aca5c0.js');
15
19
  require('./resources-b56bce71.js');
20
+ require('./debounce-69c3bada.js');
16
21
 
17
22
  /*!
18
23
  * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
19
24
  * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
20
25
  * v1.0.0-beta.97
21
26
  */
22
- const CSS = {
27
+ const CSS$1 = {
23
28
  button: "button",
24
29
  buttonTextVisible: "button--text-visible",
25
30
  buttonCompact: "button--compact",
@@ -29,7 +34,7 @@ const CSS = {
29
34
  textContainer: "text-container",
30
35
  textContainerVisible: "text-container--visible"
31
36
  };
32
- const TEXT = {
37
+ const TEXT$1 = {
33
38
  loading: "Loading"
34
39
  };
35
40
  const SLOTS = {
@@ -70,7 +75,7 @@ const Action = class {
70
75
  *
71
76
  * @default "Loading"
72
77
  */
73
- this.intlLoading = TEXT.loading;
78
+ this.intlLoading = TEXT$1.loading;
74
79
  /**
75
80
  * When `true`, a busy indicator is displayed.
76
81
  */
@@ -140,8 +145,8 @@ const Action = class {
140
145
  renderTextContainer() {
141
146
  const { text, textEnabled } = this;
142
147
  const textContainerClasses = {
143
- [CSS.textContainer]: true,
144
- [CSS.textContainerVisible]: textEnabled
148
+ [CSS$1.textContainer]: true,
149
+ [CSS$1.textContainerVisible]: textEnabled
145
150
  };
146
151
  return text ? (index.h("div", { class: textContainerClasses, key: "text-container" }, text)) : null;
147
152
  }
@@ -155,18 +160,18 @@ const Action = class {
155
160
  const iconNode = calciteLoaderNode || calciteIconNode;
156
161
  const hasIconToDisplay = iconNode || ((_a = el.children) === null || _a === void 0 ? void 0 : _a.length);
157
162
  const slotContainerNode = (index.h("div", { class: {
158
- [CSS.slotContainer]: true,
159
- [CSS.slotContainerHidden]: loading
163
+ [CSS$1.slotContainer]: true,
164
+ [CSS$1.slotContainerHidden]: loading
160
165
  } }, index.h("slot", null)));
161
- return hasIconToDisplay ? (index.h("div", { "aria-hidden": "true", class: CSS.iconContainer, key: "icon-container" }, iconNode, slotContainerNode)) : null;
166
+ return hasIconToDisplay ? (index.h("div", { "aria-hidden": "true", class: CSS$1.iconContainer, key: "icon-container" }, iconNode, slotContainerNode)) : null;
162
167
  }
163
168
  render() {
164
169
  const { compact, disabled, loading, textEnabled, label, text } = this;
165
170
  const ariaLabel = label || text;
166
171
  const buttonClasses = {
167
- [CSS.button]: true,
168
- [CSS.buttonTextVisible]: textEnabled,
169
- [CSS.buttonCompact]: compact
172
+ [CSS$1.button]: true,
173
+ [CSS$1.buttonTextVisible]: textEnabled,
174
+ [CSS$1.buttonCompact]: compact
170
175
  };
171
176
  return (index.h(index.Host, { onClick: this.calciteActionClickHandler }, index.h("button", { "aria-busy": dom.toAriaBoolean(loading), "aria-disabled": dom.toAriaBoolean(disabled), "aria-label": ariaLabel, class: buttonClasses, disabled: disabled, ref: (buttonEl) => (this.buttonEl = buttonEl) }, this.renderIconContainer(), this.renderTextContainer()), index.h("slot", { name: SLOTS.tooltip, onSlotchange: this.handleTooltipSlotChange })));
172
177
  }
@@ -174,89 +179,436 @@ const Action = class {
174
179
  };
175
180
  Action.style = actionCss;
176
181
 
177
- 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)}}";
182
+ /*!
183
+ * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
184
+ * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
185
+ * v1.0.0-beta.97
186
+ */
187
+ const CSS = {
188
+ container: "container",
189
+ arrow: "arrow",
190
+ imageContainer: "image-container",
191
+ closeButtonContainer: "close-button-container",
192
+ closeButton: "close-button",
193
+ content: "content",
194
+ hasHeader: "has-header",
195
+ header: "header",
196
+ headerContent: "header-content",
197
+ heading: "heading"
198
+ };
199
+ const TEXT = {
200
+ close: "Close"
201
+ };
202
+ const defaultPopoverPlacement = "auto";
203
+ const ARIA_CONTROLS = "aria-controls";
204
+ const ARIA_EXPANDED = "aria-expanded";
205
+ const HEADING_LEVEL = 2;
178
206
 
179
- const Loader = class {
207
+ /*!
208
+ * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
209
+ * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
210
+ * v1.0.0-beta.97
211
+ */
212
+ class PopoverManager {
213
+ constructor() {
214
+ // --------------------------------------------------------------------------
215
+ //
216
+ // Private Properties
217
+ //
218
+ // --------------------------------------------------------------------------
219
+ this.registeredElements = new Map();
220
+ this.registeredElementCount = 0;
221
+ // --------------------------------------------------------------------------
222
+ //
223
+ // Private Methods
224
+ //
225
+ // --------------------------------------------------------------------------
226
+ this.queryPopover = (composedPath) => {
227
+ const { registeredElements } = this;
228
+ const registeredElement = composedPath.find((pathEl) => registeredElements.has(pathEl));
229
+ return registeredElements.get(registeredElement);
230
+ };
231
+ this.togglePopovers = (event) => {
232
+ const composedPath = event.composedPath();
233
+ const togglePopover = this.queryPopover(composedPath);
234
+ if (togglePopover && !togglePopover.triggerDisabled) {
235
+ togglePopover.toggle();
236
+ }
237
+ Array.from(this.registeredElements.values())
238
+ .filter((popover) => popover !== togglePopover && popover.autoClose && popover.open && !composedPath.includes(popover))
239
+ .forEach((popover) => popover.toggle(false));
240
+ };
241
+ this.keyHandler = (event) => {
242
+ if (event.defaultPrevented || !key.isActivationKey(event.key)) {
243
+ return;
244
+ }
245
+ this.togglePopovers(event);
246
+ };
247
+ this.clickHandler = (event) => {
248
+ if (dom.isPrimaryPointerButton(event)) {
249
+ this.togglePopovers(event);
250
+ }
251
+ };
252
+ }
253
+ // --------------------------------------------------------------------------
254
+ //
255
+ // Public Methods
256
+ //
257
+ // --------------------------------------------------------------------------
258
+ registerElement(referenceEl, popover) {
259
+ this.registeredElementCount++;
260
+ this.registeredElements.set(referenceEl, popover);
261
+ if (this.registeredElementCount === 1) {
262
+ this.addListeners();
263
+ }
264
+ }
265
+ unregisterElement(referenceEl) {
266
+ if (this.registeredElements.delete(referenceEl)) {
267
+ this.registeredElementCount--;
268
+ }
269
+ if (this.registeredElementCount === 0) {
270
+ this.removeListeners();
271
+ }
272
+ }
273
+ addListeners() {
274
+ document.addEventListener("pointerdown", this.clickHandler, { capture: true });
275
+ document.addEventListener("keydown", this.keyHandler, { capture: true });
276
+ }
277
+ removeListeners() {
278
+ document.removeEventListener("pointerdown", this.clickHandler, { capture: true });
279
+ document.removeEventListener("keydown", this.keyHandler, { capture: true });
280
+ }
281
+ }
282
+
283
+ 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%}";
284
+
285
+ const manager = new PopoverManager();
286
+ const Popover = class {
180
287
  constructor(hostRef) {
181
288
  index.registerInstance(this, hostRef);
182
- //--------------------------------------------------------------------------
289
+ this.calcitePopoverBeforeClose = index.createEvent(this, "calcitePopoverBeforeClose", 6);
290
+ this.calcitePopoverClose = index.createEvent(this, "calcitePopoverClose", 6);
291
+ this.calcitePopoverBeforeOpen = index.createEvent(this, "calcitePopoverBeforeOpen", 6);
292
+ this.calcitePopoverOpen = index.createEvent(this, "calcitePopoverOpen", 6);
293
+ // --------------------------------------------------------------------------
183
294
  //
184
295
  // Properties
185
296
  //
186
- //--------------------------------------------------------------------------
187
- /** When `true`, the component is active. */
188
- this.active = false;
189
- /** When `true`, displays smaller and appears to the left of the text. */
190
- this.inline = false;
191
- /** Specifies the size of the component. */
192
- this.scale = "m";
193
- /** The component's value. Valid only for `"determinate"` indicators. Percent complete of 100. */
194
- this.value = 0;
195
- /** Text that displays under the component's indicator. */
196
- this.text = "";
297
+ // --------------------------------------------------------------------------
298
+ /**
299
+ * When `true`, clicking outside of the component automatically closes open `calcite-popover`s.
300
+ */
301
+ this.autoClose = false;
302
+ /**
303
+ * When `true`, a close button is added to the component.
304
+ *
305
+ * @deprecated use dismissible instead.
306
+ */
307
+ this.closeButton = false;
308
+ /**
309
+ * When `true`, a close button is added to the component.
310
+ *
311
+ * @deprecated use `closable` instead.
312
+ */
313
+ this.dismissible = false;
314
+ /** When `true`, display a close button within the component. */
315
+ this.closable = false;
316
+ /**
317
+ * When `true`, prevents flipping the component's placement when overlapping its `referenceElement`.
318
+ */
319
+ this.disableFlip = false;
320
+ /**
321
+ * When `true`, removes the caret pointer.
322
+ */
323
+ this.disablePointer = false;
197
324
  /**
198
- * Disables spacing around the component.
325
+ * Offsets the position of the component away from the `referenceElement`.
199
326
  *
200
- * @deprecated Use `--calcite-loader-padding` CSS variable instead.
327
+ * @default 6
328
+ */
329
+ this.offsetDistance = floatingUi.defaultOffsetDistance;
330
+ /**
331
+ * Offsets the position of the component along the `referenceElement`.
201
332
  */
202
- this.noPadding = false;
333
+ this.offsetSkidding = 0;
334
+ /**
335
+ * When `true`, displays and positions the component.
336
+ */
337
+ this.open = false;
338
+ /**
339
+ * Determines the type of positioning to use for the overlaid content.
340
+ *
341
+ * Using `"absolute"` will work for most cases. The component will be positioned inside of overflowing parent containers and will affect the container's layout.
342
+ *
343
+ * `"fixed"` value should be used to escape an overflowing parent container, or when the reference element's `position` CSS property is `"fixed"`.
344
+ *
345
+ */
346
+ this.overlayPositioning = "absolute";
347
+ /**
348
+ * Determines where the component will be positioned relative to the `referenceElement`.
349
+ *
350
+ * @see [LogicalPlacement](https://github.com/Esri/calcite-components/blob/master/src/utils/floating-ui.ts#L25)
351
+ */
352
+ this.placement = defaultPopoverPlacement;
353
+ /**
354
+ * When `true`, disables automatically toggling the component when its `referenceElement` has been triggered.
355
+ *
356
+ * This property can be set to `true` to manage when the component is open.
357
+ */
358
+ this.triggerDisabled = false;
359
+ /**
360
+ * Accessible name for the component's close button.
361
+ *
362
+ * @default "Close"
363
+ */
364
+ this.intlClose = TEXT.close;
365
+ this.guid = `calcite-popover-${guid.guid()}`;
366
+ this.openTransitionProp = "opacity";
367
+ this.hasLoaded = false;
368
+ // --------------------------------------------------------------------------
369
+ //
370
+ // Private Methods
371
+ //
372
+ // --------------------------------------------------------------------------
373
+ this.setTransitionEl = (el) => {
374
+ this.transitionEl = el;
375
+ openCloseComponent.connectOpenCloseComponent(this);
376
+ };
377
+ this.setFilteredPlacements = () => {
378
+ const { el, flipPlacements } = this;
379
+ this.filteredFlipPlacements = flipPlacements
380
+ ? floatingUi.filterComputedPlacements(flipPlacements, el)
381
+ : null;
382
+ };
383
+ this.setUpReferenceElement = (warn = true) => {
384
+ this.removeReferences();
385
+ this.effectiveReferenceElement = this.getReferenceElement();
386
+ floatingUi.connectFloatingUI(this, this.effectiveReferenceElement, this.el);
387
+ const { el, referenceElement, effectiveReferenceElement } = this;
388
+ if (warn && referenceElement && !effectiveReferenceElement) {
389
+ console.warn(`${el.tagName}: reference-element id "${referenceElement}" was not found.`, {
390
+ el
391
+ });
392
+ }
393
+ this.addReferences();
394
+ };
395
+ this.getId = () => {
396
+ return this.el.id || this.guid;
397
+ };
398
+ this.setExpandedAttr = () => {
399
+ const { effectiveReferenceElement, open } = this;
400
+ if (!effectiveReferenceElement) {
401
+ return;
402
+ }
403
+ if ("setAttribute" in effectiveReferenceElement) {
404
+ effectiveReferenceElement.setAttribute(ARIA_EXPANDED, dom.toAriaBoolean(open));
405
+ }
406
+ };
407
+ this.addReferences = () => {
408
+ const { effectiveReferenceElement } = this;
409
+ if (!effectiveReferenceElement) {
410
+ return;
411
+ }
412
+ const id = this.getId();
413
+ if ("setAttribute" in effectiveReferenceElement) {
414
+ effectiveReferenceElement.setAttribute(ARIA_CONTROLS, id);
415
+ }
416
+ manager.registerElement(effectiveReferenceElement, this.el);
417
+ this.setExpandedAttr();
418
+ };
419
+ this.removeReferences = () => {
420
+ const { effectiveReferenceElement } = this;
421
+ if (!effectiveReferenceElement) {
422
+ return;
423
+ }
424
+ if ("removeAttribute" in effectiveReferenceElement) {
425
+ effectiveReferenceElement.removeAttribute(ARIA_CONTROLS);
426
+ effectiveReferenceElement.removeAttribute(ARIA_EXPANDED);
427
+ }
428
+ manager.unregisterElement(effectiveReferenceElement);
429
+ };
430
+ this.hide = () => {
431
+ this.open = false;
432
+ };
433
+ this.storeArrowEl = (el) => {
434
+ this.arrowEl = el;
435
+ this.reposition(true);
436
+ };
203
437
  }
204
- //--------------------------------------------------------------------------
438
+ handleDismissible(value) {
439
+ this.closable = value;
440
+ }
441
+ handleClosable(value) {
442
+ this.dismissible = value;
443
+ }
444
+ flipPlacementsHandler() {
445
+ this.setFilteredPlacements();
446
+ this.reposition(true);
447
+ }
448
+ offsetDistanceOffsetHandler() {
449
+ this.reposition(true);
450
+ }
451
+ offsetSkiddingHandler() {
452
+ this.reposition(true);
453
+ }
454
+ openHandler(value) {
455
+ if (value) {
456
+ this.reposition(true);
457
+ }
458
+ else {
459
+ floatingUi.updateAfterClose(this.el);
460
+ }
461
+ this.setExpandedAttr();
462
+ }
463
+ overlayPositioningHandler() {
464
+ this.reposition(true);
465
+ }
466
+ placementHandler() {
467
+ this.reposition(true);
468
+ }
469
+ referenceElementHandler() {
470
+ this.setUpReferenceElement();
471
+ this.reposition(true);
472
+ }
473
+ // --------------------------------------------------------------------------
205
474
  //
206
475
  // Lifecycle
207
476
  //
208
- //--------------------------------------------------------------------------
209
- render() {
210
- const { el, inline, label, scale, text, type, value } = this;
211
- const id = el.id || guid.guid();
212
- const radiusRatio = 0.45;
213
- const size = inline ? this.getInlineSize(scale) : this.getSize(scale);
214
- const radius = size * radiusRatio;
215
- const viewbox = `0 0 ${size} ${size}`;
216
- const isDeterminate = type === "determinate";
217
- const circumference = 2 * radius * Math.PI;
218
- const progress = (value / 100) * circumference;
219
- const remaining = circumference - progress;
220
- const valueNow = Math.floor(value);
221
- const hostAttributes = {
222
- "aria-valuenow": valueNow,
223
- "aria-valuemin": 0,
224
- "aria-valuemax": 100,
225
- complete: valueNow === 100
226
- };
227
- const svgAttributes = { r: radius, cx: size / 2, cy: size / 2 };
228
- const determinateStyle = { "stroke-dasharray": `${progress} ${remaining}` };
229
- return (index.h(index.Host, Object.assign({ "aria-label": label, id: id, role: "progressbar" }, (isDeterminate ? hostAttributes : {})), index.h("div", { class: "loader__svgs" }, index.h("svg", { class: "loader__svg loader__svg--1", viewBox: viewbox }, index.h("circle", Object.assign({}, svgAttributes))), index.h("svg", { class: "loader__svg loader__svg--2", viewBox: viewbox }, index.h("circle", Object.assign({}, svgAttributes))), index.h("svg", Object.assign({ class: "loader__svg loader__svg--3", viewBox: viewbox }, (isDeterminate ? { style: determinateStyle } : {})), index.h("circle", Object.assign({}, svgAttributes)))), text && index.h("div", { class: "loader__text" }, text), isDeterminate && index.h("div", { class: "loader__percentage" }, value)));
477
+ // --------------------------------------------------------------------------
478
+ connectedCallback() {
479
+ this.setFilteredPlacements();
480
+ openCloseComponent.connectOpenCloseComponent(this);
481
+ const closable = this.closable || this.dismissible;
482
+ if (closable) {
483
+ this.handleDismissible(closable);
484
+ }
485
+ if (closable) {
486
+ this.handleClosable(closable);
487
+ }
488
+ this.setUpReferenceElement(this.hasLoaded);
230
489
  }
231
- //--------------------------------------------------------------------------
490
+ componentDidLoad() {
491
+ if (this.referenceElement && !this.effectiveReferenceElement) {
492
+ this.setUpReferenceElement();
493
+ }
494
+ this.reposition();
495
+ this.hasLoaded = true;
496
+ }
497
+ disconnectedCallback() {
498
+ this.removeReferences();
499
+ floatingUi.disconnectFloatingUI(this, this.effectiveReferenceElement, this.el);
500
+ openCloseComponent.disconnectOpenCloseComponent(this);
501
+ }
502
+ // --------------------------------------------------------------------------
232
503
  //
233
- // Private Methods
504
+ // Public Methods
234
505
  //
235
- //--------------------------------------------------------------------------
506
+ // --------------------------------------------------------------------------
507
+ /**
508
+ * Updates the position of the component.
509
+ *
510
+ * @param delayed
511
+ */
512
+ async reposition(delayed = false) {
513
+ const { el, effectiveReferenceElement, placement, overlayPositioning, disableFlip, filteredFlipPlacements, offsetDistance, offsetSkidding, arrowEl } = this;
514
+ return floatingUi.reposition(this, {
515
+ floatingEl: el,
516
+ referenceEl: effectiveReferenceElement,
517
+ overlayPositioning,
518
+ placement,
519
+ disableFlip,
520
+ flipPlacements: filteredFlipPlacements,
521
+ offsetDistance,
522
+ offsetSkidding,
523
+ includeArrow: !this.disablePointer,
524
+ arrowEl,
525
+ type: "popover"
526
+ }, delayed);
527
+ }
528
+ /**
529
+ * Sets focus on the component.
530
+ *
531
+ * @param focusId
532
+ */
533
+ async setFocus(focusId) {
534
+ var _a;
535
+ const { closeButtonEl } = this;
536
+ if (focusId === "close-button" && closeButtonEl) {
537
+ index.forceUpdate(closeButtonEl);
538
+ closeButtonEl.setFocus();
539
+ return;
540
+ }
541
+ (_a = this.el) === null || _a === void 0 ? void 0 : _a.focus();
542
+ }
236
543
  /**
237
- * Return the proper sizes based on the scale property
544
+ * Toggles the component's open property.
238
545
  *
239
- * @param scale
546
+ * @param value
240
547
  */
241
- getSize(scale) {
242
- return {
243
- s: 32,
244
- m: 56,
245
- l: 80
246
- }[scale];
247
- }
248
- getInlineSize(scale) {
249
- return {
250
- s: 12,
251
- m: 16,
252
- l: 20
253
- }[scale];
548
+ async toggle(value = !this.open) {
549
+ this.open = value;
550
+ }
551
+ getReferenceElement() {
552
+ const { referenceElement, el } = this;
553
+ return ((typeof referenceElement === "string"
554
+ ? dom.queryElementRoots(el, { id: referenceElement })
555
+ : referenceElement) || null);
556
+ }
557
+ onBeforeOpen() {
558
+ this.calcitePopoverBeforeOpen.emit();
559
+ }
560
+ onOpen() {
561
+ this.calcitePopoverOpen.emit();
562
+ }
563
+ onBeforeClose() {
564
+ this.calcitePopoverBeforeClose.emit();
565
+ }
566
+ onClose() {
567
+ this.calcitePopoverClose.emit();
568
+ }
569
+ // --------------------------------------------------------------------------
570
+ //
571
+ // Render Methods
572
+ //
573
+ // --------------------------------------------------------------------------
574
+ renderCloseButton() {
575
+ const { closeButton, intlClose, heading, closable } = this;
576
+ return closable || closeButton ? (index.h("div", { class: CSS.closeButtonContainer }, index.h("calcite-action", { class: CSS.closeButton, onClick: this.hide, ref: (closeButtonEl) => (this.closeButtonEl = closeButtonEl), scale: heading ? "s" : "m", text: intlClose }, index.h("calcite-icon", { icon: "x", scale: heading ? "s" : "m" })))) : null;
577
+ }
578
+ renderHeader() {
579
+ const { heading, headingLevel } = this;
580
+ const headingNode = heading ? (index.h(Heading.Heading, { class: CSS.heading, level: headingLevel || HEADING_LEVEL }, heading)) : null;
581
+ return headingNode ? (index.h("div", { class: CSS.header }, headingNode, this.renderCloseButton())) : null;
582
+ }
583
+ render() {
584
+ const { effectiveReferenceElement, heading, label, open, disablePointer } = this;
585
+ const displayed = effectiveReferenceElement && open;
586
+ const hidden = !displayed;
587
+ const arrowNode = !disablePointer ? index.h("div", { class: CSS.arrow, ref: this.storeArrowEl }) : null;
588
+ return (index.h(index.Host, { "aria-hidden": dom.toAriaBoolean(hidden), "aria-label": label, "aria-live": "polite", "calcite-hydrated-hidden": hidden, id: this.getId(), role: "dialog" }, index.h("div", { class: {
589
+ [floatingUi.FloatingCSS.animation]: true,
590
+ [floatingUi.FloatingCSS.animationActive]: displayed
591
+ }, ref: this.setTransitionEl }, arrowNode, index.h("div", { class: {
592
+ [CSS.hasHeader]: !!heading,
593
+ [CSS.container]: true
594
+ } }, this.renderHeader(), index.h("div", { class: CSS.content }, index.h("slot", null)), !heading ? this.renderCloseButton() : null))));
254
595
  }
255
596
  get el() { return index.getElement(this); }
597
+ static get watchers() { return {
598
+ "dismissible": ["handleDismissible"],
599
+ "closable": ["handleClosable"],
600
+ "flipPlacements": ["flipPlacementsHandler"],
601
+ "offsetDistance": ["offsetDistanceOffsetHandler"],
602
+ "offsetSkidding": ["offsetSkiddingHandler"],
603
+ "open": ["openHandler"],
604
+ "overlayPositioning": ["overlayPositioningHandler"],
605
+ "placement": ["placementHandler"],
606
+ "referenceElement": ["referenceElementHandler"]
607
+ }; }
256
608
  };
257
- Loader.style = loaderCss;
609
+ Popover.style = popoverCss;
258
610
 
259
611
  exports.calcite_action = Action;
260
- exports.calcite_loader = Loader;
612
+ exports.calcite_popover = Popover;
261
613
 
262
614
  //# sourceMappingURL=calcite-action_2.cjs.entry.js.map