@ni/ok-components 0.2.15 → 0.2.17

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.
@@ -14787,6 +14787,7 @@
14787
14787
  borderRgbPartialColor: 'border-rgb-partial-color',
14788
14788
  failColor: 'fail-color',
14789
14789
  warningColor: 'warning-color',
14790
+ warningFontColor: 'warning-font-color',
14790
14791
  passColor: 'pass-color',
14791
14792
  informationColor: 'information-color',
14792
14793
  borderHoverColor: 'border-hover-color',
@@ -14901,7 +14902,7 @@
14901
14902
 
14902
14903
  const template$_ = html `<slot></slot>`;
14903
14904
 
14904
- const styles$1d = css `
14905
+ const styles$1f = css `
14905
14906
  ${display$2('contents')}
14906
14907
  `;
14907
14908
 
@@ -15016,7 +15017,7 @@
15016
15017
  ], ThemeProvider.prototype, "theme", void 0);
15017
15018
  const nimbleDesignSystemProvider = ThemeProvider.compose({
15018
15019
  baseName: 'theme-provider',
15019
- styles: styles$1d,
15020
+ styles: styles$1f,
15020
15021
  template: template$_
15021
15022
  });
15022
15023
  DesignSystem.getOrCreate()
@@ -16141,6 +16142,7 @@
16141
16142
  const WarningDark20 = "#5e4635";
16142
16143
  const Pass100LightUi = "#009921";
16143
16144
  const Pass100DarkUi = "#00c12b";
16145
+ const WarningTypographyLightUi = "#d3440d";
16144
16146
  const Fail100LightUi = "#c4000c";
16145
16147
  const Fail100DarkUi = "#ff4663";
16146
16148
  const Black75 = "#818386";
@@ -16313,6 +16315,7 @@
16313
16315
  borderRgbPartialColor: hexToRgbPartialThemeColor(alias.lineColor),
16314
16316
  failColor: alias.failColor,
16315
16317
  warningColor: createThemeColor(Warning100LightUi, Warning100DarkUi, White),
16318
+ warningFontColor: createThemeColor(WarningTypographyLightUi, Warning100DarkUi, White),
16316
16319
  passColor: createThemeColor(Pass100LightUi, Pass100DarkUi, White),
16317
16320
  informationColor: createThemeColor(Information100LightUi, Information100DarkUi, White),
16318
16321
  borderHoverColor: createThemeColor(DigitalGreenLight, PowerGreen, White),
@@ -16484,6 +16487,7 @@
16484
16487
  const borderRgbPartialColor = createThemeColorToken(tokenNames.borderRgbPartialColor, tokenValues.borderRgbPartialColor);
16485
16488
  const failColor = createThemeColorToken(tokenNames.failColor, tokenValues.failColor);
16486
16489
  const warningColor = createThemeColorToken(tokenNames.warningColor, tokenValues.warningColor);
16490
+ const warningFontColor = createThemeColorToken(tokenNames.warningFontColor, tokenValues.warningFontColor);
16487
16491
  const passColor = createThemeColorToken(tokenNames.passColor, tokenValues.passColor);
16488
16492
  const informationColor = createThemeColorToken(tokenNames.informationColor, tokenValues.informationColor);
16489
16493
  const borderHoverColor = createThemeColorToken(tokenNames.borderHoverColor, tokenValues.borderHoverColor);
@@ -16652,8 +16656,8 @@
16652
16656
  }
16653
16657
  // #endregion
16654
16658
 
16655
- const styles$1c = css `
16656
- @layer base, hover, focusVisible, active, disabled;
16659
+ const styles$1e = css `
16660
+ @layer base, hover, focusVisible, active, disabled, top;
16657
16661
 
16658
16662
  @layer base {
16659
16663
  ${display$2('inline')}
@@ -16834,7 +16838,7 @@
16834
16838
  baseName: 'anchor',
16835
16839
  baseClass: Anchor$1,
16836
16840
  template: template$Z,
16837
- styles: styles$1c,
16841
+ styles: styles$1e,
16838
16842
  shadowOptions: {
16839
16843
  delegatesFocus: true
16840
16844
  }
@@ -16943,7 +16947,7 @@
16943
16947
  padding: 0;
16944
16948
  `;
16945
16949
 
16946
- const styles$1b = css `
16950
+ const styles$1d = css `
16947
16951
  @layer base, checked, hover, focusVisible, active, disabled, top;
16948
16952
 
16949
16953
  @layer base {
@@ -17227,8 +17231,8 @@
17227
17231
  }
17228
17232
  `));
17229
17233
 
17230
- const styles$1a = css `
17231
- ${styles$1b}
17234
+ const styles$1c = css `
17235
+ ${styles$1d}
17232
17236
  ${buttonAppearanceVariantStyles}
17233
17237
 
17234
17238
  .control {
@@ -17331,7 +17335,7 @@
17331
17335
  const nimbleAnchorButton = AnchorButton.compose({
17332
17336
  baseName: 'anchor-button',
17333
17337
  template: template$Y,
17334
- styles: styles$1a,
17338
+ styles: styles$1c,
17335
17339
  shadowOptions: {
17336
17340
  delegatesFocus: true
17337
17341
  }
@@ -17339,7 +17343,7 @@
17339
17343
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorButton());
17340
17344
  const anchorButtonTag = 'nimble-anchor-button';
17341
17345
 
17342
- const styles$19 = css `
17346
+ const styles$1b = css `
17343
17347
  ${display$2('grid')}
17344
17348
 
17345
17349
  :host {
@@ -17524,7 +17528,7 @@
17524
17528
  const nimbleAnchorMenuItem = AnchorMenuItem.compose({
17525
17529
  baseName: 'anchor-menu-item',
17526
17530
  template: template$X,
17527
- styles: styles$19,
17531
+ styles: styles$1b,
17528
17532
  shadowOptions: {
17529
17533
  delegatesFocus: true
17530
17534
  }
@@ -17534,347 +17538,639 @@
17534
17538
  .register(nimbleAnchorMenuItem());
17535
17539
  const anchorMenuItemTag = 'nimble-anchor-menu-item';
17536
17540
 
17537
- const styles$18 = css `
17538
- ${display$2('flex')}
17541
+ // These styles end up inside a @layer block so must use the
17542
+ // cssPartial tag instead of the css tag
17543
+ const styles$1a = cssPartial `
17544
+ .severity-text {
17545
+ display: none;
17546
+ font: ${errorTextFont};
17547
+ color: ${buttonLabelFontColor};
17548
+ width: 100%;
17549
+ position: absolute;
17550
+ ${'' /* The -2px modifier of the bottom position is to intentionally have the severity text slightly overlap the control by 2px */}
17551
+ bottom: calc(-1 * (${errorTextFontLineHeight} - 2px));
17552
+ left: 0px;
17553
+ overflow: hidden;
17554
+ text-overflow: ellipsis;
17555
+ white-space: nowrap;
17556
+ }
17557
+
17558
+ :host([severity="error"]) .severity-text {
17559
+ display: block;
17560
+ color: ${failColor};
17561
+ }
17562
+
17563
+ :host([severity="warning"]) .severity-text {
17564
+ display: block;
17565
+ color: ${warningFontColor};
17566
+ }
17567
+ .severity-text:empty {
17568
+ display: none;
17569
+ }
17539
17570
  `;
17540
17571
 
