@ni/spright-components 3.0.2 → 3.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.
@@ -16032,7 +16032,7 @@
16032
16032
 
16033
16033
  /**
16034
16034
  * Do not edit directly
16035
- * Generated on Tue, 06 Aug 2024 15:57:06 GMT
16035
+ * Generated on Fri, 09 Aug 2024 14:52:14 GMT
16036
16036
  */
16037
16037
 
16038
16038
  const Information100DarkUi = "#a46eff";
@@ -16154,29 +16154,6 @@
16154
16154
  const MediumDelay = "0.15s"; // Medium animation delay for control state change animation
16155
16155
  const LargeDelay = "0.25s"; // Long animation delay used for control state change animation
16156
16156
 
16157
- /**
16158
- * Convert a hexadecimal color string to an RGBA CSS color string
16159
- * Example: '#ff0102' to 'rgba(255, 1, 2, 1)'
16160
- * @param hexValue Hex color (with a starting '#')
16161
- * @param alpha CSS alpha value between 0 (transparent) and 1 (opaque)
16162
- * @returns An rgba()-formatted CSS color string
16163
- */
16164
- function hexToRgbaCssColor(hexValue, alpha) {
16165
- const { r, g, b } = parseColorHexRGB(hexValue);
16166
- return `rgba(${r * 255}, ${g * 255}, ${b * 255}, ${alpha})`;
16167
- }
16168
-
16169
- /**
16170
- * Static tokens to use for styling the `::backdrop` pseduo-element of an HTML dialog, which
16171
- * does not have access to CSS custom properties.
16172
- *
16173
- * See https://github.com/whatwg/fullscreen/issues/124
16174
- */
16175
- const modalBackdropColorThemeLightStatic = hexToRgbaCssColor(Black, 0.3);
16176
- const modalBackdropColorThemeDarkStatic = hexToRgbaCssColor(Black, 0.6);
16177
- const modalBackdropColorThemeColorStatic = hexToRgbaCssColor(Black, 0.6);
16178
- const largeDelayStatic = LargeDelay;
16179
-
16180
16157
  const Theme = {
16181
16158
  light: 'light',
16182
16159
  dark: 'dark',
@@ -16637,6 +16614,18 @@
16637
16614
  .register(nimbleDesignSystemProvider());
16638
16615
  const themeProviderTag = 'nimble-theme-provider';
16639
16616
 
16617
+ /**
16618
+ * Convert a hexadecimal color string to an RGBA CSS color string
16619
+ * Example: '#ff0102' to 'rgba(255, 1, 2, 1)'
16620
+ * @param hexValue Hex color (with a starting '#')
16621
+ * @param alpha CSS alpha value between 0 (transparent) and 1 (opaque)
16622
+ * @returns An rgba()-formatted CSS color string
16623
+ */
16624
+ function hexToRgbaCssColor(hexValue, alpha) {
16625
+ const { r, g, b } = parseColorHexRGB(hexValue);
16626
+ return `rgba(${r * 255}, ${g * 255}, ${b * 255}, ${alpha})`;
16627
+ }
16628
+
16640
16629
  // Color Tokens
16641
16630
  const actionRgbPartialColor = DesignToken.create(styleNameFromTokenName(tokenNames.actionRgbPartialColor)).withDefault((element) => hexToRgbPartial(getColorForTheme(element, Black91, Black15, White)));
16642
16631
  const applicationBackgroundColor = DesignToken.create(styleNameFromTokenName(tokenNames.applicationBackgroundColor)).withDefault((element) => getColorForTheme(element, White, Black85, ForestGreen));
@@ -16658,7 +16647,7 @@
16658
16647
  const borderHoverColor = DesignToken.create(styleNameFromTokenName(tokenNames.borderHoverColor)).withDefault((element) => getColorForTheme(element, DigitalGreenLight, PowerGreen, White));
16659
16648
  // Component Color Tokens
16660
16649
  const iconColor = DesignToken.create(styleNameFromTokenName(tokenNames.iconColor)).withDefault((element) => getColorForTheme(element, Black91, Black15, White));
16661
- DesignToken.create(styleNameFromTokenName(tokenNames.modalBackdropColor)).withDefault((element) => getModalBackdropForTheme(element));
16650
+ const modalBackdropColor = DesignToken.create(styleNameFromTokenName(tokenNames.modalBackdropColor)).withDefault((element) => getModalBackdropForTheme(element));
16662
16651
  const popupBorderColor = DesignToken.create(styleNameFromTokenName(tokenNames.popupBorderColor)).withDefault((element) => hexToRgbaCssColor(getColorForTheme(element, Black91, Black15, White), 0.3));
16663
16652
  const cardBorderColor = DesignToken.create(styleNameFromTokenName(tokenNames.cardBorderColor)).withDefault((element) => hexToRgbaCssColor(getColorForTheme(element, Black91, Black15, White), 0.1));
16664
16653
  DesignToken.create(styleNameFromTokenName(tokenNames.graphGridlineColor)).withDefault((element) => hexToRgbaCssColor(getColorForTheme(element, Black91, Black15, White), 0.2));
@@ -16827,13 +16816,13 @@
16827
16816
  function getModalBackdropForTheme(element) {
16828
16817
  switch (theme.getValueFor(element)) {
16829
16818
  case Theme.light:
16830
- return modalBackdropColorThemeLightStatic;
16819
+ return hexToRgbaCssColor(Black, 0.3);
16831
16820
  case Theme.dark:
16832
- return modalBackdropColorThemeDarkStatic;
16821
+ return hexToRgbaCssColor(Black, 0.6);
16833
16822
  case Theme.color:
16834
- return modalBackdropColorThemeColorStatic;
16823
+ return hexToRgbaCssColor(Black, 0.6);
16835
16824
  default:
16836
- return modalBackdropColorThemeLightStatic;
16825
+ return hexToRgbaCssColor(Black, 0.3);
16837
16826
  }
16838
16827
  }
16839
16828
 
@@ -21796,6 +21785,10 @@ so this becomes the fallback color for the slot */ ''}
21796
21785
  outline: 2px solid ${borderHoverColor};
