@ni/nimble-components 17.0.2 → 17.0.4

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 (52) hide show
  1. package/dist/all-components-bundle.js +290 -134
  2. package/dist/all-components-bundle.js.map +1 -1
  3. package/dist/all-components-bundle.min.js +542 -470
  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/table/components/cell/index.d.ts +15 -3
  9. package/dist/esm/table/components/cell/index.js +32 -2
  10. package/dist/esm/table/components/cell/index.js.map +1 -1
  11. package/dist/esm/table/components/cell/styles.js +8 -1
  12. package/dist/esm/table/components/cell/styles.js.map +1 -1
  13. package/dist/esm/table/components/cell/template.d.ts +1 -1
  14. package/dist/esm/table/components/cell/template.js +2 -2
  15. package/dist/esm/table/components/cell/template.js.map +1 -1
  16. package/dist/esm/table/components/header/styles.js +2 -2
  17. package/dist/esm/table/components/header/styles.js.map +1 -1
  18. package/dist/esm/table/components/row/index.d.ts +7 -5
  19. package/dist/esm/table/components/row/index.js +20 -5
  20. package/dist/esm/table/components/row/index.js.map +1 -1
  21. package/dist/esm/table/components/row/styles.js +4 -11
  22. package/dist/esm/table/components/row/styles.js.map +1 -1
  23. package/dist/esm/table/components/row/template.d.ts +1 -1
  24. package/dist/esm/table/components/row/template.js +3 -1
  25. package/dist/esm/table/components/row/template.js.map +1 -1
  26. package/dist/esm/table/index.d.ts +2 -2
  27. package/dist/esm/table/index.js +3 -12
  28. package/dist/esm/table/index.js.map +1 -1
  29. package/dist/esm/table/styles.js +40 -2
  30. package/dist/esm/table/styles.js.map +1 -1
  31. package/dist/esm/table/template.js +15 -4
  32. package/dist/esm/table/template.js.map +1 -1
  33. package/dist/esm/table/types.d.ts +17 -1
  34. package/dist/esm/table-column/base/index.d.ts +31 -0
  35. package/dist/esm/table-column/base/index.js +7 -0
  36. package/dist/esm/table-column/base/index.js.map +1 -0
  37. package/dist/esm/table-column/base/styles.d.ts +1 -0
  38. package/dist/esm/table-column/base/styles.js +7 -0
  39. package/dist/esm/table-column/base/styles.js.map +1 -0
  40. package/dist/esm/table-column/base/template.d.ts +1 -0
  41. package/dist/esm/table-column/base/template.js +7 -0
  42. package/dist/esm/table-column/base/template.js.map +1 -0
  43. package/dist/esm/table-column/text/index.d.ts +18 -0
  44. package/dist/esm/table-column/text/index.js +40 -0
  45. package/dist/esm/table-column/text/index.js.map +1 -0
  46. package/dist/esm/table-column/text/styles.d.ts +1 -0
  47. package/dist/esm/table-column/text/styles.js +16 -0
  48. package/dist/esm/table-column/text/styles.js.map +1 -0
  49. package/dist/esm/table-column/text/template.d.ts +3 -0
  50. package/dist/esm/table-column/text/template.js +11 -0
  51. package/dist/esm/table-column/text/template.js.map +1 -0
  52. package/package.json +1 -1
@@ -15713,9 +15713,9 @@
15713
15713
  const prefix = 'ni-nimble';
15714
15714
  const styleNameFromTokenName = (tokenName) => `${prefix}-${tokenName}`;
15715
15715
 
15716
- const template$g = html `<slot></slot>`;
15716
+ const template$h = html `<slot></slot>`;
15717
15717
 
15718
- const styles$F = css `
15718
+ const styles$G = css `
15719
15719
  :host {
15720
15720
  display: contents;
15721
15721
  }
@@ -15771,8 +15771,8 @@
15771
15771
  ], ThemeProvider.prototype, "theme", void 0);
15772
15772
  const nimbleDesignSystemProvider = ThemeProvider.compose({
15773
15773
  baseName: 'theme-provider',
15774
- styles: styles$F,
15775
- template: template$g
15774
+ styles: styles$G,
15775
+ template: template$h
15776
15776
  });
15777
15777
  DesignSystem.getOrCreate()
15778
15778
  .withPrefix('nimble')
@@ -15931,7 +15931,7 @@
15931
15931
  }
15932
15932
  }
15933
15933
 
15934
- const styles$E = css `
15934
+ const styles$F = css `
15935
15935
  ${display('inline')}
15936
15936
 
