@ni/nimble-components 11.7.0 → 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.
@@ -278,30 +278,6 @@
278
278
  },
279
279
  });
280
280
 
281
- function spilloverSubscribe(subscriber) {
282
- const spillover = this.spillover;
283
- const index = spillover.indexOf(subscriber);
284
- if (index === -1) {
285
- spillover.push(subscriber);
286
- }
287
- }
288
- function spilloverUnsubscribe(subscriber) {
289
- const spillover = this.spillover;
290
- const index = spillover.indexOf(subscriber);
291
- if (index !== -1) {
292
- spillover.splice(index, 1);
293
- }
294
- }
295
- function spilloverNotifySubscribers(args) {
296
- const spillover = this.spillover;
297
- const source = this.source;
298
- for (let i = 0, ii = spillover.length; i < ii; ++i) {
299
- spillover[i].handleChange(source, args);
300
- }
301
- }
302
- function spilloverHas(subscriber) {
303
- return this.spillover.indexOf(subscriber) !== -1;
304
- }
305
281
  /**
306
282
  * An implementation of {@link Notifier} that efficiently keeps track of
307
283
  * subscribers interested in a specific change notification on an
@@ -331,42 +307,58 @@
331
307
  * @param subscriber - The subscriber to test for inclusion in this set.
332
308
  */
333
309
  has(subscriber) {
334
- return this.sub1 === subscriber || this.sub2 === subscriber;
310
+ return this.spillover === void 0
311
+ ? this.sub1 === subscriber || this.sub2 === subscriber
312
+ : this.spillover.indexOf(subscriber) !== -1;
335
313
  }
336
314
  /**
337
315
  * Subscribes to notification of changes in an object's state.
338
316
  * @param subscriber - The object that is subscribing for change notification.
339
317
  */
