@limetech/lime-elements 33.14.0-next.2 → 33.14.0-next.6
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-list_3.cjs.entry.js +2 -0
- package/dist/cjs/limel-menu.cjs.entry.js +49 -1
- package/dist/cjs/limel-tab-bar.cjs.entry.js +6 -1
- package/dist/cjs/limel-tooltip.cjs.entry.js +43 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/list/list.js +2 -0
- package/dist/collection/components/menu/menu.js +51 -2
- package/dist/collection/components/tab-bar/tab-bar.js +6 -1
- package/dist/collection/components/tab-panel/tab-panel.js +2 -1
- package/dist/collection/components/tab-panel/tab-panel.types.js +1 -0
- package/dist/collection/components/tooltip/tooltip-content.js +4 -2
- package/dist/collection/components/tooltip/tooltip.js +71 -12
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/limel-list_3.entry.js +2 -0
- package/dist/esm/limel-menu.entry.js +49 -1
- package/dist/esm/limel-tab-bar.entry.js +6 -1
- package/dist/esm/limel-tooltip.entry.js +43 -1
- package/dist/esm/loader.js +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/p-4e6042f7.entry.js +1 -0
- package/dist/lime-elements/{p-9c0dc505.entry.js → p-61ecc7f1.entry.js} +2 -2
- package/dist/lime-elements/p-63e4f918.entry.js +1 -0
- package/dist/lime-elements/p-6fcc1378.entry.js +177 -0
- package/dist/types/components/menu/menu.d.ts +7 -0
- package/dist/types/components/tab-bar/tab-bar.d.ts +1 -0
- package/dist/types/components/tab-panel/tab-panel.d.ts +2 -1
- package/dist/types/components/tab-panel/tab-panel.types.d.ts +16 -0
- package/dist/types/components/tooltip/tooltip-content.d.ts +6 -2
- package/dist/types/components/tooltip/tooltip.d.ts +31 -4
- package/dist/types/components.d.ts +16 -16
- package/dist/types/interface.d.ts +1 -0
- package/package.json +1 -1
- package/dist/lime-elements/p-1f3b6139.entry.js +0 -1
- package/dist/lime-elements/p-8e8219ac.entry.js +0 -177
- package/dist/lime-elements/p-b3b08c96.entry.js +0 -1
|
@@ -51,6 +51,22 @@ const Menu = class {
|
|
|
51
51
|
* obsolete.
|
|
52
52
|
*/
|
|
53
53
|
this.fixed = false;
|
|
54
|
+
this.setTriggerAttributes = (element) => {
|
|
55
|
+
const attributes = {
|
|
56
|
+
'aria-haspopup': true,
|
|
57
|
+
'aria-expanded': this.open,
|
|
58
|
+
disabled: this.disabled,
|
|
59
|
+
role: 'button',
|
|
60
|
+
};
|
|
61
|
+
for (const [key, value] of Object.entries(attributes)) {
|
|
62
|
+
if (!value) {
|
|
63
|
+
element.removeAttribute(key);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
element.setAttribute(key, String(value));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
};
|
|
54
70
|
this.onClose = () => {
|
|
55
71
|
this.cancel.emit();
|
|
56
72
|
this.open = false;
|
|
@@ -72,6 +88,18 @@ const Menu = class {
|
|
|
72
88
|
this.select.emit(event.detail);
|
|
73
89
|
this.open = false;
|
|
74
90
|
};
|
|
91
|
+
this.setListElement = (element) => {
|
|
92
|
+
this.list = element;
|
|
93
|
+
};
|
|
94
|
+
this.focusMenuItem = () => {
|
|
95
|
+
var _a;
|
|
96
|
+
const activeElement = this.list.shadowRoot.activeElement;
|
|
97
|
+
activeElement === null || activeElement === void 0 ? void 0 : activeElement.blur();
|
|
98
|
+
const listItems = this.items.filter(this.isListItem);
|
|
99
|
+
const selectedIndex = Math.max(listItems.findIndex((item) => item.selected), 0);
|
|
100
|
+
const menuElements = Array.from(this.list.shadowRoot.querySelectorAll('[role="menuitem"]'));
|
|
101
|
+
(_a = menuElements[selectedIndex]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
102
|
+
};
|
|
75
103
|
this.portalId = createRandomString();
|
|
76
104
|
}
|
|
77
105
|
componentDidLoad() {
|
|
@@ -80,6 +108,16 @@ const Menu = class {
|
|
|
80
108
|
console.warn('Using limel-menu with the default trigger is deprecated. Please provide your own trigger element.');
|
|
81
109
|
}
|
|
82
110
|
}
|
|
111
|
+
openWatcher() {
|
|
112
|
+
if (!this.open) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
const observer = new IntersectionObserver(() => {
|
|
116
|
+
observer.unobserve(this.list);
|
|
117
|
+
this.focusMenuItem();
|
|
118
|
+
});
|
|
119
|
+
observer.observe(this.list);
|
|
120
|
+
}
|
|
83
121
|
render() {
|
|
84
122
|
const cssProperties = this.getCssProperties();
|
|
85
123
|
const dropdownZIndex = getComputedStyle(this.host).getPropertyValue('--dropdown-z-index');
|
|
@@ -89,7 +127,11 @@ const Menu = class {
|
|
|
89
127
|
const portalPosition = this.getPortalPosition();
|
|
90
128
|
return (h("div", { class: "mdc-menu-surface--anchor", onClick: this.onTriggerClick }, h("slot", { name: "trigger" }, this.renderTrigger()), h("limel-portal", { class: portalClasses, style: portalPosition, visible: this.open, containerId: this.portalId, openDirection: this.openDirection, position: this.fixed ? 'fixed' : 'absolute', containerStyle: { 'z-index': dropdownZIndex } }, h("limel-menu-surface", { open: this.open, onDismiss: this.onClose, style: cssProperties }, h("limel-list", { class: {
|
|
91
129
|
'has-grid-layout has-interactive-items': this.gridLayout,
|
|
92
|
-
}, items: this.items, type: "menu", badgeIcons: this.badgeIcons, onChange: this.onListChange })))));
|
|
130
|
+
}, items: this.items, type: "menu", badgeIcons: this.badgeIcons, onChange: this.onListChange, ref: this.setListElement })))));
|
|
131
|
+
}
|
|
132
|
+
componentDidRender() {
|
|
133
|
+
const slotElement = this.host.shadowRoot.querySelector('slot');
|
|
134
|
+
slotElement.assignedElements().forEach(this.setTriggerAttributes);
|
|
93
135
|
}
|
|
94
136
|
renderTrigger() {
|
|
95
137
|
return (h("button", { class: `
|
|
@@ -124,7 +166,13 @@ const Menu = class {
|
|
|
124
166
|
});
|
|
125
167
|
return zipObject(propertyNames, values);
|
|
126
168
|
}
|
|
169
|
+
isListItem(item) {
|
|
170
|
+
return !('separator' in item);
|
|
171
|
+
}
|
|
127
172
|
get host() { return getElement(this); }
|
|
173
|
+
static get watchers() { return {
|
|
174
|
+
"open": ["openWatcher"]
|
|
175
|
+
}; }
|
|
128
176
|
};
|
|
129
177
|
Menu.style = menuCss;
|
|
130
178
|
|
|
@@ -2251,11 +2251,16 @@ const TabBar = class {
|
|
|
2251
2251
|
handleTabActivated(event) {
|
|
2252
2252
|
const index = event.detail.index;
|
|
2253
2253
|
const newTabs = setActiveTab(this.tabs, index);
|
|
2254
|
-
difference(newTabs, this.tabs)
|
|
2254
|
+
difference(newTabs, this.tabs)
|
|
2255
|
+
.sort(this.sortByInactive)
|
|
2256
|
+
.forEach((tab) => {
|
|
2255
2257
|
this.changeTab.emit(tab);
|
|
2256
2258
|
});
|
|
2257
2259
|
this.tabs = newTabs;
|
|
2258
2260
|
}
|
|
2261
|
+
sortByInactive(a, b) {
|
|
2262
|
+
return Number(a.active) - Number(b.active);
|
|
2263
|
+
}
|
|
2259
2264
|
handleScroll() {
|
|
2260
2265
|
const scrollLeft = this.scrollArea.scrollLeft;
|
|
2261
2266
|
const scrollRight = Math.floor(this.scrollContent.getBoundingClientRect().width -
|
|
@@ -1,16 +1,58 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index-dc421a6e.js';
|
|
2
|
+
import { c as createRandomString } from './random-string-2246b81e.js';
|
|
2
3
|
|
|
3
4
|
const tooltipCss = ".trigger-anchor{display:inline-block;position:relative}.tooltip-container{color:#f1f1f1;background-color:#232324}";
|
|
4
5
|
|
|
5
6
|
const Tooltip = class {
|
|
6
7
|
constructor(hostRef) {
|
|
7
8
|
registerInstance(this, hostRef);
|
|
9
|
+
this.showTooltip = () => {
|
|
10
|
+
this.open = true;
|
|
11
|
+
};
|
|
12
|
+
this.hideTooltip = () => {
|
|
13
|
+
this.open = false;
|
|
14
|
+
};
|
|
15
|
+
this.portalId = createRandomString();
|
|
16
|
+
this.tooltipId = createRandomString();
|
|
17
|
+
}
|
|
18
|
+
connectedCallback() {
|
|
19
|
+
this.setOwnerAriaLabel();
|
|
20
|
+
this.addListeners();
|
|
21
|
+
}
|
|
22
|
+
disconnectedCallback() {
|
|
23
|
+
this.removeListeners();
|
|
8
24
|
}
|
|
9
25
|
render() {
|
|
10
26
|
const tooltipZIndex = getComputedStyle(this.host).getPropertyValue('--tooltip-z-index');
|
|
11
27
|
return (h("div", { class: "trigger-anchor" }, h("limel-portal", { visible: this.open, containerId: this.portalId, containerStyle: {
|
|
12
28
|
'z-index': tooltipZIndex,
|
|
13
|
-
} }, h("limel-tooltip-content", { label: this.label, helperLabel: this.helperLabel }))));
|
|
29
|
+
} }, h("limel-tooltip-content", { label: this.label, helperLabel: this.helperLabel, role: "tooltip", "aria-hidden": !this.open, id: this.tooltipId }))));
|
|
30
|
+
}
|
|
31
|
+
setOwnerAriaLabel() {
|
|
32
|
+
const owner = this.getOwnerElement();
|
|
33
|
+
owner === null || owner === void 0 ? void 0 : owner.setAttribute('aria-describedby', this.tooltipId);
|
|
34
|
+
}
|
|
35
|
+
addListeners() {
|
|
36
|
+
const owner = this.getOwnerElement();
|
|
37
|
+
owner === null || owner === void 0 ? void 0 : owner.addEventListener('mouseover', this.showTooltip);
|
|
38
|
+
owner === null || owner === void 0 ? void 0 : owner.addEventListener('mouseout', this.hideTooltip);
|
|
39
|
+
owner === null || owner === void 0 ? void 0 : owner.addEventListener('click', this.hideTooltip);
|
|
40
|
+
}
|
|
41
|
+
removeListeners() {
|
|
42
|
+
const owner = this.getOwnerElement();
|
|
43
|
+
owner === null || owner === void 0 ? void 0 : owner.removeEventListener('mouseover', this.showTooltip);
|
|
44
|
+
owner === null || owner === void 0 ? void 0 : owner.removeEventListener('mouseout', this.hideTooltip);
|
|
45
|
+
owner === null || owner === void 0 ? void 0 : owner.removeEventListener('click', this.hideTooltip);
|
|
46
|
+
}
|
|
47
|
+
getOwnerElement() {
|
|
48
|
+
var _a;
|
|
49
|
+
let element = this.host;
|
|
50
|
+
do {
|
|
51
|
+
element = element.parentNode;
|
|
52
|
+
} while (element &&
|
|
53
|
+
element.nodeType !== Node.DOCUMENT_FRAGMENT_NODE &&
|
|
54
|
+
element.nodeType !== Node.DOCUMENT_NODE);
|
|
55
|
+
return (_a = element) === null || _a === void 0 ? void 0 : _a.getElementById(this.elementId);
|
|
14
56
|
}
|
|
15
57
|
get host() { return getElement(this); }
|
|
16
58
|
};
|
package/dist/esm/loader.js
CHANGED
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["limel-picker",[[1,"limel-picker",{"disabled":[4],"readonly":[516],"label":[1],"searchLabel":[1,"search-label"],"leadingIcon":[1,"leading-icon"],"emptyResultMessage":[1,"empty-result-message"],"required":[4],"value":[16],"searcher":[16],"multiple":[4],"delimiter":[513],"displayFullList":[4,"display-full-list"],"actions":[16],"actionPosition":[1,"action-position"],"actionScrollBehavior":[1,"action-scroll-behavior"],"items":[32],"textValue":[32],"loading":[32],"chips":[32]}]]],["limel-date-picker",[[1,"limel-date-picker",{"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"helperText":[513,"helper-text"],"required":[516],"value":[16],"type":[513],"format":[513],"language":[513],"formattedValue":[32],"internalFormat":[32],"showPortal":[32]}]]],["limel-select",[[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-tab-panel",[[1,"limel-tab-panel",{"tabs":[1040]}]]],["limel-file",[[1,"limel-file",{"value":[16],"label":[513],"required":[516],"disabled":[516],"readonly":[516],"accept":[513],"language":[1],"isDraggingOverDropZone":[32]}]]],["limel-menu",[[1,"limel-menu",{"label":[513],"items":[16],"disabled":[516],"openDirection":[513,"open-direction"],"open":[1540],"badgeIcons":[516,"badge-icons"],"gridLayout":[516,"grid-layout"],"fixed":[4]}]]],["limel-button",[[1,"limel-button",{"label":[513],"primary":[516],"outlined":[516],"icon":[513],"disabled":[516],"loading":[516]}]]],["limel-collapsible-section",[[1,"limel-collapsible-section",{"isOpen":[1540,"is-open"],"header":[1],"actions":[16]}]]],["limel-dialog",[[1,"limel-dialog",{"heading":[1],"fullscreen":[516],"open":[1540],"closingActions":[16]}]]],["limel-popover",[[1,"limel-popover",{"open":[4]}]]],["limel-progress-flow",[[1,"limel-progress-flow",{"flowItems":[16],"disabled":[4],"readonly":[4]}]]],["limel-tooltip",[[1,"limel-tooltip",{"label":[1],"helperLabel":[1,"helper-label"],"open":[
|
|
13
|
+
return bootstrapLazy([["limel-picker",[[1,"limel-picker",{"disabled":[4],"readonly":[516],"label":[1],"searchLabel":[1,"search-label"],"leadingIcon":[1,"leading-icon"],"emptyResultMessage":[1,"empty-result-message"],"required":[4],"value":[16],"searcher":[16],"multiple":[4],"delimiter":[513],"displayFullList":[4,"display-full-list"],"actions":[16],"actionPosition":[1,"action-position"],"actionScrollBehavior":[1,"action-scroll-behavior"],"items":[32],"textValue":[32],"loading":[32],"chips":[32]}]]],["limel-date-picker",[[1,"limel-date-picker",{"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"helperText":[513,"helper-text"],"required":[516],"value":[16],"type":[513],"format":[513],"language":[513],"formattedValue":[32],"internalFormat":[32],"showPortal":[32]}]]],["limel-select",[[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-tab-panel",[[1,"limel-tab-panel",{"tabs":[1040]}]]],["limel-file",[[1,"limel-file",{"value":[16],"label":[513],"required":[516],"disabled":[516],"readonly":[516],"accept":[513],"language":[1],"isDraggingOverDropZone":[32]}]]],["limel-menu",[[1,"limel-menu",{"label":[513],"items":[16],"disabled":[516],"openDirection":[513,"open-direction"],"open":[1540],"badgeIcons":[516,"badge-icons"],"gridLayout":[516,"grid-layout"],"fixed":[4]}]]],["limel-button",[[1,"limel-button",{"label":[513],"primary":[516],"outlined":[516],"icon":[513],"disabled":[516],"loading":[516]}]]],["limel-collapsible-section",[[1,"limel-collapsible-section",{"isOpen":[1540,"is-open"],"header":[1],"actions":[16]}]]],["limel-dialog",[[1,"limel-dialog",{"heading":[1],"fullscreen":[516],"open":[1540],"closingActions":[16]}]]],["limel-popover",[[1,"limel-popover",{"open":[4]}]]],["limel-progress-flow",[[1,"limel-progress-flow",{"flowItems":[16],"disabled":[4],"readonly":[4]}]]],["limel-tooltip",[[1,"limel-tooltip",{"label":[1],"helperLabel":[1,"helper-label"],"elementId":[1,"element-id"],"open":[32]}]]],["limel-banner",[[1,"limel-banner",{"message":[513],"icon":[513],"isOpen":[32],"open":[64],"close":[64]}]]],["limel-button-group",[[1,"limel-button-group",{"value":[16],"disabled":[516],"selectedButtonId":[32]}]]],["limel-table",[[1,"limel-table",{"data":[16],"columns":[16],"mode":[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"]}]]],["limel-checkbox",[[1,"limel-checkbox",{"disabled":[516],"readonly":[516],"label":[513],"checked":[516],"required":[516],"modified":[32]}]]],["limel-circular-progress",[[1,"limel-circular-progress",{"value":[2],"maxValue":[2,"max-value"],"suffix":[1],"displayPercentageColors":[4,"display-percentage-colors"],"size":[513]}]]],["limel-code-editor",[[1,"limel-code-editor",{"value":[1],"language":[1],"readonly":[4],"lineNumbers":[4,"line-numbers"],"colorScheme":[1,"color-scheme"],"random":[32]}]]],["limel-config",[[1,"limel-config",{"config":[16]}]]],["limel-flex-container",[[1,"limel-flex-container",{"direction":[513],"justify":[513],"align":[513],"reverse":[516]}]]],["limel-form",[[1,"limel-form",{"schema":[16],"value":[16],"propsFactory":[16]}]]],["limel-grid",[[1,"limel-grid"]]],["limel-linear-progress",[[1,"limel-linear-progress",{"value":[2],"indeterminate":[4]}]]],["limel-slider",[[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-snackbar",[[1,"limel-snackbar",{"message":[1],"timeout":[2],"actionText":[1,"action-text"],"dismissible":[4],"multiline":[4],"language":[1],"show":[64]}]]],["limel-switch",[[1,"limel-switch",{"label":[513],"disabled":[516],"readonly":[516],"value":[516],"fieldId":[32]}]]],["limel-badge",[[1,"limel-badge",{"label":[514]}]]],["limel-icon",[[1,"limel-icon",{"size":[513],"name":[513],"badge":[516]}]]],["limel-tab-bar",[[1,"limel-tab-bar",{"tabs":[1040],"canScrollLeft":[32],"canScrollRight":[32]},[[9,"resize","handleWindowResize"]]]]],["limel-header",[[1,"limel-header",{"icon":[1],"heading":[1],"subheading":[1],"supportingText":[1,"supporting-text"]}]]],["limel-progress-flow-item",[[0,"limel-progress-flow-item",{"item":[16],"disabled":[4],"readonly":[4]}]]],["limel-popover-surface",[[1,"limel-popover-surface",{"contentCollection":[16]}]]],["limel-tooltip-content",[[1,"limel-tooltip-content",{"label":[1],"helperLabel":[1,"helper-label"]}]]],["limel-list_3",[[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]}],[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-flatpickr-adapter_2",[[1,"limel-input-field",{"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"helperText":[513,"helper-text"],"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]}],[1,"limel-flatpickr-adapter",{"value":[16],"type":[1],"format":[1],"isOpen":[4,"is-open"],"inputElement":[16],"language":[1]}]]],["limel-chip-set",[[1,"limel-chip-set",{"value":[16],"type":[513],"label":[513],"disabled":[516],"readonly":[516],"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-icon-button",[[1,"limel-icon-button",{"icon":[513],"elevated":[516],"label":[513],"disabled":[516],"relayout":[64]}]]],["limel-spinner",[[1,"limel-spinner",{"size":[513],"limeBranded":[4,"lime-branded"]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as l}from"./p-fabb836f.js";(()=>{const l=import.meta.url,i={};return""!==l&&(i.resourcesUrl=new URL(".",l).href),e(i)})().then((e=>l([["p-7dd9c41d",[[1,"limel-picker",{disabled:[4],readonly:[516],label:[1],searchLabel:[1,"search-label"],leadingIcon:[1,"leading-icon"],emptyResultMessage:[1,"empty-result-message"],required:[4],value:[16],searcher:[16],multiple:[4],delimiter:[513],displayFullList:[4,"display-full-list"],actions:[16],actionPosition:[1,"action-position"],actionScrollBehavior:[1,"action-scroll-behavior"],items:[32],textValue:[32],loading:[32],chips:[32]}]]],["p-7be3a593",[[1,"limel-date-picker",{disabled:[516],readonly:[516],invalid:[516],label:[513],helperText:[513,"helper-text"],required:[516],value:[16],type:[513],format:[513],language:[513],formattedValue:[32],internalFormat:[32],showPortal:[32]}]]],["p-24c128ec",[[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]}]]],["p-bde1749a",[[1,"limel-tab-panel",{tabs:[1040]}]]],["p-90b2c0a2",[[1,"limel-file",{value:[16],label:[513],required:[516],disabled:[516],readonly:[516],accept:[513],language:[1],isDraggingOverDropZone:[32]}]]],["p-
|
|
1
|
+
import{p as e,b as l}from"./p-fabb836f.js";(()=>{const l=import.meta.url,i={};return""!==l&&(i.resourcesUrl=new URL(".",l).href),e(i)})().then((e=>l([["p-7dd9c41d",[[1,"limel-picker",{disabled:[4],readonly:[516],label:[1],searchLabel:[1,"search-label"],leadingIcon:[1,"leading-icon"],emptyResultMessage:[1,"empty-result-message"],required:[4],value:[16],searcher:[16],multiple:[4],delimiter:[513],displayFullList:[4,"display-full-list"],actions:[16],actionPosition:[1,"action-position"],actionScrollBehavior:[1,"action-scroll-behavior"],items:[32],textValue:[32],loading:[32],chips:[32]}]]],["p-7be3a593",[[1,"limel-date-picker",{disabled:[516],readonly:[516],invalid:[516],label:[513],helperText:[513,"helper-text"],required:[516],value:[16],type:[513],format:[513],language:[513],formattedValue:[32],internalFormat:[32],showPortal:[32]}]]],["p-24c128ec",[[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]}]]],["p-bde1749a",[[1,"limel-tab-panel",{tabs:[1040]}]]],["p-90b2c0a2",[[1,"limel-file",{value:[16],label:[513],required:[516],disabled:[516],readonly:[516],accept:[513],language:[1],isDraggingOverDropZone:[32]}]]],["p-63e4f918",[[1,"limel-menu",{label:[513],items:[16],disabled:[516],openDirection:[513,"open-direction"],open:[1540],badgeIcons:[516,"badge-icons"],gridLayout:[516,"grid-layout"],fixed:[4]}]]],["p-1a3a9bfd",[[1,"limel-button",{label:[513],primary:[516],outlined:[516],icon:[513],disabled:[516],loading:[516]}]]],["p-3df01502",[[1,"limel-collapsible-section",{isOpen:[1540,"is-open"],header:[1],actions:[16]}]]],["p-c636bfcf",[[1,"limel-dialog",{heading:[1],fullscreen:[516],open:[1540],closingActions:[16]}]]],["p-dc5b3f45",[[1,"limel-popover",{open:[4]}]]],["p-b88e7350",[[1,"limel-progress-flow",{flowItems:[16],disabled:[4],readonly:[4]}]]],["p-4e6042f7",[[1,"limel-tooltip",{label:[1],helperLabel:[1,"helper-label"],elementId:[1,"element-id"],open:[32]}]]],["p-191f05bc",[[1,"limel-banner",{message:[513],icon:[513],isOpen:[32],open:[64],close:[64]}]]],["p-aeeca058",[[1,"limel-button-group",{value:[16],disabled:[516],selectedButtonId:[32]}]]],["p-67c48f98",[[1,"limel-table",{data:[16],columns:[16],mode:[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"]}]]],["p-79541c2b",[[1,"limel-checkbox",{disabled:[516],readonly:[516],label:[513],checked:[516],required:[516],modified:[32]}]]],["p-231f62ba",[[1,"limel-circular-progress",{value:[2],maxValue:[2,"max-value"],suffix:[1],displayPercentageColors:[4,"display-percentage-colors"],size:[513]}]]],["p-467c87f6",[[1,"limel-code-editor",{value:[1],language:[1],readonly:[4],lineNumbers:[4,"line-numbers"],colorScheme:[1,"color-scheme"],random:[32]}]]],["p-7c6f6b80",[[1,"limel-config",{config:[16]}]]],["p-f94cbe50",[[1,"limel-flex-container",{direction:[513],justify:[513],align:[513],reverse:[516]}]]],["p-2476f7bb",[[1,"limel-form",{schema:[16],value:[16],propsFactory:[16]}]]],["p-6d9f679d",[[1,"limel-grid"]]],["p-3a21fa33",[[1,"limel-linear-progress",{value:[2],indeterminate:[4]}]]],["p-af7c5b11",[[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]}]]],["p-16c336e8",[[1,"limel-snackbar",{message:[1],timeout:[2],actionText:[1,"action-text"],dismissible:[4],multiline:[4],language:[1],show:[64]}]]],["p-c53695a3",[[1,"limel-switch",{label:[513],disabled:[516],readonly:[516],value:[516],fieldId:[32]}]]],["p-eb81fc35",[[1,"limel-badge",{label:[514]}]]],["p-fa880bd6",[[1,"limel-icon",{size:[513],name:[513],badge:[516]}]]],["p-61ecc7f1",[[1,"limel-tab-bar",{tabs:[1040],canScrollLeft:[32],canScrollRight:[32]},[[9,"resize","handleWindowResize"]]]]],["p-e9b4bdac",[[1,"limel-header",{icon:[1],heading:[1],subheading:[1],supportingText:[1,"supporting-text"]}]]],["p-6e3b6e69",[[0,"limel-progress-flow-item",{item:[16],disabled:[4],readonly:[4]}]]],["p-c45238b6",[[1,"limel-popover-surface",{contentCollection:[16]}]]],["p-a6a7dd00",[[1,"limel-tooltip-content",{label:[1],helperLabel:[1,"helper-label"]}]]],["p-6fcc1378",[[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]}],[1,"limel-portal",{openDirection:[1,"open-direction"],position:[1],containerId:[1,"container-id"],containerStyle:[16],parent:[16],inheritParentWidth:[4,"inherit-parent-width"],visible:[4]}]]],["p-5577f962",[[1,"limel-input-field",{disabled:[516],readonly:[516],invalid:[516],label:[513],helperText:[513,"helper-text"],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]}],[1,"limel-flatpickr-adapter",{value:[16],type:[1],format:[1],isOpen:[4,"is-open"],inputElement:[16],language:[1]}]]],["p-034f336b",[[1,"limel-chip-set",{value:[16],type:[513],label:[513],disabled:[516],readonly:[516],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]}]]],["p-30c4b32a",[[1,"limel-icon-button",{icon:[513],elevated:[516],label:[513],disabled:[516],relayout:[64]}]]],["p-136230d6",[[1,"limel-spinner",{size:[513],limeBranded:[4,"lime-branded"]}]]]],e)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as i,g as e}from"./p-fabb836f.js";import{c as s}from"./p-6c094f3f.js";const o=class{constructor(i){t(this,i),this.showTooltip=()=>{this.open=!0},this.hideTooltip=()=>{this.open=!1},this.portalId=s(),this.tooltipId=s()}connectedCallback(){this.setOwnerAriaLabel(),this.addListeners()}disconnectedCallback(){this.removeListeners()}render(){const t=getComputedStyle(this.host).getPropertyValue("--tooltip-z-index");return i("div",{class:"trigger-anchor"},i("limel-portal",{visible:this.open,containerId:this.portalId,containerStyle:{"z-index":t}},i("limel-tooltip-content",{label:this.label,helperLabel:this.helperLabel,role:"tooltip","aria-hidden":!this.open,id:this.tooltipId})))}setOwnerAriaLabel(){const t=this.getOwnerElement();null==t||t.setAttribute("aria-describedby",this.tooltipId)}addListeners(){const t=this.getOwnerElement();null==t||t.addEventListener("mouseover",this.showTooltip),null==t||t.addEventListener("mouseout",this.hideTooltip),null==t||t.addEventListener("click",this.hideTooltip)}removeListeners(){const t=this.getOwnerElement();null==t||t.removeEventListener("mouseover",this.showTooltip),null==t||t.removeEventListener("mouseout",this.hideTooltip),null==t||t.removeEventListener("click",this.hideTooltip)}getOwnerElement(){var t;let i=this.host;do{i=i.parentNode}while(i&&i.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&i.nodeType!==Node.DOCUMENT_NODE);return null===(t=i)||void 0===t?void 0:t.getElementById(this.elementId)}get host(){return e(this)}};o.style=".trigger-anchor{display:inline-block;position:relative}.tooltip-container{color:#f1f1f1;background-color:#232324}";export{o as limel_tooltip}
|
|
@@ -84,7 +84,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
84
84
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
85
85
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
86
86
|
PERFORMANCE OF THIS SOFTWARE.
|
|
87
|
-
***************************************************************************** */function Y(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}W(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var
|
|
87
|
+
***************************************************************************** */function Y(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}W(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var B=function(){return(B=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++)for(var e in n=arguments[r])Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e]);return t}).apply(this,arguments)},K={ACTIVE:"mdc-tab-indicator--active",FADE:"mdc-tab-indicator--fade",NO_TRANSITION:"mdc-tab-indicator--no-transition"},H={CONTENT_SELECTOR:".mdc-tab-indicator__content"},V=function(t){function n(r){return t.call(this,B(B({},n.defaultAdapter),r))||this}return Y(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return K},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return H},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},computeContentClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},setContentStyleProperty:function(){}}},enumerable:!1,configurable:!0}),n.prototype.computeContentClientRect=function(){return this.adapter.computeContentClientRect()},n}(l),F=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Y(n,t),n.prototype.activate=function(){this.adapter.addClass(V.cssClasses.ACTIVE)},n.prototype.deactivate=function(){this.adapter.removeClass(V.cssClasses.ACTIVE)},n}(V),X=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Y(n,t),n.prototype.activate=function(t){if(t){var n=this.computeContentClientRect(),r=t.width/n.width,i=t.left-n.left;this.adapter.addClass(V.cssClasses.NO_TRANSITION),this.adapter.setContentStyleProperty("transform","translateX("+i+"px) scaleX("+r+")"),this.computeContentClientRect(),this.adapter.removeClass(V.cssClasses.NO_TRANSITION),this.adapter.addClass(V.cssClasses.ACTIVE),this.adapter.setContentStyleProperty("transform","")}else this.adapter.addClass(V.cssClasses.ACTIVE)},n.prototype.deactivate=function(){this.adapter.removeClass(V.cssClasses.ACTIVE)},n}(V),G=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Y(n,t),n.attachTo=function(t){return new n(t)},n.prototype.initialize=function(){this.content_=this.root.querySelector(V.strings.CONTENT_SELECTOR)},n.prototype.computeContentClientRect=function(){return this.foundation.computeContentClientRect()},n.prototype.getDefaultFoundation=function(){var t=this,n={addClass:function(n){return t.root.classList.add(n)},removeClass:function(n){return t.root.classList.remove(n)},computeContentClientRect:function(){return t.content_.getBoundingClientRect()},setContentStyleProperty:function(n,r){return t.content_.style.setProperty(n,r)}};return this.root.classList.contains(V.cssClasses.FADE)?new F(n):new X(n)},n.prototype.activate=function(t){this.foundation.activate(t)},n.prototype.deactivate=function(){this.foundation.deactivate()},n}(u),q={ACTIVE:"mdc-tab--active"},U={ARIA_SELECTED:"aria-selected",CONTENT_SELECTOR:".mdc-tab__content",INTERACTED_EVENT:"MDCTab:interacted",RIPPLE_SELECTOR:".mdc-tab__ripple",TABINDEX:"tabIndex",TAB_INDICATOR_SELECTOR:".mdc-tab-indicator"},J=function(t){function n(r){var i=t.call(this,P(P({},n.defaultAdapter),r))||this;return i.focusOnActivate_=!0,i}return N(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return q},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return U},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setAttr:function(){},activateIndicator:function(){},deactivateIndicator:function(){},notifyInteracted:function(){},getOffsetLeft:function(){return 0},getOffsetWidth:function(){return 0},getContentOffsetLeft:function(){return 0},getContentOffsetWidth:function(){return 0},focus:function(){}}},enumerable:!1,configurable:!0}),n.prototype.handleClick=function(){this.adapter.notifyInteracted()},n.prototype.isActive=function(){return this.adapter.hasClass(q.ACTIVE)},n.prototype.setFocusOnActivate=function(t){this.focusOnActivate_=t},n.prototype.activate=function(t){this.adapter.addClass(q.ACTIVE),this.adapter.setAttr(U.ARIA_SELECTED,"true"),this.adapter.setAttr(U.TABINDEX,"0"),this.adapter.activateIndicator(t),this.focusOnActivate_&&this.adapter.focus()},n.prototype.deactivate=function(){this.isActive()&&(this.adapter.removeClass(q.ACTIVE),this.adapter.setAttr(U.ARIA_SELECTED,"false"),this.adapter.setAttr(U.TABINDEX,"-1"),this.adapter.deactivateIndicator())},n.prototype.computeDimensions=function(){var t=this.adapter.getOffsetWidth(),n=this.adapter.getOffsetLeft(),r=this.adapter.getContentOffsetWidth(),i=this.adapter.getContentOffsetLeft();return{contentLeft:n+i,contentRight:n+i+r,rootLeft:n,rootRight:n+t}},n}(l),Q=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return N(n,t),n.attachTo=function(t){return new n(t)},n.prototype.initialize=function(t,n){void 0===t&&(t=function(t,n){return new h(t,n)}),void 0===n&&(n=function(t){return new G(t)}),this.id=this.root.id;var r=new f(h.createAdapter(this));this.ripple_=t(this.root,r);var i=this.root.querySelector(J.strings.TAB_INDICATOR_SELECTOR);this.tabIndicator_=n(i),this.content_=this.root.querySelector(J.strings.CONTENT_SELECTOR)},n.prototype.initialSyncWithDOM=function(){var t=this;this.handleClick_=function(){return t.foundation.handleClick()},this.listen("click",this.handleClick_)},n.prototype.destroy=function(){this.unlisten("click",this.handleClick_),this.ripple_.destroy(),t.prototype.destroy.call(this)},n.prototype.getDefaultFoundation=function(){var t=this;return new J({setAttr:function(n,r){return t.root.setAttribute(n,r)},addClass:function(n){return t.root.classList.add(n)},removeClass:function(n){return t.root.classList.remove(n)},hasClass:function(n){return t.root.classList.contains(n)},activateIndicator:function(n){return t.tabIndicator_.activate(n)},deactivateIndicator:function(){return t.tabIndicator_.deactivate()},notifyInteracted:function(){return t.emit(J.strings.INTERACTED_EVENT,{tabId:t.id},!0)},getOffsetLeft:function(){return t.root.offsetLeft},getOffsetWidth:function(){return t.root.offsetWidth},getContentOffsetLeft:function(){return t.content_.offsetLeft},getContentOffsetWidth:function(){return t.content_.offsetWidth},focus:function(){return t.root.focus()}})},Object.defineProperty(n.prototype,"active",{get:function(){return this.foundation.isActive()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"focusOnActivate",{set:function(t){this.foundation.setFocusOnActivate(t)},enumerable:!1,configurable:!0}),n.prototype.activate=function(t){this.foundation.activate(t)},n.prototype.deactivate=function(){this.foundation.deactivate()},n.prototype.computeIndicatorClientRect=function(){return this.tabIndicator_.computeContentClientRect()},n.prototype.computeDimensions=function(){return this.foundation.computeDimensions()},n.prototype.focus=function(){this.root.focus()},n}(u),Z={ARROW_LEFT_KEY:"ArrowLeft",ARROW_RIGHT_KEY:"ArrowRight",END_KEY:"End",ENTER_KEY:"Enter",HOME_KEY:"Home",SPACE_KEY:"Space",TAB_ACTIVATED_EVENT:"MDCTabBar:activated",TAB_SCROLLER_SELECTOR:".mdc-tab-scroller",TAB_SELECTOR:".mdc-tab"},$={ARROW_LEFT_KEYCODE:37,ARROW_RIGHT_KEYCODE:39,END_KEYCODE:35,ENTER_KEYCODE:13,EXTRA_SCROLL_AMOUNT:20,HOME_KEYCODE:36,SPACE_KEYCODE:32},tt=new Set;
|
|
88
88
|
/**
|
|
89
89
|
* @license
|
|
90
90
|
* Copyright 2018 Google Inc.
|
|
@@ -128,4 +128,4 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
128
128
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
129
129
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
130
130
|
* THE SOFTWARE.
|
|
131
|
-
*/const{TAB_ACTIVATED_EVENT:ct}=Z,at=class{constructor(r){t(this,r),this.changeTab=n(this,"changeTab",7),this.tabs=[],this.canScrollLeft=!1,this.canScrollRight=!1,this.setupMdc=!1,this.handleTabActivated=this.handleTabActivated.bind(this),this.handleScroll=this.handleScroll.bind(this),this.handleLeftScrollClick=this.handleLeftScrollClick.bind(this),this.handleRightScrollClick=this.handleRightScrollClick.bind(this),this.renderTab=this.renderTab.bind(this)}connectedCallback(){this.setup()}componentDidLoad(){this.setup()}componentDidUpdate(){this.setupMdc&&(this.setup(),this.setupMdc=!1)}disconnectedCallback(){this.tearDown()}render(){return r("div",{class:"mdc-tab-bar",role:"tablist"},r("div",{class:{"mdc-tab-scroller":!0,"can-scroll-left":this.canScrollLeft,"can-scroll-right":this.canScrollRight}},r("div",{class:"mdc-tab-scroller__scroll-area lime-hide-scrollbars"},r("div",{class:"mdc-tab-scroller__scroll-content"},this.tabs.map(this.renderTab))),r("div",{class:"scroll-fade left"}),r("div",{class:"scroll-button left"},r("limel-icon-button",{icon:"angle_left",elevated:!0,tabindex:"-1","aria-hidden":"true",disabled:!this.canScrollLeft,onClick:this.handleLeftScrollClick})),r("div",{class:"scroll-fade right"}),r("div",{class:"scroll-button right"},r("limel-icon-button",{icon:"angle_right",elevated:!0,tabindex:"-1","aria-hidden":"true",disabled:!this.canScrollRight,onClick:this.handleRightScrollClick}))))}tabsChanged(t=[],n=[]){const r=t.map((t=>t.id)),i=n.map((t=>t.id));s(r,i)||(this.setupMdc=!0,this.tearDown())}handleWindowResize(){this.handleScroll()}setup(){const t=this.host.shadowRoot.querySelector(".mdc-tab-bar");t&&(this.mdcTabBar=new ot(t),this.mdcTabBar.focusOnActivate=!0,this.mdcTabBar.useAutomaticActivation=!0,this.scrollArea=t.querySelector(".mdc-tab-scroller__scroll-area"),this.scrollContent=t.querySelector(".mdc-tab-scroller__scroll-content"),this.setupListeners(),setTimeout(this.handleScroll,0))}tearDown(){this.scrollArea&&this.scrollArea.removeEventListener("scroll",this.handleScroll),this.mdcTabBar&&(this.mdcTabBar.unlisten(ct,this.handleTabActivated),this.mdcTabBar.destroy())}setupListeners(){this.mdcTabBar.listen(ct,this.handleTabActivated),this.scrollArea.addEventListener("scroll",this.handleScroll,{passive:!0})}handleTabActivated(t){const n=function(t,n){const r=t.findIndex((t=>!0===t.active)),i=[...t];return-1!==r&&(i[r]=Object.assign(Object.assign({},t[r]),{active:!1})),i[n]=Object.assign(Object.assign({},t[n]),{active:!0}),i}(this.tabs,t.detail.index);y(n,this.tabs).forEach((t=>{this.changeTab.emit(t)})),this.tabs=n}handleScroll(){const t=this.scrollArea.scrollLeft,n=Math.floor(this.scrollContent.getBoundingClientRect().width-this.scrollArea.getBoundingClientRect().width-t);this.canScrollLeft=t>40,this.canScrollRight=n>40}handleLeftScrollClick(){this.scrollArea.scroll({left:this.scrollArea.scrollLeft-150,behavior:"smooth"})}handleRightScrollClick(){this.scrollArea.scroll({left:this.scrollArea.scrollLeft+150,behavior:"smooth"})}renderIcon(t){if(!t.icon)return;const n={color:""};return t.iconColor&&(n.color=t.iconColor),r("limel-icon",{class:"mdc-tab__icon",name:t.icon,style:n,size:"small","aria-hidden":"true"})}renderTab(t){return r("button",{class:{"mdc-tab":!0,"mdc-tab--active":!!t.active},role:"tab","aria-selected":t.active?"true":"false",tabindex:t.active?0:-1},r("span",{class:"mdc-tab__content"},this.renderIcon(t),r("span",{class:"mdc-tab__text-label"},t.text),t.badge?r("limel-badge",{label:t.badge}):""),r("span",{class:{"mdc-tab-indicator":!0,"mdc-tab-indicator--active":!!t.active}},r("span",{class:"mdc-tab-indicator__content mdc-tab-indicator__content--underline"})),r("span",{class:"mdc-tab__ripple"}))}get host(){return i(this)}static get watchers(){return{tabs:["tabsChanged"]}}};at.style=":host{--mdc-theme-primary:var(\n --lime-primary-color,\n rgb(var(--color-teal-default))\n );--mdc-theme-secondary:var(\n --lime-secondary-color,\n rgb(var(--contrast-1100))\n );--mdc-theme-on-primary:var(\n --lime-on-primary-color,\n rgb(var(--contrast-100))\n );--mdc-theme-on-secondary:var(\n --lime-on-secondary-color,\n rgb(var(--contrast-100))\n );--mdc-theme-text-disabled-on-background:var(\n --lime-text-disabled-on-background-color,\n rgba(var(--contrast-1700), 0.38)\n );--mdc-theme-text-primary-on-background:var(\n --lime-text-primary-on-background-color,\n rgba(var(--contrast-1700), 0.87)\n );--mdc-theme-text-secondary-on-background:var(\n --lime-text-secondary-on-background-color,\n rgba(var(--contrast-1700), 0.54)\n );--lime-error-text-color:rgb(var(--color-red-darker));--mdc-theme-surface:var(\n --lime-surface-background-color,\n rgb(var(--contrast-100))\n );--mdc-theme-on-surface:var(\n --lime-on-surface-color,\n var(--lime-text-primary-on-background-color)\n )}.mdc-tab-bar{width:100%}.mdc-tab{height:48px}.mdc-tab--stacked{height:72px}.mdc-tab-scroller{overflow-y:hidden}.mdc-tab-scroller.mdc-tab-scroller--animating .mdc-tab-scroller__scroll-content{transition:250ms transform cubic-bezier(0.4, 0, 0.2, 1)}.mdc-tab-scroller__test{position:absolute;top:-9999px;width:100px;height:100px;overflow-x:scroll}.mdc-tab-scroller__scroll-area{-webkit-overflow-scrolling:touch;display:flex;overflow-x:hidden}.mdc-tab-scroller__scroll-area::-webkit-scrollbar,.mdc-tab-scroller__test::-webkit-scrollbar{display:none}.mdc-tab-scroller__scroll-area--scroll{overflow-x:scroll}.mdc-tab-scroller__scroll-content{position:relative;display:flex;flex:1 0 auto;transform:none;will-change:transform}.mdc-tab-scroller--align-start .mdc-tab-scroller__scroll-content{justify-content:flex-start}.mdc-tab-scroller--align-end .mdc-tab-scroller__scroll-content{justify-content:flex-end}.mdc-tab-scroller--align-center .mdc-tab-scroller__scroll-content{justify-content:center}.mdc-tab-scroller--animating .mdc-tab-scroller__scroll-area{-webkit-overflow-scrolling:auto}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator .mdc-tab-indicator__content--underline{border-color:#26a69a;border-color:var(--mdc-theme-primary, #26a69a)}.mdc-tab-indicator .mdc-tab-indicator__content--icon{color:#575756;color:var(--mdc-theme-secondary, #575756)}.mdc-tab-indicator .mdc-tab-indicator__content--underline{border-top-width:2px}.mdc-tab-indicator .mdc-tab-indicator__content--icon{height:34px;font-size:34px}.mdc-tab-indicator__content{transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator__content--icon{align-self:center;margin:0 auto}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}.mdc-tab-indicator .mdc-tab-indicator__content{transition:250ms transform cubic-bezier(0.4, 0, 0.2, 1)}.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition:150ms opacity linear}.mdc-tab-indicator--active.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition-delay:100ms}.mdc-tab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-button-font-size, 0.875rem);line-height:2.25rem;line-height:var(--mdc-typography-button-line-height, 2.25rem);font-weight:500;font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:0.0892857143em;letter-spacing:var(--mdc-typography-button-letter-spacing, 0.0892857143em);text-decoration:none;text-decoration:var(--mdc-typography-button-text-decoration, none);text-transform:none;text-transform:var(--mdc-typography-button-text-transform, none);padding-right:24px;padding-left:24px;min-width:90px;position:relative;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;margin:0;padding-top:0;padding-bottom:0;border:none;outline:none;background:none;text-align:center;white-space:nowrap;cursor:pointer;-webkit-appearance:none;z-index:1}.mdc-tab .mdc-tab__text-label{color:rgba(0, 0, 0, 0.6)}.mdc-tab .mdc-tab__icon{color:rgba(0, 0, 0, 0.54);fill:currentColor}.mdc-tab::-moz-focus-inner{padding:0;border:0}.mdc-tab--min-width{flex:0 1 auto}.mdc-tab__content{position:relative;display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab__icon{transition:150ms color linear;width:24px;height:24px;font-size:24px;z-index:2}.mdc-tab--stacked .mdc-tab__content{flex-direction:column;align-items:center;justify-content:center}.mdc-tab--stacked .mdc-tab__text-label{padding-top:6px;padding-bottom:4px}.mdc-tab--active .mdc-tab__text-label{color:#26a69a;color:var(--mdc-theme-primary, #26a69a)}.mdc-tab--active .mdc-tab__icon{color:#26a69a;color:var(--mdc-theme-primary, #26a69a);fill:currentColor}.mdc-tab--active .mdc-tab__text-label,.mdc-tab--active .mdc-tab__icon{transition-delay:100ms}.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label{padding-left:8px;padding-right:0}[dir=rtl] .mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label,.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label[dir=rtl]{padding-left:0;padding-right:8px}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-tab{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}.mdc-tab .mdc-tab__ripple::before,.mdc-tab .mdc-tab__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\"\"}.mdc-tab .mdc-tab__ripple::before{transition:opacity 15ms linear, background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-tab .mdc-tab__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-tab.mdc-ripple-upgraded .mdc-tab__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-tab.mdc-ripple-upgraded .mdc-tab__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-tab.mdc-ripple-upgraded--unbounded .mdc-tab__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-tab.mdc-ripple-upgraded--foreground-activation .mdc-tab__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards}.mdc-tab.mdc-ripple-upgraded--foreground-deactivation .mdc-tab__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-tab .mdc-tab__ripple::before,.mdc-tab .mdc-tab__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-tab.mdc-ripple-upgraded .mdc-tab__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-tab .mdc-tab__ripple::before,.mdc-tab .mdc-tab__ripple::after{background-color:#26a69a;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #26a69a))}.mdc-tab:hover .mdc-tab__ripple::before,.mdc-tab.mdc-ripple-surface--hover .mdc-tab__ripple::before{opacity:0.08;opacity:var(--mdc-ripple-hover-opacity, 0.08)}.mdc-tab.mdc-ripple-upgraded--background-focused .mdc-tab__ripple::before,.mdc-tab:not(.mdc-ripple-upgraded):focus .mdc-tab__ripple::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-tab:not(.mdc-ripple-upgraded) .mdc-tab__ripple::after{transition:opacity 150ms linear}.mdc-tab:not(.mdc-ripple-upgraded):active .mdc-tab__ripple::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-tab.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-tab__ripple{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;will-change:transform, opacity}.scroll-fade,.scroll-button{position:absolute;transition-property:transform;transition-duration:0.3s;transition-timing-function:ease-out}.scroll-fade{top:0;height:100%;width:4.0625rem;pointer-events:none}.scroll-fade.left{transform:translate3d(-4.0625rem, 0, 0);left:0;background:linear-gradient(270deg, rgba(var(--contrast-300), 0) 0%, rgba(var(--contrast-300), 0.8) 40%, rgba(var(--contrast-300), 0.8) 100%)}.scroll-fade.right{transform:translate3d(4.0625rem, 0, 0);right:0;background:linear-gradient(90deg, rgba(var(--contrast-300), 0) 0%, rgba(var(--contrast-300), 0.8) 40%, rgba(var(--contrast-300), 0.8) 100%)}.scroll-button{--icon-background-color:rgb(var(--contrast-100));top:0.25rem}.scroll-button.left{transform:translate3d(-4.0625rem, 0, 0);left:0.25rem}.scroll-button.right{transform:translate3d(4.0625rem, 0, 0);right:0.25rem}.scroll-button:hover{transform:translate3d(0, 0, 0)}.mdc-tab-scroller{position:relative;overflow:hidden}.mdc-tab-scroller.can-scroll-left .scroll-fade.left,.mdc-tab-scroller.can-scroll-left .scroll-button.left,.mdc-tab-scroller.can-scroll-right .scroll-fade.right,.mdc-tab-scroller.can-scroll-right .scroll-button.right{transform:translate3d(0, 0, 0)}.mdc-tab-scroller.can-scroll-left:not(.can-scroll-right) .scroll-button.right,.mdc-tab-scroller.can-scroll-right:not(.can-scroll-left) .scroll-button.left{opacity:0.5;transition-delay:0.5s}.lime-hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}.mdc-tab-scroller__scroll-content{padding:0.5rem 0.75rem 0 0.75rem;background-color:rgb(var(--contrast-300))}:host{display:block;position:relative}:host(.has-tabs-with-equal-width) .mdc-tab{flex:1 0 auto}.mdc-tab__icon{margin-right:0.5rem}.mdc-tab-indicator .mdc-tab-indicator__content{border:none}.mdc-tab--active .mdc-ripple-upgraded--background-focused:before{background-color:transparent;transition:background-color 1s ease}.mdc-tab__ripple{box-sizing:border-box;border-radius:0.625rem;border-style:solid;border-color:transparent;border-width:0.25rem;opacity:0.7}.mdc-tab__ripple:before,.mdc-tab__ripple:after{transition:background-color 0.5s ease}.mdc-tab{border-radius:0;letter-spacing:normal}.mdc-tab{background-color:transparent;flex:0 0 auto}.mdc-tab:not(.mdc-tab--active):after{content:\"\";display:block;background-color:rgb(var(--contrast-600));width:0.125rem;height:1rem;margin:auto;position:absolute;top:0;bottom:0;border-radius:1rem;right:-0.125rem}.mdc-tab:not(.mdc-tab--active):last-of-type:after{display:none}.mdc-tab--active{border-radius:0.625rem 0.625rem 0 0;background-color:rgb(var(--contrast-100));z-index:2}.mdc-tab--active:before,.mdc-tab--active:after{content:\"\";display:block;width:0.75rem;height:0.75rem;position:absolute;bottom:0;background-color:rgb(var(--contrast-100));-webkit-mask-image:url(\"data:image/svg+xml; utf8, <svg xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd' stroke-linejoin='round' stroke-miterlimit='2' clip-rule='evenodd' viewBox='0 0 50 50'><defs/><path d='M0 0c0 27.594 22.406 50 50 50H0V0z'/></svg>\");mask-image:url(\"data:image/svg+xml; utf8, <svg xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd' stroke-linejoin='round' stroke-miterlimit='2' clip-rule='evenodd' viewBox='0 0 50 50'><defs/><path d='M0 0c0 27.594 22.406 50 50 50H0V0z'/></svg>\")}.mdc-tab--active:before{left:-0.75rem;transform:rotateY(180deg)}.mdc-tab--active:after{right:-0.75rem}";export{at as limel_tab_bar}
|
|
131
|
+
*/const{TAB_ACTIVATED_EVENT:ct}=Z,at=class{constructor(r){t(this,r),this.changeTab=n(this,"changeTab",7),this.tabs=[],this.canScrollLeft=!1,this.canScrollRight=!1,this.setupMdc=!1,this.handleTabActivated=this.handleTabActivated.bind(this),this.handleScroll=this.handleScroll.bind(this),this.handleLeftScrollClick=this.handleLeftScrollClick.bind(this),this.handleRightScrollClick=this.handleRightScrollClick.bind(this),this.renderTab=this.renderTab.bind(this)}connectedCallback(){this.setup()}componentDidLoad(){this.setup()}componentDidUpdate(){this.setupMdc&&(this.setup(),this.setupMdc=!1)}disconnectedCallback(){this.tearDown()}render(){return r("div",{class:"mdc-tab-bar",role:"tablist"},r("div",{class:{"mdc-tab-scroller":!0,"can-scroll-left":this.canScrollLeft,"can-scroll-right":this.canScrollRight}},r("div",{class:"mdc-tab-scroller__scroll-area lime-hide-scrollbars"},r("div",{class:"mdc-tab-scroller__scroll-content"},this.tabs.map(this.renderTab))),r("div",{class:"scroll-fade left"}),r("div",{class:"scroll-button left"},r("limel-icon-button",{icon:"angle_left",elevated:!0,tabindex:"-1","aria-hidden":"true",disabled:!this.canScrollLeft,onClick:this.handleLeftScrollClick})),r("div",{class:"scroll-fade right"}),r("div",{class:"scroll-button right"},r("limel-icon-button",{icon:"angle_right",elevated:!0,tabindex:"-1","aria-hidden":"true",disabled:!this.canScrollRight,onClick:this.handleRightScrollClick}))))}tabsChanged(t=[],n=[]){const r=t.map((t=>t.id)),i=n.map((t=>t.id));s(r,i)||(this.setupMdc=!0,this.tearDown())}handleWindowResize(){this.handleScroll()}setup(){const t=this.host.shadowRoot.querySelector(".mdc-tab-bar");t&&(this.mdcTabBar=new ot(t),this.mdcTabBar.focusOnActivate=!0,this.mdcTabBar.useAutomaticActivation=!0,this.scrollArea=t.querySelector(".mdc-tab-scroller__scroll-area"),this.scrollContent=t.querySelector(".mdc-tab-scroller__scroll-content"),this.setupListeners(),setTimeout(this.handleScroll,0))}tearDown(){this.scrollArea&&this.scrollArea.removeEventListener("scroll",this.handleScroll),this.mdcTabBar&&(this.mdcTabBar.unlisten(ct,this.handleTabActivated),this.mdcTabBar.destroy())}setupListeners(){this.mdcTabBar.listen(ct,this.handleTabActivated),this.scrollArea.addEventListener("scroll",this.handleScroll,{passive:!0})}handleTabActivated(t){const n=function(t,n){const r=t.findIndex((t=>!0===t.active)),i=[...t];return-1!==r&&(i[r]=Object.assign(Object.assign({},t[r]),{active:!1})),i[n]=Object.assign(Object.assign({},t[n]),{active:!0}),i}(this.tabs,t.detail.index);y(n,this.tabs).sort(this.sortByInactive).forEach((t=>{this.changeTab.emit(t)})),this.tabs=n}sortByInactive(t,n){return Number(t.active)-Number(n.active)}handleScroll(){const t=this.scrollArea.scrollLeft,n=Math.floor(this.scrollContent.getBoundingClientRect().width-this.scrollArea.getBoundingClientRect().width-t);this.canScrollLeft=t>40,this.canScrollRight=n>40}handleLeftScrollClick(){this.scrollArea.scroll({left:this.scrollArea.scrollLeft-150,behavior:"smooth"})}handleRightScrollClick(){this.scrollArea.scroll({left:this.scrollArea.scrollLeft+150,behavior:"smooth"})}renderIcon(t){if(!t.icon)return;const n={color:""};return t.iconColor&&(n.color=t.iconColor),r("limel-icon",{class:"mdc-tab__icon",name:t.icon,style:n,size:"small","aria-hidden":"true"})}renderTab(t){return r("button",{class:{"mdc-tab":!0,"mdc-tab--active":!!t.active},role:"tab","aria-selected":t.active?"true":"false",tabindex:t.active?0:-1},r("span",{class:"mdc-tab__content"},this.renderIcon(t),r("span",{class:"mdc-tab__text-label"},t.text),t.badge?r("limel-badge",{label:t.badge}):""),r("span",{class:{"mdc-tab-indicator":!0,"mdc-tab-indicator--active":!!t.active}},r("span",{class:"mdc-tab-indicator__content mdc-tab-indicator__content--underline"})),r("span",{class:"mdc-tab__ripple"}))}get host(){return i(this)}static get watchers(){return{tabs:["tabsChanged"]}}};at.style=":host{--mdc-theme-primary:var(\n --lime-primary-color,\n rgb(var(--color-teal-default))\n );--mdc-theme-secondary:var(\n --lime-secondary-color,\n rgb(var(--contrast-1100))\n );--mdc-theme-on-primary:var(\n --lime-on-primary-color,\n rgb(var(--contrast-100))\n );--mdc-theme-on-secondary:var(\n --lime-on-secondary-color,\n rgb(var(--contrast-100))\n );--mdc-theme-text-disabled-on-background:var(\n --lime-text-disabled-on-background-color,\n rgba(var(--contrast-1700), 0.38)\n );--mdc-theme-text-primary-on-background:var(\n --lime-text-primary-on-background-color,\n rgba(var(--contrast-1700), 0.87)\n );--mdc-theme-text-secondary-on-background:var(\n --lime-text-secondary-on-background-color,\n rgba(var(--contrast-1700), 0.54)\n );--lime-error-text-color:rgb(var(--color-red-darker));--mdc-theme-surface:var(\n --lime-surface-background-color,\n rgb(var(--contrast-100))\n );--mdc-theme-on-surface:var(\n --lime-on-surface-color,\n var(--lime-text-primary-on-background-color)\n )}.mdc-tab-bar{width:100%}.mdc-tab{height:48px}.mdc-tab--stacked{height:72px}.mdc-tab-scroller{overflow-y:hidden}.mdc-tab-scroller.mdc-tab-scroller--animating .mdc-tab-scroller__scroll-content{transition:250ms transform cubic-bezier(0.4, 0, 0.2, 1)}.mdc-tab-scroller__test{position:absolute;top:-9999px;width:100px;height:100px;overflow-x:scroll}.mdc-tab-scroller__scroll-area{-webkit-overflow-scrolling:touch;display:flex;overflow-x:hidden}.mdc-tab-scroller__scroll-area::-webkit-scrollbar,.mdc-tab-scroller__test::-webkit-scrollbar{display:none}.mdc-tab-scroller__scroll-area--scroll{overflow-x:scroll}.mdc-tab-scroller__scroll-content{position:relative;display:flex;flex:1 0 auto;transform:none;will-change:transform}.mdc-tab-scroller--align-start .mdc-tab-scroller__scroll-content{justify-content:flex-start}.mdc-tab-scroller--align-end .mdc-tab-scroller__scroll-content{justify-content:flex-end}.mdc-tab-scroller--align-center .mdc-tab-scroller__scroll-content{justify-content:center}.mdc-tab-scroller--animating .mdc-tab-scroller__scroll-area{-webkit-overflow-scrolling:auto}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator .mdc-tab-indicator__content--underline{border-color:#26a69a;border-color:var(--mdc-theme-primary, #26a69a)}.mdc-tab-indicator .mdc-tab-indicator__content--icon{color:#575756;color:var(--mdc-theme-secondary, #575756)}.mdc-tab-indicator .mdc-tab-indicator__content--underline{border-top-width:2px}.mdc-tab-indicator .mdc-tab-indicator__content--icon{height:34px;font-size:34px}.mdc-tab-indicator__content{transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator__content--icon{align-self:center;margin:0 auto}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}.mdc-tab-indicator .mdc-tab-indicator__content{transition:250ms transform cubic-bezier(0.4, 0, 0.2, 1)}.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition:150ms opacity linear}.mdc-tab-indicator--active.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition-delay:100ms}.mdc-tab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-button-font-size, 0.875rem);line-height:2.25rem;line-height:var(--mdc-typography-button-line-height, 2.25rem);font-weight:500;font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:0.0892857143em;letter-spacing:var(--mdc-typography-button-letter-spacing, 0.0892857143em);text-decoration:none;text-decoration:var(--mdc-typography-button-text-decoration, none);text-transform:none;text-transform:var(--mdc-typography-button-text-transform, none);padding-right:24px;padding-left:24px;min-width:90px;position:relative;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;margin:0;padding-top:0;padding-bottom:0;border:none;outline:none;background:none;text-align:center;white-space:nowrap;cursor:pointer;-webkit-appearance:none;z-index:1}.mdc-tab .mdc-tab__text-label{color:rgba(0, 0, 0, 0.6)}.mdc-tab .mdc-tab__icon{color:rgba(0, 0, 0, 0.54);fill:currentColor}.mdc-tab::-moz-focus-inner{padding:0;border:0}.mdc-tab--min-width{flex:0 1 auto}.mdc-tab__content{position:relative;display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab__icon{transition:150ms color linear;width:24px;height:24px;font-size:24px;z-index:2}.mdc-tab--stacked .mdc-tab__content{flex-direction:column;align-items:center;justify-content:center}.mdc-tab--stacked .mdc-tab__text-label{padding-top:6px;padding-bottom:4px}.mdc-tab--active .mdc-tab__text-label{color:#26a69a;color:var(--mdc-theme-primary, #26a69a)}.mdc-tab--active .mdc-tab__icon{color:#26a69a;color:var(--mdc-theme-primary, #26a69a);fill:currentColor}.mdc-tab--active .mdc-tab__text-label,.mdc-tab--active .mdc-tab__icon{transition-delay:100ms}.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label{padding-left:8px;padding-right:0}[dir=rtl] .mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label,.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label[dir=rtl]{padding-left:0;padding-right:8px}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-tab{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}.mdc-tab .mdc-tab__ripple::before,.mdc-tab .mdc-tab__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\"\"}.mdc-tab .mdc-tab__ripple::before{transition:opacity 15ms linear, background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-tab .mdc-tab__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-tab.mdc-ripple-upgraded .mdc-tab__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-tab.mdc-ripple-upgraded .mdc-tab__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-tab.mdc-ripple-upgraded--unbounded .mdc-tab__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-tab.mdc-ripple-upgraded--foreground-activation .mdc-tab__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards}.mdc-tab.mdc-ripple-upgraded--foreground-deactivation .mdc-tab__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-tab .mdc-tab__ripple::before,.mdc-tab .mdc-tab__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-tab.mdc-ripple-upgraded .mdc-tab__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-tab .mdc-tab__ripple::before,.mdc-tab .mdc-tab__ripple::after{background-color:#26a69a;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #26a69a))}.mdc-tab:hover .mdc-tab__ripple::before,.mdc-tab.mdc-ripple-surface--hover .mdc-tab__ripple::before{opacity:0.08;opacity:var(--mdc-ripple-hover-opacity, 0.08)}.mdc-tab.mdc-ripple-upgraded--background-focused .mdc-tab__ripple::before,.mdc-tab:not(.mdc-ripple-upgraded):focus .mdc-tab__ripple::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-tab:not(.mdc-ripple-upgraded) .mdc-tab__ripple::after{transition:opacity 150ms linear}.mdc-tab:not(.mdc-ripple-upgraded):active .mdc-tab__ripple::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-tab.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-tab__ripple{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;will-change:transform, opacity}.scroll-fade,.scroll-button{position:absolute;transition-property:transform;transition-duration:0.3s;transition-timing-function:ease-out}.scroll-fade{top:0;height:100%;width:4.0625rem;pointer-events:none}.scroll-fade.left{transform:translate3d(-4.0625rem, 0, 0);left:0;background:linear-gradient(270deg, rgba(var(--contrast-300), 0) 0%, rgba(var(--contrast-300), 0.8) 40%, rgba(var(--contrast-300), 0.8) 100%)}.scroll-fade.right{transform:translate3d(4.0625rem, 0, 0);right:0;background:linear-gradient(90deg, rgba(var(--contrast-300), 0) 0%, rgba(var(--contrast-300), 0.8) 40%, rgba(var(--contrast-300), 0.8) 100%)}.scroll-button{--icon-background-color:rgb(var(--contrast-100));top:0.25rem}.scroll-button.left{transform:translate3d(-4.0625rem, 0, 0);left:0.25rem}.scroll-button.right{transform:translate3d(4.0625rem, 0, 0);right:0.25rem}.scroll-button:hover{transform:translate3d(0, 0, 0)}.mdc-tab-scroller{position:relative;overflow:hidden}.mdc-tab-scroller.can-scroll-left .scroll-fade.left,.mdc-tab-scroller.can-scroll-left .scroll-button.left,.mdc-tab-scroller.can-scroll-right .scroll-fade.right,.mdc-tab-scroller.can-scroll-right .scroll-button.right{transform:translate3d(0, 0, 0)}.mdc-tab-scroller.can-scroll-left:not(.can-scroll-right) .scroll-button.right,.mdc-tab-scroller.can-scroll-right:not(.can-scroll-left) .scroll-button.left{opacity:0.5;transition-delay:0.5s}.lime-hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}.mdc-tab-scroller__scroll-content{padding:0.5rem 0.75rem 0 0.75rem;background-color:rgb(var(--contrast-300))}:host{display:block;position:relative}:host(.has-tabs-with-equal-width) .mdc-tab{flex:1 0 auto}.mdc-tab__icon{margin-right:0.5rem}.mdc-tab-indicator .mdc-tab-indicator__content{border:none}.mdc-tab--active .mdc-ripple-upgraded--background-focused:before{background-color:transparent;transition:background-color 1s ease}.mdc-tab__ripple{box-sizing:border-box;border-radius:0.625rem;border-style:solid;border-color:transparent;border-width:0.25rem;opacity:0.7}.mdc-tab__ripple:before,.mdc-tab__ripple:after{transition:background-color 0.5s ease}.mdc-tab{border-radius:0;letter-spacing:normal}.mdc-tab{background-color:transparent;flex:0 0 auto}.mdc-tab:not(.mdc-tab--active):after{content:\"\";display:block;background-color:rgb(var(--contrast-600));width:0.125rem;height:1rem;margin:auto;position:absolute;top:0;bottom:0;border-radius:1rem;right:-0.125rem}.mdc-tab:not(.mdc-tab--active):last-of-type:after{display:none}.mdc-tab--active{border-radius:0.625rem 0.625rem 0 0;background-color:rgb(var(--contrast-100));z-index:2}.mdc-tab--active:before,.mdc-tab--active:after{content:\"\";display:block;width:0.75rem;height:0.75rem;position:absolute;bottom:0;background-color:rgb(var(--contrast-100));-webkit-mask-image:url(\"data:image/svg+xml; utf8, <svg xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd' stroke-linejoin='round' stroke-miterlimit='2' clip-rule='evenodd' viewBox='0 0 50 50'><defs/><path d='M0 0c0 27.594 22.406 50 50 50H0V0z'/></svg>\");mask-image:url(\"data:image/svg+xml; utf8, <svg xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd' stroke-linejoin='round' stroke-miterlimit='2' clip-rule='evenodd' viewBox='0 0 50 50'><defs/><path d='M0 0c0 27.594 22.406 50 50 50H0V0z'/></svg>\")}.mdc-tab--active:before{left:-0.75rem;transform:rotateY(180deg)}.mdc-tab--active:after{right:-0.75rem}";export{at as limel_tab_bar}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as s,g as e}from"./p-fabb836f.js";import{c as r}from"./p-6c094f3f.js";import{z as n}from"./p-7c4d91f5.js";import"./p-acfbf7ac.js";import"./p-8bbe3720.js";import"./p-fc610f15.js";const o=class{constructor(s){t(this,s),this.cancel=i(this,"cancel",7),this.select=i(this,"select",7),this.label="",this.items=[],this.disabled=!1,this.openDirection="right",this.open=!1,this.badgeIcons=!1,this.gridLayout=!1,this.fixed=!1,this.setTriggerAttributes=t=>{const i={"aria-haspopup":!0,"aria-expanded":this.open,disabled:this.disabled,role:"button"};for(const[s,e]of Object.entries(i))e?t.setAttribute(s,String(e)):t.removeAttribute(s)},this.onClose=()=>{this.cancel.emit(),this.open=!1},this.onTriggerClick=t=>{t.stopPropagation(),this.disabled||(this.open=!this.open)},this.onListChange=t=>{this.items=this.items.map((i=>i===t.detail?t.detail:i)),this.select.emit(t.detail),this.open=!1},this.setListElement=t=>{this.list=t},this.focusMenuItem=()=>{var t;const i=this.list.shadowRoot.activeElement;null==i||i.blur();const s=this.items.filter(this.isListItem),e=Math.max(s.findIndex((t=>t.selected)),0);null===(t=Array.from(this.list.shadowRoot.querySelectorAll('[role="menuitem"]'))[e])||void 0===t||t.focus()},this.portalId=r()}componentDidLoad(){this.host.querySelector('[slot="trigger"]')||console.warn("Using limel-menu with the default trigger is deprecated. Please provide your own trigger element.")}openWatcher(){if(!this.open)return;const t=new IntersectionObserver((()=>{t.unobserve(this.list),this.focusMenuItem()}));t.observe(this.list)}render(){const t=this.getCssProperties(),i=getComputedStyle(this.host).getPropertyValue("--dropdown-z-index"),e={"limel-portal--fixed":this.fixed},r=this.getPortalPosition();return s("div",{class:"mdc-menu-surface--anchor",onClick:this.onTriggerClick},s("slot",{name:"trigger"},this.renderTrigger()),s("limel-portal",{class:e,style:r,visible:this.open,containerId:this.portalId,openDirection:this.openDirection,position:this.fixed?"fixed":"absolute",containerStyle:{"z-index":i}},s("limel-menu-surface",{open:this.open,onDismiss:this.onClose,style:t},s("limel-list",{class:{"has-grid-layout has-interactive-items":this.gridLayout},items:this.items,type:"menu",badgeIcons:this.badgeIcons,onChange:this.onListChange,ref:this.setListElement}))))}componentDidRender(){this.host.shadowRoot.querySelector("slot").assignedElements().forEach(this.setTriggerAttributes)}renderTrigger(){return s("button",{class:`\n menu__trigger\n ${this.disabled?"":"menu__trigger-enabled"}\n `,disabled:this.disabled},s("span",null,this.label))}getPortalPosition(){if(!this.fixed)return{};const t=this.host.getBoundingClientRect(),i={top:`${t.y+t.height}px`,left:`${t.x}px`};return"left"===this.openDirection&&(i.left=`${t.x+t.width}px`),i}getCssProperties(){const t=["--menu-surface-width","--list-grid-item-max-width","--list-grid-item-min-width","--list-grid-gap"],i=getComputedStyle(this.host),s=t.map((t=>i.getPropertyValue(t)));return n(t,s)}isListItem(t){return!("separator"in t)}get host(){return e(this)}static get watchers(){return{open:["openWatcher"]}}};o.style=":host{display:inline-block}:host([hidden]){display:none}.menu__trigger{border-color:transparent;border-width:1px;border-style:solid;background:none;color:rgb(var(--contrast-800));height:2.25rem}.menu__trigger-enabled:hover{border-color:rgb(var(--contrast-800));color:rgb(var(--contrast-1100))}.mdc-menu-surface--anchor{position:relative}";export{o as limel_menu}
|