@elliemae/ds-left-navigation 3.22.0-next.3 → 3.22.0-next.31

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 (178) hide show
  1. package/dist/cjs/LeftNavigation.js +3 -3
  2. package/dist/cjs/LeftNavigation.js.map +3 -3
  3. package/dist/cjs/LeftNavigationContext.js +2 -1
  4. package/dist/cjs/LeftNavigationContext.js.map +3 -3
  5. package/dist/cjs/common/getItemBackgroundStyle.js.map +3 -3
  6. package/dist/cjs/common/getLeftBorderStyle.js.map +3 -3
  7. package/dist/cjs/common/getScrollbarStyle.js.map +1 -1
  8. package/dist/cjs/common/index.js.map +1 -1
  9. package/dist/cjs/configs/index.js.map +1 -1
  10. package/dist/cjs/configs/useLeftNavConfig.js +31 -26
  11. package/dist/cjs/configs/useLeftNavConfig.js.map +3 -3
  12. package/dist/cjs/configs/useLeftNavItems.js +4 -2
  13. package/dist/cjs/configs/useLeftNavItems.js.map +3 -3
  14. package/dist/cjs/configs/useLeftNavSmoothExpand.js.map +3 -3
  15. package/dist/cjs/constants/constants.js.map +1 -1
  16. package/dist/cjs/constants/index.js.map +1 -1
  17. package/dist/cjs/exported-related/ChevronItem/index.js.map +3 -3
  18. package/dist/cjs/exported-related/Icon/index.js.map +3 -3
  19. package/dist/cjs/exported-related/ItemRenderer/index.js +8 -5
  20. package/dist/cjs/exported-related/ItemRenderer/index.js.map +3 -3
  21. package/dist/cjs/exported-related/ItemRenderer/styled.js.map +2 -2
  22. package/dist/cjs/exported-related/ItemRenderer/usePropsWithDefaults.js.map +3 -3
  23. package/dist/cjs/exported-related/Notifications/index.js.map +1 -1
  24. package/dist/cjs/exported-related/OpenWindowItem/index.js.map +3 -3
  25. package/dist/cjs/exported-related/constants.js +13 -1
  26. package/dist/cjs/exported-related/constants.js.map +3 -3
  27. package/dist/cjs/exported-related/index.js.map +1 -1
  28. package/dist/cjs/hooks/index.js.map +1 -1
  29. package/dist/cjs/hooks/useExpandableOnClickHandler.js.map +3 -3
  30. package/dist/cjs/hooks/useKeyboardNavigation.js +2 -2
  31. package/dist/cjs/hooks/useKeyboardNavigation.js.map +3 -3
  32. package/dist/cjs/hooks/useOpenableOnClickHandler.js.map +3 -3
  33. package/dist/cjs/hooks/useSelectFirstBodyItem.js.map +3 -3
  34. package/dist/cjs/index.js +3 -3
  35. package/dist/cjs/index.js.map +3 -3
  36. package/dist/cjs/outOfTheBox/ItemControlledDrilldown/index.js.map +3 -3
  37. package/dist/cjs/outOfTheBox/ItemHeader/index.js +2 -1
  38. package/dist/cjs/outOfTheBox/ItemHeader/index.js.map +3 -3
  39. package/dist/cjs/outOfTheBox/ItemLink/index.js.map +3 -3
  40. package/dist/cjs/outOfTheBox/ItemSection/index.js.map +3 -3
  41. package/dist/cjs/outOfTheBox/ItemSeparator/index.js.map +3 -3
  42. package/dist/cjs/outOfTheBox/ItemSkeleton/index.js +7 -5
  43. package/dist/cjs/outOfTheBox/ItemSkeleton/index.js.map +3 -3
  44. package/dist/cjs/outOfTheBox/ItemSubmenu/index.js +2 -1
  45. package/dist/cjs/outOfTheBox/ItemSubmenu/index.js.map +3 -3
  46. package/dist/cjs/outOfTheBox/ItemTextLabel/index.js.map +3 -3
  47. package/dist/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +3 -3
  48. package/dist/cjs/outOfTheBox/ItemWithDate/index.js +1 -1
  49. package/dist/cjs/outOfTheBox/ItemWithDate/index.js.map +3 -3
  50. package/dist/cjs/outOfTheBox/index.js.map +3 -3
  51. package/dist/cjs/outOfTheBox/styled.js.map +2 -2
  52. package/dist/cjs/parts/LeftNavContent/index.js +30 -4
  53. package/dist/cjs/parts/LeftNavContent/index.js.map +3 -3
  54. package/dist/cjs/parts/LeftNavContent/styled.js +2 -2
  55. package/dist/cjs/parts/LeftNavContent/styled.js.map +3 -3
  56. package/dist/cjs/parts/LeftNavFooterItem/index.js +14 -5
  57. package/dist/cjs/parts/LeftNavFooterItem/index.js.map +3 -3
  58. package/dist/cjs/parts/LeftNavFooterItem/styled.js +1 -1
  59. package/dist/cjs/parts/LeftNavFooterItem/styled.js.map +3 -3
  60. package/dist/cjs/parts/LeftNavLoading/index.js.map +1 -1
  61. package/dist/cjs/parts/OutOfTheBoxMapItem.js +7 -1
  62. package/dist/cjs/parts/OutOfTheBoxMapItem.js.map +3 -3
  63. package/dist/cjs/{prop-types.js → react-desc-prop-types.js} +9 -6
  64. package/dist/cjs/react-desc-prop-types.js.map +7 -0
  65. package/dist/cjs/typescript-testing/typescript-left-navigation-valid.js +186 -0
  66. package/dist/cjs/typescript-testing/typescript-left-navigation-valid.js.map +7 -0
  67. package/dist/esm/LeftNavigation.js +1 -1
  68. package/dist/esm/LeftNavigation.js.map +3 -3
  69. package/dist/esm/LeftNavigationContext.js +2 -1
  70. package/dist/esm/LeftNavigationContext.js.map +3 -3
  71. package/dist/esm/common/getItemBackgroundStyle.js.map +3 -3
  72. package/dist/esm/common/getLeftBorderStyle.js.map +3 -3
  73. package/dist/esm/common/getScrollbarStyle.js.map +1 -1
  74. package/dist/esm/common/index.js.map +1 -1
  75. package/dist/esm/configs/index.js.map +1 -1
  76. package/dist/esm/configs/useLeftNavConfig.js +31 -26
  77. package/dist/esm/configs/useLeftNavConfig.js.map +3 -3
  78. package/dist/esm/configs/useLeftNavItems.js +4 -2
  79. package/dist/esm/configs/useLeftNavItems.js.map +3 -3
  80. package/dist/esm/configs/useLeftNavSmoothExpand.js.map +3 -3
  81. package/dist/esm/constants/constants.js.map +1 -1
  82. package/dist/esm/constants/index.js.map +1 -1
  83. package/dist/esm/exported-related/ChevronItem/index.js.map +3 -3
  84. package/dist/esm/exported-related/Icon/index.js.map +3 -3
  85. package/dist/esm/exported-related/ItemRenderer/index.js +8 -5
  86. package/dist/esm/exported-related/ItemRenderer/index.js.map +3 -3
  87. package/dist/esm/exported-related/ItemRenderer/styled.js.map +2 -2
  88. package/dist/esm/exported-related/ItemRenderer/usePropsWithDefaults.js.map +3 -3
  89. package/dist/esm/exported-related/Notifications/index.js.map +1 -1
  90. package/dist/esm/exported-related/OpenWindowItem/index.js.map +3 -3
  91. package/dist/esm/exported-related/constants.js +13 -1
  92. package/dist/esm/exported-related/constants.js.map +3 -3
  93. package/dist/esm/exported-related/index.js.map +1 -1
  94. package/dist/esm/hooks/index.js.map +1 -1
  95. package/dist/esm/hooks/useExpandableOnClickHandler.js.map +3 -3
  96. package/dist/esm/hooks/useKeyboardNavigation.js +2 -2
  97. package/dist/esm/hooks/useKeyboardNavigation.js.map +3 -3
  98. package/dist/esm/hooks/useOpenableOnClickHandler.js.map +3 -3
  99. package/dist/esm/hooks/useSelectFirstBodyItem.js.map +3 -3
  100. package/dist/esm/index.js +1 -1
  101. package/dist/esm/index.js.map +3 -3
  102. package/dist/esm/outOfTheBox/ItemControlledDrilldown/index.js.map +3 -3
  103. package/dist/esm/outOfTheBox/ItemHeader/index.js +2 -1
  104. package/dist/esm/outOfTheBox/ItemHeader/index.js.map +3 -3
  105. package/dist/esm/outOfTheBox/ItemLink/index.js.map +3 -3
  106. package/dist/esm/outOfTheBox/ItemSection/index.js.map +3 -3
  107. package/dist/esm/outOfTheBox/ItemSeparator/index.js.map +3 -3
  108. package/dist/esm/outOfTheBox/ItemSkeleton/index.js +7 -5
  109. package/dist/esm/outOfTheBox/ItemSkeleton/index.js.map +3 -3
  110. package/dist/esm/outOfTheBox/ItemSubmenu/index.js +2 -1
  111. package/dist/esm/outOfTheBox/ItemSubmenu/index.js.map +3 -3
  112. package/dist/esm/outOfTheBox/ItemTextLabel/index.js.map +3 -3
  113. package/dist/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +3 -3
  114. package/dist/esm/outOfTheBox/ItemWithDate/index.js +1 -1
  115. package/dist/esm/outOfTheBox/ItemWithDate/index.js.map +3 -3
  116. package/dist/esm/outOfTheBox/index.js.map +3 -3
  117. package/dist/esm/outOfTheBox/styled.js.map +2 -2
  118. package/dist/esm/parts/LeftNavContent/index.js +30 -4
  119. package/dist/esm/parts/LeftNavContent/index.js.map +3 -3
  120. package/dist/esm/parts/LeftNavContent/styled.js +2 -2
  121. package/dist/esm/parts/LeftNavContent/styled.js.map +3 -3
  122. package/dist/esm/parts/LeftNavFooterItem/index.js +15 -6
  123. package/dist/esm/parts/LeftNavFooterItem/index.js.map +3 -3
  124. package/dist/esm/parts/LeftNavFooterItem/styled.js +1 -1
  125. package/dist/esm/parts/LeftNavFooterItem/styled.js.map +3 -3
  126. package/dist/esm/parts/LeftNavLoading/index.js.map +1 -1
  127. package/dist/esm/parts/OutOfTheBoxMapItem.js +7 -1
  128. package/dist/esm/parts/OutOfTheBoxMapItem.js.map +3 -3
  129. package/dist/esm/{prop-types.js → react-desc-prop-types.js} +6 -3
  130. package/dist/esm/react-desc-prop-types.js.map +7 -0
  131. package/dist/esm/typescript-testing/typescript-left-navigation-valid.js +163 -0
  132. package/dist/esm/typescript-testing/typescript-left-navigation-valid.js.map +7 -0
  133. package/dist/types/LeftNavigation.d.ts +6 -17
  134. package/dist/types/LeftNavigationContext.d.ts +4 -4
  135. package/dist/types/common/getItemBackgroundStyle.d.ts +2 -2
  136. package/dist/types/common/getLeftBorderStyle.d.ts +2 -2
  137. package/dist/types/configs/useLeftNavConfig.d.ts +16 -3
  138. package/dist/types/configs/useLeftNavItems.d.ts +5 -5
  139. package/dist/types/configs/useLeftNavSmoothExpand.d.ts +2 -2
  140. package/dist/types/exported-related/ChevronItem/index.d.ts +3 -1
  141. package/dist/types/exported-related/Icon/index.d.ts +2 -1
  142. package/dist/types/exported-related/ItemRenderer/index.d.ts +2 -2
  143. package/dist/types/exported-related/ItemRenderer/styled.d.ts +1 -0
  144. package/dist/types/exported-related/ItemRenderer/usePropsWithDefaults.d.ts +2 -2
  145. package/dist/types/exported-related/Notifications/index.d.ts +1 -0
  146. package/dist/types/exported-related/OpenWindowItem/index.d.ts +3 -1
  147. package/dist/types/exported-related/constants.d.ts +11 -0
  148. package/dist/types/hooks/useExpandableOnClickHandler.d.ts +2 -2
  149. package/dist/types/hooks/useKeyboardNavigation.d.ts +4 -4
  150. package/dist/types/hooks/useOpenableOnClickHandler.d.ts +3 -2
  151. package/dist/types/hooks/useSelectFirstBodyItem.d.ts +2 -2
  152. package/dist/types/index.d.ts +1 -1
  153. package/dist/types/outOfTheBox/ItemControlledDrilldown/index.d.ts +3 -2
  154. package/dist/types/outOfTheBox/ItemHeader/index.d.ts +3 -2
  155. package/dist/types/outOfTheBox/ItemLink/index.d.ts +3 -2
  156. package/dist/types/outOfTheBox/ItemSection/index.d.ts +3 -2
  157. package/dist/types/outOfTheBox/ItemSeparator/index.d.ts +3 -2
  158. package/dist/types/outOfTheBox/ItemSkeleton/index.d.ts +8 -2
  159. package/dist/types/outOfTheBox/ItemSubmenu/index.d.ts +3 -2
  160. package/dist/types/outOfTheBox/ItemTextLabel/index.d.ts +3 -2
  161. package/dist/types/outOfTheBox/ItemUncontrolledDrilldown/index.d.ts +3 -2
  162. package/dist/types/outOfTheBox/ItemWithDate/index.d.ts +3 -2
  163. package/dist/types/outOfTheBox/index.d.ts +2 -2
  164. package/dist/types/outOfTheBox/styled.d.ts +2 -1
  165. package/dist/types/parts/LeftNavContent/styled.d.ts +2 -0
  166. package/dist/types/parts/LeftNavFooterItem/styled.d.ts +6 -4
  167. package/dist/types/parts/OutOfTheBoxMapItem.d.ts +2 -2
  168. package/dist/types/react-desc-prop-types.d.ts +100 -0
  169. package/dist/types/typescript-testing/typescript-left-navigation-valid.d.ts +1 -0
  170. package/package.json +17 -17
  171. package/dist/cjs/index.d.js +0 -28
  172. package/dist/cjs/index.d.js.map +0 -7
  173. package/dist/cjs/prop-types.js.map +0 -7
  174. package/dist/esm/index.d.js +0 -2
  175. package/dist/esm/index.d.js.map +0 -7
  176. package/dist/esm/prop-types.js.map +0 -7
  177. package/dist/types/index.d.d.ts +0 -78
  178. package/dist/types/prop-types.d.ts +0 -22
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/OutOfTheBoxMapItem.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { outOfTheBoxComponents } from '../outOfTheBox/index.js';\nimport type { OutOfTheBoxMapItemT } from '../index.d';\nimport { LeftNavContext } from '../LeftNavigationContext.js';\n\nexport const OutOfTheBoxMapItem: React.ComponentType<OutOfTheBoxMapItemT> = (props) => {\n const {\n item,\n item: { type, Component },\n } = props;\n const ctx = React.useContext(LeftNavContext);\n\n if (typeof type === 'string' && !!outOfTheBoxComponents[type]) {\n const OutOfTheBoxComponent = outOfTheBoxComponents[type];\n return <OutOfTheBoxComponent item={{ itemOpts: {}, ...item }} ctx={ctx} />;\n }\n if (!Component) return null;\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"],
5
- "mappings": "AAAA,YAAY,WAAW;ACcZ;AAdX,OAAOA,YAAW;AAClB,SAAS,6BAA6B;AAEtC,SAAS,sBAAsB;AAExB,MAAM,qBAA+D,CAAC,UAAU;AACrF,QAAM;AAAA,IACJ;AAAA,IACA,MAAM,EAAE,MAAM,UAAU;AAAA,EAC1B,IAAI;AACJ,QAAM,MAAMA,OAAM,WAAW,cAAc;AAE3C,MAAI,OAAO,SAAS,YAAY,CAAC,CAAC,sBAAsB,IAAI,GAAG;AAC7D,UAAM,uBAAuB,sBAAsB,IAAI;AACvD,WAAO,oBAAC,wBAAqB,MAAM,EAAE,UAAU,CAAC,GAAG,GAAG,KAAK,GAAG,KAAU;AAAA,EAC1E;AACA,MAAI,CAAC;AAAW,WAAO;AAEvB,SAAO,oBAAC,aAAU,MAAY,KAAU;AAC1C;",
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/OutOfTheBoxMapItem.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { outOfTheBoxComponents } from '../outOfTheBox/index.js';\nimport type { DSLeftNavigationT } from '../react-desc-prop-types.js';\nimport { LeftNavContext } from '../LeftNavigationContext.js';\n\nexport const OutOfTheBoxMapItem: React.ComponentType<DSLeftNavigationT.OutOfTheBoxMapItemT> = (props) => {\n const {\n item,\n item: { type, Component },\n } = props;\n const ctx = React.useContext(LeftNavContext);\n\n const finalItem = {\n ...item,\n itemOpts: {\n ...item.itemOpts,\n },\n };\n if (typeof type === 'string' && !!outOfTheBoxComponents[type]) {\n const OutOfTheBoxComponent = outOfTheBoxComponents[type];\n return <OutOfTheBoxComponent item={finalItem} ctx={ctx} />;\n }\n if (!Component) return null;\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"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACoBZ;AApBX,OAAOA,YAAW;AAClB,SAAS,6BAA6B;AAEtC,SAAS,sBAAsB;AAExB,MAAM,qBAAiF,CAAC,UAAU;AACvG,QAAM;AAAA,IACJ;AAAA,IACA,MAAM,EAAE,MAAM,UAAU;AAAA,EAC1B,IAAI;AACJ,QAAM,MAAMA,OAAM,WAAW,cAAc;AAE3C,QAAM,YAAY;AAAA,IAChB,GAAG;AAAA,IACH,UAAU;AAAA,MACR,GAAG,KAAK;AAAA,IACV;AAAA,EACF;AACA,MAAI,OAAO,SAAS,YAAY,CAAC,CAAC,sBAAsB,IAAI,GAAG;AAC7D,UAAM,uBAAuB,sBAAsB,IAAI;AACvD,WAAO,oBAAC,wBAAqB,MAAM,WAAW,KAAU;AAAA,EAC1D;AACA,MAAI,CAAC;AAAW,WAAO;AAEvB,SAAO,oBAAC,aAAU,MAAY,KAAU;AAC1C;",
6
6
  "names": ["React"]
7
7
  }
@@ -15,13 +15,16 @@ const leftNavigationProps = {
15
15
  expanded: PropTypes.bool.description("Whether to show the left navigation expanded or collapsed").defaultValue(false),
16
16
  loading: PropTypes.bool.description("Whether the left-nav is loading").defaultValue(false),
17
17
  openedItem: PropTypes.string.description("The id of the left navigation item you want to be opened").defaultValue(null),
18
- footerLabel: PropTypes.string.description("The label to show in the footer item"),
18
+ footerLabel: PropTypes.oneOfType([PropTypes.node, PropTypes.string]).description(
19
+ "The label to show in the footer item"
20
+ ),
19
21
  onFooterExpand: PropTypes.func.description("The function to call when the left-nav is opened via the footer"),
20
22
  onFooterClose: PropTypes.func.description("The function to call when the left-nav is closed via the footer"),
21
23
  onSelectedChange: PropTypes.func.description("A callback which triggers when the selected item changes").defaultValue(() => null),
22
24
  onFocusChange: PropTypes.func.description("A callback which triggers when the focused item changes").defaultValue(() => null),
23
25
  items: PropTypes.arrayOf(PropTypes.object).description("The array of items you want to render inside the left nav").defaultValue([]),
24
- disableDefaultSelection: PropTypes.bool.description("Whether you do not want to automatically select the first body item").defaultValue(false)
26
+ disableDefaultSelection: PropTypes.bool.description("Whether you do not want to automatically select the first body item").defaultValue(false),
27
+ isSkeleton: PropTypes.bool.description("Whether the component is in skeleton mode").defaultValue(false)
25
28
  };
26
29
  const LeftNavItemProps = () => null;
27
30
  LeftNavItemProps.displayName = "LeftNavItemProps";
@@ -37,4 +40,4 @@ export {
37
40
  leftNavItemProps,
38
41
  leftNavigationProps
39
42
  };
40
- //# sourceMappingURL=prop-types.js.map
43
+ //# sourceMappingURL=react-desc-prop-types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { WeakValidationMap } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { type Theme } from '@elliemae/ds-system';\nimport type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';\n\nimport { outOfTheBoxTypes } from './outOfTheBox/index.js';\nimport type { ContextProps } from './LeftNavigationContext.js';\n\ntype ColorsKey = keyof Theme['colors'];\n\nexport declare namespace DSLeftNavigationT {\n export type LabelOveflowT = 'wrap' | 'wrapAll' | 'truncate';\n\n export interface DefaultProps {\n expanded: boolean;\n expandedWidth: string;\n openedItem: string | null;\n items: GenericItemItemProps[];\n footerLabel: string | JSX.Element;\n labelOverflow: LabelOveflowT;\n onSelectedChange: (item: string | null) => void;\n onFocusChange: (item: string | null) => void;\n onFooterExpand: () => void;\n onFooterClose: () => void;\n onItemClick: (item: GenericItemItemProps, e: React.MouseEvent<HTMLElement>) => void;\n loading: boolean;\n isSkeleton: boolean;\n }\n export interface OptionalProps {\n selectedItem?: string | null;\n selectedParent?: string | null;\n disableDefaultSelection?: boolean;\n withoutBodyShadow?: boolean;\n actionRef?: React.RefObject<{ setFocusedItem: React.Dispatch<React.SetStateAction<string | null>> }>;\n HeaderComponent?: GenericItemItemProps;\n BodyHeaderComponent?: GenericItemItemProps;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps>,\n XstyledProps {}\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps>,\n XstyledProps {}\n\n export 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\n export interface ItemOptsT extends Record<string, unknown> {\n label?: string | JSX.Element;\n labelBold?: boolean;\n labelColor?: [ColorsKey, keyof Theme['colors'][ColorsKey]];\n labelOverflow?: LabelOveflowT;\n labelRightSection?: string | JSX.Element;\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 skeletonVariant?: 'item' | 'subitem';\n }\n\n export interface ComponentProps {\n item: GenericItemItemProps;\n ctx: ContextProps;\n }\n export interface GenericItemItemProps {\n dsId?: string;\n type?: string;\n CollapsedComponent?: React.ComponentType<ComponentProps> | null;\n Component?: React.ComponentType<ComponentProps>;\n itemOpts: ItemOptsT;\n }\n export interface OutOfTheBoxMapItemT {\n item: GenericItemItemProps;\n }\n export interface ItemRendererT {\n item: GenericItemItemProps;\n subitems?: JSX.Element[];\n minHeight?: string;\n paddingTop?: string;\n onClick?: () => void;\n shadowStyle?: (opened: boolean, type?: string) => (theme: Theme) => string;\n hasBorderBottom?: boolean;\n borderBottomMr?: string;\n children: React.ReactNode;\n }\n}\nexport const leftNavItemProps = {\n type: PropTypes.oneOf(outOfTheBoxTypes).description('out of the box types'),\n dsId: PropTypes.string.description('unique identifier for the left nav item'),\n Component: PropTypes.func.description(\n \"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\",\n ),\n CollapsedComponent: PropTypes.func.description('A component which is renderer when the left-nav is collapsed'),\n itemOpts: PropTypes.object.description('Item options'),\n};\n\nexport const leftNavigationProps = {\n containerProps: PropTypes.shape({ expandedWidth: PropTypes.string })\n .description('Set of Properties attached to the main container')\n .defaultValue({ expandedWidth: '240px' }),\n expanded: PropTypes.bool.description('Whether to show the left navigation expanded or collapsed').defaultValue(false),\n loading: PropTypes.bool.description('Whether the left-nav is loading').defaultValue(false),\n openedItem: PropTypes.string\n .description('The id of the left navigation item you want to be opened')\n .defaultValue(null),\n footerLabel: PropTypes.oneOfType([PropTypes.node, PropTypes.string]).description(\n 'The label to show in the footer item',\n ),\n onFooterExpand: PropTypes.func.description('The function to call when the left-nav is opened via the footer'),\n onFooterClose: PropTypes.func.description('The function to call when the left-nav is closed via the footer'),\n onSelectedChange: PropTypes.func\n .description('A callback which triggers when the selected item changes')\n .defaultValue(() => null),\n onFocusChange: PropTypes.func\n .description('A callback which triggers when the focused item changes')\n .defaultValue(() => null),\n items: PropTypes.arrayOf(PropTypes.object)\n .description('The array of items you want to render inside the left nav')\n .defaultValue([]),\n disableDefaultSelection: PropTypes.bool\n .description('Whether you do not want to automatically select the first body item')\n .defaultValue(false),\n isSkeleton: PropTypes.bool.description('Whether the component is in skeleton mode').defaultValue(false),\n} as unknown as WeakValidationMap<DSLeftNavigationT.Props>;\n\nconst LeftNavItemProps = () => null;\nLeftNavItemProps.displayName = 'LeftNavItemProps';\nexport const LeftNavItemPropsSchema = describe(LeftNavItemProps);\nLeftNavItemPropsSchema.propTypes = leftNavItemProps;\n\nconst LeftNavItemOptions = () => null;\nLeftNavItemOptions.displayName = 'LeftNavItemOptions';\nexport const LeftNavItemOptionsSchema = describe(LeftNavItemOptions);\nLeftNavItemOptionsSchema.propTypes = leftNavItemProps;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,WAAW,gBAAgB;AAIpC,SAAS,wBAAwB;AA2G1B,MAAM,mBAAmB;AAAA,EAC9B,MAAM,UAAU,MAAM,gBAAgB,EAAE,YAAY,sBAAsB;AAAA,EAC1E,MAAM,UAAU,OAAO,YAAY,yCAAyC;AAAA,EAC5E,WAAW,UAAU,KAAK;AAAA,IACxB;AAAA,EACF;AAAA,EACA,oBAAoB,UAAU,KAAK,YAAY,8DAA8D;AAAA,EAC7G,UAAU,UAAU,OAAO,YAAY,cAAc;AACvD;AAEO,MAAM,sBAAsB;AAAA,EACjC,gBAAgB,UAAU,MAAM,EAAE,eAAe,UAAU,OAAO,CAAC,EAChE,YAAY,kDAAkD,EAC9D,aAAa,EAAE,eAAe,QAAQ,CAAC;AAAA,EAC1C,UAAU,UAAU,KAAK,YAAY,2DAA2D,EAAE,aAAa,KAAK;AAAA,EACpH,SAAS,UAAU,KAAK,YAAY,iCAAiC,EAAE,aAAa,KAAK;AAAA,EACzF,YAAY,UAAU,OACnB,YAAY,0DAA0D,EACtE,aAAa,IAAI;AAAA,EACpB,aAAa,UAAU,UAAU,CAAC,UAAU,MAAM,UAAU,MAAM,CAAC,EAAE;AAAA,IACnE;AAAA,EACF;AAAA,EACA,gBAAgB,UAAU,KAAK,YAAY,iEAAiE;AAAA,EAC5G,eAAe,UAAU,KAAK,YAAY,iEAAiE;AAAA,EAC3G,kBAAkB,UAAU,KACzB,YAAY,0DAA0D,EACtE,aAAa,MAAM,IAAI;AAAA,EAC1B,eAAe,UAAU,KACtB,YAAY,yDAAyD,EACrE,aAAa,MAAM,IAAI;AAAA,EAC1B,OAAO,UAAU,QAAQ,UAAU,MAAM,EACtC,YAAY,2DAA2D,EACvE,aAAa,CAAC,CAAC;AAAA,EAClB,yBAAyB,UAAU,KAChC,YAAY,qEAAqE,EACjF,aAAa,KAAK;AAAA,EACrB,YAAY,UAAU,KAAK,YAAY,2CAA2C,EAAE,aAAa,KAAK;AACxG;AAEA,MAAM,mBAAmB,MAAM;AAC/B,iBAAiB,cAAc;AACxB,MAAM,yBAAyB,SAAS,gBAAgB;AAC/D,uBAAuB,YAAY;AAEnC,MAAM,qBAAqB,MAAM;AACjC,mBAAmB,cAAc;AAC1B,MAAM,2BAA2B,SAAS,kBAAkB;AACnE,yBAAyB,YAAY;",
6
+ "names": []
7
+ }
@@ -0,0 +1,163 @@
1
+ import * as React from "react";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { createRef } from "react";
4
+ import { LeftNavigation } from "../index.js";
5
+ import { ITEM_TYPES } from "../exported-related/constants.js";
6
+ const ref = createRef();
7
+ const testOptionalProps = {
8
+ selectedItem: "selected item",
9
+ selectedParent: "parent",
10
+ disableDefaultSelection: true,
11
+ withoutBodyShadow: true,
12
+ actionRef: ref,
13
+ HeaderComponent: {
14
+ type: ITEM_TYPES.LEFT_NAV_ITEM_HEADER,
15
+ dsId: "application-header-id",
16
+ CollapsedComponent: () => /* @__PURE__ */ jsx("div", {}),
17
+ itemOpts: {
18
+ label: "Notifications"
19
+ }
20
+ },
21
+ BodyHeaderComponent: {
22
+ type: ITEM_TYPES.LEFT_NAV_ITEM_SUBMENU,
23
+ dsId: "application-submenu-forms-id",
24
+ CollapsedComponent: () => /* @__PURE__ */ jsx("div", {}),
25
+ itemOpts: {
26
+ label: "Forms"
27
+ }
28
+ }
29
+ };
30
+ const testPartialDefaults = {};
31
+ const testProps = {
32
+ ...testOptionalProps,
33
+ ...testPartialDefaults
34
+ };
35
+ const testPropsAsSyntax = {
36
+ ...testOptionalProps,
37
+ ...testPartialDefaults
38
+ };
39
+ const testCompleteDefaults = {
40
+ expanded: true,
41
+ expandedWidth: "100px",
42
+ openedItem: "opened item",
43
+ items: [
44
+ {
45
+ type: ITEM_TYPES.LEFT_NAV_ITEM_HEADER,
46
+ dsId: "application-header-id",
47
+ CollapsedComponent: () => /* @__PURE__ */ jsx("div", {}),
48
+ itemOpts: {
49
+ label: "Notifications"
50
+ }
51
+ }
52
+ ],
53
+ footerLabel: "",
54
+ onSelectedChange: () => null,
55
+ onFocusChange: () => null,
56
+ onFooterExpand: () => null,
57
+ onFooterClose: () => null,
58
+ labelOverflow: "wrap",
59
+ onItemClick: () => null,
60
+ isSkeleton: false,
61
+ loading: false
62
+ };
63
+ const testInternalProps = {
64
+ ...testOptionalProps,
65
+ ...testCompleteDefaults
66
+ };
67
+ const testInternalPropsAsSyntax = {
68
+ ...testOptionalProps,
69
+ ...testCompleteDefaults
70
+ };
71
+ const testExplicitDefinition = {
72
+ expanded: true,
73
+ expandedWidth: "100px",
74
+ openedItem: "opened item",
75
+ items: [
76
+ {
77
+ type: ITEM_TYPES.LEFT_NAV_ITEM_HEADER,
78
+ dsId: "application-header-id",
79
+ CollapsedComponent: () => /* @__PURE__ */ jsx("div", {}),
80
+ itemOpts: {
81
+ label: "Notifications"
82
+ }
83
+ }
84
+ ],
85
+ footerLabel: "",
86
+ onSelectedChange: () => null,
87
+ onFocusChange: () => null,
88
+ onFooterExpand: () => null,
89
+ onFooterClose: () => null,
90
+ labelOverflow: "wrap",
91
+ onItemClick: () => null,
92
+ isSkeleton: false,
93
+ loading: false
94
+ };
95
+ const testInferedTypeCompatibility = {
96
+ expanded: true,
97
+ expandedWidth: "100px",
98
+ openedItem: "opened item",
99
+ items: [
100
+ {
101
+ type: ITEM_TYPES.LEFT_NAV_ITEM_HEADER,
102
+ dsId: "application-header-id",
103
+ CollapsedComponent: () => /* @__PURE__ */ jsx("div", {}),
104
+ itemOpts: {
105
+ label: "Notifications"
106
+ }
107
+ }
108
+ ],
109
+ footerLabel: "",
110
+ onSelectedChange: () => null,
111
+ onFocusChange: () => null,
112
+ onFooterExpand: () => null,
113
+ onFooterClose: () => null,
114
+ labelOverflow: "wrap",
115
+ onItemClick: () => null,
116
+ isSkeleton: false,
117
+ loading: false
118
+ };
119
+ const testDefinitionAsConst = {
120
+ expanded: true,
121
+ expandedWidth: "100px",
122
+ openedItem: "opened item",
123
+ footerLabel: "",
124
+ onSelectedChange: () => null,
125
+ onFocusChange: () => null,
126
+ onFooterExpand: () => null,
127
+ onFooterClose: () => null,
128
+ labelOverflow: "wrap",
129
+ onItemClick: () => null,
130
+ isSkeleton: false,
131
+ loading: false
132
+ };
133
+ const ExampleUsageComponent = () => /* @__PURE__ */ jsxs(Fragment, { children: [
134
+ /* @__PURE__ */ jsx(LeftNavigation, { ...testExplicitDefinition }),
135
+ /* @__PURE__ */ jsx(LeftNavigation, { ...testInferedTypeCompatibility }),
136
+ /* @__PURE__ */ jsx(LeftNavigation, { ...testDefinitionAsConst }),
137
+ /* @__PURE__ */ jsx(
138
+ LeftNavigation,
139
+ {
140
+ expanded: true,
141
+ expandedWidth: "100px",
142
+ openedItem: "opened item",
143
+ items: [
144
+ {
145
+ type: ITEM_TYPES.LEFT_NAV_ITEM_HEADER,
146
+ dsId: "application-header-id",
147
+ CollapsedComponent: () => /* @__PURE__ */ jsx("div", {}),
148
+ itemOpts: {
149
+ label: "Notifications"
150
+ }
151
+ }
152
+ ],
153
+ footerLabel: "",
154
+ onSelectedChange: () => null,
155
+ onFocusChange: () => null,
156
+ onFooterExpand: () => null,
157
+ onFooterClose: () => null,
158
+ labelOverflow: "wrap",
159
+ onItemClick: () => null
160
+ }
161
+ )
162
+ ] });
163
+ //# sourceMappingURL=typescript-left-navigation-valid.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-left-navigation-valid.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { createRef } from 'react';\nimport { LeftNavigation } from '../index.js';\nimport type { DSLeftNavigationT } from '../index.js';\nimport { ITEM_TYPES } from '../exported-related/constants.js';\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSLeftNavigationT.Props;\ntype ComponentPropsInternals = DSLeftNavigationT.InternalProps;\ntype ComponentPropsDefaultProps = DSLeftNavigationT.DefaultProps;\ntype ComponentPropsOptionalProps = DSLeftNavigationT.OptionalProps;\n\nconst ref = createRef<{ setFocusedItem: React.Dispatch<React.SetStateAction<string | null>> }>();\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n selectedItem: 'selected item',\n selectedParent: 'parent',\n disableDefaultSelection: true,\n withoutBodyShadow: true,\n actionRef: ref,\n HeaderComponent: {\n type: ITEM_TYPES.LEFT_NAV_ITEM_HEADER,\n dsId: 'application-header-id',\n CollapsedComponent: () => <div />,\n itemOpts: {\n label: 'Notifications',\n },\n },\n BodyHeaderComponent: {\n type: ITEM_TYPES.LEFT_NAV_ITEM_SUBMENU,\n dsId: 'application-submenu-forms-id',\n CollapsedComponent: () => <div />,\n itemOpts: {\n label: 'Forms',\n },\n },\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {};\nconst testProps: ComponentPropsForApp = {\n ...testOptionalProps,\n ...testPartialDefaults,\n};\nconst testPropsAsSyntax = {\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n expanded: true,\n expandedWidth: '100px',\n openedItem: 'opened item',\n items: [\n {\n type: ITEM_TYPES.LEFT_NAV_ITEM_HEADER,\n dsId: 'application-header-id',\n CollapsedComponent: () => <div />,\n itemOpts: {\n label: 'Notifications',\n },\n },\n ],\n footerLabel: '',\n onSelectedChange: () => null,\n onFocusChange: () => null,\n onFooterExpand: () => null,\n onFooterClose: () => null,\n labelOverflow: 'wrap',\n onItemClick: () => null,\n isSkeleton: false,\n loading: false,\n};\nconst testInternalProps: ComponentPropsInternals = {\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\nconst testInternalPropsAsSyntax = {\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n expanded: true,\n expandedWidth: '100px',\n openedItem: 'opened item',\n items: [\n {\n type: ITEM_TYPES.LEFT_NAV_ITEM_HEADER,\n dsId: 'application-header-id',\n CollapsedComponent: () => <div />,\n itemOpts: {\n label: 'Notifications',\n },\n },\n ],\n footerLabel: '',\n onSelectedChange: () => null,\n onFocusChange: () => null,\n onFooterExpand: () => null,\n onFooterClose: () => null,\n labelOverflow: 'wrap',\n onItemClick: () => null,\n isSkeleton: false,\n loading: false,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n expanded: true,\n expandedWidth: '100px',\n openedItem: 'opened item',\n items: [\n {\n type: ITEM_TYPES.LEFT_NAV_ITEM_HEADER,\n dsId: 'application-header-id',\n CollapsedComponent: () => <div />,\n itemOpts: {\n label: 'Notifications',\n },\n },\n ],\n footerLabel: '',\n onSelectedChange: () => null,\n onFocusChange: () => null,\n onFooterExpand: () => null,\n onFooterClose: () => null,\n labelOverflow: 'wrap',\n onItemClick: () => null,\n isSkeleton: false,\n loading: false,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n expanded: true,\n expandedWidth: '100px',\n openedItem: 'opened item',\n footerLabel: '',\n onSelectedChange: () => null,\n onFocusChange: () => null,\n onFooterExpand: () => null,\n onFooterClose: () => null,\n labelOverflow: 'wrap',\n onItemClick: () => null,\n isSkeleton: false,\n loading: false,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <LeftNavigation {...testExplicitDefinition} />\n <LeftNavigation {...testInferedTypeCompatibility} />\n <LeftNavigation {...testDefinitionAsConst} />\n {/* works with inline values */}\n <LeftNavigation\n expanded\n expandedWidth=\"100px\"\n openedItem=\"opened item\"\n items={[\n {\n type: ITEM_TYPES.LEFT_NAV_ITEM_HEADER,\n dsId: 'application-header-id',\n CollapsedComponent: () => <div />,\n itemOpts: {\n label: 'Notifications',\n },\n },\n ]}\n footerLabel=\"\"\n onSelectedChange={() => null}\n onFocusChange={() => null}\n onFooterExpand={() => null}\n onFooterClose={() => null}\n labelOverflow=\"wrap\"\n onItemClick={() => null}\n />\n </>\n);\n"],
5
+ "mappings": "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",
6
+ "names": []
7
+ }
@@ -1,20 +1,9 @@
1
- import type { LeftNavProps } from './index.d';
1
+ import React from 'react';
2
+ import type { DSLeftNavigationT } from './react-desc-prop-types.js';
2
3
  export declare const LeftNavigation: {
3
- (props: LeftNavProps): JSX.Element;
4
- propTypes: {
5
- containerProps: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
6
- expanded: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
7
- loading: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
8
- openedItem: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
9
- footerLabel: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
10
- onFooterExpand: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
11
- onFooterClose: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
12
- onSelectedChange: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
13
- onFocusChange: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
14
- items: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
15
- disableDefaultSelection: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
16
- };
17
- defaultProps: LeftNavProps;
4
+ (props: DSLeftNavigationT.Props): JSX.Element;
5
+ propTypes: React.WeakValidationMap<DSLeftNavigationT.Props>;
6
+ defaultProps: DSLeftNavigationT.DefaultProps;
18
7
  displayName: string;
19
8
  };
