@razorpay/blade 3.5.2 → 3.6.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.
- package/CHANGELOG.md +13 -0
- package/build/components/index.d.ts +33 -2
- package/build/components/index.native.d.ts +33 -2
- package/build/components/index.native.js +10 -8
- package/build/components/index.native.js.map +1 -1
- package/build/components/index.web.js +52 -25
- package/build/components/index.web.js.map +1 -1
- package/build/css/bankingThemeDarkDesktop.css +20 -12
- package/build/css/bankingThemeDarkMobile.css +20 -12
- package/build/css/bankingThemeLightDesktop.css +20 -12
- package/build/css/bankingThemeLightMobile.css +20 -12
- package/build/css/paymentThemeDarkDesktop.css +20 -12
- package/build/css/paymentThemeDarkMobile.css +20 -12
- package/build/css/paymentThemeLightDesktop.css +20 -12
- package/build/css/paymentThemeLightMobile.css +20 -12
- package/build/tokens/index.d.ts +4 -1
- package/build/tokens/index.native.d.ts +4 -1
- package/build/tokens/index.native.js +3 -3
- package/build/tokens/index.native.js.map +1 -1
- package/build/tokens/index.web.js +164 -50
- package/build/tokens/index.web.js.map +1 -1
- package/package.json +4 -1
|
@@ -5377,7 +5377,7 @@ var CodeContainer = /*#__PURE__*/styled(Box).withConfig({
|
|
|
5377
5377
|
var padding = "".concat(makeSpace(props.theme.spacing[0]), " ").concat(makeSpace(props.theme.spacing[2]));
|
|
5378
5378
|
return {
|
|
5379
5379
|
padding: padding,
|
|
5380
|
-
backgroundColor: props.theme.colors.brand.gray[400],
|
|
5380
|
+
backgroundColor: props.theme.colors.brand.gray[400].lowContrast,
|
|
5381
5381
|
borderRadius: props.theme.border.radius.medium,
|
|
5382
5382
|
display: isPlatformWeb ? 'inline-block' : undefined,
|
|
5383
5383
|
// Removing the line height of container to remove extra surrounding space in background
|
|
@@ -5775,9 +5775,9 @@ var getColor = function getColor(_ref) {
|
|
|
5775
5775
|
if (intent) {
|
|
5776
5776
|
return get_1(theme.colors, "feedback.".concat(intent, ".action.icon.primary.disabled.").concat(contrast, "Contrast"));
|
|
5777
5777
|
} else if (contrast == 'low') {
|
|
5778
|
-
return get_1(theme.colors, 'brand.gray.700');
|
|
5778
|
+
return get_1(theme.colors, 'brand.gray.700.lowContrast');
|
|
5779
5779
|
} else {
|
|
5780
|
-
return get_1(theme.colors, 'brand.gray.400');
|
|
5780
|
+
return get_1(theme.colors, 'brand.gray.400.lowContrast');
|
|
5781
5781
|
}
|
|
5782
5782
|
};
|
|
5783
5783
|
|
|
@@ -6475,6 +6475,10 @@ var Alert = function Alert(_ref) {
|
|
|
6475
6475
|
isBorderless = _ref$isBorderless === void 0 ? false : _ref$isBorderless,
|
|
6476
6476
|
actions = _ref.actions;
|
|
6477
6477
|
|
|
6478
|
+
if (!(actions !== null && actions !== void 0 && actions.primary) && actions !== null && actions !== void 0 && actions.secondary) {
|
|
6479
|
+
throw new Error('[Blade: Alert]: SecondaryAction is allowed only when PrimaryAction is defined.');
|
|
6480
|
+
}
|
|
6481
|
+
|
|
6478
6482
|
var _useState = useState(true),
|
|
6479
6483
|
_useState2 = _slicedToArray(_useState, 2),
|
|
6480
6484
|
isVisible = _useState2[0],
|
|
@@ -6766,6 +6770,29 @@ var Button = function Button(_ref) {
|
|
|
6766
6770
|
}));
|
|
6767
6771
|
};
|
|
6768
6772
|
|
|
6773
|
+
var Counter = function Counter(_ref) {
|
|
6774
|
+
var value = _ref.value,
|
|
6775
|
+
max = _ref.max,
|
|
6776
|
+
_ref$intent = _ref.intent,
|
|
6777
|
+
intent = _ref$intent === void 0 ? 'neutral' : _ref$intent,
|
|
6778
|
+
_ref$contrast = _ref.contrast,
|
|
6779
|
+
contrast = _ref$contrast === void 0 ? 'low' : _ref$contrast,
|
|
6780
|
+
_ref$size = _ref.size,
|
|
6781
|
+
size = _ref$size === void 0 ? 'medium' : _ref$size;
|
|
6782
|
+
var content = "".concat(value);
|
|
6783
|
+
|
|
6784
|
+
if (max && value > max) {
|
|
6785
|
+
content = "".concat(max, "+");
|
|
6786
|
+
}
|
|
6787
|
+
|
|
6788
|
+
return /*#__PURE__*/jsx(Badge, {
|
|
6789
|
+
size: size,
|
|
6790
|
+
variant: intent,
|
|
6791
|
+
contrast: contrast,
|
|
6792
|
+
children: content
|
|
6793
|
+
});
|
|
6794
|
+
};
|
|
6795
|
+
|
|
6769
6796
|
/**
|
|
6770
6797
|
* Checks if `value` is `undefined`.
|
|
6771
6798
|
*
|
|
@@ -6828,7 +6855,7 @@ var checkboxIconColors = {
|
|
|
6828
6855
|
"default": {
|
|
6829
6856
|
border: {
|
|
6830
6857
|
checked: 'colors.brand.primary.500',
|
|
6831
|
-
unchecked: 'colors.brand.gray.500'
|
|
6858
|
+
unchecked: 'colors.brand.gray.500.lowContrast'
|
|
6832
6859
|
},
|
|
6833
6860
|
background: {
|
|
6834
6861
|
checked: 'colors.brand.primary.500',
|
|
@@ -6838,10 +6865,10 @@ var checkboxIconColors = {
|
|
|
6838
6865
|
disabled: {
|
|
6839
6866
|
border: {
|
|
6840
6867
|
checked: 'transparent',
|
|
6841
|
-
unchecked: 'colors.brand.gray.a100'
|
|
6868
|
+
unchecked: 'colors.brand.gray.a100.lowContrast'
|
|
6842
6869
|
},
|
|
6843
6870
|
background: {
|
|
6844
|
-
checked: 'colors.brand.gray.a100',
|
|
6871
|
+
checked: 'colors.brand.gray.a100.lowContrast',
|
|
6845
6872
|
unchecked: 'transparent'
|
|
6846
6873
|
}
|
|
6847
6874
|
},
|
|
@@ -6997,8 +7024,8 @@ var CheckboxIcon = function CheckboxIcon(_ref3) {
|
|
|
6997
7024
|
var _useTheme = useTheme(),
|
|
6998
7025
|
theme = _useTheme.theme;
|
|
6999
7026
|
|
|
7000
|
-
var defaultIconColor = get_1(theme, 'colors.brand.gray.200');
|
|
7001
|
-
var disabledIconColor = get_1(theme, 'colors.brand.gray.500');
|
|
7027
|
+
var defaultIconColor = get_1(theme, 'colors.brand.gray.200.lowContrast');
|
|
7028
|
+
var disabledIconColor = get_1(theme, 'colors.brand.gray.500.lowContrast');
|
|
7002
7029
|
var iconColor = isDisabled ? disabledIconColor : defaultIconColor;
|
|
7003
7030
|
return /*#__PURE__*/jsxs(CheckboxIconWrapper, {
|
|
7004
7031
|
size: size,
|
|
@@ -7539,11 +7566,11 @@ var variants = {
|
|
|
7539
7566
|
"default": {
|
|
7540
7567
|
background: {
|
|
7541
7568
|
checked: 'colors.brand.primary.600',
|
|
7542
|
-
unchecked: 'colors.brand.gray.a50'
|
|
7569
|
+
unchecked: 'colors.brand.gray.a50.lowContrast'
|
|
7543
7570
|
},
|
|
7544
7571
|
border: {
|
|
7545
7572
|
checked: 'colors.brand.primary.600',
|
|
7546
|
-
unchecked: 'colors.brand.gray.500'
|
|
7573
|
+
unchecked: 'colors.brand.gray.500.lowContrast'
|
|
7547
7574
|
}
|
|
7548
7575
|
}
|
|
7549
7576
|
};
|
|
@@ -8142,11 +8169,11 @@ var getInputBackgroundAndBorderStyles = function getInputBackgroundAndBorderStyl
|
|
|
8142
8169
|
isDisabled = _ref.isDisabled,
|
|
8143
8170
|
validationState = _ref.validationState;
|
|
8144
8171
|
// normal state
|
|
8145
|
-
var backgroundColor = theme.colors.brand.gray[200];
|
|
8146
|
-
var borderBottomColor = theme.colors.brand.gray[400]; //hoverState
|
|
8172
|
+
var backgroundColor = theme.colors.brand.gray[200].lowContrast;
|
|
8173
|
+
var borderBottomColor = theme.colors.brand.gray[400].lowContrast; //hoverState
|
|
8147
8174
|
|
|
8148
8175
|
if (isHovered) {
|
|
8149
|
-
backgroundColor = theme.colors.brand.gray[300];
|
|
8176
|
+
backgroundColor = theme.colors.brand.gray[300].lowContrast;
|
|
8150
8177
|
} // focused state
|
|
8151
8178
|
|
|
8152
8179
|
|
|
@@ -8156,8 +8183,8 @@ var getInputBackgroundAndBorderStyles = function getInputBackgroundAndBorderStyl
|
|
|
8156
8183
|
|
|
8157
8184
|
|
|
8158
8185
|
if (isDisabled) {
|
|
8159
|
-
backgroundColor = theme.colors.brand.gray[200];
|
|
8160
|
-
borderBottomColor = theme.colors.brand.gray[300];
|
|
8186
|
+
backgroundColor = theme.colors.brand.gray[200].lowContrast;
|
|
8187
|
+
borderBottomColor = theme.colors.brand.gray[300].lowContrast;
|
|
8161
8188
|
} // validation state
|
|
8162
8189
|
|
|
8163
8190
|
|
|
@@ -9722,12 +9749,12 @@ var radioIconColors = {
|
|
|
9722
9749
|
variants: {
|
|
9723
9750
|
"default": {
|
|
9724
9751
|
dot: {
|
|
9725
|
-
checked: 'colors.brand.gray.200',
|
|
9726
|
-
unchecked: 'colors.brand.gray.200'
|
|
9752
|
+
checked: 'colors.brand.gray.200.lowContrast',
|
|
9753
|
+
unchecked: 'colors.brand.gray.200.lowContrast'
|
|
9727
9754
|
},
|
|
9728
9755
|
border: {
|
|
9729
9756
|
checked: 'colors.brand.primary.500',
|
|
9730
|
-
unchecked: 'colors.brand.gray.500'
|
|
9757
|
+
unchecked: 'colors.brand.gray.500.lowContrast'
|
|
9731
9758
|
},
|
|
9732
9759
|
background: {
|
|
9733
9760
|
checked: 'colors.brand.primary.500',
|
|
@@ -9736,22 +9763,22 @@ var radioIconColors = {
|
|
|
9736
9763
|
},
|
|
9737
9764
|
disabled: {
|
|
9738
9765
|
dot: {
|
|
9739
|
-
checked: 'colors.brand.gray.200',
|
|
9740
|
-
unchecked: 'colors.brand.gray.200'
|
|
9766
|
+
checked: 'colors.brand.gray.200.lowContrast',
|
|
9767
|
+
unchecked: 'colors.brand.gray.200.lowContrast'
|
|
9741
9768
|
},
|
|
9742
9769
|
border: {
|
|
9743
9770
|
checked: 'transparent',
|
|
9744
|
-
unchecked: 'colors.brand.gray.a100'
|
|
9771
|
+
unchecked: 'colors.brand.gray.a100.lowContrast'
|
|
9745
9772
|
},
|
|
9746
9773
|
background: {
|
|
9747
|
-
checked: 'colors.brand.gray.a100',
|
|
9774
|
+
checked: 'colors.brand.gray.a100.lowContrast',
|
|
9748
9775
|
unchecked: 'transparent'
|
|
9749
9776
|
}
|
|
9750
9777
|
},
|
|
9751
9778
|
negative: {
|
|
9752
9779
|
dot: {
|
|
9753
|
-
checked: 'colors.brand.gray.200',
|
|
9754
|
-
unchecked: 'colors.brand.gray.200'
|
|
9780
|
+
checked: 'colors.brand.gray.200.lowContrast',
|
|
9781
|
+
unchecked: 'colors.brand.gray.200.lowContrast'
|
|
9755
9782
|
},
|
|
9756
9783
|
border: {
|
|
9757
9784
|
checked: 'colors.feedback.border.negative.highContrast',
|
|
@@ -10346,5 +10373,5 @@ var SkipNavContent = function SkipNavContent(_ref3) {
|
|
|
10346
10373
|
}, testID('skipnav-content')));
|
|
10347
10374
|
};
|
|
10348
10375
|
|
|
10349
|
-
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 };
|
|
10376
|
+
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 };
|
|
10350
10377
|
//# sourceMappingURL=index.web.js.map
|