@ni/nimble-components 17.0.8 → 17.2.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.
Files changed (44) hide show
  1. package/dist/all-components-bundle.js +455 -162
  2. package/dist/all-components-bundle.js.map +1 -1
  3. package/dist/all-components-bundle.min.js +1529 -1438
  4. package/dist/all-components-bundle.min.js.map +1 -1
  5. package/dist/esm/all-components.d.ts +2 -0
  6. package/dist/esm/all-components.js +2 -0
  7. package/dist/esm/all-components.js.map +1 -1
  8. package/dist/esm/anchor-tab/index.d.ts +20 -0
  9. package/dist/esm/anchor-tab/index.js +31 -0
  10. package/dist/esm/anchor-tab/index.js.map +1 -0
  11. package/dist/esm/{tab → anchor-tab}/styles.d.ts +0 -0
  12. package/dist/esm/anchor-tab/styles.js +13 -0
  13. package/dist/esm/anchor-tab/styles.js.map +1 -0
  14. package/dist/esm/anchor-tab/template.d.ts +4 -0
  15. package/dist/esm/anchor-tab/template.js +19 -0
  16. package/dist/esm/anchor-tab/template.js.map +1 -0
  17. package/dist/esm/anchor-tabs/index.d.ts +58 -0
  18. package/dist/esm/anchor-tabs/index.js +214 -0
  19. package/dist/esm/anchor-tabs/index.js.map +1 -0
  20. package/dist/esm/anchor-tabs/styles.d.ts +1 -0
  21. package/dist/esm/anchor-tabs/styles.js +20 -0
  22. package/dist/esm/anchor-tabs/styles.js.map +1 -0
  23. package/dist/esm/anchor-tabs/template.d.ts +4 -0
  24. package/dist/esm/anchor-tabs/template.js +10 -0
  25. package/dist/esm/anchor-tabs/template.js.map +1 -0
  26. package/dist/esm/patterns/tab/styles.d.ts +1 -0
  27. package/dist/esm/{tab → patterns/tab}/styles.js +17 -7
  28. package/dist/esm/patterns/tab/styles.js.map +1 -0
  29. package/dist/esm/spinner/styles.js +3 -2
  30. package/dist/esm/spinner/styles.js.map +1 -1
  31. package/dist/esm/tab/index.js +1 -1
  32. package/dist/esm/tab/index.js.map +1 -1
  33. package/dist/esm/theme-provider/design-token-comments.js +3 -0
  34. package/dist/esm/theme-provider/design-token-comments.js.map +1 -1
  35. package/dist/esm/theme-provider/design-token-names.d.ts +1 -0
  36. package/dist/esm/theme-provider/design-token-names.js +4 -0
  37. package/dist/esm/theme-provider/design-token-names.js.map +1 -1
  38. package/dist/esm/theme-provider/design-tokens.d.ts +3 -0
  39. package/dist/esm/theme-provider/design-tokens.js +3 -0
  40. package/dist/esm/theme-provider/design-tokens.js.map +1 -1
  41. package/dist/tokens-internal.scss +18 -0
  42. package/dist/tokens.scss +9 -0
  43. package/package.json +1 -1
  44. package/dist/esm/tab/styles.js.map +0 -1
@@ -15541,6 +15541,9 @@
15541
15541
  iconSize: 'icon-size',
15542
15542
  groupHeaderTextTransform: 'group-header-text-transform',
15543
15543
  drawerWidth: 'drawer-width',
15544
+ spinnerSmallHeight: 'spinner-small-height',
15545
+ spinnerMediumHeight: 'spinner-medium-height',
15546
+ spinnerLargeHeight: 'spinner-large-height',
15544
15547
  smallDelay: 'small-delay',
15545
15548
  mediumDelay: 'medium-delay',
15546
15549
  largeDelay: 'large-delay',
@@ -15713,9 +15716,9 @@
15713
15716
  const prefix = 'ni-nimble';
15714
15717
  const styleNameFromTokenName = (tokenName) => `${prefix}-${tokenName}`;
15715
15718
 
15716
- const template$h = html `<slot></slot>`;
15719
+ const template$j = html `<slot></slot>`;
15717
15720
 
15718
- const styles$G = css `
15721
+ const styles$I = css `
15719
15722
  :host {
15720
15723
  display: contents;
15721
15724
  }
@@ -15771,8 +15774,8 @@
15771
15774
  ], ThemeProvider.prototype, "theme", void 0);
15772
15775
  const nimbleDesignSystemProvider = ThemeProvider.compose({
15773
15776
  baseName: 'theme-provider',
15774
- styles: styles$G,
15775
- template: template$h
15777
+ styles: styles$I,
15778
+ template: template$j
15776
15779
  });
15777
15780
  DesignSystem.getOrCreate()
15778
15781
  .withPrefix('nimble')
@@ -15810,6 +15813,9 @@
15810
15813
  const borderWidth = DesignToken.create(styleNameFromTokenName(tokenNames.borderWidth)).withDefault('1px');
15811
15814
  const iconSize = DesignToken.create(styleNameFromTokenName(tokenNames.iconSize)).withDefault('16px');
15812
15815
  const drawerWidth = DesignToken.create(styleNameFromTokenName(tokenNames.drawerWidth)).withDefault('784px');
