@ni/nimble-components 16.0.0 → 16.1.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.
Files changed (43) hide show
  1. package/dist/all-components-bundle.js +342 -118
  2. package/dist/all-components-bundle.js.map +1 -1
  3. package/dist/all-components-bundle.min.js +547 -379
  4. package/dist/all-components-bundle.min.js.map +1 -1
  5. package/dist/esm/all-components.d.ts +1 -0
  6. package/dist/esm/all-components.js +1 -0
  7. package/dist/esm/all-components.js.map +1 -1
  8. package/dist/esm/spinner/index.d.ts +12 -0
  9. package/dist/esm/spinner/index.js +16 -0
  10. package/dist/esm/spinner/index.js.map +1 -0
  11. package/dist/esm/spinner/styles.d.ts +1 -0
  12. package/dist/esm/spinner/styles.js +149 -0
  13. package/dist/esm/spinner/styles.js.map +1 -0
  14. package/dist/esm/spinner/template.d.ts +2 -0
  15. package/dist/esm/spinner/template.js +10 -0
  16. package/dist/esm/spinner/template.js.map +1 -0
  17. package/dist/esm/table/components/cell/index.d.ts +14 -0
  18. package/dist/esm/table/components/cell/index.js +21 -0
  19. package/dist/esm/table/components/cell/index.js.map +1 -0
  20. package/dist/esm/table/components/cell/styles.d.ts +1 -0
  21. package/dist/esm/table/components/cell/styles.js +6 -0
  22. package/dist/esm/table/components/cell/styles.js.map +1 -0
  23. package/dist/esm/table/components/cell/template.d.ts +2 -0
  24. package/dist/esm/table/components/cell/template.js +8 -0
  25. package/dist/esm/table/components/cell/template.js.map +1 -0
  26. package/dist/esm/table/components/row/index.d.ts +16 -0
  27. package/dist/esm/table/components/row/index.js +33 -0
  28. package/dist/esm/table/components/row/index.js.map +1 -0
  29. package/dist/esm/table/components/row/styles.d.ts +1 -0
  30. package/dist/esm/table/components/row/styles.js +10 -0
  31. package/dist/esm/table/components/row/styles.js.map +1 -0
  32. package/dist/esm/table/components/row/template.d.ts +2 -0
  33. package/dist/esm/table/components/row/template.js +16 -0
  34. package/dist/esm/table/components/row/template.js.map +1 -0
  35. package/dist/esm/table/index.d.ts +1 -2
  36. package/dist/esm/table/index.js +5 -20
  37. package/dist/esm/table/index.js.map +1 -1
  38. package/dist/esm/table/styles.js +0 -5
  39. package/dist/esm/table/styles.js.map +1 -1
  40. package/dist/esm/table/template.d.ts +2 -1
  41. package/dist/esm/table/template.js +16 -12
  42. package/dist/esm/table/template.js.map +1 -1
  43. package/package.json +2 -2
@@ -15700,9 +15700,9 @@
15700
15700
  const prefix = 'ni-nimble';
15701
15701
  const styleNameFromTokenName = (tokenName) => `${prefix}-${tokenName}`;
15702
15702
 
15703
- const template$c = html `<slot></slot>`;
15703
+ const template$f = html `<slot></slot>`;
15704
15704
 
15705
- const styles$B = css `
15705
+ const styles$E = css `
15706
15706
  :host {
15707
15707
  display: contents;
15708
15708
  }
@@ -15758,8 +15758,8 @@
15758
15758
  ], ThemeProvider.prototype, "theme", void 0);
15759
15759
  const nimbleDesignSystemProvider = ThemeProvider.compose({
15760
15760
  baseName: 'theme-provider',
15761
- styles: styles$B,
15762
- template: template$c
15761
+ styles: styles$E,
15762
+ template: template$f
15763
15763
  });
15764
15764
  DesignSystem.getOrCreate()
15765
15765
  .withPrefix('nimble')
@@ -15913,7 +15913,7 @@
15913
15913
  }
15914
15914
  }
15915
15915
 
15916
- const styles$A = css `
15916
+ const styles$D = css `
15917
15917
  ${display('inline')}
15918
15918
 
