@ni/nimble-components 35.5.8 → 35.6.1

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.
@@ -14898,9 +14898,9 @@
14898
14898
  const prefix = 'ni-nimble';
14899
14899
  const styleNameFromTokenName = (tokenName) => `${prefix}-${tokenName}`;
14900
14900
 
14901
- const template$R = html `<slot></slot>`;
14901
+ const template$S = html `<slot></slot>`;
14902
14902
 
14903
- const styles$16 = css `
14903
+ const styles$17 = css `
14904
14904
  ${display('contents')}
14905
14905
  `;
14906
14906
 
@@ -15015,8 +15015,8 @@
15015
15015
  ], ThemeProvider.prototype, "theme", void 0);
15016
15016
  const nimbleDesignSystemProvider = ThemeProvider.compose({
15017
15017
  baseName: 'theme-provider',
15018
- styles: styles$16,
15019
- template: template$R
15018
+ styles: styles$17,
15019
+ template: template$S
15020
15020
  });
15021
15021
  DesignSystem.getOrCreate()
15022
15022
  .withPrefix('nimble')
@@ -16658,7 +16658,7 @@
16658
16658
  }
16659
16659
  // #endregion
16660
16660
 
16661
- const styles$15 = css `
16661
+ const styles$16 = css `
16662
16662
  @layer base, hover, focusVisible, active, disabled, top;
16663
16663
 
16664
16664
  @layer base {
@@ -16736,7 +16736,7 @@
16736
16736
  }
16737
16737
  `;
16738
16738
 
16739
- const template$Q = (_context, definition) => html `${
16739
+ const template$R = (_context, definition) => html `${
16740
16740
  /* top-container div is necessary because setting contenteditable directly on the native anchor instead
16741
16741
  leaves it focusable, unlike the behavior you get when the anchor is _within_ a contenteditable element.
16742
16742
  */ ''}<div
@@ -16839,8 +16839,8 @@
16839
16839
  const nimbleAnchor = Anchor.compose({
16840
16840
  baseName: 'anchor',
16841
16841
  baseClass: Anchor$1,
16842
- template: template$Q,
16843
- styles: styles$15,
16842
+ template: template$R,
16843
+ styles: styles$16,
16844
16844
  shadowOptions: {
16845
16845
  delegatesFocus: true
16846
16846
  }
@@ -16949,7 +16949,7 @@
16949
16949
  padding: 0;
16950
16950
  `;
16951
16951
 
16952
- const styles$14 = css `
16952
+ const styles$15 = css `
16953
16953
  @layer base, checked, hover, focusVisible, active, disabled, top;
16954
16954
 
16955
16955
  @layer base {
@@ -17233,8 +17233,8 @@
17233
17233
  }
17234
17234
  `));
17235
17235
 
17236
- const styles$13 = css `
17237
- ${styles$14}
17236
+ const styles$14 = css `
17237
+ ${styles$15}
17238
17238
  ${buttonAppearanceVariantStyles}
17239
17239
 
17240
17240
  .control {
@@ -17254,7 +17254,7 @@
17254
17254
  }
17255
17255
  `;
17256
17256
 
17257
- const template$P = (context, definition) => html `
17257
+ const template$Q = (context, definition) => html `
17258
17258
  <a
17259
17259
  class="control"
17260
17260
  part="control"
@@ -17336,8 +17336,8 @@
17336
17336
  ], AnchorButton.prototype, "disabled", void 0);
17337
17337
  const nimbleAnchorButton = AnchorButton.compose({
17338
17338
  baseName: 'anchor-button',
17339
- template: template$P,
17340
- styles: styles$13,
17339
+ template: template$Q,
17340
+ styles: styles$14,
17341
17341
  shadowOptions: {
17342
17342
  delegatesFocus: true
17343
17343
  }
@@ -17345,7 +17345,7 @@
17345
17345
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorButton());
17346
17346
  const anchorButtonTag = 'nimble-anchor-button';
17347
17347
 
17348
- const styles$12 = css `
17348
+ const styles$13 = css `
17349
17349
  ${display('grid')}
17350
17350
 
17351
17351
  :host {
@@ -17428,7 +17428,7 @@
17428
17428
  }
17429
17429
  `;
