@ni/nimble-components 20.16.5 → 20.17.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.
@@ -16301,7 +16301,7 @@
16301
16301
 
16302
16302
  /**
16303
16303
  * Do not edit directly
16304
- * Generated on Thu, 04 Jan 2024 16:35:43 GMT
16304
+ * Generated on Thu, 04 Jan 2024 21:07:51 GMT
16305
16305
  */
16306
16306
 
16307
16307
  const Information100DarkUi = "#a46eff";
@@ -16704,9 +16704,9 @@
16704
16704
  return `${prefix}${uniqueIdCounter++}`;
16705
16705
  }
16706
16706
 
16707
- const template$E = html `<slot></slot>`;
16707
+ const template$D = html `<slot></slot>`;
16708
16708
 
16709
- const styles$Y = css `
16709
+ const styles$X = css `
16710
16710
  :host {
16711
16711
  display: contents;
16712
16712
  }
@@ -16823,8 +16823,8 @@
16823
16823
  ], ThemeProvider.prototype, "theme", void 0);
16824
16824
  const nimbleDesignSystemProvider = ThemeProvider.compose({
16825
16825
  baseName: 'theme-provider',
16826
- styles: styles$Y,
16827
- template: template$E
16826
+ styles: styles$X,
16827
+ template: template$D
16828
16828
  });
16829
16829
  DesignSystem.getOrCreate()
16830
16830
  .withPrefix('nimble')
@@ -16932,7 +16932,7 @@
16932
16932
  const [tooltipCaptionFont, tooltipCaptionFontColor, tooltipCaptionDisabledFontColor, tooltipCaptionFontFamily, tooltipCaptionFontWeight, tooltipCaptionFontSize, tooltipCaptionFontLineHeight, tooltipCaptionFallbackFontFamily] = createFontTokens(tokenNames.tooltipCaptionFont, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), TooltipCaptionFamily, TooltipCaptionWeight, TooltipCaptionSize, TooltipCaptionLineHeight, TooltipCaptionFallbackFontFamily);
16933
16933
  const [errorTextFont, errorTextFontColor, errorTextDisabledFontColor, errorTextFontFamily, errorTextFontWeight, errorTextFontSize, errorTextFontLineHeight, errorTextFallbackFontFamily] = createFontTokens(tokenNames.errorTextFont, (element) => getFailColorForTheme(element), (element) => hexToRgbaCssColor(getFailColorForTheme(element), 0.3), ErrorLightUiFamily, ErrorLightUiWeight, ErrorLightUiSize, TooltipCaptionLineHeight, ErrorLightUiFallbackFontFamily);
16934
16934
  const [tableHeaderFont, tableHeaderFontColor, tableHeaderDisabledFontColor, tableHeaderFontFamily, tableHeaderFontWeight, tableHeaderFontSize, tableHeaderFontLineHeight, tableHeaderFallbackFontFamily] = createFontTokens(tokenNames.tableHeaderFont, (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.6), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), GridHeaderFamily, GridHeaderWeight, GridHeaderSize, TooltipCaptionLineHeight, GridHeaderFallbackFontFamily);
16935
- const [mentionFont, mentionFontColor, mentionDisabledFontColor, mentionFontFamily, mentionFontWeight, mentionFontSize, mentionFontLineHeight, mentionFallbackFontFamily] = createFontTokens(tokenNames.mentionFont, (element) => getColorForTheme(element, DigitalGreenDark, PowerGreen, PowerGreen), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), BodyFamily, BodyEmphasizedWeight, BodySize, BodyLineHeight, BodyFallbackFontFamily);
16935
+ createFontTokens(tokenNames.mentionFont, (element) => getColorForTheme(element, DigitalGreenDark, PowerGreen, PowerGreen), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), BodyFamily, BodyEmphasizedWeight, BodySize, BodyLineHeight, BodyFallbackFontFamily);
16936
16936
  // Font Transform Tokens
16937
16937
  const groupHeaderTextTransform = DesignToken.create(styleNameFromTokenName(tokenNames.groupHeaderTextTransform)).withDefault('uppercase');
16938
16938
  // Animation Tokens
@@ -17029,7 +17029,7 @@
17029
17029
  }
17030
17030
  }
17031
17031
 
17032
- const styles$X = css `
17032
+ const styles$W = css `
17033
17033
  ${display('inline')}
17034
17034
 
17035
17035
  :host {
@@ -17116,7 +17116,7 @@
17116
17116
  `;
17117
17117
 
17118
17118
  // prettier-ignore
17119
- const template$D = (_context, definition) => html `${
17119
+ const template$C = (_context, definition) => html `${
17120
17120
  /* top-container div is necessary because setting contenteditable directly on the native anchor instead
17121
17121
  leaves it focusable, unlike the behavior you get when the anchor is _within_ a contenteditable element.
17122
17122
  */ ''}<div
@@ -17215,8 +17215,8 @@
17215
17215
  const nimbleAnchor = Anchor.compose({
17216
17216
  baseName: 'anchor',
17217
17217
  baseClass: Anchor$1,
17218
- template: template$D,
17219
- styles: styles$X,
17218
+ template: template$C,
17219
+ styles: styles$W,
17220
17220
  shadowOptions: {
17221
17221
  delegatesFocus: true
17222
17222
  }
@@ -17319,7 +17319,7 @@
17319
17319
  padding: 0;
17320
17320
  `;
17321
17321
 
17322
- const styles$W = css `
17322
+ const styles$V = css `
17323
17323
  @layer base, hover, focusVisible, active, disabled, top;
17324
17324
 
17325
17325
  @layer base {
@@ -17596,8 +17596,8 @@
17596
17596
  }
17597
17597
  `));
17598
17598
 
17599
- const styles$V = css `
17600
- ${styles$W}
17599
+ const styles$U = css `
17600
+ ${styles$V}
17601
17601
  ${buttonAppearanceVariantStyles}
17602
17602
 
17603
17603
  .control {
@@ -17605,7 +17605,7 @@
17605
17605
  }
17606
17606
  `;
17607
17607
 
17608
- const template$C = (context, definition) => html `
17608
+ const template$B = (context, definition) => html `
17609
17609
  <a
17610
17610
  class="control"
17611
17611
  part="control"
@@ -17687,8 +17687,8 @@
17687
17687
  ], AnchorButton.prototype, "disabled", void 0);