17541
- const template$W = html `
17542
- <template>anchor step</template>
17572
+ /**
17573
+ * Set user-select: none in a way that works across all supported browsers.
17574
+ * https://developer.mozilla.org/en-US/docs/Web/CSS/user-select#browser_compatibility
17575
+ */
17576
+ const userSelectNone$1 = cssPartial `
17577
+ user-select: none;
17578
+ -webkit-user-select: none;
17543
17579
  `;
17544
17580
 
17545
17581
  /**
17546
- * A nimble-styled anchor step for a stepper
17582
+ * Subscription for {@link ThemeStyleSheetBehavior}
17547
17583
  */
17548
- class AnchorStep extends FoundationElement {
17584
+ class ThemeStyleSheetBehaviorSubscription {
17585
+ constructor(value, styles, source) {
17586
+ this.value = value;
17587
+ this.styles = styles;
17588
+ this.source = source;
17589
+ }
17590
+ handleChange() {
17591
+ const theme$1 = theme.getValueFor(this.source);
17592
+ if (Array.isArray(this.value)
17593
+ ? this.value.includes(theme$1)
17594
+ : this.value === theme$1) {
17595
+ this.source.$fastController.addStyles(this.styles);
17596
+ }
17597
+ else {
17598
+ this.source.$fastController.removeStyles(this.styles);
17599
+ }
17600
+ }
17549
17601
  }
17550
- const nimbleAnchorStep = AnchorStep.compose({
17551
- baseName: 'anchor-step',
17552
- template: template$W,
17553
- styles: styles$18
17554
- });
17555
- DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorStep());
17602
+ /**
17603
+ * Behavior to conditionally apply theme-based stylesheets.
17604
+ */
17605
+ class ThemeStyleSheetBehavior {
17606
+ constructor(theme, styles) {
17607
+ this.theme = theme;
17608
+ this.styles = styles;
17609
+ this.cache = new WeakMap();
17610
+ }
17611
+ /**
17612
+ * @internal
17613
+ */
17614
+ bind(source) {
17615
+ const subscriber = this.cache.get(source)
17616
+ || new ThemeStyleSheetBehaviorSubscription(this.theme, this.styles, source);
17617
+ // Currently subscriber from cache may have gone through unbind
17618
+ // but still be in cache so always resubscribe
17619
+ // See: https://github.com/microsoft/fast/issues/3246#issuecomment-1030424876
17620
+ theme.subscribe(subscriber, source);
17621
+ subscriber.handleChange();
17622
+ this.cache.set(source, subscriber);
17623
+ }
17624
+ /**
17625
+ * @internal
17626
+ */
17627
+ unbind(source) {
17628
+ const subscriber = this.cache.get(source);
17629
+ if (subscriber) {
17630
+ theme.unsubscribe(subscriber);
17631
+ }
17632
+ // Currently does not evict subscriber from cache
17633
+ // See: https://github.com/microsoft/fast/issues/3246#issuecomment-1030424876
17634
+ }
17635
+ }
17636
+ /**
17637
+ * Behavior to conditionally apply theme-based stylesheets. To determine which to apply,
17638
+ * the behavior will use the nearest ThemeProvider's 'theme' design system value.
17639
+ *
17640
+ * @public
17641
+ * @example
17642
+ * ```ts
17643
+ * css`
17644
+ * // ...
17645
+ * `.withBehaviors(
17646
+ * themeBehavior(Theme.light, css` ... `),
17647
+ * // Apply style for both dark and color theme
17648
+ * themeBehavior([Theme.dark, Theme.color], css` ... `)
17649
+ * )
17650
+ * ```
17651
+ */
17652
+ const themeBehavior = (theme, styles) => new ThemeStyleSheetBehavior(theme, styles);
17653
+ /* eslint-enable max-classes-per-file */
17556
17654
 
17557
- const styles$17 = css `
17558
- ${display$2('inline-flex')}
17655
+ const styles$19 = css `
17656
+ @layer base, hover, focusVisible, active, disabled, top;
17559
17657
 
17560
- :host {
17561
- position: relative;
17562
- font: ${buttonLabelFont};
17563
- height: ${controlHeight};
17564
- color: ${bodyFontColor};
17565
- align-items: center;
17566
- justify-content: center;
17567
- cursor: pointer;
17568
- text-wrap: nowrap;
17569
- --ni-private-active-indicator-width: 2px;
17570
- --ni-private-focus-indicator-width: 1px;
17571
- --ni-private-indicator-lines-gap: 1px;
17572
- --ni-private-focus-indicator-inset-width: 3px;
17573
- }
17658
+ @layer base {
17659
+ ${display$2('inline-flex')}
17660
+ ${styles$1a}
17661
+ :host {
17662
+ ${'' /* Based on text layout: Top padding + title height + subtitle height + bottom padding */}
17663
+ height: calc(${smallPadding} + ${controlSlimHeight} + ${errorTextFontLineHeight} + ${smallPadding});
17664
+ width: ${menuMinWidth};
17665
+ color: ${buttonLabelFontColor};
17666
+ font: ${buttonLabelFont};
17667
+ white-space: nowrap;
17668
+ outline: none;
17669
+ border: none;
17670
+ }
17574
17671
 
17575
- :host(:hover) {
17576
- background-color: ${fillHoverColor};
17577
- }
17672
+ ${'' /* Container wrapper for severity text to position against */}
17673
+ .container {
17674
+ display: inline-flex;
17675
+ width: 100%;
17676
+ height: 100%;
17677
+ position: relative;
17678
+ }
17578
17679
 
17579
- :host(:hover[aria-current]) {
17580
- background-color: ${fillHoverSelectedColor};
17581
- }
17680
+ .control {
17681
+ display: inline-flex;
17682
+ align-items: start;
17683
+ justify-content: flex-start;
17684
+ height: 100%;
17685
+ width: 100%;
17686
+ color: inherit;
17687
+ background-color: transparent;
17688
+ gap: ${smallPadding};
17689
+ cursor: pointer;
17690
+ outline: none;
17691
+ margin: 0;
17692
+ padding: 0 ${smallPadding} 0 0;
17693
+ --ni-private-step-icon-background-full-size: 100% 100%;
17694
+ ${'' /* 6px = (2px icon border + 1px inset) * 2 sides */}
17695
+ --ni-private-step-icon-background-inset-size: calc(100% - 6px) calc(100% - 6px);
17696
+ --ni-private-step-icon-background-none-size: 0% 0%;
17697
+
17698
+ --ni-private-step-icon-color: ${buttonLabelFontColor};
17699
+ --ni-private-step-icon-border-color: transparent;
17700
+ --ni-private-step-icon-background-color: rgba(${borderRgbPartialColor}, 0.1);
17701
+ --ni-private-step-icon-background-size: var(--ni-private-step-icon-background-full-size);
17702
+ --ni-private-step-icon-outline-inset-color: transparent;
17703
+ --ni-private-step-line-color: rgba(${borderRgbPartialColor}, 0.1);
17704
+ }
17705
+
17706
+ :host([severity="error"]) .control {
17707
+ --ni-private-step-icon-color: ${failColor};
17708
+ --ni-private-step-icon-border-color: ${failColor};
17709
+ --ni-private-step-icon-background-color: rgb(from ${failColor} r g b / 30%);
17710
+ --ni-private-step-icon-background-size: var(--ni-private-step-icon-background-none-size);
17711
+ --ni-private-step-line-color: ${failColor};
17712
+ }
17713
+
17714
+ :host([severity="warning"]) .control {
17715
+ --ni-private-step-icon-color: ${warningColor};
17716
+ --ni-private-step-icon-border-color: ${warningColor};
17717
+ --ni-private-step-icon-background-color: rgb(from ${warningColor} r g b / 30%);
17718
+ --ni-private-step-icon-background-size: var(--ni-private-step-icon-background-none-size);
17719
+ --ni-private-step-line-color: ${warningColor};
17720
+ }
17721
+
17722
+ :host([severity="success"]) .control {
17723
+ --ni-private-step-icon-color: var(--ni-private-step-icon-inverse-color);
17724
+ --ni-private-step-icon-border-color: ${passColor};
17725
+ --ni-private-step-icon-background-color: ${passColor};
17726
+ --ni-private-step-icon-background-size: var(--ni-private-step-icon-background-full-size);
17727
+ --ni-private-step-line-color: rgba(${borderRgbPartialColor}, 0.1);
17728
+ }
17729
+
17730
+ :host([selected]) .control {
17731
+ --ni-private-step-icon-color: ${borderHoverColor};
17732
+ --ni-private-step-icon-border-color: ${borderHoverColor};
17733
+ --ni-private-step-icon-background-color: rgb(from ${borderHoverColor} r g b / 30%);
17734
+ --ni-private-step-icon-background-size: var(--ni-private-step-icon-background-none-size);
17735
+ --ni-private-step-line-color: ${borderHoverColor};
17736
+ }
17737
+
17738
+ .icon {
17739
+ display: inline-flex;
17740
+ align-items: center;
17741
+ justify-content: center;
17742
+ flex: none;
17743
+ height: ${controlHeight};
17744
+ width: ${controlHeight};
17745
+ ${userSelectNone$1};
17746
+ font: ${buttonLabelFont};
17747
+ color: var(--ni-private-step-icon-color);
17748
+ ${iconColor.cssCustomProperty}: var(--ni-private-step-icon-color);
17749
+ border-style: solid;
17750
+ border-radius: 100%;
17751
+ border-color: var(--ni-private-step-icon-border-color);
17752
+ border-width: 1px;
17753
+ background-image: radial-gradient(
17754
+ closest-side,
17755
+ ${'' /* Workaround to prevent aliasing on radial-gradient boundaries, see:
17756
+ https://frontendmasters.com/blog/obsessing-over-smooth-radial-gradient-disc-edges
17757
+ */}
17758
+ var(--ni-private-step-icon-background-color) calc(100% - 1px/var(--ni-private-device-resolution)),
17759
+ transparent 100%
17760
+ );
17761
+ background-origin: border-box;
17762
+ background-size: var(--ni-private-step-icon-background-size);
17763
+ background-repeat: no-repeat;
17764
+ background-position: center center;
17765
+ position: relative;
17766
+ transition:
17767
+ border-color ${smallDelay} ease-in-out,
17768
+ border-width ${smallDelay} ease-in-out,
17769
+ background-size ${smallDelay} ease-out;
17770
+ }
17582
17771
 
17583
- :host(:active) {
17584
- background: none;
17585
- }
17772
+ :host([selected]) .icon {
17773
+ border-width: 2px;
17774
+ }
17586
17775
 
17587
- :host([disabled]) {
17588
- cursor: default;
17589
- color: ${bodyDisabledFontColor};
17590
- background: none;
17591
- }
17776
+ .icon::before {
17777
+ content: '';
17778
+ position: absolute;
17779
+ width: 100%;
17780
+ height: 100%;
17781
+ pointer-events: none;
17782
+ outline-color: var(--ni-private-step-icon-outline-inset-color);
17783
+ outline-style: solid;
17784
+ outline-width: 0px;
17785
+ outline-offset: 0px;
17786
+ border: 1px solid transparent;
17787
+ border-radius: 100%;
17788
+ color: transparent;
17789
+ background-clip: border-box;
17790
+ transition:
17791
+ outline-color ${smallDelay} ease-in-out,
17792
+ outline-width ${smallDelay} ease-in-out,
17793
+ outline-offset ${smallDelay} ease-in-out;
17794
+ }
17592
17795
 
17593
- slot:not([name]) {
17594
- pointer-events: none;
17595
- display: block;
17596
- padding: ${mediumPadding} ${standardPadding}
17597
- calc(${mediumPadding} - ${borderWidth});
17598
- }
17796
+ .icon-slot {
17797
+ display: contents;
17798
+ }
17599
17799
 
17600
- a::before {
17601
- content: '';
17602
- position: absolute;
17603
- bottom: calc(
17604
- var(--ni-private-active-indicator-width) +
17605
- var(--ni-private-indicator-lines-gap)
17606
- );
17607
- width: 0px;
17608
- height: 0px;
17609
- border-bottom: ${borderHoverColor}
17610
- var(--ni-private-focus-indicator-width) solid;
17611
- transition: width ${smallDelay} ease-in;
17612
- }
17800
+ :host([severity="error"]) .icon-slot,
17801
+ :host([severity="warning"]) .icon-slot,
17802
+ :host([severity="success"]) .icon-slot {
17803
+ display: none;
17804
+ }
17613
17805
 
17614
- @media (prefers-reduced-motion) {
17615
- a::before {
17616
- transition-duration: 0s;
17806
+ :host([selected]) .icon-slot,
17807
+ :host([disabled]) .icon-slot {
17808
+ display: contents;
17617
17809
  }
17618
- }
17619
17810
 
17620
- a${focusVisible}::before {
17621
- width: calc(100% - 2 * var(--ni-private-focus-indicator-inset-width));
17622
- }
17811
+ .icon-severity {
17812
+ display: none;
17813
+ }
17623
17814
 
17624
- a {
17625
- display: inline-flex;
17626
- text-decoration: none;
17627
- color: inherit;
17628
- cursor: inherit;
17629
- outline: none;
17630
- align-items: center;
17631
- justify-content: center;
17632
- }
17815
+ :host([severity="error"]) .icon-severity,
17816
+ :host([severity="warning"]) .icon-severity,
17817
+ :host([severity="success"]) .icon-severity {
17818
+ display: contents;
17819
+ }
17633
17820
 
17634
- a::after {
17635
- content: '';
17636
- position: absolute;
17637
- bottom: 0px;
17638
- width: 0px;
17639
- height: 0px;
17640
- border-bottom: ${borderHoverColor}
17641
- var(--ni-private-active-indicator-width) solid;
17642
- transition: width ${smallDelay} ease-in;
17643
- }
17821
+ :host([selected]) .icon-severity,
17822
+ :host([disabled]) .icon-severity {
17823
+ display: none;
17824
+ }
17644
17825
 
17645
- @media (prefers-reduced-motion) {
17646
- a::after {
17647
- transition-duration: 0s;
17826
+ .content {
17827
+ display: inline-flex;
17828
+ ${'' /* Control width - icon size */}
17829
+ width: calc(100% - 32px);
17830
+ flex-direction: column;
17831
+ padding-top: ${smallPadding};
17832
+ padding-bottom: ${smallPadding};
17648
17833
  }
17649
- }
17650
17834
 
17651
- a${focusVisible}::after {
17652
- width: 100%;
17653
- border-bottom-width: var(--ni-private-focus-indicator-width);
17654
- }
17835
+ .title-wrapper {
17836
+ display: inline-flex;
17837
+ height: ${controlSlimHeight};
17838
+ flex-direction: row;
17839
+ align-items: center;
17840
+ justify-content: start;
17841
+ gap: ${smallPadding};
17842
+ font: ${bodyFont};
17843
+ }
17655
17844
 
17656
- :host([aria-current]) a::after {
17657
- width: 100%;
17658
- border-bottom-width: var(--ni-private-active-indicator-width);
17659
- }
17845
+ [part='start'] {
17846
+ display: none;
17847
+ }
17660
17848
 
17661
- :host([disabled][aria-current]) a::after {
17662
- border-bottom-color: rgba(${borderHoverColor}, 0.3);
17663
- }
17849
+ .title {
17850
+ display: inline-block;
17851
+ flex: none;
17852
+ white-space: nowrap;
17853
+ overflow: hidden;
17854
+ text-overflow: ellipsis;
17855
+ ${'' /* Content width - (gap + line min width) */}
17856
+ max-width: calc(100% - (${smallPadding} + ${standardPadding}));
17857
+ }
17664
17858
 
17665
- [part='start'] {
17666
- display: none;
17667
- }
17859
+ [part='end'] {
17860
+ display: none;
17861
+ }
17862
+
17863
+ .line {
17864
+ display: inline-block;
17865
+ flex: 1;
17866
+ min-width: ${standardPadding};
17867
+ height: 1px;
17868
+ background: var(--ni-private-step-line-color);
17869
+ transform: scale(1, 1);
17870
+ transition:
17871
+ background-color ${smallDelay} ease-in-out,
17872
+ transform ${smallDelay} ease-in-out;
17873
+ }
17668
17874
 
17669
- [part='end'] {
17670
- display: none;
17875
+ .subtitle {
17876
+ font: ${errorTextFont};
17877
+ white-space: nowrap;
17878
+ overflow: hidden;
17879
+ text-overflow: ellipsis;
17880
+ ${'' /* Content width */}
17881
+ max-width: 100%;
17882
+ }
17671
17883
  }
17672
- `;
17673
17884
 
