@limetech/lime-elements 33.14.0-next.1 → 33.14.0-next.13
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-button-group.cjs.entry.js +14 -4
- package/dist/cjs/limel-dialog.cjs.entry.js +1 -1
- package/dist/cjs/limel-list_3.cjs.entry.js +36 -14
- 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-content.cjs.entry.js +2 -2
- package/dist/cjs/limel-tooltip.cjs.entry.js +49 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/button-group/button-group.js +15 -5
- package/dist/collection/components/dialog/dialog.css +6 -0
- package/dist/collection/components/header/header.js +0 -1
- package/dist/collection/components/list/list-renderer.js +33 -13
- package/dist/collection/components/list/list.css +16 -2
- package/dist/collection/components/list/list.js +2 -0
- package/dist/collection/components/menu/menu.js +56 -6
- package/dist/collection/components/popover/popover.js +0 -1
- 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.css +22 -12
- package/dist/collection/components/tooltip/tooltip-content.js +8 -6
- package/dist/collection/components/tooltip/tooltip.css +0 -5
- package/dist/collection/components/tooltip/tooltip.js +106 -15
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/limel-button-group.entry.js +14 -4
- package/dist/esm/limel-dialog.entry.js +1 -1
- package/dist/esm/limel-list_3.entry.js +36 -14
- package/dist/esm/limel-menu.entry.js +49 -1
- package/dist/esm/limel-tab-bar.entry.js +6 -1
- package/dist/esm/limel-tooltip-content.entry.js +2 -2
- package/dist/esm/limel-tooltip.entry.js +49 -2
- package/dist/esm/loader.js +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- 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-8a831c42.entry.js +1 -0
- package/dist/lime-elements/p-bd805195.entry.js +1 -0
- package/dist/lime-elements/{p-2850d435.entry.js → p-c636bfcf.entry.js} +1 -1
- package/dist/lime-elements/p-e078c459.entry.js +177 -0
- package/dist/lime-elements/p-f3779c9e.entry.js +1 -0
- package/dist/types/components/header/header.d.ts +0 -1
- package/dist/types/components/list/list-renderer.d.ts +8 -6
- package/dist/types/components/menu/menu.d.ts +11 -3
- package/dist/types/components/menu/menu.types.d.ts +7 -0
- package/dist/types/components/popover/popover.d.ts +0 -1
- 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 +59 -4
- package/dist/types/components.d.ts +19 -19
- 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-a6a7dd00.entry.js +0 -1
- package/dist/lime-elements/p-aeeca058.entry.js +0 -1
- package/dist/lime-elements/p-b3b08c96.entry.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as o}from"./p-fabb836f.js";const r=class{constructor(o){t(this,o)}render(){return o("div",{class:"tooltip-content"},o("div",{class:"label"},this.label),o("div",{class:"helper-label"},this.helperLabel))}};r.style=".tooltip-content{animation:display-tooltip 0.2s ease;display:flex;flex-direction:row;border-radius:0.25rem;padding:0.25rem 0.5rem;font-size:0.875rem;background-color:rgb(var(--contrast-1300));box-shadow:var(--shadow-depth-16)}.tooltip-content .label{color:rgb(var(--contrast-200))}.tooltip-content .helper-label{color:rgb(var(--contrast-800));padding:0 0 0 1rem}.tooltip-content .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)}}";export{r as limel_tooltip_content}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ListItem, ListSeparator } from '@limetech/lime-elements';
|
|
1
|
+
import { ListItem, ListSeparator, MenuItem } from '@limetech/lime-elements';
|
|
2
2
|
import { ListRendererConfig } from './list-renderer-config';
|
|
3
3
|
export declare class ListRenderer {
|
|
4
4
|
private defaultConfig;
|
|
@@ -6,23 +6,24 @@ export declare class ListRenderer {
|
|
|
6
6
|
private hasIcons;
|
|
7
7
|
private twoLines;
|
|
8
8
|
private avatarList;
|
|
9
|
+
private commandKey;
|
|
9
10
|
private applyTabIndexToItemAtIndex;
|
|
10
11
|
constructor();
|
|
11
|
-
render(items: Array<ListItem | ListSeparator>, config?: ListRendererConfig): any;
|
|
12
|
+
render(items: Array<ListItem | ListSeparator | MenuItem>, config?: ListRendererConfig): any;
|
|
12
13
|
/**
|
|
13
14
|
* Determine which ListItem should have the `tab-index` attribute set,
|
|
14
15
|
* and return the index at which that ListItem is located in `items`.
|
|
15
16
|
* Returns `undefined` if no item should have the attribute set.
|
|
16
17
|
* See https://github.com/material-components/material-components-web/tree/e66a43a75fef4f9179e24856649518e15e279a04/packages/mdc-list#accessibility
|
|
17
18
|
*
|
|
18
|
-
* @param {Array<ListItem | ListSeparator>} items the items of the list, including any `ListSeparator`:s
|
|
19
|
+
* @param {Array<ListItem | ListSeparator | MenuItems>} items the items of the list, including any `ListSeparator`:s
|
|
19
20
|
* @returns {number} the index as per the description
|
|
20
21
|
*/
|
|
21
22
|
private getIndexForWhichToApplyTabIndex;
|
|
22
23
|
/**
|
|
23
24
|
* Render a single list item
|
|
24
25
|
*
|
|
25
|
-
* @param {ListItem | ListSeparator} item the item to render
|
|
26
|
+
* @param {ListItem | ListSeparator | MenuItems} item the item to render
|
|
26
27
|
* @param {number} index the index the item had in the `items` array
|
|
27
28
|
* @returns {HTMLElement} the list item
|
|
28
29
|
*/
|
|
@@ -30,11 +31,12 @@ export declare class ListRenderer {
|
|
|
30
31
|
/**
|
|
31
32
|
* Render the text of the list item
|
|
32
33
|
*
|
|
33
|
-
* @param {
|
|
34
|
-
* @param {string} secondaryText secondary text for the list item
|
|
34
|
+
* @param {ListItem | MenuItem} item the list item
|
|
35
35
|
* @returns {HTMLElement | string} the text for the list item
|
|
36
36
|
*/
|
|
37
37
|
private renderText;
|
|
38
|
+
private renderCommandText;
|
|
39
|
+
private isSimpleItem;
|
|
38
40
|
/**
|
|
39
41
|
* Render an icon for a list item
|
|
40
42
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { OpenDirection } from './menu.types';
|
|
1
|
+
import { ListSeparator } from '@limetech/lime-elements';
|
|
2
|
+
import { MenuItem, OpenDirection } from './menu.types';
|
|
3
3
|
/**
|
|
4
4
|
* @slot trigger - Element to use as a trigger for the menu.
|
|
5
5
|
* @exampleComponent limel-example-menu-basic
|
|
@@ -9,6 +9,7 @@ import { OpenDirection } from './menu.types';
|
|
|
9
9
|
* @exampleComponent limel-example-menu-badge-icons
|
|
10
10
|
* @exampleComponent limel-example-menu-grid
|
|
11
11
|
* @exampleComponent limel-example-menu-composite
|
|
12
|
+
* @exampleComponent limel-example-menu-hotkeys
|
|
12
13
|
*/
|
|
13
14
|
export declare class Menu {
|
|
14
15
|
/**
|
|
@@ -21,7 +22,7 @@ export declare class Menu {
|
|
|
21
22
|
/**
|
|
22
23
|
* A list of items and separators to show in the menu.
|
|
23
24
|
*/
|
|
24
|
-
items: Array<
|
|
25
|
+
items: Array<MenuItem | ListSeparator>;
|
|
25
26
|
/**
|
|
26
27
|
* Sets the disabled state of the menu.
|
|
27
28
|
*/
|
|
@@ -59,14 +60,21 @@ export declare class Menu {
|
|
|
59
60
|
*/
|
|
60
61
|
private select;
|
|
61
62
|
private host;
|
|
63
|
+
private list;
|
|
62
64
|
private portalId;
|
|
63
65
|
constructor();
|
|
64
66
|
componentDidLoad(): void;
|
|
67
|
+
protected openWatcher(): void;
|
|
65
68
|
render(): any;
|
|
69
|
+
componentDidRender(): void;
|
|
66
70
|
private renderTrigger;
|
|
71
|
+
private setTriggerAttributes;
|
|
67
72
|
private onClose;
|
|
68
73
|
private onTriggerClick;
|
|
69
74
|
private onListChange;
|
|
70
75
|
private getPortalPosition;
|
|
71
76
|
private getCssProperties;
|
|
77
|
+
private setListElement;
|
|
78
|
+
private focusMenuItem;
|
|
79
|
+
private isListItem;
|
|
72
80
|
}
|
|
@@ -1 +1,8 @@
|
|
|
1
|
+
import { ListItem } from '../list/list-item.types';
|
|
1
2
|
export declare type OpenDirection = 'left' | 'right';
|
|
3
|
+
export interface MenuItem<T = any> extends ListItem<T> {
|
|
4
|
+
/**
|
|
5
|
+
* The additional supporting text is used for shortcut commands and displayed in the list item.
|
|
6
|
+
*/
|
|
7
|
+
commandText?: string;
|
|
8
|
+
}
|
|
@@ -4,7 +4,8 @@ import { Tab } from '../tab-bar/tab.types';
|
|
|
4
4
|
* The `limel-tab-panel` component uses the `limel-tab-bar` component together
|
|
5
5
|
* with custom slotted components and will display the content for the currently
|
|
6
6
|
* active tab. Each slotted component must have an id equal to the id of the
|
|
7
|
-
* corresponding tab it belongs to.
|
|
7
|
+
* corresponding tab it belongs to. These components should implement the
|
|
8
|
+
* [TabPanelComponent](#/type/TabPanelComponent/) interface.
|
|
8
9
|
*
|
|
9
10
|
* The `limel-tab-panel` component will automatically set each tab configuration
|
|
10
11
|
* on the corresponding slotted component as a property named `tab` so that the
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import { Tab } from '../tab-bar/tab.types';
|
|
3
|
+
/**
|
|
4
|
+
* Interface for components rendered inside a `limel-tab-panel`
|
|
5
|
+
*/
|
|
6
|
+
export interface TabPanelComponent {
|
|
7
|
+
/**
|
|
8
|
+
* The tab that the component belongs to
|
|
9
|
+
*/
|
|
10
|
+
tab: Tab;
|
|
11
|
+
/**
|
|
12
|
+
* Emit when the tab is updated for some reason, e.g. changing the text,
|
|
13
|
+
* icon or badge
|
|
14
|
+
*/
|
|
15
|
+
changeTab?: EventEmitter<Tab>;
|
|
16
|
+
}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* This component is used internally by `limel-tooltip`.
|
|
3
|
+
*
|
|
2
4
|
* @private
|
|
3
5
|
*/
|
|
4
6
|
export declare class TooltipContent {
|
|
5
7
|
/**
|
|
6
|
-
*
|
|
8
|
+
* Short descriptive text of the owner element.
|
|
7
9
|
*/
|
|
8
10
|
label: string;
|
|
9
11
|
/**
|
|
10
|
-
*
|
|
12
|
+
* Additional helper text for the element.
|
|
13
|
+
* Example usage can be a keyboard shortcut to activate the function of the
|
|
14
|
+
* owner element.
|
|
11
15
|
*/
|
|
12
16
|
helperLabel: string;
|
|
13
17
|
render(): any;
|
|
@@ -1,20 +1,75 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* A tooltip can be used to display a descriptive text for any element.
|
|
3
|
+
* The displayed content must be a brief and supplemental string of text,
|
|
4
|
+
* identifying the element or describing its function for the user,
|
|
5
|
+
* helping them better understand unfamiliar objects that aren't described
|
|
6
|
+
* directly in the UI.
|
|
7
|
+
*
|
|
8
|
+
* ## Interaction
|
|
9
|
+
* The tooltip appears after a slight delay, when the element is hovered;
|
|
10
|
+
* and disappears as soon as the cursor leaves the element.
|
|
11
|
+
* Therefore, users cannot interact with the tip, but if the trigger element
|
|
12
|
+
* itself is interactive, it will remain interactible even with a tooltip bound
|
|
13
|
+
* to it.
|
|
14
|
+
*
|
|
15
|
+
* :::note
|
|
16
|
+
* In order to display the tooltip, the tooltip element and its trigger element
|
|
17
|
+
* must be within the same document or document fragment.
|
|
18
|
+
* A good practice is to just place them next to each other like below:
|
|
19
|
+
*
|
|
20
|
+
* ```html
|
|
21
|
+
* <limel-button icon="search" id="tooltip-example" />
|
|
22
|
+
* <limel-tooltip label="Search" elementId="tooltip-example" />
|
|
23
|
+
* ```
|
|
24
|
+
* :::
|
|
25
|
+
*
|
|
26
|
+
* ## Usage
|
|
27
|
+
* - Keep in mind that tooltips can be distracting, and can be perceived as an interruption.
|
|
28
|
+
* Use them only when they add significant value.
|
|
29
|
+
* - A good tip is concise, helpful, and informative.
|
|
30
|
+
* Don't explain the obvious or simply repeat what is already on the screen.
|
|
31
|
+
* When used correctly, supplemental info of a tooltip helps to [declutter the UI](/#/DesignGuidelines/decluttering.md/).
|
|
32
|
+
* - If the tip is essential to the primary tasks that the user is performing,
|
|
33
|
+
* such as warnings or important notes, include the information directly in the
|
|
34
|
+
* interface instead.
|
|
35
|
+
* - When a component offers a helper text (e.g. [Input field](/#/component/limel-input-field/)),
|
|
36
|
+
* use that, not a tooltip.
|
|
37
|
+
* - Make sure to use the tooltip on an element that users naturally and
|
|
38
|
+
* effortlessly recognize can be hovered.
|
|
39
|
+
*
|
|
2
40
|
* @exampleComponent limel-example-tooltip
|
|
41
|
+
* @private
|
|
3
42
|
*/
|
|
4
43
|
export declare class Tooltip {
|
|
5
44
|
/**
|
|
6
|
-
*
|
|
45
|
+
* Short descriptive text of the owner element.
|
|
7
46
|
*/
|
|
8
47
|
label: string;
|
|
9
48
|
/**
|
|
10
|
-
*
|
|
49
|
+
* Additional helper text for the element.
|
|
50
|
+
* Example usage can be a keyboard shortcut to activate the function of the
|
|
51
|
+
* owner element.
|
|
11
52
|
*/
|
|
12
53
|
helperLabel: string;
|
|
13
54
|
/**
|
|
14
|
-
*
|
|
55
|
+
* ID of the owner element that the tooltip should describe.
|
|
56
|
+
* Must be a child within the same document fragment as the tooltip element
|
|
57
|
+
* itself.
|
|
15
58
|
*/
|
|
16
|
-
|
|
59
|
+
elementId: string;
|
|
60
|
+
private open;
|
|
17
61
|
private host;
|
|
18
62
|
private portalId;
|
|
63
|
+
private tooltipId;
|
|
64
|
+
private showTooltipTimeoutHandle;
|
|
65
|
+
constructor();
|
|
66
|
+
connectedCallback(): void;
|
|
67
|
+
disconnectedCallback(): void;
|
|
19
68
|
render(): any;
|
|
69
|
+
private setOwnerAriaLabel;
|
|
70
|
+
private addListeners;
|
|
71
|
+
private removeListeners;
|
|
72
|
+
private showTooltip;
|
|
73
|
+
private hideTooltip;
|
|
74
|
+
private getOwnerElement;
|
|
20
75
|
}
|
|
@@ -13,7 +13,7 @@ import { Action } from "./components/collapsible-section/action";
|
|
|
13
13
|
import { ValidationStatus } from "./components/form/form.types";
|
|
14
14
|
import { IconSize } from "./components/icon/icon.types";
|
|
15
15
|
import { InputType } from "./components/input-field/input-field.types";
|
|
16
|
-
import { OpenDirection } from "./components/menu/menu.types";
|
|
16
|
+
import { MenuItem, OpenDirection } from "./components/menu/menu.types";
|
|
17
17
|
import { ActionPosition, ActionScrollBehavior } from "./components/picker/actions.types";
|
|
18
18
|
import { FlowItem } from "./components/progress-flow/progress-flow.types";
|
|
19
19
|
import { Tab } from "./components/tab-bar/tab.types";
|
|
@@ -573,7 +573,7 @@ export namespace Components {
|
|
|
573
573
|
/**
|
|
574
574
|
* A list of items and separators to show in the menu.
|
|
575
575
|
*/
|
|
576
|
-
"items": Array<
|
|
576
|
+
"items": Array<MenuItem | ListSeparator>;
|
|
577
577
|
/**
|
|
578
578
|
* Is displayed on the default trigger button.
|
|
579
579
|
* @deprecated Use with default trigger has been deprecated. Please supply your own trigger element.
|
|
@@ -929,25 +929,25 @@ export namespace Components {
|
|
|
929
929
|
}
|
|
930
930
|
interface LimelTooltip {
|
|
931
931
|
/**
|
|
932
|
-
*
|
|
932
|
+
* ID of the owner element that the tooltip should describe. Must be a child within the same document fragment as the tooltip element itself.
|
|
933
933
|
*/
|
|
934
|
-
"
|
|
934
|
+
"elementId": string;
|
|
935
935
|
/**
|
|
936
|
-
*
|
|
936
|
+
* Additional helper text for the element. Example usage can be a keyboard shortcut to activate the function of the owner element.
|
|
937
937
|
*/
|
|
938
|
-
"
|
|
938
|
+
"helperLabel": string;
|
|
939
939
|
/**
|
|
940
|
-
*
|
|
940
|
+
* Short descriptive text of the owner element.
|
|
941
941
|
*/
|
|
942
|
-
"
|
|
942
|
+
"label": string;
|
|
943
943
|
}
|
|
944
944
|
interface LimelTooltipContent {
|
|
945
945
|
/**
|
|
946
|
-
*
|
|
946
|
+
* Additional helper text for the element. Example usage can be a keyboard shortcut to activate the function of the owner element.
|
|
947
947
|
*/
|
|
948
948
|
"helperLabel": string;
|
|
949
949
|
/**
|
|
950
|
-
*
|
|
950
|
+
* Short descriptive text of the owner element.
|
|
951
951
|
*/
|
|
952
952
|
"label": string;
|
|
953
953
|
}
|
|
@@ -1862,7 +1862,7 @@ declare namespace LocalJSX {
|
|
|
1862
1862
|
/**
|
|
1863
1863
|
* A list of items and separators to show in the menu.
|
|
1864
1864
|
*/
|
|
1865
|
-
"items"?: Array<
|
|
1865
|
+
"items"?: Array<MenuItem | ListSeparator>;
|
|
1866
1866
|
/**
|
|
1867
1867
|
* Is displayed on the default trigger button.
|
|
1868
1868
|
* @deprecated Use with default trigger has been deprecated. Please supply your own trigger element.
|
|
@@ -2298,25 +2298,25 @@ declare namespace LocalJSX {
|
|
|
2298
2298
|
}
|
|
2299
2299
|
interface LimelTooltip {
|
|
2300
2300
|
/**
|
|
2301
|
-
*
|
|
2301
|
+
* ID of the owner element that the tooltip should describe. Must be a child within the same document fragment as the tooltip element itself.
|
|
2302
2302
|
*/
|
|
2303
|
-
"
|
|
2303
|
+
"elementId": string;
|
|
2304
2304
|
/**
|
|
2305
|
-
*
|
|
2305
|
+
* Additional helper text for the element. Example usage can be a keyboard shortcut to activate the function of the owner element.
|
|
2306
2306
|
*/
|
|
2307
|
-
"
|
|
2307
|
+
"helperLabel"?: string;
|
|
2308
2308
|
/**
|
|
2309
|
-
*
|
|
2309
|
+
* Short descriptive text of the owner element.
|
|
2310
2310
|
*/
|
|
2311
|
-
"
|
|
2311
|
+
"label": string;
|
|
2312
2312
|
}
|
|
2313
2313
|
interface LimelTooltipContent {
|
|
2314
2314
|
/**
|
|
2315
|
-
*
|
|
2315
|
+
* Additional helper text for the element. Example usage can be a keyboard shortcut to activate the function of the owner element.
|
|
2316
2316
|
*/
|
|
2317
2317
|
"helperLabel"?: string;
|
|
2318
2318
|
/**
|
|
2319
|
-
*
|
|
2319
|
+
* Short descriptive text of the owner element.
|
|
2320
2320
|
*/
|
|
2321
2321
|
"label"?: string;
|
|
2322
2322
|
}
|
|
@@ -17,4 +17,5 @@ export * from './components/progress-flow/progress-flow.types';
|
|
|
17
17
|
export * from './components/select/option.types';
|
|
18
18
|
export * from './components/spinner/spinner.types';
|
|
19
19
|
export * from './components/tab-bar/tab.types';
|
|
20
|
+
export * from './components/tab-panel/tab-panel.types';
|
|
20
21
|
export * from './components/table/table.types';
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
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 o}from"./p-7c4d91f5.js";import"./p-acfbf7ac.js";import"./p-8bbe3720.js";import"./p-fc610f15.js";const n=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.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.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.")}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}))))}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 o(t,s)}get host(){return e(this)}};n.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{n as limel_menu}
|