@elliemae/ds-global-header 2.0.0-alpha.9 → 2.0.0-next.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.
Files changed (34) hide show
  1. package/cjs/GlobalHeaderContainer.js +10 -7
  2. package/cjs/components/Breadcrumb/GlobalHeaderBreadcrumb.js +3 -1
  3. package/cjs/components/Breadcrumb/PureBreadcrumb.js +22 -20
  4. package/cjs/components/Breadcrumb/styles.js +40 -19
  5. package/cjs/components/Toolbar/ToolbarItems.js +5 -3
  6. package/cjs/components/Toolbar/styles.js +16 -7
  7. package/cjs/config/useGetPropsWithDefaults.js +5 -0
  8. package/cjs/config/useGlobalHeader.js +3 -0
  9. package/cjs/config/useValidateProps.js +3 -0
  10. package/cjs/config/validateHelpers.js +5 -28
  11. package/cjs/outOfTheBox/AppPicker/AppPicker.js +32 -28
  12. package/cjs/outOfTheBox/PopupMenu/PopupMenu.js +26 -21
  13. package/cjs/outOfTheBox/PopupMenu/PopupMenuContent.js +11 -8
  14. package/cjs/outOfTheBox/PopupMenu/styles.js +6 -3
  15. package/cjs/styles.js +6 -3
  16. package/esm/GlobalHeaderContainer.js +10 -7
  17. package/esm/components/Breadcrumb/GlobalHeaderBreadcrumb.js +3 -1
  18. package/esm/components/Breadcrumb/PureBreadcrumb.js +22 -19
  19. package/esm/components/Breadcrumb/styles.js +40 -19
  20. package/esm/components/Toolbar/ToolbarItems.js +5 -3
  21. package/esm/components/Toolbar/styles.js +16 -7
  22. package/esm/config/useGetPropsWithDefaults.js +5 -0
  23. package/esm/config/useGlobalHeader.js +3 -0
  24. package/esm/config/useValidateProps.js +3 -0
  25. package/esm/config/validateHelpers.js +5 -28
  26. package/esm/outOfTheBox/AppPicker/AppPicker.js +32 -27
  27. package/esm/outOfTheBox/PopupMenu/PopupMenu.js +26 -21
  28. package/esm/outOfTheBox/PopupMenu/PopupMenuContent.js +11 -8
  29. package/esm/outOfTheBox/PopupMenu/styles.js +6 -3
  30. package/esm/styles.js +6 -3
  31. package/package.json +8 -9
  32. package/types/styles.d.ts +1 -1
  33. package/cjs/package.json +0 -7
  34. package/esm/package.json +0 -7
@@ -10,12 +10,15 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
10
10
 
11
11
  var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
12
12
 
13
- const GlobalHeaderContainer = ({
14
- children
15
- }) => /*#__PURE__*/_jsx__default["default"]("header", {
16
- "data-testid": "ds-global-header"
17
- }, void 0, /*#__PURE__*/_jsx__default["default"](styles.Wrapper, {
18
- cols: ['auto', '1fr', 'auto']
19
- }, void 0, children));
13
+ const GlobalHeaderContainer = _ref => {
14
+ let {
15
+ children
16
+ } = _ref;
17
+ return /*#__PURE__*/_jsx__default["default"]("header", {
18
+ "data-testid": "ds-global-header"
19
+ }, void 0, /*#__PURE__*/_jsx__default["default"](styles.Wrapper, {
20
+ cols: ['auto', '1fr', 'auto']
21
+ }, void 0, children));
22
+ };
20
23
 
21
24
  exports.GlobalHeaderContainer = GlobalHeaderContainer;
@@ -3,6 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _jsx = require('@babel/runtime/helpers/jsx');
6
+ require('core-js/modules/esnext.async-iterator.map.js');
7
+ require('core-js/modules/esnext.iterator.map.js');
6
8
  var React = require('react');
7
9
  var dsGrid = require('@elliemae/ds-grid');
8
10
  var styles = require('./styles.js');
@@ -63,7 +65,7 @@ const GlobalHeaderBreadcrumb = () => {
63
65
  isSelected: isSelected,
64
66
  onClick: onClick,
65
67
  length: breadcrumb.length
66
- }, `${instanceUID}-breadcrumb-item-${label}`);
68
+ }, "".concat(instanceUID, "-breadcrumb-item-").concat(label));
67
69
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
68
70
  id: "global-header-flex-region",
69
71
  ref: flexRegion
@@ -4,32 +4,34 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _jsx = require('@babel/runtime/helpers/jsx');
6
6
  var React = require('react');
7
- var Chevron = require('@elliemae/ds-icons/ChevronSmallRight');
7
+ var dsIcons = require('@elliemae/ds-icons');
8
8
  var styles = require('./styles.js');
9
9
 
10
10
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11
11
 
12
12
  var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
13
13
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
14
- var Chevron__default = /*#__PURE__*/_interopDefaultLegacy(Chevron);
15
14
 
16
- var _Chevron;
17
- const PureBreadcrumb = /*#__PURE__*/React__default["default"].memo(({
18
- onClick,
19
- isSelected,
20
- length,
21
- label,
22
- hasNext
23
- }) => /*#__PURE__*/_jsx__default["default"](styles.BreadcrumbItem, {}, void 0, /*#__PURE__*/_jsx__default["default"](styles.LabelButton, {
24
- onClick: onClick,
25
- "aria-selected": isSelected,
26
- "data-testid": "gh-breadcrumb-btn"
27
- }, void 0, /*#__PURE__*/_jsx__default["default"](styles.Label, {
28
- isSelected: isSelected,
29
- isOnlyItem: length === 1
30
- }, void 0, label)), hasNext && (_Chevron || (_Chevron = /*#__PURE__*/_jsx__default["default"](Chevron__default["default"], {
31
- size: "m",
32
- fill: "#FFF"
33
- })))));
15
+ var _ChevronSmallRight;
16
+ const PureBreadcrumb = /*#__PURE__*/React__default["default"].memo(_ref => {
17
+ let {
18
+ onClick,
19
+ isSelected,
20
+ length,
21
+ label,
22
+ hasNext
23
+ } = _ref;
24
+ return /*#__PURE__*/_jsx__default["default"](styles.BreadcrumbItem, {}, void 0, /*#__PURE__*/_jsx__default["default"](styles.LabelButton, {
25
+ onClick: onClick,
26
+ "aria-selected": isSelected,
27
+ "data-testid": "gh-breadcrumb-btn"
28
+ }, void 0, /*#__PURE__*/_jsx__default["default"](styles.Label, {
29
+ isSelected: isSelected,
30
+ isOnlyItem: length === 1
31
+ }, void 0, label)), hasNext && (_ChevronSmallRight || (_ChevronSmallRight = /*#__PURE__*/_jsx__default["default"](dsIcons.ChevronSmallRight, {
32
+ size: "m",
33
+ fill: "#FFF"
34
+ }))));
35
+ });
34
36
 
35
37
  exports.PureBreadcrumb = PureBreadcrumb;
@@ -10,32 +10,53 @@ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
10
10
 
