@elliemae/ds-left-navigation 2.2.1 → 2.3.0-alpha.4

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 +80 -72
  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 +48 -27
  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 +46 -30
  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 +96 -91
  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 +76 -65
  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 +96 -90
  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 +51 -63
  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 +19 -18
  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 +17 -26
  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 +66 -80
  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 +47 -55
  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 +66 -79
  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 +5 -2
@@ -1,72 +1,42 @@
1
- import 'core-js/modules/esnext.async-iterator.for-each.js';
2
- import 'core-js/modules/esnext.iterator.for-each.js';
3
- import _jsx from '@babel/runtime/helpers/esm/jsx';
4
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
5
- import 'core-js/modules/web.dom-collections.iterator.js';
6
- import 'core-js/modules/esnext.async-iterator.map.js';
7
- import 'core-js/modules/esnext.iterator.map.js';
8
- import 'core-js/modules/esnext.async-iterator.filter.js';
9
- import 'core-js/modules/esnext.iterator.constructor.js';
10
- import 'core-js/modules/esnext.iterator.filter.js';
11
- import { useEffect, useMemo, useCallback } from 'react';
12
- import Grid from '@elliemae/ds-grid';
13
- import { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';
14
- import { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';
15
- import { ITEM_TYPES } from '../../exported-related/constants.js';
16
- import { ItemRenderer } from '../../exported-related/ItemRenderer/index.js';
17
- import 'react/jsx-runtime';
18
- import 'styled-components';
19
- import { StyledLabel, StyledDate } from './styled.js';
20
- import { ItemSeparator } from '../ItemSeparator/index.js';
21
- import { ItemWithDate } from '../ItemWithDate/index.js';
22
- import { ItemTextLabel } from '../ItemTextLabel/index.js';
23
-
24
- 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; }
25
-
26
- 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; }
27
- // Subitem mapping
1
+ import * as React from "react";
2
+ import React2, { useMemo, useCallback, useEffect } from "react";
3
+ import Grid from "@elliemae/ds-grid";
4
+ import { SimpleTruncatedTooltipText } from "@elliemae/ds-truncated-tooltip-text";
5
+ import { ArrowheadDown, ArrowheadRight } from "@elliemae/ds-icons";
6
+ import { ItemRenderer, ITEM_TYPES } from "../../exported-related/index";
7
+ import { StyledLabel, StyledDate } from "./styled";
8
+ import { ItemSeparator } from "../ItemSeparator";
9
+ import { ItemWithDate } from "../ItemWithDate";
10
+ import { ItemTextLabel } from "../ItemTextLabel";
28
11
  const outOfTheBoxSubitemsComponents = {
29
12
  [ITEM_TYPES.LEFT_NAV_ITEM_SEPARATOR]: ItemSeparator,
30
13
  [ITEM_TYPES.LEFT_NAV_ITEM_WITH_DATE]: ItemWithDate,
31
14
  [ITEM_TYPES.LEFT_NAV_ITEM_TEXT_LABEL]: ItemTextLabel
32
15
  };
