@synerise/ds-select 1.1.18 → 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 +22 -0
- package/dist/Select.d.ts +6 -6
- package/dist/Select.js +71 -82
- package/dist/Select.styles.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
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-select@1.1.19...@synerise/ds-select@1.2.0) (2025-09-24)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **select:** refactor select component ([3b63570](https://github.com/synerise/synerise-design/commit/3b6357056d44051a7f1807ac9ff650c85980056d))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [1.1.19](https://github.com/synerise/synerise-design/compare/@synerise/ds-select@1.1.18...@synerise/ds-select@1.1.19) (2025-09-23)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **select:** raise style specificity ([e640060](https://github.com/synerise/synerise-design/commit/e640060afd414886fe4e4e5c838c3c1b5c0bbf13))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
## [1.1.18](https://github.com/synerise/synerise-design/compare/@synerise/ds-select@1.1.17...@synerise/ds-select@1.1.18) (2025-09-19)
|
|
7
29
|
|
|
8
30
|
**Note:** Version bump only for package @synerise/ds-select
|
package/dist/Select.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import '@synerise/ds-core/dist/js/style';
|
|
3
3
|
import { type Props } from './Select.types';
|
|
4
4
|
import './style/index.less';
|
|
5
|
-
declare
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
5
|
+
export declare const Select: {
|
|
6
|
+
({ label, description, errorText, error, tooltip, tooltipConfig, clearTooltip, prefixel, suffixel, style, size, listHeight, className, getPopupContainer, grey, dropdownClassName, asFormElement, raw, readOnly, disabled, ...antdProps }: Props): React.JSX.Element;
|
|
7
|
+
Option: import("styled-components").StyledComponent<import("rc-select/lib/Option").OptionFC, any, {}, never>;
|
|
8
|
+
OptGroup: import("styled-components").StyledComponent<import("rc-select/lib/OptGroup").OptionGroupFC, any, {}, never>;
|
|
9
|
+
};
|
|
10
10
|
export default Select;
|
package/dist/Select.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
var _excluded = ["label", "description", "errorText", "error", "tooltip", "tooltipConfig", "clearTooltip", "prefixel", "suffixel", "style", "listHeight", "className", "getPopupContainer", "grey", "dropdownClassName", "asFormElement", "raw", "readOnly", "disabled"];
|
|
1
|
+
var _excluded = ["label", "description", "errorText", "error", "tooltip", "tooltipConfig", "clearTooltip", "prefixel", "suffixel", "style", "size", "listHeight", "className", "getPopupContainer", "grey", "dropdownClassName", "asFormElement", "raw", "readOnly", "disabled"];
|
|
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
|
-
function _inheritsLoose(t, o) { t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o); }
|
|
5
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
6
4
|
import classNames from 'classnames';
|
|
7
|
-
import React
|
|
5
|
+
import React from 'react';
|
|
8
6
|
import '@synerise/ds-core/dist/js/style';
|
|
9
7
|
import FormField from '@synerise/ds-form-field';
|
|
10
8
|
import Icon, { Close3M, CloseS } from '@synerise/ds-icon';
|
|
@@ -12,84 +10,75 @@ import Tooltip from '@synerise/ds-tooltip';
|
|
|
12
10
|
import { getPopupContainer as defaultGetPopupContainer } from '@synerise/ds-utils';
|
|
13
11
|
import * as S from './Select.styles';
|
|
14
12
|
import "./style/index.css";
|
|
15
|
-
var Select =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
errorText: errorText,
|
|
85
|
-
description: description,
|
|
86
|
-
label: label,
|
|
87
|
-
tooltip: tooltip,
|
|
88
|
-
tooltipConfig: tooltipConfig
|
|
89
|
-
}, simpleSelect));
|
|
90
|
-
};
|
|
91
|
-
return Select;
|
|
92
|
-
}(Component);
|
|
13
|
+
export var Select = function Select(_ref) {
|
|
14
|
+
var _classNames;
|
|
15
|
+
var label = _ref.label,
|
|
16
|
+
description = _ref.description,
|
|
17
|
+
errorText = _ref.errorText,
|
|
18
|
+
error = _ref.error,
|
|
19
|
+
tooltip = _ref.tooltip,
|
|
20
|
+
tooltipConfig = _ref.tooltipConfig,
|
|
21
|
+
clearTooltip = _ref.clearTooltip,
|
|
22
|
+
prefixel = _ref.prefixel,
|
|
23
|
+
suffixel = _ref.suffixel,
|
|
24
|
+
style = _ref.style,
|
|
25
|
+
size = _ref.size,
|
|
26
|
+
listHeight = _ref.listHeight,
|
|
27
|
+
className = _ref.className,
|
|
28
|
+
_ref$getPopupContaine = _ref.getPopupContainer,
|
|
29
|
+
getPopupContainer = _ref$getPopupContaine === void 0 ? defaultGetPopupContainer : _ref$getPopupContaine,
|
|
30
|
+
grey = _ref.grey,
|
|
31
|
+
dropdownClassName = _ref.dropdownClassName,
|
|
32
|
+
asFormElement = _ref.asFormElement,
|
|
33
|
+
raw = _ref.raw,
|
|
34
|
+
readOnly = _ref.readOnly,
|
|
35
|
+
disabled = _ref.disabled,
|
|
36
|
+
antdProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
37
|
+
var hasBottomMargin = asFormElement || Boolean(errorText || description);
|
|
38
|
+
var simpleSelect = /*#__PURE__*/React.createElement(S.SelectWrapper, {
|
|
39
|
+
grey: grey,
|
|
40
|
+
error: Boolean(errorText),
|
|
41
|
+
className: classNames('ds-select-wrapper', {
|
|
42
|
+
error: errorText || error
|
|
43
|
+
}, (_classNames = {}, _classNames[className] = !!className, _classNames)),
|
|
44
|
+
style: style
|
|
45
|
+
}, !!prefixel && /*#__PURE__*/React.createElement(S.PrefixWrapper, null, prefixel), /*#__PURE__*/React.createElement(S.AntdSelect, _extends({
|
|
46
|
+
dropdownAlign: {
|
|
47
|
+
offset: [0, 8]
|
|
48
|
+
} // STOR-588
|
|
49
|
+
}, antdProps, {
|
|
50
|
+
getPopupContainer: getPopupContainer,
|
|
51
|
+
listHeight: listHeight,
|
|
52
|
+
size: size,
|
|
53
|
+
withPrefixel: !!prefixel,
|
|
54
|
+
withSuffixel: !!suffixel,
|
|
55
|
+
disabled: disabled || readOnly,
|
|
56
|
+
readOnly: readOnly,
|
|
57
|
+
clearIcon: /*#__PURE__*/React.createElement(Tooltip, {
|
|
58
|
+
title: clearTooltip
|
|
59
|
+
}, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Icon, {
|
|
60
|
+
component: /*#__PURE__*/React.createElement(Close3M, null),
|
|
61
|
+
size: size === 'small' ? 18 : 24
|
|
62
|
+
}))),
|
|
63
|
+
removeIcon: /*#__PURE__*/React.createElement(Icon, {
|
|
64
|
+
component: /*#__PURE__*/React.createElement(CloseS, null)
|
|
65
|
+
}),
|
|
66
|
+
className: classNames({
|
|
67
|
+
error: errorText || error
|
|
68
|
+
}),
|
|
69
|
+
dropdownClassName: classNames('ps__child--consume', dropdownClassName)
|
|
70
|
+
})), !!suffixel && /*#__PURE__*/React.createElement(S.SuffixWrapper, null, suffixel));
|
|
71
|
+
return raw ? simpleSelect : /*#__PURE__*/React.createElement(S.SelectContainer, {
|
|
72
|
+
className: "ds-select-container",
|
|
73
|
+
hasBottomMargin: hasBottomMargin
|
|
74
|
+
}, /*#__PURE__*/React.createElement(FormField, {
|
|
75
|
+
errorText: errorText,
|
|
76
|
+
description: description,
|
|
77
|
+
label: label,
|
|
78
|
+
tooltip: tooltip,
|
|
79
|
+
tooltipConfig: tooltipConfig
|
|
80
|
+
}, simpleSelect));
|
|
81
|
+
};
|
|
93
82
|
Select.Option = S.AntdSelectOption;
|
|
94
83
|
Select.OptGroup = S.AntdSelectOptGroup;
|
|
95
84
|
export default Select;
|
package/dist/Select.styles.js
CHANGED
|
@@ -73,5 +73,5 @@ export var SelectWrapper = styled.div.withConfig({
|
|
|
73
73
|
displayName: "Selectstyles__SelectWrapper",
|
|
74
74
|
componentId: "sc-n9lk0v-6"
|
|
75
75
|
})(["display:flex;", ""], function (props) {
|
|
76
|
-
return props.grey && !props.error && css(["
|
|
76
|
+
return props.grey && !props.error && css(["&&&{.ant-select-selector{background-color:", ";}}"], props.theme.palette['grey-050']);
|
|
77
77
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-select",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Select UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "synerise/synerise-design",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"react": ">=16.9.0 <= 18.3.1",
|
|
48
48
|
"styled-components": "^5.3.3"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "0f7fca0c2cea2b2ccc65e6c4643c071eab8be9a6"
|
|
51
51
|
}
|