@tylertech/forge-ai 0.1.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/LICENSE +202 -0
- package/README.md +3 -0
- package/custom-elements.json +4963 -0
- package/dist/ai-actions-toolbar/ai-actions-toolbar.d.ts +25 -0
- package/dist/ai-actions-toolbar/ai-actions-toolbar.mjs +74 -0
- package/dist/ai-actions-toolbar/ai-actions-toolbar.scss.mjs +4 -0
- package/dist/ai-actions-toolbar/index.d.ts +1 -0
- package/dist/ai-actions-toolbar/index.mjs +5 -0
- package/dist/ai-artifact/ai-artifact.d.ts +20 -0
- package/dist/ai-artifact/ai-artifact.mjs +39 -0
- package/dist/ai-artifact/ai-artifact.scss.mjs +4 -0
- package/dist/ai-artifact/index.d.ts +1 -0
- package/dist/ai-artifact/index.mjs +5 -0
- package/dist/ai-button/ai-button.d.ts +21 -0
- package/dist/ai-button/ai-button.mjs +67 -0
- package/dist/ai-button/ai-button.scss.mjs +4 -0
- package/dist/ai-button/index.d.ts +1 -0
- package/dist/ai-button/index.mjs +5 -0
- package/dist/ai-chain-of-thought/ai-chain-of-thought.d.ts +17 -0
- package/dist/ai-chain-of-thought/ai-chain-of-thought.mjs +45 -0
- package/dist/ai-chain-of-thought/ai-chain-of-thought.scss.mjs +4 -0
- package/dist/ai-chain-of-thought/index.d.ts +5 -0
- package/dist/ai-chain-of-thought/index.mjs +17 -0
- package/dist/ai-chain-of-thought/thought-base/index.d.ts +1 -0
- package/dist/ai-chain-of-thought/thought-base/index.mjs +5 -0
- package/dist/ai-chain-of-thought/thought-base/thought-base.d.ts +20 -0
- package/dist/ai-chain-of-thought/thought-base/thought-base.mjs +43 -0
- package/dist/ai-chain-of-thought/thought-base/thought-base.scss.mjs +4 -0
- package/dist/ai-chain-of-thought/thought-detail/index.d.ts +1 -0
- package/dist/ai-chain-of-thought/thought-detail/index.mjs +5 -0
- package/dist/ai-chain-of-thought/thought-detail/thought-detail.d.ts +14 -0
- package/dist/ai-chain-of-thought/thought-detail/thought-detail.mjs +34 -0
- package/dist/ai-chain-of-thought/thought-detail/thought-detail.scss.mjs +4 -0
- package/dist/ai-chain-of-thought/thought-image/index.d.ts +1 -0
- package/dist/ai-chain-of-thought/thought-image/index.mjs +5 -0
- package/dist/ai-chain-of-thought/thought-image/thought-image.d.ts +16 -0
- package/dist/ai-chain-of-thought/thought-image/thought-image.mjs +43 -0
- package/dist/ai-chain-of-thought/thought-image/thought-image.scss.mjs +4 -0
- package/dist/ai-chain-of-thought/thought-search-result/index.d.ts +1 -0
- package/dist/ai-chain-of-thought/thought-search-result/index.mjs +5 -0
- package/dist/ai-chain-of-thought/thought-search-result/thought-search-result.d.ts +22 -0
- package/dist/ai-chain-of-thought/thought-search-result/thought-search-result.mjs +62 -0
- package/dist/ai-chain-of-thought/thought-search-result/thought-search-result.scss.mjs +4 -0
- package/dist/ai-chat-header/ai-chat-header.d.ts +54 -0
- package/dist/ai-chat-header/ai-chat-header.mjs +198 -0
- package/dist/ai-chat-header/ai-chat-header.scss.mjs +4 -0
- package/dist/ai-chat-header/index.d.ts +1 -0
- package/dist/ai-chat-header/index.mjs +5 -0
- package/dist/ai-chat-interface/ai-chat-interface.d.ts +38 -0
- package/dist/ai-chat-interface/ai-chat-interface.mjs +117 -0
- package/dist/ai-chat-interface/ai-chat-interface.scss.mjs +4 -0
- package/dist/ai-chat-interface/index.d.ts +1 -0
- package/dist/ai-chat-interface/index.mjs +5 -0
- package/dist/ai-dialog/ai-dialog.d.ts +56 -0
- package/dist/ai-dialog/ai-dialog.mjs +270 -0
- package/dist/ai-dialog/ai-dialog.scss.mjs +4 -0
- package/dist/ai-dialog/index.d.ts +1 -0
- package/dist/ai-dialog/index.mjs +5 -0
- package/dist/ai-dropdown-menu/ai-dropdown-menu-item-group.d.ts +26 -0
- package/dist/ai-dropdown-menu/ai-dropdown-menu-item-group.mjs +80 -0
- package/dist/ai-dropdown-menu/ai-dropdown-menu-item-group.scss.mjs +4 -0
- package/dist/ai-dropdown-menu/ai-dropdown-menu-item.d.ts +133 -0
- package/dist/ai-dropdown-menu/ai-dropdown-menu-item.mjs +335 -0
- package/dist/ai-dropdown-menu/ai-dropdown-menu-item.scss.mjs +4 -0
- package/dist/ai-dropdown-menu/ai-dropdown-menu-separator.d.ts +18 -0
- package/dist/ai-dropdown-menu/ai-dropdown-menu-separator.mjs +26 -0
- package/dist/ai-dropdown-menu/ai-dropdown-menu-separator.scss.mjs +4 -0
- package/dist/ai-dropdown-menu/ai-dropdown-menu.d.ts +143 -0
- package/dist/ai-dropdown-menu/ai-dropdown-menu.mjs +327 -0
- package/dist/ai-dropdown-menu/ai-dropdown-menu.scss.mjs +4 -0
- package/dist/ai-dropdown-menu/index.d.ts +4 -0
- package/dist/ai-dropdown-menu/index.mjs +10 -0
- package/dist/ai-dropdown-menu/navigation-controller.d.ts +79 -0
- package/dist/ai-dropdown-menu/navigation-controller.mjs +205 -0
- package/dist/ai-dropdown-menu/selection-manager.d.ts +145 -0
- package/dist/ai-dropdown-menu/selection-manager.mjs +183 -0
- package/dist/ai-embedded-chat/ai-embedded-chat.d.ts +47 -0
- package/dist/ai-embedded-chat/ai-embedded-chat.mjs +139 -0
- package/dist/ai-embedded-chat/ai-embedded-chat.scss.mjs +4 -0
- package/dist/ai-embedded-chat/index.d.ts +1 -0
- package/dist/ai-embedded-chat/index.mjs +5 -0
- package/dist/ai-empty-state/ai-empty-state.d.ts +19 -0
- package/dist/ai-empty-state/ai-empty-state.mjs +136 -0
- package/dist/ai-empty-state/ai-empty-state.scss.mjs +4 -0
- package/dist/ai-empty-state/index.d.ts +1 -0
- package/dist/ai-empty-state/index.mjs +5 -0
- package/dist/ai-fab/ai-fab.d.ts +23 -0
- package/dist/ai-fab/ai-fab.mjs +75 -0
- package/dist/ai-fab/ai-fab.scss.mjs +4 -0
- package/dist/ai-fab/index.d.ts +1 -0
- package/dist/ai-fab/index.mjs +5 -0
- package/dist/ai-file-picker/ai-file-picker.d.ts +77 -0
- package/dist/ai-file-picker/ai-file-picker.mjs +176 -0
- package/dist/ai-file-picker/ai-file-picker.scss.mjs +4 -0
- package/dist/ai-file-picker/index.d.ts +1 -0
- package/dist/ai-file-picker/index.mjs +4 -0
- package/dist/ai-floating-chat/ai-floating-chat.d.ts +65 -0
- package/dist/ai-floating-chat/ai-floating-chat.mjs +153 -0
- package/dist/ai-floating-chat/ai-floating-chat.scss.mjs +4 -0
- package/dist/ai-floating-chat/index.d.ts +1 -0
- package/dist/ai-floating-chat/index.mjs +5 -0
- package/dist/ai-gradient-container/ai-gradient-container.d.ts +26 -0
- package/dist/ai-gradient-container/ai-gradient-container.mjs +61 -0
- package/dist/ai-gradient-container/ai-gradient-container.scss.mjs +4 -0
- package/dist/ai-gradient-container/index.d.ts +1 -0
- package/dist/ai-gradient-container/index.mjs +5 -0
- package/dist/ai-icon/ai-icon.d.ts +22 -0
- package/dist/ai-icon/ai-icon.mjs +71 -0
- package/dist/ai-icon/ai-icon.scss.mjs +4 -0
- package/dist/ai-icon/index.d.ts +1 -0
- package/dist/ai-icon/index.mjs +5 -0
- package/dist/ai-modal/ai-modal.d.ts +49 -0
- package/dist/ai-modal/ai-modal.mjs +132 -0
- package/dist/ai-modal/ai-modal.scss.mjs +4 -0
- package/dist/ai-modal/index.d.ts +1 -0
- package/dist/ai-modal/index.mjs +4 -0
- package/dist/ai-prompt/ai-prompt.d.ts +42 -0
- package/dist/ai-prompt/ai-prompt.mjs +123 -0
- package/dist/ai-prompt/ai-prompt.scss.mjs +4 -0
- package/dist/ai-prompt/index.d.ts +1 -0
- package/dist/ai-prompt/index.mjs +5 -0
- package/dist/ai-prompt/prompt-button/index.d.ts +1 -0
- package/dist/ai-prompt/prompt-button/index.mjs +5 -0
- package/dist/ai-prompt/prompt-button/prompt-button.d.ts +16 -0
- package/dist/ai-prompt/prompt-button/prompt-button.mjs +40 -0
- package/dist/ai-prompt/prompt-button/prompt-button.scss.mjs +4 -0
- package/dist/ai-reasoning/ai-reasoning.d.ts +17 -0
- package/dist/ai-reasoning/ai-reasoning.mjs +44 -0
- package/dist/ai-reasoning/ai-reasoning.scss.mjs +4 -0
- package/dist/ai-reasoning/index.d.ts +2 -0
- package/dist/ai-reasoning/index.mjs +8 -0
- package/dist/ai-reasoning/reasoning-content/index.d.ts +1 -0
- package/dist/ai-reasoning/reasoning-content/index.mjs +5 -0
- package/dist/ai-reasoning/reasoning-content/reasoning-content.d.ts +22 -0
- package/dist/ai-reasoning/reasoning-content/reasoning-content.mjs +90 -0
- package/dist/ai-reasoning/reasoning-content/reasoning-content.scss.mjs +4 -0
- package/dist/ai-reasoning-header/ai-reasoning-header.d.ts +24 -0
- package/dist/ai-reasoning-header/ai-reasoning-header.mjs +68 -0
- package/dist/ai-reasoning-header/ai-reasoning-header.scss.mjs +4 -0
- package/dist/ai-reasoning-header/index.d.ts +1 -0
- package/dist/ai-reasoning-header/index.mjs +5 -0
- package/dist/ai-response-message/ai-response-message.d.ts +40 -0
- package/dist/ai-response-message/ai-response-message.mjs +137 -0
- package/dist/ai-response-message/ai-response-message.scss.mjs +4 -0
- package/dist/ai-response-message/index.d.ts +1 -0
- package/dist/ai-response-message/index.mjs +5 -0
- package/dist/ai-sidebar/ai-sidebar.d.ts +44 -0
- package/dist/ai-sidebar/ai-sidebar.mjs +105 -0
- package/dist/ai-sidebar/ai-sidebar.scss.mjs +4 -0
- package/dist/ai-sidebar/index.d.ts +1 -0
- package/dist/ai-sidebar/index.mjs +5 -0
- package/dist/ai-sidebar-chat/ai-sidebar-chat.d.ts +64 -0
- package/dist/ai-sidebar-chat/ai-sidebar-chat.mjs +170 -0
- package/dist/ai-sidebar-chat/ai-sidebar-chat.scss.mjs +4 -0
- package/dist/ai-sidebar-chat/index.d.ts +1 -0
- package/dist/ai-sidebar-chat/index.mjs +5 -0
- package/dist/ai-suggestions/ai-suggestions.d.ts +39 -0
- package/dist/ai-suggestions/ai-suggestions.mjs +96 -0
- package/dist/ai-suggestions/ai-suggestions.scss.mjs +4 -0
- package/dist/ai-suggestions/index.d.ts +1 -0
- package/dist/ai-suggestions/index.mjs +5 -0
- package/dist/ai-threads/ai-threads.d.ts +48 -0
- package/dist/ai-threads/ai-threads.mjs +203 -0
- package/dist/ai-threads/ai-threads.scss.mjs +4 -0
- package/dist/ai-threads/index.d.ts +1 -0
- package/dist/ai-threads/index.mjs +5 -0
- package/dist/ai-user-message/ai-user-message.d.ts +15 -0
- package/dist/ai-user-message/ai-user-message.mjs +43 -0
- package/dist/ai-user-message/ai-user-message.scss.mjs +4 -0
- package/dist/ai-user-message/index.d.ts +1 -0
- package/dist/ai-user-message/index.mjs +5 -0
- package/dist/ai-voice-input/ai-voice-input.d.ts +68 -0
- package/dist/ai-voice-input/ai-voice-input.mjs +107 -0
- package/dist/ai-voice-input/ai-voice-input.scss.mjs +4 -0
- package/dist/ai-voice-input/index.d.ts +1 -0
- package/dist/ai-voice-input/index.mjs +5 -0
- package/dist/core/drag-controller.d.ts +66 -0
- package/dist/core/drag-controller.mjs +219 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.mjs +4 -0
- package/dist/core/overlay/index.d.ts +1 -0
- package/dist/core/overlay/index.mjs +4 -0
- package/dist/core/overlay/overlay.d.ts +61 -0
- package/dist/core/overlay/overlay.mjs +142 -0
- package/dist/core/overlay/overlay.scss.mjs +4 -0
- package/dist/core/popover/index.d.ts +1 -0
- package/dist/core/popover/index.mjs +4 -0
- package/dist/core/popover/popover.d.ts +56 -0
- package/dist/core/popover/popover.mjs +71 -0
- package/dist/core/popover/popover.scss.mjs +4 -0
- package/dist/core/tooltip/index.d.ts +1 -0
- package/dist/core/tooltip/index.mjs +4 -0
- package/dist/core/tooltip/tooltip.d.ts +91 -0
- package/dist/core/tooltip/tooltip.mjs +243 -0
- package/dist/core/tooltip/tooltip.scss.mjs +4 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.mjs +98 -0
- package/dist/utils.d.ts +14 -0
- package/dist/utils.mjs +22 -0
- package/package.json +122 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from 'lit';
|
|
2
|
+
declare global {
|
|
3
|
+
interface HTMLElementTagNameMap {
|
|
4
|
+
'forge-ai-dropdown-menu-item-group': ForgeAiDropdownMenuItemGroupComponent;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* @summary A group component for organizing items within ai-dropdown-menu.
|
|
9
|
+
*
|
|
10
|
+
* @description
|
|
11
|
+
* This component groups related dropdown menu items together with an optional label.
|
|
12
|
+
* It provides semantic structure and visual organization for dropdown menu content.
|
|
13
|
+
*
|
|
14
|
+
* @since 1.2.0
|
|
15
|
+
*
|
|
16
|
+
* @slot - The default slot for dropdown menu items.
|
|
17
|
+
* @slot label - The label slot for the group heading text.
|
|
18
|
+
*/
|
|
19
|
+
export declare class ForgeAiDropdownMenuItemGroupComponent extends LitElement {
|
|
20
|
+
#private;
|
|
21
|
+
static styles: import('lit').CSSResult;
|
|
22
|
+
private _labelSlottedNodes;
|
|
23
|
+
private _groupId;
|
|
24
|
+
private get _hasLabel();
|
|
25
|
+
render(): TemplateResult;
|
|
26
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { unsafeCSS, LitElement, html } from "lit";
|
|
2
|
+
import { queryAssignedNodes, state, customElement } from "lit/decorators.js";
|
|
3
|
+
import { when } from "lit/directives/when.js";
|
|
4
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
5
|
+
import { generateUniqueId } from "../utils.mjs";
|
|
6
|
+
import styles from "./ai-dropdown-menu-item-group.scss.mjs";
|
|
7
|
+
import "./ai-dropdown-menu-separator.mjs";
|
|
8
|
+
var __defProp = Object.defineProperty;
|
|
9
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
10
|
+
var __typeError = (msg) => {
|
|
11
|
+
throw TypeError(msg);
|
|
12
|
+
};
|
|
13
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
14
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
15
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
16
|
+
if (decorator = decorators[i])
|
|
17
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
18
|
+
if (kind && result) __defProp(target, key, result);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
22
|
+
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
23
|
+
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
24
|
+
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
25
|
+
var _labelSlot, _contentSlot, _ForgeAiDropdownMenuItemGroupComponent_instances, conditionalLabel_get, handleSlotChange_fn;
|
|
26
|
+
let ForgeAiDropdownMenuItemGroupComponent = class extends LitElement {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(...arguments);
|
|
29
|
+
__privateAdd(this, _ForgeAiDropdownMenuItemGroupComponent_instances);
|
|
30
|
+
this._groupId = generateUniqueId("group");
|
|
31
|
+
__privateAdd(this, _labelSlot, html`<slot name="label"></slot>`);
|
|
32
|
+
__privateAdd(this, _contentSlot, html`<slot></slot>`);
|
|
33
|
+
}
|
|
34
|
+
get _hasLabel() {
|
|
35
|
+
return this._labelSlottedNodes.length > 0;
|
|
36
|
+
}
|
|
37
|
+
render() {
|
|
38
|
+
return html`
|
|
39
|
+
<forge-ai-dropdown-menu-separator></forge-ai-dropdown-menu-separator>
|
|
40
|
+
<div
|
|
41
|
+
class="ai-dropdown-menu-item-group"
|
|
42
|
+
role="${ifDefined(this._hasLabel ? "group" : void 0)}"
|
|
43
|
+
aria-labelledby="${ifDefined(this._hasLabel ? `${this._groupId}-label` : void 0)}">
|
|
44
|
+
${__privateGet(this, _ForgeAiDropdownMenuItemGroupComponent_instances, conditionalLabel_get)}
|
|
45
|
+
<div class="ai-dropdown-menu-item-group__content" @slotchange=${__privateMethod(this, _ForgeAiDropdownMenuItemGroupComponent_instances, handleSlotChange_fn)}>
|
|
46
|
+
${__privateGet(this, _contentSlot)}
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
`;
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
_labelSlot = /* @__PURE__ */ new WeakMap();
|
|
53
|
+
_contentSlot = /* @__PURE__ */ new WeakMap();
|
|
54
|
+
_ForgeAiDropdownMenuItemGroupComponent_instances = /* @__PURE__ */ new WeakSet();
|
|
55
|
+
conditionalLabel_get = function() {
|
|
56
|
+
return when(
|
|
57
|
+
this._hasLabel,
|
|
58
|
+
() => html`<div class="ai-dropdown-menu-item-group__label" id="${this._groupId}-label">${__privateGet(this, _labelSlot)}</div>`,
|
|
59
|
+
() => __privateGet(this, _labelSlot)
|
|
60
|
+
);
|
|
61
|
+
};
|
|
62
|
+
handleSlotChange_fn = function(evt) {
|
|
63
|
+
const slotName = evt.target.name;
|
|
64
|
+
if (slotName === "label") {
|
|
65
|
+
this.requestUpdate();
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
ForgeAiDropdownMenuItemGroupComponent.styles = unsafeCSS(styles);
|
|
69
|
+
__decorateClass([
|
|
70
|
+
queryAssignedNodes({ slot: "label", flatten: true })
|
|
71
|
+
], ForgeAiDropdownMenuItemGroupComponent.prototype, "_labelSlottedNodes", 2);
|
|
72
|
+
__decorateClass([
|
|
73
|
+
state()
|
|
74
|
+
], ForgeAiDropdownMenuItemGroupComponent.prototype, "_groupId", 2);
|
|
75
|
+
ForgeAiDropdownMenuItemGroupComponent = __decorateClass([
|
|
76
|
+
customElement("forge-ai-dropdown-menu-item-group")
|
|
77
|
+
], ForgeAiDropdownMenuItemGroupComponent);
|
|
78
|
+
export {
|
|
79
|
+
ForgeAiDropdownMenuItemGroupComponent
|
|
80
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const styles = '/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/* prettier-ignore */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n.ai-dropdown-menu-item-group {\n display: block;\n margin-block: var(--forge-spacing-xsmall, 8px);\n}\n\n::slotted([slot=label]) {\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased;\n font-family: var(--forge-typography-overline-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));\n font-size: var(--forge-typography-overline-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-overline-font-size-scale, 0.75)));\n font-weight: var(--forge-typography-overline-font-weight, 500);\n line-height: var(--forge-typography-overline-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-overline-line-height-scale, 2)));\n letter-spacing: var(--forge-typography-overline-letter-spacing, 0.1666666667em);\n text-transform: var(--forge-typography-overline-text-transform, uppercase);\n text-decoration: var(--forge-typography-overline-text-decoration, inherit);\n margin-inline: var(--forge-spacing-small, 12px);\n color: var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6));\n}\n\n.ai-dropdown-menu-item-group__content {\n display: block;\n}';
|
|
2
|
+
export {
|
|
3
|
+
styles as default
|
|
4
|
+
};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from 'lit';
|
|
2
|
+
import { DropdownMenuSelectionMode } from './selection-manager.js';
|
|
3
|
+
declare global {
|
|
4
|
+
interface HTMLElementTagNameMap {
|
|
5
|
+
'forge-ai-dropdown-menu-item': ForgeAiDropdownMenuItemComponent;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* @summary An item component for use within ai-dropdown-menu with submenu support.
|
|
10
|
+
*
|
|
11
|
+
* @description
|
|
12
|
+
* This component represents an individual item within a dropdown menu and supports
|
|
13
|
+
* advanced features including submenus, configurable selection states, and
|
|
14
|
+
* accessibility-compliant interactions.
|
|
15
|
+
*
|
|
16
|
+
* ## Features
|
|
17
|
+
* - **Selection States**: Supports none, single, and multi-selection modes
|
|
18
|
+
* - **Submenu Support**: Can contain nested dropdown menus with configurable triggers
|
|
19
|
+
* - **Accessibility**: Complete ARIA implementation with proper roles and states
|
|
20
|
+
* - **Configurable Behavior**: Customizable submenu trigger timing and behavior
|
|
21
|
+
* - **Rich Content**: Supports text, descriptions, icons, and custom content
|
|
22
|
+
*
|
|
23
|
+
* ## Submenu Configuration
|
|
24
|
+
* The component supports three submenu trigger modes:
|
|
25
|
+
* - **'hover'**: Opens on mouse hover (default)
|
|
26
|
+
* - **'click'**: Opens on click/tap
|
|
27
|
+
* - **'both'**: Opens on both hover and click
|
|
28
|
+
*
|
|
29
|
+
* @since 1.2.0
|
|
30
|
+
*
|
|
31
|
+
* @cssprop --ai-dropdown-menu-item-submenu-open-delay - Delay before opening submenu on hover.
|
|
32
|
+
* @cssprop --ai-dropdown-menu-item-submenu-close-delay - Delay before closing submenu when mouse leaves.
|
|
33
|
+
* @cssprop --ai-dropdown-menu-item-selection-icon-size - Size of selection and submenu icons.
|
|
34
|
+
*
|
|
35
|
+
* @slot - The default slot for item text content.
|
|
36
|
+
* @slot description - The description slot for additional item details.
|
|
37
|
+
* @slot start - The start icon slot.
|
|
38
|
+
* @slot end - The end icon slot.
|
|
39
|
+
* @slot submenu - The slot for nested dropdown menu components.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```html
|
|
43
|
+
* <!-- Basic menu item -->
|
|
44
|
+
* <forge-ai-dropdown-menu-item value="basic">Basic Item</forge-ai-dropdown-menu-item>
|
|
45
|
+
*
|
|
46
|
+
* <!-- Menu item with description -->
|
|
47
|
+
* <forge-ai-dropdown-menu-item value="detailed">
|
|
48
|
+
* Detailed Item
|
|
49
|
+
* <span slot="description">Additional information</span>
|
|
50
|
+
* </forge-ai-dropdown-menu-item>
|
|
51
|
+
*
|
|
52
|
+
* <!-- Menu item with submenu -->
|
|
53
|
+
* <forge-ai-dropdown-menu-item
|
|
54
|
+
* value="parent"
|
|
55
|
+
* submenu-trigger="hover"
|
|
56
|
+
* submenu-open-delay="200">
|
|
57
|
+
* Parent Item
|
|
58
|
+
* <forge-ai-dropdown-menu slot="submenu">
|
|
59
|
+
* <forge-ai-dropdown-menu-item value="child1">Child 1</forge-ai-dropdown-menu-item>
|
|
60
|
+
* <forge-ai-dropdown-menu-item value="child2">Child 2</forge-ai-dropdown-menu-item>
|
|
61
|
+
* </forge-ai-dropdown-menu>
|
|
62
|
+
* </forge-ai-dropdown-menu-item>
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
export declare class ForgeAiDropdownMenuItemComponent extends LitElement {
|
|
66
|
+
#private;
|
|
67
|
+
static styles: import('lit').CSSResult;
|
|
68
|
+
/**
|
|
69
|
+
* The value associated with this menu item.
|
|
70
|
+
*/
|
|
71
|
+
value: string;
|
|
72
|
+
/**
|
|
73
|
+
* Whether this menu item is selected.
|
|
74
|
+
*/
|
|
75
|
+
selected: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Whether this menu item is disabled.
|
|
78
|
+
*/
|
|
79
|
+
disabled: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* The selection mode for this menu item.
|
|
82
|
+
* This is typically set by the parent dropdown menu component.
|
|
83
|
+
*/
|
|
84
|
+
selectionMode: DropdownMenuSelectionMode;
|
|
85
|
+
/**
|
|
86
|
+
* The trigger behavior for submenu opening.
|
|
87
|
+
* - 'hover': Opens on mouse hover (default)
|
|
88
|
+
* - 'click': Opens on click
|
|
89
|
+
* - 'both': Opens on both hover and click
|
|
90
|
+
*/
|
|
91
|
+
submenuTrigger: 'hover' | 'click' | 'both';
|
|
92
|
+
/**
|
|
93
|
+
* The delay in milliseconds before opening a submenu on hover.
|
|
94
|
+
*/
|
|
95
|
+
submenuOpenDelay: number;
|
|
96
|
+
/**
|
|
97
|
+
* The delay in milliseconds before closing a submenu when mouse leaves.
|
|
98
|
+
*/
|
|
99
|
+
submenuCloseDelay: number;
|
|
100
|
+
private _startSlottedElements;
|
|
101
|
+
private _endSlottedElements;
|
|
102
|
+
private _descriptionSlottedNodes;
|
|
103
|
+
private _defaultSlottedNodes;
|
|
104
|
+
private _childSubmenu;
|
|
105
|
+
private _submenuOpen;
|
|
106
|
+
private _hoverTimeout;
|
|
107
|
+
private _leaveTimeout;
|
|
108
|
+
connectedCallback(): void;
|
|
109
|
+
disconnectedCallback(): void;
|
|
110
|
+
updated(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
111
|
+
private _updateSubmenuAttributes;
|
|
112
|
+
private _updateSubmenuState;
|
|
113
|
+
private _onMouseEnter;
|
|
114
|
+
private _onMouseLeave;
|
|
115
|
+
private _onItemClick;
|
|
116
|
+
private _onKeyDown;
|
|
117
|
+
private _clearAllTimeouts;
|
|
118
|
+
private _focusFirstSubmenuItem;
|
|
119
|
+
private _updateRole;
|
|
120
|
+
private get _hasStartIcon();
|
|
121
|
+
private get _hasEndIcon();
|
|
122
|
+
private get _hasDescriptionContent();
|
|
123
|
+
private get _shouldShowSelectionIcon();
|
|
124
|
+
private get _shouldReserveSelectionSpace();
|
|
125
|
+
private get _hasSubmenu();
|
|
126
|
+
/**
|
|
127
|
+
* Gets the text content from the default slot (label text only).
|
|
128
|
+
*/
|
|
129
|
+
get labelText(): string;
|
|
130
|
+
private get _selectionIcon();
|
|
131
|
+
private readonly _submenuArrowIcon;
|
|
132
|
+
render(): TemplateResult;
|
|
133
|
+
}
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
import { unsafeCSS, LitElement, html } from "lit";
|
|
2
|
+
import { property, queryAssignedElements, queryAssignedNodes, state, customElement } from "lit/decorators.js";
|
|
3
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
4
|
+
import { when } from "lit/directives/when.js";
|
|
5
|
+
import styles from "./ai-dropdown-menu-item.scss.mjs";
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
8
|
+
var __typeError = (msg) => {
|
|
9
|
+
throw TypeError(msg);
|
|
10
|
+
};
|
|
11
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
12
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
13
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
14
|
+
if (decorator = decorators[i])
|
|
15
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
16
|
+
if (kind && result) __defProp(target, key, result);
|
|
17
|
+
return result;
|
|
18
|
+
};
|
|
19
|
+
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
20
|
+
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
21
|
+
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
22
|
+
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
23
|
+
var _startIconSlot, _endIconSlot, _ForgeAiDropdownMenuItemComponent_instances, selectionIconSlot_get, handleSlotChange_fn;
|
|
24
|
+
let ForgeAiDropdownMenuItemComponent = class extends LitElement {
|
|
25
|
+
constructor() {
|
|
26
|
+
super(...arguments);
|
|
27
|
+
__privateAdd(this, _ForgeAiDropdownMenuItemComponent_instances);
|
|
28
|
+
this.value = "";
|
|
29
|
+
this.selected = false;
|
|
30
|
+
this.disabled = false;
|
|
31
|
+
this.selectionMode = "none";
|
|
32
|
+
this.submenuTrigger = "hover";
|
|
33
|
+
this.submenuOpenDelay = 150;
|
|
34
|
+
this.submenuCloseDelay = 300;
|
|
35
|
+
this._submenuOpen = false;
|
|
36
|
+
this._hoverTimeout = null;
|
|
37
|
+
this._leaveTimeout = null;
|
|
38
|
+
this._onMouseEnter = () => {
|
|
39
|
+
if (this._hasSubmenu && !this.disabled && (this.submenuTrigger === "hover" || this.submenuTrigger === "both")) {
|
|
40
|
+
this._clearAllTimeouts();
|
|
41
|
+
this._hoverTimeout = window.setTimeout(() => {
|
|
42
|
+
this._submenuOpen = true;
|
|
43
|
+
}, this.submenuOpenDelay);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
this._onMouseLeave = () => {
|
|
47
|
+
if (this._hasSubmenu && (this.submenuTrigger === "hover" || this.submenuTrigger === "both")) {
|
|
48
|
+
this._clearAllTimeouts();
|
|
49
|
+
this._leaveTimeout = window.setTimeout(() => {
|
|
50
|
+
this._submenuOpen = false;
|
|
51
|
+
}, this.submenuCloseDelay);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
this._onItemClick = (event) => {
|
|
55
|
+
if (this.disabled) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (this._hasSubmenu && (this.submenuTrigger === "click" || this.submenuTrigger === "both")) {
|
|
59
|
+
event.stopPropagation();
|
|
60
|
+
this._clearAllTimeouts();
|
|
61
|
+
this._submenuOpen = !this._submenuOpen;
|
|
62
|
+
if (this._submenuOpen) {
|
|
63
|
+
this._focusFirstSubmenuItem();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
this._onKeyDown = (event) => {
|
|
68
|
+
if (this.disabled) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
switch (event.key) {
|
|
72
|
+
case "ArrowRight":
|
|
73
|
+
if (this._hasSubmenu) {
|
|
74
|
+
event.preventDefault();
|
|
75
|
+
event.stopPropagation();
|
|
76
|
+
this._clearAllTimeouts();
|
|
77
|
+
this._submenuOpen = true;
|
|
78
|
+
this._focusFirstSubmenuItem();
|
|
79
|
+
}
|
|
80
|
+
break;
|
|
81
|
+
case "ArrowLeft":
|
|
82
|
+
if (this._submenuOpen) {
|
|
83
|
+
event.preventDefault();
|
|
84
|
+
event.stopPropagation();
|
|
85
|
+
this._clearAllTimeouts();
|
|
86
|
+
this._submenuOpen = false;
|
|
87
|
+
this.focus();
|
|
88
|
+
}
|
|
89
|
+
break;
|
|
90
|
+
case "Escape":
|
|
91
|
+
if (this._submenuOpen) {
|
|
92
|
+
event.preventDefault();
|
|
93
|
+
event.stopPropagation();
|
|
94
|
+
this._clearAllTimeouts();
|
|
95
|
+
this._submenuOpen = false;
|
|
96
|
+
this.focus();
|
|
97
|
+
}
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
this._submenuArrowIcon = html`
|
|
102
|
+
<svg class="ai-dropdown-menu-item__submenu-arrow" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
103
|
+
<path d="M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z" />
|
|
104
|
+
</svg>
|
|
105
|
+
`;
|
|
106
|
+
__privateAdd(this, _startIconSlot, html`<div class="ai-dropdown-menu-item__icon"><slot name="start"></slot></div>`);
|
|
107
|
+
__privateAdd(this, _endIconSlot, html`<div class="ai-dropdown-menu-item__icon"><slot name="end"></slot></div>`);
|
|
108
|
+
}
|
|
109
|
+
connectedCallback() {
|
|
110
|
+
super.connectedCallback();
|
|
111
|
+
this.setAttribute("tabindex", "-1");
|
|
112
|
+
this._updateRole();
|
|
113
|
+
this._updateSubmenuAttributes();
|
|
114
|
+
this.addEventListener("mouseenter", this._onMouseEnter);
|
|
115
|
+
this.addEventListener("mouseleave", this._onMouseLeave);
|
|
116
|
+
this.addEventListener("keydown", this._onKeyDown);
|
|
117
|
+
this.addEventListener("click", this._onItemClick);
|
|
118
|
+
}
|
|
119
|
+
disconnectedCallback() {
|
|
120
|
+
super.disconnectedCallback();
|
|
121
|
+
this.removeEventListener("mouseenter", this._onMouseEnter);
|
|
122
|
+
this.removeEventListener("mouseleave", this._onMouseLeave);
|
|
123
|
+
this.removeEventListener("keydown", this._onKeyDown);
|
|
124
|
+
this.removeEventListener("click", this._onItemClick);
|
|
125
|
+
this._clearAllTimeouts();
|
|
126
|
+
}
|
|
127
|
+
updated(changedProperties) {
|
|
128
|
+
if (changedProperties.has("selected")) {
|
|
129
|
+
if (this.selectionMode === "single") {
|
|
130
|
+
this.setAttribute("aria-selected", this.selected.toString());
|
|
131
|
+
} else {
|
|
132
|
+
this.removeAttribute("aria-selected");
|
|
133
|
+
}
|
|
134
|
+
if (this.selectionMode === "multi") {
|
|
135
|
+
this.setAttribute("aria-checked", this.selected.toString());
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
if (changedProperties.has("disabled")) {
|
|
139
|
+
this.setAttribute("aria-disabled", this.disabled.toString());
|
|
140
|
+
}
|
|
141
|
+
if (changedProperties.has("selectionMode")) {
|
|
142
|
+
this._updateRole();
|
|
143
|
+
this._updateSubmenuAttributes();
|
|
144
|
+
if (this.selectionMode === "single") {
|
|
145
|
+
this.setAttribute("aria-selected", this.selected.toString());
|
|
146
|
+
this.removeAttribute("aria-checked");
|
|
147
|
+
} else if (this.selectionMode === "multi") {
|
|
148
|
+
this.setAttribute("aria-checked", this.selected.toString());
|
|
149
|
+
this.removeAttribute("aria-selected");
|
|
150
|
+
} else {
|
|
151
|
+
this.removeAttribute("aria-selected");
|
|
152
|
+
this.removeAttribute("aria-checked");
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
if (changedProperties.has("_submenuOpen")) {
|
|
156
|
+
this._updateSubmenuState();
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
_updateSubmenuAttributes() {
|
|
160
|
+
if (this._hasSubmenu) {
|
|
161
|
+
this.setAttribute("aria-haspopup", "menu");
|
|
162
|
+
this.setAttribute("aria-expanded", this._submenuOpen.toString());
|
|
163
|
+
} else {
|
|
164
|
+
this.removeAttribute("aria-haspopup");
|
|
165
|
+
this.removeAttribute("aria-expanded");
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
_updateSubmenuState() {
|
|
169
|
+
if (this._hasSubmenu && this._childSubmenu.length > 0) {
|
|
170
|
+
const submenu = this._childSubmenu[0];
|
|
171
|
+
submenu.open = this._submenuOpen;
|
|
172
|
+
}
|
|
173
|
+
if (this._hasSubmenu) {
|
|
174
|
+
this.setAttribute("aria-expanded", this._submenuOpen.toString());
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
_clearAllTimeouts() {
|
|
178
|
+
if (this._hoverTimeout !== null) {
|
|
179
|
+
window.clearTimeout(this._hoverTimeout);
|
|
180
|
+
this._hoverTimeout = null;
|
|
181
|
+
}
|
|
182
|
+
if (this._leaveTimeout !== null) {
|
|
183
|
+
window.clearTimeout(this._leaveTimeout);
|
|
184
|
+
this._leaveTimeout = null;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
_focusFirstSubmenuItem() {
|
|
188
|
+
if (this._childSubmenu.length > 0) {
|
|
189
|
+
const submenu = this._childSubmenu[0];
|
|
190
|
+
requestAnimationFrame(() => {
|
|
191
|
+
submenu.focusFirstItem?.();
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
_updateRole() {
|
|
196
|
+
switch (this.selectionMode) {
|
|
197
|
+
case "single":
|
|
198
|
+
this.setAttribute("role", "menuitemradio");
|
|
199
|
+
break;
|
|
200
|
+
case "multi":
|
|
201
|
+
this.setAttribute("role", "menuitemcheckbox");
|
|
202
|
+
break;
|
|
203
|
+
case "none":
|
|
204
|
+
default:
|
|
205
|
+
this.setAttribute("role", "menuitem");
|
|
206
|
+
break;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
get _hasStartIcon() {
|
|
210
|
+
return this._startSlottedElements.length > 0;
|
|
211
|
+
}
|
|
212
|
+
get _hasEndIcon() {
|
|
213
|
+
return this._endSlottedElements.length > 0;
|
|
214
|
+
}
|
|
215
|
+
get _hasDescriptionContent() {
|
|
216
|
+
return this._descriptionSlottedNodes.length > 0;
|
|
217
|
+
}
|
|
218
|
+
get _shouldShowSelectionIcon() {
|
|
219
|
+
return this.selectionMode !== "none" && this.selected;
|
|
220
|
+
}
|
|
221
|
+
get _shouldReserveSelectionSpace() {
|
|
222
|
+
return this.selectionMode !== "none";
|
|
223
|
+
}
|
|
224
|
+
get _hasSubmenu() {
|
|
225
|
+
return this._childSubmenu.length > 0;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Gets the text content from the default slot (label text only).
|
|
229
|
+
*/
|
|
230
|
+
get labelText() {
|
|
231
|
+
return this._defaultSlottedNodes.map((node) => node.textContent?.trim() || "").join(" ").trim();
|
|
232
|
+
}
|
|
233
|
+
get _selectionIcon() {
|
|
234
|
+
const iconPath = this.selectionMode === "multi" ? "M21 7 9 19l-5.5-5.5 1.41-1.41L9 16.17 19.59 5.59z" : "M12 8a4 4 0 0 0-4 4 4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0-4-4";
|
|
235
|
+
return html`
|
|
236
|
+
<svg class="ai-dropdown-menu-item__selection-svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
237
|
+
<path d="${iconPath}" />
|
|
238
|
+
</svg>
|
|
239
|
+
`;
|
|
240
|
+
}
|
|
241
|
+
render() {
|
|
242
|
+
const classes = {
|
|
243
|
+
"ai-dropdown-menu-item": true,
|
|
244
|
+
"ai-dropdown-menu-item--with-selection": this._shouldReserveSelectionSpace,
|
|
245
|
+
"ai-dropdown-menu-item--with-description": this._hasDescriptionContent,
|
|
246
|
+
"ai-dropdown-menu-item--selected": this.selected,
|
|
247
|
+
"ai-dropdown-menu-item--disabled": this.disabled,
|
|
248
|
+
"ai-dropdown-menu-item--with-submenu": this._hasSubmenu
|
|
249
|
+
};
|
|
250
|
+
return html`
|
|
251
|
+
<div class=${classMap(classes)}>
|
|
252
|
+
${when(this._shouldReserveSelectionSpace, () => __privateGet(this, _ForgeAiDropdownMenuItemComponent_instances, selectionIconSlot_get))}
|
|
253
|
+
${when(this._hasStartIcon, () => __privateGet(this, _startIconSlot))}
|
|
254
|
+
<div class="ai-dropdown-menu-item__content" @slotchange=${__privateMethod(this, _ForgeAiDropdownMenuItemComponent_instances, handleSlotChange_fn)}>
|
|
255
|
+
<span class="ai-dropdown-menu-item__text"><slot></slot></span>
|
|
256
|
+
${when(
|
|
257
|
+
this._hasDescriptionContent,
|
|
258
|
+
() => html`<span class="ai-dropdown-menu-item__description"><slot name="description"></slot></span>`,
|
|
259
|
+
() => html`<slot name="description"></slot>`
|
|
260
|
+
)}
|
|
261
|
+
</div>
|
|
262
|
+
${when(this._hasEndIcon, () => __privateGet(this, _endIconSlot))}
|
|
263
|
+
${when(
|
|
264
|
+
this._hasSubmenu,
|
|
265
|
+
() => html`<div class="ai-dropdown-menu-item__submenu-arrow-container">${this._submenuArrowIcon}</div>`
|
|
266
|
+
)}
|
|
267
|
+
</div>
|
|
268
|
+
<div class="focus-indicator"></div>
|
|
269
|
+
<slot name="submenu"></slot>
|
|
270
|
+
`;
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
_startIconSlot = /* @__PURE__ */ new WeakMap();
|
|
274
|
+
_endIconSlot = /* @__PURE__ */ new WeakMap();
|
|
275
|
+
_ForgeAiDropdownMenuItemComponent_instances = /* @__PURE__ */ new WeakSet();
|
|
276
|
+
selectionIconSlot_get = function() {
|
|
277
|
+
return html`<div class="ai-dropdown-menu-item__selection-icon">
|
|
278
|
+
${this._shouldShowSelectionIcon ? this._selectionIcon : ""}
|
|
279
|
+
</div>`;
|
|
280
|
+
};
|
|
281
|
+
handleSlotChange_fn = function(_evt) {
|
|
282
|
+
this.requestUpdate();
|
|
283
|
+
};
|
|
284
|
+
ForgeAiDropdownMenuItemComponent.styles = unsafeCSS(styles);
|
|
285
|
+
__decorateClass([
|
|
286
|
+
property()
|
|
287
|
+
], ForgeAiDropdownMenuItemComponent.prototype, "value", 2);
|
|
288
|
+
__decorateClass([
|
|
289
|
+
property({ type: Boolean, reflect: true })
|
|
290
|
+
], ForgeAiDropdownMenuItemComponent.prototype, "selected", 2);
|
|
291
|
+
__decorateClass([
|
|
292
|
+
property({ type: Boolean, reflect: true })
|
|
293
|
+
], ForgeAiDropdownMenuItemComponent.prototype, "disabled", 2);
|
|
294
|
+
__decorateClass([
|
|
295
|
+
property({ attribute: "selection-mode" })
|
|
296
|
+
], ForgeAiDropdownMenuItemComponent.prototype, "selectionMode", 2);
|
|
297
|
+
__decorateClass([
|
|
298
|
+
property({ attribute: "submenu-trigger" })
|
|
299
|
+
], ForgeAiDropdownMenuItemComponent.prototype, "submenuTrigger", 2);
|
|
300
|
+
__decorateClass([
|
|
301
|
+
property({ attribute: "submenu-open-delay", type: Number })
|
|
302
|
+
], ForgeAiDropdownMenuItemComponent.prototype, "submenuOpenDelay", 2);
|
|
303
|
+
__decorateClass([
|
|
304
|
+
property({ attribute: "submenu-close-delay", type: Number })
|
|
305
|
+
], ForgeAiDropdownMenuItemComponent.prototype, "submenuCloseDelay", 2);
|
|
306
|
+
__decorateClass([
|
|
307
|
+
queryAssignedElements({ slot: "start", flatten: true })
|
|
308
|
+
], ForgeAiDropdownMenuItemComponent.prototype, "_startSlottedElements", 2);
|
|
309
|
+
__decorateClass([
|
|
310
|
+
queryAssignedElements({ slot: "end", flatten: true })
|
|
311
|
+
], ForgeAiDropdownMenuItemComponent.prototype, "_endSlottedElements", 2);
|
|
312
|
+
__decorateClass([
|
|
313
|
+
queryAssignedNodes({ slot: "description", flatten: true })
|
|
314
|
+
], ForgeAiDropdownMenuItemComponent.prototype, "_descriptionSlottedNodes", 2);
|
|
315
|
+
__decorateClass([
|
|
316
|
+
queryAssignedNodes({ flatten: true })
|
|
317
|
+
], ForgeAiDropdownMenuItemComponent.prototype, "_defaultSlottedNodes", 2);
|
|
318
|
+
__decorateClass([
|
|
319
|
+
queryAssignedElements({ selector: "forge-ai-dropdown-menu" })
|
|
320
|
+
], ForgeAiDropdownMenuItemComponent.prototype, "_childSubmenu", 2);
|
|
321
|
+
__decorateClass([
|
|
322
|
+
state()
|
|
323
|
+
], ForgeAiDropdownMenuItemComponent.prototype, "_submenuOpen", 2);
|
|
324
|
+
__decorateClass([
|
|
325
|
+
state()
|
|
326
|
+
], ForgeAiDropdownMenuItemComponent.prototype, "_hoverTimeout", 2);
|
|
327
|
+
__decorateClass([
|
|
328
|
+
state()
|
|
329
|
+
], ForgeAiDropdownMenuItemComponent.prototype, "_leaveTimeout", 2);
|
|
330
|
+
ForgeAiDropdownMenuItemComponent = __decorateClass([
|
|
331
|
+
customElement("forge-ai-dropdown-menu-item")
|
|
332
|
+
], ForgeAiDropdownMenuItemComponent);
|
|
333
|
+
export {
|
|
334
|
+
ForgeAiDropdownMenuItemComponent
|
|
335
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const styles = '/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/* prettier-ignore */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n/**\n * @license\n * Copyright Tyler Technologies, Inc. \n * License: Apache-2.0\n */\n:host {\n display: block;\n position: relative;\n outline: none;\n --ai-dropdown-menu-item-submenu-open-delay: 150ms;\n --ai-dropdown-menu-item-submenu-close-delay: 300ms;\n --ai-dropdown-menu-item-selection-icon-size: 16px;\n}\n\n@keyframes forge-focus-indicator-outward-grow {\n from {\n outline-width: 0;\n }\n to {\n outline-width: var(--_focus-indicator-active-width);\n }\n}\n@keyframes forge-focus-indicator-outward-shrink {\n from {\n outline-width: var(--_focus-indicator-active-width);\n }\n}\n@keyframes forge-focus-indicator-inward-grow {\n from {\n border-width: 0;\n }\n to {\n border-width: var(--_focus-indicator-active-width);\n }\n}\n@keyframes forge-focus-indicator-inward-shrink {\n from {\n border-width: var(--_focus-indicator-active-width);\n }\n}\n:host(:focus) .focus-indicator {\n --_focus-indicator-display: var(--forge-focus-indicator-display, flex);\n --_focus-indicator-width: var(--forge-focus-indicator-width, var(--forge-border-medium, 2px));\n --_focus-indicator-active-width: var(--forge-focus-indicator-active-width, 6px);\n --_focus-indicator-color: var(--forge-focus-indicator-color, var(--forge-theme-primary, #3f51b5));\n --_focus-indicator-shape: var(--forge-focus-indicator-shape, calc(var(--forge-shape-extra-small, 1px) * var(--forge-shape-factor, 1)));\n --_focus-indicator-duration: var(--forge-focus-indicator-duration, var(--forge-animation-duration-long4, 600ms));\n --_focus-indicator-easing: var(--forge-focus-indicator-easing, var(--forge-animation-easing-emphasized, cubic-bezier(0.2, 0, 0, 1)));\n --_focus-indicator-shape-start-start: var(--forge-focus-indicator-shape-start-start, var(--_focus-indicator-shape));\n --_focus-indicator-shape-start-end: var(--forge-focus-indicator-shape-start-end, var(--_focus-indicator-shape));\n --_focus-indicator-shape-end-end: var(--forge-focus-indicator-shape-end-end, var(--_focus-indicator-shape));\n --_focus-indicator-shape-end-start: var(--forge-focus-indicator-shape-end-start, var(--_focus-indicator-shape));\n --_focus-indicator-outward-offset: var(--forge-focus-indicator-outward-offset, var(--forge-spacing-xxsmall, 4px));\n --_focus-indicator-inward-offset: var(--forge-focus-indicator-inward-offset, 0px);\n --_focus-indicator-offset-block: var(--forge-focus-indicator-offset-block, 0);\n --_focus-indicator-offset-inline: var(--forge-focus-indicator-offset-inline, 0);\n animation-delay: 0s, calc(var(--_focus-indicator-duration) * 0.25);\n animation-duration: calc(var(--_focus-indicator-duration) * 0.25), calc(var(--_focus-indicator-duration) * 0.75);\n animation-timing-function: var(--_focus-indicator-easing);\n box-sizing: border-box;\n color: var(--_focus-indicator-color);\n display: none;\n pointer-events: none;\n position: absolute;\n margin-block: var(--_focus-indicator-offset-block);\n margin-inline: var(--_focus-indicator-offset-inline);\n animation-name: forge-focus-indicator-inward-grow, forge-focus-indicator-inward-shrink;\n border-end-end-radius: calc(var(--_focus-indicator-shape-end-end) - var(--_focus-indicator-inward-offset));\n border-end-start-radius: calc(var(--_focus-indicator-shape-end-start) - var(--_focus-indicator-inward-offset));\n border-start-end-radius: calc(var(--_focus-indicator-shape-start-end) - var(--_focus-indicator-inward-offset));\n border-start-start-radius: calc(var(--_focus-indicator-shape-start-start) - var(--_focus-indicator-inward-offset));\n border: var(--_focus-indicator-width) solid currentColor;\n inset: var(--_focus-indicator-inward-offset);\n}\n:host(:focus) .focus-indicator::before {\n content: "";\n}\n:host(:focus) .focus-indicator {\n display: block;\n --forge-focus-indicator-shape: calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1));\n}\n\n.ai-dropdown-menu-item {\n --_list-item-background: var(--forge-list-item-background, transparent);\n --_list-item-shape: var(--forge-list-item-shape, 0);\n --_list-item-padding: var(--forge-list-item-padding, 0 var(--forge-spacing-medium, 16px));\n --_list-item-margin: var(--forge-list-item-margin, 0);\n --_list-item-height: var(--forge-list-item-height, 48px);\n --_list-item-dense-height: var(--forge-list-item-dense-height, 32px);\n --_list-item-indent: var(--forge-list-item-indent, var(--forge-spacing-xxlarge, 48px));\n --_list-item-cursor: var(--forge-list-item-cursor, pointer);\n --_list-item-gap: var(--forge-list-item-gap, var(--forge-spacing-large, 24px));\n --_list-item-text-color: var(--forge-list-item-text-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));\n --_list-item-text-font-size: var(--forge-list-item-text-font-size, var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1))));\n --_list-item-text-font-weight: var(--forge-list-item-text-font-weight, var(--forge-typography-body2-font-weight, 400));\n --_list-item-text-line-height: var(--forge-list-item-text-line-height, 1.5rem);\n --_list-item-selected-color: var(--forge-list-item-selected-color, var(--forge-theme-primary, #3f51b5));\n --_list-item-selected-background: var(--forge-list-item-selected-background, var(--_list-item-selected-color));\n --_list-item-selected-opacity: var(--forge-list-item-selected-opacity, 0.08);\n --_list-item-selected-start-color: var(--forge-list-item-selected-start-color, var(--_list-item-selected-color));\n --_list-item-selected-end-color: var(--forge-list-item-selected-end-color, var(--_list-item-selected-color));\n --_list-item-selected-text-color: var(--forge-list-item-selected-text-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));\n --_list-item-disabled-opacity: var(--forge-list-item-disabled-opacity, 0.38);\n --_list-item-disabled-cursor: var(--forge-list-item-disabled-cursor, not-allowed);\n --_list-item-one-line-height: var(--forge-list-item-one-line-height, var(--_list-item-height));\n --_list-item-two-line-height: var(--forge-list-item-two-line-height, var(--forge-list-item-height, 72px));\n --_list-item-three-line-height: var(--forge-list-item-three-line-height, var(--forge-list-item-height, 88px));\n --_list-item-dense-one-line-height: var(--forge-list-item-dense-one-line-height, var(--_list-item-dense-height));\n --_list-item-dense-two-line-height: var(--forge-list-item-dense-two-line-height, var(--forge-list-item-dense-height, 56px));\n --_list-item-dense-three-line-height: var(--forge-list-item-dense-three-line-height, var(--forge-list-item-dense-height, 72px));\n --_list-item-dense-font-size: var(--forge-list-item-dense-font-size, 0.875rem);\n --_list-item-dense-indent: var(--forge-list-item-dense-indent, var(--forge-spacing-xxlarge, 48px));\n --_list-item-dense-gap: var(--forge-list-item-dense-gap, var(--forge-spacing-xsmall, 8px));\n --_list-item-start-selected-color: var(--forge-list-item-start-selected-color, var(--_list-item-selected-color));\n --_list-item-end-selected-color: var(--forge-list-item-end-selected-color, var(--_list-item-selected-color));\n --_list-item-wrap-padding: var(--forge-list-item-wrap-padding, var(--forge-spacing-xsmall, 8px) var(--forge-spacing-medium, 16px));\n position: relative;\n display: flex;\n gap: var(--_list-item-gap);\n align-items: center;\n box-sizing: border-box;\n outline: none;\n text-decoration: none;\n border-radius: var(--_list-item-shape);\n -webkit-tap-highlight-color: transparent;\n background-color: var(--_list-item-background);\n height: var(--_list-item-height);\n min-height: var(--_list-item-height);\n padding: var(--_list-item-padding);\n margin: var(--_list-item-margin);\n --_list-item-gap: var(--_list-item-dense-gap);\n height: var(--_list-item-dense-one-line-height);\n min-height: var(--_list-item-dense-one-line-height);\n --_state-layer-display: var(--forge-state-layer-display, flex);\n --_state-layer-color: var(--forge-state-layer-color, var(--forge-theme-on-surface, #000000));\n --_state-layer-hover-color: var(--forge-state-layer-hover-color, var(--_state-layer-color));\n --_state-layer-hover-opacity: var(--forge-state-layer-hover-opacity, 0.08);\n --_state-layer-pressed-color: var(--forge-state-layer-pressed-color, var(--_state-layer-color));\n --_state-layer-pressed-opacity: var(--forge-state-layer-pressed-opacity, 0.12);\n --_state-layer-hover-duration: var(--forge-state-layer-hover-duration, 15ms);\n --_state-layer-pressed-duration: var(--forge-state-layer-pressed-duration, 105ms);\n --_state-layer-animation-duration: var(--forge-state-layer-animation-duration, 375ms);\n}\n.ai-dropdown-menu-item::before {\n opacity: 0;\n position: absolute;\n background-color: var(--_state-layer-hover-color);\n inset: 0;\n transition: opacity var(--_state-layer-hover-duration) linear, background-color var(--_state-layer-hover-duration) linear;\n --_state-layer-hover-duration: var(--forge-state-layer-hover-duration, 100ms);\n content: "";\n opacity: 0;\n border-radius: inherit;\n}\n.ai-dropdown-menu-item:hover::before {\n background-color: var(--_state-layer-hover-color);\n opacity: var(--_state-layer-hover-opacity);\n}\n.ai-dropdown-menu-item:active::before {\n opacity: var(--_state-layer-pressed-opacity);\n transition-duration: var(--_state-layer-pressed-duration);\n --_state-layer-pressed-opacity: var(--forge-state-layer-pressed-opacity, 0.18);\n}\n.ai-dropdown-menu-item {\n cursor: pointer;\n}\n.ai-dropdown-menu-item ::slotted([slot=start]),\n.ai-dropdown-menu-item ::slotted([slot=end]) {\n color: var(--_list-item-text-color);\n display: inline-flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n fill: currentColor;\n}\n.ai-dropdown-menu-item--with-selection {\n --forge-list-item-padding: 0 var(--forge-spacing-xxsmall, 4px);\n}\n.ai-dropdown-menu-item--with-description {\n height: var(--_list-item-dense-two-line-height);\n min-height: var(--_list-item-dense-two-line-height);\n}\n.ai-dropdown-menu-item--selected {\n color: var(--_list-item-selected-color);\n}\n.ai-dropdown-menu-item--selected::before {\n content: "";\n position: absolute;\n inset: 0;\n border-radius: inherit;\n opacity: var(--_list-item-selected-opacity);\n background-color: var(--_list-item-selected-background);\n pointer-events: none;\n}\n.ai-dropdown-menu-item--selected {\n --forge-state-layer-color: var(--_list-item-selected-color);\n}\n.ai-dropdown-menu-item--selected ::slotted([slot=start]),\n.ai-dropdown-menu-item--selected ::slotted([slot=end]) {\n color: var(--_list-item-selected-color);\n}\n.ai-dropdown-menu-item--disabled {\n cursor: var(--_list-item-disabled-cursor);\n opacity: var(--_list-item-disabled-opacity);\n}\n.ai-dropdown-menu-item__content {\n flex: 1;\n min-width: 0;\n}\n.ai-dropdown-menu-item__text {\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased;\n font-family: var(--forge-typography-body2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));\n letter-spacing: var(--forge-typography-body2-letter-spacing, 0.015625em);\n text-transform: var(--forge-typography-body2-text-transform, inherit);\n text-decoration: var(--forge-typography-body2-text-decoration, inherit);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n box-sizing: border-box;\n isolation: isolate;\n font-size: var(--_list-item-text-font-size);\n font-weight: var(--_list-item-text-font-weight);\n line-height: var(--_list-item-text-line-height);\n flex: 1;\n contain: layout;\n font-size: var(--_list-item-dense-font-size);\n}\n.ai-dropdown-menu-item__description {\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased;\n font-family: var(--forge-typography-body1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));\n font-size: var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 0.875)));\n font-weight: var(--forge-typography-body1-font-weight, 400);\n line-height: var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));\n letter-spacing: var(--forge-typography-body1-letter-spacing, 0.0357142857em);\n text-transform: var(--forge-typography-body1-text-transform, inherit);\n text-decoration: var(--forge-typography-body1-text-decoration, inherit);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n color: var(--_list-item-text-color);\n display: block;\n font-size: var(--_list-item-dense-font-size);\n}\n.ai-dropdown-menu-item__icon {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n.ai-dropdown-menu-item__selection-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: var(--forge-spacing-small, 12px);\n}\n.ai-dropdown-menu-item__selection-svg {\n fill: currentColor;\n width: var(--ai-dropdown-menu-item-selection-icon-size);\n height: var(--ai-dropdown-menu-item-selection-icon-size);\n}\n.ai-dropdown-menu-item__submenu-arrow {\n width: var(--ai-dropdown-menu-item-selection-icon-size);\n height: var(--ai-dropdown-menu-item-selection-icon-size);\n fill: currentColor;\n}\n.ai-dropdown-menu-item__submenu-arrow-container {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}';
|
|
2
|
+
export {
|
|
3
|
+
styles as default
|
|
4
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from 'lit';
|
|
2
|
+
declare global {
|
|
3
|
+
interface HTMLElementTagNameMap {
|
|
4
|
+
'forge-ai-dropdown-menu-separator': ForgeAiDropdownMenuSeparatorComponent;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* @summary A separator component for dividing sections within ai-dropdown-menu.
|
|
9
|
+
*
|
|
10
|
+
* @description
|
|
11
|
+
* This component renders a horizontal divider to visually separate groups of items
|
|
12
|
+
* within a dropdown menu. It uses the forge-divider styling.
|
|
13
|
+
*/
|
|
14
|
+
export declare class ForgeAiDropdownMenuSeparatorComponent extends LitElement {
|
|
15
|
+
static styles: import('lit').CSSResult;
|
|
16
|
+
connectedCallback(): void;
|
|
17
|
+
render(): TemplateResult;
|
|
18
|
+
}
|