@elliemae/ds-global-header 3.60.0-next.9 → 3.61.0-rc.2

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 (137) hide show
  1. package/dist/cjs/DSGlobalHeader.js +9 -10
  2. package/dist/cjs/DSGlobalHeader.js.map +2 -2
  3. package/dist/cjs/config/constants.js +0 -15
  4. package/dist/cjs/config/constants.js.map +3 -3
  5. package/dist/cjs/config/useGlobalHeader.js +2 -2
  6. package/dist/cjs/config/useGlobalHeader.js.map +2 -2
  7. package/dist/cjs/constants/index.js +176 -0
  8. package/dist/cjs/constants/index.js.map +7 -0
  9. package/dist/cjs/{exported-related/index.js → hooks/useOnClickOutside.js} +30 -11
  10. package/dist/cjs/hooks/useOnClickOutside.js.map +7 -0
  11. package/dist/cjs/index.js +8 -6
  12. package/dist/cjs/index.js.map +2 -2
  13. package/dist/cjs/package.json +1 -4
  14. package/dist/cjs/parts/Breadcrumb/GlobalHeaderBreadcrumb.js +6 -5
  15. package/dist/cjs/parts/Breadcrumb/GlobalHeaderBreadcrumb.js.map +2 -2
  16. package/dist/cjs/parts/Breadcrumb/PureBreadcrumb.js +7 -5
  17. package/dist/cjs/parts/Breadcrumb/PureBreadcrumb.js.map +2 -2
  18. package/dist/cjs/parts/Breadcrumb/styles.js +14 -14
  19. package/dist/cjs/parts/Breadcrumb/styles.js.map +2 -2
  20. package/dist/cjs/parts/Breadcrumb/useGlobalHeaderBreadcrumb.js +1 -1
  21. package/dist/cjs/parts/Breadcrumb/useGlobalHeaderBreadcrumb.js.map +1 -1
  22. package/dist/cjs/parts/Logo/GlobalHeaderLogo.js +2 -2
  23. package/dist/cjs/parts/Logo/GlobalHeaderLogo.js.map +2 -2
  24. package/dist/cjs/parts/Logo/styles.js +3 -3
  25. package/dist/cjs/parts/Logo/styles.js.map +2 -2
  26. package/dist/cjs/parts/Toolbar/GlobalHeaderToolbar.js +13 -12
  27. package/dist/cjs/parts/Toolbar/GlobalHeaderToolbar.js.map +2 -2
  28. package/dist/cjs/parts/Toolbar/outOfTheBox/AppPicker/AppPicker.js +2 -2
  29. package/dist/cjs/parts/Toolbar/outOfTheBox/AppPicker/AppPicker.js.map +2 -2
  30. package/dist/cjs/parts/Toolbar/outOfTheBox/PopupMenu/PopupMenu.js +55 -32
  31. package/dist/cjs/parts/Toolbar/outOfTheBox/PopupMenu/PopupMenu.js.map +2 -2
  32. package/dist/cjs/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/PopupMenuContent.js +90 -68
  33. package/dist/cjs/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/PopupMenuContent.js.map +2 -2
  34. package/dist/cjs/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/styles.js +10 -10
  35. package/dist/cjs/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/styles.js.map +2 -2
  36. package/dist/cjs/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/usePopupMenuContent.js +3 -1
  37. package/dist/cjs/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/usePopupMenuContent.js.map +2 -2
  38. package/dist/cjs/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggle.js +171 -93
  39. package/dist/cjs/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggle.js.map +3 -3
  40. package/dist/cjs/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggleSpinButton.js +166 -0
  41. package/dist/cjs/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggleSpinButton.js.map +7 -0
  42. package/dist/cjs/parts/Toolbar/outOfTheBox/SearchToggle/useSearchToggle.js +122 -0
  43. package/dist/cjs/parts/Toolbar/outOfTheBox/SearchToggle/useSearchToggle.js.map +7 -0
  44. package/dist/cjs/parts/Toolbar/styles.js +5 -5
  45. package/dist/cjs/parts/Toolbar/styles.js.map +2 -2
  46. package/dist/cjs/parts/styles.js +4 -4
  47. package/dist/cjs/parts/styles.js.map +2 -2
  48. package/dist/cjs/react-desc-prop-types.js +2 -0
  49. package/dist/cjs/react-desc-prop-types.js.map +2 -2
  50. package/dist/esm/DSGlobalHeader.js +8 -9
  51. package/dist/esm/DSGlobalHeader.js.map +2 -2
  52. package/dist/esm/config/constants.js +0 -8
  53. package/dist/esm/config/constants.js.map +3 -3
  54. package/dist/esm/config/useGlobalHeader.js +2 -2
  55. package/dist/esm/config/useGlobalHeader.js.map +2 -2
  56. package/dist/esm/constants/index.js +146 -0
  57. package/dist/esm/constants/index.js.map +7 -0
  58. package/dist/esm/hooks/useOnClickOutside.js +30 -0
  59. package/dist/esm/hooks/useOnClickOutside.js.map +7 -0
  60. package/dist/esm/index.js +7 -3
  61. package/dist/esm/index.js.map +2 -2
  62. package/dist/esm/package.json +1 -4
  63. package/dist/esm/parts/Breadcrumb/GlobalHeaderBreadcrumb.js +6 -5
  64. package/dist/esm/parts/Breadcrumb/GlobalHeaderBreadcrumb.js.map +2 -2
  65. package/dist/esm/parts/Breadcrumb/PureBreadcrumb.js +7 -5
  66. package/dist/esm/parts/Breadcrumb/PureBreadcrumb.js.map +2 -2
  67. package/dist/esm/parts/Breadcrumb/styles.js +8 -8
  68. package/dist/esm/parts/Breadcrumb/styles.js.map +2 -2
  69. package/dist/esm/parts/Breadcrumb/useGlobalHeaderBreadcrumb.js +1 -1
  70. package/dist/esm/parts/Breadcrumb/useGlobalHeaderBreadcrumb.js.map +1 -1
  71. package/dist/esm/parts/Logo/GlobalHeaderLogo.js +2 -2
  72. package/dist/esm/parts/Logo/GlobalHeaderLogo.js.map +2 -2
  73. package/dist/esm/parts/Logo/styles.js +2 -2
  74. package/dist/esm/parts/Logo/styles.js.map +2 -2
  75. package/dist/esm/parts/Toolbar/GlobalHeaderToolbar.js +13 -12
  76. package/dist/esm/parts/Toolbar/GlobalHeaderToolbar.js.map +2 -2
  77. package/dist/esm/parts/Toolbar/outOfTheBox/AppPicker/AppPicker.js +2 -2
  78. package/dist/esm/parts/Toolbar/outOfTheBox/AppPicker/AppPicker.js.map +2 -2
  79. package/dist/esm/parts/Toolbar/outOfTheBox/PopupMenu/PopupMenu.js +57 -34
  80. package/dist/esm/parts/Toolbar/outOfTheBox/PopupMenu/PopupMenu.js.map +2 -2
  81. package/dist/esm/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/PopupMenuContent.js +90 -68
  82. package/dist/esm/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/PopupMenuContent.js.map +2 -2
  83. package/dist/esm/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/styles.js +6 -6
  84. package/dist/esm/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/styles.js.map +2 -2
  85. package/dist/esm/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/usePopupMenuContent.js +3 -1
  86. package/dist/esm/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/usePopupMenuContent.js.map +2 -2
  87. package/dist/esm/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggle.js +172 -94
  88. package/dist/esm/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggle.js.map +3 -3
  89. package/dist/esm/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggleSpinButton.js +136 -0
  90. package/dist/esm/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggleSpinButton.js.map +7 -0
  91. package/dist/esm/parts/Toolbar/outOfTheBox/SearchToggle/useSearchToggle.js +92 -0
  92. package/dist/esm/parts/Toolbar/outOfTheBox/SearchToggle/useSearchToggle.js.map +7 -0
  93. package/dist/esm/parts/Toolbar/styles.js +4 -4
  94. package/dist/esm/parts/Toolbar/styles.js.map +2 -2
  95. package/dist/esm/parts/styles.js +3 -3
  96. package/dist/esm/parts/styles.js.map +2 -2
  97. package/dist/esm/react-desc-prop-types.js +8 -1
  98. package/dist/esm/react-desc-prop-types.js.map +2 -2
  99. package/dist/types/DSGlobalHeader.d.ts +2 -2
  100. package/dist/types/config/constants.d.ts +0 -5
  101. package/dist/types/config/useGlobalHeader.d.ts +1 -1
  102. package/dist/types/constants/index.d.ts +184 -0
  103. package/dist/types/hooks/useOnClickOutside.d.ts +1 -0
  104. package/dist/types/index.d.ts +1 -1
  105. package/dist/types/parts/Breadcrumb/PureBreadcrumb.d.ts +5 -1
  106. package/dist/types/parts/Toolbar/outOfTheBox/PopupMenu/PopupMenu.d.ts +1 -1
  107. package/dist/types/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/PopupMenuContent.d.ts +1 -1
  108. package/dist/types/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggle.d.ts +1 -1
  109. package/dist/types/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggleSpinButton.d.ts +9 -0
  110. package/dist/types/parts/Toolbar/outOfTheBox/SearchToggle/useSearchToggle.d.ts +14 -0
  111. package/dist/types/react-desc-prop-types.d.ts +513 -21
  112. package/dist/types/tests/GlobalHeader.getOwnerProps.test.d.ts +1 -0
  113. package/package.json +29 -30
  114. package/dist/cjs/exported-related/DSGlobalHeaderDatatestid.js +0 -90
  115. package/dist/cjs/exported-related/DSGlobalHeaderDatatestid.js.map +0 -7
  116. package/dist/cjs/exported-related/index.js.map +0 -7
  117. package/dist/cjs/exported-related/theming.js +0 -90
  118. package/dist/cjs/exported-related/theming.js.map +0 -7
  119. package/dist/cjs/parts/Toolbar/outOfTheBox/SearchToggle/styles.js +0 -90
  120. package/dist/cjs/parts/Toolbar/outOfTheBox/SearchToggle/styles.js.map +0 -7
  121. package/dist/cjs/parts/Toolbar/outOfTheBox/SearchToggle/useCallbackAfterRender.js +0 -47
  122. package/dist/cjs/parts/Toolbar/outOfTheBox/SearchToggle/useCallbackAfterRender.js.map +0 -7
  123. package/dist/esm/exported-related/DSGlobalHeaderDatatestid.js +0 -60
  124. package/dist/esm/exported-related/DSGlobalHeaderDatatestid.js.map +0 -7
  125. package/dist/esm/exported-related/index.js +0 -11
  126. package/dist/esm/exported-related/index.js.map +0 -7
  127. package/dist/esm/exported-related/theming.js +0 -60
  128. package/dist/esm/exported-related/theming.js.map +0 -7
  129. package/dist/esm/parts/Toolbar/outOfTheBox/SearchToggle/styles.js +0 -60
  130. package/dist/esm/parts/Toolbar/outOfTheBox/SearchToggle/styles.js.map +0 -7
  131. package/dist/esm/parts/Toolbar/outOfTheBox/SearchToggle/useCallbackAfterRender.js +0 -17
  132. package/dist/esm/parts/Toolbar/outOfTheBox/SearchToggle/useCallbackAfterRender.js.map +0 -7
  133. package/dist/types/exported-related/DSGlobalHeaderDatatestid.d.ts +0 -54
  134. package/dist/types/exported-related/index.d.ts +0 -2
  135. package/dist/types/exported-related/theming.d.ts +0 -53
  136. package/dist/types/parts/Toolbar/outOfTheBox/SearchToggle/styles.d.ts +0 -1
  137. package/dist/types/parts/Toolbar/outOfTheBox/SearchToggle/useCallbackAfterRender.d.ts +0 -3
