@ni/spright-components 3.0.8 → 4.0.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.
@@ -16061,6 +16061,7 @@
16061
16061
  const DigitalGreenDark110 = "#00613f";
16062
16062
  const PowerGreen = "#32eb96";
16063
16063
  const PowerGreen10 = "#364941";
16064
+ const Black22 = "#e6e6e6";
16064
16065
  const Black82 = "#434445";
16065
16066
  const NiHoneyLight = "#ffe76b";
16066
16067
  const NiScarlet = "#ef463f";
@@ -16215,6 +16216,7 @@
16215
16216
  spinnerSmallHeight: 'spinner-small-height',
16216
16217
  spinnerMediumHeight: 'spinner-medium-height',
16217
16218
  spinnerLargeHeight: 'spinner-large-height',
16219
+ tableFitRowsHeight: 'table-fit-rows-height',
16218
16220
  smallDelay: 'small-delay',
16219
16221
  mediumDelay: 'medium-delay',
16220
16222
  largeDelay: 'large-delay',
@@ -16406,7 +16408,9 @@
16406
16408
  calendarEventBackgroundHoverTransientColor: 'calendar-event-background-hover-transient-color',
16407
16409
  calendarRowBackgroundSelectedColor: 'calendar-row-background-selected-color',
16408
16410
  calendarEventFillBlockedColor: 'calendar-event-fill-blocked-color',
16409
- calendarGrabHandleBackgroundColor: 'calendar-grab-handle-background-color'
16411
+ calendarGrabHandleBackgroundColor: 'calendar-grab-handle-background-color',
16412
+ calendarGridBorderColor: 'calendar-grid-border-color',
16413
+ calendarGroupHeaderBackgroundColor: 'calendar-group-header-background-color'
16410
16414
  };
16411
16415
  const prefix = 'ni-nimble';
16412
16416
  const styleNameFromTokenName = (tokenName) => `${prefix}-${tokenName}`;
@@ -16680,7 +16684,9 @@
16680
16684
  DesignToken.create(styleNameFromTokenName(tokenNames.calendarEventBackgroundHoverTransientColor)).withDefault((element) => getColorForTheme(element, DigitalGreenDark110, DigitalGreenDark105, DigitalGreenDark105));
16681
16685
  DesignToken.create(styleNameFromTokenName(tokenNames.calendarRowBackgroundSelectedColor)).withDefault((element) => getColorForTheme(element, hexToRgbaCssColor(DigitalGreenLight, 0.2), hexToRgbaCssColor(PowerGreen, 0.2), hexToRgbaCssColor(PowerGreen, 0.2)));
16682
16686
  DesignToken.create(styleNameFromTokenName(tokenNames.calendarEventFillBlockedColor)).withDefault((element) => getColorForTheme(element, hexToRgbaCssColor(Black91, 0.07), Black82, Black82));
16683
- DesignToken.create(styleNameFromTokenName(tokenNames.calendarGrabHandleBackgroundColor)).withDefault((element) => getColorForTheme(element, DigitalGreenLight, DigitalGreenLight, DigitalGreenLight));
16687
+ DesignToken.create(styleNameFromTokenName(tokenNames.calendarGrabHandleBackgroundColor)).withDefault((element) => getColorForTheme(element, DigitalGreenLight, PowerGreen, PowerGreen));
16688
+ DesignToken.create(styleNameFromTokenName(tokenNames.calendarGridBorderColor)).withDefault((element) => getColorForTheme(element, Black22, Black80, Black80));
16689
+ DesignToken.create(styleNameFromTokenName(tokenNames.calendarGroupHeaderBackgroundColor)).withDefault((element) => getColorForTheme(element, Black7, hexToRgbaCssColor(Black91, 0.1), hexToRgbaCssColor(Black91, 0.1)));
16684
16690
  // Component Sizing Tokens
16685
16691
  const controlHeight = DesignToken.create(styleNameFromTokenName(tokenNames.controlHeight)).withDefault('32px');
16686
16692
  const controlSlimHeight = DesignToken.create(styleNameFromTokenName(tokenNames.controlSlimHeight)).withDefault('24px');
@@ -16703,6 +16709,9 @@
16703
16709
  const spinnerSmallHeight = DesignToken.create(styleNameFromTokenName(tokenNames.spinnerSmallHeight)).withDefault('16px');
16704
16710
  DesignToken.create(styleNameFromTokenName(tokenNames.spinnerMediumHeight)).withDefault('32px');
16705
16711
  DesignToken.create(styleNameFromTokenName(tokenNames.spinnerLargeHeight)).withDefault('64px');
16712
+ // The token gets a default value of the table's default height (480px)
16713
+ // but is given a calculated value in the table styles.
16714
+ const tableFitRowsHeight = DesignToken.create(styleNameFromTokenName(tokenNames.tableFitRowsHeight)).withDefault('480px');
16706
16715
  // Drop Shadow Tokens
16707
16716
  DesignToken.create(styleNameFromTokenName(tokenNames.elevation1BoxShadow)).withDefault((element) => `0px 1px 4px ${hexToRgbaCssColor(getColorForTheme(element, Black, Black, Black), 0.16)}`);
16708
16717
  const elevation2BoxShadow = DesignToken.create(styleNameFromTokenName(tokenNames.elevation2BoxShadow)).withDefault((element) => `0px 2px 4px ${hexToRgbaCssColor(getColorForTheme(element, Black, Black, Black), 0.16)}`);
@@ -65610,6 +65619,15 @@ img.ProseMirror-separator {
65610
65619
 
65611
65620
  :host {
65612
65621
  height: 480px;
65622
+ ${tableFitRowsHeight.cssCustomProperty}: calc(var(--ni-private-table-scroll-height) + ${controlHeight});
65623
+ ${
65624
+ /**
65625
+ * Set a default maximum height for the table of 40.5 rows plus the header row so
65626
+ * that clients don't accidentally create a table that tries to render too many rows at once.
65627
+ * If needed, the max-height can be overridden by the client, but setting a default ensures
65628
+ * that the max-height is considered if a larger one is needed rather than being overlooked.
65629
+ */ ''}
65630
+ max-height: calc(${controlHeight} + (40.5 * (2 * ${borderWidth} + ${controlHeight})));
65613
65631
  --ni-private-column-divider-width: 2px;
65614
65632
  --ni-private-column-divider-padding: 3px;
65615
65633
  }
@@ -66936,11 +66954,11 @@ focus outline in that case.
66936
66954
  aria-multiselectable="${x => x.ariaMultiSelectable}"
66937
66955
  ${children$1({ property: 'childItems', filter: elements() })}
66938
66956
  >
66957
+ <style>:host{ --ni-private-table-scroll-height: ${x => x.virtualizer.scrollHeight}px; }</style>
66939
66958
  <div class="table-container ${x => (x.windowShiftKeyDown ? 'disable-select' : '')}"
66940
66959
  style="
66941
66960
  --ni-private-table-scroll-x: -${x => x.scrollX}px;
66942
66961
  --ni-private-table-header-container-margin-right: ${x => x.virtualizer.headerContainerMarginRight}px;
66943
- --ni-private-table-scroll-height: ${x => x.virtualizer.scrollHeight}px;
66944
66962
  --ni-private-table-row-container-top: ${x => x.virtualizer.rowContainerYOffset}px;
66945
66963
  --ni-private-table-row-grid-columns: ${x => (x.rowGridColumns ? x.rowGridColumns : '')};
66946
66964
  --ni-private-table-cursor-override: ${x => (x.layoutManager.isColumnBeingSized ? 'col-resize' : 'default')};