@elliemae/ds-global-header 3.32.2-next.1 → 3.33.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/cjs/DSGlobalHeader.js +14 -16
  2. package/dist/cjs/DSGlobalHeader.js.map +2 -2
  3. package/dist/cjs/config/constants.js +40 -0
  4. package/dist/cjs/config/constants.js.map +7 -0
  5. package/dist/cjs/config/useGlobalHeader.js +10 -2
  6. package/dist/cjs/config/useGlobalHeader.js.map +2 -2
  7. package/dist/cjs/parts/Breadcrumb/PureBreadcrumb.js.map +2 -2
  8. package/dist/cjs/parts/Breadcrumb/styles.js +7 -3
  9. package/dist/cjs/parts/Breadcrumb/styles.js.map +2 -2
  10. package/dist/cjs/parts/Breadcrumb/useGlobalHeaderBreadcrumb.js +5 -3
  11. package/dist/cjs/parts/Breadcrumb/useGlobalHeaderBreadcrumb.js.map +2 -2
  12. package/dist/cjs/parts/Toolbar/GlobalHeaderToolbar.js +124 -114
  13. package/dist/cjs/parts/Toolbar/GlobalHeaderToolbar.js.map +2 -2
  14. package/dist/cjs/parts/Toolbar/styles.js +3 -1
  15. package/dist/cjs/parts/Toolbar/styles.js.map +2 -2
  16. package/dist/cjs/parts/styles.js +3 -3
  17. package/dist/cjs/parts/styles.js.map +1 -1
  18. package/dist/cjs/sharedTypes.js.map +1 -1
  19. package/dist/esm/DSGlobalHeader.js +14 -16
  20. package/dist/esm/DSGlobalHeader.js.map +2 -2
  21. package/dist/esm/config/constants.js +10 -0
  22. package/dist/esm/config/constants.js.map +7 -0
  23. package/dist/esm/config/useGlobalHeader.js +10 -2
  24. package/dist/esm/config/useGlobalHeader.js.map +2 -2
  25. package/dist/esm/parts/Breadcrumb/PureBreadcrumb.js.map +2 -2
  26. package/dist/esm/parts/Breadcrumb/styles.js +7 -3
  27. package/dist/esm/parts/Breadcrumb/styles.js.map +2 -2
  28. package/dist/esm/parts/Breadcrumb/useGlobalHeaderBreadcrumb.js +5 -3
  29. package/dist/esm/parts/Breadcrumb/useGlobalHeaderBreadcrumb.js.map +2 -2
  30. package/dist/esm/parts/Toolbar/GlobalHeaderToolbar.js +124 -114
  31. package/dist/esm/parts/Toolbar/GlobalHeaderToolbar.js.map +2 -2
  32. package/dist/esm/parts/Toolbar/styles.js +3 -1
  33. package/dist/esm/parts/Toolbar/styles.js.map +2 -2
  34. package/dist/esm/parts/styles.js +3 -3
  35. package/dist/esm/parts/styles.js.map +1 -1
  36. package/dist/types/config/constants.d.ts +5 -0
  37. package/dist/types/config/useGlobalHeader.d.ts +1 -0
  38. package/dist/types/parts/Breadcrumb/GlobalHeaderBreadcrumb.d.ts +0 -1
  39. package/dist/types/parts/Logo/GlobalHeaderLogo.d.ts +0 -1
  40. package/dist/types/parts/Toolbar/GlobalHeaderToolbar.d.ts +0 -1
  41. package/dist/types/parts/Toolbar/outOfTheBox/AppPicker/AppPicker.d.ts +0 -1
  42. package/dist/types/parts/Toolbar/outOfTheBox/PopupMenu/PopupMenu.d.ts +0 -1
  43. package/dist/types/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggle.d.ts +0 -1
  44. package/dist/types/parts/Toolbar/styles.d.ts +3 -1
  45. package/dist/types/sharedTypes.d.ts +1 -0
  46. package/package.json +11 -10
@@ -35,7 +35,7 @@ __export(DSGlobalHeader_exports, {
35
35
  module.exports = __toCommonJS(DSGlobalHeader_exports);
36
36
  var React = __toESM(require("react"));
37
37
  var import_jsx_runtime = require("react/jsx-runtime");
38
- var import_lodash = require("lodash");
38
+ var import_react = require("react");
39
39
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
40
40
  var import_react_desc_prop_types = require("./react-desc-prop-types.js");
41
41
  var import_GlobalHeaderLogo = require("./parts/Logo/GlobalHeaderLogo.js");
@@ -45,28 +45,26 @@ var import_DSGlobalHeaderContext = require("./DSGlobalHeaderContext.js");
45
45
  var import_useGlobalHeader = require("./config/useGlobalHeader.js");
46
46
  var import_useValidateProps = require("./config/useValidateProps.js");
47
47
  var import_exported_related = require("./exported-related/index.js");
48
+ var import_constants = require("./config/constants.js");
48
49
  var import_styles = require("./parts/styles.js");
49
50
  const DSGlobalHeader = (props) => {
50
51
  (0, import_useValidateProps.useValidateProps)(props);
51
52
  const ctx = (0, import_useGlobalHeader.useGlobalHeader)(props);
53
+ const { fontDetector } = ctx;
52
54
  const propsWithDefaults = ctx.props;
53
- const globalAttrs = (0, import_lodash.omit)((0, import_ds_props_helpers.useGetGlobalAttributes)(propsWithDefaults), ["cols", "rows", "wrap"]);
55
+ const globalAttrs = (0, import_ds_props_helpers.useGetGlobalAttributes)(propsWithDefaults);
54
56
  const xstyledAttrs = (0, import_ds_props_helpers.useGetXstyledProps)(propsWithDefaults);
55
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
56
- import_styles.Container,
57
- {
58
- ...globalAttrs,
59
- ...xstyledAttrs,
60
- cols: ["auto", "1fr", "auto"],
61
- forwardedAs: "header",
62
- "data-testid": "ds-global-header",
63
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_DSGlobalHeaderContext.DSGlobalHeaderContext.Provider, { value: ctx, children: [
64
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_GlobalHeaderLogo.GlobalHeaderLogo, {}),
65
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_GlobalHeaderBreadcrumb.GlobalHeaderBreadcrumb, {}),
66
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_GlobalHeaderToolbar.GlobalHeaderToolbar, {})
67
- ] })
57
+ const cols = (0, import_react.useMemo)(() => {
58
+ if (fontDetector > import_constants.FONT_DETECTOR.SMALL) {
59
+ return ["auto", "1fr"];
68
60
  }
69
- );
61
+ return ["auto", "1fr", "auto"];
62
+ }, [fontDetector]);
63
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.Container, { ...globalAttrs, ...xstyledAttrs, forwardedAs: "header", "data-testid": "ds-global-header", cols, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_DSGlobalHeaderContext.DSGlobalHeaderContext.Provider, { value: ctx, children: [
64
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_GlobalHeaderLogo.GlobalHeaderLogo, {}),
65
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_GlobalHeaderBreadcrumb.GlobalHeaderBreadcrumb, {}),
66
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_GlobalHeaderToolbar.GlobalHeaderToolbar, {})
67
+ ] }) });
70
68
  };
71
69
  DSGlobalHeader.propTypes = import_react_desc_prop_types.propTypes;