@@ -41,14 +41,14 @@ var React = __toESM(require("react"));
41
41
  var import_ds_system = require("@elliemae/ds-system");
42
42
  var import_ds_grid = require("@elliemae/ds-grid");
43
43
  var import_ds_icons = require("@elliemae/ds-icons");
44
- var import_theming = require("../../exported-related/theming.js");
44
+ var import_constants = require("../../constants/index.js");
45
45
  const StyledBreadcrumbContainer = (0, import_ds_system.styled)(import_ds_grid.Grid, {
46
- name: import_theming.DSGlobalHeaderName,
47
- slot: import_theming.DSGlobalHeaderSlots.BREADCRUMB.CONTAINER
46
+ name: import_constants.DSGlobalHeaderName,
47
+ slot: import_constants.GLOBAL_HEADER_SLOTS.BREADCRUMB_CONTAINER
48
48
  })``;
49
49
  const StyledBreadcrumbList = (0, import_ds_system.styled)("ul", {
50
- name: import_theming.DSGlobalHeaderName,
51
- slot: import_theming.DSGlobalHeaderSlots.BREADCRUMB.LIST
50
+ name: import_constants.DSGlobalHeaderName,
51
+ slot: import_constants.GLOBAL_HEADER_SLOTS.BREADCRUMB_LIST
52
52
  })`
53
53
  display: grid;
54
54
  grid-auto-flow: column;
@@ -59,28 +59,28 @@ const StyledBreadcrumbList = (0, import_ds_system.styled)("ul", {
59
59
  height: 100%;
60
60
  `;
61
61
  const StyledPipe = (0, import_ds_system.styled)("span", {
62
- name: import_theming.DSGlobalHeaderName,
63
- slot: import_theming.DSGlobalHeaderSlots.BREADCRUMB.PIPE
62
+ name: import_constants.DSGlobalHeaderName,
63
+ slot: import_constants.GLOBAL_HEADER_SLOTS.BREADCRUMB_PIPE
64
64
  })`
65
65
  margin: 0 7px 0 0;
66
66
  border-left: ${({ theme, showIconOnly }) => showIconOnly ? "none" : `1px solid ${theme.colors.neutral["000"]}`};
67
67
  height: 20px;
68
68
  `;
69
69
  const StyledChevron = (0, import_ds_system.styled)(import_ds_icons.ChevronSmallRight, {
70
- name: import_theming.DSGlobalHeaderName,
71
- slot: import_theming.DSGlobalHeaderSlots.BREADCRUMB.CHEVRON
70
+ name: import_constants.DSGlobalHeaderName,
71
+ slot: import_constants.GLOBAL_HEADER_SLOTS.BREADCRUMB_CHEVRON
72
72
  })`
73
73
  fill: ${({ theme }) => theme.colors.neutral["000"]};
74
74
  `;
75
75
  const StyledBreadcrumbItem = (0, import_ds_system.styled)("li", {
76
- name: import_theming.DSGlobalHeaderName,
77
- slot: import_theming.DSGlobalHeaderSlots.BREADCRUMB.ITEM
76
+ name: import_constants.DSGlobalHeaderName,
77
+ slot: import_constants.GLOBAL_HEADER_SLOTS.BREADCRUMB_ITEM
78
78
  })`
79
79
  display: flex;
80
80
  align-items: center;
81
81
  height: 3.077rem;
82
82
  `;
83
- const StyledLink = (0, import_ds_system.styled)("a", { name: import_theming.DSGlobalHeaderName, slot: import_theming.DSGlobalHeaderSlots.BREADCRUMB.ITEM_LINK })`
83
+ const StyledLink = (0, import_ds_system.styled)("a", { name: import_constants.DSGlobalHeaderName, slot: import_constants.GLOBAL_HEADER_SLOTS.BREADCRUMB_ITEM_LINK })`
84
84
  width: fit-content;
85
85
  height: 3.077rem;
86
86
  display: grid;
@@ -107,8 +107,8 @@ const StyledLink = (0, import_ds_system.styled)("a", { name: import_theming.DSGl
107
107
  }
108
108
  `;
109
109
  const StyledLabel = (0, import_ds_system.styled)("span", {
110
- name: import_theming.DSGlobalHeaderName,
111
- slot: import_theming.DSGlobalHeaderSlots.BREADCRUMB.ITEM_LINK_LABEL
110
+ name: import_constants.DSGlobalHeaderName,
111
+ slot: import_constants.GLOBAL_HEADER_SLOTS.BREADCRUMB_ITEM_LINK_LABEL
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"}`};
@@ -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: 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;AD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M,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,IACjD,CAAC,EAAE,OAAO,WAAW,MACrB,+BAA+B,aAAa,MAAM,OAAO,QAAQ,KAAK,IAAI,aAAa,EAAE;AAAA;AAAA,uBAEtE,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAM1C,CAAC,EAAE,OAAO,YAAY,WAAW,MAChD,aAAa,cAAc,CAAC,aAAa,MAAM,OAAO,QAAQ,KAAK,IAAI,aAAa,EAAE;AAAA;AAAA;AAAA,MAGpF,CAAC,EAAE,MAAM,MAAM,8BAA8B,MAAM,OAAO,QAAQ,KAAK,CAAC,EAAE;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, GLOBAL_HEADER_SLOTS } from '../../constants/index.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: GLOBAL_HEADER_SLOTS.BREADCRUMB_CONTAINER,\n})``;\n\nexport const StyledBreadcrumbList = styled('ul', {\n name: DSGlobalHeaderName,\n slot: GLOBAL_HEADER_SLOTS.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: GLOBAL_HEADER_SLOTS.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: GLOBAL_HEADER_SLOTS.BREADCRUMB_CHEVRON,\n})<ChevronT>`\n fill: ${({ theme }) => theme.colors.neutral['000']};\n`;\n\nexport const StyledBreadcrumbItem = styled('li', {\n name: DSGlobalHeaderName,\n slot: GLOBAL_HEADER_SLOTS.BREADCRUMB_ITEM,\n})`\n display: flex;\n align-items: center;\n height: 3.077rem;\n`;\n\nexport const StyledLink = styled('a', { name: DSGlobalHeaderName, slot: GLOBAL_HEADER_SLOTS.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: GLOBAL_HEADER_SLOTS.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": ";;;;;;;;;;;;;;;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EACN,MAAM,qCAAoB;AAC5B,CAAC;AAAA,WACU,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,IACjD,CAAC,EAAE,OAAO,WAAW,MACrB,+BAA+B,aAAa,MAAM,OAAO,QAAQ,KAAK,IAAI,aAAa,EAAE;AAAA;AAAA,uBAEtE,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAM1C,CAAC,EAAE,OAAO,YAAY,WAAW,MAChD,aAAa,cAAc,CAAC,aAAa,MAAM,OAAO,QAAQ,KAAK,IAAI,aAAa,EAAE;AAAA;AAAA;AAAA,MAGpF,CAAC,EAAE,MAAM,MAAM,8BAA8B,MAAM,OAAO,QAAQ,KAAK,CAAC,EAAE;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -33,7 +33,7 @@ __export(useGlobalHeaderBreadcrumb_exports, {
33
33
  module.exports = __toCommonJS(useGlobalHeaderBreadcrumb_exports);
34
34
  var React = __toESM(require("react"));
35
35
  var import_react = require("react");
36
- var import_constants = require("../../config/constants.js");
36
+ var import_constants = require("../../constants/index.js");
37
37
  var import_DSGlobalHeaderContext = require("../../DSGlobalHeaderContext.js");