15937
15937
  :host {
@@ -16014,7 +16014,7 @@
16014
16014
  `;
16015
16015
 
16016
16016
  // prettier-ignore
16017
- const template$f = (context, definition) => html `
16017
+ const template$g = (context, definition) => html `
16018
16018
  <a
16019
16019
  class="control"
16020
16020
  part="control"
@@ -16087,8 +16087,8 @@
16087
16087
  const nimbleAnchor = Anchor.compose({
16088
16088
  baseName: 'anchor',
16089
16089
  baseClass: Anchor$1,
16090
- template: template$f,
16091
- styles: styles$E,
16090
+ template: template$g,
16091
+ styles: styles$F,
16092
16092
  shadowOptions: {
16093
16093
  delegatesFocus: true
16094
16094
  }
@@ -16173,7 +16173,7 @@
16173
16173
  return new MultivaluePropertyStyleSheetBehavior('appearance', value, styles);
16174
16174
  }
16175
16175
 
16176
- const styles$D = css `
16176
+ const styles$E = css `
16177
16177
  ${display('inline-flex')}
16178
16178
 
16179
16179
  :host {
@@ -16454,8 +16454,8 @@
16454
16454
  }
16455
16455
  `));
16456
16456
 
16457
- const styles$C = css `
16458
- ${styles$D}
16457
+ const styles$D = css `
16458
+ ${styles$E}
16459
16459
  ${buttonAppearanceVariantStyles}
16460
16460
 
16461
16461
  .control {
@@ -16463,7 +16463,7 @@
16463
16463
  }
16464
16464
  `;
16465
16465
 
16466
- const template$e = (context, definition) => html `
16466
+ const template$f = (context, definition) => html `
16467
16467
  <a
16468
16468
  class="control"
16469
16469
  part="control"
@@ -16545,15 +16545,15 @@
16545
16545
  ], AnchorButton.prototype, "disabled", void 0);
16546
16546
  const nimbleAnchorButton = AnchorButton.compose({
16547
16547
  baseName: 'anchor-button',
16548
- template: template$e,
16549
- styles: styles$C,
16548
+ template: template$f,
16549
+ styles: styles$D,
16550
16550
  shadowOptions: {
16551
16551
  delegatesFocus: true
16552
16552
  }
16553
16553
  });
16554
16554
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorButton());
16555
16555
 
16556
- const styles$B = css `
16556
+ const styles$C = css `
16557
16557
  :host {
16558
16558
  contain: layout;
16559
16559
  display: block;
@@ -16577,13 +16577,13 @@
16577
16577
  baseName: 'anchored-region',
16578
16578
  baseClass: AnchoredRegion$1,
16579
16579
  template: anchoredRegionTemplate,
16580
- styles: styles$B
16580
+ styles: styles$C
16581
16581
  });
16582
16582
  DesignSystem.getOrCreate()
16583
16583
  .withPrefix('nimble')
16584
16584
  .register(nimbleAnchoredRegion());
16585
16585
 
16586
- const styles$A = css `
16586
+ const styles$B = css `
16587
16587
  ${display('inline-block')}
16588
16588
 
16589
16589
  :host {
@@ -16624,7 +16624,7 @@
16624
16624
  baseName: 'breadcrumb',
16625
16625
  baseClass: Breadcrumb$1,
16626
16626
  template: breadcrumbTemplate,
16627
- styles: styles$A
16627
+ styles: styles$B
16628
16628
  });
16629
16629
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBreadcrumb());
16630
16630
 
@@ -17230,7 +17230,7 @@
17230
17230
  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
17231
  };
17232
17232
 
17233
- const styles$z = css `
17233
+ const styles$A = css `
17234
17234
  ${display('inline-flex')}
17235
17235
 
17236
17236
  :host {
@@ -17309,15 +17309,15 @@
17309
17309
  baseName: 'breadcrumb-item',
17310
17310
  baseClass: BreadcrumbItem$1,
17311
17311
  template: breadcrumbItemTemplate,
17312
- styles: styles$z,
17312
+ styles: styles$A,
17313
17313
  separator: forwardSlash16X16.data
17314
17314
  });
17315
17315
  DesignSystem.getOrCreate()
17316
17316
  .withPrefix('nimble')
17317
17317
  .register(nimbleBreadcrumbItem());
17318
17318
 
17319
- const styles$y = css `
17320
- ${styles$D}
17319
+ const styles$z = css `
17320
+ ${styles$E}
17321
17321
  ${buttonAppearanceVariantStyles}
17322
17322
  `;
17323
17323
 
@@ -17363,7 +17363,7 @@
17363
17363
  baseName: 'button',
17364
17364
  baseClass: Button$1,
17365
17365
  template: buttonTemplate,
17366
- styles: styles$y,
17366
+ styles: styles$z,
17367
17367
  shadowOptions: {
17368
17368
  delegatesFocus: true
17369
17369
  }
@@ -17443,7 +17443,7 @@
17443
17443
  */
17444
17444
  const themeBehavior = (theme, styles) => new ThemeStyleSheetBehavior(theme, styles);
17445
17445
 
17446
- const styles$x = css `
17446
+ const styles$y = css `
17447
17447
  ${display('inline-flex')}
17448
17448
 
17449
17449
  :host {
@@ -17602,14 +17602,14 @@
17602
17602
  const nimbleCardButton = CardButton.compose({
17603
17603
  baseName: 'card-button',
17604
17604
  template: buttonTemplate,
17605
- styles: styles$x,
17605
+ styles: styles$y,
17606
17606
  shadowOptions: {
17607
17607
  delegatesFocus: true
17608
17608
  }
17609
17609
  });
17610
17610
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCardButton());
17611
17611
 