15919
15919
  :host {
@@ -15996,7 +15996,7 @@
15996
15996
  `;
15997
15997
 
15998
15998
  // prettier-ignore
15999
- const template$b = (context, definition) => html `
15999
+ const template$e = (context, definition) => html `
16000
16000
  <a
16001
16001
  class="control"
16002
16002
  part="control"
@@ -16069,8 +16069,8 @@
16069
16069
  const nimbleAnchor = Anchor.compose({
16070
16070
  baseName: 'anchor',
16071
16071
  baseClass: Anchor$1,
16072
- template: template$b,
16073
- styles: styles$A,
16072
+ template: template$e,
16073
+ styles: styles$D,
16074
16074
  shadowOptions: {
16075
16075
  delegatesFocus: true
16076
16076
  }
@@ -16155,7 +16155,7 @@
16155
16155
  return new MultivaluePropertyStyleSheetBehavior('appearance', value, styles);
16156
16156
  }
16157
16157
 
16158
- const styles$z = css `
16158
+ const styles$C = css `
16159
16159
  ${display('inline-flex')}
16160
16160
 
16161
16161
  :host {
@@ -16436,8 +16436,8 @@
16436
16436
  }
16437
16437
  `));
16438
16438
 
16439
- const styles$y = css `
16440
- ${styles$z}
16439
+ const styles$B = css `
16440
+ ${styles$C}
16441
16441
  ${buttonAppearanceVariantStyles}
16442
16442
 
16443
16443
  .control {
@@ -16445,7 +16445,7 @@
16445
16445
  }
16446
16446
  `;
16447
16447
 
16448
- const template$a = (context, definition) => html `
16448
+ const template$d = (context, definition) => html `
16449
16449
  <a
16450
16450
  class="control"
16451
16451
  part="control"
@@ -16527,15 +16527,15 @@
16527
16527
  ], AnchorButton.prototype, "disabled", void 0);
16528
16528
  const nimbleAnchorButton = AnchorButton.compose({
16529
16529
  baseName: 'anchor-button',
16530
- template: template$a,
16531
- styles: styles$y,
16530
+ template: template$d,
16531
+ styles: styles$B,
16532
16532
  shadowOptions: {
16533
16533
  delegatesFocus: true
16534
16534
  }
16535
16535
  });
16536
16536
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorButton());
16537
16537
 
16538
- const styles$x = css `
16538
+ const styles$A = css `
16539
16539
  :host {
16540
16540
  contain: layout;
16541
16541
  display: block;
@@ -16559,13 +16559,13 @@
16559
16559
  baseName: 'anchored-region',
16560
16560
  baseClass: AnchoredRegion$1,
16561
16561
  template: anchoredRegionTemplate,
16562
- styles: styles$x
16562
+ styles: styles$A
16563
16563
  });
16564
16564
  DesignSystem.getOrCreate()
16565
16565
  .withPrefix('nimble')
16566
16566
  .register(nimbleAnchoredRegion());
16567
16567
 
16568
- const styles$w = css `
16568
+ const styles$z = css `
16569
16569
  ${display('inline-block')}
16570
16570
 
16571
16571
  :host {
@@ -16606,7 +16606,7 @@
16606
16606
  baseName: 'breadcrumb',
16607
16607
  baseClass: Breadcrumb$1,
16608
16608
  template: breadcrumbTemplate,
16609
- styles: styles$w
16609
+ styles: styles$z
16610
16610
  });
16611
16611
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBreadcrumb());
16612
16612
 
@@ -17212,7 +17212,7 @@
17212
17212
  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>`
17213
17213
  };
17214
17214
 
17215
- const styles$v = css `
17215
+ const styles$y = css `
17216
17216
  ${display('inline-flex')}
17217
17217
 
17218
17218
  :host {
@@ -17291,15 +17291,15 @@
17291
17291
  baseName: 'breadcrumb-item',
17292
17292
  baseClass: BreadcrumbItem$1,
17293
17293
  template: breadcrumbItemTemplate,
17294
- styles: styles$v,
17294
+ styles: styles$y,
17295
17295
  separator: forwardSlash16X16.data
17296
17296
  });
17297
17297
  DesignSystem.getOrCreate()
17298
17298
  .withPrefix('nimble')
17299
17299
  .register(nimbleBreadcrumbItem());
17300
17300
 
17301
- const styles$u = css `
17302
- ${styles$z}
17301
+ const styles$x = css `
17302
+ ${styles$C}
17303
17303
  ${buttonAppearanceVariantStyles}