21797
21786
  }
21798
21787
 
21788
+ dialog::backdrop {
21789
+ background: ${modalBackdropColor};
21790
+ }
21791
+
21799
21792
  header {
21800
21793
  min-height: 48px;
21801
21794
  padding: 24px 24px 0px 24px;
@@ -21861,24 +21854,7 @@ so this becomes the fallback color for the slot */ ''}
21861
21854
  :host([footer-hidden]) footer {
21862
21855
  display: none;
21863
21856
  }
21864
- `.withBehaviors(
21865
- /*
21866
- * We cannot use the modalBackdropColor token directly because the backdrop
21867
- * element is not a descendant of the nimble-theme-provider element.
21868
- */
21869
- themeBehavior(Theme.light, css `
21870
- dialog::backdrop {
21871
- background: ${modalBackdropColorThemeLightStatic};
21872
- }
21873
- `), themeBehavior(Theme.dark, css `
21874
- dialog::backdrop {
21875
- background: ${modalBackdropColorThemeDarkStatic};
21876
- }
21877
- `), themeBehavior(Theme.color, css `
21878
- dialog::backdrop {
21879
- background: ${modalBackdropColorThemeColorStatic};
21880
- }
21881
- `));
21857
+ `;
21882
21858
 
21883
21859
  const template$y = html `
21884
21860
  <template>
@@ -22072,9 +22048,12 @@ so this becomes the fallback color for the slot */ ''}
22072
22048
  }
22073
22049
  }
22074
22050
 
22051
+ dialog::backdrop {
22052
+ background: ${modalBackdropColor};
22053
+ }
22054
+
22075
22055
  dialog.animating::backdrop {
22076
- animation: ni-private-drawer-fade-in-keyframes ${largeDelayStatic}
22077
- ease-in;
22056
+ animation: ni-private-drawer-fade-in-keyframes ${largeDelay} ease-in;
22078
22057
  }
22079
22058
 
22080
22059
  dialog.closing::backdrop {
@@ -22167,24 +22146,7 @@ so this becomes the fallback color for the slot */ ''}
22167
22146
  justify-content: flex-end;
22168
22147
  border-top: 2px solid rgba(${actionRgbPartialColor}, 0.1);
22169
22148
  }
22170
- `.withBehaviors(
22171
- /*
22172
- * We cannot use the modalBackdropColor token directly because the backdrop
22173
- * element is not a descendant of the nimble-theme-provider element.
22174
- */
22175
- themeBehavior(Theme.light, css `
22176
- dialog::backdrop {
22177
- background: ${modalBackdropColorThemeLightStatic};
22178
- }
22179
- `), themeBehavior(Theme.dark, css `
22180
- dialog::backdrop {
22181
- background: ${modalBackdropColorThemeDarkStatic};
22182
- }
22183
- `), themeBehavior(Theme.color, css `
22184
- dialog::backdrop {
22185
- background: ${modalBackdropColorThemeColorStatic};
22186
- }
22187
- `));
22149
+ `;
22188
22150
 
22189
22151
  const template$x = html `
22190
22152
  <dialog