@razorpay/blade 9.7.0 → 10.1.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.
Files changed (33) hide show
  1. package/build/components/index.d.ts +88 -16
  2. package/build/components/index.development.web.js +4658 -7223
  3. package/build/components/index.development.web.js.map +1 -1
  4. package/build/components/index.native.d.ts +72 -16
  5. package/build/components/index.native.js +419 -413
  6. package/build/components/index.native.js.map +1 -1
  7. package/build/components/index.production.web.js +4646 -7164
  8. package/build/components/index.production.web.js.map +1 -1
  9. package/build/css/bankingThemeDarkDesktop.css +1 -1
  10. package/build/css/bankingThemeDarkMobile.css +1 -1
  11. package/build/css/bankingThemeLightDesktop.css +1 -1
  12. package/build/css/bankingThemeLightMobile.css +1 -1
  13. package/build/css/paymentThemeDarkDesktop.css +1 -1
  14. package/build/css/paymentThemeDarkMobile.css +1 -1
  15. package/build/css/paymentThemeLightDesktop.css +1 -1
  16. package/build/css/paymentThemeLightMobile.css +1 -1
  17. package/build/tokens/index.d.ts +27 -27
  18. package/build/tokens/index.development.web.js +30 -71
  19. package/build/tokens/index.development.web.js.map +1 -1
  20. package/build/tokens/index.native.d.ts +27 -27
  21. package/build/tokens/index.native.js +4 -5
  22. package/build/tokens/index.native.js.map +1 -1
  23. package/build/tokens/index.production.web.js +20 -44
  24. package/build/tokens/index.production.web.js.map +1 -1
  25. package/build/utils/index.d.ts +12 -12
  26. package/build/utils/index.development.web.js +26 -60
  27. package/build/utils/index.development.web.js.map +1 -1
  28. package/build/utils/index.native.d.ts +12 -12
  29. package/build/utils/index.native.js +7 -7
  30. package/build/utils/index.native.js.map +1 -1
  31. package/build/utils/index.production.web.js +24 -55
  32. package/build/utils/index.production.web.js.map +1 -1
  33. package/package.json +23 -22
@@ -525,10 +525,10 @@ type Delay = {
525
525
  xlong: 5000;
526
526
  };
527
527
 
528
- type EasingFunctionFactory = { factory: () => (value: number) => number }; // similar to EasingFunctionFactory of `react-native-reanimated`
528
+ type EasingFactoryFn = { factory: () => (value: number) => number }; // similar to EasingFactoryFn of `react-native-reanimated`
529
529
  type EasingType<Value extends string> = Platform.Select<{
530
530
  web: Value;
531
- native: EasingFunctionFactory;
531
+ native: EasingFactoryFn;
532
532
  }>;
533
533
 
