@onesy/ui-react 1.0.138 → 1.0.140
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/Properties/Properties.d.ts +1 -1
- package/Properties/Properties.js +1 -1
- package/Property/Property.d.ts +1 -1
- package/Property/Property.js +18 -2
- package/TableCell/TableCell.js +5 -1
- package/esm/Properties/Properties.js +1 -1
- package/esm/Property/Property.js +18 -2
- package/esm/TableCell/TableCell.js +5 -1
- package/esm/index.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ export type IPropertiesValue = {
|
|
|
8
8
|
props?: any;
|
|
9
9
|
};
|
|
10
10
|
export type IProperties = ILine & {
|
|
11
|
-
version?: 'row' | 'row-20' | 'row-50' | 'row-between' | 'column';
|
|
11
|
+
version?: 'row' | 'row-20' | 'row-30' | 'row-40' | 'row-50' | 'row-between' | 'column';
|
|
12
12
|
values?: (boolean | IPropertiesValue)[];
|
|
13
13
|
onlyWithValues?: boolean;
|
|
14
14
|
maxWidth?: 'extra_small' | 'small' | 'regular' | 'large' | 'extra_large' | 'extra_extra_large';
|
package/Properties/Properties.js
CHANGED
|
@@ -55,7 +55,7 @@ const Properties = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
55
55
|
return (theme === null || theme === void 0 || (_theme$elements2 = theme.elements) === null || _theme$elements2 === void 0 ? void 0 : _theme$elements2.Property) || _Property.default;
|
|
56
56
|
}, [theme]);
|
|
57
57
|
const {
|
|
58
|
-
version = 'row-
|
|
58
|
+
version = 'row-30',
|
|
59
59
|
size = 'regular',
|
|
60
60
|
values = [],
|
|
61
61
|
onlyWithValues = true,
|
package/Property/Property.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export type IProperty = ILine & {
|
|
|
5
5
|
name?: any;
|
|
6
6
|
value?: any;
|
|
7
7
|
separator?: any;
|
|
8
|
-
version?: 'row' | 'row-20' | 'row-50' | 'row-between' | 'column';
|
|
8
|
+
version?: 'row' | 'row-20' | 'row-30' | 'row-40' | 'row-50' | 'row-between' | 'column';
|
|
9
9
|
size?: 'small' | 'regular' | 'large';
|
|
10
10
|
responsive?: boolean;
|
|
11
11
|
mediaQuery?: string;
|
package/Property/Property.js
CHANGED
|
@@ -33,6 +33,22 @@ const useStyle = (0, _styleReact.style)(theme => ({
|
|
|
33
33
|
flex: '1 1 80%'
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
+
'version_row-30': {
|
|
37
|
+
'& > *:first-child': {
|
|
38
|
+
flex: '1 1 30%'
|
|
39
|
+
},
|
|
40
|
+
'& > *:last-child': {
|
|
41
|
+
flex: '1 1 70%'
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
'version_row-40': {
|
|
45
|
+
'& > *:first-child': {
|
|
46
|
+
flex: '1 1 40%'
|
|
47
|
+
},
|
|
48
|
+
'& > *:last-child': {
|
|
49
|
+
flex: '1 1 60%'
|
|
50
|
+
}
|
|
51
|
+
},
|
|
36
52
|
text: {
|
|
37
53
|
wordBreak: 'break-word'
|
|
38
54
|
}
|
|
@@ -54,7 +70,7 @@ const Property = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
54
70
|
return (theme === null || theme === void 0 || (_theme$elements2 = theme.elements) === null || _theme$elements2 === void 0 ? void 0 : _theme$elements2.Type) || _Type.default;
|
|
55
71
|
}, [theme]);
|
|
56
72
|
const {
|
|
57
|
-
version: version_ = 'row-
|
|
73
|
+
version: version_ = 'row-30',
|
|
58
74
|
size = 'regular',
|
|
59
75
|
name,
|
|
60
76
|
value: value_,
|
|
@@ -96,7 +112,7 @@ const Property = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
96
112
|
}
|
|
97
113
|
if (version === 'row') {
|
|
98
114
|
propsRoot.justify = 'flex-start';
|
|
99
|
-
} else if (['row-20', 'row-50', 'row-between'].includes(version)) {
|
|
115
|
+
} else if (['row-20', 'row-30', 'row-40', 'row-50', 'row-between'].includes(version)) {
|
|
100
116
|
propsRoot.justify = 'space-between';
|
|
101
117
|
}
|
|
102
118
|
return /*#__PURE__*/_react.default.createElement(Line, (0, _extends2.default)({
|
package/TableCell/TableCell.js
CHANGED
|
@@ -216,9 +216,10 @@ const TableCell = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
216
216
|
_react.default.useEffect(() => {
|
|
217
217
|
if (sticky) {
|
|
218
218
|
if (root) {
|
|
219
|
+
let offsetOriginal = root.offsetLeft;
|
|
219
220
|
const parentOverflow = (0, _utils2.getOverflowParent)(root.parentElement, false);
|
|
220
221
|
root.style.position = 'unset';
|
|
221
|
-
|
|
222
|
+
offsetOriginal = root.offsetLeft;
|
|
222
223
|
root.style.position = 'sticky';
|
|
223
224
|
const method = () => {
|
|
224
225
|
const offsetNew = root.offsetLeft;
|
|
@@ -228,6 +229,9 @@ const TableCell = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
228
229
|
// initial
|
|
229
230
|
method();
|
|
230
231
|
setTimeout(() => {
|
|
232
|
+
root.style.position = 'unset';
|
|
233
|
+
offsetOriginal = root.offsetLeft;
|
|
234
|
+
root.style.position = 'sticky';
|
|
231
235
|
method();
|
|
232
236
|
}, 150);
|
|
233
237
|
if (parentOverflow) {
|
|
@@ -38,7 +38,7 @@ const Properties = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
38
38
|
const Line = React.useMemo(() => theme?.elements?.Line || LineElement, [theme]);
|
|
39
39
|
const Property = React.useMemo(() => theme?.elements?.Property || PropertyElement, [theme]);
|
|
40
40
|
const {
|
|
41
|
-
version = 'row-
|
|
41
|
+
version = 'row-30',
|
|
42
42
|
size = 'regular',
|
|
43
43
|
values = [],
|
|
44
44
|
onlyWithValues = true,
|
package/esm/Property/Property.js
CHANGED
|
@@ -26,6 +26,22 @@ const useStyle = styleMethod(theme => ({
|
|
|
26
26
|
flex: '1 1 80%'
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
|
+
'version_row-30': {
|
|
30
|
+
'& > *:first-child': {
|
|
31
|
+
flex: '1 1 30%'
|
|
32
|
+
},
|
|
33
|
+
'& > *:last-child': {
|
|
34
|
+
flex: '1 1 70%'
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
'version_row-40': {
|
|
38
|
+
'& > *:first-child': {
|
|
39
|
+
flex: '1 1 40%'
|
|
40
|
+
},
|
|
41
|
+
'& > *:last-child': {
|
|
42
|
+
flex: '1 1 60%'
|
|
43
|
+
}
|
|
44
|
+
},
|
|
29
45
|
text: {
|
|
30
46
|
wordBreak: 'break-word'
|
|
31
47
|
}
|
|
@@ -38,7 +54,7 @@ const Property = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
38
54
|
const Line = React.useMemo(() => theme?.elements?.Line || LineElement, [theme]);
|
|
39
55
|
const Type = React.useMemo(() => theme?.elements?.Type || TypeElement, [theme]);
|
|
40
56
|
const {
|
|
41
|
-
version: version_ = 'row-
|
|
57
|
+
version: version_ = 'row-30',
|
|
42
58
|
size = 'regular',
|
|
43
59
|
name,
|
|
44
60
|
value: value_,
|
|
@@ -80,7 +96,7 @@ const Property = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
80
96
|
}
|
|
81
97
|
if (version === 'row') {
|
|
82
98
|
propsRoot.justify = 'flex-start';
|
|
83
|
-
} else if (['row-20', 'row-50', 'row-between'].includes(version)) {
|
|
99
|
+
} else if (['row-20', 'row-30', 'row-40', 'row-50', 'row-between'].includes(version)) {
|
|
84
100
|
propsRoot.justify = 'space-between';
|
|
85
101
|
}
|
|
86
102
|
return /*#__PURE__*/React.createElement(Line, _extends({
|
|
@@ -193,9 +193,10 @@ const TableCell = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
193
193
|
React.useEffect(() => {
|
|
194
194
|
if (sticky) {
|
|
195
195
|
if (root) {
|
|
196
|
+
let offsetOriginal = root.offsetLeft;
|
|
196
197
|
const parentOverflow = getOverflowParent(root.parentElement, false);
|
|
197
198
|
root.style.position = 'unset';
|
|
198
|
-
|
|
199
|
+
offsetOriginal = root.offsetLeft;
|
|
199
200
|
root.style.position = 'sticky';
|
|
200
201
|
const method = () => {
|
|
201
202
|
const offsetNew = root.offsetLeft;
|
|
@@ -205,6 +206,9 @@ const TableCell = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
205
206
|
// initial
|
|
206
207
|
method();
|
|
207
208
|
setTimeout(() => {
|
|
209
|
+
root.style.position = 'unset';
|
|
210
|
+
offsetOriginal = root.offsetLeft;
|
|
211
|
+
root.style.position = 'sticky';
|
|
208
212
|
method();
|
|
209
213
|
}, 150);
|
|
210
214
|
if (parentOverflow) {
|
package/esm/index.js
CHANGED
package/index.js
CHANGED