@ni/nimble-components 9.0.1 → 9.0.4

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.
@@ -2116,6 +2116,9 @@ const Dh=mt`
2116
2116
  width: max-content;
2117
2117
  box-shadow: 0px 2px 3px ${gn};
2118
2118
  }
2119
+ :host([slot='submenu']) {
2120
+ margin: 0 calc(${bn} * 2);
2121
+ }
2119
2122
  ::slotted(*) {
2120
2123
  padding-left: 8px;
2121
2124
  padding-right: 8px;
@@ -2123,7 +2126,7 @@ const Dh=mt`
2123
2126
  ::slotted(hr) {
2124
2127
  box-sizing: content-box;
2125
2128
  height: 2px;
2126
- margin: 4px;
2129
+ margin: ${bn};
2127
2130
  border: none;
2128
2131
  background: ${ln};
2129
2132
  opacity: 0.1;
@@ -2133,8 +2136,8 @@ const Dh=mt`
2133
2136
  font: ${sr};
2134
2137
  color: ${ir};
2135
2138
  text-transform: ${Hr};
2136
- padding-top: 4px;
2137
- padding-bottom: 4px;
2139
+ padding-top: ${bn};
2140
+ padding-bottom: ${bn};
2138
2141
  }
2139
2142
  `
2140
2143
  const Nh=class extends Zs{}.compose({baseName:"menu",baseClass:Zs,template:(t,e)=>X`
@@ -2156,7 +2159,8 @@ const jh=mt`
2156
2159
  overflow: visible;
2157
2160
  box-sizing: border-box;
2158
2161
  height: ${fn};
2159
- grid-template-columns: 0px 1fr;
2162
+ grid-template-columns: 1fr;
2163
+ column-gap: 8px;
2160
2164
  grid-template-rows: 1fr;
2161
2165
  justify-items: start;
2162
2166
  align-items: center;
@@ -2173,10 +2177,13 @@ const jh=mt`
2173
2177
  outline: 2px solid ${pn};
2174
2178
  outline-offset: -2px;
2175
2179
  }
2180
+ :host([expanded]) {
2181
+ background: ${an};
2182
+ }
2176
2183
  :host(:hover) {
2177
2184
  background: ${an};
2178
2185
  }
2179
- :host(:active) {
2186
+ :host(:active:not([expanded])) {
2180
2187
  background: ${on};
2181
2188
  }
2182
2189
  :host([disabled]) {
@@ -2187,9 +2194,14 @@ const jh=mt`
2187
2194
  :host([disabled]:hover) {
2188
2195
  background: transparent;
2189
2196
  }
2197
+ :host(.indent-0[aria-haspopup='menu']) {
2198
+ grid-template-columns: 1fr ${$n};
2199
+ }
2190
2200
  :host(.indent-1) {
2191
2201
  grid-template-columns: ${$n} 1fr;
2192
- column-gap: 8px;
2202
+ }
2203
+ :host(.indent-1[aria-haspopup='menu']) {
2204
+ grid-template-columns: ${$n} 1fr ${$n};
2193
2205
  }
2194
2206
  [part='start'] {
2195
2207
  display: contents;
@@ -2205,6 +2217,18 @@ const jh=mt`
2205
2217
  :host(.indent-1) .content {
2206
2218
  grid-column: 2;
2207
2219
  }
2220
+ .expand-collapse-glyph-container {
2221
+ grid-row: 1;
2222
+ fill: currentcolor;
2223
+ width: ${$n};
2224
+ height: ${$n};
2225
+ }
2226
+ :host(.indent-0) .expand-collapse-glyph-container {
2227
+ grid-column: 2;
2228
+ }
2229
+ :host(.indent-1) .expand-collapse-glyph-container {
2230
+ grid-column: 3;
2231
+ }
2208
2232
  `
2209
2233
  const qh=class extends Js{}.compose({baseName:"menu-item",baseClass:Js,template:(t,e)=>X`
2210
2234
  <template
@@ -2273,7 +2297,7 @@ const qh=class extends Js{}.compose({baseName:"menu-item",baseClass:Js,template:
2273
2297
  </${t.tagFor(De)}>
2274
2298
  `)}
2275
2299
  </template>
2276
- `,styles:jh})
2300
+ `,styles:jh,expandCollapseGlyph:Zr.data})
2277
2301
  Vs.getOrCreate().withPrefix("nimble").register(qh())
2278
2302
  const Uh=mt`
2279
2303
  ${Ei("inline-block")}