cozy-ui 111.18.1 → 111.20.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 +19 -0
- package/assets/icons/ui/tab.svg +1 -0
- package/package.json +1 -1
- package/react/Icon/Readme.md +3 -1
- package/react/Icons/Tab.jsx +16 -0
- package/react/SearchBar/index.jsx +11 -4
- package/transpiled/react/Icon/icons-sprite.js +1 -1
- package/transpiled/react/Icons/Tab.js +15 -0
- package/transpiled/react/SearchBar/index.js +14 -7
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
// Automatically created, please run `scripts/generate-svgr-icon.sh assets/icons/ui/tab.svg` to regenerate;
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
5
|
+
function SvgTab(props) {
|
|
6
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
7
|
+
viewBox: "0 0 16 16"
|
|
8
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
9
|
+
fillRule: "evenodd",
|
|
10
|
+
clipRule: "evenodd",
|
|
11
|
+
d: "M13 12v1a2 2 0 01-2 2H2a2 2 0 01-2-2V6a2 2 0 012-2h1V3a2 2 0 012-2h9a2 2 0 012 2v7a2 2 0 01-2 2h-1zm1-9H5v1h6a2 2 0 012 2v4h1V3zM2 6h9v7H2V6z"
|
|
12
|
+
}));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default SvgTab;
|
|
@@ -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", "className", "defaultValue", "value", "elevation", "disabled", "onChange", "onFocus", "onBlur"];
|
|
5
|
+
var _excluded = ["placeholder", "icon", "size", "type", "label", "componentsProps", "disabledClear", "disabledFocus", "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
|
|
|
@@ -135,12 +135,14 @@ var SearchBar = /*#__PURE__*/forwardRef(function (_ref5, ref) {
|
|
|
135
135
|
labelProp = _ref5.label,
|
|
136
136
|
componentsProps = _ref5.componentsProps,
|
|
137
137
|
disabledClear = _ref5.disabledClear,
|
|
138
|
+
disabledFocus = _ref5.disabledFocus,
|
|
138
139
|
className = _ref5.className,
|
|
139
140
|
defaultValue = _ref5.defaultValue,
|
|
140
141
|
value = _ref5.value,
|
|
141
142
|
elevation = _ref5.elevation,
|
|
142
143
|
disabled = _ref5.disabled,
|
|
143
144
|
onChange = _ref5.onChange,
|
|
145
|
+
onClear = _ref5.onClear,
|
|
144
146
|
onFocus = _ref5.onFocus,
|
|
145
147
|
onBlur = _ref5.onBlur,
|
|
146
148
|
props = _objectWithoutProperties(_ref5, _excluded);
|
|
@@ -190,6 +192,7 @@ var SearchBar = /*#__PURE__*/forwardRef(function (_ref5, ref) {
|
|
|
190
192
|
value: ''
|
|
191
193
|
})
|
|
192
194
|
}));
|
|
195
|
+
onClear(ev);
|
|
193
196
|
setCurrentValue('');
|
|
194
197
|
};
|
|
195
198
|
|
|
@@ -206,7 +209,7 @@ var SearchBar = /*#__PURE__*/forwardRef(function (_ref5, ref) {
|
|
|
206
209
|
return /*#__PURE__*/React.createElement(Paper, _extends({
|
|
207
210
|
component: "form",
|
|
208
211
|
elevation: elevation ? 1 : 0,
|
|
209
|
-
className: cx(className, classes.root, (_cx = {}, _defineProperty(_cx, classes.flat, !elevation), _defineProperty(_cx, classes.elevation, elevation), _defineProperty(_cx, classes.focused, isFocused), _defineProperty(_cx, classes.disabled, disabled), _cx)),
|
|
212
|
+
className: cx(className, classes.root, (_cx = {}, _defineProperty(_cx, classes.flat, !elevation), _defineProperty(_cx, classes.elevation, elevation), _defineProperty(_cx, classes.focused, isFocused && !disabledFocus), _defineProperty(_cx, classes.disabled, disabled), _cx)),
|
|
210
213
|
ref: ref
|
|
211
214
|
}, props), type === 'button' ? /*#__PURE__*/React.createElement(ButtonBase, {
|
|
212
215
|
className: classes.buttonBase
|
|
@@ -245,9 +248,11 @@ SearchBar.defaultProps = {
|
|
|
245
248
|
size: 'small',
|
|
246
249
|
type: 'search',
|
|
247
250
|
disabledClear: false,
|
|
251
|
+
disabledFocus: false,
|
|
248
252
|
defaultValue: '',
|
|
249
253
|
onChange: function onChange() {},
|
|
250
254
|
onFocus: function onFocus() {},
|
|
255
|
+
onClear: function onClear() {},
|
|
251
256
|
onBlur: function onBlur() {}
|
|
252
257
|
};
|
|
253
258
|
SearchBar.propTypes = {
|
|
@@ -266,18 +271,20 @@ SearchBar.propTypes = {
|
|
|
266
271
|
/** Used only with self-controlled component */
|
|
267
272
|
defaultValue: PropTypes.string,
|
|
268
273
|
disabledClear: PropTypes.bool,
|
|
274
|
+
disabledFocus: PropTypes.bool,
|
|
269
275
|
elevation: PropTypes.bool,
|
|
270
276
|
placeholder: PropTypes.string,
|
|
271
277
|
label: PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.object]),
|
|
272
278
|
disabled: PropTypes.bool,
|
|
273
279
|
onChange: PropTypes.func,
|
|
274
280
|
onFocus: PropTypes.func,
|
|
281
|
+
onClear: PropTypes.func,
|
|
275
282
|
onBlur: PropTypes.func
|
|
276
283
|
};
|
|
277
|
-
|
|
278
|
-
var SearchBarWithLocales = function SearchBarWithLocales(props) {
|
|
284
|
+
var SearchBarWithLocales = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
279
285
|
useExtendI18n(locales);
|
|
280
|
-
return /*#__PURE__*/React.createElement(SearchBar, props
|
|
281
|
-
|
|
282
|
-
|
|
286
|
+
return /*#__PURE__*/React.createElement(SearchBar, _extends({}, props, {
|
|
287
|
+
ref: ref
|
|
288
|
+
}));
|
|
289
|
+
});
|
|
283
290
|
export default SearchBarWithLocales;
|