@synerise/ds-switch 1.1.13 → 1.1.15
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 +1 -1
- package/dist/Switch.js +4 -2
- package/dist/Switch.types.d.ts +2 -0
- package/package.json +5 -5
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.1.15](https://github.com/synerise/synerise-design/compare/@synerise/ds-switch@1.1.14...@synerise/ds-switch@1.1.15) (2025-09-02)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **switch:** add tooltipConfig ([d2d752f](https://github.com/synerise/synerise-design/commit/d2d752f373da31c1e2ac708237a2e7840b6ba015))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [1.1.14](https://github.com/synerise/synerise-design/compare/@synerise/ds-switch@1.1.13...@synerise/ds-switch@1.1.14) (2025-08-28)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @synerise/ds-switch
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [1.1.13](https://github.com/synerise/synerise-design/compare/@synerise/ds-switch@1.1.12...@synerise/ds-switch@1.1.13) (2025-08-14)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @synerise/ds-switch
|
package/dist/Switch.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ import '@synerise/ds-core/dist/js/style';
|
|
|
3
3
|
import { type Props } from './Switch.types';
|
|
4
4
|
import './style/index.less';
|
|
5
5
|
export declare const RawSwitch: React.ForwardRefExoticComponent<import("antd/lib/switch").SwitchProps & React.RefAttributes<HTMLElement>>;
|
|
6
|
-
export declare const Switch: ({ errorText, label, description, onChange, withFormElementMargin, tooltipIcon, tooltip, className, ...antdSwitchProps }: Props) => React.JSX.Element;
|
|
6
|
+
export declare const Switch: ({ errorText, label, description, onChange, withFormElementMargin, tooltipIcon, tooltip, className, tooltipConfig, ...antdSwitchProps }: Props) => React.JSX.Element;
|
|
7
7
|
export default Switch;
|
package/dist/Switch.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["errorText", "label", "description", "onChange", "withFormElementMargin", "tooltipIcon", "tooltip", "className"];
|
|
1
|
+
var _excluded = ["errorText", "label", "description", "onChange", "withFormElementMargin", "tooltipIcon", "tooltip", "className", "tooltipConfig"];
|
|
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
4
|
import AntdSwitch from 'antd/lib/switch';
|
|
@@ -19,6 +19,7 @@ export var Switch = function Switch(_ref) {
|
|
|
19
19
|
tooltipIcon = _ref.tooltipIcon,
|
|
20
20
|
tooltip = _ref.tooltip,
|
|
21
21
|
className = _ref.className,
|
|
22
|
+
tooltipConfig = _ref.tooltipConfig,
|
|
22
23
|
antdSwitchProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
23
24
|
var id = useId();
|
|
24
25
|
var switchElement = useRef(null);
|
|
@@ -44,7 +45,8 @@ export var Switch = function Switch(_ref) {
|
|
|
44
45
|
id: id,
|
|
45
46
|
className: "switch-label",
|
|
46
47
|
label: label,
|
|
47
|
-
tooltip: tooltip
|
|
48
|
+
tooltip: tooltip,
|
|
49
|
+
tooltipConfig: tooltipConfig
|
|
48
50
|
}))), (errorText || description) && /*#__PURE__*/React.createElement(S.DescriptionWrapper, null, /*#__PURE__*/React.createElement(S.Texts, {
|
|
49
51
|
className: "switch-texts"
|
|
50
52
|
}, /*#__PURE__*/React.createElement(S.BelowLabel, null, errorText && /*#__PURE__*/React.createElement(S.Error, null, errorText), description && /*#__PURE__*/React.createElement(S.Description, {
|
package/dist/Switch.types.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { type SwitchProps as AntdSwitchProps } from 'antd/lib/switch';
|
|
2
2
|
import { type ReactNode } from 'react';
|
|
3
|
+
import { type TooltipProps as DsTooltipProps } from '@synerise/ds-tooltip';
|
|
3
4
|
type TooltipProps = {
|
|
4
5
|
tooltipIcon?: ReactNode;
|
|
5
6
|
tooltip?: ReactNode;
|
|
7
|
+
tooltipConfig?: DsTooltipProps;
|
|
6
8
|
};
|
|
7
9
|
export type Props = Omit<AntdSwitchProps, 'size'> & {
|
|
8
10
|
errorText?: ReactNode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-switch",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.15",
|
|
4
4
|
"description": "Switch UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "synerise/synerise-design",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
],
|
|
35
35
|
"types": "dist/index.d.ts",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@synerise/ds-form-field": "^1.1.
|
|
38
|
-
"@synerise/ds-typography": "^1.0.
|
|
39
|
-
"@synerise/ds-utils": "^1.4.
|
|
37
|
+
"@synerise/ds-form-field": "^1.1.14",
|
|
38
|
+
"@synerise/ds-typography": "^1.0.19",
|
|
39
|
+
"@synerise/ds-utils": "^1.4.1",
|
|
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": "eae85627e064add7fde7d67bbc4727f9b55453a5"
|
|
49
49
|
}
|