@umbraco-ui/uui-menu-item 1.7.0 → 1.8.0-rc.1

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.
@@ -211,6 +211,42 @@
211
211
  {
212
212
  "name": "--uui-menu-item-flat-structure",
213
213
  "description": "set to 1 to remove the indentation of the chevron. Use this when you have a flat menu structure"
214
+ },
215
+ {
216
+ "name": "--uui-menu-item-background-color-hover",
217
+ "description": "background color when hovering"
218
+ },
219
+ {
220
+ "name": "--uui-menu-item-color-hover",
221
+ "description": "text color when hovering"
222
+ },
223
+ {
224
+ "name": "--uui-menu-item-background-color-active",
225
+ "description": "background color when active"
226
+ },
227
+ {
228
+ "name": "--uui-menu-item-color-active",
229
+ "description": "text color when active"
230
+ },
231
+ {
232
+ "name": "--uui-menu-item-background-color-disabled",
233
+ "description": "background color when disabled"
234
+ },
235
+ {
236
+ "name": "--uui-menu-item-color-disabled",
237
+ "description": "text color when disabled"
238
+ },
239
+ {
240
+ "name": "--uui-menu-item-background-color-selected",
241
+ "description": "background color when selected"
242
+ },
243
+ {
244
+ "name": "--uui-menu-item-color-selected",
245
+ "description": "text color when selected"
246
+ },
247
+ {
248
+ "name": "--uui-menu-item-color-background-selected-hover",
249
+ "description": "text color when selected"
214
250
  }
215
251
  ]
216
252
  }
package/lib/index.js CHANGED
@@ -146,32 +146,53 @@ UUIMenuItemElement.styles = [
146
146
  :host(:not([active], [selected], [disabled]))
147
147
  #menu-item
148
148
  #caret-button:hover {
149
- background-color: var(--uui-color-surface-emphasis,rgb(250, 250, 250));
149
+ background-color: var(
150
+ --uui-menu-item-background-color-hover,
151
+ var(--uui-color-surface-emphasis,rgb(250, 250, 250))
152
+ );
150
153
  }
151
154
  :host(:not([active], [selected], [disabled]))
152
155
  #menu-item
153
156
  #label-button:hover,
154
157
  :host(:not([active], [selected])) #menu-item #caret-button:hover {
