@elliemae/ds-left-navigation 3.0.0-next.2 → 3.0.0-next.6
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/dist/cjs/LeftNavigation.js +51 -0
- package/dist/cjs/LeftNavigation.js.map +7 -0
- package/dist/cjs/LeftNavigationContext.js +67 -0
- package/dist/cjs/LeftNavigationContext.js.map +7 -0
- package/dist/cjs/common/getItemBackgroundStyle.js +51 -0
- package/dist/cjs/common/getItemBackgroundStyle.js.map +7 -0
- package/dist/cjs/common/getLeftBorderStyle.js +54 -0
- package/dist/cjs/common/getLeftBorderStyle.js.map +7 -0
- package/dist/cjs/common/getScrollbarStyle.js +58 -0
- package/dist/cjs/common/getScrollbarStyle.js.map +7 -0
- package/dist/cjs/common/index.js +30 -0
- package/dist/cjs/common/index.js.map +7 -0
- package/dist/cjs/configs/index.js +38 -0
- package/dist/cjs/configs/index.js.map +7 -0
- package/dist/cjs/configs/useLeftNavConfig.js +106 -0
- package/dist/cjs/configs/useLeftNavConfig.js.map +7 -0
- package/dist/cjs/configs/useLeftNavItems.js +82 -0
- package/dist/cjs/configs/useLeftNavItems.js.map +7 -0
- package/dist/cjs/configs/useLeftNavSmoothExpand.js +53 -0
- package/dist/cjs/configs/useLeftNavSmoothExpand.js.map +7 -0
- package/dist/cjs/exported-related/ChevronItem/index.js +56 -0
- package/dist/cjs/exported-related/ChevronItem/index.js.map +7 -0
- package/dist/cjs/exported-related/Icon/index.js +66 -0
- package/dist/cjs/exported-related/Icon/index.js.map +7 -0
- package/dist/cjs/exported-related/ItemRenderer/index.js +133 -0
- package/dist/cjs/exported-related/ItemRenderer/index.js.map +7 -0
- package/dist/cjs/exported-related/ItemRenderer/styled.js +90 -0
- package/dist/cjs/exported-related/ItemRenderer/styled.js.map +7 -0
- package/dist/cjs/exported-related/ItemRenderer/usePropsWithDefaults.js +86 -0
- package/dist/cjs/exported-related/ItemRenderer/usePropsWithDefaults.js.map +7 -0
- package/dist/cjs/exported-related/Notifications/index.js +82 -0
- package/dist/cjs/exported-related/Notifications/index.js.map +7 -0
- package/dist/cjs/exported-related/OpenWindowItem/index.js +63 -0
- package/dist/cjs/exported-related/OpenWindowItem/index.js.map +7 -0
- package/dist/cjs/exported-related/constants.js +57 -0
- package/dist/cjs/exported-related/constants.js.map +7 -0
- package/dist/cjs/exported-related/index.js +33 -0
- package/dist/cjs/exported-related/index.js.map +7 -0
- package/dist/cjs/hooks/index.js +30 -0
- package/dist/cjs/hooks/index.js.map +7 -0
- package/dist/cjs/hooks/useExpandableOnClickHandler.js +64 -0
- package/dist/cjs/hooks/useExpandableOnClickHandler.js.map +7 -0
- package/dist/cjs/hooks/useKeyboardNavigation.js +118 -0
- package/dist/cjs/hooks/useKeyboardNavigation.js.map +7 -0
- package/dist/cjs/hooks/useOpenableOnClickHandler.js +69 -0
- package/dist/cjs/hooks/useOpenableOnClickHandler.js.map +7 -0
- package/dist/cjs/hooks/useSelectFirstBodyItem.js +52 -0
- package/dist/cjs/hooks/useSelectFirstBodyItem.js.map +7 -0
- package/dist/cjs/index.d.js +27 -0
- package/dist/cjs/index.d.js.map +7 -0
- package/dist/cjs/index.js +41 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/outOfTheBox/ItemControlledDrilldown/index.js +167 -0
- package/dist/cjs/outOfTheBox/ItemControlledDrilldown/index.js.map +7 -0
- package/dist/cjs/outOfTheBox/ItemControlledDrilldown/styled.js +49 -0
- package/dist/cjs/outOfTheBox/ItemControlledDrilldown/styled.js.map +7 -0
- package/dist/cjs/outOfTheBox/ItemHeader/index.js +163 -0
- package/dist/cjs/outOfTheBox/ItemHeader/index.js.map +7 -0
- package/dist/cjs/outOfTheBox/ItemHeader/styled.js +49 -0
- package/dist/cjs/outOfTheBox/ItemHeader/styled.js.map +7 -0
- package/dist/cjs/outOfTheBox/ItemLink/index.js +122 -0
- package/dist/cjs/outOfTheBox/ItemLink/index.js.map +7 -0
- package/dist/cjs/outOfTheBox/ItemLink/styled.js +41 -0
- package/dist/cjs/outOfTheBox/ItemLink/styled.js.map +7 -0
- package/dist/cjs/outOfTheBox/ItemSection/index.js +95 -0
- package/dist/cjs/outOfTheBox/ItemSection/index.js.map +7 -0
- package/dist/cjs/outOfTheBox/ItemSection/styled.js +53 -0
- package/dist/cjs/outOfTheBox/ItemSection/styled.js.map +7 -0
- package/dist/cjs/outOfTheBox/ItemSeparator/index.js +78 -0
- package/dist/cjs/outOfTheBox/ItemSeparator/index.js.map +7 -0
- package/dist/cjs/outOfTheBox/ItemSubmenu/index.js +164 -0
- package/dist/cjs/outOfTheBox/ItemSubmenu/index.js.map +7 -0
- package/dist/cjs/outOfTheBox/ItemSubmenu/styled.js +49 -0
- package/dist/cjs/outOfTheBox/ItemSubmenu/styled.js.map +7 -0
- package/dist/cjs/outOfTheBox/ItemTextLabel/index.js +85 -0
- package/dist/cjs/outOfTheBox/ItemTextLabel/index.js.map +7 -0
- package/dist/cjs/outOfTheBox/ItemTextLabel/styled.js +43 -0
- package/dist/cjs/outOfTheBox/ItemTextLabel/styled.js.map +7 -0
- package/dist/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js +181 -0
- package/dist/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +7 -0
- package/dist/cjs/outOfTheBox/ItemUncontrolledDrilldown/styled.js +49 -0
- package/dist/cjs/outOfTheBox/ItemUncontrolledDrilldown/styled.js.map +7 -0
- package/dist/cjs/outOfTheBox/ItemWithDate/index.js +107 -0
- package/dist/cjs/outOfTheBox/ItemWithDate/index.js.map +7 -0
- package/dist/cjs/outOfTheBox/ItemWithDate/styled.js +49 -0
- package/dist/cjs/outOfTheBox/ItemWithDate/styled.js.map +7 -0
- package/dist/cjs/outOfTheBox/index.js +77 -0
- package/dist/cjs/outOfTheBox/index.js.map +7 -0
- package/dist/cjs/parts/LeftNavContent/index.js +88 -0
- package/dist/cjs/parts/LeftNavContent/index.js.map +7 -0
- package/dist/cjs/parts/LeftNavContent/styled.js +113 -0
- package/dist/cjs/parts/LeftNavContent/styled.js.map +7 -0
- package/dist/cjs/parts/LeftNavContentWithScrollbar/index.js +115 -0
- package/dist/cjs/parts/LeftNavContentWithScrollbar/index.js.map +7 -0
- package/dist/cjs/parts/LeftNavFooterItem/index.js +125 -0
- package/dist/cjs/parts/LeftNavFooterItem/index.js.map +7 -0
- package/dist/cjs/parts/LeftNavFooterItem/styled.js +94 -0
- package/dist/cjs/parts/LeftNavFooterItem/styled.js.map +7 -0
- package/dist/cjs/parts/LeftNavLoading/index.js +52 -0
- package/dist/cjs/parts/LeftNavLoading/index.js.map +7 -0
- package/dist/cjs/parts/OutOfTheBoxMapItem.js +69 -0
- package/dist/cjs/parts/OutOfTheBoxMapItem.js.map +7 -0
- package/dist/cjs/prop-types.js +66 -0
- package/dist/cjs/prop-types.js.map +7 -0
- package/dist/esm/LeftNavigation.js +22 -0
- package/dist/esm/LeftNavigation.js.map +7 -0
- package/{esm → dist/esm}/LeftNavigationContext.js +15 -11
- package/dist/esm/LeftNavigationContext.js.map +7 -0
- package/dist/esm/common/getItemBackgroundStyle.js +22 -0
- package/dist/esm/common/getItemBackgroundStyle.js.map +7 -0
- package/dist/esm/common/getLeftBorderStyle.js +25 -0
- package/dist/esm/common/getLeftBorderStyle.js.map +7 -0
- package/dist/esm/common/getScrollbarStyle.js +29 -0
- package/dist/esm/common/getScrollbarStyle.js.map +7 -0
- package/dist/esm/common/index.js +5 -0
- package/dist/esm/common/index.js.map +7 -0
- package/dist/esm/configs/index.js +9 -0
- package/dist/esm/configs/index.js.map +7 -0
- package/dist/esm/configs/useLeftNavConfig.js +77 -0
- package/dist/esm/configs/useLeftNavConfig.js.map +7 -0
- package/dist/esm/configs/useLeftNavItems.js +53 -0
- package/dist/esm/configs/useLeftNavItems.js.map +7 -0
- package/dist/esm/configs/useLeftNavSmoothExpand.js +24 -0
- package/dist/esm/configs/useLeftNavSmoothExpand.js.map +7 -0
- package/dist/esm/exported-related/ChevronItem/index.js +29 -0
- package/dist/esm/exported-related/ChevronItem/index.js.map +7 -0
- package/dist/esm/exported-related/Icon/index.js +39 -0
- package/dist/esm/exported-related/Icon/index.js.map +7 -0
- package/dist/esm/exported-related/ItemRenderer/index.js +104 -0
- package/dist/esm/exported-related/ItemRenderer/index.js.map +7 -0
- package/dist/esm/exported-related/ItemRenderer/styled.js +61 -0
- package/dist/esm/exported-related/ItemRenderer/styled.js.map +7 -0
- package/dist/esm/exported-related/ItemRenderer/usePropsWithDefaults.js +59 -0
- package/dist/esm/exported-related/ItemRenderer/usePropsWithDefaults.js.map +7 -0
- package/dist/esm/exported-related/Notifications/index.js +58 -0
- package/dist/esm/exported-related/Notifications/index.js.map +7 -0
- package/dist/esm/exported-related/OpenWindowItem/index.js +36 -0
- package/dist/esm/exported-related/OpenWindowItem/index.js.map +7 -0
- package/dist/esm/exported-related/constants.js +28 -0
- package/dist/esm/exported-related/constants.js.map +7 -0
- package/dist/esm/exported-related/index.js +8 -0
- package/dist/esm/exported-related/index.js.map +7 -0
- package/dist/esm/hooks/index.js +5 -0
- package/dist/esm/hooks/index.js.map +7 -0
- package/dist/esm/hooks/useExpandableOnClickHandler.js +35 -0
- package/dist/esm/hooks/useExpandableOnClickHandler.js.map +7 -0
- package/{esm → dist/esm}/hooks/useKeyboardNavigation.js +30 -47
- package/dist/esm/hooks/useKeyboardNavigation.js.map +7 -0
- package/dist/esm/hooks/useOpenableOnClickHandler.js +40 -0
- package/dist/esm/hooks/useOpenableOnClickHandler.js.map +7 -0
- package/dist/esm/hooks/useSelectFirstBodyItem.js +23 -0
- package/dist/esm/hooks/useSelectFirstBodyItem.js.map +7 -0
- package/dist/esm/index.d.js +2 -0
- package/dist/esm/index.d.js.map +7 -0
- package/dist/esm/index.js +12 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/outOfTheBox/ItemControlledDrilldown/index.js +140 -0
- package/dist/esm/outOfTheBox/ItemControlledDrilldown/index.js.map +7 -0
- package/dist/esm/outOfTheBox/ItemControlledDrilldown/styled.js +20 -0
- package/dist/esm/outOfTheBox/ItemControlledDrilldown/styled.js.map +7 -0
- package/dist/esm/outOfTheBox/ItemHeader/index.js +136 -0
- package/dist/esm/outOfTheBox/ItemHeader/index.js.map +7 -0
- package/dist/esm/outOfTheBox/ItemHeader/styled.js +20 -0
- package/dist/esm/outOfTheBox/ItemHeader/styled.js.map +7 -0
- package/dist/esm/outOfTheBox/ItemLink/index.js +95 -0
- package/dist/esm/outOfTheBox/ItemLink/index.js.map +7 -0
- package/dist/esm/outOfTheBox/ItemLink/styled.js +12 -0
- package/dist/esm/outOfTheBox/ItemLink/styled.js.map +7 -0
- package/dist/esm/outOfTheBox/ItemSection/index.js +68 -0
- package/dist/esm/outOfTheBox/ItemSection/index.js.map +7 -0
- package/dist/esm/outOfTheBox/ItemSection/styled.js +24 -0
- package/dist/esm/outOfTheBox/ItemSection/styled.js.map +7 -0
- package/dist/esm/outOfTheBox/ItemSeparator/index.js +51 -0
- package/dist/esm/outOfTheBox/ItemSeparator/index.js.map +7 -0
- package/dist/esm/outOfTheBox/ItemSubmenu/index.js +137 -0
- package/dist/esm/outOfTheBox/ItemSubmenu/index.js.map +7 -0
- package/dist/esm/outOfTheBox/ItemSubmenu/styled.js +20 -0
- package/dist/esm/outOfTheBox/ItemSubmenu/styled.js.map +7 -0
- package/dist/esm/outOfTheBox/ItemTextLabel/index.js +58 -0
- package/dist/esm/outOfTheBox/ItemTextLabel/index.js.map +7 -0
- package/dist/esm/outOfTheBox/ItemTextLabel/styled.js +14 -0
- package/dist/esm/outOfTheBox/ItemTextLabel/styled.js.map +7 -0
- package/dist/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js +154 -0
- package/dist/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +7 -0
- package/dist/esm/outOfTheBox/ItemUncontrolledDrilldown/styled.js +20 -0
- package/dist/esm/outOfTheBox/ItemUncontrolledDrilldown/styled.js.map +7 -0
- package/dist/esm/outOfTheBox/ItemWithDate/index.js +80 -0
- package/dist/esm/outOfTheBox/ItemWithDate/index.js.map +7 -0
- package/dist/esm/outOfTheBox/ItemWithDate/styled.js +20 -0
- package/dist/esm/outOfTheBox/ItemWithDate/styled.js.map +7 -0
- package/dist/esm/outOfTheBox/index.js +48 -0
- package/dist/esm/outOfTheBox/index.js.map +7 -0
- package/dist/esm/parts/LeftNavContent/index.js +67 -0
- package/dist/esm/parts/LeftNavContent/index.js.map +7 -0
- package/dist/esm/parts/LeftNavContent/styled.js +84 -0
- package/dist/esm/parts/LeftNavContent/styled.js.map +7 -0
- package/dist/esm/parts/LeftNavContentWithScrollbar/index.js +88 -0
- package/dist/esm/parts/LeftNavContentWithScrollbar/index.js.map +7 -0
- package/dist/esm/parts/LeftNavFooterItem/index.js +103 -0
- package/dist/esm/parts/LeftNavFooterItem/index.js.map +7 -0
- package/dist/esm/parts/LeftNavFooterItem/styled.js +65 -0
- package/dist/esm/parts/LeftNavFooterItem/styled.js.map +7 -0
- package/dist/esm/parts/LeftNavLoading/index.js +23 -0
- package/dist/esm/parts/LeftNavLoading/index.js.map +7 -0
- package/dist/esm/parts/OutOfTheBoxMapItem.js +42 -0
- package/dist/esm/parts/OutOfTheBoxMapItem.js.map +7 -0
- package/dist/esm/prop-types.js +37 -0
- package/dist/esm/prop-types.js.map +7 -0
- package/package.json +129 -120
- package/cjs/LeftNavigation.js +0 -29
- package/cjs/LeftNavigationContext.js +0 -41
- package/cjs/common/getItemBackgroundStyle.js +0 -12
- package/cjs/common/getLeftBorderStyle.js +0 -12
- package/cjs/common/getScrollbarStyle.js +0 -7
- package/cjs/common/index.js +0 -13
- package/cjs/configs/index.js +0 -10
- package/cjs/configs/useLeftNavConfig.js +0 -102
- package/cjs/configs/useLeftNavItems.js +0 -80
- package/cjs/configs/useLeftNavSmoothExpand.js +0 -35
- package/cjs/exported-related/ChevronItem/index.js +0 -28
- package/cjs/exported-related/Icon/index.js +0 -36
- package/cjs/exported-related/ItemRenderer/index.js +0 -128
- package/cjs/exported-related/ItemRenderer/styled.js +0 -58
- package/cjs/exported-related/ItemRenderer/usePropsWithDefaults.js +0 -57
- package/cjs/exported-related/Notifications/index.js +0 -62
- package/cjs/exported-related/OpenWindowItem/index.js +0 -33
- package/cjs/exported-related/constants.js +0 -29
- package/cjs/exported-related/index.js +0 -23
- package/cjs/hooks/index.js +0 -13
- package/cjs/hooks/useExpandableOnClickHandler.js +0 -35
- package/cjs/hooks/useKeyboardNavigation.js +0 -110
- package/cjs/hooks/useOpenableOnClickHandler.js +0 -40
- package/cjs/hooks/useSelectFirstBodyItem.js +0 -39
- package/cjs/index.d.js +0 -2
- package/cjs/index.js +0 -30
- package/cjs/outOfTheBox/ItemControlledDrilldown/index.js +0 -158
- package/cjs/outOfTheBox/ItemControlledDrilldown/styled.js +0 -27
- package/cjs/outOfTheBox/ItemHeader/index.js +0 -144
- package/cjs/outOfTheBox/ItemHeader/styled.js +0 -22
- package/cjs/outOfTheBox/ItemLink/index.js +0 -97
- package/cjs/outOfTheBox/ItemLink/styled.js +0 -17
- package/cjs/outOfTheBox/ItemSection/index.js +0 -83
- package/cjs/outOfTheBox/ItemSection/styled.js +0 -23
- package/cjs/outOfTheBox/ItemSeparator/index.js +0 -52
- package/cjs/outOfTheBox/ItemSubmenu/index.js +0 -145
- package/cjs/outOfTheBox/ItemSubmenu/styled.js +0 -22
- package/cjs/outOfTheBox/ItemTextLabel/index.js +0 -70
- package/cjs/outOfTheBox/ItemTextLabel/styled.js +0 -23
- package/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js +0 -172
- package/cjs/outOfTheBox/ItemUncontrolledDrilldown/styled.js +0 -27
- package/cjs/outOfTheBox/ItemWithDate/index.js +0 -86
- package/cjs/outOfTheBox/ItemWithDate/styled.js +0 -27
- package/cjs/outOfTheBox/index.js +0 -62
- package/cjs/parts/LeftNavContent/index.js +0 -84
- package/cjs/parts/LeftNavContent/styled.js +0 -53
- package/cjs/parts/LeftNavContentWithScrollbar/index.js +0 -91
- package/cjs/parts/LeftNavFooterItem/index.js +0 -108
- package/cjs/parts/LeftNavFooterItem/styled.js +0 -39
- package/cjs/parts/LeftNavLoading/index.js +0 -34
- package/cjs/parts/OutOfTheBoxMapItem.js +0 -52
- package/cjs/prop-types.js +0 -47
- package/esm/LeftNavigation.js +0 -20
- package/esm/common/getItemBackgroundStyle.js +0 -8
- package/esm/common/getLeftBorderStyle.js +0 -8
- package/esm/common/getScrollbarStyle.js +0 -3
- package/esm/common/index.js +0 -3
- package/esm/configs/index.js +0 -2
- package/esm/configs/useLeftNavConfig.js +0 -93
- package/esm/configs/useLeftNavItems.js +0 -75
- package/esm/configs/useLeftNavSmoothExpand.js +0 -26
- package/esm/exported-related/ChevronItem/index.js +0 -19
- package/esm/exported-related/Icon/index.js +0 -27
- package/esm/exported-related/ItemRenderer/index.js +0 -119
- package/esm/exported-related/ItemRenderer/styled.js +0 -47
- package/esm/exported-related/ItemRenderer/usePropsWithDefaults.js +0 -49
- package/esm/exported-related/Notifications/index.js +0 -51
- package/esm/exported-related/OpenWindowItem/index.js +0 -23
- package/esm/exported-related/constants.js +0 -21
- package/esm/exported-related/index.js +0 -6
- package/esm/hooks/index.js +0 -3
- package/esm/hooks/useExpandableOnClickHandler.js +0 -31
- package/esm/hooks/useOpenableOnClickHandler.js +0 -36
- package/esm/hooks/useSelectFirstBodyItem.js +0 -35
- package/esm/index.d.js +0 -1
- package/esm/index.js +0 -8
- package/esm/outOfTheBox/ItemControlledDrilldown/index.js +0 -148
- package/esm/outOfTheBox/ItemControlledDrilldown/styled.js +0 -17
- package/esm/outOfTheBox/ItemHeader/index.js +0 -134
- package/esm/outOfTheBox/ItemHeader/styled.js +0 -12
- package/esm/outOfTheBox/ItemLink/index.js +0 -87
- package/esm/outOfTheBox/ItemLink/styled.js +0 -8
- package/esm/outOfTheBox/ItemSection/index.js +0 -73
- package/esm/outOfTheBox/ItemSection/styled.js +0 -13
- package/esm/outOfTheBox/ItemSeparator/index.js +0 -42
- package/esm/outOfTheBox/ItemSubmenu/index.js +0 -135
- package/esm/outOfTheBox/ItemSubmenu/styled.js +0 -12
- package/esm/outOfTheBox/ItemTextLabel/index.js +0 -61
- package/esm/outOfTheBox/ItemTextLabel/styled.js +0 -14
- package/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js +0 -162
- package/esm/outOfTheBox/ItemUncontrolledDrilldown/styled.js +0 -17
- package/esm/outOfTheBox/ItemWithDate/index.js +0 -76
- package/esm/outOfTheBox/ItemWithDate/styled.js +0 -17
- package/esm/outOfTheBox/index.js +0 -57
- package/esm/parts/LeftNavContent/index.js +0 -77
- package/esm/parts/LeftNavContent/styled.js +0 -39
- package/esm/parts/LeftNavContentWithScrollbar/index.js +0 -80
- package/esm/parts/LeftNavFooterItem/index.js +0 -98
- package/esm/parts/LeftNavFooterItem/styled.js +0 -26
- package/esm/parts/LeftNavLoading/index.js +0 -23
- package/esm/parts/OutOfTheBoxMapItem.js +0 -42
- package/esm/prop-types.js +0 -40
- package/types/LeftNavigation.d.ts +0 -55
- package/types/LeftNavigationContext.d.ts +0 -18
- package/types/common/getItemBackgroundStyle.d.ts +0 -5
- package/types/common/getLeftBorderStyle.d.ts +0 -4
- package/types/common/getScrollbarStyle.d.ts +0 -1
- package/types/common/index.d.ts +0 -3
- package/types/configs/index.d.ts +0 -3
- package/types/configs/useLeftNavConfig.d.ts +0 -4
- package/types/configs/useLeftNavItems.d.ts +0 -12
- package/types/configs/useLeftNavSmoothExpand.d.ts +0 -10
- package/types/exported-related/ChevronItem/index.d.ts +0 -3
- package/types/exported-related/Icon/index.d.ts +0 -5
- package/types/exported-related/ItemRenderer/index.d.ts +0 -3
- package/types/exported-related/ItemRenderer/styled.d.ts +0 -16
- package/types/exported-related/ItemRenderer/usePropsWithDefaults.d.ts +0 -2
- package/types/exported-related/Notifications/index.d.ts +0 -8
- package/types/exported-related/OpenWindowItem/index.d.ts +0 -3
- package/types/exported-related/constants.d.ts +0 -19
- package/types/exported-related/index.d.ts +0 -6
- package/types/hooks/index.d.ts +0 -3
- package/types/hooks/useExpandableOnClickHandler.d.ts +0 -9
- package/types/hooks/useKeyboardNavigation.d.ts +0 -8
- package/types/hooks/useOpenableOnClickHandler.d.ts +0 -10
- package/types/hooks/useSelectFirstBodyItem.d.ts +0 -3
- package/types/index.d.d.ts +0 -77
- package/types/index.d.ts +0 -3
- package/types/outOfTheBox/ItemControlledDrilldown/index.d.ts +0 -3
- package/types/outOfTheBox/ItemControlledDrilldown/styled.d.ts +0 -5
- package/types/outOfTheBox/ItemHeader/index.d.ts +0 -3
- package/types/outOfTheBox/ItemHeader/styled.d.ts +0 -3
- package/types/outOfTheBox/ItemLink/index.d.ts +0 -3
- package/types/outOfTheBox/ItemLink/styled.d.ts +0 -2
- package/types/outOfTheBox/ItemSection/index.d.ts +0 -3
- package/types/outOfTheBox/ItemSection/styled.d.ts +0 -3
- package/types/outOfTheBox/ItemSeparator/index.d.ts +0 -3
- package/types/outOfTheBox/ItemSubmenu/index.d.ts +0 -3
- package/types/outOfTheBox/ItemSubmenu/styled.d.ts +0 -3
- package/types/outOfTheBox/ItemTextLabel/index.d.ts +0 -3
- package/types/outOfTheBox/ItemTextLabel/styled.d.ts +0 -2
- package/types/outOfTheBox/ItemUncontrolledDrilldown/index.d.ts +0 -3
- package/types/outOfTheBox/ItemUncontrolledDrilldown/styled.d.ts +0 -5
- package/types/outOfTheBox/ItemWithDate/index.d.ts +0 -3
- package/types/outOfTheBox/ItemWithDate/styled.d.ts +0 -5
- package/types/outOfTheBox/index.d.ts +0 -13
- package/types/parts/LeftNavContent/index.d.ts +0 -3
- package/types/parts/LeftNavContent/styled.d.ts +0 -14
- package/types/parts/LeftNavContentWithScrollbar/index.d.ts +0 -6
- package/types/parts/LeftNavFooterItem/index.d.ts +0 -8
- package/types/parts/LeftNavFooterItem/styled.d.ts +0 -14
- package/types/parts/LeftNavLoading/index.d.ts +0 -4
- package/types/parts/OutOfTheBoxMapItem.d.ts +0 -3
- package/types/prop-types.d.ts +0 -91
- package/types/tests/LeftNavigation.collapsed.test.d.ts +0 -1
- package/types/tests/LeftNavigation.expanded.test.d.ts +0 -1
- package/types/tests/LeftNavigation.opened.test.d.ts +0 -1
- package/types/tests/events/LeftNavigation.events.keyboard.test.d.ts +0 -1
- package/types/tests/events/LeftNavigation.events.subitems.test.d.ts +0 -1
- package/types/tests/events/LeftNavigation.events.test.d.ts +0 -1
- package/types/tests/events/LeftNavigation.focus.events.test.d.ts +0 -1
package/cjs/prop-types.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var reactDesc = require('react-desc');
|
|
6
|
-
var index = require('./outOfTheBox/index.js');
|
|
7
|
-
|
|
8
|
-
const leftNavItemProps = {
|
|
9
|
-
type: reactDesc.PropTypes.oneOf(index.outOfTheBoxTypes).description('out of the box types'),
|
|
10
|
-
dsId: reactDesc.PropTypes.string.description('unique identifier for the left nav item'),
|
|
11
|
-
Component: reactDesc.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"),
|
|
12
|
-
CollapsedComponent: reactDesc.PropTypes.func.description('A component which is renderer when the left-nav is collapsed'),
|
|
13
|
-
itemOpts: reactDesc.PropTypes.object.description('Item options')
|
|
14
|
-
};
|
|
15
|
-
const leftNavigationProps = {
|
|
16
|
-
containerProps: reactDesc.PropTypes.shape({
|
|
17
|
-
expandedWidth: reactDesc.PropTypes.string
|
|
18
|
-
}).description('Set of Properties attached to the main container').defaultValue({
|
|
19
|
-
expandedWidth: '240px'
|
|
20
|
-
}),
|
|
21
|
-
expanded: reactDesc.PropTypes.bool.description('Whether to show the left navigation expanded or collapsed').defaultValue(false),
|
|
22
|
-
loading: reactDesc.PropTypes.bool.description('Whether the left-nav is loading').defaultValue(false),
|
|
23
|
-
tabIndex: reactDesc.PropTypes.number.description('Tab index').defaultValue(0),
|
|
24
|
-
openedItem: reactDesc.PropTypes.string.description('The id of the left navigation item you want to be opened').defaultValue(null),
|
|
25
|
-
footerLabel: reactDesc.PropTypes.string.description('The label to show in the footer item'),
|
|
26
|
-
onFooterExpand: reactDesc.PropTypes.func.description('The function to call when the left-nav is opened via the footer'),
|
|
27
|
-
onFooterClose: reactDesc.PropTypes.func.description('The function to call when the left-nav is closed via the footer'),
|
|
28
|
-
onSelectedChange: reactDesc.PropTypes.func.description('A callback which triggers when the selected item changes').defaultValue(() => null),
|
|
29
|
-
onFocusChange: reactDesc.PropTypes.func.description('A callback which triggers when the focused item changes').defaultValue(() => null),
|
|
30
|
-
items: reactDesc.PropTypes.arrayOf(reactDesc.PropTypes.object).description('The array of items you want to render inside the left nav').defaultValue([]),
|
|
31
|
-
disableDefaultSelection: reactDesc.PropTypes.bool.description('Whether you do not want to automatically select the first body item').defaultValue(false)
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
const LeftNavItemProps = () => null;
|
|
35
|
-
|
|
36
|
-
const LeftNavItemPropsSchema = reactDesc.describe(LeftNavItemProps);
|
|
37
|
-
LeftNavItemPropsSchema.propTypes = leftNavItemProps;
|
|
38
|
-
|
|
39
|
-
const LeftNavItemOptions = () => null;
|
|
40
|
-
|
|
41
|
-
const LeftNavItemOptionsSchema = reactDesc.describe(LeftNavItemOptions);
|
|
42
|
-
LeftNavItemOptionsSchema.propTypes = leftNavItemProps;
|
|
43
|
-
|
|
44
|
-
exports.LeftNavItemOptionsSchema = LeftNavItemOptionsSchema;
|
|
45
|
-
exports.LeftNavItemPropsSchema = LeftNavItemPropsSchema;
|
|
46
|
-
exports.leftNavItemProps = leftNavItemProps;
|
|
47
|
-
exports.leftNavigationProps = leftNavigationProps;
|
package/esm/LeftNavigation.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
-
import 'react';
|
|
3
|
-
import { describe } from 'react-desc';
|
|
4
|
-
import { leftNavigationProps } from './prop-types.js';
|
|
5
|
-
import { LeftNavContext, defaultProps } from './LeftNavigationContext.js';
|
|
6
|
-
import { useLeftNavConfig } from './configs/useLeftNavConfig.js';
|
|
7
|
-
import LeftNavContent from './parts/LeftNavContent/index.js';
|
|
8
|
-
|
|
9
|
-
var _LeftNavContent;
|
|
10
|
-
const LeftNavigation = props => {
|
|
11
|
-
const leftNavConfig = useLeftNavConfig(props);
|
|
12
|
-
return /*#__PURE__*/_jsx(LeftNavContext.Provider, {
|
|
13
|
-
value: leftNavConfig
|
|
14
|
-
}, void 0, _LeftNavContent || (_LeftNavContent = /*#__PURE__*/_jsx(LeftNavContent, {})));
|
|
15
|
-
};
|
|
16
|
-
LeftNavigation.defaultProps = defaultProps;
|
|
17
|
-
const LeftNavigationWithSchema = describe(LeftNavigation).description('Left Navigation');
|
|
18
|
-
LeftNavigationWithSchema.propTypes = leftNavigationProps;
|
|
19
|
-
|
|
20
|
-
export { LeftNavigation, LeftNavigationWithSchema };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
const commonItemBackgroundStyle = (color, hoverColor, activeColor) => "\n\n background: ".concat(color, ";\n\n :hover {\n background: ").concat(hoverColor, ";\n }\n\n :active {\n background: ").concat(activeColor, ";\n }\n");
|
|
2
|
-
|
|
3
|
-
const getItemBackgroundStyle = props => {
|
|
4
|
-
if (props.selected && !props.opened) return commonItemBackgroundStyle(props.theme.colors.brand[200], props.theme.colors.brand[200], props.theme.colors.brand[200]);
|
|
5
|
-
return commonItemBackgroundStyle(props.theme.colors.neutral['000'], props.theme.colors.neutral['080'], props.theme.colors.brand[200]);
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export { getItemBackgroundStyle };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
const commonLeftBorderStyle = (color, hoverColor, activeColor) => "\n\n -webkit-box-shadow: inset 4px 0 0 0 ".concat(color, ";\n box-shadow: inset 4px 0 0 0 ").concat(color, ";\n\n :hover {\n -webkit-box-shadow: inset 4px 0 0 0 ").concat(hoverColor, ";\n box-shadow: inset 4px 0 0 0 ").concat(hoverColor, ";\n }\n\n :active {\n -webkit-box-shadow: inset 4px 0 0 0 ").concat(activeColor, ";\n box-shadow: inset 4px 0 0 0 ").concat(activeColor, ";\n }\n");
|
|
2
|
-
|
|
3
|
-
const getLeftBorderStyle = props => {
|
|
4
|
-
if (props.selected || props.selectedParent) return commonLeftBorderStyle(props.theme.colors.brand[400], props.theme.colors.brand[400], props.theme.colors.brand[400]);
|
|
5
|
-
return commonLeftBorderStyle(props.theme.colors.neutral['000'], props.theme.colors.brand[300], props.theme.colors.brand[400]);
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export { getLeftBorderStyle };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
const getScrolbarStyle = () => "\n ::-webkit-scrollbar {\n width: 14px;\n }\n ::-webkit-scrollbar-thumb {\n height: 6px;\n border: 4px solid rgba(0, 0, 0, 0);\n\n background-clip: padding-box;\n\n background-color: rgba(105, 116, 137, 0.5);\n\n border-radius: 7px;\n -webkit-border-radius: 7px;\n }\n ::-webkit-scrollbar-button {\n width: 0;\n height: 0;\n display: none;\n }\n ::-webkit-scrollbar-corner {\n background-color: transparent;\n }\n";
|
|
2
|
-
|
|
3
|
-
export { getScrolbarStyle };
|
package/esm/common/index.js
DELETED
package/esm/configs/index.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { useLeftNavItems } from './useLeftNavItems.js';
|
|
4
|
-
import { useLeftNavSmoothExpand } from './useLeftNavSmoothExpand.js';
|
|
5
|
-
import { useSelectFirstBodyItem } from '../hooks/useSelectFirstBodyItem.js';
|
|
6
|
-
|
|
7
|
-
const useLeftNavConfig = props => {
|
|
8
|
-
const {
|
|
9
|
-
expanded,
|
|
10
|
-
openedItem,
|
|
11
|
-
onSelectedChange,
|
|
12
|
-
onFocusChange,
|
|
13
|
-
items
|
|
14
|
-
} = props; // -----------------------------------------------------------------------------
|
|
15
|
-
// ************************** ------------ **************************
|
|
16
|
-
// * INTERNAL STATE *
|
|
17
|
-
// ************************** ------------ **************************
|
|
18
|
-
// Selection related
|
|
19
|
-
|
|
20
|
-
const [selectedItem, setSelectedItem] = React.useState(null);
|
|
21
|
-
const [selectedParent, setSelectedParent] = React.useState(null); // Focus related
|
|
22
|
-
|
|
23
|
-
const [focusedItem, setFocusedItem] = React.useState(null); // Opened uncontrolled drilldowns
|
|
24
|
-
|
|
25
|
-
const [openedDrilldowns, setOpenedDrilldowns] = React.useState([]); // -----------------------------------------------------------------------------
|
|
26
|
-
// ************************** ------------ **************************
|
|
27
|
-
// * EXPAND ANIMATION *
|
|
28
|
-
// ************************** ------------ **************************
|
|
29
|
-
|
|
30
|
-
const [expandedForAnimation, setExpandedForAnimation] = React.useState(expanded);
|
|
31
|
-
const timeoutRef = React.useRef(null);
|
|
32
|
-
const smoothExpandOpts = React.useMemo(() => ({
|
|
33
|
-
expandedForAnimation,
|
|
34
|
-
timeoutRef,
|
|
35
|
-
setExpandedForAnimation
|
|
36
|
-
}), [expandedForAnimation, timeoutRef, setExpandedForAnimation]);
|
|
37
|
-
useLeftNavSmoothExpand(props, smoothExpandOpts); // -----------------------------------------------------------------------------
|
|
38
|
-
// ************************** ------------ **************************
|
|
39
|
-
// * SIDE EFFECTS *
|
|
40
|
-
// ************************** ------------ **************************
|
|
41
|
-
|
|
42
|
-
React.useEffect(() => {
|
|
43
|
-
onSelectedChange(selectedItem);
|
|
44
|
-
}, [selectedItem, onSelectedChange]);
|
|
45
|
-
React.useEffect(() => {
|
|
46
|
-
if (props.actionRef && props.actionRef.current) {
|
|
47
|
-
props.actionRef.current.setFocusedItem = setFocusedItem;
|
|
48
|
-
}
|
|
49
|
-
}, [props.actionRef]);
|
|
50
|
-
React.useEffect(() => {
|
|
51
|
-
if (openedItem !== null) setSelectedParent(openedItem);
|
|
52
|
-
}, [openedItem]);
|
|
53
|
-
React.useEffect(() => {
|
|
54
|
-
onFocusChange(focusedItem);
|
|
55
|
-
}, [focusedItem, onFocusChange]);
|
|
56
|
-
useSelectFirstBodyItem(items, openedItem, props.selectedItem !== undefined ? props.selectedItem : selectedItem, setSelectedItem, props.disableDefaultSelection); // -----------------------------------------------------------------------------
|
|
57
|
-
// ************************** ------------ **************************
|
|
58
|
-
// * ITEMS MANAGEMENT *
|
|
59
|
-
// ************************** ------------ **************************
|
|
60
|
-
|
|
61
|
-
const leftNavItemsProps = React.useMemo(() => ({
|
|
62
|
-
headerItem: props.HeaderComponent,
|
|
63
|
-
bodyHeaderItem: props.BodyHeaderComponent,
|
|
64
|
-
items: props.items,
|
|
65
|
-
openedDrilldowns
|
|
66
|
-
}), [props.HeaderComponent, props.BodyHeaderComponent, props.items, openedDrilldowns]); // We need to know the current visible items since we have drilldowns
|
|
67
|
-
|
|
68
|
-
const {
|
|
69
|
-
visibleItems,
|
|
70
|
-
visibleItemsRefs
|
|
71
|
-
} = useLeftNavItems(leftNavItemsProps); // -----------------------------------------------------------------------------
|
|
72
|
-
// ************************** ------------ **************************
|
|
73
|
-
// * LEFTNAV CONFIG *
|
|
74
|
-
// ************************** ------------ **************************
|
|
75
|
-
|
|
76
|
-
const finalConfig = React.useMemo(() => ({
|
|
77
|
-
leftNavProps: props,
|
|
78
|
-
expandedForAnimation,
|
|
79
|
-
selectedItem: props.selectedItem !== undefined ? props.selectedItem : selectedItem,
|
|
80
|
-
setSelectedItem,
|
|
81
|
-
selectedParent: props.selectedParent !== undefined ? props.selectedParent : selectedParent,
|
|
82
|
-
setSelectedParent,
|
|
83
|
-
focusedItem,
|
|
84
|
-
setFocusedItem,
|
|
85
|
-
openedDrilldowns,
|
|
86
|
-
setOpenedDrilldowns,
|
|
87
|
-
visibleItems,
|
|
88
|
-
visibleItemsRefs
|
|
89
|
-
}), [props, expandedForAnimation, selectedItem, setSelectedItem, setSelectedParent, selectedParent, focusedItem, setFocusedItem, openedDrilldowns, setOpenedDrilldowns, visibleItems, visibleItemsRefs]);
|
|
90
|
-
return finalConfig;
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
export { useLeftNavConfig as default, useLeftNavConfig };
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
2
|
-
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
-
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
4
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
5
|
-
import { useMemo, useRef, createRef } from 'react';
|
|
6
|
-
import { ITEM_TYPES, FOOTER_DS_ID } from '../exported-related/constants.js';
|
|
7
|
-
import '@babel/runtime/helpers/esm/jsx';
|
|
8
|
-
import '@elliemae/ds-grid';
|
|
9
|
-
import 'styled-components';
|
|
10
|
-
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
11
|
-
import 'core-js/modules/esnext.iterator.filter.js';
|
|
12
|
-
import '@babel/runtime/helpers/esm/defineProperty';
|
|
13
|
-
import 'react/jsx-runtime';
|
|
14
|
-
import '@elliemae/ds-icons';
|
|
15
|
-
|
|
16
|
-
const notFocuseableItems = [ITEM_TYPES.LEFT_NAV_ITEM_SEPARATOR, ITEM_TYPES.LEFT_NAV_ITEM_SECTION]; // Walks the array of items
|
|
17
|
-
// Drilldowns are tree-like structures
|
|
18
|
-
|
|
19
|
-
const walkItems = (items, openedDrilldowns, callback) => {
|
|
20
|
-
items.forEach(item => {
|
|
21
|
-
if (typeof item.type === 'string') {
|
|
22
|
-
var _item$itemOpts$items, _item$itemOpts, _item$itemOpts2, _item$itemOpts$items2, _item$itemOpts3;
|
|
23
|
-
|
|
24
|
-
// Out of the box item
|
|
25
|
-
if (notFocuseableItems.includes(item.type)) return; // not focuseable
|
|
26
|
-
|
|
27
|
-
callback(item.dsId); // If it's an opened uncontrolled drilldown
|
|
28
|
-
|
|
29
|
-
if (item.type === ITEM_TYPES.LEFT_NAV_ITEM_UNCONTROLLED_DRILLDOWN && openedDrilldowns.includes(item.dsId)) walkItems((_item$itemOpts$items = (_item$itemOpts = item.itemOpts) === null || _item$itemOpts === void 0 ? void 0 : _item$itemOpts.items) !== null && _item$itemOpts$items !== void 0 ? _item$itemOpts$items : [], openedDrilldowns, callback); // If it's an opened controlled drilldown
|
|
30
|
-
|
|
31
|
-
if (item.type === ITEM_TYPES.LEFT_NAV_ITEM_CONTROLLED_DRILLDOWN && (_item$itemOpts2 = item.itemOpts) !== null && _item$itemOpts2 !== void 0 && _item$itemOpts2.isOpened) walkItems((_item$itemOpts$items2 = (_item$itemOpts3 = item.itemOpts) === null || _item$itemOpts3 === void 0 ? void 0 : _item$itemOpts3.items) !== null && _item$itemOpts$items2 !== void 0 ? _item$itemOpts$items2 : [], openedDrilldowns, callback);
|
|
32
|
-
} else {
|
|
33
|
-
var _item$itemOpts4;
|
|
34
|
-
|
|
35
|
-
// Custom item
|
|
36
|
-
if (!((_item$itemOpts4 = item.itemOpts) !== null && _item$itemOpts4 !== void 0 && _item$itemOpts4.focuseable)) return; // not focuseable specified
|
|
37
|
-
|
|
38
|
-
callback(item.dsId);
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
const useLeftNavItems = props => {
|
|
44
|
-
const {
|
|
45
|
-
headerItem,
|
|
46
|
-
bodyHeaderItem,
|
|
47
|
-
items: bodyItems,
|
|
48
|
-
openedDrilldowns
|
|
49
|
-
} = props; // Place the header and body header items into the array of items
|
|
50
|
-
|
|
51
|
-
const items = useMemo(() => {
|
|
52
|
-
const itemsArray = [...bodyItems];
|
|
53
|
-
if (bodyHeaderItem) itemsArray.unshift(bodyHeaderItem);
|
|
54
|
-
if (headerItem) itemsArray.unshift(headerItem);
|
|
55
|
-
return itemsArray;
|
|
56
|
-
}, [headerItem, bodyHeaderItem, bodyItems]);
|
|
57
|
-
const visibleItemsRefs = useRef({});
|
|
58
|
-
const visibleItems = useMemo(() => {
|
|
59
|
-
const visibleItemsArray = [];
|
|
60
|
-
walkItems(items, openedDrilldowns, dsId => {
|
|
61
|
-
visibleItemsArray.push(dsId);
|
|
62
|
-
});
|
|
63
|
-
visibleItemsArray.push(FOOTER_DS_ID);
|
|
64
|
-
return visibleItemsArray;
|
|
65
|
-
}, [items, openedDrilldowns]);
|
|
66
|
-
visibleItems.forEach(dsId => {
|
|
67
|
-
if (!(dsId in visibleItemsRefs.current)) visibleItemsRefs.current[dsId] = /*#__PURE__*/createRef();
|
|
68
|
-
});
|
|
69
|
-
return {
|
|
70
|
-
visibleItems,
|
|
71
|
-
visibleItemsRefs
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
export { useLeftNavItems as default, useLeftNavItems };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
const useLeftNavSmoothExpand = (props, smoothExpandOpts) => {
|
|
4
|
-
const {
|
|
5
|
-
expanded
|
|
6
|
-
} = props;
|
|
7
|
-
const {
|
|
8
|
-
expandedForAnimation,
|
|
9
|
-
timeoutRef,
|
|
10
|
-
setExpandedForAnimation
|
|
11
|
-
} = smoothExpandOpts;
|
|
12
|
-
React.useEffect(() => {
|
|
13
|
-
// If expanded changes, we need to smoothly transition to the non-expanded state
|
|
14
|
-
// so we need to wait for 350ms
|
|
15
|
-
if (!expanded && expandedForAnimation) {
|
|
16
|
-
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
17
|
-
timeoutRef.current = setTimeout(() => setExpandedForAnimation(false), 350);
|
|
18
|
-
} else if (expanded) setExpandedForAnimation(true); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
19
|
-
|
|
20
|
-
}, [expanded]);
|
|
21
|
-
React.useEffect(() => () => {
|
|
22
|
-
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
23
|
-
}, [timeoutRef]);
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export { useLeftNavSmoothExpand as default, useLeftNavSmoothExpand };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
-
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
-
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
-
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
-
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
7
|
-
import 'react';
|
|
8
|
-
import { ChevronSmallRight } from '@elliemae/ds-icons';
|
|
9
|
-
import { jsx } from 'react/jsx-runtime';
|
|
10
|
-
|
|
11
|
-
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; }
|
|
12
|
-
|
|
13
|
-
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; }
|
|
14
|
-
const ChevronItem = props => /*#__PURE__*/jsx(ChevronSmallRight, _objectSpread({
|
|
15
|
-
size: "m",
|
|
16
|
-
color: ['brand-primary', 800]
|
|
17
|
-
}, props));
|
|
18
|
-
|
|
19
|
-
export { ChevronItem, ChevronItem as default };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
-
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
-
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
-
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
-
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
7
|
-
import 'react';
|
|
8
|
-
import styled from 'styled-components';
|
|
9
|
-
import { jsx } from 'react/jsx-runtime';
|
|
10
|
-
|
|
11
|
-
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; }
|
|
12
|
-
|
|
13
|
-
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; }
|
|
14
|
-
|
|
15
|
-
const AugmentedIcon = Icon => styled(Icon).withConfig({
|
|
16
|
-
componentId: "sc-1eek2uh-0"
|
|
17
|
-
})(["cursor:pointer;outline:0;:focus,:active{outline:1px solid #1e79c2;}"]);
|
|
18
|
-
|
|
19
|
-
const Icon = IconComponent => props => {
|
|
20
|
-
const StyledComponent = AugmentedIcon(IconComponent);
|
|
21
|
-
return /*#__PURE__*/jsx(StyledComponent, _objectSpread({
|
|
22
|
-
color: ['brand-primary', 800],
|
|
23
|
-
tabIndex: 0
|
|
24
|
-
}, props));
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export { Icon };
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
-
import { useContext, useCallback, useMemo } from 'react';
|
|
3
|
-
import Grid from '@elliemae/ds-grid';
|
|
4
|
-
import { StyledItemWrapper, StyledItem } from './styled.js';
|
|
5
|
-
import { LeftNavContext } from '../../LeftNavigationContext.js';
|
|
6
|
-
import { usePropsWithDefaults } from './usePropsWithDefaults.js';
|
|
7
|
-
import { useKeyboardNavigation } from '../../hooks/useKeyboardNavigation.js';
|
|
8
|
-
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
9
|
-
|
|
10
|
-
const ItemRenderer = props => {
|
|
11
|
-
const propsWithDefault = usePropsWithDefaults(props);
|
|
12
|
-
const {
|
|
13
|
-
item,
|
|
14
|
-
item: {
|
|
15
|
-
dsId,
|
|
16
|
-
itemOpts: {
|
|
17
|
-
selectable,
|
|
18
|
-
focuseable,
|
|
19
|
-
indent,
|
|
20
|
-
ariaLabel,
|
|
21
|
-
ariaRole,
|
|
22
|
-
ariaLive,
|
|
23
|
-
ariaExpanded,
|
|
24
|
-
ariaDescribedBy
|
|
25
|
-
},
|
|
26
|
-
CollapsedComponent
|
|
27
|
-
},
|
|
28
|
-
subitems,
|
|
29
|
-
minHeight,
|
|
30
|
-
paddingTop,
|
|
31
|
-
onClick,
|
|
32
|
-
shadowStyle,
|
|
33
|
-
hasBorderBottom,
|
|
34
|
-
borderBottomMr,
|
|
35
|
-
children
|
|
36
|
-
} = propsWithDefault;
|
|
37
|
-
const ctx = useContext(LeftNavContext);
|
|
38
|
-
const {
|
|
39
|
-
leftNavProps: {
|
|
40
|
-
onItemClick,
|
|
41
|
-
openedItem
|
|
42
|
-
},
|
|
43
|
-
expandedForAnimation,
|
|
44
|
-
selectedParent,
|
|
45
|
-
selectedItem,
|
|
46
|
-
setSelectedItem,
|
|
47
|
-
setFocusedItem,
|
|
48
|
-
visibleItemsRefs
|
|
49
|
-
} = ctx;
|
|
50
|
-
const opened = dsId === openedItem;
|
|
51
|
-
const handleOnClick = useCallback(e => {
|
|
52
|
-
if (onClick) onClick(); // used by uncontrolled drilldowns
|
|
53
|
-
|
|
54
|
-
onItemClick(item, e);
|
|
55
|
-
if (selectable) setSelectedItem(item.dsId);
|
|
56
|
-
}, [onItemClick, item, setSelectedItem, selectable, onClick]);
|
|
57
|
-
const handleFocus = useCallback(() => {
|
|
58
|
-
if (focuseable) setFocusedItem(dsId);
|
|
59
|
-
}, [dsId, setFocusedItem, focuseable]);
|
|
60
|
-
const onKeyDown = useKeyboardNavigation({
|
|
61
|
-
item,
|
|
62
|
-
onClick: handleOnClick
|
|
63
|
-
});
|
|
64
|
-
const cols = useMemo(() => expandedForAnimation ? ['auto', '1fr', 'auto'] : ['38px'], [expandedForAnimation]);
|
|
65
|
-
const isSelected = useMemo(() => selectedItem === dsId, [selectedItem, dsId]);
|
|
66
|
-
|
|
67
|
-
if (!expandedForAnimation && !CollapsedComponent) {
|
|
68
|
-
return null;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
return /*#__PURE__*/jsxs(Fragment, {
|
|
72
|
-
children: [/*#__PURE__*/_jsx(StyledItemWrapper, {
|
|
73
|
-
shadowStyle: shadowStyle(opened, item.type),
|
|
74
|
-
"data-testid": "leftnav-item-wrapper"
|
|
75
|
-
}, void 0, /*#__PURE__*/jsx(StyledItem, {
|
|
76
|
-
ref: visibleItemsRefs.current[dsId],
|
|
77
|
-
pt: paddingTop,
|
|
78
|
-
pl: indent === undefined ? 'xxxs' : "".concat(indent, "px"),
|
|
79
|
-
minHeight: minHeight,
|
|
80
|
-
shadowStyle: shadowStyle(opened, item.type),
|
|
81
|
-
alignItems: "flex-start",
|
|
82
|
-
cols: cols,
|
|
83
|
-
onClick: !opened ? handleOnClick : () => null,
|
|
84
|
-
onKeyDown: onKeyDown,
|
|
85
|
-
selectable: selectable,
|
|
86
|
-
selected: isSelected,
|
|
87
|
-
selectedParent: selectedParent === dsId,
|
|
88
|
-
opened: opened,
|
|
89
|
-
onFocus: handleFocus,
|
|
90
|
-
"data-testid": "leftnav-item-container",
|
|
91
|
-
tabIndex: focuseable ? 0 : -1,
|
|
92
|
-
"aria-describedby": ariaDescribedBy,
|
|
93
|
-
"aria-expanded": ariaExpanded,
|
|
94
|
-
role: ariaRole,
|
|
95
|
-
"data-selected": isSelected,
|
|
96
|
-
"data-selectedparent": selectedParent === dsId,
|
|
97
|
-
"aria-label": ariaLabel,
|
|
98
|
-
"aria-hidden": !focuseable,
|
|
99
|
-
"aria-live": ariaLive,
|
|
100
|
-
children: !expandedForAnimation ? /*#__PURE__*/_jsx(Grid, {
|
|
101
|
-
"data-testid": "leftnav-leftcomponent",
|
|
102
|
-
justifyContent: "center"
|
|
103
|
-
}, void 0, /*#__PURE__*/_jsx(CollapsedComponent, {
|
|
104
|
-
item: item,
|
|
105
|
-
ctx: ctx
|
|
106
|
-
})) : children
|
|
107
|
-
}), hasBorderBottom && /*#__PURE__*/_jsx("div", {
|
|
108
|
-
style: {
|
|
109
|
-
marginLeft: opened ? '16px' : '0px',
|
|
110
|
-
marginRight: borderBottomMr,
|
|
111
|
-
height: '1px',
|
|
112
|
-
width: "calc(100% - ".concat(borderBottomMr, " - ").concat(opened ? '16px' : '0px', ")"),
|
|
113
|
-
backgroundColor: '#E0E3E8'
|
|
114
|
-
}
|
|
115
|
-
})), subitems]
|
|
116
|
-
});
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
export { ItemRenderer };
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import Grid from '@elliemae/ds-grid';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
|
|
4
|
-
/* eslint-disable indent */
|
|
5
|
-
const borderOutside = function (color) {
|
|
6
|
-
let weight = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
7
|
-
return "&:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: ".concat(weight, "px solid ").concat(color, ";\n pointer-events: none;\n}");
|
|
8
|
-
};
|
|
9
|
-
const StyledItemWrapper = /*#__PURE__*/styled(Grid).withConfig({
|
|
10
|
-
componentId: "sc-11wzgfh-0"
|
|
11
|
-
})(["position:relative;", ""], props => props.shadowStyle(props.theme));
|
|
12
|
-
|
|
13
|
-
const getItemBackground = _ref => {
|
|
14
|
-
let {
|
|
15
|
-
selectable,
|
|
16
|
-
opened,
|
|
17
|
-
selected,
|
|
18
|
-
theme
|
|
19
|
-
} = _ref;
|
|
20
|
-
if (!selectable) return 'white';
|
|
21
|
-
if (selected && !opened) return theme.colors.brand[200];
|
|
22
|
-
return theme.colors.neutral['000'];
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const getItemHoverBackground = _ref2 => {
|
|
26
|
-
let {
|
|
27
|
-
selectable,
|
|
28
|
-
opened,
|
|
29
|
-
selected,
|
|
30
|
-
theme
|
|
31
|
-
} = _ref2;
|
|
32
|
-
if (!selectable) return 'white';
|
|
33
|
-
if (selected && !opened) return theme.colors.brand[200];
|
|
34
|
-
return theme.colors.brand['200'];
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const StyledItem = /*#__PURE__*/styled(Grid).withConfig({
|
|
38
|
-
componentId: "sc-11wzgfh-1"
|
|
39
|
-
})(["cursor:", ";min-height:", ";background:", ";", ":hover{background:", ";}:active{background:", ";}", ";outline:none;", ""], props => props.selectable && !props.opened ? 'pointer' : 'auto', props => props.minHeight, getItemBackground, props => props.selected && !props.opened ? borderOutside(props.theme.colors.brand[500], 1) : '', getItemHoverBackground, _ref3 => {
|
|
40
|
-
let {
|
|
41
|
-
selectable,
|
|
42
|
-
theme
|
|
43
|
-
} = _ref3;
|
|
44
|
-
return selectable ? theme.colors.brand[200] : 'white';
|
|
45
|
-
}, props => props.shadowStyle(props.theme), props => props.tabIndex !== -1 ? ":focus {\n ".concat(borderOutside(props.theme.colors.brand[700]), "\n }") : '');
|
|
46
|
-
|
|
47
|
-
export { StyledItem, StyledItemWrapper, borderOutside };
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
-
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
-
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
-
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
-
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
7
|
-
import { useMemo } from 'react';
|
|
8
|
-
|
|
9
|
-
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; }
|
|
10
|
-
|
|
11
|
-
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; }
|
|
12
|
-
const itemDefaultProps = {
|
|
13
|
-
label: '',
|
|
14
|
-
labelOverflow: 'truncate',
|
|
15
|
-
selectable: true,
|
|
16
|
-
focuseable: true,
|
|
17
|
-
openable: false,
|
|
18
|
-
closable: false,
|
|
19
|
-
ariaLabel: '',
|
|
20
|
-
ariaRole: 'menuitem',
|
|
21
|
-
ariaLive: 'off',
|
|
22
|
-
ariaExpanded: undefined,
|
|
23
|
-
ariaDescribedBy: undefined
|
|
24
|
-
};
|
|
25
|
-
const itemWithoutShadows = ['ds-left-nav-item-header', 'ds-left-nav-item-link', 'ds-left-nav-item-submenu']; // Make use Item props with defaults
|
|
26
|
-
|
|
27
|
-
const usePropsWithDefaults = props => {
|
|
28
|
-
const propsWithDefault = useMemo(() => {
|
|
29
|
-
const itemWithDefaults = _objectSpread(_objectSpread({
|
|
30
|
-
CollapsedComponent: () => null
|
|
31
|
-
}, props.item), {}, {
|
|
32
|
-
itemOpts: _objectSpread(_objectSpread({}, itemDefaultProps), props.item.itemOpts)
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
return _objectSpread(_objectSpread({
|
|
36
|
-
minHeight: '48px',
|
|
37
|
-
paddingTop: '12px',
|
|
38
|
-
subitems: [],
|
|
39
|
-
shadowStyle: (opened, type) => theme => "box-shadow: ".concat(opened || !itemWithoutShadows.includes(type) ? 'inset 4px 0 0 0 #52A6EC' : 'inset 4px 0 0 0 white'),
|
|
40
|
-
hasBorderBottom: false,
|
|
41
|
-
borderBottomMr: '0px'
|
|
42
|
-
}, props), {}, {
|
|
43
|
-
item: itemWithDefaults
|
|
44
|
-
});
|
|
45
|
-
}, [props]);
|
|
46
|
-
return propsWithDefault;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export { usePropsWithDefaults };
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
-
import 'react';
|
|
3
|
-
import { Notifications as Notifications$1, ExceptionsSmallFill, AlertsSmallFill, MessagesSmallFill } from '@elliemae/ds-icons';
|
|
4
|
-
import styled from 'styled-components';
|
|
5
|
-
import Grid from '@elliemae/ds-grid';
|
|
6
|
-
|
|
7
|
-
const StyledIcon = /*#__PURE__*/styled.div.withConfig({
|
|
8
|
-
componentId: "sc-hasbsd-0"
|
|
9
|
-
})(["display:flex;flex-direction:column;align-items:center;"]);
|
|
10
|
-
const Notifications = _ref => {
|
|
11
|
-
let {
|
|
12
|
-
exceptions = false,
|
|
13
|
-
alerts = false,
|
|
14
|
-
messages = false
|
|
15
|
-
} = _ref;
|
|
16
|
-
return /*#__PURE__*/_jsx(StyledIcon, {}, void 0, /*#__PURE__*/_jsx(Notifications$1, {
|
|
17
|
-
size: "m",
|
|
18
|
-
color: ['brand-primary', 800],
|
|
19
|
-
"data-testid": "left-nav-notifications-icon"
|
|
20
|
-
}), (exceptions || alerts || messages) && /*#__PURE__*/_jsx(Grid, {
|
|
21
|
-
cols: ['1fr', '1fr', '1fr'],
|
|
22
|
-
gutter: "xxxs",
|
|
23
|
-
mt: "2px"
|
|
24
|
-
}, void 0, /*#__PURE__*/_jsx(Grid, {
|
|
25
|
-
width: "6px",
|
|
26
|
-
height: "6px",
|
|
27
|
-
"data-testid": "left-nav-exceptions-icon"
|
|
28
|
-
}, void 0, exceptions && /*#__PURE__*/_jsx(ExceptionsSmallFill, {
|
|
29
|
-
width: "6px",
|
|
30
|
-
height: "6px",
|
|
31
|
-
color: ['warning', 900]
|
|
32
|
-
})), /*#__PURE__*/_jsx(Grid, {
|
|
33
|
-
width: "6px",
|
|
34
|
-
height: "6px",
|
|
35
|
-
"data-testid": "left-nav-alerts-icon"
|
|
36
|
-
}, void 0, alerts && /*#__PURE__*/_jsx(AlertsSmallFill, {
|
|
37
|
-
width: "6px",
|
|
38
|
-
height: "6px",
|
|
39
|
-
color: ['danger', 900]
|
|
40
|
-
})), /*#__PURE__*/_jsx(Grid, {
|
|
41
|
-
width: "6px",
|
|
42
|
-
height: "6px",
|
|
43
|
-
"data-testid": "left-nav-messages-icon"
|
|
44
|
-
}, void 0, messages && /*#__PURE__*/_jsx(MessagesSmallFill, {
|
|
45
|
-
width: "6px",
|
|
46
|
-
height: "6px",
|
|
47
|
-
color: ['success', 900]
|
|
48
|
-
}))));
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
export { Notifications, Notifications as default };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
-
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
-
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
-
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
-
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
7
|
-
import 'react';
|
|
8
|
-
import styled from 'styled-components';
|
|
9
|
-
import { OpenWindow as OpenWindow$1 } from '@elliemae/ds-icons';
|
|
10
|
-
import { jsx } from 'react/jsx-runtime';
|
|
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 StyledOpenWindow = /*#__PURE__*/styled(OpenWindow$1).withConfig({
|
|
16
|
-
componentId: "sc-g53ios-0"
|
|
17
|
-
})(["cursor:pointer;:focus{outline:1px solid ", ";}"], props => props.theme.colors.brand[800]);
|
|
18
|
-
const OpenWindow = props => /*#__PURE__*/jsx(StyledOpenWindow, _objectSpread({
|
|
19
|
-
size: "s",
|
|
20
|
-
color: ['brand-primary', 800]
|
|
21
|
-
}, props));
|
|
22
|
-
|
|
23
|
-
export { OpenWindow, OpenWindow as default };
|