340
318
  subscribe(subscriber) {
341
- if (this.has(subscriber)) {
342
- return;
343
- }
344
- if (this.sub1 === void 0) {
345
- this.sub1 = subscriber;
346
- return;
319
+ const spillover = this.spillover;
320
+ if (spillover === void 0) {
321
+ if (this.has(subscriber)) {
322
+ return;
323
+ }
324
+ if (this.sub1 === void 0) {
325
+ this.sub1 = subscriber;
326
+ return;
327
+ }
328
+ if (this.sub2 === void 0) {
329
+ this.sub2 = subscriber;
330
+ return;
331
+ }
332
+ this.spillover = [this.sub1, this.sub2, subscriber];
333
+ this.sub1 = void 0;
334
+ this.sub2 = void 0;
347
335
  }
348
- if (this.sub2 === void 0) {
349
- this.sub2 = subscriber;
350
- return;
336
+ else {
337
+ const index = spillover.indexOf(subscriber);
338
+ if (index === -1) {
339
+ spillover.push(subscriber);
340
+ }
351
341
  }
352
- this.spillover = [this.sub1, this.sub2, subscriber];
353
- this.subscribe = spilloverSubscribe;
354
- this.unsubscribe = spilloverUnsubscribe;
355
- this.notify = spilloverNotifySubscribers;
356
- this.has = spilloverHas;
357
- this.sub1 = void 0;
358
- this.sub2 = void 0;
359
342
  }
360
343
  /**
361
344
  * Unsubscribes from notification of changes in an object's state.
362
345
  * @param subscriber - The object that is unsubscribing from change notification.
363
346
  */
364
347
  unsubscribe(subscriber) {
365
- if (this.sub1 === subscriber) {
366
- this.sub1 = void 0;
348
+ const spillover = this.spillover;
349
+ if (spillover === void 0) {
350
+ if (this.sub1 === subscriber) {
351
+ this.sub1 = void 0;
352
+ }
353
+ else if (this.sub2 === subscriber) {
354
+ this.sub2 = void 0;
355
+ }
367
356
  }
368
- else if (this.sub2 === subscriber) {
369
- this.sub2 = void 0;
357
+ else {
358
+ const index = spillover.indexOf(subscriber);
359
+ if (index !== -1) {
360
+ spillover.splice(index, 1);
361
+ }
370
362
  }
371
363
  }
372
364
  /**
@@ -374,14 +366,22 @@
374
366
  * @param args - Data passed along to subscribers during notification.
375
367
  */
376
368
  notify(args) {
377
- const sub1 = this.sub1;
378
- const sub2 = this.sub2;
369
+ const spillover = this.spillover;
379
370
  const source = this.source;
380
- if (sub1 !== void 0) {
381
- sub1.handleChange(source, args);
371
+ if (spillover === void 0) {
372
+ const sub1 = this.sub1;
373
+ const sub2 = this.sub2;
374
+ if (sub1 !== void 0) {
375
+ sub1.handleChange(source, args);
376
+ }
377
+ if (sub2 !== void 0) {
378
+ sub2.handleChange(source, args);
379
+ }
382
380
  }
383
- if (sub2 !== void 0) {
384
- sub2.handleChange(source, args);
381
+ else {
382
+ for (let i = 0, ii = spillover.length; i < ii; ++i) {
383
+ spillover[i].handleChange(source, args);
384
+ }
385
385
  }
386
386
  }
387
387
  }
@@ -6745,8 +6745,14 @@
6745
6745
  * @internal
6746
6746
  */
6747
6747
  this.keypressHandler = (e) => {
6748
+ if (this.readOnly) {
6749
+ return;
6750
+ }
6748
6751
  switch (e.key) {
6749
6752
  case keySpace:
6753
+ if (this.indeterminate) {
6754
+ this.indeterminate = false;
6755
+ }
6750
6756
  this.checked = !this.checked;
6751
6757
  break;
6752
6758
  }
@@ -6756,6 +6762,9 @@
6756
6762
  */
6757
6763
  this.clickHandler = (e) => {
6758
6764
  if (!this.disabled && !this.readOnly) {
6765
+ if (this.indeterminate) {
6766
+ this.indeterminate = false;
6767
+ }
6759
6768
  this.checked = !this.checked;
6760
6769
  }
6761
6770
  };
@@ -7780,7 +7789,7 @@
7780
7789
  * @internal
7781
7790
  */
7782
7791
  focusoutHandler(e) {
7783
- this.updateValue();
7792
+ this.syncValue();
7784
7793
  if (!this.open) {
7785
7794
  return true;
7786
7795
  }
@@ -7802,7 +7811,12 @@
7802
7811
  inputHandler(e) {
7803
7812
  this.filter = this.control.value;
7804
7813
  this.filterOptions();
7805
- if (e.inputType === "deleteContentBackward" || !this.filter.length) {
7814
+ if (!this.isAutocompleteInline) {
7815
+ this.selectedIndex = this.options
7816
+ .map(option => option.text)
7817
+ .indexOf(this.control.value);
7818
+ }
7819
+ if (e.inputType.includes("deleteContent") || !this.filter.length) {
7806
7820
  return true;
7807
7821
  }
7808
7822
  if (this.isAutocompleteList && !this.open) {
@@ -7828,7 +7842,7 @@
7828
7842
  }
7829
7843
  switch (key) {
7830
7844
  case "Enter": {
7831
- this.updateValue(true);
7845
+ this.syncValue();
7832
7846
  if (this.isAutocompleteInline) {
7833
7847
  this.filter = this.value;
7834
7848
  }
@@ -7851,7 +7865,7 @@
7851
7865
  break;
7852
7866
  }
7853
7867
  case "Tab": {
7854
- this.updateValue();
7868
+ this.setInputToSelection();
7855
7869
  if (!this.open) {
7856
7870
  return true;
7857
7871
  }
@@ -7870,7 +7884,6 @@
7870
7884
  super.keydownHandler(e);
7871
7885
  }
7872
7886
  if (this.isAutocompleteInline) {
7873
- this.updateValue();
7874
7887
  this.setInlineSelection();
7875
7888
  }
7876
7889
  break;
@@ -7951,18 +7964,37 @@
7951
7964
  }
7952
7965
  }
7953
7966
  /**
7954
- * Focus and select the content of the control based on the first selected option.
7967
+ * Focus and set the content of the control based on the first selected option.
7955
7968
  *
7956
- * @param start - The index for the starting range
7957
7969
  * @internal
7958
7970
  */
7959
- setInlineSelection() {
7971
+ setInputToSelection() {
7960
7972
  if (this.firstSelectedOption) {
7961
7973
  this.control.value = this.firstSelectedOption.text;
7962
7974
  this.control.focus();
7975
+ }
7976
+ }
7977
+ /**
7978
+ * Focus, set and select the content of the control based on the first selected option.
7979
+ *
7980
+ * @internal
7981
+ */
7982
+ setInlineSelection() {
7983
+ if (this.firstSelectedOption) {
7984
+ this.setInputToSelection();
7963
7985
  this.control.setSelectionRange(this.filter.length, this.control.value.length, "backward");
7964
7986
  }
7965
7987
  }
7988
+ /**
7989
+ * Determines if a value update should involve emitting a change event, then updates the value.
7990
+ *
7991
+ * @internal
7992
+ */
7993
+ syncValue() {
7994
+ var _a;
7995
+ const newValue = this.selectedIndex > -1 ? (_a = this.firstSelectedOption) === null || _a === void 0 ? void 0 : _a.text : this.control.value;
7996
+ this.updateValue(this.value !== newValue);
7997
+ }
7966
7998
  /**
7967
7999
  * Calculate and apply listbox positioning based on available viewport space.
7968
8000
  *
@@ -8024,6 +8056,7 @@
8024
8056
  var _a;
8025
8057
  if (this.$fastController.isConnected) {
8026
8058
  this.value = ((_a = this.firstSelectedOption) === null || _a === void 0 ? void 0 : _a.text) || this.control.value;
8059
+ this.control.value = this.value;
8027
8060
  }
8028
8061
  if (shouldEmit) {
8029
8062
  this.$emit("change");
@@ -11894,7 +11927,7 @@
11894
11927
  this.updateValue(true);
11895
11928
  this.indexWhenOpened = this.selectedIndex;
11896
11929
  }
11897
- return !(key in ArrowKeys);
11930
+ return !(key === keyArrowDown || key === keyArrowUp);
11898
11931
  }
11899
11932
  connectedCallback() {
11900
11933
  super.connectedCallback();
@@ -12866,6 +12899,12 @@
12866
12899
  @click="${(x, c) => x.clickHandler(c.event)}"
12867
12900
  @focusin="${(x, c) => x.focusinHandler(c.event)}"
12868
12901
  @keydown="${(x, c) => x.keydownHandler(c.event)}"
12902
+ ${children({
12903
+ property: "childItems",
12904
+ attributeFilter: ["disabled", "hidden"],
12905
+ filter: elements(),
12906
+ subtree: true,
12907
+ })}
12869
12908
  >
12870
12909
  <slot name="label"></slot>
12871
12910
  <div class="positioning-region" part="positioning-region">
@@ -12942,11 +12981,6 @@
12942
12981
  * HTML Attribute: `orientation`
12943
12982
  */
12944
12983
  this.orientation = Orientation.horizontal;
12945
- this.startEndSlotChange = () => {
12946
- if (this.$fastController.isConnected) {
12947
- this.reduceFocusableElements();
12948
- }
12949
- };
12950
12984
  }
12951
12985
  /**
12952
12986
  * The index of the currently focused element, clamped between 0 and the last element.
@@ -12981,22 +13015,17 @@
12981
13015
  }
12982
13016
  return true;
12983
13017
  }
13018
+ childItemsChanged(prev, next) {
13019
+ if (this.$fastController.isConnected) {
13020
+ this.reduceFocusableElements();
13021
+ }
13022
+ }
12984
13023
  /**
12985
13024
  * @internal
12986
13025
  */
12987
13026
  connectedCallback() {
12988
13027
  super.connectedCallback();
12989
13028
  this.direction = getDirection(this);
12990
- this.start.addEventListener("slotchange", this.startEndSlotChange);
12991
- this.end.addEventListener("slotchange", this.startEndSlotChange);
12992
- }
12993
- /**
12994
- * @internal
12995
- */
12996
- disconnectedCallback() {
12997
- super.disconnectedCallback();
12998
- this.start.removeEventListener("slotchange", this.startEndSlotChange);
12999
- this.end.removeEventListener("slotchange", this.startEndSlotChange);
13000
13029
  }
13001
13030
  /**
13002
13031
  * When the toolbar receives focus, set the currently active element as focused.
@@ -13059,7 +13088,13 @@
13059
13088
  * @internal
13060
13089
  */
13061
13090
  reduceFocusableElements() {
13091
+ var _a;
13092
+ const previousFocusedElement = (_a = this.focusableElements) === null || _a === void 0 ? void 0 : _a[this.activeIndex];
13062
13093
  this.focusableElements = this.allSlottedItems.reduce(Toolbar$1.reduceFocusableItems, []);
13094
+ // If the previously active item is still focusable, adjust the active index to the
13095
+ // index of that item.
13096
+ const adjustedActiveIndex = this.focusableElements.indexOf(previousFocusedElement);
13097
+ this.activeIndex = Math.max(0, adjustedActiveIndex);
13063
13098
  this.setFocusableElements();
13064
13099
  }
13065
13100
  /**
@@ -13087,10 +13122,12 @@
13087
13122
  const isRoleRadio = element.getAttribute("role") === "radio";
13088
13123
  const isFocusableFastElement = (_b = (_a = element.$fastController) === null || _a === void 0 ? void 0 : _a.definition.shadowOptions) === null || _b === void 0 ? void 0 : _b.delegatesFocus;
13089
13124
  const hasFocusableShadow = Array.from((_d = (_c = element.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelectorAll("*")) !== null && _d !== void 0 ? _d : []).some(x => isFocusable(x));
13090
- if (isFocusable(element) ||
13091
- isRoleRadio ||
13092
- isFocusableFastElement ||
13093
- hasFocusableShadow) {
13125
+ if (!element.hasAttribute("disabled") &&
13126
+ !element.hasAttribute("hidden") &&
13127
+ (isFocusable(element) ||
13128
+ isRoleRadio ||
13129
+ isFocusableFastElement ||
13130
+ hasFocusableShadow)) {
13094
13131
  elements.push(element);
13095
13132
  return elements;
13096
13133
  }
@@ -13122,6 +13159,9 @@
13122
13159
  __decorate$1([
13123
13160
  observable
13124
13161
  ], Toolbar$1.prototype, "slottedLabel", void 0);
13162
+ __decorate$1([
13163
+ observable
13164
+ ], Toolbar$1.prototype, "childItems", void 0);
13125
13165
  /**
13126
13166
  * Includes ARIA states and properties relating to the ARIA toolbar role
13127
13167
  *
@@ -14262,7 +14302,7 @@
14262
14302
  */
14263
14303
  const focusVisible$1 = canUseFocusVisible() ? "focus-visible" : "focus";
14264
14304
 
14265
- const styles$t = css `
14305
+ const styles$u = css `
14266
14306
  :host {
14267
14307
  contain: layout;
14268
14308
  display: block;
@@ -14286,7 +14326,7 @@
14286
14326
  baseName: 'anchored-region',
14287
14327
  baseClass: AnchoredRegion$1,
14288
14328
  template: anchoredRegionTemplate,
14289
- styles: styles$t
14329
+ styles: styles$u
14290
14330
  });
14291
14331
  DesignSystem.getOrCreate()
14292
14332
  .withPrefix('nimble')
@@ -14310,6 +14350,7 @@
14310
14350
  const Black88 = "#252526";
14311
14351
  const Black85 = "#363738";
14312
14352
  const Black80 = "#505153";
14353
+ const Black = "#000000";
14313
14354
  const Black91 = "#161617";
14314
14355
  const ForestGreen = "#074023";
14315
14356
  const DigitalGreenLight = "#009b65";
@@ -14629,7 +14670,7 @@
14629
14670
 
14630
14671
  const template$6 = html `<slot></slot>`;
14631
14672
 
14632
- const styles$s = css `
14673
+ const styles$t = css `
14633
14674
  :host {
14634
14675
  display: contents;
14635
14676
  }
@@ -14685,7 +14726,7 @@
14685
14726
  ], ThemeProvider.prototype, "theme", void 0);
14686
14727
  const nimbleDesignSystemProvider = ThemeProvider.compose({
14687
14728
  baseName: 'theme-provider',
14688
- styles: styles$s,
14729
+ styles: styles$t,
14689
14730
  template: template$6
14690
14731
  });
14691
14732
  DesignSystem.getOrCreate()
@@ -14940,7 +14981,7 @@
14940
14981
  */
14941
14982
  const themeBehavior = (lightStyle, darkStyleOrAlias, colorStyleOrAlias) => new ThemeStyleSheetBehavior(lightStyle, darkStyleOrAlias, colorStyleOrAlias);
14942
14983
 
14943
- const styles$r = css `
14984
+ const styles$s = css `
14944
14985
  ${display('inline-block')}
14945
14986
 
14946
14987
  :host {
@@ -15003,7 +15044,7 @@
15003
15044
  baseName: 'breadcrumb',
15004
15045
  baseClass: Breadcrumb$1,
15005
15046
  template: breadcrumbTemplate,
15006
- styles: styles$r
15047
+ styles: styles$s
15007
15048
  });
15008
15049
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBreadcrumb());
15009
15050
 
@@ -15589,7 +15630,7 @@
15589
15630
  */
15590
15631
  const focusVisible = `:${focusVisible$1}`;
15591
15632
 
15592
- const styles$q = css `
15633
+ const styles$r = css `
15593
15634
  ${display('inline-flex')}
15594
15635
 
15595
15636
  :host {
@@ -15669,7 +15710,7 @@
15669
15710
  baseName: 'breadcrumb-item',
15670
15711
  baseClass: BreadcrumbItem$1,
15671
15712
  template: breadcrumbItemTemplate,
15672
- styles: styles$q,
15713
+ styles: styles$r,
15673
15714
  separator: forwardSlash16X16.data
15674
15715
  });
15675
15716
  DesignSystem.getOrCreate()
@@ -15699,7 +15740,7 @@
15699
15740
  block: 'block'
15700
15741
  };
15701
15742
 
15702
- const styles$p = css `
15743
+ const styles$q = css `
15703
15744
  ${display('inline-flex')}
15704
15745
 
15705
15746
  :host {
@@ -15906,7 +15947,7 @@
15906
15947
  `));
15907
15948
 
15908
15949
  // prettier-ignore
15909
- const styles$o = styles$p
15950
+ const styles$p = styles$q
15910
15951
  .withBehaviors(appearanceBehavior(ButtonAppearance.outline, css `
15911
15952
  :host(.primary) .control {
15912
15953
  box-shadow: 0px 0px 0px ${borderWidth} rgba(${actionRgbPartialColor}, 0.3) inset;
@@ -16020,13 +16061,191 @@
16020
16061
  baseName: 'button',
16021
16062
  baseClass: Button$1,
16022
16063
  template: buttonTemplate,
16023
- styles: styles$o,
16064
+ styles: styles$p,
16024
16065
  shadowOptions: {
16025
16066
  delegatesFocus: true
16026
16067
  }
16027
16068
  });
16028
16069
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleButton());
16029
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
+
16030
16249
  const styles$n = css `
16031
16250
  ${display('inline-flex')}
16032
16251
 
@@ -19787,7 +20006,7 @@
19787
20006
  `;
19788
20007
 
19789
20008
  const styles$e = css `
19790
- ${styles$p}
20009
+ ${styles$q}
19791
20010
 
19792
20011
  .control[aria-pressed='true'] {
19793
20012
  background-color: ${fillSelectedColor};