@xqmsg/ui-core 0.15.4 → 0.16.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.
@@ -5,6 +5,7 @@ export interface BannerProps {
5
5
  message: ReactNode;
6
6
  buttonText?: string;
7
7
  onClick?: () => void;
8
+ type?: 'condensed' | 'expanded';
8
9
  }
9
10
  /**
10
11
  * A functional React component utilized to render the `Banner` component
@@ -4,6 +4,7 @@ declare const _default: {
4
4
  fontSize: string;
5
5
  bg: string;
6
6
  color: string;
7
+ h: string;
7
8
  border: string;
8
9
  px: string;
9
10
  py: string;
@@ -34,6 +35,7 @@ declare const _default: {
34
35
  fontSize: string;
35
36
  bg: string;
36
37
  color: string;
38
+ h: string;
37
39
  border: string;
38
40
  px: string;
39
41
  py: string;
@@ -74,6 +76,7 @@ declare const _default: {
74
76
  };
75
77
  borderRadius: string;
76
78
  fontSize: string;
79
+ h: string;
77
80
  border: string;
78
81
  px: string;
79
82
  py: string;
@@ -11,8 +11,12 @@ declare const _default: {
11
11
  };
12
12
  tr: {
13
13
  fontSize: string;
14
+ h: string;
15
+ lineHeight: string;
14
16
  _odd: {
15
17
  td: {
18
+ h: string;
19
+ lineHeight: string;
16
20
  bg: string;
17
21
  _first: {
18
22
  borderTopLeftRadius: string;
@@ -27,6 +31,8 @@ declare const _default: {
27
31
  };
28
32
  td: {
29
33
  padding: string;
34
+ lineHeight: string;
35
+ h: string;
30
36
  };
31
37
  };
32
38
  };
@@ -8,6 +8,7 @@ declare const _default: {
8
8
  base: string;
9
9
  lg: string;
10
10
  };
11
+ lineHeight: string;
11
12
  };
12
13
  '*, *::before, *::after': {
13
14
  borderColor: string;
@@ -57,7 +57,9 @@ var Banner = function Banner(_ref) {
57
57
  var variant = _ref.variant,
58
58
  message = _ref.message,
59
59
  buttonText = _ref.buttonText,
60
- onClick = _ref.onClick;
60
+ onClick = _ref.onClick,
61
+ _ref$type = _ref.type,
62
+ type = _ref$type === void 0 ? 'expanded' : _ref$type;
61
63
  var Icon = React.useMemo(function () {
62
64
  switch (variant) {
63
65
  case 'error':
@@ -94,18 +96,24 @@ var Banner = function Banner(_ref) {
94
96
  }, [variant]);
95
97
  return /*#__PURE__*/React__default.createElement(react.Alert, {
96
98
  variant: variant
97
- }, /*#__PURE__*/React__default.createElement(react.AlertDescription, null, /*#__PURE__*/React__default.createElement(react.Box, {
98
- pb: "8px"
99
- }, Icon), message, onClick && buttonText && /*#__PURE__*/React__default.createElement(react.Flex, {
100
- pt: "8px",
101
- justifyContent: "flex-end"
99
+ }, /*#__PURE__*/React__default.createElement(react.AlertDescription, null, /*#__PURE__*/React__default.createElement(react.Flex, {
100
+ flexDirection: type === 'condensed' ? 'row' : 'column',
101
+ alignItems: type === 'condensed' ? 'center' : ''
102
+ }, /*#__PURE__*/React__default.createElement(react.Box, {
103
+ pr: "8px"
104
+ }, Icon), /*#__PURE__*/React__default.createElement(react.Box, {
105
+ pt: type === 'condensed' ? 0 : '8px'
106
+ }, " ", message), onClick && buttonText && /*#__PURE__*/React__default.createElement(react.Flex, {
107
+ ml: type === 'condensed' ? 'auto' : '',
108
+ pt: type === 'condensed' ? 0 : '8px',
109
+ justifyContent: type === 'condensed' ? 'flex-end' : 'flex-end'
102
110
  }, /*#__PURE__*/React__default.createElement(Button, {
103
111
  variant: "secondary",
104
112
  onClick: onClick,
105
113
  text: buttonText,
106
114
  width: "variable",
107
115
  ariaLabel: "banner button"
108
- }))));
116
+ })))));
109
117
  };
110
118
 