11
11
  const Pipe = /*#__PURE__*/styled__default["default"].span.withConfig({
12
12
  componentId: "sc-1n5l527-0"
13
- })(["margin:0 7px 0 0;border-left:", ";height:20px;"], ({
14
- showIconOnly
15
- }) => showIconOnly ? 'none' : '1px solid #fff');
13
+ })(["margin:0 7px 0 0;border-left:", ";height:20px;"], _ref => {
14
+ let {
15
+ showIconOnly
16
+ } = _ref;
17
+ return showIconOnly ? 'none' : '1px solid #fff';
18
+ });
16
19
  const BreadcrumbItem = /*#__PURE__*/styled__default["default"].div.withConfig({
17
20
  componentId: "sc-1n5l527-1"
18
21
  })(["display:flex;align-items:center;height:100%;"]);
19
22
  const LabelButton = /*#__PURE__*/styled__default["default"].button.withConfig({
20
23
  componentId: "sc-1n5l527-2"
21
- })(["width:fit-content;height:100%;margin:0;padding:0;border:1px solid transparent;background-color:transparent;outline:none;cursor:pointer;position:relative;&:focus{:after{content:'';position:absolute;top:0;left:-7px;width:calc(100% + 14px);height:100%;border:4px solid ", ";border-radius:6px;}:before{content:'';position:absolute;z-index:2;top:2px;left:-5px;width:calc(100% + 10px);height:calc(100% - 4px);border:2px solid ", ";border-radius:4px;}}"], ({
22
- theme
23
- }) => theme.colors.brand[700], ({
24
- theme
25
- }) => theme.colors.neutral['000']);
24
+ })(["width:fit-content;height:100%;margin:0;padding:0;border:1px solid transparent;background-color:transparent;outline:none;cursor:pointer;position:relative;&:focus{:after{content:'';position:absolute;top:0;left:-7px;width:calc(100% + 14px);height:100%;border:4px solid ", ";border-radius:6px;}:before{content:'';position:absolute;z-index:2;top:2px;left:-5px;width:calc(100% + 10px);height:calc(100% - 4px);border:2px solid ", ";border-radius:4px;}}"], _ref2 => {
25
+ let {
26
+ theme
27
+ } = _ref2;
28
+ return theme.colors.brand[700];
29
+ }, _ref3 => {
30
+ let {
31
+ theme
32
+ } = _ref3;
33
+ return theme.colors.neutral['000'];
34
+ });
26
35
  const Label = /*#__PURE__*/styled__default["default"].p.withConfig({
27
36
  componentId: "sc-1n5l527-3"
28
- })(["color:", ";", ";font-size:16px;text-transform:uppercase;border-bottom:", ";margin:3px 5px 0 5px;:hover{", ";}"], ({
29
- theme
30
- }) => theme.colors.neutral['000'], ({
31
- theme,
32
- isSelected
33
- }) => `-webkit-text-stroke: 0.4px ${isSelected ? theme.colors.neutral['000'] : 'transparent'}`, ({
34
- isSelected,
35
- isOnlyItem
36
- }) => `2px solid ${isSelected && !isOnlyItem ? '#FFF' : 'transparent'}`, ({
37
- theme
38
- }) => `-webkit-text-stroke: 0.4px ${theme.colors.neutral['000']}`);
37
+ })(["color:", ";", ";font-size:16px;text-transform:uppercase;border-bottom:", ";margin:3px 5px 0 5px;:hover{", ";}"], _ref4 => {
38
+ let {
39
+ theme
40
+ } = _ref4;
41
+ return theme.colors.neutral['000'];
42
+ }, _ref5 => {
43
+ let {
44
+ theme,
45
+ isSelected
46
+ } = _ref5;
47
+ return "-webkit-text-stroke: 0.4px ".concat(isSelected ? theme.colors.neutral['000'] : 'transparent');
48
+ }, _ref6 => {
49
+ let {
50
+ isSelected,
51
+ isOnlyItem
52
+ } = _ref6;
53
+ return "2px solid ".concat(isSelected && !isOnlyItem ? '#FFF' : 'transparent');
54
+ }, _ref7 => {
55
+ let {
56
+ theme
57
+ } = _ref7;
58
+ return "-webkit-text-stroke: 0.4px ".concat(theme.colors.neutral['000']);
59
+ });
39
60
 
40
61
  exports.BreadcrumbItem = BreadcrumbItem;
41
62
  exports.Label = Label;
@@ -3,6 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _jsx = require('@babel/runtime/helpers/jsx');
6
+ require('core-js/modules/esnext.async-iterator.map.js');
7
+ require('core-js/modules/esnext.iterator.map.js');
6
8
  var React = require('react');
7
9
  var AppPicker = require('../../outOfTheBox/AppPicker/AppPicker.js');
8
10
  var PopupMenu = require('../../outOfTheBox/PopupMenu/PopupMenu.js');
@@ -44,7 +46,7 @@ const ToolbarItems = () => {
44
46
  Icon: Icon,
45
47
  options: options,
46
48
  closeOnClick: closeOnClick
47
- }, `${instanceUID}-ds-popup-menu-${label}`);
49
+ }, "".concat(instanceUID, "-ds-popup-menu-").concat(label));
48
50
 
49
51
  case 'ds-app-picker':
50
52
  const {
@@ -64,14 +66,14 @@ const ToolbarItems = () => {
64
66
  customSectionTitle: customSectionTitle,
65
67
  actionRef: actionRef,
66
68
  onKeyDown: onKeyDown
67
- }, `${instanceUID}-ds-app-picker-${label}`);
69
+ }, "".concat(instanceUID, "-ds-app-picker-").concat(label));
68
70
 
69
71
  default:
70
72
  return /*#__PURE__*/_jsx__default["default"](styles.Button, {
71
73
  onClick: onClick,
72
74
  title: label,
73
75
  "data-testid": "gh-toolbar-item"
74
- }, `${instanceUID}-ds-toolbar-button-${label}`, _Icon || (_Icon = /*#__PURE__*/_jsx__default["default"](Icon, {
76
+ }, "".concat(instanceUID, "-ds-toolbar-button-").concat(label), _Icon || (_Icon = /*#__PURE__*/_jsx__default["default"](Icon, {
75
77
  fill: "#FFF",
76
78
  size: "m"
77
79
  })));
@@ -10,12 +10,21 @@ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
10
10
 
11
11
  const Button = /*#__PURE__*/styled__default["default"].button.withConfig({
12
12
  componentId: "sc-1gqj0i3-0"
13
- })(["height:40px;width:40px;border:none;background-color:transparent;cursor:pointer;position:relative;outline:none;&:hover:not(:focus){background-color:", ";outline:none;}&:focus{:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;border:4px solid ", ";border-radius:4px;}:before{content:'';position:absolute;z-index:2;top:2px;left:2px;width:calc(100% - 4px);height:calc(100% - 4px);border:2px solid ", ";border-radius:4px;}}"], ({
14
- theme
15
- }) => theme.colors.brand[700], ({
16
- theme
17
- }) => theme.colors.brand[700], ({
18
- theme
19
- }) => theme.colors.neutral['000']);
13
+ })(["height:40px;width:40px;border:none;background-color:transparent;cursor:pointer;position:relative;outline:none;&:hover:not(:focus){background-color:", ";outline:none;}&:focus{:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;border:4px solid ", ";border-radius:4px;}:before{content:'';position:absolute;z-index:2;top:2px;left:2px;width:calc(100% - 4px);height:calc(100% - 4px);border:2px solid ", ";border-radius:4px;}}"], _ref => {
14
+ let {
15
+ theme
16
+ } = _ref;
17
+ return theme.colors.brand[700];
18
+ }, _ref2 => {
19
+ let {
20
+ theme
21
+ } = _ref2;
22
+ return theme.colors.brand[700];
23
+ }, _ref3 => {
24
+ let {
25
+ theme
26
+ } = _ref3;
27
+ return theme.colors.neutral['000'];
28
+ });
20
29
 
