@elliemae/ds-left-navigation 3.51.0-next.8 → 3.51.0-rc.0
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/constants/constants.js +17 -4
- package/dist/cjs/constants/constants.js.map +2 -2
- package/dist/cjs/exported-related/ItemRenderer/index.js +1 -2
- package/dist/cjs/exported-related/ItemRenderer/index.js.map +2 -2
- package/dist/cjs/exported-related/ItemRenderer/styled.js +4 -4
- package/dist/cjs/exported-related/ItemRenderer/styled.js.map +1 -1
- package/dist/cjs/exported-related/Notifications/index.js +22 -6
- package/dist/cjs/exported-related/Notifications/index.js.map +2 -2
- package/dist/cjs/index.js +6 -1
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/outOfTheBox/ItemControlledDrilldown/index.js +6 -27
- package/dist/cjs/outOfTheBox/ItemControlledDrilldown/index.js.map +2 -2
- package/dist/cjs/outOfTheBox/ItemHeader/index.js +2 -4
- package/dist/cjs/outOfTheBox/ItemHeader/index.js.map +3 -3
- package/dist/cjs/outOfTheBox/ItemLink/index.js +4 -3
- package/dist/cjs/outOfTheBox/ItemLink/index.js.map +2 -2
- package/dist/cjs/outOfTheBox/ItemSection/index.js +2 -2
- package/dist/cjs/outOfTheBox/ItemSection/index.js.map +2 -2
- package/dist/cjs/outOfTheBox/ItemSeparator/index.js +3 -3
- package/dist/cjs/outOfTheBox/ItemSeparator/index.js.map +2 -2
- package/dist/cjs/outOfTheBox/ItemSkeleton/index.js +1 -11
- package/dist/cjs/outOfTheBox/ItemSkeleton/index.js.map +2 -2
- package/dist/cjs/outOfTheBox/ItemSubmenu/index.js +2 -4
- package/dist/cjs/outOfTheBox/ItemSubmenu/index.js.map +3 -3
- package/dist/cjs/outOfTheBox/ItemTextLabel/index.js +2 -1
- package/dist/cjs/outOfTheBox/ItemTextLabel/index.js.map +2 -2
- package/dist/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js +6 -15
- package/dist/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +2 -2
- package/dist/cjs/outOfTheBox/ItemWithDate/index.js +6 -15
- package/dist/cjs/outOfTheBox/ItemWithDate/index.js.map +2 -2
- package/dist/cjs/outOfTheBox/styled.js +13 -13
- package/dist/cjs/outOfTheBox/styled.js.map +1 -1
- package/dist/cjs/parts/LeftNavContent/index.js +19 -14
- package/dist/cjs/parts/LeftNavContent/index.js.map +2 -2
- package/dist/cjs/parts/LeftNavContent/styled.js +7 -7
- package/dist/cjs/parts/LeftNavContent/styled.js.map +1 -1
- package/dist/cjs/parts/LeftNavFooterItem/index.js +14 -8
- package/dist/cjs/parts/LeftNavFooterItem/index.js.map +3 -3
- package/dist/cjs/parts/LeftNavFooterItem/styled.js +6 -6
- package/dist/cjs/parts/LeftNavFooterItem/styled.js.map +1 -1
- package/dist/cjs/parts/LeftNavLoading/index.js +2 -2
- package/dist/cjs/parts/LeftNavLoading/index.js.map +1 -1
- package/dist/esm/constants/constants.js +17 -4
- package/dist/esm/constants/constants.js.map +2 -2
- package/dist/esm/exported-related/ItemRenderer/index.js +1 -2
- package/dist/esm/exported-related/ItemRenderer/index.js.map +2 -2
- package/dist/esm/exported-related/ItemRenderer/styled.js +4 -4
- package/dist/esm/exported-related/ItemRenderer/styled.js.map +1 -1
- package/dist/esm/exported-related/Notifications/index.js +22 -6
- package/dist/esm/exported-related/Notifications/index.js.map +2 -2
- package/dist/esm/index.js +12 -1
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/outOfTheBox/ItemControlledDrilldown/index.js +6 -27
- package/dist/esm/outOfTheBox/ItemControlledDrilldown/index.js.map +2 -2
- package/dist/esm/outOfTheBox/ItemHeader/index.js +2 -4
- package/dist/esm/outOfTheBox/ItemHeader/index.js.map +2 -2
- package/dist/esm/outOfTheBox/ItemLink/index.js +4 -3
- package/dist/esm/outOfTheBox/ItemLink/index.js.map +2 -2
- package/dist/esm/outOfTheBox/ItemSection/index.js +2 -2
- package/dist/esm/outOfTheBox/ItemSection/index.js.map +2 -2
- package/dist/esm/outOfTheBox/ItemSeparator/index.js +3 -3
- package/dist/esm/outOfTheBox/ItemSeparator/index.js.map +2 -2
- package/dist/esm/outOfTheBox/ItemSkeleton/index.js +1 -11
- package/dist/esm/outOfTheBox/ItemSkeleton/index.js.map +2 -2
- package/dist/esm/outOfTheBox/ItemSubmenu/index.js +2 -4
- package/dist/esm/outOfTheBox/ItemSubmenu/index.js.map +2 -2
- package/dist/esm/outOfTheBox/ItemTextLabel/index.js +2 -1
- package/dist/esm/outOfTheBox/ItemTextLabel/index.js.map +2 -2
- package/dist/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js +6 -15
- package/dist/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +2 -2
- package/dist/esm/outOfTheBox/ItemWithDate/index.js +6 -15
- package/dist/esm/outOfTheBox/ItemWithDate/index.js.map +2 -2
- package/dist/esm/outOfTheBox/styled.js +13 -13
- package/dist/esm/outOfTheBox/styled.js.map +1 -1
- package/dist/esm/parts/LeftNavContent/index.js +19 -14
- package/dist/esm/parts/LeftNavContent/index.js.map +2 -2
- package/dist/esm/parts/LeftNavContent/styled.js +7 -7
- package/dist/esm/parts/LeftNavContent/styled.js.map +1 -1
- package/dist/esm/parts/LeftNavFooterItem/index.js +14 -8
- package/dist/esm/parts/LeftNavFooterItem/index.js.map +3 -3
- package/dist/esm/parts/LeftNavFooterItem/styled.js +6 -6
- package/dist/esm/parts/LeftNavFooterItem/styled.js.map +1 -1
- package/dist/esm/parts/LeftNavLoading/index.js +2 -2
- package/dist/esm/parts/LeftNavLoading/index.js.map +1 -1
- package/dist/types/constants/constants.d.ts +73 -30
- package/dist/types/index.d.ts +1 -1
- package/package.json +12 -12
- package/dist/cjs/constants/index.js +0 -30
- package/dist/cjs/constants/index.js.map +0 -7
- package/dist/esm/constants/index.js +0 -3
- package/dist/esm/constants/index.js.map +0 -7
- package/dist/types/constants/index.d.ts +0 -1
|
@@ -29,12 +29,19 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
var constants_exports = {};
|
|
30
30
|
__export(constants_exports, {
|
|
31
31
|
DSLeftNavigationName: () => DSLeftNavigationName,
|
|
32
|
-
DSLeftNavigationSlots: () => DSLeftNavigationSlots
|
|
32
|
+
DSLeftNavigationSlots: () => DSLeftNavigationSlots,
|
|
33
|
+
LEFT_NAVIGATION_DATA_TESTID: () => LEFT_NAVIGATION_DATA_TESTID,
|
|
34
|
+
LEFT_NAVIGATION_REGION_FOCUSES: () => LEFT_NAVIGATION_REGION_FOCUSES,
|
|
35
|
+
LEFT_NAVIGATION_SLOTS: () => LEFT_NAVIGATION_SLOTS
|
|
33
36
|
});
|
|
34
37
|
module.exports = __toCommonJS(constants_exports);
|
|
35
38
|
var React = __toESM(require("react"));
|
|
36
|
-
|
|
37
|
-
const
|
|
39
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
40
|
+
const DSLeftNavigationName = "DSLeftnavigation";
|
|
41
|
+
const LEFT_NAVIGATION_REGION_FOCUSES = {
|
|
42
|
+
RESET: ""
|
|
43
|
+
};
|
|
44
|
+
const LEFT_NAVIGATION_SLOTS = {
|
|
38
45
|
ROOT: "root",
|
|
39
46
|
AREAS_CONTAINER: "areas-container",
|
|
40
47
|
BODY_AREAS_CONTAINER: "body-areas-container",
|
|
@@ -63,6 +70,12 @@ const DSLeftNavigationSlots = {
|
|
|
63
70
|
ITEM: "item",
|
|
64
71
|
COLLAPSED_CONTAINER: "collapsed-container",
|
|
65
72
|
ARROW_CONTAINER: "arrow-container",
|
|
66
|
-
ITEM_BORDER_BOTTOM: "item-border-bottom"
|
|
73
|
+
ITEM_BORDER_BOTTOM: "item-border-bottom",
|
|
74
|
+
NOTIFICATIONS_ICON: "notifications-icon",
|
|
75
|
+
EXCEPTIONS_ICON_WRAPPER: "exceptions-icon",
|
|
76
|
+
ALERTS_ICON_WRAPPER: "alerts-icon",
|
|
77
|
+
MESSAGES_ICON_WRAPPER: "messages-icon"
|
|
67
78
|
};
|
|
79
|
+
const LEFT_NAVIGATION_DATA_TESTID = (0, import_ds_system.slotObjectToDataTestIds)(DSLeftNavigationName, LEFT_NAVIGATION_SLOTS);
|
|
80
|
+
const DSLeftNavigationSlots = LEFT_NAVIGATION_SLOTS;
|
|
68
81
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/constants/constants.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSLeftNavigationName = 'DSLeftnavigation';\n\n// we are naming this with the ${component_name}_region_focuses convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const LEFT_NAVIGATION_REGION_FOCUSES = {\n RESET: '',\n} as const;\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const LEFT_NAVIGATION_SLOTS = {\n ROOT: 'root',\n AREAS_CONTAINER: 'areas-container',\n BODY_AREAS_CONTAINER: 'body-areas-container',\n FOOTER_AREA: 'footer-area',\n LOADER_WRAPPER: 'loader-wrapper',\n HEADER_AREA: 'header-area',\n BODY_HEADER_AREA: 'body-header-area',\n BODY_ITEMS_AREA: 'body-items-area',\n\n FOOTER_MENU: 'footer-menu',\n FOOTER_ITEM: 'footer-item',\n FOOTER_LABEL: 'footer-label',\n FOOTER_SEPARATOR: 'footer-separator',\n FOOTER_MENU_COLLAPSE: 'footer-menu-collapse',\n\n NOTIFICATIONS_CONTAINER: 'notifications-container',\n\n ITEM_SEPARATOR: 'item-separator',\n\n SECTION_LABEL: 'section-label',\n SECTION_RIGHT_LABEL: 'section-right-label',\n VERTICAL_SEPARATOR: 'vertical-separator',\n SECTION_CONTAINER: 'section-container',\n\n ITEM_LABEL: 'item-label',\n LEFT_CONTAINER: 'left-container',\n BOTTOM_CONTAINER: 'bottom-container',\n RIGHT_CONTAINER: 'right-container',\n ITEM_DATE: 'item-date',\n ITEM_CHEVRON_BACK: 'item-chevron-back',\n\n ITEM: 'item',\n COLLAPSED_CONTAINER: 'collapsed-container',\n ARROW_CONTAINER: 'arrow-container',\n ITEM_BORDER_BOTTOM: 'item-border-bottom',\n\n NOTIFICATIONS_ICON: 'notifications-icon',\n EXCEPTIONS_ICON_WRAPPER: 'exceptions-icon',\n ALERTS_ICON_WRAPPER: 'alerts-icon',\n MESSAGES_ICON_WRAPPER: 'messages-icon',\n} as const;\n\n// we are naming this with the ${component_name}_data_testid convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const LEFT_NAVIGATION_DATA_TESTID = slotObjectToDataTestIds(DSLeftNavigationName, LEFT_NAVIGATION_SLOTS);\n\nexport const DSLeftNavigationSlots = LEFT_NAVIGATION_SLOTS;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,uBAAuB;AAG7B,MAAM,iCAAiC;AAAA,EAC5C,OAAO;AACT;AAGO,MAAM,wBAAwB;AAAA,EACnC,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,sBAAsB;AAAA,EACtB,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EAEjB,aAAa;AAAA,EACb,aAAa;AAAA,EACb,cAAc;AAAA,EACd,kBAAkB;AAAA,EAClB,sBAAsB;AAAA,EAEtB,yBAAyB;AAAA,EAEzB,gBAAgB;AAAA,EAEhB,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EAEnB,YAAY;AAAA,EACZ,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,WAAW;AAAA,EACX,mBAAmB;AAAA,EAEnB,MAAM;AAAA,EACN,qBAAqB;AAAA,EACrB,iBAAiB;AAAA,EACjB,oBAAoB;AAAA,EAEpB,oBAAoB;AAAA,EACpB,yBAAyB;AAAA,EACzB,qBAAqB;AAAA,EACrB,uBAAuB;AACzB;AAGO,MAAM,kCAA8B,0CAAwB,sBAAsB,qBAAqB;AAEvG,MAAM,wBAAwB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -107,7 +107,6 @@ const ItemRenderer = (props) => {
|
|
|
107
107
|
selectedParent: isSelectedParent,
|
|
108
108
|
opened,
|
|
109
109
|
onFocus: handleFocus,
|
|
110
|
-
"data-testid": "leftnav-item-container",
|
|
111
110
|
tabIndex: focuseable ? 0 : void 0,
|
|
112
111
|
"aria-describedby": ariaDescribedBy,
|
|
113
112
|
"aria-expanded": ariaExpanded,
|
|
@@ -118,7 +117,7 @@ const ItemRenderer = (props) => {
|
|
|
118
117
|
"data-type": item.type,
|
|
119
118
|
"aria-label": ariaLabel,
|
|
120
119
|
children: [
|
|
121
|
-
!expandedForAnimation ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledCollapsedContainer, {
|
|
120
|
+
!expandedForAnimation ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledCollapsedContainer, { justifyContent: "center", children: CollapsedComponent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollapsedComponent, { item, ctx }) }) : children,
|
|
122
121
|
hasBorderBottom && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledBorderBottom, { opened, borderBottomMr })
|
|
123
122
|
]
|
|
124
123
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/exported-related/ItemRenderer/index.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport React, { useContext, useMemo, useCallback } from 'react';\nimport { StyledItem, StyledCollapsedContainer, StyledBorderBottom } from './styled.js';\nimport type { DSLeftNavigationT } from '../../react-desc-prop-types.js';\nimport { LeftNavContext } from '../../LeftNavigationContext.js';\nimport { usePropsWithDefaults } from './usePropsWithDefaults.js';\nimport { useKeyboardNavigation } from '../../hooks/index.js';\n\nexport const ItemRenderer: React.ComponentType<DSLeftNavigationT.ItemRendererT> = (props) => {\n const propsWithDefault = usePropsWithDefaults(props);\n const {\n item,\n item: {\n dsId,\n itemOpts: { selectable = false, focuseable, indent, ariaLabel, ariaRole, ariaExpanded, ariaDescribedBy },\n CollapsedComponent,\n },\n subitems,\n minHeight,\n paddingTop,\n onClick,\n shadowStyle,\n hasBorderBottom,\n borderBottomMr,\n children,\n } = propsWithDefault;\n\n const ctx = useContext(LeftNavContext);\n const {\n leftNavProps: { onItemClick, openedItem },\n expandedForAnimation,\n selectedParent,\n selectedItem,\n setSelectedItem,\n setFocusedItem,\n visibleItemsRefs,\n } = ctx;\n\n const opened = dsId === openedItem;\n\n const handleOnClick = useCallback(\n (e: React.MouseEvent<HTMLElement>) => {\n if (onClick) onClick(); // used by uncontrolled drilldowns\n if (onItemClick) onItemClick(item, e);\n if (selectable) setSelectedItem(item.dsId as string);\n },\n [onItemClick, item, setSelectedItem, selectable, onClick],\n );\n\n const handleFocus = useCallback(() => {\n if (focuseable) setFocusedItem(dsId as string);\n }, [dsId, setFocusedItem, focuseable]);\n\n const onKeyDown = useKeyboardNavigation({\n item,\n onClick: handleOnClick,\n });\n\n const cols = useMemo(() => (expandedForAnimation ? ['auto', '1fr', 'auto'] : ['38px']), [expandedForAnimation]);\n const isSelected = useMemo(() => selectedItem === dsId, [selectedItem, dsId]);\n\n if (!expandedForAnimation && !CollapsedComponent) {\n return null;\n }\n\n const isSelectedParent = selectedParent === dsId;\n const visibleItemRef = dsId ? visibleItemsRefs.current[dsId] : undefined;\n return (\n <>\n <StyledItem\n innerRef={visibleItemRef}\n pt={paddingTop}\n pl={indent === undefined ? 'xxxs' : `${indent}px`}\n minHeight={minHeight}\n shadowStyle={shadowStyle(opened, item.type)}\n alignItems=\"flex-start\"\n cols={cols}\n onClick={!opened ? handleOnClick : () => null}\n onKeyDown={onKeyDown}\n selectable={selectable}\n selected={isSelected}\n selectedParent={isSelectedParent}\n opened={opened}\n onFocus={handleFocus}\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADqEnB;AAnEJ,mBAAwD;AACxD,oBAAyE;AAEzE,mCAA+B;AAC/B,kCAAqC;AACrC,mBAAsC;AAE/B,MAAM,eAAqE,CAAC,UAAU;AAC3F,QAAM,uBAAmB,kDAAqB,KAAK;AACnD,QAAM;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ;AAAA,MACA,UAAU,EAAE,aAAa,OAAO,YAAY,QAAQ,WAAW,UAAU,cAAc,gBAAgB;AAAA,MACvG;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,UAAM,yBAAW,2CAAc;AACrC,QAAM;AAAA,IACJ,cAAc,EAAE,aAAa,WAAW;AAAA,IACxC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,SAAS,SAAS;AAExB,QAAM,oBAAgB;AAAA,IACpB,CAAC,MAAqC;AACpC,UAAI,QAAS,SAAQ;AACrB,UAAI,YAAa,aAAY,MAAM,CAAC;AACpC,UAAI,WAAY,iBAAgB,KAAK,IAAc;AAAA,IACrD;AAAA,IACA,CAAC,aAAa,MAAM,iBAAiB,YAAY,OAAO;AAAA,EAC1D;AAEA,QAAM,kBAAc,0BAAY,MAAM;AACpC,QAAI,WAAY,gBAAe,IAAc;AAAA,EAC/C,GAAG,CAAC,MAAM,gBAAgB,UAAU,CAAC;AAErC,QAAM,gBAAY,oCAAsB;AAAA,IACtC;AAAA,IACA,SAAS;AAAA,EACX,CAAC;AAED,QAAM,WAAO,sBAAQ,MAAO,uBAAuB,CAAC,QAAQ,OAAO,MAAM,IAAI,CAAC,MAAM,GAAI,CAAC,oBAAoB,CAAC;AAC9G,QAAM,iBAAa,sBAAQ,MAAM,iBAAiB,MAAM,CAAC,cAAc,IAAI,CAAC;AAE5E,MAAI,CAAC,wBAAwB,CAAC,oBAAoB;AAChD,WAAO;AAAA,EACT;AAEA,QAAM,mBAAmB,mBAAmB;AAC5C,QAAM,iBAAiB,OAAO,iBAAiB,QAAQ,IAAI,IAAI;AAC/D,SACE,4EACE;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,UAAU;AAAA,QACV,IAAI;AAAA,QACJ,IAAI,WAAW,SAAY,SAAS,GAAG,MAAM;AAAA,QAC7C;AAAA,QACA,aAAa,YAAY,QAAQ,KAAK,IAAI;AAAA,QAC1C,YAAW;AAAA,QACX;AAAA,QACA,SAAS,CAAC,SAAS,gBAAgB,MAAM;AAAA,QACzC;AAAA,QACA;AAAA,QACA,UAAU;AAAA,QACV,gBAAgB;AAAA,QAChB;AAAA,QACA,SAAS;AAAA,QACT,
|
|
4
|
+
"sourcesContent": ["/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport React, { useContext, useMemo, useCallback } from 'react';\nimport { StyledItem, StyledCollapsedContainer, StyledBorderBottom } from './styled.js';\nimport type { DSLeftNavigationT } from '../../react-desc-prop-types.js';\nimport { LeftNavContext } from '../../LeftNavigationContext.js';\nimport { usePropsWithDefaults } from './usePropsWithDefaults.js';\nimport { useKeyboardNavigation } from '../../hooks/index.js';\n\nexport const ItemRenderer: React.ComponentType<DSLeftNavigationT.ItemRendererT> = (props) => {\n const propsWithDefault = usePropsWithDefaults(props);\n const {\n item,\n item: {\n dsId,\n itemOpts: { selectable = false, focuseable, indent, ariaLabel, ariaRole, ariaExpanded, ariaDescribedBy },\n CollapsedComponent,\n },\n subitems,\n minHeight,\n paddingTop,\n onClick,\n shadowStyle,\n hasBorderBottom,\n borderBottomMr,\n children,\n } = propsWithDefault;\n\n const ctx = useContext(LeftNavContext);\n const {\n leftNavProps: { onItemClick, openedItem },\n expandedForAnimation,\n selectedParent,\n selectedItem,\n setSelectedItem,\n setFocusedItem,\n visibleItemsRefs,\n } = ctx;\n\n const opened = dsId === openedItem;\n\n const handleOnClick = useCallback(\n (e: React.MouseEvent<HTMLElement>) => {\n if (onClick) onClick(); // used by uncontrolled drilldowns\n if (onItemClick) onItemClick(item, e);\n if (selectable) setSelectedItem(item.dsId as string);\n },\n [onItemClick, item, setSelectedItem, selectable, onClick],\n );\n\n const handleFocus = useCallback(() => {\n if (focuseable) setFocusedItem(dsId as string);\n }, [dsId, setFocusedItem, focuseable]);\n\n const onKeyDown = useKeyboardNavigation({\n item,\n onClick: handleOnClick,\n });\n\n const cols = useMemo(() => (expandedForAnimation ? ['auto', '1fr', 'auto'] : ['38px']), [expandedForAnimation]);\n const isSelected = useMemo(() => selectedItem === dsId, [selectedItem, dsId]);\n\n if (!expandedForAnimation && !CollapsedComponent) {\n return null;\n }\n\n const isSelectedParent = selectedParent === dsId;\n const visibleItemRef = dsId ? visibleItemsRefs.current[dsId] : undefined;\n return (\n <>\n <StyledItem\n innerRef={visibleItemRef}\n pt={paddingTop}\n pl={indent === undefined ? 'xxxs' : `${indent}px`}\n minHeight={minHeight}\n shadowStyle={shadowStyle(opened, item.type)}\n alignItems=\"flex-start\"\n cols={cols}\n onClick={!opened ? handleOnClick : () => null}\n onKeyDown={onKeyDown}\n selectable={selectable}\n selected={isSelected}\n selectedParent={isSelectedParent}\n opened={opened}\n onFocus={handleFocus}\n tabIndex={focuseable ? 0 : undefined}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n role={ariaRole}\n data-selected={isSelected}\n data-selectedparent={isSelectedParent}\n data-opened={opened}\n data-type={item.type}\n aria-label={ariaLabel}\n >\n {!expandedForAnimation ? (\n <StyledCollapsedContainer justifyContent=\"center\">\n {CollapsedComponent && <CollapsedComponent item={item} ctx={ctx} />}\n </StyledCollapsedContainer>\n ) : (\n children\n )}\n {hasBorderBottom && <StyledBorderBottom opened={opened} borderBottomMr={borderBottomMr} />}\n </StyledItem>\n {subitems}\n </>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADqEnB;AAnEJ,mBAAwD;AACxD,oBAAyE;AAEzE,mCAA+B;AAC/B,kCAAqC;AACrC,mBAAsC;AAE/B,MAAM,eAAqE,CAAC,UAAU;AAC3F,QAAM,uBAAmB,kDAAqB,KAAK;AACnD,QAAM;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ;AAAA,MACA,UAAU,EAAE,aAAa,OAAO,YAAY,QAAQ,WAAW,UAAU,cAAc,gBAAgB;AAAA,MACvG;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,UAAM,yBAAW,2CAAc;AACrC,QAAM;AAAA,IACJ,cAAc,EAAE,aAAa,WAAW;AAAA,IACxC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,SAAS,SAAS;AAExB,QAAM,oBAAgB;AAAA,IACpB,CAAC,MAAqC;AACpC,UAAI,QAAS,SAAQ;AACrB,UAAI,YAAa,aAAY,MAAM,CAAC;AACpC,UAAI,WAAY,iBAAgB,KAAK,IAAc;AAAA,IACrD;AAAA,IACA,CAAC,aAAa,MAAM,iBAAiB,YAAY,OAAO;AAAA,EAC1D;AAEA,QAAM,kBAAc,0BAAY,MAAM;AACpC,QAAI,WAAY,gBAAe,IAAc;AAAA,EAC/C,GAAG,CAAC,MAAM,gBAAgB,UAAU,CAAC;AAErC,QAAM,gBAAY,oCAAsB;AAAA,IACtC;AAAA,IACA,SAAS;AAAA,EACX,CAAC;AAED,QAAM,WAAO,sBAAQ,MAAO,uBAAuB,CAAC,QAAQ,OAAO,MAAM,IAAI,CAAC,MAAM,GAAI,CAAC,oBAAoB,CAAC;AAC9G,QAAM,iBAAa,sBAAQ,MAAM,iBAAiB,MAAM,CAAC,cAAc,IAAI,CAAC;AAE5E,MAAI,CAAC,wBAAwB,CAAC,oBAAoB;AAChD,WAAO;AAAA,EACT;AAEA,QAAM,mBAAmB,mBAAmB;AAC5C,QAAM,iBAAiB,OAAO,iBAAiB,QAAQ,IAAI,IAAI;AAC/D,SACE,4EACE;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,UAAU;AAAA,QACV,IAAI;AAAA,QACJ,IAAI,WAAW,SAAY,SAAS,GAAG,MAAM;AAAA,QAC7C;AAAA,QACA,aAAa,YAAY,QAAQ,KAAK,IAAI;AAAA,QAC1C,YAAW;AAAA,QACX;AAAA,QACA,SAAS,CAAC,SAAS,gBAAgB,MAAM;AAAA,QACzC;AAAA,QACA;AAAA,QACA,UAAU;AAAA,QACV,gBAAgB;AAAA,QAChB;AAAA,QACA,SAAS;AAAA,QACT,UAAU,aAAa,IAAI;AAAA,QAC3B,oBAAkB;AAAA,QAClB,iBAAe;AAAA,QACf,MAAM;AAAA,QACN,iBAAe;AAAA,QACf,uBAAqB;AAAA,QACrB,eAAa;AAAA,QACb,aAAW,KAAK;AAAA,QAChB,cAAY;AAAA,QAEX;AAAA,WAAC,uBACA,4CAAC,0CAAyB,gBAAe,UACtC,gCAAsB,4CAAC,sBAAmB,MAAY,KAAU,GACnE,IAEA;AAAA,UAED,mBAAmB,4CAAC,oCAAmB,QAAgB,gBAAgC;AAAA;AAAA;AAAA,IAC1F;AAAA,IACC;AAAA,KACH;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -37,7 +37,7 @@ module.exports = __toCommonJS(styled_exports);
|
|
|
37
37
|
var React = __toESM(require("react"));
|
|
38
38
|
var import_ds_grid = __toESM(require("@elliemae/ds-grid"));
|
|
39
39
|
var import_ds_system = require("@elliemae/ds-system");
|
|
40
|
-
var import_constants = require("../../constants/
|
|
40
|
+
var import_constants = require("../../constants/constants.js");
|
|
41
41
|
const borderOutside = (color, weight = 2) => `&:before {
|
|
42
42
|
content: '';
|
|
43
43
|
position: absolute;
|
|
@@ -58,7 +58,7 @@ const getItemHoverBackground = ({ selectable, opened, selected, theme }) => {
|
|
|
58
58
|
if (selected && !opened) return theme.colors.brand[200];
|
|
59
59
|
return theme.colors.brand["200"];
|
|
60
60
|
};
|
|
61
|
-
const StyledItem = (0, import_ds_system.styled)(import_ds_grid.default, { name: import_constants.DSLeftNavigationName, slot: import_constants.
|
|
61
|
+
const StyledItem = (0, import_ds_system.styled)(import_ds_grid.default, { name: import_constants.DSLeftNavigationName, slot: import_constants.LEFT_NAVIGATION_SLOTS.ITEM })`
|
|
62
62
|
position: relative;
|
|
63
63
|
cursor: ${(props) => props.selectable && !props.opened ? "pointer" : "auto"};
|
|
64
64
|
min-height: ${(props) => props.minHeight};
|
|
@@ -85,11 +85,11 @@ const StyledItem = (0, import_ds_system.styled)(import_ds_grid.default, { name:
|
|
|
85
85
|
`;
|
|
86
86
|
const StyledCollapsedContainer = (0, import_ds_system.styled)(import_ds_grid.default, {
|
|
87
87
|
name: import_constants.DSLeftNavigationName,
|
|
88
|
-
slot: import_constants.
|
|
88
|
+
slot: import_constants.LEFT_NAVIGATION_SLOTS.COLLAPSED_CONTAINER
|
|
89
89
|
})``;
|
|
90
90
|
const StyledBorderBottom = (0, import_ds_system.styled)("div", {
|
|
91
91
|
name: import_constants.DSLeftNavigationName,
|
|
92
|
-
slot: import_constants.
|
|
92
|
+
slot: import_constants.LEFT_NAVIGATION_SLOTS.ITEM_BORDER_BOTTOM
|
|
93
93
|
})`
|
|
94
94
|
margin-left: ${({ opened }) => opened ? "12px" : "-4px"};
|
|
95
95
|
margin-right: ${({ borderBottomMr }) => borderBottomMr};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/exported-related/ItemRenderer/styled.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable indent */\nimport Grid from '@elliemae/ds-grid';\nimport { styled, type Theme } from '@elliemae/ds-system';\nimport { DSLeftNavigationName,
|
|
4
|
+
"sourcesContent": ["/* eslint-disable indent */\nimport Grid from '@elliemae/ds-grid';\nimport { styled, type Theme } from '@elliemae/ds-system';\nimport { DSLeftNavigationName, LEFT_NAVIGATION_SLOTS } from '../../constants/constants.js';\n\ninterface ItemProps {\n selected: boolean;\n selectable: boolean;\n opened: boolean;\n theme: Theme;\n shadowStyle: (theme: Theme) => string;\n}\n\nexport const borderOutside = (color: string, weight = 2): string => `&:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: ${weight}px solid ${color};\n pointer-events: none;\n}`;\n\nconst getItemBackground = ({ selectable, opened, selected, theme }: ItemProps) => {\n if (!selectable) return 'white';\n if (selected && !opened) return theme.colors.brand[200];\n return theme.colors.neutral['000'];\n};\n\nconst getItemHoverBackground = ({ selectable, opened, selected, theme }: ItemProps) => {\n if (!selectable) return 'white';\n if (selected && !opened) return theme.colors.brand[200];\n return theme.colors.brand['200'];\n};\n\nexport const StyledItem = styled(Grid, { name: DSLeftNavigationName, slot: LEFT_NAVIGATION_SLOTS.ITEM })<\n { minHeight: string; selectedParent: boolean } & ItemProps\n>`\n position: relative;\n cursor: ${(props) => (props.selectable && !props.opened ? 'pointer' : 'auto')};\n min-height: ${(props) => props.minHeight};\n\n background: ${getItemBackground};\n\n ${(props) => (props.selected && !props.opened ? borderOutside(props.theme.colors.brand[500], 1) : '')}\n\n :hover {\n background: ${getItemHoverBackground};\n }\n\n :active {\n background: ${({ selectable, theme }) => (selectable ? theme.colors.brand[200] : 'white')};\n }\n\n ${(props) => props.shadowStyle(props.theme)};\n\n outline: none;\n\n :focus {\n ${(props) => borderOutside(props.theme.colors.brand[700])}\n }\n`;\n\nexport const StyledCollapsedContainer = styled(Grid, {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.COLLAPSED_CONTAINER,\n})``;\n\nexport const StyledBorderBottom = styled('div', {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.ITEM_BORDER_BOTTOM,\n})<{ opened: boolean; borderBottomMr?: string }>`\n margin-left: ${({ opened }) => (opened ? '12px' : '-4px')};\n margin-right: ${({ borderBottomMr }) => borderBottomMr};\n margin-top: 1px;\n height: 1px;\n width: calc(100% - ${({ borderBottomMr }) => borderBottomMr} - ${({ opened }) => (opened ? '12px' : '-4px')});\n background-color: #e0e3e8;\n grid-column: span 3;\n align-self: end;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,qBAAiB;AACjB,uBAAmC;AACnC,uBAA4D;AAUrD,MAAM,gBAAgB,CAAC,OAAe,SAAS,MAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAOxD,MAAM,YAAY,KAAK;AAAA;AAAA;AAInC,MAAM,oBAAoB,CAAC,EAAE,YAAY,QAAQ,UAAU,MAAM,MAAiB;AAChF,MAAI,CAAC,WAAY,QAAO;AACxB,MAAI,YAAY,CAAC,OAAQ,QAAO,MAAM,OAAO,MAAM,GAAG;AACtD,SAAO,MAAM,OAAO,QAAQ,KAAK;AACnC;AAEA,MAAM,yBAAyB,CAAC,EAAE,YAAY,QAAQ,UAAU,MAAM,MAAiB;AACrF,MAAI,CAAC,WAAY,QAAO;AACxB,MAAI,YAAY,CAAC,OAAQ,QAAO,MAAM,OAAO,MAAM,GAAG;AACtD,SAAO,MAAM,OAAO,MAAM,KAAK;AACjC;AAEO,MAAM,iBAAa,yBAAO,eAAAA,SAAM,EAAE,MAAM,uCAAsB,MAAM,uCAAsB,KAAK,CAAC;AAAA;AAAA,YAI3F,CAAC,UAAW,MAAM,cAAc,CAAC,MAAM,SAAS,YAAY,MAAO;AAAA,gBAC/D,CAAC,UAAU,MAAM,SAAS;AAAA;AAAA,gBAE1B,iBAAiB;AAAA;AAAA,IAE7B,CAAC,UAAW,MAAM,YAAY,CAAC,MAAM,SAAS,cAAc,MAAM,MAAM,OAAO,MAAM,GAAG,GAAG,CAAC,IAAI,EAAG;AAAA;AAAA;AAAA,kBAGrF,sBAAsB;AAAA;AAAA;AAAA;AAAA,kBAItB,CAAC,EAAE,YAAY,MAAM,MAAO,aAAa,MAAM,OAAO,MAAM,GAAG,IAAI,OAAQ;AAAA;AAAA;AAAA,IAGzF,CAAC,UAAU,MAAM,YAAY,MAAM,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,MAKvC,CAAC,UAAU,cAAc,MAAM,MAAM,OAAO,MAAM,GAAG,CAAC,CAAC;AAAA;AAAA;AAItD,MAAM,+BAA2B,yBAAO,eAAAA,SAAM;AAAA,EACnD,MAAM;AAAA,EACN,MAAM,uCAAsB;AAC9B,CAAC;AAEM,MAAM,yBAAqB,yBAAO,OAAO;AAAA,EAC9C,MAAM;AAAA,EACN,MAAM,uCAAsB;AAC9B,CAAC;AAAA,iBACgB,CAAC,EAAE,OAAO,MAAO,SAAS,SAAS,MAAO;AAAA,kBACzC,CAAC,EAAE,eAAe,MAAM,cAAc;AAAA;AAAA;AAAA,uBAGjC,CAAC,EAAE,eAAe,MAAM,cAAc,MAAM,CAAC,EAAE,OAAO,MAAO,SAAS,SAAS,MAAO;AAAA;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": ["Grid"]
|
|
7
7
|
}
|
|
@@ -37,25 +37,41 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
37
37
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
38
38
|
var import_ds_system = require("@elliemae/ds-system");
|
|
39
39
|
var import_ds_grid = __toESM(require("@elliemae/ds-grid"));
|
|
40
|
-
var import_constants = require("../../constants/
|
|
40
|
+
var import_constants = require("../../constants/constants.js");
|
|
41
41
|
const StyledIconContainer = (0, import_ds_system.styled)("div", {
|
|
42
42
|
name: import_constants.DSLeftNavigationName,
|
|
43
|
-
slot: import_constants.
|
|
43
|
+
slot: import_constants.LEFT_NAVIGATION_SLOTS.NOTIFICATIONS_CONTAINER
|
|
44
44
|
})`
|
|
45
45
|
display: flex;
|
|
46
46
|
flex-direction: column;
|
|
47
47
|
align-items: center;
|
|
48
48
|
`;
|
|
49
|
+
const StyledInternalNotifications = (0, import_ds_system.styled)(import_ds_icons.Notifications, {
|
|
50
|
+
name: import_constants.DSLeftNavigationName,
|
|
51
|
+
slot: import_constants.LEFT_NAVIGATION_SLOTS.NOTIFICATIONS_ICON
|
|
52
|
+
})``;
|
|
53
|
+
const StyledExceptionsSmallFillWrapper = (0, import_ds_system.styled)(import_ds_grid.default, {
|
|
54
|
+
name: import_constants.DSLeftNavigationName,
|
|
55
|
+
slot: import_constants.LEFT_NAVIGATION_SLOTS.EXCEPTIONS_ICON_WRAPPER
|
|
56
|
+
})``;
|
|
57
|
+
const StyledAlertsSmallFillWrapper = (0, import_ds_system.styled)(import_ds_grid.default, {
|
|
58
|
+
name: import_constants.DSLeftNavigationName,
|
|
59
|
+
slot: import_constants.LEFT_NAVIGATION_SLOTS.ALERTS_ICON_WRAPPER
|
|
60
|
+
})``;
|
|
61
|
+
const StyledMessagesSmallFillWrapper = (0, import_ds_system.styled)(import_ds_grid.default, {
|
|
62
|
+
name: import_constants.DSLeftNavigationName,
|
|
63
|
+
slot: import_constants.LEFT_NAVIGATION_SLOTS.MESSAGES_ICON_WRAPPER
|
|
64
|
+
})``;
|
|
49
65
|
const Notifications = ({
|
|
50
66
|
exceptions = false,
|
|
51
67
|
alerts = false,
|
|
52
68
|
messages = false
|
|
53
69
|
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(StyledIconContainer, { children: [
|
|
54
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
70
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledInternalNotifications, { size: "m", color: ["brand-primary", "800"] }),
|
|
55
71
|
(exceptions || alerts || messages) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.default, { cols: ["1fr", "1fr", "1fr"], gutter: "xxxs", mt: "2px", children: [
|
|
56
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
57
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
58
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
72
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledExceptionsSmallFillWrapper, { width: "6px", height: "6px", children: exceptions && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ExceptionsSmallFill, { width: "6px", height: "6px", color: ["warning", "900"] }) }),
|
|
73
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledAlertsSmallFillWrapper, { width: "6px", height: "6px", children: alerts && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.AlertsSmallFill, { width: "6px", height: "6px", color: ["danger", "900"] }) }),
|
|
74
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledMessagesSmallFillWrapper, { width: "6px", height: "6px", children: messages && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.MessagesSmallFill, { width: "6px", height: "6px", color: ["success", "900"] }) })
|
|
59
75
|
] })
|
|
60
76
|
] });
|
|
61
77
|
var Notifications_default = Notifications;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/exported-related/Notifications/index.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-unsafe-assignment */\nimport React from 'react';\nimport {\n AlertsSmallFill,\n Notifications as InternalNotifications,\n ExceptionsSmallFill,\n MessagesSmallFill,\n} from '@elliemae/ds-icons';\nimport { styled } from '@elliemae/ds-system';\nimport Grid from '@elliemae/ds-grid';\nimport { DSLeftNavigationName, LEFT_NAVIGATION_SLOTS } from '../../constants/constants.js';\n\nconst StyledIconContainer = styled('div', {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.NOTIFICATIONS_CONTAINER,\n})`\n display: flex;\n flex-direction: column;\n align-items: center;\n`;\ntype NotificationsProps = {\n exceptions?: boolean;\n alerts?: boolean;\n messages?: boolean;\n};\nconst StyledInternalNotifications = styled(InternalNotifications, {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.NOTIFICATIONS_ICON,\n})``;\nconst StyledExceptionsSmallFillWrapper = styled(Grid, {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.EXCEPTIONS_ICON_WRAPPER,\n})``;\nconst StyledAlertsSmallFillWrapper = styled(Grid, {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.ALERTS_ICON_WRAPPER,\n})``;\nconst StyledMessagesSmallFillWrapper = styled(Grid, {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.MESSAGES_ICON_WRAPPER,\n})``;\n\nexport const Notifications = ({\n exceptions = false,\n alerts = false,\n messages = false,\n}: NotificationsProps): JSX.Element => (\n <StyledIconContainer>\n <StyledInternalNotifications size=\"m\" color={['brand-primary', '800']} />\n {(exceptions || alerts || messages) && (\n <Grid cols={['1fr', '1fr', '1fr']} gutter=\"xxxs\" mt=\"2px\">\n <StyledExceptionsSmallFillWrapper width=\"6px\" height=\"6px\">\n {exceptions && <ExceptionsSmallFill width=\"6px\" height=\"6px\" color={['warning', '900']} />}\n </StyledExceptionsSmallFillWrapper>\n <StyledAlertsSmallFillWrapper width=\"6px\" height=\"6px\">\n {alerts && <AlertsSmallFill width=\"6px\" height=\"6px\" color={['danger', '900']} />}\n </StyledAlertsSmallFillWrapper>\n <StyledMessagesSmallFillWrapper width=\"6px\" height=\"6px\">\n {messages && <MessagesSmallFill width=\"6px\" height=\"6px\" color={['success', '900']} />}\n </StyledMessagesSmallFillWrapper>\n </Grid>\n )}\n </StyledIconContainer>\n);\n\nexport default Notifications;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgDnB;AA9CJ,sBAKO;AACP,uBAAuB;AACvB,qBAAiB;AACjB,uBAA4D;AAE5D,MAAM,0BAAsB,yBAAO,OAAO;AAAA,EACxC,MAAM;AAAA,EACN,MAAM,uCAAsB;AAC9B,CAAC;AAAA;AAAA;AAAA;AAAA;AAUD,MAAM,kCAA8B,yBAAO,gBAAAA,eAAuB;AAAA,EAChE,MAAM;AAAA,EACN,MAAM,uCAAsB;AAC9B,CAAC;AACD,MAAM,uCAAmC,yBAAO,eAAAC,SAAM;AAAA,EACpD,MAAM;AAAA,EACN,MAAM,uCAAsB;AAC9B,CAAC;AACD,MAAM,mCAA+B,yBAAO,eAAAA,SAAM;AAAA,EAChD,MAAM;AAAA,EACN,MAAM,uCAAsB;AAC9B,CAAC;AACD,MAAM,qCAAiC,yBAAO,eAAAA,SAAM;AAAA,EAClD,MAAM;AAAA,EACN,MAAM,uCAAsB;AAC9B,CAAC;AAEM,MAAM,gBAAgB,CAAC;AAAA,EAC5B,aAAa;AAAA,EACb,SAAS;AAAA,EACT,WAAW;AACb,MACE,6CAAC,uBACC;AAAA,8CAAC,+BAA4B,MAAK,KAAI,OAAO,CAAC,iBAAiB,KAAK,GAAG;AAAA,GACrE,cAAc,UAAU,aACxB,6CAAC,eAAAA,SAAA,EAAK,MAAM,CAAC,OAAO,OAAO,KAAK,GAAG,QAAO,QAAO,IAAG,OAClD;AAAA,gDAAC,oCAAiC,OAAM,OAAM,QAAO,OAClD,wBAAc,4CAAC,uCAAoB,OAAM,OAAM,QAAO,OAAM,OAAO,CAAC,WAAW,KAAK,GAAG,GAC1F;AAAA,IACA,4CAAC,gCAA6B,OAAM,OAAM,QAAO,OAC9C,oBAAU,4CAAC,mCAAgB,OAAM,OAAM,QAAO,OAAM,OAAO,CAAC,UAAU,KAAK,GAAG,GACjF;AAAA,IACA,4CAAC,kCAA+B,OAAM,OAAM,QAAO,OAChD,sBAAY,4CAAC,qCAAkB,OAAM,OAAM,QAAO,OAAM,OAAO,CAAC,WAAW,KAAK,GAAG,GACtF;AAAA,KACF;AAAA,GAEJ;AAGF,IAAO,wBAAQ;",
|
|
6
6
|
"names": ["InternalNotifications", "Grid"]
|
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -29,6 +29,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
29
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
30
|
var src_exports = {};
|
|
31
31
|
__export(src_exports, {
|
|
32
|
+
DSLeftNavigationName: () => import_constants.DSLeftNavigationName,
|
|
33
|
+
DSLeftNavigationSlots: () => import_constants.DSLeftNavigationSlots,
|
|
34
|
+
LEFT_NAVIGATION_DATA_TESTID: () => import_constants.LEFT_NAVIGATION_DATA_TESTID,
|
|
35
|
+
LEFT_NAVIGATION_REGION_FOCUSES: () => import_constants.LEFT_NAVIGATION_REGION_FOCUSES,
|
|
36
|
+
LEFT_NAVIGATION_SLOTS: () => import_constants.LEFT_NAVIGATION_SLOTS,
|
|
32
37
|
LeftNavItemOptionsSchema: () => import_react_desc_prop_types.LeftNavItemOptionsSchema,
|
|
33
38
|
LeftNavItemPropsSchema: () => import_react_desc_prop_types.LeftNavItemPropsSchema,
|
|
34
39
|
LeftNavigation: () => import_LeftNavigation2.LeftNavigation,
|
|
@@ -41,6 +46,6 @@ var import_LeftNavigation = require("./LeftNavigation.js");
|
|
|
41
46
|
var import_react_desc_prop_types = require("./react-desc-prop-types.js");
|
|
42
47
|
var import_LeftNavigation2 = require("./LeftNavigation.js");
|
|
43
48
|
__reExport(src_exports, require("./exported-related/index.js"), module.exports);
|
|
44
|
-
|
|
49
|
+
var import_constants = require("./constants/constants.js");
|
|
45
50
|
var src_default = import_LeftNavigation.LeftNavigation;
|
|
46
51
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { LeftNavigation } from './LeftNavigation.js';\n\nexport default LeftNavigation;\nexport { LeftNavItemPropsSchema, LeftNavItemOptionsSchema, type DSLeftNavigationT } from './react-desc-prop-types.js';\nexport { LeftNavigation, LeftNavigationWithSchema } from './LeftNavigation.js';\nexport * from './exported-related/index.js';\nexport
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,4BAA+B;AAG/B,mCAAyF;AACzF,IAAAA,yBAAyD;AACzD,wBAAc,wCALd;AAMA,
|
|
4
|
+
"sourcesContent": ["import { LeftNavigation } from './LeftNavigation.js';\n\nexport default LeftNavigation;\nexport { LeftNavItemPropsSchema, LeftNavItemOptionsSchema, type DSLeftNavigationT } from './react-desc-prop-types.js';\nexport { LeftNavigation, LeftNavigationWithSchema } from './LeftNavigation.js';\nexport * from './exported-related/index.js';\nexport {\n DSLeftNavigationName,\n LEFT_NAVIGATION_SLOTS,\n LEFT_NAVIGATION_REGION_FOCUSES,\n LEFT_NAVIGATION_DATA_TESTID,\n // re-exporting under old alias to avoid not really useful breaking change\n DSLeftNavigationSlots,\n} from './constants/constants.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,4BAA+B;AAG/B,mCAAyF;AACzF,IAAAA,yBAAyD;AACzD,wBAAc,wCALd;AAMA,uBAOO;AAXP,IAAO,cAAQ;",
|
|
6
6
|
"names": ["import_LeftNavigation"]
|
|
7
7
|
}
|
|
@@ -76,8 +76,7 @@ const ItemControlledDrilldown = (props) => {
|
|
|
76
76
|
labelBold,
|
|
77
77
|
labelColor,
|
|
78
78
|
isOpened,
|
|
79
|
-
items
|
|
80
|
-
labelDataTestId
|
|
79
|
+
items
|
|
81
80
|
}
|
|
82
81
|
},
|
|
83
82
|
ctx,
|
|
@@ -113,31 +112,11 @@ const ItemControlledDrilldown = (props) => {
|
|
|
113
112
|
paddingTop: "8px",
|
|
114
113
|
children: [
|
|
115
114
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledArrowContainer, { pl: "xxs", mt: "-2px", children: arrowIcon }),
|
|
116
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
117
|
-
|
|
118
|
-
{
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
labelOverflow,
|
|
122
|
-
labelBold,
|
|
123
|
-
labelColor,
|
|
124
|
-
children: labelOverflow === "truncate" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.SimpleTruncatedTooltipText, { value: label, placement: "bottom-start" }) : label
|
|
125
|
-
}
|
|
126
|
-
),
|
|
127
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
128
|
-
import_styled.StyledRightContainer,
|
|
129
|
-
{
|
|
130
|
-
pr: "xxs2",
|
|
131
|
-
cols: ["auto", "auto"],
|
|
132
|
-
alignItems: "center",
|
|
133
|
-
gutter: "xxs",
|
|
134
|
-
"data-testid": "leftnav-right-component",
|
|
135
|
-
children: [
|
|
136
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledDate, { ml: "xxs", "data-testid": "leftnav-list-item-date", children: labelRightSection }),
|
|
137
|
-
RightComponent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RightComponent, { ctx, item })
|
|
138
|
-
]
|
|
139
|
-
}
|
|
140
|
-
)
|
|
115
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledLabel, { pb: "xxxs", labelOverflow, labelBold, labelColor, children: labelOverflow === "truncate" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.SimpleTruncatedTooltipText, { value: label, placement: "bottom-start" }) : label }),
|
|
116
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledRightContainer, { pr: "xxs2", cols: ["auto", "auto"], alignItems: "center", gutter: "xxs", children: [
|
|
117
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledDate, { ml: "xxs", children: labelRightSection }),
|
|
118
|
+
RightComponent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RightComponent, { ctx, item })
|
|
119
|
+
] })
|
|
141
120
|
]
|
|
142
121
|
}
|
|
143
122
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/outOfTheBox/ItemControlledDrilldown/index.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { useMemo } from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';\nimport { ItemRenderer, ITEM_TYPES } from '../../exported-related/index.js';\nimport { StyledLabel, StyledDate, StyledArrowContainer, StyledRightContainer } from '../styled.js';\nimport { ItemSeparator } from '../ItemSeparator/index.js';\nimport { ItemWithDate } from '../ItemWithDate/index.js';\nimport { ItemTextLabel } from '../ItemTextLabel/index.js';\nimport type { DSLeftNavigationT } from '../../react-desc-prop-types.js';\n\nconst outOfTheBoxSubitemsComponents: Record<string, React.ComponentType<DSLeftNavigationT.ComponentProps>> = {\n [ITEM_TYPES.LEFT_NAV_ITEM_SEPARATOR]: ItemSeparator,\n [ITEM_TYPES.LEFT_NAV_ITEM_WITH_DATE]: ItemWithDate,\n [ITEM_TYPES.LEFT_NAV_ITEM_TEXT_LABEL]: ItemTextLabel,\n};\n\nconst OutOfTheBoxMapSubitem: React.ComponentType<DSLeftNavigationT.ComponentProps> = (props) => {\n const {\n item,\n item: { type, Component },\n ctx,\n } = props;\n\n if (typeof type === 'string' && !!outOfTheBoxSubitemsComponents[type]) {\n const OutOfTheBoxComponent = outOfTheBoxSubitemsComponents[type];\n const currentIndent = item.itemOpts?.indent ?? 0;\n const newItem = {\n ...item,\n itemOpts: { ...item.itemOpts, indent: currentIndent + 44 },\n };\n return <OutOfTheBoxComponent item={newItem} ctx={ctx} />;\n }\n if (!Component) return null;\n // we expect an error to be threw if Component is not defined and type is not a valid out-of-the-box...\n return <Component item={item} ctx={ctx} />;\n};\n\nexport const ItemControlledDrilldown = (props: DSLeftNavigationT.ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n itemOpts: {\n label,\n RightComponent,\n labelRightSection,\n labelOverflow: itemLabelOverflow,\n labelBold,\n labelColor,\n isOpened,\n items,\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD8BZ;AA9BX,mBAA+B;AAC/B,uCAA2C;AAC3C,sBAA8C;AAC9C,8BAAyC;AACzC,oBAAoF;AACpF,2BAA8B;AAC9B,0BAA6B;AAC7B,2BAA8B;AAG9B,MAAM,gCAAuG;AAAA,EAC3G,CAAC,mCAAW,uBAAuB,GAAG;AAAA,EACtC,CAAC,mCAAW,uBAAuB,GAAG;AAAA,EACtC,CAAC,mCAAW,wBAAwB,GAAG;AACzC;AAEA,MAAM,wBAA+E,CAAC,UAAU;AAC9F,QAAM;AAAA,IACJ;AAAA,IACA,MAAM,EAAE,MAAM,UAAU;AAAA,IACxB;AAAA,EACF,IAAI;AAEJ,MAAI,OAAO,SAAS,YAAY,CAAC,CAAC,8BAA8B,IAAI,GAAG;AACrE,UAAM,uBAAuB,8BAA8B,IAAI;AAC/D,UAAM,gBAAgB,KAAK,UAAU,UAAU;AAC/C,UAAM,UAAU;AAAA,MACd,GAAG;AAAA,MACH,UAAU,EAAE,GAAG,KAAK,UAAU,QAAQ,gBAAgB,GAAG;AAAA,IAC3D;AACA,WAAO,4CAAC,wBAAqB,MAAM,SAAS,KAAU;AAAA,EACxD;AACA,MAAI,CAAC,UAAW,QAAO;AAEvB,SAAO,4CAAC,aAAU,MAAY,KAAU;AAC1C;AAEO,MAAM,0BAA0B,CAAC,UAAyD;AAC/F,QAAM;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ,UAAU;AAAA,QACR;AAAA,QACA;AAAA,QACA;AAAA,QACA,eAAe;AAAA,QACf;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,
|
|
4
|
+
"sourcesContent": ["import React, { useMemo } from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';\nimport { ItemRenderer, ITEM_TYPES } from '../../exported-related/index.js';\nimport { StyledLabel, StyledDate, StyledArrowContainer, StyledRightContainer } from '../styled.js';\nimport { ItemSeparator } from '../ItemSeparator/index.js';\nimport { ItemWithDate } from '../ItemWithDate/index.js';\nimport { ItemTextLabel } from '../ItemTextLabel/index.js';\nimport type { DSLeftNavigationT } from '../../react-desc-prop-types.js';\n\nconst outOfTheBoxSubitemsComponents: Record<string, React.ComponentType<DSLeftNavigationT.ComponentProps>> = {\n [ITEM_TYPES.LEFT_NAV_ITEM_SEPARATOR]: ItemSeparator,\n [ITEM_TYPES.LEFT_NAV_ITEM_WITH_DATE]: ItemWithDate,\n [ITEM_TYPES.LEFT_NAV_ITEM_TEXT_LABEL]: ItemTextLabel,\n};\n\nconst OutOfTheBoxMapSubitem: React.ComponentType<DSLeftNavigationT.ComponentProps> = (props) => {\n const {\n item,\n item: { type, Component },\n ctx,\n } = props;\n\n if (typeof type === 'string' && !!outOfTheBoxSubitemsComponents[type]) {\n const OutOfTheBoxComponent = outOfTheBoxSubitemsComponents[type];\n const currentIndent = item.itemOpts?.indent ?? 0;\n const newItem = {\n ...item,\n itemOpts: { ...item.itemOpts, indent: currentIndent + 44 },\n };\n return <OutOfTheBoxComponent item={newItem} ctx={ctx} />;\n }\n if (!Component) return null;\n // we expect an error to be threw if Component is not defined and type is not a valid out-of-the-box...\n return <Component item={item} ctx={ctx} />;\n};\n\nexport const ItemControlledDrilldown = (props: DSLeftNavigationT.ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n itemOpts: {\n label,\n RightComponent,\n labelRightSection,\n labelOverflow: itemLabelOverflow,\n labelBold,\n labelColor,\n isOpened,\n items,\n },\n },\n ctx,\n ctx: {\n leftNavProps: { labelOverflow: leftNavLabelOverflow },\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const arrowIcon = useMemo(() => {\n const Component = isOpened ? ArrowheadDown : ArrowheadRight;\n return <Component width=\"24px\" height=\"18px\" color={['brand-primary', '800']} />;\n }, [isOpened]);\n\n const subitems = useMemo(() => {\n if (!isOpened || !items) return [];\n return items.map((subitem) => <OutOfTheBoxMapSubitem item={subitem} ctx={ctx} key={subitem.dsId} />);\n }, [isOpened, items, ctx]);\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaExpanded: isOpened,\n ariaRole: 'menuitem',\n ...item.itemOpts,\n openable: !isOpened,\n closable: isOpened,\n },\n CollapsedComponent: null,\n }}\n subitems={subitems}\n minHeight=\"32px\"\n paddingTop=\"8px\"\n >\n <StyledArrowContainer pl=\"xxs\" mt=\"-2px\">\n {arrowIcon}\n </StyledArrowContainer>\n <StyledLabel pb=\"xxxs\" labelOverflow={labelOverflow} labelBold={labelBold} labelColor={labelColor}>\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledLabel>\n <StyledRightContainer pr=\"xxs2\" cols={['auto', 'auto']} alignItems=\"center\" gutter=\"xxs\">\n <StyledDate ml=\"xxs\">{labelRightSection}</StyledDate>\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n </ItemRenderer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD8BZ;AA9BX,mBAA+B;AAC/B,uCAA2C;AAC3C,sBAA8C;AAC9C,8BAAyC;AACzC,oBAAoF;AACpF,2BAA8B;AAC9B,0BAA6B;AAC7B,2BAA8B;AAG9B,MAAM,gCAAuG;AAAA,EAC3G,CAAC,mCAAW,uBAAuB,GAAG;AAAA,EACtC,CAAC,mCAAW,uBAAuB,GAAG;AAAA,EACtC,CAAC,mCAAW,wBAAwB,GAAG;AACzC;AAEA,MAAM,wBAA+E,CAAC,UAAU;AAC9F,QAAM;AAAA,IACJ;AAAA,IACA,MAAM,EAAE,MAAM,UAAU;AAAA,IACxB;AAAA,EACF,IAAI;AAEJ,MAAI,OAAO,SAAS,YAAY,CAAC,CAAC,8BAA8B,IAAI,GAAG;AACrE,UAAM,uBAAuB,8BAA8B,IAAI;AAC/D,UAAM,gBAAgB,KAAK,UAAU,UAAU;AAC/C,UAAM,UAAU;AAAA,MACd,GAAG;AAAA,MACH,UAAU,EAAE,GAAG,KAAK,UAAU,QAAQ,gBAAgB,GAAG;AAAA,IAC3D;AACA,WAAO,4CAAC,wBAAqB,MAAM,SAAS,KAAU;AAAA,EACxD;AACA,MAAI,CAAC,UAAW,QAAO;AAEvB,SAAO,4CAAC,aAAU,MAAY,KAAU;AAC1C;AAEO,MAAM,0BAA0B,CAAC,UAAyD;AAC/F,QAAM;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ,UAAU;AAAA,QACR;AAAA,QACA;AAAA,QACA;AAAA,QACA,eAAe;AAAA,QACf;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA;AAAA,IACA,KAAK;AAAA,MACH,cAAc,EAAE,eAAe,qBAAqB;AAAA,IACtD;AAAA,EACF,IAAI;AAEJ,QAAM,gBAAgB,qBAAqB;AAE3C,QAAM,gBAAY,sBAAQ,MAAM;AAC9B,UAAM,YAAY,WAAW,gCAAgB;AAC7C,WAAO,4CAAC,aAAU,OAAM,QAAO,QAAO,QAAO,OAAO,CAAC,iBAAiB,KAAK,GAAG;AAAA,EAChF,GAAG,CAAC,QAAQ,CAAC;AAEb,QAAM,eAAW,sBAAQ,MAAM;AAC7B,QAAI,CAAC,YAAY,CAAC,MAAO,QAAO,CAAC;AACjC,WAAO,MAAM,IAAI,CAAC,YAAY,4CAAC,yBAAsB,MAAM,SAAS,OAAe,QAAQ,IAAM,CAAE;AAAA,EACrG,GAAG,CAAC,UAAU,OAAO,GAAG,CAAC;AAEzB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,QACJ,GAAG;AAAA,QACH,UAAU;AAAA,UACR,cAAc;AAAA,UACd,UAAU;AAAA,UACV,GAAG,KAAK;AAAA,UACR,UAAU,CAAC;AAAA,UACX,UAAU;AAAA,QACZ;AAAA,QACA,oBAAoB;AAAA,MACtB;AAAA,MACA;AAAA,MACA,WAAU;AAAA,MACV,YAAW;AAAA,MAEX;AAAA,oDAAC,sCAAqB,IAAG,OAAM,IAAG,QAC/B,qBACH;AAAA,QACA,4CAAC,6BAAY,IAAG,QAAO,eAA8B,WAAsB,YACxE,4BAAkB,aAAa,4CAAC,+DAA2B,OAAO,OAAO,WAAU,gBAAe,IAAK,OAC1G;AAAA,QACA,6CAAC,sCAAqB,IAAG,QAAO,MAAM,CAAC,QAAQ,MAAM,GAAG,YAAW,UAAS,QAAO,OACjF;AAAA,sDAAC,4BAAW,IAAG,OAAO,6BAAkB;AAAA,UACvC,kBAAkB,4CAAC,kBAAe,KAAU,MAAY;AAAA,WAC3D;AAAA;AAAA;AAAA,EACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -39,6 +39,7 @@ var import_ds_truncated_tooltip_text = require("@elliemae/ds-truncated-tooltip-t
|
|
|
39
39
|
var import_exported_related = require("../../exported-related/index.js");
|
|
40
40
|
var import_styled = require("../styled.js");
|
|
41
41
|
var import_constants = require("../../exported-related/constants.js");
|
|
42
|
+
var import_constants2 = require("../../constants/constants.js");
|
|
42
43
|
const notOpenedShadowStyle = (isSelected) => (theme) => `
|
|
43
44
|
box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : "transparent"};
|
|
44
45
|
|
|
@@ -100,7 +101,6 @@ const ItemHeader = (props) => {
|
|
|
100
101
|
gutter: "1px",
|
|
101
102
|
pl: opened ? "xxs" : 0,
|
|
102
103
|
justifyItems: "center",
|
|
103
|
-
"data-testid": "leftnav-leftcomponent",
|
|
104
104
|
children: [
|
|
105
105
|
opened && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
106
106
|
import_styled.StyledChevronLeft,
|
|
@@ -109,7 +109,6 @@ const ItemHeader = (props) => {
|
|
|
109
109
|
onClick: (e) => {
|
|
110
110
|
if (onItemClick) onItemClick(item, e);
|
|
111
111
|
},
|
|
112
|
-
"data-testid": "leftnav-leftcomponent-chevron",
|
|
113
112
|
onFocus: (e) => {
|
|
114
113
|
e.stopPropagation();
|
|
115
114
|
setFocusedItem(import_constants.CHEVRON_BACK_DS_ID);
|
|
@@ -128,8 +127,8 @@ const ItemHeader = (props) => {
|
|
|
128
127
|
ml: opened ? "xxs" : "1px",
|
|
129
128
|
mt: "xxxs",
|
|
130
129
|
mb: "15px",
|
|
131
|
-
"data-testid": labelDataTestId || "leftnav-itemlabel",
|
|
132
130
|
labelOverflow,
|
|
131
|
+
"data-testid": labelDataTestId || import_constants2.LEFT_NAVIGATION_DATA_TESTID.ITEM_LABEL,
|
|
133
132
|
children: labelOverflow === "truncate" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.SimpleTruncatedTooltipText, { value: label, placement: "bottom-start" }) : label
|
|
134
133
|
}
|
|
135
134
|
),
|
|
@@ -143,7 +142,6 @@ const ItemHeader = (props) => {
|
|
|
143
142
|
e.stopPropagation();
|
|
144
143
|
},
|
|
145
144
|
onKeyDown: (e) => e.stopPropagation(),
|
|
146
|
-
"data-testid": "leftnav-right-component",
|
|
147
145
|
children: RightComponent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RightComponent, { ctx, item })
|
|
148
146
|
}
|
|
149
147
|
),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/outOfTheBox/ItemHeader/index.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React, { useCallback } from 'react';\nimport { ChevronSmallLeft } from '@elliemae/ds-icons';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport type { Theme } from '@elliemae/ds-system';\nimport { ItemRenderer } from '../../exported-related/index.js';\nimport type { DSLeftNavigationT } from '../../react-desc-prop-types.js';\nimport {\n StyledItemLabel,\n StyledBottomContainer,\n StyledLeftContainer,\n StyledRightContainer,\n StyledChevronLeft,\n} from '../styled.js';\nimport { CHEVRON_BACK_DS_ID } from '../../exported-related/constants.js';\n\nconst notOpenedShadowStyle = (isSelected: boolean) => (theme: Theme) =>\n `\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : 'transparent'};\n\n :hover {\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : theme.colors.brand[300]};\n }\n\n :active {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};\n }\n`;\n\nexport const ItemHeader = (props: DSLeftNavigationT.ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: { label, RightComponent, BottomComponent, labelDataTestId, labelOverflow: itemLabelOverflow },\n CollapsedComponent = () => null,\n },\n ctx,\n ctx: {\n leftNavProps: { openedItem, labelOverflow: leftNavLabelOverflow, onItemClick },\n expandedForAnimation,\n setFocusedItem,\n selectedItem,\n selectedParent,\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const opened = openedItem === dsId;\n\n const ariaLabel = item.itemOpts.ariaLabel ?? (typeof label === 'string' ? `${label}, category` : 'category');\n\n const isSelected = selectedItem === dsId || selectedParent === dsId;\n\n const shadowStyle = useCallback(\n (opened_: boolean) => (theme: Theme) =>\n !opened_ ? notOpenedShadowStyle(isSelected)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`,\n [isSelected],\n );\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaLabel,\n ariaExpanded: opened,\n ...item.itemOpts,\n openable: expandedForAnimation && !opened,\n closable: expandedForAnimation && opened,\n selectable: !opened,\n },\n }}\n hasBorderBottom\n borderBottomMr={opened ? '12px' : '0px'}\n shadowStyle={shadowStyle}\n >\n <StyledLeftContainer\n cols={opened ? ['auto', 'auto'] : ['38px']}\n gutter=\"1px\"\n pl={opened ? 'xxs' : 0}\n justifyItems=\"center\"\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
6
|
-
"names": []
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React, { useCallback } from 'react';\nimport { ChevronSmallLeft } from '@elliemae/ds-icons';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport type { Theme } from '@elliemae/ds-system';\nimport { ItemRenderer } from '../../exported-related/index.js';\nimport type { DSLeftNavigationT } from '../../react-desc-prop-types.js';\nimport {\n StyledItemLabel,\n StyledBottomContainer,\n StyledLeftContainer,\n StyledRightContainer,\n StyledChevronLeft,\n} from '../styled.js';\nimport { CHEVRON_BACK_DS_ID } from '../../exported-related/constants.js';\nimport { LEFT_NAVIGATION_DATA_TESTID } from '../../constants/constants.js';\n\nconst notOpenedShadowStyle = (isSelected: boolean) => (theme: Theme) =>\n `\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : 'transparent'};\n\n :hover {\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : theme.colors.brand[300]};\n }\n\n :active {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};\n }\n`;\n\nexport const ItemHeader = (props: DSLeftNavigationT.ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: { label, RightComponent, BottomComponent, labelDataTestId, labelOverflow: itemLabelOverflow },\n CollapsedComponent = () => null,\n },\n ctx,\n ctx: {\n leftNavProps: { openedItem, labelOverflow: leftNavLabelOverflow, onItemClick },\n expandedForAnimation,\n setFocusedItem,\n selectedItem,\n selectedParent,\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const opened = openedItem === dsId;\n\n const ariaLabel = item.itemOpts.ariaLabel ?? (typeof label === 'string' ? `${label}, category` : 'category');\n\n const isSelected = selectedItem === dsId || selectedParent === dsId;\n\n const shadowStyle = useCallback(\n (opened_: boolean) => (theme: Theme) =>\n !opened_ ? notOpenedShadowStyle(isSelected)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`,\n [isSelected],\n );\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaLabel,\n ariaExpanded: opened,\n ...item.itemOpts,\n openable: expandedForAnimation && !opened,\n closable: expandedForAnimation && opened,\n selectable: !opened,\n },\n }}\n hasBorderBottom\n borderBottomMr={opened ? '12px' : '0px'}\n shadowStyle={shadowStyle}\n >\n <StyledLeftContainer\n cols={opened ? ['auto', 'auto'] : ['38px']}\n gutter=\"1px\"\n pl={opened ? 'xxs' : 0}\n justifyItems=\"center\"\n >\n {opened && (\n <StyledChevronLeft\n buttonType=\"raw\"\n onClick={(e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>) => {\n if (onItemClick) onItemClick(item, e as React.MouseEvent<HTMLElement>);\n }}\n onFocus={(e: React.FocusEvent) => {\n e.stopPropagation();\n setFocusedItem(CHEVRON_BACK_DS_ID);\n }}\n aria-label={`Close ${ariaLabel}`}\n >\n <ChevronSmallLeft size=\"m\" color={['brand-primary', '800']} />\n </StyledChevronLeft>\n )}\n {CollapsedComponent && <CollapsedComponent item={item} ctx={ctx} />}\n </StyledLeftContainer>\n <StyledItemLabel\n ml={opened ? 'xxs' : '1px'}\n mt=\"xxxs\"\n mb=\"15px\"\n labelOverflow={labelOverflow}\n data-testid={labelDataTestId || LEFT_NAVIGATION_DATA_TESTID.ITEM_LABEL}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledItemLabel>\n <StyledRightContainer\n pl=\"xs\"\n pr={opened ? 'xxs2' : 'xxs'}\n onFocus={(e: React.FocusEvent) => {\n setFocusedItem(null);\n e.stopPropagation();\n }}\n onKeyDown={(e: React.KeyboardEvent) => e.stopPropagation()}\n >\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n {BottomComponent && (\n <StyledBottomContainer\n pb=\"xxxs\"\n pl=\"xxs\"\n pr=\"xxs\"\n onFocus={(e: React.FocusEvent) => {\n setFocusedItem(null);\n e.stopPropagation();\n }}\n onKeyDown={(e: React.KeyboardEvent) => e.stopPropagation()}\n >\n <BottomComponent ctx={ctx} item={item} />\n </StyledBottomContainer>\n )}\n </ItemRenderer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkFjB;AA9EN,mBAAmC;AACnC,sBAAiC;AACjC,uCAA2C;AAE3C,8BAA6B;AAE7B,oBAMO;AACP,uBAAmC;AACnC,IAAAA,oBAA4C;AAE5C,MAAM,uBAAuB,CAAC,eAAwB,CAAC,UACrD;AAAA,gCAC8B,aAAa,MAAM,OAAO,MAAM,GAAG,IAAI,aAAa;AAAA;AAAA;AAAA,kCAGlD,aAAa,MAAM,OAAO,MAAM,GAAG,IAAI,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA,kCAI9D,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;AAIlD,MAAM,aAAa,CAAC,UAAyD;AAClF,QAAM;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ;AAAA,MACA,UAAU,EAAE,OAAO,gBAAgB,iBAAiB,iBAAiB,eAAe,kBAAkB;AAAA,MACtG,qBAAqB,MAAM;AAAA,IAC7B;AAAA,IACA;AAAA,IACA,KAAK;AAAA,MACH,cAAc,EAAE,YAAY,eAAe,sBAAsB,YAAY;AAAA,MAC7E;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF,IAAI;AAEJ,QAAM,gBAAgB,qBAAqB;AAE3C,QAAM,SAAS,eAAe;AAE9B,QAAM,YAAY,KAAK,SAAS,cAAc,OAAO,UAAU,WAAW,GAAG,KAAK,eAAe;AAEjG,QAAM,aAAa,iBAAiB,QAAQ,mBAAmB;AAE/D,QAAM,kBAAc;AAAA,IAClB,CAAC,YAAqB,CAAC,UACrB,CAAC,UAAU,qBAAqB,UAAU,EAAE,KAAK,IAAI;AAAA,IACvD,CAAC,UAAU;AAAA,EACb;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,QACJ,GAAG;AAAA,QACH,UAAU;AAAA,UACR;AAAA,UACA,cAAc;AAAA,UACd,GAAG,KAAK;AAAA,UACR,UAAU,wBAAwB,CAAC;AAAA,UACnC,UAAU,wBAAwB;AAAA,UAClC,YAAY,CAAC;AAAA,QACf;AAAA,MACF;AAAA,MACA,iBAAe;AAAA,MACf,gBAAgB,SAAS,SAAS;AAAA,MAClC;AAAA,MAEA;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,MAAM,SAAS,CAAC,QAAQ,MAAM,IAAI,CAAC,MAAM;AAAA,YACzC,QAAO;AAAA,YACP,IAAI,SAAS,QAAQ;AAAA,YACrB,cAAa;AAAA,YAEZ;AAAA,wBACC;AAAA,gBAAC;AAAA;AAAA,kBACC,YAAW;AAAA,kBACX,SAAS,CAAC,MAAwE;AAChF,wBAAI,YAAa,aAAY,MAAM,CAAkC;AAAA,kBACvE;AAAA,kBACA,SAAS,CAAC,MAAwB;AAChC,sBAAE,gBAAgB;AAClB,mCAAe,mCAAkB;AAAA,kBACnC;AAAA,kBACA,cAAY,SAAS,SAAS;AAAA,kBAE9B,sDAAC,oCAAiB,MAAK,KAAI,OAAO,CAAC,iBAAiB,KAAK,GAAG;AAAA;AAAA,cAC9D;AAAA,cAED,sBAAsB,4CAAC,sBAAmB,MAAY,KAAU;AAAA;AAAA;AAAA,QACnE;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,IAAI,SAAS,QAAQ;AAAA,YACrB,IAAG;AAAA,YACH,IAAG;AAAA,YACH;AAAA,YACA,eAAa,mBAAmB,8CAA4B;AAAA,YAE3D,4BAAkB,aAAa,4CAAC,+DAA2B,OAAO,OAAO,WAAU,gBAAe,IAAK;AAAA;AAAA,QAC1G;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,IAAG;AAAA,YACH,IAAI,SAAS,SAAS;AAAA,YACtB,SAAS,CAAC,MAAwB;AAChC,6BAAe,IAAI;AACnB,gBAAE,gBAAgB;AAAA,YACpB;AAAA,YACA,WAAW,CAAC,MAA2B,EAAE,gBAAgB;AAAA,YAExD,4BAAkB,4CAAC,kBAAe,KAAU,MAAY;AAAA;AAAA,QAC3D;AAAA,QACC,mBACC;AAAA,UAAC;AAAA;AAAA,YACC,IAAG;AAAA,YACH,IAAG;AAAA,YACH,IAAG;AAAA,YACH,SAAS,CAAC,MAAwB;AAChC,6BAAe,IAAI;AACnB,gBAAE,gBAAgB;AAAA,YACpB;AAAA,YACA,WAAW,CAAC,MAA2B,EAAE,gBAAgB;AAAA,YAEzD,sDAAC,mBAAgB,KAAU,MAAY;AAAA;AAAA,QACzC;AAAA;AAAA;AAAA,EAEJ;AAEJ;",
|
|
6
|
+
"names": ["import_constants"]
|
|
7
7
|
}
|
|
@@ -37,6 +37,7 @@ var import_react = require("react");
|
|
|
37
37
|
var import_ds_truncated_tooltip_text = require("@elliemae/ds-truncated-tooltip-text");
|
|
38
38
|
var import_exported_related = require("../../exported-related/index.js");
|
|
39
39
|
var import_styled = require("../styled.js");
|
|
40
|
+
var import_constants = require("../../constants/constants.js");
|
|
40
41
|
const notOpenedShadowStyle = (isSelected) => (theme) => `
|
|
41
42
|
box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : "transparent"};
|
|
42
43
|
|
|
@@ -82,19 +83,19 @@ const ItemLink = (props) => {
|
|
|
82
83
|
},
|
|
83
84
|
shadowStyle,
|
|
84
85
|
children: [
|
|
85
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledLeftContainer, { cols: ["38px"], gutter: "1px", justifyItems: "center",
|
|
86
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledLeftContainer, { cols: ["38px"], gutter: "1px", justifyItems: "center", children: CollapsedComponent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollapsedComponent, { item, ctx }) }),
|
|
86
87
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
87
88
|
import_styled.StyledItemLabel,
|
|
88
89
|
{
|
|
89
90
|
ml: "1px",
|
|
90
91
|
mt: "xxxs",
|
|
91
92
|
mb: "15px",
|
|
92
|
-
"data-testid": labelDataTestId || "leftnav-itemlabel",
|
|
93
93
|
labelOverflow,
|
|
94
|
+
"data-testid": labelDataTestId || import_constants.LEFT_NAVIGATION_DATA_TESTID.ITEM_LABEL,
|
|
94
95
|
children: labelOverflow === "truncate" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.SimpleTruncatedTooltipText, { value: label, placement: "bottom-start" }) : label
|
|
95
96
|
}
|
|
96
97
|
),
|
|
97
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledRightContainer, { mt: "xxxs", pr: "xxs2",
|
|
98
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledRightContainer, { mt: "xxxs", pr: "xxs2", children: RightComponent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RightComponent, { ctx, item }) })
|
|
98
99
|
]
|
|
99
100
|
}
|
|
100
101
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/outOfTheBox/ItemLink/index.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable indent */\nimport React, { useCallback } from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport type { Theme } from '@elliemae/ds-system';\nimport { ItemRenderer } from '../../exported-related/index.js';\nimport type { DSLeftNavigationT } from '../../react-desc-prop-types.js';\nimport { StyledItemLabel, StyledLeftContainer, StyledRightContainer } from '../styled.js';\n\nconst notOpenedShadowStyle = (isSelected: boolean) => (theme: Theme) =>\n `\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : 'transparent'};\n\n :hover {\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : theme.colors.brand[300]};\n }\n\n :active {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};\n }\n`;\n\nexport const ItemLink = (props: DSLeftNavigationT.ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: { label, RightComponent, labelDataTestId, labelOverflow: itemLabelOverflow },\n CollapsedComponent = () => null,\n },\n ctx,\n ctx: {\n leftNavProps: { labelOverflow: leftNavLabelOverflow },\n selectedItem,\n selectedParent,\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const isSelected = selectedItem === dsId || selectedParent === dsId;\n\n const shadowStyle = useCallback(\n (opened_: boolean) => (theme: Theme) =>\n !opened_ ? notOpenedShadowStyle(isSelected)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`,\n [isSelected],\n );\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaLabel: typeof label === 'string' ? label : '',\n ...item.itemOpts,\n selectable: true,\n },\n }}\n shadowStyle={shadowStyle}\n >\n <StyledLeftContainer cols={['38px']} gutter=\"1px\" justifyItems=\"center\"
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable indent */\nimport React, { useCallback } from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport type { Theme } from '@elliemae/ds-system';\nimport { ItemRenderer } from '../../exported-related/index.js';\nimport type { DSLeftNavigationT } from '../../react-desc-prop-types.js';\nimport { StyledItemLabel, StyledLeftContainer, StyledRightContainer } from '../styled.js';\nimport { LEFT_NAVIGATION_DATA_TESTID } from '../../constants/constants.js';\n\nconst notOpenedShadowStyle = (isSelected: boolean) => (theme: Theme) =>\n `\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : 'transparent'};\n\n :hover {\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : theme.colors.brand[300]};\n }\n\n :active {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};\n }\n`;\n\nexport const ItemLink = (props: DSLeftNavigationT.ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: { label, RightComponent, labelDataTestId, labelOverflow: itemLabelOverflow },\n CollapsedComponent = () => null,\n },\n ctx,\n ctx: {\n leftNavProps: { labelOverflow: leftNavLabelOverflow },\n selectedItem,\n selectedParent,\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const isSelected = selectedItem === dsId || selectedParent === dsId;\n\n const shadowStyle = useCallback(\n (opened_: boolean) => (theme: Theme) =>\n !opened_ ? notOpenedShadowStyle(isSelected)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`,\n [isSelected],\n );\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaLabel: typeof label === 'string' ? label : '',\n ...item.itemOpts,\n selectable: true,\n },\n }}\n shadowStyle={shadowStyle}\n >\n <StyledLeftContainer cols={['38px']} gutter=\"1px\" justifyItems=\"center\">\n {CollapsedComponent && <CollapsedComponent item={item} ctx={ctx} />}\n </StyledLeftContainer>\n <StyledItemLabel\n ml=\"1px\"\n mt=\"xxxs\"\n mb=\"15px\"\n labelOverflow={labelOverflow}\n data-testid={labelDataTestId || LEFT_NAVIGATION_DATA_TESTID.ITEM_LABEL}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledItemLabel>\n <StyledRightContainer mt=\"xxxs\" pr=\"xxs2\">\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n </ItemRenderer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiDnB;AAhDJ,mBAAmC;AACnC,uCAA2C;AAE3C,8BAA6B;AAE7B,oBAA2E;AAC3E,uBAA4C;AAE5C,MAAM,uBAAuB,CAAC,eAAwB,CAAC,UACrD;AAAA,gCAC8B,aAAa,MAAM,OAAO,MAAM,GAAG,IAAI,aAAa;AAAA;AAAA;AAAA,kCAGlD,aAAa,MAAM,OAAO,MAAM,GAAG,IAAI,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA,kCAI9D,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;AAIlD,MAAM,WAAW,CAAC,UAAyD;AAChF,QAAM;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ;AAAA,MACA,UAAU,EAAE,OAAO,gBAAgB,iBAAiB,eAAe,kBAAkB;AAAA,MACrF,qBAAqB,MAAM;AAAA,IAC7B;AAAA,IACA;AAAA,IACA,KAAK;AAAA,MACH,cAAc,EAAE,eAAe,qBAAqB;AAAA,MACpD;AAAA,MACA;AAAA,IACF;AAAA,EACF,IAAI;AAEJ,QAAM,gBAAgB,qBAAqB;AAE3C,QAAM,aAAa,iBAAiB,QAAQ,mBAAmB;AAE/D,QAAM,kBAAc;AAAA,IAClB,CAAC,YAAqB,CAAC,UACrB,CAAC,UAAU,qBAAqB,UAAU,EAAE,KAAK,IAAI;AAAA,IACvD,CAAC,UAAU;AAAA,EACb;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,QACJ,GAAG;AAAA,QACH,UAAU;AAAA,UACR,WAAW,OAAO,UAAU,WAAW,QAAQ;AAAA,UAC/C,GAAG,KAAK;AAAA,UACR,YAAY;AAAA,QACd;AAAA,MACF;AAAA,MACA;AAAA,MAEA;AAAA,oDAAC,qCAAoB,MAAM,CAAC,MAAM,GAAG,QAAO,OAAM,cAAa,UAC5D,gCAAsB,4CAAC,sBAAmB,MAAY,KAAU,GACnE;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,IAAG;AAAA,YACH,IAAG;AAAA,YACH,IAAG;AAAA,YACH;AAAA,YACA,eAAa,mBAAmB,6CAA4B;AAAA,YAE3D,4BAAkB,aAAa,4CAAC,+DAA2B,OAAO,OAAO,WAAU,gBAAe,IAAK;AAAA;AAAA,QAC1G;AAAA,QACA,4CAAC,sCAAqB,IAAG,QAAO,IAAG,QAChC,4BAAkB,4CAAC,kBAAe,KAAU,MAAY,GAC3D;AAAA;AAAA;AAAA,EACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -35,6 +35,7 @@ var React = __toESM(require("react"));
|
|
|
35
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
36
|
var import_exported_related = require("../../exported-related/index.js");
|
|
37
37
|
var import_styled = require("../styled.js");
|
|
38
|
+
var import_constants = require("../../constants/constants.js");
|
|
38
39
|
const ItemSection = (props) => {
|
|
39
40
|
const {
|
|
40
41
|
item,
|
|
@@ -57,7 +58,7 @@ const ItemSection = (props) => {
|
|
|
57
58
|
children: [
|
|
58
59
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledSectionContainer, { cols: ["min-content", "auto", "min-content", "auto"], pl: "xxs", alignItems: "center", children: [
|
|
59
60
|
LeftComponent ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LeftComponent, { ctx, item }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {}),
|
|
60
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledSectionLabel, { "data-testid": labelDataTestId ||
|
|
61
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledSectionLabel, { "data-testid": labelDataTestId || import_constants.LEFT_NAVIGATION_DATA_TESTID.SECTION_LABEL, children: label }),
|
|
61
62
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledVerticalSeparator, {}),
|
|
62
63
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledRightLabel, { children: labelRightSection })
|
|
63
64
|
] }),
|
|
@@ -72,7 +73,6 @@ const ItemSection = (props) => {
|
|
|
72
73
|
onKeyDown: (e) => e.stopPropagation(),
|
|
73
74
|
pr: "xxs2",
|
|
74
75
|
alignItems: "center",
|
|
75
|
-
"data-testid": "leftnav-right-component",
|
|
76
76
|
children: RightComponent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RightComponent, { ctx, item })
|
|
77
77
|
}
|
|
78
78
|
)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/outOfTheBox/ItemSection/index.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { ItemRenderer } from '../../exported-related/index.js';\nimport type { DSLeftNavigationT } from '../../react-desc-prop-types.js';\nimport {\n StyledSectionLabel,\n StyledRightLabel,\n StyledVerticalSeparator,\n StyledRightContainer,\n StyledSectionContainer,\n} from '../styled.js';\n\nexport const ItemSection = (props: DSLeftNavigationT.ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n itemOpts: { label, LeftComponent, RightComponent, labelRightSection, labelDataTestId },\n },\n ctx,\n ctx: { setFocusedItem },\n } = props;\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: { ...item.itemOpts, selectable: false, focuseable: false },\n CollapsedComponent: null,\n }}\n minHeight=\"32px\"\n paddingTop=\"8px\"\n >\n <StyledSectionContainer cols={['min-content', 'auto', 'min-content', 'auto']} pl=\"xxs\" alignItems=\"center\">\n {LeftComponent ? <LeftComponent ctx={ctx} item={item} /> : <div />}\n <StyledSectionLabel data-testid={labelDataTestId ||
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { ItemRenderer } from '../../exported-related/index.js';\nimport type { DSLeftNavigationT } from '../../react-desc-prop-types.js';\nimport {\n StyledSectionLabel,\n StyledRightLabel,\n StyledVerticalSeparator,\n StyledRightContainer,\n StyledSectionContainer,\n} from '../styled.js';\nimport { LEFT_NAVIGATION_DATA_TESTID } from '../../constants/constants.js';\n\nexport const ItemSection = (props: DSLeftNavigationT.ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n itemOpts: { label, LeftComponent, RightComponent, labelRightSection, labelDataTestId },\n },\n ctx,\n ctx: { setFocusedItem },\n } = props;\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: { ...item.itemOpts, selectable: false, focuseable: false },\n CollapsedComponent: null,\n }}\n minHeight=\"32px\"\n paddingTop=\"8px\"\n >\n <StyledSectionContainer cols={['min-content', 'auto', 'min-content', 'auto']} pl=\"xxs\" alignItems=\"center\">\n {LeftComponent ? <LeftComponent ctx={ctx} item={item} /> : <div />}\n <StyledSectionLabel data-testid={labelDataTestId || LEFT_NAVIGATION_DATA_TESTID.SECTION_LABEL}>\n {label}\n </StyledSectionLabel>\n <StyledVerticalSeparator />\n <StyledRightLabel>{labelRightSection}</StyledRightLabel>\n </StyledSectionContainer>\n <StyledRightContainer\n ml=\"auto\"\n onFocus={(e: React.FocusEvent) => {\n setFocusedItem(null);\n e.stopPropagation();\n }}\n onKeyDown={(e: React.KeyboardEvent) => e.stopPropagation()}\n pr=\"xxs2\"\n alignItems=\"center\"\n >\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n </ItemRenderer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgCjB;AA/BN,8BAA6B;AAE7B,oBAMO;AACP,uBAA4C;AAErC,MAAM,cAAc,CAAC,UAAyD;AACnF,QAAM;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ,UAAU,EAAE,OAAO,eAAe,gBAAgB,mBAAmB,gBAAgB;AAAA,IACvF;AAAA,IACA;AAAA,IACA,KAAK,EAAE,eAAe;AAAA,EACxB,IAAI;AAEJ,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,QACJ,GAAG;AAAA,QACH,UAAU,EAAE,GAAG,KAAK,UAAU,YAAY,OAAO,YAAY,MAAM;AAAA,QACnE,oBAAoB;AAAA,MACtB;AAAA,MACA,WAAU;AAAA,MACV,YAAW;AAAA,MAEX;AAAA,qDAAC,wCAAuB,MAAM,CAAC,eAAe,QAAQ,eAAe,MAAM,GAAG,IAAG,OAAM,YAAW,UAC/F;AAAA,0BAAgB,4CAAC,iBAAc,KAAU,MAAY,IAAK,4CAAC,SAAI;AAAA,UAChE,4CAAC,oCAAmB,eAAa,mBAAmB,6CAA4B,eAC7E,iBACH;AAAA,UACA,4CAAC,yCAAwB;AAAA,UACzB,4CAAC,kCAAkB,6BAAkB;AAAA,WACvC;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,IAAG;AAAA,YACH,SAAS,CAAC,MAAwB;AAChC,6BAAe,IAAI;AACnB,gBAAE,gBAAgB;AAAA,YACpB;AAAA,YACA,WAAW,CAAC,MAA2B,EAAE,gBAAgB;AAAA,YACzD,IAAG;AAAA,YACH,YAAW;AAAA,YAEV,4BAAkB,4CAAC,kBAAe,KAAU,MAAY;AAAA;AAAA,QAC3D;AAAA;AAAA;AAAA,EACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -35,8 +35,8 @@ var React = __toESM(require("react"));
|
|
|
35
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
36
|
var import_ds_system = require("@elliemae/ds-system");
|
|
37
37
|
var import_exported_related = require("../../exported-related/index.js");
|
|
38
|
-
var import_constants = require("../../constants/
|
|
39
|
-
const StyledSeparator = (0, import_ds_system.styled)("div", { name: import_constants.DSLeftNavigationName, slot: import_constants.
|
|
38
|
+
var import_constants = require("../../constants/constants.js");
|
|
39
|
+
const StyledSeparator = (0, import_ds_system.styled)("div", { name: import_constants.DSLeftNavigationName, slot: import_constants.LEFT_NAVIGATION_SLOTS.ITEM_SEPARATOR })`
|
|
40
40
|
height: 1px;
|
|
41
41
|
background-color: ${(props) => props.theme.colors.neutral[100]};
|
|
42
42
|
width: auto;
|
|
@@ -61,7 +61,7 @@ const ItemSeparator = (props) => {
|
|
|
61
61
|
},
|
|
62
62
|
minHeight: "1px",
|
|
63
63
|
paddingTop: "0px",
|
|
64
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledSeparator, {
|
|
64
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledSeparator, {})
|
|
65
65
|
}
|
|
66
66
|
);
|
|
67
67
|
};
|