@limetech/lime-elements 39.9.5 → 39.10.0
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/CHANGELOG.md +7 -0
- package/dist/cjs/device-C9O7lYI9.js +50 -0
- package/dist/cjs/hotkeys-BtR8uxvl.js +219 -0
- package/dist/cjs/lime-elements.cjs.js +1 -1
- package/dist/cjs/limel-breadcrumbs_7.cjs.entry.js +137 -15
- package/dist/cjs/limel-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +1 -1
- package/dist/cjs/limel-helper-line_2.cjs.entry.js +1 -1
- package/dist/cjs/limel-hotkey.cjs.entry.js +128 -0
- package/dist/cjs/limel-icon-button.cjs.entry.js +1 -1
- package/dist/cjs/limel-icon.cjs.entry.js +1 -1
- package/dist/cjs/limel-info-tile.cjs.entry.js +2 -2
- package/dist/cjs/limel-list-item.cjs.entry.js +2 -2
- package/dist/cjs/limel-markdown.cjs.entry.js +1 -1
- package/dist/cjs/limel-menu-item-meta.cjs.entry.js +12 -1
- package/dist/cjs/limel-picker.cjs.entry.js +1 -1
- package/dist/cjs/limel-popover_2.cjs.entry.js +2 -2
- package/dist/cjs/limel-portal_3.cjs.entry.js +4 -4
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +1 -1
- package/dist/cjs/limel-radio-button-group.cjs.entry.js +1 -1
- package/dist/cjs/limel-radio-button.cjs.entry.js +2 -2
- package/dist/cjs/limel-select.cjs.entry.js +2 -2
- package/dist/cjs/limel-shortcut.cjs.entry.js +1 -1
- package/dist/cjs/limel-slider.cjs.entry.js +1 -1
- package/dist/cjs/limel-snackbar.cjs.entry.js +2 -2
- package/dist/cjs/limel-split-button.cjs.entry.js +2 -2
- package/dist/cjs/limel-switch.cjs.entry.js +1 -1
- package/dist/cjs/limel-tab-bar.cjs.entry.js +2 -2
- package/dist/cjs/limel-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/limel-table.cjs.entry.js +3 -3
- package/dist/cjs/limel-text-editor-link-menu.cjs.entry.js +3 -3
- package/dist/cjs/limel-text-editor.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/hotkey/format-display-token.js +95 -0
- package/dist/collection/components/hotkey/hotkey.css +136 -0
- package/dist/collection/components/hotkey/hotkey.js +92 -0
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/icon-button/icon-button.js +1 -1
- package/dist/collection/components/info-tile/info-tile.js +2 -2
- package/dist/collection/components/input-field/input-field.js +1 -1
- package/dist/collection/components/list/list.js +1 -1
- package/dist/collection/components/list-item/list-item.js +2 -2
- package/dist/collection/components/list-item/menu-item-meta/menu-item-meta.js +52 -2
- package/dist/collection/components/markdown/markdown.js +1 -1
- package/dist/collection/components/menu/menu.js +130 -10
- package/dist/collection/components/menu-list/menu-list-renderer.js +4 -1
- package/dist/collection/components/menu-list/menu-list.js +1 -1
- package/dist/collection/components/menu-surface/menu-surface.js +1 -1
- package/dist/collection/components/notched-outline/notched-outline.js +1 -1
- package/dist/collection/components/picker/picker.js +1 -1
- package/dist/collection/components/popover/popover.js +1 -1
- package/dist/collection/components/popover-surface/popover-surface.js +1 -1
- package/dist/collection/components/portal/portal.js +1 -1
- package/dist/collection/components/radio-button-group/radio-button-group.js +1 -1
- package/dist/collection/components/radio-button-group/radio-button.js +2 -2
- package/dist/collection/components/select/select.js +1 -1
- package/dist/collection/components/shortcut/shortcut.js +1 -1
- package/dist/collection/components/slider/slider.js +1 -1
- package/dist/collection/components/snackbar/snackbar.js +2 -2
- package/dist/collection/components/spinner/spinner.js +1 -1
- package/dist/collection/components/split-button/split-button.js +2 -2
- package/dist/collection/components/switch/switch.js +1 -1
- package/dist/collection/components/tab-bar/tab-bar.js +2 -2
- package/dist/collection/components/tab-panel/tab-panel.js +1 -1
- package/dist/collection/components/table/table.js +3 -3
- package/dist/collection/components/text-editor/link-menu/editor-link-menu.js +3 -3
- package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js +1 -1
- package/dist/collection/components/text-editor/text-editor.js +1 -1
- package/dist/collection/components/tooltip/tooltip-content.js +1 -1
- package/dist/collection/components/tooltip/tooltip.js +2 -2
- package/dist/esm/device-B-tmXAXV.js +45 -0
- package/dist/esm/hotkeys-BxrRWYts.js +215 -0
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/limel-breadcrumbs_7.entry.js +137 -15
- package/dist/esm/limel-date-picker.entry.js +1 -1
- package/dist/esm/limel-flatpickr-adapter.entry.js +1 -1
- package/dist/esm/limel-helper-line_2.entry.js +1 -1
- package/dist/esm/limel-hotkey.entry.js +126 -0
- package/dist/esm/limel-icon-button.entry.js +1 -1
- package/dist/esm/limel-icon.entry.js +1 -1
- package/dist/esm/limel-info-tile.entry.js +2 -2
- package/dist/esm/limel-list-item.entry.js +2 -2
- package/dist/esm/limel-markdown.entry.js +1 -1
- package/dist/esm/limel-menu-item-meta.entry.js +12 -1
- package/dist/esm/limel-picker.entry.js +1 -1
- package/dist/esm/limel-popover_2.entry.js +2 -2
- package/dist/esm/limel-portal_3.entry.js +4 -4
- package/dist/esm/limel-prosemirror-adapter.entry.js +1 -1
- package/dist/esm/limel-radio-button-group.entry.js +1 -1
- package/dist/esm/limel-radio-button.entry.js +2 -2
- package/dist/esm/limel-select.entry.js +2 -2
- package/dist/esm/limel-shortcut.entry.js +1 -1
- package/dist/esm/limel-slider.entry.js +1 -1
- package/dist/esm/limel-snackbar.entry.js +2 -2
- package/dist/esm/limel-split-button.entry.js +2 -2
- package/dist/esm/limel-switch.entry.js +1 -1
- package/dist/esm/limel-tab-bar.entry.js +2 -2
- package/dist/esm/limel-tab-panel.entry.js +1 -1
- package/dist/esm/limel-table.entry.js +3 -3
- package/dist/esm/limel-text-editor-link-menu.entry.js +3 -3
- package/dist/esm/limel-text-editor.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/{p-a30bf079.entry.js → p-12646794.entry.js} +1 -1
- package/dist/lime-elements/{p-c5b6ac7a.entry.js → p-1635ece7.entry.js} +1 -1
- package/dist/lime-elements/{p-86eebe44.entry.js → p-17e1d911.entry.js} +1 -1
- package/dist/lime-elements/{p-8c418a0b.entry.js → p-23c1033d.entry.js} +1 -1
- package/dist/lime-elements/{p-e2f1b070.entry.js → p-2750b828.entry.js} +1 -1
- package/dist/lime-elements/{p-1d4285b1.entry.js → p-3e68cbda.entry.js} +2 -2
- package/dist/lime-elements/{p-de1e5ad9.entry.js → p-438652d6.entry.js} +1 -1
- package/dist/lime-elements/{p-ef75eed9.entry.js → p-59716b48.entry.js} +1 -1
- package/dist/lime-elements/{p-b11751c9.entry.js → p-60260fa3.entry.js} +1 -1
- package/dist/lime-elements/{p-a2295fa6.entry.js → p-689770db.entry.js} +1 -1
- package/dist/lime-elements/{p-abdede40.entry.js → p-733ebba6.entry.js} +1 -1
- package/dist/lime-elements/{p-288aa326.entry.js → p-77f42eff.entry.js} +1 -1
- package/dist/lime-elements/{p-d5da5b05.entry.js → p-7bd71b2b.entry.js} +1 -1
- package/dist/lime-elements/{p-9d51583a.entry.js → p-8805080c.entry.js} +1 -1
- package/dist/lime-elements/{p-c6b9425b.entry.js → p-889a05e4.entry.js} +1 -1
- package/dist/lime-elements/{p-e14b7393.entry.js → p-8b106865.entry.js} +1 -1
- package/dist/lime-elements/{p-6e0078f1.entry.js → p-8e3cc9b0.entry.js} +1 -1
- package/dist/lime-elements/{p-62d6a350.entry.js → p-9015c90c.entry.js} +2 -2
- package/dist/lime-elements/{p-9859b556.entry.js → p-9abfb8ba.entry.js} +1 -1
- package/dist/lime-elements/{p-72a4841a.entry.js → p-9d629f5f.entry.js} +10 -10
- package/dist/lime-elements/p-B-tmXAXV.js +1 -0
- package/dist/lime-elements/p-BxrRWYts.js +1 -0
- package/dist/lime-elements/p-a026cc24.entry.js +1 -0
- package/dist/lime-elements/{p-95ed243e.entry.js → p-a243b8e2.entry.js} +1 -1
- package/dist/lime-elements/p-b64ae828.entry.js +1 -0
- package/dist/lime-elements/p-c20a620d.entry.js +1 -0
- package/dist/lime-elements/{p-1590b341.entry.js → p-c84911e6.entry.js} +1 -1
- package/dist/lime-elements/{p-6614bbfc.entry.js → p-c9591213.entry.js} +1 -1
- package/dist/lime-elements/{p-0e1c15c8.entry.js → p-e0716b51.entry.js} +1 -1
- package/dist/lime-elements/{p-bbaaf7c1.entry.js → p-e89dcf27.entry.js} +1 -1
- package/dist/types/components/hotkey/format-display-token.d.ts +15 -0
- package/dist/types/components/hotkey/hotkey.d.ts +27 -0
- package/dist/types/components/list-item/menu-item-meta/menu-item-meta.d.ts +8 -0
- package/dist/types/components/menu/menu.d.ts +13 -2
- package/dist/types/components/menu/menu.types.d.ts +14 -0
- package/dist/types/components.d.ts +107 -4
- package/package.json +1 -1
- package/dist/cjs/device-CDZCRYph.js +0 -30
- package/dist/esm/device-CY72JnWG.js +0 -26
- package/dist/lime-elements/p-5178cc39.entry.js +0 -1
- package/dist/lime-elements/p-7afe6c3e.entry.js +0 -1
- package/dist/lime-elements/p-CY72JnWG.js +0 -1
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { tokenizeHotkeyString } from "../../util/hotkeys";
|
|
3
|
+
import { isAppleDevice } from "../../util/device";
|
|
4
|
+
import { formatDisplayToken } from "./format-display-token";
|
|
5
|
+
/**
|
|
6
|
+
* This is a display-only component used to visualize keyboard shortcuts.
|
|
7
|
+
* It renders hotkey strings as styled `<kbd>` elements with
|
|
8
|
+
* platform-aware glyphs (e.g. `⌘` on macOS, `⊞ Win` on Windows).
|
|
9
|
+
*
|
|
10
|
+
* It does **not** listen for or handle any keyboard events.
|
|
11
|
+
* Keyboard event handling is the responsibility of the parent component
|
|
12
|
+
* (e.g. `limel-menu` or `limel-select`).
|
|
13
|
+
*
|
|
14
|
+
* @exampleComponent limel-example-hotkey-basic
|
|
15
|
+
* @exampleComponent limel-example-hotkey-disabled
|
|
16
|
+
* @private
|
|
17
|
+
*/
|
|
18
|
+
export class Hotkey {
|
|
19
|
+
constructor() {
|
|
20
|
+
/**
|
|
21
|
+
* When `true`, the hotkey is rendered in a visually disabled state.
|
|
22
|
+
*/
|
|
23
|
+
this.disabled = false;
|
|
24
|
+
}
|
|
25
|
+
componentWillLoad() {
|
|
26
|
+
this.isApple = isAppleDevice();
|
|
27
|
+
}
|
|
28
|
+
render() {
|
|
29
|
+
const parts = tokenizeHotkeyString(this.value);
|
|
30
|
+
const displayParts = parts.map((part) => formatDisplayToken(part, this.isApple));
|
|
31
|
+
const ariaLabel = displayParts
|
|
32
|
+
.map((p) => p.ariaName)
|
|
33
|
+
.filter(Boolean)
|
|
34
|
+
.join(' ');
|
|
35
|
+
return (h(Host, { key: 'ab1b9d31080740d19a4633c8c5bc92b02625c111', "aria-label": ariaLabel || undefined }, displayParts.map(({ display, isGlyph }, index) => (h("kbd", { key: `${parts[index]}-${index}`, class: isGlyph ? 'is-glyph' : undefined }, h("span", null, display))))));
|
|
36
|
+
}
|
|
37
|
+
static get is() { return "limel-hotkey"; }
|
|
38
|
+
static get encapsulation() { return "shadow"; }
|
|
39
|
+
static get originalStyleUrls() {
|
|
40
|
+
return {
|
|
41
|
+
"$": ["hotkey.scss"]
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
static get styleUrls() {
|
|
45
|
+
return {
|
|
46
|
+
"$": ["hotkey.css"]
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
static get properties() {
|
|
50
|
+
return {
|
|
51
|
+
"value": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"mutable": false,
|
|
54
|
+
"complexType": {
|
|
55
|
+
"original": "string",
|
|
56
|
+
"resolved": "string",
|
|
57
|
+
"references": {}
|
|
58
|
+
},
|
|
59
|
+
"required": false,
|
|
60
|
+
"optional": false,
|
|
61
|
+
"docs": {
|
|
62
|
+
"tags": [],
|
|
63
|
+
"text": "The hotkey string to visualize, e.g. `\"meta+c\"` or `\"shift+enter\"`."
|
|
64
|
+
},
|
|
65
|
+
"getter": false,
|
|
66
|
+
"setter": false,
|
|
67
|
+
"reflect": true,
|
|
68
|
+
"attribute": "value"
|
|
69
|
+
},
|
|
70
|
+
"disabled": {
|
|
71
|
+
"type": "boolean",
|
|
72
|
+
"mutable": false,
|
|
73
|
+
"complexType": {
|
|
74
|
+
"original": "boolean",
|
|
75
|
+
"resolved": "boolean",
|
|
76
|
+
"references": {}
|
|
77
|
+
},
|
|
78
|
+
"required": false,
|
|
79
|
+
"optional": false,
|
|
80
|
+
"docs": {
|
|
81
|
+
"tags": [],
|
|
82
|
+
"text": "When `true`, the hotkey is rendered in a visually disabled state."
|
|
83
|
+
},
|
|
84
|
+
"getter": false,
|
|
85
|
+
"setter": false,
|
|
86
|
+
"reflect": true,
|
|
87
|
+
"attribute": "disabled",
|
|
88
|
+
"defaultValue": "false"
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -18,7 +18,7 @@ export class Icon {
|
|
|
18
18
|
this.loadIcon(this.name);
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
-
return h("div", { key: '
|
|
21
|
+
return h("div", { key: '23b5f2c90c98461f65c0bcdb291f9958e00ac353', class: "container" });
|
|
22
22
|
}
|
|
23
23
|
async loadIcon(name) {
|
|
24
24
|
if (name === undefined || name === '') {
|
|
@@ -52,7 +52,7 @@ export class IconButton {
|
|
|
52
52
|
if (this.host.hasAttribute('tabindex')) {
|
|
53
53
|
buttonAttributes.tabindex = this.host.getAttribute('tabindex');
|
|
54
54
|
}
|
|
55
|
-
return (h(Host, { key: '
|
|
55
|
+
return (h(Host, { key: '0df3febef19dcdb72c7c7f3740090414b313be51', onClick: this.filterClickWhenDisabled }, h("button", Object.assign({ key: 'fd0d61e30789619c52cd6a71269602efc7065f8e', disabled: this.disabled, id: this.tooltipId }, buttonAttributes), this.renderIcon(), this.renderTooltip(this.tooltipId))));
|
|
56
56
|
}
|
|
57
57
|
renderIcon() {
|
|
58
58
|
var _a, _b;
|
|
@@ -116,9 +116,9 @@ export class InfoTile {
|
|
|
116
116
|
this.checkProps((_d = this === null || this === void 0 ? void 0 : this.link) === null || _d === void 0 ? void 0 : _d.title);
|
|
117
117
|
const link = this.disabled ? '#' : (_e = this.link) === null || _e === void 0 ? void 0 : _e.href;
|
|
118
118
|
const rel = getRel((_f = this.link) === null || _f === void 0 ? void 0 : _f.target, (_g = this.link) === null || _g === void 0 ? void 0 : _g.rel);
|
|
119
|
-
return (h(Host, { key: '
|
|
119
|
+
return (h(Host, { key: '3754cadd6c7cf0ee99e0f5dc2234732126dcdc1e', onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave, class: { 'has-primary-slot-content': this.hasPrimarySlot } }, h("a", { key: 'c812a64253f3687f230c9a306727addae91ac685', title: (_h = this.link) === null || _h === void 0 ? void 0 : _h.title, href: link, target: (_j = this.link) === null || _j === void 0 ? void 0 : _j.target, rel: rel, tabindex: "0", "aria-label": extendedAriaLabel, "aria-disabled": this.disabled, "aria-busy": this.loading ? 'true' : 'false', "aria-live": "polite", class: {
|
|
120
120
|
'is-clickable': !!((_k = this.link) === null || _k === void 0 ? void 0 : _k.href) && !this.disabled,
|
|
121
|
-
} }, this.renderIcon(), this.renderProgress(), h("slot", { key: '
|
|
121
|
+
} }, this.renderIcon(), this.renderProgress(), h("slot", { key: '62e330f8b945d562b5ee4677a62ab21ec1b6defe', name: "primary", onSlotchange: this.updateHasPrimarySlotContent }), h("div", { key: 'de41a8bc66d7f706153188f84b96481dfa25f8f9', class: "value-group" }, this.renderPrefix(), h("div", { key: '8ae36080dadd6b4a7135c7280e51a88015f30fbc', class: "value-and-suffix" }, this.renderValue(), this.renderSuffix()), this.renderSpinner()), this.renderLabel(), h("limel-3d-hover-effect-glow", { key: '0221c5e66f2a30b60e619bc7d6fe35e66d1db653' })), this.renderNotification()));
|
|
122
122
|
}
|
|
123
123
|
checkProps(propValue) {
|
|
124
124
|
return propValue ? propValue + ' ' : '';
|
|
@@ -588,7 +588,7 @@ export class InputField {
|
|
|
588
588
|
if (ariaControls) {
|
|
589
589
|
properties['aria-controls'] = ariaControls;
|
|
590
590
|
}
|
|
591
|
-
return (h(Host, { key: '
|
|
591
|
+
return (h(Host, { key: 'be352ea1f105d4c3f77b567de32626488ea4a60b' }, h("limel-notched-outline", { key: '0bae1383ad7421ffdc3468bbfc79af59d7c2e3cb', labelId: this.labelId, label: this.label, required: this.required, invalid: this.invalid || this.isInvalid(), disabled: this.disabled, readonly: this.readonly, hasValue: !!this.value, hasLeadingIcon: !!this.leadingIcon }, h("label", { key: '3667d9fbf90227232d8089a421455c7ab72e4202', slot: "content", class: this.getContainerClassList() }, this.renderLeadingIcon(), this.renderPrefix(), this.renderFormattedNumber(), this.renderInput(properties), this.renderSuffix(), this.renderTextarea(properties), this.renderTrailingLinkOrButton())), this.renderHelperLine(), this.renderAutocompleteList()));
|
|
592
592
|
}
|
|
593
593
|
valueWatcher(newValue) {
|
|
594
594
|
if (!this.mdcTextField) {
|
|
@@ -143,7 +143,7 @@ export class List {
|
|
|
143
143
|
maxLinesSecondaryText = 1;
|
|
144
144
|
}
|
|
145
145
|
const html = this.listRenderer.render(this.items, this.config);
|
|
146
|
-
return (h(Host, { key: '
|
|
146
|
+
return (h(Host, { key: 'cbe0fda77189118ad3515dc3c4ab02c6cd9bc58a', style: {
|
|
147
147
|
'--maxLinesSecondaryText': `${maxLinesSecondaryText}`,
|
|
148
148
|
} }, html));
|
|
149
149
|
}
|
|
@@ -162,9 +162,9 @@ export class ListItemComponent {
|
|
|
162
162
|
// also keep for `menuitem` for visual state consistency
|
|
163
163
|
ariaProps['aria-selected'] = this.selected ? 'true' : 'false';
|
|
164
164
|
}
|
|
165
|
-
return (h(Host, Object.assign({ key: '
|
|
165
|
+
return (h(Host, Object.assign({ key: '4f769d4dc9bcf065f0891ae394efb8f2cb4e3cbe', role: this.getHostRole(), class: {
|
|
166
166
|
'has-primary-component': !!((_a = this.primaryComponent) === null || _a === void 0 ? void 0 : _a.name),
|
|
167
|
-
} }, ariaProps), this.renderRadioButton(), this.renderCheckbox(), this.renderIcon(), this.renderImage(), this.renderPrimaryComponent(), h("div", { key: '
|
|
167
|
+
} }, ariaProps), this.renderRadioButton(), this.renderCheckbox(), this.renderIcon(), this.renderImage(), this.renderPrimaryComponent(), h("div", { key: 'f3ae79f70d048a6541af55782a8a1956fd7338c5', class: "text" }, this.renderLabel(), this.renderDescription()), this.renderActionMenu(this.actions)));
|
|
168
168
|
}
|
|
169
169
|
/**
|
|
170
170
|
* Returns a stable reference for the provided actions array to avoid
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { normalizeHotkeyString } from "../../../util/hotkeys";
|
|
2
3
|
/**
|
|
3
4
|
* Meta content for menu list items
|
|
4
5
|
*
|
|
@@ -11,15 +12,25 @@ import { Host, h } from "@stencil/core";
|
|
|
11
12
|
*/
|
|
12
13
|
export class MenuItemMeta {
|
|
13
14
|
constructor() {
|
|
15
|
+
/**
|
|
16
|
+
* Will be set to `true` when the menu item is disabled.
|
|
17
|
+
*/
|
|
18
|
+
this.disabled = false;
|
|
14
19
|
/**
|
|
15
20
|
* Shows a submenu chevron to indicate nested items
|
|
16
21
|
*/
|
|
17
22
|
this.showChevron = false;
|
|
18
23
|
}
|
|
19
24
|
render() {
|
|
20
|
-
return (h(Host, { key: '
|
|
25
|
+
return (h(Host, { key: '4341b1cd34952fdd2dc40bc3c4b7eb909646d880' }, this.renderCommandText(), this.renderBadge(), this.renderChevron()));
|
|
21
26
|
}
|
|
22
27
|
renderCommandText() {
|
|
28
|
+
if (this.hotkey) {
|
|
29
|
+
const hotkey = normalizeHotkeyString(this.hotkey);
|
|
30
|
+
if (hotkey) {
|
|
31
|
+
return h("limel-hotkey", { value: hotkey, disabled: this.disabled });
|
|
32
|
+
}
|
|
33
|
+
}
|
|
23
34
|
if (!this.commandText) {
|
|
24
35
|
return;
|
|
25
36
|
}
|
|
@@ -67,9 +78,48 @@ export class MenuItemMeta {
|
|
|
67
78
|
},
|
|
68
79
|
"getter": false,
|
|
69
80
|
"setter": false,
|
|
70
|
-
"reflect":
|
|
81
|
+
"reflect": true,
|
|
71
82
|
"attribute": "command-text"
|
|
72
83
|
},
|
|
84
|
+
"hotkey": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"mutable": false,
|
|
87
|
+
"complexType": {
|
|
88
|
+
"original": "string",
|
|
89
|
+
"resolved": "string",
|
|
90
|
+
"references": {}
|
|
91
|
+
},
|
|
92
|
+
"required": false,
|
|
93
|
+
"optional": true,
|
|
94
|
+
"docs": {
|
|
95
|
+
"tags": [],
|
|
96
|
+
"text": "Hotkey to display. When provided, `commandText` is ignored."
|
|
97
|
+
},
|
|
98
|
+
"getter": false,
|
|
99
|
+
"setter": false,
|
|
100
|
+
"reflect": true,
|
|
101
|
+
"attribute": "hotkey"
|
|
102
|
+
},
|
|
103
|
+
"disabled": {
|
|
104
|
+
"type": "boolean",
|
|
105
|
+
"mutable": false,
|
|
106
|
+
"complexType": {
|
|
107
|
+
"original": "boolean",
|
|
108
|
+
"resolved": "boolean",
|
|
109
|
+
"references": {}
|
|
110
|
+
},
|
|
111
|
+
"required": false,
|
|
112
|
+
"optional": false,
|
|
113
|
+
"docs": {
|
|
114
|
+
"tags": [],
|
|
115
|
+
"text": "Will be set to `true` when the menu item is disabled."
|
|
116
|
+
},
|
|
117
|
+
"getter": false,
|
|
118
|
+
"setter": false,
|
|
119
|
+
"reflect": true,
|
|
120
|
+
"attribute": "disabled",
|
|
121
|
+
"defaultValue": "false"
|
|
122
|
+
},
|
|
73
123
|
"badge": {
|
|
74
124
|
"type": "any",
|
|
75
125
|
"mutable": false,
|
|
@@ -119,7 +119,7 @@ export class Markdown {
|
|
|
119
119
|
this.cleanupImageIntersectionObserver();
|
|
120
120
|
}
|
|
121
121
|
render() {
|
|
122
|
-
return (h(Host, { key: '
|
|
122
|
+
return (h(Host, { key: 'd3c5e71466ad7fa2723a0a44bc6ba6742e597ca1' }, h("div", { key: 'ff45056e1a3ad465bdea9026b0c9674d911607a2', id: "markdown", ref: (el) => (this.rootElement = el) })));
|
|
123
123
|
}
|
|
124
124
|
setupImageIntersectionObserver() {
|
|
125
125
|
if (this.lazyLoadImages) {
|
|
@@ -3,6 +3,7 @@ import { createRandomString } from "../../util/random-string";
|
|
|
3
3
|
import { zipObject, isFunction } from "lodash-es";
|
|
4
4
|
import { ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP, ESCAPE, TAB, } from "../../util/keycodes";
|
|
5
5
|
import { focusTriggerElement } from "../../util/focus-trigger-element";
|
|
6
|
+
import { hotkeyFromKeyboardEvent, normalizeHotkeyString, tokenizeHotkeyString, } from "../../util/hotkeys";
|
|
6
7
|
const DEFAULT_ROOT_BREADCRUMBS_ITEM = {
|
|
7
8
|
text: '',
|
|
8
9
|
icon: {
|
|
@@ -20,13 +21,14 @@ const DEFAULT_ROOT_BREADCRUMBS_ITEM = {
|
|
|
20
21
|
* @exampleComponent limel-example-menu-icons
|
|
21
22
|
* @exampleComponent limel-example-menu-badge-icons
|
|
22
23
|
* @exampleComponent limel-example-menu-grid
|
|
23
|
-
* @exampleComponent limel-example-menu-hotkeys
|
|
24
24
|
* @exampleComponent limel-example-menu-secondary-text
|
|
25
25
|
* @exampleComponent limel-example-menu-notification
|
|
26
26
|
* @exampleComponent limel-example-menu-sub-menus
|
|
27
27
|
* @exampleComponent limel-example-menu-sub-menu-lazy-loading
|
|
28
28
|
* @exampleComponent limel-example-menu-sub-menu-lazy-loading-infinite
|
|
29
29
|
* @exampleComponent limel-example-menu-searchable
|
|
30
|
+
* @exampleComponent limel-example-menu-hotkeys
|
|
31
|
+
* @exampleComponent limel-example-menu-searchable-hotkeys
|
|
30
32
|
* @exampleComponent limel-example-menu-composite
|
|
31
33
|
*/
|
|
32
34
|
export class Menu {
|
|
@@ -76,6 +78,34 @@ export class Menu {
|
|
|
76
78
|
*/
|
|
77
79
|
this.rootItem = DEFAULT_ROOT_BREADCRUMBS_ITEM;
|
|
78
80
|
this.shouldRestoreFocusOnClose = false;
|
|
81
|
+
this.normalizedHotkeyCache = new Map();
|
|
82
|
+
this.cachedSubMenuSource = null;
|
|
83
|
+
this.cachedSubMenuItems = null;
|
|
84
|
+
this.handleDocumentKeyDown = (event) => {
|
|
85
|
+
if (event.key === ESCAPE && this.open) {
|
|
86
|
+
this.shouldRestoreFocusOnClose = true;
|
|
87
|
+
}
|
|
88
|
+
if (!this.open || event.defaultPrevented || event.repeat) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
if (this.isFromTextInput(event) && !this.hasModifier(event)) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
const pressedHotkey = hotkeyFromKeyboardEvent(event);
|
|
95
|
+
if (!pressedHotkey) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
if (this.isReservedMenuHotkey(pressedHotkey)) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const matchedItem = this.findMenuItemByHotkey(pressedHotkey);
|
|
102
|
+
if (!matchedItem) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
event.stopPropagation();
|
|
106
|
+
event.preventDefault();
|
|
107
|
+
this.handleSelect(matchedItem);
|
|
108
|
+
};
|
|
79
109
|
this.renderLoader = () => {
|
|
80
110
|
if (!this.loadingSubItems && !this.loading) {
|
|
81
111
|
return;
|
|
@@ -165,6 +195,9 @@ export class Menu {
|
|
|
165
195
|
// Will change focus to breadcrumbs (if present) or the first/last item
|
|
166
196
|
// in the dropdown list to enable selection with the keyboard
|
|
167
197
|
this.handleInputKeyDown = (event) => {
|
|
198
|
+
if (event.defaultPrevented) {
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
168
201
|
const isForwardTab = event.key === TAB &&
|
|
169
202
|
!event.altKey &&
|
|
170
203
|
!event.metaKey &&
|
|
@@ -330,11 +363,6 @@ export class Menu {
|
|
|
330
363
|
}
|
|
331
364
|
}
|
|
332
365
|
};
|
|
333
|
-
this.handleEscapeCapture = (event) => {
|
|
334
|
-
if (event.key === ESCAPE && this.open) {
|
|
335
|
-
this.shouldRestoreFocusOnClose = true;
|
|
336
|
-
}
|
|
337
|
-
};
|
|
338
366
|
this.onClose = () => {
|
|
339
367
|
const restoreFocus = this.shouldRestoreFocusOnClose;
|
|
340
368
|
this.shouldRestoreFocusOnClose = false;
|
|
@@ -529,25 +557,113 @@ export class Menu {
|
|
|
529
557
|
const cssProperties = this.getCssProperties();
|
|
530
558
|
const dropdownZIndex = getComputedStyle(this.host).getPropertyValue('--dropdown-z-index');
|
|
531
559
|
const menuSurfaceWidth = this.getMenuSurfaceWidth(cssProperties['--menu-surface-width']);
|
|
532
|
-
return (h("div", { key: '
|
|
560
|
+
return (h("div", { key: '720330cf7d07c491a5a9e58a2567896f5526c45a', class: "mdc-menu-surface--anchor", onClick: this.onTriggerClick }, h("slot", { key: 'd3db72fa9e12bafbb039e6a94a1052edf64e060e', ref: this.setTriggerRef, name: "trigger" }), this.renderNotificationBadge(), h("limel-portal", { key: '591f97a745488fbff7eb8fc06b14d2f6e0d21fa6', visible: this.open, containerId: this.portalId, openDirection: this.openDirection, position: "absolute", containerStyle: { 'z-index': dropdownZIndex } }, h("limel-menu-surface", { key: '829a9578894165b28100c4cab519ced0cb7689a0', open: this.open, onDismiss: this.onClose, style: Object.assign(Object.assign({}, cssProperties), { '--menu-surface-width': menuSurfaceWidth, '--limel-menu-surface-display': 'flex', '--limel-menu-surface-flex-direction': 'column' }), class: {
|
|
533
561
|
'has-grid-layout': this.gridLayout,
|
|
534
562
|
} }, this.renderSearchField(), this.renderBreadcrumb(), this.renderLoader(), this.renderEmptyMessage(), this.renderMenuList()))));
|
|
535
563
|
}
|
|
536
564
|
itemsWatcher() {
|
|
537
565
|
this.clearSearch();
|
|
566
|
+
this.normalizedHotkeyCache.clear();
|
|
538
567
|
this.setFocus();
|
|
539
568
|
}
|
|
569
|
+
connectedCallback() {
|
|
570
|
+
if (this.open) {
|
|
571
|
+
document.addEventListener('keydown', this.handleDocumentKeyDown, true);
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
disconnectedCallback() {
|
|
575
|
+
document.removeEventListener('keydown', this.handleDocumentKeyDown, true);
|
|
576
|
+
}
|
|
540
577
|
openWatcher(newValue) {
|
|
541
578
|
const opened = newValue;
|
|
542
579
|
if (opened) {
|
|
543
|
-
document.addEventListener('keydown', this.
|
|
580
|
+
document.addEventListener('keydown', this.handleDocumentKeyDown, true);
|
|
544
581
|
this.setFocus();
|
|
545
582
|
}
|
|
546
583
|
else {
|
|
547
|
-
document.removeEventListener('keydown', this.
|
|
584
|
+
document.removeEventListener('keydown', this.handleDocumentKeyDown, true);
|
|
548
585
|
this.clearSearch();
|
|
549
586
|
}
|
|
550
587
|
}
|
|
588
|
+
isFromTextInput(event) {
|
|
589
|
+
const path = typeof event.composedPath === 'function'
|
|
590
|
+
? event.composedPath()
|
|
591
|
+
: [];
|
|
592
|
+
for (const node of path) {
|
|
593
|
+
if (!(node instanceof HTMLElement)) {
|
|
594
|
+
continue;
|
|
595
|
+
}
|
|
596
|
+
if (node.isContentEditable) {
|
|
597
|
+
return true;
|
|
598
|
+
}
|
|
599
|
+
const tagName = node.tagName;
|
|
600
|
+
if (tagName === 'INPUT' ||
|
|
601
|
+
tagName === 'TEXTAREA' ||
|
|
602
|
+
tagName === 'SELECT') {
|
|
603
|
+
return true;
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
return false;
|
|
607
|
+
}
|
|
608
|
+
// Only Ctrl and Meta count as "real" modifiers for the text-input bypass.
|
|
609
|
+
// Alt/Option is intentionally excluded because it is used for typing
|
|
610
|
+
// special characters on international keyboards and macOS (e.g. Option+e
|
|
611
|
+
// for é, AltGr+e for € on Windows). This means alt-only hotkeys like
|
|
612
|
+
// "alt+x" will NOT fire while a text input (e.g. the search field) is
|
|
613
|
+
// focused — only Ctrl/Meta combos will. AltGraph is also explicitly
|
|
614
|
+
// rejected because Windows synthesizes ctrlKey=true for AltGr keypresses.
|
|
615
|
+
hasModifier(event) {
|
|
616
|
+
var _a;
|
|
617
|
+
if ((_a = event.getModifierState) === null || _a === void 0 ? void 0 : _a.call(event, 'AltGraph')) {
|
|
618
|
+
return false;
|
|
619
|
+
}
|
|
620
|
+
return event.ctrlKey || event.metaKey;
|
|
621
|
+
}
|
|
622
|
+
isReservedMenuHotkey(hotkey) {
|
|
623
|
+
const tokens = tokenizeHotkeyString(hotkey);
|
|
624
|
+
const key = tokens.at(-1);
|
|
625
|
+
if (!key) {
|
|
626
|
+
return false;
|
|
627
|
+
}
|
|
628
|
+
const hasModifiers = tokens.length > 1;
|
|
629
|
+
if (hasModifiers) {
|
|
630
|
+
return false;
|
|
631
|
+
}
|
|
632
|
+
return (key === 'arrowup' ||
|
|
633
|
+
key === 'arrowdown' ||
|
|
634
|
+
key === 'arrowleft' ||
|
|
635
|
+
key === 'arrowright' ||
|
|
636
|
+
key === 'tab' ||
|
|
637
|
+
key === 'enter' ||
|
|
638
|
+
key === 'space' ||
|
|
639
|
+
key === 'escape');
|
|
640
|
+
}
|
|
641
|
+
findMenuItemByHotkey(pressedHotkey) {
|
|
642
|
+
for (const item of this.visibleItems) {
|
|
643
|
+
if (!this.isMenuItem(item) || item.disabled) {
|
|
644
|
+
continue;
|
|
645
|
+
}
|
|
646
|
+
const rawHotkey = item.hotkey;
|
|
647
|
+
if (!rawHotkey) {
|
|
648
|
+
continue;
|
|
649
|
+
}
|
|
650
|
+
const normalized = this.getNormalizedHotkey(rawHotkey);
|
|
651
|
+
if (normalized && normalized === pressedHotkey) {
|
|
652
|
+
return item;
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
return null;
|
|
656
|
+
}
|
|
657
|
+
getNormalizedHotkey(raw) {
|
|
658
|
+
var _a;
|
|
659
|
+
const cacheKey = raw.trim();
|
|
660
|
+
if (this.normalizedHotkeyCache.has(cacheKey)) {
|
|
661
|
+
return (_a = this.normalizedHotkeyCache.get(cacheKey)) !== null && _a !== void 0 ? _a : null;
|
|
662
|
+
}
|
|
663
|
+
const normalized = normalizeHotkeyString(cacheKey);
|
|
664
|
+
this.normalizedHotkeyCache.set(cacheKey, normalized);
|
|
665
|
+
return normalized;
|
|
666
|
+
}
|
|
551
667
|
getBreadcrumbsItems() {
|
|
552
668
|
const breadCrumbItems = [];
|
|
553
669
|
let currentItem = this.currentSubMenu;
|
|
@@ -610,7 +726,11 @@ export class Menu {
|
|
|
610
726
|
return this.searchResults;
|
|
611
727
|
}
|
|
612
728
|
else if (Array.isArray((_a = this.currentSubMenu) === null || _a === void 0 ? void 0 : _a.items)) {
|
|
613
|
-
|
|
729
|
+
if (this.cachedSubMenuSource !== this.currentSubMenu) {
|
|
730
|
+
this.cachedSubMenuSource = this.currentSubMenu;
|
|
731
|
+
this.cachedSubMenuItems = this.currentSubMenu.items.map((item) => (Object.assign(Object.assign({}, item), { parentItem: this.currentSubMenu })));
|
|
732
|
+
}
|
|
733
|
+
return this.cachedSubMenuItems;
|
|
614
734
|
}
|
|
615
735
|
return this.items;
|
|
616
736
|
}
|
|
@@ -59,12 +59,15 @@ export class MenuListRenderer {
|
|
|
59
59
|
const hasSubMenu = this.hasSubItems(item);
|
|
60
60
|
const hasMeta = hasSubMenu ||
|
|
61
61
|
item.badge !== undefined ||
|
|
62
|
-
|
|
62
|
+
!!item.hotkey ||
|
|
63
|
+
!!item.commandText;
|
|
63
64
|
const primaryComponent = hasMeta
|
|
64
65
|
? {
|
|
65
66
|
name: 'limel-menu-item-meta',
|
|
66
67
|
props: {
|
|
67
68
|
commandText: item.commandText,
|
|
69
|
+
hotkey: item.hotkey,
|
|
70
|
+
disabled: !!item.disabled,
|
|
68
71
|
badge: item.badge,
|
|
69
72
|
showChevron: hasSubMenu,
|
|
70
73
|
},
|
|
@@ -88,7 +88,7 @@ export class MenuList {
|
|
|
88
88
|
iconSize: this.iconSize,
|
|
89
89
|
};
|
|
90
90
|
const html = this.MenuListRenderer.render(this.items, this.config);
|
|
91
|
-
return h("div", { key: '
|
|
91
|
+
return h("div", { key: '1c044c711555d155c5559f8b787a3bbad09b7526', class: "mdc-menu mdc-menu-surface" }, html);
|
|
92
92
|
}
|
|
93
93
|
itemsChanged() {
|
|
94
94
|
setTimeout(() => {
|
|
@@ -105,7 +105,7 @@ export class MenuSurface {
|
|
|
105
105
|
'mdc-elevation-transition': true,
|
|
106
106
|
'mdc-elevation--z4': true,
|
|
107
107
|
};
|
|
108
|
-
return (h("div", { key: '
|
|
108
|
+
return (h("div", { key: '254247a3cd25908f96e55028df567663dd4d736a', class: classList, tabindex: "-1" }, h("slot", { key: 'eb7d1042a28585242d212cf40a34018240cb0502' })));
|
|
109
109
|
}
|
|
110
110
|
static get is() { return "limel-menu-surface"; }
|
|
111
111
|
static get encapsulation() { return "shadow"; }
|
|
@@ -59,7 +59,7 @@ export class NotchedOutline {
|
|
|
59
59
|
this.hasFloatingLabel = false;
|
|
60
60
|
}
|
|
61
61
|
render() {
|
|
62
|
-
return (h("div", { key: '
|
|
62
|
+
return (h("div", { key: '5dd66f7356821043d750963f18ef8f39889e65cc', class: "limel-notched-outline" }, h("slot", { key: '1b2072f7acd112137188b570229470677458ace7', name: "content" }), h("span", { key: '3d1d04a75ff0459b53294a2b2bbb4f15192409cd', class: "limel-notched-outline--outlines", "aria-hidden": "true" }, h("span", { key: '9677d3b3bc1f37e954c3ab2907e98db8b9122466', class: "limel-notched-outline--leading-outline" }), this.renderLabel(), h("span", { key: '62a494be847b2181cdd00f20e50cffbbc121bfd2', class: "limel-notched-outline--trailing-outline" }), this.renderEmptyReadonlyValue())));
|
|
63
63
|
}
|
|
64
64
|
renderLabel() {
|
|
65
65
|
if (!this.label) {
|
|
@@ -188,7 +188,7 @@ export class Picker {
|
|
|
188
188
|
props.maxItems = 1;
|
|
189
189
|
}
|
|
190
190
|
return [
|
|
191
|
-
h("limel-chip-set", Object.assign({ key: '
|
|
191
|
+
h("limel-chip-set", Object.assign({ key: 'e20f22b6907ad1d28f8b8c0847e5080faca09b3b', type: "input", inputType: "search", label: this.label, helperText: this.helperText, leadingIcon: this.leadingIcon, value: this.chips, disabled: this.disabled, invalid: this.invalid, delimiter: this.renderDelimiter(), readonly: this.readonly, required: this.required, searchLabel: this.searchLabel, onInput: this.handleTextInput, onKeyDown: this.handleInputKeyDown, onChange: this.handleChange, onInteract: this.handleInteract, onStartEdit: this.handleInputFieldFocus, onStopEdit: this.handleStopEditAndBlur, emptyInputOnBlur: false, clearAllButton: this.multiple && !this.chipSetEditMode }, props)),
|
|
192
192
|
this.renderDropdown(),
|
|
193
193
|
];
|
|
194
194
|
}
|
|
@@ -127,7 +127,7 @@ export class Popover {
|
|
|
127
127
|
render() {
|
|
128
128
|
const cssProperties = this.getCssProperties();
|
|
129
129
|
const popoverZIndex = getComputedStyle(this.host).getPropertyValue('--popover-z-index');
|
|
130
|
-
return (h("div", { key: '
|
|
130
|
+
return (h("div", { key: '53e64435fa661015fbbf2e449890864c8008c329', class: "trigger-anchor" }, h("slot", { key: '85336e8f76377921850ffc7704c7588707c45066', name: "trigger", ref: this.setTriggerRef }), h("limel-portal", { key: 'a40bfde87375a494ac5404911b4b1f058a55becf', visible: this.open, containerId: this.portalId, containerStyle: { 'z-index': popoverZIndex }, openDirection: this.openDirection }, h("limel-popover-surface", { key: '396e369ae3e61a79bfd2f520e05187a6ff85f834', contentCollection: this.host.children, style: cssProperties }))));
|
|
131
131
|
}
|
|
132
132
|
globalClickListener(event) {
|
|
133
133
|
const element = event.target;
|
|
@@ -8,7 +8,7 @@ export class PopoverSurface {
|
|
|
8
8
|
this.appendElement();
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
|
-
return h("div", { key: '
|
|
11
|
+
return h("div", { key: '72e73b254be6cebbd27332329b10a58210ae0352', class: "limel-popover-surface", tabindex: "0" });
|
|
12
12
|
}
|
|
13
13
|
appendElement() {
|
|
14
14
|
const portalContainer = this.host.shadowRoot.querySelector('.limel-popover-surface');
|
|
@@ -120,7 +120,7 @@ export class Portal {
|
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
render() {
|
|
123
|
-
return h("slot", { key: '
|
|
123
|
+
return h("slot", { key: 'd6ed0d276afec19ba5ffd4d6a6fcf96937127d6a' });
|
|
124
124
|
}
|
|
125
125
|
onVisible() {
|
|
126
126
|
if (!this.container && this.visible) {
|
|
@@ -37,7 +37,7 @@ export class RadioButtonGroup {
|
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
render() {
|
|
40
|
-
return (h("limel-list", { key: '
|
|
40
|
+
return (h("limel-list", { key: 'd42e6342d4fd79d34cb2c6a9d25d3dfe577e9a99', items: this.createItems(), type: "radio", badgeIcons: this.badgeIcons, maxLinesSecondaryText: this.maxLinesSecondaryText, onChange: this.handleChange }));
|
|
41
41
|
}
|
|
42
42
|
createItems() {
|
|
43
43
|
return this.items.map((option) => {
|
|
@@ -31,12 +31,12 @@ import { Host, h } from "@stencil/core";
|
|
|
31
31
|
*/
|
|
32
32
|
export class RadioButtonComponent {
|
|
33
33
|
render() {
|
|
34
|
-
return (h(Host, { key: '
|
|
34
|
+
return (h(Host, { key: '64623e09534c5b4e457029cbed4865d97d3cc19e', class: {
|
|
35
35
|
'boolean-input': true,
|
|
36
36
|
'radio-button': true,
|
|
37
37
|
checked: this.checked,
|
|
38
38
|
disabled: this.disabled,
|
|
39
|
-
} }, h("input", { key: '
|
|
39
|
+
} }, h("input", { key: '4eb816e8031d20bbfa5beb32798e50e5d3747895', type: "radio", id: this.id, checked: this.checked, disabled: this.disabled, onChange: this.onChange }), h("div", { key: '9e7d7db22981a16b4655d7cbcd7c3eb2462a7953', class: "box" }), h("label", { key: '4b2061d351b2d4d03d6e5763bc132be46d146e48', class: "boolean-input-label", htmlFor: this.id }, this.label)));
|
|
40
40
|
}
|
|
41
41
|
static get is() { return "limel-radio-button"; }
|
|
42
42
|
static get originalStyleUrls() {
|
|
@@ -104,7 +104,7 @@ export class Select {
|
|
|
104
104
|
}
|
|
105
105
|
render() {
|
|
106
106
|
const dropdownZIndex = getComputedStyle(this.host).getPropertyValue('--dropdown-z-index');
|
|
107
|
-
return (h(SelectTemplate, { key: '
|
|
107
|
+
return (h(SelectTemplate, { key: '0bc73012998fd97b022c0bdbab31e6806a3ddfd3', id: this.portalId, disabled: this.disabled || this.readonly, readonly: this.readonly, required: this.required, invalid: this.invalid, label: this.label, helperText: this.helperText, value: this.value, options: this.options, onMenuChange: this.handleMenuChange, onNativeChange: this.handleNativeChange, onTriggerPress: this.handleMenuTriggerKeyPress, multiple: this.multiple, isOpen: this.menuOpen, open: this.openMenu, close: this.closeMenu, checkValid: this.checkValid, native: this.isMobileDevice && !this.multiple, dropdownZIndex: dropdownZIndex, anchor: this.getAnchorElement() }));
|
|
108
108
|
}
|
|
109
109
|
watchOpen(newValue, oldValue) {
|
|
110
110
|
if (this.checkValid) {
|
|
@@ -56,7 +56,7 @@ export class Shortcut {
|
|
|
56
56
|
render() {
|
|
57
57
|
var _a, _b, _c, _d, _e;
|
|
58
58
|
const rel = getRel((_a = this.link) === null || _a === void 0 ? void 0 : _a.target, (_b = this.link) === null || _b === void 0 ? void 0 : _b.rel);
|
|
59
|
-
return (h(Host, { key: '
|
|
59
|
+
return (h(Host, { key: '68fa485e1c6552337de3e8304dcb14bd2056f3cc', onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave }, h("a", { key: 'e83e54fcd7776e92938795a2f623e23df14985b0', "aria-disabled": this.disabled, href: (_c = this.link) === null || _c === void 0 ? void 0 : _c.href, target: (_d = this.link) === null || _d === void 0 ? void 0 : _d.target, rel: rel, tabindex: "0", "aria-label": this.getAriaLabel(), title: (_e = this.link) === null || _e === void 0 ? void 0 : _e.title }, h("limel-icon", { key: 'b1aa7fec058ef958c71b0a01fc3c1340e66a0422', name: this.icon }), h("limel-3d-hover-effect-glow", { key: '59132d5f6b5d99f38bba8143a2ff39166dce8648' })), this.renderLabel(), this.renderNotification()));
|
|
60
60
|
}
|
|
61
61
|
static get is() { return "limel-shortcut"; }
|
|
62
62
|
static get encapsulation() { return "shadow"; }
|
|
@@ -243,7 +243,7 @@ export class Slider {
|
|
|
243
243
|
if (this.disabled || this.readonly) {
|
|
244
244
|
inputProps.disabled = true;
|
|
245
245
|
}
|
|
246
|
-
return (h(Host, { key: '
|
|
246
|
+
return (h(Host, { key: '4d8742b0c40d836b9cab61988cafc42e90843e31', class: this.getContainerClassList() }, h("limel-notched-outline", { key: 'a775070fe819f15542ad3ba4a2a3839bcf392051', labelId: this.labelId, label: this.label, required: this.required, invalid: this.invalid, disabled: this.disabled, readonly: this.readonly, hasValue: !!this.value, hasFloatingLabel: true }, h("div", { key: 'f01ca4b8c2f71ef4ea7466aff58d821c484e20bc', slot: "content" }, this.renderRangeContainer(), this.renderSliderContainer(inputProps))), this.renderHelperLine()));
|
|
247
247
|
}
|
|
248
248
|
watchDisabled() {
|
|
249
249
|
this.updateDisabledState();
|