@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 { SLOTS, TEXT, ICONS } from "./resources";
7
7
  import { Fragment } from "@stencil/core/internal";
8
8
  import { getSlotted } from "../../utils/dom";
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 a group of `calcite-action`s.
12
13
  * @slot menu-actions - a slot for adding an overflow menu with actions inside a dropdown.
@@ -45,6 +46,17 @@ export class CalciteActionGroup {
45
46
  }
46
47
  // --------------------------------------------------------------------------
47
48
  //
49
+ // Lifecycle
50
+ //
51
+ // --------------------------------------------------------------------------
52
+ connectedCallback() {
53
+ connectConditionalSlotComponent(this);
54
+ }
55
+ disconnectedCallback() {
56
+ disconnectConditionalSlotComponent(this);
57
+ }
58
+ // --------------------------------------------------------------------------
59
+ //
48
60
  // Component Methods
49
61
  //
50
62
  // --------------------------------------------------------------------------
@@ -9,6 +9,7 @@ import { Fragment } from "@stencil/core/internal";
9
9
  import { getRoundRobinIndex } from "../../utils/array";
10
10
  import { guid } from "../../utils/guid";
11
11
  import { createObserver } from "../../utils/observers";
12
+ import { connectConditionalSlotComponent, disconnectConditionalSlotComponent } from "../../utils/conditionalSlot";
12
13
  const SUPPORTED_BUTTON_NAV_KEYS = ["ArrowUp", "ArrowDown"];
13
14
  const SUPPORTED_MENU_NAV_KEYS = ["ArrowUp", "ArrowDown", "End", "Home"];
14
15
  /**
@@ -220,11 +221,13 @@ export class CalciteActionMenu {
220
221
  var _a;
221
222
  (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(this.el, { childList: true, subtree: true });
222
223
  this.getActions();
224
+ connectConditionalSlotComponent(this);
223
225
  }
224
226
  disconnectedCallback() {
225
227
  var _a;
226
228
  (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
227
229
  this.disconnectMenuButtonEl();
230
+ disconnectConditionalSlotComponent(this);
228
231
  }
229
232
  expandedHandler() {
230
233
  this.open = false;
@@ -6,6 +6,7 @@ import { Component, Element, Event, Host, Prop, Watch, h, Method } from "@stenci
6
6
  import { CalciteExpandToggle, toggleChildActionText } from "../functional/CalciteExpandToggle";
7
7
  import { focusElement, getSlotted } from "../../utils/dom";
8
8
  import { CSS, TEXT, SLOTS } from "./resources";
9
+ import { connectConditionalSlotComponent, disconnectConditionalSlotComponent } from "../../utils/conditionalSlot";
9
10
  /**
10
11
  * @slot - A slot for adding `calcite-action`s to the action pad.
11
12
  * @slot expand-tooltip - Used to set the tooltip for the expand toggle.
@@ -67,6 +68,12 @@ export class CalciteActionPad {
67
68
  // Lifecycle
68
69
  //
69
70
  // --------------------------------------------------------------------------
71
+ connectedCallback() {
72
+ connectConditionalSlotComponent(this);
73
+ }
74
+ disconnectedCallback() {
75
+ disconnectConditionalSlotComponent(this);
76
+ }
70
77
  componentWillLoad() {
71
78
  const { el, expandDisabled, expanded } = this;
72
79
  if (!expandDisabled) {
@@ -50,6 +50,7 @@ export class CalciteAlert {
50
50
  this.queued = false;
51
51
  this.autoDismissTimeoutId = null;
52
52
  this.trackTimer = Date.now();
53
+ this.activeTransitionProp = "opacity";
53
54
  /** close and emit the closed alert and the queue */
