@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
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
const LABEL_OVERFLOW = {
|
|
2
|
-
WRAP: 'wrap',
|
|
3
|
-
WRAP_ALL: 'wrapAll',
|
|
4
|
-
TRUNCATE: 'truncate'
|
|
5
|
-
};
|
|
6
|
-
const ITEM_TYPES = {
|
|
7
|
-
LEFT_NAV_ITEM_HEADER: 'ds-left-nav-item-header',
|
|
8
|
-
LEFT_NAV_ITEM_LINK: 'ds-left-nav-item-link',
|
|
9
|
-
LEFT_NAV_ITEM_SUBMENU: 'ds-left-nav-item-submenu',
|
|
10
|
-
LEFT_NAV_ITEM_CONTROLLED_DRILLDOWN: 'ds-left-nav-item-controlled-drilldown',
|
|
11
|
-
LEFT_NAV_ITEM_UNCONTROLLED_DRILLDOWN: 'ds-left-nav-item-uncontrolled-drilldown',
|
|
12
|
-
LEFT_NAV_ITEM_SECTION: 'ds-left-nav-item-section',
|
|
13
|
-
LEFT_NAV_ITEM_SEPARATOR: 'ds-left-nav-item-separator',
|
|
14
|
-
LEFT_NAV_ITEM_TEXT_LABEL: 'ds-left-nav-item-text-label',
|
|
15
|
-
LEFT_NAV_ITEM_WITH_DATE: 'ds-left-nav-item-with-date'
|
|
16
|
-
};
|
|
17
|
-
const FOOTER_DS_ID = 'ds-left-nav-__internal__-footer';
|
|
18
|
-
const FOOTER_MENU_CLOSE_DS_ID = 'ds-left-nav-__internal__-footer-menu-close';
|
|
19
|
-
const CHEVRON_BACK_DS_ID = 'ds-left-nav-__internal__-chevron-back';
|
|
20
|
-
|
|
21
|
-
export { CHEVRON_BACK_DS_ID, FOOTER_DS_ID, FOOTER_MENU_CLOSE_DS_ID, ITEM_TYPES, LABEL_OVERFLOW };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { CHEVRON_BACK_DS_ID, FOOTER_DS_ID, FOOTER_MENU_CLOSE_DS_ID, ITEM_TYPES, LABEL_OVERFLOW } from './constants.js';
|
|
2
|
-
export { ItemRenderer } from './ItemRenderer/index.js';
|
|
3
|
-
export { ChevronItem } from './ChevronItem/index.js';
|
|
4
|
-
export { Notifications } from './Notifications/index.js';
|
|
5
|
-
export { OpenWindow } from './OpenWindowItem/index.js';
|
|
6
|
-
export { Icon } from './Icon/index.js';
|
package/esm/hooks/index.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { useContext, useCallback } from 'react';
|
|
2
|
-
import { LeftNavContext } from '../LeftNavigationContext.js';
|
|
3
|
-
|
|
4
|
-
const useExpandableOnClickHandler = _ref => {
|
|
5
|
-
let {
|
|
6
|
-
id,
|
|
7
|
-
onExpand,
|
|
8
|
-
onOpen,
|
|
9
|
-
selectable = true
|
|
10
|
-
} = _ref;
|
|
11
|
-
const {
|
|
12
|
-
leftNavProps: {
|
|
13
|
-
expanded
|
|
14
|
-
},
|
|
15
|
-
setSelectedItem
|
|
16
|
-
} = useContext(LeftNavContext);
|
|
17
|
-
const handleOnExpand = useCallback(e => {
|
|
18
|
-
onExpand(e);
|
|
19
|
-
if (selectable) setSelectedItem(id);
|
|
20
|
-
}, [id, onExpand, setSelectedItem, selectable]);
|
|
21
|
-
const handleOnOpen = useCallback(e => {
|
|
22
|
-
onOpen(e);
|
|
23
|
-
if (selectable) setSelectedItem(id);
|
|
24
|
-
}, [id, onOpen, setSelectedItem, selectable]);
|
|
25
|
-
const handleOnClick = useCallback(e => {
|
|
26
|
-
if (!expanded) handleOnExpand(e);else handleOnOpen(e);
|
|
27
|
-
}, [expanded, handleOnExpand, handleOnOpen]);
|
|
28
|
-
return handleOnClick;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export { useExpandableOnClickHandler };
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { useContext, useCallback } from 'react';
|
|
2
|
-
import { LeftNavContext } from '../LeftNavigationContext.js';
|
|
3
|
-
|
|
4
|
-
const useOpenableOnClickHandler = _ref => {
|
|
5
|
-
let {
|
|
6
|
-
id,
|
|
7
|
-
opened,
|
|
8
|
-
onExpand,
|
|
9
|
-
onOpen,
|
|
10
|
-
onClose
|
|
11
|
-
} = _ref;
|
|
12
|
-
const {
|
|
13
|
-
leftNavProps: {
|
|
14
|
-
expanded
|
|
15
|
-
},
|
|
16
|
-
setSelectedItem
|
|
17
|
-
} = useContext(LeftNavContext);
|
|
18
|
-
const handleOnExpand = useCallback(e => {
|
|
19
|
-
onExpand(e);
|
|
20
|
-
setSelectedItem(id);
|
|
21
|
-
}, [id, onExpand, setSelectedItem]);
|
|
22
|
-
const handleOnOpen = useCallback(e => {
|
|
23
|
-
onOpen(e);
|
|
24
|
-
setSelectedItem(id);
|
|
25
|
-
}, [id, onOpen, setSelectedItem]);
|
|
26
|
-
const handleOnClose = useCallback(e => {
|
|
27
|
-
onClose(e);
|
|
28
|
-
setSelectedItem(id);
|
|
29
|
-
}, [id, onClose, setSelectedItem]);
|
|
30
|
-
const handleOnClick = useCallback(e => {
|
|
31
|
-
if (!expanded) handleOnExpand(e);else if (!opened) handleOnOpen(e);else handleOnClose(e);
|
|
32
|
-
}, [expanded, opened, handleOnExpand, handleOnOpen, handleOnClose]);
|
|
33
|
-
return handleOnClick;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export { useOpenableOnClickHandler };
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import 'core-js/modules/esnext.async-iterator.some.js';
|
|
2
|
-
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
-
import 'core-js/modules/esnext.iterator.some.js';
|
|
4
|
-
import { useEffect } from 'react';
|
|
5
|
-
import { ITEM_TYPES } from '../exported-related/constants.js';
|
|
6
|
-
|
|
7
|
-
const {
|
|
8
|
-
LEFT_NAV_ITEM_SEPARATOR,
|
|
9
|
-
LEFT_NAV_ITEM_SECTION
|
|
10
|
-
} = ITEM_TYPES;
|
|
11
|
-
|
|
12
|
-
const isSelectableOutOfTheBox = elem => typeof elem.type === 'string' && elem.type !== LEFT_NAV_ITEM_SEPARATOR && elem.type !== LEFT_NAV_ITEM_SECTION;
|
|
13
|
-
|
|
14
|
-
const isSelectableCustom = elem => elem.itemOpts.selectable;
|
|
15
|
-
|
|
16
|
-
const isItemInsideTheTree = (item, itemID) => {
|
|
17
|
-
var _item$itemOpts, _item$itemOpts$items;
|
|
18
|
-
|
|
19
|
-
return item.dsId === itemID || !!(item !== null && item !== void 0 && (_item$itemOpts = item.itemOpts) !== null && _item$itemOpts !== void 0 && (_item$itemOpts$items = _item$itemOpts.items) !== null && _item$itemOpts$items !== void 0 && _item$itemOpts$items.some(it => isItemInsideTheTree(it, itemID)));
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const useSelectFirstBodyItem = (items, openedItem, selectedItem, setSelectedItem, disableDefaultSelection) => {
|
|
23
|
-
useEffect(() => {
|
|
24
|
-
if (!disableDefaultSelection && items && items.length && openedItem) {
|
|
25
|
-
var _items$index$dsId;
|
|
26
|
-
|
|
27
|
-
const index = items.findIndex(elem => isSelectableOutOfTheBox(elem) || isSelectableCustom(elem));
|
|
28
|
-
const isItemInside = items.some(it => isItemInsideTheTree(it, selectedItem));
|
|
29
|
-
if (isItemInside) setSelectedItem(selectedItem);else if (index !== -1) setSelectedItem((_items$index$dsId = items[index].dsId) !== null && _items$index$dsId !== void 0 ? _items$index$dsId : '');
|
|
30
|
-
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
31
|
-
|
|
32
|
-
}, [openedItem, setSelectedItem, disableDefaultSelection]);
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export { useSelectFirstBodyItem };
|
package/esm/index.d.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
package/esm/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { LeftNavItemOptionsSchema, LeftNavItemPropsSchema } from './prop-types.js';
|
|
2
|
-
export { LeftNavigation, LeftNavigationWithSchema, LeftNavigation as default } from './LeftNavigation.js';
|
|
3
|
-
export { CHEVRON_BACK_DS_ID, FOOTER_DS_ID, FOOTER_MENU_CLOSE_DS_ID, ITEM_TYPES, LABEL_OVERFLOW } from './exported-related/constants.js';
|
|
4
|
-
export { ItemRenderer } from './exported-related/ItemRenderer/index.js';
|
|
5
|
-
export { ChevronItem } from './exported-related/ChevronItem/index.js';
|
|
6
|
-
export { Notifications } from './exported-related/Notifications/index.js';
|
|
7
|
-
export { OpenWindow } from './exported-related/OpenWindowItem/index.js';
|
|
8
|
-
export { Icon } from './exported-related/Icon/index.js';
|
|
@@ -1,148 +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 _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
7
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
8
|
-
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
9
|
-
import 'core-js/modules/esnext.iterator.map.js';
|
|
10
|
-
import { useMemo } from 'react';
|
|
11
|
-
import Grid from '@elliemae/ds-grid';
|
|
12
|
-
import { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';
|
|
13
|
-
import { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';
|
|
14
|
-
import { ITEM_TYPES } from '../../exported-related/constants.js';
|
|
15
|
-
import { ItemRenderer } from '../../exported-related/ItemRenderer/index.js';
|
|
16
|
-
import 'react/jsx-runtime';
|
|
17
|
-
import 'styled-components';
|
|
18
|
-
import { StyledLabel, StyledDate } from './styled.js';
|
|
19
|
-
import { ItemSeparator } from '../ItemSeparator/index.js';
|
|
20
|
-
import { ItemWithDate } from '../ItemWithDate/index.js';
|
|
21
|
-
import { ItemTextLabel } from '../ItemTextLabel/index.js';
|
|
22
|
-
|
|
23
|
-
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; }
|
|
24
|
-
|
|
25
|
-
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; }
|
|
26
|
-
const outOfTheBoxSubitemsComponents = {
|
|
27
|
-
[ITEM_TYPES.LEFT_NAV_ITEM_SEPARATOR]: ItemSeparator,
|
|
28
|
-
[ITEM_TYPES.LEFT_NAV_ITEM_WITH_DATE]: ItemWithDate,
|
|
29
|
-
[ITEM_TYPES.LEFT_NAV_ITEM_TEXT_LABEL]: ItemTextLabel
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const OutOfTheBoxMapSubitem = props => {
|
|
33
|
-
const {
|
|
34
|
-
item,
|
|
35
|
-
item: {
|
|
36
|
-
type,
|
|
37
|
-
Component
|
|
38
|
-
},
|
|
39
|
-
ctx
|
|
40
|
-
} = props;
|
|
41
|
-
|
|
42
|
-
if (typeof type === 'string' && !!outOfTheBoxSubitemsComponents[type]) {
|
|
43
|
-
var _item$itemOpts$indent, _item$itemOpts;
|
|
44
|
-
|
|
45
|
-
const OutOfTheBoxComponent = outOfTheBoxSubitemsComponents[type];
|
|
46
|
-
const currentIndent = (_item$itemOpts$indent = (_item$itemOpts = item.itemOpts) === null || _item$itemOpts === void 0 ? void 0 : _item$itemOpts.indent) !== null && _item$itemOpts$indent !== void 0 ? _item$itemOpts$indent : 0;
|
|
47
|
-
|
|
48
|
-
const newItem = _objectSpread(_objectSpread({}, item), {}, {
|
|
49
|
-
itemOpts: _objectSpread(_objectSpread({}, item.itemOpts), {}, {
|
|
50
|
-
indent: currentIndent + 44
|
|
51
|
-
})
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
return /*#__PURE__*/_jsx(OutOfTheBoxComponent, {
|
|
55
|
-
item: newItem,
|
|
56
|
-
ctx: ctx
|
|
57
|
-
});
|
|
58
|
-
} // we expect an error to be threw if Component is not defined and type is not a valid out-of-the-box...
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
return /*#__PURE__*/_jsx(Component, {
|
|
62
|
-
item: item,
|
|
63
|
-
ctx: ctx
|
|
64
|
-
});
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
const ItemControlledDrilldown = props => {
|
|
68
|
-
const {
|
|
69
|
-
item,
|
|
70
|
-
item: {
|
|
71
|
-
itemOpts: {
|
|
72
|
-
label,
|
|
73
|
-
RightComponent,
|
|
74
|
-
labelRightSection,
|
|
75
|
-
labelOverflow: itemLabelOverflow,
|
|
76
|
-
labelBold,
|
|
77
|
-
labelColor,
|
|
78
|
-
isOpened,
|
|
79
|
-
items,
|
|
80
|
-
labelDataTestId
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
ctx,
|
|
84
|
-
ctx: {
|
|
85
|
-
leftNavProps: {
|
|
86
|
-
labelOverflow: leftNavLabelOverflow
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
} = props;
|
|
90
|
-
const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;
|
|
91
|
-
const arrowIcon = useMemo(() => {
|
|
92
|
-
const Component = isOpened ? ArrowheadDown : ArrowheadRight;
|
|
93
|
-
return /*#__PURE__*/_jsx(Component, {
|
|
94
|
-
width: "24px",
|
|
95
|
-
height: "18px",
|
|
96
|
-
color: ['brand-primary', '800']
|
|
97
|
-
});
|
|
98
|
-
}, [isOpened]);
|
|
99
|
-
const subitems = useMemo(() => {
|
|
100
|
-
if (!isOpened || !items) return [];
|
|
101
|
-
return items.map(subitem => /*#__PURE__*/_jsx(OutOfTheBoxMapSubitem, {
|
|
102
|
-
item: subitem,
|
|
103
|
-
ctx: ctx
|
|
104
|
-
}, subitem.dsId));
|
|
105
|
-
}, [items, isOpened]);
|
|
106
|
-
return /*#__PURE__*/_jsx(ItemRenderer, {
|
|
107
|
-
item: _objectSpread(_objectSpread({}, item), {}, {
|
|
108
|
-
itemOpts: _objectSpread(_objectSpread({
|
|
109
|
-
ariaExpanded: isOpened,
|
|
110
|
-
ariaRole: 'menuitem'
|
|
111
|
-
}, item.itemOpts), {}, {
|
|
112
|
-
openable: !isOpened,
|
|
113
|
-
closable: isOpened
|
|
114
|
-
}),
|
|
115
|
-
CollapsedComponent: null
|
|
116
|
-
}),
|
|
117
|
-
subitems: subitems,
|
|
118
|
-
minHeight: "32px",
|
|
119
|
-
paddingTop: "8px"
|
|
120
|
-
}, void 0, /*#__PURE__*/_jsx(Grid, {
|
|
121
|
-
pl: "xxs",
|
|
122
|
-
mt: "-2px"
|
|
123
|
-
}, void 0, arrowIcon), /*#__PURE__*/_jsx(StyledLabel, {
|
|
124
|
-
pb: "xxxs",
|
|
125
|
-
"data-testid": labelDataTestId || 'leftnav-list-item-label',
|
|
126
|
-
labelOverflow: labelOverflow,
|
|
127
|
-
labelBold: labelBold,
|
|
128
|
-
labelColor: labelColor
|
|
129
|
-
}, void 0, labelOverflow === 'truncate' ? /*#__PURE__*/_jsx(SimpleTruncatedTooltipText, {
|
|
130
|
-
value: label,
|
|
131
|
-
placement: "bottom-start"
|
|
132
|
-
}) : label), /*#__PURE__*/_jsx(Grid, {
|
|
133
|
-
pr: "xxs2",
|
|
134
|
-
cols: ['auto', 'auto'],
|
|
135
|
-
alignItems: "center"
|
|
136
|
-
}, void 0, /*#__PURE__*/_jsx(StyledDate, {
|
|
137
|
-
ml: "xxs",
|
|
138
|
-
"data-testid": "leftnav-list-item-date"
|
|
139
|
-
}, void 0, labelRightSection), /*#__PURE__*/_jsx(Grid, {
|
|
140
|
-
pl: RightComponent ? 'xxs' : '0px',
|
|
141
|
-
"data-testid": "leftnav-right-component"
|
|
142
|
-
}, void 0, RightComponent && /*#__PURE__*/_jsx(RightComponent, {
|
|
143
|
-
ctx: ctx,
|
|
144
|
-
item: item
|
|
145
|
-
}))));
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
export { ItemControlledDrilldown };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
import Grid from '@elliemae/ds-grid';
|
|
3
|
-
|
|
4
|
-
const StyledLabel = /*#__PURE__*/styled(Grid).withConfig({
|
|
5
|
-
componentId: "sc-1tjij7e-0"
|
|
6
|
-
})(["font-size:13px;font-weight:", ";color:", ";line-height:14px;word-break:", ";"], props => props.labelBold ? props.theme.fontWeights.semibold : props.theme.fontWeights.regular, _ref => {
|
|
7
|
-
let {
|
|
8
|
-
labelColor,
|
|
9
|
-
theme
|
|
10
|
-
} = _ref;
|
|
11
|
-
return labelColor ? theme.colors[labelColor[0]][labelColor[1]] : theme.colors.neutral[800];
|
|
12
|
-
}, props => props.labelOverflow === 'wrapAll' ? 'break-all' : 'normal');
|
|
13
|
-
const StyledDate = /*#__PURE__*/styled(Grid).withConfig({
|
|
14
|
-
componentId: "sc-1tjij7e-1"
|
|
15
|
-
})(["font-size:12px;color:", ";line-height:14px;"], props => props.theme.colors.neutral[600]);
|
|
16
|
-
|
|
17
|
-
export { StyledDate, StyledLabel };
|
|
@@ -1,134 +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 _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
7
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
8
|
-
import { useCallback } from 'react';
|
|
9
|
-
import Grid from '@elliemae/ds-grid';
|
|
10
|
-
import { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';
|
|
11
|
-
import { CHEVRON_BACK_DS_ID } from '../../exported-related/constants.js';
|
|
12
|
-
import { ItemRenderer } from '../../exported-related/ItemRenderer/index.js';
|
|
13
|
-
import '@elliemae/ds-icons';
|
|
14
|
-
import 'react/jsx-runtime';
|
|
15
|
-
import 'styled-components';
|
|
16
|
-
import { StyledChevronLeft, StyledLabel } from './styled.js';
|
|
17
|
-
|
|
18
|
-
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; }
|
|
19
|
-
|
|
20
|
-
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; }
|
|
21
|
-
|
|
22
|
-
const notOpenedShadowStyle = isSelected => theme => "\n box-shadow: inset 4px 0 0 0 ".concat(isSelected ? theme.colors.brand[400] : 'transparent', ";\n\n :hover {\n box-shadow: inset 4px 0 0 0 ").concat(isSelected ? theme.colors.brand[400] : theme.colors.brand[300], ";\n }\n\n :active {\n box-shadow: inset 4px 0 0 0 ").concat(theme.colors.brand[400], ";\n }\n");
|
|
23
|
-
|
|
24
|
-
const ItemHeader = props => {
|
|
25
|
-
var _item$itemOpts$ariaLa;
|
|
26
|
-
|
|
27
|
-
const {
|
|
28
|
-
item,
|
|
29
|
-
item: {
|
|
30
|
-
dsId,
|
|
31
|
-
itemOpts: {
|
|
32
|
-
label,
|
|
33
|
-
RightComponent,
|
|
34
|
-
BottomComponent,
|
|
35
|
-
labelDataTestId,
|
|
36
|
-
labelOverflow: itemLabelOverflow
|
|
37
|
-
},
|
|
38
|
-
CollapsedComponent = () => null
|
|
39
|
-
},
|
|
40
|
-
ctx,
|
|
41
|
-
ctx: {
|
|
42
|
-
leftNavProps: {
|
|
43
|
-
openedItem,
|
|
44
|
-
labelOverflow: leftNavLabelOverflow,
|
|
45
|
-
onItemClick
|
|
46
|
-
},
|
|
47
|
-
expandedForAnimation,
|
|
48
|
-
setFocusedItem,
|
|
49
|
-
selectedItem,
|
|
50
|
-
selectedParent
|
|
51
|
-
}
|
|
52
|
-
} = props;
|
|
53
|
-
const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;
|
|
54
|
-
const opened = openedItem === dsId;
|
|
55
|
-
const ariaLabel = (_item$itemOpts$ariaLa = item.itemOpts.ariaLabel) !== null && _item$itemOpts$ariaLa !== void 0 ? _item$itemOpts$ariaLa : typeof label === 'string' ? label : 'menuitem';
|
|
56
|
-
const isSelected = selectedItem === dsId || selectedParent === dsId;
|
|
57
|
-
const shadowStyle = useCallback(opened => theme => !opened ? notOpenedShadowStyle(isSelected)(theme) : "box-shadow: inset 4px 0 0 0 #52A6EC", [isSelected, openedItem]);
|
|
58
|
-
return /*#__PURE__*/_jsx(ItemRenderer, {
|
|
59
|
-
item: _objectSpread(_objectSpread({}, item), {}, {
|
|
60
|
-
itemOpts: _objectSpread(_objectSpread({
|
|
61
|
-
ariaLabel,
|
|
62
|
-
ariaExpanded: opened
|
|
63
|
-
}, item.itemOpts), {}, {
|
|
64
|
-
openable: expandedForAnimation && !opened,
|
|
65
|
-
closable: expandedForAnimation && opened,
|
|
66
|
-
selectable: !opened
|
|
67
|
-
})
|
|
68
|
-
}),
|
|
69
|
-
hasBorderBottom: true,
|
|
70
|
-
borderBottomMr: opened ? '12px' : '0px',
|
|
71
|
-
shadowStyle: shadowStyle
|
|
72
|
-
}, void 0, /*#__PURE__*/_jsx(Grid, {
|
|
73
|
-
cols: opened ? ['auto', 'auto'] : ['38px'],
|
|
74
|
-
gutter: "1px",
|
|
75
|
-
pl: opened ? 'xxs' : 0,
|
|
76
|
-
justifyItems: "center",
|
|
77
|
-
"data-testid": "leftnav-leftcomponent"
|
|
78
|
-
}, void 0, opened && /*#__PURE__*/_jsx(StyledChevronLeft, {
|
|
79
|
-
size: "m",
|
|
80
|
-
color: ['brand-primary', 800],
|
|
81
|
-
onClick: e => {
|
|
82
|
-
onItemClick(item, e);
|
|
83
|
-
},
|
|
84
|
-
"data-testid": "leftnav-leftcomponent-chevron",
|
|
85
|
-
tabIndex: 0,
|
|
86
|
-
onFocus: e => {
|
|
87
|
-
e.stopPropagation();
|
|
88
|
-
setFocusedItem(CHEVRON_BACK_DS_ID);
|
|
89
|
-
},
|
|
90
|
-
role: "button",
|
|
91
|
-
"aria-label": "Close ".concat(ariaLabel)
|
|
92
|
-
}), /*#__PURE__*/_jsx(CollapsedComponent, {
|
|
93
|
-
item: item,
|
|
94
|
-
ctx: ctx
|
|
95
|
-
})), /*#__PURE__*/_jsx(StyledLabel, {
|
|
96
|
-
ml: opened ? 'xxs' : '1px',
|
|
97
|
-
mt: "xxxs",
|
|
98
|
-
mb: "15px",
|
|
99
|
-
"data-testid": labelDataTestId || 'leftnav-itemlabel',
|
|
100
|
-
labelOverflow: labelOverflow
|
|
101
|
-
}, void 0, labelOverflow === 'truncate' ? /*#__PURE__*/_jsx(SimpleTruncatedTooltipText, {
|
|
102
|
-
value: label,
|
|
103
|
-
placement: "bottom-start"
|
|
104
|
-
}) : label), /*#__PURE__*/_jsx(Grid, {
|
|
105
|
-
pl: "xs",
|
|
106
|
-
pr: opened ? 'xxs2' : 'xxs',
|
|
107
|
-
onFocus: e => {
|
|
108
|
-
setFocusedItem(null);
|
|
109
|
-
e.stopPropagation();
|
|
110
|
-
},
|
|
111
|
-
onKeyDown: e => e.stopPropagation(),
|
|
112
|
-
"data-testid": "leftnav-right-component"
|
|
113
|
-
}, void 0, RightComponent && /*#__PURE__*/_jsx(RightComponent, {
|
|
114
|
-
ctx: ctx,
|
|
115
|
-
item: item
|
|
116
|
-
})), BottomComponent && /*#__PURE__*/_jsx(Grid, {
|
|
117
|
-
style: {
|
|
118
|
-
gridColumn: 'span 3'
|
|
119
|
-
},
|
|
120
|
-
pb: "xxxs",
|
|
121
|
-
pl: "xxs",
|
|
122
|
-
pr: "xxs",
|
|
123
|
-
onFocus: e => {
|
|
124
|
-
setFocusedItem(null);
|
|
125
|
-
e.stopPropagation();
|
|
126
|
-
},
|
|
127
|
-
onKeyDown: e => e.stopPropagation()
|
|
128
|
-
}, void 0, /*#__PURE__*/_jsx(BottomComponent, {
|
|
129
|
-
ctx: ctx,
|
|
130
|
-
item: item
|
|
131
|
-
})));
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
export { ItemHeader };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import Grid from '@elliemae/ds-grid';
|
|
2
|
-
import { ChevronSmallLeft } from '@elliemae/ds-icons';
|
|
3
|
-
import styled from 'styled-components';
|
|
4
|
-
|
|
5
|
-
const StyledLabel = /*#__PURE__*/styled(Grid).withConfig({
|
|
6
|
-
componentId: "sc-m5k4h8-0"
|
|
7
|
-
})(["font-size:14px;color:", ";word-break:", ";"], props => props.theme.colors.neutral[800], props => props.labelOverflow === 'wrapAll' ? 'break-all' : 'normal');
|
|
8
|
-
const StyledChevronLeft = /*#__PURE__*/styled(ChevronSmallLeft).withConfig({
|
|
9
|
-
componentId: "sc-m5k4h8-1"
|
|
10
|
-
})(["cursor:pointer;:focus{outline:2px solid ", ";}"], props => props.theme.colors.brand[800]);
|
|
11
|
-
|
|
12
|
-
export { StyledChevronLeft, StyledLabel };
|
|
@@ -1,87 +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 _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
7
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
8
|
-
import { useCallback } from 'react';
|
|
9
|
-
import Grid from '@elliemae/ds-grid';
|
|
10
|
-
import { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';
|
|
11
|
-
import { ItemRenderer } from '../../exported-related/ItemRenderer/index.js';
|
|
12
|
-
import '@elliemae/ds-icons';
|
|
13
|
-
import 'react/jsx-runtime';
|
|
14
|
-
import 'styled-components';
|
|
15
|
-
import { StyledLabel } from './styled.js';
|
|
16
|
-
|
|
17
|
-
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; }
|
|
18
|
-
|
|
19
|
-
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; }
|
|
20
|
-
|
|
21
|
-
const notOpenedShadowStyle = isSelected => theme => "\n box-shadow: inset 4px 0 0 0 ".concat(isSelected ? theme.colors.brand[400] : 'transparent', ";\n\n :hover {\n box-shadow: inset 4px 0 0 0 ").concat(isSelected ? theme.colors.brand[400] : theme.colors.brand[300], ";\n }\n\n :active {\n box-shadow: inset 4px 0 0 0 ").concat(theme.colors.brand[400], ";\n }\n");
|
|
22
|
-
|
|
23
|
-
const ItemLink = props => {
|
|
24
|
-
const {
|
|
25
|
-
item,
|
|
26
|
-
item: {
|
|
27
|
-
dsId,
|
|
28
|
-
itemOpts: {
|
|
29
|
-
label,
|
|
30
|
-
RightComponent,
|
|
31
|
-
labelDataTestId,
|
|
32
|
-
labelOverflow: itemLabelOverflow
|
|
33
|
-
},
|
|
34
|
-
CollapsedComponent = () => null
|
|
35
|
-
},
|
|
36
|
-
ctx,
|
|
37
|
-
ctx: {
|
|
38
|
-
leftNavProps: {
|
|
39
|
-
labelOverflow: leftNavLabelOverflow,
|
|
40
|
-
openedItem
|
|
41
|
-
},
|
|
42
|
-
selectedItem,
|
|
43
|
-
selectedParent
|
|
44
|
-
}
|
|
45
|
-
} = props;
|
|
46
|
-
const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;
|
|
47
|
-
const isSelected = selectedItem === dsId || selectedParent === dsId;
|
|
48
|
-
const shadowStyle = useCallback(opened => theme => !opened ? notOpenedShadowStyle(isSelected)(theme) : "box-shadow: inset 4px 0 0 0 #52A6EC", [isSelected, openedItem]);
|
|
49
|
-
return /*#__PURE__*/_jsx(ItemRenderer, {
|
|
50
|
-
item: _objectSpread(_objectSpread({}, item), {}, {
|
|
51
|
-
itemOpts: _objectSpread(_objectSpread({
|
|
52
|
-
ariaLabel: typeof label === 'string' ? label : '',
|
|
53
|
-
ariaRole: 'link'
|
|
54
|
-
}, item.itemOpts), {}, {
|
|
55
|
-
selectable: true
|
|
56
|
-
})
|
|
57
|
-
}),
|
|
58
|
-
shadowStyle: shadowStyle
|
|
59
|
-
}, void 0, /*#__PURE__*/_jsx(Grid, {
|
|
60
|
-
cols: ['38px'],
|
|
61
|
-
gutter: "1px",
|
|
62
|
-
pl: 0,
|
|
63
|
-
justifyItems: "center",
|
|
64
|
-
"data-testid": "leftnav-leftcomponent"
|
|
65
|
-
}, void 0, /*#__PURE__*/_jsx(CollapsedComponent, {
|
|
66
|
-
item: item,
|
|
67
|
-
ctx: ctx
|
|
68
|
-
})), /*#__PURE__*/_jsx(StyledLabel, {
|
|
69
|
-
ml: "1px",
|
|
70
|
-
mt: "xxxs",
|
|
71
|
-
mb: "15px",
|
|
72
|
-
"data-testid": labelDataTestId || 'leftnav-itemlabel',
|
|
73
|
-
labelOverflow: labelOverflow
|
|
74
|
-
}, void 0, labelOverflow === 'truncate' ? /*#__PURE__*/_jsx(SimpleTruncatedTooltipText, {
|
|
75
|
-
value: label,
|
|
76
|
-
placement: "bottom-start"
|
|
77
|
-
}) : label), /*#__PURE__*/_jsx(Grid, {
|
|
78
|
-
mt: "xxxs",
|
|
79
|
-
pr: "xxs2",
|
|
80
|
-
"data-testid": "leftnav-right-component"
|
|
81
|
-
}, void 0, RightComponent && /*#__PURE__*/_jsx(RightComponent, {
|
|
82
|
-
ctx: ctx,
|
|
83
|
-
item: item
|
|
84
|
-
})));
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
export { ItemLink };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import Grid from '@elliemae/ds-grid';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
|
|
4
|
-
const StyledLabel = /*#__PURE__*/styled(Grid).withConfig({
|
|
5
|
-
componentId: "sc-16fwr4f-0"
|
|
6
|
-
})(["font-size:14px;color:", ";word-break:", ";"], props => props.theme.colors.neutral[800], props => props.labelOverflow === 'wrapAll' ? 'break-all' : 'normal');
|
|
7
|
-
|
|
8
|
-
export { StyledLabel };
|
|
@@ -1,73 +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 _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
7
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
8
|
-
import 'react';
|
|
9
|
-
import Grid from '@elliemae/ds-grid';
|
|
10
|
-
import { ItemRenderer } from '../../exported-related/ItemRenderer/index.js';
|
|
11
|
-
import '@elliemae/ds-icons';
|
|
12
|
-
import 'react/jsx-runtime';
|
|
13
|
-
import 'styled-components';
|
|
14
|
-
import { StyledLabel, StyledVerticalSeparator, StyledRightLabel } from './styled.js';
|
|
15
|
-
|
|
16
|
-
var _div, _StyledVerticalSepara;
|
|
17
|
-
|
|
18
|
-
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; }
|
|
19
|
-
|
|
20
|
-
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; }
|
|
21
|
-
const ItemSection = props => {
|
|
22
|
-
const {
|
|
23
|
-
item,
|
|
24
|
-
item: {
|
|
25
|
-
itemOpts: {
|
|
26
|
-
label,
|
|
27
|
-
LeftComponent,
|
|
28
|
-
RightComponent,
|
|
29
|
-
labelRightSection,
|
|
30
|
-
labelDataTestId
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
ctx,
|
|
34
|
-
ctx: {
|
|
35
|
-
setFocusedItem
|
|
36
|
-
}
|
|
37
|
-
} = props;
|
|
38
|
-
return /*#__PURE__*/_jsx(ItemRenderer, {
|
|
39
|
-
item: _objectSpread(_objectSpread({}, item), {}, {
|
|
40
|
-
itemOpts: _objectSpread(_objectSpread({}, item.itemOpts), {}, {
|
|
41
|
-
selectable: false,
|
|
42
|
-
focuseable: false
|
|
43
|
-
}),
|
|
44
|
-
CollapsedComponent: null
|
|
45
|
-
}),
|
|
46
|
-
minHeight: "32px",
|
|
47
|
-
paddingTop: "8px"
|
|
48
|
-
}, void 0, /*#__PURE__*/_jsx(Grid, {
|
|
49
|
-
cols: ['min-content', 'auto', 'min-content', 'auto'],
|
|
50
|
-
pl: "xxs",
|
|
51
|
-
alignItems: "center"
|
|
52
|
-
}, void 0, LeftComponent ? /*#__PURE__*/_jsx(LeftComponent, {
|
|
53
|
-
ctx: ctx,
|
|
54
|
-
item: item
|
|
55
|
-
}) : _div || (_div = /*#__PURE__*/_jsx("div", {})), /*#__PURE__*/_jsx(StyledLabel, {
|
|
56
|
-
"data-testid": labelDataTestId || 'leftnav-section-item-label'
|
|
57
|
-
}, void 0, label), _StyledVerticalSepara || (_StyledVerticalSepara = /*#__PURE__*/_jsx(StyledVerticalSeparator, {})), /*#__PURE__*/_jsx(StyledRightLabel, {}, void 0, labelRightSection)), /*#__PURE__*/_jsx(Grid, {
|
|
58
|
-
ml: "auto",
|
|
59
|
-
onFocus: e => {
|
|
60
|
-
setFocusedItem(null);
|
|
61
|
-
e.stopPropagation();
|
|
62
|
-
},
|
|
63
|
-
onKeyDown: e => e.stopPropagation(),
|
|
64
|
-
pr: "xxs2",
|
|
65
|
-
alignItems: "center",
|
|
66
|
-
"data-testid": "leftnav-right-component"
|
|
67
|
-
}, void 0, RightComponent && /*#__PURE__*/_jsx(RightComponent, {
|
|
68
|
-
ctx: ctx,
|
|
69
|
-
item: item
|
|
70
|
-
})));
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
export { ItemSection };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
|
|
3
|
-
const StyledLabel = /*#__PURE__*/styled.span.withConfig({
|
|
4
|
-
componentId: "sc-tbnpp2-0"
|
|
5
|
-
})(["font-size:13px;color:", ";margin-left:", ";line-height:13px;"], props => props.theme.colors.neutral[700], props => props.theme.space.xxs);
|
|
6
|
-
const StyledVerticalSeparator = /*#__PURE__*/styled.div.withConfig({
|
|
7
|
-
componentId: "sc-tbnpp2-1"
|
|
8
|
-
})(["margin:0 ", ";width:1px;height:13px;background:", ";"], props => props.theme.space.xxs, props => props.theme.colors.neutral[600]);
|
|
9
|
-
const StyledRightLabel = /*#__PURE__*/styled.span.withConfig({
|
|
10
|
-
componentId: "sc-tbnpp2-2"
|
|
11
|
-
})(["font-size:12px;line-height:13px;"]);
|
|
12
|
-
|
|
13
|
-
export { StyledLabel, StyledRightLabel, StyledVerticalSeparator };
|