@elliemae/ds-left-navigation 2.2.0-alpha.3 → 3.0.0-next.0

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 +27 -49
  2. package/cjs/LeftNavigationContext.js +18 -44
  3. package/cjs/common/getItemBackgroundStyle.js +8 -47
  4. package/cjs/common/getLeftBorderStyle.js +8 -50
  5. package/cjs/common/getScrollbarStyle.js +4 -55
  6. package/cjs/common/index.js +13 -30
  7. package/cjs/configs/index.js +10 -38
  8. package/cjs/configs/useLeftNavConfig.js +76 -76
  9. package/cjs/configs/useLeftNavItems.js +64 -66
  10. package/cjs/configs/useLeftNavSmoothExpand.js +25 -43
  11. package/cjs/exported-related/ChevronItem/index.js +27 -42
  12. package/cjs/exported-related/Icon/index.js +34 -51
  13. package/cjs/exported-related/ItemRenderer/index.js +94 -99
  14. package/cjs/exported-related/ItemRenderer/styled.js +51 -83
  15. package/cjs/exported-related/ItemRenderer/usePropsWithDefaults.js +45 -57
  16. package/cjs/exported-related/Notifications/index.js +61 -81
  17. package/cjs/exported-related/OpenWindowItem/index.js +32 -49
  18. package/cjs/exported-related/constants.js +25 -53
  19. package/cjs/exported-related/index.js +23 -33
  20. package/cjs/hooks/index.js +13 -30
  21. package/cjs/hooks/useExpandableOnClickHandler.js +26 -55
  22. package/cjs/hooks/useKeyboardNavigation.js +54 -62
  23. package/cjs/hooks/useOpenableOnClickHandler.js +26 -55
  24. package/cjs/hooks/useSelectFirstBodyItem.js +34 -47
  25. package/cjs/index.d.js +2 -27
  26. package/cjs/index.js +30 -41
  27. package/cjs/outOfTheBox/ItemControlledDrilldown/index.js +103 -97
  28. package/cjs/outOfTheBox/ItemControlledDrilldown/styled.js +27 -49
  29. package/cjs/outOfTheBox/ItemHeader/index.js +93 -95
  30. package/cjs/outOfTheBox/ItemHeader/styled.js +22 -49
  31. package/cjs/outOfTheBox/ItemLink/index.js +67 -75
  32. package/cjs/outOfTheBox/ItemLink/styled.js +17 -41
  33. package/cjs/outOfTheBox/ItemSection/index.js +63 -59
  34. package/cjs/outOfTheBox/ItemSection/styled.js +23 -53
  35. package/cjs/outOfTheBox/ItemSeparator/index.js +45 -56
  36. package/cjs/outOfTheBox/ItemSubmenu/index.js +92 -95
  37. package/cjs/outOfTheBox/ItemSubmenu/styled.js +22 -49
  38. package/cjs/outOfTheBox/ItemTextLabel/index.js +52 -51
  39. package/cjs/outOfTheBox/ItemTextLabel/styled.js +23 -43
  40. package/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js +113 -107
  41. package/cjs/outOfTheBox/ItemUncontrolledDrilldown/styled.js +27 -49
  42. package/cjs/outOfTheBox/ItemWithDate/index.js +54 -59
  43. package/cjs/outOfTheBox/ItemWithDate/styled.js +27 -49
  44. package/cjs/outOfTheBox/index.js +50 -65
  45. package/cjs/parts/LeftNavContent/index.js +71 -75
  46. package/cjs/parts/LeftNavContent/styled.js +50 -110
  47. package/cjs/parts/LeftNavContentWithScrollbar/index.js +79 -89
  48. package/cjs/parts/LeftNavFooterItem/index.js +80 -97
  49. package/cjs/parts/LeftNavFooterItem/styled.js +34 -89
  50. package/cjs/parts/LeftNavLoading/index.js +33 -51
  51. package/cjs/parts/OutOfTheBoxMapItem.js +46 -49
  52. package/cjs/prop-types.js +39 -58
  53. package/esm/LeftNavigation.js +15 -17
  54. package/esm/LeftNavigationContext.js +11 -15
  55. package/esm/common/getItemBackgroundStyle.js +6 -20
  56. package/esm/common/getLeftBorderStyle.js +6 -23
  57. package/esm/common/getScrollbarStyle.js +2 -28
  58. package/esm/common/index.js +3 -5
  59. package/esm/configs/index.js +2 -9
  60. package/esm/configs/useLeftNavConfig.js +67 -47
  61. package/esm/configs/useLeftNavItems.js +55 -33
  62. package/esm/configs/useLeftNavSmoothExpand.js +16 -14
  63. package/esm/exported-related/ChevronItem/index.js +18 -13
  64. package/esm/exported-related/Icon/index.js +24 -21
  65. package/esm/exported-related/ItemRenderer/index.js +80 -65
  66. package/esm/exported-related/ItemRenderer/styled.js +42 -56
  67. package/esm/exported-related/ItemRenderer/usePropsWithDefaults.js +36 -27
  68. package/esm/exported-related/Notifications/index.js +50 -57
  69. package/esm/exported-related/OpenWindowItem/index.js +22 -20
  70. package/esm/exported-related/constants.js +17 -24
  71. package/esm/exported-related/index.js +6 -8
  72. package/esm/hooks/index.js +3 -5
  73. package/esm/hooks/useExpandableOnClickHandler.js +22 -26
  74. package/esm/hooks/useKeyboardNavigation.js +47 -30
  75. package/esm/hooks/useOpenableOnClickHandler.js +22 -26
  76. package/esm/hooks/useSelectFirstBodyItem.js +30 -18
  77. package/esm/index.d.js +1 -2
  78. package/esm/index.js +8 -12
  79. package/esm/outOfTheBox/ItemControlledDrilldown/index.js +87 -62
  80. package/esm/outOfTheBox/ItemControlledDrilldown/styled.js +17 -20
  81. package/esm/outOfTheBox/ItemHeader/index.js +82 -65
  82. package/esm/outOfTheBox/ItemHeader/styled.js +12 -20
  83. package/esm/outOfTheBox/ItemLink/index.js +57 -46
  84. package/esm/outOfTheBox/ItemLink/styled.js +8 -12
  85. package/esm/outOfTheBox/ItemSection/index.js +53 -30
  86. package/esm/outOfTheBox/ItemSection/styled.js +13 -24
  87. package/esm/outOfTheBox/ItemSeparator/index.js +35 -27
  88. package/esm/outOfTheBox/ItemSubmenu/index.js +81 -65
  89. package/esm/outOfTheBox/ItemSubmenu/styled.js +12 -20
  90. package/esm/outOfTheBox/ItemTextLabel/index.js +43 -22
  91. package/esm/outOfTheBox/ItemTextLabel/styled.js +14 -14
  92. package/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js +95 -70
  93. package/esm/outOfTheBox/ItemUncontrolledDrilldown/styled.js +17 -20
  94. package/esm/outOfTheBox/ItemWithDate/index.js +44 -30
  95. package/esm/outOfTheBox/ItemWithDate/styled.js +17 -20
  96. package/esm/outOfTheBox/index.js +34 -25
  97. package/esm/parts/LeftNavContent/index.js +64 -54
  98. package/esm/parts/LeftNavContent/styled.js +36 -81
  99. package/esm/parts/LeftNavContentWithScrollbar/index.js +64 -56
  100. package/esm/parts/LeftNavFooterItem/index.js +68 -73
  101. package/esm/parts/LeftNavFooterItem/styled.js +24 -63
  102. package/esm/parts/LeftNavLoading/index.js +22 -22
  103. package/esm/parts/OutOfTheBoxMapItem.js +35 -19
  104. package/esm/prop-types.js +29 -26
  105. package/package.json +6 -6
  106. package/types/LeftNavigationContext.d.ts +4 -4
  107. package/types/configs/useLeftNavSmoothExpand.d.ts +3 -3
  108. package/types/hooks/useSelectFirstBodyItem.d.ts +1 -1
  109. package/types/index.d.d.ts +5 -2
  110. package/cjs/LeftNavigation.js.map +0 -7
  111. package/cjs/LeftNavigationContext.js.map +0 -7
  112. package/cjs/common/getItemBackgroundStyle.js.map +0 -7
  113. package/cjs/common/getLeftBorderStyle.js.map +0 -7
  114. package/cjs/common/getScrollbarStyle.js.map +0 -7
  115. package/cjs/common/index.js.map +0 -7
  116. package/cjs/configs/index.js.map +0 -7
  117. package/cjs/configs/useLeftNavConfig.js.map +0 -7
  118. package/cjs/configs/useLeftNavItems.js.map +0 -7
  119. package/cjs/configs/useLeftNavSmoothExpand.js.map +0 -7
  120. package/cjs/exported-related/ChevronItem/index.js.map +0 -7
  121. package/cjs/exported-related/Icon/index.js.map +0 -7
  122. package/cjs/exported-related/ItemRenderer/index.js.map +0 -7
  123. package/cjs/exported-related/ItemRenderer/styled.js.map +0 -7
  124. package/cjs/exported-related/ItemRenderer/usePropsWithDefaults.js.map +0 -7
  125. package/cjs/exported-related/Notifications/index.js.map +0 -7
  126. package/cjs/exported-related/OpenWindowItem/index.js.map +0 -7
  127. package/cjs/exported-related/constants.js.map +0 -7
  128. package/cjs/exported-related/index.js.map +0 -7
  129. package/cjs/hooks/index.js.map +0 -7
  130. package/cjs/hooks/useExpandableOnClickHandler.js.map +0 -7
  131. package/cjs/hooks/useKeyboardNavigation.js.map +0 -7
  132. package/cjs/hooks/useOpenableOnClickHandler.js.map +0 -7
  133. package/cjs/hooks/useSelectFirstBodyItem.js.map +0 -7
  134. package/cjs/index.d.js.map +0 -7
  135. package/cjs/index.js.map +0 -7
  136. package/cjs/outOfTheBox/ItemControlledDrilldown/index.js.map +0 -7
  137. package/cjs/outOfTheBox/ItemControlledDrilldown/styled.js.map +0 -7
  138. package/cjs/outOfTheBox/ItemHeader/index.js.map +0 -7
  139. package/cjs/outOfTheBox/ItemHeader/styled.js.map +0 -7
  140. package/cjs/outOfTheBox/ItemLink/index.js.map +0 -7
  141. package/cjs/outOfTheBox/ItemLink/styled.js.map +0 -7
  142. package/cjs/outOfTheBox/ItemSection/index.js.map +0 -7
  143. package/cjs/outOfTheBox/ItemSection/styled.js.map +0 -7
  144. package/cjs/outOfTheBox/ItemSeparator/index.js.map +0 -7
  145. package/cjs/outOfTheBox/ItemSubmenu/index.js.map +0 -7
  146. package/cjs/outOfTheBox/ItemSubmenu/styled.js.map +0 -7
  147. package/cjs/outOfTheBox/ItemTextLabel/index.js.map +0 -7
  148. package/cjs/outOfTheBox/ItemTextLabel/styled.js.map +0 -7
  149. package/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +0 -7
  150. package/cjs/outOfTheBox/ItemUncontrolledDrilldown/styled.js.map +0 -7
  151. package/cjs/outOfTheBox/ItemWithDate/index.js.map +0 -7
  152. package/cjs/outOfTheBox/ItemWithDate/styled.js.map +0 -7
  153. package/cjs/outOfTheBox/index.js.map +0 -7
  154. package/cjs/parts/LeftNavContent/index.js.map +0 -7
  155. package/cjs/parts/LeftNavContent/styled.js.map +0 -7
  156. package/cjs/parts/LeftNavContentWithScrollbar/index.js.map +0 -7
  157. package/cjs/parts/LeftNavFooterItem/index.js.map +0 -7
  158. package/cjs/parts/LeftNavFooterItem/styled.js.map +0 -7
  159. package/cjs/parts/LeftNavLoading/index.js.map +0 -7
  160. package/cjs/parts/OutOfTheBoxMapItem.js.map +0 -7
  161. package/cjs/prop-types.js.map +0 -7
  162. package/esm/LeftNavigation.js.map +0 -7
  163. package/esm/LeftNavigationContext.js.map +0 -7
  164. package/esm/common/getItemBackgroundStyle.js.map +0 -7
  165. package/esm/common/getLeftBorderStyle.js.map +0 -7
  166. package/esm/common/getScrollbarStyle.js.map +0 -7
  167. package/esm/common/index.js.map +0 -7
  168. package/esm/configs/index.js.map +0 -7
  169. package/esm/configs/useLeftNavConfig.js.map +0 -7
  170. package/esm/configs/useLeftNavItems.js.map +0 -7
  171. package/esm/configs/useLeftNavSmoothExpand.js.map +0 -7
  172. package/esm/exported-related/ChevronItem/index.js.map +0 -7
  173. package/esm/exported-related/Icon/index.js.map +0 -7
  174. package/esm/exported-related/ItemRenderer/index.js.map +0 -7
  175. package/esm/exported-related/ItemRenderer/styled.js.map +0 -7
  176. package/esm/exported-related/ItemRenderer/usePropsWithDefaults.js.map +0 -7
  177. package/esm/exported-related/Notifications/index.js.map +0 -7
  178. package/esm/exported-related/OpenWindowItem/index.js.map +0 -7
  179. package/esm/exported-related/constants.js.map +0 -7
  180. package/esm/exported-related/index.js.map +0 -7
  181. package/esm/hooks/index.js.map +0 -7
  182. package/esm/hooks/useExpandableOnClickHandler.js.map +0 -7
  183. package/esm/hooks/useKeyboardNavigation.js.map +0 -7
  184. package/esm/hooks/useOpenableOnClickHandler.js.map +0 -7
  185. package/esm/hooks/useSelectFirstBodyItem.js.map +0 -7
  186. package/esm/index.d.js.map +0 -7
  187. package/esm/index.js.map +0 -7
  188. package/esm/outOfTheBox/ItemControlledDrilldown/index.js.map +0 -7
  189. package/esm/outOfTheBox/ItemControlledDrilldown/styled.js.map +0 -7
  190. package/esm/outOfTheBox/ItemHeader/index.js.map +0 -7
  191. package/esm/outOfTheBox/ItemHeader/styled.js.map +0 -7
  192. package/esm/outOfTheBox/ItemLink/index.js.map +0 -7
  193. package/esm/outOfTheBox/ItemLink/styled.js.map +0 -7
  194. package/esm/outOfTheBox/ItemSection/index.js.map +0 -7
  195. package/esm/outOfTheBox/ItemSection/styled.js.map +0 -7
  196. package/esm/outOfTheBox/ItemSeparator/index.js.map +0 -7
  197. package/esm/outOfTheBox/ItemSubmenu/index.js.map +0 -7
  198. package/esm/outOfTheBox/ItemSubmenu/styled.js.map +0 -7
  199. package/esm/outOfTheBox/ItemTextLabel/index.js.map +0 -7
  200. package/esm/outOfTheBox/ItemTextLabel/styled.js.map +0 -7
  201. package/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +0 -7
  202. package/esm/outOfTheBox/ItemUncontrolledDrilldown/styled.js.map +0 -7
  203. package/esm/outOfTheBox/ItemWithDate/index.js.map +0 -7
  204. package/esm/outOfTheBox/ItemWithDate/styled.js.map +0 -7
  205. package/esm/outOfTheBox/index.js.map +0 -7
  206. package/esm/parts/LeftNavContent/index.js.map +0 -7
  207. package/esm/parts/LeftNavContent/styled.js.map +0 -7
  208. package/esm/parts/LeftNavContentWithScrollbar/index.js.map +0 -7
  209. package/esm/parts/LeftNavFooterItem/index.js.map +0 -7
  210. package/esm/parts/LeftNavFooterItem/styled.js.map +0 -7
  211. package/esm/parts/LeftNavLoading/index.js.map +0 -7
  212. package/esm/parts/OutOfTheBoxMapItem.js.map +0 -7
  213. package/esm/prop-types.js.map +0 -7
