@synerise/ds-divider 1.0.21 → 1.1.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/CHANGELOG.md CHANGED
@@ -3,23 +3,18 @@
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.0.21](https://github.com/Synerise/synerise-design/compare/@synerise/ds-divider@1.0.20...@synerise/ds-divider@1.0.21) (2025-09-19)
7
-
8
- **Note:** Version bump only for package @synerise/ds-divider
9
-
10
-
11
-
6
+ # [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)
12
7
 
13
8
 
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)
9
+ ### Features
15
10
 
16
- **Note:** Version bump only for package @synerise/ds-divider
11
+ * **divider:** refactor divider component ([ea117aa](https://github.com/Synerise/synerise-design/commit/ea117aa015f372ad42c7ac60d4f3691c9e9555e0))
17
12
 
18
13
 
19
14
 
20
15
 
21
16
 
22
- ## [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)
17
+ ## [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)
23
18
 
24
19
  **Note:** Version bump only for package @synerise/ds-divider
25
20
 
@@ -27,7 +22,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
27
22
 
28
23
 
29
24
 
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)
25
+ ## [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)
31
26
 
32
27
  **Note:** Version bump only for package @synerise/ds-divider
33
28
 
@@ -35,62 +30,42 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
35
30
 
36
31
 
37
32
 
38
- ## [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)
33
+ ## [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)
39
34
 
40
35
  **Note:** Version bump only for package @synerise/ds-divider
41
36
 
37
+ ## [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)
42
38
 
39
+ **Note:** Version bump only for package @synerise/ds-divider
43
40
 
41
+ ## [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)
44
42
 
43
+ **Note:** Version bump only for package @synerise/ds-divider
45
44
 
46
45
  ## [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)
47
46
 
48
47
  **Note:** Version bump only for package @synerise/ds-divider
49
48
 
50
-
51
-
52
-
53
-
54
49
  ## [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)
55
50
 
56
51
  **Note:** Version bump only for package @synerise/ds-divider
57
52
 
58
-
59
-
60
-
61
-
62
53
  ## [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
54
 
64
55
  **Note:** Version bump only for package @synerise/ds-divider
65
56
 
66
-
67
-
68
-
69
-
70
57
  ## [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
58
 
72
59
  **Note:** Version bump only for package @synerise/ds-divider
73
60
 
74
-
75
-
76
-
77
-
78
61
  ## [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
62
 
80
63
  **Note:** Version bump only for package @synerise/ds-divider
81
64
 
82
-
83
-
84
-
85
-
86
65
  ## [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
66
 
88
67
  **Note:** Version bump only for package @synerise/ds-divider
89
68
 
90
-
91
-
92
-
93
-
94
69
  ## [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
70
 
96
71
  **Note:** Version bump only for package @synerise/ds-divider
package/dist/Divider.d.ts CHANGED
@@ -1,6 +1,4 @@
1
1
  import React from 'react';
2
- import '@synerise/ds-core/dist/js/style';
3
2
  import { type DividerProps } from './Divider.types';
4
- import './style/index.less';
5
3
  declare const Divider: (props: DividerProps) => React.JSX.Element;
6
4
  export default Divider;
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,
@@ -1,9 +1,12 @@
1
- import { type DividerProps as AntDividerProps } from 'antd/lib/divider';
2
1
  import { type ReactNode } from 'react';
3
- export type DividerProps = AntDividerProps & {
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, style, ...antdDividerProps }: DividerProps) => React.JSX.Element;
3
+ export declare const Line: ({ marginBottom, marginTop, type, dashed, className, ...htmlAttributes }: DividerProps) => React.JSX.Element;
@@ -1,17 +1,22 @@
1
- var _excluded = ["marginBottom", "marginTop", "style"];
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
- style = _ref.style,
10
- antdDividerProps = _objectWithoutPropertiesLoose(_ref, _excluded);
11
- return /*#__PURE__*/React.createElement(AntdDivider, _extends({}, antdDividerProps, {
12
- style: _extends({
13
- marginBottom: marginBottom,
14
- marginTop: marginTop
15
- }, style)
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 " + className,
16
+ role: "separator",
17
+ marginTop: marginTop,
18
+ marginBottom: marginBottom,
19
+ type: type,
20
+ dashed: dashed
21
+ }, htmlAttributes));
17
22
  };
@@ -0,0 +1,7 @@
1
+ import { type DividerType } from '../Divider.types';
2
+ export declare const Line: import("styled-components").StyledComponent<"div", any, {
3
+ marginTop?: number;
4
+ marginBottom?: number;
5
+ type?: DividerType;
6
+ dashed?: boolean;
7
+ }, never>;
@@ -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.0.21",
3
+ "version": "1.1.0",
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": "5029af8713235b315d36bb3c73363f2feca86da0"
45
+ "gitHead": "6a2e6e20a480aafe5d67748d04fbe3d4ce91a544"
48
46
  }
@@ -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}