@paubox/ui 1.7.0 → 1.8.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/index.esm.js +243 -158
- package/package.json +1 -1
- package/src/lib/Table/Table.d.ts +6 -7
- package/src/lib/Table/TableBody.d.ts +1 -3
- package/src/lib/Table/TableHeader.d.ts +0 -2
package/index.esm.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import React__default, { useState, useRef, forwardRef, useLayoutEffect, useEffect, createElement, cloneElement, Component, createRef, useCallback, useId as useId$1, useMemo } from 'react';
|
|
5
|
+
import React__default, { useState, useRef, forwardRef, useLayoutEffect, useEffect, createElement, cloneElement, Component, createRef, useCallback, useId as useId$1, useMemo, Fragment as Fragment$1 } from 'react';
|
|
6
6
|
import * as ReactDOM from 'react-dom';
|
|
7
7
|
import ReactDOM__default, { createPortal } from 'react-dom';
|
|
8
8
|
|
|
@@ -1720,11 +1720,11 @@ function _templateObject2$i() {
|
|
|
1720
1720
|
};
|
|
1721
1721
|
return data;
|
|
1722
1722
|
}
|
|
1723
|
-
function _templateObject3$
|
|
1723
|
+
function _templateObject3$e() {
|
|
1724
1724
|
var data = _tagged_template_literal$u([
|
|
1725
1725
|
"\n box-shadow: 0px 8px 32px 0px #00000029;\n"
|
|
1726
1726
|
]);
|
|
1727
|
-
_templateObject3$
|
|
1727
|
+
_templateObject3$e = function _templateObject() {
|
|
1728
1728
|
return data;
|
|
1729
1729
|
};
|
|
1730
1730
|
return data;
|
|
@@ -1732,7 +1732,7 @@ function _templateObject3$d() {
|
|
|
1732
1732
|
var elevation100 = css(_templateObject$u());
|
|
1733
1733
|
var elevation200 = css(_templateObject1$j());
|
|
1734
1734
|
var elevation300 = css(_templateObject2$i());
|
|
1735
|
-
var elevation400 = css(_templateObject3$
|
|
1735
|
+
var elevation400 = css(_templateObject3$e());
|
|
1736
1736
|
|
|
1737
1737
|
var elevation = /*#__PURE__*/Object.freeze({
|
|
1738
1738
|
__proto__: null,
|
|
@@ -1792,7 +1792,7 @@ function _templateObject2$h() {
|
|
|
1792
1792
|
};
|
|
1793
1793
|
return data;
|
|
1794
1794
|
}
|
|
1795
|
-
function _templateObject3$
|
|
1795
|
+
function _templateObject3$d() {
|
|
1796
1796
|
var data = _tagged_template_literal$t([
|
|
1797
1797
|
"\n ",
|
|
1798
1798
|
"\n font-size: ",
|
|
@@ -1800,12 +1800,12 @@ function _templateObject3$c() {
|
|
|
1800
1800
|
"rem;\n letter-spacing: ",
|
|
1801
1801
|
"px;\n font-weight: 400;\n"
|
|
1802
1802
|
]);
|
|
1803
|
-
_templateObject3$
|
|
1803
|
+
_templateObject3$d = function _templateObject() {
|
|
1804
1804
|
return data;
|
|
1805
1805
|
};
|
|
1806
1806
|
return data;
|
|
1807
1807
|
}
|
|
1808
|
-
function _templateObject4$
|
|
1808
|
+
function _templateObject4$b() {
|
|
1809
1809
|
var data = _tagged_template_literal$t([
|
|
1810
1810
|
"\n ",
|
|
1811
1811
|
"\n font-size: ",
|
|
@@ -1813,12 +1813,12 @@ function _templateObject4$9() {
|
|
|
1813
1813
|
"rem;\n letter-spacing: ",
|
|
1814
1814
|
"px;\n font-weight: 600;\n"
|
|
1815
1815
|
]);
|
|
1816
|
-
_templateObject4$
|
|
1816
|
+
_templateObject4$b = function _templateObject() {
|
|
1817
1817
|
return data;
|
|
1818
1818
|
};
|
|
1819
1819
|
return data;
|
|
1820
1820
|
}
|
|
1821
|
-
function _templateObject5$
|
|
1821
|
+
function _templateObject5$5() {
|
|
1822
1822
|
var data = _tagged_template_literal$t([
|
|
1823
1823
|
"\n ",
|
|
1824
1824
|
"\n font-size: ",
|
|
@@ -1826,12 +1826,12 @@ function _templateObject5$4() {
|
|
|
1826
1826
|
"rem;\n letter-spacing: ",
|
|
1827
1827
|
"px;\n font-weight: 400;\n"
|
|
1828
1828
|
]);
|
|
1829
|
-
_templateObject5$
|
|
1829
|
+
_templateObject5$5 = function _templateObject() {
|
|
1830
1830
|
return data;
|
|
1831
1831
|
};
|
|
1832
1832
|
return data;
|
|
1833
1833
|
}
|
|
1834
|
-
function _templateObject6$
|
|
1834
|
+
function _templateObject6$3() {
|
|
1835
1835
|
var data = _tagged_template_literal$t([
|
|
1836
1836
|
"\n ",
|
|
1837
1837
|
"\n font-size: ",
|
|
@@ -1839,12 +1839,12 @@ function _templateObject6$2() {
|
|
|
1839
1839
|
"rem;\n letter-spacing: ",
|
|
1840
1840
|
"px;\n font-weight: 600;\n"
|
|
1841
1841
|
]);
|
|
1842
|
-
_templateObject6$
|
|
1842
|
+
_templateObject6$3 = function _templateObject() {
|
|
1843
1843
|
return data;
|
|
1844
1844
|
};
|
|
1845
1845
|
return data;
|
|
1846
1846
|
}
|
|
1847
|
-
function _templateObject7$
|
|
1847
|
+
function _templateObject7$2() {
|
|
1848
1848
|
var data = _tagged_template_literal$t([
|
|
1849
1849
|
"\n ",
|
|
1850
1850
|
"\n font-size: ",
|
|
@@ -1852,7 +1852,7 @@ function _templateObject7$1() {
|
|
|
1852
1852
|
"rem;\n letter-spacing: ",
|
|
1853
1853
|
"px;\n font-weight: 400;\n"
|
|
1854
1854
|
]);
|
|
1855
|
-
_templateObject7$
|
|
1855
|
+
_templateObject7$2 = function _templateObject() {
|
|
1856
1856
|
return data;
|
|
1857
1857
|
};
|
|
1858
1858
|
return data;
|
|
@@ -2095,12 +2095,12 @@ var commonStyles = css(_templateObject$t());
|
|
|
2095
2095
|
// HEADLINES
|
|
2096
2096
|
var $headline100Regular = css(_templateObject1$i(), commonStyles, headline100FontSize / BASE_FONT_SIZE, headline100LineHeight / BASE_FONT_SIZE, headline100LetterSpacing);
|
|
2097
2097
|
var $headline100Semibold = css(_templateObject2$h(), commonStyles, headline100FontSize / BASE_FONT_SIZE, headline100LineHeight / BASE_FONT_SIZE, headline100LetterSpacing);
|
|
2098
|
-
var $headline200Regular = css(_templateObject3$
|
|
2099
|
-
var $headline200Semibold = css(_templateObject4$
|
|
2100
|
-
var $headline300Regular = css(_templateObject5$
|
|
2101
|
-
var $headline300Semibold = css(_templateObject6$
|
|
2098
|
+
var $headline200Regular = css(_templateObject3$d(), commonStyles, headline200FontSize / BASE_FONT_SIZE, headline200LineHeight / BASE_FONT_SIZE, headline200LetterSpacing);
|
|
2099
|
+
var $headline200Semibold = css(_templateObject4$b(), commonStyles, headline200FontSize / BASE_FONT_SIZE, headline200LineHeight / BASE_FONT_SIZE, headline200LetterSpacing);
|
|
2100
|
+
var $headline300Regular = css(_templateObject5$5(), commonStyles, headline300FontSize / BASE_FONT_SIZE, headline300LineHeight / BASE_FONT_SIZE, headline300LetterSpacing);
|
|
2101
|
+
var $headline300Semibold = css(_templateObject6$3(), commonStyles, headline300FontSize / BASE_FONT_SIZE, headline300LineHeight / BASE_FONT_SIZE, headline300LetterSpacing);
|
|
2102
2102
|
// PARAGRAPH
|
|
2103
|
-
var $paragraph100Regular = css(_templateObject7$
|
|
2103
|
+
var $paragraph100Regular = css(_templateObject7$2(), commonStyles, paragraph100FontSize / BASE_FONT_SIZE, paragraph100LineHeight / BASE_FONT_SIZE, paragraph100LetterSpacing);
|
|
2104
2104
|
var $paragraph100Semibold = css(_templateObject8(), commonStyles, paragraph100FontSize / BASE_FONT_SIZE, paragraph100LineHeight / BASE_FONT_SIZE, paragraph100LetterSpacing);
|
|
2105
2105
|
var $paragraph200Regular = css(_templateObject9(), commonStyles, paragraph200FontSize / BASE_FONT_SIZE, paragraph200LineHeight / BASE_FONT_SIZE, paragraph200LetterSpacing);
|
|
2106
2106
|
var $paragraph200Semibold = css(_templateObject10(), commonStyles, paragraph200FontSize / BASE_FONT_SIZE, paragraph200LineHeight / BASE_FONT_SIZE, paragraph200LetterSpacing);
|
|
@@ -2239,32 +2239,32 @@ function _templateObject2$g() {
|
|
|
2239
2239
|
};
|
|
2240
2240
|
return data;
|
|
2241
2241
|
}
|
|
2242
|
-
function _templateObject3$
|
|
2242
|
+
function _templateObject3$c() {
|
|
2243
2243
|
var data = _tagged_template_literal$s([
|
|
2244
2244
|
"\n font-size: 1.5rem;\n color: ",
|
|
2245
2245
|
";\n margin-bottom: auto;\n flex-shrink: 0;\n"
|
|
2246
2246
|
]);
|
|
2247
|
-
_templateObject3$
|
|
2247
|
+
_templateObject3$c = function _templateObject() {
|
|
2248
2248
|
return data;
|
|
2249
2249
|
};
|
|
2250
2250
|
return data;
|
|
2251
2251
|
}
|
|
2252
|
-
function _templateObject4$
|
|
2252
|
+
function _templateObject4$a() {
|
|
2253
2253
|
var data = _tagged_template_literal$s([
|
|
2254
2254
|
"\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 100%;\n"
|
|
2255
2255
|
]);
|
|
2256
|
-
_templateObject4$
|
|
2256
|
+
_templateObject4$a = function _templateObject() {
|
|
2257
2257
|
return data;
|
|
2258
2258
|
};
|
|
2259
2259
|
return data;
|
|
2260
2260
|
}
|
|
2261
|
-
function _templateObject5$
|
|
2261
|
+
function _templateObject5$4() {
|
|
2262
2262
|
var data = _tagged_template_literal$s([
|
|
2263
2263
|
"\n background-color: transparent;\n border: none;\n color: ",
|
|
2264
2264
|
";\n cursor: pointer;\n padding: 0.25rem;\n font-size: 0.75rem;\n margin-left: ",
|
|
2265
2265
|
";\n"
|
|
2266
2266
|
]);
|
|
2267
|
-
_templateObject5$
|
|
2267
|
+
_templateObject5$4 = function _templateObject() {
|
|
2268
2268
|
return data;
|
|
2269
2269
|
};
|
|
2270
2270
|
return data;
|
|
@@ -2281,12 +2281,12 @@ var Title = styled.h1(_templateObject1$h(), function(param) {
|
|
|
2281
2281
|
return size === 'large' ? $paragraph100Semibold : $paragraph200Regular;
|
|
2282
2282
|
});
|
|
2283
2283
|
var Text = styled.p(_templateObject2$g(), $paragraph200Regular);
|
|
2284
|
-
var StyledIcon = styled.div(_templateObject3$
|
|
2284
|
+
var StyledIcon = styled.div(_templateObject3$c(), function(param) {
|
|
2285
2285
|
var type = param.type;
|
|
2286
2286
|
return type === 'info' ? primary700 : type === 'error' ? danger700 : type === 'success' ? success700 : warning700;
|
|
2287
2287
|
});
|
|
2288
|
-
var TextWrapper = styled.div(_templateObject4$
|
|
2289
|
-
var TruncaterButton = styled.button(_templateObject5$
|
|
2288
|
+
var TextWrapper = styled.div(_templateObject4$a());
|
|
2289
|
+
var TruncaterButton = styled.button(_templateObject5$4(), primary700, function(param) {
|
|
2290
2290
|
var isExpanded = param.isExpanded;
|
|
2291
2291
|
return !isExpanded ? '0' : '0.25rem';
|
|
2292
2292
|
});
|
|
@@ -22898,11 +22898,11 @@ function _templateObject2$e() {
|
|
|
22898
22898
|
};
|
|
22899
22899
|
return data;
|
|
22900
22900
|
}
|
|
22901
|
-
function _templateObject3$
|
|
22901
|
+
function _templateObject3$b() {
|
|
22902
22902
|
var data = _tagged_template_literal$j([
|
|
22903
22903
|
"\n width: 100%;\n min-width: 0;\n"
|
|
22904
22904
|
]);
|
|
22905
|
-
_templateObject3$
|
|
22905
|
+
_templateObject3$b = function _templateObject() {
|
|
22906
22906
|
return data;
|
|
22907
22907
|
};
|
|
22908
22908
|
return data;
|
|
@@ -22913,7 +22913,7 @@ var RowContainer = styled.div(_templateObject$j(), function(param) {
|
|
|
22913
22913
|
});
|
|
22914
22914
|
var ContentContainer = styled.div(_templateObject1$f());
|
|
22915
22915
|
var SelectContainer = styled.div(_templateObject2$e());
|
|
22916
|
-
var MultiInputContainer = styled.div(_templateObject3$
|
|
22916
|
+
var MultiInputContainer = styled.div(_templateObject3$b());
|
|
22917
22917
|
var FilterRow = function(param) {
|
|
22918
22918
|
var filterKey = param.filterKey, rowIndex = param.rowIndex, values = param.values, errors = param.errors, touched = param.touched, onChange = param.onChange, onRemove = param.onRemove, fieldOptions = param.fieldOptions, operatorOptions = param.operatorOptions, showRemove = param.showRemove;
|
|
22919
22919
|
var _touched_filters_filterKey_rowIndex, _touched_filters_filterKey, _touched_filters, _errors_filters_filterKey_rowIndex, _errors_filters_filterKey, _errors_filters, _touched_filters_filterKey_rowIndex1, _touched_filters_filterKey1, _touched_filters1, _errors_filters_filterKey_rowIndex1, _errors_filters_filterKey1, _errors_filters1, _touched_filters_filterKey_rowIndex2, _touched_filters_filterKey2, _touched_filters2, _errors_filters_filterKey_rowIndex2, _errors_filters_filterKey2, _errors_filters2;
|
|
@@ -23136,39 +23136,39 @@ function _templateObject2$d() {
|
|
|
23136
23136
|
};
|
|
23137
23137
|
return data;
|
|
23138
23138
|
}
|
|
23139
|
-
function _templateObject3$
|
|
23139
|
+
function _templateObject3$a() {
|
|
23140
23140
|
var data = _tagged_template_literal$i([
|
|
23141
23141
|
"\n display: flex;\n width: 100%;\n flex-direction: column;\n flex-wrap: wrap;\n gap: 1rem;\n border-color: #e5e7eb;\n"
|
|
23142
23142
|
]);
|
|
23143
|
-
_templateObject3$
|
|
23143
|
+
_templateObject3$a = function _templateObject() {
|
|
23144
23144
|
return data;
|
|
23145
23145
|
};
|
|
23146
23146
|
return data;
|
|
23147
23147
|
}
|
|
23148
|
-
function _templateObject4$
|
|
23148
|
+
function _templateObject4$9() {
|
|
23149
23149
|
var data = _tagged_template_literal$i([
|
|
23150
23150
|
"\n width: 100%;\n border-radius: 0.5rem;\n border: 4px dashed #e5e7eb;\n background-color: #f9fafb;\n padding: 2rem;\n\n &:hover {\n cursor: pointer;\n &:not(:disabled) {\n background-color: ",
|
|
23151
23151
|
";\n }\n &:disabled {\n cursor: not-allowed;\n }\n }\n"
|
|
23152
23152
|
]);
|
|
23153
|
-
_templateObject4$
|
|
23153
|
+
_templateObject4$9 = function _templateObject() {
|
|
23154
23154
|
return data;
|
|
23155
23155
|
};
|
|
23156
23156
|
return data;
|
|
23157
23157
|
}
|
|
23158
|
-
function _templateObject5$
|
|
23158
|
+
function _templateObject5$3() {
|
|
23159
23159
|
var data = _tagged_template_literal$i([
|
|
23160
23160
|
"\n display: flex;\n flex-direction: row;\n gap: 0.5rem;\n"
|
|
23161
23161
|
]);
|
|
23162
|
-
_templateObject5$
|
|
23162
|
+
_templateObject5$3 = function _templateObject() {
|
|
23163
23163
|
return data;
|
|
23164
23164
|
};
|
|
23165
23165
|
return data;
|
|
23166
23166
|
}
|
|
23167
|
-
function _templateObject6$
|
|
23167
|
+
function _templateObject6$2() {
|
|
23168
23168
|
var data = _tagged_template_literal$i([
|
|
23169
23169
|
"\n width: 100%;\n padding: 1rem;\n padding-top: 0;\n box-sizing: border-box;\n"
|
|
23170
23170
|
]);
|
|
23171
|
-
_templateObject6$
|
|
23171
|
+
_templateObject6$2 = function _templateObject() {
|
|
23172
23172
|
return data;
|
|
23173
23173
|
};
|
|
23174
23174
|
return data;
|
|
@@ -23182,10 +23182,10 @@ var FilterGroup = styled.div(_templateObject1$e(), function(param) {
|
|
|
23182
23182
|
return isHovered ? danger200 : '#e5e7eb';
|
|
23183
23183
|
});
|
|
23184
23184
|
var CloseButton$1 = styled.button(_templateObject2$d());
|
|
23185
|
-
var FilterRowsContainer = styled.div(_templateObject3$
|
|
23186
|
-
var OrButton = styled.button(_templateObject4$
|
|
23187
|
-
var ButtonGroup = styled.div(_templateObject5$
|
|
23188
|
-
var AndButtonContainer = styled.div(_templateObject6$
|
|
23185
|
+
var FilterRowsContainer = styled.div(_templateObject3$a());
|
|
23186
|
+
var OrButton = styled.button(_templateObject4$9(), neutral100);
|
|
23187
|
+
var ButtonGroup = styled.div(_templateObject5$3());
|
|
23188
|
+
var AndButtonContainer = styled.div(_templateObject6$2());
|
|
23189
23189
|
var FilterForm = function(param) {
|
|
23190
23190
|
var values = param.values, fieldOptions = param.fieldOptions, operatorOptions = param.operatorOptions, onSubmit = param.onSubmit, onClear = param.onClear, onChange = param.onChange, errors = param.errors, touched = param.touched;
|
|
23191
23191
|
var _useState = _sliced_to_array$c(useState(undefined), 2), isHovered = _useState[0], setIsHovered = _useState[1];
|
|
@@ -23804,57 +23804,57 @@ function _templateObject2$b() {
|
|
|
23804
23804
|
};
|
|
23805
23805
|
return data;
|
|
23806
23806
|
}
|
|
23807
|
-
function _templateObject3$
|
|
23807
|
+
function _templateObject3$9() {
|
|
23808
23808
|
var data = _tagged_template_literal$g([
|
|
23809
23809
|
"\n background-color: ",
|
|
23810
23810
|
";\n border-radius: 1rem;\n border: none;\n cursor: pointer;\n padding: 0.25rem 0.313rem;\n white-space: nowrap;\n display: flex;\n gap: 0.25rem;\n ",
|
|
23811
23811
|
"\n align-items: center;\n justify-content: center;\n"
|
|
23812
23812
|
]);
|
|
23813
|
-
_templateObject3$
|
|
23813
|
+
_templateObject3$9 = function _templateObject() {
|
|
23814
23814
|
return data;
|
|
23815
23815
|
};
|
|
23816
23816
|
return data;
|
|
23817
23817
|
}
|
|
23818
|
-
function _templateObject4$
|
|
23818
|
+
function _templateObject4$8() {
|
|
23819
23819
|
var data = _tagged_template_literal$g([
|
|
23820
23820
|
"\n position: absolute;\n display: flex;\n gap: 0.25rem;\n width: min-content;\n max-width: 85%;\n height: auto;\n overflow-x: auto;\n\n /* Always show scrollbar when overflowing */\n &::-webkit-scrollbar {\n height: 4px;\n display: block;\n }\n\n &::-webkit-scrollbar-track {\n background: ",
|
|
23821
23821
|
";\n border-radius: 2px;\n display: block;\n width: 95%;\n }\n\n &::-webkit-scrollbar-thumb {\n background: ",
|
|
23822
23822
|
";\n border-radius: 2px;\n display: block;\n }\n\n padding: ",
|
|
23823
23823
|
";\n"
|
|
23824
23824
|
]);
|
|
23825
|
-
_templateObject4$
|
|
23825
|
+
_templateObject4$8 = function _templateObject() {
|
|
23826
23826
|
return data;
|
|
23827
23827
|
};
|
|
23828
23828
|
return data;
|
|
23829
23829
|
}
|
|
23830
|
-
function _templateObject5$
|
|
23830
|
+
function _templateObject5$2() {
|
|
23831
23831
|
var data = _tagged_template_literal$g([
|
|
23832
23832
|
"\n position: absolute;\n right: 0rem;\n width: 2rem;\n background-color: inherit;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 0;\n border: none;\n cursor: pointer;\n z-index: 0;\n transition: all 150ms ease-in-out;\n transform: ",
|
|
23833
23833
|
";\n"
|
|
23834
23834
|
]);
|
|
23835
|
-
_templateObject5$
|
|
23835
|
+
_templateObject5$2 = function _templateObject() {
|
|
23836
23836
|
return data;
|
|
23837
23837
|
};
|
|
23838
23838
|
return data;
|
|
23839
23839
|
}
|
|
23840
|
-
function _templateObject6() {
|
|
23840
|
+
function _templateObject6$1() {
|
|
23841
23841
|
var data = _tagged_template_literal$g([
|
|
23842
23842
|
"\n ",
|
|
23843
23843
|
"\n color: ",
|
|
23844
23844
|
"/80;\n"
|
|
23845
23845
|
]);
|
|
23846
|
-
_templateObject6 = function _templateObject() {
|
|
23846
|
+
_templateObject6$1 = function _templateObject() {
|
|
23847
23847
|
return data;
|
|
23848
23848
|
};
|
|
23849
23849
|
return data;
|
|
23850
23850
|
}
|
|
23851
|
-
function _templateObject7() {
|
|
23851
|
+
function _templateObject7$1() {
|
|
23852
23852
|
var data = _tagged_template_literal$g([
|
|
23853
23853
|
"\n ",
|
|
23854
23854
|
"\n color: ",
|
|
23855
23855
|
";\n"
|
|
23856
23856
|
]);
|
|
23857
|
-
_templateObject7 = function _templateObject() {
|
|
23857
|
+
_templateObject7$1 = function _templateObject() {
|
|
23858
23858
|
return data;
|
|
23859
23859
|
};
|
|
23860
23860
|
return data;
|
|
@@ -23888,14 +23888,14 @@ var BaseSelect$1 = styled.select(_templateObject2$b(), neutral500, function(para
|
|
|
23888
23888
|
var sz = param.sz, type = param.type;
|
|
23889
23889
|
return type === 'primary' ? sz === 'lg' ? $paragraph100Regular : $paragraph200Regular : sz === 'lg' ? $paragraph100Semibold : $paragraph200Semibold;
|
|
23890
23890
|
});
|
|
23891
|
-
var Chip$1 = styled.button(_templateObject3$
|
|
23891
|
+
var Chip$1 = styled.button(_templateObject3$9(), function(param) {
|
|
23892
23892
|
var secondary = param.secondary;
|
|
23893
23893
|
return secondary ? neutral300 : neutral100;
|
|
23894
23894
|
}, function(param) {
|
|
23895
23895
|
var sz = param.sz;
|
|
23896
23896
|
return sz === 'lg' ? $label100Medium : $label200Medium;
|
|
23897
23897
|
});
|
|
23898
|
-
var ChipWrapper$1 = styled.div(_templateObject4$
|
|
23898
|
+
var ChipWrapper$1 = styled.div(_templateObject4$8(), neutral100, neutral300, function(param) {
|
|
23899
23899
|
var sz = param.sz;
|
|
23900
23900
|
return sz === 'lg' ? '0.5rem 0.563rem' : '0.375rem 0.563rem';
|
|
23901
23901
|
});
|
|
@@ -23912,12 +23912,12 @@ var MultiSelectChip = function(option) {
|
|
|
23912
23912
|
});
|
|
23913
23913
|
};
|
|
23914
23914
|
// Style for the Icons
|
|
23915
|
-
var IconWrapper$2 = styled.div(_templateObject5$
|
|
23915
|
+
var IconWrapper$2 = styled.div(_templateObject5$2(), function(param) {
|
|
23916
23916
|
var open = param.open;
|
|
23917
23917
|
return open ? 'rotate(180deg)' : 'rotate(0deg)';
|
|
23918
23918
|
});
|
|
23919
|
-
var PlaceholderOption = styled.option(_templateObject6(), $paragraph100Semibold, textSecondary);
|
|
23920
|
-
var SelectedOption = styled.option(_templateObject7(), $paragraph200Regular, textPrimary);
|
|
23919
|
+
var PlaceholderOption = styled.option(_templateObject6$1(), $paragraph100Semibold, textSecondary);
|
|
23920
|
+
var SelectedOption = styled.option(_templateObject7$1(), $paragraph200Regular, textPrimary);
|
|
23921
23921
|
var MultiSelect = function(_param) {
|
|
23922
23922
|
var _param_sz = _param.sz, sz = _param_sz === void 0 ? 'sm' : _param_sz, _param_error = _param.error, error = _param_error === void 0 ? false : _param_error, _param_options = _param.options, options = _param_options === void 0 ? [] : _param_options; _param.checkbox; var placeholder = _param.placeholder, label = _param.label, _param_chips = _param.chips, chips = _param_chips === void 0 ? false : _param_chips, className = _param.className, values = _param.values, setValues = _param.setValues, _param_disabled = _param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled, _param_type = _param.type, type = _param_type === void 0 ? 'primary' : _param_type, props = _object_without_properties$e(_param, [
|
|
23923
23923
|
"sz",
|
|
@@ -24377,21 +24377,21 @@ function _templateObject2$a() {
|
|
|
24377
24377
|
};
|
|
24378
24378
|
return data;
|
|
24379
24379
|
}
|
|
24380
|
-
function _templateObject3$
|
|
24380
|
+
function _templateObject3$8() {
|
|
24381
24381
|
var data = _tagged_template_literal$e([
|
|
24382
24382
|
"\n display: flex;\n gap: 0.25rem;\n flex-wrap: wrap;\n height: auto;\n"
|
|
24383
24383
|
]);
|
|
24384
|
-
_templateObject3$
|
|
24384
|
+
_templateObject3$8 = function _templateObject() {
|
|
24385
24385
|
return data;
|
|
24386
24386
|
};
|
|
24387
24387
|
return data;
|
|
24388
24388
|
}
|
|
24389
|
-
function _templateObject4$
|
|
24389
|
+
function _templateObject4$7() {
|
|
24390
24390
|
var data = _tagged_template_literal$e([
|
|
24391
24391
|
"\n position: absolute;\n right: 0.5rem;\n opacity: 0.8;\n\n ",
|
|
24392
24392
|
"\n"
|
|
24393
24393
|
]);
|
|
24394
|
-
_templateObject4$
|
|
24394
|
+
_templateObject4$7 = function _templateObject() {
|
|
24395
24395
|
return data;
|
|
24396
24396
|
};
|
|
24397
24397
|
return data;
|
|
@@ -24412,8 +24412,8 @@ var Chip = styled.button(_templateObject2$a(), function(param) {
|
|
|
24412
24412
|
var secondary = param.secondary;
|
|
24413
24413
|
return secondary ? neutral300 : neutral100;
|
|
24414
24414
|
}, $label200Medium);
|
|
24415
|
-
var ChipWrapper = styled.div(_templateObject3$
|
|
24416
|
-
var ChipCounter = styled.p(_templateObject4$
|
|
24415
|
+
var ChipWrapper = styled.div(_templateObject3$8());
|
|
24416
|
+
var ChipCounter = styled.p(_templateObject4$7(), function(param) {
|
|
24417
24417
|
var sz = param.sz, type = param.type;
|
|
24418
24418
|
return type === 'primary' ? sz === 'lg' ? $paragraph100Regular : $paragraph200Regular : sz === 'lg' ? $paragraph100Semibold : $paragraph200Semibold;
|
|
24419
24419
|
});
|
|
@@ -24704,24 +24704,24 @@ function _templateObject2$9() {
|
|
|
24704
24704
|
};
|
|
24705
24705
|
return data;
|
|
24706
24706
|
}
|
|
24707
|
-
function _templateObject3$
|
|
24707
|
+
function _templateObject3$7() {
|
|
24708
24708
|
var data = _tagged_template_literal$d([
|
|
24709
24709
|
"\n position: absolute;\n right: 0rem;\n width: 2rem;\n font-size: ",
|
|
24710
24710
|
"rem;\n background-color: inherit;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 0;\n border: none;\n cursor: pointer;\n transition: all 150ms ease-in-out;\n transform: ",
|
|
24711
24711
|
";\n"
|
|
24712
24712
|
]);
|
|
24713
|
-
_templateObject3$
|
|
24713
|
+
_templateObject3$7 = function _templateObject() {
|
|
24714
24714
|
return data;
|
|
24715
24715
|
};
|
|
24716
24716
|
return data;
|
|
24717
24717
|
}
|
|
24718
|
-
function _templateObject4$
|
|
24718
|
+
function _templateObject4$6() {
|
|
24719
24719
|
var data = _tagged_template_literal$d([
|
|
24720
24720
|
"\n ",
|
|
24721
24721
|
"\n color: ",
|
|
24722
24722
|
";\n"
|
|
24723
24723
|
]);
|
|
24724
|
-
_templateObject4$
|
|
24724
|
+
_templateObject4$6 = function _templateObject() {
|
|
24725
24725
|
return data;
|
|
24726
24726
|
};
|
|
24727
24727
|
return data;
|
|
@@ -24752,14 +24752,14 @@ var BaseSelect = styled.select(_templateObject2$9(), textPrimary, function(param
|
|
|
24752
24752
|
var sz = param.sz, type = param.type;
|
|
24753
24753
|
return type === 'primary' ? sz === 'lg' ? $paragraph100Regular : $paragraph200Regular : sz === 'lg' ? $paragraph100Semibold : $paragraph200Semibold;
|
|
24754
24754
|
});
|
|
24755
|
-
var IconWrapper$1 = styled.div(_templateObject3$
|
|
24755
|
+
var IconWrapper$1 = styled.div(_templateObject3$7(), function(param) {
|
|
24756
24756
|
var sz = param.sz;
|
|
24757
24757
|
return sz === 'lg' ? 1 : 0.75;
|
|
24758
24758
|
}, function(param) {
|
|
24759
24759
|
var open = param.open;
|
|
24760
24760
|
return open ? 'rotate(180deg)' : 'rotate(0deg)';
|
|
24761
24761
|
});
|
|
24762
|
-
var SelectOption = styled.option(_templateObject4$
|
|
24762
|
+
var SelectOption = styled.option(_templateObject4$6(), $paragraph100Semibold, textPrimary);
|
|
24763
24763
|
var Select = function(_param) {
|
|
24764
24764
|
var _param_sz = _param.sz, sz = _param_sz === void 0 ? 'sm' : _param_sz, _param_error = _param.error, error = _param_error === void 0 ? false : _param_error, _param_options = _param.options, options = _param_options === void 0 ? [] : _param_options; _param.checkbox; var _param_placeholder = _param.placeholder, placeholder = _param_placeholder === void 0 ? 'Please select...' : _param_placeholder, value = _param.value, setValue = _param.setValue; _param.initialValue; var _param_type = _param.type, type = _param_type === void 0 ? 'primary' : _param_type, style = _param.style, _param_maxHeight = _param.maxHeight, maxHeight = _param_maxHeight === void 0 ? '14rem' : _param_maxHeight, _param_disabled = _param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled, _param_addClearOption = _param.addClearOption, addClearOption = _param_addClearOption === void 0 ? false : _param_addClearOption, _param_clearOptionLabel = _param.clearOptionLabel, clearOptionLabel = _param_clearOptionLabel === void 0 ? 'Clear' : _param_clearOptionLabel, props = _object_without_properties$b(_param, [
|
|
24765
24765
|
"sz",
|
|
@@ -25168,22 +25168,22 @@ function _templateObject2$7() {
|
|
|
25168
25168
|
};
|
|
25169
25169
|
return data;
|
|
25170
25170
|
}
|
|
25171
|
-
function _templateObject3$
|
|
25171
|
+
function _templateObject3$6() {
|
|
25172
25172
|
var data = _tagged_template_literal$b([
|
|
25173
25173
|
"\n ",
|
|
25174
25174
|
"\n"
|
|
25175
25175
|
]);
|
|
25176
|
-
_templateObject3$
|
|
25176
|
+
_templateObject3$6 = function _templateObject() {
|
|
25177
25177
|
return data;
|
|
25178
25178
|
};
|
|
25179
25179
|
return data;
|
|
25180
25180
|
}
|
|
25181
|
-
function _templateObject4$
|
|
25181
|
+
function _templateObject4$5() {
|
|
25182
25182
|
var data = _tagged_template_literal$b([
|
|
25183
25183
|
"\n ",
|
|
25184
25184
|
"\n"
|
|
25185
25185
|
]);
|
|
25186
|
-
_templateObject4$
|
|
25186
|
+
_templateObject4$5 = function _templateObject() {
|
|
25187
25187
|
return data;
|
|
25188
25188
|
};
|
|
25189
25189
|
return data;
|
|
@@ -25191,8 +25191,8 @@ function _templateObject4$3() {
|
|
|
25191
25191
|
var MenuItemContainer = styled.div(_templateObject$b(), primary100);
|
|
25192
25192
|
var IconContainer = styled.div(_templateObject1$8());
|
|
25193
25193
|
var buttonStyles = css(_templateObject2$7(), spacing(1), spacing(2), $paragraph200Regular);
|
|
25194
|
-
var StyledItem = styled.button(_templateObject3$
|
|
25195
|
-
var StyledLink = styled.a(_templateObject4$
|
|
25194
|
+
var StyledItem = styled.button(_templateObject3$6(), buttonStyles);
|
|
25195
|
+
var StyledLink = styled.a(_templateObject4$5(), buttonStyles);
|
|
25196
25196
|
var MenuItem = function(_param) {
|
|
25197
25197
|
var label = _param.label, href = _param.href, selected = _param.selected, checkbox = _param.checkbox, onClick = _param.onClick, icon = _param.icon, disabled = _param.disabled, _param_size = _param.size, size = _param_size === void 0 ? 'small' : _param_size, props = _object_without_properties$9(_param, [
|
|
25198
25198
|
"label",
|
|
@@ -29091,21 +29091,21 @@ function _templateObject2$6() {
|
|
|
29091
29091
|
};
|
|
29092
29092
|
return data;
|
|
29093
29093
|
}
|
|
29094
|
-
function _templateObject3$
|
|
29094
|
+
function _templateObject3$5() {
|
|
29095
29095
|
var data = _tagged_template_literal$8([
|
|
29096
29096
|
"\n overflow-y: auto;\n"
|
|
29097
29097
|
]);
|
|
29098
|
-
_templateObject3$
|
|
29098
|
+
_templateObject3$5 = function _templateObject() {
|
|
29099
29099
|
return data;
|
|
29100
29100
|
};
|
|
29101
29101
|
return data;
|
|
29102
29102
|
}
|
|
29103
|
-
function _templateObject4$
|
|
29103
|
+
function _templateObject4$4() {
|
|
29104
29104
|
var data = _tagged_template_literal$8([
|
|
29105
29105
|
"\n display: flex;\n justify-content: end;\n gap: ",
|
|
29106
29106
|
"px;\n"
|
|
29107
29107
|
]);
|
|
29108
|
-
_templateObject4$
|
|
29108
|
+
_templateObject4$4 = function _templateObject() {
|
|
29109
29109
|
return data;
|
|
29110
29110
|
};
|
|
29111
29111
|
return data;
|
|
@@ -29113,8 +29113,8 @@ function _templateObject4$2() {
|
|
|
29113
29113
|
var StyledModal = styled(Modal$1)(_templateObject$8());
|
|
29114
29114
|
var ModalContent = styled.div(_templateObject1$7(), spacing(2), spacing(1), spacing(3), elevation400);
|
|
29115
29115
|
var ModalHeader = styled.div(_templateObject2$6());
|
|
29116
|
-
var ModalBody = styled.div(_templateObject3$
|
|
29117
|
-
var ModalFooter = styled.div(_templateObject4$
|
|
29116
|
+
var ModalBody = styled.div(_templateObject3$5());
|
|
29117
|
+
var ModalFooter = styled.div(_templateObject4$4(), spacing(1));
|
|
29118
29118
|
var Modal = function(param) {
|
|
29119
29119
|
var open = param.open, onClose = param.onClose, loading = param.loading, title = param.title, header = param.header, children = param.children, actions = param.actions, style = param.style, _param_testId = param.testId, testId = _param_testId === void 0 ? 'modal' : _param_testId;
|
|
29120
29120
|
return /*#__PURE__*/ jsx(StyledModal, {
|
|
@@ -29188,9 +29188,7 @@ function _tagged_template_literal$7(strings, raw) {
|
|
|
29188
29188
|
}
|
|
29189
29189
|
function _templateObject$7() {
|
|
29190
29190
|
var data = _tagged_template_literal$7([
|
|
29191
|
-
"\n display: flex;\n align-items: center;\n justify-content: space-between;\n
|
|
29192
|
-
"px ",
|
|
29193
|
-
"px ",
|
|
29191
|
+
"\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: ",
|
|
29194
29192
|
"px;\n"
|
|
29195
29193
|
]);
|
|
29196
29194
|
_templateObject$7 = function _templateObject() {
|
|
@@ -29207,7 +29205,7 @@ function _templateObject1$6() {
|
|
|
29207
29205
|
};
|
|
29208
29206
|
return data;
|
|
29209
29207
|
}
|
|
29210
|
-
var PaginationContainer = styled.div(_templateObject$7(), spacing(2)
|
|
29208
|
+
var PaginationContainer = styled.div(_templateObject$7(), spacing(2));
|
|
29211
29209
|
var PageControls = styled.div(_templateObject1$6());
|
|
29212
29210
|
var Pagination = function(param) {
|
|
29213
29211
|
var mode = param.mode, pageInfo = param.pageInfo, _param_isLoading = param.isLoading, isLoading = _param_isLoading === void 0 ? false : _param_isLoading, onPageSizeChange = param.onPageSizeChange, subText = param.subText, onPageChange = param.onPageChange, _param_testId = param.testId, testId = _param_testId === void 0 ? 'pagination' : _param_testId;
|
|
@@ -29663,13 +29661,13 @@ function _templateObject2$5() {
|
|
|
29663
29661
|
};
|
|
29664
29662
|
return data;
|
|
29665
29663
|
}
|
|
29666
|
-
function _templateObject3$
|
|
29664
|
+
function _templateObject3$4() {
|
|
29667
29665
|
var data = _tagged_template_literal$5([
|
|
29668
29666
|
"\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n border-radius: 0px ",
|
|
29669
29667
|
"px ",
|
|
29670
29668
|
"px 0px;\n padding: 0 1.5rem;\n"
|
|
29671
29669
|
]);
|
|
29672
|
-
_templateObject3$
|
|
29670
|
+
_templateObject3$4 = function _templateObject() {
|
|
29673
29671
|
return data;
|
|
29674
29672
|
};
|
|
29675
29673
|
return data;
|
|
@@ -29677,7 +29675,7 @@ function _templateObject3$3() {
|
|
|
29677
29675
|
var Container$1 = styled.div(_templateObject$5(), spacing(1));
|
|
29678
29676
|
var IconWrapper = styled(IconWrapper$3)(_templateObject1$5(), neutral200, neutral600);
|
|
29679
29677
|
var StyledInput = styled(BaseInput$1)(_templateObject2$5());
|
|
29680
|
-
var GoButton = styled(Button)(_templateObject3$
|
|
29678
|
+
var GoButton = styled(Button)(_templateObject3$4(), spacing(1), spacing(1));
|
|
29681
29679
|
var SearchBar = function(_param) {
|
|
29682
29680
|
var placeholder = _param.placeholder, _param_error = _param.error, error = _param_error === void 0 ? false : _param_error, onClear = _param.onClear, onSubmit = _param.onSubmit, _param_showButton = _param.showButton, showButton = _param_showButton === void 0 ? true : _param_showButton, _param_showFilters = _param.showFilters, showFilters = _param_showFilters === void 0 ? false : _param_showFilters, _param_testId = _param.testId, testId = _param_testId === void 0 ? 'search' : _param_testId, props = _object_without_properties$2(_param, [
|
|
29683
29681
|
"placeholder",
|
|
@@ -33794,31 +33792,31 @@ function _templateObject2$4() {
|
|
|
33794
33792
|
};
|
|
33795
33793
|
return data;
|
|
33796
33794
|
}
|
|
33797
|
-
function _templateObject3$
|
|
33795
|
+
function _templateObject3$3() {
|
|
33798
33796
|
var data = _tagged_template_literal$4([
|
|
33799
33797
|
"\n position: absolute;\n right: 0;\n top: 0;\n display: flex;\n align-items: center;\n height: 100%;\n width: 6px;\n padding-right: 10px;\n"
|
|
33800
33798
|
]);
|
|
33801
|
-
_templateObject3$
|
|
33799
|
+
_templateObject3$3 = function _templateObject() {
|
|
33802
33800
|
return data;
|
|
33803
33801
|
};
|
|
33804
33802
|
return data;
|
|
33805
33803
|
}
|
|
33806
|
-
function _templateObject4$
|
|
33804
|
+
function _templateObject4$3() {
|
|
33807
33805
|
var data = _tagged_template_literal$4([
|
|
33808
33806
|
"\n position: absolute;\n height: 0%;\n width: 6px;\n background-color: ",
|
|
33809
33807
|
";\n cursor: col-resize;\n user-select: none;\n touch-action: none;\n transition: height ease 0.25s;\n"
|
|
33810
33808
|
]);
|
|
33811
|
-
_templateObject4$
|
|
33809
|
+
_templateObject4$3 = function _templateObject() {
|
|
33812
33810
|
return data;
|
|
33813
33811
|
};
|
|
33814
33812
|
return data;
|
|
33815
33813
|
}
|
|
33816
|
-
function _templateObject5() {
|
|
33814
|
+
function _templateObject5$1() {
|
|
33817
33815
|
var data = _tagged_template_literal$4([
|
|
33818
33816
|
"\n font-size: 9px;\n display: inline-flex;\n flex-direction: column;\n margin-left: ",
|
|
33819
33817
|
"px;\n align-items: center;\n\n & svg:first-of-type {\n margin-bottom: -1.5px;\n }\n & svg:last-of-type {\n margin-top: -1.5px;\n }\n"
|
|
33820
33818
|
]);
|
|
33821
|
-
_templateObject5 = function _templateObject() {
|
|
33819
|
+
_templateObject5$1 = function _templateObject() {
|
|
33822
33820
|
return data;
|
|
33823
33821
|
};
|
|
33824
33822
|
return data;
|
|
@@ -33826,9 +33824,9 @@ function _templateObject5() {
|
|
|
33826
33824
|
var StyledHeader = styled.thead(_templateObject$4());
|
|
33827
33825
|
var Th = styled(Typography)(_templateObject1$4(), spacing(1), neutral100, neutral300);
|
|
33828
33826
|
var HeaderContent = styled.div(_templateObject2$4());
|
|
33829
|
-
var ResizeHandleContainer = styled.div(_templateObject3$
|
|
33830
|
-
var ResizeHandle = styled.div(_templateObject4$
|
|
33831
|
-
var SortIcon = styled.span(_templateObject5(), spacing(1));
|
|
33827
|
+
var ResizeHandleContainer = styled.div(_templateObject3$3());
|
|
33828
|
+
var ResizeHandle = styled.div(_templateObject4$3(), neutral300);
|
|
33829
|
+
var SortIcon = styled.span(_templateObject5$1(), spacing(1));
|
|
33832
33830
|
var TableHeader = function(param) {
|
|
33833
33831
|
var table = param.table, disableControls = param.disableControls, dense = param.dense, _param_testId = param.testId, testId = _param_testId === void 0 ? 'table' : _param_testId;
|
|
33834
33832
|
return /*#__PURE__*/ jsx(StyledHeader, {
|
|
@@ -33846,9 +33844,9 @@ var TableHeader = function(param) {
|
|
|
33846
33844
|
variant: "paragraph200Semibold",
|
|
33847
33845
|
as: "th",
|
|
33848
33846
|
style: {
|
|
33849
|
-
width:
|
|
33850
|
-
minWidth:
|
|
33851
|
-
maxWidth:
|
|
33847
|
+
width: autoWidth ? 'auto' : "".concat(header.getSize(), "px"),
|
|
33848
|
+
minWidth: autoWidth ? 'auto' : undefined,
|
|
33849
|
+
maxWidth: autoWidth ? 'auto' : undefined,
|
|
33852
33850
|
padding: dense ? "".concat(spacing(1), "px ").concat(spacing(header.id === 'row-select' ? 1 : 1.5), "px") : "".concat(spacing(1.5), "px ").concat(spacing(header.id === 'row-select' ? 1 : 1.5), "px")
|
|
33853
33851
|
},
|
|
33854
33852
|
children: [
|
|
@@ -33932,12 +33930,50 @@ function _templateObject2$3() {
|
|
|
33932
33930
|
};
|
|
33933
33931
|
return data;
|
|
33934
33932
|
}
|
|
33935
|
-
function _templateObject3$
|
|
33933
|
+
function _templateObject3$2() {
|
|
33934
|
+
var data = _tagged_template_literal$3([
|
|
33935
|
+
"\n white-space: normal;\n word-break: break-word;\n overflow-wrap: break-word;\n "
|
|
33936
|
+
]);
|
|
33937
|
+
_templateObject3$2 = function _templateObject() {
|
|
33938
|
+
return data;
|
|
33939
|
+
};
|
|
33940
|
+
return data;
|
|
33941
|
+
}
|
|
33942
|
+
function _templateObject4$2() {
|
|
33943
|
+
var data = _tagged_template_literal$3([
|
|
33944
|
+
"\n white-space: normal;\n "
|
|
33945
|
+
]);
|
|
33946
|
+
_templateObject4$2 = function _templateObject() {
|
|
33947
|
+
return data;
|
|
33948
|
+
};
|
|
33949
|
+
return data;
|
|
33950
|
+
}
|
|
33951
|
+
function _templateObject5() {
|
|
33952
|
+
var data = _tagged_template_literal$3([
|
|
33953
|
+
"\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n "
|
|
33954
|
+
]);
|
|
33955
|
+
_templateObject5 = function _templateObject() {
|
|
33956
|
+
return data;
|
|
33957
|
+
};
|
|
33958
|
+
return data;
|
|
33959
|
+
}
|
|
33960
|
+
function _templateObject6() {
|
|
33936
33961
|
var data = _tagged_template_literal$3([
|
|
33937
33962
|
"\n border-bottom: 1px solid ",
|
|
33938
|
-
";\n
|
|
33963
|
+
";\n\n ",
|
|
33964
|
+
"\n"
|
|
33939
33965
|
]);
|
|
33940
|
-
|
|
33966
|
+
_templateObject6 = function _templateObject() {
|
|
33967
|
+
return data;
|
|
33968
|
+
};
|
|
33969
|
+
return data;
|
|
33970
|
+
}
|
|
33971
|
+
function _templateObject7() {
|
|
33972
|
+
var data = _tagged_template_literal$3([
|
|
33973
|
+
"\n display: -webkit-box;\n -webkit-line-clamp: ",
|
|
33974
|
+
";\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n word-break: break-word;\n"
|
|
33975
|
+
]);
|
|
33976
|
+
_templateObject7 = function _templateObject() {
|
|
33941
33977
|
return data;
|
|
33942
33978
|
};
|
|
33943
33979
|
return data;
|
|
@@ -33946,15 +33982,28 @@ var StyledTableBody = styled.tbody(_templateObject$3());
|
|
|
33946
33982
|
var Tr = styled.tr(_templateObject2$3(), function(props) {
|
|
33947
33983
|
return props.enableHover && css(_templateObject1$3(), props.disabled ? neutral100 : primary100);
|
|
33948
33984
|
});
|
|
33949
|
-
var Td = styled(Typography)(
|
|
33985
|
+
var Td = styled(Typography)(_templateObject6(), neutral300, function(props) {
|
|
33986
|
+
var overflow = props.cellOverflow || 'truncate';
|
|
33987
|
+
if (overflow === 'wrap') {
|
|
33988
|
+
return css(_templateObject3$2());
|
|
33989
|
+
}
|
|
33990
|
+
if (overflow === 'clamp') {
|
|
33991
|
+
// For clamp, don't apply display styles to td - content wrapper will handle it
|
|
33992
|
+
return css(_templateObject4$2());
|
|
33993
|
+
}
|
|
33994
|
+
// Default: truncate
|
|
33995
|
+
return css(_templateObject5());
|
|
33996
|
+
});
|
|
33997
|
+
var ClampWrapper = styled.div(_templateObject7(), function(props) {
|
|
33998
|
+
return props.maxLines;
|
|
33999
|
+
});
|
|
33950
34000
|
var TableBody = function(param) {
|
|
33951
|
-
var table = param.table,
|
|
34001
|
+
var table = param.table, enableRowSelection = param.enableRowSelection, onRowClick = param.onRowClick, getRowDisabled = param.getRowDisabled, dense = param.dense, _param_testId = param.testId, testId = _param_testId === void 0 ? 'table' : _param_testId;
|
|
33952
34002
|
return /*#__PURE__*/ jsxs(StyledTableBody, {
|
|
33953
34003
|
children: [
|
|
33954
34004
|
/*#__PURE__*/ jsx("colgroup", {
|
|
33955
|
-
children:
|
|
33956
|
-
|
|
33957
|
-
return /*#__PURE__*/ jsx("col", {}, id);
|
|
34005
|
+
children: table.getAllColumns().map(function(column) {
|
|
34006
|
+
return /*#__PURE__*/ jsx("col", {}, column.id);
|
|
33958
34007
|
})
|
|
33959
34008
|
}),
|
|
33960
34009
|
table.getRowModel().rows.map(function(row) {
|
|
@@ -33974,15 +34023,24 @@ var TableBody = function(param) {
|
|
|
33974
34023
|
"data-testid": "".concat(testId, "-row-").concat(row.id),
|
|
33975
34024
|
children: row.getVisibleCells().map(function(cell) {
|
|
33976
34025
|
var cellValue = cell.getValue();
|
|
34026
|
+
var columnDef = cell.column.columnDef;
|
|
34027
|
+
var overflow = columnDef.overflow;
|
|
34028
|
+
var maxLines = columnDef.maxLines;
|
|
34029
|
+
var autoWidth = columnDef.autoWidth;
|
|
34030
|
+
var cellContent = flexRender(cell.column.columnDef.cell, cell.getContext());
|
|
33977
34031
|
return /*#__PURE__*/ jsx(Td, {
|
|
33978
34032
|
variant: "paragraph200Regular",
|
|
33979
34033
|
as: "td",
|
|
33980
34034
|
title: typeof cellValue === 'string' ? cellValue : undefined,
|
|
34035
|
+
cellOverflow: overflow,
|
|
33981
34036
|
style: {
|
|
33982
|
-
width: "".concat(cell.column.getSize(), "px"),
|
|
34037
|
+
width: autoWidth ? 'auto' : "".concat(cell.column.getSize(), "px"),
|
|
33983
34038
|
padding: dense ? "".concat(spacing(1), "px ").concat(spacing(cell.column.id === 'row-select' ? 1 : 1.5), "px") : "".concat(spacing(1.5), "px ").concat(spacing(cell.column.id === 'row-select' ? 1 : 1.5), "px")
|
|
33984
34039
|
},
|
|
33985
|
-
children:
|
|
34040
|
+
children: overflow === 'clamp' && maxLines ? /*#__PURE__*/ jsx(ClampWrapper, {
|
|
34041
|
+
maxLines: maxLines,
|
|
34042
|
+
children: cellContent
|
|
34043
|
+
}) : cellContent
|
|
33986
34044
|
}, cell.id);
|
|
33987
34045
|
})
|
|
33988
34046
|
}, row.id);
|
|
@@ -34155,11 +34213,32 @@ function _templateObject1$2() {
|
|
|
34155
34213
|
return data;
|
|
34156
34214
|
}
|
|
34157
34215
|
function _templateObject2$2() {
|
|
34216
|
+
var data = _tagged_template_literal$2([
|
|
34217
|
+
"\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0 0 ",
|
|
34218
|
+
"px 0;\n gap: ",
|
|
34219
|
+
"px;\n\n @media (max-width: 768px) {\n flex-direction: column;\n align-items: stretch;\n }\n"
|
|
34220
|
+
]);
|
|
34221
|
+
_templateObject2$2 = function _templateObject() {
|
|
34222
|
+
return data;
|
|
34223
|
+
};
|
|
34224
|
+
return data;
|
|
34225
|
+
}
|
|
34226
|
+
function _templateObject3$1() {
|
|
34227
|
+
var data = _tagged_template_literal$2([
|
|
34228
|
+
"\n display: flex;\n gap: ",
|
|
34229
|
+
"px;\n align-items: center;\n"
|
|
34230
|
+
]);
|
|
34231
|
+
_templateObject3$1 = function _templateObject() {
|
|
34232
|
+
return data;
|
|
34233
|
+
};
|
|
34234
|
+
return data;
|
|
34235
|
+
}
|
|
34236
|
+
function _templateObject4$1() {
|
|
34158
34237
|
var data = _tagged_template_literal$2([
|
|
34159
34238
|
"\n display: flex;\n align-items: center;\n justify-content: center;\n padding: ",
|
|
34160
34239
|
"px;\n background: none;\n font-size: 20px;\n"
|
|
34161
34240
|
]);
|
|
34162
|
-
|
|
34241
|
+
_templateObject4$1 = function _templateObject() {
|
|
34163
34242
|
return data;
|
|
34164
34243
|
};
|
|
34165
34244
|
return data;
|
|
@@ -34170,27 +34249,29 @@ var TableContainer = styled(/*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
34170
34249
|
}));
|
|
34171
34250
|
}))(_templateObject$2(), neutral300, spacing(1));
|
|
34172
34251
|
var TableWrapper = styled.table(_templateObject1$2());
|
|
34173
|
-
var
|
|
34252
|
+
var TopBar = styled.div(_templateObject2$2(), spacing(2), spacing(2));
|
|
34253
|
+
var TopBarElement = styled.div(_templateObject3$1(), spacing(1));
|
|
34254
|
+
var ContextMenuButton = styled(Button)(_templateObject4$1(), spacing(0.5));
|
|
34174
34255
|
var Table = function(param) {
|
|
34175
|
-
var columns = param.columns, _param_data = param.data, data = _param_data === void 0 ? [] : _param_data, getRowId = param.getRowId, _param_isLoading = param.isLoading, isLoading = _param_isLoading === void 0 ? false : _param_isLoading, _param_paginationMode = param.paginationMode, paginationMode = _param_paginationMode === void 0 ? 'page' : _param_paginationMode, pageInfo = param.pageInfo, subText = param.subText, onPageSizeChange = param.onPageSizeChange, onPageChange = param.onPageChange, sortBy = param.sortBy, sortOrder = param.sortOrder, onSortChange = param.onSortChange, _param_enableRowSelection = param.enableRowSelection, enableRowSelection = _param_enableRowSelection === void 0 ? false : _param_enableRowSelection, _param_selectedRows = param.selectedRows, selectedRows = _param_selectedRows === void 0 ? {} : _param_selectedRows, onRowSelectionChange = param.onRowSelectionChange, getRowDisabled = param.getRowDisabled, onRowClick = param.onRowClick, contextMenuActions = param.contextMenuActions, _param_dense = param.dense, dense = _param_dense === void 0 ? false : _param_dense, height = param.height, containerStyle = param.containerStyle, error = param.error, _param_testId = param.testId, testId = _param_testId === void 0 ? 'table' : _param_testId;
|
|
34256
|
+
var columns = param.columns, _param_data = param.data, data = _param_data === void 0 ? [] : _param_data, getRowId = param.getRowId, _param_isLoading = param.isLoading, isLoading = _param_isLoading === void 0 ? false : _param_isLoading, _param_paginationMode = param.paginationMode, paginationMode = _param_paginationMode === void 0 ? 'page' : _param_paginationMode, pageInfo = param.pageInfo, subText = param.subText, onPageSizeChange = param.onPageSizeChange, onPageChange = param.onPageChange, sortBy = param.sortBy, sortOrder = param.sortOrder, onSortChange = param.onSortChange, _param_enableRowSelection = param.enableRowSelection, enableRowSelection = _param_enableRowSelection === void 0 ? false : _param_enableRowSelection, _param_selectedRows = param.selectedRows, selectedRows = _param_selectedRows === void 0 ? {} : _param_selectedRows, onRowSelectionChange = param.onRowSelectionChange, getRowDisabled = param.getRowDisabled, onRowClick = param.onRowClick, contextMenuActions = param.contextMenuActions, _param_dense = param.dense, dense = _param_dense === void 0 ? false : _param_dense, height = param.height, containerStyle = param.containerStyle, error = param.error, _param_testId = param.testId, testId = _param_testId === void 0 ? 'table' : _param_testId, toolbar = param.toolbar;
|
|
34176
34257
|
var containerRef = useRef(null);
|
|
34177
34258
|
var ctxMenuAnchorRef = useRef(null);
|
|
34178
34259
|
var _useState = _sliced_to_array$1(useState({}), 2), columnSizing = _useState[0], setColumnSizing = _useState[1];
|
|
34179
34260
|
var _useState1 = _sliced_to_array$1(useState(null), 2), ctxMenuRow = _useState1[0], setCtxMenuRow = _useState1[1];
|
|
34180
34261
|
var disableControls = isLoading || !(data === null || data === void 0 ? void 0 : data.length) || !!error;
|
|
34181
34262
|
var hasSomePageProps = !!(pageInfo || onPageSizeChange || onPageChange);
|
|
34182
|
-
var
|
|
34183
|
-
if (hasSomePageProps && !
|
|
34184
|
-
console.warn('Table: Pagination requires
|
|
34263
|
+
var hasPaginationHandlers = !!(onPageSizeChange && onPageChange);
|
|
34264
|
+
if (hasSomePageProps && !hasPaginationHandlers) {
|
|
34265
|
+
console.warn('Table: Pagination requires both onPageSizeChange and onPageChange handlers to be provided');
|
|
34185
34266
|
}
|
|
34186
34267
|
var tableColumns = useMemo(function() {
|
|
34187
34268
|
return columns.map(function(col) {
|
|
34188
34269
|
return _object_spread$2({
|
|
34189
34270
|
id: col.key,
|
|
34190
34271
|
accessorKey: col.key,
|
|
34191
|
-
size: col.width,
|
|
34192
34272
|
accessorFn: col.getter,
|
|
34193
|
-
enableSorting: col.sortable
|
|
34273
|
+
enableSorting: col.sortable,
|
|
34274
|
+
enableResizing: !col.autoWidth
|
|
34194
34275
|
}, col);
|
|
34195
34276
|
});
|
|
34196
34277
|
}, [
|
|
@@ -34311,8 +34392,6 @@ var Table = function(param) {
|
|
|
34311
34392
|
columns: allColumns,
|
|
34312
34393
|
getRowId: getRowId,
|
|
34313
34394
|
defaultColumn: {
|
|
34314
|
-
minSize: 100,
|
|
34315
|
-
maxSize: 500,
|
|
34316
34395
|
size: 200,
|
|
34317
34396
|
sortDescFirst: false
|
|
34318
34397
|
},
|
|
@@ -34339,14 +34418,51 @@ var Table = function(param) {
|
|
|
34339
34418
|
onColumnSizingChange: setColumnSizing,
|
|
34340
34419
|
columnResizeMode: 'onChange'
|
|
34341
34420
|
});
|
|
34342
|
-
var
|
|
34343
|
-
return {
|
|
34344
|
-
id: column.id,
|
|
34345
|
-
width: column.getSize()
|
|
34346
|
-
};
|
|
34347
|
-
});
|
|
34421
|
+
var showTopBar = hasPaginationHandlers || toolbar;
|
|
34348
34422
|
return /*#__PURE__*/ jsxs("div", {
|
|
34349
34423
|
children: [
|
|
34424
|
+
showTopBar && /*#__PURE__*/ jsxs(TopBar, {
|
|
34425
|
+
children: [
|
|
34426
|
+
/*#__PURE__*/ jsx("div", {
|
|
34427
|
+
children: Array.isArray(toolbar) ? /*#__PURE__*/ jsx(TopBarElement, {
|
|
34428
|
+
children: toolbar.map(function(item, i) {
|
|
34429
|
+
return /*#__PURE__*/ jsx(Fragment$1, {
|
|
34430
|
+
children: item
|
|
34431
|
+
}, i);
|
|
34432
|
+
})
|
|
34433
|
+
}) : toolbar
|
|
34434
|
+
}),
|
|
34435
|
+
hasPaginationHandlers && pageInfo && (paginationMode === 'page' && pageInfo && 'currentPage' in pageInfo ? /*#__PURE__*/ jsx(Pagination, {
|
|
34436
|
+
mode: "page",
|
|
34437
|
+
pageInfo: pageInfo,
|
|
34438
|
+
subText: subText,
|
|
34439
|
+
isLoading: isLoading,
|
|
34440
|
+
onPageSizeChange: function(size) {
|
|
34441
|
+
resetContainerScroll();
|
|
34442
|
+
onPageSizeChange(size);
|
|
34443
|
+
},
|
|
34444
|
+
onPageChange: function(page) {
|
|
34445
|
+
resetContainerScroll();
|
|
34446
|
+
onPageChange(page);
|
|
34447
|
+
},
|
|
34448
|
+
testId: "".concat(testId, "-pagination")
|
|
34449
|
+
}) : /*#__PURE__*/ jsx(Pagination, {
|
|
34450
|
+
mode: "cursor",
|
|
34451
|
+
pageInfo: pageInfo,
|
|
34452
|
+
subText: subText,
|
|
34453
|
+
isLoading: isLoading,
|
|
34454
|
+
onPageSizeChange: function(size) {
|
|
34455
|
+
resetContainerScroll();
|
|
34456
|
+
onPageSizeChange(size);
|
|
34457
|
+
},
|
|
34458
|
+
onPageChange: function(page) {
|
|
34459
|
+
resetContainerScroll();
|
|
34460
|
+
onPageChange(page);
|
|
34461
|
+
},
|
|
34462
|
+
testId: "".concat(testId, "-pagination")
|
|
34463
|
+
}))
|
|
34464
|
+
]
|
|
34465
|
+
}),
|
|
34350
34466
|
/*#__PURE__*/ jsxs("div", {
|
|
34351
34467
|
style: {
|
|
34352
34468
|
position: 'relative',
|
|
@@ -34375,14 +34491,12 @@ var Table = function(param) {
|
|
|
34375
34491
|
children: [
|
|
34376
34492
|
/*#__PURE__*/ jsx(TableHeader, {
|
|
34377
34493
|
table: table,
|
|
34378
|
-
columnWidths: columnWidths,
|
|
34379
34494
|
disableControls: disableControls,
|
|
34380
34495
|
dense: dense,
|
|
34381
34496
|
testId: testId
|
|
34382
34497
|
}),
|
|
34383
34498
|
/*#__PURE__*/ jsx(TableBody, {
|
|
34384
34499
|
table: table,
|
|
34385
|
-
columnWidths: columnWidths,
|
|
34386
34500
|
enableRowSelection: enableRowSelection,
|
|
34387
34501
|
onRowClick: onRowClick,
|
|
34388
34502
|
getRowDisabled: getRowDisabled,
|
|
@@ -34396,35 +34510,6 @@ var Table = function(param) {
|
|
|
34396
34510
|
isLoading && /*#__PURE__*/ jsx(LoadingOverlay, {})
|
|
34397
34511
|
]
|
|
34398
34512
|
}),
|
|
34399
|
-
onPageSizeChange && onPageChange && pageInfo && (paginationMode === 'page' && 'currentPage' in pageInfo ? /*#__PURE__*/ jsx(Pagination, {
|
|
34400
|
-
mode: "page",
|
|
34401
|
-
pageInfo: pageInfo,
|
|
34402
|
-
subText: subText,
|
|
34403
|
-
isLoading: isLoading,
|
|
34404
|
-
onPageSizeChange: function(size) {
|
|
34405
|
-
resetContainerScroll();
|
|
34406
|
-
onPageSizeChange(size);
|
|
34407
|
-
},
|
|
34408
|
-
onPageChange: function(page) {
|
|
34409
|
-
resetContainerScroll();
|
|
34410
|
-
onPageChange(page);
|
|
34411
|
-
},
|
|
34412
|
-
testId: "".concat(testId, "-pagination")
|
|
34413
|
-
}) : /*#__PURE__*/ jsx(Pagination, {
|
|
34414
|
-
mode: "cursor",
|
|
34415
|
-
pageInfo: pageInfo,
|
|
34416
|
-
subText: subText,
|
|
34417
|
-
isLoading: isLoading,
|
|
34418
|
-
onPageSizeChange: function(size) {
|
|
34419
|
-
resetContainerScroll();
|
|
34420
|
-
onPageSizeChange(size);
|
|
34421
|
-
},
|
|
34422
|
-
onPageChange: function(page) {
|
|
34423
|
-
resetContainerScroll();
|
|
34424
|
-
onPageChange(page);
|
|
34425
|
-
},
|
|
34426
|
-
testId: "".concat(testId, "-pagination")
|
|
34427
|
-
})),
|
|
34428
34513
|
/*#__PURE__*/ jsx(RowContextMenu, {
|
|
34429
34514
|
anchorRef: ctxMenuAnchorRef,
|
|
34430
34515
|
actions: contextMenuActions,
|
package/package.json
CHANGED
package/src/lib/Table/Table.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { CSSProperties, HTMLProps } from 'react';
|
|
1
|
+
import { CSSProperties, HTMLProps, ReactNode } from 'react';
|
|
2
2
|
import { ColumnDef, OnChangeFn, Row } from '@tanstack/react-table';
|
|
3
3
|
import { PageInfoPageBased, PageInfoCursorBased } from '../Pagination/Pagination';
|
|
4
|
+
export type CellOverflow = 'truncate' | 'wrap' | 'clamp';
|
|
4
5
|
export declare const TableContainer: import("@emotion/styled").StyledComponent<Omit<HTMLProps<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement> & {
|
|
5
6
|
theme?: import("@emotion/react").Theme;
|
|
6
7
|
}, {}, {}>;
|
|
@@ -8,17 +9,14 @@ export declare const TableWrapper: import("@emotion/styled").StyledComponent<{
|
|
|
8
9
|
theme?: import("@emotion/react").Theme;
|
|
9
10
|
as?: React.ElementType;
|
|
10
11
|
}, import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, {}>;
|
|
11
|
-
export interface ColumnWidth {
|
|
12
|
-
id: string;
|
|
13
|
-
width: number;
|
|
14
|
-
}
|
|
15
12
|
export type TableColumn<T> = ColumnDef<T> & {
|
|
16
13
|
key: string;
|
|
17
14
|
header: string;
|
|
18
|
-
width?: number;
|
|
19
15
|
sortable?: boolean;
|
|
20
16
|
getter?: () => unknown;
|
|
21
17
|
autoWidth?: boolean;
|
|
18
|
+
overflow?: CellOverflow;
|
|
19
|
+
maxLines?: number;
|
|
22
20
|
};
|
|
23
21
|
export interface RowSelectState {
|
|
24
22
|
[x: string]: boolean;
|
|
@@ -59,8 +57,9 @@ interface TableDataProps<T> {
|
|
|
59
57
|
sortOrder?: string;
|
|
60
58
|
onSortChange?: (sortBy: string, sortOrder: string) => void;
|
|
61
59
|
error?: string;
|
|
60
|
+
toolbar?: ReactNode | ReactNode[];
|
|
62
61
|
}
|
|
63
62
|
export interface TableProps<T extends object> extends TableStyleProps, TableRowProps<T>, TableDataProps<T>, PaginationProps {
|
|
64
63
|
}
|
|
65
|
-
export declare const Table: <T extends object>({ columns, data, getRowId, isLoading, paginationMode, pageInfo, subText, onPageSizeChange, onPageChange, sortBy, sortOrder, onSortChange, enableRowSelection, selectedRows, onRowSelectionChange, getRowDisabled, onRowClick, contextMenuActions, dense, height, containerStyle, error, testId, }: TableProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
64
|
+
export declare const Table: <T extends object>({ columns, data, getRowId, isLoading, paginationMode, pageInfo, subText, onPageSizeChange, onPageChange, sortBy, sortOrder, onSortChange, enableRowSelection, selectedRows, onRowSelectionChange, getRowDisabled, onRowClick, contextMenuActions, dense, height, containerStyle, error, testId, toolbar, }: TableProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
66
65
|
export {};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Table } from '@tanstack/react-table';
|
|
2
|
-
import { ColumnWidth } from './Table';
|
|
3
2
|
interface TableBodyProps<T extends object> {
|
|
4
3
|
table: Table<T>;
|
|
5
|
-
columnWidths: ColumnWidth[];
|
|
6
4
|
enableRowSelection?: boolean;
|
|
7
5
|
onRowClick?: (row: T) => void;
|
|
8
6
|
title?: string;
|
|
@@ -10,5 +8,5 @@ interface TableBodyProps<T extends object> {
|
|
|
10
8
|
getRowDisabled?: (row: T) => boolean;
|
|
11
9
|
testId?: string;
|
|
12
10
|
}
|
|
13
|
-
export declare const TableBody: <T extends object>({ table,
|
|
11
|
+
export declare const TableBody: <T extends object>({ table, enableRowSelection, onRowClick, getRowDisabled, dense, testId, }: TableBodyProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
14
12
|
export {};
|