534
534
  type Easing = {
@@ -536,49 +536,49 @@ type Easing = {
536
536
  standard: {
537
537
  /** `cubic-bezier(0.5, 0, 0.3, 1.5)`
538
538
  *
539
- * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFunctionFactory` for native */
539
+ * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFactoryFn` for native */
540
540
  attentive: EasingType<'cubic-bezier(0.5, 0, 0.3, 1.5)'>;
541
541
  /** `cubic-bezier(0.3, 0, 0.2, 1)`
542
542
  *
543
- * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFunctionFactory` for native */
543
+ * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFactoryFn` for native */
544
544
  effective: EasingType<'cubic-bezier(0.3, 0, 0.2, 1)'>;
545
545
  /** `cubic-bezier(0.5, 0, 0, 1)`
546
546
  *
547
- * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFunctionFactory` for native */
547
+ * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFactoryFn` for native */
548
548
  revealing: EasingType<'cubic-bezier(0.5, 0, 0, 1)'>;
549
549
  /** `cubic-bezier(1, 0.5, 0, 0.5)`
550
550
  *
551
- * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFunctionFactory` for native */
551
+ * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFactoryFn` for native */
552
552
  wary: EasingType<'cubic-bezier(1, 0.5, 0, 0.5)'>;
553
553
  };
554
554
  /** Easings for all entrance animations*/
555
555
  entrance: {
556
556
  /** `cubic-bezier(0.5, 0, 0.3, 1.5)`
557
557
  *
558
- * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFunctionFactory` for native */
558
+ * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFactoryFn` for native */
559
559
  attentive: EasingType<'cubic-bezier(0.5, 0, 0.3, 1.5)'>;
560
560
  /** `cubic-bezier(0, 0, 0.2, 1)`
561
561
  *
562
- * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFunctionFactory` for native */
562
+ * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFactoryFn` for native */
563
563
  effective: EasingType<'cubic-bezier(0, 0, 0.2, 1)'>;
564
564
  /** `cubic-bezier(0, 0, 0, 1)`
565
565
  *
566
- * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFunctionFactory` for native */
566
+ * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFactoryFn` for native */
567
567
  revealing: EasingType<'cubic-bezier(0, 0, 0, 1)'>;
568
568
  };
569
569
  /** Easings for all exit animations*/
570
570
  exit: {
571
571
  /** `cubic-bezier(0.7, 0, 0.5, 1)`
572
572
  *
573
- * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFunctionFactory` for native */
573
+ * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFactoryFn` for native */
574
574
  attentive: EasingType<'cubic-bezier(0.7, 0, 0.5, 1)'>;
575
575
  /** `cubic-bezier(0.17, 0, 1, 1)`
576
576
  *
577
- * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFunctionFactory` for native */
577
+ * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFactoryFn` for native */
578
578
  effective: EasingType<'cubic-bezier(0.17, 0, 1, 1)'>;
579
579
  /** `cubic-bezier(0.5, 0, 1, 1)`
580
580
  *
581
- * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFunctionFactory` for native */
581
+ * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFactoryFn` for native */
582
582
  revealing: EasingType<'cubic-bezier(0.5, 0, 1, 1)'>;
583
583
  };
584
584
  };
@@ -1313,6 +1313,7 @@ type FlexboxProps$1 = MakeObjectResponsive$1<
1313
1313
  | 'justifyContent'
1314
1314
  | 'justifySelf'
1315
1315
  | 'placeSelf'
1316
+ | 'placeItems'
1316
1317
  | 'order'
1317
1318
  >
1318
1319
  >;
@@ -1395,6 +1396,7 @@ type CommonBoxVisualProps$1 = MakeObjectResponsive$1<
1395
1396
  | 'backgroundPosition'
1396
1397
  | 'backgroundOrigin'
1397
1398
  | 'backgroundRepeat'
1399
+ | 'pointerEvents'
1398
1400
  > & {
1399
1401
  /**
1400
1402
  * Sets the elevation for Box
@@ -1501,6 +1503,31 @@ type BoxCallbackProps$1 = Omit<
1501
1503
  '__brand__'
1502
1504
  >;
1503
1505
 
1506
+ type BoxDragAndDropProps$1 = Omit<
1507
+ Platform.Select<{
1508
+ web: {
1509
+ draggable: boolean;
1510
+ onDragStart: React.DragEventHandler<HTMLElement>;
1511
+ onDragEnter: React.DragEventHandler<HTMLElement>;
1512
+ onDragLeave: React.DragEventHandler<HTMLElement>;
1513
+ onDragOver: React.DragEventHandler<HTMLElement>;
1514
+ onDragEnd: React.DragEventHandler<HTMLElement>;
1515
+ onDrop: React.DragEventHandler<HTMLElement>;
1516
+ };
1517
+ native: Record<
1518
+ | 'draggable'
1519
+ | 'onDragStart'
1520
+ | 'onDragEnter'
1521
+ | 'onDragLeave'
1522
+ | 'onDragOver'
1523
+ | 'onDragEnd'
1524
+ | 'onDrop',
1525
+ undefined
1526
+ >;
1527
+ }>,
1528
+ '__brand__'
1529
+ >;
1530
+
1504
1531
  type BoxProps$1 = Partial<
1505
1532
  PaddingProps$1 &
1506
1533
  MarginProps$1 &
@@ -1509,6 +1536,7 @@ type BoxProps$1 = Partial<
1509
1536
  PositionProps$1 &
1510
1537
  GridProps$1 &
1511
1538
  BoxCallbackProps$1 &
1539
+ BoxDragAndDropProps$1 &
1512
1540
  CommonBoxVisualProps$1 &
1513
1541
  BoxVisualProps$1 & {
1514
1542
  children?: React.ReactNode | React.ReactNode[];
@@ -2619,7 +2647,7 @@ declare type FlexboxProps = MakeObjectResponsive<{
2619
2647
  * @see https://developer.mozilla.org/docs/Web/CSS/flex
2620
2648
  */
2621
2649
  flex: string | number;
2622
- } & PickCSSByPlatform<'flexWrap' | 'flexDirection' | 'flexGrow' | 'flexShrink' | 'flexBasis' | 'alignItems' | 'alignContent' | 'alignSelf' | 'justifyItems' | 'justifyContent' | 'justifySelf' | 'placeSelf' | 'order'>>;
2650
+ } & PickCSSByPlatform<'flexWrap' | 'flexDirection' | 'flexGrow' | 'flexShrink' | 'flexBasis' | 'alignItems' | 'alignContent' | 'alignSelf' | 'justifyItems' | 'justifyContent' | 'justifySelf' | 'placeSelf' | 'placeItems' | 'order'>>;
2623
2651
  declare type PositionProps = MakeObjectResponsive<{
2624
2652
  top: SpacingValueType;
2625
2653
  right: SpacingValueType;
@@ -2649,7 +2677,7 @@ declare type CommonBoxVisualProps = MakeObjectResponsive<{
2649
2677
  borderTopRightRadius: keyof Border['radius'];
2650
2678
  borderBottomRightRadius: keyof Border['radius'];
2651
2679
  borderBottomLeftRadius: keyof Border['radius'];
2652
- } & PickCSSByPlatform<'backgroundImage' | 'backgroundSize' | 'backgroundPosition' | 'backgroundOrigin' | 'backgroundRepeat'> & {
2680
+ } & PickCSSByPlatform<'backgroundImage' | 'backgroundSize' | 'backgroundPosition' | 'backgroundOrigin' | 'backgroundRepeat' | 'pointerEvents'> & {
2653
2681
  /**
2654
2682
  * Sets the elevation for Box
2655
2683
  *
@@ -2707,7 +2735,19 @@ declare type BoxCallbackProps = Omit<Platform.Select<{
2707
2735
  };
2708
2736
  native: Record<'onMouseOver' | 'onMouseEnter' | 'onMouseLeave' | 'onScroll', undefined>;
2709
2737
  }>, '__brand__'>;
2710
- declare type BoxProps = Partial<PaddingProps & MarginProps & LayoutProps & FlexboxProps & PositionProps & GridProps & BoxCallbackProps & CommonBoxVisualProps & BoxVisualProps & {
2738
+ declare type BoxDragAndDropProps = Omit<Platform.Select<{
2739
+ web: {
2740
+ draggable: boolean;
2741
+ onDragStart: React.DragEventHandler<HTMLElement>;
2742
+ onDragEnter: React.DragEventHandler<HTMLElement>;
2743
+ onDragLeave: React.DragEventHandler<HTMLElement>;
2744
+ onDragOver: React.DragEventHandler<HTMLElement>;
2745
+ onDragEnd: React.DragEventHandler<HTMLElement>;
2746
+ onDrop: React.DragEventHandler<HTMLElement>;
2747
+ };
2748
+ native: Record<'draggable' | 'onDragStart' | 'onDragEnter' | 'onDragLeave' | 'onDragOver' | 'onDragEnd' | 'onDrop', undefined>;
2749
+ }>, '__brand__'>;
2750
+ declare type BoxProps = Partial<PaddingProps & MarginProps & LayoutProps & FlexboxProps & PositionProps & GridProps & BoxCallbackProps & BoxDragAndDropProps & CommonBoxVisualProps & BoxVisualProps & {
2711
2751
  children?: React.ReactNode | React.ReactNode[];
2712
2752
  tabIndex?: number;
2713
2753
  } & TestID$1>;
@@ -3009,6 +3049,14 @@ declare const Box: React__default.ForwardRefExoticComponent<Partial<PaddingProps
3009
3049
  onMouseEnter: React__default.MouseEventHandler<HTMLElement>;
3010
3050
  onMouseLeave: React__default.MouseEventHandler<HTMLElement>;
3011
3051
  onScroll: React__default.UIEventHandler<HTMLElement>;
3052
+ } & {
3053
+ draggable: boolean;
3054
+ onDragStart: React__default.DragEventHandler<HTMLElement>;
3055
+ onDragEnter: React__default.DragEventHandler<HTMLElement>;
3056
+ onDragLeave: React__default.DragEventHandler<HTMLElement>;
3057
+ onDragOver: React__default.DragEventHandler<HTMLElement>;
3058
+ onDragEnd: React__default.DragEventHandler<HTMLElement>;
3059
+ onDrop: React__default.DragEventHandler<HTMLElement>;
3012
3060
  } & {
3013
3061
  elevation?: ElevationLevels | {
3014
3062
  readonly base?: ElevationLevels | undefined;
@@ -3146,6 +3194,14 @@ declare const Box: React__default.ForwardRefExoticComponent<Partial<PaddingProps
3146
3194
  readonly l?: "none" | "thinner" | "thin" | "thick" | undefined;
3147
3195
  readonly xl?: "none" | "thinner" | "thin" | "thick" | undefined;
3148
3196
  };
3197
+ pointerEvents?: csstype.Property.PointerEvents | {
3198
+ readonly base?: csstype.Property.PointerEvents | undefined;
3199
+ readonly xs?: csstype.Property.PointerEvents | undefined;
3200
+ readonly s?: csstype.Property.PointerEvents | undefined;
3201
+ readonly m?: csstype.Property.PointerEvents | undefined;
3202
+ readonly l?: csstype.Property.PointerEvents | undefined;
3203
+ readonly xl?: csstype.Property.PointerEvents | undefined;
3204
+ } | undefined;
3149
3205
  backgroundPosition?: csstype.Property.BackgroundPosition<string | number> | {
3150
3206
  readonly base?: csstype.Property.BackgroundPosition<string | number> | undefined;
3151
3207
  readonly xs?: csstype.Property.BackgroundPosition<string | number> | undefined;
@@ -6910,7 +6966,7 @@ declare type SkeletonProps = StyledPropsBlade & Pick<BaseBoxProps, 'width' | 'ma
6910
6966
  testID?: string;
6911
6967
  };
6912
6968
 
6913
- declare const Skeleton: ({ contrast, width, maxWidth, minWidth, height, maxHeight, minHeight, borderRadius, flexWrap, flexDirection, flexGrow, flexShrink, flexBasis, alignItems, alignContent, alignSelf, justifyItems, justifyContent, justifySelf, placeSelf, order, testID, ...props }: SkeletonProps) => React.ReactElement;
6969
+ declare const Skeleton: ({ contrast, width, maxWidth, minWidth, height, maxHeight, minHeight, borderRadius, flexWrap, flexDirection, flexGrow, flexShrink, flexBasis, alignItems, alignContent, alignSelf, justifyItems, justifyContent, justifySelf, placeSelf, placeItems, order, testID, ...props }: SkeletonProps) => React.ReactElement;
6914
6970
 
6915
6971
  declare type VisuallyHiddenProps = {
6916
6972
  children: React.ReactNode;
@@ -7844,6 +7900,14 @@ declare const TooltipInteractiveWrapper: styled_components.StyledComponent<"div"
7844
7900
  onMouseEnter: React$1.MouseEventHandler<HTMLElement>;
7845
7901
  onMouseLeave: React$1.MouseEventHandler<HTMLElement>;
7846
7902
  onScroll: React$1.UIEventHandler<HTMLElement>;
7903
+ } & {
7904
+ draggable: boolean;
7905
+ onDragStart: React$1.DragEventHandler<HTMLElement>;
7906
+ onDragEnter: React$1.DragEventHandler<HTMLElement>;
7907
+ onDragLeave: React$1.DragEventHandler<HTMLElement>;
7908
+ onDragOver: React$1.DragEventHandler<HTMLElement>;
7909
+ onDragEnd: React$1.DragEventHandler<HTMLElement>;
7910
+ onDrop: React$1.DragEventHandler<HTMLElement>;
7847
7911
  } & {
7848
7912
  elevation?: ElevationLevels | {
7849
7913
  readonly base?: ElevationLevels | undefined;
@@ -7981,6 +8045,14 @@ declare const TooltipInteractiveWrapper: styled_components.StyledComponent<"div"
7981
8045
  readonly l?: "none" | "thinner" | "thin" | "thick" | undefined;
7982
8046
  readonly xl?: "none" | "thinner" | "thin" | "thick" | undefined;
7983
8047
  };
8048
+ pointerEvents?: csstype.Property.PointerEvents | {
8049
+ readonly base?: csstype.Property.PointerEvents | undefined;
8050
+ readonly xs?: csstype.Property.PointerEvents | undefined;
8051
+ readonly s?: csstype.Property.PointerEvents | undefined;
8052
+ readonly m?: csstype.Property.PointerEvents | undefined;
8053
+ readonly l?: csstype.Property.PointerEvents | undefined;
8054
+ readonly xl?: csstype.Property.PointerEvents | undefined;
8055
+ } | undefined;
7984
8056
  backgroundPosition?: csstype.Property.BackgroundPosition<string | number> | {
7985
8057
  readonly base?: csstype.Property.BackgroundPosition<string | number> | undefined;
7986
8058
  readonly xs?: csstype.Property.BackgroundPosition<string | number> | undefined;