17430
17430
 
17431
- const template$O = (context, definition) => html `
17431
+ const template$P = (context, definition) => html `
17432
17432
  <template
17433
17433
  role="menuitem"
17434
17434
  class="${x => (typeof x.startColumnCount === 'number'
@@ -17529,8 +17529,8 @@
17529
17529
  // FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
17530
17530
  const nimbleAnchorMenuItem = AnchorMenuItem.compose({
17531
17531
  baseName: 'anchor-menu-item',
17532
- template: template$O,
17533
- styles: styles$12,
17532
+ template: template$P,
17533
+ styles: styles$13,
17534
17534
  shadowOptions: {
17535
17535
  delegatesFocus: true
17536
17536
  }
@@ -17542,7 +17542,7 @@
17542
17542
 
17543
17543
  // These styles end up inside a @layer block so must use the
17544
17544
  // cssPartial tag instead of the css tag
17545
- const styles$11 = cssPartial `
17545
+ const styles$12 = cssPartial `
17546
17546
  .severity-text {
17547
17547
  display: none;
17548
17548
  font: ${errorTextFont};
@@ -17652,12 +17652,12 @@
17652
17652
  const themeBehavior = (theme, styles) => new ThemeStyleSheetBehavior(theme, styles);
17653
17653
  /* eslint-enable max-classes-per-file */
17654
17654
 
17655
- const styles$10 = css `
17655
+ const styles$11 = css `
17656
17656
  @layer base, hover, focusVisible, active, disabled, top;
17657
17657
 
17658
17658
  @layer base {
17659
17659
  ${display('inline-flex')}
17660
- ${styles$11}
17660
+ ${styles$12}
17661
17661
  :host {
17662
17662
  color: ${buttonLabelFontColor};
17663
17663
  font: ${buttonLabelFont};
@@ -18203,8 +18203,8 @@ Defines an interaction area clip-path that leaves out the severity text so it is
18203
18203
  }
18204
18204
  `));
18205
18205
 
18206
- const styles$$ = css `
18207
- ${styles$10}
18206
+ const styles$10 = css `
18207
+ ${styles$11}
18208
18208
  ${'' /* Anchor specific styles */}
18209
18209
  @layer base {
18210
18210
  .control {
@@ -19247,13 +19247,13 @@ Defines an interaction area clip-path that leaves out the severity text so it is
19247
19247
  };
19248
19248
 
19249
19249
  // Avoiding any whitespace in the template because this is an inline element
19250
- const template$N = html `<div
19250
+ const template$O = html `<div
19251
19251
  class="icon"
19252
19252
  aria-hidden="true"
19253
19253
  :innerHTML=${x => x.icon.data}
19254
19254
  ></div>`;
19255
19255
 
19256
- const styles$_ = css `
19256
+ const styles$$ = css `
19257
19257
  ${display('inline-flex')}
19258
19258
 
19259
19259
  :host {
@@ -19316,8 +19316,8 @@ Defines an interaction area clip-path that leaves out the severity text so it is
19316
19316
  const registerIconSvg = (baseName, iconClass) => {
19317
19317
  const composedIcon = iconClass.compose({
19318
19318
  baseName,
19319
- template: template$N,
19320
- styles: styles$_
19319
+ template: template$O,
19320
+ styles: styles$$
19321
19321
  });
19322
19322
  DesignSystem.getOrCreate().withPrefix('nimble').register(composedIcon());
19323
19323
  };
@@ -19441,7 +19441,7 @@ Defines an interaction area clip-path that leaves out the severity text so it is
19441
19441
  */
19442
19442
  const StepperOrientation = Orientation;
19443
19443
 
19444
- const template$M = (context, definition) => html `
19444
+ const template$N = (context, definition) => html `
19445
19445
  <template slot="step">
19446
19446
  <li class="
19447
19447
  container
@@ -19565,9 +19565,10 @@ Defines an interaction area clip-path that leaves out the severity text so it is
19565
19565
  */
19566
19566
  onClick(e) {
19567
19567
  if (this.disabled || this.readOnly) {
19568
- e.preventDefault();
19569
19568
  e.stopImmediatePropagation();
19569
+ return false; /* Do prevent default */
19570
19570
  }
19571
+ return true; /* Do not prevent default */
19571
19572
  }
19572
19573
  }
19573
19574
  __decorate([
@@ -19587,15 +19588,15 @@ Defines an interaction area clip-path that leaves out the severity text so it is
19587
19588
  ], AnchorStep.prototype, "tabIndex", void 0);
19588
19589
  const nimbleAnchorStep = AnchorStep.compose({
19589
19590
  baseName: 'anchor-step',
19590
- template: template$M,
19591
- styles: styles$$,
19591
+ template: template$N,
19592
+ styles: styles$10,
19592
19593
  shadowOptions: {
19593
19594
  delegatesFocus: true
19594
19595
  }
19595
19596
  });
19596
19597
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorStep());
19597
19598
 
19598
- const styles$Z = css `
19599
+ const styles$_ = css `
19599
19600
  ${display('inline-flex')}
19600
19601
 
19601
19602
  :host {
@@ -19712,7 +19713,7 @@ Defines an interaction area clip-path that leaves out the severity text so it is
19712
19713
  }
19713
19714
  `;
19714
19715
 
19715
- const template$L = (context, definition) => html `
19716
+ const template$M = (context, definition) => html `
19716
19717
  <template slot="anchortab" role="tab" aria-disabled="${x => x.disabled}">
19717
19718
  <a
19718
19719
  download="${x => x.download}"
@@ -19764,15 +19765,15 @@ Defines an interaction area clip-path that leaves out the severity text so it is
19764
19765
  // FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
19765
19766
  const nimbleAnchorTab = AnchorTab.compose({
19766
19767
  baseName: 'anchor-tab',
19767
- template: template$L,
19768
- styles: styles$Z,
19768
+ template: template$M,
19769
+ styles: styles$_,
19769
19770
  shadowOptions: {
19770
19771
  delegatesFocus: true
19771
19772
  }
19772
19773
  });
19773
19774
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorTab());
19774
19775
 
19775
- const styles$Y = css `
19776
+ const styles$Z = css `
19776
19777
  ${display('flex')}
19777
19778
 
19778
19779
  :host {
@@ -19812,12 +19813,12 @@ Defines an interaction area clip-path that leaves out the severity text so it is
19812
19813
  }
19813
19814
  `;
19814
19815
 
19815
- const styles$X = css `
19816
- ${styles$14}
19816
+ const styles$Y = css `
19817
+ ${styles$15}
19817
19818
  ${buttonAppearanceVariantStyles}
19818
19819
  `;
19819
19820
 
19820
- const template$K = (context, definition) => html `
19821
+ const template$L = (context, definition) => html `
19821
19822
  <button
19822
19823
  class="control"
19823
19824
  part="control"
@@ -19908,8 +19909,8 @@ Defines an interaction area clip-path that leaves out the severity text so it is
19908
19909
  const nimbleButton = Button.compose({
19909
19910
  baseName: 'button',
19910
19911
  baseClass: Button$1,
19911
- template: template$K,
19912
- styles: styles$X,
19912
+ template: template$L,
19913
+ styles: styles$Y,
19913
19914
  shadowOptions: {
19914
19915
  delegatesFocus: true
19915
19916
  }
@@ -19943,7 +19944,7 @@ Defines an interaction area clip-path that leaves out the severity text so it is
19943
19944
  registerIconSvg('icon-arrow-expander-right', IconArrowExpanderRight);
19944
19945
  const iconArrowExpanderRightTag = 'nimble-icon-arrow-expander-right';
19945
19946
 
19946
- const template$J = (context, definition) => html `
19947
+ const template$K = (context, definition) => html `
19947
19948
  <div
19948
19949
  class="tab-bar"
19949
19950
  >
@@ -20244,15 +20245,15 @@ Defines an interaction area clip-path that leaves out the severity text so it is
20244
20245
  applyMixins(AnchorTabs, StartEnd);
20245
20246
  const nimbleAnchorTabs = AnchorTabs.compose({
20246
20247
  baseName: 'anchor-tabs',
20247
- template: template$J,
20248
- styles: styles$Y,
20248
+ template: template$K,
20249
+ styles: styles$Z,
20249
20250
  shadowOptions: {
20250
20251
  delegatesFocus: false
20251
20252
  }
20252
20253
  });
20253
20254
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorTabs());
20254
20255
 
20255
- const styles$W = css `
20256
+ const styles$X = css `
20256
20257
  ${display('block')}
20257
20258
 
20258
20259
  :host {
@@ -20357,7 +20358,7 @@ Defines an interaction area clip-path that leaves out the severity text so it is
20357
20358
  }
20358
20359
  `;
20359
20360
 
20360
- const template$I = (context, definition) => html `
20361
+ const template$J = (context, definition) => html `
20361
20362
  <template
20362
20363
  role="treeitem"
20363
20364
  slot="${x => (x.isNestedItem() ? 'item' : null)}"
@@ -20494,8 +20495,8 @@ Defines an interaction area clip-path that leaves out the severity text so it is
20494
20495
  // FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
20495
20496
  const nimbleAnchorTreeItem = AnchorTreeItem.compose({
20496
20497
  baseName: 'anchor-tree-item',
20497
- template: template$I,
20498
- styles: styles$W,
20498
+ template: template$J,
20499
+ styles: styles$X,
20499
20500
  shadowOptions: {
20500
20501
  delegatesFocus: true
20501
20502
  }
@@ -20511,7 +20512,7 @@ Defines an interaction area clip-path that leaves out the severity text so it is
20511
20512
  zIndex1000: '1000'
20512
20513
  };
20513
20514
 
20514
- const styles$V = css `
20515
+ const styles$W = css `
20515
20516
  ${display('block')}
20516
20517
 
20517
20518
  :host {
@@ -20542,14 +20543,14 @@ Defines an interaction area clip-path that leaves out the severity text so it is
20542
20543
  baseName: 'anchored-region',
20543
20544
  baseClass: AnchoredRegion$1,
20544
20545
  template: anchoredRegionTemplate,
20545
- styles: styles$V
20546
+ styles: styles$W
20546
20547
  });
20547
20548
  DesignSystem.getOrCreate()
20548
20549
  .withPrefix('nimble')
20549
20550
  .register(nimbleAnchoredRegion());
20550
20551
  const anchoredRegionTag = 'nimble-anchored-region';
20551
20552
 
20552
- const styles$U = css `
20553
+ const styles$V = css `
20553
20554
  ${display('flex')}
20554
20555
 
20555
20556
  :host {
@@ -20701,7 +20702,7 @@ Defines an interaction area clip-path that leaves out the severity text so it is
20701
20702
  information: 'information'
20702
20703
  };
20703
20704
 
20704
- const template$H = html `
20705
+ const template$I = html `
20705
20706
  <${themeProviderTag} theme="${Theme.color}">
20706
20707
  <div class="container"
20707
20708
  role="status"
@@ -20819,8 +20820,8 @@ Defines an interaction area clip-path that leaves out the severity text so it is
20819
20820
  applyMixins(Banner, ARIAGlobalStatesAndProperties);
20820
20821
  const nimbleBanner = Banner.compose({
20821
20822
  baseName: 'banner',
20822
- template: template$H,
20823
- styles: styles$U
20823
+ template: template$I,
20824
+ styles: styles$V
20824
20825
  });
20825
20826
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBanner());
20826
20827
 
@@ -20861,7 +20862,7 @@ Defines an interaction area clip-path that leaves out the severity text so it is
20861
20862
  </template>
20862
20863
  `;
20863
20864
 
20864
- const styles$T = css `
20865
+ const styles$U = css `
20865
20866
  ${display('inline-flex')}
20866
20867
 
20867
20868
  :host {
@@ -20965,11 +20966,11 @@ Defines an interaction area clip-path that leaves out the severity text so it is
20965
20966
  baseName: 'breadcrumb',
20966
20967
  baseClass: Breadcrumb$1,
20967
20968
  template: breadcrumbTemplate,
20968
- styles: styles$T
20969
+ styles: styles$U
20969
20970
  });
20970
20971
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBreadcrumb());
20971
20972
 
20972
- const styles$S = css `
20973
+ const styles$T = css `
20973
20974
  @layer base, hover, focusVisible, active, disabled, top;
20974
20975
 
20975
20976
  @layer base {
@@ -21066,14 +21067,14 @@ so this becomes the fallback color for the slot */ ''}
21066
21067
  baseName: 'breadcrumb-item',
21067
21068
  baseClass: BreadcrumbItem$1,
21068
21069
  template: breadcrumbItemTemplate,
21069
- styles: styles$S,
21070
+ styles: styles$T,
21070
21071
  separator: forwardSlash16X16.data
21071
21072
  });
21072
21073
  DesignSystem.getOrCreate()
21073
21074
  .withPrefix('nimble')
21074
21075
  .register(nimbleBreadcrumbItem());
21075
21076
 
21076
- const styles$R = css `
21077
+ const styles$S = css `
21077
21078
  ${display('flex')}
21078
21079
 
21079
21080
  :host {
@@ -21097,7 +21098,7 @@ so this becomes the fallback color for the slot */ ''}
21097
21098
  }
21098
21099
  `;
21099
21100
 
21100
- const template$G = html `
21101
+ const template$H = html `
21101
21102
  <section aria-labelledby="title-slot">
21102
21103
  <span id="title-slot"><slot name="title"></slot></span>
21103
21104
  <slot></slot>
@@ -21112,12 +21113,12 @@ so this becomes the fallback color for the slot */ ''}
21112
21113
  const nimbleCard = Card.compose({
21113
21114
  baseName: 'card',
21114
21115
  baseClass: Card$1,
21115
- template: template$G,
21116
- styles: styles$R
21116
+ template: template$H,
21117
+ styles: styles$S
21117
21118
  });
21118
21119
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCard());
21119
21120
 