17688
17688
  const nimbleAnchorButton = AnchorButton.compose({
17689
17689
  baseName: 'anchor-button',
17690
- template: template$C,
17691
- styles: styles$V,
17690
+ template: template$B,
17691
+ styles: styles$U,
17692
17692
  shadowOptions: {
17693
17693
  delegatesFocus: true
17694
17694
  }
@@ -17696,7 +17696,7 @@
17696
17696
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorButton());
17697
17697
  DesignSystem.tagFor(AnchorButton);
17698
17698
 
17699
- const styles$U = css `
17699
+ const styles$T = css `
17700
17700
  ${display('grid')}
17701
17701
 
17702
17702
  :host {
@@ -17773,7 +17773,7 @@
17773
17773
  }
17774
17774
  `;
17775
17775
 
17776
- const template$B = (context, definition) => html `
17776
+ const template$A = (context, definition) => html `
17777
17777
  <template
17778
17778
  role="menuitem"
17779
17779
  class="${x => (typeof x.startColumnCount === 'number'
@@ -17879,8 +17879,8 @@
17879
17879
  // FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
17880
17880
  const nimbleAnchorMenuItem = AnchorMenuItem.compose({
17881
17881
  baseName: 'anchor-menu-item',
17882
- template: template$B,
17883
- styles: styles$U,
17882
+ template: template$A,
17883
+ styles: styles$T,
17884
17884
  shadowOptions: {
17885
17885
  delegatesFocus: true
17886
17886
  }
@@ -17904,7 +17904,7 @@
17904
17904
  }
17905
17905
  });
17906
17906
 
17907
- const styles$T = css `
17907
+ const styles$S = css `
17908
17908
  ${display('inline-flex')}
17909
17909
 
17910
17910
  :host {
@@ -18020,7 +18020,7 @@
18020
18020
  }
18021
18021
  `;
18022
18022
 
18023
- const template$A = (context, definition) => html `
18023
+ const template$z = (context, definition) => html `
18024
18024
  <template slot="anchortab" role="tab" aria-disabled="${x => x.disabled}">
18025
18025
  <a
18026
18026
  download="${x => x.download}"
@@ -18072,8 +18072,8 @@
18072
18072
  // FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
18073
18073
  const nimbleAnchorTab = AnchorTab.compose({
18074
18074
  baseName: 'anchor-tab',
18075
- template: template$A,
18076
- styles: styles$T,
18075
+ template: template$z,
18076
+ styles: styles$S,
18077
18077
  shadowOptions: {
18078
18078
  delegatesFocus: true
18079
18079
  }
@@ -18081,7 +18081,7 @@
18081
18081
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorTab());
18082
18082
  DesignSystem.tagFor(AnchorTab);
18083
18083
 
18084
- const styles$S = css `
18084
+ const styles$R = css `
18085
18085
  ${display('grid')}
18086
18086
 
18087
18087
  :host {
@@ -18103,7 +18103,7 @@
18103
18103
  }
18104
18104
  `;
18105
18105
 
18106
- const template$z = (context, definition) => html `
18106
+ const template$y = (context, definition) => html `
18107
18107
  ${startSlotTemplate(context, definition)}
18108
18108
  <div ${ref('tablist')} class="tablist" part="tablist" role="tablist">
18109
18109
  <slot name="anchortab" ${slotted('tabs')}></slot>
@@ -18309,8 +18309,8 @@
18309
18309
  applyMixins(AnchorTabs, StartEnd);
18310
18310
  const nimbleAnchorTabs = AnchorTabs.compose({
18311
18311
  baseName: 'anchor-tabs',
18312
- template: template$z,
18313
- styles: styles$S,
18312
+ template: template$y,
18313
+ styles: styles$R,
18314
18314
  shadowOptions: {
18315
18315
  delegatesFocus: false
18316
18316
  }
@@ -18327,7 +18327,7 @@
18327
18327
  -webkit-user-select: none;
18328
18328
  `;
18329
18329
 
18330
- const styles$R = css `
18330
+ const styles$Q = css `
18331
18331
  ${display('block')}
18332
18332
 
18333
18333
  :host {
@@ -18428,7 +18428,7 @@
18428
18428
  }
18429
18429
  `;
18430
18430
 
18431
- const template$y = (context, definition) => html `
18431
+ const template$x = (context, definition) => html `
18432
18432
  <template
18433
18433
  role="treeitem"
18434
18434
  slot="${x => (x.isNestedItem() ? 'item' : null)}"
@@ -18565,8 +18565,8 @@
18565
18565
  // FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
18566
18566
  const nimbleAnchorTreeItem = AnchorTreeItem.compose({
18567
18567
  baseName: 'anchor-tree-item',
18568
- template: template$y,
18569
- styles: styles$R,
18568
+ template: template$x,
18569
+ styles: styles$Q,
18570
18570
  shadowOptions: {
18571
18571
  delegatesFocus: true
18572
18572
  }
@@ -18576,7 +18576,7 @@
18576
18576
  .register(nimbleAnchorTreeItem());
18577
18577
  DesignSystem.tagFor(AnchorTreeItem);
18578
18578
 
18579
- const styles$Q = css `
18579
+ const styles$P = css `
18580
18580
  :host {
18581
18581
  contain: layout;
18582
18582
  display: block;
@@ -18600,7 +18600,7 @@
18600
18600
  baseName: 'anchored-region',
18601
18601
  baseClass: AnchoredRegion$1,
18602
18602
  template: anchoredRegionTemplate,
18603
- styles: styles$Q
18603
+ styles: styles$P
18604
18604
  });
18605
18605
  DesignSystem.getOrCreate()
18606
18606
  .withPrefix('nimble')
@@ -18680,7 +18680,7 @@
18680
18680
  */
18681
18681
  const themeBehavior = (theme, styles) => new ThemeStyleSheetBehavior(theme, styles);
18682
18682
 
18683
- const styles$P = css `
18683
+ const styles$O = css `
18684
18684
  ${display('flex')}
18685
18685
 
18686
18686
  :host {
@@ -18823,8 +18823,8 @@
18823
18823
  }
18824
18824
  `));
