@elliemae/ds-global-header 3.0.0-alpha.0 → 3.0.0-alpha.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 (59) hide show
  1. package/dist/cjs/components/Breadcrumb/GlobalHeaderBreadcrumb.js +30 -5
  2. package/dist/cjs/components/Breadcrumb/GlobalHeaderBreadcrumb.js.map +1 -1
  3. package/dist/cjs/components/Breadcrumb/PureBreadcrumb.js +41 -13
  4. package/dist/cjs/components/Breadcrumb/PureBreadcrumb.js.map +1 -1
  5. package/dist/cjs/components/Toolbar/ToolbarItems.js +43 -17
  6. package/dist/cjs/components/Toolbar/ToolbarItems.js.map +1 -1
  7. package/dist/cjs/config/useGetPropsWithDefaults.js +15 -4
  8. package/dist/cjs/config/useGetPropsWithDefaults.js.map +1 -1
  9. package/dist/cjs/outOfTheBox/AppPicker/AppPicker.js +39 -10
  10. package/dist/cjs/outOfTheBox/AppPicker/AppPicker.js.map +1 -1
  11. package/dist/cjs/outOfTheBox/PopupMenu/PopupMenu.js +31 -5
  12. package/dist/cjs/outOfTheBox/PopupMenu/PopupMenu.js.map +1 -1
  13. package/dist/cjs/outOfTheBox/PopupMenu/PopupMenuContent.js +24 -16
  14. package/dist/cjs/outOfTheBox/PopupMenu/PopupMenuContent.js.map +1 -1
  15. package/dist/cjs/outOfTheBox/SearchToggle/SearchToggle.js +31 -5
  16. package/dist/cjs/outOfTheBox/SearchToggle/SearchToggle.js.map +1 -1
  17. package/dist/esm/components/Breadcrumb/GlobalHeaderBreadcrumb.js +32 -5
  18. package/dist/esm/components/Breadcrumb/GlobalHeaderBreadcrumb.js.map +1 -1
  19. package/dist/esm/components/Breadcrumb/PureBreadcrumb.js +43 -13
  20. package/dist/esm/components/Breadcrumb/PureBreadcrumb.js.map +1 -1
  21. package/dist/esm/components/Toolbar/ToolbarItems.js +45 -17
  22. package/dist/esm/components/Toolbar/ToolbarItems.js.map +1 -1
  23. package/dist/esm/config/useGetPropsWithDefaults.js +17 -4
  24. package/dist/esm/config/useGetPropsWithDefaults.js.map +1 -1
  25. package/dist/esm/outOfTheBox/AppPicker/AppPicker.js +41 -10
  26. package/dist/esm/outOfTheBox/AppPicker/AppPicker.js.map +1 -1
  27. package/dist/esm/outOfTheBox/PopupMenu/PopupMenu.js +33 -5
  28. package/dist/esm/outOfTheBox/PopupMenu/PopupMenu.js.map +1 -1
  29. package/dist/esm/outOfTheBox/PopupMenu/PopupMenuContent.js +26 -16
  30. package/dist/esm/outOfTheBox/PopupMenu/PopupMenuContent.js.map +1 -1
  31. package/dist/esm/outOfTheBox/SearchToggle/SearchToggle.js +33 -5
  32. package/dist/esm/outOfTheBox/SearchToggle/SearchToggle.js.map +1 -1
  33. package/package.json +10 -9
  34. package/dist/types/GlobalHeader.d.ts +0 -39
  35. package/dist/types/GlobalHeaderContainer.d.ts +0 -3
  36. package/dist/types/GlobalHeaderContext.d.ts +0 -3
  37. package/dist/types/GlobalHeaderTypes.d.ts +0 -85
  38. package/dist/types/components/Breadcrumb/GlobalHeaderBreadcrumb.d.ts +0 -2
  39. package/dist/types/components/Breadcrumb/PureBreadcrumb.d.ts +0 -3
  40. package/dist/types/components/Breadcrumb/styles.d.ts +0 -5
  41. package/dist/types/components/Title/GlobalHeaderTitle.d.ts +0 -2
  42. package/dist/types/components/Toolbar/GlobalHeaderToolbar.d.ts +0 -2
  43. package/dist/types/components/Toolbar/ToolbarItems.d.ts +0 -2
  44. package/dist/types/components/Toolbar/styles.d.ts +0 -1
  45. package/dist/types/config/useGetPropsWithDefaults.d.ts +0 -2
  46. package/dist/types/config/useGlobalHeader.d.ts +0 -2
  47. package/dist/types/config/useValidateProps.d.ts +0 -2
  48. package/dist/types/config/validateHelpers.d.ts +0 -27
  49. package/dist/types/defaultProps.d.ts +0 -2
  50. package/dist/types/index.d.ts +0 -2
  51. package/dist/types/outOfTheBox/AppPicker/AppPicker.d.ts +0 -8
  52. package/dist/types/outOfTheBox/PopupMenu/PopupMenu.d.ts +0 -3
  53. package/dist/types/outOfTheBox/PopupMenu/PopupMenuContent.d.ts +0 -3
  54. package/dist/types/outOfTheBox/PopupMenu/styles.d.ts +0 -4
  55. package/dist/types/outOfTheBox/SearchToggle/SearchToggle.d.ts +0 -2
  56. package/dist/types/outOfTheBox/SearchToggle/styles.d.ts +0 -1
  57. package/dist/types/outOfTheBox/index.d.ts +0 -3
  58. package/dist/types/propTypes.d.ts +0 -29
  59. package/dist/types/styles.d.ts +0 -2
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/PopupMenu/PopupMenuContent.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useRef, useEffect, useMemo, useContext } from 'react';\nimport { getAriaProps, getDataProps } from '@elliemae/ds-props-helpers';\nimport { Separator, ItemWrapper, Label, List } from './styles';\nimport type { PopupMenuContentPropsT as Props } from '../../GlobalHeaderTypes';\nimport { GlobalHeaderContext } from '../../GlobalHeaderContext';\n\nexport const PopupMenuContent = React.memo(({ options, onItemClick, onClose, popupOnKeyPress }: Props): JSX.Element => {\n const { instanceUID } = useContext(GlobalHeaderContext);\n\n const menuRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n (menuRef.current?.firstChild as HTMLButtonElement)?.focus();\n }, []);\n\n const content = useMemo(\n () =>\n options.map((option) => {\n const { type, Icon, label = '', onClick, Content, id } = option;\n\n const ariaAndDataProps = {\n ...getAriaProps(option),\n ...getDataProps(option),\n };\n\n const handleClick = (e: React.MouseEvent<HTMLElement, MouseEvent>) => {\n onItemClick(e);\n if (onClick) onClick(e);\n };\n\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (e.code === 'Escape') onClose();\n if (popupOnKeyPress) popupOnKeyPress(e);\n };\n\n switch (type) {\n case 'separator':\n return <Separator key={`${instanceUID}-separator-${label}`} {...ariaAndDataProps} />;\n case 'custom':\n return (\n <ItemWrapper\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n key={`${instanceUID}-popup-${label}`}\n id={id}\n {...ariaAndDataProps}\n >\n {Content && <Content />}\n </ItemWrapper>\n );\n default:\n return (\n <ItemWrapper\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n key={`${instanceUID}-popup-${label}`}\n id={id}\n {...ariaAndDataProps}\n >\n {Icon && <Icon />}\n {Label && <Label>{label}</Label>}\n </ItemWrapper>\n );\n }\n }),\n [options, onItemClick, onClose, popupOnKeyPress, instanceUID],\n );\n return <List ref={menuRef}>{content}</List>;\n});\n"],
5
- "mappings": "AAAA;ACAA;AACA;AACA;AAEA;AAEO,MAAM,mBAAmB,OAAM,KAAK,CAAC,EAAE,SAAS,aAAa,SAAS,sBAA0C;AACrH,QAAM,EAAE,gBAAgB,WAAW;AAEnC,QAAM,UAAU,OAAuB;AAEvC,YAAU,MAAM;AACd,IAAC,QAAQ,SAAS,YAAkC;AAAA,KACnD;AAEH,QAAM,UAAU,QACd,MACE,QAAQ,IAAI,CAAC,WAAW;AACtB,UAAM,EAAE,MAAM,MAAM,QAAQ,IAAI,SAAS,SAAS,OAAO;AAEzD,UAAM,mBAAmB;AAAA,SACpB,aAAa;AAAA,SACb,aAAa;AAAA;AAGlB,UAAM,cAAc,CAAC,MAAiD;AACpE,kBAAY;AACZ,UAAI;AAAS,gBAAQ;AAAA;AAGvB,UAAM,gBAAgB,CAAC,MAA2B;AAChD,UAAI,EAAE,SAAS;AAAU;AACzB,UAAI;AAAiB,wBAAgB;AAAA;AAGvC,YAAQ;AAAA,WACD;AACH,eAAO,qCAAC,WAAD;AAAA,UAAW,KAAK,GAAG,yBAAyB;AAAA,aAAa;AAAA;AAAA,WAC7D;AACH,eACE,qCAAC,aAAD;AAAA,UACE,SAAS;AAAA,UACT,WAAW;AAAA,UACX,KAAK,GAAG,qBAAqB;AAAA,UAC7B;AAAA,aACI;AAAA,WAEH,WAAW,qCAAC,SAAD;AAAA;AAIhB,eACE,qCAAC,aAAD;AA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Q,qCAAC,MAAD,OACR,SAAS,qCAAC,OAAD,MAAQ;AAAA;AAAA,MAK9B,CAAC,SAAS,aAAa,SAAS,iBAAiB;AAEnD,SAAO,qCAAC,MAAD;AAAA,IAAM,KAAK;AAAA,KAAU;AAAA;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,31 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
4
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
+ var __spreadValues = (a, b) => {
7
+ for (var prop in b || (b = {}))
8
+ if (__hasOwnProp.call(b, prop))
9
+ __defNormalProp(a, prop, b[prop]);
10
+ if (__getOwnPropSymbols)
11
+ for (var prop of __getOwnPropSymbols(b)) {
12
+ if (__propIsEnum.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ }
15
+ return a;
16
+ };
17
+ var __objRest = (source, exclude) => {
18
+ var target = {};
19
+ for (var prop in source)
20
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
21
+ target[prop] = source[prop];
22
+ if (source != null && __getOwnPropSymbols)
23
+ for (var prop of __getOwnPropSymbols(source)) {
24
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
25
+ target[prop] = source[prop];
26
+ }
27
+ return target;
28
+ };
1
29
  import * as React from "react";
2
30
  import React2, { useState, useCallback, useRef } from "react";
3
31
  import { Search } from "@elliemae/ds-icons";
@@ -6,7 +34,8 @@ import { DSIconColors } from "@elliemae/ds-icon";
6
34
  import { DSNavSearchBox } from "@elliemae/ds-form";
7
35
  import { StyledNavSearchBoxContainer } from "./styles";
8
36
  import { Button } from "../../components/Toolbar/styles";
9
- const SearchToggle = ({ id, componentProps, ...otherProps }) => {
37
+ const SearchToggle = (_a) => {
38
+ var _b = _a, { id, componentProps } = _b, otherProps = __objRest(_b, ["id", "componentProps"]);
10
39
  const [isOpen, setIsOpen] = useState(false);
11
40
  const inputRef = useRef(null);
12
41
  const triggerRef = useRef(null);
@@ -64,12 +93,11 @@ const SearchToggle = ({ id, componentProps, ...otherProps }) => {
64
93
  onBlur,
65
94
  innerRef: inputRef,
66
95
  autoFocus: true
67
- })) : /* @__PURE__ */ React2.createElement(Button, {
96
+ })) : /* @__PURE__ */ React2.createElement(Button, __spreadValues({
68
97
  onClick: handleOnClick,
69
98
  ref: triggerRef,
70
- id,
71
- ...getDataProps(otherProps)
72
- }, /* @__PURE__ */ React2.createElement(Search, {
99
+ id
100
+ }, getDataProps(otherProps)), /* @__PURE__ */ React2.createElement(Search, {
73
101
  color: DSIconColors.WHITE
74
102
  }));
75
103
  };
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/SearchToggle/SearchToggle.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useState, useCallback, useRef } from 'react';\nimport { Search } from '@elliemae/ds-icons';\nimport { getDataProps } from '@elliemae/ds-props-helpers';\nimport { DSIconColors } from '@elliemae/ds-icon';\nimport { DSNavSearchBox } from '@elliemae/ds-form';\nimport { StyledNavSearchBoxContainer } from './styles';\nimport { Button } from '../../components/Toolbar/styles';\nimport type { SearchTogglePropsT } from 'index.d';\n\nexport const SearchToggle = ({ id, componentProps, ...otherProps }: SearchTogglePropsT): JSX.Element => {\n const [isOpen, setIsOpen] = useState<boolean>(false);\n const inputRef = useRef<HTMLInputElement | null>(null);\n const triggerRef = useRef<HTMLButtonElement | null>(null);\n const containerRef = useRef<HTMLDivElement | null>(null);\n\n const {\n onNext,\n onPrevious,\n currentResultIndex,\n totalResults,\n placeholder,\n value,\n onChange,\n onBlur,\n onClear,\n isOpen: userIsOpen,\n onKeyDown,\n onClick,\n } = componentProps;\n\n const handleOnClick = useCallback(\n (e) => {\n if (userIsOpen === undefined) setIsOpen(true);\n if (onClick) onClick(e);\n },\n [onClick, userIsOpen],\n );\n\n const handleOnKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (userIsOpen === undefined) {\n if (e.code === 'Escape') {\n setIsOpen(false);\n setTimeout(() => triggerRef.current?.focus());\n }\n }\n if (onKeyDown) onKeyDown(e);\n },\n [onKeyDown, userIsOpen],\n );\n\n const handleOnBlur = useCallback(() => {\n setTimeout(() => {\n const contains = containerRef.current?.contains(document.activeElement);\n if (value === '' && !contains) setIsOpen(false);\n });\n }, [value]);\n\n return userIsOpen || isOpen ? (\n <StyledNavSearchBoxContainer onKeyDown={handleOnKeyDown} ref={containerRef} onBlur={handleOnBlur}>\n <DSNavSearchBox\n onNext={onNext}\n onPrevious={onPrevious}\n currentResultIndex={currentResultIndex}\n totalResults={totalResults}\n onClear={onClear}\n placeholder={placeholder}\n onChange={onChange}\n value={value}\n onBlur={onBlur}\n innerRef={inputRef}\n autoFocus\n />\n </StyledNavSearchBoxContainer>\n ) : (\n <Button onClick={handleOnClick} ref={triggerRef} id={id} {...getDataProps(otherProps)}>\n <Search color={DSIconColors.WHITE} />\n </Button>\n );\n};\n"],
5
- "mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AAGO,MAAM,eAAe,CAAC,EAAE,IAAI,mBAAmB,iBAAkD;AACtG,QAAM,CAAC,QAAQ,aAAa,SAAkB;AAC9C,QAAM,WAAW,OAAgC;AACjD,QAAM,aAAa,OAAiC;AACpD,QAAM,eAAe,OAA8B;AAEnD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,MACE;AAEJ,QAAM,gBAAgB,YACpB,CAAC,MAAM;AACL,QAAI,eAAe;AAAW,gBAAU;AACxC,QAAI;AAAS,cA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AAA,IACR;AAAA,IACA;AAAA,MACE;AAEJ,QAAM,gBAAgB,YACpB,CAAC,MAAM;AACL,QAAI,eAAe;AAAW,gBAAU;AACxC,QAAI;AAAS,cAAQ;AAAA,KAEvB,CAAC,SAAS;AAGZ,QAAM,kBAAkB,YACtB,CAAC,MAA2B;AAC1B,QAAI,eAAe,QAAW;AAC5B,UAAI,EAAE,SAAS,UAAU;AACvB,kBAAU;AACV,mBAAW,MAAM,WAAW,SAAS;AAAA;AAAA;AAGzC,QAAI;AAAW,gBAAU;AAAA,KAE3B,CAAC,WAAW;AAGd,QAAM,eAAe,YAAY,MAAM;AACrC,eAAW,MAAM;AACf,YAAM,WAAW,aAAa,SAAS,SAAS,SAAS;AACzD,UAAI,UAAU,MAAM,CAAC;AAAU,kBAAU;AAAA;AAAA,KAE1C,CAAC;AAEJ,SAAO,cAAc,SACnB,qCAAC,6BAAD;AAAA,IAA6B,WAAW;AAAA,IAAiB,KAAK;AAAA,IAAc,QAAQ;AAAA,KAClF,qCAAC,gBAAD;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV,WAAS;AAAA,QAIb,qCAAC,QAAD;AAAA,IAAQ,SAAS;AAAA,IAAe,KAAK;AAAA,IAAY;AAAA,KAAY,aAAa,cACxE,qCAAC,QAAD;AAAA,IAAQ,OAAO,aAAa;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-global-header",
3
- "version": "3.0.0-alpha.0",
3
+ "version": "3.0.0-alpha.1",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Global Header",
6
6
  "files": [
@@ -135,14 +135,14 @@
135
135
  "indent": 4
136
136
  },
