@limetech/lime-elements 36.4.0-next.2 → 36.4.0-next.4
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/cjs/lime-elements.cjs.js +1 -1
- package/dist/cjs/limel-action-bar-item_2.cjs.entry.js +97 -0
- package/dist/cjs/limel-action-bar.cjs.entry.js +106 -0
- package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +5 -1
- package/dist/cjs/limel-list_2.cjs.entry.js +1 -1
- package/dist/cjs/{limel-menu-list.cjs.entry.js → limel-menu_2.cjs.entry.js} +122 -1
- package/dist/cjs/{limel-popover_4.cjs.entry.js → limel-popover_2.cjs.entry.js} +0 -97
- package/dist/cjs/limel-tooltip_2.cjs.entry.js +104 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/action-bar/action-bar-item/action-bar-item.css +129 -0
- package/dist/collection/components/action-bar/action-bar-item/action-bar-item.js +144 -0
- package/dist/collection/components/action-bar/action-bar-item/action-bar-overflow-menu.js +106 -0
- package/dist/collection/components/action-bar/action-bar.css +50 -0
- package/dist/collection/components/action-bar/action-bar.js +244 -0
- package/dist/collection/components/action-bar/action-bar.types.js +1 -0
- package/dist/collection/components/action-bar/isItem.js +3 -0
- package/dist/collection/components/list/list.css +2 -1
- package/dist/collection/components/menu-list/menu-list.css +2 -1
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/limel-action-bar-item_2.entry.js +92 -0
- package/dist/esm/limel-action-bar.entry.js +102 -0
- package/dist/esm/limel-flatpickr-adapter.entry.js +5 -1
- package/dist/esm/limel-list_2.entry.js +1 -1
- package/dist/esm/{limel-menu-list.entry.js → limel-menu_2.entry.js} +123 -3
- package/dist/esm/{limel-popover_4.entry.js → limel-popover_2.entry.js} +1 -96
- package/dist/esm/limel-tooltip_2.entry.js +99 -0
- package/dist/esm/loader.js +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/p-3cdc210b.entry.js +1 -0
- package/dist/lime-elements/p-7112ebf8.entry.js +1 -0
- package/dist/lime-elements/{p-20059fcf.entry.js → p-a030e9ab.entry.js} +6 -5
- package/dist/lime-elements/p-b526ebd4.entry.js +1 -0
- package/dist/lime-elements/p-c823809f.entry.js +1 -0
- package/dist/lime-elements/{p-4e5865a7.entry.js → p-da4d1bc1.entry.js} +1 -1
- package/dist/lime-elements/{p-d034bbcf.entry.js → p-f1d963ec.entry.js} +1 -1
- package/dist/types/components/action-bar/action-bar-item/action-bar-item.d.ts +33 -0
- package/dist/types/components/action-bar/action-bar-item/action-bar-overflow-menu.d.ts +25 -0
- package/dist/types/components/action-bar/action-bar.d.ts +79 -0
- package/dist/types/components/action-bar/action-bar.types.d.ts +8 -0
- package/dist/types/components/action-bar/isItem.d.ts +3 -0
- package/dist/types/components.d.ts +143 -16
- package/dist/types/interface.d.ts +1 -0
- package/package.json +13 -14
- package/dist/cjs/limel-menu.cjs.entry.js +0 -127
- package/dist/esm/limel-menu.entry.js +0 -123
- package/dist/lime-elements/p-50dbd665.entry.js +0 -1
- package/dist/lime-elements/p-d16b27b9.entry.js +0 -1
|
@@ -138,102 +138,5 @@ const PopoverSurface = class {
|
|
|
138
138
|
};
|
|
139
139
|
PopoverSurface.style = popoverSurfaceCss;
|
|
140
140
|
|
|
141
|
-
const tooltipCss = ".trigger-anchor{position:relative}";
|
|
142
|
-
|
|
143
|
-
const DEFAULT_MAX_LENGTH = 50;
|
|
144
|
-
const Tooltip = class {
|
|
145
|
-
constructor(hostRef) {
|
|
146
|
-
index.registerInstance(this, hostRef);
|
|
147
|
-
this.showTooltip = () => {
|
|
148
|
-
const tooltipDelay = 500;
|
|
149
|
-
this.showTooltipTimeoutHandle = window.setTimeout(() => {
|
|
150
|
-
this.open = true;
|
|
151
|
-
}, tooltipDelay);
|
|
152
|
-
};
|
|
153
|
-
this.hideTooltip = () => {
|
|
154
|
-
clearTimeout(this.showTooltipTimeoutHandle);
|
|
155
|
-
this.open = false;
|
|
156
|
-
};
|
|
157
|
-
this.elementId = undefined;
|
|
158
|
-
this.label = undefined;
|
|
159
|
-
this.helperLabel = undefined;
|
|
160
|
-
this.maxlength = DEFAULT_MAX_LENGTH;
|
|
161
|
-
this.open = undefined;
|
|
162
|
-
this.portalId = randomString.createRandomString();
|
|
163
|
-
this.tooltipId = randomString.createRandomString();
|
|
164
|
-
}
|
|
165
|
-
connectedCallback() {
|
|
166
|
-
this.setOwnerAriaLabel();
|
|
167
|
-
this.addListeners();
|
|
168
|
-
}
|
|
169
|
-
disconnectedCallback() {
|
|
170
|
-
this.removeListeners();
|
|
171
|
-
}
|
|
172
|
-
render() {
|
|
173
|
-
const tooltipZIndex = getComputedStyle(this.host).getPropertyValue('--tooltip-z-index');
|
|
174
|
-
return (index.h("div", { class: "trigger-anchor" }, index.h("limel-portal", { openDirection: "bottom-start", visible: this.open, containerId: this.portalId, containerStyle: {
|
|
175
|
-
'z-index': tooltipZIndex,
|
|
176
|
-
'pointer-events': 'none',
|
|
177
|
-
} }, index.h("limel-tooltip-content", { label: this.label, helperLabel: this.helperLabel, maxlength: this.maxlength, role: "tooltip", "aria-hidden": !this.open, id: this.tooltipId }))));
|
|
178
|
-
}
|
|
179
|
-
setOwnerAriaLabel() {
|
|
180
|
-
const owner = this.getOwnerElement();
|
|
181
|
-
owner === null || owner === void 0 ? void 0 : owner.setAttribute('aria-describedby', this.tooltipId);
|
|
182
|
-
}
|
|
183
|
-
addListeners() {
|
|
184
|
-
const owner = this.getOwnerElement();
|
|
185
|
-
owner === null || owner === void 0 ? void 0 : owner.addEventListener('mouseover', this.showTooltip);
|
|
186
|
-
owner === null || owner === void 0 ? void 0 : owner.addEventListener('mouseout', this.hideTooltip);
|
|
187
|
-
owner === null || owner === void 0 ? void 0 : owner.addEventListener('click', this.hideTooltip);
|
|
188
|
-
}
|
|
189
|
-
removeListeners() {
|
|
190
|
-
const owner = this.getOwnerElement();
|
|
191
|
-
owner === null || owner === void 0 ? void 0 : owner.removeEventListener('mouseover', this.showTooltip);
|
|
192
|
-
owner === null || owner === void 0 ? void 0 : owner.removeEventListener('mouseout', this.hideTooltip);
|
|
193
|
-
owner === null || owner === void 0 ? void 0 : owner.removeEventListener('click', this.hideTooltip);
|
|
194
|
-
}
|
|
195
|
-
getOwnerElement() {
|
|
196
|
-
let element = this.host;
|
|
197
|
-
do {
|
|
198
|
-
element = element.parentNode;
|
|
199
|
-
} while (element &&
|
|
200
|
-
element.nodeType !== Node.DOCUMENT_FRAGMENT_NODE &&
|
|
201
|
-
element.nodeType !== Node.DOCUMENT_NODE);
|
|
202
|
-
return element === null || element === void 0 ? void 0 : element.getElementById(this.elementId);
|
|
203
|
-
}
|
|
204
|
-
get host() { return index.getElement(this); }
|
|
205
|
-
};
|
|
206
|
-
Tooltip.style = tooltipCss;
|
|
207
|
-
|
|
208
|
-
const tooltipContentCss = ":host{animation:display-tooltip 0.2s ease;display:flex;border-radius:0.25rem;padding:0.25rem 0.5rem;background-color:rgb(var(--contrast-1300));box-shadow:var(--shadow-depth-16)}text{font-size:0.875rem;line-height:1.25;display:flex;column-gap:1rem}text.has-column-layout{display:table-cell;width:fit-content;max-width:min(var(--tooltip-max-width-of-text), 80vw)}text.has-column-layout .label{padding-bottom:0.5rem}text.has-column-layout .helper-label{padding-bottom:0.25rem}.label{color:rgb(var(--contrast-200))}.helper-label{color:rgb(var(--contrast-800))}.helper-label:empty{display:none}@keyframes display-tooltip{0%{opacity:0;transform:translate3d(0, 0, 0) scale(0.94)}100%{opacity:1;transform:translate3d(0, 0, 0) scale(1)}}";
|
|
209
|
-
|
|
210
|
-
const TooltipContent = class {
|
|
211
|
-
constructor(hostRef) {
|
|
212
|
-
index.registerInstance(this, hostRef);
|
|
213
|
-
this.label = undefined;
|
|
214
|
-
this.helperLabel = undefined;
|
|
215
|
-
this.maxlength = undefined;
|
|
216
|
-
}
|
|
217
|
-
render() {
|
|
218
|
-
let isLabelsTextLong = false;
|
|
219
|
-
if (this.helperLabel && this.maxlength) {
|
|
220
|
-
isLabelsTextLong =
|
|
221
|
-
this.label.length + this.helperLabel.length > this.maxlength;
|
|
222
|
-
}
|
|
223
|
-
const props = {};
|
|
224
|
-
if (this.maxlength) {
|
|
225
|
-
props.style = {
|
|
226
|
-
'--tooltip-max-width-of-text': `${this.maxlength}` + 'ch',
|
|
227
|
-
};
|
|
228
|
-
}
|
|
229
|
-
return [
|
|
230
|
-
index.h("text", Object.assign({ class: { 'has-column-layout': isLabelsTextLong } }, props), index.h("div", { class: "label" }, this.label), index.h("div", { class: "helper-label" }, this.helperLabel)),
|
|
231
|
-
];
|
|
232
|
-
}
|
|
233
|
-
};
|
|
234
|
-
TooltipContent.style = tooltipContentCss;
|
|
235
|
-
|
|
236
141
|
exports.limel_popover = Popover;
|
|
237
142
|
exports.limel_popover_surface = PopoverSurface;
|
|
238
|
-
exports.limel_tooltip = Tooltip;
|
|
239
|
-
exports.limel_tooltip_content = TooltipContent;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-287e25e0.js');
|
|
6
|
+
const randomString = require('./random-string-4c3b7f1c.js');
|
|
7
|
+
|
|
8
|
+
const tooltipCss = ".trigger-anchor{position:relative}";
|
|
9
|
+
|
|
10
|
+
const DEFAULT_MAX_LENGTH = 50;
|
|
11
|
+
const Tooltip = class {
|
|
12
|
+
constructor(hostRef) {
|
|
13
|
+
index.registerInstance(this, hostRef);
|
|
14
|
+
this.showTooltip = () => {
|
|
15
|
+
const tooltipDelay = 500;
|
|
16
|
+
this.showTooltipTimeoutHandle = window.setTimeout(() => {
|
|
17
|
+
this.open = true;
|
|
18
|
+
}, tooltipDelay);
|
|
19
|
+
};
|
|
20
|
+
this.hideTooltip = () => {
|
|
21
|
+
clearTimeout(this.showTooltipTimeoutHandle);
|
|
22
|
+
this.open = false;
|
|
23
|
+
};
|
|
24
|
+
this.elementId = undefined;
|
|
25
|
+
this.label = undefined;
|
|
26
|
+
this.helperLabel = undefined;
|
|
27
|
+
this.maxlength = DEFAULT_MAX_LENGTH;
|
|
28
|
+
this.open = undefined;
|
|
29
|
+
this.portalId = randomString.createRandomString();
|
|
30
|
+
this.tooltipId = randomString.createRandomString();
|
|
31
|
+
}
|
|
32
|
+
connectedCallback() {
|
|
33
|
+
this.setOwnerAriaLabel();
|
|
34
|
+
this.addListeners();
|
|
35
|
+
}
|
|
36
|
+
disconnectedCallback() {
|
|
37
|
+
this.removeListeners();
|
|
38
|
+
}
|
|
39
|
+
render() {
|
|
40
|
+
const tooltipZIndex = getComputedStyle(this.host).getPropertyValue('--tooltip-z-index');
|
|
41
|
+
return (index.h("div", { class: "trigger-anchor" }, index.h("limel-portal", { openDirection: "bottom-start", visible: this.open, containerId: this.portalId, containerStyle: {
|
|
42
|
+
'z-index': tooltipZIndex,
|
|
43
|
+
'pointer-events': 'none',
|
|
44
|
+
} }, index.h("limel-tooltip-content", { label: this.label, helperLabel: this.helperLabel, maxlength: this.maxlength, role: "tooltip", "aria-hidden": !this.open, id: this.tooltipId }))));
|
|
45
|
+
}
|
|
46
|
+
setOwnerAriaLabel() {
|
|
47
|
+
const owner = this.getOwnerElement();
|
|
48
|
+
owner === null || owner === void 0 ? void 0 : owner.setAttribute('aria-describedby', this.tooltipId);
|
|
49
|
+
}
|
|
50
|
+
addListeners() {
|
|
51
|
+
const owner = this.getOwnerElement();
|
|
52
|
+
owner === null || owner === void 0 ? void 0 : owner.addEventListener('mouseover', this.showTooltip);
|
|
53
|
+
owner === null || owner === void 0 ? void 0 : owner.addEventListener('mouseout', this.hideTooltip);
|
|
54
|
+
owner === null || owner === void 0 ? void 0 : owner.addEventListener('click', this.hideTooltip);
|
|
55
|
+
}
|
|
56
|
+
removeListeners() {
|
|
57
|
+
const owner = this.getOwnerElement();
|
|
58
|
+
owner === null || owner === void 0 ? void 0 : owner.removeEventListener('mouseover', this.showTooltip);
|
|
59
|
+
owner === null || owner === void 0 ? void 0 : owner.removeEventListener('mouseout', this.hideTooltip);
|
|
60
|
+
owner === null || owner === void 0 ? void 0 : owner.removeEventListener('click', this.hideTooltip);
|
|
61
|
+
}
|
|
62
|
+
getOwnerElement() {
|
|
63
|
+
let element = this.host;
|
|
64
|
+
do {
|
|
65
|
+
element = element.parentNode;
|
|
66
|
+
} while (element &&
|
|
67
|
+
element.nodeType !== Node.DOCUMENT_FRAGMENT_NODE &&
|
|
68
|
+
element.nodeType !== Node.DOCUMENT_NODE);
|
|
69
|
+
return element === null || element === void 0 ? void 0 : element.getElementById(this.elementId);
|
|
70
|
+
}
|
|
71
|
+
get host() { return index.getElement(this); }
|
|
72
|
+
};
|
|
73
|
+
Tooltip.style = tooltipCss;
|
|
74
|
+
|
|
75
|
+
const tooltipContentCss = ":host{animation:display-tooltip 0.2s ease;display:flex;border-radius:0.25rem;padding:0.25rem 0.5rem;background-color:rgb(var(--contrast-1300));box-shadow:var(--shadow-depth-16)}text{font-size:0.875rem;line-height:1.25;display:flex;column-gap:1rem}text.has-column-layout{display:table-cell;width:fit-content;max-width:min(var(--tooltip-max-width-of-text), 80vw)}text.has-column-layout .label{padding-bottom:0.5rem}text.has-column-layout .helper-label{padding-bottom:0.25rem}.label{color:rgb(var(--contrast-200))}.helper-label{color:rgb(var(--contrast-800))}.helper-label:empty{display:none}@keyframes display-tooltip{0%{opacity:0;transform:translate3d(0, 0, 0) scale(0.94)}100%{opacity:1;transform:translate3d(0, 0, 0) scale(1)}}";
|
|
76
|
+
|
|
77
|
+
const TooltipContent = class {
|
|
78
|
+
constructor(hostRef) {
|
|
79
|
+
index.registerInstance(this, hostRef);
|
|
80
|
+
this.label = undefined;
|
|
81
|
+
this.helperLabel = undefined;
|
|
82
|
+
this.maxlength = undefined;
|
|
83
|
+
}
|
|
84
|
+
render() {
|
|
85
|
+
let isLabelsTextLong = false;
|
|
86
|
+
if (this.helperLabel && this.maxlength) {
|
|
87
|
+
isLabelsTextLong =
|
|
88
|
+
this.label.length + this.helperLabel.length > this.maxlength;
|
|
89
|
+
}
|
|
90
|
+
const props = {};
|
|
91
|
+
if (this.maxlength) {
|
|
92
|
+
props.style = {
|
|
93
|
+
'--tooltip-max-width-of-text': `${this.maxlength}` + 'ch',
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
return [
|
|
97
|
+
index.h("text", Object.assign({ class: { 'has-column-layout': isLabelsTextLong } }, props), index.h("div", { class: "label" }, this.label), index.h("div", { class: "helper-label" }, this.helperLabel)),
|
|
98
|
+
];
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
TooltipContent.style = tooltipContentCss;
|
|
102
|
+
|
|
103
|
+
exports.limel_tooltip = Tooltip;
|
|
104
|
+
exports.limel_tooltip_content = TooltipContent;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["limel-color-picker.cjs",[[1,"limel-color-picker",{"value":[513],"label":[513],"helperText":[513,"helper-text"],"tooltipLabel":[513,"tooltip-label"],"required":[516],"readonly":[516],"isOpen":[32]}]]],["limel-dock.cjs",[[1,"limel-dock",{"dockItems":[16],"dockFooterItems":[16],"accessibleLabel":[513,"accessible-label"],"expanded":[516],"allowResize":[516,"allow-resize"],"mobileBreakPoint":[514,"mobile-break-point"],"useMobileLayout":[32]}]]],["limel-picker.cjs",[[1,"limel-picker",{"disabled":[4],"readonly":[516],"label":[1],"searchLabel":[1,"search-label"],"helperText":[513,"helper-text"],"leadingIcon":[1,"leading-icon"],"emptyResultMessage":[1,"empty-result-message"],"required":[4],"value":[16],"searcher":[16],"multiple":[4],"delimiter":[513],"actions":[16],"actionPosition":[1,"action-position"],"actionScrollBehavior":[1,"action-scroll-behavior"],"badgeIcons":[516,"badge-icons"],"items":[32],"textValue":[32],"loading":[32],"chips":[32]}]]],["limel-split-button.cjs",[[1,"limel-split-button",{"label":[513],"primary":[516],"icon":[513],"disabled":[516],"items":[16]}]]],["limel-date-picker.cjs",[[1,"limel-date-picker",{"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"placeholder":[513],"helperText":[513,"helper-text"],"required":[516],"value":[16],"type":[513],"format":[513],"language":[513],"formatter":[16],"formattedValue":[32],"internalFormat":[32],"showPortal":[32]}]]],["limel-button-group.cjs",[[1,"limel-button-group",{"value":[16],"disabled":[516],"selectedButtonId":[32]}]]],["limel-select.cjs",[[1,"limel-select",{"disabled":[516],"readonly":[516],"invalid":[516],"required":[516],"label":[513],"helperText":[513,"helper-text"],"value":[16],"options":[16],"multiple":[4],"menuOpen":[32]}]]],["limel-file.cjs",[[1,"limel-file",{"value":[16],"label":[513],"required":[516],"disabled":[516],"readonly":[516],"accept":[513],"language":[1],"isDraggingOverDropZone":[32]}]]],["limel-info-tile.cjs",[[1,"limel-info-tile",{"value":[520],"icon":[1],"label":[513],"prefix":[513],"suffix":[513],"disabled":[516],"badge":[520],"loading":[516],"link":[16],"progress":[16]}]]],["limel-snackbar.cjs",[[1,"limel-snackbar",{"message":[1],"timeout":[2],"actionText":[1,"action-text"],"dismissible":[4],"multiline":[4],"language":[1],"show":[64]}]]],["limel-tab-panel.cjs",[[1,"limel-tab-panel",{"tabs":[1040]}]]],["limel-table.cjs",[[1,"limel-table",{"data":[16],"columns":[16],"mode":[1],"layout":[1],"pageSize":[2,"page-size"],"totalRows":[2,"total-rows"],"sorting":[16],"activeRow":[1040],"movableColumns":[4,"movable-columns"],"loading":[4],"page":[2],"emptyMessage":[1,"empty-message"],"aggregates":[16],"selectable":[4],"selection":[16]}]]],["limel-collapsible-section.cjs",[[1,"limel-collapsible-section",{"isOpen":[1540,"is-open"],"header":[513],"actions":[16]}]]],["limel-dialog.cjs",[[1,"limel-dialog",{"heading":[1],"fullscreen":[516],"open":[1540],"closingActions":[16]}]]],["limel-progress-flow.cjs",[[1,"limel-progress-flow",{"flowItems":[16],"disabled":[4],"readonly":[4]}]]],["limel-shortcut.cjs",[[1,"limel-shortcut",{"icon":[513],"label":[513],"disabled":[516],"badge":[520],"link":[16]}]]],["limel-banner.cjs",[[1,"limel-banner",{"message":[513],"icon":[513],"isOpen":[32],"open":[64],"close":[64]}]]],["limel-callout.cjs",[[1,"limel-callout",{"heading":[513],"icon":[513],"type":[513],"language":[1]}]]],["limel-slider.cjs",[[1,"limel-slider",{"disabled":[516],"readonly":[516],"factor":[514],"label":[513],"helperText":[513,"helper-text"],"unit":[513],"value":[514],"valuemax":[514],"valuemin":[514],"step":[514],"percentageClass":[32]}]]],["limel-code-editor.cjs",[[1,"limel-code-editor",{"value":[1],"language":[1],"readonly":[4],"lineNumbers":[4,"line-numbers"],"fold":[4],"lint":[4],"colorScheme":[1,"color-scheme"],"random":[32]}]]],["limel-config.cjs",[[1,"limel-config",{"config":[16]}]]],["limel-flex-container.cjs",[[1,"limel-flex-container",{"direction":[513],"justify":[513],"align":[513],"reverse":[516]}]]],["limel-form.cjs",[[1,"limel-form",{"schema":[16],"value":[16],"disabled":[4],"propsFactory":[16],"transformErrors":[16],"errors":[16]}]]],["limel-grid.cjs",[[1,"limel-grid"]]],["limel-switch.cjs",[[1,"limel-switch",{"label":[513],"disabled":[516],"readonly":[516],"value":[516],"fieldId":[32]}]]],["limel-
|
|
17
|
+
return index.bootstrapLazy([["limel-color-picker.cjs",[[1,"limel-color-picker",{"value":[513],"label":[513],"helperText":[513,"helper-text"],"tooltipLabel":[513,"tooltip-label"],"required":[516],"readonly":[516],"isOpen":[32]}]]],["limel-action-bar.cjs",[[1,"limel-action-bar",{"actions":[16],"accessibleLabel":[513,"accessible-label"],"layout":[513],"openDirection":[513,"open-direction"],"overflowCutoff":[32]}]]],["limel-dock.cjs",[[1,"limel-dock",{"dockItems":[16],"dockFooterItems":[16],"accessibleLabel":[513,"accessible-label"],"expanded":[516],"allowResize":[516,"allow-resize"],"mobileBreakPoint":[514,"mobile-break-point"],"useMobileLayout":[32]}]]],["limel-picker.cjs",[[1,"limel-picker",{"disabled":[4],"readonly":[516],"label":[1],"searchLabel":[1,"search-label"],"helperText":[513,"helper-text"],"leadingIcon":[1,"leading-icon"],"emptyResultMessage":[1,"empty-result-message"],"required":[4],"value":[16],"searcher":[16],"multiple":[4],"delimiter":[513],"actions":[16],"actionPosition":[1,"action-position"],"actionScrollBehavior":[1,"action-scroll-behavior"],"badgeIcons":[516,"badge-icons"],"items":[32],"textValue":[32],"loading":[32],"chips":[32]}]]],["limel-split-button.cjs",[[1,"limel-split-button",{"label":[513],"primary":[516],"icon":[513],"disabled":[516],"items":[16]}]]],["limel-date-picker.cjs",[[1,"limel-date-picker",{"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"placeholder":[513],"helperText":[513,"helper-text"],"required":[516],"value":[16],"type":[513],"format":[513],"language":[513],"formatter":[16],"formattedValue":[32],"internalFormat":[32],"showPortal":[32]}]]],["limel-button-group.cjs",[[1,"limel-button-group",{"value":[16],"disabled":[516],"selectedButtonId":[32]}]]],["limel-select.cjs",[[1,"limel-select",{"disabled":[516],"readonly":[516],"invalid":[516],"required":[516],"label":[513],"helperText":[513,"helper-text"],"value":[16],"options":[16],"multiple":[4],"menuOpen":[32]}]]],["limel-file.cjs",[[1,"limel-file",{"value":[16],"label":[513],"required":[516],"disabled":[516],"readonly":[516],"accept":[513],"language":[1],"isDraggingOverDropZone":[32]}]]],["limel-info-tile.cjs",[[1,"limel-info-tile",{"value":[520],"icon":[1],"label":[513],"prefix":[513],"suffix":[513],"disabled":[516],"badge":[520],"loading":[516],"link":[16],"progress":[16]}]]],["limel-snackbar.cjs",[[1,"limel-snackbar",{"message":[1],"timeout":[2],"actionText":[1,"action-text"],"dismissible":[4],"multiline":[4],"language":[1],"show":[64]}]]],["limel-tab-panel.cjs",[[1,"limel-tab-panel",{"tabs":[1040]}]]],["limel-table.cjs",[[1,"limel-table",{"data":[16],"columns":[16],"mode":[1],"layout":[1],"pageSize":[2,"page-size"],"totalRows":[2,"total-rows"],"sorting":[16],"activeRow":[1040],"movableColumns":[4,"movable-columns"],"loading":[4],"page":[2],"emptyMessage":[1,"empty-message"],"aggregates":[16],"selectable":[4],"selection":[16]}]]],["limel-collapsible-section.cjs",[[1,"limel-collapsible-section",{"isOpen":[1540,"is-open"],"header":[513],"actions":[16]}]]],["limel-dialog.cjs",[[1,"limel-dialog",{"heading":[1],"fullscreen":[516],"open":[1540],"closingActions":[16]}]]],["limel-progress-flow.cjs",[[1,"limel-progress-flow",{"flowItems":[16],"disabled":[4],"readonly":[4]}]]],["limel-shortcut.cjs",[[1,"limel-shortcut",{"icon":[513],"label":[513],"disabled":[516],"badge":[520],"link":[16]}]]],["limel-banner.cjs",[[1,"limel-banner",{"message":[513],"icon":[513],"isOpen":[32],"open":[64],"close":[64]}]]],["limel-callout.cjs",[[1,"limel-callout",{"heading":[513],"icon":[513],"type":[513],"language":[1]}]]],["limel-slider.cjs",[[1,"limel-slider",{"disabled":[516],"readonly":[516],"factor":[514],"label":[513],"helperText":[513,"helper-text"],"unit":[513],"value":[514],"valuemax":[514],"valuemin":[514],"step":[514],"percentageClass":[32]}]]],["limel-code-editor.cjs",[[1,"limel-code-editor",{"value":[1],"language":[1],"readonly":[4],"lineNumbers":[4,"line-numbers"],"fold":[4],"lint":[4],"colorScheme":[1,"color-scheme"],"random":[32]}]]],["limel-config.cjs",[[1,"limel-config",{"config":[16]}]]],["limel-flex-container.cjs",[[1,"limel-flex-container",{"direction":[513],"justify":[513],"align":[513],"reverse":[516]}]]],["limel-form.cjs",[[1,"limel-form",{"schema":[16],"value":[16],"disabled":[4],"propsFactory":[16],"transformErrors":[16],"errors":[16]}]]],["limel-grid.cjs",[[1,"limel-grid"]]],["limel-switch.cjs",[[1,"limel-switch",{"label":[513],"disabled":[516],"readonly":[516],"value":[516],"fieldId":[32]}]]],["limel-icon.cjs",[[1,"limel-icon",{"size":[513],"name":[513],"badge":[516]}]]],["limel-dock-button.cjs",[[0,"limel-dock-button",{"item":[16],"expanded":[516],"useMobileLayout":[516,"use-mobile-layout"],"isOpen":[32]}]]],["limel-color-picker-palette.cjs",[[1,"limel-color-picker-palette",{"value":[513],"label":[513],"helperText":[513,"helper-text"],"required":[516]}]]],["limel-badge.cjs",[[1,"limel-badge",{"label":[520]}]]],["limel-tab-bar.cjs",[[1,"limel-tab-bar",{"tabs":[1040],"canScrollLeft":[32],"canScrollRight":[32]},[[9,"resize","handleWindowResize"]]]]],["limel-checkbox.cjs",[[1,"limel-checkbox",{"disabled":[516],"readonly":[516],"label":[513],"helperText":[513,"helper-text"],"checked":[516],"indeterminate":[516],"required":[516],"modified":[32]}]]],["limel-header.cjs",[[1,"limel-header",{"icon":[1],"heading":[1],"subheading":[1],"supportingText":[1,"supporting-text"]}]]],["limel-progress-flow-item.cjs",[[0,"limel-progress-flow-item",{"item":[16],"disabled":[4],"readonly":[4]}]]],["limel-flatpickr-adapter.cjs",[[1,"limel-flatpickr-adapter",{"value":[16],"type":[1],"format":[1],"isOpen":[4,"is-open"],"inputElement":[16],"language":[1],"formatter":[16]}]]],["limel-action-bar-item_2.cjs",[[0,"limel-action-bar-overflow-menu",{"items":[16],"openDirection":[513,"open-direction"]}],[0,"limel-action-bar-item",{"item":[16],"isVisible":[516,"is-visible"]}]]],["limel-chip-set.cjs",[[1,"limel-chip-set",{"value":[16],"type":[513],"label":[513],"helperText":[513,"helper-text"],"disabled":[516],"readonly":[516],"inputType":[513,"input-type"],"maxItems":[514,"max-items"],"required":[516],"searchLabel":[513,"search-label"],"emptyInputOnBlur":[516,"empty-input-on-blur"],"clearAllButton":[4,"clear-all-button"],"leadingIcon":[513,"leading-icon"],"delimiter":[513],"language":[1],"editMode":[32],"textValue":[32],"blurred":[32],"inputChipIndexSelected":[32],"getEditMode":[64],"setFocus":[64],"emptyInput":[64]}]]],["limel-button.cjs",[[1,"limel-button",{"label":[513],"primary":[516],"outlined":[516],"icon":[513],"disabled":[516],"loading":[516],"loadingFailed":[516,"loading-failed"],"justLoaded":[32]}]]],["limel-circular-progress_2.cjs",[[1,"limel-circular-progress",{"value":[2],"maxValue":[2,"max-value"],"prefix":[513],"suffix":[1],"displayPercentageColors":[4,"display-percentage-colors"],"size":[513]}],[1,"limel-linear-progress",{"value":[2],"indeterminate":[4]}]]],["limel-list_2.cjs",[[1,"limel-list",{"items":[16],"badgeIcons":[4,"badge-icons"],"iconSize":[1,"icon-size"],"type":[1],"maxLinesSecondaryText":[2,"max-lines-secondary-text"]}],[1,"limel-menu-surface",{"open":[4],"allowClicksElement":[16]}]]],["limel-input-field.cjs",[[1,"limel-input-field",{"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"placeholder":[513],"helperText":[513,"helper-text"],"prefix":[513],"suffix":[513],"required":[516],"value":[513],"trailingIcon":[513,"trailing-icon"],"leadingIcon":[513,"leading-icon"],"pattern":[513],"type":[513],"formatNumber":[516,"format-number"],"step":[520],"max":[514],"min":[514],"maxlength":[514],"minlength":[514],"completions":[16],"showLink":[516,"show-link"],"isFocused":[32],"isModified":[32],"showCompletions":[32]}]]],["limel-icon-button.cjs",[[1,"limel-icon-button",{"icon":[513],"elevated":[516],"label":[513],"disabled":[516]}]]],["limel-spinner.cjs",[[1,"limel-spinner",{"size":[513],"limeBranded":[4,"lime-branded"]}]]],["limel-menu_2.cjs",[[1,"limel-menu",{"items":[16],"disabled":[516],"openDirection":[513,"open-direction"],"open":[1540],"badgeIcons":[516,"badge-icons"],"gridLayout":[516,"grid-layout"]}],[1,"limel-menu-list",{"items":[16],"badgeIcons":[4,"badge-icons"],"iconSize":[1,"icon-size"],"type":[1],"maxLinesSecondaryText":[2,"max-lines-secondary-text"]}]]],["limel-popover_2.cjs",[[1,"limel-popover",{"open":[4],"openDirection":[513,"open-direction"]}],[1,"limel-popover-surface",{"contentCollection":[16]}]]],["limel-helper-line.cjs",[[1,"limel-helper-line",{"helperText":[513,"helper-text"],"length":[514],"maxLength":[514,"max-length"],"invalid":[516],"helperTextId":[513,"helper-text-id"]}]]],["limel-portal.cjs",[[1,"limel-portal",{"openDirection":[1,"open-direction"],"position":[1],"containerId":[1,"container-id"],"containerStyle":[16],"parent":[16],"inheritParentWidth":[4,"inherit-parent-width"],"visible":[4]}]]],["limel-tooltip_2.cjs",[[1,"limel-tooltip",{"elementId":[513,"element-id"],"label":[513],"helperLabel":[513,"helper-label"],"maxlength":[514],"open":[32]}],[1,"limel-tooltip-content",{"label":[513],"helperLabel":[513,"helper-label"],"maxlength":[514]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"entries": [
|
|
3
|
+
"./components/action-bar/action-bar.js",
|
|
4
|
+
"./components/action-bar/action-bar-item/action-bar-item.js",
|
|
5
|
+
"./components/action-bar/action-bar-item/action-bar-overflow-menu.js",
|
|
3
6
|
"./components/badge/badge.js",
|
|
4
7
|
"./components/banner/banner.js",
|
|
5
8
|
"./components/button/button.js",
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Note! This file is exported to `dist/scss/` in the published
|
|
3
|
+
* node module, for consumer projects to import.
|
|
4
|
+
* That means this file cannot import from any file that isn't
|
|
5
|
+
* also exported, keeping the same relative path.
|
|
6
|
+
*
|
|
7
|
+
* Or, just don't import anything, that works too.
|
|
8
|
+
*/
|
|
9
|
+
/*
|
|
10
|
+
* This file is imported into every component!
|
|
11
|
+
*
|
|
12
|
+
* Nothing in this file may output any CSS
|
|
13
|
+
* without being explicitly called by outside code.
|
|
14
|
+
*/
|
|
15
|
+
limel-action-bar-item {
|
|
16
|
+
transition: opacity 0.2s ease-in-out;
|
|
17
|
+
position: relative;
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
}
|
|
21
|
+
limel-action-bar-item:not([is-visible]) {
|
|
22
|
+
opacity: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
button {
|
|
26
|
+
all: unset;
|
|
27
|
+
box-sizing: border-box;
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
gap: 0.25rem;
|
|
32
|
+
width: 100%;
|
|
33
|
+
min-width: var(--action-bar-item-height);
|
|
34
|
+
max-width: var(--action-bar-item-max-width, 10rem);
|
|
35
|
+
height: var(--action-bar-item-height);
|
|
36
|
+
border-radius: var(--action-bar-item-height);
|
|
37
|
+
font-size: 0.875rem;
|
|
38
|
+
padding: 0 0.25rem;
|
|
39
|
+
}
|
|
40
|
+
button:not([disabled]) {
|
|
41
|
+
transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
color: var(--limel-action-bar-item-text-color);
|
|
44
|
+
background-color: var(--action-bar-background-color);
|
|
45
|
+
}
|
|
46
|
+
button:not([disabled]):hover {
|
|
47
|
+
color: var(--limel-action-bar-item-text-color);
|
|
48
|
+
background-color: var(--action-bar-background-color);
|
|
49
|
+
box-shadow: var(--button-shadow-hovered);
|
|
50
|
+
}
|
|
51
|
+
button:not([disabled]):active {
|
|
52
|
+
background-color: var(--action-bar-background-color);
|
|
53
|
+
box-shadow: var(--button-shadow-inset-pressed);
|
|
54
|
+
transform: translate3d(0, 0.05rem, 0);
|
|
55
|
+
}
|
|
56
|
+
button:not([disabled]):focus {
|
|
57
|
+
outline: none;
|
|
58
|
+
}
|
|
59
|
+
button:not([disabled]):focus-visible {
|
|
60
|
+
outline: none;
|
|
61
|
+
box-shadow: var(--shadow-depth-8-focused);
|
|
62
|
+
}
|
|
63
|
+
button:has(.text) {
|
|
64
|
+
padding: 0 0.5rem;
|
|
65
|
+
}
|
|
66
|
+
button[disabled] {
|
|
67
|
+
opacity: 0.4;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.text {
|
|
71
|
+
overflow: hidden;
|
|
72
|
+
white-space: nowrap;
|
|
73
|
+
text-overflow: ellipsis;
|
|
74
|
+
padding: 0 0.25rem;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
limel-icon {
|
|
78
|
+
flex-shrink: 0;
|
|
79
|
+
width: calc(var(--action-bar-item-height) - 0.75rem);
|
|
80
|
+
height: calc(var(--action-bar-item-height) - 0.75rem);
|
|
81
|
+
color: var(--action-bar-item-icon-color, var(--limel-action-bar-item-text-color));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
limel-tooltip {
|
|
85
|
+
position: absolute;
|
|
86
|
+
bottom: 0;
|
|
87
|
+
left: 0;
|
|
88
|
+
right: 0;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
div[role=separator] {
|
|
92
|
+
width: 1px;
|
|
93
|
+
height: 1.5rem;
|
|
94
|
+
border-radius: var(--action-bar-item-height);
|
|
95
|
+
background-color: var(--limel-action-bar-item-text-color);
|
|
96
|
+
opacity: 0.2;
|
|
97
|
+
}
|
|
98
|
+
@media (pointer: fine) {
|
|
99
|
+
div[role=separator] {
|
|
100
|
+
margin-right: 0.5rem;
|
|
101
|
+
margin-left: 0.5rem;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
limel-menu {
|
|
106
|
+
--notification-badge-background-color: rgb(var(--contrast-600));
|
|
107
|
+
--notification-badge-text-color: rgb(var(--contrast-1200));
|
|
108
|
+
}
|
|
109
|
+
limel-menu[open] button {
|
|
110
|
+
box-shadow: var(--button-shadow-inset);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
button[slot=trigger] {
|
|
114
|
+
animation: fade-in ease-out 0.25s;
|
|
115
|
+
font-size: 0.75rem;
|
|
116
|
+
font-weight: bold;
|
|
117
|
+
transform: translate3d(0, 0, 0);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@keyframes fade-in {
|
|
121
|
+
0% {
|
|
122
|
+
scale: 0.8;
|
|
123
|
+
opacity: 0;
|
|
124
|
+
}
|
|
125
|
+
100% {
|
|
126
|
+
scale: 1;
|
|
127
|
+
opacity: 1;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
|
+
import { createRandomString } from '../../../util/random-string';
|
|
3
|
+
/**
|
|
4
|
+
* @private
|
|
5
|
+
*/
|
|
6
|
+
export class ActionBarButton {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.handleClick = (event) => {
|
|
9
|
+
event.stopPropagation();
|
|
10
|
+
this.select.emit(this.item);
|
|
11
|
+
};
|
|
12
|
+
this.item = undefined;
|
|
13
|
+
this.isVisible = true;
|
|
14
|
+
this.tooltipId = createRandomString();
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
if (!this.isItem(this.item) && this.item.separator) {
|
|
18
|
+
return h("div", { role: "separator" });
|
|
19
|
+
}
|
|
20
|
+
return (h("button", { id: this.tooltipId, type: "button", onClick: this.handleClick, disabled: this.isDisabled() }, this.renderIcon(), this.renderLabel(), this.renderTooltip()));
|
|
21
|
+
}
|
|
22
|
+
isItem(item) {
|
|
23
|
+
return !('separator' in item);
|
|
24
|
+
}
|
|
25
|
+
isDisabled() {
|
|
26
|
+
if (this.isItem(this.item) && this.item.disabled) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
if (!this.isVisible) {
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
renderIcon() {
|
|
34
|
+
if (this.isItem(this.item) && !this.item.icon) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if ('icon' in this.item) {
|
|
38
|
+
return (h("limel-icon", { name: this.item.icon, style: {
|
|
39
|
+
'--action-bar-item-icon-color': `${this.item.iconColor}`,
|
|
40
|
+
} }));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
renderLabel() {
|
|
44
|
+
if (!this.isItem(this.item) || this.item.iconOnly) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
return h("span", { class: "text" }, this.item.text);
|
|
48
|
+
}
|
|
49
|
+
renderTooltip() {
|
|
50
|
+
if (!this.isItem(this.item)) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if (this.item.text) {
|
|
54
|
+
return (h("limel-tooltip", { elementId: this.tooltipId, label: this.item.text, helperLabel: this.item.commandText }));
|
|
55
|
+
}
|
|
56
|
+
if (this.item.commandText) {
|
|
57
|
+
return (h("limel-tooltip", { elementId: this.tooltipId, label: this.item.commandText }));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
static get is() { return "limel-action-bar-item"; }
|
|
61
|
+
static get originalStyleUrls() {
|
|
62
|
+
return {
|
|
63
|
+
"$": ["action-bar-item.scss"]
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
static get styleUrls() {
|
|
67
|
+
return {
|
|
68
|
+
"$": ["action-bar-item.css"]
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
static get properties() {
|
|
72
|
+
return {
|
|
73
|
+
"item": {
|
|
74
|
+
"type": "unknown",
|
|
75
|
+
"mutable": false,
|
|
76
|
+
"complexType": {
|
|
77
|
+
"original": "ActionBarItem | ListSeparator",
|
|
78
|
+
"resolved": "ActionBarItem | ListSeparator",
|
|
79
|
+
"references": {
|
|
80
|
+
"ActionBarItem": {
|
|
81
|
+
"location": "import",
|
|
82
|
+
"path": "../action-bar.types"
|
|
83
|
+
},
|
|
84
|
+
"ListSeparator": {
|
|
85
|
+
"location": "import",
|
|
86
|
+
"path": "src/interface"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"required": true,
|
|
91
|
+
"optional": false,
|
|
92
|
+
"docs": {
|
|
93
|
+
"tags": [],
|
|
94
|
+
"text": "Item that is placed in the action bar."
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"isVisible": {
|
|
98
|
+
"type": "boolean",
|
|
99
|
+
"mutable": false,
|
|
100
|
+
"complexType": {
|
|
101
|
+
"original": "boolean",
|
|
102
|
+
"resolved": "boolean",
|
|
103
|
+
"references": {}
|
|
104
|
+
},
|
|
105
|
+
"required": false,
|
|
106
|
+
"optional": false,
|
|
107
|
+
"docs": {
|
|
108
|
+
"tags": [],
|
|
109
|
+
"text": "When the item is displayed in the available width,\nthis will be `false`."
|
|
110
|
+
},
|
|
111
|
+
"attribute": "is-visible",
|
|
112
|
+
"reflect": true,
|
|
113
|
+
"defaultValue": "true"
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
static get events() {
|
|
118
|
+
return [{
|
|
119
|
+
"method": "select",
|
|
120
|
+
"name": "select",
|
|
121
|
+
"bubbles": true,
|
|
122
|
+
"cancelable": true,
|
|
123
|
+
"composed": true,
|
|
124
|
+
"docs": {
|
|
125
|
+
"tags": [],
|
|
126
|
+
"text": "Fired when a action bar item has been clicked."
|
|
127
|
+
},
|
|
128
|
+
"complexType": {
|
|
129
|
+
"original": "ActionBarItem | ListSeparator",
|
|
130
|
+
"resolved": "ActionBarItem | ListSeparator",
|
|
131
|
+
"references": {
|
|
132
|
+
"ActionBarItem": {
|
|
133
|
+
"location": "import",
|
|
134
|
+
"path": "../action-bar.types"
|
|
135
|
+
},
|
|
136
|
+
"ListSeparator": {
|
|
137
|
+
"location": "import",
|
|
138
|
+
"path": "src/interface"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}];
|
|
143
|
+
}
|
|
144
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
|
+
/**
|
|
3
|
+
* @private
|
|
4
|
+
*/
|
|
5
|
+
export class ActionBarOverflowMenu {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.countOverflowedItems = () => {
|
|
8
|
+
return `+${this.numberOfMenuItems}`;
|
|
9
|
+
};
|
|
10
|
+
this.handleSelect = (event) => {
|
|
11
|
+
event.stopPropagation();
|
|
12
|
+
this.select.emit(event.detail);
|
|
13
|
+
};
|
|
14
|
+
this.items = undefined;
|
|
15
|
+
this.openDirection = 'bottom-end';
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
return [
|
|
19
|
+
h("limel-menu", { openDirection: this.openDirection, items: this.items, onSelect: this.handleSelect }, h("button", { slot: "trigger" }, this.countOverflowedItems())),
|
|
20
|
+
];
|
|
21
|
+
}
|
|
22
|
+
get numberOfMenuItems() {
|
|
23
|
+
return this.items.filter((item) => this.isMenuItem(item)).length;
|
|
24
|
+
}
|
|
25
|
+
isMenuItem(item) {
|
|
26
|
+
return !('separator' in item);
|
|
27
|
+
}
|
|
28
|
+
static get is() { return "limel-action-bar-overflow-menu"; }
|
|
29
|
+
static get properties() {
|
|
30
|
+
return {
|
|
31
|
+
"items": {
|
|
32
|
+
"type": "unknown",
|
|
33
|
+
"mutable": false,
|
|
34
|
+
"complexType": {
|
|
35
|
+
"original": "Array<MenuItem | ListSeparator>",
|
|
36
|
+
"resolved": "(MenuItem<any> | ListSeparator)[]",
|
|
37
|
+
"references": {
|
|
38
|
+
"Array": {
|
|
39
|
+
"location": "global"
|
|
40
|
+
},
|
|
41
|
+
"MenuItem": {
|
|
42
|
+
"location": "import",
|
|
43
|
+
"path": "@limetech/lime-elements"
|
|
44
|
+
},
|
|
45
|
+
"ListSeparator": {
|
|
46
|
+
"location": "import",
|
|
47
|
+
"path": "@limetech/lime-elements"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"required": false,
|
|
52
|
+
"optional": false,
|
|
53
|
+
"docs": {
|
|
54
|
+
"tags": [],
|
|
55
|
+
"text": "List of the items that should be rendered in the overflow menu."
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"openDirection": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"mutable": false,
|
|
61
|
+
"complexType": {
|
|
62
|
+
"original": "OpenDirection",
|
|
63
|
+
"resolved": "\"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"",
|
|
64
|
+
"references": {
|
|
65
|
+
"OpenDirection": {
|
|
66
|
+
"location": "import",
|
|
67
|
+
"path": "@limetech/lime-elements"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"required": false,
|
|
72
|
+
"optional": false,
|
|
73
|
+
"docs": {
|
|
74
|
+
"tags": [],
|
|
75
|
+
"text": "Defines the location that the content of the overflow menu\nappears, in relation to its trigger.\nIt defaults to `bottom-end`, since in normal scenarios\n(for example when the action bar is not floating at the bottom of the screen)\nthis menu is the right-most item in the user interface of the component."
|
|
76
|
+
},
|
|
77
|
+
"attribute": "open-direction",
|
|
78
|
+
"reflect": true,
|
|
79
|
+
"defaultValue": "'bottom-end'"
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
static get events() {
|
|
84
|
+
return [{
|
|
85
|
+
"method": "select",
|
|
86
|
+
"name": "select",
|
|
87
|
+
"bubbles": true,
|
|
88
|
+
"cancelable": true,
|
|
89
|
+
"composed": true,
|
|
90
|
+
"docs": {
|
|
91
|
+
"tags": [],
|
|
92
|
+
"text": ""
|
|
93
|
+
},
|
|
94
|
+
"complexType": {
|
|
95
|
+
"original": "ActionBarItem",
|
|
96
|
+
"resolved": "ActionBarItem",
|
|
97
|
+
"references": {
|
|
98
|
+
"ActionBarItem": {
|
|
99
|
+
"location": "import",
|
|
100
|
+
"path": "@limetech/lime-elements"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}];
|
|
105
|
+
}
|
|
106
|
+
}
|