@elliemae/ds-global-header 2.2.0-alpha.2 → 2.2.0-next.1

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 (105) hide show
  1. package/cjs/GlobalHeader.js +35 -55
  2. package/cjs/GlobalHeaderContainer.js +23 -40
  3. package/cjs/GlobalHeaderContext.js +13 -39
  4. package/cjs/GlobalHeaderTypes.js +2 -27
  5. package/cjs/components/Breadcrumb/GlobalHeaderBreadcrumb.js +59 -59
  6. package/cjs/components/Breadcrumb/PureBreadcrumb.js +59 -50
  7. package/cjs/components/Breadcrumb/styles.js +58 -82
  8. package/cjs/components/Title/GlobalHeaderTitle.js +24 -43
  9. package/cjs/components/Toolbar/GlobalHeaderToolbar.js +22 -41
  10. package/cjs/components/Toolbar/ToolbarItems.js +94 -83
  11. package/cjs/components/Toolbar/styles.js +24 -60
  12. package/cjs/config/useGetPropsWithDefaults.js +30 -42
  13. package/cjs/config/useGlobalHeader.js +30 -44
  14. package/cjs/config/useValidateProps.js +64 -81
  15. package/cjs/config/validateHelpers.js +41 -95
  16. package/cjs/defaultProps.js +7 -34
  17. package/cjs/index.js +11 -36
  18. package/cjs/outOfTheBox/AppPicker/AppPicker.js +90 -83
  19. package/cjs/outOfTheBox/PopupMenu/PopupMenu.js +75 -70
  20. package/cjs/outOfTheBox/PopupMenu/PopupMenuContent.js +83 -76
  21. package/cjs/outOfTheBox/PopupMenu/styles.js +31 -66
  22. package/cjs/outOfTheBox/SearchToggle/SearchToggle.js +85 -80
  23. package/cjs/outOfTheBox/SearchToggle/styles.js +9 -76
  24. package/cjs/outOfTheBox/index.js +13 -30
  25. package/cjs/propTypes.js +25 -52
  26. package/cjs/styles.js +20 -42
  27. package/esm/GlobalHeader.js +21 -21
  28. package/esm/GlobalHeaderContainer.js +15 -11
  29. package/esm/GlobalHeaderContext.js +8 -9
  30. package/esm/GlobalHeaderTypes.js +1 -2
  31. package/esm/components/Breadcrumb/GlobalHeaderBreadcrumb.js +45 -26
  32. package/esm/components/Breadcrumb/PureBreadcrumb.js +49 -22
  33. package/esm/components/Breadcrumb/styles.js +48 -54
  34. package/esm/components/Title/GlobalHeaderTitle.js +15 -13
  35. package/esm/components/Toolbar/GlobalHeaderToolbar.js +14 -12
  36. package/esm/components/Toolbar/ToolbarItems.js +83 -53
  37. package/esm/components/Toolbar/styles.js +17 -32
  38. package/esm/config/useGetPropsWithDefaults.js +22 -13
  39. package/esm/config/useGlobalHeader.js +19 -12
  40. package/esm/config/useValidateProps.js +58 -58
  41. package/esm/config/validateHelpers.js +28 -66
  42. package/esm/defaultProps.js +3 -5
  43. package/esm/index.js +1 -7
  44. package/esm/outOfTheBox/AppPicker/AppPicker.js +76 -50
  45. package/esm/outOfTheBox/PopupMenu/PopupMenu.js +61 -37
  46. package/esm/outOfTheBox/PopupMenu/PopupMenuContent.js +71 -45
  47. package/esm/outOfTheBox/PopupMenu/styles.js +21 -38
  48. package/esm/outOfTheBox/SearchToggle/SearchToggle.js +70 -46
  49. package/esm/outOfTheBox/SearchToggle/styles.js +5 -51
  50. package/esm/outOfTheBox/index.js +3 -5
  51. package/esm/propTypes.js +17 -21
  52. package/esm/styles.js +13 -14
  53. package/package.json +7 -7
  54. package/cjs/GlobalHeader.js.map +0 -7
  55. package/cjs/GlobalHeaderContainer.js.map +0 -7
  56. package/cjs/GlobalHeaderContext.js.map +0 -7
  57. package/cjs/GlobalHeaderTypes.js.map +0 -7
  58. package/cjs/components/Breadcrumb/GlobalHeaderBreadcrumb.js.map +0 -7
  59. package/cjs/components/Breadcrumb/PureBreadcrumb.js.map +0 -7
  60. package/cjs/components/Breadcrumb/styles.js.map +0 -7
  61. package/cjs/components/Title/GlobalHeaderTitle.js.map +0 -7
  62. package/cjs/components/Toolbar/GlobalHeaderToolbar.js.map +0 -7
  63. package/cjs/components/Toolbar/ToolbarItems.js.map +0 -7
  64. package/cjs/components/Toolbar/styles.js.map +0 -7
  65. package/cjs/config/useGetPropsWithDefaults.js.map +0 -7
  66. package/cjs/config/useGlobalHeader.js.map +0 -7
  67. package/cjs/config/useValidateProps.js.map +0 -7
  68. package/cjs/config/validateHelpers.js.map +0 -7
  69. package/cjs/defaultProps.js.map +0 -7
  70. package/cjs/index.js.map +0 -7
  71. package/cjs/outOfTheBox/AppPicker/AppPicker.js.map +0 -7
  72. package/cjs/outOfTheBox/PopupMenu/PopupMenu.js.map +0 -7
  73. package/cjs/outOfTheBox/PopupMenu/PopupMenuContent.js.map +0 -7
  74. package/cjs/outOfTheBox/PopupMenu/styles.js.map +0 -7
  75. package/cjs/outOfTheBox/SearchToggle/SearchToggle.js.map +0 -7
  76. package/cjs/outOfTheBox/SearchToggle/styles.js.map +0 -7
  77. package/cjs/outOfTheBox/index.js.map +0 -7
  78. package/cjs/propTypes.js.map +0 -7
  79. package/cjs/styles.js.map +0 -7
  80. package/esm/GlobalHeader.js.map +0 -7
  81. package/esm/GlobalHeaderContainer.js.map +0 -7
  82. package/esm/GlobalHeaderContext.js.map +0 -7
  83. package/esm/GlobalHeaderTypes.js.map +0 -7
  84. package/esm/components/Breadcrumb/GlobalHeaderBreadcrumb.js.map +0 -7
  85. package/esm/components/Breadcrumb/PureBreadcrumb.js.map +0 -7
  86. package/esm/components/Breadcrumb/styles.js.map +0 -7
  87. package/esm/components/Title/GlobalHeaderTitle.js.map +0 -7
  88. package/esm/components/Toolbar/GlobalHeaderToolbar.js.map +0 -7
  89. package/esm/components/Toolbar/ToolbarItems.js.map +0 -7
  90. package/esm/components/Toolbar/styles.js.map +0 -7
  91. package/esm/config/useGetPropsWithDefaults.js.map +0 -7
  92. package/esm/config/useGlobalHeader.js.map +0 -7
  93. package/esm/config/useValidateProps.js.map +0 -7
  94. package/esm/config/validateHelpers.js.map +0 -7
  95. package/esm/defaultProps.js.map +0 -7
  96. package/esm/index.js.map +0 -7
  97. package/esm/outOfTheBox/AppPicker/AppPicker.js.map +0 -7
  98. package/esm/outOfTheBox/PopupMenu/PopupMenu.js.map +0 -7
  99. package/esm/outOfTheBox/PopupMenu/PopupMenuContent.js.map +0 -7
  100. package/esm/outOfTheBox/PopupMenu/styles.js.map +0 -7
  101. package/esm/outOfTheBox/SearchToggle/SearchToggle.js.map +0 -7
  102. package/esm/outOfTheBox/SearchToggle/styles.js.map +0 -7
  103. package/esm/outOfTheBox/index.js.map +0 -7
  104. package/esm/propTypes.js.map +0 -7
  105. package/esm/styles.js.map +0 -7