17612
- const styles$w = css `
17612
+ const styles$x = css `
17613
17613
  ${display('inline-flex')}
17614
17614
 
17615
17615
  :host {
@@ -17727,14 +17727,14 @@
17727
17727
  baseName: 'checkbox',
17728
17728
  baseClass: Checkbox$1,
17729
17729
  template: checkboxTemplate,
17730
- styles: styles$w,
17730
+ styles: styles$x,
17731
17731
  checkedIndicator: check16X16.data,
17732
17732
  indeterminateIndicator: minus16X16.data
17733
17733
  });
17734
17734
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCheckbox());
17735
17735
 
17736
- const styles$v = css `
17737
- ${styles$D}
17736
+ const styles$w = css `
17737
+ ${styles$E}
17738
17738
 
17739
17739
  .control[aria-pressed='true'] {
17740
17740
  background-color: ${fillSelectedColor};
@@ -17760,7 +17760,7 @@
17760
17760
  }
17761
17761
  `;
17762
17762
 
17763
- const template$d = (context, definition) => html `
17763
+ const template$e = (context, definition) => html `
17764
17764
  <div
17765
17765
  role="button"
17766
17766
  part="control"
@@ -17835,8 +17835,8 @@
17835
17835
  applyMixins(ToggleButton, StartEnd, DelegatesARIAButton);
17836
17836
  const nimbleToggleButton = ToggleButton.compose({
17837
17837
  baseName: 'toggle-button',
17838
- template: template$d,
17839
- styles: styles$v,
17838
+ template: template$e,
17839
+ styles: styles$w,
17840
17840
  shadowOptions: {
17841
17841
  delegatesFocus: true
17842
17842
  }
@@ -17849,13 +17849,13 @@
17849
17849
  </div>
17850
17850
  `;
17851
17851
 
17852
- const template$c = html `
17852
+ const template$d = html `
17853
17853
  <template>
17854
17854
  <div class="icon" :innerHTML=${x => x.icon.data}></div>
17855
17855
  </template
17856
17856
  `;
17857
17857
 
17858
- const styles$u = css `
17858
+ const styles$v = css `
17859
17859
  ${display('inline-flex')}
17860
17860
 
17861
17861
  :host {
@@ -17908,8 +17908,8 @@
17908
17908
  const registerIcon = (baseName, iconClass) => {
17909
17909
  const composedIcon = iconClass.compose({
17910
17910
  baseName,
17911
- template: template$c,
17912
- styles: styles$u,
17911
+ template: template$d,
17912
+ styles: styles$v,
17913
17913
  baseClass: iconClass
17914
17914
  });
17915
17915
  DesignSystem.getOrCreate().withPrefix('nimble').register(composedIcon());
@@ -17943,7 +17943,7 @@
17943
17943
  block: 'block'
17944
17944
  };
17945
17945
 
17946
- const styles$t = css `
17946
+ const styles$u = css `
17947
17947
  ${display('inline-flex')}
17948
17948
 
17949
17949
  :host {
@@ -18171,7 +18171,7 @@
18171
18171
  }
18172
18172
  `));
18173
18173
 
18174
- const styles$s = css `
18174
+ const styles$t = css `
18175
18175
  .error-icon {
18176
18176
  display: none;
18177
18177
  }
@@ -18209,9 +18209,9 @@
18209
18209
  }
18210
18210
  `;
18211
18211
 
18212
- const styles$r = css `
18212
+ const styles$s = css `
18213
+ ${styles$u}
18213
18214
  ${styles$t}
18214
- ${styles$s}
18215
18215
 
18216
18216
  :host {
18217
18217
  --ni-private-hover-bottom-border-width: 2px;
@@ -18447,7 +18447,7 @@
18447
18447
  baseName: 'combobox',
18448
18448
  baseClass: Combobox$1,
18449
18449
  template: comboboxTemplate,
18450
- styles: styles$r,
18450
+ styles: styles$s,
18451
18451
  shadowOptions: {
18452
18452
  delegatesFocus: true
18453
18453
  },
@@ -18491,7 +18491,7 @@
18491
18491
  */
18492
18492
  const UserDismissed = Symbol('user dismissed');
18493
18493
 
18494
- const styles$q = css `
18494
+ const styles$r = css `
18495
18495
  ${display('grid')}
18496
18496
 
18497
18497
  dialog {
@@ -18607,7 +18607,7 @@
18607
18607
  }
18608
18608
  `));
18609
18609
 
18610
- const template$b = html `
18610
+ const template$c = html `
18611
18611
  <template>
18612
18612
  <dialog
18613
18613
  ${ref('dialogElement')}
@@ -18733,13 +18733,13 @@
18733
18733
  applyMixins(Dialog, ARIAGlobalStatesAndProperties);
18734
18734
  const nimbleDialog = Dialog.compose({
18735
18735
  baseName: 'dialog',
18736
- template: template$b,
18737
- styles: styles$q,
18736
+ template: template$c,
18737
+ styles: styles$r,
18738
18738
  baseClass: Dialog
18739
18739
  });
