@esri/calcite-components 1.0.0-next.362 → 1.0.0-next.366

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 (242) hide show
  1. package/dist/calcite/calcite.esm.js +1 -1
  2. package/dist/calcite/p-0282fd8b.system.entry.js +5 -0
  3. package/dist/calcite/p-050ff462.entry.js +5 -0
  4. package/dist/calcite/p-05b03971.system.entry.js +5 -0
  5. package/dist/calcite/p-08847812.entry.js +5 -0
  6. package/dist/calcite/p-1bcce6c9.entry.js +5 -0
  7. package/dist/calcite/p-1ef9235e.system.entry.js +5 -0
  8. package/dist/calcite/p-25ed6059.entry.js +5 -0
  9. package/dist/calcite/p-26fd946c.entry.js +5 -0
  10. package/dist/calcite/{p-0b0ce9b2.system.entry.js → p-3280f0ac.system.entry.js} +1 -1
  11. package/dist/calcite/p-409d0a3f.entry.js +5 -0
  12. package/dist/calcite/p-40cbbd20.entry.js +5 -0
  13. package/dist/calcite/p-4347fde9.system.entry.js +5 -0
  14. package/dist/calcite/p-43cd4b9b.entry.js +5 -0
  15. package/dist/calcite/p-55e2658e.entry.js +5 -0
  16. package/dist/calcite/p-5682a918.entry.js +5 -0
  17. package/dist/calcite/p-597b782e.system.entry.js +5 -0
  18. package/dist/calcite/p-60e4f404.entry.js +5 -0
  19. package/dist/calcite/p-660c8077.js +5 -0
  20. package/dist/calcite/p-7279ccf9.entry.js +5 -0
  21. package/dist/calcite/p-7ed5b78e.system.entry.js +5 -0
  22. package/dist/calcite/p-832d7f68.system.entry.js +5 -0
  23. package/dist/calcite/p-888a152c.system.entry.js +5 -0
  24. package/dist/calcite/p-946c3bed.system.entry.js +5 -0
  25. package/dist/calcite/p-94717214.entry.js +5 -0
  26. package/dist/calcite/p-953259af.entry.js +5 -0
  27. package/dist/calcite/p-99d32fc3.system.js +1 -1
  28. package/dist/calcite/p-9b723fdd.system.entry.js +5 -0
  29. package/dist/calcite/p-9bfe6679.system.entry.js +5 -0
  30. package/dist/calcite/p-9f349c92.entry.js +5 -0
  31. package/dist/calcite/p-9fe77a88.system.entry.js +5 -0
  32. package/dist/calcite/p-a52288cd.system.entry.js +5 -0
  33. package/dist/calcite/p-a71d17b4.entry.js +5 -0
  34. package/dist/calcite/p-aea7c650.system.entry.js +5 -0
  35. package/dist/calcite/p-af7ed41f.system.entry.js +5 -0
  36. package/dist/calcite/p-b14e0be5.system.entry.js +5 -0
  37. package/dist/calcite/p-b53b28e3.system.js +5 -0
  38. package/dist/calcite/p-b88d7391.entry.js +5 -0
  39. package/dist/calcite/p-ba000c59.entry.js +5 -0
  40. package/dist/calcite/p-ba915998.entry.js +5 -0
  41. package/dist/calcite/p-cf2be87e.entry.js +5 -0
  42. package/dist/calcite/p-dd4457cd.entry.js +5 -0
  43. package/dist/calcite/p-eff2fb8c.system.entry.js +5 -0
  44. package/dist/calcite/p-f4614b28.system.entry.js +5 -0
  45. package/dist/calcite/{p-8b145872.system.entry.js → p-f94619be.system.entry.js} +1 -1
  46. package/dist/calcite/p-fd57beb5.system.entry.js +5 -0
  47. package/dist/cjs/calcite-action-bar.cjs.entry.js +3 -24
  48. package/dist/cjs/calcite-action-group.cjs.entry.js +13 -0
  49. package/dist/cjs/calcite-action-menu.cjs.entry.js +3 -0
  50. package/dist/cjs/calcite-action-pad.cjs.entry.js +8 -0
  51. package/dist/cjs/calcite-alert.cjs.entry.js +15 -9
  52. package/dist/cjs/calcite-block_2.cjs.entry.js +14 -1
  53. package/dist/cjs/calcite-chip.cjs.entry.js +14 -1
  54. package/dist/cjs/calcite-combobox_3.cjs.entry.js +22 -11
  55. package/dist/cjs/calcite-graph_2.cjs.entry.js +15 -8
  56. package/dist/cjs/calcite-inline-editable.cjs.entry.js +5 -5
  57. package/dist/cjs/calcite-input.cjs.entry.js +3 -0
  58. package/dist/cjs/calcite-list_3.cjs.entry.js +13 -0
  59. package/dist/cjs/calcite-modal.cjs.entry.js +5 -2
  60. package/dist/cjs/calcite-notice.cjs.entry.js +8 -0
  61. package/dist/cjs/calcite-panel.cjs.entry.js +18 -12
  62. package/dist/cjs/calcite-pick-list_3.cjs.entry.js +23 -0
  63. package/dist/cjs/calcite-shell_3.cjs.entry.js +35 -7
  64. package/dist/cjs/calcite-tile.cjs.entry.js +13 -0
  65. package/dist/cjs/calcite-tip_3.cjs.entry.js +13 -1
  66. package/dist/cjs/calcite-tree_2.cjs.entry.js +6 -0
  67. package/dist/cjs/calcite-value-list_2.cjs.entry.js +12 -0
  68. package/dist/cjs/calcite.cjs.js +1 -1
  69. package/dist/cjs/conditionalSlot-e874fbb0.js +43 -0
  70. package/dist/cjs/loader.cjs.js +1 -1
  71. package/dist/collection/components/calcite-action-group/calcite-action-group.js +12 -0
  72. package/dist/collection/components/calcite-action-menu/calcite-action-menu.js +3 -0
  73. package/dist/collection/components/calcite-action-pad/calcite-action-pad.js +7 -0
  74. package/dist/collection/components/calcite-alert/calcite-alert.js +15 -9
  75. package/dist/collection/components/calcite-block/calcite-block.js +13 -1
  76. package/dist/collection/components/calcite-chip/calcite-chip.js +13 -1
  77. package/dist/collection/components/calcite-combobox/calcite-combobox.js +42 -13
  78. package/dist/collection/components/calcite-combobox/resources.js +3 -0
  79. package/dist/collection/components/calcite-graph/calcite-graph.css +3 -5
  80. package/dist/collection/components/calcite-graph/calcite-graph.js +13 -42
  81. package/dist/collection/components/calcite-inline-editable/calcite-inline-editable.js +15 -21
  82. package/dist/collection/components/calcite-input/calcite-input.js +3 -0
  83. package/dist/collection/components/calcite-list-item/calcite-list-item.js +12 -0
  84. package/dist/collection/components/calcite-modal/calcite-modal.js +5 -2
  85. package/dist/collection/components/calcite-notice/calcite-notice.js +7 -0
  86. package/dist/collection/components/calcite-panel/calcite-panel.js +19 -14
  87. package/dist/collection/components/calcite-pick-list-group/calcite-pick-list-group.js +12 -0
  88. package/dist/collection/components/calcite-pick-list-item/calcite-pick-list-item.js +12 -0
  89. package/dist/collection/components/calcite-shell/calcite-shell.js +14 -2
  90. package/dist/collection/components/calcite-shell-center-row/calcite-shell-center-row.js +13 -1
  91. package/dist/collection/components/calcite-shell-panel/calcite-shell-panel.js +9 -4
  92. package/dist/collection/components/calcite-slider/calcite-slider.css +1 -0
  93. package/dist/collection/components/calcite-slider/calcite-slider.js +1 -2
  94. package/dist/collection/components/calcite-tile/calcite-tile.js +12 -0
  95. package/dist/collection/components/calcite-tip/calcite-tip.js +13 -1
  96. package/dist/collection/components/calcite-tree-item/calcite-tree-item.js +5 -0
  97. package/dist/collection/components/calcite-value-list-item/calcite-value-list-item.js +12 -0
  98. package/dist/collection/utils/conditionalSlot.js +22 -11
  99. package/dist/components/calcite-action-bar.js +2 -23
  100. package/dist/components/calcite-action-group2.js +12 -0
  101. package/dist/components/calcite-action-menu2.js +3 -0
  102. package/dist/components/calcite-action-pad.js +7 -0
  103. package/dist/components/calcite-alert.js +15 -9
  104. package/dist/components/calcite-block.js +13 -1
  105. package/dist/components/calcite-chip2.js +13 -1
  106. package/dist/components/calcite-combobox.js +21 -12
  107. package/dist/components/calcite-graph2.js +14 -9
  108. package/dist/components/calcite-inline-editable.js +5 -5
  109. package/dist/components/calcite-input2.js +3 -0
  110. package/dist/components/calcite-list-item.js +12 -0
  111. package/dist/components/calcite-modal.js +5 -2
  112. package/dist/components/calcite-notice.js +7 -0
  113. package/dist/components/calcite-panel.js +17 -12
  114. package/dist/components/calcite-pick-list-group.js +12 -0
  115. package/dist/components/calcite-pick-list-item2.js +12 -0
  116. package/dist/components/calcite-shell-center-row.js +13 -1
  117. package/dist/components/calcite-shell-panel.js +9 -4
  118. package/dist/components/calcite-shell.js +14 -2
  119. package/dist/components/calcite-slider.js +2 -2
  120. package/dist/components/calcite-tile2.js +12 -0
  121. package/dist/components/calcite-tip.js +13 -1
  122. package/dist/components/calcite-tree-item.js +5 -0
  123. package/dist/components/calcite-value-list-item.js +12 -0
  124. package/dist/components/conditionalSlot.js +40 -0
  125. package/dist/components/utils2.js +4 -1
  126. package/dist/custom-elements/index.js +306 -121
  127. package/dist/esm/calcite-action-bar.entry.js +2 -23
  128. package/dist/esm/calcite-action-group.entry.js +13 -0
  129. package/dist/esm/calcite-action-menu.entry.js +3 -0
  130. package/dist/esm/calcite-action-pad.entry.js +8 -0
  131. package/dist/esm/calcite-alert.entry.js +15 -9
  132. package/dist/esm/calcite-block_2.entry.js +14 -1
  133. package/dist/esm/calcite-chip.entry.js +14 -1
  134. package/dist/esm/calcite-combobox_3.entry.js +22 -11
  135. package/dist/esm/calcite-graph_2.entry.js +16 -9
  136. package/dist/esm/calcite-inline-editable.entry.js +5 -5
  137. package/dist/esm/calcite-input.entry.js +3 -0
  138. package/dist/esm/calcite-list_3.entry.js +13 -0
  139. package/dist/esm/calcite-modal.entry.js +5 -2
  140. package/dist/esm/calcite-notice.entry.js +8 -0
  141. package/dist/esm/calcite-panel.entry.js +18 -12
  142. package/dist/esm/calcite-pick-list_3.entry.js +23 -0
  143. package/dist/esm/calcite-shell_3.entry.js +35 -7
  144. package/dist/esm/calcite-tile.entry.js +13 -0
  145. package/dist/esm/calcite-tip_3.entry.js +13 -1
  146. package/dist/esm/calcite-tree_2.entry.js +6 -0
  147. package/dist/esm/calcite-value-list_2.entry.js +12 -0
  148. package/dist/esm/calcite.js +1 -1
  149. package/dist/esm/conditionalSlot-0c4ea23a.js +40 -0
  150. package/dist/esm/loader.js +1 -1
  151. package/dist/esm-es5/calcite-action-bar.entry.js +2 -2
  152. package/dist/esm-es5/calcite-action-group.entry.js +1 -1
  153. package/dist/esm-es5/calcite-action-menu.entry.js +2 -2
  154. package/dist/esm-es5/calcite-action-pad.entry.js +2 -2
  155. package/dist/esm-es5/calcite-alert.entry.js +1 -1
  156. package/dist/esm-es5/calcite-block_2.entry.js +1 -1
  157. package/dist/esm-es5/calcite-chip.entry.js +2 -2
  158. package/dist/esm-es5/calcite-combobox_3.entry.js +2 -2
  159. package/dist/esm-es5/calcite-graph_2.entry.js +1 -1
  160. package/dist/esm-es5/calcite-inline-editable.entry.js +2 -2
  161. package/dist/esm-es5/calcite-input.entry.js +1 -1
  162. package/dist/esm-es5/calcite-list_3.entry.js +1 -1
  163. package/dist/esm-es5/calcite-modal.entry.js +1 -1
  164. package/dist/esm-es5/calcite-notice.entry.js +2 -2
  165. package/dist/esm-es5/calcite-panel.entry.js +2 -2
  166. package/dist/esm-es5/calcite-pick-list_3.entry.js +1 -1
  167. package/dist/esm-es5/calcite-shell_3.entry.js +1 -1
  168. package/dist/esm-es5/calcite-tile.entry.js +1 -1
  169. package/dist/esm-es5/calcite-tip_3.entry.js +1 -1
  170. package/dist/esm-es5/calcite-tree_2.entry.js +1 -1
  171. package/dist/esm-es5/calcite-value-list_2.entry.js +1 -1
  172. package/dist/esm-es5/calcite.js +1 -1
  173. package/dist/esm-es5/conditionalSlot-0c4ea23a.js +5 -0
  174. package/dist/esm-es5/loader.js +1 -1
  175. package/dist/extras/docs-json.json +43 -36
  176. package/dist/types/components/calcite-action-group/calcite-action-group.d.ts +4 -1
  177. package/dist/types/components/calcite-action-menu/calcite-action-menu.d.ts +2 -1
  178. package/dist/types/components/calcite-action-pad/calcite-action-pad.d.ts +4 -1
  179. package/dist/types/components/calcite-alert/calcite-alert.d.ts +2 -0
  180. package/dist/types/components/calcite-block/calcite-block.d.ts +4 -1
  181. package/dist/types/components/calcite-chip/calcite-chip.d.ts +4 -1
  182. package/dist/types/components/calcite-combobox/calcite-combobox.d.ts +4 -0
  183. package/dist/types/components/calcite-combobox/resources.d.ts +3 -0
  184. package/dist/types/components/calcite-graph/calcite-graph.d.ts +3 -4
  185. package/dist/types/components/calcite-inline-editable/calcite-inline-editable.d.ts +5 -5
  186. package/dist/types/components/calcite-list-item/calcite-list-item.d.ts +4 -1
  187. package/dist/types/components/calcite-modal/calcite-modal.d.ts +2 -1
  188. package/dist/types/components/calcite-notice/calcite-notice.d.ts +4 -1
  189. package/dist/types/components/calcite-panel/calcite-panel.d.ts +5 -6
  190. package/dist/types/components/calcite-pick-list-group/calcite-pick-list-group.d.ts +4 -1
  191. package/dist/types/components/calcite-pick-list-item/calcite-pick-list-item.d.ts +4 -1
  192. package/dist/types/components/calcite-shell/calcite-shell.d.ts +4 -1
  193. package/dist/types/components/calcite-shell-center-row/calcite-shell-center-row.d.ts +4 -1
  194. package/dist/types/components/calcite-shell-panel/calcite-shell-panel.d.ts +3 -1
  195. package/dist/types/components/calcite-tile/calcite-tile.d.ts +4 -1
  196. package/dist/types/components/calcite-tip/calcite-tip.d.ts +4 -1
  197. package/dist/types/components/calcite-tree-item/calcite-tree-item.d.ts +3 -1
  198. package/dist/types/components/calcite-value-list-item/calcite-value-list-item.d.ts +4 -1
  199. package/dist/types/components.d.ts +18 -16
  200. package/dist/types/preact.d.ts +3 -3
  201. package/hydrate/index.js +305 -121
  202. package/package.json +11 -11
  203. package/dist/calcite/p-0af820bf.entry.js +0 -5
  204. package/dist/calcite/p-0cf878ed.system.entry.js +0 -5
  205. package/dist/calcite/p-1a5dae4a.entry.js +0 -5
  206. package/dist/calcite/p-1b3a66ec.system.entry.js +0 -5
  207. package/dist/calcite/p-1d7a9909.system.entry.js +0 -5
  208. package/dist/calcite/p-253efee4.entry.js +0 -5
  209. package/dist/calcite/p-2618de8a.entry.js +0 -5
  210. package/dist/calcite/p-273cd5ab.entry.js +0 -5
  211. package/dist/calcite/p-28adfebc.entry.js +0 -5
  212. package/dist/calcite/p-2a8938c7.system.entry.js +0 -5
  213. package/dist/calcite/p-2c954eaa.system.entry.js +0 -5
  214. package/dist/calcite/p-325fcd0d.entry.js +0 -5
  215. package/dist/calcite/p-37bddb73.system.entry.js +0 -5
  216. package/dist/calcite/p-3ab992ff.system.entry.js +0 -5
  217. package/dist/calcite/p-3b73b785.system.entry.js +0 -5
  218. package/dist/calcite/p-3b8f5ab8.system.entry.js +0 -5
  219. package/dist/calcite/p-4659df78.entry.js +0 -5
  220. package/dist/calcite/p-54e271c9.system.entry.js +0 -5
  221. package/dist/calcite/p-5df1936f.entry.js +0 -5
  222. package/dist/calcite/p-698167ac.entry.js +0 -5
  223. package/dist/calcite/p-7d355abe.system.entry.js +0 -5
  224. package/dist/calcite/p-85fb7bc0.entry.js +0 -5
  225. package/dist/calcite/p-8d36bc7c.entry.js +0 -5
  226. package/dist/calcite/p-8eafaf3f.entry.js +0 -5
  227. package/dist/calcite/p-9d81d229.entry.js +0 -5
  228. package/dist/calcite/p-a0043c61.entry.js +0 -5
  229. package/dist/calcite/p-a1f65f6e.entry.js +0 -5
  230. package/dist/calcite/p-a4dec1f6.system.entry.js +0 -5
  231. package/dist/calcite/p-a9c50960.system.entry.js +0 -5
  232. package/dist/calcite/p-aaed1677.entry.js +0 -5
  233. package/dist/calcite/p-ac778725.system.entry.js +0 -5
  234. package/dist/calcite/p-ac8cf248.entry.js +0 -5
  235. package/dist/calcite/p-b4d3f1c1.entry.js +0 -5
  236. package/dist/calcite/p-c0ed9eff.entry.js +0 -5
  237. package/dist/calcite/p-cb9cd28c.system.entry.js +0 -5
  238. package/dist/calcite/p-d578e568.system.entry.js +0 -5
  239. package/dist/calcite/p-e2ebc089.system.entry.js +0 -5
  240. package/dist/calcite/p-e564004a.system.entry.js +0 -5
  241. package/dist/calcite/p-f6fc151d.system.entry.js +0 -5
  242. package/dist/calcite/p-f73124d0.entry.js +0 -5