17304
17304
  `;
17305
17305
 
@@ -17345,7 +17345,7 @@
17345
17345
  baseName: 'button',
17346
17346
  baseClass: Button$1,
17347
17347
  template: buttonTemplate,
17348
- styles: styles$u,
17348
+ styles: styles$x,
17349
17349
  shadowOptions: {
17350
17350
  delegatesFocus: true
17351
17351
  }
@@ -17425,7 +17425,7 @@
17425
17425
  */
17426
17426
  const themeBehavior = (theme, styles) => new ThemeStyleSheetBehavior(theme, styles);
17427
17427
 
17428
- const styles$t = css `
17428
+ const styles$w = css `
17429
17429
  ${display('inline-flex')}
17430
17430
 
17431
17431
  :host {
@@ -17584,14 +17584,14 @@
17584
17584
  const nimbleCardButton = CardButton.compose({
17585
17585
  baseName: 'card-button',
17586
17586
  template: buttonTemplate,
17587
- styles: styles$t,
17587
+ styles: styles$w,
17588
17588
  shadowOptions: {
17589
17589
  delegatesFocus: true
17590
17590
  }
17591
17591
  });
17592
17592
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCardButton());
17593
17593
 
17594
- const styles$s = css `
17594
+ const styles$v = css `
17595
17595
  ${display('inline-flex')}
17596
17596
 
17597
17597
  :host {
@@ -17709,14 +17709,14 @@
17709
17709
  baseName: 'checkbox',
17710
17710
  baseClass: Checkbox$1,
17711
17711
  template: checkboxTemplate,
17712
- styles: styles$s,
17712
+ styles: styles$v,
17713
17713
  checkedIndicator: check16X16.data,
17714
17714
  indeterminateIndicator: minus16X16.data
17715
17715
  });
17716
17716
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCheckbox());
17717
17717
 
17718
- const styles$r = css `
17719
- ${styles$z}
17718
+ const styles$u = css `
17719
+ ${styles$C}
17720
17720
 
17721
17721
  .control[aria-pressed='true'] {
17722
17722
  background-color: ${fillSelectedColor};
@@ -17742,7 +17742,7 @@
17742
17742
  }
17743
17743
  `;
17744
17744
 
17745
- const template$9 = (context, definition) => html `
17745
+ const template$c = (context, definition) => html `
17746
17746
  <div
17747
17747
  role="button"
17748
17748
  part="control"
@@ -17817,8 +17817,8 @@
17817
17817
  applyMixins(ToggleButton, StartEnd, DelegatesARIAButton);
17818
17818
  const nimbleToggleButton = ToggleButton.compose({
17819
17819
  baseName: 'toggle-button',
17820
- template: template$9,
17821
- styles: styles$r,
17820
+ template: template$c,
17821
+ styles: styles$u,
17822
17822
  shadowOptions: {
17823
17823
  delegatesFocus: true
17824
17824
  }
@@ -17831,13 +17831,13 @@
17831
17831
  </div>
17832
17832
  `;
17833
17833
 
17834
- const template$8 = html `
17834
+ const template$b = html `
17835
17835
  <template>
17836
17836
  <div class="icon" :innerHTML=${x => x.icon.data}></div>
17837
17837
  </template
17838
17838
  `;
17839
17839
 
17840
- const styles$q = css `
17840
+ const styles$t = css `
17841
17841
  ${display('inline-flex')}
17842
17842
 
17843
17843
  :host {
@@ -17890,8 +17890,8 @@
17890
17890
  const registerIcon = (baseName, iconClass) => {
17891
17891
  const composedIcon = iconClass.compose({
17892
17892
  baseName,
17893
- template: template$8,
17894
- styles: styles$q,
17893
+ template: template$b,
17894
+ styles: styles$t,
17895
17895
  baseClass: iconClass
17896
17896
  });
17897
17897
  DesignSystem.getOrCreate().withPrefix('nimble').register(composedIcon());
@@ -17925,7 +17925,7 @@
17925
17925
  block: 'block'
17926
17926
  };
17927
17927
 
17928
- const styles$p = css `
17928
+ const styles$s = css `
17929
17929
  ${display('inline-flex')}
17930
17930
 
17931
17931
  :host {
@@ -18153,7 +18153,7 @@
18153
18153
  }
18154
18154
  `));
18155
18155
 
18156
- const styles$o = css `
18156
+ const styles$r = css `
18157
18157
  .error-icon {
18158
18158
  display: none;
18159
18159
  }
@@ -18191,9 +18191,9 @@
18191
18191
  }
18192
18192
  `;
18193
18193
 
18194
- const styles$n = css `
18195
- ${styles$p}
18196
- ${styles$o}
18194
+ const styles$q = css `
18195
+ ${styles$s}
18196
+ ${styles$r}
18197
18197
 
18198
18198
  :host {
18199
18199
  --ni-private-hover-bottom-border-width: 2px;
@@ -18429,7 +18429,7 @@
18429
18429
  baseName: 'combobox',
18430
18430
  baseClass: Combobox$1,
18431
18431
  template: comboboxTemplate,
18432
- styles: styles$n,
18432
+ styles: styles$q,
18433
18433
  shadowOptions: {
18434
18434
  delegatesFocus: true
18435
18435
  },
@@ -18473,7 +18473,7 @@
18473
18473
  */
18474
18474
  const UserDismissed = Symbol('user dismissed');
18475
18475
 
18476
- const styles$m = css `
18476
+ const styles$p = css `
18477
18477
  ${display('grid')}
18478
18478
 
18479
18479
  dialog {
@@ -18589,7 +18589,7 @@
18589
18589
  }
18590
18590
  `));
18591
18591
 
18592
- const template$7 = html `
18592
+ const template$a = html `
18593
18593
  <template>
18594
18594
  <dialog
18595
18595
  ${ref('dialogElement')}
@@ -18715,13 +18715,13 @@
18715
18715
  applyMixins(Dialog, ARIAGlobalStatesAndProperties);
18716
18716
  const nimbleDialog = Dialog.compose({
18717
18717
  baseName: 'dialog',
18718
- template: template$7,
18719
- styles: styles$m,
18718
+ template: template$a,
18719
+ styles: styles$p,
18720
18720
  baseClass: Dialog
18721
18721
  });
18722
18722
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDialog());
18723
18723
 
18724
- const styles$l = css `
18724
+ const styles$o = css `
18725
18725
  ${display('block')}
18726
18726
 
18727
18727
  :host {
@@ -18876,7 +18876,7 @@
18876
18876
  }
18877
18877
  `));
18878
18878
 
18879
- const template$6 = html `
18879
+ const template$9 = html `
18880
18880
  <dialog
18881
18881
  ${ref('dialog')}
18882
18882
  aria-label="${x => x.ariaLabel}"
@@ -18990,8 +18990,8 @@
18990
18990
  applyMixins(Drawer, ARIAGlobalStatesAndProperties);
18991
18991
  const nimbleDrawer = Drawer.compose({
18992
18992
  baseName: 'drawer',
18993
- template: template$6,
18994
- styles: styles$l
18993
+ template: template$9,
18994
+ styles: styles$o
18995
18995
  });
18996
18996
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDrawer());
18997
18997
 
@@ -20623,7 +20623,7 @@
20623
20623
  }
