@citygross/components 0.7.119 → 0.7.121
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/build/@types/components/FormElements/Input/Input.d.ts +4 -2
- package/build/cjs/components/src/components/FormElements/Input/Input.js +2 -2
- package/build/cjs/components/src/components/SearchBar/SearchBar.js +3 -2
- package/build/cjs/components/src/components/SearchBar/SearchBar.js.map +1 -1
- package/build/es/components/src/components/FormElements/Input/Input.js +2 -2
- package/build/es/components/src/components/SearchBar/SearchBar.js +3 -2
- package/build/es/components/src/components/SearchBar/SearchBar.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import * as styles from './Input.styles';
|
|
3
|
-
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export declare function Input({ flexGrow, isValid, fontSize, inputSize, inputRef, ...props }: styles.InputProps & {
|
|
4
|
+
inputRef?: React.RefObject<HTMLInputElement>;
|
|
5
|
+
}): JSX.Element;
|
|
@@ -11,8 +11,8 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
11
11
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
12
12
|
|
|
13
13
|
function Input(_a) {
|
|
14
|
-
var flexGrow = _a.flexGrow, isValid = _a.isValid, fontSize = _a.fontSize, _b = _a.inputSize, inputSize = _b === void 0 ? 'medium' : _b, props = _tslib.__rest(_a, ["flexGrow", "isValid", "fontSize", "inputSize"]);
|
|
15
|
-
return (React__default["default"].createElement(Input_styles.Input, _tslib.__assign({ flexGrow: flexGrow, fontSize: fontSize, isValid: isValid, inputSize: inputSize }, props)));
|
|
14
|
+
var flexGrow = _a.flexGrow, isValid = _a.isValid, fontSize = _a.fontSize, _b = _a.inputSize, inputSize = _b === void 0 ? 'medium' : _b, inputRef = _a.inputRef, props = _tslib.__rest(_a, ["flexGrow", "isValid", "fontSize", "inputSize", "inputRef"]);
|
|
15
|
+
return (React__default["default"].createElement(Input_styles.Input, _tslib.__assign({ flexGrow: flexGrow, fontSize: fontSize, isValid: isValid, inputSize: inputSize, ref: inputRef }, props)));
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
exports.Input = Input;
|
|
@@ -21,11 +21,12 @@ var SearchBar = function (_a) {
|
|
|
21
21
|
var _a, _b;
|
|
22
22
|
if (theme && theme.constants) {
|
|
23
23
|
if ((searchInputMobileRef === null || searchInputMobileRef === void 0 ? void 0 : searchInputMobileRef.current) &&
|
|
24
|
-
width < ((_a = theme.constants) === null || _a === void 0 ? void 0 : _a.headerBreakpoint)
|
|
24
|
+
width < ((_a = theme.constants) === null || _a === void 0 ? void 0 : _a.headerBreakpoint) &&
|
|
25
|
+
isOpen) {
|
|
25
26
|
(_b = searchInputMobileRef === null || searchInputMobileRef === void 0 ? void 0 : searchInputMobileRef.current) === null || _b === void 0 ? void 0 : _b.focus();
|
|
26
27
|
}
|
|
27
28
|
}
|
|
28
|
-
}, [inputRef === null || inputRef === void 0 ? void 0 : inputRef.current, searchInputMobileRef === null || searchInputMobileRef === void 0 ? void 0 : searchInputMobileRef.current]);
|
|
29
|
+
}, [inputRef === null || inputRef === void 0 ? void 0 : inputRef.current, searchInputMobileRef === null || searchInputMobileRef === void 0 ? void 0 : searchInputMobileRef.current, isOpen]);
|
|
29
30
|
var resultVariants = {
|
|
30
31
|
closed: {
|
|
31
32
|
height: '0',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBar.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchBar.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -3,8 +3,8 @@ import { Input as Input$1 } from './Input.styles.js';
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
|
|
5
5
|
function Input(_a) {
|
|
6
|
-
var flexGrow = _a.flexGrow, isValid = _a.isValid, fontSize = _a.fontSize, _b = _a.inputSize, inputSize = _b === void 0 ? 'medium' : _b, props = __rest(_a, ["flexGrow", "isValid", "fontSize", "inputSize"]);
|
|
7
|
-
return (React.createElement(Input$1, __assign({ flexGrow: flexGrow, fontSize: fontSize, isValid: isValid, inputSize: inputSize }, props)));
|
|
6
|
+
var flexGrow = _a.flexGrow, isValid = _a.isValid, fontSize = _a.fontSize, _b = _a.inputSize, inputSize = _b === void 0 ? 'medium' : _b, inputRef = _a.inputRef, props = __rest(_a, ["flexGrow", "isValid", "fontSize", "inputSize", "inputRef"]);
|
|
7
|
+
return (React.createElement(Input$1, __assign({ flexGrow: flexGrow, fontSize: fontSize, isValid: isValid, inputSize: inputSize, ref: inputRef }, props)));
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export { Input };
|
|
@@ -13,11 +13,12 @@ var SearchBar = function (_a) {
|
|
|
13
13
|
var _a, _b;
|
|
14
14
|
if (theme && theme.constants) {
|
|
15
15
|
if ((searchInputMobileRef === null || searchInputMobileRef === void 0 ? void 0 : searchInputMobileRef.current) &&
|
|
16
|
-
width < ((_a = theme.constants) === null || _a === void 0 ? void 0 : _a.headerBreakpoint)
|
|
16
|
+
width < ((_a = theme.constants) === null || _a === void 0 ? void 0 : _a.headerBreakpoint) &&
|
|
17
|
+
isOpen) {
|
|
17
18
|
(_b = searchInputMobileRef === null || searchInputMobileRef === void 0 ? void 0 : searchInputMobileRef.current) === null || _b === void 0 ? void 0 : _b.focus();
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
|
-
}, [inputRef === null || inputRef === void 0 ? void 0 : inputRef.current, searchInputMobileRef === null || searchInputMobileRef === void 0 ? void 0 : searchInputMobileRef.current]);
|
|
21
|
+
}, [inputRef === null || inputRef === void 0 ? void 0 : inputRef.current, searchInputMobileRef === null || searchInputMobileRef === void 0 ? void 0 : searchInputMobileRef.current, isOpen]);
|
|
21
22
|
var resultVariants = {
|
|
22
23
|
closed: {
|
|
23
24
|
height: '0',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBar.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchBar.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citygross/components",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.121",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./build/cjs/components/src/index.js",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"moment": "^2.29.1",
|
|
72
72
|
"react-loading-skeleton": "^2.2.0"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "3a64ef89afca986fae548678c2e91d04f44c2467"
|
|
75
75
|
}
|