@elliemae/ds-left-navigation 3.12.0-next.0 → 3.12.0-next.1

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 (40) hide show
  1. package/dist/cjs/LeftNavigationContext.js.map +2 -2
  2. package/dist/cjs/common/getItemBackgroundStyle.js.map +1 -1
  3. package/dist/cjs/common/getLeftBorderStyle.js.map +1 -1
  4. package/dist/cjs/configs/useLeftNavConfig.js.map +1 -1
  5. package/dist/cjs/configs/useLeftNavItems.js.map +2 -2
  6. package/dist/cjs/exported-related/Icon/index.js +1 -1
  7. package/dist/cjs/exported-related/Icon/index.js.map +2 -2
  8. package/dist/cjs/exported-related/ItemRenderer/index.js.map +1 -1
  9. package/dist/cjs/exported-related/ItemRenderer/usePropsWithDefaults.js.map +1 -1
  10. package/dist/cjs/hooks/useExpandableOnClickHandler.js.map +2 -2
  11. package/dist/cjs/hooks/useKeyboardNavigation.js.map +2 -2
  12. package/dist/cjs/hooks/useOpenableOnClickHandler.js.map +2 -2
  13. package/dist/cjs/hooks/useSelectFirstBodyItem.js.map +2 -2
  14. package/dist/cjs/index.d.js.map +1 -1
  15. package/dist/cjs/outOfTheBox/ItemHeader/index.js.map +1 -1
  16. package/dist/cjs/outOfTheBox/ItemLink/index.js.map +1 -1
  17. package/dist/cjs/outOfTheBox/ItemSubmenu/index.js.map +1 -1
  18. package/dist/cjs/outOfTheBox/index.js.map +2 -2
  19. package/dist/cjs/parts/LeftNavContent/styled.js.map +2 -2
  20. package/dist/cjs/parts/OutOfTheBoxMapItem.js.map +1 -1
  21. package/dist/esm/LeftNavigationContext.js.map +2 -2
  22. package/dist/esm/common/getItemBackgroundStyle.js.map +1 -1
  23. package/dist/esm/common/getLeftBorderStyle.js.map +1 -1
  24. package/dist/esm/configs/useLeftNavConfig.js.map +1 -1
  25. package/dist/esm/configs/useLeftNavItems.js.map +2 -2
  26. package/dist/esm/exported-related/Icon/index.js +1 -1
  27. package/dist/esm/exported-related/Icon/index.js.map +2 -2
  28. package/dist/esm/exported-related/ItemRenderer/index.js.map +1 -1
  29. package/dist/esm/exported-related/ItemRenderer/usePropsWithDefaults.js.map +1 -1
  30. package/dist/esm/hooks/useExpandableOnClickHandler.js.map +2 -2
  31. package/dist/esm/hooks/useKeyboardNavigation.js.map +2 -2
  32. package/dist/esm/hooks/useOpenableOnClickHandler.js.map +2 -2
  33. package/dist/esm/hooks/useSelectFirstBodyItem.js.map +2 -2
  34. package/dist/esm/outOfTheBox/ItemHeader/index.js.map +1 -1
  35. package/dist/esm/outOfTheBox/ItemLink/index.js.map +1 -1
  36. package/dist/esm/outOfTheBox/ItemSubmenu/index.js.map +1 -1
  37. package/dist/esm/outOfTheBox/index.js.map +2 -2
  38. package/dist/esm/parts/LeftNavContent/styled.js.map +2 -2
  39. package/dist/esm/parts/OutOfTheBoxMapItem.js.map +1 -1
  40. package/package.json +7 -7
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/LeftNavigationContext.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { createContext, MutableRefObject, RefObject } from 'react';\nimport type { LeftNavProps, LabelOveflowT } from './index.d';\n\nexport type ContextProps = {\n selectedItem: string | null;\n setSelectedItem: React.Dispatch<React.SetStateAction<string | null>>;\n selectedParent: string | null;\n setSelectedParent: React.Dispatch<React.SetStateAction<string | null>>;\n focusedItem: string | null;\n setFocusedItem: React.Dispatch<React.SetStateAction<string | null>>;\n openedDrilldowns: string[];\n setOpenedDrilldowns: React.Dispatch<React.SetStateAction<string[]>>;\n visibleItems: string[];\n visibleItemsRefs: MutableRefObject<Record<string, RefObject<HTMLElement>>>;\n leftNavProps: LeftNavProps;\n expandedForAnimation: boolean;\n};\n\nexport const defaultProps: LeftNavProps = {\n expandedWidth: '240px',\n loading: false,\n expanded: false,\n openedItem: null,\n footerLabel: '',\n onSelectedChange: () => null,\n onFocusChange: () => null,\n onFooterExpand: () => null,\n onFooterClose: () => null,\n items: [],\n labelOverflow: 'wrap' as LabelOveflowT,\n onItemClick: () => null,\n};\n\nexport const defaultContext: ContextProps = {\n leftNavProps: defaultProps,\n selectedItem: null,\n setSelectedItem: () => null,\n selectedParent: null,\n setSelectedParent: () => null,\n focusedItem: null,\n setFocusedItem: () => null,\n expandedForAnimation: true,\n openedDrilldowns: [],\n setOpenedDrilldowns: () => null,\n visibleItems: [],\n visibleItemsRefs: { current: {} },\n};\n\nexport const LeftNavContext = createContext<ContextProps>(defaultContext);\n\nexport default LeftNavContext;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkE;AAkB3D,MAAM,eAA6B;AAAA,EACxC,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,EACrB,OAAO,CAAC;AAAA,EACR,eAAe;AAAA,EACf,aAAa,MAAM;AACrB;AAEO,MAAM,iBAA+B;AAAA,EAC1C,cAAc;AAAA,EACd,cAAc;AAAA,EACd,iBAAiB,MAAM;AAAA,EACvB,gBAAgB;AAAA,EAChB,mBAAmB,MAAM;AAAA,EACzB,aAAa;AAAA,EACb,gBAAgB,MAAM;AAAA,EACtB,sBAAsB;AAAA,EACtB,kBAAkB,CAAC;AAAA,EACnB,qBAAqB,MAAM;AAAA,EAC3B,cAAc,CAAC;AAAA,EACf,kBAAkB,EAAE,SAAS,CAAC,EAAE;AAClC;AAEO,MAAM,qBAAiB,4BAA4B,cAAc;AAExE,IAAO,gCAAQ;",
4
+ "sourcesContent": ["import type { MutableRefObject, RefObject } from 'react';\nimport type React from 'react';\nimport { createContext } from 'react';\nimport type { LeftNavProps, LabelOveflowT } from './index.d';\n\nexport type ContextProps = {\n selectedItem: string | null;\n setSelectedItem: React.Dispatch<React.SetStateAction<string | null>>;\n selectedParent: string | null;\n setSelectedParent: React.Dispatch<React.SetStateAction<string | null>>;\n focusedItem: string | null;\n setFocusedItem: React.Dispatch<React.SetStateAction<string | null>>;\n openedDrilldowns: string[];\n setOpenedDrilldowns: React.Dispatch<React.SetStateAction<string[]>>;\n visibleItems: string[];\n visibleItemsRefs: MutableRefObject<Record<string, RefObject<HTMLElement>>>;\n leftNavProps: LeftNavProps;\n expandedForAnimation: boolean;\n};\n\nexport const defaultProps: LeftNavProps = {\n expandedWidth: '240px',\n loading: false,\n expanded: false,\n openedItem: null,\n footerLabel: '',\n onSelectedChange: () => null,\n onFocusChange: () => null,\n onFooterExpand: () => null,\n onFooterClose: () => null,\n items: [],\n labelOverflow: 'wrap' as LabelOveflowT,\n onItemClick: () => null,\n};\n\nexport const defaultContext: ContextProps = {\n leftNavProps: defaultProps,\n selectedItem: null,\n setSelectedItem: () => null,\n selectedParent: null,\n setSelectedParent: () => null,\n focusedItem: null,\n setFocusedItem: () => null,\n expandedForAnimation: true,\n openedDrilldowns: [],\n setOpenedDrilldowns: () => null,\n visibleItems: [],\n visibleItemsRefs: { current: {} },\n};\n\nexport const LeftNavContext = createContext<ContextProps>(defaultContext);\n\nexport default LeftNavContext;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAA8B;AAkBvB,MAAM,eAA6B;AAAA,EACxC,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,EACrB,OAAO,CAAC;AAAA,EACR,eAAe;AAAA,EACf,aAAa,MAAM;AACrB;AAEO,MAAM,iBAA+B;AAAA,EAC1C,cAAc;AAAA,EACd,cAAc;AAAA,EACd,iBAAiB,MAAM;AAAA,EACvB,gBAAgB;AAAA,EAChB,mBAAmB,MAAM;AAAA,EACzB,aAAa;AAAA,EACb,gBAAgB,MAAM;AAAA,EACtB,sBAAsB;AAAA,EACtB,kBAAkB,CAAC;AAAA,EACnB,qBAAqB,MAAM;AAAA,EAC3B,cAAc,CAAC;AAAA,EACf,kBAAkB,EAAE,SAAS,CAAC,EAAE;AAClC;AAEO,MAAM,qBAAiB,4BAA4B,cAAc;AAExE,IAAO,gCAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/common/getItemBackgroundStyle.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { Theme } from '@elliemae/ds-system';\n\nconst commonItemBackgroundStyle = (color: string, hoverColor: string, activeColor: string): string => `\n\n background: ${color};\n\n :hover {\n background: ${hoverColor};\n }\n\n :active {\n background: ${activeColor};\n }\n`;\n\nexport const getItemBackgroundStyle = (props: { theme: Theme; selected: boolean; opened: boolean }): string => {\n if (props.selected && !props.opened)\n return commonItemBackgroundStyle(\n props.theme.colors.brand[200],\n props.theme.colors.brand[200],\n props.theme.colors.brand[200],\n );\n\n return commonItemBackgroundStyle(\n props.theme.colors.neutral['000'],\n props.theme.colors.neutral['080'],\n props.theme.colors.brand[200],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
4
+ "sourcesContent": ["import type { Theme } from '@elliemae/ds-system';\n\nconst commonItemBackgroundStyle = (color: string, hoverColor: string, activeColor: string): string => `\n\n background: ${color};\n\n :hover {\n background: ${hoverColor};\n }\n\n :active {\n background: ${activeColor};\n }\n`;\n\nexport const getItemBackgroundStyle = (props: { theme: Theme; selected: boolean; opened: boolean }): string => {\n if (props.selected && !props.opened)\n return commonItemBackgroundStyle(\n props.theme.colors.brand[200],\n props.theme.colors.brand[200],\n props.theme.colors.brand[200],\n );\n\n return commonItemBackgroundStyle(\n props.theme.colors.neutral['000'],\n props.theme.colors.neutral['080'],\n props.theme.colors.brand[200],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,MAAM,4BAA4B,CAAC,OAAe,YAAoB,gBAAgC;AAAA;AAAA,gBAEtF;AAAA;AAAA;AAAA,kBAGE;AAAA;AAAA;AAAA;AAAA,kBAIA;AAAA;AAAA;AAIX,MAAM,yBAAyB,CAAC,UAAwE;AAC7G,MAAI,MAAM,YAAY,CAAC,MAAM;AAC3B,WAAO;AAAA,MACL,MAAM,MAAM,OAAO,MAAM;AAAA,MACzB,MAAM,MAAM,OAAO,MAAM;AAAA,MACzB,MAAM,MAAM,OAAO,MAAM;AAAA,IAC3B;AAEF,SAAO;AAAA,IACL,MAAM,MAAM,OAAO,QAAQ;AAAA,IAC3B,MAAM,MAAM,OAAO,QAAQ;AAAA,IAC3B,MAAM,MAAM,OAAO,MAAM;AAAA,EAC3B;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/common/getLeftBorderStyle.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { Theme } from '@elliemae/ds-system';\n\nconst commonLeftBorderStyle = (color: string, hoverColor: string, activeColor: string): string => `\n\n -webkit-box-shadow: inset 4px 0 0 0 ${color};\n box-shadow: inset 4px 0 0 0 ${color};\n\n :hover {\n -webkit-box-shadow: inset 4px 0 0 0 ${hoverColor};\n box-shadow: inset 4px 0 0 0 ${hoverColor};\n }\n\n :active {\n -webkit-box-shadow: inset 4px 0 0 0 ${activeColor};\n box-shadow: inset 4px 0 0 0 ${activeColor};\n }\n`;\n\nexport const getLeftBorderStyle = (props: { theme: Theme; selected: boolean; selectedParent: boolean }): string => {\n if (props.selected || props.selectedParent)\n return commonLeftBorderStyle(\n props.theme.colors.brand[400],\n props.theme.colors.brand[400],\n props.theme.colors.brand[400],\n );\n\n return commonLeftBorderStyle('transparent', props.theme.colors.brand[300], props.theme.colors.brand[400]);\n};\n", "import * as React from 'react';\nexport { React };\n"],
4
+ "sourcesContent": ["import type { Theme } from '@elliemae/ds-system';\n\nconst commonLeftBorderStyle = (color: string, hoverColor: string, activeColor: string): string => `\n\n -webkit-box-shadow: inset 4px 0 0 0 ${color};\n box-shadow: inset 4px 0 0 0 ${color};\n\n :hover {\n -webkit-box-shadow: inset 4px 0 0 0 ${hoverColor};\n box-shadow: inset 4px 0 0 0 ${hoverColor};\n }\n\n :active {\n -webkit-box-shadow: inset 4px 0 0 0 ${activeColor};\n box-shadow: inset 4px 0 0 0 ${activeColor};\n }\n`;\n\nexport const getLeftBorderStyle = (props: { theme: Theme; selected: boolean; selectedParent: boolean }): string => {\n if (props.selected || props.selectedParent)\n return commonLeftBorderStyle(\n props.theme.colors.brand[400],\n props.theme.colors.brand[400],\n props.theme.colors.brand[400],\n );\n\n return commonLeftBorderStyle('transparent', props.theme.colors.brand[300], props.theme.colors.brand[400]);\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,MAAM,wBAAwB,CAAC,OAAe,YAAoB,gBAAgC;AAAA;AAAA,wCAE1D;AAAA,wCACA;AAAA;AAAA;AAAA,0CAGE;AAAA,0CACA;AAAA;AAAA;AAAA;AAAA,0CAIA;AAAA,0CACA;AAAA;AAAA;AAInC,MAAM,qBAAqB,CAAC,UAAgF;AACjH,MAAI,MAAM,YAAY,MAAM;AAC1B,WAAO;AAAA,MACL,MAAM,MAAM,OAAO,MAAM;AAAA,MACzB,MAAM,MAAM,OAAO,MAAM;AAAA,MACzB,MAAM,MAAM,OAAO,MAAM;AAAA,IAC3B;AAEF,SAAO,sBAAsB,eAAe,MAAM,MAAM,OAAO,MAAM,MAAM,MAAM,MAAM,OAAO,MAAM,IAAI;AAC1G;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/configs/useLeftNavConfig.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport type { LeftNavProps } from '../index.d';\nimport { ContextProps } from '../LeftNavigationContext';\nimport useLeftNavItems from './useLeftNavItems';\nimport { useLeftNavSmoothExpand } from './useLeftNavSmoothExpand';\nimport { useSelectFirstBodyItem } from '../hooks/useSelectFirstBodyItem';\n\nexport const useLeftNavConfig = (props: LeftNavProps): ContextProps => {\n const { expanded, openedItem, onSelectedChange, onFocusChange, items } = props;\n\n // -----------------------------------------------------------------------------\n // ************************** ------------ **************************\n // * INTERNAL STATE *\n // ************************** ------------ **************************\n // Selection related\n const [selectedItem, setSelectedItem] = React.useState<string | null>(null);\n const [selectedParent, setSelectedParent] = React.useState<string | null>(null);\n // Focus related\n const [focusedItem, setFocusedItem] = React.useState<string | null>(null);\n // Opened uncontrolled drilldowns\n const [openedDrilldowns, setOpenedDrilldowns] = React.useState<string[]>([]);\n\n // -----------------------------------------------------------------------------\n // ************************** ------------ **************************\n // * EXPAND ANIMATION *\n // ************************** ------------ **************************\n const [expandedForAnimation, setExpandedForAnimation] = React.useState(expanded);\n const timeoutRef = React.useRef<ReturnType<typeof setTimeout>>(null);\n const smoothExpandOpts = React.useMemo(\n () => ({\n expandedForAnimation,\n timeoutRef,\n setExpandedForAnimation,\n }),\n [expandedForAnimation, timeoutRef, setExpandedForAnimation],\n );\n useLeftNavSmoothExpand(props, smoothExpandOpts);\n\n // -----------------------------------------------------------------------------\n // ************************** ------------ **************************\n // * SIDE EFFECTS *\n // ************************** ------------ **************************\n React.useEffect(() => {\n onSelectedChange(selectedItem);\n }, [selectedItem, onSelectedChange]);\n\n React.useEffect(() => {\n if (props.actionRef && props.actionRef.current) {\n props.actionRef.current.setFocusedItem = setFocusedItem;\n }\n }, [props.actionRef]);\n\n React.useEffect(() => {\n if (openedItem !== null) setSelectedParent(openedItem);\n }, [openedItem]);\n\n React.useEffect(() => {\n onFocusChange(focusedItem);\n }, [focusedItem, onFocusChange]);\n\n useSelectFirstBodyItem(\n items,\n openedItem,\n props.selectedItem !== undefined ? props.selectedItem : selectedItem,\n setSelectedItem,\n props.disableDefaultSelection,\n );\n\n // -----------------------------------------------------------------------------\n // ************************** ------------ **************************\n // * ITEMS MANAGEMENT *\n // ************************** ------------ **************************\n\n const leftNavItemsProps = React.useMemo(\n () => ({\n headerItem: props.HeaderComponent,\n bodyHeaderItem: props.BodyHeaderComponent,\n items: props.items,\n openedDrilldowns,\n }),\n [props.HeaderComponent, props.BodyHeaderComponent, props.items, openedDrilldowns],\n );\n\n // We need to know the current visible items since we have drilldowns\n const { visibleItems, visibleItemsRefs } = useLeftNavItems(leftNavItemsProps);\n\n // -----------------------------------------------------------------------------\n // ************************** ------------ **************************\n // * LEFTNAV CONFIG *\n // ************************** ------------ **************************\n const finalConfig = React.useMemo(\n () => ({\n leftNavProps: props,\n expandedForAnimation,\n selectedItem: props.selectedItem !== undefined ? props.selectedItem : selectedItem,\n setSelectedItem,\n selectedParent: props.selectedParent !== undefined ? props.selectedParent : selectedParent,\n setSelectedParent,\n focusedItem,\n setFocusedItem,\n openedDrilldowns,\n setOpenedDrilldowns,\n visibleItems,\n visibleItemsRefs,\n }),\n [\n props,\n expandedForAnimation,\n selectedItem,\n setSelectedItem,\n setSelectedParent,\n selectedParent,\n focusedItem,\n setFocusedItem,\n openedDrilldowns,\n setOpenedDrilldowns,\n visibleItems,\n visibleItemsRefs,\n ],\n );\n\n return finalConfig;\n};\n\nexport default useLeftNavConfig;\n", "import * as React from 'react';\nexport { React };\n"],
4
+ "sourcesContent": ["import React from 'react';\nimport type { LeftNavProps } from '../index.d';\nimport type { ContextProps } from '../LeftNavigationContext';\nimport useLeftNavItems from './useLeftNavItems';\nimport { useLeftNavSmoothExpand } from './useLeftNavSmoothExpand';\nimport { useSelectFirstBodyItem } from '../hooks/useSelectFirstBodyItem';\n\nexport const useLeftNavConfig = (props: LeftNavProps): ContextProps => {\n const { expanded, openedItem, onSelectedChange, onFocusChange, items } = props;\n\n // -----------------------------------------------------------------------------\n // ************************** ------------ **************************\n // * INTERNAL STATE *\n // ************************** ------------ **************************\n // Selection related\n const [selectedItem, setSelectedItem] = React.useState<string | null>(null);\n const [selectedParent, setSelectedParent] = React.useState<string | null>(null);\n // Focus related\n const [focusedItem, setFocusedItem] = React.useState<string | null>(null);\n // Opened uncontrolled drilldowns\n const [openedDrilldowns, setOpenedDrilldowns] = React.useState<string[]>([]);\n\n // -----------------------------------------------------------------------------\n // ************************** ------------ **************************\n // * EXPAND ANIMATION *\n // ************************** ------------ **************************\n const [expandedForAnimation, setExpandedForAnimation] = React.useState(expanded);\n const timeoutRef = React.useRef<ReturnType<typeof setTimeout>>(null);\n const smoothExpandOpts = React.useMemo(\n () => ({\n expandedForAnimation,\n timeoutRef,\n setExpandedForAnimation,\n }),\n [expandedForAnimation, timeoutRef, setExpandedForAnimation],\n );\n useLeftNavSmoothExpand(props, smoothExpandOpts);\n\n // -----------------------------------------------------------------------------\n // ************************** ------------ **************************\n // * SIDE EFFECTS *\n // ************************** ------------ **************************\n React.useEffect(() => {\n onSelectedChange(selectedItem);\n }, [selectedItem, onSelectedChange]);\n\n React.useEffect(() => {\n if (props.actionRef && props.actionRef.current) {\n props.actionRef.current.setFocusedItem = setFocusedItem;\n }\n }, [props.actionRef]);\n\n React.useEffect(() => {\n if (openedItem !== null) setSelectedParent(openedItem);\n }, [openedItem]);\n\n React.useEffect(() => {\n onFocusChange(focusedItem);\n }, [focusedItem, onFocusChange]);\n\n useSelectFirstBodyItem(\n items,\n openedItem,\n props.selectedItem !== undefined ? props.selectedItem : selectedItem,\n setSelectedItem,\n props.disableDefaultSelection,\n );\n\n // -----------------------------------------------------------------------------\n // ************************** ------------ **************************\n // * ITEMS MANAGEMENT *\n // ************************** ------------ **************************\n\n const leftNavItemsProps = React.useMemo(\n () => ({\n headerItem: props.HeaderComponent,\n bodyHeaderItem: props.BodyHeaderComponent,\n items: props.items,\n openedDrilldowns,\n }),\n [props.HeaderComponent, props.BodyHeaderComponent, props.items, openedDrilldowns],\n );\n\n // We need to know the current visible items since we have drilldowns\n const { visibleItems, visibleItemsRefs } = useLeftNavItems(leftNavItemsProps);\n\n // -----------------------------------------------------------------------------\n // ************************** ------------ **************************\n // * LEFTNAV CONFIG *\n // ************************** ------------ **************************\n const finalConfig = React.useMemo(\n () => ({\n leftNavProps: props,\n expandedForAnimation,\n selectedItem: props.selectedItem !== undefined ? props.selectedItem : selectedItem,\n setSelectedItem,\n selectedParent: props.selectedParent !== undefined ? props.selectedParent : selectedParent,\n setSelectedParent,\n focusedItem,\n setFocusedItem,\n openedDrilldowns,\n setOpenedDrilldowns,\n visibleItems,\n visibleItemsRefs,\n }),\n [\n props,\n expandedForAnimation,\n selectedItem,\n setSelectedItem,\n setSelectedParent,\n selectedParent,\n focusedItem,\n setFocusedItem,\n openedDrilldowns,\n setOpenedDrilldowns,\n visibleItems,\n visibleItemsRefs,\n ],\n );\n\n return finalConfig;\n};\n\nexport default useLeftNavConfig;\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAGlB,6BAA4B;AAC5B,oCAAuC;AACvC,oCAAuC;AAEhC,MAAM,mBAAmB,CAAC,UAAsC;AACrE,QAAM,EAAE,UAAU,YAAY,kBAAkB,eAAe,MAAM,IAAI;AAOzE,QAAM,CAAC,cAAc,eAAe,IAAI,aAAAA,QAAM,SAAwB,IAAI;AAC1E,QAAM,CAAC,gBAAgB,iBAAiB,IAAI,aAAAA,QAA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;AAAA,EAClF;AAGA,QAAM,EAAE,cAAc,iBAAiB,QAAI,uBAAAC,SAAgB,iBAAiB;AAM5E,QAAM,cAAc,aAAAD,QAAM;AAAA,IACxB,OAAO;AAAA,MACL,cAAc;AAAA,MACd;AAAA,MACA,cAAc,MAAM,iBAAiB,SAAY,MAAM,eAAe;AAAA,MACtE;AAAA,MACA,gBAAgB,MAAM,mBAAmB,SAAY,MAAM,iBAAiB;AAAA,MAC5E;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;AAEA,IAAO,2BAAQ;",
6
6
  "names": ["React", "useLeftNavItems"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/configs/useLeftNavItems.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable complexity */\nimport { createRef, MutableRefObject, RefObject, useMemo, useRef } from 'react';\nimport { ITEM_TYPES } from '../exported-related';\nimport type { GenericItemItemProps } from '../index.d';\nimport { FOOTER_DS_ID } from '../exported-related/constants';\n\nconst notFocuseableItems = [ITEM_TYPES.LEFT_NAV_ITEM_SEPARATOR, ITEM_TYPES.LEFT_NAV_ITEM_SECTION];\n\n// Walks the array of items\n// Drilldowns are tree-like structures\nconst walkItems = (items: GenericItemItemProps[], openedDrilldowns: string[], callback: (dsId: string) => void) => {\n items.forEach((item) => {\n if (typeof item.type === 'string') {\n // Out of the box item\n if (notFocuseableItems.includes(item.type)) return; // not focuseable\n\n callback(item.dsId);\n\n // If it's an opened uncontrolled drilldown\n if (item.type === ITEM_TYPES.LEFT_NAV_ITEM_UNCONTROLLED_DRILLDOWN && openedDrilldowns.includes(item.dsId))\n walkItems(item.itemOpts?.items ?? [], openedDrilldowns, callback);\n\n // If it's an opened controlled drilldown\n if (item.type === ITEM_TYPES.LEFT_NAV_ITEM_CONTROLLED_DRILLDOWN && item.itemOpts?.isOpened)\n walkItems(item.itemOpts?.items ?? [], openedDrilldowns, callback);\n } else {\n // Custom item\n if (!item.itemOpts?.focuseable) return; // not focuseable specified\n callback(item.dsId);\n }\n });\n};\n\nexport const useLeftNavItems = (props: {\n headerItem: GenericItemItemProps;\n bodyHeaderItem: GenericItemItemProps;\n items: GenericItemItemProps[];\n openedDrilldowns: string[];\n}): {\n visibleItems: string[];\n visibleItemsRefs: MutableRefObject<Record<string, RefObject<HTMLElement>>>;\n} => {\n const { headerItem, bodyHeaderItem, items: bodyItems, openedDrilldowns } = props;\n\n // Place the header and body header items into the array of items\n const items = useMemo(() => {\n const itemsArray: GenericItemItemProps[] = [...bodyItems];\n if (bodyHeaderItem) itemsArray.unshift(bodyHeaderItem);\n if (headerItem) itemsArray.unshift(headerItem);\n return itemsArray;\n }, [headerItem, bodyHeaderItem, bodyItems]);\n\n const visibleItemsRefs = useRef<Record<string, RefObject<HTMLElement>>>({});\n\n const visibleItems: string[] = useMemo(() => {\n const visibleItemsArray: string[] = [];\n walkItems(items, openedDrilldowns, (dsId: string) => {\n visibleItemsArray.push(dsId);\n });\n visibleItemsArray.push(FOOTER_DS_ID);\n return visibleItemsArray;\n }, [items, openedDrilldowns]);\n\n visibleItems.forEach((dsId) => {\n if (!(dsId in visibleItemsRefs.current)) visibleItemsRefs.current[dsId] = createRef();\n });\n\n return { visibleItems, visibleItemsRefs };\n};\n\nexport default useLeftNavItems;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAwE;AACxE,8BAA2B;AAE3B,uBAA6B;AAE7B,MAAM,qBAAqB,CAA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QAAQ,YAAQ,wBAAU;AAAA,EACtF,CAAC;AAED,SAAO,EAAE,cAAc,iBAAiB;AAC1C;AAEA,IAAO,0BAAQ;",
4
+ "sourcesContent": ["/* eslint-disable complexity */\nimport type { MutableRefObject, RefObject } from 'react';\nimport { createRef, useMemo, useRef } from 'react';\nimport { ITEM_TYPES } from '../exported-related';\nimport type { GenericItemItemProps } from '../index.d';\nimport { FOOTER_DS_ID } from '../exported-related/constants';\n\nconst notFocuseableItems = [ITEM_TYPES.LEFT_NAV_ITEM_SEPARATOR, ITEM_TYPES.LEFT_NAV_ITEM_SECTION];\n\n// Walks the array of items\n// Drilldowns are tree-like structures\nconst walkItems = (items: GenericItemItemProps[], openedDrilldowns: string[], callback: (dsId: string) => void) => {\n items.forEach((item) => {\n if (typeof item.type === 'string') {\n // Out of the box item\n if (notFocuseableItems.includes(item.type)) return; // not focuseable\n\n callback(item.dsId);\n\n // If it's an opened uncontrolled drilldown\n if (item.type === ITEM_TYPES.LEFT_NAV_ITEM_UNCONTROLLED_DRILLDOWN && openedDrilldowns.includes(item.dsId))\n walkItems(item.itemOpts?.items ?? [], openedDrilldowns, callback);\n\n // If it's an opened controlled drilldown\n if (item.type === ITEM_TYPES.LEFT_NAV_ITEM_CONTROLLED_DRILLDOWN && item.itemOpts?.isOpened)\n walkItems(item.itemOpts?.items ?? [], openedDrilldowns, callback);\n } else {\n // Custom item\n if (!item.itemOpts?.focuseable) return; // not focuseable specified\n callback(item.dsId);\n }\n });\n};\n\nexport const useLeftNavItems = (props: {\n headerItem: GenericItemItemProps;\n bodyHeaderItem: GenericItemItemProps;\n items: GenericItemItemProps[];\n openedDrilldowns: string[];\n}): {\n visibleItems: string[];\n visibleItemsRefs: MutableRefObject<Record<string, RefObject<HTMLElement>>>;\n} => {\n const { headerItem, bodyHeaderItem, items: bodyItems, openedDrilldowns } = props;\n\n // Place the header and body header items into the array of items\n const items = useMemo(() => {\n const itemsArray: GenericItemItemProps[] = [...bodyItems];\n if (bodyHeaderItem) itemsArray.unshift(bodyHeaderItem);\n if (headerItem) itemsArray.unshift(headerItem);\n return itemsArray;\n }, [headerItem, bodyHeaderItem, bodyItems]);\n\n const visibleItemsRefs = useRef<Record<string, RefObject<HTMLElement>>>({});\n\n const visibleItems: string[] = useMemo(() => {\n const visibleItemsArray: string[] = [];\n walkItems(items, openedDrilldowns, (dsId: string) => {\n visibleItemsArray.push(dsId);\n });\n visibleItemsArray.push(FOOTER_DS_ID);\n return visibleItemsArray;\n }, [items, openedDrilldowns]);\n\n visibleItems.forEach((dsId) => {\n if (!(dsId in visibleItemsRefs.current)) visibleItemsRefs.current[dsId] = createRef();\n });\n\n return { visibleItems, visibleItemsRefs };\n};\n\nexport default useLeftNavItems;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAA2C;AAC3C,8BAA2B;AAE3B,uBAA6B;AAE7B,MAAM,qBAAqB,CAAC,mCAAW,yBAAyB,mCAAW,qBAAqB;AAIhG,MAAM,YAAY,CAAC,OAA+B,kBAA4B,aAAqC;AACjH,QAAM,QAAQ,CAAC,SAAS;AACtB,QAAI,OAAO,KAAK,SAAS,UAAU;AAEjC,UAAI,mBAAmB,SAAS,KAAK,IAAI;AAAG;AAE5C,eAAS,KAAK,IAAI;AAGlB,UAAI,KAAK,SAAS,mCAAW,wCAAwC,iBAAiB,SAAS,KAAK,IAAI;AACtG,kBAAU,KAAK,UAAU,SAAS,CAAC,GAAG,kBAAkB,QAAQ;AAGlE,UAAI,KAAK,SAAS,mCAAW,sCAAsC,KAAK,UAAU;AAChF,kBAAU,KAAK,UAAU,SAAS,CAAC,GAAG,kBAAkB,QAAQ;AAAA,IACpE,OAAO;AAEL,UAAI,CAAC,KAAK,UAAU;AAAY;AAChC,eAAS,KAAK,IAAI;AAAA,IACpB;AAAA,EACF,CAAC;AACH;AAEO,MAAM,kBAAkB,CAAC,UAQ3B;AACH,QAAM,EAAE,YAAY,gBAAgB,OAAO,WAAW,iBAAiB,IAAI;AAG3E,QAAM,YAAQ,sBAAQ,MAAM;AAC1B,UAAM,aAAqC,CAAC,GAAG,SAAS;AACxD,QAAI;AAAgB,iBAAW,QAAQ,cAAc;AACrD,QAAI;AAAY,iBAAW,QAAQ,UAAU;AAC7C,WAAO;AAAA,EACT,GAAG,CAAC,YAAY,gBAAgB,SAAS,CAAC;AAE1C,QAAM,uBAAmB,qBAA+C,CAAC,CAAC;AAE1E,QAAM,mBAAyB,sBAAQ,MAAM;AAC3C,UAAM,oBAA8B,CAAC;AACrC,cAAU,OAAO,kBAAkB,CAAC,SAAiB;AACnD,wBAAkB,KAAK,IAAI;AAAA,IAC7B,CAAC;AACD,sBAAkB,KAAK,6BAAY;AACnC,WAAO;AAAA,EACT,GAAG,CAAC,OAAO,gBAAgB,CAAC;AAE5B,eAAa,QAAQ,CAAC,SAAS;AAC7B,QAAI,EAAE,QAAQ,iBAAiB;AAAU,uBAAiB,QAAQ,YAAQ,wBAAU;AAAA,EACtF,CAAC;AAED,SAAO,EAAE,cAAc,iBAAiB;AAC1C;AAEA,IAAO,0BAAQ;",
6
6
  "names": []
7
7
  }
@@ -39,7 +39,7 @@ const AugmentedIcon = (Icon2) => (0, import_ds_system.styled)(Icon2)`
39
39
  outline: 1px solid #1e79c2;
40
40
  }
41
41
  `;
42
- const Icon = (IconComponent) => (props) => {
42
+ const Icon = (IconComponent) => function(props) {
43
43
  const StyledComponent = AugmentedIcon(IconComponent);
44
44
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledComponent, {
45
45
  color: ["brand-primary", 800],
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/exported-related/Icon/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { styled } from '@elliemae/ds-system';\n\nconst AugmentedIcon = (\n Icon: React.ComponentType<{ color: unknown; tabIndex: number }>,\n) => styled(Icon)`\n cursor: pointer;\n\n outline: 0;\n :focus,\n :active {\n outline: 1px solid #1e79c2;\n }\n`;\n\nexport const Icon = (\n IconComponent: React.ComponentType<{ color: unknown; tabIndex: number }>,\n) => (props: unknown): JSX.Element => {\n const StyledComponent = AugmentedIcon(IconComponent);\n return (\n <StyledComponent color={['brand-primary', 800]} tabIndex={0} {...props} />\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADoBnB;AAnBJ,uBAAuB;AAEvB,MAAM,gBAAgB,CACpBA,cACG,yBAAOA,KAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUT,MAAM,OAAO,CAClB,kBACG,CAAC,UAAgC;AACpC,QAAM,kBAAkB,cAAc,aAAa;AACnD,SACE,4CAAC;AAAA,IAAgB,OAAO,CAAC,iBAAiB,GAAG;AAAA,IAAG,UAAU;AAAA,IAAI,GAAG;AAAA,GAAO;AAE5E;",
4
+ "sourcesContent": ["import React from 'react';\nimport { styled } from '@elliemae/ds-system';\n\nconst AugmentedIcon = (Icon: React.ComponentType<{ color: unknown; tabIndex: number }>) => styled(Icon)`\n cursor: pointer;\n\n outline: 0;\n :focus,\n :active {\n outline: 1px solid #1e79c2;\n }\n`;\n\nexport const Icon = (IconComponent: React.ComponentType<{ color: unknown; tabIndex: number }>) =>\n function (props: unknown): JSX.Element {\n const StyledComponent = AugmentedIcon(IconComponent);\n return <StyledComponent color={['brand-primary', 800]} tabIndex={0} {...props} />;\n };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgBZ;AAfX,uBAAuB;AAEvB,MAAM,gBAAgB,CAACA,cAAoE,yBAAOA,KAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAU/F,MAAM,OAAO,CAAC,kBACnB,SAAU,OAA6B;AACrC,QAAM,kBAAkB,cAAc,aAAa;AACnD,SAAO,4CAAC;AAAA,IAAgB,OAAO,CAAC,iBAAiB,GAAG;AAAA,IAAG,UAAU;AAAA,IAAI,GAAG;AAAA,GAAO;AACjF;",
6
6
  "names": ["Icon"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/exported-related/ItemRenderer/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport React, { useContext, useMemo, useCallback } from 'react';\nimport { StyledItem, StyledCollapsedContainer, StyledBorderBottom } from './styled';\n\nimport { ItemRendererT } from '../../index.d';\nimport { LeftNavContext } from '../../LeftNavigationContext';\nimport { usePropsWithDefaults } from './usePropsWithDefaults';\nimport { useKeyboardNavigation } from '../../hooks';\n\nexport const ItemRenderer: React.ComponentType<ItemRendererT> = (props) => {\n const propsWithDefault = usePropsWithDefaults(props);\n const {\n item,\n item: {\n dsId,\n itemOpts: { selectable, focuseable, indent, ariaLabel, ariaRole, ariaLive, ariaExpanded, ariaDescribedBy },\n CollapsedComponent,\n },\n subitems,\n minHeight,\n paddingTop,\n onClick,\n shadowStyle,\n hasBorderBottom,\n borderBottomMr,\n children,\n } = propsWithDefault;\n\n const ctx = useContext(LeftNavContext);\n const {\n leftNavProps: { onItemClick, openedItem },\n expandedForAnimation,\n selectedParent,\n selectedItem,\n setSelectedItem,\n setFocusedItem,\n visibleItemsRefs,\n } = ctx;\n\n const opened = dsId === openedItem;\n\n const handleOnClick = useCallback(\n (e: React.MouseEvent<HTMLElement>) => {\n if (onClick) onClick(); // used by uncontrolled drilldowns\n onItemClick(item, e);\n if (selectable) setSelectedItem(item.dsId as string);\n },\n [onItemClick, item, setSelectedItem, selectable, onClick],\n );\n\n const handleFocus = useCallback(() => {\n if (focuseable) setFocusedItem(dsId as string);\n }, [dsId, setFocusedItem, focuseable]);\n\n const onKeyDown = useKeyboardNavigation({\n item,\n onClick: handleOnClick,\n });\n\n const cols = useMemo(() => (expandedForAnimation ? ['auto', '1fr', 'auto'] : ['38px']), [expandedForAnimation]);\n const isSelected = useMemo(() => selectedItem === dsId, [selectedItem, dsId]);\n\n if (!expandedForAnimation && !CollapsedComponent) {\n return null;\n }\n\n return (\n <>\n <StyledItem\n ref={visibleItemsRefs.current[dsId]}\n pt={paddingTop}\n pl={indent === undefined ? 'xxxs' : `${indent}px`}\n minHeight={minHeight}\n shadowStyle={shadowStyle(opened, item.type)}\n alignItems=\"flex-start\"\n cols={cols}\n onClick={!opened ? handleOnClick : () => null}\n onKeyDown={onKeyDown}\n selectable={selectable}\n selected={isSelected}\n selectedParent={selectedParent === dsId}\n opened={opened}\n onFocus={handleFocus}\n data-testid=\"leftnav-item-container\"\n tabIndex={focuseable ? 0 : -1}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n role={ariaRole}\n data-selected={isSelected}\n data-selectedparent={selectedParent === dsId}\n data-opened={opened}\n data-type={item.type}\n aria-label={ariaLabel}\n aria-hidden={!focuseable}\n aria-live={ariaLive}\n >\n {!expandedForAnimation ? (\n <StyledCollapsedContainer data-testid=\"leftnav-leftcomponent\" justifyContent=\"center\">\n {CollapsedComponent && <CollapsedComponent item={item} ctx={ctx} />}\n </StyledCollapsedContainer>\n ) : (\n children\n )}\n {hasBorderBottom && <StyledBorderBottom opened={opened} borderBottomMr={borderBottomMr} />}\n </StyledItem>\n {subitems}\n </>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
4
+ "sourcesContent": ["/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport React, { useContext, useMemo, useCallback } from 'react';\nimport { StyledItem, StyledCollapsedContainer, StyledBorderBottom } from './styled';\n\nimport type { ItemRendererT } from '../../index.d';\nimport { LeftNavContext } from '../../LeftNavigationContext';\nimport { usePropsWithDefaults } from './usePropsWithDefaults';\nimport { useKeyboardNavigation } from '../../hooks';\n\nexport const ItemRenderer: React.ComponentType<ItemRendererT> = (props) => {\n const propsWithDefault = usePropsWithDefaults(props);\n const {\n item,\n item: {\n dsId,\n itemOpts: { selectable, focuseable, indent, ariaLabel, ariaRole, ariaLive, ariaExpanded, ariaDescribedBy },\n CollapsedComponent,\n },\n subitems,\n minHeight,\n paddingTop,\n onClick,\n shadowStyle,\n hasBorderBottom,\n borderBottomMr,\n children,\n } = propsWithDefault;\n\n const ctx = useContext(LeftNavContext);\n const {\n leftNavProps: { onItemClick, openedItem },\n expandedForAnimation,\n selectedParent,\n selectedItem,\n setSelectedItem,\n setFocusedItem,\n visibleItemsRefs,\n } = ctx;\n\n const opened = dsId === openedItem;\n\n const handleOnClick = useCallback(\n (e: React.MouseEvent<HTMLElement>) => {\n if (onClick) onClick(); // used by uncontrolled drilldowns\n onItemClick(item, e);\n if (selectable) setSelectedItem(item.dsId as string);\n },\n [onItemClick, item, setSelectedItem, selectable, onClick],\n );\n\n const handleFocus = useCallback(() => {\n if (focuseable) setFocusedItem(dsId as string);\n }, [dsId, setFocusedItem, focuseable]);\n\n const onKeyDown = useKeyboardNavigation({\n item,\n onClick: handleOnClick,\n });\n\n const cols = useMemo(() => (expandedForAnimation ? ['auto', '1fr', 'auto'] : ['38px']), [expandedForAnimation]);\n const isSelected = useMemo(() => selectedItem === dsId, [selectedItem, dsId]);\n\n if (!expandedForAnimation && !CollapsedComponent) {\n return null;\n }\n\n return (\n <>\n <StyledItem\n ref={visibleItemsRefs.current[dsId]}\n pt={paddingTop}\n pl={indent === undefined ? 'xxxs' : `${indent}px`}\n minHeight={minHeight}\n shadowStyle={shadowStyle(opened, item.type)}\n alignItems=\"flex-start\"\n cols={cols}\n onClick={!opened ? handleOnClick : () => null}\n onKeyDown={onKeyDown}\n selectable={selectable}\n selected={isSelected}\n selectedParent={selectedParent === dsId}\n opened={opened}\n onFocus={handleFocus}\n data-testid=\"leftnav-item-container\"\n tabIndex={focuseable ? 0 : -1}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n role={ariaRole}\n data-selected={isSelected}\n data-selectedparent={selectedParent === dsId}\n data-opened={opened}\n data-type={item.type}\n aria-label={ariaLabel}\n aria-hidden={!focuseable}\n aria-live={ariaLive}\n >\n {!expandedForAnimation ? (\n <StyledCollapsedContainer data-testid=\"leftnav-leftcomponent\" justifyContent=\"center\">\n {CollapsedComponent && <CollapsedComponent item={item} ctx={ctx} />}\n </StyledCollapsedContainer>\n ) : (\n children\n )}\n {hasBorderBottom && <StyledBorderBottom opened={opened} borderBottomMr={borderBottomMr} />}\n </StyledItem>\n {subitems}\n </>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADoEnB;AAlEJ,mBAAwD;AACxD,oBAAyE;AAGzE,mCAA+B;AAC/B,kCAAqC;AACrC,mBAAsC;AAE/B,MAAM,eAAmD,CAAC,UAAU;AACzE,QAAM,uBAAmB,kDAAqB,KAAK;AACnD,QAAM;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ;AAAA,MACA,UAAU,EAAE,YAAY,YAAY,QAAQ,WAAW,UAAU,UAAU,cAAc,gBAAgB;AAAA,MACzG;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,UAAM,yBAAW,2CAAc;AACrC,QAAM;AAAA,IACJ,cAAc,EAAE,aAAa,WAAW;AAAA,IACxC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,SAAS,SAAS;AAExB,QAAM,oBAAgB;AAAA,IACpB,CAAC,MAAqC;AACpC,UAAI;AAAS,gBAAQ;AACrB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AA,YAAwB,gBAAe;AAAA,YAC1E,gCAAsB,4CAAC;AAAA,cAAmB;AAAA,cAAY;AAAA,aAAU;AAAA,WACnE,IAEA;AAAA,UAED,mBAAmB,4CAAC;AAAA,YAAmB;AAAA,YAAgB;AAAA,WAAgC;AAAA;AAAA,OAC1F;AAAA,MACC;AAAA;AAAA,GACH;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/exported-related/ItemRenderer/usePropsWithDefaults.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { useMemo } from 'react';\nimport { ItemOptsT, ItemRendererT } from '../../index.d';\n\nconst itemDefaultProps: ItemOptsT = {\n label: '',\n labelOverflow: 'truncate',\n selectable: true,\n focuseable: true,\n openable: false,\n closable: false,\n ariaLabel: '',\n ariaRole: 'menuitem',\n ariaLive: 'off',\n ariaExpanded: undefined,\n ariaDescribedBy: undefined,\n};\n\nconst itemWithoutShadows = ['ds-left-nav-item-header', 'ds-left-nav-item-link', 'ds-left-nav-item-submenu'];\n\n// Make use Item props with defaults\nexport const usePropsWithDefaults = (props: ItemRendererT): Required<ItemRendererT> => {\n const propsWithDefault = useMemo(() => {\n const itemWithDefaults = {\n CollapsedComponent: () => null,\n ...props.item,\n itemOpts: { ...itemDefaultProps, ...props.item.itemOpts },\n };\n return {\n minHeight: '48px',\n paddingTop: '12px',\n subitems: [],\n shadowStyle: (opened: boolean, type: string) => () =>\n `box-shadow: ${\n opened || !itemWithoutShadows.includes(type) ? 'inset 4px 0 0 0 #52A6EC' : 'inset 4px 0 0 0 white'\n }`,\n hasBorderBottom: false,\n borderBottomMr: '0px',\n ...props,\n item: itemWithDefaults,\n };\n }, [props]);\n\n return propsWithDefault as Required<ItemRendererT>;\n};\n", "import * as React from 'react';\nexport { React };\n"],
4
+ "sourcesContent": ["import { useMemo } from 'react';\nimport type { ItemOptsT, ItemRendererT } from '../../index.d';\n\nconst itemDefaultProps: ItemOptsT = {\n label: '',\n labelOverflow: 'truncate',\n selectable: true,\n focuseable: true,\n openable: false,\n closable: false,\n ariaLabel: '',\n ariaRole: 'menuitem',\n ariaLive: 'off',\n ariaExpanded: undefined,\n ariaDescribedBy: undefined,\n};\n\nconst itemWithoutShadows = ['ds-left-nav-item-header', 'ds-left-nav-item-link', 'ds-left-nav-item-submenu'];\n\n// Make use Item props with defaults\nexport const usePropsWithDefaults = (props: ItemRendererT): Required<ItemRendererT> => {\n const propsWithDefault = useMemo(() => {\n const itemWithDefaults = {\n CollapsedComponent: () => null,\n ...props.item,\n itemOpts: { ...itemDefaultProps, ...props.item.itemOpts },\n };\n return {\n minHeight: '48px',\n paddingTop: '12px',\n subitems: [],\n shadowStyle: (opened: boolean, type: string) => () =>\n `box-shadow: ${\n opened || !itemWithoutShadows.includes(type) ? 'inset 4px 0 0 0 #52A6EC' : 'inset 4px 0 0 0 white'\n }`,\n hasBorderBottom: false,\n borderBottomMr: '0px',\n ...props,\n item: itemWithDefaults,\n };\n }, [props]);\n\n return propsWithDefault as Required<ItemRendererT>;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAwB;AAGxB,MAAM,mBAA8B;AAAA,EAClC,OAAO;AAAA,EACP,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,UAAU;AAAA,EACV,WAAW;AAAA,EACX,UAAU;AAAA,EACV,UAAU;AAAA,EACV,cAAc;AAAA,EACd,iBAAiB;AACnB;AAEA,MAAM,qBAAqB,CAAC,2BAA2B,yBAAyB,0BAA0B;AAGnG,MAAM,uBAAuB,CAAC,UAAkD;AACrF,QAAM,uBAAmB,sBAAQ,MAAM;AACrC,UAAM,mBAAmB;AAAA,MACvB,oBAAoB,MAAM;AAAA,MAC1B,GAAG,MAAM;AAAA,MACT,UAAU,EAAE,GAAG,kBAAkB,GAAG,MAAM,KAAK,SAAS;AAAA,IAC1D;AACA,WAAO;AAAA,MACL,WAAW;AAAA,MACX,YAAY;AAAA,MACZ,UAAU,CAAC;AAAA,MACX,aAAa,CAAC,QAAiB,SAAiB,MAC9C,eACE,UAAU,CAAC,mBAAmB,SAAS,IAAI,IAAI,4BAA4B;AAAA,MAE/E,iBAAiB;AAAA,MACjB,gBAAgB;AAAA,MAChB,GAAG;AAAA,MACH,MAAM;AAAA,IACR;AAAA,EACF,GAAG,CAAC,KAAK,CAAC;AAEV,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/useExpandableOnClickHandler.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useCallback, useContext } from 'react';\nimport LeftNavigationContext from '../LeftNavigationContext';\n\ntype useExpandableOnClickHandlerProps = {\n id: string;\n onExpand: React.MouseEventHandler & React.KeyboardEventHandler;\n onOpen: React.MouseEventHandler & React.KeyboardEventHandler;\n selectable?: boolean;\n};\n\nexport const useExpandableOnClickHandler = ({\n id,\n onExpand,\n onOpen,\n selectable = true,\n}: useExpandableOnClickHandlerProps): ((\n e: React.MouseEvent<HTMLElement>,\n) => void) => {\n const {\n leftNavProps: { expanded },\n setSelectedItem,\n } = useContext(LeftNavigationContext);\n\n const handleOnExpand = useCallback(\n (e) => {\n onExpand(e);\n if (selectable) setSelectedItem(id);\n },\n [id, onExpand, setSelectedItem, selectable],\n );\n\n const handleOnOpen = useCallback(\n (e) => {\n onOpen(e);\n if (selectable) setSelectedItem(id);\n },\n [id, onOpen, setSelectedItem, selectable],\n );\n\n const handleOnClick = useCallback(\n (e) => {\n if (!expanded) handleOnExpand(e);\n else handleOnOpen(e);\n },\n [expanded, handleOnExpand, handleOnOpen],\n );\n\n return handleOnClick;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA+C;AAC/C,mCAAkC;AAS3B,MAAM,8BAA8B,CAAC;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AACf,MAEc;AACZ,QAAM;AAAA,IACJ,cAAc,EAAE,SAAS;AAAA,IACzB;AAAA,EACF,QAAI,yBAAW,6BAAAA,OAAqB;AAEpC,QAAM,qBAAiB;AAAA,IACrB,CAAC,MAAM;AACL,eAAS,CAAC;AACV,UAAI;AAAY,wBAAgB,EAAE;AAAA,IACpC;AAAA,IACA,CAAC,IAAI,UAAU,iBAAiB,UAAU;AAAA,EAC5C;AAEA,QAAM,mBAAe;AAAA,IACnB,CAAC,MAAM;AACL,aAAO,CAAC;AACR,UAAI;AAAY,wBAAgB,EAAE;AAAA,IACpC;AAAA,IACA,CAAC,IAAI,QAAQ,iBAAiB,UAAU;AAAA,EAC1C;AAEA,QAAM,oBAAgB;AAAA,IACpB,CAAC,MAAM;AACL,UAAI,CAAC;AAAU,uBAAe,CAAC;AAAA;AAC1B,qBAAa,CAAC;AAAA,IACrB;AAAA,IACA,CAAC,UAAU,gBAAgB,YAAY;AAAA,EACzC;AAEA,SAAO;AACT;",
4
+ "sourcesContent": ["import type React from 'react';\nimport { useCallback, useContext } from 'react';\nimport LeftNavigationContext from '../LeftNavigationContext';\n\ntype useExpandableOnClickHandlerProps = {\n id: string;\n onExpand: React.MouseEventHandler & React.KeyboardEventHandler;\n onOpen: React.MouseEventHandler & React.KeyboardEventHandler;\n selectable?: boolean;\n};\n\nexport const useExpandableOnClickHandler = ({\n id,\n onExpand,\n onOpen,\n selectable = true,\n}: useExpandableOnClickHandlerProps): ((e: React.MouseEvent<HTMLElement>) => void) => {\n const {\n leftNavProps: { expanded },\n setSelectedItem,\n } = useContext(LeftNavigationContext);\n\n const handleOnExpand = useCallback(\n (e) => {\n onExpand(e);\n if (selectable) setSelectedItem(id);\n },\n [id, onExpand, setSelectedItem, selectable],\n );\n\n const handleOnOpen = useCallback(\n (e) => {\n onOpen(e);\n if (selectable) setSelectedItem(id);\n },\n [id, onOpen, setSelectedItem, selectable],\n );\n\n const handleOnClick = useCallback(\n (e) => {\n if (!expanded) handleOnExpand(e);\n else handleOnOpen(e);\n },\n [expanded, handleOnExpand, handleOnOpen],\n );\n\n return handleOnClick;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAwC;AACxC,mCAAkC;AAS3B,MAAM,8BAA8B,CAAC;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AACf,MAAsF;AACpF,QAAM;AAAA,IACJ,cAAc,EAAE,SAAS;AAAA,IACzB;AAAA,EACF,QAAI,yBAAW,6BAAAA,OAAqB;AAEpC,QAAM,qBAAiB;AAAA,IACrB,CAAC,MAAM;AACL,eAAS,CAAC;AACV,UAAI;AAAY,wBAAgB,EAAE;AAAA,IACpC;AAAA,IACA,CAAC,IAAI,UAAU,iBAAiB,UAAU;AAAA,EAC5C;AAEA,QAAM,mBAAe;AAAA,IACnB,CAAC,MAAM;AACL,aAAO,CAAC;AACR,UAAI;AAAY,wBAAgB,EAAE;AAAA,IACpC;AAAA,IACA,CAAC,IAAI,QAAQ,iBAAiB,UAAU;AAAA,EAC1C;AAEA,QAAM,oBAAgB;AAAA,IACpB,CAAC,MAAM;AACL,UAAI,CAAC;AAAU,uBAAe,CAAC;AAAA;AAC1B,qBAAa,CAAC;AAAA,IACrB;AAAA,IACA,CAAC,UAAU,gBAAgB,YAAY;AAAA,EACzC;AAEA,SAAO;AACT;",
6
6
  "names": ["LeftNavigationContext"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/useKeyboardNavigation.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable max-statements */\n/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React, { useCallback, useMemo, useLayoutEffect, useContext } from 'react';\nimport { CHEVRON_BACK_DS_ID, FOOTER_MENU_CLOSE_DS_ID } from '../exported-related/constants';\nimport { GenericItemItemProps } from '../index.d';\nimport LeftNavContext from '../LeftNavigationContext';\n\nconst KEY_CODES = {\n TAB: 9,\n ENTER: 13,\n SPACE: 32,\n LEFT_ARROW: 37,\n UP_ARROW: 38,\n RIGHT_ARROW: 39,\n DOWN_ARROW: 40,\n END: 35,\n HOME: 36,\n};\n\nconst nextIndex = (index: number, length: number) => (index + 1) % length;\nconst prevIndex = (index: number, length: number) => (index - 1 + length) % length;\n\ntype useKeyboardNavigationProps = {\n item: GenericItemItemProps;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onClick: (e: any) => void;\n};\n\nexport const useKeyboardNavigation = ({ item, onClick }: useKeyboardNavigationProps): React.KeyboardEventHandler => {\n const {\n dsId,\n itemOpts: { selectable, openable, closable },\n } = item;\n\n const { visibleItems, visibleItemsRefs } = useContext(LeftNavContext);\n\n const currentIndex = useMemo(\n () => visibleItems.findIndex((visibleItemDsId) => visibleItemDsId === dsId),\n [dsId, visibleItems],\n );\n\n const { setFocusedItem, focusedItem, setSelectedItem } = useContext(LeftNavContext);\n\n const focusAndSelect = useCallback(\n (nextDsId: string) => {\n setFocusedItem(nextDsId);\n setSelectedItem(nextDsId);\n },\n [setFocusedItem, setSelectedItem],\n );\n\n useLayoutEffect(() => {\n if (dsId === focusedItem) visibleItemsRefs.current[dsId]?.current?.focus();\n }, [dsId, focusedItem, visibleItemsRefs]);\n\n const onKeyDown: React.KeyboardEventHandler = useCallback(\n (e) => {\n const { keyCode } = e;\n\n // Prevent default behaviour when not tab\n if (keyCode !== KEY_CODES.TAB) {\n e.preventDefault();\n }\n\n if (keyCode === KEY_CODES.ENTER || keyCode === KEY_CODES.SPACE) {\n if (selectable) {\n onClick(e);\n focusAndSelect(dsId);\n } else if (focusedItem === CHEVRON_BACK_DS_ID) {\n onClick(e);\n focusAndSelect(dsId);\n } else if (focusedItem === FOOTER_MENU_CLOSE_DS_ID) {\n onClick(e);\n setFocusedItem(dsId);\n }\n }\n\n if (openable && keyCode === KEY_CODES.RIGHT_ARROW) {\n onClick(e);\n }\n\n if (closable && keyCode === KEY_CODES.LEFT_ARROW) {\n onClick(e);\n setFocusedItem(dsId);\n }\n\n if (keyCode === KEY_CODES.DOWN_ARROW) {\n const nextDsId = visibleItems[nextIndex(currentIndex, visibleItems.length)];\n setFocusedItem(nextDsId);\n }\n\n if (keyCode === KEY_CODES.UP_ARROW) {\n const prevDsId = visibleItems[prevIndex(currentIndex, visibleItems.length)];\n setFocusedItem(prevDsId);\n }\n\n if (keyCode === KEY_CODES.HOME) {\n setFocusedItem(visibleItems[0]);\n }\n\n if (keyCode === KEY_CODES.END) {\n setFocusedItem(visibleItems[visibleItems.length - 1]);\n }\n },\n [\n openable,\n closable,\n selectable,\n focusedItem,\n onClick,\n focusAndSelect,\n dsId,\n setFocusedItem,\n visibleItems,\n currentIndex,\n ],\n );\n\n return onKeyDown;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,mBAAyE;AACzE,uBAA4D;AAE5D,mCAA2B;AAE3B,MAAM,YAAY;AAAA,EAChB,KAAK;AAAA,EACL,OAAO;AAAA,EACP,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,KAAK;AAAA,EACL,MAAM;AACR;AAEA,MAAM,YAAY,CAAC,OAAe,YAAoB,QAAQ,KAAK;AACnE,MAAM,YAAY,CAAC,OAAe,YAAoB,QAAQ,IAAI,UAAU;AAQrE,MAAM,wBAAwB,CAAC,EAAE,MAAM,QAAQ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AW,aAAa,UAAU,cAAc,aAAa,MAAM;AACzE,uBAAe,QAAQ;AAAA,MACzB;AAEA,UAAI,YAAY,UAAU,UAAU;AAClC,cAAM,WAAW,aAAa,UAAU,cAAc,aAAa,MAAM;AACzE,uBAAe,QAAQ;AAAA,MACzB;AAEA,UAAI,YAAY,UAAU,MAAM;AAC9B,uBAAe,aAAa,EAAE;AAAA,MAChC;AAEA,UAAI,YAAY,UAAU,KAAK;AAC7B,uBAAe,aAAa,aAAa,SAAS,EAAE;AAAA,MACtD;AAAA,IACF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;",
4
+ "sourcesContent": ["/* eslint-disable max-statements */\n/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport type React from 'react';\nimport { useCallback, useMemo, useLayoutEffect, useContext } from 'react';\nimport { CHEVRON_BACK_DS_ID, FOOTER_MENU_CLOSE_DS_ID } from '../exported-related/constants';\nimport type { GenericItemItemProps } from '../index.d';\nimport LeftNavContext from '../LeftNavigationContext';\n\nconst KEY_CODES = {\n TAB: 9,\n ENTER: 13,\n SPACE: 32,\n LEFT_ARROW: 37,\n UP_ARROW: 38,\n RIGHT_ARROW: 39,\n DOWN_ARROW: 40,\n END: 35,\n HOME: 36,\n};\n\nconst nextIndex = (index: number, length: number) => (index + 1) % length;\nconst prevIndex = (index: number, length: number) => (index - 1 + length) % length;\n\ntype useKeyboardNavigationProps = {\n item: GenericItemItemProps;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onClick: (e: any) => void;\n};\n\nexport const useKeyboardNavigation = ({ item, onClick }: useKeyboardNavigationProps): React.KeyboardEventHandler => {\n const {\n dsId,\n itemOpts: { selectable, openable, closable },\n } = item;\n\n const { visibleItems, visibleItemsRefs } = useContext(LeftNavContext);\n\n const currentIndex = useMemo(\n () => visibleItems.findIndex((visibleItemDsId) => visibleItemDsId === dsId),\n [dsId, visibleItems],\n );\n\n const { setFocusedItem, focusedItem, setSelectedItem } = useContext(LeftNavContext);\n\n const focusAndSelect = useCallback(\n (nextDsId: string) => {\n setFocusedItem(nextDsId);\n setSelectedItem(nextDsId);\n },\n [setFocusedItem, setSelectedItem],\n );\n\n useLayoutEffect(() => {\n if (dsId === focusedItem) visibleItemsRefs.current[dsId]?.current?.focus();\n }, [dsId, focusedItem, visibleItemsRefs]);\n\n const onKeyDown: React.KeyboardEventHandler = useCallback(\n (e) => {\n const { keyCode } = e;\n\n // Prevent default behaviour when not tab\n if (keyCode !== KEY_CODES.TAB) {\n e.preventDefault();\n }\n\n if (keyCode === KEY_CODES.ENTER || keyCode === KEY_CODES.SPACE) {\n if (selectable) {\n onClick(e);\n focusAndSelect(dsId);\n } else if (focusedItem === CHEVRON_BACK_DS_ID) {\n onClick(e);\n focusAndSelect(dsId);\n } else if (focusedItem === FOOTER_MENU_CLOSE_DS_ID) {\n onClick(e);\n setFocusedItem(dsId);\n }\n }\n\n if (openable && keyCode === KEY_CODES.RIGHT_ARROW) {\n onClick(e);\n }\n\n if (closable && keyCode === KEY_CODES.LEFT_ARROW) {\n onClick(e);\n setFocusedItem(dsId);\n }\n\n if (keyCode === KEY_CODES.DOWN_ARROW) {\n const nextDsId = visibleItems[nextIndex(currentIndex, visibleItems.length)];\n setFocusedItem(nextDsId);\n }\n\n if (keyCode === KEY_CODES.UP_ARROW) {\n const prevDsId = visibleItems[prevIndex(currentIndex, visibleItems.length)];\n setFocusedItem(prevDsId);\n }\n\n if (keyCode === KEY_CODES.HOME) {\n setFocusedItem(visibleItems[0]);\n }\n\n if (keyCode === KEY_CODES.END) {\n setFocusedItem(visibleItems[visibleItems.length - 1]);\n }\n },\n [\n openable,\n closable,\n selectable,\n focusedItem,\n onClick,\n focusAndSelect,\n dsId,\n setFocusedItem,\n visibleItems,\n currentIndex,\n ],\n );\n\n return onKeyDown;\n};\n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Ae;AAAA,MACnB;AAEA,UAAI,YAAY,UAAU,SAAS,YAAY,UAAU,OAAO;AAC9D,YAAI,YAAY;AACd,kBAAQ,CAAC;AACT,yBAAe,IAAI;AAAA,QACrB,WAAW,gBAAgB,qCAAoB;AAC7C,kBAAQ,CAAC;AACT,yBAAe,IAAI;AAAA,QACrB,WAAW,gBAAgB,0CAAyB;AAClD,kBAAQ,CAAC;AACT,yBAAe,IAAI;AAAA,QACrB;AAAA,MACF;AAEA,UAAI,YAAY,YAAY,UAAU,aAAa;AACjD,gBAAQ,CAAC;AAAA,MACX;AAEA,UAAI,YAAY,YAAY,UAAU,YAAY;AAChD,gBAAQ,CAAC;AACT,uBAAe,IAAI;AAAA,MACrB;AAEA,UAAI,YAAY,UAAU,YAAY;AACpC,cAAM,WAAW,aAAa,UAAU,cAAc,aAAa,MAAM;AACzE,uBAAe,QAAQ;AAAA,MACzB;AAEA,UAAI,YAAY,UAAU,UAAU;AAClC,cAAM,WAAW,aAAa,UAAU,cAAc,aAAa,MAAM;AACzE,uBAAe,QAAQ;AAAA,MACzB;AAEA,UAAI,YAAY,UAAU,MAAM;AAC9B,uBAAe,aAAa,EAAE;AAAA,MAChC;AAEA,UAAI,YAAY,UAAU,KAAK;AAC7B,uBAAe,aAAa,aAAa,SAAS,EAAE;AAAA,MACtD;AAAA,IACF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;",
6
6
  "names": ["LeftNavContext"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/useOpenableOnClickHandler.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { useCallback, useContext } from 'react';\nimport LeftNavigationContext from '../LeftNavigationContext';\n\ntype useOpenableOnClickHandlerProps = {\n id: string;\n onExpand: React.MouseEventHandler & React.KeyboardEventHandler;\n onOpen: React.MouseEventHandler & React.KeyboardEventHandler;\n onClose: React.MouseEventHandler & React.KeyboardEventHandler;\n opened: boolean;\n};\n\nexport const useOpenableOnClickHandler = ({\n id,\n opened,\n onExpand,\n onOpen,\n onClose,\n}: useOpenableOnClickHandlerProps): ((\n e: React.MouseEvent<HTMLElement>,\n) => void) => {\n const {\n leftNavProps: { expanded },\n setSelectedItem,\n } = useContext(LeftNavigationContext);\n\n const handleOnExpand = useCallback(\n (e) => {\n onExpand(e);\n setSelectedItem(id);\n },\n [id, onExpand, setSelectedItem],\n );\n\n const handleOnOpen = useCallback(\n (e) => {\n onOpen(e);\n setSelectedItem(id);\n },\n [id, onOpen, setSelectedItem],\n );\n\n const handleOnClose = useCallback(\n (e) => {\n onClose(e);\n setSelectedItem(id);\n },\n [id, onClose, setSelectedItem],\n );\n\n const handleOnClick = useCallback(\n (e) => {\n if (!expanded) handleOnExpand(e);\n else if (!opened) handleOnOpen(e);\n else handleOnClose(e);\n },\n [expanded, opened, handleOnExpand, handleOnOpen, handleOnClose],\n );\n\n return handleOnClick;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAwC;AACxC,mCAAkC;AAU3B,MAAM,4BAA4B,CAAC;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAEc;AACZ,QAAM;AAAA,IACJ,cAAc,EAAE,SAAS;AAAA,IACzB;AAAA,EACF,QAAI,yBAAW,6BAAAA,OAAqB;AAEpC,QAAM,qBAAiB;AAAA,IACrB,CAAC,MAAM;AACL,eAAS,CAAC;AACV,sBAAgB,EAAE;AAAA,IACpB;AAAA,IACA,CAAC,IAAI,UAAU,eAAe;AAAA,EAChC;AAEA,QAAM,mBAAe;AAAA,IACnB,CAAC,MAAM;AACL,aAAO,CAAC;AACR,sBAAgB,EAAE;AAAA,IACpB;AAAA,IACA,CAAC,IAAI,QAAQ,eAAe;AAAA,EAC9B;AAEA,QAAM,oBAAgB;AAAA,IACpB,CAAC,MAAM;AACL,cAAQ,CAAC;AACT,sBAAgB,EAAE;AAAA,IACpB;AAAA,IACA,CAAC,IAAI,SAAS,eAAe;AAAA,EAC/B;AAEA,QAAM,oBAAgB;AAAA,IACpB,CAAC,MAAM;AACL,UAAI,CAAC;AAAU,uBAAe,CAAC;AAAA,eACtB,CAAC;AAAQ,qBAAa,CAAC;AAAA;AAC3B,sBAAc,CAAC;AAAA,IACtB;AAAA,IACA,CAAC,UAAU,QAAQ,gBAAgB,cAAc,aAAa;AAAA,EAChE;AAEA,SAAO;AACT;",
4
+ "sourcesContent": ["import { useCallback, useContext } from 'react';\nimport LeftNavigationContext from '../LeftNavigationContext';\n\ntype useOpenableOnClickHandlerProps = {\n id: string;\n onExpand: React.MouseEventHandler & React.KeyboardEventHandler;\n onOpen: React.MouseEventHandler & React.KeyboardEventHandler;\n onClose: React.MouseEventHandler & React.KeyboardEventHandler;\n opened: boolean;\n};\n\nexport const useOpenableOnClickHandler = ({\n id,\n opened,\n onExpand,\n onOpen,\n onClose,\n}: useOpenableOnClickHandlerProps): ((e: React.MouseEvent<HTMLElement>) => void) => {\n const {\n leftNavProps: { expanded },\n setSelectedItem,\n } = useContext(LeftNavigationContext);\n\n const handleOnExpand = useCallback(\n (e) => {\n onExpand(e);\n setSelectedItem(id);\n },\n [id, onExpand, setSelectedItem],\n );\n\n const handleOnOpen = useCallback(\n (e) => {\n onOpen(e);\n setSelectedItem(id);\n },\n [id, onOpen, setSelectedItem],\n );\n\n const handleOnClose = useCallback(\n (e) => {\n onClose(e);\n setSelectedItem(id);\n },\n [id, onClose, setSelectedItem],\n );\n\n const handleOnClick = useCallback(\n (e) => {\n if (!expanded) handleOnExpand(e);\n else if (!opened) handleOnOpen(e);\n else handleOnClose(e);\n },\n [expanded, opened, handleOnExpand, handleOnOpen, handleOnClose],\n );\n\n return handleOnClick;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAwC;AACxC,mCAAkC;AAU3B,MAAM,4BAA4B,CAAC;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAoF;AAClF,QAAM;AAAA,IACJ,cAAc,EAAE,SAAS;AAAA,IACzB;AAAA,EACF,QAAI,yBAAW,6BAAAA,OAAqB;AAEpC,QAAM,qBAAiB;AAAA,IACrB,CAAC,MAAM;AACL,eAAS,CAAC;AACV,sBAAgB,EAAE;AAAA,IACpB;AAAA,IACA,CAAC,IAAI,UAAU,eAAe;AAAA,EAChC;AAEA,QAAM,mBAAe;AAAA,IACnB,CAAC,MAAM;AACL,aAAO,CAAC;AACR,sBAAgB,EAAE;AAAA,IACpB;AAAA,IACA,CAAC,IAAI,QAAQ,eAAe;AAAA,EAC9B;AAEA,QAAM,oBAAgB;AAAA,IACpB,CAAC,MAAM;AACL,cAAQ,CAAC;AACT,sBAAgB,EAAE;AAAA,IACpB;AAAA,IACA,CAAC,IAAI,SAAS,eAAe;AAAA,EAC/B;AAEA,QAAM,oBAAgB;AAAA,IACpB,CAAC,MAAM;AACL,UAAI,CAAC;AAAU,uBAAe,CAAC;AAAA,eACtB,CAAC;AAAQ,qBAAa,CAAC;AAAA;AAC3B,sBAAc,CAAC;AAAA,IACtB;AAAA,IACA,CAAC,UAAU,QAAQ,gBAAgB,cAAc,aAAa;AAAA,EAChE;AAEA,SAAO;AACT;",
6
6
  "names": ["LeftNavigationContext"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/useSelectFirstBodyItem.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable max-params */\nimport React, { useEffect } from 'react';\nimport { GenericItemItemProps } from '../index.d';\nimport { ITEM_TYPES } from '../exported-related/constants';\n\nconst { LEFT_NAV_ITEM_SEPARATOR, LEFT_NAV_ITEM_SECTION } = ITEM_TYPES;\n\nconst isSelectableOutOfTheBox = (elem: GenericItemItemProps) =>\n typeof elem.type === 'string' && elem.type !== LEFT_NAV_ITEM_SEPARATOR && elem.type !== LEFT_NAV_ITEM_SECTION;\nconst isSelectableCustom = (elem: GenericItemItemProps) => elem.itemOpts.selectable;\n\nconst isItemInsideTheTree = (item: GenericItemItemProps, itemID: string | null): boolean =>\n item.dsId === itemID || !!item?.itemOpts?.items?.some((it) => isItemInsideTheTree(it, itemID));\n\nexport const useSelectFirstBodyItem = (\n items: GenericItemItemProps[],\n openedItem: string | null,\n selectedItem: string | null,\n setSelectedItem: React.Dispatch<React.SetStateAction<string | null>>,\n disableDefaultSelection: boolean | undefined,\n): void => {\n useEffect(() => {\n if (!disableDefaultSelection && items && items.length && openedItem) {\n const index = items.findIndex((elem) => isSelectableOutOfTheBox(elem) || isSelectableCustom(elem));\n const isItemInside = items.some((it) => isItemInsideTheTree(it, selectedItem));\n if (isItemInside) setSelectedItem(selectedItem);\n else if (index !== -1) setSelectedItem(items[index].dsId ?? '');\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [openedItem, setSelectedItem, disableDefaultSelection]);\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAiC;AAEjC,uBAA2B;AAE3B,MAAM,EAAE,yBAAyB,sBAAsB,IAAI;AAE3D,MAAM,0BAA0B,CAAC,SAC/B,OAAO,KAAK,SAAS,YAAY,KAAK,SAAS,2BAA2B,KAAK,SAAS;AAC1F,MAAM,qBAAqB,CAAC,SAA+B,KAAK,SAAS;AAEzE,MAAM,sBAAsB,CAAC,MAA4B,WACvD,KAAK,SAAS,UAAU,CAAC,CAAC,MAAM,UAAU,OAAO,KAAK,CAAC,OAAO,oBAAoB,IAAI,MAAM,CAAC;AAExF,MAAM,yBAAyB,CACpC,OACA,YACA,cACA,iBACA,4BACS;AACT,8BAAU,MAAM;AACd,QAAI,CAAC,2BAA2B,SAAS,MAAM,UAAU,YAAY;AACnE,YAAM,QAAQ,MAAM,UAAU,CAAC,SAAS,wBAAwB,IAAI,KAAK,mBAAmB,IAAI,CAAC;AACjG,YAAM,eAAe,MAAM,KAAK,CAAC,OAAO,oBAAoB,IAAI,YAAY,CAAC;AAC7E,UAAI;AAAc,wBAAgB,YAAY;AAAA,eACrC,UAAU;AAAI,wBAAgB,MAAM,OAAO,QAAQ,EAAE;AAAA,IAChE;AAAA,EAEF,GAAG,CAAC,YAAY,iBAAiB,uBAAuB,CAAC;AAC3D;",
4
+ "sourcesContent": ["/* eslint-disable max-params */\nimport type React from 'react';\nimport { useEffect } from 'react';\nimport type { GenericItemItemProps } from '../index.d';\nimport { ITEM_TYPES } from '../exported-related/constants';\n\nconst { LEFT_NAV_ITEM_SEPARATOR, LEFT_NAV_ITEM_SECTION } = ITEM_TYPES;\n\nconst isSelectableOutOfTheBox = (elem: GenericItemItemProps) =>\n typeof elem.type === 'string' && elem.type !== LEFT_NAV_ITEM_SEPARATOR && elem.type !== LEFT_NAV_ITEM_SECTION;\nconst isSelectableCustom = (elem: GenericItemItemProps) => elem.itemOpts.selectable;\n\nconst isItemInsideTheTree = (item: GenericItemItemProps, itemID: string | null): boolean =>\n item.dsId === itemID || !!item?.itemOpts?.items?.some((it) => isItemInsideTheTree(it, itemID));\n\nexport const useSelectFirstBodyItem = (\n items: GenericItemItemProps[],\n openedItem: string | null,\n selectedItem: string | null,\n setSelectedItem: React.Dispatch<React.SetStateAction<string | null>>,\n disableDefaultSelection: boolean | undefined,\n): void => {\n useEffect(() => {\n if (!disableDefaultSelection && items && items.length && openedItem) {\n const index = items.findIndex((elem) => isSelectableOutOfTheBox(elem) || isSelectableCustom(elem));\n const isItemInside = items.some((it) => isItemInsideTheTree(it, selectedItem));\n if (isItemInside) setSelectedItem(selectedItem);\n else if (index !== -1) setSelectedItem(items[index].dsId ?? '');\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [openedItem, setSelectedItem, disableDefaultSelection]);\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAA0B;AAE1B,uBAA2B;AAE3B,MAAM,EAAE,yBAAyB,sBAAsB,IAAI;AAE3D,MAAM,0BAA0B,CAAC,SAC/B,OAAO,KAAK,SAAS,YAAY,KAAK,SAAS,2BAA2B,KAAK,SAAS;AAC1F,MAAM,qBAAqB,CAAC,SAA+B,KAAK,SAAS;AAEzE,MAAM,sBAAsB,CAAC,MAA4B,WACvD,KAAK,SAAS,UAAU,CAAC,CAAC,MAAM,UAAU,OAAO,KAAK,CAAC,OAAO,oBAAoB,IAAI,MAAM,CAAC;AAExF,MAAM,yBAAyB,CACpC,OACA,YACA,cACA,iBACA,4BACS;AACT,8BAAU,MAAM;AACd,QAAI,CAAC,2BAA2B,SAAS,MAAM,UAAU,YAAY;AACnE,YAAM,QAAQ,MAAM,UAAU,CAAC,SAAS,wBAAwB,IAAI,KAAK,mBAAmB,IAAI,CAAC;AACjG,YAAM,eAAe,MAAM,KAAK,CAAC,OAAO,oBAAoB,IAAI,YAAY,CAAC;AAC7E,UAAI;AAAc,wBAAgB,YAAY;AAAA,eACrC,UAAU;AAAI,wBAAgB,MAAM,OAAO,QAAQ,EAAE;AAAA,IAChE;AAAA,EAEF,GAAG,CAAC,YAAY,iBAAiB,uBAAuB,CAAC;AAC3D;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.d.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { type Theme } from '@elliemae/ds-system';\nimport type { ContextProps } from './LeftNavigationContext';\n\nexport type LabelOveflowT = 'wrap' | 'wrapAll' | 'truncate';\nexport interface LeftNavProps {\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 HeaderComponent?: GenericItemItemProps;\n BodyHeaderComponent?: GenericItemItemProps;\n loading: boolean;\n selectedItem?: string;\n selectedParent?: string;\n disableDefaultSelection?: boolean;\n withoutBodyShadow?: boolean;\n actionRef?: React.RefObject<{ setFocusedItem: React.Dispatch<React.SetStateAction<string | null>> }>;\n}\nexport type OutOfTheBoxT =\n | 'ds-left-nav-item-header'\n | 'ds-left-nav-item-link'\n | 'ds-left-nav-item-submenu'\n | 'ds-left-nav-item-controlled-drilldown'\n | 'ds-left-nav-item-uncontrolled-drilldown'\n | 'ds-left-nav-item-section'\n | 'ds-left-nav-item-separator'\n | 'ds-left-nav-item-text-label'\n | 'ds-left-nav-item-with-date';\n\nexport interface ItemOptsT {\n label?: string | JSX.Element;\n labelBold?: boolean;\n labelColor?: [string, string];\n labelOverflow?: LabelOveflowT;\n labelRightSection?: string | 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}\n\nexport interface ComponentProps {\n item: GenericItemItemProps;\n ctx: ContextProps;\n}\nexport interface GenericItemItemProps {\n dsId?: string;\n type?: string;\n CollapsedComponent?: React.ComponentType<ComponentProps> | null;\n Component?: React.ComponentType<ComponentProps>;\n itemOpts: ItemOptsT;\n}\nexport interface OutOfTheBoxMapItemT {\n item: GenericItemItemProps;\n}\nexport interface ItemRendererT {\n item: GenericItemItemProps;\n subitems?: JSX.Element[];\n minHeight?: string;\n paddingTop?: string;\n onClick?: () => void;\n shadowStyle?: (opened: boolean, type: string) => (theme: Theme) => string;\n hasBorderBottom?: boolean;\n borderBottomMr?: string;\n children: React.ReactNode;\n}\n", "import * as React from 'react';\nexport { React };\n"],
4
+ "sourcesContent": ["import type React from 'react';\nimport { type Theme } from '@elliemae/ds-system';\nimport type { ContextProps } from './LeftNavigationContext';\n\nexport type LabelOveflowT = 'wrap' | 'wrapAll' | 'truncate';\nexport interface LeftNavProps {\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 HeaderComponent?: GenericItemItemProps;\n BodyHeaderComponent?: GenericItemItemProps;\n loading: boolean;\n selectedItem?: string;\n selectedParent?: string;\n disableDefaultSelection?: boolean;\n withoutBodyShadow?: boolean;\n actionRef?: React.RefObject<{ setFocusedItem: React.Dispatch<React.SetStateAction<string | null>> }>;\n}\nexport type OutOfTheBoxT =\n | 'ds-left-nav-item-header'\n | 'ds-left-nav-item-link'\n | 'ds-left-nav-item-submenu'\n | 'ds-left-nav-item-controlled-drilldown'\n | 'ds-left-nav-item-uncontrolled-drilldown'\n | 'ds-left-nav-item-section'\n | 'ds-left-nav-item-separator'\n | 'ds-left-nav-item-text-label'\n | 'ds-left-nav-item-with-date';\n\nexport interface ItemOptsT {\n label?: string | JSX.Element;\n labelBold?: boolean;\n labelColor?: [string, string];\n labelOverflow?: LabelOveflowT;\n labelRightSection?: string | 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}\n\nexport interface ComponentProps {\n item: GenericItemItemProps;\n ctx: ContextProps;\n}\nexport interface GenericItemItemProps {\n dsId?: string;\n type?: string;\n CollapsedComponent?: React.ComponentType<ComponentProps> | null;\n Component?: React.ComponentType<ComponentProps>;\n itemOpts: ItemOptsT;\n}\nexport interface OutOfTheBoxMapItemT {\n item: GenericItemItemProps;\n}\nexport interface ItemRendererT {\n item: GenericItemItemProps;\n subitems?: JSX.Element[];\n minHeight?: string;\n paddingTop?: string;\n onClick?: () => void;\n shadowStyle?: (opened: boolean, type: string) => (theme: Theme) => string;\n hasBorderBottom?: boolean;\n borderBottomMr?: string;\n children: React.ReactNode;\n}\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/outOfTheBox/ItemHeader/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React, { useCallback } from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { Theme } from '@elliemae/ds-system';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport {\n StyledItemLabel,\n StyledChevronLeft,\n StyledBottomContainer,\n StyledLeftContainer,\n StyledRightContainer,\n} from '../styled';\nimport { CHEVRON_BACK_DS_ID } from '../../exported-related/constants';\n\nconst notOpenedShadowStyle = (isSelected: boolean) => (theme: Theme) =>\n `\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : 'transparent'};\n\n :hover {\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : theme.colors.brand[300]};\n }\n\n :active {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};\n }\n`;\n\nexport const ItemHeader = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: { label, RightComponent, BottomComponent, labelDataTestId, labelOverflow: itemLabelOverflow },\n CollapsedComponent = () => null,\n },\n ctx,\n ctx: {\n leftNavProps: { openedItem, labelOverflow: leftNavLabelOverflow, onItemClick },\n expandedForAnimation,\n setFocusedItem,\n selectedItem,\n selectedParent,\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const opened = openedItem === dsId;\n\n const ariaLabel = item.itemOpts.ariaLabel ?? (typeof label === 'string' ? label : 'menuitem');\n\n const isSelected = selectedItem === dsId || selectedParent === dsId;\n\n const shadowStyle = useCallback(\n (opened_: boolean) => (theme: Theme) =>\n !opened_ ? notOpenedShadowStyle(isSelected)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`,\n [isSelected],\n );\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaLabel,\n ariaExpanded: opened,\n ...item.itemOpts,\n openable: expandedForAnimation && !opened,\n closable: expandedForAnimation && opened,\n selectable: !opened,\n },\n }}\n hasBorderBottom\n borderBottomMr={opened ? '12px' : '0px'}\n shadowStyle={shadowStyle}\n >\n <StyledLeftContainer\n cols={opened ? ['auto', 'auto'] : ['38px']}\n gutter=\"1px\"\n pl={opened ? 'xxs' : 0}\n justifyItems=\"center\"\n data-testid=\"leftnav-leftcomponent\"\n >\n {opened && (\n <StyledChevronLeft\n size=\"m\"\n color={['brand-primary', 800]}\n onClick={(e: React.MouseEvent<HTMLElement>) => {\n onItemClick(item, e);\n }}\n data-testid=\"leftnav-leftcomponent-chevron\"\n tabIndex={0}\n onFocus={(e: React.FocusEvent) => {\n e.stopPropagation();\n setFocusedItem(CHEVRON_BACK_DS_ID);\n }}\n role=\"button\"\n aria-label={`Close ${ariaLabel}`}\n />\n )}\n {CollapsedComponent && <CollapsedComponent item={item} ctx={ctx} />}\n </StyledLeftContainer>\n <StyledItemLabel\n ml={opened ? 'xxs' : '1px'}\n mt=\"xxxs\"\n mb=\"15px\"\n data-testid={labelDataTestId || 'leftnav-itemlabel'}\n labelOverflow={labelOverflow}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledItemLabel>\n <StyledRightContainer\n pl=\"xs\"\n pr={opened ? 'xxs2' : 'xxs'}\n onFocus={(e) => {\n setFocusedItem(null);\n e.stopPropagation();\n }}\n onKeyDown={(e) => e.stopPropagation()}\n data-testid=\"leftnav-right-component\"\n >\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n {BottomComponent && (\n <StyledBottomContainer\n pb=\"xxxs\"\n pl=\"xxs\"\n pr=\"xxs\"\n onFocus={(e) => {\n setFocusedItem(null);\n e.stopPropagation();\n }}\n onKeyDown={(e) => e.stopPropagation()}\n >\n <BottomComponent ctx={ctx} item={item} />\n </StyledBottomContainer>\n )}\n </ItemRenderer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
4
+ "sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React, { useCallback } from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport type { Theme } from '@elliemae/ds-system';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport {\n StyledItemLabel,\n StyledChevronLeft,\n StyledBottomContainer,\n StyledLeftContainer,\n StyledRightContainer,\n} from '../styled';\nimport { CHEVRON_BACK_DS_ID } from '../../exported-related/constants';\n\nconst notOpenedShadowStyle = (isSelected: boolean) => (theme: Theme) =>\n `\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : 'transparent'};\n\n :hover {\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : theme.colors.brand[300]};\n }\n\n :active {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};\n }\n`;\n\nexport const ItemHeader = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: { label, RightComponent, BottomComponent, labelDataTestId, labelOverflow: itemLabelOverflow },\n CollapsedComponent = () => null,\n },\n ctx,\n ctx: {\n leftNavProps: { openedItem, labelOverflow: leftNavLabelOverflow, onItemClick },\n expandedForAnimation,\n setFocusedItem,\n selectedItem,\n selectedParent,\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const opened = openedItem === dsId;\n\n const ariaLabel = item.itemOpts.ariaLabel ?? (typeof label === 'string' ? label : 'menuitem');\n\n const isSelected = selectedItem === dsId || selectedParent === dsId;\n\n const shadowStyle = useCallback(\n (opened_: boolean) => (theme: Theme) =>\n !opened_ ? notOpenedShadowStyle(isSelected)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`,\n [isSelected],\n );\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaLabel,\n ariaExpanded: opened,\n ...item.itemOpts,\n openable: expandedForAnimation && !opened,\n closable: expandedForAnimation && opened,\n selectable: !opened,\n },\n }}\n hasBorderBottom\n borderBottomMr={opened ? '12px' : '0px'}\n shadowStyle={shadowStyle}\n >\n <StyledLeftContainer\n cols={opened ? ['auto', 'auto'] : ['38px']}\n gutter=\"1px\"\n pl={opened ? 'xxs' : 0}\n justifyItems=\"center\"\n data-testid=\"leftnav-leftcomponent\"\n >\n {opened && (\n <StyledChevronLeft\n size=\"m\"\n color={['brand-primary', 800]}\n onClick={(e: React.MouseEvent<HTMLElement>) => {\n onItemClick(item, e);\n }}\n data-testid=\"leftnav-leftcomponent-chevron\"\n tabIndex={0}\n onFocus={(e: React.FocusEvent) => {\n e.stopPropagation();\n setFocusedItem(CHEVRON_BACK_DS_ID);\n }}\n role=\"button\"\n aria-label={`Close ${ariaLabel}`}\n />\n )}\n {CollapsedComponent && <CollapsedComponent item={item} ctx={ctx} />}\n </StyledLeftContainer>\n <StyledItemLabel\n ml={opened ? 'xxs' : '1px'}\n mt=\"xxxs\"\n mb=\"15px\"\n data-testid={labelDataTestId || 'leftnav-itemlabel'}\n labelOverflow={labelOverflow}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledItemLabel>\n <StyledRightContainer\n pl=\"xs\"\n pr={opened ? 'xxs2' : 'xxs'}\n onFocus={(e) => {\n setFocusedItem(null);\n e.stopPropagation();\n }}\n onKeyDown={(e) => e.stopPropagation()}\n data-testid=\"leftnav-right-component\"\n >\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n {BottomComponent && (\n <StyledBottomContainer\n pb=\"xxxs\"\n pl=\"xxs\"\n pr=\"xxs\"\n onFocus={(e) => {\n setFocusedItem(null);\n e.stopPropagation();\n }}\n onKeyDown={(e) => e.stopPropagation()}\n >\n <BottomComponent ctx={ctx} item={item} />\n </StyledBottomContainer>\n )}\n </ItemRenderer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD8EjB;AA5EN,mBAAmC;AACnC,uCAA2C;AAE3C,8BAA6B;AAE7B,oBAMO;AACP,uBAAmC;AAEnC,MAAM,uBAAuB,CAAC,eAAwB,CAAC,UACrD;AAAA,gCAC8B,aAAa,MAAM,OAAO,MAAM,OAAO;AAAA;AAAA;AAAA,kCAGr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  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/outOfTheBox/ItemLink/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable indent */\nimport React, { useCallback } from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { Theme } from '@elliemae/ds-system';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport { StyledItemLabel, StyledLeftContainer, StyledRightContainer } from '../styled';\n\nconst notOpenedShadowStyle = (isSelected: boolean) => (theme: Theme) =>\n `\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : 'transparent'};\n\n :hover {\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : theme.colors.brand[300]};\n }\n\n :active {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};\n }\n`;\n\nexport const ItemLink = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: { label, RightComponent, labelDataTestId, labelOverflow: itemLabelOverflow },\n CollapsedComponent = () => null,\n },\n ctx,\n ctx: {\n leftNavProps: { labelOverflow: leftNavLabelOverflow },\n selectedItem,\n selectedParent,\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const isSelected = selectedItem === dsId || selectedParent === dsId;\n\n const shadowStyle = useCallback(\n (opened_: boolean) => (theme: Theme) =>\n !opened_ ? notOpenedShadowStyle(isSelected)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`,\n [isSelected],\n );\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaLabel: typeof label === 'string' ? label : '',\n ariaRole: 'link',\n ...item.itemOpts,\n selectable: true,\n },\n }}\n shadowStyle={shadowStyle}\n >\n <StyledLeftContainer cols={['38px']} gutter=\"1px\" justifyItems=\"center\" data-testid=\"leftnav-leftcomponent\">\n {CollapsedComponent && <CollapsedComponent item={item} ctx={ctx} />}\n </StyledLeftContainer>\n <StyledItemLabel\n ml=\"1px\"\n mt=\"xxxs\"\n mb=\"15px\"\n data-testid={labelDataTestId || 'leftnav-itemlabel'}\n labelOverflow={labelOverflow}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledItemLabel>\n <StyledRightContainer mt=\"xxxs\" pr=\"xxs2\" data-testid=\"leftnav-right-component\">\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n </ItemRenderer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
4
+ "sourcesContent": ["/* eslint-disable indent */\nimport React, { useCallback } from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport type { Theme } from '@elliemae/ds-system';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport { StyledItemLabel, StyledLeftContainer, StyledRightContainer } from '../styled';\n\nconst notOpenedShadowStyle = (isSelected: boolean) => (theme: Theme) =>\n `\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : 'transparent'};\n\n :hover {\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : theme.colors.brand[300]};\n }\n\n :active {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};\n }\n`;\n\nexport const ItemLink = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: { label, RightComponent, labelDataTestId, labelOverflow: itemLabelOverflow },\n CollapsedComponent = () => null,\n },\n ctx,\n ctx: {\n leftNavProps: { labelOverflow: leftNavLabelOverflow },\n selectedItem,\n selectedParent,\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const isSelected = selectedItem === dsId || selectedParent === dsId;\n\n const shadowStyle = useCallback(\n (opened_: boolean) => (theme: Theme) =>\n !opened_ ? notOpenedShadowStyle(isSelected)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`,\n [isSelected],\n );\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaLabel: typeof label === 'string' ? label : '',\n ariaRole: 'link',\n ...item.itemOpts,\n selectable: true,\n },\n }}\n shadowStyle={shadowStyle}\n >\n <StyledLeftContainer cols={['38px']} gutter=\"1px\" justifyItems=\"center\" data-testid=\"leftnav-leftcomponent\">\n {CollapsedComponent && <CollapsedComponent item={item} ctx={ctx} />}\n </StyledLeftContainer>\n <StyledItemLabel\n ml=\"1px\"\n mt=\"xxxs\"\n mb=\"15px\"\n data-testid={labelDataTestId || 'leftnav-itemlabel'}\n labelOverflow={labelOverflow}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledItemLabel>\n <StyledRightContainer mt=\"xxxs\" pr=\"xxs2\" data-testid=\"leftnav-right-component\">\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n </ItemRenderer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgDnB;AA/CJ,mBAAmC;AACnC,uCAA2C;AAE3C,8BAA6B;AAE7B,oBAA2E;AAE3E,MAAM,uBAAuB,CAAC,eAAwB,CAAC,UACrD;AAAA,gCAC8B,aAAa,MAAM,OAAO,MAAM,OAAO;AAAA;AAAA;AAAA,kCAGrC,aAAa,MAAM,OAAO,MAAM,OAAO,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA,kCAI1D,MAAM,OAAO,MAAM;AAAA;AAAA;AAI9C,MAAM,WAAW,CAAC,UAAuC;AAC9D,QAAM;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ;AAAA,MACA,UAAU,EAAE,OAAO,gBAAgB,iBAAiB,eAAe,kBAAkB;AAAA,MACrF,qBAAqB,MAAM;AAAA,IAC7B;AAAA,IACA;AAAA,IACA,KAAK;AAAA,MACH,cAAc,EAAE,eAAe,qBAAqB;AAAA,MACpD;AAAA,MACA;AAAA,IACF;AAAA,EACF,IAAI;AAEJ,QAAM,gBAAgB,qBAAqB;AAE3C,QAAM,aAAa,iBAAiB,QAAQ,mBAAmB;AAE/D,QAAM,kBAAc;AAAA,IAClB,CAAC,YAAqB,CAAC,UACrB,CAAC,UAAU,qBAAqB,UAAU,EAAE,KAAK,IAAI;AAAA,IACvD,CAAC,UAAU;AAAA,EACb;AAEA,SACE,6CAAC;AAAA,IACC,MAAM;AAAA,MACJ,GAAG;AAAA,MACH,UAAU;AAAA,QACR,WAAW,OAAO,UAAU,WAAW,QAAQ;AAAA,QAC/C,UAAU;AAAA,QACV,GAAG,KAAK;AAAA,QACR,YAAY;AAAA,MACd;AAAA,IACF;AAAA,IACA;AAAA,IAEA;AAAA,kDAAC;AAAA,QAAoB,MAAM,CAAC,MAAM;AAAA,QAAG,QAAO;AAAA,QAAM,cAAa;AAAA,QAAS,eAAY;AAAA,QACjF,gCAAsB,4CAAC;AAAA,UAAmB;AAAA,UAAY;AAAA,SAAU;AAAA,OACnE;AAAA,MACA,4CAAC;AAAA,QACC,IAAG;AAAA,QACH,IAAG;AAAA,QACH,IAAG;AAAA,QACH,eAAa,mBAAmB;AAAA,QAChC;AAAA,QAEC,4BAAkB,aAAa,4CAAC;AAAA,UAA2B,OAAO;AAAA,UAAO,WAAU;AAAA,SAAe,IAAK;AAAA,OAC1G;AAAA,MACA,4CAAC;AAAA,QAAqB,IAAG;AAAA,QAAO,IAAG;AAAA,QAAO,eAAY;AAAA,QACnD,4BAAkB,4CAAC;AAAA,UAAe;AAAA,UAAU;AAAA,SAAY;AAAA,OAC3D;AAAA;AAAA,GACF;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/outOfTheBox/ItemSubmenu/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable complexity */\n/* eslint-disable indent */\nimport React, { useCallback } from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { Theme } from '@elliemae/ds-system';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport { CHEVRON_BACK_DS_ID } from '../../exported-related/constants';\nimport {\n StyledLeftContainer,\n StyledChevronLeft,\n StyledItemLabel,\n StyledBottomContainer,\n StyledRightContainer,\n} from '../styled';\n\nconst notOpenedShadowStyle = (isSelected: boolean) => (theme: Theme) =>\n `\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : 'transparent'};\n\n :hover {\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : theme.colors.brand[300]};\n }\n\n :active {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};\n }\n`;\n\nexport const ItemSubmenu = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: { label, RightComponent, BottomComponent, labelDataTestId, labelOverflow: itemLabelOverflow },\n CollapsedComponent = () => null,\n },\n ctx,\n ctx: {\n leftNavProps: { openedItem, labelOverflow: leftNavLabelOverflow, onItemClick },\n expandedForAnimation,\n selectedItem,\n selectedParent,\n setFocusedItem,\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const opened = openedItem === dsId;\n\n const isSelected = selectedItem === dsId;\n\n const shadowStyle = useCallback(\n (opened_: boolean) => (theme: Theme) =>\n !opened_\n ? notOpenedShadowStyle(isSelected || selectedParent === dsId)(theme)\n : `box-shadow: inset 4px 0 0 0 #52A6EC`,\n [dsId, isSelected, selectedParent],\n );\n\n const ariaLabel = item.itemOpts.ariaLabel ?? (typeof label === 'string' ? label : 'menuitem');\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ...item.itemOpts,\n ariaLabel,\n ariaExpanded: opened,\n openable: expandedForAnimation && !opened,\n closable: expandedForAnimation && opened,\n selectable: !opened,\n },\n }}\n shadowStyle={shadowStyle}\n hasBorderBottom={opened}\n borderBottomMr=\"12px\"\n >\n <StyledLeftContainer\n cols={opened ? ['auto', 'auto'] : ['38px']}\n gutter=\"1px\"\n pl={opened ? 'xxs' : 0}\n justifyItems=\"center\"\n data-testid=\"leftnav-leftcomponent\"\n >\n {opened && (\n <StyledChevronLeft\n size=\"m\"\n color={['brand-primary', 800]}\n onClick={(e: React.MouseEvent<HTMLElement>) => {\n onItemClick(item, e);\n }}\n data-testid=\"leftnav-leftcomponent-chevron\"\n tabIndex={0}\n onFocus={(e: React.FocusEvent) => {\n e.stopPropagation();\n setFocusedItem(CHEVRON_BACK_DS_ID);\n }}\n role=\"button\"\n aria-label={`Close ${ariaLabel}`}\n />\n )}\n {CollapsedComponent && <CollapsedComponent item={item} ctx={ctx} />}\n </StyledLeftContainer>\n <StyledItemLabel\n ml={opened ? 'xxs' : '1px'}\n mt=\"xxxs\"\n mb=\"15px\"\n data-testid={labelDataTestId || 'leftnav-itemlabel'}\n labelOverflow={labelOverflow}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledItemLabel>\n <StyledRightContainer\n pl=\"xs\"\n pr={opened ? 'xxs2' : 'xxs'}\n onFocus={(e) => {\n e.stopPropagation();\n setFocusedItem(null);\n }}\n onKeyDown={(e) => e.stopPropagation()}\n onClick={(e) => openedItem === dsId && e.stopPropagation()}\n data-testid=\"leftnav-right-component\"\n >\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n {BottomComponent && (\n <StyledBottomContainer\n style={{ gridColumn: 'span 3' }}\n pb=\"xxxs\"\n pl=\"xxs\"\n pr=\"xxs\"\n onFocus={(e) => {\n e.stopPropagation();\n setFocusedItem(null);\n }}\n onKeyDown={(e) => e.stopPropagation()}\n onClick={(e) => openedItem && e.stopPropagation()}\n >\n <BottomComponent ctx={ctx} item={item} />\n </StyledBottomContainer>\n )}\n </ItemRenderer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
4
+ "sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable complexity */\n/* eslint-disable indent */\nimport React, { useCallback } from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport type { Theme } from '@elliemae/ds-system';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport { CHEVRON_BACK_DS_ID } from '../../exported-related/constants';\nimport {\n StyledLeftContainer,\n StyledChevronLeft,\n StyledItemLabel,\n StyledBottomContainer,\n StyledRightContainer,\n} from '../styled';\n\nconst notOpenedShadowStyle = (isSelected: boolean) => (theme: Theme) =>\n `\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : 'transparent'};\n\n :hover {\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : theme.colors.brand[300]};\n }\n\n :active {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};\n }\n`;\n\nexport const ItemSubmenu = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: { label, RightComponent, BottomComponent, labelDataTestId, labelOverflow: itemLabelOverflow },\n CollapsedComponent = () => null,\n },\n ctx,\n ctx: {\n leftNavProps: { openedItem, labelOverflow: leftNavLabelOverflow, onItemClick },\n expandedForAnimation,\n selectedItem,\n selectedParent,\n setFocusedItem,\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const opened = openedItem === dsId;\n\n const isSelected = selectedItem === dsId;\n\n const shadowStyle = useCallback(\n (opened_: boolean) => (theme: Theme) =>\n !opened_\n ? notOpenedShadowStyle(isSelected || selectedParent === dsId)(theme)\n : `box-shadow: inset 4px 0 0 0 #52A6EC`,\n [dsId, isSelected, selectedParent],\n );\n\n const ariaLabel = item.itemOpts.ariaLabel ?? (typeof label === 'string' ? label : 'menuitem');\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ...item.itemOpts,\n ariaLabel,\n ariaExpanded: opened,\n openable: expandedForAnimation && !opened,\n closable: expandedForAnimation && opened,\n selectable: !opened,\n },\n }}\n shadowStyle={shadowStyle}\n hasBorderBottom={opened}\n borderBottomMr=\"12px\"\n >\n <StyledLeftContainer\n cols={opened ? ['auto', 'auto'] : ['38px']}\n gutter=\"1px\"\n pl={opened ? 'xxs' : 0}\n justifyItems=\"center\"\n data-testid=\"leftnav-leftcomponent\"\n >\n {opened && (\n <StyledChevronLeft\n size=\"m\"\n color={['brand-primary', 800]}\n onClick={(e: React.MouseEvent<HTMLElement>) => {\n onItemClick(item, e);\n }}\n data-testid=\"leftnav-leftcomponent-chevron\"\n tabIndex={0}\n onFocus={(e: React.FocusEvent) => {\n e.stopPropagation();\n setFocusedItem(CHEVRON_BACK_DS_ID);\n }}\n role=\"button\"\n aria-label={`Close ${ariaLabel}`}\n />\n )}\n {CollapsedComponent && <CollapsedComponent item={item} ctx={ctx} />}\n </StyledLeftContainer>\n <StyledItemLabel\n ml={opened ? 'xxs' : '1px'}\n mt=\"xxxs\"\n mb=\"15px\"\n data-testid={labelDataTestId || 'leftnav-itemlabel'}\n labelOverflow={labelOverflow}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledItemLabel>\n <StyledRightContainer\n pl=\"xs\"\n pr={opened ? 'xxs2' : 'xxs'}\n onFocus={(e) => {\n e.stopPropagation();\n setFocusedItem(null);\n }}\n onKeyDown={(e) => e.stopPropagation()}\n onClick={(e) => openedItem === dsId && e.stopPropagation()}\n data-testid=\"leftnav-right-component\"\n >\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n {BottomComponent && (\n <StyledBottomContainer\n style={{ gridColumn: 'span 3' }}\n pb=\"xxxs\"\n pl=\"xxs\"\n pr=\"xxs\"\n onFocus={(e) => {\n e.stopPropagation();\n setFocusedItem(null);\n }}\n onKeyDown={(e) => e.stopPropagation()}\n onClick={(e) => openedItem && e.stopPropagation()}\n >\n <BottomComponent ctx={ctx} item={item} />\n </StyledBottomContainer>\n )}\n </ItemRenderer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiFjB;AA9EN,mBAAmC;AACnC,uCAA2C;AAE3C,8BAA6B;AAE7B,uBAAmC;AACnC,oBAMO;AAEP,MAAM,uBAAuB,CAAC,eAAwB,CAAC,UACrD;AAAA,gCAC8B,aAAa,MAAM,OAAO,MAAM,OAAO;AAAA;AAAA;AAAA,kCAGrC,aAAa,MAAM,OAAO,MAAM,OAAO,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA,kCAI1D,MAAM,OAAO,MAAM;AAAA;AAAA;AAI9C,MAAM,cAAc,CAAC,UAAuC;AACjE,QAAM;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ;AAAA,MACA,UAAU,EAAE,OAAO,gBAAgB,iBAAiB,iBAAiB,eAAe,kBAAkB;AAAA,MACtG,qBAAqB,MAAM;AAAA,IAC7B;AAAA,IACA;AAAA,IACA,KAAK;AAAA,MACH,cAAc,EAAE,YAAY,eAAe,sBAAsB,YAAY;AAAA,MAC7E;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF,IAAI;AAEJ,QAAM,gBAAgB,qBAAqB;AAE3C,QAAM,SAAS,eAAe;AAE9B,QAAM,aAAa,iBAAiB;AAEpC,QAAM,kBAAc;AAAA,IAClB,CAAC,YAAqB,CAAC,UACrB,CAAC,UACG,qBAAqB,cAAc,mBAAmB,IAAI,EAAE,KAAK,IACjE;AAAA,IACN,CAAC,MAAM,YAAY,cAAc;AAAA,EACnC;AAEA,QAAM,YAAY,KAAK,SAAS,cAAc,OAAO,U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ACrB;AAAA,QACA,WAAW,CAAC,MAAM,EAAE,gBAAgB;AAAA,QACpC,SAAS,CAAC,MAAM,eAAe,QAAQ,EAAE,gBAAgB;AAAA,QACzD,eAAY;AAAA,QAEX,4BAAkB,4CAAC;AAAA,UAAe;AAAA,UAAU;AAAA,SAAY;AAAA,OAC3D;AAAA,MACC,mBACC,4CAAC;AAAA,QACC,OAAO,EAAE,YAAY,SAAS;AAAA,QAC9B,IAAG;AAAA,QACH,IAAG;AAAA,QACH,IAAG;AAAA,QACH,SAAS,CAAC,MAAM;AACd,YAAE,gBAAgB;AAClB,yBAAe,IAAI;AAAA,QACrB;AAAA,QACA,WAAW,CAAC,MAAM,EAAE,gBAAgB;AAAA,QACpC,SAAS,CAAC,MAAM,cAAc,EAAE,gBAAgB;AAAA,QAEhD,sDAAC;AAAA,UAAgB;AAAA,UAAU;AAAA,SAAY;AAAA,OACzC;AAAA;AAAA,GAEJ;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/outOfTheBox/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { ComponentProps } from '../index.d';\nimport { ITEM_TYPES } from '../exported-related';\nimport { ItemControlledDrilldown } from './ItemControlledDrilldown';\nimport { ItemUncontrolledDrilldown } from './ItemUncontrolledDrilldown';\nimport { ItemHeader } from './ItemHeader';\nimport { ItemLink } from './ItemLink';\nimport { ItemSection } from './ItemSection';\nimport { ItemSeparator } from './ItemSeparator';\nimport { ItemSubmenu } from './ItemSubmenu';\nimport { ItemTextLabel } from './ItemTextLabel';\nimport { ItemWithDate } from './ItemWithDate';\n\nexport * from './ItemControlledDrilldown';\nexport * from './ItemUncontrolledDrilldown';\nexport * from './ItemHeader';\nexport * from './ItemLink';\nexport * from './ItemSection';\nexport * from './ItemSeparator';\nexport * from './ItemSubmenu';\nexport * from './ItemTextLabel';\nexport * from './ItemWithDate';\n\nexport const outOfTheBoxTypes = Object.values(ITEM_TYPES);\nconst {\n LEFT_NAV_ITEM_CONTROLLED_DRILLDOWN,\n LEFT_NAV_ITEM_UNCONTROLLED_DRILLDOWN,\n LEFT_NAV_ITEM_HEADER,\n LEFT_NAV_ITEM_LINK,\n LEFT_NAV_ITEM_SECTION,\n LEFT_NAV_ITEM_SEPARATOR,\n LEFT_NAV_ITEM_SUBMENU,\n LEFT_NAV_ITEM_TEXT_LABEL,\n LEFT_NAV_ITEM_WITH_DATE,\n} = ITEM_TYPES;\n\nexport const outOfTheBoxComponents: Record<\n string,\n React.ComponentType<ComponentProps>\n> = {\n [LEFT_NAV_ITEM_CONTROLLED_DRILLDOWN]: ItemControlledDrilldown,\n [LEFT_NAV_ITEM_UNCONTROLLED_DRILLDOWN]: ItemUncontrolledDrilldown,\n [LEFT_NAV_ITEM_HEADER]: ItemHeader,\n [LEFT_NAV_ITEM_LINK]: ItemLink,\n [LEFT_NAV_ITEM_SECTION]: ItemSection,\n [LEFT_NAV_ITEM_SEPARATOR]: ItemSeparator,\n [LEFT_NAV_ITEM_SUBMENU]: ItemSubmenu,\n [LEFT_NAV_ITEM_TEXT_LABEL]: ItemTextLabel,\n [LEFT_NAV_ITEM_WITH_DATE]: ItemWithDate,\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAA2B;AAC3B,qCAAwC;AACxC,uCAA0C;AAC1C,wBAA2B;AAC3B,sBAAyB;AACzB,yBAA4B;AAC5B,2BAA8B;AAC9B,yBAA4B;AAC5B,2BAA8B;AAC9B,0BAA6B;AAE7B,gCAAc,sCAbd;AAcA,gCAAc,wCAdd;AAeA,gCAAc,yBAfd;AAgBA,gCAAc,uBAhBd;AAiBA,gCAAc,0BAjBd;AAkBA,gCAAc,4BAlBd;AAmBA,gCAAc,0BAnBd;AAoBA,gCAAc,4BApBd;AAqBA,gCAAc,2BArBd;AAuBO,MAAM,mBAAmB,OAAO,OAAO,kCAAU;AACxD,MAAM;AAAA,EACJ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,IAAI;AAEG,MAAM,wBAGT;AAAA,EACF,CAAC,qCAAqC;AAAA,EACtC,CAAC,uCAAuC;AAAA,EACxC,CAAC,uBAAuB;AAAA,EACxB,CAAC,qBAAqB;AAAA,EACtB,CAAC,wBAAwB;AAAA,EACzB,CAAC,0BAA0B;AAAA,EAC3B,CAAC,wBAAwB;AAAA,EACzB,CAAC,2BAA2B;AAAA,EAC5B,CAAC,0BAA0B;AAC7B;",
4
+ "sourcesContent": ["import type React from 'react';\nimport type { ComponentProps } from '../index.d';\nimport { ITEM_TYPES } from '../exported-related';\nimport { ItemControlledDrilldown } from './ItemControlledDrilldown';\nimport { ItemUncontrolledDrilldown } from './ItemUncontrolledDrilldown';\nimport { ItemHeader } from './ItemHeader';\nimport { ItemLink } from './ItemLink';\nimport { ItemSection } from './ItemSection';\nimport { ItemSeparator } from './ItemSeparator';\nimport { ItemSubmenu } from './ItemSubmenu';\nimport { ItemTextLabel } from './ItemTextLabel';\nimport { ItemWithDate } from './ItemWithDate';\n\nexport * from './ItemControlledDrilldown';\nexport * from './ItemUncontrolledDrilldown';\nexport * from './ItemHeader';\nexport * from './ItemLink';\nexport * from './ItemSection';\nexport * from './ItemSeparator';\nexport * from './ItemSubmenu';\nexport * from './ItemTextLabel';\nexport * from './ItemWithDate';\n\nexport const outOfTheBoxTypes = Object.values(ITEM_TYPES);\nconst {\n LEFT_NAV_ITEM_CONTROLLED_DRILLDOWN,\n LEFT_NAV_ITEM_UNCONTROLLED_DRILLDOWN,\n LEFT_NAV_ITEM_HEADER,\n LEFT_NAV_ITEM_LINK,\n LEFT_NAV_ITEM_SECTION,\n LEFT_NAV_ITEM_SEPARATOR,\n LEFT_NAV_ITEM_SUBMENU,\n LEFT_NAV_ITEM_TEXT_LABEL,\n LEFT_NAV_ITEM_WITH_DATE,\n} = ITEM_TYPES;\n\nexport const outOfTheBoxComponents: Record<string, React.ComponentType<ComponentProps>> = {\n [LEFT_NAV_ITEM_CONTROLLED_DRILLDOWN]: ItemControlledDrilldown,\n [LEFT_NAV_ITEM_UNCONTROLLED_DRILLDOWN]: ItemUncontrolledDrilldown,\n [LEFT_NAV_ITEM_HEADER]: ItemHeader,\n [LEFT_NAV_ITEM_LINK]: ItemLink,\n [LEFT_NAV_ITEM_SECTION]: ItemSection,\n [LEFT_NAV_ITEM_SEPARATOR]: ItemSeparator,\n [LEFT_NAV_ITEM_SUBMENU]: ItemSubmenu,\n [LEFT_NAV_ITEM_TEXT_LABEL]: ItemTextLabel,\n [LEFT_NAV_ITEM_WITH_DATE]: ItemWithDate,\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAA2B;AAC3B,qCAAwC;AACxC,uCAA0C;AAC1C,wBAA2B;AAC3B,sBAAyB;AACzB,yBAA4B;AAC5B,2BAA8B;AAC9B,yBAA4B;AAC5B,2BAA8B;AAC9B,0BAA6B;AAE7B,gCAAc,sCAbd;AAcA,gCAAc,wCAdd;AAeA,gCAAc,yBAfd;AAgBA,gCAAc,uBAhBd;AAiBA,gCAAc,0BAjBd;AAkBA,gCAAc,4BAlBd;AAmBA,gCAAc,0BAnBd;AAoBA,gCAAc,4BApBd;AAqBA,gCAAc,2BArBd;AAuBO,MAAM,mBAAmB,OAAO,OAAO,kCAAU;AACxD,MAAM;AAAA,EACJ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,IAAI;AAEG,MAAM,wBAA6E;AAAA,EACxF,CAAC,qCAAqC;AAAA,EACtC,CAAC,uCAAuC;AAAA,EACxC,CAAC,uBAAuB;AAAA,EACxB,CAAC,qBAAqB;AAAA,EACtB,CAAC,wBAAwB;AAAA,EACzB,CAAC,0BAA0B;AAAA,EAC3B,CAAC,wBAAwB;AAAA,EACzB,CAAC,2BAA2B;AAAA,EAC5B,CAAC,0BAA0B;AAC7B;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/parts/LeftNavContent/styled.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { Grid } from '@elliemae/ds-grid';\nimport { styled, Theme } from '@elliemae/ds-system';\nimport { DSLeftNavigationName, DSLeftNavigationSlots } from '../../constants';\n\ntype LeftNavProps = {\n expanded: boolean;\n expandedWidth: string;\n};\n\nconst getLeftShadowStyles = ({\n selected,\n selectedParent,\n theme,\n}: {\n selected: boolean;\n selectedParent?: boolean;\n theme: Theme;\n}) => {\n if (!selected && !selectedParent) {\n return `\n box-shadow: inset 4px 0 0 0 transparent;\n :hover {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[300]};\n }\n :active {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};\n }\n `;\n }\n return `box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};`;\n};\n\nexport const StyledLeftNavExpandAnimationWrapper = styled('nav', {\n name: DSLeftNavigationName,\n slot: DSLeftNavigationSlots.ROOT,\n})<LeftNavProps>`\n width: ${(props) => (props.expanded ? props.expandedWidth : '48px')};\n transition: width ${(props) => (props.expanded ? 'ease-out' : 'ease-in')} 350ms;\n box-shadow: -1px 0 0 0 ${(props) => props.theme.colors.neutral[100]};\n border: 1px solid ${(props) => props.theme.colors.neutral[100]};\n overflow: hidden;\n height: 100%;\n position: relative;\n`;\n\nexport const StyledLeftNavAreasContainer = styled(Grid, {\n name: DSLeftNavigationName,\n slot: DSLeftNavigationSlots.AREAS_CONTAINER,\n})<LeftNavProps>`\n width: ${(props) => (props.expanded ? `calc(${props.expandedWidth} - 2px)` : '46px')};\n height: 100%;\n`;\n\nexport const StyledLeftNavHeaderArea = styled('div', {\n name: DSLeftNavigationName,\n slot: DSLeftNavigationSlots.HEADER_AREA,\n})<{ selected: boolean; selectedParent?: boolean }>`\n ${getLeftShadowStyles}\n`;\n\nexport const StyledLeftNavBodyAreasContainer = styled(Grid, {\n name: DSLeftNavigationName,\n slot: DSLeftNavigationSlots.BODY_AREAS_CONTAINER,\n})`\n width: 100%;\n`;\n\nexport const StyledLeftNavBodyHeaderArea = styled('div', {\n name: DSLeftNavigationName,\n slot: DSLeftNavigationSlots.BODY_HEADER_AREA,\n})<{ selected: boolean; selectedParent?: boolean }>`\n width: 100%;\n ${getLeftShadowStyles}\n`;\n\nexport const StyledLeftNavBodyItemsArea = styled('div', {\n name: DSLeftNavigationName,\n slot: DSLeftNavigationSlots.BODY_ITEMS_AREA,\n})<{ selected: boolean }>`\n width: 100%;\n overflow: auto;\n box-shadow: inset 4px 0 0 0 ${(props) => (props.selected ? props.theme.colors.brand[400] : 'transparent')};\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,qBAAqB;AACrB,uBAA8B;AAC9B,uBAA4D;AAO5D,MAAM,sBAAsB,CAAC;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AACF,MAIM;AACJ,MAAI,CAAC,YAAY,CAAC,gBAAgB;AAChC,WAAO;AAAA;AAAA;AAAA,sCAG2B,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA,sCAGnB,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA,EAGvD;AACA,SAAO,+BAA+B,MAAM,OAAO,MAAM;AAC3D;AAEO,MAAM,0CAAsC,yBAAO,OAAO;AAAA,EAC/D,MAAM;AAAA,EACN,MAAM,uCAAsB;AAC9B,CAAC;AAAA,WACU,CAAC,UAAW,MAAM,WAAW,MAAM,gBAAgB;AAAA,sBACxC,CAAC,UAAW,MAAM,WAAW,aAAa;AAAA,2BACrC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,sBAC3C,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAMrD,MAAM,kCAA8B,yBAAO,qBAAM;AAAA,EACtD,MAAM;AAAA,EACN,MAAM,uCAAsB;AAC9B,CAAC;AAAA,WACU,CAAC,UAAW,MAAM,WAAW,QAAQ,MAAM,yBAAyB;AAAA;AAAA;AAIxE,MAAM,8BAA0B,yBAAO,OAAO;AAAA,EACnD,MAAM;AAAA,EACN,MAAM,uCAAsB;AAC9B,CAAC;AAAA,IACG;AAAA;AAGG,MAAM,sCAAkC,yBAAO,qBAAM;AAAA,EAC1D,MAAM;AAAA,EACN,MAAM,uCAAsB;AAC9B,CAAC;AAAA;AAAA;AAIM,MAAM,kCAA8B,yBAAO,OAAO;AAAA,EACvD,MAAM;AAAA,EACN,MAAM,uCAAsB;AAC9B,CAAC;AAAA;AAAA,IAEG;AAAA;AAGG,MAAM,iCAA6B,yBAAO,OAAO;AAAA,EACtD,MAAM;AAAA,EACN,MAAM,uCAAsB;AAC9B,CAAC;AAAA;AAAA;AAAA,gCAG+B,CAAC,UAAW,MAAM,WAAW,MAAM,MAAM,OAAO,MAAM,OAAO;AAAA;",
4
+ "sourcesContent": ["import { Grid } from '@elliemae/ds-grid';\nimport type { Theme } from '@elliemae/ds-system';\nimport { styled } from '@elliemae/ds-system';\nimport { DSLeftNavigationName, DSLeftNavigationSlots } from '../../constants';\n\ntype LeftNavProps = {\n expanded: boolean;\n expandedWidth: string;\n};\n\nconst getLeftShadowStyles = ({\n selected,\n selectedParent,\n theme,\n}: {\n selected: boolean;\n selectedParent?: boolean;\n theme: Theme;\n}) => {\n if (!selected && !selectedParent) {\n return `\n box-shadow: inset 4px 0 0 0 transparent;\n :hover {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[300]};\n }\n :active {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};\n }\n `;\n }\n return `box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};`;\n};\n\nexport const StyledLeftNavExpandAnimationWrapper = styled('nav', {\n name: DSLeftNavigationName,\n slot: DSLeftNavigationSlots.ROOT,\n})<LeftNavProps>`\n width: ${(props) => (props.expanded ? props.expandedWidth : '48px')};\n transition: width ${(props) => (props.expanded ? 'ease-out' : 'ease-in')} 350ms;\n box-shadow: -1px 0 0 0 ${(props) => props.theme.colors.neutral[100]};\n border: 1px solid ${(props) => props.theme.colors.neutral[100]};\n overflow: hidden;\n height: 100%;\n position: relative;\n`;\n\nexport const StyledLeftNavAreasContainer = styled(Grid, {\n name: DSLeftNavigationName,\n slot: DSLeftNavigationSlots.AREAS_CONTAINER,\n})<LeftNavProps>`\n width: ${(props) => (props.expanded ? `calc(${props.expandedWidth} - 2px)` : '46px')};\n height: 100%;\n`;\n\nexport const StyledLeftNavHeaderArea = styled('div', {\n name: DSLeftNavigationName,\n slot: DSLeftNavigationSlots.HEADER_AREA,\n})<{ selected: boolean; selectedParent?: boolean }>`\n ${getLeftShadowStyles}\n`;\n\nexport const StyledLeftNavBodyAreasContainer = styled(Grid, {\n name: DSLeftNavigationName,\n slot: DSLeftNavigationSlots.BODY_AREAS_CONTAINER,\n})`\n width: 100%;\n`;\n\nexport const StyledLeftNavBodyHeaderArea = styled('div', {\n name: DSLeftNavigationName,\n slot: DSLeftNavigationSlots.BODY_HEADER_AREA,\n})<{ selected: boolean; selectedParent?: boolean }>`\n width: 100%;\n ${getLeftShadowStyles}\n`;\n\nexport const StyledLeftNavBodyItemsArea = styled('div', {\n name: DSLeftNavigationName,\n slot: DSLeftNavigationSlots.BODY_ITEMS_AREA,\n})<{ selected: boolean }>`\n width: 100%;\n overflow: auto;\n box-shadow: inset 4px 0 0 0 ${(props) => (props.selected ? props.theme.colors.brand[400] : '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AM,uCAAsB;AAC9B,CAAC;AAAA;AAAA,IAEG;AAAA;AAGG,MAAM,iCAA6B,yBAAO,OAAO;AAAA,EACtD,MAAM;AAAA,EACN,MAAM,uCAAsB;AAC9B,CAAC;AAAA;AAAA;AAAA,gCAG+B,CAAC,UAAW,MAAM,WAAW,MAAM,MAAM,OAAO,MAAM,OAAO;AAAA;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/parts/OutOfTheBoxMapItem.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { outOfTheBoxComponents } from '../outOfTheBox';\nimport { OutOfTheBoxMapItemT } from '../index.d';\nimport { LeftNavContext } from '../LeftNavigationContext';\n\nexport const OutOfTheBoxMapItem: React.ComponentType<OutOfTheBoxMapItemT> = (props) => {\n const {\n item,\n item: { type, Component },\n } = props;\n const ctx = React.useContext(LeftNavContext);\n\n if (typeof type === 'string' && !!outOfTheBoxComponents[type]) {\n const OutOfTheBoxComponent = outOfTheBoxComponents[type];\n return <OutOfTheBoxComponent item={{ itemOpts: {}, ...item }} ctx={ctx} />;\n }\n if (!Component) return null;\n // we expect an error to be threw if Component is not defined and type is not a valid out-of-the-box...\n return <Component item={item} ctx={ctx} />;\n};\n", "import * as React from 'react';\nexport { React };\n"],
4
+ "sourcesContent": ["import React from 'react';\nimport { outOfTheBoxComponents } from '../outOfTheBox';\nimport type { OutOfTheBoxMapItemT } from '../index.d';\nimport { LeftNavContext } from '../LeftNavigationContext';\n\nexport const OutOfTheBoxMapItem: React.ComponentType<OutOfTheBoxMapItemT> = (props) => {\n const {\n item,\n item: { type, Component },\n } = props;\n const ctx = React.useContext(LeftNavContext);\n\n if (typeof type === 'string' && !!outOfTheBoxComponents[type]) {\n const OutOfTheBoxComponent = outOfTheBoxComponents[type];\n return <OutOfTheBoxComponent item={{ itemOpts: {}, ...item }} ctx={ctx} />;\n }\n if (!Component) return null;\n // we expect an error to be threw if Component is not defined and type is not a valid out-of-the-box...\n return <Component item={item} ctx={ctx} />;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADcZ;AAdX,mBAAkB;AAClB,yBAAsC;AAEtC,mCAA+B;AAExB,MAAM,qBAA+D,CAAC,UAAU;AACrF,QAAM;AAAA,IACJ;AAAA,IACA,MAAM,EAAE,MAAM,UAAU;AAAA,EAC1B,IAAI;AACJ,QAAM,MAAM,aAAAA,QAAM,WAAW,2CAAc;AAE3C,MAAI,OAAO,SAAS,YAAY,CAAC,CAAC,yCAAsB,OAAO;AAC7D,UAAM,uBAAuB,yCAAsB;AACnD,WAAO,4CAAC;AAAA,MAAqB,MAAM,EAAE,UAAU,CAAC,GAAG,GAAG,KAAK;AAAA,MAAG;AAAA,KAAU;AAAA,EAC1E;AACA,MAAI,CAAC;AAAW,WAAO;AAEvB,SAAO,4CAAC;AAAA,IAAU;AAAA,IAAY;AAAA,GAAU;AAC1C;",
6
6
  "names": ["React"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/LeftNavigationContext.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { createContext, MutableRefObject, RefObject } from 'react';\nimport type { LeftNavProps, LabelOveflowT } from './index.d';\n\nexport type ContextProps = {\n selectedItem: string | null;\n setSelectedItem: React.Dispatch<React.SetStateAction<string | null>>;\n selectedParent: string | null;\n setSelectedParent: React.Dispatch<React.SetStateAction<string | null>>;\n focusedItem: string | null;\n setFocusedItem: React.Dispatch<React.SetStateAction<string | null>>;\n openedDrilldowns: string[];\n setOpenedDrilldowns: React.Dispatch<React.SetStateAction<string[]>>;\n visibleItems: string[];\n visibleItemsRefs: MutableRefObject<Record<string, RefObject<HTMLElement>>>;\n leftNavProps: LeftNavProps;\n expandedForAnimation: boolean;\n};\n\nexport const defaultProps: LeftNavProps = {\n expandedWidth: '240px',\n loading: false,\n expanded: false,\n openedItem: null,\n footerLabel: '',\n onSelectedChange: () => null,\n onFocusChange: () => null,\n onFooterExpand: () => null,\n onFooterClose: () => null,\n items: [],\n labelOverflow: 'wrap' as LabelOveflowT,\n onItemClick: () => null,\n};\n\nexport const defaultContext: ContextProps = {\n leftNavProps: defaultProps,\n selectedItem: null,\n setSelectedItem: () => null,\n selectedParent: null,\n setSelectedParent: () => null,\n focusedItem: null,\n setFocusedItem: () => null,\n expandedForAnimation: true,\n openedDrilldowns: [],\n setOpenedDrilldowns: () => null,\n visibleItems: [],\n visibleItemsRefs: { current: {} },\n};\n\nexport const LeftNavContext = createContext<ContextProps>(defaultContext);\n\nexport default LeftNavContext;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAgB,qBAAkD;AAkB3D,MAAM,eAA6B;AAAA,EACxC,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,EACrB,OAAO,CAAC;AAAA,EACR,eAAe;AAAA,EACf,aAAa,MAAM;AACrB;AAEO,MAAM,iBAA+B;AAAA,EAC1C,cAAc;AAAA,EACd,cAAc;AAAA,EACd,iBAAiB,MAAM;AAAA,EACvB,gBAAgB;AAAA,EAChB,mBAAmB,MAAM;AAAA,EACzB,aAAa;AAAA,EACb,gBAAgB,MAAM;AAAA,EACtB,sBAAsB;AAAA,EACtB,kBAAkB,CAAC;AAAA,EACnB,qBAAqB,MAAM;AAAA,EAC3B,cAAc,CAAC;AAAA,EACf,kBAAkB,EAAE,SAAS,CAAC,EAAE;AAClC;AAEO,MAAM,iBAAiB,cAA4B,cAAc;AAExE,IAAO,gCAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { MutableRefObject, RefObject } from 'react';\nimport type React from 'react';\nimport { createContext } from 'react';\nimport type { LeftNavProps, LabelOveflowT } from './index.d';\n\nexport type ContextProps = {\n selectedItem: string | null;\n setSelectedItem: React.Dispatch<React.SetStateAction<string | null>>;\n selectedParent: string | null;\n setSelectedParent: React.Dispatch<React.SetStateAction<string | null>>;\n focusedItem: string | null;\n setFocusedItem: React.Dispatch<React.SetStateAction<string | null>>;\n openedDrilldowns: string[];\n setOpenedDrilldowns: React.Dispatch<React.SetStateAction<string[]>>;\n visibleItems: string[];\n visibleItemsRefs: MutableRefObject<Record<string, RefObject<HTMLElement>>>;\n leftNavProps: LeftNavProps;\n expandedForAnimation: boolean;\n};\n\nexport const defaultProps: LeftNavProps = {\n expandedWidth: '240px',\n loading: false,\n expanded: false,\n openedItem: null,\n footerLabel: '',\n onSelectedChange: () => null,\n onFocusChange: () => null,\n onFooterExpand: () => null,\n onFooterClose: () => null,\n items: [],\n labelOverflow: 'wrap' as LabelOveflowT,\n onItemClick: () => null,\n};\n\nexport const defaultContext: ContextProps = {\n leftNavProps: defaultProps,\n selectedItem: null,\n setSelectedItem: () => null,\n selectedParent: null,\n setSelectedParent: () => null,\n focusedItem: null,\n setFocusedItem: () => null,\n expandedForAnimation: true,\n openedDrilldowns: [],\n setOpenedDrilldowns: () => null,\n visibleItems: [],\n visibleItemsRefs: { current: {} },\n};\n\nexport const LeftNavContext = createContext<ContextProps>(defaultContext);\n\nexport default LeftNavContext;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,qBAAqB;AAkBvB,MAAM,eAA6B;AAAA,EACxC,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,EACrB,OAAO,CAAC;AAAA,EACR,eAAe;AAAA,EACf,aAAa,MAAM;AACrB;AAEO,MAAM,iBAA+B;AAAA,EAC1C,cAAc;AAAA,EACd,cAAc;AAAA,EACd,iBAAiB,MAAM;AAAA,EACvB,gBAAgB;AAAA,EAChB,mBAAmB,MAAM;AAAA,EACzB,aAAa;AAAA,EACb,gBAAgB,MAAM;AAAA,EACtB,sBAAsB;AAAA,EACtB,kBAAkB,CAAC;AAAA,EACnB,qBAAqB,MAAM;AAAA,EAC3B,cAAc,CAAC;AAAA,EACf,kBAAkB,EAAE,SAAS,CAAC,EAAE;AAClC;AAEO,MAAM,iBAAiB,cAA4B,cAAc;AAExE,IAAO,gCAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/common/getItemBackgroundStyle.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { Theme } from '@elliemae/ds-system';\n\nconst commonItemBackgroundStyle = (color: string, hoverColor: string, activeColor: string): string => `\n\n background: ${color};\n\n :hover {\n background: ${hoverColor};\n }\n\n :active {\n background: ${activeColor};\n }\n`;\n\nexport const getItemBackgroundStyle = (props: { theme: Theme; selected: boolean; opened: boolean }): string => {\n if (props.selected && !props.opened)\n return commonItemBackgroundStyle(\n props.theme.colors.brand[200],\n props.theme.colors.brand[200],\n props.theme.colors.brand[200],\n );\n\n return commonItemBackgroundStyle(\n props.theme.colors.neutral['000'],\n props.theme.colors.neutral['080'],\n props.theme.colors.brand[200],\n );\n};\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { Theme } from '@elliemae/ds-system';\n\nconst commonItemBackgroundStyle = (color: string, hoverColor: string, activeColor: string): string => `\n\n background: ${color};\n\n :hover {\n background: ${hoverColor};\n }\n\n :active {\n background: ${activeColor};\n }\n`;\n\nexport const getItemBackgroundStyle = (props: { theme: Theme; selected: boolean; opened: boolean }): string => {\n if (props.selected && !props.opened)\n return commonItemBackgroundStyle(\n props.theme.colors.brand[200],\n props.theme.colors.brand[200],\n props.theme.colors.brand[200],\n );\n\n return commonItemBackgroundStyle(\n props.theme.colors.neutral['000'],\n props.theme.colors.neutral['080'],\n props.theme.colors.brand[200],\n );\n};\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACEvB,MAAM,4BAA4B,CAAC,OAAe,YAAoB,gBAAgC;AAAA;AAAA,gBAEtF;AAAA;AAAA;AAAA,kBAGE;AAAA;AAAA;AAAA;AAAA,kBAIA;AAAA;AAAA;AAIX,MAAM,yBAAyB,CAAC,UAAwE;AAC7G,MAAI,MAAM,YAAY,CAAC,MAAM;AAC3B,WAAO;AAAA,MACL,MAAM,MAAM,OAAO,MAAM;AAAA,MACzB,MAAM,MAAM,OAAO,MAAM;AAAA,MACzB,MAAM,MAAM,OAAO,MAAM;AAAA,IAC3B;AAEF,SAAO;AAAA,IACL,MAAM,MAAM,OAAO,QAAQ;AAAA,IAC3B,MAAM,MAAM,OAAO,QAAQ;AAAA,IAC3B,MAAM,MAAM,OAAO,MAAM;AAAA,EAC3B;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/common/getLeftBorderStyle.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { Theme } from '@elliemae/ds-system';\n\nconst commonLeftBorderStyle = (color: string, hoverColor: string, activeColor: string): string => `\n\n -webkit-box-shadow: inset 4px 0 0 0 ${color};\n box-shadow: inset 4px 0 0 0 ${color};\n\n :hover {\n -webkit-box-shadow: inset 4px 0 0 0 ${hoverColor};\n box-shadow: inset 4px 0 0 0 ${hoverColor};\n }\n\n :active {\n -webkit-box-shadow: inset 4px 0 0 0 ${activeColor};\n box-shadow: inset 4px 0 0 0 ${activeColor};\n }\n`;\n\nexport const getLeftBorderStyle = (props: { theme: Theme; selected: boolean; selectedParent: boolean }): string => {\n if (props.selected || props.selectedParent)\n return commonLeftBorderStyle(\n props.theme.colors.brand[400],\n props.theme.colors.brand[400],\n props.theme.colors.brand[400],\n );\n\n return commonLeftBorderStyle('transparent', props.theme.colors.brand[300], props.theme.colors.brand[400]);\n};\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { Theme } from '@elliemae/ds-system';\n\nconst commonLeftBorderStyle = (color: string, hoverColor: string, activeColor: string): string => `\n\n -webkit-box-shadow: inset 4px 0 0 0 ${color};\n box-shadow: inset 4px 0 0 0 ${color};\n\n :hover {\n -webkit-box-shadow: inset 4px 0 0 0 ${hoverColor};\n box-shadow: inset 4px 0 0 0 ${hoverColor};\n }\n\n :active {\n -webkit-box-shadow: inset 4px 0 0 0 ${activeColor};\n box-shadow: inset 4px 0 0 0 ${activeColor};\n }\n`;\n\nexport const getLeftBorderStyle = (props: { theme: Theme; selected: boolean; selectedParent: boolean }): string => {\n if (props.selected || props.selectedParent)\n return commonLeftBorderStyle(\n props.theme.colors.brand[400],\n props.theme.colors.brand[400],\n props.theme.colors.brand[400],\n );\n\n return commonLeftBorderStyle('transparent', props.theme.colors.brand[300], props.theme.colors.brand[400]);\n};\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACEvB,MAAM,wBAAwB,CAAC,OAAe,YAAoB,gBAAgC;AAAA;AAAA,wCAE1D;AAAA,wCACA;AAAA;AAAA;AAAA,0CAGE;AAAA,0CACA;AAAA;AAAA;AAAA;AAAA,0CAIA;AAAA,0CACA;AAAA;AAAA;AAInC,MAAM,qBAAqB,CAAC,UAAgF;AACjH,MAAI,MAAM,YAAY,MAAM;AAC1B,WAAO;AAAA,MACL,MAAM,MAAM,OAAO,MAAM;AAAA,MACzB,MAAM,MAAM,OAAO,MAAM;AAAA,MACzB,MAAM,MAAM,OAAO,MAAM;AAAA,IAC3B;AAEF,SAAO,sBAAsB,eAAe,MAAM,MAAM,OAAO,MAAM,MAAM,MAAM,MAAM,OAAO,MAAM,IAAI;AAC1G;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/configs/useLeftNavConfig.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport type { LeftNavProps } from '../index.d';\nimport { ContextProps } from '../LeftNavigationContext';\nimport useLeftNavItems from './useLeftNavItems';\nimport { useLeftNavSmoothExpand } from './useLeftNavSmoothExpand';\nimport { useSelectFirstBodyItem } from '../hooks/useSelectFirstBodyItem';\n\nexport const useLeftNavConfig = (props: LeftNavProps): ContextProps => {\n const { expanded, openedItem, onSelectedChange, onFocusChange, items } = props;\n\n // -----------------------------------------------------------------------------\n // ************************** ------------ **************************\n // * INTERNAL STATE *\n // ************************** ------------ **************************\n // Selection related\n const [selectedItem, setSelectedItem] = React.useState<string | null>(null);\n const [selectedParent, setSelectedParent] = React.useState<string | null>(null);\n // Focus related\n const [focusedItem, setFocusedItem] = React.useState<string | null>(null);\n // Opened uncontrolled drilldowns\n const [openedDrilldowns, setOpenedDrilldowns] = React.useState<string[]>([]);\n\n // -----------------------------------------------------------------------------\n // ************************** ------------ **************************\n // * EXPAND ANIMATION *\n // ************************** ------------ **************************\n const [expandedForAnimation, setExpandedForAnimation] = React.useState(expanded);\n const timeoutRef = React.useRef<ReturnType<typeof setTimeout>>(null);\n const smoothExpandOpts = React.useMemo(\n () => ({\n expandedForAnimation,\n timeoutRef,\n setExpandedForAnimation,\n }),\n [expandedForAnimation, timeoutRef, setExpandedForAnimation],\n );\n useLeftNavSmoothExpand(props, smoothExpandOpts);\n\n // -----------------------------------------------------------------------------\n // ************************** ------------ **************************\n // * SIDE EFFECTS *\n // ************************** ------------ **************************\n React.useEffect(() => {\n onSelectedChange(selectedItem);\n }, [selectedItem, onSelectedChange]);\n\n React.useEffect(() => {\n if (props.actionRef && props.actionRef.current) {\n props.actionRef.current.setFocusedItem = setFocusedItem;\n }\n }, [props.actionRef]);\n\n React.useEffect(() => {\n if (openedItem !== null) setSelectedParent(openedItem);\n }, [openedItem]);\n\n React.useEffect(() => {\n onFocusChange(focusedItem);\n }, [focusedItem, onFocusChange]);\n\n useSelectFirstBodyItem(\n items,\n openedItem,\n props.selectedItem !== undefined ? props.selectedItem : selectedItem,\n setSelectedItem,\n props.disableDefaultSelection,\n );\n\n // -----------------------------------------------------------------------------\n // ************************** ------------ **************************\n // * ITEMS MANAGEMENT *\n // ************************** ------------ **************************\n\n const leftNavItemsProps = React.useMemo(\n () => ({\n headerItem: props.HeaderComponent,\n bodyHeaderItem: props.BodyHeaderComponent,\n items: props.items,\n openedDrilldowns,\n }),\n [props.HeaderComponent, props.BodyHeaderComponent, props.items, openedDrilldowns],\n );\n\n // We need to know the current visible items since we have drilldowns\n const { visibleItems, visibleItemsRefs } = useLeftNavItems(leftNavItemsProps);\n\n // -----------------------------------------------------------------------------\n // ************************** ------------ **************************\n // * LEFTNAV CONFIG *\n // ************************** ------------ **************************\n const finalConfig = React.useMemo(\n () => ({\n leftNavProps: props,\n expandedForAnimation,\n selectedItem: props.selectedItem !== undefined ? props.selectedItem : selectedItem,\n setSelectedItem,\n selectedParent: props.selectedParent !== undefined ? props.selectedParent : selectedParent,\n setSelectedParent,\n focusedItem,\n setFocusedItem,\n openedDrilldowns,\n setOpenedDrilldowns,\n visibleItems,\n visibleItemsRefs,\n }),\n [\n props,\n expandedForAnimation,\n selectedItem,\n setSelectedItem,\n setSelectedParent,\n selectedParent,\n focusedItem,\n setFocusedItem,\n openedDrilldowns,\n setOpenedDrilldowns,\n visibleItems,\n visibleItemsRefs,\n ],\n );\n\n return finalConfig;\n};\n\nexport default useLeftNavConfig;\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport type { LeftNavProps } from '../index.d';\nimport type { ContextProps } from '../LeftNavigationContext';\nimport useLeftNavItems from './useLeftNavItems';\nimport { useLeftNavSmoothExpand } from './useLeftNavSmoothExpand';\nimport { useSelectFirstBodyItem } from '../hooks/useSelectFirstBodyItem';\n\nexport const useLeftNavConfig = (props: LeftNavProps): ContextProps => {\n const { expanded, openedItem, onSelectedChange, onFocusChange, items } = props;\n\n // -----------------------------------------------------------------------------\n // ************************** ------------ **************************\n // * INTERNAL STATE *\n // ************************** ------------ **************************\n // Selection related\n const [selectedItem, setSelectedItem] = React.useState<string | null>(null);\n const [selectedParent, setSelectedParent] = React.useState<string | null>(null);\n // Focus related\n const [focusedItem, setFocusedItem] = React.useState<string | null>(null);\n // Opened uncontrolled drilldowns\n const [openedDrilldowns, setOpenedDrilldowns] = React.useState<string[]>([]);\n\n // -----------------------------------------------------------------------------\n // ************************** ------------ **************************\n // * EXPAND ANIMATION *\n // ************************** ------------ **************************\n const [expandedForAnimation, setExpandedForAnimation] = React.useState(expanded);\n const timeoutRef = React.useRef<ReturnType<typeof setTimeout>>(null);\n const smoothExpandOpts = React.useMemo(\n () => ({\n expandedForAnimation,\n timeoutRef,\n setExpandedForAnimation,\n }),\n [expandedForAnimation, timeoutRef, setExpandedForAnimation],\n );\n useLeftNavSmoothExpand(props, smoothExpandOpts);\n\n // -----------------------------------------------------------------------------\n // ************************** ------------ **************************\n // * SIDE EFFECTS *\n // ************************** ------------ **************************\n React.useEffect(() => {\n onSelectedChange(selectedItem);\n }, [selectedItem, onSelectedChange]);\n\n React.useEffect(() => {\n if (props.actionRef && props.actionRef.current) {\n props.actionRef.current.setFocusedItem = setFocusedItem;\n }\n }, [props.actionRef]);\n\n React.useEffect(() => {\n if (openedItem !== null) setSelectedParent(openedItem);\n }, [openedItem]);\n\n React.useEffect(() => {\n onFocusChange(focusedItem);\n }, [focusedItem, onFocusChange]);\n\n useSelectFirstBodyItem(\n items,\n openedItem,\n props.selectedItem !== undefined ? props.selectedItem : selectedItem,\n setSelectedItem,\n props.disableDefaultSelection,\n );\n\n // -----------------------------------------------------------------------------\n // ************************** ------------ **************************\n // * ITEMS MANAGEMENT *\n // ************************** ------------ **************************\n\n const leftNavItemsProps = React.useMemo(\n () => ({\n headerItem: props.HeaderComponent,\n bodyHeaderItem: props.BodyHeaderComponent,\n items: props.items,\n openedDrilldowns,\n }),\n [props.HeaderComponent, props.BodyHeaderComponent, props.items, openedDrilldowns],\n );\n\n // We need to know the current visible items since we have drilldowns\n const { visibleItems, visibleItemsRefs } = useLeftNavItems(leftNavItemsProps);\n\n // -----------------------------------------------------------------------------\n // ************************** ------------ **************************\n // * LEFTNAV CONFIG *\n // ************************** ------------ **************************\n const finalConfig = React.useMemo(\n () => ({\n leftNavProps: props,\n expandedForAnimation,\n selectedItem: props.selectedItem !== undefined ? props.selectedItem : selectedItem,\n setSelectedItem,\n selectedParent: props.selectedParent !== undefined ? props.selectedParent : selectedParent,\n setSelectedParent,\n focusedItem,\n setFocusedItem,\n openedDrilldowns,\n setOpenedDrilldowns,\n visibleItems,\n visibleItemsRefs,\n }),\n [\n props,\n expandedForAnimation,\n selectedItem,\n setSelectedItem,\n setSelectedParent,\n selectedParent,\n focusedItem,\n setFocusedItem,\n openedDrilldowns,\n setOpenedDrilldowns,\n visibleItems,\n visibleItemsRefs,\n ],\n );\n\n return finalConfig;\n};\n\nexport default useLeftNavConfig;\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAGlB,OAAO,qBAAqB;AAC5B,SAAS,8BAA8B;AACvC,SAAS,8BAA8B;AAEhC,MAAM,mBAAmB,CAAC,UAAsC;AACrE,QAAM,EAAE,UAAU,YAAY,kBAAkB,eAAe,MAAM,IAAI;AAOzE,QAAM,CAAC,cAAc,eAAe,IAAIA,OAAM,SAAwB,IAAI;AAC1E,QAAM,CAAC,gBAAgB,iBAAiB,IAAIA,OAAM,SAAwB,IAAI;AAE9E,QAAM,CAAC,aAAa,cAAc,IAAIA,OAAM,SAAwB,IAAI;AAExE,QAAM,CAAC,kBAAkB,mBAAmB,IAAIA,OAAM,SAAmB,CAAC,CAAC;AAM3E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,eAAe;AAAA,MACtE;AAAA,MACA,gBAAgB,MAAM,mBAAmB,SAAY,MAAM,iBAAiB;AAAA,MAC5E;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;AAEA,IAAO,2BAAQ;",
6
6
  "names": ["React"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/configs/useLeftNavItems.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport { createRef, MutableRefObject, RefObject, useMemo, useRef } from 'react';\nimport { ITEM_TYPES } from '../exported-related';\nimport type { GenericItemItemProps } from '../index.d';\nimport { FOOTER_DS_ID } from '../exported-related/constants';\n\nconst notFocuseableItems = [ITEM_TYPES.LEFT_NAV_ITEM_SEPARATOR, ITEM_TYPES.LEFT_NAV_ITEM_SECTION];\n\n// Walks the array of items\n// Drilldowns are tree-like structures\nconst walkItems = (items: GenericItemItemProps[], openedDrilldowns: string[], callback: (dsId: string) => void) => {\n items.forEach((item) => {\n if (typeof item.type === 'string') {\n // Out of the box item\n if (notFocuseableItems.includes(item.type)) return; // not focuseable\n\n callback(item.dsId);\n\n // If it's an opened uncontrolled drilldown\n if (item.type === ITEM_TYPES.LEFT_NAV_ITEM_UNCONTROLLED_DRILLDOWN && openedDrilldowns.includes(item.dsId))\n walkItems(item.itemOpts?.items ?? [], openedDrilldowns, callback);\n\n // If it's an opened controlled drilldown\n if (item.type === ITEM_TYPES.LEFT_NAV_ITEM_CONTROLLED_DRILLDOWN && item.itemOpts?.isOpened)\n walkItems(item.itemOpts?.items ?? [], openedDrilldowns, callback);\n } else {\n // Custom item\n if (!item.itemOpts?.focuseable) return; // not focuseable specified\n callback(item.dsId);\n }\n });\n};\n\nexport const useLeftNavItems = (props: {\n headerItem: GenericItemItemProps;\n bodyHeaderItem: GenericItemItemProps;\n items: GenericItemItemProps[];\n openedDrilldowns: string[];\n}): {\n visibleItems: string[];\n visibleItemsRefs: MutableRefObject<Record<string, RefObject<HTMLElement>>>;\n} => {\n const { headerItem, bodyHeaderItem, items: bodyItems, openedDrilldowns } = props;\n\n // Place the header and body header items into the array of items\n const items = useMemo(() => {\n const itemsArray: GenericItemItemProps[] = [...bodyItems];\n if (bodyHeaderItem) itemsArray.unshift(bodyHeaderItem);\n if (headerItem) itemsArray.unshift(headerItem);\n return itemsArray;\n }, [headerItem, bodyHeaderItem, bodyItems]);\n\n const visibleItemsRefs = useRef<Record<string, RefObject<HTMLElement>>>({});\n\n const visibleItems: string[] = useMemo(() => {\n const visibleItemsArray: string[] = [];\n walkItems(items, openedDrilldowns, (dsId: string) => {\n visibleItemsArray.push(dsId);\n });\n visibleItemsArray.push(FOOTER_DS_ID);\n return visibleItemsArray;\n }, [items, openedDrilldowns]);\n\n visibleItems.forEach((dsId) => {\n if (!(dsId in visibleItemsRefs.current)) visibleItemsRefs.current[dsId] = createRef();\n });\n\n return { visibleItems, visibleItemsRefs };\n};\n\nexport default useLeftNavItems;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,WAAwC,SAAS,cAAc;AACxE,SAAS,kBAAkB;AAE3B,SAAS,oBAAoB;AAE7B,MAAM,qBAAqB,CAAC,WAAW,yBAAyB,WAAW,qBAAqB;AAIhG,MAAM,YAAY,CAAC,OAA+B,kBAA4B,aAAqC;AACjH,QAAM,QAAQ,CAAC,SAAS;AACtB,QAAI,OAAO,KAAK,SAAS,UAAU;AAEjC,UAAI,mBAAmB,SAAS,KAAK,IAAI;AAAG;AAE5C,eAAS,KAAK,IAAI;AAGlB,UAAI,KAAK,SAAS,WAAW,wCAAwC,iBAAiB,SAAS,KAAK,IAAI;AACtG,kBAAU,KAAK,UAAU,SAAS,CAAC,GAAG,kBAAkB,QAAQ;AAGlE,UAAI,KAAK,SAAS,WAAW,sCAAsC,KAAK,UAAU;AAChF,kBAAU,KAAK,UAAU,SAAS,CAAC,GAAG,kBAAkB,QAAQ;AAAA,IACpE,OAAO;AAEL,UAAI,CAAC,KAAK,UAAU;AAAY;AAChC,eAAS,KAAK,IAAI;AAAA,IACpB;AAAA,EACF,CAAC;AACH;AAEO,MAAM,kBAAkB,CAAC,UAQ3B;AACH,QAAM,EAAE,YAAY,gBAAgB,OAAO,WAAW,iBAAiB,IAAI;AAG3E,QAAM,QAAQ,QAAQ,MAAM;AAC1B,UAAM,aAAqC,CAAC,GAAG,SAAS;AACxD,QAAI;AAAgB,iBAAW,QAAQ,cAAc;AACrD,QAAI;AAAY,iBAAW,QAAQ,UAAU;AAC7C,WAAO;AAAA,EACT,GAAG,CAAC,YAAY,gBAAgB,SAAS,CAAC;AAE1C,QAAM,mBAAmB,OAA+C,CAAC,CAAC;AAE1E,QAAM,eAAyB,QAAQ,MAAM;AAC3C,UAAM,oBAA8B,CAAC;AACrC,cAAU,OAAO,kBAAkB,CAAC,SAAiB;AACnD,wBAAkB,KAAK,IAAI;AAAA,IAC7B,CAAC;AACD,sBAAkB,KAAK,YAAY;AACnC,WAAO;AAAA,EACT,GAAG,CAAC,OAAO,gBAAgB,CAAC;AAE5B,eAAa,QAAQ,CAAC,SAAS;AAC7B,QAAI,EAAE,QAAQ,iBAAiB;AAAU,uBAAiB,QAAQ,QAAQ,UAAU;AAAA,EACtF,CAAC;AAED,SAAO,EAAE,cAAc,iBAAiB;AAC1C;AAEA,IAAO,0BAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport type { MutableRefObject, RefObject } from 'react';\nimport { createRef, useMemo, useRef } from 'react';\nimport { ITEM_TYPES } from '../exported-related';\nimport type { GenericItemItemProps } from '../index.d';\nimport { FOOTER_DS_ID } from '../exported-related/constants';\n\nconst notFocuseableItems = [ITEM_TYPES.LEFT_NAV_ITEM_SEPARATOR, ITEM_TYPES.LEFT_NAV_ITEM_SECTION];\n\n// Walks the array of items\n// Drilldowns are tree-like structures\nconst walkItems = (items: GenericItemItemProps[], openedDrilldowns: string[], callback: (dsId: string) => void) => {\n items.forEach((item) => {\n if (typeof item.type === 'string') {\n // Out of the box item\n if (notFocuseableItems.includes(item.type)) return; // not focuseable\n\n callback(item.dsId);\n\n // If it's an opened uncontrolled drilldown\n if (item.type === ITEM_TYPES.LEFT_NAV_ITEM_UNCONTROLLED_DRILLDOWN && openedDrilldowns.includes(item.dsId))\n walkItems(item.itemOpts?.items ?? [], openedDrilldowns, callback);\n\n // If it's an opened controlled drilldown\n if (item.type === ITEM_TYPES.LEFT_NAV_ITEM_CONTROLLED_DRILLDOWN && item.itemOpts?.isOpened)\n walkItems(item.itemOpts?.items ?? [], openedDrilldowns, callback);\n } else {\n // Custom item\n if (!item.itemOpts?.focuseable) return; // not focuseable specified\n callback(item.dsId);\n }\n });\n};\n\nexport const useLeftNavItems = (props: {\n headerItem: GenericItemItemProps;\n bodyHeaderItem: GenericItemItemProps;\n items: GenericItemItemProps[];\n openedDrilldowns: string[];\n}): {\n visibleItems: string[];\n visibleItemsRefs: MutableRefObject<Record<string, RefObject<HTMLElement>>>;\n} => {\n const { headerItem, bodyHeaderItem, items: bodyItems, openedDrilldowns } = props;\n\n // Place the header and body header items into the array of items\n const items = useMemo(() => {\n const itemsArray: GenericItemItemProps[] = [...bodyItems];\n if (bodyHeaderItem) itemsArray.unshift(bodyHeaderItem);\n if (headerItem) itemsArray.unshift(headerItem);\n return itemsArray;\n }, [headerItem, bodyHeaderItem, bodyItems]);\n\n const visibleItemsRefs = useRef<Record<string, RefObject<HTMLElement>>>({});\n\n const visibleItems: string[] = useMemo(() => {\n const visibleItemsArray: string[] = [];\n walkItems(items, openedDrilldowns, (dsId: string) => {\n visibleItemsArray.push(dsId);\n });\n visibleItemsArray.push(FOOTER_DS_ID);\n return visibleItemsArray;\n }, [items, openedDrilldowns]);\n\n visibleItems.forEach((dsId) => {\n if (!(dsId in visibleItemsRefs.current)) visibleItemsRefs.current[dsId] = createRef();\n });\n\n return { visibleItems, visibleItemsRefs };\n};\n\nexport default useLeftNavItems;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,WAAW,SAAS,cAAc;AAC3C,SAAS,kBAAkB;AAE3B,SAAS,oBAAoB;AAE7B,MAAM,qBAAqB,CAAC,WAAW,yBAAyB,WAAW,qBAAqB;AAIhG,MAAM,YAAY,CAAC,OAA+B,kBAA4B,aAAqC;AACjH,QAAM,QAAQ,CAAC,SAAS;AACtB,QAAI,OAAO,KAAK,SAAS,UAAU;AAEjC,UAAI,mBAAmB,SAAS,KAAK,IAAI;AAAG;AAE5C,eAAS,KAAK,IAAI;AAGlB,UAAI,KAAK,SAAS,WAAW,wCAAwC,iBAAiB,SAAS,KAAK,IAAI;AACtG,kBAAU,KAAK,UAAU,SAAS,CAAC,GAAG,kBAAkB,QAAQ;AAGlE,UAAI,KAAK,SAAS,WAAW,sCAAsC,KAAK,UAAU;AAChF,kBAAU,KAAK,UAAU,SAAS,CAAC,GAAG,kBAAkB,QAAQ;AAAA,IACpE,OAAO;AAEL,UAAI,CAAC,KAAK,UAAU;AAAY;AAChC,eAAS,KAAK,IAAI;AAAA,IACpB;AAAA,EACF,CAAC;AACH;AAEO,MAAM,kBAAkB,CAAC,UAQ3B;AACH,QAAM,EAAE,YAAY,gBAAgB,OAAO,WAAW,iBAAiB,IAAI;AAG3E,QAAM,QAAQ,QAAQ,MAAM;AAC1B,UAAM,aAAqC,CAAC,GAAG,SAAS;AACxD,QAAI;AAAgB,iBAAW,QAAQ,cAAc;AACrD,QAAI;AAAY,iBAAW,QAAQ,UAAU;AAC7C,WAAO;AAAA,EACT,GAAG,CAAC,YAAY,gBAAgB,SAAS,CAAC;AAE1C,QAAM,mBAAmB,OAA+C,CAAC,CAAC;AAE1E,QAAM,eAAyB,QAAQ,MAAM;AAC3C,UAAM,oBAA8B,CAAC;AACrC,cAAU,OAAO,kBAAkB,CAAC,SAAiB;AACnD,wBAAkB,KAAK,IAAI;AAAA,IAC7B,CAAC;AACD,sBAAkB,KAAK,YAAY;AACnC,WAAO;AAAA,EACT,GAAG,CAAC,OAAO,gBAAgB,CAAC;AAE5B,eAAa,QAAQ,CAAC,SAAS;AAC7B,QAAI,EAAE,QAAQ,iBAAiB;AAAU,uBAAiB,QAAQ,QAAQ,UAAU;AAAA,EACtF,CAAC;AAED,SAAO,EAAE,cAAc,iBAAiB;AAC1C;AAEA,IAAO,0BAAQ;",
6
6
  "names": []
7
7
  }
@@ -10,7 +10,7 @@ const AugmentedIcon = (Icon2) => styled(Icon2)`
10
10
  outline: 1px solid #1e79c2;
11
11
  }
12
12
  `;
13
- const Icon = (IconComponent) => (props) => {
13
+ const Icon = (IconComponent) => function(props) {
14
14
  const StyledComponent = AugmentedIcon(IconComponent);
15
15
  return /* @__PURE__ */ jsx(StyledComponent, {
16
16
  color: ["brand-primary", 800],
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/Icon/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\n\nconst AugmentedIcon = (\n Icon: React.ComponentType<{ color: unknown; tabIndex: number }>,\n) => styled(Icon)`\n cursor: pointer;\n\n outline: 0;\n :focus,\n :active {\n outline: 1px solid #1e79c2;\n }\n`;\n\nexport const Icon = (\n IconComponent: React.ComponentType<{ color: unknown; tabIndex: number }>,\n) => (props: unknown): JSX.Element => {\n const StyledComponent = AugmentedIcon(IconComponent);\n return (\n <StyledComponent color={['brand-primary', 800]} tabIndex={0} {...props} />\n );\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACoBnB;AAnBJ,SAAS,cAAc;AAEvB,MAAM,gBAAgB,CACpBA,UACG,OAAOA,KAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUT,MAAM,OAAO,CAClB,kBACG,CAAC,UAAgC;AACpC,QAAM,kBAAkB,cAAc,aAAa;AACnD,SACE,oBAAC;AAAA,IAAgB,OAAO,CAAC,iBAAiB,GAAG;AAAA,IAAG,UAAU;AAAA,IAAI,GAAG;AAAA,GAAO;AAE5E;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\n\nconst AugmentedIcon = (Icon: React.ComponentType<{ color: unknown; tabIndex: number }>) => styled(Icon)`\n cursor: pointer;\n\n outline: 0;\n :focus,\n :active {\n outline: 1px solid #1e79c2;\n }\n`;\n\nexport const Icon = (IconComponent: React.ComponentType<{ color: unknown; tabIndex: number }>) =>\n function (props: unknown): JSX.Element {\n const StyledComponent = AugmentedIcon(IconComponent);\n return <StyledComponent color={['brand-primary', 800]} tabIndex={0} {...props} />;\n };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACgBZ;AAfX,SAAS,cAAc;AAEvB,MAAM,gBAAgB,CAACA,UAAoE,OAAOA,KAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAU/F,MAAM,OAAO,CAAC,kBACnB,SAAU,OAA6B;AACrC,QAAM,kBAAkB,cAAc,aAAa;AACnD,SAAO,oBAAC;AAAA,IAAgB,OAAO,CAAC,iBAAiB,GAAG;AAAA,IAAG,UAAU;AAAA,IAAI,GAAG;AAAA,GAAO;AACjF;",
6
6
  "names": ["Icon"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/ItemRenderer/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport React, { useContext, useMemo, useCallback } from 'react';\nimport { StyledItem, StyledCollapsedContainer, StyledBorderBottom } from './styled';\n\nimport { ItemRendererT } from '../../index.d';\nimport { LeftNavContext } from '../../LeftNavigationContext';\nimport { usePropsWithDefaults } from './usePropsWithDefaults';\nimport { useKeyboardNavigation } from '../../hooks';\n\nexport const ItemRenderer: React.ComponentType<ItemRendererT> = (props) => {\n const propsWithDefault = usePropsWithDefaults(props);\n const {\n item,\n item: {\n dsId,\n itemOpts: { selectable, focuseable, indent, ariaLabel, ariaRole, ariaLive, ariaExpanded, ariaDescribedBy },\n CollapsedComponent,\n },\n subitems,\n minHeight,\n paddingTop,\n onClick,\n shadowStyle,\n hasBorderBottom,\n borderBottomMr,\n children,\n } = propsWithDefault;\n\n const ctx = useContext(LeftNavContext);\n const {\n leftNavProps: { onItemClick, openedItem },\n expandedForAnimation,\n selectedParent,\n selectedItem,\n setSelectedItem,\n setFocusedItem,\n visibleItemsRefs,\n } = ctx;\n\n const opened = dsId === openedItem;\n\n const handleOnClick = useCallback(\n (e: React.MouseEvent<HTMLElement>) => {\n if (onClick) onClick(); // used by uncontrolled drilldowns\n onItemClick(item, e);\n if (selectable) setSelectedItem(item.dsId as string);\n },\n [onItemClick, item, setSelectedItem, selectable, onClick],\n );\n\n const handleFocus = useCallback(() => {\n if (focuseable) setFocusedItem(dsId as string);\n }, [dsId, setFocusedItem, focuseable]);\n\n const onKeyDown = useKeyboardNavigation({\n item,\n onClick: handleOnClick,\n });\n\n const cols = useMemo(() => (expandedForAnimation ? ['auto', '1fr', 'auto'] : ['38px']), [expandedForAnimation]);\n const isSelected = useMemo(() => selectedItem === dsId, [selectedItem, dsId]);\n\n if (!expandedForAnimation && !CollapsedComponent) {\n return null;\n }\n\n return (\n <>\n <StyledItem\n ref={visibleItemsRefs.current[dsId]}\n pt={paddingTop}\n pl={indent === undefined ? 'xxxs' : `${indent}px`}\n minHeight={minHeight}\n shadowStyle={shadowStyle(opened, item.type)}\n alignItems=\"flex-start\"\n cols={cols}\n onClick={!opened ? handleOnClick : () => null}\n onKeyDown={onKeyDown}\n selectable={selectable}\n selected={isSelected}\n selectedParent={selectedParent === dsId}\n opened={opened}\n onFocus={handleFocus}\n data-testid=\"leftnav-item-container\"\n tabIndex={focuseable ? 0 : -1}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n role={ariaRole}\n data-selected={isSelected}\n data-selectedparent={selectedParent === dsId}\n data-opened={opened}\n data-type={item.type}\n aria-label={ariaLabel}\n aria-hidden={!focuseable}\n aria-live={ariaLive}\n >\n {!expandedForAnimation ? (\n <StyledCollapsedContainer data-testid=\"leftnav-leftcomponent\" justifyContent=\"center\">\n {CollapsedComponent && <CollapsedComponent item={item} ctx={ctx} />}\n </StyledCollapsedContainer>\n ) : (\n children\n )}\n {hasBorderBottom && <StyledBorderBottom opened={opened} borderBottomMr={borderBottomMr} />}\n </StyledItem>\n {subitems}\n </>\n );\n};\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport React, { useContext, useMemo, useCallback } from 'react';\nimport { StyledItem, StyledCollapsedContainer, StyledBorderBottom } from './styled';\n\nimport type { ItemRendererT } from '../../index.d';\nimport { LeftNavContext } from '../../LeftNavigationContext';\nimport { usePropsWithDefaults } from './usePropsWithDefaults';\nimport { useKeyboardNavigation } from '../../hooks';\n\nexport const ItemRenderer: React.ComponentType<ItemRendererT> = (props) => {\n const propsWithDefault = usePropsWithDefaults(props);\n const {\n item,\n item: {\n dsId,\n itemOpts: { selectable, focuseable, indent, ariaLabel, ariaRole, ariaLive, ariaExpanded, ariaDescribedBy },\n CollapsedComponent,\n },\n subitems,\n minHeight,\n paddingTop,\n onClick,\n shadowStyle,\n hasBorderBottom,\n borderBottomMr,\n children,\n } = propsWithDefault;\n\n const ctx = useContext(LeftNavContext);\n const {\n leftNavProps: { onItemClick, openedItem },\n expandedForAnimation,\n selectedParent,\n selectedItem,\n setSelectedItem,\n setFocusedItem,\n visibleItemsRefs,\n } = ctx;\n\n const opened = dsId === openedItem;\n\n const handleOnClick = useCallback(\n (e: React.MouseEvent<HTMLElement>) => {\n if (onClick) onClick(); // used by uncontrolled drilldowns\n onItemClick(item, e);\n if (selectable) setSelectedItem(item.dsId as string);\n },\n [onItemClick, item, setSelectedItem, selectable, onClick],\n );\n\n const handleFocus = useCallback(() => {\n if (focuseable) setFocusedItem(dsId as string);\n }, [dsId, setFocusedItem, focuseable]);\n\n const onKeyDown = useKeyboardNavigation({\n item,\n onClick: handleOnClick,\n });\n\n const cols = useMemo(() => (expandedForAnimation ? ['auto', '1fr', 'auto'] : ['38px']), [expandedForAnimation]);\n const isSelected = useMemo(() => selectedItem === dsId, [selectedItem, dsId]);\n\n if (!expandedForAnimation && !CollapsedComponent) {\n return null;\n }\n\n return (\n <>\n <StyledItem\n ref={visibleItemsRefs.current[dsId]}\n pt={paddingTop}\n pl={indent === undefined ? 'xxxs' : `${indent}px`}\n minHeight={minHeight}\n shadowStyle={shadowStyle(opened, item.type)}\n alignItems=\"flex-start\"\n cols={cols}\n onClick={!opened ? handleOnClick : () => null}\n onKeyDown={onKeyDown}\n selectable={selectable}\n selected={isSelected}\n selectedParent={selectedParent === dsId}\n opened={opened}\n onFocus={handleFocus}\n data-testid=\"leftnav-item-container\"\n tabIndex={focuseable ? 0 : -1}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n role={ariaRole}\n data-selected={isSelected}\n data-selectedparent={selectedParent === dsId}\n data-opened={opened}\n data-type={item.type}\n aria-label={ariaLabel}\n aria-hidden={!focuseable}\n aria-live={ariaLive}\n >\n {!expandedForAnimation ? (\n <StyledCollapsedContainer data-testid=\"leftnav-leftcomponent\" justifyContent=\"center\">\n {CollapsedComponent && <CollapsedComponent item={item} ctx={ctx} />}\n </StyledCollapsedContainer>\n ) : (\n children\n )}\n {hasBorderBottom && <StyledBorderBottom opened={opened} borderBottomMr={borderBottom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,CAAC,oBAAoB,CAAC;AAC9G,QAAM,aAAa,QAAQ,MAAM,iBAAiB,MAAM,CAAC,cAAc,IAAI,CAAC;AAE5E,MAAI,CAAC,wBAAwB,CAAC,oBAAoB;AAChD,WAAO;AAAA,EACT;AAEA,SACE;AAAA,IACE;AAAA,2BAAC;AAAA,QACC,KAAK,iBAAiB,QAAQ;AAAA,QAC9B,IAAI;AAAA,QACJ,IAAI,WAAW,SAAY,SAAS,GAAG;AAAA,QACvC;AAAA,QACA,aAAa,YAAY,QAAQ,KAAK,IAAI;AAAA,QAC1C,YAAW;AAAA,QACX;AAAA,QACA,SAAS,CAAC,SAAS,gBAAgB,MAAM;AAAA,QACzC;AAAA,QACA;AAAA,QACA,UAAU;AAAA,QACV,gBAAgB,mBAAmB;AAAA,QACnC;AAAA,QACA,SAAS;AAAA,QACT,eAAY;AAAA,QACZ,UAAU,aAAa,IAAI;AAAA,QAC3B,oBAAkB;AAAA,QAClB,iBAAe;AAAA,QACf,MAAM;AAAA,QACN,iBAAe;AAAA,QACf,uBAAqB,mBAAmB;AAAA,QACxC,eAAa;AAAA,QACb,aAAW,KAAK;AAAA,QAChB,cAAY;AAAA,QACZ,eAAa,CAAC;AAAA,QACd,aAAW;AAAA,QAEV;AAAA,WAAC,uBACA,oBAAC;AAAA,YAAyB,eAAY;AAAA,YAAwB,gBAAe;AAAA,YAC1E,gCAAsB,oBAAC;AAAA,cAAmB;AAAA,cAAY;AAAA,aAAU;AAAA,WACnE,IAEA;AAAA,UAED,mBAAmB,oBAAC;AAAA,YAAmB;AAAA,YAAgB;AAAA,WAAgC;AAAA;AAAA,OAC1F;AAAA,MACC;AAAA;AAAA,GACH;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/ItemRenderer/usePropsWithDefaults.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useMemo } from 'react';\nimport { ItemOptsT, ItemRendererT } from '../../index.d';\n\nconst itemDefaultProps: ItemOptsT = {\n label: '',\n labelOverflow: 'truncate',\n selectable: true,\n focuseable: true,\n openable: false,\n closable: false,\n ariaLabel: '',\n ariaRole: 'menuitem',\n ariaLive: 'off',\n ariaExpanded: undefined,\n ariaDescribedBy: undefined,\n};\n\nconst itemWithoutShadows = ['ds-left-nav-item-header', 'ds-left-nav-item-link', 'ds-left-nav-item-submenu'];\n\n// Make use Item props with defaults\nexport const usePropsWithDefaults = (props: ItemRendererT): Required<ItemRendererT> => {\n const propsWithDefault = useMemo(() => {\n const itemWithDefaults = {\n CollapsedComponent: () => null,\n ...props.item,\n itemOpts: { ...itemDefaultProps, ...props.item.itemOpts },\n };\n return {\n minHeight: '48px',\n paddingTop: '12px',\n subitems: [],\n shadowStyle: (opened: boolean, type: string) => () =>\n `box-shadow: ${\n opened || !itemWithoutShadows.includes(type) ? 'inset 4px 0 0 0 #52A6EC' : 'inset 4px 0 0 0 white'\n }`,\n hasBorderBottom: false,\n borderBottomMr: '0px',\n ...props,\n item: itemWithDefaults,\n };\n }, [props]);\n\n return propsWithDefault as Required<ItemRendererT>;\n};\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useMemo } from 'react';\nimport type { ItemOptsT, ItemRendererT } from '../../index.d';\n\nconst itemDefaultProps: ItemOptsT = {\n label: '',\n labelOverflow: 'truncate',\n selectable: true,\n focuseable: true,\n openable: false,\n closable: false,\n ariaLabel: '',\n ariaRole: 'menuitem',\n ariaLive: 'off',\n ariaExpanded: undefined,\n ariaDescribedBy: undefined,\n};\n\nconst itemWithoutShadows = ['ds-left-nav-item-header', 'ds-left-nav-item-link', 'ds-left-nav-item-submenu'];\n\n// Make use Item props with defaults\nexport const usePropsWithDefaults = (props: ItemRendererT): Required<ItemRendererT> => {\n const propsWithDefault = useMemo(() => {\n const itemWithDefaults = {\n CollapsedComponent: () => null,\n ...props.item,\n itemOpts: { ...itemDefaultProps, ...props.item.itemOpts },\n };\n return {\n minHeight: '48px',\n paddingTop: '12px',\n subitems: [],\n shadowStyle: (opened: boolean, type: string) => () =>\n `box-shadow: ${\n opened || !itemWithoutShadows.includes(type) ? 'inset 4px 0 0 0 #52A6EC' : 'inset 4px 0 0 0 white'\n }`,\n hasBorderBottom: false,\n borderBottomMr: '0px',\n ...props,\n item: itemWithDefaults,\n };\n }, [props]);\n\n return propsWithDefault as Required<ItemRendererT>;\n};\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,eAAe;AAGxB,MAAM,mBAA8B;AAAA,EAClC,OAAO;AAAA,EACP,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,UAAU;AAAA,EACV,WAAW;AAAA,EACX,UAAU;AAAA,EACV,UAAU;AAAA,EACV,cAAc;AAAA,EACd,iBAAiB;AACnB;AAEA,MAAM,qBAAqB,CAAC,2BAA2B,yBAAyB,0BAA0B;AAGnG,MAAM,uBAAuB,CAAC,UAAkD;AACrF,QAAM,mBAAmB,QAAQ,MAAM;AACrC,UAAM,mBAAmB;AAAA,MACvB,oBAAoB,MAAM;AAAA,MAC1B,GAAG,MAAM;AAAA,MACT,UAAU,EAAE,GAAG,kBAAkB,GAAG,MAAM,KAAK,SAAS;AAAA,IAC1D;AACA,WAAO;AAAA,MACL,WAAW;AAAA,MACX,YAAY;AAAA,MACZ,UAAU,CAAC;AAAA,MACX,aAAa,CAAC,QAAiB,SAAiB,MAC9C,eACE,UAAU,CAAC,mBAAmB,SAAS,IAAI,IAAI,4BAA4B;AAAA,MAE/E,iBAAiB;AAAA,MACjB,gBAAgB;AAAA,MAChB,GAAG;AAAA,MACH,MAAM;AAAA,IACR;AAAA,EACF,GAAG,CAAC,KAAK,CAAC;AAEV,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/hooks/useExpandableOnClickHandler.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback, useContext } from 'react';\nimport LeftNavigationContext from '../LeftNavigationContext';\n\ntype useExpandableOnClickHandlerProps = {\n id: string;\n onExpand: React.MouseEventHandler & React.KeyboardEventHandler;\n onOpen: React.MouseEventHandler & React.KeyboardEventHandler;\n selectable?: boolean;\n};\n\nexport const useExpandableOnClickHandler = ({\n id,\n onExpand,\n onOpen,\n selectable = true,\n}: useExpandableOnClickHandlerProps): ((\n e: React.MouseEvent<HTMLElement>,\n) => void) => {\n const {\n leftNavProps: { expanded },\n setSelectedItem,\n } = useContext(LeftNavigationContext);\n\n const handleOnExpand = useCallback(\n (e) => {\n onExpand(e);\n if (selectable) setSelectedItem(id);\n },\n [id, onExpand, setSelectedItem, selectable],\n );\n\n const handleOnOpen = useCallback(\n (e) => {\n onOpen(e);\n if (selectable) setSelectedItem(id);\n },\n [id, onOpen, setSelectedItem, selectable],\n );\n\n const handleOnClick = useCallback(\n (e) => {\n if (!expanded) handleOnExpand(e);\n else handleOnOpen(e);\n },\n [expanded, handleOnExpand, handleOnOpen],\n );\n\n return handleOnClick;\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAgB,aAAa,kBAAkB;AAC/C,OAAO,2BAA2B;AAS3B,MAAM,8BAA8B,CAAC;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AACf,MAEc;AACZ,QAAM;AAAA,IACJ,cAAc,EAAE,SAAS;AAAA,IACzB;AAAA,EACF,IAAI,WAAW,qBAAqB;AAEpC,QAAM,iBAAiB;AAAA,IACrB,CAAC,MAAM;AACL,eAAS,CAAC;AACV,UAAI;AAAY,wBAAgB,EAAE;AAAA,IACpC;AAAA,IACA,CAAC,IAAI,UAAU,iBAAiB,UAAU;AAAA,EAC5C;AAEA,QAAM,eAAe;AAAA,IACnB,CAAC,MAAM;AACL,aAAO,CAAC;AACR,UAAI;AAAY,wBAAgB,EAAE;AAAA,IACpC;AAAA,IACA,CAAC,IAAI,QAAQ,iBAAiB,UAAU;AAAA,EAC1C;AAEA,QAAM,gBAAgB;AAAA,IACpB,CAAC,MAAM;AACL,UAAI,CAAC;AAAU,uBAAe,CAAC;AAAA;AAC1B,qBAAa,CAAC;AAAA,IACrB;AAAA,IACA,CAAC,UAAU,gBAAgB,YAAY;AAAA,EACzC;AAEA,SAAO;AACT;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type React from 'react';\nimport { useCallback, useContext } from 'react';\nimport LeftNavigationContext from '../LeftNavigationContext';\n\ntype useExpandableOnClickHandlerProps = {\n id: string;\n onExpand: React.MouseEventHandler & React.KeyboardEventHandler;\n onOpen: React.MouseEventHandler & React.KeyboardEventHandler;\n selectable?: boolean;\n};\n\nexport const useExpandableOnClickHandler = ({\n id,\n onExpand,\n onOpen,\n selectable = true,\n}: useExpandableOnClickHandlerProps): ((e: React.MouseEvent<HTMLElement>) => void) => {\n const {\n leftNavProps: { expanded },\n setSelectedItem,\n } = useContext(LeftNavigationContext);\n\n const handleOnExpand = useCallback(\n (e) => {\n onExpand(e);\n if (selectable) setSelectedItem(id);\n },\n [id, onExpand, setSelectedItem, selectable],\n );\n\n const handleOnOpen = useCallback(\n (e) => {\n onOpen(e);\n if (selectable) setSelectedItem(id);\n },\n [id, onOpen, setSelectedItem, selectable],\n );\n\n const handleOnClick = useCallback(\n (e) => {\n if (!expanded) handleOnExpand(e);\n else handleOnOpen(e);\n },\n [expanded, handleOnExpand, handleOnOpen],\n );\n\n return handleOnClick;\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,aAAa,kBAAkB;AACxC,OAAO,2BAA2B;AAS3B,MAAM,8BAA8B,CAAC;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AACf,MAAsF;AACpF,QAAM;AAAA,IACJ,cAAc,EAAE,SAAS;AAAA,IACzB;AAAA,EACF,IAAI,WAAW,qBAAqB;AAEpC,QAAM,iBAAiB;AAAA,IACrB,CAAC,MAAM;AACL,eAAS,CAAC;AACV,UAAI;AAAY,wBAAgB,EAAE;AAAA,IACpC;AAAA,IACA,CAAC,IAAI,UAAU,iBAAiB,UAAU;AAAA,EAC5C;AAEA,QAAM,eAAe;AAAA,IACnB,CAAC,MAAM;AACL,aAAO,CAAC;AACR,UAAI;AAAY,wBAAgB,EAAE;AAAA,IACpC;AAAA,IACA,CAAC,IAAI,QAAQ,iBAAiB,UAAU;AAAA,EAC1C;AAEA,QAAM,gBAAgB;AAAA,IACpB,CAAC,MAAM;AACL,UAAI,CAAC;AAAU,uBAAe,CAAC;AAAA;AAC1B,qBAAa,CAAC;AAAA,IACrB;AAAA,IACA,CAAC,UAAU,gBAAgB,YAAY;AAAA,EACzC;AAEA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/hooks/useKeyboardNavigation.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-statements */\n/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React, { useCallback, useMemo, useLayoutEffect, useContext } from 'react';\nimport { CHEVRON_BACK_DS_ID, FOOTER_MENU_CLOSE_DS_ID } from '../exported-related/constants';\nimport { GenericItemItemProps } from '../index.d';\nimport LeftNavContext from '../LeftNavigationContext';\n\nconst KEY_CODES = {\n TAB: 9,\n ENTER: 13,\n SPACE: 32,\n LEFT_ARROW: 37,\n UP_ARROW: 38,\n RIGHT_ARROW: 39,\n DOWN_ARROW: 40,\n END: 35,\n HOME: 36,\n};\n\nconst nextIndex = (index: number, length: number) => (index + 1) % length;\nconst prevIndex = (index: number, length: number) => (index - 1 + length) % length;\n\ntype useKeyboardNavigationProps = {\n item: GenericItemItemProps;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onClick: (e: any) => void;\n};\n\nexport const useKeyboardNavigation = ({ item, onClick }: useKeyboardNavigationProps): React.KeyboardEventHandler => {\n const {\n dsId,\n itemOpts: { selectable, openable, closable },\n } = item;\n\n const { visibleItems, visibleItemsRefs } = useContext(LeftNavContext);\n\n const currentIndex = useMemo(\n () => visibleItems.findIndex((visibleItemDsId) => visibleItemDsId === dsId),\n [dsId, visibleItems],\n );\n\n const { setFocusedItem, focusedItem, setSelectedItem } = useContext(LeftNavContext);\n\n const focusAndSelect = useCallback(\n (nextDsId: string) => {\n setFocusedItem(nextDsId);\n setSelectedItem(nextDsId);\n },\n [setFocusedItem, setSelectedItem],\n );\n\n useLayoutEffect(() => {\n if (dsId === focusedItem) visibleItemsRefs.current[dsId]?.current?.focus();\n }, [dsId, focusedItem, visibleItemsRefs]);\n\n const onKeyDown: React.KeyboardEventHandler = useCallback(\n (e) => {\n const { keyCode } = e;\n\n // Prevent default behaviour when not tab\n if (keyCode !== KEY_CODES.TAB) {\n e.preventDefault();\n }\n\n if (keyCode === KEY_CODES.ENTER || keyCode === KEY_CODES.SPACE) {\n if (selectable) {\n onClick(e);\n focusAndSelect(dsId);\n } else if (focusedItem === CHEVRON_BACK_DS_ID) {\n onClick(e);\n focusAndSelect(dsId);\n } else if (focusedItem === FOOTER_MENU_CLOSE_DS_ID) {\n onClick(e);\n setFocusedItem(dsId);\n }\n }\n\n if (openable && keyCode === KEY_CODES.RIGHT_ARROW) {\n onClick(e);\n }\n\n if (closable && keyCode === KEY_CODES.LEFT_ARROW) {\n onClick(e);\n setFocusedItem(dsId);\n }\n\n if (keyCode === KEY_CODES.DOWN_ARROW) {\n const nextDsId = visibleItems[nextIndex(currentIndex, visibleItems.length)];\n setFocusedItem(nextDsId);\n }\n\n if (keyCode === KEY_CODES.UP_ARROW) {\n const prevDsId = visibleItems[prevIndex(currentIndex, visibleItems.length)];\n setFocusedItem(prevDsId);\n }\n\n if (keyCode === KEY_CODES.HOME) {\n setFocusedItem(visibleItems[0]);\n }\n\n if (keyCode === KEY_CODES.END) {\n setFocusedItem(visibleItems[visibleItems.length - 1]);\n }\n },\n [\n openable,\n closable,\n selectable,\n focusedItem,\n onClick,\n focusAndSelect,\n dsId,\n setFocusedItem,\n visibleItems,\n currentIndex,\n ],\n );\n\n return onKeyDown;\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACGvB,SAAgB,aAAa,SAAS,iBAAiB,kBAAkB;AACzE,SAAS,oBAAoB,+BAA+B;AAE5D,OAAO,oBAAoB;AAE3B,MAAM,YAAY;AAAA,EAChB,KAAK;AAAA,EACL,OAAO;AAAA,EACP,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,KAAK;AAAA,EACL,MAAM;AACR;AAEA,MAAM,YAAY,CAAC,OAAe,YAAoB,QAAQ,KAAK;AACnE,MAAM,YAAY,CAAC,OAAe,YAAoB,QAAQ,IAAI,UAAU;AAQrE,MAAM,wBAAwB,CAAC,EAAE,MAAM,QAAQ,MAA8D;AAClH,QAAM;AAAA,IACJ;AAAA,IACA,UAAU,EAAE,YAAY,UAAU,SAAS;AAAA,EAC7C,IAAI;AAEJ,QAAM,EAAE,cAAc,iBAAiB,IAAI,WAAW,cAAc;AAEpE,QAAM,eAAe;AAAA,IACnB,MAAM,aAAa,UAAU,CAAC,oBAAoB,oBAAoB,IAAI;AAAA,IAC1E,CAAC,MAAM,YAAY;AAAA,EACrB;AAEA,QAAM,EAAE,gBAAgB,aAAa,gBAAgB,IAAI,WAAW,cAAc;AAElF,QAAM,iBAAiB;AAAA,IACrB,CAAC,aAAqB;AACpB,qBAAe,QAAQ;AACvB,sBAAgB,QAAQ;AAAA,IAC1B;AAAA,IACA,CAAC,gBAAgB,eAAe;AAAA,EAClC;AAEA,kBAAgB,MAAM;AACpB,QAAI,SAAS;AAAa,uBAAiB,QAAQ,OAAO,SAAS,MAAM;AAAA,EAC3E,GAAG,CAAC,MAAM,aAAa,gBAAgB,CAAC;AAExC,QAAM,YAAwC;AAAA,IAC5C,CAAC,MAAM;AACL,YAAM,EAAE,QAAQ,IAAI;AAGpB,UAAI,YAAY,UAAU,KAAK;AAC7B,UAAE,eAAe;AAAA,MACnB;AAEA,UAAI,YAAY,UAAU,SAAS,YAAY,UAAU,OAAO;AAC9D,YAAI,YAAY;AACd,kBAAQ,CAAC;AACT,yBAAe,IAAI;AAAA,QACrB,WAAW,gBAAgB,oBAAoB;AAC7C,kBAAQ,CAAC;AACT,yBAAe,IAAI;AAAA,QACrB,WAAW,gBAAgB,yBAAyB;AAClD,kBAAQ,CAAC;AACT,yBAAe,IAAI;AAAA,QACrB;AAAA,MACF;AAEA,UAAI,YAAY,YAAY,UAAU,aAAa;AACjD,gBAAQ,CAAC;AAAA,MACX;AAEA,UAAI,YAAY,YAAY,UAAU,YAAY;AAChD,gBAAQ,CAAC;AACT,uBAAe,IAAI;AAAA,MACrB;AAEA,UAAI,YAAY,UAAU,YAAY;AACpC,cAAM,WAAW,aAAa,UAAU,cAAc,aAAa,MAAM;AACzE,uBAAe,QAAQ;AAAA,MACzB;AAEA,UAAI,YAAY,UAAU,UAAU;AAClC,cAAM,WAAW,aAAa,UAAU,cAAc,aAAa,MAAM;AACzE,uBAAe,QAAQ;AAAA,MACzB;AAEA,UAAI,YAAY,UAAU,MAAM;AAC9B,uBAAe,aAAa,EAAE;AAAA,MAChC;AAEA,UAAI,YAAY,UAAU,KAAK;AAC7B,uBAAe,aAAa,aAAa,SAAS,EAAE;AAAA,MACtD;AAAA,IACF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-statements */\n/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport type React from 'react';\nimport { useCallback, useMemo, useLayoutEffect, useContext } from 'react';\nimport { CHEVRON_BACK_DS_ID, FOOTER_MENU_CLOSE_DS_ID } from '../exported-related/constants';\nimport type { GenericItemItemProps } from '../index.d';\nimport LeftNavContext from '../LeftNavigationContext';\n\nconst KEY_CODES = {\n TAB: 9,\n ENTER: 13,\n SPACE: 32,\n LEFT_ARROW: 37,\n UP_ARROW: 38,\n RIGHT_ARROW: 39,\n DOWN_ARROW: 40,\n END: 35,\n HOME: 36,\n};\n\nconst nextIndex = (index: number, length: number) => (index + 1) % length;\nconst prevIndex = (index: number, length: number) => (index - 1 + length) % length;\n\ntype useKeyboardNavigationProps = {\n item: GenericItemItemProps;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onClick: (e: any) => void;\n};\n\nexport const useKeyboardNavigation = ({ item, onClick }: useKeyboardNavigationProps): React.KeyboardEventHandler => {\n const {\n dsId,\n itemOpts: { selectable, openable, closable },\n } = item;\n\n const { visibleItems, visibleItemsRefs } = useContext(LeftNavContext);\n\n const currentIndex = useMemo(\n () => visibleItems.findIndex((visibleItemDsId) => visibleItemDsId === dsId),\n [dsId, visibleItems],\n );\n\n const { setFocusedItem, focusedItem, setSelectedItem } = useContext(LeftNavContext);\n\n const focusAndSelect = useCallback(\n (nextDsId: string) => {\n setFocusedItem(nextDsId);\n setSelectedItem(nextDsId);\n },\n [setFocusedItem, setSelectedItem],\n );\n\n useLayoutEffect(() => {\n if (dsId === focusedItem) visibleItemsRefs.current[dsId]?.current?.focus();\n }, [dsId, focusedItem, visibleItemsRefs]);\n\n const onKeyDown: React.KeyboardEventHandler = useCallback(\n (e) => {\n const { keyCode } = e;\n\n // Prevent default behaviour when not tab\n if (keyCode !== KEY_CODES.TAB) {\n e.preventDefault();\n }\n\n if (keyCode === KEY_CODES.ENTER || keyCode === KEY_CODES.SPACE) {\n if (selectable) {\n onClick(e);\n focusAndSelect(dsId);\n } else if (focusedItem === CHEVRON_BACK_DS_ID) {\n onClick(e);\n focusAndSelect(dsId);\n } else if (focusedItem === FOOTER_MENU_CLOSE_DS_ID) {\n onClick(e);\n setFocusedItem(dsId);\n }\n }\n\n if (openable && keyCode === KEY_CODES.RIGHT_ARROW) {\n onClick(e);\n }\n\n if (closable && keyCode === KEY_CODES.LEFT_ARROW) {\n onClick(e);\n setFocusedItem(dsId);\n }\n\n if (keyCode === KEY_CODES.DOWN_ARROW) {\n const nextDsId = visibleItems[nextIndex(currentIndex, visibleItems.length)];\n setFocusedItem(nextDsId);\n }\n\n if (keyCode === KEY_CODES.UP_ARROW) {\n const prevDsId = visibleItems[prevIndex(currentIndex, visibleItems.length)];\n setFocusedItem(prevDsId);\n }\n\n if (keyCode === KEY_CODES.HOME) {\n setFocusedItem(visibleItems[0]);\n }\n\n if (keyCode === KEY_CODES.END) {\n setFocusedItem(visibleItems[visibleItems.length - 1]);\n }\n },\n [\n openable,\n closable,\n selectable,\n focusedItem,\n onClick,\n focusAndSelect,\n dsId,\n setFocusedItem,\n visibleItems,\n currentIndex,\n ],\n );\n\n return onKeyDown;\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACIvB,SAAS,aAAa,SAAS,iBAAiB,kBAAkB;AAClE,SAAS,oBAAoB,+BAA+B;AAE5D,OAAO,oBAAoB;AAE3B,MAAM,YAAY;AAAA,EAChB,KAAK;AAAA,EACL,OAAO;AAAA,EACP,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,KAAK;AAAA,EACL,MAAM;AACR;AAEA,MAAM,YAAY,CAAC,OAAe,YAAoB,QAAQ,KAAK;AACnE,MAAM,YAAY,CAAC,OAAe,YAAoB,QAAQ,IAAI,UAAU;AAQrE,MAAM,wBAAwB,CAAC,EAAE,MAAM,QAAQ,MAA8D;AAClH,QAAM;AAAA,IACJ;AAAA,IACA,UAAU,EAAE,YAAY,UAAU,SAAS;AAAA,EAC7C,IAAI;AAEJ,QAAM,EAAE,cA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a,MAAM;AACzE,uBAAe,QAAQ;AAAA,MACzB;AAEA,UAAI,YAAY,UAAU,MAAM;AAC9B,uBAAe,aAAa,EAAE;AAAA,MAChC;AAEA,UAAI,YAAY,UAAU,KAAK;AAC7B,uBAAe,aAAa,aAAa,SAAS,EAAE;AAAA,MACtD;AAAA,IACF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/hooks/useOpenableOnClickHandler.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useCallback, useContext } from 'react';\nimport LeftNavigationContext from '../LeftNavigationContext';\n\ntype useOpenableOnClickHandlerProps = {\n id: string;\n onExpand: React.MouseEventHandler & React.KeyboardEventHandler;\n onOpen: React.MouseEventHandler & React.KeyboardEventHandler;\n onClose: React.MouseEventHandler & React.KeyboardEventHandler;\n opened: boolean;\n};\n\nexport const useOpenableOnClickHandler = ({\n id,\n opened,\n onExpand,\n onOpen,\n onClose,\n}: useOpenableOnClickHandlerProps): ((\n e: React.MouseEvent<HTMLElement>,\n) => void) => {\n const {\n leftNavProps: { expanded },\n setSelectedItem,\n } = useContext(LeftNavigationContext);\n\n const handleOnExpand = useCallback(\n (e) => {\n onExpand(e);\n setSelectedItem(id);\n },\n [id, onExpand, setSelectedItem],\n );\n\n const handleOnOpen = useCallback(\n (e) => {\n onOpen(e);\n setSelectedItem(id);\n },\n [id, onOpen, setSelectedItem],\n );\n\n const handleOnClose = useCallback(\n (e) => {\n onClose(e);\n setSelectedItem(id);\n },\n [id, onClose, setSelectedItem],\n );\n\n const handleOnClick = useCallback(\n (e) => {\n if (!expanded) handleOnExpand(e);\n else if (!opened) handleOnOpen(e);\n else handleOnClose(e);\n },\n [expanded, opened, handleOnExpand, handleOnOpen, handleOnClose],\n );\n\n return handleOnClick;\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,aAAa,kBAAkB;AACxC,OAAO,2BAA2B;AAU3B,MAAM,4BAA4B,CAAC;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAEc;AACZ,QAAM;AAAA,IACJ,cAAc,EAAE,SAAS;AAAA,IACzB;AAAA,EACF,IAAI,WAAW,qBAAqB;AAEpC,QAAM,iBAAiB;AAAA,IACrB,CAAC,MAAM;AACL,eAAS,CAAC;AACV,sBAAgB,EAAE;AAAA,IACpB;AAAA,IACA,CAAC,IAAI,UAAU,eAAe;AAAA,EAChC;AAEA,QAAM,eAAe;AAAA,IACnB,CAAC,MAAM;AACL,aAAO,CAAC;AACR,sBAAgB,EAAE;AAAA,IACpB;AAAA,IACA,CAAC,IAAI,QAAQ,eAAe;AAAA,EAC9B;AAEA,QAAM,gBAAgB;AAAA,IACpB,CAAC,MAAM;AACL,cAAQ,CAAC;AACT,sBAAgB,EAAE;AAAA,IACpB;AAAA,IACA,CAAC,IAAI,SAAS,eAAe;AAAA,EAC/B;AAEA,QAAM,gBAAgB;AAAA,IACpB,CAAC,MAAM;AACL,UAAI,CAAC;AAAU,uBAAe,CAAC;AAAA,eACtB,CAAC;AAAQ,qBAAa,CAAC;AAAA;AAC3B,sBAAc,CAAC;AAAA,IACtB;AAAA,IACA,CAAC,UAAU,QAAQ,gBAAgB,cAAc,aAAa;AAAA,EAChE;AAEA,SAAO;AACT;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useCallback, useContext } from 'react';\nimport LeftNavigationContext from '../LeftNavigationContext';\n\ntype useOpenableOnClickHandlerProps = {\n id: string;\n onExpand: React.MouseEventHandler & React.KeyboardEventHandler;\n onOpen: React.MouseEventHandler & React.KeyboardEventHandler;\n onClose: React.MouseEventHandler & React.KeyboardEventHandler;\n opened: boolean;\n};\n\nexport const useOpenableOnClickHandler = ({\n id,\n opened,\n onExpand,\n onOpen,\n onClose,\n}: useOpenableOnClickHandlerProps): ((e: React.MouseEvent<HTMLElement>) => void) => {\n const {\n leftNavProps: { expanded },\n setSelectedItem,\n } = useContext(LeftNavigationContext);\n\n const handleOnExpand = useCallback(\n (e) => {\n onExpand(e);\n setSelectedItem(id);\n },\n [id, onExpand, setSelectedItem],\n );\n\n const handleOnOpen = useCallback(\n (e) => {\n onOpen(e);\n setSelectedItem(id);\n },\n [id, onOpen, setSelectedItem],\n );\n\n const handleOnClose = useCallback(\n (e) => {\n onClose(e);\n setSelectedItem(id);\n },\n [id, onClose, setSelectedItem],\n );\n\n const handleOnClick = useCallback(\n (e) => {\n if (!expanded) handleOnExpand(e);\n else if (!opened) handleOnOpen(e);\n else handleOnClose(e);\n },\n [expanded, opened, handleOnExpand, handleOnOpen, handleOnClose],\n );\n\n return handleOnClick;\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,aAAa,kBAAkB;AACxC,OAAO,2BAA2B;AAU3B,MAAM,4BAA4B,CAAC;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAoF;AAClF,QAAM;AAAA,IACJ,cAAc,EAAE,SAAS;AAAA,IACzB;AAAA,EACF,IAAI,WAAW,qBAAqB;AAEpC,QAAM,iBAAiB;AAAA,IACrB,CAAC,MAAM;AACL,eAAS,CAAC;AACV,sBAAgB,EAAE;AAAA,IACpB;AAAA,IACA,CAAC,IAAI,UAAU,eAAe;AAAA,EAChC;AAEA,QAAM,eAAe;AAAA,IACnB,CAAC,MAAM;AACL,aAAO,CAAC;AACR,sBAAgB,EAAE;AAAA,IACpB;AAAA,IACA,CAAC,IAAI,QAAQ,eAAe;AAAA,EAC9B;AAEA,QAAM,gBAAgB;AAAA,IACpB,CAAC,MAAM;AACL,cAAQ,CAAC;AACT,sBAAgB,EAAE;AAAA,IACpB;AAAA,IACA,CAAC,IAAI,SAAS,eAAe;AAAA,EAC/B;AAEA,QAAM,gBAAgB;AAAA,IACpB,CAAC,MAAM;AACL,UAAI,CAAC;AAAU,uBAAe,CAAC;AAAA,eACtB,CAAC;AAAQ,qBAAa,CAAC;AAAA;AAC3B,sBAAc,CAAC;AAAA,IACtB;AAAA,IACA,CAAC,UAAU,QAAQ,gBAAgB,cAAc,aAAa;AAAA,EAChE;AAEA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/hooks/useSelectFirstBodyItem.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-params */\nimport React, { useEffect } from 'react';\nimport { GenericItemItemProps } from '../index.d';\nimport { ITEM_TYPES } from '../exported-related/constants';\n\nconst { LEFT_NAV_ITEM_SEPARATOR, LEFT_NAV_ITEM_SECTION } = ITEM_TYPES;\n\nconst isSelectableOutOfTheBox = (elem: GenericItemItemProps) =>\n typeof elem.type === 'string' && elem.type !== LEFT_NAV_ITEM_SEPARATOR && elem.type !== LEFT_NAV_ITEM_SECTION;\nconst isSelectableCustom = (elem: GenericItemItemProps) => elem.itemOpts.selectable;\n\nconst isItemInsideTheTree = (item: GenericItemItemProps, itemID: string | null): boolean =>\n item.dsId === itemID || !!item?.itemOpts?.items?.some((it) => isItemInsideTheTree(it, itemID));\n\nexport const useSelectFirstBodyItem = (\n items: GenericItemItemProps[],\n openedItem: string | null,\n selectedItem: string | null,\n setSelectedItem: React.Dispatch<React.SetStateAction<string | null>>,\n disableDefaultSelection: boolean | undefined,\n): void => {\n useEffect(() => {\n if (!disableDefaultSelection && items && items.length && openedItem) {\n const index = items.findIndex((elem) => isSelectableOutOfTheBox(elem) || isSelectableCustom(elem));\n const isItemInside = items.some((it) => isItemInsideTheTree(it, selectedItem));\n if (isItemInside) setSelectedItem(selectedItem);\n else if (index !== -1) setSelectedItem(items[index].dsId ?? '');\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [openedItem, setSelectedItem, disableDefaultSelection]);\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAgB,iBAAiB;AAEjC,SAAS,kBAAkB;AAE3B,MAAM,EAAE,yBAAyB,sBAAsB,IAAI;AAE3D,MAAM,0BAA0B,CAAC,SAC/B,OAAO,KAAK,SAAS,YAAY,KAAK,SAAS,2BAA2B,KAAK,SAAS;AAC1F,MAAM,qBAAqB,CAAC,SAA+B,KAAK,SAAS;AAEzE,MAAM,sBAAsB,CAAC,MAA4B,WACvD,KAAK,SAAS,UAAU,CAAC,CAAC,MAAM,UAAU,OAAO,KAAK,CAAC,OAAO,oBAAoB,IAAI,MAAM,CAAC;AAExF,MAAM,yBAAyB,CACpC,OACA,YACA,cACA,iBACA,4BACS;AACT,YAAU,MAAM;AACd,QAAI,CAAC,2BAA2B,SAAS,MAAM,UAAU,YAAY;AACnE,YAAM,QAAQ,MAAM,UAAU,CAAC,SAAS,wBAAwB,IAAI,KAAK,mBAAmB,IAAI,CAAC;AACjG,YAAM,eAAe,MAAM,KAAK,CAAC,OAAO,oBAAoB,IAAI,YAAY,CAAC;AAC7E,UAAI;AAAc,wBAAgB,YAAY;AAAA,eACrC,UAAU;AAAI,wBAAgB,MAAM,OAAO,QAAQ,EAAE;AAAA,IAChE;AAAA,EAEF,GAAG,CAAC,YAAY,iBAAiB,uBAAuB,CAAC;AAC3D;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-params */\nimport type React from 'react';\nimport { useEffect } from 'react';\nimport type { GenericItemItemProps } from '../index.d';\nimport { ITEM_TYPES } from '../exported-related/constants';\n\nconst { LEFT_NAV_ITEM_SEPARATOR, LEFT_NAV_ITEM_SECTION } = ITEM_TYPES;\n\nconst isSelectableOutOfTheBox = (elem: GenericItemItemProps) =>\n typeof elem.type === 'string' && elem.type !== LEFT_NAV_ITEM_SEPARATOR && elem.type !== LEFT_NAV_ITEM_SECTION;\nconst isSelectableCustom = (elem: GenericItemItemProps) => elem.itemOpts.selectable;\n\nconst isItemInsideTheTree = (item: GenericItemItemProps, itemID: string | null): boolean =>\n item.dsId === itemID || !!item?.itemOpts?.items?.some((it) => isItemInsideTheTree(it, itemID));\n\nexport const useSelectFirstBodyItem = (\n items: GenericItemItemProps[],\n openedItem: string | null,\n selectedItem: string | null,\n setSelectedItem: React.Dispatch<React.SetStateAction<string | null>>,\n disableDefaultSelection: boolean | undefined,\n): void => {\n useEffect(() => {\n if (!disableDefaultSelection && items && items.length && openedItem) {\n const index = items.findIndex((elem) => isSelectableOutOfTheBox(elem) || isSelectableCustom(elem));\n const isItemInside = items.some((it) => isItemInsideTheTree(it, selectedItem));\n if (isItemInside) setSelectedItem(selectedItem);\n else if (index !== -1) setSelectedItem(items[index].dsId ?? '');\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [openedItem, setSelectedItem, disableDefaultSelection]);\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,iBAAiB;AAE1B,SAAS,kBAAkB;AAE3B,MAAM,EAAE,yBAAyB,sBAAsB,IAAI;AAE3D,MAAM,0BAA0B,CAAC,SAC/B,OAAO,KAAK,SAAS,YAAY,KAAK,SAAS,2BAA2B,KAAK,SAAS;AAC1F,MAAM,qBAAqB,CAAC,SAA+B,KAAK,SAAS;AAEzE,MAAM,sBAAsB,CAAC,MAA4B,WACvD,KAAK,SAAS,UAAU,CAAC,CAAC,MAAM,UAAU,OAAO,KAAK,CAAC,OAAO,oBAAoB,IAAI,MAAM,CAAC;AAExF,MAAM,yBAAyB,CACpC,OACA,YACA,cACA,iBACA,4BACS;AACT,YAAU,MAAM;AACd,QAAI,CAAC,2BAA2B,SAAS,MAAM,UAAU,YAAY;AACnE,YAAM,QAAQ,MAAM,UAAU,CAAC,SAAS,wBAAwB,IAAI,KAAK,mBAAmB,IAAI,CAAC;AACjG,YAAM,eAAe,MAAM,KAAK,CAAC,OAAO,oBAAoB,IAAI,YAAY,CAAC;AAC7E,UAAI;AAAc,wBAAgB,YAAY;AAAA,eACrC,UAAU;AAAI,wBAAgB,MAAM,OAAO,QAAQ,EAAE;AAAA,IAChE;AAAA,EAEF,GAAG,CAAC,YAAY,iBAAiB,uBAAuB,CAAC;AAC3D;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/ItemHeader/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React, { useCallback } from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { Theme } from '@elliemae/ds-system';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport {\n StyledItemLabel,\n StyledChevronLeft,\n StyledBottomContainer,\n StyledLeftContainer,\n StyledRightContainer,\n} from '../styled';\nimport { CHEVRON_BACK_DS_ID } from '../../exported-related/constants';\n\nconst notOpenedShadowStyle = (isSelected: boolean) => (theme: Theme) =>\n `\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : 'transparent'};\n\n :hover {\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : theme.colors.brand[300]};\n }\n\n :active {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};\n }\n`;\n\nexport const ItemHeader = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: { label, RightComponent, BottomComponent, labelDataTestId, labelOverflow: itemLabelOverflow },\n CollapsedComponent = () => null,\n },\n ctx,\n ctx: {\n leftNavProps: { openedItem, labelOverflow: leftNavLabelOverflow, onItemClick },\n expandedForAnimation,\n setFocusedItem,\n selectedItem,\n selectedParent,\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const opened = openedItem === dsId;\n\n const ariaLabel = item.itemOpts.ariaLabel ?? (typeof label === 'string' ? label : 'menuitem');\n\n const isSelected = selectedItem === dsId || selectedParent === dsId;\n\n const shadowStyle = useCallback(\n (opened_: boolean) => (theme: Theme) =>\n !opened_ ? notOpenedShadowStyle(isSelected)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`,\n [isSelected],\n );\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaLabel,\n ariaExpanded: opened,\n ...item.itemOpts,\n openable: expandedForAnimation && !opened,\n closable: expandedForAnimation && opened,\n selectable: !opened,\n },\n }}\n hasBorderBottom\n borderBottomMr={opened ? '12px' : '0px'}\n shadowStyle={shadowStyle}\n >\n <StyledLeftContainer\n cols={opened ? ['auto', 'auto'] : ['38px']}\n gutter=\"1px\"\n pl={opened ? 'xxs' : 0}\n justifyItems=\"center\"\n data-testid=\"leftnav-leftcomponent\"\n >\n {opened && (\n <StyledChevronLeft\n size=\"m\"\n color={['brand-primary', 800]}\n onClick={(e: React.MouseEvent<HTMLElement>) => {\n onItemClick(item, e);\n }}\n data-testid=\"leftnav-leftcomponent-chevron\"\n tabIndex={0}\n onFocus={(e: React.FocusEvent) => {\n e.stopPropagation();\n setFocusedItem(CHEVRON_BACK_DS_ID);\n }}\n role=\"button\"\n aria-label={`Close ${ariaLabel}`}\n />\n )}\n {CollapsedComponent && <CollapsedComponent item={item} ctx={ctx} />}\n </StyledLeftContainer>\n <StyledItemLabel\n ml={opened ? 'xxs' : '1px'}\n mt=\"xxxs\"\n mb=\"15px\"\n data-testid={labelDataTestId || 'leftnav-itemlabel'}\n labelOverflow={labelOverflow}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledItemLabel>\n <StyledRightContainer\n pl=\"xs\"\n pr={opened ? 'xxs2' : 'xxs'}\n onFocus={(e) => {\n setFocusedItem(null);\n e.stopPropagation();\n }}\n onKeyDown={(e) => e.stopPropagation()}\n data-testid=\"leftnav-right-component\"\n >\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n {BottomComponent && (\n <StyledBottomContainer\n pb=\"xxxs\"\n pl=\"xxs\"\n pr=\"xxs\"\n onFocus={(e) => {\n setFocusedItem(null);\n e.stopPropagation();\n }}\n onKeyDown={(e) => e.stopPropagation()}\n >\n <BottomComponent ctx={ctx} item={item} />\n </StyledBottomContainer>\n )}\n </ItemRenderer>\n );\n};\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React, { useCallback } from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport type { Theme } from '@elliemae/ds-system';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport {\n StyledItemLabel,\n StyledChevronLeft,\n StyledBottomContainer,\n StyledLeftContainer,\n StyledRightContainer,\n} from '../styled';\nimport { CHEVRON_BACK_DS_ID } from '../../exported-related/constants';\n\nconst notOpenedShadowStyle = (isSelected: boolean) => (theme: Theme) =>\n `\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : 'transparent'};\n\n :hover {\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : theme.colors.brand[300]};\n }\n\n :active {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};\n }\n`;\n\nexport const ItemHeader = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: { label, RightComponent, BottomComponent, labelDataTestId, labelOverflow: itemLabelOverflow },\n CollapsedComponent = () => null,\n },\n ctx,\n ctx: {\n leftNavProps: { openedItem, labelOverflow: leftNavLabelOverflow, onItemClick },\n expandedForAnimation,\n setFocusedItem,\n selectedItem,\n selectedParent,\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const opened = openedItem === dsId;\n\n const ariaLabel = item.itemOpts.ariaLabel ?? (typeof label === 'string' ? label : 'menuitem');\n\n const isSelected = selectedItem === dsId || selectedParent === dsId;\n\n const shadowStyle = useCallback(\n (opened_: boolean) => (theme: Theme) =>\n !opened_ ? notOpenedShadowStyle(isSelected)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`,\n [isSelected],\n );\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaLabel,\n ariaExpanded: opened,\n ...item.itemOpts,\n openable: expandedForAnimation && !opened,\n closable: expandedForAnimation && opened,\n selectable: !opened,\n },\n }}\n hasBorderBottom\n borderBottomMr={opened ? '12px' : '0px'}\n shadowStyle={shadowStyle}\n >\n <StyledLeftContainer\n cols={opened ? ['auto', 'auto'] : ['38px']}\n gutter=\"1px\"\n pl={opened ? 'xxs' : 0}\n justifyItems=\"center\"\n data-testid=\"leftnav-leftcomponent\"\n >\n {opened && (\n <StyledChevronLeft\n size=\"m\"\n color={['brand-primary', 800]}\n onClick={(e: React.MouseEvent<HTMLElement>) => {\n onItemClick(item, e);\n }}\n data-testid=\"leftnav-leftcomponent-chevron\"\n tabIndex={0}\n onFocus={(e: React.FocusEvent) => {\n e.stopPropagation();\n setFocusedItem(CHEVRON_BACK_DS_ID);\n }}\n role=\"button\"\n aria-label={`Close ${ariaLabel}`}\n />\n )}\n {CollapsedComponent && <CollapsedComponent item={item} ctx={ctx} />}\n </StyledLeftContainer>\n <StyledItemLabel\n ml={opened ? 'xxs' : '1px'}\n mt=\"xxxs\"\n mb=\"15px\"\n data-testid={labelDataTestId || 'leftnav-itemlabel'}\n labelOverflow={labelOverflow}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledItemLabel>\n <StyledRightContainer\n pl=\"xs\"\n pr={opened ? 'xxs2' : 'xxs'}\n onFocus={(e) => {\n setFocusedItem(null);\n e.stopPropagation();\n }}\n onKeyDown={(e) => e.stopPropagation()}\n data-testid=\"leftnav-right-component\"\n >\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n {BottomComponent && (\n <StyledBottomContainer\n pb=\"xxxs\"\n pl=\"xxs\"\n pr=\"xxs\"\n onFocus={(e) => {\n setFocusedItem(null);\n e.stopPropagation();\n }}\n onKeyDown={(e) => e.stopPropagation()}\n >\n <BottomComponent ctx={ctx} item={item} />\n </StyledBottomContainer>\n )}\n </ItemRenderer>\n );\n};\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;AC8EjB,SAQI,KARJ;AA5EN,SAAgB,mBAAmB;AACnC,SAAS,kCAAkC;AAE3C,SAAS,oBAAoB;AAE7B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,0BAA0B;AAEnC,MAAM,uBAAuB,CAAC,eAAwB,CAAC,UACrD;AAAA,gCAC8B,aAAa,MAAM,OAAO,MAAM,OAAO;AAAA;AAAA;AAAA,kCAGrC,aAAa,MAAM,OAAO,MAAM,OAAO,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA,kCAI1D,MAAM,OAAO,MAAM;AAAA;AAAA;AAI9C,MAAM,aAAa,CAAC,UAAuC;AAChE,QAAM;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ;AAAA,MACA,UAAU,EAAE,OAAO,gBAAgB,iBAAiB,iBAAiB,eAAe,kBAAkB;AAAA,MACtG,qBAAqB,MAAM;AAAA,IAC7B;AAAA,IACA;AAAA,IACA,KAAK;AAAA,MACH,cAAc,EAAE,YAAY,eAAe,sBAAsB,YAAY;AAAA,MAC7E;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF,IAAI;AAEJ,QAAM,gBAAgB,qBAAqB;AAE3C,QAAM,SAAS,eAAe;AAE9B,QAAM,YAAY,KAAK,SAAS,cAAc,OAAO,UA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AAAA,UAAO,WAAU;AAAA,SAAe,IAAK;AAAA,OAC1G;AAAA,MACA,oBAAC;AAAA,QACC,IAAG;AAAA,QACH,IAAI,SAAS,SAAS;AAAA,QACtB,SAAS,CAAC,MAAM;AACd,yBAAe,IAAI;AACnB,YAAE,gBAAgB;AAAA,QACpB;AAAA,QACA,WAAW,CAAC,MAAM,EAAE,gBAAgB;AAAA,QACpC,eAAY;AAAA,QAEX,4BAAkB,oBAAC;AAAA,UAAe;AAAA,UAAU;AAAA,SAAY;AAAA,OAC3D;AAAA,MACC,mBACC,oBAAC;AAAA,QACC,IAAG;AAAA,QACH,IAAG;AAAA,QACH,IAAG;AAAA,QACH,SAAS,CAAC,MAAM;AACd,yBAAe,IAAI;AACnB,YAAE,gBAAgB;AAAA,QACpB;AAAA,QACA,WAAW,CAAC,MAAM,EAAE,gBAAgB;AAAA,QAEpC,8BAAC;AAAA,UAAgB;AAAA,UAAU;AAAA,SAAY;AAAA,OACzC;AAAA;AAAA,GAEJ;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/ItemLink/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\nimport React, { useCallback } from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { Theme } from '@elliemae/ds-system';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport { StyledItemLabel, StyledLeftContainer, StyledRightContainer } from '../styled';\n\nconst notOpenedShadowStyle = (isSelected: boolean) => (theme: Theme) =>\n `\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : 'transparent'};\n\n :hover {\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : theme.colors.brand[300]};\n }\n\n :active {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};\n }\n`;\n\nexport const ItemLink = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: { label, RightComponent, labelDataTestId, labelOverflow: itemLabelOverflow },\n CollapsedComponent = () => null,\n },\n ctx,\n ctx: {\n leftNavProps: { labelOverflow: leftNavLabelOverflow },\n selectedItem,\n selectedParent,\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const isSelected = selectedItem === dsId || selectedParent === dsId;\n\n const shadowStyle = useCallback(\n (opened_: boolean) => (theme: Theme) =>\n !opened_ ? notOpenedShadowStyle(isSelected)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`,\n [isSelected],\n );\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaLabel: typeof label === 'string' ? label : '',\n ariaRole: 'link',\n ...item.itemOpts,\n selectable: true,\n },\n }}\n shadowStyle={shadowStyle}\n >\n <StyledLeftContainer cols={['38px']} gutter=\"1px\" justifyItems=\"center\" data-testid=\"leftnav-leftcomponent\">\n {CollapsedComponent && <CollapsedComponent item={item} ctx={ctx} />}\n </StyledLeftContainer>\n <StyledItemLabel\n ml=\"1px\"\n mt=\"xxxs\"\n mb=\"15px\"\n data-testid={labelDataTestId || 'leftnav-itemlabel'}\n labelOverflow={labelOverflow}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledItemLabel>\n <StyledRightContainer mt=\"xxxs\" pr=\"xxs2\" data-testid=\"leftnav-right-component\">\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n </ItemRenderer>\n );\n};\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\nimport React, { useCallback } from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport type { Theme } from '@elliemae/ds-system';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport { StyledItemLabel, StyledLeftContainer, StyledRightContainer } from '../styled';\n\nconst notOpenedShadowStyle = (isSelected: boolean) => (theme: Theme) =>\n `\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : 'transparent'};\n\n :hover {\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : theme.colors.brand[300]};\n }\n\n :active {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};\n }\n`;\n\nexport const ItemLink = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: { label, RightComponent, labelDataTestId, labelOverflow: itemLabelOverflow },\n CollapsedComponent = () => null,\n },\n ctx,\n ctx: {\n leftNavProps: { labelOverflow: leftNavLabelOverflow },\n selectedItem,\n selectedParent,\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const isSelected = selectedItem === dsId || selectedParent === dsId;\n\n const shadowStyle = useCallback(\n (opened_: boolean) => (theme: Theme) =>\n !opened_ ? notOpenedShadowStyle(isSelected)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`,\n [isSelected],\n );\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaLabel: typeof label === 'string' ? label : '',\n ariaRole: 'link',\n ...item.itemOpts,\n selectable: true,\n },\n }}\n shadowStyle={shadowStyle}\n >\n <StyledLeftContainer cols={['38px']} gutter=\"1px\" justifyItems=\"center\" data-testid=\"leftnav-leftcomponent\">\n {CollapsedComponent && <CollapsedComponent item={item} ctx={ctx} />}\n </StyledLeftContainer>\n <StyledItemLabel\n ml=\"1px\"\n mt=\"xxxs\"\n mb=\"15px\"\n data-testid={labelDataTestId || 'leftnav-itemlabel'}\n labelOverflow={labelOverflow}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledItemLabel>\n <StyledRightContainer mt=\"xxxs\" pr=\"xxs2\" data-testid=\"leftnav-right-component\">\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n </ItemRenderer>\n );\n};\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACgDnB,SAa2B,KAb3B;AA/CJ,SAAgB,mBAAmB;AACnC,SAAS,kCAAkC;AAE3C,SAAS,oBAAoB;AAE7B,SAAS,iBAAiB,qBAAqB,4BAA4B;AAE3E,MAAM,uBAAuB,CAAC,eAAwB,CAAC,UACrD;AAAA,gCAC8B,aAAa,MAAM,OAAO,MAAM,OAAO;AAAA;AAAA;AAAA,kCAGrC,aAAa,MAAM,OAAO,MAAM,OAAO,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA,kCAI1D,MAAM,OAAO,MAAM;AAAA;AAAA;AAI9C,MAAM,WAAW,CAAC,UAAuC;AAC9D,QAAM;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ;AAAA,MACA,UAAU,EAAE,OAAO,gBAAgB,iBAAiB,eAAe,kBAAkB;AAAA,MACrF,qBAAqB,MAAM;AAAA,IAC7B;AAAA,IACA;AAAA,IACA,KAAK;AAAA,MACH,cAAc,EAAE,eAAe,qBAAqB;AAAA,MACpD;AAAA,MACA;AAAA,IACF;AAAA,EACF,IAAI;AAEJ,QAAM,gBAAgB,qBAAqB;AAE3C,QAAM,aAAa,iBAAiB,QAAQ,mBAAmB;AAE/D,QAAM,cAAc;AAAA,IAClB,CAAC,YAAqB,CAAC,UACrB,CAAC,UAAU,qBAAqB,UAAU,EAAE,KAAK,IAAI;AAAA,IACvD,CAAC,UAAU;AAAA,EACb;AAEA,SACE,qBAAC;AAAA,IACC,MAAM;AAAA,MACJ,GAAG;AAAA,MACH,UAAU;AAAA,QACR,WAAW,OAAO,UAAU,WAAW,QAAQ;AAAA,QAC/C,UAAU;AAAA,QACV,GAAG,KAAK;AAAA,QACR,YAAY;AAAA,MACd;AAAA,IACF;AAAA,IACA;AAAA,IAEA;AAAA,0BAAC;AAAA,QAAoB,MAAM,CAAC,MAAM;AAAA,QAAG,QAAO;AAAA,QAAM,cAAa;AAAA,QAAS,eAAY;AAAA,QACjF,gCAAsB,oBAAC;AAAA,UAAmB;AAAA,UAAY;AAAA,SAAU;AAAA,OACnE;AAAA,MACA,oBAAC;AAAA,QACC,IAAG;AAAA,QACH,IAAG;AAAA,QACH,IAAG;AAAA,QACH,eAAa,mBAAmB;AAAA,QAChC;AAAA,QAEC,4BAAkB,aAAa,oBAAC;AAAA,UAA2B,OAAO;AAAA,UAAO,WAAU;AAAA,SAAe,IAAK;AAAA,OAC1G;AAAA,MACA,oBAAC;AAAA,QAAqB,IAAG;AAAA,QAAO,IAAG;AAAA,QAAO,eAAY;AAAA,QACnD,4BAAkB,oBAAC;AAAA,UAAe;AAAA,UAAU;AAAA,SAAY;AAAA,OAC3D;AAAA;AAAA,GACF;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/ItemSubmenu/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable complexity */\n/* eslint-disable indent */\nimport React, { useCallback } from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { Theme } from '@elliemae/ds-system';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport { CHEVRON_BACK_DS_ID } from '../../exported-related/constants';\nimport {\n StyledLeftContainer,\n StyledChevronLeft,\n StyledItemLabel,\n StyledBottomContainer,\n StyledRightContainer,\n} from '../styled';\n\nconst notOpenedShadowStyle = (isSelected: boolean) => (theme: Theme) =>\n `\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : 'transparent'};\n\n :hover {\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : theme.colors.brand[300]};\n }\n\n :active {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};\n }\n`;\n\nexport const ItemSubmenu = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: { label, RightComponent, BottomComponent, labelDataTestId, labelOverflow: itemLabelOverflow },\n CollapsedComponent = () => null,\n },\n ctx,\n ctx: {\n leftNavProps: { openedItem, labelOverflow: leftNavLabelOverflow, onItemClick },\n expandedForAnimation,\n selectedItem,\n selectedParent,\n setFocusedItem,\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const opened = openedItem === dsId;\n\n const isSelected = selectedItem === dsId;\n\n const shadowStyle = useCallback(\n (opened_: boolean) => (theme: Theme) =>\n !opened_\n ? notOpenedShadowStyle(isSelected || selectedParent === dsId)(theme)\n : `box-shadow: inset 4px 0 0 0 #52A6EC`,\n [dsId, isSelected, selectedParent],\n );\n\n const ariaLabel = item.itemOpts.ariaLabel ?? (typeof label === 'string' ? label : 'menuitem');\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ...item.itemOpts,\n ariaLabel,\n ariaExpanded: opened,\n openable: expandedForAnimation && !opened,\n closable: expandedForAnimation && opened,\n selectable: !opened,\n },\n }}\n shadowStyle={shadowStyle}\n hasBorderBottom={opened}\n borderBottomMr=\"12px\"\n >\n <StyledLeftContainer\n cols={opened ? ['auto', 'auto'] : ['38px']}\n gutter=\"1px\"\n pl={opened ? 'xxs' : 0}\n justifyItems=\"center\"\n data-testid=\"leftnav-leftcomponent\"\n >\n {opened && (\n <StyledChevronLeft\n size=\"m\"\n color={['brand-primary', 800]}\n onClick={(e: React.MouseEvent<HTMLElement>) => {\n onItemClick(item, e);\n }}\n data-testid=\"leftnav-leftcomponent-chevron\"\n tabIndex={0}\n onFocus={(e: React.FocusEvent) => {\n e.stopPropagation();\n setFocusedItem(CHEVRON_BACK_DS_ID);\n }}\n role=\"button\"\n aria-label={`Close ${ariaLabel}`}\n />\n )}\n {CollapsedComponent && <CollapsedComponent item={item} ctx={ctx} />}\n </StyledLeftContainer>\n <StyledItemLabel\n ml={opened ? 'xxs' : '1px'}\n mt=\"xxxs\"\n mb=\"15px\"\n data-testid={labelDataTestId || 'leftnav-itemlabel'}\n labelOverflow={labelOverflow}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledItemLabel>\n <StyledRightContainer\n pl=\"xs\"\n pr={opened ? 'xxs2' : 'xxs'}\n onFocus={(e) => {\n e.stopPropagation();\n setFocusedItem(null);\n }}\n onKeyDown={(e) => e.stopPropagation()}\n onClick={(e) => openedItem === dsId && e.stopPropagation()}\n data-testid=\"leftnav-right-component\"\n >\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n {BottomComponent && (\n <StyledBottomContainer\n style={{ gridColumn: 'span 3' }}\n pb=\"xxxs\"\n pl=\"xxs\"\n pr=\"xxs\"\n onFocus={(e) => {\n e.stopPropagation();\n setFocusedItem(null);\n }}\n onKeyDown={(e) => e.stopPropagation()}\n onClick={(e) => openedItem && e.stopPropagation()}\n >\n <BottomComponent ctx={ctx} item={item} />\n </StyledBottomContainer>\n )}\n </ItemRenderer>\n );\n};\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable complexity */\n/* eslint-disable indent */\nimport React, { useCallback } from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport type { Theme } from '@elliemae/ds-system';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport { CHEVRON_BACK_DS_ID } from '../../exported-related/constants';\nimport {\n StyledLeftContainer,\n StyledChevronLeft,\n StyledItemLabel,\n StyledBottomContainer,\n StyledRightContainer,\n} from '../styled';\n\nconst notOpenedShadowStyle = (isSelected: boolean) => (theme: Theme) =>\n `\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : 'transparent'};\n\n :hover {\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : theme.colors.brand[300]};\n }\n\n :active {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};\n }\n`;\n\nexport const ItemSubmenu = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: { label, RightComponent, BottomComponent, labelDataTestId, labelOverflow: itemLabelOverflow },\n CollapsedComponent = () => null,\n },\n ctx,\n ctx: {\n leftNavProps: { openedItem, labelOverflow: leftNavLabelOverflow, onItemClick },\n expandedForAnimation,\n selectedItem,\n selectedParent,\n setFocusedItem,\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const opened = openedItem === dsId;\n\n const isSelected = selectedItem === dsId;\n\n const shadowStyle = useCallback(\n (opened_: boolean) => (theme: Theme) =>\n !opened_\n ? notOpenedShadowStyle(isSelected || selectedParent === dsId)(theme)\n : `box-shadow: inset 4px 0 0 0 #52A6EC`,\n [dsId, isSelected, selectedParent],\n );\n\n const ariaLabel = item.itemOpts.ariaLabel ?? (typeof label === 'string' ? label : 'menuitem');\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ...item.itemOpts,\n ariaLabel,\n ariaExpanded: opened,\n openable: expandedForAnimation && !opened,\n closable: expandedForAnimation && opened,\n selectable: !opened,\n },\n }}\n shadowStyle={shadowStyle}\n hasBorderBottom={opened}\n borderBottomMr=\"12px\"\n >\n <StyledLeftContainer\n cols={opened ? ['auto', 'auto'] : ['38px']}\n gutter=\"1px\"\n pl={opened ? 'xxs' : 0}\n justifyItems=\"center\"\n data-testid=\"leftnav-leftcomponent\"\n >\n {opened && (\n <StyledChevronLeft\n size=\"m\"\n color={['brand-primary', 800]}\n onClick={(e: React.MouseEvent<HTMLElement>) => {\n onItemClick(item, e);\n }}\n data-testid=\"leftnav-leftcomponent-chevron\"\n tabIndex={0}\n onFocus={(e: React.FocusEvent) => {\n e.stopPropagation();\n setFocusedItem(CHEVRON_BACK_DS_ID);\n }}\n role=\"button\"\n aria-label={`Close ${ariaLabel}`}\n />\n )}\n {CollapsedComponent && <CollapsedComponent item={item} ctx={ctx} />}\n </StyledLeftContainer>\n <StyledItemLabel\n ml={opened ? 'xxs' : '1px'}\n mt=\"xxxs\"\n mb=\"15px\"\n data-testid={labelDataTestId || 'leftnav-itemlabel'}\n labelOverflow={labelOverflow}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledItemLabel>\n <StyledRightContainer\n pl=\"xs\"\n pr={opened ? 'xxs2' : 'xxs'}\n onFocus={(e) => {\n e.stopPropagation();\n setFocusedItem(null);\n }}\n onKeyDown={(e) => e.stopPropagation()}\n onClick={(e) => openedItem === dsId && e.stopPropagation()}\n data-testid=\"leftnav-right-component\"\n >\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n {BottomComponent && (\n <StyledBottomContainer\n style={{ gridColumn: 'span 3' }}\n pb=\"xxxs\"\n pl=\"xxs\"\n pr=\"xxs\"\n onFocus={(e) => {\n e.stopPropagation();\n setFocusedItem(null);\n }}\n onKeyDown={(e) => e.stopPropagation()}\n onClick={(e) => openedItem && e.stopPropagation()}\n >\n <BottomComponent ctx={ctx} item={item} />\n </StyledBottomContainer>\n )}\n </ItemRenderer>\n );\n};\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACiFjB,SAQI,KARJ;AA9EN,SAAgB,mBAAmB;AACnC,SAAS,kCAAkC;AAE3C,SAAS,oBAAoB;AAE7B,SAAS,0BAA0B;AACnC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,MAAM,uBAAuB,CAAC,eAAwB,CAAC,UACrD;AAAA,gCAC8B,aAAa,MAAM,OAAO,MAAM,OAAO;AAAA;AAAA;AAAA,kCAGrC,aAAa,MAAM,OAAO,MAAM,OAAO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;AAAA,UAAU;AAAA,SAAY;AAAA,OACzC;AAAA;AAAA,GAEJ;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/outOfTheBox/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { ComponentProps } from '../index.d';\nimport { ITEM_TYPES } from '../exported-related';\nimport { ItemControlledDrilldown } from './ItemControlledDrilldown';\nimport { ItemUncontrolledDrilldown } from './ItemUncontrolledDrilldown';\nimport { ItemHeader } from './ItemHeader';\nimport { ItemLink } from './ItemLink';\nimport { ItemSection } from './ItemSection';\nimport { ItemSeparator } from './ItemSeparator';\nimport { ItemSubmenu } from './ItemSubmenu';\nimport { ItemTextLabel } from './ItemTextLabel';\nimport { ItemWithDate } from './ItemWithDate';\n\nexport * from './ItemControlledDrilldown';\nexport * from './ItemUncontrolledDrilldown';\nexport * from './ItemHeader';\nexport * from './ItemLink';\nexport * from './ItemSection';\nexport * from './ItemSeparator';\nexport * from './ItemSubmenu';\nexport * from './ItemTextLabel';\nexport * from './ItemWithDate';\n\nexport const outOfTheBoxTypes = Object.values(ITEM_TYPES);\nconst {\n LEFT_NAV_ITEM_CONTROLLED_DRILLDOWN,\n LEFT_NAV_ITEM_UNCONTROLLED_DRILLDOWN,\n LEFT_NAV_ITEM_HEADER,\n LEFT_NAV_ITEM_LINK,\n LEFT_NAV_ITEM_SECTION,\n LEFT_NAV_ITEM_SEPARATOR,\n LEFT_NAV_ITEM_SUBMENU,\n LEFT_NAV_ITEM_TEXT_LABEL,\n LEFT_NAV_ITEM_WITH_DATE,\n} = ITEM_TYPES;\n\nexport const outOfTheBoxComponents: Record<\n string,\n React.ComponentType<ComponentProps>\n> = {\n [LEFT_NAV_ITEM_CONTROLLED_DRILLDOWN]: ItemControlledDrilldown,\n [LEFT_NAV_ITEM_UNCONTROLLED_DRILLDOWN]: ItemUncontrolledDrilldown,\n [LEFT_NAV_ITEM_HEADER]: ItemHeader,\n [LEFT_NAV_ITEM_LINK]: ItemLink,\n [LEFT_NAV_ITEM_SECTION]: ItemSection,\n [LEFT_NAV_ITEM_SEPARATOR]: ItemSeparator,\n [LEFT_NAV_ITEM_SUBMENU]: ItemSubmenu,\n [LEFT_NAV_ITEM_TEXT_LABEL]: ItemTextLabel,\n [LEFT_NAV_ITEM_WITH_DATE]: ItemWithDate,\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,kBAAkB;AAC3B,SAAS,+BAA+B;AACxC,SAAS,iCAAiC;AAC1C,SAAS,kBAAkB;AAC3B,SAAS,gBAAgB;AACzB,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAC9B,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAC9B,SAAS,oBAAoB;AAE7B,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEP,MAAM,mBAAmB,OAAO,OAAO,UAAU;AACxD,MAAM;AAAA,EACJ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,IAAI;AAEG,MAAM,wBAGT;AAAA,EACF,CAAC,qCAAqC;AAAA,EACtC,CAAC,uCAAuC;AAAA,EACxC,CAAC,uBAAuB;AAAA,EACxB,CAAC,qBAAqB;AAAA,EACtB,CAAC,wBAAwB;AAAA,EACzB,CAAC,0BAA0B;AAAA,EAC3B,CAAC,wBAAwB;AAAA,EACzB,CAAC,2BAA2B;AAAA,EAC5B,CAAC,0BAA0B;AAC7B;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type React from 'react';\nimport type { ComponentProps } from '../index.d';\nimport { ITEM_TYPES } from '../exported-related';\nimport { ItemControlledDrilldown } from './ItemControlledDrilldown';\nimport { ItemUncontrolledDrilldown } from './ItemUncontrolledDrilldown';\nimport { ItemHeader } from './ItemHeader';\nimport { ItemLink } from './ItemLink';\nimport { ItemSection } from './ItemSection';\nimport { ItemSeparator } from './ItemSeparator';\nimport { ItemSubmenu } from './ItemSubmenu';\nimport { ItemTextLabel } from './ItemTextLabel';\nimport { ItemWithDate } from './ItemWithDate';\n\nexport * from './ItemControlledDrilldown';\nexport * from './ItemUncontrolledDrilldown';\nexport * from './ItemHeader';\nexport * from './ItemLink';\nexport * from './ItemSection';\nexport * from './ItemSeparator';\nexport * from './ItemSubmenu';\nexport * from './ItemTextLabel';\nexport * from './ItemWithDate';\n\nexport const outOfTheBoxTypes = Object.values(ITEM_TYPES);\nconst {\n LEFT_NAV_ITEM_CONTROLLED_DRILLDOWN,\n LEFT_NAV_ITEM_UNCONTROLLED_DRILLDOWN,\n LEFT_NAV_ITEM_HEADER,\n LEFT_NAV_ITEM_LINK,\n LEFT_NAV_ITEM_SECTION,\n LEFT_NAV_ITEM_SEPARATOR,\n LEFT_NAV_ITEM_SUBMENU,\n LEFT_NAV_ITEM_TEXT_LABEL,\n LEFT_NAV_ITEM_WITH_DATE,\n} = ITEM_TYPES;\n\nexport const outOfTheBoxComponents: Record<string, React.ComponentType<ComponentProps>> = {\n [LEFT_NAV_ITEM_CONTROLLED_DRILLDOWN]: ItemControlledDrilldown,\n [LEFT_NAV_ITEM_UNCONTROLLED_DRILLDOWN]: ItemUncontrolledDrilldown,\n [LEFT_NAV_ITEM_HEADER]: ItemHeader,\n [LEFT_NAV_ITEM_LINK]: ItemLink,\n [LEFT_NAV_ITEM_SECTION]: ItemSection,\n [LEFT_NAV_ITEM_SEPARATOR]: ItemSeparator,\n [LEFT_NAV_ITEM_SUBMENU]: ItemSubmenu,\n [LEFT_NAV_ITEM_TEXT_LABEL]: ItemTextLabel,\n [LEFT_NAV_ITEM_WITH_DATE]: ItemWithDate,\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,kBAAkB;AAC3B,SAAS,+BAA+B;AACxC,SAAS,iCAAiC;AAC1C,SAAS,kBAAkB;AAC3B,SAAS,gBAAgB;AACzB,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAC9B,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAC9B,SAAS,oBAAoB;AAE7B,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEP,MAAM,mBAAmB,OAAO,OAAO,UAAU;AACxD,MAAM;AAAA,EACJ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,IAAI;AAEG,MAAM,wBAA6E;AAAA,EACxF,CAAC,qCAAqC;AAAA,EACtC,CAAC,uCAAuC;AAAA,EACxC,CAAC,uBAAuB;AAAA,EACxB,CAAC,qBAAqB;AAAA,EACtB,CAAC,wBAAwB;AAAA,EACzB,CAAC,0BAA0B;AAAA,EAC3B,CAAC,wBAAwB;AAAA,EACzB,CAAC,2BAA2B;AAAA,EAC5B,CAAC,0BAA0B;AAC7B;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/LeftNavContent/styled.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { Grid } from '@elliemae/ds-grid';\nimport { styled, Theme } from '@elliemae/ds-system';\nimport { DSLeftNavigationName, DSLeftNavigationSlots } from '../../constants';\n\ntype LeftNavProps = {\n expanded: boolean;\n expandedWidth: string;\n};\n\nconst getLeftShadowStyles = ({\n selected,\n selectedParent,\n theme,\n}: {\n selected: boolean;\n selectedParent?: boolean;\n theme: Theme;\n}) => {\n if (!selected && !selectedParent) {\n return `\n box-shadow: inset 4px 0 0 0 transparent;\n :hover {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[300]};\n }\n :active {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};\n }\n `;\n }\n return `box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};`;\n};\n\nexport const StyledLeftNavExpandAnimationWrapper = styled('nav', {\n name: DSLeftNavigationName,\n slot: DSLeftNavigationSlots.ROOT,\n})<LeftNavProps>`\n width: ${(props) => (props.expanded ? props.expandedWidth : '48px')};\n transition: width ${(props) => (props.expanded ? 'ease-out' : 'ease-in')} 350ms;\n box-shadow: -1px 0 0 0 ${(props) => props.theme.colors.neutral[100]};\n border: 1px solid ${(props) => props.theme.colors.neutral[100]};\n overflow: hidden;\n height: 100%;\n position: relative;\n`;\n\nexport const StyledLeftNavAreasContainer = styled(Grid, {\n name: DSLeftNavigationName,\n slot: DSLeftNavigationSlots.AREAS_CONTAINER,\n})<LeftNavProps>`\n width: ${(props) => (props.expanded ? `calc(${props.expandedWidth} - 2px)` : '46px')};\n height: 100%;\n`;\n\nexport const StyledLeftNavHeaderArea = styled('div', {\n name: DSLeftNavigationName,\n slot: DSLeftNavigationSlots.HEADER_AREA,\n})<{ selected: boolean; selectedParent?: boolean }>`\n ${getLeftShadowStyles}\n`;\n\nexport const StyledLeftNavBodyAreasContainer = styled(Grid, {\n name: DSLeftNavigationName,\n slot: DSLeftNavigationSlots.BODY_AREAS_CONTAINER,\n})`\n width: 100%;\n`;\n\nexport const StyledLeftNavBodyHeaderArea = styled('div', {\n name: DSLeftNavigationName,\n slot: DSLeftNavigationSlots.BODY_HEADER_AREA,\n})<{ selected: boolean; selectedParent?: boolean }>`\n width: 100%;\n ${getLeftShadowStyles}\n`;\n\nexport const StyledLeftNavBodyItemsArea = styled('div', {\n name: DSLeftNavigationName,\n slot: DSLeftNavigationSlots.BODY_ITEMS_AREA,\n})<{ selected: boolean }>`\n width: 100%;\n overflow: auto;\n box-shadow: inset 4px 0 0 0 ${(props) => (props.selected ? props.theme.colors.brand[400] : 'transparent')};\n`;\n"],
5
- "mappings": "AAAA,YAA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,CAAC;AAAA;AAAA;AAAA,gCAG+B,CAAC,UAAW,MAAM,WAAW,MAAM,MAAM,OAAO,MAAM,OAAO;AAAA;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { Grid } from '@elliemae/ds-grid';\nimport type { Theme } from '@elliemae/ds-system';\nimport { styled } from '@elliemae/ds-system';\nimport { DSLeftNavigationName, DSLeftNavigationSlots } from '../../constants';\n\ntype LeftNavProps = {\n expanded: boolean;\n expandedWidth: string;\n};\n\nconst getLeftShadowStyles = ({\n selected,\n selectedParent,\n theme,\n}: {\n selected: boolean;\n selectedParent?: boolean;\n theme: Theme;\n}) => {\n if (!selected && !selectedParent) {\n return `\n box-shadow: inset 4px 0 0 0 transparent;\n :hover {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[300]};\n }\n :active {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};\n }\n `;\n }\n return `box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};`;\n};\n\nexport const StyledLeftNavExpandAnimationWrapper = styled('nav', {\n name: DSLeftNavigationName,\n slot: DSLeftNavigationSlots.ROOT,\n})<LeftNavProps>`\n width: ${(props) => (props.expanded ? props.expandedWidth : '48px')};\n transition: width ${(props) => (props.expanded ? 'ease-out' : 'ease-in')} 350ms;\n box-shadow: -1px 0 0 0 ${(props) => props.theme.colors.neutral[100]};\n border: 1px solid ${(props) => props.theme.colors.neutral[100]};\n overflow: hidden;\n height: 100%;\n position: relative;\n`;\n\nexport const StyledLeftNavAreasContainer = styled(Grid, {\n name: DSLeftNavigationName,\n slot: DSLeftNavigationSlots.AREAS_CONTAINER,\n})<LeftNavProps>`\n width: ${(props) => (props.expanded ? `calc(${props.expandedWidth} - 2px)` : '46px')};\n height: 100%;\n`;\n\nexport const StyledLeftNavHeaderArea = styled('div', {\n name: DSLeftNavigationName,\n slot: DSLeftNavigationSlots.HEADER_AREA,\n})<{ selected: boolean; selectedParent?: boolean }>`\n ${getLeftShadowStyles}\n`;\n\nexport const StyledLeftNavBodyAreasContainer = styled(Grid, {\n name: DSLeftNavigationName,\n slot: DSLeftNavigationSlots.BODY_AREAS_CONTAINER,\n})`\n width: 100%;\n`;\n\nexport const StyledLeftNavBodyHeaderArea = styled('div', {\n name: DSLeftNavigationName,\n slot: DSLeftNavigationSlots.BODY_HEADER_AREA,\n})<{ selected: boolean; selectedParent?: boolean }>`\n width: 100%;\n ${getLeftShadowStyles}\n`;\n\nexport const StyledLeftNavBodyItemsArea = styled('div', {\n name: DSLeftNavigationName,\n slot: DSLeftNavigationSlots.BODY_ITEMS_AREA,\n})<{ selected: boolean }>`\n width: 100%;\n overflow: auto;\n box-shadow: inset 4px 0 0 0 ${(props) => (props.selected ? props.theme.colors.brand[400] : 'transparent')};\n`;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,YAAY;AAErB,SAAS,cAAc;AACvB,SAAS,sBAAsB,6BAA6B;AAO5D,MAAM,sBAAsB,CAAC;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AACF,MAIM;AACJ,MAAI,CAAC,YAAY,CAAC,gBAAgB;AAChC,WAAO;AAAA;AAAA;AAAA,sCAG2B,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA,sCAGnB,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA,EAGvD;AACA,SAAO,+BAA+B,MAAM,OAAO,MAAM;AAC3D;AAEO,MAAM,sCAAsC,OAAO,OAAO;AAAA,EAC/D,MAAM;AAAA,EACN,MAAM,sBAAsB;AAC9B,CAAC;AAAA,WACU,CAAC,UAAW,MAAM,WAAW,MAAM,gBAAgB;AAAA,sBACxC,CAAC,UAAW,MAAM,WAAW,aAAa;AAAA,2BACrC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,sBAC3C,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAMrD,MAAM,8BAA8B,OAAO,MAAM;AAAA,EACtD,MAAM;AAAA,EACN,MAAM,sBAAsB;AAC9B,CAAC;AAAA,WACU,CAAC,UAAW,MAAM,WAAW,QAAQ,MAAM,yBAAyB;AAAA;AAAA;AAIxE,MAAM,0BAA0B,OAAO,OAAO;AAAA,EACnD,MAAM;AAAA,EACN,MAAM,sBAAsB;AAC9B,CAAC;AAAA,IACG;AAAA;AAGG,MAAM,kCAAkC,OAAO,MAAM;AAAA,EAC1D,MAAM;AAAA,EACN,MAAM,sBAAsB;AAC9B,CAAC;AAAA;AAAA;AAIM,MAAM,8BAA8B,OAAO,OAAO;AAAA,EACvD,MAAM;AAAA,EACN,MAAM,sBAAsB;AAC9B,CAAC;AAAA;AAAA,IAEG;AAAA;AAGG,MAAM,6BAA6B,OAAO,OAAO;AAAA,EACtD,MAAM;AAAA,EACN,MAAM,sBAAsB;AAC9B,CAAC;AAAA;AAAA;AAAA,gCAG+B,CAAC,UAAW,MAAM,WAAW,MAAM,MAAM,OAAO,MAAM,OAAO;AAAA;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/OutOfTheBoxMapItem.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { outOfTheBoxComponents } from '../outOfTheBox';\nimport { OutOfTheBoxMapItemT } from '../index.d';\nimport { LeftNavContext } from '../LeftNavigationContext';\n\nexport const OutOfTheBoxMapItem: React.ComponentType<OutOfTheBoxMapItemT> = (props) => {\n const {\n item,\n item: { type, Component },\n } = props;\n const ctx = React.useContext(LeftNavContext);\n\n if (typeof type === 'string' && !!outOfTheBoxComponents[type]) {\n const OutOfTheBoxComponent = outOfTheBoxComponents[type];\n return <OutOfTheBoxComponent item={{ itemOpts: {}, ...item }} ctx={ctx} />;\n }\n if (!Component) return null;\n // we expect an error to be threw if Component is not defined and type is not a valid out-of-the-box...\n return <Component item={item} ctx={ctx} />;\n};\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { outOfTheBoxComponents } from '../outOfTheBox';\nimport type { OutOfTheBoxMapItemT } from '../index.d';\nimport { LeftNavContext } from '../LeftNavigationContext';\n\nexport const OutOfTheBoxMapItem: React.ComponentType<OutOfTheBoxMapItemT> = (props) => {\n const {\n item,\n item: { type, Component },\n } = props;\n const ctx = React.useContext(LeftNavContext);\n\n if (typeof type === 'string' && !!outOfTheBoxComponents[type]) {\n const OutOfTheBoxComponent = outOfTheBoxComponents[type];\n return <OutOfTheBoxComponent item={{ itemOpts: {}, ...item }} ctx={ctx} />;\n }\n if (!Component) return null;\n // we expect an error to be threw if Component is not defined and type is not a valid out-of-the-box...\n return <Component item={item} ctx={ctx} />;\n};\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACcZ;AAdX,OAAOA,YAAW;AAClB,SAAS,6BAA6B;AAEtC,SAAS,sBAAsB;AAExB,MAAM,qBAA+D,CAAC,UAAU;AACrF,QAAM;AAAA,IACJ;AAAA,IACA,MAAM,EAAE,MAAM,UAAU;AAAA,EAC1B,IAAI;AACJ,QAAM,MAAMA,OAAM,WAAW,cAAc;AAE3C,MAAI,OAAO,SAAS,YAAY,CAAC,CAAC,sBAAsB,OAAO;AAC7D,UAAM,uBAAuB,sBAAsB;AACnD,WAAO,oBAAC;AAAA,MAAqB,MAAM,EAAE,UAAU,CAAC,GAAG,GAAG,KAAK;AAAA,MAAG;AAAA,KAAU;AAAA,EAC1E;AACA,MAAI,CAAC;AAAW,WAAO;AAEvB,SAAO,oBAAC;AAAA,IAAU;AAAA,IAAY;AAAA,GAAU;AAC1C;",
6
6
  "names": ["React"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-left-navigation",
3
- "version": "3.12.0-next.0",
3
+ "version": "3.12.0-next.1",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Left Navigation",
6
6
  "files": [
@@ -235,12 +235,12 @@
235
235
  "typeSafety": false
236
236
  },
237
237
  "dependencies": {
238
- "@elliemae/ds-circular-progress-indicator": "3.12.0-next.0",
239
- "@elliemae/ds-grid": "3.12.0-next.0",
240
- "@elliemae/ds-icons": "3.12.0-next.0",
241
- "@elliemae/ds-system": "3.12.0-next.0",
242
- "@elliemae/ds-truncated-tooltip-text": "3.12.0-next.0",
243
- "@elliemae/ds-utilities": "3.12.0-next.0"
238
+ "@elliemae/ds-circular-progress-indicator": "3.12.0-next.1",
239
+ "@elliemae/ds-grid": "3.12.0-next.1",
240
+ "@elliemae/ds-icons": "3.12.0-next.1",
241
+ "@elliemae/ds-system": "3.12.0-next.1",
242
+ "@elliemae/ds-truncated-tooltip-text": "3.12.0-next.1",
243
+ "@elliemae/ds-utilities": "3.12.0-next.1"
244
244
  },
245
245
  "devDependencies": {
246
246
  "@testing-library/react": "~12.1.3",