20624
20624
  registerIcon('icon-xmark-check', IconXmarkCheck);
20625
20625
 
20626
- const styles$k = css `
20626
+ const styles$n = css `
20627
20627
  ${display('flex')}
20628
20628
 
20629
20629
  :host {
@@ -20703,11 +20703,11 @@
20703
20703
  baseName: 'list-option',
20704
20704
  baseClass: ListboxOption,
20705
20705
  template: listboxOptionTemplate,
20706
- styles: styles$k
20706
+ styles: styles$n
20707
20707
  });
20708
20708
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleListOption());
20709
20709
 
20710
- const styles$j = css `
20710
+ const styles$m = css `
20711
20711
  ${display('grid')}
20712
20712
 
20713
20713
  :host {
@@ -20762,11 +20762,11 @@
20762
20762
  baseName: 'menu',
20763
20763
  baseClass: Menu$1,
20764
20764
  template: menuTemplate,
20765
- styles: styles$j
20765
+ styles: styles$m
20766
20766
  });
20767
20767
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenu());
20768
20768
 
20769
- const styles$i = css `
20769
+ const styles$l = css `
20770
20770
  ${display('inline-block')}
20771
20771
 
20772
20772
  :host {
@@ -20785,7 +20785,7 @@
20785
20785
  `;
20786
20786
 
20787
20787
  // prettier-ignore
20788
- const template$5 = html `
20788
+ const template$8 = html `
20789
20789
  <template
20790
20790
  ?open="${x => x.open}"
20791
20791
  @focusout="${(x, c) => x.focusoutHandler(c.event)}"
@@ -20993,15 +20993,15 @@
20993
20993
  ], MenuButton.prototype, "slottedMenus", void 0);
20994
20994
  const nimbleMenuButton = MenuButton.compose({
20995
20995
  baseName: 'menu-button',
20996
- template: template$5,
20997
- styles: styles$i,
20996
+ template: template$8,
20997
+ styles: styles$l,
20998
20998
  shadowOptions: {
20999
20999
  delegatesFocus: true
21000
21000
  }
21001
21001
  });
21002
21002
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenuButton());
21003
21003
 
21004
- const styles$h = css `
21004
+ const styles$k = css `
21005
21005
  ${display('grid')}
21006
21006
 
21007
21007
  :host {
@@ -21099,7 +21099,7 @@
21099
21099
  baseName: 'menu-item',
21100
21100
  baseClass: MenuItem$1,
21101
21101
  template: menuItemTemplate,
21102
- styles: styles$h,
21102
+ styles: styles$k,
21103
21103
  expandCollapseGlyph: arrowExpanderRight16X16.data
21104
21104
  });
21105
21105
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenuItem());
@@ -21113,9 +21113,9 @@
21113
21113
  block: 'block'
21114
21114
  };
21115
21115
 
21116
- const styles$g = css `
21116
+ const styles$j = css `
21117
21117
  ${display('inline-block')}
21118
- ${styles$o}
21118
+ ${styles$r}
21119
21119
 
21120
21120
  :host {
21121
21121
  font: ${bodyFont};
@@ -21329,7 +21329,7 @@
21329
21329
  baseName: 'number-field',
21330
21330
  baseClass: NumberField$1,
21331
21331
  template: numberFieldTemplate,
21332
- styles: styles$g,
21332
+ styles: styles$j,
21333
21333
  shadowOptions: {
21334
21334
  delegatesFocus: true
21335
21335
  },
@@ -21370,7 +21370,7 @@
21370
21370
  });
21371
21371
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleNumberField());
21372
21372
 
21373
- const styles$f = css `
21373
+ const styles$i = css `
21374
21374
  ${display('inline-flex')}
21375
21375
 
21376
21376
  :host {
@@ -21470,12 +21470,12 @@
21470
21470
  baseName: 'radio',
21471
21471
  baseClass: Radio$1,
21472
21472
  template: radioTemplate,
21473
- styles: styles$f,
21473
+ styles: styles$i,
21474
21474
  checkedIndicator: circleFilled16X16.data
21475
21475
  });
21476
21476
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleRadio());
21477
21477
 
21478
- const styles$e = css `
21478
+ const styles$h = css `
21479
21479
  ${display('inline-block')}
21480
21480
 
21481
21481
  .positioning-region {
@@ -21510,16 +21510,16 @@
21510
21510
  baseName: 'radio-group',
21511
21511
  baseClass: RadioGroup$1,
21512
21512
  template: radioGroupTemplate,
21513
- styles: styles$e,
21513
+ styles: styles$h,
21514
21514
  shadowOptions: {
21515
21515
  delegatesFocus: true
21516
21516
  }
21517
21517
  });
21518
21518
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleRadioGroup());
21519
21519
 
21520
- const styles$d = css `
21521
- ${styles$p}
21522
- ${styles$o}
21520
+ const styles$g = css `
21521
+ ${styles$s}
21522
+ ${styles$r}
21523
21523
 
21524
21524
  ${
21525
21525
  /* We are using flex `order` to define the visual ordering of the selected value,
@@ -21595,7 +21595,7 @@
21595
21595
  baseName: 'select',
21596
21596
  baseClass: Select$1,
21597
21597
  template: selectTemplate,
21598
- styles: styles$d,
21598
+ styles: styles$g,
21599
21599
  indicator: arrowExpanderDown16X16.data,
21600
21600
  end: html `
21601
21601
  <${DesignSystem.tagFor(IconExclamationMark)}
@@ -21607,7 +21607,173 @@
21607
21607
  });