15816
+ const spinnerSmallHeight = DesignToken.create(styleNameFromTokenName(tokenNames.spinnerSmallHeight)).withDefault('16px');
15817
+ DesignToken.create(styleNameFromTokenName(tokenNames.spinnerMediumHeight)).withDefault('32px');
15818
+ DesignToken.create(styleNameFromTokenName(tokenNames.spinnerLargeHeight)).withDefault('64px');
15813
15819
  // Drop Shadow Tokens
15814
15820
  DesignToken.create(styleNameFromTokenName(tokenNames.elevation1BoxShadow)).withDefault((element) => `0px 1px 4px ${hexToRgbaCssColor(getColorForTheme(element, Black, Black, Black), 0.16)}`);
15815
15821
  const elevation2BoxShadow = DesignToken.create(styleNameFromTokenName(tokenNames.elevation2BoxShadow)).withDefault((element) => `0px 2px 4px ${hexToRgbaCssColor(getColorForTheme(element, Black, Black, Black), 0.16)}`);
@@ -15931,7 +15937,7 @@
15931
15937
  }
15932
15938
  }
15933
15939
 
15934
- const styles$F = css `
15940
+ const styles$H = css `
15935
15941
  ${display('inline')}
15936
15942
 
15937
15943
  :host {
@@ -16014,7 +16020,7 @@
16014
16020
  `;
16015
16021
 
16016
16022
  // prettier-ignore
16017
- const template$g = (context, definition) => html `
16023
+ const template$i = (context, definition) => html `
16018
16024
  <a
16019
16025
  class="control"
16020
16026
  part="control"
@@ -16087,8 +16093,8 @@
16087
16093
  const nimbleAnchor = Anchor.compose({
16088
16094
  baseName: 'anchor',
16089
16095
  baseClass: Anchor$1,
16090
- template: template$g,
16091
- styles: styles$F,
16096
+ template: template$i,
16097
+ styles: styles$H,
16092
16098
  shadowOptions: {
16093
16099
  delegatesFocus: true
16094
16100
  }
@@ -16173,7 +16179,7 @@
16173
16179
  return new MultivaluePropertyStyleSheetBehavior('appearance', value, styles);
16174
16180
  }
16175
16181
 
16176
- const styles$E = css `
16182
+ const styles$G = css `
16177
16183
  ${display('inline-flex')}
16178
16184
 
16179
16185
  :host {
@@ -16454,8 +16460,8 @@
16454
16460
  }
16455
16461
  `));
16456
16462
 
16457
- const styles$D = css `
16458
- ${styles$E}
16463
+ const styles$F = css `
16464
+ ${styles$G}
16459
16465
  ${buttonAppearanceVariantStyles}
16460
16466
 
16461
16467
  .control {
@@ -16463,7 +16469,7 @@
16463
16469
  }
