@esri/calcite-components 1.0.0-next.364 → 1.0.0-next.368

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 (224) 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-0aa85495.system.entry.js +5 -0
  7. package/dist/calcite/{p-409d0a3f.entry.js → p-1855547f.entry.js} +1 -1
  8. package/dist/calcite/p-1bcce6c9.entry.js +5 -0
  9. package/dist/calcite/p-1ef9235e.system.entry.js +5 -0
  10. package/dist/calcite/p-25ed6059.entry.js +5 -0
  11. package/dist/calcite/p-40cbbd20.entry.js +5 -0
  12. package/dist/calcite/p-4347fde9.system.entry.js +5 -0
  13. package/dist/calcite/p-43cd4b9b.entry.js +5 -0
  14. package/dist/calcite/{p-e6d14bc5.system.entry.js → p-4dcae709.system.entry.js} +1 -1
  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-832d7f68.system.entry.js +5 -0
  22. package/dist/calcite/p-888a152c.system.entry.js +5 -0
  23. package/dist/calcite/p-946c3bed.system.entry.js +5 -0
  24. package/dist/calcite/p-94717214.entry.js +5 -0
  25. package/dist/calcite/p-953259af.entry.js +5 -0
  26. package/dist/calcite/p-96808ed2.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-9fe77a88.system.entry.js +5 -0
  30. package/dist/calcite/p-a52288cd.system.entry.js +5 -0
  31. package/dist/calcite/p-a71d17b4.entry.js +5 -0
  32. package/dist/calcite/p-aea7c650.system.entry.js +5 -0
  33. package/dist/calcite/p-af7ed41f.system.entry.js +5 -0
  34. package/dist/calcite/p-b14e0be5.system.entry.js +5 -0
  35. package/dist/calcite/p-b53b28e3.system.js +5 -0
  36. package/dist/calcite/p-b88d7391.entry.js +5 -0
  37. package/dist/calcite/p-ba000c59.entry.js +5 -0
  38. package/dist/calcite/p-ba915998.entry.js +5 -0
  39. package/dist/calcite/p-cf2be87e.entry.js +5 -0
  40. package/dist/calcite/p-dd4457cd.entry.js +5 -0
  41. package/dist/calcite/p-eff2fb8c.system.entry.js +5 -0
  42. package/dist/calcite/p-f4614b28.system.entry.js +5 -0
  43. package/dist/calcite/{p-8b145872.system.entry.js → p-f94619be.system.entry.js} +1 -1
  44. package/dist/calcite/p-fd57beb5.system.entry.js +5 -0
  45. package/dist/cjs/calcite-action-bar.cjs.entry.js +3 -24
  46. package/dist/cjs/calcite-action-group.cjs.entry.js +13 -0
  47. package/dist/cjs/calcite-action-menu.cjs.entry.js +3 -0
  48. package/dist/cjs/calcite-action-pad.cjs.entry.js +8 -0
  49. package/dist/cjs/calcite-alert.cjs.entry.js +15 -9
  50. package/dist/cjs/calcite-block_2.cjs.entry.js +14 -1
  51. package/dist/cjs/calcite-chip.cjs.entry.js +14 -1
  52. package/dist/cjs/calcite-combobox_3.cjs.entry.js +14 -10
  53. package/dist/cjs/calcite-graph_2.cjs.entry.js +3 -3
  54. package/dist/cjs/calcite-link.cjs.entry.js +13 -2
  55. package/dist/cjs/calcite-list_3.cjs.entry.js +13 -0
  56. package/dist/cjs/calcite-modal.cjs.entry.js +5 -2
  57. package/dist/cjs/calcite-notice.cjs.entry.js +8 -0
  58. package/dist/cjs/calcite-panel.cjs.entry.js +18 -12
  59. package/dist/cjs/calcite-pick-list_3.cjs.entry.js +23 -0
  60. package/dist/cjs/calcite-shell_3.cjs.entry.js +35 -7
  61. package/dist/cjs/calcite-tile.cjs.entry.js +13 -0
  62. package/dist/cjs/calcite-tip_3.cjs.entry.js +13 -1
  63. package/dist/cjs/calcite-tree_2.cjs.entry.js +6 -0
  64. package/dist/cjs/calcite-value-list_2.cjs.entry.js +12 -0
  65. package/dist/cjs/calcite.cjs.js +1 -1
  66. package/dist/cjs/conditionalSlot-e874fbb0.js +43 -0
  67. package/dist/cjs/loader.cjs.js +1 -1
  68. package/dist/collection/components/calcite-action-group/calcite-action-group.js +12 -0
  69. package/dist/collection/components/calcite-action-menu/calcite-action-menu.js +3 -0
  70. package/dist/collection/components/calcite-action-pad/calcite-action-pad.js +7 -0
  71. package/dist/collection/components/calcite-alert/calcite-alert.js +15 -9
  72. package/dist/collection/components/calcite-block/calcite-block.js +13 -1
  73. package/dist/collection/components/calcite-chip/calcite-chip.js +13 -1
  74. package/dist/collection/components/calcite-combobox/calcite-combobox.js +15 -11
  75. package/dist/collection/components/calcite-link/calcite-link.js +31 -2
  76. package/dist/collection/components/calcite-list-item/calcite-list-item.js +12 -0
  77. package/dist/collection/components/calcite-modal/calcite-modal.js +5 -2
  78. package/dist/collection/components/calcite-notice/calcite-notice.js +7 -0
  79. package/dist/collection/components/calcite-panel/calcite-panel.js +19 -14
  80. package/dist/collection/components/calcite-pick-list-group/calcite-pick-list-group.js +12 -0
  81. package/dist/collection/components/calcite-pick-list-item/calcite-pick-list-item.js +12 -0
  82. package/dist/collection/components/calcite-shell/calcite-shell.js +14 -2
  83. package/dist/collection/components/calcite-shell-center-row/calcite-shell-center-row.js +13 -1
  84. package/dist/collection/components/calcite-shell-panel/calcite-shell-panel.js +9 -4
  85. package/dist/collection/components/calcite-slider/calcite-slider.css +3 -0
  86. package/dist/collection/components/calcite-slider/calcite-slider.js +2 -2
  87. package/dist/collection/components/calcite-tile/calcite-tile.js +12 -0
  88. package/dist/collection/components/calcite-tip/calcite-tip.js +13 -1
  89. package/dist/collection/components/calcite-tree-item/calcite-tree-item.js +5 -0
  90. package/dist/collection/components/calcite-value-list-item/calcite-value-list-item.js +12 -0
  91. package/dist/collection/utils/conditionalSlot.js +22 -11
  92. package/dist/components/calcite-action-bar.js +2 -23
  93. package/dist/components/calcite-action-group2.js +12 -0
  94. package/dist/components/calcite-action-menu2.js +3 -0
  95. package/dist/components/calcite-action-pad.js +7 -0
  96. package/dist/components/calcite-alert.js +15 -9
  97. package/dist/components/calcite-block.js +13 -1
  98. package/dist/components/calcite-chip2.js +13 -1
  99. package/dist/components/calcite-combobox.js +14 -10
  100. package/dist/components/calcite-link2.js +14 -2
  101. package/dist/components/calcite-list-item.js +12 -0
  102. package/dist/components/calcite-modal.js +5 -2
  103. package/dist/components/calcite-notice.js +7 -0
  104. package/dist/components/calcite-panel.js +17 -12
  105. package/dist/components/calcite-pick-list-group.js +12 -0
  106. package/dist/components/calcite-pick-list-item2.js +12 -0
  107. package/dist/components/calcite-shell-center-row.js +13 -1
  108. package/dist/components/calcite-shell-panel.js +9 -4
  109. package/dist/components/calcite-shell.js +14 -2
  110. package/dist/components/calcite-slider.js +3 -3
  111. package/dist/components/calcite-tile2.js +12 -0
  112. package/dist/components/calcite-tip.js +13 -1
  113. package/dist/components/calcite-tree-item.js +5 -0
  114. package/dist/components/calcite-value-list-item.js +12 -0
  115. package/dist/components/conditionalSlot.js +40 -0
  116. package/dist/custom-elements/index.js +240 -60
  117. package/dist/esm/calcite-action-bar.entry.js +2 -23
  118. package/dist/esm/calcite-action-group.entry.js +13 -0
  119. package/dist/esm/calcite-action-menu.entry.js +3 -0
  120. package/dist/esm/calcite-action-pad.entry.js +8 -0
  121. package/dist/esm/calcite-alert.entry.js +15 -9
  122. package/dist/esm/calcite-block_2.entry.js +14 -1
  123. package/dist/esm/calcite-chip.entry.js +14 -1
  124. package/dist/esm/calcite-combobox_3.entry.js +14 -10
  125. package/dist/esm/calcite-graph_2.entry.js +3 -3
  126. package/dist/esm/calcite-link.entry.js +13 -2
  127. package/dist/esm/calcite-list_3.entry.js +13 -0
  128. package/dist/esm/calcite-modal.entry.js +5 -2
  129. package/dist/esm/calcite-notice.entry.js +8 -0
  130. package/dist/esm/calcite-panel.entry.js +18 -12
  131. package/dist/esm/calcite-pick-list_3.entry.js +23 -0
  132. package/dist/esm/calcite-shell_3.entry.js +35 -7
  133. package/dist/esm/calcite-tile.entry.js +13 -0
  134. package/dist/esm/calcite-tip_3.entry.js +13 -1
  135. package/dist/esm/calcite-tree_2.entry.js +6 -0
  136. package/dist/esm/calcite-value-list_2.entry.js +12 -0
  137. package/dist/esm/calcite.js +1 -1
  138. package/dist/esm/conditionalSlot-0c4ea23a.js +40 -0
  139. package/dist/esm/loader.js +1 -1
  140. package/dist/esm-es5/calcite-action-bar.entry.js +2 -2
  141. package/dist/esm-es5/calcite-action-group.entry.js +1 -1
  142. package/dist/esm-es5/calcite-action-menu.entry.js +2 -2
  143. package/dist/esm-es5/calcite-action-pad.entry.js +2 -2
  144. package/dist/esm-es5/calcite-alert.entry.js +1 -1
  145. package/dist/esm-es5/calcite-block_2.entry.js +1 -1
  146. package/dist/esm-es5/calcite-chip.entry.js +2 -2
  147. package/dist/esm-es5/calcite-combobox_3.entry.js +2 -2
  148. package/dist/esm-es5/calcite-graph_2.entry.js +1 -1
  149. package/dist/esm-es5/calcite-link.entry.js +2 -2
  150. package/dist/esm-es5/calcite-list_3.entry.js +1 -1
  151. package/dist/esm-es5/calcite-modal.entry.js +1 -1
  152. package/dist/esm-es5/calcite-notice.entry.js +2 -2
  153. package/dist/esm-es5/calcite-panel.entry.js +2 -2
  154. package/dist/esm-es5/calcite-pick-list_3.entry.js +1 -1
  155. package/dist/esm-es5/calcite-shell_3.entry.js +1 -1
  156. package/dist/esm-es5/calcite-tile.entry.js +1 -1
  157. package/dist/esm-es5/calcite-tip_3.entry.js +1 -1
  158. package/dist/esm-es5/calcite-tree_2.entry.js +1 -1
  159. package/dist/esm-es5/calcite-value-list_2.entry.js +1 -1
  160. package/dist/esm-es5/calcite.js +1 -1
  161. package/dist/esm-es5/conditionalSlot-0c4ea23a.js +5 -0
  162. package/dist/esm-es5/loader.js +1 -1
  163. package/dist/extras/docs-json.json +21 -1
  164. package/dist/types/components/calcite-action-group/calcite-action-group.d.ts +4 -1
  165. package/dist/types/components/calcite-action-menu/calcite-action-menu.d.ts +2 -1
  166. package/dist/types/components/calcite-action-pad/calcite-action-pad.d.ts +4 -1
  167. package/dist/types/components/calcite-alert/calcite-alert.d.ts +2 -0
  168. package/dist/types/components/calcite-block/calcite-block.d.ts +4 -1
  169. package/dist/types/components/calcite-chip/calcite-chip.d.ts +4 -1
  170. package/dist/types/components/calcite-link/calcite-link.d.ts +5 -0
  171. package/dist/types/components/calcite-list-item/calcite-list-item.d.ts +4 -1
  172. package/dist/types/components/calcite-modal/calcite-modal.d.ts +2 -1
  173. package/dist/types/components/calcite-notice/calcite-notice.d.ts +4 -1
  174. package/dist/types/components/calcite-panel/calcite-panel.d.ts +5 -6
  175. package/dist/types/components/calcite-pick-list-group/calcite-pick-list-group.d.ts +4 -1
  176. package/dist/types/components/calcite-pick-list-item/calcite-pick-list-item.d.ts +4 -1
  177. package/dist/types/components/calcite-shell/calcite-shell.d.ts +4 -1
  178. package/dist/types/components/calcite-shell-center-row/calcite-shell-center-row.d.ts +4 -1
  179. package/dist/types/components/calcite-shell-panel/calcite-shell-panel.d.ts +3 -1
  180. package/dist/types/components/calcite-tile/calcite-tile.d.ts +4 -1
  181. package/dist/types/components/calcite-tip/calcite-tip.d.ts +4 -1
  182. package/dist/types/components/calcite-tree-item/calcite-tree-item.d.ts +3 -1
  183. package/dist/types/components/calcite-value-list-item/calcite-value-list-item.d.ts +4 -1
  184. package/dist/types/components.d.ts +8 -0
  185. package/hydrate/index.js +241 -60
  186. package/package.json +1 -2
  187. package/readme.md +0 -30
  188. package/dist/calcite/p-0af820bf.entry.js +0 -5
  189. package/dist/calcite/p-0cf878ed.system.entry.js +0 -5
  190. package/dist/calcite/p-1a5dae4a.entry.js +0 -5
  191. package/dist/calcite/p-1d7a9909.system.entry.js +0 -5
  192. package/dist/calcite/p-253efee4.entry.js +0 -5
  193. package/dist/calcite/p-2618de8a.entry.js +0 -5
  194. package/dist/calcite/p-273cd5ab.entry.js +0 -5
  195. package/dist/calcite/p-2a8938c7.system.entry.js +0 -5
  196. package/dist/calcite/p-2c954eaa.system.entry.js +0 -5
  197. package/dist/calcite/p-320ef3e6.system.entry.js +0 -5
  198. package/dist/calcite/p-37bddb73.system.entry.js +0 -5
  199. package/dist/calcite/p-3ab992ff.system.entry.js +0 -5
  200. package/dist/calcite/p-3b73b785.system.entry.js +0 -5
  201. package/dist/calcite/p-4659df78.entry.js +0 -5
  202. package/dist/calcite/p-54e271c9.system.entry.js +0 -5
  203. package/dist/calcite/p-57558d4b.entry.js +0 -5
  204. package/dist/calcite/p-5df1936f.entry.js +0 -5
  205. package/dist/calcite/p-698167ac.entry.js +0 -5
  206. package/dist/calcite/p-7d355abe.system.entry.js +0 -5
  207. package/dist/calcite/p-8d36bc7c.entry.js +0 -5
  208. package/dist/calcite/p-9bfe6679.system.entry.js +0 -5
  209. package/dist/calcite/p-9d81d229.entry.js +0 -5
  210. package/dist/calcite/p-a0043c61.entry.js +0 -5
  211. package/dist/calcite/p-a1f65f6e.entry.js +0 -5
  212. package/dist/calcite/p-a4dec1f6.system.entry.js +0 -5
  213. package/dist/calcite/p-a9c50960.system.entry.js +0 -5
  214. package/dist/calcite/p-aaed1677.entry.js +0 -5
  215. package/dist/calcite/p-ac778725.system.entry.js +0 -5
  216. package/dist/calcite/p-ac8cf248.entry.js +0 -5
  217. package/dist/calcite/p-b4d3f1c1.entry.js +0 -5
  218. package/dist/calcite/p-c0ed9eff.entry.js +0 -5
  219. package/dist/calcite/p-cb9cd28c.system.entry.js +0 -5
  220. package/dist/calcite/p-d578e568.system.entry.js +0 -5
  221. package/dist/calcite/p-e564004a.system.entry.js +0 -5
  222. package/dist/calcite/p-f6559122.entry.js +0 -5
  223. package/dist/calcite/p-f6fc151d.system.entry.js +0 -5
  224. package/dist/calcite/p-f73124d0.entry.js +0 -5