21608
21608
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSelect());
21609
21609
 
21610
- const styles$c = css `
21610
+ const styles$f = css `
21611
+ ${display('inline-flex')}
21612
+
21613
+ :host {
21614
+ width: 16px;
21615
+ height: 16px;
21616
+ }
21617
+
21618
+ div.container {
21619
+ margin: max(2px, 6.25%);
21620
+ flex: 1;
21621
+ ${
21622
+ /**
21623
+ * At some spinner sizes / browser zoom levels, the spinner bits/squares appear to slightly overlap visually.
21624
+ * If we set a color with transparency on each bit, it'll look wrong in the overlapping region (since the opacity
21625
+ * combines and affects the color at the overlapping spot).
21626
+ * Currently all 3 themes use a color with opacity = 0.6, so that's applied here on the parent element instead,
21627
+ * which avoids that issue.
21628
+ */
21629
+ ''}
21630
+ opacity: 0.6;
21631
+ }
21632
+
21633
+ div.bit1,
21634
+ div.bit2 {
21635
+ background: var(--ni-private-spinner-bits-background-color);
21636
+ width: 50%;
21637
+ height: 50%;
21638
+ margin: auto;
21639
+ animation-duration: 1600ms;
21640
+ animation-iteration-count: infinite;
21641
+ animation-timing-function: cubic-bezier(0.65, 0, 0.35, 0);
21642
+ }
21643
+
21644
+ div.bit1 {
21645
+ animation-name: ni-private-spinner-keyframes-1;
21646
+ }
21647
+
21648
+ div.bit2 {
21649
+ animation-name: ni-private-spinner-keyframes-2;
21650
+ }
21651
+
21652
+ @media (prefers-reduced-motion) {
21653
+ div.bit1,
21654
+ div.bit2 {
21655
+ animation-timing-function: ease-in-out, steps(1);
21656
+ animation-duration: 3200ms;
21657
+ }
21658
+
21659
+ div.bit1 {
21660
+ animation-name: ni-private-spinner-no-motion-opacity-keyframes,
21661
+ ni-private-spinner-no-motion-transform-keyframes-1;
21662
+ }
21663
+
21664
+ div.bit2 {
21665
+ animation-name: ni-private-spinner-no-motion-opacity-keyframes,
21666
+ ni-private-spinner-no-motion-transform-keyframes-2;
21667
+ }
21668
+ }
21669
+
21670
+ @keyframes ni-private-spinner-keyframes-1 {
21671
+ 0%,
21672
+ 100% {
21673
+ transform: translate(-50%, 0);
21674
+ }
21675
+
21676
+ 25% {
21677
+ transform: translate(50%, 0);
21678
+ }
21679
+
21680
+ 50% {
21681
+ transform: translate(50%, 100%);
21682
+ }
21683
+
21684
+ 75% {
21685
+ transform: translate(-50%, 100%);
21686
+ }
21687
+ }
21688
+
21689
+ @keyframes ni-private-spinner-keyframes-2 {
21690
+ 0%,
21691
+ 100% {
21692
+ transform: translate(50%, 0);
21693
+ }
21694
+
21695
+ 25% {
21696
+ transform: translate(-50%, 0);
21697
+ }
21698
+
21699
+ 50% {
21700
+ transform: translate(-50%, -100%);
21701
+ }
21702
+
21703
+ 75% {
21704
+ transform: translate(50%, -100%);
21705
+ }
21706
+ }
21707
+
21708
+ @keyframes ni-private-spinner-no-motion-opacity-keyframes {
21709
+ 0%,
21710
+ 50%,
21711
+ 100% {
21712
+ opacity: 0;
21713
+ }
21714
+
21715
+ 25%,
21716
+ 75% {
21717
+ opacity: 1;
21718
+ }
21719
+ }
21720
+
21721
+ @keyframes ni-private-spinner-no-motion-transform-keyframes-1 {
21722
+ 0%,
21723
+ 100% {
21724
+ transform: translate(-50%, 0);
21725
+ }
21726
+ 50% {
21727
+ transform: translate(50%, 0);
21728
+ }
21729
+ }
21730
+
21731
+ @keyframes ni-private-spinner-no-motion-transform-keyframes-2 {
21732
+ 0%,
21733
+ 100% {
21734
+ transform: translate(50%, 0);
21735
+ }
21736
+
21737
+ 50% {
21738
+ transform: translate(-50%, 0);
21739
+ }
21740
+ }
21741
+ `.withBehaviors(themeBehavior(Theme.light, css `
21742
+ :host {
21743
+ --ni-private-spinner-bits-background-color: ${Black91}
21744
+ `), themeBehavior(Theme.dark, css `
21745
+ :host {
21746
+ --ni-private-spinner-bits-background-color: ${Black15};
21747
+ }
21748
+ `), themeBehavior(Theme.color, css `
21749
+ :host {
21750
+ --ni-private-spinner-bits-background-color: ${White};
21751
+ }
21752
+ `));
21753
+
21754
+ const template$7 = html `
21755
+ <template role="progressbar">
21756
+ <div class="container">
21757
+ <div class="bit1"></div>
21758
+ <div class="bit2"></div>
21759
+ </div>
21760
+ </template>
21761
+ `;
21762
+
21763
+ /**
21764
+ * A Nimble-styled spinner component.
21765
+ * A spinner is an animating indicator that can be placed in a particular region of a page to represent loading progress, or an ongoing operation, of an indeterminate / unknown duration.
21766
+ */
21767
+ class Spinner extends FoundationElement {
21768
+ }
21769
+ const nimbleSpinner = Spinner.compose({
21770
+ baseName: 'spinner',
21771
+ template: template$7,
21772
+ styles: styles$f
21773
+ });
21774
+ DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSpinner());
21775
+
21776
+ const styles$e = css `
21611
21777
  ${display('inline-flex')}
21612
21778
 
21613
21779
  :host {
@@ -21770,7 +21936,7 @@
21770
21936
  `));
21771
21937
 
21772
21938
  // prettier-ignore
21773
- const template$4 = html `
21939
+ const template$6 = html `
21774
21940
  <template
21775
21941
  role="switch"
21776
21942
  aria-checked="${x => x.checked}"
@@ -21814,12 +21980,12 @@
21814
21980
  const nimbleSwitch = Switch.compose({
21815
21981
  baseClass: Switch$1,
21816
21982
  baseName: 'switch',
21817
- template: template$4,
21818
- styles: styles$c
21983
+ template: template$6,
21984
+ styles: styles$e
21819
21985
  });
21820
21986
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSwitch());
21821
21987
 
21822
- const styles$b = css `
21988
+ const styles$d = css `
21823
21989
  ${display('inline-flex')}
21824
21990
 
21825
21991
  :host {
@@ -21923,11 +22089,11 @@
21923
22089
  baseName: 'tab',
21924
22090
  baseClass: Tab$1,
21925
22091
  template: tabTemplate,
21926
- styles: styles$b
22092
+ styles: styles$d
21927
22093
  });
21928
22094
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTab());
21929
22095
 
21930
- const styles$a = css `
22096
+ const styles$c = css `
21931
22097
  ${display('block')}
21932
22098
 
21933
22099
  :host {
@@ -21947,7 +22113,7 @@
21947
22113
  baseName: 'tab-panel',
21948
22114
  baseClass: TabPanel$1,
21949
22115
  template: tabPanelTemplate,
21950
- styles: styles$a
22116
+ styles: styles$c
21951
22117
  });
21952
22118
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTabPanel());
21953
22119
 
@@ -24899,7 +25065,7 @@
24899
25065
  });
24900
25066
  }
24901
25067
 
24902
- const styles$9 = css `
25068
+ const styles$b = css `
24903
25069
  ${display('flex')}
24904
25070
 
24905
25071
  .table-container {
@@ -24914,32 +25080,105 @@
24914
25080
  flex-direction: row;
24915
25081
  }
24916
25082
 
24917
- .table-row {
24918
- display: flex;
24919
- flex-direction: row;
25083
+ .table-cell {
25084
+ flex: 1;
24920
25085
  }
25086
+ `;
24921
25087
 
24922
- .table-cell {
25088
+ const styles$a = css `
25089
+ ${display('flex')}
25090
+
25091
+ .cell {
24923
25092
  flex: 1;
24924
25093
  }
24925
25094
  `;
24926
25095
 
25096
+ const styles$9 = css `
25097
+ ${display('flex')}
25098
+ `;
25099
+
25100
+ // prettier-ignore
25101
+ const template$5 = html `
25102
+ <template role="cell">
25103
+ ${x => x.data}
25104
+ </template>
25105
+ `;
25106
+
25107
+ /**
25108
+ * A styled cell that is used within the nimble-table-row.
25109
+ * @internal
25110
+ */
25111
+ class TableCell extends FoundationElement {
25112
+ }
25113
+ __decorate$1([
25114
+ observable
25115
+ ], TableCell.prototype, "data", void 0);
25116
+ const nimbleTableCell = TableCell.compose({
25117
+ baseName: 'table-cell',
25118
+ template: template$5,
25119
+ styles: styles$9
25120
+ });
25121
+ DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableCell());
25122
+
25123
+ // prettier-ignore
25124
+ const template$4 = html `
25125
+ <template role="row">
25126
+ ${repeat(x => x.columns, html `
25127
+ <${DesignSystem.tagFor(TableCell)}
25128
+ class="cell"
25129
+ :data="${(x, c) => c.parent.getCellValue(x)}"
25130
+ >
25131
+ </${DesignSystem.tagFor(TableCell)}>
25132
+ `)}
25133
+ </template>
25134
+ `;
25135
+
25136
+ /**
25137
+ * A styled row that is used within the nimble-table.
25138
+ * @internal
25139
+ */
25140
+ class TableRow extends FoundationElement {
25141
+ constructor() {
25142
+ super(...arguments);
25143
+ // TODO: Temporarily assume the set of columns will be an array of strings.
25144
+ // Eventually, this will be an array of column definitions.
25145
+ this.columns = [];
25146
+ }
25147
+ getCellValue(column) {
25148
+ return this.data ? this.data[column] : undefined;
25149
+ }
25150
+ }
25151
+ __decorate$1([
25152
+ observable
25153
+ ], TableRow.prototype, "data", void 0);
25154
+ __decorate$1([
25155
+ observable
25156
+ ], TableRow.prototype, "columns", void 0);
25157
+ const nimbleTableRow = TableRow.compose({
25158
+ baseName: 'table-row',
25159
+ template: template$4,
25160
+ styles: styles$a
25161
+ });
25162
+ DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableRow());
25163
+
24927
25164
  // prettier-ignore
24928
25165
  const template$3 = html `
24929
- <template>
25166
+ <template role="table">
24930
25167
  <div class="table-container">
24931
- <div class="table-header">
24932
- ${repeat(x => x.columnHeaders, html `
24933
- <span class="table-cell">${x => x}</span>
24934
- `)}
25168
+ <div role="rowgroup">
25169
+ <div class="table-header" role="row">
25170
+ ${repeat(x => x.columnHeaders, html `
25171
+ <span class="table-cell" role="columnheader">${x => x}</span>
25172
+ `)}
25173
+ </div>
24935
25174
  </div>
24936
- <div class="table-viewport">
24937
- ${repeat(x => x.tableData, html `
24938
- <div class="table-row">
24939
- ${repeat(x => x, html `
24940
- <span class="table-cell">${x => x}</span>
24941
- `)}
24942
- </div>
25175
+ <div class="table-viewport" role="rowgroup">
25176
+ ${repeat(x => x.data, html `
25177
+ <${DesignSystem.tagFor(TableRow)}
25178
+ :data="${x => x}"
25179
+ :columns="${(_, c) => c.parent.columns}"
25180
+ >
25181
+ </${DesignSystem.tagFor(TableRow)}>
24943
25182
  `)}
24944
25183
  </div>
24945
25184
  </div>
@@ -24953,8 +25192,9 @@
24953
25192
  constructor() {
24954
25193
  super();
24955
25194
  this.data = [];
24956
- // TODO: Temporarily expose the table data as arrays of strings.
24957
- this.tableData = [];
25195
+ // TODO: Temporarily expose the columns as a string array. This will ultimately be
25196
+ // column definitions provided by slotted elements.
25197
+ this.columns = [];
24958
25198
  // TODO: Temporarily expose the column headers as a string array.
24959
25199
  this.columnHeaders = [];
24960
25200
  this.tableInitialized = false;
@@ -24990,25 +25230,8 @@
24990
25230
  // Ignore any updates that occur prior to the TanStack table being initialized.
24991
25231
  if (this.tableInitialized) {
24992
25232
  this.updateTableOptions({ data: this.data });
24993
- this.refreshRows();
24994
25233
  }
24995
25234
  }
24996
- // TODO: For now, assume all cells can be rendered as strings. Ultimately, the data
24997
- // should be passed to nimble-row elements to use the view template from a column definition.
24998
- refreshRows() {
24999
- const tableData = [];
25000
- const rows = this.table.getRowModel().rows;
25001
- for (const row of rows) {
25002
- const rowArray = [];
25003
- for (const cell of row.getVisibleCells()) {
25004
- const cellValue = cell.getValue();
25005
- const stringValue = cellValue == null ? '' : cellValue.toString();
25006
- rowArray.push(stringValue);
25007
- }
25008
- tableData.push(rowArray);
25009
- }
25010
- this.tableData = tableData;
25011
- }
25012
25235
  updateTableOptions(updatedOptions) {
25013
25236
  this.options = { ...this.options, ...updatedOptions };
25014
25237
  this.update(this.table.initialState);
@@ -25031,6 +25254,7 @@
25031
25254
  });
25032
25255
  this.updateTableOptions({ columns: generatedColumns });
25033
25256
  this.columnHeaders = generatedColumns.map(x => x.header);
25257
+ this.columns = this.columnHeaders;
25034
25258
  }
25035
25259
  }
25036
25260
  __decorate$1([
@@ -25038,14 +25262,14 @@
25038
25262
  ], Table.prototype, "data", void 0);
25039
25263
  __decorate$1([
25040
25264
  observable
25041
- ], Table.prototype, "tableData", void 0);
25265
+ ], Table.prototype, "columns", void 0);
25042
25266
  __decorate$1([
25043
25267
  observable
25044
25268
  ], Table.prototype, "columnHeaders", void 0);
25045
25269
  const nimbleTable = Table.compose({
25046
25270
  baseName: 'table',
25047
25271
  template: template$3,
25048
- styles: styles$9
25272
+ styles: styles$b
25049
25273
  });
25050
25274
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTable());
25051
25275
 
@@ -25289,7 +25513,7 @@
25289
25513
 
25290
25514
  const styles$5 = css `
25291
25515
  ${display('inline-block')}
25292
- ${styles$o}
25516
+ ${styles$r}
25293
25517
 
25294
25518
  :host {
25295
25519
  font: ${bodyFont};