@ni/nimble-components 31.0.0 → 31.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16032,7 +16032,7 @@
16032
16032
 
16033
16033
  /**
16034
16034
  * Do not edit directly
16035
- * Generated on Fri, 02 Aug 2024 22:00:00 GMT
16035
+ * Generated on Fri, 02 Aug 2024 22:39:40 GMT
16036
16036
  */
16037
16037
 
16038
16038
  const Information100DarkUi = "#a46eff";
@@ -20528,9 +20528,9 @@ so this becomes the fallback color for the slot */ ''}
20528
20528
  :host {
20529
20529
  color: ${bodyFontColor};
20530
20530
  font: ${bodyFont};
20531
- height: ${controlHeight};
20532
20531
  position: relative;
20533
- justify-content: center;
20532
+ flex-direction: column;
20533
+ justify-content: flex-start;
20534
20534
  ${userSelectNone}
20535
20535
  min-width: ${menuMinWidth};
20536
20536
  outline: none;
@@ -20546,7 +20546,7 @@ so this becomes the fallback color for the slot */ ''}
20546
20546
  bottom: calc(${borderWidth} + var(--ni-private-indicator-lines-gap));
20547
20547
  width: 0px;
20548
20548
  height: 0px;
20549
- justify-self: center;
20549
+ align-self: center;
20550
20550
  border-bottom: ${borderHoverColor}
20551
20551
  var(--ni-private-focus-indicator-width) solid;
20552
20552
  transition: width ${smallDelay} ease-in;
@@ -20572,7 +20572,7 @@ so this becomes the fallback color for the slot */ ''}
20572
20572
  bottom: calc(-1 * ${borderWidth});
20573
20573
  width: 0px;
20574
20574
  height: 0px;
20575
- justify-self: center;
20575
+ align-self: center;
20576
20576
  border-bottom: ${borderHoverColor}
20577
20577
  var(--ni-private-hover-indicator-width) solid;
20578
20578
  transition: width ${smallDelay} ease-in;
@@ -20597,12 +20597,22 @@ so this becomes the fallback color for the slot */ ''}
20597
20597
  width: 0px;
20598
20598
  }
20599
20599
 
20600
+ .label {
20601
+ display: flex;
20602
+ color: ${controlLabelFontColor};
20603
+ font: ${controlLabelFont};
20604
+ }
20605
+
20606
+ :host([disabled]) .label {
20607
+ color: ${controlLabelDisabledFontColor};
20608
+ }
20609
+
20600
20610
  .control {
20601
20611
  align-items: center;
20602
20612
  cursor: pointer;
20603
20613
  display: flex;
20604
- min-height: 100%;
20605
20614
  width: 100%;
20615
+ height: ${controlHeight};
20606
20616
  border: 0px solid rgba(${borderRgbPartialColor}, 0.3);
20607
20617
  background-color: transparent;
20608
20618
  padding: ${borderWidth};
@@ -20975,6 +20985,9 @@ so this becomes the fallback color for the slot */ ''}
20975
20985
  @focusout="${(x, c) => x.focusoutHandler(c.event)}"
20976
20986
  @keydown="${(x, c) => x.keydownHandler(c.event)}"
20977
20987
  >
20988
+ <label part="label" class="label">
20989
+ <slot></slot>
20990
+ </label>
20978
20991
  <div class="control" part="control" ${ref('controlWrapper')}>
20979
20992
  ${startSlotTemplate(context, definition)}
20980
20993
  <slot name="control">
@@ -21739,8 +21752,7 @@ so this becomes the fallback color for the slot */ ''}
21739
21752
  @keydown="${(x, c) => x.toggleButtonKeyDownHandler(c.event)}"
21740
21753
  class="dropdown-button"
21741
21754
  part="button"
21742
- aria-haspopup="true"
21743
- aria-expanded="${x => x.open}"
21755
+ aria-hidden="true"
21744
21756
  tabindex="-1"
21745
21757
  >
21746
21758
  <${iconArrowExpanderDownTag}
@@ -60366,6 +60378,7 @@ img.ProseMirror-separator {
60366
60378
  aria-disabled="${x => x.ariaDisabled}"
60367
60379
  aria-expanded="${x => x.ariaExpanded}"
60368
60380
  aria-haspopup="${x => (x.collapsible ? 'listbox' : null)}"
60381
+ aria-label="${x => x.labelContent}"
60369
60382
  aria-multiselectable="${x => x.ariaMultiSelectable}"
60370
60383
  ?open="${x => x.open}"
60371
60384
  role="combobox"
@@ -60377,6 +60390,9 @@ img.ProseMirror-separator {
60377
60390
  @keydown="${(x, c) => x.keydownHandler(c.event)}"
60378
60391
  @mousedown="${(x, c) => x.mousedownHandler(c.event)}"
60379
60392
  >
60393
+ <label part="label" class="label" aria-hidden="true">
60394
+ <slot ${ref('labelSlot')}></slot>
60395
+ </label>
60380
60396
  ${when(x => x.collapsible, html `
60381
60397
  <div
60382
60398
  class="control"
@@ -60562,6 +60578,17 @@ img.ProseMirror-separator {
60562
60578
  get collapsible() {
60563
60579
  return !(this.multiple || typeof this.size === 'number');
60564
60580
  }
60581
+ /** @internal */
60582
+ get labelContent() {
60583
+ if (!this.$fastController.isConnected) {
60584
+ return '';
60585
+ }
60586
+ const nodes = this.labelSlot.assignedNodes();
60587
+ return nodes
60588
+ .filter(node => node.textContent?.trim() !== '')
60589
+ .map(node => node.textContent?.trim())
60590
+ .join(' ');
60591
+ }
60565
60592
  /**
60566
60593
  * @internal
60567
60594
  */
@@ -61527,6 +61554,9 @@ img.ProseMirror-separator {
61527
61554
  __decorate$1([
61528
61555
  volatile
61529
61556
  ], Select.prototype, "collapsible", null);
61557
+ __decorate$1([
61558
+ volatile
61559
+ ], Select.prototype, "labelContent", null);
61530
61560
  __decorate$1([
61531
61561
  volatile
61532
61562
  ], Select.prototype, "displayValue", null);