18825
18825
 
18826
- const styles$O = css `
18827
- ${styles$W}
18826
+ const styles$N = css `
18827
+ ${styles$V}
18828
18828
  ${buttonAppearanceVariantStyles}
18829
18829
  `;
18830
18830
 
@@ -18870,7 +18870,7 @@
18870
18870
  baseName: 'button',
18871
18871
  baseClass: Button$1,
18872
18872
  template: buttonTemplate,
18873
- styles: styles$O,
18873
+ styles: styles$N,
18874
18874
  shadowOptions: {
18875
18875
  delegatesFocus: true
18876
18876
  }
@@ -19581,13 +19581,13 @@
19581
19581
  };
19582
19582
 
19583
19583
  // Avoiding any whitespace in the template because this is an inline element
19584
- const template$x = html `<div
19584
+ const template$w = html `<div
19585
19585
  class="icon"
19586
19586
  aria-hidden="true"
19587
19587
  :innerHTML=${x => x.icon.data}
19588
19588
  ></div>`;
19589
19589
 
19590
- const styles$N = css `
19590
+ const styles$M = css `
19591
19591
  ${display('inline-flex')}
19592
19592
 
19593
19593
  :host {
@@ -19640,8 +19640,8 @@
19640
19640
  const registerIcon = (baseName, iconClass) => {
19641
19641
  const composedIcon = iconClass.compose({
19642
19642
  baseName,
19643
- template: template$x,
19644
- styles: styles$N,
19643
+ template: template$w,
19644
+ styles: styles$M,
19645
19645
  baseClass: iconClass
19646
19646
  });
19647
19647
  DesignSystem.getOrCreate().withPrefix('nimble').register(composedIcon());
@@ -19745,7 +19745,7 @@
19745
19745
  }).withDefault(coreLabelDefaults.informationIconLabel);
19746
19746
 
19747
19747
  // prettier-ignore
19748
- const template$w = html `
19748
+ const template$v = html `
19749
19749
  <div class="container"
19750
19750
  role="status"
19751
19751
  aria-atomic="${x => x.ariaAtomic}"
@@ -19861,13 +19861,13 @@
19861
19861
  applyMixins(Banner, ARIAGlobalStatesAndProperties);
19862
19862
  const nimbleBanner = Banner.compose({
19863
19863
  baseName: 'banner',
19864
- template: template$w,
19865
- styles: styles$P
19864
+ template: template$v,
19865
+ styles: styles$O
19866
19866
  });
19867
19867
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBanner());
19868
19868
  DesignSystem.tagFor(Banner);
19869
19869
 
19870
- const styles$M = css `
19870
+ const styles$L = css `
19871
19871
  ${display('inline-block')}
19872
19872
 
19873
19873
  :host {
@@ -19908,12 +19908,12 @@
19908
19908
  baseName: 'breadcrumb',
19909
19909
  baseClass: Breadcrumb$1,
19910
19910
  template: breadcrumbTemplate,
19911
- styles: styles$M
19911
+ styles: styles$L
19912
19912
  });
19913
19913
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBreadcrumb());
19914
19914
  DesignSystem.tagFor(Breadcrumb);
19915
19915
 
19916
- const styles$L = css `
19916
+ const styles$K = css `
19917
19917
  ${display('inline-flex')}
19918
19918
 
19919
19919
  :host {
@@ -19987,7 +19987,7 @@
19987
19987
  baseName: 'breadcrumb-item',
19988
19988
  baseClass: BreadcrumbItem$1,
19989
19989
  template: breadcrumbItemTemplate,
19990
- styles: styles$L,
19990
+ styles: styles$K,
19991
19991
  separator: forwardSlash16X16.data
19992
19992
  });
19993
19993
  DesignSystem.getOrCreate()
@@ -19995,7 +19995,7 @@
19995
19995
  .register(nimbleBreadcrumbItem());
19996
19996
  DesignSystem.tagFor(BreadcrumbItem);
19997
19997
 
19998
- const styles$K = css `
19998
+ const styles$J = css `
19999
19999
  ${display('flex')}
20000
20000
 
20001
20001
  :host {
@@ -20019,7 +20019,7 @@
20019
20019
  }
