@xqmsg/ui-core 0.27.0 → 0.28.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.
@@ -195,7 +195,9 @@ var Banner = function Banner(_ref) {
195
195
  buttonText = _ref.buttonText,
196
196
  onClick = _ref.onClick,
197
197
  _ref$type = _ref.type,
198
- type = _ref$type === void 0 ? 'expanded' : _ref$type;
198
+ type = _ref$type === void 0 ? 'expanded' : _ref$type,
199
+ _ref$centered = _ref.centered,
200
+ centered = _ref$centered === void 0 ? false : _ref$centered;
199
201
  var Icon = useMemo(function () {
200
202
  switch (variant) {
201
203
  case 'error':
@@ -220,16 +222,20 @@ var Banner = function Banner(_ref) {
220
222
  }, [variant]);
221
223
  return /*#__PURE__*/React__default.createElement(Alert$1, {
222
224
  variant: variant,
223
- borderRadius: "4px"
225
+ borderRadius: "4px",
226
+ justifyContent: centered ? 'center' : undefined
224
227
  }, /*#__PURE__*/React__default.createElement(AlertDescription, null, /*#__PURE__*/React__default.createElement(Flex, {
225
- flexDirection: type === 'condensed' ? 'row' : 'column',
226
- alignItems: type === 'condensed' ? 'center' : '',
228
+ flexDirection: centered || type === 'condensed' ? 'row' : 'column',
229
+ alignItems: centered || type === 'condensed' ? 'center' : '',
230
+ justifyContent: centered ? 'center' : undefined,
227
231
  minHeight: "26px"
228
232
  }, /*#__PURE__*/React__default.createElement(Box, {
229
- pr: "8px"
233
+ pr: "8px",
234
+ pt: !centered && type !== 'condensed' ? '8px' : 0
230
235
  }, Icon), /*#__PURE__*/React__default.createElement(Box, {
231
- flexGrow: "1",
232
- pt: type === 'condensed' ? 0 : '8px'
236
+ flexGrow: centered ? undefined : '1',
237
+ pt: !centered && type !== 'condensed' ? '8px' : 0,
238
+ textAlign: centered ? 'center' : 'left'
233
239
  }, message), onClick && buttonText && /*#__PURE__*/React__default.createElement(Flex, {
234
240
  ml: type === 'condensed' ? 'auto' : '',
235
241
  pt: type === 'condensed' ? 0 : '8px',
@@ -1464,7 +1470,8 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
1464
1470
  });
1465
1471
  setLocalOptions(function (prevLocalOptions) {
1466
1472
  return [].concat(prevLocalOptions, [option]).sort(function (a, b) {
1467
- return a.sortValue - b.sortValue;
1473
+ var _a$sortValue, _b$sortValue;
1474
+ return ((_a$sortValue = a.sortValue) != null ? _a$sortValue : 0) - ((_b$sortValue = b.sortValue) != null ? _b$sortValue : 0);
1468
1475
  });
1469
1476
  });
1470
1477
  setLocalValues(function (prevLocalValues) {