@citygross/components 0.8.84 → 0.8.86
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/Nav/Nav.d.ts +2 -1
- package/build/cjs/components/src/components/Dropdown/Dropdown.js +1 -1
- package/build/cjs/components/src/components/MenuListItem/MenuListItem.js +2 -2
- package/build/cjs/components/src/components/Nav/Nav.js +3 -3
- package/build/es/components/src/components/Dropdown/Dropdown.js +1 -1
- package/build/es/components/src/components/MenuListItem/MenuListItem.js +2 -2
- package/build/es/components/src/components/Nav/Nav.js +3 -3
- package/package.json +2 -2
|
@@ -22,5 +22,6 @@ export declare type TNav = {
|
|
|
22
22
|
mobileTopPosition?: number;
|
|
23
23
|
searchInputRef: React.RefObject<HTMLInputElement>;
|
|
24
24
|
searchInputMobileRef: React.RefObject<HTMLInputElement>;
|
|
25
|
+
searchContainerRef: React.RefObject<HTMLDivElement>;
|
|
25
26
|
};
|
|
26
|
-
export declare const Nav: ({ logo, maxWidth, overlayTopPosition, height, topPosition, mainLinks, rightContent, inputIcon, searchResultElement, searchCancelLabel, searchIcon, searchPlaceHolder, searchOnChange, searchValue, searchOnSubmit, onSearchClick, closeSearch, mobileTopPosition, searchIsOpen, searchInputRef, searchInputMobileRef, onSearchBlur }: TNav) => JSX.Element;
|
|
27
|
+
export declare const Nav: ({ logo, maxWidth, overlayTopPosition, height, topPosition, mainLinks, rightContent, inputIcon, searchResultElement, searchCancelLabel, searchIcon, searchPlaceHolder, searchOnChange, searchValue, searchOnSubmit, onSearchClick, closeSearch, mobileTopPosition, searchIsOpen, searchInputRef, searchInputMobileRef, onSearchBlur, searchContainerRef }: TNav) => JSX.Element;
|
|
@@ -23,7 +23,7 @@ var Dropdown = function (_a) {
|
|
|
23
23
|
};
|
|
24
24
|
return (React__default["default"].createElement(Dropdown_styles.DropdownContainer, null,
|
|
25
25
|
React__default["default"].createElement(Dropdown_styles.DropdownHeader, { onClick: onClick }, dropdownHeader),
|
|
26
|
-
React__default["default"].createElement(Dropdown_styles.DropdownChildContainer, { isOpen: isOpen, variants: variants, animate: isOpen ? 'open' : 'closed', initial:
|
|
26
|
+
React__default["default"].createElement(Dropdown_styles.DropdownChildContainer, { isOpen: isOpen, variants: variants, animate: isOpen ? 'open' : 'closed', initial: "closed" }, children)));
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
exports.Dropdown = Dropdown;
|
|
@@ -18,8 +18,8 @@ var MenuListItem = function (_a) {
|
|
|
18
18
|
return (React__default["default"].createElement(MenuListItem_styles.MenuListItemWrapper, null,
|
|
19
19
|
React__default["default"].createElement(Dropdown.Dropdown, { onClick: onClick, isOpen: isOpen, dropdownHeader: React__default["default"].createElement(MenuListItem_styles.HeaderWrapper, { paddingLeft: paddingLeft, backgroundColor: backgroundColor, isOpen: isOpen, hoverBackground: hoverBackground, iconWidth: iconWidth },
|
|
20
20
|
React__default["default"].createElement(MenuListItem_styles.BodyText, { isOpen: isOpen }, dropdownHeader),
|
|
21
|
-
isOpen ? (React__default["default"].createElement(icons.Icons.Minus, { width: iconWidth !== null && iconWidth !== void 0 ? iconWidth : (_b = designTokens.theme.constants) === null || _b === void 0 ? void 0 : _b.menuListItemIconSize, height: iconWidth !== null && iconWidth !== void 0 ? iconWidth : (_c = designTokens.theme.constants) === null || _c === void 0 ? void 0 : _c.menuListItemIconSize })) : (React__default["default"].createElement(icons.Icons.Plus, { width: (_d = designTokens.theme.constants) === null || _d === void 0 ? void 0 : _d.menuListItemIconSize, height: (_e = designTokens.theme.constants) === null || _e === void 0 ? void 0 : _e.menuListItemIconSize }))) },
|
|
22
|
-
|
|
21
|
+
isOpen ? (React__default["default"].createElement(icons.Icons.Minus, { width: iconWidth !== null && iconWidth !== void 0 ? iconWidth : (_b = designTokens.theme.constants) === null || _b === void 0 ? void 0 : _b.menuListItemIconSize, height: iconWidth !== null && iconWidth !== void 0 ? iconWidth : (_c = designTokens.theme.constants) === null || _c === void 0 ? void 0 : _c.menuListItemIconSize })) : (React__default["default"].createElement(icons.Icons.Plus, { width: (_d = designTokens.theme.constants) === null || _d === void 0 ? void 0 : _d.menuListItemIconSize, height: (_e = designTokens.theme.constants) === null || _e === void 0 ? void 0 : _e.menuListItemIconSize }))) }),
|
|
22
|
+
isOpen && (React__default["default"].createElement(MenuListItem_styles.NestedWrapper, { nested: true, paddingLeft: paddingLeft }, children))));
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
exports.MenuListItem = MenuListItem;
|
|
@@ -14,7 +14,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
14
14
|
|
|
15
15
|
var Nav = function (_a) {
|
|
16
16
|
var _b, _c, _d, _e;
|
|
17
|
-
var logo = _a.logo, maxWidth = _a.maxWidth, overlayTopPosition = _a.overlayTopPosition, height = _a.height, topPosition = _a.topPosition, mainLinks = _a.mainLinks, rightContent = _a.rightContent, inputIcon = _a.inputIcon, searchResultElement = _a.searchResultElement, searchCancelLabel = _a.searchCancelLabel, searchIcon = _a.searchIcon, searchPlaceHolder = _a.searchPlaceHolder, searchOnChange = _a.searchOnChange, searchValue = _a.searchValue, searchOnSubmit = _a.searchOnSubmit, onSearchClick = _a.onSearchClick, closeSearch = _a.closeSearch, mobileTopPosition = _a.mobileTopPosition, searchIsOpen = _a.searchIsOpen, searchInputRef = _a.searchInputRef, searchInputMobileRef = _a.searchInputMobileRef, onSearchBlur = _a.onSearchBlur;
|
|
17
|
+
var logo = _a.logo, maxWidth = _a.maxWidth, overlayTopPosition = _a.overlayTopPosition, height = _a.height, topPosition = _a.topPosition, mainLinks = _a.mainLinks, rightContent = _a.rightContent, inputIcon = _a.inputIcon, searchResultElement = _a.searchResultElement, searchCancelLabel = _a.searchCancelLabel, searchIcon = _a.searchIcon, searchPlaceHolder = _a.searchPlaceHolder, searchOnChange = _a.searchOnChange, searchValue = _a.searchValue, searchOnSubmit = _a.searchOnSubmit, onSearchClick = _a.onSearchClick, closeSearch = _a.closeSearch, mobileTopPosition = _a.mobileTopPosition, searchIsOpen = _a.searchIsOpen, searchInputRef = _a.searchInputRef, searchInputMobileRef = _a.searchInputMobileRef, onSearchBlur = _a.onSearchBlur, searchContainerRef = _a.searchContainerRef;
|
|
18
18
|
var navContainerRef = React.useRef(null);
|
|
19
19
|
var navChildContainerRef = React.useRef(null);
|
|
20
20
|
var navRef = React.useRef(null);
|
|
@@ -98,8 +98,8 @@ var Nav = function (_a) {
|
|
|
98
98
|
? false
|
|
99
99
|
: searchIsOpen
|
|
100
100
|
? 'closed'
|
|
101
|
-
: 'open', initial:
|
|
102
|
-
React__default["default"].createElement(Nav_styles.SearchContainer, { isOpen: searchIsOpen },
|
|
101
|
+
: 'open', initial: "open" }, (_e = mainLinks === null || mainLinks === void 0 ? void 0 : mainLinks.slice(0, (mainLinks === null || mainLinks === void 0 ? void 0 : mainLinks.length) - elToRemove)) === null || _e === void 0 ? void 0 : _e.map(function (link) { return link; })),
|
|
102
|
+
React__default["default"].createElement(Nav_styles.SearchContainer, { isOpen: searchIsOpen, ref: searchContainerRef },
|
|
103
103
|
React__default["default"].createElement(SearchBar.SearchBar, { mobileTopPosition: mobileTopPosition, icon: searchIcon, inputIcon: inputIcon, cancelLabel: searchCancelLabel, flexGrow: 1, onClick: function () {
|
|
104
104
|
onSearchClick && onSearchClick();
|
|
105
105
|
}, placeholder: searchPlaceHolder, onChange: searchOnChange, value: searchValue, inputRef: searchInputRef, searchInputMobileRef: searchInputMobileRef, searchOnSubmit: searchOnSubmit, isOpen: searchIsOpen, onBlur: onSearchBlur, onKeyDown: function (e) {
|
|
@@ -15,7 +15,7 @@ var Dropdown = function (_a) {
|
|
|
15
15
|
};
|
|
16
16
|
return (React.createElement(DropdownContainer, null,
|
|
17
17
|
React.createElement(DropdownHeader, { onClick: onClick }, dropdownHeader),
|
|
18
|
-
React.createElement(DropdownChildContainer, { isOpen: isOpen, variants: variants, animate: isOpen ? 'open' : 'closed', initial:
|
|
18
|
+
React.createElement(DropdownChildContainer, { isOpen: isOpen, variants: variants, animate: isOpen ? 'open' : 'closed', initial: "closed" }, children)));
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
export { Dropdown };
|
|
@@ -10,8 +10,8 @@ var MenuListItem = function (_a) {
|
|
|
10
10
|
return (React.createElement(MenuListItemWrapper, null,
|
|
11
11
|
React.createElement(Dropdown, { onClick: onClick, isOpen: isOpen, dropdownHeader: React.createElement(HeaderWrapper, { paddingLeft: paddingLeft, backgroundColor: backgroundColor, isOpen: isOpen, hoverBackground: hoverBackground, iconWidth: iconWidth },
|
|
12
12
|
React.createElement(BodyText, { isOpen: isOpen }, dropdownHeader),
|
|
13
|
-
isOpen ? (React.createElement(Icons.Minus, { width: iconWidth !== null && iconWidth !== void 0 ? iconWidth : (_b = theme.constants) === null || _b === void 0 ? void 0 : _b.menuListItemIconSize, height: iconWidth !== null && iconWidth !== void 0 ? iconWidth : (_c = theme.constants) === null || _c === void 0 ? void 0 : _c.menuListItemIconSize })) : (React.createElement(Icons.Plus, { width: (_d = theme.constants) === null || _d === void 0 ? void 0 : _d.menuListItemIconSize, height: (_e = theme.constants) === null || _e === void 0 ? void 0 : _e.menuListItemIconSize }))) },
|
|
14
|
-
|
|
13
|
+
isOpen ? (React.createElement(Icons.Minus, { width: iconWidth !== null && iconWidth !== void 0 ? iconWidth : (_b = theme.constants) === null || _b === void 0 ? void 0 : _b.menuListItemIconSize, height: iconWidth !== null && iconWidth !== void 0 ? iconWidth : (_c = theme.constants) === null || _c === void 0 ? void 0 : _c.menuListItemIconSize })) : (React.createElement(Icons.Plus, { width: (_d = theme.constants) === null || _d === void 0 ? void 0 : _d.menuListItemIconSize, height: (_e = theme.constants) === null || _e === void 0 ? void 0 : _e.menuListItemIconSize }))) }),
|
|
14
|
+
isOpen && (React.createElement(NestedWrapper, { nested: true, paddingLeft: paddingLeft }, children))));
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
export { MenuListItem };
|
|
@@ -6,7 +6,7 @@ import { Nav as Nav$1, NavContainer, NavChildContainer, NavMainLinks, SearchCont
|
|
|
6
6
|
|
|
7
7
|
var Nav = function (_a) {
|
|
8
8
|
var _b, _c, _d, _e;
|
|
9
|
-
var logo = _a.logo, maxWidth = _a.maxWidth, overlayTopPosition = _a.overlayTopPosition, height = _a.height, topPosition = _a.topPosition, mainLinks = _a.mainLinks, rightContent = _a.rightContent, inputIcon = _a.inputIcon, searchResultElement = _a.searchResultElement, searchCancelLabel = _a.searchCancelLabel, searchIcon = _a.searchIcon, searchPlaceHolder = _a.searchPlaceHolder, searchOnChange = _a.searchOnChange, searchValue = _a.searchValue, searchOnSubmit = _a.searchOnSubmit, onSearchClick = _a.onSearchClick, closeSearch = _a.closeSearch, mobileTopPosition = _a.mobileTopPosition, searchIsOpen = _a.searchIsOpen, searchInputRef = _a.searchInputRef, searchInputMobileRef = _a.searchInputMobileRef, onSearchBlur = _a.onSearchBlur;
|
|
9
|
+
var logo = _a.logo, maxWidth = _a.maxWidth, overlayTopPosition = _a.overlayTopPosition, height = _a.height, topPosition = _a.topPosition, mainLinks = _a.mainLinks, rightContent = _a.rightContent, inputIcon = _a.inputIcon, searchResultElement = _a.searchResultElement, searchCancelLabel = _a.searchCancelLabel, searchIcon = _a.searchIcon, searchPlaceHolder = _a.searchPlaceHolder, searchOnChange = _a.searchOnChange, searchValue = _a.searchValue, searchOnSubmit = _a.searchOnSubmit, onSearchClick = _a.onSearchClick, closeSearch = _a.closeSearch, mobileTopPosition = _a.mobileTopPosition, searchIsOpen = _a.searchIsOpen, searchInputRef = _a.searchInputRef, searchInputMobileRef = _a.searchInputMobileRef, onSearchBlur = _a.onSearchBlur, searchContainerRef = _a.searchContainerRef;
|
|
10
10
|
var navContainerRef = useRef(null);
|
|
11
11
|
var navChildContainerRef = useRef(null);
|
|
12
12
|
var navRef = useRef(null);
|
|
@@ -90,8 +90,8 @@ var Nav = function (_a) {
|
|
|
90
90
|
? false
|
|
91
91
|
: searchIsOpen
|
|
92
92
|
? 'closed'
|
|
93
|
-
: 'open', initial:
|
|
94
|
-
React.createElement(SearchContainer, { isOpen: searchIsOpen },
|
|
93
|
+
: 'open', initial: "open" }, (_e = mainLinks === null || mainLinks === void 0 ? void 0 : mainLinks.slice(0, (mainLinks === null || mainLinks === void 0 ? void 0 : mainLinks.length) - elToRemove)) === null || _e === void 0 ? void 0 : _e.map(function (link) { return link; })),
|
|
94
|
+
React.createElement(SearchContainer, { isOpen: searchIsOpen, ref: searchContainerRef },
|
|
95
95
|
React.createElement(SearchBar, { mobileTopPosition: mobileTopPosition, icon: searchIcon, inputIcon: inputIcon, cancelLabel: searchCancelLabel, flexGrow: 1, onClick: function () {
|
|
96
96
|
onSearchClick && onSearchClick();
|
|
97
97
|
}, placeholder: searchPlaceHolder, onChange: searchOnChange, value: searchValue, inputRef: searchInputRef, searchInputMobileRef: searchInputMobileRef, searchOnSubmit: searchOnSubmit, isOpen: searchIsOpen, onBlur: onSearchBlur, onKeyDown: function (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citygross/components",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.86",
|
|
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": "b84ee967339158da1fcc588d09fb5d9cc763d2b6"
|
|
80
80
|
}
|