@@ -7,6 +7,7 @@ import { CSS, HEADING_LEVEL, ICONS, SLOTS, TEXT } from "./resources";
7
7
  import { getElementDir, getSlotted } from "../../utils/dom";
8
8
  import { CalciteHeading } from "../functional/CalciteHeading";
9
9
  import { SLOTS as ACTION_MENU_SLOTS } from "../calcite-action-menu/resources";
10
+ import { connectConditionalSlotComponent, disconnectConditionalSlotComponent } from "../../utils/conditionalSlot";
10
11
  /**
11
12
  * @slot - A slot for adding custom content.
12
13
  * @slot header-actions-start - A slot for adding actions or content to the start side of the panel header.
@@ -82,6 +83,17 @@ export class CalcitePanel {
82
83
  }
83
84
  // --------------------------------------------------------------------------
84
85
  //
86
+ // Lifecycle
87
+ //
88
+ // --------------------------------------------------------------------------
89
+ connectedCallback() {
90
+ connectConditionalSlotComponent(this);
91
+ }
92
+ disconnectedCallback() {
93
+ disconnectConditionalSlotComponent(this);
94
+ }
95
+ // --------------------------------------------------------------------------
96
+ //
85
97
  // Methods
86
98
  //
87
99
  // --------------------------------------------------------------------------
@@ -123,7 +135,7 @@ export class CalcitePanel {
123
135
  * Allows user to override the entire header-content node.
124
136
  */