18740
18740
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDialog());
18741
18741
 
18742
- const styles$p = css `
18742
+ const styles$q = css `
18743
18743
  ${display('block')}
18744
18744
 
18745
18745
  :host {
@@ -18892,7 +18892,7 @@
18892
18892
  }
18893
18893
  `));
18894
18894
 
18895
- const template$a = html `
18895
+ const template$b = html `
18896
18896
  <dialog
18897
18897
  ${ref('dialog')}
18898
18898
  aria-label="${x => x.ariaLabel}"
@@ -19006,8 +19006,8 @@
19006
19006
  applyMixins(Drawer, ARIAGlobalStatesAndProperties);
19007
19007
  const nimbleDrawer = Drawer.compose({
19008
19008
  baseName: 'drawer',
19009
- template: template$a,
19010
- styles: styles$p
19009
+ template: template$b,
19010
+ styles: styles$q
19011
19011
  });
19012
19012
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDrawer());
19013
19013
 
@@ -20639,7 +20639,7 @@
20639
20639
  }
20640
20640
  registerIcon('icon-xmark-check', IconXmarkCheck);
20641
20641
 
20642
- const styles$o = css `
20642
+ const styles$p = css `
20643
20643
  ${display('flex')}
20644
20644
 
20645
20645
  :host {
@@ -20719,11 +20719,11 @@
20719
20719
  baseName: 'list-option',
20720
20720
  baseClass: ListboxOption,
20721
20721
  template: listboxOptionTemplate,
20722
- styles: styles$o
20722
+ styles: styles$p
20723
20723
  });
20724
20724
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleListOption());
20725
20725
 
20726
- const styles$n = css `
20726
+ const styles$o = css `
20727
20727
  ${display('grid')}
20728
20728
 
20729
20729
  :host {
@@ -20778,11 +20778,11 @@
20778
20778
  baseName: 'menu',
20779
20779
  baseClass: Menu$1,
20780
20780
  template: menuTemplate,
20781
- styles: styles$n
20781
+ styles: styles$o
20782
20782
  });
20783
20783
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenu());
20784
20784
 
20785
- const styles$m = css `
20785
+ const styles$n = css `
20786
20786
  ${display('inline-block')}
20787
20787
 
20788
20788
  :host {
@@ -20801,7 +20801,7 @@
20801
20801
  `;
20802
20802
 
20803
20803
  // prettier-ignore
20804
- const template$9 = html `
20804
+ const template$a = html `
20805
20805
  <template
20806
20806
  ?open="${x => x.open}"
20807
20807
  @focusout="${(x, c) => x.focusoutHandler(c.event)}"
@@ -21009,15 +21009,15 @@
21009
21009
  ], MenuButton.prototype, "slottedMenus", void 0);
21010
21010
  const nimbleMenuButton = MenuButton.compose({
21011
21011
  baseName: 'menu-button',
21012
- template: template$9,
21013
- styles: styles$m,
21012
+ template: template$a,
21013
+ styles: styles$n,
21014
21014
  shadowOptions: {
21015
21015
  delegatesFocus: true
21016
21016
  }
21017
21017
  });
21018
21018
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenuButton());
21019
21019
 
21020
- const styles$l = css `
21020
+ const styles$m = css `
21021
21021
  ${display('grid')}
21022
21022
 
21023
21023
  :host {
@@ -21115,7 +21115,7 @@
21115
21115
  baseName: 'menu-item',
21116
21116
  baseClass: MenuItem$1,
21117
21117
  template: menuItemTemplate,
21118
- styles: styles$l,
21118
+ styles: styles$m,
21119
21119
  expandCollapseGlyph: arrowExpanderRight16X16.data
21120
21120
  });
21121
21121
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenuItem());
@@ -21129,9 +21129,9 @@
21129
21129
  block: 'block'
21130
21130
  };
21131
21131
 
21132
- const styles$k = css `
21132
+ const styles$l = css `
21133
21133
  ${display('inline-block')}
21134
- ${styles$s}
21134
+ ${styles$t}
21135
21135
 
21136
21136
  :host {
21137
21137
  font: ${bodyFont};
@@ -21345,7 +21345,7 @@
21345
21345
  baseName: 'number-field',
21346
21346
  baseClass: NumberField$1,
21347
21347
  template: numberFieldTemplate,
21348
- styles: styles$k,
21348
+ styles: styles$l,
21349
21349
  shadowOptions: {
21350
21350
  delegatesFocus: true
21351
21351
  },
@@ -21386,7 +21386,7 @@
21386
21386
  });
21387
21387
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleNumberField());
21388
21388
 
21389
- const styles$j = css `
21389
+ const styles$k = css `
21390
21390
  ${display('inline-flex')}
21391
21391
 
21392
21392
  :host {
@@ -21486,12 +21486,12 @@
21486
21486
  baseName: 'radio',
21487
21487
  baseClass: Radio$1,
21488
21488
  template: radioTemplate,
21489
- styles: styles$j,
21489
+ styles: styles$k,
21490
21490
  checkedIndicator: circleFilled16X16.data
21491
21491
  });
