@synerise/ds-search-bar 1.3.18 → 1.4.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,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.4.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-search-bar@1.3.19...@synerise/ds-search-bar@1.4.0) (2025-11-06)
7
+
8
+
9
+ ### Features
10
+
11
+ * **dropdown:** dropdownMenu component ([f0ec827](https://github.com/Synerise/synerise-design/commit/f0ec82792cdcb021fa9a454912f6e7a892e53895))
12
+
13
+
14
+
15
+
16
+
17
+ ## [1.3.19](https://github.com/Synerise/synerise-design/compare/@synerise/ds-search-bar@1.3.18...@synerise/ds-search-bar@1.3.19) (2025-10-31)
18
+
19
+ **Note:** Version bump only for package @synerise/ds-search-bar
20
+
21
+
22
+
23
+
24
+
6
25
  ## [1.3.18](https://github.com/Synerise/synerise-design/compare/@synerise/ds-search-bar@1.3.17...@synerise/ds-search-bar@1.3.18) (2025-10-22)
7
26
 
8
27
  **Note:** Version bump only for package @synerise/ds-search-bar
@@ -1,4 +1,16 @@
1
1
  import React from 'react';
2
- import type { SearchBarProps } from './SearchBar.types';
3
- declare const SearchBar: ({ value, className, onSearchChange, onClearInput, placeholder, iconLeft, autofocus, clearTooltip, disabled, borderRadius, handleInputRef, autofocusDelay, clearTooltipProps, valuePrefix, ...htmlAttributes }: SearchBarProps) => React.JSX.Element;
2
+ declare const SearchBar: React.ForwardRefExoticComponent<Pick<import("@synerise/ds-input").InputProps, "handleInputRef"> & {
3
+ onSearchChange: (value: string) => void;
4
+ onClearInput?: () => void;
5
+ placeholder: React.ReactNode;
6
+ clearTooltip?: React.ReactNode;
7
+ value: string;
8
+ iconLeft?: React.ReactNode;
9
+ autofocus?: boolean;
10
+ autofocusDelay?: number;
11
+ disabled?: boolean;
12
+ borderRadius?: boolean;
13
+ clearTooltipProps?: Partial<import("@synerise/ds-tooltip").TooltipProps>;
14
+ valuePrefix?: React.ReactNode;
15
+ } & Omit<React.HTMLAttributes<HTMLDivElement>, "iconLeft" | "disabled" | "value" | "placeholder" | "handleInputRef" | "onSearchChange" | "onClearInput" | "clearTooltip" | "autofocus" | "autofocusDelay" | "borderRadius" | "clearTooltipProps" | "valuePrefix"> & import("@synerise/ds-utils").DataAttributes & React.RefAttributes<HTMLDivElement>>;
4
16
  export default SearchBar;
package/dist/SearchBar.js CHANGED
@@ -2,16 +2,16 @@ var _excluded = ["value", "className", "onSearchChange", "onClearInput", "placeh
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 classnames from 'classnames';
5
- import React, { useEffect, useMemo, useState } from 'react';
5
+ import React, { forwardRef, useEffect, useMemo, useState } from 'react';
6
6
  import { FormattedMessage } from 'react-intl';
7
- import { theme } from '@synerise/ds-core';
7
+ import { useTheme } from '@synerise/ds-core';
8
8
  import Icon, { Close3M } from '@synerise/ds-icon';
9
9
  import Tooltip from '@synerise/ds-tooltip';
10
10
  import { CLEAR_ICON_SIZE } from './SearchBar.constants';
11
11
  import * as S from './SearchBar.styles';
12
12
  import { ValuePrefix } from './ValuePrefix';
13
13
  var DEFAULT_PLACEHOLDER_STRING = 'Search';
14
- var SearchBar = function SearchBar(_ref) {
14
+ var SearchBar = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
15
15
  var value = _ref.value,
16
16
  className = _ref.className,
17
17
  onSearchChange = _ref.onSearchChange,
@@ -31,6 +31,7 @@ var SearchBar = function SearchBar(_ref) {
31
31
  clearTooltipProps = _ref.clearTooltipProps,
32
32
  valuePrefix = _ref.valuePrefix,
33
33
  htmlAttributes = _objectWithoutPropertiesLoose(_ref, _excluded);
34
+ var theme = useTheme();
34
35
  var _useState = useState(false),
35
36
  isFocused = _useState[0],
36
37
  setFocus = _useState[1];
@@ -80,7 +81,8 @@ var SearchBar = function SearchBar(_ref) {
80
81
  "data-testid": "input-wrapper",
81
82
  valuePrefixWidth: valuePrefixWidth
82
83
  }, htmlAttributes, {
83
- className: finalClassName
84
+ className: finalClassName,
85
+ ref: forwardedRef
84
86
  }), iconLeft && /*#__PURE__*/React.createElement(S.IconLeftWrapper, null, iconLeft), onClearInput && (Boolean(valuePrefix) || Boolean(value)) && /*#__PURE__*/React.createElement(S.ClearInputWrapper, {
85
87
  onClick: onClearInput,
86
88
  "data-testid": "clear-btn"
@@ -100,7 +102,7 @@ var SearchBar = function SearchBar(_ref) {
100
102
  onSearchChange(event.currentTarget.value);
101
103
  },
102
104
  onFocus: function onFocus() {
103
- setFocus(true);
105
+ return setFocus(true);
104
106
  },
105
107
  onBlur: function onBlur() {
106
108
  return setFocus(false);
@@ -112,5 +114,5 @@ var SearchBar = function SearchBar(_ref) {
112
114
  disabled: disabled,
113
115
  autoComplete: "off"
114
116
  }));
115
- };
117
+ });
116
118
  export default SearchBar;
@@ -5,7 +5,24 @@ export declare const ClearInputWrapper: import("styled-components").StyledCompon
5
5
  export declare const PlaceholderWrapper: import("styled-components").StyledComponent<"div", any, {
6
6
  valuePrefixWidth: number;
7
7
  }, never>;
8
- 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) => React.JSX.Element, any, {}, never>;
8
+ export declare const SearchBar: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<{
9
+ error?: boolean;
10
+ className?: string;
11
+ counterLimit?: number;
12
+ renderCustomCounter?: (count?: number) => React.ReactNode;
13
+ icon1?: React.ReactElement;
14
+ icon1Tooltip?: React.ReactElement;
15
+ icon2?: React.ReactElement;
16
+ icon2Tooltip?: React.ReactElement;
17
+ resetMargin?: boolean;
18
+ handleInputRef?: ((ref: React.MutableRefObject<HTMLInputElement | null>) => void) | undefined;
19
+ prefixel?: React.ReactNode;
20
+ suffixel?: React.ReactNode;
21
+ autoResize?: import("@synerise/ds-input").AutoResizeProp;
22
+ autoResizeProps?: Partial<Pick<import("@synerise/ds-input").AutosizeInputProps, "placeholderIsMinWidth" | "wrapperClassName" | "wrapperStyle" | "extraWidth">>;
23
+ expandable?: boolean;
24
+ expandableTooltip?: React.ReactNode;
25
+ } & Omit<import("@synerise/ds-form-field").ContentAboveProps, "id" | "rightSide"> & import("@synerise/ds-form-field").ContentBelowProps & import("antd/lib/input").InputProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
9
26
  export declare const SearchBarWrapper: import("styled-components").StyledComponent<"div", any, {
10
27
  iconLeft: React.ReactNode;
11
28
  isEmpty: boolean;
@@ -29,7 +29,7 @@ export var ClearInputWrapper = styled.div.withConfig({
29
29
  export var PlaceholderWrapper = styled.div.withConfig({
30
30
  displayName: "SearchBarstyles__PlaceholderWrapper",
31
31
  componentId: "sc-qhi5c4-4"
32
- })(["pointer-events:none;position:absolute;display:flex;align-items:center;z-index:2;height:52px;left:", "px;color:", ";line-height:18px;"], function (_ref2) {
32
+ })(["pointer-events:none;position:absolute;display:flex;white-space:nowrap;align-items:center;z-index:2;height:52px;left:", "px;color:", ";line-height:18px;"], function (_ref2) {
33
33
  var valuePrefixWidth = _ref2.valuePrefixWidth;
34
34
  return VALUE_PREFIX_WRAPPER_LEFT_VALUE + valuePrefixWidth + (valuePrefixWidth ? VALUE_PREFIX_WRAPPER_RIGHT_MARGIN : 0);
35
35
  }, function (props) {
@@ -49,7 +49,7 @@ export var SearchBar = styled(Input).withConfig({
49
49
  export var SearchBarWrapper = styled.div.withConfig({
50
50
  displayName: "SearchBarstyles__SearchBarWrapper",
51
51
  componentId: "sc-qhi5c4-6"
52
- })(["position:relative;overflow:hidden;border-bottom:1px solid ", ";pointer-events:", ";user-select:", ";border-radius:", ";&&&{svg{transition:all 0.3s ease-out;fill:", ";}input.ant-input{border-radius:0;line-height:18px;", "}&:hover{", "{svg{fill:", ";}}", "{svg{fill:", ";}}", "{color:", ";}}}&.is-focused{", "{svg{fill:", ";}}", "{svg{fill:", ";}}", "{color:", ";}}"], function (props) {
52
+ })(["position:relative;overflow:hidden;border-bottom:1px solid ", ";pointer-events:", ";user-select:", ";border-radius:", ";min-width:150px;&&&{svg{transition:all 0.3s ease-out;fill:", ";}input.ant-input{border-radius:0;line-height:18px;", "}&:hover{", "{svg{fill:", ";}}", "{svg{fill:", ";}}", "{color:", ";}}}&.is-focused{", "{svg{fill:", ";}}", "{svg{fill:", ";}}", "{color:", ";}}"], function (props) {
53
53
  return props.theme.palette['grey-100'];
54
54
  }, function (props) {
55
55
  return props.disabled ? 'none' : '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-search-bar",
3
- "version": "1.3.18",
3
+ "version": "1.4.0",
4
4
  "description": "SearchBar UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -35,9 +35,9 @@
35
35
  ],
36
36
  "types": "dist/index.d.ts",
37
37
  "dependencies": {
38
- "@synerise/ds-icon": "^1.7.3",
39
- "@synerise/ds-input": "^1.4.1",
40
- "@synerise/ds-tooltip": "^1.2.1",
38
+ "@synerise/ds-icon": "^1.8.0",
39
+ "@synerise/ds-input": "^1.5.0",
40
+ "@synerise/ds-tooltip": "^1.3.0",
41
41
  "@synerise/ds-utils": "^1.5.0",
42
42
  "classnames": "^2.5.1"
43
43
  },
@@ -47,5 +47,5 @@
47
47
  "react-intl": ">=3.12.0 <= 6.8",
48
48
  "styled-components": "^5.3.3"
49
49
  },
50
- "gitHead": "a40fca2cc78eda64afa96d18dc4d177538a22404"
50
+ "gitHead": "cbbb7d9f155735bcc4035d8fd8a7813878d6e051"
51
51
  }