72
70
  DSGlobalHeader.displayName = import_exported_related.DSGlobalHeaderName;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/DSGlobalHeader.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { omit } from 'lodash';\nimport { useGetGlobalAttributes, useGetXstyledProps, describe } from '@elliemae/ds-props-helpers';\nimport { propTypes, type DSGlobalHeaderT } from './react-desc-prop-types.js';\nimport { GlobalHeaderLogo } from './parts/Logo/GlobalHeaderLogo.js';\nimport { GlobalHeaderBreadcrumb } from './parts/Breadcrumb/GlobalHeaderBreadcrumb.js';\nimport { GlobalHeaderToolbar } from './parts/Toolbar/GlobalHeaderToolbar.js';\nimport { DSGlobalHeaderContext } from './DSGlobalHeaderContext.js';\nimport { useGlobalHeader } from './config/useGlobalHeader.js';\nimport { useValidateProps } from './config/useValidateProps.js';\nimport { DSGlobalHeaderName } from './exported-related/index.js';\n// import type { DSGlobalHeaderInternalsT } from './sharedTypes.js';\nimport { Container } from './parts/styles.js';\nconst DSGlobalHeader = (props: DSGlobalHeaderT.Props): JSX.Element => {\n useValidateProps(props);\n const ctx = useGlobalHeader(props);\n const propsWithDefaults = ctx.props;\n const globalAttrs = omit(useGetGlobalAttributes(propsWithDefaults), ['cols', 'rows', 'wrap']);\n const xstyledAttrs = useGetXstyledProps(propsWithDefaults);\n\n return (\n <Container\n {...globalAttrs}\n {...xstyledAttrs}\n cols={['auto', '1fr', 'auto']}\n forwardedAs=\"header\"\n data-testid=\"ds-global-header\"\n >\n <DSGlobalHeaderContext.Provider value={ctx}>\n <GlobalHeaderLogo />\n <GlobalHeaderBreadcrumb />\n <GlobalHeaderToolbar />\n </DSGlobalHeaderContext.Provider>\n </Container>\n );\n};\n\nDSGlobalHeader.propTypes = propTypes;\nDSGlobalHeader.displayName = DSGlobalHeaderName;\nconst DSGlobalHeaderWithSchema = describe(DSGlobalHeader).description('DSGlobalHeader');\nDSGlobalHeaderWithSchema.propTypes = propTypes;\n\nconst GlobalHeader = DSGlobalHeader;\n\nexport { GlobalHeader, DSGlobalHeader, DSGlobalHeaderWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD4BjB;AA3BN,oBAAqB;AACrB,8BAAqE;AACrE,mCAAgD;AAChD,8BAAiC;AACjC,oCAAuC;AACvC,iCAAoC;AACpC,mCAAsC;AACtC,6BAAgC;AAChC,8BAAiC;AACjC,8BAAmC;AAEnC,oBAA0B;AAC1B,MAAM,iBAAiB,CAAC,UAA8C;AACpE,gDAAiB,KAAK;AACtB,QAAM,UAAM,wCAAgB,KAAK;AACjC,QAAM,oBAAoB,IAAI;AAC9B,QAAM,kBAAc,wBAAK,gDAAuB,iBAAiB,GAAG,CAAC,QAAQ,QAAQ,MAAM,CAAC;AAC5F,QAAM,mBAAe,4CAAmB,iBAAiB;AAEzD,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACH,GAAG;AAAA,MACJ,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,aAAY;AAAA,MACZ,eAAY;AAAA,MAEZ,uDAAC,mDAAsB,UAAtB,EAA+B,OAAO,KACrC;AAAA,oDAAC,4CAAiB;AAAA,QAClB,4CAAC,wDAAuB;AAAA,QACxB,4CAAC,kDAAoB;AAAA,SACvB;AAAA;AAAA,EACF;AAEJ;AAEA,eAAe,YAAY;AAC3B,eAAe,cAAc;AAC7B,MAAM,+BAA2B,kCAAS,cAAc,EAAE,YAAY,gBAAgB;AACtF,yBAAyB,YAAY;AAErC,MAAM,eAAe;",
4
+ "sourcesContent": ["import React, { useMemo } from 'react';\nimport { useGetGlobalAttributes, useGetXstyledProps, describe } from '@elliemae/ds-props-helpers';\nimport { propTypes, type DSGlobalHeaderT } from './react-desc-prop-types.js';\nimport { GlobalHeaderLogo } from './parts/Logo/GlobalHeaderLogo.js';\nimport { GlobalHeaderBreadcrumb } from './parts/Breadcrumb/GlobalHeaderBreadcrumb.js';\nimport { GlobalHeaderToolbar } from './parts/Toolbar/GlobalHeaderToolbar.js';\nimport { DSGlobalHeaderContext } from './DSGlobalHeaderContext.js';\nimport { useGlobalHeader } from './config/useGlobalHeader.js';\nimport { useValidateProps } from './config/useValidateProps.js';\nimport { DSGlobalHeaderName } from './exported-related/index.js';\n// import type { DSGlobalHeaderInternalsT } from './sharedTypes.js';\nimport { FONT_DETECTOR } from './config/constants.js';\nimport { Container } from './parts/styles.js';\nimport type { DSGridT } from '@elliemae/ds-grid';\nconst DSGlobalHeader = (props: DSGlobalHeaderT.Props): JSX.Element => {\n useValidateProps(props);\n const ctx = useGlobalHeader(props);\n const { fontDetector } = ctx;\n const propsWithDefaults = ctx.props;\n const globalAttrs = useGetGlobalAttributes<DSGlobalHeaderT.Props, HTMLDivElement, DSGridT.Props>(propsWithDefaults);\n const xstyledAttrs = useGetXstyledProps(propsWithDefaults);\n\n const cols = useMemo(() => {\n if (fontDetector > FONT_DETECTOR.SMALL) {\n return ['auto', '1fr'];\n }\n return ['auto', '1fr', 'auto'];\n }, [fontDetector]);\n\n return (\n <Container {...globalAttrs} {...xstyledAttrs} forwardedAs=\"header\" data-testid=\"ds-global-header\" cols={cols}>\n <DSGlobalHeaderContext.Provider value={ctx}>\n <GlobalHeaderLogo />\n <GlobalHeaderBreadcrumb />\n <GlobalHeaderToolbar />\n </DSGlobalHeaderContext.Provider>\n </Container>\n );\n};\n\nDSGlobalHeader.propTypes = propTypes;\nDSGlobalHeader.displayName = DSGlobalHeaderName;\nconst DSGlobalHeaderWithSchema = describe(DSGlobalHeader).description('DSGlobalHeader');\nDSGlobalHeaderWithSchema.propTypes = propTypes;\n\nconst GlobalHeader = DSGlobalHeader;\n\nexport { GlobalHeader, DSGlobalHeader, DSGlobalHeaderWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+BjB;AA/BN,mBAA+B;AAC/B,8BAAqE;AACrE,mCAAgD;AAChD,8BAAiC;AACjC,oCAAuC;AACvC,iCAAoC;AACpC,mCAAsC;AACtC,6BAAgC;AAChC,8BAAiC;AACjC,8BAAmC;AAEnC,uBAA8B;AAC9B,oBAA0B;AAE1B,MAAM,iBAAiB,CAAC,UAA8C;AACpE,gDAAiB,KAAK;AACtB,QAAM,UAAM,wCAAgB,KAAK;AACjC,QAAM,EAAE,aAAa,IAAI;AACzB,QAAM,oBAAoB,IAAI;AAC9B,QAAM,kBAAc,gDAA6E,iBAAiB;AAClH,QAAM,mBAAe,4CAAmB,iBAAiB;AAEzD,QAAM,WAAO,sBAAQ,MAAM;AACzB,QAAI,eAAe,+BAAc,OAAO;AACtC,aAAO,CAAC,QAAQ,KAAK;AAAA,IACvB;AACA,WAAO,CAAC,QAAQ,OAAO,MAAM;AAAA,EAC/B,GAAG,CAAC,YAAY,CAAC;AAEjB,SACE,4CAAC,2BAAW,GAAG,aAAc,GAAG,cAAc,aAAY,UAAS,eAAY,oBAAmB,MAChG,uDAAC,mDAAsB,UAAtB,EAA+B,OAAO,KACrC;AAAA,gDAAC,4CAAiB;AAAA,IAClB,4CAAC,wDAAuB;AAAA,IACxB,4CAAC,kDAAoB;AAAA,KACvB,GACF;AAEJ;AAEA,eAAe,YAAY;AAC3B,eAAe,cAAc;AAC7B,MAAM,+BAA2B,kCAAS,cAAc,EAAE,YAAY,gBAAgB;AACtF,yBAAyB,YAAY;AAErC,MAAM,eAAe;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var constants_exports = {};
30
+ __export(constants_exports, {
31
+ FONT_DETECTOR: () => FONT_DETECTOR
32
+ });
33
+ module.exports = __toCommonJS(constants_exports);
34
+ var React = __toESM(require("react"));
35
+ const FONT_DETECTOR = {
36
+ SMALL: 1,
37
+ MEDIUM: 2,
38
+ LARGE: 3
39
+ };
40
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/config/constants.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["export const FONT_DETECTOR = {\n SMALL: 1,\n MEDIUM: 2,\n LARGE: 3,\n} as const;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,gBAAgB;AAAA,EAC3B,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AACT;",
6
+ "names": []
7
+ }
@@ -36,6 +36,8 @@ var import_react = require("react");
36
36
  var import_uid = require("uid");
37
37
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
38
38
  var import_react_desc_prop_types = require("../react-desc-prop-types.js");
39
+ var import_ds_hooks_fontsize_media = require("@elliemae/ds-hooks-fontsize-media");
40
+ var import_constants = require("./constants.js");
39
41
  const useGlobalHeader = (props) => {
40
42
  const [showIconOnly, setShowIconOnly] = (0, import_react.useState)(false);
41
43
  const propsWithDefaults = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultProps);
@@ -44,15 +46,21 @@ const useGlobalHeader = (props) => {
44
46
  () => new Array(propsWithDefaults.toolbar.length).fill("auto"),
45
47
  [propsWithDefaults.toolbar]
46
48
  );
49
+ const fontDetector = (0, import_ds_hooks_fontsize_media.useFontsizeMedia)({
50
+ largeFont: import_constants.FONT_DETECTOR.LARGE,
51
+ mediumFont: import_constants.FONT_DETECTOR.MEDIUM,
52
+ smallFont: import_constants.FONT_DETECTOR.SMALL
53
+ });
47
54
  return (0, import_react.useMemo)(
48
55
  () => ({
49
56
  props: propsWithDefaults,
50
57
  showIconOnly,
51
58
  setShowIconOnly,
52
59
  instanceUID,
53
- globalHeaderToolbarGrid
60
+ globalHeaderToolbarGrid,
61
+ fontDetector
54
62
  }),
55
- [propsWithDefaults, showIconOnly, instanceUID, globalHeaderToolbarGrid]
63
+ [propsWithDefaults, showIconOnly, instanceUID, fontDetector, globalHeaderToolbarGrid]
56
64
  );
57
65
  };
