@razorpay/blade 10.12.1 → 10.13.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.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 22 Sep 2023 09:14:49 GMT
3
+ * Generated on Mon, 25 Sep 2023 12:19:05 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 22 Sep 2023 09:14:49 GMT
3
+ * Generated on Mon, 25 Sep 2023 12:19:05 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 22 Sep 2023 09:14:49 GMT
3
+ * Generated on Mon, 25 Sep 2023 12:19:05 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 22 Sep 2023 09:14:49 GMT
3
+ * Generated on Mon, 25 Sep 2023 12:19:05 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 22 Sep 2023 09:14:49 GMT
3
+ * Generated on Mon, 25 Sep 2023 12:19:05 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 22 Sep 2023 09:14:49 GMT
3
+ * Generated on Mon, 25 Sep 2023 12:19:05 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 22 Sep 2023 09:14:49 GMT
3
+ * Generated on Mon, 25 Sep 2023 12:19:05 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 22 Sep 2023 09:14:49 GMT
3
+ * Generated on Mon, 25 Sep 2023 12:19:05 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,3 +1,5 @@
1
+ import { ColorInput } from 'tinycolor2';
2
+
1
3
  declare type BorderRadius = Readonly<{
2
4
  /** none: 0(px/rem/pt) */
3
5
  none: 0;
@@ -555,6 +557,8 @@ declare type OverrideTheme = {
555
557
  overrides: DeepPartial<ThemeTokens>;
556
558
  };
557
559
  /**
560
+ * @deprecated Use `createTheme` from `@razorpay/blade/tokens` instead
561
+ *
558
562
  * @description
559
563
  *
560
564
  * `overrideTheme` merges the `baseThemeTokens` and `overrides` and returns a new ThemeTokens object,
@@ -582,6 +586,19 @@ declare type OverrideTheme = {
582
586
  */
583
587
  declare const overrideTheme: ({ baseThemeTokens, overrides }: OverrideTheme) => ThemeTokens;
584
588
 
589
+ /**
590
+ * @param {Object} themeConfig - The brand color and overrides to apply to the theme
591
+ * @param {string} themeConfig.brandColor - The brand color to use to generate the theme. Can be in hex, rgb, or hsl format.
592
+ * @description
593
+ * Creates a Blade Theme based on the custom brand color
594
+ * @returns The Theme Tokens with the custom brand colors
595
+ * @example
596
+ * const theme = createTheme({ brandColor: '#19BEA2'})
597
+ **/
598
+ declare const createTheme: ({ brandColor }: {
599
+ brandColor: ColorInput;
600
+ }) => ThemeTokens;
601
+
585
602
  /**
586
603
  * Brands a type making them act as nominal
587
604
  * @see https://medium.com/@KevinBGreene/surviving-the-typescript-ecosystem-branding-and-type-tagging-6cf6e516523d
@@ -833,4 +850,4 @@ declare type ElevationWithColorModes = Record<ColorSchemeModes, Elevation>;
833
850
 
834
851
  declare const elevation: ElevationWithColorModes;
835
852
 
836
- export { Border, Breakpoints, Color, ColorSchemeNames, ColorSchemeNamesInput, ColorsWithModes, DelayString, DurationString, EasingFactoryFn, EasingString, Elevation, ElevationWithColorModes, FontFamily, FontSize, Motion, Opacity, Size, Spacing, ThemeTokens, Typography, TypographyPlatforms, TypographyWithPlatforms, bankingTheme, border, breakpoints, colors, elevation, motion, opacity, overrideTheme, paymentTheme, size, spacing, typography };
853
+ export { Border, Breakpoints, Color, ColorSchemeNames, ColorSchemeNamesInput, ColorsWithModes, DelayString, DurationString, EasingFactoryFn, EasingString, Elevation, ElevationWithColorModes, FontFamily, FontSize, Motion, Opacity, Size, Spacing, ThemeTokens, Typography, TypographyPlatforms, TypographyWithPlatforms, bankingTheme, border, breakpoints, colors, createTheme, elevation, motion, opacity, overrideTheme, paymentTheme, size, spacing, typography };