21
30
  exports.Button = Button;
@@ -2,6 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ require('core-js/modules/esnext.async-iterator.filter.js');
6
+ require('core-js/modules/esnext.iterator.constructor.js');
7
+ require('core-js/modules/esnext.iterator.filter.js');
8
+ require('core-js/modules/esnext.async-iterator.for-each.js');
9
+ require('core-js/modules/esnext.iterator.for-each.js');
5
10
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
6
11
  var React = require('react');
7
12
  var defaultProps = require('../defaultProps.js');
@@ -2,6 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
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');
5
8
  var React = require('react');
6
9
  var uid = require('uid');
7
10
  var useGetPropsWithDefaults = require('./useGetPropsWithDefaults.js');
@@ -2,6 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ require('core-js/modules/esnext.async-iterator.for-each.js');
6
+ require('core-js/modules/esnext.iterator.constructor.js');
7
+ require('core-js/modules/esnext.iterator.for-each.js');
5
8
  var validateHelpers = require('./validateHelpers.js');
6
9
 
7
10
  const validatePopupItem = componentProps => {
@@ -30,42 +30,19 @@ const getVariableType = arg => {
30
30
  };
31
31
  const isValidToolbarType = string => string === 'ds-app-picker' || string === 'ds-popup-menu';
32
32
  const throwBreadcrumbItemError = (validPropKey, invalidProp) => {
33
- throw new Error(`You are trying to pass a not valid "${validPropKey}" property for a breadcrumb item, please provide a valid type.
34
-
35
- Received: ${invalidProp} (${typeof invalidProp})
36
- Expected: (${breadcrumbProps[validPropKey]})
37
- `);
33
+ throw new Error("You are trying to pass a not valid \"".concat(validPropKey, "\" property for a breadcrumb item, please provide a valid type.\n\n Received: ").concat(invalidProp, " (").concat(typeof invalidProp, ")\n Expected: (").concat(breadcrumbProps[validPropKey], ")\n "));
38
34
  };
39
35
  const throwToolbarPopupItemError = (validPropKey, invalidProp) => {
40
- throw new Error(`You are trying to pass a not valid "${validPropKey}" property inside componentProps for a ds-popup-menu
41
- toolbar item, please provide a valid type.
42
-
43
- Received: ${invalidProp} (${getVariableType(invalidProp)})
44
- Expected: (${toolbarProps[validPropKey]})
45
- `);
36
+ throw new Error("You are trying to pass a not valid \"".concat(validPropKey, "\" property inside componentProps for a ds-popup-menu \n toolbar item, please provide a valid type.\n\n Received: ").concat(invalidProp, " (").concat(getVariableType(invalidProp), ")\n Expected: (").concat(toolbarProps[validPropKey], ")\n "));
46
37
  };
47
38
  const throwToolbarAppPickerItemError = (validPropKey, invalidProp) => {
48
- throw new Error(`You are trying to pass a not valid "${validPropKey}" property inside componentProps for a ds-app-picker
49
- toolbar item, please provide a valid type.
50
-
51
- Received: ${invalidProp} (${getVariableType(invalidProp)})
52
- Expected: (${toolbarProps[validPropKey]})
53
- `);
39
+ throw new Error("You are trying to pass a not valid \"".concat(validPropKey, "\" property inside componentProps for a ds-app-picker \n toolbar item, please provide a valid type.\n\n Received: ").concat(invalidProp, " (").concat(getVariableType(invalidProp), ")\n Expected: (").concat(toolbarProps[validPropKey], ")\n "));
54
40
  };
55
41
  const throwToolbarItemGenericError = (validPropKey, invalidProp) => {
56
- throw new Error(`You are trying to pass a not valid "${validPropKey}" property for a toolbar item, please provide a valid type.
57
-
58
- Received: ${invalidProp} (${getVariableType(invalidProp)})
59
- Expected: (${toolbarProps[validPropKey]})
60
- `);
42
+ throw new Error("You are trying to pass a not valid \"".concat(validPropKey, "\" property for a toolbar item, please provide a valid type.\n\n Received: ").concat(invalidProp, " (").concat(getVariableType(invalidProp), ")\n Expected: (").concat(toolbarProps[validPropKey], ")\n "));
61
43
  };
62
44
  const throwLogoError = (validPropKey, invalidProp) => {
63
- throw new Error(`You are trying to pass a not valid "${validPropKey}" property for a global header,
64
- remember to provide both Logo and LogoWithBrand properties with a valid type.
65
-
66
- Received: ${invalidProp} (${getVariableType(invalidProp)}).
67
- Expected: (react component).
68
- `);
45
+ throw new Error("You are trying to pass a not valid \"".concat(validPropKey, "\" property for a global header, \n remember to provide both Logo and LogoWithBrand properties with a valid type.\n\n Received: ").concat(invalidProp, " (").concat(getVariableType(invalidProp), ").\n Expected: (react component).\n "));
69
46
  };
70
47
 
71
48
  exports.breadcrumbProps = breadcrumbProps;
@@ -3,30 +3,31 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _jsx = require('@babel/runtime/helpers/jsx');
6
+ require('core-js/modules/web.dom-collections.iterator.js');
6
7
  var React = require('react');
7
8
  var dsAppPicker = require('@elliemae/ds-app-picker');
8
- var MenuPicker = require('@elliemae/ds-icons/MenuPicker');
9
+ var dsIcons = require('@elliemae/ds-icons');
9
10
  var styles = require('../../components/Toolbar/styles.js');
10
11
  var jsxRuntime = require('react/jsx-runtime');
11
12
 
12
13
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
14
 
14
15
  var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
15
- var MenuPicker__default = /*#__PURE__*/_interopDefaultLegacy(MenuPicker);
16
16
 
17
17
  var _MenuPicker;
18
- const AppPicker = ({
19
- label,
20
- apps,
21
- customApps,
22
- sectionTitle,
23
- customSectionTitle,
24
- onClick = () => null,
25
- actionRef,
26
- onKeyDown: customHandleOnKeyDown = () => null
27
- }) => {
18
+ const AppPicker = _ref => {
28
19
  var _DSAppPicker;
29
20
 
21
+ let {
22
+ label,
23
+ apps,
24
+ customApps,
25
+ sectionTitle,
26
+ customSectionTitle,
27
+ onClick = () => null,
28
+ actionRef,
29
+ onKeyDown: customHandleOnKeyDown = () => null
30
+ } = _ref;
30
31
  const [isOpen, setIsOpen] = React.useState(false);
31
32
  const buttonRef = React.useRef();
32
33
  const handleTriggerKeyDown = React.useCallback(e => {
@@ -48,22 +49,25 @@ const AppPicker = ({
48
49
  setIsOpen(true);
49
50
  onClick(e);
50
51
  }, [onClick]);
51
- const trigger = React.useMemo(() => ({
52
- ref
53
- }) => /*#__PURE__*/jsxRuntime.jsx("div", {
54
- ref: ref,
55
- children: /*#__PURE__*/jsxRuntime.jsx(styles.Button, {
56
- onClick: handleOnClick,
57
- onKeyDown: handleTriggerKeyDown,
58
- ref: buttonRef,
59
- title: label,
60
- "data-testid": "gh-toolbar-item",
61
- children: _MenuPicker || (_MenuPicker = /*#__PURE__*/_jsx__default["default"](MenuPicker__default["default"], {
62
- fill: "#FFF",
63
- size: "m"
64
- }))
65
- })
66
- }), [handleOnClick, handleTriggerKeyDown, label]);
52
+ const trigger = React.useMemo(() => _ref2 => {
53
+ let {
54
+ ref
55
+ } = _ref2;
56
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
57
+ ref: ref,
58
+ children: /*#__PURE__*/jsxRuntime.jsx(styles.Button, {
59
+ onClick: handleOnClick,
60
+ onKeyDown: handleTriggerKeyDown,
61
+ ref: buttonRef,
62
+ title: label,
63
+ "data-testid": "gh-toolbar-item",
64
+ children: _MenuPicker || (_MenuPicker = /*#__PURE__*/_jsx__default["default"](dsIcons.MenuPicker, {
65
+ fill: "#FFF",
66
+ size: "m"
67
+ }))
68
+ })
69
+ });
70
+ }, [handleOnClick, handleTriggerKeyDown, label]);
67
71
  return React.useMemo(() => _DSAppPicker || (_DSAppPicker = /*#__PURE__*/_jsx__default["default"](dsAppPicker.DSAppPicker, {
68
72
  isOpen: isOpen,
69
73
  apps: apps,
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _jsx = require('@babel/runtime/helpers/jsx');
6
+ require('core-js/modules/web.dom-collections.iterator.js');
6
7
  var React = require('react');
7
8
  var Popover = require('@elliemae/ds-popover');
8
9
  var PopupMenuContent = require('./PopupMenuContent.js');
@@ -14,15 +15,16 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
14
15
  var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
15
16
  var Popover__default = /*#__PURE__*/_interopDefaultLegacy(Popover);
16
17
 
17
- const PopupMenu = ({
18
- Icon,
19
- options,
20
- closeOnClick,
21
- title,
22
- onClick
23
- }) => {
18
+ const PopupMenu = _ref => {
24
19
  var _PopupMenuContent;
25
20
 
21
+ let {
22
+ Icon,
23
+ options,
24
+ closeOnClick,
25
+ title,
26
+ onClick
27
+ } = _ref;
26
28
  const [isOpen, setIsOpen] = React.useState(false);
27
29
  const buttonRef = React.useRef();
28
30
  const handleKeyPress = React.useCallback(e => {
@@ -49,20 +51,23 @@ const PopupMenu = ({
49
51
  onItemClick: handleItemClick,
50
52
  onClose: handleOnClose
51
53
  })), [options, handleItemClick, handleOnClose]);
52
- const trigger = React.useMemo(() => ({
53
- ref
54
- }) => /*#__PURE__*/jsxRuntime.jsx(styles.Button, {
55
- onClick: handleTriggerOnClick,
56
- onKeyPress: handleKeyPress,
57
- title: title,
58
- ref: buttonRef,
59
- "data-testid": "gh-toolbar-item",
60
- children: /*#__PURE__*/_jsx__default["default"](Icon, {
61
- innerRef: ref,
62
- fill: "#FFF",
63
- size: "m"
64
- })
65
- }), [Icon, handleKeyPress, handleTriggerOnClick, title]);
54
+ const trigger = React.useMemo(() => _ref2 => {
55
+ let {
56
+ ref
57
+ } = _ref2;
58
+ return /*#__PURE__*/jsxRuntime.jsx(styles.Button, {
59
+ onClick: handleTriggerOnClick,
60
+ onKeyPress: handleKeyPress,
61
+ title: title,
62
+ ref: buttonRef,
63
+ "data-testid": "gh-toolbar-item",
64
+ children: /*#__PURE__*/_jsx__default["default"](Icon, {
65
+ innerRef: ref,
66
+ fill: "#FFF",
67
+ size: "m"
68
+ })
69
+ });
70
+ }, [Icon, handleKeyPress, handleTriggerOnClick, title]);
66
71
  return React.useMemo(() => /*#__PURE__*/_jsx__default["default"](Popover__default["default"], {
67
72
  isOpen: isOpen,
68
73
  content: content,
@@ -3,6 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _jsx = require('@babel/runtime/helpers/jsx');
6
+ require('core-js/modules/esnext.async-iterator.map.js');
7
+ require('core-js/modules/esnext.iterator.map.js');
6
8
  var React = require('react');
7
9
  var styles = require('./styles.js');
8
10
  var GlobalHeaderContext = require('../../GlobalHeaderContext.js');
@@ -13,11 +15,12 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
13
15
  var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
14
16
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
15
17
 
16
- const PopupMenuContent = /*#__PURE__*/React__default["default"].memo(({
17
- options,
18
- onItemClick,
19
- onClose
20
- }) => {
18
+ const PopupMenuContent = /*#__PURE__*/React__default["default"].memo(_ref => {
19
+ let {
20
+ options,
21
+ onItemClick,
22
+ onClose
23
+ } = _ref;
21
24
  const {
22
25
  instanceUID
23
26
  } = React.useContext(GlobalHeaderContext.GlobalHeaderContext);
@@ -49,19 +52,19 @@ const PopupMenuContent = /*#__PURE__*/React__default["default"].memo(({
49
52
 
50
53
  switch (type) {
51
54
  case 'separator':
52
- return /*#__PURE__*/_jsx__default["default"](styles.Separator, {}, `${instanceUID}-separator-${label}`);
55
+ return /*#__PURE__*/_jsx__default["default"](styles.Separator, {}, "".concat(instanceUID, "-separator-").concat(label));
53
56
 
54
57
  case 'custom':
55
58
  return /*#__PURE__*/_jsx__default["default"](styles.ItemWrapper, {
56
59
  onClick: handleClick,
57
60
  onKeyDown: handleKeyDown
58
- }, `${instanceUID}-popup-${label}`, _Content || (_Content = /*#__PURE__*/_jsx__default["default"](Content, {})));
61
+ }, "".concat(instanceUID, "-popup-").concat(label), _Content || (_Content = /*#__PURE__*/_jsx__default["default"](Content, {})));
59
62
 
60
63
  default:
61
64
  return /*#__PURE__*/_jsx__default["default"](styles.ItemWrapper, {
62
65
  onClick: handleClick,
63
66
  onKeyDown: handleKeyDown
64
- }, `${instanceUID}-popup-${label}`, icon, styles.Label && /*#__PURE__*/_jsx__default["default"](styles.Label, {}, void 0, label));
67
+ }, "".concat(instanceUID, "-popup-").concat(label), icon, styles.Label && /*#__PURE__*/_jsx__default["default"](styles.Label, {}, void 0, label));
65
68
  }
66
69
  }), [onClose, onItemClick, options, instanceUID]);
67
70
  return /*#__PURE__*/jsxRuntime.jsx(styles.List, {
@@ -13,9 +13,12 @@ const List = /*#__PURE__*/styled__default["default"].div.withConfig({
13
13
  })(["padding:5px 0px;"]);
14
14
  const ItemWrapper = /*#__PURE__*/styled__default["default"].button.withConfig({
15
15
  componentId: "sc-snqcgs-1"
16
- })(["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:", ";}"], ({
17
- theme
18
- }) => `1px solid ${theme.colors.brand[600]}`);
16
+ })(["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 => {
17
+ let {
18
+ theme
19
+ } = _ref;
20
+ return "1px solid ".concat(theme.colors.brand[600]);
21
+ });
19
22
  const Label = /*#__PURE__*/styled__default["default"].p.withConfig({
20
23
  componentId: "sc-snqcgs-2"
21
24
  })(["width:100%;font-size:14px;margin:10px;"]);
package/cjs/styles.js CHANGED
@@ -11,8 +11,11 @@ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
11
11
 
12
12
  const Wrapper = /*#__PURE__*/styled__default["default"](dsGrid.GridContainer).withConfig({
13
13
  componentId: "sc-1v5zxxm-0"
14
- })(["background-image:linear-gradient(45deg,#0f364a 0%,#1b6392 54%,#164566 100%);color:", ";width:100%;height:40px;padding:0 24px 0 12px;"], ({
15
- theme
16
- }) => theme.colors.neutral['000']);
14
+ })(["background-image:linear-gradient(45deg,#0f364a 0%,#1b6392 54%,#164566 100%);color:", ";width:100%;height:40px;padding:0 24px 0 12px;"], _ref => {
15
+ let {
16
+ theme
17
+ } = _ref;
18
+ return theme.colors.neutral['000'];
19
+ });
17
20
 
18
21
  exports.Wrapper = Wrapper;
@@ -2,12 +2,15 @@ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
2
  import 'react';
3
3
  import { Wrapper } from './styles.js';
4
4
 
5
- const GlobalHeaderContainer = ({
6
- children
7
- }) => /*#__PURE__*/_jsx("header", {
8
- "data-testid": "ds-global-header"
9
- }, void 0, /*#__PURE__*/_jsx(Wrapper, {
10
- cols: ['auto', '1fr', 'auto']
11
- }, void 0, children));
5
+ const GlobalHeaderContainer = _ref => {
6
+ let {
7
+ children
8
+ } = _ref;
9
+ return /*#__PURE__*/_jsx("header", {
10
+ "data-testid": "ds-global-header"
11
+ }, void 0, /*#__PURE__*/_jsx(Wrapper, {
12
+ cols: ['auto', '1fr', 'auto']
13
+ }, void 0, children));
14
+ };
12
15
 
13
16
  export { GlobalHeaderContainer };
@@ -1,4 +1,6 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'core-js/modules/esnext.async-iterator.map.js';
3
+ import 'core-js/modules/esnext.iterator.map.js';
2
4
  import { useContext, useRef, useEffect } from 'react';
3
5
  import { Grid } from '@elliemae/ds-grid';
4
6
  import { Pipe } from './styles.js';
@@ -55,7 +57,7 @@ const GlobalHeaderBreadcrumb = () => {
55
57
  isSelected: isSelected,
56
58
  onClick: onClick,
57
59
  length: breadcrumb.length
58
- }, `${instanceUID}-breadcrumb-item-${label}`);
60
+ }, "".concat(instanceUID, "-breadcrumb-item-").concat(label));
59
61
  }), /*#__PURE__*/jsx("div", {
60
62
  id: "global-header-flex-region",
61
63
  ref: flexRegion
@@ -1,25 +1,28 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
2
  import React from 'react';
3
- import Chevron from '@elliemae/ds-icons/ChevronSmallRight';
3
+ import { ChevronSmallRight } from '@elliemae/ds-icons';
4
4
  import { BreadcrumbItem, LabelButton, Label } from './styles.js';
5
5
 
6
- var _Chevron;
7
- const PureBreadcrumb = /*#__PURE__*/React.memo(({
8
- onClick,
9
- isSelected,
10
- length,
11
- label,
12
- hasNext
13
- }) => /*#__PURE__*/_jsx(BreadcrumbItem, {}, void 0, /*#__PURE__*/_jsx(LabelButton, {
14
- onClick: onClick,
15
- "aria-selected": isSelected,
16
- "data-testid": "gh-breadcrumb-btn"
17
- }, void 0, /*#__PURE__*/_jsx(Label, {
18
- isSelected: isSelected,
19
- isOnlyItem: length === 1
20
- }, void 0, label)), hasNext && (_Chevron || (_Chevron = /*#__PURE__*/_jsx(Chevron, {
21
- size: "m",
22
- fill: "#FFF"
23
- })))));
6
+ var _ChevronSmallRight;
7
+ const PureBreadcrumb = /*#__PURE__*/React.memo(_ref => {
8
+ let {
9
+ onClick,
10
+ isSelected,
11
+ length,
12
+ label,
13
+ hasNext
14
+ } = _ref;
15
+ return /*#__PURE__*/_jsx(BreadcrumbItem, {}, void 0, /*#__PURE__*/_jsx(LabelButton, {
16
+ onClick: onClick,
17
+ "aria-selected": isSelected,
18
+ "data-testid": "gh-breadcrumb-btn"
19
+ }, void 0, /*#__PURE__*/_jsx(Label, {
20
+ isSelected: isSelected,
21
+ isOnlyItem: length === 1
22
+ }, void 0, label)), hasNext && (_ChevronSmallRight || (_ChevronSmallRight = /*#__PURE__*/_jsx(ChevronSmallRight, {
23
+ size: "m",
24
+ fill: "#FFF"
25
+ }))));
26
+ });
24
27
 
25
28
  export { PureBreadcrumb };
@@ -2,31 +2,52 @@ import styled from 'styled-components';
2
2
 
3
3
  const Pipe = /*#__PURE__*/styled.span.withConfig({
4
4
  componentId: "sc-1n5l527-0"
5
- })(["margin:0 7px 0 0;border-left:", ";height:20px;"], ({
6
- showIconOnly
7
- }) => showIconOnly ? 'none' : '1px solid #fff');
5
+ })(["margin:0 7px 0 0;border-left:", ";height:20px;"], _ref => {
6
+ let {
7
+ showIconOnly
8
+ } = _ref;
9
+ return showIconOnly ? 'none' : '1px solid #fff';
10
+ });
8
11
  const BreadcrumbItem = /*#__PURE__*/styled.div.withConfig({
9
12
  componentId: "sc-1n5l527-1"
10
13
  })(["display:flex;align-items:center;height:100%;"]);
11
14
  const LabelButton = /*#__PURE__*/styled.button.withConfig({
12
15
  componentId: "sc-1n5l527-2"
13
- })(["width:fit-content;height:100%;margin:0;padding:0;border:1px solid transparent;background-color:transparent;outline:none;cursor:pointer;position:relative;&:focus{:after{content:'';position:absolute;top:0;left:-7px;width:calc(100% + 14px);height:100%;border:4px solid ", ";border-radius:6px;}:before{content:'';position:absolute;z-index:2;top:2px;left:-5px;width:calc(100% + 10px);height:calc(100% - 4px);border:2px solid ", ";border-radius:4px;}}"], ({
14
- theme
15
- }) => theme.colors.brand[700], ({
16
- theme
17
- }) => theme.colors.neutral['000']);
16
+ })(["width:fit-content;height:100%;margin:0;padding:0;border:1px solid transparent;background-color:transparent;outline:none;cursor:pointer;position:relative;&:focus{:after{content:'';position:absolute;top:0;left:-7px;width:calc(100% + 14px);height:100%;border:4px solid ", ";border-radius:6px;}:before{content:'';position:absolute;z-index:2;top:2px;left:-5px;width:calc(100% + 10px);height:calc(100% - 4px);border:2px solid ", ";border-radius:4px;}}"], _ref2 => {
17
+ let {
18
+ theme
19
+ } = _ref2;
20
+ return theme.colors.brand[700];
21
+ }, _ref3 => {
22
+ let {
23
+ theme
24
+ } = _ref3;
25
+ return theme.colors.neutral['000'];
26
+ });
18
27
  const Label = /*#__PURE__*/styled.p.withConfig({
19
28
  componentId: "sc-1n5l527-3"
20
- })(["color:", ";", ";font-size:16px;text-transform:uppercase;border-bottom:", ";margin:3px 5px 0 5px;:hover{", ";}"], ({
21
- theme
22
- }) => theme.colors.neutral['000'], ({
23
- theme,
24
- isSelected
25
- }) => `-webkit-text-stroke: 0.4px ${isSelected ? theme.colors.neutral['000'] : 'transparent'}`, ({
26
- isSelected,
27
- isOnlyItem
28
- }) => `2px solid ${isSelected && !isOnlyItem ? '#FFF' : 'transparent'}`, ({
29
- theme
30
- }) => `-webkit-text-stroke: 0.4px ${theme.colors.neutral['000']}`);
29
+ })(["color:", ";", ";font-size:16px;text-transform:uppercase;border-bottom:", ";margin:3px 5px 0 5px;:hover{", ";}"], _ref4 => {
30
+ let {
31
+ theme
32
+ } = _ref4;
33
+ return theme.colors.neutral['000'];
34
+ }, _ref5 => {
35
+ let {
36
+ theme,
37
+ isSelected
38
+ } = _ref5;
39
+ return "-webkit-text-stroke: 0.4px ".concat(isSelected ? theme.colors.neutral['000'] : 'transparent');
40
+ }, _ref6 => {
41
+ let {
42
+ isSelected,
43
+ isOnlyItem
44
+ } = _ref6;
45
+ return "2px solid ".concat(isSelected && !isOnlyItem ? '#FFF' : 'transparent');
46
+ }, _ref7 => {
47
+ let {
48
+ theme
49
+ } = _ref7;
50
+ return "-webkit-text-stroke: 0.4px ".concat(theme.colors.neutral['000']);
51
+ });
31
52
 
32
53
  export { BreadcrumbItem, Label, LabelButton, Pipe };
@@ -1,4 +1,6 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'core-js/modules/esnext.async-iterator.map.js';
3
+ import 'core-js/modules/esnext.iterator.map.js';
2
4
  import { useContext, useMemo } from 'react';
3
5
  import { AppPicker } from '../../outOfTheBox/AppPicker/AppPicker.js';
4
6
  import { PopupMenu } from '../../outOfTheBox/PopupMenu/PopupMenu.js';
@@ -36,7 +38,7 @@ const ToolbarItems = () => {
36
38
  Icon: Icon,
37
39
  options: options,
38
40
  closeOnClick: closeOnClick
39
- }, `${instanceUID}-ds-popup-menu-${label}`);
41
+ }, "".concat(instanceUID, "-ds-popup-menu-").concat(label));
40
42
 