21120
- const styles$Q = css `
21121
+ const styles$R = css `
21121
21122
  ${display('inline-flex')}
21122
21123
 
21123
21124
  :host {
@@ -21275,14 +21276,14 @@ so this becomes the fallback color for the slot */ ''}
21275
21276
  const nimbleCardButton = CardButton.compose({
21276
21277
  baseName: 'card-button',
21277
21278
  template: buttonTemplate,
21278
- styles: styles$Q,
21279
+ styles: styles$R,
21279
21280
  shadowOptions: {
21280
21281
  delegatesFocus: true
21281
21282
  }
21282
21283
  });
21283
21284
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCardButton());
21284
21285
 
21285
- const styles$P = css `
21286
+ const styles$Q = css `
21286
21287
  .error-icon {
21287
21288
  display: none;
21288
21289
  }
@@ -21316,9 +21317,9 @@ so this becomes the fallback color for the slot */ ''}
21316
21317
  }
21317
21318
  `;
21318
21319
 
21319
- const styles$O = css `
21320
+ const styles$P = css `
21320
21321
  ${display('inline-grid')}
21321
- ${styles$P}
21322
+ ${styles$Q}
21322
21323
 
21323
21324
  :host {
21324
21325
  font: ${bodyFont};
@@ -21457,7 +21458,7 @@ so this becomes the fallback color for the slot */ ''}
21457
21458
  </div>
21458
21459
  `;