16464
16470
  `;
16465
16471
 
16466
- const template$f = (context, definition) => html `
16472
+ const template$h = (context, definition) => html `
16467
16473
  <a
16468
16474
  class="control"
16469
16475
  part="control"
@@ -16545,15 +16551,398 @@
16545
16551
  ], AnchorButton.prototype, "disabled", void 0);
16546
16552
  const nimbleAnchorButton = AnchorButton.compose({
16547
16553
  baseName: 'anchor-button',
16548
- template: template$f,
16549
- styles: styles$D,
16554
+ template: template$h,
16555
+ styles: styles$F,
16550
16556
  shadowOptions: {
16551
16557
  delegatesFocus: true
16552
16558
  }
16553
16559
  });
16554
16560
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorButton());
16555
16561
 
16562
+ const styles$E = css `
16563
+ ${display('inline-flex')}
16564
+
16565
+ :host {
16566
+ position: relative;
16567
+ box-sizing: border-box;
16568
+ font: ${bodyFont};
16569
+ height: ${controlHeight};
16570
+ color: ${bodyFontColor};
16571
+ align-items: center;
16572
+ justify-content: center;
16573
+ cursor: pointer;
16574
+ --ni-private-active-indicator-width: 2px;
16575
+ --ni-private-focus-indicator-width: 1px;
16576
+ --ni-private-indicator-lines-gap: 1px;
16577
+ --ni-private-focus-indicator-inset-width: 3px;
16578
+ }
16579
+
16580
+ :host(:hover) {
16581
+ background-color: ${fillHoverColor};
16582
+ }
16583
+
16584
+ :host(:hover[aria-selected='true']) {
16585
+ background-color: ${fillHoverSelectedColor};
16586
+ }
16587
+
16588
+ :host(:focus) {
16589
+ outline: none;
16590
+ }
16591
+
16592
+ :host(${focusVisible}) {
16593
+ outline: none;
16594
+ }
16595
+
16596
+ :host(:active) {
16597
+ background: none;
16598
+ }
16599
+
16600
+ :host([disabled]) {
16601
+ cursor: default;
16602
+ color: ${bodyDisabledFontColor};
16603
+ background: none;
16604
+ }
16605
+
16606
+ slot:not([name]) {
16607
+ display: block;
16608
+ padding: calc(${standardPadding} / 2) ${standardPadding}
16609
+ calc(${standardPadding} / 2 - ${borderWidth});
16610
+ }
16611
+
16612
+ :host::before {
16613
+ content: '';
16614
+ position: absolute;
16615
+ bottom: calc(
16616
+ var(--ni-private-active-indicator-width) +
16617
+ var(--ni-private-indicator-lines-gap)
16618
+ );
16619
+ width: 0px;
16620
+ height: 0px;
16621
+ border-bottom: ${borderHoverColor}
16622
+ var(--ni-private-focus-indicator-width) solid;
16623
+ transition: width ${smallDelay} ease-in;
16624
+ }
16625
+
16626
+ @media (prefers-reduced-motion) {
16627
+ :host::before {
16628
+ transition-duration: 0.01s;
16629
+ }
16630
+ }
16631
+
16632
+ :host(${focusVisible})::before {
16633
+ width: calc(100% - 2 * var(--ni-private-focus-indicator-inset-width));
16634
+ }
16635
+
16636
+ :host::after {
16637
+ content: '';
16638
+ position: absolute;
16639
+ bottom: 0px;
16640
+ width: 0px;
16641
+ height: 0px;
16642
+ border-bottom: ${borderHoverColor}
16643
+ var(--ni-private-active-indicator-width) solid;
16644
+ transition: width ${smallDelay} ease-in;
16645
+ }
16646
+
16647
+ @media (prefers-reduced-motion) {
16648
+ :host::after {
16649
+ transition-duration: 0.01s;
16650
+ }
16651
+ }
16652
+
16653
+ :host(${focusVisible})::after {
16654
+ width: 100%;
16655
+ border-bottom-width: var(--ni-private-focus-indicator-width);
16656
+ }
16657
+
16658
+ :host([aria-selected='true'])::after {
16659
+ width: 100%;
16660
+ border-bottom-width: var(--ni-private-active-indicator-width);
16661
+ }
16662
+
16663
+ :host([aria-selected='true'][disabled])::after {
16664
+ border-bottom-color: rgba(${borderHoverColor}, 0.3);
16665
+ }
16666
+ `;
16667
+
16668
+ const styles$D = css `
16669
+ ${styles$E}
16670
+
16671
+ a {
16672
+ text-decoration: none;
16673
+ color: inherit;
16674
+ cursor: inherit;
16675
+ outline: none;
16676
+ }
16677
+ `;
16678
+
16679
+ const template$g = () => html `
16680
+ <template slot="anchortab" role="tab" aria-disabled="${x => x.disabled}">
16681
+ <a
16682
+ download="${x => x.download}"
16683
+ href=${x => (x.disabled ? null : x.href)}
16684
+ hreflang="${x => x.hreflang}"
16685
+ ping="${x => x.ping}"
16686
+ referrerpolicy="${x => x.referrerpolicy}"
16687
+ rel="${x => x.rel}"
16688
+ target="${x => x.target}"
16689
+ type="${x => x.type}"
16690
+ tabindex="-1"
16691
+ >
16692
+ <slot></slot>
16693
+ </a>
16694
+ </template>
16695
+ `;
16696
+
16697
+ /**
16698
+ * A nimble-styled link tab
16699
+ */
16700
+ class AnchorTab extends AnchorBase {
16701
+ constructor() {
16702
+ super(...arguments);
16703
+ /**
16704
+ * When true, the control will be immutable by user interaction. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled | disabled HTML attribute} for more information.
16705
+ * @public
16706
+ * @remarks
16707
+ * HTML Attribute: disabled
16708
+ */
16709
+ this.disabled = false;
16710
+ }
16711
+ }
16712
+ __decorate$1([
16713
+ attr({ mode: 'boolean' })
16714
+ ], AnchorTab.prototype, "disabled", void 0);
16715
+ const nimbleAnchorTab = AnchorTab.compose({
16716
+ baseName: 'anchor-tab',
16717
+ template: template$g,
16718
+ styles: styles$D
16719
+ });
16720
+ DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorTab());
16721
+
16556
16722
  const styles$C = css `