@@ -1,12 +1,16 @@
1
- import * as React from "react";
2
- import React2 from "react";
3
- import { Wrapper } from "./styles";
4
- const GlobalHeaderContainer = ({ children }) => /* @__PURE__ */ React2.createElement("header", {
5
- "data-testid": "ds-global-header"
6
- }, /* @__PURE__ */ React2.createElement(Wrapper, {
7
- cols: ["auto", "1fr", "auto"]
8
- }, children));
9
- export {
10
- GlobalHeaderContainer
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'react';
3
+ import { Wrapper } from './styles.js';
4
+
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));
11
14
  };
12
- //# sourceMappingURL=GlobalHeaderContainer.js.map
15
+
16
+ export { GlobalHeaderContainer };
@@ -1,17 +1,16 @@
1
- import * as React from "react";
2
- import { createContext } from "react";
3
- import { defaultProps } from "./defaultProps";
1
+ import { createContext } from 'react';
2
+ import { defaultProps } from './defaultProps.js';
3
+
4
4
  const noop = () => null;
5
+
5
6
  const defaultContext = {
6
7
  props: defaultProps,
7
8
  showIconOnly: false,
8
9
  setShowIconOnly: noop,
9
- instanceUID: "",
10
+ instanceUID: '',
10
11
  globalHeaderToolbarGrid: [],
11
12
  globalHeaderBreadcrumbGrid: []
12
13
  };