21492
21492
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleRadio());
21493
21493
 
21494
- const styles$i = css `
21494
+ const styles$j = css `
21495
21495
  ${display('inline-block')}
21496
21496
 
21497
21497
  .positioning-region {
@@ -21526,16 +21526,16 @@
21526
21526
  baseName: 'radio-group',
21527
21527
  baseClass: RadioGroup$1,
21528
21528
  template: radioGroupTemplate,
21529
- styles: styles$i,
21529
+ styles: styles$j,
21530
21530
  shadowOptions: {
21531
21531
  delegatesFocus: true
21532
21532
  }
21533
21533
  });
21534
21534
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleRadioGroup());
21535
21535
 
21536
- const styles$h = css `
21536
+ const styles$i = css `
21537
+ ${styles$u}
21537
21538
  ${styles$t}
21538
- ${styles$s}
21539
21539
 
21540
21540
  ${
21541
21541
  /* We are using flex `order` to define the visual ordering of the selected value,
@@ -21611,7 +21611,7 @@
21611
21611
  baseName: 'select',
21612
21612
  baseClass: Select$1,
21613
21613
  template: selectTemplate,
21614
- styles: styles$h,
21614
+ styles: styles$i,
21615
21615
  indicator: arrowExpanderDown16X16.data,
21616
21616
  end: html `
21617
21617
  <${DesignSystem.tagFor(IconExclamationMark)}
@@ -21623,7 +21623,7 @@
21623
21623
  });
21624
21624
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSelect());
21625
21625
 
21626
- const styles$g = css `
21626
+ const styles$h = css `
21627
21627
  ${display('inline-flex')}
21628
21628
 
21629
21629
  :host {
@@ -21767,7 +21767,7 @@
21767
21767
  }
21768
21768
  `));
21769
21769
 
21770
- const template$8 = html `
21770
+ const template$9 = html `
21771
21771
  <template role="progressbar">
21772
21772
  <div class="container">
21773
21773
  <div class="bit1"></div>
@@ -21784,12 +21784,12 @@
21784
21784
  }
21785
21785
  const nimbleSpinner = Spinner.compose({
21786
21786
  baseName: 'spinner',
21787
- template: template$8,
21788
- styles: styles$g
21787
+ template: template$9,
21788
+ styles: styles$h
21789
21789
  });
21790
21790
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSpinner());
21791
21791
 
21792
- const styles$f = css `
21792
+ const styles$g = css `
21793
21793
  ${display('inline-flex')}
21794
21794
 
21795
21795
  :host {
@@ -21952,7 +21952,7 @@
21952
21952
  `));
21953
21953
 
21954
21954
  // prettier-ignore
21955
- const template$7 = html `
21955
+ const template$8 = html `
21956
21956
  <template
21957
21957
  role="switch"
21958
21958
  aria-checked="${x => x.checked}"
@@ -21996,12 +21996,12 @@
21996
21996
  const nimbleSwitch = Switch.compose({
21997
21997
  baseClass: Switch$1,
21998
21998
  baseName: 'switch',
21999
- template: template$7,
22000
- styles: styles$f
21999
+ template: template$8,
22000
+ styles: styles$g
22001
22001
  });
22002
22002
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSwitch());
22003
22003
 
22004
- const styles$e = css `
22004
+ const styles$f = css `
22005
22005
  ${display('inline-flex')}
22006
22006
 
22007
22007
  :host {
@@ -22106,11 +22106,11 @@
22106
22106
  baseName: 'tab',
22107
22107
  baseClass: Tab$1,
22108
22108
  template: tabTemplate,
22109
- styles: styles$e
22109
+ styles: styles$f
22110
22110
  });
22111
22111
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTab());
22112
22112
 
22113
- const styles$d = css `
22113
+ const styles$e = css `
22114
22114
  ${display('block')}
22115
22115
 
22116
22116
  :host {
@@ -22130,7 +22130,7 @@
22130
22130
  baseName: 'tab-panel',
22131
22131
  baseClass: TabPanel$1,
22132
22132
  template: tabPanelTemplate,
22133
- styles: styles$d
22133
+ styles: styles$e
22134
22134
  });
22135
22135
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTabPanel());
22136
22136
 
@@ -25128,7 +25128,7 @@
25128
25128
  }
25129
25129
  }
25130
25130
 
25131
- const styles$c = css `
25131
+ const styles$d = css `
25132
25132
  ${display('flex')}
25133
25133
 
25134
25134
  .table-container {
@@ -25148,28 +25148,62 @@
25148
25148
  .header-row {
25149
25149
  display: flex;
25150
25150
  flex-direction: row;
25151
+ background: ${applicationBackgroundColor};
25152
+ position: relative;
25151
25153
  }
25152
25154
 
25153
25155
  .header {
25154
25156
  flex: 1;
25155
25157
  }
25156
- `;
25157
25158
 
25158
- const styles$b = css `
25159
+ .row {
25160
+ background: ${applicationBackgroundColor};
25161
+ position: relative;
25162
+ }
25163
+
25164
+ .row::before {
25165
+ content: '';
25166
+ width: 100%;
25167
+ height: 100%;
25168
+ position: absolute;
25169
+ }
25170
+
25171
+ .row:hover::before {
25172
+ background: ${fillHoverColor};
25173
+ }
25174
+ `.withBehaviors(themeBehavior(Theme.color, css `
25175
+ .header-row::before {
25176
+ content: '';
25177
+ width: 100%;
25178
+ height: 100%;
25179
+ position: absolute;
25180
+ background: ${fillHoverColor};
25181
+ }
25182
+
25183
+ .row::before {
25184
+ background: ${fillHoverColor};
25185
+ }
25186
+
25187
+ .row:hover::before {
25188
+ background: ${hexToRgbaCssColor(White, 0.15)};
25189
+ }
25190
+ `));
25191
+
25192
+ const styles$c = css `
25159
25193
  ${display('flex')}
25160
25194
 
25161
25195
  :host {
25162
25196
  height: ${controlHeight};
25163
25197
  align-items: center;
25164
- background: ${applicationBackgroundColor};
25165
25198
  padding: 0px calc(${standardPadding} / 2);
25166
25199
  font: ${tableHeaderFont};
25167
25200
  color: ${tableHeaderFontColor};
25201
+ text-transform: uppercase;
25168
25202
  }
25169
25203
  `;
25170
25204
 
25171
25205
  // prettier-ignore
25172
- const template$6 = html `
25206
+ const template$7 = html `
25173
25207
  <template role="columnheader">
25174
25208
  <slot></slot>
25175
25209
  </template>
@@ -25183,42 +25217,42 @@
25183
25217
  }
25184
25218
  const nimbleTableHeader = TableHeader.compose({
25185
25219
  baseName: 'table-header',
25186
- template: template$6,
25187
- styles: styles$b
25220
+ template: template$7,
25221
+ styles: styles$c
25188
25222
  });
25189
25223
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableHeader());
25190
25224
 
25191
- const styles$a = css `
25192
- ${display('flex')}
25225
+ const styles$b = css `
25226
+ ${display('grid')}
25193
25227
 
25194
25228
  :host {
25195
25229
  height: ${controlHeight};
25196
- background: ${applicationBackgroundColor};
25197
25230
  border-top: calc(2 * ${borderWidth}) solid ${tableRowBorderColor};
25198
- }
25199
-
25200
- .cell {
25201
- flex: 1;
25202
- }
25203
-
25204
- :host(:hover) .cell {
25205
- background: ${fillHoverColor};
25231
+ grid-auto-flow: column;
25232
+ grid-auto-columns: 1fr;
25206
25233
  }
25207
25234
  `;
25208
25235
 
25209
- const styles$9 = css `
25210
- ${display('flex')}
25236
+ const styles$a = css `
25237
+ ${display('grid')}
25211
25238
 
25212
25239
  :host {
25213
25240
  padding: 0px calc(${standardPadding} / 2);
25241
+ align-self: center;
25242
+ height: 100%;
25243
+ }
25244
+
25245
+ .cell-content-container {
25246
+ overflow: hidden;
25247
+ display: flex;
25214
25248
  align-items: center;
25215
25249
  }
25216
25250
  `;
25217
25251
 
25218
25252
  // prettier-ignore
25219
- const template$5 = html `
25253
+ const template$6 = html `
25220
25254
  <template role="cell">
25221
- ${x => x.data}
25255
+ <div ${ref('cellContentContainer')} class="cell-content-container"></div>
25222
25256
  </template>
25223
25257
  `;
25224
25258
 
@@ -25227,24 +25261,56 @@
25227
25261
  * @internal
25228
25262
  */
25229
25263
  class TableCell extends FoundationElement {
25264
+ constructor() {
25265
+ super(...arguments);
25266
+ this.customCellView = undefined;
25267
+ }
25268
+ connectedCallback() {
25269
+ super.connectedCallback();
25270
+ this.customCellView = this.cellTemplate?.render(this.cellState, this.cellContentContainer);
25271
+ }
25272
+ cellStateChanged() {
25273
+ this.customCellView?.bind(this.cellState, defaultExecutionContext);
25274
+ }
25275
+ cellTemplateChanged() {
25276
+ if (this.isConnected) {
25277
+ this.customCellView = this.cellTemplate?.render(this.cellState, this.cellContentContainer);
25278
+ }
25279
+ }
25280
+ cellStylesChanged(prev, next) {
25281
+ if (prev) {
25282
+ this.$fastController.removeStyles(prev);
25283
+ }
25284
+ if (next) {
25285
+ this.$fastController.addStyles(next);
25286
+ }
25287
+ }
25230
25288
  }
25231
25289
  __decorate$1([
25232
25290
  observable
25233
- ], TableCell.prototype, "data", void 0);
25291
+ ], TableCell.prototype, "cellState", void 0);
25292
+ __decorate$1([
25293
+ observable
25294
+ ], TableCell.prototype, "cellTemplate", void 0);
25295
+ __decorate$1([
25296
+ observable
25297
+ ], TableCell.prototype, "cellStyles", void 0);
25234
25298
  const nimbleTableCell = TableCell.compose({
25235
25299
  baseName: 'table-cell',
25236
- template: template$5,
25237
- styles: styles$9
25300
+ template: template$6,
25301
+ styles: styles$a
25238
25302
  });
