@ni/nimble-components 11.7.2 → 11.8.2

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.
Files changed (33) hide show
  1. package/dist/all-components-bundle.js +279 -152
  2. package/dist/all-components-bundle.js.map +1 -1
  3. package/dist/all-components-bundle.min.js +1195 -1072
  4. package/dist/all-components-bundle.min.js.map +1 -1
  5. package/dist/esm/all-components.d.ts +1 -0
  6. package/dist/esm/all-components.js +1 -0
  7. package/dist/esm/all-components.js.map +1 -1
  8. package/dist/esm/breadcrumb/styles.js +4 -6
  9. package/dist/esm/breadcrumb/styles.js.map +1 -1
  10. package/dist/esm/breadcrumb-item/styles.js +2 -2
  11. package/dist/esm/breadcrumb-item/styles.js.map +1 -1
  12. package/dist/esm/card-button/index.d.ts +17 -0
  13. package/dist/esm/card-button/index.js +40 -0
  14. package/dist/esm/card-button/index.js.map +1 -0
  15. package/dist/esm/card-button/styles.d.ts +1 -0
  16. package/dist/esm/card-button/styles.js +143 -0
  17. package/dist/esm/card-button/styles.js.map +1 -0
  18. package/dist/esm/switch/styles.js +4 -6
  19. package/dist/esm/switch/styles.js.map +1 -1
  20. package/dist/esm/text-field/styles.js +4 -7
  21. package/dist/esm/text-field/styles.js.map +1 -1
  22. package/dist/esm/tooltip/styles.js +4 -11
  23. package/dist/esm/tooltip/styles.js.map +1 -1
  24. package/dist/esm/utilities/style/appearance.d.ts +2 -2
  25. package/dist/esm/utilities/style/appearance.js +3 -3
  26. package/dist/esm/utilities/style/appearance.js.map +1 -1
  27. package/dist/esm/utilities/style/multivalue-property-stylesheet-behavior.d.ts +37 -0
  28. package/dist/esm/utilities/style/multivalue-property-stylesheet-behavior.js +56 -0
  29. package/dist/esm/utilities/style/multivalue-property-stylesheet-behavior.js.map +1 -0
  30. package/dist/esm/utilities/style/theme.d.ts +10 -15
  31. package/dist/esm/utilities/style/theme.js +23 -55
  32. package/dist/esm/utilities/style/theme.js.map +1 -1
  33. package/package.json +1 -1
@@ -14226,58 +14226,6 @@
14226
14226
  observable
14227
14227
  ], TreeView$1.prototype, "slottedTreeItems", void 0);
14228
14228
 
14229
- /**
14230
- * A behavior to add or remove a stylesheet from an element based on a property. The behavior ensures that
14231
- * styles are applied while the property matches and that styles are not applied if the property does
14232
- * not match.
14233
- *
14234
- * @public
14235
- */
14236
- class PropertyStyleSheetBehavior {
14237
- /**
14238
- * Constructs a {@link PropertyStyleSheetBehavior} instance.
14239
- * @param propertyName - The property name to operate from.
14240
- * @param value - The property value to operate from.
14241
- * @param styles - The styles to coordinate with the property.
14242
- */
14243
- constructor(propertyName, value, styles) {
14244
- this.propertyName = propertyName;
14245
- this.value = value;
14246
- this.styles = styles;
14247
- }
14248
- /**
14249
- * Binds the behavior to the element.
14250
- * @param elementInstance - The element for which the property is applied.
14251
- */
14252
- bind(elementInstance) {
14253
- Observable.getNotifier(elementInstance).subscribe(this, this.propertyName);
14254
- this.handleChange(elementInstance, this.propertyName);
14255
- }
14256
- /**
14257
- * Unbinds the behavior from the element.
14258
- * @param source - The element for which the behavior is unbinding.
14259
- * @internal
14260
- */
14261
- unbind(source) {
14262
- Observable.getNotifier(source).unsubscribe(this, this.propertyName);
14263
- source.$fastController.removeStyles(this.styles);
14264
- }
14265
- /**
14266
- * Change event for the provided element.
14267
- * @param source - the element for which to attach or detach styles.
14268
- * @param key - the key to lookup to know if the element already has the styles
14269
- * @internal
14270
- */
14271
- handleChange(source, key) {
14272
- if (source[key] === this.value) {
14273
- source.$fastController.addStyles(this.styles);
14274
- }
14275
- else {
14276
- source.$fastController.removeStyles(this.styles);
14277
- }
14278
- }
14279
- }
14280
-
14281
14229
  /**
14282
14230
  * A CSS fragment to set `display: none;` when the host is hidden using the [hidden] attribute.
14283
14231
  * @public
@@ -14302,7 +14250,7 @@
14302
14250
  */