155
- color: var(--uui-color-interactive-emphasis,#3544b1);
158
+ color: var(
159
+ --uui-menu-item-color-hover,
160
+ var(--uui-color-interactive-emphasis,#3544b1)
161
+ );
156
162
  }
157
163
 
158
164
  /** Active */
159
165
  :host([active]) #label-button,
160
166
  :host([active]) #caret-button {
161
- color: var(--uui-color-current-contrast,#1b264f);
167
+ color: var(
168
+ --uui-menu-item-color-active,
169
+ var(--uui-color-current-contrast,#1b264f)
170
+ );
162
171
  }
163
172
  :host([active]) #label-button-background {
164
- background-color: var(--uui-color-current,#f5c1bc);
173
+ background-color: var(
174
+ --uui-menu-item-background-color-active,
175
+ var(--uui-color-current,#f5c1bc)
176
+ );
165
177
  }
166
178
  :host([active]) #label-button:hover ~ #label-button-background,
167
179
  :host([active]) #caret-button:hover {
168
- background-color: var(--uui-color-current-emphasis,rgb(248, 214, 211));
180
+ background-color: var(
181
+ --uui-menu-item-background-color-active-hover,
182
+ var(--uui-color-current-emphasis,rgb(248, 214, 211))
183
+ );
169
184
  }
170
185
 
171
186
  /** Disabled */
172
187
  :host([disabled]) #menu-item {
173
- color: var(--uui-color-disabled-contrast,#c4c4c4);
174
- background-color: var(--uui-color-disabled,#f3f3f5);
188
+ color: var(
189
+ --uui-menu-item-color-disabled,
190
+ var(--uui-color-disabled-contrast,#c4c4c4)
191
+ );
192
+ background-color: var(
193
+ --uui-menu-item-background-color-disabled,
194
+ var(--uui-color-disabled,#f3f3f5)
195
+ );
175
196
  }
176
197
 
177
198
  /** Selected */
@@ -179,11 +200,17 @@ UUIMenuItemElement.styles = [
179
200
  #label-button,
180
201
  :host([selected]:not([select-mode='highlight'], [disabled]))
181
202
  #caret-button {
182
- color: var(--uui-color-selected-contrast,#fff);
203
+ color: var(
204
+ --uui-menu-item-color-selected,
205
+ var(--uui-color-selected-contrast,#fff)
206
+ );
183
207
  }
184
208
  :host([selected]:not([select-mode='highlight'], [disabled]))
185
209
  #label-button-background {
186
- background-color: var(--uui-color-selected,#3544b1);
210
+ background-color: var(
211
+ --uui-menu-item-background-color-selected,
212
+ var(--uui-color-selected,#3544b1)
213
+ );
187
214
  }
188
215
  /** Selected, not highlight mode */
189
216
  :host([selected]:not([select-mode='highlight'], [disabled]))
@@ -191,7 +218,10 @@ UUIMenuItemElement.styles = [
191
218
  ~ #label-button-background,
192
219
  :host([selected]:not([select-mode='highlight'], [disabled]))
193
220
  #caret-button:hover {
194
- background-color: var(--uui-color-selected-emphasis,rgb(70, 86, 200));
221
+ background-color: var(
222
+ --uui-menu-item-background-color-selected-hover,
223
+ var(--uui-color-selected-emphasis,rgb(70, 86, 200))
224
+ );
195
225
  }
196
226
 
197
227
  /** highlight mode, default */
@@ -200,7 +230,10 @@ UUIMenuItemElement.styles = [
200
230
  #label-button:hover
201
231
  ~ #label-button-background {
202
232
  border-radius: var(--uui-border-radius,3px);
203
- background-color: var(--uui-color-surface-emphasis,rgb(250, 250, 250));
233
+ background-color: var(
234
+ --uui-menu-item-background-color-highlight,
235
+ var(--uui-color-surface-emphasis,rgb(250, 250, 250))
236
+ );
204
237
  }
205
238
 
206
239
  /** highlight mode, active */
@@ -216,7 +249,10 @@ UUIMenuItemElement.styles = [
216
249
  #label-button:hover
217
250
  ~ #label-button-background {
218
251
  border-radius: var(--uui-border-radius,3px);
219
- background-color: var(--uui-color-current-emphasis,rgb(248, 214, 211));
252
+ background-color: var(
253
+ --uui-menu-item-background-color-highlight-active-selected,
254
+ var(--uui-color-current-emphasis,rgb(248, 214, 211))
255
+ );
220
256
  }
221
257
 
222
258
  /** highlight mode, selected */
@@ -226,12 +262,18 @@ UUIMenuItemElement.styles = [
226
262
  :host([select-mode='highlight'][selected]:not([disabled]))
227
263
  #menu-item
228
264
  #caret-button {
229
- color: var(--uui-color-interactive,#1b264f);
265
+ color: var(
266
+ --uui-menu-item-color-highlight-selected,
267
+ var(--uui-color-interactive,#1b264f)
268
+ );
230
269
  }
231
270
  :host([select-mode='highlight'][selectable][selected]:not([disabled]))
232
271
  #menu-item
233
272
  #label-button:hover {
234
- color: var(--uui-color-interactive-emphasis,#3544b1);
273
+ color: var(
274
+ --uui-menu-item-background-color-highlight-selectable-selected,
275
+ var(--uui-color-interactive-emphasis,#3544b1)
276
+ );
235
277
  }
236
278
 
237
279
  /** highlight mode, selected, selectable caret hover */
@@ -239,8 +281,14 @@ UUIMenuItemElement.styles = [
239
281
  #menu-item
240
282
  #caret-button:hover {
241
283
  border-radius: var(--uui-border-radius,3px);
242
- background-color: var(--uui-color-surface-emphasis,rgb(250, 250, 250));
243
- color: var(--uui-color-interactive-emphasis,#3544b1);
284
+ background-color: var(
285
+ --uui-menu-item-background-color-highlight-selectable-selected,
286
+ var(--uui-color-surface-emphasis,rgb(250, 250, 250))
287
+ );
288
+ color: var(
289
+ --uui-menu-item-color-highlight-selectable-selected,
290
+ var(--uui-color-interactive-emphasis,#3544b1)
291
+ );
244
292
  }
245
293
 
246
294
  /** Highlight borders */
@@ -252,7 +300,8 @@ UUIMenuItemElement.styles = [
252
300
  position: absolute;
253
301
  content: '';
254
302
  inset: 1px;
255
- border: 2px solid var(--uui-color-selected,#3544b1);
303
+ border: 2px solid
304
+ var(--uui-menu-item-border-color-highlight, var(--uui-color-selected,#3544b1));
256
305
  opacity: 0;
257
306
  }
258
307
 
@@ -264,7 +313,8 @@ UUIMenuItemElement.styles = [
264
313
  position: absolute;
265
314
  content: '';
266
315
  inset: 1px 0 1px 1px;
267
- border: 2px solid var(--uui-color-selected,#3544b1);
316
+ border: 2px solid
317
+ var(--uui-menu-item-border-color-highlight, var(--uui-color-selected,#3544b1));
268
318
  border-right: none;
269
319
  }
270
320
 
@@ -326,6 +376,7 @@ UUIMenuItemElement.styles = [
326
376
  color: currentColor;
327
377
  min-height: var(--uui-size-12,36px);
328
378
  z-index: 1;
379
+ font-weight: inherit;
329
380
  }
330
381
 
331
382
  #label-button .label {
@@ -353,6 +404,7 @@ UUIMenuItemElement.styles = [
353
404
  left: 0;
354
405
  right: 0;
355
406
  bottom: 0;
407
+ border-radius: var(--uui-menu-item-border-radius, 0px);
356
408
  }
357
409
 
358
410
  #actions-container {
@@ -4,6 +4,15 @@ declare const UUIMenuItemElement_base: (new (...args: any[]) => import("@umbraco
4
4
  * @element uui-menu-item
5
5
  * @cssprop --uui-menu-item-indent - set indentation of the menu items
6
6
  * @cssprop --uui-menu-item-flat-structure - set to 1 to remove the indentation of the chevron. Use this when you have a flat menu structure
7
+ * @cssprop --uui-menu-item-background-color-hover - background color when hovering
8
+ * @cssprop --uui-menu-item-color-hover - text color when hovering
9
+ * @cssprop --uui-menu-item-background-color-active - background color when active
10
+ * @cssprop --uui-menu-item-color-active - text color when active
11
+ * @cssprop --uui-menu-item-background-color-disabled - background color when disabled
12
+ * @cssprop --uui-menu-item-color-disabled - text color when disabled
13
+ * @cssprop --uui-menu-item-background-color-selected - background color when selected
14
+ * @cssprop --uui-menu-item-color-selected - text color when selected
15
+ * @cssprop --uui-menu-item-color-background-selected-hover - text color when selected
7
16
  * @fires {UUIMenuItemEvent} show-children - fires when the expand icon is clicked to show nested menu items
8
17
  * @fires {UUIMenuItemEvent} hide-children - fires when the expend icon is clicked to hide nested menu items
9
18
  * @fires {UUIMenuItemEvent} click-label - fires when the label is clicked
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umbraco-ui/uui-menu-item",
3
- "version": "1.7.0",
3
+ "version": "1.8.0-rc.1",
4
4
  "license": "MIT",
5
5
  "keywords": [
6
6
  "Umbraco",
@@ -30,9 +30,9 @@
30
30
  "custom-elements.json"
31
31
  ],
32
32
  "dependencies": {
33
- "@umbraco-ui/uui-base": "1.7.0",
34
- "@umbraco-ui/uui-loader-bar": "1.7.0",
35
- "@umbraco-ui/uui-symbol-expand": "1.7.0"
33
+ "@umbraco-ui/uui-base": "1.8.0-rc.0",
34
+ "@umbraco-ui/uui-loader-bar": "1.8.0-rc.0",
35
+ "@umbraco-ui/uui-symbol-expand": "1.8.0-rc.0"
36
36
  },
37
37
  "scripts": {
38
38
  "build": "npm run analyze && tsc --build && rollup -c rollup.config.js",
@@ -43,5 +43,5 @@
43
43
  "access": "public"
44
44
  },
45
45
  "homepage": "https://uui.umbraco.com/?path=/story/uui-menu-item",
46
- "gitHead": "1f139dc2b4ed9ba7b9fb1af5e934589d7c4d8f06"
46
+ "gitHead": "0bb90095d63ffffb02f46691bb83568512dafefe"
47
47
  }