16723
+ ${display('grid')}
16724
+
16725
+ :host {
16726
+ box-sizing: border-box;
16727
+ grid-template-columns: auto auto 1fr;
16728
+ grid-template-rows: auto 1fr;
16729
+ }
16730
+
16731
+ .tablist {
16732
+ display: grid;
16733
+ grid-template-rows: auto auto;
16734
+ grid-template-columns: auto;
16735
+ width: max-content;
16736
+ align-self: end;
16737
+ }
16738
+ `;
16739
+
16740
+ const template$f = (context, definition) => html `
16741
+ ${startSlotTemplate(context, definition)}
16742
+ <div ${ref('tablist')} class="tablist" part="tablist" role="tablist">
16743
+ <slot name="anchortab" ${slotted('tabs')}></slot>
16744
+ </div>
16745
+ ${endSlotTemplate(context, definition)}
16746
+ `;
16747
+
16748
+ /**
16749
+ * A nimble-styled set of anchor tabs
16750
+ */
16751
+ class AnchorTabs extends FoundationElement {
16752
+ constructor() {
16753
+ super(...arguments);
16754
+ this.tabIds = [];
16755
+ this.isDisabledElement = (el) => {
16756
+ return el.getAttribute('aria-disabled') === 'true';
16757
+ };
16758
+ this.isFocusableElement = (el) => {
16759
+ return !this.isDisabledElement(el);
16760
+ };
16761
+ this.setTabs = () => {
16762
+ const gridHorizontalProperty = 'gridColumn';
16763
+ const gridVerticalProperty = 'gridRow';
16764
+ this.activetab = undefined;
16765
+ let firstFocusableTab;
16766
+ this.tabs.forEach((tab, index) => {
16767
+ const tabId = this.tabIds[index];
16768
+ const isActiveTab = this.activeid === tabId;
16769
+ if (!firstFocusableTab && this.isFocusableElement(tab)) {
16770
+ firstFocusableTab = tab;
16771
+ }
16772
+ const isTabStop = this.activeid === tabId && this.isFocusableElement(tab);
16773
+ tab.setAttribute('id', tabId);
16774
+ tab.setAttribute('aria-selected', isActiveTab ? 'true' : 'false');
16775
+ tab.removeEventListener('click', this.handleTabClick);
16776
+ tab.addEventListener('click', this.handleTabClick);
16777
+ tab.removeEventListener('keydown', this.handleTabKeyDown);
16778
+ tab.addEventListener('keydown', this.handleTabKeyDown);
16779
+ tab.setAttribute('tabindex', isTabStop ? '0' : '-1');
16780
+ if (isActiveTab) {
16781
+ this.activetab = tab;
16782
+ }
16783
+ tab.style[gridVerticalProperty] = '';
16784
+ tab.style[gridHorizontalProperty] = `${index + 1}`;
16785
+ });
16786
+ if (firstFocusableTab
16787
+ && (!this.activetab || !this.isFocusableElement(this.activetab))) {
16788
+ firstFocusableTab.setAttribute('tabindex', '0');
16789
+ }
16790
+ };
16791
+ this.handleTabClick = (event) => {
16792
+ const selectedTab = event.currentTarget;
16793
+ if (selectedTab.nodeType === 1
16794
+ && this.isFocusableElement(selectedTab)) {
16795
+ this.tabs.forEach((tab) => {
16796
+ tab.setAttribute('tabindex', tab === selectedTab ? '0' : '-1');
16797
+ });
16798
+ }
16799
+ };
16800
+ this.handleTabKeyDown = (event) => {
16801
+ let anchor;
16802
+ switch (event.key) {
16803
+ case keyArrowLeft:
16804
+ event.preventDefault();
16805
+ this.adjustBackward();
16806
+ break;
16807
+ case keyArrowRight:
16808
+ event.preventDefault();
16809
+ this.adjustForward();
16810
+ break;
16811
+ case keyHome:
16812
+ event.preventDefault();
16813
+ this.focusFirstOrLast(false);
16814
+ break;
16815
+ case keyEnd:
16816
+ event.preventDefault();
16817
+ this.focusFirstOrLast(true);
16818
+ break;
16819
+ case keySpace:
16820
+ case keyEnter:
16821
+ event.preventDefault();
16822
+ this.getTabAnchor(event.target).click();
16823
+ break;
16824
+ case 'ContextMenu':
16825
+ event.preventDefault();
16826
+ anchor = this.getTabAnchor(event.target);
16827
+ anchor.focus();
16828
+ anchor.dispatchEvent(new KeyboardEvent('keydown', {
16829
+ key: event.key,
16830
+ bubbles: false
16831
+ }));
16832
+ break;
16833
+ // do nothing
16834
+ }
16835
+ };
16836
+ this.adjustForward = () => {
16837
+ const group = this.tabs;
16838
+ let index = 0;
16839
+ const focusedTab = group.find(x => x === document.activeElement);
16840
+ index = focusedTab ? group.indexOf(focusedTab) + 1 : 1;
16841
+ if (index === group.length) {
16842
+ index = 0;
16843
+ }
16844
+ while (index < group.length && group.length > 1) {
16845
+ if (this.isFocusableElement(group[index])) {
16846
+ this.focusTabByIndex(group, index);
16847
+ break;
16848
+ }
16849
+ else if (focusedTab && index === group.indexOf(focusedTab)) {
16850
+ break;
16851
+ }
16852
+ else if (index + 1 >= group.length) {
16853
+ index = 0;
16854
+ }
16855
+ else {
16856
+ index += 1;
16857
+ }
16858
+ }
16859
+ };
16860
+ this.adjustBackward = () => {
16861
+ const group = this.tabs;
16862
+ let index = 0;
16863
+ const focusedTab = group.find(x => x === document.activeElement);
16864
+ index = focusedTab ? group.indexOf(focusedTab) - 1 : 0;
16865
+ index = index < 0 ? group.length - 1 : index;
16866
+ while (index >= 0 && group.length > 1) {
16867
+ if (this.isFocusableElement(group[index])) {
16868
+ this.focusTabByIndex(group, index);
16869
+ break;
16870
+ }
16871
+ else if (index - 1 < 0) {
16872
+ index = group.length - 1;
16873
+ }
16874
+ else {
16875
+ index -= 1;
16876
+ }
16877
+ }
16878
+ };
16879
+ this.focusTabByIndex = (group, index) => {
16880
+ const focusedTab = group[index];
16881
+ focusedTab.focus();
16882
+ this.tabs.forEach((tab) => {
16883
+ tab.setAttribute('tabindex', tab === focusedTab ? '0' : '-1');
16884
+ });
16885
+ };
16886
+ }
16887
+ /**
16888
+ * @internal
16889
+ */
16890
+ activeidChanged(_oldValue, _newValue) {
16891
+ if (this.$fastController.isConnected) {
16892
+ this.setTabs();
16893
+ }
16894
+ }
16895
+ /**
16896
+ * @internal
16897
+ */
16898
+ tabsChanged() {
16899
+ if (this.$fastController.isConnected) {
16900
+ this.tabIds = this.getTabIds();
16901
+ this.setTabs();
16902
+ }
16903
+ }
16904
+ /**
16905
+ * @internal
16906
+ */
16907
+ connectedCallback() {
16908
+ super.connectedCallback();
16909
+ this.tabIds = this.getTabIds();
16910
+ }
16911
+ getTabIds() {
16912
+ return this.tabs.map((tab) => {
16913
+ return tab.getAttribute('id') ?? `tab-${uniqueId()}`;
16914
+ });
16915
+ }
16916
+ focusFirstOrLast(focusLast) {
16917
+ const focusableTabs = this.tabs.filter(t => !this.isDisabledElement(t));
16918
+ const focusableIndex = focusLast ? focusableTabs.length - 1 : 0;
16919
+ const index = this.tabs.indexOf(focusableTabs[focusableIndex]);
16920
+ if (index > -1) {
16921
+ this.focusTabByIndex(this.tabs, index);
16922
+ }
16923
+ }
16924
+ getTabAnchor(tab) {
16925
+ return tab.shadowRoot.querySelector('a');
16926
+ }
16927
+ }
16928
+ __decorate$1([
16929
+ attr
16930
+ ], AnchorTabs.prototype, "activeid", void 0);
16931
+ __decorate$1([
16932
+ observable
16933
+ ], AnchorTabs.prototype, "tabs", void 0);
16934
+ applyMixins(AnchorTabs, StartEnd);
16935
+ const nimbleAnchorTabs = AnchorTabs.compose({
16936
+ baseName: 'anchor-tabs',
16937
+ template: template$f,
16938
+ styles: styles$C,
16939
+ shadowOptions: {
16940
+ delegatesFocus: false
16941
+ }
16942
+ });
16943
+ DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorTabs());
16944
+
16945
+ const styles$B = css `
16557
16946
  :host {
16558
16947
  contain: layout;
16559
16948
  display: block;
@@ -16577,13 +16966,13 @@
16577
16966
  baseName: 'anchored-region',
16578
16967
  baseClass: AnchoredRegion$1,
16579
16968
  template: anchoredRegionTemplate,
16580
- styles: styles$C
16969
+ styles: styles$B
16581
16970
  });
