@spaced-out/ui-design-system 0.1.8 → 0.1.9
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/CHANGELOG.md +7 -0
- package/lib/components/SearchInput/SearchInput.js +2 -1
- package/lib/components/SearchInput/SearchInput.js.flow +5 -1
- package/lib/components/SearchInput/SearchInput.module.css +8 -8
- package/lib/components/Table/Row.js +6 -2
- package/lib/components/Table/Row.js.flow +2 -0
- package/lib/components/Table/TableHeader.js +3 -1
- package/lib/components/Table/TableHeader.js.flow +1 -0
- package/lib/components/Text/Text.js +3 -2
- package/lib/components/Text/Text.js.flow +3 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.1.9](https://github.com/spaced-out/ui-design-system/compare/v0.1.8...v0.1.9) (2023-04-05)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* search input loader and typeahead fixes ([67db0fe](https://github.com/spaced-out/ui-design-system/commit/67db0fe3ad41f6d8a40a7fc77fef835ae96cc668))
|
|
11
|
+
|
|
5
12
|
### [0.1.8](https://github.com/spaced-out/ui-design-system/compare/v0.1.7...v0.1.8) (2023-04-05)
|
|
6
13
|
|
|
7
14
|
|
|
@@ -53,7 +53,8 @@ const SearchInput = _ref => {
|
|
|
53
53
|
})
|
|
54
54
|
}, /*#__PURE__*/React.createElement(_CircularLoader.CircularLoader, {
|
|
55
55
|
colorToken: "colorFillPrimary",
|
|
56
|
-
|
|
56
|
+
className: _SearchInputModule.default.loader,
|
|
57
|
+
size: "small"
|
|
57
58
|
})));
|
|
58
59
|
};
|
|
59
60
|
exports.SearchInput = SearchInput;
|
|
@@ -64,7 +64,11 @@ export const SearchInput = ({
|
|
|
64
64
|
[css.small]: size === 'small',
|
|
65
65
|
})}
|
|
66
66
|
>
|
|
67
|
-
<CircularLoader
|
|
67
|
+
<CircularLoader
|
|
68
|
+
colorToken="colorFillPrimary"
|
|
69
|
+
className={css.loader}
|
|
70
|
+
size="small"
|
|
71
|
+
/>
|
|
68
72
|
</div>
|
|
69
73
|
)}
|
|
70
74
|
</div>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@value (
|
|
2
|
-
colorTextPrimary
|
|
2
|
+
colorTextPrimary,
|
|
3
|
+
colorBackgroundTertiary
|
|
3
4
|
) from '../../styles/variables/_color.css';
|
|
4
5
|
|
|
5
6
|
@value (
|
|
@@ -7,15 +8,10 @@
|
|
|
7
8
|
size34
|
|
8
9
|
) from '../../styles/variables/_size.css';
|
|
9
10
|
|
|
10
|
-
@value (
|
|
11
|
-
spaceXXSmall
|
|
12
|
-
) from '../../styles/variables/_space.css';
|
|
13
|
-
|
|
14
11
|
.searchInputWrapper {
|
|
15
12
|
display: flex;
|
|
16
13
|
position: relative;
|
|
17
14
|
align-items: end;
|
|
18
|
-
gap: spaceXXSmall;
|
|
19
15
|
height: fit-content;
|
|
20
16
|
}
|
|
21
17
|
|
|
@@ -34,11 +30,15 @@
|
|
|
34
30
|
align-items: center;
|
|
35
31
|
justify-content: center;
|
|
36
32
|
align-items: center;
|
|
37
|
-
margin-
|
|
33
|
+
margin-left: calc(size42 * -1);
|
|
38
34
|
}
|
|
39
35
|
|
|
40
36
|
.loaderContainer.small {
|
|
41
37
|
height: size34;
|
|
42
38
|
width: size34;
|
|
43
|
-
margin-
|
|
39
|
+
margin-left: calc(size34 * -1);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.loader {
|
|
43
|
+
background-color: colorBackgroundTertiary;
|
|
44
44
|
}
|
|
@@ -77,7 +77,9 @@ function DefaultRow(_ref2) {
|
|
|
77
77
|
sticky
|
|
78
78
|
} = item;
|
|
79
79
|
const value = data[key];
|
|
80
|
-
return Renderer ? /*#__PURE__*/React.createElement(Renderer
|
|
80
|
+
return Renderer ? /*#__PURE__*/React.createElement(Renderer
|
|
81
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
82
|
+
, {
|
|
81
83
|
key: index,
|
|
82
84
|
data: data,
|
|
83
85
|
extras: extras,
|
|
@@ -85,7 +87,9 @@ function DefaultRow(_ref2) {
|
|
|
85
87
|
className: (0, _classify.default)({
|
|
86
88
|
[_TableModule.default.stickyCell]: sticky
|
|
87
89
|
})
|
|
88
|
-
}) : /*#__PURE__*/React.createElement(_Cell.SingleCell
|
|
90
|
+
}) : /*#__PURE__*/React.createElement(_Cell.SingleCell
|
|
91
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
92
|
+
, {
|
|
89
93
|
key: index,
|
|
90
94
|
title: String(value),
|
|
91
95
|
className: (0, _classify.default)(cellClassName, {
|
|
@@ -126,6 +126,7 @@ export function DefaultRow<T: GenericObject, U: GenericObject>({
|
|
|
126
126
|
const value = data[key];
|
|
127
127
|
return Renderer ? (
|
|
128
128
|
<Renderer
|
|
129
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
129
130
|
key={index}
|
|
130
131
|
data={data}
|
|
131
132
|
extras={extras}
|
|
@@ -134,6 +135,7 @@ export function DefaultRow<T: GenericObject, U: GenericObject>({
|
|
|
134
135
|
/>
|
|
135
136
|
) : (
|
|
136
137
|
<SingleCell
|
|
138
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
137
139
|
key={index}
|
|
138
140
|
title={String(value)}
|
|
139
141
|
className={classify(cellClassName, {[css.stickyCell]: sticky})}
|
|
@@ -100,7 +100,9 @@ function DefaultTableHeader(props) {
|
|
|
100
100
|
return /*#__PURE__*/React.createElement(BasicHeadCell, {
|
|
101
101
|
className: (0, _classify.default)({
|
|
102
102
|
[_TableModule.default.selectedHeader]: sortKey === key && columnSortDirection !== 'original'
|
|
103
|
-
}, headerClassName)
|
|
103
|
+
}, headerClassName)
|
|
104
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
105
|
+
,
|
|
104
106
|
key: index,
|
|
105
107
|
scope: "col",
|
|
106
108
|
onClick: headCellClickHandler
|
|
@@ -29,8 +29,9 @@ const HighlightText = _ref => {
|
|
|
29
29
|
highlights = (0, _string.escapeRegExp)(highlight);
|
|
30
30
|
}
|
|
31
31
|
const parts = text.split(new RegExp(`(${highlights})`, caseSensitiveHighlighting ? '' : 'gi')).filter(part => part !== '');
|
|
32
|
-
return /*#__PURE__*/React.createElement("span", null, parts.map(part => highlights.toLowerCase().includes((0, _string.escapeRegExp)(part).toLowerCase()) ? /*#__PURE__*/React.createElement("span", {
|
|
33
|
-
key
|
|
32
|
+
return /*#__PURE__*/React.createElement("span", null, parts.map((part, idx) => highlights.toLowerCase().includes((0, _string.escapeRegExp)(part).toLowerCase()) ? /*#__PURE__*/React.createElement("span", {
|
|
33
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
34
|
+
key: idx,
|
|
34
35
|
className: (0, _classify.default)(_typographyModule.default.highlightText, {
|
|
35
36
|
[_typographyModule.default.bgHighlighting]: highlightWithBackground
|
|
36
37
|
}, highlightClassName)
|
|
@@ -50,10 +50,11 @@ const HighlightText = ({
|
|
|
50
50
|
|
|
51
51
|
return (
|
|
52
52
|
<span>
|
|
53
|
-
{parts.map((part) =>
|
|
53
|
+
{parts.map((part, idx) =>
|
|
54
54
|
highlights.toLowerCase().includes(escapeRegExp(part).toLowerCase()) ? (
|
|
55
55
|
<span
|
|
56
|
-
key
|
|
56
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
57
|
+
key={idx}
|
|
57
58
|
className={classify(
|
|
58
59
|
css.highlightText,
|
|
59
60
|
{
|