20
- export declare const LeftNavigationWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<LeftNavProps>;
9
+ export declare const LeftNavigationWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<DSLeftNavigationT.Props>;
@@ -1,6 +1,6 @@
1
1
  import type { MutableRefObject, RefObject } from 'react';
2
2
  import type React from 'react';
3
- import type { LeftNavProps } from './index.d';
3
+ import type { DSLeftNavigationT } from './react-desc-prop-types.js';
4
4
  export type ContextProps = {
5
5
  selectedItem: string | null;
6
6
  setSelectedItem: React.Dispatch<React.SetStateAction<string | null>>;
@@ -11,11 +11,11 @@ export type ContextProps = {
11
11
  openedDrilldowns: string[];
12
12
  setOpenedDrilldowns: React.Dispatch<React.SetStateAction<string[]>>;
13
13
  visibleItems: string[];
14
- visibleItemsRefs: MutableRefObject<Record<string, RefObject<HTMLElement>>>;
15
- leftNavProps: LeftNavProps;
14
+ visibleItemsRefs: MutableRefObject<Record<string, RefObject<HTMLDivElement>>>;
15
+ leftNavProps: DSLeftNavigationT.InternalProps;
16
16
  expandedForAnimation: boolean;
17
17
  };
18
- export declare const defaultProps: LeftNavProps;
18
+ export declare const defaultProps: DSLeftNavigationT.DefaultProps;
19
19
  export declare const defaultContext: ContextProps;
20
20
  export declare const LeftNavContext: React.Context<ContextProps>;
21
21
  export default LeftNavContext;
@@ -1,6 +1,6 @@
1
1
  import type { Theme } from '@elliemae/ds-system';
2
2
  export declare const getItemBackgroundStyle: (props: {
3
3
  theme: Theme;
4
- selected: boolean;
5
- opened: boolean;
4
+ selected?: boolean;
5
+ opened?: boolean;
6
6
  }) => string;
@@ -1,6 +1,6 @@
1
1
  import type { Theme } from '@elliemae/ds-system';
2
2
  export declare const getLeftBorderStyle: (props: {
3
3
  theme: Theme;
4
- selected: boolean;
5
- selectedParent: boolean;
4
+ selected?: boolean;
5
+ selectedParent?: boolean;
6
6
  }) => string;
@@ -1,4 +1,17 @@
1
- import type { LeftNavProps } from '../index.d';
2
- import type { ContextProps } from '../LeftNavigationContext.js';
3
- export declare const useLeftNavConfig: (props: LeftNavProps) => ContextProps;
1
+ import React from 'react';
2
+ import type { DSLeftNavigationT } from '../react-desc-prop-types.js';
3
+ export declare const useLeftNavConfig: (props: DSLeftNavigationT.Props) => {
4
+ leftNavProps: DSLeftNavigationT.InternalProps;
5
+ expandedForAnimation: boolean;
6
+ selectedItem: string | null;
7
+ setSelectedItem: React.Dispatch<React.SetStateAction<string | null>>;
8
+ selectedParent: string | null;
9
+ setSelectedParent: React.Dispatch<React.SetStateAction<string | null>>;
10
+ focusedItem: string | null;
11
+ setFocusedItem: React.Dispatch<React.SetStateAction<string | null>>;
12
+ openedDrilldowns: string[];
13
+ setOpenedDrilldowns: React.Dispatch<React.SetStateAction<string[]>>;
14
+ visibleItems: string[];
15
+ visibleItemsRefs: React.MutableRefObject<Record<string, React.RefObject<HTMLDivElement>>>;
16
+ };
4
17
  export default useLeftNavConfig;
@@ -1,12 +1,12 @@
1
1
  import type { MutableRefObject, RefObject } from 'react';
2
- import type { GenericItemItemProps } from '../index.d';
2
+ import type { DSLeftNavigationT } from '../react-desc-prop-types.js';
3
3
  export declare const useLeftNavItems: (props: {
4
- headerItem: GenericItemItemProps;
5
- bodyHeaderItem: GenericItemItemProps;
6
- items: GenericItemItemProps[];
4
+ headerItem?: DSLeftNavigationT.GenericItemItemProps;
5
+ bodyHeaderItem?: DSLeftNavigationT.GenericItemItemProps;
6
+ items?: DSLeftNavigationT.GenericItemItemProps[];
7
7
  openedDrilldowns: string[];
8
8
  }) => {
9
9
  visibleItems: string[];
10
- visibleItemsRefs: MutableRefObject<Record<string, RefObject<HTMLElement>>>;
10
+ visibleItemsRefs: MutableRefObject<Record<string, RefObject<HTMLDivElement>>>;
11
11
  };
12
12
  export default useLeftNavItems;
@@ -1,10 +1,10 @@
1
1
  /// <reference types="node" />
2
2
  import React from 'react';
3
- import type { LeftNavProps } from '../index.d';
3
+ import type { DSLeftNavigationT } from '../react-desc-prop-types.js';
4
4
  interface SmoothExpandOptsT {
5
5
  expandedForAnimation: boolean;
6
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: DSLeftNavigationT.Props, smoothExpandOpts: SmoothExpandOptsT) => void;
10
10
  export default useLeftNavSmoothExpand;
@@ -1,2 +1,4 @@
1
- export declare const ChevronItem: (props: unknown) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import { type SvgIconT } from '@elliemae/ds-icons';
3
+ export declare const ChevronItem: (props?: SvgIconT.Props) => JSX.Element;
2
4
  export default ChevronItem;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
+ import { type SvgIconT } from '@elliemae/ds-icons';
2
3
  export declare const Icon: (IconComponent: React.ComponentType<{
3
4
  color: unknown;
4
5
  tabIndex: number;
5
- }>) => (props: unknown) => JSX.Element;
6
+ }>) => (props?: SvgIconT.Props) => JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import type { ItemRendererT } from '../../index.d';
3
- export declare const ItemRenderer: React.ComponentType<ItemRendererT>;
2
+ import type { DSLeftNavigationT } from '../../react-desc-prop-types.js';
3
+ export declare const ItemRenderer: React.ComponentType<DSLeftNavigationT.ItemRendererT>;
@@ -10,6 +10,7 @@ interface ItemProps {
10
10
  export declare const borderOutside: (color: string, weight?: number) => string;
11
11
  export declare const StyledItem: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/dist/types/react-desc-prop-types.js").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, Theme, {
12
12
  minHeight: string;
13
+ selectedParent: boolean;
13
14
  } & ItemProps & import("@elliemae/ds-system").OwnerInterface, never>;