package/esm/prop-types.js CHANGED
@@ -1,37 +1,40 @@
1
- import * as React from "react";
2
- import { PropTypes, describe } from "react-desc";
3
- import { outOfTheBoxTypes } from "./outOfTheBox";
1
+ import { PropTypes, describe } from 'react-desc';
2
+ import { outOfTheBoxTypes } from './outOfTheBox/index.js';
3
+
4
4
  const leftNavItemProps = {
5
- type: PropTypes.oneOf(outOfTheBoxTypes).description("out of the box types"),
6
- dsId: PropTypes.string.description("unique identifier for the left nav item"),
5
+ type: PropTypes.oneOf(outOfTheBoxTypes).description('out of the box types'),
6
+ dsId: PropTypes.string.description('unique identifier for the left nav item'),
7
7
  Component: PropTypes.func.description("A custom component, receives the item as prop. This is used only when type is not defined or doesn't matches any out-of-the-box"),
8
- CollapsedComponent: PropTypes.func.description("A component which is renderer when the left-nav is collapsed"),
9
- itemOpts: PropTypes.object.description("Item options")
8
+ CollapsedComponent: PropTypes.func.description('A component which is renderer when the left-nav is collapsed'),
9
+ itemOpts: PropTypes.object.description('Item options')
10
10
  };
11
11
  const leftNavigationProps = {
12
- containerProps: PropTypes.shape({ expandedWidth: PropTypes.string }).description("Set of Properties attached to the main container").defaultValue({ expandedWidth: "240px" }),
13
- expanded: PropTypes.bool.description("Whether to show the left navigation expanded or collapsed").defaultValue(false),
14
- loading: PropTypes.bool.description("Whether the left-nav is loading").defaultValue(false),
15
- tabIndex: PropTypes.number.description("Tab index").defaultValue(0),
16
- openedItem: PropTypes.string.description("The id of the left navigation item you want to be opened").defaultValue(null),
17
- footerLabel: PropTypes.string.description("The label to show in the footer item"),
18
- onFooterExpand: PropTypes.func.description("The function to call when the left-nav is opened via the footer"),
19
- onFooterClose: PropTypes.func.description("The function to call when the left-nav is closed via the footer"),
20
- onSelectedChange: PropTypes.func.description("A callback which triggers when the selected item changes").defaultValue(() => null),
21
- onFocusChange: PropTypes.func.description("A callback which triggers when the focused item changes").defaultValue(() => null),
22
- items: PropTypes.arrayOf(PropTypes.object).description("The array of items you want to render inside the left nav").defaultValue([]),
23
- disableDefaultSelection: PropTypes.bool.description("Whether you do not want to automatically select the first body item").defaultValue(false)
12
+ containerProps: PropTypes.shape({
13
+ expandedWidth: PropTypes.string
14
+ }).description('Set of Properties attached to the main container').defaultValue({
15
+ expandedWidth: '240px'
16
+ }),
17
+ expanded: PropTypes.bool.description('Whether to show the left navigation expanded or collapsed').defaultValue(false),
18
+ loading: PropTypes.bool.description('Whether the left-nav is loading').defaultValue(false),
19
+ tabIndex: PropTypes.number.description('Tab index').defaultValue(0),
20
+ openedItem: PropTypes.string.description('The id of the left navigation item you want to be opened').defaultValue(null),
21
+ footerLabel: PropTypes.string.description('The label to show in the footer item'),
22
+ onFooterExpand: PropTypes.func.description('The function to call when the left-nav is opened via the footer'),
23
+ onFooterClose: PropTypes.func.description('The function to call when the left-nav is closed via the footer'),
24
+ onSelectedChange: PropTypes.func.description('A callback which triggers when the selected item changes').defaultValue(() => null),
25
+ onFocusChange: PropTypes.func.description('A callback which triggers when the focused item changes').defaultValue(() => null),
26
+ items: PropTypes.arrayOf(PropTypes.object).description('The array of items you want to render inside the left nav').defaultValue([]),
27
+ disableDefaultSelection: PropTypes.bool.description('Whether you do not want to automatically select the first body item').defaultValue(false)
24
28
  };
29
+
25
30
  const LeftNavItemProps = () => null;
31
+
26
32
  const LeftNavItemPropsSchema = describe(LeftNavItemProps);
27
33
  LeftNavItemPropsSchema.propTypes = leftNavItemProps;
34
+
28
35
  const LeftNavItemOptions = () => null;
36
+
29
37
  const LeftNavItemOptionsSchema = describe(LeftNavItemOptions);
30
38
  LeftNavItemOptionsSchema.propTypes = leftNavItemProps;
31
- export {
32
- LeftNavItemOptionsSchema,
33
- LeftNavItemPropsSchema,
34
- leftNavItemProps,
35
- leftNavigationProps
36
- };
37
- //# sourceMappingURL=prop-types.js.map
39
+
40
+ export { LeftNavItemOptionsSchema, LeftNavItemPropsSchema, leftNavItemProps, leftNavigationProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-left-navigation",
3
- "version": "2.2.0-alpha.3",
3
+ "version": "3.0.0-next.0",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Left Navigation",
6
6
  "module": "./esm/index.js",
@@ -233,11 +233,11 @@
233
233
  "generateSubmodules": true
234
234
  },
