@esri/calcite-components 1.0.0-next.365 → 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.
- package/dist/calcite/calcite.esm.js +1 -1
- package/dist/calcite/p-0282fd8b.system.entry.js +5 -0
- package/dist/calcite/p-050ff462.entry.js +5 -0
- package/dist/calcite/p-05b03971.system.entry.js +5 -0
- package/dist/calcite/p-08847812.entry.js +5 -0
- package/dist/calcite/p-1bcce6c9.entry.js +5 -0
- package/dist/calcite/p-1ef9235e.system.entry.js +5 -0
- package/dist/calcite/p-25ed6059.entry.js +5 -0
- package/dist/calcite/p-40cbbd20.entry.js +5 -0
- package/dist/calcite/p-4347fde9.system.entry.js +5 -0
- package/dist/calcite/p-43cd4b9b.entry.js +5 -0
- package/dist/calcite/p-55e2658e.entry.js +5 -0
- package/dist/calcite/p-5682a918.entry.js +5 -0
- package/dist/calcite/p-597b782e.system.entry.js +5 -0
- package/dist/calcite/p-60e4f404.entry.js +5 -0
- package/dist/calcite/p-660c8077.js +5 -0
- package/dist/calcite/p-7279ccf9.entry.js +5 -0
- package/dist/calcite/p-832d7f68.system.entry.js +5 -0
- package/dist/calcite/p-888a152c.system.entry.js +5 -0
- package/dist/calcite/p-946c3bed.system.entry.js +5 -0
- package/dist/calcite/p-94717214.entry.js +5 -0
- package/dist/calcite/p-953259af.entry.js +5 -0
- package/dist/calcite/p-99d32fc3.system.js +1 -1
- package/dist/calcite/p-9b723fdd.system.entry.js +5 -0
- package/dist/calcite/p-9fe77a88.system.entry.js +5 -0
- package/dist/calcite/p-a52288cd.system.entry.js +5 -0
- package/dist/calcite/p-a71d17b4.entry.js +5 -0
- package/dist/calcite/p-aea7c650.system.entry.js +5 -0
- package/dist/calcite/p-af7ed41f.system.entry.js +5 -0
- package/dist/calcite/p-b14e0be5.system.entry.js +5 -0
- package/dist/calcite/p-b53b28e3.system.js +5 -0
- package/dist/calcite/p-b88d7391.entry.js +5 -0
- package/dist/calcite/p-ba915998.entry.js +5 -0
- package/dist/calcite/p-dd4457cd.entry.js +5 -0
- package/dist/calcite/p-eff2fb8c.system.entry.js +5 -0
- package/dist/calcite/p-fd57beb5.system.entry.js +5 -0
- package/dist/cjs/calcite-action-bar.cjs.entry.js +3 -24
- package/dist/cjs/calcite-action-group.cjs.entry.js +13 -0
- package/dist/cjs/calcite-action-menu.cjs.entry.js +3 -0
- package/dist/cjs/calcite-action-pad.cjs.entry.js +8 -0
- package/dist/cjs/calcite-block_2.cjs.entry.js +14 -1
- package/dist/cjs/calcite-chip.cjs.entry.js +14 -1
- package/dist/cjs/calcite-list_3.cjs.entry.js +13 -0
- package/dist/cjs/calcite-modal.cjs.entry.js +5 -2
- package/dist/cjs/calcite-notice.cjs.entry.js +8 -0
- package/dist/cjs/calcite-panel.cjs.entry.js +18 -12
- package/dist/cjs/calcite-pick-list_3.cjs.entry.js +23 -0
- package/dist/cjs/calcite-shell_3.cjs.entry.js +35 -7
- package/dist/cjs/calcite-tile.cjs.entry.js +13 -0
- package/dist/cjs/calcite-tip_3.cjs.entry.js +13 -1
- package/dist/cjs/calcite-tree_2.cjs.entry.js +6 -0
- package/dist/cjs/calcite-value-list_2.cjs.entry.js +12 -0
- package/dist/cjs/conditionalSlot-e874fbb0.js +43 -0
- package/dist/collection/components/calcite-action-group/calcite-action-group.js +12 -0
- package/dist/collection/components/calcite-action-menu/calcite-action-menu.js +3 -0
- package/dist/collection/components/calcite-action-pad/calcite-action-pad.js +7 -0
- package/dist/collection/components/calcite-block/calcite-block.js +13 -1
- package/dist/collection/components/calcite-chip/calcite-chip.js +13 -1
- package/dist/collection/components/calcite-list-item/calcite-list-item.js +12 -0
- package/dist/collection/components/calcite-modal/calcite-modal.js +5 -2
- package/dist/collection/components/calcite-notice/calcite-notice.js +7 -0
- package/dist/collection/components/calcite-panel/calcite-panel.js +19 -14
- package/dist/collection/components/calcite-pick-list-group/calcite-pick-list-group.js +12 -0
- package/dist/collection/components/calcite-pick-list-item/calcite-pick-list-item.js +12 -0
- package/dist/collection/components/calcite-shell/calcite-shell.js +14 -2
- package/dist/collection/components/calcite-shell-center-row/calcite-shell-center-row.js +13 -1
- package/dist/collection/components/calcite-shell-panel/calcite-shell-panel.js +9 -4
- package/dist/collection/components/calcite-tile/calcite-tile.js +12 -0
- package/dist/collection/components/calcite-tip/calcite-tip.js +13 -1
- package/dist/collection/components/calcite-tree-item/calcite-tree-item.js +5 -0
- package/dist/collection/components/calcite-value-list-item/calcite-value-list-item.js +12 -0
- package/dist/collection/utils/conditionalSlot.js +22 -11
- package/dist/components/calcite-action-bar.js +2 -23
- package/dist/components/calcite-action-group2.js +12 -0
- package/dist/components/calcite-action-menu2.js +3 -0
- package/dist/components/calcite-action-pad.js +7 -0
- package/dist/components/calcite-block.js +13 -1
- package/dist/components/calcite-chip2.js +13 -1
- package/dist/components/calcite-list-item.js +12 -0
- package/dist/components/calcite-modal.js +5 -2
- package/dist/components/calcite-notice.js +7 -0
- package/dist/components/calcite-panel.js +17 -12
- package/dist/components/calcite-pick-list-group.js +12 -0
- package/dist/components/calcite-pick-list-item2.js +12 -0
- package/dist/components/calcite-shell-center-row.js +13 -1
- package/dist/components/calcite-shell-panel.js +9 -4
- package/dist/components/calcite-shell.js +14 -2
- package/dist/components/calcite-tile2.js +12 -0
- package/dist/components/calcite-tip.js +13 -1
- package/dist/components/calcite-tree-item.js +5 -0
- package/dist/components/calcite-value-list-item.js +12 -0
- package/dist/components/conditionalSlot.js +40 -0
- package/dist/custom-elements/index.js +194 -35
- package/dist/esm/calcite-action-bar.entry.js +2 -23
- package/dist/esm/calcite-action-group.entry.js +13 -0
- package/dist/esm/calcite-action-menu.entry.js +3 -0
- package/dist/esm/calcite-action-pad.entry.js +8 -0
- package/dist/esm/calcite-block_2.entry.js +14 -1
- package/dist/esm/calcite-chip.entry.js +14 -1
- package/dist/esm/calcite-list_3.entry.js +13 -0
- package/dist/esm/calcite-modal.entry.js +5 -2
- package/dist/esm/calcite-notice.entry.js +8 -0
- package/dist/esm/calcite-panel.entry.js +18 -12
- package/dist/esm/calcite-pick-list_3.entry.js +23 -0
- package/dist/esm/calcite-shell_3.entry.js +35 -7
- package/dist/esm/calcite-tile.entry.js +13 -0
- package/dist/esm/calcite-tip_3.entry.js +13 -1
- package/dist/esm/calcite-tree_2.entry.js +6 -0
- package/dist/esm/calcite-value-list_2.entry.js +12 -0
- package/dist/esm/conditionalSlot-0c4ea23a.js +40 -0
- package/dist/esm-es5/calcite-action-bar.entry.js +2 -2
- package/dist/esm-es5/calcite-action-group.entry.js +1 -1
- package/dist/esm-es5/calcite-action-menu.entry.js +2 -2
- package/dist/esm-es5/calcite-action-pad.entry.js +2 -2
- package/dist/esm-es5/calcite-block_2.entry.js +1 -1
- package/dist/esm-es5/calcite-chip.entry.js +2 -2
- package/dist/esm-es5/calcite-list_3.entry.js +1 -1
- package/dist/esm-es5/calcite-modal.entry.js +1 -1
- package/dist/esm-es5/calcite-notice.entry.js +2 -2
- package/dist/esm-es5/calcite-panel.entry.js +2 -2
- package/dist/esm-es5/calcite-pick-list_3.entry.js +1 -1
- package/dist/esm-es5/calcite-shell_3.entry.js +1 -1
- package/dist/esm-es5/calcite-tile.entry.js +1 -1
- package/dist/esm-es5/calcite-tip_3.entry.js +1 -1
- package/dist/esm-es5/calcite-tree_2.entry.js +1 -1
- package/dist/esm-es5/calcite-value-list_2.entry.js +1 -1
- package/dist/esm-es5/conditionalSlot-0c4ea23a.js +5 -0
- package/dist/extras/docs-json.json +1 -1
- package/dist/types/components/calcite-action-group/calcite-action-group.d.ts +4 -1
- package/dist/types/components/calcite-action-menu/calcite-action-menu.d.ts +2 -1
- package/dist/types/components/calcite-action-pad/calcite-action-pad.d.ts +4 -1
- package/dist/types/components/calcite-block/calcite-block.d.ts +4 -1
- package/dist/types/components/calcite-chip/calcite-chip.d.ts +4 -1
- package/dist/types/components/calcite-list-item/calcite-list-item.d.ts +4 -1
- package/dist/types/components/calcite-modal/calcite-modal.d.ts +2 -1
- package/dist/types/components/calcite-notice/calcite-notice.d.ts +4 -1
- package/dist/types/components/calcite-panel/calcite-panel.d.ts +5 -6
- package/dist/types/components/calcite-pick-list-group/calcite-pick-list-group.d.ts +4 -1
- package/dist/types/components/calcite-pick-list-item/calcite-pick-list-item.d.ts +4 -1
- package/dist/types/components/calcite-shell/calcite-shell.d.ts +4 -1
- package/dist/types/components/calcite-shell-center-row/calcite-shell-center-row.d.ts +4 -1
- package/dist/types/components/calcite-shell-panel/calcite-shell-panel.d.ts +3 -1
- package/dist/types/components/calcite-tile/calcite-tile.d.ts +4 -1
- package/dist/types/components/calcite-tip/calcite-tip.d.ts +4 -1
- package/dist/types/components/calcite-tree-item/calcite-tree-item.d.ts +3 -1
- package/dist/types/components/calcite-value-list-item/calcite-value-list-item.d.ts +4 -1
- package/hydrate/index.js +194 -35
- package/package.json +1 -1
- package/dist/calcite/p-0af820bf.entry.js +0 -5
- package/dist/calcite/p-0cf878ed.system.entry.js +0 -5
- package/dist/calcite/p-1d7a9909.system.entry.js +0 -5
- package/dist/calcite/p-253efee4.entry.js +0 -5
- package/dist/calcite/p-2618de8a.entry.js +0 -5
- package/dist/calcite/p-273cd5ab.entry.js +0 -5
- package/dist/calcite/p-2a8938c7.system.entry.js +0 -5
- package/dist/calcite/p-2c954eaa.system.entry.js +0 -5
- package/dist/calcite/p-37bddb73.system.entry.js +0 -5
- package/dist/calcite/p-3ab992ff.system.entry.js +0 -5
- package/dist/calcite/p-3b73b785.system.entry.js +0 -5
- package/dist/calcite/p-4659df78.entry.js +0 -5
- package/dist/calcite/p-54e271c9.system.entry.js +0 -5
- package/dist/calcite/p-5df1936f.entry.js +0 -5
- package/dist/calcite/p-698167ac.entry.js +0 -5
- package/dist/calcite/p-7d355abe.system.entry.js +0 -5
- package/dist/calcite/p-8d36bc7c.entry.js +0 -5
- package/dist/calcite/p-9d81d229.entry.js +0 -5
- package/dist/calcite/p-a0043c61.entry.js +0 -5
- package/dist/calcite/p-a1f65f6e.entry.js +0 -5
- package/dist/calcite/p-a4dec1f6.system.entry.js +0 -5
- package/dist/calcite/p-a9c50960.system.entry.js +0 -5
- package/dist/calcite/p-aaed1677.entry.js +0 -5
- package/dist/calcite/p-ac778725.system.entry.js +0 -5
- package/dist/calcite/p-ac8cf248.entry.js +0 -5
- package/dist/calcite/p-b4d3f1c1.entry.js +0 -5
- package/dist/calcite/p-c0ed9eff.entry.js +0 -5
- package/dist/calcite/p-cb9cd28c.system.entry.js +0 -5
- package/dist/calcite/p-d578e568.system.entry.js +0 -5
- package/dist/calcite/p-e564004a.system.entry.js +0 -5
- package/dist/calcite/p-f6fc151d.system.entry.js +0 -5
- package/dist/calcite/p-f73124d0.entry.js +0 -5
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { Component, Element, Fragment, h, Prop } from "@stencil/core";
|
|
6
6
|
import { SLOTS } from "./resources";
|
|
7
7
|
import { getSlotted } from "../../utils/dom";
|
|
8
|
+
import { connectConditionalSlotComponent, disconnectConditionalSlotComponent } from "../../utils/conditionalSlot";
|
|
8
9
|
/**
|
|
9
10
|
* @slot content-start - A slot for adding non-actionable elements before the tile content.
|
|
10
11
|
* @slot content-end - A slot for adding non-actionable elements after the tile content.
|
|
@@ -34,6 +35,17 @@ export class CalciteTile {
|
|
|
34
35
|
}
|
|
35
36
|
// --------------------------------------------------------------------------
|
|
36
37
|
//
|
|
38
|
+
// Lifecycle
|
|
39
|
+
//
|
|
40
|
+
// --------------------------------------------------------------------------
|
|
41
|
+
connectedCallback() {
|
|
42
|
+
connectConditionalSlotComponent(this);
|
|
43
|
+
}
|
|
44
|
+
disconnectedCallback() {
|
|
45
|
+
disconnectConditionalSlotComponent(this);
|
|
46
|
+
}
|
|
47
|
+
// --------------------------------------------------------------------------
|
|
48
|
+
//
|
|
37
49
|
// Render Methods
|
|
38
50
|
//
|
|
39
51
|
// --------------------------------------------------------------------------
|
|
@@ -6,6 +6,7 @@ import { Component, Element, Event, Prop, h, Fragment } from "@stencil/core";
|
|
|
6
6
|
import { CSS, ICONS, SLOTS, TEXT, HEADING_LEVEL } from "./resources";
|
|
7
7
|
import { getSlotted } from "../../utils/dom";
|
|
8
8
|
import { CalciteHeading, constrainHeadingLevel } from "../functional/CalciteHeading";
|
|
9
|
+
import { connectConditionalSlotComponent, disconnectConditionalSlotComponent } from "../../utils/conditionalSlot";
|
|
9
10
|
/**
|
|
10
11
|
* @slot - A slot for adding text and a hyperlink.
|
|
11
12
|
* @slot thumbnail - A slot for adding an HTML image element to the tip.
|
|
@@ -41,6 +42,17 @@ export class CalciteTip {
|
|
|
41
42
|
}
|
|
42
43
|
// --------------------------------------------------------------------------
|
|
43
44
|
//
|
|
45
|
+
// Lifecycle
|
|
46
|
+
//
|
|
47
|
+
// --------------------------------------------------------------------------
|
|
48
|
+
connectedCallback() {
|
|
49
|
+
connectConditionalSlotComponent(this);
|
|
50
|
+
}
|
|
51
|
+
disconnectedCallback() {
|
|
52
|
+
disconnectConditionalSlotComponent(this);
|
|
53
|
+
}
|
|
54
|
+
// --------------------------------------------------------------------------
|
|
55
|
+
//
|
|
44
56
|
// Render Methods
|
|
45
57
|
//
|
|
46
58
|
// --------------------------------------------------------------------------
|
|
@@ -60,7 +72,7 @@ export class CalciteTip {
|
|
|
60
72
|
}
|
|
61
73
|
renderImageFrame() {
|
|
62
74
|
const { el } = this;
|
|
63
|
-
return getSlotted(el, SLOTS.thumbnail) ? (h("div", { class: CSS.imageFrame },
|
|
75
|
+
return getSlotted(el, SLOTS.thumbnail) ? (h("div", { class: CSS.imageFrame, key: "thumbnail" },
|
|
64
76
|
h("slot", { name: SLOTS.thumbnail }))) : null;
|
|
65
77
|
}
|
|
66
78
|
renderInfoNode() {
|
|
@@ -7,6 +7,7 @@ import { TreeSelectionMode } from "../calcite-tree/interfaces";
|
|
|
7
7
|
import { nodeListToArray, getElementDir, filterDirectChildren, getSlotted } from "../../utils/dom";
|
|
8
8
|
import { CSS, SLOTS, ICONS } from "./resources";
|
|
9
9
|
import { CSS_UTILITY } from "../../utils/resources";
|
|
10
|
+
import { connectConditionalSlotComponent, disconnectConditionalSlotComponent } from "../../utils/conditionalSlot";
|
|
10
11
|
/**
|
|
11
12
|
* @slot - A slot for adding content to the item.
|
|
12
13
|
* @slot children - A slot for adding nested `calcite-tree` elements.
|
|
@@ -78,6 +79,10 @@ export class CalciteTreeItem {
|
|
|
78
79
|
const { expanded } = this.parentTreeItem;
|
|
79
80
|
this.updateParentIsExpanded(this.parentTreeItem, expanded);
|
|
80
81
|
}
|
|
82
|
+
connectConditionalSlotComponent(this);
|
|
83
|
+
}
|
|
84
|
+
disconnectedCallback() {
|
|
85
|
+
disconnectConditionalSlotComponent(this);
|
|
81
86
|
}
|
|
82
87
|
componentWillRender() {
|
|
83
88
|
this.hasChildren = !!this.el.querySelector("calcite-tree");
|
|
@@ -9,6 +9,7 @@ import { CSS } from "../calcite-pick-list-item/resources";
|
|
|
9
9
|
import { ICONS, SLOTS } from "./resources";
|
|
10
10
|
import { SLOTS as PICK_LIST_SLOTS } from "../calcite-pick-list-item/resources";
|
|
11
11
|
import { getSlotted } from "../../utils/dom";
|
|
12
|
+
import { connectConditionalSlotComponent, disconnectConditionalSlotComponent } from "../../utils/conditionalSlot";
|
|
12
13
|
/**
|
|
13
14
|
* @slot actions-end - A slot for adding actions or content to the end side of the item.
|
|
14
15
|
* @slot actions-start - A slot for adding actions or content to the start side of the item.
|
|
@@ -66,6 +67,17 @@ export class CalciteValueListItem {
|
|
|
66
67
|
}
|
|
67
68
|
// --------------------------------------------------------------------------
|
|
68
69
|
//
|
|
70
|
+
// Lifecycle
|
|
71
|
+
//
|
|
72
|
+
// --------------------------------------------------------------------------
|
|
73
|
+
connectedCallback() {
|
|
74
|
+
connectConditionalSlotComponent(this);
|
|
75
|
+
}
|
|
76
|
+
disconnectedCallback() {
|
|
77
|
+
disconnectConditionalSlotComponent(this);
|
|
78
|
+
}
|
|
79
|
+
// --------------------------------------------------------------------------
|
|
80
|
+
//
|
|
69
81
|
// Public Methods
|
|
70
82
|
//
|
|
71
83
|
// --------------------------------------------------------------------------
|
|
@@ -3,24 +3,35 @@
|
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
4
|
*/
|
|
5
5
|
import { forceUpdate } from "@stencil/core";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
const eventType = "slotchange";
|
|
6
|
+
import { createObserver } from "./observers";
|
|
7
|
+
const observed = new Set();
|
|
8
|
+
let mutationObserver;
|
|
9
|
+
const observerOptions = { childList: true };
|
|
11
10
|
/**
|
|
12
11
|
* Helper to set up a conditional slot component on connectedCallback.
|
|
13
12
|
*/
|
|
14
13
|
export function connectConditionalSlotComponent(component) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
if (!mutationObserver) {
|
|
15
|
+
mutationObserver = createObserver("mutation", processMutations);
|
|
16
|
+
}
|
|
17
|
+
mutationObserver.observe(component.el, observerOptions);
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* Helper to tear down a conditional slot component on disconnectedCallback.
|
|
21
21
|
*/
|
|
22
22
|
export function disconnectConditionalSlotComponent(component) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
observed.delete(component.el);
|
|
24
|
+
// we explicitly process queued mutations and disconnect and reconnect
|
|
25
|
+
// the observer until MutationObserver gets an `unobserve` method
|
|
26
|
+
// see https://github.com/whatwg/dom/issues/126
|
|
27
|
+
processMutations(mutationObserver.takeRecords());
|
|
28
|
+
mutationObserver.disconnect();
|
|
29
|
+
for (const [element] of observed.entries()) {
|
|
30
|
+
mutationObserver.observe(element, observerOptions);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function processMutations(mutations) {
|
|
34
|
+
mutations.forEach(({ target }) => {
|
|
35
|
+
forceUpdate(target);
|
|
36
|
+
});
|
|
26
37
|
}
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { HTMLElement, createEvent, h, Host, proxyCustomElement } from '@stencil/core/internal/client';
|
|
6
6
|
import { t as toggleChildActionText, C as CalciteExpandToggle, o as overflowActionsDebounceInMs, q as queryActions, a as overflowActions, g as getOverflowCount } from './CalciteExpandToggle.js';
|
|
7
7
|
import { f as focusElement, b as getSlotted } from './dom.js';
|
|
8
8
|
import { c as createObserver } from './observers.js';
|
|
9
|
+
import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot.js';
|
|
9
10
|
import { d as defineCustomElement$8 } from './calcite-action2.js';
|
|
10
11
|
import { d as defineCustomElement$7 } from './calcite-action-group2.js';
|
|
11
12
|
import { d as defineCustomElement$6 } from './calcite-action-menu2.js';
|
|
@@ -27,28 +28,6 @@ const TEXT = {
|
|
|
27
28
|
collapse: "Collapse"
|
|
28
29
|
};
|
|
29
30
|
|
|
30
|
-
const slotChangedMap = new WeakMap();
|
|
31
|
-
function onSlotChange() {
|
|
32
|
-
forceUpdate(this);
|
|
33
|
-
}
|
|
34
|
-
const eventType = "slotchange";
|
|
35
|
-
/**
|
|
36
|
-
* Helper to set up a conditional slot component on connectedCallback.
|
|
37
|
-
*/
|
|
38
|
-
function connectConditionalSlotComponent(component) {
|
|
39
|
-
const boundSlotChange = onSlotChange.bind(component);
|
|
40
|
-
component.el.shadowRoot.addEventListener(eventType, boundSlotChange);
|
|
41
|
-
slotChangedMap.set(component, boundSlotChange);
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Helper to tear down a conditional slot component on disconnectedCallback.
|
|
45
|
-
*/
|
|
46
|
-
function disconnectConditionalSlotComponent(component) {
|
|
47
|
-
const boundSlotChange = slotChangedMap.get(component);
|
|
48
|
-
component.el.shadowRoot.removeEventListener(eventType, boundSlotChange);
|
|
49
|
-
slotChangedMap.delete(component);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
31
|
const calciteActionBarCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:host{-webkit-box-sizing:border-box;box-sizing:border-box;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-2);font-size:var(--calcite-font-size--1)}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{pointer-events:auto;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-item-align:stretch;align-self:stretch;max-width:15vw}:host([overflow-actions-disabled]){overflow-y:auto}:host([expanded]){max-width:20vw}::slotted(calcite-action-group){border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}::slotted(calcite-action-group:last-child){border-bottom-width:0px}.action-group--bottom{-ms-flex-positive:1;flex-grow:1;-ms-flex-pack:end;justify-content:flex-end;padding-bottom:0px}";
|
|
53
32
|
|
|
54
33
|
let CalciteActionBar$1 = class extends HTMLElement {
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { HTMLElement, h, Fragment, proxyCustomElement } from '@stencil/core/internal/client';
|
|
6
6
|
import { b as getSlotted } from './dom.js';
|
|
7
7
|
import { S as SLOTS$1, d as defineCustomElement$5 } from './calcite-action-menu2.js';
|
|
8
|
+
import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot.js';
|
|
8
9
|
import { d as defineCustomElement$6 } from './calcite-action2.js';
|
|
9
10
|
import { d as defineCustomElement$4 } from './calcite-icon2.js';
|
|
10
11
|
import { d as defineCustomElement$3 } from './calcite-loader2.js';
|
|
@@ -60,6 +61,17 @@ let CalciteActionGroup = class extends HTMLElement {
|
|
|
60
61
|
}
|
|
61
62
|
// --------------------------------------------------------------------------
|
|
62
63
|
//
|
|
64
|
+
// Lifecycle
|
|
65
|
+
//
|
|
66
|
+
// --------------------------------------------------------------------------
|
|
67
|
+
connectedCallback() {
|
|
68
|
+
connectConditionalSlotComponent(this);
|
|
69
|
+
}
|
|
70
|
+
disconnectedCallback() {
|
|
71
|
+
disconnectConditionalSlotComponent(this);
|
|
72
|
+
}
|
|
73
|
+
// --------------------------------------------------------------------------
|
|
74
|
+
//
|
|
63
75
|
// Component Methods
|
|
64
76
|
//
|
|
65
77
|
// --------------------------------------------------------------------------
|
|
@@ -7,6 +7,7 @@ import { b as getSlotted, f as focusElement } from './dom.js';
|
|
|
7
7
|
import { g as getRoundRobinIndex } from './array.js';
|
|
8
8
|
import { g as guid } from './guid.js';
|
|
9
9
|
import { c as createObserver } from './observers.js';
|
|
10
|
+
import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot.js';
|
|
10
11
|
import { d as defineCustomElement$5 } from './calcite-action2.js';
|
|
11
12
|
import { d as defineCustomElement$4 } from './calcite-icon2.js';
|
|
12
13
|
import { d as defineCustomElement$3 } from './calcite-loader2.js';
|
|
@@ -237,11 +238,13 @@ let CalciteActionMenu = class extends HTMLElement {
|
|
|
237
238
|
var _a;
|
|
238
239
|
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(this.el, { childList: true, subtree: true });
|
|
239
240
|
this.getActions();
|
|
241
|
+
connectConditionalSlotComponent(this);
|
|
240
242
|
}
|
|
241
243
|
disconnectedCallback() {
|
|
242
244
|
var _a;
|
|
243
245
|
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
244
246
|
this.disconnectMenuButtonEl();
|
|
247
|
+
disconnectConditionalSlotComponent(this);
|
|
245
248
|
}
|
|
246
249
|
expandedHandler() {
|
|
247
250
|
this.open = false;
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { HTMLElement, createEvent, h, Host, proxyCustomElement } from '@stencil/core/internal/client';
|
|
6
6
|
import { t as toggleChildActionText, C as CalciteExpandToggle } from './CalciteExpandToggle.js';
|
|
7
7
|
import { f as focusElement, b as getSlotted } from './dom.js';
|
|
8
|
+
import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot.js';
|
|
8
9
|
import { d as defineCustomElement$8 } from './calcite-action2.js';
|
|
9
10
|
import { d as defineCustomElement$7 } from './calcite-action-group2.js';
|
|
10
11
|
import { d as defineCustomElement$6 } from './calcite-action-menu2.js';
|
|
@@ -88,6 +89,12 @@ let CalciteActionPad$1 = class extends HTMLElement {
|
|
|
88
89
|
// Lifecycle
|
|
89
90
|
//
|
|
90
91
|
// --------------------------------------------------------------------------
|
|
92
|
+
connectedCallback() {
|
|
93
|
+
connectConditionalSlotComponent(this);
|
|
94
|
+
}
|
|
95
|
+
disconnectedCallback() {
|
|
96
|
+
disconnectConditionalSlotComponent(this);
|
|
97
|
+
}
|
|
91
98
|
componentWillLoad() {
|
|
92
99
|
const { el, expandDisabled, expanded } = this;
|
|
93
100
|
if (!expandDisabled) {
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { HTMLElement, createEvent, h, Host, proxyCustomElement } from '@stencil/core/internal/client';
|
|
6
6
|
import { b as getSlotted } from './dom.js';
|
|
7
7
|
import { C as CalciteHeading } from './CalciteHeading.js';
|
|
8
|
+
import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot.js';
|
|
8
9
|
import { d as defineCustomElement$9 } from './calcite-action2.js';
|
|
9
10
|
import { d as defineCustomElement$8 } from './calcite-action-menu2.js';
|
|
10
11
|
import { d as defineCustomElement$7 } from './calcite-handle2.js';
|
|
@@ -105,6 +106,17 @@ let CalciteBlock$1 = class extends HTMLElement {
|
|
|
105
106
|
}
|
|
106
107
|
// --------------------------------------------------------------------------
|
|
107
108
|
//
|
|
109
|
+
// Lifecycle
|
|
110
|
+
//
|
|
111
|
+
// --------------------------------------------------------------------------
|
|
112
|
+
connectedCallback() {
|
|
113
|
+
connectConditionalSlotComponent(this);
|
|
114
|
+
}
|
|
115
|
+
disconnectedCallback() {
|
|
116
|
+
disconnectConditionalSlotComponent(this);
|
|
117
|
+
}
|
|
118
|
+
// --------------------------------------------------------------------------
|
|
119
|
+
//
|
|
108
120
|
// Render Methods
|
|
109
121
|
//
|
|
110
122
|
// --------------------------------------------------------------------------
|
|
@@ -118,7 +130,7 @@ let CalciteBlock$1 = class extends HTMLElement {
|
|
|
118
130
|
const showingLoadingStatus = this.loading && !this.open;
|
|
119
131
|
const statusIcon = showingLoadingStatus ? ICONS.refresh : ICONS[status];
|
|
120
132
|
const hasIcon = getSlotted(el, SLOTS.icon) || statusIcon;
|
|
121
|
-
const iconEl = !statusIcon ? (h("slot", { name: SLOTS.icon })) : (h("calcite-icon", { class: {
|
|
133
|
+
const iconEl = !statusIcon ? (h("slot", { key: "icon-slot", name: SLOTS.icon })) : (h("calcite-icon", { class: {
|
|
122
134
|
[CSS.statusIcon]: true,
|
|
123
135
|
[CSS.valid]: status == "valid",
|
|
124
136
|
[CSS.invalid]: status == "invalid",
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { HTMLElement, createEvent, h, proxyCustomElement } from '@stencil/core/internal/client';
|
|
6
6
|
import { b as getSlotted } from './dom.js';
|
|
7
7
|
import { g as guid } from './guid.js';
|
|
8
|
+
import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot.js';
|
|
8
9
|
import { d as defineCustomElement$1 } from './calcite-icon2.js';
|
|
9
10
|
|
|
10
11
|
const CSS = {
|
|
@@ -61,6 +62,17 @@ let CalciteChip = class extends HTMLElement {
|
|
|
61
62
|
};
|
|
62
63
|
this.guid = guid();
|
|
63
64
|
}
|
|
65
|
+
// --------------------------------------------------------------------------
|
|
66
|
+
//
|
|
67
|
+
// Lifecycle
|
|
68
|
+
//
|
|
69
|
+
// --------------------------------------------------------------------------
|
|
70
|
+
connectedCallback() {
|
|
71
|
+
connectConditionalSlotComponent(this);
|
|
72
|
+
}
|
|
73
|
+
disconnectedCallback() {
|
|
74
|
+
disconnectConditionalSlotComponent(this);
|
|
75
|
+
}
|
|
64
76
|
//--------------------------------------------------------------------------
|
|
65
77
|
//
|
|
66
78
|
// Public Methods
|
|
@@ -79,7 +91,7 @@ let CalciteChip = class extends HTMLElement {
|
|
|
79
91
|
renderChipImage() {
|
|
80
92
|
const { el } = this;
|
|
81
93
|
const hasChipImage = getSlotted(el, SLOTS.image);
|
|
82
|
-
return hasChipImage ? (h("div", { class: CSS.chipImageContainer }, h("slot", { name: SLOTS.image }))) : null;
|
|
94
|
+
return hasChipImage ? (h("div", { class: CSS.chipImageContainer, key: "image" }, h("slot", { name: SLOTS.image }))) : null;
|
|
83
95
|
}
|
|
84
96
|
render() {
|
|
85
97
|
const iconEl = (h("calcite-icon", { class: CSS.calciteChipIcon, flipRtl: this.iconFlipRtl, icon: this.icon, scale: "s" }));
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { HTMLElement, h, Host, proxyCustomElement } from '@stencil/core/internal/client';
|
|
6
6
|
import { b as getSlotted } from './dom.js';
|
|
7
|
+
import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot.js';
|
|
7
8
|
|
|
8
9
|
const CSS = {
|
|
9
10
|
container: "container",
|
|
@@ -48,6 +49,17 @@ let CalciteListItem$1 = class extends HTMLElement {
|
|
|
48
49
|
}
|
|
49
50
|
// --------------------------------------------------------------------------
|
|
50
51
|
//
|
|
52
|
+
// Lifecycle
|
|
53
|
+
//
|
|
54
|
+
// --------------------------------------------------------------------------
|
|
55
|
+
connectedCallback() {
|
|
56
|
+
connectConditionalSlotComponent(this);
|
|
57
|
+
}
|
|
58
|
+
disconnectedCallback() {
|
|
59
|
+
disconnectConditionalSlotComponent(this);
|
|
60
|
+
}
|
|
61
|
+
// --------------------------------------------------------------------------
|
|
62
|
+
//
|
|
51
63
|
// Public Methods
|
|
52
64
|
//
|
|
53
65
|
// --------------------------------------------------------------------------
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { HTMLElement, createEvent, h, Host, proxyCustomElement } from '@stencil/core/internal/client';
|
|
6
6
|
import { f as focusElement, b as getSlotted, h as ensureId, i as isCalciteFocusable } from './dom.js';
|
|
7
7
|
import { c as createObserver } from './observers.js';
|
|
8
|
+
import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot.js';
|
|
8
9
|
import { d as defineCustomElement$4 } from './calcite-icon2.js';
|
|
9
10
|
import { d as defineCustomElement$3 } from './calcite-loader2.js';
|
|
10
11
|
import { d as defineCustomElement$2 } from './calcite-scrim2.js';
|
|
@@ -244,11 +245,13 @@ let CalciteModal$1 = class extends HTMLElement {
|
|
|
244
245
|
var _a;
|
|
245
246
|
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(this.el, { childList: true, subtree: true });
|
|
246
247
|
this.updateFooterVisibility();
|
|
248
|
+
connectConditionalSlotComponent(this);
|
|
247
249
|
}
|
|
248
250
|
disconnectedCallback() {
|
|
249
251
|
var _a;
|
|
250
252
|
this.removeOverflowHiddenClass();
|
|
251
253
|
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
254
|
+
disconnectConditionalSlotComponent(this);
|
|
252
255
|
}
|
|
253
256
|
render() {
|
|
254
257
|
return (h(Host, { "aria-describedby": this.contentId, "aria-labelledby": this.titleId, "aria-modal": "true", role: "dialog" }, h("calcite-scrim", { class: CSS.scrim, onClick: this.handleOutsideClose }), this.renderStyle(), h("div", { class: "modal", onTransitionEnd: this.transitionEnd }, h("div", { "data-focus-fence": true, onFocus: this.focusLastElement, tabindex: "0" }), h("div", { class: CSS.header }, this.renderCloseButton(), h("header", { class: CSS.title }, h("slot", { name: CSS.header }))), h("div", { class: {
|
|
@@ -258,10 +261,10 @@ let CalciteModal$1 = class extends HTMLElement {
|
|
|
258
261
|
}, ref: (el) => (this.modalContent = el) }, h("slot", { name: SLOTS.content })), this.renderFooter(), h("div", { "data-focus-fence": true, onFocus: this.focusFirstElement, tabindex: "0" }))));
|
|
259
262
|
}
|
|
260
263
|
renderFooter() {
|
|
261
|
-
return this.hasFooter ? (h("div", { class: CSS.footer }, h("span", { class: CSS.back }, h("slot", { name: SLOTS.back })), h("span", { class: CSS.secondary }, h("slot", { name: SLOTS.secondary })), h("span", { class: CSS.primary }, h("slot", { name: SLOTS.primary })))) : null;
|
|
264
|
+
return this.hasFooter ? (h("div", { class: CSS.footer, key: "footer" }, h("span", { class: CSS.back }, h("slot", { name: SLOTS.back })), h("span", { class: CSS.secondary }, h("slot", { name: SLOTS.secondary })), h("span", { class: CSS.primary }, h("slot", { name: SLOTS.primary })))) : null;
|
|
262
265
|
}
|
|
263
266
|
renderCloseButton() {
|
|
264
|
-
return !this.disableCloseButton ? (h("button", { "aria-label": this.intlClose, class: CSS.close, onClick: this.close, ref: (el) => (this.closeButtonEl = el), title: this.intlClose }, h("calcite-icon", { icon: ICONS.close, scale: this.scale === "s" ? "s" : this.scale === "m" ? "m" : this.scale === "l" ? "l" : null }))) : null;
|
|
267
|
+
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 }, h("calcite-icon", { icon: ICONS.close, scale: this.scale === "s" ? "s" : this.scale === "m" ? "m" : this.scale === "l" ? "l" : null }))) : null;
|
|
265
268
|
}
|
|
266
269
|
renderStyle() {
|
|
267
270
|
const hasCustomWidth = !isNaN(parseInt(`${this.width}`));
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { HTMLElement, createEvent, h, proxyCustomElement } from '@stencil/core/internal/client';
|
|
6
6
|
import { S as StatusIcons } from './interfaces.js';
|
|
7
7
|
import { s as setRequestedIcon, b as getSlotted } from './dom.js';
|
|
8
|
+
import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot.js';
|
|
8
9
|
import { d as defineCustomElement$2 } from './calcite-icon2.js';
|
|
9
10
|
|
|
10
11
|
const TEXT = {
|
|
@@ -70,6 +71,12 @@ let CalciteNotice$1 = class extends HTMLElement {
|
|
|
70
71
|
// Lifecycle
|
|
71
72
|
//
|
|
72
73
|
//--------------------------------------------------------------------------
|
|
74
|
+
connectedCallback() {
|
|
75
|
+
connectConditionalSlotComponent(this);
|
|
76
|
+
}
|
|
77
|
+
disconnectedCallback() {
|
|
78
|
+
disconnectConditionalSlotComponent(this);
|
|
79
|
+
}
|
|
73
80
|
componentWillLoad() {
|
|
74
81
|
this.requestedIcon = setRequestedIcon(StatusIcons, this.icon, this.color);
|
|
75
82
|
}
|
|
@@ -6,6 +6,7 @@ import { HTMLElement, createEvent, h, Fragment, proxyCustomElement } from '@sten
|
|
|
6
6
|
import { a as getElementDir, b as getSlotted } from './dom.js';
|
|
7
7
|
import { C as CalciteHeading } from './CalciteHeading.js';
|
|
8
8
|
import { S as SLOTS$1, d as defineCustomElement$7 } from './calcite-action-menu2.js';
|
|
9
|
+
import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot.js';
|
|
9
10
|
import { d as defineCustomElement$8 } from './calcite-action2.js';
|
|
10
11
|
import { d as defineCustomElement$6 } from './calcite-icon2.js';
|
|
11
12
|
import { d as defineCustomElement$5 } from './calcite-loader2.js';
|
|
@@ -129,6 +130,17 @@ let CalcitePanel$1 = class extends HTMLElement {
|
|
|
129
130
|
}
|
|
130
131
|
// --------------------------------------------------------------------------
|
|
131
132
|
//
|
|
133
|
+
// Lifecycle
|
|
134
|
+
//
|
|
135
|
+
// --------------------------------------------------------------------------
|
|
136
|
+
connectedCallback() {
|
|
137
|
+
connectConditionalSlotComponent(this);
|
|
138
|
+
}
|
|
139
|
+
disconnectedCallback() {
|
|
140
|
+
disconnectConditionalSlotComponent(this);
|
|
141
|
+
}
|
|
142
|
+
// --------------------------------------------------------------------------
|
|
143
|
+
//
|
|
132
144
|
// Methods
|
|
133
145
|
//
|
|
134
146
|
// --------------------------------------------------------------------------
|
|
@@ -168,7 +180,7 @@ let CalcitePanel$1 = class extends HTMLElement {
|
|
|
168
180
|
* Allows user to override the entire header-content node.
|
|
169
181
|
*/
|
|
170
182
|
renderHeaderSlottedContent() {
|
|
171
|
-
return (h("div", { class: CSS.headerContent, key: "header-content" }, h("slot", { name: SLOTS.headerContent })));
|
|
183
|
+
return (h("div", { class: CSS.headerContent, key: "slotted-header-content" }, h("slot", { name: SLOTS.headerContent })));
|
|
172
184
|
}
|
|
173
185
|
renderHeaderStartActions() {
|
|
174
186
|
const { el } = this;
|
|
@@ -186,7 +198,7 @@ let CalcitePanel$1 = class extends HTMLElement {
|
|
|
186
198
|
renderMenu() {
|
|
187
199
|
const { el, intlOptions, menuOpen } = this;
|
|
188
200
|
const hasMenuItems = getSlotted(el, SLOTS.headerMenuActions);
|
|
189
|
-
return hasMenuItems ? (h("calcite-action-menu", { flipPlacements: ["top", "bottom"], label: intlOptions || TEXT.options, open: menuOpen, placement: "bottom-end" }, h("calcite-action", { icon: ICONS.menu, slot: SLOTS$1.trigger, text: intlOptions || TEXT.options }), h("slot", { name: SLOTS.headerMenuActions }))) : null;
|
|
201
|
+
return hasMenuItems ? (h("calcite-action-menu", { flipPlacements: ["top", "bottom"], key: "menu", label: intlOptions || TEXT.options, open: menuOpen, placement: "bottom-end" }, h("calcite-action", { icon: ICONS.menu, slot: SLOTS$1.trigger, text: intlOptions || TEXT.options }), h("slot", { name: SLOTS.headerMenuActions }))) : null;
|
|
190
202
|
}
|
|
191
203
|
renderHeaderNode() {
|
|
192
204
|
const { el, showBackButton } = this;
|
|
@@ -204,18 +216,11 @@ let CalcitePanel$1 = class extends HTMLElement {
|
|
|
204
216
|
headerMenuNode ||
|
|
205
217
|
showBackButton ? (h("header", { class: CSS.header }, backButtonNode, actionsNodeStart, headerContentNode, actionsNodeEnd, headerMenuNode)) : null;
|
|
206
218
|
}
|
|
207
|
-
|
|
208
|
-
* Allows user to override the entire footer node.
|
|
209
|
-
*/
|
|
210
|
-
renderFooterSlottedContent() {
|
|
219
|
+
renderFooterNode() {
|
|
211
220
|
const { el } = this;
|
|
212
221
|
const hasFooterSlottedContent = getSlotted(el, SLOTS.footer);
|
|
213
|
-
return hasFooterSlottedContent ? (h("footer", { class: CSS.footer }, h("slot", { name: SLOTS.footer }))) : null;
|
|
214
|
-
}
|
|
215
|
-
renderFooterActions() {
|
|
216
|
-
const { el } = this;
|
|
217
222
|
const hasFooterActions = getSlotted(el, SLOTS.footerActions);
|
|
218
|
-
return hasFooterActions ? (h("footer", { class: CSS.footer }, h("slot", { name: SLOTS.footerActions }))) : null;
|
|
223
|
+
return hasFooterSlottedContent || hasFooterActions ? (h("footer", { class: CSS.footer, key: "footer" }, hasFooterSlottedContent ? h("slot", { key: "footer-slot", name: SLOTS.footer }) : null, hasFooterActions ? h("slot", { key: "footer-actions-slot", name: SLOTS.footerActions }) : null)) : null;
|
|
219
224
|
}
|
|
220
225
|
renderContent() {
|
|
221
226
|
const { el } = this;
|
|
@@ -227,7 +232,7 @@ let CalcitePanel$1 = class extends HTMLElement {
|
|
|
227
232
|
}
|
|
228
233
|
render() {
|
|
229
234
|
const { dismissed, disabled, dismissible, loading, panelKeyDownHandler } = this;
|
|
230
|
-
const panelNode = (h("article", { "aria-busy": loading.toString(), class: CSS.container, hidden: dismissible && dismissed, onKeyDown: panelKeyDownHandler, ref: this.setContainerRef, tabIndex: dismissible ? 0 : -1 }, this.renderHeaderNode(), this.renderContent(), this.
|
|
235
|
+
const panelNode = (h("article", { "aria-busy": loading.toString(), class: CSS.container, hidden: dismissible && dismissed, onKeyDown: panelKeyDownHandler, ref: this.setContainerRef, tabIndex: dismissible ? 0 : -1 }, this.renderHeaderNode(), this.renderContent(), this.renderFooterNode()));
|
|
231
236
|
return (h(Fragment, null, loading || disabled ? h("calcite-scrim", { loading: loading }) : null, panelNode));
|
|
232
237
|
}
|
|
233
238
|
get el() { return this; }
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { HTMLElement, h, Fragment, proxyCustomElement } from '@stencil/core/internal/client';
|
|
6
6
|
import { b as getSlotted } from './dom.js';
|
|
7
7
|
import { C as CalciteHeading, c as constrainHeadingLevel } from './CalciteHeading.js';
|
|
8
|
+
import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot.js';
|
|
8
9
|
|
|
9
10
|
const CSS = {
|
|
10
11
|
heading: "heading",
|
|
@@ -26,6 +27,17 @@ let CalcitePickListGroup$1 = class extends HTMLElement {
|
|
|
26
27
|
}
|
|
27
28
|
// --------------------------------------------------------------------------
|
|
28
29
|
//
|
|
30
|
+
// Lifecycle
|
|
31
|
+
//
|
|
32
|
+
// --------------------------------------------------------------------------
|
|
33
|
+
connectedCallback() {
|
|
34
|
+
connectConditionalSlotComponent(this);
|
|
35
|
+
}
|
|
36
|
+
disconnectedCallback() {
|
|
37
|
+
disconnectConditionalSlotComponent(this);
|
|
38
|
+
}
|
|
39
|
+
// --------------------------------------------------------------------------
|
|
40
|
+
//
|
|
29
41
|
// Render Methods
|
|
30
42
|
//
|
|
31
43
|
// --------------------------------------------------------------------------
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { HTMLElement, createEvent, h, Fragment, proxyCustomElement } from '@stencil/core/internal/client';
|
|
6
6
|
import { I as ICON_TYPES } from './resources3.js';
|
|
7
7
|
import { b as getSlotted } from './dom.js';
|
|
8
|
+
import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot.js';
|
|
8
9
|
import { d as defineCustomElement$3 } from './calcite-action2.js';
|
|
9
10
|
import { d as defineCustomElement$2 } from './calcite-icon2.js';
|
|
10
11
|
import { d as defineCustomElement$1 } from './calcite-loader2.js';
|
|
@@ -125,6 +126,17 @@ let CalcitePickListItem = class extends HTMLElement {
|
|
|
125
126
|
}
|
|
126
127
|
// --------------------------------------------------------------------------
|
|
127
128
|
//
|
|
129
|
+
// Lifecycle
|
|
130
|
+
//
|
|
131
|
+
// --------------------------------------------------------------------------
|
|
132
|
+
connectedCallback() {
|
|
133
|
+
connectConditionalSlotComponent(this);
|
|
134
|
+
}
|
|
135
|
+
disconnectedCallback() {
|
|
136
|
+
disconnectConditionalSlotComponent(this);
|
|
137
|
+
}
|
|
138
|
+
// --------------------------------------------------------------------------
|
|
139
|
+
//
|
|
128
140
|
// Public Methods
|
|
129
141
|
//
|
|
130
142
|
// --------------------------------------------------------------------------
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { HTMLElement, h, Fragment, proxyCustomElement } from '@stencil/core/internal/client';
|
|
6
6
|
import { b as getSlotted } from './dom.js';
|
|
7
|
+
import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot.js';
|
|
7
8
|
|
|
8
9
|
const CSS = {
|
|
9
10
|
actionBarContainer: "action-bar-container",
|
|
@@ -40,6 +41,17 @@ let CalciteShellCenterRow$1 = class extends HTMLElement {
|
|
|
40
41
|
}
|
|
41
42
|
// --------------------------------------------------------------------------
|
|
42
43
|
//
|
|
44
|
+
// Lifecycle
|
|
45
|
+
//
|
|
46
|
+
// --------------------------------------------------------------------------
|
|
47
|
+
connectedCallback() {
|
|
48
|
+
connectConditionalSlotComponent(this);
|
|
49
|
+
}
|
|
50
|
+
disconnectedCallback() {
|
|
51
|
+
disconnectConditionalSlotComponent(this);
|
|
52
|
+
}
|
|
53
|
+
// --------------------------------------------------------------------------
|
|
54
|
+
//
|
|
43
55
|
// Render Methods
|
|
44
56
|
//
|
|
45
57
|
// --------------------------------------------------------------------------
|
|
@@ -47,7 +59,7 @@ let CalciteShellCenterRow$1 = class extends HTMLElement {
|
|
|
47
59
|
const { el } = this;
|
|
48
60
|
const contentNode = (h("div", { class: CSS.content }, h("slot", null)));
|
|
49
61
|
const actionBar = getSlotted(el, SLOTS.actionBar);
|
|
50
|
-
const actionBarNode = actionBar ? (h("div", { class: CSS.actionBarContainer }, h("slot", { name: SLOTS.actionBar }))) : null;
|
|
62
|
+
const actionBarNode = actionBar ? (h("div", { class: CSS.actionBarContainer, key: "action-bar" }, h("slot", { name: SLOTS.actionBar }))) : null;
|
|
51
63
|
const children = [actionBarNode, contentNode];
|
|
52
64
|
if ((actionBar === null || actionBar === void 0 ? void 0 : actionBar.position) === "end") {
|
|
53
65
|
children.reverse();
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { HTMLElement, createEvent, h, forceUpdate, proxyCustomElement } from '@stencil/core/internal/client';
|
|
6
6
|
import { a as getElementDir, b as getSlotted } from './dom.js';
|
|
7
7
|
import { c as clamp } from './math.js';
|
|
8
|
+
import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot.js';
|
|
8
9
|
|
|
9
10
|
const CSS = {
|
|
10
11
|
container: "container",
|
|
@@ -169,7 +170,11 @@ let CalciteShellPanel$1 = class extends HTMLElement {
|
|
|
169
170
|
// Lifecycle
|
|
170
171
|
//
|
|
171
172
|
//--------------------------------------------------------------------------
|
|
173
|
+
connectedCallback() {
|
|
174
|
+
connectConditionalSlotComponent(this);
|
|
175
|
+
}
|
|
172
176
|
disconnectedCallback() {
|
|
177
|
+
disconnectConditionalSlotComponent(this);
|
|
173
178
|
this.disconnectSeparator();
|
|
174
179
|
}
|
|
175
180
|
componentDidLoad() {
|
|
@@ -183,14 +188,14 @@ let CalciteShellPanel$1 = class extends HTMLElement {
|
|
|
183
188
|
renderHeader() {
|
|
184
189
|
const { el } = this;
|
|
185
190
|
const hasHeader = getSlotted(el, SLOTS.header);
|
|
186
|
-
return hasHeader ? (h("div", { class: CSS.contentHeader }, h("slot", { name: SLOTS.header }))) : null;
|
|
191
|
+
return hasHeader ? (h("div", { class: CSS.contentHeader, key: "header" }, h("slot", { name: SLOTS.header }))) : null;
|
|
187
192
|
}
|
|
188
193
|
render() {
|
|
189
194
|
const { collapsed, detached, position, initialContentWidth, contentWidth, contentWidthMax, contentWidthMin, intlResize, resizable } = this;
|
|
190
195
|
const allowResizing = !detached && resizable;
|
|
191
|
-
const contentNode = (h("div", { class: { [CSS.content]: true, [CSS.contentDetached]: detached }, hidden: collapsed, ref: this.storeContentEl, style: allowResizing && contentWidth ? { width: `${contentWidth}px` } : null }, this.renderHeader(), h("div", { class: CSS.contentBody }, h("slot", null))));
|
|
192
|
-
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;
|
|
193
|
-
const actionBarNode = h("slot", { name: SLOTS.actionBar });
|
|
196
|
+
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 }, this.renderHeader(), h("div", { class: CSS.contentBody }, h("slot", null))));
|
|
197
|
+
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;
|
|
198
|
+
const actionBarNode = h("slot", { key: "action-bar", name: SLOTS.actionBar });
|
|
194
199
|
const mainNodes = [actionBarNode, contentNode, separatorNode];
|
|
195
200
|
if (position === "end") {
|
|
196
201
|
mainNodes.reverse();
|