13
- const GlobalHeaderContext = createContext(defaultContext);
14
- export {
15
- GlobalHeaderContext
16
- };
17
- //# sourceMappingURL=GlobalHeaderContext.js.map
14
+ const GlobalHeaderContext = /*#__PURE__*/createContext(defaultContext);
15
+
16
+ export { GlobalHeaderContext };
@@ -1,2 +1 @@
1
- import * as React from "react";
2
- //# sourceMappingURL=GlobalHeaderTypes.js.map
1
+
@@ -1,12 +1,30 @@
1
- import * as React from "react";
2
- import React2, { useEffect, useContext, useRef } from "react";
3
- import { Grid } from "@elliemae/ds-grid";
4
- import { Pipe } from "./styles";
5
- import { GlobalHeaderContext } from "../../GlobalHeaderContext";
6
- import { PureBreadcrumb } from "./PureBreadcrumb";
1
+ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
+ import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
3
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
4
+ import 'core-js/modules/esnext.async-iterator.map.js';
5
+ import 'core-js/modules/esnext.iterator.map.js';
6
+ import 'core-js/modules/esnext.async-iterator.filter.js';
7
+ import 'core-js/modules/esnext.iterator.constructor.js';
8
+ import 'core-js/modules/esnext.iterator.filter.js';
9
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
10
+ import 'core-js/modules/esnext.iterator.for-each.js';
11
+ import { useContext, useRef, useEffect } from 'react';
12
+ import { Grid } from '@elliemae/ds-grid';
13
+ import { Pipe } from './styles.js';
14
+ import { GlobalHeaderContext } from '../../GlobalHeaderContext.js';
15
+ import { PureBreadcrumb } from './PureBreadcrumb.js';
16
+ import { jsx } from 'react/jsx-runtime';
17
+
18
+ const _excluded = ["label"];
19
+
20
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
21
+
22
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
7
23
  const GlobalHeaderBreadcrumb = () => {
8
24
  const {
9
- props: { breadcrumb },
25
+ props: {
26
+ breadcrumb
27
+ },
10
28
  instanceUID,
11
29
  showIconOnly,
12
30
  setShowIconOnly,
@@ -16,7 +34,7 @@ const GlobalHeaderBreadcrumb = () => {
16
34
  const flexRegion = useRef(null);
17
35
  useEffect(() => {
18
36
  const evaluateShowIconOnly = () => {
19
- if (flexRegion && flexRegion.current && flexRegion?.current.offsetWidth <= 0 && !breakpoint.current) {
37
+ if (flexRegion && flexRegion.current && (flexRegion === null || flexRegion === void 0 ? void 0 : flexRegion.current.offsetWidth) <= 0 && !breakpoint.current) {
20
38
  setShowIconOnly(true);
21
39
  breakpoint.current = window.innerWidth;
22
40
  } else if (breakpoint && breakpoint.current !== null && window.innerWidth >= breakpoint.current) {
@@ -24,33 +42,34 @@ const GlobalHeaderBreadcrumb = () => {
24
42
  breakpoint.current = null;
25
43
  }
26
44
  };
45
+
27
46
  evaluateShowIconOnly();
28
- window.addEventListener("resize", evaluateShowIconOnly);
29
- return () => window.removeEventListener("resize", evaluateShowIconOnly);
47
+ window.addEventListener('resize', evaluateShowIconOnly);
48
+ return () => window.removeEventListener('resize', evaluateShowIconOnly);
30
49
  }, [breakpoint, flexRegion, setShowIconOnly]);
31
- return /* @__PURE__ */ React2.createElement(Grid, {
50
+ return /*#__PURE__*/_jsx(Grid, {
32
51
  height: "100%",
33
52
  alignItems: "center",
34
53
  justifyContent: "flex-start",
35
54
  "aria-label": "breadcrumbs",
36
55
  cols: globalHeaderBreadcrumbGrid,
37
56
  role: "navigation"
38
- }, /* @__PURE__ */ React2.createElement(Pipe, {
39
- showIconOnly
40
- }), breadcrumb?.map((item) => {
41
- const { label, ...rest } = item;
42
- return /* @__PURE__ */ React2.createElement(PureBreadcrumb, {
43
- label,
44
- length: breadcrumb.length,
45
- key: `${instanceUID}-breadcrumb-item-${label}`,
46
- ...rest
47
- });
48
- }), /* @__PURE__ */ React2.createElement("div", {
57
+ }, void 0, /*#__PURE__*/_jsx(Pipe, {
58
+ showIconOnly: showIconOnly
59
+ }), breadcrumb === null || breadcrumb === void 0 ? void 0 : breadcrumb.map(item => {
60
+ const {
61
+ label
62
+ } = item,
63
+ rest = _objectWithoutProperties(item, _excluded);
64
+
65
+ return /*#__PURE__*/jsx(PureBreadcrumb, _objectSpread({
66
+ label: label,
67
+ length: breadcrumb.length
68
+ }, rest), "".concat(instanceUID, "-breadcrumb-item-").concat(label));
69
+ }), /*#__PURE__*/jsx("div", {
49
70
  id: "global-header-flex-region",
50
71
  ref: flexRegion
51
72
  }));
52
73
  };
53
- export {
54
- GlobalHeaderBreadcrumb
55
- };
56
- //# sourceMappingURL=GlobalHeaderBreadcrumb.js.map
74
+
75
+ export { GlobalHeaderBreadcrumb };
@@ -1,22 +1,49 @@
1
- import * as React from "react";
2
- import React2 from "react";
3
- import { ChevronSmallRight } from "@elliemae/ds-icons";
4
- import { getDataProps } from "@elliemae/ds-props-helpers";
5
- import { BreadcrumbItem, LabelButton, Label } from "./styles";
6
- const PureBreadcrumb = React2.memo(({ onClick, isSelected, length, label, hasNext, id, ...rest }) => /* @__PURE__ */ React2.createElement(BreadcrumbItem, null, /* @__PURE__ */ React2.createElement(LabelButton, {
7
- onClick,
8
- "aria-selected": isSelected,
9
- "data-testid": "gh-breadcrumb-btn",
10
- id,
11
- ...getDataProps(rest)
12
- }, /* @__PURE__ */ React2.createElement(Label, {
13
- isSelected: !!isSelected,
14
- isOnlyItem: length === 1
15
- }, label)), hasNext && /* @__PURE__ */ React2.createElement(ChevronSmallRight, {
16
- size: "m",
17
- fill: "#FFF"
18
- })));
19
- export {
20
- PureBreadcrumb
21
- };
22
- //# sourceMappingURL=PureBreadcrumb.js.map
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';
6
+ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
7
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
8
+ import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
9
+ import React from 'react';
10
+ import { ChevronSmallRight } from '@elliemae/ds-icons';
11
+ import { getDataProps } from '@elliemae/ds-props-helpers';
12
+ import { BreadcrumbItem, LabelButton, Label } from './styles.js';
13
+ import { jsx } from 'react/jsx-runtime';
14
+
15
+ var _ChevronSmallRight;
16
+
17
+ const _excluded = ["onClick", "isSelected", "length", "label", "hasNext", "id"];
18
+
19
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
20
+
21
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
22
+ const PureBreadcrumb = /*#__PURE__*/React.memo(_ref => {
23
+ let {
24
+ onClick,
25
+ isSelected,
26
+ length,
27
+ label,
28
+ hasNext,
29
+ id
30
+ } = _ref,
31
+ rest = _objectWithoutProperties(_ref, _excluded);
32
+
33
+ return /*#__PURE__*/_jsx(BreadcrumbItem, {}, void 0, /*#__PURE__*/jsx(LabelButton, _objectSpread(_objectSpread({
34
+ onClick: onClick,
35
+ "aria-selected": isSelected,
36
+ "data-testid": "gh-breadcrumb-btn",
37
+ id: id
38
+ }, getDataProps(rest)), {}, {
39
+ children: /*#__PURE__*/_jsx(Label, {
40
+ isSelected: !!isSelected,
41
+ isOnlyItem: length === 1
42
+ }, void 0, label)
43
+ })), hasNext && (_ChevronSmallRight || (_ChevronSmallRight = /*#__PURE__*/_jsx(ChevronSmallRight, {
44
+ size: "m",
45
+ fill: "#FFF"
46
+ }))));
47
+ });
48
+
49
+ export { PureBreadcrumb };
@@ -1,54 +1,48 @@
1
- import * as React from "react";
2
- import styled from "styled-components";
3
- const Pipe = styled.span`
4
- margin: 0 7px 0 0;
5
- border-left: ${({ showIconOnly }) => showIconOnly ? "none" : "1px solid #fff"};
6
- height: 20px;
7
- `;
8
- const BreadcrumbItem = styled.div`
9
- display: flex;
10
- align-items: center;
11
- height: 100%;
12
- `;
13
- const LabelButton = styled.button`
14
- width: fit-content;
15
- height: 100%;
16
- margin: 0;
17
- padding: 0;
18
- border: 1px solid transparent;
19
- background-color: transparent;
20
- outline: none;
21
- cursor: pointer;
22
- position: relative;
23
- &:focus {
24
- :before {
25
- content: '';
26
- position: absolute;
27
- z-index: 2;
28
- top: 2px;
29
- left: -5px;
30
- width: calc(100% + 10px);
31
- height: calc(100% - 4px);
32
- border: 2px solid ${({ theme }) => theme.colors.neutral["000"]};
33
- border-radius: 4px;
34
- }
35
- }
36
- `;
37
- const Label = styled.p`
38
- color: ${({ theme }) => theme.colors.neutral["000"]};
39
- ${({ theme, isSelected }) => `-webkit-text-stroke: 0.4px ${isSelected ? theme.colors.neutral["000"] : "transparent"}`};
40
- font-size: 16px;
41
- text-transform: uppercase;
42
- border-bottom: ${({ isSelected, isOnlyItem }) => `2px solid ${isSelected && !isOnlyItem ? "#FFF" : "transparent"}`};
43
- margin: 3px 5px 0 5px;
44
- :hover {
45
- ${({ theme }) => `-webkit-text-stroke: 0.4px ${theme.colors.neutral["000"]}`};
46
- }
47
- `;
48
- export {
49
- BreadcrumbItem,
50
- Label,
51
- LabelButton,
52
- Pipe
53
- };
54
- //# sourceMappingURL=styles.js.map
1
+ import styled from 'styled-components';
2
+
3
+ const Pipe = /*#__PURE__*/styled.span.withConfig({
4
+ componentId: "sc-1n5l527-0"
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
+ });
11
+ const BreadcrumbItem = /*#__PURE__*/styled.div.withConfig({
12
+ componentId: "sc-1n5l527-1"
13
+ })(["display:flex;align-items:center;height:100%;"]);
14
+ const LabelButton = /*#__PURE__*/styled.button.withConfig({
15
+ componentId: "sc-1n5l527-2"
16
+ })(["width:fit-content;height:100%;margin:0;padding:0;border:1px solid transparent;background-color:transparent;outline:none;cursor:pointer;position:relative;&:focus{: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.neutral['000'];
21
+ });
22
+ const Label = /*#__PURE__*/styled.p.withConfig({
23
+ componentId: "sc-1n5l527-3"
24
+ })(["color:", ";", ";font-size:16px;text-transform:uppercase;border-bottom:", ";margin:3px 5px 0 5px;:hover{", ";}"], _ref3 => {
25
+ let {
26
+ theme
27
+ } = _ref3;
28
+ return theme.colors.neutral['000'];
29
+ }, _ref4 => {
30
+ let {
31
+ theme,
32
+ isSelected
33
+ } = _ref4;
34
+ return "-webkit-text-stroke: 0.4px ".concat(isSelected ? theme.colors.neutral['000'] : 'transparent');
35
+ }, _ref5 => {
36
+ let {
37
+ isSelected,
38
+ isOnlyItem
39
+ } = _ref5;
40
+ return "2px solid ".concat(isSelected && !isOnlyItem ? '#FFF' : 'transparent');
41
+ }, _ref6 => {
42
+ let {
43
+ theme
44
+ } = _ref6;
45
+ return "-webkit-text-stroke: 0.4px ".concat(theme.colors.neutral['000']);
46
+ });
47
+
48
+ export { BreadcrumbItem, Label, LabelButton, Pipe };
@@ -1,19 +1,21 @@
1
- import * as React from "react";
2
- import React2, { useContext } from "react";
3
- import { Grid } from "@elliemae/ds-grid";
4
- import { GlobalHeaderContext } from "../../GlobalHeaderContext";
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import { useContext } from 'react';
3
+ import { Grid } from '@elliemae/ds-grid';
4
+ import { GlobalHeaderContext } from '../../GlobalHeaderContext.js';
5
+
5
6
  const GlobalHeaderTitle = () => {
6
7
  const {
7
- props: { Logo, LogoWithBrand },
8
+ props: {
9
+ Logo,
10
+ LogoWithBrand
11
+ },
8
12
  showIconOnly
9
13
  } = useContext(GlobalHeaderContext);
10
- return /* @__PURE__ */ React2.createElement(Grid, {
14
+ return /*#__PURE__*/_jsx(Grid, {
11
15
  alignItems: "center",
12
- pr: showIconOnly ? "0px" : "36px",
13
- cols: showIconOnly ? ["auto"] : ["auto", "1fr"]
14
- }, Logo && showIconOnly && /* @__PURE__ */ React2.createElement(Logo, null), LogoWithBrand && !showIconOnly && /* @__PURE__ */ React2.createElement(LogoWithBrand, null));
16
+ pr: showIconOnly ? '0px' : '36px',
17
+ cols: showIconOnly ? ['auto'] : ['auto', '1fr']
18
+ }, void 0, Logo && showIconOnly && /*#__PURE__*/_jsx(Logo, {}), LogoWithBrand && !showIconOnly && /*#__PURE__*/_jsx(LogoWithBrand, {}));
15
19
  };
16
- export {
17
- GlobalHeaderTitle
18
- };
19
- //# sourceMappingURL=GlobalHeaderTitle.js.map
20
+
21
+ export { GlobalHeaderTitle };
@@ -1,20 +1,22 @@
1
- import * as React from "react";
2
- import React2, { useContext } from "react";
3
- import { Grid } from "@elliemae/ds-grid";
4
- import { ToolbarItems } from "./ToolbarItems";
5
- import { GlobalHeaderContext } from "../../GlobalHeaderContext";
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import { useContext } from 'react';
3
+ import { Grid } from '@elliemae/ds-grid';
4
+ import { ToolbarItems } from './ToolbarItems.js';
5
+ import { GlobalHeaderContext } from '../../GlobalHeaderContext.js';
6
+
7
+ var _ToolbarItems;
6
8
  const GlobalHeaderToolbar = () => {
7
- const { globalHeaderToolbarGrid } = useContext(GlobalHeaderContext);
8
- return /* @__PURE__ */ React2.createElement(Grid, {
9
+ const {
10
+ globalHeaderToolbarGrid
11
+ } = useContext(GlobalHeaderContext);
12
+ return /*#__PURE__*/_jsx(Grid, {
9
13
  height: "100%",
10
14
  alignItems: "center",
11
15
  justifyContent: "center",
12
16
  gutter: "xxs",
13
17
  cols: globalHeaderToolbarGrid,
14
18
  role: "toolbar"
15
- }, /* @__PURE__ */ React2.createElement(ToolbarItems, null));
19
+ }, void 0, _ToolbarItems || (_ToolbarItems = /*#__PURE__*/_jsx(ToolbarItems, {})));
16
20
  };
17
- export {
18
- GlobalHeaderToolbar
19
- };
20
- //# sourceMappingURL=GlobalHeaderToolbar.js.map
21
+
22
+ export { GlobalHeaderToolbar };
@@ -1,67 +1,97 @@
1
- import * as React from "react";
2
- import React2, { useContext, useMemo } from "react";
3
- import { AppPicker, PopupMenu, SearchToggle } from "../../outOfTheBox";
4
- import { Button } from "./styles";
5
- import { GlobalHeaderContext } from "../../GlobalHeaderContext";
6
- import { getDataProps } from "@elliemae/ds-props-helpers";
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
3
+ import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
4
+ import 'core-js/modules/esnext.async-iterator.map.js';
5
+ import 'core-js/modules/esnext.iterator.map.js';
6
+ import 'core-js/modules/esnext.async-iterator.filter.js';
7
+ import 'core-js/modules/esnext.iterator.constructor.js';
8
+ import 'core-js/modules/esnext.iterator.filter.js';
9
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
10
+ import 'core-js/modules/esnext.iterator.for-each.js';
11
+ import { useContext, useMemo } from 'react';
12
+ import { AppPicker } from '../../outOfTheBox/AppPicker/AppPicker.js';
13
+ import { PopupMenu } from '../../outOfTheBox/PopupMenu/PopupMenu.js';
14
+ import { SearchToggle } from '../../outOfTheBox/SearchToggle/SearchToggle.js';
15
+ import { Button } from './styles.js';
16
+ import { GlobalHeaderContext } from '../../GlobalHeaderContext.js';
17
+ import { getDataProps } from '@elliemae/ds-props-helpers';
18
+ import { jsx, Fragment } from 'react/jsx-runtime';
19
+
20
+ const _excluded = ["Icon", "type", "onClick", "componentProps", "label", "onKeyPress", "id", "CustomComponent"];
21
+
22
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
23
+
24
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
7
25
  const ToolbarItems = () => {
8
26
  const {
9
- props: { toolbar },
27
+ props: {
28
+ toolbar
29
+ },
10
30
  instanceUID
11
31
  } = useContext(GlobalHeaderContext);
12
- console.log(`toolbar`, toolbar);
13
- const itemsList = useMemo(() => toolbar?.map((item) => {
14
- const { Icon, type, onClick, componentProps, label, onKeyPress, id, CustomComponent, ...otherProps } = item;
32
+ const itemsList = useMemo(() => toolbar === null || toolbar === void 0 ? void 0 : toolbar.map(item => {
33
+ var _Icon;
34
+
35
+ const {
36
+ Icon,
37
+ type,
38
+ onClick,
39
+ componentProps,
40
+ label,
41
+ onKeyPress,
42
+ id,
43
+ CustomComponent
44
+ } = item,
45
+ otherProps = _objectWithoutProperties(item, _excluded);
46
+
15
47
  switch (type) {
16
- case "ds-popup-menu":
17
- return /* @__PURE__ */ React2.createElement(PopupMenu, {
48
+ case 'ds-popup-menu':
49
+ return /*#__PURE__*/jsx(PopupMenu, _objectSpread(_objectSpread({
18
50
  title: label,
19
- Icon,
20
- onClick,
21
- onKeyPress,
22
- id,
23
- key: `${instanceUID}-ds-popup-menu-${label}`,
24
- ...otherProps,
25
- componentProps
51
+ Icon: Icon,
52
+ onClick: onClick,
53
+ onKeyPress: onKeyPress,
54
+ id: id
55
+ }, otherProps), {}, {
56
+ componentProps: componentProps
57
+ }), "".concat(instanceUID, "-ds-popup-menu-").concat(label));
58
+
59
+ case 'ds-app-picker':
60
+ return /*#__PURE__*/jsx(AppPicker, _objectSpread({
61
+ label: label,
62
+ id: id,
63
+ componentProps: componentProps
64
+ }, otherProps), "".concat(instanceUID, "-ds-app-picker-").concat(label));
65
+
66
+ case 'ds-search-toggle':
67
+ return /*#__PURE__*/jsx(SearchToggle, _objectSpread({
68
+ id: id,
69
+ componentProps: componentProps
70
+ }, otherProps), "".concat(instanceUID, "-ds-search-toggle-").concat(id));
71
+
72
+ case 'custom':
73
+ if (CustomComponent) return /*#__PURE__*/_jsx(CustomComponent, {
74
+ item: item
26
75
  });
27
- case "ds-app-picker":
28
- return /* @__PURE__ */ React2.createElement(AppPicker, {
29
- label,
30
- key: `${instanceUID}-ds-app-picker-${label}`,
31
- id,
32
- componentProps,
33
- ...otherProps
34
- });
35
- case "ds-search-toggle":
36
- return /* @__PURE__ */ React2.createElement(SearchToggle, {
37
- key: `${instanceUID}-ds-search-toggle-${id}`,
38
- id,
39
- componentProps,
40
- ...otherProps
41
- });
42
- case "custom":
43
- if (CustomComponent)
44
- return /* @__PURE__ */ React2.createElement(CustomComponent, {
45
- item
46
- });
47
76
  return null;
77
+
48
78
  default:
49
- return /* @__PURE__ */ React2.createElement(Button, {
50
- onClick,
51
- key: `${instanceUID}-ds-toolbar-button-${label}`,
79
+ return /*#__PURE__*/jsx(Button, _objectSpread(_objectSpread({
80
+ onClick: onClick,
52
81
  title: label,
53
82
  "data-testid": "gh-toolbar-item",
54
- id,
55
- ...getDataProps(otherProps)
56
- }, /* @__PURE__ */ React2.createElement(Icon, {
57
- fill: "#FFF",
58
- size: "m"
59
- }));
83
+ id: id
84
+ }, getDataProps(otherProps)), {}, {
85
+ children: _Icon || (_Icon = /*#__PURE__*/_jsx(Icon, {
86
+ fill: "#FFF",
87
+ size: "m"
88
+ }))
89
+ }), "".concat(instanceUID, "-ds-toolbar-button-").concat(label));
60
90
  }
61
91
  }), [toolbar, instanceUID]);
62
- return /* @__PURE__ */ React2.createElement(React2.Fragment, null, itemsList);
63
- };
64
- export {
65
- ToolbarItems
92
+ return /*#__PURE__*/jsx(Fragment, {
93
+ children: itemsList
94
+ });
66
95
  };
67
- //# sourceMappingURL=ToolbarItems.js.map
96
+
97
+ export { ToolbarItems };
@@ -1,32 +1,17 @@
1
- import * as React from "react";
2
- import styled from "styled-components";
3
- const Button = styled.button`
4
- height: 40px;
5
- width: 40px;
6
- border: none;
7
- background-color: transparent;
8
- cursor: pointer;
9
- position: relative;
10
- outline: none;
11
- &:hover:not(:focus) {
12
- background-color: ${({ theme }) => theme.colors.brand[700]};
13
- outline: none;
14
- }
15
- &:focus {
16
- :before {
17
- content: '';
18
- position: absolute;
19
- z-index: 2;
20
- top: 2px;
21
- left: 2px;
22
- width: calc(100% - 4px);
23
- height: calc(100% - 4px);
24
- border: 2px solid ${({ theme }) => theme.colors.neutral["000"]};
25
- border-radius: 4px;
26
- }
27
- }
28
- `;
29
- export {
30
- Button
31
- };
32
- //# sourceMappingURL=styles.js.map
1
+ import styled from 'styled-components';
2
+
3
+ const Button = /*#__PURE__*/styled.button.withConfig({
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{: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.neutral['000'];
15
+ });
16
+
17
+ export { Button };