41
43
  case 'ds-app-picker':
42
44
  const {
@@ -56,14 +58,14 @@ const ToolbarItems = () => {
56
58
  customSectionTitle: customSectionTitle,
57
59
  actionRef: actionRef,
58
60
  onKeyDown: onKeyDown
59
- }, `${instanceUID}-ds-app-picker-${label}`);
61
+ }, "".concat(instanceUID, "-ds-app-picker-").concat(label));
60
62
 
61
63
  default:
62
64
  return /*#__PURE__*/_jsx(Button, {
63
65
  onClick: onClick,
64
66
  title: label,
65
67
  "data-testid": "gh-toolbar-item"
66
- }, `${instanceUID}-ds-toolbar-button-${label}`, _Icon || (_Icon = /*#__PURE__*/_jsx(Icon, {
68
+ }, "".concat(instanceUID, "-ds-toolbar-button-").concat(label), _Icon || (_Icon = /*#__PURE__*/_jsx(Icon, {
67
69
  fill: "#FFF",
68
70
  size: "m"
69
71
  })));
@@ -2,12 +2,21 @@ import styled from 'styled-components';
2
2
 
3
3
  const Button = /*#__PURE__*/styled.button.withConfig({
4
4
  componentId: "sc-1gqj0i3-0"
5
- })(["height:40px;width:40px;border:none;background-color:transparent;cursor:pointer;position:relative;outline:none;&:hover:not(:focus){background-color:", ";outline:none;}&:focus{:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;border:4px solid ", ";border-radius:4px;}:before{content:'';position:absolute;z-index:2;top:2px;left:2px;width:calc(100% - 4px);height:calc(100% - 4px);border:2px solid ", ";border-radius:4px;}}"], ({
6
- theme
7
- }) => theme.colors.brand[700], ({
8
- theme
9
- }) => theme.colors.brand[700], ({
10
- theme
11
- }) => theme.colors.neutral['000']);
5
+ })(["height:40px;width:40px;border:none;background-color:transparent;cursor:pointer;position:relative;outline:none;&:hover:not(:focus){background-color:", ";outline:none;}&:focus{:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;border:4px solid ", ";border-radius:4px;}:before{content:'';position:absolute;z-index:2;top:2px;left:2px;width:calc(100% - 4px);height:calc(100% - 4px);border:2px solid ", ";border-radius:4px;}}"], _ref => {
6
+ let {
7
+ theme
8
+ } = _ref;
9
+ return theme.colors.brand[700];
10
+ }, _ref2 => {
11
+ let {
12
+ theme
13
+ } = _ref2;
14
+ return theme.colors.brand[700];
15
+ }, _ref3 => {
16
+ let {
17
+ theme
18
+ } = _ref3;
19
+ return theme.colors.neutral['000'];
20
+ });
12
21
 