17674
- const template$V = (context, definition) => html `
17675
- <template slot="anchortab" role="tab" aria-disabled="${x => x.disabled}">
17676
- <a
17677
- download="${x => x.download}"
17678
- href=${x => (x.disabled ? null : x.href)}
17679
- hreflang="${x => x.hreflang}"
17680
- ping="${x => x.ping}"
17681
- referrerpolicy="${x => x.referrerpolicy}"
17682
- rel="${x => x.rel}"
17683
- target="${x => x.target}"
17684
- type="${x => x.type}"
17685
- >
17686
- ${startSlotTemplate(context, definition)}
17687
- <slot></slot>
17688
- ${endSlotTemplate(context, definition)}
17689
- </a>
17690
- </template>
17691
- `;
17885
+ @layer hover {
17886
+ .control:hover {
17887
+ --ni-private-step-icon-border-color: ${borderHoverColor};
17888
+ --ni-private-step-icon-background-size: var(--ni-private-step-icon-background-inset-size);
17889
+ --ni-private-step-line-color: ${borderHoverColor};
17890
+ }
17692
17891
 
17693
- /**
17694
- * A nimble-styled link tab
17695
- */
17696
- class AnchorTab extends AnchorBase {
17697
- constructor() {
17698
- super(...arguments);
17699
- /**
17700
- * When true, the control will be immutable by user interaction. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled | disabled HTML attribute} for more information.
17701
- * @public
17702
- * @remarks
17703
- * HTML Attribute: disabled
17704
- */
17705
- this.disabled = false;
17706
- /**
17707
- * Indicates the current "selected" state of various widgets.
17708
- * {@link https://www.w3.org/TR/wai-aria-1.1/#aria-selected}
17709
- *
17710
- * @public
17711
- * @remarks
17712
- * HTML Attribute: aria-selected
17713
- */
17714
- this.ariaSelected = 'false';
17715
- }
17716
- }
17717
- __decorate([
17718
- attr({ mode: 'boolean' })
17719
- ], AnchorTab.prototype, "disabled", void 0);
17720
- __decorate([
17721
- attr({ attribute: 'aria-selected' })
17722
- ], AnchorTab.prototype, "ariaSelected", void 0);
17723
- // FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
17724
- const nimbleAnchorTab = AnchorTab.compose({
17725
- baseName: 'anchor-tab',
17726
- template: template$V,
17727
- styles: styles$17,
17728
- shadowOptions: {
17729
- delegatesFocus: true
17730
- }
17731
- });
17732
- DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorTab());
17892
+ :host([severity="error"]) .control:hover {
17893
+ --ni-private-step-icon-border-color: ${failColor};
17894
+ --ni-private-step-icon-background-size: var(--ni-private-step-icon-background-none-size);
17895
+ --ni-private-step-line-color: ${failColor};
17896
+ }
17733
17897
 
