@synerise/ds-select 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 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
+ # [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
+
6
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)
7
18
 
8
19
 
package/dist/Select.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { Component, type ReactNode } from 'react';
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 class Select extends Component<Props> {
6
- static Option: import("styled-components").StyledComponent<import("rc-select/lib/Option").OptionFC, any, {}, never>;
7
- static OptGroup: import("styled-components").StyledComponent<import("rc-select/lib/OptGroup").OptionGroupFC, any, {}, never>;
8
- render(): ReactNode;
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, { Component } from '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 = /*#__PURE__*/function (_Component) {
16
- function Select() {
17
- return _Component.apply(this, arguments) || this;
18
- }
19
- _inheritsLoose(Select, _Component);
20
- var _proto = Select.prototype;
21
- _proto.render = function render() {
22
- var _classNames;
23
- var _this$props = this.props,
24
- label = _this$props.label,
25
- description = _this$props.description,
26
- errorText = _this$props.errorText,
27
- error = _this$props.error,
28
- tooltip = _this$props.tooltip,
29
- tooltipConfig = _this$props.tooltipConfig,
30
- clearTooltip = _this$props.clearTooltip,
31
- prefixel = _this$props.prefixel,
32
- suffixel = _this$props.suffixel,
33
- style = _this$props.style,
34
- listHeight = _this$props.listHeight,
35
- className = _this$props.className,
36
- _this$props$getPopupC = _this$props.getPopupContainer,
37
- getPopupContainer = _this$props$getPopupC === void 0 ? defaultGetPopupContainer : _this$props$getPopupC,
38
- grey = _this$props.grey,
39
- dropdownClassName = _this$props.dropdownClassName,
40
- asFormElement = _this$props.asFormElement,
41
- raw = _this$props.raw,
42
- readOnly = _this$props.readOnly,
43
- disabled = _this$props.disabled,
44
- antdProps = _objectWithoutPropertiesLoose(_this$props, _excluded);
45
- var size = antdProps.size;
46
- var hasBottomMargin = asFormElement || Boolean(errorText || description);
47
- var simpleSelect = /*#__PURE__*/React.createElement(S.SelectWrapper, {
48
- grey: grey,
49
- error: Boolean(errorText),
50
- className: classNames('ds-select-wrapper', {
51
- error: errorText || error
52
- }, (_classNames = {}, _classNames[className] = !!className, _classNames)),
53
- style: style
54
- }, !!prefixel && /*#__PURE__*/React.createElement(S.PrefixWrapper, null, prefixel), /*#__PURE__*/React.createElement(S.AntdSelect, _extends({
55
- dropdownAlign: {
56
- offset: [0, 8]
57
- } // STOR-588
58
- }, antdProps, {
59
- getPopupContainer: getPopupContainer,
60
- listHeight: listHeight,
61
- size: size,
62
- withPrefixel: !!prefixel,
63
- withSuffixel: !!suffixel,
64
- disabled: disabled || readOnly,
65
- readOnly: readOnly,
66
- clearIcon: /*#__PURE__*/React.createElement(Tooltip, {
67
- title: clearTooltip
68
- }, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Icon, {
69
- component: /*#__PURE__*/React.createElement(Close3M, null),
70
- size: size === 'small' ? 18 : 24
71
- }))),
72
- removeIcon: /*#__PURE__*/React.createElement(Icon, {
73
- component: /*#__PURE__*/React.createElement(CloseS, null)
74
- }),
75
- className: classNames({
76
- error: errorText || error
77
- }),
78
- dropdownClassName: classNames('ps__child--consume', dropdownClassName)
79
- })), !!suffixel && /*#__PURE__*/React.createElement(S.SuffixWrapper, null, suffixel));
80
- return raw ? simpleSelect : /*#__PURE__*/React.createElement(S.SelectContainer, {
81
- className: "ds-select-container",
82
- hasBottomMargin: hasBottomMargin
83
- }, /*#__PURE__*/React.createElement(FormField, {
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-select",
3
- "version": "1.1.19",
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": "4f56489ade5b08524578821d0c51c963002ff48c"
50
+ "gitHead": "0f7fca0c2cea2b2ccc65e6c4643c071eab8be9a6"
51
51
  }