@elliemae/ds-global-header 2.0.0-rc.13 → 2.0.0-rc.17
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/cjs/{index.d.js → GlobalHeaderTypes.js} +0 -0
- package/cjs/components/Breadcrumb/GlobalHeaderBreadcrumb.js +20 -10
- package/cjs/components/Breadcrumb/PureBreadcrumb.js +31 -8
- package/cjs/components/Breadcrumb/styles.js +9 -14
- package/cjs/components/Toolbar/ToolbarItems.js +39 -21
- package/cjs/components/Toolbar/styles.js +1 -6
- package/cjs/config/useGlobalHeader.js +1 -1
- package/cjs/config/useValidateProps.js +0 -17
- package/cjs/config/validateHelpers.js +2 -2
- package/cjs/outOfTheBox/AppPicker/AppPicker.js +32 -7
- package/cjs/outOfTheBox/PopupMenu/PopupMenu.js +51 -17
- package/cjs/outOfTheBox/PopupMenu/PopupMenuContent.js +10 -5
- package/cjs/outOfTheBox/PopupMenu/styles.js +1 -1
- package/cjs/outOfTheBox/SearchToggle/SearchToggle.js +113 -0
- package/cjs/outOfTheBox/SearchToggle/styles.js +15 -0
- package/cjs/outOfTheBox/index.js +2 -0
- package/esm/{index.d.js → GlobalHeaderTypes.js} +0 -0
- package/esm/components/Breadcrumb/GlobalHeaderBreadcrumb.js +18 -10
- package/esm/components/Breadcrumb/PureBreadcrumb.js +29 -8
- package/esm/components/Breadcrumb/styles.js +9 -14
- package/esm/components/Toolbar/ToolbarItems.js +37 -20
- package/esm/components/Toolbar/styles.js +1 -6
- package/esm/config/useGlobalHeader.js +1 -1
- package/esm/config/useValidateProps.js +0 -17
- package/esm/config/validateHelpers.js +2 -2
- package/esm/outOfTheBox/AppPicker/AppPicker.js +30 -7
- package/esm/outOfTheBox/PopupMenu/PopupMenu.js +49 -17
- package/esm/outOfTheBox/PopupMenu/PopupMenuContent.js +10 -5
- package/esm/outOfTheBox/PopupMenu/styles.js +1 -1
- package/esm/outOfTheBox/SearchToggle/SearchToggle.js +103 -0
- package/esm/outOfTheBox/SearchToggle/styles.js +7 -0
- package/esm/outOfTheBox/index.js +1 -0
- package/package.json +19 -7
- package/types/GlobalHeader.d.ts +1 -1
- package/types/GlobalHeaderContainer.d.ts +1 -1
- package/types/GlobalHeaderContext.d.ts +1 -1
- package/types/{index.d.d.ts → GlobalHeaderTypes.d.ts} +16 -2
- package/types/components/Breadcrumb/PureBreadcrumb.d.ts +2 -2
- package/types/components/Breadcrumb/styles.d.ts +1 -1
- package/types/config/useGetPropsWithDefaults.d.ts +1 -1
- package/types/config/useGlobalHeader.d.ts +1 -1
- package/types/config/useValidateProps.d.ts +1 -1
- package/types/defaultProps.d.ts +1 -1
- package/types/outOfTheBox/AppPicker/AppPicker.d.ts +1 -1
- package/types/outOfTheBox/PopupMenu/PopupMenu.d.ts +2 -2
- package/types/outOfTheBox/PopupMenu/PopupMenuContent.d.ts +2 -2
- package/types/outOfTheBox/SearchToggle/SearchToggle.d.ts +2 -0
- package/types/outOfTheBox/SearchToggle/styles.d.ts +1 -0
- package/types/outOfTheBox/index.d.ts +1 -0
|
@@ -1,58 +1,90 @@
|
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
1
2
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
2
4
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
5
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
6
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
7
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
8
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
9
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
3
10
|
import { useState, useCallback, useMemo } from 'react';
|
|
4
11
|
import { DSPopperJS } from '@elliemae/ds-popperjs';
|
|
5
12
|
import { PopupMenuContent } from './PopupMenuContent.js';
|
|
6
13
|
import { Button } from '../../components/Toolbar/styles.js';
|
|
14
|
+
import { getDataProps } from '@elliemae/ds-props-helpers';
|
|
7
15
|
import { jsx } from 'react/jsx-runtime';
|
|
8
16
|
|
|
17
|
+
const _excluded = ["Icon", "title", "onClick", "id", "componentProps"];
|
|
18
|
+
|
|
19
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
20
|
+
|
|
21
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
9
22
|
const PopupMenu = _ref => {
|
|
10
23
|
var _PopupMenuContent;
|
|
11
24
|
|
|
12
25
|
let {
|
|
13
26
|
Icon,
|
|
14
|
-
options,
|
|
15
|
-
closeOnClick,
|
|
16
27
|
title,
|
|
17
|
-
onClick
|
|
18
|
-
|
|
28
|
+
onClick,
|
|
29
|
+
id,
|
|
30
|
+
componentProps
|
|
31
|
+
} = _ref,
|
|
32
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
33
|
+
|
|
19
34
|
const [isOpen, setIsOpen] = useState(false);
|
|
20
35
|
const [buttonRef, setButtonRef] = useState(null);
|
|
36
|
+
const {
|
|
37
|
+
onClickOutside = () => null,
|
|
38
|
+
onKeyPress,
|
|
39
|
+
popupOnKeyPress,
|
|
40
|
+
isOpen: userIsOpen,
|
|
41
|
+
options,
|
|
42
|
+
closeOnClick
|
|
43
|
+
} = componentProps;
|
|
21
44
|
const handleKeyPress = useCallback(e => {
|
|
22
45
|
if (e.code === 'Enter' || e.code === 'Space') {
|
|
23
46
|
setIsOpen(true);
|
|
24
47
|
}
|
|
25
|
-
|
|
48
|
+
|
|
49
|
+
if (onKeyPress) onKeyPress(e);
|
|
50
|
+
}, [onKeyPress]);
|
|
26
51
|
const handleOnClose = useCallback(() => {
|
|
27
|
-
|
|
52
|
+
if (userIsOpen === undefined) {
|
|
53
|
+
setIsOpen(false);
|
|
54
|
+
}
|
|
55
|
+
|
|
28
56
|
buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.focus();
|
|
29
|
-
}, [buttonRef]);
|
|
57
|
+
}, [buttonRef, userIsOpen]);
|
|
30
58
|
const handleTriggerOnClick = useCallback(e => {
|
|
31
|
-
setIsOpen(true);
|
|
59
|
+
if (userIsOpen === undefined) setIsOpen(true);
|
|
32
60
|
onClick(e);
|
|
33
|
-
}, [onClick]);
|
|
61
|
+
}, [onClick, userIsOpen]);
|
|
34
62
|
const handleItemClick = useCallback(() => {
|
|
35
|
-
if (closeOnClick) handleOnClose();
|
|
36
|
-
}, [closeOnClick, handleOnClose]);
|
|
63
|
+
if (closeOnClick && userIsOpen === undefined) handleOnClose();
|
|
64
|
+
}, [closeOnClick, handleOnClose, userIsOpen]);
|
|
37
65
|
const content = useMemo(() => _PopupMenuContent || (_PopupMenuContent = /*#__PURE__*/_jsx(PopupMenuContent, {
|
|
38
66
|
options: options,
|
|
39
67
|
onItemClick: handleItemClick,
|
|
40
|
-
onClose: handleOnClose
|
|
41
|
-
|
|
42
|
-
|
|
68
|
+
onClose: handleOnClose,
|
|
69
|
+
popupOnKeyPress: popupOnKeyPress
|
|
70
|
+
})), [options, handleItemClick, handleOnClose, popupOnKeyPress]);
|
|
71
|
+
return /*#__PURE__*/_jsx("div", {}, void 0, /*#__PURE__*/jsx(Button, _objectSpread(_objectSpread({
|
|
43
72
|
onClick: handleTriggerOnClick,
|
|
44
73
|
onKeyPress: handleKeyPress,
|
|
45
74
|
title: title,
|
|
46
75
|
ref: setButtonRef,
|
|
47
76
|
"data-testid": "gh-toolbar-item",
|
|
77
|
+
id: id
|
|
78
|
+
}, getDataProps(otherProps)), {}, {
|
|
48
79
|
children: Icon && /*#__PURE__*/_jsx(Icon, {
|
|
49
80
|
fill: "#FFF",
|
|
50
81
|
size: "m"
|
|
51
82
|
})
|
|
52
|
-
}), /*#__PURE__*/_jsx(DSPopperJS, {
|
|
83
|
+
})), /*#__PURE__*/_jsx(DSPopperJS, {
|
|
53
84
|
referenceElement: buttonRef,
|
|
54
|
-
showPopover: isOpen,
|
|
55
|
-
closeContextMenu: handleOnClose
|
|
85
|
+
showPopover: userIsOpen !== null && userIsOpen !== void 0 ? userIsOpen : isOpen,
|
|
86
|
+
closeContextMenu: handleOnClose,
|
|
87
|
+
onClickOutside: onClickOutside
|
|
56
88
|
}, void 0, content));
|
|
57
89
|
};
|
|
58
90
|
|
|
@@ -20,7 +20,8 @@ const PopupMenuContent = /*#__PURE__*/React.memo(_ref => {
|
|
|
20
20
|
let {
|
|
21
21
|
options,
|
|
22
22
|
onItemClick,
|
|
23
|
-
onClose
|
|
23
|
+
onClose,
|
|
24
|
+
popupOnKeyPress
|
|
24
25
|
} = _ref;
|
|
25
26
|
const {
|
|
26
27
|
instanceUID
|
|
@@ -37,7 +38,8 @@ const PopupMenuContent = /*#__PURE__*/React.memo(_ref => {
|
|
|
37
38
|
Icon,
|
|
38
39
|
label = '',
|
|
39
40
|
onClick,
|
|
40
|
-
Content
|
|
41
|
+
Content,
|
|
42
|
+
id
|
|
41
43
|
} = option;
|
|
42
44
|
|
|
43
45
|
const ariaAndDataProps = _objectSpread(_objectSpread({}, getAriaProps(option)), getDataProps(option));
|
|
@@ -49,6 +51,7 @@ const PopupMenuContent = /*#__PURE__*/React.memo(_ref => {
|
|
|
49
51
|
|
|
50
52
|
const handleKeyDown = e => {
|
|
51
53
|
if (e.code === 'Escape') onClose();
|
|
54
|
+
if (popupOnKeyPress) popupOnKeyPress(e);
|
|
52
55
|
};
|
|
53
56
|
|
|
54
57
|
switch (type) {
|
|
@@ -58,7 +61,8 @@ const PopupMenuContent = /*#__PURE__*/React.memo(_ref => {
|
|
|
58
61
|
case 'custom':
|
|
59
62
|
return /*#__PURE__*/jsx(ItemWrapper, _objectSpread(_objectSpread({
|
|
60
63
|
onClick: handleClick,
|
|
61
|
-
onKeyDown: handleKeyDown
|
|
64
|
+
onKeyDown: handleKeyDown,
|
|
65
|
+
id: id
|
|
62
66
|
}, ariaAndDataProps), {}, {
|
|
63
67
|
children: Content && /*#__PURE__*/_jsx(Content, {})
|
|
64
68
|
}), "".concat(instanceUID, "-popup-").concat(label));
|
|
@@ -66,12 +70,13 @@ const PopupMenuContent = /*#__PURE__*/React.memo(_ref => {
|
|
|
66
70
|
default:
|
|
67
71
|
return /*#__PURE__*/jsxs(ItemWrapper, _objectSpread(_objectSpread({
|
|
68
72
|
onClick: handleClick,
|
|
69
|
-
onKeyDown: handleKeyDown
|
|
73
|
+
onKeyDown: handleKeyDown,
|
|
74
|
+
id: id
|
|
70
75
|
}, ariaAndDataProps), {}, {
|
|
71
76
|
children: [Icon && /*#__PURE__*/_jsx(Icon, {}), Label && /*#__PURE__*/_jsx(Label, {}, void 0, label)]
|
|
72
77
|
}), "".concat(instanceUID, "-popup-").concat(label));
|
|
73
78
|
}
|
|
74
|
-
}), [
|
|
79
|
+
}), [options, onItemClick, onClose, popupOnKeyPress, instanceUID]);
|
|
75
80
|
return /*#__PURE__*/jsx(List, {
|
|
76
81
|
ref: menuRef,
|
|
77
82
|
children: content
|
|
@@ -2,7 +2,7 @@ import styled from 'styled-components';
|
|
|
2
2
|
|
|
3
3
|
const List = /*#__PURE__*/styled.div.withConfig({
|
|
4
4
|
componentId: "sc-snqcgs-0"
|
|
5
|
-
})(["padding:5px 0px;"]);
|
|
5
|
+
})(["padding:5px 0px;background:white;"]);
|
|
6
6
|
const ItemWrapper = /*#__PURE__*/styled.button.withConfig({
|
|
7
7
|
componentId: "sc-snqcgs-1"
|
|
8
8
|
})(["display:flex;align-items:center;justify-content:center;width:100%;padding:0 20px;cursor:pointer;border:1px solid transparent;background-color:transparent;outline:none;:hover,:focus{border:", ";}"], _ref => {
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
4
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
5
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
6
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
7
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
8
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
9
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
10
|
+
import { useState, useRef, useCallback } from 'react';
|
|
11
|
+
import { Search } from '@elliemae/ds-icons';
|
|
12
|
+
import { getDataProps } from '@elliemae/ds-props-helpers';
|
|
13
|
+
import { DSIconColors } from '@elliemae/ds-icon';
|
|
14
|
+
import { DSNavSearchBox } from '@elliemae/ds-form';
|
|
15
|
+
import { StyledNavSearchBoxContainer } from './styles.js';
|
|
16
|
+
import { Button } from '../../components/Toolbar/styles.js';
|
|
17
|
+
import { jsx } from 'react/jsx-runtime';
|
|
18
|
+
|
|
19
|
+
const _excluded = ["id", "componentProps"];
|
|
20
|
+
|
|
21
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
22
|
+
|
|
23
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
24
|
+
const SearchToggle = _ref => {
|
|
25
|
+
let {
|
|
26
|
+
id,
|
|
27
|
+
componentProps
|
|
28
|
+
} = _ref,
|
|
29
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
30
|
+
|
|
31
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
32
|
+
const inputRef = useRef(null);
|
|
33
|
+
const triggerRef = useRef(null);
|
|
34
|
+
const containerRef = useRef(null);
|
|
35
|
+
const {
|
|
36
|
+
onNext,
|
|
37
|
+
onPrevious,
|
|
38
|
+
currentResultIndex,
|
|
39
|
+
totalResults,
|
|
40
|
+
placeholder,
|
|
41
|
+
value,
|
|
42
|
+
onChange,
|
|
43
|
+
onBlur,
|
|
44
|
+
onClear,
|
|
45
|
+
isOpen: userIsOpen,
|
|
46
|
+
onKeyDown,
|
|
47
|
+
onClick
|
|
48
|
+
} = componentProps;
|
|
49
|
+
const handleOnClick = useCallback(e => {
|
|
50
|
+
if (userIsOpen === undefined) setIsOpen(true);
|
|
51
|
+
if (onClick) onClick(e);
|
|
52
|
+
}, [onClick, userIsOpen]);
|
|
53
|
+
const handleOnKeyDown = useCallback(e => {
|
|
54
|
+
if (userIsOpen === undefined) {
|
|
55
|
+
if (e.code === 'Escape') {
|
|
56
|
+
setIsOpen(false);
|
|
57
|
+
setTimeout(() => {
|
|
58
|
+
var _triggerRef$current;
|
|
59
|
+
|
|
60
|
+
return (_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 ? void 0 : _triggerRef$current.focus();
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (onKeyDown) onKeyDown(e);
|
|
66
|
+
}, [onKeyDown, userIsOpen]);
|
|
67
|
+
const handleOnBlur = useCallback(() => {
|
|
68
|
+
setTimeout(() => {
|
|
69
|
+
var _containerRef$current;
|
|
70
|
+
|
|
71
|
+
const contains = (_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.contains(document.activeElement);
|
|
72
|
+
if (value === '' && !contains) setIsOpen(false);
|
|
73
|
+
});
|
|
74
|
+
}, [value]);
|
|
75
|
+
return userIsOpen || isOpen ? /*#__PURE__*/jsx(StyledNavSearchBoxContainer, {
|
|
76
|
+
onKeyDown: handleOnKeyDown,
|
|
77
|
+
ref: containerRef,
|
|
78
|
+
onBlur: handleOnBlur,
|
|
79
|
+
children: /*#__PURE__*/_jsx(DSNavSearchBox, {
|
|
80
|
+
onNext: onNext,
|
|
81
|
+
onPrevious: onPrevious,
|
|
82
|
+
currentResultIndex: currentResultIndex,
|
|
83
|
+
totalResults: totalResults,
|
|
84
|
+
onClear: onClear,
|
|
85
|
+
placeholder: placeholder,
|
|
86
|
+
onChange: onChange,
|
|
87
|
+
value: value,
|
|
88
|
+
onBlur: onBlur,
|
|
89
|
+
innerRef: inputRef,
|
|
90
|
+
autoFocus: true
|
|
91
|
+
})
|
|
92
|
+
}) : /*#__PURE__*/jsx(Button, _objectSpread(_objectSpread({
|
|
93
|
+
onClick: handleOnClick,
|
|
94
|
+
ref: triggerRef,
|
|
95
|
+
id: id
|
|
96
|
+
}, getDataProps(otherProps)), {}, {
|
|
97
|
+
children: /*#__PURE__*/_jsx(Search, {
|
|
98
|
+
color: DSIconColors.WHITE
|
|
99
|
+
})
|
|
100
|
+
}));
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export { SearchToggle };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
const StyledNavSearchBoxContainer = /*#__PURE__*/styled.div.withConfig({
|
|
4
|
+
componentId: "sc-1dlcqwh-0"
|
|
5
|
+
})(["background:white;position:relative;min-width:260px;& .em-ds-button{margin-right:2px;height:24px;width:24px;}& .em-ds-input{border:none;outline:none;box-shadow:none;}& .em-ds-input:focus{border:none;box-shadow:none;}& .em-ds-input.em-ds-input--clearable:hover{border:none;outline:none;box-shadow:none;}& .em-ds-input-addon-wrapper{box-shadow:none;}& .em-ds-input-addon-wrapper:hover{outline:none;}& .em-ds-input-addon-wrapper__addon:hover{outline:none;}& .em-ds-input:not(.floating-label-input-controller):hover:active{border:none;outline:none;box-shadow:none;}"]);
|
|
6
|
+
|
|
7
|
+
export { StyledNavSearchBoxContainer };
|
package/esm/outOfTheBox/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-global-header",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.17",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Global Header",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -19,6 +19,14 @@
|
|
|
19
19
|
"import": "./esm/propTypes.js",
|
|
20
20
|
"require": "./cjs/propTypes.js"
|
|
21
21
|
},
|
|
22
|
+
"./outOfTheBox/SearchToggle/styles": {
|
|
23
|
+
"import": "./esm/outOfTheBox/SearchToggle/styles.js",
|
|
24
|
+
"require": "./cjs/outOfTheBox/SearchToggle/styles.js"
|
|
25
|
+
},
|
|
26
|
+
"./outOfTheBox/SearchToggle/SearchToggle": {
|
|
27
|
+
"import": "./esm/outOfTheBox/SearchToggle/SearchToggle.js",
|
|
28
|
+
"require": "./cjs/outOfTheBox/SearchToggle/SearchToggle.js"
|
|
29
|
+
},
|
|
22
30
|
"./outOfTheBox/PopupMenu/styles": {
|
|
23
31
|
"import": "./esm/outOfTheBox/PopupMenu/styles.js",
|
|
24
32
|
"require": "./cjs/outOfTheBox/PopupMenu/styles.js"
|
|
@@ -39,6 +47,10 @@
|
|
|
39
47
|
"import": "./esm/outOfTheBox/AppPicker/AppPicker.js",
|
|
40
48
|
"require": "./cjs/outOfTheBox/AppPicker/AppPicker.js"
|
|
41
49
|
},
|
|
50
|
+
"./GlobalHeaderTypes": {
|
|
51
|
+
"import": "./esm/GlobalHeaderTypes.js",
|
|
52
|
+
"require": "./cjs/GlobalHeaderTypes.js"
|
|
53
|
+
},
|
|
42
54
|
"./GlobalHeaderContext": {
|
|
43
55
|
"import": "./esm/GlobalHeaderContext.js",
|
|
44
56
|
"require": "./cjs/GlobalHeaderContext.js"
|
|
@@ -120,12 +132,12 @@
|
|
|
120
132
|
"build": "node ../../scripts/build/build.js"
|
|
121
133
|
},
|
|
122
134
|
"dependencies": {
|
|
123
|
-
"@elliemae/ds-app-picker": "2.0.0-rc.
|
|
124
|
-
"@elliemae/ds-grid": "2.0.0-rc.
|
|
125
|
-
"@elliemae/ds-icons": "2.0.0-rc.
|
|
126
|
-
"@elliemae/ds-popperjs": "2.0.0-rc.
|
|
127
|
-
"@elliemae/ds-props-helpers": "2.0.0-rc.
|
|
128
|
-
"@elliemae/ds-utilities": "2.0.0-rc.
|
|
135
|
+
"@elliemae/ds-app-picker": "2.0.0-rc.17",
|
|
136
|
+
"@elliemae/ds-grid": "2.0.0-rc.17",
|
|
137
|
+
"@elliemae/ds-icons": "2.0.0-rc.17",
|
|
138
|
+
"@elliemae/ds-popperjs": "2.0.0-rc.17",
|
|
139
|
+
"@elliemae/ds-props-helpers": "2.0.0-rc.17",
|
|
140
|
+
"@elliemae/ds-utilities": "2.0.0-rc.17",
|
|
129
141
|
"react-desc": "~4.1.3",
|
|
130
142
|
"uid": "~2.0.0"
|
|
131
143
|
},
|
package/types/GlobalHeader.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference path="../../../../shared/typings/react-desc.d.ts" />
|
|
2
2
|
/// <reference types="react" />
|
|
3
|
-
import type { GlobalHeaderPropsT as Props } from './
|
|
3
|
+
import type { GlobalHeaderPropsT as Props } from './GlobalHeaderTypes';
|
|
4
4
|
declare const GlobalHeader: {
|
|
5
5
|
(props: Props): JSX.Element;
|
|
6
6
|
defaultProps: Props;
|
|
@@ -27,11 +27,11 @@ export interface BreadcrumbItemT {
|
|
|
27
27
|
length: number;
|
|
28
28
|
}
|
|
29
29
|
export interface ToolbarItemT {
|
|
30
|
-
type?: 'ds-app-picker' | 'ds-popup-menu';
|
|
30
|
+
type?: 'ds-app-picker' | 'ds-popup-menu' | 'ds-search-toggle';
|
|
31
31
|
label: string;
|
|
32
32
|
Icon: React.ComponentType<Record<string, unknown>>;
|
|
33
33
|
onClick: (event: React.MouseEvent<HTMLElement>) => void;
|
|
34
|
-
componentProps?: PopupPropsT | AppPickerProps;
|
|
34
|
+
componentProps?: PopupPropsT | AppPickerProps | SearchTogglePropsT;
|
|
35
35
|
}
|
|
36
36
|
export interface PopupPropsT {
|
|
37
37
|
Icon?: React.ComponentType<Record<string, unknown>>;
|
|
@@ -66,3 +66,17 @@ export interface LabelT {
|
|
|
66
66
|
isSelected: boolean;
|
|
67
67
|
isOnlyItem: boolean;
|
|
68
68
|
}
|
|
69
|
+
export interface SearchTogglePropsT {
|
|
70
|
+
onNext: () => void;
|
|
71
|
+
onPrevious: () => void;
|
|
72
|
+
currentResultIndex: number;
|
|
73
|
+
totalResults: number;
|
|
74
|
+
placeholder: string;
|
|
75
|
+
value: string;
|
|
76
|
+
onChange: () => void;
|
|
77
|
+
onBlur: () => void;
|
|
78
|
+
onClear: () => void;
|
|
79
|
+
isOpen: boolean;
|
|
80
|
+
onKeyDown: (e: React.KeyboardEvent) => void;
|
|
81
|
+
onClick: (e: React.MouseEvent) => void;
|
|
82
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { BreadcrumbItemT as Props } from '../../
|
|
3
|
-
export declare const PureBreadcrumb: React.MemoExoticComponent<({ onClick, isSelected, length, label, hasNext }: Props) => JSX.Element>;
|
|
2
|
+
import type { BreadcrumbItemT as Props } from '../../GlobalHeaderTypes';
|
|
3
|
+
export declare const PureBreadcrumb: React.MemoExoticComponent<({ onClick, isSelected, length, label, hasNext, id, ...rest }: Props) => JSX.Element>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LabelT, PipeT } from '../../
|
|
1
|
+
import type { LabelT, PipeT } from '../../GlobalHeaderTypes';
|
|
2
2
|
export declare const Pipe: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, PipeT, never>;
|
|
3
3
|
export declare const BreadcrumbItem: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
4
|
export declare const LabelButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { GlobalHeaderPropsT } from '../
|
|
1
|
+
import type { GlobalHeaderPropsT } from '../GlobalHeaderTypes';
|
|
2
2
|
export declare const useGetPropsWithDefaults: (props: GlobalHeaderPropsT) => GlobalHeaderPropsT;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ContextT, GlobalHeaderPropsT } from '../
|
|
1
|
+
import type { ContextT, GlobalHeaderPropsT } from '../GlobalHeaderTypes';
|
|
2
2
|
export declare const useGlobalHeader: (props: GlobalHeaderPropsT) => ContextT;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { GlobalHeaderPropsT } from '../
|
|
1
|
+
import { GlobalHeaderPropsT } from '../GlobalHeaderTypes';
|
|
2
2
|
export declare const useValidateProps: (props: GlobalHeaderPropsT) => void;
|
package/types/defaultProps.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { GlobalHeaderPropsT } from './
|
|
1
|
+
import type { GlobalHeaderPropsT } from './GlobalHeaderTypes';
|
|
2
2
|
export declare const defaultProps: GlobalHeaderPropsT;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DSAppPicker } from '@elliemae/ds-app-picker';
|
|
3
3
|
declare type AppPickerProps = React.ComponentProps<typeof DSAppPicker>;
|
|
4
|
-
export declare const AppPicker: ({ label,
|
|
4
|
+
export declare const AppPicker: ({ label, id, componentProps, ...otherProps }: AppPickerProps & {
|
|
5
5
|
label: string;
|
|
6
6
|
triggerOnClick?: React.MouseEventHandler<Element> | undefined;
|
|
7
7
|
}) => JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { PopupPropsT as Props } from '../../
|
|
3
|
-
export declare const PopupMenu: ({ Icon,
|
|
2
|
+
import type { PopupPropsT as Props } from '../../GlobalHeaderTypes';
|
|
3
|
+
export declare const PopupMenu: ({ Icon, title, onClick, id, componentProps, ...otherProps }: Props) => JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { PopupMenuContentPropsT as Props } from '../../
|
|
3
|
-
export declare const PopupMenuContent: React.MemoExoticComponent<({ options, onItemClick, onClose }: Props) => JSX.Element>;
|
|
2
|
+
import type { PopupMenuContentPropsT as Props } from '../../GlobalHeaderTypes';
|
|
3
|
+
export declare const PopupMenuContent: React.MemoExoticComponent<({ options, onItemClick, onClose, popupOnKeyPress }: Props) => JSX.Element>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const StyledNavSearchBoxContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|