17734
- const styles$16 = css `
17735
- ${display$2('flex')}
17898
+ :host([severity="warning"]) .control:hover {
17899
+ --ni-private-step-icon-border-color: ${warningColor};
17900
+ --ni-private-step-icon-background-size: var(--ni-private-step-icon-background-none-size);
17901
+ --ni-private-step-line-color: ${warningColor};
17902
+ }
17736
17903
 
17737
- :host {
17738
- flex-direction: column;
17739
- }
17904
+ :host([severity="success"]) .control:hover {
17905
+ --ni-private-step-icon-color: var(--ni-private-step-icon-inverse-color);
17906
+ --ni-private-step-icon-border-color: ${passColor};
17907
+ --ni-private-step-icon-background-size: var(--ni-private-step-icon-background-inset-size);
17908
+ --ni-private-step-line-color: ${passColor};
17909
+ }
17740
17910
 
17741
- .tab-bar {
17742
- display: flex;
17743
- }
17911
+ :host([selected]) .control:hover {
17912
+ --ni-private-step-icon-color: ${buttonLabelFontColor};
17913
+ --ni-private-step-icon-border-color: ${borderHoverColor};
17914
+ --ni-private-step-icon-background-size: var(--ni-private-step-icon-background-inset-size);
17915
+ --ni-private-step-line-color: ${borderHoverColor};
17916
+ }
17744
17917
 
17745
- [part='start'] {
17746
- display: none;
17747
- }
17918
+ .control:hover .icon {
17919
+ border-width: 2px;
17920
+ }
17748
17921
 
17749
- .scroll-button.left {
17750
- margin-right: ${smallPadding};
17922
+ .control:hover .line {
17923
+ transform: scale(1, 2);
17924
+ }
17751
17925
  }
17752
17926
 
17753
- .tablist {
17754
- display: flex;
17755
- width: max-content;
17756
- align-self: end;
17757
- overflow-x: scroll;
17758
- scrollbar-width: none;
17927
+ @layer focusVisible {
17928
+ .control${focusVisible} {
17929
+ --ni-private-step-icon-border-color: ${borderHoverColor};
17930
+ --ni-private-step-icon-outline-inset-color: ${borderHoverColor};
17931
+ --ni-private-step-icon-background-size: var(--ni-private-step-icon-background-inset-size);
17932
+ --ni-private-step-line-color: ${borderHoverColor};
17933
+ }
17934
+
17935
+ :host([severity="error"]) .control${focusVisible} {
17936
+ --ni-private-step-icon-border-color: ${failColor};
17937
+ --ni-private-step-icon-background-size: var(--ni-private-step-icon-background-none-size);
17938
+ --ni-private-step-icon-outline-inset-color: ${failColor};
17939
+ --ni-private-step-line-color: ${failColor};
17940
+ }
17941
+
17942
+ :host([severity="warning"]) .control${focusVisible} {
17943
+ --ni-private-step-icon-border-color: ${warningColor};
17944
+ --ni-private-step-icon-background-size: var(--ni-private-step-icon-background-none-size);
17945
+ --ni-private-step-icon-outline-inset-color: ${warningColor};
17946
+ --ni-private-step-line-color: ${warningColor};
17947
+ }
17948
+
17949
+ :host([severity="success"]) .control${focusVisible} {
17950
+ --ni-private-step-icon-color: var(--ni-private-step-icon-inverse-color);
17951
+ --ni-private-step-icon-border-color: ${passColor};
17952
+ --ni-private-step-icon-background-size: var(--ni-private-step-icon-background-inset-size);
17953
+ --ni-private-step-icon-outline-inset-color: transparent;
17954
+ --ni-private-step-line-color: ${passColor};
17955
+ }
17956
+
17957
+ :host([selected]) .control${focusVisible} {
17958
+ --ni-private-step-icon-color: ${borderHoverColor};
17959
+ --ni-private-step-icon-border-color: ${borderHoverColor};
17960
+ --ni-private-step-icon-background-size: var(--ni-private-step-icon-background-none-size);
17961
+ --ni-private-step-icon-outline-inset-color: ${borderHoverColor};
17962
+ --ni-private-step-line-color: ${borderHoverColor};
17963
+ }
17964
+
17965
+ .control${focusVisible} .icon {
17966
+ border-width: 2px;
17967
+ }
17968
+
17969
+ .control${focusVisible} .icon::before {
17970
+ outline-width: ${borderWidth};
17971
+ outline-offset: -2px;
17972
+ }
17973
+
17974
+ .control${focusVisible} .line {
17975
+ transform: scale(1, 2);
17976
+ }
17759
17977
  }
17760
17978
 
17761
- .scroll-button.right {
17762
- margin-left: ${smallPadding};
17979
+ @layer active {
17980
+ .control:active {
17981
+ --ni-private-step-icon-border-color: ${borderHoverColor};
17982
+ --ni-private-step-icon-background-color: ${fillSelectedColor};
17983
+ --ni-private-step-icon-background-size: var(--ni-private-step-icon-background-full-size);
17984
+ --ni-private-step-line-color: ${borderHoverColor};
17985
+ }
17986
+
17987
+ :host([severity="error"]) .control:active {
17988
+ --ni-private-step-icon-border-color: ${failColor};
17989
+ --ni-private-step-icon-background-color: rgb(from ${failColor} r g b / 30%);
17990
+ --ni-private-step-line-color: ${failColor};
17991
+ }
17992
+
17993
+ :host([severity="warning"]) .control:active {
17994
+ --ni-private-step-icon-border-color: ${warningColor};
17995
+ --ni-private-step-icon-background-color: rgb(from ${warningColor} r g b / 30%);
17996
+ --ni-private-step-line-color: ${warningColor};
17997
+ }
17998
+
17999
+ :host([severity="success"]) .control:active {
18000
+ --ni-private-step-icon-color: ${buttonLabelFontColor};
18001
+ --ni-private-step-icon-border-color: ${passColor};
18002
+ --ni-private-step-icon-background-color: rgb(from ${passColor} r g b / 30%);
18003
+ --ni-private-step-line-color: ${passColor};
18004
+ }
18005
+
18006
+ :host([selected]) .control:active {
18007
+ --ni-private-step-icon-color: ${buttonLabelFontColor};
18008
+ --ni-private-step-icon-border-color: ${borderHoverColor};
18009
+ --ni-private-step-icon-background-color: rgb(from ${borderHoverColor} r g b / 30%);
18010
+ --ni-private-step-line-color: ${borderHoverColor};
18011
+ }
18012
+
18013
+ .control:active .icon {
18014
+ border-width: 2px;
18015
+ }
18016
+
18017
+ .control:active .icon::before {
18018
+ outline-width: 0px;
18019
+ outline-offset: 0px;
18020
+ }
18021
+
18022
+ .control:active .line {
18023
+ transform: scale(1, 1);
18024
+ }
17763
18025
  }
17764
18026
 
17765
- [part='end'] {
17766
- flex: 1;
18027
+ @layer disabled {
18028
+ :host([disabled]) .control {
18029
+ cursor: default;
18030
+ color: ${buttonLabelDisabledFontColor};
18031
+ --ni-private-step-icon-color: rgb(from ${buttonLabelFontColor} r g b / 30%);
18032
+ --ni-private-step-icon-border-color: transparent;
18033
+ --ni-private-step-icon-background-color: rgba(${borderRgbPartialColor}, 0.1);
18034
+ --ni-private-step-icon-background-size: var(--ni-private-step-icon-background-full-size);
18035
+ --ni-private-step-icon-outline-inset-color: transparent;
18036
+ --ni-private-step-line-color: rgba(${borderRgbPartialColor}, 0.1);
18037
+ }
18038
+
18039
+ :host([disabled]) .line {
18040
+ transform: scale(1, 1);
18041
+ }
17767
18042
  }
17768
18043
 
17769
- [part='tabpanel'] {
17770
- flex: 1;
18044
+ @layer top {
18045
+ @media (prefers-reduced-motion) {
18046
+ .control {
18047
+ transition-duration: 0s;
18048
+ }
18049
+ }
17771
18050
  }
17772
- `;
18051
+ `.withBehaviors(themeBehavior(Theme.light, css `
18052
+ @layer base {
18053
+ .control {
18054
+ --ni-private-step-icon-inverse-color: ${White};
18055
+ }
18056
+ }
18057
+ `), themeBehavior(Theme.dark, css `
18058
+ @layer base {
18059
+ .control {
18060
+ --ni-private-step-icon-inverse-color: ${Black91};
18061
+ }
18062
+ }
18063
+ `), themeBehavior(Theme.color, css `
18064
+ @layer base {
18065
+ .control {
18066
+ --ni-private-step-icon-inverse-color: ${Black15};
18067
+ }
17773
18068
 
17774
- const styles$15 = css `
17775
- ${styles$1b}
17776
- ${buttonAppearanceVariantStyles}
17777
- `;
18069
+ :host([severity="success"]) .control {
18070
+ --ni-private-step-icon-background-color: rgb(from ${passColor} r g b / 30%);
18071
+ }
18072
+ }
18073
+ `));
17778
18074
 
17779
- const template$U = (context, definition) => html `
17780
- <button
17781
- class="control"
17782
- part="control"
17783
- ?autofocus="${x => x.autofocus}"
17784
- ?disabled="${x => x.disabled}"
17785
- form="${x => x.formId}"
17786
- formaction="${x => x.formaction}"
17787
- formenctype="${x => x.formenctype}"
17788
- formmethod="${x => x.formmethod}"
17789
- formnovalidate="${x => x.formnovalidate}"
17790
- formtarget="${x => x.formtarget}"
17791
- name="${x => x.name}"
17792
- type="${x => x.type}"
17793
- value="${x => x.value}"
17794
- tabindex="${x => x.tabIndex}"
17795
- aria-atomic="${x => x.ariaAtomic}"
17796
- aria-busy="${x => x.ariaBusy}"
17797
- aria-controls="${x => x.ariaControls}"
17798
- aria-current="${x => x.ariaCurrent}"
17799
- aria-describedby="${x => x.ariaDescribedby}"
17800
- aria-details="${x => x.ariaDetails}"
17801
- aria-disabled="${x => x.ariaDisabled}"
17802
- aria-errormessage="${x => x.ariaErrormessage}"
17803
- aria-expanded="${x => x.ariaExpanded}"
17804
- aria-flowto="${x => x.ariaFlowto}"
17805
- aria-haspopup="${x => x.ariaHaspopup}"
17806
- aria-hidden="${x => x.ariaHidden}"
17807
- aria-invalid="${x => x.ariaInvalid}"
17808
- aria-keyshortcuts="${x => x.ariaKeyshortcuts}"
17809
- aria-label="${x => x.ariaLabel}"
17810
- aria-labelledby="${x => x.ariaLabelledby}"
17811
- aria-live="${x => x.ariaLive}"
17812
- aria-owns="${x => x.ariaOwns}"
17813
- aria-pressed="${x => x.ariaPressed}"
17814
- aria-relevant="${x => x.ariaRelevant}"
17815
- aria-roledescription="${x => x.ariaRoledescription}"
17816
- ${ref('control')}
17817
- >
17818
- ${startSlotTemplate(context, definition)}
17819
- <span class="content" part="content">
17820
- <slot ${slotted('defaultSlottedContent')}></slot>
17821
- </span>
17822
- ${endSlotTemplate(context, definition)}
17823
- </button>
18075
+ const styles$18 = css `
18076
+ ${styles$19}
18077
+ ${'' /* Anchor specific styles */}
18078
+ @layer base {
18079
+ .control {
18080
+ text-decoration: none;
18081
+ }
18082
+ }
17824
18083
  `;
17825
18084
 
17826
18085
  /**
17827
- * A nimble-styled HTML button
18086
+ * The runtime behavior for template overflow detection.
18087
+ * @public
17828
18088
  */
