@ni/nimble-components 11.7.2 → 11.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14302,7 +14302,7 @@
14302
14302
  */
14303
14303
  const focusVisible$1 = canUseFocusVisible() ? "focus-visible" : "focus";
14304
14304
 
14305
- const styles$t = css `
14305
+ const styles$u = css `
14306
14306
  :host {
14307
14307
  contain: layout;
14308
14308
  display: block;
@@ -14326,7 +14326,7 @@
14326
14326
  baseName: 'anchored-region',
14327
14327
  baseClass: AnchoredRegion$1,
14328
14328
  template: anchoredRegionTemplate,
14329
- styles: styles$t
14329
+ styles: styles$u
14330
14330
  });
14331
14331
  DesignSystem.getOrCreate()
14332
14332
  .withPrefix('nimble')
@@ -14350,6 +14350,7 @@
14350
14350
  const Black88 = "#252526";
14351
14351
  const Black85 = "#363738";
14352
14352
  const Black80 = "#505153";
14353
+ const Black = "#000000";
14353
14354
  const Black91 = "#161617";
14354
14355
  const ForestGreen = "#074023";
14355
14356
  const DigitalGreenLight = "#009b65";
@@ -14669,7 +14670,7 @@
14669
14670
 
14670
14671
  const template$6 = html `<slot></slot>`;
14671
14672
 
14672
- const styles$s = css `
14673
+ const styles$t = css `
14673
14674
  :host {
14674
14675
  display: contents;
14675
14676
  }
@@ -14725,7 +14726,7 @@
14725
14726
  ], ThemeProvider.prototype, "theme", void 0);
14726
14727
  const nimbleDesignSystemProvider = ThemeProvider.compose({
14727
14728
  baseName: 'theme-provider',
14728
- styles: styles$s,
14729
+ styles: styles$t,
14729
14730
  template: template$6
14730
14731
  });
14731
14732
  DesignSystem.getOrCreate()
@@ -14980,7 +14981,7 @@
14980
14981
  */
14981
14982
  const themeBehavior = (lightStyle, darkStyleOrAlias, colorStyleOrAlias) => new ThemeStyleSheetBehavior(lightStyle, darkStyleOrAlias, colorStyleOrAlias);
14982
14983
 
14983
- const styles$r = css `
14984
+ const styles$s = css `
14984
14985
  ${display('inline-block')}
14985
14986
 
14986
14987
  :host {
@@ -15043,7 +15044,7 @@
15043
15044
  baseName: 'breadcrumb',
15044
15045
  baseClass: Breadcrumb$1,
15045
15046
  template: breadcrumbTemplate,
15046
- styles: styles$r
15047
+ styles: styles$s
15047
15048
  });
15048
15049
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBreadcrumb());
15049
15050
 
@@ -15629,7 +15630,7 @@
15629
15630
  */
15630
15631
  const focusVisible = `:${focusVisible$1}`;
15631
15632
 
15632
- const styles$q = css `
15633
+ const styles$r = css `
15633
15634
  ${display('inline-flex')}
15634
15635
 
15635
15636
  :host {
@@ -15709,7 +15710,7 @@
15709
15710
  baseName: 'breadcrumb-item',
15710
15711
  baseClass: BreadcrumbItem$1,
15711
15712
  template: breadcrumbItemTemplate,
15712
- styles: styles$q,
15713
+ styles: styles$r,
15713
15714
  separator: forwardSlash16X16.data
15714
15715
  });
15715
15716
  DesignSystem.getOrCreate()
@@ -15739,7 +15740,7 @@
15739
15740
  block: 'block'
15740
15741
  };
15741
15742
 
15742
- const styles$p = css `
15743
+ const styles$q = css `
15743
15744
  ${display('inline-flex')}
15744
15745
 
