@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.
- package/dist/components/banner/index.d.ts +1 -0
- package/dist/components/input/StackedSelect/{StackedSelect.d.ts → index.d.ts} +0 -0
- package/dist/theme/components/button.d.ts +3 -0
- package/dist/theme/components/table.d.ts +6 -0
- package/dist/theme/styles.d.ts +1 -0
- package/dist/ui-core.cjs.development.js +34 -16
- 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 +35 -17
- package/dist/ui-core.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/banner/Banner.stories.tsx +32 -0
- package/src/components/banner/index.tsx +24 -13
- package/src/components/button/Button.stories.tsx +1 -1
- package/src/components/button/spinner/index.tsx +2 -3
- package/src/components/input/StackedSelect/{StackedSelect.tsx → index.tsx} +14 -4
- package/src/components/input/index.tsx +1 -1
- package/src/components/table/empty/index.tsx +1 -1
- package/src/theme/components/button.ts +1 -0
- package/src/theme/components/table.ts +6 -0
- package/src/theme/components/text.ts +1 -1
- package/src/theme/styles.ts +1 -0
|
File without changes
|
|
@@ -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
|
};
|
package/dist/theme/styles.d.ts
CHANGED
|
@@ -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.
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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 ? '
|
|
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: '
|
|
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:
|
|
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: "
|
|
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.
|
|
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'
|