@elliemae/ds-global-header 2.2.0 → 2.3.0-alpha.3
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/GlobalHeader.js +55 -35
- package/cjs/GlobalHeader.js.map +7 -0
- package/cjs/GlobalHeaderContainer.js +40 -23
- package/cjs/GlobalHeaderContainer.js.map +7 -0
- package/cjs/GlobalHeaderContext.js +39 -13
- package/cjs/GlobalHeaderContext.js.map +7 -0
- package/cjs/GlobalHeaderTypes.js +27 -2
- package/cjs/GlobalHeaderTypes.js.map +7 -0
- package/cjs/components/Breadcrumb/GlobalHeaderBreadcrumb.js +59 -59
- package/cjs/components/Breadcrumb/GlobalHeaderBreadcrumb.js.map +7 -0
- package/cjs/components/Breadcrumb/PureBreadcrumb.js +50 -59
- package/cjs/components/Breadcrumb/PureBreadcrumb.js.map +7 -0
- package/cjs/components/Breadcrumb/styles.js +82 -58
- package/cjs/components/Breadcrumb/styles.js.map +7 -0
- package/cjs/components/Title/GlobalHeaderTitle.js +43 -24
- package/cjs/components/Title/GlobalHeaderTitle.js.map +7 -0
- package/cjs/components/Toolbar/GlobalHeaderToolbar.js +41 -22
- package/cjs/components/Toolbar/GlobalHeaderToolbar.js.map +7 -0
- package/cjs/components/Toolbar/ToolbarItems.js +83 -94
- package/cjs/components/Toolbar/ToolbarItems.js.map +7 -0
- package/cjs/components/Toolbar/styles.js +60 -24
- package/cjs/components/Toolbar/styles.js.map +7 -0
- package/cjs/config/useGetPropsWithDefaults.js +42 -30
- package/cjs/config/useGetPropsWithDefaults.js.map +7 -0
- package/cjs/config/useGlobalHeader.js +44 -30
- package/cjs/config/useGlobalHeader.js.map +7 -0
- package/cjs/config/useValidateProps.js +81 -64
- package/cjs/config/useValidateProps.js.map +7 -0
- package/cjs/config/validateHelpers.js +95 -41
- package/cjs/config/validateHelpers.js.map +7 -0
- package/cjs/defaultProps.js +34 -7
- package/cjs/defaultProps.js.map +7 -0
- package/cjs/index.js +36 -11
- package/cjs/index.js.map +7 -0
- package/cjs/outOfTheBox/AppPicker/AppPicker.js +83 -90
- package/cjs/outOfTheBox/AppPicker/AppPicker.js.map +7 -0
- package/cjs/outOfTheBox/PopupMenu/PopupMenu.js +70 -75
- package/cjs/outOfTheBox/PopupMenu/PopupMenu.js.map +7 -0
- package/cjs/outOfTheBox/PopupMenu/PopupMenuContent.js +76 -83
- package/cjs/outOfTheBox/PopupMenu/PopupMenuContent.js.map +7 -0
- package/cjs/outOfTheBox/PopupMenu/styles.js +66 -31
- package/cjs/outOfTheBox/PopupMenu/styles.js.map +7 -0
- package/cjs/outOfTheBox/SearchToggle/SearchToggle.js +80 -85
- package/cjs/outOfTheBox/SearchToggle/SearchToggle.js.map +7 -0
- package/cjs/outOfTheBox/SearchToggle/styles.js +76 -9
- package/cjs/outOfTheBox/SearchToggle/styles.js.map +7 -0
- package/cjs/outOfTheBox/index.js +30 -13
- package/cjs/outOfTheBox/index.js.map +7 -0
- package/cjs/propTypes.js +52 -25
- package/cjs/propTypes.js.map +7 -0
- package/cjs/styles.js +42 -20
- package/cjs/styles.js.map +7 -0
- package/esm/GlobalHeader.js +21 -21
- package/esm/GlobalHeader.js.map +7 -0
- package/esm/GlobalHeaderContainer.js +11 -15
- package/esm/GlobalHeaderContainer.js.map +7 -0
- package/esm/GlobalHeaderContext.js +9 -8
- package/esm/GlobalHeaderContext.js.map +7 -0
- package/esm/GlobalHeaderTypes.js +2 -1
- package/esm/GlobalHeaderTypes.js.map +7 -0
- package/esm/components/Breadcrumb/GlobalHeaderBreadcrumb.js +26 -45
- package/esm/components/Breadcrumb/GlobalHeaderBreadcrumb.js.map +7 -0
- package/esm/components/Breadcrumb/PureBreadcrumb.js +22 -49
- package/esm/components/Breadcrumb/PureBreadcrumb.js.map +7 -0
- package/esm/components/Breadcrumb/styles.js +54 -48
- package/esm/components/Breadcrumb/styles.js.map +7 -0
- package/esm/components/Title/GlobalHeaderTitle.js +13 -15
- package/esm/components/Title/GlobalHeaderTitle.js.map +7 -0
- package/esm/components/Toolbar/GlobalHeaderToolbar.js +12 -14
- package/esm/components/Toolbar/GlobalHeaderToolbar.js.map +7 -0
- package/esm/components/Toolbar/ToolbarItems.js +53 -83
- package/esm/components/Toolbar/ToolbarItems.js.map +7 -0
- package/esm/components/Toolbar/styles.js +32 -17
- package/esm/components/Toolbar/styles.js.map +7 -0
- package/esm/config/useGetPropsWithDefaults.js +13 -22
- package/esm/config/useGetPropsWithDefaults.js.map +7 -0
- package/esm/config/useGlobalHeader.js +12 -19
- package/esm/config/useGlobalHeader.js.map +7 -0
- package/esm/config/useValidateProps.js +58 -58
- package/esm/config/useValidateProps.js.map +7 -0
- package/esm/config/validateHelpers.js +66 -28
- package/esm/config/validateHelpers.js.map +7 -0
- package/esm/defaultProps.js +5 -3
- package/esm/defaultProps.js.map +7 -0
- package/esm/index.js +7 -1
- package/esm/index.js.map +7 -0
- package/esm/outOfTheBox/AppPicker/AppPicker.js +50 -76
- package/esm/outOfTheBox/AppPicker/AppPicker.js.map +7 -0
- package/esm/outOfTheBox/PopupMenu/PopupMenu.js +37 -61
- package/esm/outOfTheBox/PopupMenu/PopupMenu.js.map +7 -0
- package/esm/outOfTheBox/PopupMenu/PopupMenuContent.js +45 -71
- package/esm/outOfTheBox/PopupMenu/PopupMenuContent.js.map +7 -0
- package/esm/outOfTheBox/PopupMenu/styles.js +38 -21
- package/esm/outOfTheBox/PopupMenu/styles.js.map +7 -0
- package/esm/outOfTheBox/SearchToggle/SearchToggle.js +46 -70
- package/esm/outOfTheBox/SearchToggle/SearchToggle.js.map +7 -0
- package/esm/outOfTheBox/SearchToggle/styles.js +51 -5
- package/esm/outOfTheBox/SearchToggle/styles.js.map +7 -0
- package/esm/outOfTheBox/index.js +5 -3
- package/esm/outOfTheBox/index.js.map +7 -0
- package/esm/propTypes.js +21 -17
- package/esm/propTypes.js.map +7 -0
- package/esm/styles.js +14 -13
- package/esm/styles.js.map +7 -0
- package/package.json +7 -7
package/cjs/outOfTheBox/index.js
CHANGED
|
@@ -1,13 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
9
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(module2))
|
|
11
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
12
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return target;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (module2, isNodeMode) => {
|
|
17
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
20
|
+
return (module2, temp) => {
|
|
21
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
22
|
+
};
|
|
23
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
24
|
+
var outOfTheBox_exports = {};
|
|
25
|
+
var React = __toESM(require("react"));
|
|
26
|
+
__reExport(outOfTheBox_exports, require("./AppPicker/AppPicker"));
|
|
27
|
+
__reExport(outOfTheBox_exports, require("./PopupMenu/PopupMenu"));
|
|
28
|
+
__reExport(outOfTheBox_exports, require("./SearchToggle/SearchToggle"));
|
|
29
|
+
module.exports = __toCommonJS(outOfTheBox_exports);
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/outOfTheBox/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export * from './AppPicker/AppPicker';\nexport * from './PopupMenu/PopupMenu';\nexport * from './SearchToggle/SearchToggle';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA,YAAuB;ADAvB,gCAAc;AACd,gCAAc;AACd,gCAAc;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/cjs/propTypes.js
CHANGED
|
@@ -1,29 +1,56 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var propTypes_exports = {};
|
|
29
|
+
__export(propTypes_exports, {
|
|
30
|
+
breadcrumbItem: () => breadcrumbItem,
|
|
31
|
+
globalHeaderProps: () => globalHeaderProps,
|
|
32
|
+
toolbarItem: () => toolbarItem
|
|
33
|
+
});
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_react_desc = require("react-desc");
|
|
36
|
+
const breadcrumbItem = import_react_desc.PropTypes.shape({
|
|
37
|
+
label: import_react_desc.PropTypes.string.description("breadrcrumb item label"),
|
|
38
|
+
hasNext: import_react_desc.PropTypes.bool.description("whether the item has a child or not"),
|
|
39
|
+
isSelected: import_react_desc.PropTypes.bool.description("whether the item is selected or not"),
|
|
40
|
+
onClick: import_react_desc.PropTypes.func.description("Callback executed on click")
|
|
12
41
|
});
|
|
13
|
-
const toolbarItem =
|
|
14
|
-
label:
|
|
15
|
-
type:
|
|
16
|
-
componentProps:
|
|
17
|
-
Icon:
|
|
18
|
-
onClick:
|
|
42
|
+
const toolbarItem = import_react_desc.PropTypes.shape({
|
|
43
|
+
label: import_react_desc.PropTypes.string.description("title tag description"),
|
|
44
|
+
type: import_react_desc.PropTypes.oneOf(["ds-app-picker", "ds-popup-menu", "ds-search-toggle", "custom"]).description("use to select one of the out-of-the-box types of items"),
|
|
45
|
+
componentProps: import_react_desc.PropTypes.object.description("props of out-of-the-box component"),
|
|
46
|
+
Icon: import_react_desc.PropTypes.func.description("Icon to display"),
|
|
47
|
+
onClick: import_react_desc.PropTypes.func.description("Callback executed on click")
|
|
19
48
|
});
|
|
20
49
|
const globalHeaderProps = {
|
|
21
|
-
Logo:
|
|
22
|
-
LogoWithBrand:
|
|
23
|
-
breadcrumb:
|
|
24
|
-
toolbar:
|
|
50
|
+
Logo: import_react_desc.PropTypes.func.description("Global Header Logo to render. Logo and LogoWithBrand are going to swap during window resizing."),
|
|
51
|
+
LogoWithBrand: import_react_desc.PropTypes.func.description("Global Header Logo With Brand title to render. Logo and LogoWithBrand are going to swap during window resizing."),
|
|
52
|
+
breadcrumb: import_react_desc.PropTypes.arrayOf(breadcrumbItem).description("Breadcrumb items to display. max 3 levels"),
|
|
53
|
+
toolbar: import_react_desc.PropTypes.arrayOf(toolbarItem).description("Toolbar items")
|
|
25
54
|
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
exports.globalHeaderProps = globalHeaderProps;
|
|
29
|
-
exports.toolbarItem = toolbarItem;
|
|
55
|
+
module.exports = __toCommonJS(propTypes_exports);
|
|
56
|
+
//# sourceMappingURL=propTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/propTypes.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { PropTypes } from 'react-desc';\n\nexport const breadcrumbItem = PropTypes.shape({\n label: PropTypes.string.description('breadrcrumb item label'),\n hasNext: PropTypes.bool.description('whether the item has a child or not'),\n isSelected: PropTypes.bool.description('whether the item is selected or not'),\n onClick: PropTypes.func.description('Callback executed on click'),\n});\n\nexport const toolbarItem = PropTypes.shape({\n label: PropTypes.string.description('title tag description'),\n type: PropTypes.oneOf(['ds-app-picker', 'ds-popup-menu', 'ds-search-toggle', 'custom']).description(\n 'use to select one of the out-of-the-box types of items',\n ),\n componentProps: PropTypes.object.description('props of out-of-the-box component'),\n Icon: PropTypes.func.description('Icon to display'),\n onClick: PropTypes.func.description('Callback executed on click'),\n});\n\nexport const globalHeaderProps = {\n Logo: PropTypes.func.description(\n 'Global Header Logo to render. Logo and LogoWithBrand are going to swap during window resizing.',\n ),\n LogoWithBrand: PropTypes.func.description(\n 'Global Header Logo With Brand title to render. Logo and LogoWithBrand are going to swap during window resizing.',\n ),\n breadcrumb: PropTypes.arrayOf(breadcrumbItem).description('Breadcrumb items to display. max 3 levels'),\n toolbar: PropTypes.arrayOf(toolbarItem).description('Toolbar items'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAA0B;AAEnB,MAAM,iBAAiB,4BAAU,MAAM;AAAA,EAC5C,OAAO,4BAAU,OAAO,YAAY;AAAA,EACpC,SAAS,4BAAU,KAAK,YAAY;AAAA,EACpC,YAAY,4BAAU,KAAK,YAAY;AAAA,EACvC,SAAS,4BAAU,KAAK,YAAY;AAAA;AAG/B,MAAM,cAAc,4BAAU,MAAM;AAAA,EACzC,OAAO,4BAAU,OAAO,YAAY;AAAA,EACpC,MAAM,4BAAU,MAAM,CAAC,iBAAiB,iBAAiB,oBAAoB,WAAW,YACtF;AAAA,EAEF,gBAAgB,4BAAU,OAAO,YAAY;AAAA,EAC7C,MAAM,4BAAU,KAAK,YAAY;AAAA,EACjC,SAAS,4BAAU,KAAK,YAAY;AAAA;AAG/B,MAAM,oBAAoB;AAAA,EAC/B,MAAM,4BAAU,KAAK,YACnB;AAAA,EAEF,eAAe,4BAAU,KAAK,YAC5B;AAAA,EAEF,YAAY,4BAAU,QAAQ,gBAAgB,YAAY;AAAA,EAC1D,SAAS,4BAAU,QAAQ,aAAa,YAAY;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/cjs/styles.js
CHANGED
|
@@ -1,21 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
return
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var styles_exports = {};
|
|
29
|
+
__export(styles_exports, {
|
|
30
|
+
Wrapper: () => Wrapper
|
|
19
31
|
});
|
|
20
|
-
|
|
21
|
-
|
|
32
|
+
var React = __toESM(require("react"));
|
|
33
|
+
var import_styled_components = __toESM(require("styled-components"));
|
|
34
|
+
var import_ds_grid = require("@elliemae/ds-grid");
|
|
35
|
+
const Wrapper = (0, import_styled_components.default)(import_ds_grid.GridContainer)`
|
|
36
|
+
background-image: linear-gradient(45deg, #0f364a 0%, #1b6392 54%, #164566 100%);
|
|
37
|
+
color: ${({ theme }) => theme.colors.neutral["000"]};
|
|
38
|
+
width: 100%;
|
|
39
|
+
height: 40px;
|
|
40
|
+
padding: 0 24px 0 12px;
|
|
41
|
+
`;
|
|
42
|
+
module.exports = __toCommonJS(styles_exports);
|
|
43
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/styles.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import styled from 'styled-components';\nimport { GridContainer } from '@elliemae/ds-grid';\n\nexport const Wrapper = styled(GridContainer)`\n background-image: linear-gradient(45deg, #0f364a 0%, #1b6392 54%, #164566 100%);\n color: ${({ theme }) => theme.colors.neutral['000']};\n width: 100%;\n height: 40px;\n padding: 0 24px 0 12px;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAmB;AACnB,qBAA8B;AAEvB,MAAM,UAAU,sCAAO;AAAA;AAAA,WAEnB,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/esm/GlobalHeader.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { describe } from
|
|
4
|
-
import { globalHeaderProps } from
|
|
5
|
-
import { GlobalHeaderTitle } from
|
|
6
|
-
import { GlobalHeaderBreadcrumb } from
|
|
7
|
-
import { GlobalHeaderToolbar } from
|
|
8
|
-
import { GlobalHeaderContext } from
|
|
9
|
-
import { useGlobalHeader } from
|
|
10
|
-
import { defaultProps } from
|
|
11
|
-
import { GlobalHeaderContainer } from
|
|
12
|
-
import { useValidateProps } from
|
|
13
|
-
|
|
14
|
-
var _GlobalHeaderTitle, _GlobalHeaderBreadcru, _GlobalHeaderToolbar;
|
|
15
|
-
|
|
16
|
-
const GlobalHeader = props => {
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { describe } from "react-desc";
|
|
4
|
+
import { globalHeaderProps } from "./propTypes";
|
|
5
|
+
import { GlobalHeaderTitle } from "./components/Title/GlobalHeaderTitle";
|
|
6
|
+
import { GlobalHeaderBreadcrumb } from "./components/Breadcrumb/GlobalHeaderBreadcrumb";
|
|
7
|
+
import { GlobalHeaderToolbar } from "./components/Toolbar/GlobalHeaderToolbar";
|
|
8
|
+
import { GlobalHeaderContext } from "./GlobalHeaderContext";
|
|
9
|
+
import { useGlobalHeader } from "./config/useGlobalHeader";
|
|
10
|
+
import { defaultProps } from "./defaultProps";
|
|
11
|
+
import { GlobalHeaderContainer } from "./GlobalHeaderContainer";
|
|
12
|
+
import { useValidateProps } from "./config/useValidateProps";
|
|
13
|
+
const GlobalHeader = (props) => {
|
|
17
14
|
useValidateProps(props);
|
|
18
15
|
const ctx = useGlobalHeader(props);
|
|
19
|
-
return
|
|
16
|
+
return /* @__PURE__ */ React2.createElement(GlobalHeaderContainer, null, /* @__PURE__ */ React2.createElement(GlobalHeaderContext.Provider, {
|
|
20
17
|
value: ctx
|
|
21
|
-
},
|
|
18
|
+
}, /* @__PURE__ */ React2.createElement(GlobalHeaderTitle, null), /* @__PURE__ */ React2.createElement(GlobalHeaderBreadcrumb, null), /* @__PURE__ */ React2.createElement(GlobalHeaderToolbar, null)));
|
|
22
19
|
};
|
|
23
|
-
|
|
24
20
|
GlobalHeader.defaultProps = defaultProps;
|
|
21
|
+
GlobalHeader.propTypes = globalHeaderProps;
|
|
25
22
|
const GlobalHeaderWithSchema = describe(GlobalHeader);
|
|
26
23
|
GlobalHeaderWithSchema.propTypes = globalHeaderProps;
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
export {
|
|
25
|
+
GlobalHeader,
|
|
26
|
+
GlobalHeaderWithSchema
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=GlobalHeader.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/GlobalHeader.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe } from 'react-desc';\nimport { globalHeaderProps } from './propTypes';\nimport type { GlobalHeaderPropsT as Props } from './GlobalHeaderTypes';\nimport { GlobalHeaderTitle } from './components/Title/GlobalHeaderTitle';\nimport { GlobalHeaderBreadcrumb } from './components/Breadcrumb/GlobalHeaderBreadcrumb';\nimport { GlobalHeaderToolbar } from './components/Toolbar/GlobalHeaderToolbar';\nimport { GlobalHeaderContext } from './GlobalHeaderContext';\nimport { useGlobalHeader } from './config/useGlobalHeader';\nimport { defaultProps } from './defaultProps';\nimport { GlobalHeaderContainer } from './GlobalHeaderContainer';\nimport { useValidateProps } from './config/useValidateProps';\n\nconst GlobalHeader = (props: Props): JSX.Element => {\n useValidateProps(props);\n const ctx = useGlobalHeader(props);\n return (\n <GlobalHeaderContainer>\n <GlobalHeaderContext.Provider value={ctx}>\n <GlobalHeaderTitle />\n <GlobalHeaderBreadcrumb />\n <GlobalHeaderToolbar />\n </GlobalHeaderContext.Provider>\n </GlobalHeaderContainer>\n );\n};\n\nGlobalHeader.defaultProps = defaultProps;\n\nGlobalHeader.propTypes = globalHeaderProps;\nconst GlobalHeaderWithSchema = describe(GlobalHeader);\nGlobalHeaderWithSchema.propTypes = globalHeaderProps;\n\nexport { GlobalHeader, GlobalHeaderWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,eAAe,CAAC,UAA8B;AAClD,mBAAiB;AACjB,QAAM,MAAM,gBAAgB;AAC5B,SACE,qCAAC,uBAAD,MACE,qCAAC,oBAAoB,UAArB;AAAA,IAA8B,OAAO;AAAA,KACnC,qCAAC,mBAAD,OACA,qCAAC,wBAAD,OACA,qCAAC,qBAAD;AAAA;AAMR,aAAa,eAAe;AAE5B,aAAa,YAAY;AACzB,MAAM,yBAAyB,SAAS;AACxC,uBAAuB,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { Wrapper } from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}, void 0, /*#__PURE__*/_jsx(Wrapper, {
|
|
12
|
-
cols: ['auto', '1fr', 'auto']
|
|
13
|
-
}, void 0, children));
|
|
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
|
|
14
11
|
};
|
|
15
|
-
|
|
16
|
-
export { GlobalHeaderContainer };
|
|
12
|
+
//# sourceMappingURL=GlobalHeaderContainer.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/GlobalHeaderContainer.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport type { GlobalHeaderContainerT } from './GlobalHeaderTypes';\nimport { Wrapper } from './styles';\n\nexport const GlobalHeaderContainer = ({ children }: GlobalHeaderContainerT): JSX.Element => (\n <header data-testid=\"ds-global-header\">\n <Wrapper cols={['auto', '1fr', 'auto']}>{children}</Wrapper>\n </header>\n);\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AAEA;AAEO,MAAM,wBAAwB,CAAC,EAAE,eACtC,qCAAC,UAAD;AAAA,EAAQ,eAAY;AAAA,GAClB,qCAAC,SAAD;AAAA,EAAS,MAAM,CAAC,QAAQ,OAAO;AAAA,GAAU;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { createContext } from "react";
|
|
3
|
+
import { defaultProps } from "./defaultProps";
|
|
4
4
|
const noop = () => null;
|
|
5
|
-
|
|
6
5
|
const defaultContext = {
|
|
7
6
|
props: defaultProps,
|
|
8
7
|
showIconOnly: false,
|
|
9
8
|
setShowIconOnly: noop,
|
|
10
|
-
instanceUID:
|
|
9
|
+
instanceUID: "",
|
|
11
10
|
globalHeaderToolbarGrid: [],
|
|
12
11
|
globalHeaderBreadcrumbGrid: []
|
|
13
12
|
};
|
|
14
|
-
const GlobalHeaderContext =
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
const GlobalHeaderContext = createContext(defaultContext);
|
|
14
|
+
export {
|
|
15
|
+
GlobalHeaderContext
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=GlobalHeaderContext.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/GlobalHeaderContext.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { createContext } from 'react';\nimport { defaultProps } from './defaultProps';\nimport type { ContextT } from './GlobalHeaderTypes';\n\nconst noop = () => null;\n\nconst defaultContext = {\n props: defaultProps,\n showIconOnly: false,\n setShowIconOnly: noop,\n instanceUID: '',\n globalHeaderToolbarGrid: [],\n globalHeaderBreadcrumbGrid: [],\n};\n\nexport const GlobalHeaderContext = createContext<ContextT>(defaultContext);\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AAGA,MAAM,OAAO,MAAM;AAEnB,MAAM,iBAAiB;AAAA,EACrB,OAAO;AAAA,EACP,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,yBAAyB;AAAA,EACzB,4BAA4B;AAAA;AAGvB,MAAM,sBAAsB,cAAwB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/esm/GlobalHeaderTypes.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
//# sourceMappingURL=GlobalHeaderTypes.js.map
|
|
@@ -1,30 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
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; }
|
|
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";
|
|
23
7
|
const GlobalHeaderBreadcrumb = () => {
|
|
24
8
|
const {
|
|
25
|
-
props: {
|
|
26
|
-
breadcrumb
|
|
27
|
-
},
|
|
9
|
+
props: { breadcrumb },
|
|
28
10
|
instanceUID,
|
|
29
11
|
showIconOnly,
|
|
30
12
|
setShowIconOnly,
|
|
@@ -34,7 +16,7 @@ const GlobalHeaderBreadcrumb = () => {
|
|
|
34
16
|
const flexRegion = useRef(null);
|
|
35
17
|
useEffect(() => {
|
|
36
18
|
const evaluateShowIconOnly = () => {
|
|
37
|
-
if (flexRegion && flexRegion.current &&
|
|
19
|
+
if (flexRegion && flexRegion.current && flexRegion?.current.offsetWidth <= 0 && !breakpoint.current) {
|
|
38
20
|
setShowIconOnly(true);
|
|
39
21
|
breakpoint.current = window.innerWidth;
|
|
40
22
|
} else if (breakpoint && breakpoint.current !== null && window.innerWidth >= breakpoint.current) {
|
|
@@ -42,34 +24,33 @@ const GlobalHeaderBreadcrumb = () => {
|
|
|
42
24
|
breakpoint.current = null;
|
|
43
25
|
}
|
|
44
26
|
};
|
|
45
|
-
|
|
46
27
|
evaluateShowIconOnly();
|
|
47
|
-
window.addEventListener(
|
|
48
|
-
return () => window.removeEventListener(
|
|
28
|
+
window.addEventListener("resize", evaluateShowIconOnly);
|
|
29
|
+
return () => window.removeEventListener("resize", evaluateShowIconOnly);
|
|
49
30
|
}, [breakpoint, flexRegion, setShowIconOnly]);
|
|
50
|
-
return
|
|
31
|
+
return /* @__PURE__ */ React2.createElement(Grid, {
|
|
51
32
|
height: "100%",
|
|
52
33
|
alignItems: "center",
|
|
53
34
|
justifyContent: "flex-start",
|
|
54
35
|
"aria-label": "breadcrumbs",
|
|
55
36
|
cols: globalHeaderBreadcrumbGrid,
|
|
56
37
|
role: "navigation"
|
|
57
|
-
},
|
|
58
|
-
showIconOnly
|
|
59
|
-
}), breadcrumb
|
|
60
|
-
const {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}, rest), "".concat(instanceUID, "-breadcrumb-item-").concat(label));
|
|
69
|
-
}), /*#__PURE__*/jsx("div", {
|
|
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", {
|
|
70
49
|
id: "global-header-flex-region",
|
|
71
50
|
ref: flexRegion
|
|
72
51
|
}));
|
|
73
52
|
};
|
|
74
|
-
|
|
75
|
-
|
|
53
|
+
export {
|
|
54
|
+
GlobalHeaderBreadcrumb
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=GlobalHeaderBreadcrumb.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/Breadcrumb/GlobalHeaderBreadcrumb.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useEffect, useContext, useRef } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { Pipe } from './styles';\nimport { GlobalHeaderContext } from '../../GlobalHeaderContext';\nimport { PureBreadcrumb } from './PureBreadcrumb';\n\nexport const GlobalHeaderBreadcrumb = (): JSX.Element => {\n const {\n props: { breadcrumb },\n instanceUID,\n showIconOnly,\n setShowIconOnly,\n globalHeaderBreadcrumbGrid,\n } = useContext(GlobalHeaderContext);\n const breakpoint = useRef<number | null>(null);\n const flexRegion = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const evaluateShowIconOnly = () => {\n if (flexRegion && flexRegion.current && flexRegion?.current.offsetWidth <= 0 && !breakpoint.current) {\n setShowIconOnly(true);\n breakpoint.current = window.innerWidth;\n } else if (breakpoint && breakpoint.current !== null && window.innerWidth >= breakpoint.current) {\n setShowIconOnly(false);\n breakpoint.current = null;\n }\n };\n\n evaluateShowIconOnly();\n\n window.addEventListener('resize', evaluateShowIconOnly);\n return () => window.removeEventListener('resize', evaluateShowIconOnly);\n }, [breakpoint, flexRegion, setShowIconOnly]);\n\n return (\n <Grid\n height=\"100%\"\n alignItems=\"center\"\n justifyContent=\"flex-start\"\n aria-label=\"breadcrumbs\"\n cols={globalHeaderBreadcrumbGrid}\n role=\"navigation\"\n >\n <Pipe showIconOnly={showIconOnly} />\n {breadcrumb?.map((item) => {\n const { label, ...rest } = item;\n return (\n <PureBreadcrumb\n label={label}\n length={breadcrumb.length}\n key={`${instanceUID}-breadcrumb-item-${label}`}\n {...rest}\n />\n );\n })}\n <div id=\"global-header-flex-region\" ref={flexRegion}></div>\n </Grid>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AAEO,MAAM,yBAAyB,MAAmB;AACvD,QAAM;AAAA,IACJ,OAAO,EAAE;AAAA,IACT;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE,WAAW;AACf,QAAM,aAAa,OAAsB;AACzC,QAAM,aAAa,OAAuB;AAE1C,YAAU,MAAM;AACd,UAAM,uBAAuB,MAAM;AACjC,UAAI,cAAc,WAAW,WAAW,YAAY,QAAQ,eAAe,KAAK,CAAC,WAAW,SAAS;AACnG,wBAAgB;AAChB,mBAAW,UAAU,OAAO;AAAA,iBACnB,cAAc,WAAW,YAAY,QAAQ,OAAO,cAAc,WAAW,SAAS;AAC/F,wBAAgB;AAChB,mBAAW,UAAU;AAAA;AAAA;AAIzB;AAEA,WAAO,iBAAiB,UAAU;AAClC,WAAO,MAAM,OAAO,oBAAoB,UAAU;AAAA,KACjD,CAAC,YAAY,YAAY;AAE5B,SACE,qCAAC,MAAD;AAAA,IACE,QAAO;AAAA,IACP,YAAW;AAAA,IACX,gBAAe;AAAA,IACf,cAAW;AAAA,IACX,MAAM;AAAA,IACN,MAAK;AAAA,KAEL,qCAAC,MAAD;AAAA,IAAM;AAAA,MACL,YAAY,IAAI,CAAC,SAAS;AACzB,UAAM,EAAE,UAAU,SAAS;AAC3B,WACE,qCAAC,gBAAD;AAAA,MACE;AAAA,MACA,QAAQ,WAAW;AAAA,MACnB,KAAK,GAAG,+BAA+B;AAAA,SACnC;AAAA;AAAA,MAIV,qCAAC,OAAD;AAAA,IAAK,IAAG;AAAA,IAA4B,KAAK;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,49 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
+
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
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/Breadcrumb/PureBreadcrumb.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { ChevronSmallRight } from '@elliemae/ds-icons';\nimport { getDataProps } from '@elliemae/ds-props-helpers';\nimport { BreadcrumbItem, LabelButton, Label } from './styles';\nimport type { BreadcrumbItemT as Props } from '../../GlobalHeaderTypes';\n\nexport const PureBreadcrumb = React.memo(({ onClick, isSelected, length, label, hasNext, id, ...rest }: Props) => (\n <BreadcrumbItem>\n <LabelButton\n onClick={onClick}\n aria-selected={isSelected}\n data-testid=\"gh-breadcrumb-btn\"\n id={id}\n {...getDataProps(rest)}\n >\n <Label isSelected={!!isSelected} isOnlyItem={length === 1}>\n {label}\n </Label>\n </LabelButton>\n {hasNext && <ChevronSmallRight size=\"m\" fill=\"#FFF\" />}\n </BreadcrumbItem>\n));\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AAGO,MAAM,iBAAiB,OAAM,KAAK,CAAC,EAAE,SAAS,YAAY,QAAQ,OAAO,SAAS,OAAO,WAC9F,qCAAC,gBAAD,MACE,qCAAC,aAAD;AAAA,EACE;AAAA,EACA,iBAAe;AAAA,EACf,eAAY;AAAA,EACZ;AAAA,KACI,aAAa;AAAA,GAEjB,qCAAC,OAAD;AAAA,EAAO,YAAY,CAAC,CAAC;AAAA,EAAY,YAAY,WAAW;AAAA,GACrD,SAGJ,WAAW,qCAAC,mBAAD;AAAA,EAAmB,MAAK;AAAA,EAAI,MAAK;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|