14
15
  export declare const StyledCollapsedContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/dist/types/react-desc-prop-types.js").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, Theme, object & import("@elliemae/ds-system").OwnerInterface, never>;
15
16
  export declare const StyledBorderBottom: import("styled-components").StyledComponent<"div", Theme, {
@@ -1,2 +1,2 @@
1
- import type { ItemRendererT } from '../../index.d';
2
- export declare const usePropsWithDefaults: (props: ItemRendererT) => Required<ItemRendererT>;
1
+ import type { DSLeftNavigationT } from '../../react-desc-prop-types.js';
2
+ export declare const usePropsWithDefaults: (props: DSLeftNavigationT.ItemRendererT) => Required<DSLeftNavigationT.ItemRendererT>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type NotificationsProps = {
2
3
  exceptions?: boolean;
3
4
  alerts?: boolean;
@@ -1,2 +1,4 @@
1
- export declare const OpenWindow: (props: unknown) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import { type SvgIconT } from '@elliemae/ds-icons';
3
+ export declare const OpenWindow: (props: SvgIconT.Props) => JSX.Element;
2
4
  export default OpenWindow;
@@ -15,6 +15,17 @@ export declare const ITEM_TYPES: {
15
15
  LEFT_NAV_ITEM_TEXT_LABEL: string;
16
16
  LEFT_NAV_ITEM_WITH_DATE: string;
17
17
  };
18
+ export declare const MAP_ITEMS_TO_SKELETON: {
19
+ readonly 'ds-left-nav-item-header': "item";
20
+ readonly 'ds-left-nav-item-link': "subitem";
21
+ readonly 'ds-left-nav-item-submenu': "item";
22
+ readonly 'ds-left-nav-item-controlled-drilldown': "subitem";
23
+ readonly 'ds-left-nav-item-uncontrolled-drilldown': "subitem";
24
+ readonly 'ds-left-nav-item-section': "subitem";
25
+ readonly 'ds-left-nav-item-separator': "subitem";
26
+ readonly 'ds-left-nav-item-text-label': "subitem";
27
+ readonly 'ds-left-nav-item-with-date': "subitem";
28
+ };
18
29
  export declare const FOOTER_DS_ID = "ds-left-nav-__internal__-footer";
19
30
  export declare const FOOTER_MENU_CLOSE_DS_ID = "ds-left-nav-__internal__-footer-menu-close";
20
31
  export declare const CHEVRON_BACK_DS_ID = "ds-left-nav-__internal__-chevron-back";
@@ -1,9 +1,9 @@
1
1
  import type React from 'react';
2
- type useExpandableOnClickHandlerProps = {
2
+ type UseExpandableOnClickHandlerProps = {
3
3
  id: string;
4
4
  onExpand: React.MouseEventHandler & React.KeyboardEventHandler;
5
5
  onOpen: React.MouseEventHandler & React.KeyboardEventHandler;
6
6
  selectable?: boolean;
7
7
  };
8
- export declare const useExpandableOnClickHandler: ({ id, onExpand, onOpen, selectable, }: useExpandableOnClickHandlerProps) => (e: React.MouseEvent<HTMLElement>) => void;
8
+ export declare const useExpandableOnClickHandler: ({ id, onExpand, onOpen, selectable, }: UseExpandableOnClickHandlerProps) => (e: React.MouseEvent<HTMLElement>) => void;
9
9
  export {};
@@ -1,8 +1,8 @@
1
1
  import type React from 'react';
2
- import type { GenericItemItemProps } from '../index.d';
3
- type useKeyboardNavigationProps = {
4
- item: GenericItemItemProps;
2
+ import type { DSLeftNavigationT } from '../react-desc-prop-types.js';
3
+ type UseKeyboardNavigationProps = {
4
+ item: DSLeftNavigationT.GenericItemItemProps;
5
5
  onClick: (e: any) => void;
6
6
  };
7
- export declare const useKeyboardNavigation: ({ item, onClick }: useKeyboardNavigationProps) => React.KeyboardEventHandler;
7
+ export declare const useKeyboardNavigation: ({ item, onClick }: UseKeyboardNavigationProps) => React.KeyboardEventHandler;
8
8
  export {};
@@ -1,9 +1,10 @@
1
- type useOpenableOnClickHandlerProps = {
1
+ /// <reference types="react" />
2
+ type UseOpenableOnClickHandlerProps = {
2
3
  id: string;
3
4
  onExpand: React.MouseEventHandler & React.KeyboardEventHandler;
4
5
  onOpen: React.MouseEventHandler & React.KeyboardEventHandler;
5
6
  onClose: React.MouseEventHandler & React.KeyboardEventHandler;
6
7
  opened: boolean;
7
8
  };
8
- export declare const useOpenableOnClickHandler: ({ id, opened, onExpand, onOpen, onClose, }: useOpenableOnClickHandlerProps) => (e: React.MouseEvent<HTMLElement>) => void;
9
+ export declare const useOpenableOnClickHandler: ({ id, opened, onExpand, onOpen, onClose, }: UseOpenableOnClickHandlerProps) => (e: React.MouseEvent<HTMLElement>) => void;
9
10
  export {};
@@ -1,3 +1,3 @@
1
1
  import type React from 'react';
2
- import type { GenericItemItemProps } from '../index.d';
3
- export declare const useSelectFirstBodyItem: (items: GenericItemItemProps[], openedItem: string | null, selectedItem: string | null, setSelectedItem: React.Dispatch<React.SetStateAction<string | null>>, disableDefaultSelection: boolean | undefined) => void;
2
+ import type { DSLeftNavigationT } from '../react-desc-prop-types.js';
3
+ export declare const useSelectFirstBodyItem: (items: DSLeftNavigationT.GenericItemItemProps[], openedItem: string | null, selectedItem: string | null, setSelectedItem: React.Dispatch<React.SetStateAction<string | null>>, disableDefaultSelection: boolean | undefined) => void;
@@ -1,6 +1,6 @@
1
1
  import { LeftNavigation } from './LeftNavigation.js';
2
2
  export default LeftNavigation;
3
- export { LeftNavItemPropsSchema, LeftNavItemOptionsSchema } from './prop-types.js';
3
+ export { LeftNavItemPropsSchema, LeftNavItemOptionsSchema, type DSLeftNavigationT } from './react-desc-prop-types.js';
4
4
  export { LeftNavigation, LeftNavigationWithSchema } from './LeftNavigation.js';
5
5
  export * from './exported-related/index.js';
6
6
  export * from './constants/index.js';
@@ -1,2 +1,3 @@
1
- import type { ComponentProps } from '../../index.d';
2
- export declare const ItemControlledDrilldown: (props: ComponentProps) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import type { DSLeftNavigationT } from '../../react-desc-prop-types.js';
3
+ export declare const ItemControlledDrilldown: (props: DSLeftNavigationT.ComponentProps) => JSX.Element;
@@ -1,2 +1,3 @@
1
- import type { ComponentProps } from '../../index.d';
2
- export declare const ItemHeader: (props: ComponentProps) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import type { DSLeftNavigationT } from '../../react-desc-prop-types.js';
3
+ export declare const ItemHeader: (props: DSLeftNavigationT.ComponentProps) => JSX.Element;
@@ -1,2 +1,3 @@
1
- import type { ComponentProps } from '../../index.d';
2
- export declare const ItemLink: (props: ComponentProps) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import type { DSLeftNavigationT } from '../../react-desc-prop-types.js';
3
+ export declare const ItemLink: (props: DSLeftNavigationT.ComponentProps) => JSX.Element;
@@ -1,2 +1,3 @@
1
- import type { ComponentProps } from '../../index.d';
2
- export declare const ItemSection: (props: ComponentProps) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import type { DSLeftNavigationT } from '../../react-desc-prop-types.js';
3
+ export declare const ItemSection: (props: DSLeftNavigationT.ComponentProps) => JSX.Element;
@@ -1,2 +1,3 @@
1
- import type { ComponentProps } from '../../index.d';
2
- export declare const ItemSeparator: (props: ComponentProps) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import type { DSLeftNavigationT } from '../../react-desc-prop-types.js';
3
+ export declare const ItemSeparator: (props: DSLeftNavigationT.ComponentProps) => JSX.Element;
@@ -1,2 +1,8 @@
1
- import type { ComponentProps } from '../../index.d';
2
- export declare const ItemSkeleton: (props: ComponentProps) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import type { DSLeftNavigationT } from '../../react-desc-prop-types.js';
3
+ interface SkeletonPropsT {
4
+ item: DSLeftNavigationT.ComponentProps['item'];
5
+ hasBorderBottom?: boolean;
6
+ }
7
+ export declare const ItemSkeleton: (props: SkeletonPropsT) => JSX.Element;
8
+ export {};
@@ -1,2 +1,3 @@
1
- import type { ComponentProps } from '../../index.d';
2
- export declare const ItemSubmenu: (props: ComponentProps) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import type { DSLeftNavigationT } from '../../react-desc-prop-types.js';
3
+ export declare const ItemSubmenu: (props: DSLeftNavigationT.ComponentProps) => JSX.Element;
@@ -1,2 +1,3 @@
1
- import type { ComponentProps } from '../../index.d';
2
- export declare const ItemTextLabel: (props: ComponentProps) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import type { DSLeftNavigationT } from '../../react-desc-prop-types.js';
3
+ export declare const ItemTextLabel: (props: DSLeftNavigationT.ComponentProps) => JSX.Element;
@@ -1,2 +1,3 @@
1
- import type { ComponentProps } from '../../index.d';
2
- export declare const ItemUncontrolledDrilldown: (props: ComponentProps) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import type { DSLeftNavigationT } from '../../react-desc-prop-types.js';
3
+ export declare const ItemUncontrolledDrilldown: (props: DSLeftNavigationT.ComponentProps) => JSX.Element;
@@ -1,2 +1,3 @@
1
- import type { ComponentProps } from '../../index.d';
2
- export declare const ItemWithDate: (props: ComponentProps) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import type { DSLeftNavigationT } from '../../react-desc-prop-types.js';
3
+ export declare const ItemWithDate: (props: DSLeftNavigationT.ComponentProps) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import type React from 'react';
2
- import type { ComponentProps } from '../index.d';
2
+ import type { DSLeftNavigationT } from '../react-desc-prop-types.js';
3
3
  export * from './ItemControlledDrilldown/index.js';
4
4
  export * from './ItemUncontrolledDrilldown/index.js';
5
5
  export * from './ItemHeader/index.js';
@@ -11,4 +11,4 @@ export * from './ItemSubmenu/index.js';
11
11
  export * from './ItemTextLabel/index.js';
12
12
  export * from './ItemWithDate/index.js';
13
13
  export declare const outOfTheBoxTypes: string[];
14
- export declare const outOfTheBoxComponents: Record<string, React.ComponentType<ComponentProps>>;
14
+ export declare const outOfTheBoxComponents: Record<string, React.ComponentType<DSLeftNavigationT.ComponentProps>>;