@elliemae/ds-left-navigation 2.2.0-next.4 → 2.3.0-alpha.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 (213) hide show
  1. package/cjs/LeftNavigation.js +49 -27
  2. package/cjs/LeftNavigation.js.map +7 -0
  3. package/cjs/LeftNavigationContext.js +44 -18
  4. package/cjs/LeftNavigationContext.js.map +7 -0
  5. package/cjs/common/getItemBackgroundStyle.js +47 -8
  6. package/cjs/common/getItemBackgroundStyle.js.map +7 -0
  7. package/cjs/common/getLeftBorderStyle.js +50 -8
  8. package/cjs/common/getLeftBorderStyle.js.map +7 -0
  9. package/cjs/common/getScrollbarStyle.js +55 -4
  10. package/cjs/common/getScrollbarStyle.js.map +7 -0
  11. package/cjs/common/index.js +30 -13
  12. package/cjs/common/index.js.map +7 -0
  13. package/cjs/configs/index.js +38 -10
  14. package/cjs/configs/index.js.map +7 -0
  15. package/cjs/configs/useLeftNavConfig.js +76 -76
  16. package/cjs/configs/useLeftNavConfig.js.map +7 -0
  17. package/cjs/configs/useLeftNavItems.js +66 -64
  18. package/cjs/configs/useLeftNavItems.js.map +7 -0
  19. package/cjs/configs/useLeftNavSmoothExpand.js +43 -25
  20. package/cjs/configs/useLeftNavSmoothExpand.js.map +7 -0
  21. package/cjs/exported-related/ChevronItem/index.js +42 -27
  22. package/cjs/exported-related/ChevronItem/index.js.map +7 -0
  23. package/cjs/exported-related/Icon/index.js +51 -34
  24. package/cjs/exported-related/Icon/index.js.map +7 -0
  25. package/cjs/exported-related/ItemRenderer/index.js +99 -94
  26. package/cjs/exported-related/ItemRenderer/index.js.map +7 -0
  27. package/cjs/exported-related/ItemRenderer/styled.js +83 -51
  28. package/cjs/exported-related/ItemRenderer/styled.js.map +7 -0
  29. package/cjs/exported-related/ItemRenderer/usePropsWithDefaults.js +57 -45
  30. package/cjs/exported-related/ItemRenderer/usePropsWithDefaults.js.map +7 -0
  31. package/cjs/exported-related/Notifications/index.js +81 -61
  32. package/cjs/exported-related/Notifications/index.js.map +7 -0
  33. package/cjs/exported-related/OpenWindowItem/index.js +49 -32
  34. package/cjs/exported-related/OpenWindowItem/index.js.map +7 -0
  35. package/cjs/exported-related/constants.js +53 -25
  36. package/cjs/exported-related/constants.js.map +7 -0
  37. package/cjs/exported-related/index.js +33 -23
  38. package/cjs/exported-related/index.js.map +7 -0
  39. package/cjs/hooks/index.js +30 -13
  40. package/cjs/hooks/index.js.map +7 -0
  41. package/cjs/hooks/useExpandableOnClickHandler.js +55 -26
  42. package/cjs/hooks/useExpandableOnClickHandler.js.map +7 -0
  43. package/cjs/hooks/useKeyboardNavigation.js +62 -54
  44. package/cjs/hooks/useKeyboardNavigation.js.map +7 -0
  45. package/cjs/hooks/useOpenableOnClickHandler.js +55 -26
  46. package/cjs/hooks/useOpenableOnClickHandler.js.map +7 -0
  47. package/cjs/hooks/useSelectFirstBodyItem.js +47 -34
  48. package/cjs/hooks/useSelectFirstBodyItem.js.map +7 -0
  49. package/cjs/index.d.js +27 -2
  50. package/cjs/index.d.js.map +7 -0
  51. package/cjs/index.js +41 -30
  52. package/cjs/index.js.map +7 -0
  53. package/cjs/outOfTheBox/ItemControlledDrilldown/index.js +97 -103
  54. package/cjs/outOfTheBox/ItemControlledDrilldown/index.js.map +7 -0
  55. package/cjs/outOfTheBox/ItemControlledDrilldown/styled.js +49 -27
  56. package/cjs/outOfTheBox/ItemControlledDrilldown/styled.js.map +7 -0
  57. package/cjs/outOfTheBox/ItemHeader/index.js +95 -93
  58. package/cjs/outOfTheBox/ItemHeader/index.js.map +7 -0
  59. package/cjs/outOfTheBox/ItemHeader/styled.js +49 -22
  60. package/cjs/outOfTheBox/ItemHeader/styled.js.map +7 -0
  61. package/cjs/outOfTheBox/ItemLink/index.js +75 -67
  62. package/cjs/outOfTheBox/ItemLink/index.js.map +7 -0
  63. package/cjs/outOfTheBox/ItemLink/styled.js +41 -17
  64. package/cjs/outOfTheBox/ItemLink/styled.js.map +7 -0
  65. package/cjs/outOfTheBox/ItemSection/index.js +59 -63
  66. package/cjs/outOfTheBox/ItemSection/index.js.map +7 -0
  67. package/cjs/outOfTheBox/ItemSection/styled.js +53 -23
  68. package/cjs/outOfTheBox/ItemSection/styled.js.map +7 -0
  69. package/cjs/outOfTheBox/ItemSeparator/index.js +56 -45
  70. package/cjs/outOfTheBox/ItemSeparator/index.js.map +7 -0
  71. package/cjs/outOfTheBox/ItemSubmenu/index.js +95 -92
  72. package/cjs/outOfTheBox/ItemSubmenu/index.js.map +7 -0
  73. package/cjs/outOfTheBox/ItemSubmenu/styled.js +49 -22
  74. package/cjs/outOfTheBox/ItemSubmenu/styled.js.map +7 -0
  75. package/cjs/outOfTheBox/ItemTextLabel/index.js +51 -52
  76. package/cjs/outOfTheBox/ItemTextLabel/index.js.map +7 -0
  77. package/cjs/outOfTheBox/ItemTextLabel/styled.js +43 -23
  78. package/cjs/outOfTheBox/ItemTextLabel/styled.js.map +7 -0
  79. package/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js +107 -113
  80. package/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +7 -0
  81. package/cjs/outOfTheBox/ItemUncontrolledDrilldown/styled.js +49 -27
  82. package/cjs/outOfTheBox/ItemUncontrolledDrilldown/styled.js.map +7 -0
  83. package/cjs/outOfTheBox/ItemWithDate/index.js +59 -54
  84. package/cjs/outOfTheBox/ItemWithDate/index.js.map +7 -0
  85. package/cjs/outOfTheBox/ItemWithDate/styled.js +49 -27
  86. package/cjs/outOfTheBox/ItemWithDate/styled.js.map +7 -0
  87. package/cjs/outOfTheBox/index.js +65 -50
  88. package/cjs/outOfTheBox/index.js.map +7 -0
  89. package/cjs/parts/LeftNavContent/index.js +75 -71
  90. package/cjs/parts/LeftNavContent/index.js.map +7 -0
  91. package/cjs/parts/LeftNavContent/styled.js +110 -50
  92. package/cjs/parts/LeftNavContent/styled.js.map +7 -0
  93. package/cjs/parts/LeftNavContentWithScrollbar/index.js +89 -79
  94. package/cjs/parts/LeftNavContentWithScrollbar/index.js.map +7 -0
  95. package/cjs/parts/LeftNavFooterItem/index.js +97 -80
  96. package/cjs/parts/LeftNavFooterItem/index.js.map +7 -0
  97. package/cjs/parts/LeftNavFooterItem/styled.js +89 -34
  98. package/cjs/parts/LeftNavFooterItem/styled.js.map +7 -0
  99. package/cjs/parts/LeftNavLoading/index.js +51 -33
  100. package/cjs/parts/LeftNavLoading/index.js.map +7 -0
  101. package/cjs/parts/OutOfTheBoxMapItem.js +49 -46
  102. package/cjs/parts/OutOfTheBoxMapItem.js.map +7 -0
  103. package/cjs/prop-types.js +58 -39
  104. package/cjs/prop-types.js.map +7 -0
  105. package/esm/LeftNavigation.js +17 -15
  106. package/esm/LeftNavigation.js.map +7 -0
  107. package/esm/LeftNavigationContext.js +15 -11
  108. package/esm/LeftNavigationContext.js.map +7 -0
  109. package/esm/common/getItemBackgroundStyle.js +20 -6
  110. package/esm/common/getItemBackgroundStyle.js.map +7 -0
  111. package/esm/common/getLeftBorderStyle.js +23 -6
  112. package/esm/common/getLeftBorderStyle.js.map +7 -0
  113. package/esm/common/getScrollbarStyle.js +28 -2
  114. package/esm/common/getScrollbarStyle.js.map +7 -0
  115. package/esm/common/index.js +5 -3
  116. package/esm/common/index.js.map +7 -0
  117. package/esm/configs/index.js +9 -2
  118. package/esm/configs/index.js.map +7 -0
  119. package/esm/configs/useLeftNavConfig.js +47 -67
  120. package/esm/configs/useLeftNavConfig.js.map +7 -0
  121. package/esm/configs/useLeftNavItems.js +33 -55
  122. package/esm/configs/useLeftNavItems.js.map +7 -0
  123. package/esm/configs/useLeftNavSmoothExpand.js +14 -16
  124. package/esm/configs/useLeftNavSmoothExpand.js.map +7 -0
  125. package/esm/exported-related/ChevronItem/index.js +13 -18
  126. package/esm/exported-related/ChevronItem/index.js.map +7 -0
  127. package/esm/exported-related/Icon/index.js +21 -24
  128. package/esm/exported-related/Icon/index.js.map +7 -0
  129. package/esm/exported-related/ItemRenderer/index.js +65 -80
  130. package/esm/exported-related/ItemRenderer/index.js.map +7 -0
  131. package/esm/exported-related/ItemRenderer/styled.js +56 -42
  132. package/esm/exported-related/ItemRenderer/styled.js.map +7 -0
  133. package/esm/exported-related/ItemRenderer/usePropsWithDefaults.js +27 -36
  134. package/esm/exported-related/ItemRenderer/usePropsWithDefaults.js.map +7 -0
  135. package/esm/exported-related/Notifications/index.js +57 -50
  136. package/esm/exported-related/Notifications/index.js.map +7 -0
  137. package/esm/exported-related/OpenWindowItem/index.js +20 -22
  138. package/esm/exported-related/OpenWindowItem/index.js.map +7 -0
  139. package/esm/exported-related/constants.js +24 -17
  140. package/esm/exported-related/constants.js.map +7 -0
  141. package/esm/exported-related/index.js +8 -6
  142. package/esm/exported-related/index.js.map +7 -0
  143. package/esm/hooks/index.js +5 -3
  144. package/esm/hooks/index.js.map +7 -0
  145. package/esm/hooks/useExpandableOnClickHandler.js +26 -22
  146. package/esm/hooks/useExpandableOnClickHandler.js.map +7 -0
  147. package/esm/hooks/useKeyboardNavigation.js +30 -47
  148. package/esm/hooks/useKeyboardNavigation.js.map +7 -0
  149. package/esm/hooks/useOpenableOnClickHandler.js +26 -22
  150. package/esm/hooks/useOpenableOnClickHandler.js.map +7 -0
  151. package/esm/hooks/useSelectFirstBodyItem.js +18 -30
  152. package/esm/hooks/useSelectFirstBodyItem.js.map +7 -0
  153. package/esm/index.d.js +2 -1
  154. package/esm/index.d.js.map +7 -0
  155. package/esm/index.js +12 -8
  156. package/esm/index.js.map +7 -0
  157. package/esm/outOfTheBox/ItemControlledDrilldown/index.js +62 -87
  158. package/esm/outOfTheBox/ItemControlledDrilldown/index.js.map +7 -0
  159. package/esm/outOfTheBox/ItemControlledDrilldown/styled.js +20 -17
  160. package/esm/outOfTheBox/ItemControlledDrilldown/styled.js.map +7 -0
  161. package/esm/outOfTheBox/ItemHeader/index.js +65 -82
  162. package/esm/outOfTheBox/ItemHeader/index.js.map +7 -0
  163. package/esm/outOfTheBox/ItemHeader/styled.js +20 -12
  164. package/esm/outOfTheBox/ItemHeader/styled.js.map +7 -0
  165. package/esm/outOfTheBox/ItemLink/index.js +46 -57
  166. package/esm/outOfTheBox/ItemLink/index.js.map +7 -0
  167. package/esm/outOfTheBox/ItemLink/styled.js +12 -8
  168. package/esm/outOfTheBox/ItemLink/styled.js.map +7 -0
  169. package/esm/outOfTheBox/ItemSection/index.js +30 -53
  170. package/esm/outOfTheBox/ItemSection/index.js.map +7 -0
  171. package/esm/outOfTheBox/ItemSection/styled.js +24 -13
  172. package/esm/outOfTheBox/ItemSection/styled.js.map +7 -0
  173. package/esm/outOfTheBox/ItemSeparator/index.js +27 -35
  174. package/esm/outOfTheBox/ItemSeparator/index.js.map +7 -0
  175. package/esm/outOfTheBox/ItemSubmenu/index.js +65 -81
  176. package/esm/outOfTheBox/ItemSubmenu/index.js.map +7 -0
  177. package/esm/outOfTheBox/ItemSubmenu/styled.js +20 -12
  178. package/esm/outOfTheBox/ItemSubmenu/styled.js.map +7 -0
  179. package/esm/outOfTheBox/ItemTextLabel/index.js +22 -43
  180. package/esm/outOfTheBox/ItemTextLabel/index.js.map +7 -0
  181. package/esm/outOfTheBox/ItemTextLabel/styled.js +14 -14
  182. package/esm/outOfTheBox/ItemTextLabel/styled.js.map +7 -0
  183. package/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js +70 -95
  184. package/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +7 -0
  185. package/esm/outOfTheBox/ItemUncontrolledDrilldown/styled.js +20 -17
  186. package/esm/outOfTheBox/ItemUncontrolledDrilldown/styled.js.map +7 -0
  187. package/esm/outOfTheBox/ItemWithDate/index.js +30 -44
  188. package/esm/outOfTheBox/ItemWithDate/index.js.map +7 -0
  189. package/esm/outOfTheBox/ItemWithDate/styled.js +20 -17
  190. package/esm/outOfTheBox/ItemWithDate/styled.js.map +7 -0
  191. package/esm/outOfTheBox/index.js +25 -34
  192. package/esm/outOfTheBox/index.js.map +7 -0
  193. package/esm/parts/LeftNavContent/index.js +54 -64
  194. package/esm/parts/LeftNavContent/index.js.map +7 -0
  195. package/esm/parts/LeftNavContent/styled.js +81 -36
  196. package/esm/parts/LeftNavContent/styled.js.map +7 -0
  197. package/esm/parts/LeftNavContentWithScrollbar/index.js +56 -64
  198. package/esm/parts/LeftNavContentWithScrollbar/index.js.map +7 -0
  199. package/esm/parts/LeftNavFooterItem/index.js +73 -68
  200. package/esm/parts/LeftNavFooterItem/index.js.map +7 -0
  201. package/esm/parts/LeftNavFooterItem/styled.js +63 -24
  202. package/esm/parts/LeftNavFooterItem/styled.js.map +7 -0
  203. package/esm/parts/LeftNavLoading/index.js +22 -22
  204. package/esm/parts/LeftNavLoading/index.js.map +7 -0
  205. package/esm/parts/OutOfTheBoxMapItem.js +19 -35
  206. package/esm/parts/OutOfTheBoxMapItem.js.map +7 -0
  207. package/esm/prop-types.js +26 -29
  208. package/esm/prop-types.js.map +7 -0
  209. package/package.json +6 -6
  210. package/types/LeftNavigationContext.d.ts +4 -4
  211. package/types/configs/useLeftNavSmoothExpand.d.ts +3 -3
  212. package/types/hooks/useSelectFirstBodyItem.d.ts +1 -1
  213. package/types/index.d.d.ts +2 -5