16582
16971
  DesignSystem.getOrCreate()
16583
16972
  .withPrefix('nimble')
16584
16973
  .register(nimbleAnchoredRegion());
16585
16974
 
16586
- const styles$B = css `
16975
+ const styles$A = css `
16587
16976
  ${display('inline-block')}
16588
16977
 
16589
16978
  :host {
@@ -16624,7 +17013,7 @@
16624
17013
  baseName: 'breadcrumb',
16625
17014
  baseClass: Breadcrumb$1,
16626
17015
  template: breadcrumbTemplate,
16627
- styles: styles$B
17016
+ styles: styles$A
16628
17017
  });
16629
17018
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBreadcrumb());
16630
17019
 
@@ -17230,7 +17619,7 @@
17230
17619
  data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path class="cls-1" d="M8.033 14.026L4.9 10.866 6.277 9.53l1.744 1.81 4.562-4.507 1.307 1.363zm1.155-10.68l-1.321-1.32-2.312 2.311-2.311-2.311-1.321 1.32 2.311 2.312L1.923 7.97l1.32 1.32 2.312-2.31 2.312 2.31 1.32-1.32-2.31-2.312z"/></svg>`
17231
17620
  };
17232
17621
 
17233
- const styles$A = css `
17622
+ const styles$z = css `
17234
17623
  ${display('inline-flex')}
17235
17624
 
17236
17625
  :host {
@@ -17309,15 +17698,15 @@
17309
17698
  baseName: 'breadcrumb-item',
17310
17699
  baseClass: BreadcrumbItem$1,
17311
17700
  template: breadcrumbItemTemplate,
17312
- styles: styles$A,
17701
+ styles: styles$z,
17313
17702
  separator: forwardSlash16X16.data
17314
17703
  });
17315
17704
  DesignSystem.getOrCreate()
17316
17705
  .withPrefix('nimble')
17317
17706
  .register(nimbleBreadcrumbItem());
17318
17707
 
17319
- const styles$z = css `
17320
- ${styles$E}
17708
+ const styles$y = css `
17709
+ ${styles$G}
17321
17710
  ${buttonAppearanceVariantStyles}
17322
17711
  `;
17323
17712
 
@@ -17363,7 +17752,7 @@
17363
17752
  baseName: 'button',
