@limetech/lime-elements 39.9.4 → 39.9.5
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 +9 -0
- package/dist/cjs/limel-badge.cjs.entry.js +2 -2
- package/dist/cjs/limel-banner.cjs.entry.js +1 -1
- package/dist/cjs/limel-breadcrumbs_7.cjs.entry.js +16 -4
- package/dist/cjs/limel-button-group.cjs.entry.js +1 -1
- package/dist/cjs/limel-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/limel-chip_2.cjs.entry.js +1 -1
- package/dist/cjs/limel-circular-progress.cjs.entry.js +1 -1
- package/dist/cjs/limel-code-editor.cjs.entry.js +1 -1
- package/dist/cjs/limel-dialog.cjs.entry.js +2 -2
- package/dist/cjs/limel-file-dropzone_2.cjs.entry.js +2 -2
- package/dist/cjs/limel-file.cjs.entry.js +1 -1
- package/dist/cjs/limel-header.cjs.entry.js +1 -1
- package/dist/cjs/limel-help.cjs.entry.js +2 -2
- package/dist/cjs/limel-helper-line_2.cjs.entry.js +2 -2
- package/dist/cjs/limel-info-tile.cjs.entry.js +2 -2
- package/dist/cjs/limel-popover_2.cjs.entry.js +4 -4
- package/dist/cjs/limel-select.cjs.entry.js +1 -1
- package/dist/cjs/limel-shortcut.cjs.entry.js +1 -1
- package/dist/cjs/limel-snackbar.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/collection/components/badge/badge.js +3 -3
- package/dist/collection/components/banner/banner.js +2 -2
- package/dist/collection/components/button-group/button-group.js +2 -2
- package/dist/collection/components/checkbox/checkbox.js +2 -2
- package/dist/collection/components/chip-set/chip-set.js +2 -2
- package/dist/collection/components/circular-progress/circular-progress.js +2 -2
- package/dist/collection/components/code-editor/code-editor.js +2 -2
- package/dist/collection/components/dialog/dialog.js +3 -3
- package/dist/collection/components/dynamic-label/dynamic-label.js +1 -1
- package/dist/collection/components/file/file.js +2 -2
- package/dist/collection/components/file-dropzone/file-dropzone.js +2 -2
- package/dist/collection/components/file-input/file-input.js +2 -2
- package/dist/collection/components/header/header.js +2 -2
- package/dist/collection/components/help/help.js +3 -3
- package/dist/collection/components/helper-line/helper-line.js +3 -3
- package/dist/collection/components/info-tile/info-tile.js +3 -3
- package/dist/collection/components/linear-progress/linear-progress.js +1 -1
- package/dist/collection/components/list/list.js +2 -2
- package/dist/collection/components/menu/menu.js +15 -3
- package/dist/collection/components/popover/popover.js +4 -4
- package/dist/collection/components/select/select.js +2 -2
- package/dist/collection/components/shortcut/shortcut.js +2 -2
- package/dist/collection/components/snackbar/snackbar.js +3 -3
- package/dist/collection/components/spinner/spinner.js +2 -2
- package/dist/collection/components/switch/switch.js +2 -2
- package/dist/collection/components/tab-bar/tab-bar.js +3 -3
- package/dist/collection/components/tab-panel/tab-panel.js +2 -2
- package/dist/collection/components/table/table.js +4 -4
- package/dist/esm/limel-badge.entry.js +2 -2
- package/dist/esm/limel-banner.entry.js +1 -1
- package/dist/esm/limel-breadcrumbs_7.entry.js +16 -4
- package/dist/esm/limel-button-group.entry.js +1 -1
- package/dist/esm/limel-checkbox.entry.js +1 -1
- package/dist/esm/limel-chip_2.entry.js +1 -1
- package/dist/esm/limel-circular-progress.entry.js +1 -1
- package/dist/esm/limel-code-editor.entry.js +1 -1
- package/dist/esm/limel-dialog.entry.js +2 -2
- package/dist/esm/limel-file-dropzone_2.entry.js +2 -2
- package/dist/esm/limel-file.entry.js +1 -1
- package/dist/esm/limel-header.entry.js +1 -1
- package/dist/esm/limel-help.entry.js +2 -2
- package/dist/esm/limel-helper-line_2.entry.js +2 -2
- package/dist/esm/limel-info-tile.entry.js +2 -2
- package/dist/esm/limel-popover_2.entry.js +4 -4
- package/dist/esm/limel-select.entry.js +1 -1
- package/dist/esm/limel-shortcut.entry.js +1 -1
- package/dist/esm/limel-snackbar.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/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/{p-eaac5ad2.entry.js → p-0e1c15c8.entry.js} +1 -1
- package/dist/lime-elements/{p-57c53ed4.entry.js → p-268d2a30.entry.js} +1 -1
- package/dist/lime-elements/{p-1a3a7374.entry.js → p-30e54f05.entry.js} +1 -1
- package/dist/lime-elements/{p-444c7966.entry.js → p-607ad3b7.entry.js} +1 -1
- package/dist/lime-elements/{p-b6ccc921.entry.js → p-61253dea.entry.js} +1 -1
- package/dist/lime-elements/{p-f59590f1.entry.js → p-62d6a350.entry.js} +1 -1
- package/dist/lime-elements/{p-2af214de.entry.js → p-6614bbfc.entry.js} +1 -1
- package/dist/lime-elements/{p-b3622713.entry.js → p-6e0078f1.entry.js} +1 -1
- package/dist/lime-elements/{p-08d1b87a.entry.js → p-6fd84e57.entry.js} +1 -1
- package/dist/lime-elements/{p-da9f1fc4.entry.js → p-72a4841a.entry.js} +2 -2
- package/dist/lime-elements/{p-266c228c.entry.js → p-86a001e2.entry.js} +1 -1
- package/dist/lime-elements/{p-aeebf410.entry.js → p-87c5e951.entry.js} +1 -1
- package/dist/lime-elements/{p-74cd80a9.entry.js → p-95ed243e.entry.js} +1 -1
- package/dist/lime-elements/{p-287c4fb1.entry.js → p-9859b556.entry.js} +1 -1
- package/dist/lime-elements/p-9d51583a.entry.js +1 -0
- package/dist/lime-elements/{p-1547b9c8.entry.js → p-abdede40.entry.js} +1 -1
- package/dist/lime-elements/{p-bb38bb3c.entry.js → p-b91b1aed.entry.js} +1 -1
- package/dist/lime-elements/{p-37b41bad.entry.js → p-bbaaf7c1.entry.js} +1 -1
- package/dist/lime-elements/{p-d6d177bc.entry.js → p-be0cbddb.entry.js} +1 -1
- package/dist/lime-elements/{p-f70b8487.entry.js → p-c5b6ac7a.entry.js} +1 -1
- package/dist/lime-elements/{p-268a695b.entry.js → p-ce20d720.entry.js} +1 -1
- package/dist/lime-elements/{p-3683e2e2.entry.js → p-f92f4f00.entry.js} +1 -1
- package/dist/lime-elements/{p-ef9bb368.entry.js → p-f9cfcd03.entry.js} +1 -1
- package/dist/types/components/badge/badge.d.ts +1 -1
- package/dist/types/components/banner/banner.d.ts +1 -1
- package/dist/types/components/button-group/button-group.d.ts +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +1 -1
- package/dist/types/components/chip-set/chip-set.d.ts +1 -1
- package/dist/types/components/circular-progress/circular-progress.d.ts +1 -1
- package/dist/types/components/code-editor/code-editor.d.ts +1 -1
- package/dist/types/components/dialog/dialog.d.ts +1 -1
- package/dist/types/components/dynamic-label/dynamic-label.d.ts +1 -1
- package/dist/types/components/file/file.d.ts +1 -1
- package/dist/types/components/file-dropzone/file-dropzone.d.ts +1 -1
- package/dist/types/components/file-input/file-input.d.ts +1 -1
- package/dist/types/components/header/header.d.ts +1 -1
- package/dist/types/components/help/help.d.ts +1 -1
- package/dist/types/components/helper-line/helper-line.d.ts +1 -1
- package/dist/types/components/info-tile/info-tile.d.ts +1 -1
- package/dist/types/components/linear-progress/linear-progress.d.ts +1 -1
- package/dist/types/components/list/list.d.ts +1 -1
- package/dist/types/components/menu/menu.d.ts +2 -0
- package/dist/types/components/select/select.d.ts +1 -1
- package/dist/types/components/shortcut/shortcut.d.ts +1 -1
- package/dist/types/components/snackbar/snackbar.d.ts +1 -1
- package/dist/types/components/spinner/spinner.d.ts +1 -1
- package/dist/types/components/switch/switch.d.ts +1 -1
- package/dist/types/components/tab-bar/tab-bar.d.ts +1 -1
- package/dist/types/components/tab-panel/tab-panel.d.ts +1 -1
- package/dist/types/components/table/table.d.ts +1 -1
- package/dist/types/components.d.ts +104 -104
- package/package.json +1 -1
- package/dist/lime-elements/p-3e9a1f2b.entry.js +0 -1
|
@@ -35,7 +35,7 @@ const DEFAULT_FILE_CHIP = {
|
|
|
35
35
|
* and similar phrases...
|
|
36
36
|
* :::
|
|
37
37
|
*
|
|
38
|
-
* @exampleComponent limel-example-file
|
|
38
|
+
* @exampleComponent limel-example-file-basic
|
|
39
39
|
* @exampleComponent limel-example-file-custom-icon
|
|
40
40
|
* @exampleComponent limel-example-file-menu-items
|
|
41
41
|
* @exampleComponent limel-example-file-accepted-types
|
|
@@ -89,7 +89,7 @@ export class File {
|
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
91
|
render() {
|
|
92
|
-
return (h(Host, { key: '
|
|
92
|
+
return (h(Host, { key: '4b91f02cff596bca5da1a635ce24d2bb8a5154e1' }, h("limel-file-dropzone", { key: 'c3636964ee41bd5396fe667cc983a74256845af5', disabled: this.disabled || this.readonly || !!this.value, accept: this.accept, onFilesSelected: this.handleNewFiles }, this.renderChipset()), this.renderDragAndDropTip()));
|
|
93
93
|
}
|
|
94
94
|
renderDragAndDropTip() {
|
|
95
95
|
if (this.value || this.disabled || this.readonly) {
|
|
@@ -14,7 +14,7 @@ import { partition } from "lodash-es";
|
|
|
14
14
|
* The event detail would be an array of `FileInfo` objects,
|
|
15
15
|
* each representing a file dropped into the dropzone.
|
|
16
16
|
*
|
|
17
|
-
* @exampleComponent limel-example-file-dropzone
|
|
17
|
+
* @exampleComponent limel-example-file-dropzone-basic
|
|
18
18
|
* @exampleComponent limel-example-file-dropzone-type-filtering
|
|
19
19
|
* @private
|
|
20
20
|
*/
|
|
@@ -90,7 +90,7 @@ export class FileDropzone {
|
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
92
|
render() {
|
|
93
|
-
return (h(Host, { key: '
|
|
93
|
+
return (h(Host, { key: 'a66ef9c3d9a005567749b61967a63caa4496135a', onDrop: this.handleDrop, onDragOver: this.handleDragOver, onDragLeave: this.handleDragLeave }, h("slot", { key: '7a770aa9f98365da4b83038662f04c0e9e5c20c6' }), this.renderOnDragLayout()));
|
|
94
94
|
}
|
|
95
95
|
static get is() { return "limel-file-dropzone"; }
|
|
96
96
|
static get encapsulation() { return "shadow"; }
|
|
@@ -14,7 +14,7 @@ import { createFileInfo } from "../../util/files";
|
|
|
14
14
|
* The event detail would be an array of `FileInfo` objects,
|
|
15
15
|
* each representing a file dropped into the dropzone.
|
|
16
16
|
*
|
|
17
|
-
* @exampleComponent limel-example-file-input
|
|
17
|
+
* @exampleComponent limel-example-file-input-basic
|
|
18
18
|
* @exampleComponent limel-example-file-input-type-filtering
|
|
19
19
|
* @private
|
|
20
20
|
*/
|
|
@@ -71,7 +71,7 @@ export class FileInput {
|
|
|
71
71
|
this.fileInput = this.element.shadowRoot.getElementById(this.fileInputId);
|
|
72
72
|
}
|
|
73
73
|
render() {
|
|
74
|
-
return (h(Host, { key: '
|
|
74
|
+
return (h(Host, { key: '62d72f49b1a71bef9c5b91c36f34f763a04d78e2', onClick: this.handleClick, onKeyUp: this.handleKeyUp, onKeyDown: this.handleKeyDown }, h("input", { key: '72272f710f8ffb09eec2ace7409ab516ec4f80bd', hidden: true, id: this.fileInputId, onChange: this.handleFileChange, type: "file", accept: this.accept, disabled: this.disabled, multiple: this.multiple }), h("slot", { key: '7ecff23ba41d76a23a2b8a542f56044615cb8b24' })));
|
|
75
75
|
}
|
|
76
76
|
handleKeyDown(event) {
|
|
77
77
|
if (event.code === 'Tab' ||
|
|
@@ -40,7 +40,7 @@ import { getIconName } from "../icon/get-icon-props";
|
|
|
40
40
|
* and take a lot of attention from users.
|
|
41
41
|
* :::
|
|
42
42
|
*
|
|
43
|
-
* @exampleComponent limel-example-header
|
|
43
|
+
* @exampleComponent limel-example-header-basic
|
|
44
44
|
* @exampleComponent limel-example-header-slot-actions
|
|
45
45
|
* @exampleComponent limel-example-header-colors
|
|
46
46
|
* @exampleComponent limel-example-header-responsive
|
|
@@ -61,7 +61,7 @@ export class Header {
|
|
|
61
61
|
this.subheadingDivider = '·';
|
|
62
62
|
}
|
|
63
63
|
render() {
|
|
64
|
-
return (h(Host, { key: '
|
|
64
|
+
return (h(Host, { key: '4a94e7808e3b295669faa4711d37f8d9ed50b006' }, h("div", { key: '7c02e31819ddac504b5c58b6200c00a621079990', class: "information" }, this.renderIcon(), h("div", { key: 'b38172e5332ee39476bd19f7ad4f0ce127cc30d6', class: "headings" }, h("h1", { key: '9ee1f899ba0f403a588e0dbca52d82c1c12e355e', class: "heading", title: this.heading }, this.heading), h("h2", { key: '49b81ef3a96a9c2f7fa27ec2d13a15907131624e', class: "subheading", title: this.subheading }, this.subheading, this.renderSupportingText()))), h("slot", { key: '29984270ca745ce430deef27704b9c63065c2964', name: "actions" }, h("slot", { key: '1c3b766dc1444a0255ea605359b25d148d25ba57' }))));
|
|
65
65
|
}
|
|
66
66
|
renderIcon() {
|
|
67
67
|
var _a, _b, _c, _d, _e;
|
|
@@ -15,7 +15,7 @@ import { h, Host } from "@stencil/core";
|
|
|
15
15
|
* of an app more effortlessly, minimizes the learning curve,
|
|
16
16
|
* transforming complex features into accessible opportunities for exploration.
|
|
17
17
|
*
|
|
18
|
-
* @exampleComponent limel-example-help
|
|
18
|
+
* @exampleComponent limel-example-help-basic
|
|
19
19
|
* @exampleComponent limel-example-read-more
|
|
20
20
|
* @exampleComponent limel-example-open-direction
|
|
21
21
|
* @exampleComponent limel-example-placement
|
|
@@ -41,9 +41,9 @@ export class HelpComponent {
|
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
render() {
|
|
44
|
-
return (h(Host, { key: '
|
|
44
|
+
return (h(Host, { key: 'a52d9b4c220e21005011449735b97599cffb542e' }, h("limel-popover", { key: '8b6690894351ec32f5b982ca5d3aeac7300f5576', open: this.isOpen, onClose: this.onPopoverClose, openDirection: this.openDirection }, h("button", { key: '98e5dc4abcff54df74b02c737e4889e17639ddc6', slot: "trigger", type: "button", onClick: this.openPopover, class: {
|
|
45
45
|
'is-open': this.isOpen,
|
|
46
|
-
} }, this.trigger), h("limel-help-content", { key: '
|
|
46
|
+
} }, this.trigger), h("limel-help-content", { key: '10b2d483aa459403b3d922add805bf6f64ae66e3', value: this.value, readMoreLink: this.readMoreLink }))));
|
|
47
47
|
}
|
|
48
48
|
static get is() { return "limel-help"; }
|
|
49
49
|
static get encapsulation() { return "shadow"; }
|
|
@@ -10,7 +10,7 @@ import { Host, h } from "@stencil/core";
|
|
|
10
10
|
* Also this enables us to open the helper line in limel-portal,
|
|
11
11
|
* more easily without having to send the styles to the portal.
|
|
12
12
|
*
|
|
13
|
-
* @exampleComponent limel-example-helper-line
|
|
13
|
+
* @exampleComponent limel-example-helper-line-basic
|
|
14
14
|
* @exampleComponent limel-example-helper-line-invalid
|
|
15
15
|
* @exampleComponent limel-example-helper-line-long-text
|
|
16
16
|
* @exampleComponent limel-example-helper-line-long-text-no-counter
|
|
@@ -46,9 +46,9 @@ export class HelperLine {
|
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
render() {
|
|
49
|
-
return (h(Host, { key: '
|
|
49
|
+
return (h(Host, { key: '8ef6eb3b3e372e5dc61af1424a88c1c342023d13', tabIndex: -1, class: {
|
|
50
50
|
invalid: this.invalid,
|
|
51
|
-
}, style: this.hasContent() ? {} : { display: 'none' }, "aria-hidden": !this.hasContent() }, h("div", { key: '
|
|
51
|
+
}, style: this.hasContent() ? {} : { display: 'none' }, "aria-hidden": !this.hasContent() }, h("div", { key: '3b4e31c23f5964aabb67556e68bd1785c871d934' }, this.renderHelperText(), this.renderCharacterCounter())));
|
|
52
52
|
}
|
|
53
53
|
static get is() { return "limel-helper-line"; }
|
|
54
54
|
static get encapsulation() { return "shadow"; }
|
|
@@ -10,7 +10,7 @@ import { getRel } from "../../util/link-helper";
|
|
|
10
10
|
* a new screen or web page, you need to provide a URL,
|
|
11
11
|
* using the `link` property.
|
|
12
12
|
*
|
|
13
|
-
* @exampleComponent limel-example-info-tile
|
|
13
|
+
* @exampleComponent limel-example-info-tile-basic
|
|
14
14
|
* @exampleComponent limel-example-info-tile-badge
|
|
15
15
|
* @exampleComponent limel-example-info-tile-progress
|
|
16
16
|
* @exampleComponent limel-example-info-tile-loading
|
|
@@ -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: '7c8d656a077f6c80cc7d4d64bf1aa9ef7d5bd781', onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave, class: { 'has-primary-slot-content': this.hasPrimarySlot } }, h("a", { key: 'f73467be963a8aa901c890958eda32212ff2f3a0', 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: '2e4972465f34d57ce81a0c55782e9fcbc4c91c90', name: "primary", onSlotchange: this.updateHasPrimarySlotContent }), h("div", { key: '119b244389b740a05b266c80a78bffd2287f6dab', class: "value-group" }, this.renderPrefix(), h("div", { key: '9a9fc38d8c997b3ce6db3715a1aed622ec0af586', class: "value-and-suffix" }, this.renderValue(), this.renderSuffix()), this.renderSpinner()), this.renderLabel(), h("limel-3d-hover-effect-glow", { key: '1809611bebee438d5b840907f09adda725c7849c' })), this.renderNotification()));
|
|
122
122
|
}
|
|
123
123
|
checkProps(propValue) {
|
|
124
124
|
return propValue ? propValue + ' ' : '';
|
|
@@ -5,7 +5,7 @@ const PERCENT = 100;
|
|
|
5
5
|
* The linear progress component can be used to visualize the current state of a progress in a scale;
|
|
6
6
|
* for example percentage of completion of a task.
|
|
7
7
|
*
|
|
8
|
-
* @exampleComponent limel-example-linear-progress
|
|
8
|
+
* @exampleComponent limel-example-linear-progress-basic
|
|
9
9
|
* @exampleComponent limel-example-linear-progress-indeterminate
|
|
10
10
|
* @exampleComponent limel-example-linear-progress-accessible-label
|
|
11
11
|
* @exampleComponent limel-example-linear-progress-color
|
|
@@ -4,7 +4,7 @@ import { h, Host, } from "@stencil/core";
|
|
|
4
4
|
import { ListRenderer } from "./list-renderer";
|
|
5
5
|
const { ACTION_EVENT } = listStrings;
|
|
6
6
|
/**
|
|
7
|
-
* @exampleComponent limel-example-list
|
|
7
|
+
* @exampleComponent limel-example-list-basic
|
|
8
8
|
* @exampleComponent limel-example-list-secondary
|
|
9
9
|
* @exampleComponent limel-example-list-separator
|
|
10
10
|
* @exampleComponent limel-example-list-icons
|
|
@@ -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: 'e08edeaabf6b51f940e305539aecec91517a51ca', style: {
|
|
147
147
|
'--maxLinesSecondaryText': `${maxLinesSecondaryText}`,
|
|
148
148
|
} }, html));
|
|
149
149
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, } from "@stencil/core";
|
|
2
2
|
import { createRandomString } from "../../util/random-string";
|
|
3
3
|
import { zipObject, isFunction } from "lodash-es";
|
|
4
|
-
import { ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP, TAB, } from "../../util/keycodes";
|
|
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
6
|
const DEFAULT_ROOT_BREADCRUMBS_ITEM = {
|
|
7
7
|
text: '',
|
|
@@ -75,6 +75,7 @@ export class Menu {
|
|
|
75
75
|
* Clicking it navigates back from a sub-menu to the root menu.
|
|
76
76
|
*/
|
|
77
77
|
this.rootItem = DEFAULT_ROOT_BREADCRUMBS_ITEM;
|
|
78
|
+
this.shouldRestoreFocusOnClose = false;
|
|
78
79
|
this.renderLoader = () => {
|
|
79
80
|
if (!this.loadingSubItems && !this.loading) {
|
|
80
81
|
return;
|
|
@@ -329,11 +330,20 @@ export class Menu {
|
|
|
329
330
|
}
|
|
330
331
|
}
|
|
331
332
|
};
|
|
333
|
+
this.handleEscapeCapture = (event) => {
|
|
334
|
+
if (event.key === ESCAPE && this.open) {
|
|
335
|
+
this.shouldRestoreFocusOnClose = true;
|
|
336
|
+
}
|
|
337
|
+
};
|
|
332
338
|
this.onClose = () => {
|
|
339
|
+
const restoreFocus = this.shouldRestoreFocusOnClose;
|
|
340
|
+
this.shouldRestoreFocusOnClose = false;
|
|
333
341
|
this.cancel.emit();
|
|
334
342
|
this.open = false;
|
|
335
343
|
this.currentSubMenu = null;
|
|
336
|
-
|
|
344
|
+
if (restoreFocus) {
|
|
345
|
+
setTimeout(this.focusTrigger, 0);
|
|
346
|
+
}
|
|
337
347
|
};
|
|
338
348
|
this.onTriggerClick = (event) => {
|
|
339
349
|
event.stopPropagation();
|
|
@@ -519,7 +529,7 @@ export class Menu {
|
|
|
519
529
|
const cssProperties = this.getCssProperties();
|
|
520
530
|
const dropdownZIndex = getComputedStyle(this.host).getPropertyValue('--dropdown-z-index');
|
|
521
531
|
const menuSurfaceWidth = this.getMenuSurfaceWidth(cssProperties['--menu-surface-width']);
|
|
522
|
-
return (h("div", { key: '
|
|
532
|
+
return (h("div", { key: 'a54987a1be3e3fcc4ceae95c7cc334411a0c474f', class: "mdc-menu-surface--anchor", onClick: this.onTriggerClick }, h("slot", { key: '1bacdb5d1387b8357d1c6f93db47369c8cf64a4f', ref: this.setTriggerRef, name: "trigger" }), this.renderNotificationBadge(), h("limel-portal", { key: 'fbc7982b1dcab9fd5172a95e7a7f0328281f3a35', visible: this.open, containerId: this.portalId, openDirection: this.openDirection, position: "absolute", containerStyle: { 'z-index': dropdownZIndex } }, h("limel-menu-surface", { key: '48b96e2e6fe815f4cc976553dfea7b26f36ea6d4', 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: {
|
|
523
533
|
'has-grid-layout': this.gridLayout,
|
|
524
534
|
} }, this.renderSearchField(), this.renderBreadcrumb(), this.renderLoader(), this.renderEmptyMessage(), this.renderMenuList()))));
|
|
525
535
|
}
|
|
@@ -530,9 +540,11 @@ export class Menu {
|
|
|
530
540
|
openWatcher(newValue) {
|
|
531
541
|
const opened = newValue;
|
|
532
542
|
if (opened) {
|
|
543
|
+
document.addEventListener('keydown', this.handleEscapeCapture, true);
|
|
533
544
|
this.setFocus();
|
|
534
545
|
}
|
|
535
546
|
else {
|
|
547
|
+
document.removeEventListener('keydown', this.handleEscapeCapture, true);
|
|
536
548
|
this.clearSearch();
|
|
537
549
|
}
|
|
538
550
|
}
|
|
@@ -117,17 +117,17 @@ export class Popover {
|
|
|
117
117
|
document.addEventListener('click', this.globalClickListener, {
|
|
118
118
|
capture: true,
|
|
119
119
|
});
|
|
120
|
-
document.addEventListener('
|
|
120
|
+
document.addEventListener('keydown', this.handleGlobalKeyPress);
|
|
121
121
|
}
|
|
122
122
|
else {
|
|
123
123
|
document.removeEventListener('click', this.globalClickListener);
|
|
124
|
-
document.removeEventListener('
|
|
124
|
+
document.removeEventListener('keydown', this.handleGlobalKeyPress);
|
|
125
125
|
}
|
|
126
126
|
}
|
|
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: 'ac6e4c9358d68223f43ea60a29302d725438cf05', class: "trigger-anchor" }, h("slot", { key: '5e5ae7d194f7cc005573e909cd10343283603a7f', name: "trigger", ref: this.setTriggerRef }), h("limel-portal", { key: '5d4bda03c1ea9b07c17b7222fb2f30e29af9b3d3', visible: this.open, containerId: this.portalId, containerStyle: { 'z-index': popoverZIndex }, openDirection: this.openDirection }, h("limel-popover-surface", { key: '0f9804103a70f924375429ba7e96ad62858cb2ea', contentCollection: this.host.children, style: cssProperties }))));
|
|
131
131
|
}
|
|
132
132
|
globalClickListener(event) {
|
|
133
133
|
const element = event.target;
|
|
@@ -135,7 +135,7 @@ export class Popover {
|
|
|
135
135
|
if (this.open && !clickedInside) {
|
|
136
136
|
event.stopPropagation();
|
|
137
137
|
event.preventDefault();
|
|
138
|
-
this.
|
|
138
|
+
this.close.emit();
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
getCssProperties() {
|
|
@@ -7,7 +7,7 @@ import { isMultiple } from "../../util/multiple";
|
|
|
7
7
|
import { createRandomString } from "../../util/random-string";
|
|
8
8
|
import { SelectTemplate, triggerIconColorWarning } from "./select.template";
|
|
9
9
|
/**
|
|
10
|
-
* @exampleComponent limel-example-select
|
|
10
|
+
* @exampleComponent limel-example-select-basic
|
|
11
11
|
* @exampleComponent limel-example-select-with-icons
|
|
12
12
|
* @exampleComponent limel-example-select-with-separators
|
|
13
13
|
* @exampleComponent limel-example-select-with-secondary-text
|
|
@@ -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: '12c687df2b999aa6d8a06c7fab59bda425678791', 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) {
|
|
@@ -10,7 +10,7 @@ import { getMouseEventHandlers } from "../../util/3d-tilt-hover-effect";
|
|
|
10
10
|
* However, it is possible to override that behavior, by specifying a `target`
|
|
11
11
|
* for the `link` property
|
|
12
12
|
*
|
|
13
|
-
* @exampleComponent limel-example-shortcut
|
|
13
|
+
* @exampleComponent limel-example-shortcut-basic
|
|
14
14
|
* @exampleComponent limel-example-shortcut-notification
|
|
15
15
|
* @exampleComponent limel-example-shortcut-styling
|
|
16
16
|
* @exampleComponent limel-example-shortcut-with-click-handler
|
|
@@ -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: '6d8f34f6545714c032ca8a106bd19b8c25b49c9e', onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave }, h("a", { key: 'ea703109895bf2baedeb85a573a7b9b95b6c77a5', "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: '065f25188bb6a712e3933d89067f6151362eee72', name: this.icon }), h("limel-3d-hover-effect-glow", { key: '7c0ac50c83d7047d2745427c210e278150951b02' })), this.renderLabel(), this.renderNotification()));
|
|
60
60
|
}
|
|
61
61
|
static get is() { return "limel-shortcut"; }
|
|
62
62
|
static get encapsulation() { return "shadow"; }
|
|
@@ -26,7 +26,7 @@ const hideAnimationDuration = 300;
|
|
|
26
26
|
* [Dialog](#/component/limel-dialog/) is a better choice.
|
|
27
27
|
* :::
|
|
28
28
|
*
|
|
29
|
-
* @exampleComponent limel-example-snackbar
|
|
29
|
+
* @exampleComponent limel-example-snackbar-basic
|
|
30
30
|
* @exampleComponent limel-example-snackbar-with-action
|
|
31
31
|
* @exampleComponent limel-example-snackbar-with-changing-messages
|
|
32
32
|
* @exampleComponent limel-example-snackbar-dismissible
|
|
@@ -121,14 +121,14 @@ export class Snackbar {
|
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
render() {
|
|
124
|
-
return (h("aside", { key: '
|
|
124
|
+
return (h("aside", { key: '50e3fbd9e15990446adc21cf46c5a50025ae32b2', popover: "manual", style: {
|
|
125
125
|
'--snackbar-timeout': `${Math.max(this.timeout || 0, 0)}ms`,
|
|
126
126
|
'--snackbar-distance-to-top-edge': `${this.offset}px`,
|
|
127
127
|
}, class: {
|
|
128
128
|
open: this.open,
|
|
129
129
|
'is-closing': this.closing,
|
|
130
130
|
'limel-portal--parent': true,
|
|
131
|
-
}, id: this.snackbarId, role: this.setAriaRoles(), "aria-atomic": this.open ? 'true' : undefined, "aria-relevant": this.open ? 'additions' : undefined }, h("div", { key: '
|
|
131
|
+
}, id: this.snackbarId, role: this.setAriaRoles(), "aria-atomic": this.open ? 'true' : undefined, "aria-relevant": this.open ? 'additions' : undefined }, h("div", { key: 'e256db2465275aee96cdd0b523382bfe26f4fed3', class: "surface" }, h("div", { key: '02cbd256b396c3aab857aebe0ba05db1a5d00d04', class: "label" }, this.message), this.renderActions(this.actionText), this.renderDismissButton(this.dismissible))));
|
|
132
132
|
}
|
|
133
133
|
setAriaRoles() {
|
|
134
134
|
if (!this.open) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
/**
|
|
3
|
-
* @exampleComponent limel-example-spinner
|
|
3
|
+
* @exampleComponent limel-example-spinner-basic
|
|
4
4
|
* @exampleComponent limel-example-spinner-color
|
|
5
5
|
* @exampleComponent limel-example-spinner-size
|
|
6
6
|
*/
|
|
@@ -16,7 +16,7 @@ export class Spinner {
|
|
|
16
16
|
this.limeBranded = false;
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
|
-
return (h(Host, { key: '
|
|
19
|
+
return (h(Host, { key: '15c39e3df6a446d4f809e23d2316e535bf77dc99' }, h("svg", { key: 'e88d11c66514783aa11bb01c4e902a15d0cb6dd4', viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, this.renderSpinner())));
|
|
20
20
|
}
|
|
21
21
|
renderSpinner() {
|
|
22
22
|
if (!this.limeBranded) {
|
|
@@ -15,7 +15,7 @@ import { makeEnterClickable, removeEnterClickable, } from "../../util/make-enter
|
|
|
15
15
|
* But there is an important difference between the two! Please read our guidelines about
|
|
16
16
|
* [Switch vs. Checkbox](#/DesignGuidelines/switch-vs-checkbox.md/).
|
|
17
17
|
*
|
|
18
|
-
* @exampleComponent limel-example-switch
|
|
18
|
+
* @exampleComponent limel-example-switch-basic
|
|
19
19
|
* @exampleComponent limel-example-switch-helper-text
|
|
20
20
|
* @exampleComponent limel-example-switch-readonly
|
|
21
21
|
*/
|
|
@@ -78,7 +78,7 @@ export class Switch {
|
|
|
78
78
|
removeEnterClickable(this.host);
|
|
79
79
|
}
|
|
80
80
|
render() {
|
|
81
|
-
return (h(Host, { key: '
|
|
81
|
+
return (h(Host, { key: '06ea93968a9f60b3fe115e1f54a9354cd4b8e891' }, this.readonly
|
|
82
82
|
? this.renderReadonly()
|
|
83
83
|
: this.renderInteractive(), this.renderHelperLine()));
|
|
84
84
|
}
|
|
@@ -25,7 +25,7 @@ const OVERLAP_PERCENTAGE = 20;
|
|
|
25
25
|
* A tab will never be removed or get disabled, even if there is no content under it.
|
|
26
26
|
* :::
|
|
27
27
|
*
|
|
28
|
-
* @exampleComponent limel-example-tab-bar
|
|
28
|
+
* @exampleComponent limel-example-tab-bar-basic
|
|
29
29
|
* @exampleComponent limel-example-tab-bar-with-dynamic-tab-width
|
|
30
30
|
* @exampleComponent limel-example-tab-bar-with-equal-tab-width
|
|
31
31
|
*/
|
|
@@ -62,11 +62,11 @@ export class TabBar {
|
|
|
62
62
|
this.tearDown();
|
|
63
63
|
}
|
|
64
64
|
render() {
|
|
65
|
-
return (h("div", { key: '
|
|
65
|
+
return (h("div", { key: 'bdc335fde021cff31e6a47b8d0ab14de6e1f7c9b', class: "mdc-tab-bar", role: "tablist" }, h("div", { key: 'e4c25d25283507ce29d06260b5dd5fd9cbc41a49', class: {
|
|
66
66
|
'mdc-tab-scroller': true,
|
|
67
67
|
'can-scroll-left': this.canScrollLeft,
|
|
68
68
|
'can-scroll-right': this.canScrollRight,
|
|
69
|
-
} }, h("div", { key: '
|
|
69
|
+
} }, h("div", { key: '0fd262305222f95f4dfab1e792a0686b9ffb3117', class: "mdc-tab-scroller__scroll-area lime-hide-scrollbars" }, h("div", { key: 'ff4dd675de9c6cde5c4a0dddd90211a73ea34962', class: "mdc-tab-scroller__scroll-content" }, this.tabs.map(this.renderTab))), h("div", { key: '3c201211c344ce09ef12166acfab2af0b3a4f64c', class: "scroll-fade left" }), h("div", { key: 'e124c7d58974629de53319948d0a961a293989a8', class: "scroll-button left" }, h("button", { key: 'df876f20c9177923218d773a5fd0880ac7eefb2a', type: "button", tabindex: "-1", "aria-hidden": "true", disabled: !this.canScrollLeft, onClick: this.handleLeftScrollClick }, h("limel-icon", { key: '65dbb20efcd7f233cd8637641e764f1be7b7e2a0', name: "angle_left" }))), h("div", { key: '5e8c69252a54be76393de70822ec2f6817e7a6d1', class: "scroll-fade right" }), h("div", { key: '341d0c50fe1513c8ad254ff8cebaf9be8607d5f0', class: "scroll-button right" }, h("button", { key: '8ea21fad4dace603ffdc8c51ac597806979a9dd4', type: "button", tabindex: "-1", "aria-hidden": "true", disabled: !this.canScrollRight, onClick: this.handleRightScrollClick }, h("limel-icon", { key: 'e28a22555f3ce6e434afa64faac037ae63787141', name: "angle_right" }))))));
|
|
70
70
|
}
|
|
71
71
|
tabsChanged(newTabs = [], oldTabs = []) {
|
|
72
72
|
const newIds = newTabs.map((tab) => tab.id);
|
|
@@ -17,7 +17,7 @@ import { dispatchResizeEvent } from "../../util/dispatch-resize-event";
|
|
|
17
17
|
*
|
|
18
18
|
* @slot - Content to put inside the `limel-tab-panel`. Each slotted element
|
|
19
19
|
* must have the `id` attribute equal to the id of the tab it belongs to.
|
|
20
|
-
* @exampleComponent limel-example-tab-panel
|
|
20
|
+
* @exampleComponent limel-example-tab-panel-basic
|
|
21
21
|
*/
|
|
22
22
|
export class TabPanel {
|
|
23
23
|
constructor() {
|
|
@@ -56,7 +56,7 @@ export class TabPanel {
|
|
|
56
56
|
this.tabs.forEach(this.setTabStatus);
|
|
57
57
|
}
|
|
58
58
|
render() {
|
|
59
|
-
return (h(Host, { key: '
|
|
59
|
+
return (h(Host, { key: 'd1eb596b4d03fa6ac2ada4f05e67f243835cf341', onChangeTab: this.handleChangeTabs }, h("div", { key: 'f3970a0afb5c17ea357dcd9fcb5c031a71d4d7da', class: "tab-panel" }, h("limel-tab-bar", { key: 'ff232710bd7284cf7f96739c3aeaf1a9d7233101', tabs: this.tabs }), h("div", { key: 'b6d3c3a176466efd859eacd90a610c8c8895bc8a', class: "tab-content" }, h("slot", { key: '7a442c6f4347e506b3037dd2ec19f7edc7b2b066' })))));
|
|
60
60
|
}
|
|
61
61
|
setSlotElements() {
|
|
62
62
|
const slot = this.getSlot();
|
|
@@ -9,7 +9,7 @@ import { areRowsEqual } from "./utils";
|
|
|
9
9
|
import translate from "../../global/translations";
|
|
10
10
|
const FIRST_PAGE = 1;
|
|
11
11
|
/**
|
|
12
|
-
* @exampleComponent limel-example-table
|
|
12
|
+
* @exampleComponent limel-example-table-basic
|
|
13
13
|
* @exampleComponent limel-example-table-custom-components
|
|
14
14
|
* @exampleComponent limel-example-table-header-menu
|
|
15
15
|
* @exampleComponent limel-example-table-movable-columns
|
|
@@ -575,16 +575,16 @@ export class Table {
|
|
|
575
575
|
render() {
|
|
576
576
|
var _a, _b;
|
|
577
577
|
const totalRows = (_a = this.totalRows) !== null && _a !== void 0 ? _a : this.data.length;
|
|
578
|
-
return (h(Host, { key: '
|
|
578
|
+
return (h(Host, { key: 'ffcd07f62babe29a526ae77d2c36afa4bc066cc9', class: {
|
|
579
579
|
'has-low-density': this.layout === 'lowDensity',
|
|
580
580
|
'has-pagination-on-top': this.paginationLocation === 'top',
|
|
581
|
-
} }, h("div", { key: '
|
|
581
|
+
} }, h("div", { key: '5fe17a812c0e2f0afb730222930f1b8878669511', id: "tabulator-container", class: {
|
|
582
582
|
'has-pagination': totalRows > this.pageSize,
|
|
583
583
|
'has-aggregation': this.hasAggregation(this.columns),
|
|
584
584
|
'has-movable-columns': this.movableColumns,
|
|
585
585
|
'has-rowselector': this.selectable,
|
|
586
586
|
'has-selection': (_b = this.tableSelection) === null || _b === void 0 ? void 0 : _b.hasSelection,
|
|
587
|
-
} }, h("div", { key: '
|
|
587
|
+
} }, h("div", { key: '7f2f41c8faff5b81e49bd0731f0cf7f268bbf1da', id: "tabulator-loader", style: { display: this.loading ? 'flex' : 'none' } }, h("limel-spinner", { key: '95ab49709be868ea55a9b92b262c93fb93f41f4b', size: "large" })), this.renderEmptyMessage(), this.renderSelectAll(), h("div", { key: '0c3e2605fefc6ddfdd72a68a13182d0517448f74', id: "tabulator-table" }))));
|
|
588
588
|
}
|
|
589
589
|
renderSelectAll() {
|
|
590
590
|
var _a, _b, _c;
|
|
@@ -9,9 +9,9 @@ const Badge = class {
|
|
|
9
9
|
registerInstance(this, hostRef);
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return (h(Host, { key: '
|
|
12
|
+
return (h(Host, { key: '995d46502d8ea017877e6308ea9dde691706cf9a', title: this.labelIsLarge() ? this.label : '', class: {
|
|
13
13
|
'has-large-label': this.labelIsLarge(),
|
|
14
|
-
} }, h("span", { key: '
|
|
14
|
+
} }, h("span", { key: 'dc6f429f03e8768b2af2fb254bef0715e9fce839' }, this.renderLabel())));
|
|
15
15
|
}
|
|
16
16
|
renderLabel() {
|
|
17
17
|
if (typeof this.label === 'number') {
|
|
@@ -20,7 +20,7 @@ const Banner = class {
|
|
|
20
20
|
this.isOpen = false;
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
return (h("div", { key: '
|
|
23
|
+
return (h("div", { key: '4c52de06b1d1710e79d2fbe729c76b49c7a4dae9', class: `lime-banner ${this.isOpen ? 'lime-banner--open' : ''}` }, h("div", { key: '2085a6a5d07c036642646f6cb9cab56e7f86f48a', class: "lime-banner__surface" }, h("div", { key: '0b021548bdee32661d458a88e0472a6a1ef0f195', class: "lime-banner__content" }, h("div", { key: '65db98d6d60fdf856871e68c6c3bdaa55fb87526', class: "icon-message" }, this.renderIcon(), h("div", { key: '94eb50955800bc6a18c49bed8d6fd949909cf5bd' }, this.message)), h("div", { key: '8331420f88b294bb1a21682ca1446704e9dc0ffb', class: "lime-banner__actions" }, h("slot", { key: 'b784df0968fa19c093c3c0db6de980d6472154d4', name: "buttons" }))))));
|
|
24
24
|
}
|
|
25
25
|
renderIcon() {
|
|
26
26
|
if (!this.icon) {
|
|
@@ -2525,7 +2525,7 @@ const List = class {
|
|
|
2525
2525
|
maxLinesSecondaryText = 1;
|
|
2526
2526
|
}
|
|
2527
2527
|
const html = this.listRenderer.render(this.items, this.config);
|
|
2528
|
-
return (h(Host, { key: '
|
|
2528
|
+
return (h(Host, { key: 'e08edeaabf6b51f940e305539aecec91517a51ca', style: {
|
|
2529
2529
|
'--maxLinesSecondaryText': `${maxLinesSecondaryText}`,
|
|
2530
2530
|
} }, html));
|
|
2531
2531
|
}
|
|
@@ -2633,6 +2633,7 @@ const Menu = class {
|
|
|
2633
2633
|
* Clicking it navigates back from a sub-menu to the root menu.
|
|
2634
2634
|
*/
|
|
2635
2635
|
this.rootItem = DEFAULT_ROOT_BREADCRUMBS_ITEM;
|
|
2636
|
+
this.shouldRestoreFocusOnClose = false;
|
|
2636
2637
|
this.renderLoader = () => {
|
|
2637
2638
|
if (!this.loadingSubItems && !this.loading) {
|
|
2638
2639
|
return;
|
|
@@ -2887,11 +2888,20 @@ const Menu = class {
|
|
|
2887
2888
|
}
|
|
2888
2889
|
}
|
|
2889
2890
|
};
|
|
2891
|
+
this.handleEscapeCapture = (event) => {
|
|
2892
|
+
if (event.key === ESCAPE && this.open) {
|
|
2893
|
+
this.shouldRestoreFocusOnClose = true;
|
|
2894
|
+
}
|
|
2895
|
+
};
|
|
2890
2896
|
this.onClose = () => {
|
|
2897
|
+
const restoreFocus = this.shouldRestoreFocusOnClose;
|
|
2898
|
+
this.shouldRestoreFocusOnClose = false;
|
|
2891
2899
|
this.cancel.emit();
|
|
2892
2900
|
this.open = false;
|
|
2893
2901
|
this.currentSubMenu = null;
|
|
2894
|
-
|
|
2902
|
+
if (restoreFocus) {
|
|
2903
|
+
setTimeout(this.focusTrigger, 0);
|
|
2904
|
+
}
|
|
2895
2905
|
};
|
|
2896
2906
|
this.onTriggerClick = (event) => {
|
|
2897
2907
|
event.stopPropagation();
|
|
@@ -3077,7 +3087,7 @@ const Menu = class {
|
|
|
3077
3087
|
const cssProperties = this.getCssProperties();
|
|
3078
3088
|
const dropdownZIndex = getComputedStyle(this.host).getPropertyValue('--dropdown-z-index');
|
|
3079
3089
|
const menuSurfaceWidth = this.getMenuSurfaceWidth(cssProperties['--menu-surface-width']);
|
|
3080
|
-
return (h("div", { key: '
|
|
3090
|
+
return (h("div", { key: 'a54987a1be3e3fcc4ceae95c7cc334411a0c474f', class: "mdc-menu-surface--anchor", onClick: this.onTriggerClick }, h("slot", { key: '1bacdb5d1387b8357d1c6f93db47369c8cf64a4f', ref: this.setTriggerRef, name: "trigger" }), this.renderNotificationBadge(), h("limel-portal", { key: 'fbc7982b1dcab9fd5172a95e7a7f0328281f3a35', visible: this.open, containerId: this.portalId, openDirection: this.openDirection, position: "absolute", containerStyle: { 'z-index': dropdownZIndex } }, h("limel-menu-surface", { key: '48b96e2e6fe815f4cc976553dfea7b26f36ea6d4', 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: {
|
|
3081
3091
|
'has-grid-layout': this.gridLayout,
|
|
3082
3092
|
} }, this.renderSearchField(), this.renderBreadcrumb(), this.renderLoader(), this.renderEmptyMessage(), this.renderMenuList()))));
|
|
3083
3093
|
}
|
|
@@ -3088,9 +3098,11 @@ const Menu = class {
|
|
|
3088
3098
|
openWatcher(newValue) {
|
|
3089
3099
|
const opened = newValue;
|
|
3090
3100
|
if (opened) {
|
|
3101
|
+
document.addEventListener('keydown', this.handleEscapeCapture, true);
|
|
3091
3102
|
this.setFocus();
|
|
3092
3103
|
}
|
|
3093
3104
|
else {
|
|
3105
|
+
document.removeEventListener('keydown', this.handleEscapeCapture, true);
|
|
3094
3106
|
this.clearSearch();
|
|
3095
3107
|
}
|
|
3096
3108
|
}
|
|
@@ -4931,7 +4943,7 @@ const Spinner = class {
|
|
|
4931
4943
|
this.limeBranded = false;
|
|
4932
4944
|
}
|
|
4933
4945
|
render() {
|
|
4934
|
-
return (h(Host, { key: '
|
|
4946
|
+
return (h(Host, { key: '15c39e3df6a446d4f809e23d2316e535bf77dc99' }, h("svg", { key: 'e88d11c66514783aa11bb01c4e902a15d0cb6dd4', viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, this.renderSpinner())));
|
|
4935
4947
|
}
|
|
4936
4948
|
renderSpinner() {
|
|
4937
4949
|
if (!this.limeBranded) {
|
|
@@ -30,7 +30,7 @@ const ButtonGroup = class {
|
|
|
30
30
|
this.setSelectedButton();
|
|
31
31
|
}
|
|
32
32
|
render() {
|
|
33
|
-
return (h(Host, { key: '
|
|
33
|
+
return (h(Host, { key: '2295d3bf146ae9d3aa44c4a4c3281ce1b72d8a63', role: "radiogroup" }, this.value.map(this.renderButton)));
|
|
34
34
|
}
|
|
35
35
|
renderButton(button) {
|
|
36
36
|
// Prefix with 'b' because html IDs cannot start with a digit,
|
|
@@ -111,7 +111,7 @@ const Checkbox = class {
|
|
|
111
111
|
this.destroyMDCInstances();
|
|
112
112
|
}
|
|
113
113
|
render() {
|
|
114
|
-
return (h(CheckboxTemplate, { key: '
|
|
114
|
+
return (h(CheckboxTemplate, { key: '2a6a0bbfb8b740dccf629adda516b83fbfcfc23c', disabled: this.disabled || this.readonly, label: this.label, readonlyLabels: this.readonlyLabels, helperText: this.helperText, helperTextId: this.helperTextId, checked: this.checked || this.indeterminate, indeterminate: this.indeterminate, required: this.required, readonly: this.readonly, invalid: this.isInvalid(), onChange: this.onChange, id: this.id }));
|
|
115
115
|
}
|
|
116
116
|
get limelCheckbox() { return getElement(this); }
|
|
117
117
|
static get watchers() { return {
|
|
@@ -556,7 +556,7 @@ const ChipSet = class {
|
|
|
556
556
|
});
|
|
557
557
|
}
|
|
558
558
|
const value = this.getValue();
|
|
559
|
-
return (h(Host, { key: '
|
|
559
|
+
return (h(Host, { key: 'cc38b12787a887fa3cf6d54412d460fffdc10d37' }, h("limel-notched-outline", { key: '363ee1953a0880a987acbaeb75ad7682c03c26ec', labelId: this.labelId, label: this.label, required: this.required, invalid: this.invalid || this.isInvalid(), disabled: this.disabled, readonly: this.readonly, hasValue: !!((_a = this.value) === null || _a === void 0 ? void 0 : _a.length), hasLeadingIcon: !!this.leadingIcon, hasFloatingLabel: this.floatLabelAbove() }, h("div", Object.assign({ key: 'c05be9685e36d5283791bf30aceb937f8da0c0a0', slot: "content" }, this.getContentProps(), { class: classes }), this.renderContent(value))), this.renderHelperLine()));
|
|
560
560
|
}
|
|
561
561
|
getContentProps() {
|
|
562
562
|
if (this.type === 'input') {
|
|
@@ -41,7 +41,7 @@ const CircularProgress = class {
|
|
|
41
41
|
};
|
|
42
42
|
const currentPercentage = (this.value * PERCENT) / this.maxValue + '%';
|
|
43
43
|
const value = Math.round(this.value * 10) / 10;
|
|
44
|
-
return (h("div", { key: '
|
|
44
|
+
return (h("div", { key: 'b2de8450baa7722c2a362a41ea97de6b694bf6ba', role: "progressbar", class: classList, "aria-label": "%", "aria-valuemin": "0", "aria-valuemax": this.maxValue, "aria-valuenow": this.value, style: { '--percentage': currentPercentage } }, this.renderPrefix(), h("span", { key: 'e3fdb555dd58a1a18227659761e9ee9171050b79', class: "value" }, abbreviate(value), h("span", { key: 'a0d25b4e71beaf4993bb78e96eb2094020b5de52', class: "suffix" }, this.suffix))));
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
CircularProgress.style = circularProgressCss();
|
|
@@ -14876,7 +14876,7 @@ const CodeEditor = class {
|
|
|
14876
14876
|
'is-dark-mode': this.isDarkMode(),
|
|
14877
14877
|
'is-light-mode': !this.isDarkMode(),
|
|
14878
14878
|
};
|
|
14879
|
-
return (h(Host, { key: '
|
|
14879
|
+
return (h(Host, { key: '648df79d8ea88a3f87028743197214b45f3708af' }, this.renderCopyButton(), h("limel-notched-outline", { key: '8ec590da7d7cfb0c313ae61ecf517f36e978a756', 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: '3fd86155267f590d9578ed673d56e1e2fe6ee7ce', slot: "content", class: classList })), this.renderHelperLine()));
|
|
14880
14880
|
}
|
|
14881
14881
|
forceRedraw() {
|
|
14882
14882
|
// eslint-disable-next-line sonarjs/pseudo-random
|