@ni/nimble-components 8.1.10 → 8.2.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.
@@ -18214,7 +18214,12 @@
18214
18214
  }
18215
18215
 
18216
18216
  [part='start'] {
18217
- display: none;
18217
+ display: contents;
18218
+ }
18219
+
18220
+ slot[name='start']::slotted(*) {
18221
+ margin-left: calc(${standardPadding} / 2);
18222
+ flex: none;
18218
18223
  }
18219
18224
 
18220
18225
  .control {
@@ -18501,14 +18506,38 @@
18501
18506
  <div
18502
18507
  role="button"
18503
18508
  part="control"
18504
- aria-pressed="${(x) => x.checked}"
18505
- aria-disabled="${(x) => x.disabled}"
18506
- aria-readonly="${(x) => x.readOnly}"
18507
- tabindex="${(x) => (x.disabled ? null : 0)}"
18509
+ tabindex="${x => (x.disabled ? null : 0)}"
18508
18510
  @keypress="${(x, c) => x.keypressHandler(c.event)}"
18509
18511
  @click="${(x, c) => x.clickHandler(c.event)}"
18510
- class="control ${(x) => (x.checked ? 'checked' : '')}"
18512
+ class="control ${x => (x.checked ? 'checked' : '')}"
18511
18513
  ?disabled="${x => x.disabled}"
18514
+ ${'' /* Configure aria-disabled, aria-readonly, and aria-pressed based on the
18515
+ toggle button's state to keep the ARIA attributes consistent with the component's
18516
+ state without a client having to configure ARIA attributes directly */}
18517
+ aria-disabled="${x => x.disabled}"
18518
+ aria-readonly="${x => x.readOnly}"
18519
+ aria-pressed="${x => x.checked}"
18520
+ ${'' /* Configure all other ARIA attributes based on the aria attributes
18521
+ configured on the toggle button */}
18522
+ aria-atomic="${x => x.ariaAtomic}"
18523
+ aria-busy="${x => x.ariaBusy}"
18524
+ aria-controls="${x => x.ariaControls}"
18525
+ aria-current="${x => x.ariaCurrent}"
18526
+ aria-describedby="${x => x.ariaDescribedby}"
18527
+ aria-details="${x => x.ariaDetails}"
18528
+ aria-errormessage="${x => x.ariaErrormessage}"
18529
+ aria-expanded="${x => x.ariaExpanded}"
18530
+ aria-flowto="${x => x.ariaFlowto}"
18531
+ aria-haspopup="${x => x.ariaHaspopup}"
18532
+ aria-hidden="${x => x.ariaHidden}"
18533
+ aria-invalid="${x => x.ariaInvalid}"
18534
+ aria-keyshortcuts="${x => x.ariaKeyshortcuts}"
18535
+ aria-label="${x => x.ariaLabel}"
18536
+ aria-labelledby="${x => x.ariaLabelledby}"
18537
+ aria-live="${x => x.ariaLive}"
18538
+ aria-owns="${x => x.ariaOwns}"
18539
+ aria-relevant="${x => x.ariaRelevant}"
18540
+ aria-roledescription="${x => x.ariaRoledescription}"
18512
18541
  ${ref('control')}
18513
18542
  >
18514
18543
  ${startSlotTemplate(context, definition)}
@@ -18551,7 +18580,7 @@
18551
18580
  __decorate([
18552
18581
  attr({ attribute: 'content-hidden', mode: 'boolean' })
18553
18582
  ], ToggleButton.prototype, "contentHidden", void 0);
18554
- applyMixins(ToggleButton, StartEnd);
18583
+ applyMixins(ToggleButton, StartEnd, DelegatesARIAButton);
18555
18584
  const nimbleToggleButton = ToggleButton.compose({
18556
18585
  baseName: 'toggle-button',
18557
18586
  template,