@@ -1,134 +1,117 @@
1
- import 'core-js/modules/esnext.async-iterator.filter.js';
2
- import 'core-js/modules/esnext.iterator.constructor.js';
3
- import 'core-js/modules/esnext.iterator.filter.js';
4
- import 'core-js/modules/esnext.async-iterator.for-each.js';
5
- import 'core-js/modules/esnext.iterator.for-each.js';
6
- import _jsx from '@babel/runtime/helpers/esm/jsx';
7
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
8
- import { useCallback } from 'react';
9
- import Grid from '@elliemae/ds-grid';
10
- import { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';
11
- import { CHEVRON_BACK_DS_ID } from '../../exported-related/constants.js';
12
- import { ItemRenderer } from '../../exported-related/ItemRenderer/index.js';
13
- import '@elliemae/ds-icons';
14
- import 'react/jsx-runtime';
15
- import 'styled-components';
16
- import { StyledChevronLeft, StyledLabel } from './styled.js';
1
+ import * as React from "react";
2
+ import React2, { useCallback } from "react";
3
+ import Grid from "@elliemae/ds-grid";
4
+ import { SimpleTruncatedTooltipText } from "@elliemae/ds-truncated-tooltip-text";
5
+ import { ItemRenderer } from "../../exported-related/index";
6
+ import { StyledLabel, StyledChevronLeft } from "./styled";
7
+ import { CHEVRON_BACK_DS_ID } from "../../exported-related/constants";
8
+ const notOpenedShadowStyle = (isSelected) => (theme) => `
9
+ box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : "transparent"};
17
10
 
18
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
19
-
20
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
21
-
22
- const notOpenedShadowStyle = isSelected => theme => "\n box-shadow: inset 4px 0 0 0 ".concat(isSelected ? theme.colors.brand[400] : 'transparent', ";\n\n :hover {\n box-shadow: inset 4px 0 0 0 ").concat(isSelected ? theme.colors.brand[400] : theme.colors.brand[300], ";\n }\n\n :active {\n box-shadow: inset 4px 0 0 0 ").concat(theme.colors.brand[400], ";\n }\n");
23
-
24
- const ItemHeader = props => {
25
- var _item$itemOpts$ariaLa;
11
+ :hover {
12
+ box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : theme.colors.brand[300]};
13
+ }
26
14
 
15
+ :active {
16
+ box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};
17
+ }
18
+ `;
19
+ const ItemHeader = (props) => {
27
20
  const {
28
21
  item,
29
22
  item: {
30
23
  dsId,
31
- itemOpts: {
32
- label,
33
- RightComponent,
34
- BottomComponent,
35
- labelDataTestId,
36
- labelOverflow: itemLabelOverflow
37
- },
24
+ itemOpts: { label, RightComponent, BottomComponent, labelDataTestId },
38
25
  CollapsedComponent = () => null
39
26
  },
40
27
  ctx,
41
28
  ctx: {
42
- leftNavProps: {
43
- openedItem,
44
- labelOverflow: leftNavLabelOverflow,
45
- onItemClick
46
- },
29
+ leftNavProps: { openedItem, labelOverflow, onItemClick },
47
30
  expandedForAnimation,
48
31
  setFocusedItem,
49
32
  selectedItem,
50
33
  selectedParent
51
34
  }
52
35
  } = props;
53
- const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;
54
36
  const opened = openedItem === dsId;
55
- const ariaLabel = (_item$itemOpts$ariaLa = item.itemOpts.ariaLabel) !== null && _item$itemOpts$ariaLa !== void 0 ? _item$itemOpts$ariaLa : typeof label === 'string' ? label : 'menuitem';
37
+ const ariaLabel = item.itemOpts.ariaLabel ?? (typeof label === "string" ? label : "menuitem");
56
38
  const isSelected = selectedItem === dsId || selectedParent === dsId;
57
- const shadowStyle = useCallback(opened => theme => !opened ? notOpenedShadowStyle(isSelected)(theme) : "box-shadow: inset 4px 0 0 0 #52A6EC", [isSelected, openedItem]);
58
- return /*#__PURE__*/_jsx(ItemRenderer, {
59
- item: _objectSpread(_objectSpread({}, item), {}, {
60
- itemOpts: _objectSpread(_objectSpread({
39
+ const shadowStyle = useCallback((opened2) => (theme) => !opened2 ? notOpenedShadowStyle(isSelected)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`, [isSelected, openedItem]);
40
+ return /* @__PURE__ */ React2.createElement(ItemRenderer, {
41
+ item: {
42
+ ...item,
43
+ itemOpts: {
61
44
  ariaLabel,
62
- ariaExpanded: opened
63
- }, item.itemOpts), {}, {
45
+ ariaExpanded: opened,
46
+ ...item.itemOpts,
64
47
  openable: expandedForAnimation && !opened,
65
48
  closable: expandedForAnimation && opened,
66
49
  selectable: !opened
67
- })
68
- }),
50
+ }
51
+ },
69
52
  hasBorderBottom: true,
70
- borderBottomMr: opened ? '12px' : '0px',
71
- shadowStyle: shadowStyle
72
- }, void 0, /*#__PURE__*/_jsx(Grid, {
73
- cols: opened ? ['auto', 'auto'] : ['38px'],
53
+ borderBottomMr: opened ? "12px" : "0px",
54
+ shadowStyle
55
+ }, /* @__PURE__ */ React2.createElement(Grid, {
56
+ cols: opened ? ["auto", "auto"] : ["38px"],
74
57
  gutter: "1px",
75
- pl: opened ? 'xxs' : 0,
58
+ pl: opened ? "xxs" : 0,
76
59
  justifyItems: "center",
77
60
  "data-testid": "leftnav-leftcomponent"
78
- }, void 0, opened && /*#__PURE__*/_jsx(StyledChevronLeft, {
61
+ }, opened && /* @__PURE__ */ React2.createElement(StyledChevronLeft, {
79
62
  size: "m",
80
- color: ['brand-primary', 800],
81
- onClick: e => {
63
+ color: ["brand-primary", 800],
64
+ onClick: (e) => {
82
65
  onItemClick(item, e);
83
66
  },
84
67
  "data-testid": "leftnav-leftcomponent-chevron",
85
68
  tabIndex: 0,
86
- onFocus: e => {
69
+ onFocus: (e) => {
87
70
  e.stopPropagation();
88
71
  setFocusedItem(CHEVRON_BACK_DS_ID);
89
72
  },
90
73
  role: "button",
91
- "aria-label": "Close ".concat(ariaLabel)
92
- }), /*#__PURE__*/_jsx(CollapsedComponent, {
93
- item: item,
94
- ctx: ctx
95
- })), /*#__PURE__*/_jsx(StyledLabel, {
96
- ml: opened ? 'xxs' : '1px',
74
+ "aria-label": `Close ${ariaLabel}`
75
+ }), /* @__PURE__ */ React2.createElement(CollapsedComponent, {
76
+ item,
77
+ ctx
78
+ })), /* @__PURE__ */ React2.createElement(StyledLabel, {
79
+ ml: opened ? "xxs" : "1px",
97
80
  mt: "xxxs",
98
81
  mb: "15px",
99
- "data-testid": labelDataTestId || 'leftnav-itemlabel',
100
- labelOverflow: labelOverflow
101
- }, void 0, labelOverflow === 'truncate' ? /*#__PURE__*/_jsx(SimpleTruncatedTooltipText, {
82
+ "data-testid": labelDataTestId || "leftnav-itemlabel",
83
+ labelOverflow
84
+ }, labelOverflow === "truncate" ? /* @__PURE__ */ React2.createElement(SimpleTruncatedTooltipText, {
102
85
  value: label,
103
86
  placement: "bottom-start"
104
- }) : label), /*#__PURE__*/_jsx(Grid, {
87
+ }) : label), /* @__PURE__ */ React2.createElement(Grid, {
105
88
  pl: "xs",
106
- pr: opened ? 'xxs2' : 'xxs',
107
- onFocus: e => {
89
+ pr: opened ? "xxs2" : "xxs",
90
+ onFocus: (e) => {
108
91
  setFocusedItem(null);
109
92
  e.stopPropagation();
110
93
  },
111
- onKeyDown: e => e.stopPropagation(),
94
+ onKeyDown: (e) => e.stopPropagation(),
112
95
  "data-testid": "leftnav-right-component"
113
- }, void 0, RightComponent && /*#__PURE__*/_jsx(RightComponent, {
114
- ctx: ctx,
115
- item: item
116
- })), BottomComponent && /*#__PURE__*/_jsx(Grid, {
117
- style: {
118
- gridColumn: 'span 3'
119
- },
96
+ }, RightComponent && /* @__PURE__ */ React2.createElement(RightComponent, {
97
+ ctx,
98
+ item
99
+ })), BottomComponent && /* @__PURE__ */ React2.createElement(Grid, {
100
+ style: { gridColumn: "span 3" },
120
101
  pb: "xxxs",
121
102
  pl: "xxs",
122
103
  pr: "xxs",
123
- onFocus: e => {
104
+ onFocus: (e) => {
124
105
  setFocusedItem(null);
125
106
  e.stopPropagation();
126
107
  },
127
- onKeyDown: e => e.stopPropagation()
128
- }, void 0, /*#__PURE__*/_jsx(BottomComponent, {
129
- ctx: ctx,
130
- item: item
108
+ onKeyDown: (e) => e.stopPropagation()
109
+ }, /* @__PURE__ */ React2.createElement(BottomComponent, {
110
+ ctx,
111
+ item
131
112
  })));
132
113
  };
133
-
134
- export { ItemHeader };
114
+ export {
115
+ ItemHeader
116
+ };
117
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/ItemHeader/index.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React, { useCallback } from 'react';\nimport Grid from '@elliemae/ds-grid';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport { StyledLabel, StyledChevronLeft } from './styled';\nimport { CHEVRON_BACK_DS_ID } from '../../exported-related/constants';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst notOpenedShadowStyle = (isSelected: boolean) => (theme: any) =>\n `\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : 'transparent'};\n\n :hover {\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : theme.colors.brand[300]};\n }\n\n :active {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};\n }\n`;\n\nexport const ItemHeader = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: { label, RightComponent, BottomComponent, labelDataTestId },\n CollapsedComponent = () => null,\n },\n ctx,\n ctx: {\n leftNavProps: { openedItem, labelOverflow, onItemClick },\n expandedForAnimation,\n setFocusedItem,\n selectedItem,\n selectedParent,\n },\n } = props;\n\n const opened = openedItem === dsId;\n\n const ariaLabel = item.itemOpts.ariaLabel ?? (typeof label === 'string' ? label : 'menuitem');\n\n const isSelected = selectedItem === dsId || selectedParent === dsId;\n\n const shadowStyle = useCallback(\n (opened) => (theme: any) =>\n !opened ? notOpenedShadowStyle(isSelected)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`,\n [isSelected, openedItem],\n );\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaLabel,\n ariaExpanded: opened,\n ...item.itemOpts,\n openable: expandedForAnimation && !opened,\n closable: expandedForAnimation && opened,\n selectable: !opened,\n },\n }}\n hasBorderBottom\n borderBottomMr={opened ? '12px' : '0px'}\n shadowStyle={shadowStyle}\n >\n <Grid\n cols={opened ? ['auto', 'auto'] : ['38px']}\n gutter=\"1px\"\n pl={opened ? 'xxs' : 0}\n justifyItems=\"center\"\n data-testid=\"leftnav-leftcomponent\"\n >\n {opened && (\n <StyledChevronLeft\n size=\"m\"\n color={['brand-primary', 800]}\n onClick={(e) => {\n onItemClick(item, e);\n }}\n data-testid=\"leftnav-leftcomponent-chevron\"\n tabIndex={0}\n onFocus={(e) => {\n e.stopPropagation();\n setFocusedItem(CHEVRON_BACK_DS_ID);\n }}\n role=\"button\"\n aria-label={`Close ${ariaLabel}`}\n />\n )}\n <CollapsedComponent item={item} ctx={ctx} />\n </Grid>\n <StyledLabel\n ml={opened ? 'xxs' : '1px'}\n mt=\"xxxs\"\n mb=\"15px\"\n data-testid={labelDataTestId || 'leftnav-itemlabel'}\n labelOverflow={labelOverflow}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledLabel>\n <Grid\n pl=\"xs\"\n pr={opened ? 'xxs2' : 'xxs'}\n onFocus={(e) => {\n setFocusedItem(null);\n e.stopPropagation();\n }}\n onKeyDown={(e) => e.stopPropagation()}\n data-testid=\"leftnav-right-component\"\n >\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </Grid>\n {BottomComponent && (\n <Grid\n style={{ gridColumn: 'span 3' }}\n pb=\"xxxs\"\n pl=\"xxs\"\n pr=\"xxs\"\n onFocus={(e) => {\n setFocusedItem(null);\n e.stopPropagation();\n }}\n onKeyDown={(e) => e.stopPropagation()}\n >\n <BottomComponent ctx={ctx} item={item} />\n </Grid>\n )}\n </ItemRenderer>\n );\n};\n"],
5
+ "mappings": "AAAA;ACEA;AACA;AACA;AACA;AAEA;AACA;AAGA,MAAM,uBAAuB,CAAC,eAAwB,CAAC,UACrD;AAAA,gCAC8B,aAAa,MAAM,OAAO,MAAM,OAAO;AAAA;AAAA;AAAA,kCAGrC,aAAa,MAAM,OAAO,MAAM,OAAO,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA,kCAI1D,MAAM,OAAO,MAAM;AAAA;AAAA;AAI9C,MAAM,aAAa,CAAC,UAAuC;AAChE,QAAM;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ;AAAA,MACA,UAAU,EAAE,OAAO,gBAAgB,iBAAiB;AAAA,MACpD,qBAAqB,MAAM;AAAA;AAAA,IAE7B;AAAA,IACA,KAAK;AAAA,MACH,cAAc,EAAE,YAAY,eAAe;AAAA,MAC3C;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,MAEA;AAEJ,QAAM,SAAS,eAAe;AAE9B,QAAM,YAAY,KAAK,SAAS,aAAc,QAAO,UAAU,WAAW,QAAQ;AAElF,QAAM,aAAa,iBAAiB,QAAQ,mBAAmB;AAE/D,QAAM,cAAc,YAClB,CAAC,YAAW,CAAC,UACX,CAAC,UAAS,qBAAqB,YAAY,SAAS,uCACtD,CAAC,YAAY;AAGf,SACE,qCAAC,cAAD;AAAA,IACE,MAAM;AAAA,SACD;AAAA,MACH,UAAU;AAAA,QACR;AAAA,QACA,cAAc;AAAA,WACX,KAAK;AAAA,QACR,UAAU,wBAAwB,CAAC;AAAA,QACnC,UAAU,wBAAwB;AAAA,QAClC,YAAY,CAAC;AAAA;AAAA;AAAA,IAGjB,iBAAe;AAAA,IACf,gBAAgB,SAAS,SAAS;AAAA,IAClC;AAAA,KAEA,qCAAC,MAAD;AAAA,IACE,MAAM,SAAS,CAAC,QAAQ,UAAU,CAAC;AAAA,IACnC,QAAO;AAAA,IACP,IAAI,SAAS,QAAQ;AAAA,IACrB,cAAa;AAAA,IACb,eAAY;AAAA,KAEX,UACC,qCAAC,mBAAD;AAAA,IACE,MAAK;AAAA,IACL,OAAO,CAAC,iBAAiB;AAAA,IACzB,SAAS,CAAC,MAAM;AACd,kBAAY,MAAM;AAAA;AAAA,IAEpB,eAAY;AAAA,IACZ,UAAU;AAAA,IACV,SAAS,CAAC,MAAM;AACd,QAAE;AACF,qBAAe;AAAA;AAAA,IAEjB,MAAK;AAAA,IACL,cAAY,SAAS;AAAA,MAGzB,qCAAC,oBAAD;AAAA,IAAoB;AAAA,IAAY;AAAA,OAElC,qCAAC,aAAD;AAAA,IACE,IAAI,SAAS,QAAQ;AAAA,IACrB,IAAG;AAAA,IACH,IAAG;AAAA,IACH,eAAa,mBAAmB;AAAA,IAChC;AAAA,KAEC,kBAAkB,aAAa,qCAAC,4BAAD;AAAA,IAA4B,OAAO;AAAA,IAAO,WAAU;AAAA,OAAoB,QAE1G,qCAAC,MAAD;AAAA,IACE,IAAG;AAAA,IACH,IAAI,SAAS,SAAS;AAAA,IACtB,SAAS,CAAC,MAAM;AACd,qBAAe;AACf,QAAE;AAAA;AAAA,IAEJ,WAAW,CAAC,MAAM,EAAE;AAAA,IACpB,eAAY;AAAA,KAEX,kBAAkB,qCAAC,gBAAD;AAAA,IAAgB;AAAA,IAAU;AAAA,OAE9C,mBACC,qCAAC,MAAD;AAAA,IACE,OAAO,EAAE,YAAY;AAAA,IACrB,IAAG;AAAA,IACH,IAAG;AAAA,IACH,IAAG;AAAA,IACH,SAAS,CAAC,MAAM;AACd,qBAAe;AACf,QAAE;AAAA;AAAA,IAEJ,WAAW,CAAC,MAAM,EAAE;AAAA,KAEpB,qCAAC,iBAAD;AAAA,IAAiB;AAAA,IAAU;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -1,12 +1,20 @@
1
- import Grid from '@elliemae/ds-grid';
2
- import { ChevronSmallLeft } from '@elliemae/ds-icons';
3
- import styled from 'styled-components';
4
-
5
- const StyledLabel = /*#__PURE__*/styled(Grid).withConfig({
6
- componentId: "sc-m5k4h8-0"
7
- })(["font-size:14px;color:", ";word-break:", ";"], props => props.theme.colors.neutral[800], props => props.labelOverflow === 'wrapAll' ? 'break-all' : 'normal');
8
- const StyledChevronLeft = /*#__PURE__*/styled(ChevronSmallLeft).withConfig({
9
- componentId: "sc-m5k4h8-1"
10
- })(["cursor:pointer;:focus{outline:2px solid ", ";}"], props => props.theme.colors.brand[800]);
11
-
12
- export { StyledChevronLeft, StyledLabel };
1
+ import * as React from "react";
2
+ import Grid from "@elliemae/ds-grid";
3
+ import { ChevronSmallLeft } from "@elliemae/ds-icons";
4
+ import styled from "styled-components";
5
+ const StyledLabel = styled(Grid)`
6
+ font-size: 14px;
7
+ color: ${(props) => props.theme.colors.neutral[800]};
8
+ word-break: ${(props) => props.labelOverflow === "wrapAll" ? "break-all" : "normal"};
9
+ `;
10
+ const StyledChevronLeft = styled(ChevronSmallLeft)`
11
+ cursor: pointer;
12
+ :focus {
13
+ outline: 2px solid ${(props) => props.theme.colors.brand[800]};
14
+ }
15
+ `;
16
+ export {
17
+ StyledChevronLeft,
18
+ StyledLabel
19
+ };
20
+ //# sourceMappingURL=styled.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/ItemHeader/styled.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import Grid from '@elliemae/ds-grid';\nimport { ChevronSmallLeft } from '@elliemae/ds-icons';\nimport styled from 'styled-components';\n\nexport const StyledLabel = styled(Grid)`\n font-size: 14px;\n color: ${(props) => props.theme.colors.neutral[800]};\n word-break: ${(props) => (props.labelOverflow === 'wrapAll' ? 'break-all' : 'normal')};\n`;\n\nexport const StyledChevronLeft = styled(ChevronSmallLeft)`\n cursor: pointer;\n :focus {\n outline: 2px solid ${(props) => props.theme.colors.brand[800]};\n }\n`;\n"],
5
+ "mappings": "AAAA;ACAA;AACA;AACA;AAEO,MAAM,cAAc,OAAO;AAAA;AAAA,WAEvB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,gBACjC,CAAC,UAAW,MAAM,kBAAkB,YAAY,cAAc;AAAA;AAGvE,MAAM,oBAAoB,OAAO;AAAA;AAAA;AAAA,yBAGf,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -1,87 +1,76 @@
1
- import 'core-js/modules/esnext.async-iterator.filter.js';
2
- import 'core-js/modules/esnext.iterator.constructor.js';
3
- import 'core-js/modules/esnext.iterator.filter.js';
4
- import 'core-js/modules/esnext.async-iterator.for-each.js';
5
- import 'core-js/modules/esnext.iterator.for-each.js';
6
- import _jsx from '@babel/runtime/helpers/esm/jsx';
7
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
8
- import { useCallback } from 'react';
9
- import Grid from '@elliemae/ds-grid';
10
- import { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';
11
- import { ItemRenderer } from '../../exported-related/ItemRenderer/index.js';
12
- import '@elliemae/ds-icons';
13
- import 'react/jsx-runtime';
14
- import 'styled-components';
15
- import { StyledLabel } from './styled.js';
1
+ import * as React from "react";
2
+ import React2, { useCallback } from "react";
3
+ import Grid from "@elliemae/ds-grid";
4
+ import { SimpleTruncatedTooltipText } from "@elliemae/ds-truncated-tooltip-text";
5
+ import { ItemRenderer } from "../../exported-related/index";
6
+ import { StyledLabel } from "./styled";
7
+ const notOpenedShadowStyle = (isSelected) => (theme) => `
8
+ box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : "transparent"};
16
9
 
17
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
10
+ :hover {
11
+ box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : theme.colors.brand[300]};
12
+ }
18
13
 
19
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
20
-
21
- const notOpenedShadowStyle = isSelected => theme => "\n box-shadow: inset 4px 0 0 0 ".concat(isSelected ? theme.colors.brand[400] : 'transparent', ";\n\n :hover {\n box-shadow: inset 4px 0 0 0 ").concat(isSelected ? theme.colors.brand[400] : theme.colors.brand[300], ";\n }\n\n :active {\n box-shadow: inset 4px 0 0 0 ").concat(theme.colors.brand[400], ";\n }\n");
22
-
23
- const ItemLink = props => {
14
+ :active {
15
+ box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};
16
+ }
17
+ `;
18
+ const ItemLink = (props) => {
24
19
  const {
25
20
  item,
26
21
  item: {
27
22
  dsId,
28
- itemOpts: {
29
- label,
30
- RightComponent,
31
- labelDataTestId,
32
- labelOverflow: itemLabelOverflow
33
- },
23
+ itemOpts: { label, RightComponent, labelDataTestId },
34
24
  CollapsedComponent = () => null
35
25
  },
36
26
  ctx,
37
27
  ctx: {
38
- leftNavProps: {
39
- labelOverflow: leftNavLabelOverflow,
40
- openedItem
41
- },
28
+ leftNavProps: { labelOverflow, openedItem },
42
29
  selectedItem,
43
30
  selectedParent
44
31
  }
45
32
  } = props;
46
- const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;
47
33
  const isSelected = selectedItem === dsId || selectedParent === dsId;
48
- const shadowStyle = useCallback(opened => theme => !opened ? notOpenedShadowStyle(isSelected)(theme) : "box-shadow: inset 4px 0 0 0 #52A6EC", [isSelected, openedItem]);
49
- return /*#__PURE__*/_jsx(ItemRenderer, {
50
- item: _objectSpread(_objectSpread({}, item), {}, {
51
- itemOpts: _objectSpread(_objectSpread({
52
- ariaLabel: typeof label === 'string' ? label : '',
53
- ariaRole: 'link'
54
- }, item.itemOpts), {}, {
34
+ const shadowStyle = useCallback((opened) => (theme) => !opened ? notOpenedShadowStyle(isSelected)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`, [isSelected, openedItem]);
35
+ return /* @__PURE__ */ React2.createElement(ItemRenderer, {
36
+ item: {
37
+ ...item,
38
+ itemOpts: {
39
+ ariaLabel: typeof label === "string" ? label : "",
40
+ ariaRole: "link",
41
+ ...item.itemOpts,
55
42
  selectable: true
56
- })
57
- }),
58
- shadowStyle: shadowStyle
59
- }, void 0, /*#__PURE__*/_jsx(Grid, {
60
- cols: ['38px'],
43
+ }
44
+ },
45
+ shadowStyle
46
+ }, /* @__PURE__ */ React2.createElement(Grid, {
47
+ cols: ["38px"],
61
48
  gutter: "1px",
62
49
  pl: 0,
63
50
  justifyItems: "center",
64
51
  "data-testid": "leftnav-leftcomponent"
65
- }, void 0, /*#__PURE__*/_jsx(CollapsedComponent, {
66
- item: item,
67
- ctx: ctx
68
- })), /*#__PURE__*/_jsx(StyledLabel, {
52
+ }, /* @__PURE__ */ React2.createElement(CollapsedComponent, {
53
+ item,
54
+ ctx
55
+ })), /* @__PURE__ */ React2.createElement(StyledLabel, {
69
56
  ml: "1px",
70
57
  mt: "xxxs",
71
58
  mb: "15px",
72
- "data-testid": labelDataTestId || 'leftnav-itemlabel',
73
- labelOverflow: labelOverflow
74
- }, void 0, labelOverflow === 'truncate' ? /*#__PURE__*/_jsx(SimpleTruncatedTooltipText, {
59
+ "data-testid": labelDataTestId || "leftnav-itemlabel",
60
+ labelOverflow
61
+ }, labelOverflow === "truncate" ? /* @__PURE__ */ React2.createElement(SimpleTruncatedTooltipText, {
75
62
  value: label,
76
63
  placement: "bottom-start"
77
- }) : label), /*#__PURE__*/_jsx(Grid, {
64
+ }) : label), /* @__PURE__ */ React2.createElement(Grid, {
78
65
  mt: "xxxs",
79
66
  pr: "xxs2",
80
67
  "data-testid": "leftnav-right-component"
81
- }, void 0, RightComponent && /*#__PURE__*/_jsx(RightComponent, {
82
- ctx: ctx,
83
- item: item
68
+ }, RightComponent && /* @__PURE__ */ React2.createElement(RightComponent, {
69
+ ctx,
70
+ item
84
71
  })));
85
72
  };
86
-
87
- export { ItemLink };
73
+ export {
74
+ ItemLink
75
+ };
76
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/ItemLink/index.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\nimport React, { useCallback } from 'react';\nimport Grid from '@elliemae/ds-grid';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport { StyledLabel } from './styled';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst notOpenedShadowStyle = (isSelected: boolean) => (theme: any) =>\n `\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : 'transparent'};\n\n :hover {\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : theme.colors.brand[300]};\n }\n\n :active {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};\n }\n`;\n\nexport const ItemLink = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: { label, RightComponent, labelDataTestId },\n CollapsedComponent = () => null,\n },\n ctx,\n ctx: {\n leftNavProps: { labelOverflow, openedItem },\n selectedItem,\n selectedParent,\n },\n } = props;\n\n const isSelected = selectedItem === dsId || selectedParent === dsId;\n\n const shadowStyle = useCallback(\n (opened) => (theme: any) => !opened ? notOpenedShadowStyle(isSelected)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`,\n [isSelected, openedItem],\n );\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaLabel: typeof label === 'string' ? label : '',\n ariaRole: 'link',\n ...item.itemOpts,\n selectable: true,\n },\n }}\n shadowStyle={shadowStyle}\n >\n <Grid cols={['38px']} gutter=\"1px\" pl={0} justifyItems=\"center\" data-testid=\"leftnav-leftcomponent\">\n <CollapsedComponent item={item} ctx={ctx} />\n </Grid>\n <StyledLabel\n ml=\"1px\"\n mt=\"xxxs\"\n mb=\"15px\"\n data-testid={labelDataTestId || 'leftnav-itemlabel'}\n labelOverflow={labelOverflow}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledLabel>\n <Grid mt=\"xxxs\" pr=\"xxs2\" data-testid=\"leftnav-right-component\">\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </Grid>\n </ItemRenderer>\n );\n};\n"],
5
+ "mappings": "AAAA;ACCA;AACA;AACA;AACA;AAEA;AAGA,MAAM,uBAAuB,CAAC,eAAwB,CAAC,UACrD;AAAA,gCAC8B,aAAa,MAAM,OAAO,MAAM,OAAO;AAAA;AAAA;AAAA,kCAGrC,aAAa,MAAM,OAAO,MAAM,OAAO,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA,kCAI1D,MAAM,OAAO,MAAM;AAAA;AAAA;AAI9C,MAAM,WAAW,CAAC,UAAuC;AAC9D,QAAM;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ;AAAA,MACA,UAAU,EAAE,OAAO,gBAAgB;AAAA,MACnC,qBAAqB,MAAM;AAAA;AAAA,IAE7B;AAAA,IACA,KAAK;AAAA,MACH,cAAc,EAAE,eAAe;AAAA,MAC/B;AAAA,MACA;AAAA;AAAA,MAEA;AAEJ,QAAM,aAAa,iBAAiB,QAAQ,mBAAmB;AAE/D,QAAM,cAAc,YAClB,CAAC,WAAW,CAAC,UAAe,CAAC,SAAS,qBAAqB,YAAY,SAAS,uCAChF,CAAC,YAAY;AAGf,SACE,qCAAC,cAAD;AAAA,IACE,MAAM;AAAA,SACD;AAAA,MACH,UAAU;AAAA,QACR,WAAW,OAAO,UAAU,WAAW,QAAQ;AAAA,QAC/C,UAAU;AAAA,WACP,KAAK;AAAA,QACR,YAAY;AAAA;AAAA;AAAA,IAGhB;AAAA,KAEA,qCAAC,MAAD;AAAA,IAAM,MAAM,CAAC;AAAA,IAAS,QAAO;AAAA,IAAM,IAAI;AAAA,IAAG,cAAa;AAAA,IAAS,eAAY;AAAA,KAC1E,qCAAC,oBAAD;AAAA,IAAoB;AAAA,IAAY;AAAA,OAElC,qCAAC,aAAD;AAAA,IACE,IAAG;AAAA,IACH,IAAG;AAAA,IACH,IAAG;AAAA,IACH,eAAa,mBAAmB;AAAA,IAChC;AAAA,KAEC,kBAAkB,aAAa,qCAAC,4BAAD;AAAA,IAA4B,OAAO;AAAA,IAAO,WAAU;AAAA,OAAoB,QAE1G,qCAAC,MAAD;AAAA,IAAM,IAAG;AAAA,IAAO,IAAG;AAAA,IAAO,eAAY;AAAA,KACnC,kBAAkB,qCAAC,gBAAD;AAAA,IAAgB;AAAA,IAAU;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -1,8 +1,12 @@
1
- import Grid from '@elliemae/ds-grid';
2
- import styled from 'styled-components';
3
-
4
- const StyledLabel = /*#__PURE__*/styled(Grid).withConfig({
5
- componentId: "sc-16fwr4f-0"
6
- })(["font-size:14px;color:", ";word-break:", ";"], props => props.theme.colors.neutral[800], props => props.labelOverflow === 'wrapAll' ? 'break-all' : 'normal');
7
-
8
- export { StyledLabel };
1
+ import * as React from "react";
2
+ import Grid from "@elliemae/ds-grid";
3
+ import styled from "styled-components";
4
+ const StyledLabel = styled(Grid)`
5
+ font-size: 14px;
6
+ color: ${(props) => props.theme.colors.neutral[800]};
7
+ word-break: ${(props) => props.labelOverflow === "wrapAll" ? "break-all" : "normal"};
8
+ `;
9
+ export {
10
+ StyledLabel
11
+ };
12
+ //# sourceMappingURL=styled.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/ItemLink/styled.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import Grid from '@elliemae/ds-grid';\nimport styled from 'styled-components';\n\nexport const StyledLabel = styled(Grid)`\n font-size: 14px;\n color: ${(props) => props.theme.colors.neutral[800]};\n word-break: ${(props) =>\n props.labelOverflow === 'wrapAll' ? 'break-all' : 'normal'};\n`;\n"],
5
+ "mappings": "AAAA;ACAA;AACA;AAEO,MAAM,cAAc,OAAO;AAAA;AAAA,WAEvB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,gBACjC,CAAC,UACb,MAAM,kBAAkB,YAAY,cAAc;AAAA;",
6
+ "names": []
7
+ }
@@ -1,73 +1,50 @@
1
- import 'core-js/modules/esnext.async-iterator.filter.js';
2
- import 'core-js/modules/esnext.iterator.constructor.js';
3
- import 'core-js/modules/esnext.iterator.filter.js';
4
- import 'core-js/modules/esnext.async-iterator.for-each.js';
5
- import 'core-js/modules/esnext.iterator.for-each.js';
6
- import _jsx from '@babel/runtime/helpers/esm/jsx';
7
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
8
- import 'react';
9
- import Grid from '@elliemae/ds-grid';
10
- import { ItemRenderer } from '../../exported-related/ItemRenderer/index.js';
11
- import '@elliemae/ds-icons';
12
- import 'react/jsx-runtime';
13
- import 'styled-components';
14
- import { StyledLabel, StyledVerticalSeparator, StyledRightLabel } from './styled.js';
15
-
16
- var _div, _StyledVerticalSepara;
17
-
18
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
19
-
20
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
21
- const ItemSection = props => {
1
+ import * as React from "react";
2
+ import React2 from "react";
3
+ import Grid from "@elliemae/ds-grid";
4
+ import { ItemRenderer } from "../../exported-related/index";
5
+ import { StyledLabel, StyledRightLabel, StyledVerticalSeparator } from "./styled";
6
+ const ItemSection = (props) => {
22
7
  const {
23
8
  item,
24
9
  item: {
25
- itemOpts: {
26
- label,
27
- LeftComponent,
28
- RightComponent,
29
- labelRightSection,
30
- labelDataTestId
31
- }
10
+ itemOpts: { label, LeftComponent, RightComponent, labelRightSection, labelDataTestId }
32
11
  },
33
12
  ctx,
34
- ctx: {
35
- setFocusedItem
36
- }
13
+ ctx: { setFocusedItem }
37
14
  } = props;
38
- return /*#__PURE__*/_jsx(ItemRenderer, {
39
- item: _objectSpread(_objectSpread({}, item), {}, {
40
- itemOpts: _objectSpread(_objectSpread({}, item.itemOpts), {}, {
41
- selectable: false,
42
- focuseable: false
43
- }),
15
+ return /* @__PURE__ */ React2.createElement(ItemRenderer, {
16
+ item: {
17
+ ...item,
18
+ itemOpts: { ...item.itemOpts, selectable: false, focuseable: false },
44
19
  CollapsedComponent: null
45
- }),
20
+ },
46
21
  minHeight: "32px",
47
22
  paddingTop: "8px"
48
- }, void 0, /*#__PURE__*/_jsx(Grid, {
49
- cols: ['min-content', 'auto', 'min-content', 'auto'],
23
+ }, /* @__PURE__ */ React2.createElement(Grid, {
24
+ cols: ["min-content", "auto", "min-content", "auto"],
50
25
  pl: "xxs",
51
26
  alignItems: "center"
52
- }, void 0, LeftComponent ? /*#__PURE__*/_jsx(LeftComponent, {
53
- ctx: ctx,
54
- item: item
55
- }) : _div || (_div = /*#__PURE__*/_jsx("div", {})), /*#__PURE__*/_jsx(StyledLabel, {
56
- "data-testid": labelDataTestId || 'leftnav-section-item-label'
57
- }, void 0, label), _StyledVerticalSepara || (_StyledVerticalSepara = /*#__PURE__*/_jsx(StyledVerticalSeparator, {})), /*#__PURE__*/_jsx(StyledRightLabel, {}, void 0, labelRightSection)), /*#__PURE__*/_jsx(Grid, {
27
+ }, LeftComponent ? /* @__PURE__ */ React2.createElement(LeftComponent, {
28
+ ctx,
29
+ item
30
+ }) : /* @__PURE__ */ React2.createElement("div", null), /* @__PURE__ */ React2.createElement(StyledLabel, {
31
+ "data-testid": labelDataTestId || "leftnav-section-item-label"
32
+ }, label), /* @__PURE__ */ React2.createElement(StyledVerticalSeparator, null), /* @__PURE__ */ React2.createElement(StyledRightLabel, null, labelRightSection)), /* @__PURE__ */ React2.createElement(Grid, {
58
33
  ml: "auto",
59
- onFocus: e => {
34
+ onFocus: (e) => {
60
35
  setFocusedItem(null);
61
36
  e.stopPropagation();
62
37
  },
63
- onKeyDown: e => e.stopPropagation(),
38
+ onKeyDown: (e) => e.stopPropagation(),
64
39
  pr: "xxs2",
65
40
  alignItems: "center",
66
41
  "data-testid": "leftnav-right-component"
67
- }, void 0, RightComponent && /*#__PURE__*/_jsx(RightComponent, {
68
- ctx: ctx,
69
- item: item
42
+ }, RightComponent && /* @__PURE__ */ React2.createElement(RightComponent, {
43
+ ctx,
44
+ item
70
45
  })));
71
46
  };
72
-
73
- export { ItemSection };
47
+ export {
48
+ ItemSection
49
+ };
50
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/ItemSection/index.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport Grid from '@elliemae/ds-grid';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport { StyledLabel, StyledRightLabel, StyledVerticalSeparator } from './styled';\n\nexport const ItemSection = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n itemOpts: { label, LeftComponent, RightComponent, labelRightSection, labelDataTestId },\n },\n ctx,\n ctx: { setFocusedItem },\n } = props;\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: { ...item.itemOpts, selectable: false, focuseable: false },\n CollapsedComponent: null,\n }}\n minHeight=\"32px\"\n paddingTop=\"8px\"\n >\n <Grid cols={['min-content', 'auto', 'min-content', 'auto']} pl=\"xxs\" alignItems=\"center\">\n {LeftComponent ? <LeftComponent ctx={ctx} item={item} /> : <div />}\n <StyledLabel data-testid={labelDataTestId || 'leftnav-section-item-label'}>{label}</StyledLabel>\n <StyledVerticalSeparator />\n <StyledRightLabel>{labelRightSection}</StyledRightLabel>\n </Grid>\n <Grid\n ml=\"auto\"\n onFocus={(e) => {\n setFocusedItem(null);\n e.stopPropagation();\n }}\n onKeyDown={(e) => e.stopPropagation()}\n pr=\"xxs2\"\n alignItems=\"center\"\n data-testid=\"leftnav-right-component\"\n >\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </Grid>\n </ItemRenderer>\n );\n};\n"],
5
+ "mappings": "AAAA;ACAA;AACA;AACA;AAEA;AAEO,MAAM,cAAc,CAAC,UAAuC;AACjE,QAAM;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ,UAAU,EAAE,OAAO,eAAe,gBAAgB,mBAAmB;AAAA;AAAA,IAEvE;AAAA,IACA,KAAK,EAAE;AAAA,MACL;AAEJ,SACE,qCAAC,cAAD;AAAA,IACE,MAAM;AAAA,SACD;AAAA,MACH,UAAU,KAAK,KAAK,UAAU,YAAY,OAAO,YAAY;AAAA,MAC7D,oBAAoB;AAAA;AAAA,IAEtB,WAAU;AAAA,IACV,YAAW;AAAA,KAEX,qCAAC,MAAD;AAAA,IAAM,MAAM,CAAC,eAAe,QAAQ,eAAe;AAAA,IAAS,IAAG;AAAA,IAAM,YAAW;AAAA,KAC7E,gBAAgB,qCAAC,eAAD;AAAA,IAAe;AAAA,IAAU;AAAA,OAAiB,qCAAC,OAAD,OAC3D,qCAAC,aAAD;AAAA,IAAa,eAAa,mBAAmB;AAAA,KAA+B,QAC5E,qCAAC,yBAAD,OACA,qCAAC,kBAAD,MAAmB,qBAErB,qCAAC,MAAD;AAAA,IACE,IAAG;AAAA,IACH,SAAS,CAAC,MAAM;AACd,qBAAe;AACf,QAAE;AAAA;AAAA,IAEJ,WAAW,CAAC,MAAM,EAAE;AAAA,IACpB,IAAG;AAAA,IACH,YAAW;AAAA,IACX,eAAY;AAAA,KAEX,kBAAkB,qCAAC,gBAAD;AAAA,IAAgB;AAAA,IAAU;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -1,13 +1,24 @@
1
- import styled from 'styled-components';
2
-
3
- const StyledLabel = /*#__PURE__*/styled.span.withConfig({
4
- componentId: "sc-tbnpp2-0"
5
- })(["font-size:13px;color:", ";margin-left:", ";line-height:13px;"], props => props.theme.colors.neutral[700], props => props.theme.space.xxs);
6
- const StyledVerticalSeparator = /*#__PURE__*/styled.div.withConfig({
7
- componentId: "sc-tbnpp2-1"
8
- })(["margin:0 ", ";width:1px;height:13px;background:", ";"], props => props.theme.space.xxs, props => props.theme.colors.neutral[600]);
9
- const StyledRightLabel = /*#__PURE__*/styled.span.withConfig({
10
- componentId: "sc-tbnpp2-2"
11
- })(["font-size:12px;line-height:13px;"]);
12
-
13
- export { StyledLabel, StyledRightLabel, StyledVerticalSeparator };
1
+ import * as React from "react";
2
+ import styled from "styled-components";
3
+ const StyledLabel = styled.span`
4
+ font-size: 13px;
5
+ color: ${(props) => props.theme.colors.neutral[700]};
6
+ margin-left: ${(props) => props.theme.space.xxs};
7
+ line-height: 13px;
8
+ `;
9
+ const StyledVerticalSeparator = styled.div`
10
+ margin: 0 ${(props) => props.theme.space.xxs};
11
+ width: 1px;
12
+ height: 13px;
13
+ background: ${(props) => props.theme.colors.neutral[600]};
14
+ `;
15
+ const StyledRightLabel = styled.span`
16
+ font-size: 12px;
17
+ line-height: 13px;
18
+ `;
19
+ export {
20
+ StyledLabel,
21
+ StyledRightLabel,
22
+ StyledVerticalSeparator
23
+ };
24
+ //# sourceMappingURL=styled.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/ItemSection/styled.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import styled from 'styled-components';\n\nexport const StyledLabel = styled.span`\n font-size: 13px;\n color: ${(props) => props.theme.colors.neutral[700]};\n margin-left: ${(props) => props.theme.space.xxs};\n line-height: 13px;\n`;\n\nexport const StyledVerticalSeparator = styled.div`\n margin: 0 ${(props) => props.theme.space.xxs};\n width: 1px;\n height: 13px;\n background: ${(props) => props.theme.colors.neutral[600]};\n`;\n\nexport const StyledRightLabel = styled.span`\n font-size: 12px;\n line-height: 13px;\n`;\n"],
5
+ "mappings": "AAAA;ACAA;AAEO,MAAM,cAAc,OAAO;AAAA;AAAA,WAEvB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,iBAChC,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA;AAIvC,MAAM,0BAA0B,OAAO;AAAA,cAChC,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA;AAAA,gBAG3B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAG/C,MAAM,mBAAmB,OAAO;AAAA;AAAA;AAAA;",
6
+ "names": []
7
+ }