@elliemae/ds-page-header-v1 3.22.0-next.24
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/dist/cjs/DSPageHeader.js +122 -0
- package/dist/cjs/DSPageHeader.js.map +7 -0
- package/dist/cjs/DropdownTitle.js +56 -0
- package/dist/cjs/DropdownTitle.js.map +7 -0
- package/dist/cjs/EditableTitle.js +68 -0
- package/dist/cjs/EditableTitle.js.map +7 -0
- package/dist/cjs/PageHeaderImpl.js +152 -0
- package/dist/cjs/PageHeaderImpl.js.map +7 -0
- package/dist/cjs/Title.js +42 -0
- package/dist/cjs/Title.js.map +7 -0
- package/dist/cjs/TitleWrapper.js +38 -0
- package/dist/cjs/TitleWrapper.js.map +7 -0
- package/dist/cjs/index.js +38 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/package.json +7 -0
- package/dist/esm/DSPageHeader.js +92 -0
- package/dist/esm/DSPageHeader.js.map +7 -0
- package/dist/esm/DropdownTitle.js +26 -0
- package/dist/esm/DropdownTitle.js.map +7 -0
- package/dist/esm/EditableTitle.js +38 -0
- package/dist/esm/EditableTitle.js.map +7 -0
- package/dist/esm/PageHeaderImpl.js +122 -0
- package/dist/esm/PageHeaderImpl.js.map +7 -0
- package/dist/esm/Title.js +12 -0
- package/dist/esm/Title.js.map +7 -0
- package/dist/esm/TitleWrapper.js +8 -0
- package/dist/esm/TitleWrapper.js.map +7 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/package.json +7 -0
- package/dist/types/DSPageHeader.d.ts +43 -0
- package/dist/types/DropdownTitle.d.ts +12 -0
- package/dist/types/EditableTitle.d.ts +15 -0
- package/dist/types/PageHeaderImpl.d.ts +20 -0
- package/dist/types/Title.d.ts +4 -0
- package/dist/types/TitleWrapper.d.ts +3 -0
- package/dist/types/index.d.ts +2 -0
- package/package.json +145 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useDeprecateComponent } from "@elliemae/ds-utilities";
|
|
4
|
+
import { describe, PropTypes } from "@elliemae/ds-props-helpers";
|
|
5
|
+
import { TooltipTextProvider } from "@elliemae/ds-truncated-tooltip-text";
|
|
6
|
+
import PageHeaderImpl from "./PageHeaderImpl.js";
|
|
7
|
+
const DSPageHeader = ({
|
|
8
|
+
containerProps = {},
|
|
9
|
+
renderToolbar = void 0,
|
|
10
|
+
withBottomSeparator = true,
|
|
11
|
+
title = "",
|
|
12
|
+
titleOptions = void 0,
|
|
13
|
+
onSelectOption = () => null,
|
|
14
|
+
subtitle = "",
|
|
15
|
+
optionsSelection = {},
|
|
16
|
+
onGoToPreviousPage = () => null,
|
|
17
|
+
previousPage,
|
|
18
|
+
editable = false,
|
|
19
|
+
editing = void 0,
|
|
20
|
+
titleInputProps = {},
|
|
21
|
+
zIndex = 2,
|
|
22
|
+
optionsMinWidth = void 0,
|
|
23
|
+
...otherProps
|
|
24
|
+
}) => {
|
|
25
|
+
useDeprecateComponent({ componentName: "ds-page-header", version: "3.x Date: 2023 Q1" });
|
|
26
|
+
return /* @__PURE__ */ jsx(TooltipTextProvider, { children: /* @__PURE__ */ jsx(
|
|
27
|
+
PageHeaderImpl,
|
|
28
|
+
{
|
|
29
|
+
containerProps,
|
|
30
|
+
editable,
|
|
31
|
+
editing,
|
|
32
|
+
onGoToPreviousPage,
|
|
33
|
+
onSelectOption,
|
|
34
|
+
optionsMinWidth,
|
|
35
|
+
optionsSelection,
|
|
36
|
+
previousPage,
|
|
37
|
+
renderToolbar,
|
|
38
|
+
subtitle,
|
|
39
|
+
title,
|
|
40
|
+
titleInputProps,
|
|
41
|
+
titleOptions,
|
|
42
|
+
withBottomSeparator,
|
|
43
|
+
zIndex,
|
|
44
|
+
...otherProps
|
|
45
|
+
}
|
|
46
|
+
) });
|
|
47
|
+
};
|
|
48
|
+
const props = {
|
|
49
|
+
/* Component version */
|
|
50
|
+
version: PropTypes.oneOf([1, 2]).description("Component version"),
|
|
51
|
+
/* props injected to page header wrapper node */
|
|
52
|
+
containerProps: PropTypes.object.description("props injected to page header wrapper node"),
|
|
53
|
+
/* Function that returns the toolbar to the right of the page header */
|
|
54
|
+
renderToolbar: PropTypes.func.description("Function that returns the toolbar to the right of the page header"),
|
|
55
|
+
/* Whether to show a separator at the bottom of the header */
|
|
56
|
+
withBottomSeparator: PropTypes.bool.description("Whether to show a separator at the bottom of the header"),
|
|
57
|
+
/* The page header title */
|
|
58
|
+
title: PropTypes.string.description("The page header title"),
|
|
59
|
+
/* The title dropdown options */
|
|
60
|
+
titleOptions: PropTypes.arrayOf(PropTypes.object).description("The title dropdown options"),
|
|
61
|
+
/* Handler when a user selects an item in the dropdown menu */
|
|
62
|
+
onSelectOption: PropTypes.func.description("Handler when a user selects an item in the dropdown menu"),
|
|
63
|
+
/* Description text below the title */
|
|
64
|
+
subtitle: PropTypes.string.description("Description text below the title"),
|
|
65
|
+
/* Selection state for the title dropdown */
|
|
66
|
+
optionsSelection: PropTypes.object.description("Selection state for the title dropdown"),
|
|
67
|
+
/* Whether the title is editable or not */
|
|
68
|
+
editable: PropTypes.bool.description("Whether the title is editable or not"),
|
|
69
|
+
/* Activates/Deactivates the editing state in the title */
|
|
70
|
+
editing: PropTypes.bool.description("Activates/Deactivates the editing state in the title"),
|
|
71
|
+
/* Props passed to the input for editing the title */
|
|
72
|
+
titleInputProps: PropTypes.object.description("Props passed to the input for editing the title"),
|
|
73
|
+
/* Enables navigation to previous page with back-arrow */
|
|
74
|
+
previousPage: PropTypes.object.description("Enables navigation to previous page with back-arrow"),
|
|
75
|
+
/* Callback to handle navigation to previous page */
|
|
76
|
+
onGoToPreviousPage: PropTypes.func.description("Callback to handle navigation to previous page"),
|
|
77
|
+
/* z-index to use for the DropdownMenu */
|
|
78
|
+
zIndex: PropTypes.number.description("z-index to use for the DropdownMenu"),
|
|
79
|
+
/** min width for options dropdown menu */
|
|
80
|
+
optionsMinWidth: PropTypes.number.description("min width for options dropdown menu")
|
|
81
|
+
};
|
|
82
|
+
DSPageHeader.propTypes = props;
|
|
83
|
+
DSPageHeader.displayName = "DSPageHeader";
|
|
84
|
+
const DSPageHeaderV1WithSchema = describe(DSPageHeader).deprecated("use DSPageHeaderV2");
|
|
85
|
+
DSPageHeaderV1WithSchema.propTypes = props;
|
|
86
|
+
var DSPageHeader_default = DSPageHeader;
|
|
87
|
+
export {
|
|
88
|
+
DSPageHeader,
|
|
89
|
+
DSPageHeaderV1WithSchema,
|
|
90
|
+
DSPageHeader_default as default
|
|
91
|
+
};
|
|
92
|
+
//# sourceMappingURL=DSPageHeader.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSPageHeader.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React from 'react';\nimport { useDeprecateComponent } from '@elliemae/ds-utilities';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { TooltipTextProvider } from '@elliemae/ds-truncated-tooltip-text';\nimport PageHeaderImpl from './PageHeaderImpl.js';\n\nconst DSPageHeader = ({\n containerProps = {},\n renderToolbar = undefined,\n withBottomSeparator = true,\n title = '',\n titleOptions = undefined,\n onSelectOption = () => null,\n subtitle = '',\n optionsSelection = {},\n onGoToPreviousPage = () => null,\n previousPage,\n editable = false,\n editing = undefined,\n titleInputProps = {},\n zIndex = 2,\n optionsMinWidth = undefined,\n ...otherProps\n}) => {\n useDeprecateComponent({ componentName: 'ds-page-header', version: '3.x Date: 2023 Q1' });\n\n return (\n <TooltipTextProvider>\n <PageHeaderImpl\n containerProps={containerProps}\n editable={editable}\n editing={editing}\n onGoToPreviousPage={onGoToPreviousPage}\n onSelectOption={onSelectOption}\n optionsMinWidth={optionsMinWidth}\n optionsSelection={optionsSelection}\n previousPage={previousPage}\n renderToolbar={renderToolbar}\n subtitle={subtitle}\n title={title}\n titleInputProps={titleInputProps}\n titleOptions={titleOptions}\n withBottomSeparator={withBottomSeparator}\n zIndex={zIndex}\n {...otherProps}\n />\n </TooltipTextProvider>\n );\n};\n\nconst props = {\n /* Component version */\n version: PropTypes.oneOf([1, 2]).description('Component version'),\n /* props injected to page header wrapper node */\n containerProps: PropTypes.object.description('props injected to page header wrapper node'),\n /* Function that returns the toolbar to the right of the page header */\n renderToolbar: PropTypes.func.description('Function that returns the toolbar to the right of the page header'),\n /* Whether to show a separator at the bottom of the header */\n withBottomSeparator: PropTypes.bool.description('Whether to show a separator at the bottom of the header'),\n /* The page header title */\n title: PropTypes.string.description('The page header title'),\n /* The title dropdown options */\n titleOptions: PropTypes.arrayOf(PropTypes.object).description('The title dropdown options'),\n /* Handler when a user selects an item in the dropdown menu */\n onSelectOption: PropTypes.func.description('Handler when a user selects an item in the dropdown menu'),\n /* Description text below the title */\n subtitle: PropTypes.string.description('Description text below the title'),\n /* Selection state for the title dropdown */\n optionsSelection: PropTypes.object.description('Selection state for the title dropdown'),\n /* Whether the title is editable or not */\n editable: PropTypes.bool.description('Whether the title is editable or not'),\n /* Activates/Deactivates the editing state in the title */\n editing: PropTypes.bool.description('Activates/Deactivates the editing state in the title'),\n /* Props passed to the input for editing the title */\n titleInputProps: PropTypes.object.description('Props passed to the input for editing the title'),\n /* Enables navigation to previous page with back-arrow */\n previousPage: PropTypes.object.description('Enables navigation to previous page with back-arrow'),\n /* Callback to handle navigation to previous page */\n onGoToPreviousPage: PropTypes.func.description('Callback to handle navigation to previous page'),\n /* z-index to use for the DropdownMenu */\n zIndex: PropTypes.number.description('z-index to use for the DropdownMenu'),\n /** min width for options dropdown menu */\n optionsMinWidth: PropTypes.number.description('min width for options dropdown menu'),\n};\n\nDSPageHeader.propTypes = props;\nDSPageHeader.displayName = 'DSPageHeader';\nconst DSPageHeaderV1WithSchema = describe(DSPageHeader).deprecated('use DSPageHeaderV2');\nDSPageHeaderV1WithSchema.propTypes = props;\n\nexport { DSPageHeader, DSPageHeaderV1WithSchema };\nexport default DSPageHeader;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACgCjB;AA3BN,SAAS,6BAA6B;AACtC,SAAS,UAAU,iBAAiB;AACpC,SAAS,2BAA2B;AACpC,OAAO,oBAAoB;AAE3B,MAAM,eAAe,CAAC;AAAA,EACpB,iBAAiB,CAAC;AAAA,EAClB,gBAAgB;AAAA,EAChB,sBAAsB;AAAA,EACtB,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,iBAAiB,MAAM;AAAA,EACvB,WAAW;AAAA,EACX,mBAAmB,CAAC;AAAA,EACpB,qBAAqB,MAAM;AAAA,EAC3B;AAAA,EACA,WAAW;AAAA,EACX,UAAU;AAAA,EACV,kBAAkB,CAAC;AAAA,EACnB,SAAS;AAAA,EACT,kBAAkB;AAAA,EAClB,GAAG;AACL,MAAM;AACJ,wBAAsB,EAAE,eAAe,kBAAkB,SAAS,oBAAoB,CAAC;AAEvF,SACE,oBAAC,uBACC;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACC,GAAG;AAAA;AAAA,EACN,GACF;AAEJ;AAEA,MAAM,QAAQ;AAAA;AAAA,EAEZ,SAAS,UAAU,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,mBAAmB;AAAA;AAAA,EAEhE,gBAAgB,UAAU,OAAO,YAAY,4CAA4C;AAAA;AAAA,EAEzF,eAAe,UAAU,KAAK,YAAY,mEAAmE;AAAA;AAAA,EAE7G,qBAAqB,UAAU,KAAK,YAAY,yDAAyD;AAAA;AAAA,EAEzG,OAAO,UAAU,OAAO,YAAY,uBAAuB;AAAA;AAAA,EAE3D,cAAc,UAAU,QAAQ,UAAU,MAAM,EAAE,YAAY,4BAA4B;AAAA;AAAA,EAE1F,gBAAgB,UAAU,KAAK,YAAY,0DAA0D;AAAA;AAAA,EAErG,UAAU,UAAU,OAAO,YAAY,kCAAkC;AAAA;AAAA,EAEzE,kBAAkB,UAAU,OAAO,YAAY,wCAAwC;AAAA;AAAA,EAEvF,UAAU,UAAU,KAAK,YAAY,sCAAsC;AAAA;AAAA,EAE3E,SAAS,UAAU,KAAK,YAAY,sDAAsD;AAAA;AAAA,EAE1F,iBAAiB,UAAU,OAAO,YAAY,iDAAiD;AAAA;AAAA,EAE/F,cAAc,UAAU,OAAO,YAAY,qDAAqD;AAAA;AAAA,EAEhG,oBAAoB,UAAU,KAAK,YAAY,gDAAgD;AAAA;AAAA,EAE/F,QAAQ,UAAU,OAAO,YAAY,qCAAqC;AAAA;AAAA,EAE1E,iBAAiB,UAAU,OAAO,YAAY,qCAAqC;AACrF;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,2BAA2B,SAAS,YAAY,EAAE,WAAW,oBAAoB;AACvF,yBAAyB,YAAY;AAGrC,IAAO,uBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import DSDropdownMenu from "@elliemae/ds-dropdownmenu";
|
|
4
|
+
import { ChevronSmallDown } from "@elliemae/ds-icons";
|
|
5
|
+
import DSButton from "@elliemae/ds-button";
|
|
6
|
+
import TitleWrapper from "./TitleWrapper.js";
|
|
7
|
+
const DropdownTitle = ({ titleComponent, onSelectOption, options, optionsMinWidth, selection, zIndex }) => /* @__PURE__ */ jsxs(TitleWrapper, { children: [
|
|
8
|
+
titleComponent,
|
|
9
|
+
/* @__PURE__ */ jsx(
|
|
10
|
+
DSDropdownMenu,
|
|
11
|
+
{
|
|
12
|
+
minWidth: optionsMinWidth,
|
|
13
|
+
onSelectMenuItem: onSelectOption,
|
|
14
|
+
options,
|
|
15
|
+
selection,
|
|
16
|
+
triggerComponent: /* @__PURE__ */ jsx(DSButton, { buttonType: "text", "data-testid": "page-header-dropdown-trigger-component", icon: /* @__PURE__ */ jsx(ChevronSmallDown, {}) }),
|
|
17
|
+
zIndex
|
|
18
|
+
}
|
|
19
|
+
)
|
|
20
|
+
] });
|
|
21
|
+
DropdownTitle.propTypes = {};
|
|
22
|
+
var DropdownTitle_default = DropdownTitle;
|
|
23
|
+
export {
|
|
24
|
+
DropdownTitle_default as default
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=DropdownTitle.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DropdownTitle.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React from 'react';\nimport DSDropdownMenu from '@elliemae/ds-dropdownmenu';\nimport { ChevronSmallDown } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport TitleWrapper from './TitleWrapper.js';\n\nconst DropdownTitle = ({ titleComponent, onSelectOption, options, optionsMinWidth, selection, zIndex }) => (\n <TitleWrapper>\n {titleComponent}\n <DSDropdownMenu\n minWidth={optionsMinWidth}\n onSelectMenuItem={onSelectOption}\n options={options}\n selection={selection}\n triggerComponent={\n <DSButton buttonType=\"text\" data-testid=\"page-header-dropdown-trigger-component\" icon={<ChevronSmallDown />} />\n }\n zIndex={zIndex}\n />\n </TitleWrapper>\n);\n\nDropdownTitle.propTypes = {};\n\nexport default DropdownTitle;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACWrB,SAQ6F,KAR7F;AANF,OAAO,oBAAoB;AAC3B,SAAS,wBAAwB;AACjC,OAAO,cAAc;AACrB,OAAO,kBAAkB;AAEzB,MAAM,gBAAgB,CAAC,EAAE,gBAAgB,gBAAgB,SAAS,iBAAiB,WAAW,OAAO,MACnG,qBAAC,gBACE;AAAA;AAAA,EACD;AAAA,IAAC;AAAA;AAAA,MACC,UAAU;AAAA,MACV,kBAAkB;AAAA,MAClB;AAAA,MACA;AAAA,MACA,kBACE,oBAAC,YAAS,YAAW,QAAO,eAAY,0CAAyC,MAAM,oBAAC,oBAAiB,GAAI;AAAA,MAE/G;AAAA;AAAA,EACF;AAAA,GACF;AAGF,cAAc,YAAY,CAAC;AAE3B,IAAO,wBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useRef, useState } from "react";
|
|
4
|
+
import { useDerivedStateFromProps, runAll } from "@elliemae/ds-utilities";
|
|
5
|
+
import PropTypes from "prop-types";
|
|
6
|
+
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
7
|
+
import DSInput from "@elliemae/ds-form/Input";
|
|
8
|
+
import Title from "./Title.js";
|
|
9
|
+
const blockName = "page-header";
|
|
10
|
+
const EditableTitleComponent = aggregatedClasses(DSInput)(`${blockName}-title`, "editable-title");
|
|
11
|
+
const EditableTitle = ({ children: value, editing: editingProp, titleInputProps }) => {
|
|
12
|
+
const [titleValue, setTitleValue] = useState(value);
|
|
13
|
+
const [hovered, setHovered] = useState(false);
|
|
14
|
+
const [editing, setEditing] = useDerivedStateFromProps(editingProp || false);
|
|
15
|
+
const titleRef = useRef(null);
|
|
16
|
+
return /* @__PURE__ */ jsx(Fragment, { children: hovered || editing ? /* @__PURE__ */ jsx(
|
|
17
|
+
EditableTitleComponent,
|
|
18
|
+
{
|
|
19
|
+
...titleInputProps,
|
|
20
|
+
onBlur: runAll(() => setEditing(false), titleInputProps.onBlur),
|
|
21
|
+
onChange: runAll((e) => setTitleValue(e.target.value), titleInputProps.onChange),
|
|
22
|
+
onFocus: runAll(() => setEditing(true), titleInputProps.onFocus),
|
|
23
|
+
onMouseOut: runAll(() => setHovered(false), titleInputProps.onMouseOut),
|
|
24
|
+
value: titleValue
|
|
25
|
+
}
|
|
26
|
+
) : /* @__PURE__ */ jsx("div", { ref: titleRef, onMouseEnter: () => setHovered(true), children: /* @__PURE__ */ jsx(Title, { children: titleValue }) }) });
|
|
27
|
+
};
|
|
28
|
+
EditableTitle.propTypes = {
|
|
29
|
+
/** The title text */
|
|
30
|
+
children: PropTypes.string,
|
|
31
|
+
/** Whether the title is editing or not */
|
|
32
|
+
editing: PropTypes.bool
|
|
33
|
+
};
|
|
34
|
+
var EditableTitle_default = EditableTitle;
|
|
35
|
+
export {
|
|
36
|
+
EditableTitle_default as default
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=EditableTitle.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/EditableTitle.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React, { useRef, useState } from 'react';\nimport { useDerivedStateFromProps, runAll } from '@elliemae/ds-utilities';\nimport PropTypes from 'prop-types';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport DSInput from '@elliemae/ds-form/Input';\nimport Title from './Title.js';\n\nconst blockName = 'page-header';\n\nconst EditableTitleComponent = aggregatedClasses(DSInput)(`${blockName}-title`, 'editable-title');\n\nconst EditableTitle = ({ children: value, editing: editingProp, titleInputProps }) => {\n const [titleValue, setTitleValue] = useState(value);\n const [hovered, setHovered] = useState(false);\n const [editing, setEditing] = useDerivedStateFromProps(editingProp || false);\n const titleRef = useRef(null);\n return (\n <>\n {hovered || editing ? (\n <EditableTitleComponent\n {...titleInputProps}\n onBlur={runAll(() => setEditing(false), titleInputProps.onBlur)}\n onChange={runAll((e) => setTitleValue(e.target.value), titleInputProps.onChange)}\n onFocus={runAll(() => setEditing(true), titleInputProps.onFocus)}\n onMouseOut={runAll(() => setHovered(false), titleInputProps.onMouseOut)}\n value={titleValue}\n />\n ) : (\n <div ref={titleRef} onMouseEnter={() => setHovered(true)}>\n <Title>{titleValue}</Title>\n </div>\n )}\n </>\n );\n};\n\nEditableTitle.propTypes = {\n /** The title text */\n children: PropTypes.string,\n /** Whether the title is editing or not */\n editing: PropTypes.bool,\n};\n\nexport default EditableTitle;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACqBnB,mBAEI,WAFJ;AAjBJ,SAAgB,QAAQ,gBAAgB;AACxC,SAAS,0BAA0B,cAAc;AACjD,OAAO,eAAe;AACtB,SAAS,yBAAyB;AAClC,OAAO,aAAa;AACpB,OAAO,WAAW;AAElB,MAAM,YAAY;AAElB,MAAM,yBAAyB,kBAAkB,OAAO,EAAE,GAAG,mBAAmB,gBAAgB;AAEhG,MAAM,gBAAgB,CAAC,EAAE,UAAU,OAAO,SAAS,aAAa,gBAAgB,MAAM;AACpF,QAAM,CAAC,YAAY,aAAa,IAAI,SAAS,KAAK;AAClD,QAAM,CAAC,SAAS,UAAU,IAAI,SAAS,KAAK;AAC5C,QAAM,CAAC,SAAS,UAAU,IAAI,yBAAyB,eAAe,KAAK;AAC3E,QAAM,WAAW,OAAO,IAAI;AAC5B,SACE,gCACG,qBAAW,UACV;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,QAAQ,OAAO,MAAM,WAAW,KAAK,GAAG,gBAAgB,MAAM;AAAA,MAC9D,UAAU,OAAO,CAAC,MAAM,cAAc,EAAE,OAAO,KAAK,GAAG,gBAAgB,QAAQ;AAAA,MAC/E,SAAS,OAAO,MAAM,WAAW,IAAI,GAAG,gBAAgB,OAAO;AAAA,MAC/D,YAAY,OAAO,MAAM,WAAW,KAAK,GAAG,gBAAgB,UAAU;AAAA,MACtE,OAAO;AAAA;AAAA,EACT,IAEA,oBAAC,SAAI,KAAK,UAAU,cAAc,MAAM,WAAW,IAAI,GACrD,8BAAC,SAAO,sBAAW,GACrB,GAEJ;AAEJ;AAEA,cAAc,YAAY;AAAA;AAAA,EAExB,UAAU,UAAU;AAAA;AAAA,EAEpB,SAAS,UAAU;AACrB;AAEA,IAAO,wBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { isFunction } from "@elliemae/ds-utilities";
|
|
4
|
+
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
5
|
+
import { ChevronLeft } from "@elliemae/ds-icons";
|
|
6
|
+
import DSBreadcrumb from "@elliemae/ds-breadcrumb";
|
|
7
|
+
import { DSIconSizes } from "@elliemae/ds-icon";
|
|
8
|
+
import EditableTitle from "./EditableTitle.js";
|
|
9
|
+
import Title from "./Title.js";
|
|
10
|
+
import DropdownTitle from "./DropdownTitle.js";
|
|
11
|
+
const blockName = "page-header";
|
|
12
|
+
const PageHeaderContainer = aggregatedClasses("div")(blockName, null, ({ withBottomSeparator, subtitle }) => ({
|
|
13
|
+
"with-bottom-separator": withBottomSeparator,
|
|
14
|
+
"with-subtitle": subtitle
|
|
15
|
+
}));
|
|
16
|
+
const PageHeaderMainSection = aggregatedClasses("div")(`${blockName}-main-section`);
|
|
17
|
+
const PageHeaderTitleSection = aggregatedClasses("div")(`${blockName}-title-section`);
|
|
18
|
+
const PageHeaderToolbar = aggregatedClasses("div")(`${blockName}-toolbar`, null, () => ({
|
|
19
|
+
"ie-flex-basis-auto": true
|
|
20
|
+
}));
|
|
21
|
+
const PageHeaderBreadcrumb = aggregatedClasses(DSBreadcrumb)(`${blockName}-breadcrumb`);
|
|
22
|
+
const PageHeaderTitle = aggregatedClasses("div")(`${blockName}-title`);
|
|
23
|
+
const Subtitle = aggregatedClasses("div")(`${blockName}-title`, "subtitle");
|
|
24
|
+
const BackArrow = aggregatedClasses(ChevronLeft)(`${blockName}-backarrow`);
|
|
25
|
+
const HeaderTitle = ({
|
|
26
|
+
title = "",
|
|
27
|
+
options = [],
|
|
28
|
+
optionsMinWidth,
|
|
29
|
+
onSelectOption = () => null,
|
|
30
|
+
selection,
|
|
31
|
+
subtitle = "",
|
|
32
|
+
editable = false,
|
|
33
|
+
editing = false,
|
|
34
|
+
titleInputProps,
|
|
35
|
+
zIndex
|
|
36
|
+
}) => {
|
|
37
|
+
const titleComponent = editable ? /* @__PURE__ */ jsx(EditableTitle, { editing, titleInputProps, children: title }) : /* @__PURE__ */ jsx(Title, { children: title });
|
|
38
|
+
return /* @__PURE__ */ jsxs(PageHeaderTitle, { children: [
|
|
39
|
+
options.length ? /* @__PURE__ */ jsx(
|
|
40
|
+
DropdownTitle,
|
|
41
|
+
{
|
|
42
|
+
onSelectOption,
|
|
43
|
+
options,
|
|
44
|
+
optionsMinWidth,
|
|
45
|
+
selection,
|
|
46
|
+
titleComponent,
|
|
47
|
+
zIndex
|
|
48
|
+
}
|
|
49
|
+
) : titleComponent,
|
|
50
|
+
subtitle && /* @__PURE__ */ jsx(Subtitle, { children: subtitle })
|
|
51
|
+
] });
|
|
52
|
+
};
|
|
53
|
+
const PageHeaderImpl = ({
|
|
54
|
+
containerProps,
|
|
55
|
+
className,
|
|
56
|
+
title,
|
|
57
|
+
titleOptions,
|
|
58
|
+
renderToolbar,
|
|
59
|
+
breadcrumbs = [],
|
|
60
|
+
previousPage,
|
|
61
|
+
onGoToPreviousPage = () => null,
|
|
62
|
+
subtitle = "",
|
|
63
|
+
withBottomSeparator,
|
|
64
|
+
onSelectOption,
|
|
65
|
+
optionsSelection,
|
|
66
|
+
optionsMinWidth,
|
|
67
|
+
editable = false,
|
|
68
|
+
titleInputProps,
|
|
69
|
+
editing = void 0,
|
|
70
|
+
zIndex
|
|
71
|
+
}) => {
|
|
72
|
+
const hasBreadcrumbs = !!breadcrumbs.length;
|
|
73
|
+
return /* @__PURE__ */ jsxs(
|
|
74
|
+
PageHeaderContainer,
|
|
75
|
+
{
|
|
76
|
+
...containerProps,
|
|
77
|
+
className,
|
|
78
|
+
classProps: {
|
|
79
|
+
withBottomSeparator,
|
|
80
|
+
subtitle
|
|
81
|
+
},
|
|
82
|
+
children: [
|
|
83
|
+
previousPage && /* @__PURE__ */ jsx(BackArrow, { "data-testid": "back-arrow", onClick: onGoToPreviousPage, size: DSIconSizes.M }),
|
|
84
|
+
/* @__PURE__ */ jsxs(PageHeaderMainSection, { children: [
|
|
85
|
+
hasBreadcrumbs && /* @__PURE__ */ jsx(PageHeaderBreadcrumb, { children: breadcrumbs.map((breadcrumb) => /* @__PURE__ */ jsx(DSBreadcrumb.Item, { ...breadcrumb }, breadcrumb.label)) }),
|
|
86
|
+
previousPage && /* @__PURE__ */ jsx(PageHeaderBreadcrumb, { children: /* @__PURE__ */ jsx(
|
|
87
|
+
DSBreadcrumb.Item,
|
|
88
|
+
{
|
|
89
|
+
label: previousPage.title,
|
|
90
|
+
onClick: previousPage.onClick,
|
|
91
|
+
...previousPage
|
|
92
|
+
},
|
|
93
|
+
previousPage.id
|
|
94
|
+
) }),
|
|
95
|
+
/* @__PURE__ */ jsxs(PageHeaderTitleSection, { children: [
|
|
96
|
+
/* @__PURE__ */ jsx(
|
|
97
|
+
HeaderTitle,
|
|
98
|
+
{
|
|
99
|
+
editable,
|
|
100
|
+
editing,
|
|
101
|
+
onSelectOption,
|
|
102
|
+
options: titleOptions,
|
|
103
|
+
optionsMinWidth,
|
|
104
|
+
selection: optionsSelection,
|
|
105
|
+
subtitle,
|
|
106
|
+
title,
|
|
107
|
+
titleInputProps,
|
|
108
|
+
zIndex
|
|
109
|
+
}
|
|
110
|
+
),
|
|
111
|
+
isFunction(renderToolbar) && /* @__PURE__ */ jsx(PageHeaderToolbar, { children: renderToolbar() })
|
|
112
|
+
] })
|
|
113
|
+
] })
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
);
|
|
117
|
+
};
|
|
118
|
+
var PageHeaderImpl_default = PageHeaderImpl;
|
|
119
|
+
export {
|
|
120
|
+
PageHeaderImpl_default as default
|
|
121
|
+
};
|
|
122
|
+
//# sourceMappingURL=PageHeaderImpl.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/PageHeaderImpl.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React from 'react';\nimport { isFunction } from '@elliemae/ds-utilities';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { ChevronLeft } from '@elliemae/ds-icons';\nimport DSBreadcrumb from '@elliemae/ds-breadcrumb';\nimport { DSIconSizes } from '@elliemae/ds-icon';\nimport EditableTitle from './EditableTitle.js';\nimport Title from './Title.js';\nimport DropdownTitle from './DropdownTitle.js';\n\nconst blockName = 'page-header';\n\nconst PageHeaderContainer = aggregatedClasses('div')(blockName, null, ({ withBottomSeparator, subtitle }) => ({\n 'with-bottom-separator': withBottomSeparator,\n 'with-subtitle': subtitle,\n}));\n\nconst PageHeaderMainSection = aggregatedClasses('div')(`${blockName}-main-section`);\nconst PageHeaderTitleSection = aggregatedClasses('div')(`${blockName}-title-section`);\nconst PageHeaderToolbar = aggregatedClasses('div')(`${blockName}-toolbar`, null, () => ({\n 'ie-flex-basis-auto': true,\n}));\nconst PageHeaderBreadcrumb = aggregatedClasses(DSBreadcrumb)(`${blockName}-breadcrumb`);\n\nconst PageHeaderTitle = aggregatedClasses('div')(`${blockName}-title`);\nconst Subtitle = aggregatedClasses('div')(`${blockName}-title`, 'subtitle');\nconst BackArrow = aggregatedClasses(ChevronLeft)(`${blockName}-backarrow`);\n\nconst HeaderTitle = ({\n title = '',\n options = [],\n optionsMinWidth,\n onSelectOption = () => null,\n selection,\n subtitle = '',\n editable = false,\n editing = false,\n titleInputProps,\n zIndex,\n}) => {\n const titleComponent = editable ? (\n <EditableTitle editing={editing} titleInputProps={titleInputProps}>\n {title}\n </EditableTitle>\n ) : (\n <Title>{title}</Title>\n );\n\n return (\n <PageHeaderTitle>\n {options.length ? (\n <DropdownTitle\n onSelectOption={onSelectOption}\n options={options}\n optionsMinWidth={optionsMinWidth}\n selection={selection}\n titleComponent={titleComponent}\n zIndex={zIndex}\n />\n ) : (\n titleComponent\n )}\n {subtitle && <Subtitle>{subtitle}</Subtitle>}\n </PageHeaderTitle>\n );\n};\n\nconst PageHeaderImpl = ({\n containerProps,\n className,\n title,\n titleOptions,\n renderToolbar,\n breadcrumbs = [],\n previousPage,\n onGoToPreviousPage = () => null,\n subtitle = '',\n withBottomSeparator,\n onSelectOption,\n optionsSelection,\n optionsMinWidth,\n editable = false,\n titleInputProps,\n editing = undefined,\n zIndex,\n}) => {\n const hasBreadcrumbs = !!breadcrumbs.length;\n\n return (\n <PageHeaderContainer\n {...containerProps}\n className={className}\n classProps={{\n withBottomSeparator,\n subtitle,\n }}\n >\n {previousPage && <BackArrow data-testid=\"back-arrow\" onClick={onGoToPreviousPage} size={DSIconSizes.M} />}\n <PageHeaderMainSection>\n {hasBreadcrumbs && (\n <PageHeaderBreadcrumb>\n {breadcrumbs.map((breadcrumb) => (\n <DSBreadcrumb.Item key={breadcrumb.label} {...breadcrumb} />\n ))}\n </PageHeaderBreadcrumb>\n )}\n {previousPage && (\n <PageHeaderBreadcrumb>\n <DSBreadcrumb.Item\n key={previousPage.id}\n label={previousPage.title}\n onClick={previousPage.onClick}\n {...previousPage}\n />\n </PageHeaderBreadcrumb>\n )}\n <PageHeaderTitleSection>\n <HeaderTitle\n editable={editable}\n editing={editing}\n onSelectOption={onSelectOption}\n options={titleOptions}\n optionsMinWidth={optionsMinWidth}\n selection={optionsSelection}\n subtitle={subtitle}\n title={title}\n titleInputProps={titleInputProps}\n zIndex={zIndex}\n />\n {isFunction(renderToolbar) && <PageHeaderToolbar>{renderToolbar()}</PageHeaderToolbar>}\n </PageHeaderTitleSection>\n </PageHeaderMainSection>\n </PageHeaderContainer>\n );\n};\n\nexport default PageHeaderImpl;\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
4
|
+
import DSTruncatedTooltipText from "@elliemae/ds-truncated-tooltip-text";
|
|
5
|
+
const blockName = "page-header";
|
|
6
|
+
const TitleWrapper = aggregatedClasses(DSTruncatedTooltipText)(`${blockName}-title`, "title");
|
|
7
|
+
const Title = ({ children }) => /* @__PURE__ */ jsx(TitleWrapper, { value: children });
|
|
8
|
+
var Title_default = Title;
|
|
9
|
+
export {
|
|
10
|
+
Title_default as default
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=Title.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/Title.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';\n\nconst blockName = 'page-header';\nconst TitleWrapper = aggregatedClasses(DSTruncatedTooltipText)(`${blockName}-title`, 'title');\nconst Title = ({ children }) => <TitleWrapper value={children} />;\n\nexport default Title;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACUS;AALhC,SAAS,yBAAyB;AAClC,OAAO,4BAA4B;AAEnC,MAAM,YAAY;AAClB,MAAM,eAAe,kBAAkB,sBAAsB,EAAE,GAAG,mBAAmB,OAAO;AAC5F,MAAM,QAAQ,CAAC,EAAE,SAAS,MAAM,oBAAC,gBAAa,OAAO,UAAU;AAE/D,IAAO,gBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
3
|
+
const blockName = "page-header";
|
|
4
|
+
var TitleWrapper_default = aggregatedClasses("span")(`${blockName}-title-wrapper`);
|
|
5
|
+
export {
|
|
6
|
+
TitleWrapper_default as default
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=TitleWrapper.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/TitleWrapper.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\n\nconst blockName = 'page-header';\n\nexport default aggregatedClasses('span')(`${blockName}-title-wrapper`);\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACIvB,SAAS,yBAAyB;AAElC,MAAM,YAAY;AAElB,IAAO,uBAAQ,kBAAkB,MAAM,EAAE,GAAG,yBAAyB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSPageHeader.js';\nexport { default } from './DSPageHeader.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,SAAS,WAAAA,gBAAe;",
|
|
6
|
+
"names": ["default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
declare const DSPageHeader: {
|
|
2
|
+
({ containerProps, renderToolbar, withBottomSeparator, title, titleOptions, onSelectOption, subtitle, optionsSelection, onGoToPreviousPage, previousPage, editable, editing, titleInputProps, zIndex, optionsMinWidth, ...otherProps }: {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
containerProps?: {} | undefined;
|
|
5
|
+
renderToolbar?: undefined;
|
|
6
|
+
withBottomSeparator?: boolean | undefined;
|
|
7
|
+
title?: string | undefined;
|
|
8
|
+
titleOptions?: undefined;
|
|
9
|
+
onSelectOption?: (() => null) | undefined;
|
|
10
|
+
subtitle?: string | undefined;
|
|
11
|
+
optionsSelection?: {} | undefined;
|
|
12
|
+
onGoToPreviousPage?: (() => null) | undefined;
|
|
13
|
+
previousPage: any;
|
|
14
|
+
editable?: boolean | undefined;
|
|
15
|
+
editing?: undefined;
|
|
16
|
+
titleInputProps?: {} | undefined;
|
|
17
|
+
zIndex?: number | undefined;
|
|
18
|
+
optionsMinWidth?: undefined;
|
|
19
|
+
}): import("react/jsx-runtime.js").JSX.Element;
|
|
20
|
+
propTypes: {
|
|
21
|
+
version: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
22
|
+
containerProps: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
23
|
+
renderToolbar: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
24
|
+
withBottomSeparator: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
25
|
+
title: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
26
|
+
titleOptions: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
27
|
+
onSelectOption: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
28
|
+
subtitle: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
29
|
+
optionsSelection: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
30
|
+
editable: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
31
|
+
editing: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
32
|
+
titleInputProps: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
33
|
+
previousPage: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
34
|
+
onGoToPreviousPage: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
35
|
+
zIndex: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
36
|
+
/** min width for options dropdown menu */
|
|
37
|
+
optionsMinWidth: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
38
|
+
};
|
|
39
|
+
displayName: string;
|
|
40
|
+
};
|
|
41
|
+
declare const DSPageHeaderV1WithSchema: any;
|
|
42
|
+
export { DSPageHeader, DSPageHeaderV1WithSchema };
|
|
43
|
+
export default DSPageHeader;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const DropdownTitle: {
|
|
2
|
+
({ titleComponent, onSelectOption, options, optionsMinWidth, selection, zIndex }: {
|
|
3
|
+
titleComponent: any;
|
|
4
|
+
onSelectOption: any;
|
|
5
|
+
options: any;
|
|
6
|
+
optionsMinWidth: any;
|
|
7
|
+
selection: any;
|
|
8
|
+
zIndex: any;
|
|
9
|
+
}): import("react/jsx-runtime.js").JSX.Element;
|
|
10
|
+
propTypes: {};
|
|
11
|
+
};
|
|
12
|
+
export default DropdownTitle;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
declare const EditableTitle: {
|
|
3
|
+
({ children: value, editing: editingProp, titleInputProps }: {
|
|
4
|
+
children: any;
|
|
5
|
+
editing: any;
|
|
6
|
+
titleInputProps: any;
|
|
7
|
+
}): import("react/jsx-runtime.js").JSX.Element;
|
|
8
|
+
propTypes: {
|
|
9
|
+
/** The title text */
|
|
10
|
+
children: PropTypes.Requireable<string>;
|
|
11
|
+
/** Whether the title is editing or not */
|
|
12
|
+
editing: PropTypes.Requireable<boolean>;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default EditableTitle;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const PageHeaderImpl: ({ containerProps, className, title, titleOptions, renderToolbar, breadcrumbs, previousPage, onGoToPreviousPage, subtitle, withBottomSeparator, onSelectOption, optionsSelection, optionsMinWidth, editable, titleInputProps, editing, zIndex, }: {
|
|
2
|
+
containerProps: any;
|
|
3
|
+
className: any;
|
|
4
|
+
title: any;
|
|
5
|
+
titleOptions: any;
|
|
6
|
+
renderToolbar: any;
|
|
7
|
+
breadcrumbs?: never[] | undefined;
|
|
8
|
+
previousPage: any;
|
|
9
|
+
onGoToPreviousPage?: (() => null) | undefined;
|
|
10
|
+
subtitle?: string | undefined;
|
|
11
|
+
withBottomSeparator: any;
|
|
12
|
+
onSelectOption: any;
|
|
13
|
+
optionsSelection: any;
|
|
14
|
+
optionsMinWidth: any;
|
|
15
|
+
editable?: boolean | undefined;
|
|
16
|
+
titleInputProps: any;
|
|
17
|
+
editing?: undefined;
|
|
18
|
+
zIndex: any;
|
|
19
|
+
}) => import("react/jsx-runtime.js").JSX.Element;
|
|
20
|
+
export default PageHeaderImpl;
|