@ni/nimble-components 20.5.5 → 20.6.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 +46 -35
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +2574 -2572
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/banner/template.js +4 -4
- package/dist/esm/banner/template.js.map +1 -1
- package/dist/esm/icon-base/index.d.ts +1 -6
- package/dist/esm/icon-base/index.js +1 -21
- package/dist/esm/icon-base/index.js.map +1 -1
- package/dist/esm/icon-base/template.js +6 -5
- package/dist/esm/icon-base/template.js.map +1 -1
- package/dist/esm/label-provider/core/index.d.ts +9 -0
- package/dist/esm/label-provider/core/index.js +14 -2
- package/dist/esm/label-provider/core/index.js.map +1 -1
- package/dist/esm/label-provider/core/label-token-defaults.js +4 -1
- package/dist/esm/label-provider/core/label-token-defaults.js.map +1 -1
- package/dist/esm/label-provider/core/label-tokens.d.ts +3 -0
- package/dist/esm/label-provider/core/label-tokens.js +12 -0
- package/dist/esm/label-provider/core/label-tokens.js.map +1 -1
- package/dist/esm/table/components/header/template.js +1 -0
- package/dist/esm/table/components/header/template.js.map +1 -1
- package/dist/esm/table/models/table-layout-manager.js +5 -4
- package/dist/esm/table/models/table-layout-manager.js.map +1 -1
- package/dist/esm/table/testing/table.pageobject.js +1 -1
- package/dist/esm/table/testing/table.pageobject.js.map +1 -1
- package/dist/esm/table-column/enum-base/models/mapping-icon-config.js +1 -0
- package/dist/esm/table-column/enum-base/models/mapping-icon-config.js.map +1 -1
- package/package.json +1 -1
|
@@ -16288,7 +16288,7 @@
|
|
|
16288
16288
|
|
|
16289
16289
|
/**
|
|
16290
16290
|
* Do not edit directly
|
|
16291
|
-
* Generated on
|
|
16291
|
+
* Generated on Tue, 03 Oct 2023 14:12:03 GMT
|
|
16292
16292
|
*/
|
|
16293
16293
|
|
|
16294
16294
|
const Information100DarkUi = "#a46eff";
|
|
@@ -19482,11 +19482,12 @@
|
|
|
19482
19482
|
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path class="cls-1" d="M8.033 14.026 4.9 10.866 6.277 9.53l1.744 1.81 4.562-4.507 1.307 1.363Zm1.155-10.68-1.321-1.32-2.312 2.311-2.311-2.311-1.321 1.32 2.311 2.312L1.923 7.97l1.32 1.32 2.312-2.31 2.312 2.31 1.32-1.32-2.31-2.312Z"/></svg>`
|
|
19483
19483
|
};
|
|
19484
19484
|
|
|
19485
|
-
|
|
19486
|
-
|
|
19487
|
-
|
|
19488
|
-
|
|
19489
|
-
|
|
19485
|
+
// Avoiding any whitespace in the template because this is an inline element
|
|
19486
|
+
const template$t = html `<div
|
|
19487
|
+
class="icon"
|
|
19488
|
+
aria-hidden="true"
|
|
19489
|
+
:innerHTML=${x => x.icon.data}
|
|
19490
|
+
></div>`;
|
|
19490
19491
|
|
|
19491
19492
|
const styles$I = css `
|
|
19492
19493
|
${display('inline-flex')}
|
|
@@ -19534,30 +19535,10 @@
|
|
|
19534
19535
|
super();
|
|
19535
19536
|
this.icon = icon;
|
|
19536
19537
|
}
|
|
19537
|
-
connectedCallback() {
|
|
19538
|
-
super.connectedCallback();
|
|
19539
|
-
this.forwardAriaLabelToSvg();
|
|
19540
|
-
}
|
|
19541
|
-
ariaLabelChanged() {
|
|
19542
|
-
this.forwardAriaLabelToSvg();
|
|
19543
|
-
}
|
|
19544
|
-
forwardAriaLabelToSvg() {
|
|
19545
|
-
const svg = this.shadowRoot?.querySelector('svg');
|
|
19546
|
-
if (!svg) {
|
|
19547
|
-
return;
|
|
19548
|
-
}
|
|
19549
|
-
if (this.ariaLabel !== null && this.ariaLabel !== undefined) {
|
|
19550
|
-
svg.setAttribute('aria-label', this.ariaLabel);
|
|
19551
|
-
}
|
|
19552
|
-
else {
|
|
19553
|
-
svg.removeAttribute('aria-label');
|
|
19554
|
-
}
|
|
19555
|
-
}
|
|
19556
19538
|
}
|
|
19557
19539
|
__decorate$1([
|
|
19558
19540
|
attr
|
|
19559
19541
|
], Icon.prototype, "severity", void 0);
|
|
19560
|
-
applyMixins(Icon, ARIAGlobalStatesAndProperties);
|
|
19561
19542
|
const registerIcon = (baseName, iconClass) => {
|
|
19562
19543
|
const composedIcon = iconClass.compose({
|
|
19563
19544
|
baseName,
|
|
@@ -19634,7 +19615,10 @@
|
|
|
19634
19615
|
const coreLabelDefaults = {
|
|
19635
19616
|
popupDismissLabel: 'Close',
|
|
19636
19617
|
numericIncrementLabel: 'Increment',
|
|
19637
|
-
numericDecrementLabel: 'Decrement'
|
|
19618
|
+
numericDecrementLabel: 'Decrement',
|
|
19619
|
+
errorIconLabel: 'Error',
|
|
19620
|
+
warningIconLabel: 'Warning',
|
|
19621
|
+
informationIconLabel: 'Information'
|
|
19638
19622
|
};
|
|
19639
19623
|
|
|
19640
19624
|
const popupDismissLabel = DesignToken.create({
|
|
@@ -19649,6 +19633,18 @@
|
|
|
19649
19633
|
name: 'numeric-increment-label',
|
|
19650
19634
|
cssCustomPropertyName: null
|
|
19651
19635
|
}).withDefault(coreLabelDefaults.numericIncrementLabel);
|
|
19636
|
+
const errorIconLabel = DesignToken.create({
|
|
19637
|
+
name: 'error-icon-label',
|
|
19638
|
+
cssCustomPropertyName: null
|
|
19639
|
+
}).withDefault(coreLabelDefaults.errorIconLabel);
|
|
19640
|
+
const warningIconLabel = DesignToken.create({
|
|
19641
|
+
name: 'warning-icon-label',
|
|
19642
|
+
cssCustomPropertyName: null
|
|
19643
|
+
}).withDefault(coreLabelDefaults.warningIconLabel);
|
|
19644
|
+
const informationIconLabel = DesignToken.create({
|
|
19645
|
+
name: 'information-icon-label',
|
|
19646
|
+
cssCustomPropertyName: null
|
|
19647
|
+
}).withDefault(coreLabelDefaults.informationIconLabel);
|
|
19652
19648
|
|
|
19653
19649
|
// prettier-ignore
|
|
19654
19650
|
const template$s = html `
|
|
@@ -19677,13 +19673,13 @@
|
|
|
19677
19673
|
>
|
|
19678
19674
|
<div class="icon">
|
|
19679
19675
|
${when(x => x.severity === BannerSeverity.error, html `
|
|
19680
|
-
<${iconExclamationMarkTag}></${iconExclamationMarkTag}>
|
|
19676
|
+
<${iconExclamationMarkTag} role="img" aria-label="${x => errorIconLabel.getValueFor(x)}"></${iconExclamationMarkTag}>
|
|
19681
19677
|
`)}
|
|
19682
19678
|
${when(x => x.severity === BannerSeverity.warning, html `
|
|
19683
|
-
<${iconTriangleFilledTag}></${iconTriangleFilledTag}>
|
|
19679
|
+
<${iconTriangleFilledTag} role="img" aria-label="${x => warningIconLabel.getValueFor(x)}"></${iconTriangleFilledTag}>
|
|
19684
19680
|
`)}
|
|
19685
19681
|
${when(x => x.severity === BannerSeverity.information, html `
|
|
19686
|
-
<${iconInfoTag}></${iconInfoTag}>
|
|
19682
|
+
<${iconInfoTag} role="img" aria-label="${x => informationIconLabel.getValueFor(x)}"></${iconInfoTag}>
|
|
19687
19683
|
`)}
|
|
19688
19684
|
</div>
|
|
19689
19685
|
<div class="text">
|
|
@@ -23675,7 +23671,10 @@
|
|
|
23675
23671
|
const supportedLabels$1 = {
|
|
23676
23672
|
popupDismiss: popupDismissLabel,
|
|
23677
23673
|
numericDecrement: numericDecrementLabel,
|
|
23678
|
-
numericIncrement: numericIncrementLabel
|
|
23674
|
+
numericIncrement: numericIncrementLabel,
|
|
23675
|
+
errorIcon: errorIconLabel,
|
|
23676
|
+
warningIcon: warningIconLabel,
|
|
23677
|
+
informationIcon: informationIconLabel
|
|
23679
23678
|
};
|
|
23680
23679
|
/**
|
|
23681
23680
|
* Core label provider for Nimble
|
|
@@ -23695,6 +23694,15 @@
|
|
|
23695
23694
|
__decorate$1([
|
|
23696
23695
|
attr({ attribute: 'numeric-increment' })
|
|
23697
23696
|
], LabelProviderCore.prototype, "numericIncrement", void 0);
|
|
23697
|
+
__decorate$1([
|
|
23698
|
+
attr({ attribute: 'error-icon' })
|
|
23699
|
+
], LabelProviderCore.prototype, "errorIcon", void 0);
|
|
23700
|
+
__decorate$1([
|
|
23701
|
+
attr({ attribute: 'warning-icon' })
|
|
23702
|
+
], LabelProviderCore.prototype, "warningIcon", void 0);
|
|
23703
|
+
__decorate$1([
|
|
23704
|
+
attr({ attribute: 'information-icon' })
|
|
23705
|
+
], LabelProviderCore.prototype, "informationIcon", void 0);
|
|
23698
23706
|
const nimbleLabelProviderCore = LabelProviderCore.compose({
|
|
23699
23707
|
baseName: 'label-provider-core'
|
|
23700
23708
|
});
|
|
@@ -64032,6 +64040,7 @@ img.ProseMirror-separator {
|
|
|
64032
64040
|
<${iconTwoSquaresInBracketsTag}
|
|
64033
64041
|
class="grouped-indicator"
|
|
64034
64042
|
title="${x => tableColumnHeaderGroupedLabel.getValueFor(x)}"
|
|
64043
|
+
role="img"
|
|
64035
64044
|
aria-label="${x => tableColumnHeaderGroupedLabel.getValueFor(x)}"
|
|
64036
64045
|
></${iconTwoSquaresInBracketsTag}>
|
|
64037
64046
|
`)}
|
|
@@ -65942,18 +65951,19 @@ img.ProseMirror-separator {
|
|
|
65942
65951
|
}
|
|
65943
65952
|
}
|
|
65944
65953
|
resetGridSizedColumns() {
|
|
65945
|
-
if (!this.gridSizedColumns) {
|
|
65954
|
+
if (!this.gridSizedColumns || this.gridSizedColumns.length === 0) {
|
|
65946
65955
|
return;
|
|
65947
65956
|
}
|
|
65957
|
+
const gridSizeColumnTotal = this.gridSizedColumns.reduce((sum, col) => sum + col.columnInternals.currentPixelWidth, 0);
|
|
65958
|
+
const gridSizeColumnAverage = gridSizeColumnTotal / this.gridSizedColumns.length;
|
|
65948
65959
|
let gridColumnIndex = 0;
|
|
65949
65960
|
for (let i = 0; i < this.visibleColumns.length
|
|
65950
65961
|
&& gridColumnIndex < this.gridSizedColumns.length; i++) {
|
|
65951
65962
|
const column = this.visibleColumns[i];
|
|
65952
65963
|
if (column === this.gridSizedColumns[gridColumnIndex]) {
|
|
65953
65964
|
gridColumnIndex += 1;
|
|
65954
|
-
column.columnInternals.currentFractionalWidth =
|
|
65955
|
-
/
|
|
65956
|
-
* this.initialColumnWidths[i].initalColumnFractionalWidth;
|
|
65965
|
+
column.columnInternals.currentFractionalWidth = column.columnInternals.currentPixelWidth
|
|
65966
|
+
/ gridSizeColumnAverage;
|
|
65957
65967
|
column.columnInternals.currentPixelWidth = undefined;
|
|
65958
65968
|
}
|
|
65959
65969
|
}
|
|
@@ -68728,6 +68738,7 @@ img.ProseMirror-separator {
|
|
|
68728
68738
|
const createIconTemplate = (icon) => html `
|
|
68729
68739
|
<${icon}
|
|
68730
68740
|
title="${x => x.text}"
|
|
68741
|
+
role="img"
|
|
68731
68742
|
aria-label="${x => x.text}"
|
|
68732
68743
|
severity="${x => x.severity}"
|
|
68733
68744
|
class="no-shrink"
|