@razorpay/blade 3.5.3 → 3.6.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.
@@ -5035,8 +5035,7 @@ var getBaseTextStyles = function getBaseTextStyles(_ref) {
5035
5035
  textDecorationLine = _ref$textDecorationLi === void 0 ? 'none' : _ref$textDecorationLi,
5036
5036
  _ref$lineHeight = _ref.lineHeight,
5037
5037
  lineHeight = _ref$lineHeight === void 0 ? 'l' : _ref$lineHeight,
5038
- _ref$textAlign = _ref.textAlign,
5039
- textAlign = _ref$textAlign === void 0 ? 'left' : _ref$textAlign,
5038
+ textAlign = _ref.textAlign,
5040
5039
  theme = _ref.theme;
5041
5040
  var textColor = get_1(theme.colors, color);
5042
5041
  var themeFontFamily = theme.typography.fonts.family[fontFamily];
@@ -5377,7 +5376,7 @@ var CodeContainer = /*#__PURE__*/styled(Box).withConfig({
5377
5376
  var padding = "".concat(makeSpace(props.theme.spacing[0]), " ").concat(makeSpace(props.theme.spacing[2]));
5378
5377
  return {
5379
5378
  padding: padding,
5380
- backgroundColor: props.theme.colors.brand.gray[400],
5379
+ backgroundColor: props.theme.colors.brand.gray[400].lowContrast,
5381
5380
  borderRadius: props.theme.border.radius.medium,
5382
5381
  display: isPlatformWeb ? 'inline-block' : undefined,
5383
5382
  // Removing the line height of container to remove extra surrounding space in background
@@ -5775,9 +5774,9 @@ var getColor = function getColor(_ref) {
5775
5774
  if (intent) {
5776
5775
  return get_1(theme.colors, "feedback.".concat(intent, ".action.icon.primary.disabled.").concat(contrast, "Contrast"));
5777
5776
  } else if (contrast == 'low') {
5778
- return get_1(theme.colors, 'brand.gray.700');
5777
+ return get_1(theme.colors, 'brand.gray.700.lowContrast');
5779
5778
  } else {
5780
- return get_1(theme.colors, 'brand.gray.400');
5779
+ return get_1(theme.colors, 'brand.gray.400.lowContrast');
5781
5780
  }
5782
5781
  };
5783
5782
 
@@ -6770,6 +6769,29 @@ var Button = function Button(_ref) {
6770
6769
  }));
6771
6770
  };
6772
6771
 
6772
+ var Counter = function Counter(_ref) {
6773
+ var value = _ref.value,
6774
+ max = _ref.max,
6775
+ _ref$intent = _ref.intent,
6776
+ intent = _ref$intent === void 0 ? 'neutral' : _ref$intent,
6777
+ _ref$contrast = _ref.contrast,
6778
+ contrast = _ref$contrast === void 0 ? 'low' : _ref$contrast,
6779
+ _ref$size = _ref.size,
6780
+ size = _ref$size === void 0 ? 'medium' : _ref$size;
6781
+ var content = "".concat(value);
6782
+
6783
+ if (max && value > max) {
6784
+ content = "".concat(max, "+");
6785
+ }
6786
+
6787
+ return /*#__PURE__*/jsx(Badge, {
6788
+ size: size,
6789
+ variant: intent,
6790
+ contrast: contrast,
6791
+ children: content
6792
+ });
6793
+ };
6794
+
6773
6795
  /**
6774
6796
  * Checks if `value` is `undefined`.
6775
6797
  *
@@ -6832,7 +6854,7 @@ var checkboxIconColors = {
6832
6854
  "default": {
6833
6855
  border: {
6834
6856
  checked: 'colors.brand.primary.500',
6835
- unchecked: 'colors.brand.gray.500'
6857
+ unchecked: 'colors.brand.gray.500.lowContrast'
6836
6858
  },
6837
6859
  background: {
6838
6860
  checked: 'colors.brand.primary.500',
@@ -6842,10 +6864,10 @@ var checkboxIconColors = {
6842
6864
  disabled: {
6843
6865
  border: {
6844
6866
  checked: 'transparent',
6845
- unchecked: 'colors.brand.gray.a100'
6867
+ unchecked: 'colors.brand.gray.a100.lowContrast'
6846
6868
  },
6847
6869
  background: {
6848
- checked: 'colors.brand.gray.a100',
6870
+ checked: 'colors.brand.gray.a100.lowContrast',
6849
6871
  unchecked: 'transparent'
6850
6872
  }
6851
6873
  },
@@ -7001,8 +7023,8 @@ var CheckboxIcon = function CheckboxIcon(_ref3) {
7001
7023
  var _useTheme = useTheme(),
7002
7024
  theme = _useTheme.theme;
7003
7025
 
7004
- var defaultIconColor = get_1(theme, 'colors.brand.gray.200');
7005
- var disabledIconColor = get_1(theme, 'colors.brand.gray.500');
7026
+ var defaultIconColor = get_1(theme, 'colors.brand.gray.200.lowContrast');
7027
+ var disabledIconColor = get_1(theme, 'colors.brand.gray.500.lowContrast');
7006
7028
  var iconColor = isDisabled ? disabledIconColor : defaultIconColor;
7007
7029
  return /*#__PURE__*/jsxs(CheckboxIconWrapper, {
7008
7030
  size: size,
@@ -7543,11 +7565,11 @@ var variants = {
7543
7565
  "default": {
7544
7566
  background: {
7545
7567
  checked: 'colors.brand.primary.600',
7546
- unchecked: 'colors.brand.gray.a50'
7568
+ unchecked: 'colors.brand.gray.a50.lowContrast'
7547
7569
  },
7548
7570
  border: {
7549
7571
  checked: 'colors.brand.primary.600',
7550
- unchecked: 'colors.brand.gray.500'
7572
+ unchecked: 'colors.brand.gray.500.lowContrast'
7551
7573
  }
7552
7574
  }
7553
7575
  };
@@ -8146,11 +8168,11 @@ var getInputBackgroundAndBorderStyles = function getInputBackgroundAndBorderStyl
8146
8168
  isDisabled = _ref.isDisabled,
8147
8169
  validationState = _ref.validationState;
8148
8170
  // normal state
8149
- var backgroundColor = theme.colors.brand.gray[200];
8150
- var borderBottomColor = theme.colors.brand.gray[400]; //hoverState
8171
+ var backgroundColor = theme.colors.brand.gray[200].lowContrast;
8172
+ var borderBottomColor = theme.colors.brand.gray[400].lowContrast; //hoverState
8151
8173
 
8152
8174
  if (isHovered) {
8153
- backgroundColor = theme.colors.brand.gray[300];
8175
+ backgroundColor = theme.colors.brand.gray[300].lowContrast;
8154
8176
  } // focused state
8155
8177
 
8156
8178
 
@@ -8160,8 +8182,8 @@ var getInputBackgroundAndBorderStyles = function getInputBackgroundAndBorderStyl
8160
8182
 
8161
8183
 
8162
8184
  if (isDisabled) {
8163
- backgroundColor = theme.colors.brand.gray[200];
8164
- borderBottomColor = theme.colors.brand.gray[300];
8185
+ backgroundColor = theme.colors.brand.gray[200].lowContrast;
8186
+ borderBottomColor = theme.colors.brand.gray[300].lowContrast;
8165
8187
  } // validation state
8166
8188
 
8167
8189
 
@@ -9726,12 +9748,12 @@ var radioIconColors = {
9726
9748
  variants: {
9727
9749
  "default": {
9728
9750
  dot: {
9729
- checked: 'colors.brand.gray.200',
9730
- unchecked: 'colors.brand.gray.200'
9751
+ checked: 'colors.brand.gray.200.lowContrast',
9752
+ unchecked: 'colors.brand.gray.200.lowContrast'
9731
9753
  },
9732
9754
  border: {
9733
9755
  checked: 'colors.brand.primary.500',
9734
- unchecked: 'colors.brand.gray.500'
9756
+ unchecked: 'colors.brand.gray.500.lowContrast'
9735
9757
  },
9736
9758
  background: {
9737
9759
  checked: 'colors.brand.primary.500',
@@ -9740,22 +9762,22 @@ var radioIconColors = {
9740
9762
  },
9741
9763
  disabled: {
9742
9764
  dot: {
9743
- checked: 'colors.brand.gray.200',
9744
- unchecked: 'colors.brand.gray.200'
9765
+ checked: 'colors.brand.gray.200.lowContrast',
9766
+ unchecked: 'colors.brand.gray.200.lowContrast'
9745
9767
  },
9746
9768
  border: {
9747
9769
  checked: 'transparent',
9748
- unchecked: 'colors.brand.gray.a100'
9770
+ unchecked: 'colors.brand.gray.a100.lowContrast'
9749
9771
  },
9750
9772
  background: {
9751
- checked: 'colors.brand.gray.a100',
9773
+ checked: 'colors.brand.gray.a100.lowContrast',
9752
9774
  unchecked: 'transparent'
9753
9775
  }
9754
9776
  },
9755
9777
  negative: {
9756
9778
  dot: {
9757
- checked: 'colors.brand.gray.200',
9758
- unchecked: 'colors.brand.gray.200'
9779
+ checked: 'colors.brand.gray.200.lowContrast',
9780
+ unchecked: 'colors.brand.gray.200.lowContrast'
9759
9781
  },
9760
9782
  border: {
9761
9783
  checked: 'colors.feedback.border.negative.highContrast',
@@ -10350,5 +10372,5 @@ var SkipNavContent = function SkipNavContent(_ref3) {
10350
10372
  }, testID('skipnav-content')));
10351
10373
  };
10352
10374
 
10353
- export { Alert, AlertTriangleIcon as AlertOctagonIcon, AlertTriangleIcon$1 as AlertTriangleIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpRightIcon, Badge, BladeProvider, Button, CheckCircleIcon, CheckIcon, Checkbox, CheckboxGroup, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, Code, CreditCardIcon, DollarIcon, DownloadIcon, EditIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, Heading, HelpCircleIcon, HistoryIcon, HomeIcon, InfoIcon, Link, LinkIcon, MinusIcon, OTPInput, PasswordInput, PauseIcon, PlusIcon, Radio, RadioGroup, RefreshLeftIcon, RotateCounterClockWiseIcon, RupeeIcon, SearchIcon, SkipNavContent, SkipNavLink, Spinner, Text, TextArea, TextInput, Title, TrashIcon, TrendingDownIcon, TrendingUpIcon, VisuallyHidden, announce, clearAnnouncer, destroyAnnouncer, getTextProps, screenReaderStyles, useTheme };
10375
+ export { Alert, AlertTriangleIcon as AlertOctagonIcon, AlertTriangleIcon$1 as AlertTriangleIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpRightIcon, Badge, BladeProvider, Button, CheckCircleIcon, CheckIcon, Checkbox, CheckboxGroup, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, Code, Counter, CreditCardIcon, DollarIcon, DownloadIcon, EditIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, Heading, HelpCircleIcon, HistoryIcon, HomeIcon, InfoIcon, Link, LinkIcon, MinusIcon, OTPInput, PasswordInput, PauseIcon, PlusIcon, Radio, RadioGroup, RefreshLeftIcon, RotateCounterClockWiseIcon, RupeeIcon, SearchIcon, SkipNavContent, SkipNavLink, Spinner, Text, TextArea, TextInput, Title, TrashIcon, TrendingDownIcon, TrendingUpIcon, VisuallyHidden, announce, clearAnnouncer, destroyAnnouncer, getTextProps, screenReaderStyles, useTheme };
10354
10376
  //# sourceMappingURL=index.web.js.map