@razorpay/blade 10.12.0 → 10.13.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.
@@ -3713,7 +3713,7 @@ declare type CheckboxProps = {
3713
3713
  /**
3714
3714
  * Sets the label of the checkbox
3715
3715
  */
3716
- children: React__default.ReactNode;
3716
+ children?: React__default.ReactNode;
3717
3717
  /**
3718
3718
  * Help text for the checkbox
3719
3719
  */
@@ -3792,7 +3792,7 @@ declare const Checkbox: React__default.ForwardRefExoticComponent<{
3792
3792
  /**
3793
3793
  * Sets the label of the checkbox
3794
3794
  */
3795
- children: React__default.ReactNode;
3795
+ children?: React__default.ReactNode;
3796
3796
  /**
3797
3797
  * Help text for the checkbox
3798
3798
  */
@@ -4185,7 +4185,7 @@ declare type CheckboxGroupProps = {
4185
4185
  /**
4186
4186
  * Renders the label of the checkbox group
4187
4187
  */
4188
- label: string;
4188
+ label?: string;
4189
4189
  /**
4190
4190
  * Sets the position of the label
4191
4191
  *
@@ -5843,7 +5843,7 @@ declare type RadioProps = {
5843
5843
  /**
5844
5844
  * Sets the label text of the Radio
5845
5845
  */
5846
- children: StringChildrenType;
5846
+ children?: StringChildrenType;
5847
5847
  /**
5848
5848
  * Help text for the Radio
5849
5849
  */
@@ -5870,7 +5870,7 @@ declare const Radio: React__default.ForwardRefExoticComponent<{
5870
5870
  /**
5871
5871
  * Sets the label text of the Radio
5872
5872
  */
5873
- children: StringChildrenType;
5873
+ children?: StringChildrenType | undefined;
5874
5874
  /**
5875
5875
  * Help text for the Radio
5876
5876
  */
@@ -6228,7 +6228,7 @@ declare type RadioGroupProps = {
6228
6228
  /**
6229
6229
  * Renders the label of the radio group
6230
6230
  */
6231
- label: string;
6231
+ label?: string;
6232
6232
  /**
6233
6233
  * Sets the position of the label
6234
6234
  *
@@ -3077,7 +3077,7 @@ function _objectSpread$6g(target) { for (var i = 1; i < arguments.length; i++) {
3077
3077
  /**
3078
3078
  * Reusable hook to be used in BladeProvider.native & BladeProvider.web file
3079
3079
  *
3080
- * This hook proccesses incoming themeTokens & initialColorScheme
3080
+ * This hook processes incoming themeTokens & initialColorScheme
3081
3081
  * And validates & returns the theme values
3082
3082
  */
3083
3083
  var useBladeProvider = function useBladeProvider(_ref) {
@@ -14583,7 +14583,7 @@ var CheckedIcon$1 = function CheckedIcon(_ref) {
14583
14583
  clipRule: "evenodd",
14584
14584
  d: "M6.90237 1.76413C7.03254 1.89431 7.03254 2.10536 6.90237 2.23554L3.2357 5.90221C3.10553 6.03238 2.89447 6.03238 2.7643 5.90221L1.09763 4.23554C0.967456 4.10536 0.967456 3.89431 1.09763 3.76414C1.22781 3.63396 1.43886 3.63396 1.56904 3.76414L3 5.1951L6.43096 1.76413C6.56114 1.63396 6.77219 1.63396 6.90237 1.76413Z",
14585
14585
  fill: color,
14586
- stroke: "white",
14586
+ stroke: color,
14587
14587
  strokeWidth: "0.5",
14588
14588
  strokeLinecap: "round",
14589
14589
  strokeLinejoin: "round"
@@ -14605,7 +14605,7 @@ var IndeterminateIcon = function IndeterminateIcon(_ref2) {
14605
14605
  clipRule: "evenodd",
14606
14606
  d: "M1.3335 3.99984C1.3335 3.81574 1.48273 3.6665 1.66683 3.6665H6.3335C6.51759 3.6665 6.66683 3.81574 6.66683 3.99984C6.66683 4.18393 6.51759 4.33317 6.3335 4.33317H1.66683C1.48273 4.33317 1.3335 4.18393 1.3335 3.99984Z",
14607
14607
  fill: color,
14608
- stroke: "white",
14608
+ stroke: color,
14609
14609
  strokeWidth: "0.5",
14610
14610
  strokeLinecap: "round",
14611
14611
  strokeLinejoin: "round"
@@ -15424,18 +15424,18 @@ var _Checkbox = function _Checkbox(_ref, ref) {
15424
15424
  isIndeterminate: isIndeterminate,
15425
15425
  isDisabled: _isDisabled,
15426
15426
  isNegative: _hasError
15427
- }), /*#__PURE__*/jsx(SelectorTitle, {
15427
+ }), children ? /*#__PURE__*/jsx(SelectorTitle, {
15428
15428
  size: _size,
15429
15429
  isDisabled: _isDisabled,
15430
15430
  children: children
15431
- })]
15432
- }), /*#__PURE__*/jsx(BaseBox, {
15431
+ }) : null]
15432
+ }), showSupportingText ? /*#__PURE__*/jsx(BaseBox, {
15433
15433
  marginLeft: isSmall ? 'spacing.6' : 'spacing.7',
15434
- children: showSupportingText && /*#__PURE__*/jsx(SelectorSupportText, {
15434
+ children: /*#__PURE__*/jsx(SelectorSupportText, {
15435
15435
  id: ids === null || ids === void 0 ? void 0 : ids.helpTextId,
15436
15436
  children: helpText
15437
15437
  })
15438
- })]
15438
+ }) : null]
15439
15439
  })
