@elliemae/ds-global-header 2.0.0-rc.1 → 2.0.0-rc.13
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/components/Breadcrumb/GlobalHeaderBreadcrumb.js +8 -8
- package/cjs/components/Breadcrumb/PureBreadcrumb.js +1 -1
- package/cjs/components/Toolbar/ToolbarItems.js +14 -19
- package/cjs/config/useGlobalHeader.js +10 -4
- package/cjs/config/useValidateProps.js +2 -2
- package/cjs/defaultProps.js +4 -2
- package/cjs/outOfTheBox/AppPicker/AppPicker.js +29 -22
- package/cjs/outOfTheBox/PopupMenu/PopupMenu.js +19 -38
- package/cjs/outOfTheBox/PopupMenu/PopupMenuContent.js +26 -11
- package/esm/components/Breadcrumb/GlobalHeaderBreadcrumb.js +8 -8
- package/esm/components/Breadcrumb/PureBreadcrumb.js +1 -1
- package/esm/components/Toolbar/ToolbarItems.js +13 -19
- package/esm/config/useGlobalHeader.js +10 -4
- package/esm/config/useValidateProps.js +2 -2
- package/esm/defaultProps.js +4 -2
- package/esm/outOfTheBox/AppPicker/AppPicker.js +29 -22
- package/esm/outOfTheBox/PopupMenu/PopupMenu.js +20 -38
- package/esm/outOfTheBox/PopupMenu/PopupMenuContent.js +27 -13
- package/package.json +7 -6
- package/types/GlobalHeader.d.ts +30 -5
- package/types/components/Breadcrumb/styles.d.ts +4 -4
- package/types/components/Toolbar/styles.d.ts +1 -1
- package/types/config/validateHelpers.d.ts +4 -4
- package/types/index.d.d.ts +10 -16
- package/types/outOfTheBox/AppPicker/AppPicker.d.ts +8 -3
- package/types/outOfTheBox/PopupMenu/styles.d.ts +4 -4
- package/types/propTypes.d.ts +27 -6
- package/types/styles.d.ts +1 -1
|
@@ -26,14 +26,14 @@ const GlobalHeaderBreadcrumb = () => {
|
|
|
26
26
|
setShowIconOnly,
|
|
27
27
|
globalHeaderBreadcrumbGrid
|
|
28
28
|
} = React.useContext(GlobalHeaderContext.GlobalHeaderContext);
|
|
29
|
-
const breakpoint = React.useRef();
|
|
30
|
-
const flexRegion = React.useRef();
|
|
29
|
+
const breakpoint = React.useRef(null);
|
|
30
|
+
const flexRegion = React.useRef(null);
|
|
31
31
|
React.useEffect(() => {
|
|
32
32
|
const evaluateShowIconOnly = () => {
|
|
33
|
-
if ((flexRegion === null || flexRegion === void 0 ? void 0 : flexRegion.current.offsetWidth) <= 0 && !breakpoint.current) {
|
|
33
|
+
if (flexRegion && flexRegion.current && (flexRegion === null || flexRegion === void 0 ? void 0 : flexRegion.current.offsetWidth) <= 0 && !breakpoint.current) {
|
|
34
34
|
setShowIconOnly(true);
|
|
35
35
|
breakpoint.current = window.innerWidth;
|
|
36
|
-
} else if (window.innerWidth >= breakpoint.current) {
|
|
36
|
+
} else if (breakpoint && breakpoint.current !== null && window.innerWidth >= breakpoint.current) {
|
|
37
37
|
setShowIconOnly(false);
|
|
38
38
|
breakpoint.current = null;
|
|
39
39
|
}
|
|
@@ -46,13 +46,13 @@ const GlobalHeaderBreadcrumb = () => {
|
|
|
46
46
|
return /*#__PURE__*/_jsx__default["default"](dsGrid.Grid, {
|
|
47
47
|
height: "100%",
|
|
48
48
|
alignItems: "center",
|
|
49
|
-
justifyContent: "
|
|
50
|
-
role: "navigation",
|
|
49
|
+
justifyContent: "flex-start",
|
|
51
50
|
"aria-label": "breadcrumbs",
|
|
52
|
-
cols: globalHeaderBreadcrumbGrid
|
|
51
|
+
cols: globalHeaderBreadcrumbGrid,
|
|
52
|
+
role: "navigation"
|
|
53
53
|
}, void 0, /*#__PURE__*/_jsx__default["default"](styles.Pipe, {
|
|
54
54
|
showIconOnly: showIconOnly
|
|
55
|
-
}), breadcrumb.map(item => {
|
|
55
|
+
}), breadcrumb === null || breadcrumb === void 0 ? void 0 : breadcrumb.map(item => {
|
|
56
56
|
const {
|
|
57
57
|
label,
|
|
58
58
|
hasNext,
|
|
@@ -26,7 +26,7 @@ const PureBreadcrumb = /*#__PURE__*/React__default["default"].memo(_ref => {
|
|
|
26
26
|
"aria-selected": isSelected,
|
|
27
27
|
"data-testid": "gh-breadcrumb-btn"
|
|
28
28
|
}, void 0, /*#__PURE__*/_jsx__default["default"](styles.Label, {
|
|
29
|
-
isSelected: isSelected,
|
|
29
|
+
isSelected: !!isSelected,
|
|
30
30
|
isOnlyItem: length === 1
|
|
31
31
|
}, void 0, label)), hasNext && (_ChevronSmallRight || (_ChevronSmallRight = /*#__PURE__*/_jsx__default["default"](dsIcons.ChevronSmallRight, {
|
|
32
32
|
size: "m",
|
|
@@ -2,9 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
5
6
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
7
|
require('core-js/modules/esnext.async-iterator.map.js');
|
|
7
8
|
require('core-js/modules/esnext.iterator.map.js');
|
|
9
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
10
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
11
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
12
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
13
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
8
14
|
var React = require('react');
|
|
9
15
|
var AppPicker = require('../../outOfTheBox/AppPicker/AppPicker.js');
|
|
10
16
|
var PopupMenu = require('../../outOfTheBox/PopupMenu/PopupMenu.js');
|
|
@@ -14,8 +20,12 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
14
20
|
|
|
15
21
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
16
22
|
|
|
23
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
17
24
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
18
25
|
|
|
26
|
+
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; }
|
|
27
|
+
|
|
28
|
+
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__default["default"](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; }
|
|
19
29
|
const ToolbarItems = () => {
|
|
20
30
|
const {
|
|
21
31
|
props: {
|
|
@@ -23,7 +33,7 @@ const ToolbarItems = () => {
|
|
|
23
33
|
},
|
|
24
34
|
instanceUID
|
|
25
35
|
} = React.useContext(GlobalHeaderContext.GlobalHeaderContext);
|
|
26
|
-
const itemsList = React.useMemo(() => toolbar.map(item => {
|
|
36
|
+
const itemsList = React.useMemo(() => toolbar === null || toolbar === void 0 ? void 0 : toolbar.map(item => {
|
|
27
37
|
var _Icon;
|
|
28
38
|
|
|
29
39
|
const {
|
|
@@ -49,24 +59,9 @@ const ToolbarItems = () => {
|
|
|
49
59
|
}, "".concat(instanceUID, "-ds-popup-menu-").concat(label));
|
|
50
60
|
|
|
51
61
|
case 'ds-app-picker':
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
sectionTitle,
|
|
56
|
-
customSectionTitle,
|
|
57
|
-
actionRef,
|
|
58
|
-
onKeyDown
|
|
59
|
-
} = componentProps;
|
|
60
|
-
return /*#__PURE__*/_jsx__default["default"](AppPicker.AppPicker, {
|
|
61
|
-
onClick: onClick,
|
|
62
|
-
label: label,
|
|
63
|
-
apps: apps,
|
|
64
|
-
customApps: customApps,
|
|
65
|
-
sectionTitle: sectionTitle,
|
|
66
|
-
customSectionTitle: customSectionTitle,
|
|
67
|
-
actionRef: actionRef,
|
|
68
|
-
onKeyDown: onKeyDown
|
|
69
|
-
}, "".concat(instanceUID, "-ds-app-picker-").concat(label));
|
|
62
|
+
return /*#__PURE__*/jsxRuntime.jsx(AppPicker.AppPicker, _objectSpread({
|
|
63
|
+
label: label
|
|
64
|
+
}, componentProps), "".concat(instanceUID, "-ds-app-picker-").concat(label));
|
|
70
65
|
|
|
71
66
|
default:
|
|
72
67
|
return /*#__PURE__*/_jsx__default["default"](styles.Button, {
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('core-js/modules/web.dom-collections.iterator.js');
|
|
6
|
-
require('core-js/modules/esnext.async-iterator.map.js');
|
|
7
|
-
require('core-js/modules/esnext.iterator.map.js');
|
|
8
6
|
var React = require('react');
|
|
9
7
|
var uid = require('uid');
|
|
10
8
|
var useGetPropsWithDefaults = require('./useGetPropsWithDefaults.js');
|
|
@@ -16,8 +14,16 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
16
14
|
const useGlobalHeader = props => {
|
|
17
15
|
const [showIconOnly, setShowIconOnly] = React.useState(false);
|
|
18
16
|
const instanceUID = React.useMemo(() => uid.uid(5), []);
|
|
19
|
-
const globalHeaderToolbarGrid = React.useMemo(() =>
|
|
20
|
-
|
|
17
|
+
const globalHeaderToolbarGrid = React.useMemo(() => {
|
|
18
|
+
var _props$toolbar$length, _props$toolbar;
|
|
19
|
+
|
|
20
|
+
return new Array((_props$toolbar$length = props === null || props === void 0 ? void 0 : (_props$toolbar = props.toolbar) === null || _props$toolbar === void 0 ? void 0 : _props$toolbar.length) !== null && _props$toolbar$length !== void 0 ? _props$toolbar$length : 0).fill('1fr');
|
|
21
|
+
}, [props.toolbar]);
|
|
22
|
+
const globalHeaderBreadcrumbGrid = React.useMemo(() => {
|
|
23
|
+
var _props$breadcrumb$len, _props$breadcrumb;
|
|
24
|
+
|
|
25
|
+
return ['auto', ...new Array((_props$breadcrumb$len = props === null || props === void 0 ? void 0 : (_props$breadcrumb = props.breadcrumb) === null || _props$breadcrumb === void 0 ? void 0 : _props$breadcrumb.length) !== null && _props$breadcrumb$len !== void 0 ? _props$breadcrumb$len : 0).fill('auto'), '1fr'];
|
|
26
|
+
}, [props.breadcrumb]);
|
|
21
27
|
const propsWithDefaults = useGetPropsWithDefaults.useGetPropsWithDefaults(props);
|
|
22
28
|
const ctx = React__default["default"].useMemo(() => ({
|
|
23
29
|
props: propsWithDefaults,
|
|
@@ -66,7 +66,7 @@ const useValidateProps = props => {
|
|
|
66
66
|
validateHelpers.throwLogoError('LogoWithBrand', LogoWithBrand);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
breadcrumb.forEach(breadcrumbItem => {
|
|
69
|
+
breadcrumb === null || breadcrumb === void 0 ? void 0 : breadcrumb.forEach(breadcrumbItem => {
|
|
70
70
|
if (breadcrumbItem.label && typeof breadcrumbItem.label !== 'string') {
|
|
71
71
|
validateHelpers.throwBreadcrumbItemError('label', breadcrumbItem.label);
|
|
72
72
|
}
|
|
@@ -83,7 +83,7 @@ const useValidateProps = props => {
|
|
|
83
83
|
validateHelpers.throwBreadcrumbItemError('isSelected', breadcrumbItem.isSelected);
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
|
-
toolbar.forEach(toolbarItem => {
|
|
86
|
+
toolbar === null || toolbar === void 0 ? void 0 : toolbar.forEach(toolbarItem => {
|
|
87
87
|
validateGenericToolbarItem(toolbarItem);
|
|
88
88
|
|
|
89
89
|
if (toolbarItem.type) {
|
package/cjs/defaultProps.js
CHANGED
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
const emptyComp = () => null;
|
|
6
|
+
|
|
5
7
|
const defaultProps = {
|
|
6
8
|
breadcrumb: [],
|
|
7
9
|
toolbar: [],
|
|
8
|
-
LogoWithBrand:
|
|
9
|
-
Logo:
|
|
10
|
+
LogoWithBrand: emptyComp,
|
|
11
|
+
Logo: emptyComp
|
|
10
12
|
};
|
|
11
13
|
|
|
12
14
|
exports.defaultProps = defaultProps;
|
|
@@ -6,6 +6,7 @@ var _jsx = require('@babel/runtime/helpers/jsx');
|
|
|
6
6
|
require('core-js/modules/web.dom-collections.iterator.js');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var dsAppPicker = require('@elliemae/ds-app-picker');
|
|
9
|
+
var dsUtilities = require('@elliemae/ds-utilities');
|
|
9
10
|
var dsIcons = require('@elliemae/ds-icons');
|
|
10
11
|
var styles = require('../../components/Toolbar/styles.js');
|
|
11
12
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -16,49 +17,53 @@ var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
|
16
17
|
|
|
17
18
|
var _MenuPicker;
|
|
18
19
|
const AppPicker = _ref => {
|
|
19
|
-
var _DSAppPicker;
|
|
20
|
-
|
|
21
20
|
let {
|
|
22
21
|
label,
|
|
23
22
|
apps,
|
|
23
|
+
icon,
|
|
24
24
|
customApps,
|
|
25
25
|
sectionTitle,
|
|
26
26
|
customSectionTitle,
|
|
27
|
-
onClick = () => null,
|
|
28
27
|
actionRef,
|
|
29
|
-
|
|
28
|
+
isOpen: userIsOpen,
|
|
29
|
+
onKeyDown: userOnKeyDown,
|
|
30
|
+
onClickOutside: userOnClickOutside,
|
|
31
|
+
renderTrigger: userRenderTrigger,
|
|
32
|
+
onClose,
|
|
33
|
+
triggerRef,
|
|
34
|
+
triggerOnClick
|
|
30
35
|
} = _ref;
|
|
31
36
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
32
|
-
const buttonRef = React.useRef();
|
|
37
|
+
const buttonRef = React.useRef(null);
|
|
33
38
|
const handleTriggerKeyDown = React.useCallback(e => {
|
|
34
39
|
if (e.code === 'Enter' || e.code === 'Space') {
|
|
35
40
|
setIsOpen(true);
|
|
36
41
|
}
|
|
37
42
|
}, []);
|
|
38
43
|
const handleAppPickerOnKeyDown = React.useCallback(e => {
|
|
39
|
-
customHandleOnKeyDown(e);
|
|
40
|
-
|
|
41
44
|
if (e.code === 'Escape') {
|
|
45
|
+
var _buttonRef$current;
|
|
46
|
+
|
|
42
47
|
setIsOpen(false);
|
|
48
|
+
buttonRef === null || buttonRef === void 0 ? void 0 : (_buttonRef$current = buttonRef.current) === null || _buttonRef$current === void 0 ? void 0 : _buttonRef$current.focus();
|
|
43
49
|
}
|
|
44
|
-
}, [
|
|
50
|
+
}, []);
|
|
45
51
|
const handleOnClickOutside = React.useCallback(() => {
|
|
46
52
|
setIsOpen(false);
|
|
47
53
|
}, []);
|
|
48
|
-
const handleOnClick = React.useCallback(
|
|
54
|
+
const handleOnClick = React.useCallback(() => {
|
|
49
55
|
setIsOpen(true);
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const trigger = React.useMemo(() => _ref2 => {
|
|
56
|
+
}, []);
|
|
57
|
+
const renderTrigger = React.useMemo(() => _ref2 => {
|
|
53
58
|
let {
|
|
54
59
|
ref
|
|
55
60
|
} = _ref2;
|
|
56
61
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
57
62
|
ref: ref,
|
|
58
63
|
children: /*#__PURE__*/jsxRuntime.jsx(styles.Button, {
|
|
59
|
-
onClick: handleOnClick,
|
|
64
|
+
onClick: triggerOnClick !== null && triggerOnClick !== void 0 ? triggerOnClick : handleOnClick,
|
|
60
65
|
onKeyDown: handleTriggerKeyDown,
|
|
61
|
-
ref: buttonRef,
|
|
66
|
+
ref: dsUtilities.mergeRefs(buttonRef, triggerRef),
|
|
62
67
|
title: label,
|
|
63
68
|
"data-testid": "gh-toolbar-item",
|
|
64
69
|
children: _MenuPicker || (_MenuPicker = /*#__PURE__*/_jsx__default["default"](dsIcons.MenuPicker, {
|
|
@@ -67,19 +72,21 @@ const AppPicker = _ref => {
|
|
|
67
72
|
}))
|
|
68
73
|
})
|
|
69
74
|
});
|
|
70
|
-
}, [handleOnClick, handleTriggerKeyDown, label]);
|
|
71
|
-
return
|
|
72
|
-
isOpen: isOpen,
|
|
75
|
+
}, [triggerOnClick, handleOnClick, handleTriggerKeyDown, label]);
|
|
76
|
+
return /*#__PURE__*/_jsx__default["default"](dsAppPicker.DSAppPicker, {
|
|
73
77
|
apps: apps,
|
|
74
78
|
customApps: customApps,
|
|
75
79
|
sectionTitle: sectionTitle,
|
|
76
80
|
customSectionTitle: customSectionTitle,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
triggerRef: buttonRef,
|
|
81
|
+
icon: icon,
|
|
82
|
+
onKeyDown: userOnKeyDown !== null && userOnKeyDown !== void 0 ? userOnKeyDown : handleAppPickerOnKeyDown,
|
|
80
83
|
actionRef: actionRef,
|
|
81
|
-
|
|
82
|
-
|
|
84
|
+
onClickOutside: userOnClickOutside !== null && userOnClickOutside !== void 0 ? userOnClickOutside : handleOnClickOutside,
|
|
85
|
+
renderTrigger: userRenderTrigger !== null && userRenderTrigger !== void 0 ? userRenderTrigger : renderTrigger,
|
|
86
|
+
isOpen: userIsOpen !== null && userIsOpen !== void 0 ? userIsOpen : isOpen,
|
|
87
|
+
onClose: onClose,
|
|
88
|
+
triggerRef: triggerRef
|
|
89
|
+
});
|
|
83
90
|
};
|
|
84
91
|
|
|
85
92
|
exports.AppPicker = AppPicker;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
6
|
require('core-js/modules/web.dom-collections.iterator.js');
|
|
7
7
|
var React = require('react');
|
|
8
|
-
var
|
|
8
|
+
var dsPopperjs = require('@elliemae/ds-popperjs');
|
|
9
9
|
var PopupMenuContent = require('./PopupMenuContent.js');
|
|
10
10
|
var styles = require('../../components/Toolbar/styles.js');
|
|
11
11
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -13,7 +13,6 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
13
13
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
14
|
|
|
15
15
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
16
|
-
var Popover__default = /*#__PURE__*/_interopDefaultLegacy(Popover);
|
|
17
16
|
|
|
18
17
|
const PopupMenu = _ref => {
|
|
19
18
|
var _PopupMenuContent;
|
|
@@ -26,18 +25,16 @@ const PopupMenu = _ref => {
|
|
|
26
25
|
onClick
|
|
27
26
|
} = _ref;
|
|
28
27
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
29
|
-
const buttonRef = React.
|
|
28
|
+
const [buttonRef, setButtonRef] = React.useState(null);
|
|
30
29
|
const handleKeyPress = React.useCallback(e => {
|
|
31
30
|
if (e.code === 'Enter' || e.code === 'Space') {
|
|
32
31
|
setIsOpen(true);
|
|
33
32
|
}
|
|
34
33
|
}, []);
|
|
35
34
|
const handleOnClose = React.useCallback(() => {
|
|
36
|
-
var _buttonRef$current;
|
|
37
|
-
|
|
38
35
|
setIsOpen(false);
|
|
39
|
-
|
|
40
|
-
}, []);
|
|
36
|
+
buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.focus();
|
|
37
|
+
}, [buttonRef]);
|
|
41
38
|
const handleTriggerOnClick = React.useCallback(e => {
|
|
42
39
|
setIsOpen(true);
|
|
43
40
|
onClick(e);
|
|
@@ -45,42 +42,26 @@ const PopupMenu = _ref => {
|
|
|
45
42
|
const handleItemClick = React.useCallback(() => {
|
|
46
43
|
if (closeOnClick) handleOnClose();
|
|
47
44
|
}, [closeOnClick, handleOnClose]);
|
|
48
|
-
const handleClickOutside = React.useCallback(() => setIsOpen(false), []);
|
|
49
45
|
const content = React.useMemo(() => _PopupMenuContent || (_PopupMenuContent = /*#__PURE__*/_jsx__default["default"](PopupMenuContent.PopupMenuContent, {
|
|
50
46
|
options: options,
|
|
51
47
|
onItemClick: handleItemClick,
|
|
52
48
|
onClose: handleOnClose
|
|
53
49
|
})), [options, handleItemClick, handleOnClose]);
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
});
|
|
70
|
-
}, [Icon, handleKeyPress, handleTriggerOnClick, title]);
|
|
71
|
-
return React.useMemo(() => /*#__PURE__*/_jsx__default["default"](Popover__default["default"], {
|
|
72
|
-
isOpen: isOpen,
|
|
73
|
-
content: content,
|
|
74
|
-
onClickOutside: handleClickOutside,
|
|
75
|
-
placement: "bottom",
|
|
76
|
-
interactionType: "click",
|
|
77
|
-
showArrow: true,
|
|
78
|
-
style: {
|
|
79
|
-
padding: '0',
|
|
80
|
-
width: 'fit-content'
|
|
81
|
-
},
|
|
82
|
-
renderTrigger: trigger
|
|
83
|
-
}), [content, handleClickOutside, isOpen, trigger]);
|
|
50
|
+
return /*#__PURE__*/_jsx__default["default"]("div", {}, void 0, /*#__PURE__*/jsxRuntime.jsx(styles.Button, {
|
|
51
|
+
onClick: handleTriggerOnClick,
|
|
52
|
+
onKeyPress: handleKeyPress,
|
|
53
|
+
title: title,
|
|
54
|
+
ref: setButtonRef,
|
|
55
|
+
"data-testid": "gh-toolbar-item",
|
|
56
|
+
children: Icon && /*#__PURE__*/_jsx__default["default"](Icon, {
|
|
57
|
+
fill: "#FFF",
|
|
58
|
+
size: "m"
|
|
59
|
+
})
|
|
60
|
+
}), /*#__PURE__*/_jsx__default["default"](dsPopperjs.DSPopperJS, {
|
|
61
|
+
referenceElement: buttonRef,
|
|
62
|
+
showPopover: isOpen,
|
|
63
|
+
closeContextMenu: handleOnClose
|
|
64
|
+
}, void 0, content));
|
|
84
65
|
};
|
|
85
66
|
|
|
86
67
|
exports.PopupMenu = PopupMenu;
|
|
@@ -3,9 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
7
|
require('core-js/modules/esnext.async-iterator.map.js');
|
|
7
8
|
require('core-js/modules/esnext.iterator.map.js');
|
|
9
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
10
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
11
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
12
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
13
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
8
14
|
var React = require('react');
|
|
15
|
+
var dsPropsHelpers = require('@elliemae/ds-props-helpers');
|
|
9
16
|
var styles = require('./styles.js');
|
|
10
17
|
var GlobalHeaderContext = require('../../GlobalHeaderContext.js');
|
|
11
18
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -13,8 +20,12 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
13
20
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
21
|
|
|
15
22
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
23
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
16
24
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
17
25
|
|
|
26
|
+
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; }
|
|
27
|
+
|
|
28
|
+
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__default["default"](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; }
|
|
18
29
|
const PopupMenuContent = /*#__PURE__*/React__default["default"].memo(_ref => {
|
|
19
30
|
let {
|
|
20
31
|
options,
|
|
@@ -24,26 +35,26 @@ const PopupMenuContent = /*#__PURE__*/React__default["default"].memo(_ref => {
|
|
|
24
35
|
const {
|
|
25
36
|
instanceUID
|
|
26
37
|
} = React.useContext(GlobalHeaderContext.GlobalHeaderContext);
|
|
27
|
-
const menuRef = React.useRef();
|
|
38
|
+
const menuRef = React.useRef(null);
|
|
28
39
|
React.useEffect(() => {
|
|
29
40
|
var _menuRef$current, _menuRef$current$firs;
|
|
30
41
|
|
|
31
42
|
(_menuRef$current = menuRef.current) === null || _menuRef$current === void 0 ? void 0 : (_menuRef$current$firs = _menuRef$current.firstChild) === null || _menuRef$current$firs === void 0 ? void 0 : _menuRef$current$firs.focus();
|
|
32
43
|
}, []);
|
|
33
44
|
const content = React.useMemo(() => options.map(option => {
|
|
34
|
-
var _Content;
|
|
35
|
-
|
|
36
45
|
const {
|
|
37
46
|
type,
|
|
38
|
-
|
|
39
|
-
label,
|
|
47
|
+
Icon,
|
|
48
|
+
label = '',
|
|
40
49
|
onClick,
|
|
41
50
|
Content
|
|
42
51
|
} = option;
|
|
43
52
|
|
|
53
|
+
const ariaAndDataProps = _objectSpread(_objectSpread({}, dsPropsHelpers.getAriaProps(option)), dsPropsHelpers.getDataProps(option));
|
|
54
|
+
|
|
44
55
|
const handleClick = e => {
|
|
45
56
|
onItemClick(e);
|
|
46
|
-
onClick(e);
|
|
57
|
+
if (onClick) onClick(e);
|
|
47
58
|
};
|
|
48
59
|
|
|
49
60
|
const handleKeyDown = e => {
|
|
@@ -52,19 +63,23 @@ const PopupMenuContent = /*#__PURE__*/React__default["default"].memo(_ref => {
|
|
|
52
63
|
|
|
53
64
|
switch (type) {
|
|
54
65
|
case 'separator':
|
|
55
|
-
return /*#__PURE__*/
|
|
66
|
+
return /*#__PURE__*/jsxRuntime.jsx(styles.Separator, _objectSpread({}, ariaAndDataProps), "".concat(instanceUID, "-separator-").concat(label));
|
|
56
67
|
|
|
57
68
|
case 'custom':
|
|
58
|
-
return /*#__PURE__*/
|
|
69
|
+
return /*#__PURE__*/jsxRuntime.jsx(styles.ItemWrapper, _objectSpread(_objectSpread({
|
|
59
70
|
onClick: handleClick,
|
|
60
71
|
onKeyDown: handleKeyDown
|
|
61
|
-
},
|
|
72
|
+
}, ariaAndDataProps), {}, {
|
|
73
|
+
children: Content && /*#__PURE__*/_jsx__default["default"](Content, {})
|
|
74
|
+
}), "".concat(instanceUID, "-popup-").concat(label));
|
|
62
75
|
|
|
63
76
|
default:
|
|
64
|
-
return /*#__PURE__*/
|
|
77
|
+
return /*#__PURE__*/jsxRuntime.jsxs(styles.ItemWrapper, _objectSpread(_objectSpread({
|
|
65
78
|
onClick: handleClick,
|
|
66
79
|
onKeyDown: handleKeyDown
|
|
67
|
-
},
|
|
80
|
+
}, ariaAndDataProps), {}, {
|
|
81
|
+
children: [Icon && /*#__PURE__*/_jsx__default["default"](Icon, {}), styles.Label && /*#__PURE__*/_jsx__default["default"](styles.Label, {}, void 0, label)]
|
|
82
|
+
}), "".concat(instanceUID, "-popup-").concat(label));
|
|
68
83
|
}
|
|
69
84
|
}), [onClose, onItemClick, options, instanceUID]);
|
|
70
85
|
return /*#__PURE__*/jsxRuntime.jsx(styles.List, {
|
|
@@ -18,14 +18,14 @@ const GlobalHeaderBreadcrumb = () => {
|
|
|
18
18
|
setShowIconOnly,
|
|
19
19
|
globalHeaderBreadcrumbGrid
|
|
20
20
|
} = useContext(GlobalHeaderContext);
|
|
21
|
-
const breakpoint = useRef();
|
|
22
|
-
const flexRegion = useRef();
|
|
21
|
+
const breakpoint = useRef(null);
|
|
22
|
+
const flexRegion = useRef(null);
|
|
23
23
|
useEffect(() => {
|
|
24
24
|
const evaluateShowIconOnly = () => {
|
|
25
|
-
if ((flexRegion === null || flexRegion === void 0 ? void 0 : flexRegion.current.offsetWidth) <= 0 && !breakpoint.current) {
|
|
25
|
+
if (flexRegion && flexRegion.current && (flexRegion === null || flexRegion === void 0 ? void 0 : flexRegion.current.offsetWidth) <= 0 && !breakpoint.current) {
|
|
26
26
|
setShowIconOnly(true);
|
|
27
27
|
breakpoint.current = window.innerWidth;
|
|
28
|
-
} else if (window.innerWidth >= breakpoint.current) {
|
|
28
|
+
} else if (breakpoint && breakpoint.current !== null && window.innerWidth >= breakpoint.current) {
|
|
29
29
|
setShowIconOnly(false);
|
|
30
30
|
breakpoint.current = null;
|
|
31
31
|
}
|
|
@@ -38,13 +38,13 @@ const GlobalHeaderBreadcrumb = () => {
|
|
|
38
38
|
return /*#__PURE__*/_jsx(Grid, {
|
|
39
39
|
height: "100%",
|
|
40
40
|
alignItems: "center",
|
|
41
|
-
justifyContent: "
|
|
42
|
-
role: "navigation",
|
|
41
|
+
justifyContent: "flex-start",
|
|
43
42
|
"aria-label": "breadcrumbs",
|
|
44
|
-
cols: globalHeaderBreadcrumbGrid
|
|
43
|
+
cols: globalHeaderBreadcrumbGrid,
|
|
44
|
+
role: "navigation"
|
|
45
45
|
}, void 0, /*#__PURE__*/_jsx(Pipe, {
|
|
46
46
|
showIconOnly: showIconOnly
|
|
47
|
-
}), breadcrumb.map(item => {
|
|
47
|
+
}), breadcrumb === null || breadcrumb === void 0 ? void 0 : breadcrumb.map(item => {
|
|
48
48
|
const {
|
|
49
49
|
label,
|
|
50
50
|
hasNext,
|
|
@@ -17,7 +17,7 @@ const PureBreadcrumb = /*#__PURE__*/React.memo(_ref => {
|
|
|
17
17
|
"aria-selected": isSelected,
|
|
18
18
|
"data-testid": "gh-breadcrumb-btn"
|
|
19
19
|
}, void 0, /*#__PURE__*/_jsx(Label, {
|
|
20
|
-
isSelected: isSelected,
|
|
20
|
+
isSelected: !!isSelected,
|
|
21
21
|
isOnlyItem: length === 1
|
|
22
22
|
}, void 0, label)), hasNext && (_ChevronSmallRight || (_ChevronSmallRight = /*#__PURE__*/_jsx(ChevronSmallRight, {
|
|
23
23
|
size: "m",
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
1
2
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
3
|
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
3
4
|
import 'core-js/modules/esnext.iterator.map.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';
|
|
4
10
|
import { useContext, useMemo } from 'react';
|
|
5
11
|
import { AppPicker } from '../../outOfTheBox/AppPicker/AppPicker.js';
|
|
6
12
|
import { PopupMenu } from '../../outOfTheBox/PopupMenu/PopupMenu.js';
|
|
@@ -8,6 +14,9 @@ import { Button } from './styles.js';
|
|
|
8
14
|
import { GlobalHeaderContext } from '../../GlobalHeaderContext.js';
|
|
9
15
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
10
16
|
|
|
17
|
+
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; }
|
|
18
|
+
|
|
19
|
+
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; }
|
|
11
20
|
const ToolbarItems = () => {
|
|
12
21
|
const {
|
|
13
22
|
props: {
|
|
@@ -15,7 +24,7 @@ const ToolbarItems = () => {
|
|
|
15
24
|
},
|
|
16
25
|
instanceUID
|
|
17
26
|
} = useContext(GlobalHeaderContext);
|
|
18
|
-
const itemsList = useMemo(() => toolbar.map(item => {
|
|
27
|
+
const itemsList = useMemo(() => toolbar === null || toolbar === void 0 ? void 0 : toolbar.map(item => {
|
|
19
28
|
var _Icon;
|
|
20
29
|
|
|
21
30
|
const {
|
|
@@ -41,24 +50,9 @@ const ToolbarItems = () => {
|
|
|
41
50
|
}, "".concat(instanceUID, "-ds-popup-menu-").concat(label));
|
|
42
51
|
|
|
43
52
|
case 'ds-app-picker':
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
sectionTitle,
|
|
48
|
-
customSectionTitle,
|
|
49
|
-
actionRef,
|
|
50
|
-
onKeyDown
|
|
51
|
-
} = componentProps;
|
|
52
|
-
return /*#__PURE__*/_jsx(AppPicker, {
|
|
53
|
-
onClick: onClick,
|
|
54
|
-
label: label,
|
|
55
|
-
apps: apps,
|
|
56
|
-
customApps: customApps,
|
|
57
|
-
sectionTitle: sectionTitle,
|
|
58
|
-
customSectionTitle: customSectionTitle,
|
|
59
|
-
actionRef: actionRef,
|
|
60
|
-
onKeyDown: onKeyDown
|
|
61
|
-
}, "".concat(instanceUID, "-ds-app-picker-").concat(label));
|
|
53
|
+
return /*#__PURE__*/jsx(AppPicker, _objectSpread({
|
|
54
|
+
label: label
|
|
55
|
+
}, componentProps), "".concat(instanceUID, "-ds-app-picker-").concat(label));
|
|
62
56
|
|
|
63
57
|
default:
|
|
64
58
|
return /*#__PURE__*/_jsx(Button, {
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
2
|
-
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
3
|
-
import 'core-js/modules/esnext.iterator.map.js';
|
|
4
2
|
import React, { useState, useMemo } from 'react';
|
|
5
3
|
import { uid } from 'uid';
|
|
6
4
|
import { useGetPropsWithDefaults } from './useGetPropsWithDefaults.js';
|
|
@@ -8,8 +6,16 @@ import { useGetPropsWithDefaults } from './useGetPropsWithDefaults.js';
|
|
|
8
6
|
const useGlobalHeader = props => {
|
|
9
7
|
const [showIconOnly, setShowIconOnly] = useState(false);
|
|
10
8
|
const instanceUID = useMemo(() => uid(5), []);
|
|
11
|
-
const globalHeaderToolbarGrid = useMemo(() =>
|
|
12
|
-
|
|
9
|
+
const globalHeaderToolbarGrid = useMemo(() => {
|
|
10
|
+
var _props$toolbar$length, _props$toolbar;
|
|
11
|
+
|
|
12
|
+
return new Array((_props$toolbar$length = props === null || props === void 0 ? void 0 : (_props$toolbar = props.toolbar) === null || _props$toolbar === void 0 ? void 0 : _props$toolbar.length) !== null && _props$toolbar$length !== void 0 ? _props$toolbar$length : 0).fill('1fr');
|
|
13
|
+
}, [props.toolbar]);
|
|
14
|
+
const globalHeaderBreadcrumbGrid = useMemo(() => {
|
|
15
|
+
var _props$breadcrumb$len, _props$breadcrumb;
|
|
16
|
+
|
|
17
|
+
return ['auto', ...new Array((_props$breadcrumb$len = props === null || props === void 0 ? void 0 : (_props$breadcrumb = props.breadcrumb) === null || _props$breadcrumb === void 0 ? void 0 : _props$breadcrumb.length) !== null && _props$breadcrumb$len !== void 0 ? _props$breadcrumb$len : 0).fill('auto'), '1fr'];
|
|
18
|
+
}, [props.breadcrumb]);
|
|
13
19
|
const propsWithDefaults = useGetPropsWithDefaults(props);
|
|
14
20
|
const ctx = React.useMemo(() => ({
|
|
15
21
|
props: propsWithDefaults,
|
|
@@ -62,7 +62,7 @@ const useValidateProps = props => {
|
|
|
62
62
|
throwLogoError('LogoWithBrand', LogoWithBrand);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
breadcrumb.forEach(breadcrumbItem => {
|
|
65
|
+
breadcrumb === null || breadcrumb === void 0 ? void 0 : breadcrumb.forEach(breadcrumbItem => {
|
|
66
66
|
if (breadcrumbItem.label && typeof breadcrumbItem.label !== 'string') {
|
|
67
67
|
throwBreadcrumbItemError('label', breadcrumbItem.label);
|
|
68
68
|
}
|
|
@@ -79,7 +79,7 @@ const useValidateProps = props => {
|
|
|
79
79
|
throwBreadcrumbItemError('isSelected', breadcrumbItem.isSelected);
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
|
-
toolbar.forEach(toolbarItem => {
|
|
82
|
+
toolbar === null || toolbar === void 0 ? void 0 : toolbar.forEach(toolbarItem => {
|
|
83
83
|
validateGenericToolbarItem(toolbarItem);
|
|
84
84
|
|
|
85
85
|
if (toolbarItem.type) {
|
package/esm/defaultProps.js
CHANGED
|
@@ -2,55 +2,60 @@ import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
|
2
2
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
3
|
import { useState, useRef, useCallback, useMemo } from 'react';
|
|
4
4
|
import { DSAppPicker } from '@elliemae/ds-app-picker';
|
|
5
|
+
import { mergeRefs } from '@elliemae/ds-utilities';
|
|
5
6
|
import { MenuPicker } from '@elliemae/ds-icons';
|
|
6
7
|
import { Button } from '../../components/Toolbar/styles.js';
|
|
7
8
|
import { jsx } from 'react/jsx-runtime';
|
|
8
9
|
|
|
9
10
|
var _MenuPicker;
|
|
10
11
|
const AppPicker = _ref => {
|
|
11
|
-
var _DSAppPicker;
|
|
12
|
-
|
|
13
12
|
let {
|
|
14
13
|
label,
|
|
15
14
|
apps,
|
|
15
|
+
icon,
|
|
16
16
|
customApps,
|
|
17
17
|
sectionTitle,
|
|
18
18
|
customSectionTitle,
|
|
19
|
-
onClick = () => null,
|
|
20
19
|
actionRef,
|
|
21
|
-
|
|
20
|
+
isOpen: userIsOpen,
|
|
21
|
+
onKeyDown: userOnKeyDown,
|
|
22
|
+
onClickOutside: userOnClickOutside,
|
|
23
|
+
renderTrigger: userRenderTrigger,
|
|
24
|
+
onClose,
|
|
25
|
+
triggerRef,
|
|
26
|
+
triggerOnClick
|
|
22
27
|
} = _ref;
|
|
23
28
|
const [isOpen, setIsOpen] = useState(false);
|
|
24
|
-
const buttonRef = useRef();
|
|
29
|
+
const buttonRef = useRef(null);
|
|
25
30
|
const handleTriggerKeyDown = useCallback(e => {
|
|
26
31
|
if (e.code === 'Enter' || e.code === 'Space') {
|
|
27
32
|
setIsOpen(true);
|
|
28
33
|
}
|
|
29
34
|
}, []);
|
|
30
35
|
const handleAppPickerOnKeyDown = useCallback(e => {
|
|
31
|
-
customHandleOnKeyDown(e);
|
|
32
|
-
|
|
33
36
|
if (e.code === 'Escape') {
|
|
37
|
+
var _buttonRef$current;
|
|
38
|
+
|
|
34
39
|
setIsOpen(false);
|
|
40
|
+
buttonRef === null || buttonRef === void 0 ? void 0 : (_buttonRef$current = buttonRef.current) === null || _buttonRef$current === void 0 ? void 0 : _buttonRef$current.focus();
|
|
35
41
|
}
|
|
36
|
-
}, [
|
|
42
|
+
}, []);
|
|
37
43
|
const handleOnClickOutside = useCallback(() => {
|
|
38
44
|
setIsOpen(false);
|
|
39
45
|
}, []);
|
|
40
|
-
const handleOnClick = useCallback(
|
|
46
|
+
const handleOnClick = useCallback(() => {
|
|
41
47
|
setIsOpen(true);
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const trigger = useMemo(() => _ref2 => {
|
|
48
|
+
}, []);
|
|
49
|
+
const renderTrigger = useMemo(() => _ref2 => {
|
|
45
50
|
let {
|
|
46
51
|
ref
|
|
47
52
|
} = _ref2;
|
|
48
53
|
return /*#__PURE__*/jsx("div", {
|
|
49
54
|
ref: ref,
|
|
50
55
|
children: /*#__PURE__*/jsx(Button, {
|
|
51
|
-
onClick: handleOnClick,
|
|
56
|
+
onClick: triggerOnClick !== null && triggerOnClick !== void 0 ? triggerOnClick : handleOnClick,
|
|
52
57
|
onKeyDown: handleTriggerKeyDown,
|
|
53
|
-
ref: buttonRef,
|
|
58
|
+
ref: mergeRefs(buttonRef, triggerRef),
|
|
54
59
|
title: label,
|
|
55
60
|
"data-testid": "gh-toolbar-item",
|
|
56
61
|
children: _MenuPicker || (_MenuPicker = /*#__PURE__*/_jsx(MenuPicker, {
|
|
@@ -59,19 +64,21 @@ const AppPicker = _ref => {
|
|
|
59
64
|
}))
|
|
60
65
|
})
|
|
61
66
|
});
|
|
62
|
-
}, [handleOnClick, handleTriggerKeyDown, label]);
|
|
63
|
-
return
|
|
64
|
-
isOpen: isOpen,
|
|
67
|
+
}, [triggerOnClick, handleOnClick, handleTriggerKeyDown, label]);
|
|
68
|
+
return /*#__PURE__*/_jsx(DSAppPicker, {
|
|
65
69
|
apps: apps,
|
|
66
70
|
customApps: customApps,
|
|
67
71
|
sectionTitle: sectionTitle,
|
|
68
72
|
customSectionTitle: customSectionTitle,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
triggerRef: buttonRef,
|
|
73
|
+
icon: icon,
|
|
74
|
+
onKeyDown: userOnKeyDown !== null && userOnKeyDown !== void 0 ? userOnKeyDown : handleAppPickerOnKeyDown,
|
|
72
75
|
actionRef: actionRef,
|
|
73
|
-
|
|
74
|
-
|
|
76
|
+
onClickOutside: userOnClickOutside !== null && userOnClickOutside !== void 0 ? userOnClickOutside : handleOnClickOutside,
|
|
77
|
+
renderTrigger: userRenderTrigger !== null && userRenderTrigger !== void 0 ? userRenderTrigger : renderTrigger,
|
|
78
|
+
isOpen: userIsOpen !== null && userIsOpen !== void 0 ? userIsOpen : isOpen,
|
|
79
|
+
onClose: onClose,
|
|
80
|
+
triggerRef: triggerRef
|
|
81
|
+
});
|
|
75
82
|
};
|
|
76
83
|
|
|
77
84
|
export { AppPicker };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
|
-
import { useState,
|
|
4
|
-
import
|
|
3
|
+
import { useState, useCallback, useMemo } from 'react';
|
|
4
|
+
import { DSPopperJS } from '@elliemae/ds-popperjs';
|
|
5
5
|
import { PopupMenuContent } from './PopupMenuContent.js';
|
|
6
6
|
import { Button } from '../../components/Toolbar/styles.js';
|
|
7
7
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -17,18 +17,16 @@ const PopupMenu = _ref => {
|
|
|
17
17
|
onClick
|
|
18
18
|
} = _ref;
|
|
19
19
|
const [isOpen, setIsOpen] = useState(false);
|
|
20
|
-
const buttonRef =
|
|
20
|
+
const [buttonRef, setButtonRef] = useState(null);
|
|
21
21
|
const handleKeyPress = useCallback(e => {
|
|
22
22
|
if (e.code === 'Enter' || e.code === 'Space') {
|
|
23
23
|
setIsOpen(true);
|
|
24
24
|
}
|
|
25
25
|
}, []);
|
|
26
26
|
const handleOnClose = useCallback(() => {
|
|
27
|
-
var _buttonRef$current;
|
|
28
|
-
|
|
29
27
|
setIsOpen(false);
|
|
30
|
-
|
|
31
|
-
}, []);
|
|
28
|
+
buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.focus();
|
|
29
|
+
}, [buttonRef]);
|
|
32
30
|
const handleTriggerOnClick = useCallback(e => {
|
|
33
31
|
setIsOpen(true);
|
|
34
32
|
onClick(e);
|
|
@@ -36,42 +34,26 @@ const PopupMenu = _ref => {
|
|
|
36
34
|
const handleItemClick = useCallback(() => {
|
|
37
35
|
if (closeOnClick) handleOnClose();
|
|
38
36
|
}, [closeOnClick, handleOnClose]);
|
|
39
|
-
const handleClickOutside = useCallback(() => setIsOpen(false), []);
|
|
40
37
|
const content = useMemo(() => _PopupMenuContent || (_PopupMenuContent = /*#__PURE__*/_jsx(PopupMenuContent, {
|
|
41
38
|
options: options,
|
|
42
39
|
onItemClick: handleItemClick,
|
|
43
40
|
onClose: handleOnClose
|
|
44
41
|
})), [options, handleItemClick, handleOnClose]);
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
});
|
|
61
|
-
}, [Icon, handleKeyPress, handleTriggerOnClick, title]);
|
|
62
|
-
return useMemo(() => /*#__PURE__*/_jsx(Popover, {
|
|
63
|
-
isOpen: isOpen,
|
|
64
|
-
content: content,
|
|
65
|
-
onClickOutside: handleClickOutside,
|
|
66
|
-
placement: "bottom",
|
|
67
|
-
interactionType: "click",
|
|
68
|
-
showArrow: true,
|
|
69
|
-
style: {
|
|
70
|
-
padding: '0',
|
|
71
|
-
width: 'fit-content'
|
|
72
|
-
},
|
|
73
|
-
renderTrigger: trigger
|
|
74
|
-
}), [content, handleClickOutside, isOpen, trigger]);
|
|
42
|
+
return /*#__PURE__*/_jsx("div", {}, void 0, /*#__PURE__*/jsx(Button, {
|
|
43
|
+
onClick: handleTriggerOnClick,
|
|
44
|
+
onKeyPress: handleKeyPress,
|
|
45
|
+
title: title,
|
|
46
|
+
ref: setButtonRef,
|
|
47
|
+
"data-testid": "gh-toolbar-item",
|
|
48
|
+
children: Icon && /*#__PURE__*/_jsx(Icon, {
|
|
49
|
+
fill: "#FFF",
|
|
50
|
+
size: "m"
|
|
51
|
+
})
|
|
52
|
+
}), /*#__PURE__*/_jsx(DSPopperJS, {
|
|
53
|
+
referenceElement: buttonRef,
|
|
54
|
+
showPopover: isOpen,
|
|
55
|
+
closeContextMenu: handleOnClose
|
|
56
|
+
}, void 0, content));
|
|
75
57
|
};
|
|
76
58
|
|
|
77
59
|
export { PopupMenu };
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
3
|
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
3
4
|
import 'core-js/modules/esnext.iterator.map.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';
|
|
4
10
|
import React, { useContext, useRef, useEffect, useMemo } from 'react';
|
|
5
|
-
import {
|
|
11
|
+
import { getDataProps, getAriaProps } from '@elliemae/ds-props-helpers';
|
|
12
|
+
import { ItemWrapper, Separator, List, Label } from './styles.js';
|
|
6
13
|
import { GlobalHeaderContext } from '../../GlobalHeaderContext.js';
|
|
7
|
-
import { jsx } from 'react/jsx-runtime';
|
|
14
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
8
15
|
|
|
16
|
+
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; }
|
|
17
|
+
|
|
18
|
+
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
19
|
const PopupMenuContent = /*#__PURE__*/React.memo(_ref => {
|
|
10
20
|
let {
|
|
11
21
|
options,
|
|
@@ -15,26 +25,26 @@ const PopupMenuContent = /*#__PURE__*/React.memo(_ref => {
|
|
|
15
25
|
const {
|
|
16
26
|
instanceUID
|
|
17
27
|
} = useContext(GlobalHeaderContext);
|
|
18
|
-
const menuRef = useRef();
|
|
28
|
+
const menuRef = useRef(null);
|
|
19
29
|
useEffect(() => {
|
|
20
30
|
var _menuRef$current, _menuRef$current$firs;
|
|
21
31
|
|
|
22
32
|
(_menuRef$current = menuRef.current) === null || _menuRef$current === void 0 ? void 0 : (_menuRef$current$firs = _menuRef$current.firstChild) === null || _menuRef$current$firs === void 0 ? void 0 : _menuRef$current$firs.focus();
|
|
23
33
|
}, []);
|
|
24
34
|
const content = useMemo(() => options.map(option => {
|
|
25
|
-
var _Content;
|
|
26
|
-
|
|
27
35
|
const {
|
|
28
36
|
type,
|
|
29
|
-
|
|
30
|
-
label,
|
|
37
|
+
Icon,
|
|
38
|
+
label = '',
|
|
31
39
|
onClick,
|
|
32
40
|
Content
|
|
33
41
|
} = option;
|
|
34
42
|
|
|
43
|
+
const ariaAndDataProps = _objectSpread(_objectSpread({}, getAriaProps(option)), getDataProps(option));
|
|
44
|
+
|
|
35
45
|
const handleClick = e => {
|
|
36
46
|
onItemClick(e);
|
|
37
|
-
onClick(e);
|
|
47
|
+
if (onClick) onClick(e);
|
|
38
48
|
};
|
|
39
49
|
|
|
40
50
|
const handleKeyDown = e => {
|
|
@@ -43,19 +53,23 @@ const PopupMenuContent = /*#__PURE__*/React.memo(_ref => {
|
|
|
43
53
|
|
|
44
54
|
switch (type) {
|
|
45
55
|
case 'separator':
|
|
46
|
-
return /*#__PURE__*/
|
|
56
|
+
return /*#__PURE__*/jsx(Separator, _objectSpread({}, ariaAndDataProps), "".concat(instanceUID, "-separator-").concat(label));
|
|
47
57
|
|
|
48
58
|
case 'custom':
|
|
49
|
-
return /*#__PURE__*/
|
|
59
|
+
return /*#__PURE__*/jsx(ItemWrapper, _objectSpread(_objectSpread({
|
|
50
60
|
onClick: handleClick,
|
|
51
61
|
onKeyDown: handleKeyDown
|
|
52
|
-
},
|
|
62
|
+
}, ariaAndDataProps), {}, {
|
|
63
|
+
children: Content && /*#__PURE__*/_jsx(Content, {})
|
|
64
|
+
}), "".concat(instanceUID, "-popup-").concat(label));
|
|
53
65
|
|
|
54
66
|
default:
|
|
55
|
-
return /*#__PURE__*/
|
|
67
|
+
return /*#__PURE__*/jsxs(ItemWrapper, _objectSpread(_objectSpread({
|
|
56
68
|
onClick: handleClick,
|
|
57
69
|
onKeyDown: handleKeyDown
|
|
58
|
-
},
|
|
70
|
+
}, ariaAndDataProps), {}, {
|
|
71
|
+
children: [Icon && /*#__PURE__*/_jsx(Icon, {}), Label && /*#__PURE__*/_jsx(Label, {}, void 0, label)]
|
|
72
|
+
}), "".concat(instanceUID, "-popup-").concat(label));
|
|
59
73
|
}
|
|
60
74
|
}), [onClose, onItemClick, options, instanceUID]);
|
|
61
75
|
return /*#__PURE__*/jsx(List, {
|
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.13",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Global Header",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -120,11 +120,12 @@
|
|
|
120
120
|
"build": "node ../../scripts/build/build.js"
|
|
121
121
|
},
|
|
122
122
|
"dependencies": {
|
|
123
|
-
"@elliemae/ds-app-picker": "2.0.0-rc.
|
|
124
|
-
"@elliemae/ds-
|
|
125
|
-
"@elliemae/ds-
|
|
126
|
-
"@elliemae/ds-
|
|
127
|
-
"@elliemae/ds-
|
|
123
|
+
"@elliemae/ds-app-picker": "2.0.0-rc.13",
|
|
124
|
+
"@elliemae/ds-grid": "2.0.0-rc.13",
|
|
125
|
+
"@elliemae/ds-icons": "2.0.0-rc.13",
|
|
126
|
+
"@elliemae/ds-popperjs": "2.0.0-rc.13",
|
|
127
|
+
"@elliemae/ds-props-helpers": "2.0.0-rc.13",
|
|
128
|
+
"@elliemae/ds-utilities": "2.0.0-rc.13",
|
|
128
129
|
"react-desc": "~4.1.3",
|
|
129
130
|
"uid": "~2.0.0"
|
|
130
131
|
},
|
package/types/GlobalHeader.d.ts
CHANGED
|
@@ -1,14 +1,39 @@
|
|
|
1
|
+
/// <reference path="../../../../shared/typings/react-desc.d.ts" />
|
|
1
2
|
/// <reference types="react" />
|
|
2
3
|
import type { GlobalHeaderPropsT as Props } from './index.d';
|
|
3
4
|
declare const GlobalHeader: {
|
|
4
5
|
(props: Props): JSX.Element;
|
|
5
6
|
defaultProps: Props;
|
|
6
7
|
propTypes: {
|
|
7
|
-
Logo:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
Logo: {
|
|
9
|
+
defaultValue<T = unknown>(arg: T): {
|
|
10
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
11
|
+
};
|
|
12
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
13
|
+
};
|
|
14
|
+
LogoWithBrand: {
|
|
15
|
+
defaultValue<T = unknown>(arg: T): {
|
|
16
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
17
|
+
};
|
|
18
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
19
|
+
};
|
|
20
|
+
breadcrumb: {
|
|
21
|
+
defaultValue<T = unknown>(arg: T): {
|
|
22
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
23
|
+
};
|
|
24
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
25
|
+
};
|
|
26
|
+
toolbar: {
|
|
27
|
+
defaultValue<T = unknown>(arg: T): {
|
|
28
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
29
|
+
};
|
|
30
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
31
|
+
};
|
|
11
32
|
};
|
|
12
33
|
};
|
|
13
|
-
declare const GlobalHeaderWithSchema:
|
|
34
|
+
declare const GlobalHeaderWithSchema: {
|
|
35
|
+
(props?: Props | undefined): JSX.Element;
|
|
36
|
+
propTypes: unknown;
|
|
37
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
38
|
+
};
|
|
14
39
|
export { GlobalHeader, GlobalHeaderWithSchema };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LabelT, PipeT } from '../../index.d';
|
|
2
|
-
export declare const Pipe: import("styled-components").StyledComponent<"span",
|
|
3
|
-
export declare const BreadcrumbItem: import("styled-components").StyledComponent<"div",
|
|
4
|
-
export declare const LabelButton: import("styled-components").StyledComponent<"button",
|
|
5
|
-
export declare const Label: import("styled-components").StyledComponent<"p",
|
|
2
|
+
export declare const Pipe: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, PipeT, never>;
|
|
3
|
+
export declare const BreadcrumbItem: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
+
export declare const LabelButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
|
|
5
|
+
export declare const Label: import("styled-components").StyledComponent<"p", import("styled-components").DefaultTheme, LabelT, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const Button: import("styled-components").StyledComponent<"button",
|
|
1
|
+
export declare const Button: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -20,8 +20,8 @@ export declare const toolbarProps: {
|
|
|
20
20
|
export declare const isObject: (obj: unknown) => boolean;
|
|
21
21
|
export declare const getVariableType: (arg: unknown) => string;
|
|
22
22
|
export declare const isValidToolbarType: (string: unknown) => boolean;
|
|
23
|
-
export declare const throwBreadcrumbItemError: (validPropKey:
|
|
24
|
-
export declare const throwToolbarPopupItemError: (validPropKey:
|
|
25
|
-
export declare const throwToolbarAppPickerItemError: (validPropKey:
|
|
26
|
-
export declare const throwToolbarItemGenericError: (validPropKey:
|
|
23
|
+
export declare const throwBreadcrumbItemError: (validPropKey: keyof typeof breadcrumbProps, invalidProp: unknown) => void;
|
|
24
|
+
export declare const throwToolbarPopupItemError: (validPropKey: keyof typeof toolbarProps, invalidProp: unknown) => void;
|
|
25
|
+
export declare const throwToolbarAppPickerItemError: (validPropKey: keyof typeof toolbarProps, invalidProp: unknown) => void;
|
|
26
|
+
export declare const throwToolbarItemGenericError: (validPropKey: keyof typeof toolbarProps, invalidProp: unknown) => void;
|
|
27
27
|
export declare const throwLogoError: (validPropKey: string, invalidProp: unknown) => void;
|
package/types/index.d.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { DSAppPicker } from '@elliemae/ds-app-picker';
|
|
3
|
+
export declare type AppPickerProps = React.ComponentProps<typeof DSAppPicker>;
|
|
2
4
|
export interface ContextT {
|
|
3
5
|
showIconOnly: boolean;
|
|
4
6
|
setShowIconOnly: React.Dispatch<React.SetStateAction<boolean>>;
|
|
@@ -11,11 +13,11 @@ export interface GlobalHeaderContainerT {
|
|
|
11
13
|
children: React.ReactNode;
|
|
12
14
|
}
|
|
13
15
|
export interface GlobalHeaderPropsT {
|
|
14
|
-
Logo?:
|
|
15
|
-
LogoWithBrand?:
|
|
16
|
+
Logo?: React.ComponentType;
|
|
17
|
+
LogoWithBrand?: React.ComponentType;
|
|
16
18
|
breadcrumb?: BreadcrumbItemT[];
|
|
17
19
|
toolbar?: ToolbarItemT[];
|
|
18
|
-
appPickerProps?:
|
|
20
|
+
appPickerProps?: AppPickerProps;
|
|
19
21
|
}
|
|
20
22
|
export interface BreadcrumbItemT {
|
|
21
23
|
label: string;
|
|
@@ -29,15 +31,7 @@ export interface ToolbarItemT {
|
|
|
29
31
|
label: string;
|
|
30
32
|
Icon: React.ComponentType<Record<string, unknown>>;
|
|
31
33
|
onClick: (event: React.MouseEvent<HTMLElement>) => void;
|
|
32
|
-
componentProps?: PopupPropsT |
|
|
33
|
-
}
|
|
34
|
-
export interface AppPickerPropsT {
|
|
35
|
-
label?: string;
|
|
36
|
-
apps: AppPickerMenuItemT[];
|
|
37
|
-
customApps?: AppPickerMenuItemT[];
|
|
38
|
-
sectionTitle?: string;
|
|
39
|
-
customSectionTitle?: string;
|
|
40
|
-
onClick: (event: React.MouseEvent<HTMLElement>) => void;
|
|
34
|
+
componentProps?: PopupPropsT | AppPickerProps;
|
|
41
35
|
}
|
|
42
36
|
export interface PopupPropsT {
|
|
43
37
|
Icon?: React.ComponentType<Record<string, unknown>>;
|
|
@@ -48,17 +42,17 @@ export interface PopupPropsT {
|
|
|
48
42
|
}
|
|
49
43
|
export interface AppPickerMenuItemT {
|
|
50
44
|
label: string;
|
|
51
|
-
icon:
|
|
45
|
+
icon: React.ComponentType;
|
|
52
46
|
onClick: (event: React.MouseEvent<HTMLElement>) => void;
|
|
53
47
|
disabled?: boolean;
|
|
54
48
|
}
|
|
55
|
-
export interface PopupMenuItemT {
|
|
49
|
+
export interface PopupMenuItemT extends Record<string, unknown> {
|
|
56
50
|
type?: string;
|
|
57
|
-
|
|
51
|
+
Icon?: React.ComponentType;
|
|
58
52
|
label?: string;
|
|
59
53
|
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
60
54
|
closeOnClick?: boolean;
|
|
61
|
-
Content?:
|
|
55
|
+
Content?: React.ComponentType;
|
|
62
56
|
}
|
|
63
57
|
export interface PopupMenuContentPropsT {
|
|
64
58
|
options: PopupMenuItemT[];
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DSAppPicker } from '@elliemae/ds-app-picker';
|
|
3
|
+
declare type AppPickerProps = React.ComponentProps<typeof DSAppPicker>;
|
|
4
|
+
export declare const AppPicker: ({ label, apps, icon, customApps, sectionTitle, customSectionTitle, actionRef, isOpen: userIsOpen, onKeyDown: userOnKeyDown, onClickOutside: userOnClickOutside, renderTrigger: userRenderTrigger, onClose, triggerRef, triggerOnClick, }: AppPickerProps & {
|
|
5
|
+
label: string;
|
|
6
|
+
triggerOnClick?: React.MouseEventHandler<Element> | undefined;
|
|
7
|
+
}) => JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const List: import("styled-components").StyledComponent<"div",
|
|
2
|
-
export declare const ItemWrapper: import("styled-components").StyledComponent<"button",
|
|
3
|
-
export declare const Label: import("styled-components").StyledComponent<"p",
|
|
4
|
-
export declare const Separator: import("styled-components").StyledComponent<"div",
|
|
1
|
+
export declare const List: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
|
+
export declare const ItemWrapper: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
+
export declare const Label: import("styled-components").StyledComponent<"p", import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
+
export declare const Separator: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
package/types/propTypes.d.ts
CHANGED
|
@@ -1,8 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
1
|
+
/// <reference path="../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
+
export declare const breadcrumbItem: import("react-desc").PropTypesDescValue;
|
|
3
|
+
export declare const toolbarItem: import("react-desc").PropTypesDescValue;
|
|
3
4
|
export declare const globalHeaderProps: {
|
|
4
|
-
Logo:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
Logo: {
|
|
6
|
+
defaultValue<T = unknown>(arg: T): {
|
|
7
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
8
|
+
};
|
|
9
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
10
|
+
};
|
|
11
|
+
LogoWithBrand: {
|
|
12
|
+
defaultValue<T = unknown>(arg: T): {
|
|
13
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
14
|
+
};
|
|
15
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
16
|
+
};
|
|
17
|
+
breadcrumb: {
|
|
18
|
+
defaultValue<T = unknown>(arg: T): {
|
|
19
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
20
|
+
};
|
|
21
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
22
|
+
};
|
|
23
|
+
toolbar: {
|
|
24
|
+
defaultValue<T = unknown>(arg: T): {
|
|
25
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
26
|
+
};
|
|
27
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
28
|
+
};
|
|
8
29
|
};
|
package/types/styles.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const Wrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>,
|
|
2
|
+
export declare const Wrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|