21459
21460
 
21460
- const template$F = (_context, definition) => html `
21461
+ const template$G = (_context, definition) => html `
21461
21462
  <template
21462
21463
  role="checkbox"
21463
21464
  aria-checked="${x => x.checked}"
@@ -21542,16 +21543,176 @@ so this becomes the fallback color for the slot */ ''}
21542
21543
  const nimbleCheckbox = Checkbox.compose({
21543
21544
  baseName: 'checkbox',
21544
21545
  baseClass: Checkbox$1,
21545
- template: template$F,
21546
- styles: styles$O,
21546
+ template: template$G,
21547
+ styles: styles$P,
21547
21548
  checkedIndicator: check16X16.data,
21548
21549
  indeterminateIndicator: minus16X16.data
21549
21550
  });
21550
21551
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCheckbox());
21551
21552
  const checkboxTag = 'nimble-checkbox';
21552
21553
 
21554
+ const ChipAppearance = {
21555
+ outline: 'outline',
21556
+ block: 'block'
21557
+ };
21558
+
21559
+ const styles$O = css `
21560
+ ${display('inline-flex')}
21561
+
21562
+ :host {
21563
+ height: ${controlHeight};
21564
+ width: fit-content;
21565
+ max-width: 300px;
21566
+ color: ${bodyFontColor};
21567
+ font: ${bodyFont};
21568
+ padding: 0 ${mediumPadding};
21569
+ gap: 4px;
21570
+ background-color: transparent;
21571
+ border: ${borderWidth} solid rgba(${actionRgbPartialColor}, 0.3);
21572
+ border-radius: 4px;
21573
+ justify-content: center;
21574
+ align-items: center;
21575
+ }
21576
+
21577
+ :host([disabled]) {
21578
+ cursor: default;
21579
+ color: ${bodyDisabledFontColor};
21580
+ border-color: rgba(${borderRgbPartialColor}, 0.3);
21581
+ }
21582
+
21583
+ :host([disabled]) slot[name='start']::slotted(*) {
21584
+ opacity: 0.3;
21585
+ ${iconColor.cssCustomProperty}: ${bodyFontColor};
21586
+ }
21587
+
21588
+ slot[name='start']::slotted(*) {
21589
+ flex-shrink: 0;
21590
+ }
21591
+
21592
+ [part='start'] {
21593
+ display: contents;
21594
+ ${iconColor.cssCustomProperty}: ${bodyFontColor};
21595
+ }
21596
+
21597
+ .content {
21598
+ text-overflow: ellipsis;
21599
+ overflow: hidden;
21600
+ white-space: nowrap;
21601
+ }
21602
+
21603
+ .remove-button {
21604
+ height: ${iconSize};
21605
+ width: ${iconSize};
21606
+ margin-right: calc(-1 * ${smallPadding});
21607
+ }
21608
+
21609
+ [part='end'] {
21610
+ display: none;
21611
+ }
21612
+ `.withBehaviors(appearanceBehavior(ChipAppearance.block, css `
21613
+ :host,
21614
+ :host([disabled]) {
21615
+ background-color: rgba(${borderRgbPartialColor}, 0.1);
21616
+ border-color: transparent;
21617
+ }
21618
+ `));
21619
+
21620
+ const template$F = (context, definition) => html `
21621
+ ${startSlotTemplate(context, definition)}
21622
+ <span
21623
+ class="content"
21624
+ part="content"
21625
+ ${overflow('hasOverflow')}
21626
+ title=${x => (x.hasOverflow && x.elementTextContent
21627
+ ? x.elementTextContent
21628
+ : null)}
21629
+ >
21630
+ <slot
21631
+ ${ref('contentSlot')}
21632
+ ${slotted({ property: 'content' })}
21633
+ ></slot>
21634
+ </span>
21635
+ ${when(x => x.removable && !x.disabled, html `
21636
+ <${buttonTag}
21637
+ class="remove-button"
21638
+ content-hidden
21639
+ appearance="${ButtonAppearance.ghost}"
21640
+ tabindex="${x => x.tabIndex}"
21641
+ @click="${x => x.handleRemoveClick()}"
21642
+ >
21643
+ <${iconTimesTag} slot="start"></${iconTimesTag}>
21644
+ ${x => x.removeButtonContent}
21645
+ </${buttonTag}>
21646
+ `)}
21647
+ ${endSlotTemplate(context, definition)}
21648
+ `;
21649
+
21650
+ /**
21651
+ * Finds all text content within a slot and returns it as a space-delimited string.
21652
+ */
21653
+ const slotTextContent = (slot) => {
21654
+ return slot
21655
+ .assignedNodes()
21656
+ .map(node => node.textContent?.trim())
21657
+ .filter(content => content !== undefined && content !== '')
21658
+ .join(' ');
21659
+ };
21660
+
21661
+ /**
21662
+ * A Nimble chip component
21663
+ */
21664
+ class Chip extends FoundationElement {
21665
+ constructor() {
21666
+ super(...arguments);
21667
+ this.removable = false;
21668
+ this.disabled = false;
21669
+ this.appearance = ChipAppearance.outline;
21670
+ /** @internal */
21671
+ this.hasOverflow = false;
21672
+ }
21673
+ /** @internal */
21674
+ get elementTextContent() {
21675
+ return slotTextContent(this.contentSlot);
21676
+ }
21677
+ /** @internal */
21678
+ get removeButtonContent() {
21679
+ return itemRemoveLabel.getValueFor(this);
21680
+ }
21681
+ /** @internal */
21682
+ handleRemoveClick() {
21683
+ if (this.removable) {
21684
+ this.$emit('remove');
21685
+ }
21686
+ }
21687
+ }
21688
+ __decorate([
21689
+ attr({ mode: 'boolean' })
21690
+ ], Chip.prototype, "removable", void 0);
21691
+ __decorate([
21692
+ attr({ mode: 'boolean' })
21693
+ ], Chip.prototype, "disabled", void 0);
21694
+ __decorate([
21695
+ attr()
21696
+ ], Chip.prototype, "appearance", void 0);
21697
+ __decorate([
21698
+ attr({ attribute: 'tabindex', converter: nullableNumberConverter })
21699
+ ], Chip.prototype, "tabIndex", void 0);
21700
+ __decorate([
21701
+ observable
21702
+ ], Chip.prototype, "hasOverflow", void 0);
21703
+ applyMixins(Chip, StartEnd);
21704
+ const nimbleChip = Chip.compose({
21705
+ baseName: 'chip',
21706
+ template: template$F,
21707
+ styles: styles$O,
21708
+ shadowOptions: {
21709
+ delegatesFocus: true
21710
+ }
21711
+ });
21712
+ DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleChip());
21713
+
21553
21714
  const styles$N = css `
21554
- ${styles$14}
21715
+ ${styles$15}
21555
21716
  ${buttonAppearanceVariantStyles}
21556
21717
 
21557
21718
  @layer checked {
@@ -22043,7 +22204,7 @@ so this becomes the fallback color for the slot */ ''}
22043
22204
 
22044
22205
  const styles$K = css `