20020
20020
  `;
20021
20021
 
20022
- const template$v = html `
20022
+ const template$u = html `
20023
20023
  ${'' /* Explicitly set role to work around Lighthouse error. See https://github.com/ni/nimble/issues/1650. */}
20024
20024
  <section role="region" aria-labelledby="title-slot">
20025
20025
  <slot name="title" id="title-slot"></slot>
@@ -20035,13 +20035,13 @@
20035
20035
  const nimbleCard = Card.compose({
20036
20036
  baseName: 'card',
20037
20037
  baseClass: Card$1,
20038
- template: template$v,
20039
- styles: styles$K
20038
+ template: template$u,
20039
+ styles: styles$J
20040
20040
  });
20041
20041
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCard());
20042
20042
  DesignSystem.tagFor(Card);
20043
20043
 
20044
- const styles$J = css `
20044
+ const styles$I = css `
20045
20045
  ${display('inline-flex')}
20046
20046
 
20047
20047
  :host {
@@ -20200,7 +20200,7 @@
20200
20200
  const nimbleCardButton = CardButton.compose({
20201
20201
  baseName: 'card-button',
20202
20202
  template: buttonTemplate,
20203
- styles: styles$J,
20203
+ styles: styles$I,
20204
20204
  shadowOptions: {
20205
20205
  delegatesFocus: true
20206
20206
  }
@@ -20208,7 +20208,7 @@
20208
20208
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCardButton());
20209
20209
  DesignSystem.tagFor(CardButton);
20210
20210
 
20211
- const styles$I = css `
20211
+ const styles$H = css `
20212
20212
  ${display('inline-flex')}
20213
20213
 
20214
20214
  :host {
@@ -20326,15 +20326,15 @@
20326
20326
  baseName: 'checkbox',
20327
20327
  baseClass: Checkbox$1,
20328
20328
  template: checkboxTemplate,
20329
- styles: styles$I,
20329
+ styles: styles$H,
20330
20330
  checkedIndicator: check16X16.data,
20331
20331
  indeterminateIndicator: minus16X16.data
20332
20332
  });
20333
20333
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCheckbox());
20334
20334
  const checkboxTag = DesignSystem.tagFor(Checkbox);
20335
20335
 
20336
- const styles$H = css `
20337
- ${styles$W}
20336
+ const styles$G = css `
20337
+ ${styles$V}
20338
20338
 
20339
20339
  @layer base {
20340
20340
  .control[aria-pressed='true'] {
@@ -20413,7 +20413,7 @@
20413
20413
  }
20414
20414
  `;
20415
20415
 
20416
- const template$u = (context, definition) => html `
20416
+ const template$t = (context, definition) => html `
20417
20417
  <div
20418
20418
  role="button"
20419
20419
  part="control"
@@ -20488,8 +20488,8 @@
20488
20488
  applyMixins(ToggleButton, StartEnd, DelegatesARIAButton);
20489
20489
  const nimbleToggleButton = ToggleButton.compose({
20490
20490
  baseName: 'toggle-button',
20491
- template: template$u,
20492
- styles: styles$H,
20491
+ template: template$t,
20492
+ styles: styles$G,
20493
20493
  shadowOptions: {
20494
20494
  delegatesFocus: true
20495
20495
  }
@@ -20526,7 +20526,7 @@
20526
20526
  block: 'block'
20527
20527
  };
20528
20528
 
20529
- const styles$G = css `
20529
+ const styles$F = css `
20530
20530
  ${display('inline-flex')}
20531
20531
 
20532
20532
  :host {
@@ -20752,7 +20752,7 @@
20752
20752
  }
20753
20753
  `));
20754
20754
 
20755
- const styles$F = css `
20755
+ const styles$E = css `
20756
20756
  .error-icon {
20757
20757
  display: none;
20758
20758
  }
@@ -20786,9 +20786,9 @@
20786
20786
  }
20787
20787
  `;
20788
20788
 
20789
- const styles$E = css `
20790
- ${styles$G}
20789
+ const styles$D = css `
20791
20790
  ${styles$F}
20791
+ ${styles$E}
20792
20792
 
20793
20793
  :host {
20794
20794
  --ni-private-hover-bottom-border-width: 2px;
@@ -20924,7 +20924,7 @@
20924
20924
  }
20925
20925
 
20926
20926
  // prettier-ignore
20927
- const template$t = (context, definition) => html `
20927
+ const template$s = (context, definition) => html `
20928
20928
  <template
20929
20929
  aria-disabled="${x => x.ariaDisabled}"
20930
20930
  autocomplete="${x => x.autocomplete}"
@@ -21202,8 +21202,8 @@
21202
21202
  const nimbleCombobox = Combobox.compose({
21203
21203
  baseName: 'combobox',
21204
21204
  baseClass: Combobox$1,
21205
- template: template$t,
21206
- styles: styles$E,
21205
+ template: template$s,
21206
+ styles: styles$D,
21207
21207
  shadowOptions: {
21208
21208
  delegatesFocus: true
21209
21209
  },
@@ -21248,7 +21248,7 @@
21248
21248
  */
21249
21249
  const UserDismissed = Symbol('user dismissed');
21250
21250
 
21251
- const styles$D = css `
21251
+ const styles$C = css `
21252
21252
  ${display('grid')}
21253
21253
 
21254
21254
  dialog {
@@ -21350,7 +21350,7 @@
21350
21350
  }
21351
21351
  `));
21352
21352
 
21353
- const template$s = html `
21353
+ const template$r = html `
21354
21354
  <template>
21355
21355
  <dialog
21356
21356
  ${ref('dialogElement')}
@@ -21477,14 +21477,14 @@
21477
21477
  applyMixins(Dialog, ARIAGlobalStatesAndProperties);
21478
21478
  const nimbleDialog = Dialog.compose({
21479
21479
  baseName: 'dialog',
21480
- template: template$s,
21481
- styles: styles$D,
21480
+ template: template$r,
21481
+ styles: styles$C,
21482
21482
  baseClass: Dialog
21483
21483
  });
21484
21484
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDialog());
21485
21485
  DesignSystem.tagFor(Dialog);
21486
21486
 
21487
- const styles$C = css `
21487
+ const styles$B = css `
21488
21488
  ${display('block')}
21489
21489
 
21490
21490
  :host {
@@ -21637,7 +21637,7 @@
21637
21637
  }
21638
21638
  `));
21639
21639
 
21640
- const template$r = html `
21640
+ const template$q = html `
21641
21641
  <dialog
21642
21642
  ${ref('dialog')}
21643
21643
  aria-label="${x => x.ariaLabel}"
@@ -21751,8 +21751,8 @@
21751
21751
  applyMixins(Drawer, ARIAGlobalStatesAndProperties);
21752
21752
  const nimbleDrawer = Drawer.compose({
21753
21753
  baseName: 'drawer',
21754
- template: template$r,
21755
- styles: styles$C
21754
+ template: template$q,
21755
+ styles: styles$B
21756
21756
  });
21757
21757
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDrawer());
21758
21758
  DesignSystem.tagFor(Drawer);
