@paubox/ui 0.8.6 → 0.8.8
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/index.esm.js +26 -13
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -1715,7 +1715,7 @@ function _templateObject9$1() {
|
|
|
1715
1715
|
};
|
|
1716
1716
|
return data;
|
|
1717
1717
|
}
|
|
1718
|
-
function _templateObject10() {
|
|
1718
|
+
function _templateObject10$1() {
|
|
1719
1719
|
var data = _tagged_template_literal$o([
|
|
1720
1720
|
"\n ",
|
|
1721
1721
|
"\n font-size: ",
|
|
@@ -1723,7 +1723,7 @@ function _templateObject10() {
|
|
|
1723
1723
|
"rem;\n letter-spacing: ",
|
|
1724
1724
|
"px;\n font-weight: 600;\n"
|
|
1725
1725
|
]);
|
|
1726
|
-
_templateObject10 = function _templateObject() {
|
|
1726
|
+
_templateObject10$1 = function _templateObject() {
|
|
1727
1727
|
return data;
|
|
1728
1728
|
};
|
|
1729
1729
|
return data;
|
|
@@ -1935,7 +1935,7 @@ var $headline300Semibold = css(_templateObject6$2(), commonStyles, headline300Fo
|
|
|
1935
1935
|
var $paragraph100Regular = css(_templateObject7$1(), commonStyles, paragraph100FontSize / BASE_FONT_SIZE, paragraph100LineHeight / BASE_FONT_SIZE, paragraph100LetterSpacing);
|
|
1936
1936
|
var $paragraph100Semibold = css(_templateObject8$1(), commonStyles, paragraph100FontSize / BASE_FONT_SIZE, paragraph100LineHeight / BASE_FONT_SIZE, paragraph100LetterSpacing);
|
|
1937
1937
|
var $paragraph200Regular = css(_templateObject9$1(), commonStyles, paragraph200FontSize / BASE_FONT_SIZE, paragraph200LineHeight / BASE_FONT_SIZE, paragraph200LetterSpacing);
|
|
1938
|
-
var $paragraph200Semibold = css(_templateObject10(), commonStyles, paragraph200FontSize / BASE_FONT_SIZE, paragraph200LineHeight / BASE_FONT_SIZE, paragraph200LetterSpacing);
|
|
1938
|
+
var $paragraph200Semibold = css(_templateObject10$1(), commonStyles, paragraph200FontSize / BASE_FONT_SIZE, paragraph200LineHeight / BASE_FONT_SIZE, paragraph200LetterSpacing);
|
|
1939
1939
|
var $paragraph300Regular = css(_templateObject11(), commonStyles, paragraph300FontSize / BASE_FONT_SIZE, paragraph300LineHeight / BASE_FONT_SIZE, paragraph300LetterSpacing);
|
|
1940
1940
|
var $paragraph300Medium = css(_templateObject12(), commonStyles, paragraph300FontSize / BASE_FONT_SIZE, paragraph300LineHeight / BASE_FONT_SIZE, paragraph300LetterSpacing);
|
|
1941
1941
|
var $paragraph300Semibold = css(_templateObject13(), commonStyles, paragraph300FontSize / BASE_FONT_SIZE, paragraph300LineHeight / BASE_FONT_SIZE, paragraph300LetterSpacing);
|
|
@@ -2140,6 +2140,17 @@ function _templateObject9() {
|
|
|
2140
2140
|
};
|
|
2141
2141
|
return data;
|
|
2142
2142
|
}
|
|
2143
|
+
function _templateObject10() {
|
|
2144
|
+
var data = _tagged_template_literal$n([
|
|
2145
|
+
"\n ",
|
|
2146
|
+
"\n ",
|
|
2147
|
+
"\n "
|
|
2148
|
+
]);
|
|
2149
|
+
_templateObject10 = function _templateObject() {
|
|
2150
|
+
return data;
|
|
2151
|
+
};
|
|
2152
|
+
return data;
|
|
2153
|
+
}
|
|
2143
2154
|
var AlertBar = function(props) {
|
|
2144
2155
|
var title = props.title, _props_text = props.text, text = _props_text === void 0 ? '' : _props_text, _props_size = props.size, size = _props_size === void 0 ? 'small' : _props_size, _props_type = props.type, type = _props_type === void 0 ? 'info' : _props_type;
|
|
2145
2156
|
var _useState = _sliced_to_array$e(useState(false), 2), isExpanded = _useState[0], setIsExpanded = _useState[1];
|
|
@@ -2167,10 +2178,7 @@ var AlertBar = function(props) {
|
|
|
2167
2178
|
};
|
|
2168
2179
|
var Icon = icon[type];
|
|
2169
2180
|
return /*#__PURE__*/ jsxs("div", {
|
|
2170
|
-
css: [
|
|
2171
|
-
alertBaseStyles,
|
|
2172
|
-
alertStyles[type]
|
|
2173
|
-
],
|
|
2181
|
+
css: css(_templateObject10(), alertBaseStyles, alertStyles[type]),
|
|
2174
2182
|
children: [
|
|
2175
2183
|
/*#__PURE__*/ jsx(Icon, {
|
|
2176
2184
|
css: iconStyles
|
|
@@ -32098,15 +32106,19 @@ var Table = function(param) {
|
|
|
32098
32106
|
openMenuId
|
|
32099
32107
|
]);
|
|
32100
32108
|
var handleSortingChange = useCallback(function(updater) {
|
|
32101
|
-
var
|
|
32109
|
+
var currentSort = sortBy ? [
|
|
32102
32110
|
{
|
|
32103
32111
|
id: sortBy,
|
|
32104
32112
|
desc: sortOrder === 'desc'
|
|
32105
32113
|
}
|
|
32106
|
-
] : []
|
|
32114
|
+
] : [];
|
|
32115
|
+
var nextState = typeof updater === 'function' ? updater(currentSort) : updater;
|
|
32107
32116
|
if (typeof onSortChange === 'function') {
|
|
32108
|
-
|
|
32109
|
-
|
|
32117
|
+
if (nextState.length === 0) {
|
|
32118
|
+
onSortChange('', '');
|
|
32119
|
+
} else {
|
|
32120
|
+
onSortChange(nextState[0].id, nextState[0].desc ? 'desc' : 'asc');
|
|
32121
|
+
}
|
|
32110
32122
|
}
|
|
32111
32123
|
}, [
|
|
32112
32124
|
sortBy,
|
|
@@ -32120,7 +32132,8 @@ var Table = function(param) {
|
|
|
32120
32132
|
defaultColumn: {
|
|
32121
32133
|
minSize: 100,
|
|
32122
32134
|
maxSize: 500,
|
|
32123
|
-
size: 200
|
|
32135
|
+
size: 200,
|
|
32136
|
+
sortDescFirst: false
|
|
32124
32137
|
},
|
|
32125
32138
|
state: {
|
|
32126
32139
|
pagination: {
|
|
@@ -32128,7 +32141,7 @@ var Table = function(param) {
|
|
|
32128
32141
|
pageSize: pageInfo.items
|
|
32129
32142
|
},
|
|
32130
32143
|
columnSizing: columnSizing,
|
|
32131
|
-
sorting: sortBy
|
|
32144
|
+
sorting: sortBy ? [
|
|
32132
32145
|
{
|
|
32133
32146
|
id: sortBy,
|
|
32134
32147
|
desc: sortOrder === 'desc'
|