17364
17753
  baseClass: Button$1,
17365
17754
  template: buttonTemplate,
17366
- styles: styles$z,
17755
+ styles: styles$y,
17367
17756
  shadowOptions: {
17368
17757
  delegatesFocus: true
17369
17758
  }
@@ -17443,7 +17832,7 @@
17443
17832
  */
17444
17833
  const themeBehavior = (theme, styles) => new ThemeStyleSheetBehavior(theme, styles);
17445
17834
 
17446
- const styles$y = css `
17835
+ const styles$x = css `
17447
17836
  ${display('inline-flex')}
17448
17837
 
17449
17838
  :host {
@@ -17602,14 +17991,14 @@
17602
17991
  const nimbleCardButton = CardButton.compose({
17603
17992
  baseName: 'card-button',
17604
17993
  template: buttonTemplate,
17605
- styles: styles$y,
17994
+ styles: styles$x,
17606
17995
  shadowOptions: {
17607
17996
  delegatesFocus: true
17608
17997
  }
17609
17998
  });
17610
17999
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCardButton());
17611
18000
 
17612
- const styles$x = css `
18001
+ const styles$w = css `
17613
18002
  ${display('inline-flex')}
17614
18003
 
17615
18004
  :host {
@@ -17727,14 +18116,14 @@
17727
18116
  baseName: 'checkbox',
17728
18117
  baseClass: Checkbox$1,
17729
18118
  template: checkboxTemplate,
17730
- styles: styles$x,
18119
+ styles: styles$w,
17731
18120
  checkedIndicator: check16X16.data,
17732
18121
  indeterminateIndicator: minus16X16.data
17733
18122
  });
17734
18123
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCheckbox());
17735
18124
 
17736
- const styles$w = css `
17737
- ${styles$E}
18125
+ const styles$v = css `
18126
+ ${styles$G}
17738
18127
 
17739
18128
  .control[aria-pressed='true'] {
17740
18129
  background-color: ${fillSelectedColor};
@@ -17836,7 +18225,7 @@
17836
18225
  const nimbleToggleButton = ToggleButton.compose({
17837
18226
  baseName: 'toggle-button',
17838
18227
  template: template$e,
17839
- styles: styles$w,
18228
+ styles: styles$v,
17840
18229
  shadowOptions: {
17841
18230
  delegatesFocus: true
17842
18231
  }
@@ -17855,7 +18244,7 @@
17855
18244
  </template
17856
18245
  `;
17857
18246
 
17858
- const styles$v = css `
18247
+ const styles$u = css `
17859
18248
  ${display('inline-flex')}
17860
18249
 
17861
18250
  :host {
@@ -17909,7 +18298,7 @@
17909
18298
  const composedIcon = iconClass.compose({
17910
18299
  baseName,
17911
18300
  template: template$d,
17912
- styles: styles$v,
18301
+ styles: styles$u,
17913
18302
  baseClass: iconClass
17914
18303
  });
17915
18304
  DesignSystem.getOrCreate().withPrefix('nimble').register(composedIcon());
@@ -17943,7 +18332,7 @@
17943
18332
  block: 'block'
17944
18333
  };
17945
18334
 
17946
- const styles$u = css `
18335
+ const styles$t = css `
17947
18336
  ${display('inline-flex')}
17948
18337
 
17949
18338
  :host {
@@ -18171,7 +18560,7 @@
18171
18560
  }
18172
18561
  `));
18173
18562
 
18174
- const styles$t = css `
18563
+ const styles$s = css `
18175
18564
  .error-icon {
18176
18565
  display: none;
18177
18566
  }
@@ -18209,9 +18598,9 @@
18209
18598
  }
