@esri/calcite-components 1.0.0-next.365 → 1.0.0-next.369
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-0389f96b.system.entry.js +5 -0
- package/dist/calcite/{p-f95fb85f.entry.js → p-04bf684c.entry.js} +1 -1
- package/dist/calcite/p-0a5d059d.js +5 -0
- package/dist/calcite/{p-02589ad3.system.entry.js → p-0faf1684.system.entry.js} +1 -1
- package/dist/calcite/{p-a348ffb1.system.entry.js → p-10b1b39a.system.entry.js} +1 -1
- package/dist/calcite/p-1b06ada3.entry.js +5 -0
- package/dist/calcite/p-203e951b.system.entry.js +5 -0
- package/dist/calcite/{p-bda51610.entry.js → p-242fdd67.entry.js} +1 -1
- package/dist/calcite/p-24b54c99.system.entry.js +5 -0
- package/dist/calcite/p-283ff9e8.entry.js +5 -0
- package/dist/calcite/{p-897fc280.system.entry.js → p-2d411997.system.entry.js} +1 -1
- package/dist/calcite/{p-e2094dff.system.entry.js → p-2e351904.system.entry.js} +1 -1
- package/dist/calcite/p-341eef4e.entry.js +5 -0
- package/dist/calcite/{p-2b48aa8c.entry.js → p-4641ef1f.entry.js} +1 -1
- package/dist/calcite/p-492d644c.system.entry.js +5 -0
- package/dist/calcite/{p-7cf09784.system.entry.js → p-4b3160ad.system.entry.js} +1 -1
- package/dist/calcite/{p-46b63d75.entry.js → p-4c021c5c.entry.js} +1 -1
- package/dist/calcite/p-4c6fe413.system.entry.js +5 -0
- package/dist/calcite/{p-e6d14bc5.system.entry.js → p-4dcae709.system.entry.js} +1 -1
- package/dist/calcite/p-4ef2119c.entry.js +5 -0
- package/dist/calcite/p-57584243.system.entry.js +5 -0
- package/dist/calcite/p-57bf81c4.system.entry.js +5 -0
- package/dist/calcite/p-590d13bd.entry.js +5 -0
- package/dist/calcite/p-5aaa0088.system.entry.js +5 -0
- package/dist/calcite/{p-ba000c59.entry.js → p-5b7d5f36.entry.js} +1 -1
- package/dist/calcite/{p-436d9f0e.system.entry.js → p-67e13029.system.entry.js} +1 -1
- package/dist/calcite/p-6b8dcbb0.entry.js +5 -0
- package/dist/calcite/{p-16cfe8e8.entry.js → p-6c4bec59.entry.js} +1 -1
- package/dist/calcite/p-6de78659.system.entry.js +5 -0
- package/dist/calcite/p-6fa59c8c.entry.js +5 -0
- package/dist/calcite/p-7165e37e.entry.js +5 -0
- package/dist/calcite/{p-f4614b28.system.entry.js → p-77279f88.system.entry.js} +1 -1
- package/dist/calcite/p-7cba1720.system.entry.js +5 -0
- package/dist/calcite/p-7db0947c.entry.js +5 -0
- package/dist/calcite/p-7f50128c.system.entry.js +5 -0
- package/dist/calcite/p-84defe75.system.entry.js +5 -0
- package/dist/calcite/p-8f647ab0.system.entry.js +5 -0
- package/dist/calcite/p-92de4a81.entry.js +5 -0
- package/dist/calcite/p-950b42e3.entry.js +5 -0
- package/dist/calcite/p-96808ed2.entry.js +5 -0
- package/dist/calcite/p-99d32fc3.system.js +1 -1
- package/dist/calcite/p-a25ebce7.entry.js +5 -0
- package/dist/calcite/p-a5c73259.entry.js +5 -0
- package/dist/calcite/{p-409d0a3f.entry.js → p-a980b2df.entry.js} +1 -1
- package/dist/calcite/p-ab14b0a2.system.js +5 -0
- package/dist/calcite/{p-db10485b.system.js → p-ac4aec20.system.js} +1 -1
- package/dist/calcite/p-b052f523.entry.js +5 -0
- package/dist/calcite/p-b9a47a94.system.entry.js +5 -0
- package/dist/calcite/p-bb20e0fc.system.entry.js +5 -0
- package/dist/calcite/{p-209f2049.entry.js → p-bde80af8.entry.js} +1 -1
- package/dist/calcite/p-c029ffb1.entry.js +5 -0
- package/dist/calcite/p-d908834f.system.entry.js +5 -0
- package/dist/calcite/p-de09fc5c.system.entry.js +5 -0
- package/dist/calcite/p-ea510477.js +5 -0
- package/dist/calcite/p-ee7e311e.system.entry.js +5 -0
- package/dist/calcite/{p-d5d91f34.system.entry.js → p-f044fcc5.system.entry.js} +1 -1
- package/dist/calcite/p-f385d631.entry.js +5 -0
- package/dist/calcite/p-fe94050d.entry.js +5 -0
- package/dist/calcite/p-fee6af61.entry.js +5 -0
- package/dist/cjs/calcite-action-bar.cjs.entry.js +4 -25
- package/dist/cjs/calcite-action-group.cjs.entry.js +13 -0
- package/dist/cjs/calcite-action-menu.cjs.entry.js +4 -1
- package/dist/cjs/calcite-action-pad.cjs.entry.js +8 -0
- package/dist/cjs/calcite-action.cjs.entry.js +2 -2
- package/dist/cjs/calcite-block_2.cjs.entry.js +14 -1
- package/dist/cjs/calcite-button.cjs.entry.js +1 -1
- package/dist/cjs/calcite-chip.cjs.entry.js +14 -1
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +1 -1
- package/dist/cjs/calcite-dropdown_3.cjs.entry.js +1 -1
- package/dist/cjs/calcite-flow.cjs.entry.js +1 -1
- package/dist/cjs/calcite-graph_2.cjs.entry.js +4 -4
- package/dist/cjs/calcite-icon.cjs.entry.js +1 -1
- package/dist/cjs/calcite-link.cjs.entry.js +13 -2
- package/dist/cjs/calcite-list_3.cjs.entry.js +13 -0
- package/dist/cjs/calcite-modal.cjs.entry.js +6 -3
- package/dist/cjs/calcite-notice.cjs.entry.js +8 -0
- package/dist/cjs/calcite-option_3.cjs.entry.js +1 -1
- package/dist/cjs/calcite-panel.cjs.entry.js +18 -12
- package/dist/cjs/calcite-pick-list_3.cjs.entry.js +24 -1
- package/dist/cjs/calcite-shell_3.cjs.entry.js +35 -7
- package/dist/cjs/calcite-sortable-list.cjs.entry.js +1 -1
- package/dist/cjs/calcite-tab_4.cjs.entry.js +1 -1
- package/dist/cjs/calcite-tile.cjs.entry.js +13 -0
- package/dist/cjs/calcite-tip_3.cjs.entry.js +14 -2
- package/dist/cjs/calcite-tree_2.cjs.entry.js +6 -0
- package/dist/cjs/calcite-value-list_2.cjs.entry.js +13 -1
- package/dist/cjs/calcite.cjs.js +1 -1
- package/dist/cjs/conditionalSlot-92505fba.js +43 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{observers-41837607.js → observers-79bfb8bc.js} +5 -1
- package/dist/collection/components/calcite-action/calcite-action.css +1 -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-link/calcite-link.js +31 -2
- 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-slider/calcite-slider.css +3 -0
- package/dist/collection/components/calcite-slider/calcite-slider.js +2 -2
- 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/collection/utils/globalAttributes.js +59 -0
- package/dist/collection/utils/observers.js +5 -1
- 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-action2.js +1 -1
- package/dist/components/calcite-block.js +13 -1
- package/dist/components/calcite-chip2.js +13 -1
- package/dist/components/calcite-link2.js +14 -2
- 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-slider.js +3 -3
- 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/components/observers.js +5 -1
- package/dist/custom-elements/index.js +217 -43
- package/dist/esm/calcite-action-bar.entry.js +3 -24
- package/dist/esm/calcite-action-group.entry.js +13 -0
- package/dist/esm/calcite-action-menu.entry.js +4 -1
- package/dist/esm/calcite-action-pad.entry.js +8 -0
- package/dist/esm/calcite-action.entry.js +2 -2
- package/dist/esm/calcite-block_2.entry.js +14 -1
- package/dist/esm/calcite-button.entry.js +1 -1
- package/dist/esm/calcite-chip.entry.js +14 -1
- package/dist/esm/calcite-combobox_3.entry.js +1 -1
- package/dist/esm/calcite-dropdown_3.entry.js +1 -1
- package/dist/esm/calcite-flow.entry.js +1 -1
- package/dist/esm/calcite-graph_2.entry.js +4 -4
- package/dist/esm/calcite-icon.entry.js +1 -1
- package/dist/esm/calcite-link.entry.js +13 -2
- package/dist/esm/calcite-list_3.entry.js +13 -0
- package/dist/esm/calcite-modal.entry.js +6 -3
- package/dist/esm/calcite-notice.entry.js +8 -0
- package/dist/esm/calcite-option_3.entry.js +1 -1
- package/dist/esm/calcite-panel.entry.js +18 -12
- package/dist/esm/calcite-pick-list_3.entry.js +24 -1
- package/dist/esm/calcite-shell_3.entry.js +35 -7
- package/dist/esm/calcite-sortable-list.entry.js +1 -1
- package/dist/esm/calcite-tab_4.entry.js +1 -1
- package/dist/esm/calcite-tile.entry.js +13 -0
- package/dist/esm/calcite-tip_3.entry.js +14 -2
- package/dist/esm/calcite-tree_2.entry.js +6 -0
- package/dist/esm/calcite-value-list_2.entry.js +13 -1
- package/dist/esm/calcite.js +1 -1
- package/dist/esm/conditionalSlot-9e7d8609.js +40 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{observers-8f0bc419.js → observers-46118290.js} +5 -1
- package/dist/esm-es5/calcite-action-bar.entry.js +1 -1
- 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-action.entry.js +1 -1
- package/dist/esm-es5/calcite-block_2.entry.js +1 -1
- package/dist/esm-es5/calcite-button.entry.js +1 -1
- package/dist/esm-es5/calcite-chip.entry.js +2 -2
- package/dist/esm-es5/calcite-combobox_3.entry.js +1 -1
- package/dist/esm-es5/calcite-dropdown_3.entry.js +1 -1
- package/dist/esm-es5/calcite-flow.entry.js +1 -1
- package/dist/esm-es5/calcite-graph_2.entry.js +1 -1
- package/dist/esm-es5/calcite-icon.entry.js +1 -1
- package/dist/esm-es5/calcite-link.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-option_3.entry.js +1 -1
- 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-sortable-list.entry.js +1 -1
- package/dist/esm-es5/calcite-tab_4.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/calcite.js +1 -1
- package/dist/esm-es5/conditionalSlot-9e7d8609.js +5 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{observers-8f0bc419.js → observers-46118290.js} +1 -1
- package/dist/extras/docs-json.json +21 -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-link/calcite-link.d.ts +5 -0
- 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/dist/types/components.d.ts +8 -0
- package/dist/types/utils/globalAttributes.d.ts +35 -0
- package/hydrate/index.js +213 -42
- package/package.json +1 -2
- package/readme.md +0 -30
- package/dist/calcite/p-02856c5a.system.entry.js +0 -5
- 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-20d2db84.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-4d22b788.entry.js +0 -5
- package/dist/calcite/p-54e271c9.system.entry.js +0 -5
- package/dist/calcite/p-57558d4b.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-9bfe6679.system.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-e4acb5a8.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
|
@@ -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();
|
|
@@ -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() {
|
|
@@ -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
|
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
+
*/
|
|
5
|
+
import { createObserver } from "./observers";
|
|
6
|
+
const allowedGlobalAttributes = ["lang"];
|
|
7
|
+
const elementToComponentAndObserverOptionsMap = new Map();
|
|
8
|
+
let mutationObserver;
|
|
9
|
+
function updateGlobalAttributes(component, attributeFilter) {
|
|
10
|
+
const { el } = component;
|
|
11
|
+
const updatedAttributes = {};
|
|
12
|
+
attributeFilter
|
|
13
|
+
.filter((attr) => !!allowedGlobalAttributes.includes(attr) && !!el.hasAttribute(attr))
|
|
14
|
+
.forEach((attr) => {
|
|
15
|
+
const value = el.getAttribute(attr);
|
|
16
|
+
if (value !== null) {
|
|
17
|
+
updatedAttributes[attr] = value;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
component.globalAttributes = updatedAttributes;
|
|
21
|
+
}
|
|
22
|
+
function processMutations(mutations) {
|
|
23
|
+
mutations.forEach(({ target }) => {
|
|
24
|
+
const [component, options] = elementToComponentAndObserverOptionsMap.get(target);
|
|
25
|
+
updateGlobalAttributes(component, options.attributeFilter);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Helper to set up listening for changes to global attributes.
|
|
30
|
+
*
|
|
31
|
+
* render(): VNode {
|
|
32
|
+
* const lang = this.inheritedAttributes['lang'] ?? 'en';
|
|
33
|
+
* return <div>My lang is {lang}</div>;
|
|
34
|
+
* }
|
|
35
|
+
*/
|
|
36
|
+
export function watchGlobalAttributes(component, attributeFilter) {
|
|
37
|
+
const { el } = component;
|
|
38
|
+
const observerOptions = { attributeFilter };
|
|
39
|
+
elementToComponentAndObserverOptionsMap.set(el, [component, observerOptions]);
|
|
40
|
+
updateGlobalAttributes(component, attributeFilter);
|
|
41
|
+
if (!mutationObserver) {
|
|
42
|
+
mutationObserver = createObserver("mutation", processMutations);
|
|
43
|
+
}
|
|
44
|
+
mutationObserver.observe(el, observerOptions);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Helper remove listening for changes to inherited attributes.
|
|
48
|
+
*/
|
|
49
|
+
export function unwatchGlobalAttributes(component) {
|
|
50
|
+
elementToComponentAndObserverOptionsMap.delete(component.el);
|
|
51
|
+
// we explicitly process queued mutations and disconnect and reconnect
|
|
52
|
+
// the observer until MutationObserver gets an `unobserve` method
|
|
53
|
+
// see https://github.com/whatwg/dom/issues/126
|
|
54
|
+
processMutations(mutationObserver.takeRecords());
|
|
55
|
+
mutationObserver.disconnect();
|
|
56
|
+
for (const [element, [, observerOptions]] of elementToComponentAndObserverOptionsMap.entries()) {
|
|
57
|
+
mutationObserver.observe(element, observerOptions);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -15,5 +15,9 @@ export function createObserver(type, callback, options) {
|
|
|
15
15
|
return Build.isBrowser ? new Observer(callback, options) : undefined;
|
|
16
16
|
}
|
|
17
17
|
function getObserver(type) {
|
|
18
|
-
return (type === "intersection"
|
|
18
|
+
return (type === "intersection"
|
|
19
|
+
? window.IntersectionObserver
|
|
20
|
+
: type === "mutation"
|
|
21
|
+
? window.MutationObserver
|
|
22
|
+
: window.ResizeObserver);
|
|
19
23
|
}
|
|
@@ -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) {
|
|
@@ -21,7 +21,7 @@ const TEXT = {
|
|
|
21
21
|
loading: "Loading"
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
const calciteActionCss = "@-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{display:-ms-flexbox;display:flex;background-color:transparent}:host([disabled]){pointer-events:none}.button{position:relative;margin:0px;display:-ms-flexbox;display:flex;width:auto;cursor:pointer;-ms-flex-align:center;align-items:center;-ms-flex-pack:start;justify-content:flex-start;border-style:none;background-color:var(--calcite-ui-foreground-1);fill:var(--calcite-ui-text-3);font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-3);outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;font-family:inherit;text-align:unset}.button:hover{background-color:var(--calcite-ui-foreground-2);fill:var(--calcite-ui-text-1);color:var(--calcite-ui-text-1)}.button:focus{background-color:var(--calcite-ui-foreground-2);fill:var(--calcite-ui-text-1);color:var(--calcite-ui-text-1);outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.button:active{background-color:var(--calcite-ui-foreground-3)}.button .icon-container{pointer-events:none;margin:0px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:1rem;min-height:1rem}.button .text-container{margin:0px;width:0px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1rem;opacity:0;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-property:width;transition-property:width}.button .text-container--visible{width:auto;-ms-flex:1 1 auto;flex:1 1 auto;opacity:1}:host([scale=s]) .button{padding:0.5rem;font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-normal)}:host([scale=s]) .button--text-visible .icon-container{-webkit-margin-end:0.5rem;margin-inline-end:0.5rem}:host([scale=m]) .button{padding:1rem;font-size:var(--calcite-font-size--1);line-height:1rem;font-weight:var(--calcite-font-weight-normal)}:host([scale=m]) .button--text-visible .icon-container{-webkit-margin-end:0.75rem;margin-inline-end:0.75rem}:host([scale=l]) .button{padding:1.25rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;font-weight:var(--calcite-font-weight-normal)}:host([scale=l]) .button--text-visible .icon-container{-webkit-margin-end:1rem;margin-inline-end:1rem}:host([alignment=center]) .button{-ms-flex-pack:center;justify-content:center}:host([alignment=end]) .button{-ms-flex-pack:end;justify-content:flex-end}:host([alignment=center]) .button .text-container--visible,:host([alignment=end]) .button .text-container--visible{-ms-flex:0 1 auto;flex:0 1 auto}:host([scale=s][compact]) .button,:host([scale=m][compact]) .button,:host([scale=l][compact]) .button{padding-left:0px;padding-right:0px}.slot-container{display:-ms-flexbox;display:flex}.slot-container--hidden{display:none}.button--text-visible{width:100%}:host([active]) .button,:host([active]) .button:hover,:host([active]) .button:focus,:host([active][loading]) .button{background-color:var(--calcite-ui-foreground-3);fill:var(--calcite-ui-text-1);color:var(--calcite-ui-text-1)}:host([active]) .button:active{background-color:var(--calcite-ui-foreground-1)}:host([appearance=clear]) .button{background-color:transparent;-webkit-transition-property:-webkit-box-shadow;transition-property:-webkit-box-shadow;transition-property:box-shadow;transition-property:box-shadow, -webkit-box-shadow;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host([appearance=clear]) .button:hover,:host([appearance=clear]) .button:focus{background-color:transparent;-webkit-box-shadow:0 0 0 2px var(--calcite-ui-border-1) inset;box-shadow:0 0 0 2px var(--calcite-ui-border-1) inset}:host([active][appearance=clear]) .button,:host([active][appearance=clear]) .button:hover,:host([active][appearance=clear]) .button:focus{background-color:var(--calcite-ui-foreground-3);fill:var(--calcite-ui-text-1);color:var(--calcite-ui-text-1)}:host([appearance=clear][loading]) .button,:host([appearance=clear][disabled]) .button{background-color:transparent}:host([loading]) .button,:host([loading]) .button:hover,:host([loading]) .button:focus{background-color:var(--calcite-ui-foreground-1)}:host([loading]) .button .text-container,:host([loading]) .button:hover .text-container,:host([loading]) .button:focus .text-container{opacity:var(--calcite-ui-opacity-disabled)}:host([loading]) calcite-loader[inline]{margin-right:0px;color:var(--calcite-ui-text-3)}:host([disabled]) .button,:host([disabled]) .button:hover,:host([disabled]) .button:focus{cursor:default;background-color:var(--calcite-ui-foreground-1);opacity:var(--calcite-ui-opacity-disabled)}:host([disabled][active]) .button,:host([disabled][active]) .button:hover,:host([disabled][active]) .button:focus{background-color:var(--calcite-ui-foreground-3);opacity:var(--calcite-ui-opacity-disabled)}:host([indicator]) .button::after{content:\"\";position:absolute;z-index:10;height:0.5rem;width:0.5rem;border-radius:9999px;border-width:2px;background-color:var(--calcite-ui-brand);border-color:var(--calcite-ui-foreground-1);inset-block-end:0.75rem;inset-inline-end:0.75rem}:host([indicator]) .button--text-visible::after{inset-block-end:auto}:host([indicator]) .button--text-visible .text-container--visible{-webkit-margin-end:1rem;margin-inline-end:1rem}:host([indicator]) .button:hover::after,:host([indicator]) .button:focus::after{border-color:var(--calcite-ui-foreground-1)}:host([indicator][scale=s]) .button::after{inset-block-end:0.25rem;inset-inline-end:0.25rem}:host([indicator][scale=s]) .button--text-visible::after{inset-block-end:auto;inset-inline-end:0.5rem}:host([indicator][active]) .button::after{border-color:var(--calcite-ui-foreground-3)}";
|
|
24
|
+
const calciteActionCss = "@-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{display:-ms-flexbox;display:flex;background-color:transparent}:host([disabled]){pointer-events:none}.button{position:relative;margin:0px;display:-ms-flexbox;display:flex;width:auto;cursor:pointer;-ms-flex-align:center;align-items:center;-ms-flex-pack:start;justify-content:flex-start;border-style:none;background-color:var(--calcite-ui-foreground-1);fill:var(--calcite-ui-text-3);font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-3);outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;font-family:inherit;text-align:unset;-ms-flex:1 0 auto;flex:1 0 auto}.button:hover{background-color:var(--calcite-ui-foreground-2);fill:var(--calcite-ui-text-1);color:var(--calcite-ui-text-1)}.button:focus{background-color:var(--calcite-ui-foreground-2);fill:var(--calcite-ui-text-1);color:var(--calcite-ui-text-1);outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.button:active{background-color:var(--calcite-ui-foreground-3)}.button .icon-container{pointer-events:none;margin:0px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:1rem;min-height:1rem}.button .text-container{margin:0px;width:0px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1rem;opacity:0;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-property:width;transition-property:width}.button .text-container--visible{width:auto;-ms-flex:1 1 auto;flex:1 1 auto;opacity:1}:host([scale=s]) .button{padding:0.5rem;font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-normal)}:host([scale=s]) .button--text-visible .icon-container{-webkit-margin-end:0.5rem;margin-inline-end:0.5rem}:host([scale=m]) .button{padding:1rem;font-size:var(--calcite-font-size--1);line-height:1rem;font-weight:var(--calcite-font-weight-normal)}:host([scale=m]) .button--text-visible .icon-container{-webkit-margin-end:0.75rem;margin-inline-end:0.75rem}:host([scale=l]) .button{padding:1.25rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;font-weight:var(--calcite-font-weight-normal)}:host([scale=l]) .button--text-visible .icon-container{-webkit-margin-end:1rem;margin-inline-end:1rem}:host([alignment=center]) .button{-ms-flex-pack:center;justify-content:center}:host([alignment=end]) .button{-ms-flex-pack:end;justify-content:flex-end}:host([alignment=center]) .button .text-container--visible,:host([alignment=end]) .button .text-container--visible{-ms-flex:0 1 auto;flex:0 1 auto}:host([scale=s][compact]) .button,:host([scale=m][compact]) .button,:host([scale=l][compact]) .button{padding-left:0px;padding-right:0px}.slot-container{display:-ms-flexbox;display:flex}.slot-container--hidden{display:none}.button--text-visible{width:100%}:host([active]) .button,:host([active]) .button:hover,:host([active]) .button:focus,:host([active][loading]) .button{background-color:var(--calcite-ui-foreground-3);fill:var(--calcite-ui-text-1);color:var(--calcite-ui-text-1)}:host([active]) .button:active{background-color:var(--calcite-ui-foreground-1)}:host([appearance=clear]) .button{background-color:transparent;-webkit-transition-property:-webkit-box-shadow;transition-property:-webkit-box-shadow;transition-property:box-shadow;transition-property:box-shadow, -webkit-box-shadow;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host([appearance=clear]) .button:hover,:host([appearance=clear]) .button:focus{background-color:transparent;-webkit-box-shadow:0 0 0 2px var(--calcite-ui-border-1) inset;box-shadow:0 0 0 2px var(--calcite-ui-border-1) inset}:host([active][appearance=clear]) .button,:host([active][appearance=clear]) .button:hover,:host([active][appearance=clear]) .button:focus{background-color:var(--calcite-ui-foreground-3);fill:var(--calcite-ui-text-1);color:var(--calcite-ui-text-1)}:host([appearance=clear][loading]) .button,:host([appearance=clear][disabled]) .button{background-color:transparent}:host([loading]) .button,:host([loading]) .button:hover,:host([loading]) .button:focus{background-color:var(--calcite-ui-foreground-1)}:host([loading]) .button .text-container,:host([loading]) .button:hover .text-container,:host([loading]) .button:focus .text-container{opacity:var(--calcite-ui-opacity-disabled)}:host([loading]) calcite-loader[inline]{margin-right:0px;color:var(--calcite-ui-text-3)}:host([disabled]) .button,:host([disabled]) .button:hover,:host([disabled]) .button:focus{cursor:default;background-color:var(--calcite-ui-foreground-1);opacity:var(--calcite-ui-opacity-disabled)}:host([disabled][active]) .button,:host([disabled][active]) .button:hover,:host([disabled][active]) .button:focus{background-color:var(--calcite-ui-foreground-3);opacity:var(--calcite-ui-opacity-disabled)}:host([indicator]) .button::after{content:\"\";position:absolute;z-index:10;height:0.5rem;width:0.5rem;border-radius:9999px;border-width:2px;background-color:var(--calcite-ui-brand);border-color:var(--calcite-ui-foreground-1);inset-block-end:0.75rem;inset-inline-end:0.75rem}:host([indicator]) .button--text-visible::after{inset-block-end:auto}:host([indicator]) .button--text-visible .text-container--visible{-webkit-margin-end:1rem;margin-inline-end:1rem}:host([indicator]) .button:hover::after,:host([indicator]) .button:focus::after{border-color:var(--calcite-ui-foreground-1)}:host([indicator][scale=s]) .button::after{inset-block-end:0.25rem;inset-inline-end:0.25rem}:host([indicator][scale=s]) .button--text-visible::after{inset-block-end:auto;inset-inline-end:0.5rem}:host([indicator][active]) .button::after{border-color:var(--calcite-ui-foreground-3)}";
|
|
25
25
|
|
|
26
26
|
let CalciteAction = class extends HTMLElement {
|
|
27
27
|
constructor() {
|
|
@@ -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",
|