17829
- let Button$1 = class Button extends Button$2 {
17830
- constructor() {
17831
- super(...arguments);
17832
- /**
17833
- * @public
17834
- * @remarks
17835
- * HTML Attribute: appearance
17836
- */
17837
- this.appearance = ButtonAppearance.outline;
17838
- /**
17839
- * @public
17840
- * @remarks
17841
- * HTML Attribute: content-hidden
17842
- */
17843
- this.contentHidden = false;
18089
+ class OverflowBehavior {
18090
+ /**
18091
+ * Creates an instance of OverflowBehavior.
18092
+ * @param target - The element to check for overflow.
18093
+ * @param propertyName - The name of the property to assign the overflow state to.
18094
+ */
18095
+ constructor(target, propertyName) {
18096
+ this.target = target;
18097
+ this.propertyName = propertyName;
17844
18098
  }
17845
- };
17846
- __decorate([
17847
- attr
17848
- ], Button$1.prototype, "appearance", void 0);
17849
- __decorate([
17850
- attr({ attribute: 'appearance-variant' })
17851
- ], Button$1.prototype, "appearanceVariant", void 0);
17852
- __decorate([
17853
- attr({ attribute: 'content-hidden', mode: 'boolean' })
17854
- ], Button$1.prototype, "contentHidden", void 0);
17855
- __decorate([
17856
- attr({ attribute: 'tabindex', converter: nullableNumberConverter })
17857
- ], Button$1.prototype, "tabIndex", void 0);
18099
+ /**
18100
+ * Bind this behavior to the source.
18101
+ * @param source - The source to bind to.
18102
+ * @param context - The execution context that the binding is operating within.
18103
+ */
18104
+ bind(source) {
18105
+ this.source = source;
18106
+ this.setSourceValue(false);
18107
+ this.mouseOverHandler = () => {
18108
+ const hasOverflow = this.target.offsetWidth < this.target.scrollWidth;
18109
+ this.setSourceValue(hasOverflow);
18110
+ };
18111
+ this.mouseOutHandler = () => {
18112
+ this.setSourceValue(false);
18113
+ };
18114
+ this.target.addEventListener('mouseover', this.mouseOverHandler);
18115
+ this.target.addEventListener('mouseout', this.mouseOutHandler);
18116
+ }
18117
+ /**
18118
+ * Unbinds this behavior from the source.
18119
+ * @param source - The source to unbind from.
18120
+ */
18121
+ unbind() {
18122
+ this.source = undefined;
18123
+ this.target.removeEventListener('mouseover', this.mouseOverHandler);
18124
+ this.target.removeEventListener('mouseout', this.mouseOutHandler);
18125
+ }
18126
+ setSourceValue(value) {
18127
+ // @ts-expect-error set property on source
18128
+ this.source[this.propertyName] = value;
18129
+ }
18130
+ }
17858
18131
  /**
17859
- * A function that returns a nimble-button registration for configuring the component with a DesignSystem.
17860
- * Implements {@link @ni/fast-foundation#buttonTemplate}
17861
- *
18132
+ * A directive that observes if an element has overflow and sets a flag.
18133
+ * @param propertyName - The name of the property to assign the overflow flag.
17862
18134
  * @public
17863
- * @remarks
17864
- * Generates HTML Element: \<nimble-button\>
17865
- *
17866
18135
  */
17867
- const nimbleButton = Button$1.compose({
17868
- baseName: 'button',
17869
- baseClass: Button$2,
17870
- template: template$U,
17871
- styles: styles$15,
17872
- shadowOptions: {
17873
- delegatesFocus: true
18136
+ function overflow(propertyName) {
18137
+ return new AttachedBehaviorHTMLDirective('nimble-overflow', OverflowBehavior, propertyName);
18138
+ }
18139
+
18140
+ const severityTextTemplate = html `
18141
+ <div
18142
+ class="severity-text"
18143
+ ${overflow('severityHasOverflow')}
18144
+ title="${x => (x.severityHasOverflow && x.severityText ? x.severityText : undefined)}"
18145
+ aria-live="polite"
18146
+ >${x => x.severityText}</div>`;
18147
+
18148
+ const Severity = {
18149
+ default: undefined,
18150
+ error: 'error',
18151
+ warning: 'warning',
18152
+ success: 'success',
18153
+ };
18154
+ // As the returned class is internal to the function, we can't write a signature that uses is directly, so rely on inference
18155
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type
18156
+ function mixinSeverityPattern(base) {
18157
+ /**
18158
+ * Mixin to provide severity text related properties to an element
18159
+ */
18160
+ class SeverityPatternElement extends base {
18161
+ constructor() {
18162
+ super(...arguments);
18163
+ /* @internal
18164
+ * Indicates if the severity text has overflowed its container. The value should not be
18165
+ * set directly. Instead, it is used with the `overflow` directive.
18166
+ */
18167
+ this.severityHasOverflow = false;
18168
+ }
17874
18169
  }
17875
- });
17876
- DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleButton());
17877
- const buttonTag = 'nimble-button';
18170
+ attr({ attribute: 'severity-text' })(SeverityPatternElement.prototype, 'severityText');
18171
+ observable(SeverityPatternElement.prototype, 'severityHasOverflow');
18172
+ return SeverityPatternElement;
18173
+ }
17878
18174
 
17879
18175
  /* 🤖 this file was generated by svg-to-ts */
17880
18176
  const add16X16 = {
@@ -18815,22 +19111,13 @@
18815
19111
  };
18816
19112
 
18817
19113
  // Avoiding any whitespace in the template because this is an inline element
18818
- const template$T = html `<div
19114
+ const template$W = html `<div
18819
19115
  class="icon"
18820
19116
  aria-hidden="true"
18821
19117
  :innerHTML=${x => x.icon.data}
18822
19118
  ></div>`;
18823
19119
 
18824
- /**
18825
- * Set user-select: none in a way that works across all supported browsers.
18826
- * https://developer.mozilla.org/en-US/docs/Web/CSS/user-select#browser_compatibility
18827
- */
18828
- const userSelectNone$1 = cssPartial `
18829
- user-select: none;
18830
- -webkit-user-select: none;
18831
- `;
18832
-
18833
- const styles$14 = css `
19120
+ const styles$17 = css `
18834
19121
  ${display$2('inline-flex')}
18835
19122
 
18836
19123
  :host {
@@ -18893,12 +19180,524 @@
18893
19180
  const registerIconSvg = (baseName, iconClass) => {
18894
19181
  const composedIcon = iconClass.compose({
18895
19182
  baseName,
18896
- template: template$T,
18897
- styles: styles$14
19183
+ template: template$W,
19184
+ styles: styles$17
18898
19185
  });
18899
19186
  DesignSystem.getOrCreate().withPrefix('nimble').register(composedIcon());
18900
19187
  };
18901
19188
 
19189
+ // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
19190
+ // See generation source in nimble-components/build/generate-icons
19191
+ /**
19192
+ * The icon component for the 'exclamationMark' icon
19193
+ */
19194
+ class IconExclamationMark extends IconSvg {
19195
+ constructor() {
19196
+ super(exclamationMark16X16);
19197
+ }
19198
+ }
19199
+ registerIconSvg('icon-exclamation-mark', IconExclamationMark);
19200
+ const iconExclamationMarkTag = 'nimble-icon-exclamation-mark';
19201
+
19202
+ // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
19203
+ // See generation source in nimble-components/build/generate-icons
19204
+ /**
19205
+ * The icon component for the 'triangleFilled' icon
19206
+ */
19207
+ class IconTriangleFilled extends IconSvg {
19208
+ constructor() {
19209
+ super(triangleFilled16X16);
19210
+ }
19211
+ }
19212
+ registerIconSvg('icon-triangle-filled', IconTriangleFilled);
19213
+ const iconTriangleFilledTag = 'nimble-icon-triangle-filled';
19214
+
19215
+ // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
19216
+ // See generation source in nimble-components/build/generate-icons
19217
+ /**
19218
+ * The icon component for the 'check' icon
19219
+ */
19220
+ class IconCheck extends IconSvg {
19221
+ constructor() {
19222
+ super(check16X16);
19223
+ }
19224
+ }
19225
+ registerIconSvg('icon-check', IconCheck);
19226
+ const iconCheckTag = 'nimble-icon-check';
19227
+
19228
+ const template$V = (context, definition) => html `
19229
+ <template slot="step">
19230
+ <div class="
19231
+ container
19232
+ ${x => (x.stepInternals.orientation === 'vertical' ? 'vertical' : '')}
19233
+ ${x => (x.stepInternals.last ? 'last' : '')}
19234
+ ">
19235
+ <a
19236
+ class="control"
19237
+ part="control"
19238
+ download="${x => x.download}"
19239
+ href=${x => (x.disabled ? null : x.href)}
19240
+ hreflang="${x => x.hreflang}"
19241
+ ping="${x => x.ping}"
19242
+ referrerpolicy="${x => x.referrerpolicy}"
19243
+ rel="${x => x.rel}"
19244
+ target="${x => x.target}"
19245
+ type="${x => x.type}"
19246
+ tabindex="${x => x.tabIndex}"
19247
+ aria-atomic="${x => x.ariaAtomic}"
19248
+ aria-busy="${x => x.ariaBusy}"
19249
+ aria-controls="${x => x.ariaControls}"
19250
+ aria-current="${x => x.ariaCurrent}"
19251
+ aria-describedby="${x => x.ariaDescribedby}"
19252
+ aria-details="${x => x.ariaDetails}"
19253
+ aria-disabled="${x => x.ariaDisabled}"
19254
+ aria-errormessage="${x => x.ariaErrormessage}"
19255
+ aria-expanded="${x => x.ariaExpanded}"
19256
+ aria-flowto="${x => x.ariaFlowto}"
19257
+ aria-haspopup="${x => x.ariaHaspopup}"
19258
+ aria-hidden="${x => x.ariaHidden}"
19259
+ aria-invalid="${x => x.ariaInvalid}"
19260
+ aria-keyshortcuts="${x => x.ariaKeyshortcuts}"
19261
+ aria-label="${x => x.ariaLabel}"
19262
+ aria-labelledby="${x => x.ariaLabelledby}"
19263
+ aria-live="${x => x.ariaLive}"
19264
+ aria-owns="${x => x.ariaOwns}"
19265
+ aria-relevant="${x => x.ariaRelevant}"
19266
+ aria-roledescription="${x => x.ariaRoledescription}"
19267
+ ${ref('control')}
19268
+ >
19269
+ <div class="icon">
19270
+ <div class="icon-slot"><slot ${slotted('defaultSlottedContent')}></slot></div>
19271
+ <div class="icon-severity">
19272
+ ${when(x => x.severity === Severity.error, html `<${iconExclamationMarkTag}></${iconExclamationMarkTag}>`)}
19273
+ ${when(x => x.severity === Severity.warning, html `<${iconTriangleFilledTag}></${iconTriangleFilledTag}>`)}
19274
+ ${when(x => x.severity === Severity.success, html `<${iconCheckTag}></${iconCheckTag}>`)}
19275
+ </div>
19276
+ </div>
19277
+ <div class="content">
19278
+ <div class="title-wrapper">
19279
+ ${startSlotTemplate(context, definition)}
19280
+ <div class="title"><slot name="title"></slot></div>
19281
+ ${endSlotTemplate(context, definition)}
19282
+ <div class="line"></div>
19283
+ </div>
19284
+ <div class="subtitle">
19285
+ <slot name="subtitle"></slot>
19286
+ </div>
19287
+ </div>
19288
+ </a>
19289
+ ${severityTextTemplate}
19290
+ </div>
19291
+ </template>
19292
+ `;
19293
+
19294
+ /**
19295
+ * Orientation of steppers.
19296
+ * @public
19297
+ */
19298
+ const StepperOrientation = Orientation;
19299
+
19300
+ /**
19301
+ * Internal properties configurable for a step
19302
+ */
19303
+ class StepInternals {
19304
+ constructor() {
19305
+ this.orientation = StepperOrientation.horizontal;
19306
+ this.last = false;
19307
+ }
19308
+ }
19309
+ __decorate([
19310
+ observable
19311
+ ], StepInternals.prototype, "orientation", void 0);
19312
+ __decorate([
19313
+ observable
19314
+ ], StepInternals.prototype, "last", void 0);
19315
+
19316
+ const AnchorStepSeverity = Severity;
19317
+
19318
+ /**
19319
+ * A nimble-styled anchor step for a stepper
19320
+ */
19321
+ class AnchorStep extends mixinSeverityPattern(AnchorBase) {
19322
+ constructor() {
19323
+ super(...arguments);
19324
+ /**
19325
+ * @public
19326
+ * @remarks
19327
+ * HTML Attribute: disabled
19328
+ */
19329
+ this.severity = AnchorStepSeverity.default;
19330
+ /**
19331
+ * @public
19332
+ * @remarks
19333
+ * HTML Attribute: disabled
19334
+ */
19335
+ this.disabled = false;
19336
+ /**
19337
+ * @public
19338
+ * @remarks
19339
+ * HTML Attribute: readonly
19340
+ */
19341
+ this.readOnly = false;
19342
+ /**
19343
+ * @public
19344
+ * @remarks
19345
+ * HTML Attribute: selected
19346
+ */
19347
+ this.selected = false;
19348
+ /**
19349
+ * @internal
19350
+ */
19351
+ this.stepInternals = new StepInternals();
19352
+ }
19353
+ }
19354
+ __decorate([
19355
+ attr()
19356
+ ], AnchorStep.prototype, "severity", void 0);
19357
+ __decorate([
19358
+ attr({ mode: 'boolean' })
19359
+ ], AnchorStep.prototype, "disabled", void 0);
19360
+ __decorate([
19361
+ attr({ attribute: 'readonly', mode: 'boolean' })
19362
+ ], AnchorStep.prototype, "readOnly", void 0);
19363
+ __decorate([
19364
+ attr({ mode: 'boolean' })
19365
+ ], AnchorStep.prototype, "selected", void 0);
19366
+ __decorate([
19367
+ attr({ attribute: 'tabindex', converter: nullableNumberConverter })
19368
+ ], AnchorStep.prototype, "tabIndex", void 0);
19369
+ const nimbleAnchorStep = AnchorStep.compose({
19370
+ baseName: 'anchor-step',
19371
+ template: template$V,
19372
+ styles: styles$18,
19373
+ shadowOptions: {
19374
+ delegatesFocus: true
19375
+ }
19376
+ });
19377
+ DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorStep());
19378
+
19379
+ const styles$16 = css `
19380
+ ${display$2('inline-flex')}
19381
+
19382
+ :host {
19383
+ position: relative;
19384
+ font: ${buttonLabelFont};
19385
+ height: ${controlHeight};
19386
+ color: ${bodyFontColor};
19387
+ align-items: center;
19388
+ justify-content: center;
19389
+ cursor: pointer;
19390
+ text-wrap: nowrap;
19391
+ --ni-private-active-indicator-width: 2px;
19392
+ --ni-private-focus-indicator-width: 1px;
19393
+ --ni-private-indicator-lines-gap: 1px;
19394
+ --ni-private-focus-indicator-inset-width: 3px;
19395
+ }
19396
+
19397
+ :host(:hover) {
19398
+ background-color: ${fillHoverColor};
19399
+ }
19400
+
19401
+ :host(:hover[aria-current]) {
19402
+ background-color: ${fillHoverSelectedColor};
19403
+ }
19404
+
19405
+ :host(:active) {
19406
+ background: none;
19407
+ }
19408
+
19409
+ :host([disabled]) {
19410
+ cursor: default;
19411
+ color: ${bodyDisabledFontColor};
19412
+ background: none;
19413
+ }
19414
+
19415
+ slot:not([name]) {
19416
+ pointer-events: none;
19417
+ display: block;
19418
+ padding: ${mediumPadding} ${standardPadding}
19419
+ calc(${mediumPadding} - ${borderWidth});
19420
+ }
19421
+
19422
+ a::before {
19423
+ content: '';
19424
+ position: absolute;
19425
+ bottom: calc(
19426
+ var(--ni-private-active-indicator-width) +
19427
+ var(--ni-private-indicator-lines-gap)
19428
+ );
19429
+ width: 0px;
19430
+ height: 0px;
19431
+ border-bottom: ${borderHoverColor}
19432
+ var(--ni-private-focus-indicator-width) solid;
19433
+ transition: width ${smallDelay} ease-in;
19434
+ }
19435
+
19436
+ @media (prefers-reduced-motion) {
19437
+ a::before {
19438
+ transition-duration: 0s;
19439
+ }
19440
+ }
19441
+
19442
+ a${focusVisible}::before {
19443
+ width: calc(100% - 2 * var(--ni-private-focus-indicator-inset-width));
19444
+ }
19445
+
19446
+ a {
19447
+ display: inline-flex;
19448
+ text-decoration: none;
19449
+ color: inherit;
19450
+ cursor: inherit;
19451
+ outline: none;
19452
+ align-items: center;
19453
+ justify-content: center;
19454
+ }
19455
+
19456
+ a::after {
19457
+ content: '';
19458
+ position: absolute;
19459
+ bottom: 0px;
19460
+ width: 0px;
19461
+ height: 0px;
19462
+ border-bottom: ${borderHoverColor}
19463
+ var(--ni-private-active-indicator-width) solid;
19464
+ transition: width ${smallDelay} ease-in;
19465
+ }
19466
+
19467
+ @media (prefers-reduced-motion) {
19468
+ a::after {
19469
+ transition-duration: 0s;
19470
+ }
19471
+ }
19472
+
19473
+ a${focusVisible}::after {
19474
+ width: 100%;
19475
+ border-bottom-width: var(--ni-private-focus-indicator-width);
19476
+ }
19477
+
19478
+ :host([aria-current]) a::after {
19479
+ width: 100%;
19480
+ border-bottom-width: var(--ni-private-active-indicator-width);
19481
+ }
19482
+
19483
+ :host([disabled][aria-current]) a::after {
19484
+ border-bottom-color: rgba(${borderHoverColor}, 0.3);
19485
+ }
19486
+
19487
+ [part='start'] {
19488
+ display: none;
19489
+ }
19490
+
19491
+ [part='end'] {
19492
+ display: none;
19493
+ }
19494
+ `;
19495
+
19496
+ const template$U = (context, definition) => html `
19497
+ <template slot="anchortab" role="tab" aria-disabled="${x => x.disabled}">
19498
+ <a
19499
+ download="${x => x.download}"
19500
+ href=${x => (x.disabled ? null : x.href)}
19501
+ hreflang="${x => x.hreflang}"
19502
+ ping="${x => x.ping}"
19503
+ referrerpolicy="${x => x.referrerpolicy}"
19504
+ rel="${x => x.rel}"
19505
+ target="${x => x.target}"
19506
+ type="${x => x.type}"
19507
+ >
19508
+ ${startSlotTemplate(context, definition)}
19509
+ <slot></slot>
19510
+ ${endSlotTemplate(context, definition)}
19511
+ </a>
19512
+ </template>
19513
+ `;
19514
+
19515
+ /**
19516
+ * A nimble-styled link tab
19517
+ */
19518
+ class AnchorTab extends AnchorBase {
19519
+ constructor() {
19520
+ super(...arguments);
19521
+ /**
19522
+ * When true, the control will be immutable by user interaction. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled | disabled HTML attribute} for more information.
19523
+ * @public
19524
+ * @remarks
19525
+ * HTML Attribute: disabled
19526
+ */
19527
+ this.disabled = false;
19528
+ /**
19529
+ * Indicates the current "selected" state of various widgets.
19530
+ * {@link https://www.w3.org/TR/wai-aria-1.1/#aria-selected}
19531
+ *
19532
+ * @public
19533
+ * @remarks
19534
+ * HTML Attribute: aria-selected
19535
+ */
19536
+ this.ariaSelected = 'false';
19537
+ }
19538
+ }
19539
+ __decorate([
19540
+ attr({ mode: 'boolean' })
19541
+ ], AnchorTab.prototype, "disabled", void 0);
19542
+ __decorate([
19543
+ attr({ attribute: 'aria-selected' })
19544
+ ], AnchorTab.prototype, "ariaSelected", void 0);
19545
+ // FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
19546
+ const nimbleAnchorTab = AnchorTab.compose({
19547
+ baseName: 'anchor-tab',
19548
+ template: template$U,
19549
+ styles: styles$16,
19550
+ shadowOptions: {
19551
+ delegatesFocus: true
19552
+ }
19553
+ });
19554
+ DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorTab());
19555
+
19556
+ const styles$15 = css `
19557
+ ${display$2('flex')}
19558
+
19559
+ :host {
19560
+ flex-direction: column;
19561
+ }
19562
+
19563
+ .tab-bar {
19564
+ display: flex;
19565
+ }
19566
+
19567
+ [part='start'] {
19568
+ display: none;
19569
+ }
19570
+
19571
+ .scroll-button.left {
19572
+ margin-right: ${smallPadding};
19573
+ }
19574
+
19575
+ .tablist {
19576
+ display: flex;
19577
+ width: max-content;
19578
+ align-self: end;
19579
+ overflow-x: scroll;
19580
+ scrollbar-width: none;
19581
+ }
19582
+
19583
+ .scroll-button.right {
19584
+ margin-left: ${smallPadding};
19585
+ }
19586
+
19587
+ [part='end'] {
19588
+ flex: 1;
19589
+ }
19590
+
19591
+ [part='tabpanel'] {
19592
+ flex: 1;
19593
+ }
19594
+ `;
19595
+
19596
+ const styles$14 = css `
19597
+ ${styles$1d}
19598
+ ${buttonAppearanceVariantStyles}
19599
+ `;
19600
+
19601
+ const template$T = (context, definition) => html `
19602
+ <button
19603
+ class="control"
19604
+ part="control"
19605
+ ?autofocus="${x => x.autofocus}"
19606
+ ?disabled="${x => x.disabled}"
19607
+ form="${x => x.formId}"
19608
+ formaction="${x => x.formaction}"
19609
+ formenctype="${x => x.formenctype}"
19610
+ formmethod="${x => x.formmethod}"
19611
+ formnovalidate="${x => x.formnovalidate}"
19612
+ formtarget="${x => x.formtarget}"
19613
+ name="${x => x.name}"
19614
+ type="${x => x.type}"
19615
+ value="${x => x.value}"
19616
+ tabindex="${x => x.tabIndex}"
19617
+ aria-atomic="${x => x.ariaAtomic}"
19618
+ aria-busy="${x => x.ariaBusy}"
19619
+ aria-controls="${x => x.ariaControls}"
19620
+ aria-current="${x => x.ariaCurrent}"
19621
+ aria-describedby="${x => x.ariaDescribedby}"
19622
+ aria-details="${x => x.ariaDetails}"
19623
+ aria-disabled="${x => x.ariaDisabled}"
19624
+ aria-errormessage="${x => x.ariaErrormessage}"
19625
+ aria-expanded="${x => x.ariaExpanded}"
19626
+ aria-flowto="${x => x.ariaFlowto}"
19627
+ aria-haspopup="${x => x.ariaHaspopup}"
19628
+ aria-hidden="${x => x.ariaHidden}"
19629
+ aria-invalid="${x => x.ariaInvalid}"
19630
+ aria-keyshortcuts="${x => x.ariaKeyshortcuts}"
19631
+ aria-label="${x => x.ariaLabel}"
19632
+ aria-labelledby="${x => x.ariaLabelledby}"
19633
+ aria-live="${x => x.ariaLive}"
19634
+ aria-owns="${x => x.ariaOwns}"
19635
+ aria-pressed="${x => x.ariaPressed}"
19636
+ aria-relevant="${x => x.ariaRelevant}"
19637
+ aria-roledescription="${x => x.ariaRoledescription}"
19638
+ ${ref('control')}
19639
+ >
19640
+ ${startSlotTemplate(context, definition)}
19641
+ <span class="content" part="content">
19642
+ <slot ${slotted('defaultSlottedContent')}></slot>
19643
+ </span>
19644
+ ${endSlotTemplate(context, definition)}
19645
+ </button>
19646
+ `;
19647
+
19648
+ /**
19649
+ * A nimble-styled HTML button
19650
+ */
19651
+ let Button$1 = class Button extends Button$2 {
19652
+ constructor() {
19653
+ super(...arguments);
19654
+ /**
19655
+ * @public
19656
+ * @remarks
19657
+ * HTML Attribute: appearance
19658
+ */
19659
+ this.appearance = ButtonAppearance.outline;
19660
+ /**
19661
+ * @public
19662
+ * @remarks
19663
+ * HTML Attribute: content-hidden
19664
+ */
19665
+ this.contentHidden = false;
19666
+ }
19667
+ };
19668
+ __decorate([
19669
+ attr
19670
+ ], Button$1.prototype, "appearance", void 0);
19671
+ __decorate([
19672
+ attr({ attribute: 'appearance-variant' })
19673
+ ], Button$1.prototype, "appearanceVariant", void 0);
19674
+ __decorate([
19675
+ attr({ attribute: 'content-hidden', mode: 'boolean' })
19676
+ ], Button$1.prototype, "contentHidden", void 0);
19677
+ __decorate([
19678
+ attr({ attribute: 'tabindex', converter: nullableNumberConverter })
19679
+ ], Button$1.prototype, "tabIndex", void 0);
19680
+ /**
19681
+ * A function that returns a nimble-button registration for configuring the component with a DesignSystem.
19682
+ * Implements {@link @ni/fast-foundation#buttonTemplate}
19683
+ *
19684
+ * @public
19685
+ * @remarks
19686
+ * Generates HTML Element: \<nimble-button\>
19687
+ *
19688
+ */
19689
+ const nimbleButton = Button$1.compose({
19690
+ baseName: 'button',
19691
+ baseClass: Button$2,
19692
+ template: template$T,
19693
+ styles: styles$14,
19694
+ shadowOptions: {
19695
+ delegatesFocus: true
19696
+ }
19697
+ });
19698
+ DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleButton());
19699
+ const buttonTag = 'nimble-button';
19700
+
18902
19701
  // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
18903
19702
  // See generation source in nimble-components/build/generate-icons
18904
19703
  /**
@@ -19291,7 +20090,7 @@
19291
20090
  const nimbleAnchorTabs = AnchorTabs.compose({
19292
20091
  baseName: 'anchor-tabs',
19293
20092
  template: template$S,
19294
- styles: styles$16,
20093
+ styles: styles$15,
19295
20094
  shadowOptions: {
19296
20095
  delegatesFocus: false
19297
20096
  }
@@ -19595,80 +20394,6 @@
19595
20394
  .register(nimbleAnchoredRegion());
19596
20395
  const anchoredRegionTag = 'nimble-anchored-region';
19597
20396
 
19598
- /**
19599
- * Subscription for {@link ThemeStyleSheetBehavior}
19600
- */
19601
- class ThemeStyleSheetBehaviorSubscription {
19602
- constructor(value, styles, source) {
19603
- this.value = value;
19604
- this.styles = styles;
19605
- this.source = source;
19606
- }
19607
- handleChange() {
19608
- const theme$1 = theme.getValueFor(this.source);
19609
- if (Array.isArray(this.value)
19610
- ? this.value.includes(theme$1)
19611
- : this.value === theme$1) {
19612
- this.source.$fastController.addStyles(this.styles);
19613
- }
19614
- else {
19615
- this.source.$fastController.removeStyles(this.styles);
19616
- }
19617
- }
19618
- }
19619
- /**
19620
- * Behavior to conditionally apply theme-based stylesheets.
19621
- */
19622
- class ThemeStyleSheetBehavior {
19623
- constructor(theme, styles) {
19624
- this.theme = theme;
19625
- this.styles = styles;
19626
- this.cache = new WeakMap();
19627
- }
19628
- /**
19629
- * @internal
19630
- */
19631
- bind(source) {
19632
- const subscriber = this.cache.get(source)
19633
- || new ThemeStyleSheetBehaviorSubscription(this.theme, this.styles, source);
19634
- // Currently subscriber from cache may have gone through unbind
19635
- // but still be in cache so always resubscribe
19636
- // See: https://github.com/microsoft/fast/issues/3246#issuecomment-1030424876
19637
- theme.subscribe(subscriber, source);
19638
- subscriber.handleChange();
19639
- this.cache.set(source, subscriber);
19640
- }
19641
- /**
19642
- * @internal
19643
- */
19644
- unbind(source) {
19645
- const subscriber = this.cache.get(source);
19646
- if (subscriber) {
19647
- theme.unsubscribe(subscriber);
19648
- }
19649
- // Currently does not evict subscriber from cache
19650
- // See: https://github.com/microsoft/fast/issues/3246#issuecomment-1030424876
19651
- }
19652
- }
19653
- /**
19654
- * Behavior to conditionally apply theme-based stylesheets. To determine which to apply,
19655
- * the behavior will use the nearest ThemeProvider's 'theme' design system value.
19656
- *
19657
- * @public
19658
- * @example
19659
- * ```ts
19660
- * css`
19661
- * // ...
19662
- * `.withBehaviors(
19663
- * themeBehavior(Theme.light, css` ... `),
19664
- * // Apply style for both dark and color theme
19665
- * themeBehavior([Theme.dark, Theme.color], css` ... `)
19666
- * )
19667
- * ```
19668
- */
19669
- const themeBehavior = (theme, styles) => new ThemeStyleSheetBehavior(theme, styles);
19670
- /* eslint-enable max-classes-per-file */
19671
-
19672
20397
  const styles$11 = css `
19673
20398
  ${display$2('flex')}
19674
20399
 
@@ -19784,19 +20509,6 @@
19784
20509
  }