@@ -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() {
@@ -13,6 +13,11 @@ 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
  */
@@ -560,7 +565,7 @@ export class CalciteCombobox {
560
565
  const item = document.createElement(ComboboxItem);
561
566
  item.value = value;
562
567
  item.textLabel = value;
563
- item.guid = guid();
568
+ item.guid = `${chipUidPrefix}${guid()}`;
564
569
  item.selected = true;
565
570
  this.el.appendChild(item);
566
571
  this.resetText();
@@ -610,7 +615,7 @@ export class CalciteCombobox {
610
615
  focusChip() {
611
616
  var _a;
612
617
  const guid = (_a = this.selectedItems[this.activeChipIndex]) === null || _a === void 0 ? void 0 : _a.guid;
613
- const chip = this.referenceEl.querySelector(`#chip-${guid}`);
618
+ const chip = this.referenceEl.querySelector(`#${chipUidPrefix}${guid}`);
614
619
  chip === null || chip === void 0 ? void 0 : chip.setFocus();
615
620
  }
616
621
  shiftActiveItemIndex(delta) {
@@ -665,11 +670,11 @@ export class CalciteCombobox {
665
670
  const ancestors = [...getItemAncestors(item)].reverse();
666
671
  const pathLabel = [...ancestors, item].map((el) => el.textLabel);
667
672
  const label = selectionMode !== "ancestors" ? item.textLabel : pathLabel.join(" / ");
668
- return (h("calcite-chip", { "aria-label": label, class: chipClasses, dismissLabel: intlRemoveTag, 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));
669
674
  });
670
675
  }
671
676
  renderInput() {
672
- const { active, disabled, placeholder, selectionMode, needsIcon, selectedItems } = this;
677
+ const { guid, active, disabled, placeholder, selectionMode, needsIcon, selectedItems } = this;
673
678
  const single = selectionMode === "single";
674
679
  const selectedItem = selectedItems[0];
675
680
  const showLabel = !active && single && !!selectedItem;
@@ -681,16 +686,16 @@ export class CalciteCombobox {
681
686
  label: true,
682
687
  "label--spaced": needsIcon
683
688
  }, key: "label", onFocus: this.comboboxFocusHandler, tabindex: "0" }, selectedItem.textLabel)),
684
- 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: {
685
690
  input: true,
686
691
  "input--single": true,
687
692
  "input--transparent": this.activeChipIndex > -1,
688
693
  "input--hidden": showLabel,
689
694
  "input--icon": single && needsIcon
690
- }, 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" })));
691
696
  }