111
119
  var blue = {
@@ -373,12 +381,12 @@ var SpinnerButton = function SpinnerButton(_ref) {
373
381
  type = _ref.type,
374
382
  ariaLabel = _ref.ariaLabel,
375
383
  _ref$variant = _ref.variant,
376
- variant = _ref$variant === void 0 ? 'solid' : _ref$variant,
384
+ variant = _ref$variant === void 0 ? 'primary' : _ref$variant,
377
385
  disabled = _ref.disabled,
378
386
  className = _ref.className;
379
387
  return /*#__PURE__*/React__default.createElement(react.Button, {
380
388
  spinner: /*#__PURE__*/React__default.createElement(react.Spinner, {
381
- size: 'md'
389
+ size: 'sm'
382
390
  }),
383
391
  isLoading: isLoading,
384
392
  onClick: onClick,
@@ -602,7 +610,7 @@ function useOnClickOutside(ref, handler) {
602
610
  [ref, handler]);
603
611
  }
604
612
 
605
- var _excluded$1 = ["isRequired", "options", "name", "setValue", "handleOnChange", "value"];
613
+ var _excluded$1 = ["isRequired", "options", "name", "setValue", "handleOnChange", "disabled", "value"];
606
614
  /**
607
615
  * A functional React component utilized to render the `StackedSelect` component.
608
616
  */
@@ -615,6 +623,7 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
615
623
  name = _ref2.name,
616
624
  setValue = _ref2.setValue,
617
625
  handleOnChange = _ref2.handleOnChange,
626
+ disabled = _ref2.disabled,
618
627
  value = _ref2.value,
619
628
  props = _objectWithoutPropertiesLoose(_ref2, _excluded$1);
620
629
 
@@ -683,6 +692,7 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
683
692
  fontSize: "13px",
684
693
  textShadow: "0 0 0 " + colors.label.primary.light,
685
694
  value: selectedOption,
695
+ disabled: disabled,
686
696
  autoComplete: "off",
687
697
  onKeyDown: function onKeyDown(e) {
688
698
  if (isFocussed) {
@@ -703,9 +713,9 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
703
713
  }
704
714
  }
705
715
  })), /*#__PURE__*/React__default.createElement(react.InputRightElement, {
706
- cursor: "pointer",
716
+ cursor: disabled ? 'not-allowed' : 'pointer',
707
717
  onClick: function onClick() {
708
- return setIsFocussed(!isFocussed);
718
+ return !disabled && setIsFocussed(!isFocussed);
709
719
  }
710
720
  }, /*#__PURE__*/React__default.createElement(react.Image, {
711
721
  src: SubtractIcon,
@@ -1812,7 +1822,7 @@ var EmptyTable = function EmptyTable() {
1812
1822
  return i + 1;
1813
1823
  }).map(function (i) {
1814
1824
  return /*#__PURE__*/React__default.createElement(react.Tr, null, /*#__PURE__*/React__default.createElement(react.Td, {
1815
- height: "23px",
1825
+ height: "26px",
1816
1826
  opacity: getOpacity(i)
1817
1827
  }));
1818
1828
  })));
@@ -2074,6 +2084,7 @@ var baseStyle$2 = /*#__PURE__*/system.defineStyle({
2074
2084
  fontSize: '13px',
2075
2085
  bg: colors.fill.action,
2076
2086
  color: colors.label.primary.dark,
2087
+ h: '26px',
2077
2088
  border: 'none',
2078
2089
  px: '8px',
2079
2090
  py: '4px',
@@ -2717,8 +2728,12 @@ var baseStyle$c = {
2717
2728
  },
2718
2729
  tr: {
2719
2730
  fontSize: '13px',
2731
+ h: '26px',
2732
+ lineHeight: 'normal',
2720
2733
  _odd: {
2721
2734
  td: {
2735
+ h: '26px ',
2736
+ lineHeight: 'normal',
2722
2737
  bg: colors.fill.light.tertiary,
2723
2738
  _first: {
2724
2739
  borderTopLeftRadius: 'md',
@@ -2732,7 +2747,9 @@ var baseStyle$c = {
2732
2747
  }
2733
2748
  },
2734
2749
  td: {
2735
- padding: '5px 8px !important'
2750
+ padding: '5px 8px !important',
2751
+ lineHeight: 'normal',
2752
+ h: '26px'
2736
2753
  }
2737
2754
  };
2738
2755
  var Table$1 = {
@@ -3003,7 +3020,7 @@ var baseStyle$f = {
3003
3020
  fontWeight: typography.fontWeights.normal,
3004
3021
  fontFamily: typography.fonts.base,
3005
3022
  fontSize: typography.fontSizes.sm,
3006
- lineHeight: typography.lineHeights.base,
3023
+ lineHeight: typography.lineHeights.normal,
3007
3024
  letterSpacing: typography.letterSpacings.wide
3008
3025
  };
3009
3026
 
@@ -3051,7 +3068,8 @@ var styles = {
3051
3068
  overflow: {
3052
3069
  base: 'visible',
3053
3070
  lg: 'hidden'
3054
- }
3071
+ },
3072
+ lineHeight: 'normal'
3055
3073
  },
3056
3074
  '*, *::before, *::after': {
3057
3075
  borderColor: 'gray.200'