54
55
  this.closeAlert = () => {
55
56
  this.autoDismissTimeoutId = null;
@@ -58,10 +59,19 @@ export class CalciteAlert {
58
59
  this.queue = this.queue.filter((e) => e !== this.el);
59
60
  this.determineActiveAlert();
60
61
  this.calciteAlertSync.emit({ queue: this.queue });
61
- this.calciteAlertClose.emit({
62
- el: this.el,
63
- queue: this.queue
64
- });
62
+ };
63
+ this.transitionEnd = (event) => {
64
+ if (event.propertyName === this.activeTransitionProp) {
65
+ this.active
66
+ ? this.calciteAlertOpen.emit({
67
+ el: this.el,
68
+ queue: this.queue
69
+ })
70
+ : this.calciteAlertClose.emit({
71
+ el: this.el,
72
+ queue: this.queue
73
+ });
74
+ }
65
75
  };
66
76
  }
67
77
  watchActive() {
@@ -115,7 +125,7 @@ export class CalciteAlert {
115
125
  container: true,
116
126
  queued,
117
127
  [placement]: true
118
- } },
128
+ }, onTransitionEnd: this.transitionEnd },
119
129
  requestedIcon ? (h("div", { class: "alert-icon" },
120
130
  h("calcite-icon", { icon: requestedIcon, scale: this.scale === "l" ? "m" : "s" }))) : null,
