@limetech/lime-elements 39.9.3 → 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 +16 -0
- package/dist/cjs/{device-BhCO7T3N.js → device-CDZCRYph.js} +7 -2
- package/dist/cjs/{keycodes-CpIh7o5A.js → keycodes-B75-uKOK.js} +2 -0
- package/dist/cjs/lime-elements.cjs.js +1 -1
- 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 +17 -5
- 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 +2 -2
- 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-date-picker.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-flatpickr-adapter.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-picker.cjs.entry.js +1 -1
- package/dist/cjs/limel-popover_2.cjs.entry.js +5 -5
- package/dist/cjs/limel-select.cjs.entry.js +34 -10
- 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/cjs/limel-text-editor-link-menu.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- 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 +33 -9
- 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/collection/util/device.js +26 -2
- package/dist/collection/util/hotkeys.js +213 -0
- package/dist/collection/util/keycodes.js +2 -0
- package/dist/esm/device-CY72JnWG.js +26 -0
- package/dist/esm/{keycodes-CxzDbuiY.js → keycodes-rI0IeKpx.js} +2 -0
- package/dist/esm/lime-elements.js +1 -1
- 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 +17 -5
- 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 +2 -2
- package/dist/esm/limel-circular-progress.entry.js +1 -1
- package/dist/esm/limel-code-editor.entry.js +1 -1
- package/dist/esm/limel-date-picker.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-flatpickr-adapter.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-picker.entry.js +1 -1
- package/dist/esm/limel-popover_2.entry.js +5 -5
- package/dist/esm/limel-select.entry.js +34 -10
- 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/esm/limel-text-editor-link-menu.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-eaac5ad2.entry.js → p-0e1c15c8.entry.js} +1 -1
- package/dist/lime-elements/{p-db51323c.entry.js → p-1590b341.entry.js} +1 -1
- package/dist/lime-elements/{p-518fe33c.entry.js → p-1d4285b1.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-62d6a350.entry.js +23 -0
- 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-cdd5b814.entry.js → p-72a4841a.entry.js} +3 -3
- 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-CY72JnWG.js +1 -0
- package/dist/lime-elements/p-a30bf079.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-2292181d.entry.js → p-e14b7393.entry.js} +1 -1
- package/dist/lime-elements/{p-13f4d39d.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 +3 -2
- 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/dist/types/util/device.d.ts +4 -0
- package/dist/types/util/hotkeys.d.ts +23 -0
- package/package.json +1 -1
- package/dist/esm/device-SlH7g-uH.js +0 -21
- package/dist/lime-elements/p-05ff053d.entry.js +0 -1
- package/dist/lime-elements/p-767935ac.entry.js +0 -1
- package/dist/lime-elements/p-SlH7g-uH.js +0 -1
- package/dist/lime-elements/p-b2ea92be.entry.js +0 -23
- /package/dist/lime-elements/{p-CxzDbuiY.js → p-rI0IeKpx.js} +0 -0
|
@@ -20,7 +20,7 @@ import { createRandomString } from "../../util/random-string";
|
|
|
20
20
|
* from Lime Web Components to open dialogs in Lime CRM.
|
|
21
21
|
* :::
|
|
22
22
|
*
|
|
23
|
-
* @exampleComponent limel-example-dialog
|
|
23
|
+
* @exampleComponent limel-example-dialog-basic
|
|
24
24
|
* @exampleComponent limel-example-dialog-nested-close-events
|
|
25
25
|
* @exampleComponent limel-example-dialog-heading
|
|
26
26
|
* @exampleComponent limel-example-dialog-heading-actions
|
|
@@ -84,10 +84,10 @@ export class Dialog {
|
|
|
84
84
|
this.mdcDialog.destroy();
|
|
85
85
|
}
|
|
86
86
|
render() {
|
|
87
|
-
return (h("div", { key: '
|
|
87
|
+
return (h("div", { key: '748566bd65db98ee75a743a7deedc7d0c9f80a90', class: {
|
|
88
88
|
'mdc-dialog': true,
|
|
89
89
|
'full-screen': !!this.fullscreen,
|
|
90
|
-
}, role: "alertdialog", "aria-modal": "true", "aria-labelledby": 'limel-dialog-title-' + this.id, "aria-describedby": 'limel-dialog-content-' + this.id }, h("input", { key: '
|
|
90
|
+
}, role: "alertdialog", "aria-modal": "true", "aria-labelledby": 'limel-dialog-title-' + this.id, "aria-describedby": 'limel-dialog-content-' + this.id }, h("input", { key: '15d2c40108a2348f54066eab22d507c6a9b3eda9', hidden: true, id: "initialFocusEl" }), h("div", { key: 'f46ee440d02b257bde93273936ce1dfe8dc324ea', class: "mdc-dialog__container" }, h("div", { key: '9ba9919b2b880039ede217c0608d9f780d6ca770', class: "mdc-dialog__surface" }, h("input", { key: '07bb68ae4c7b8d91cb7f0fd02105738160bd9e8f', type: "button", id: "initialFocusElement" }), this.renderHeading(), h("div", { key: '1729cb0f7f442b3ee56272387de42b462926275c', class: "mdc-dialog__content", id: 'limel-dialog-content-' + this.id }, h("slot", { key: 'a5554b316a4e57700a2902ae4499f594045f267d' })), this.renderFooter())), h("div", { key: '85ecb0922ece938a5de20b804b6a2590f98032df', class: "mdc-dialog__scrim" })));
|
|
91
91
|
}
|
|
92
92
|
watchHandler(newValue, oldValue) {
|
|
93
93
|
if (oldValue === newValue) {
|
|
@@ -13,7 +13,7 @@ import { h } from "@stencil/core";
|
|
|
13
13
|
* provide the best way of _visualizing information_, potentially leading to
|
|
14
14
|
* confusion and negatively affecting the end-users' experience.
|
|
15
15
|
*
|
|
16
|
-
* @exampleComponent limel-example-dynamic-label
|
|
16
|
+
* @exampleComponent limel-example-dynamic-label-basic
|
|
17
17
|
* @exampleComponent limel-example-dynamic-label-readonly-boolean
|
|
18
18
|
*/
|
|
19
19
|
export class DynamicLabel {
|
|
@@ -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
|
|
@@ -19,6 +19,9 @@ import { SelectTemplate, triggerIconColorWarning } from "./select.template";
|
|
|
19
19
|
* @exampleComponent limel-example-select-dialog
|
|
20
20
|
*/
|
|
21
21
|
export class Select {
|
|
22
|
+
resetHasChanged() {
|
|
23
|
+
this.hasChanged = false;
|
|
24
|
+
}
|
|
22
25
|
constructor() {
|
|
23
26
|
/**
|
|
24
27
|
* Set to `true` to make the field disabled.
|
|
@@ -101,7 +104,7 @@ export class Select {
|
|
|
101
104
|
}
|
|
102
105
|
render() {
|
|
103
106
|
const dropdownZIndex = getComputedStyle(this.host).getPropertyValue('--dropdown-z-index');
|
|
104
|
-
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() }));
|
|
105
108
|
}
|
|
106
109
|
watchOpen(newValue, oldValue) {
|
|
107
110
|
if (this.checkValid) {
|
|
@@ -212,17 +215,32 @@ export class Select {
|
|
|
212
215
|
this.setTriggerFocus();
|
|
213
216
|
}
|
|
214
217
|
openMenu() {
|
|
215
|
-
|
|
218
|
+
const autoSelectOption = this.getFirstNativeAutoSelectOption();
|
|
219
|
+
if (autoSelectOption) {
|
|
216
220
|
this.hasChanged = true;
|
|
217
|
-
this.change.emit(
|
|
221
|
+
this.change.emit(autoSelectOption);
|
|
218
222
|
}
|
|
219
223
|
this.menuOpen = true;
|
|
220
224
|
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
225
|
+
getFirstNativeAutoSelectOption() {
|
|
226
|
+
if (this.hasChanged || !this.isMobileDevice || this.multiple) {
|
|
227
|
+
return undefined;
|
|
228
|
+
}
|
|
229
|
+
const options = this.getOptionsExcludingSeparators();
|
|
230
|
+
// Also treat it as "no value" when the current value doesn't match
|
|
231
|
+
// any available option (e.g. an empty option that was filtered out
|
|
232
|
+
// by a required field).
|
|
233
|
+
const currentValue = this.value;
|
|
234
|
+
const hasMatchingValue = currentValue &&
|
|
235
|
+
!Array.isArray(currentValue) &&
|
|
236
|
+
options.some((o) => o.value === currentValue.value);
|
|
237
|
+
if (hasMatchingValue) {
|
|
238
|
+
return undefined;
|
|
239
|
+
}
|
|
240
|
+
if (options.length > 0 && !options[0].value) {
|
|
241
|
+
return undefined;
|
|
242
|
+
}
|
|
243
|
+
return options.find((o) => !o.disabled && o.value);
|
|
226
244
|
}
|
|
227
245
|
closeMenu() {
|
|
228
246
|
this.menuOpen = false;
|
|
@@ -503,6 +521,12 @@ export class Select {
|
|
|
503
521
|
static get elementRef() { return "host"; }
|
|
504
522
|
static get watchers() {
|
|
505
523
|
return [{
|
|
524
|
+
"propName": "value",
|
|
525
|
+
"methodName": "resetHasChanged"
|
|
526
|
+
}, {
|
|
527
|
+
"propName": "options",
|
|
528
|
+
"methodName": "resetHasChanged"
|
|
529
|
+
}, {
|
|
506
530
|
"propName": "menuOpen",
|
|
507
531
|
"methodName": "watchOpen"
|
|
508
532
|
}];
|
|
@@ -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;
|
|
@@ -1,14 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
function getUserAgent() {
|
|
2
|
+
var _a;
|
|
3
|
+
return typeof navigator === 'undefined' ? '' : ((_a = navigator.userAgent) !== null && _a !== void 0 ? _a : '');
|
|
4
|
+
}
|
|
5
|
+
function getPlatform() {
|
|
6
|
+
var _a, _b, _c;
|
|
7
|
+
if (typeof navigator === 'undefined') {
|
|
8
|
+
return '';
|
|
9
|
+
}
|
|
10
|
+
return ((_c = (_b = (_a = navigator.userAgentData) === null || _a === void 0 ? void 0 : _a.platform) !== null && _b !== void 0 ? _b : navigator.platform) !== null && _c !== void 0 ? _c : '');
|
|
11
|
+
}
|
|
2
12
|
/**
|
|
3
13
|
*
|
|
4
14
|
*/
|
|
5
15
|
export function isIOSDevice() {
|
|
6
|
-
|
|
16
|
+
const userAgent = getUserAgent();
|
|
17
|
+
return /iPad|iPhone|iPod/i.test(userAgent) && !globalThis.MSStream;
|
|
7
18
|
}
|
|
8
19
|
/**
|
|
9
20
|
*
|
|
10
21
|
*/
|
|
11
22
|
export function isAndroidDevice() {
|
|
23
|
+
const userAgent = getUserAgent();
|
|
12
24
|
return /Android/i.test(userAgent);
|
|
13
25
|
}
|
|
14
26
|
/**
|
|
@@ -17,3 +29,15 @@ export function isAndroidDevice() {
|
|
|
17
29
|
export function isMobileDevice() {
|
|
18
30
|
return isAndroidDevice() || isIOSDevice();
|
|
19
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Detects whether the user is on an Apple device (iOS/iPadOS/macOS).
|
|
34
|
+
*/
|
|
35
|
+
export function isAppleDevice() {
|
|
36
|
+
const ua = getUserAgent();
|
|
37
|
+
const platform = getPlatform();
|
|
38
|
+
const isIPadIPhoneIPod = /iPad|iPhone|iPod/i.test(ua);
|
|
39
|
+
// Note: iPadOS 13+ reports itself as Mac, so isMacLike covers both
|
|
40
|
+
// macOS and iPadOS.
|
|
41
|
+
const isMacLike = /Mac/i.test(platform);
|
|
42
|
+
return isIPadIPhoneIPod || isMacLike;
|
|
43
|
+
}
|