137
137
  "dependencies": {
138
- "@elliemae/ds-app-picker": "3.0.0-alpha.0",
139
- "@elliemae/ds-form": "3.0.0-alpha.0",
140
- "@elliemae/ds-grid": "3.0.0-alpha.0",
141
- "@elliemae/ds-icon": "3.0.0-alpha.0",
142
- "@elliemae/ds-icons": "3.0.0-alpha.0",
143
- "@elliemae/ds-popperjs": "3.0.0-alpha.0",
144
- "@elliemae/ds-props-helpers": "3.0.0-alpha.0",
145
- "@elliemae/ds-utilities": "3.0.0-alpha.0",
138
+ "@elliemae/ds-app-picker": "3.0.0-alpha.1",
139
+ "@elliemae/ds-form": "3.0.0-alpha.1",
140
+ "@elliemae/ds-grid": "3.0.0-alpha.1",
141
+ "@elliemae/ds-icon": "3.0.0-alpha.1",
142
+ "@elliemae/ds-icons": "3.0.0-alpha.1",
143
+ "@elliemae/ds-popperjs": "3.0.0-alpha.1",
144
+ "@elliemae/ds-props-helpers": "3.0.0-alpha.1",
145
+ "@elliemae/ds-utilities": "3.0.0-alpha.1",
146
146
  "react-desc": "~4.1.3",
147
147
  "uid": "~2.0.0"
148
148
  },