25239
25303
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableCell());
25240
25304
 
25241
25305
  // prettier-ignore
25242
- const template$4 = html `
25306
+ const template$5 = html `
25243
25307
  <template role="row">
25244
25308
  ${repeat(x => x.columns, html `
25245
25309
  <${DesignSystem.tagFor(TableCell)}
25246
25310
  class="cell"
25247
- :data="${(x, c) => c.parent.getCellValue(x)}"
25311
+ :cellTemplate="${x => x.cellTemplate}"
25312
+ :cellStyles="${x => x.cellStyles}"
25313
+ :cellState="${(x, c) => c.parent.getCellState(x)}"
25248
25314
  >
25249
25315
  </${DesignSystem.tagFor(TableCell)}>
25250
25316
  `)}
@@ -25258,50 +25324,81 @@
25258
25324
  class TableRow extends FoundationElement {
25259
25325
  constructor() {
25260
25326
  super(...arguments);
25261
- // TODO: Temporarily assume the set of columns will be an array of strings.
25262
- // Eventually, this will be an array of column definitions.
25263
25327
  this.columns = [];
25264
25328
  }
25265
- getCellValue(column) {
25266
- return this.data ? this.data[column] : undefined;
25329
+ getCellState(column) {
25330
+ const fieldNames = column.getDataRecordFieldNames();
25331
+ if (this.hasValidFieldNames(fieldNames) && this.dataRecord) {
25332
+ const cellDataValues = fieldNames.map(field => this.dataRecord[field]);
25333
+ const cellRecord = Object.fromEntries(column.cellRecordFieldNames.map((k, i) => [
25334
+ k,
25335
+ cellDataValues[i]
25336
+ ]));
25337
+ const columnConfig = column.getColumnConfig?.() ?? {};
25338
+ const cellState = {
25339
+ cellRecord,
25340
+ columnConfig
25341
+ };
25342
+ return cellState;
25343
+ }
25344
+ return { cellRecord: {}, columnConfig: {} };
25345
+ }
25346
+ hasValidFieldNames(keys) {
25347
+ return keys.every(key => key !== undefined);
25267
25348
  }
25268
25349
  }
25269
25350
  __decorate$1([
25270
25351
  observable
25271
- ], TableRow.prototype, "data", void 0);
25352
+ ], TableRow.prototype, "dataRecord", void 0);
25272
25353
  __decorate$1([
25273
25354
  observable
25274
25355
  ], TableRow.prototype, "columns", void 0);
