cozy-ui 122.1.1 → 122.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/.bundlemonrc
CHANGED
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
"baseDir": ".",
|
|
3
3
|
"files": [
|
|
4
4
|
{
|
|
5
|
-
"path": "dist/cozy-ui.min.css"
|
|
6
|
-
"maxPercentIncrease": 10
|
|
5
|
+
"path": "dist/cozy-ui.min.css"
|
|
7
6
|
},
|
|
8
7
|
{
|
|
9
|
-
"path": "dist/cozy-ui.utils.min.css"
|
|
10
|
-
"maxPercentIncrease": 10
|
|
8
|
+
"path": "dist/cozy-ui.utils.min.css"
|
|
11
9
|
},
|
|
12
10
|
{
|
|
13
11
|
"path": "transpiled/react/stylesheet.css"
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [122.2.0](https://github.com/cozy/cozy-ui/compare/v122.1.1...v122.2.0) (2025-04-10)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **SearchBar:** Allow to disable hover ([7c97fe1](https://github.com/cozy/cozy-ui/commit/7c97fe1))
|
|
7
|
+
|
|
1
8
|
## [122.1.1](https://github.com/cozy/cozy-ui/compare/v122.1.0...v122.1.1) (2025-04-09)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@ import Radio from 'cozy-ui/transpiled/react/Radios'
|
|
|
10
10
|
import FormControl from 'cozy-ui/transpiled/react/FormControl'
|
|
11
11
|
import FormLabel from 'cozy-ui/transpiled/react/FormLabel'
|
|
12
12
|
|
|
13
|
-
const initialVariants = [{ button: false, customIcon: false, disabledClear: false }]
|
|
13
|
+
const initialVariants = [{ button: false, customIcon: false, disabledClear: false, disabledHover: false }]
|
|
14
14
|
initialState = { size: 'small' }
|
|
15
15
|
|
|
16
16
|
;
|
|
@@ -55,6 +55,7 @@ initialState = { size: 'small' }
|
|
|
55
55
|
elevation={0}
|
|
56
56
|
size={state.size}
|
|
57
57
|
disabledClear={variant.disabledClear}
|
|
58
|
+
disabledHover={variant.disabledHover}
|
|
58
59
|
type={variant.button ? "button" : "search"}
|
|
59
60
|
icon={variant.customIcon ? CloudIcon : undefined}
|
|
60
61
|
label={variant.button ? <Typography color="primary">This is a label</Typography> : undefined}
|
|
@@ -64,6 +65,7 @@ initialState = { size: 'small' }
|
|
|
64
65
|
elevation={10}
|
|
65
66
|
size={state.size}
|
|
66
67
|
disabledClear={variant.disabledClear}
|
|
68
|
+
disabledHover={variant.disabledHover}
|
|
67
69
|
type={variant.button ? "button" : "search"}
|
|
68
70
|
icon={variant.customIcon ? CloudIcon : undefined}
|
|
69
71
|
label={variant.button ? <Typography color="primary">This is a label</Typography> : undefined}
|
|
@@ -73,6 +75,7 @@ initialState = { size: 'small' }
|
|
|
73
75
|
disabled
|
|
74
76
|
size={state.size}
|
|
75
77
|
disabledClear={variant.disabledClear}
|
|
78
|
+
disabledHover={variant.disabledHover}
|
|
76
79
|
type={variant.button ? "button" : "search"}
|
|
77
80
|
icon={variant.customIcon ? CloudIcon : undefined}
|
|
78
81
|
label={variant.button ? <Typography color="primary">This is a label</Typography> : undefined}
|
|
@@ -132,6 +132,7 @@ const SearchBar = forwardRef(
|
|
|
132
132
|
componentsProps,
|
|
133
133
|
disabledClear,
|
|
134
134
|
disabledFocus,
|
|
135
|
+
disabledHover,
|
|
135
136
|
className,
|
|
136
137
|
defaultValue,
|
|
137
138
|
value,
|
|
@@ -232,7 +233,11 @@ const SearchBar = forwardRef(
|
|
|
232
233
|
<Icon icon={isTwakeTheme() ? CrossIcon : CrossCircleIcon} />
|
|
233
234
|
</IconButton>
|
|
234
235
|
)}
|
|
235
|
-
|
|
236
|
+
{!disabledHover && (
|
|
237
|
+
<span
|
|
238
|
+
className={cx(classes.commonHighlight, classes.focusHighlight)}
|
|
239
|
+
/>
|
|
240
|
+
)}
|
|
236
241
|
{disabled && (
|
|
237
242
|
<span
|
|
238
243
|
className={cx(classes.commonHighlight, classes.disableHighlight)}
|
|
@@ -252,6 +257,7 @@ SearchBar.defaultProps = {
|
|
|
252
257
|
type: 'search',
|
|
253
258
|
disabledClear: false,
|
|
254
259
|
disabledFocus: false,
|
|
260
|
+
disabledHover: false,
|
|
255
261
|
defaultValue: '',
|
|
256
262
|
onChange: () => {},
|
|
257
263
|
onFocus: () => {},
|
|
@@ -274,6 +280,7 @@ SearchBar.propTypes = {
|
|
|
274
280
|
defaultValue: PropTypes.string,
|
|
275
281
|
disabledClear: PropTypes.bool,
|
|
276
282
|
disabledFocus: PropTypes.bool,
|
|
283
|
+
disabledHover: PropTypes.bool,
|
|
277
284
|
elevation: PropTypes.number,
|
|
278
285
|
placeholder: PropTypes.string,
|
|
279
286
|
label: PropTypes.oneOfType([
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["placeholder", "icon", "size", "type", "label", "componentsProps", "disabledClear", "disabledFocus", "className", "defaultValue", "value", "elevation", "disabled", "onChange", "onClear", "onFocus", "onBlur"];
|
|
5
|
+
var _excluded = ["placeholder", "icon", "size", "type", "label", "componentsProps", "disabledClear", "disabledFocus", "disabledHover", "className", "defaultValue", "value", "elevation", "disabled", "onChange", "onClear", "onFocus", "onBlur"];
|
|
6
6
|
|
|
7
7
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8
8
|
|
|
@@ -149,6 +149,7 @@ var SearchBar = /*#__PURE__*/forwardRef(function (_ref6, ref) {
|
|
|
149
149
|
componentsProps = _ref6.componentsProps,
|
|
150
150
|
disabledClear = _ref6.disabledClear,
|
|
151
151
|
disabledFocus = _ref6.disabledFocus,
|
|
152
|
+
disabledHover = _ref6.disabledHover,
|
|
152
153
|
className = _ref6.className,
|
|
153
154
|
defaultValue = _ref6.defaultValue,
|
|
154
155
|
value = _ref6.value,
|
|
@@ -248,7 +249,7 @@ var SearchBar = /*#__PURE__*/forwardRef(function (_ref6, ref) {
|
|
|
248
249
|
onClick: handleClear
|
|
249
250
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
250
251
|
icon: isTwakeTheme() ? CrossIcon : CrossCircleIcon
|
|
251
|
-
})), /*#__PURE__*/React.createElement("span", {
|
|
252
|
+
})), !disabledHover && /*#__PURE__*/React.createElement("span", {
|
|
252
253
|
className: cx(classes.commonHighlight, classes.focusHighlight)
|
|
253
254
|
}), disabled && /*#__PURE__*/React.createElement("span", {
|
|
254
255
|
className: cx(classes.commonHighlight, classes.disableHighlight)
|
|
@@ -262,6 +263,7 @@ SearchBar.defaultProps = {
|
|
|
262
263
|
type: 'search',
|
|
263
264
|
disabledClear: false,
|
|
264
265
|
disabledFocus: false,
|
|
266
|
+
disabledHover: false,
|
|
265
267
|
defaultValue: '',
|
|
266
268
|
onChange: function onChange() {},
|
|
267
269
|
onFocus: function onFocus() {},
|
|
@@ -285,6 +287,7 @@ SearchBar.propTypes = {
|
|
|
285
287
|
defaultValue: PropTypes.string,
|
|
286
288
|
disabledClear: PropTypes.bool,
|
|
287
289
|
disabledFocus: PropTypes.bool,
|
|
290
|
+
disabledHover: PropTypes.bool,
|
|
288
291
|
elevation: PropTypes.number,
|
|
289
292
|
placeholder: PropTypes.string,
|
|
290
293
|
label: PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.object]),
|