@limetech/lime-elements 39.9.4 → 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 +16 -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-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 +143 -9
- 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-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 +3 -3
- 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 +5 -5
- 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/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/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 +3 -3
- package/dist/collection/components/input-field/input-field.js +1 -1
- package/dist/collection/components/linear-progress/linear-progress.js +1 -1
- package/dist/collection/components/list/list.js +2 -2
- 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 +137 -5
- 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 +4 -4
- 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 +2 -2
- package/dist/collection/components/shortcut/shortcut.js +2 -2
- package/dist/collection/components/slider/slider.js +1 -1
- package/dist/collection/components/snackbar/snackbar.js +3 -3
- package/dist/collection/components/spinner/spinner.js +2 -2
- package/dist/collection/components/split-button/split-button.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/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-badge.entry.js +2 -2
- package/dist/esm/limel-banner.entry.js +1 -1
- package/dist/esm/limel-breadcrumbs_7.entry.js +143 -9
- 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-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 +3 -3
- 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 +5 -5
- 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-f70b8487.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-57c53ed4.entry.js → p-268d2a30.entry.js} +1 -1
- package/dist/lime-elements/{p-e2f1b070.entry.js → p-2750b828.entry.js} +1 -1
- package/dist/lime-elements/{p-1a3a7374.entry.js → p-30e54f05.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-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-a2295fa6.entry.js → p-689770db.entry.js} +1 -1
- package/dist/lime-elements/{p-08d1b87a.entry.js → p-6fd84e57.entry.js} +1 -1
- package/dist/lime-elements/{p-1547b9c8.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-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-8805080c.entry.js +1 -0
- 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-b3622713.entry.js → p-8e3cc9b0.entry.js} +1 -1
- package/dist/lime-elements/{p-f59590f1.entry.js → p-9015c90c.entry.js} +2 -2
- package/dist/lime-elements/{p-287c4fb1.entry.js → p-9abfb8ba.entry.js} +1 -1
- package/dist/lime-elements/{p-da9f1fc4.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-74cd80a9.entry.js → p-a243b8e2.entry.js} +1 -1
- package/dist/lime-elements/p-b64ae828.entry.js +1 -0
- package/dist/lime-elements/{p-bb38bb3c.entry.js → p-b91b1aed.entry.js} +1 -1
- package/dist/lime-elements/{p-d6d177bc.entry.js → p-be0cbddb.entry.js} +1 -1
- 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-2af214de.entry.js → p-c9591213.entry.js} +1 -1
- package/dist/lime-elements/{p-268a695b.entry.js → p-ce20d720.entry.js} +1 -1
- package/dist/lime-elements/{p-eaac5ad2.entry.js → p-e0716b51.entry.js} +1 -1
- package/dist/lime-elements/{p-37b41bad.entry.js → p-e89dcf27.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/hotkey/format-display-token.d.ts +15 -0
- package/dist/types/components/hotkey/hotkey.d.ts +27 -0
- 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/list-item/menu-item-meta/menu-item-meta.d.ts +8 -0
- package/dist/types/components/menu/menu.d.ts +14 -1
- package/dist/types/components/menu/menu.types.d.ts +14 -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 +211 -108
- 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-3e9a1f2b.entry.js +0 -1
- 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
|
@@ -9,6 +9,7 @@ import { d as debounce } from './debounce-B67JMchz.js';
|
|
|
9
9
|
import { M as MDCTextField } from './component-wGVqvUmL.js';
|
|
10
10
|
import { _ as __extends, a as __assign, M as MDCFoundation, m as matches, d as closest, c as MDCComponent, b as __values } from './ponyfill-ChRGk668.js';
|
|
11
11
|
import { f as focusTriggerElement, z as zipObject } from './focus-trigger-element-6aEStEKM.js';
|
|
12
|
+
import { h as hotkeyFromKeyboardEvent, t as tokenizeHotkeyString, n as normalizeHotkeyString } from './hotkeys-BxrRWYts.js';
|
|
12
13
|
import { i as isFunction } from './eq-D7VMHFyO.js';
|
|
13
14
|
import { g as getCorrectPropertyName } from './util-Dx8swykg.js';
|
|
14
15
|
import { M as MDCRipple } from './component-7QB0OUSF.js';
|
|
@@ -670,7 +671,7 @@ const InputField = class {
|
|
|
670
671
|
if (ariaControls) {
|
|
671
672
|
properties['aria-controls'] = ariaControls;
|
|
672
673
|
}
|
|
673
|
-
return (h(Host, { key: '
|
|
674
|
+
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()));
|
|
674
675
|
}
|
|
675
676
|
valueWatcher(newValue) {
|
|
676
677
|
if (!this.mdcTextField) {
|
|
@@ -2525,7 +2526,7 @@ const List = class {
|
|
|
2525
2526
|
maxLinesSecondaryText = 1;
|
|
2526
2527
|
}
|
|
2527
2528
|
const html = this.listRenderer.render(this.items, this.config);
|
|
2528
|
-
return (h(Host, { key: '
|
|
2529
|
+
return (h(Host, { key: 'cbe0fda77189118ad3515dc3c4ab02c6cd9bc58a', style: {
|
|
2529
2530
|
'--maxLinesSecondaryText': `${maxLinesSecondaryText}`,
|
|
2530
2531
|
} }, html));
|
|
2531
2532
|
}
|
|
@@ -2633,6 +2634,35 @@ const Menu = class {
|
|
|
2633
2634
|
* Clicking it navigates back from a sub-menu to the root menu.
|
|
2634
2635
|
*/
|
|
2635
2636
|
this.rootItem = DEFAULT_ROOT_BREADCRUMBS_ITEM;
|
|
2637
|
+
this.shouldRestoreFocusOnClose = false;
|
|
2638
|
+
this.normalizedHotkeyCache = new Map();
|
|
2639
|
+
this.cachedSubMenuSource = null;
|
|
2640
|
+
this.cachedSubMenuItems = null;
|
|
2641
|
+
this.handleDocumentKeyDown = (event) => {
|
|
2642
|
+
if (event.key === ESCAPE && this.open) {
|
|
2643
|
+
this.shouldRestoreFocusOnClose = true;
|
|
2644
|
+
}
|
|
2645
|
+
if (!this.open || event.defaultPrevented || event.repeat) {
|
|
2646
|
+
return;
|
|
2647
|
+
}
|
|
2648
|
+
if (this.isFromTextInput(event) && !this.hasModifier(event)) {
|
|
2649
|
+
return;
|
|
2650
|
+
}
|
|
2651
|
+
const pressedHotkey = hotkeyFromKeyboardEvent(event);
|
|
2652
|
+
if (!pressedHotkey) {
|
|
2653
|
+
return;
|
|
2654
|
+
}
|
|
2655
|
+
if (this.isReservedMenuHotkey(pressedHotkey)) {
|
|
2656
|
+
return;
|
|
2657
|
+
}
|
|
2658
|
+
const matchedItem = this.findMenuItemByHotkey(pressedHotkey);
|
|
2659
|
+
if (!matchedItem) {
|
|
2660
|
+
return;
|
|
2661
|
+
}
|
|
2662
|
+
event.stopPropagation();
|
|
2663
|
+
event.preventDefault();
|
|
2664
|
+
this.handleSelect(matchedItem);
|
|
2665
|
+
};
|
|
2636
2666
|
this.renderLoader = () => {
|
|
2637
2667
|
if (!this.loadingSubItems && !this.loading) {
|
|
2638
2668
|
return;
|
|
@@ -2722,6 +2752,9 @@ const Menu = class {
|
|
|
2722
2752
|
// Will change focus to breadcrumbs (if present) or the first/last item
|
|
2723
2753
|
// in the dropdown list to enable selection with the keyboard
|
|
2724
2754
|
this.handleInputKeyDown = (event) => {
|
|
2755
|
+
if (event.defaultPrevented) {
|
|
2756
|
+
return;
|
|
2757
|
+
}
|
|
2725
2758
|
const isForwardTab = event.key === TAB &&
|
|
2726
2759
|
!event.altKey &&
|
|
2727
2760
|
!event.metaKey &&
|
|
@@ -2888,10 +2921,14 @@ const Menu = class {
|
|
|
2888
2921
|
}
|
|
2889
2922
|
};
|
|
2890
2923
|
this.onClose = () => {
|
|
2924
|
+
const restoreFocus = this.shouldRestoreFocusOnClose;
|
|
2925
|
+
this.shouldRestoreFocusOnClose = false;
|
|
2891
2926
|
this.cancel.emit();
|
|
2892
2927
|
this.open = false;
|
|
2893
2928
|
this.currentSubMenu = null;
|
|
2894
|
-
|
|
2929
|
+
if (restoreFocus) {
|
|
2930
|
+
setTimeout(this.focusTrigger, 0);
|
|
2931
|
+
}
|
|
2895
2932
|
};
|
|
2896
2933
|
this.onTriggerClick = (event) => {
|
|
2897
2934
|
event.stopPropagation();
|
|
@@ -3077,23 +3114,113 @@ const Menu = class {
|
|
|
3077
3114
|
const cssProperties = this.getCssProperties();
|
|
3078
3115
|
const dropdownZIndex = getComputedStyle(this.host).getPropertyValue('--dropdown-z-index');
|
|
3079
3116
|
const menuSurfaceWidth = this.getMenuSurfaceWidth(cssProperties['--menu-surface-width']);
|
|
3080
|
-
return (h("div", { key: '
|
|
3117
|
+
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: {
|
|
3081
3118
|
'has-grid-layout': this.gridLayout,
|
|
3082
3119
|
} }, this.renderSearchField(), this.renderBreadcrumb(), this.renderLoader(), this.renderEmptyMessage(), this.renderMenuList()))));
|
|
3083
3120
|
}
|
|
3084
3121
|
itemsWatcher() {
|
|
3085
3122
|
this.clearSearch();
|
|
3123
|
+
this.normalizedHotkeyCache.clear();
|
|
3086
3124
|
this.setFocus();
|
|
3087
3125
|
}
|
|
3126
|
+
connectedCallback() {
|
|
3127
|
+
if (this.open) {
|
|
3128
|
+
document.addEventListener('keydown', this.handleDocumentKeyDown, true);
|
|
3129
|
+
}
|
|
3130
|
+
}
|
|
3131
|
+
disconnectedCallback() {
|
|
3132
|
+
document.removeEventListener('keydown', this.handleDocumentKeyDown, true);
|
|
3133
|
+
}
|
|
3088
3134
|
openWatcher(newValue) {
|
|
3089
3135
|
const opened = newValue;
|
|
3090
3136
|
if (opened) {
|
|
3137
|
+
document.addEventListener('keydown', this.handleDocumentKeyDown, true);
|
|
3091
3138
|
this.setFocus();
|
|
3092
3139
|
}
|
|
3093
3140
|
else {
|
|
3141
|
+
document.removeEventListener('keydown', this.handleDocumentKeyDown, true);
|
|
3094
3142
|
this.clearSearch();
|
|
3095
3143
|
}
|
|
3096
3144
|
}
|
|
3145
|
+
isFromTextInput(event) {
|
|
3146
|
+
const path = typeof event.composedPath === 'function'
|
|
3147
|
+
? event.composedPath()
|
|
3148
|
+
: [];
|
|
3149
|
+
for (const node of path) {
|
|
3150
|
+
if (!(node instanceof HTMLElement)) {
|
|
3151
|
+
continue;
|
|
3152
|
+
}
|
|
3153
|
+
if (node.isContentEditable) {
|
|
3154
|
+
return true;
|
|
3155
|
+
}
|
|
3156
|
+
const tagName = node.tagName;
|
|
3157
|
+
if (tagName === 'INPUT' ||
|
|
3158
|
+
tagName === 'TEXTAREA' ||
|
|
3159
|
+
tagName === 'SELECT') {
|
|
3160
|
+
return true;
|
|
3161
|
+
}
|
|
3162
|
+
}
|
|
3163
|
+
return false;
|
|
3164
|
+
}
|
|
3165
|
+
// Only Ctrl and Meta count as "real" modifiers for the text-input bypass.
|
|
3166
|
+
// Alt/Option is intentionally excluded because it is used for typing
|
|
3167
|
+
// special characters on international keyboards and macOS (e.g. Option+e
|
|
3168
|
+
// for é, AltGr+e for € on Windows). This means alt-only hotkeys like
|
|
3169
|
+
// "alt+x" will NOT fire while a text input (e.g. the search field) is
|
|
3170
|
+
// focused — only Ctrl/Meta combos will. AltGraph is also explicitly
|
|
3171
|
+
// rejected because Windows synthesizes ctrlKey=true for AltGr keypresses.
|
|
3172
|
+
hasModifier(event) {
|
|
3173
|
+
var _a;
|
|
3174
|
+
if ((_a = event.getModifierState) === null || _a === void 0 ? void 0 : _a.call(event, 'AltGraph')) {
|
|
3175
|
+
return false;
|
|
3176
|
+
}
|
|
3177
|
+
return event.ctrlKey || event.metaKey;
|
|
3178
|
+
}
|
|
3179
|
+
isReservedMenuHotkey(hotkey) {
|
|
3180
|
+
const tokens = tokenizeHotkeyString(hotkey);
|
|
3181
|
+
const key = tokens.at(-1);
|
|
3182
|
+
if (!key) {
|
|
3183
|
+
return false;
|
|
3184
|
+
}
|
|
3185
|
+
const hasModifiers = tokens.length > 1;
|
|
3186
|
+
if (hasModifiers) {
|
|
3187
|
+
return false;
|
|
3188
|
+
}
|
|
3189
|
+
return (key === 'arrowup' ||
|
|
3190
|
+
key === 'arrowdown' ||
|
|
3191
|
+
key === 'arrowleft' ||
|
|
3192
|
+
key === 'arrowright' ||
|
|
3193
|
+
key === 'tab' ||
|
|
3194
|
+
key === 'enter' ||
|
|
3195
|
+
key === 'space' ||
|
|
3196
|
+
key === 'escape');
|
|
3197
|
+
}
|
|
3198
|
+
findMenuItemByHotkey(pressedHotkey) {
|
|
3199
|
+
for (const item of this.visibleItems) {
|
|
3200
|
+
if (!this.isMenuItem(item) || item.disabled) {
|
|
3201
|
+
continue;
|
|
3202
|
+
}
|
|
3203
|
+
const rawHotkey = item.hotkey;
|
|
3204
|
+
if (!rawHotkey) {
|
|
3205
|
+
continue;
|
|
3206
|
+
}
|
|
3207
|
+
const normalized = this.getNormalizedHotkey(rawHotkey);
|
|
3208
|
+
if (normalized && normalized === pressedHotkey) {
|
|
3209
|
+
return item;
|
|
3210
|
+
}
|
|
3211
|
+
}
|
|
3212
|
+
return null;
|
|
3213
|
+
}
|
|
3214
|
+
getNormalizedHotkey(raw) {
|
|
3215
|
+
var _a;
|
|
3216
|
+
const cacheKey = raw.trim();
|
|
3217
|
+
if (this.normalizedHotkeyCache.has(cacheKey)) {
|
|
3218
|
+
return (_a = this.normalizedHotkeyCache.get(cacheKey)) !== null && _a !== void 0 ? _a : null;
|
|
3219
|
+
}
|
|
3220
|
+
const normalized = normalizeHotkeyString(cacheKey);
|
|
3221
|
+
this.normalizedHotkeyCache.set(cacheKey, normalized);
|
|
3222
|
+
return normalized;
|
|
3223
|
+
}
|
|
3097
3224
|
getBreadcrumbsItems() {
|
|
3098
3225
|
const breadCrumbItems = [];
|
|
3099
3226
|
let currentItem = this.currentSubMenu;
|
|
@@ -3156,7 +3283,11 @@ const Menu = class {
|
|
|
3156
3283
|
return this.searchResults;
|
|
3157
3284
|
}
|
|
3158
3285
|
else if (Array.isArray((_a = this.currentSubMenu) === null || _a === void 0 ? void 0 : _a.items)) {
|
|
3159
|
-
|
|
3286
|
+
if (this.cachedSubMenuSource !== this.currentSubMenu) {
|
|
3287
|
+
this.cachedSubMenuSource = this.currentSubMenu;
|
|
3288
|
+
this.cachedSubMenuItems = this.currentSubMenu.items.map((item) => (Object.assign(Object.assign({}, item), { parentItem: this.currentSubMenu })));
|
|
3289
|
+
}
|
|
3290
|
+
return this.cachedSubMenuItems;
|
|
3160
3291
|
}
|
|
3161
3292
|
return this.items;
|
|
3162
3293
|
}
|
|
@@ -4660,12 +4791,15 @@ class MenuListRenderer {
|
|
|
4660
4791
|
const hasSubMenu = this.hasSubItems(item);
|
|
4661
4792
|
const hasMeta = hasSubMenu ||
|
|
4662
4793
|
item.badge !== undefined ||
|
|
4663
|
-
|
|
4794
|
+
!!item.hotkey ||
|
|
4795
|
+
!!item.commandText;
|
|
4664
4796
|
const primaryComponent = hasMeta
|
|
4665
4797
|
? {
|
|
4666
4798
|
name: 'limel-menu-item-meta',
|
|
4667
4799
|
props: {
|
|
4668
4800
|
commandText: item.commandText,
|
|
4801
|
+
hotkey: item.hotkey,
|
|
4802
|
+
disabled: !!item.disabled,
|
|
4669
4803
|
badge: item.badge,
|
|
4670
4804
|
showChevron: hasSubMenu,
|
|
4671
4805
|
},
|
|
@@ -4784,7 +4918,7 @@ const MenuList = class {
|
|
|
4784
4918
|
iconSize: this.iconSize,
|
|
4785
4919
|
};
|
|
4786
4920
|
const html = this.MenuListRenderer.render(this.items, this.config);
|
|
4787
|
-
return h("div", { key: '
|
|
4921
|
+
return h("div", { key: '1c044c711555d155c5559f8b787a3bbad09b7526', class: "mdc-menu mdc-menu-surface" }, html);
|
|
4788
4922
|
}
|
|
4789
4923
|
itemsChanged() {
|
|
4790
4924
|
setTimeout(() => {
|
|
@@ -4910,7 +5044,7 @@ const MenuSurface = class {
|
|
|
4910
5044
|
'mdc-elevation-transition': true,
|
|
4911
5045
|
'mdc-elevation--z4': true,
|
|
4912
5046
|
};
|
|
4913
|
-
return (h("div", { key: '
|
|
5047
|
+
return (h("div", { key: '254247a3cd25908f96e55028df567663dd4d736a', class: classList, tabindex: "-1" }, h("slot", { key: 'eb7d1042a28585242d212cf40a34018240cb0502' })));
|
|
4914
5048
|
}
|
|
4915
5049
|
get host() { return getElement(this); }
|
|
4916
5050
|
};
|
|
@@ -4931,7 +5065,7 @@ const Spinner = class {
|
|
|
4931
5065
|
this.limeBranded = false;
|
|
4932
5066
|
}
|
|
4933
5067
|
render() {
|
|
4934
|
-
return (h(Host, { key: '
|
|
5068
|
+
return (h(Host, { key: '5d7275ec64f2e3b07c7e25065d8d115de772324e' }, h("svg", { key: '41e5110dc29d6112261bea4afbd8cffde213cde0', viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, this.renderSpinner())));
|
|
4935
5069
|
}
|
|
4936
5070
|
renderSpinner() {
|
|
4937
5071
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-DBTJNfo7.js';
|
|
2
2
|
import { c as createRandomString } from './random-string-JbKhhoXs.js';
|
|
3
|
-
import { i as isIOSDevice, a as isAndroidDevice } from './device-
|
|
3
|
+
import { i as isIOSDevice, a as isAndroidDevice } from './device-B-tmXAXV.js';
|
|
4
4
|
import './sv-84mf7Xsv.js';
|
|
5
5
|
import { m as moment } from './moment-DhvPC9Jt.js';
|
|
6
6
|
import { M as MDCTextField } from './component-wGVqvUmL.js';
|
|
@@ -928,10 +928,10 @@ const Dialog = class {
|
|
|
928
928
|
this.mdcDialog.destroy();
|
|
929
929
|
}
|
|
930
930
|
render() {
|
|
931
|
-
return (h("div", { key: '
|
|
931
|
+
return (h("div", { key: '748566bd65db98ee75a743a7deedc7d0c9f80a90', class: {
|
|
932
932
|
'mdc-dialog': true,
|
|
933
933
|
'full-screen': !!this.fullscreen,
|
|
934
|
-
}, role: "alertdialog", "aria-modal": "true", "aria-labelledby": 'limel-dialog-title-' + this.id, "aria-describedby": 'limel-dialog-content-' + this.id }, h("input", { key: '
|
|
934
|
+
}, 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" })));
|
|
935
935
|
}
|
|
936
936
|
watchHandler(newValue, oldValue) {
|
|
937
937
|
if (oldValue === newValue) {
|
|
@@ -227,7 +227,7 @@ const FileDropzone = class {
|
|
|
227
227
|
};
|
|
228
228
|
}
|
|
229
229
|
render() {
|
|
230
|
-
return (h(Host, { key: '
|
|
230
|
+
return (h(Host, { key: 'a66ef9c3d9a005567749b61967a63caa4496135a', onDrop: this.handleDrop, onDragOver: this.handleDragOver, onDragLeave: this.handleDragLeave }, h("slot", { key: '7a770aa9f98365da4b83038662f04c0e9e5c20c6' }), this.renderOnDragLayout()));
|
|
231
231
|
}
|
|
232
232
|
};
|
|
233
233
|
FileDropzone.style = fileDropzoneCss();
|
|
@@ -287,7 +287,7 @@ const FileInput = class {
|
|
|
287
287
|
this.fileInput = this.element.shadowRoot.getElementById(this.fileInputId);
|
|
288
288
|
}
|
|
289
289
|
render() {
|
|
290
|
-
return (h(Host, { key: '
|
|
290
|
+
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' })));
|
|
291
291
|
}
|
|
292
292
|
handleKeyDown(event) {
|
|
293
293
|
if (event.code === 'Tab' ||
|
|
@@ -61,7 +61,7 @@ const File = class {
|
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
63
|
render() {
|
|
64
|
-
return (h(Host, { key: '
|
|
64
|
+
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()));
|
|
65
65
|
}
|
|
66
66
|
renderDragAndDropTip() {
|
|
67
67
|
if (this.value || this.disabled || this.readonly) {
|
|
@@ -3,7 +3,7 @@ import { t as translate } from './translations-DVRaJQvC.js';
|
|
|
3
3
|
import { g as getDefaultExportFromCjs } from './_commonjsHelpers-BFTU3MAI.js';
|
|
4
4
|
import './sv-84mf7Xsv.js';
|
|
5
5
|
import { m as moment } from './moment-DhvPC9Jt.js';
|
|
6
|
-
import { i as isIOSDevice, a as isAndroidDevice } from './device-
|
|
6
|
+
import { i as isIOSDevice, a as isAndroidDevice } from './device-B-tmXAXV.js';
|
|
7
7
|
import { e as eq } from './eq-D7VMHFyO.js';
|
|
8
8
|
import { b as isArrayLike$1, a as isIndex } from './isArrayLike-bWHU4ebg.js';
|
|
9
9
|
import { i as isObject$1 } from './isObject-BJQylLSL.js';
|
|
@@ -13,7 +13,7 @@ const Header = class {
|
|
|
13
13
|
this.subheadingDivider = '·';
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
|
-
return (h(Host, { key: '
|
|
16
|
+
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' }))));
|
|
17
17
|
}
|
|
18
18
|
renderIcon() {
|
|
19
19
|
var _a, _b, _c, _d, _e;
|
|
@@ -24,9 +24,9 @@ const HelpComponent = class {
|
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
render() {
|
|
27
|
-
return (h(Host, { key: '
|
|
27
|
+
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: {
|
|
28
28
|
'is-open': this.isOpen,
|
|
29
|
-
} }, this.trigger), h("limel-help-content", { key: '
|
|
29
|
+
} }, this.trigger), h("limel-help-content", { key: '10b2d483aa459403b3d922add805bf6f64ae66e3', value: this.value, readMoreLink: this.readMoreLink }))));
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
HelpComponent.style = helpCss();
|
|
@@ -30,9 +30,9 @@ const HelperLine = class {
|
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
render() {
|
|
33
|
-
return (h(Host, { key: '
|
|
33
|
+
return (h(Host, { key: '8ef6eb3b3e372e5dc61af1424a88c1c342023d13', tabIndex: -1, class: {
|
|
34
34
|
invalid: this.invalid,
|
|
35
|
-
}, style: this.hasContent() ? {} : { display: 'none' }, "aria-hidden": !this.hasContent() }, h("div", { key: '
|
|
35
|
+
}, style: this.hasContent() ? {} : { display: 'none' }, "aria-hidden": !this.hasContent() }, h("div", { key: '3b4e31c23f5964aabb67556e68bd1785c871d934' }, this.renderHelperText(), this.renderCharacterCounter())));
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
HelperLine.style = helperLineCss();
|
|
@@ -84,7 +84,7 @@ const NotchedOutline = class {
|
|
|
84
84
|
this.hasFloatingLabel = false;
|
|
85
85
|
}
|
|
86
86
|
render() {
|
|
87
|
-
return (h("div", { key: '
|
|
87
|
+
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())));
|
|
88
88
|
}
|
|
89
89
|
renderLabel() {
|
|
90
90
|
if (!this.label) {
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-DBTJNfo7.js';
|
|
2
|
+
import { t as tokenizeHotkeyString } from './hotkeys-BxrRWYts.js';
|
|
3
|
+
import { c as isAppleDevice } from './device-B-tmXAXV.js';
|
|
4
|
+
|
|
5
|
+
// Note: this function handles the same key aliases as `KEY_ALIASES` in
|
|
6
|
+
// `../../util/hotkeys.ts`, but maps them to display strings rather than
|
|
7
|
+
// canonical names. Keep both in sync when adding new aliases.
|
|
8
|
+
/**
|
|
9
|
+
* Maps a single hotkey token to its display representation.
|
|
10
|
+
*
|
|
11
|
+
* @param token - A single token from `tokenizeHotkeyString` (e.g. `"meta"`, `"k"`, `"+"`).
|
|
12
|
+
* @param isApple - Whether the current device is an Apple device.
|
|
13
|
+
* @returns The display string, whether it is a glyph (for styling),
|
|
14
|
+
* and a human-readable name for screen readers.
|
|
15
|
+
*/
|
|
16
|
+
function formatDisplayToken(token, isApple) {
|
|
17
|
+
const trimmed = (token !== null && token !== void 0 ? token : '').trim();
|
|
18
|
+
if (!trimmed) {
|
|
19
|
+
return { display: '', isGlyph: false, ariaName: '' };
|
|
20
|
+
}
|
|
21
|
+
if (trimmed === '+') {
|
|
22
|
+
return { display: '+', isGlyph: false, ariaName: 'plus' };
|
|
23
|
+
}
|
|
24
|
+
const lower = trimmed.toLowerCase();
|
|
25
|
+
switch (lower) {
|
|
26
|
+
case 'meta':
|
|
27
|
+
case 'win':
|
|
28
|
+
case 'windows': {
|
|
29
|
+
return isApple
|
|
30
|
+
? { display: '⌘', isGlyph: true, ariaName: 'Command' }
|
|
31
|
+
: { display: '⊞ Win', isGlyph: false, ariaName: 'Windows' };
|
|
32
|
+
}
|
|
33
|
+
case 'cmd':
|
|
34
|
+
case 'command': {
|
|
35
|
+
return { display: '⌘', isGlyph: true, ariaName: 'Command' };
|
|
36
|
+
}
|
|
37
|
+
case 'alt':
|
|
38
|
+
case 'option': {
|
|
39
|
+
return isApple
|
|
40
|
+
? { display: '⌥', isGlyph: true, ariaName: 'Option' }
|
|
41
|
+
: { display: 'Alt', isGlyph: false, ariaName: 'Alt' };
|
|
42
|
+
}
|
|
43
|
+
case 'shift': {
|
|
44
|
+
return { display: '⇧', isGlyph: true, ariaName: 'Shift' };
|
|
45
|
+
}
|
|
46
|
+
case 'enter':
|
|
47
|
+
case 'return': {
|
|
48
|
+
return { display: '↩', isGlyph: true, ariaName: 'Enter' };
|
|
49
|
+
}
|
|
50
|
+
case 'tab': {
|
|
51
|
+
return { display: '⇥', isGlyph: true, ariaName: 'Tab' };
|
|
52
|
+
}
|
|
53
|
+
case 'delete':
|
|
54
|
+
case 'del':
|
|
55
|
+
case 'backspace': {
|
|
56
|
+
if (isApple) {
|
|
57
|
+
return { display: '⌫', isGlyph: true, ariaName: 'Delete' };
|
|
58
|
+
}
|
|
59
|
+
return lower === 'backspace'
|
|
60
|
+
? {
|
|
61
|
+
display: 'Backspace',
|
|
62
|
+
isGlyph: false,
|
|
63
|
+
ariaName: 'Backspace',
|
|
64
|
+
}
|
|
65
|
+
: { display: 'Del', isGlyph: false, ariaName: 'Delete' };
|
|
66
|
+
}
|
|
67
|
+
case 'ctrl':
|
|
68
|
+
case 'control': {
|
|
69
|
+
return isApple
|
|
70
|
+
? { display: '⌃', isGlyph: true, ariaName: 'Control' }
|
|
71
|
+
: { display: 'Ctrl', isGlyph: false, ariaName: 'Control' };
|
|
72
|
+
}
|
|
73
|
+
case 'escape':
|
|
74
|
+
case 'esc': {
|
|
75
|
+
return { display: 'Esc', isGlyph: false, ariaName: 'Escape' };
|
|
76
|
+
}
|
|
77
|
+
case 'space':
|
|
78
|
+
case 'spacebar': {
|
|
79
|
+
return { display: '␣', isGlyph: true, ariaName: 'Space' };
|
|
80
|
+
}
|
|
81
|
+
case 'arrowup':
|
|
82
|
+
case 'up': {
|
|
83
|
+
return { display: '↑', isGlyph: true, ariaName: 'Up' };
|
|
84
|
+
}
|
|
85
|
+
case 'arrowdown':
|
|
86
|
+
case 'down': {
|
|
87
|
+
return { display: '↓', isGlyph: true, ariaName: 'Down' };
|
|
88
|
+
}
|
|
89
|
+
case 'arrowleft':
|
|
90
|
+
case 'left': {
|
|
91
|
+
return { display: '←', isGlyph: true, ariaName: 'Left' };
|
|
92
|
+
}
|
|
93
|
+
case 'arrowright':
|
|
94
|
+
case 'right': {
|
|
95
|
+
return { display: '→', isGlyph: true, ariaName: 'Right' };
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return { display: trimmed, isGlyph: false, ariaName: trimmed };
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const hotkeyCss = () => `@charset "UTF-8";kbd{font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;font-weight:600;color:rgb(var(--contrast-1100));background-color:rgb(var(--contrast-200));white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:normal;padding:0.125rem 0.5rem;margin:0 0.25rem;box-shadow:var(--button-shadow-normal), 0 0.03125rem 0.21875rem 0 rgba(var(--contrast-100), 0.5) inset;border-radius:0.125rem;border-style:solid;border-color:rgba(var(--contrast-600), 0.8);border-width:0 1px 0.125rem 1px}:host(limel-hotkey){display:flex;align-items:center;justify-content:center;gap:0.25rem}:host(limel-hotkey[disabled]:not([disabled=false])){opacity:0.5}kbd{margin:0;font-size:0.75rem;box-shadow:var(--button-shadow-pressed), 0 0.625rem 0.375px -0.5rem rgb(var(--color-black), 0.02), 0 0.025rem 0.5rem 0 rgb(var(--contrast-100)) inset}span{display:inline-block}span::first-letter{text-transform:uppercase}kbd.is-glyph span{transform:scale(1.2)}`;
|
|
102
|
+
|
|
103
|
+
const Hotkey = class {
|
|
104
|
+
constructor(hostRef) {
|
|
105
|
+
registerInstance(this, hostRef);
|
|
106
|
+
/**
|
|
107
|
+
* When `true`, the hotkey is rendered in a visually disabled state.
|
|
108
|
+
*/
|
|
109
|
+
this.disabled = false;
|
|
110
|
+
}
|
|
111
|
+
componentWillLoad() {
|
|
112
|
+
this.isApple = isAppleDevice();
|
|
113
|
+
}
|
|
114
|
+
render() {
|
|
115
|
+
const parts = tokenizeHotkeyString(this.value);
|
|
116
|
+
const displayParts = parts.map((part) => formatDisplayToken(part, this.isApple));
|
|
117
|
+
const ariaLabel = displayParts
|
|
118
|
+
.map((p) => p.ariaName)
|
|
119
|
+
.filter(Boolean)
|
|
120
|
+
.join(' ');
|
|
121
|
+
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))))));
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
Hotkey.style = hotkeyCss();
|
|
125
|
+
|
|
126
|
+
export { Hotkey as limel_hotkey };
|
|
@@ -47,7 +47,7 @@ const IconButton = class {
|
|
|
47
47
|
if (this.host.hasAttribute('tabindex')) {
|
|
48
48
|
buttonAttributes.tabindex = this.host.getAttribute('tabindex');
|
|
49
49
|
}
|
|
50
|
-
return (h(Host, { key: '
|
|
50
|
+
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))));
|
|
51
51
|
}
|
|
52
52
|
renderIcon() {
|
|
53
53
|
var _a, _b;
|
|
@@ -159,7 +159,7 @@ const Icon = class {
|
|
|
159
159
|
this.loadIcon(this.name);
|
|
160
160
|
}
|
|
161
161
|
render() {
|
|
162
|
-
return h("div", { key: '
|
|
162
|
+
return h("div", { key: '23b5f2c90c98461f65c0bcdb291f9958e00ac353', class: "container" });
|
|
163
163
|
}
|
|
164
164
|
async loadIcon(name) {
|
|
165
165
|
if (name === undefined || name === '') {
|
|
@@ -104,9 +104,9 @@ const InfoTile = class {
|
|
|
104
104
|
this.checkProps((_d = this === null || this === void 0 ? void 0 : this.link) === null || _d === void 0 ? void 0 : _d.title);
|
|
105
105
|
const link = this.disabled ? '#' : (_e = this.link) === null || _e === void 0 ? void 0 : _e.href;
|
|
106
106
|
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);
|
|
107
|
-
return (h(Host, { key: '
|
|
107
|
+
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: {
|
|
108
108
|
'is-clickable': !!((_k = this.link) === null || _k === void 0 ? void 0 : _k.href) && !this.disabled,
|
|
109
|
-
} }, this.renderIcon(), this.renderProgress(), h("slot", { key: '
|
|
109
|
+
} }, 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()));
|
|
110
110
|
}
|
|
111
111
|
checkProps(propValue) {
|
|
112
112
|
return propValue ? propValue + ' ' : '';
|
|
@@ -132,9 +132,9 @@ const ListItemComponent = class {
|
|
|
132
132
|
// also keep for `menuitem` for visual state consistency
|
|
133
133
|
ariaProps['aria-selected'] = this.selected ? 'true' : 'false';
|
|
134
134
|
}
|
|
135
|
-
return (h(Host, Object.assign({ key: '
|
|
135
|
+
return (h(Host, Object.assign({ key: '4f769d4dc9bcf065f0891ae394efb8f2cb4e3cbe', role: this.getHostRole(), class: {
|
|
136
136
|
'has-primary-component': !!((_a = this.primaryComponent) === null || _a === void 0 ? void 0 : _a.name),
|
|
137
|
-
} }, ariaProps), this.renderRadioButton(), this.renderCheckbox(), this.renderIcon(), this.renderImage(), this.renderPrimaryComponent(), h("div", { key: '
|
|
137
|
+
} }, 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)));
|
|
138
138
|
}
|
|
139
139
|
/**
|
|
140
140
|
* Returns a stable reference for the provided actions array to avoid
|
|
@@ -333,7 +333,7 @@ const Markdown = class {
|
|
|
333
333
|
this.cleanupImageIntersectionObserver();
|
|
334
334
|
}
|
|
335
335
|
render() {
|
|
336
|
-
return (h(Host, { key: '
|
|
336
|
+
return (h(Host, { key: 'd3c5e71466ad7fa2723a0a44bc6ba6742e597ca1' }, h("div", { key: 'ff45056e1a3ad465bdea9026b0c9674d911607a2', id: "markdown", ref: (el) => (this.rootElement = el) })));
|
|
337
337
|
}
|
|
338
338
|
setupImageIntersectionObserver() {
|
|
339
339
|
if (this.lazyLoadImages) {
|