25275
25356
  const nimbleTableRow = TableRow.compose({
25276
25357
  baseName: 'table-row',
25277
- template: template$4,
25278
- styles: styles$a
25358
+ template: template$5,
25359
+ styles: styles$b
25279
25360
  });
25280
25361
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableRow());
25281
25362
 
25363
+ /**
25364
+ * The base class for table columns
25365
+ */
25366
+ class TableColumn extends FoundationElement {
25367
+ }
25368
+
25369
+ const isTableColumn = () => {
25370
+ const filter = (value, _, __) => {
25371
+ return value instanceof TableColumn;
25372
+ };
25373
+ return filter;
25374
+ };
25282
25375
  // prettier-ignore
25283
- const template$3 = html `
25376
+ const template$4 = html `
25284
25377
  <template role="table">
25285
25378
  <div class="table-container">
25286
25379
  <div role="rowgroup" class="header-container">
25287
25380
  <div class="header-row" role="row">
25288
- ${repeat(x => x.columnHeaders, html `
25381
+ ${repeat(x => x.columns, html `
25289
25382
  <${DesignSystem.tagFor(TableHeader)} class="header">
25290
- ${x => x}
25383
+ ${x => x.textContent}
25291
25384
  </${DesignSystem.tagFor(TableHeader)}>
25292
25385
  `)}
25293
25386
  </div>
25294
25387
  </div>
25295
25388
  <div class="table-viewport" role="rowgroup">
25389
+ ${when(x => x.columns.length > 0, html `
25296
25390
  ${repeat(x => x.tableData, html `
25297
25391
  <${DesignSystem.tagFor(TableRow)}
25298
- :data="${x => x.data}"
25392
+ class="row"
25393
+ :dataRecord="${x => x.record}"
25299
25394
  :columns="${(_, c) => c.parent.columns}"
25300
25395
  >
25301
25396
  </${DesignSystem.tagFor(TableRow)}>
25302
25397
  `)}
25398
+ `)}
25303
25399
  </div>
25304
25400
  </div>
25401
+ <slot ${slotted({ property: 'columns', filter: isTableColumn() })}></slot>
25305
25402
  </template>
25306
25403
  `;
25307
25404
 
@@ -25316,11 +25413,7 @@
25316
25413
  * @internal
25317
25414
  */
25318
25415
  this.tableData = [];
25319
- // TODO: Temporarily expose the columns as a string array. This will ultimately be
25320
- // column definitions provided by slotted elements.
25321
25416
  this.columns = [];
25322
- // TODO: Temporarily expose the column headers as a string array.
25323
- this.columnHeaders = [];
25324
25417
  this.tableInitialized = false;
25325
25418
  this.tableValidator = new TableValidator();
25326
25419
  this.update = (state) => {
@@ -25387,7 +25480,7 @@
25387
25480
  refreshRows() {
25388
25481
  const rows = this.table.getRowModel().rows;
25389
25482
  this.tableData = rows.map(row => {
25390
- const rowState = { data: row.original };
25483
+ const rowState = { record: row.original };
25391
25484
  return rowState;
25392
25485
  });
25393
25486
  }
@@ -25396,8 +25489,8 @@
25396
25489
  this.update(this.table.initialState);
25397
25490
  this.refreshRows();
25398
25491
  }
25399
- // Temporarily auto-detect the keys in TData to make columns.
25400
- // TODO: Remove this logic when another way to specify columns is provided.
25492
+ // Generate columns for TanStack that correspond to all the keys in TData because all operations,
25493
+ // such as grouping and sorting, will be performed on the data's records, not the values rendered within a cell.
25401
25494
  generateColumns() {
25402
25495
  if (this.data.length === 0) {
25403
25496
  return;
@@ -25413,8 +25506,6 @@
25413
25506
  return columnDef;
25414
25507
  });
25415
25508
  this.updateTableOptions({ columns: generatedColumns });
25416
- this.columnHeaders = generatedColumns.map(x => x.header);
25417
- this.columns = this.columnHeaders;
25418
25509
  }
25419
25510
  }