@@ -24202,7 +24202,7 @@
24202
24202
  .register(nimbleLabelProviderTable());
24203
24203
  DesignSystem.tagFor(LabelProviderTable);
24204
24204
 
24205
- const styles$B = css `
24205
+ const styles$A = css `
24206
24206
  ${display('flex')}
24207
24207
 
24208
24208
  :host {
@@ -24275,7 +24275,7 @@
24275
24275
  * @public
24276
24276
  */
24277
24277
  // prettier-ignore
24278
- const template$q = (context, definition) => html `
24278
+ const template$p = (context, definition) => html `
24279
24279
  <template
24280
24280
  aria-checked="${x => x.ariaChecked}"
24281
24281
  aria-disabled="${x => x.ariaDisabled}"
@@ -24323,8 +24323,8 @@
24323
24323
  const nimbleListOption = ListOption.compose({
24324
24324
  baseName: 'list-option',
24325
24325
  baseClass: ListboxOption,
24326
- template: template$q,
24327
- styles: styles$B
24326
+ template: template$p,
24327
+ styles: styles$A
24328
24328
  });
24329
24329
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleListOption());
24330
24330
  const listOptionTag = DesignSystem.tagFor(ListOption);
@@ -24338,7 +24338,7 @@
24338
24338
  attr()
24339
24339
  ], Mapping$1.prototype, "key", void 0);
24340
24340
 
24341
- const template$p = html `<template slot="mapping"></template>`;
24341
+ const template$o = html `<template slot="mapping"></template>`;
24342
24342
 
