@synerise/ds-search-bar 1.3.2 → 1.3.4

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/dist/SearchBar.js CHANGED
@@ -1,15 +1,15 @@
1
1
  var _excluded = ["value", "className", "onSearchChange", "onClearInput", "placeholder", "iconLeft", "autofocus", "clearTooltip", "disabled", "borderRadius", "handleInputRef", "autofocusDelay", "clearTooltipProps", "valuePrefix"];
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 classnames from 'classnames';
4
5
  import React, { useEffect, useMemo, useState } from 'react';
5
6
  import { FormattedMessage } from 'react-intl';
6
- import classnames from 'classnames';
7
- import Icon, { Close3M } from '@synerise/ds-icon';
8
7
  import { theme } from '@synerise/ds-core';
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
- import { ValuePrefix } from './ValuePrefix';
12
11
  import * as S from './SearchBar.styles';
12
+ import { ValuePrefix } from './ValuePrefix';
13
13
  var DEFAULT_PLACEHOLDER_STRING = 'Search';
14
14
  var SearchBar = function SearchBar(_ref) {
15
15
  var value = _ref.value,
@@ -41,9 +41,10 @@ var SearchBar = function SearchBar(_ref) {
41
41
  valuePrefixWidth = _useState3[0],
42
42
  setValuePrefixWidth = _useState3[1];
43
43
  var handleRef = function handleRef(ref) {
44
- // eslint-disable-next-line no-unused-expressions
45
44
  handleInputRef == null || handleInputRef(ref);
46
- if (ref.current) setInput(ref.current);
45
+ if (ref.current) {
46
+ setInput(ref.current);
47
+ }
47
48
  };
48
49
  useEffect(function () {
49
50
  if (input) {
@@ -1,8 +1,7 @@
1
- import React from 'react';
2
- import type { ReactNode, Dispatch, SetStateAction } from 'react';
1
+ import React, { type Dispatch, type ReactNode, type SetStateAction } from 'react';
3
2
  type ValuePrefixProps = {
4
3
  value: ReactNode;
5
4
  setValuePrefixWidth: Dispatch<SetStateAction<number>>;
6
5
  };
7
- export declare const ValuePrefix: ({ value, setValuePrefixWidth }: ValuePrefixProps) => React.JSX.Element;
6
+ export declare const ValuePrefix: ({ value, setValuePrefixWidth, }: ValuePrefixProps) => React.JSX.Element;
8
7
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-search-bar",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "description": "SearchBar UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -34,10 +34,10 @@
34
34
  ],
35
35
  "types": "dist/index.d.ts",
36
36
  "dependencies": {
37
- "@synerise/ds-icon": "^1.5.3",
38
- "@synerise/ds-input": "^1.3.0",
39
- "@synerise/ds-tooltip": "^1.1.10",
40
- "@synerise/ds-utils": "^1.3.0",
37
+ "@synerise/ds-icon": "^1.5.4",
38
+ "@synerise/ds-input": "^1.3.2",
39
+ "@synerise/ds-tooltip": "^1.1.12",
40
+ "@synerise/ds-utils": "^1.3.1",
41
41
  "classnames": "^2.5.1"
42
42
  },
43
43
  "peerDependencies": {
@@ -46,5 +46,5 @@
46
46
  "react-intl": ">=3.12.0 <= 6.8",
47
47
  "styled-components": "^5.3.3"
48
48
  },
49
- "gitHead": "f2713cd35cfe22f63a159f05144585834897a132"
49
+ "gitHead": "4512641033ba3581a3df208143c547fcfed45895"
50
50
  }