cozy-search 0.2.0 → 0.3.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.
@@ -6,9 +6,10 @@ declare namespace AssistantDesktop {
6
6
  namespace propTypes {
7
7
  let componentsProps: PropTypes.Requireable<PropTypes.InferProps<{
8
8
  SearchBarDesktop: PropTypes.Requireable<PropTypes.InferProps<{
9
- elevation: PropTypes.Requireable<boolean>;
9
+ elevation: PropTypes.Requireable<number>;
10
10
  size: PropTypes.Requireable<string>;
11
11
  hasHalfBorderRadius: PropTypes.Requireable<boolean>;
12
+ className: PropTypes.Requireable<string>;
12
13
  }>>;
13
14
  }>>;
14
15
  }
@@ -34,9 +34,10 @@ var AssistantDesktop = function AssistantDesktop(_ref) {
34
34
  AssistantDesktop.propTypes = {
35
35
  componentsProps: _propTypes.default.shape({
36
36
  SearchBarDesktop: _propTypes.default.shape({
37
- elevation: _propTypes.default.bool,
37
+ elevation: _propTypes.default.number,
38
38
  size: _propTypes.default.string,
39
- hasHalfBorderRadius: _propTypes.default.bool
39
+ hasHalfBorderRadius: _propTypes.default.bool,
40
+ className: _propTypes.default.string
40
41
  })
41
42
  })
42
43
  };
@@ -1,15 +1,16 @@
1
1
  export default SearchBarDesktop;
2
- declare function SearchBarDesktop({ value, onClear, onChange, elevation, size, hasHalfBorderRadius }: {
2
+ declare function SearchBarDesktop({ value, onClear, onChange, elevation, size, hasHalfBorderRadius, className }: {
3
3
  value: any;
4
4
  onClear: any;
5
5
  onChange: any;
6
6
  elevation: any;
7
7
  size: any;
8
8
  hasHalfBorderRadius: any;
9
+ className: any;
9
10
  }): JSX.Element;
10
11
  declare namespace SearchBarDesktop {
11
12
  namespace defaultProps {
12
13
  let size: string;
13
- let elevation: boolean;
14
+ let elevation: number;
14
15
  }
15
16
  }
@@ -7,6 +7,8 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.default = void 0;
9
9
 
10
+ var _classnames = _interopRequireDefault(require("classnames"));
11
+
10
12
  var _react = _interopRequireWildcard(require("react"));
11
13
 
12
14
  var _reactRouterDom = require("react-router-dom");
@@ -48,7 +50,8 @@ var SearchBarDesktop = function SearchBarDesktop(_ref) {
48
50
  onChange = _ref.onChange,
49
51
  elevation = _ref.elevation,
50
52
  size = _ref.size,
51
- hasHalfBorderRadius = _ref.hasHalfBorderRadius;
53
+ hasHalfBorderRadius = _ref.hasHalfBorderRadius,
54
+ className = _ref.className;
52
55
 
53
56
  var _useI18n = (0, _I18n.useI18n)(),
54
57
  t = _useI18n.t;
@@ -133,7 +136,7 @@ var SearchBarDesktop = function SearchBarDesktop(_ref) {
133
136
  onClickAway: onClear
134
137
  }, /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(_SearchBar.default, {
135
138
  elevation: elevation,
136
- className: searchValue && hasHalfBorderRadius ? styles['searchBarDesktop--result'] : '',
139
+ className: (0, _classnames.default)(className, searchValue && hasHalfBorderRadius ? styles['searchBarDesktop--result'] : ''),
137
140
  ref: searchRef,
138
141
  size: size,
139
142
  icon: size === 'large' ? /*#__PURE__*/_react.default.createElement(_Icon.default, {
@@ -165,7 +168,7 @@ var SearchBarDesktop = function SearchBarDesktop(_ref) {
165
168
 
166
169
  SearchBarDesktop.defaultProps = {
167
170
  size: 'large',
168
- elevation: false
171
+ elevation: 0
169
172
  };
170
173
  var _default = SearchBarDesktop;
171
174
  exports.default = _default;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cozy-search",
3
3
  "description": "UI components about search bar and IA assistant",
4
- "version": "0.2.0",
4
+ "version": "0.3.0",
5
5
  "author": {
6
6
  "name": "Cozy Cloud",
7
7
  "url": "https://github.com/cozy"
@@ -33,7 +33,7 @@
33
33
  "cozy-minilog": "^3.10.0",
34
34
  "cozy-pouch-link": "^54.0.0",
35
35
  "cozy-realtime": "^5.6.4",
36
- "cozy-ui": "^121.5.0",
36
+ "cozy-ui": "^122.0.0",
37
37
  "cross-fetch": "^4.0.0",
38
38
  "jest": "26.6.3",
39
39
  "react": "16.12.0",
@@ -65,7 +65,7 @@
65
65
  "cozy-minilog": ">=3.3.1",
66
66
  "cozy-pouch-link": "54.0.0",
67
67
  "cozy-realtime": ">=5.6.4",
68
- "cozy-ui": ">=121.5.0",
68
+ "cozy-ui": ">=122.0.0",
69
69
  "react": ">=16.12.0",
70
70
  "react-dom": ">=16.12.0",
71
71
  "react-router-dom": "^6.28.0"
@@ -87,5 +87,5 @@
87
87
  "lint": "cd .. && yarn eslint --ext js,jsx,ts packages/cozy-search"
88
88
  },
89
89
  "types": "dist/index.d.ts",
90
- "gitHead": "d2122e0f9492fa7c715991843f5a8f644ef202e4"
90
+ "gitHead": "a55e06271c52f164be6d3e53a18440cd1352a471"
91
91
  }