22045
22206
  ${styles$M}
22046
- ${styles$P}
22207
+ ${styles$Q}
22047
22208
  ${styles$L}
22048
22209
 
22049
22210
  :host {
@@ -26648,17 +26809,6 @@ so this becomes the fallback color for the slot */ ''}
26648
26809
  </template>
26649
26810
  `;
26650
26811
 
26651
- /**
26652
- * Finds all text content within a slot and returns it as a space-delimited string.
26653
- */
26654
- const slotTextContent = (slot) => {
26655
- return slot
26656
- .assignedNodes()
26657
- .map(node => node.textContent?.trim())
26658
- .filter(content => content !== undefined && content !== '')
26659
- .join(' ');
26660
- };
26661
-
26662
26812
  /**
26663
26813
  * A nimble-styled HTML listbox option
26664
26814
  */
@@ -27901,7 +28051,7 @@ so this becomes the fallback color for the slot */ ''}
27901
28051
 
27902
28052
  const styles$A = css `
27903
28053
  ${display('inline-block')}
27904
- ${styles$P}
28054
+ ${styles$Q}
27905
28055
  ${styles$L}
27906
28056
 
27907
28057
  :host {
@@ -28430,7 +28580,7 @@ so this becomes the fallback color for the slot */ ''}
28430
28580
 
