@umbraco-ui/uui-menu-item 0.2.1 → 1.0.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.
Files changed (2) hide show
  1. package/lib/index.js +50 -55
  2. package/package.json +5 -5
package/lib/index.js CHANGED
@@ -76,7 +76,7 @@ let UUIMenuItemElement = class extends SelectOnlyMixin(SelectableMixin(ActiveMix
76
76
  ${ref(this.labelButtonChanged)}
77
77
  href=${ifDefined(this.href)}
78
78
  target=${ifDefined(this.target || void 0)}
79
- rel=${ifDefined(this.target === "_blank" ? "noopener" : void 0)}
79
+ rel=${ifDefined(this.target === "_blank" ? "noopener noreferrer" : void 0)}
80
80
  @click=${this.onLabelClicked}
81
81
  ?disabled=${this.disabled}
82
82
  aria-label="${this.label}">
@@ -120,15 +120,61 @@ UUIMenuItemElement.styles = [
120
120
 
121
121
  #menu-item {
122
122
  position: relative;
123
-
124
123
  padding-left: calc(var(--uui-menu-item-indent, 0) * var(--uui-size-4,12px));
125
-
126
124
  display: grid;
127
125
  grid-template-columns: var(--uui-size-8,24px) 1fr;
128
126
  grid-template-rows: 1fr;
129
127
  white-space: nowrap;
130
128
  }
131
129
 
130
+ :host(:not([active], [selected], [disabled]))
131
+ #menu-item
132
+ #label-button:hover
133
+ ~ #label-button-background,
134
+ :host(:not([active], [selected], [disabled]))
135
+ #menu-item
136
+ #caret-button:hover {
137
+ background-color: var(--uui-color-surface-emphasis,rgb(250, 250, 250));
138
+ }
139
+ :host(:not([active], [selected], [disabled]))
140
+ #menu-item
141
+ #label-button:hover,
142
+ :host(:not([active], [selected])) #menu-item #caret-button:hover {
143
+ color: var(--uui-color-interactive-emphasis,#3544b1);
144
+ }
145
+
146
+ :host([active]) #label-button,
147
+ :host([active]) #caret-button {
148
+ color: var(--uui-color-current-contrast,#1b264f);
149
+ }
150
+ :host([active]) #label-button-background {
151
+ background-color: var(--uui-color-current,#f5c1bc);
152
+ }
153
+ :host([active]) #label-button:hover ~ #label-button-background,
154
+ :host([active]) #caret-button:hover {
155
+ background-color: var(--uui-color-current-emphasis,rgb(248, 214, 211));
156
+ }
157
+
158
+ :host([selected]) #label-button,
159
+ :host([selected]) #caret-button {
160
+ color: var(--uui-color-selected-contrast,#fff);
161
+ }
162
+ :host([selected]) #label-button-background {
163
+ background-color: var(--uui-color-selected,#3544b1);
164
+ }
165
+ :host([selected]) #label-button:hover ~ #label-button-background,
166
+ :host([selected]) #caret-button:hover {
167
+ background-color: var(--uui-color-selected-emphasis,rgb(70, 86, 200));
168
+ }
169
+
170
+ :host([disabled]) #menu-item {
171
+ color: var(--uui-color-disabled-contrast,#c4c4c4);
172
+ background-color: var(--uui-color-disabled,#f3f3f5);
173
+ }
174
+ :host([disabled]) #label-button {
175
+ cursor: default;
176
+ }
177
+
132
178
  button {
133
179
  display: inline-flex;
134
180
  align-items: center;
@@ -145,9 +191,6 @@ UUIMenuItemElement.styles = [
145
191
  min-height: var(--uui-size-12,36px);
146
192
  z-index: 1;
147
193
  }
148
- /* button:hover {
149
- color: var(--uui-interface-contrast-hover);
150
- } */
151
194
 
152
195
  #label-button {
153
196
  flex-grow: 1;
@@ -182,6 +225,7 @@ UUIMenuItemElement.styles = [
182
225
  display: flex;
183
226
  align-items: center;
184
227
  justify-content: center;
228
+ color: var(--uui-color-interactive,#1b264f);
185
229
  }
186
230
 
187
231
  #label-button-background {
@@ -191,10 +235,6 @@ UUIMenuItemElement.styles = [
191
235
  right: 0;
192
236
  bottom: 0;
193
237
  }
194
- #label-button:hover + #label-button-background,
195
- #caret-button:hover ~ #label-button-background {
196
- background-color: var(--uui-interface-surface-hover,rgb(250, 250, 250));
197
- }
198
238
 
199
239
  #actions-container {
200
240
  opacity: 0;
@@ -227,51 +267,6 @@ UUIMenuItemElement.styles = [
227
267
  margin-left: 6px;
228
268
  }
229
269
 
230
- :host([disabled]) {
231
- color: var(--uui-interface-surface-contrast-disabled);
232
- }
233
- :host([disabled]) #label-button-background {
234
- background-color: var(--uui-interface-surface-disabled,rgb(228, 228, 228));
235
- }
236
- :host([disabled]) #label-button:hover + #label-button-background {
237
- background-color: var(--uui-interface-surface-disabled,rgb(228, 228, 228));
238
- }
239
-
240
- :host([active]) {
241
- color: var(--uui-interface-active-contrast,#162335);
242
- }
243
- :host([active]) #label-button:hover {
244
- color: var(--uui-interface-active-contrast-hover,#1b264f);
245
- }
246
- :host([active]) #label-button-background {
247
- background-color: var(--uui-interface-active,#f5c1bc);
248
- }
249
- :host([active]) #label-button:hover + #label-button-background {
250
- background-color: var(--uui-interface-active-hover,#f5c1bc);
251
- }
252
- :host([active][disabled]) #label-button {
253
- color: var(--uui-interface-active-contrast-disabled,rgb(54, 54, 54));
254
- background-color: var(--uui-interface-active-disabled,rgb(219, 212, 212));
255
- }
256
-
257
- :host([selected]) {
258
- color: var(--uui-interface-select-contrast,#fefefe);
259
- }
260
- :host([selected]) #label-button:hover {
261
- color: var(--uui-interface-select-contrast-hover,#fefefe);
262
- }
263
- :host([selected]) #label-button-background {
264
- background-color: var(--uui-interface-select,#3544b1);
265
- }
266
- :host([selected]) #label-button:hover + #label-button-background,
267
- :host([selected]) #caret-button:hover ~ #label-button-background {
268
- background-color: var(--uui-interface-select-hover,rgb(70, 86, 200));
269
- }
270
- :host([selected][disabled]) #label-button {
271
- color: var(--uui-interface-select-contrast-disabled,rgb(228, 228, 228));
272
- background-color: var(--uui-interface-select-disabled,rgb(87, 87, 87));
273
- }
274
-
275
270
  slot:not([name]) {
276
271
  position: relative;
277
272
  display: block;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umbraco-ui/uui-menu-item",
3
- "version": "0.2.1",
3
+ "version": "1.0.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": "0.2.1",
34
- "@umbraco-ui/uui-loader-bar": "0.2.1",
35
- "@umbraco-ui/uui-symbol-expand": "0.2.1"
33
+ "@umbraco-ui/uui-base": "1.0.0-rc.1",
34
+ "@umbraco-ui/uui-loader-bar": "1.0.0-rc.1",
35
+ "@umbraco-ui/uui-symbol-expand": "1.0.0-rc.1"
36
36
  },
37
37
  "scripts": {
38
38
  "build": "npm run analyze && tsc --build --force && 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": "cb61546f85d6c2f122fa8c130409507e8def4bd5"
46
+ "gitHead": "127e036dbafa18cc37027591d6548a4cb4700d33"
47
47
  }