14303
14251
  const focusVisible$1 = canUseFocusVisible() ? "focus-visible" : "focus";
14304
14252
 
14305
- const styles$t = css `
14253
+ const styles$u = css `
14306
14254
  :host {
14307
14255
  contain: layout;
14308
14256
  display: block;
@@ -14326,7 +14274,7 @@
14326
14274
  baseName: 'anchored-region',
14327
14275
  baseClass: AnchoredRegion$1,
14328
14276
  template: anchoredRegionTemplate,
14329
- styles: styles$t
14277
+ styles: styles$u
14330
14278
  });
14331
14279
  DesignSystem.getOrCreate()
14332
14280
  .withPrefix('nimble')
@@ -14350,6 +14298,7 @@
14350
14298
  const Black88 = "#252526";
14351
14299
  const Black85 = "#363738";
14352
14300
  const Black80 = "#505153";
14301
+ const Black = "#000000";
14353
14302
  const Black91 = "#161617";
14354
14303
  const ForestGreen = "#074023";
14355
14304
  const DigitalGreenLight = "#009b65";
@@ -14669,7 +14618,7 @@
14669
14618
 
14670
14619
  const template$6 = html `<slot></slot>`;
14671
14620
 
14672
- const styles$s = css `
14621
+ const styles$t = css `
14673
14622
  :host {
14674
14623
  display: contents;
14675
14624
  }
@@ -14725,7 +14674,7 @@
14725
14674
  ], ThemeProvider.prototype, "theme", void 0);
14726
14675
  const nimbleDesignSystemProvider = ThemeProvider.compose({
14727
14676
  baseName: 'theme-provider',
14728
- styles: styles$s,
14677
+ styles: styles$t,
14729
14678
  template: template$6
14730
14679
  });
14731
14680
  DesignSystem.getOrCreate()
@@ -14876,28 +14825,24 @@
14876
14825
  return getColorForTheme(element, Black91, Black15, White);
14877
14826
  }
14878
14827
 
14879
- /* eslint-disable max-classes-per-file */
14880
14828
  /**
14881
14829
  * Subscription for {@link ThemeStyleSheetBehavior}
14882
14830
  */
