@synerise/ds-popconfirm 0.10.60 → 0.10.61
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,6 +3,17 @@
|
|
|
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.10.61](https://github.com/Synerise/synerise-design/compare/@synerise/ds-popconfirm@0.10.60...@synerise/ds-popconfirm@0.10.61) (2024-11-22)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **popconfirm:** change fallback style ([ce1dd3a](https://github.com/Synerise/synerise-design/commit/ce1dd3a3e7af1b6c4e3e21352bd3ed0cd8e2a5b9))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [0.10.60](https://github.com/Synerise/synerise-design/compare/@synerise/ds-popconfirm@0.10.59...@synerise/ds-popconfirm@0.10.60) (2024-11-21)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @synerise/ds-popconfirm
|
|
@@ -3,18 +3,16 @@ import AntdTooltip from 'antd/lib/tooltip';
|
|
|
3
3
|
import * as S from './ConfirmMessage.style';
|
|
4
4
|
export var ConfirmMessage = function ConfirmMessage(_ref) {
|
|
5
5
|
var children = _ref.children,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
_ref$placement = _ref.placement,
|
|
7
|
+
placement = _ref$placement === void 0 ? 'topLeft' : _ref$placement,
|
|
8
|
+
title = _ref.title,
|
|
9
|
+
onClick = _ref.onClick,
|
|
10
|
+
_ref$displayDuration = _ref.displayDuration,
|
|
11
|
+
displayDuration = _ref$displayDuration === void 0 ? 5000 : _ref$displayDuration,
|
|
12
|
+
icon = _ref.icon;
|
|
14
13
|
var _useState = useState(false),
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
visible = _useState[0],
|
|
15
|
+
setVisible = _useState[1];
|
|
18
16
|
useEffect(function () {
|
|
19
17
|
var timeout = setTimeout(function () {
|
|
20
18
|
setVisible(false);
|
|
@@ -23,11 +21,9 @@ export var ConfirmMessage = function ConfirmMessage(_ref) {
|
|
|
23
21
|
clearTimeout(timeout);
|
|
24
22
|
};
|
|
25
23
|
}, [visible, displayDuration]);
|
|
26
|
-
|
|
27
24
|
var showMessage = function showMessage() {
|
|
28
25
|
setVisible(true);
|
|
29
26
|
};
|
|
30
|
-
|
|
31
27
|
var handleClick = useCallback(function () {
|
|
32
28
|
onClick && onClick(showMessage);
|
|
33
29
|
}, [onClick]);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
-
import { IconContainer } from '@synerise/ds-icon';
|
|
2
|
+
import { IconContainer } from '@synerise/ds-icon';
|
|
3
3
|
|
|
4
|
+
// eslint-disable-next-line import/prefer-default-export
|
|
4
5
|
export var Message = styled.div.withConfig({
|
|
5
6
|
displayName: "ConfirmMessagestyle__Message",
|
|
6
7
|
componentId: "sc-6dbwo9-0"
|
package/dist/Popconfirm.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
var _excluded = ["icon", "title", "description", "images", "imagesAutoplay", "imagesAutoplaySpeed", "withLink", "closeIcon", "titlePadding", "onCancel", "cancelButtonProps", "onConfirm", "okButtonProps", "okType", "hideButtons", "cancelText", "okText", "buttonsAlign"];
|
|
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
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
8
5
|
import '@synerise/ds-core/dist/js/style';
|
|
9
6
|
import "./style/index.css";
|
|
@@ -11,30 +8,28 @@ import { Carousel } from 'antd';
|
|
|
11
8
|
import { useOnClickOutside } from '@synerise/ds-utils';
|
|
12
9
|
import * as S from './Popconfirm.styles';
|
|
13
10
|
import ConfirmMessage from './ConfirmMessage/ConfirmMessage';
|
|
14
|
-
|
|
15
11
|
var Popconfirm = function Popconfirm(_ref) {
|
|
16
12
|
var icon = _ref.icon,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
13
|
+
title = _ref.title,
|
|
14
|
+
description = _ref.description,
|
|
15
|
+
images = _ref.images,
|
|
16
|
+
imagesAutoplay = _ref.imagesAutoplay,
|
|
17
|
+
_ref$imagesAutoplaySp = _ref.imagesAutoplaySpeed,
|
|
18
|
+
imagesAutoplaySpeed = _ref$imagesAutoplaySp === void 0 ? 5000 : _ref$imagesAutoplaySp,
|
|
19
|
+
withLink = _ref.withLink,
|
|
20
|
+
closeIcon = _ref.closeIcon,
|
|
21
|
+
titlePadding = _ref.titlePadding,
|
|
22
|
+
onCancel = _ref.onCancel,
|
|
23
|
+
cancelButtonProps = _ref.cancelButtonProps,
|
|
24
|
+
onConfirm = _ref.onConfirm,
|
|
25
|
+
okButtonProps = _ref.okButtonProps,
|
|
26
|
+
_ref$okType = _ref.okType,
|
|
27
|
+
okType = _ref$okType === void 0 ? 'primary' : _ref$okType,
|
|
28
|
+
hideButtons = _ref.hideButtons,
|
|
29
|
+
cancelText = _ref.cancelText,
|
|
30
|
+
okText = _ref.okText,
|
|
31
|
+
buttonsAlign = _ref.buttonsAlign,
|
|
32
|
+
antdProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
38
33
|
var renderImageCarousel = useMemo(function () {
|
|
39
34
|
return (images == null ? void 0 : images.length) && /*#__PURE__*/React.createElement(Carousel, {
|
|
40
35
|
autoplay: imagesAutoplay,
|
|
@@ -48,11 +43,9 @@ var Popconfirm = function Popconfirm(_ref) {
|
|
|
48
43
|
}));
|
|
49
44
|
}, [images, imagesAutoplay, imagesAutoplaySpeed]);
|
|
50
45
|
var popupRef = useRef(null);
|
|
51
|
-
|
|
52
46
|
var _useState = useState(undefined),
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
47
|
+
visible = _useState[0],
|
|
48
|
+
setVisible = _useState[1];
|
|
56
49
|
useOnClickOutside(popupRef, function () {
|
|
57
50
|
setVisible(false);
|
|
58
51
|
});
|
|
@@ -99,6 +92,5 @@ var Popconfirm = function Popconfirm(_ref) {
|
|
|
99
92
|
}), okText)))
|
|
100
93
|
}));
|
|
101
94
|
};
|
|
102
|
-
|
|
103
95
|
Popconfirm.ConfirmMessage = ConfirmMessage;
|
|
104
96
|
export default Popconfirm;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure " + obj); }
|
|
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
|
import React from 'react';
|
|
6
4
|
import styled from 'styled-components';
|
|
7
5
|
import Popconfirm from 'antd/lib/popconfirm';
|
|
8
6
|
import Button from '@synerise/ds-button';
|
|
9
7
|
export var AntdPopconfirm = styled(function (_ref) {
|
|
10
8
|
var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
11
|
-
|
|
12
9
|
return /*#__PURE__*/React.createElement(Popconfirm, rest);
|
|
13
10
|
}).withConfig({
|
|
14
11
|
displayName: "Popconfirmstyles__AntdPopconfirm",
|
|
@@ -70,7 +67,7 @@ export var PopconfirmCloseIcon = styled.div.withConfig({
|
|
|
70
67
|
export var PopconfirmWrapper = styled.div.withConfig({
|
|
71
68
|
displayName: "Popconfirmstyles__PopconfirmWrapper",
|
|
72
69
|
componentId: "sc-19dzptq-9"
|
|
73
|
-
})(["display:flex;flex-direction:row;"]);
|
|
70
|
+
})(["display:flex;flex-direction:row;width:100%;justify-content:space-between;"]);
|
|
74
71
|
export var PopconfirmContentWrapper = styled.div.withConfig({
|
|
75
72
|
displayName: "Popconfirmstyles__PopconfirmContentWrapper",
|
|
76
73
|
componentId: "sc-19dzptq-10"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-popconfirm",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.61",
|
|
4
4
|
"description": "Popconfirm UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"react": ">=16.9.0 <= 17.0.2",
|
|
45
45
|
"styled-components": "5.0.1"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "e9897e5ecb13a9c022f5ed002db76e4ab78318c5"
|
|
48
48
|
}
|