58
66
  //# sourceMappingURL=useGlobalHeader.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/config/useGlobalHeader.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { useState, useMemo } from 'react';\nimport { uid } from 'uid';\nimport { useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { defaultProps, type DSGlobalHeaderT } from '../react-desc-prop-types.js';\nimport { type DSGlobalHeaderInternalsT } from '../sharedTypes.js';\nexport const useGlobalHeader = (props: DSGlobalHeaderT.Props) => {\n const [showIconOnly, setShowIconOnly] = useState<boolean>(false);\n\n const propsWithDefaults = useMemoMergePropsWithDefault<DSGlobalHeaderInternalsT.InternalProps>(props, defaultProps);\n\n const instanceUID = useMemo(() => uid(5), []);\n\n const globalHeaderToolbarGrid = useMemo(\n () => new Array(propsWithDefaults.toolbar.length).fill('auto') as string[],\n [propsWithDefaults.toolbar],\n );\n\n return useMemo(\n () => ({\n props: propsWithDefaults,\n showIconOnly,\n setShowIconOnly,\n instanceUID,\n globalHeaderToolbarGrid,\n }),\n [propsWithDefaults, showIconOnly, instanceUID, globalHeaderToolbarGrid],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkC;AAClC,iBAAoB;AACpB,8BAA6C;AAC7C,mCAAmD;AAE5C,MAAM,kBAAkB,CAAC,UAAiC;AAC/D,QAAM,CAAC,cAAc,eAAe,QAAI,uBAAkB,KAAK;AAE/D,QAAM,wBAAoB,sDAAqE,OAAO,yCAAY;AAElH,QAAM,kBAAc,sBAAQ,UAAM,gBAAI,CAAC,GAAG,CAAC,CAAC;AAE5C,QAAM,8BAA0B;AAAA,IAC9B,MAAM,IAAI,MAAM,kBAAkB,QAAQ,MAAM,EAAE,KAAK,MAAM;AAAA,IAC7D,CAAC,kBAAkB,OAAO;AAAA,EAC5B;AAEA,aAAO;AAAA,IACL,OAAO;AAAA,MACL,OAAO;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,mBAAmB,cAAc,aAAa,uBAAuB;AAAA,EACxE;AACF;",
