@citygross/components 0.7.81 → 0.7.82
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 +1 -2
- package/build/@types/components/NavMainLink/NavMainLink.d.ts +2 -0
- package/build/cjs/components/src/components/AddressBlock/AddressBlock.js +1 -1
- package/build/cjs/components/src/components/Button/Button.js +1 -1
- package/build/cjs/components/src/components/Nav/Nav.js +2 -3
- package/build/cjs/components/src/components/Nav/Nav.js.map +1 -1
- package/build/cjs/components/src/components/SearchBar/SearchBar.js +0 -1
- package/build/cjs/components/src/components/SearchBar/SearchBar.js.map +1 -1
- package/build/cjs/components/src/components/WarningLabel/WarningLabel.js +1 -1
- package/build/es/components/src/components/AddressBlock/AddressBlock.js +1 -1
- package/build/es/components/src/components/Button/Button.js +1 -1
- package/build/es/components/src/components/Nav/Nav.js +2 -3
- package/build/es/components/src/components/Nav/Nav.js.map +1 -1
- package/build/es/components/src/components/SearchBar/SearchBar.js +0 -1
- package/build/es/components/src/components/SearchBar/SearchBar.js.map +1 -1
- package/build/es/components/src/components/WarningLabel/WarningLabel.js +1 -1
- package/package.json +2 -2
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React, { ChangeEventHandler } from 'react';
|
|
2
|
-
import { TNavMainLink } from '../NavMainLink/NavMainLink';
|
|
3
2
|
export declare type TNav = {
|
|
4
3
|
logo: React.ReactNode;
|
|
5
4
|
maxWidth?: number;
|
|
6
5
|
height?: number;
|
|
7
6
|
topPosition?: number;
|
|
8
|
-
mainLinks?:
|
|
7
|
+
mainLinks?: React.ReactNode[];
|
|
9
8
|
mainLinksBorderColor?: string;
|
|
10
9
|
rightContent?: React.ReactNode;
|
|
11
10
|
searchResultElement?: React.ReactNode;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
export declare type TNavMainLink = {
|
|
2
3
|
text: string;
|
|
3
4
|
href?: string;
|
|
4
5
|
active?: boolean;
|
|
5
6
|
target?: '_blank' | '_self';
|
|
6
7
|
borderColor?: string;
|
|
8
|
+
component?: React.ReactNode;
|
|
7
9
|
};
|
|
8
10
|
export declare const NavMainLink: ({ text, href, target, active, borderColor }: TNavMainLink) => JSX.Element;
|
|
@@ -73,9 +73,9 @@ require('../../containers/TwoColumnsContainer/TwoColumnsPageContainer.styles.js'
|
|
|
73
73
|
require('../UnorderedList/UnorderedList.styles.js');
|
|
74
74
|
require('../WarningLabel/WarningLabel.styles.js');
|
|
75
75
|
require('../MobileTable/MobileTable.styles.js');
|
|
76
|
-
require('../NavMainLink/NavMainLink.styled.js');
|
|
77
76
|
require('../SearchBar/SearchBar.styles.js');
|
|
78
77
|
require('../Nav/Nav.styles.js');
|
|
78
|
+
require('../NavMainLink/NavMainLink.styled.js');
|
|
79
79
|
require('framer-motion');
|
|
80
80
|
require('../SideModal/SideModal.styles.js');
|
|
81
81
|
require('../IconText/IconText.styles.js');
|
|
@@ -39,7 +39,7 @@ function Button(_a) {
|
|
|
39
39
|
icon,
|
|
40
40
|
children)) : (children),
|
|
41
41
|
React__default["default"].createElement("span", { className: "ripple" }),
|
|
42
|
-
buttonBadge
|
|
42
|
+
buttonBadge ? (React__default["default"].createElement(Button_styles.ButtonBadge, null, buttonBadge)) : null));
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
exports.Button = Button;
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var designTokens = require('@citygross/design-tokens');
|
|
6
6
|
var utils = require('@citygross/utils');
|
|
7
7
|
var React = require('react');
|
|
8
|
-
var NavMainLink = require('../NavMainLink/NavMainLink.js');
|
|
9
8
|
var SearchBar = require('../SearchBar/SearchBar.js');
|
|
10
9
|
var Nav_styles = require('./Nav.styles.js');
|
|
11
10
|
|
|
@@ -15,7 +14,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
15
14
|
|
|
16
15
|
var Nav = function (_a) {
|
|
17
16
|
var _b, _c;
|
|
18
|
-
var logo = _a.logo, maxWidth = _a.maxWidth, height = _a.height, topPosition = _a.topPosition, mainLinks = _a.mainLinks, _d = _a.mainLinksBorderColor
|
|
17
|
+
var logo = _a.logo, maxWidth = _a.maxWidth, height = _a.height, topPosition = _a.topPosition, mainLinks = _a.mainLinks, _d = _a.mainLinksBorderColor; _d === void 0 ? (_b = designTokens.theme.palette) === null || _b === void 0 ? void 0 : _b.primary : _d; var rightContent = _a.rightContent, searchResultElement = _a.searchResultElement, searchCancelLabel = _a.searchCancelLabel, searchIcon = _a.searchIcon, searchPlaceHolder = _a.searchPlaceHolder, searchOnChange = _a.searchOnChange, searchValue = _a.searchValue, onSearchClick = _a.onSearchClick;
|
|
19
18
|
var searchContainerRef = React.useRef(null);
|
|
20
19
|
var searchInputRef = React.useRef(null);
|
|
21
20
|
var navRef = React.useRef(null);
|
|
@@ -64,7 +63,7 @@ var Nav = function (_a) {
|
|
|
64
63
|
React__default["default"].createElement(SearchBar.SearchBar, { icon: searchIcon, cancelLabel: searchCancelLabel, flexGrow: 1, placeholder: searchPlaceHolder, onChange: searchOnChange, value: searchValue, inputRef: searchInputRef, onCancelClick: function () {
|
|
65
64
|
setOpenSearch(false);
|
|
66
65
|
}, isOpen: openSearch }, searchResultElement))) : (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
67
|
-
React__default["default"].createElement(Nav_styles.NavMainLinks, null, (_c = mainLinks === null || mainLinks === void 0 ? void 0 : mainLinks.slice(0, mainLinks.length - elToRemove)) === null || _c === void 0 ? void 0 : _c.map(function (link) { return
|
|
66
|
+
React__default["default"].createElement(Nav_styles.NavMainLinks, null, (_c = mainLinks === null || mainLinks === void 0 ? void 0 : mainLinks.slice(0, mainLinks.length - elToRemove)) === null || _c === void 0 ? void 0 : _c.map(function (link) { return link; })),
|
|
68
67
|
React__default["default"].createElement(Nav_styles.NavDummySearchContainer, { onClick: function () {
|
|
69
68
|
onSearchClick ? onSearchClick() : setOpenSearch(true);
|
|
70
69
|
} },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Nav.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Nav.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -18,7 +18,6 @@ var SearchBar = function (_a) {
|
|
|
18
18
|
(_a = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
19
19
|
}
|
|
20
20
|
}, [inputRef === null || inputRef === void 0 ? void 0 : inputRef.current]);
|
|
21
|
-
console.log(isOpen, '__________OPEN');
|
|
22
21
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
23
22
|
React__default["default"].createElement(SearchBar_styles.SearchBarContainer, { activeBorderColor: activeBorderColor, inputSize: inputSize, flexGrow: flexGrow, isOpen: isOpen },
|
|
24
23
|
React__default["default"].createElement(SearchBar_styles.SearchLeftIcon, null, icon),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBar.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchBar.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -73,9 +73,9 @@ require('../../containers/TwoColumnsContainer/TwoColumnsPageContainer.styles.js'
|
|
|
73
73
|
require('../UnorderedList/UnorderedList.styles.js');
|
|
74
74
|
var WarningLabel_styles = require('./WarningLabel.styles.js');
|
|
75
75
|
require('../MobileTable/MobileTable.styles.js');
|
|
76
|
-
require('../NavMainLink/NavMainLink.styled.js');
|
|
77
76
|
require('../SearchBar/SearchBar.styles.js');
|
|
78
77
|
require('../Nav/Nav.styles.js');
|
|
78
|
+
require('../NavMainLink/NavMainLink.styled.js');
|
|
79
79
|
require('framer-motion');
|
|
80
80
|
require('../SideModal/SideModal.styles.js');
|
|
81
81
|
require('../IconText/IconText.styles.js');
|
|
@@ -69,9 +69,9 @@ import '../../containers/TwoColumnsContainer/TwoColumnsPageContainer.styles.js';
|
|
|
69
69
|
import '../UnorderedList/UnorderedList.styles.js';
|
|
70
70
|
import '../WarningLabel/WarningLabel.styles.js';
|
|
71
71
|
import '../MobileTable/MobileTable.styles.js';
|
|
72
|
-
import '../NavMainLink/NavMainLink.styled.js';
|
|
73
72
|
import '../SearchBar/SearchBar.styles.js';
|
|
74
73
|
import '../Nav/Nav.styles.js';
|
|
74
|
+
import '../NavMainLink/NavMainLink.styled.js';
|
|
75
75
|
import 'framer-motion';
|
|
76
76
|
import '../SideModal/SideModal.styles.js';
|
|
77
77
|
import '../IconText/IconText.styles.js';
|
|
@@ -31,7 +31,7 @@ function Button(_a) {
|
|
|
31
31
|
icon,
|
|
32
32
|
children)) : (children),
|
|
33
33
|
React.createElement("span", { className: "ripple" }),
|
|
34
|
-
buttonBadge
|
|
34
|
+
buttonBadge ? (React.createElement(ButtonBadge, null, buttonBadge)) : null));
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
export { Button, ButtonColor, ButtonSize };
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { theme } from '@citygross/design-tokens';
|
|
2
2
|
import { useWindowSize } from '@citygross/utils';
|
|
3
3
|
import React, { useRef, useState, useEffect } from 'react';
|
|
4
|
-
import { NavMainLink } from '../NavMainLink/NavMainLink.js';
|
|
5
4
|
import { SearchBar } from '../SearchBar/SearchBar.js';
|
|
6
5
|
import { Nav as Nav$1, NavContainer, NavChildContainer, NavSearchContainer, NavMainLinks, NavDummySearchContainer, SearchResultOverlay } from './Nav.styles.js';
|
|
7
6
|
|
|
8
7
|
var Nav = function (_a) {
|
|
9
8
|
var _b, _c;
|
|
10
|
-
var logo = _a.logo, maxWidth = _a.maxWidth, height = _a.height, topPosition = _a.topPosition, mainLinks = _a.mainLinks, _d = _a.mainLinksBorderColor
|
|
9
|
+
var logo = _a.logo, maxWidth = _a.maxWidth, height = _a.height, topPosition = _a.topPosition, mainLinks = _a.mainLinks, _d = _a.mainLinksBorderColor; _d === void 0 ? (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.primary : _d; var rightContent = _a.rightContent, searchResultElement = _a.searchResultElement, searchCancelLabel = _a.searchCancelLabel, searchIcon = _a.searchIcon, searchPlaceHolder = _a.searchPlaceHolder, searchOnChange = _a.searchOnChange, searchValue = _a.searchValue, onSearchClick = _a.onSearchClick;
|
|
11
10
|
var searchContainerRef = useRef(null);
|
|
12
11
|
var searchInputRef = useRef(null);
|
|
13
12
|
var navRef = useRef(null);
|
|
@@ -56,7 +55,7 @@ var Nav = function (_a) {
|
|
|
56
55
|
React.createElement(SearchBar, { icon: searchIcon, cancelLabel: searchCancelLabel, flexGrow: 1, placeholder: searchPlaceHolder, onChange: searchOnChange, value: searchValue, inputRef: searchInputRef, onCancelClick: function () {
|
|
57
56
|
setOpenSearch(false);
|
|
58
57
|
}, isOpen: openSearch }, searchResultElement))) : (React.createElement(React.Fragment, null,
|
|
59
|
-
React.createElement(NavMainLinks, null, (_c = mainLinks === null || mainLinks === void 0 ? void 0 : mainLinks.slice(0, mainLinks.length - elToRemove)) === null || _c === void 0 ? void 0 : _c.map(function (link) { return
|
|
58
|
+
React.createElement(NavMainLinks, null, (_c = mainLinks === null || mainLinks === void 0 ? void 0 : mainLinks.slice(0, mainLinks.length - elToRemove)) === null || _c === void 0 ? void 0 : _c.map(function (link) { return link; })),
|
|
60
59
|
React.createElement(NavDummySearchContainer, { onClick: function () {
|
|
61
60
|
onSearchClick ? onSearchClick() : setOpenSearch(true);
|
|
62
61
|
} },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Nav.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Nav.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -10,7 +10,6 @@ var SearchBar = function (_a) {
|
|
|
10
10
|
(_a = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
11
11
|
}
|
|
12
12
|
}, [inputRef === null || inputRef === void 0 ? void 0 : inputRef.current]);
|
|
13
|
-
console.log(isOpen, '__________OPEN');
|
|
14
13
|
return (React.createElement(React.Fragment, null,
|
|
15
14
|
React.createElement(SearchBarContainer, { activeBorderColor: activeBorderColor, inputSize: inputSize, flexGrow: flexGrow, isOpen: isOpen },
|
|
16
15
|
React.createElement(SearchLeftIcon, null, icon),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBar.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchBar.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -69,9 +69,9 @@ import '../../containers/TwoColumnsContainer/TwoColumnsPageContainer.styles.js';
|
|
|
69
69
|
import '../UnorderedList/UnorderedList.styles.js';
|
|
70
70
|
import { WarningIndicator } from './WarningLabel.styles.js';
|
|
71
71
|
import '../MobileTable/MobileTable.styles.js';
|
|
72
|
-
import '../NavMainLink/NavMainLink.styled.js';
|
|
73
72
|
import '../SearchBar/SearchBar.styles.js';
|
|
74
73
|
import '../Nav/Nav.styles.js';
|
|
74
|
+
import '../NavMainLink/NavMainLink.styled.js';
|
|
75
75
|
import 'framer-motion';
|
|
76
76
|
import '../SideModal/SideModal.styles.js';
|
|
77
77
|
import '../IconText/IconText.styles.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citygross/components",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.82",
|
|
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": "deb2bd9f4c54ae9de1a5034c4223f0d3d1752d5e"
|
|
75
75
|
}
|