@razorpay/blade 5.4.2 → 5.5.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 +21 -0
- package/build/components/index.d.ts +47 -16
- package/build/components/index.native.d.ts +47 -16
- package/build/components/index.native.js +27 -11
- package/build/components/index.native.js.map +1 -1
- package/build/components/index.web.js +300 -25
- package/build/components/index.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
|
@@ -4128,6 +4128,35 @@ var ChevronUpIcon = function ChevronUpIcon(_ref) {
|
|
|
4128
4128
|
});
|
|
4129
4129
|
};
|
|
4130
4130
|
|
|
4131
|
+
var ClockIcon = function ClockIcon(_ref) {
|
|
4132
|
+
var size = _ref.size,
|
|
4133
|
+
color = _ref.color;
|
|
4134
|
+
|
|
4135
|
+
var _useIconProps = useIconProps({
|
|
4136
|
+
size: size,
|
|
4137
|
+
color: color
|
|
4138
|
+
}),
|
|
4139
|
+
height = _useIconProps.height,
|
|
4140
|
+
width = _useIconProps.width,
|
|
4141
|
+
iconColor = _useIconProps.iconColor;
|
|
4142
|
+
|
|
4143
|
+
return /*#__PURE__*/jsxs(Svg, {
|
|
4144
|
+
height: height,
|
|
4145
|
+
width: width,
|
|
4146
|
+
viewBox: "0 0 24 24",
|
|
4147
|
+
fill: "none",
|
|
4148
|
+
children: [/*#__PURE__*/jsx(Path, {
|
|
4149
|
+
d: "M13 6a1 1 0 1 0-2 0v6a1 1 0 0 0 .293.707l3 3a1 1 0 0 0 1.414-1.414L13 11.586V6Z",
|
|
4150
|
+
fill: iconColor
|
|
4151
|
+
}), /*#__PURE__*/jsx(Path, {
|
|
4152
|
+
fillRule: "evenodd",
|
|
4153
|
+
clipRule: "evenodd",
|
|
4154
|
+
d: "M12 1C5.925 1 1 5.925 1 12s4.925 11 11 11 11-4.925 11-11S18.075 1 12 1ZM3 12a9 9 0 1 1 18 0 9 9 0 0 1-18 0Z",
|
|
4155
|
+
fill: iconColor
|
|
4156
|
+
})]
|
|
4157
|
+
});
|
|
4158
|
+
};
|
|
4159
|
+
|
|
4131
4160
|
var CloseIcon = function CloseIcon(_ref) {
|
|
4132
4161
|
var size = _ref.size,
|
|
4133
4162
|
color = _ref.color;
|
|
@@ -4647,6 +4676,30 @@ var SlashIcon = function SlashIcon(_ref) {
|
|
|
4647
4676
|
});
|
|
4648
4677
|
};
|
|
4649
4678
|
|
|
4679
|
+
var BankIcon = function BankIcon(_ref) {
|
|
4680
|
+
var size = _ref.size,
|
|
4681
|
+
color = _ref.color;
|
|
4682
|
+
|
|
4683
|
+
var _useIconProps = useIconProps({
|
|
4684
|
+
size: size,
|
|
4685
|
+
color: color
|
|
4686
|
+
}),
|
|
4687
|
+
height = _useIconProps.height,
|
|
4688
|
+
width = _useIconProps.width,
|
|
4689
|
+
iconColor = _useIconProps.iconColor;
|
|
4690
|
+
|
|
4691
|
+
return /*#__PURE__*/jsx(Svg, {
|
|
4692
|
+
height: height,
|
|
4693
|
+
width: width,
|
|
4694
|
+
viewBox: "0 0 24 24",
|
|
4695
|
+
fill: "none",
|
|
4696
|
+
children: /*#__PURE__*/jsx(Path, {
|
|
4697
|
+
d: "M5.105 10.429a1 1 0 0 0-1 1v5.333a1 1 0 0 0 1 1h1.158a1 1 0 0 0 1-1v-5.333a1 1 0 0 0-1-1H5.105Zm6.316 0a1 1 0 0 0-1 1v5.333a1 1 0 0 0 1 1h1.158a1 1 0 0 0 1-1v-5.333a1 1 0 0 0-1-1H11.42ZM2 22a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1v-1.143a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1V22Zm15.737-11.571a1 1 0 0 0-1 1v5.333a1 1 0 0 0 1 1h1.158a1 1 0 0 0 1-1v-5.333a1 1 0 0 0-1-1h-1.158Zm-5.273-9.186a1 1 0 0 0-.928 0l-9 4.714A1 1 0 0 0 2 6.843v.49a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1v-.49a1 1 0 0 0-.536-.886l-9-4.714Z",
|
|
4698
|
+
fill: iconColor
|
|
4699
|
+
})
|
|
4700
|
+
});
|
|
4701
|
+
};
|
|
4702
|
+
|
|
4650
4703
|
var TrashIcon = function TrashIcon(_ref) {
|
|
4651
4704
|
var size = _ref.size,
|
|
4652
4705
|
color = _ref.color;
|
|
@@ -5043,6 +5096,162 @@ var MailIcon = function MailIcon(_ref) {
|
|
|
5043
5096
|
});
|
|
5044
5097
|
};
|
|
5045
5098
|
|
|
5099
|
+
var BookIcon = function BookIcon(_ref) {
|
|
5100
|
+
var size = _ref.size,
|
|
5101
|
+
color = _ref.color;
|
|
5102
|
+
|
|
5103
|
+
var _useIconProps = useIconProps({
|
|
5104
|
+
size: size,
|
|
5105
|
+
color: color
|
|
5106
|
+
}),
|
|
5107
|
+
height = _useIconProps.height,
|
|
5108
|
+
width = _useIconProps.width,
|
|
5109
|
+
iconColor = _useIconProps.iconColor;
|
|
5110
|
+
|
|
5111
|
+
return /*#__PURE__*/jsx(Svg, {
|
|
5112
|
+
width: width,
|
|
5113
|
+
height: height,
|
|
5114
|
+
viewBox: "0 0 24 24",
|
|
5115
|
+
fill: "none",
|
|
5116
|
+
children: /*#__PURE__*/jsx(Path, {
|
|
5117
|
+
fillRule: "evenodd",
|
|
5118
|
+
clipRule: "evenodd",
|
|
5119
|
+
d: "M21 2a1 1 0 0 0-1-1H6.5A3.5 3.5 0 0 0 3 4.5v15A3.5 3.5 0 0 0 6.5 23H20a1 1 0 0 0 1-1V2ZM5 4.5A1.5 1.5 0 0 1 6.5 3H19v13H6.5c-.537 0-1.045.12-1.5.337V4.5Zm0 15A1.5 1.5 0 0 0 6.5 21H19v-3H6.5A1.5 1.5 0 0 0 5 19.5Z",
|
|
5120
|
+
fill: iconColor
|
|
5121
|
+
})
|
|
5122
|
+
});
|
|
5123
|
+
};
|
|
5124
|
+
|
|
5125
|
+
var SettlementsIcon = function SettlementsIcon(_ref) {
|
|
5126
|
+
var size = _ref.size,
|
|
5127
|
+
color = _ref.color;
|
|
5128
|
+
|
|
5129
|
+
var _useIconProps = useIconProps({
|
|
5130
|
+
size: size,
|
|
5131
|
+
color: color
|
|
5132
|
+
}),
|
|
5133
|
+
height = _useIconProps.height,
|
|
5134
|
+
width = _useIconProps.width,
|
|
5135
|
+
iconColor = _useIconProps.iconColor;
|
|
5136
|
+
|
|
5137
|
+
return /*#__PURE__*/jsx(Svg, {
|
|
5138
|
+
width: width,
|
|
5139
|
+
height: height,
|
|
5140
|
+
fill: "none",
|
|
5141
|
+
viewBox: "0 0 24 24",
|
|
5142
|
+
children: /*#__PURE__*/jsx(Path, {
|
|
5143
|
+
d: "m22.763 7.879-7.797 9.697c-.097.118-.22.216-.362.29a1.283 1.283 0 0 1-.461.134h-.11c-.293 0-.575-.099-.79-.276l-3.58-2.957-2.054 2.582a1.059 1.059 0 0 1-.357.302c-.142.075-.302.12-.467.132h-.11c-.29.004-.57-.095-.779-.276l-4.502-3.705a1.01 1.01 0 0 1-.281-.321.906.906 0 0 1-.036-.798.984.984 0 0 1 .25-.34 1.09 1.09 0 0 1 .358-.252 1.2 1.2 0 0 1 1.268.193l3.558 2.907 7.006-8.742c.083-.115.192-.213.32-.288a1.22 1.22 0 0 1 .877-.13c.148.035.286.097.406.182.13.075.241.173.326.289a.928.928 0 0 1 .166.383.887.887 0 0 1-.022.41.95.95 0 0 1-.207.367l-4.392 5.41 2.833 2.346 7.072-8.752a1.05 1.05 0 0 1 .322-.286 1.22 1.22 0 0 1 .876-.124c.148.035.286.098.405.184.129.074.238.172.322.287a.93.93 0 0 1 .164.38.887.887 0 0 1-.02.407.949.949 0 0 1-.202.365Z",
|
|
5144
|
+
fill: iconColor
|
|
5145
|
+
})
|
|
5146
|
+
});
|
|
5147
|
+
};
|
|
5148
|
+
|
|
5149
|
+
var ShuffleIcon = function ShuffleIcon(_ref) {
|
|
5150
|
+
var size = _ref.size,
|
|
5151
|
+
color = _ref.color;
|
|
5152
|
+
|
|
5153
|
+
var _useIconProps = useIconProps({
|
|
5154
|
+
size: size,
|
|
5155
|
+
color: color
|
|
5156
|
+
}),
|
|
5157
|
+
height = _useIconProps.height,
|
|
5158
|
+
width = _useIconProps.width,
|
|
5159
|
+
iconColor = _useIconProps.iconColor;
|
|
5160
|
+
|
|
5161
|
+
return /*#__PURE__*/jsx(Svg, {
|
|
5162
|
+
width: width,
|
|
5163
|
+
height: height,
|
|
5164
|
+
fill: "none",
|
|
5165
|
+
viewBox: "0 0 24 24",
|
|
5166
|
+
children: /*#__PURE__*/jsx(Path, {
|
|
5167
|
+
d: "M14 3a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0V5.414L3.707 20.707a1 1 0 0 1-1.414-1.414L17.586 4H15a1 1 0 0 1-1-1ZM21 16a1 1 0 1 0-2 0v2.586l-4.293-4.293a1 1 0 0 0-1.414 1.414L17.586 20H15a1 1 0 1 0 0 2h5a1 1 0 0 0 1-1v-5ZM3.707 3.293a1 1 0 0 0-1.414 1.414l5 5a1 1 0 0 0 1.414-1.414l-5-5Z",
|
|
5168
|
+
fill: iconColor
|
|
5169
|
+
})
|
|
5170
|
+
});
|
|
5171
|
+
};
|
|
5172
|
+
|
|
5173
|
+
var TagIcon = function TagIcon(_ref) {
|
|
5174
|
+
var size = _ref.size,
|
|
5175
|
+
color = _ref.color;
|
|
5176
|
+
|
|
5177
|
+
var _useIconProps = useIconProps({
|
|
5178
|
+
size: size,
|
|
5179
|
+
color: color
|
|
5180
|
+
}),
|
|
5181
|
+
height = _useIconProps.height,
|
|
5182
|
+
width = _useIconProps.width,
|
|
5183
|
+
iconColor = _useIconProps.iconColor;
|
|
5184
|
+
|
|
5185
|
+
return /*#__PURE__*/jsxs(Svg, {
|
|
5186
|
+
width: width,
|
|
5187
|
+
height: height,
|
|
5188
|
+
fill: "none",
|
|
5189
|
+
viewBox: "0 0 24 24",
|
|
5190
|
+
children: [/*#__PURE__*/jsx(Path, {
|
|
5191
|
+
fillRule: "evenodd",
|
|
5192
|
+
clipRule: "evenodd",
|
|
5193
|
+
d: "M1 2a1 1 0 0 1 1-1h10a1 1 0 0 1 .707.293L21.3 9.885a3 3 0 0 1 0 4.23l-.002.002-7.17 7.17a3.001 3.001 0 0 1-4.244 0l-8.59-8.58A1 1 0 0 1 1 12V2Zm2 1v8.585l8.297 8.287v.001a1 1 0 0 0 1.415 0l7.169-7.168a1 1 0 0 0 0-1.41L11.586 3H3Z",
|
|
5194
|
+
fill: iconColor
|
|
5195
|
+
}), /*#__PURE__*/jsx(Path, {
|
|
5196
|
+
d: "M10 8.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z",
|
|
5197
|
+
fill: iconColor
|
|
5198
|
+
})]
|
|
5199
|
+
});
|
|
5200
|
+
};
|
|
5201
|
+
|
|
5202
|
+
var UserIcon = function UserIcon(_ref) {
|
|
5203
|
+
var size = _ref.size,
|
|
5204
|
+
color = _ref.color;
|
|
5205
|
+
|
|
5206
|
+
var _useIconProps = useIconProps({
|
|
5207
|
+
size: size,
|
|
5208
|
+
color: color
|
|
5209
|
+
}),
|
|
5210
|
+
height = _useIconProps.height,
|
|
5211
|
+
width = _useIconProps.width,
|
|
5212
|
+
iconColor = _useIconProps.iconColor;
|
|
5213
|
+
|
|
5214
|
+
return /*#__PURE__*/jsxs(Svg, {
|
|
5215
|
+
width: width,
|
|
5216
|
+
height: height,
|
|
5217
|
+
fill: "none",
|
|
5218
|
+
viewBox: "0 0 24 24",
|
|
5219
|
+
children: [/*#__PURE__*/jsx(Path, {
|
|
5220
|
+
fillRule: "evenodd",
|
|
5221
|
+
clipRule: "evenodd",
|
|
5222
|
+
d: "M12 2a5 5 0 1 0 0 10 5 5 0 0 0 0-10ZM9 7a3 3 0 1 1 6 0 3 3 0 0 1-6 0Z",
|
|
5223
|
+
fill: iconColor
|
|
5224
|
+
}), /*#__PURE__*/jsx(Path, {
|
|
5225
|
+
d: "M8 14a5 5 0 0 0-5 5v2a1 1 0 1 0 2 0v-2a3 3 0 0 1 3-3h8a3 3 0 0 1 3 3v2a1 1 0 1 0 2 0v-2a5 5 0 0 0-5-5H8Z",
|
|
5226
|
+
fill: iconColor
|
|
5227
|
+
})]
|
|
5228
|
+
});
|
|
5229
|
+
};
|
|
5230
|
+
|
|
5231
|
+
var TransactionsIcon = function TransactionsIcon(_ref) {
|
|
5232
|
+
var size = _ref.size,
|
|
5233
|
+
color = _ref.color;
|
|
5234
|
+
|
|
5235
|
+
var _useIconProps = useIconProps({
|
|
5236
|
+
size: size,
|
|
5237
|
+
color: color
|
|
5238
|
+
}),
|
|
5239
|
+
height = _useIconProps.height,
|
|
5240
|
+
width = _useIconProps.width,
|
|
5241
|
+
iconColor = _useIconProps.iconColor;
|
|
5242
|
+
|
|
5243
|
+
return /*#__PURE__*/jsx(Svg, {
|
|
5244
|
+
width: width,
|
|
5245
|
+
height: height,
|
|
5246
|
+
fill: "none",
|
|
5247
|
+
viewBox: "0 0 24 24",
|
|
5248
|
+
children: /*#__PURE__*/jsx(Path, {
|
|
5249
|
+
d: "M6.24 12.03a.878.878 0 0 1 .26.623.898.898 0 0 1-.249.627.85.85 0 0 1-.61.257.833.833 0 0 1-.606-.268L1.25 9.377a.869.869 0 0 1-.107-.134c-.014-.022-.024-.044-.036-.067a.853.853 0 0 1-.042-.084.843.843 0 0 1-.027-.087c-.007-.026-.017-.05-.022-.076a.91.91 0 0 1 0-.343c.005-.026.015-.05.022-.075a.812.812 0 0 1 .027-.087.91.91 0 0 1 .042-.085c.012-.022.022-.043.036-.066a.895.895 0 0 1 .107-.135l3.785-3.892a.84.84 0 0 1 .6-.246.84.84 0 0 1 .595.257.89.89 0 0 1 .01 1.228L3.91 7.883h9.715a.84.84 0 0 1 .602.256c.16.164.25.387.25.62 0 .232-.09.455-.25.62a.84.84 0 0 1-.602.256H3.909l2.332 2.395Zm16.617 3.674c.014-.022.024-.044.035-.067a.896.896 0 0 0 .043-.084.806.806 0 0 0 .027-.088c.007-.024.017-.049.022-.074a.912.912 0 0 0 0-.344c-.005-.026-.015-.05-.022-.075a.836.836 0 0 0-.027-.088.843.843 0 0 0-.043-.083c-.011-.023-.021-.044-.035-.067a.87.87 0 0 0-.107-.134l-3.785-3.893a.84.84 0 0 0-1.195.011.889.889 0 0 0-.25.612.89.89 0 0 0 .24.616l2.33 2.397h-9.715a.84.84 0 0 0-.602.257.889.889 0 0 0-.25.62c0 .232.09.455.25.62a.84.84 0 0 0 .602.256h9.716l-2.332 2.397a.877.877 0 0 0-.26.623.898.898 0 0 0 .25.627.85.85 0 0 0 .61.257.833.833 0 0 0 .605-.267l3.786-3.893a.894.894 0 0 0 .107-.134v-.002Z",
|
|
5250
|
+
fill: iconColor
|
|
5251
|
+
})
|
|
5252
|
+
});
|
|
5253
|
+
};
|
|
5254
|
+
|
|
5046
5255
|
function ownKeys$C(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5047
5256
|
|
|
5048
5257
|
function _objectSpread$C(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$C(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$C(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -5517,7 +5726,16 @@ var getTextProps = function getTextProps(_ref) {
|
|
|
5517
5726
|
props.fontSize = 75;
|
|
5518
5727
|
props.lineHeight = 's';
|
|
5519
5728
|
}
|
|
5729
|
+
|
|
5730
|
+
if (size === 'xsmall') {
|
|
5731
|
+
props.fontSize = 25;
|
|
5732
|
+
props.lineHeight = 's';
|
|
5733
|
+
}
|
|
5520
5734
|
} else if (variant === 'caption') {
|
|
5735
|
+
if (size === 'xsmall') {
|
|
5736
|
+
throw new Error("[Blade: Text]: size cannot be 'xsmall' when variant is 'caption'");
|
|
5737
|
+
}
|
|
5738
|
+
|
|
5521
5739
|
if (size === 'small') {
|
|
5522
5740
|
throw new Error("[Blade: Text]: size cannot be 'small' when variant is 'caption'");
|
|
5523
5741
|
}
|
|
@@ -6009,7 +6227,7 @@ var getColor = function getColor(_ref) {
|
|
|
6009
6227
|
} else if (contrast == 'low') {
|
|
6010
6228
|
return get_1(theme.colors, 'brand.gray.700.lowContrast');
|
|
6011
6229
|
} else {
|
|
6012
|
-
return get_1(theme.colors, 'brand.gray.
|
|
6230
|
+
return get_1(theme.colors, 'brand.gray.700.highContrast');
|
|
6013
6231
|
}
|
|
6014
6232
|
};
|
|
6015
6233
|
|
|
@@ -6976,6 +7194,20 @@ var Badge = function Badge(_ref2) {
|
|
|
6976
7194
|
iconColor = _getColorProps.iconColor,
|
|
6977
7195
|
textColor = _getColorProps.textColor;
|
|
6978
7196
|
|
|
7197
|
+
var badgeTextSizes = {
|
|
7198
|
+
small: {
|
|
7199
|
+
variant: 'body',
|
|
7200
|
+
size: 'xsmall'
|
|
7201
|
+
},
|
|
7202
|
+
medium: {
|
|
7203
|
+
variant: 'body',
|
|
7204
|
+
size: 'small'
|
|
7205
|
+
},
|
|
7206
|
+
large: {
|
|
7207
|
+
variant: 'body',
|
|
7208
|
+
size: 'small'
|
|
7209
|
+
}
|
|
7210
|
+
};
|
|
6979
7211
|
return /*#__PURE__*/jsx(StyledBadge, _objectSpread$p(_objectSpread$p({
|
|
6980
7212
|
backgroundColor: backgroundColor,
|
|
6981
7213
|
size: size
|
|
@@ -6997,12 +7229,7 @@ var Badge = function Badge(_ref2) {
|
|
|
6997
7229
|
color: iconColor,
|
|
6998
7230
|
size: iconSize[size]
|
|
6999
7231
|
})
|
|
7000
|
-
}) : null, /*#__PURE__*/jsx(Text, _objectSpread$p(_objectSpread$p({}, size
|
|
7001
|
-
variant: 'caption'
|
|
7002
|
-
} : {
|
|
7003
|
-
variant: 'body',
|
|
7004
|
-
size: 'small'
|
|
7005
|
-
}), {}, {
|
|
7232
|
+
}) : null, /*#__PURE__*/jsx(Text, _objectSpread$p(_objectSpread$p({}, badgeTextSizes[size]), {}, {
|
|
7006
7233
|
type: "normal",
|
|
7007
7234
|
weight: fontWeight,
|
|
7008
7235
|
truncateAfterLines: 1,
|
|
@@ -7046,6 +7273,20 @@ var useVerifyInsideCard = function useVerifyInsideCard(componentName) {
|
|
|
7046
7273
|
|
|
7047
7274
|
return true;
|
|
7048
7275
|
};
|
|
7276
|
+
/**
|
|
7277
|
+
* Verify if the passed childrens are only of allowedComponents list
|
|
7278
|
+
*/
|
|
7279
|
+
|
|
7280
|
+
|
|
7281
|
+
var useVerifyAllowedComponents = function useVerifyAllowedComponents(children, componentName, allowedComponents) {
|
|
7282
|
+
React__default.Children.forEach(children, function (child) {
|
|
7283
|
+
var isValidChild = child && allowedComponents.includes(getComponentId(child));
|
|
7284
|
+
|
|
7285
|
+
if (!isValidChild) {
|
|
7286
|
+
throw new Error("[Blade Card]: Only one of `".concat(allowedComponents.join(', '), "` component is accepted as ").concat(componentName, " children"));
|
|
7287
|
+
}
|
|
7288
|
+
});
|
|
7289
|
+
};
|
|
7049
7290
|
|
|
7050
7291
|
var CardProvider = function CardProvider(_ref) {
|
|
7051
7292
|
var children = _ref.children;
|
|
@@ -7058,11 +7299,27 @@ var CardProvider = function CardProvider(_ref) {
|
|
|
7058
7299
|
function ownKeys$o(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7059
7300
|
|
|
7060
7301
|
function _objectSpread$o(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$o(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$o(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7302
|
+
var ComponentIds = {
|
|
7303
|
+
CardHeader: 'CardHeader',
|
|
7304
|
+
CardHeaderTrailing: 'CardHeaderTrailing',
|
|
7305
|
+
CardHeaderLeading: 'CardHeaderLeading',
|
|
7306
|
+
CardFooter: 'CardFooter',
|
|
7307
|
+
CardFooterTrailing: 'CardFooterTrailing',
|
|
7308
|
+
CardFooterLeading: 'CardFooterLeading',
|
|
7309
|
+
CardBody: 'CardBody',
|
|
7310
|
+
CardHeaderIcon: 'CardHeaderIcon',
|
|
7311
|
+
CardHeaderCounter: 'CardHeaderCounter',
|
|
7312
|
+
CardHeaderBadge: 'CardHeaderBadge',
|
|
7313
|
+
CardHeaderText: 'CardHeaderText',
|
|
7314
|
+
CardHeaderLink: 'CardHeaderLink',
|
|
7315
|
+
CardHeaderIconButton: 'CardHeaderIconButton'
|
|
7316
|
+
};
|
|
7061
7317
|
|
|
7062
7318
|
var Card = function Card(_ref) {
|
|
7063
7319
|
var children = _ref.children,
|
|
7064
7320
|
_ref$surfaceLevel = _ref.surfaceLevel,
|
|
7065
7321
|
surfaceLevel = _ref$surfaceLevel === void 0 ? 3 : _ref$surfaceLevel;
|
|
7322
|
+
useVerifyAllowedComponents(children, 'Card', [ComponentIds.CardHeader, ComponentIds.CardBody, ComponentIds.CardFooter]);
|
|
7066
7323
|
return /*#__PURE__*/jsx(CardProvider, {
|
|
7067
7324
|
children: /*#__PURE__*/jsx(CardSurface, _objectSpread$o(_objectSpread$o({}, metaAttribute(MetaConstants.Component, MetaConstants.Card)), {}, {
|
|
7068
7325
|
paddingLeft: "spacing.7",
|
|
@@ -7084,6 +7341,8 @@ var CardBody = function CardBody(_ref2) {
|
|
|
7084
7341
|
}));
|
|
7085
7342
|
};
|
|
7086
7343
|
|
|
7344
|
+
CardBody.componentId = ComponentIds.CardBody;
|
|
7345
|
+
|
|
7087
7346
|
function ownKeys$n(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7088
7347
|
|
|
7089
7348
|
function _objectSpread$n(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$n(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$n(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -7259,9 +7518,10 @@ var Counter = function Counter(_ref2) {
|
|
|
7259
7518
|
backgroundColor = _getColorProps.backgroundColor,
|
|
7260
7519
|
textColor = _getColorProps.textColor;
|
|
7261
7520
|
|
|
7262
|
-
var
|
|
7521
|
+
var counterTextSizes = {
|
|
7263
7522
|
small: {
|
|
7264
|
-
variant: '
|
|
7523
|
+
variant: 'body',
|
|
7524
|
+
size: 'xsmall'
|
|
7265
7525
|
},
|
|
7266
7526
|
medium: {
|
|
7267
7527
|
variant: 'body',
|
|
@@ -7287,7 +7547,7 @@ var Counter = function Counter(_ref2) {
|
|
|
7287
7547
|
alignItems: "center",
|
|
7288
7548
|
overflow: "hidden"
|
|
7289
7549
|
}, metaAttribute(MetaConstants.Component, MetaConstants.Counter)), {}, {
|
|
7290
|
-
children: /*#__PURE__*/jsx(Text, _objectSpread$k(_objectSpread$k({},
|
|
7550
|
+
children: /*#__PURE__*/jsx(Text, _objectSpread$k(_objectSpread$k({}, counterTextSizes[size]), {}, {
|
|
7291
7551
|
type: "normal",
|
|
7292
7552
|
weight: "regular",
|
|
7293
7553
|
truncateAfterLines: 1,
|
|
@@ -7301,14 +7561,6 @@ var Counter = function Counter(_ref2) {
|
|
|
7301
7561
|
function ownKeys$j(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7302
7562
|
|
|
7303
7563
|
function _objectSpread$j(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$j(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$j(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7304
|
-
var ComponentIds = {
|
|
7305
|
-
CardHeaderIcon: 'CardHeaderIcon',
|
|
7306
|
-
CardHeaderCounter: 'CardHeaderCounter',
|
|
7307
|
-
CardHeaderBadge: 'CardHeaderBadge',
|
|
7308
|
-
CardHeaderText: 'CardHeaderText',
|
|
7309
|
-
CardHeaderLink: 'CardHeaderLink',
|
|
7310
|
-
CardHeaderIconButton: 'CardHeaderIconButton'
|
|
7311
|
-
};
|
|
7312
7564
|
|
|
7313
7565
|
var CardHeaderIcon = function CardHeaderIcon(_ref) {
|
|
7314
7566
|
var Icon = _ref.icon;
|
|
@@ -7367,6 +7619,7 @@ CardHeaderIconButton.componentId = ComponentIds.CardHeaderIconButton;
|
|
|
7367
7619
|
var CardHeader = function CardHeader(_ref2) {
|
|
7368
7620
|
var children = _ref2.children;
|
|
7369
7621
|
useVerifyInsideCard('CardHeader');
|
|
7622
|
+
useVerifyAllowedComponents(children, 'CardHeader', [ComponentIds.CardHeaderLeading, ComponentIds.CardHeaderTrailing]);
|
|
7370
7623
|
return /*#__PURE__*/jsxs(Box, _objectSpread$j(_objectSpread$j({
|
|
7371
7624
|
marginBottom: "spacing.7"
|
|
7372
7625
|
}, metaAttribute(MetaConstants.Component, MetaConstants.CardHeader)), {}, {
|
|
@@ -7380,6 +7633,8 @@ var CardHeader = function CardHeader(_ref2) {
|
|
|
7380
7633
|
}));
|
|
7381
7634
|
};
|
|
7382
7635
|
|
|
7636
|
+
CardHeader.componentId = ComponentIds.CardHeader;
|
|
7637
|
+
|
|
7383
7638
|
var CardHeaderLeading = function CardHeaderLeading(_ref3) {
|
|
7384
7639
|
var title = _ref3.title,
|
|
7385
7640
|
subtitle = _ref3.subtitle,
|
|
@@ -7429,6 +7684,7 @@ var CardHeaderLeading = function CardHeaderLeading(_ref3) {
|
|
|
7429
7684
|
});
|
|
7430
7685
|
};
|
|
7431
7686
|
|
|
7687
|
+
CardHeaderLeading.componentId = ComponentIds.CardHeaderLeading;
|
|
7432
7688
|
var headerTrailingAllowedComponents = [ComponentIds.CardHeaderLink, ComponentIds.CardHeaderText, ComponentIds.CardHeaderIconButton, ComponentIds.CardHeaderBadge];
|
|
7433
7689
|
|
|
7434
7690
|
var CardHeaderTrailing = function CardHeaderTrailing(_ref4) {
|
|
@@ -7445,6 +7701,8 @@ var CardHeaderTrailing = function CardHeaderTrailing(_ref4) {
|
|
|
7445
7701
|
});
|
|
7446
7702
|
};
|
|
7447
7703
|
|
|
7704
|
+
CardHeaderTrailing.componentId = ComponentIds.CardHeaderTrailing;
|
|
7705
|
+
|
|
7448
7706
|
function ownKeys$i(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7449
7707
|
|
|
7450
7708
|
function _objectSpread$i(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$i(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$i(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -7465,6 +7723,7 @@ var CardFooter = function CardFooter(_ref) {
|
|
|
7465
7723
|
var children = _ref.children;
|
|
7466
7724
|
var isMobile = useIsMobile();
|
|
7467
7725
|
useVerifyInsideCard('CardFooter');
|
|
7726
|
+
useVerifyAllowedComponents(children, 'CardFooter', [ComponentIds.CardFooterLeading, ComponentIds.CardFooterTrailing]);
|
|
7468
7727
|
return /*#__PURE__*/jsxs(Box, _objectSpread$i(_objectSpread$i({
|
|
7469
7728
|
marginTop: "auto"
|
|
7470
7729
|
}, metaAttribute(MetaConstants.Component, MetaConstants.CardFooter)), {}, {
|
|
@@ -7481,6 +7740,8 @@ var CardFooter = function CardFooter(_ref) {
|
|
|
7481
7740
|
}));
|
|
7482
7741
|
};
|
|
7483
7742
|
|
|
7743
|
+
CardFooter.componentId = ComponentIds.CardFooter;
|
|
7744
|
+
|
|
7484
7745
|
var CardFooterLeading = function CardFooterLeading(_ref2) {
|
|
7485
7746
|
var title = _ref2.title,
|
|
7486
7747
|
subtitle = _ref2.subtitle;
|
|
@@ -7500,6 +7761,8 @@ var CardFooterLeading = function CardFooterLeading(_ref2) {
|
|
|
7500
7761
|
});
|
|
7501
7762
|
};
|
|
7502
7763
|
|
|
7764
|
+
CardFooterLeading.componentId = ComponentIds.CardFooterLeading;
|
|
7765
|
+
|
|
7503
7766
|
var CardFooterTrailing = function CardFooterTrailing(_ref3) {
|
|
7504
7767
|
var actions = _ref3.actions;
|
|
7505
7768
|
var isMobile = useIsMobile();
|
|
@@ -7533,6 +7796,8 @@ var CardFooterTrailing = function CardFooterTrailing(_ref3) {
|
|
|
7533
7796
|
});
|
|
7534
7797
|
};
|
|
7535
7798
|
|
|
7799
|
+
CardFooterTrailing.componentId = ComponentIds.CardFooterTrailing;
|
|
7800
|
+
|
|
7536
7801
|
/**
|
|
7537
7802
|
* Checks if `value` is `undefined`.
|
|
7538
7803
|
*
|
|
@@ -9685,8 +9950,6 @@ var isReactNative$2 = function isReactNative(_textInputRef) {
|
|
|
9685
9950
|
};
|
|
9686
9951
|
|
|
9687
9952
|
var TextInput = function TextInput(_ref2) {
|
|
9688
|
-
var _Boolean;
|
|
9689
|
-
|
|
9690
9953
|
var label = _ref2.label,
|
|
9691
9954
|
_ref2$labelPosition = _ref2.labelPosition,
|
|
9692
9955
|
labelPosition = _ref2$labelPosition === void 0 ? 'top' : _ref2$labelPosition,
|
|
@@ -9698,6 +9961,7 @@ var TextInput = function TextInput(_ref2) {
|
|
|
9698
9961
|
value = _ref2.value,
|
|
9699
9962
|
maxCharacters = _ref2.maxCharacters,
|
|
9700
9963
|
_onChange = _ref2.onChange,
|
|
9964
|
+
onFocus = _ref2.onFocus,
|
|
9701
9965
|
onBlur = _ref2.onBlur,
|
|
9702
9966
|
isDisabled = _ref2.isDisabled,
|
|
9703
9967
|
necessityIndicator = _ref2.necessityIndicator,
|
|
@@ -9717,11 +9981,15 @@ var TextInput = function TextInput(_ref2) {
|
|
|
9717
9981
|
autoCompleteSuggestionType = _ref2.autoCompleteSuggestionType;
|
|
9718
9982
|
var textInputRef = React__default.useRef(null);
|
|
9719
9983
|
|
|
9720
|
-
var _useState = useState(
|
|
9984
|
+
var _useState = useState(false),
|
|
9721
9985
|
_useState2 = _slicedToArray(_useState, 2),
|
|
9722
9986
|
shouldShowClearButton = _useState2[0],
|
|
9723
9987
|
setShouldShowClearButton = _useState2[1];
|
|
9724
9988
|
|
|
9989
|
+
React__default.useEffect(function () {
|
|
9990
|
+
setShouldShowClearButton(Boolean(showClearButton && (defaultValue !== null && defaultValue !== void 0 ? defaultValue : value)));
|
|
9991
|
+
}, [showClearButton, defaultValue, value]);
|
|
9992
|
+
|
|
9725
9993
|
var renderInteractionElement = function renderInteractionElement() {
|
|
9726
9994
|
if (isLoading) {
|
|
9727
9995
|
return /*#__PURE__*/jsx(Spinner, {
|
|
@@ -9789,6 +10057,7 @@ var TextInput = function TextInput(_ref2) {
|
|
|
9789
10057
|
value: value
|
|
9790
10058
|
});
|
|
9791
10059
|
},
|
|
10060
|
+
onFocus: onFocus,
|
|
9792
10061
|
onBlur: onBlur,
|
|
9793
10062
|
isDisabled: isDisabled,
|
|
9794
10063
|
necessityIndicator: necessityIndicator,
|
|
@@ -9938,8 +10207,9 @@ var TextArea = function TextArea(_ref) {
|
|
|
9938
10207
|
isDisabled = _ref.isDisabled,
|
|
9939
10208
|
isRequired = _ref.isRequired,
|
|
9940
10209
|
name = _ref.name,
|
|
9941
|
-
onBlur = _ref.onBlur,
|
|
9942
10210
|
_onChange = _ref.onChange,
|
|
10211
|
+
onFocus = _ref.onFocus,
|
|
10212
|
+
onBlur = _ref.onBlur,
|
|
9943
10213
|
placeholder = _ref.placeholder,
|
|
9944
10214
|
value = _ref.value,
|
|
9945
10215
|
maxCharacters = _ref.maxCharacters,
|
|
@@ -9950,11 +10220,15 @@ var TextArea = function TextArea(_ref) {
|
|
|
9950
10220
|
numberOfLines = _ref$numberOfLines === void 0 ? 2 : _ref$numberOfLines;
|
|
9951
10221
|
var inputRef = React__default.useRef(null);
|
|
9952
10222
|
|
|
9953
|
-
var _React$useState = React__default.useState(
|
|
10223
|
+
var _React$useState = React__default.useState(false),
|
|
9954
10224
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
9955
10225
|
shouldShowClearButton = _React$useState2[0],
|
|
9956
10226
|
setShouldShowClearButton = _React$useState2[1];
|
|
9957
10227
|
|
|
10228
|
+
React__default.useEffect(function () {
|
|
10229
|
+
setShouldShowClearButton(Boolean(showClearButton && ((value === null || value === void 0 ? void 0 : value.length) || (defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.length))));
|
|
10230
|
+
}, [showClearButton, defaultValue, value]);
|
|
10231
|
+
|
|
9958
10232
|
var renderInteractionElement = function renderInteractionElement() {
|
|
9959
10233
|
if (shouldShowClearButton) {
|
|
9960
10234
|
return /*#__PURE__*/jsx(Box, {
|
|
@@ -10006,7 +10280,6 @@ var TextArea = function TextArea(_ref) {
|
|
|
10006
10280
|
isRequired: isRequired,
|
|
10007
10281
|
name: name,
|
|
10008
10282
|
maxCharacters: maxCharacters,
|
|
10009
|
-
onBlur: onBlur,
|
|
10010
10283
|
placeholder: placeholder,
|
|
10011
10284
|
interactionElement: renderInteractionElement(),
|
|
10012
10285
|
defaultValue: defaultValue,
|
|
@@ -10031,6 +10304,8 @@ var TextArea = function TextArea(_ref) {
|
|
|
10031
10304
|
value: value
|
|
10032
10305
|
});
|
|
10033
10306
|
},
|
|
10307
|
+
onFocus: onFocus,
|
|
10308
|
+
onBlur: onBlur,
|
|
10034
10309
|
trailingFooterSlot: function trailingFooterSlot(value) {
|
|
10035
10310
|
var _value$length;
|
|
10036
10311
|
|
|
@@ -11599,5 +11874,5 @@ var SkipNavContent = function SkipNavContent(_ref3) {
|
|
|
11599
11874
|
}, testID('skipnav-content')), metaAttribute(MetaConstants.Component, MetaConstants.SkipNav)));
|
|
11600
11875
|
};
|
|
11601
11876
|
|
|
11602
|
-
export { Alert, AlertTriangleIcon as AlertOctagonIcon, AlertTriangleIcon$1 as AlertTriangleIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpRightIcon, Badge, BladeProvider, Button, Card, CardBody, CardFooter, CardFooterLeading, CardFooterTrailing, CardHeader, CardHeaderBadge, CardHeaderCounter, CardHeaderIcon, CardHeaderIconButton, CardHeaderLeading, CardHeaderLink, CardHeaderText, CardHeaderTrailing, CheckCircleIcon, CheckIcon, Checkbox, CheckboxGroup, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, Code, Counter, CreditCardIcon, DollarIcon, DownloadIcon, EditIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FileTextIcon, Heading, HelpCircleIcon, HistoryIcon, HomeIcon, IconButton, Indicator, InfoIcon, Link, LinkIcon, LockIcon, MailIcon, MinusIcon, OTPInput, PasswordInput, PauseIcon, PlusIcon, ProgressBar, Radio, RadioGroup, RefreshLeftIcon, RotateCounterClockWiseIcon, RupeeIcon, SearchIcon, SettingsIcon, SkipNavContent, SkipNavLink, SlashIcon, Spinner, Text, TextArea, TextInput, Title, TrashIcon, TrendingDownIcon, TrendingUpIcon, UsersIcon, VisuallyHidden, announce, clearAnnouncer, destroyAnnouncer, getTextProps, screenReaderStyles, useTheme };
|
|
11877
|
+
export { Alert, AlertTriangleIcon as AlertOctagonIcon, AlertTriangleIcon$1 as AlertTriangleIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpRightIcon, Badge, BankIcon, BladeProvider, BookIcon, Button, Card, CardBody, CardFooter, CardFooterLeading, CardFooterTrailing, CardHeader, CardHeaderBadge, CardHeaderCounter, CardHeaderIcon, CardHeaderIconButton, CardHeaderLeading, CardHeaderLink, CardHeaderText, CardHeaderTrailing, CheckCircleIcon, CheckIcon, Checkbox, CheckboxGroup, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ClockIcon, CloseIcon, Code, ComponentIds, Counter, CreditCardIcon, DollarIcon, DownloadIcon, EditIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FileTextIcon, Heading, HelpCircleIcon, HistoryIcon, HomeIcon, IconButton, Indicator, InfoIcon, Link, LinkIcon, LockIcon, MailIcon, MinusIcon, OTPInput, PasswordInput, PauseIcon, PlusIcon, ProgressBar, Radio, RadioGroup, RefreshLeftIcon, RotateCounterClockWiseIcon, RupeeIcon, SearchIcon, SettingsIcon, SettlementsIcon, ShuffleIcon, SkipNavContent, SkipNavLink, SlashIcon, Spinner, TagIcon, Text, TextArea, TextInput, Title, TransactionsIcon, TrashIcon, TrendingDownIcon, TrendingUpIcon, UserIcon, UsersIcon, VisuallyHidden, announce, clearAnnouncer, destroyAnnouncer, getTextProps, screenReaderStyles, useTheme };
|
|
11603
11878
|
//# sourceMappingURL=index.web.js.map
|