15440
15440
  }), /*#__PURE__*/jsx(FormHint, {
15441
15441
  errorText: errorText,
@@ -15630,14 +15630,14 @@ var CheckboxGroup = function CheckboxGroup(_ref) {
15630
15630
  labelledBy: ids.labelId,
15631
15631
  componentName: "checkbox-group",
15632
15632
  testID: testID,
15633
- children: [/*#__PURE__*/jsx(FormLabel, {
15633
+ children: [label ? /*#__PURE__*/jsx(FormLabel, {
15634
15634
  as: "span",
15635
15635
  necessityIndicator: necessityIndicator,
15636
15636
  position: labelPosition,
15637
15637
  id: ids.labelId,
15638
15638
  accessibilityText: accessibilityText,
15639
15639
  children: label
15640
- }), /*#__PURE__*/jsxs(BaseBox, {
15640
+ }) : null, /*#__PURE__*/jsxs(BaseBox, {
15641
15641
  children: [/*#__PURE__*/jsx(BaseBox, {
15642
15642
  display: "flex",
15643
15643
  flexDirection: "column",
@@ -17848,11 +17848,12 @@ var Card = function Card(_ref) {
17848
17848
  return /*#__PURE__*/jsx(CardProvider, {
17849
17849
  children: /*#__PURE__*/jsx(CardRoot, _objectSpread$1h(_objectSpread$1h(_objectSpread$1h({
17850
17850
  as: as,
17851
+ display: 'block',
17852
+ borderRadius: "medium",
17851
17853
  onMouseEnter: onHover,
17852
17854
  shouldScaleOnHover: shouldScaleOnHover,
17853
17855
  isSelected: isSelected,
17854
- isFocused: isFocused,
17855
- borderRadius: "medium"
17856
+ isFocused: isFocused
17856
17857
  // on react native we need to pass onClick to root, because we don't need the LinkOverlay in RN
17857
17858
  ,
17858
17859
  onClick: isReactNative$4() ? onClick : undefined,
@@ -19732,14 +19733,14 @@ var chipColorTokens = {
19732
19733
  text: {
19733
19734
  unchecked: 'surface.text.subtle.lowContrast',
19734
19735
  disabled: 'surface.text.placeholder.lowContrast',
19735
- none: 'brand.primary.500',
19736
+ none: 'action.text.secondary.default',
19736
19737
  positive: 'feedback.text.positive.lowContrast',
19737
19738
  negative: 'feedback.text.negative.lowContrast'
19738
19739
  },
19739
19740
  icon: {
19740
19741
  unchecked: 'surface.text.subtle.lowContrast',
19741
19742
  disabled: 'surface.text.placeholder.lowContrast',
19742
- none: 'brand.primary.500',
19743
+ none: 'action.icon.secondary.default',
19743
19744
  positive: 'feedback.icon.positive.lowContrast',
19744
19745
  negative: 'feedback.icon.negative.lowContrast'
19745
19746
  },
@@ -25885,14 +25886,14 @@ var _Radio = function _Radio(_ref, ref) {
25885
25886
  isChecked: state.isChecked,
25886
25887
  isDisabled: _isDisabled,
25887
25888
  isNegative: hasError
25888
- }), /*#__PURE__*/jsx(SelectorTitle, {
25889
+ }), children ? /*#__PURE__*/jsx(SelectorTitle, {
25889
25890
  size: _size,
25890
25891
  isDisabled: _isDisabled,
25891
25892
  children: children
25892
- })]
25893
- }), /*#__PURE__*/jsx(BaseBox, {
25893
+ }) : null]
25894
+ }), showHelpText && /*#__PURE__*/jsx(BaseBox, {
25894
25895
  marginLeft: isSmall ? 'spacing.6' : 'spacing.7',
25895
- children: showHelpText && /*#__PURE__*/jsx(SelectorSupportText, {
25896
+ children: /*#__PURE__*/jsx(SelectorSupportText, {
25896
25897
  id: ids === null || ids === void 0 ? void 0 : ids.helpTextId,
25897
25898
  children: helpText
25898
25899
  })
@@ -26046,14 +26047,14 @@ var RadioGroup = function RadioGroup(_ref) {
26046
26047
  accessibilityRole: "radiogroup",
26047
26048
  componentName: "radio-group",
26048
26049
  testID: testID,
26049
- children: [/*#__PURE__*/jsx(FormLabel, {
26050
+ children: [label ? /*#__PURE__*/jsx(FormLabel, {
26050
26051
  as: "span",
26051
26052
  necessityIndicator: necessityIndicator,
26052
26053
  position: labelPosition,
26053
26054
  id: ids.labelId,
26054
26055
  accessibilityText: accessibilityText && ",".concat(accessibilityText),
26055
26056
  children: label
26056
- }), /*#__PURE__*/jsxs(BaseBox, {
26057
+ }) : null, /*#__PURE__*/jsxs(BaseBox, {
26057
26058
  children: [/*#__PURE__*/jsx(BaseBox, {
26058
26059
  display: "flex",
26059
26060
  flexDirection: "column",