@elliemae/ds-left-navigation 3.60.0-next.6 → 3.60.0-next.60

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 (159) hide show
  1. package/dist/cjs/LeftNavigation.js +3 -3
  2. package/dist/cjs/LeftNavigation.js.map +2 -2
  3. package/dist/cjs/LeftNavigationContext.js +3 -19
  4. package/dist/cjs/LeftNavigationContext.js.map +2 -2
  5. package/dist/cjs/{configs → config}/index.js +5 -5
  6. package/dist/cjs/{configs → config}/index.js.map +2 -2
  7. package/dist/cjs/{configs → config}/useLeftNavConfig.js +4 -4
  8. package/dist/cjs/config/useLeftNavConfig.js.map +7 -0
  9. package/dist/cjs/{configs → config}/useLeftNavItems.js +4 -5
  10. package/dist/cjs/config/useLeftNavItems.js.map +7 -0
  11. package/dist/cjs/{configs → config}/useLeftNavSmoothExpand.js.map +1 -1
  12. package/dist/cjs/constants/{constants.js → index.js} +41 -2
  13. package/dist/cjs/constants/{constants.js.map → index.js.map} +3 -3
  14. package/dist/cjs/exported-related/ItemRenderer/index.js +12 -3
  15. package/dist/cjs/exported-related/ItemRenderer/index.js.map +3 -3
  16. package/dist/cjs/exported-related/ItemRenderer/styled.js +1 -1
  17. package/dist/cjs/exported-related/ItemRenderer/styled.js.map +1 -1
  18. package/dist/cjs/exported-related/Notifications/index.js +60 -42
  19. package/dist/cjs/exported-related/Notifications/index.js.map +3 -3
  20. package/dist/cjs/exported-related/index.js +16 -7
  21. package/dist/cjs/exported-related/index.js.map +2 -2
  22. package/dist/cjs/hooks/useKeyboardNavigation.js +1 -1
  23. package/dist/cjs/hooks/useKeyboardNavigation.js.map +1 -1
  24. package/dist/cjs/hooks/useSelectFirstBodyItem.js +1 -1
  25. package/dist/cjs/hooks/useSelectFirstBodyItem.js.map +2 -2
  26. package/dist/cjs/index.js +16 -4
  27. package/dist/cjs/index.js.map +2 -2
  28. package/dist/cjs/outOfTheBox/ItemControlledDrilldown/index.js +16 -5
  29. package/dist/cjs/outOfTheBox/ItemControlledDrilldown/index.js.map +3 -3
  30. package/dist/cjs/outOfTheBox/ItemHeader/index.js +20 -8
  31. package/dist/cjs/outOfTheBox/ItemHeader/index.js.map +3 -3
  32. package/dist/cjs/outOfTheBox/ItemLink/index.js +11 -2
  33. package/dist/cjs/outOfTheBox/ItemLink/index.js.map +3 -3
  34. package/dist/cjs/outOfTheBox/ItemSection/index.js +23 -4
  35. package/dist/cjs/outOfTheBox/ItemSection/index.js.map +3 -3
  36. package/dist/cjs/outOfTheBox/ItemSeparator/index.js +11 -3
  37. package/dist/cjs/outOfTheBox/ItemSeparator/index.js.map +3 -3
  38. package/dist/cjs/outOfTheBox/ItemSkeleton/index.js +11 -2
  39. package/dist/cjs/outOfTheBox/ItemSkeleton/index.js.map +3 -3
  40. package/dist/cjs/outOfTheBox/ItemSubmenu/index.js +17 -5
  41. package/dist/cjs/outOfTheBox/ItemSubmenu/index.js.map +3 -3
  42. package/dist/cjs/outOfTheBox/ItemTextLabel/index.js +7 -1
  43. package/dist/cjs/outOfTheBox/ItemTextLabel/index.js.map +3 -3
  44. package/dist/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js +16 -5
  45. package/dist/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +3 -3
  46. package/dist/cjs/outOfTheBox/ItemWithDate/index.js +11 -1
  47. package/dist/cjs/outOfTheBox/ItemWithDate/index.js.map +3 -3
  48. package/dist/cjs/outOfTheBox/index.js +6 -8
  49. package/dist/cjs/outOfTheBox/index.js.map +2 -2
  50. package/dist/cjs/outOfTheBox/styled.js +1 -1
  51. package/dist/cjs/outOfTheBox/styled.js.map +1 -1
  52. package/dist/cjs/parts/LeftNavContent/index.js +24 -3
  53. package/dist/cjs/parts/LeftNavContent/index.js.map +2 -2
  54. package/dist/cjs/parts/LeftNavContent/styled.js +1 -1
  55. package/dist/cjs/parts/LeftNavContent/styled.js.map +1 -1
  56. package/dist/cjs/parts/LeftNavFooterItem/index.js +13 -13
  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 +1 -1
  60. package/dist/cjs/parts/LeftNavLoading/index.js +26 -10
  61. package/dist/cjs/parts/LeftNavLoading/index.js.map +3 -3
  62. package/dist/cjs/react-desc-prop-types.js +52 -22
  63. package/dist/cjs/react-desc-prop-types.js.map +2 -2
  64. package/dist/cjs/typescript-testing/slot-props.js +94 -0
  65. package/dist/cjs/typescript-testing/slot-props.js.map +7 -0
  66. package/dist/cjs/typescript-testing/typescript-left-navigation-valid.js +1 -1
  67. package/dist/cjs/typescript-testing/typescript-left-navigation-valid.js.map +1 -1
  68. package/dist/esm/LeftNavigation.js +4 -4
  69. package/dist/esm/LeftNavigation.js.map +2 -2
  70. package/dist/esm/LeftNavigationContext.js +2 -18
  71. package/dist/esm/LeftNavigationContext.js.map +2 -2
  72. package/dist/esm/{configs → config}/index.js +2 -2
  73. package/dist/esm/{configs → config}/index.js.map +2 -2
  74. package/dist/esm/{configs → config}/useLeftNavConfig.js +3 -3
  75. package/dist/esm/config/useLeftNavConfig.js.map +7 -0
  76. package/dist/esm/{configs → config}/useLeftNavItems.js +1 -2
  77. package/dist/esm/config/useLeftNavItems.js.map +7 -0
  78. package/dist/esm/{configs → config}/useLeftNavSmoothExpand.js.map +1 -1
  79. package/dist/esm/constants/{constants.js → index.js} +41 -2
  80. package/dist/esm/constants/{constants.js.map → index.js.map} +3 -3
  81. package/dist/esm/exported-related/ItemRenderer/index.js +12 -3
  82. package/dist/esm/exported-related/ItemRenderer/index.js.map +3 -3
  83. package/dist/esm/exported-related/ItemRenderer/styled.js +1 -1
  84. package/dist/esm/exported-related/ItemRenderer/styled.js.map +1 -1
  85. package/dist/esm/exported-related/Notifications/index.js +60 -42
  86. package/dist/esm/exported-related/Notifications/index.js.map +3 -3
  87. package/dist/esm/exported-related/index.js +12 -6
  88. package/dist/esm/exported-related/index.js.map +2 -2
  89. package/dist/esm/hooks/useKeyboardNavigation.js +1 -1
  90. package/dist/esm/hooks/useKeyboardNavigation.js.map +1 -1
  91. package/dist/esm/hooks/useSelectFirstBodyItem.js +1 -1
  92. package/dist/esm/hooks/useSelectFirstBodyItem.js.map +2 -2
  93. package/dist/esm/index.js +31 -7
  94. package/dist/esm/index.js.map +2 -2
  95. package/dist/esm/outOfTheBox/ItemControlledDrilldown/index.js +14 -3
  96. package/dist/esm/outOfTheBox/ItemControlledDrilldown/index.js.map +3 -3
  97. package/dist/esm/outOfTheBox/ItemHeader/index.js +18 -6
  98. package/dist/esm/outOfTheBox/ItemHeader/index.js.map +3 -3
  99. package/dist/esm/outOfTheBox/ItemLink/index.js +11 -2
  100. package/dist/esm/outOfTheBox/ItemLink/index.js.map +3 -3
  101. package/dist/esm/outOfTheBox/ItemSection/index.js +27 -8
  102. package/dist/esm/outOfTheBox/ItemSection/index.js.map +3 -3
  103. package/dist/esm/outOfTheBox/ItemSeparator/index.js +11 -3
  104. package/dist/esm/outOfTheBox/ItemSeparator/index.js.map +3 -3
  105. package/dist/esm/outOfTheBox/ItemSkeleton/index.js +11 -2
  106. package/dist/esm/outOfTheBox/ItemSkeleton/index.js.map +3 -3
  107. package/dist/esm/outOfTheBox/ItemSubmenu/index.js +16 -4
  108. package/dist/esm/outOfTheBox/ItemSubmenu/index.js.map +3 -3
  109. package/dist/esm/outOfTheBox/ItemTextLabel/index.js +7 -1
  110. package/dist/esm/outOfTheBox/ItemTextLabel/index.js.map +3 -3
  111. package/dist/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js +14 -3
  112. package/dist/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +3 -3
  113. package/dist/esm/outOfTheBox/ItemWithDate/index.js +11 -1
  114. package/dist/esm/outOfTheBox/ItemWithDate/index.js.map +3 -3
  115. package/dist/esm/outOfTheBox/index.js +5 -7
  116. package/dist/esm/outOfTheBox/index.js.map +2 -2
  117. package/dist/esm/outOfTheBox/styled.js +1 -1
  118. package/dist/esm/outOfTheBox/styled.js.map +1 -1
  119. package/dist/esm/parts/LeftNavContent/index.js +24 -3
  120. package/dist/esm/parts/LeftNavContent/index.js.map +2 -2
  121. package/dist/esm/parts/LeftNavContent/styled.js +1 -1
  122. package/dist/esm/parts/LeftNavContent/styled.js.map +1 -1
  123. package/dist/esm/parts/LeftNavFooterItem/index.js +11 -11
  124. package/dist/esm/parts/LeftNavFooterItem/index.js.map +2 -2
  125. package/dist/esm/parts/LeftNavFooterItem/styled.js +1 -1
  126. package/dist/esm/parts/LeftNavFooterItem/styled.js.map +1 -1
  127. package/dist/esm/parts/LeftNavLoading/index.js +26 -10
  128. package/dist/esm/parts/LeftNavLoading/index.js.map +3 -3
  129. package/dist/esm/react-desc-prop-types.js +59 -23
  130. package/dist/esm/react-desc-prop-types.js.map +2 -2
  131. package/dist/esm/typescript-testing/slot-props.js +71 -0
  132. package/dist/esm/typescript-testing/slot-props.js.map +7 -0
  133. package/dist/esm/typescript-testing/typescript-left-navigation-valid.js +1 -1
  134. package/dist/esm/typescript-testing/typescript-left-navigation-valid.js.map +1 -1
  135. package/dist/types/LeftNavigationContext.d.ts +1 -2
  136. package/dist/types/constants/{constants.d.ts → index.d.ts} +32 -0
  137. package/dist/types/exported-related/index.d.ts +5 -6
  138. package/dist/types/index.d.ts +3 -3
  139. package/dist/types/outOfTheBox/ItemSkeleton/index.d.ts +1 -1
  140. package/dist/types/outOfTheBox/index.d.ts +1 -2
  141. package/dist/types/react-desc-prop-types.d.ts +47 -13
  142. package/dist/types/tests/LeftNavigation.exports.test.d.ts +1 -0
  143. package/dist/types/typescript-testing/slot-props.d.ts +1 -0
  144. package/package.json +27 -29
  145. package/dist/cjs/configs/useLeftNavConfig.js.map +0 -7
  146. package/dist/cjs/configs/useLeftNavItems.js.map +0 -7
  147. package/dist/cjs/exported-related/constants.js +0 -71
  148. package/dist/cjs/exported-related/constants.js.map +0 -7
  149. package/dist/esm/configs/useLeftNavConfig.js.map +0 -7
  150. package/dist/esm/configs/useLeftNavItems.js.map +0 -7
  151. package/dist/esm/exported-related/constants.js +0 -41
  152. package/dist/esm/exported-related/constants.js.map +0 -7
  153. package/dist/types/exported-related/constants.d.ts +0 -31
  154. /package/dist/cjs/{configs → config}/useLeftNavSmoothExpand.js +0 -0
  155. /package/dist/esm/{configs → config}/useLeftNavSmoothExpand.js +0 -0
  156. /package/dist/types/{configs → config}/index.d.ts +0 -0
  157. /package/dist/types/{configs → config}/useLeftNavConfig.d.ts +0 -0
  158. /package/dist/types/{configs → config}/useLeftNavItems.d.ts +0 -0
  159. /package/dist/types/{configs → config}/useLeftNavSmoothExpand.d.ts +0 -0