38
38
  const useGlobalHeaderBreadcrumb = () => {
39
39
  const {
@@ -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 { useCallback, useContext, useEffect, useRef } from 'react';\nimport { FONT_DETECTOR } from '../../config/constants.js';\nimport { DSGlobalHeaderContext } from '../../DSGlobalHeaderContext.js';\nimport type { DSGlobalHeaderT } from '../../react-desc-prop-types.js';\n\ninterface UseGlobalHeaderBreadcrumbReturnT {\n breadcrumb: DSGlobalHeaderT.BreadcrumbItem[];\n CustomNavigation: React.ComponentType;\n showIconOnly: boolean;\n flexRegionRef: React.MutableRefObject<HTMLDivElement | null>;\n handleOnKeyDown: (\n onClick: (event: React.MouseEvent | React.KeyboardEvent) => void,\n ) => (event: React.KeyboardEvent) => void;\n instanceUID: string;\n ownerProps: {\n getOwnerProps: () => Partial<DSGlobalHeaderT.DefaultProps>;\n getOwnerPropsArguments: () => object;\n };\n}\n\nexport const useGlobalHeaderBreadcrumb = (): UseGlobalHeaderBreadcrumbReturnT => {\n const {\n props: { breadcrumb, CustomNavigation },\n ownerProps,\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 | React.KeyboardEvent) => void) => (e: React.KeyboardEvent) => {\n if (e.key === ' ' || e.key === 'Enter') {\n onClick(e);\n }\n },\n [],\n );\n\n return {\n breadcrumb,\n CustomNavigation,\n showIconOnly,\n flexRegionRef,\n handleOnKeyDown,\n instanceUID,\n ownerProps,\n };\n};\n", "import * as React from 'react';\nexport { React };\n"],
4
+ "sourcesContent": ["import type React from 'react';\nimport { useCallback, useContext, useEffect, useRef } from 'react';\nimport { FONT_DETECTOR } from '../../constants/index.js';\nimport { DSGlobalHeaderContext } from '../../DSGlobalHeaderContext.js';\nimport type { DSGlobalHeaderT } from '../../react-desc-prop-types.js';\n\ninterface UseGlobalHeaderBreadcrumbReturnT {\n breadcrumb: DSGlobalHeaderT.BreadcrumbItem[];\n CustomNavigation: React.ComponentType;\n showIconOnly: boolean;\n flexRegionRef: React.MutableRefObject<HTMLDivElement | null>;\n handleOnKeyDown: (\n onClick: (event: React.MouseEvent | React.KeyboardEvent) => void,\n ) => (event: React.KeyboardEvent) => void;\n instanceUID: string;\n ownerProps: {\n getOwnerProps: () => Partial<DSGlobalHeaderT.DefaultProps>;\n getOwnerPropsArguments: () => object;\n };\n}\n\nexport const useGlobalHeaderBreadcrumb = (): UseGlobalHeaderBreadcrumbReturnT => {\n const {\n props: { breadcrumb, CustomNavigation },\n ownerProps,\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 | React.KeyboardEvent) => void) => (e: React.KeyboardEvent) => {\n if (e.key === ' ' || e.key === 'Enter') {\n onClick(e);\n }\n },\n [],\n );\n\n return {\n breadcrumb,\n CustomNavigation,\n showIconOnly,\n flexRegionRef,\n handleOnKeyDown,\n instanceUID,\n ownerProps,\n };\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAA2D;AAC3D,uBAA8B;AAC9B,mCAAsC;AAkB/B,MAAM,4BAA4B,MAAwC;AAC/E,QAAM;AAAA,IACJ,OAAO,EAAE,YAAY,iBAAiB;AAAA,IACtC;AAAA,IACA;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,YAAqE,CAAC,MAA2B;AAChG,UAAI,EAAE,QAAQ,OAAO,EAAE,QAAQ,SAAS;AACtC,gBAAQ,CAAC;AAAA,MACX;AAAA,IACF;AAAA,IACA,CAAC;AAAA,EACH;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
6
6
  "names": []
7
7
  }
@@ -37,7 +37,7 @@ var import_react = __toESM(require("react"));
37
37
  var import_ds_system = require("@elliemae/ds-system");
38
38
  var import_DSGlobalHeaderContext = require("../../DSGlobalHeaderContext.js");
39
39
  var import_styles = require("./styles.js");