235
235
  "dependencies": {
236
- "@elliemae/ds-circular-progress-indicator": "2.2.0-alpha.3",
237
- "@elliemae/ds-grid": "2.2.0-alpha.3",
238
- "@elliemae/ds-icons": "2.2.0-alpha.3",
239
- "@elliemae/ds-system": "2.2.0-alpha.3",
240
- "@elliemae/ds-truncated-tooltip-text": "2.2.0-alpha.3",
236
+ "@elliemae/ds-circular-progress-indicator": "3.0.0-next.0",
237
+ "@elliemae/ds-grid": "3.0.0-next.0",
238
+ "@elliemae/ds-icons": "3.0.0-next.0",
239
+ "@elliemae/ds-system": "3.0.0-next.0",
240
+ "@elliemae/ds-truncated-tooltip-text": "3.0.0-next.0",
241
241
  "overlayscrollbars": "1.13.1",
242
242
  "prop-types": "~15.7.2",
243
243
  "react-desc": "~4.1.3"
@@ -1,10 +1,10 @@
1
1
  import React, { MutableRefObject, RefObject } from 'react';
2
2
  import type { LeftNavProps } from './index.d';
3
3
  export declare type ContextProps = {
4
- selectedItem: string;
5
- setSelectedItem: React.Dispatch<React.SetStateAction<string>>;
6
- focusedItem: string;
7
- setFocusedItem: React.Dispatch<React.SetStateAction<string>>;
4
+ selectedItem: string | null;
5
+ setSelectedItem: React.Dispatch<React.SetStateAction<string | null>>;
6
+ focusedItem: string | null;
7
+ setFocusedItem: React.Dispatch<React.SetStateAction<string | null>>;
8
8
  openedDrilldowns: string[];
9
9
  setOpenedDrilldowns: React.Dispatch<React.SetStateAction<string[]>>;
10
10
  visibleItems: string[];
@@ -1,10 +1,10 @@
1
1
  /// <reference types="node" />
2
2
  import React from 'react';
3
3
  import type { LeftNavProps } from '../index.d';
4
- interface smoothExpandOptsT {
4
+ interface SmoothExpandOptsT {
5
5
  expandedForAnimation: boolean;
6
- timeoutRef: React.MutableRefObject<NodeJS.Timeout>;
6
+ timeoutRef: React.MutableRefObject<NodeJS.Timeout | null>;
7
7
  setExpandedForAnimation: React.Dispatch<React.SetStateAction<boolean>>;
8
8
  }
9
- export declare const useLeftNavSmoothExpand: (props: LeftNavProps, smoothExpandOpts: smoothExpandOptsT) => void;
9
+ export declare const useLeftNavSmoothExpand: (props: LeftNavProps, smoothExpandOpts: SmoothExpandOptsT) => void;
10
10
  export default useLeftNavSmoothExpand;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
2
  import { GenericItemItemProps } from '../index.d';
3
- export declare const useSelectFirstBodyItem: (items: GenericItemItemProps[], openedItem: string, selectedItem: string, setSelectedItem: React.Dispatch<React.SetStateAction<string>>, disableDefaultSelection: boolean) => void;
3
+ export declare const useSelectFirstBodyItem: (items: GenericItemItemProps[], openedItem: string | null, selectedItem: string | null, setSelectedItem: React.Dispatch<React.SetStateAction<string | null>>, disableDefaultSelection: boolean | undefined) => void;
@@ -8,8 +8,8 @@ export interface LeftNavProps {
8
8
  items: GenericItemItemProps[];
9
9
  footerLabel: string;
10
10
  labelOverflow: LabelOveflowT;
11
- onSelectedChange: (item: string) => void;
12
- onFocusChange: (item: string) => void;
11
+ onSelectedChange: (item: string | null) => void;
12
+ onFocusChange: (item: string | null) => void;
13
13
  onFooterExpand: () => void;
14
14
  onFooterClose: () => void;
15
15
  onItemClick: (item: GenericItemItemProps, e: React.MouseEvent<HTMLElement>) => void;
@@ -21,6 +21,9 @@ export interface LeftNavProps {
21
21
  selectedParent?: string;
22
22
  disableDefaultSelection?: boolean;
23
23
  withoutBodyShadow?: boolean;
24
+ actionRef?: React.RefObject<{
25
+ setFocusedItem: React.Dispatch<React.SetStateAction<string | null>>;
26
+ }>;
24
27
  }
25
28
  export declare type OutOfTheBoxT = 'ds-left-nav-item-header' | 'ds-left-nav-item-link' | 'ds-left-nav-item-submenu' | 'ds-left-nav-item-controlled-drilldown' | 'ds-left-nav-item-uncontrolled-drilldown' | 'ds-left-nav-item-section' | 'ds-left-nav-item-separator' | 'ds-left-nav-item-text-label' | 'ds-left-nav-item-with-date';
26
29
  export interface itemOptsT {
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/LeftNavigation.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { describe } from 'react-desc';\nimport { leftNavigationProps } from './prop-types';\nimport LeftNavigationContext, { defaultProps } from './LeftNavigationContext';\nimport { useLeftNavConfig } from './configs/useLeftNavConfig';\nimport LeftNavContent from './parts/LeftNavContent';\nimport type { LeftNavProps } from './index.d';\n\nexport const LeftNavigation = (props: LeftNavProps): JSX.Element => {\n const leftNavConfig = useLeftNavConfig(props);\n\n return (\n <LeftNavigationContext.Provider value={leftNavConfig}>\n <LeftNavContent />\n </LeftNavigationContext.Provider>\n );\n};\n\nLeftNavigation.propTypes = leftNavigationProps;\nLeftNavigation.defaultProps = defaultProps;\n\nexport const LeftNavigationWithSchema = describe(LeftNavigation).description('Left Navigation');\nLeftNavigationWithSchema.propTypes = leftNavigationProps;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAyB;AACzB,wBAAoC;AACpC,mCAAoD;AACpD,8BAAiC;AACjC,4BAA2B;AAGpB,MAAM,iBAAiB,CAAC,UAAqC;AAClE,QAAM,gBAAgB,8CAAiB;AAEvC,SACE,mDAAC,qCAAsB,UAAvB;AAAA,IAAgC,OAAO;AAAA,KACrC,mDAAC,+BAAD;AAAA;AAKN,eAAe,YAAY;AAC3B,eAAe,eAAe;AAEvB,MAAM,2BAA2B,gCAAS,gBAAgB,YAAY;AAC7E,yBAAyB,YAAY;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/LeftNavigationContext.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { createContext, MutableRefObject, RefObject } from 'react';\nimport type { LeftNavProps, LabelOveflowT } from './index.d';\n\nexport type ContextProps = {\n selectedItem: string;\n setSelectedItem: React.Dispatch<React.SetStateAction<string>>;\n focusedItem: string;\n setFocusedItem: React.Dispatch<React.SetStateAction<string>>;\n openedDrilldowns: string[];\n setOpenedDrilldowns: React.Dispatch<React.SetStateAction<string[]>>;\n visibleItems: string[];\n visibleItemsRefs: MutableRefObject<Record<string, RefObject<HTMLElement>>>;\n leftNavProps: LeftNavProps;\n expandedForAnimation: boolean;\n};\n\nexport const defaultProps: LeftNavProps = {\n expandedWidth: '240px',\n tabIndex: 0,\n loading: false,\n expanded: false,\n openedItem: null,\n footerLabel: '',\n onSelectedChange: () => null,\n onFocusChange: () => null,\n onFooterExpand: () => null,\n onFooterClose: () => null,\n items: [],\n labelOverflow: 'wrap' as LabelOveflowT,\n onItemClick: () => null,\n};\n\nexport const defaultContext: ContextProps = {\n leftNavProps: defaultProps,\n selectedItem: null,\n setSelectedItem: () => null,\n focusedItem: null,\n setFocusedItem: () => null,\n expandedForAnimation: true,\n openedDrilldowns: [],\n setOpenedDrilldowns: () => null,\n visibleItems: [],\n visibleItemsRefs: { current: {} },\n};\n\nexport const LeftNavContext = createContext<ContextProps>(defaultContext);\n\nexport default LeftNavContext;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkE;AAgB3D,MAAM,eAA6B;AAAA,EACxC,eAAe;AAAA,EACf,UAAU;AAAA,EACV,SAAS;AAAA,EACT,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,kBAAkB,MAAM;AAAA,EACxB,eAAe,MAAM;AAAA,EACrB,gBAAgB,MAAM;AAAA,EACtB,eAAe,MAAM;AAAA,EACrB,OAAO;AAAA,EACP,eAAe;AAAA,EACf,aAAa,MAAM;AAAA;AAGd,MAAM,iBAA+B;AAAA,EAC1C,cAAc;AAAA,EACd,cAAc;AAAA,EACd,iBAAiB,MAAM;AAAA,EACvB,aAAa;AAAA,EACb,gBAAgB,MAAM;AAAA,EACtB,sBAAsB;AAAA,EACtB,kBAAkB;AAAA,EAClB,qBAAqB,MAAM;AAAA,EAC3B,cAAc;AAAA,EACd,kBAAkB,EAAE,SAAS;AAAA;AAGxB,MAAM,iBAAiB,gCAA4B;AAE1D,IAAO,gCAAQ;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/common/getItemBackgroundStyle.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["const commonItemBackgroundStyle = (\n color: string,\n hoverColor: string,\n activeColor: string,\n): string => `\n\n background: ${color};\n\n :hover {\n background: ${hoverColor};\n }\n\n :active {\n background: ${activeColor};\n }\n`;\n\nexport const getItemBackgroundStyle = (props: {\n theme: any;\n selected: boolean;\n opened: boolean;\n}): string => {\n if (props.selected && !props.opened)\n return commonItemBackgroundStyle(\n props.theme.colors.brand[200],\n props.theme.colors.brand[200],\n props.theme.colors.brand[200],\n );\n\n return commonItemBackgroundStyle(\n props.theme.colors.neutral['000'],\n props.theme.colors.neutral['080'],\n props.theme.colors.brand[200],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,MAAM,4BAA4B,CAChC,OACA,YACA,gBACW;AAAA;AAAA,gBAEG;AAAA;AAAA;AAAA,kBAGE;AAAA;AAAA;AAAA;AAAA,kBAIA;AAAA;AAAA;AAIX,MAAM,yBAAyB,CAAC,UAIzB;AACZ,MAAI,MAAM,YAAY,CAAC,MAAM;AAC3B,WAAO,0BACL,MAAM,MAAM,OAAO,MAAM,MACzB,MAAM,MAAM,OAAO,MAAM,MACzB,MAAM,MAAM,OAAO,MAAM;AAG7B,SAAO,0BACL,MAAM,MAAM,OAAO,QAAQ,QAC3B,MAAM,MAAM,OAAO,QAAQ,QAC3B,MAAM,MAAM,OAAO,MAAM;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/common/getLeftBorderStyle.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["const commonLeftBorderStyle = (\n color: string,\n hoverColor: string,\n activeColor: string,\n): string => `\n\n -webkit-box-shadow: inset 4px 0 0 0 ${color};\n box-shadow: inset 4px 0 0 0 ${color};\n\n :hover {\n -webkit-box-shadow: inset 4px 0 0 0 ${hoverColor};\n box-shadow: inset 4px 0 0 0 ${hoverColor};\n }\n\n :active {\n -webkit-box-shadow: inset 4px 0 0 0 ${activeColor};\n box-shadow: inset 4px 0 0 0 ${activeColor};\n }\n`;\n\nexport const getLeftBorderStyle = (props: {\n theme: any;\n selected: boolean;\n}): string => {\n if (props.selected || props.selectedParent)\n return commonLeftBorderStyle(\n props.theme.colors.brand[400],\n props.theme.colors.brand[400],\n props.theme.colors.brand[400],\n );\n\n return commonLeftBorderStyle(\n props.theme.colors.neutral['000'],\n props.theme.colors.brand[300],\n props.theme.colors.brand[400],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,MAAM,wBAAwB,CAC5B,OACA,YACA,gBACW;AAAA;AAAA,wCAE2B;AAAA,wCACA;AAAA;AAAA;AAAA,0CAGE;AAAA,0CACA;AAAA;AAAA;AAAA;AAAA,0CAIA;AAAA,0CACA;AAAA;AAAA;AAInC,MAAM,qBAAqB,CAAC,UAGrB;AACZ,MAAI,MAAM,YAAY,MAAM;AAC1B,WAAO,sBACL,MAAM,MAAM,OAAO,MAAM,MACzB,MAAM,MAAM,OAAO,MAAM,MACzB,MAAM,MAAM,OAAO,MAAM;AAG7B,SAAO,sBACL,MAAM,MAAM,OAAO,QAAQ,QAC3B,MAAM,MAAM,OAAO,MAAM,MACzB,MAAM,MAAM,OAAO,MAAM;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/common/getScrollbarStyle.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export const getScrolbarStyle = (): string => `\n ::-webkit-scrollbar {\n width: 14px;\n }\n ::-webkit-scrollbar-thumb {\n height: 6px;\n border: 4px solid rgba(0, 0, 0, 0);\n\n background-clip: padding-box;\n\n background-color: rgba(105, 116, 137, 0.5);\n\n border-radius: 7px;\n -webkit-border-radius: 7px;\n }\n ::-webkit-scrollbar-button {\n width: 0;\n height: 0;\n display: none;\n }\n ::-webkit-scrollbar-corner {\n background-color: transparent;\n }\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,mBAAmB,MAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/common/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export * from './getItemBackgroundStyle';\nexport * from './getLeftBorderStyle';\nexport * from './getScrollbarStyle';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA,YAAuB;ADAvB,2BAAc;AACd,2BAAc;AACd,2BAAc;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/configs/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { useLeftNavConfig } from './useLeftNavConfig';\n\nexport { useLeftNavConfig } from './useLeftNavConfig';\nexport default useLeftNavConfig;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAAiC;AAEjC,+BAAiC;AACjC,IAAO,kBAAQ;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/configs/useLeftNavConfig.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport type { LeftNavProps } from '../index.d';\nimport { ContextProps } from '../LeftNavigationContext';\nimport useLeftNavItems from './useLeftNavItems';\nimport { useLeftNavSmoothExpand } from './useLeftNavSmoothExpand';\nimport { useSelectFirstBodyItem } from '../hooks/useSelectFirstBodyItem';\n\nexport const useLeftNavConfig = (props: LeftNavProps): ContextProps => {\n const { expanded, openedItem, onSelectedChange, onFocusChange, items } = props;\n\n // -----------------------------------------------------------------------------\n // ************************** ------------ **************************\n // * INTERNAL STATE *\n // ************************** ------------ **************************\n // Selection related\n const [selectedItem, setSelectedItem] = React.useState(null);\n const [selectedSubitem, setSelectedSubitem] = React.useState(null);\n const [selectedParent, setSelectedParent] = React.useState(null);\n // Focus related\n const [focusedItem, setFocusedItem] = React.useState(null);\n // Opened uncontrolled drilldowns\n const [openedDrilldowns, setOpenedDrilldowns] = React.useState<string[]>([]);\n\n // -----------------------------------------------------------------------------\n // ************************** ------------ **************************\n // * EXPAND ANIMATION *\n // ************************** ------------ **************************\n const [expandedForAnimation, setExpandedForAnimation] = React.useState(expanded);\n const timeoutRef = React.useRef<ReturnType<typeof setTimeout>>(null);\n const smoothExpandOpts = React.useMemo(\n () => ({\n expandedForAnimation,\n timeoutRef,\n setExpandedForAnimation,\n }),\n [expandedForAnimation, timeoutRef, setExpandedForAnimation],\n );\n useLeftNavSmoothExpand(props, smoothExpandOpts);\n\n // -----------------------------------------------------------------------------\n // ************************** ------------ **************************\n // * SIDE EFFECTS *\n // ************************** ------------ **************************\n React.useEffect(() => {\n onSelectedChange(selectedItem);\n }, [selectedItem, onSelectedChange]);\n\n React.useEffect(() => {\n if (openedItem !== null) setSelectedParent(openedItem);\n }, [openedItem]);\n\n React.useEffect(() => {\n onFocusChange(focusedItem);\n }, [focusedItem, onFocusChange]);\n\n useSelectFirstBodyItem(\n items,\n openedItem,\n props.selectedItem !== undefined ? props.selectedItem : selectedItem,\n setSelectedItem,\n props.disableDefaultSelection,\n );\n\n // -----------------------------------------------------------------------------\n // ************************** ------------ **************************\n // * ITEMS MANAGEMENT *\n // ************************** ------------ **************************\n\n const leftNavItemsProps = React.useMemo(\n () => ({\n headerItem: props.HeaderComponent,\n bodyHeaderItem: props.BodyHeaderComponent,\n items: props.items,\n openedDrilldowns,\n }),\n [props.HeaderComponent, props.BodyHeaderComponent, props.items, openedDrilldowns],\n );\n\n // We need to know the current visible items since we have drilldowns\n const { visibleItems, visibleItemsRefs } = useLeftNavItems(leftNavItemsProps);\n\n // -----------------------------------------------------------------------------\n // ************************** ------------ **************************\n // * LEFTNAV CONFIG *\n // ************************** ------------ **************************\n const finalConfig = React.useMemo(\n () => ({\n leftNavProps: props,\n expandedForAnimation,\n selectedItem: props.selectedItem !== undefined ? props.selectedItem : selectedItem,\n setSelectedItem,\n selectedParent: props.selectedParent !== undefined ? props.selectedParent : selectedParent,\n setSelectedParent,\n focusedItem,\n setFocusedItem,\n openedDrilldowns,\n setOpenedDrilldowns,\n visibleItems,\n visibleItemsRefs,\n }),\n [\n props,\n expandedForAnimation,\n selectedItem,\n setSelectedItem,\n setSelectedParent,\n selectedParent,\n focusedItem,\n setFocusedItem,\n openedDrilldowns,\n setOpenedDrilldowns,\n visibleItems,\n visibleItemsRefs,\n ],\n );\n\n return finalConfig;\n};\n\nexport default useLeftNavConfig;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAGlB,6BAA4B;AAC5B,oCAAuC;AACvC,oCAAuC;AAEhC,MAAM,mBAAmB,CAAC,UAAsC;AACrE,QAAM,EAAE,UAAU,YAAY,kBAAkB,eAAe,UAAU;AAOzE,QAAM,CAAC,cAAc,mBAAmB,qBAAM,SAAS;AACvD,QAAM,CAAC,iBAAiB,sBAAsB,qBAAM,SAAS;AAC7D,QAAM,CAAC,gBAAgB,qBAAqB,qBAAM,SAAS;AAE3D,QAAM,CAAC,aAAa,kBAAkB,qBAAM,SAAS;AAErD,QAAM,CAAC,kBAAkB,uBAAuB,q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- "sources": ["../../../src/configs/useLeftNavItems.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable complexity */\nimport { createRef, MutableRefObject, RefObject, useMemo, useRef } from 'react';\nimport { ITEM_TYPES } from '../exported-related';\nimport type { GenericItemItemProps } from '../index.d';\nimport { FOOTER_DS_ID } from '../exported-related/constants';\n\nconst notFocuseableItems = [ITEM_TYPES.LEFT_NAV_ITEM_SEPARATOR, ITEM_TYPES.LEFT_NAV_ITEM_SECTION];\n\n// Walks the array of items\n// Drilldowns are tree-like structures\nconst walkItems = (items: GenericItemItemProps[], openedDrilldowns: string[], callback: (dsId: string) => void) => {\n items.forEach((item) => {\n if (typeof item.type === 'string') {\n // Out of the box item\n if (notFocuseableItems.includes(item.type)) return; // not focuseable\n\n callback(item.dsId);\n\n // If it's an opened uncontrolled drilldown\n if (item.type === ITEM_TYPES.LEFT_NAV_ITEM_UNCONTROLLED_DRILLDOWN && openedDrilldowns.includes(item.dsId))\n walkItems(item.itemOpts?.items ?? [], openedDrilldowns, callback);\n\n // If it's an opened controlled drilldown\n if (item.type === ITEM_TYPES.LEFT_NAV_ITEM_CONTROLLED_DRILLDOWN && item.itemOpts?.isOpened)\n walkItems(item.itemOpts?.items ?? [], openedDrilldowns, callback);\n } else {\n // Custom item\n if (!item.itemOpts?.focuseable) return; // not focuseable specified\n callback(item.dsId);\n }\n });\n};\n\nexport const useLeftNavItems = (props: {\n headerItem: GenericItemItemProps;\n bodyHeaderItem: GenericItemItemProps;\n items: GenericItemItemProps[];\n openedDrilldowns: string[];\n}): {\n visibleItems: string[];\n visibleItemsRefs: MutableRefObject<Record<string, RefObject<HTMLElement>>>;\n} => {\n const { headerItem, bodyHeaderItem, items: bodyItems, openedDrilldowns } = props;\n\n // Place the header and body header items into the array of items\n const items = useMemo(() => {\n const itemsArray: GenericItemItemProps[] = [...bodyItems];\n if (bodyHeaderItem) itemsArray.unshift(bodyHeaderItem);\n if (headerItem) itemsArray.unshift(headerItem);\n return itemsArray;\n }, [headerItem, bodyHeaderItem, bodyItems]);\n\n const visibleItemsRefs = useRef<Record<string, RefObject<HTMLElement>>>({});\n\n const visibleItems: string[] = useMemo(() => {\n const visibleItemsArray: string[] = [];\n walkItems(items, openedDrilldowns, (dsId: string) => {\n visibleItemsArray.push(dsId);\n });\n visibleItemsArray.push(FOOTER_DS_ID);\n return visibleItemsArray;\n }, [items, openedDrilldowns]);\n\n visibleItems.forEach((dsId) => {\n if (!(dsId in visibleItemsRefs.current)) visibleItemsRefs.current[dsId] = createRef();\n });\n\n return { visibleItems, visibleItemsRefs };\n};\n\nexport default useLeftNavItems;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAwE;AACxE,8BAA2B;AAE3B,uBAA6B;AAE7B,MAAM,qBAAqB,CAAC,mCAAW,yBAAyB,mCAAW;AAI3E,MAAM,YAAY,CAAC,OAA+B,kBAA4B,aAAqC;AACjH,QAAM,QAAQ,CAAC,SAAS;AACtB,QAAI,OAAO,KAAK,SAAS,UAAU;AAEjC,UAAI,mBAAmB,SAAS,KAAK;AAAO;AAE5C,eAAS,KAAK;AAGd,UAAI,KAAK,SAAS,mCAAW,wCAAwC,iBAAiB,SAAS,KAAK;AAClG,kBAAU,KAAK,UAAU,SAAS,IAAI,kBAAkB;AAG1D,UAAI,KAAK,SAAS,mCAAW,sCAAsC,KAAK,UAAU;AAChF,kBAAU,KAAK,UAAU,SAAS,IAAI,kBAAkB;AAAA,WACrD;AAEL,UAAI,CAAC,KAAK,UAAU;AAAY;AAChC,eAAS,KAAK;AAAA;AAAA;AAAA;AAKb,MAAM,kBAAkB,CAAC,UAQ3B;AACH,QAAM,EAAE,YAAY,gBAAgB,OAAO,WAAW,qBAAqB;AAG3E,QAAM,QAAQ,0BAAQ,MAAM;AAC1B,UAAM,aAAqC,CAAC,GAAG;AAC/C,QAAI;AAAgB,iBAAW,QAAQ;AACvC,QAAI;AAAY,iBAAW,QAAQ;AACnC,WAAO;AAAA,KACN,CAAC,YAAY,gBAAgB;AAEhC,QAAM,mBAAmB,yBAA+C;AAExE,QAAM,eAAyB,0BAAQ,MAAM;AAC3C,UAAM,oBAA8B;AACpC,cAAU,OAAO,kBAAkB,CAAC,SAAiB;AACnD,wBAAkB,KAAK;AAAA;AAEzB,sBAAkB,KAAK;AACvB,WAAO;AAAA,KACN,CAAC,OAAO;AAEX,eAAa,QAAQ,CAAC,SAAS;AAC7B,QAAI,CAAE,SAAQ,iBAAiB;AAAU,uBAAiB,QAAQ,QAAQ;AAAA;AAG5E,SAAO,EAAE,cAAc;AAAA;AAGzB,IAAO,0BAAQ;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/configs/useLeftNavSmoothExpand.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport type { LeftNavProps } from '../index.d';\n\ninterface smoothExpandOptsT {\n expandedForAnimation: boolean;\n timeoutRef: React.MutableRefObject<NodeJS.Timeout>;\n setExpandedForAnimation: React.Dispatch<React.SetStateAction<boolean>>;\n}\nexport const useLeftNavSmoothExpand = (\n props: LeftNavProps,\n smoothExpandOpts: smoothExpandOptsT,\n): void => {\n const { expanded } = props;\n const {\n expandedForAnimation,\n timeoutRef,\n setExpandedForAnimation,\n } = smoothExpandOpts;\n\n React.useEffect(() => {\n // If expanded changes, we need to smoothly transition to the non-expanded state\n // so we need to wait for 350ms\n if (!expanded && expandedForAnimation) {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = setTimeout(\n () => setExpandedForAnimation(false),\n 350,\n );\n } else if (expanded) setExpandedForAnimation(true);\n }, [expanded]);\n\n React.useEffect(() => () => clearTimeout(timeoutRef.current), []);\n};\n\nexport default useLeftNavSmoothExpand;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAQX,MAAM,yBAAyB,CACpC,OACA,qBACS;AACT,QAAM,EAAE,aAAa;AACrB,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,MACE;AAEJ,uBAAM,UAAU,MAAM;AAGpB,QAAI,CAAC,YAAY,sBAAsB;AACrC,mBAAa,WAAW;AACxB,iBAAW,UAAU,WACnB,MAAM,wBAAwB,QAC9B;AAAA,eAEO;AAAU,8BAAwB;AAAA,KAC5C,CAAC;AAEJ,uBAAM,UAAU,MAAM,MAAM,aAAa,WAAW,UAAU;AAAA;AAGhE,IAAO,iCAAQ;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/exported-related/ChevronItem/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { ChevronSmallRight } from '@elliemae/ds-icons';\n\nexport const ChevronItem = (props: unknown): JSX.Element => (\n <ChevronSmallRight size=\"m\" color={['brand-primary', 800]} {...props} />\n);\n\nexport default ChevronItem;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,sBAAkC;AAE3B,MAAM,cAAc,CAAC,UAC1B,mDAAC,mCAAD;AAAA,EAAmB,MAAK;AAAA,EAAI,OAAO,CAAC,iBAAiB;AAAA,KAAU;AAAA;AAGjE,IAAO,sBAAQ;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/exported-related/Icon/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport styled from 'styled-components';\n\nconst AugmentedIcon = (\n Icon: React.ComponentType<{ color: unknown; tabIndex: number }>,\n) => styled(Icon)`\n cursor: pointer;\n\n outline: 0;\n :focus,\n :active {\n outline: 1px solid #1e79c2;\n }\n`;\n\nexport const Icon = (\n IconComponent: React.ComponentType<{ color: unknown; tabIndex: number }>,\n) => (props: unknown): JSX.Element => {\n const StyledComponent = AugmentedIcon(IconComponent);\n return (\n <StyledComponent color={['brand-primary', 800]} tabIndex={0} {...props} />\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,+BAAmB;AAEnB,MAAM,gBAAgB,CACpB,UACG,sCAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUL,MAAM,OAAO,CAClB,kBACG,CAAC,UAAgC;AACpC,QAAM,kBAAkB,cAAc;AACtC,SACE,mDAAC,iBAAD;AAAA,IAAiB,OAAO,CAAC,iBAAiB;AAAA,IAAM,UAAU;AAAA,OAAO;AAAA;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/exported-related/ItemRenderer/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport React, { useContext, useMemo, useCallback } from 'react';\nimport Grid from '@elliemae/ds-grid';\nimport { StyledItemWrapper, StyledItem } from './styled';\n\nimport { ItemRendererT } from '../../index.d';\nimport { LeftNavContext } from '../../LeftNavigationContext';\nimport { usePropsWithDefaults } from './usePropsWithDefaults';\nimport { useKeyboardNavigation } from '../../hooks';\n\nexport const ItemRenderer = (props: ItemRendererT): JSX.Element => {\n const propsWithDefault = usePropsWithDefaults(props);\n const {\n item,\n item: {\n dsId,\n itemOpts: { selectable, focuseable, indent, ariaLabel, ariaRole, ariaLive, ariaExpanded, ariaDescribedBy },\n CollapsedComponent,\n },\n subitems,\n minHeight,\n paddingTop,\n onClick,\n shadowStyle,\n hasBorderBottom,\n borderBottomMr,\n children,\n } = propsWithDefault;\n\n const ctx = useContext(LeftNavContext);\n const {\n leftNavProps: { onItemClick, openedItem },\n expandedForAnimation,\n selectedParent,\n selectedItem,\n setSelectedItem,\n setFocusedItem,\n visibleItemsRefs,\n } = ctx;\n\n const opened = dsId === openedItem;\n\n const handleOnClick = useCallback(\n (e) => {\n if (onClick) onClick(); // used by uncontrolled drilldowns\n onItemClick(item, e);\n if (selectable) setSelectedItem(item.dsId);\n },\n [onItemClick, item, setSelectedItem, selectable, onClick],\n );\n\n const handleFocus = useCallback(() => {\n if (focuseable) setFocusedItem(dsId);\n }, [dsId, setFocusedItem, focuseable]);\n\n const onKeyDown = useKeyboardNavigation({\n item,\n onClick: handleOnClick,\n });\n\n const cols = useMemo(() => (expandedForAnimation ? ['auto', '1fr', 'auto'] : ['38px']), [expandedForAnimation]);\n const isSelected = useMemo(() => selectedItem === dsId, [selectedItem, dsId]);\n\n if (!expandedForAnimation && !CollapsedComponent) {\n return null;\n }\n\n return (\n <>\n <StyledItemWrapper shadowStyle={shadowStyle(opened, item.type)} data-testid=\"leftnav-item-wrapper\">\n <StyledItem\n ref={visibleItemsRefs.current[dsId]}\n pt={paddingTop}\n pl={indent === undefined ? 'xxxs' : `${indent}px`}\n minHeight={minHeight}\n shadowStyle={shadowStyle(opened, item.type)}\n alignItems=\"flex-start\"\n cols={cols}\n onClick={!opened ? handleOnClick : () => null}\n onKeyDown={onKeyDown}\n selectable={selectable}\n selected={isSelected}\n selectedParent={selectedParent === dsId}\n opened={opened}\n onFocus={handleFocus}\n data-testid=\"leftnav-item-container\"\n tabIndex={focuseable ? 0 : -1}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n role={ariaRole}\n data-selected={isSelected}\n data-selectedparent={selectedParent === dsId}\n aria-label={ariaLabel}\n aria-hidden={!focuseable}\n aria-live={ariaLive}\n >\n {!expandedForAnimation ? (\n <Grid data-testid=\"leftnav-leftcomponent\" justifyContent=\"center\">\n <CollapsedComponent item={item} ctx={ctx} />\n </Grid>\n ) : (\n children\n )}\n </StyledItem>\n {hasBorderBottom && (\n <div\n style={{\n marginLeft: opened ? '16px' : '0px',\n marginRight: borderBottomMr,\n height: '1px',\n width: `calc(100% - ${borderBottomMr} - ${opened ? '16px' : '0px'})`,\n backgroundColor: '#E0E3E8',\n }}\n />\n )}\n </StyledItemWrapper>\n {subitems}\n </>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAAwD;AACxD,qBAAiB;AACjB,oBAA8C;AAG9C,mCAA+B;AAC/B,kCAAqC;AACrC,mBAAsC;AAE/B,MAAM,eAAe,CAAC,UAAsC;AACjE,QAAM,mBAAmB,sDAAqB;AAC9C,QAAM;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ;AAAA,MACA,UAAU,EAAE,YAAY,YAAY,QAAQ,WAAW,UAAU,UAAU,cAAc;AAAA,MACzF;AAAA;AAAA,IAEF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE;AAEJ,QAAM,MAAM,6BAAW;AACvB,QAAM;AAAA,IACJ,cAAc,EAAE,aAAa;AAAA,IAC7B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE;AAEJ,QAAM,SAAS,SAAS;AAExB,QAAM,gBAAgB,8BACpB,CAAC,MAAM;AACL,QAAI;AAAS;AACb,gBAAY,MAAM;AAClB,QAAI;AAAY,sBAAgB,KAAK;AAAA,KAEvC,CAAC,aAAa,MAAM,iBAAiB,YAAY;AAGnD,QAAM,cAAc,8BAAY,MAAM;AACpC,QAAI;AAAY,qBAAe;AAAA,KAC9B,CAAC,MAAM,gBAAgB;AAE1B,QAAM,YA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"names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/exported-related/ItemRenderer/styled.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable indent */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport Grid from '@elliemae/ds-grid';\nimport styled from 'styled-components';\n\ninterface ItemProps {\n selected: boolean;\n selectable: boolean;\n opened: boolean;\n theme: any;\n shadowStyle: (theme: any) => string;\n}\n\nexport const borderOutside = (color, weight = 2): string => `&:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: ${weight}px solid ${color};\n pointer-events: none;\n}`;\n\nexport const StyledItemWrapper = styled(Grid)<{\n shadowStyle: (theme: any) => string;\n}>`\n position: relative;\n ${(props) => props.shadowStyle(props.theme)}\n`;\n\nconst getItemBackground = ({ selectable, opened, selected, theme }: ItemProps) => {\n if (!selectable) return 'white';\n if (selected && !opened) return theme.colors.brand[200];\n return theme.colors.neutral['000'];\n};\n\nconst getItemHoverBackground = ({ selectable, opened, selected, theme }: ItemProps) => {\n if (!selectable) return 'white';\n if (selected && !opened) return theme.colors.brand[200];\n return theme.colors.brand['200'];\n};\n\nexport const StyledItem = styled(Grid)<{ minHeight: string } & ItemProps>`\n cursor: ${(props) => (props.selectable && !props.opened ? 'pointer' : 'auto')};\n min-height: ${(props) => props.minHeight};\n\n background: ${getItemBackground};\n\n ${(props) => (props.selected && !props.opened ? borderOutside(props.theme.colors.brand[500], 1) : '')}\n\n :hover {\n background: ${getItemHoverBackground};\n }\n\n :active {\n background: ${({ selectable, theme }) => (selectable ? theme.colors.brand[200] : 'white')};\n }\n\n ${(props) => props.shadowStyle(props.theme)};\n\n outline: none;\n\n ${(props) =>\n props.tabIndex !== -1\n ? `:focus {\n ${borderOutside(props.theme.colors.brand[700])}\n }`\n : ''}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;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"version": 3,
3
- "sources": ["../../../../src/exported-related/ItemRenderer/usePropsWithDefaults.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { useMemo } from 'react';\nimport { itemOptsT, ItemRendererT } from '../../index.d';\n\nconst itemDefaultProps: itemOptsT = {\n label: '',\n labelOverflow: 'truncate',\n selectable: true,\n focuseable: true,\n openable: false,\n closable: false,\n ariaLabel: '',\n ariaRole: 'menuitem',\n ariaLive: 'off',\n ariaExpanded: undefined,\n ariaDescribedBy: undefined,\n};\n\nconst itemWithoutShadows = ['ds-left-nav-item-header', 'ds-left-nav-item-link', 'ds-left-nav-item-submenu'];\n\n// Make use Item props with defaults\nexport const usePropsWithDefaults = (props: ItemRendererT): ItemRendererT => {\n const propsWithDefault = useMemo(() => {\n const itemWithDefaults = {\n CollapsedComponent: () => null,\n ...props.item,\n itemOpts: { ...itemDefaultProps, ...props.item.itemOpts },\n };\n return {\n minHeight: '48px',\n paddingTop: '12px',\n subitems: [],\n shadowStyle: (opened: boolean, type: string) => (theme: any) =>\n `box-shadow: ${\n opened || !itemWithoutShadows.includes(type) ? 'inset 4px 0 0 0 #52A6EC' : 'inset 4px 0 0 0 white'\n }`,\n hasBorderBottom: false,\n borderBottomMr: '0px',\n ...props,\n item: itemWithDefaults,\n };\n }, [props]);\n\n return propsWithDefault;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAwB;AAGxB,MAAM,mBAA8B;AAAA,EAClC,OAAO;AAAA,EACP,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,UAAU;AAAA,EACV,WAAW;AAAA,EACX,UAAU;AAAA,EACV,UAAU;AAAA,EACV,cAAc;AAAA,EACd,iBAAiB;AAAA;AAGnB,MAAM,qBAAqB,CAAC,2BAA2B,yBAAyB;AAGzE,MAAM,uBAAuB,CAAC,UAAwC;AAC3E,QAAM,mBAAmB,0BAAQ,MAAM;AACrC,UAAM,mBAAmB;AAAA,MACvB,oBAAoB,MAAM;AAAA,SACvB,MAAM;AAAA,MACT,UAAU,KAAK,qBAAqB,MAAM,KAAK;AAAA;AAEjD,WAAO;AAAA,MACL,WAAW;AAAA,MACX,YAAY;AAAA,MACZ,UAAU;AAAA,MACV,aAAa,CAAC,QAAiB,SAAiB,CAAC,UAC/C,eACE,UAAU,CAAC,mBAAmB,SAAS,QAAQ,4BAA4B;AAAA,MAE/E,iBAAiB;AAAA,MACjB,gBAAgB;AAAA,SACb;AAAA,MACH,MAAM;AAAA;AAAA,KAEP,CAAC;AAEJ,SAAO;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/exported-related/Notifications/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport {\n AlertsSmallFill,\n Notifications as InternalNotifications,\n ExceptionsSmallFill,\n MessagesSmallFill,\n} from '@elliemae/ds-icons';\nimport styled from 'styled-components';\nimport Grid from '@elliemae/ds-grid';\n\nconst StyledIcon = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n`;\n\ntype NotificationsProps = {\n exceptions?: boolean;\n alerts?: boolean;\n messages?: boolean;\n};\n\nexport const Notifications = ({\n exceptions = false,\n alerts = false,\n messages = false,\n}: NotificationsProps): JSX.Element => (\n <StyledIcon>\n <InternalNotifications size=\"m\" color={['brand-primary', 800]} data-testid=\"left-nav-notifications-icon\" />\n {(exceptions || alerts || messages) && (\n <Grid cols={['1fr', '1fr', '1fr']} gutter=\"xxxs\" mt=\"2px\">\n <Grid width=\"6px\" height=\"6px\" data-testid=\"left-nav-exceptions-icon\">\n {exceptions && <ExceptionsSmallFill width=\"6px\" height=\"6px\" color={['warning', 900]} />}\n </Grid>\n <Grid width=\"6px\" height=\"6px\" data-testid=\"left-nav-alerts-icon\">\n {alerts && <AlertsSmallFill width=\"6px\" height=\"6px\" color={['danger', 900]} />}\n </Grid>\n <Grid width=\"6px\" height=\"6px\" data-testid=\"left-nav-messages-icon\">\n {messages && <MessagesSmallFill width=\"6px\" height=\"6px\" color={['success', 900]} />}\n </Grid>\n </Grid>\n )}\n </StyledIcon>\n);\n\nexport default Notifications;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,sBAKO;AACP,+BAAmB;AACnB,qBAAiB;AAEjB,MAAM,aAAa,iCAAO;AAAA;AAAA;AAAA;AAAA;AAYnB,MAAM,gBAAgB,CAAC;AAAA,EAC5B,aAAa;AAAA,EACb,SAAS;AAAA,EACT,WAAW;AAAA,MAEX,mDAAC,YAAD,MACE,mDAAC,+BAAD;AAAA,EAAuB,MAAK;AAAA,EAAI,OAAO,CAAC,iBAAiB;AAAA,EAAM,eAAY;AAAA,IACzE,eAAc,UAAU,aACxB,mDAAC,wBAAD;AAAA,EAAM,MAAM,CAAC,OAAO,OAAO;AAAA,EAAQ,QAAO;AAAA,EAAO,IAAG;AAAA,GAClD,mDAAC,wBAAD;AAAA,EAAM,OAAM;AAAA,EAAM,QAAO;AAAA,EAAM,eAAY;AAAA,GACxC,cAAc,mDAAC,qCAAD;AAAA,EAAqB,OAAM;AAAA,EAAM,QAAO;AAAA,EAAM,OAAO,CAAC,WAAW;AAAA,KAElF,mDAAC,wBAAD;AAAA,EAAM,OAAM;AAAA,EAAM,QAAO;AAAA,EAAM,eAAY;AAAA,GACxC,UAAU,mDAAC,iCAAD;AAAA,EAAiB,OAAM;AAAA,EAAM,QAAO;AAAA,EAAM,OAAO,CAAC,UAAU;AAAA,KAEzE,mDAAC,wBAAD;AAAA,EAAM,OAAM;AAAA,EAAM,QAAO;AAAA,EAAM,eAAY;AAAA,GACxC,YAAY,mDAAC,mCAAD;AAAA,EAAmB,OAAM;AAAA,EAAM,QAAO;AAAA,EAAM,OAAO,CAAC,WAAW;AAAA;AAOtF,IAAO,wBAAQ;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/exported-related/OpenWindowItem/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport styled from 'styled-components';\nimport { OpenWindow as OpenWindowIcon } from '@elliemae/ds-icons';\n\nconst StyledOpenWindow = styled(OpenWindowIcon)`\n cursor: pointer;\n :focus {\n outline: 1px solid ${(props) => props.theme.colors.brand[800]};\n }\n`;\n\nexport const OpenWindow = (props: unknown): JSX.Element => (\n <StyledOpenWindow size=\"s\" color={['brand-primary', 800]} {...props} />\n);\n\nexport default OpenWindow;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,+BAAmB;AACnB,sBAA6C;AAE7C,MAAM,mBAAmB,sCAAO;AAAA;AAAA;AAAA,yBAGP,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM;AAAA;AAAA;AAItD,MAAM,aAAa,CAAC,UACzB,mDAAC,kBAAD;AAAA,EAAkB,MAAK;AAAA,EAAI,OAAO,CAAC,iBAAiB;AAAA,KAAU;AAAA;AAGhE,IAAO,yBAAQ;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/exported-related/constants.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export const LABEL_OVERFLOW = {\n WRAP: 'wrap',\n WRAP_ALL: 'wrapAll',\n TRUNCATE: 'truncate',\n};\n\nexport const ITEM_TYPES = {\n LEFT_NAV_ITEM_HEADER: 'ds-left-nav-item-header',\n LEFT_NAV_ITEM_LINK: 'ds-left-nav-item-link',\n LEFT_NAV_ITEM_SUBMENU: 'ds-left-nav-item-submenu',\n LEFT_NAV_ITEM_CONTROLLED_DRILLDOWN: 'ds-left-nav-item-controlled-drilldown',\n LEFT_NAV_ITEM_UNCONTROLLED_DRILLDOWN: 'ds-left-nav-item-uncontrolled-drilldown',\n LEFT_NAV_ITEM_SECTION: 'ds-left-nav-item-section',\n LEFT_NAV_ITEM_SEPARATOR: 'ds-left-nav-item-separator',\n LEFT_NAV_ITEM_TEXT_LABEL: 'ds-left-nav-item-text-label',\n LEFT_NAV_ITEM_WITH_DATE: 'ds-left-nav-item-with-date',\n};\n\nexport const FOOTER_DS_ID = 'ds-left-nav-__internal__-footer';\n\nexport const FOOTER_MENU_CLOSE_DS_ID = 'ds-left-nav-__internal__-footer-menu-close';\n\nexport const CHEVRON_BACK_DS_ID = 'ds-left-nav-__internal__-chevron-back';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,iBAAiB;AAAA,EAC5B,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AAAA;AAGL,MAAM,aAAa;AAAA,EACxB,sBAAsB;AAAA,EACtB,oBAAoB;AAAA,EACpB,uBAAuB;AAAA,EACvB,oCAAoC;AAAA,EACpC,sCAAsC;AAAA,EACtC,uBAAuB;AAAA,EACvB,yBAAyB;AAAA,EACzB,0BAA0B;AAAA,EAC1B,yBAAyB;AAAA;AAGpB,MAAM,eAAe;AAErB,MAAM,0BAA0B;AAEhC,MAAM,qBAAqB;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/exported-related/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export * from './constants';\nexport * from './ItemRenderer';\nexport * from './ChevronItem';\nexport * from './Notifications';\nexport * from './OpenWindowItem';\nexport * from './Icon';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA,YAAuB;ADAvB,qCAAc;AACd,qCAAc;AACd,qCAAc;AACd,qCAAc;AACd,qCAAc;AACd,qCAAc;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/hooks/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export * from './useOpenableOnClickHandler';\nexport * from './useExpandableOnClickHandler';\nexport * from './useKeyboardNavigation';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA,YAAuB;ADAvB,0BAAc;AACd,0BAAc;AACd,0BAAc;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/hooks/useExpandableOnClickHandler.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useCallback, useContext } from 'react';\nimport LeftNavigationContext from '../LeftNavigationContext';\n\ntype useExpandableOnClickHandlerProps = {\n id: string;\n onExpand: React.MouseEventHandler & React.KeyboardEventHandler;\n onOpen: React.MouseEventHandler & React.KeyboardEventHandler;\n selectable?: boolean;\n};\n\nexport const useExpandableOnClickHandler = ({\n id,\n onExpand,\n onOpen,\n selectable = true,\n}: useExpandableOnClickHandlerProps): ((\n e: React.MouseEvent<HTMLElement>,\n) => void) => {\n const {\n leftNavProps: { expanded },\n setSelectedItem,\n } = useContext(LeftNavigationContext);\n\n const handleOnExpand = useCallback(\n (e) => {\n onExpand(e);\n if (selectable) setSelectedItem(id);\n },\n [id, onExpand, setSelectedItem, selectable],\n );\n\n const handleOnOpen = useCallback(\n (e) => {\n onOpen(e);\n if (selectable) setSelectedItem(id);\n },\n [id, onOpen, setSelectedItem, selectable],\n );\n\n const handleOnClick = useCallback(\n (e) => {\n if (!expanded) handleOnExpand(e);\n else handleOnOpen(e);\n },\n [expanded, handleOnExpand, handleOnOpen],\n );\n\n return handleOnClick;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA+C;AAC/C,mCAAkC;AAS3B,MAAM,8BAA8B,CAAC;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AAAA,MAGD;AACZ,QAAM;AAAA,IACJ,cAAc,EAAE;AAAA,IAChB;AAAA,MACE,6BAAW;AAEf,QAAM,iBAAiB,8BACrB,CAAC,MAAM;AACL,aAAS;AACT,QAAI;AAAY,sBAAgB;AAAA,KAElC,CAAC,IAAI,UAAU,iBAAiB;AAGlC,QAAM,eAAe,8BACnB,CAAC,MAAM;AACL,WAAO;AACP,QAAI;AAAY,sBAAgB;AAAA,KAElC,CAAC,IAAI,QAAQ,iBAAiB;AAGhC,QAAM,gBAAgB,8BACpB,CAAC,MAAM;AACL,QAAI,CAAC;AAAU,qBAAe;AAAA;AACzB,mBAAa;AAAA,KAEpB,CAAC,UAAU,gBAAgB;AAG7B,SAAO;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/hooks/useKeyboardNavigation.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable max-statements */\n/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React, { useCallback, useMemo, useLayoutEffect, useContext } from 'react';\nimport { CHEVRON_BACK_DS_ID, FOOTER_MENU_CLOSE_DS_ID } from '../exported-related/constants';\nimport { GenericItemItemProps } from '../index.d';\nimport LeftNavContext from '../LeftNavigationContext';\n\nconst KEY_CODES = {\n TAB: 9,\n ENTER: 13,\n SPACE: 32,\n LEFT_ARROW: 37,\n UP_ARROW: 38,\n RIGHT_ARROW: 39,\n DOWN_ARROW: 40,\n END: 35,\n HOME: 36,\n};\n\nconst nextIndex = (index: number, length: number) => (index + 1) % length;\nconst prevIndex = (index: number, length: number) => (index - 1 + length) % length;\n\ntype useKeyboardNavigationProps = {\n item: GenericItemItemProps;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onClick: (e: any) => void;\n};\n\nexport const useKeyboardNavigation = ({ item, onClick }: useKeyboardNavigationProps): React.KeyboardEventHandler => {\n const {\n dsId,\n itemOpts: { selectable, openable, closable },\n } = item;\n\n const { visibleItems, visibleItemsRefs } = useContext(LeftNavContext);\n\n const currentIndex = useMemo(\n () => visibleItems.findIndex((visibleItemDsId) => visibleItemDsId === dsId),\n [dsId, visibleItems],\n );\n\n const { setFocusedItem, focusedItem, setSelectedItem } = useContext(LeftNavContext);\n\n const focusAndSelect = useCallback(\n (nextDsId: string) => {\n setFocusedItem(nextDsId);\n setSelectedItem(nextDsId);\n },\n [setFocusedItem, setSelectedItem],\n );\n\n useLayoutEffect(() => {\n if (dsId === focusedItem) visibleItemsRefs.current[dsId]?.current?.focus();\n }, [dsId, focusedItem, visibleItemsRefs]);\n\n const onKeyDown: React.KeyboardEventHandler = useCallback(\n (e) => {\n const { keyCode } = e;\n\n // Prevent default behaviour when not tab\n if (keyCode !== KEY_CODES.TAB) {\n e.preventDefault();\n }\n\n if (keyCode === KEY_CODES.ENTER || keyCode === KEY_CODES.SPACE) {\n if (selectable) {\n onClick(e);\n focusAndSelect(dsId);\n } else if (focusedItem === CHEVRON_BACK_DS_ID) {\n onClick(e);\n focusAndSelect(dsId);\n } else if (focusedItem === FOOTER_MENU_CLOSE_DS_ID) {\n onClick(e);\n setFocusedItem(dsId);\n }\n }\n\n if (openable && keyCode === KEY_CODES.RIGHT_ARROW) {\n onClick(e);\n }\n\n if (closable && keyCode === KEY_CODES.LEFT_ARROW) {\n onClick(e);\n setFocusedItem(dsId);\n }\n\n if (keyCode === KEY_CODES.DOWN_ARROW) {\n const nextDsId = visibleItems[nextIndex(currentIndex, visibleItems.length)];\n setFocusedItem(nextDsId);\n }\n\n if (keyCode === KEY_CODES.UP_ARROW) {\n const prevDsId = visibleItems[prevIndex(currentIndex, visibleItems.length)];\n setFocusedItem(prevDsId);\n }\n\n if (keyCode === KEY_CODES.HOME) {\n setFocusedItem(visibleItems[0]);\n }\n\n if (keyCode === KEY_CODES.END) {\n setFocusedItem(visibleItems[visibleItems.length - 1]);\n }\n },\n [\n openable,\n closable,\n selectable,\n focusedItem,\n onClick,\n focusAndSelect,\n dsId,\n setFocusedItem,\n visibleItems,\n currentIndex,\n ],\n );\n\n return onKeyDown;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,mBAAyE;AACzE,uBAA4D;AAE5D,mCAA2B;AAE3B,MAAM,YAAY;AAAA,EAChB,KAAK;AAAA,EACL,OAAO;AAAA,EACP,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,KAAK;AAAA,EACL,MAAM;AAAA;AAGR,MAAM,YAAY,CAAC,OAAe,WAAoB,SAAQ,KAAK;AACnE,MAAM,YAAY,CAAC,OAAe,WAAoB,SAAQ,IAAI,UAAU;AAQrE,MAAM,wBAAwB,CAAC,EAAE,MAAM,cAAsE;AAClH,QAAM;AAAA,IACJ;AAAA,IACA,UAAU,EAAE,YAAY,UAAU;AAAA,MAChC;AAEJ,QAAM,EAAE,cAAc,qBAAqB,6BAAW;AAEtD,QAAM,eAAe,0BACnB,MAAM,aAAa,UAAU,CAAC,oBAAoB,oBAAoB,OACtE,CAAC,MAAM;AAGT,QAAM,EAAE,gBAAgB,aAAa,oBAAoB,6BAAW;AAEpE,QAAM,iBAAiB,8BACrB,CAAC,aAAqB;AACpB,mBAAe;AACf,oBAAgB;AAAA,KAElB,CAAC,gBAAgB;AAGnB,oCAAgB,MAAM;AACpB,QAAI,SAAS;AAAa,uBAAiB,QAAQ,OAAO,SAAS;AAAA,KAClE,CAAC,MAAM,aAAa;AAEvB,QAAM,YAAwC,8BAC5C,CAAC,MAAM;AACL,UAAM,EAAE,YAAY;AAGpB,QAAI,YAAY,UAAU,KAAK;AAC7B,QAAE;AAAA;AAGJ,QAAI,YAAY,UAAU,SAAS,YAAY,UAAU,OAAO;AAC9D,UAAI,YAAY;AACd,gBAAQ;AACR,uBAAe;AAAA,iBACN,gBAAgB,qCAAoB;AAC7C,gBAAQ;AACR,uBAAe;AAAA,iBACN,gBAAgB,0CAAyB;AAClD,gBAAQ;AACR,uBAAe;AAAA;AAAA;AAInB,QAAI,YAAY,YAAY,UAAU,aAAa;AACjD,cAAQ;AAAA;AAGV,QAAI,YAAY,YAAY,UAAU,YAAY;AAChD,cAAQ;AACR,qBAAe;AAAA;AAGjB,QAAI,YAAY,UAAU,YAAY;AACpC,YAAM,WAAW,aAAa,UAAU,cAAc,aAAa;AACnE,qBAAe;AAAA;AAGjB,QAAI,YAAY,UAAU,UAAU;AAClC,YAAM,WAAW,aAAa,UAAU,cAAc,aAAa;AACnE,qBAAe;AAAA;AAGjB,QAAI,YAAY,UAAU,MAAM;AAC9B,qBAAe,aAAa;AAAA;AAG9B,QAAI,YAAY,UAAU,KAAK;AAC7B,qBAAe,aAAa,aAAa,SAAS;AAAA;AAAA,KAGtD;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAIJ,SAAO;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/hooks/useOpenableOnClickHandler.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { useCallback, useContext } from 'react';\nimport LeftNavigationContext from '../LeftNavigationContext';\n\ntype useOpenableOnClickHandlerProps = {\n id: string;\n onExpand: React.MouseEventHandler & React.KeyboardEventHandler;\n onOpen: React.MouseEventHandler & React.KeyboardEventHandler;\n onClose: React.MouseEventHandler & React.KeyboardEventHandler;\n opened: boolean;\n};\n\nexport const useOpenableOnClickHandler = ({\n id,\n opened,\n onExpand,\n onOpen,\n onClose,\n}: useOpenableOnClickHandlerProps): ((\n e: React.MouseEvent<HTMLElement>,\n) => void) => {\n const {\n leftNavProps: { expanded },\n setSelectedItem,\n } = useContext(LeftNavigationContext);\n\n const handleOnExpand = useCallback(\n (e) => {\n onExpand(e);\n setSelectedItem(id);\n },\n [id, onExpand, setSelectedItem],\n );\n\n const handleOnOpen = useCallback(\n (e) => {\n onOpen(e);\n setSelectedItem(id);\n },\n [id, onOpen, setSelectedItem],\n );\n\n const handleOnClose = useCallback(\n (e) => {\n onClose(e);\n setSelectedItem(id);\n },\n [id, onClose, setSelectedItem],\n );\n\n const handleOnClick = useCallback(\n (e) => {\n if (!expanded) handleOnExpand(e);\n else if (!opened) handleOnOpen(e);\n else handleOnClose(e);\n },\n [expanded, opened, handleOnExpand, handleOnOpen, handleOnClose],\n );\n\n return handleOnClick;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAwC;AACxC,mCAAkC;AAU3B,MAAM,4BAA4B,CAAC;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MAGY;AACZ,QAAM;AAAA,IACJ,cAAc,EAAE;AAAA,IAChB;AAAA,MACE,6BAAW;AAEf,QAAM,iBAAiB,8BACrB,CAAC,MAAM;AACL,aAAS;AACT,oBAAgB;AAAA,KAElB,CAAC,IAAI,UAAU;AAGjB,QAAM,eAAe,8BACnB,CAAC,MAAM;AACL,WAAO;AACP,oBAAgB;AAAA,KAElB,CAAC,IAAI,QAAQ;AAGf,QAAM,gBAAgB,8BACpB,CAAC,MAAM;AACL,YAAQ;AACR,oBAAgB;AAAA,KAElB,CAAC,IAAI,SAAS;AAGhB,QAAM,gBAAgB,8BACpB,CAAC,MAAM;AACL,QAAI,CAAC;AAAU,qBAAe;AAAA,aACrB,CAAC;AAAQ,mBAAa;AAAA;AAC1B,oBAAc;AAAA,KAErB,CAAC,UAAU,QAAQ,gBAAgB,cAAc;AAGnD,SAAO;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/hooks/useSelectFirstBodyItem.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useEffect } from 'react';\nimport { GenericItemItemProps } from '../index.d';\nimport { ITEM_TYPES } from '../exported-related/constants';\n\nconst { LEFT_NAV_ITEM_SEPARATOR, LEFT_NAV_ITEM_SECTION } = ITEM_TYPES;\n\nconst isSelectableOutOfTheBox = (elem: GenericItemItemProps) =>\n typeof elem.type === 'string' && elem.type !== LEFT_NAV_ITEM_SEPARATOR && elem.type !== LEFT_NAV_ITEM_SECTION;\nconst isSelectableCustom = (elem: GenericItemItemProps) => elem.itemOpts.selectable;\n\nconst isItemInsideTheTree = (item: GenericItemItemProps, itemID: string) =>\n item.dsId === itemID || item?.itemOpts?.items?.some((it) => isItemInsideTheTree(it, itemID));\n\nexport const useSelectFirstBodyItem = (\n items: GenericItemItemProps[],\n openedItem: string,\n selectedItem: string,\n setSelectedItem: React.Dispatch<React.SetStateAction<string>>,\n disableDefaultSelection: boolean,\n): void => {\n useEffect(() => {\n if (!disableDefaultSelection && items && items.length && openedItem) {\n const index = items.findIndex((elem) => isSelectableOutOfTheBox(elem) || isSelectableCustom(elem));\n const isItemInside = items.some((it) => isItemInsideTheTree(it, selectedItem));\n if (isItemInside) setSelectedItem(selectedItem);\n else if (index !== -1) setSelectedItem(items[index].dsId);\n }\n }, [openedItem, setSelectedItem, disableDefaultSelection]);\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAiC;AAEjC,uBAA2B;AAE3B,MAAM,EAAE,yBAAyB,0BAA0B;AAE3D,MAAM,0BAA0B,CAAC,SAC/B,OAAO,KAAK,SAAS,YAAY,KAAK,SAAS,2BAA2B,KAAK,SAAS;AAC1F,MAAM,qBAAqB,CAAC,SAA+B,KAAK,SAAS;AAEzE,MAAM,sBAAsB,CAAC,MAA4B,WACvD,KAAK,SAAS,UAAU,MAAM,UAAU,OAAO,KAAK,CAAC,OAAO,oBAAoB,IAAI;AAE/E,MAAM,yBAAyB,CACpC,OACA,YACA,cACA,iBACA,4BACS;AACT,8BAAU,MAAM;AACd,QAAI,CAAC,2BAA2B,SAAS,MAAM,UAAU,YAAY;AACnE,YAAM,QAAQ,MAAM,UAAU,CAAC,SAAS,wBAAwB,SAAS,mBAAmB;AAC5F,YAAM,eAAe,MAAM,KAAK,CAAC,OAAO,oBAAoB,IAAI;AAChE,UAAI;AAAc,wBAAgB;AAAA,eACzB,UAAU;AAAI,wBAAgB,MAAM,OAAO;AAAA;AAAA,KAErD,CAAC,YAAY,iBAAiB;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.d.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport type { ContextProps } from './LeftNavigationContext';\n\nexport type LabelOveflowT = 'wrap' | 'wrapAll' | 'truncate';\nexport interface LeftNavProps {\n expanded: boolean;\n expandedWidth: string;\n openedItem: string;\n items: GenericItemItemProps[];\n footerLabel: string;\n labelOverflow: LabelOveflowT;\n onSelectedChange: (item: string) => void;\n onFocusChange: (item: string) => void;\n onFooterExpand: () => void;\n onFooterClose: () => void;\n onItemClick: (item: GenericItemItemProps, e: React.MouseEvent<HTMLElement>) => void;\n HeaderComponent?: GenericItemItemProps;\n BodyHeaderComponent?: GenericItemItemProps;\n tabIndex: number;\n loading: boolean;\n selectedItem?: string;\n selectedParent?: string;\n disableDefaultSelection?: boolean;\n withoutBodyShadow?: boolean;\n}\nexport type OutOfTheBoxT =\n | 'ds-left-nav-item-header'\n | 'ds-left-nav-item-link'\n | 'ds-left-nav-item-submenu'\n | 'ds-left-nav-item-controlled-drilldown'\n | 'ds-left-nav-item-uncontrolled-drilldown'\n | 'ds-left-nav-item-section'\n | 'ds-left-nav-item-separator'\n | 'ds-left-nav-item-text-label'\n | 'ds-left-nav-item-with-date';\n\nexport interface itemOptsT {\n label?: string | JSX.Element;\n labelBold?: boolean;\n labelColor?: [string, string];\n labelOverflow?: LabelOveflowT;\n labelRightSection?: string | React.ComponentType;\n selectable?: boolean;\n focuseable?: boolean;\n startOpened?: boolean;\n isOpened?: boolean;\n openable?: boolean;\n closable?: boolean;\n indent?: number;\n LeftComponent?: React.ComponentType<ComponentProps>;\n RightComponent?: React.ComponentType<ComponentProps>;\n BottomComponent?: React.ComponentType<ComponentProps>;\n ariaLabel?: string;\n ariaRole?: string;\n ariaLive?: string;\n ariaExpanded?: boolean;\n ariaDescribedBy?: string;\n items?: GenericItemItemProps[];\n labelDataTestId?: string;\n}\n\nexport interface ComponentProps {\n item: GenericItemItemProps;\n ctx: ContextProps;\n}\nexport interface GenericItemItemProps {\n dsId?: string;\n type?: string;\n CollapsedComponent?: React.ComponentType<ComponentProps>;\n Component?: React.ComponentType<ComponentProps>;\n itemOpts: itemOptsT;\n}\nexport interface OutOfTheBoxMapItemT {\n item: GenericItemItemProps;\n}\nexport interface ItemRendererT {\n item: GenericItemItemProps;\n subitems?: JSX.Element[];\n minHeight?: string;\n paddingTop?: string;\n onClick?: () => void;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n shadowStyle?: (theme: any) => string;\n hasBorderBottom?: boolean;\n borderBottomMr?: string;\n children: React.ReactNode;\n}\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA,YAAuB;",
6
- "names": []
7
- }
package/cjs/index.js.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export { LeftNavItemPropsSchema, LeftNavItemOptionsSchema } from './prop-types';\nexport { LeftNavigation, LeftNavigationWithSchema, LeftNavigation as default } from './LeftNavigation';\nexport * from './exported-related';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAiE;AACjE,4BAAoF;AACpF,wBAAc;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/outOfTheBox/ItemControlledDrilldown/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useMemo } 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\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 ItemControlledDrilldown = (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 isOpened,\n items,\n labelDataTestId,\n },\n },\n ctx,\n ctx: {\n leftNavProps: { labelOverflow: leftNavLabelOverflow },\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const arrowIcon = useMemo(() => {\n const Component = isOpened ? ArrowheadDown : ArrowheadRight;\n return <Component width=\"24px\" height=\"18px\" color={['brand-primary', '800']} />;\n }, [isOpened]);\n\n const subitems = useMemo(() => {\n if (!isOpened || !items) return [];\n return items.map((subitem) => <OutOfTheBoxMapSubitem item={subitem} ctx={ctx} key={subitem.dsId} />);\n }, [items, isOpened]);\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaExpanded: isOpened,\n ariaRole: 'menuitem',\n ...item.itemOpts,\n openable: !isOpened,\n closable: isOpened,\n },\n CollapsedComponent: null,\n }}\n subitems={subitems}\n minHeight=\"32px\"\n paddingTop=\"8px\"\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'} data-testid=\"leftnav-right-component\">\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </Grid>\n </Grid>\n </ItemRenderer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA+B;AAC/B,qBAAiB;AACjB,uCAA2C;AAC3C,sBAA8C;AAC9C,8BAAyC;AACzC,oBAAwC;AACxC,2BAA8B;AAC9B,0BAA6B;AAC7B,2BAA8B;AAG9B,MAAM,gCAAqF;AAAA,GACxF,mCAAW,0BAA0B;AAAA,GACrC,mCAAW,0BAA0B;AAAA,GACrC,mCAAW,2BAA2B;AAAA;AAGzC,MAAM,wBAAwB,CAAC,UAAuC;AACpE,QAAM;AAAA,IACJ;AAAA,IACA,MAAM,EAAE,MAAM;AAAA,IACd;AAAA,MACE;AAEJ,MAAI,OAAO,SAAS,YAAY,CAAC,CAAC,8BAA8B,OAAO;AACrE,UAAM,uBAAuB,8BAA8B;AAC3D,UAAM,gBAAgB,KAAK,UAAU,UAAU;AAC/C,UAAM,UAAU;AAAA,SACX;AAAA,MACH,UAAU,KAAK,KAAK,UAAU,QAAQ,gBAAgB;AAAA;AAExD,WAAO,mDAAC,sBAAD;AAAA,MAAsB,MAAM;AAAA,MAAS;AAAA;AAAA;AAG9C,SAAO,mDAAC,WAAD;AAAA,IAAW;AAAA,IAAY;AAAA;AAAA;AAGzB,MAAM,0BAA0B,CAAC,UAAuC;AAC7E,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,QACA;AAAA,QACA;AAAA;AAAA;AAA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A,IAAO,eAAY;AAAA,KACnD,kBAAkB,mDAAC,gBAAD;AAAA,IAAgB;AAAA,IAAU;AAAA;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/outOfTheBox/ItemControlledDrilldown/styled.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAmB;AACnB,qBAAiB;AAEV,MAAM,cAAc,sCAAO;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,sCAAO;AAAA;AAAA,WAEtB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/outOfTheBox/ItemHeader/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* 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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAAmC;AACnC,qBAAiB;AACjB,uCAA2C;AAC3C,8BAA6B;AAE7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iCAAD;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,mDAAC,oBAAD;AAAA,IAAoB;AAAA,IAAY;AAAA,OAElC,mDAAC,2BAAD;AAAA,IACE,IAAI,SAAS,QAAQ;AAAA,IACrB,IAAG;AAAA,IACH,IAAG;AAAA,IACH,eAAa,mBAAmB;AAAA,IAChC;AAAA,KAEC,kBAAkB,aAAa,mDAAC,6DAAD;AAAA,IAA4B,OAAO;AAAA,IAAO,WAAU;AAAA,OAAoB,QAE1G,mDAAC,wBAAD;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,mDAAC,gBAAD;AAAA,IAAgB;AAAA,IAAU;AAAA,OAE9C,mBACC,mDAAC,wBAAD;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,mDAAC,iBAAD;AAAA,IAAiB;AAAA,IAAU;AAAA;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/outOfTheBox/ItemHeader/styled.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,qBAAiB;AACjB,sBAAiC;AACjC,+BAAmB;AAEZ,MAAM,cAAc,sCAAO;AAAA;AAAA,WAEvB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,gBACjC,CAAC,UAAW,MAAM,kBAAkB,YAAY,cAAc;AAAA;AAGvE,MAAM,oBAAoB,sCAAO;AAAA;AAAA;AAAA,yBAGf,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM;AAAA;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/outOfTheBox/ItemLink/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* 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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAmC;AACnC,qBAAiB;AACjB,uCAA2C;AAC3C,8BAA6B;AAE7B,oBAA4B;AAG5B,MAAM,uBAAuB,CAAC,eAAwB,CAAC,UACrD;AAAA,gCAC8B,aAAa,MAAM,OAAO,MAAM,OAAO;AAAA;AAAA;AAAA,kCAGrC,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