@synerise/ds-list 0.7.6 → 0.7.7
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 +8 -0
- package/dist/Elements/Divider/Divider.js +1 -3
- package/dist/Elements/Divider/Divider.styles.js +2 -1
- package/dist/Elements/ItemWrapper/ItemWrapper.js +0 -2
- package/dist/Elements/ItemWrapper/ItemWrapper.styles.js +2 -1
- package/dist/Elements/Text/Text.js +7 -9
- package/dist/List.js +10 -35
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.7.7](https://github.com/Synerise/synerise-design/compare/@synerise/ds-list@0.7.6...@synerise/ds-list@0.7.7) (2024-11-28)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-list
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [0.7.6](https://github.com/Synerise/synerise-design/compare/@synerise/ds-list@0.7.5...@synerise/ds-list@0.7.6) (2024-11-21)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @synerise/ds-list
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Divider from '@synerise/ds-divider';
|
|
3
3
|
import * as S from './Divider.styles';
|
|
4
|
-
|
|
5
4
|
var ListDivider = function ListDivider(_ref) {
|
|
6
5
|
var _ref$dashed = _ref.dashed,
|
|
7
|
-
|
|
6
|
+
dashed = _ref$dashed === void 0 ? true : _ref$dashed;
|
|
8
7
|
return /*#__PURE__*/React.createElement(S.Wrapper, {
|
|
9
8
|
className: "ant-divider-wrapper"
|
|
10
9
|
}, /*#__PURE__*/React.createElement(Divider, {
|
|
@@ -13,5 +12,4 @@ var ListDivider = function ListDivider(_ref) {
|
|
|
13
12
|
marginTop: 8
|
|
14
13
|
}));
|
|
15
14
|
};
|
|
16
|
-
|
|
17
15
|
export default ListDivider;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
1
|
+
import styled from 'styled-components';
|
|
2
2
|
|
|
3
|
+
// eslint-disable-next-line import/prefer-default-export
|
|
3
4
|
export var Wrapper = styled.div.withConfig({
|
|
4
5
|
displayName: "Dividerstyles__Wrapper",
|
|
5
6
|
componentId: "sc-7qo69v-0"
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
1
|
+
import styled from 'styled-components';
|
|
2
2
|
|
|
3
|
+
// eslint-disable-next-line import/prefer-default-export
|
|
3
4
|
export var Wrapper = styled.div.withConfig({
|
|
4
5
|
displayName: "ItemWrapperstyles__Wrapper",
|
|
5
6
|
componentId: "sc-1fjxuxn-0"
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import * as S from './Text.styles';
|
|
3
|
-
|
|
4
3
|
var Text = function Text(_ref) {
|
|
5
4
|
var disabled = _ref.disabled,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
icon = _ref.icon,
|
|
6
|
+
onSelect = _ref.onSelect,
|
|
7
|
+
danger = _ref.danger,
|
|
8
|
+
actions = _ref.actions,
|
|
9
|
+
children = _ref.children,
|
|
10
|
+
_ref$size = _ref.size,
|
|
11
|
+
size = _ref$size === void 0 ? 'small' : _ref$size;
|
|
13
12
|
var onKeyUpHandler = useCallback(function (event) {
|
|
14
13
|
return event.nativeEvent.code === 'Space' && onSelect && onSelect(event);
|
|
15
14
|
}, [onSelect]);
|
|
@@ -25,5 +24,4 @@ var Text = function Text(_ref) {
|
|
|
25
24
|
icon: icon
|
|
26
25
|
}, children), /*#__PURE__*/React.createElement(S.ActionWraper, null, actions && actions));
|
|
27
26
|
};
|
|
28
|
-
|
|
29
27
|
export default Text;
|
package/dist/List.js
CHANGED
|
@@ -1,19 +1,11 @@
|
|
|
1
1
|
var _excluded = ["dataSource", "radio", "options", "dashed"];
|
|
2
|
-
|
|
3
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
-
|
|
5
3
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
|
-
|
|
7
4
|
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
|
8
|
-
|
|
9
5
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
10
|
-
|
|
11
6
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12
|
-
|
|
13
7
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
14
|
-
|
|
15
8
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
16
|
-
|
|
17
9
|
import React from 'react';
|
|
18
10
|
import { v4 as uuid } from 'uuid';
|
|
19
11
|
import '@synerise/ds-core/dist/js/style';
|
|
@@ -21,49 +13,39 @@ import Radio from '@synerise/ds-radio';
|
|
|
21
13
|
import AntdList from 'antd/lib/list';
|
|
22
14
|
import "./style/index.css";
|
|
23
15
|
import { TextItem, ListDivider, ItemWrapper } from './Elements';
|
|
24
|
-
|
|
25
16
|
var RadioGroupWrapper = function RadioGroupWrapper(_ref) {
|
|
26
17
|
var children = _ref.children,
|
|
27
|
-
|
|
18
|
+
options = _ref.options;
|
|
28
19
|
return /*#__PURE__*/React.createElement(Radio.Group, options, children);
|
|
29
|
-
};
|
|
30
|
-
|
|
20
|
+
};
|
|
31
21
|
|
|
22
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
32
23
|
export var isNestedArray = function isNestedArray(array) {
|
|
33
24
|
return !!array.length && array[0] instanceof Array;
|
|
34
25
|
};
|
|
35
|
-
|
|
36
26
|
var List = /*#__PURE__*/function (_React$PureComponent) {
|
|
37
27
|
function List(props) {
|
|
38
28
|
var _this;
|
|
39
|
-
|
|
40
29
|
_this = _React$PureComponent.call(this, props) || this;
|
|
41
|
-
|
|
42
30
|
_defineProperty(_this, "uuidKey", void 0);
|
|
43
|
-
|
|
44
31
|
_this.uuidKey = uuid();
|
|
45
32
|
return _this;
|
|
46
33
|
}
|
|
47
|
-
|
|
48
34
|
_inheritsLoose(List, _React$PureComponent);
|
|
49
|
-
|
|
50
35
|
var _proto = List.prototype;
|
|
51
|
-
|
|
52
36
|
_proto.render = function render() {
|
|
53
37
|
var _this$props = this.props,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
38
|
+
dataSource = _this$props.dataSource,
|
|
39
|
+
radio = _this$props.radio,
|
|
40
|
+
options = _this$props.options,
|
|
41
|
+
dashed = _this$props.dashed,
|
|
42
|
+
rest = _objectWithoutPropertiesLoose(_this$props, _excluded);
|
|
60
43
|
var ReadyList;
|
|
61
|
-
|
|
62
44
|
if (isNestedArray(dataSource)) {
|
|
63
|
-
ReadyList = !!dataSource &&
|
|
45
|
+
ReadyList = !!dataSource &&
|
|
46
|
+
// @ts-ignore
|
|
64
47
|
dataSource.map(function (singleDataSource, index) {
|
|
65
48
|
var isLastItem = dataSource.length === index + 1;
|
|
66
|
-
|
|
67
49
|
if (index === 0) {
|
|
68
50
|
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
69
51
|
key: uuid()
|
|
@@ -74,7 +56,6 @@ var List = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
74
56
|
"data-testid": "divider"
|
|
75
57
|
}));
|
|
76
58
|
}
|
|
77
|
-
|
|
78
59
|
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
79
60
|
key: uuid()
|
|
80
61
|
}, /*#__PURE__*/React.createElement(AntdList, _extends({}, rest, {
|
|
@@ -92,19 +73,13 @@ var List = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
92
73
|
dataSource: dataSource
|
|
93
74
|
})));
|
|
94
75
|
}
|
|
95
|
-
|
|
96
76
|
return /*#__PURE__*/React.createElement(React.Fragment, null, radio ? /*#__PURE__*/React.createElement(RadioGroupWrapper, {
|
|
97
77
|
options: options
|
|
98
78
|
}, ReadyList) : ReadyList);
|
|
99
79
|
};
|
|
100
|
-
|
|
101
80
|
return List;
|
|
102
81
|
}(React.PureComponent);
|
|
103
|
-
|
|
104
82
|
_defineProperty(List, "ItemWrapper", ItemWrapper);
|
|
105
|
-
|
|
106
83
|
_defineProperty(List, "Item", TextItem);
|
|
107
|
-
|
|
108
84
|
_defineProperty(List, "Divider", ListDivider);
|
|
109
|
-
|
|
110
85
|
export default List;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-list",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.7",
|
|
4
4
|
"description": "List UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
],
|
|
35
35
|
"types": "dist/index.d.ts",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@synerise/ds-divider": "^0.7.
|
|
38
|
-
"@synerise/ds-radio": "^0.12.
|
|
37
|
+
"@synerise/ds-divider": "^0.7.16",
|
|
38
|
+
"@synerise/ds-radio": "^0.12.14",
|
|
39
39
|
"@synerise/ds-utils": "^0.31.2",
|
|
40
40
|
"uuid": "^8.3.2"
|
|
41
41
|
},
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"react": ">=16.9.0 <= 17.0.2",
|
|
46
46
|
"styled-components": "5.0.1"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "4a56ee7ef816c22341ce704154dc7aa65b7d1dcc"
|
|
49
49
|
}
|