@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.
- package/dist/components/banner/index.d.ts +1 -0
- package/dist/components/input/InputTypes.d.ts +1 -1
- package/dist/ui-core.cjs.development.js +15 -8
- package/dist/ui-core.cjs.development.js.map +1 -1
- package/dist/ui-core.cjs.production.min.js +1 -1
- package/dist/ui-core.cjs.production.min.js.map +1 -1
- package/dist/ui-core.esm.js +15 -8
- package/dist/ui-core.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/banner/index.tsx +18 -5
- package/src/components/input/InputTypes.ts +1 -1
- package/src/components/input/StackedMultiSelect/index.tsx +3 -1
- package/src/components/input/StackedSelect/index.tsx +1 -5
|
@@ -11,7 +11,7 @@ export declare type InputType = 'text' | 'select' | 'multi-select' | 'pilled-tex
|
|
|
11
11
|
export declare type FieldOption = {
|
|
12
12
|
label: string;
|
|
13
13
|
value: string | 'section_header';
|
|
14
|
-
sortValue
|
|
14
|
+
sortValue?: number;
|
|
15
15
|
};
|
|
16
16
|
export interface ValidationProps {
|
|
17
17
|
isRequired: boolean;
|
|
@@ -202,7 +202,9 @@ var Banner = function Banner(_ref) {
|
|
|
202
202
|
buttonText = _ref.buttonText,
|
|
203
203
|
onClick = _ref.onClick,
|
|
204
204
|
_ref$type = _ref.type,
|
|
205
|
-
type = _ref$type === void 0 ? 'expanded' : _ref$type
|
|
205
|
+
type = _ref$type === void 0 ? 'expanded' : _ref$type,
|
|
206
|
+
_ref$centered = _ref.centered,
|
|
207
|
+
centered = _ref$centered === void 0 ? false : _ref$centered;
|
|
206
208
|
var Icon = React.useMemo(function () {
|
|
207
209
|
switch (variant) {
|
|
208
210
|
case 'error':
|
|
@@ -227,16 +229,20 @@ var Banner = function Banner(_ref) {
|
|
|
227
229
|
}, [variant]);
|
|
228
230
|
return /*#__PURE__*/React__default.createElement(react.Alert, {
|
|
229
231
|
variant: variant,
|
|
230
|
-
borderRadius: "4px"
|
|
232
|
+
borderRadius: "4px",
|
|
233
|
+
justifyContent: centered ? 'center' : undefined
|
|
231
234
|
}, /*#__PURE__*/React__default.createElement(react.AlertDescription, null, /*#__PURE__*/React__default.createElement(react.Flex, {
|
|
232
|
-
flexDirection: type === 'condensed' ? 'row' : 'column',
|
|
233
|
-
alignItems: type === 'condensed' ? 'center' : '',
|
|
235
|
+
flexDirection: centered || type === 'condensed' ? 'row' : 'column',
|
|
236
|
+
alignItems: centered || type === 'condensed' ? 'center' : '',
|
|
237
|
+
justifyContent: centered ? 'center' : undefined,
|
|
234
238
|
minHeight: "26px"
|
|
235
239
|
}, /*#__PURE__*/React__default.createElement(react.Box, {
|
|
236
|
-
pr: "8px"
|
|
240
|
+
pr: "8px",
|
|
241
|
+
pt: !centered && type !== 'condensed' ? '8px' : 0
|
|
237
242
|
}, Icon), /*#__PURE__*/React__default.createElement(react.Box, {
|
|
238
|
-
flexGrow:
|
|
239
|
-
pt: type
|
|
243
|
+
flexGrow: centered ? undefined : '1',
|
|
244
|
+
pt: !centered && type !== 'condensed' ? '8px' : 0,
|
|
245
|
+
textAlign: centered ? 'center' : 'left'
|
|
240
246
|
}, message), onClick && buttonText && /*#__PURE__*/React__default.createElement(react.Flex, {
|
|
241
247
|
ml: type === 'condensed' ? 'auto' : '',
|
|
242
248
|
pt: type === 'condensed' ? 0 : '8px',
|
|
@@ -1471,7 +1477,8 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
1471
1477
|
});
|
|
1472
1478
|
setLocalOptions(function (prevLocalOptions) {
|
|
1473
1479
|
return [].concat(prevLocalOptions, [option]).sort(function (a, b) {
|
|
1474
|
-
|
|
1480
|
+
var _a$sortValue, _b$sortValue;
|
|
1481
|
+
return ((_a$sortValue = a.sortValue) != null ? _a$sortValue : 0) - ((_b$sortValue = b.sortValue) != null ? _b$sortValue : 0);
|
|
1475
1482
|
});
|
|
1476
1483
|
});
|
|
1477
1484
|
setLocalValues(function (prevLocalValues) {
|