@esri/calcite-components 1.0.0-next.419 → 1.0.0-next.421
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-e65b6bfb.entry.js → p-46071f17.entry.js} +1 -1
- package/dist/calcite/p-5802a565.entry.js +5 -0
- package/dist/calcite/p-5c637131.entry.js +5 -0
- package/dist/calcite/p-b0827b8c.system.entry.js +5 -0
- package/dist/calcite/p-b2b6f712.js +5 -0
- package/dist/calcite/{p-dd460534.system.entry.js → p-b9a38a28.system.entry.js} +2 -2
- package/dist/calcite/{p-3b707a1c.system.entry.js → p-c2caeb2a.system.entry.js} +1 -1
- package/dist/calcite/p-e55c5bb4.entry.js +5 -0
- package/dist/calcite/{p-3cdee187.system.entry.js → p-eb3c084f.system.entry.js} +1 -1
- package/dist/calcite/p-ecc31b40.system.entry.js +5 -0
- package/dist/calcite/p-f68725d7.entry.js +5 -0
- package/dist/calcite/p-fa922721.system.js +5 -0
- package/dist/calcite/p-fe9380a0.system.js +1 -1
- package/dist/cjs/calcite-action-bar.cjs.entry.js +4 -11
- package/dist/cjs/calcite-action-pad.cjs.entry.js +3 -13
- package/dist/cjs/calcite-dropdown_3.cjs.entry.js +26 -23
- package/dist/cjs/calcite-pick-list_3.cjs.entry.js +6 -16
- package/dist/cjs/calcite-value-list_2.cjs.entry.js +1 -1
- package/dist/cjs/{resources-daf15d54.js → resources-e43fc9f3.js} +14 -1
- package/dist/collection/components/action-bar/action-bar.js +4 -11
- package/dist/collection/components/action-pad/action-pad.js +3 -15
- package/dist/collection/components/dropdown/dropdown.js +15 -18
- package/dist/collection/components/dropdown-item/dropdown-item.js +11 -5
- package/dist/collection/components/pick-list/shared-list-logic.js +2 -1
- package/dist/components/calcite-action-bar.js +4 -11
- package/dist/components/calcite-action-pad.js +3 -13
- package/dist/components/calcite-dropdown-item.js +11 -5
- package/dist/components/calcite-pick-list-group.js +1 -10
- package/dist/components/calcite-tip-manager.js +1 -1
- package/dist/components/calcite-tip.js +1 -1
- package/dist/components/dropdown.js +15 -18
- package/dist/components/resources4.js +5 -22
- package/dist/components/resources5.js +32 -0
- package/dist/components/shared-list-render.js +4 -3
- package/dist/custom-elements/index.js +44 -58
- package/dist/esm/calcite-action-bar.entry.js +4 -11
- package/dist/esm/calcite-action-pad.entry.js +3 -13
- package/dist/esm/calcite-dropdown_3.entry.js +26 -23
- package/dist/esm/calcite-pick-list_3.entry.js +1 -11
- package/dist/esm/calcite-value-list_2.entry.js +1 -1
- package/dist/esm/{resources-cbfcf4a3.js → resources-b5c3d9a7.js} +12 -2
- package/dist/esm-es5/calcite-action-bar.entry.js +1 -1
- package/dist/esm-es5/calcite-action-pad.entry.js +2 -2
- package/dist/esm-es5/calcite-dropdown_3.entry.js +1 -1
- package/dist/esm-es5/calcite-pick-list_3.entry.js +1 -1
- package/dist/esm-es5/calcite-value-list_2.entry.js +1 -1
- package/dist/esm-es5/resources-b5c3d9a7.js +5 -0
- package/dist/extras/docs-json.json +1 -1
- package/dist/types/components/action-bar/action-bar.d.ts +1 -1
- package/dist/types/components/action-pad/action-pad.d.ts +0 -1
- package/dist/types/components/dropdown-item/dropdown-item.d.ts +2 -0
- package/hydrate/index.js +44 -58
- package/package.json +1 -1
- package/dist/calcite/p-184049cb.entry.js +0 -5
- package/dist/calcite/p-1b1bca2d.entry.js +0 -5
- package/dist/calcite/p-4730df46.js +0 -5
- package/dist/calcite/p-57e0428a.system.entry.js +0 -5
- package/dist/calcite/p-7dfd6480.system.entry.js +0 -5
- package/dist/calcite/p-c33f47d5.system.js +0 -5
- package/dist/calcite/p-c5c42405.entry.js +0 -5
- package/dist/calcite/p-e5a7ca2a.entry.js +0 -5
- package/dist/esm-es5/resources-cbfcf4a3.js +0 -5
|
@@ -2161,16 +2161,11 @@ const ActionBar = class extends HTMLElement$1 {
|
|
|
2161
2161
|
this.expandToggleEl = el;
|
|
2162
2162
|
};
|
|
2163
2163
|
}
|
|
2164
|
-
expandHandler(
|
|
2165
|
-
if (!expandDisabled) {
|
|
2166
|
-
toggleChildActionText({ parent: this.el, expanded: this.expanded });
|
|
2167
|
-
}
|
|
2164
|
+
expandHandler() {
|
|
2168
2165
|
this.conditionallyOverflowActions();
|
|
2169
2166
|
}
|
|
2170
2167
|
expandedHandler(expanded) {
|
|
2171
|
-
|
|
2172
|
-
toggleChildActionText({ parent: this.el, expanded });
|
|
2173
|
-
}
|
|
2168
|
+
toggleChildActionText({ parent: this.el, expanded });
|
|
2174
2169
|
this.calciteActionBarToggle.emit();
|
|
2175
2170
|
}
|
|
2176
2171
|
overflowDisabledHandler(overflowActionsDisabled) {
|
|
@@ -2188,10 +2183,8 @@ const ActionBar = class extends HTMLElement$1 {
|
|
|
2188
2183
|
}
|
|
2189
2184
|
connectedCallback() {
|
|
2190
2185
|
var _a, _b;
|
|
2191
|
-
const { el,
|
|
2192
|
-
|
|
2193
|
-
toggleChildActionText({ parent: el, expanded });
|
|
2194
|
-
}
|
|
2186
|
+
const { el, expanded } = this;
|
|
2187
|
+
toggleChildActionText({ parent: el, expanded });
|
|
2195
2188
|
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(el, { childList: true, subtree: true });
|
|
2196
2189
|
if (!this.overflowActionsDisabled) {
|
|
2197
2190
|
(_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.observe(el);
|
|
@@ -2663,15 +2656,8 @@ const ActionPad = class extends HTMLElement$1 {
|
|
|
2663
2656
|
this.expandToggleEl = el;
|
|
2664
2657
|
};
|
|
2665
2658
|
}
|
|
2666
|
-
expandHandler(expandDisabled) {
|
|
2667
|
-
if (!expandDisabled) {
|
|
2668
|
-
toggleChildActionText({ parent: this.el, expanded: this.expanded });
|
|
2669
|
-
}
|
|
2670
|
-
}
|
|
2671
2659
|
expandedHandler(expanded) {
|
|
2672
|
-
|
|
2673
|
-
toggleChildActionText({ parent: this.el, expanded });
|
|
2674
|
-
}
|
|
2660
|
+
toggleChildActionText({ parent: this.el, expanded });
|
|
2675
2661
|
this.calciteActionPadToggle.emit();
|
|
2676
2662
|
}
|
|
2677
2663
|
// --------------------------------------------------------------------------
|
|
@@ -2686,10 +2672,8 @@ const ActionPad = class extends HTMLElement$1 {
|
|
|
2686
2672
|
disconnectConditionalSlotComponent(this);
|
|
2687
2673
|
}
|
|
2688
2674
|
componentWillLoad() {
|
|
2689
|
-
const { el,
|
|
2690
|
-
|
|
2691
|
-
toggleChildActionText({ parent: el, expanded });
|
|
2692
|
-
}
|
|
2675
|
+
const { el, expanded } = this;
|
|
2676
|
+
toggleChildActionText({ parent: el, expanded });
|
|
2693
2677
|
}
|
|
2694
2678
|
// --------------------------------------------------------------------------
|
|
2695
2679
|
//
|
|
@@ -2722,7 +2706,6 @@ const ActionPad = class extends HTMLElement$1 {
|
|
|
2722
2706
|
}
|
|
2723
2707
|
get el() { return this; }
|
|
2724
2708
|
static get watchers() { return {
|
|
2725
|
-
"expandDisabled": ["expandHandler"],
|
|
2726
2709
|
"expanded": ["expandedHandler"]
|
|
2727
2710
|
}; }
|
|
2728
2711
|
static get style() { return actionPadCss; }
|
|
@@ -11671,25 +11654,22 @@ const Dropdown = class extends HTMLElement$1 {
|
|
|
11671
11654
|
};
|
|
11672
11655
|
this.keyDownHandler = (e) => {
|
|
11673
11656
|
const target = e.target;
|
|
11657
|
+
if (target !== this.referenceEl) {
|
|
11658
|
+
return;
|
|
11659
|
+
}
|
|
11674
11660
|
const key = e.key;
|
|
11675
|
-
if (this.
|
|
11676
|
-
this.
|
|
11677
|
-
|
|
11678
|
-
|
|
11679
|
-
|
|
11680
|
-
|
|
11681
|
-
|
|
11682
|
-
|
|
11683
|
-
|
|
11684
|
-
|
|
11685
|
-
|
|
11686
|
-
|
|
11687
|
-
this.openCalciteDropdown();
|
|
11688
|
-
break;
|
|
11689
|
-
case "Escape":
|
|
11690
|
-
this.closeCalciteDropdown();
|
|
11691
|
-
break;
|
|
11692
|
-
}
|
|
11661
|
+
if (this.active && (key === "Escape" || (e.shiftKey && key === "Tab"))) {
|
|
11662
|
+
this.closeCalciteDropdown();
|
|
11663
|
+
return;
|
|
11664
|
+
}
|
|
11665
|
+
switch (key) {
|
|
11666
|
+
case " ":
|
|
11667
|
+
case "Enter":
|
|
11668
|
+
this.openCalciteDropdown();
|
|
11669
|
+
break;
|
|
11670
|
+
case "Escape":
|
|
11671
|
+
this.closeCalciteDropdown();
|
|
11672
|
+
break;
|
|
11693
11673
|
}
|
|
11694
11674
|
};
|
|
11695
11675
|
this.focusOnFirstActiveOrFirstItem = () => {
|
|
@@ -12055,12 +12035,11 @@ const DropdownItem = class extends HTMLElement$1 {
|
|
|
12055
12035
|
// Lifecycle
|
|
12056
12036
|
//
|
|
12057
12037
|
//--------------------------------------------------------------------------
|
|
12038
|
+
componentWillLoad() {
|
|
12039
|
+
this.initialize();
|
|
12040
|
+
}
|
|
12058
12041
|
connectedCallback() {
|
|
12059
|
-
this.
|
|
12060
|
-
this.parentDropdownGroupEl = this.el.closest("calcite-dropdown-group");
|
|
12061
|
-
if (this.selectionMode === "none") {
|
|
12062
|
-
this.active = false;
|
|
12063
|
-
}
|
|
12042
|
+
this.initialize();
|
|
12064
12043
|
}
|
|
12065
12044
|
render() {
|
|
12066
12045
|
const scale = getElementProp(this.el, "scale", "m");
|
|
@@ -12143,6 +12122,13 @@ const DropdownItem = class extends HTMLElement$1 {
|
|
|
12143
12122
|
// Private Methods
|
|
12144
12123
|
//
|
|
12145
12124
|
//--------------------------------------------------------------------------
|
|
12125
|
+
initialize() {
|
|
12126
|
+
this.selectionMode = getElementProp(this.el, "selection-mode", "single");
|
|
12127
|
+
this.parentDropdownGroupEl = this.el.closest("calcite-dropdown-group");
|
|
12128
|
+
if (this.selectionMode === "none") {
|
|
12129
|
+
this.active = false;
|
|
12130
|
+
}
|
|
12131
|
+
}
|
|
12146
12132
|
determineActiveItem() {
|
|
12147
12133
|
switch (this.selectionMode) {
|
|
12148
12134
|
case "multi":
|
|
@@ -16046,6 +16032,16 @@ const SLOTS$b = {
|
|
|
16046
16032
|
menuActions: "menu-actions"
|
|
16047
16033
|
};
|
|
16048
16034
|
|
|
16035
|
+
const CSS$i = {
|
|
16036
|
+
heading: "heading",
|
|
16037
|
+
container: "container",
|
|
16038
|
+
indented: "container--indented"
|
|
16039
|
+
};
|
|
16040
|
+
const SLOTS$a = {
|
|
16041
|
+
parentItem: "parent-item"
|
|
16042
|
+
};
|
|
16043
|
+
const HEADING_LEVEL$3 = 3;
|
|
16044
|
+
|
|
16049
16045
|
function mutationObserverCallback() {
|
|
16050
16046
|
this.setUpItems();
|
|
16051
16047
|
this.setUpFilter();
|
|
@@ -16181,7 +16177,7 @@ function removeItem(event) {
|
|
|
16181
16177
|
}
|
|
16182
16178
|
const item = event.target;
|
|
16183
16179
|
const selectedValues = this.selectedValues;
|
|
16184
|
-
if (item.parentElement.tagName === "CALCITE-PICK-LIST-GROUP") {
|
|
16180
|
+
if (item.parentElement.tagName === "CALCITE-PICK-LIST-GROUP" && item.slot === SLOTS$a.parentItem) {
|
|
16185
16181
|
item.parentElement.remove();
|
|
16186
16182
|
Array.from(item.parentElement.children).forEach((item) => selectedValues.delete(item.value));
|
|
16187
16183
|
}
|
|
@@ -16483,16 +16479,6 @@ const PickList = class extends HTMLElement$1 {
|
|
|
16483
16479
|
static get style() { return pickListCss; }
|
|
16484
16480
|
};
|
|
16485
16481
|
|
|
16486
|
-
const CSS$i = {
|
|
16487
|
-
heading: "heading",
|
|
16488
|
-
container: "container",
|
|
16489
|
-
indented: "container--indented"
|
|
16490
|
-
};
|
|
16491
|
-
const SLOTS$a = {
|
|
16492
|
-
parentItem: "parent-item"
|
|
16493
|
-
};
|
|
16494
|
-
const HEADING_LEVEL$3 = 3;
|
|
16495
|
-
|
|
16496
16482
|
const pickListGroupCss = "@-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}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{margin-bottom:0.25rem;-webkit-box-sizing:border-box;box-sizing:border-box;display:block;background-color:transparent;font-size:var(--calcite-font-size--1);color:var(--calcite-ui-text-2)}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}:host(:last-child){margin-bottom:0px}.header{margin:0px;display:-ms-flexbox;display:flex;-ms-flex-line-pack:justify;align-content:space-between;-ms-flex-align:center;align-items:center;fill:var(--calcite-ui-text-2);color:var(--calcite-ui-text-2)}.heading{margin:0px;padding:0px;font-weight:var(--calcite-font-weight-medium)}.header .heading{-ms-flex:1 1 auto;flex:1 1 auto;padding:0.5rem}h1.heading{font-size:var(--calcite-font-size-2);line-height:1.5rem}h2.heading{font-size:var(--calcite-font-size-1);line-height:1.5rem}h3.heading{font-size:var(--calcite-font-size-0);line-height:1.25rem}h4.heading,h5.heading{font-size:var(--calcite-font-size--1);line-height:1rem}h3.heading{margin-top:0.5rem;margin-bottom:0.5rem;margin-left:1rem;margin-right:1rem;font-size:var(--calcite-font-size--1);line-height:1.375;color:var(--calcite-ui-text-3)}.container--indented{-webkit-margin-start:1.5rem;margin-inline-start:1.5rem}";
|
|
16497
16483
|
|
|
16498
16484
|
const PickListGroup = class extends HTMLElement$1 {
|
|
@@ -111,16 +111,11 @@ const ActionBar = class {
|
|
|
111
111
|
this.expandToggleEl = el;
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
|
-
expandHandler(
|
|
115
|
-
if (!expandDisabled) {
|
|
116
|
-
toggleChildActionText({ parent: this.el, expanded: this.expanded });
|
|
117
|
-
}
|
|
114
|
+
expandHandler() {
|
|
118
115
|
this.conditionallyOverflowActions();
|
|
119
116
|
}
|
|
120
117
|
expandedHandler(expanded) {
|
|
121
|
-
|
|
122
|
-
toggleChildActionText({ parent: this.el, expanded });
|
|
123
|
-
}
|
|
118
|
+
toggleChildActionText({ parent: this.el, expanded });
|
|
124
119
|
this.calciteActionBarToggle.emit();
|
|
125
120
|
}
|
|
126
121
|
overflowDisabledHandler(overflowActionsDisabled) {
|
|
@@ -138,10 +133,8 @@ const ActionBar = class {
|
|
|
138
133
|
}
|
|
139
134
|
connectedCallback() {
|
|
140
135
|
var _a, _b;
|
|
141
|
-
const { el,
|
|
142
|
-
|
|
143
|
-
toggleChildActionText({ parent: el, expanded });
|
|
144
|
-
}
|
|
136
|
+
const { el, expanded } = this;
|
|
137
|
+
toggleChildActionText({ parent: el, expanded });
|
|
145
138
|
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(el, { childList: true, subtree: true });
|
|
146
139
|
if (!this.overflowActionsDisabled) {
|
|
147
140
|
(_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.observe(el);
|
|
@@ -68,15 +68,8 @@ const ActionPad = class {
|
|
|
68
68
|
this.expandToggleEl = el;
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
|
-
expandHandler(expandDisabled) {
|
|
72
|
-
if (!expandDisabled) {
|
|
73
|
-
toggleChildActionText({ parent: this.el, expanded: this.expanded });
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
71
|
expandedHandler(expanded) {
|
|
77
|
-
|
|
78
|
-
toggleChildActionText({ parent: this.el, expanded });
|
|
79
|
-
}
|
|
72
|
+
toggleChildActionText({ parent: this.el, expanded });
|
|
80
73
|
this.calciteActionPadToggle.emit();
|
|
81
74
|
}
|
|
82
75
|
// --------------------------------------------------------------------------
|
|
@@ -91,10 +84,8 @@ const ActionPad = class {
|
|
|
91
84
|
disconnectConditionalSlotComponent(this);
|
|
92
85
|
}
|
|
93
86
|
componentWillLoad() {
|
|
94
|
-
const { el,
|
|
95
|
-
|
|
96
|
-
toggleChildActionText({ parent: el, expanded });
|
|
97
|
-
}
|
|
87
|
+
const { el, expanded } = this;
|
|
88
|
+
toggleChildActionText({ parent: el, expanded });
|
|
98
89
|
}
|
|
99
90
|
// --------------------------------------------------------------------------
|
|
100
91
|
//
|
|
@@ -127,7 +118,6 @@ const ActionPad = class {
|
|
|
127
118
|
}
|
|
128
119
|
get el() { return getElement(this); }
|
|
129
120
|
static get watchers() { return {
|
|
130
|
-
"expandDisabled": ["expandHandler"],
|
|
131
121
|
"expanded": ["expandedHandler"]
|
|
132
122
|
}; }
|
|
133
123
|
};
|
|
@@ -106,25 +106,22 @@ const Dropdown = class {
|
|
|
106
106
|
};
|
|
107
107
|
this.keyDownHandler = (e) => {
|
|
108
108
|
const target = e.target;
|
|
109
|
+
if (target !== this.referenceEl) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
109
112
|
const key = e.key;
|
|
110
|
-
if (this.
|
|
111
|
-
this.
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
this.openCalciteDropdown();
|
|
123
|
-
break;
|
|
124
|
-
case "Escape":
|
|
125
|
-
this.closeCalciteDropdown();
|
|
126
|
-
break;
|
|
127
|
-
}
|
|
113
|
+
if (this.active && (key === "Escape" || (e.shiftKey && key === "Tab"))) {
|
|
114
|
+
this.closeCalciteDropdown();
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
switch (key) {
|
|
118
|
+
case " ":
|
|
119
|
+
case "Enter":
|
|
120
|
+
this.openCalciteDropdown();
|
|
121
|
+
break;
|
|
122
|
+
case "Escape":
|
|
123
|
+
this.closeCalciteDropdown();
|
|
124
|
+
break;
|
|
128
125
|
}
|
|
129
126
|
};
|
|
130
127
|
this.focusOnFirstActiveOrFirstItem = () => {
|
|
@@ -486,12 +483,11 @@ const DropdownItem = class {
|
|
|
486
483
|
// Lifecycle
|
|
487
484
|
//
|
|
488
485
|
//--------------------------------------------------------------------------
|
|
486
|
+
componentWillLoad() {
|
|
487
|
+
this.initialize();
|
|
488
|
+
}
|
|
489
489
|
connectedCallback() {
|
|
490
|
-
this.
|
|
491
|
-
this.parentDropdownGroupEl = this.el.closest("calcite-dropdown-group");
|
|
492
|
-
if (this.selectionMode === "none") {
|
|
493
|
-
this.active = false;
|
|
494
|
-
}
|
|
490
|
+
this.initialize();
|
|
495
491
|
}
|
|
496
492
|
render() {
|
|
497
493
|
const scale = getElementProp(this.el, "scale", "m");
|
|
@@ -574,6 +570,13 @@ const DropdownItem = class {
|
|
|
574
570
|
// Private Methods
|
|
575
571
|
//
|
|
576
572
|
//--------------------------------------------------------------------------
|
|
573
|
+
initialize() {
|
|
574
|
+
this.selectionMode = getElementProp(this.el, "selection-mode", "single");
|
|
575
|
+
this.parentDropdownGroupEl = this.el.closest("calcite-dropdown-group");
|
|
576
|
+
if (this.selectionMode === "none") {
|
|
577
|
+
this.active = false;
|
|
578
|
+
}
|
|
579
|
+
}
|
|
577
580
|
determineActiveItem() {
|
|
578
581
|
switch (this.selectionMode) {
|
|
579
582
|
case "multi":
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
4
|
*/
|
|
5
5
|
import { r as registerInstance, c as createEvent, h, g as getElement, F as Fragment } from './index-bd94948c.js';
|
|
6
|
-
import { m as mutationObserverCallback, d as deselectRemovedItems, a as deselectSiblingItems, s as selectSiblings, h as handleFilter, g as getItemData, k as keyDownHandler, i as initialize, c as initializeObserver, e as cleanUpObserver, r as removeItem, j as calciteListItemChangeHandler, l as calciteListItemValueChangeHandler, f as calciteListFocusOutHandler, n as setUpItems, o as setFocus, I as ICON_TYPES, L as List, T as TEXT,
|
|
6
|
+
import { m as mutationObserverCallback, d as deselectRemovedItems, a as deselectSiblingItems, s as selectSiblings, h as handleFilter, g as getItemData, k as keyDownHandler, i as initialize, c as initializeObserver, e as cleanUpObserver, r as removeItem, j as calciteListItemChangeHandler, l as calciteListItemValueChangeHandler, f as calciteListFocusOutHandler, n as setUpItems, o as setFocus, I as ICON_TYPES, L as List, p as SLOTS, q as CSS, H as HEADING_LEVEL, T as TEXT, t as ICONS, C as CSS$1, S as SLOTS$1 } from './resources-b5c3d9a7.js';
|
|
7
7
|
import { c as createObserver } from './observers-46118290.js';
|
|
8
8
|
import { u as updateHostInteraction } from './interactive-48b5cc0f.js';
|
|
9
9
|
import { g as getSlotted } from './dom-e7fa77b9.js';
|
|
@@ -138,16 +138,6 @@ const PickList = class {
|
|
|
138
138
|
};
|
|
139
139
|
PickList.style = pickListCss;
|
|
140
140
|
|
|
141
|
-
const CSS = {
|
|
142
|
-
heading: "heading",
|
|
143
|
-
container: "container",
|
|
144
|
-
indented: "container--indented"
|
|
145
|
-
};
|
|
146
|
-
const SLOTS = {
|
|
147
|
-
parentItem: "parent-item"
|
|
148
|
-
};
|
|
149
|
-
const HEADING_LEVEL = 3;
|
|
150
|
-
|
|
151
141
|
const pickListGroupCss = "@-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}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{margin-bottom:0.25rem;-webkit-box-sizing:border-box;box-sizing:border-box;display:block;background-color:transparent;font-size:var(--calcite-font-size--1);color:var(--calcite-ui-text-2)}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}:host(:last-child){margin-bottom:0px}.header{margin:0px;display:-ms-flexbox;display:flex;-ms-flex-line-pack:justify;align-content:space-between;-ms-flex-align:center;align-items:center;fill:var(--calcite-ui-text-2);color:var(--calcite-ui-text-2)}.heading{margin:0px;padding:0px;font-weight:var(--calcite-font-weight-medium)}.header .heading{-ms-flex:1 1 auto;flex:1 1 auto;padding:0.5rem}h1.heading{font-size:var(--calcite-font-size-2);line-height:1.5rem}h2.heading{font-size:var(--calcite-font-size-1);line-height:1.5rem}h3.heading{font-size:var(--calcite-font-size-0);line-height:1.25rem}h4.heading,h5.heading{font-size:var(--calcite-font-size--1);line-height:1rem}h3.heading{margin-top:0.5rem;margin-bottom:0.5rem;margin-left:1rem;margin-right:1rem;font-size:var(--calcite-font-size--1);line-height:1.375;color:var(--calcite-ui-text-3)}.container--indented{-webkit-margin-start:1.5rem;margin-inline-start:1.5rem}";
|
|
152
142
|
|
|
153
143
|
const PickListGroup = class {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-bd94948c.js';
|
|
6
6
|
import { S as Sortable } from './sortable.esm-04824d33.js';
|
|
7
|
-
import { m as mutationObserverCallback, d as deselectRemovedItems, a as deselectSiblingItems, s as selectSiblings, h as handleFilter, g as getItemData, k as keyDownHandler, b as moveItemIndex, i as initialize, c as initializeObserver, e as cleanUpObserver, f as calciteListFocusOutHandler, r as removeItem, j as calciteListItemChangeHandler, l as calciteListItemValueChangeHandler, n as setUpItems, o as setFocus, L as List, I as ICON_TYPES$1, C as CSS$1, S as SLOTS$1 } from './resources-
|
|
7
|
+
import { m as mutationObserverCallback, d as deselectRemovedItems, a as deselectSiblingItems, s as selectSiblings, h as handleFilter, g as getItemData, k as keyDownHandler, b as moveItemIndex, i as initialize, c as initializeObserver, e as cleanUpObserver, f as calciteListFocusOutHandler, r as removeItem, j as calciteListItemChangeHandler, l as calciteListItemValueChangeHandler, n as setUpItems, o as setFocus, L as List, I as ICON_TYPES$1, C as CSS$1, S as SLOTS$1 } from './resources-b5c3d9a7.js';
|
|
8
8
|
import { c as createObserver } from './observers-46118290.js';
|
|
9
9
|
import { u as updateHostInteraction } from './interactive-48b5cc0f.js';
|
|
10
10
|
import { g as guid } from './guid-196bd5ea.js';
|
|
@@ -7,6 +7,16 @@ import { g as getRoundRobinIndex } from './array-91a648e2.js';
|
|
|
7
7
|
import { d as debounce } from './debounce-79648d42.js';
|
|
8
8
|
import { h, H as Host } from './index-bd94948c.js';
|
|
9
9
|
|
|
10
|
+
const CSS$2 = {
|
|
11
|
+
heading: "heading",
|
|
12
|
+
container: "container",
|
|
13
|
+
indented: "container--indented"
|
|
14
|
+
};
|
|
15
|
+
const SLOTS$2 = {
|
|
16
|
+
parentItem: "parent-item"
|
|
17
|
+
};
|
|
18
|
+
const HEADING_LEVEL = 3;
|
|
19
|
+
|
|
10
20
|
function mutationObserverCallback() {
|
|
11
21
|
this.setUpItems();
|
|
12
22
|
this.setUpFilter();
|
|
@@ -142,7 +152,7 @@ function removeItem(event) {
|
|
|
142
152
|
}
|
|
143
153
|
const item = event.target;
|
|
144
154
|
const selectedValues = this.selectedValues;
|
|
145
|
-
if (item.parentElement.tagName === "CALCITE-PICK-LIST-GROUP") {
|
|
155
|
+
if (item.parentElement.tagName === "CALCITE-PICK-LIST-GROUP" && item.slot === SLOTS$2.parentItem) {
|
|
146
156
|
item.parentElement.remove();
|
|
147
157
|
Array.from(item.parentElement.children).forEach((item) => selectedValues.delete(item.value));
|
|
148
158
|
}
|
|
@@ -357,4 +367,4 @@ const TEXT = {
|
|
|
357
367
|
remove: "Remove"
|
|
358
368
|
};
|
|
359
369
|
|
|
360
|
-
export { CSS as C, ICON_TYPES as I, List as L, SLOTS as S, TEXT as T, deselectSiblingItems as a, moveItemIndex as b, initializeObserver as c, deselectRemovedItems as d, cleanUpObserver as e, calciteListFocusOutHandler as f, getItemData as g, handleFilter as h, initialize as i, calciteListItemChangeHandler as j, keyDownHandler as k, calciteListItemValueChangeHandler as l, mutationObserverCallback as m, setUpItems as n, setFocus as o,
|
|
370
|
+
export { CSS as C, HEADING_LEVEL as H, ICON_TYPES as I, List as L, SLOTS as S, TEXT as T, deselectSiblingItems as a, moveItemIndex as b, initializeObserver as c, deselectRemovedItems as d, cleanUpObserver as e, calciteListFocusOutHandler as f, getItemData as g, handleFilter as h, initialize as i, calciteListItemChangeHandler as j, keyDownHandler as k, calciteListItemValueChangeHandler as l, mutationObserverCallback as m, setUpItems as n, setFocus as o, SLOTS$2 as p, CSS$2 as q, removeItem as r, selectSiblings as s, ICONS as t };
|
|
@@ -2,4 +2,4 @@ var __awaiter=this&&this.__awaiter||function(t,e,n,o){function i(t){return t ins
|
|
|
2
2
|
/*!
|
|
3
3
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
4
4
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
5
|
-
*/import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-bd94948c.js";import{t as toggleChildActionText,o as overflowActionsDebounceInMs,q as queryActions,a as overflowActions,E as ExpandToggle,g as getOverflowCount}from"./ExpandToggle-af224c1e.js";import{f as focusElement,g as getSlotted}from"./dom-e7fa77b9.js";import{c as createObserver}from"./observers-46118290.js";import{c as connectConditionalSlotComponent,d as disconnectConditionalSlotComponent}from"./conditionalSlot-67f579ff.js";import{d as debounce}from"./debounce-79648d42.js";import"./resources-027bd8f9.js";import"./resources-34334875.js";import"./guid-196bd5ea.js";var CSS={actionGroupBottom:"action-group--bottom"};var SLOTS={bottomActions:"bottom-actions",expandTooltip:"expand-tooltip"};var TEXT={expand:"Expand",collapse:"Collapse"};var actionBarCss="@-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}";var ActionBar=function(){function t(t){var e=this;registerInstance(this,t);this.calciteActionBarToggle=createEvent(this,"calciteActionBarToggle",7);this.expandDisabled=false;this.expanded=false;this.overflowActionsDisabled=false;this.mutationObserver=createObserver("mutation",(function(){var t=e,n=t.el,o=t.expanded;toggleChildActionText({parent:n,expanded:o});e.conditionallyOverflowActions()}));this.resizeObserver=createObserver("resize",(function(t){return e.resizeHandlerEntries(t)}));this.actionMenuOpenChangeHandler=function(t){if(t.detail){var n=t.composedPath();Array.from(e.el.querySelectorAll("calcite-action-group")).forEach((function(t){if(!n.includes(t)){t.menuOpen=false}}))}};this.resizeHandlerEntries=function(t){t.forEach(e.resizeHandler)};this.resizeHandler=function(t){var n=t.contentRect.height;e.resize(n)};this.resize=debounce((function(t){var n;var o=e,i=o.el,a=o.expanded,r=o.expandDisabled;if(!t){return}var l=queryActions(i);var s=r?l.length:l.length+1;var c=Array.from(i.querySelectorAll("calcite-action-group"));var d=getSlotted(i,SLOTS.bottomActions)||!r?c.length+1:c.length;var p=getOverflowCount({actionCount:s,actionHeight:(n=l[0])===null||n===void 0?void 0:n.clientHeight,height:t,groupCount:d});overflowActions({actionGroups:c,expanded:a,overflowCount:p})}),overflowActionsDebounceInMs);this.conditionallyOverflowActions=function(){if(!e.overflowActionsDisabled){e.overflowActions()}};this.toggleExpand=function(){e.expanded=!e.expanded};this.setExpandToggleRef=function(t){e.expandToggleEl=t}}t.prototype.expandHandler=function(
|
|
5
|
+
*/import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-bd94948c.js";import{t as toggleChildActionText,o as overflowActionsDebounceInMs,q as queryActions,a as overflowActions,E as ExpandToggle,g as getOverflowCount}from"./ExpandToggle-af224c1e.js";import{f as focusElement,g as getSlotted}from"./dom-e7fa77b9.js";import{c as createObserver}from"./observers-46118290.js";import{c as connectConditionalSlotComponent,d as disconnectConditionalSlotComponent}from"./conditionalSlot-67f579ff.js";import{d as debounce}from"./debounce-79648d42.js";import"./resources-027bd8f9.js";import"./resources-34334875.js";import"./guid-196bd5ea.js";var CSS={actionGroupBottom:"action-group--bottom"};var SLOTS={bottomActions:"bottom-actions",expandTooltip:"expand-tooltip"};var TEXT={expand:"Expand",collapse:"Collapse"};var actionBarCss="@-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}";var ActionBar=function(){function t(t){var e=this;registerInstance(this,t);this.calciteActionBarToggle=createEvent(this,"calciteActionBarToggle",7);this.expandDisabled=false;this.expanded=false;this.overflowActionsDisabled=false;this.mutationObserver=createObserver("mutation",(function(){var t=e,n=t.el,o=t.expanded;toggleChildActionText({parent:n,expanded:o});e.conditionallyOverflowActions()}));this.resizeObserver=createObserver("resize",(function(t){return e.resizeHandlerEntries(t)}));this.actionMenuOpenChangeHandler=function(t){if(t.detail){var n=t.composedPath();Array.from(e.el.querySelectorAll("calcite-action-group")).forEach((function(t){if(!n.includes(t)){t.menuOpen=false}}))}};this.resizeHandlerEntries=function(t){t.forEach(e.resizeHandler)};this.resizeHandler=function(t){var n=t.contentRect.height;e.resize(n)};this.resize=debounce((function(t){var n;var o=e,i=o.el,a=o.expanded,r=o.expandDisabled;if(!t){return}var l=queryActions(i);var s=r?l.length:l.length+1;var c=Array.from(i.querySelectorAll("calcite-action-group"));var d=getSlotted(i,SLOTS.bottomActions)||!r?c.length+1:c.length;var p=getOverflowCount({actionCount:s,actionHeight:(n=l[0])===null||n===void 0?void 0:n.clientHeight,height:t,groupCount:d});overflowActions({actionGroups:c,expanded:a,overflowCount:p})}),overflowActionsDebounceInMs);this.conditionallyOverflowActions=function(){if(!e.overflowActionsDisabled){e.overflowActions()}};this.toggleExpand=function(){e.expanded=!e.expanded};this.setExpandToggleRef=function(t){e.expandToggleEl=t}}t.prototype.expandHandler=function(){this.conditionallyOverflowActions()};t.prototype.expandedHandler=function(t){toggleChildActionText({parent:this.el,expanded:t});this.calciteActionBarToggle.emit()};t.prototype.overflowDisabledHandler=function(t){t?this.resizeObserver.disconnect():this.resizeObserver.observe(this.el)};t.prototype.componentDidLoad=function(){this.conditionallyOverflowActions()};t.prototype.connectedCallback=function(){var t,e;var n=this,o=n.el,i=n.expanded;toggleChildActionText({parent:o,expanded:i});(t=this.mutationObserver)===null||t===void 0?void 0:t.observe(o,{childList:true,subtree:true});if(!this.overflowActionsDisabled){(e=this.resizeObserver)===null||e===void 0?void 0:e.observe(o)}this.conditionallyOverflowActions();connectConditionalSlotComponent(this)};t.prototype.disconnectedCallback=function(){var t,e;(t=this.mutationObserver)===null||t===void 0?void 0:t.disconnect();(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect();disconnectConditionalSlotComponent(this)};t.prototype.overflowActions=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.resize(this.el.clientHeight);return[2]}))}))};t.prototype.setFocus=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:if(!(t==="expand-toggle"))return[3,2];return[4,focusElement(this.expandToggleEl)];case 1:e.sent();return[2];case 2:this.el.focus();return[2]}}))}))};t.prototype.renderBottomActionGroup=function(){var t=this,e=t.expanded,n=t.expandDisabled,o=t.intlExpand,i=t.intlCollapse,a=t.el,r=t.position,l=t.toggleExpand,s=t.scale;var c=getSlotted(a,SLOTS.expandTooltip);var d=o||TEXT.expand;var p=i||TEXT.collapse;var f=!n?h(ExpandToggle,{el:a,expanded:e,intlCollapse:p,intlExpand:d,position:r,ref:this.setExpandToggleRef,scale:s,toggle:l,tooltip:c}):null;return getSlotted(a,SLOTS.bottomActions)||f?h("calcite-action-group",{class:CSS.actionGroupBottom,scale:s},h("slot",{name:SLOTS.bottomActions}),h("slot",{name:SLOTS.expandTooltip}),f):null};t.prototype.render=function(){return h(Host,{onCalciteActionMenuOpenChange:this.actionMenuOpenChangeHandler},h("slot",null),this.renderBottomActionGroup())};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{expandDisabled:["expandHandler"],expanded:["expandedHandler"],overflowActionsDisabled:["overflowDisabledHandler"]}},enumerable:false,configurable:true});return t}();ActionBar.style=actionBarCss;export{ActionBar as calcite_action_bar};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,a,e,n){function o(t){return t instanceof e?t:new e((function(a){a(t)}))}return new(e||(e=Promise))((function(e,i){function r(t){try{l(n.next(t))}catch(t){i(t)}}function c(t){try{l(n["throw"](t))}catch(t){i(t)}}function l(t){t.done?e(t.value):o(t.value).then(r,c)}l((n=n.apply(t,a||[])).next())}))};var __generator=this&&this.__generator||function(t,a){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,r;return r={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function c(t){return function(a){return l([t,a])}}function l(r){if(n)throw new TypeError("Generator is already executing.");while(e)try{if(n=1,o&&(i=r[0]&2?o["return"]:r[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;if(o=0,i)r=[r[0]&2,i.value];switch(r[0]){case 0:case 1:i=r;break;case 4:e.label++;return{value:r[1],done:false};case 5:e.label++;o=r[1];r=[0];continue;case 7:r=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(r[0]===6||r[0]===2)){e=0;continue}if(r[0]===3&&(!i||r[1]>i[0]&&r[1]<i[3])){e.label=r[1];break}if(r[0]===6&&e.label<i[1]){e.label=i[1];i=r;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(r);break}if(i[2])e.ops.pop();e.trys.pop();continue}r=a.call(t,e)}catch(t){r=[6,t];o=0}finally{n=i=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};
|
|
2
2
|
/*!
|
|
3
3
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
4
4
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
5
|
-
*/import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-bd94948c.js";import{t as toggleChildActionText,E as ExpandToggle}from"./ExpandToggle-af224c1e.js";import{f as focusElement,g as getSlotted}from"./dom-e7fa77b9.js";import{c as connectConditionalSlotComponent,d as disconnectConditionalSlotComponent}from"./conditionalSlot-67f579ff.js";import"./resources-027bd8f9.js";import"./resources-34334875.js";import"./guid-196bd5ea.js";import"./observers-46118290.js";var CSS={actionGroupBottom:"action-group--bottom",container:"container"};var TEXT={expand:"Expand",collapse:"Collapse"};var SLOTS={expandTooltip:"expand-tooltip"};var actionPadCss="@-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:block}@keyframes in{0%{opacity:0}100%{opacity:1}}:host{-webkit-animation:in var(--calcite-internal-animation-timing-slow) ease-in-out;animation:in var(--calcite-internal-animation-timing-slow) ease-in-out;border-radius:0.125rem}: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);padding-bottom:0px;padding-top:0px}.container{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column;overflow-y:auto;border-radius:0.25rem;background-color:var(--calcite-ui-background);--tw-shadow:0 6px 20px -4px rgba(0, 0, 0, 0.1), 0 4px 12px -2px rgba(0, 0, 0, 0.08);--tw-shadow-colored:0 6px 20px -4px var(--tw-shadow-color), 0 4px 12px -2px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);max-width:15vw}.action-group--bottom{-ms-flex-positive:1;flex-grow:1;-ms-flex-pack:end;justify-content:flex-end;padding-bottom:0px}:host([layout=horizontal]) .container{-ms-flex-direction:row;flex-direction:row;max-width:unset}:host([layout=horizontal]) .container .action-group--bottom{padding:0px}:host([layout=horizontal]) .container ::slotted(calcite-action-group){border-width:0px;padding:0px;border-inline-end-width:1px}::slotted(calcite-action-group:last-child){border-bottom-width:0px}";var ActionPad=function(){function t(t){var
|
|
5
|
+
*/import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-bd94948c.js";import{t as toggleChildActionText,E as ExpandToggle}from"./ExpandToggle-af224c1e.js";import{f as focusElement,g as getSlotted}from"./dom-e7fa77b9.js";import{c as connectConditionalSlotComponent,d as disconnectConditionalSlotComponent}from"./conditionalSlot-67f579ff.js";import"./resources-027bd8f9.js";import"./resources-34334875.js";import"./guid-196bd5ea.js";import"./observers-46118290.js";var CSS={actionGroupBottom:"action-group--bottom",container:"container"};var TEXT={expand:"Expand",collapse:"Collapse"};var SLOTS={expandTooltip:"expand-tooltip"};var actionPadCss="@-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:block}@keyframes in{0%{opacity:0}100%{opacity:1}}:host{-webkit-animation:in var(--calcite-internal-animation-timing-slow) ease-in-out;animation:in var(--calcite-internal-animation-timing-slow) ease-in-out;border-radius:0.125rem}: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);padding-bottom:0px;padding-top:0px}.container{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column;overflow-y:auto;border-radius:0.25rem;background-color:var(--calcite-ui-background);--tw-shadow:0 6px 20px -4px rgba(0, 0, 0, 0.1), 0 4px 12px -2px rgba(0, 0, 0, 0.08);--tw-shadow-colored:0 6px 20px -4px var(--tw-shadow-color), 0 4px 12px -2px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);max-width:15vw}.action-group--bottom{-ms-flex-positive:1;flex-grow:1;-ms-flex-pack:end;justify-content:flex-end;padding-bottom:0px}:host([layout=horizontal]) .container{-ms-flex-direction:row;flex-direction:row;max-width:unset}:host([layout=horizontal]) .container .action-group--bottom{padding:0px}:host([layout=horizontal]) .container ::slotted(calcite-action-group){border-width:0px;padding:0px;border-inline-end-width:1px}::slotted(calcite-action-group:last-child){border-bottom-width:0px}";var ActionPad=function(){function t(t){var a=this;registerInstance(this,t);this.calciteActionPadToggle=createEvent(this,"calciteActionPadToggle",7);this.expandDisabled=false;this.expanded=false;this.layout="vertical";this.actionMenuOpenChangeHandler=function(t){if(t.detail){var e=t.composedPath();Array.from(a.el.querySelectorAll("calcite-action-group")).forEach((function(t){if(!e.includes(t)){t.menuOpen=false}}))}};this.toggleExpand=function(){a.expanded=!a.expanded};this.setExpandToggleRef=function(t){a.expandToggleEl=t}}t.prototype.expandedHandler=function(t){toggleChildActionText({parent:this.el,expanded:t});this.calciteActionPadToggle.emit()};t.prototype.connectedCallback=function(){connectConditionalSlotComponent(this)};t.prototype.disconnectedCallback=function(){disconnectConditionalSlotComponent(this)};t.prototype.componentWillLoad=function(){var t=this,a=t.el,e=t.expanded;toggleChildActionText({parent:a,expanded:e})};t.prototype.setFocus=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){switch(a.label){case 0:if(!(t==="expand-toggle"))return[3,2];return[4,focusElement(this.expandToggleEl)];case 1:a.sent();return[2];case 2:this.el.focus();return[2]}}))}))};t.prototype.renderBottomActionGroup=function(){var t=this,a=t.expanded,e=t.expandDisabled,n=t.intlExpand,o=t.intlCollapse,i=t.el,r=t.position,c=t.toggleExpand,l=t.scale;var s=getSlotted(i,SLOTS.expandTooltip);var d=n||TEXT.expand;var p=o||TEXT.collapse;var m=!e?h(ExpandToggle,{el:i,expanded:a,intlCollapse:p,intlExpand:d,position:r,ref:this.setExpandToggleRef,scale:l,toggle:c,tooltip:s}):null;return m?h("calcite-action-group",{class:CSS.actionGroupBottom,scale:l},h("slot",{name:SLOTS.expandTooltip}),m):null};t.prototype.render=function(){return h(Host,{onCalciteActionMenuOpenChange:this.actionMenuOpenChangeHandler},h("div",{class:CSS.container},h("slot",null),this.renderBottomActionGroup()))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{expanded:["expandedHandler"]}},enumerable:false,configurable:true});return t}();ActionPad.style=actionPadCss;export{ActionPad as calcite_action_pad};
|