19785
20510
  `));
19786
20511
 
19787
- // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
19788
- // See generation source in nimble-components/build/generate-icons
19789
- /**
19790
- * The icon component for the 'exclamationMark' icon
19791
- */
19792
- class IconExclamationMark extends IconSvg {
19793
- constructor() {
19794
- super(exclamationMark16X16);
19795
- }
19796
- }
19797
- registerIconSvg('icon-exclamation-mark', IconExclamationMark);
19798
- const iconExclamationMarkTag = 'nimble-icon-exclamation-mark';
19799
-
19800
20512
  // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
19801
20513
  // See generation source in nimble-components/build/generate-icons
19802
20514
  /**
@@ -19810,19 +20522,6 @@
19810
20522
  registerIconSvg('icon-info', IconInfo);
19811
20523
  const iconInfoTag = 'nimble-icon-info';
19812
20524
 
19813
- // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
19814
- // See generation source in nimble-components/build/generate-icons
19815
- /**
19816
- * The icon component for the 'triangleFilled' icon
19817
- */
19818
- class IconTriangleFilled extends IconSvg {
19819
- constructor() {
19820
- super(triangleFilled16X16);
19821
- }
19822
- }
19823
- registerIconSvg('icon-triangle-filled', IconTriangleFilled);
19824
- const iconTriangleFilledTag = 'nimble-icon-triangle-filled';
19825
-
19826
20525
  // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
19827
20526
  // See generation source in nimble-components/build/generate-icons
19828
20527
  /**
@@ -20116,7 +20815,7 @@
20116
20815
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBreadcrumb());
20117
20816
 
20118
20817
  const styles$$ = css `