121
131
  h("div", { class: "alert-content" },
@@ -183,10 +193,6 @@ export class CalciteAlert {
183
193
  openAlert() {
184
194
  window.clearTimeout(this.queueTimeout);
185
195
  this.queueTimeout = window.setTimeout(() => (this.queued = false), 300);
186
- this.calciteAlertOpen.emit({
187
- el: this.el,
188
- queue: this.queue
189
- });
190
196
  }
191
197
  static get is() { return "calcite-alert"; }
192
198
  static get encapsulation() { return "shadow"; }
@@ -6,6 +6,7 @@ import { Component, Element, Event, h, Host, Prop } from "@stencil/core";
6
6
  import { CSS, HEADING_LEVEL, ICONS, SLOTS, TEXT } from "./resources";
7
7
  import { getSlotted } from "../../utils/dom";
8
8
  import { CalciteHeading } from "../functional/CalciteHeading";
9
+ import { connectConditionalSlotComponent, disconnectConditionalSlotComponent } from "../../utils/conditionalSlot";
9
10
  /**
10
11
  * @slot - A slot for adding content to the block.
11
12
  * @slot icon - A slot for adding a leading header icon.
@@ -59,6 +60,17 @@ export class CalciteBlock {
59
60
  }
60
61
  // --------------------------------------------------------------------------
61
62
  //
63
+ // Lifecycle
64
+ //
65
+ // --------------------------------------------------------------------------
66
+ connectedCallback() {
67
+ connectConditionalSlotComponent(this);
68
+ }
69
+ disconnectedCallback() {
70
+ disconnectConditionalSlotComponent(this);
71
+ }
72
+ // --------------------------------------------------------------------------
73
+ //
62
74
  // Render Methods
63
75
  //
64
76
  // --------------------------------------------------------------------------
@@ -72,7 +84,7 @@ export class CalciteBlock {
72
84
  const showingLoadingStatus = this.loading && !this.open;
73
85
  const statusIcon = showingLoadingStatus ? ICONS.refresh : ICONS[status];
74
86
  const hasIcon = getSlotted(el, SLOTS.icon) || statusIcon;
75
- const iconEl = !statusIcon ? (h("slot", { name: SLOTS.icon })) : (h("calcite-icon", { class: {
87
+ const iconEl = !statusIcon ? (h("slot", { key: "icon-slot", name: SLOTS.icon })) : (h("calcite-icon", { class: {
76
88
  [CSS.statusIcon]: true,
77
89
  [CSS.valid]: status == "valid",
78
90
  [CSS.invalid]: status == "invalid",
@@ -6,6 +6,7 @@ import { Component, h, Prop, Event, Element, Method } from "@stencil/core";
6
6
  import { getSlotted } from "../../utils/dom";
7
7
  import { guid } from "../../utils/guid";
8
8
  import { CSS, TEXT, SLOTS, ICONS } from "./resources";
9
+ import { connectConditionalSlotComponent, disconnectConditionalSlotComponent } from "../../utils/conditionalSlot";
9
10
  /**
10
11
  * @slot - A slot for adding text.
11
12
  * @slot image - A slot for adding an image.
@@ -42,6 +43,17 @@ export class CalciteChip {
42
43
  };
43
44
  this.guid = guid();
44
45
  }
46
+ // --------------------------------------------------------------------------
47
+ //
48
+ // Lifecycle
49
+ //
50
+ // --------------------------------------------------------------------------
51
+ connectedCallback() {
52
+ connectConditionalSlotComponent(this);
53
+ }
54
+ disconnectedCallback() {
55
+ disconnectConditionalSlotComponent(this);
56
+ }
45
57
  //--------------------------------------------------------------------------
46
58
  //
47
59
  // Public Methods
@@ -60,7 +72,7 @@ export class CalciteChip {
60
72
  renderChipImage() {
61
73
  const { el } = this;
62
74
  const hasChipImage = getSlotted(el, SLOTS.image);
63
- return hasChipImage ? (h("div", { class: CSS.chipImageContainer },
75
+ return hasChipImage ? (h("div", { class: CSS.chipImageContainer, key: "image" },
64
76
  h("slot", { name: SLOTS.image }))) : null;
65
77
  }
66
78
  render() {
@@ -7,12 +7,17 @@ import { filter } from "../../utils/filter";
7
7
  import { debounce } from "lodash-es";
8
8
  import { createPopper, updatePopper, CSS as PopperCSS } from "../../utils/popper";
9
9
  import { guid } from "../../utils/guid";
10
- import { ComboboxChildSelector, ComboboxItem, ComboboxItemGroup, ComboboxDefaultPlacement } from "./resources";
10
+ import { ComboboxChildSelector, ComboboxItem, ComboboxItemGroup, ComboboxDefaultPlacement, TEXT } from "./resources";
11
11
  import { getItemAncestors, getItemChildren, hasActiveChildren } from "./utils";
12
12
  import { connectLabel, disconnectLabel, getLabelText } from "../../utils/label";
13
13
  import { afterConnectDefaultValueSet, connectForm, disconnectForm, HiddenFormInputSlot } from "../../utils/form";
14
14
  import { createObserver } from "../../utils/observers";
15
15
  const isGroup = (el) => el.tagName === ComboboxItemGroup;
16
+ const itemUidPrefix = "combobox-item-";
17
+ const chipUidPrefix = "combobox-chip-";
18
+ const labelUidPrefix = "combobox-label-";
19
+ const listboxUidPrefix = "combobox-listbox-";
20
+ const inputUidPrefix = "combobox-input-";
16
21
  /**
17
22
  * @slot - A slot for adding `calcite-combobox-item`s.
18
23
  */
@@ -47,6 +52,10 @@ export class CalciteCombobox {
47
52
  this.scale = "m";
48
53
  /** The value(s) of the selectedItem(s) */
49
54
  this.value = null;
55
+ /** string to override the English "Remove tag" text for when an item is selected.
56
+ * @default "Remove tag"
57
+ */
58
+ this.intlRemoveTag = TEXT.removeTag;
50
59
  //--------------------------------------------------------------------------
51
60
  //
52
61
  // Private State/Props
@@ -556,7 +565,7 @@ export class CalciteCombobox {
556
565
  const item = document.createElement(ComboboxItem);
557
566
  item.value = value;
558
567
  item.textLabel = value;
559
- item.guid = guid();
568
+ item.guid = `${chipUidPrefix}${guid()}`;
560
569
  item.selected = true;
561
570
  this.el.appendChild(item);
562
571
  this.resetText();
@@ -606,7 +615,7 @@ export class CalciteCombobox {
606
615
  focusChip() {
607
616
  var _a;
608
617
  const guid = (_a = this.selectedItems[this.activeChipIndex]) === null || _a === void 0 ? void 0 : _a.guid;
609
- const chip = this.referenceEl.querySelector(`#chip-${guid}`);
618
+ const chip = this.referenceEl.querySelector(`#${chipUidPrefix}${guid}`);
610
619
  chip === null || chip === void 0 ? void 0 : chip.setFocus();
611
620
  }
612
621
  shiftActiveItemIndex(delta) {
@@ -652,7 +661,7 @@ export class CalciteCombobox {
652
661
  //
653
662
  //--------------------------------------------------------------------------
654
663
  renderChips() {
655
- const { activeChipIndex, scale, selectionMode } = this;
664
+ const { activeChipIndex, scale, selectionMode, intlRemoveTag } = this;
656
665
  return this.selectedItems.map((item, i) => {
657
666
  const chipClasses = {
658
667
  chip: true,
@@ -661,11 +670,11 @@ export class CalciteCombobox {
661
670
  const ancestors = [...getItemAncestors(item)].reverse();
662
671
  const pathLabel = [...ancestors, item].map((el) => el.textLabel);
663
672
  const label = selectionMode !== "ancestors" ? item.textLabel : pathLabel.join(" / ");
664
- return (h("calcite-chip", { "aria-label": label, class: chipClasses, dismissLabel: "remove tag", dismissible: true, icon: item.icon, id: `chip-${item.guid}`, key: item.textLabel, onCalciteChipDismiss: (event) => this.calciteChipDismissHandler(event, item), scale: scale, title: label, value: item.value }, label));
673
+ return (h("calcite-chip", { class: chipClasses, dismissLabel: intlRemoveTag, dismissible: true, icon: item.icon, id: `${chipUidPrefix}${item.guid}`, key: item.textLabel, onCalciteChipDismiss: (event) => this.calciteChipDismissHandler(event, item), scale: scale, title: label, value: item.value }, label));
665
674
  });
666
675
  }
667
676
  renderInput() {
668
- const { active, disabled, placeholder, selectionMode, needsIcon, selectedItems } = this;
677
+ const { guid, active, disabled, placeholder, selectionMode, needsIcon, selectedItems } = this;
669
678
  const single = selectionMode === "single";
670
679
  const selectedItem = selectedItems[0];
671
680
  const showLabel = !active && single && !!selectedItem;
@@ -677,16 +686,16 @@ export class CalciteCombobox {
677
686
  label: true,
678
687
  "label--spaced": needsIcon
679
688
  }, key: "label", onFocus: this.comboboxFocusHandler, tabindex: "0" }, selectedItem.textLabel)),
680
- h("input", { "aria-activedescendant": this.activeDescendant, "aria-autocomplete": "list", "aria-controls": guid, "aria-label": getLabelText(this), class: {
689
+ h("input", { "aria-activedescendant": this.activeDescendant, "aria-autocomplete": "list", "aria-controls": `${listboxUidPrefix}${guid}`, "aria-label": getLabelText(this), class: {
681
690
  input: true,
682
691
  "input--single": true,
683
692
  "input--transparent": this.activeChipIndex > -1,
684
693
  "input--hidden": showLabel,
685
694
  "input--icon": single && needsIcon
686
- }, disabled: disabled, id: `${guid}-input`, key: "input", onBlur: this.comboboxBlurHandler, onFocus: this.comboboxFocusHandler, onInput: this.inputHandler, placeholder: placeholder, ref: (el) => (this.textInput = el), type: "text" })));
695
+ }, disabled: disabled, id: `${inputUidPrefix}${guid}`, key: "input", onBlur: this.comboboxBlurHandler, onFocus: this.comboboxFocusHandler, onInput: this.inputHandler, placeholder: placeholder, ref: (el) => (this.textInput = el), type: "text" })));
687
696
  }
688
697
  renderListBoxOptions() {
689
- return this.visibleItems.map((item) => (h("li", { "aria-selected": (!!item.selected).toString(), id: item.guid, role: "option", tabindex: "-1" }, item.textLabel)));
698
+ return this.visibleItems.map((item) => (h("li", { "aria-selected": (!!item.selected).toString(), id: `${itemUidPrefix}${item.guid}`, role: "option", tabindex: "-1" }, item.textLabel)));
690
699
  }
691
700
  renderPopperContainer() {
692
701
  const { active, maxScrollerHeight, setMenuEl, setListContainerEl, hideList, open } = this;
@@ -716,9 +725,8 @@ export class CalciteCombobox {
716
725
  render() {
717
726
  const { guid, open, label } = this;
718
727
  const single = this.selectionMode === "single";
719
- const labelId = `${guid}-label`;
720
728
  return (h(Host, { onKeyDown: this.keydownHandler },
721
- h("div", { "aria-autocomplete": "list", "aria-expanded": open.toString(), "aria-haspopup": "listbox", "aria-labelledby": labelId, "aria-owns": guid, class: {
729
+ h("div", { "aria-autocomplete": "list", "aria-expanded": open.toString(), "aria-haspopup": "listbox", "aria-labelledby": `${labelUidPrefix}${guid}`, "aria-owns": `${listboxUidPrefix}${guid}`, class: {
722
730
  wrapper: true,
723
731
  "wrapper--single": single || !this.selectedItems.length,
724
732
  "wrapper--active": open
@@ -726,10 +734,10 @@ export class CalciteCombobox {
726
734
  h("div", { class: "grid-input" },
727
735
  this.renderIconStart(),
728
736
  !single && this.renderChips(),
729
- h("label", { class: "screen-readers-only", htmlFor: `${guid}-input`, id: labelId }, label),
737
+ h("label", { class: "screen-readers-only", htmlFor: `${inputUidPrefix}${guid}`, id: `${labelUidPrefix}${guid}` }, label),
730
738
  this.renderInput()),
731
739
  this.renderIconEnd()),
732
- h("ul", { "aria-labelledby": labelId, "aria-multiselectable": "true", class: "screen-readers-only", id: guid, role: "listbox", tabIndex: -1 }, this.renderListBoxOptions()),
740
+ h("ul", { "aria-labelledby": `${labelUidPrefix}${guid}`, "aria-multiselectable": "true", class: "screen-readers-only", id: `${listboxUidPrefix}${guid}`, role: "listbox", tabIndex: -1 }, this.renderListBoxOptions()),
733
741
  this.renderPopperContainer(),
734
742
  h(HiddenFormInputSlot, { component: this })));
735
743
  }
@@ -971,6 +979,27 @@ export class CalciteCombobox {
971
979
  "attribute": "value",
972
980
  "reflect": false,
973
981
  "defaultValue": "null"
982
+ },
983
+ "intlRemoveTag": {
984
+ "type": "string",
985
+ "mutable": false,
986
+ "complexType": {
987
+ "original": "string",
988
+ "resolved": "string",
989
+ "references": {}
990
+ },
991
+ "required": false,
992
+ "optional": false,
993
+ "docs": {
994
+ "tags": [{
995
+ "name": "default",
996
+ "text": "\"Remove tag\""
997
+ }],
998
+ "text": "string to override the English \"Remove tag\" text for when an item is selected."
999
+ },
1000
+ "attribute": "intl-remove-tag",
1001
+ "reflect": false,
1002
+ "defaultValue": "TEXT.removeTag"
974
1003
  }
975
1004
  }; }
976
1005
  static get states() { return {
@@ -6,3 +6,6 @@ export const ComboboxItem = "CALCITE-COMBOBOX-ITEM";
6
6
  export const ComboboxItemGroup = "CALCITE-COMBOBOX-ITEM-GROUP";
7
7
  export const ComboboxChildSelector = `${ComboboxItem}, ${ComboboxItemGroup}`;
8
8
  export const ComboboxDefaultPlacement = "bottom-leading";
9
+ export const TEXT = {
10
+ removeTag: "Remove tag"
11
+ };
@@ -87,13 +87,11 @@
87
87
  stroke: transparent;
88
88
  margin: 0px;
89
89
  display: block;
90
- padding: 0px;
91
- }
92
-
93
- :host([data-style=slider-histogram]) svg {
90
+ height: 100%;
94
91
  width: 100%;
92
+ padding: 0px;
95
93
  }
96
- :host([data-style=slider-histogram]) svg .graph-path--highlight {
94
+ .svg .graph-path--highlight {
97
95
  fill: var(--calcite-ui-brand);
98
96
  opacity: 0.5;
99
97
  }
@@ -2,9 +2,10 @@
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 { Component, Element, Prop, h } from "@stencil/core";
5
+ import { Component, Element, Prop, h, forceUpdate } from "@stencil/core";
6
6
  import { guid } from "../../utils/guid";
7
7
  import { area, range, translate } from "./util";
8
+ import { createObserver } from "../../utils/observers";
8
9
  export class CalciteGraph {
9
10
  constructor() {
10
11
  //--------------------------------------------------------------------------
@@ -17,25 +18,31 @@ export class CalciteGraph {
17
18
  * These data points should be sorted by x-axis value
18
19
  */
19
20
  this.data = [];
20
- /** Width of graph in pixels*/
21
- this.width = 300;
22
- /** Width of graph in pixels*/
23
- this.height = 100;
24
21
  //--------------------------------------------------------------------------
25
22
  //
26
23
  // Private State/Props
27
24
  //
28
25
  //--------------------------------------------------------------------------
29
26
  this.graphId = `calcite-graph-${guid()}`;
27
+ this.resizeObserver = createObserver("resize", () => forceUpdate(this));
30
28
  }
31
29
  //--------------------------------------------------------------------------
32
30
  //
33
31
  // Lifecycle
34
32
  //
35
33
  //--------------------------------------------------------------------------
34
+ connectedCallback() {
35
+ var _a;
36
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(this.el);
37
+ }
38
+ disconnectedCallback() {
39
+ var _a;
40
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
41
+ }
36
42
  render() {
37
- const { data, colorStops, width, height, highlightMax, highlightMin, min, max } = this;
43
+ const { data, colorStops, el, highlightMax, highlightMin, min, max } = this;
38
44
  const id = this.graphId;
45
+ const { clientHeight: height, clientWidth: width } = el;
39
46
  // if we have no data, return empty svg
40
47
  if (!data || data.length === 0) {
41
48
  return (h("svg", { class: "svg", height: height, preserveAspectRatio: "none", viewBox: `0 0 ${width} ${height}`, width: width }));
@@ -137,42 +144,6 @@ export class CalciteGraph {
137
144
  "text": "Array of values describing a single color stop ([offset, color, opacity])\nThese color stops should be sorted by offset value"
138
145
  }
139
146
  },
140
- "width": {
141
- "type": "number",
142
- "mutable": false,
143
- "complexType": {
144
- "original": "number",
145
- "resolved": "number",
146
- "references": {}
147
- },
148
- "required": false,
149
- "optional": false,
150
- "docs": {
151
- "tags": [],
152
- "text": "Width of graph in pixels"
153
- },
154
- "attribute": "width",
155
- "reflect": false,
156
- "defaultValue": "300"
157
- },
158
- "height": {
159
- "type": "number",
160
- "mutable": false,
161
- "complexType": {
162
- "original": "number",
163
- "resolved": "number",
164
- "references": {}
165
- },
166
- "required": false,
167
- "optional": false,
168
- "docs": {
169
- "tags": [],
170
- "text": "Width of graph in pixels"
171
- },
172
- "attribute": "height",
173
- "reflect": false,
174
- "defaultValue": "100"
175
- },
176
147
  "highlightMin": {
177
148
  "type": "number",
178
149
  "mutable": false,
@@ -36,9 +36,9 @@ export class CalciteInlineEditable {
36
36
  * @default "Save"
37
37
  */
38
38
  this.intlConfirmChanges = TEXT.intlConfirmChanges;
39
- this.transitionEnd = (event) => {
39
+ this.transitionEnd = () => {
40
40
  if (!this.editingEnabled && !!this.shouldEmitCancel) {
41
- this.calciteInlineEditableEditingCancel.emit(event);
41
+ this.calciteInlineEditableEditCancel.emit();
42
42
  }
43
43
  };
44
44
  this.enableEditing = () => {
@@ -90,7 +90,7 @@ export class CalciteInlineEditable {
90
90
  this.confirmChangesHandler = async (e) => {
91
91
  e.preventDefault();
92
92
  e.stopPropagation();
93
- this.calciteInlineEditableChangesConfirm.emit();
93
+ this.calciteInlineEditableEditConfirm.emit();
94
94
  try {
95
95
  if (this.afterConfirm) {
96
96
  this.loading = true;
@@ -370,39 +370,33 @@ export class CalciteInlineEditable {
370
370
  }
371
371
  }; }
372
372
  static get events() { return [{
373
- "method": "calciteInlineEditableEditingCancel",
374
- "name": "calciteInlineEditableEditingCancel",
373
+ "method": "calciteInlineEditableEditCancel",
374
+ "name": "calciteInlineEditableEditCancel",
375
375
  "bubbles": true,
376
376
  "cancelable": true,
377
377
  "composed": true,
378
378
  "docs": {
379
- "tags": [{
380
- "name": "internal",
381
- "text": undefined
382
- }],
383
- "text": ""
379
+ "tags": [],
380
+ "text": "Emitted when the cancel button gets clicked."
384
381
  },
385
382
  "complexType": {
386
- "original": "any",
387
- "resolved": "any",
383
+ "original": "void",
384
+ "resolved": "void",
388
385
  "references": {}
389
386
  }
390
387
  }, {
391
- "method": "calciteInlineEditableChangesConfirm",
392
- "name": "calciteInlineEditableChangesConfirm",
388
+ "method": "calciteInlineEditableEditConfirm",
389
+ "name": "calciteInlineEditableEditConfirm",
393
390
  "bubbles": true,
394
391
  "cancelable": true,
395
392
  "composed": true,
396
393
  "docs": {
397
- "tags": [{
398
- "name": "internal",
399
- "text": undefined
400
- }],
401
- "text": ""
394
+ "tags": [],
395
+ "text": "Emitted when the check button gets clicked."
402
396
  },
403
397
  "complexType": {
404
- "original": "any",
405
- "resolved": "any",
398
+ "original": "void",
399
+ "resolved": "void",
406
400
  "references": {}
407
401
  }
408
402
  }, {
@@ -215,6 +215,9 @@ export class CalciteInput {
215
215
  const inputMin = this.minString ? parseFloat(this.minString) : null;
216
216
  const valueNudgeDelayInMs = 100;
217
217
  this.incrementOrDecrementNumberValue(direction, inputMax, inputMin, nativeEvent);
218
+ if (this.nudgeNumberValueIntervalId) {
219
+ window.clearInterval(this.nudgeNumberValueIntervalId);
220
+ }
218
221
  let firstValueNudge = true;
219
222
  this.nudgeNumberValueIntervalId = window.setInterval(() => {
220
223
  if (firstValueNudge) {
@@ -5,6 +5,7 @@
5
5
  import { Component, Element, Prop, h, Host, Method } from "@stencil/core";
6
6
  import { SLOTS, CSS } 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 `calcite-list-item` and `calcite-list-item-group` elements.
10
11
  * @slot actions-start - A slot for adding actionable `calcite-action` elements before the content of the list item.
@@ -30,6 +31,17 @@ export class CalciteListItem {
30
31
  }
31
32
  // --------------------------------------------------------------------------
32
33
  //
34
+ // Lifecycle
35
+ //
36
+ // --------------------------------------------------------------------------
37
+ connectedCallback() {
38
+ connectConditionalSlotComponent(this);
39
+ }
40
+ disconnectedCallback() {
41
+ disconnectConditionalSlotComponent(this);
42
+ }
43
+ // --------------------------------------------------------------------------
44
+ //
33
45
  // Public Methods
34
46
  //
35
47
  // --------------------------------------------------------------------------
@@ -8,6 +8,7 @@ import { queryShadowRoot } from "@a11y/focus-trap/shadow";
8
8
  import { isFocusable, isHidden } from "@a11y/focus-trap/focusable";
9
9
  import { TEXT, SLOTS, CSS, ICONS } from "./resources";
10
10
  import { createObserver } from "../../utils/observers";
11
+ import { connectConditionalSlotComponent, disconnectConditionalSlotComponent } from "../../utils/conditionalSlot";
11
12
  const isFocusableExtended = (el) => {
12
13
  return isCalciteFocusable(el) || isFocusable(el);
13
14
  };
@@ -115,11 +116,13 @@ export class CalciteModal {
115
116
  var _a;
116
117
  (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(this.el, { childList: true, subtree: true });
117
118
  this.updateFooterVisibility();
119
+ connectConditionalSlotComponent(this);
118
120
  }
119
121
  disconnectedCallback() {
120
122
  var _a;
121
123
  this.removeOverflowHiddenClass();
122
124
  (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
125
+ disconnectConditionalSlotComponent(this);
123
126
  }
124
127
  render() {
125
128
  return (h(Host, { "aria-describedby": this.contentId, "aria-labelledby": this.titleId, "aria-modal": "true", role: "dialog" },
@@ -141,7 +144,7 @@ export class CalciteModal {
141
144
  h("div", { "data-focus-fence": true, onFocus: this.focusFirstElement, tabindex: "0" }))));
142
145
  }
143
146
  renderFooter() {
144
- return this.hasFooter ? (h("div", { class: CSS.footer },
147
+ return this.hasFooter ? (h("div", { class: CSS.footer, key: "footer" },
145
148
  h("span", { class: CSS.back },
146
149
  h("slot", { name: SLOTS.back })),
147
150
  h("span", { class: CSS.secondary },
@@ -150,7 +153,7 @@ export class CalciteModal {
150
153
  h("slot", { name: SLOTS.primary })))) : null;
151
154
  }
152
155
  renderCloseButton() {
153
- return !this.disableCloseButton ? (h("button", { "aria-label": this.intlClose, class: CSS.close, onClick: this.close, ref: (el) => (this.closeButtonEl = el), title: this.intlClose },
156
+ return !this.disableCloseButton ? (h("button", { "aria-label": this.intlClose, class: CSS.close, key: "button", onClick: this.close, ref: (el) => (this.closeButtonEl = el), title: this.intlClose },
154
157
  h("calcite-icon", { icon: ICONS.close, scale: this.scale === "s" ? "s" : this.scale === "m" ? "m" : this.scale === "l" ? "l" : null }))) : null;
155
158
  }
156
159
  renderStyle() {
@@ -6,6 +6,7 @@ import { Component, Element, Event, h, Method, Prop, Watch } from "@stencil/core
6
6
  import { CSS, SLOTS, TEXT } from "./resources";
7
7
  import { StatusIcons } from "../calcite-alert/interfaces";
8
8
  import { getSlotted, setRequestedIcon } from "../../utils/dom";
9
+ import { connectConditionalSlotComponent, disconnectConditionalSlotComponent } from "../../utils/conditionalSlot";
9
10
  /** Notices are intended to be used to present users with important-but-not-crucial contextual tips or copy. Because
10
11
  * notices are displayed inline, a common use case is displaying them on page-load to present users with short hints or contextual copy.
11
12
  * They are optionally dismissible - useful for keeping track of whether or not a user has dismissed the notice. You can also choose not
@@ -56,6 +57,12 @@ export class CalciteNotice {
56
57
  // Lifecycle
57
58
  //
58
59
  //--------------------------------------------------------------------------
60
+ connectedCallback() {
61
+ connectConditionalSlotComponent(this);
62
+ }
63
+ disconnectedCallback() {
64
+ disconnectConditionalSlotComponent(this);
65
+ }
59
66
  componentWillLoad() {
60
67
  this.requestedIcon = setRequestedIcon(StatusIcons, this.icon, this.color);
61
68
  }