@@ -3,11 +3,10 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
3
  import { Grid } from "@elliemae/ds-grid";
4
4
  import { MenuCollapse, MenuExpand } from "@elliemae/ds-icons";
5
5
  import { DSSkeleton } from "@elliemae/ds-skeleton";
6
- import React2, { useCallback, useContext, useMemo } from "react";
7
6
  import { SimpleTruncatedTooltipText } from "@elliemae/ds-truncated-tooltip-text";
7
+ import React2, { useCallback, useContext, useMemo } from "react";
8
8
  import LeftNavigationContext from "../../LeftNavigationContext.js";
9
- import { LEFT_NAVIGATION_DATA_TESTID } from "../../constants/constants.js";
10
- import { FOOTER_DS_ID, FOOTER_MENU_CLOSE_DS_ID } from "../../exported-related/constants.js";
9
+ import { FOOTER_DS_ID, FOOTER_MENU_CLOSE_DS_ID, LEFT_NAVIGATION_DATA_TESTID } from "../../constants/index.js";
11
10
  import { useKeyboardNavigation } from "../../hooks/index.js";
12
11
  import {
13
12
  StyledFooterItem,
@@ -26,6 +25,8 @@ const LeftNavFooterItem = (props) => {
26
25
  visibleItemsRefs,
27
26
  leftNavProps
28
27
  } = useContext(LeftNavigationContext);
28
+ const getOwnerProps = React2.useCallback(() => leftNavProps, [leftNavProps]);
29
+ const getOwnerPropsArguments = React2.useCallback(() => ({}), []);
29
30
  const id = FOOTER_DS_ID;
30
31
  const handleOnClick = expandedForAnimation ? onFooterClose : onFooterExpand;
31
32
  const onKeyDown = useKeyboardNavigation({
@@ -48,12 +49,9 @@ const LeftNavFooterItem = (props) => {
48
49
  [handleOnClick, id, setFocusedItem]
49
50
  );
50
51
  const label = useMemo(() => {
51
- if (FooterLabelComponent) {
52
- return /* @__PURE__ */ jsx(FooterLabelComponent, {});
53
- }
54
- if (labelOverflow === "truncate") {
52
+ if (FooterLabelComponent) return /* @__PURE__ */ jsx(FooterLabelComponent, {});
53
+ if (labelOverflow === "truncate")
55
54
  return /* @__PURE__ */ jsx(SimpleTruncatedTooltipText, { value: footerLabel, placement: "bottom-start" });
56
- }
57
55
  return footerLabel;
58
56
  }, [footerLabel, FooterLabelComponent, labelOverflow]);
59
57
  const postAnimationButtonFocusHandler = useCallback(
@@ -72,13 +70,13 @@ const LeftNavFooterItem = (props) => {
72
70
  StyledFooterMenu,
73
71
  {
74
72
  "data-testid": LEFT_NAVIGATION_DATA_TESTID.FOOTER_MENU,
73
+ getOwnerProps,
74
+ getOwnerPropsArguments,
75
75
  children: /* @__PURE__ */ jsx(Grid, { height: "48px", justifyContent: "center", alignItems: "center", cols: ["1fr"], p: "xxs", children: /* @__PURE__ */ jsx(DSSkeleton, { variant: "rectangular", height: "24px" }) })
76
76
  },
77
77
  id
78
78
  );
79
79
  }
80
- const getOwnerProps = React2.useCallback(() => leftNavProps, [leftNavProps]);
81
- const getOwnerPropsArguments = React2.useCallback(() => ({}), []);
82
80
  return /* @__PURE__ */ jsx(
83
81
  StyledFooterMenu,
84
82
  {
@@ -130,7 +128,9 @@ const LeftNavFooterItem = (props) => {
130
128
  StyledFooterSeparator,
131
129
  {
132
130
  mt: "xxxs",
133
- "data-testid": LEFT_NAVIGATION_DATA_TESTID.FOOTER_SEPARATOR
131
+ "data-testid": LEFT_NAVIGATION_DATA_TESTID.FOOTER_SEPARATOR,
132
+ getOwnerProps,
133
+ getOwnerPropsArguments
134
134
  }
135
135
  ) : /* @__PURE__ */ jsx("div", {}),
136
136
  /* @__PURE__ */ jsx(
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/LeftNavFooterItem/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react-hooks/rules-of-hooks */\n/* eslint-disable max-lines */\nimport { Grid } from '@elliemae/ds-grid';\nimport { MenuCollapse, MenuExpand } from '@elliemae/ds-icons';\nimport { DSSkeleton } from '@elliemae/ds-skeleton';\nimport React, { useCallback, useContext, useMemo } from 'react';\n\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport LeftNavigationContext from '../../LeftNavigationContext.js';\nimport { LEFT_NAVIGATION_DATA_TESTID } from '../../constants/constants.js';\nimport { FOOTER_DS_ID, FOOTER_MENU_CLOSE_DS_ID } from '../../exported-related/constants.js';\nimport { useKeyboardNavigation } from '../../hooks/index.js';\nimport {\n StyledFooterItem,\n StyledFooterLabel,\n StyledFooterMenu,\n StyledFooterSeparator,\n StyledMenuCollapse,\n} from './styled.js';\n\ntype LeftNavFooterItemProps = {\n footerLabel: string;\n FooterLabelComponent?: React.ComponentType<unknown>;\n onFooterExpand: React.MouseEventHandler & React.KeyboardEventHandler;\n onFooterClose: React.MouseEventHandler & React.KeyboardEventHandler;\n};\n\n// eslint-disable-next-line complexity\nexport const LeftNavFooterItem: React.ComponentType<LeftNavFooterItemProps> = (props) => {\n const { footerLabel, FooterLabelComponent, onFooterExpand = () => null, onFooterClose = () => null } = props;\n const {\n leftNavProps: { labelOverflow, isSkeleton, hideFooterPipe, expanded },\n expandedForAnimation,\n setFocusedItem,\n focusedItem,\n visibleItemsRefs,\n leftNavProps,\n } = useContext(LeftNavigationContext);\n const id = FOOTER_DS_ID;\n\n const handleOnClick = expandedForAnimation ? onFooterClose : onFooterExpand;\n\n const onKeyDown = useKeyboardNavigation({\n item: {\n dsId: id,\n itemOpts: {\n selectable: !expandedForAnimation,\n openable: false,\n closable: false,\n },\n },\n onClick: handleOnClick,\n });\n\n const handleMenuCollapseClick = useCallback(\n (e: React.MouseEvent<HTMLButtonElement, MouseEvent> | React.KeyboardEvent<HTMLButtonElement>) => {\n e.stopPropagation();\n handleOnClick(e as React.MouseEvent<HTMLButtonElement, MouseEvent>);\n setFocusedItem(id);\n },\n [handleOnClick, id, setFocusedItem],\n );\n\n const label = useMemo(() => {\n if (FooterLabelComponent) {\n return <FooterLabelComponent />;\n }\n if (labelOverflow === 'truncate') {\n return <SimpleTruncatedTooltipText value={footerLabel} placement=\"bottom-start\" />;\n }\n return footerLabel;\n }, [footerLabel, FooterLabelComponent, labelOverflow]);\n\n const postAnimationButtonFocusHandler = useCallback(\n (newHTMLNode: HTMLButtonElement | null) => {\n if (newHTMLNode === null || !expanded) {\n return;\n }\n if (focusedItem === id) {\n newHTMLNode.focus();\n }\n },\n [focusedItem, id, expanded],\n );\n\n if (isSkeleton) {\n return (\n <StyledFooterMenu\n key={id}\n data-testid={LEFT_NAVIGATION_DATA_TESTID.FOOTER_MENU} // https://jira.elliemae.io/browse/PUI-15589\n >\n <Grid height=\"48px\" justifyContent=\"center\" alignItems=\"center\" cols={['1fr']} p=\"xxs\">\n <DSSkeleton variant=\"rectangular\" height=\"24px\" />\n </Grid>\n </StyledFooterMenu>\n );\n }\n\n const getOwnerProps = React.useCallback(() => leftNavProps, [leftNavProps]);\n\n const getOwnerPropsArguments = React.useCallback(() => ({}), []);\n\n return (\n <StyledFooterMenu\n key={id}\n data-testid={LEFT_NAVIGATION_DATA_TESTID.FOOTER_MENU} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledFooterItem\n innerRef={visibleItemsRefs.current[id]}\n tabIndex={expandedForAnimation ? -1 : 0}\n expanded={expandedForAnimation}\n pt=\"xxs2\"\n height={expandedForAnimation ? 'auto' : '48px'}\n alignItems=\"flex-start\"\n pl=\"xxs2\"\n cols={expandedForAnimation ? ['auto', '1fr', 'auto'] : ['38px']}\n onClick={expandedForAnimation ? () => null : handleOnClick}\n onKeyDown={onKeyDown}\n onFocus={() => setFocusedItem(id)}\n role=\"menuitem\"\n aria-label={\n expandedForAnimation\n ? `Footer, ${typeof footerLabel === 'string' ? footerLabel : ''}`\n : `Expand left navigation`\n }\n data-testid={LEFT_NAVIGATION_DATA_TESTID.FOOTER_ITEM} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {!expandedForAnimation ? (\n <MenuExpand\n size=\"m\"\n color={['brand-primary', '800']}\n // https://jira.elliemae.io/browse/PUI-15589\n // VERY SPECIAL CASE, THE SLOT FOOTER_BTN GOES TO THE ICON WHEN COLLAPSED, TO THE BTN WHEN EXPANDED\n data-testid={LEFT_NAVIGATION_DATA_TESTID.FOOTER_BTN}\n />\n ) : (\n <>\n <StyledFooterLabel\n mt=\"5px\"\n mr=\"12px\"\n mb=\"16px\"\n labelOverflow={labelOverflow}\n aria-live=\"polite\"\n data-testid={LEFT_NAVIGATION_DATA_TESTID.ITEM_LABEL} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {label}\n </StyledFooterLabel>\n {!hideFooterPipe ? (\n <StyledFooterSeparator\n mt=\"xxxs\"\n data-testid={LEFT_NAVIGATION_DATA_TESTID.FOOTER_SEPARATOR} // https://jira.elliemae.io/browse/PUI-15589\n />\n ) : (\n <div></div>\n )}\n <StyledMenuCollapse\n innerRef={postAnimationButtonFocusHandler}\n buttonType=\"raw\"\n onClick={handleMenuCollapseClick}\n tabIndex={0}\n onFocus={(e: React.FocusEvent) => {\n e.stopPropagation();\n setFocusedItem(FOOTER_MENU_CLOSE_DS_ID);\n }}\n role=\"button\"\n aria-label=\"Collapse left navigation\"\n // VERY SPECIAL CASE, THE SLOT FOOTER_BTN GOES TO THE ICON WHEN COLLAPSED, TO THE BTN WHEN EXPANDED\n data-testid={LEFT_NAVIGATION_DATA_TESTID.FOOTER_BTN}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <MenuCollapse size=\"m\" color={['brand-primary', '800']} />\n </StyledMenuCollapse>\n </>\n )}\n </StyledFooterItem>\n </StyledFooterMenu>\n );\n};\n\nexport default LeftNavFooterItem;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACiEV,SA2EH,UA3EG,KA2EH,YA3EG;AA/Db,SAAS,YAAY;AACrB,SAAS,cAAc,kBAAkB;AACzC,SAAS,kBAAkB;AAC3B,OAAOA,UAAS,aAAa,YAAY,eAAe;AAExD,SAAS,kCAAkC;AAC3C,OAAO,2BAA2B;AAClC,SAAS,mCAAmC;AAC5C,SAAS,cAAc,+BAA+B;AACtD,SAAS,6BAA6B;AACtC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAUA,MAAM,oBAAiE,CAAC,UAAU;AACvF,QAAM,EAAE,aAAa,sBAAsB,iBAAiB,MAAM,MAAM,gBAAgB,MAAM,KAAK,IAAI;AACvG,QAAM;AAAA,IACJ,cAAc,EAAE,eAAe,YAAY,gBAAgB,SAAS;AAAA,IACpE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,WAAW,qBAAqB;AACpC,QAAM,KAAK;AAEX,QAAM,gBAAgB,uBAAuB,gBAAgB;AAE7D,QAAM,YAAY,sBAAsB;AAAA,IACtC,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,UAAU;AAAA,QACR,YAAY,CAAC;AAAA,QACb,UAAU;AAAA,QACV,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,SAAS;AAAA,EACX,CAAC;AAED,QAAM,0BAA0B;AAAA,IAC9B,CAAC,MAAgG;AAC/F,QAAE,gBAAgB;AAClB,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Content": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react-hooks/rules-of-hooks */\n/* eslint-disable max-lines */\nimport { Grid } from '@elliemae/ds-grid';\nimport { MenuCollapse, MenuExpand } from '@elliemae/ds-icons';\nimport { DSSkeleton } from '@elliemae/ds-skeleton';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport React, { useCallback, useContext, useMemo } from 'react';\nimport LeftNavigationContext from '../../LeftNavigationContext.js';\nimport { FOOTER_DS_ID, FOOTER_MENU_CLOSE_DS_ID, LEFT_NAVIGATION_DATA_TESTID } from '../../constants/index.js';\nimport { useKeyboardNavigation } from '../../hooks/index.js';\nimport {\n StyledFooterItem,\n StyledFooterLabel,\n StyledFooterMenu,\n StyledFooterSeparator,\n StyledMenuCollapse,\n} from './styled.js';\n\ntype LeftNavFooterItemProps = {\n footerLabel: string;\n FooterLabelComponent?: React.ComponentType<unknown>;\n onFooterExpand: React.MouseEventHandler & React.KeyboardEventHandler;\n onFooterClose: React.MouseEventHandler & React.KeyboardEventHandler;\n};\n\n// eslint-disable-next-line complexity\nexport const LeftNavFooterItem: React.ComponentType<LeftNavFooterItemProps> = (props) => {\n const { footerLabel, FooterLabelComponent, onFooterExpand = () => null, onFooterClose = () => null } = props;\n const {\n leftNavProps: { labelOverflow, isSkeleton, hideFooterPipe, expanded },\n expandedForAnimation,\n setFocusedItem,\n focusedItem,\n visibleItemsRefs,\n leftNavProps,\n } = useContext(LeftNavigationContext);\n const getOwnerProps = React.useCallback(() => leftNavProps, [leftNavProps]);\n const getOwnerPropsArguments = React.useCallback(() => ({}), []);\n const id = FOOTER_DS_ID;\n\n const handleOnClick = expandedForAnimation ? onFooterClose : onFooterExpand;\n\n const onKeyDown = useKeyboardNavigation({\n item: {\n dsId: id,\n itemOpts: {\n selectable: !expandedForAnimation,\n openable: false,\n closable: false,\n },\n },\n onClick: handleOnClick,\n });\n\n const handleMenuCollapseClick = useCallback(\n (e: React.MouseEvent<HTMLButtonElement, MouseEvent> | React.KeyboardEvent<HTMLButtonElement>) => {\n e.stopPropagation();\n handleOnClick(e as React.MouseEvent<HTMLButtonElement, MouseEvent>);\n setFocusedItem(id);\n },\n [handleOnClick, id, setFocusedItem],\n );\n\n const label = useMemo(() => {\n if (FooterLabelComponent) return <FooterLabelComponent />;\n if (labelOverflow === 'truncate')\n return <SimpleTruncatedTooltipText value={footerLabel} placement=\"bottom-start\" />;\n return footerLabel;\n }, [footerLabel, FooterLabelComponent, labelOverflow]);\n\n const postAnimationButtonFocusHandler = useCallback(\n (newHTMLNode: HTMLButtonElement | null) => {\n if (newHTMLNode === null || !expanded) {\n return;\n }\n if (focusedItem === id) {\n newHTMLNode.focus();\n }\n },\n [focusedItem, id, expanded],\n );\n\n if (isSkeleton) {\n return (\n <StyledFooterMenu\n key={id}\n data-testid={LEFT_NAVIGATION_DATA_TESTID.FOOTER_MENU} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <Grid height=\"48px\" justifyContent=\"center\" alignItems=\"center\" cols={['1fr']} p=\"xxs\">\n <DSSkeleton variant=\"rectangular\" height=\"24px\" />\n </Grid>\n </StyledFooterMenu>\n );\n }\n\n return (\n <StyledFooterMenu\n key={id}\n data-testid={LEFT_NAVIGATION_DATA_TESTID.FOOTER_MENU} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledFooterItem\n innerRef={visibleItemsRefs.current[id]}\n tabIndex={expandedForAnimation ? -1 : 0}\n expanded={expandedForAnimation}\n pt=\"xxs2\"\n height={expandedForAnimation ? 'auto' : '48px'}\n alignItems=\"flex-start\"\n pl=\"xxs2\"\n cols={expandedForAnimation ? ['auto', '1fr', 'auto'] : ['38px']}\n onClick={expandedForAnimation ? () => null : handleOnClick}\n onKeyDown={onKeyDown}\n onFocus={() => setFocusedItem(id)}\n role=\"menuitem\"\n aria-label={\n expandedForAnimation\n ? `Footer, ${typeof footerLabel === 'string' ? footerLabel : ''}`\n : `Expand left navigation`\n }\n data-testid={LEFT_NAVIGATION_DATA_TESTID.FOOTER_ITEM} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {!expandedForAnimation ? (\n <MenuExpand\n size=\"m\"\n color={['brand-primary', '800']}\n // https://jira.elliemae.io/browse/PUI-15589\n // VERY SPECIAL CASE, THE SLOT FOOTER_BTN GOES TO THE ICON WHEN COLLAPSED, TO THE BTN WHEN EXPANDED\n data-testid={LEFT_NAVIGATION_DATA_TESTID.FOOTER_BTN}\n />\n ) : (\n <>\n <StyledFooterLabel\n mt=\"5px\"\n mr=\"12px\"\n mb=\"16px\"\n labelOverflow={labelOverflow}\n aria-live=\"polite\"\n data-testid={LEFT_NAVIGATION_DATA_TESTID.ITEM_LABEL} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {label}\n </StyledFooterLabel>\n {!hideFooterPipe ? (\n <StyledFooterSeparator\n mt=\"xxxs\"\n data-testid={LEFT_NAVIGATION_DATA_TESTID.FOOTER_SEPARATOR} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n ) : (\n <div></div>\n )}\n <StyledMenuCollapse\n innerRef={postAnimationButtonFocusHandler}\n buttonType=\"raw\"\n onClick={handleMenuCollapseClick}\n tabIndex={0}\n onFocus={(e: React.FocusEvent) => {\n e.stopPropagation();\n setFocusedItem(FOOTER_MENU_CLOSE_DS_ID);\n }}\n role=\"button\"\n aria-label=\"Collapse left navigation\"\n // VERY SPECIAL CASE, THE SLOT FOOTER_BTN GOES TO THE ICON WHEN COLLAPSED, TO THE BTN WHEN EXPANDED\n data-testid={LEFT_NAVIGATION_DATA_TESTID.FOOTER_BTN}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <MenuCollapse size=\"m\" color={['brand-primary', '800']} />\n </StyledMenuCollapse>\n </>\n )}\n </StyledFooterItem>\n </StyledFooterMenu>\n );\n};\n\nexport default LeftNavFooterItem;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACgEc,SAuE3B,UAvE2B,KAuE3B,YAvE2B;AA9DrC,SAAS,YAAY;AACrB,SAAS,cAAc,kBAAkB;AACzC,SAAS,kBAAkB;AAC3B,SAAS,kCAAkC;AAC3C,OAAOA,UAAS,aAAa,YAAY,eAAe;AACxD,OAAO,2BAA2B;AAClC,SAAS,cAAc,yBAAyB,mCAAmC;AACnF,SAAS,6BAA6B;AACtC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAUA,MAAM,oBAAiE,CAAC,UAAU;AACvF,QAAM,EAAE,aAAa,sBAAsB,iBAAiB,MAAM,MAAM,gBAAgB,MAAM,KAAK,IAAI;AACvG,QAAM;AAAA,IACJ,cAAc,EAAE,eAAe,YAAY,gBAAgB,SAAS;AAAA,IACpE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,WAAW,qBAAqB;AACpC,QAAM,gBAAgBA,OAAM,YAAY,MAAM,cAAc,CAAC,YAAY,CAAC;AAC1E,QAAM,yBAAyBA,OAAM,YAAY,OAAO,CAAC,IAAI,CAAC,CAAC;AAC/D,QAAM,KAAK;AAEX,QAAM,gBAAgB,uBAAuB,gBAAgB;AAE7D,QAAM,YAAY,sBAAsB;AAAA,IACtC,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,UAAU;AAAA,QACR,YAAY,CAAC;AAAA,QACb,UAAU;AAAA,QACV,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,SAAS;AAAA,EACX,CAAC;AAED,QAAM,0BAA0B;AAAA,IAC9B,CAAC,MAAgG;AAC/F,QAAE,gBAAg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S,MAAM,eAAe,EAAE;AAAA,UAChC,MAAK;AAAA,UACL,cACE,uBACI,WAAW,OAAO,gBAAgB,WAAW,cAAc,EAAE,KAC7D;AAAA,UAEN,eAAa,4BAA4B;AAAA,UACzC;AAAA,UACA;AAAA,UAEC,WAAC,uBACA;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,OAAO,CAAC,iBAAiB,KAAK;AAAA,cAG9B,eAAa,4BAA4B;AAAA;AAAA,UAC3C,IAEA,iCACE;AAAA;AAAA,cAAC;AAAA;AAAA,gBACC,IAAG;AAAA,gBACH,IAAG;AAAA,gBACH,IAAG;AAAA,gBACH;AAAA,gBACA,aAAU;AAAA,gBACV,eAAa,4BAA4B;AAAA,gBACzC;AAAA,gBACA;AAAA,gBAEC;AAAA;AAAA,YACH;AAAA,YACC,CAAC,iBACA;AAAA,cAAC;AAAA;AAAA,gBACC,IAAG;AAAA,gBACH,eAAa,4BAA4B;AAAA,gBACzC;AAAA,gBACA;AAAA;AAAA,YACF,IAEA,oBAAC,SAAI;AAAA,YAEP;AAAA,cAAC;AAAA;AAAA,gBACC,UAAU;AAAA,gBACV,YAAW;AAAA,gBACX,SAAS;AAAA,gBACT,UAAU;AAAA,gBACV,SAAS,CAAC,MAAwB;AAChC,oBAAE,gBAAgB;AAClB,iCAAe,uBAAuB;AAAA,gBACxC;AAAA,gBACA,MAAK;AAAA,gBACL,cAAW;AAAA,gBAEX,eAAa,4BAA4B;AAAA,gBACzC;AAAA,gBACA;AAAA,gBAEA,8BAAC,gBAAa,MAAK,KAAI,OAAO,CAAC,iBAAiB,KAAK,GAAG;AAAA;AAAA,YAC1D;AAAA,aACF;AAAA;AAAA,MAEJ;AAAA;AAAA,IA/EK;AAAA,EAgFP;AAEJ;AAEA,IAAO,4BAAQ;",
6
6
  "names": ["React"]
7
7
  }
@@ -3,7 +3,7 @@ import { styled } from "@elliemae/ds-system";
3
3
  import { DSButtonV2 } from "@elliemae/ds-button-v2";
4
4
  import { Grid } from "@elliemae/ds-grid";
5
5
  import { getLeftBorderStyle, getItemBackgroundStyle } from "../../common/index.js";
6
- import { DSLeftNavigationName, LEFT_NAVIGATION_SLOTS } from "../../constants/constants.js";
6
+ import { DSLeftNavigationName, LEFT_NAVIGATION_SLOTS } from "../../constants/index.js";
7
7
  const StyledFooterMenu = styled(Grid, { name: DSLeftNavigationName, slot: LEFT_NAVIGATION_SLOTS.FOOTER_MENU })`
8
8
  width: 100%;
9
9
  margin-top: auto;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/LeftNavFooterItem/styled.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\nimport { DSButtonV2 } from '@elliemae/ds-button-v2';\nimport { Grid } from '@elliemae/ds-grid';\nimport { getLeftBorderStyle, getItemBackgroundStyle } from '../../common/index.js';\nimport { DSLeftNavigationName, LEFT_NAVIGATION_SLOTS } from '../../constants/constants.js';\nimport type { DSLeftNavigationT } from '../../react-desc-prop-types.js';\n\nexport const StyledFooterMenu = styled(Grid, { name: DSLeftNavigationName, slot: LEFT_NAVIGATION_SLOTS.FOOTER_MENU })`\n width: 100%;\n margin-top: auto;\n background: ${(props) => props.theme.colors.neutral['000']};\n\n border-top: 1px solid ${(props) => props.theme.colors.neutral[100]};\n`;\n\nexport const StyledFooterItem = styled(Grid, { name: DSLeftNavigationName, slot: LEFT_NAVIGATION_SLOTS.FOOTER_ITEM })<{\n expanded?: boolean;\n opened?: boolean;\n selected?: boolean;\n selectedParent?: boolean;\n}>`\n position: relative;\n ${(props) => getLeftBorderStyle({ ...props })}\n\n min-height: 48px;\n cursor: ${(props) => (props.expanded ? 'auto' : 'pointer')};\n\n ${getItemBackgroundStyle}\n\n outline: none;\n\n :focus {\n &:before {\n content: '';\n position: absolute;\n height: 100%;\n width: 100%;\n top: 0;\n left: 0px;\n border: 2px solid ${(props) => props.theme.colors.brand[600]};\n pointer-events: none;\n }\n }\n`;\n\nexport const StyledFooterLabel = styled(Grid, {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.FOOTER_LABEL,\n})<{ labelOverflow?: DSLeftNavigationT.LabelOveflowT }>`\n font-size: 11px;\n color: ${(props) => props.theme.colors.neutral[500]};\n line-height: 14px;\n word-break: ${(props) => (props.labelOverflow === 'wrapAll' ? 'break-all' : 'normal')};\n`;\n\nexport const StyledFooterSeparator = styled(Grid, {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.FOOTER_SEPARATOR,\n})`\n height: 16px;\n width: 1px;\n background-color: ${(props) => props.theme.colors.neutral[100]};\n`;\n\nexport const StyledMenuCollapse = styled(DSButtonV2, {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.FOOTER_MENU_COLLAPSE,\n})`\n padding: 0;\n margin: 0 12px;\n :focus {\n outline: 2px solid ${(props) => props.theme.colors.brand[800]};\n }\n`;\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\nimport { DSButtonV2 } from '@elliemae/ds-button-v2';\nimport { Grid } from '@elliemae/ds-grid';\nimport { getLeftBorderStyle, getItemBackgroundStyle } from '../../common/index.js';\nimport { DSLeftNavigationName, LEFT_NAVIGATION_SLOTS } from '../../constants/index.js';\nimport type { DSLeftNavigationT } from '../../react-desc-prop-types.js';\n\nexport const StyledFooterMenu = styled(Grid, { name: DSLeftNavigationName, slot: LEFT_NAVIGATION_SLOTS.FOOTER_MENU })`\n width: 100%;\n margin-top: auto;\n background: ${(props) => props.theme.colors.neutral['000']};\n\n border-top: 1px solid ${(props) => props.theme.colors.neutral[100]};\n`;\n\nexport const StyledFooterItem = styled(Grid, { name: DSLeftNavigationName, slot: LEFT_NAVIGATION_SLOTS.FOOTER_ITEM })<{\n expanded?: boolean;\n opened?: boolean;\n selected?: boolean;\n selectedParent?: boolean;\n}>`\n position: relative;\n ${(props) => getLeftBorderStyle({ ...props })}\n\n min-height: 48px;\n cursor: ${(props) => (props.expanded ? 'auto' : 'pointer')};\n\n ${getItemBackgroundStyle}\n\n outline: none;\n\n :focus {\n &:before {\n content: '';\n position: absolute;\n height: 100%;\n width: 100%;\n top: 0;\n left: 0px;\n border: 2px solid ${(props) => props.theme.colors.brand[600]};\n pointer-events: none;\n }\n }\n`;\n\nexport const StyledFooterLabel = styled(Grid, {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.FOOTER_LABEL,\n})<{ labelOverflow?: DSLeftNavigationT.LabelOveflowT }>`\n font-size: 11px;\n color: ${(props) => props.theme.colors.neutral[500]};\n line-height: 14px;\n word-break: ${(props) => (props.labelOverflow === 'wrapAll' ? 'break-all' : 'normal')};\n`;\n\nexport const StyledFooterSeparator = styled(Grid, {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.FOOTER_SEPARATOR,\n})`\n height: 16px;\n width: 1px;\n background-color: ${(props) => props.theme.colors.neutral[100]};\n`;\n\nexport const StyledMenuCollapse = styled(DSButtonV2, {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.FOOTER_MENU_COLLAPSE,\n})`\n padding: 0;\n margin: 0 12px;\n :focus {\n outline: 2px solid ${(props) => props.theme.colors.brand[800]};\n }\n`;\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AACvB,SAAS,kBAAkB;AAC3B,SAAS,YAAY;AACrB,SAAS,oBAAoB,8BAA8B;AAC3D,SAAS,sBAAsB,6BAA6B;AAGrD,MAAM,mBAAmB,OAAO,MAAM,EAAE,MAAM,sBAAsB,MAAM,sBAAsB,YAAY,CAAC;AAAA;AAAA;AAAA,gBAGpG,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA,0BAElC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA;AAG7D,MAAM,mBAAmB,OAAO,MAAM,EAAE,MAAM,sBAAsB,MAAM,sBAAsB,YAAY,CAAC;AAAA;AAAA,IAOhH,CAAC,UAAU,mBAAmB,EAAE,GAAG,MAAM,CAAC,CAAC;AAAA;AAAA;AAAA,YAGnC,CAAC,UAAW,MAAM,WAAW,SAAS,SAAU;AAAA;AAAA,IAExD,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAYA,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA;AAM3D,MAAM,oBAAoB,OAAO,MAAM;AAAA,EAC5C,MAAM;AAAA,EACN,MAAM,sBAAsB;AAC9B,CAAC;AAAA;AAAA,WAEU,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA;AAAA,gBAErC,CAAC,UAAW,MAAM,kBAAkB,YAAY,cAAc,QAAS;AAAA;AAGhF,MAAM,wBAAwB,OAAO,MAAM;AAAA,EAChD,MAAM;AAAA,EACN,MAAM,sBAAsB;AAC9B,CAAC;AAAA;AAAA;AAAA,sBAGqB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA;AAGzD,MAAM,qBAAqB,OAAO,YAAY;AAAA,EACnD,MAAM;AAAA,EACN,MAAM,sBAAsB;AAC9B,CAAC;AAAA;AAAA;AAAA;AAAA,yBAIwB,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -3,22 +3,38 @@ import { jsx } from "react/jsx-runtime";
3
3
  import { DSCircularIndeterminateIndicator } from "@elliemae/ds-circular-progress-indicator";
4
4
  import Grid from "@elliemae/ds-grid";
5
5
  import { styled } from "@elliemae/ds-system";
6
- import { DSLeftNavigationName, LEFT_NAVIGATION_SLOTS } from "../../constants/constants.js";
6
+ import React2 from "react";
7
+ import { DSLeftNavigationName, LEFT_NAVIGATION_SLOTS } from "../../constants/index.js";
8
+ import LeftNavigationContext from "../../LeftNavigationContext.js";
7
9
  const StyledLoaderWrapper = styled(Grid, { name: DSLeftNavigationName, slot: LEFT_NAVIGATION_SLOTS.LOADER_WRAPPER })`
8
10
  height: 100%;
9
11
  place-items: center;
10
12
  z-index: 0;
11
13
  background-color: white;
12
14
  `;
13
- const LeftNavLoading = ({ expanded }) => /* @__PURE__ */ jsx(StyledLoaderWrapper, { role: "menuitem", "aria-label": "Loading...", children: /* @__PURE__ */ jsx(
14
- DSCircularIndeterminateIndicator,
15
- {
16
- size: expanded ? "l" : "s",
17
- text: "Loading...",
18
- showText: expanded,
19
- withTooltip: !expanded
20
- }
21
- ) });
15
+ const LeftNavLoading = ({ expanded }) => {
16
+ const { leftNavProps } = React2.useContext(LeftNavigationContext);
17
+ const getOwnerProps = React2.useCallback(() => leftNavProps, [leftNavProps]);
18
+ const getOwnerPropsArguments = React2.useCallback(() => ({}), []);
19
+ return /* @__PURE__ */ jsx(
20
+ StyledLoaderWrapper,
21
+ {
22
+ role: "menuitem",
23
+ "aria-label": "Loading...",
24
+ getOwnerProps,
25
+ getOwnerPropsArguments,
26
+ children: /* @__PURE__ */ jsx(
27
+ DSCircularIndeterminateIndicator,
28
+ {
29
+ size: expanded ? "l" : "s",
30
+ text: "Loading...",
31
+ showText: expanded,
32
+ withTooltip: !expanded
33
+ }
34
+ )
35
+ }
36
+ );
37
+ };
22
38
  export {
23
39
  LeftNavLoading
24
40
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/LeftNavLoading/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { DSCircularIndeterminateIndicator } from '@elliemae/ds-circular-progress-indicator';\nimport Grid from '@elliemae/ds-grid';\nimport { styled } from '@elliemae/ds-system';\nimport { DSLeftNavigationName, LEFT_NAVIGATION_SLOTS } from '../../constants/constants.js';\n\nconst StyledLoaderWrapper = styled(Grid, { name: DSLeftNavigationName, slot: LEFT_NAVIGATION_SLOTS.LOADER_WRAPPER })`\n height: 100%;\n place-items: center;\n z-index: 0;\n background-color: white;\n`;\n\nexport const LeftNavLoading: React.ComponentType<{ expanded: boolean }> = ({ expanded }) => (\n <StyledLoaderWrapper role=\"menuitem\" aria-label=\"Loading...\">\n <DSCircularIndeterminateIndicator\n size={expanded ? 'l' : 's'}\n text=\"Loading...\"\n showText={expanded}\n withTooltip={!expanded}\n />\n </StyledLoaderWrapper>\n);\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACenB;AAdJ,SAAS,wCAAwC;AACjD,OAAO,UAAU;AACjB,SAAS,cAAc;AACvB,SAAS,sBAAsB,6BAA6B;AAE5D,MAAM,sBAAsB,OAAO,MAAM,EAAE,MAAM,sBAAsB,MAAM,sBAAsB,eAAe,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAO5G,MAAM,iBAA6D,CAAC,EAAE,SAAS,MACpF,oBAAC,uBAAoB,MAAK,YAAW,cAAW,cAC9C;AAAA,EAAC;AAAA;AAAA,IACC,MAAM,WAAW,MAAM;AAAA,IACvB,MAAK;AAAA,IACL,UAAU;AAAA,IACV,aAAa,CAAC;AAAA;AAChB,GACF;",
6
- "names": []
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { DSCircularIndeterminateIndicator } from '@elliemae/ds-circular-progress-indicator';\nimport Grid from '@elliemae/ds-grid';\nimport { styled } from '@elliemae/ds-system';\nimport React from 'react';\nimport { DSLeftNavigationName, LEFT_NAVIGATION_SLOTS } from '../../constants/index.js';\nimport LeftNavigationContext from '../../LeftNavigationContext.js';\n\nconst StyledLoaderWrapper = styled(Grid, { name: DSLeftNavigationName, slot: LEFT_NAVIGATION_SLOTS.LOADER_WRAPPER })`\n height: 100%;\n place-items: center;\n z-index: 0;\n background-color: white;\n`;\n\nexport const LeftNavLoading: React.ComponentType<{ expanded: boolean }> = ({ expanded }) => {\n const { leftNavProps } = React.useContext(LeftNavigationContext);\n const getOwnerProps = React.useCallback(() => leftNavProps, [leftNavProps]);\n const getOwnerPropsArguments = React.useCallback(() => ({}), []);\n\n return (\n <StyledLoaderWrapper\n role=\"menuitem\"\n aria-label=\"Loading...\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <DSCircularIndeterminateIndicator\n size={expanded ? 'l' : 's'}\n text=\"Loading...\"\n showText={expanded}\n withTooltip={!expanded}\n />\n </StyledLoaderWrapper>\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC0BjB;AA1BN,SAAS,wCAAwC;AACjD,OAAO,UAAU;AACjB,SAAS,cAAc;AACvB,OAAOA,YAAW;AAClB,SAAS,sBAAsB,6BAA6B;AAC5D,OAAO,2BAA2B;AAElC,MAAM,sBAAsB,OAAO,MAAM,EAAE,MAAM,sBAAsB,MAAM,sBAAsB,eAAe,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAO5G,MAAM,iBAA6D,CAAC,EAAE,SAAS,MAAM;AAC1F,QAAM,EAAE,aAAa,IAAIA,OAAM,WAAW,qBAAqB;AAC/D,QAAM,gBAAgBA,OAAM,YAAY,MAAM,cAAc,CAAC,YAAY,CAAC;AAC1E,QAAM,yBAAyBA,OAAM,YAAY,OAAO,CAAC,IAAI,CAAC,CAAC;AAE/D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,cAAW;AAAA,MACX;AAAA,MACA;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC,MAAM,WAAW,MAAM;AAAA,UACvB,MAAK;AAAA,UACL,UAAU;AAAA,UACV,aAAa,CAAC;AAAA;AAAA,MAChB;AAAA;AAAA,EACF;AAEJ;",
6
+ "names": ["React"]
7
7
  }
@@ -1,45 +1,81 @@
1
1
  import * as React from "react";
2
- import { PropTypes, describe } from "@elliemae/ds-props-helpers";
3
- import { outOfTheBoxTypes } from "./outOfTheBox/index.js";
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"),
7
- Component: PropTypes.func.description(
8
- "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"
9
- ),
10
- CollapsedComponent: PropTypes.func.description("A component which is renderer when the left-nav is collapsed"),
11
- itemOpts: PropTypes.object.description("Item options")
2
+ import {
3
+ PropTypes,
4
+ describe,
5
+ getPropsPerSlotPropTypes,
6
+ globalAttributesPropTypes,
7
+ xstyledPropTypes
8
+ } from "@elliemae/ds-props-helpers";
9
+ import { DSLeftNavigationName, LEFT_NAVIGATION_SLOTS, outOfTheBoxTypes } from "./constants/index.js";
10
+ const defaultProps = {
11
+ expandedWidth: "240px",
12
+ loading: false,
13
+ expanded: false,
14
+ openedItem: null,
15
+ footerLabel: "",
16
+ onSelectedChange: () => null,
17
+ onFocusChange: () => null,
18
+ onFooterExpand: () => null,
19
+ onFooterClose: () => null,
20
+ items: [],
21
+ labelOverflow: "wrap",
22
+ onItemClick: () => null,
23
+ isSkeleton: false,
24
+ hideFooterPipe: false
12
25
  };
13
- const leftNavigationProps = {
14
- containerProps: PropTypes.shape({ expandedWidth: PropTypes.string }).description("Set of Properties attached to the main container").defaultValue({ expandedWidth: "240px" }),
26
+ const DSLeftNavigationPropTypes = {
27
+ ...getPropsPerSlotPropTypes(DSLeftNavigationName, LEFT_NAVIGATION_SLOTS),
28
+ ...globalAttributesPropTypes,
29
+ ...xstyledPropTypes,
30
+ expandedWidth: PropTypes.string.description("Width of the navigation when expanded").defaultValue("240px"),
15
31
  expanded: PropTypes.bool.description("Whether to show the left navigation expanded or collapsed").defaultValue(false),
16
32
  loading: PropTypes.bool.description("Whether the left-nav is loading").defaultValue(false),
17
33
  openedItem: PropTypes.string.description("The id of the left navigation item you want to be opened").defaultValue(null),
18
- footerLabel: PropTypes.oneOfType([PropTypes.node, PropTypes.string]).description(
19
- "The label to show in the footer item"
20
- ),
34
+ footerLabel: PropTypes.oneOfType([PropTypes.node, PropTypes.string]).description("The label to show in the footer item").defaultValue(""),
21
35
  FooterLabelComponent: PropTypes.func.description("The component 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"),
36
+ onFooterExpand: PropTypes.func.description("The function to call when the left-nav is opened via the footer").defaultValue(() => null),
37
+ onFooterClose: PropTypes.func.description("The function to call when the left-nav is closed via the footer").defaultValue(() => null),
24
38
  onSelectedChange: PropTypes.func.description("A callback which triggers when the selected item changes").defaultValue(() => null),
25
39
  onFocusChange: PropTypes.func.description("A callback which triggers when the focused item changes").defaultValue(() => null),
26
40
  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),
41
+ labelOverflow: PropTypes.oneOf(["wrap", "wrapAll", "truncate"]).description("How to handle label overflow").defaultValue("wrap"),
42
+ onItemClick: PropTypes.func.description("Callback when an item is clicked").defaultValue(() => null),
28
43
  isSkeleton: PropTypes.bool.description("Whether the component is in skeleton mode").defaultValue(false),
29
- hideFooterPipe: PropTypes.bool.description("Whether to hide the pipe in the footer").defaultValue(false)
44
+ hideFooterPipe: PropTypes.bool.description("Whether to hide the pipe in the footer").defaultValue(false),
45
+ selectedItem: PropTypes.string.description("The currently selected item"),
46
+ selectedParent: PropTypes.string.description("The parent of the currently selected item"),
47
+ disableDefaultSelection: PropTypes.bool.description("Whether you do not want to automatically select the first body item").defaultValue(false),
48
+ withoutBodyShadow: PropTypes.bool.description("Whether to hide the body shadow"),
49
+ actionRef: PropTypes.object.description("Ref for controlling focus"),
50
+ HeaderComponent: PropTypes.object.description("Custom header component"),
51
+ BodyHeaderComponent: PropTypes.object.description("Custom body header component")
52
+ };
53
+ const DSLeftNavigationPropTypesSchema = DSLeftNavigationPropTypes;
54
+ const DSLeftNavigationItemPropTypes = {
55
+ type: PropTypes.oneOf(outOfTheBoxTypes).description("out of the box types"),
56
+ dsId: PropTypes.string.description("unique identifier for the left nav item"),
57
+ Component: PropTypes.func.description(
58
+ "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"
59
+ ),
60
+ CollapsedComponent: PropTypes.func.description("A component which is renderer when the left-nav is collapsed"),
61
+ itemOpts: PropTypes.object.description("Item options")
30
62
  };
63
+ const DSLeftNavigationItemPropTypesSchema = DSLeftNavigationItemPropTypes;
31
64
  const LeftNavItemProps = () => null;
32
65
  LeftNavItemProps.displayName = "LeftNavItemProps";
33
66
  const LeftNavItemPropsSchema = describe(LeftNavItemProps);
34
- LeftNavItemPropsSchema.propTypes = leftNavItemProps;
67
+ LeftNavItemPropsSchema.propTypes = DSLeftNavigationItemPropTypes;
35
68
  const LeftNavItemOptions = () => null;
36
69
  LeftNavItemOptions.displayName = "LeftNavItemOptions";
37
70
  const LeftNavItemOptionsSchema = describe(LeftNavItemOptions);
38
- LeftNavItemOptionsSchema.propTypes = leftNavItemProps;
71
+ LeftNavItemOptionsSchema.propTypes = DSLeftNavigationItemPropTypes;
39
72
  export {
73
+ DSLeftNavigationItemPropTypes,
74
+ DSLeftNavigationItemPropTypesSchema,
75
+ DSLeftNavigationPropTypes,
76
+ DSLeftNavigationPropTypesSchema,
40
77
  LeftNavItemOptionsSchema,
41
78
  LeftNavItemPropsSchema,
42
- leftNavItemProps,
43
- leftNavigationProps
79
+ defaultProps
44
80
  };
45
81
  //# sourceMappingURL=react-desc-prop-types.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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';\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;\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 hideFooterPipe: boolean;\n }\n export interface OptionalProps {\n FooterLabelComponent?: React.ComponentType<unknown>;\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 FooterLabelComponent: PropTypes.func.description('The component to show in the footer item'),\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 hideFooterPipe: PropTypes.bool.description('Whether to hide the pipe in the footer').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;AAGpC,SAAS,wBAAwB;AA6G1B,MAAM,mBAAmB;AAAA,EAC9B,MAAM,UAAU,MAAM,gBAAgB,EAAE,YAAY,sBAAsB;AAAA,EAC1E,MAAM,UAAU,OAAO,YAAY,yCAAyC;AAAA,EAC5E,WAAW,UAAU,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AAM,qBAAqB,MAAM;AACjC,mBAAmB,cAAc;AAC1B,MAAM,2BAA2B,SAAS,kBAAkB;AACnE,yBAAyB,YAAY;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n describe,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type Theme } from '@elliemae/ds-system';\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSLeftNavigationName, LEFT_NAVIGATION_SLOTS, outOfTheBoxTypes } from './constants/index.js';\nimport type { ContextProps } from './LeftNavigationContext.js';\n\ntype ColorsKey = keyof Theme['colors'];\n\nexport declare namespace DSLeftNavigationT {\n export type SlotFunctionArguments = {\n dsLeftnavigationAlertsIcon: () => object;\n dsLeftnavigationAreasContainer: () => object;\n dsLeftnavigationArrowContainer: () => object;\n dsLeftnavigationBodyAreasContainer: () => object;\n dsLeftnavigationBodyHeaderArea: () => object;\n dsLeftnavigationBodyItemsArea: () => object;\n dsLeftnavigationBottomContainer: () => object;\n dsLeftnavigationCollapsedContainer: () => object;\n dsLeftnavigationExceptionsIcon: () => object;\n dsLeftnavigationFooterItem: () => object;\n dsLeftnavigationFooterLabel: () => object;\n dsLeftnavigationFooterMenu: () => object;\n dsLeftnavigationFooterMenuCollapse: () => object;\n dsLeftnavigationFooterSeparator: () => object;\n dsLeftnavigationHeaderArea: () => object;\n dsLeftnavigationItem: () => object;\n dsLeftnavigationItemBorderBottom: () => object;\n dsLeftnavigationItemChevronBack: () => object;\n dsLeftnavigationItemDate: () => object;\n dsLeftnavigationItemLabel: () => object;\n dsLeftnavigationItemSeparator: () => object;\n dsLeftnavigationLeftContainer: () => object;\n dsLeftnavigationLoaderWrapper: () => object;\n dsLeftnavigationMessagesIcon: () => object;\n dsLeftnavigationNotificationsContainer: () => object;\n dsLeftnavigationNotificationsIcon: () => object;\n dsLeftnavigationRightContainer: () => object;\n dsLeftnavigationRoot: () => object;\n dsLeftnavigationSectionContainer: () => object;\n dsLeftnavigationSectionLabel: () => object;\n dsLeftnavigationSectionRightLabel: () => object;\n dsLeftnavigationVerticalSeparator: () => object;\n };\n export type LabelOveflowT = 'wrap' | 'wrapAll' | 'truncate';\n\n export interface RequiredProps {}\n\n export interface DefaultProps {\n expanded: boolean;\n expandedWidth: string;\n openedItem: string | null;\n items: GenericItemItemProps[];\n footerLabel: string;\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 hideFooterPipe: boolean;\n }\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSLeftNavigationName, typeof LEFT_NAVIGATION_SLOTS> {\n FooterLabelComponent?: React.ComponentType<unknown>;\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<HTMLElement>, keyof DefaultProps | keyof OptionalProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof OptionalProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\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}\n\nexport const defaultProps: DSLeftNavigationT.DefaultProps = {\n expandedWidth: '240px',\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 DSLeftNavigationT.LabelOveflowT,\n onItemClick: () => null,\n isSkeleton: false,\n hideFooterPipe: false,\n};\n\nexport const DSLeftNavigationPropTypes: DSPropTypesSchema<DSLeftNavigationT.Props> = {\n ...getPropsPerSlotPropTypes(DSLeftNavigationName, LEFT_NAVIGATION_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n\n expandedWidth: PropTypes.string.description('Width of the navigation when expanded').defaultValue('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])\n .description('The label to show in the footer item')\n .defaultValue(''),\n FooterLabelComponent: PropTypes.func.description('The component to show in the footer item'),\n onFooterExpand: PropTypes.func\n .description('The function to call when the left-nav is opened via the footer')\n .defaultValue(() => null),\n onFooterClose: PropTypes.func\n .description('The function to call when the left-nav is closed via the footer')\n .defaultValue(() => null),\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 labelOverflow: PropTypes.oneOf(['wrap', 'wrapAll', 'truncate'])\n .description('How to handle label overflow')\n .defaultValue('wrap'),\n onItemClick: PropTypes.func.description('Callback when an item is clicked').defaultValue(() => null),\n isSkeleton: PropTypes.bool.description('Whether the component is in skeleton mode').defaultValue(false),\n hideFooterPipe: PropTypes.bool.description('Whether to hide the pipe in the footer').defaultValue(false),\n selectedItem: PropTypes.string.description('The currently selected item'),\n selectedParent: PropTypes.string.description('The parent of the currently selected item'),\n disableDefaultSelection: PropTypes.bool\n .description('Whether you do not want to automatically select the first body item')\n .defaultValue(false),\n withoutBodyShadow: PropTypes.bool.description('Whether to hide the body shadow'),\n actionRef: PropTypes.object.description('Ref for controlling focus'),\n HeaderComponent: PropTypes.object.description('Custom header component'),\n BodyHeaderComponent: PropTypes.object.description('Custom body header component'),\n};\n\nexport const DSLeftNavigationPropTypesSchema =\n DSLeftNavigationPropTypes as unknown as ValidationMap<DSLeftNavigationT.Props>;\n\nexport const DSLeftNavigationItemPropTypes: DSPropTypesSchema<DSLeftNavigationT.GenericItemItemProps> = {\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 DSLeftNavigationItemPropTypesSchema =\n DSLeftNavigationItemPropTypes as unknown as ValidationMap<DSLeftNavigationT.GenericItemItemProps>;\n\nconst LeftNavItemProps = () => null;\nLeftNavItemProps.displayName = 'LeftNavItemProps';\nexport const LeftNavItemPropsSchema = describe(LeftNavItemProps);\nLeftNavItemPropsSchema.propTypes = DSLeftNavigationItemPropTypes;\n\nconst LeftNavItemOptions = () => null;\nLeftNavItemOptions.displayName = 'LeftNavItemOptions';\nexport const LeftNavItemOptionsSchema = describe(LeftNavItemOptions);\nLeftNavItemOptionsSchema.propTypes = DSLeftNavigationItemPropTypes;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACEvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP,SAAS,sBAAsB,uBAAuB,wBAAwB;AAqJvE,MAAM,eAA+C;AAAA,EAC1D,eAAe;AAAA,EACf,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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,UAAU,KAAK,YAAY,wCAAwC,EAAE,aAAa,KAAK;AAAA,EACvG,cAAc,UAAU,OAAO,YAAY,6BAA6B;AAAA,EACxE,gBAAgB,UAAU,OAAO,YAAY,2CAA2C;AAAA,EACxF,yBAAyB,UAAU,KAChC,YAAY,qEAAqE,EACjF,aAAa,KAAK;AAAA,EACrB,mBAAmB,UAAU,KAAK,YAAY,iCAAiC;AAAA,EAC/E,WAAW,UAAU,OAAO,YAAY,2BAA2B;AAAA,EACnE,iBAAiB,UAAU,OAAO,YAAY,yBAAyB;AAAA,EACvE,qBAAqB,UAAU,OAAO,YAAY,8BAA8B;AAClF;AAEO,MAAM,kCACX;AAEK,MAAM,gCAA2F;AAAA,EACtG,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,sCACX;AAEF,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
6
  "names": []
7
7
  }
@@ -0,0 +1,71 @@
1
+ import * as React from "react";
2
+ const SlotPropsAsObject = {
3
+ dsLeftnavigationAlertsIcon: { "aria-label": "just a typescript test" },
4
+ dsLeftnavigationAreasContainer: { "aria-label": "just a typescript test" },
5
+ dsLeftnavigationArrowContainer: { "aria-label": "just a typescript test" },
6
+ dsLeftnavigationBodyAreasContainer: { "aria-label": "just a typescript test" },
7
+ dsLeftnavigationBodyHeaderArea: { "aria-label": "just a typescript test" },
8
+ dsLeftnavigationBodyItemsArea: { "aria-label": "just a typescript test" },
9
+ dsLeftnavigationBottomContainer: { "aria-label": "just a typescript test" },
10
+ dsLeftnavigationCollapsedContainer: { "aria-label": "just a typescript test" },
11
+ dsLeftnavigationExceptionsIcon: { "aria-label": "just a typescript test" },
12
+ dsLeftnavigationFooterItem: { "aria-label": "just a typescript test" },
13
+ dsLeftnavigationFooterLabel: { "aria-label": "just a typescript test" },
14
+ dsLeftnavigationFooterMenu: { "aria-label": "just a typescript test" },
15
+ dsLeftnavigationFooterMenuCollapse: { "aria-label": "just a typescript test" },
16
+ dsLeftnavigationFooterSeparator: { "aria-label": "just a typescript test" },
17
+ dsLeftnavigationHeaderArea: { "aria-label": "just a typescript test" },
18
+ dsLeftnavigationItem: { "aria-label": "just a typescript test" },
19
+ dsLeftnavigationItemBorderBottom: { "aria-label": "just a typescript test" },
20
+ dsLeftnavigationItemChevronBack: { "aria-label": "just a typescript test" },
21
+ dsLeftnavigationItemDate: { "aria-label": "just a typescript test" },
22
+ dsLeftnavigationItemLabel: { "aria-label": "just a typescript test" },
23
+ dsLeftnavigationItemSeparator: { "aria-label": "just a typescript test" },
24
+ dsLeftnavigationLeftContainer: { "aria-label": "just a typescript test" },
25
+ dsLeftnavigationLoaderWrapper: { "aria-label": "just a typescript test" },
26
+ dsLeftnavigationMessagesIcon: { "aria-label": "just a typescript test" },
27
+ dsLeftnavigationNotificationsContainer: { "aria-label": "just a typescript test" },
28
+ dsLeftnavigationNotificationsIcon: { "aria-label": "just a typescript test" },
29
+ dsLeftnavigationRightContainer: { "aria-label": "just a typescript test" },
30
+ dsLeftnavigationRoot: { "aria-label": "just a typescript test" },
31
+ dsLeftnavigationSectionContainer: { "aria-label": "just a typescript test" },
32
+ dsLeftnavigationSectionLabel: { "aria-label": "just a typescript test" },
33
+ dsLeftnavigationSectionRightLabel: { "aria-label": "just a typescript test" },
34
+ dsLeftnavigationVerticalSeparator: { "aria-label": "just a typescript test" }
35
+ };
36
+ const SlotPropsAsFunctions = {
37
+ dsLeftnavigationAlertsIcon: () => ({ "aria-label": "just a typescript test" }),
38
+ dsLeftnavigationAreasContainer: () => ({ "aria-label": "just a typescript test" }),
39
+ dsLeftnavigationArrowContainer: () => ({ "aria-label": "just a typescript test" }),
40
+ dsLeftnavigationBodyAreasContainer: () => ({ "aria-label": "just a typescript test" }),
41
+ dsLeftnavigationBodyHeaderArea: () => ({ "aria-label": "just a typescript test" }),
42
+ dsLeftnavigationBodyItemsArea: () => ({ "aria-label": "just a typescript test" }),
43
+ dsLeftnavigationBottomContainer: () => ({ "aria-label": "just a typescript test" }),
44
+ dsLeftnavigationCollapsedContainer: () => ({ "aria-label": "just a typescript test" }),
45
+ dsLeftnavigationExceptionsIcon: () => ({ "aria-label": "just a typescript test" }),
46
+ dsLeftnavigationFooterItem: () => ({ "aria-label": "just a typescript test" }),
47
+ dsLeftnavigationFooterLabel: () => ({ "aria-label": "just a typescript test" }),
48
+ dsLeftnavigationFooterMenu: () => ({ "aria-label": "just a typescript test" }),
49
+ dsLeftnavigationFooterMenuCollapse: () => ({ "aria-label": "just a typescript test" }),
50
+ dsLeftnavigationFooterSeparator: () => ({ "aria-label": "just a typescript test" }),
51
+ dsLeftnavigationHeaderArea: () => ({ "aria-label": "just a typescript test" }),
52
+ dsLeftnavigationItem: () => ({ "aria-label": "just a typescript test" }),
53
+ dsLeftnavigationItemBorderBottom: () => ({ "aria-label": "just a typescript test" }),
54
+ dsLeftnavigationItemChevronBack: () => ({ "aria-label": "just a typescript test" }),
55
+ dsLeftnavigationItemDate: () => ({ "aria-label": "just a typescript test" }),
56
+ dsLeftnavigationItemLabel: () => ({ "aria-label": "just a typescript test" }),
57
+ dsLeftnavigationItemSeparator: () => ({ "aria-label": "just a typescript test" }),
58
+ dsLeftnavigationLeftContainer: () => ({ "aria-label": "just a typescript test" }),
59
+ dsLeftnavigationLoaderWrapper: () => ({ "aria-label": "just a typescript test" }),
60
+ dsLeftnavigationMessagesIcon: () => ({ "aria-label": "just a typescript test" }),
61
+ dsLeftnavigationNotificationsContainer: () => ({ "aria-label": "just a typescript test" }),
62
+ dsLeftnavigationNotificationsIcon: () => ({ "aria-label": "just a typescript test" }),
63
+ dsLeftnavigationRightContainer: () => ({ "aria-label": "just a typescript test" }),
64
+ dsLeftnavigationRoot: () => ({ "aria-label": "just a typescript test" }),
65
+ dsLeftnavigationSectionContainer: () => ({ "aria-label": "just a typescript test" }),
66
+ dsLeftnavigationSectionLabel: () => ({ "aria-label": "just a typescript test" }),
67
+ dsLeftnavigationSectionRightLabel: () => ({ "aria-label": "just a typescript test" }),
68
+ dsLeftnavigationVerticalSeparator: () => ({ "aria-label": "just a typescript test" })
69
+ };
70
+ const EnsureAllSlotsExistInSlotFunctionArguments = SlotPropsAsFunctions;
71
+ //# sourceMappingURL=slot-props.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/slot-props.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { DSLeftNavigationName, LEFT_NAVIGATION_SLOTS } from '../constants/index.js';\nimport type { DSLeftNavigationT } from '../index.js';\n\nconst SlotPropsAsObject: Partial<DSLeftNavigationT.Props> = {\n dsLeftnavigationAlertsIcon: { 'aria-label': 'just a typescript test' },\n dsLeftnavigationAreasContainer: { 'aria-label': 'just a typescript test' },\n dsLeftnavigationArrowContainer: { 'aria-label': 'just a typescript test' },\n dsLeftnavigationBodyAreasContainer: { 'aria-label': 'just a typescript test' },\n dsLeftnavigationBodyHeaderArea: { 'aria-label': 'just a typescript test' },\n dsLeftnavigationBodyItemsArea: { 'aria-label': 'just a typescript test' },\n dsLeftnavigationBottomContainer: { 'aria-label': 'just a typescript test' },\n dsLeftnavigationCollapsedContainer: { 'aria-label': 'just a typescript test' },\n dsLeftnavigationExceptionsIcon: { 'aria-label': 'just a typescript test' },\n dsLeftnavigationFooterItem: { 'aria-label': 'just a typescript test' },\n dsLeftnavigationFooterLabel: { 'aria-label': 'just a typescript test' },\n dsLeftnavigationFooterMenu: { 'aria-label': 'just a typescript test' },\n dsLeftnavigationFooterMenuCollapse: { 'aria-label': 'just a typescript test' },\n dsLeftnavigationFooterSeparator: { 'aria-label': 'just a typescript test' },\n dsLeftnavigationHeaderArea: { 'aria-label': 'just a typescript test' },\n dsLeftnavigationItem: { 'aria-label': 'just a typescript test' },\n dsLeftnavigationItemBorderBottom: { 'aria-label': 'just a typescript test' },\n dsLeftnavigationItemChevronBack: { 'aria-label': 'just a typescript test' },\n dsLeftnavigationItemDate: { 'aria-label': 'just a typescript test' },\n dsLeftnavigationItemLabel: { 'aria-label': 'just a typescript test' },\n dsLeftnavigationItemSeparator: { 'aria-label': 'just a typescript test' },\n dsLeftnavigationLeftContainer: { 'aria-label': 'just a typescript test' },\n dsLeftnavigationLoaderWrapper: { 'aria-label': 'just a typescript test' },\n dsLeftnavigationMessagesIcon: { 'aria-label': 'just a typescript test' },\n dsLeftnavigationNotificationsContainer: { 'aria-label': 'just a typescript test' },\n dsLeftnavigationNotificationsIcon: { 'aria-label': 'just a typescript test' },\n dsLeftnavigationRightContainer: { 'aria-label': 'just a typescript test' },\n dsLeftnavigationRoot: { 'aria-label': 'just a typescript test' },\n dsLeftnavigationSectionContainer: { 'aria-label': 'just a typescript test' },\n dsLeftnavigationSectionLabel: { 'aria-label': 'just a typescript test' },\n dsLeftnavigationSectionRightLabel: { 'aria-label': 'just a typescript test' },\n dsLeftnavigationVerticalSeparator: { 'aria-label': 'just a typescript test' },\n};\nconst SlotPropsAsFunctions: DSLeftNavigationT.SlotFunctionArguments = {\n dsLeftnavigationAlertsIcon: () => ({ 'aria-label': 'just a typescript test' }),\n dsLeftnavigationAreasContainer: () => ({ 'aria-label': 'just a typescript test' }),\n dsLeftnavigationArrowContainer: () => ({ 'aria-label': 'just a typescript test' }),\n dsLeftnavigationBodyAreasContainer: () => ({ 'aria-label': 'just a typescript test' }),\n dsLeftnavigationBodyHeaderArea: () => ({ 'aria-label': 'just a typescript test' }),\n dsLeftnavigationBodyItemsArea: () => ({ 'aria-label': 'just a typescript test' }),\n dsLeftnavigationBottomContainer: () => ({ 'aria-label': 'just a typescript test' }),\n dsLeftnavigationCollapsedContainer: () => ({ 'aria-label': 'just a typescript test' }),\n dsLeftnavigationExceptionsIcon: () => ({ 'aria-label': 'just a typescript test' }),\n dsLeftnavigationFooterItem: () => ({ 'aria-label': 'just a typescript test' }),\n dsLeftnavigationFooterLabel: () => ({ 'aria-label': 'just a typescript test' }),\n dsLeftnavigationFooterMenu: () => ({ 'aria-label': 'just a typescript test' }),\n dsLeftnavigationFooterMenuCollapse: () => ({ 'aria-label': 'just a typescript test' }),\n dsLeftnavigationFooterSeparator: () => ({ 'aria-label': 'just a typescript test' }),\n dsLeftnavigationHeaderArea: () => ({ 'aria-label': 'just a typescript test' }),\n dsLeftnavigationItem: () => ({ 'aria-label': 'just a typescript test' }),\n dsLeftnavigationItemBorderBottom: () => ({ 'aria-label': 'just a typescript test' }),\n dsLeftnavigationItemChevronBack: () => ({ 'aria-label': 'just a typescript test' }),\n dsLeftnavigationItemDate: () => ({ 'aria-label': 'just a typescript test' }),\n dsLeftnavigationItemLabel: () => ({ 'aria-label': 'just a typescript test' }),\n dsLeftnavigationItemSeparator: () => ({ 'aria-label': 'just a typescript test' }),\n dsLeftnavigationLeftContainer: () => ({ 'aria-label': 'just a typescript test' }),\n dsLeftnavigationLoaderWrapper: () => ({ 'aria-label': 'just a typescript test' }),\n dsLeftnavigationMessagesIcon: () => ({ 'aria-label': 'just a typescript test' }),\n dsLeftnavigationNotificationsContainer: () => ({ 'aria-label': 'just a typescript test' }),\n dsLeftnavigationNotificationsIcon: () => ({ 'aria-label': 'just a typescript test' }),\n dsLeftnavigationRightContainer: () => ({ 'aria-label': 'just a typescript test' }),\n dsLeftnavigationRoot: () => ({ 'aria-label': 'just a typescript test' }),\n dsLeftnavigationSectionContainer: () => ({ 'aria-label': 'just a typescript test' }),\n dsLeftnavigationSectionLabel: () => ({ 'aria-label': 'just a typescript test' }),\n dsLeftnavigationSectionRightLabel: () => ({ 'aria-label': 'just a typescript test' }),\n dsLeftnavigationVerticalSeparator: () => ({ 'aria-label': 'just a typescript test' }),\n};\nconst EnsureAllSlotsExistInSlotFunctionArguments: Required<\n TypescriptHelpersT.PropsForSlots<typeof DSLeftNavigationName, typeof LEFT_NAVIGATION_SLOTS>\n> = SlotPropsAsFunctions;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACKvB,MAAM,oBAAsD;AAAA,EAC1D,4BAA4B,EAAE,cAAc,yBAAyB;AAAA,EACrE,gCAAgC,EAAE,cAAc,yBAAyB;AAAA,EACzE,gCAAgC,EAAE,cAAc,yBAAyB;AAAA,EACzE,oCAAoC,EAAE,cAAc,yBAAyB;AAAA,EAC7E,gCAAgC,EAAE,cAAc,yBAAyB;AAAA,EACzE,+BAA+B,EAAE,cAAc,yBAAyB;AAAA,EACxE,iCAAiC,EAAE,cAAc,yBAAyB;AAAA,EAC1E,oCAAoC,EAAE,cAAc,yBAAyB;AAAA,EAC7E,gCAAgC,EAAE,cAAc,yBAAyB;AAAA,EACzE,4BAA4B,EAAE,cAAc,yBAAyB;AAAA,EACrE,6BAA6B,EAAE,cAAc,yBAAyB;AAAA,EACtE,4BAA4B,EAAE,cAAc,yBAAyB;AAAA,EACrE,oCAAoC,EAAE,cAAc,yBAAyB;AAAA,EAC7E,iCAAiC,EAAE,cAAc,yBAAyB;AAAA,EAC1E,4BAA4B,EAAE,cAAc,yBAAyB;AAAA,EACrE,sBAAsB,EAAE,cAAc,yBAAyB;AAAA,EAC/D,kCAAkC,EAAE,cAAc,yBAAyB;AAAA,EAC3E,iCAAiC,EAAE,cAAc,yBAAyB;AAAA,EAC1E,0BAA0B,EAAE,cAAc,yBAAyB;AAAA,EACnE,2BAA2B,EA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AE,cAAc,yBAAyB;AAAA,EAC5E,sBAAsB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACtE,kCAAkC,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAClF,iCAAiC,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACjF,0BAA0B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC1E,2BAA2B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC3E,+BAA+B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC/E,+BAA+B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC/E,+BAA+B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC/E,8BAA8B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC9E,wCAAwC,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACxF,mCAAmC,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACnF,gCAAgC,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAChF,sBAAsB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACtE,kCAAkC,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAClF,8BAA8B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC9E,mCAAmC,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACnF,mCAAmC,OAAO,EAAE,cAAc,yBAAyB;AACrF;AACA,MAAM,6CAEF;",
6
+ "names": []
7
+ }
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
3
  import { createRef } from "react";
4
4
  import { LeftNavigation } from "../index.js";
5
- import { ITEM_TYPES } from "../exported-related/constants.js";
5
+ import { ITEM_TYPES } from "../constants/index.js";
6
6
  const ref = createRef();
7
7
  const testOptionalProps = {
8
8
  selectedItem: "selected item",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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 hideFooterPipe: 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 ComponentDummy = () => <div />;\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: ComponentDummy,\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"],
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 '../constants/index.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 hideFooterPipe: 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 ComponentDummy = () => <div />;\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: ComponentDummy,\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
5
  "mappings": "AAAA,YAAY,WAAW;ACsBO,SAmI5B,UAnI4B,KAmI5B,YAnI4B;AArB9B,SAAS,iBAAiB;AAC1B,SAAS,sBAAsB;AAE/B,SAAS,kBAAkB;AAO3B,MAAM,MAAM,UAAmF;AAE/F,MAAM,oBAAiD;AAAA,EAC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,EAClD,oBAAC,kBAAgB,GAAG,uBAAuB;AAAA,EAE3C;AAAA,IAAC;AAAA;AAAA,MACC,UAAQ;AAAA,MACR,eAAc;AAAA,MACd,YAAW;AAAA,MACX,OAAO;AAAA,QACL;AAAA,UACE,MAAM,WAAW;AAAA,UACjB,MAAM;AAAA,UACN,oBAAoB;AAAA,UACpB,UAAU;AAAA,YACR,OAAO;AAAA,UACT;AAAA,QACF;AAAA,MACF;AAAA,MACA,aAAY;AAAA,MACZ,kBAAkB,MAAM;AAAA,MACxB,eAAe,MAAM;AAAA,MACrB,gBAAgB,MAAM;AAAA,MACtB,eAAe,MAAM;AAAA,MACrB,eAAc;AAAA,MACd,aAAa,MAAM;AAAA;AAAA,EACrB;AAAA,GACF;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,5 @@
1
- import type { MutableRefObject, RefObject } from 'react';
2
1
  import type React from 'react';
2
+ import type { MutableRefObject, RefObject } from 'react';
3
3
  import type { DSLeftNavigationT } from './react-desc-prop-types.js';
4
4
  export type ContextProps = {
5
5
  selectedItem: string | null;
@@ -15,7 +15,6 @@ export type ContextProps = {
15
15
  leftNavProps: DSLeftNavigationT.InternalProps;
16
16
  expandedForAnimation: boolean;
17
17
  };
18
- export declare const defaultProps: DSLeftNavigationT.DefaultProps;
19
18
  export declare const defaultContext: ContextProps;
20
19
  export declare const LeftNavContext: React.Context<ContextProps>;
21
20
  export default LeftNavContext;
@@ -112,3 +112,35 @@ export declare const DSLeftNavigationSlots: {
112
112
  readonly SECTION_RIGHT_LABEL: "section-right-label";
113
113
  readonly VERTICAL_SEPARATOR: "vertical-separator";
114
114
  };
115
+ export declare const LABEL_OVERFLOW: {
116
+ WRAP: string;
117
+ WRAP_ALL: string;
118
+ TRUNCATE: string;
119
+ };
120
+ export declare const ITEM_TYPES: {
121
+ LEFT_NAV_ITEM_HEADER: string;
122
+ LEFT_NAV_ITEM_LINK: string;
123
+ LEFT_NAV_ITEM_SUBMENU: string;
124
+ LEFT_NAV_ITEM_CONTROLLED_DRILLDOWN: string;
125
+ LEFT_NAV_ITEM_UNCONTROLLED_DRILLDOWN: string;
126
+ LEFT_NAV_ITEM_SECTION: string;
127
+ LEFT_NAV_ITEM_SEPARATOR: string;
128
+ LEFT_NAV_ITEM_SKELETON: string;
129
+ LEFT_NAV_ITEM_TEXT_LABEL: string;
130
+ LEFT_NAV_ITEM_WITH_DATE: string;
131
+ };
132
+ export declare const outOfTheBoxTypes: string[];
133
+ export declare const MAP_ITEMS_TO_SKELETON: {
134
+ readonly 'ds-left-nav-item-header': "item";
135
+ readonly 'ds-left-nav-item-link': "subitem";
136
+ readonly 'ds-left-nav-item-submenu': "item";
137
+ readonly 'ds-left-nav-item-controlled-drilldown': "subitem";
138
+ readonly 'ds-left-nav-item-uncontrolled-drilldown': "subitem";
139
+ readonly 'ds-left-nav-item-section': "subitem";
140
+ readonly 'ds-left-nav-item-separator': "subitem";
141
+ readonly 'ds-left-nav-item-text-label': "subitem";
142
+ readonly 'ds-left-nav-item-with-date': "subitem";
143
+ };
144
+ export declare const FOOTER_DS_ID = "ds-left-nav-__internal__-footer";
145
+ export declare const FOOTER_MENU_CLOSE_DS_ID = "ds-left-nav-__internal__-footer-menu-close";
146
+ export declare const CHEVRON_BACK_DS_ID = "ds-left-nav-__internal__-chevron-back";