@limetech/lime-elements 33.13.0 → 33.14.0-next.12
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 +19 -0
- package/dist/cjs/limel-tooltip.cjs.entry.js +70 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -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/select/select.js +1 -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 +21 -0
- package/dist/collection/components/tooltip/tooltip-content.js +57 -0
- package/dist/collection/components/tooltip/tooltip.css +12 -0
- package/dist/collection/components/tooltip/tooltip.js +141 -0
- 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 +15 -0
- package/dist/esm/limel-tooltip.entry.js +66 -0
- 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-a6a7dd00.entry.js +1 -0
- package/dist/lime-elements/p-b0b18dfc.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/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/select/select.d.ts +3 -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 +18 -0
- package/dist/types/components/tooltip/tooltip.d.ts +49 -0
- package/dist/types/components.d.ts +71 -5
- 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-aeeca058.entry.js +0 -1
|
@@ -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
|
+
}
|
|
@@ -43,7 +43,9 @@ export declare class Select {
|
|
|
43
43
|
*/
|
|
44
44
|
helperText: string;
|
|
45
45
|
/**
|
|
46
|
-
* Currently selected value or values
|
|
46
|
+
* Currently selected value or values.
|
|
47
|
+
* If `multiple` is `true`, this must be an array. Otherwise it must be a
|
|
48
|
+
* single value.
|
|
47
49
|
*/
|
|
48
50
|
value: Option | Option[];
|
|
49
51
|
/**
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This component is used internally by `limel-tooltip`.
|
|
3
|
+
*
|
|
4
|
+
* @private
|
|
5
|
+
*/
|
|
6
|
+
export declare class TooltipContent {
|
|
7
|
+
/**
|
|
8
|
+
* Short descriptive text of the owner element.
|
|
9
|
+
*/
|
|
10
|
+
label: string;
|
|
11
|
+
/**
|
|
12
|
+
* Additional helper text for the element.
|
|
13
|
+
* Example usage can be a keyboard shortcut to activate the function of the
|
|
14
|
+
* owner element.
|
|
15
|
+
*/
|
|
16
|
+
helperLabel: string;
|
|
17
|
+
render(): any;
|
|
18
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tooltips display a text label identifying an element, such as a description
|
|
3
|
+
* of its function.
|
|
4
|
+
*
|
|
5
|
+
* In order to display the tooltip, the tooltip element and the owner element
|
|
6
|
+
* that it should describe must be within the same document or document
|
|
7
|
+
* fragment. A good practice is to just render them next to each other like so:
|
|
8
|
+
*
|
|
9
|
+
* ```html
|
|
10
|
+
* <limel-button icon="search" id="tooltip-example" />
|
|
11
|
+
* <limel-tooltip label="Search" elementId="tooltip-example" />
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* @exampleComponent limel-example-tooltip
|
|
15
|
+
* @private
|
|
16
|
+
*/
|
|
17
|
+
export declare class Tooltip {
|
|
18
|
+
/**
|
|
19
|
+
* Short descriptive text of the owner element.
|
|
20
|
+
*/
|
|
21
|
+
label: string;
|
|
22
|
+
/**
|
|
23
|
+
* Additional helper text for the element.
|
|
24
|
+
* Example usage can be a keyboard shortcut to activate the function of the
|
|
25
|
+
* owner element.
|
|
26
|
+
*/
|
|
27
|
+
helperLabel: string;
|
|
28
|
+
/**
|
|
29
|
+
* ID of the owner element that the tooltip should describe.
|
|
30
|
+
* Must be a child within the same document fragment as the tooltip element
|
|
31
|
+
* itself.
|
|
32
|
+
*/
|
|
33
|
+
elementId: string;
|
|
34
|
+
private open;
|
|
35
|
+
private host;
|
|
36
|
+
private portalId;
|
|
37
|
+
private tooltipId;
|
|
38
|
+
private showTooltipTimeoutHandle;
|
|
39
|
+
constructor();
|
|
40
|
+
connectedCallback(): void;
|
|
41
|
+
disconnectedCallback(): void;
|
|
42
|
+
render(): any;
|
|
43
|
+
private setOwnerAriaLabel;
|
|
44
|
+
private addListeners;
|
|
45
|
+
private removeListeners;
|
|
46
|
+
private showTooltip;
|
|
47
|
+
private hideTooltip;
|
|
48
|
+
private getOwnerElement;
|
|
49
|
+
}
|
|
@@ -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.
|
|
@@ -765,7 +765,7 @@ export namespace Components {
|
|
|
765
765
|
*/
|
|
766
766
|
"required": boolean;
|
|
767
767
|
/**
|
|
768
|
-
* Currently selected value or values
|
|
768
|
+
* Currently selected value or values. If `multiple` is `true`, this must be an array. Otherwise it must be a single value.
|
|
769
769
|
*/
|
|
770
770
|
"value": Option | Option[];
|
|
771
771
|
}
|
|
@@ -927,6 +927,30 @@ export namespace Components {
|
|
|
927
927
|
*/
|
|
928
928
|
"totalRows": number;
|
|
929
929
|
}
|
|
930
|
+
interface LimelTooltip {
|
|
931
|
+
/**
|
|
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
|
+
*/
|
|
934
|
+
"elementId": string;
|
|
935
|
+
/**
|
|
936
|
+
* Additional helper text for the element. Example usage can be a keyboard shortcut to activate the function of the owner element.
|
|
937
|
+
*/
|
|
938
|
+
"helperLabel": string;
|
|
939
|
+
/**
|
|
940
|
+
* Short descriptive text of the owner element.
|
|
941
|
+
*/
|
|
942
|
+
"label": string;
|
|
943
|
+
}
|
|
944
|
+
interface LimelTooltipContent {
|
|
945
|
+
/**
|
|
946
|
+
* Additional helper text for the element. Example usage can be a keyboard shortcut to activate the function of the owner element.
|
|
947
|
+
*/
|
|
948
|
+
"helperLabel": string;
|
|
949
|
+
/**
|
|
950
|
+
* Short descriptive text of the owner element.
|
|
951
|
+
*/
|
|
952
|
+
"label": string;
|
|
953
|
+
}
|
|
930
954
|
}
|
|
931
955
|
declare global {
|
|
932
956
|
interface HTMLLimelBadgeElement extends Components.LimelBadge, HTMLStencilElement {
|
|
@@ -1163,6 +1187,18 @@ declare global {
|
|
|
1163
1187
|
prototype: HTMLLimelTableElement;
|
|
1164
1188
|
new (): HTMLLimelTableElement;
|
|
1165
1189
|
};
|
|
1190
|
+
interface HTMLLimelTooltipElement extends Components.LimelTooltip, HTMLStencilElement {
|
|
1191
|
+
}
|
|
1192
|
+
var HTMLLimelTooltipElement: {
|
|
1193
|
+
prototype: HTMLLimelTooltipElement;
|
|
1194
|
+
new (): HTMLLimelTooltipElement;
|
|
1195
|
+
};
|
|
1196
|
+
interface HTMLLimelTooltipContentElement extends Components.LimelTooltipContent, HTMLStencilElement {
|
|
1197
|
+
}
|
|
1198
|
+
var HTMLLimelTooltipContentElement: {
|
|
1199
|
+
prototype: HTMLLimelTooltipContentElement;
|
|
1200
|
+
new (): HTMLLimelTooltipContentElement;
|
|
1201
|
+
};
|
|
1166
1202
|
interface HTMLElementTagNameMap {
|
|
1167
1203
|
"limel-badge": HTMLLimelBadgeElement;
|
|
1168
1204
|
"limel-banner": HTMLLimelBannerElement;
|
|
@@ -1203,6 +1239,8 @@ declare global {
|
|
|
1203
1239
|
"limel-tab-bar": HTMLLimelTabBarElement;
|
|
1204
1240
|
"limel-tab-panel": HTMLLimelTabPanelElement;
|
|
1205
1241
|
"limel-table": HTMLLimelTableElement;
|
|
1242
|
+
"limel-tooltip": HTMLLimelTooltipElement;
|
|
1243
|
+
"limel-tooltip-content": HTMLLimelTooltipContentElement;
|
|
1206
1244
|
}
|
|
1207
1245
|
}
|
|
1208
1246
|
declare namespace LocalJSX {
|
|
@@ -1824,7 +1862,7 @@ declare namespace LocalJSX {
|
|
|
1824
1862
|
/**
|
|
1825
1863
|
* A list of items and separators to show in the menu.
|
|
1826
1864
|
*/
|
|
1827
|
-
"items"?: Array<
|
|
1865
|
+
"items"?: Array<MenuItem | ListSeparator>;
|
|
1828
1866
|
/**
|
|
1829
1867
|
* Is displayed on the default trigger button.
|
|
1830
1868
|
* @deprecated Use with default trigger has been deprecated. Please supply your own trigger element.
|
|
@@ -2056,7 +2094,7 @@ declare namespace LocalJSX {
|
|
|
2056
2094
|
*/
|
|
2057
2095
|
"required"?: boolean;
|
|
2058
2096
|
/**
|
|
2059
|
-
* Currently selected value or values
|
|
2097
|
+
* Currently selected value or values. If `multiple` is `true`, this must be an array. Otherwise it must be a single value.
|
|
2060
2098
|
*/
|
|
2061
2099
|
"value"?: Option | Option[];
|
|
2062
2100
|
}
|
|
@@ -2258,6 +2296,30 @@ declare namespace LocalJSX {
|
|
|
2258
2296
|
*/
|
|
2259
2297
|
"totalRows"?: number;
|
|
2260
2298
|
}
|
|
2299
|
+
interface LimelTooltip {
|
|
2300
|
+
/**
|
|
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
|
+
*/
|
|
2303
|
+
"elementId": string;
|
|
2304
|
+
/**
|
|
2305
|
+
* Additional helper text for the element. Example usage can be a keyboard shortcut to activate the function of the owner element.
|
|
2306
|
+
*/
|
|
2307
|
+
"helperLabel"?: string;
|
|
2308
|
+
/**
|
|
2309
|
+
* Short descriptive text of the owner element.
|
|
2310
|
+
*/
|
|
2311
|
+
"label": string;
|
|
2312
|
+
}
|
|
2313
|
+
interface LimelTooltipContent {
|
|
2314
|
+
/**
|
|
2315
|
+
* Additional helper text for the element. Example usage can be a keyboard shortcut to activate the function of the owner element.
|
|
2316
|
+
*/
|
|
2317
|
+
"helperLabel"?: string;
|
|
2318
|
+
/**
|
|
2319
|
+
* Short descriptive text of the owner element.
|
|
2320
|
+
*/
|
|
2321
|
+
"label"?: string;
|
|
2322
|
+
}
|
|
2261
2323
|
interface IntrinsicElements {
|
|
2262
2324
|
"limel-badge": LimelBadge;
|
|
2263
2325
|
"limel-banner": LimelBanner;
|
|
@@ -2298,6 +2360,8 @@ declare namespace LocalJSX {
|
|
|
2298
2360
|
"limel-tab-bar": LimelTabBar;
|
|
2299
2361
|
"limel-tab-panel": LimelTabPanel;
|
|
2300
2362
|
"limel-table": LimelTable;
|
|
2363
|
+
"limel-tooltip": LimelTooltip;
|
|
2364
|
+
"limel-tooltip-content": LimelTooltipContent;
|
|
2301
2365
|
}
|
|
2302
2366
|
}
|
|
2303
2367
|
export { LocalJSX as JSX };
|
|
@@ -2343,6 +2407,8 @@ declare module "@stencil/core" {
|
|
|
2343
2407
|
"limel-tab-bar": LocalJSX.LimelTabBar & JSXBase.HTMLAttributes<HTMLLimelTabBarElement>;
|
|
2344
2408
|
"limel-tab-panel": LocalJSX.LimelTabPanel & JSXBase.HTMLAttributes<HTMLLimelTabPanelElement>;
|
|
2345
2409
|
"limel-table": LocalJSX.LimelTable & JSXBase.HTMLAttributes<HTMLLimelTableElement>;
|
|
2410
|
+
"limel-tooltip": LocalJSX.LimelTooltip & JSXBase.HTMLAttributes<HTMLLimelTooltipElement>;
|
|
2411
|
+
"limel-tooltip-content": LocalJSX.LimelTooltipContent & JSXBase.HTMLAttributes<HTMLLimelTooltipContentElement>;
|
|
2346
2412
|
}
|
|
2347
2413
|
}
|
|
2348
2414
|
}
|
|
@@ -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}
|