@elliemae/ds-global-header 2.0.0-next.8 → 2.0.0-rc.11
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/GlobalHeaderContainer.js +10 -7
- package/cjs/components/Breadcrumb/GlobalHeaderBreadcrumb.js +10 -8
- package/cjs/components/Breadcrumb/PureBreadcrumb.js +22 -20
- package/cjs/components/Breadcrumb/styles.js +40 -19
- package/cjs/components/Toolbar/ToolbarItems.js +16 -19
- package/cjs/components/Toolbar/styles.js +16 -7
- package/cjs/config/useGetPropsWithDefaults.js +5 -0
- package/cjs/config/useGlobalHeader.js +10 -2
- package/cjs/config/useValidateProps.js +5 -2
- package/cjs/defaultProps.js +4 -2
- package/cjs/outOfTheBox/AppPicker/AppPicker.js +54 -44
- package/cjs/outOfTheBox/PopupMenu/PopupMenu.js +20 -35
- package/cjs/outOfTheBox/PopupMenu/PopupMenuContent.js +34 -16
- package/cjs/outOfTheBox/PopupMenu/styles.js +6 -3
- package/cjs/styles.js +6 -3
- package/esm/GlobalHeaderContainer.js +10 -7
- package/esm/components/Breadcrumb/GlobalHeaderBreadcrumb.js +10 -8
- package/esm/components/Breadcrumb/PureBreadcrumb.js +22 -19
- package/esm/components/Breadcrumb/styles.js +40 -19
- package/esm/components/Toolbar/ToolbarItems.js +15 -19
- package/esm/components/Toolbar/styles.js +16 -7
- package/esm/config/useGetPropsWithDefaults.js +5 -0
- package/esm/config/useGlobalHeader.js +10 -2
- package/esm/config/useValidateProps.js +5 -2
- package/esm/defaultProps.js +4 -2
- package/esm/outOfTheBox/AppPicker/AppPicker.js +54 -43
- package/esm/outOfTheBox/PopupMenu/PopupMenu.js +21 -35
- package/esm/outOfTheBox/PopupMenu/PopupMenuContent.js +35 -18
- package/esm/outOfTheBox/PopupMenu/styles.js +6 -3
- package/esm/styles.js +6 -3
- package/package.json +11 -9
- 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
|
@@ -1,33 +1,32 @@
|
|
|
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';
|
|
8
8
|
|
|
9
|
-
const PopupMenu =
|
|
10
|
-
Icon,
|
|
11
|
-
options,
|
|
12
|
-
closeOnClick,
|
|
13
|
-
title,
|
|
14
|
-
onClick
|
|
15
|
-
}) => {
|
|
9
|
+
const PopupMenu = _ref => {
|
|
16
10
|
var _PopupMenuContent;
|
|
17
11
|
|
|
12
|
+
let {
|
|
13
|
+
Icon,
|
|
14
|
+
options,
|
|
15
|
+
closeOnClick,
|
|
16
|
+
title,
|
|
17
|
+
onClick
|
|
18
|
+
} = _ref;
|
|
18
19
|
const [isOpen, setIsOpen] = useState(false);
|
|
19
|
-
const buttonRef =
|
|
20
|
+
const [buttonRef, setButtonRef] = useState(null);
|
|
20
21
|
const handleKeyPress = useCallback(e => {
|
|
21
22
|
if (e.code === 'Enter' || e.code === 'Space') {
|
|
22
23
|
setIsOpen(true);
|
|
23
24
|
}
|
|
24
25
|
}, []);
|
|
25
26
|
const handleOnClose = useCallback(() => {
|
|
26
|
-
var _buttonRef$current;
|
|
27
|
-
|
|
28
27
|
setIsOpen(false);
|
|
29
|
-
|
|
30
|
-
}, []);
|
|
28
|
+
buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.focus();
|
|
29
|
+
}, [buttonRef]);
|
|
31
30
|
const handleTriggerOnClick = useCallback(e => {
|
|
32
31
|
setIsOpen(true);
|
|
33
32
|
onClick(e);
|
|
@@ -35,39 +34,26 @@ const PopupMenu = ({
|
|
|
35
34
|
const handleItemClick = useCallback(() => {
|
|
36
35
|
if (closeOnClick) handleOnClose();
|
|
37
36
|
}, [closeOnClick, handleOnClose]);
|
|
38
|
-
const handleClickOutside = useCallback(() => setIsOpen(false), []);
|
|
39
37
|
const content = useMemo(() => _PopupMenuContent || (_PopupMenuContent = /*#__PURE__*/_jsx(PopupMenuContent, {
|
|
40
38
|
options: options,
|
|
41
39
|
onItemClick: handleItemClick,
|
|
42
40
|
onClose: handleOnClose
|
|
43
41
|
})), [options, handleItemClick, handleOnClose]);
|
|
44
|
-
|
|
45
|
-
ref
|
|
46
|
-
}) => /*#__PURE__*/jsx(Button, {
|
|
42
|
+
return /*#__PURE__*/_jsx("div", {}, void 0, /*#__PURE__*/jsx(Button, {
|
|
47
43
|
onClick: handleTriggerOnClick,
|
|
48
44
|
onKeyPress: handleKeyPress,
|
|
49
45
|
title: title,
|
|
50
|
-
ref:
|
|
46
|
+
ref: setButtonRef,
|
|
51
47
|
"data-testid": "gh-toolbar-item",
|
|
52
|
-
children: /*#__PURE__*/_jsx(Icon, {
|
|
53
|
-
innerRef: ref,
|
|
48
|
+
children: Icon && /*#__PURE__*/_jsx(Icon, {
|
|
54
49
|
fill: "#FFF",
|
|
55
50
|
size: "m"
|
|
56
51
|
})
|
|
57
|
-
}),
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
placement: "bottom",
|
|
63
|
-
interactionType: "click",
|
|
64
|
-
showArrow: true,
|
|
65
|
-
style: {
|
|
66
|
-
padding: '0',
|
|
67
|
-
width: 'fit-content'
|
|
68
|
-
},
|
|
69
|
-
renderTrigger: trigger
|
|
70
|
-
}), [content, handleClickOutside, isOpen, trigger]);
|
|
52
|
+
}), /*#__PURE__*/_jsx(DSPopperJS, {
|
|
53
|
+
referenceElement: buttonRef,
|
|
54
|
+
showPopover: isOpen,
|
|
55
|
+
closeContextMenu: handleOnClose
|
|
56
|
+
}, void 0, content));
|
|
71
57
|
};
|
|
72
58
|
|
|
73
59
|
export { PopupMenu };
|
|
@@ -1,37 +1,50 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
|
+
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
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';
|
|
2
10
|
import React, { useContext, useRef, useEffect, useMemo } from 'react';
|
|
3
|
-
import {
|
|
11
|
+
import { getDataProps, getAriaProps } from '@elliemae/ds-props-helpers';
|
|
12
|
+
import { ItemWrapper, Separator, List, Label } from './styles.js';
|
|
4
13
|
import { GlobalHeaderContext } from '../../GlobalHeaderContext.js';
|
|
5
|
-
import { jsx } from 'react/jsx-runtime';
|
|
14
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
15
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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; }
|
|
19
|
+
const PopupMenuContent = /*#__PURE__*/React.memo(_ref => {
|
|
20
|
+
let {
|
|
21
|
+
options,
|
|
22
|
+
onItemClick,
|
|
23
|
+
onClose
|
|
24
|
+
} = _ref;
|
|
12
25
|
const {
|
|
13
26
|
instanceUID
|
|
14
27
|
} = useContext(GlobalHeaderContext);
|
|
15
|
-
const menuRef = useRef();
|
|
28
|
+
const menuRef = useRef(null);
|
|
16
29
|
useEffect(() => {
|
|
17
30
|
var _menuRef$current, _menuRef$current$firs;
|
|
18
31
|
|
|
19
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();
|
|
20
33
|
}, []);
|
|
21
34
|
const content = useMemo(() => options.map(option => {
|
|
22
|
-
var _Content;
|
|
23
|
-
|
|
24
35
|
const {
|
|
25
36
|
type,
|
|
26
|
-
|
|
27
|
-
label,
|
|
37
|
+
Icon,
|
|
38
|
+
label = '',
|
|
28
39
|
onClick,
|
|
29
40
|
Content
|
|
30
41
|
} = option;
|
|
31
42
|
|
|
43
|
+
const ariaAndDataProps = _objectSpread(_objectSpread({}, getAriaProps(option)), getDataProps(option));
|
|
44
|
+
|
|
32
45
|
const handleClick = e => {
|
|
33
46
|
onItemClick(e);
|
|
34
|
-
onClick(e);
|
|
47
|
+
if (onClick) onClick(e);
|
|
35
48
|
};
|
|
36
49
|
|
|
37
50
|
const handleKeyDown = e => {
|
|
@@ -40,19 +53,23 @@ const PopupMenuContent = /*#__PURE__*/React.memo(({
|
|
|
40
53
|
|
|
41
54
|
switch (type) {
|
|
42
55
|
case 'separator':
|
|
43
|
-
return /*#__PURE__*/
|
|
56
|
+
return /*#__PURE__*/jsx(Separator, _objectSpread({}, ariaAndDataProps), "".concat(instanceUID, "-separator-").concat(label));
|
|
44
57
|
|
|
45
58
|
case 'custom':
|
|
46
|
-
return /*#__PURE__*/
|
|
59
|
+
return /*#__PURE__*/jsx(ItemWrapper, _objectSpread(_objectSpread({
|
|
47
60
|
onClick: handleClick,
|
|
48
61
|
onKeyDown: handleKeyDown
|
|
49
|
-
},
|
|
62
|
+
}, ariaAndDataProps), {}, {
|
|
63
|
+
children: Content && /*#__PURE__*/_jsx(Content, {})
|
|
64
|
+
}), "".concat(instanceUID, "-popup-").concat(label));
|
|
50
65
|
|
|
51
66
|
default:
|
|
52
|
-
return /*#__PURE__*/
|
|
67
|
+
return /*#__PURE__*/jsxs(ItemWrapper, _objectSpread(_objectSpread({
|
|
53
68
|
onClick: handleClick,
|
|
54
69
|
onKeyDown: handleKeyDown
|
|
55
|
-
},
|
|
70
|
+
}, ariaAndDataProps), {}, {
|
|
71
|
+
children: [Icon && /*#__PURE__*/_jsx(Icon, {}), Label && /*#__PURE__*/_jsx(Label, {}, void 0, label)]
|
|
72
|
+
}), "".concat(instanceUID, "-popup-").concat(label));
|
|
56
73
|
}
|
|
57
74
|
}), [onClose, onItemClick, options, instanceUID]);
|
|
58
75
|
return /*#__PURE__*/jsx(List, {
|
|
@@ -5,9 +5,12 @@ const List = /*#__PURE__*/styled.div.withConfig({
|
|
|
5
5
|
})(["padding:5px 0px;"]);
|
|
6
6
|
const ItemWrapper = /*#__PURE__*/styled.button.withConfig({
|
|
7
7
|
componentId: "sc-snqcgs-1"
|
|
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:", ";}"],
|
|
9
|
-
|
|
10
|
-
|
|
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 => {
|
|
9
|
+
let {
|
|
10
|
+
theme
|
|
11
|
+
} = _ref;
|
|
12
|
+
return "1px solid ".concat(theme.colors.brand[600]);
|
|
13
|
+
});
|
|
11
14
|
const Label = /*#__PURE__*/styled.p.withConfig({
|
|
12
15
|
componentId: "sc-snqcgs-2"
|
|
13
16
|
})(["width:100%;font-size:14px;margin:10px;"]);
|
package/esm/styles.js
CHANGED
|
@@ -3,8 +3,11 @@ import { GridContainer } from '@elliemae/ds-grid';
|
|
|
3
3
|
|
|
4
4
|
const Wrapper = /*#__PURE__*/styled(GridContainer).withConfig({
|
|
5
5
|
componentId: "sc-1v5zxxm-0"
|
|
6
|
-
})(["background-image:linear-gradient(45deg,#0f364a 0%,#1b6392 54%,#164566 100%);color:", ";width:100%;height:40px;padding:0 24px 0 12px;"],
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
})(["background-image:linear-gradient(45deg,#0f364a 0%,#1b6392 54%,#164566 100%);color:", ";width:100%;height:40px;padding:0 24px 0 12px;"], _ref => {
|
|
7
|
+
let {
|
|
8
|
+
theme
|
|
9
|
+
} = _ref;
|
|
10
|
+
return theme.colors.neutral['000'];
|
|
11
|
+
});
|
|
9
12
|
|
|
10
13
|
export { Wrapper };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-global-header",
|
|
3
|
-
"version": "2.0.0-
|
|
3
|
+
"version": "2.0.0-rc.11",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Global Header",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -120,23 +120,25 @@
|
|
|
120
120
|
"build": "node ../../scripts/build/build.js"
|
|
121
121
|
},
|
|
122
122
|
"dependencies": {
|
|
123
|
-
"@elliemae/ds-app-picker": "2.0.0-
|
|
124
|
-
"@elliemae/ds-classnames": "2.0.0-
|
|
125
|
-
"@elliemae/ds-grid": "2.0.0-
|
|
126
|
-
"@elliemae/ds-icons": "2.0.0-
|
|
127
|
-
"@elliemae/ds-popover": "2.0.0-
|
|
128
|
-
"@elliemae/ds-
|
|
123
|
+
"@elliemae/ds-app-picker": "2.0.0-rc.11",
|
|
124
|
+
"@elliemae/ds-classnames": "2.0.0-rc.11",
|
|
125
|
+
"@elliemae/ds-grid": "2.0.0-rc.11",
|
|
126
|
+
"@elliemae/ds-icons": "2.0.0-rc.11",
|
|
127
|
+
"@elliemae/ds-popover": "2.0.0-rc.11",
|
|
128
|
+
"@elliemae/ds-popperjs": "2.0.0-rc.11",
|
|
129
|
+
"@elliemae/ds-props-helpers": "2.0.0-rc.11",
|
|
130
|
+
"@elliemae/ds-utilities": "2.0.0-rc.11",
|
|
129
131
|
"react-desc": "~4.1.3",
|
|
130
132
|
"uid": "~2.0.0"
|
|
131
133
|
},
|
|
132
134
|
"devDependencies": {
|
|
133
|
-
"styled-components": "~5.3.
|
|
135
|
+
"styled-components": "~5.3.3"
|
|
134
136
|
},
|
|
135
137
|
"peerDependencies": {
|
|
136
138
|
"lodash": "^4.17.21",
|
|
137
139
|
"react": "^17.0.2",
|
|
138
140
|
"react-dom": "^17.0.2",
|
|
139
|
-
"styled-components": "^5.3.
|
|
141
|
+
"styled-components": "^5.3.3"
|
|
140
142
|
},
|
|
141
143
|
"publishConfig": {
|
|
142
144
|
"access": "public",
|
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("react").RefAttributes<
|
|
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>;
|