25420
25511
  __decorate$1([
@@ -25429,16 +25520,81 @@
25429
25520
  __decorate$1([
25430
25521
  observable
25431
25522
  ], Table.prototype, "columns", void 0);
25432
- __decorate$1([
25433
- observable
25434
- ], Table.prototype, "columnHeaders", void 0);
25435
25523
  const nimbleTable = Table.compose({
25436
25524
  baseName: 'table',
25437
- template: template$3,
25438
- styles: styles$c
25525
+ template: template$4,
25526
+ styles: styles$d
25439
25527
  });
25440
25528
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTable());
25441
25529
 
25530
+ const styles$9 = css `
25531
+ :host {
25532
+ display: none;
25533
+ }
25534
+ `;
25535
+
25536
+ const template$3 = html `
25537
+ <template>
25538
+ <slot></slot>
25539
+ </template>
25540
+ `;
25541
+
25542
+ const cellStyles = css `
25543
+ span {
25544
+ font: ${bodyFont};
25545
+ color: ${bodyFontColor};
25546
+ white-space: nowrap;
25547
+ overflow: hidden;
25548
+ text-overflow: ellipsis;
25549
+ }
25550
+
25551
+ .placeholder {
25552
+ color: ${controlLabelFontColor};
25553
+ }
25554
+ `;
25555
+
25556
+ const cellTemplate = html `
25557
+ <span
25558
+ class="${x => (typeof x.cellRecord.value === 'string' ? '' : 'placeholder')}"
25559
+ >
25560
+ ${x => (typeof x.cellRecord.value === 'string'
25561
+ ? x.cellRecord.value
25562
+ : x.columnConfig.placeholder)}
25563
+ </span>
25564
+ `;
25565
+
25566
+ /**
25567
+ * The table column for displaying strings.
25568
+ */
25569
+ class TableColumnText extends TableColumn {
25570
+ constructor() {
25571
+ super(...arguments);
25572
+ this.cellRecordFieldNames = ['value'];
25573
+ this.cellStyles = cellStyles;
25574
+ this.cellTemplate = cellTemplate;
25575
+ }
25576
+ getColumnConfig() {
25577
+ return { placeholder: this.placeholder ?? '' };
25578
+ }
25579
+ getDataRecordFieldNames() {
25580
+ return [this.fieldName];
25581
+ }
25582
+ }
25583
+ __decorate$1([
25584
+ attr({ attribute: 'field-name' })
25585
+ ], TableColumnText.prototype, "fieldName", void 0);
25586
+ __decorate$1([
25587
+ attr
25588
+ ], TableColumnText.prototype, "placeholder", void 0);
25589
+ const nimbleTableColumnText = TableColumnText.compose({
25590
+ baseName: 'table-column-text',
25591
+ template: template$3,
25592
+ styles: styles$9
25593
+ });
25594
+ DesignSystem.getOrCreate()
25595
+ .withPrefix('nimble')
25596
+ .register(nimbleTableColumnText());
25597
+
25442
25598
  const styles$8 = css `
25443
25599
  ${display('grid')}
25444
25600
 
@@ -25679,7 +25835,7 @@
25679
25835
 
25680
25836
  const styles$5 = css `
25681
25837
  ${display('inline-block')}
25682
- ${styles$s}
25838
+ ${styles$t}
25683
25839
 
25684
25840
  :host {
25685
25841
  font: ${bodyFont};