692
697
  renderListBoxOptions() {
693
- 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)));
694
699
  }
695
700
  renderPopperContainer() {
696
701
  const { active, maxScrollerHeight, setMenuEl, setListContainerEl, hideList, open } = this;
@@ -720,9 +725,8 @@ export class CalciteCombobox {
720
725
  render() {
721
726
  const { guid, open, label } = this;
722
727
  const single = this.selectionMode === "single";
723
- const labelId = `${guid}-label`;
724
728
  return (h(Host, { onKeyDown: this.keydownHandler },
725
- 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: {
726
730
  wrapper: true,
727
731
  "wrapper--single": single || !this.selectedItems.length,
728
732
  "wrapper--active": open
@@ -730,10 +734,10 @@ export class CalciteCombobox {
730
734
  h("div", { class: "grid-input" },
731
735
  this.renderIconStart(),
732
736
  !single && this.renderChips(),
733
- 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),
734
738
  this.renderInput()),
735
739
  this.renderIconEnd()),
736
- 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()),
737
741
  this.renderPopperContainer(),
738
742
  h(HiddenFormInputSlot, { component: this })));
739
743
  }
@@ -18,6 +18,11 @@ export class CalciteLink {
18
18
  //--------------------------------------------------------------------------
19
19
  /** is the link disabled */
20
20
  this.disabled = false;
21
+ /** Prompts the user to save the linked URL instead of navigating to it. Can be used with or without a value:
22
+ * Without a value, the browser will suggest a filename/extension
23
+ * See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download
24
+ */
25
+ this.download = false;
21
26
  /** the node type of the rendered child element */
22
27
  this.childElType = "span";
23
28
  //--------------------------------------------------------------------------
@@ -41,14 +46,20 @@ export class CalciteLink {
41
46
  this.childElType = this.href ? "a" : "span";
42
47
  }
43
48
  render() {
44
- const dir = getElementDir(this.el);
49
+ const { download, el } = this;
50
+ const dir = getElementDir(el);
45
51
  const iconStartEl = (h("calcite-icon", { class: "calcite-link--icon icon-start", flipRtl: this.iconFlipRtl === "start" || this.iconFlipRtl === "both", icon: this.iconStart, scale: "s" }));
46
52
  const iconEndEl = (h("calcite-icon", { class: "calcite-link--icon icon-end", flipRtl: this.iconFlipRtl === "end" || this.iconFlipRtl === "both", icon: this.iconEnd, scale: "s" }));
47
53
  const Tag = this.childElType;
48
54
  const role = this.childElType === "span" ? "link" : null;
49
55
  const tabIndex = this.disabled ? -1 : this.childElType === "span" ? 0 : null;
50
56
  return (h(Host, { role: "presentation" },
51
- h(Tag, { class: { [CSS_UTILITY.rtl]: dir === "rtl" }, href: Tag === "a" && this.href, ref: this.storeTagRef, rel: Tag === "a" && this.rel, role: role, tabIndex: tabIndex, target: Tag === "a" && this.target },
57
+ h(Tag, { class: { [CSS_UTILITY.rtl]: dir === "rtl" },
58
+ /*
59
+ When the 'download' property of type 'boolean | string' is set to true, the value is "".
60
+ This works around that issue for now.
61
+ */
62
+ download: Tag === "a" && (download === "" || download) ? download : null, href: Tag === "a" && this.href, ref: this.storeTagRef, rel: Tag === "a" && this.rel, role: role, tabIndex: tabIndex, target: Tag === "a" && this.target },
52
63
  this.iconStart ? iconStartEl : null,
53
64
  h("slot", null),
54
65
  this.iconEnd ? iconEndEl : null)));
@@ -89,6 +100,24 @@ export class CalciteLink {
89
100
  "reflect": true,
90
101
  "defaultValue": "false"
91
102
  },
103
+ "download": {
104
+ "type": "any",
105
+ "mutable": false,
106
+ "complexType": {
107
+ "original": "string | boolean",
108
+ "resolved": "boolean | string",
109
+ "references": {}
110
+ },
111
+ "required": false,
112
+ "optional": false,
113
+ "docs": {
114
+ "tags": [],
115
+ "text": "Prompts the user to save the linked URL instead of navigating to it. Can be used with or without a value:\nWithout a value, the browser will suggest a filename/extension\nSee: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download"
116
+ },
117
+ "attribute": "download",
118
+ "reflect": true,
119
+ "defaultValue": "false"
120
+ },
92
121
  "href": {
93
122
  "type": "string",
94
123
  "mutable": false,
@@ -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
  }
@@ -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();
@@ -183,6 +183,9 @@
183
183
  display: inline-block;
184
184
  width: 1em;
185
185
  }
186
+ .thumb .handle__label.hyphen--wrap {
187
+ display: flex;
188
+ }
186
189
  .thumb .handle{
187
190
  box-sizing: border-box;
188
191
  border-radius: 9999px;
@@ -624,7 +624,7 @@ export class CalciteSlider {
624
624
  const hyphenLabel = leftValueLabel;
625
625
  const labelOffset = labelFontSize / 2;
626
626
  if (labelTransformedOverlap > 0) {
627
- hyphenLabel.classList.add("hyphen");
627
+ hyphenLabel.classList.add("hyphen", "hyphen--wrap");
628
628
  if (rightValueLabelStaticHostOffset === 0 && leftValueLabelStaticHostOffset === 0) {
629
629
  // Neither handle overlaps the host boundary
630
630
  let leftValueLabelTranslate = labelTransformedOverlap / 2 - labelOffset;
@@ -670,7 +670,7 @@ export class CalciteSlider {
670
670
  }
671
671
  }
672
672
  else {
673
- hyphenLabel.classList.remove("hyphen");
673
+ hyphenLabel.classList.remove("hyphen", "hyphen--wrap");
674
674
  leftValueLabel.style.transform = `translateX(${leftValueLabelStaticHostOffset}px)`;
675
675
  leftValueLabelTransformed.style.transform = `translateX(${leftValueLabelStaticHostOffset}px)`;
676
676
  rightValueLabel.style.transform = `translateX(${rightValueLabelStaticHostOffset}px)`;
@@ -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() {