33
-
34
- const OutOfTheBoxMapSubitem = props => {
16
+ const OutOfTheBoxMapSubitem = (props) => {
35
17
  const {
36
18
  item,
37
- item: {
38
- type,
39
- Component
40
- },
19
+ item: { type, Component },
41
20
  ctx
42
21
  } = props;
43
-
44
- if (typeof type === 'string' && !!outOfTheBoxSubitemsComponents[type]) {
45
- var _item$itemOpts$indent, _item$itemOpts;
46
-
22
+ if (typeof type === "string" && !!outOfTheBoxSubitemsComponents[type]) {
47
23
  const OutOfTheBoxComponent = outOfTheBoxSubitemsComponents[type];
48
- const currentIndent = (_item$itemOpts$indent = (_item$itemOpts = item.itemOpts) === null || _item$itemOpts === void 0 ? void 0 : _item$itemOpts.indent) !== null && _item$itemOpts$indent !== void 0 ? _item$itemOpts$indent : 0;
49
-
50
- const newItem = _objectSpread(_objectSpread({}, item), {}, {
51
- itemOpts: _objectSpread(_objectSpread({}, item.itemOpts), {}, {
52
- indent: currentIndent + 44
53
- })
54
- });
55
-
56
- return /*#__PURE__*/_jsx(OutOfTheBoxComponent, {
24
+ const currentIndent = item.itemOpts?.indent ?? 0;
25
+ const newItem = {
26
+ ...item,
27
+ itemOpts: { ...item.itemOpts, indent: currentIndent + 44 }
28
+ };
29
+ return /* @__PURE__ */ React2.createElement(OutOfTheBoxComponent, {
57
30
  item: newItem,
58
- ctx: ctx
31
+ ctx
59
32
  });
60
- } // we expect an error to be threw if Component is not defined and type is not a valid out-of-the-box...
61
-
62
-
63
- return /*#__PURE__*/_jsx(Component, {
64
- item: item,
65
- ctx: ctx
33
+ }
34
+ return /* @__PURE__ */ React2.createElement(Component, {
35
+ item,
36
+ ctx
66
37
  });
67
38
  };
68
-
69
- const ItemUncontrolledDrilldown = props => {
39
+ const ItemUncontrolledDrilldown = (props) => {
70
40
  const {
71
41
  item,
72
42
  item: {
@@ -85,78 +55,83 @@ const ItemUncontrolledDrilldown = props => {
85
55
  },
86
56
  ctx,
87
57
  ctx: {
88
- leftNavProps: {
89
- labelOverflow: leftNavLabelOverflow
90
- },
58
+ leftNavProps: { labelOverflow: leftNavLabelOverflow },
91
59
  openedDrilldowns,
92
60
  setOpenedDrilldowns
93
61
  }
94
- } = props; // Start opened functionality
95
-
62
+ } = props;
96
63
  useEffect(() => {
97
- if (startOpened) setOpenedDrilldowns([...openedDrilldowns, dsId]);
64
+ if (startOpened)
65
+ setOpenedDrilldowns([...openedDrilldowns, dsId]);
98
66
  }, []);
99
67
  const opened = openedDrilldowns.includes(dsId);
100
68
  const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;
101
69
  const arrowIcon = useMemo(() => {
102
70
  const Component = opened ? ArrowheadDown : ArrowheadRight;
103
- return /*#__PURE__*/_jsx(Component, {
71
+ return /* @__PURE__ */ React2.createElement(Component, {
104
72
  width: "24px",
105
73
  height: "18px",
106
- color: ['brand-primary', '800']
74
+ color: ["brand-primary", "800"]
107
75
  });
108
- }, [opened]); // Array of subitems
109
-
76
+ }, [opened]);
110
77
  const subitems = useMemo(() => {
111
- if (!opened || !items) return [];
112
- return items.map(subitem => /*#__PURE__*/_jsx(OutOfTheBoxMapSubitem, {
78
+ if (!opened || !items)
79
+ return [];
80
+ return items.map((subitem) => /* @__PURE__ */ React2.createElement(OutOfTheBoxMapSubitem, {
113
81
  item: subitem,
114
- ctx: ctx
115
- }, subitem.dsId));
82
+ ctx,
83
+ key: subitem.dsId
84
+ }));
116
85
  }, [items, opened]);
117
86
  const handleOnClick = useCallback(() => {
118
- if (opened) setOpenedDrilldowns(openedDrilldowns.filter(openedDrilldown => openedDrilldown !== dsId));else setOpenedDrilldowns([...openedDrilldowns, dsId]);
87
+ if (opened)
88
+ setOpenedDrilldowns(openedDrilldowns.filter((openedDrilldown) => openedDrilldown !== dsId));
89
+ else
90
+ setOpenedDrilldowns([...openedDrilldowns, dsId]);
119
91
  }, [opened, setOpenedDrilldowns, openedDrilldowns]);
120
- return /*#__PURE__*/_jsx(ItemRenderer, {
121
- item: _objectSpread(_objectSpread({}, item), {}, {
122
- itemOpts: _objectSpread(_objectSpread({
92
+ return /* @__PURE__ */ React2.createElement(ItemRenderer, {
93
+ item: {
94
+ ...item,
95
+ itemOpts: {
123
96
  ariaExpanded: opened,
124
- ariaRole: 'menuitem'
125
- }, item.itemOpts), {}, {
97
+ ariaRole: "menuitem",
98
+ ...item.itemOpts,
126
99
  openable: !opened,
127
100
  closable: opened
128
- }),
101
+ },
129
102
  CollapsedComponent: null
130
- }),
131
- subitems: subitems,
103
+ },
104
+ subitems,
132
105
  minHeight: "32px",
133
106
  paddingTop: "8px",
134
107
  onClick: handleOnClick
135
- }, void 0, /*#__PURE__*/_jsx(Grid, {
108
+ }, /* @__PURE__ */ React2.createElement(Grid, {
136
109
  pl: "xxs",
137
110
  mt: "-2px"
138
- }, void 0, arrowIcon), /*#__PURE__*/_jsx(StyledLabel, {
111
+ }, arrowIcon), /* @__PURE__ */ React2.createElement(StyledLabel, {
139
112
  pb: "xxxs",
140
- "data-testid": labelDataTestId || 'leftnav-list-item-label',
141
- labelOverflow: labelOverflow,
142
- labelBold: labelBold,
143
- labelColor: labelColor
144
- }, void 0, labelOverflow === 'truncate' ? /*#__PURE__*/_jsx(SimpleTruncatedTooltipText, {
113
+ "data-testid": labelDataTestId || "leftnav-list-item-label",
114
+ labelOverflow,
115
+ labelBold,
116
+ labelColor
117
+ }, labelOverflow === "truncate" ? /* @__PURE__ */ React2.createElement(SimpleTruncatedTooltipText, {
145
118
  value: label,
146
119
  placement: "bottom-start"
147
- }) : label), /*#__PURE__*/_jsx(Grid, {
120
+ }) : label), /* @__PURE__ */ React2.createElement(Grid, {
148
121
  pr: "xxs2",
149
- cols: ['auto', 'auto'],
122
+ cols: ["auto", "auto"],
150
123
  alignItems: "center"
151
- }, void 0, /*#__PURE__*/_jsx(StyledDate, {
124
+ }, /* @__PURE__ */ React2.createElement(StyledDate, {
152
125
  ml: "xxs",
153
126
  "data-testid": "leftnav-list-item-date"
154
- }, void 0, labelRightSection), /*#__PURE__*/_jsx(Grid, {
155
- pl: RightComponent ? 'xxs' : '0px'
156
- }, void 0, RightComponent && /*#__PURE__*/_jsx(RightComponent, {
157
- ctx: ctx,
158
- item: item
127
+ }, labelRightSection), /* @__PURE__ */ React2.createElement(Grid, {
128
+ pl: RightComponent ? "xxs" : "0px"
129
+ }, RightComponent && /* @__PURE__ */ React2.createElement(RightComponent, {
130
+ ctx,
131
+ item
159
132
  }))));
160
133
  };
161
-
162
- export { ItemUncontrolledDrilldown };
134
+ export {
135
+ ItemUncontrolledDrilldown
136
+ };
137
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/ItemUncontrolledDrilldown/index.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React, { useMemo, useCallback, useEffect } from 'react';\nimport Grid from '@elliemae/ds-grid';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';\nimport { ItemRenderer, ITEM_TYPES } from '../../exported-related/index';\nimport { StyledLabel, StyledDate } from './styled';\nimport { ItemSeparator } from '../ItemSeparator';\nimport { ItemWithDate } from '../ItemWithDate';\nimport { ItemTextLabel } from '../ItemTextLabel';\nimport type { ComponentProps } from '../../index.d';\n\n// Subitem mapping\nconst outOfTheBoxSubitemsComponents: Record<string, React.ComponentType<ComponentProps>> = {\n [ITEM_TYPES.LEFT_NAV_ITEM_SEPARATOR]: ItemSeparator,\n [ITEM_TYPES.LEFT_NAV_ITEM_WITH_DATE]: ItemWithDate,\n [ITEM_TYPES.LEFT_NAV_ITEM_TEXT_LABEL]: ItemTextLabel,\n};\n\nconst OutOfTheBoxMapSubitem = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: { type, Component },\n ctx,\n } = props;\n\n if (typeof type === 'string' && !!outOfTheBoxSubitemsComponents[type]) {\n const OutOfTheBoxComponent = outOfTheBoxSubitemsComponents[type];\n const currentIndent = item.itemOpts?.indent ?? 0;\n const newItem = {\n ...item,\n itemOpts: { ...item.itemOpts, indent: currentIndent + 44 },\n };\n return <OutOfTheBoxComponent item={newItem} ctx={ctx} />;\n }\n // we expect an error to be threw if Component is not defined and type is not a valid out-of-the-box...\n return <Component item={item} ctx={ctx} />;\n};\n\nexport const ItemUncontrolledDrilldown = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: {\n label,\n RightComponent,\n labelRightSection,\n labelOverflow: itemLabelOverflow,\n labelBold,\n labelColor,\n startOpened,\n items,\n labelDataTestId,\n },\n },\n ctx,\n ctx: {\n leftNavProps: { labelOverflow: leftNavLabelOverflow },\n openedDrilldowns,\n setOpenedDrilldowns,\n },\n } = props;\n\n // Start opened functionality\n useEffect(() => {\n if (startOpened) setOpenedDrilldowns([...openedDrilldowns, dsId]);\n }, []);\n\n const opened = openedDrilldowns.includes(dsId);\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const arrowIcon = useMemo(() => {\n const Component = opened ? ArrowheadDown : ArrowheadRight;\n return <Component width=\"24px\" height=\"18px\" color={['brand-primary', '800']} />;\n }, [opened]);\n\n // Array of subitems\n const subitems = useMemo(() => {\n if (!opened || !items) return [];\n return items.map((subitem) => <OutOfTheBoxMapSubitem item={subitem} ctx={ctx} key={subitem.dsId} />);\n }, [items, opened]);\n\n const handleOnClick = useCallback(() => {\n if (opened) setOpenedDrilldowns(openedDrilldowns.filter((openedDrilldown) => openedDrilldown !== dsId));\n else setOpenedDrilldowns([...openedDrilldowns, dsId]);\n }, [opened, setOpenedDrilldowns, openedDrilldowns]);\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaExpanded: opened,\n ariaRole: 'menuitem',\n ...item.itemOpts,\n openable: !opened,\n closable: opened,\n },\n CollapsedComponent: null,\n }}\n subitems={subitems}\n minHeight=\"32px\"\n paddingTop=\"8px\"\n onClick={handleOnClick}\n >\n <Grid pl=\"xxs\" mt=\"-2px\">\n {arrowIcon}\n </Grid>\n <StyledLabel\n pb=\"xxxs\"\n data-testid={labelDataTestId || 'leftnav-list-item-label'}\n labelOverflow={labelOverflow}\n labelBold={labelBold}\n labelColor={labelColor}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledLabel>\n <Grid pr=\"xxs2\" cols={['auto', 'auto']} alignItems=\"center\">\n <StyledDate ml=\"xxs\" data-testid=\"leftnav-list-item-date\">\n {labelRightSection}\n </StyledDate>\n <Grid pl={RightComponent ? 'xxs' : '0px'}>{RightComponent && <RightComponent ctx={ctx} item={item} />}</Grid>\n </Grid>\n </ItemRenderer>\n );\n};\n"],
5
+ "mappings": "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",
6
+ "names": []
7
+ }
@@ -1,17 +1,20 @@
1
- import styled from 'styled-components';
2
- import Grid from '@elliemae/ds-grid';
3
-
4
- const StyledLabel = /*#__PURE__*/styled(Grid).withConfig({
5
- componentId: "sc-17rk89j-0"
6
- })(["font-size:13px;font-weight:", ";color:", ";line-height:14px;word-break:", ";"], props => props.labelBold ? props.theme.fontWeights.semibold : props.theme.fontWeights.regular, _ref => {
7
- let {
8
- labelColor,
9
- theme
10
- } = _ref;
11
- return labelColor ? theme.colors[labelColor[0]][labelColor[1]] : theme.colors.neutral[800];
12
- }, props => props.labelOverflow === 'wrapAll' ? 'break-all' : 'normal');
13
- const StyledDate = /*#__PURE__*/styled(Grid).withConfig({
14
- componentId: "sc-17rk89j-1"
15
- })(["font-size:12px;color:", ";line-height:14px;"], props => props.theme.colors.neutral[600]);
16
-
17
- export { StyledDate, StyledLabel };
1
+ import * as React from "react";
2
+ import styled from "styled-components";
3
+ import Grid from "@elliemae/ds-grid";
4
+ const StyledLabel = styled(Grid)`
5
+ font-size: 13px;
6
+ font-weight: ${(props) => props.labelBold ? props.theme.fontWeights.semibold : props.theme.fontWeights.regular};
7
+ color: ${({ labelColor, theme }) => labelColor ? theme.colors[labelColor[0]][labelColor[1]] : theme.colors.neutral[800]};
8
+ line-height: 14px;
9
+ word-break: ${(props) => props.labelOverflow === "wrapAll" ? "break-all" : "normal"};
10
+ `;
11
+ const StyledDate = styled(Grid)`
12
+ font-size: 12px;
13
+ color: ${(props) => props.theme.colors.neutral[600]};
14
+ line-height: 14px;
15
+ `;
16
+ export {
17
+ StyledDate,
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/ItemUncontrolledDrilldown/styled.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import styled from 'styled-components';\nimport Grid from '@elliemae/ds-grid';\n\nexport const StyledLabel = styled(Grid)<{ labelBold: boolean }>`\n font-size: 13px;\n font-weight: ${(props) =>\n props.labelBold\n ? props.theme.fontWeights.semibold\n : props.theme.fontWeights.regular};\n color: ${({ labelColor, theme }) =>\n labelColor\n ? theme.colors[labelColor[0]][labelColor[1]]\n : theme.colors.neutral[800]};\n line-height: 14px;\n word-break: ${(props) =>\n props.labelOverflow === 'wrapAll' ? 'break-all' : 'normal'};\n`;\n\nexport const StyledDate = styled(Grid)`\n font-size: 12px;\n color: ${(props) => props.theme.colors.neutral[600]};\n line-height: 14px;\n`;\n"],
5
+ "mappings": "AAAA;ACAA;AACA;AAEO,MAAM,cAAc,OAAO;AAAA;AAAA,iBAEjB,CAAC,UACd,MAAM,YACF,MAAM,MAAM,YAAY,WACxB,MAAM,MAAM,YAAY;AAAA,WACrB,CAAC,EAAE,YAAY,YACtB,aACI,MAAM,OAAO,WAAW,IAAI,WAAW,MACvC,MAAM,OAAO,QAAQ;AAAA;AAAA,gBAEb,CAAC,UACb,MAAM,kBAAkB,YAAY,cAAc;AAAA;AAG/C,MAAM,aAAa,OAAO;AAAA;AAAA,WAEtB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -1,25 +1,10 @@
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 { 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, StyledDate } from './styled.js';
16
-
17
- var _div;
18
-
19
- 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; }
20
-
21
- 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; }
22
- const ItemWithDate = props => {
1
+ import * as React from "react";
2
+ import React2 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, StyledDate } from "./styled";
7
+ const ItemWithDate = (props) => {
23
8
  const {
24
9
  item,
25
10
  item: {
@@ -35,42 +20,43 @@ const ItemWithDate = props => {
35
20
  },
36
21
  ctx,
37
22
  ctx: {
38
- leftNavProps: {
39
- labelOverflow: leftNavLabelOverflow
40
- }
23
+ leftNavProps: { labelOverflow: leftNavLabelOverflow }
41
24
  }
42
25
  } = props;
43
26
  const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;
44
- return /*#__PURE__*/_jsx(ItemRenderer, {
45
- item: _objectSpread(_objectSpread({}, item), {}, {
27
+ return /* @__PURE__ */ React2.createElement(ItemRenderer, {
28
+ item: {
29
+ ...item,
46
30
  CollapsedComponent: null
47
- }),
31
+ },
48
32
  minHeight: "32px",
49
33
  paddingTop: "8px"
50
- }, void 0, " ", _div || (_div = /*#__PURE__*/_jsx("div", {})), /*#__PURE__*/_jsx(StyledLabel, {
34
+ }, " ", /* @__PURE__ */ React2.createElement("div", null), /* @__PURE__ */ React2.createElement(StyledLabel, {
51
35
  pl: "xxs",
52
36
  pb: "xxxs",
53
- "data-testid": labelDataTestId || 'leftnav-list-item-label',
54
- labelOverflow: labelOverflow,
55
- labelBold: labelBold,
56
- labelColor: labelColor
57
- }, void 0, labelOverflow === 'truncate' ? /*#__PURE__*/_jsx(SimpleTruncatedTooltipText, {
37
+ "data-testid": labelDataTestId || "leftnav-list-item-label",
38
+ labelOverflow,
39
+ labelBold,
40
+ labelColor
41
+ }, labelOverflow === "truncate" ? /* @__PURE__ */ React2.createElement(SimpleTruncatedTooltipText, {
58
42
  value: label,
59
43
  placement: "bottom-start"
60
- }) : label), /*#__PURE__*/_jsx(Grid, {
44
+ }) : label), /* @__PURE__ */ React2.createElement(Grid, {
61
45
  pr: "xxs2",
62
- cols: ['auto', 'auto'],
46
+ cols: ["auto", "auto"],
63
47
  alignItems: "center"
64
- }, void 0, /*#__PURE__*/_jsx(StyledDate, {
48
+ }, /* @__PURE__ */ React2.createElement(StyledDate, {
65
49
  ml: "xxs",
66
50
  "data-testid": "leftnav-list-item-date"
67
- }, void 0, labelRightSection), /*#__PURE__*/_jsx(Grid, {
68
- pl: RightComponent ? 'xxs' : '0px',
51
+ }, labelRightSection), /* @__PURE__ */ React2.createElement(Grid, {
52
+ pl: RightComponent ? "xxs" : "0px",
69
53
  "data-testid": "leftnav-right-component"
70
- }, void 0, RightComponent && /*#__PURE__*/_jsx(RightComponent, {
71
- ctx: ctx,
72
- item: item
54
+ }, RightComponent && /* @__PURE__ */ React2.createElement(RightComponent, {
55
+ ctx,
56
+ item
73
57
  }))));
74
58
  };
75
-
76
- export { ItemWithDate };
59
+ export {
60
+ ItemWithDate
61
+ };
62
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/ItemWithDate/index.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React 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, StyledDate } from './styled';\n\nexport const ItemWithDate = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n itemOpts: {\n label,\n RightComponent,\n labelRightSection,\n labelOverflow: itemLabelOverflow,\n labelBold,\n labelColor,\n labelDataTestId,\n },\n },\n ctx,\n ctx: {\n leftNavProps: { labelOverflow: leftNavLabelOverflow },\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n return (\n <ItemRenderer\n item={{\n ...item,\n CollapsedComponent: null,\n }}\n minHeight=\"32px\"\n paddingTop=\"8px\"\n >\n {/* Empty LeftComponent */} <div />\n <StyledLabel\n pl=\"xxs\"\n pb=\"xxxs\"\n data-testid={labelDataTestId || 'leftnav-list-item-label'}\n labelOverflow={labelOverflow}\n labelBold={labelBold}\n labelColor={labelColor}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledLabel>\n <Grid pr=\"xxs2\" cols={['auto', 'auto']} alignItems=\"center\">\n <StyledDate ml=\"xxs\" data-testid=\"leftnav-list-item-date\">\n {labelRightSection}\n </StyledDate>\n <Grid pl={RightComponent ? 'xxs' : '0px'} data-testid=\"leftnav-right-component\">\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </Grid>\n </Grid>\n </ItemRenderer>\n );\n};\n"],
5
+ "mappings": "AAAA;ACAA;AACA;AACA;AACA;AAEA;AAEO,MAAM,eAAe,CAAC,UAAuC;AAClE,QAAM;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ,UAAU;AAAA,QACR;AAAA,QACA;AAAA,QACA;AAAA,QACA,eAAe;AAAA,QACf;AAAA,QACA;AAAA,QACA;AAAA;AAAA;AAAA,IAGJ;AAAA,IACA,KAAK;AAAA,MACH,cAAc,EAAE,eAAe;AAAA;AAAA,MAE/B;AAEJ,QAAM,gBAAgB,qBAAqB;AAE3C,SACE,qCAAC,cAAD;AAAA,IACE,MAAM;AAAA,SACD;AAAA,MACH,oBAAoB;AAAA;AAAA,IAEtB,WAAU;AAAA,IACV,YAAW;AAAA,KAEgB,KAAC,qCAAC,OAAD,OAC5B,qCAAC,aAAD;AAAA,IACE,IAAG;AAAA,IACH,IAAG;AAAA,IACH,eAAa,mBAAmB;AAAA,IAChC;AAAA,IACA;AAAA,IACA;AAAA,KAEC,kBAAkB,aAAa,qCAAC,4BAAD;AAAA,IAA4B,OAAO;AAAA,IAAO,WAAU;AAAA,OAAoB,QAE1G,qCAAC,MAAD;AAAA,IAAM,IAAG;AAAA,IAAO,MAAM,CAAC,QAAQ;AAAA,IAAS,YAAW;AAAA,KACjD,qCAAC,YAAD;AAAA,IAAY,IAAG;AAAA,IAAM,eAAY;AAAA,KAC9B,oBAEH,qCAAC,MAAD;AAAA,IAAM,IAAI,iBAAiB,QAAQ;AAAA,IAAO,eAAY;AAAA,KACnD,kBAAkB,qCAAC,gBAAD;AAAA,IAAgB;AAAA,IAAU;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -1,17 +1,20 @@
1
- import styled from 'styled-components';
2
- import Grid from '@elliemae/ds-grid';
3
-
4
- const StyledLabel = /*#__PURE__*/styled(Grid).withConfig({
5
- componentId: "sc-govmsc-0"
6
- })(["font-size:13px;font-weight:", ";color:", ";line-height:14px;word-break:", ";"], props => props.labelBold ? props.theme.fontWeights.semibold : props.theme.fontWeights.regular, _ref => {
7
- let {
8
- labelColor,
9
- theme
10
- } = _ref;
11
- return labelColor ? theme.colors[labelColor[0]][labelColor[1]] : theme.colors.neutral[800];
12
- }, props => props.labelOverflow === 'wrapAll' ? 'break-all' : 'normal');
13
- const StyledDate = /*#__PURE__*/styled(Grid).withConfig({
14
- componentId: "sc-govmsc-1"
15
- })(["font-size:12px;color:", ";line-height:14px;"], props => props.theme.colors.neutral[600]);
16
-
17
- export { StyledDate, StyledLabel };
1
+ import * as React from "react";
2
+ import styled from "styled-components";
3
+ import Grid from "@elliemae/ds-grid";
4
+ const StyledLabel = styled(Grid)`
5
+ font-size: 13px;
6
+ font-weight: ${(props) => props.labelBold ? props.theme.fontWeights.semibold : props.theme.fontWeights.regular};
7
+ color: ${({ labelColor, theme }) => labelColor ? theme.colors[labelColor[0]][labelColor[1]] : theme.colors.neutral[800]};
8
+ line-height: 14px;
9
+ word-break: ${(props) => props.labelOverflow === "wrapAll" ? "break-all" : "normal"};
10
+ `;
11
+ const StyledDate = styled(Grid)`
12
+ font-size: 12px;
13
+ color: ${(props) => props.theme.colors.neutral[600]};
14
+ line-height: 14px;
15
+ `;
16
+ export {
17
+ StyledDate,
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/ItemWithDate/styled.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import styled from 'styled-components';\nimport Grid from '@elliemae/ds-grid';\n\nexport const StyledLabel = styled(Grid)<{ labelBold: boolean }>`\n font-size: 13px;\n font-weight: ${(props) =>\n props.labelBold\n ? props.theme.fontWeights.semibold\n : props.theme.fontWeights.regular};\n color: ${({ labelColor, theme }) =>\n labelColor\n ? theme.colors[labelColor[0]][labelColor[1]]\n : theme.colors.neutral[800]};\n line-height: 14px;\n word-break: ${(props) =>\n props.labelOverflow === 'wrapAll' ? 'break-all' : 'normal'};\n`;\n\nexport const StyledDate = styled(Grid)`\n font-size: 12px;\n color: ${(props) => props.theme.colors.neutral[600]};\n line-height: 14px;\n`;\n"],
5
+ "mappings": "AAAA;ACAA;AACA;AAEO,MAAM,cAAc,OAAO;AAAA;AAAA,iBAEjB,CAAC,UACd,MAAM,YACF,MAAM,MAAM,YAAY,WACxB,MAAM,MAAM,YAAY;AAAA,WACrB,CAAC,EAAE,YAAY,YACtB,aACI,MAAM,OAAO,WAAW,IAAI,WAAW,MACvC,MAAM,OAAO,QAAQ;AAAA;AAAA,gBAEb,CAAC,UACb,MAAM,kBAAkB,YAAY,cAAc;AAAA;AAG/C,MAAM,aAAa,OAAO;AAAA;AAAA,WAEtB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -1,35 +1,23 @@
1
- import { ITEM_TYPES } from '../exported-related/constants.js';
2
- import '@babel/runtime/helpers/esm/jsx';
3
- import 'react';
4
- import '@elliemae/ds-grid';
5
- import 'styled-components';
6
- import 'core-js/modules/esnext.async-iterator.filter.js';
7
- import 'core-js/modules/esnext.iterator.constructor.js';
8
- import 'core-js/modules/esnext.iterator.filter.js';
9
- import 'core-js/modules/esnext.async-iterator.for-each.js';
10
- import 'core-js/modules/esnext.iterator.for-each.js';
11
- import '@babel/runtime/helpers/esm/defineProperty';
12
- import 'react/jsx-runtime';
13
- import '@elliemae/ds-icons';
14
- import { ItemControlledDrilldown } from './ItemControlledDrilldown/index.js';
15
- export { ItemControlledDrilldown } from './ItemControlledDrilldown/index.js';
16
- import { ItemUncontrolledDrilldown } from './ItemUncontrolledDrilldown/index.js';
17
- export { ItemUncontrolledDrilldown } from './ItemUncontrolledDrilldown/index.js';
18
- import { ItemHeader } from './ItemHeader/index.js';
19
- export { ItemHeader } from './ItemHeader/index.js';
20
- import { ItemLink } from './ItemLink/index.js';
21
- export { ItemLink } from './ItemLink/index.js';
22
- import { ItemSection } from './ItemSection/index.js';
23
- export { ItemSection } from './ItemSection/index.js';
24
- import { ItemSeparator } from './ItemSeparator/index.js';
25
- export { ItemSeparator } from './ItemSeparator/index.js';
26
- import { ItemSubmenu } from './ItemSubmenu/index.js';
27
- export { ItemSubmenu } from './ItemSubmenu/index.js';
28
- import { ItemTextLabel } from './ItemTextLabel/index.js';
29
- export { ItemTextLabel } from './ItemTextLabel/index.js';
30
- import { ItemWithDate } from './ItemWithDate/index.js';
31
- export { ItemWithDate } from './ItemWithDate/index.js';
32
-
1
+ import * as React from "react";
2
+ import { ITEM_TYPES } from "../exported-related";
3
+ import { ItemControlledDrilldown } from "./ItemControlledDrilldown";
4
+ import { ItemUncontrolledDrilldown } from "./ItemUncontrolledDrilldown";
5
+ import { ItemHeader } from "./ItemHeader";
6
+ import { ItemLink } from "./ItemLink";
7
+ import { ItemSection } from "./ItemSection";
8
+ import { ItemSeparator } from "./ItemSeparator";
9
+ import { ItemSubmenu } from "./ItemSubmenu";
10
+ import { ItemTextLabel } from "./ItemTextLabel";
11
+ import { ItemWithDate } from "./ItemWithDate";
12
+ export * from "./ItemControlledDrilldown";
13
+ export * from "./ItemUncontrolledDrilldown";
14
+ export * from "./ItemHeader";
15
+ export * from "./ItemLink";
16
+ export * from "./ItemSection";
17
+ export * from "./ItemSeparator";
18
+ export * from "./ItemSubmenu";
19
+ export * from "./ItemTextLabel";
20
+ export * from "./ItemWithDate";
33
21
  const outOfTheBoxTypes = Object.values(ITEM_TYPES);
34
22
  const {
35
23
  LEFT_NAV_ITEM_CONTROLLED_DRILLDOWN,
@@ -53,5 +41,8 @@ const outOfTheBoxComponents = {
53
41
  [LEFT_NAV_ITEM_TEXT_LABEL]: ItemTextLabel,
54
42
  [LEFT_NAV_ITEM_WITH_DATE]: ItemWithDate
55
43
  };
56
-
57
- export { outOfTheBoxComponents, outOfTheBoxTypes };
44
+ export {
45
+ outOfTheBoxComponents,
46
+ outOfTheBoxTypes
47
+ };
48
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/outOfTheBox/index.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { ComponentProps } from '../index.d';\nimport { ITEM_TYPES } from '../exported-related';\nimport { ItemControlledDrilldown } from './ItemControlledDrilldown';\nimport { ItemUncontrolledDrilldown } from './ItemUncontrolledDrilldown';\nimport { ItemHeader } from './ItemHeader';\nimport { ItemLink } from './ItemLink';\nimport { ItemSection } from './ItemSection';\nimport { ItemSeparator } from './ItemSeparator';\nimport { ItemSubmenu } from './ItemSubmenu';\nimport { ItemTextLabel } from './ItemTextLabel';\nimport { ItemWithDate } from './ItemWithDate';\n\nexport * from './ItemControlledDrilldown';\nexport * from './ItemUncontrolledDrilldown';\nexport * from './ItemHeader';\nexport * from './ItemLink';\nexport * from './ItemSection';\nexport * from './ItemSeparator';\nexport * from './ItemSubmenu';\nexport * from './ItemTextLabel';\nexport * from './ItemWithDate';\n\nexport const outOfTheBoxTypes = Object.values(ITEM_TYPES);\nconst {\n LEFT_NAV_ITEM_CONTROLLED_DRILLDOWN,\n LEFT_NAV_ITEM_UNCONTROLLED_DRILLDOWN,\n LEFT_NAV_ITEM_HEADER,\n LEFT_NAV_ITEM_LINK,\n LEFT_NAV_ITEM_SECTION,\n LEFT_NAV_ITEM_SEPARATOR,\n LEFT_NAV_ITEM_SUBMENU,\n LEFT_NAV_ITEM_TEXT_LABEL,\n LEFT_NAV_ITEM_WITH_DATE,\n} = ITEM_TYPES;\n\nexport const outOfTheBoxComponents: Record<\n string,\n React.ComponentType<ComponentProps>\n> = {\n [LEFT_NAV_ITEM_CONTROLLED_DRILLDOWN]: ItemControlledDrilldown,\n [LEFT_NAV_ITEM_UNCONTROLLED_DRILLDOWN]: ItemUncontrolledDrilldown,\n [LEFT_NAV_ITEM_HEADER]: ItemHeader,\n [LEFT_NAV_ITEM_LINK]: ItemLink,\n [LEFT_NAV_ITEM_SECTION]: ItemSection,\n [LEFT_NAV_ITEM_SEPARATOR]: ItemSeparator,\n [LEFT_NAV_ITEM_SUBMENU]: ItemSubmenu,\n [LEFT_NAV_ITEM_TEXT_LABEL]: ItemTextLabel,\n [LEFT_NAV_ITEM_WITH_DATE]: ItemWithDate,\n};\n"],
5
+ "mappings": "AAAA;ACEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEO,MAAM,mBAAmB,OAAO,OAAO;AAC9C,MAAM;AAAA,EACJ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,IACE;AAEG,MAAM,wBAGT;AAAA,GACD,qCAAqC;AAAA,GACrC,uCAAuC;AAAA,GACvC,uBAAuB;AAAA,GACvB,qBAAqB;AAAA,GACrB,wBAAwB;AAAA,GACxB,0BAA0B;AAAA,GAC1B,wBAAwB;AAAA,GACxB,2BAA2B;AAAA,GAC3B,0BAA0B;AAAA;",
6
+ "names": []
7
+ }