@elliemae/ds-left-navigation 2.2.0-next.4 → 2.3.0-alpha.2
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.
- package/cjs/LeftNavigation.js +49 -27
- package/cjs/LeftNavigation.js.map +7 -0
- package/cjs/LeftNavigationContext.js +44 -18
- package/cjs/LeftNavigationContext.js.map +7 -0
- package/cjs/common/getItemBackgroundStyle.js +47 -8
- package/cjs/common/getItemBackgroundStyle.js.map +7 -0
- package/cjs/common/getLeftBorderStyle.js +50 -8
- package/cjs/common/getLeftBorderStyle.js.map +7 -0
- package/cjs/common/getScrollbarStyle.js +55 -4
- package/cjs/common/getScrollbarStyle.js.map +7 -0
- package/cjs/common/index.js +30 -13
- package/cjs/common/index.js.map +7 -0
- package/cjs/configs/index.js +38 -10
- package/cjs/configs/index.js.map +7 -0
- package/cjs/configs/useLeftNavConfig.js +76 -76
- package/cjs/configs/useLeftNavConfig.js.map +7 -0
- package/cjs/configs/useLeftNavItems.js +66 -64
- package/cjs/configs/useLeftNavItems.js.map +7 -0
- package/cjs/configs/useLeftNavSmoothExpand.js +43 -25
- package/cjs/configs/useLeftNavSmoothExpand.js.map +7 -0
- package/cjs/exported-related/ChevronItem/index.js +42 -27
- package/cjs/exported-related/ChevronItem/index.js.map +7 -0
- package/cjs/exported-related/Icon/index.js +51 -34
- package/cjs/exported-related/Icon/index.js.map +7 -0
- package/cjs/exported-related/ItemRenderer/index.js +99 -94
- package/cjs/exported-related/ItemRenderer/index.js.map +7 -0
- package/cjs/exported-related/ItemRenderer/styled.js +83 -51
- package/cjs/exported-related/ItemRenderer/styled.js.map +7 -0
- package/cjs/exported-related/ItemRenderer/usePropsWithDefaults.js +57 -45
- package/cjs/exported-related/ItemRenderer/usePropsWithDefaults.js.map +7 -0
- package/cjs/exported-related/Notifications/index.js +81 -61
- package/cjs/exported-related/Notifications/index.js.map +7 -0
- package/cjs/exported-related/OpenWindowItem/index.js +49 -32
- package/cjs/exported-related/OpenWindowItem/index.js.map +7 -0
- package/cjs/exported-related/constants.js +53 -25
- package/cjs/exported-related/constants.js.map +7 -0
- package/cjs/exported-related/index.js +33 -23
- package/cjs/exported-related/index.js.map +7 -0
- package/cjs/hooks/index.js +30 -13
- package/cjs/hooks/index.js.map +7 -0
- package/cjs/hooks/useExpandableOnClickHandler.js +55 -26
- package/cjs/hooks/useExpandableOnClickHandler.js.map +7 -0
- package/cjs/hooks/useKeyboardNavigation.js +62 -54
- package/cjs/hooks/useKeyboardNavigation.js.map +7 -0
- package/cjs/hooks/useOpenableOnClickHandler.js +55 -26
- package/cjs/hooks/useOpenableOnClickHandler.js.map +7 -0
- package/cjs/hooks/useSelectFirstBodyItem.js +47 -34
- package/cjs/hooks/useSelectFirstBodyItem.js.map +7 -0
- package/cjs/index.d.js +27 -2
- package/cjs/index.d.js.map +7 -0
- package/cjs/index.js +41 -30
- package/cjs/index.js.map +7 -0
- package/cjs/outOfTheBox/ItemControlledDrilldown/index.js +97 -103
- package/cjs/outOfTheBox/ItemControlledDrilldown/index.js.map +7 -0
- package/cjs/outOfTheBox/ItemControlledDrilldown/styled.js +49 -27
- package/cjs/outOfTheBox/ItemControlledDrilldown/styled.js.map +7 -0
- package/cjs/outOfTheBox/ItemHeader/index.js +95 -93
- package/cjs/outOfTheBox/ItemHeader/index.js.map +7 -0
- package/cjs/outOfTheBox/ItemHeader/styled.js +49 -22
- package/cjs/outOfTheBox/ItemHeader/styled.js.map +7 -0
- package/cjs/outOfTheBox/ItemLink/index.js +75 -67
- package/cjs/outOfTheBox/ItemLink/index.js.map +7 -0
- package/cjs/outOfTheBox/ItemLink/styled.js +41 -17
- package/cjs/outOfTheBox/ItemLink/styled.js.map +7 -0
- package/cjs/outOfTheBox/ItemSection/index.js +59 -63
- package/cjs/outOfTheBox/ItemSection/index.js.map +7 -0
- package/cjs/outOfTheBox/ItemSection/styled.js +53 -23
- package/cjs/outOfTheBox/ItemSection/styled.js.map +7 -0
- package/cjs/outOfTheBox/ItemSeparator/index.js +56 -45
- package/cjs/outOfTheBox/ItemSeparator/index.js.map +7 -0
- package/cjs/outOfTheBox/ItemSubmenu/index.js +95 -92
- package/cjs/outOfTheBox/ItemSubmenu/index.js.map +7 -0
- package/cjs/outOfTheBox/ItemSubmenu/styled.js +49 -22
- package/cjs/outOfTheBox/ItemSubmenu/styled.js.map +7 -0
- package/cjs/outOfTheBox/ItemTextLabel/index.js +51 -52
- package/cjs/outOfTheBox/ItemTextLabel/index.js.map +7 -0
- package/cjs/outOfTheBox/ItemTextLabel/styled.js +43 -23
- package/cjs/outOfTheBox/ItemTextLabel/styled.js.map +7 -0
- package/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js +107 -113
- package/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +7 -0
- package/cjs/outOfTheBox/ItemUncontrolledDrilldown/styled.js +49 -27
- package/cjs/outOfTheBox/ItemUncontrolledDrilldown/styled.js.map +7 -0
- package/cjs/outOfTheBox/ItemWithDate/index.js +59 -54
- package/cjs/outOfTheBox/ItemWithDate/index.js.map +7 -0
- package/cjs/outOfTheBox/ItemWithDate/styled.js +49 -27
- package/cjs/outOfTheBox/ItemWithDate/styled.js.map +7 -0
- package/cjs/outOfTheBox/index.js +65 -50
- package/cjs/outOfTheBox/index.js.map +7 -0
- package/cjs/parts/LeftNavContent/index.js +75 -71
- package/cjs/parts/LeftNavContent/index.js.map +7 -0
- package/cjs/parts/LeftNavContent/styled.js +110 -50
- package/cjs/parts/LeftNavContent/styled.js.map +7 -0
- package/cjs/parts/LeftNavContentWithScrollbar/index.js +89 -79
- package/cjs/parts/LeftNavContentWithScrollbar/index.js.map +7 -0
- package/cjs/parts/LeftNavFooterItem/index.js +97 -80
- package/cjs/parts/LeftNavFooterItem/index.js.map +7 -0
- package/cjs/parts/LeftNavFooterItem/styled.js +89 -34
- package/cjs/parts/LeftNavFooterItem/styled.js.map +7 -0
- package/cjs/parts/LeftNavLoading/index.js +51 -33
- package/cjs/parts/LeftNavLoading/index.js.map +7 -0
- package/cjs/parts/OutOfTheBoxMapItem.js +49 -46
- package/cjs/parts/OutOfTheBoxMapItem.js.map +7 -0
- package/cjs/prop-types.js +58 -39
- package/cjs/prop-types.js.map +7 -0
- package/esm/LeftNavigation.js +17 -15
- package/esm/LeftNavigation.js.map +7 -0
- package/esm/LeftNavigationContext.js +15 -11
- package/esm/LeftNavigationContext.js.map +7 -0
- package/esm/common/getItemBackgroundStyle.js +20 -6
- package/esm/common/getItemBackgroundStyle.js.map +7 -0
- package/esm/common/getLeftBorderStyle.js +23 -6
- package/esm/common/getLeftBorderStyle.js.map +7 -0
- package/esm/common/getScrollbarStyle.js +28 -2
- package/esm/common/getScrollbarStyle.js.map +7 -0
- package/esm/common/index.js +5 -3
- package/esm/common/index.js.map +7 -0
- package/esm/configs/index.js +9 -2
- package/esm/configs/index.js.map +7 -0
- package/esm/configs/useLeftNavConfig.js +47 -67
- package/esm/configs/useLeftNavConfig.js.map +7 -0
- package/esm/configs/useLeftNavItems.js +33 -55
- package/esm/configs/useLeftNavItems.js.map +7 -0
- package/esm/configs/useLeftNavSmoothExpand.js +14 -16
- package/esm/configs/useLeftNavSmoothExpand.js.map +7 -0
- package/esm/exported-related/ChevronItem/index.js +13 -18
- package/esm/exported-related/ChevronItem/index.js.map +7 -0
- package/esm/exported-related/Icon/index.js +21 -24
- package/esm/exported-related/Icon/index.js.map +7 -0
- package/esm/exported-related/ItemRenderer/index.js +65 -80
- package/esm/exported-related/ItemRenderer/index.js.map +7 -0
- package/esm/exported-related/ItemRenderer/styled.js +56 -42
- package/esm/exported-related/ItemRenderer/styled.js.map +7 -0
- package/esm/exported-related/ItemRenderer/usePropsWithDefaults.js +27 -36
- package/esm/exported-related/ItemRenderer/usePropsWithDefaults.js.map +7 -0
- package/esm/exported-related/Notifications/index.js +57 -50
- package/esm/exported-related/Notifications/index.js.map +7 -0
- package/esm/exported-related/OpenWindowItem/index.js +20 -22
- package/esm/exported-related/OpenWindowItem/index.js.map +7 -0
- package/esm/exported-related/constants.js +24 -17
- package/esm/exported-related/constants.js.map +7 -0
- package/esm/exported-related/index.js +8 -6
- package/esm/exported-related/index.js.map +7 -0
- package/esm/hooks/index.js +5 -3
- package/esm/hooks/index.js.map +7 -0
- package/esm/hooks/useExpandableOnClickHandler.js +26 -22
- package/esm/hooks/useExpandableOnClickHandler.js.map +7 -0
- package/esm/hooks/useKeyboardNavigation.js +30 -47
- package/esm/hooks/useKeyboardNavigation.js.map +7 -0
- package/esm/hooks/useOpenableOnClickHandler.js +26 -22
- package/esm/hooks/useOpenableOnClickHandler.js.map +7 -0
- package/esm/hooks/useSelectFirstBodyItem.js +18 -30
- package/esm/hooks/useSelectFirstBodyItem.js.map +7 -0
- package/esm/index.d.js +2 -1
- package/esm/index.d.js.map +7 -0
- package/esm/index.js +12 -8
- package/esm/index.js.map +7 -0
- package/esm/outOfTheBox/ItemControlledDrilldown/index.js +62 -87
- package/esm/outOfTheBox/ItemControlledDrilldown/index.js.map +7 -0
- package/esm/outOfTheBox/ItemControlledDrilldown/styled.js +20 -17
- package/esm/outOfTheBox/ItemControlledDrilldown/styled.js.map +7 -0
- package/esm/outOfTheBox/ItemHeader/index.js +65 -82
- package/esm/outOfTheBox/ItemHeader/index.js.map +7 -0
- package/esm/outOfTheBox/ItemHeader/styled.js +20 -12
- package/esm/outOfTheBox/ItemHeader/styled.js.map +7 -0
- package/esm/outOfTheBox/ItemLink/index.js +46 -57
- package/esm/outOfTheBox/ItemLink/index.js.map +7 -0
- package/esm/outOfTheBox/ItemLink/styled.js +12 -8
- package/esm/outOfTheBox/ItemLink/styled.js.map +7 -0
- package/esm/outOfTheBox/ItemSection/index.js +30 -53
- package/esm/outOfTheBox/ItemSection/index.js.map +7 -0
- package/esm/outOfTheBox/ItemSection/styled.js +24 -13
- package/esm/outOfTheBox/ItemSection/styled.js.map +7 -0
- package/esm/outOfTheBox/ItemSeparator/index.js +27 -35
- package/esm/outOfTheBox/ItemSeparator/index.js.map +7 -0
- package/esm/outOfTheBox/ItemSubmenu/index.js +65 -81
- package/esm/outOfTheBox/ItemSubmenu/index.js.map +7 -0
- package/esm/outOfTheBox/ItemSubmenu/styled.js +20 -12
- package/esm/outOfTheBox/ItemSubmenu/styled.js.map +7 -0
- package/esm/outOfTheBox/ItemTextLabel/index.js +22 -43
- package/esm/outOfTheBox/ItemTextLabel/index.js.map +7 -0
- package/esm/outOfTheBox/ItemTextLabel/styled.js +14 -14
- package/esm/outOfTheBox/ItemTextLabel/styled.js.map +7 -0
- package/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js +70 -95
- package/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +7 -0
- package/esm/outOfTheBox/ItemUncontrolledDrilldown/styled.js +20 -17
- package/esm/outOfTheBox/ItemUncontrolledDrilldown/styled.js.map +7 -0
- package/esm/outOfTheBox/ItemWithDate/index.js +30 -44
- package/esm/outOfTheBox/ItemWithDate/index.js.map +7 -0
- package/esm/outOfTheBox/ItemWithDate/styled.js +20 -17
- package/esm/outOfTheBox/ItemWithDate/styled.js.map +7 -0
- package/esm/outOfTheBox/index.js +25 -34
- package/esm/outOfTheBox/index.js.map +7 -0
- package/esm/parts/LeftNavContent/index.js +54 -64
- package/esm/parts/LeftNavContent/index.js.map +7 -0
- package/esm/parts/LeftNavContent/styled.js +81 -36
- package/esm/parts/LeftNavContent/styled.js.map +7 -0
- package/esm/parts/LeftNavContentWithScrollbar/index.js +56 -64
- package/esm/parts/LeftNavContentWithScrollbar/index.js.map +7 -0
- package/esm/parts/LeftNavFooterItem/index.js +73 -68
- package/esm/parts/LeftNavFooterItem/index.js.map +7 -0
- package/esm/parts/LeftNavFooterItem/styled.js +63 -24
- package/esm/parts/LeftNavFooterItem/styled.js.map +7 -0
- package/esm/parts/LeftNavLoading/index.js +22 -22
- package/esm/parts/LeftNavLoading/index.js.map +7 -0
- package/esm/parts/OutOfTheBoxMapItem.js +19 -35
- package/esm/parts/OutOfTheBoxMapItem.js.map +7 -0
- package/esm/prop-types.js +26 -29
- package/esm/prop-types.js.map +7 -0
- package/package.json +6 -6
- package/types/LeftNavigationContext.d.ts +4 -4
- package/types/configs/useLeftNavSmoothExpand.d.ts +3 -3
- package/types/hooks/useSelectFirstBodyItem.d.ts +1 -1
- package/types/index.d.d.ts +2 -5
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/LeftNavFooterItem/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React, { useContext } from 'react';\nimport { MenuExpand } from '@elliemae/ds-icons';\nimport { PropTypes } from 'react-desc';\nimport Grid from '@elliemae/ds-grid';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport {\n StyledFooterMenu,\n StyledItem,\n StyledItemWrapper,\n StyledLabel,\n StyledSeparator,\n StyledMenuCollapse,\n} from './styled';\nimport { useKeyboardNavigation } from '../../hooks';\nimport LeftNavigationContext from '../../LeftNavigationContext';\nimport { FOOTER_DS_ID, FOOTER_MENU_CLOSE_DS_ID } from '../../exported-related/constants';\n\ntype LeftNavFooterItemProps = {\n footerLabel: string | JSX.Element;\n onFooterExpand: React.MouseEventHandler & React.KeyboardEventHandler;\n onFooterClose: React.MouseEventHandler & React.KeyboardEventHandler;\n};\n\nexport const LeftNavFooterItem: React.ComponentType<LeftNavFooterItemProps> = (props) => {\n const { footerLabel, onFooterExpand = () => null, onFooterClose = () => null } = props;\n const {\n leftNavProps: { labelOverflow, openedItem },\n expandedForAnimation,\n setSelectedItem,\n setFocusedItem,\n visibleItemsRefs,\n } = useContext(LeftNavigationContext);\n\n const id = FOOTER_DS_ID;\n\n const handleOnClick = expandedForAnimation ? onFooterClose : onFooterExpand;\n\n const onKeyDown = useKeyboardNavigation({\n item: {\n dsId: id,\n itemOpts: {\n selectable: !expandedForAnimation,\n openable: false,\n closable: false,\n },\n },\n onClick: handleOnClick,\n });\n\n return (\n <StyledFooterMenu key={id} data-testid=\"leftnav-container\">\n <StyledItemWrapper>\n <StyledItem\n ref={visibleItemsRefs.current[id]}\n tabIndex={expandedForAnimation ? -1 : 0}\n expanded={expandedForAnimation}\n pt=\"xxs2\"\n height={expandedForAnimation ? 'auto' : '48px'}\n alignItems=\"flex-start\"\n pl=\"xxs\"\n cols={expandedForAnimation ? ['auto', '1fr', 'auto'] : ['38px']}\n onClick={expandedForAnimation ? () => null : handleOnClick}\n onKeyDown={onKeyDown}\n onFocus={() => setFocusedItem(id)}\n data-testid=\"leftnav-item-container\"\n role=\"menuitem\"\n aria-label={expandedForAnimation ? `Footer, ${footerLabel}` : `Expand left navigation`}\n >\n {!expandedForAnimation ? (\n <MenuExpand size=\"m\" color={['brand-primary', 800]} data-testid=\"leftnav-footer-btn\" />\n ) : (\n <>\n <StyledLabel\n mt=\"5px\"\n mr=\"12px\"\n mb=\"16px\"\n data-testid=\"leftnav-itemlabel\"\n labelOverflow={labelOverflow}\n aria-live=\"polite\"\n >\n {labelOverflow === 'truncate' ? (\n <SimpleTruncatedTooltipText value={footerLabel} placement=\"bottom-start\" />\n ) : (\n footerLabel\n )}\n </StyledLabel>\n <StyledSeparator mt=\"xxxs\" />\n <Grid m=\"0 12px\">\n <StyledMenuCollapse\n size=\"m\"\n color={['brand-primary', 800]}\n onClick={(e) => {\n e.stopPropagation();\n handleOnClick(e);\n }}\n data-testid=\"leftnav-footer-btn\"\n tabIndex={0}\n onFocus={(e) => {\n e.stopPropagation();\n setFocusedItem(FOOTER_MENU_CLOSE_DS_ID);\n }}\n role=\"button\"\n aria-label=\"Collapse left navigation\"\n />\n </Grid>\n </>\n )}\n </StyledItem>\n </StyledItemWrapper>\n </StyledFooterMenu>\n );\n};\n\nLeftNavFooterItem.propTypes = {\n footerLabel: PropTypes.any,\n onFooterExpand: PropTypes.func,\n onFooterClose: PropTypes.func,\n};\n\nexport default LeftNavFooterItem;\n"],
|
|
5
|
+
"mappings": "AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA;AACA;AACA;AAQO,MAAM,oBAAiE,CAAC,UAAU;AACvF,QAAM,EAAE,aAAa,iBAAiB,MAAM,MAAM,gBAAgB,MAAM,SAAS;AACjF,QAAM;AAAA,IACJ,cAAc,EAAE,eAAe;AAAA,IAC/B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE,WAAW;AAEf,QAAM,KAAK;AAEX,QAAM,gBAAgB,uBAAuB,gBAAgB;AAE7D,QAAM,YAAY,sBAAsB;AAAA,IACtC,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,UAAU;AAAA,QACR,YAAY,CAAC;AAAA,QACb,UAAU;AAAA,QACV,UAAU;AAAA;AAAA;AAAA,IAGd,SAAS;AAAA;AAGX,SACE,qCAAC,kBAAD;AAAA,IAAkB,KAAK;AAAA,IAAI,eAAY;AAAA,KACrC,qCAAC,mBAAD,MACE,qCAAC,YAAD;AAAA,IACE,KAAK,iBAAiB,QAAQ;AAAA,IAC9B,UAAU,uBAAuB,KAAK;AAAA,IACtC,UAAU;AAAA,IACV,IAAG;AAAA,IACH,QAAQ,uBAAuB,SAAS;AAAA,IACxC,YAAW;AAAA,IACX,IAAG;AAAA,IACH,MAAM,uBAAuB,CAAC,QAAQ,OAAO,UAAU,CAAC;AAAA,IACxD,SAAS,uBAAuB,MAAM,OAAO;AAAA,IAC7C;AAAA,IACA,SAAS,MAAM,eAAe;AAAA,IAC9B,eAAY;AAAA,IACZ,MAAK;AAAA,IACL,cAAY,uBAAuB,WAAW,gBAAgB;AAAA,KAE7D,CAAC,uBACA,qCAAC,YAAD;AAAA,IAAY,MAAK;AAAA,IAAI,OAAO,CAAC,iBAAiB;AAAA,IAAM,eAAY;AAAA,OAEhE,4DACE,qCAAC,aAAD;AAAA,IACE,IAAG;AAAA,IACH,IAAG;AAAA,IACH,IAAG;AAAA,IACH,eAAY;AAAA,IACZ;AAAA,IACA,aAAU;AAAA,KAET,kBAAkB,aACjB,qCAAC,4BAAD;AAAA,IAA4B,OAAO;AAAA,IAAa,WAAU;AAAA,OAE1D,cAGJ,qCAAC,iBAAD;AAAA,IAAiB,IAAG;AAAA,MACpB,qCAAC,MAAD;AAAA,IAAM,GAAE;AAAA,KACN,qCAAC,oBAAD;AAAA,IACE,MAAK;AAAA,IACL,OAAO,CAAC,iBAAiB;AAAA,IACzB,SAAS,CAAC,MAAM;AACd,QAAE;AACF,oBAAc;AAAA;AAAA,IAEhB,eAAY;AAAA,IACZ,UAAU;AAAA,IACV,SAAS,CAAC,MAAM;AACd,QAAE;AACF,qBAAe;AAAA;AAAA,IAEjB,MAAK;AAAA,IACL,cAAW;AAAA;AAAA;AAW7B,kBAAkB,YAAY;AAAA,EAC5B,aAAa,UAAU;AAAA,EACvB,gBAAgB,UAAU;AAAA,EAC1B,eAAe,UAAU;AAAA;AAG3B,IAAO,4BAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,26 +1,65 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { getLeftBorderStyle } from
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { Grid } from "@elliemae/ds-grid";
|
|
4
|
+
import { MenuCollapse } from "@elliemae/ds-icons";
|
|
5
|
+
import { getLeftBorderStyle, getItemBackgroundStyle } from "../../common";
|
|
6
|
+
const StyledFooterMenu = styled(Grid)`
|
|
7
|
+
width: 100%;
|
|
8
|
+
margin-top: auto;
|
|
9
|
+
background: ${(props) => props.theme.colors.neutral["000"]};
|
|
6
10
|
|
|
7
|
-
|
|
8
|
-
componentId: "sc-1mcbjxr-0"
|
|
9
|
-
})(["width:100%;margin-top:auto;background:", ";", " border-top:1px solid ", ";"], props => props.theme.colors.neutral['000'], getLeftBorderStyle, props => props.theme.colors.neutral[100]);
|
|
10
|
-
const StyledItemWrapper = /*#__PURE__*/styled(Grid).withConfig({
|
|
11
|
-
componentId: "sc-1mcbjxr-1"
|
|
12
|
-
})(["position:relative;padding-left:", ";"], props => props.theme.space.xxxs);
|
|
13
|
-
const StyledItem = /*#__PURE__*/styled(Grid).withConfig({
|
|
14
|
-
componentId: "sc-1mcbjxr-2"
|
|
15
|
-
})(["min-height:48px;cursor:", ";", " outline:none;:focus{&:before{content:'';position:absolute;height:100%;width:100%;top:0;left:0px;border:2px solid ", ";pointer-events:none;}}"], props => props.expanded ? 'auto' : 'pointer', getItemBackgroundStyle, props => props.theme.colors.brand[600]);
|
|
16
|
-
const StyledLabel = /*#__PURE__*/styled(Grid).withConfig({
|
|
17
|
-
componentId: "sc-1mcbjxr-3"
|
|
18
|
-
})(["font-size:11px;color:", ";line-height:14px;word-break:", ";"], props => props.theme.colors.neutral[500], props => props.labelOverflow === 'wrapAll' ? 'break-all' : 'normal');
|
|
19
|
-
const StyledSeparator = /*#__PURE__*/styled(Grid).withConfig({
|
|
20
|
-
componentId: "sc-1mcbjxr-4"
|
|
21
|
-
})(["height:16px;width:1px;background-color:", ";"], props => props.theme.colors.neutral[100]);
|
|
22
|
-
const StyledMenuCollapse = /*#__PURE__*/styled(MenuCollapse).withConfig({
|
|
23
|
-
componentId: "sc-1mcbjxr-5"
|
|
24
|
-
})(["cursor:pointer;:focus{outline:2px solid ", ";}"], props => props.theme.colors.brand[700]);
|
|
11
|
+
${getLeftBorderStyle}
|
|
25
12
|
|
|
26
|
-
|
|
13
|
+
border-top: 1px solid ${(props) => props.theme.colors.neutral[100]};
|
|
14
|
+
`;
|
|
15
|
+
const StyledItemWrapper = styled(Grid)`
|
|
16
|
+
position: relative;
|
|
17
|
+
padding-left: ${(props) => props.theme.space.xxxs};
|
|
18
|
+
`;
|
|
19
|
+
const StyledItem = styled(Grid)`
|
|
20
|
+
min-height: 48px;
|
|
21
|
+
cursor: ${(props) => props.expanded ? "auto" : "pointer"};
|
|
22
|
+
|
|
23
|
+
${getItemBackgroundStyle}
|
|
24
|
+
|
|
25
|
+
outline: none;
|
|
26
|
+
|
|
27
|
+
:focus {
|
|
28
|
+
&:before {
|
|
29
|
+
content: '';
|
|
30
|
+
position: absolute;
|
|
31
|
+
height: 100%;
|
|
32
|
+
width: 100%;
|
|
33
|
+
top: 0;
|
|
34
|
+
left: 0px;
|
|
35
|
+
border: 2px solid ${(props) => props.theme.colors.brand[600]};
|
|
36
|
+
pointer-events: none;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
`;
|
|
40
|
+
const StyledLabel = styled(Grid)`
|
|
41
|
+
font-size: 11px;
|
|
42
|
+
color: ${(props) => props.theme.colors.neutral[500]};
|
|
43
|
+
line-height: 14px;
|
|
44
|
+
word-break: ${(props) => props.labelOverflow === "wrapAll" ? "break-all" : "normal"};
|
|
45
|
+
`;
|
|
46
|
+
const StyledSeparator = styled(Grid)`
|
|
47
|
+
height: 16px;
|
|
48
|
+
width: 1px;
|
|
49
|
+
background-color: ${(props) => props.theme.colors.neutral[100]};
|
|
50
|
+
`;
|
|
51
|
+
const StyledMenuCollapse = styled(MenuCollapse)`
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
:focus {
|
|
54
|
+
outline: 2px solid ${(props) => props.theme.colors.brand[700]};
|
|
55
|
+
}
|
|
56
|
+
`;
|
|
57
|
+
export {
|
|
58
|
+
StyledFooterMenu,
|
|
59
|
+
StyledItem,
|
|
60
|
+
StyledItemWrapper,
|
|
61
|
+
StyledLabel,
|
|
62
|
+
StyledMenuCollapse,
|
|
63
|
+
StyledSeparator
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/LeftNavFooterItem/styled.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { MenuCollapse } from '@elliemae/ds-icons';\nimport { getLeftBorderStyle, getItemBackgroundStyle } from '../../common';\n\nexport const StyledFooterMenu = styled(Grid)`\n width: 100%;\n margin-top: auto;\n background: ${(props) => props.theme.colors.neutral['000']};\n\n ${getLeftBorderStyle}\n\n border-top: 1px solid ${(props) => props.theme.colors.neutral[100]};\n`;\n\nexport const StyledItemWrapper = styled(Grid)`\n position: relative;\n padding-left: ${(props) => props.theme.space.xxxs};\n`;\n\nexport const StyledItem = styled(Grid)`\n min-height: 48px;\n cursor: ${(props) => (props.expanded ? 'auto' : 'pointer')};\n\n ${getItemBackgroundStyle}\n\n outline: none;\n\n :focus {\n &:before {\n content: '';\n position: absolute;\n height: 100%;\n width: 100%;\n top: 0;\n left: 0px;\n border: 2px solid ${(props) => props.theme.colors.brand[600]};\n pointer-events: none;\n }\n }\n`;\n\nexport const StyledLabel = styled(Grid)`\n font-size: 11px;\n color: ${(props) => props.theme.colors.neutral[500]};\n line-height: 14px;\n word-break: ${(props) => (props.labelOverflow === 'wrapAll' ? 'break-all' : 'normal')};\n`;\n\nexport const StyledSeparator = styled(Grid)`\n height: 16px;\n width: 1px;\n background-color: ${(props) => props.theme.colors.neutral[100]};\n`;\n\nexport const StyledMenuCollapse = styled(MenuCollapse)`\n cursor: pointer;\n :focus {\n outline: 2px solid ${(props) => props.theme.colors.brand[700]};\n }\n`;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AAEO,MAAM,mBAAmB,OAAO;AAAA;AAAA;AAAA,gBAGvB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA,IAElD;AAAA;AAAA,0BAEsB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAGzD,MAAM,oBAAoB,OAAO;AAAA;AAAA,kBAEtB,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAGxC,MAAM,aAAa,OAAO;AAAA;AAAA,YAErB,CAAC,UAAW,MAAM,WAAW,SAAS;AAAA;AAAA,IAE9C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAYsB,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAMvD,MAAM,cAAc,OAAO;AAAA;AAAA,WAEvB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA,gBAEjC,CAAC,UAAW,MAAM,kBAAkB,YAAY,cAAc;AAAA;AAGvE,MAAM,kBAAkB,OAAO;AAAA;AAAA;AAAA,sBAGhB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAGrD,MAAM,qBAAqB,OAAO;AAAA;AAAA;AAAA,yBAGhB,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import DSCircularProgressIndicator from
|
|
4
|
-
import Grid from
|
|
5
|
-
import styled from
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import DSCircularProgressIndicator from "@elliemae/ds-circular-progress-indicator";
|
|
4
|
+
import Grid from "@elliemae/ds-grid";
|
|
5
|
+
import styled from "styled-components";
|
|
6
|
+
const StyledLoaderWrapper = styled(Grid)`
|
|
7
|
+
grid-area: left-nav-body;
|
|
8
|
+
height: 100%;
|
|
9
|
+
place-items: center;
|
|
10
|
+
z-index: 0;
|
|
11
|
+
background-color: white;
|
|
12
|
+
`;
|
|
13
|
+
const LeftNavLoading = ({ expanded }) => /* @__PURE__ */ React2.createElement(StyledLoaderWrapper, null, /* @__PURE__ */ React2.createElement(DSCircularProgressIndicator, {
|
|
14
|
+
size: expanded ? "xl" : "m",
|
|
15
|
+
loading: true,
|
|
16
|
+
showLabel: expanded,
|
|
17
|
+
waiting: false,
|
|
18
|
+
showTooltip: !expanded
|
|
19
|
+
}));
|
|
20
|
+
export {
|
|
21
|
+
LeftNavLoading
|
|
21
22
|
};
|
|
22
|
-
|
|
23
|
-
export { LeftNavLoading };
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/LeftNavLoading/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport DSCircularProgressIndicator from '@elliemae/ds-circular-progress-indicator';\nimport Grid from '@elliemae/ds-grid';\nimport styled from 'styled-components';\n\nconst StyledLoaderWrapper = styled(Grid)`\n grid-area: left-nav-body;\n height: 100%;\n place-items: center;\n z-index: 0;\n background-color: white;\n`;\n\nexport const LeftNavLoading: React.ComponentType<{ expanded: boolean }> = ({ expanded }) => (\n <StyledLoaderWrapper>\n <DSCircularProgressIndicator\n size={expanded ? 'xl' : 'm'}\n loading\n showLabel={expanded}\n waiting={false}\n showTooltip={!expanded}\n />\n </StyledLoaderWrapper>\n);\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AAEA,MAAM,sBAAsB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQ5B,MAAM,iBAA6D,CAAC,EAAE,eAC3E,qCAAC,qBAAD,MACE,qCAAC,6BAAD;AAAA,EACE,MAAM,WAAW,OAAO;AAAA,EACxB,SAAO;AAAA,EACP,WAAW;AAAA,EACX,SAAS;AAAA,EACT,aAAa,CAAC;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,42 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
7
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
8
|
-
import React from 'react';
|
|
9
|
-
import { outOfTheBoxComponents } from '../outOfTheBox/index.js';
|
|
10
|
-
import { LeftNavContext } from '../LeftNavigationContext.js';
|
|
11
|
-
|
|
12
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13
|
-
|
|
14
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
15
|
-
const OutOfTheBoxMapItem = props => {
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { outOfTheBoxComponents } from "../outOfTheBox";
|
|
4
|
+
import { LeftNavContext } from "../LeftNavigationContext";
|
|
5
|
+
const OutOfTheBoxMapItem = (props) => {
|
|
16
6
|
const {
|
|
17
7
|
item,
|
|
18
|
-
item: {
|
|
19
|
-
type,
|
|
20
|
-
Component
|
|
21
|
-
}
|
|
8
|
+
item: { type, Component }
|
|
22
9
|
} = props;
|
|
23
|
-
const ctx =
|
|
24
|
-
|
|
25
|
-
if (typeof type === 'string' && !!outOfTheBoxComponents[type]) {
|
|
10
|
+
const ctx = React2.useContext(LeftNavContext);
|
|
11
|
+
if (typeof type === "string" && !!outOfTheBoxComponents[type]) {
|
|
26
12
|
const OutOfTheBoxComponent = outOfTheBoxComponents[type];
|
|
27
|
-
return
|
|
28
|
-
item:
|
|
29
|
-
|
|
30
|
-
}, item),
|
|
31
|
-
ctx: ctx
|
|
13
|
+
return /* @__PURE__ */ React2.createElement(OutOfTheBoxComponent, {
|
|
14
|
+
item: { itemOpts: {}, ...item },
|
|
15
|
+
ctx
|
|
32
16
|
});
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
item: item,
|
|
38
|
-
ctx: ctx
|
|
17
|
+
}
|
|
18
|
+
return /* @__PURE__ */ React2.createElement(Component, {
|
|
19
|
+
item,
|
|
20
|
+
ctx
|
|
39
21
|
});
|
|
40
22
|
};
|
|
41
|
-
|
|
42
|
-
|
|
23
|
+
export {
|
|
24
|
+
OutOfTheBoxMapItem
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=OutOfTheBoxMapItem.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/OutOfTheBoxMapItem.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { outOfTheBoxComponents } from '../outOfTheBox';\nimport { OutOfTheBoxMapItemT } from '../index.d';\nimport { LeftNavContext } from '../LeftNavigationContext';\n\nexport const OutOfTheBoxMapItem = (props: OutOfTheBoxMapItemT): JSX.Element => {\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 // we expect an error to be threw if Component is not defined and type is not a valid out-of-the-box...\n return <Component item={item} ctx={ctx} />;\n};\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AAEA;AAEO,MAAM,qBAAqB,CAAC,UAA4C;AAC7E,QAAM;AAAA,IACJ;AAAA,IACA,MAAM,EAAE,MAAM;AAAA,MACZ;AACJ,QAAM,MAAM,OAAM,WAAW;AAE7B,MAAI,OAAO,SAAS,YAAY,CAAC,CAAC,sBAAsB,OAAO;AAC7D,UAAM,uBAAuB,sBAAsB;AACnD,WAAO,qCAAC,sBAAD;AAAA,MAAsB,MAAM,EAAE,UAAU,OAAO;AAAA,MAAQ;AAAA;AAAA;AAGhE,SAAO,qCAAC,WAAD;AAAA,IAAW;AAAA,IAAY;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/esm/prop-types.js
CHANGED
|
@@ -1,40 +1,37 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { PropTypes, describe } from "react-desc";
|
|
3
|
+
import { outOfTheBoxTypes } from "./outOfTheBox";
|
|
4
4
|
const leftNavItemProps = {
|
|
5
|
-
type: PropTypes.oneOf(outOfTheBoxTypes).description(
|
|
6
|
-
dsId: PropTypes.string.description(
|
|
5
|
+
type: PropTypes.oneOf(outOfTheBoxTypes).description("out of the box types"),
|
|
6
|
+
dsId: PropTypes.string.description("unique identifier for the left nav item"),
|
|
7
7
|
Component: PropTypes.func.description("A custom component, receives the item as prop. This is used only when type is not defined or doesn't matches any out-of-the-box"),
|
|
8
|
-
CollapsedComponent: PropTypes.func.description(
|
|
9
|
-
itemOpts: PropTypes.object.description(
|
|
8
|
+
CollapsedComponent: PropTypes.func.description("A component which is renderer when the left-nav is collapsed"),
|
|
9
|
+
itemOpts: PropTypes.object.description("Item options")
|
|
10
10
|
};
|
|
11
11
|
const leftNavigationProps = {
|
|
12
|
-
containerProps: PropTypes.shape({
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
onSelectedChange: PropTypes.func.description('A callback which triggers when the selected item changes').defaultValue(() => null),
|
|
25
|
-
onFocusChange: PropTypes.func.description('A callback which triggers when the focused item changes').defaultValue(() => null),
|
|
26
|
-
items: PropTypes.arrayOf(PropTypes.object).description('The array of items you want to render inside the left nav').defaultValue([]),
|
|
27
|
-
disableDefaultSelection: PropTypes.bool.description('Whether you do not want to automatically select the first body item').defaultValue(false)
|
|
12
|
+
containerProps: PropTypes.shape({ expandedWidth: PropTypes.string }).description("Set of Properties attached to the main container").defaultValue({ expandedWidth: "240px" }),
|
|
13
|
+
expanded: PropTypes.bool.description("Whether to show the left navigation expanded or collapsed").defaultValue(false),
|
|
14
|
+
loading: PropTypes.bool.description("Whether the left-nav is loading").defaultValue(false),
|
|
15
|
+
tabIndex: PropTypes.number.description("Tab index").defaultValue(0),
|
|
16
|
+
openedItem: PropTypes.string.description("The id of the left navigation item you want to be opened").defaultValue(null),
|
|
17
|
+
footerLabel: PropTypes.string.description("The label to show in the footer item"),
|
|
18
|
+
onFooterExpand: PropTypes.func.description("The function to call when the left-nav is opened via the footer"),
|
|
19
|
+
onFooterClose: PropTypes.func.description("The function to call when the left-nav is closed via the footer"),
|
|
20
|
+
onSelectedChange: PropTypes.func.description("A callback which triggers when the selected item changes").defaultValue(() => null),
|
|
21
|
+
onFocusChange: PropTypes.func.description("A callback which triggers when the focused item changes").defaultValue(() => null),
|
|
22
|
+
items: PropTypes.arrayOf(PropTypes.object).description("The array of items you want to render inside the left nav").defaultValue([]),
|
|
23
|
+
disableDefaultSelection: PropTypes.bool.description("Whether you do not want to automatically select the first body item").defaultValue(false)
|
|
28
24
|
};
|
|
29
|
-
|
|
30
25
|
const LeftNavItemProps = () => null;
|
|
31
|
-
|
|
32
26
|
const LeftNavItemPropsSchema = describe(LeftNavItemProps);
|
|
33
27
|
LeftNavItemPropsSchema.propTypes = leftNavItemProps;
|
|
34
|
-
|
|
35
28
|
const LeftNavItemOptions = () => null;
|
|
36
|
-
|
|
37
29
|
const LeftNavItemOptionsSchema = describe(LeftNavItemOptions);
|
|
38
30
|
LeftNavItemOptionsSchema.propTypes = leftNavItemProps;
|
|
39
|
-
|
|
40
|
-
|
|
31
|
+
export {
|
|
32
|
+
LeftNavItemOptionsSchema,
|
|
33
|
+
LeftNavItemPropsSchema,
|
|
34
|
+
leftNavItemProps,
|
|
35
|
+
leftNavigationProps
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=prop-types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/prop-types.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes, describe } from 'react-desc';\nimport { outOfTheBoxTypes } from './outOfTheBox';\n\nexport const leftNavItemProps = {\n type: PropTypes.oneOf(outOfTheBoxTypes).description('out of the box types'),\n dsId: PropTypes.string.description('unique identifier for the left nav item'),\n Component: PropTypes.func.description(\n \"A custom component, receives the item as prop. This is used only when type is not defined or doesn't matches any out-of-the-box\",\n ),\n CollapsedComponent: PropTypes.func.description('A component which is renderer when the left-nav is collapsed'),\n itemOpts: PropTypes.object.description('Item options'),\n};\n\nexport const leftNavigationProps = {\n containerProps: PropTypes.shape({ expandedWidth: PropTypes.string })\n .description('Set of Properties attached to the main container')\n .defaultValue({ expandedWidth: '240px' }),\n expanded: PropTypes.bool.description('Whether to show the left navigation expanded or collapsed').defaultValue(false),\n loading: PropTypes.bool.description('Whether the left-nav is loading').defaultValue(false),\n tabIndex: PropTypes.number.description('Tab index').defaultValue(0),\n openedItem: PropTypes.string\n .description('The id of the left navigation item you want to be opened')\n .defaultValue(null),\n footerLabel: PropTypes.string.description('The label to show in the footer item'),\n onFooterExpand: PropTypes.func.description('The function to call when the left-nav is opened via the footer'),\n onFooterClose: PropTypes.func.description('The function to call when the left-nav is closed via the footer'),\n onSelectedChange: PropTypes.func\n .description('A callback which triggers when the selected item changes')\n .defaultValue(() => null),\n onFocusChange: PropTypes.func\n .description('A callback which triggers when the focused item changes')\n .defaultValue(() => null),\n items: PropTypes.arrayOf(PropTypes.object)\n .description('The array of items you want to render inside the left nav')\n .defaultValue([]),\n disableDefaultSelection: PropTypes.bool\n .description('Whether you do not want to automatically select the first body item')\n .defaultValue(false),\n};\n\nconst LeftNavItemProps = () => null;\nexport const LeftNavItemPropsSchema = describe(LeftNavItemProps);\nLeftNavItemPropsSchema.propTypes = leftNavItemProps;\n\nconst LeftNavItemOptions = () => null;\nexport const LeftNavItemOptionsSchema = describe(LeftNavItemOptions);\nLeftNavItemOptionsSchema.propTypes = leftNavItemProps;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AAEO,MAAM,mBAAmB;AAAA,EAC9B,MAAM,UAAU,MAAM,kBAAkB,YAAY;AAAA,EACpD,MAAM,UAAU,OAAO,YAAY;AAAA,EACnC,WAAW,UAAU,KAAK,YACxB;AAAA,EAEF,oBAAoB,UAAU,KAAK,YAAY;AAAA,EAC/C,UAAU,UAAU,OAAO,YAAY;AAAA;AAGlC,MAAM,sBAAsB;AAAA,EACjC,gBAAgB,UAAU,MAAM,EAAE,eAAe,UAAU,UACxD,YAAY,oDACZ,aAAa,EAAE,eAAe;AAAA,EACjC,UAAU,UAAU,KAAK,YAAY,6DAA6D,aAAa;AAAA,EAC/G,SAAS,UAAU,KAAK,YAAY,mCAAmC,aAAa;AAAA,EACpF,UAAU,UAAU,OAAO,YAAY,aAAa,aAAa;AAAA,EACjE,YAAY,UAAU,OACnB,YAAY,4DACZ,aAAa;AAAA,EAChB,aAAa,UAAU,OAAO,YAAY;AAAA,EAC1C,gBAAgB,UAAU,KAAK,YAAY;AAAA,EAC3C,eAAe,UAAU,KAAK,YAAY;AAAA,EAC1C,kBAAkB,UAAU,KACzB,YAAY,4DACZ,aAAa,MAAM;AAAA,EACtB,eAAe,UAAU,KACtB,YAAY,2DACZ,aAAa,MAAM;AAAA,EACtB,OAAO,UAAU,QAAQ,UAAU,QAChC,YAAY,6DACZ,aAAa;AAAA,EAChB,yBAAyB,UAAU,KAChC,YAAY,uEACZ,aAAa;AAAA;AAGlB,MAAM,mBAAmB,MAAM;AACxB,MAAM,yBAAyB,SAAS;AAC/C,uBAAuB,YAAY;AAEnC,MAAM,qBAAqB,MAAM;AAC1B,MAAM,2BAA2B,SAAS;AACjD,yBAAyB,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-left-navigation",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0-alpha.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Left Navigation",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -233,11 +233,11 @@
|
|
|
233
233
|
"generateSubmodules": true
|
|
234
234
|
},
|
|
235
235
|
"dependencies": {
|
|
236
|
-
"@elliemae/ds-circular-progress-indicator": "2.
|
|
237
|
-
"@elliemae/ds-grid": "2.
|
|
238
|
-
"@elliemae/ds-icons": "2.
|
|
239
|
-
"@elliemae/ds-system": "2.
|
|
240
|
-
"@elliemae/ds-truncated-tooltip-text": "2.
|
|
236
|
+
"@elliemae/ds-circular-progress-indicator": "2.3.0-alpha.2",
|
|
237
|
+
"@elliemae/ds-grid": "2.3.0-alpha.2",
|
|
238
|
+
"@elliemae/ds-icons": "2.3.0-alpha.2",
|
|
239
|
+
"@elliemae/ds-system": "2.3.0-alpha.2",
|
|
240
|
+
"@elliemae/ds-truncated-tooltip-text": "2.3.0-alpha.2",
|
|
241
241
|
"overlayscrollbars": "1.13.1",
|
|
242
242
|
"prop-types": "~15.7.2",
|
|
243
243
|
"react-desc": "~4.1.3"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { MutableRefObject, RefObject } from 'react';
|
|
2
2
|
import type { LeftNavProps } from './index.d';
|
|
3
3
|
export declare type ContextProps = {
|
|
4
|
-
selectedItem: string
|
|
5
|
-
setSelectedItem: React.Dispatch<React.SetStateAction<string
|
|
6
|
-
focusedItem: string
|
|
7
|
-
setFocusedItem: React.Dispatch<React.SetStateAction<string
|
|
4
|
+
selectedItem: string;
|
|
5
|
+
setSelectedItem: React.Dispatch<React.SetStateAction<string>>;
|
|
6
|
+
focusedItem: string;
|
|
7
|
+
setFocusedItem: React.Dispatch<React.SetStateAction<string>>;
|
|
8
8
|
openedDrilldowns: string[];
|
|
9
9
|
setOpenedDrilldowns: React.Dispatch<React.SetStateAction<string[]>>;
|
|
10
10
|
visibleItems: string[];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { LeftNavProps } from '../index.d';
|
|
4
|
-
interface
|
|
4
|
+
interface smoothExpandOptsT {
|
|
5
5
|
expandedForAnimation: boolean;
|
|
6
|
-
timeoutRef: React.MutableRefObject<NodeJS.Timeout
|
|
6
|
+
timeoutRef: React.MutableRefObject<NodeJS.Timeout>;
|
|
7
7
|
setExpandedForAnimation: React.Dispatch<React.SetStateAction<boolean>>;
|
|
8
8
|
}
|
|
9
|
-
export declare const useLeftNavSmoothExpand: (props: LeftNavProps, smoothExpandOpts:
|
|
9
|
+
export declare const useLeftNavSmoothExpand: (props: LeftNavProps, smoothExpandOpts: smoothExpandOptsT) => void;
|
|
10
10
|
export default useLeftNavSmoothExpand;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { GenericItemItemProps } from '../index.d';
|
|
3
|
-
export declare const useSelectFirstBodyItem: (items: GenericItemItemProps[], openedItem: string
|
|
3
|
+
export declare const useSelectFirstBodyItem: (items: GenericItemItemProps[], openedItem: string, selectedItem: string, setSelectedItem: React.Dispatch<React.SetStateAction<string>>, disableDefaultSelection: boolean) => void;
|
package/types/index.d.d.ts
CHANGED
|
@@ -8,8 +8,8 @@ export interface LeftNavProps {
|
|
|
8
8
|
items: GenericItemItemProps[];
|
|
9
9
|
footerLabel: string;
|
|
10
10
|
labelOverflow: LabelOveflowT;
|
|
11
|
-
onSelectedChange: (item: string
|
|
12
|
-
onFocusChange: (item: string
|
|
11
|
+
onSelectedChange: (item: string) => void;
|
|
12
|
+
onFocusChange: (item: string) => void;
|
|
13
13
|
onFooterExpand: () => void;
|
|
14
14
|
onFooterClose: () => void;
|
|
15
15
|
onItemClick: (item: GenericItemItemProps, e: React.MouseEvent<HTMLElement>) => void;
|
|
@@ -21,9 +21,6 @@ export interface LeftNavProps {
|
|
|
21
21
|
selectedParent?: string;
|
|
22
22
|
disableDefaultSelection?: boolean;
|
|
23
23
|
withoutBodyShadow?: boolean;
|
|
24
|
-
actionRef?: React.RefObject<{
|
|
25
|
-
setFocusedItem: React.Dispatch<React.SetStateAction<string | null>>;
|
|
26
|
-
}>;
|
|
27
24
|
}
|
|
28
25
|
export declare type OutOfTheBoxT = 'ds-left-nav-item-header' | 'ds-left-nav-item-link' | 'ds-left-nav-item-submenu' | 'ds-left-nav-item-controlled-drilldown' | 'ds-left-nav-item-uncontrolled-drilldown' | 'ds-left-nav-item-section' | 'ds-left-nav-item-separator' | 'ds-left-nav-item-text-label' | 'ds-left-nav-item-with-date';
|
|
29
26
|
export interface itemOptsT {
|