125
137
  renderHeaderSlottedContent() {
126
- return (h("div", { class: CSS.headerContent, key: "header-content" },
138
+ return (h("div", { class: CSS.headerContent, key: "slotted-header-content" },
127
139
  h("slot", { name: SLOTS.headerContent })));
128
140
  }
129
141
  renderHeaderStartActions() {
@@ -145,7 +157,7 @@ export class CalcitePanel {
145
157
  renderMenu() {
146
158
  const { el, intlOptions, menuOpen } = this;
147
159
  const hasMenuItems = getSlotted(el, SLOTS.headerMenuActions);
148
- return hasMenuItems ? (h("calcite-action-menu", { flipPlacements: ["top", "bottom"], label: intlOptions || TEXT.options, open: menuOpen, placement: "bottom-end" },
160
+ return hasMenuItems ? (h("calcite-action-menu", { flipPlacements: ["top", "bottom"], key: "menu", label: intlOptions || TEXT.options, open: menuOpen, placement: "bottom-end" },
149
161
  h("calcite-action", { icon: ICONS.menu, slot: ACTION_MENU_SLOTS.trigger, text: intlOptions || TEXT.options }),
150
162
  h("slot", { name: SLOTS.headerMenuActions }))) : null;
151
163
  }
@@ -170,20 +182,13 @@ export class CalcitePanel {
170
182
  actionsNodeEnd,
171
183
  headerMenuNode)) : null;
172
184
  }
173
- /**
174
- * Allows user to override the entire footer node.
175
- */
176
- renderFooterSlottedContent() {
185
+ renderFooterNode() {
177
186
  const { el } = this;
178
187
  const hasFooterSlottedContent = getSlotted(el, SLOTS.footer);
179
- return hasFooterSlottedContent ? (h("footer", { class: CSS.footer },
180
- h("slot", { name: SLOTS.footer }))) : null;
181
- }
182
- renderFooterActions() {
183
- const { el } = this;
184
188
  const hasFooterActions = getSlotted(el, SLOTS.footerActions);
185
- return hasFooterActions ? (h("footer", { class: CSS.footer },
186
- h("slot", { name: SLOTS.footerActions }))) : null;
189
+ return hasFooterSlottedContent || hasFooterActions ? (h("footer", { class: CSS.footer, key: "footer" },
190
+ hasFooterSlottedContent ? h("slot", { key: "footer-slot", name: SLOTS.footer }) : null,
191
+ hasFooterActions ? h("slot", { key: "footer-actions-slot", name: SLOTS.footerActions }) : null)) : null;
187
192
  }
188
193
  renderContent() {
189
194
  const { el } = this;
@@ -203,7 +208,7 @@ export class CalcitePanel {
203
208
  const panelNode = (h("article", { "aria-busy": loading.toString(), class: CSS.container, hidden: dismissible && dismissed, onKeyDown: panelKeyDownHandler, ref: this.setContainerRef, tabIndex: dismissible ? 0 : -1 },
204
209
  this.renderHeaderNode(),
205
210
  this.renderContent(),
206
- this.renderFooterSlottedContent() || this.renderFooterActions()));
211
+ this.renderFooterNode()));
207
212
  return (h(Fragment, null,
208
213
  loading || disabled ? h("calcite-scrim", { loading: loading }) : null,
209
214
  panelNode));
@@ -7,10 +7,22 @@ import { CSS, SLOTS } from "./resources";
7
7
  import { HEADING_LEVEL } from "./resources";
8
8
  import { getSlotted } from "../../utils/dom";
9
9
  import { CalciteHeading, constrainHeadingLevel } from "../functional/CalciteHeading";
10
+ import { connectConditionalSlotComponent, disconnectConditionalSlotComponent } from "../../utils/conditionalSlot";
10
11
  /**
11
12
  * @slot - A slot for adding `calcite-pick-list-item` elements.
12
13
  */
13
14
  export class CalcitePickListGroup {
15
+ // --------------------------------------------------------------------------
16
+ //
17
+ // Lifecycle
18
+ //
19
+ // --------------------------------------------------------------------------
20
+ connectedCallback() {
21
+ connectConditionalSlotComponent(this);
22
+ }
23
+ disconnectedCallback() {
24
+ disconnectConditionalSlotComponent(this);
25
+ }
14
26
  // --------------------------------------------------------------------------
15
27
  //
16
28
  // Render Methods
@@ -6,6 +6,7 @@ import { Component, Element, Event, Fragment, h, Method, Prop, Watch } from "@st
6
6
  import { CSS, ICONS, SLOTS, TEXT } from "./resources";
7
7
  import { ICON_TYPES } from "../calcite-pick-list/resources";
8
8
  import { getSlotted } from "../../utils/dom";
9
+ import { connectConditionalSlotComponent, disconnectConditionalSlotComponent } from "../../utils/conditionalSlot";
9
10
  /**
10
11
  * @slot actions-end - a slot for adding actions or content to the end side of the item.
11
12
  * @slot actions-start - a slot for adding actions or content to the start side of the item.
@@ -90,6 +91,17 @@ export class CalcitePickListItem {
90
91
  }
91
92
  // --------------------------------------------------------------------------
92
93
  //
94
+ // Lifecycle
95
+ //
96
+ // --------------------------------------------------------------------------
97
+ connectedCallback() {
98
+ connectConditionalSlotComponent(this);
99
+ }
100
+ disconnectedCallback() {
101
+ disconnectConditionalSlotComponent(this);
102
+ }
103
+ // --------------------------------------------------------------------------
104
+ //
93
105
  // Public Methods
94
106
  //
95
107
  // --------------------------------------------------------------------------
@@ -5,6 +5,7 @@
5
5
  import { Component, Element, Prop, h, Fragment } from "@stencil/core";
6
6
  import { CSS, SLOTS } from "./resources";
7
7
  import { getSlotted } from "../../utils/dom";
8
+ import { connectConditionalSlotComponent, disconnectConditionalSlotComponent } from "../../utils/conditionalSlot";
8
9
  /**
9
10
  * @slot - A slot for adding content to the shell. This content will appear between any leading and trailing panels added to the shell. (eg. a map)
10
11
  * @slot header - A slot for adding header content. This content will be positioned at the top of the shell.
@@ -27,12 +28,23 @@ export class CalciteShell {
27
28
  }
28
29
  // --------------------------------------------------------------------------
29
30
  //
31
+ // Lifecycle
32
+ //
33
+ // --------------------------------------------------------------------------
34
+ connectedCallback() {
35
+ connectConditionalSlotComponent(this);
36
+ }
37
+ disconnectedCallback() {
38
+ disconnectConditionalSlotComponent(this);
39
+ }
40
+ // --------------------------------------------------------------------------
41
+ //
30
42
  // Render Methods
31
43
  //
32
44
  // --------------------------------------------------------------------------
33
45
  renderHeader() {
34
46
  const hasHeader = !!getSlotted(this.el, SLOTS.header);
35
- return hasHeader ? h("slot", { name: SLOTS.header }) : null;
47
+ return hasHeader ? h("slot", { key: "header", name: SLOTS.header }) : null;
36
48
  }
37
49
  renderContent() {
38
50
  const content = !!this.contentBehind
@@ -53,7 +65,7 @@ export class CalciteShell {
53
65
  }
54
66
  renderFooter() {
55
67
  const hasFooter = !!getSlotted(this.el, SLOTS.footer);
56
- return hasFooter ? (h("div", { class: CSS.footer },
68
+ return hasFooter ? (h("div", { class: CSS.footer, key: "footer" },
57
69
  h("slot", { name: SLOTS.footer }))) : null;
58
70
  }
59
71
  renderMain() {
@@ -5,6 +5,7 @@
5
5
  import { Component, Element, Prop, h, Fragment } from "@stencil/core";
6
6
  import { CSS, SLOTS } from "./resources";
7
7
  import { getSlotted } from "../../utils/dom";
8
+ import { connectConditionalSlotComponent, disconnectConditionalSlotComponent } from "../../utils/conditionalSlot";
8
9
  /**
9
10
  * @slot - A slot for adding content to the shell panel.
10
11
  * @slot action-bar - A slot for adding a `calcite-action-bar` to the panel.
@@ -31,6 +32,17 @@ export class CalciteShellCenterRow {
31
32
  }
32
33
  // --------------------------------------------------------------------------
33
34
  //
35
+ // Lifecycle
36
+ //
37
+ // --------------------------------------------------------------------------
38
+ connectedCallback() {
39
+ connectConditionalSlotComponent(this);
40
+ }
41
+ disconnectedCallback() {
42
+ disconnectConditionalSlotComponent(this);
43
+ }
44
+ // --------------------------------------------------------------------------
45
+ //
34
46
  // Render Methods
35
47
  //
36
48
  // --------------------------------------------------------------------------
@@ -39,7 +51,7 @@ export class CalciteShellCenterRow {
39
51
  const contentNode = (h("div", { class: CSS.content },
40
52
  h("slot", null)));
41
53
  const actionBar = getSlotted(el, SLOTS.actionBar);
42
- const actionBarNode = actionBar ? (h("div", { class: CSS.actionBarContainer },
54
+ const actionBarNode = actionBar ? (h("div", { class: CSS.actionBarContainer, key: "action-bar" },
43
55
  h("slot", { name: SLOTS.actionBar }))) : null;
44
56
  const children = [actionBarNode, contentNode];
45
57
  if ((actionBar === null || actionBar === void 0 ? void 0 : actionBar.position) === "end") {
@@ -6,6 +6,7 @@ import { Component, Element, Event, Prop, Watch, h, State, forceUpdate } from "@
6
6
  import { CSS, SLOTS, TEXT } from "./resources";
7
7
  import { getSlotted, getElementDir } from "../../utils/dom";
8
8
  import { clamp } from "../../utils/math";
9
+ import { connectConditionalSlotComponent, disconnectConditionalSlotComponent } from "../../utils/conditionalSlot";
9
10
  /**
10
11
  * @slot - A slot for adding content to the shell panel.
11
12
  * @slot action-bar - A slot for adding a `calcite-action-bar` to the panel.
@@ -151,7 +152,11 @@ export class CalciteShellPanel {
151
152
  // Lifecycle
152
153
  //
153
154
  //--------------------------------------------------------------------------
155
+ connectedCallback() {
156
+ connectConditionalSlotComponent(this);
157
+ }
154
158
  disconnectedCallback() {
159
+ disconnectConditionalSlotComponent(this);
155
160
  this.disconnectSeparator();
156
161
  }
157
162
  componentDidLoad() {
@@ -165,18 +170,18 @@ export class CalciteShellPanel {
165
170
  renderHeader() {
166
171
  const { el } = this;
167
172
  const hasHeader = getSlotted(el, SLOTS.header);
168
- return hasHeader ? (h("div", { class: CSS.contentHeader },
173
+ return hasHeader ? (h("div", { class: CSS.contentHeader, key: "header" },
169
174
  h("slot", { name: SLOTS.header }))) : null;
170
175
  }
171
176
  render() {
172
177
  const { collapsed, detached, position, initialContentWidth, contentWidth, contentWidthMax, contentWidthMin, intlResize, resizable } = this;
173
178
  const allowResizing = !detached && resizable;
174
- const contentNode = (h("div", { class: { [CSS.content]: true, [CSS.contentDetached]: detached }, hidden: collapsed, ref: this.storeContentEl, style: allowResizing && contentWidth ? { width: `${contentWidth}px` } : null },
179
+ const contentNode = (h("div", { class: { [CSS.content]: true, [CSS.contentDetached]: detached }, hidden: collapsed, key: "content", ref: this.storeContentEl, style: allowResizing && contentWidth ? { width: `${contentWidth}px` } : null },
175
180
  this.renderHeader(),
176
181
  h("div", { class: CSS.contentBody },
177
182
  h("slot", null))));
178
- const separatorNode = allowResizing ? (h("div", { "aria-label": intlResize, "aria-orientation": "horizontal", "aria-valuemax": contentWidthMax, "aria-valuemin": contentWidthMin, "aria-valuenow": contentWidth !== null && contentWidth !== void 0 ? contentWidth : initialContentWidth, class: CSS.separator, onKeyDown: this.separatorKeyDown, ref: this.connectSeparator, role: "separator", tabIndex: 0, "touch-action": "none" })) : null;
179
- const actionBarNode = h("slot", { name: SLOTS.actionBar });
183
+ const separatorNode = allowResizing ? (h("div", { "aria-label": intlResize, "aria-orientation": "horizontal", "aria-valuemax": contentWidthMax, "aria-valuemin": contentWidthMin, "aria-valuenow": contentWidth !== null && contentWidth !== void 0 ? contentWidth : initialContentWidth, class: CSS.separator, key: "separator", onKeyDown: this.separatorKeyDown, ref: this.connectSeparator, role: "separator", tabIndex: 0, "touch-action": "none" })) : null;
184
+ const actionBarNode = h("slot", { key: "action-bar", name: SLOTS.actionBar });
180
185
  const mainNodes = [actionBarNode, contentNode, separatorNode];
181
186
  if (position === "end") {
182
187
  mainNodes.reverse();
@@ -326,6 +326,7 @@
326
326
 
327
327
  .graph {
328
328
  color: var(--calcite-ui-foreground-3);
329
+ height: 48px;
329
330
  }
330
331
 
331
332
  :host([label-ticks][ticks]) .container {
@@ -315,8 +315,7 @@ export class CalciteSlider {
315
315
  h(HiddenFormInputSlot, { component: this })))));
316
316
  }
317
317
  renderGraph() {
318
- return this.histogram ? (h("div", { class: "graph" },
319
- h("calcite-graph", { colorStops: this.histogramStops, data: this.histogram, "data-style": "slider-histogram", height: 48, highlightMax: this.isRange ? this.maxValue : this.value, highlightMin: this.isRange ? this.minValue : this.min, max: this.max, min: this.min, width: 300 }))) : null;
318
+ return this.histogram ? (h("calcite-graph", { class: "graph", colorStops: this.histogramStops, data: this.histogram, highlightMax: this.isRange ? this.maxValue : this.value, highlightMin: this.isRange ? this.minValue : this.min, max: this.max, min: this.min })) : null;
320
319
  }
321
320
  renderTickLabel(tick) {
322
321
  const isMinTickLabel = tick === this.min;
@@ -5,6 +5,7 @@
5
5
  import { Component, Element, Fragment, h, Prop } from "@stencil/core";
6
6
  import { SLOTS } from "./resources";
7
7
  import { getSlotted } from "../../utils/dom";
8
+ import { connectConditionalSlotComponent, disconnectConditionalSlotComponent } from "../../utils/conditionalSlot";
8
9
  /**
9
10
  * @slot content-start - A slot for adding non-actionable elements before the tile content.
10
11
  * @slot content-end - A slot for adding non-actionable elements after the tile content.
@@ -34,6 +35,17 @@ export class CalciteTile {
34
35
  }
35
36
  // --------------------------------------------------------------------------
36
37
  //
38
+ // Lifecycle
39
+ //
40
+ // --------------------------------------------------------------------------
41
+ connectedCallback() {
42
+ connectConditionalSlotComponent(this);
43
+ }
44
+ disconnectedCallback() {
45
+ disconnectConditionalSlotComponent(this);
46
+ }
47
+ // --------------------------------------------------------------------------
48
+ //
37
49
  // Render Methods
38
50
  //
39
51
  // --------------------------------------------------------------------------
@@ -6,6 +6,7 @@ import { Component, Element, Event, Prop, h, Fragment } from "@stencil/core";
6
6
  import { CSS, ICONS, SLOTS, TEXT, HEADING_LEVEL } from "./resources";
7
7
  import { getSlotted } from "../../utils/dom";
8
8
  import { CalciteHeading, constrainHeadingLevel } from "../functional/CalciteHeading";
9
+ import { connectConditionalSlotComponent, disconnectConditionalSlotComponent } from "../../utils/conditionalSlot";
9
10
  /**
10
11
  * @slot - A slot for adding text and a hyperlink.
11
12
  * @slot thumbnail - A slot for adding an HTML image element to the tip.
@@ -41,6 +42,17 @@ export class CalciteTip {
41
42
  }
42
43
  // --------------------------------------------------------------------------
43
44
  //
45
+ // Lifecycle
46
+ //
47
+ // --------------------------------------------------------------------------
48
+ connectedCallback() {
49
+ connectConditionalSlotComponent(this);
50
+ }
51
+ disconnectedCallback() {
52
+ disconnectConditionalSlotComponent(this);
53
+ }
54
+ // --------------------------------------------------------------------------
55
+ //
44
56
  // Render Methods
45
57
  //
46
58
  // --------------------------------------------------------------------------
@@ -60,7 +72,7 @@ export class CalciteTip {
60
72
  }
61
73
  renderImageFrame() {
62
74
  const { el } = this;
63
- return getSlotted(el, SLOTS.thumbnail) ? (h("div", { class: CSS.imageFrame },
75
+ return getSlotted(el, SLOTS.thumbnail) ? (h("div", { class: CSS.imageFrame, key: "thumbnail" },
64
76
  h("slot", { name: SLOTS.thumbnail }))) : null;
65
77
  }
66
78
  renderInfoNode() {
@@ -7,6 +7,7 @@ import { TreeSelectionMode } from "../calcite-tree/interfaces";
7
7
  import { nodeListToArray, getElementDir, filterDirectChildren, getSlotted } from "../../utils/dom";
8
8
  import { CSS, SLOTS, ICONS } from "./resources";
9
9
  import { CSS_UTILITY } from "../../utils/resources";
10
+ import { connectConditionalSlotComponent, disconnectConditionalSlotComponent } from "../../utils/conditionalSlot";
10
11
  /**
11
12
  * @slot - A slot for adding content to the item.
12
13
  * @slot children - A slot for adding nested `calcite-tree` elements.
@@ -78,6 +79,10 @@ export class CalciteTreeItem {
78
79
  const { expanded } = this.parentTreeItem;
79
80
  this.updateParentIsExpanded(this.parentTreeItem, expanded);
80
81
  }
82
+ connectConditionalSlotComponent(this);
83
+ }
84
+ disconnectedCallback() {
85
+ disconnectConditionalSlotComponent(this);
81
86
  }
82
87
  componentWillRender() {
83
88
  this.hasChildren = !!this.el.querySelector("calcite-tree");
@@ -9,6 +9,7 @@ import { CSS } from "../calcite-pick-list-item/resources";
9
9
  import { ICONS, SLOTS } from "./resources";
10
10
  import { SLOTS as PICK_LIST_SLOTS } from "../calcite-pick-list-item/resources";
11
11
  import { getSlotted } from "../../utils/dom";
12
+ import { connectConditionalSlotComponent, disconnectConditionalSlotComponent } from "../../utils/conditionalSlot";
12
13
  /**
13
14
  * @slot actions-end - A slot for adding actions or content to the end side of the item.
14
15
  * @slot actions-start - A slot for adding actions or content to the start side of the item.
@@ -66,6 +67,17 @@ export class CalciteValueListItem {
66
67
  }
67
68
  // --------------------------------------------------------------------------
68
69
  //
70
+ // Lifecycle
71
+ //
72
+ // --------------------------------------------------------------------------
73
+ connectedCallback() {
74
+ connectConditionalSlotComponent(this);
75
+ }
76
+ disconnectedCallback() {
77
+ disconnectConditionalSlotComponent(this);
78
+ }
79
+ // --------------------------------------------------------------------------
80
+ //
69
81
  // Public Methods
70
82
  //
71
83
  // --------------------------------------------------------------------------
@@ -3,24 +3,35 @@
3
3
  * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
4
  */
5
5
  import { forceUpdate } from "@stencil/core";
6
- const slotChangedMap = new WeakMap();
7
- function onSlotChange() {
8
- forceUpdate(this);
9
- }
10
- const eventType = "slotchange";
6
+ import { createObserver } from "./observers";
7
+ const observed = new Set();
8
+ let mutationObserver;
9
+ const observerOptions = { childList: true };
11
10
  /**
12
11
  * Helper to set up a conditional slot component on connectedCallback.
13
12
  */
14
13
  export function connectConditionalSlotComponent(component) {
15
- const boundSlotChange = onSlotChange.bind(component);
16
- component.el.shadowRoot.addEventListener(eventType, boundSlotChange);
17
- slotChangedMap.set(component, boundSlotChange);
14
+ if (!mutationObserver) {
15
+ mutationObserver = createObserver("mutation", processMutations);
16
+ }
17
+ mutationObserver.observe(component.el, observerOptions);
18
18
  }
19
19
  /**
20
20
  * Helper to tear down a conditional slot component on disconnectedCallback.
21
21
  */
22
22
  export function disconnectConditionalSlotComponent(component) {
23
- const boundSlotChange = slotChangedMap.get(component);
24
- component.el.shadowRoot.removeEventListener(eventType, boundSlotChange);
25
- slotChangedMap.delete(component);
23
+ observed.delete(component.el);
24
+ // we explicitly process queued mutations and disconnect and reconnect
25
+ // the observer until MutationObserver gets an `unobserve` method
26
+ // see https://github.com/whatwg/dom/issues/126
27
+ processMutations(mutationObserver.takeRecords());
28
+ mutationObserver.disconnect();
29
+ for (const [element] of observed.entries()) {
30
+ mutationObserver.observe(element, observerOptions);
31
+ }
32
+ }
33
+ function processMutations(mutations) {
34
+ mutations.forEach(({ target }) => {
35
+ forceUpdate(target);
36
+ });
26
37
  }
@@ -2,10 +2,11 @@
2
2
  * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
4
  */
5
- import { forceUpdate, HTMLElement, createEvent, h, Host, proxyCustomElement } from '@stencil/core/internal/client';
5
+ import { HTMLElement, createEvent, h, Host, proxyCustomElement } from '@stencil/core/internal/client';
6
6
  import { t as toggleChildActionText, C as CalciteExpandToggle, o as overflowActionsDebounceInMs, q as queryActions, a as overflowActions, g as getOverflowCount } from './CalciteExpandToggle.js';
7
7
  import { f as focusElement, b as getSlotted } from './dom.js';
8
8
  import { c as createObserver } from './observers.js';
9
+ import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot.js';
9
10
  import { d as defineCustomElement$8 } from './calcite-action2.js';
10
11
  import { d as defineCustomElement$7 } from './calcite-action-group2.js';
11
12
  import { d as defineCustomElement$6 } from './calcite-action-menu2.js';
@@ -27,28 +28,6 @@ const TEXT = {
27
28
  collapse: "Collapse"
28
29
  };
29
30
 
30
- const slotChangedMap = new WeakMap();
31
- function onSlotChange() {
32
- forceUpdate(this);
33
- }
34
- const eventType = "slotchange";
35
- /**
36
- * Helper to set up a conditional slot component on connectedCallback.
37
- */
38
- function connectConditionalSlotComponent(component) {
39
- const boundSlotChange = onSlotChange.bind(component);
40
- component.el.shadowRoot.addEventListener(eventType, boundSlotChange);
41
- slotChangedMap.set(component, boundSlotChange);
42
- }
43
- /**
44
- * Helper to tear down a conditional slot component on disconnectedCallback.
45
- */
46
- function disconnectConditionalSlotComponent(component) {
47
- const boundSlotChange = slotChangedMap.get(component);
48
- component.el.shadowRoot.removeEventListener(eventType, boundSlotChange);
49
- slotChangedMap.delete(component);
50
- }
51
-
52
31
  const calciteActionBarCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 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;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:host{-webkit-box-sizing:border-box;box-sizing:border-box;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-2);font-size:var(--calcite-font-size--1)}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{pointer-events:auto;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-item-align:stretch;align-self:stretch;max-width:15vw}:host([overflow-actions-disabled]){overflow-y:auto}:host([expanded]){max-width:20vw}::slotted(calcite-action-group){border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}::slotted(calcite-action-group:last-child){border-bottom-width:0px}.action-group--bottom{-ms-flex-positive:1;flex-grow:1;-ms-flex-pack:end;justify-content:flex-end;padding-bottom:0px}";
53
32
 
54
33
  let CalciteActionBar$1 = class extends HTMLElement {
@@ -5,6 +5,7 @@
5
5
  import { HTMLElement, h, Fragment, proxyCustomElement } from '@stencil/core/internal/client';
6
6
  import { b as getSlotted } from './dom.js';
7
7
  import { S as SLOTS$1, d as defineCustomElement$5 } from './calcite-action-menu2.js';
8
+ import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot.js';
8
9
  import { d as defineCustomElement$6 } from './calcite-action2.js';
9
10
  import { d as defineCustomElement$4 } from './calcite-icon2.js';
10
11
  import { d as defineCustomElement$3 } from './calcite-loader2.js';
@@ -60,6 +61,17 @@ let CalciteActionGroup = class extends HTMLElement {
60
61
  }
61
62
  // --------------------------------------------------------------------------
62
63
  //
64
+ // Lifecycle
65
+ //
66
+ // --------------------------------------------------------------------------
67
+ connectedCallback() {
68
+ connectConditionalSlotComponent(this);
69
+ }
70
+ disconnectedCallback() {
71
+ disconnectConditionalSlotComponent(this);
72
+ }
73
+ // --------------------------------------------------------------------------
74
+ //
63
75
  // Component Methods
64
76
  //
65
77
  // --------------------------------------------------------------------------
@@ -7,6 +7,7 @@ import { b as getSlotted, f as focusElement } from './dom.js';
7
7
  import { g as getRoundRobinIndex } from './array.js';
8
8
  import { g as guid } from './guid.js';
9
9
  import { c as createObserver } from './observers.js';
10
+ import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot.js';
10
11
  import { d as defineCustomElement$5 } from './calcite-action2.js';
11
12
  import { d as defineCustomElement$4 } from './calcite-icon2.js';
12
13
  import { d as defineCustomElement$3 } from './calcite-loader2.js';
@@ -237,11 +238,13 @@ let CalciteActionMenu = class extends HTMLElement {
237
238
  var _a;
238
239
  (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(this.el, { childList: true, subtree: true });
239
240
  this.getActions();
241
+ connectConditionalSlotComponent(this);
240
242
  }
241
243
  disconnectedCallback() {
242
244
  var _a;
243
245
  (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
244
246
  this.disconnectMenuButtonEl();
247
+ disconnectConditionalSlotComponent(this);
245
248
  }
246
249
  expandedHandler() {
247
250
  this.open = false;
@@ -5,6 +5,7 @@
5
5
  import { HTMLElement, createEvent, h, Host, proxyCustomElement } from '@stencil/core/internal/client';
6
6
  import { t as toggleChildActionText, C as CalciteExpandToggle } from './CalciteExpandToggle.js';
7
7
  import { f as focusElement, b as getSlotted } from './dom.js';
8
+ import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot.js';
8
9
  import { d as defineCustomElement$8 } from './calcite-action2.js';
9
10
  import { d as defineCustomElement$7 } from './calcite-action-group2.js';
10
11
  import { d as defineCustomElement$6 } from './calcite-action-menu2.js';
@@ -88,6 +89,12 @@ let CalciteActionPad$1 = class extends HTMLElement {
88
89
  // Lifecycle
89
90
  //
90
91
  // --------------------------------------------------------------------------
92
+ connectedCallback() {
93
+ connectConditionalSlotComponent(this);
94
+ }
95
+ disconnectedCallback() {
96
+ disconnectConditionalSlotComponent(this);
97
+ }
91
98
  componentWillLoad() {
92
99
  const { el, expandDisabled, expanded } = this;
93
100
  if (!expandDisabled) {
@@ -67,6 +67,7 @@ let CalciteAlert$1 = class extends HTMLElement {
67
67
  this.queued = false;
68
68
  this.autoDismissTimeoutId = null;
69
69
  this.trackTimer = Date.now();
70
+ this.activeTransitionProp = "opacity";
70
71
  /** close and emit the closed alert and the queue */
71
72
  this.closeAlert = () => {
72
73
  this.autoDismissTimeoutId = null;
@@ -75,10 +76,19 @@ let CalciteAlert$1 = class extends HTMLElement {
75
76
  this.queue = this.queue.filter((e) => e !== this.el);
76
77
  this.determineActiveAlert();
77
78
  this.calciteAlertSync.emit({ queue: this.queue });
78
- this.calciteAlertClose.emit({
79
- el: this.el,
80
- queue: this.queue
81
- });
79
+ };
80
+ this.transitionEnd = (event) => {
81
+ if (event.propertyName === this.activeTransitionProp) {
82
+ this.active
83
+ ? this.calciteAlertOpen.emit({
84
+ el: this.el,
85
+ queue: this.queue
86
+ })
87
+ : this.calciteAlertClose.emit({
88
+ el: this.el,
89
+ queue: this.queue
90
+ });
91
+ }
82
92
  };
83
93
  }
84
94
  watchActive() {
@@ -129,7 +139,7 @@ let CalciteAlert$1 = class extends HTMLElement {
129
139
  container: true,
130
140
  queued,
131
141
  [placement]: true
132
- } }, requestedIcon ? (h("div", { class: "alert-icon" }, h("calcite-icon", { icon: requestedIcon, scale: this.scale === "l" ? "m" : "s" }))) : null, h("div", { class: "alert-content" }, h("slot", { name: SLOTS.title }), h("slot", { name: SLOTS.message }), h("slot", { name: SLOTS.link })), queueCount, !autoDismiss ? closeButton : null, active && !queued && autoDismiss ? h("div", { class: "alert-dismiss-progress" }) : null)));
142
+ }, onTransitionEnd: this.transitionEnd }, requestedIcon ? (h("div", { class: "alert-icon" }, h("calcite-icon", { icon: requestedIcon, scale: this.scale === "l" ? "m" : "s" }))) : null, h("div", { class: "alert-content" }, h("slot", { name: SLOTS.title }), h("slot", { name: SLOTS.message }), h("slot", { name: SLOTS.link })), queueCount, !autoDismiss ? closeButton : null, active && !queued && autoDismiss ? h("div", { class: "alert-dismiss-progress" }) : null)));
133
143
  }
134
144
  // when an alert is opened or closed, update queue and determine active alert
135
145
  alertSync(event) {
@@ -188,10 +198,6 @@ let CalciteAlert$1 = class extends HTMLElement {
188
198
  openAlert() {
189
199
  window.clearTimeout(this.queueTimeout);
190
200
  this.queueTimeout = window.setTimeout(() => (this.queued = false), 300);
191
- this.calciteAlertOpen.emit({
192
- el: this.el,
193
- queue: this.queue
194
- });
195
201
  }
196
202
  get el() { return this; }
197
203
  static get watchers() { return {
@@ -5,6 +5,7 @@
5
5
  import { HTMLElement, createEvent, h, Host, proxyCustomElement } from '@stencil/core/internal/client';
6
6
  import { b as getSlotted } from './dom.js';
7
7
  import { C as CalciteHeading } from './CalciteHeading.js';
8
+ import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot.js';
8
9
  import { d as defineCustomElement$9 } from './calcite-action2.js';
9
10
  import { d as defineCustomElement$8 } from './calcite-action-menu2.js';
10
11
  import { d as defineCustomElement$7 } from './calcite-handle2.js';
@@ -105,6 +106,17 @@ let CalciteBlock$1 = class extends HTMLElement {
105
106
  }
106
107
  // --------------------------------------------------------------------------
107
108
  //
109
+ // Lifecycle
110
+ //
111
+ // --------------------------------------------------------------------------
112
+ connectedCallback() {
113
+ connectConditionalSlotComponent(this);
114
+ }
115
+ disconnectedCallback() {
116
+ disconnectConditionalSlotComponent(this);
117
+ }
118
+ // --------------------------------------------------------------------------
119
+ //
108
120
  // Render Methods
109
121
  //
110
122
  // --------------------------------------------------------------------------
@@ -118,7 +130,7 @@ let CalciteBlock$1 = class extends HTMLElement {
118
130
  const showingLoadingStatus = this.loading && !this.open;
119
131
  const statusIcon = showingLoadingStatus ? ICONS.refresh : ICONS[status];
120
132
  const hasIcon = getSlotted(el, SLOTS.icon) || statusIcon;
121
- const iconEl = !statusIcon ? (h("slot", { name: SLOTS.icon })) : (h("calcite-icon", { class: {
133
+ const iconEl = !statusIcon ? (h("slot", { key: "icon-slot", name: SLOTS.icon })) : (h("calcite-icon", { class: {
122
134
  [CSS.statusIcon]: true,
123
135
  [CSS.valid]: status == "valid",
124
136
  [CSS.invalid]: status == "invalid",