28431
28581
  const styles$y = css `
28432
28582
  ${display('inline-block')}
28433
- ${styles$P}
28583
+ ${styles$Q}
28434
28584
  ${styles$L}
28435
28585
 
28436
28586
  .positioning-region {
@@ -48287,7 +48437,7 @@ ${indentedChild}`;
48287
48437
 
48288
48438
  const styles$v = css `
48289
48439
  ${display('inline-flex')}
48290
- ${styles$P}
48440
+ ${styles$Q}
48291
48441
 
48292
48442
  :host {
48293
48443
  font: ${bodyFont};
@@ -64871,7 +65021,7 @@ ${nextLine.slice(indentLevel + 2)}`;
64871
65021
 
64872
65022
  const styles$t = css `
64873
65023
  ${styles$M}
64874
- ${styles$P}
65024
+ ${styles$Q}
64875
65025
  ${styles$L}
64876
65026
 
64877
65027
  ${
@@ -66496,7 +66646,7 @@ ${nextLine.slice(indentLevel + 2)}`;
66496
66646
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSelect());
66497
66647
 
66498
66648
  const styles$r = css `
66499
- ${styles$10}
66649
+ ${styles$11}
66500
66650
  ${'' /* Button specific styles */}
66501
66651
  @layer base {
66502
66652
  .control {
@@ -66609,9 +66759,10 @@ ${nextLine.slice(indentLevel + 2)}`;
66609
66759
  */
