@citygross/components 0.8.31 → 0.8.32
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.
|
@@ -3,6 +3,7 @@ import * as styles from './SearchBar.styles';
|
|
|
3
3
|
export declare type TSearchBar = styles.SearchInputProps & {
|
|
4
4
|
cancelLabel?: React.ReactNode;
|
|
5
5
|
icon?: React.ReactNode;
|
|
6
|
+
inputIcon?: React.ReactNode;
|
|
6
7
|
resultBoxTopPosition?: string;
|
|
7
8
|
inputRef?: React.RefObject<HTMLInputElement>;
|
|
8
9
|
searchInputMobileRef?: React.RefObject<HTMLInputElement>;
|
|
@@ -11,4 +12,4 @@ export declare type TSearchBar = styles.SearchInputProps & {
|
|
|
11
12
|
children?: React.ReactNode;
|
|
12
13
|
mobileTopPosition?: number;
|
|
13
14
|
};
|
|
14
|
-
export declare const SearchBar: ({ flexGrow, isValid, inputSize, activeBorderColor, cancelLabel, icon, value, resultBoxTopPosition, children, inputRef, isOpen, searchOnSubmit, searchInputMobileRef, mobileTopPosition, ...props }: TSearchBar) => JSX.Element;
|
|
15
|
+
export declare const SearchBar: ({ flexGrow, isValid, inputSize, activeBorderColor, cancelLabel, inputIcon, icon, value, resultBoxTopPosition, children, inputRef, isOpen, searchOnSubmit, searchInputMobileRef, mobileTopPosition, ...props }: TSearchBar) => JSX.Element;
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _tslib = require('../../../../_virtual/_tslib.js');
|
|
6
|
-
var utils = require('@citygross/utils');
|
|
7
6
|
var React = require('react');
|
|
7
|
+
var utils = require('@citygross/utils');
|
|
8
8
|
var styled = require('styled-components');
|
|
9
9
|
var SearchBar_styles = require('./SearchBar.styles.js');
|
|
10
10
|
|
|
@@ -14,7 +14,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
14
14
|
|
|
15
15
|
var SearchBar = function (_a) {
|
|
16
16
|
var _b, _c, _d;
|
|
17
|
-
var flexGrow = _a.flexGrow, isValid = _a.isValid, _e = _a.inputSize, inputSize = _e === void 0 ? 'medium' : _e, activeBorderColor = _a.activeBorderColor, cancelLabel = _a.cancelLabel, icon = _a.icon, value = _a.value, resultBoxTopPosition = _a.resultBoxTopPosition, children = _a.children, inputRef = _a.inputRef, isOpen = _a.isOpen, searchOnSubmit = _a.searchOnSubmit, searchInputMobileRef = _a.searchInputMobileRef, mobileTopPosition = _a.mobileTopPosition, props = _tslib.__rest(_a, ["flexGrow", "isValid", "inputSize", "activeBorderColor", "cancelLabel", "icon", "value", "resultBoxTopPosition", "children", "inputRef", "isOpen", "searchOnSubmit", "searchInputMobileRef", "mobileTopPosition"]);
|
|
17
|
+
var flexGrow = _a.flexGrow, isValid = _a.isValid, _e = _a.inputSize, inputSize = _e === void 0 ? 'medium' : _e, activeBorderColor = _a.activeBorderColor, cancelLabel = _a.cancelLabel, inputIcon = _a.inputIcon, icon = _a.icon, value = _a.value, resultBoxTopPosition = _a.resultBoxTopPosition, children = _a.children, inputRef = _a.inputRef, isOpen = _a.isOpen, searchOnSubmit = _a.searchOnSubmit, searchInputMobileRef = _a.searchInputMobileRef, mobileTopPosition = _a.mobileTopPosition, props = _tslib.__rest(_a, ["flexGrow", "isValid", "inputSize", "activeBorderColor", "cancelLabel", "inputIcon", "icon", "value", "resultBoxTopPosition", "children", "inputRef", "isOpen", "searchOnSubmit", "searchInputMobileRef", "mobileTopPosition"]);
|
|
18
18
|
var width = utils.useWindowSize().width;
|
|
19
19
|
var theme = styled.useTheme();
|
|
20
20
|
var resultVariants = {
|
|
@@ -55,7 +55,7 @@ var SearchBar = function (_a) {
|
|
|
55
55
|
e.preventDefault();
|
|
56
56
|
searchOnSubmit && searchOnSubmit();
|
|
57
57
|
} },
|
|
58
|
-
React__default["default"].createElement(SearchBar_styles.SearchLeftIcon, null,
|
|
58
|
+
React__default["default"].createElement(SearchBar_styles.SearchLeftIcon, null, inputIcon),
|
|
59
59
|
React__default["default"].createElement(SearchBar_styles.SearchInput, _tslib.__assign({ flexGrow: flexGrow, isValid: isValid, inputSize: inputSize, activeBorderColor: activeBorderColor, ref: inputRef }, props, { value: value, autoComplete: "off", "data-lpignore": "true", "data-form-type": "other" })),
|
|
60
60
|
cancelLabel ? (React__default["default"].createElement(SearchBar_styles.SearchRightLabel, { onClick: function (e) {
|
|
61
61
|
e.stopPropagation();
|
|
@@ -68,7 +68,7 @@ var SearchBar = function (_a) {
|
|
|
68
68
|
e.preventDefault();
|
|
69
69
|
searchOnSubmit && searchOnSubmit();
|
|
70
70
|
} },
|
|
71
|
-
React__default["default"].createElement(SearchBar_styles.SearchLeftIcon, null,
|
|
71
|
+
React__default["default"].createElement(SearchBar_styles.SearchLeftIcon, null, inputIcon),
|
|
72
72
|
React__default["default"].createElement(SearchBar_styles.SearchInput, _tslib.__assign({ flexGrow: flexGrow, isValid: isValid, activeBorderColor: activeBorderColor, ref: searchInputMobileRef }, props, { value: value, autoComplete: "off", "data-lpignore": "true", "data-form-type": "other" })),
|
|
73
73
|
cancelLabel ? (React__default["default"].createElement(SearchBar_styles.SearchRightLabel, { onClick: function (e) {
|
|
74
74
|
e.stopPropagation();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { __rest, __assign } from '../../../../_virtual/_tslib.js';
|
|
2
|
-
import { useWindowSize } from '@citygross/utils';
|
|
3
2
|
import React from 'react';
|
|
3
|
+
import { useWindowSize } from '@citygross/utils';
|
|
4
4
|
import { useTheme } from 'styled-components';
|
|
5
5
|
import { SearchBarContainer, SearchForm, SearchLeftIcon, SearchInput, SearchRightLabel, MobileSearchIconContainer, SearchResultContainer, MobileSearchFormContainer } from './SearchBar.styles.js';
|
|
6
6
|
|
|
7
7
|
var SearchBar = function (_a) {
|
|
8
8
|
var _b, _c, _d;
|
|
9
|
-
var flexGrow = _a.flexGrow, isValid = _a.isValid, _e = _a.inputSize, inputSize = _e === void 0 ? 'medium' : _e, activeBorderColor = _a.activeBorderColor, cancelLabel = _a.cancelLabel, icon = _a.icon, value = _a.value, resultBoxTopPosition = _a.resultBoxTopPosition, children = _a.children, inputRef = _a.inputRef, isOpen = _a.isOpen, searchOnSubmit = _a.searchOnSubmit, searchInputMobileRef = _a.searchInputMobileRef, mobileTopPosition = _a.mobileTopPosition, props = __rest(_a, ["flexGrow", "isValid", "inputSize", "activeBorderColor", "cancelLabel", "icon", "value", "resultBoxTopPosition", "children", "inputRef", "isOpen", "searchOnSubmit", "searchInputMobileRef", "mobileTopPosition"]);
|
|
9
|
+
var flexGrow = _a.flexGrow, isValid = _a.isValid, _e = _a.inputSize, inputSize = _e === void 0 ? 'medium' : _e, activeBorderColor = _a.activeBorderColor, cancelLabel = _a.cancelLabel, inputIcon = _a.inputIcon, icon = _a.icon, value = _a.value, resultBoxTopPosition = _a.resultBoxTopPosition, children = _a.children, inputRef = _a.inputRef, isOpen = _a.isOpen, searchOnSubmit = _a.searchOnSubmit, searchInputMobileRef = _a.searchInputMobileRef, mobileTopPosition = _a.mobileTopPosition, props = __rest(_a, ["flexGrow", "isValid", "inputSize", "activeBorderColor", "cancelLabel", "inputIcon", "icon", "value", "resultBoxTopPosition", "children", "inputRef", "isOpen", "searchOnSubmit", "searchInputMobileRef", "mobileTopPosition"]);
|
|
10
10
|
var width = useWindowSize().width;
|
|
11
11
|
var theme = useTheme();
|
|
12
12
|
var resultVariants = {
|
|
@@ -47,7 +47,7 @@ var SearchBar = function (_a) {
|
|
|
47
47
|
e.preventDefault();
|
|
48
48
|
searchOnSubmit && searchOnSubmit();
|
|
49
49
|
} },
|
|
50
|
-
React.createElement(SearchLeftIcon, null,
|
|
50
|
+
React.createElement(SearchLeftIcon, null, inputIcon),
|
|
51
51
|
React.createElement(SearchInput, __assign({ flexGrow: flexGrow, isValid: isValid, inputSize: inputSize, activeBorderColor: activeBorderColor, ref: inputRef }, props, { value: value, autoComplete: "off", "data-lpignore": "true", "data-form-type": "other" })),
|
|
52
52
|
cancelLabel ? (React.createElement(SearchRightLabel, { onClick: function (e) {
|
|
53
53
|
e.stopPropagation();
|
|
@@ -60,7 +60,7 @@ var SearchBar = function (_a) {
|
|
|
60
60
|
e.preventDefault();
|
|
61
61
|
searchOnSubmit && searchOnSubmit();
|
|
62
62
|
} },
|
|
63
|
-
React.createElement(SearchLeftIcon, null,
|
|
63
|
+
React.createElement(SearchLeftIcon, null, inputIcon),
|
|
64
64
|
React.createElement(SearchInput, __assign({ flexGrow: flexGrow, isValid: isValid, activeBorderColor: activeBorderColor, ref: searchInputMobileRef }, props, { value: value, autoComplete: "off", "data-lpignore": "true", "data-form-type": "other" })),
|
|
65
65
|
cancelLabel ? (React.createElement(SearchRightLabel, { onClick: function (e) {
|
|
66
66
|
e.stopPropagation();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citygross/components",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.32",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./build/cjs/components/src/index.js",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"react-slick": "^0.30.1",
|
|
77
77
|
"slick-carousel": "^1.8.1"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "7a5b76f64f5091393950854fc799f999703a919a"
|
|
80
80
|
}
|