14883
14831
  class ThemeStyleSheetBehaviorSubscription {
14884
- constructor(themeStyles, source) {
14885
- this.themeStyles = themeStyles;
14832
+ constructor(value, styles, source) {
14833
+ this.value = value;
14834
+ this.styles = styles;
14886
14835
  this.source = source;
14887
- this.attached = null;
14888
14836
  }
14889
- handleChange({ target, token }) {
14890
- this.attach(token.getValueFor(target));
14891
- }
14892
- attach(theme) {
14893
- if (this.attached !== this.themeStyles[theme]) {
14894
- if (this.attached !== null) {
14895
- this.source.$fastController.removeStyles(this.attached);
14896
- }
14897
- this.attached = this.themeStyles[theme];
14898
- if (this.attached !== null) {
14899
- this.source.$fastController.addStyles(this.attached);
14900
- }
14837
+ handleChange() {
14838
+ const theme$1 = theme.getValueFor(this.source);
14839
+ if (Array.isArray(this.value)
14840
+ ? this.value.includes(theme$1)
14841
+ : this.value === theme$1) {
14842
+ this.source.$fastController.addStyles(this.styles);
14843
+ }
14844
+ else {
14845
+ this.source.$fastController.removeStyles(this.styles);
14901
14846
  }
14902
14847
  }
14903
14848
  }
@@ -14905,47 +14850,22 @@
14905
14850
  * Behavior to conditionally apply theme-based stylesheets.
14906
14851
  */
14907
14852
  class ThemeStyleSheetBehavior {
14908
- constructor(lightStyle, darkStyleOrAlias, colorStyleOrAlias) {
14853
+ constructor(theme, styles) {
14854
+ this.theme = theme;
14855
+ this.styles = styles;
14909
14856
  this.cache = new WeakMap();
14910
- const light = lightStyle;
14911
- const dark = ThemeStyleSheetBehavior.resolveTheme(darkStyleOrAlias, {
14912
- light,
14913
- dark: null,
14914
- color: null
14915
- });
14916
- const color = ThemeStyleSheetBehavior.resolveTheme(colorStyleOrAlias, {
14917
- light,
14918
- dark,
14919
- color: null
14920
- });
14921
- this.themeStyles = {
14922
- light,
14923
- dark,
14924
- color
14925
- };
14926
- }
14927
- static resolveTheme(value, currentThemeStyles) {
14928
- if (value instanceof ElementStyles || value === null) {
14929
- return value;
14930
- }
14931
- const currentStyle = currentThemeStyles[value];
14932
- if (currentStyle === null) {
14933
- throw new Error(`Tried to alias to theme '${value}' but the theme value is not set to a style.`);
14934
- }
14935
- return currentStyle;
14936
14857
  }
14937
14858
  /**
14938
14859
  * @internal
14939
14860
  */
14940
14861
  bind(source) {
14941
14862
  const subscriber = this.cache.get(source)
14942
- || new ThemeStyleSheetBehaviorSubscription(this.themeStyles, source);
14943
- const value = theme.getValueFor(source);
14863
+ || new ThemeStyleSheetBehaviorSubscription(this.theme, this.styles, source);
14944
14864
  // Currently subscriber from cache may have gone through unbind
14945
14865
  // but still be in cache so always resubscribe
14946
14866
  // See: https://github.com/microsoft/fast/issues/3246#issuecomment-1030424876
14947
14867
  theme.subscribe(subscriber, source);
14948
- subscriber.attach(value);
14868
+ subscriber.handleChange();
14949
14869
  this.cache.set(source, subscriber);
14950
14870
  }
14951
14871
  /**
@@ -14963,24 +14883,22 @@
14963
14883
  /**
14964
14884
  * Behavior to conditionally apply theme-based stylesheets. To determine which to apply,
14965
14885
  * the behavior will use the nearest ThemeProvider's 'theme' design system value.
14966
- * To re-use the same style for multiple themes you can specify the name of an already
14967
- * defined theme to alias them together.
14968
14886
  *
14969
14887
  * @public
14970
14888
  * @example
14971
14889
  * ```ts
14972
14890
  * css`
14973
- * // ...
14974
- * `.withBehaviors(new ThemeStyleSheetBehavior(
14975
- * css`:host { ... Theme.light style... }`),
14976
- * null, // No style needed for Theme.dark style
14977
- * Theme.light // For the Theme.color style, re-use the previously set Theme.light style
14891
+ * // ...
14892
+ * `.withBehaviors(
14893
+ * themeBehavior(Theme.light, css` ... `),
14894
+ * // Apply style for both dark and color theme
14895
+ * themeBehavior([Theme.dark, Theme.color], css` ... `)
14978
14896
  * )
14979
14897
  * ```
14980
14898
  */
14981
- const themeBehavior = (lightStyle, darkStyleOrAlias, colorStyleOrAlias) => new ThemeStyleSheetBehavior(lightStyle, darkStyleOrAlias, colorStyleOrAlias);
14899
+ const themeBehavior = (theme, styles) => new ThemeStyleSheetBehavior(theme, styles);
14982
14900
 
14983
- const styles$r = css `
14901
+ const styles$s = css `
14984
14902
  ${display('inline-block')}
14985
14903
 
14986
14904
  :host {
@@ -15005,8 +14923,7 @@
15005
14923
  ::slotted(*:not([href]):last-child) {
15006
14924
  font: ${bodyEmphasizedFont};
15007
14925
  }
15008
- `.withBehaviors(themeBehavior(css `
15009
- ${'' /* Light theme */}
14926
+ `.withBehaviors(themeBehavior(Theme.light, css `
15010
14927
  :host {
15011
14928
  --ni-private-breadcrumb-link-active-font-color: ${DigitalGreenDark};
15012
14929
  }
@@ -15014,8 +14931,7 @@
15014
14931
  :host(.prominent-links) {
15015
14932
  --ni-private-breadcrumb-link-font-color: ${DigitalGreenDark};
15016
14933
  }
15017
- `, css `
15018
- ${'' /* Dark theme */}
14934
+ `), themeBehavior(Theme.dark, css `
15019
14935
  :host {
15020
14936
  --ni-private-breadcrumb-link-active-font-color: ${PowerGreen};
15021
14937
  }
@@ -15023,8 +14939,7 @@
15023
14939
  :host(.prominent-links) {
15024
14940
  --ni-private-breadcrumb-link-font-color: ${PowerGreen};
15025
14941
  }
15026
- `, css `
15027
- ${'' /* Color theme */}
14942
+ `), themeBehavior(Theme.color, css `
15028
14943
  :host {
15029
14944
  --ni-private-breadcrumb-link-active-font-color: ${hexToRgbaCssColor(White, 0.6)};
15030
14945
  }
@@ -15043,7 +14958,7 @@
15043
14958
  baseName: 'breadcrumb',
15044
14959
  baseClass: Breadcrumb$1,
15045
14960
  template: breadcrumbTemplate,
15046
- styles: styles$r
14961
+ styles: styles$s
15047
14962
  });
15048
14963
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBreadcrumb());
15049
14964
 
@@ -15629,7 +15544,7 @@
15629
15544
  */
15630
15545
  const focusVisible = `:${focusVisible$1}`;
15631
15546
 
15632
- const styles$q = css `
15547
+ const styles$r = css `
15633
15548
  ${display('inline-flex')}
15634
15549
 
15635
15550
  :host {
@@ -15655,7 +15570,7 @@
15655
15570
  padding-right: calc(4px - ${borderWidth});
15656
15571
  }
15657
15572
 
15658
- .control:link {
15573
+ .control:any-link {
15659
15574
  cursor: pointer;
15660
15575
  text-decoration: none;
15661
15576
  }
@@ -15669,7 +15584,7 @@
15669
15584
  text-decoration: underline;
15670
15585
  }
15671
15586
 
15672
- .control:link${focusVisible} {
15587
+ .control:any-link${focusVisible} {
15673
15588
  border: ${borderWidth} solid ${borderHoverColor};
15674
15589
  outline: 2px solid ${borderHoverColor};
15675
15590
  outline-offset: 1px;
@@ -15709,24 +15624,79 @@
15709
15624
  baseName: 'breadcrumb-item',
15710
15625
  baseClass: BreadcrumbItem$1,
15711
15626
  template: breadcrumbItemTemplate,
15712
- styles: styles$q,
15627
+ styles: styles$r,
15713
15628
  separator: forwardSlash16X16.data
15714
15629
  });
15715
15630
  DesignSystem.getOrCreate()
15716
15631
  .withPrefix('nimble')
15717
15632
  .register(nimbleBreadcrumbItem());
15718
15633
 
15634
+ /**
15635
+ * A behavior to add or remove a stylesheet from an element based on a property. The behavior ensures that
15636
+ * styles are applied while the property matches and that styles are not applied if the property does
15637
+ * not match.
15638
+ *
15639
+ * @public
15640
+ */
15641
+ class MultivaluePropertyStyleSheetBehavior {
15642
+ /**
15643
+ * Constructs a {@link MultivaluePropertyStyleSheetBehavior} instance.
15644
+ * @param propertyName - The property name to operate from.
15645
+ * @param value - The property value or values to operate from.
15646
+ * @param styles - The styles to coordinate with the property.
15647
+ */
15648
+ constructor(propertyName, value, styles) {
15649
+ this.propertyName = propertyName;
15650
+ this.value = value;
15651
+ this.styles = styles;
15652
+ }
15653
+ /**
15654
+ * Binds the behavior to the element.
15655
+ * @param elementInstance - The element for which the property is applied.
15656
+ */
15657
+ bind(elementInstance) {
15658
+ Observable.getNotifier(elementInstance).subscribe(this, this.propertyName);
15659
+ this.handleChange(elementInstance, this.propertyName);
15660
+ }
15661
+ /**
15662
+ * Unbinds the behavior from the element.
15663
+ * @param source - The element for which the behavior is unbinding.
15664
+ */
15665
+ unbind(source) {
15666
+ Observable.getNotifier(source).unsubscribe(this, this.propertyName);
15667
+ source.$fastController.removeStyles(this.styles);
15668
+ }
15669
+ /**
15670
+ * Change event for the provided element.
15671
+ * @param source - the element for which to attach or detach styles.
15672
+ * @param key - the key to lookup to know if the element already has the styles
15673
+ * @internal
15674
+ */
15675
+ handleChange(source, key) {
15676
+ // @ts-expect-error Accessing arbitrary property of an element
15677
+ const currentValue = source[key];
15678
+ if (Array.isArray(this.value)
15679
+ ? this.value.includes(currentValue)
15680
+ : this.value === currentValue) {
15681
+ source.$fastController.addStyles(this.styles);
15682
+ }
15683
+ else {
15684
+ source.$fastController.removeStyles(this.styles);
15685
+ }
15686
+ }
15687
+ }
15688
+
15719
15689
  /**
15720
15690
  * Behavior that will conditionally apply a stylesheet based on the element's
15721
15691
  * appearance property
15722
15692
  *
15723
- * @param value - The value of the appearance property
15693
+ * @param value - The value or values of the appearance property
15724
15694
  * @param styles - The styles to be applied when condition matches
15725
15695
  *
15726
15696
  * @public
15727
15697
  */
15728
15698
  function appearanceBehavior(value, styles) {
15729
- return new PropertyStyleSheetBehavior('appearance', value, styles);
15699
+ return new MultivaluePropertyStyleSheetBehavior('appearance', value, styles);
15730
15700
  }
15731
15701
 
15732
15702
  /**
@@ -15739,7 +15709,7 @@
15739
15709
  block: 'block'
15740
15710
  };
15741
15711
 
15742
- const styles$p = css `
15712
+ const styles$q = css `
15743
15713
  ${display('inline-flex')}
15744
15714
 
15745
15715
  :host {
@@ -15946,7 +15916,7 @@
15946
15916
  `));
15947
15917
 
15948
15918
  // prettier-ignore
15949
- const styles$o = styles$p
15919
+ const styles$p = styles$q
15950
15920
  .withBehaviors(appearanceBehavior(ButtonAppearance.outline, css `
15951
15921
  :host(.primary) .control {
15952
15922
  box-shadow: 0px 0px 0px ${borderWidth} rgba(${actionRgbPartialColor}, 0.3) inset;
@@ -16060,13 +16030,184 @@
16060
16030
  baseName: 'button',
16061
16031
  baseClass: Button$1,
16062
16032
  template: buttonTemplate,
16063
- styles: styles$o,
16033
+ styles: styles$p,
16064
16034
  shadowOptions: {
16065
16035
  delegatesFocus: true
16066
16036
  }
16067
16037
  });
16068
16038
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleButton());
16069
16039
 
16040
+ // prettier-ignore
16041
+ const styles$o = css `
16042
+ ${display('inline-flex')}
16043
+
16044
+ :host {
16045
+ background-color: transparent;
16046
+ color: ${buttonLabelFontColor};
16047
+ font: ${buttonLabelFont};
16048
+ cursor: pointer;
16049
+ outline: none;
16050
+ border: none;
16051
+ box-sizing: border-box;
16052
+ }
16053
+
16054
+ :host(:hover) {
16055
+ box-shadow: 0px 1px 4px
16056
+ var(--ni-private-card-button-box-shadow-hover-color);
16057
+ }
16058
+
16059
+ :host(:active) {
16060
+ box-shadow: none;
16061
+ }
16062
+
16063
+ :host([disabled]) {
16064
+ cursor: default;
16065
+ box-shadow: none;
16066
+ }
16067
+
16068
+ .control {
16069
+ background-color: transparent;
16070
+ height: 100%;
16071
+ width: 100%;
16072
+ border: ${borderWidth} solid transparent;
16073
+ color: inherit;
16074
+ border-radius: inherit;
16075
+ fill: inherit;
16076
+ cursor: inherit;
16077
+ font: inherit;
16078
+ outline: none;
16079
+ transition: box-shadow ${smallDelay};
16080
+ padding: 0px;
16081
+ }
16082
+
16083
+ .control:hover {
16084
+ background: var(--ni-private-card-button-background-hover-color);
16085
+ }
16086
+
16087
+ .control${focusVisible} {
16088
+ box-shadow: 0px 0px 0px ${borderWidth} ${borderHoverColor} inset;
16089
+ border-color: ${borderHoverColor};
16090
+ outline: ${borderWidth} solid ${borderHoverColor};
16091
+ outline-offset: -4px;
16092
+ }
16093
+
16094
+ .control:active {
16095
+ background: var(--ni-private-card-button-background-active-color);
16096
+ border-color: var(--ni-private-card-button-border-active-color);
16097
+ outline: none;
16098
+ box-shadow: none;
16099
+ }
16100
+
16101
+ :host([selected]) .control {
16102
+ background: var(--ni-private-card-button-background-active-color);
16103
+ border-color: var(--ni-private-card-button-border-selected-color);
16104
+ }
16105
+
16106
+ :host([selected]) .control${focusVisible} {
16107
+ border-color: ${borderHoverColor};
16108
+ }
16109
+
16110
+ :host([selected]) .control:active {
16111
+ border-color: var(--ni-private-card-button-border-active-color);
16112
+ }
16113
+
16114
+ :host([selected]) .control${focusVisible}:active {
16115
+ outline: none;
16116
+ box-shadow: none;
16117
+ }
16118
+
16119
+ .control[disabled] {
16120
+ background: transparent;
16121
+ opacity: 0.3;
16122
+ }
16123
+
16124
+ .control[disabled]:active {
16125
+ border-color: transparent;
16126
+ }
16127
+
16128
+ :host([selected]) .control[disabled]:active {
16129
+ border-color: var(--ni-private-card-button-border-selected-color);
16130
+ }
16131
+
16132
+ .content {
16133
+ display: contents;
16134
+ }
16135
+
16136
+ slot[name='start'] {
16137
+ display: none;
16138
+ }
16139
+
16140
+ slot[name='end'] {
16141
+ display: none;
16142
+ }
16143
+
16144
+ @media (prefers-reduced-motion) {
16145
+ .control {
16146
+ transition-duration: 0s;
16147
+ }
16148
+ }
16149
+ `.withBehaviors(themeBehavior(Theme.light, css `
16150
+ :host {
16151
+ --ni-private-card-button-box-shadow-hover-color: ${hexToRgbaCssColor(Black, 0.3)};
16152
+ --ni-private-card-button-background-hover-color: ${hexToRgbaCssColor(White, 0.3)};
16153
+ --ni-private-card-button-background-active-color: ${White};
16154
+ --ni-private-card-button-border-active-color: ${hexToRgbaCssColor(Black91, 0.2)};
16155
+ --ni-private-card-button-border-selected-color: ${hexToRgbaCssColor(Black91, 0.6)};
16156
+ }
16157
+ `), themeBehavior(Theme.dark, css `
16158
+ :host {
16159
+ --ni-private-card-button-box-shadow-hover-color: ${hexToRgbaCssColor(Black, 0.77)};
16160
+ --ni-private-card-button-background-hover-color: ${hexToRgbaCssColor(Black15, 0.07)};
16161
+ --ni-private-card-button-background-active-color: ${hexToRgbaCssColor(Black15, 0.15)};
16162
+ --ni-private-card-button-border-active-color: ${hexToRgbaCssColor(Black15, 0.2)};
16163
+ --ni-private-card-button-border-selected-color: ${Black15};
16164
+ }
16165
+ `), themeBehavior(Theme.color, css `
16166
+ :host {
16167
+ --ni-private-card-button-box-shadow-hover-color: ${hexToRgbaCssColor(White, 0.77)};
16168
+ --ni-private-card-button-background-hover-color: ${hexToRgbaCssColor(White, 0.2)};
16169
+ --ni-private-card-button-background-active-color: ${hexToRgbaCssColor(White, 0.4)};
16170
+ --ni-private-card-button-border-active-color: ${hexToRgbaCssColor(White, 0.2)};
16171
+ --ni-private-card-button-border-selected-color: ${hexToRgbaCssColor(White, 0.6)};
16172
+ }
16173
+ `));
16174
+
16175
+ /**
16176
+ * A nimble-styled card button
16177
+ */
16178
+ class CardButton extends Button$1 {
16179
+ constructor() {
16180
+ super(...arguments);
16181
+ /**
16182
+ * @public
16183
+ * @remarks
16184
+ * HTML Attribute: selected
16185
+ */
16186
+ this.selected = false;
16187
+ }
16188
+ }
16189
+ __decorate([
16190
+ attr({ mode: 'boolean' })
16191
+ ], CardButton.prototype, "selected", void 0);
16192
+ /**
16193
+ * A function that returns a nimble-card-button registration for configuring the component with a DesignSystem.
16194
+ * Implements {@link @microsoft/fast-foundation#buttonTemplate}
16195
+ *
16196
+ * @public
16197
+ * @remarks
16198
+ * Generates HTML Element: \<nimble-card-button\>
16199
+ *
16200
+ */
16201
+ const nimbleCardButton = CardButton.compose({
16202
+ baseName: 'card-button',
16203
+ template: buttonTemplate,
16204
+ styles: styles$o,
16205
+ shadowOptions: {
16206
+ delegatesFocus: true
16207
+ }
16208
+ });
16209
+ DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCardButton());
16210
+
16070
16211
  const styles$n = css `
16071
16212
  ${display('inline-flex')}
16072
16213
 
@@ -19827,7 +19968,7 @@
19827
19968
  `;
19828
19969
 
19829
19970
  const styles$e = css `
19830
- ${styles$p}
19971
+ ${styles$q}
19831
19972
 
19832
19973
  .control[aria-pressed='true'] {
19833
19974
  background-color: ${fillSelectedColor};
@@ -20747,8 +20888,7 @@
20747
20888
  transition-duration: 0s;
20748
20889
  }
20749
20890
  }
20750
- `.withBehaviors(themeBehavior(css `
20751
- ${'' /* Light theme */}
20891
+ `.withBehaviors(themeBehavior(Theme.light, css `
20752
20892
  :host {
20753
20893
  --ni-private-switch-background-disabled-color: ${hexToRgbaCssColor(Black91, 0.07)};
20754
20894
  --ni-private-switch-indicator-background-color: ${White};
@@ -20756,8 +20896,7 @@
20756
20896
  --ni-private-switch-indicator-border-color: ${Black91};
20757
20897
  --ni-private-switch-indicator-border-disabled-color: ${hexToRgbaCssColor(Black91, 0.3)};
20758
20898
  }
20759
- `, css `
20760
- ${'' /* Dark theme */}
20899
+ `), themeBehavior(Theme.dark, css `
20761
20900
  :host {
20762
20901
  --ni-private-switch-background-disabled-color: ${hexToRgbaCssColor(Black15, 0.07)};
20763
20902
  --ni-private-switch-indicator-background-color: ${hexToRgbaCssColor(Black91, 0.3)};
@@ -20765,8 +20904,7 @@
20765
20904
  --ni-private-switch-indicator-border-color: ${Black7};
20766
20905
  --ni-private-switch-indicator-border-disabled-color: ${hexToRgbaCssColor(Black7, 0.3)};
20767
20906
  }
20768
- `, css `
20769
- ${'' /* Color theme */}
20907
+ `), themeBehavior(Theme.color, css `
20770
20908
  :host {
20771
20909
  --ni-private-switch-background-disabled-color: ${hexToRgbaCssColor(White, 0.07)};
20772
20910
  --ni-private-switch-indicator-background-color: ${hexToRgbaCssColor(White, 0.1)};
@@ -21203,6 +21341,7 @@
21203
21341
  frameless: 'frameless'
21204
21342
  };
21205
21343
 
21344
+ /* eslint-disable @typescript-eslint/indent */
21206
21345
  const styles$4 = css `
21207
21346
  ${display('inline-block')}
21208
21347
  ${styles$k}
@@ -21431,19 +21570,15 @@
21431
21570
  :host([readonly]) .root {
21432
21571
  border-color: transparent;
21433
21572
  }
21434
- `), themeBehavior(css `
21435
- ${'' /* Light theme */}
21573
+ `), themeBehavior(Theme.light, css `
21436
21574
  .control::-ms-reveal {
21437
21575
  filter: invert(0%);
21438
21576
  }
21439
- `, css `
21440
- ${'' /* Dark theme */}
21577
+ `), themeBehavior([Theme.dark, Theme.color], css `
21441
21578
  .control::-ms-reveal {
21442
21579
  filter: invert(100%);
21443
21580
  }
21444
- `,
21445
- // Color theme
21446
- Theme.dark));
21581
+ `));
21447
21582
 
21448
21583
  /**
21449
21584
  * A nimble-styed HTML text input
@@ -21574,11 +21709,7 @@
21574
21709
  display: flex;
21575
21710
  flex: 0 0 auto;
21576
21711
  }
21577
- `.withBehaviors(
21578
- /* Local Theme Behaviors for tooltip borders and backgrounds */
21579
- themeBehavior(
21580
- // Light Theme
21581
- css `
21712
+ `.withBehaviors(themeBehavior(Theme.light, css `
21582
21713
  :host(.fail) {
21583
21714
  --ni-private-tooltip-border-color: ${BannerFail100DarkUi};
21584
21715
  --ni-private-tooltip-background-color: ${White};
@@ -21588,9 +21719,7 @@
21588
21719
  --ni-private-tooltip-border-color: ${Information100LightUi};
21589
21720
  --ni-private-tooltip-background-color: ${White};
21590
21721
  }
21591
- `,
21592
- // Dark Theme
21593
- css `
21722
+ `), themeBehavior(Theme.dark, css `
21594
21723
  :host {
21595
21724
  --ni-private-tooltip-border-color: ${hexToRgbaCssColor(Black15, 0.3)};
21596
21725
  --ni-private-tooltip-background-color: ${Black85};
@@ -21603,9 +21732,7 @@
21603
21732
  :host(.fail) {
21604
21733
  --ni-private-tooltip-border-color: ${BannerFail100DarkUi};
21605
21734
  }
21606
- `,
21607
- // Color Theme
21608
- css `
21735
+ `), themeBehavior(Theme.color, css `
21609
21736
  .anchored-region {
21610
21737
  background-color: ${ForestGreen};
21611
21738
  }