4
+ "sourcesContent": ["import { useState, useMemo } from 'react';\nimport { uid } from 'uid';\nimport { useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { defaultProps, type DSGlobalHeaderT } from '../react-desc-prop-types.js';\nimport { type DSGlobalHeaderInternalsT } from '../sharedTypes.js';\nimport { useFontsizeMedia } from '@elliemae/ds-hooks-fontsize-media';\nimport { FONT_DETECTOR } from './constants.js';\nexport const useGlobalHeader = (props: DSGlobalHeaderT.Props) => {\n const [showIconOnly, setShowIconOnly] = useState<boolean>(false);\n\n const propsWithDefaults = useMemoMergePropsWithDefault<DSGlobalHeaderInternalsT.InternalProps>(props, defaultProps);\n\n const instanceUID = useMemo(() => uid(5), []);\n\n const globalHeaderToolbarGrid = useMemo(\n () => new Array(propsWithDefaults.toolbar.length).fill('auto') as string[],\n [propsWithDefaults.toolbar],\n );\n\n const fontDetector = useFontsizeMedia({\n largeFont: FONT_DETECTOR.LARGE,\n mediumFont: FONT_DETECTOR.MEDIUM,\n smallFont: FONT_DETECTOR.SMALL,\n });\n\n return useMemo(\n () => ({\n props: propsWithDefaults,\n showIconOnly,\n setShowIconOnly,\n instanceUID,\n globalHeaderToolbarGrid,\n fontDetector,\n }),\n [propsWithDefaults, showIconOnly, instanceUID, fontDetector, globalHeaderToolbarGrid],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkC;AAClC,iBAAoB;AACpB,8BAA6C;AAC7C,mCAAmD;AAEnD,qCAAiC;AACjC,uBAA8B;AACvB,MAAM,kBAAkB,CAAC,UAAiC;AAC/D,QAAM,CAAC,cAAc,eAAe,QAAI,uBAAkB,KAAK;AAE/D,QAAM,wBAAoB,sDAAqE,OAAO,yCAAY;AAElH,QAAM,kBAAc,sBAAQ,UAAM,gBAAI,CAAC,GAAG,CAAC,CAAC;AAE5C,QAAM,8BAA0B;AAAA,IAC9B,MAAM,IAAI,MAAM,kBAAkB,QAAQ,MAAM,EAAE,KAAK,MAAM;AAAA,IAC7D,CAAC,kBAAkB,OAAO;AAAA,EAC5B;AAEA,QAAM,mBAAe,iDAAiB;AAAA,IACpC,WAAW,+BAAc;AAAA,IACzB,YAAY,+BAAc;AAAA,IAC1B,WAAW,+BAAc;AAAA,EAC3B,CAAC;AAED,aAAO;AAAA,IACL,OAAO;AAAA,MACL,OAAO;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,mBAAmB,cAAc,aAAa,cAAc,uBAAuB;AAAA,EACtF;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/parts/Breadcrumb/PureBreadcrumb.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { StyledBreadcrumbItem, StyledLink, StyledLabel, StyledChevron } from './styles.js';\nimport { DSGlobalHeaderDatatestid } from '../../exported-related/index.js';\nimport type { DSGlobalHeaderInternalsT } from '../../sharedTypes.js';\n\nexport const PureBreadcrumb = React.memo(\n ({\n onClick,\n onKeyDown,\n isSelected,\n length,\n label,\n hasNext,\n id,\n ...rest\n }: DSGlobalHeaderInternalsT.BreadcrumbItem) => (\n <StyledBreadcrumbItem data-testid={DSGlobalHeaderDatatestid.BREADCRUMB.ITEM}>\n <StyledLink\n onClick={onClick}\n onKeyDown={onKeyDown}\n data-testid={DSGlobalHeaderDatatestid.BREADCRUMB.ITEM_LINK}\n aria-current={isSelected}\n id={id}\n tabIndex={0}\n {...rest}\n >\n <StyledLabel\n isSelected={!!isSelected}\n isOnlyItem={length === 1}\n data-testid={DSGlobalHeaderDatatestid.BREADCRUMB.ITEM_LINK_LABEL}\n >\n {label}\n </StyledLabel>\n </StyledLink>\n {hasNext && <StyledChevron size=\"m\" aria-hidden />}\n </StyledBreadcrumbItem>\n ),\n);\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgBnB;AAhBJ,mBAAkB;AAClB,oBAA6E;AAC7E,8BAAyC;AAGlC,MAAM,iBAAiB,aAAAA,QAAM;AAAA,EAClC,CAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,MACE,6CAAC,sCAAqB,eAAa,iDAAyB,WAAW,MACrE;AAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA,eAAa,iDAAyB,WAAW;AAAA,QACjD,gBAAc;AAAA,QACd;AAAA,QACA,UAAU;AAAA,QACT,GAAG;AAAA,QAEJ;AAAA,UAAC;AAAA;AAAA,YACC,YAAY,CAAC,CAAC;AAAA,YACd,YAAY,WAAW;AAAA,YACvB,eAAa,iDAAyB,WAAW;AAAA,YAEhD;AAAA;AAAA,QACH;AAAA;AAAA,IACF;AAAA,IACC,WAAW,4CAAC,+BAAc,MAAK,KAAI,eAAW,MAAC;AAAA,KAClD;AAEJ;",
4
+ "sourcesContent": ["import React from 'react';\nimport { StyledBreadcrumbItem, StyledLink, StyledLabel, StyledChevron } from './styles.js';\nimport { DSGlobalHeaderDatatestid } from '../../exported-related/index.js';\nimport type { DSGlobalHeaderInternalsT } from '../../sharedTypes.js';\nexport const PureBreadcrumb = React.memo(\n ({\n onClick,\n onKeyDown,\n isSelected,\n length,\n label,\n hasNext,\n id,\n ...rest\n }: DSGlobalHeaderInternalsT.BreadcrumbItem) => (\n <StyledBreadcrumbItem data-testid={DSGlobalHeaderDatatestid.BREADCRUMB.ITEM}>\n <StyledLink\n onClick={onClick}\n onKeyDown={onKeyDown}\n data-testid={DSGlobalHeaderDatatestid.BREADCRUMB.ITEM_LINK}\n aria-current={isSelected}\n id={id}\n tabIndex={0}\n {...rest}\n >\n <StyledLabel\n isSelected={!!isSelected}\n isOnlyItem={length === 1}\n data-testid={DSGlobalHeaderDatatestid.BREADCRUMB.ITEM_LINK_LABEL}\n >\n {label}\n </StyledLabel>\n </StyledLink>\n {hasNext && <StyledChevron size=\"m\" aria-hidden />}\n </StyledBreadcrumbItem>\n ),\n);\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADenB;AAfJ,mBAAkB;AAClB,oBAA6E;AAC7E,8BAAyC;AAElC,MAAM,iBAAiB,aAAAA,QAAM;AAAA,EAClC,CAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,MACE,6CAAC,sCAAqB,eAAa,iDAAyB,WAAW,MACrE;AAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA,eAAa,iDAAyB,WAAW;AAAA,QACjD,gBAAc;AAAA,QACd;AAAA,QACA,UAAU;AAAA,QACT,GAAG;AAAA,QAEJ;AAAA,UAAC;AAAA;AAAA,YACC,YAAY,CAAC,CAAC;AAAA,YACd,YAAY,WAAW;AAAA,YACvB,eAAa,iDAAyB,WAAW;AAAA,YAEhD;AAAA;AAAA,QACH;AAAA;AAAA,IACF;AAAA,IACC,WAAW,4CAAC,+BAAc,MAAK,KAAI,eAAW,MAAC;AAAA,KAClD;AAEJ;",
6
6
  "names": ["React"]
7
7
  }
@@ -78,11 +78,11 @@ const StyledBreadcrumbItem = (0, import_ds_system.styled)("li", {
78
78
  })`
79
79
  display: flex;
80
80
  align-items: center;
81
- height: 40px;
81
+ height: 3.077rem;
82
82
  `;
83
83
  const StyledLink = (0, import_ds_system.styled)("a", { name: import_theming.DSGlobalHeaderName, slot: import_theming.DSGlobalHeaderSlots.BREADCRUMB.ITEM_LINK })`
84
84
  width: fit-content;
85
- height: 40px;
85
+ height: 3.077rem;
86
86
  display: grid;
87
87
  place-items: center;
88
88
  margin: 0;
@@ -112,7 +112,11 @@ const StyledLabel = (0, import_ds_system.styled)("span", {
112
112
  })`
113
113
  color: ${({ theme }) => theme.colors.neutral["000"]};
114
114
  ${({ theme, isSelected }) => `-webkit-text-stroke: 0.4px ${isSelected ? theme.colors.neutral["000"] : "transparent"}`};
115
- font-size: 16px;
115
+ font-size: 1.231rem;
116
+ @media (max-width: ${({ theme }) => theme.breakpoints.small}) {
117
+ font-size: 1rem;
118
+ }
119
+ display: block;
116
120
  line-height: 1;
117
121
  text-transform: uppercase;
118
122
  border-bottom: ${({ theme, isSelected, isOnlyItem }) => `2px solid ${isSelected && !isOnlyItem ? theme.colors.neutral["000"] : "transparent"}`};
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/parts/Breadcrumb/styles.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable @typescript-eslint/no-unsafe-assignment */\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { ChevronSmallRight } from '@elliemae/ds-icons';\nimport { DSGlobalHeaderName, DSGlobalHeaderSlots } from '../../exported-related/theming.js';\n\ninterface PipeT {\n showIconOnly: boolean;\n}\n\ninterface ChevronT {\n size: string;\n}\n\ninterface LabelT {\n isSelected: boolean;\n isOnlyItem: boolean;\n}\n\nexport const StyledBreadcrumbContainer = styled(Grid, {\n name: DSGlobalHeaderName,\n slot: DSGlobalHeaderSlots.BREADCRUMB.CONTAINER,\n})``;\n\nexport const StyledBreadcrumbList = styled('ul', {\n name: DSGlobalHeaderName,\n slot: DSGlobalHeaderSlots.BREADCRUMB.LIST,\n})`\n display: grid;\n grid-auto-flow: column;\n min-width: fit-content;\n align-items: center;\n margin: 0;\n padding: 0;\n height: 100%;\n`;\n\nexport const StyledPipe = styled('span', {\n name: DSGlobalHeaderName,\n slot: DSGlobalHeaderSlots.BREADCRUMB.PIPE,\n})<PipeT>`\n margin: 0 7px 0 0;\n border-left: ${({ theme, showIconOnly }) => (showIconOnly ? 'none' : `1px solid ${theme.colors.neutral['000']}`)};\n height: 20px;\n`;\n\nexport const StyledChevron = styled(ChevronSmallRight, {\n name: DSGlobalHeaderName,\n slot: DSGlobalHeaderSlots.BREADCRUMB.CHEVRON,\n})<ChevronT>`\n fill: ${({ theme }) => theme.colors.neutral['000']};\n`;\n\nexport const StyledBreadcrumbItem = styled('li', {\n name: DSGlobalHeaderName,\n slot: DSGlobalHeaderSlots.BREADCRUMB.ITEM,\n})`\n display: flex;\n align-items: center;\n height: 40px;\n`;\n\nexport const StyledLink = styled('a', { name: DSGlobalHeaderName, slot: DSGlobalHeaderSlots.BREADCRUMB.ITEM_LINK })`\n width: fit-content;\n height: 40px;\n display: grid;\n place-items: center;\n margin: 0;\n padding: 0;\n border: 1px solid transparent;\n background-color: transparent;\n outline: none;\n cursor: pointer;\n position: relative;\n &:focus {\n :before {\n content: '';\n position: absolute;\n z-index: 2;\n top: 2px;\n left: -5px;\n width: calc(100% + 10px);\n height: calc(100% - 4px);\n border: 2px solid ${({ theme }) => theme.colors.neutral['000']};\n border-radius: 4px;\n }\n }\n`;\n\nexport const StyledLabel = styled('span', {\n name: DSGlobalHeaderName,\n slot: DSGlobalHeaderSlots.BREADCRUMB.ITEM_LINK_LABEL,\n})<LabelT>`\n color: ${({ theme }) => theme.colors.neutral['000']};\n ${({ theme, isSelected }) =>\n `-webkit-text-stroke: 0.4px ${isSelected ? theme.colors.neutral['000'] : 'transparent'}`};\n font-size: 16px;\n line-height: 1;\n text-transform: uppercase;\n border-bottom: ${({ theme, isSelected, isOnlyItem }) =>\n `2px solid ${isSelected && !isOnlyItem ? theme.colors.neutral['000'] : 'transparent'}`};\n margin: 3px 5px 0 5px;\n :hover {\n ${({ theme }) => `-webkit-text-stroke: 0.4px ${theme.colors.neutral['000']}`};\n }\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,uBAAuB;AACvB,qBAAqB;AACrB,sBAAkC;AAClC,qBAAwD;AAejD,MAAM,gCAA4B,yBAAO,qBAAM;AAAA,EACpD,MAAM;AAAA,EACN,MAAM,mCAAoB,WAAW;AACvC,CAAC;AAEM,MAAM,2BAAuB,yBAAO,MAAM;AAAA,EAC/C,MAAM;AAAA,EACN,MAAM,mCAAoB,WAAW;AACvC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUM,MAAM,iBAAa,yBAAO,QAAQ;AAAA,EACvC,MAAM;AAAA,EACN,MAAM,mCAAoB,WAAW;AACvC,CAAC;AAAA;AAAA,iBAEgB,CAAC,EAAE,OAAO,aAAa,MAAO,eAAe,SAAS,aAAa,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA;AAIvG,MAAM,oBAAgB,yBAAO,mCAAmB;AAAA,EACrD,MAAM;AAAA,EACN,MAAM,mCAAoB,WAAW;AACvC,CAAC;AAAA,UACS,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAG5C,MAAM,2BAAuB,yBAAO,MAAM;AAAA,EAC/C,MAAM;AAAA,EACN,MAAM,mCAAoB,WAAW;AACvC,CAAC;AAAA;AAAA;AAAA;AAAA;AAMM,MAAM,iBAAa,yBAAO,KAAK,EAAE,MAAM,mCAAoB,MAAM,mCAAoB,WAAW,UAAU,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAqBxF,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA;AAAA;AAAA;AAM5D,MAAM,kBAAc,yBAAO,QAAQ;AAAA,EACxC,MAAM;AAAA,EACN,MAAM,mCAAoB,WAAW;AACvC,CAAC;AAAA,WACU,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA,IAChD,CAAC,EAAE,OAAO,WAAW,MACrB,+BAA+B,aAAa,MAAM,OAAO,QAAQ,KAAK,IAAI;AAAA;AAAA;AAAA;AAAA,mBAI3D,CAAC,EAAE,OAAO,YAAY,WAAW,MAChD,aAAa,cAAc,CAAC,aAAa,MAAM,OAAO,QAAQ,KAAK,IAAI;AAAA;AAAA;AAAA,MAGrE,CAAC,EAAE,MAAM,MAAM,8BAA8B,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA;",
4
+ "sourcesContent": ["/* eslint-disable @typescript-eslint/no-unsafe-assignment */\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { ChevronSmallRight } from '@elliemae/ds-icons';\nimport { DSGlobalHeaderName, DSGlobalHeaderSlots } from '../../exported-related/theming.js';\n\ninterface PipeT {\n showIconOnly: boolean;\n}\n\ninterface ChevronT {\n size: string;\n}\n\ninterface LabelT {\n isSelected: boolean;\n isOnlyItem: boolean;\n}\n\nexport const StyledBreadcrumbContainer = styled(Grid, {\n name: DSGlobalHeaderName,\n slot: DSGlobalHeaderSlots.BREADCRUMB.CONTAINER,\n})``;\n\nexport const StyledBreadcrumbList = styled('ul', {\n name: DSGlobalHeaderName,\n slot: DSGlobalHeaderSlots.BREADCRUMB.LIST,\n})`\n display: grid;\n grid-auto-flow: column;\n min-width: fit-content;\n align-items: center;\n margin: 0;\n padding: 0;\n height: 100%;\n`;\n\nexport const StyledPipe = styled('span', {\n name: DSGlobalHeaderName,\n slot: DSGlobalHeaderSlots.BREADCRUMB.PIPE,\n})<PipeT>`\n margin: 0 7px 0 0;\n border-left: ${({ theme, showIconOnly }) => (showIconOnly ? 'none' : `1px solid ${theme.colors.neutral['000']}`)};\n height: 20px;\n`;\n\nexport const StyledChevron = styled(ChevronSmallRight, {\n name: DSGlobalHeaderName,\n slot: DSGlobalHeaderSlots.BREADCRUMB.CHEVRON,\n})<ChevronT>`\n fill: ${({ theme }) => theme.colors.neutral['000']};\n`;\n\nexport const StyledBreadcrumbItem = styled('li', {\n name: DSGlobalHeaderName,\n slot: DSGlobalHeaderSlots.BREADCRUMB.ITEM,\n})`\n display: flex;\n align-items: center;\n height: 3.077rem;\n`;\n\nexport const StyledLink = styled('a', { name: DSGlobalHeaderName, slot: DSGlobalHeaderSlots.BREADCRUMB.ITEM_LINK })`\n width: fit-content;\n height: 3.077rem;\n display: grid;\n place-items: center;\n margin: 0;\n padding: 0;\n border: 1px solid transparent;\n background-color: transparent;\n outline: none;\n cursor: pointer;\n position: relative;\n &:focus {\n :before {\n content: '';\n position: absolute;\n z-index: 2;\n top: 2px;\n left: -5px;\n width: calc(100% + 10px);\n height: calc(100% - 4px);\n border: 2px solid ${({ theme }) => theme.colors.neutral['000']};\n border-radius: 4px;\n }\n }\n`;\n\nexport const StyledLabel = styled('span', {\n name: DSGlobalHeaderName,\n slot: DSGlobalHeaderSlots.BREADCRUMB.ITEM_LINK_LABEL,\n})<LabelT>`\n color: ${({ theme }) => theme.colors.neutral['000']};\n ${({ theme, isSelected }) =>\n `-webkit-text-stroke: 0.4px ${isSelected ? theme.colors.neutral['000'] : 'transparent'}`};\n font-size: 1.231rem;\n @media (max-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: 1rem;\n }\n display: block;\n line-height: 1;\n text-transform: uppercase;\n border-bottom: ${({ theme, isSelected, isOnlyItem }) =>\n `2px solid ${isSelected && !isOnlyItem ? theme.colors.neutral['000'] : 'transparent'}`};\n margin: 3px 5px 0 5px;\n :hover {\n ${({ theme }) => `-webkit-text-stroke: 0.4px ${theme.colors.neutral['000']}`};\n }\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,uBAAuB;AACvB,qBAAqB;AACrB,sBAAkC;AAClC,qBAAwD;AAejD,MAAM,gCAA4B,yBAAO,qBAAM;AAAA,EACpD,MAAM;AAAA,EACN,MAAM,mCAAoB,WAAW;AACvC,CAAC;AAEM,MAAM,2BAAuB,yBAAO,MAAM;AAAA,EAC/C,MAAM;AAAA,EACN,MAAM,mCAAoB,WAAW;AACvC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUM,MAAM,iBAAa,yBAAO,QAAQ;AAAA,EACvC,MAAM;AAAA,EACN,MAAM,mCAAoB,WAAW;AACvC,CAAC;AAAA;AAAA,iBAEgB,CAAC,EAAE,OAAO,aAAa,MAAO,eAAe,SAAS,aAAa,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA;AAIvG,MAAM,oBAAgB,yBAAO,mCAAmB;AAAA,EACrD,MAAM;AAAA,EACN,MAAM,mCAAoB,WAAW;AACvC,CAAC;AAAA,UACS,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAG5C,MAAM,2BAAuB,yBAAO,MAAM;AAAA,EAC/C,MAAM;AAAA,EACN,MAAM,mCAAoB,WAAW;AACvC,CAAC;AAAA;AAAA;AAAA;AAAA;AAMM,MAAM,iBAAa,yBAAO,KAAK,EAAE,MAAM,mCAAoB,MAAM,mCAAoB,WAAW,UAAU,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAqBxF,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA;AAAA;AAAA;AAM5D,MAAM,kBAAc,yBAAO,QAAQ;AAAA,EACxC,MAAM;AAAA,EACN,MAAM,mCAAoB,WAAW;AACvC,CAAC;AAAA,WACU,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA,IAChD,CAAC,EAAE,OAAO,WAAW,MACrB,+BAA+B,aAAa,MAAM,OAAO,QAAQ,KAAK,IAAI;AAAA;AAAA,uBAEvD,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAMrC,CAAC,EAAE,OAAO,YAAY,WAAW,MAChD,aAAa,cAAc,CAAC,aAAa,MAAM,OAAO,QAAQ,KAAK,IAAI;AAAA;AAAA;AAAA,MAGrE,CAAC,EAAE,MAAM,MAAM,8BAA8B,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -34,18 +34,20 @@ module.exports = __toCommonJS(useGlobalHeaderBreadcrumb_exports);
34
34
  var React = __toESM(require("react"));
35
35
  var import_react = require("react");
36
36
  var import_DSGlobalHeaderContext = require("../../DSGlobalHeaderContext.js");
37
+ var import_constants = require("../../config/constants.js");
37
38
  const useGlobalHeaderBreadcrumb = () => {
38
39
  const {
39
40
  props: { breadcrumb, CustomNavigation },
40
41
  instanceUID,
41
42
  showIconOnly,
42
- setShowIconOnly
43
+ setShowIconOnly,
44
+ fontDetector
43
45
  } = (0, import_react.useContext)(import_DSGlobalHeaderContext.DSGlobalHeaderContext);
44
46
  const breakpointRef = (0, import_react.useRef)(null);
45
47
  const flexRegionRef = (0, import_react.useRef)(null);
46
48
  (0, import_react.useEffect)(() => {
47
49
  const evaluateShowIconOnly = () => {
48
- if (flexRegionRef.current && flexRegionRef.current.offsetWidth <= 0 && !breakpointRef.current) {
50
+ if (flexRegionRef.current && flexRegionRef.current.offsetWidth <= 0 && !breakpointRef.current || fontDetector === import_constants.FONT_DETECTOR.LARGE || fontDetector === import_constants.FONT_DETECTOR.MEDIUM) {
49
51
  setShowIconOnly(true);
50
52
  breakpointRef.current = window.innerWidth;
51
53
  } else if (breakpointRef.current && window.innerWidth >= breakpointRef.current) {
@@ -56,7 +58,7 @@ const useGlobalHeaderBreadcrumb = () => {
56
58
  evaluateShowIconOnly();
57
59
  window.addEventListener("resize", evaluateShowIconOnly);
58
60
  return () => window.removeEventListener("resize", evaluateShowIconOnly);
59
- }, [breakpointRef, flexRegionRef, setShowIconOnly]);
61
+ }, [breakpointRef, flexRegionRef, setShowIconOnly, fontDetector]);
60
62
  const handleOnKeyDown = (0, import_react.useCallback)(
61
63
  (onClick) => (e) => {
62
64
  if (e.key === " " || e.key === "Enter") {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/parts/Breadcrumb/useGlobalHeaderBreadcrumb.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import type React from 'react';\nimport { useEffect, useRef, useContext, useCallback } from 'react';\nimport { DSGlobalHeaderContext } from '../../DSGlobalHeaderContext.js';\nimport type { DSGlobalHeaderInternalsT } from '../../sharedTypes.js';\n\ninterface UseGlobalHeaderBreadcrumbReturnT {\n breadcrumb: DSGlobalHeaderInternalsT.BreadcrumbItem[];\n CustomNavigation: React.ComponentType;\n showIconOnly: boolean;\n flexRegionRef: React.MutableRefObject<HTMLDivElement | null>;\n handleOnKeyDown: (onClick: (event?: React.MouseEvent) => void) => (event: React.KeyboardEvent) => void;\n instanceUID: string;\n}\n\nexport const useGlobalHeaderBreadcrumb = (): UseGlobalHeaderBreadcrumbReturnT => {\n const {\n props: { breadcrumb, CustomNavigation },\n instanceUID,\n showIconOnly,\n setShowIconOnly,\n } = useContext(DSGlobalHeaderContext);\n\n const breakpointRef = useRef<number | null>(null);\n const flexRegionRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const evaluateShowIconOnly = () => {\n if (flexRegionRef.current && flexRegionRef.current.offsetWidth <= 0 && !breakpointRef.current) {\n setShowIconOnly(true);\n breakpointRef.current = window.innerWidth;\n } else if (breakpointRef.current && window.innerWidth >= breakpointRef.current) {\n setShowIconOnly(false);\n breakpointRef.current = null;\n }\n };\n\n evaluateShowIconOnly();\n\n window.addEventListener('resize', evaluateShowIconOnly);\n return () => window.removeEventListener('resize', evaluateShowIconOnly);\n }, [breakpointRef, flexRegionRef, setShowIconOnly]);\n\n const handleOnKeyDown = useCallback(\n (onClick: (event?: React.MouseEvent) => void) => (e: React.KeyboardEvent) => {\n if (e.key === ' ' || e.key === 'Enter') {\n onClick();\n }\n },\n [],\n );\n\n return {\n breadcrumb,\n CustomNavigation,\n showIconOnly,\n flexRegionRef,\n handleOnKeyDown,\n instanceUID,\n };\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAA2D;AAC3D,mCAAsC;AAY/B,MAAM,4BAA4B,MAAwC;AAC/E,QAAM;AAAA,IACJ,OAAO,EAAE,YAAY,iBAAiB;AAAA,IACtC;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,kDAAqB;AAEpC,QAAM,oBAAgB,qBAAsB,IAAI;AAChD,QAAM,oBAAgB,qBAAuB,IAAI;AAEjD,8BAAU,MAAM;AACd,UAAM,uBAAuB,MAAM;AACjC,UAAI,cAAc,WAAW,cAAc,QAAQ,eAAe,KAAK,CAAC,cAAc,SAAS;AAC7F,wBAAgB,IAAI;AACpB,sBAAc,UAAU,OAAO;AAAA,MACjC,WAAW,cAAc,WAAW,OAAO,cAAc,cAAc,SAAS;AAC9E,wBAAgB,KAAK;AACrB,sBAAc,UAAU;AAAA,MAC1B;AAAA,IACF;AAEA,yBAAqB;AAErB,WAAO,iBAAiB,UAAU,oBAAoB;AACtD,WAAO,MAAM,OAAO,oBAAoB,UAAU,oBAAoB;AAAA,EACxE,GAAG,CAAC,eAAe,eAAe,eAAe,CAAC;AAElD,QAAM,sBAAkB;AAAA,IACtB,CAAC,YAAgD,CAAC,MAA2B;AAC3E,UAAI,EAAE,QAAQ,OAAO,EAAE,QAAQ,SAAS;AACtC,gBAAQ;AAAA,MACV;AAAA,IACF;AAAA,IACA,CAAC;AAAA,EACH;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["import type React from 'react';\nimport { useEffect, useRef, useContext, useCallback } from 'react';\nimport { DSGlobalHeaderContext } from '../../DSGlobalHeaderContext.js';\nimport type { DSGlobalHeaderInternalsT } from '../../sharedTypes.js';\nimport { FONT_DETECTOR } from '../../config/constants.js';\ninterface UseGlobalHeaderBreadcrumbReturnT {\n breadcrumb: DSGlobalHeaderInternalsT.BreadcrumbItem[];\n CustomNavigation: React.ComponentType;\n showIconOnly: boolean;\n flexRegionRef: React.MutableRefObject<HTMLDivElement | null>;\n handleOnKeyDown: (onClick: (event?: React.MouseEvent) => void) => (event: React.KeyboardEvent) => void;\n instanceUID: string;\n}\n\nexport const useGlobalHeaderBreadcrumb = (): UseGlobalHeaderBreadcrumbReturnT => {\n const {\n props: { breadcrumb, CustomNavigation },\n instanceUID,\n showIconOnly,\n setShowIconOnly,\n fontDetector,\n } = useContext(DSGlobalHeaderContext);\n\n const breakpointRef = useRef<number | null>(null);\n const flexRegionRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const evaluateShowIconOnly = () => {\n if (\n (flexRegionRef.current && flexRegionRef.current.offsetWidth <= 0 && !breakpointRef.current) ||\n fontDetector === FONT_DETECTOR.LARGE ||\n fontDetector === FONT_DETECTOR.MEDIUM\n ) {\n setShowIconOnly(true);\n breakpointRef.current = window.innerWidth;\n } else if (breakpointRef.current && window.innerWidth >= breakpointRef.current) {\n setShowIconOnly(false);\n breakpointRef.current = null;\n }\n };\n\n evaluateShowIconOnly();\n\n window.addEventListener('resize', evaluateShowIconOnly);\n return () => window.removeEventListener('resize', evaluateShowIconOnly);\n }, [breakpointRef, flexRegionRef, setShowIconOnly, fontDetector]);\n\n const handleOnKeyDown = useCallback(\n (onClick: (event?: React.MouseEvent) => void) => (e: React.KeyboardEvent) => {\n if (e.key === ' ' || e.key === 'Enter') {\n onClick();\n }\n },\n [],\n );\n\n return {\n breadcrumb,\n CustomNavigation,\n showIconOnly,\n flexRegionRef,\n handleOnKeyDown,\n instanceUID,\n };\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAA2D;AAC3D,mCAAsC;AAEtC,uBAA8B;AAUvB,MAAM,4BAA4B,MAAwC;AAC/E,QAAM;AAAA,IACJ,OAAO,EAAE,YAAY,iBAAiB;AAAA,IACtC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,kDAAqB;AAEpC,QAAM,oBAAgB,qBAAsB,IAAI;AAChD,QAAM,oBAAgB,qBAAuB,IAAI;AAEjD,8BAAU,MAAM;AACd,UAAM,uBAAuB,MAAM;AACjC,UACG,cAAc,WAAW,cAAc,QAAQ,eAAe,KAAK,CAAC,cAAc,WACnF,iBAAiB,+BAAc,SAC/B,iBAAiB,+BAAc,QAC/B;AACA,wBAAgB,IAAI;AACpB,sBAAc,UAAU,OAAO;AAAA,MACjC,WAAW,cAAc,WAAW,OAAO,cAAc,cAAc,SAAS;AAC9E,wBAAgB,KAAK;AACrB,sBAAc,UAAU;AAAA,MAC1B;AAAA,IACF;AAEA,yBAAqB;AAErB,WAAO,iBAAiB,UAAU,oBAAoB;AACtD,WAAO,MAAM,OAAO,oBAAoB,UAAU,oBAAoB;AAAA,EACxE,GAAG,CAAC,eAAe,eAAe,iBAAiB,YAAY,CAAC;AAEhE,QAAM,sBAAkB;AAAA,IACtB,CAAC,YAAgD,CAAC,MAA2B;AAC3E,UAAI,EAAE,QAAQ,OAAO,EAAE,QAAQ,SAAS;AACtC,gBAAQ;AAAA,MACV;AAAA,IACF;AAAA,IACA,CAAC;AAAA,EACH;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
6
6
  "names": []
7
7
  }
@@ -41,132 +41,142 @@ var import_styles2 = require("../styles.js");
41
41
  var import_DSGlobalHeaderContext = require("../../DSGlobalHeaderContext.js");
42
42
  var import_exported_related = require("../../exported-related/index.js");
43
43
  var import_useGlobalHeaderToolbar = require("./useGlobalHeaderToolbar.js");
44
+ var import_constants = require("../../config/constants.js");
44
45
  const GlobalHeaderToolbar = () => {
45
46
  const {
46
47
  props: { toolbar },
47
48
  instanceUID,
48
- globalHeaderToolbarGrid
49
+ globalHeaderToolbarGrid,
50
+ fontDetector
49
51
  } = (0, import_react.useContext)(import_DSGlobalHeaderContext.DSGlobalHeaderContext);
50
52
  const { listRef, setRef, keyboardNavigation } = (0, import_useGlobalHeaderToolbar.useGlobalHeaderToolbar)();
51
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.StyledMenubarContainer, { "data-testid": import_exported_related.DSGlobalHeaderDatatestid.MENUBAR.CONTAINER, "aria-label": "menubar", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
52
- import_styles.StyledList,
53
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
54
+ import_styles.StyledMenubarContainer,
53
55
  {
54
- height: "100%",
55
- alignItems: "center",
56
- justifyContent: "center",
57
- gutter: "xxs",
58
- cols: globalHeaderToolbarGrid,
59
- role: "menubar",
60
- onKeyDown: keyboardNavigation,
61
- innerRef: listRef,
62
- "data-testid": import_exported_related.DSGlobalHeaderDatatestid.MENUBAR.LIST,
63
- children: toolbar.map((item, index) => {
64
- const {
65
- Icon,
66
- type,
67
- onClick,
68
- onKeyPress,
69
- CustomComponent,
70
- label,
71
- id = "",
72
- componentProps = {},
73
- ...otherProps
74
- } = item;
75
- switch (type) {
76
- case "ds-popup-menu":
77
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
78
- import_styles.StyledToolbarItem,
79
- {
80
- role: "menuitem",
81
- "data-testid": import_exported_related.DSGlobalHeaderDatatestid.MENUBAR.ITEM,
82
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
83
- import_outOfTheBox.PopupMenu,
56
+ "data-testid": import_exported_related.DSGlobalHeaderDatatestid.MENUBAR.CONTAINER,
57
+ "aria-label": "menubar",
58
+ withSpan: fontDetector > import_constants.FONT_DETECTOR.SMALL,
59
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
60
+ import_styles.StyledList,
61
+ {
62
+ height: "100%",
63
+ alignItems: "center",
64
+ justifyContent: "center",
65
+ gutter: "xxs",
66
+ cols: globalHeaderToolbarGrid,
67
+ role: "menubar",
68
+ onKeyDown: keyboardNavigation,
69
+ innerRef: listRef,
70
+ "data-testid": import_exported_related.DSGlobalHeaderDatatestid.MENUBAR.LIST,
71
+ children: toolbar.map((item, index) => {
72
+ const {
73
+ Icon,
74
+ type,
75
+ onClick,
76
+ onKeyPress,
77
+ CustomComponent,
78
+ label,
79
+ id = "",
80
+ componentProps = {},
81
+ ...otherProps
82
+ } = item;
83
+ switch (type) {
84
+ case "ds-popup-menu":
85
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
86
+ import_styles.StyledToolbarItem,
84
87
  {
85
- title: label,
86
- Icon,
87
- onClick,
88
- onKeyPress,
89
- setRef: setRef(index),
90
- id,
91
- componentProps,
92
- ...otherProps
93
- }
94
- )
95
- },
96
- `${instanceUID}-ds-toolbar-item-${label}`
97
- );
98
- case "ds-app-picker":
99
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
100
- import_styles.StyledToolbarItem,
101
- {
102
- role: "menuitem",
103
- "data-testid": import_exported_related.DSGlobalHeaderDatatestid.MENUBAR.ITEM,
104
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
105
- import_outOfTheBox.AppPicker,
88
+ role: "menuitem",
89
+ "data-testid": import_exported_related.DSGlobalHeaderDatatestid.MENUBAR.ITEM,
90
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
91
+ import_outOfTheBox.PopupMenu,
92
+ {
93
+ title: label,
94
+ Icon,
95
+ onClick,
96
+ onKeyPress,
97
+ setRef: setRef(index),
98
+ id,
99
+ componentProps,
100
+ ...otherProps
101
+ }
102
+ )
103
+ },
104
+ `${instanceUID}-ds-toolbar-item-${label}`
105
+ );
106
+ case "ds-app-picker":
107
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
108
+ import_styles.StyledToolbarItem,
106
109
  {
107
- label,
108
- id,
109
- setRef: setRef(index),
110
- componentProps,
111
- ...otherProps
112
- }
113
- )
114
- },
115
- `${instanceUID}-ds-toolbar-item-${label}`
116
- );
117
- case "ds-search-toggle":
118
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
119
- import_styles.StyledToolbarItem,
120
- {
121
- role: "menuitem",
122
- "data-testid": import_exported_related.DSGlobalHeaderDatatestid.MENUBAR.ITEM,
123
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
124
- import_outOfTheBox.SearchToggle,
110
+ role: "menuitem",
111
+ "data-testid": import_exported_related.DSGlobalHeaderDatatestid.MENUBAR.ITEM,
112
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
113
+ import_outOfTheBox.AppPicker,
114
+ {
115
+ label,
116
+ id,
117
+ setRef: setRef(index),
118
+ componentProps,
119
+ ...otherProps
120
+ }
121
+ )
122
+ },
123
+ `${instanceUID}-ds-toolbar-item-${label}`
124
+ );
125
+ case "ds-search-toggle":
126
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
127
+ import_styles.StyledToolbarItem,
125
128
  {
126
- id,
127
- setRef: setRef(index),
128
- componentProps,
129
- ...otherProps
130
- }
131
- )
132
- },
133
- `${instanceUID}-ds-toolbar-item-${label}`
134
- );
135
- case "custom":
136
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
137
- import_styles.StyledToolbarItem,
138
- {
139
- role: "menuitem",
140
- "data-testid": import_exported_related.DSGlobalHeaderDatatestid.MENUBAR.ITEM,
141
- children: CustomComponent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CustomComponent, { item, setRef: setRef(index) })
142
- },
143
- `${instanceUID}-ds-toolbar-item-${label}`
144
- );
145
- default:
146
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
147
- import_styles.StyledToolbarItem,
148
- {
149
- role: "menuitem",
150
- "data-testid": import_exported_related.DSGlobalHeaderDatatestid.MENUBAR.ITEM,
151
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
152
- import_styles2.StyledButton,
129
+ role: "menuitem",
130
+ "data-testid": import_exported_related.DSGlobalHeaderDatatestid.MENUBAR.ITEM,
131
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
132
+ import_outOfTheBox.SearchToggle,
133
+ {
134
+ id,
135
+ setRef: setRef(index),
136
+ componentProps,
137
+ ...otherProps
138
+ }
139
+ )
140
+ },
141
+ `${instanceUID}-ds-toolbar-item-${label}`
142
+ );
143
+ case "custom":
144
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
145
+ import_styles.StyledToolbarItem,
153
146
  {
154
- onClick,
155
- title: label,
156
- "data-testid": import_exported_related.DSGlobalHeaderDatatestid.MENUBAR.ITEM_BUTTON,
157
- id,
158
- innerRef: setRef(index),
159
- ...(0, import_ds_props_helpers.getGlobalAttributes)(otherProps),
160
- type: "button",
161
- children: Icon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { size: "m" })
162
- }
163
- )
164
- },
165
- `${instanceUID}-ds-toolbar-item-${label}`
166
- );
147
+ role: "menuitem",
148
+ "data-testid": import_exported_related.DSGlobalHeaderDatatestid.MENUBAR.ITEM,
149
+ children: CustomComponent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CustomComponent, { item, setRef: setRef(index) })
150
+ },
151
+ `${instanceUID}-ds-toolbar-item-${label}`
152
+ );
153
+ default:
154
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
155
+ import_styles.StyledToolbarItem,
156
+ {
157
+ role: "menuitem",
158
+ "data-testid": import_exported_related.DSGlobalHeaderDatatestid.MENUBAR.ITEM,
159
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
160
+ import_styles2.StyledButton,
161
+ {
162
+ onClick,
163
+ title: label,
164
+ "data-testid": import_exported_related.DSGlobalHeaderDatatestid.MENUBAR.ITEM_BUTTON,
165
+ id,
166
+ innerRef: setRef(index),
167
+ ...(0, import_ds_props_helpers.getGlobalAttributes)(otherProps),
168
+ type: "button",
169
+ children: Icon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { size: "m" })
170
+ }
171
+ )
172
+ },
173
+ `${instanceUID}-ds-toolbar-item-${label}`
174
+ );
175
+ }
176
+ })
167
177
  }
168
- })
178
+ )
169
179
  }
170
- ) });
180
+ );
171
181
  };
172
182
  //# sourceMappingURL=GlobalHeaderToolbar.js.map