@synerise/ds-switch 1.1.19 → 1.2.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 +19 -0
- package/dist/Switch.d.ts +10 -2
- package/dist/Switch.js +4 -3
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
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.2.0](https://github.com/synerise/synerise-design/compare/@synerise/ds-switch@1.1.20...@synerise/ds-switch@1.2.0) (2025-11-06)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **dropdown:** dropdownMenu component ([f0ec827](https://github.com/synerise/synerise-design/commit/f0ec82792cdcb021fa9a454912f6e7a892e53895))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [1.1.20](https://github.com/synerise/synerise-design/compare/@synerise/ds-switch@1.1.19...@synerise/ds-switch@1.1.20) (2025-10-22)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @synerise/ds-switch
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [1.1.19](https://github.com/synerise/synerise-design/compare/@synerise/ds-switch@1.1.18...@synerise/ds-switch@1.1.19) (2025-10-10)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @synerise/ds-switch
|
package/dist/Switch.d.ts
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import '@synerise/ds-core/dist/js/style';
|
|
3
|
-
import { type Props } from './Switch.types';
|
|
4
3
|
import './style/index.less';
|
|
5
4
|
export declare const RawSwitch: React.ForwardRefExoticComponent<import("antd/lib/switch").SwitchProps & React.RefAttributes<HTMLElement>>;
|
|
6
|
-
export declare const Switch: (
|
|
5
|
+
export declare const Switch: React.ForwardRefExoticComponent<Omit<import("antd/lib/switch").SwitchProps, "size"> & {
|
|
6
|
+
errorText?: React.ReactNode;
|
|
7
|
+
label: React.ReactNode;
|
|
8
|
+
description?: React.ReactNode;
|
|
9
|
+
withFormElementMargin?: boolean;
|
|
10
|
+
} & {
|
|
11
|
+
tooltipIcon?: React.ReactNode;
|
|
12
|
+
tooltip?: React.ReactNode;
|
|
13
|
+
tooltipConfig?: import("@synerise/ds-tooltip").TooltipProps;
|
|
14
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
7
15
|
export default Switch;
|
package/dist/Switch.js
CHANGED
|
@@ -3,14 +3,14 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
|
|
|
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
4
|
import AntdSwitch from 'antd/lib/switch';
|
|
5
5
|
import classnames from 'classnames';
|
|
6
|
-
import React, { useId, useRef } from 'react';
|
|
6
|
+
import React, { forwardRef, useId, useRef } from 'react';
|
|
7
7
|
import '@synerise/ds-core/dist/js/style';
|
|
8
8
|
import * as S from './Switch.styles';
|
|
9
9
|
import "./style/index.css";
|
|
10
10
|
|
|
11
11
|
// export RawSwitch from this file to have .less style side effects applied when only RawSwitch is used
|
|
12
12
|
export var RawSwitch = AntdSwitch;
|
|
13
|
-
export var Switch = function
|
|
13
|
+
export var Switch = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
14
14
|
var errorText = _ref.errorText,
|
|
15
15
|
label = _ref.label,
|
|
16
16
|
description = _ref.description,
|
|
@@ -24,6 +24,7 @@ export var Switch = function Switch(_ref) {
|
|
|
24
24
|
var id = useId();
|
|
25
25
|
var switchElement = useRef(null);
|
|
26
26
|
return /*#__PURE__*/React.createElement(S.SwitchWrapper, {
|
|
27
|
+
ref: ref,
|
|
27
28
|
className: classnames(['ds-switch', className]),
|
|
28
29
|
formElementMargin: Boolean(withFormElementMargin)
|
|
29
30
|
}, /*#__PURE__*/React.createElement(S.LabelSwitchWrapper, null, /*#__PURE__*/React.createElement(RawSwitch, _extends({}, antdSwitchProps, {
|
|
@@ -52,5 +53,5 @@ export var Switch = function Switch(_ref) {
|
|
|
52
53
|
}, /*#__PURE__*/React.createElement(S.BelowLabel, null, errorText && /*#__PURE__*/React.createElement(S.Error, null, errorText), description && /*#__PURE__*/React.createElement(S.Description, {
|
|
53
54
|
className: "switch-description"
|
|
54
55
|
}, description)))));
|
|
55
|
-
};
|
|
56
|
+
});
|
|
56
57
|
export default Switch;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-switch",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Switch UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "synerise/synerise-design",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
],
|
|
36
36
|
"types": "dist/index.d.ts",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@synerise/ds-form-field": "^1.1.
|
|
39
|
-
"@synerise/ds-typography": "^1.0.
|
|
38
|
+
"@synerise/ds-form-field": "^1.1.19",
|
|
39
|
+
"@synerise/ds-typography": "^1.0.23",
|
|
40
40
|
"classnames": "^2.5.1"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"react": ">=16.9.0 <= 18.3.1",
|
|
46
46
|
"styled-components": "^5.3.3"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "cbbb7d9f155735bcc4035d8fd8a7813878d6e051"
|
|
49
49
|
}
|