@synerise/ds-divider 1.0.21 → 1.1.1
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 +16 -30
- package/dist/Divider.d.ts +0 -2
- package/dist/Divider.js +0 -2
- package/dist/Divider.types.d.ts +6 -3
- package/dist/components/Line.d.ts +1 -1
- package/dist/components/Line.js +15 -10
- package/dist/components/Line.styles.d.ts +7 -0
- package/dist/components/Line.styles.js +29 -0
- package/package.json +3 -5
- package/dist/style/index.css +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,31 +3,29 @@
|
|
|
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
|
-
## [1.
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @synerise/ds-divider
|
|
6
|
+
## [1.1.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-divider@1.1.0...@synerise/ds-divider@1.1.1) (2025-09-26)
|
|
9
7
|
|
|
10
8
|
|
|
9
|
+
### Bug Fixes
|
|
11
10
|
|
|
11
|
+
* **divider:** added legacy classes - custom styles in puib ([3cab5f4](https://github.com/Synerise/synerise-design/commit/3cab5f4627e399aeb99eba17e7c8618f247e90eb))
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
## [1.0.20](https://github.com/Synerise/synerise-design/compare/@synerise/ds-divider@1.0.19...@synerise/ds-divider@1.0.20) (2025-09-16)
|
|
15
14
|
|
|
16
|
-
**Note:** Version bump only for package @synerise/ds-divider
|
|
17
15
|
|
|
18
16
|
|
|
17
|
+
# [1.1.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-divider@1.0.21...@synerise/ds-divider@1.1.0) (2025-09-25)
|
|
19
18
|
|
|
20
19
|
|
|
20
|
+
### Features
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
* **divider:** refactor divider component ([ea117aa](https://github.com/Synerise/synerise-design/commit/ea117aa015f372ad42c7ac60d4f3691c9e9555e0))
|
|
23
23
|
|
|
24
|
-
**Note:** Version bump only for package @synerise/ds-divider
|
|
25
24
|
|
|
26
25
|
|
|
27
26
|
|
|
28
27
|
|
|
29
|
-
|
|
30
|
-
## [1.0.18](https://github.com/Synerise/synerise-design/compare/@synerise/ds-divider@1.0.17...@synerise/ds-divider@1.0.18) (2025-08-14)
|
|
28
|
+
## [1.0.21](https://github.com/Synerise/synerise-design/compare/@synerise/ds-divider@1.0.20...@synerise/ds-divider@1.0.21) (2025-09-19)
|
|
31
29
|
|
|
32
30
|
**Note:** Version bump only for package @synerise/ds-divider
|
|
33
31
|
|
|
@@ -35,7 +33,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
35
33
|
|
|
36
34
|
|
|
37
35
|
|
|
38
|
-
## [1.0.
|
|
36
|
+
## [1.0.20](https://github.com/Synerise/synerise-design/compare/@synerise/ds-divider@1.0.19...@synerise/ds-divider@1.0.20) (2025-09-16)
|
|
39
37
|
|
|
40
38
|
**Note:** Version bump only for package @synerise/ds-divider
|
|
41
39
|
|
|
@@ -43,54 +41,42 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
43
41
|
|
|
44
42
|
|
|
45
43
|
|
|
46
|
-
## [1.0.
|
|
44
|
+
## [1.0.19](https://github.com/Synerise/synerise-design/compare/@synerise/ds-divider@1.0.18...@synerise/ds-divider@1.0.19) (2025-08-28)
|
|
47
45
|
|
|
48
46
|
**Note:** Version bump only for package @synerise/ds-divider
|
|
49
47
|
|
|
48
|
+
## [1.0.18](https://github.com/Synerise/synerise-design/compare/@synerise/ds-divider@1.0.17...@synerise/ds-divider@1.0.18) (2025-08-14)
|
|
50
49
|
|
|
50
|
+
**Note:** Version bump only for package @synerise/ds-divider
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
## [1.0.15](https://github.com/Synerise/synerise-design/compare/@synerise/ds-divider@1.0.14...@synerise/ds-divider@1.0.15) (2025-07-15)
|
|
52
|
+
## [1.0.17](https://github.com/Synerise/synerise-design/compare/@synerise/ds-divider@1.0.16...@synerise/ds-divider@1.0.17) (2025-07-24)
|
|
55
53
|
|
|
56
54
|
**Note:** Version bump only for package @synerise/ds-divider
|
|
57
55
|
|
|
56
|
+
## [1.0.16](https://github.com/Synerise/synerise-design/compare/@synerise/ds-divider@1.0.15...@synerise/ds-divider@1.0.16) (2025-07-17)
|
|
58
57
|
|
|
58
|
+
**Note:** Version bump only for package @synerise/ds-divider
|
|
59
59
|
|
|
60
|
+
## [1.0.15](https://github.com/Synerise/synerise-design/compare/@synerise/ds-divider@1.0.14...@synerise/ds-divider@1.0.15) (2025-07-15)
|
|
60
61
|
|
|
62
|
+
**Note:** Version bump only for package @synerise/ds-divider
|
|
61
63
|
|
|
62
64
|
## [1.0.14](https://github.com/Synerise/synerise-design/compare/@synerise/ds-divider@1.0.13...@synerise/ds-divider@1.0.14) (2025-07-08)
|
|
63
65
|
|
|
64
66
|
**Note:** Version bump only for package @synerise/ds-divider
|
|
65
67
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
68
|
## [1.0.13](https://github.com/Synerise/synerise-design/compare/@synerise/ds-divider@1.0.12...@synerise/ds-divider@1.0.13) (2025-07-01)
|
|
71
69
|
|
|
72
70
|
**Note:** Version bump only for package @synerise/ds-divider
|
|
73
71
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
72
|
## [1.0.12](https://github.com/Synerise/synerise-design/compare/@synerise/ds-divider@1.0.11...@synerise/ds-divider@1.0.12) (2025-06-26)
|
|
79
73
|
|
|
80
74
|
**Note:** Version bump only for package @synerise/ds-divider
|
|
81
75
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
76
|
## [1.0.11](https://github.com/Synerise/synerise-design/compare/@synerise/ds-divider@1.0.10...@synerise/ds-divider@1.0.11) (2025-06-24)
|
|
87
77
|
|
|
88
78
|
**Note:** Version bump only for package @synerise/ds-divider
|
|
89
79
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
80
|
## [1.0.10](https://github.com/Synerise/synerise-design/compare/@synerise/ds-divider@1.0.9...@synerise/ds-divider@1.0.10) (2025-06-05)
|
|
95
81
|
|
|
96
82
|
**Note:** Version bump only for package @synerise/ds-divider
|
package/dist/Divider.d.ts
CHANGED
package/dist/Divider.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import '@synerise/ds-core/dist/js/style';
|
|
3
2
|
import * as S from './Divider.styles';
|
|
4
3
|
import { Line } from './components/Line';
|
|
5
|
-
import "./style/index.css";
|
|
6
4
|
var Divider = function Divider(props) {
|
|
7
5
|
var labelAbove = props.labelAbove,
|
|
8
6
|
labelBelow = props.labelBelow,
|
package/dist/Divider.types.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { type DividerProps as AntDividerProps } from 'antd/lib/divider';
|
|
2
1
|
import { type ReactNode } from 'react';
|
|
3
|
-
|
|
2
|
+
import { type WithHTMLAttributes } from '@synerise/ds-utils';
|
|
3
|
+
export type DividerType = 'vertical' | 'horizontal';
|
|
4
|
+
export type DividerProps = WithHTMLAttributes<HTMLDivElement, {
|
|
4
5
|
marginTop?: number;
|
|
5
6
|
marginBottom?: number;
|
|
6
7
|
labelAbove?: ReactNode;
|
|
7
8
|
labelBelow?: ReactNode;
|
|
8
9
|
hiddenLine?: boolean;
|
|
9
|
-
|
|
10
|
+
type?: DividerType;
|
|
11
|
+
dashed?: boolean;
|
|
12
|
+
}>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type DividerProps } from '../Divider.types';
|
|
3
|
-
export declare const Line: ({ marginBottom, marginTop,
|
|
3
|
+
export declare const Line: ({ marginBottom, marginTop, type, dashed, className, ...htmlAttributes }: DividerProps) => React.JSX.Element;
|
package/dist/components/Line.js
CHANGED
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
var _excluded = ["marginBottom", "marginTop", "
|
|
1
|
+
var _excluded = ["marginBottom", "marginTop", "type", "dashed", "className"];
|
|
2
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
3
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
4
|
-
import AntdDivider from 'antd/lib/divider';
|
|
5
4
|
import React from 'react';
|
|
5
|
+
import * as S from './Line.styles';
|
|
6
6
|
export var Line = function Line(_ref) {
|
|
7
7
|
var marginBottom = _ref.marginBottom,
|
|
8
8
|
marginTop = _ref.marginTop,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
_ref$type = _ref.type,
|
|
10
|
+
type = _ref$type === void 0 ? 'horizontal' : _ref$type,
|
|
11
|
+
dashed = _ref.dashed,
|
|
12
|
+
className = _ref.className,
|
|
13
|
+
htmlAttributes = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
14
|
+
return /*#__PURE__*/React.createElement(S.Line, _extends({
|
|
15
|
+
className: "ds-divider-line ds-divider-" + type + " ds-divider-" + (dashed ? 'dashed' : 'solid') + " " + className,
|
|
16
|
+
role: "separator",
|
|
17
|
+
marginTop: marginTop,
|
|
18
|
+
marginBottom: marginBottom,
|
|
19
|
+
type: type,
|
|
20
|
+
dashed: dashed
|
|
21
|
+
}, htmlAttributes));
|
|
17
22
|
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
var getDashed = function getDashed(dashed, theme) {
|
|
3
|
+
if (dashed) {
|
|
4
|
+
return "1px dashed " + theme.palette['grey-400'] + ";";
|
|
5
|
+
}
|
|
6
|
+
return "1px solid " + theme.palette['grey-300'];
|
|
7
|
+
};
|
|
8
|
+
export var Line = styled.div.withConfig({
|
|
9
|
+
displayName: "Linestyles__Line",
|
|
10
|
+
componentId: "sc-1fokvnj-0"
|
|
11
|
+
})(["display:", ";vertical-align:", ";margin:", ";margin-bottom:", "px;margin-top:", "px;width:", ";height:", ";", ";", ";"], function (props) {
|
|
12
|
+
return props.type === 'vertical' ? 'inline-block' : 'flex';
|
|
13
|
+
}, function (props) {
|
|
14
|
+
return props.type === 'vertical' ? 'middle' : undefined;
|
|
15
|
+
}, function (props) {
|
|
16
|
+
return props.type === 'vertical' ? '0 8px' : '0';
|
|
17
|
+
}, function (props) {
|
|
18
|
+
return props.marginBottom;
|
|
19
|
+
}, function (props) {
|
|
20
|
+
return props.marginTop;
|
|
21
|
+
}, function (props) {
|
|
22
|
+
return props.type === 'horizontal' ? '100%' : '0';
|
|
23
|
+
}, function (props) {
|
|
24
|
+
return props.type === 'vertical' ? '0.9em' : '0';
|
|
25
|
+
}, function (props) {
|
|
26
|
+
return props.type === 'horizontal' && "border-bottom: " + getDashed(props.dashed, props.theme);
|
|
27
|
+
}, function (props) {
|
|
28
|
+
return props.type === 'vertical' && "border-left: " + getDashed(props.dashed, props.theme);
|
|
29
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-divider",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Divider UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -35,14 +35,12 @@
|
|
|
35
35
|
],
|
|
36
36
|
"types": "dist/index.d.ts",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@synerise/ds-typography": "^1.0.21"
|
|
39
|
-
"@synerise/ds-utils": "^1.4.2"
|
|
38
|
+
"@synerise/ds-typography": "^1.0.21"
|
|
40
39
|
},
|
|
41
40
|
"peerDependencies": {
|
|
42
41
|
"@synerise/ds-core": "*",
|
|
43
|
-
"antd": "4.24.16",
|
|
44
42
|
"react": ">=16.9.0 <= 18.3.1",
|
|
45
43
|
"styled-components": "^5.3.3"
|
|
46
44
|
},
|
|
47
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "25221abb694880c2416ceb5f7598a5c7329f3379"
|
|
48
46
|
}
|
package/dist/style/index.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.ant-divider{box-sizing:border-box;margin:0;padding:0;color:#6a7580;font-size:13px;font-variant:tabular-nums;line-height:1.38;list-style:none;font-feature-settings:'tnum';border-top:1px solid rgba(0,0,0,.06)}.ant-divider-vertical{position:relative;top:-.06em;display:inline-block;height:.9em;margin:0 8px;vertical-align:middle;border-top:0;border-left:1px solid rgba(0,0,0,.06)}.ant-divider-horizontal{display:flex;clear:both;width:100%;min-width:100%;margin:24px 0}.ant-divider-horizontal.ant-divider-with-text{display:flex;align-items:center;margin:16px 0;color:#384350;font-weight:500;font-size:13px;white-space:nowrap;text-align:center;border-top:0;border-top-color:rgba(0,0,0,.06)}.ant-divider-horizontal.ant-divider-with-text::after,.ant-divider-horizontal.ant-divider-with-text::before{position:relative;width:50%;border-top:1px solid transparent;border-top-color:inherit;border-bottom:0;transform:translateY(50%);content:''}.ant-divider-horizontal.ant-divider-with-text-left::before{width:5%}.ant-divider-horizontal.ant-divider-with-text-left::after{width:95%}.ant-divider-horizontal.ant-divider-with-text-right::before{width:95%}.ant-divider-horizontal.ant-divider-with-text-right::after{width:5%}.ant-divider-inner-text{display:inline-block;padding:0 1em}.ant-divider-dashed{background:0 0;border-color:rgba(0,0,0,.06);border-style:dashed;border-width:1px 0 0}.ant-divider-horizontal.ant-divider-with-text.ant-divider-dashed::after,.ant-divider-horizontal.ant-divider-with-text.ant-divider-dashed::before{border-style:dashed none none}.ant-divider-vertical.ant-divider-dashed{border-width:0 0 0 1px}.ant-divider-plain.ant-divider-with-text{color:#6a7580;font-weight:400;font-size:13px}.ant-divider-horizontal.ant-divider-with-text-left.ant-divider-no-default-orientation-margin-left::before{width:0}.ant-divider-horizontal.ant-divider-with-text-left.ant-divider-no-default-orientation-margin-left::after{width:100%}.ant-divider-horizontal.ant-divider-with-text-left.ant-divider-no-default-orientation-margin-left .ant-divider-inner-text{padding-left:0}.ant-divider-horizontal.ant-divider-with-text-right.ant-divider-no-default-orientation-margin-right::before{width:100%}.ant-divider-horizontal.ant-divider-with-text-right.ant-divider-no-default-orientation-margin-right::after{width:0}.ant-divider-horizontal.ant-divider-with-text-right.ant-divider-no-default-orientation-margin-right .ant-divider-inner-text{padding-right:0}.ant-divider-rtl{direction:rtl}.ant-divider-rtl.ant-divider-horizontal.ant-divider-with-text-left::before{width:95%}.ant-divider-rtl.ant-divider-horizontal.ant-divider-with-text-left::after{width:5%}.ant-divider-rtl.ant-divider-horizontal.ant-divider-with-text-right::before{width:5%}.ant-divider-rtl.ant-divider-horizontal.ant-divider-with-text-right::after{width:95%}.ant-divider-horizontal{margin:0}
|