@@ -163,6 +163,7 @@
163
163
  "dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
164
164
  "test": "node ../../scripts/testing/test.mjs",
165
165
  "lint": "node ../../scripts/lint.mjs",
166
+ "dts": "node ../../scripts/dts.mjs",
166
167
  "build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
167
168
  }
168
169
  }
@@ -1,39 +0,0 @@
1
- /// <reference path="../../../../shared/typings/react-desc.d.ts" />
2
- /// <reference types="react" />
3
- import type { GlobalHeaderPropsT as Props } from './GlobalHeaderTypes';
4
- declare const GlobalHeader: {
5
- (props: Props): JSX.Element;
6
- defaultProps: Props;
7
- propTypes: {
8
- Logo: {
9
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
10
- deprecated: import("react-desc").PropTypesDescValidator;
11
- };
12
- isRequired: import("react-desc").PropTypesDescValue;
13
- };
14
- LogoWithBrand: {
15
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
16
- deprecated: import("react-desc").PropTypesDescValidator;
17
- };
18
- isRequired: import("react-desc").PropTypesDescValue;
19
- };
20
- breadcrumb: {
21
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
22
- deprecated: import("react-desc").PropTypesDescValidator;
23
- };
24
- isRequired: import("react-desc").PropTypesDescValue;
25
- };
26
- toolbar: {
27
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
28
- deprecated: import("react-desc").PropTypesDescValidator;
29
- };
30
- isRequired: import("react-desc").PropTypesDescValue;
31
- };
32
- };
33
- };
34
- declare const GlobalHeaderWithSchema: {
35
- (props?: unknown): JSX.Element;
36
- propTypes: unknown;
37
- toTypescript: () => import("react-desc").TypescriptSchema;
38
- };
39
- export { GlobalHeader, GlobalHeaderWithSchema };
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import type { GlobalHeaderContainerT } from './GlobalHeaderTypes';
3
- export declare const GlobalHeaderContainer: ({ children }: GlobalHeaderContainerT) => JSX.Element;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import type { ContextT } from './GlobalHeaderTypes';
3
- export declare const GlobalHeaderContext: import("react").Context<ContextT>;
@@ -1,85 +0,0 @@
1
- import React from 'react';
2
- import { DSAppPicker } from '@elliemae/ds-app-picker';
3
- export declare type AppPickerProps = React.ComponentProps<typeof DSAppPicker>;
4
- export interface ContextT {
5
- showIconOnly: boolean;
6
- setShowIconOnly: React.Dispatch<React.SetStateAction<boolean>>;
7
- instanceUID: string;
8
- globalHeaderToolbarGrid: string[];
9
- globalHeaderBreadcrumbGrid: string[];
10
- props: GlobalHeaderPropsT;
11
- }
12
- export interface GlobalHeaderContainerT {
13
- children: React.ReactNode;
14
- }
15
- export interface GlobalHeaderPropsT {
16
- Logo?: React.ComponentType;
17
- LogoWithBrand?: React.ComponentType;
18
- breadcrumb?: BreadcrumbItemT[];
19
- toolbar?: ToolbarItemT[];
20
- appPickerProps?: AppPickerProps;
21
- }
22
- export interface BreadcrumbItemT {
23
- label: string;
24
- hasNext?: boolean;
25
- isSelected?: boolean;
26
- onClick?: (event: React.MouseEvent<HTMLElement>) => void;
27
- length: number;
28
- }
29
- export interface ToolbarItemT {
30
- type?: 'ds-app-picker' | 'ds-popup-menu' | 'ds-search-toggle' | 'custom';
31
- label: string;
32
- Icon: React.ComponentType<Record<string, unknown>>;
33
- onClick: (event: React.MouseEvent<HTMLElement>) => void;
34
- componentProps?: PopupPropsT | AppPickerProps | SearchTogglePropsT;
35
- CustomComponent?: React.ComponentType<{
36
- item: ToolbarItemT;
37
- }>;
38
- }
39
- export interface PopupPropsT {
40
- Icon?: React.ComponentType<Record<string, unknown>>;
41
- options: PopupMenuItemT[];
42
- closeOnClick?: boolean;
43
- title?: string;
44
- onClick: (event: React.MouseEvent<HTMLElement>) => void;
45
- }
46
- export interface AppPickerMenuItemT {
47
- label: string;
48
- icon: React.ComponentType;
49
- onClick: (event: React.MouseEvent<HTMLElement>) => void;
50
- disabled?: boolean;
51
- }
52
- export interface PopupMenuItemT extends Record<string, unknown> {
53
- type?: string;
54
- Icon?: React.ComponentType;
55
- label?: string;
56
- onClick?: (event: React.MouseEvent<HTMLElement>) => void;
57
- closeOnClick?: boolean;
58
- Content?: React.ComponentType;
59
- }
60
- export interface PopupMenuContentPropsT {
61
- options: PopupMenuItemT[];
62
- onItemClick: (event: React.MouseEvent<HTMLElement>) => void;
63
- onClose: () => void;
64
- }
65
- export interface PipeT {
66
- showIconOnly: boolean;
67
- }
68
- export interface LabelT {
69
- isSelected: boolean;
70
- isOnlyItem: boolean;
71
- }
72
- export interface SearchTogglePropsT {
73
- onNext: () => void;
74
- onPrevious: () => void;
75
- currentResultIndex: number;
76
- totalResults: number;
77
- placeholder: string;
78
- value: string;
79
- onChange: () => void;
80
- onBlur: () => void;
81
- onClear: () => void;
82
- isOpen: boolean;
83
- onKeyDown: (e: React.KeyboardEvent) => void;
84
- onClick: (e: React.MouseEvent) => void;
85
- }
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const GlobalHeaderBreadcrumb: () => JSX.Element;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- import type { BreadcrumbItemT as Props } from '../../GlobalHeaderTypes';
3
- export declare const PureBreadcrumb: React.MemoExoticComponent<({ onClick, isSelected, length, label, hasNext, id, ...rest }: Props) => JSX.Element>;
@@ -1,5 +0,0 @@
1
- import type { LabelT, PipeT } from '../../GlobalHeaderTypes';
2
- export declare const Pipe: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, PipeT, never>;
3
- export declare const BreadcrumbItem: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
4
- export declare const LabelButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
5
- export declare const Label: import("styled-components").StyledComponent<"p", import("styled-components").DefaultTheme, LabelT, never>;
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const GlobalHeaderTitle: () => JSX.Element;
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const GlobalHeaderToolbar: () => JSX.Element;
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const ToolbarItems: () => JSX.Element;
@@ -1 +0,0 @@
1
- export declare const Button: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
@@ -1,2 +0,0 @@
1
- import type { GlobalHeaderPropsT } from '../GlobalHeaderTypes';
2
- export declare const useGetPropsWithDefaults: (props: GlobalHeaderPropsT) => GlobalHeaderPropsT;
@@ -1,2 +0,0 @@
1
- import type { ContextT, GlobalHeaderPropsT } from '../GlobalHeaderTypes';
2
- export declare const useGlobalHeader: (props: GlobalHeaderPropsT) => ContextT;
@@ -1,2 +0,0 @@
1
- import { GlobalHeaderPropsT } from '../GlobalHeaderTypes';
2
- export declare const useValidateProps: (props: GlobalHeaderPropsT) => void;
@@ -1,27 +0,0 @@
1
- export declare const breadcrumbProps: {
2
- label: string;
3
- onClick: string;
4
- hasNext: string;
5
- isSelected: string;
6
- };
7
- export declare const toolbarProps: {
8
- label: string;
9
- type: string;
10
- componentProps: string;
11
- Icon: string;
12
- onClick: string;
13
- options: string;
14
- closeOnClick: string;
15
- apps: string;
16
- customApps: string;
17
- sectionTitle: string;
18
- customSectionTitle: string;
19
- };
20
- export declare const isObject: (obj: unknown) => boolean;
21
- export declare const getVariableType: (arg: unknown) => string;
22
- export declare const isValidToolbarType: (string: unknown) => boolean;
23
- export declare const throwBreadcrumbItemError: (validPropKey: keyof typeof breadcrumbProps, invalidProp: unknown) => void;
24
- export declare const throwToolbarPopupItemError: (validPropKey: keyof typeof toolbarProps, invalidProp: unknown) => void;
25
- export declare const throwToolbarAppPickerItemError: (validPropKey: keyof typeof toolbarProps, invalidProp: unknown) => void;
26
- export declare const throwToolbarItemGenericError: (validPropKey: keyof typeof toolbarProps, invalidProp: unknown) => void;
27
- export declare const throwLogoError: (validPropKey: string, invalidProp: unknown) => void;
@@ -1,2 +0,0 @@
1
- import type { GlobalHeaderPropsT } from './GlobalHeaderTypes';
2
- export declare const defaultProps: GlobalHeaderPropsT;
@@ -1,2 +0,0 @@
1
- export * from './GlobalHeader';
2
- export { GlobalHeader as default } from './GlobalHeader';
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { DSAppPicker } from '@elliemae/ds-app-picker';
3
- declare type AppPickerProps = React.ComponentProps<typeof DSAppPicker>;
4
- export declare const AppPicker: ({ label, id, componentProps, ...otherProps }: AppPickerProps & {
5
- label: string;
6
- triggerOnClick?: React.MouseEventHandler<Element> | undefined;
7
- }) => JSX.Element;
8
- export {};
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import type { PopupPropsT as Props } from '../../GlobalHeaderTypes';
3
- export declare const PopupMenu: ({ Icon, title, onClick, id, componentProps, ...otherProps }: Props) => JSX.Element;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- import type { PopupMenuContentPropsT as Props } from '../../GlobalHeaderTypes';
3
- export declare const PopupMenuContent: React.MemoExoticComponent<({ options, onItemClick, onClose, popupOnKeyPress }: Props) => JSX.Element>;
@@ -1,4 +0,0 @@
1
- export declare const List: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
2
- export declare const ItemWrapper: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
3
- export declare const Label: import("styled-components").StyledComponent<"p", import("styled-components").DefaultTheme, {}, never>;
4
- export declare const Separator: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const SearchToggle: ({ id, componentProps, ...otherProps }: SearchTogglePropsT) => JSX.Element;
@@ -1 +0,0 @@
1
- export declare const StyledNavSearchBoxContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -1,3 +0,0 @@
1
- export * from './AppPicker/AppPicker';
2
- export * from './PopupMenu/PopupMenu';
3
- export * from './SearchToggle/SearchToggle';
@@ -1,29 +0,0 @@
1
- /// <reference path="../../../../shared/typings/react-desc.d.ts" />
2
- export declare const breadcrumbItem: import("react-desc").PropTypesDescValue;
3
- export declare const toolbarItem: import("react-desc").PropTypesDescValue;
4
- export declare const globalHeaderProps: {
5
- Logo: {
6
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
7
- deprecated: import("react-desc").PropTypesDescValidator;
8
- };
9
- isRequired: import("react-desc").PropTypesDescValue;
10
- };
11
- LogoWithBrand: {
12
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
13
- deprecated: import("react-desc").PropTypesDescValidator;
14
- };
15
- isRequired: import("react-desc").PropTypesDescValue;
16
- };
17
- breadcrumb: {
18
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
19
- deprecated: import("react-desc").PropTypesDescValidator;
20
- };
21
- isRequired: import("react-desc").PropTypesDescValue;
22
- };
23
- toolbar: {
24
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
25
- deprecated: import("react-desc").PropTypesDescValidator;
26
- };
27
- isRequired: import("react-desc").PropTypesDescValue;
28
- };
29
- };
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const Wrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/dist/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;