@umbraco-ui/uui-menu-item 0.0.1 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -15
- package/custom-elements.json +67 -2
- package/lib/index.d.ts +2 -1
- package/lib/index.js +116 -46
- package/lib/uui-menu-item.element.d.ts +33 -1
- package/package.json +6 -5
- package/dist/uui-menu-item.min.js +0 -26
- package/dist/uui-menu-item.min.js.map +0 -1
- package/lib/uui-menu-item.element.js +0 -221
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# uui-menu-item
|
|
2
2
|
|
|
3
|
-

|
|
3
|
+
[](https://www.npmjs.com/package/@umbraco-ui/uui-menu-item)
|
|
4
4
|
|
|
5
5
|
Umbraco style menu-item component.
|
|
6
6
|
|
|
@@ -15,25 +15,13 @@ npm i @umbraco-ui/uui-menu-item
|
|
|
15
15
|
Import the registration of `<uui-menu-item>` via:
|
|
16
16
|
|
|
17
17
|
```javascript
|
|
18
|
-
import '@umbraco-ui/uui-menu-item
|
|
18
|
+
import '@umbraco-ui/uui-menu-item';
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
When looking to leverage the `UUIMenuItemElement` base class as a type and/or for extension purposes, do so via:
|
|
22
22
|
|
|
23
23
|
```javascript
|
|
24
|
-
import { UUIMenuItemElement } from '@umbraco-ui/uui-menu-item
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
### CDN
|
|
28
|
-
|
|
29
|
-
The component is available via CDN. This means it can be added to your application without the need of any bundler configuration. Here is how to use it with jsDelivr.
|
|
30
|
-
|
|
31
|
-
```html
|
|
32
|
-
<!-- Latest Version -->
|
|
33
|
-
<script src="https://cdn.jsdelivr.net/npm/@umbraco-ui/uui-menu-item@latest/dist/uui-menu-item.min.js"></script>
|
|
34
|
-
|
|
35
|
-
<!-- Specific version -->
|
|
36
|
-
<script src="https://cdn.jsdelivr.net/npm/@umbraco-ui/uui-menu-item@X.X.X/dist/uui-menu-item.min.js"></script>
|
|
24
|
+
import { UUIMenuItemElement } from '@umbraco-ui/uui-menu-item';
|
|
37
25
|
```
|
|
38
26
|
|
|
39
27
|
## Usage
|
package/custom-elements.json
CHANGED
|
@@ -29,9 +29,26 @@
|
|
|
29
29
|
"type": "boolean",
|
|
30
30
|
"default": "\"false\""
|
|
31
31
|
},
|
|
32
|
+
{
|
|
33
|
+
"name": "href",
|
|
34
|
+
"description": "Set an href, this will turns the label into a anchor tag.",
|
|
35
|
+
"type": "string",
|
|
36
|
+
"default": "\"undefined\""
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "target",
|
|
40
|
+
"description": "Set an anchor tag target, only used when using href.",
|
|
41
|
+
"type": "string",
|
|
42
|
+
"default": "\"undefined\""
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "select-only",
|
|
46
|
+
"description": "Enforce selection interaction and prevent all other interactions, set this when the UI is turned into Selection-Mode.",
|
|
47
|
+
"type": "boolean"
|
|
48
|
+
},
|
|
32
49
|
{
|
|
33
50
|
"name": "selectable",
|
|
34
|
-
"description": "
|
|
51
|
+
"description": "Enable the ability to select this element.",
|
|
35
52
|
"type": "boolean"
|
|
36
53
|
},
|
|
37
54
|
{
|
|
@@ -85,10 +102,30 @@
|
|
|
85
102
|
"type": "boolean",
|
|
86
103
|
"default": "\"false\""
|
|
87
104
|
},
|
|
105
|
+
{
|
|
106
|
+
"name": "href",
|
|
107
|
+
"attribute": "href",
|
|
108
|
+
"description": "Set an href, this will turns the label into a anchor tag.",
|
|
109
|
+
"type": "string",
|
|
110
|
+
"default": "\"undefined\""
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "target",
|
|
114
|
+
"attribute": "target",
|
|
115
|
+
"description": "Set an anchor tag target, only used when using href.",
|
|
116
|
+
"type": "string",
|
|
117
|
+
"default": "\"undefined\""
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"name": "selectOnly",
|
|
121
|
+
"attribute": "select-only",
|
|
122
|
+
"description": "Enforce selection interaction and prevent all other interactions, set this when the UI is turned into Selection-Mode.",
|
|
123
|
+
"type": "boolean"
|
|
124
|
+
},
|
|
88
125
|
{
|
|
89
126
|
"name": "selectable",
|
|
90
127
|
"attribute": "selectable",
|
|
91
|
-
"description": "
|
|
128
|
+
"description": "Enable the ability to select this element.",
|
|
92
129
|
"type": "boolean"
|
|
93
130
|
},
|
|
94
131
|
{
|
|
@@ -111,6 +148,34 @@
|
|
|
111
148
|
"type": "string"
|
|
112
149
|
}
|
|
113
150
|
],
|
|
151
|
+
"events": [
|
|
152
|
+
{
|
|
153
|
+
"name": "show-children",
|
|
154
|
+
"description": "fires when the expand icon is clicked to show nested menu items"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"name": "hide-children",
|
|
158
|
+
"description": "fires when the expend icon is clicked to hide nested menu items"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"name": "click-label",
|
|
162
|
+
"description": "fires when the label is clicked"
|
|
163
|
+
}
|
|
164
|
+
],
|
|
165
|
+
"slots": [
|
|
166
|
+
{
|
|
167
|
+
"name": "",
|
|
168
|
+
"description": "default slot for nested menu items"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"name": "icon",
|
|
172
|
+
"description": "icon area"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"name": "actions",
|
|
176
|
+
"description": "actions area"
|
|
177
|
+
}
|
|
178
|
+
],
|
|
114
179
|
"cssProperties": [
|
|
115
180
|
{
|
|
116
181
|
"name": "--uui-menu-item-indent",
|
package/lib/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './uui-menu-item.element';
|
|
2
|
+
export * from './UUIMenuItemEvent';
|
package/lib/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { LitElement, html, css } from 'lit';
|
|
2
|
-
import { property } from 'lit/decorators.js';
|
|
3
|
-
import { SelectableMixin, ActiveMixin, LabelMixin } from '@umbraco-ui/uui-base/lib/mixins';
|
|
4
|
-
import { UUIEvent } from '@umbraco-ui/uui-base/lib/events';
|
|
5
2
|
import { defineElement } from '@umbraco-ui/uui-base/lib/registration';
|
|
3
|
+
import { property, state } from 'lit/decorators.js';
|
|
4
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
|
+
import { SelectOnlyMixin, SelectableMixin, ActiveMixin, LabelMixin } from '@umbraco-ui/uui-base/lib/mixins';
|
|
6
|
+
import { UUIEvent } from '@umbraco-ui/uui-base/lib/events';
|
|
6
7
|
|
|
7
8
|
class UUIMenuItemEvent extends UUIEvent {
|
|
8
9
|
}
|
|
@@ -21,13 +22,22 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
21
22
|
__defProp(target, key, result);
|
|
22
23
|
return result;
|
|
23
24
|
};
|
|
24
|
-
|
|
25
|
+
let UUIMenuItemElement = class extends SelectOnlyMixin(SelectableMixin(ActiveMixin(LabelMixin("label", LitElement)))) {
|
|
25
26
|
constructor() {
|
|
26
27
|
super(...arguments);
|
|
27
28
|
this.disabled = false;
|
|
28
29
|
this.showChildren = false;
|
|
29
30
|
this.hasChildren = false;
|
|
30
31
|
this.loading = false;
|
|
32
|
+
this.iconSlotHasContent = false;
|
|
33
|
+
}
|
|
34
|
+
connectedCallback() {
|
|
35
|
+
super.connectedCallback();
|
|
36
|
+
if (!this.hasAttribute("role"))
|
|
37
|
+
this.setAttribute("role", "menu");
|
|
38
|
+
}
|
|
39
|
+
iconSlotChanged(e) {
|
|
40
|
+
this.iconSlotHasContent = e.target.assignedNodes({ flatten: true }).length > 0;
|
|
31
41
|
}
|
|
32
42
|
onCaretClicked() {
|
|
33
43
|
this.showChildren = !this.showChildren;
|
|
@@ -39,66 +49,98 @@ class UUIMenuItemElement extends SelectableMixin(ActiveMixin(LabelMixin("label",
|
|
|
39
49
|
const event = new UUIMenuItemEvent(UUIMenuItemEvent.CLICK_LABEL);
|
|
40
50
|
this.dispatchEvent(event);
|
|
41
51
|
}
|
|
52
|
+
_renderLabelInside() {
|
|
53
|
+
return html` <slot
|
|
54
|
+
name="icon"
|
|
55
|
+
id="icon"
|
|
56
|
+
style=${this.iconSlotHasContent ? "" : "display: none;"}
|
|
57
|
+
@slotchange=${this.iconSlotChanged}></slot>
|
|
58
|
+
${this.renderLabel()}`;
|
|
59
|
+
}
|
|
60
|
+
_renderLabelAsAnchor() {
|
|
61
|
+
if (this.disabled) {
|
|
62
|
+
return html` <span id="label-button">
|
|
63
|
+
${this._renderLabelInside()}
|
|
64
|
+
</span>`;
|
|
65
|
+
}
|
|
66
|
+
return html` <a
|
|
67
|
+
id="label-button"
|
|
68
|
+
href=${this.href}
|
|
69
|
+
target=${ifDefined(this.target || void 0)}
|
|
70
|
+
rel=${ifDefined(this.target === "_blank" ? "noopener" : void 0)}
|
|
71
|
+
@click=${this.onLabelClicked}
|
|
72
|
+
?disabled=${this.disabled}
|
|
73
|
+
aria-label="${this.label}">
|
|
74
|
+
${this._renderLabelInside()}
|
|
75
|
+
</a>`;
|
|
76
|
+
}
|
|
77
|
+
_renderLabelAsButton() {
|
|
78
|
+
return html` <button
|
|
79
|
+
id="label-button"
|
|
80
|
+
@click=${this.onLabelClicked}
|
|
81
|
+
?disabled=${this.disabled}
|
|
82
|
+
aria-label="${this.label}">
|
|
83
|
+
${this._renderLabelInside()}
|
|
84
|
+
</button>`;
|
|
85
|
+
}
|
|
42
86
|
render() {
|
|
43
87
|
return html`
|
|
44
88
|
<div id="menu-item" aria-label="menuitem" role="menuitem">
|
|
45
89
|
${this.hasChildren ? html`<button id="caret-button" @click=${this.onCaretClicked}>
|
|
46
|
-
<uui-
|
|
90
|
+
<uui-symbol-expand ?open=${this.showChildren}></uui-symbol-expand>
|
|
47
91
|
</button>` : ""}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
@click=${this.onLabelClicked}
|
|
51
|
-
?disabled=${this.disabled}
|
|
52
|
-
aria-label="${this.label}">
|
|
53
|
-
${this.renderLabel()}
|
|
54
|
-
</button>
|
|
92
|
+
${this.href ? this._renderLabelAsAnchor() : this._renderLabelAsButton()}
|
|
93
|
+
|
|
55
94
|
<div id="label-button-background"></div>
|
|
56
|
-
|
|
95
|
+
${this.selectOnly === false ? html`<slot id="actions-container" name="actions"></slot>` : ""}
|
|
57
96
|
${this.loading ? html`<uui-loader-bar id="loader"></uui-loader-bar>` : ""}
|
|
58
97
|
</div>
|
|
59
98
|
${this.showChildren ? html`<slot></slot>` : ""}
|
|
60
99
|
`;
|
|
61
100
|
}
|
|
62
|
-
}
|
|
101
|
+
};
|
|
63
102
|
UUIMenuItemElement.styles = [
|
|
64
103
|
css`
|
|
65
104
|
:host {
|
|
66
105
|
display: block;
|
|
67
|
-
background-color: var(--uui-interface-surface,#
|
|
106
|
+
background-color: var(--uui-interface-surface,#fefefe);
|
|
68
107
|
/** consider transparent. */
|
|
69
108
|
--uui-menu-item-child-indent: calc(var(--uui-menu-item-indent, 0) + 1);
|
|
109
|
+
|
|
110
|
+
user-select: none;
|
|
70
111
|
}
|
|
71
112
|
|
|
72
113
|
#menu-item {
|
|
73
114
|
position: relative;
|
|
74
115
|
display: flex;
|
|
75
116
|
align-items: stretch;
|
|
76
|
-
padding-left: calc(
|
|
77
|
-
var(--uui-menu-item-indent, 0) * var(--uui-size-8, 24px)
|
|
78
|
-
);
|
|
117
|
+
padding-left: calc(var(--uui-menu-item-indent, 0) * var(--uui-size-4,12px));
|
|
79
118
|
|
|
80
119
|
display: grid;
|
|
81
|
-
grid-template-columns: 24px 1fr;
|
|
120
|
+
grid-template-columns: var(--uui-size-8,24px) 1fr;
|
|
82
121
|
grid-template-rows: 1fr;
|
|
83
122
|
white-space: nowrap;
|
|
84
123
|
}
|
|
85
124
|
|
|
86
125
|
button {
|
|
87
|
-
display:
|
|
126
|
+
display: inline-flex;
|
|
127
|
+
align-items: center;
|
|
128
|
+
|
|
129
|
+
font-family: inherit;
|
|
130
|
+
font-size: inherit;
|
|
131
|
+
|
|
88
132
|
padding: 0;
|
|
89
133
|
text-align: left;
|
|
90
|
-
box-shadow: none;
|
|
91
134
|
border: none;
|
|
92
135
|
color: inherit;
|
|
93
136
|
background-color: transparent;
|
|
94
137
|
cursor: pointer;
|
|
95
|
-
z-index: 1;
|
|
96
|
-
/* padding: 0 var(--uui-size-base-unit) 0 var(--uui-size-base-unit); */
|
|
97
138
|
min-height: var(--uui-size-12,36px);
|
|
139
|
+
z-index: 1;
|
|
98
140
|
}
|
|
99
|
-
button:hover {
|
|
100
|
-
color: var(--uui-interface-contrast-hover
|
|
101
|
-
}
|
|
141
|
+
/* button:hover {
|
|
142
|
+
color: var(--uui-interface-contrast-hover);
|
|
143
|
+
} */
|
|
102
144
|
|
|
103
145
|
#label-button {
|
|
104
146
|
flex-grow: 1;
|
|
@@ -106,10 +148,22 @@ UUIMenuItemElement.styles = [
|
|
|
106
148
|
white-space: nowrap;
|
|
107
149
|
overflow: hidden;
|
|
108
150
|
text-overflow: ellipsis;
|
|
151
|
+
|
|
152
|
+
display: inline-flex;
|
|
153
|
+
align-items: center;
|
|
154
|
+
text-decoration: none;
|
|
155
|
+
color: currentColor;
|
|
156
|
+
min-height: var(--uui-size-12,36px);
|
|
157
|
+
z-index: 1;
|
|
158
|
+
}
|
|
159
|
+
span#label-button {
|
|
160
|
+
pointer-events: none; /* avoid hovering state on this. */
|
|
109
161
|
}
|
|
162
|
+
|
|
110
163
|
#caret-button + #label-button {
|
|
111
164
|
padding-left: 0;
|
|
112
165
|
}
|
|
166
|
+
|
|
113
167
|
#caret-button {
|
|
114
168
|
width: 100%;
|
|
115
169
|
height: 100%;
|
|
@@ -117,9 +171,7 @@ UUIMenuItemElement.styles = [
|
|
|
117
171
|
align-items: center;
|
|
118
172
|
justify-content: center;
|
|
119
173
|
}
|
|
120
|
-
|
|
121
|
-
background-color: var(--uui-interface-surface-hover,rgb(250, 250, 250));
|
|
122
|
-
}
|
|
174
|
+
|
|
123
175
|
#label-button-background {
|
|
124
176
|
position: absolute;
|
|
125
177
|
top: 0;
|
|
@@ -127,17 +179,16 @@ UUIMenuItemElement.styles = [
|
|
|
127
179
|
right: 0;
|
|
128
180
|
bottom: 0;
|
|
129
181
|
}
|
|
130
|
-
#label-button:hover + #label-button-background
|
|
182
|
+
#label-button:hover + #label-button-background,
|
|
183
|
+
#caret-button:hover ~ #label-button-background {
|
|
131
184
|
background-color: var(--uui-interface-surface-hover,rgb(250, 250, 250));
|
|
132
185
|
}
|
|
186
|
+
|
|
133
187
|
#actions-container {
|
|
134
188
|
opacity: 0;
|
|
135
189
|
transition: opacity 120ms;
|
|
136
190
|
grid-column-start: 3;
|
|
137
191
|
}
|
|
138
|
-
#menu-item:hover #actions-container {
|
|
139
|
-
opacity: 1;
|
|
140
|
-
}
|
|
141
192
|
|
|
142
193
|
#loader {
|
|
143
194
|
position: absolute;
|
|
@@ -145,7 +196,13 @@ UUIMenuItemElement.styles = [
|
|
|
145
196
|
bottom: 0;
|
|
146
197
|
}
|
|
147
198
|
|
|
148
|
-
|
|
199
|
+
#icon {
|
|
200
|
+
display: inline-flex;
|
|
201
|
+
font-size: 16px;
|
|
202
|
+
margin-right: var(--uui-size-2,6px);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
:host([disabled]) {
|
|
149
206
|
color: var(--uui-interface-surface-contrast-disabled);
|
|
150
207
|
}
|
|
151
208
|
:host([disabled]) #label-button-background {
|
|
@@ -155,33 +212,34 @@ UUIMenuItemElement.styles = [
|
|
|
155
212
|
background-color: var(--uui-interface-surface-disabled,rgb(228, 228, 228));
|
|
156
213
|
}
|
|
157
214
|
|
|
158
|
-
:host([active])
|
|
215
|
+
:host([active]) {
|
|
159
216
|
color: var(--uui-interface-active-contrast,#162335);
|
|
160
217
|
}
|
|
161
|
-
:host([active]) button:hover {
|
|
162
|
-
color: var(--uui-interface-active-contrast-hover,#
|
|
218
|
+
:host([active]) #label-button:hover {
|
|
219
|
+
color: var(--uui-interface-active-contrast-hover,#1b264f);
|
|
163
220
|
}
|
|
164
221
|
:host([active]) #label-button-background {
|
|
165
|
-
background-color: var(--uui-interface-active,#
|
|
222
|
+
background-color: var(--uui-interface-active,#f5c1bc);
|
|
166
223
|
}
|
|
167
224
|
:host([active]) #label-button:hover + #label-button-background {
|
|
168
|
-
background-color: var(--uui-interface-active-hover,#
|
|
225
|
+
background-color: var(--uui-interface-active-hover,#f5c1bc);
|
|
169
226
|
}
|
|
170
227
|
:host([active][disabled]) #label-button {
|
|
171
228
|
color: var(--uui-interface-active-contrast-disabled,rgb(54, 54, 54));
|
|
172
229
|
background-color: var(--uui-interface-active-disabled,rgb(219, 212, 212));
|
|
173
230
|
}
|
|
174
231
|
|
|
175
|
-
:host([selected])
|
|
176
|
-
color: var(--uui-interface-select-contrast,#
|
|
232
|
+
:host([selected]) {
|
|
233
|
+
color: var(--uui-interface-select-contrast,#fefefe);
|
|
177
234
|
}
|
|
178
|
-
:host([selected]) button:hover {
|
|
179
|
-
color: var(--uui-interface-select-contrast-hover,#
|
|
235
|
+
:host([selected]) #label-button:hover {
|
|
236
|
+
color: var(--uui-interface-select-contrast-hover,#fefefe);
|
|
180
237
|
}
|
|
181
238
|
:host([selected]) #label-button-background {
|
|
182
|
-
background-color: var(--uui-interface-select,#
|
|
239
|
+
background-color: var(--uui-interface-select,#3544b1);
|
|
183
240
|
}
|
|
184
|
-
:host([selected]) #label-button:hover + #label-button-background
|
|
241
|
+
:host([selected]) #label-button:hover + #label-button-background,
|
|
242
|
+
:host([selected]) #caret-button:hover ~ #label-button-background {
|
|
185
243
|
background-color: var(--uui-interface-select-hover,rgb(70, 86, 200));
|
|
186
244
|
}
|
|
187
245
|
:host([selected][disabled]) #label-button {
|
|
@@ -218,5 +276,17 @@ __decorateClass([
|
|
|
218
276
|
__decorateClass([
|
|
219
277
|
property({ type: Boolean, attribute: "loading" })
|
|
220
278
|
], UUIMenuItemElement.prototype, "loading", 2);
|
|
279
|
+
__decorateClass([
|
|
280
|
+
property({ type: String })
|
|
281
|
+
], UUIMenuItemElement.prototype, "href", 2);
|
|
282
|
+
__decorateClass([
|
|
283
|
+
property({ type: String })
|
|
284
|
+
], UUIMenuItemElement.prototype, "target", 2);
|
|
285
|
+
__decorateClass([
|
|
286
|
+
state()
|
|
287
|
+
], UUIMenuItemElement.prototype, "iconSlotHasContent", 2);
|
|
288
|
+
UUIMenuItemElement = __decorateClass([
|
|
289
|
+
defineElement("uui-menu-item")
|
|
290
|
+
], UUIMenuItemElement);
|
|
221
291
|
|
|
222
|
-
|
|
292
|
+
export { UUIMenuItemElement, UUIMenuItemEvent };
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
declare const UUIMenuItemElement_base: (new (...args: any[]) => import("@umbraco-ui/uui-base/lib/mixins").SelectableMixinInterface) & (new (...args: any[]) => import("@umbraco-ui/uui-base/lib/mixins").ActiveMixinInterface) & (new (...args: any[]) => import("@umbraco-ui/uui-base/lib/mixins").LabelMixinInterface) & typeof LitElement;
|
|
2
|
+
declare const UUIMenuItemElement_base: (new (...args: any[]) => import("@umbraco-ui/uui-base/lib/mixins").SelectOnlyMixinInterface) & (new (...args: any[]) => import("@umbraco-ui/uui-base/lib/mixins").SelectableMixinInterface) & (new (...args: any[]) => import("@umbraco-ui/uui-base/lib/mixins").ActiveMixinInterface) & (new (...args: any[]) => import("@umbraco-ui/uui-base/lib/mixins").LabelMixinInterface) & typeof LitElement;
|
|
3
3
|
/**
|
|
4
4
|
* @element uui-menu-item
|
|
5
5
|
* @cssprop --uui-menu-item-indent - set indentation of the menu items
|
|
6
6
|
* @property label - This functions both as the visible label as well as the aria label.
|
|
7
|
+
* @fires {UUIMenuItemEvent} show-children - fires when the expand icon is clicked to show nested menu items
|
|
8
|
+
* @fires {UUIMenuItemEvent} hide-children - fires when the expend icon is clicked to hide nested menu items
|
|
9
|
+
* @fires {UUIMenuItemEvent} click-label - fires when the label is clicked
|
|
10
|
+
* @slot default slot for nested menu items
|
|
11
|
+
* @slot icon - icon area
|
|
12
|
+
* @slot actions - actions area
|
|
13
|
+
*
|
|
7
14
|
*/
|
|
8
15
|
export declare class UUIMenuItemElement extends UUIMenuItemElement_base {
|
|
9
16
|
static styles: import("lit").CSSResult[];
|
|
@@ -35,8 +42,33 @@ export declare class UUIMenuItemElement extends UUIMenuItemElement_base {
|
|
|
35
42
|
* @default false
|
|
36
43
|
*/
|
|
37
44
|
loading: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Set an href, this will turns the label into a anchor tag.
|
|
47
|
+
* @type {string}
|
|
48
|
+
* @attr
|
|
49
|
+
* @default undefined
|
|
50
|
+
*/
|
|
51
|
+
href?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Set an anchor tag target, only used when using href.
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @attr
|
|
56
|
+
* @default undefined
|
|
57
|
+
*/
|
|
58
|
+
target?: '_blank' | '_parent' | '_self' | '_top';
|
|
59
|
+
private iconSlotHasContent;
|
|
60
|
+
connectedCallback(): void;
|
|
61
|
+
private iconSlotChanged;
|
|
38
62
|
private onCaretClicked;
|
|
39
63
|
private onLabelClicked;
|
|
64
|
+
private _renderLabelInside;
|
|
65
|
+
private _renderLabelAsAnchor;
|
|
66
|
+
private _renderLabelAsButton;
|
|
40
67
|
render(): import("lit-html").TemplateResult<1>;
|
|
41
68
|
}
|
|
69
|
+
declare global {
|
|
70
|
+
interface HTMLElementTagNameMap {
|
|
71
|
+
'uui-menu-item': UUIMenuItemElement;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
42
74
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umbraco-ui/uui-menu-item",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Umbraco",
|
|
@@ -19,17 +19,18 @@
|
|
|
19
19
|
"bugs": {
|
|
20
20
|
"url": "https://github.com/umbraco/Umbraco.UI/issues"
|
|
21
21
|
},
|
|
22
|
-
"main": "./
|
|
22
|
+
"main": "./lib/index.js",
|
|
23
23
|
"module": "./lib/index.js",
|
|
24
|
+
"types": "./lib/index.d.ts",
|
|
25
|
+
"type": "module",
|
|
24
26
|
"customElements": "custom-elements.json",
|
|
25
27
|
"files": [
|
|
26
|
-
"dist",
|
|
27
28
|
"lib/**/*.d.ts",
|
|
28
29
|
"lib/**/*.js",
|
|
29
30
|
"custom-elements.json"
|
|
30
31
|
],
|
|
31
32
|
"dependencies": {
|
|
32
|
-
"@umbraco-ui/uui-base": "0.0.
|
|
33
|
+
"@umbraco-ui/uui-base": "0.0.16"
|
|
33
34
|
},
|
|
34
35
|
"scripts": {
|
|
35
36
|
"build": "npm run analyze && tsc --build --force && rollup -c rollup.config.js",
|
|
@@ -40,5 +41,5 @@
|
|
|
40
41
|
"access": "public"
|
|
41
42
|
},
|
|
42
43
|
"homepage": "https://uui.umbraco.com/?path=/story/uui-menu-item",
|
|
43
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "6fbddfc1295e2ea00a532d4f9eb798165b2d39ac"
|
|
44
45
|
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
var Ze=Object.defineProperty,Fe=Object.defineProperties;var Ge=Object.getOwnPropertyDescriptors;var be=Object.getOwnPropertySymbols;var Qe=Object.prototype.hasOwnProperty,Xe=Object.prototype.propertyIsEnumerable;var $e=(p,v,f)=>v in p?Ze(p,v,{enumerable:!0,configurable:!0,writable:!0,value:f}):p[v]=f,F=(p,v)=>{for(var f in v||(v={}))Qe.call(v,f)&&$e(p,f,v[f]);if(be)for(var f of be(v))Xe.call(v,f)&&$e(p,f,v[f]);return p},G=(p,v)=>Fe(p,Ge(v));(function(p){typeof define=="function"&&define.amd?define(p):p()})(function(){"use strict";/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const p=window.ShadowRoot&&(window.ShadyCSS===void 0||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,v=Symbol(),f=new Map;class Q{constructor(e,t){if(this._$cssResult$=!0,t!==v)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){let e=f.get(this.cssText);return p&&e===void 0&&(f.set(this.cssText,e=new CSSStyleSheet),e.replaceSync(this.cssText)),e}toString(){return this.cssText}}const _e=n=>new Q(typeof n=="string"?n:n+"",v),me=(n,...e)=>{const t=n.length===1?n[0]:e.reduce((i,s,r)=>i+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+n[r+1],n[0]);return new Q(t,v)},ge=(n,e)=>{p?n.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):e.forEach(t=>{const i=document.createElement("style"),s=window.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=t.cssText,n.appendChild(i)})},X=p?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return _e(t)})(n):n;/**
|
|
6
|
-
* @license
|
|
7
|
-
* Copyright 2017 Google LLC
|
|
8
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/var B,z;const j={toAttribute(n,e){switch(e){case Boolean:n=n?"":null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch(i){t=null}}return t}},Y=(n,e)=>e!==n&&(e==e||n==n),V={attribute:!0,type:String,converter:j,reflect:!1,hasChanged:Y};class A extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(e){var t;(t=this.l)!==null&&t!==void 0||(this.l=[]),this.l.push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((t,i)=>{const s=this._$Eh(i,t);s!==void 0&&(this._$Eu.set(s,i),e.push(s))}),e}static createProperty(e,t=V){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const i=typeof e=="symbol"?Symbol():"__"+e,s=this.getPropertyDescriptor(e,i,t);s!==void 0&&Object.defineProperty(this.prototype,e,s)}}static getPropertyDescriptor(e,t,i){return{get(){return this[t]},set(s){const r=this[e];this[t]=s,this.requestUpdate(e,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||V}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),this.elementProperties=new Map(e.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of i)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const s of i)t.unshift(X(s))}else e!==void 0&&t.push(X(e));return t}static _$Eh(e,t){const i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}o(){var e;this._$Ev=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$Ep(),this.requestUpdate(),(e=this.constructor.l)===null||e===void 0||e.forEach(t=>t(this))}addController(e){var t,i;((t=this._$Em)!==null&&t!==void 0?t:this._$Em=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((i=e.hostConnected)===null||i===void 0||i.call(e))}removeController(e){var t;(t=this._$Em)===null||t===void 0||t.splice(this._$Em.indexOf(e)>>>0,1)}_$Ep(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this._$Et.set(t,this[t]),delete this[t])})}createRenderRoot(){var e;const t=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return ge(t,this.constructor.elementStyles),t}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$Em)===null||e===void 0||e.forEach(t=>{var i;return(i=t.hostConnected)===null||i===void 0?void 0:i.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$Em)===null||e===void 0||e.forEach(t=>{var i;return(i=t.hostDisconnected)===null||i===void 0?void 0:i.call(t)})}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$Eg(e,t,i=V){var s,r;const o=this.constructor._$Eh(e,i);if(o!==void 0&&i.reflect===!0){const h=((r=(s=i.converter)===null||s===void 0?void 0:s.toAttribute)!==null&&r!==void 0?r:j.toAttribute)(t,i.type);this._$Ei=e,h==null?this.removeAttribute(o):this.setAttribute(o,h),this._$Ei=null}}_$AK(e,t){var i,s,r;const o=this.constructor,h=o._$Eu.get(e);if(h!==void 0&&this._$Ei!==h){const l=o.getPropertyOptions(h),a=l.converter,b=(r=(s=(i=a)===null||i===void 0?void 0:i.fromAttribute)!==null&&s!==void 0?s:typeof a=="function"?a:null)!==null&&r!==void 0?r:j.fromAttribute;this._$Ei=h,this[h]=b(t,l.type),this._$Ei=null}}requestUpdate(e,t,i){let s=!0;e!==void 0&&(((i=i||this.constructor.getPropertyOptions(e)).hasChanged||Y)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),i.reflect===!0&&this._$Ei!==e&&(this._$ES===void 0&&(this._$ES=new Map),this._$ES.set(e,i))):s=!1),!this.isUpdatePending&&s&&(this._$Ev=this._$EC())}async _$EC(){this.isUpdatePending=!0;try{await this._$Ev}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach((s,r)=>this[r]=s),this._$Et=void 0);let t=!1;const i=this._$AL;try{t=this.shouldUpdate(i),t?(this.willUpdate(i),(e=this._$Em)===null||e===void 0||e.forEach(s=>{var r;return(r=s.hostUpdate)===null||r===void 0?void 0:r.call(s)}),this.update(i)):this._$ET()}catch(s){throw t=!1,this._$ET(),s}t&&this._$AE(i)}willUpdate(e){}_$AE(e){var t;(t=this._$Em)===null||t===void 0||t.forEach(i=>{var s;return(s=i.hostUpdated)===null||s===void 0?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ev}shouldUpdate(e){return!0}update(e){this._$ES!==void 0&&(this._$ES.forEach((t,i)=>this._$Eg(i,this[i],t)),this._$ES=void 0),this._$ET()}updated(e){}firstUpdated(e){}}A.finalized=!0,A.elementProperties=new Map,A.elementStyles=[],A.shadowRootOptions={mode:"open"},(B=globalThis.reactiveElementPolyfillSupport)===null||B===void 0||B.call(globalThis,{ReactiveElement:A}),((z=globalThis.reactiveElementVersions)!==null&&z!==void 0?z:globalThis.reactiveElementVersions=[]).push("1.0.0");/**
|
|
10
|
-
* @license
|
|
11
|
-
* Copyright 2017 Google LLC
|
|
12
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/var W,K;const M=globalThis.trustedTypes,ee=M?M.createPolicy("lit-html",{createHTML:n=>n}):void 0,m=`lit$${(Math.random()+"").slice(9)}$`,te="?"+m,ye=`<${te}>`,E=document,O=(n="")=>E.createComment(n),H=n=>n===null||typeof n!="object"&&typeof n!="function",ie=Array.isArray,Ae=n=>{var e;return ie(n)||typeof((e=n)===null||e===void 0?void 0:e[Symbol.iterator])=="function"},U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,se=/-->/g,ne=/>/g,y=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,oe=/'/g,re=/"/g,le=/^(?:script|style|textarea)$/i,Ee=n=>(e,...t)=>({_$litType$:n,strings:e,values:t}),C=Ee(1),w=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),ae=new WeakMap,Ce=(n,e,t)=>{var i,s;const r=(i=t==null?void 0:t.renderBefore)!==null&&i!==void 0?i:e;let o=r._$litPart$;if(o===void 0){const h=(s=t==null?void 0:t.renderBefore)!==null&&s!==void 0?s:null;r._$litPart$=o=new N(e.insertBefore(O(),h),h,void 0,t!=null?t:{})}return o._$AI(n),o},S=E.createTreeWalker(E,129,null,!1),we=(n,e)=>{const t=n.length-1,i=[];let s,r=e===2?"<svg>":"",o=U;for(let l=0;l<t;l++){const a=n[l];let b,c,d=-1,$=0;for(;$<a.length&&(o.lastIndex=$,c=o.exec(a),c!==null);)$=o.lastIndex,o===U?c[1]==="!--"?o=se:c[1]!==void 0?o=ne:c[2]!==void 0?(le.test(c[2])&&(s=RegExp("</"+c[2],"g")),o=y):c[3]!==void 0&&(o=y):o===y?c[0]===">"?(o=s!=null?s:U,d=-1):c[1]===void 0?d=-2:(d=o.lastIndex-c[2].length,b=c[1],o=c[3]===void 0?y:c[3]==='"'?re:oe):o===re||o===oe?o=y:o===se||o===ne?o=U:(o=y,s=void 0);const I=o===y&&n[l+1].startsWith("/>")?" ":"";r+=o===U?a+ye:d>=0?(i.push(b),a.slice(0,d)+"$lit$"+a.slice(d)+m+I):a+m+(d===-2?(i.push(void 0),l):I)}const h=r+(n[t]||"<?>")+(e===2?"</svg>":"");return[ee!==void 0?ee.createHTML(h):h,i]};class T{constructor({strings:e,_$litType$:t},i){let s;this.parts=[];let r=0,o=0;const h=e.length-1,l=this.parts,[a,b]=we(e,t);if(this.el=T.createElement(a,i),S.currentNode=this.el.content,t===2){const c=this.el.content,d=c.firstChild;d.remove(),c.append(...d.childNodes)}for(;(s=S.nextNode())!==null&&l.length<h;){if(s.nodeType===1){if(s.hasAttributes()){const c=[];for(const d of s.getAttributeNames())if(d.endsWith("$lit$")||d.startsWith(m)){const $=b[o++];if(c.push(d),$!==void 0){const I=s.getAttribute($.toLowerCase()+"$lit$").split(m),D=/([.?@])?(.*)/.exec($);l.push({type:1,index:r,name:D[2],strings:I,ctor:D[1]==="."?xe:D[1]==="?"?Pe:D[1]==="@"?Oe:L})}else l.push({type:6,index:r})}for(const d of c)s.removeAttribute(d)}if(le.test(s.tagName)){const c=s.textContent.split(m),d=c.length-1;if(d>0){s.textContent=M?M.emptyScript:"";for(let $=0;$<d;$++)s.append(c[$],O()),S.nextNode(),l.push({type:2,index:++r});s.append(c[d],O())}}}else if(s.nodeType===8)if(s.data===te)l.push({type:2,index:r});else{let c=-1;for(;(c=s.data.indexOf(m,c+1))!==-1;)l.push({type:7,index:r}),c+=m.length-1}r++}}static createElement(e,t){const i=E.createElement("template");return i.innerHTML=e,i}}function x(n,e,t=n,i){var s,r,o,h;if(e===w)return e;let l=i!==void 0?(s=t._$Cl)===null||s===void 0?void 0:s[i]:t._$Cu;const a=H(e)?void 0:e._$litDirective$;return(l==null?void 0:l.constructor)!==a&&((r=l==null?void 0:l._$AO)===null||r===void 0||r.call(l,!1),a===void 0?l=void 0:(l=new a(n),l._$AT(n,t,i)),i!==void 0?((o=(h=t)._$Cl)!==null&&o!==void 0?o:h._$Cl=[])[i]=l:t._$Cu=l),l!==void 0&&(e=x(n,l._$AS(n,e.values),l,i)),e}class Se{constructor(e,t){this.v=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(e){var t;const{el:{content:i},parts:s}=this._$AD,r=((t=e==null?void 0:e.creationScope)!==null&&t!==void 0?t:E).importNode(i,!0);S.currentNode=r;let o=S.nextNode(),h=0,l=0,a=s[0];for(;a!==void 0;){if(h===a.index){let b;a.type===2?b=new N(o,o.nextSibling,this,e):a.type===1?b=new a.ctor(o,a.name,a.strings,this,e):a.type===6&&(b=new He(o,this,e)),this.v.push(b),a=s[++l]}h!==(a==null?void 0:a.index)&&(o=S.nextNode(),h++)}return r}m(e){let t=0;for(const i of this.v)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}}class N{constructor(e,t,i,s){var r;this.type=2,this._$AH=u,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=s,this._$Cg=(r=s==null?void 0:s.isConnected)===null||r===void 0||r}get _$AU(){var e,t;return(t=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&t!==void 0?t:this._$Cg}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=x(this,e,t),H(e)?e===u||e==null||e===""?(this._$AH!==u&&this._$AR(),this._$AH=u):e!==this._$AH&&e!==w&&this.$(e):e._$litType$!==void 0?this.T(e):e.nodeType!==void 0?this.S(e):Ae(e)?this.M(e):this.$(e)}A(e,t=this._$AB){return this._$AA.parentNode.insertBefore(e,t)}S(e){this._$AH!==e&&(this._$AR(),this._$AH=this.A(e))}$(e){this._$AH!==u&&H(this._$AH)?this._$AA.nextSibling.data=e:this.S(E.createTextNode(e)),this._$AH=e}T(e){var t;const{values:i,_$litType$:s}=e,r=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=T.createElement(s.h,this.options)),s);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===r)this._$AH.m(i);else{const o=new Se(r,this),h=o.p(this.options);o.m(i),this.S(h),this._$AH=o}}_$AC(e){let t=ae.get(e.strings);return t===void 0&&ae.set(e.strings,t=new T(e)),t}M(e){ie(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let i,s=0;for(const r of e)s===t.length?t.push(i=new N(this.A(O()),this.A(O()),this,this.options)):i=t[s],i._$AI(r),s++;s<t.length&&(this._$AR(i&&i._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,t);e&&e!==this._$AB;){const s=e.nextSibling;e.remove(),e=s}}setConnected(e){var t;this._$AM===void 0&&(this._$Cg=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}}class L{constructor(e,t,i,s,r){this.type=1,this._$AH=u,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=r,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=u}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,i,s){const r=this.strings;let o=!1;if(r===void 0)e=x(this,e,t,0),o=!H(e)||e!==this._$AH&&e!==w,o&&(this._$AH=e);else{const h=e;let l,a;for(e=r[0],l=0;l<r.length-1;l++)a=x(this,h[i+l],t,l),a===w&&(a=this._$AH[l]),o||(o=!H(a)||a!==this._$AH[l]),a===u?e=u:e!==u&&(e+=(a!=null?a:"")+r[l+1]),this._$AH[l]=a}o&&!s&&this.k(e)}k(e){e===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e!=null?e:"")}}class xe extends L{constructor(){super(...arguments),this.type=3}k(e){this.element[this.name]=e===u?void 0:e}}class Pe extends L{constructor(){super(...arguments),this.type=4}k(e){e&&e!==u?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name)}}class Oe extends L{constructor(e,t,i,s,r){super(e,t,i,s,r),this.type=5}_$AI(e,t=this){var i;if((e=(i=x(this,e,t,0))!==null&&i!==void 0?i:u)===w)return;const s=this._$AH,r=e===u&&s!==u||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,o=e!==u&&(s===u||r);r&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,i;typeof this._$AH=="function"?this._$AH.call((i=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&i!==void 0?i:this.element,e):this._$AH.handleEvent(e)}}class He{constructor(e,t,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){x(this,e)}}(W=globalThis.litHtmlPolyfillSupport)===null||W===void 0||W.call(globalThis,T,N),((K=globalThis.litHtmlVersions)!==null&&K!==void 0?K:globalThis.litHtmlVersions=[]).push("2.0.0");/**
|
|
14
|
-
* @license
|
|
15
|
-
* Copyright 2017 Google LLC
|
|
16
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
-
*/var q,J,Z;class k extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var e,t;const i=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=i.firstChild),i}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Dt=Ce(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Dt)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Dt)===null||e===void 0||e.setConnected(!1)}render(){return w}}k.finalized=!0,k._$litElement$=!0,(q=globalThis.litElementHydrateSupport)===null||q===void 0||q.call(globalThis,{LitElement:k}),(J=globalThis.litElementPolyfillSupport)===null||J===void 0||J.call(globalThis,{LitElement:k}),((Z=globalThis.litElementVersions)!==null&&Z!==void 0?Z:globalThis.litElementVersions=[]).push("3.0.0");/**
|
|
18
|
-
* @license
|
|
19
|
-
* Copyright 2017 Google LLC
|
|
20
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
21
|
-
*/const Ue=(n,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?G(F({},e),{finisher(t){t.createProperty(e.key,n)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(t){t.createProperty(e.key,n)}};function _(n){return(e,t)=>t!==void 0?((i,s,r)=>{s.constructor.createProperty(r,i)})(n,e,t):Ue(n,e)}/**
|
|
22
|
-
* @license
|
|
23
|
-
* Copyright 2017 Google LLC
|
|
24
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
-
*/function Te(n){return _(G(F({},n),{state:!0}))}var Ne=Object.defineProperty,ke=Object.getOwnPropertyDescriptor,Me=(n,e,t,i)=>{for(var s=i>1?void 0:i?ke(e,t):e,r=n.length-1,o;r>=0;r--)(o=n[r])&&(s=(i?o(e,t,s):o(s))||s);return i&&s&&Ne(e,t,s),s};const Le=n=>{class e extends n{constructor(){super(...arguments);this.active=!1}}return Me([_({type:Boolean,reflect:!0})],e.prototype,"active",2),e};var Re=Object.defineProperty,Ie=Object.getOwnPropertyDescriptor,ce=(n,e,t,i)=>{for(var s=i>1?void 0:i?Ie(e,t):e,r=n.length-1,o;r>=0;r--)(o=n[r])&&(s=(i?o(e,t,s):o(s))||s);return i&&s&&Re(e,t,s),s};const De=(n,e)=>{class t extends e{constructor(){super(...arguments);this.labelSlotHasContent=!1}connectedCallback(){super.connectedCallback(),this.label||console.warn(this.tagName+" needs a `label`")}labelSlotChanged(s){this.labelSlotHasContent=s.target.assignedNodes({flatten:!0}).length>0}renderLabel(){return C`${this.labelSlotHasContent===!1?C`<span class="label">${this.label}</span>`:""}<slot class="label" style="${this.labelSlotHasContent?"":"visibility: hidden"}" name="${n||""}" @slotchange="${this.labelSlotChanged}"></slot>`}}return ce([_({type:String})],t.prototype,"label",2),ce([Te()],t.prototype,"labelSlotHasContent",2),t};var Be=Object.defineProperty,ze=Object.getOwnPropertyDescriptor,he=(n,e,t,i)=>{for(var s=i>1?void 0:i?ze(e,t):e,r=n.length-1,o;r>=0;r--)(o=n[r])&&(s=(i?o(e,t,s):o(s))||s);return i&&s&&Be(e,t,s),s};const je=n=>{class e extends n{constructor(){super(...arguments);this._selectable=!1,this.selected=!1}get selectable(){return this._selectable}set selectable(i){const s=this._selectable;this._selectable=i,this.setAttribute("tabindex",`${i?"0":"-1"}`),this.requestUpdate("selected",s)}}return he([_({type:Boolean,reflect:!0})],e.prototype,"selectable",1),he([_({type:Boolean,reflect:!0})],e.prototype,"selected",2),e};var Ve=Object.defineProperty,de=Object.getOwnPropertySymbols,We=Object.prototype.hasOwnProperty,Ke=Object.prototype.propertyIsEnumerable,ue=(n,e,t)=>e in n?Ve(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,pe=(n,e)=>{for(var t in e||(e={}))We.call(e,t)&&ue(n,t,e[t]);if(de)for(var t of de(e))Ke.call(e,t)&&ue(n,t,e[t]);return n};const ve=class extends Event{constructor(n,e={}){super(n,pe(pe({},ve.defaultInit),e));this.detail=e.detail||{}}};let fe=ve;fe.defaultInit={composed:!0};class g extends fe{}g.SHOW_CHILDREN="show-children",g.HIDE_CHILDREN="hide-children",g.CLICK_LABEL="click-label";var qe=Object.defineProperty,Je=Object.getOwnPropertyDescriptor,R=(n,e,t,i)=>{for(var s=i>1?void 0:i?Je(e,t):e,r=n.length-1,o;r>=0;r--)(o=n[r])&&(s=(i?o(e,t,s):o(s))||s);return i&&s&&qe(e,t,s),s};class P extends je(Le(De("label",k))){constructor(){super(...arguments);this.disabled=!1,this.showChildren=!1,this.hasChildren=!1,this.loading=!1}onCaretClicked(){this.showChildren=!this.showChildren;const e=this.showChildren?g.SHOW_CHILDREN:g.HIDE_CHILDREN,t=new g(e);this.dispatchEvent(t)}onLabelClicked(){const e=new g(g.CLICK_LABEL);this.dispatchEvent(e)}render(){return C`<div id="menu-item" aria-label="menuitem" role="menuitem">${this.hasChildren?C`<button id="caret-button" @click="${this.onCaretClicked}"><uui-caret ?open="${this.showChildren}"></uui-caret></button>`:""} <button id="label-button" @click="${this.onLabelClicked}" ?disabled="${this.disabled}" aria-label="${this.label}">${this.renderLabel()}</button><div id="label-button-background"></div><slot id="actions-container" name="actions"></slot>${this.loading?C`<uui-loader-bar id="loader"></uui-loader-bar>`:""}</div>${this.showChildren?C`<slot></slot>`:""}`}}P.styles=[me`:host{display:block;background-color:var(--uui-interface-surface,#fefefe);--uui-menu-item-child-indent:calc(var(--uui-menu-item-indent, 0) + 1)}#menu-item{position:relative;display:flex;align-items:stretch;padding-left:calc(var(--uui-menu-item-indent,0) * var(--uui-size-8,24px));display:grid;grid-template-columns:24px 1fr;grid-template-rows:1fr;white-space:nowrap}button{display:block;padding:0;text-align:left;box-shadow:none;border:none;color:inherit;background-color:transparent;cursor:pointer;z-index:1;min-height:var(--uui-size-12,36px)}button:hover{color:var(--uui-interface-contrast-hover,#1b264f)}#label-button{flex-grow:1;grid-column-start:2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#caret-button+#label-button{padding-left:0}#caret-button{width:100%;height:100%;display:flex;align-items:center;justify-content:center}#caret-button:hover{background-color:var(--uui-interface-surface-hover,#fafafa)}#label-button-background{position:absolute;top:0;left:0;right:0;bottom:0}#label-button:hover+#label-button-background{background-color:var(--uui-interface-surface-hover,#fafafa)}#actions-container{opacity:0;transition:opacity 120ms;grid-column-start:3}#menu-item:hover #actions-container{opacity:1}#loader{position:absolute;width:100%;bottom:0}:host([disabled]) #label-button{color:var(--uui-interface-surface-contrast-disabled)}:host([disabled]) #label-button-background{background-color:var(--uui-interface-surface-disabled,#e4e4e4)}:host([disabled]) #label-button:hover+#label-button-background{background-color:var(--uui-interface-surface-disabled,#e4e4e4)}:host([active]) button{color:var(--uui-interface-active-contrast,#162335)}:host([active]) button:hover{color:var(--uui-interface-active-contrast-hover,#1b264f)}:host([active]) #label-button-background{background-color:var(--uui-interface-active,#f5c1bc)}:host([active]) #label-button:hover+#label-button-background{background-color:var(--uui-interface-active-hover,#f5c1bc)}:host([active][disabled]) #label-button{color:var(--uui-interface-active-contrast-disabled,#363636);background-color:var(--uui-interface-active-disabled,#dbd4d4)}:host([selected]) button{color:var(--uui-interface-select-contrast,#fefefe)}:host([selected]) button:hover{color:var(--uui-interface-select-contrast-hover,#fefefe)}:host([selected]) #label-button-background{background-color:var(--uui-interface-select,#3544b1)}:host([selected]) #label-button:hover+#label-button-background{background-color:var(--uui-interface-select-hover,#4656c8)}:host([selected][disabled]) #label-button{color:var(--uui-interface-select-contrast-disabled,#e4e4e4);background-color:var(--uui-interface-select-disabled,#575757)}slot:not([name]){position:relative;display:block;width:100%}slot:not([name]){--uui-menu-item-indent:var(--uui-menu-item-child-indent)}slot[name=actions]{display:flex;align-items:center;--uui-button-height:calc(var(--uui-size-base-unit) * 4);margin-right:var(--uui-size-base-unit)}`],R([_({type:Boolean,reflect:!0})],P.prototype,"disabled",2),R([_({type:Boolean,reflect:!0,attribute:"show-children"})],P.prototype,"showChildren",2),R([_({type:Boolean,attribute:"has-children"})],P.prototype,"hasChildren",2),R([_({type:Boolean,attribute:"loading"})],P.prototype,"loading",2),((n,e,t)=>{if(n.indexOf("-")>0===!1){console.error(`${n} is not a valid custom element name. A custom element name should consist of at least two words separated by a hyphen.`);return}customElements.get(n)?console.error(`${n} is already defined`):customElements.define(n,e,t)})("uui-menu-item",P)});
|
|
26
|
-
//# sourceMappingURL=uui-menu-item.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"uui-menu-item.min.js","sources":["../../../node_modules/@lit/reactive-element/css-tag.js","../../../node_modules/@lit/reactive-element/reactive-element.js","../../../node_modules/lit-html/lit-html.js","../../../node_modules/lit-element/lit-element.js","../../../node_modules/@lit/reactive-element/decorators/property.js","../../../node_modules/@lit/reactive-element/decorators/state.js","../../uui-base/lib/mixins/index.js","../../uui-base/lib/events/index.js","../lib/uui-menu-item.element.js","../lib/index.ts","../../uui-base/lib/registration/index.js"],"sourcesContent":["/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,e=Symbol(),n=new Map;class s{constructor(t,n){if(this._$cssResult$=!0,n!==e)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t}get styleSheet(){let e=n.get(this.cssText);return t&&void 0===e&&(n.set(this.cssText,e=new CSSStyleSheet),e.replaceSync(this.cssText)),e}toString(){return this.cssText}}const o=t=>new s(\"string\"==typeof t?t:t+\"\",e),r=(t,...n)=>{const o=1===t.length?t[0]:n.reduce(((e,n,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(n)+t[s+1]),t[0]);return new s(o,e)},i=(e,n)=>{t?e.adoptedStyleSheets=n.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):n.forEach((t=>{const n=document.createElement(\"style\"),s=window.litNonce;void 0!==s&&n.setAttribute(\"nonce\",s),n.textContent=t.cssText,e.appendChild(n)}))},S=t?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const n of t.cssRules)e+=n.cssText;return o(e)})(t):t;export{s as CSSResult,i as adoptStyles,r as css,S as getCompatibleStyle,t as supportsAdoptingStyleSheets,o as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as i}from\"./css-tag.js\";export{CSSResult,adoptStyles,css,getCompatibleStyle,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */var s,e;const r={toAttribute(t,i){switch(i){case Boolean:t=t?\"\":null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let s=t;switch(i){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},h=(t,i)=>i!==t&&(i==i||t==t),o={attribute:!0,type:String,converter:r,reflect:!1,hasChanged:h};class n extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var i;null!==(i=this.l)&&void 0!==i||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,s)=>{const e=this._$Eh(s,i);void 0!==e&&(this._$Eu.set(e,s),t.push(e))})),t}static createProperty(t,i=o){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const s=\"symbol\"==typeof t?Symbol():\"__\"+t,e=this.getPropertyDescriptor(t,s,i);void 0!==e&&Object.defineProperty(this.prototype,t,e)}}static getPropertyDescriptor(t,i,s){return{get(){return this[i]},set(e){const r=this[t];this[i]=e,this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||o}static finalize(){if(this.hasOwnProperty(\"finalized\"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty(\"properties\")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of i)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(i){const s=[];if(Array.isArray(i)){const e=new Set(i.flat(1/0).reverse());for(const i of e)s.unshift(t(i))}else void 0!==i&&s.push(t(i));return s}static _$Eh(t,i){const s=i.attribute;return!1===s?void 0:\"string\"==typeof s?s:\"string\"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ev=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Ep(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,s;(null!==(i=this._$Em)&&void 0!==i?i:this._$Em=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.call(t))}removeController(t){var i;null===(i=this._$Em)||void 0===i||i.splice(this._$Em.indexOf(t)>>>0,1)}_$Ep(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Et.set(i,this[i]),delete this[i])}))}createRenderRoot(){var t;const s=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return i(s,this.constructor.elementStyles),s}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Em)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$Em)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}))}attributeChangedCallback(t,i,s){this._$AK(t,s)}_$Eg(t,i,s=o){var e,h;const n=this.constructor._$Eh(t,s);if(void 0!==n&&!0===s.reflect){const o=(null!==(h=null===(e=s.converter)||void 0===e?void 0:e.toAttribute)&&void 0!==h?h:r.toAttribute)(i,s.type);this._$Ei=t,null==o?this.removeAttribute(n):this.setAttribute(n,o),this._$Ei=null}}_$AK(t,i){var s,e,h;const o=this.constructor,n=o._$Eu.get(t);if(void 0!==n&&this._$Ei!==n){const t=o.getPropertyOptions(n),l=t.converter,a=null!==(h=null!==(e=null===(s=l)||void 0===s?void 0:s.fromAttribute)&&void 0!==e?e:\"function\"==typeof l?l:null)&&void 0!==h?h:r.fromAttribute;this._$Ei=n,this[n]=a(i,t.type),this._$Ei=null}}requestUpdate(t,i,s){let e=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||h)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===s.reflect&&this._$Ei!==t&&(void 0===this._$ES&&(this._$ES=new Map),this._$ES.set(t,s))):e=!1),!this.isUpdatePending&&e&&(this._$Ev=this._$EC())}async _$EC(){this.isUpdatePending=!0;try{await this._$Ev}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((t,i)=>this[i]=t)),this._$Et=void 0);let i=!1;const s=this._$AL;try{i=this.shouldUpdate(s),i?(this.willUpdate(s),null===(t=this._$Em)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(s)):this._$ET()}catch(t){throw i=!1,this._$ET(),t}i&&this._$AE(s)}willUpdate(t){}_$AE(t){var i;null===(i=this._$Em)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ev}shouldUpdate(t){return!0}update(t){void 0!==this._$ES&&(this._$ES.forEach(((t,i)=>this._$Eg(i,this[i],t))),this._$ES=void 0),this._$ET()}updated(t){}firstUpdated(t){}}n.finalized=!0,n.elementProperties=new Map,n.elementStyles=[],n.shadowRootOptions={mode:\"open\"},null===(s=globalThis.reactiveElementPolyfillSupport)||void 0===s||s.call(globalThis,{ReactiveElement:n}),(null!==(e=globalThis.reactiveElementVersions)&&void 0!==e?e:globalThis.reactiveElementVersions=[]).push(\"1.0.0\");export{n as ReactiveElement,r as defaultConverter,h as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nvar t,i;const s=globalThis.trustedTypes,e=s?s.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,o=`lit$${(Math.random()+\"\").slice(9)}$`,n=\"?\"+o,l=`<${n}>`,h=document,r=(t=\"\")=>h.createComment(t),d=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,u=Array.isArray,v=t=>{var i;return u(t)||\"function\"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])},c=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,a=/-->/g,f=/>/g,_=/>|[ \t\\n\f\\r](?:([^\\s\"'>=/]+)([ \t\\n\f\\r]*=[ \t\\n\f\\r]*(?:[^ \t\\n\f\\r\"'`<>=]|(\"|')|))|$)/g,g=/'/g,m=/\"/g,$=/^(?:script|style|textarea)$/i,p=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),y=p(1),b=p(2),T=Symbol.for(\"lit-noChange\"),x=Symbol.for(\"lit-nothing\"),w=new WeakMap,A=(t,i,s)=>{var e,o;const n=null!==(e=null==s?void 0:s.renderBefore)&&void 0!==e?e:i;let l=n._$litPart$;if(void 0===l){const t=null!==(o=null==s?void 0:s.renderBefore)&&void 0!==o?o:null;n._$litPart$=l=new S(i.insertBefore(r(),t),t,void 0,null!=s?s:{})}return l._$AI(t),l},C=h.createTreeWalker(h,129,null,!1),P=(t,i)=>{const s=t.length-1,n=[];let h,r=2===i?\"<svg>\":\"\",d=c;for(let i=0;i<s;i++){const s=t[i];let e,u,v=-1,p=0;for(;p<s.length&&(d.lastIndex=p,u=d.exec(s),null!==u);)p=d.lastIndex,d===c?\"!--\"===u[1]?d=a:void 0!==u[1]?d=f:void 0!==u[2]?($.test(u[2])&&(h=RegExp(\"</\"+u[2],\"g\")),d=_):void 0!==u[3]&&(d=_):d===_?\">\"===u[0]?(d=null!=h?h:c,v=-1):void 0===u[1]?v=-2:(v=d.lastIndex-u[2].length,e=u[1],d=void 0===u[3]?_:'\"'===u[3]?m:g):d===m||d===g?d=_:d===a||d===f?d=c:(d=_,h=void 0);const y=d===_&&t[i+1].startsWith(\"/>\")?\" \":\"\";r+=d===c?s+l:v>=0?(n.push(e),s.slice(0,v)+\"$lit$\"+s.slice(v)+o+y):s+o+(-2===v?(n.push(void 0),i):y)}const u=r+(t[s]||\"<?>\")+(2===i?\"</svg>\":\"\");return[void 0!==e?e.createHTML(u):u,n]};class V{constructor({strings:t,_$litType$:i},e){let l;this.parts=[];let h=0,d=0;const u=t.length-1,v=this.parts,[c,a]=P(t,i);if(this.el=V.createElement(c,e),C.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(l=C.nextNode())&&v.length<u;){if(1===l.nodeType){if(l.hasAttributes()){const t=[];for(const i of l.getAttributeNames())if(i.endsWith(\"$lit$\")||i.startsWith(o)){const s=a[d++];if(t.push(i),void 0!==s){const t=l.getAttribute(s.toLowerCase()+\"$lit$\").split(o),i=/([.?@])?(.*)/.exec(s);v.push({type:1,index:h,name:i[2],strings:t,ctor:\".\"===i[1]?k:\"?\"===i[1]?H:\"@\"===i[1]?I:M})}else v.push({type:6,index:h})}for(const i of t)l.removeAttribute(i)}if($.test(l.tagName)){const t=l.textContent.split(o),i=t.length-1;if(i>0){l.textContent=s?s.emptyScript:\"\";for(let s=0;s<i;s++)l.append(t[s],r()),C.nextNode(),v.push({type:2,index:++h});l.append(t[i],r())}}}else if(8===l.nodeType)if(l.data===n)v.push({type:2,index:h});else{let t=-1;for(;-1!==(t=l.data.indexOf(o,t+1));)v.push({type:7,index:h}),t+=o.length-1}h++}}static createElement(t,i){const s=h.createElement(\"template\");return s.innerHTML=t,s}}function E(t,i,s=t,e){var o,n,l,h;if(i===T)return i;let r=void 0!==e?null===(o=s._$Cl)||void 0===o?void 0:o[e]:s._$Cu;const u=d(i)?void 0:i._$litDirective$;return(null==r?void 0:r.constructor)!==u&&(null===(n=null==r?void 0:r._$AO)||void 0===n||n.call(r,!1),void 0===u?r=void 0:(r=new u(t),r._$AT(t,s,e)),void 0!==e?(null!==(l=(h=s)._$Cl)&&void 0!==l?l:h._$Cl=[])[e]=r:s._$Cu=r),void 0!==r&&(i=E(t,r._$AS(t,i.values),r,e)),i}class N{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:s},parts:e}=this._$AD,o=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:h).importNode(s,!0);C.currentNode=o;let n=C.nextNode(),l=0,r=0,d=e[0];for(;void 0!==d;){if(l===d.index){let i;2===d.type?i=new S(n,n.nextSibling,this,t):1===d.type?i=new d.ctor(n,d.name,d.strings,this,t):6===d.type&&(i=new L(n,this,t)),this.v.push(i),d=e[++r]}l!==(null==d?void 0:d.index)&&(n=C.nextNode(),l++)}return o}m(t){let i=0;for(const s of this.v)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class S{constructor(t,i,s,e){var o;this.type=2,this._$AH=x,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cg=null===(o=null==e?void 0:e.isConnected)||void 0===o||o}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=E(this,t,i),d(t)?t===x||null==t||\"\"===t?(this._$AH!==x&&this._$AR(),this._$AH=x):t!==this._$AH&&t!==T&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):v(t)?this.M(t):this.$(t)}A(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.A(t))}$(t){this._$AH!==x&&d(this._$AH)?this._$AA.nextSibling.data=t:this.S(h.createTextNode(t)),this._$AH=t}T(t){var i;const{values:s,_$litType$:e}=t,o=\"number\"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=V.createElement(e.h,this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===o)this._$AH.m(s);else{const t=new N(o,this),i=t.p(this.options);t.m(s),this.S(i),this._$AH=t}}_$AC(t){let i=w.get(t.strings);return void 0===i&&w.set(t.strings,i=new V(t)),i}M(t){u(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const o of t)e===i.length?i.push(s=new S(this.A(r()),this.A(r()),this,this.options)):s=i[e],s._$AI(o),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){var s;for(null===(s=this._$AP)||void 0===s||s.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class M{constructor(t,i,s,e,o){this.type=1,this._$AH=x,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=o,s.length>2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=x}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,s,e){const o=this.strings;let n=!1;if(void 0===o)t=E(this,t,i,0),n=!d(t)||t!==this._$AH&&t!==T,n&&(this._$AH=t);else{const e=t;let l,h;for(t=o[0],l=0;l<o.length-1;l++)h=E(this,e[s+l],i,l),h===T&&(h=this._$AH[l]),n||(n=!d(h)||h!==this._$AH[l]),h===x?t=x:t!==x&&(t+=(null!=h?h:\"\")+o[l+1]),this._$AH[l]=h}n&&!e&&this.k(t)}k(t){t===x?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:\"\")}}class k extends M{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===x?void 0:t}}class H extends M{constructor(){super(...arguments),this.type=4}k(t){t&&t!==x?this.element.setAttribute(this.name,\"\"):this.element.removeAttribute(this.name)}}class I extends M{constructor(t,i,s,e,o){super(t,i,s,e,o),this.type=5}_$AI(t,i=this){var s;if((t=null!==(s=E(this,t,i,0))&&void 0!==s?s:x)===T)return;const e=this._$AH,o=t===x&&e!==x||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,n=t!==x&&(e===x||o);o&&this.element.removeEventListener(this.name,this,e),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,s;\"function\"==typeof this._$AH?this._$AH.call(null!==(s=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==s?s:this.element,t):this._$AH.handleEvent(t)}}class L{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){E(this,t)}}const R={P:\"$lit$\",V:o,L:n,I:1,N:P,R:N,D:v,j:E,H:S,O:M,F:H,B:I,W:k,Z:L};null===(t=globalThis.litHtmlPolyfillSupport)||void 0===t||t.call(globalThis,V,S),(null!==(i=globalThis.litHtmlVersions)&&void 0!==i?i:globalThis.litHtmlVersions=[]).push(\"2.0.0\");export{R as _$LH,y as html,T as noChange,x as nothing,A as render,b as svg};\n//# sourceMappingURL=lit-html.js.map\n","import{ReactiveElement as t}from\"@lit/reactive-element\";export*from\"@lit/reactive-element\";import{render as e,noChange as i}from\"lit-html\";export*from\"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */var l,o,r;const s=t;class n extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=e(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return i}}n.finalized=!0,n._$litElement$=!0,null===(l=globalThis.litElementHydrateSupport)||void 0===l||l.call(globalThis,{LitElement:n}),null===(o=globalThis.litElementPolyfillSupport)||void 0===o||o.call(globalThis,{LitElement:n});const h={_$AK:(t,e,i)=>{t._$AK(e,i)},_$AL:t=>t._$AL};(null!==(r=globalThis.litElementVersions)&&void 0!==r?r:globalThis.litElementVersions=[]).push(\"3.0.0\");export{n as LitElement,s as UpdatingElement,h as _$LE};\n//# sourceMappingURL=lit-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst i=(i,e)=>\"method\"===e.kind&&e.descriptor&&!(\"value\"in e.descriptor)?{...e,finisher(n){n.createProperty(e.key,i)}}:{kind:\"field\",key:Symbol(),placement:\"own\",descriptor:{},originalKey:e.key,initializer(){\"function\"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(n){n.createProperty(e.key,i)}};function e(e){return(n,t)=>void 0!==t?((i,e,n)=>{e.constructor.createProperty(n,i)})(e,n,t):i(e,n)}export{e as property};\n//# sourceMappingURL=property.js.map\n","import{property as r}from\"./property.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function t(t){return r({...t,state:!0})}export{t as state};\n//# sourceMappingURL=state.js.map\n","import { property, state } from 'lit/decorators.js';\nimport { html } from 'lit';\n\nvar __defProp$2 = Object.defineProperty;\nvar __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;\nvar __decorateClass$2 = (decorators, target, key, kind) => {\n var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$2(target, key) : target;\n for (var i = decorators.length - 1, decorator; i >= 0; i--)\n if (decorator = decorators[i])\n result = (kind ? decorator(target, key, result) : decorator(result)) || result;\n if (kind && result)\n __defProp$2(target, key, result);\n return result;\n};\nconst ActiveMixin = (superClass) => {\n class ActiveMixinClass extends superClass {\n constructor() {\n super(...arguments);\n this.active = false;\n }\n }\n __decorateClass$2([\n property({ type: Boolean, reflect: true })\n ], ActiveMixinClass.prototype, \"active\", 2);\n return ActiveMixinClass;\n};\n\nvar __defProp$1 = Object.defineProperty;\nvar __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;\nvar __decorateClass$1 = (decorators, target, key, kind) => {\n var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target;\n for (var i = decorators.length - 1, decorator; i >= 0; i--)\n if (decorator = decorators[i])\n result = (kind ? decorator(target, key, result) : decorator(result)) || result;\n if (kind && result)\n __defProp$1(target, key, result);\n return result;\n};\nconst LabelMixin = (labelSlotName, superClass) => {\n class LabelMixinClass extends superClass {\n constructor() {\n super(...arguments);\n this.labelSlotHasContent = false;\n }\n connectedCallback() {\n super.connectedCallback();\n if (!this.label) {\n console.warn(this.tagName + \" needs a `label`\");\n }\n }\n labelSlotChanged(e) {\n this.labelSlotHasContent = e.target.assignedNodes({ flatten: true }).length > 0;\n }\n renderLabel() {\n return html`\n ${this.labelSlotHasContent === false ? html`<span class=\"label\">${this.label}</span>` : \"\"}\n <slot\n class=\"label\"\n style=${this.labelSlotHasContent ? \"\" : \"visibility: hidden\"}\n name=${labelSlotName ? labelSlotName : \"\"}\n @slotchange=${this.labelSlotChanged}></slot>\n `;\n }\n }\n __decorateClass$1([\n property({ type: String })\n ], LabelMixinClass.prototype, \"label\", 2);\n __decorateClass$1([\n state()\n ], LabelMixinClass.prototype, \"labelSlotHasContent\", 2);\n return LabelMixinClass;\n};\n\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __decorateClass = (decorators, target, key, kind) => {\n var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;\n for (var i = decorators.length - 1, decorator; i >= 0; i--)\n if (decorator = decorators[i])\n result = (kind ? decorator(target, key, result) : decorator(result)) || result;\n if (kind && result)\n __defProp(target, key, result);\n return result;\n};\nconst SelectableMixin = (superClass) => {\n class SelectableMixinClass extends superClass {\n constructor() {\n super(...arguments);\n this._selectable = false;\n this.selected = false;\n }\n get selectable() {\n return this._selectable;\n }\n set selectable(newVal) {\n const oldVal = this._selectable;\n this._selectable = newVal;\n this.setAttribute(\"tabindex\", `${newVal ? \"0\" : \"-1\"}`);\n this.requestUpdate(\"selected\", oldVal);\n }\n }\n __decorateClass([\n property({ type: Boolean, reflect: true })\n ], SelectableMixinClass.prototype, \"selectable\", 1);\n __decorateClass([\n property({ type: Boolean, reflect: true })\n ], SelectableMixinClass.prototype, \"selected\", 2);\n return SelectableMixinClass;\n};\n\nexport { ActiveMixin, LabelMixin, SelectableMixin };\n","var __defProp = Object.defineProperty;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nconst _UUIEvent = class extends Event {\n constructor(evName, eventInit = {}) {\n super(evName, __spreadValues(__spreadValues({}, _UUIEvent.defaultInit), eventInit));\n this.detail = eventInit.detail || {};\n }\n};\nlet UUIEvent = _UUIEvent;\nUUIEvent.defaultInit = {\n composed: true\n};\n\nclass UUIListItemClickEvent extends UUIEvent {\n}\n\nclass UUIListItemFocusEvent extends UUIEvent {\n constructor() {\n super(\"focus\");\n }\n}\n\nexport { UUIEvent, UUIListItemClickEvent, UUIListItemFocusEvent };\n","import { LitElement, html, css } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { SelectableMixin, ActiveMixin, LabelMixin } from '@umbraco-ui/uui-base/lib/mixins';\nimport { UUIEvent } from '@umbraco-ui/uui-base/lib/events';\n\nclass UUIMenuItemEvent extends UUIEvent {\n}\nUUIMenuItemEvent.SHOW_CHILDREN = \"show-children\";\nUUIMenuItemEvent.HIDE_CHILDREN = \"hide-children\";\nUUIMenuItemEvent.CLICK_LABEL = \"click-label\";\n\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __decorateClass = (decorators, target, key, kind) => {\n var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;\n for (var i = decorators.length - 1, decorator; i >= 0; i--)\n if (decorator = decorators[i])\n result = (kind ? decorator(target, key, result) : decorator(result)) || result;\n if (kind && result)\n __defProp(target, key, result);\n return result;\n};\nclass UUIMenuItemElement extends SelectableMixin(ActiveMixin(LabelMixin(\"label\", LitElement))) {\n constructor() {\n super(...arguments);\n this.disabled = false;\n this.showChildren = false;\n this.hasChildren = false;\n this.loading = false;\n }\n onCaretClicked() {\n this.showChildren = !this.showChildren;\n const eventName = this.showChildren ? UUIMenuItemEvent.SHOW_CHILDREN : UUIMenuItemEvent.HIDE_CHILDREN;\n const event = new UUIMenuItemEvent(eventName);\n this.dispatchEvent(event);\n }\n onLabelClicked() {\n const event = new UUIMenuItemEvent(UUIMenuItemEvent.CLICK_LABEL);\n this.dispatchEvent(event);\n }\n render() {\n return html`\n <div id=\"menu-item\" aria-label=\"menuitem\" role=\"menuitem\">\n ${this.hasChildren ? html`<button id=\"caret-button\" @click=${this.onCaretClicked}>\n <uui-caret ?open=${this.showChildren}></uui-caret>\n </button>` : \"\"}\n <button\n id=\"label-button\"\n @click=${this.onLabelClicked}\n ?disabled=${this.disabled}\n aria-label=\"${this.label}\">\n ${this.renderLabel()}\n </button>\n <div id=\"label-button-background\"></div>\n <slot id=\"actions-container\" name=\"actions\"></slot>\n ${this.loading ? html`<uui-loader-bar id=\"loader\"></uui-loader-bar>` : \"\"}\n </div>\n ${this.showChildren ? html`<slot></slot>` : \"\"}\n `;\n }\n}\nUUIMenuItemElement.styles = [\n css`\n :host {\n display: block;\n background-color: var(--uui-interface-surface,#FEFEFE);\n /** consider transparent. */\n --uui-menu-item-child-indent: calc(var(--uui-menu-item-indent, 0) + 1);\n }\n\n #menu-item {\n position: relative;\n display: flex;\n align-items: stretch;\n padding-left: calc(\n var(--uui-menu-item-indent, 0) * var(--uui-size-8, 24px)\n );\n\n display: grid;\n grid-template-columns: 24px 1fr;\n grid-template-rows: 1fr;\n white-space: nowrap;\n }\n\n button {\n display: block;\n padding: 0;\n text-align: left;\n box-shadow: none;\n border: none;\n color: inherit;\n background-color: transparent;\n cursor: pointer;\n z-index: 1;\n /* padding: 0 var(--uui-size-base-unit) 0 var(--uui-size-base-unit); */\n min-height: var(--uui-size-12,36px);\n }\n button:hover {\n color: var(--uui-interface-contrast-hover,#1B264F);\n }\n\n #label-button {\n flex-grow: 1;\n grid-column-start: 2;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n #caret-button + #label-button {\n padding-left: 0;\n }\n #caret-button {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n #caret-button:hover {\n background-color: var(--uui-interface-surface-hover,rgb(250, 250, 250));\n }\n #label-button-background {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n #label-button:hover + #label-button-background {\n background-color: var(--uui-interface-surface-hover,rgb(250, 250, 250));\n }\n #actions-container {\n opacity: 0;\n transition: opacity 120ms;\n grid-column-start: 3;\n }\n #menu-item:hover #actions-container {\n opacity: 1;\n }\n\n #loader {\n position: absolute;\n width: 100%;\n bottom: 0;\n }\n\n :host([disabled]) #label-button {\n color: var(--uui-interface-surface-contrast-disabled);\n }\n :host([disabled]) #label-button-background {\n background-color: var(--uui-interface-surface-disabled,rgb(228, 228, 228));\n }\n :host([disabled]) #label-button:hover + #label-button-background {\n background-color: var(--uui-interface-surface-disabled,rgb(228, 228, 228));\n }\n\n :host([active]) button {\n color: var(--uui-interface-active-contrast,#162335);\n }\n :host([active]) button:hover {\n color: var(--uui-interface-active-contrast-hover,#1B264F);\n }\n :host([active]) #label-button-background {\n background-color: var(--uui-interface-active,#F5C1BC);\n }\n :host([active]) #label-button:hover + #label-button-background {\n background-color: var(--uui-interface-active-hover,#F5C1BC);\n }\n :host([active][disabled]) #label-button {\n color: var(--uui-interface-active-contrast-disabled,rgb(54, 54, 54));\n background-color: var(--uui-interface-active-disabled,rgb(219, 212, 212));\n }\n\n :host([selected]) button {\n color: var(--uui-interface-select-contrast,#FEFEFE);\n }\n :host([selected]) button:hover {\n color: var(--uui-interface-select-contrast-hover,#FEFEFE);\n }\n :host([selected]) #label-button-background {\n background-color: var(--uui-interface-select,#3544B1);\n }\n :host([selected]) #label-button:hover + #label-button-background {\n background-color: var(--uui-interface-select-hover,rgb(70, 86, 200));\n }\n :host([selected][disabled]) #label-button {\n color: var(--uui-interface-select-contrast-disabled,rgb(228, 228, 228));\n background-color: var(--uui-interface-select-disabled,rgb(87, 87, 87));\n }\n\n slot:not([name]) {\n position: relative;\n display: block;\n width: 100%;\n }\n slot:not([name]) {\n --uui-menu-item-indent: var(--uui-menu-item-child-indent);\n }\n\n slot[name='actions'] {\n display: flex;\n align-items: center;\n --uui-button-height: calc(var(--uui-size-base-unit) * 4);\n margin-right: var(--uui-size-base-unit);\n }\n `\n];\n__decorateClass([\n property({ type: Boolean, reflect: true })\n], UUIMenuItemElement.prototype, \"disabled\", 2);\n__decorateClass([\n property({ type: Boolean, reflect: true, attribute: \"show-children\" })\n], UUIMenuItemElement.prototype, \"showChildren\", 2);\n__decorateClass([\n property({ type: Boolean, attribute: \"has-children\" })\n], UUIMenuItemElement.prototype, \"hasChildren\", 2);\n__decorateClass([\n property({ type: Boolean, attribute: \"loading\" })\n], UUIMenuItemElement.prototype, \"loading\", 2);\n\nexport { UUIMenuItemElement };\n","import { UUIMenuItemElement } from './uui-menu-item.element';\nimport { defineElement } from '@umbraco-ui/uui-base/lib/registration';\n\ndefineElement('uui-menu-item', UUIMenuItemElement as any);\n","const defineElement = (name, constructor, options) => {\n const isValidElementName = name.indexOf(\"-\") > 0;\n if (isValidElementName === false) {\n console.error(`${name} is not a valid custom element name. A custom element name should consist of at least two words separated by a hyphen.`);\n return;\n }\n if (customElements.get(name)) {\n console.error(`${name} is already defined`);\n } else {\n customElements.define(name, constructor, options);\n }\n};\n\nexport { defineElement };\n"],"names":["t","e","n","o","s","r","i","S","h","l","property","__defProp$1","html","state","__defProp","__getOwnPropDesc","__decorateClass","LitElement","css"],"mappings":"whBAAA;AAAA;AAAA;AAAA;AAAA,GAKA,KAAMA,GAAE,OAAO,YAAa,CAAS,OAAO,WAAhB,QAA0B,OAAO,SAAS,eAAe,sBAAuB,UAAS,WAAW,WAAY,eAAc,UAAUC,EAAE,SAASC,EAAE,GAAI,KAAI,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,GAAG,KAAK,aAAa,GAAG,IAAID,EAAE,KAAM,OAAM,qEAAqE,KAAK,QAAQ,KAAM,aAAY,CAAC,GAAI,GAAEC,EAAE,IAAI,KAAK,SAAS,MAAOF,IAAG,AAAS,IAAT,QAAaE,GAAE,IAAI,KAAK,QAAQ,EAAE,GAAI,gBAAe,EAAE,YAAY,KAAK,UAAU,EAAE,UAAU,CAAC,MAAO,MAAK,SAAS,KAAMC,IAAE,GAAG,GAAIC,GAAE,AAAU,MAAO,IAAjB,SAAmB,EAAE,EAAE,GAAGH,GAAGI,GAAE,CAAC,KAAK,IAAI,CAAC,KAAM,GAAE,AAAI,EAAE,SAAN,EAAa,EAAE,GAAG,EAAE,OAAQ,CAAC,EAAE,EAAE,IAAI,EAAG,IAAG,CAAC,GAAG,AAAK,EAAE,eAAP,GAAoB,MAAO,GAAE,QAAQ,GAAG,AAAU,MAAO,IAAjB,SAAmB,MAAO,GAAE,KAAM,OAAM,mEAAmE,EAAE,0FAA0F,GAAG,EA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OAAS,CAC1BM,24FAiJF,EAAgB,CACdR,EAAS,CAAE,KAAM,QAAS,QAAS,MAClC,EAAmB,UAAW,WAAY,GAC7C,EAAgB,CACdA,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,UAAW,mBACnD,EAAmB,UAAW,eAAgB,GACjD,EAAgB,CACdA,EAAS,CAAE,KAAM,QAAS,UAAW,kBACpC,EAAmB,UAAW,cAAe,GAChD,EAAgB,CACdA,EAAS,CAAE,KAAM,QAAS,UAAW,aACpC,EAAmB,UAAW,UAAW,GCvN5C,ACHsB,EAAC,EAAM,EAAa,IAAY,IAEhD,AADuB,EAAK,QAAQ,KAAO,IACpB,GAAO,SACxB,MAAM,GAAG,kIAGf,eAAe,IAAI,WACb,MAAM,GAAG,uCAEF,OAAO,EAAM,EAAa,KDN/B,gBAAiB"}
|
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
import { LitElement, html, css } from 'lit';
|
|
2
|
-
import { property } from 'lit/decorators.js';
|
|
3
|
-
import { SelectableMixin, ActiveMixin, LabelMixin } from '@umbraco-ui/uui-base/lib/mixins';
|
|
4
|
-
import { UUIEvent } from '@umbraco-ui/uui-base/lib/events';
|
|
5
|
-
|
|
6
|
-
class UUIMenuItemEvent extends UUIEvent {
|
|
7
|
-
}
|
|
8
|
-
UUIMenuItemEvent.SHOW_CHILDREN = "show-children";
|
|
9
|
-
UUIMenuItemEvent.HIDE_CHILDREN = "hide-children";
|
|
10
|
-
UUIMenuItemEvent.CLICK_LABEL = "click-label";
|
|
11
|
-
|
|
12
|
-
var __defProp = Object.defineProperty;
|
|
13
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
14
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
15
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
16
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
17
|
-
if (decorator = decorators[i])
|
|
18
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
19
|
-
if (kind && result)
|
|
20
|
-
__defProp(target, key, result);
|
|
21
|
-
return result;
|
|
22
|
-
};
|
|
23
|
-
class UUIMenuItemElement extends SelectableMixin(ActiveMixin(LabelMixin("label", LitElement))) {
|
|
24
|
-
constructor() {
|
|
25
|
-
super(...arguments);
|
|
26
|
-
this.disabled = false;
|
|
27
|
-
this.showChildren = false;
|
|
28
|
-
this.hasChildren = false;
|
|
29
|
-
this.loading = false;
|
|
30
|
-
}
|
|
31
|
-
onCaretClicked() {
|
|
32
|
-
this.showChildren = !this.showChildren;
|
|
33
|
-
const eventName = this.showChildren ? UUIMenuItemEvent.SHOW_CHILDREN : UUIMenuItemEvent.HIDE_CHILDREN;
|
|
34
|
-
const event = new UUIMenuItemEvent(eventName);
|
|
35
|
-
this.dispatchEvent(event);
|
|
36
|
-
}
|
|
37
|
-
onLabelClicked() {
|
|
38
|
-
const event = new UUIMenuItemEvent(UUIMenuItemEvent.CLICK_LABEL);
|
|
39
|
-
this.dispatchEvent(event);
|
|
40
|
-
}
|
|
41
|
-
render() {
|
|
42
|
-
return html`
|
|
43
|
-
<div id="menu-item" aria-label="menuitem" role="menuitem">
|
|
44
|
-
${this.hasChildren ? html`<button id="caret-button" @click=${this.onCaretClicked}>
|
|
45
|
-
<uui-caret ?open=${this.showChildren}></uui-caret>
|
|
46
|
-
</button>` : ""}
|
|
47
|
-
<button
|
|
48
|
-
id="label-button"
|
|
49
|
-
@click=${this.onLabelClicked}
|
|
50
|
-
?disabled=${this.disabled}
|
|
51
|
-
aria-label="${this.label}">
|
|
52
|
-
${this.renderLabel()}
|
|
53
|
-
</button>
|
|
54
|
-
<div id="label-button-background"></div>
|
|
55
|
-
<slot id="actions-container" name="actions"></slot>
|
|
56
|
-
${this.loading ? html`<uui-loader-bar id="loader"></uui-loader-bar>` : ""}
|
|
57
|
-
</div>
|
|
58
|
-
${this.showChildren ? html`<slot></slot>` : ""}
|
|
59
|
-
`;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
UUIMenuItemElement.styles = [
|
|
63
|
-
css`
|
|
64
|
-
:host {
|
|
65
|
-
display: block;
|
|
66
|
-
background-color: var(--uui-interface-surface,#FEFEFE);
|
|
67
|
-
/** consider transparent. */
|
|
68
|
-
--uui-menu-item-child-indent: calc(var(--uui-menu-item-indent, 0) + 1);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
#menu-item {
|
|
72
|
-
position: relative;
|
|
73
|
-
display: flex;
|
|
74
|
-
align-items: stretch;
|
|
75
|
-
padding-left: calc(
|
|
76
|
-
var(--uui-menu-item-indent, 0) * var(--uui-size-8, 24px)
|
|
77
|
-
);
|
|
78
|
-
|
|
79
|
-
display: grid;
|
|
80
|
-
grid-template-columns: 24px 1fr;
|
|
81
|
-
grid-template-rows: 1fr;
|
|
82
|
-
white-space: nowrap;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
button {
|
|
86
|
-
display: block;
|
|
87
|
-
padding: 0;
|
|
88
|
-
text-align: left;
|
|
89
|
-
box-shadow: none;
|
|
90
|
-
border: none;
|
|
91
|
-
color: inherit;
|
|
92
|
-
background-color: transparent;
|
|
93
|
-
cursor: pointer;
|
|
94
|
-
z-index: 1;
|
|
95
|
-
/* padding: 0 var(--uui-size-base-unit) 0 var(--uui-size-base-unit); */
|
|
96
|
-
min-height: var(--uui-size-12,36px);
|
|
97
|
-
}
|
|
98
|
-
button:hover {
|
|
99
|
-
color: var(--uui-interface-contrast-hover,#1B264F);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
#label-button {
|
|
103
|
-
flex-grow: 1;
|
|
104
|
-
grid-column-start: 2;
|
|
105
|
-
white-space: nowrap;
|
|
106
|
-
overflow: hidden;
|
|
107
|
-
text-overflow: ellipsis;
|
|
108
|
-
}
|
|
109
|
-
#caret-button + #label-button {
|
|
110
|
-
padding-left: 0;
|
|
111
|
-
}
|
|
112
|
-
#caret-button {
|
|
113
|
-
width: 100%;
|
|
114
|
-
height: 100%;
|
|
115
|
-
display: flex;
|
|
116
|
-
align-items: center;
|
|
117
|
-
justify-content: center;
|
|
118
|
-
}
|
|
119
|
-
#caret-button:hover {
|
|
120
|
-
background-color: var(--uui-interface-surface-hover,rgb(250, 250, 250));
|
|
121
|
-
}
|
|
122
|
-
#label-button-background {
|
|
123
|
-
position: absolute;
|
|
124
|
-
top: 0;
|
|
125
|
-
left: 0;
|
|
126
|
-
right: 0;
|
|
127
|
-
bottom: 0;
|
|
128
|
-
}
|
|
129
|
-
#label-button:hover + #label-button-background {
|
|
130
|
-
background-color: var(--uui-interface-surface-hover,rgb(250, 250, 250));
|
|
131
|
-
}
|
|
132
|
-
#actions-container {
|
|
133
|
-
opacity: 0;
|
|
134
|
-
transition: opacity 120ms;
|
|
135
|
-
grid-column-start: 3;
|
|
136
|
-
}
|
|
137
|
-
#menu-item:hover #actions-container {
|
|
138
|
-
opacity: 1;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
#loader {
|
|
142
|
-
position: absolute;
|
|
143
|
-
width: 100%;
|
|
144
|
-
bottom: 0;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
:host([disabled]) #label-button {
|
|
148
|
-
color: var(--uui-interface-surface-contrast-disabled);
|
|
149
|
-
}
|
|
150
|
-
:host([disabled]) #label-button-background {
|
|
151
|
-
background-color: var(--uui-interface-surface-disabled,rgb(228, 228, 228));
|
|
152
|
-
}
|
|
153
|
-
:host([disabled]) #label-button:hover + #label-button-background {
|
|
154
|
-
background-color: var(--uui-interface-surface-disabled,rgb(228, 228, 228));
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
:host([active]) button {
|
|
158
|
-
color: var(--uui-interface-active-contrast,#162335);
|
|
159
|
-
}
|
|
160
|
-
:host([active]) button:hover {
|
|
161
|
-
color: var(--uui-interface-active-contrast-hover,#1B264F);
|
|
162
|
-
}
|
|
163
|
-
:host([active]) #label-button-background {
|
|
164
|
-
background-color: var(--uui-interface-active,#F5C1BC);
|
|
165
|
-
}
|
|
166
|
-
:host([active]) #label-button:hover + #label-button-background {
|
|
167
|
-
background-color: var(--uui-interface-active-hover,#F5C1BC);
|
|
168
|
-
}
|
|
169
|
-
:host([active][disabled]) #label-button {
|
|
170
|
-
color: var(--uui-interface-active-contrast-disabled,rgb(54, 54, 54));
|
|
171
|
-
background-color: var(--uui-interface-active-disabled,rgb(219, 212, 212));
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
:host([selected]) button {
|
|
175
|
-
color: var(--uui-interface-select-contrast,#FEFEFE);
|
|
176
|
-
}
|
|
177
|
-
:host([selected]) button:hover {
|
|
178
|
-
color: var(--uui-interface-select-contrast-hover,#FEFEFE);
|
|
179
|
-
}
|
|
180
|
-
:host([selected]) #label-button-background {
|
|
181
|
-
background-color: var(--uui-interface-select,#3544B1);
|
|
182
|
-
}
|
|
183
|
-
:host([selected]) #label-button:hover + #label-button-background {
|
|
184
|
-
background-color: var(--uui-interface-select-hover,rgb(70, 86, 200));
|
|
185
|
-
}
|
|
186
|
-
:host([selected][disabled]) #label-button {
|
|
187
|
-
color: var(--uui-interface-select-contrast-disabled,rgb(228, 228, 228));
|
|
188
|
-
background-color: var(--uui-interface-select-disabled,rgb(87, 87, 87));
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
slot:not([name]) {
|
|
192
|
-
position: relative;
|
|
193
|
-
display: block;
|
|
194
|
-
width: 100%;
|
|
195
|
-
}
|
|
196
|
-
slot:not([name]) {
|
|
197
|
-
--uui-menu-item-indent: var(--uui-menu-item-child-indent);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
slot[name='actions'] {
|
|
201
|
-
display: flex;
|
|
202
|
-
align-items: center;
|
|
203
|
-
--uui-button-height: calc(var(--uui-size-base-unit) * 4);
|
|
204
|
-
margin-right: var(--uui-size-base-unit);
|
|
205
|
-
}
|
|
206
|
-
`
|
|
207
|
-
];
|
|
208
|
-
__decorateClass([
|
|
209
|
-
property({ type: Boolean, reflect: true })
|
|
210
|
-
], UUIMenuItemElement.prototype, "disabled", 2);
|
|
211
|
-
__decorateClass([
|
|
212
|
-
property({ type: Boolean, reflect: true, attribute: "show-children" })
|
|
213
|
-
], UUIMenuItemElement.prototype, "showChildren", 2);
|
|
214
|
-
__decorateClass([
|
|
215
|
-
property({ type: Boolean, attribute: "has-children" })
|
|
216
|
-
], UUIMenuItemElement.prototype, "hasChildren", 2);
|
|
217
|
-
__decorateClass([
|
|
218
|
-
property({ type: Boolean, attribute: "loading" })
|
|
219
|
-
], UUIMenuItemElement.prototype, "loading", 2);
|
|
220
|
-
|
|
221
|
-
export { UUIMenuItemElement };
|