15745
15746
  :host {
@@ -15946,7 +15947,7 @@
15946
15947
  `));
15947
15948
 
15948
15949
  // prettier-ignore
15949
- const styles$o = styles$p
15950
+ const styles$p = styles$q
15950
15951
  .withBehaviors(appearanceBehavior(ButtonAppearance.outline, css `
15951
15952
  :host(.primary) .control {
15952
15953
  box-shadow: 0px 0px 0px ${borderWidth} rgba(${actionRgbPartialColor}, 0.3) inset;
@@ -16060,13 +16061,191 @@
16060
16061
  baseName: 'button',
16061
16062
  baseClass: Button$1,
16062
16063
  template: buttonTemplate,
16063
- styles: styles$o,
16064
+ styles: styles$p,
16064
16065
  shadowOptions: {
16065
16066
  delegatesFocus: true
16066
16067
  }
16067
16068
  });
16068
16069
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleButton());
16069
16070
 
16071
+ // prettier-ignore
16072
+ const styles$o = css `
16073
+ ${display('inline-flex')}
16074
+
16075
+ :host {
16076
+ background-color: transparent;
16077
+ color: ${buttonLabelFontColor};
16078
+ font: ${buttonLabelFont};
16079
+ cursor: pointer;
16080
+ outline: none;
16081
+ border: none;
16082
+ box-sizing: border-box;
16083
+ }
16084
+
16085
+ :host(:hover) {
16086
+ box-shadow: 0px 1px 4px
16087
+ var(--ni-private-card-button-box-shadow-hover-color);
16088
+ }
16089
+
16090
+ :host(:active) {
16091
+ box-shadow: none;
16092
+ }
16093
+
16094
+ :host([disabled]) {
16095
+ cursor: default;
16096
+ box-shadow: none;
16097
+ }
16098
+
16099
+ .control {
16100
+ background-color: transparent;
16101
+ height: 100%;
16102
+ width: 100%;
16103
+ border: ${borderWidth} solid transparent;
16104
+ color: inherit;
16105
+ border-radius: inherit;
16106
+ fill: inherit;
16107
+ cursor: inherit;
16108
+ font: inherit;
16109
+ outline: none;
16110
+ transition: box-shadow ${smallDelay};
16111
+ padding: 0px;
16112
+ }
16113
+
16114
+ .control:hover {
16115
+ background: var(--ni-private-card-button-background-hover-color);
16116
+ }
16117
+
16118
+ .control${focusVisible} {
16119
+ box-shadow: 0px 0px 0px ${borderWidth} ${borderHoverColor} inset;
16120
+ border-color: ${borderHoverColor};
16121
+ outline: ${borderWidth} solid ${borderHoverColor};
16122
+ outline-offset: -4px;
16123
+ }
16124
+
16125
+ .control:active {
16126
+ background: var(--ni-private-card-button-background-active-color);
16127
+ border-color: var(--ni-private-card-button-border-active-color);
16128
+ outline: none;
16129
+ box-shadow: none;
16130
+ }
16131
+
16132
+ :host([selected]) .control {
16133
+ background: var(--ni-private-card-button-background-active-color);
16134
+ border-color: var(--ni-private-card-button-border-selected-color);
16135
+ }
16136
+
16137
+ :host([selected]) .control${focusVisible} {
16138
+ border-color: ${borderHoverColor};
16139
+ }
16140
+
16141
+ :host([selected]) .control:active {
16142
+ border-color: var(--ni-private-card-button-border-active-color);
16143
+ }
16144
+
16145
+ :host([selected]) .control${focusVisible}:active {
16146
+ outline: none;
16147
+ box-shadow: none;
16148
+ }
16149
+
16150
+ .control[disabled] {
16151
+ background: transparent;
16152
+ opacity: 0.3;
16153
+ }
16154
+
16155
+ .control[disabled]:active {
16156
+ border-color: transparent;
16157
+ }
16158
+
16159
+ :host([selected]) .control[disabled]:active {
16160
+ border-color: var(--ni-private-card-button-border-selected-color);
16161
+ }
16162
+
16163
+ .content {
16164
+ display: contents;
16165
+ }
16166
+
16167
+ slot[name='start'] {
16168
+ display: none;
16169
+ }
16170
+
16171
+ slot[name='end'] {
16172
+ display: none;
16173
+ }
16174
+
16175
+ @media (prefers-reduced-motion) {
16176
+ .control {
16177
+ transition-duration: 0s;
16178
+ }
16179
+ }
16180
+ `
16181
+ .withBehaviors(themeBehavior(
16182
+ // Light theme
16183
+ css `
16184
+ :host {
16185
+ --ni-private-card-button-box-shadow-hover-color: ${hexToRgbaCssColor(Black, 0.3)};
16186
+ --ni-private-card-button-background-hover-color: ${hexToRgbaCssColor(White, 0.3)};
16187
+ --ni-private-card-button-background-active-color: ${White};
16188
+ --ni-private-card-button-border-active-color: ${hexToRgbaCssColor(Black91, 0.2)};
16189
+ --ni-private-card-button-border-selected-color: ${hexToRgbaCssColor(Black91, 0.6)};
16190
+ }
16191
+ `,
16192
+ // Dark theme
16193
+ css `
16194
+ :host {
16195
+ --ni-private-card-button-box-shadow-hover-color: ${hexToRgbaCssColor(Black, 0.77)};
16196
+ --ni-private-card-button-background-hover-color: ${hexToRgbaCssColor(Black15, 0.07)};
16197
+ --ni-private-card-button-background-active-color: ${hexToRgbaCssColor(Black15, 0.15)};
16198
+ --ni-private-card-button-border-active-color: ${hexToRgbaCssColor(Black15, 0.2)};
16199
+ --ni-private-card-button-border-selected-color: ${Black15};
16200
+ }
16201
+ `,
16202
+ // Color theme
16203
+ css `
16204
+ :host {
16205
+ --ni-private-card-button-box-shadow-hover-color: ${hexToRgbaCssColor(White, 0.77)};
16206
+ --ni-private-card-button-background-hover-color: ${hexToRgbaCssColor(White, 0.2)};
16207
+ --ni-private-card-button-background-active-color: ${hexToRgbaCssColor(White, 0.4)};
16208
+ --ni-private-card-button-border-active-color: ${hexToRgbaCssColor(White, 0.2)};
16209
+ --ni-private-card-button-border-selected-color: ${hexToRgbaCssColor(White, 0.6)};
16210
+ }
16211
+ `));
16212
+
16213
+ /**
16214
+ * A nimble-styled card button
16215
+ */
16216
+ class CardButton extends Button$1 {
16217
+ constructor() {
16218
+ super(...arguments);
16219
+ /**
16220
+ * @public
16221
+ * @remarks
16222
+ * HTML Attribute: selected
16223
+ */
16224
+ this.selected = false;
16225
+ }
16226
+ }
16227
+ __decorate([
16228
+ attr({ mode: 'boolean' })
16229
+ ], CardButton.prototype, "selected", void 0);
16230
+ /**
16231
+ * A function that returns a nimble-card-button registration for configuring the component with a DesignSystem.
16232
+ * Implements {@link @microsoft/fast-foundation#buttonTemplate}
16233
+ *
16234
+ * @public
16235
+ * @remarks
16236
+ * Generates HTML Element: \<nimble-card-button\>
16237
+ *
16238
+ */
16239
+ const nimbleCardButton = CardButton.compose({
16240
+ baseName: 'card-button',
16241
+ template: buttonTemplate,
16242
+ styles: styles$o,
16243
+ shadowOptions: {
16244
+ delegatesFocus: true
16245
+ }
16246
+ });
16247
+ DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCardButton());
16248
+
16070
16249
  const styles$n = css `
16071
16250
  ${display('inline-flex')}
16072
16251
 
@@ -19827,7 +20006,7 @@
19827
20006
  `;
19828
20007
 
19829
20008
  const styles$e = css `
19830
- ${styles$p}
20009
+ ${styles$q}
19831
20010
 
19832
20011
  .control[aria-pressed='true'] {
19833
20012
  background-color: ${fillSelectedColor};