18210
18599
  `;
18211
18600
 
18212
- const styles$s = css `
18213
- ${styles$u}
18601
+ const styles$r = css `
18214
18602
  ${styles$t}
18603
+ ${styles$s}
18215
18604
 
18216
18605
  :host {
18217
18606
  --ni-private-hover-bottom-border-width: 2px;
@@ -18447,7 +18836,7 @@
18447
18836
  baseName: 'combobox',
18448
18837
  baseClass: Combobox$1,
18449
18838
  template: comboboxTemplate,
18450
- styles: styles$s,
18839
+ styles: styles$r,
18451
18840
  shadowOptions: {
18452
18841
  delegatesFocus: true
18453
18842
  },
@@ -18491,7 +18880,7 @@
18491
18880
  */
18492
18881
  const UserDismissed = Symbol('user dismissed');
18493
18882
 
18494
- const styles$r = css `
18883
+ const styles$q = css `
18495
18884
  ${display('grid')}
18496
18885
 
18497
18886
  dialog {
@@ -18734,12 +19123,12 @@
18734
19123
  const nimbleDialog = Dialog.compose({
18735
19124
  baseName: 'dialog',
18736
19125
  template: template$c,
18737
- styles: styles$r,
19126
+ styles: styles$q,
18738
19127
  baseClass: Dialog
18739
19128
  });
18740
19129
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDialog());
18741
19130
 
18742
- const styles$q = css `
19131
+ const styles$p = css `
18743
19132
  ${display('block')}
18744
19133
 
18745
19134
  :host {
@@ -19007,7 +19396,7 @@
19007
19396
  const nimbleDrawer = Drawer.compose({
19008
19397
  baseName: 'drawer',
19009
19398
  template: template$b,
19010
- styles: styles$q
19399
+ styles: styles$p
19011
19400
  });
19012
19401
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDrawer());
19013
19402
 
@@ -20639,7 +21028,7 @@
20639
21028
  }
20640
21029
  registerIcon('icon-xmark-check', IconXmarkCheck);
20641
21030
 
20642
- const styles$p = css `
21031
+ const styles$o = css `
20643
21032
  ${display('flex')}
20644
21033
 
20645
21034
  :host {
@@ -20719,11 +21108,11 @@
20719
21108
  baseName: 'list-option',
20720
21109
  baseClass: ListboxOption,
20721
21110
  template: listboxOptionTemplate,
20722
- styles: styles$p
21111
+ styles: styles$o
20723
21112
  });
20724
21113
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleListOption());
20725
21114
 
20726
- const styles$o = css `
21115
+ const styles$n = css `
20727
21116
  ${display('grid')}
20728
21117
 
20729
21118
  :host {
@@ -20790,11 +21179,11 @@
20790
21179
  baseName: 'menu',
20791
21180
  baseClass: Menu$1,
20792
21181
  template: menuTemplate,
20793
- styles: styles$o
21182
+ styles: styles$n
20794
21183
  });
20795
21184
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenu());
20796
21185
 
20797
- const styles$n = css `
21186
+ const styles$m = css `
20798
21187
  ${display('inline-block')}
20799
21188
 
20800
21189
  :host {
@@ -21022,14 +21411,14 @@
21022
21411
  const nimbleMenuButton = MenuButton.compose({
21023
21412
  baseName: 'menu-button',
21024
21413
  template: template$a,
21025
- styles: styles$n,
21414
+ styles: styles$m,
21026
21415
  shadowOptions: {
21027
21416
  delegatesFocus: true
21028
21417
  }
21029
21418
  });
21030
21419
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenuButton());
21031
21420
 
21032
- const styles$m = css `
21421
+ const styles$l = css `
21033
21422
  ${display('grid')}
21034
21423
 
21035
21424
  :host {
@@ -21127,7 +21516,7 @@
21127
21516
  baseName: 'menu-item',
21128
21517
  baseClass: MenuItem$1,
21129
21518
  template: menuItemTemplate,
21130
- styles: styles$m,
21519
+ styles: styles$l,
21131
21520
  expandCollapseGlyph: arrowExpanderRight16X16.data
21132
21521
  });
21133
21522
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenuItem());
@@ -21141,9 +21530,9 @@
21141
21530
  block: 'block'
21142
21531
  };
21143
21532
 
21144
- const styles$l = css `
21533
+ const styles$k = css `
21145
21534
  ${display('inline-block')}
21146
- ${styles$t}
21535
+ ${styles$s}
21147
21536
 
21148
21537
  :host {
21149
21538
  font: ${bodyFont};
@@ -21357,7 +21746,7 @@
21357
21746
  baseName: 'number-field',
21358
21747
  baseClass: NumberField$1,
21359
21748
  template: numberFieldTemplate,
21360
- styles: styles$l,
21749
+ styles: styles$k,
21361
21750
  shadowOptions: {
21362
21751
  delegatesFocus: true
21363
21752
  },
@@ -21398,7 +21787,7 @@
21398
21787
  });
21399
21788
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleNumberField());
21400
21789
 
21401
- const styles$k = css `
21790
+ const styles$j = css `
21402
21791
  ${display('inline-flex')}
21403
21792
 
21404
21793
  :host {
@@ -21498,12 +21887,12 @@
21498
21887
  baseName: 'radio',
21499
21888
  baseClass: Radio$1,
21500
21889
  template: radioTemplate,
21501
- styles: styles$k,
21890
+ styles: styles$j,
21502
21891
  checkedIndicator: circleFilled16X16.data
21503
21892
  });
21504
21893
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleRadio());
21505
21894
 
21506
- const styles$j = css `
21895
+ const styles$i = css `
21507
21896
  ${display('inline-block')}
21508
21897
 
21509
21898
  .positioning-region {
@@ -21538,16 +21927,16 @@
21538
21927
  baseName: 'radio-group',
21539
21928
  baseClass: RadioGroup$1,
21540
21929
  template: radioGroupTemplate,
21541
- styles: styles$j,
21930
+ styles: styles$i,
21542
21931
  shadowOptions: {
21543
21932
  delegatesFocus: true
21544
21933
  }
21545
21934
  });
21546
21935
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleRadioGroup());
21547
21936
 
21548
- const styles$i = css `
21549
- ${styles$u}
21937
+ const styles$h = css `
21550
21938
  ${styles$t}
21939
+ ${styles$s}
21551
21940
 
21552
21941
  ${
21553
21942
  /* We are using flex `order` to define the visual ordering of the selected value,
@@ -21623,7 +22012,7 @@
21623
22012
  baseName: 'select',
21624
22013
  baseClass: Select$1,
21625
22014
  template: selectTemplate,
21626
- styles: styles$i,
22015
+ styles: styles$h,
21627
22016
  indicator: arrowExpanderDown16X16.data,
21628
22017
  end: html `