13
22
  export { Button };
@@ -1,3 +1,8 @@
1
+ import 'core-js/modules/esnext.async-iterator.filter.js';
2
+ import 'core-js/modules/esnext.iterator.constructor.js';
3
+ import 'core-js/modules/esnext.iterator.filter.js';
4
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
5
+ import 'core-js/modules/esnext.iterator.for-each.js';
1
6
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
7
  import { useMemo } from 'react';
3
8
  import { defaultProps } from '../defaultProps.js';
@@ -1,3 +1,6 @@
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';
1
4
  import React, { useState, useMemo } from 'react';
2
5
  import { uid } from 'uid';
3
6
  import { useGetPropsWithDefaults } from './useGetPropsWithDefaults.js';
@@ -1,3 +1,6 @@
1
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
2
+ import 'core-js/modules/esnext.iterator.constructor.js';
3
+ import 'core-js/modules/esnext.iterator.for-each.js';
1
4
  import { throwLogoError, throwBreadcrumbItemError, isValidToolbarType, throwToolbarItemGenericError, isObject, throwToolbarPopupItemError, throwToolbarAppPickerItemError } from './validateHelpers.js';
2
5
 
3
6
  const validatePopupItem = componentProps => {
@@ -26,42 +26,19 @@ const getVariableType = arg => {
26
26
  };
27
27
  const isValidToolbarType = string => string === 'ds-app-picker' || string === 'ds-popup-menu';
28
28
  const throwBreadcrumbItemError = (validPropKey, invalidProp) => {
29
- throw new Error(`You are trying to pass a not valid "${validPropKey}" property for a breadcrumb item, please provide a valid type.
30
-
31
- Received: ${invalidProp} (${typeof invalidProp})
32
- Expected: (${breadcrumbProps[validPropKey]})
33
- `);
29
+ throw new Error("You are trying to pass a not valid \"".concat(validPropKey, "\" property for a breadcrumb item, please provide a valid type.\n\n Received: ").concat(invalidProp, " (").concat(typeof invalidProp, ")\n Expected: (").concat(breadcrumbProps[validPropKey], ")\n "));
34
30
  };
35
31
  const throwToolbarPopupItemError = (validPropKey, invalidProp) => {
36
- throw new Error(`You are trying to pass a not valid "${validPropKey}" property inside componentProps for a ds-popup-menu
37
- toolbar item, please provide a valid type.
38
-
39
- Received: ${invalidProp} (${getVariableType(invalidProp)})
40
- Expected: (${toolbarProps[validPropKey]})
41
- `);
32
+ throw new Error("You are trying to pass a not valid \"".concat(validPropKey, "\" property inside componentProps for a ds-popup-menu \n toolbar item, please provide a valid type.\n\n Received: ").concat(invalidProp, " (").concat(getVariableType(invalidProp), ")\n Expected: (").concat(toolbarProps[validPropKey], ")\n "));
42
33
  };
43
34
  const throwToolbarAppPickerItemError = (validPropKey, invalidProp) => {
44
- throw new Error(`You are trying to pass a not valid "${validPropKey}" property inside componentProps for a ds-app-picker
45
- toolbar item, please provide a valid type.
46
-
47
- Received: ${invalidProp} (${getVariableType(invalidProp)})
48
- Expected: (${toolbarProps[validPropKey]})
49
- `);
35
+ throw new Error("You are trying to pass a not valid \"".concat(validPropKey, "\" property inside componentProps for a ds-app-picker \n toolbar item, please provide a valid type.\n\n Received: ").concat(invalidProp, " (").concat(getVariableType(invalidProp), ")\n Expected: (").concat(toolbarProps[validPropKey], ")\n "));
50
36
  };
51
37
  const throwToolbarItemGenericError = (validPropKey, invalidProp) => {
52
- throw new Error(`You are trying to pass a not valid "${validPropKey}" property for a toolbar item, please provide a valid type.
53
-
54
- Received: ${invalidProp} (${getVariableType(invalidProp)})
55
- Expected: (${toolbarProps[validPropKey]})
56
- `);
38
+ throw new Error("You are trying to pass a not valid \"".concat(validPropKey, "\" property for a toolbar item, please provide a valid type.\n\n Received: ").concat(invalidProp, " (").concat(getVariableType(invalidProp), ")\n Expected: (").concat(toolbarProps[validPropKey], ")\n "));
57
39
  };
58
40
  const throwLogoError = (validPropKey, invalidProp) => {
59
- throw new Error(`You are trying to pass a not valid "${validPropKey}" property for a global header,
60
- remember to provide both Logo and LogoWithBrand properties with a valid type.
61
-
62
- Received: ${invalidProp} (${getVariableType(invalidProp)}).
63
- Expected: (react component).
64
- `);
41
+ throw new Error("You are trying to pass a not valid \"".concat(validPropKey, "\" property for a global header, \n remember to provide both Logo and LogoWithBrand properties with a valid type.\n\n Received: ").concat(invalidProp, " (").concat(getVariableType(invalidProp), ").\n Expected: (react component).\n "));
65
42
  };
66
43
 
67
44
  export { breadcrumbProps, getVariableType, isObject, isValidToolbarType, throwBreadcrumbItemError, throwLogoError, throwToolbarAppPickerItemError, throwToolbarItemGenericError, throwToolbarPopupItemError, toolbarProps };
@@ -1,23 +1,25 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'core-js/modules/web.dom-collections.iterator.js';
2
3
  import { useState, useRef, useCallback, useMemo } from 'react';
3
4
  import { DSAppPicker } from '@elliemae/ds-app-picker';
4
- import MenuPicker from '@elliemae/ds-icons/MenuPicker';
5
+ import { MenuPicker } from '@elliemae/ds-icons';
5
6
  import { Button } from '../../components/Toolbar/styles.js';
6
7
  import { jsx } from 'react/jsx-runtime';
7
8
 
8
9
  var _MenuPicker;
9
- const AppPicker = ({
10
- label,
11
- apps,
12
- customApps,
13
- sectionTitle,
14
- customSectionTitle,
15
- onClick = () => null,
16
- actionRef,
17
- onKeyDown: customHandleOnKeyDown = () => null
18
- }) => {
10
+ const AppPicker = _ref => {
19
11
  var _DSAppPicker;
20
12
 
13
+ let {
14
+ label,
15
+ apps,
16
+ customApps,
17
+ sectionTitle,
18
+ customSectionTitle,
19
+ onClick = () => null,
20
+ actionRef,
21
+ onKeyDown: customHandleOnKeyDown = () => null
22
+ } = _ref;
21
23
  const [isOpen, setIsOpen] = useState(false);
22
24
  const buttonRef = useRef();
23
25
  const handleTriggerKeyDown = useCallback(e => {
@@ -39,22 +41,25 @@ const AppPicker = ({
39
41
  setIsOpen(true);
40
42
  onClick(e);
41
43
  }, [onClick]);
42
- const trigger = useMemo(() => ({
43
- ref
44
- }) => /*#__PURE__*/jsx("div", {
45
- ref: ref,
46
- children: /*#__PURE__*/jsx(Button, {
47
- onClick: handleOnClick,
48
- onKeyDown: handleTriggerKeyDown,
49
- ref: buttonRef,
50
- title: label,
51
- "data-testid": "gh-toolbar-item",
52
- children: _MenuPicker || (_MenuPicker = /*#__PURE__*/_jsx(MenuPicker, {
53
- fill: "#FFF",
54
- size: "m"
55
- }))
56
- })
57
- }), [handleOnClick, handleTriggerKeyDown, label]);
44
+ const trigger = useMemo(() => _ref2 => {
45
+ let {
46
+ ref
47
+ } = _ref2;
48
+ return /*#__PURE__*/jsx("div", {
49
+ ref: ref,
50
+ children: /*#__PURE__*/jsx(Button, {
51
+ onClick: handleOnClick,
52
+ onKeyDown: handleTriggerKeyDown,
53
+ ref: buttonRef,
54
+ title: label,
55
+ "data-testid": "gh-toolbar-item",
56
+ children: _MenuPicker || (_MenuPicker = /*#__PURE__*/_jsx(MenuPicker, {
57
+ fill: "#FFF",
58
+ size: "m"
59
+ }))
60
+ })
61
+ });
62
+ }, [handleOnClick, handleTriggerKeyDown, label]);
58
63
  return useMemo(() => _DSAppPicker || (_DSAppPicker = /*#__PURE__*/_jsx(DSAppPicker, {
59
64
  isOpen: isOpen,
60
65
  apps: apps,
@@ -1,19 +1,21 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'core-js/modules/web.dom-collections.iterator.js';
2
3
  import { useState, useRef, useCallback, useMemo } from 'react';
3
4
  import Popover from '@elliemae/ds-popover';
4
5
  import { PopupMenuContent } from './PopupMenuContent.js';
5
6
  import { Button } from '../../components/Toolbar/styles.js';
6
7
  import { jsx } from 'react/jsx-runtime';
7
8
 
8
- const PopupMenu = ({
9
- Icon,
10
- options,
11
- closeOnClick,
12
- title,
13
- onClick
14
- }) => {
9
+ const PopupMenu = _ref => {
15
10
  var _PopupMenuContent;
16
11
 
12
+ let {
13
+ Icon,
14
+ options,
15
+ closeOnClick,
16
+ title,
17
+ onClick
18
+ } = _ref;
17
19
  const [isOpen, setIsOpen] = useState(false);
18
20
  const buttonRef = useRef();
19
21
  const handleKeyPress = useCallback(e => {
@@ -40,20 +42,23 @@ const PopupMenu = ({
40
42
  onItemClick: handleItemClick,
41
43
  onClose: handleOnClose
42
44
  })), [options, handleItemClick, handleOnClose]);
43
- const trigger = useMemo(() => ({
44
- ref
45
- }) => /*#__PURE__*/jsx(Button, {
46
- onClick: handleTriggerOnClick,
47
- onKeyPress: handleKeyPress,
48
- title: title,
49
- ref: buttonRef,
50
- "data-testid": "gh-toolbar-item",
51
- children: /*#__PURE__*/_jsx(Icon, {
52
- innerRef: ref,
53
- fill: "#FFF",
54
- size: "m"
55
- })
56
- }), [Icon, handleKeyPress, handleTriggerOnClick, title]);
45
+ const trigger = useMemo(() => _ref2 => {
46
+ let {
47
+ ref
48
+ } = _ref2;
49
+ return /*#__PURE__*/jsx(Button, {
50
+ onClick: handleTriggerOnClick,
51
+ onKeyPress: handleKeyPress,
52
+ title: title,
53
+ ref: buttonRef,
54
+ "data-testid": "gh-toolbar-item",
55
+ children: /*#__PURE__*/_jsx(Icon, {
56
+ innerRef: ref,
57
+ fill: "#FFF",
58
+ size: "m"
59
+ })
60
+ });
61
+ }, [Icon, handleKeyPress, handleTriggerOnClick, title]);
57
62
  return useMemo(() => /*#__PURE__*/_jsx(Popover, {
58
63
  isOpen: isOpen,
59
64
  content: content,
@@ -1,14 +1,17 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'core-js/modules/esnext.async-iterator.map.js';
3
+ import 'core-js/modules/esnext.iterator.map.js';
2
4
  import React, { useContext, useRef, useEffect, useMemo } from 'react';
3
5
  import { ItemWrapper, Label, Separator, List } from './styles.js';
4
6
  import { GlobalHeaderContext } from '../../GlobalHeaderContext.js';
5
7
  import { jsx } from 'react/jsx-runtime';
6
8
 
7
- const PopupMenuContent = /*#__PURE__*/React.memo(({
8
- options,
9
- onItemClick,
10
- onClose
11
- }) => {
9
+ const PopupMenuContent = /*#__PURE__*/React.memo(_ref => {
10
+ let {
11
+ options,
12
+ onItemClick,
13
+ onClose
14
+ } = _ref;
12
15
  const {
13
16
  instanceUID
14
17
  } = useContext(GlobalHeaderContext);
@@ -40,19 +43,19 @@ const PopupMenuContent = /*#__PURE__*/React.memo(({
40
43
 
41
44
  switch (type) {
42
45
  case 'separator':
43
- return /*#__PURE__*/_jsx(Separator, {}, `${instanceUID}-separator-${label}`);
46
+ return /*#__PURE__*/_jsx(Separator, {}, "".concat(instanceUID, "-separator-").concat(label));
44
47
 
45
48
  case 'custom':
46
49
  return /*#__PURE__*/_jsx(ItemWrapper, {
47
50
  onClick: handleClick,
48
51
  onKeyDown: handleKeyDown
49
- }, `${instanceUID}-popup-${label}`, _Content || (_Content = /*#__PURE__*/_jsx(Content, {})));
52
+ }, "".concat(instanceUID, "-popup-").concat(label), _Content || (_Content = /*#__PURE__*/_jsx(Content, {})));
50
53
 
51
54
  default:
52
55
  return /*#__PURE__*/_jsx(ItemWrapper, {
53
56
  onClick: handleClick,
54
57
  onKeyDown: handleKeyDown
55
- }, `${instanceUID}-popup-${label}`, icon, Label && /*#__PURE__*/_jsx(Label, {}, void 0, label));
58
+ }, "".concat(instanceUID, "-popup-").concat(label), icon, Label && /*#__PURE__*/_jsx(Label, {}, void 0, label));
56
59
  }
57
60
  }), [onClose, onItemClick, options, instanceUID]);
58
61
  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
- theme
10
- }) => `1px solid ${theme.colors.brand[600]}`);
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
- theme
8
- }) => theme.colors.neutral['000']);
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-alpha.9",
3
+ "version": "2.0.0-next.11",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Global Header",
6
6
  "module": "./esm/index.js",
@@ -120,23 +120,22 @@
120
120
  "build": "node ../../scripts/build/build.js"
121
121
  },
122
122
  "dependencies": {
123
- "@elliemae/ds-app-picker": "2.0.0-alpha.9",
124
- "@elliemae/ds-classnames": "2.0.0-alpha.9",
125
- "@elliemae/ds-grid": "2.0.0-alpha.9",
126
- "@elliemae/ds-icons": "2.0.0-alpha.9",
127
- "@elliemae/ds-popover": "2.0.0-alpha.9",
128
- "@elliemae/ds-utilities": "2.0.0-alpha.9",
123
+ "@elliemae/ds-app-picker": "2.0.0-next.11",
124
+ "@elliemae/ds-classnames": "2.0.0-next.11",
125
+ "@elliemae/ds-grid": "2.0.0-next.11",
126
+ "@elliemae/ds-icons": "2.0.0-next.11",
127
+ "@elliemae/ds-popover": "2.0.0-next.11",
129
128
  "react-desc": "~4.1.3",
130
129
  "uid": "~2.0.0"
131
130
  },
132
131
  "devDependencies": {
133
- "styled-components": "~5.3.1"
132
+ "styled-components": "~5.3.3"
134
133
  },
135
134
  "peerDependencies": {
136
135
  "lodash": "^4.17.21",
137
136
  "react": "^17.0.2",
138
137
  "react-dom": "^17.0.2",
139
- "styled-components": "^5.3.1"
138
+ "styled-components": "^5.3.3"
140
139
  },
141
140
  "publishConfig": {
142
141
  "access": "public",
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<unknown>>, any, {}, never>;
2
+ export declare const Wrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
package/cjs/package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "type": "commonjs",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ]
7
- }
package/esm/package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "type": "module",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ]
7
- }