@ni/ok-components 0.3.1 → 0.3.3
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.
|
@@ -13466,6 +13466,12 @@
|
|
|
13466
13466
|
* @internal
|
|
13467
13467
|
*/
|
|
13468
13468
|
this.direction = Direction.ltr;
|
|
13469
|
+
/**
|
|
13470
|
+
* The collection of focusable toolbar controls.
|
|
13471
|
+
*
|
|
13472
|
+
* @internal
|
|
13473
|
+
*/
|
|
13474
|
+
this.focusableElements = [];
|
|
13469
13475
|
/**
|
|
13470
13476
|
* The orientation of the toolbar.
|
|
13471
13477
|
*
|
|
@@ -13486,7 +13492,7 @@
|
|
|
13486
13492
|
}
|
|
13487
13493
|
set activeIndex(value) {
|
|
13488
13494
|
if (this.$fastController.isConnected) {
|
|
13489
|
-
this._activeIndex = limit(0, this.focusableElements.length - 1, value);
|
|
13495
|
+
this._activeIndex = limit(0, this.focusableElements.length > 0 ? this.focusableElements.length - 1 : 0, value);
|
|
13490
13496
|
Observable.notify(this, "activeIndex");
|
|
13491
13497
|
}
|
|
13492
13498
|
}
|
|
@@ -13501,7 +13507,7 @@
|
|
|
13501
13507
|
* @internal
|
|
13502
13508
|
*/
|
|
13503
13509
|
mouseDownHandler(e) {
|
|
13504
|
-
const activeIndex = this.focusableElements
|
|
13510
|
+
const activeIndex = this.focusableElements.findIndex(x => x.contains(e.target));
|
|
13505
13511
|
if (activeIndex > -1 && this.activeIndex !== activeIndex) {
|
|
13506
13512
|
this.setFocusedElement(activeIndex);
|
|
13507
13513
|
}
|
|
@@ -13558,7 +13564,7 @@
|
|
|
13558
13564
|
return !e.target.closest("[role=radiogroup]");
|
|
13559
13565
|
}
|
|
13560
13566
|
const nextIndex = this.activeIndex + incrementer;
|
|
13561
|
-
if (this.focusableElements[nextIndex]) {
|
|
13567
|
+
if (this.focusableElements.length > 0 && this.focusableElements[nextIndex]) {
|
|
13562
13568
|
e.preventDefault();
|
|
13563
13569
|
}
|
|
13564
13570
|
this.setFocusedElement(nextIndex);
|
|
@@ -13581,7 +13587,7 @@
|
|
|
13581
13587
|
* @internal
|
|
13582
13588
|
*/
|
|
13583
13589
|
reduceFocusableElements() {
|
|
13584
|
-
const previousFocusedElement = this.focusableElements
|
|
13590
|
+
const previousFocusedElement = this.focusableElements[this.activeIndex];
|
|
13585
13591
|
this.focusableElements = this.allSlottedItems.reduce(Toolbar.reduceFocusableItems, []);
|
|
13586
13592
|
// If the previously active item is still focusable, adjust the active index to the
|
|
13587
13593
|
// index of that item.
|
|
@@ -13598,7 +13604,8 @@
|
|
|
13598
13604
|
setFocusedElement(activeIndex = this.activeIndex) {
|
|
13599
13605
|
this.activeIndex = activeIndex;
|
|
13600
13606
|
this.setFocusableElements();
|
|
13601
|
-
if (this.focusableElements
|
|
13607
|
+
if (this.focusableElements.length > 0 &&
|
|
13608
|
+
this.focusableElements[this.activeIndex] &&
|
|
13602
13609
|
// Don't focus the toolbar element if some event handlers moved
|
|
13603
13610
|
// the focus on another element in the page.
|
|
13604
13611
|
this.contains(getRootActiveElement(this))) {
|
|
@@ -17550,16 +17557,14 @@
|
|
|
17550
17557
|
display: none;
|
|
17551
17558
|
font: ${errorTextFont};
|
|
17552
17559
|
color: ${buttonLabelFontColor};
|
|
17553
|
-
width: 100%;
|
|
17554
17560
|
position: absolute;
|
|
17555
|
-
|
|
17556
|
-
bottom: calc(-1 * (${errorTextFontLineHeight} - 2px));
|
|
17557
|
-
left: 0px;
|
|
17561
|
+
padding: 0;
|
|
17558
17562
|
overflow: hidden;
|
|
17559
17563
|
text-overflow: ellipsis;
|
|
17560
17564
|
white-space: nowrap;
|
|
17565
|
+
width: 100%;
|
|
17561
17566
|
}
|
|
17562
|
-
|
|
17567
|
+
|
|
17563
17568
|
:host([severity="error"]) .severity-text {
|
|
17564
17569
|
display: block;
|
|
17565
17570
|
color: ${failColor};
|
|
@@ -17664,9 +17669,6 @@
|
|
|
17664
17669
|
${display$2('inline-flex')}
|
|
17665
17670
|
${styles$1g}
|
|
17666
17671
|
:host {
|
|
17667
|
-
${'' /* Based on text layout: Top padding + title height + subtitle height + bottom padding */}
|
|
17668
|
-
height: calc(${smallPadding} + ${controlSlimHeight} + ${errorTextFontLineHeight} + ${smallPadding});
|
|
17669
|
-
width: ${menuMinWidth};
|
|
17670
17672
|
color: ${buttonLabelFontColor};
|
|
17671
17673
|
font: ${buttonLabelFont};
|
|
17672
17674
|
white-space: nowrap;
|
|
@@ -17680,21 +17682,36 @@
|
|
|
17680
17682
|
width: 100%;
|
|
17681
17683
|
height: 100%;
|
|
17682
17684
|
position: relative;
|
|
17685
|
+
list-style: none;
|
|
17686
|
+
--ni-private-step-content-height: calc(${smallPadding} + ${controlSlimHeight} + ${errorTextFontLineHeight});
|
|
17687
|
+
--ni-private-step-content-offset: calc(${controlHeight} + ${smallPadding});
|
|
17683
17688
|
}
|
|
17684
17689
|
|
|
17685
|
-
.control {
|
|
17686
|
-
display: inline-
|
|
17687
|
-
align-items: start;
|
|
17688
|
-
justify-content: flex-start;
|
|
17690
|
+
.control {
|
|
17691
|
+
display: inline-grid;
|
|
17689
17692
|
height: 100%;
|
|
17690
17693
|
width: 100%;
|
|
17694
|
+
grid-template-areas:
|
|
17695
|
+
"icon top-spacer top-spacer"
|
|
17696
|
+
"icon title line"
|
|
17697
|
+
"icon subtitle subtitle";
|
|
17698
|
+
grid-template-columns:
|
|
17699
|
+
${controlHeight} ${'' /* Icon width */}
|
|
17700
|
+
min-content ${'' /* Show the full title and subtitle */}
|
|
17701
|
+
1fr; ${'' /* Line is only fr unit so fills remaining space */}
|
|
17702
|
+
grid-template-rows:
|
|
17703
|
+
${smallPadding}
|
|
17704
|
+
${controlSlimHeight}
|
|
17705
|
+
min-content;
|
|
17706
|
+
column-gap: 4px;
|
|
17707
|
+
|
|
17708
|
+
align-items: start;
|
|
17709
|
+
margin: 0;
|
|
17710
|
+
padding: 0;
|
|
17691
17711
|
color: inherit;
|
|
17692
17712
|
background-color: transparent;
|
|
17693
|
-
gap: ${smallPadding};
|
|
17694
17713
|
cursor: pointer;
|
|
17695
17714
|
outline: none;
|
|
17696
|
-
margin: 0;
|
|
17697
|
-
padding: 0 ${smallPadding} 0 0;
|
|
17698
17715
|
--ni-private-step-icon-background-full-size: 100% 100%;
|
|
17699
17716
|
${'' /* 6px = (2px icon border + 1px inset) * 2 sides */}
|
|
17700
17717
|
--ni-private-step-icon-background-inset-size: calc(100% - 6px) calc(100% - 6px);
|
|
@@ -17708,6 +17725,70 @@
|
|
|
17708
17725
|
--ni-private-step-line-color: rgba(${borderRgbPartialColor}, 0.1);
|
|
17709
17726
|
}
|
|
17710
17727
|
|
|
17728
|
+
.container.last .control {
|
|
17729
|
+
grid-template-areas:
|
|
17730
|
+
"icon top-spacer"
|
|
17731
|
+
"icon title"
|
|
17732
|
+
"icon subtitle";
|
|
17733
|
+
grid-template-columns:
|
|
17734
|
+
${controlHeight}
|
|
17735
|
+
min-content;
|
|
17736
|
+
grid-template-rows:
|
|
17737
|
+
${smallPadding}
|
|
17738
|
+
${controlSlimHeight}
|
|
17739
|
+
min-content;
|
|
17740
|
+
}
|
|
17741
|
+
|
|
17742
|
+
.container.vertical .control {
|
|
17743
|
+
${'' /*
|
|
17744
|
+
Defines an interaction area clip-path that leaves out the severity text so it is easily selectable:
|
|
17745
|
+
1----------------2
|
|
17746
|
+
| title |
|
|
17747
|
+
| subtitle |
|
|
17748
|
+
| 4-------------3
|
|
17749
|
+
| | severity-text
|
|
17750
|
+
| |
|
|
17751
|
+
6--5
|
|
17752
|
+
*/}
|
|
17753
|
+
clip-path: polygon(
|
|
17754
|
+
0% 0%,
|
|
17755
|
+
100% 0%,
|
|
17756
|
+
100% var(--ni-private-step-content-height),
|
|
17757
|
+
var(--ni-private-step-content-offset) var(--ni-private-step-content-height),
|
|
17758
|
+
var(--ni-private-step-content-offset) 100%,
|
|
17759
|
+
0% 100%
|
|
17760
|
+
);
|
|
17761
|
+
grid-template-areas:
|
|
17762
|
+
"icon top-spacer"
|
|
17763
|
+
"icon title"
|
|
17764
|
+
"icon subtitle"
|
|
17765
|
+
"line subtitle"
|
|
17766
|
+
"line .";
|
|
17767
|
+
grid-template-columns:
|
|
17768
|
+
${controlHeight}
|
|
17769
|
+
min-content;
|
|
17770
|
+
grid-template-rows:
|
|
17771
|
+
${smallPadding}
|
|
17772
|
+
${controlSlimHeight}
|
|
17773
|
+
calc(${controlHeight} - ${smallPadding} - ${controlSlimHeight})
|
|
17774
|
+
min-content
|
|
17775
|
+
1fr;
|
|
17776
|
+
}
|
|
17777
|
+
|
|
17778
|
+
.container.vertical.last .control {
|
|
17779
|
+
grid-template-areas:
|
|
17780
|
+
"icon top-spacer"
|
|
17781
|
+
"icon title"
|
|
17782
|
+
"icon subtitle";
|
|
17783
|
+
grid-template-columns:
|
|
17784
|
+
${controlHeight}
|
|
17785
|
+
min-content;
|
|
17786
|
+
grid-template-rows:
|
|
17787
|
+
${smallPadding}
|
|
17788
|
+
${controlSlimHeight}
|
|
17789
|
+
min-content;
|
|
17790
|
+
}
|
|
17791
|
+
|
|
17711
17792
|
:host([severity="error"]) .control {
|
|
17712
17793
|
--ni-private-step-icon-color: ${failColor};
|
|
17713
17794
|
--ni-private-step-icon-border-color: ${failColor};
|
|
@@ -17741,6 +17822,7 @@
|
|
|
17741
17822
|
}
|
|
17742
17823
|
|
|
17743
17824
|
.icon {
|
|
17825
|
+
grid-area: icon;
|
|
17744
17826
|
display: inline-flex;
|
|
17745
17827
|
align-items: center;
|
|
17746
17828
|
justify-content: center;
|
|
@@ -17760,7 +17842,7 @@
|
|
|
17760
17842
|
${'' /* Workaround to prevent aliasing on radial-gradient boundaries, see:
|
|
17761
17843
|
https://frontendmasters.com/blog/obsessing-over-smooth-radial-gradient-disc-edges
|
|
17762
17844
|
*/}
|
|
17763
|
-
var(--ni-private-step-icon-background-color) calc(100% - 1px/var(--ni-private-device-
|
|
17845
|
+
var(--ni-private-step-icon-background-color) calc(100% - 1px/var(--ni-private-device-pixel-ratio, 1)),
|
|
17764
17846
|
transparent 100%
|
|
17765
17847
|
);
|
|
17766
17848
|
background-origin: border-box;
|
|
@@ -17798,18 +17880,22 @@
|
|
|
17798
17880
|
outline-offset ${smallDelay} ease-in-out;
|
|
17799
17881
|
}
|
|
17800
17882
|
|
|
17801
|
-
.
|
|
17883
|
+
.current-label {
|
|
17884
|
+
${accessiblyHidden}
|
|
17885
|
+
}
|
|
17886
|
+
|
|
17887
|
+
.step-indicator {
|
|
17802
17888
|
display: contents;
|
|
17803
17889
|
}
|
|
17804
17890
|
|
|
17805
|
-
:host([severity="error"]) .
|
|
17806
|
-
:host([severity="warning"]) .
|
|
17807
|
-
:host([severity="success"]) .
|
|
17891
|
+
:host([severity="error"]) .step-indicator,
|
|
17892
|
+
:host([severity="warning"]) .step-indicator,
|
|
17893
|
+
:host([severity="success"]) .step-indicator {
|
|
17808
17894
|
display: none;
|
|
17809
17895
|
}
|
|
17810
17896
|
|
|
17811
|
-
:host([selected]) .
|
|
17812
|
-
:host([disabled]) .
|
|
17897
|
+
:host([selected]) .step-indicator,
|
|
17898
|
+
:host([disabled]) .step-indicator {
|
|
17813
17899
|
display: contents;
|
|
17814
17900
|
}
|
|
17815
17901
|
|
|
@@ -17828,62 +17914,80 @@
|
|
|
17828
17914
|
display: none;
|
|
17829
17915
|
}
|
|
17830
17916
|
|
|
17831
|
-
.
|
|
17832
|
-
|
|
17833
|
-
${
|
|
17834
|
-
width: calc(100% - 32px);
|
|
17835
|
-
flex-direction: column;
|
|
17836
|
-
padding-top: ${smallPadding};
|
|
17837
|
-
padding-bottom: ${smallPadding};
|
|
17917
|
+
.top-spacer {
|
|
17918
|
+
grid-area: top-spacer;
|
|
17919
|
+
height: ${smallPadding};
|
|
17838
17920
|
}
|
|
17839
17921
|
|
|
17840
|
-
.title
|
|
17841
|
-
|
|
17922
|
+
.title {
|
|
17923
|
+
grid-area: title;
|
|
17924
|
+
min-width: min-content;
|
|
17842
17925
|
height: ${controlSlimHeight};
|
|
17843
|
-
|
|
17844
|
-
align-
|
|
17845
|
-
justify-content: start;
|
|
17846
|
-
gap: ${smallPadding};
|
|
17926
|
+
display: inline-block;
|
|
17927
|
+
align-content: center;
|
|
17847
17928
|
font: ${bodyFont};
|
|
17929
|
+
white-space: nowrap;
|
|
17930
|
+
overflow: hidden;
|
|
17931
|
+
text-overflow: ellipsis;
|
|
17848
17932
|
}
|
|
17849
17933
|
|
|
17850
17934
|
[part='start'] {
|
|
17851
17935
|
display: none;
|
|
17852
17936
|
}
|
|
17853
17937
|
|
|
17854
|
-
.title {
|
|
17855
|
-
display: inline-block;
|
|
17856
|
-
flex: none;
|
|
17857
|
-
white-space: nowrap;
|
|
17858
|
-
overflow: hidden;
|
|
17859
|
-
text-overflow: ellipsis;
|
|
17860
|
-
${'' /* Content width - (gap + line min width) */}
|
|
17861
|
-
max-width: calc(100% - (${smallPadding} + ${standardPadding}));
|
|
17862
|
-
}
|
|
17863
|
-
|
|
17864
17938
|
[part='end'] {
|
|
17865
17939
|
display: none;
|
|
17866
17940
|
}
|
|
17867
|
-
|
|
17941
|
+
|
|
17868
17942
|
.line {
|
|
17943
|
+
grid-area: line;
|
|
17944
|
+
align-self: center;
|
|
17945
|
+
justify-self: center;
|
|
17869
17946
|
display: inline-block;
|
|
17870
|
-
|
|
17947
|
+
width: 100%;
|
|
17871
17948
|
min-width: ${standardPadding};
|
|
17872
17949
|
height: 1px;
|
|
17950
|
+
min-height: 1px;
|
|
17873
17951
|
background: var(--ni-private-step-line-color);
|
|
17952
|
+
background-clip: content-box;
|
|
17874
17953
|
transform: scale(1, 1);
|
|
17875
17954
|
transition:
|
|
17876
17955
|
background-color ${smallDelay} ease-in-out,
|
|
17877
17956
|
transform ${smallDelay} ease-in-out;
|
|
17878
17957
|
}
|
|
17879
17958
|
|
|
17959
|
+
.container.last .line {
|
|
17960
|
+
display: none;
|
|
17961
|
+
}
|
|
17962
|
+
|
|
17963
|
+
.container.vertical .line {
|
|
17964
|
+
width: 1px;
|
|
17965
|
+
min-width: 1px;
|
|
17966
|
+
height: 100%;
|
|
17967
|
+
padding-top: ${smallPadding};
|
|
17968
|
+
min-height: ${standardPadding};
|
|
17969
|
+
}
|
|
17970
|
+
|
|
17880
17971
|
.subtitle {
|
|
17972
|
+
grid-area: subtitle;
|
|
17973
|
+
display: inline-block;
|
|
17974
|
+
min-width: min-content;
|
|
17975
|
+
height: ${errorTextFontLineHeight};
|
|
17976
|
+
align-content: center;
|
|
17881
17977
|
font: ${errorTextFont};
|
|
17882
17978
|
white-space: nowrap;
|
|
17883
17979
|
overflow: hidden;
|
|
17884
17980
|
text-overflow: ellipsis;
|
|
17885
|
-
|
|
17886
|
-
|
|
17981
|
+
}
|
|
17982
|
+
|
|
17983
|
+
.severity-text {
|
|
17984
|
+
left: 0px;
|
|
17985
|
+
top: var(--ni-private-step-content-height);
|
|
17986
|
+
}
|
|
17987
|
+
|
|
17988
|
+
.container.vertical .severity-text {
|
|
17989
|
+
width: calc(100% - var(--ni-private-step-content-offset));
|
|
17990
|
+
left: var(--ni-private-step-content-offset);
|
|
17887
17991
|
}
|
|
17888
17992
|
}
|
|
17889
17993
|
|
|
@@ -17927,6 +18031,10 @@
|
|
|
17927
18031
|
.control:hover .line {
|
|
17928
18032
|
transform: scale(1, 2);
|
|
17929
18033
|
}
|
|
18034
|
+
|
|
18035
|
+
.container.vertical .control:hover .line {
|
|
18036
|
+
transform: scale(2, 1);
|
|
18037
|
+
}
|
|
17930
18038
|
}
|
|
17931
18039
|
|
|
17932
18040
|
@layer focusVisible {
|
|
@@ -17966,7 +18074,7 @@
|
|
|
17966
18074
|
--ni-private-step-icon-outline-inset-color: ${borderHoverColor};
|
|
17967
18075
|
--ni-private-step-line-color: ${borderHoverColor};
|
|
17968
18076
|
}
|
|
17969
|
-
|
|
18077
|
+
|
|
17970
18078
|
.control${focusVisible} .icon {
|
|
17971
18079
|
border-width: 2px;
|
|
17972
18080
|
}
|
|
@@ -17979,6 +18087,10 @@
|
|
|
17979
18087
|
.control${focusVisible} .line {
|
|
17980
18088
|
transform: scale(1, 2);
|
|
17981
18089
|
}
|
|
18090
|
+
|
|
18091
|
+
.container.vertical .control${focusVisible} .line {
|
|
18092
|
+
transform: scale(2, 1);
|
|
18093
|
+
}
|
|
17982
18094
|
}
|
|
17983
18095
|
|
|
17984
18096
|
@layer active {
|
|
@@ -18148,6 +18260,7 @@
|
|
|
18148
18260
|
${overflow('severityHasOverflow')}
|
|
18149
18261
|
title="${x => (x.severityHasOverflow && x.severityText ? x.severityText : undefined)}"
|
|
18150
18262
|
aria-live="polite"
|
|
18263
|
+
@click="${(_x, c) => c.event.stopImmediatePropagation()}"
|
|
18151
18264
|
>${x => x.severityText}</div>`;
|
|
18152
18265
|
|
|
18153
18266
|
const Severity = {
|
|
@@ -19234,9 +19347,83 @@
|
|
|
19234
19347
|
registerIconSvg('icon-check', IconCheck);
|
|
19235
19348
|
const iconCheckTag = 'nimble-icon-check';
|
|
19236
19349
|
|
|
19350
|
+
const coreLabelDefaults = {
|
|
19351
|
+
popupDismissLabel: 'Close',
|
|
19352
|
+
numericIncrementLabel: 'Increment',
|
|
19353
|
+
numericDecrementLabel: 'Decrement',
|
|
19354
|
+
popupIconErrorLabel: 'Error',
|
|
19355
|
+
popupIconWarningLabel: 'Warning',
|
|
19356
|
+
popupIconCompletedLabel: 'Completed',
|
|
19357
|
+
popupIconCurrentLabel: 'Current',
|
|
19358
|
+
popupIconInformationLabel: 'Information',
|
|
19359
|
+
filterSearchLabel: 'Search',
|
|
19360
|
+
filterNoResultsLabel: 'No items found',
|
|
19361
|
+
loadingLabel: 'Loading…',
|
|
19362
|
+
scrollBackwardLabel: 'Scroll backward',
|
|
19363
|
+
scrollForwardLabel: 'Scroll forward',
|
|
19364
|
+
itemRemoveLabel: 'Remove'
|
|
19365
|
+
};
|
|
19366
|
+
|
|
19367
|
+
const popupDismissLabel = DesignToken.create({
|
|
19368
|
+
name: 'popup-dismiss-label',
|
|
19369
|
+
cssCustomPropertyName: null
|
|
19370
|
+
}).withDefault(coreLabelDefaults.popupDismissLabel);
|
|
19371
|
+
const numericDecrementLabel = DesignToken.create({
|
|
19372
|
+
name: 'numeric-decrement-label',
|
|
19373
|
+
cssCustomPropertyName: null
|
|
19374
|
+
}).withDefault(coreLabelDefaults.numericDecrementLabel);
|
|
19375
|
+
const numericIncrementLabel = DesignToken.create({
|
|
19376
|
+
name: 'numeric-increment-label',
|
|
19377
|
+
cssCustomPropertyName: null
|
|
19378
|
+
}).withDefault(coreLabelDefaults.numericIncrementLabel);
|
|
19379
|
+
const popupIconErrorLabel = DesignToken.create({
|
|
19380
|
+
name: 'popup-icon-error-label',
|
|
19381
|
+
cssCustomPropertyName: null
|
|
19382
|
+
}).withDefault(coreLabelDefaults.popupIconErrorLabel);
|
|
19383
|
+
const popupIconWarningLabel = DesignToken.create({
|
|
19384
|
+
name: 'popup-icon-warning-label',
|
|
19385
|
+
cssCustomPropertyName: null
|
|
19386
|
+
}).withDefault(coreLabelDefaults.popupIconWarningLabel);
|
|
19387
|
+
const popupIconCompletedLabel = DesignToken.create({
|
|
19388
|
+
name: 'popup-icon-completed-label',
|
|
19389
|
+
cssCustomPropertyName: null
|
|
19390
|
+
}).withDefault(coreLabelDefaults.popupIconCompletedLabel);
|
|
19391
|
+
const popupIconCurrentLabel = DesignToken.create({
|
|
19392
|
+
name: 'popup-icon-current-label',
|
|
19393
|
+
cssCustomPropertyName: null
|
|
19394
|
+
}).withDefault(coreLabelDefaults.popupIconCurrentLabel);
|
|
19395
|
+
const popupIconInformationLabel = DesignToken.create({
|
|
19396
|
+
name: 'popup-icon-information-label',
|
|
19397
|
+
cssCustomPropertyName: null
|
|
19398
|
+
}).withDefault(coreLabelDefaults.popupIconInformationLabel);
|
|
19399
|
+
const filterSearchLabel = DesignToken.create({
|
|
19400
|
+
name: 'filter-search-label',
|
|
19401
|
+
cssCustomPropertyName: null
|
|
19402
|
+
}).withDefault(coreLabelDefaults.filterSearchLabel);
|
|
19403
|
+
const filterNoResultsLabel = DesignToken.create({
|
|
19404
|
+
name: 'filter-no-results-label',
|
|
19405
|
+
cssCustomPropertyName: null
|
|
19406
|
+
}).withDefault(coreLabelDefaults.filterNoResultsLabel);
|
|
19407
|
+
const loadingLabel = DesignToken.create({
|
|
19408
|
+
name: 'loading-label',
|
|
19409
|
+
cssCustomPropertyName: null
|
|
19410
|
+
}).withDefault(coreLabelDefaults.loadingLabel);
|
|
19411
|
+
const scrollBackwardLabel = DesignToken.create({
|
|
19412
|
+
name: 'scroll-backward-label',
|
|
19413
|
+
cssCustomPropertyName: null
|
|
19414
|
+
}).withDefault(coreLabelDefaults.scrollBackwardLabel);
|
|
19415
|
+
const scrollForwardLabel = DesignToken.create({
|
|
19416
|
+
name: 'scroll-forward-label',
|
|
19417
|
+
cssCustomPropertyName: null
|
|
19418
|
+
}).withDefault(coreLabelDefaults.scrollForwardLabel);
|
|
19419
|
+
const itemRemoveLabel = DesignToken.create({
|
|
19420
|
+
name: 'item-remove-label',
|
|
19421
|
+
cssCustomPropertyName: null
|
|
19422
|
+
}).withDefault(coreLabelDefaults.itemRemoveLabel);
|
|
19423
|
+
|
|
19237
19424
|
const template$V = (context, definition) => html `
|
|
19238
19425
|
<template slot="step">
|
|
19239
|
-
<
|
|
19426
|
+
<li class="
|
|
19240
19427
|
container
|
|
19241
19428
|
${x => (x.stepInternals.orientation === 'vertical' ? 'vertical' : '')}
|
|
19242
19429
|
${x => (x.stepInternals.last ? 'last' : '')}
|
|
@@ -19275,28 +19462,22 @@
|
|
|
19275
19462
|
aria-roledescription="${x => x.ariaRoledescription}"
|
|
19276
19463
|
${ref('control')}
|
|
19277
19464
|
>
|
|
19278
|
-
<div class="icon">
|
|
19279
|
-
<
|
|
19465
|
+
<div class="icon">
|
|
19466
|
+
<span class="current-label">${x => (x.selected ? popupIconCurrentLabel.getValueFor(x) : '')}</span>
|
|
19467
|
+
<div class="step-indicator"><slot name="step-indicator"><span aria-hidden="true">${x => x.stepInternals.position}</span></slot></div>
|
|
19280
19468
|
<div class="icon-severity">
|
|
19281
|
-
${when(x => x.severity === Severity.error, html `<${iconExclamationMarkTag}></${iconExclamationMarkTag}>`)}
|
|
19282
|
-
${when(x => x.severity === Severity.warning, html `<${iconTriangleFilledTag}></${iconTriangleFilledTag}>`)}
|
|
19283
|
-
${when(x => x.severity === Severity.success, html `<${iconCheckTag}></${iconCheckTag}>`)}
|
|
19284
|
-
</div>
|
|
19285
|
-
</div>
|
|
19286
|
-
<div class="content">
|
|
19287
|
-
<div class="title-wrapper">
|
|
19288
|
-
${startSlotTemplate(context, definition)}
|
|
19289
|
-
<div class="title"><slot name="title"></slot></div>
|
|
19290
|
-
${endSlotTemplate(context, definition)}
|
|
19291
|
-
<div class="line"></div>
|
|
19292
|
-
</div>
|
|
19293
|
-
<div class="subtitle">
|
|
19294
|
-
<slot name="subtitle"></slot>
|
|
19469
|
+
${when(x => x.severity === Severity.error, html `<${iconExclamationMarkTag} role="img" aria-label="${x => popupIconErrorLabel.getValueFor(x)}"></${iconExclamationMarkTag}>`)}
|
|
19470
|
+
${when(x => x.severity === Severity.warning, html `<${iconTriangleFilledTag} role="img" aria-label="${x => popupIconWarningLabel.getValueFor(x)}"></${iconTriangleFilledTag}>`)}
|
|
19471
|
+
${when(x => x.severity === Severity.success, html `<${iconCheckTag} role="img" aria-label="${x => popupIconCompletedLabel.getValueFor(x)}"></${iconCheckTag}>`)}
|
|
19295
19472
|
</div>
|
|
19296
19473
|
</div>
|
|
19474
|
+
<div class="top-spacer"></div>
|
|
19475
|
+
<div class="title">${startSlotTemplate(context, definition)}<slot name="title"></slot>${endSlotTemplate(context, definition)}</div>
|
|
19476
|
+
<div class="line"></div>
|
|
19477
|
+
<div class="subtitle"><slot name="subtitle"></slot></div>
|
|
19297
19478
|
</a>
|
|
19298
19479
|
${severityTextTemplate}
|
|
19299
|
-
</
|
|
19480
|
+
</li>
|
|
19300
19481
|
</template>
|
|
19301
19482
|
`;
|
|
19302
19483
|
|
|
@@ -19313,6 +19494,7 @@
|
|
|
19313
19494
|
constructor() {
|
|
19314
19495
|
this.orientation = StepperOrientation.horizontal;
|
|
19315
19496
|
this.last = false;
|
|
19497
|
+
this.position = 1;
|
|
19316
19498
|
}
|
|
19317
19499
|
}
|
|
19318
19500
|
__decorate([
|
|
@@ -19321,6 +19503,9 @@
|
|
|
19321
19503
|
__decorate([
|
|
19322
19504
|
observable
|
|
19323
19505
|
], StepInternals.prototype, "last", void 0);
|
|
19506
|
+
__decorate([
|
|
19507
|
+
observable
|
|
19508
|
+
], StepInternals.prototype, "position", void 0);
|
|
19324
19509
|
|
|
19325
19510
|
const AnchorStepSeverity = Severity;
|
|
19326
19511
|
|
|
@@ -19733,70 +19918,6 @@
|
|
|
19733
19918
|
registerIconSvg('icon-arrow-expander-right', IconArrowExpanderRight);
|
|
19734
19919
|
const iconArrowExpanderRightTag = 'nimble-icon-arrow-expander-right';
|
|
19735
19920
|
|
|
19736
|
-
const coreLabelDefaults = {
|
|
19737
|
-
popupDismissLabel: 'Close',
|
|
19738
|
-
numericIncrementLabel: 'Increment',
|
|
19739
|
-
numericDecrementLabel: 'Decrement',
|
|
19740
|
-
popupIconErrorLabel: 'Error',
|
|
19741
|
-
popupIconWarningLabel: 'Warning',
|
|
19742
|
-
popupIconInformationLabel: 'Information',
|
|
19743
|
-
filterSearchLabel: 'Search',
|
|
19744
|
-
filterNoResultsLabel: 'No items found',
|
|
19745
|
-
loadingLabel: 'Loading…',
|
|
19746
|
-
scrollBackwardLabel: 'Scroll backward',
|
|
19747
|
-
scrollForwardLabel: 'Scroll forward',
|
|
19748
|
-
itemRemoveLabel: 'Remove'
|
|
19749
|
-
};
|
|
19750
|
-
|
|
19751
|
-
const popupDismissLabel = DesignToken.create({
|
|
19752
|
-
name: 'popup-dismiss-label',
|
|
19753
|
-
cssCustomPropertyName: null
|
|
19754
|
-
}).withDefault(coreLabelDefaults.popupDismissLabel);
|
|
19755
|
-
const numericDecrementLabel = DesignToken.create({
|
|
19756
|
-
name: 'numeric-decrement-label',
|
|
19757
|
-
cssCustomPropertyName: null
|
|
19758
|
-
}).withDefault(coreLabelDefaults.numericDecrementLabel);
|
|
19759
|
-
const numericIncrementLabel = DesignToken.create({
|
|
19760
|
-
name: 'numeric-increment-label',
|
|
19761
|
-
cssCustomPropertyName: null
|
|
19762
|
-
}).withDefault(coreLabelDefaults.numericIncrementLabel);
|
|
19763
|
-
const popupIconErrorLabel = DesignToken.create({
|
|
19764
|
-
name: 'popup-icon-error-label',
|
|
19765
|
-
cssCustomPropertyName: null
|
|
19766
|
-
}).withDefault(coreLabelDefaults.popupIconErrorLabel);
|
|
19767
|
-
const popupIconWarningLabel = DesignToken.create({
|
|
19768
|
-
name: 'popup-icon-warning-label',
|
|
19769
|
-
cssCustomPropertyName: null
|
|
19770
|
-
}).withDefault(coreLabelDefaults.popupIconWarningLabel);
|
|
19771
|
-
const popupIconInformationLabel = DesignToken.create({
|
|
19772
|
-
name: 'popup-icon-information-label',
|
|
19773
|
-
cssCustomPropertyName: null
|
|
19774
|
-
}).withDefault(coreLabelDefaults.popupIconInformationLabel);
|
|
19775
|
-
const filterSearchLabel = DesignToken.create({
|
|
19776
|
-
name: 'filter-search-label',
|
|
19777
|
-
cssCustomPropertyName: null
|
|
19778
|
-
}).withDefault(coreLabelDefaults.filterSearchLabel);
|
|
19779
|
-
const filterNoResultsLabel = DesignToken.create({
|
|
19780
|
-
name: 'filter-no-results-label',
|
|
19781
|
-
cssCustomPropertyName: null
|
|
19782
|
-
}).withDefault(coreLabelDefaults.filterNoResultsLabel);
|
|
19783
|
-
const loadingLabel = DesignToken.create({
|
|
19784
|
-
name: 'loading-label',
|
|
19785
|
-
cssCustomPropertyName: null
|
|
19786
|
-
}).withDefault(coreLabelDefaults.loadingLabel);
|
|
19787
|
-
const scrollBackwardLabel = DesignToken.create({
|
|
19788
|
-
name: 'scroll-backward-label',
|
|
19789
|
-
cssCustomPropertyName: null
|
|
19790
|
-
}).withDefault(coreLabelDefaults.scrollBackwardLabel);
|
|
19791
|
-
const scrollForwardLabel = DesignToken.create({
|
|
19792
|
-
name: 'scroll-forward-label',
|
|
19793
|
-
cssCustomPropertyName: null
|
|
19794
|
-
}).withDefault(coreLabelDefaults.scrollForwardLabel);
|
|
19795
|
-
const itemRemoveLabel = DesignToken.create({
|
|
19796
|
-
name: 'item-remove-label',
|
|
19797
|
-
cssCustomPropertyName: null
|
|
19798
|
-
}).withDefault(coreLabelDefaults.itemRemoveLabel);
|
|
19799
|
-
|
|
19800
19921
|
const template$S = (context, definition) => html `
|
|
19801
19922
|
<div
|
|
19802
19923
|
class="tab-bar"
|
|
@@ -26165,6 +26286,8 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
26165
26286
|
numericIncrement: numericIncrementLabel,
|
|
26166
26287
|
popupIconError: popupIconErrorLabel,
|
|
26167
26288
|
popupIconWarning: popupIconWarningLabel,
|
|
26289
|
+
popupIconCompleted: popupIconCompletedLabel,
|
|
26290
|
+
popupIconCurrent: popupIconCurrentLabel,
|
|
26168
26291
|
popupIconInformation: popupIconInformationLabel,
|
|
26169
26292
|
filterSearch: filterSearchLabel,
|
|
26170
26293
|
filterNoResults: filterNoResultsLabel,
|
|
@@ -26197,6 +26320,12 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
26197
26320
|
__decorate([
|
|
26198
26321
|
attr({ attribute: 'popup-icon-warning' })
|
|
26199
26322
|
], LabelProviderCore.prototype, "popupIconWarning", void 0);
|
|
26323
|
+
__decorate([
|
|
26324
|
+
attr({ attribute: 'popup-icon-completed' })
|
|
26325
|
+
], LabelProviderCore.prototype, "popupIconCompleted", void 0);
|
|
26326
|
+
__decorate([
|
|
26327
|
+
attr({ attribute: 'popup-icon-current' })
|
|
26328
|
+
], LabelProviderCore.prototype, "popupIconCurrent", void 0);
|
|
26200
26329
|
__decorate([
|
|
26201
26330
|
attr({ attribute: 'popup-icon-information' })
|
|
26202
26331
|
], LabelProviderCore.prototype, "popupIconInformation", void 0);
|
|
@@ -66201,7 +66330,7 @@ ${nextLine.slice(indentLevel + 2)}`;
|
|
|
66201
66330
|
|
|
66202
66331
|
const template$x = (context, definition) => html `
|
|
66203
66332
|
<template slot="step">
|
|
66204
|
-
<
|
|
66333
|
+
<li class="
|
|
66205
66334
|
container
|
|
66206
66335
|
${x => (x.stepInternals.orientation === 'vertical' ? 'vertical' : '')}
|
|
66207
66336
|
${x => (x.stepInternals.last ? 'last' : '')}
|
|
@@ -66244,28 +66373,22 @@ ${nextLine.slice(indentLevel + 2)}`;
|
|
|
66244
66373
|
aria-roledescription="${x => x.ariaRoledescription}"
|
|
66245
66374
|
${ref('control')}
|
|
66246
66375
|
>
|
|
66247
|
-
<div class="icon">
|
|
66248
|
-
<
|
|
66376
|
+
<div class="icon">
|
|
66377
|
+
<span class="current-label">${x => (x.selected ? popupIconCurrentLabel.getValueFor(x) : '')}</span>
|
|
66378
|
+
<div class="step-indicator"><slot name="step-indicator"><span aria-hidden="true">${x => x.stepInternals.position}</span></slot></div>
|
|
66249
66379
|
<div class="icon-severity">
|
|
66250
|
-
${when(x => x.severity === Severity.error, html `<${iconExclamationMarkTag}></${iconExclamationMarkTag}>`)}
|
|
66251
|
-
${when(x => x.severity === Severity.warning, html `<${iconTriangleFilledTag}></${iconTriangleFilledTag}>`)}
|
|
66252
|
-
${when(x => x.severity === Severity.success, html `<${iconCheckTag}></${iconCheckTag}>`)}
|
|
66253
|
-
</div>
|
|
66254
|
-
</div>
|
|
66255
|
-
<div class="content">
|
|
66256
|
-
<div class="title-wrapper">
|
|
66257
|
-
${startSlotTemplate(context, definition)}
|
|
66258
|
-
<div class="title"><slot name="title"></slot></div>
|
|
66259
|
-
${endSlotTemplate(context, definition)}
|
|
66260
|
-
<div class="line"></div>
|
|
66261
|
-
</div>
|
|
66262
|
-
<div class="subtitle">
|
|
66263
|
-
<slot name="subtitle"></slot>
|
|
66380
|
+
${when(x => x.severity === Severity.error, html `<${iconExclamationMarkTag} role="img" aria-label="${x => popupIconErrorLabel.getValueFor(x)}"></${iconExclamationMarkTag}>`)}
|
|
66381
|
+
${when(x => x.severity === Severity.warning, html `<${iconTriangleFilledTag} role="img" aria-label="${x => popupIconWarningLabel.getValueFor(x)}"></${iconTriangleFilledTag}>`)}
|
|
66382
|
+
${when(x => x.severity === Severity.success, html `<${iconCheckTag} role="img" aria-label="${x => popupIconCompletedLabel.getValueFor(x)}"></${iconCheckTag}>`)}
|
|
66264
66383
|
</div>
|
|
66265
66384
|
</div>
|
|
66385
|
+
<div class="top-spacer"></div>
|
|
66386
|
+
<div class="title">${startSlotTemplate(context, definition)}<slot name="title"></slot>${endSlotTemplate(context, definition)}</div>
|
|
66387
|
+
<div class="line"></div>
|
|
66388
|
+
<div class="subtitle"><slot name="subtitle"></slot></div>
|
|
66266
66389
|
</button>
|
|
66267
66390
|
${severityTextTemplate}
|
|
66268
|
-
</
|
|
66391
|
+
</li>
|
|
66269
66392
|
</template>
|
|
66270
66393
|
`;
|
|
66271
66394
|
|
|
@@ -66328,7 +66451,23 @@ ${nextLine.slice(indentLevel + 2)}`;
|
|
|
66328
66451
|
|
|
66329
66452
|
:host {
|
|
66330
66453
|
border: none;
|
|
66331
|
-
gap:
|
|
66454
|
+
gap: ${smallPadding};
|
|
66455
|
+
}
|
|
66456
|
+
|
|
66457
|
+
:host([orientation="vertical"]) {
|
|
66458
|
+
flex-direction: column;
|
|
66459
|
+
}
|
|
66460
|
+
|
|
66461
|
+
ol {
|
|
66462
|
+
display: contents;
|
|
66463
|
+
}
|
|
66464
|
+
|
|
66465
|
+
slot[name="step"]::slotted(*) {
|
|
66466
|
+
flex-grow: 1;
|
|
66467
|
+
}
|
|
66468
|
+
|
|
66469
|
+
slot[name="step"]::slotted(:last-child) {
|
|
66470
|
+
flex-grow: 0;
|
|
66332
66471
|
}
|
|
66333
66472
|
`;
|
|
66334
66473
|
|
|
@@ -66352,16 +66491,44 @@ ${nextLine.slice(indentLevel + 2)}`;
|
|
|
66352
66491
|
], DevicePixelRatio.prototype, "current", void 0);
|
|
66353
66492
|
const devicePixelRatio = new DevicePixelRatio();
|
|
66354
66493
|
|
|
66355
|
-
const template$w = html
|
|
66356
|
-
|
|
66357
|
-
|
|
66358
|
-
|
|
66494
|
+
const template$w = html `<ol><slot
|
|
66495
|
+
style="--ni-private-device-pixel-ratio: ${() => devicePixelRatio.current};"
|
|
66496
|
+
name="step"
|
|
66497
|
+
${slotted('steps')}
|
|
66498
|
+
></slot></ol>`;
|
|
66359
66499
|
|
|
66360
66500
|
/**
|
|
66361
66501
|
* A nimble-styled stepper
|
|
66362
66502
|
*/
|
|
66363
66503
|
class Stepper extends FoundationElement {
|
|
66504
|
+
constructor() {
|
|
66505
|
+
super(...arguments);
|
|
66506
|
+
this.orientation = StepperOrientation.horizontal;
|
|
66507
|
+
}
|
|
66508
|
+
orientationChanged() {
|
|
66509
|
+
this.updateStepInternals();
|
|
66510
|
+
}
|
|
66511
|
+
stepsChanged() {
|
|
66512
|
+
this.updateStepInternals();
|
|
66513
|
+
}
|
|
66514
|
+
updateStepInternals() {
|
|
66515
|
+
if (!this.steps) {
|
|
66516
|
+
return;
|
|
66517
|
+
}
|
|
66518
|
+
const lastIndex = this.steps.length - 1;
|
|
66519
|
+
this.steps.forEach((step, index) => {
|
|
66520
|
+
step.stepInternals.orientation = this.orientation;
|
|
66521
|
+
step.stepInternals.last = index === lastIndex;
|
|
66522
|
+
step.stepInternals.position = index + 1;
|
|
66523
|
+
});
|
|
66524
|
+
}
|
|
66364
66525
|
}
|
|
66526
|
+
__decorate([
|
|
66527
|
+
attr
|
|
66528
|
+
], Stepper.prototype, "orientation", void 0);
|
|
66529
|
+
__decorate([
|
|
66530
|
+
observable
|
|
66531
|
+
], Stepper.prototype, "steps", void 0);
|
|
66365
66532
|
const nimbleStepper = Stepper.compose({
|
|
66366
66533
|
baseName: 'stepper',
|
|
66367
66534
|
template: template$w,
|