21629
22018
  <${DesignSystem.tagFor(IconExclamationMark)}
@@ -21635,12 +22024,12 @@
21635
22024
  });
21636
22025
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSelect());
21637
22026
 
21638
- const styles$h = css `
22027
+ const styles$g = css `
21639
22028
  ${display('inline-flex')}
21640
22029
 
21641
22030
  :host {
21642
- width: 16px;
21643
- height: 16px;
22031
+ height: ${spinnerSmallHeight};
22032
+ aspect-ratio: 1 / 1;
21644
22033
  }
21645
22034
 
21646
22035
  div.container {
@@ -21797,11 +22186,11 @@
21797
22186
  const nimbleSpinner = Spinner.compose({
21798
22187
  baseName: 'spinner',
21799
22188
  template: template$9,
21800
- styles: styles$h
22189
+ styles: styles$g
21801
22190
  });
21802
22191
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSpinner());
21803
22192
 
21804
- const styles$g = css `
22193
+ const styles$f = css `
21805
22194
  ${display('inline-flex')}
21806
22195
 
21807
22196
  :host {
@@ -22009,106 +22398,10 @@
22009
22398
  baseClass: Switch$1,
22010
22399
  baseName: 'switch',
22011
22400
  template: template$8,
22012
- styles: styles$g
22401
+ styles: styles$f
22013
22402
  });
22014
22403
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSwitch());
22015
22404
 
22016
- const styles$f = css `
22017
- ${display('inline-flex')}
22018
-
22019
- :host {
22020
- position: relative;
22021
- box-sizing: border-box;
22022
- font: ${bodyFont};
22023
- height: ${controlHeight};
22024
- color: ${bodyFontColor};
22025
- align-items: center;
22026
- justify-content: center;
22027
- cursor: pointer;
22028
- --ni-private-active-indicator-width: 2px;
22029
- --ni-private-focus-indicator-width: 1px;
22030
- --ni-private-indicator-lines-gap: 1px;
22031
- --ni-private-focus-indicator-inset-width: 3px;
22032
- }
22033
-
22034
- :host(:hover) {
22035
- background-color: ${fillHoverColor};
22036
- }
22037
-
22038
- :host(:focus) {
22039
- outline: none;
22040
- }
22041
-
22042
- :host(:focus:hover) {
22043
- background-color: ${fillHoverSelectedColor};
22044
- }
22045
-
22046
- :host(${focusVisible}) {
22047
- outline: none;
22048
- }
22049
-
22050
- :host(:active) {
22051
- background: none;
22052
- }
22053
-
22054
- :host([disabled]) {
22055
- cursor: default;
22056
- color: ${bodyDisabledFontColor};
22057
- background: none;
22058
- }
22059
-
22060
- slot {
22061
- display: block;
22062
- padding: calc(${standardPadding} / 2) ${standardPadding}
22063
- calc(${standardPadding} / 2 - ${borderWidth});
22064
- }
22065
-
22066
- :host::before {
22067
- content: '';
22068
- position: absolute;
22069
- bottom: calc(
22070
- var(--ni-private-active-indicator-width) +
22071
- var(--ni-private-indicator-lines-gap)
22072
- );
22073
- width: 0px;
22074
- height: 0px;
22075
- border-bottom: ${borderHoverColor}
22076
- var(--ni-private-focus-indicator-width) solid;
22077
- transition: width ${smallDelay} ease-in;
22078
- }
22079
-
22080
- @media (prefers-reduced-motion) {
22081
- :host::before {
22082
- transition-duration: 0.01s;
22083
- }
22084
- }
22085
-
22086
- :host(${focusVisible})::before {
22087
- width: calc(100% - 2 * var(--ni-private-focus-indicator-inset-width));
22088
- }
22089
-
22090
- :host::after {
22091
- content: '';
22092
- position: absolute;
22093
- bottom: 0px;
22094
- width: 0px;
22095
- height: 0px;
22096
- border-bottom: ${borderHoverColor}
22097
- var(--ni-private-active-indicator-width) solid;
22098
- transition: width ${smallDelay} ease-in;
22099
- }
22100
-
22101
- @media (prefers-reduced-motion) {
22102
- :host::after {
22103
- transition-duration: 0.01s;
22104
- }
22105
- }
22106
-
22107
- :host([aria-selected='true'])::after {
22108
- width: 100%;
22109
- }
22110
- `;
22111
-
22112
22405
  /**
22113
22406
  * A nimble-styled HTML tab
22114
22407
  */
@@ -22118,7 +22411,7 @@
22118
22411
  baseName: 'tab',
22119
22412
  baseClass: Tab$1,
22120
22413
  template: tabTemplate,
22121
- styles: styles$f
22414
+ styles: styles$E
22122
22415
  });
22123
22416
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTab());
22124
22417
 
@@ -25850,7 +26143,7 @@
25850
26143
 
25851
26144
  const styles$5 = css `
25852
26145
  ${display('inline-block')}
25853
- ${styles$t}
26146
+ ${styles$s}
25854
26147
 
25855
26148
  :host {
25856
26149
  font: ${bodyFont};