@ni/nimble-components 8.1.11 → 8.3.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.
- package/dist/all-components-bundle.js +42 -8
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +743 -715
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/nimble-components/src/theme-provider/design-tokens.d.ts +1 -0
- package/dist/esm/nimble-components/src/toggle-button/index.d.ts +3 -1
- package/dist/esm/text-field/styles.js +6 -1
- package/dist/esm/text-field/styles.js.map +1 -1
- package/dist/esm/theme-provider/design-token-comments.js +1 -0
- package/dist/esm/theme-provider/design-token-comments.js.map +1 -1
- package/dist/esm/theme-provider/design-token-names.js +1 -0
- package/dist/esm/theme-provider/design-token-names.js.map +1 -1
- package/dist/esm/theme-provider/design-tokens.d.ts +1 -0
- package/dist/esm/theme-provider/design-tokens.js +5 -1
- package/dist/esm/theme-provider/design-tokens.js.map +1 -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/dist/tokens-internal.scss +6 -0
- package/dist/tokens.scss +3 -0
- package/package.json +1 -1
|
@@ -12342,6 +12342,7 @@
|
|
|
12342
12342
|
fillSelectedRgbPartialColor: 'fill-selected-rgb-partial-color',
|
|
12343
12343
|
fillHoverSelectedColor: 'fill-hover-selected-color',
|
|
12344
12344
|
fillHoverColor: 'fill-hover-color',
|
|
12345
|
+
fillDownColor: 'fill-down-color',
|
|
12345
12346
|
borderColor: 'border-color',
|
|
12346
12347
|
borderRgbPartialColor: 'border-rgb-partial-color',
|
|
12347
12348
|
failColor: 'fail-color',
|
|
@@ -12598,10 +12599,11 @@
|
|
|
12598
12599
|
const applicationBackgroundColor = DesignToken.create(styleNameFromTokenName(tokenNames.applicationBackgroundColor)).withDefault((element) => getColorForTheme(element, White, Black85, ForestGreen));
|
|
12599
12600
|
DesignToken.create(styleNameFromTokenName(tokenNames.headerBackgroundColor)).withDefault((element) => getColorForTheme(element, Black7, Black80, ForestGreen));
|
|
12600
12601
|
DesignToken.create(styleNameFromTokenName(tokenNames.sectionBackgroundColor)).withDefault((element) => getColorForTheme(element, Black30, Black91, ForestGreen));
|
|
12601
|
-
const fillSelectedColor = DesignToken.create(styleNameFromTokenName(tokenNames.fillSelectedColor)).withDefault((element) => hexToRgbaCssColor(getFillSelectedColorForTheme(element), 0.
|
|
12602
|
+
const fillSelectedColor = DesignToken.create(styleNameFromTokenName(tokenNames.fillSelectedColor)).withDefault((element) => hexToRgbaCssColor(getFillSelectedColorForTheme(element), 0.2));
|
|
12602
12603
|
const fillSelectedRgbPartialColor = DesignToken.create(styleNameFromTokenName(tokenNames.fillSelectedRgbPartialColor)).withDefault((element) => hexToRgbPartial(getFillSelectedColorForTheme(element)));
|
|
12603
12604
|
const fillHoverSelectedColor = DesignToken.create(styleNameFromTokenName(tokenNames.fillHoverSelectedColor)).withDefault((element) => hexToRgbaCssColor(getFillSelectedColorForTheme(element), 0.15));
|
|
12604
12605
|
const fillHoverColor = DesignToken.create(styleNameFromTokenName(tokenNames.fillHoverColor)).withDefault((element) => hexToRgbaCssColor(getFillHoverColorForTheme(element), 0.1));
|
|
12606
|
+
DesignToken.create(styleNameFromTokenName(tokenNames.fillDownColor)).withDefault((element) => hexToRgbaCssColor(getFillDownColorForTheme(element), 0.15));
|
|
12605
12607
|
const borderColor = DesignToken.create(styleNameFromTokenName(tokenNames.borderColor)).withDefault((element) => getDefaultLineColorForTheme(element));
|
|
12606
12608
|
const borderRgbPartialColor = DesignToken.create(styleNameFromTokenName(tokenNames.borderRgbPartialColor)).withDefault((element) => hexToRgbPartial(getDefaultLineColorForTheme(element)));
|
|
12607
12609
|
const failColor = DesignToken.create(styleNameFromTokenName(tokenNames.failColor)).withDefault((element) => getFailColorForTheme(element));
|
|
@@ -12714,6 +12716,9 @@
|
|
|
12714
12716
|
function getFillHoverColorForTheme(element) {
|
|
12715
12717
|
return getColorForTheme(element, Black91, Black15, White);
|
|
12716
12718
|
}
|
|
12719
|
+
function getFillDownColorForTheme(element) {
|
|
12720
|
+
return getColorForTheme(element, Black91, Black15, White);
|
|
12721
|
+
}
|
|
12717
12722
|
|
|
12718
12723
|
/* eslint-disable max-classes-per-file */
|
|
12719
12724
|
/**
|
|
@@ -18214,7 +18219,12 @@
|
|
|
18214
18219
|
}
|
|
18215
18220
|
|
|
18216
18221
|
[part='start'] {
|
|
18217
|
-
display:
|
|
18222
|
+
display: contents;
|
|
18223
|
+
}
|
|
18224
|
+
|
|
18225
|
+
slot[name='start']::slotted(*) {
|
|
18226
|
+
margin-left: calc(${standardPadding} / 2);
|
|
18227
|
+
flex: none;
|
|
18218
18228
|
}
|
|
18219
18229
|
|
|
18220
18230
|
.control {
|
|
@@ -18501,14 +18511,38 @@
|
|
|
18501
18511
|
<div
|
|
18502
18512
|
role="button"
|
|
18503
18513
|
part="control"
|
|
18504
|
-
|
|
18505
|
-
aria-disabled="${(x) => x.disabled}"
|
|
18506
|
-
aria-readonly="${(x) => x.readOnly}"
|
|
18507
|
-
tabindex="${(x) => (x.disabled ? null : 0)}"
|
|
18514
|
+
tabindex="${x => (x.disabled ? null : 0)}"
|
|
18508
18515
|
@keypress="${(x, c) => x.keypressHandler(c.event)}"
|
|
18509
18516
|
@click="${(x, c) => x.clickHandler(c.event)}"
|
|
18510
|
-
class="control ${
|
|
18517
|
+
class="control ${x => (x.checked ? 'checked' : '')}"
|
|
18511
18518
|
?disabled="${x => x.disabled}"
|
|
18519
|
+
${'' /* Configure aria-disabled, aria-readonly, and aria-pressed based on the
|
|
18520
|
+
toggle button's state to keep the ARIA attributes consistent with the component's
|
|
18521
|
+
state without a client having to configure ARIA attributes directly */}
|
|
18522
|
+
aria-disabled="${x => x.disabled}"
|
|
18523
|
+
aria-readonly="${x => x.readOnly}"
|
|
18524
|
+
aria-pressed="${x => x.checked}"
|
|
18525
|
+
${'' /* Configure all other ARIA attributes based on the aria attributes
|
|
18526
|
+
configured on the toggle button */}
|
|
18527
|
+
aria-atomic="${x => x.ariaAtomic}"
|
|
18528
|
+
aria-busy="${x => x.ariaBusy}"
|
|
18529
|
+
aria-controls="${x => x.ariaControls}"
|
|
18530
|
+
aria-current="${x => x.ariaCurrent}"
|
|
18531
|
+
aria-describedby="${x => x.ariaDescribedby}"
|
|
18532
|
+
aria-details="${x => x.ariaDetails}"
|
|
18533
|
+
aria-errormessage="${x => x.ariaErrormessage}"
|
|
18534
|
+
aria-expanded="${x => x.ariaExpanded}"
|
|
18535
|
+
aria-flowto="${x => x.ariaFlowto}"
|
|
18536
|
+
aria-haspopup="${x => x.ariaHaspopup}"
|
|
18537
|
+
aria-hidden="${x => x.ariaHidden}"
|
|
18538
|
+
aria-invalid="${x => x.ariaInvalid}"
|
|
18539
|
+
aria-keyshortcuts="${x => x.ariaKeyshortcuts}"
|
|
18540
|
+
aria-label="${x => x.ariaLabel}"
|
|
18541
|
+
aria-labelledby="${x => x.ariaLabelledby}"
|
|
18542
|
+
aria-live="${x => x.ariaLive}"
|
|
18543
|
+
aria-owns="${x => x.ariaOwns}"
|
|
18544
|
+
aria-relevant="${x => x.ariaRelevant}"
|
|
18545
|
+
aria-roledescription="${x => x.ariaRoledescription}"
|
|
18512
18546
|
${ref('control')}
|
|
18513
18547
|
>
|
|
18514
18548
|
${startSlotTemplate(context, definition)}
|
|
@@ -18551,7 +18585,7 @@
|
|
|
18551
18585
|
__decorate([
|
|
18552
18586
|
attr({ attribute: 'content-hidden', mode: 'boolean' })
|
|
18553
18587
|
], ToggleButton.prototype, "contentHidden", void 0);
|
|
18554
|
-
applyMixins(ToggleButton, StartEnd);
|
|
18588
|
+
applyMixins(ToggleButton, StartEnd, DelegatesARIAButton);
|
|
18555
18589
|
const nimbleToggleButton = ToggleButton.compose({
|
|
18556
18590
|
baseName: 'toggle-button',
|
|
18557
18591
|
template,
|