40
- var import_exported_related = require("../../exported-related/index.js");
40
+ var import_constants = require("../../constants/index.js");
41
41
  const GlobalHeaderLogo = () => {
42
42
  const {
43
43
  props: { Logo, LogoWithBrand },
@@ -53,7 +53,7 @@ const GlobalHeaderLogo = () => {
53
53
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
54
54
  import_styles.StyledLogoContainer,
55
55
  {
56
- "data-testid": import_exported_related.DSGlobalHeaderDatatestid.LOGO.CONTAINER,
56
+ "data-testid": import_constants.GLOBAL_HEADER_DATA_TESTID.LOGO_CONTAINER,
57
57
  alignItems: "center",
58
58
  pr: smalScreen ? "0px" : "36px",
59
59
  cols: smalScreen ? ["auto"] : ["auto", "1fr"],
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/parts/Logo/GlobalHeaderLogo.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useContext } from 'react';\nimport { useGetLayoutMode } from '@elliemae/ds-system';\nimport { DSGlobalHeaderContext } from '../../DSGlobalHeaderContext.js';\nimport { StyledLogoContainer } from './styles.js';\nimport { DSGlobalHeaderDatatestid } from '../../exported-related/index.js';\n\nexport const GlobalHeaderLogo = (): JSX.Element => {\n const {\n props: { Logo, LogoWithBrand },\n showIconOnly,\n ownerProps,\n } = useContext(DSGlobalHeaderContext);\n const layoutMode = useGetLayoutMode();\n\n const smalScreen = React.useMemo(() => {\n if (!layoutMode) return showIconOnly;\n if (layoutMode === 'xs' || layoutMode === 's') return true;\n return false;\n }, [layoutMode, showIconOnly]);\n\n return (\n <StyledLogoContainer\n data-testid={DSGlobalHeaderDatatestid.LOGO.CONTAINER}\n alignItems=\"center\"\n pr={smalScreen ? '0px' : '36px'}\n cols={smalScreen ? ['auto'] : ['auto', '1fr']}\n {...ownerProps}\n >\n {Logo && smalScreen && <Logo />}\n {LogoWithBrand && !smalScreen && <LogoWithBrand />}\n </StyledLogoContainer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADqBnB;AArBJ,mBAAkC;AAClC,uBAAiC;AACjC,mCAAsC;AACtC,oBAAoC;AACpC,8BAAyC;AAElC,MAAM,mBAAmB,MAAmB;AACjD,QAAM;AAAA,IACJ,OAAO,EAAE,MAAM,cAAc;AAAA,IAC7B;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,kDAAqB;AACpC,QAAM,iBAAa,mCAAiB;AAEpC,QAAM,aAAa,aAAAA,QAAM,QAAQ,MAAM;AACrC,QAAI,CAAC,WAAY,QAAO;AACxB,QAAI,eAAe,QAAQ,eAAe,IAAK,QAAO;AACtD,WAAO;AAAA,EACT,GAAG,CAAC,YAAY,YAAY,CAAC;AAE7B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAa,iDAAyB,KAAK;AAAA,MAC3C,YAAW;AAAA,MACX,IAAI,aAAa,QAAQ;AAAA,MACzB,MAAM,aAAa,CAAC,MAAM,IAAI,CAAC,QAAQ,KAAK;AAAA,MAC3C,GAAG;AAAA,MAEH;AAAA,gBAAQ,cAAc,4CAAC,QAAK;AAAA,QAC5B,iBAAiB,CAAC,cAAc,4CAAC,iBAAc;AAAA;AAAA;AAAA,EAClD;AAEJ;",
4
+ "sourcesContent": ["import React, { useContext } from 'react';\nimport { useGetLayoutMode } from '@elliemae/ds-system';\nimport { DSGlobalHeaderContext } from '../../DSGlobalHeaderContext.js';\nimport { StyledLogoContainer } from './styles.js';\nimport { GLOBAL_HEADER_DATA_TESTID } from '../../constants/index.js';\n\nexport const GlobalHeaderLogo = (): JSX.Element => {\n const {\n props: { Logo, LogoWithBrand },\n showIconOnly,\n ownerProps,\n } = useContext(DSGlobalHeaderContext);\n const layoutMode = useGetLayoutMode();\n\n const smalScreen = React.useMemo(() => {\n if (!layoutMode) return showIconOnly;\n if (layoutMode === 'xs' || layoutMode === 's') return true;\n return false;\n }, [layoutMode, showIconOnly]);\n\n return (\n <StyledLogoContainer\n data-testid={GLOBAL_HEADER_DATA_TESTID.LOGO_CONTAINER}\n alignItems=\"center\"\n pr={smalScreen ? '0px' : '36px'}\n cols={smalScreen ? ['auto'] : ['auto', '1fr']}\n {...ownerProps}\n >\n {Logo && smalScreen && <Logo />}\n {LogoWithBrand && !smalScreen && <LogoWithBrand />}\n </StyledLogoContainer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADqBnB;AArBJ,mBAAkC;AAClC,uBAAiC;AACjC,mCAAsC;AACtC,oBAAoC;AACpC,uBAA0C;AAEnC,MAAM,mBAAmB,MAAmB;AACjD,QAAM;AAAA,IACJ,OAAO,EAAE,MAAM,cAAc;AAAA,IAC7B;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,kDAAqB;AACpC,QAAM,iBAAa,mCAAiB;AAEpC,QAAM,aAAa,aAAAA,QAAM,QAAQ,MAAM;AACrC,QAAI,CAAC,WAAY,QAAO;AACxB,QAAI,eAAe,QAAQ,eAAe,IAAK,QAAO;AACtD,WAAO;AAAA,EACT,GAAG,CAAC,YAAY,YAAY,CAAC;AAE7B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAa,2CAA0B;AAAA,MACvC,YAAW;AAAA,MACX,IAAI,aAAa,QAAQ;AAAA,MACzB,MAAM,aAAa,CAAC,MAAM,IAAI,CAAC,QAAQ,KAAK;AAAA,MAC3C,GAAG;AAAA,MAEH;AAAA,gBAAQ,cAAc,4CAAC,QAAK;AAAA,QAC5B,iBAAiB,CAAC,cAAc,4CAAC,iBAAc;AAAA;AAAA;AAAA,EAClD;AAEJ;",
6
6
  "names": ["React"]
7
7
  }
@@ -34,10 +34,10 @@ module.exports = __toCommonJS(styles_exports);
34
34
  var React = __toESM(require("react"));
35
35
  var import_ds_system = require("@elliemae/ds-system");
36
36
  var import_ds_grid = require("@elliemae/ds-grid");
37
- var import_theming = require("../../exported-related/theming.js");
37
+ var import_constants = require("../../constants/index.js");
38
38
  const StyledLogoContainer = (0, import_ds_system.styled)(import_ds_grid.Grid, {
39
- name: import_theming.DSGlobalHeaderName,
40
- slot: import_theming.DSGlobalHeaderSlots.LOGO.CONTAINER
39
+ name: import_constants.DSGlobalHeaderName,
40
+ slot: import_constants.GLOBAL_HEADER_SLOTS.LOGO_CONTAINER
41
41
  })`
42
42
  min-height: 40px;
43
43
  `;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/parts/Logo/styles.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSGlobalHeaderName, DSGlobalHeaderSlots } from '../../exported-related/theming.js';\n\nexport const StyledLogoContainer = styled(Grid, {\n name: DSGlobalHeaderName,\n slot: DSGlobalHeaderSlots.LOGO.CONTAINER,\n})`\n min-height: 40px;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AACvB,qBAAqB;AACrB,qBAAwD;AAEjD,MAAM,0BAAsB,yBAAO,qBAAM;AAAA,EAC9C,MAAM;AAAA,EACN,MAAM,mCAAoB,KAAK;AACjC,CAAC;AAAA;AAAA;",
4
+ "sourcesContent": ["import { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSGlobalHeaderName, GLOBAL_HEADER_SLOTS } from '../../constants/index.js';\n\nexport const StyledLogoContainer = styled(Grid, {\n name: DSGlobalHeaderName,\n slot: GLOBAL_HEADER_SLOTS.LOGO_CONTAINER,\n})`\n min-height: 40px;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AACvB,qBAAqB;AACrB,uBAAwD;AAEjD,MAAM,0BAAsB,yBAAO,qBAAM;AAAA,EAC9C,MAAM;AAAA,EACN,MAAM,qCAAoB;AAC5B,CAAC;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -35,9 +35,8 @@ var React = __toESM(require("react"));
35
35
  var import_jsx_runtime = require("react/jsx-runtime");
36
36
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
37
37
  var import_react = require("react");
38
- var import_constants = require("../../config/constants.js");
38
+ var import_constants = require("../../constants/index.js");
39
39
  var import_DSGlobalHeaderContext = require("../../DSGlobalHeaderContext.js");
40
- var import_exported_related = require("../../exported-related/index.js");
41
40
  var import_styles = require("../styles.js");
42
41
  var import_outOfTheBox = require("./outOfTheBox/index.js");
43
42
  var import_styles2 = require("./styles.js");
@@ -54,7 +53,7 @@ const GlobalHeaderToolbar = () => {
54
53
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
55
54
  import_styles2.StyledMenubarContainer,
56
55
  {
57
- "data-testid": import_exported_related.DSGlobalHeaderDatatestid.MENUBAR.CONTAINER,
56
+ "data-testid": import_constants.GLOBAL_HEADER_DATA_TESTID.MENUBAR_CONTAINER,
58
57
  "aria-label": "menubar",
59
58
  withSpan: fontDetector > import_constants.FONT_DETECTOR.SMALL,
60
59
  ...ownerProps,
@@ -69,7 +68,7 @@ const GlobalHeaderToolbar = () => {
69
68
  role: "menubar",
70
69
  onKeyDown: keyboardNavigation,
71
70
  innerRef: listRef,
72
- "data-testid": import_exported_related.DSGlobalHeaderDatatestid.MENUBAR.LIST,
71
+ "data-testid": import_constants.GLOBAL_HEADER_DATA_TESTID.MENUBAR_LIST,
73
72
  ...ownerProps,
74
73
  children: toolbar.map((item, index) => {
75
74
  const { type } = item;
@@ -80,14 +79,15 @@ const GlobalHeaderToolbar = () => {
80
79
  import_styles2.StyledToolbarItem,
81
80
  {
82
81
  role: "menuitem",
83
- "data-testid": import_exported_related.DSGlobalHeaderDatatestid.MENUBAR.ITEM,
82
+ "data-testid": import_constants.GLOBAL_HEADER_DATA_TESTID.MENUBAR_ITEM,
84
83
  ...ownerProps,
85
84
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
86
85
  import_outOfTheBox.PopupMenu,
87
86
  {
88
87
  title: label2,
89
88
  setRef: setRefIndex,
90
- ...otherProps2
89
+ ...otherProps2,
90
+ ownerProps
91
91
  }
92
92
  )
93
93
  },
@@ -100,7 +100,7 @@ const GlobalHeaderToolbar = () => {
100
100
  import_styles2.StyledToolbarItem,
101
101
  {
102
102
  role: "menuitem",
103
- "data-testid": import_exported_related.DSGlobalHeaderDatatestid.MENUBAR.ITEM,
103
+ "data-testid": import_constants.GLOBAL_HEADER_DATA_TESTID.MENUBAR_ITEM,
104
104
  ...ownerProps,
105
105
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_outOfTheBox.AppPicker, { label: label2, setRef: setRefIndex, ...otherProps2 })
106
106
  },
@@ -113,9 +113,9 @@ const GlobalHeaderToolbar = () => {
113
113
  import_styles2.StyledToolbarItem,
114
114
  {
115
115
  role: "menuitem",
116
- "data-testid": import_exported_related.DSGlobalHeaderDatatestid.MENUBAR.ITEM,
116
+ "data-testid": import_constants.GLOBAL_HEADER_DATA_TESTID.MENUBAR_ITEM,
117
117
  ...ownerProps,
118
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_outOfTheBox.SearchToggle, { label: label2, setRef: setRefIndex, ...otherProps2 })
118
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_outOfTheBox.SearchToggle, { instanceUID, label: label2, setRef: setRefIndex, ...otherProps2 })
119
119
  },
120
120
  `${instanceUID}-ds-toolbar-item-${label2}`
121
121
  );
@@ -127,7 +127,7 @@ const GlobalHeaderToolbar = () => {
127
127
  import_styles2.StyledToolbarItem,
128
128
  {
129
129
  role: "menuitem",
130
- "data-testid": import_exported_related.DSGlobalHeaderDatatestid.MENUBAR.ITEM,
130
+ "data-testid": import_constants.GLOBAL_HEADER_DATA_TESTID.MENUBAR_ITEM,
131
131
  ...ownerProps,
132
132
  children: CustomComponent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CustomComponent, { item, setRef: setRefIndex })
133
133
  },
@@ -139,16 +139,17 @@ const GlobalHeaderToolbar = () => {
139
139
  import_styles2.StyledToolbarItem,
140
140
  {
141
141
  role: "menuitem",
142
- "data-testid": import_exported_related.DSGlobalHeaderDatatestid.MENUBAR.ITEM,
142
+ "data-testid": import_constants.GLOBAL_HEADER_DATA_TESTID.MENUBAR_ITEM,
143
143
  ...ownerProps,
144
144
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
145
145
  import_styles.StyledButton,
146
146
  {
147
147
  title: label,
148
- "data-testid": import_exported_related.DSGlobalHeaderDatatestid.MENUBAR.ITEM_BUTTON,
148
+ "data-testid": import_constants.GLOBAL_HEADER_DATA_TESTID.MENUBAR_ITEM_BUTTON,
149
149
  innerRef: setRefIndex,
150
150
  ...(0, import_ds_props_helpers.getGlobalAttributes)(otherProps),
151
151
  type: "button",
152
+ ...ownerProps,
152
153
  children: Icon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { size: "m" })
153
154
  }
154
155
  )
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/parts/Toolbar/GlobalHeaderToolbar.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { getGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport { useContext } from 'react';\nimport { FONT_DETECTOR } from '../../config/constants.js';\nimport { DSGlobalHeaderContext } from '../../DSGlobalHeaderContext.js';\nimport { DSGlobalHeaderDatatestid } from '../../exported-related/index.js';\nimport { StyledButton } from '../styles.js';\nimport { AppPicker, PopupMenu, SearchToggle } from './outOfTheBox/index.js';\nimport { StyledList, StyledMenubarContainer, StyledToolbarItem } from './styles.js';\nimport { useGlobalHeaderToolbar } from './useGlobalHeaderToolbar.js';\n\nexport const GlobalHeaderToolbar = (): JSX.Element => {\n const {\n props: { toolbar },\n ownerProps,\n instanceUID,\n globalHeaderToolbarGrid,\n fontDetector,\n } = useContext(DSGlobalHeaderContext);\n\n const { listRef, setRef, keyboardNavigation } = useGlobalHeaderToolbar();\n\n return (\n <StyledMenubarContainer\n data-testid={DSGlobalHeaderDatatestid.MENUBAR.CONTAINER}\n aria-label=\"menubar\"\n withSpan={fontDetector > FONT_DETECTOR.SMALL}\n {...ownerProps}\n >\n <StyledList\n height=\"100%\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gutter=\"xxs\"\n cols={globalHeaderToolbarGrid}\n role=\"menubar\"\n onKeyDown={keyboardNavigation}\n innerRef={listRef}\n data-testid={DSGlobalHeaderDatatestid.MENUBAR.LIST}\n {...ownerProps}\n >\n {toolbar.map((item, index) => {\n const { type } = item;\n const setRefIndex = setRef(index);\n\n if (type === 'ds-popup-menu') {\n const { label, ...otherProps } = item;\n return (\n <StyledToolbarItem\n role=\"menuitem\"\n key={`${instanceUID}-ds-toolbar-item-${label}`}\n data-testid={DSGlobalHeaderDatatestid.MENUBAR.ITEM}\n {...ownerProps}\n >\n <PopupMenu\n title={label} // this is captured as the standard HTML \"title\" attribute and is printed in output HTML\n setRef={setRefIndex}\n {...otherProps}\n />\n </StyledToolbarItem>\n );\n }\n if (type === 'ds-app-picker') {\n const { label, ...otherProps } = item;\n return (\n <StyledToolbarItem\n role=\"menuitem\"\n key={`${instanceUID}-ds-toolbar-item-${label}`}\n data-testid={DSGlobalHeaderDatatestid.MENUBAR.ITEM}\n {...ownerProps}\n >\n <AppPicker label={label} setRef={setRefIndex} {...otherProps} />\n </StyledToolbarItem>\n );\n }\n if (type === 'ds-search-toggle') {\n const { label, ...otherProps } = item;\n return (\n <StyledToolbarItem\n role=\"menuitem\"\n key={`${instanceUID}-ds-toolbar-item-${label}`}\n data-testid={DSGlobalHeaderDatatestid.MENUBAR.ITEM}\n {...ownerProps}\n >\n <SearchToggle label={label} setRef={setRefIndex} {...otherProps} />\n </StyledToolbarItem>\n );\n }\n if (type === 'custom') {\n const { label, CustomComponent } = item;\n if (!CustomComponent) return null;\n return (\n <StyledToolbarItem\n role=\"menuitem\"\n key={`${instanceUID}-ds-toolbar-item-${label}`}\n data-testid={DSGlobalHeaderDatatestid.MENUBAR.ITEM}\n {...ownerProps}\n >\n {CustomComponent && <CustomComponent item={item} setRef={setRefIndex} />}\n </StyledToolbarItem>\n );\n }\n\n const { label, Icon, ...otherProps } = item;\n return (\n <StyledToolbarItem\n role=\"menuitem\"\n key={`${instanceUID}-ds-toolbar-item-${label}`}\n data-testid={DSGlobalHeaderDatatestid.MENUBAR.ITEM}\n {...ownerProps}\n >\n <StyledButton\n title={label} // this is captured as the standard HTML \"title\" attribute and is printed in output HTML\n data-testid={DSGlobalHeaderDatatestid.MENUBAR.ITEM_BUTTON}\n innerRef={setRefIndex}\n {...getGlobalAttributes(otherProps)}\n type=\"button\"\n >\n {Icon && <Icon size=\"m\" />}\n </StyledButton>\n </StyledToolbarItem>\n );\n })}\n </StyledList>\n </StyledMenubarContainer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADqDP;AArDhB,8BAAoC;AACpC,mBAA2B;AAC3B,uBAA8B;AAC9B,mCAAsC;AACtC,8BAAyC;AACzC,oBAA6B;AAC7B,yBAAmD;AACnD,IAAAA,iBAAsE;AACtE,oCAAuC;AAEhC,MAAM,sBAAsB,MAAmB;AACpD,QAAM;AAAA,IACJ,OAAO,E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",
4
+ "sourcesContent": ["import { getGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport { useContext } from 'react';\nimport { FONT_DETECTOR, GLOBAL_HEADER_DATA_TESTID } from '../../constants/index.js';\nimport { DSGlobalHeaderContext } from '../../DSGlobalHeaderContext.js';\nimport { StyledButton } from '../styles.js';\nimport { AppPicker, PopupMenu, SearchToggle } from './outOfTheBox/index.js';\nimport { StyledList, StyledMenubarContainer, StyledToolbarItem } from './styles.js';\nimport { useGlobalHeaderToolbar } from './useGlobalHeaderToolbar.js';\n\nexport const GlobalHeaderToolbar = (): JSX.Element => {\n const {\n props: { toolbar },\n ownerProps,\n instanceUID,\n globalHeaderToolbarGrid,\n fontDetector,\n } = useContext(DSGlobalHeaderContext);\n\n const { listRef, setRef, keyboardNavigation } = useGlobalHeaderToolbar();\n\n return (\n <StyledMenubarContainer\n data-testid={GLOBAL_HEADER_DATA_TESTID.MENUBAR_CONTAINER}\n aria-label=\"menubar\"\n withSpan={fontDetector > FONT_DETECTOR.SMALL}\n {...ownerProps}\n >\n <StyledList\n height=\"100%\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gutter=\"xxs\"\n cols={globalHeaderToolbarGrid}\n role=\"menubar\"\n onKeyDown={keyboardNavigation}\n innerRef={listRef}\n data-testid={GLOBAL_HEADER_DATA_TESTID.MENUBAR_LIST}\n {...ownerProps}\n >\n {toolbar.map((item, index) => {\n const { type } = item;\n // inside a toolbar items needs to be navigable via arrow keys.\n // this setRef(index) is generating an index of references that can be \"focused\" when user is navigating with arrows\n // NOTE:\n // focus management based on DOM nodes.focus() in react is problematic due to unpredictable timing of refs assignment and react rendering\n // we should be using the \"focus tracker\" approach where we keep track of \"what we want to focuse\",\n // then have the ref callback functions invoke the focus to the element AFTER the LAST element is rendered, not tracking the DOM nodes directly.\n // We aren't changing this right now, but let's keep this in mind.\n const setRefIndex = setRef(index);\n\n if (type === 'ds-popup-menu') {\n const { label, ...otherProps } = item;\n return (\n <StyledToolbarItem\n role=\"menuitem\"\n key={`${instanceUID}-ds-toolbar-item-${label}`}\n data-testid={GLOBAL_HEADER_DATA_TESTID.MENUBAR_ITEM}\n {...ownerProps}\n >\n <PopupMenu\n title={label} // this is captured as the standard HTML \"title\" attribute and is printed in output HTML\n setRef={setRefIndex}\n {...otherProps}\n ownerProps={ownerProps}\n />\n </StyledToolbarItem>\n );\n }\n if (type === 'ds-app-picker') {\n const { label, ...otherProps } = item;\n return (\n <StyledToolbarItem\n role=\"menuitem\"\n key={`${instanceUID}-ds-toolbar-item-${label}`}\n data-testid={GLOBAL_HEADER_DATA_TESTID.MENUBAR_ITEM}\n {...ownerProps}\n >\n <AppPicker label={label} setRef={setRefIndex} {...otherProps} />\n </StyledToolbarItem>\n );\n }\n if (type === 'ds-search-toggle') {\n const { label, ...otherProps } = item;\n return (\n <StyledToolbarItem\n role=\"menuitem\"\n key={`${instanceUID}-ds-toolbar-item-${label}`}\n data-testid={GLOBAL_HEADER_DATA_TESTID.MENUBAR_ITEM}\n {...ownerProps}\n >\n <SearchToggle instanceUID={instanceUID} label={label} setRef={setRefIndex} {...otherProps} />\n </StyledToolbarItem>\n );\n }\n if (type === 'custom') {\n const { label, CustomComponent } = item;\n if (!CustomComponent) return null;\n return (\n <StyledToolbarItem\n role=\"menuitem\"\n key={`${instanceUID}-ds-toolbar-item-${label}`}\n data-testid={GLOBAL_HEADER_DATA_TESTID.MENUBAR_ITEM}\n {...ownerProps}\n >\n {CustomComponent && <CustomComponent item={item} setRef={setRefIndex} />}\n </StyledToolbarItem>\n );\n }\n\n const { label, Icon, ...otherProps } = item;\n return (\n <StyledToolbarItem\n role=\"menuitem\"\n key={`${instanceUID}-ds-toolbar-item-${label}`}\n data-testid={GLOBAL_HEADER_DATA_TESTID.MENUBAR_ITEM}\n {...ownerProps}\n >\n <StyledButton\n title={label} // this is captured as the standard HTML \"title\" attribute and is printed in output HTML\n data-testid={GLOBAL_HEADER_DATA_TESTID.MENUBAR_ITEM_BUTTON}\n innerRef={setRefIndex}\n {...getGlobalAttributes(otherProps)}\n type=\"button\"\n {...ownerProps}\n >\n {Icon && <Icon size=\"m\" />}\n </StyledButton>\n </StyledToolbarItem>\n );\n })}\n </StyledList>\n </StyledMenubarContainer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD2DP;AA3DhB,8BAAoC;AACpC,mBAA2B;AAC3B,uBAAyD;AACzD,mCAAsC;AACtC,oBAA6B;AAC7B,yBAAmD;AACnD,IAAAA,iBAAsE;AACtE,oCAAuC;AAEhC,MAAM,sBAAsB,MAAmB;AACpD,QAAM;AAAA,IACJ,OAAO,EAAE,QAAQ;AAAA,IACjB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,kDAAqB;AAEpC,QAAM,EAAE,SAAS,QAAQ,mBAAmB,QAAI,sDAAuB;AAEvE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAa,2CAA0B;AAAA,MACvC,cAAW;AAAA,MACX,UAAU,eAAe,+BAAc;AAAA,MACtC,GAAG;AAAA,MAEJ;AAAA,QAAC;AAAA;AAAA,UACC,QAAO;AAAA,UACP,YAAW;AAAA,UACX,gBAAe;AAAA,UACf,QAAO;AAAA,UACP,MAAM;AAAA,UACN,MAAK;AAAA,UACL,WAAW;AAAA,UACX,UAAU;AAAA,UACV,eAAa,2CAA0B;AAAA,UACtC,GAAG;AAAA,UAEH,kBAAQ,IAAI,CAAC,MAAM,UAAU;AAC5B,kBAAM,EAAE,KAAK,IAAI;AAQjB,kBAAM,cAAc,OAAO,KAAK;AAEhC,gBAAI,SAAS,iBAAiB;AAC5B,oBAAM,EAAE,OAAAC,QAAO,GAAGC,YAAW,IAAI;AACjC,qBACE;AAAA,gBAAC;AAAA;AAAA,kBACC,MAAK;AAAA,kBAEL,eAAa,2CAA0B;AAAA,kBACtC,GAAG;AAAA,kBA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AAC;AAAA;AAAA,gBACC,MAAK;AAAA,gBAEL,eAAa,2CAA0B;AAAA,gBACtC,GAAG;AAAA,gBAEJ;AAAA,kBAAC;AAAA;AAAA,oBACC,OAAO;AAAA,oBACP,eAAa,2CAA0B;AAAA,oBACvC,UAAU;AAAA,oBACT,OAAG,6CAAoB,UAAU;AAAA,oBAClC,MAAK;AAAA,oBACJ,GAAG;AAAA,oBAEH,kBAAQ,4CAAC,QAAK,MAAK,KAAI;AAAA;AAAA,gBAC1B;AAAA;AAAA,cAbK,GAAG,WAAW,oBAAoB,KAAK;AAAA,YAc9C;AAAA,UAEJ,CAAC;AAAA;AAAA,MACH;AAAA;AAAA,EACF;AAEJ;",
6
6
  "names": ["import_styles", "label", "otherProps"]
7
7
  }
@@ -38,7 +38,7 @@ var import_ds_icons = require("@elliemae/ds-icons");
38
38
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
39
39
  var import_ds_system = require("@elliemae/ds-system");
40
40
  var import_react = require("react");
41
- var import_exported_related = require("../../../../exported-related/index.js");
41
+ var import_constants = require("../../../../constants/index.js");
42
42
  var import_useCallbackAfterRender = require("../../../../utils/useCallbackAfterRender.js");
43
43
  var import_styles = require("../../../styles.js");
44
44
  const AppPicker = ({ label, setRef, componentProps, ...otherProps }) => {
@@ -98,7 +98,7 @@ const AppPicker = ({ label, setRef, componentProps, ...otherProps }) => {
98
98
  (0, import_ds_system.mergeRefs)(internalTriggerRef, triggerRef, ref)(buttonRef);
99
99
  },
100
100
  "aria-label": label,
101
- "data-testid": import_exported_related.DSGlobalHeaderDatatestid.MENUBAR.ITEM_BUTTON,
101
+ "data-testid": import_constants.GLOBAL_HEADER_DATA_TESTID.MENUBAR_ITEM_BUTTON,
102
102
  "aria-haspopup": true,
103
103
  "aria-expanded": userIsOpen ?? isOpen,
104
104
  ...(0, import_ds_props_helpers.getGlobalAttributes)(otherProps),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/parts/Toolbar/outOfTheBox/AppPicker/AppPicker.tsx", "../../../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { DSAppPicker } from '@elliemae/ds-app-picker';\nimport { MenuPicker } from '@elliemae/ds-icons';\nimport { getGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport { mergeRefs } from '@elliemae/ds-system';\nimport React, { useCallback, useRef, useState } from 'react';\nimport { DSGlobalHeaderDatatestid } from '../../../../exported-related/index.js';\nimport type { DSGlobalHeaderT } from '../../../../react-desc-prop-types.js';\nimport { useCallbackAfterRender } from '../../../../utils/useCallbackAfterRender.js';\nimport { StyledButton } from '../../../styles.js';\n\ntype AppPickerOutOfTheBoxProps =\n // what comes from\n // the prop toolbar (array)\n // specifically only if the type is 'ds-app-picker' so they give us the correct interface\n DSGlobalHeaderT.AppPickerProps & {\n // this interface is an addition that comes from our own implementation\n // GlobalHeaderToolbar -> useGlobalHeaderToolbar\n // is handling focus management for the user when using our out of the box\n setRef: (ref: HTMLElement) => void;\n };\n\nexport const AppPicker = ({ label, setRef, componentProps, ...otherProps }: AppPickerOutOfTheBoxProps): JSX.Element => {\n const [isOpen, setIsOpen] = useState<boolean>(false);\n const internalTriggerRef = useRef<HTMLButtonElement>(null);\n\n const {\n apps,\n icon,\n customApps,\n sectionTitle,\n customSectionTitle,\n actionRef,\n isOpen: userIsOpen,\n onKeyDown: userOnKeyDown,\n onClickOutside: userOnClickOutside,\n renderTrigger: userRenderTrigger,\n onClose,\n triggerRef,\n triggerOnClick,\n } = componentProps;\n\n const schedule = useCallbackAfterRender();\n\n // const appPickerRef = useRef(null);\n // const internalActionRef = useMemo(() => actionRef ?? appPickerRef, [actionRef]);\n\n const focusTrigger = useCallback(() => internalTriggerRef.current?.focus(), []);\n\n const handleTriggerKeyDown: React.KeyboardEventHandler = useCallback((e) => {\n if (e.code === 'Enter' || e.code === 'Space' || e.code === 'ArrowDown') {\n setIsOpen(true);\n }\n }, []);\n\n const handleAppPickerOnKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === 'Escape') {\n setIsOpen(false);\n schedule(focusTrigger);\n }\n },\n [focusTrigger, schedule],\n );\n\n const handleOnClickOutside = useCallback(() => {\n setIsOpen(false);\n }, []);\n\n const handleOnClick: React.MouseEventHandler = useCallback(\n (e) => {\n setIsOpen(true);\n setTimeout(() => {\n if (e.detail === 0) actionRef?.current?.focusSelectedOrFirstAvailable?.();\n else actionRef?.current?.focusWrapper();\n }, 10);\n },\n [actionRef],\n );\n\n // eslint-disable-next-line react/no-unstable-nested-components\n const TriggerDefaultComponent = ({ ref }: { ref: React.MutableRefObject<HTMLButtonElement> }) => (\n <StyledButton\n onClick={triggerOnClick ?? handleOnClick}\n onKeyDown={handleTriggerKeyDown}\n innerRef={(buttonRef: HTMLButtonElement) => {\n setRef(buttonRef);\n mergeRefs(internalTriggerRef, triggerRef, ref)(buttonRef);\n }}\n aria-label={label}\n data-testid={DSGlobalHeaderDatatestid.MENUBAR.ITEM_BUTTON}\n aria-haspopup\n aria-expanded={userIsOpen ?? isOpen}\n {...getGlobalAttributes(otherProps)}\n type=\"button\"\n >\n <MenuPicker width={20.73} height={20.73} />\n </StyledButton>\n );\n\n return (\n <DSAppPicker\n apps={apps}\n customApps={customApps}\n sectionTitle={sectionTitle}\n customSectionTitle={customSectionTitle}\n icon={icon}\n onKeyDown={userOnKeyDown ?? handleAppPickerOnKeyDown}\n actionRef={actionRef}\n onClickOutside={userOnClickOutside ?? handleOnClickOutside}\n renderTrigger={userRenderTrigger || TriggerDefaultComponent}\n isOpen={userIsOpen ?? isOpen}\n onClose={onClose}\n triggerRef={triggerRef}\n />\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+FjB;AA/FN,2BAA4B;AAC5B,sBAA2B;AAC3B,8BAAoC;AACpC,uBAA0B;AAC1B,mBAAqD;AACrD,8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,SAAS,kBAAkB;AAAA,MAC3B,WAAW;AAAA,MACX,UAAU,CAAC,cAAiC;AAC1C,eAAO,SAAS;AAChB,wCAAU,oBAAoB,YAAY,GAAG,EAAE,SAAS;AAAA,MAC1D;AAAA,MACA,cAAY;AAAA,MACZ,eAAa,iDAAyB,QAAQ;AAAA,MAC9C,iBAAa;AAAA,MACb,iBAAe,cAAc;AAAA,MAC5B,OAAG,6CAAoB,UAAU;AAAA,MAClC,MAAK;AAAA,MAEL,sDAAC,8BAAW,OAAO,OAAO,QAAQ,OAAO;AAAA;AAAA,EAC3C;AAGF,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAW,iBAAiB;AAAA,MAC5B;AAAA,MACA,gBAAgB,sBAAsB;AAAA,MACtC,eAAe,qBAAqB;AAAA,MACpC,QAAQ,cAAc;AAAA,MACtB;AAAA,MACA;AAAA;AAAA,EACF;AAEJ;",
4
+ "sourcesContent": ["import { DSAppPicker } from '@elliemae/ds-app-picker';\nimport { MenuPicker } from '@elliemae/ds-icons';\nimport { getGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport { mergeRefs } from '@elliemae/ds-system';\nimport React, { useCallback, useRef, useState } from 'react';\nimport { GLOBAL_HEADER_DATA_TESTID } from '../../../../constants/index.js';\nimport type { DSGlobalHeaderT } from '../../../../react-desc-prop-types.js';\nimport { useCallbackAfterRender } from '../../../../utils/useCallbackAfterRender.js';\nimport { StyledButton } from '../../../styles.js';\n\ntype AppPickerOutOfTheBoxProps =\n // what comes from\n // the prop toolbar (array)\n // specifically only if the type is 'ds-app-picker' so they give us the correct interface\n DSGlobalHeaderT.AppPickerProps & {\n // this interface is an addition that comes from our own implementation\n // GlobalHeaderToolbar -> useGlobalHeaderToolbar\n // is handling focus management for the user when using our out of the box\n setRef: (ref: HTMLElement) => void;\n };\n\nexport const AppPicker = ({ label, setRef, componentProps, ...otherProps }: AppPickerOutOfTheBoxProps): JSX.Element => {\n const [isOpen, setIsOpen] = useState<boolean>(false);\n const internalTriggerRef = useRef<HTMLButtonElement>(null);\n\n const {\n apps,\n icon,\n customApps,\n sectionTitle,\n customSectionTitle,\n actionRef,\n isOpen: userIsOpen,\n onKeyDown: userOnKeyDown,\n onClickOutside: userOnClickOutside,\n renderTrigger: userRenderTrigger,\n onClose,\n triggerRef,\n triggerOnClick,\n } = componentProps;\n\n const schedule = useCallbackAfterRender();\n\n // const appPickerRef = useRef(null);\n // const internalActionRef = useMemo(() => actionRef ?? appPickerRef, [actionRef]);\n\n const focusTrigger = useCallback(() => internalTriggerRef.current?.focus(), []);\n\n const handleTriggerKeyDown: React.KeyboardEventHandler = useCallback((e) => {\n if (e.code === 'Enter' || e.code === 'Space' || e.code === 'ArrowDown') {\n setIsOpen(true);\n }\n }, []);\n\n const handleAppPickerOnKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === 'Escape') {\n setIsOpen(false);\n schedule(focusTrigger);\n }\n },\n [focusTrigger, schedule],\n );\n\n const handleOnClickOutside = useCallback(() => {\n setIsOpen(false);\n }, []);\n\n const handleOnClick: React.MouseEventHandler = useCallback(\n (e) => {\n setIsOpen(true);\n setTimeout(() => {\n if (e.detail === 0) actionRef?.current?.focusSelectedOrFirstAvailable?.();\n else actionRef?.current?.focusWrapper();\n }, 10);\n },\n [actionRef],\n );\n\n // eslint-disable-next-line react/no-unstable-nested-components\n const TriggerDefaultComponent = ({ ref }: { ref: React.MutableRefObject<HTMLButtonElement> }) => (\n <StyledButton\n onClick={triggerOnClick ?? handleOnClick}\n onKeyDown={handleTriggerKeyDown}\n innerRef={(buttonRef: HTMLButtonElement) => {\n setRef(buttonRef);\n mergeRefs(internalTriggerRef, triggerRef, ref)(buttonRef);\n }}\n aria-label={label}\n data-testid={GLOBAL_HEADER_DATA_TESTID.MENUBAR_ITEM_BUTTON}\n aria-haspopup\n aria-expanded={userIsOpen ?? isOpen}\n {...getGlobalAttributes(otherProps)}\n type=\"button\"\n >\n <MenuPicker width={20.73} height={20.73} />\n </StyledButton>\n );\n\n return (\n <DSAppPicker\n apps={apps}\n customApps={customApps}\n sectionTitle={sectionTitle}\n customSectionTitle={customSectionTitle}\n icon={icon}\n onKeyDown={userOnKeyDown ?? handleAppPickerOnKeyDown}\n actionRef={actionRef}\n onClickOutside={userOnClickOutside ?? handleOnClickOutside}\n renderTrigger={userRenderTrigger || TriggerDefaultComponent}\n isOpen={userIsOpen ?? isOpen}\n onClose={onClose}\n triggerRef={triggerRef}\n />\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+FjB;AA/FN,2BAA4B;AAC5B,sBAA2B;AAC3B,8BAAoC;AACpC,uBAA0B;AAC1B,mBAAqD;AACrD,uBAA0C;AAE1C,oCAAuC;AACvC,oBAA6B;AAatB,MAAM,YAAY,CAAC,EAAE,OAAO,QAAQ,gBAAgB,GAAG,WAAW,MAA8C;AACrH,QAAM,CAAC,QAAQ,SAAS,QAAI,uBAAkB,KAAK;AACnD,QAAM,yBAAqB,qBAA0B,IAAI;AAEzD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,gBAAgB;AAAA,IAChB,eAAe;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,eAAW,sDAAuB;AAKxC,QAAM,mBAAe,0BAAY,MAAM,mBAAmB,SAAS,MAAM,GAAG,CAAC,CAAC;AAE9E,QAAM,2BAAmD,0BAAY,CAAC,MAAM;AAC1E,QAAI,EAAE,SAAS,WAAW,EAAE,SAAS,WAAW,EAAE,SAAS,aAAa;AACtE,gBAAU,IAAI;AAAA,IAChB;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,QAAM,+BAA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(PopupMenu_exports);
34
34
  var React = __toESM(require("react"));
35
35
  var import_jsx_runtime = require("react/jsx-runtime");
36
- var import_ds_popperjs = require("@elliemae/ds-popperjs");
36
+ var import_ds_floating_context = require("@elliemae/ds-floating-context");
37
37
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
38
38
  var import_react = require("react");
39
- var import_exported_related = require("../../../../exported-related/index.js");
39
+ var import_constants = require("../../../../constants/index.js");
40
40
  var import_styles = require("../../../styles.js");
41
41
  var import_PopupMenuContent = require("./menuContent/PopupMenuContent.js");
42
+ var import_useOnClickOutside = require("../../../../hooks/useOnClickOutside.js");
42
43
  const PopupMenu = ({
43
44
  Icon,
44
45
  onClick,
45
46
  setRef,
46
47
  componentProps,
48
+ ownerProps,
47
49
  ...otherProps
48
50
  }) => {
49
- const [isOpen, setIsOpen] = (0, import_react.useState)(false);
50
- const [buttonRef, setButtonRef] = (0, import_react.useState)(null);
51
+ const { arrowStyles, floatingStyles, isOpen, refs, context, showTooltip, hideTooltip } = (0, import_ds_floating_context.useFloatingContext)({
52
+ externallyControlledIsOpen: componentProps.isOpen,
53
+ placement: "bottom",
54
+ withoutAnimation: true,
55
+ withoutPortal: true
56
+ });
51
57
  const {
52
58
  onClickOutside = () => null,
53
59
  onKeyPress,
@@ -56,71 +62,88 @@ const PopupMenu = ({
56
62
  options,
57
63
  closeOnClick
58
64
  } = componentProps;
65
+ const boundaryRef = (0, import_react.useRef)(null);
59
66
  const handleOnKeyDown = (0, import_react.useCallback)(
60
67
  (e) => {
61
68
  if (e.code === "ArrowDown") {
62
- setIsOpen(true);
69
+ showTooltip();
63
70
  }
64
71
  if (onKeyPress) onKeyPress(e);
65
72
  },
66
- [onKeyPress]
73
+ [onKeyPress, showTooltip]
67
74
  );
68
75
  const handleOnClose = (0, import_react.useCallback)(() => {
69
76
  if (userIsOpen === void 0) {
70
- setIsOpen(false);
77
+ hideTooltip();
71
78
  }
72
- buttonRef?.focus();
73
- }, [buttonRef, userIsOpen]);
79
+ refs.reference?.focus();
80
+ }, [hideTooltip, refs.reference, userIsOpen]);
74
81
  const handleTriggerOnClick = (0, import_react.useCallback)(
75
82
  (e) => {
76
- if (userIsOpen === void 0) setIsOpen(true);
83
+ if (userIsOpen === void 0) showTooltip();
77
84
  if (onClick) onClick(e);
78
85
  },
79
- [onClick, userIsOpen]
86
+ [onClick, userIsOpen, showTooltip]
80
87
  );
81
88
  const handleItemClick = (0, import_react.useCallback)(() => {
82
89
  if (closeOnClick && userIsOpen === void 0) handleOnClose();
83
90
  }, [closeOnClick, handleOnClose, userIsOpen]);
91
+ const handleOutside = (0, import_react.useCallback)(
92
+ (event) => {
93
+ onClickOutside(event);
94
+ const actuallyOpen = userIsOpen ?? isOpen;
95
+ if (!actuallyOpen) return;
96
+ if (userIsOpen === void 0) {
97
+ handleOnClose();
98
+ }
99
+ },
100
+ [handleOnClose, isOpen, onClickOutside, userIsOpen]
101
+ );
102
+ (0, import_useOnClickOutside.useOnClickOutside)(userIsOpen ?? isOpen ? boundaryRef.current : null, handleOutside);
84
103
  const handleRefs = (0, import_react.useCallback)(
85
104
  (ref) => {
86
105
  setRef(ref);
87
- setButtonRef(ref);
106
+ refs.setReference(ref);
88
107
  },
89
- [setRef]
108
+ [refs, setRef]
90
109
  );
91
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
110
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ref: boundaryRef, children: [
92
111
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
93
112
  import_styles.StyledButton,
94
113
  {
95
114
  onClick: handleTriggerOnClick,
96
115
  onKeyDown: handleOnKeyDown,
97
116
  innerRef: handleRefs,
98
- "data-testid": import_exported_related.DSGlobalHeaderDatatestid.MENUBAR.ITEM_BUTTON,
117
+ "data-testid": import_constants.GLOBAL_HEADER_DATA_TESTID.MENUBAR_ITEM_BUTTON,
99
118
  "aria-haspopup": true,
100
119
  "aria-expanded": userIsOpen ?? isOpen,
101
120
  ...(0, import_ds_props_helpers.useGetGlobalAttributes)(otherProps),
102
121
  type: "button",
122
+ ...ownerProps,
103
123
  children: Icon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { size: "m" })
104
124
  }
105
125
  ),
106
- buttonRef ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
107
- import_ds_popperjs.DSPopperJS,
126
+ refs.reference ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
127
+ import_ds_floating_context.FloatingWrapper,
108
128
  {
109
- referenceElement: buttonRef,
110
- showPopover: userIsOpen ?? isOpen,
111
- closeContextMenu: handleOnClose,
112
- onClickOutside,
113
- withoutPortal: true,
114
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
115
- import_PopupMenuContent.PopupMenuContent,
116
- {
117
- options,
118
- onItemClick: handleItemClick,
119
- onClose: handleOnClose,
120
- setIsOpen,
121
- popupOnKeyPress
122
- }
123
- )
129
+ innerRef: refs.setFloating,
130
+ isOpen: userIsOpen ?? isOpen,
131
+ floatingStyles,
132
+ context,
133
+ children: [
134
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
135
+ import_PopupMenuContent.PopupMenuContent,
136
+ {
137
+ options,
138
+ onItemClick: handleItemClick,
139
+ onClose: handleOnClose,
140
+ setIsOpen: hideTooltip,
141
+ popupOnKeyPress,
142
+ ownerProps
143
+ }
144
+ ),
145
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_floating_context.PopoverArrow, { ...arrowStyles })
146
+ ]
124
147
  }
125
148
  ) : null
126
149
  ] });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/parts/Toolbar/outOfTheBox/PopupMenu/PopupMenu.tsx", "../../../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { DSPopperJS } from '@elliemae/ds-popperjs';\nimport { useGetGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport React, { useCallback, useState } from 'react';\nimport { DSGlobalHeaderDatatestid } from '../../../../exported-related/index.js';\nimport type { DSGlobalHeaderT } from '../../../../react-desc-prop-types.js';\nimport { StyledButton } from '../../../styles.js';\nimport { PopupMenuContent } from './menuContent/PopupMenuContent.js';\n\nexport const PopupMenu = ({\n Icon,\n onClick,\n setRef,\n componentProps,\n ...otherProps\n}: DSGlobalHeaderT.PopupProps): JSX.Element => {\n const [isOpen, setIsOpen] = useState<boolean>(false);\n const [buttonRef, setButtonRef] = useState<HTMLButtonElement | null>(null);\n\n const {\n onClickOutside = () => null,\n onKeyPress,\n popupOnKeyPress,\n isOpen: userIsOpen,\n options,\n closeOnClick,\n } = componentProps;\n\n const handleOnKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.code === 'ArrowDown') {\n setIsOpen(true);\n }\n if (onKeyPress) onKeyPress(e);\n },\n [onKeyPress],\n );\n\n const handleOnClose = useCallback(() => {\n if (userIsOpen === undefined) {\n setIsOpen(false);\n }\n buttonRef?.focus();\n }, [buttonRef, userIsOpen]);\n\n const handleTriggerOnClick = useCallback(\n (e: React.MouseEvent) => {\n if (userIsOpen === undefined) setIsOpen(true);\n if (onClick) onClick(e);\n },\n [onClick, userIsOpen],\n );\n\n const handleItemClick = useCallback(() => {\n if (closeOnClick && userIsOpen === undefined) handleOnClose();\n }, [closeOnClick, handleOnClose, userIsOpen]);\n\n const handleRefs = useCallback(\n (ref: HTMLButtonElement) => {\n setRef(ref);\n setButtonRef(ref);\n },\n [setRef],\n );\n\n return (\n <>\n <StyledButton\n onClick={handleTriggerOnClick}\n onKeyDown={handleOnKeyDown}\n innerRef={handleRefs}\n data-testid={DSGlobalHeaderDatatestid.MENUBAR.ITEM_BUTTON}\n aria-haspopup\n aria-expanded={userIsOpen ?? isOpen}\n {...useGetGlobalAttributes(otherProps)}\n type=\"button\"\n >\n {Icon && <Icon size=\"m\" />}\n </StyledButton>\n {buttonRef ? (\n <DSPopperJS\n referenceElement={buttonRef}\n showPopover={userIsOpen ?? isOpen}\n closeContextMenu={handleOnClose}\n onClickOutside={onClickOutside}\n withoutPortal\n >\n <PopupMenuContent\n options={options}\n onItemClick={handleItemClick}\n onClose={handleOnClose}\n setIsOpen={setIsOpen}\n popupOnKeyPress={popupOnKeyPress}\n />\n </DSPopperJS>\n ) : null}\n </>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiEnB;AAjEJ,yBAA2B;AAC3B,8BAAuC;AACvC,mBAA6C;AAC7C,8BAAyC;AAEzC,oBAA6B;AAC7B,8BAAiC;AAE1B,MAAM,YAAY,CAAC;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAA+C;AAC7C,QAAM,CAAC,QAAQ,SAAS,QAAI,uBAAkB,KAAK;AACnD,QAAM,CAAC,WAAW,YAAY,QAAI,uBAAmC,IAAI;AAEzE,QAAM;AAAA,IACJ,iBAAiB,MAAM;AAAA,IACvB;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,sBAAkB;AAAA,IACtB,CAAC,MAA2B;AAC1B,UAAI,EAAE,SAAS,aAAa;AAC1B,kBAAU,IAAI;AAAA,MAChB;AACA,UAAI,WAAY,YAAW,CAAC;AAAA,IAC9B;AAAA,IACA,CAAC,UAAU;AAAA,EACb;AAEA,QAAM,oBAAgB,0BAAY,MAAM;AACtC,QAAI,eAAe,QAAW;AAC5B,gBAAU,KAAK;AAAA,IACjB;AACA,eAAW,MAAM;AAAA,EACnB,GAAG,CAAC,WAAW,UAAU,CAAC;AAE1B,QAAM,2BAAuB;AAAA,IAC3B,CAAC,MAAwB;AACvB,UAAI,eAAe,OAAW,WAAU,IAAI;AAC5C,UAAI,QAAS,SAAQ,CAAC;AAAA,IACxB;AAAA,IACA,CAAC,SAAS,UAAU;AAAA,EACtB;AAEA,QAAM,sBAAkB,0BAAY,MAAM;AACxC,QAAI,gBAAgB,eAAe,OAAW,eAAc;AAAA,EAC9D,GAAG,CAAC,cAAc,eAAe,UAAU,CAAC;AAE5C,QAAM,iBAAa;AAAA,IACjB,CAAC,QAA2B;AAC1B,aAAO,GAAG;AACV,mBAAa,GAAG;AAAA,IAClB;AAAA,IACA,CAAC,MAAM;AAAA,EACT;AAEA,SACE,4EACE;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,SAAS;AAAA,QACT,WAAW;AAAA,QACX,UAAU;AAAA,QACV,eAAa,iDAAyB,QAAQ;AAAA,QAC9C,iBAAa;AAAA,QACb,iBAAe,cAAc;AAAA,QAC5B,OAAG,gDAAuB,UAAU;AAAA,QACrC,MAAK;AAAA,QAEJ,kBAAQ,4CAAC,QAAK,MAAK,KAAI;AAAA;AAAA,IAC1B;AAAA,IACC,YACC;AAAA,MAAC;AAAA;AAAA,QACC,kBAAkB;AAAA,QAClB,aAAa,cAAc;AAAA,QAC3B,kBAAkB;AAAA,QAClB;AAAA,QACA,eAAa;AAAA,QAEb;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA,aAAa;AAAA,YACb,SAAS;AAAA,YACT;AAAA,YACA;AAAA;AAAA,QACF;AAAA;AAAA,IACF,IACE;AAAA,KACN;AAEJ;",
4
+ "sourcesContent": ["import { useFloatingContext, PopoverArrow, FloatingWrapper } from '@elliemae/ds-floating-context';\nimport { useGetGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport React, { useCallback, useRef } from 'react';\nimport { GLOBAL_HEADER_DATA_TESTID } from '../../../../constants/index.js';\nimport type { DSGlobalHeaderT } from '../../../../react-desc-prop-types.js';\nimport { StyledButton } from '../../../styles.js';\nimport { PopupMenuContent } from './menuContent/PopupMenuContent.js';\nimport { useOnClickOutside } from '../../../../hooks/useOnClickOutside.js';\nexport const PopupMenu = ({\n Icon,\n onClick,\n setRef,\n componentProps,\n ownerProps,\n ...otherProps\n}: DSGlobalHeaderT.PopupProps): JSX.Element => {\n const { arrowStyles, floatingStyles, isOpen, refs, context, showTooltip, hideTooltip } = useFloatingContext({\n externallyControlledIsOpen: componentProps.isOpen,\n placement: 'bottom',\n withoutAnimation: true,\n withoutPortal: true,\n });\n\n const {\n onClickOutside = () => null,\n onKeyPress,\n popupOnKeyPress,\n isOpen: userIsOpen,\n options,\n closeOnClick,\n } = componentProps;\n\n /**\n * We want \"outside\" to mean: outside BOTH the trigger and the floating panel.\n * So wrap them in a single DOM node and use that as the boundary.\n */\n const boundaryRef = useRef<HTMLDivElement | null>(null);\n\n const handleOnKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.code === 'ArrowDown') {\n showTooltip();\n }\n if (onKeyPress) onKeyPress(e);\n },\n [onKeyPress, showTooltip],\n );\n\n const handleOnClose = useCallback(() => {\n if (userIsOpen === undefined) {\n hideTooltip();\n }\n (refs.reference as HTMLElement)?.focus();\n }, [hideTooltip, refs.reference, userIsOpen]);\n\n const handleTriggerOnClick = useCallback(\n (e: React.MouseEvent) => {\n if (userIsOpen === undefined) showTooltip();\n if (onClick) onClick(e);\n },\n [onClick, userIsOpen, showTooltip],\n );\n\n const handleItemClick = useCallback(() => {\n if (closeOnClick && userIsOpen === undefined) handleOnClose();\n }, [closeOnClick, handleOnClose, userIsOpen]);\n\n // Close on outside click, but:\n // - always notify consumer via onClickOutside\n // - only actually close when uncontrolled (userIsOpen === undefined)\n // - only run while open\n const handleOutside = useCallback(\n (event: Event) => {\n onClickOutside(event as MouseEvent | TouchEvent);\n\n const actuallyOpen = userIsOpen ?? isOpen;\n if (!actuallyOpen) return;\n\n if (userIsOpen === undefined) {\n handleOnClose();\n }\n },\n [handleOnClose, isOpen, onClickOutside, userIsOpen],\n );\n\n // If you only want to listen when open, pass `null` when closed\n useOnClickOutside((userIsOpen ?? isOpen) ? boundaryRef.current : null, handleOutside);\n\n const handleRefs = useCallback(\n (ref: HTMLButtonElement) => {\n setRef(ref);\n refs.setReference(ref);\n },\n [refs, setRef],\n );\n return (\n <div ref={boundaryRef}>\n <StyledButton\n onClick={handleTriggerOnClick}\n onKeyDown={handleOnKeyDown}\n innerRef={handleRefs}\n data-testid={GLOBAL_HEADER_DATA_TESTID.MENUBAR_ITEM_BUTTON}\n aria-haspopup\n aria-expanded={userIsOpen ?? isOpen}\n {...useGetGlobalAttributes(otherProps)}\n type=\"button\"\n {...ownerProps}\n >\n {Icon && <Icon size=\"m\" />}\n </StyledButton>\n\n {refs.reference ? (\n <FloatingWrapper\n innerRef={refs.setFloating}\n isOpen={userIsOpen ?? isOpen}\n floatingStyles={floatingStyles}\n context={context}\n >\n <PopupMenuContent\n options={options}\n onItemClick={handleItemClick}\n onClose={handleOnClose}\n setIsOpen={hideTooltip}\n popupOnKeyPress={popupOnKeyPress}\n ownerProps={ownerProps}\n />\n <PopoverArrow {...arrowStyles} />\n </FloatingWrapper>\n ) : null}\n </div>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD4GN;AA5GjB,iCAAkE;AAClE,8BAAuC;AACvC,mBAA2C;AAC3C,uBAA0C;AAE1C,oBAA6B;AAC7B,8BAAiC;AACjC,+BAAkC;AAC3B,MAAM,YAAY,CAAC;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAA+C;AAC7C,QAAM,EAAE,aAAa,gBAAgB,QAAQ,MAAM,SAAS,aAAa,YAAY,QAAI,+CAAmB;AAAA,IAC1G,4BAA4B,eAAe;AAAA,IAC3C,WAAW;AAAA,IACX,kBAAkB;AAAA,IAClB,eAAe;AAAA,EACjB,CAAC;AAED,QAAM;AAAA,IACJ,iBAAiB,MAAM;AAAA,IACvB;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,EACF,IAAI;AAMJ,QA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