24343
24343
  /**
24344
24344
  * Defines a mapping from one data value ('key' property) to display text ('text' property).
@@ -24352,7 +24352,7 @@
24352
24352
  ], MappingText.prototype, "text", void 0);
24353
24353
  const textMapping = MappingText.compose({
24354
24354
  baseName: 'mapping-text',
24355
- template: template$p
24355
+ template: template$o
24356
24356
  });
24357
24357
  DesignSystem.getOrCreate().withPrefix('nimble').register(textMapping());
24358
24358
  DesignSystem.tagFor(MappingText);
@@ -24416,7 +24416,7 @@
24416
24416
  ], MappingIcon.prototype, "resolvedIcon", void 0);
24417
24417
  const iconMapping = MappingIcon.compose({
24418
24418
  baseName: 'mapping-icon',
24419
- template: template$p
24419
+ template: template$o
24420
24420
  });
24421
24421
  DesignSystem.getOrCreate().withPrefix('nimble').register(iconMapping());
24422
24422
  DesignSystem.tagFor(MappingIcon);
@@ -24433,12 +24433,12 @@
24433
24433
  ], MappingSpinner.prototype, "text", void 0);
24434
24434
  const spinnerMapping = MappingSpinner.compose({
24435
24435
  baseName: 'mapping-spinner',
24436
- template: template$p
24436
+ template: template$o
24437
24437
  });
24438
24438
  DesignSystem.getOrCreate().withPrefix('nimble').register(spinnerMapping());
24439
24439
  DesignSystem.tagFor(MappingSpinner);
24440
24440
 
24441
- const styles$A = css `
24441
+ const styles$z = css `
24442
24442
  ${display('grid')}
24443
24443
 
24444
24444
  :host {
@@ -24505,12 +24505,12 @@
24505
24505
  baseName: 'menu',
24506
24506
  baseClass: Menu$1,
24507
24507
  template: menuTemplate,
24508
- styles: styles$A
24508
+ styles: styles$z
24509
24509
  });
24510
24510
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenu());
24511
24511
  DesignSystem.tagFor(Menu);
24512
24512
 
24513
- const styles$z = css `
24513
+ const styles$y = css `
24514
24514
  ${display('inline-block')}
24515
24515
 
24516
24516
  :host {
@@ -24529,7 +24529,7 @@
24529
24529
  `;
24530
24530
 
24531
24531
  // prettier-ignore
24532
- const template$o = html `
24532
+ const template$n = html `
24533
24533
  <template
24534
24534
  ?open="${x => x.open}"
24535
24535
  @focusout="${(x, c) => x.focusoutHandler(c.event)}"
@@ -24784,8 +24784,8 @@
24784
24784
  ], MenuButton.prototype, "slottedMenus", void 0);
24785
24785
  const nimbleMenuButton = MenuButton.compose({
24786
24786
  baseName: 'menu-button',
24787
- template: template$o,
24788
- styles: styles$z,
24787
+ template: template$n,
24788
+ styles: styles$y,
24789
24789
  shadowOptions: {
24790
24790
  delegatesFocus: true
24791
24791
  }
@@ -24793,7 +24793,7 @@
24793
24793
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenuButton());
24794
24794
  const menuButtonTag = DesignSystem.tagFor(MenuButton);
24795
24795
 
24796
- const styles$y = css `
24796
+ const styles$x = css `
24797
24797
  ${display('grid')}
24798
24798
 
24799
24799
  :host {
@@ -24891,7 +24891,7 @@
24891
24891
  baseName: 'menu-item',
24892
24892
  baseClass: MenuItem$1,
24893
24893
  template: menuItemTemplate,
24894
- styles: styles$y,
24894
+ styles: styles$x,
24895
24895
  expandCollapseGlyph: arrowExpanderRight16X16.data
24896
24896
  });
24897
24897
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenuItem());
@@ -24906,9 +24906,9 @@
24906
24906
  block: 'block'
24907
24907
  };
24908
24908
 
24909
- const styles$x = css `
24909
+ const styles$w = css `
24910
24910
  ${display('inline-block')}
24911
- ${styles$F}
24911
+ ${styles$E}
24912
24912
 
24913
24913
  :host {
24914
24914
  font: ${bodyFont};
@@ -25122,7 +25122,7 @@
25122
25122
  baseName: 'number-field',
25123
25123
  baseClass: NumberField$1,
25124
25124
  template: numberFieldTemplate,
25125
- styles: styles$x,
25125
+ styles: styles$w,
25126
25126
  shadowOptions: {
25127
25127
  delegatesFocus: true
25128
25128
  },
@@ -25166,7 +25166,7 @@
25166
25166
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleNumberField());
25167
25167
  DesignSystem.tagFor(NumberField);
25168
25168
 
25169
- const styles$w = css `
25169
+ const styles$v = css `
25170
25170
  ${display('inline-flex')}
25171
25171
 
25172
25172
  :host {
@@ -25267,13 +25267,13 @@
25267
25267
  baseName: 'radio',
25268
25268
  baseClass: Radio$1,
25269
25269
  template: radioTemplate,
25270
- styles: styles$w,
25270
+ styles: styles$v,
25271
25271
  checkedIndicator: circleFilled16X16.data
25272
25272
  });
25273
25273
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleRadio());
25274
25274
  DesignSystem.tagFor(Radio);
25275
25275
 
25276
- const styles$v = css `
25276
+ const styles$u = css `
25277
25277
  ${display('inline-block')}
25278
25278
 
25279
25279
  .positioning-region {
@@ -25308,7 +25308,7 @@
25308
25308
  baseName: 'radio-group',
25309
25309
  baseClass: RadioGroup$1,
25310
25310
  template: radioGroupTemplate,
25311
- styles: styles$v,
25311
+ styles: styles$u,
25312
25312
  shadowOptions: {
25313
25313
  delegatesFocus: true
25314
25314
  }
@@ -42215,7 +42215,7 @@ img.ProseMirror-separator {
42215
42215
  },
42216
42216
  });
42217
42217
 
42218
- const styles$u = css `
42218
+ const styles$t = css `
42219
42219
  .positioning-region {
42220
42220
  display: flex;
42221
42221
  padding: ${smallPadding} ${standardPadding};
@@ -42250,7 +42250,7 @@ img.ProseMirror-separator {
42250
42250
  baseName: 'toolbar',
42251
42251
  baseClass: Toolbar$1,
42252
42252
  template: toolbarTemplate,
42253
- styles: styles$u,
42253
+ styles: styles$t,
42254
42254
  shadowOptions: {
42255
42255
  delegatesFocus: true
42256
42256
  }
@@ -42282,8 +42282,8 @@ img.ProseMirror-separator {
42282
42282
  cssCustomPropertyName: null
42283
42283
  }).withDefault(richTextLabelDefaults.richTextToggleNumberedListLabel);
42284
42284
 
42285
- const styles$t = css `
42286
- ${styles$G}
42285
+ const styles$s = css `
42286
+ ${styles$F}
42287
42287
 
42288
42288
  :host {
42289
42289
  height: auto;
@@ -42300,7 +42300,7 @@ img.ProseMirror-separator {
42300
42300
  }
42301
42301
  `;
42302
42302
 
42303
- const styles$s = css `
42303
+ const styles$r = css `
42304
42304
  ${display('inline-flex')}
42305
42305
 
42306
42306
  :host {
@@ -42332,13 +42332,13 @@ img.ProseMirror-separator {
42332
42332
  const nimbleListbox = Listbox.compose({
42333
42333
  baseName: 'listbox',
42334
42334
  template: listboxTemplate,
42335
- styles: styles$s
42335
+ styles: styles$r
42336
42336
  });
42337
42337
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleListbox());
42338
42338
  DesignSystem.tagFor(Listbox);
42339
42339
 
42340
42340
  // prettier-ignore
42341
- const template$n = html `
42341
+ const template$m = html `
42342
42342
  <template>
42343
42343
  <${anchoredRegionTag}
42344
42344
  ${ref('region')}
@@ -42599,8 +42599,8 @@ img.ProseMirror-separator {
42599
42599
  ], RichTextMentionListbox.prototype, "anchorElement", void 0);
42600
42600
  const nimbleRichTextMentionListbox = RichTextMentionListbox.compose({
42601
42601
  baseName: 'rich-text-mention-listbox',
42602
- template: template$n,
42603
- styles: styles$t
42602
+ template: template$m,
42603
+ styles: styles$s
42604
42604
  });
42605
42605
  DesignSystem.getOrCreate()
42606
42606
  .withPrefix('nimble')
@@ -42608,7 +42608,7 @@ img.ProseMirror-separator {
42608
42608
  const richTextMentionListboxTag = DesignSystem.tagFor(RichTextMentionListbox);
42609
42609
 
42610
42610
  // prettier-ignore
42611
- const template$m = html `
42611
+ const template$l = html `
42612
42612
  <template
42613
42613
  ${children$1({ property: 'childItems', filter: elements() })}
42614
42614
  @focusout="${x => x.focusoutHandler()}"
@@ -42710,94 +42710,9 @@ img.ProseMirror-separator {
42710
42710
  </template>
42711
42711
  `;
42712
42712
 
42713
- /**
42714
- * The base class for Mention View Node
42715
- */
42716
- class RichTextMentionView extends FoundationElement {
42717
- constructor() {
42718
- super(...arguments);
42719
- /**
42720
- * Whether to render the mention node in view mode or in edit mode
42721
- *
42722
- * @public
42723
- * HTML Attribute: disable-editing
42724
- */
42725
- this.disableEditing = false;
42726
- }
42727
- }
42728
- __decorate$1([
42729
- attr({ attribute: 'mention-href' })
42730
- ], RichTextMentionView.prototype, "mentionHref", void 0);
42731
- __decorate$1([
42732
- attr({ attribute: 'mention-label' })
42733
- ], RichTextMentionView.prototype, "mentionLabel", void 0);
42734
- __decorate$1([
42735
- attr({ mode: 'boolean', attribute: 'disable-editing' })
42736
- ], RichTextMentionView.prototype, "disableEditing", void 0);
42737
-
42738
- // Setting `contenteditable="true"` on the slot serves as a workaround to address the issue in the Chrome browser
42739
- // that arises when the mention user view is activated at the end of a line in the rich text editor while in edit mode.
42740
- // This can be removed when the below issue is resolved
42741
- // See: https://github.com/ni/nimble/issues/1659
42742
- const template$l = html `<span class="control"
42743
- >@${x => x.mentionLabel}</span
42744
- ><slot contenteditable="true"></slot>`;
42745
-
42746
- const styles$r = css `
42747
- ${display('inline-block')}
42748
-
42749
- :host {
42750
- box-sizing: border-box;
42751
- font: ${bodyFont};
42752
- color: ${bodyFontColor};
42753
- white-space: pre-wrap;
42754
- }
42755
-
42756
- .control {
42757
- font: ${mentionFont};
42758
- color: var(--ni-nimble-private-mention-font-color);
42759
- display: none;
42760
- }
42761
-
42762
- :host([disable-editing]) .control {
42763
- display: inline;
42764
- }
42765
-
42766
- :host([disabled]) .control {
42767
- color: ${mentionDisabledFontColor};
42768
- }
42769
-
42770
- :host([disabled]) {
42771
- color: ${bodyDisabledFontColor};
42772
- }
42773
-
42774
- :host([disable-editing]) {
42775
- font: ${mentionFont};
42776
- }
42777
-
42778
- :host([disable-editing]) slot {
42779
- display: none;
42780
- }
42781
- `;
42782
-
42783
- /**
42784
- * A nimble styled rich text mention users view
42785
- */
42786
- class RichTextMentionUsersView extends RichTextMentionView {
42787
- }
42788
- const nimbleRichTextMentionUsersView = RichTextMentionUsersView.compose({
42789
- baseName: 'rich-text-mention-users-view',
42790
- template: template$l,
42791
- styles: styles$r
42792
- });
42793
- DesignSystem.getOrCreate()
42794
- .withPrefix('nimble')
42795
- .register(nimbleRichTextMentionUsersView());
42796
- const richTextMentionUsersViewTag = DesignSystem.tagFor(RichTextMentionUsersView);
42797
-
42798
42713
  const styles$q = css `
42799
42714
  ${display('inline-flex')}
42800
- ${styles$F}
42715
+ ${styles$E}
42801
42716
 
42802
42717
  :host {
42803
42718
  font: ${bodyFont};
@@ -42807,7 +42722,6 @@ img.ProseMirror-separator {
42807
42722
  --ni-private-rich-text-editor-hover-indicator-width: calc(
42808
42723
  ${borderWidth} + 1px
42809
42724
  );
42810
- --ni-nimble-private-mention-font-color: ${mentionFontColor};
42811
42725
 
42812
42726
  ${
42813
42727
  /** Initial height of rich text editor with one line space when the footer is visible. */ ''}
@@ -42854,11 +42768,6 @@ img.ProseMirror-separator {
42854
42768
  :host([disabled]) .container {
42855
42769
  color: ${bodyDisabledFontColor};
42856
42770
  border: ${borderWidth} solid rgba(${borderRgbPartialColor}, 0.1);
42857
- --ni-nimble-private-mention-font-color: ${mentionDisabledFontColor};
42858
- }
42859
-
42860
- :host([disabled]) ${richTextMentionUsersViewTag} {
42861
- color: ${bodyDisabledFontColor};
42862
42771
  }
42863
42772
 
42864
42773
  :host([error-visible]) .container {
@@ -56433,6 +56342,15 @@ img.ProseMirror-separator {
56433
56342
  'mention-label': attributes.label
56434
56343
  };
56435
56344
  }
56345
+ },
56346
+ disabled: {
56347
+ default: null,
56348
+ parseHTML: element => element.getAttribute('disabled'),
56349
+ renderHTML: attributes => {
56350
+ return {
56351
+ disabled: attributes.disabled
56352
+ };
56353
+ }
56436
56354
  }
56437
56355
  };
56438
56356
  },
@@ -56452,7 +56370,13 @@ img.ProseMirror-separator {
56452
56370
  }).configure({
56453
56371
  suggestion: {
56454
56372
  char: config.character,
56455
- decorationTag: config.viewElement,
56373
+ /**
56374
+ * When rendering the view element as a decoration tag for suggestions,
56375
+ * it leads to the deletion of the entire suggested word in Safari when pressing backspace.
56376
+ * See: https://github.com/ni/nimble/issues/1716
56377
+ * When addressed, re-enable the view element as follows:
56378
+ * decorationTag: config.viewElement,
56379
+ */
56456
56380
  pluginKey: new PluginKey(config.key),
56457
56381
  allowSpaces: true,
56458
56382
  render: () => {
@@ -56667,6 +56591,7 @@ img.ProseMirror-separator {
56667
56591
  */
56668
56592
  disabledChanged() {
56669
56593
  this.disableEditor();
56594
+ this.disableMentionViewElement();
56670
56595
  }
56671
56596
  /**
56672
56597
  * Update the placeholder text and view of the editor.
@@ -56801,6 +56726,7 @@ img.ProseMirror-separator {
56801
56726
  setMarkdown(markdown) {
56802
56727
  const html = this.getHtmlContent(markdown);
56803
56728
  this.tiptapEditor.commands.setContent(html);
56729
+ this.disableMentionViewElement();
56804
56730
  }
56805
56731
  /**
56806
56732
  * This function returns markdown string by serializing tiptap editor document using prosemirror MarkdownSerializer
@@ -56902,6 +56828,7 @@ img.ProseMirror-separator {
56902
56828
  ? this.configuration.mentionExtensionConfig
56903
56829
  : [], this.mentionListbox, this.placeholder);
56904
56830
  this.disableEditor();
56831
+ this.disableMentionViewElement();
56905
56832
  this.bindEditorTransactionEvent();
56906
56833
  this.bindEditorUpdateEvent();
56907
56834
  this.stopNativeInputEventPropagation();
@@ -56968,6 +56895,20 @@ img.ProseMirror-separator {
56968
56895
  this.editor.setAttribute('aria-disabled', this.disabled ? 'true' : 'false');
56969
56896
  this.mentionListbox?.close();
56970
56897
  }
56898
+ disableMentionViewElement() {
56899
+ this.tiptapEditor.state.doc.descendants((node, pos) => {
56900
+ if (node.type.name.startsWith(mentionPluginPrefix)) {
56901
+ const updatedAttrs = {
56902
+ ...node.attrs,
56903
+ disabled: this.disabled ? '' : null
56904
+ };
56905
+ const updatedNode = this.tiptapEditor.schema.node(node.type.name, updatedAttrs, node.content);
56906
+ const updatedTransaction = this.tiptapEditor.state.tr.replaceWith(pos, pos + node.nodeSize, updatedNode);
56907
+ this.tiptapEditor.view.dispatch(updatedTransaction);
56908
+ }
56909
+ return true;
56910
+ });
56911
+ }
56971
56912
  /**
56972
56913
  * Stopping the native input event propagation emitted by the contenteditable element in the Tiptap
56973
56914
  * since there is an issue (linked below) in ProseMirror where selecting the text and removing it
@@ -57078,7 +57019,7 @@ img.ProseMirror-separator {
57078
57019
  applyMixins(RichTextEditor, ARIAGlobalStatesAndProperties);
57079
57020
  const nimbleRichTextEditor = RichTextEditor.compose({
57080
57021
  baseName: 'rich-text-editor',
57081
- template: template$m,
57022
+ template: template$l,
57082
57023
  styles: styles$q,
57083
57024
  shadowOptions: {
57084
57025
  delegatesFocus: true
@@ -57105,7 +57046,6 @@ img.ProseMirror-separator {
57105
57046
  width: auto;
57106
57047
  overflow: auto;
57107
57048
  height: 100%;
57108
- --ni-nimble-private-mention-font-color: ${mentionFontColor};
57109
57049
  }
57110
57050
 
57111
57051
  .viewer {
@@ -57214,8 +57154,8 @@ img.ProseMirror-separator {
57214
57154
  DesignSystem.tagFor(RichTextViewer);
57215
57155
 
57216
57156
  const styles$o = css `
57217
- ${styles$G}
57218
57157
  ${styles$F}
57158
+ ${styles$E}
57219
57159
 
57220
57160
  ${
57221
57161
  /* We are using flex `order` to define the visual ordering of the selected value,
@@ -67309,7 +67249,7 @@ img.ProseMirror-separator {
67309
67249
 
67310
67250
  const styles$5 = css `
67311
67251
  ${display('inline-flex')}
67312
- ${styles$F}
67252
+ ${styles$E}
67313
67253
 
67314
67254
  :host {
67315
67255
  font: ${bodyFont};
@@ -67655,7 +67595,7 @@ img.ProseMirror-separator {
67655
67595
 
67656
67596
  const styles$4 = css `
67657
67597
  ${display('inline-block')}
67658
- ${styles$F}
67598
+ ${styles$E}
67659
67599
 
67660
67600
  :host {
67661
67601
  font: ${bodyFont};