66610
66760
  onClick(e) {
66611
66761
  if (this.disabled || this.readOnly) {
66612
- e.preventDefault();
66613
66762
  e.stopImmediatePropagation();
66763
+ return false; /* Do prevent default */
66614
66764
  }
66765
+ return true; /* Do not prevent default */
66615
66766
  }
66616
66767
  }
66617
66768
  __decorate([
@@ -79232,7 +79383,7 @@ focus outline in that case.
79232
79383
  .register(nimbleTableColumnText());
79233
79384
 
79234
79385
  const styles$8 = css `
79235
- ${styles$Y}
79386
+ ${styles$Z}
79236
79387
 
79237
79388
  .tabpanel {
79238
79389
  overflow: auto;
@@ -79313,7 +79464,7 @@ focus outline in that case.
79313
79464
  const nimbleTabs = Tabs.compose({
79314
79465
  baseName: 'tabs',
79315
79466
  baseClass: Tabs$1,
79316
- template: template$J,
79467
+ template: template$K,
79317
79468
  styles: styles$8
79318
79469
  });
79319
79470
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTabs());
@@ -79395,7 +79546,7 @@ focus outline in that case.
79395
79546
 
79396
79547
  const styles$6 = css `
79397
79548
  ${display('inline-flex')}
79398
- ${styles$P}
79549
+ ${styles$Q}
79399
79550
  ${styles$L}
79400
79551
 
79401
79552
  :host {
@@ -79756,7 +79907,7 @@ focus outline in that case.
79756
79907
 
79757
79908
  const styles$5 = css `
79758
79909
  ${display('inline-block')}
79759
- ${styles$P}
79910
+ ${styles$Q}
79760
79911
  ${styles$L}
79761
79912
 
79762
79913
  :host {