20119
- @layer base, hover, focusVisible, active, disabled;
20818
+ @layer base, hover, focusVisible, active, disabled, top;
20120
20819
 
20121
20820
  @layer base {
20122
20821
  ${display$2('inline-flex')}
@@ -20592,61 +21291,6 @@ so this becomes the fallback color for the slot */ ''}
20592
21291
  }
20593
21292
  `;
20594
21293
 
20595
- /**
20596
- * The runtime behavior for template overflow detection.
20597
- * @public
20598
- */
20599
- class OverflowBehavior {
20600
- /**
20601
- * Creates an instance of OverflowBehavior.
20602
- * @param target - The element to check for overflow.
20603
- * @param propertyName - The name of the property to assign the overflow state to.
20604
- */
20605
- constructor(target, propertyName) {
20606
- this.target = target;
20607
- this.propertyName = propertyName;
20608
- }
20609
- /**
20610
- * Bind this behavior to the source.
20611
- * @param source - The source to bind to.
20612
- * @param context - The execution context that the binding is operating within.
20613
- */
20614
- bind(source) {
20615
- this.source = source;
20616
- this.setSourceValue(false);
20617
- this.mouseOverHandler = () => {
20618
- const hasOverflow = this.target.offsetWidth < this.target.scrollWidth;
20619
- this.setSourceValue(hasOverflow);
20620
- };
20621
- this.mouseOutHandler = () => {
20622
- this.setSourceValue(false);
20623
- };
20624
- this.target.addEventListener('mouseover', this.mouseOverHandler);
20625
- this.target.addEventListener('mouseout', this.mouseOutHandler);
20626
- }
20627
- /**
20628
- * Unbinds this behavior from the source.
20629
- * @param source - The source to unbind from.
20630
- */
20631
- unbind() {
20632
- this.source = undefined;
20633
- this.target.removeEventListener('mouseover', this.mouseOverHandler);
20634
- this.target.removeEventListener('mouseout', this.mouseOutHandler);
20635
- }
20636
- setSourceValue(value) {
20637
- // @ts-expect-error set property on source
20638
- this.source[this.propertyName] = value;
20639
- }
20640
- }
20641
- /**
20642
- * A directive that observes if an element has overflow and sets a flag.
20643
- * @param propertyName - The name of the property to assign the overflow flag.
20644
- * @public
20645
- */
20646
- function overflow(propertyName) {
20647
- return new AttachedBehaviorHTMLDirective('nimble-overflow', OverflowBehavior, propertyName);
20648
- }
20649
-
20650
21294
  const errorTextTemplate = html `
