@ni/nimble-components 8.2.0 → 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.
- package/dist/all-components-bundle.js +30 -6
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +25 -4
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/nimble-components/src/toggle-button/index.d.ts +3 -1
- package/dist/esm/toggle-button/index.d.ts +3 -1
- package/dist/esm/toggle-button/index.js +2 -2
- package/dist/esm/toggle-button/index.js.map +1 -1
- package/dist/esm/toggle-button/template.js +29 -5
- package/dist/esm/toggle-button/template.js.map +1 -1
- package/package.json +1 -1
|
@@ -18506,14 +18506,38 @@
|
|
|
18506
18506
|
<div
|
|
18507
18507
|
role="button"
|
|
18508
18508
|
part="control"
|
|
18509
|
-
|
|
18510
|
-
aria-disabled="${(x) => x.disabled}"
|
|
18511
|
-
aria-readonly="${(x) => x.readOnly}"
|
|
18512
|
-
tabindex="${(x) => (x.disabled ? null : 0)}"
|
|
18509
|
+
tabindex="${x => (x.disabled ? null : 0)}"
|
|
18513
18510
|
@keypress="${(x, c) => x.keypressHandler(c.event)}"
|
|
18514
18511
|
@click="${(x, c) => x.clickHandler(c.event)}"
|
|
18515
|
-
class="control ${
|
|
18512
|
+
class="control ${x => (x.checked ? 'checked' : '')}"
|
|
18516
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}"
|
|
18517
18541
|
${ref('control')}
|
|
18518
18542
|
>
|
|
18519
18543
|
${startSlotTemplate(context, definition)}
|
|
@@ -18556,7 +18580,7 @@
|
|
|
18556
18580
|
__decorate([
|
|
18557
18581
|
attr({ attribute: 'content-hidden', mode: 'boolean' })
|
|
18558
18582
|
], ToggleButton.prototype, "contentHidden", void 0);
|
|
18559
|
-
applyMixins(ToggleButton, StartEnd);
|
|
18583
|
+
applyMixins(ToggleButton, StartEnd, DelegatesARIAButton);
|
|
18560
18584
|
const nimbleToggleButton = ToggleButton.compose({
|
|
18561
18585
|
baseName: 'toggle-button',
|
|
18562
18586
|
template,
|