@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
@@ -523,10 +523,10 @@ type Delay = {
523
523
  xlong: 5000;
524
524
  };
525
525
 
526
- type EasingFunctionFactory = { factory: () => (value: number) => number }; // similar to EasingFunctionFactory of `react-native-reanimated`
526
+ type EasingFactoryFn = { factory: () => (value: number) => number }; // similar to EasingFactoryFn of `react-native-reanimated`
527
527
  type EasingType<Value extends string> = Platform.Select<{
528
528
  web: Value;
529
- native: EasingFunctionFactory;
529
+ native: EasingFactoryFn;
530
530
  }>;
531
531
 
532
532
  type Easing = {
@@ -534,49 +534,49 @@ type Easing = {
534
534
  standard: {
535
535
  /** `cubic-bezier(0.5, 0, 0.3, 1.5)`
536
536
  *
537
- * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFunctionFactory` for native */
537
+ * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFactoryFn` for native */
538
538
  attentive: EasingType<'cubic-bezier(0.5, 0, 0.3, 1.5)'>;
539
539
  /** `cubic-bezier(0.3, 0, 0.2, 1)`
540
540
  *
541
- * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFunctionFactory` for native */
541
+ * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFactoryFn` for native */
542
542
  effective: EasingType<'cubic-bezier(0.3, 0, 0.2, 1)'>;
543
543
  /** `cubic-bezier(0.5, 0, 0, 1)`
544
544
  *
545
- * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFunctionFactory` for native */
545
+ * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFactoryFn` for native */
546
546
  revealing: EasingType<'cubic-bezier(0.5, 0, 0, 1)'>;
547
547
  /** `cubic-bezier(1, 0.5, 0, 0.5)`
548
548
  *
549
- * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFunctionFactory` for native */
549
+ * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFactoryFn` for native */
550
550
  wary: EasingType<'cubic-bezier(1, 0.5, 0, 0.5)'>;
551
551
  };
552
552
  /** Easings for all entrance animations*/
553
553
  entrance: {
554
554
  /** `cubic-bezier(0.5, 0, 0.3, 1.5)`
555
555
  *
556
- * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFunctionFactory` for native */
556
+ * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFactoryFn` for native */
557
557
  attentive: EasingType<'cubic-bezier(0.5, 0, 0.3, 1.5)'>;
558
558
  /** `cubic-bezier(0, 0, 0.2, 1)`
559
559
  *
560
- * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFunctionFactory` for native */
560
+ * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFactoryFn` for native */
561
561
  effective: EasingType<'cubic-bezier(0, 0, 0.2, 1)'>;
562
562
  /** `cubic-bezier(0, 0, 0, 1)`
563
563
  *
564
- * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFunctionFactory` for native */
564
+ * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFactoryFn` for native */
565
565
  revealing: EasingType<'cubic-bezier(0, 0, 0, 1)'>;
566
566
  };
567
567
  /** Easings for all exit animations*/
568
568
  exit: {
569
569
  /** `cubic-bezier(0.7, 0, 0.5, 1)`
570
570
  *
571
- * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFunctionFactory` for native */
571
+ * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFactoryFn` for native */
572
572
  attentive: EasingType<'cubic-bezier(0.7, 0, 0.5, 1)'>;
573
573
  /** `cubic-bezier(0.17, 0, 1, 1)`
574
574
  *
575
- * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFunctionFactory` for native */
575
+ * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFactoryFn` for native */
576
576
  effective: EasingType<'cubic-bezier(0.17, 0, 1, 1)'>;
577
577
  /** `cubic-bezier(0.5, 0, 1, 1)`
578
578
  *
579
- * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFunctionFactory` for native */
579
+ * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFactoryFn` for native */
580
580
  revealing: EasingType<'cubic-bezier(0.5, 0, 1, 1)'>;
581
581
  };
582
582
  };
@@ -1311,6 +1311,7 @@ type FlexboxProps$1 = MakeObjectResponsive$1<
1311
1311
  | 'justifyContent'
1312
1312
  | 'justifySelf'
1313
1313
  | 'placeSelf'
1314
+ | 'placeItems'
1314
1315
  | 'order'
1315
1316
  >
1316
1317
  >;
@@ -1393,6 +1394,7 @@ type CommonBoxVisualProps$1 = MakeObjectResponsive$1<
1393
1394
  | 'backgroundPosition'
1394
1395
  | 'backgroundOrigin'
1395
1396
  | 'backgroundRepeat'
1397
+ | 'pointerEvents'
1396
1398
  > & {
1397
1399
  /**
1398
1400
  * Sets the elevation for Box
@@ -1499,6 +1501,31 @@ type BoxCallbackProps$1 = Omit<
1499
1501
  '__brand__'
1500
1502
  >;
1501
1503
 
1504
+ type BoxDragAndDropProps$1 = Omit<
1505
+ Platform.Select<{
1506
+ web: {
1507
+ draggable: boolean;
1508
+ onDragStart: React.DragEventHandler<HTMLElement>;
1509
+ onDragEnter: React.DragEventHandler<HTMLElement>;
1510
+ onDragLeave: React.DragEventHandler<HTMLElement>;
1511
+ onDragOver: React.DragEventHandler<HTMLElement>;
1512
+ onDragEnd: React.DragEventHandler<HTMLElement>;
1513
+ onDrop: React.DragEventHandler<HTMLElement>;
1514
+ };
1515
+ native: Record<
1516
+ | 'draggable'
1517
+ | 'onDragStart'
1518
+ | 'onDragEnter'
1519
+ | 'onDragLeave'
1520
+ | 'onDragOver'
1521
+ | 'onDragEnd'
1522
+ | 'onDrop',
1523
+ undefined
1524
+ >;
1525
+ }>,
1526
+ '__brand__'
1527
+ >;
1528
+
1502
1529
  type BoxProps$1 = Partial<
1503
1530
  PaddingProps$1 &
1504
1531
  MarginProps$1 &
@@ -1507,6 +1534,7 @@ type BoxProps$1 = Partial<
1507
1534
  PositionProps$1 &
1508
1535
  GridProps$1 &
1509
1536
  BoxCallbackProps$1 &
1537
+ BoxDragAndDropProps$1 &
1510
1538
  CommonBoxVisualProps$1 &
1511
1539
  BoxVisualProps$1 & {
1512
1540
  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>;
@@ -2883,6 +2923,14 @@ declare const Box: React__default.ForwardRefExoticComponent<Partial<PaddingProps
2883
2923
  onMouseEnter: undefined;
2884
2924
  onMouseLeave: undefined;
2885
2925
  onScroll: undefined;
2926
+ } & {
2927
+ draggable: undefined;
2928
+ onDragStart: undefined;
2929
+ onDragEnter: undefined;
2930
+ onDragLeave: undefined;
2931
+ onDragOver: undefined;
2932
+ onDragEnd: undefined;
2933
+ onDrop: undefined;
2886
2934
  } & {
2887
2935
  elevation?: ElevationLevels | {
2888
2936
  readonly base?: ElevationLevels | undefined;
@@ -2992,6 +3040,14 @@ declare const Box: React__default.ForwardRefExoticComponent<Partial<PaddingProps
2992
3040
  readonly l?: "none" | "thinner" | "thin" | "thick" | undefined;
2993
3041
  readonly xl?: "none" | "thinner" | "thin" | "thick" | undefined;
2994
3042
  };
3043
+ pointerEvents?: "none" | "auto" | "box-none" | "box-only" | {
3044
+ readonly base?: "none" | "auto" | "box-none" | "box-only" | undefined;
3045
+ readonly xs?: "none" | "auto" | "box-none" | "box-only" | undefined;
3046
+ readonly s?: "none" | "auto" | "box-none" | "box-only" | undefined;
3047
+ readonly m?: "none" | "auto" | "box-none" | "box-only" | undefined;
3048
+ readonly l?: "none" | "auto" | "box-none" | "box-only" | undefined;
3049
+ readonly xl?: "none" | "auto" | "box-none" | "box-only" | undefined;
3050
+ } | undefined;
2995
3051
  backgroundPosition: never;
2996
3052
  borderColor: "surface.border.normal.lowContrast" | "surface.border.normal.highContrast" | "surface.border.subtle.lowContrast" | "surface.border.subtle.highContrast" | {
2997
3053
  readonly base?: "surface.border.normal.lowContrast" | "surface.border.normal.highContrast" | "surface.border.subtle.lowContrast" | "surface.border.subtle.highContrast" | undefined;
@@ -6313,7 +6369,7 @@ declare type SkeletonProps = StyledPropsBlade & Pick<BaseBoxProps, 'width' | 'ma
6313
6369
  testID?: string;
6314
6370
  };
6315
6371
 
6316
- 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;
6372
+ 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;
6317
6373
 
6318
6374
  declare type VisuallyHiddenProps = {
6319
6375
  children: React.ReactNode;