@synerise/ds-search-bar 1.1.4 → 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-search-bar@1.1.4...@synerise/ds-search-bar@1.2.0) (2025-06-05)
7
+
8
+
9
+ ### Features
10
+
11
+ * **column-manager:** removed unnecessary features ([152d3c0](https://github.com/Synerise/synerise-design/commit/152d3c0d87449977f8c4264bb7abd278210470e9))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [1.1.4](https://github.com/Synerise/synerise-design/compare/@synerise/ds-search-bar@1.1.3...@synerise/ds-search-bar@1.1.4) (2025-05-26)
7
18
 
8
19
  **Note:** Version bump only for package @synerise/ds-search-bar
package/dist/SearchBar.js CHANGED
@@ -1,8 +1,9 @@
1
1
  var _excluded = ["value", "className", "onSearchChange", "onClearInput", "placeholder", "iconLeft", "autofocus", "clearTooltip", "disabled", "borderRadius", "handleInputRef", "autofocusDelay", "clearTooltipProps"];
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
- import React, { useEffect, useState } from 'react';
4
+ import React, { useEffect, useMemo, useState } from 'react';
5
5
  import { FormattedMessage } from 'react-intl';
6
+ import classnames from 'classnames';
6
7
  import Icon, { Close3M } from '@synerise/ds-icon';
7
8
  import { theme } from '@synerise/ds-core';
8
9
  import Tooltip from '@synerise/ds-tooltip';
@@ -59,14 +60,20 @@ var SearchBar = function SearchBar(_ref) {
59
60
  return undefined;
60
61
  }, [autofocus, autofocusDelay, input]);
61
62
  var placeholderString = typeof placeholder === 'string' ? placeholder : DEFAULT_PLACEHOLDER_STRING;
63
+ var finalClassName = useMemo(function () {
64
+ return classnames(className, {
65
+ 'is-focused': isFocused
66
+ });
67
+ }, [className, isFocused]);
62
68
  return /*#__PURE__*/React.createElement(S.SearchBarWrapper, _extends({
63
69
  iconLeft: iconLeft,
64
70
  isEmpty: !value,
65
- className: isFocused ? 'is-focused' : '',
66
71
  disabled: disabled,
67
72
  borderRadius: borderRadius,
68
73
  "data-testid": "input-wrapper"
69
- }, htmlAttributes), iconLeft && /*#__PURE__*/React.createElement(S.IconLeftWrapper, null, iconLeft), onClearInput && Boolean(value) && /*#__PURE__*/React.createElement(S.ClearInputWrapper, {
74
+ }, htmlAttributes, {
75
+ className: finalClassName
76
+ }), iconLeft && /*#__PURE__*/React.createElement(S.IconLeftWrapper, null, iconLeft), onClearInput && Boolean(value) && /*#__PURE__*/React.createElement(S.ClearInputWrapper, {
70
77
  onClick: onClearInput,
71
78
  "data-testid": "clear-btn"
72
79
  }, /*#__PURE__*/React.createElement(Icon, {
@@ -86,7 +93,6 @@ var SearchBar = function SearchBar(_ref) {
86
93
  return setFocus(false);
87
94
  },
88
95
  value: value,
89
- className: className,
90
96
  resetMargin: true,
91
97
  placeholder: placeholderString,
92
98
  handleInputRef: handleRef,
@@ -2,7 +2,7 @@
2
2
  export declare const IconLeftWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
3
3
  export declare const ClearInputWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
4
4
  export declare const PlaceholderWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
5
- export declare const SearchBar: import("styled-components").StyledComponent<({ className, errorText, label, description, counterLimit, tooltip, tooltipConfig, icon1, icon1Tooltip, autoResize, icon2, icon2Tooltip, resetMargin, handleInputRef, prefixel, suffixel, error, expandable, expandableTooltip, renderCustomCounter, ...antdInputProps }: import("@synerise/ds-input").InputProps) => import("react").JSX.Element, any, {}, never>;
5
+ export declare const SearchBar: import("styled-components").StyledComponent<({ className, errorText, label, description, counterLimit, tooltip, tooltipConfig, icon1, icon1Tooltip, autoResize, icon2, icon2Tooltip, resetMargin, handleInputRef, prefixel, suffixel, error, expandable, expandableTooltip, renderCustomCounter, autoResizeProps, ...antdInputProps }: import("@synerise/ds-input").InputProps) => import("react").JSX.Element, any, {}, never>;
6
6
  export declare const SearchBarWrapper: import("styled-components").StyledComponent<"div", any, {
7
7
  iconLeft: React.ReactNode;
8
8
  isEmpty: boolean;
@@ -6,7 +6,6 @@ export type SearchBarProps = WithHTMLAttributes<HTMLDivElement, Pick<InputProps,
6
6
  onSearchChange: (value: string) => void;
7
7
  onClearInput?: () => void;
8
8
  placeholder: ReactNode;
9
- className?: string;
10
9
  clearTooltip?: ReactNode;
11
10
  value: string;
12
11
  iconLeft?: ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-search-bar",
3
- "version": "1.1.4",
3
+ "version": "1.2.0",
4
4
  "description": "SearchBar UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -34,10 +34,11 @@
34
34
  ],
35
35
  "types": "dist/index.d.ts",
36
36
  "dependencies": {
37
- "@synerise/ds-icon": "^1.5.1",
38
- "@synerise/ds-input": "^1.1.4",
39
- "@synerise/ds-tooltip": "^1.1.8",
40
- "@synerise/ds-utils": "^1.1.1"
37
+ "@synerise/ds-icon": "^1.5.2",
38
+ "@synerise/ds-input": "^1.2.0",
39
+ "@synerise/ds-tooltip": "^1.1.9",
40
+ "@synerise/ds-utils": "^1.2.0",
41
+ "classnames": "^2.5.1"
41
42
  },
42
43
  "peerDependencies": {
43
44
  "@synerise/ds-core": "*",
@@ -45,5 +46,5 @@
45
46
  "react-intl": ">=3.12.0 <= 6.8",
46
47
  "styled-components": "^5.3.3"
47
48
  },
48
- "gitHead": "9e9cc54e3690b4d51323f91c81b3b79305984da6"
49
+ "gitHead": "93bc81d59d20bc8f3bc80c5d56ae7f7c0838380d"
49
50
  }