@razorpay/blade 10.15.1 → 10.15.2
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/README.md +28 -26
- package/build/components/index.d.ts +2 -1
- package/build/components/index.development.web.js +48 -26
- package/build/components/index.development.web.js.map +1 -1
- package/build/components/index.native.d.ts +2 -1
- package/build/components/index.native.js +13 -11
- package/build/components/index.native.js.map +1 -1
- package/build/components/index.production.web.js +48 -26
- package/build/components/index.production.web.js.map +1 -1
- package/build/css/bankingThemeDarkDesktop.css +1 -1
- package/build/css/bankingThemeDarkMobile.css +1 -1
- package/build/css/bankingThemeLightDesktop.css +1 -1
- package/build/css/bankingThemeLightMobile.css +1 -1
- package/build/css/paymentThemeDarkDesktop.css +1 -1
- package/build/css/paymentThemeDarkMobile.css +1 -1
- package/build/css/paymentThemeLightDesktop.css +1 -1
- package/build/css/paymentThemeLightMobile.css +1 -1
- package/package.json +1 -1
|
@@ -14317,6 +14317,7 @@ var getCheckboxIconWrapperStyles = function getCheckboxIconWrapperStyles(_ref) {
|
|
|
14317
14317
|
display: 'flex',
|
|
14318
14318
|
alignItems: 'center',
|
|
14319
14319
|
justifyContent: 'center',
|
|
14320
|
+
flexShrink: 0,
|
|
14320
14321
|
width: makeSpace(checkboxSizes.icon[size].width),
|
|
14321
14322
|
height: makeSpace(checkboxSizes.icon[size].height),
|
|
14322
14323
|
borderWidth: makeBorderSize(theme.border.width.thick),
|
|
@@ -15197,7 +15198,6 @@ var _Checkbox = function _Checkbox(_ref, ref) {
|
|
|
15197
15198
|
flexDirection: "column",
|
|
15198
15199
|
children: [/*#__PURE__*/jsxs(BaseBox, {
|
|
15199
15200
|
display: "flex",
|
|
15200
|
-
alignItems: "center",
|
|
15201
15201
|
flexDirection: "row",
|
|
15202
15202
|
children: [/*#__PURE__*/jsx(SelectorInput, {
|
|
15203
15203
|
hoverTokens: checkboxHoverTokens,
|
|
@@ -15728,14 +15728,6 @@ var _ActionListItemText = function _ActionListItemText(_ref4) {
|
|
|
15728
15728
|
var ActionListItemText = /*#__PURE__*/assignWithoutSideEffects(_ActionListItemText, {
|
|
15729
15729
|
componentId: componentIds.ActionListItemText
|
|
15730
15730
|
});
|
|
15731
|
-
var ActionListCheckboxWrapper = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
15732
|
-
displayName: "ActionListItem__ActionListCheckboxWrapper",
|
|
15733
|
-
componentId: "m6qdwa-1"
|
|
15734
|
-
})(function (_props) {
|
|
15735
|
-
return {
|
|
15736
|
-
pointerEvents: 'none'
|
|
15737
|
-
};
|
|
15738
|
-
});
|
|
15739
15731
|
var makeActionListItemClickable = function makeActionListItemClickable(clickHandler) {
|
|
15740
15732
|
if (isReactNative$4()) {
|
|
15741
15733
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error
|
|
@@ -15772,8 +15764,9 @@ var _ActionListItemBody = function _ActionListItemBody(_ref5) {
|
|
|
15772
15764
|
children: selectionType === 'multiple' ?
|
|
15773
15765
|
/*#__PURE__*/
|
|
15774
15766
|
// Adding aria-hidden because the listbox item in multiselect in itself explains the behaviour so announcing checkbox is unneccesary and just a nice UI tweak for us
|
|
15775
|
-
jsx(
|
|
15776
|
-
|
|
15767
|
+
jsx(BaseBox, _objectSpread$1q(_objectSpread$1q({
|
|
15768
|
+
pointerEvents: "none",
|
|
15769
|
+
paddingRight: "spacing.2"
|
|
15777
15770
|
}, makeAccessible({
|
|
15778
15771
|
hidden: true
|
|
15779
15772
|
})), {}, {
|
|
@@ -21317,7 +21310,7 @@ var _StyledBaseInput = function _StyledBaseInput(_ref, ref) {
|
|
|
21317
21310
|
}, commonProps), props), accessibilityProps), {}, {
|
|
21318
21311
|
value: props.value,
|
|
21319
21312
|
children: /*#__PURE__*/jsx(Text, {
|
|
21320
|
-
type: props.value ? 'subtle' : 'placeholder',
|
|
21313
|
+
type: props.value && !isDisabled ? 'subtle' : 'placeholder',
|
|
21321
21314
|
truncateAfterLines: 1,
|
|
21322
21315
|
textAlign: props.textAlign,
|
|
21323
21316
|
children: props.value ? props.value : props.placeholder
|
|
@@ -21590,7 +21583,8 @@ var BaseInputTagSlot = function BaseInputTagSlot(_ref3) {
|
|
|
21590
21583
|
handleOnInputClick = _ref3.handleOnInputClick,
|
|
21591
21584
|
isDropdownTrigger = _ref3.isDropdownTrigger,
|
|
21592
21585
|
visibleTagsCountRef = _ref3.visibleTagsCountRef,
|
|
21593
|
-
labelPrefix = _ref3.labelPrefix
|
|
21586
|
+
labelPrefix = _ref3.labelPrefix,
|
|
21587
|
+
isDisabled = _ref3.isDisabled;
|
|
21594
21588
|
var hasTags = tags && tags.length > 0;
|
|
21595
21589
|
var slotRef = React__default.useRef(null);
|
|
21596
21590
|
var visibleTagsCount = useVisibleTagsCount({
|
|
@@ -21659,6 +21653,7 @@ var BaseInputTagSlot = function BaseInputTagSlot(_ref3) {
|
|
|
21659
21653
|
setShouldIgnoreBlurAnimation === null || setShouldIgnoreBlurAnimation === void 0 ? void 0 : setShouldIgnoreBlurAnimation(false);
|
|
21660
21654
|
},
|
|
21661
21655
|
children: [visibleTags, tags && !showAllTags && invisibleTagsCount ? /*#__PURE__*/jsx(Text, {
|
|
21656
|
+
type: isDisabled ? 'placeholder' : 'normal',
|
|
21662
21657
|
alignSelf: "center",
|
|
21663
21658
|
marginY: "spacing.2",
|
|
21664
21659
|
marginRight: "spacing.4",
|
|
@@ -22092,6 +22087,7 @@ var BaseInput = /*#__PURE__*/React__default.forwardRef(function (_ref11, ref) {
|
|
|
22092
22087
|
}), /*#__PURE__*/jsx(BaseInputTagSlot, {
|
|
22093
22088
|
renderAs: as,
|
|
22094
22089
|
tags: tags,
|
|
22090
|
+
isDisabled: isDisabled,
|
|
22095
22091
|
showAllTags: showAllTagsWithAnimation,
|
|
22096
22092
|
setFocusOnInput: function setFocusOnInput() {
|
|
22097
22093
|
if (ref && !isReactNative && 'current' in ref) {
|
|
@@ -23032,22 +23028,32 @@ var _OTPInput = function _OTPInput(_ref, incomingRef) {
|
|
|
23032
23028
|
};
|
|
23033
23029
|
var OTPInput = /*#__PURE__*/React__default.forwardRef(_OTPInput);
|
|
23034
23030
|
|
|
23031
|
+
var Chevron = function Chevron(props) {
|
|
23032
|
+
var iconColor = "surface.text.".concat(props.isDisabled ? 'placeholder' : 'normal', ".lowContrast");
|
|
23033
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
23034
|
+
children: [/*#__PURE__*/jsx(ChevronDownIcon, {
|
|
23035
|
+
display: props.isOpen ? 'none' : 'flex',
|
|
23036
|
+
size: "medium",
|
|
23037
|
+
color: iconColor
|
|
23038
|
+
}), /*#__PURE__*/jsx(ChevronUpIcon, {
|
|
23039
|
+
display: props.isOpen ? 'flex' : 'none',
|
|
23040
|
+
size: "medium",
|
|
23041
|
+
color: iconColor
|
|
23042
|
+
})]
|
|
23043
|
+
});
|
|
23044
|
+
};
|
|
23045
|
+
|
|
23035
23046
|
var InputChevronIcon = function InputChevronIcon(props) {
|
|
23036
|
-
return /*#__PURE__*/
|
|
23047
|
+
return /*#__PURE__*/jsx(BaseBox, {
|
|
23037
23048
|
display: "flex",
|
|
23038
23049
|
height: "100%",
|
|
23039
23050
|
justifyContent: "center",
|
|
23040
23051
|
alignItems: "center",
|
|
23041
23052
|
onClick: props.onClick,
|
|
23042
|
-
children:
|
|
23043
|
-
|
|
23044
|
-
|
|
23045
|
-
|
|
23046
|
-
}), /*#__PURE__*/jsx(ChevronUpIcon, {
|
|
23047
|
-
display: props.isOpen ? 'flex' : 'none',
|
|
23048
|
-
color: "surface.text.normal.lowContrast",
|
|
23049
|
-
size: "medium"
|
|
23050
|
-
})]
|
|
23053
|
+
children: /*#__PURE__*/jsx(Chevron, {
|
|
23054
|
+
isOpen: props.isOpen,
|
|
23055
|
+
isDisabled: props.isDisabled
|
|
23056
|
+
})
|
|
23051
23057
|
});
|
|
23052
23058
|
};
|
|
23053
23059
|
|
|
@@ -23197,6 +23203,7 @@ var AnimatedTagContainer = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
|
23197
23203
|
var AnimatedTag = function AnimatedTag(_ref) {
|
|
23198
23204
|
var children = _ref.children,
|
|
23199
23205
|
currentTagIndex = _ref.currentTagIndex,
|
|
23206
|
+
isDisabled = _ref.isDisabled,
|
|
23200
23207
|
activeTagIndex = _ref.activeTagIndex,
|
|
23201
23208
|
onDismiss = _ref.onDismiss;
|
|
23202
23209
|
var _React$useState = React__default.useState(true),
|
|
@@ -23226,6 +23233,7 @@ var AnimatedTag = function AnimatedTag(_ref) {
|
|
|
23226
23233
|
},
|
|
23227
23234
|
marginRight: "spacing.3",
|
|
23228
23235
|
marginY: "spacing.2",
|
|
23236
|
+
isDisabled: isDisabled,
|
|
23229
23237
|
children: children
|
|
23230
23238
|
})
|
|
23231
23239
|
});
|
|
@@ -23234,6 +23242,7 @@ var AnimatedTag = function AnimatedTag(_ref) {
|
|
|
23234
23242
|
var getTagsGroup = function getTagsGroup(_ref) {
|
|
23235
23243
|
var tags = _ref.tags,
|
|
23236
23244
|
activeTagIndex = _ref.activeTagIndex,
|
|
23245
|
+
isDisabled = _ref.isDisabled,
|
|
23237
23246
|
onDismiss = _ref.onDismiss;
|
|
23238
23247
|
return tags.map(function (tagName, tagIndex) {
|
|
23239
23248
|
return /*#__PURE__*/jsx(AnimatedTag, {
|
|
@@ -23241,6 +23250,7 @@ var getTagsGroup = function getTagsGroup(_ref) {
|
|
|
23241
23250
|
onDismiss: onDismiss,
|
|
23242
23251
|
currentTagIndex: tagIndex,
|
|
23243
23252
|
tagsLength: tags.length,
|
|
23253
|
+
isDisabled: isDisabled,
|
|
23244
23254
|
children: tagName
|
|
23245
23255
|
}, tagName);
|
|
23246
23256
|
});
|
|
@@ -23420,9 +23430,11 @@ var _BaseDropdownInputTrigger = function _BaseDropdownInputTrigger(props, ref) {
|
|
|
23420
23430
|
}
|
|
23421
23431
|
return getTagsGroup({
|
|
23422
23432
|
tags: selectedIndices.map(function (selectedIndex) {
|
|
23423
|
-
|
|
23433
|
+
var _options$selectedInde;
|
|
23434
|
+
return (_options$selectedInde = options[selectedIndex]) === null || _options$selectedInde === void 0 ? void 0 : _options$selectedInde.title;
|
|
23424
23435
|
}),
|
|
23425
23436
|
activeTagIndex: activeTagIndex,
|
|
23437
|
+
isDisabled: props.isDisabled,
|
|
23426
23438
|
onDismiss: function onDismiss(_ref) {
|
|
23427
23439
|
var tagIndex = _ref.tagIndex;
|
|
23428
23440
|
if (isTagDismissedRef.current) {
|
|
@@ -23488,7 +23500,13 @@ var _BaseDropdownInputTrigger = function _BaseDropdownInputTrigger(props, ref) {
|
|
|
23488
23500
|
autoFocus: props.autoFocus // eslint-disable-line jsx-a11y/no-autofocus
|
|
23489
23501
|
,
|
|
23490
23502
|
value: getValue(),
|
|
23491
|
-
onClick:
|
|
23503
|
+
onClick: function onClick(e) {
|
|
23504
|
+
var _props$onTriggerClick;
|
|
23505
|
+
if (props.isDisabled) {
|
|
23506
|
+
return;
|
|
23507
|
+
}
|
|
23508
|
+
(_props$onTriggerClick = props.onTriggerClick) === null || _props$onTriggerClick === void 0 ? void 0 : _props$onTriggerClick.call(props, e);
|
|
23509
|
+
},
|
|
23492
23510
|
onFocus: props.onFocus,
|
|
23493
23511
|
onBlur: function onBlur(_ref2) {
|
|
23494
23512
|
var _props$onBlur;
|
|
@@ -23526,6 +23544,7 @@ var _BaseDropdownInputTrigger = function _BaseDropdownInputTrigger(props, ref) {
|
|
|
23526
23544
|
onTriggerClick();
|
|
23527
23545
|
}
|
|
23528
23546
|
},
|
|
23547
|
+
isDisabled: props.isDisabled,
|
|
23529
23548
|
isOpen: isOpen
|
|
23530
23549
|
})
|
|
23531
23550
|
});
|
|
@@ -23727,7 +23746,10 @@ var useAutoComplete = function useAutoComplete(_ref) {
|
|
|
23727
23746
|
name: props.name,
|
|
23728
23747
|
value: displayText
|
|
23729
23748
|
});
|
|
23730
|
-
|
|
23749
|
+
// Use displayText as inputValue only if its not controlled by user
|
|
23750
|
+
if (typeof props.value === 'undefined') {
|
|
23751
|
+
setInputValue(displayText !== null && displayText !== void 0 ? displayText : '');
|
|
23752
|
+
}
|
|
23731
23753
|
}
|
|
23732
23754
|
(_props$onChange = props.onChange) === null || _props$onChange === void 0 ? void 0 : _props$onChange.call(props, {
|
|
23733
23755
|
name: props.name,
|