20651
21295
  <div
20652
21296
  class="error-text"
@@ -20752,7 +21396,7 @@ so this becomes the fallback color for the slot */ ''}
20752
21396
  const checkboxTag = 'nimble-checkbox';
20753
21397
 
20754
21398
  const styles$W = css `
20755
- ${styles$1b}
21399
+ ${styles$1d}
20756
21400
  ${buttonAppearanceVariantStyles}
20757
21401
 
20758
21402
  @layer checked {
@@ -23399,18 +24043,6 @@ so this becomes the fallback color for the slot */ ''}
23399
24043
  }
23400
24044
  registerIconSvg('icon-chart-diagram-parent-focus-two-child', IconChartDiagramParentFocusTwoChild);
23401
24045
 
23402
- // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
23403
- // See generation source in nimble-components/build/generate-icons
23404
- /**
23405
- * The icon component for the 'check' icon
23406
- */
23407
- class IconCheck extends IconSvg {
23408
- constructor() {
23409
- super(check16X16);
23410
- }
23411
- }
23412
- registerIconSvg('icon-check', IconCheck);
23413
-
23414
24046
  // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
23415
24047
  // See generation source in nimble-components/build/generate-icons
23416
24048
  /**
@@ -65535,31 +66167,173 @@ ${nextLine.slice(indentLevel + 2)}`;
65535
66167
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSelect());
65536
66168
 
65537
66169
  const styles$A = css `
65538
- ${display$2('flex')}
66170
+ ${styles$19}
66171
+ ${'' /* Button specific styles */}
66172
+ @layer base {
66173
+ .control {
66174
+ font: inherit;
66175
+ border: none;
66176
+ text-align: start;
66177
+ }
66178
+ }
65539
66179
  `;
65540
66180
 
65541
- const template$x = html `
65542
- <template>step</template>
66181
+ const template$x = (context, definition) => html `
66182
+ <template slot="step">
66183
+ <div class="
66184
+ container
66185
+ ${x => (x.stepInternals.orientation === 'vertical' ? 'vertical' : '')}
66186
+ ${x => (x.stepInternals.last ? 'last' : '')}
66187
+ ">
66188
+ <button
66189
+ class="control"
66190
+ part="control"
66191
+ ?autofocus="${x => x.autofocus}"
66192
+ ?disabled="${x => x.disabled}"
66193
+ form="${x => x.formId}"
66194
+ formaction="${x => x.formaction}"
66195
+ formenctype="${x => x.formenctype}"
66196
+ formmethod="${x => x.formmethod}"
66197
+ formnovalidate="${x => x.formnovalidate}"
66198
+ formtarget="${x => x.formtarget}"
66199
+ name="${x => x.name}"
66200
+ type="${x => x.type}"
66201
+ value="${x => x.value}"
66202
+ tabindex="${x => x.tabIndex}"
66203
+ aria-atomic="${x => x.ariaAtomic}"
66204
+ aria-busy="${x => x.ariaBusy}"
66205
+ aria-controls="${x => x.ariaControls}"
66206
+ aria-current="${x => x.ariaCurrent}"
66207
+ aria-describedby="${x => x.ariaDescribedby}"
66208
+ aria-details="${x => x.ariaDetails}"
66209
+ aria-disabled="${x => x.ariaDisabled}"
66210
+ aria-errormessage="${x => x.ariaErrormessage}"
66211
+ aria-expanded="${x => x.ariaExpanded}"
66212
+ aria-flowto="${x => x.ariaFlowto}"
66213
+ aria-haspopup="${x => x.ariaHaspopup}"
66214
+ aria-hidden="${x => x.ariaHidden}"
66215
+ aria-invalid="${x => x.ariaInvalid}"
66216
+ aria-keyshortcuts="${x => x.ariaKeyshortcuts}"
66217
+ aria-label="${x => x.ariaLabel}"
66218
+ aria-labelledby="${x => x.ariaLabelledby}"
66219
+ aria-live="${x => x.ariaLive}"
66220
+ aria-owns="${x => x.ariaOwns}"
66221
+ aria-pressed="${x => x.ariaPressed}"
66222
+ aria-relevant="${x => x.ariaRelevant}"
66223
+ aria-roledescription="${x => x.ariaRoledescription}"
66224
+ ${ref('control')}
66225
+ >
66226
+ <div class="icon">
66227
+ <div class="icon-slot"><slot ${slotted('defaultSlottedContent')}></slot></div>
66228
+ <div class="icon-severity">
66229
+ ${when(x => x.severity === Severity.error, html `<${iconExclamationMarkTag}></${iconExclamationMarkTag}>`)}
66230
+ ${when(x => x.severity === Severity.warning, html `<${iconTriangleFilledTag}></${iconTriangleFilledTag}>`)}
66231
+ ${when(x => x.severity === Severity.success, html `<${iconCheckTag}></${iconCheckTag}>`)}
66232
+ </div>
66233
+ </div>
66234
+ <div class="content">
66235
+ <div class="title-wrapper">
66236
+ ${startSlotTemplate(context, definition)}
66237
+ <div class="title"><slot name="title"></slot></div>
66238
+ ${endSlotTemplate(context, definition)}
66239
+ <div class="line"></div>
66240
+ </div>
66241
+ <div class="subtitle">
66242
+ <slot name="subtitle"></slot>
66243
+ </div>
66244
+ </div>
66245
+ </button>
66246
+ ${severityTextTemplate}
66247
+ </div>
66248
+ </template>
65543
66249
  `;
65544
66250
 
66251
+ const StepSeverity = Severity;
66252
+
65545
66253
  /**
65546
66254
  * A nimble-styled step for a stepper
65547
66255
  */
65548
- class Step extends FoundationElement {
66256
+ class Step extends mixinSeverityPattern(Button$2) {
66257
+ constructor() {
66258
+ super(...arguments);
66259
+ /**
66260
+ * @public
66261
+ * @remarks
66262
+ * HTML Attribute: disabled
66263
+ */
66264
+ this.severity = StepSeverity.default;
66265
+ /**
66266
+ * @public
66267
+ * @remarks
66268
+ * HTML Attribute: readonly
66269
+ */
66270
+ this.readOnly = false;
66271
+ /**
66272
+ * @public
66273
+ * @remarks
66274
+ * HTML Attribute: selected
66275
+ */
66276
+ this.selected = false;
66277
+ /**
66278
+ * @internal
66279
+ */
66280
+ this.stepInternals = new StepInternals();
66281
+ }
65549
66282
  }
66283
+ __decorate([
66284
+ attr()
66285
+ ], Step.prototype, "severity", void 0);
66286
+ __decorate([
66287
+ attr({ attribute: 'readonly', mode: 'boolean' })
66288
+ ], Step.prototype, "readOnly", void 0);
66289
+ __decorate([
66290
+ attr({ mode: 'boolean' })
66291
+ ], Step.prototype, "selected", void 0);
66292
+ __decorate([
66293
+ attr({ attribute: 'tabindex', converter: nullableNumberConverter })
66294
+ ], Step.prototype, "tabIndex", void 0);
65550
66295
  const nimbleStep = Step.compose({
65551
66296
  baseName: 'step',
65552
66297
  template: template$x,
65553
- styles: styles$A
66298
+ styles: styles$A,
66299
+ shadowOptions: {
66300
+ delegatesFocus: true
66301
+ }
65554
66302
  });
65555
66303
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleStep());
65556
66304
 
65557
66305
  const styles$z = css `
65558
- ${display$2('flex')}
66306
+ ${display$2('inline-flex')}
66307
+
66308
+ :host {
66309
+ border: none;
66310
+ gap: 0px;
66311
+ }
65559
66312
  `;
65560
66313
 
66314
+ /**
66315
+ * Observable class to subscribe to changes in the page's device pixel ratio
66316
+ * Based on: https://frontendmasters.com/blog/obsessing-over-smooth-radial-gradient-disc-edges/#the-less-code-and-more-flexible-js-solution
66317
+ */
66318
+ class DevicePixelRatio {
66319
+ constructor() {
66320
+ const update = () => {
66321
+ this.current = window.devicePixelRatio;
66322
+ window
66323
+ .matchMedia(`(resolution: ${this.current}x)`)
66324
+ .addEventListener('change', update, { once: true });
66325
+ };
66326
+ update();
66327
+ }
66328
+ }
66329
+ __decorate([
66330
+ observable
66331
+ ], DevicePixelRatio.prototype, "current", void 0);
66332
+ const devicePixelRatio = new DevicePixelRatio();
66333
+
65561
66334
  const template$w = html `
65562
- <template>stepper: <slot></slot></template>
66335
+ <style>:host{--ni-private-device-resolution: ${() => devicePixelRatio.current};}</style>
66336
+ <slot name="step"></slot>
65563
66337
  `;
65564
66338
 
65565
66339
  /**
@@ -77907,7 +78681,7 @@ focus outline in that case.
77907
78681
  .register(nimbleTableColumnText());
77908
78682
 
77909
78683
  const styles$h = css `
77910
- ${styles$16}
78684
+ ${styles$15}
77911
78685
 
77912
78686
  .tabpanel {
77913
78687
  overflow: auto;