@elliemae/ds-left-navigation 1.54.0-next.4 → 1.54.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/exported-related/ItemRenderer/index.js +4 -2
- package/cjs/exported-related/ItemRenderer/index.js.map +1 -1
- package/cjs/exported-related/ItemRenderer/usePropsWithDefaults.js +1 -0
- package/cjs/exported-related/ItemRenderer/usePropsWithDefaults.js.map +1 -1
- package/cjs/outOfTheBox/ItemControlledDrilldown/index.js +1 -1
- package/cjs/outOfTheBox/ItemControlledDrilldown/index.js.map +1 -1
- package/cjs/outOfTheBox/ItemSection/index.js +2 -1
- package/cjs/outOfTheBox/ItemSection/index.js.map +1 -1
- package/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js +1 -1
- package/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +1 -1
- package/cjs/parts/LeftNavContent/index.js.map +1 -1
- package/cjs/parts/LeftNavContentWithScrollbar/index.js +9 -8
- package/cjs/parts/LeftNavContentWithScrollbar/index.js.map +1 -1
- package/cjs/parts/LeftNavFooterItem/index.js +2 -1
- package/cjs/parts/LeftNavFooterItem/index.js.map +1 -1
- package/esm/exported-related/ItemRenderer/index.js +4 -2
- package/esm/exported-related/ItemRenderer/index.js.map +1 -1
- package/esm/exported-related/ItemRenderer/usePropsWithDefaults.js +1 -0
- package/esm/exported-related/ItemRenderer/usePropsWithDefaults.js.map +1 -1
- package/esm/outOfTheBox/ItemControlledDrilldown/index.js +1 -1
- package/esm/outOfTheBox/ItemControlledDrilldown/index.js.map +1 -1
- package/esm/outOfTheBox/ItemSection/index.js +2 -1
- package/esm/outOfTheBox/ItemSection/index.js.map +1 -1
- package/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js +1 -1
- package/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +1 -1
- package/esm/parts/LeftNavContent/index.js.map +1 -1
- package/esm/parts/LeftNavContentWithScrollbar/index.js +9 -8
- package/esm/parts/LeftNavContentWithScrollbar/index.js.map +1 -1
- package/esm/parts/LeftNavFooterItem/index.js +2 -1
- package/esm/parts/LeftNavFooterItem/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -17,7 +17,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
17
17
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
18
18
|
var Grid__default = /*#__PURE__*/_interopDefaultLegacy(Grid);
|
|
19
19
|
|
|
20
|
-
/* eslint-disable
|
|
20
|
+
/* eslint-disable complexity */
|
|
21
21
|
var ItemRenderer = function ItemRenderer(props) {
|
|
22
22
|
var propsWithDefault = exportedRelated_ItemRenderer_usePropsWithDefaults.usePropsWithDefaults(props);
|
|
23
23
|
var item = propsWithDefault.item,
|
|
@@ -29,6 +29,7 @@ var ItemRenderer = function ItemRenderer(props) {
|
|
|
29
29
|
indent = _propsWithDefault$ite2.indent,
|
|
30
30
|
ariaLabel = _propsWithDefault$ite2.ariaLabel,
|
|
31
31
|
ariaRole = _propsWithDefault$ite2.ariaRole,
|
|
32
|
+
ariaLive = _propsWithDefault$ite2.ariaLive,
|
|
32
33
|
ariaExpanded = _propsWithDefault$ite2.ariaExpanded,
|
|
33
34
|
CollapsedComponent = _propsWithDefault$ite.CollapsedComponent,
|
|
34
35
|
subitems = propsWithDefault.subitems,
|
|
@@ -104,7 +105,8 @@ var ItemRenderer = function ItemRenderer(props) {
|
|
|
104
105
|
"aria-expanded": ariaExpanded,
|
|
105
106
|
role: ariaRole,
|
|
106
107
|
"aria-label": ariaLabel,
|
|
107
|
-
"aria-hidden": !focuseable
|
|
108
|
+
"aria-hidden": !focuseable,
|
|
109
|
+
"aria-live": ariaLive
|
|
108
110
|
}, !expandedForAnimation ? /*#__PURE__*/React__default['default'].createElement(Grid__default['default'], {
|
|
109
111
|
"data-testid": "leftnav-leftcomponent",
|
|
110
112
|
justifyContent: "center"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/exported-related/ItemRenderer/index.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nimport React, { useContext, useMemo, useCallback } from 'react';\nimport Grid from '@elliemae/ds-grid';\nimport { StyledItemWrapper, StyledItem } from './styled';\n\nimport { ItemRendererT } from '../../index.d';\nimport { LeftNavContext } from '../../LeftNavigationContext';\nimport { usePropsWithDefaults } from './usePropsWithDefaults';\nimport { useKeyboardNavigation } from '../../hooks';\n\nexport const ItemRenderer = (props: ItemRendererT): JSX.Element => {\n const propsWithDefault = usePropsWithDefaults(props);\n const {\n item,\n item: {\n dsId,\n itemOpts: {
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/exported-related/ItemRenderer/index.tsx"],"sourcesContent":["/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport React, { useContext, useMemo, useCallback } from 'react';\nimport Grid from '@elliemae/ds-grid';\nimport { StyledItemWrapper, StyledItem } from './styled';\n\nimport { ItemRendererT } from '../../index.d';\nimport { LeftNavContext } from '../../LeftNavigationContext';\nimport { usePropsWithDefaults } from './usePropsWithDefaults';\nimport { useKeyboardNavigation } from '../../hooks';\n\nexport const ItemRenderer = (props: ItemRendererT): JSX.Element => {\n const propsWithDefault = usePropsWithDefaults(props);\n const {\n item,\n item: {\n dsId,\n itemOpts: { selectable, focuseable, indent, ariaLabel, ariaRole, ariaLive, ariaExpanded },\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 focusedByKey,\n selectedItem,\n setSelectedItem,\n focusedItem,\n setFocusedItem,\n visibleItemsRefs,\n } = ctx;\n\n const opened = dsId === openedItem;\n\n const handleOnClick = useCallback(\n (e) => {\n if (onClick) onClick(); // used by uncontrolled drilldowns\n onItemClick(item, e);\n if (selectable) setSelectedItem(item.dsId);\n },\n [onItemClick, item, setSelectedItem, selectable, onClick],\n );\n\n const handleFocus = useCallback(() => {\n if (focuseable) setFocusedItem(dsId);\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 const isFocused = useMemo(() => focusedItem === dsId, [focusedItem, dsId]);\n\n if (!expandedForAnimation && !CollapsedComponent) {\n return null;\n }\n\n return (\n <>\n <StyledItemWrapper shadowStyle={shadowStyle} data-testid=\"leftnav-item-wrapper\">\n <StyledItem\n ref={visibleItemsRefs.current[dsId]}\n pt={paddingTop}\n pl={indent === undefined ? 'xxxs' : `${indent}px`}\n minHeight={minHeight}\n shadowStyle={shadowStyle}\n alignItems=\"flex-start\"\n cols={cols}\n onClick={!opened ? handleOnClick : () => null}\n onKeyDown={onKeyDown}\n selectable={selectable}\n selected={isSelected}\n opened={opened}\n focused={isFocused}\n focusedByKey={focusedByKey}\n onFocus={handleFocus}\n data-testid=\"leftnav-item-container\"\n tabIndex={focuseable ? 0 : -1}\n aria-expanded={ariaExpanded}\n role={ariaRole}\n aria-label={ariaLabel}\n aria-hidden={!focuseable}\n aria-live={ariaLive}\n >\n {!expandedForAnimation ? (\n <Grid data-testid=\"leftnav-leftcomponent\" justifyContent=\"center\">\n <CollapsedComponent item={item} ctx={ctx} />\n </Grid>\n ) : (\n children\n )}\n </StyledItem>\n {hasBorderBottom && (\n <div\n style={{\n marginLeft: opened ? '16px' : '0px',\n marginRight: borderBottomMr,\n height: '1px',\n width: `calc(100% - ${borderBottomMr} - ${opened ? '16px' : '0px'})`,\n backgroundColor: '#E0E3E8',\n }}\n />\n )}\n </StyledItemWrapper>\n {subitems}\n </>\n );\n};\n"],"names":["ItemRenderer","props","propsWithDefault","usePropsWithDefaults","item","dsId","itemOpts","selectable","focuseable","indent","ariaLabel","ariaRole","ariaLive","ariaExpanded","CollapsedComponent","subitems","minHeight","paddingTop","onClick","shadowStyle","hasBorderBottom","borderBottomMr","children","ctx","useContext","LeftNavContext","leftNavProps","onItemClick","openedItem","expandedForAnimation","focusedByKey","selectedItem","setSelectedItem","focusedItem","setFocusedItem","visibleItemsRefs","opened","handleOnClick","useCallback","e","handleFocus","onKeyDown","useKeyboardNavigation","cols","useMemo","isSelected","isFocused","React","StyledItemWrapper","StyledItem","current","undefined","Grid","marginLeft","marginRight","height","width","backgroundColor"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;IAWaA,YAAY,GAAG,SAAfA,YAAe,CAACC,KAAD,EAAuC;AACjE,MAAMC,gBAAgB,GAAGC,sEAAoB,CAACF,KAAD,CAA7C;AACA,MACEG,IADF,GAeIF,gBAfJ,CACEE,IADF;AAAA,8BAeIF,gBAfJ,CAEEE,IAFF;AAAA,MAGIC,IAHJ,yBAGIA,IAHJ;AAAA,qDAIIC,QAJJ;AAAA,MAIgBC,UAJhB,0BAIgBA,UAJhB;AAAA,MAI4BC,UAJ5B,0BAI4BA,UAJ5B;AAAA,MAIwCC,MAJxC,0BAIwCA,MAJxC;AAAA,MAIgDC,SAJhD,0BAIgDA,SAJhD;AAAA,MAI2DC,QAJ3D,0BAI2DA,QAJ3D;AAAA,MAIqEC,QAJrE,0BAIqEA,QAJrE;AAAA,MAI+EC,YAJ/E,0BAI+EA,YAJ/E;AAAA,MAKIC,kBALJ,yBAKIA,kBALJ;AAAA,MAOEC,QAPF,GAeIb,gBAfJ,CAOEa,QAPF;AAAA,MAQEC,SARF,GAeId,gBAfJ,CAQEc,SARF;AAAA,MASEC,UATF,GAeIf,gBAfJ,CASEe,UATF;AAAA,MAUEC,OAVF,GAeIhB,gBAfJ,CAUEgB,OAVF;AAAA,MAWEC,WAXF,GAeIjB,gBAfJ,CAWEiB,WAXF;AAAA,MAYEC,eAZF,GAeIlB,gBAfJ,CAYEkB,eA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AAY,EAAEhB,YAdhB;AAeE,IAAA,OAAO,EAAEU,WAfX;AAgBE,mBAAY,wBAhBd;AAiBE,IAAA,QAAQ,EAAEhC,UAAU,GAAG,CAAH,GAAO,CAAC,CAjB9B;AAkBE,qBAAeK,YAlBjB;AAmBE,IAAA,IAAI,EAAEF,QAnBR;AAoBE,kBAAYD,SApBd;AAqBE,mBAAa,CAACF,UArBhB;AAsBE,iBAAWI;AAtBb,KAwBG,CAACiB,oBAAD,gBACCkB,wCAACK,wBAAD;AAAM,mBAAY,uBAAlB;AAA0C,IAAA,cAAc,EAAC;AAAzD,kBACEL,wCAAC,kBAAD;AAAoB,IAAA,IAAI,EAAE3C,IAA1B;AAAgC,IAAA,GAAG,EAAEmB;AAArC,IADF,CADD,GAKCD,QA7BJ,CADF,EAiCGF,eAAe,iBACd2B;AACE,IAAA,KAAK,EAAE;AACLM,MAAAA,UAAU,EAAEjB,MAAM,GAAG,MAAH,GAAY,KADzB;AAELkB,MAAAA,WAAW,EAAEjC,cAFR;AAGLkC,MAAAA,MAAM,EAAE,KAHH;AAILC,MAAAA,KAAK,wBAAiBnC,cAAjB,gBAAqCe,MAAM,GAAG,MAAH,GAAY,KAAvD,MAJA;AAKLqB,MAAAA,eAAe,EAAE;AALZ;AADT,IAlCJ,CADF,EA8CG1C,QA9CH,CADF;AAkDD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePropsWithDefaults.js","sources":["../../../../src/exported-related/ItemRenderer/usePropsWithDefaults.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport { itemOptsT, ItemRendererT } from '../../index.d';\n\nconst itemDefaultProps: itemOptsT = {\n label: '',\n labelOverflow: 'truncate',\n selectable: true,\n focuseable: true,\n openable: false,\n closable: false,\n ariaLabel: '',\n ariaRole: 'menuitem',\n ariaExpanded: undefined,\n};\n\n// Make use Item props with defaults\n\nexport const usePropsWithDefaults = (props: ItemRendererT): ItemRendererT => {\n const propsWithDefault = useMemo(() => {\n const itemWithDefaults = {\n CollapsedComponent: () => null,\n ...props.item,\n itemOpts: { ...itemDefaultProps, ...props.item.itemOpts },\n };\n return {\n minHeight: '48px',\n paddingTop: '12px',\n subitems: [],\n shadowStyle: () => 'box-shadow: inherit',\n hasBorderBottom: false,\n borderBottomMr: '0px',\n ...props,\n item: itemWithDefaults,\n };\n }, [props]);\n\n return propsWithDefault;\n};\n"],"names":["itemDefaultProps","label","labelOverflow","selectable","focuseable","openable","closable","ariaLabel","ariaRole","ariaExpanded","undefined","usePropsWithDefaults","props","propsWithDefault","useMemo","itemWithDefaults","CollapsedComponent","item","itemOpts","minHeight","paddingTop","subitems","shadowStyle","hasBorderBottom","borderBottomMr"],"mappings":";;;;;;;;;;;;;;AAGA,IAAMA,gBAA2B,GAAG;AAClCC,EAAAA,KAAK,EAAE,EAD2B;AAElCC,EAAAA,aAAa,EAAE,UAFmB;AAGlCC,EAAAA,UAAU,EAAE,IAHsB;AAIlCC,EAAAA,UAAU,EAAE,IAJsB;AAKlCC,EAAAA,QAAQ,EAAE,KALwB;AAMlCC,EAAAA,QAAQ,EAAE,KANwB;AAOlCC,EAAAA,SAAS,EAAE,EAPuB;AAQlCC,EAAAA,QAAQ,EAAE,UARwB;AASlCC,EAAAA,YAAY,EAAEC;
|
|
1
|
+
{"version":3,"file":"usePropsWithDefaults.js","sources":["../../../../src/exported-related/ItemRenderer/usePropsWithDefaults.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport { itemOptsT, ItemRendererT } from '../../index.d';\n\nconst itemDefaultProps: itemOptsT = {\n label: '',\n labelOverflow: 'truncate',\n selectable: true,\n focuseable: true,\n openable: false,\n closable: false,\n ariaLabel: '',\n ariaRole: 'menuitem',\n ariaLive: 'off',\n ariaExpanded: undefined,\n};\n\n// Make use Item props with defaults\n\nexport const usePropsWithDefaults = (props: ItemRendererT): ItemRendererT => {\n const propsWithDefault = useMemo(() => {\n const itemWithDefaults = {\n CollapsedComponent: () => null,\n ...props.item,\n itemOpts: { ...itemDefaultProps, ...props.item.itemOpts },\n };\n return {\n minHeight: '48px',\n paddingTop: '12px',\n subitems: [],\n shadowStyle: () => 'box-shadow: inherit',\n hasBorderBottom: false,\n borderBottomMr: '0px',\n ...props,\n item: itemWithDefaults,\n };\n }, [props]);\n\n return propsWithDefault;\n};\n"],"names":["itemDefaultProps","label","labelOverflow","selectable","focuseable","openable","closable","ariaLabel","ariaRole","ariaLive","ariaExpanded","undefined","usePropsWithDefaults","props","propsWithDefault","useMemo","itemWithDefaults","CollapsedComponent","item","itemOpts","minHeight","paddingTop","subitems","shadowStyle","hasBorderBottom","borderBottomMr"],"mappings":";;;;;;;;;;;;;;AAGA,IAAMA,gBAA2B,GAAG;AAClCC,EAAAA,KAAK,EAAE,EAD2B;AAElCC,EAAAA,aAAa,EAAE,UAFmB;AAGlCC,EAAAA,UAAU,EAAE,IAHsB;AAIlCC,EAAAA,UAAU,EAAE,IAJsB;AAKlCC,EAAAA,QAAQ,EAAE,KALwB;AAMlCC,EAAAA,QAAQ,EAAE,KANwB;AAOlCC,EAAAA,SAAS,EAAE,EAPuB;AAQlCC,EAAAA,QAAQ,EAAE,UARwB;AASlCC,EAAAA,QAAQ,EAAE,KATwB;AAUlCC,EAAAA,YAAY,EAAEC;AAVoB,CAApC;;IAeaC,oBAAoB,GAAG,SAAvBA,oBAAuB,CAACC,KAAD,EAAyC;AAC3E,MAAMC,gBAAgB,GAAGC,aAAO,CAAC,YAAM;AACrC,QAAMC,gBAAgB;AACpBC,MAAAA,kBAAkB,EAAE;AAAA,eAAM,IAAN;AAAA;AADA,OAEjBJ,KAAK,CAACK,IAFW;AAGpBC,MAAAA,QAAQ,kCAAOnB,gBAAP,GAA4Ba,KAAK,CAACK,IAAN,CAAWC,QAAvC;AAHY,MAAtB;;AAKA;AACEC,MAAAA,SAAS,EAAE,MADb;AAEEC,MAAAA,UAAU,EAAE,MAFd;AAGEC,MAAAA,QAAQ,EAAE,EAHZ;AAIEC,MAAAA,WAAW,EAAE;AAAA,eAAM,qBAAN;AAAA,OAJf;AAKEC,MAAAA,eAAe,EAAE,KALnB;AAMEC,MAAAA,cAAc,EAAE;AANlB,OAOKZ,KAPL;AAQEK,MAAAA,IAAI,EAAEF;AARR;AAUD,GAhB+B,EAgB7B,CAACH,KAAD,CAhB6B,CAAhC;AAkBA,SAAOC,gBAAP;AACD;;;;"}
|
|
@@ -110,7 +110,7 @@ var ItemControlledDrilldown = function ItemControlledDrilldown(props) {
|
|
|
110
110
|
item: _objectSpread(_objectSpread({}, item), {}, {
|
|
111
111
|
itemOpts: _objectSpread(_objectSpread({
|
|
112
112
|
ariaExpanded: isOpened,
|
|
113
|
-
ariaRole: '
|
|
113
|
+
ariaRole: 'menuitem'
|
|
114
114
|
}, item.itemOpts), {}, {
|
|
115
115
|
openable: !isOpened,
|
|
116
116
|
closable: isOpened
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/outOfTheBox/ItemControlledDrilldown/index.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport Grid from '@elliemae/ds-grid';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport ArrowheadRight from '@elliemae/ds-icons/ArrowheadRight';\nimport ArrowheadDown from '@elliemae/ds-icons/ArrowheadDown';\nimport { ItemRenderer, ITEM_TYPES } from '../../exported-related/index';\nimport { StyledLabel, StyledDate } from './styled';\nimport { ItemSeparator } from '../ItemSeparator';\nimport { ItemWithDate } from '../ItemWithDate';\nimport type { ComponentProps } from '../../index.d';\n\nconst outOfTheBoxSubitemsComponents: Record<\n string,\n React.ComponentType<ComponentProps>\n> = {\n [ITEM_TYPES.LEFT_NAV_ITEM_SEPARATOR]: ItemSeparator,\n [ITEM_TYPES.LEFT_NAV_ITEM_WITH_DATE]: ItemWithDate,\n};\n\nconst OutOfTheBoxMapSubitem = (props: ComponentProps): JSX.Element => {\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 // 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: 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 (\n <Component width=\"24px\" height=\"18px\" color={['brand-primary', '800']} />\n );\n }, [isOpened]);\n\n const subitems = useMemo(() => {\n if (!isOpened || !items) return [];\n return items.map((subitem) => (\n <OutOfTheBoxMapSubitem item={subitem} ctx={ctx} key={subitem.dsId} />\n ));\n }, [items, isOpened]);\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaExpanded: isOpened,\n ariaRole: '
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/outOfTheBox/ItemControlledDrilldown/index.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport Grid from '@elliemae/ds-grid';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport ArrowheadRight from '@elliemae/ds-icons/ArrowheadRight';\nimport ArrowheadDown from '@elliemae/ds-icons/ArrowheadDown';\nimport { ItemRenderer, ITEM_TYPES } from '../../exported-related/index';\nimport { StyledLabel, StyledDate } from './styled';\nimport { ItemSeparator } from '../ItemSeparator';\nimport { ItemWithDate } from '../ItemWithDate';\nimport type { ComponentProps } from '../../index.d';\n\nconst outOfTheBoxSubitemsComponents: Record<\n string,\n React.ComponentType<ComponentProps>\n> = {\n [ITEM_TYPES.LEFT_NAV_ITEM_SEPARATOR]: ItemSeparator,\n [ITEM_TYPES.LEFT_NAV_ITEM_WITH_DATE]: ItemWithDate,\n};\n\nconst OutOfTheBoxMapSubitem = (props: ComponentProps): JSX.Element => {\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 // 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: 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 (\n <Component width=\"24px\" height=\"18px\" color={['brand-primary', '800']} />\n );\n }, [isOpened]);\n\n const subitems = useMemo(() => {\n if (!isOpened || !items) return [];\n return items.map((subitem) => (\n <OutOfTheBoxMapSubitem item={subitem} ctx={ctx} key={subitem.dsId} />\n ));\n }, [items, isOpened]);\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 <Grid pl=\"xxs\" mt=\"-2px\">\n {arrowIcon}\n </Grid>\n <StyledLabel\n pb=\"xxxs\"\n data-testid=\"leftnav-list-item-label\"\n labelOverflow={labelOverflow}\n labelBold={labelBold}\n labelColor={labelColor}\n >\n {labelOverflow === 'truncate' ? (\n <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" />\n ) : (\n label\n )}\n </StyledLabel>\n <Grid pr=\"xxs2\" cols={['auto', 'auto']} alignItems=\"center\">\n <StyledDate ml=\"xxs\" data-testid=\"leftnav-list-item-date\">\n {labelRightSection}\n </StyledDate>\n <Grid\n pl={RightComponent ? 'xxs' : '0px'}\n data-testid=\"leftnav-right-component\"\n >\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </Grid>\n </Grid>\n </ItemRenderer>\n );\n};\n"],"names":["outOfTheBoxSubitemsComponents","ITEM_TYPES","LEFT_NAV_ITEM_SEPARATOR","ItemSeparator","LEFT_NAV_ITEM_WITH_DATE","ItemWithDate","OutOfTheBoxMapSubitem","props","item","type","Component","ctx","OutOfTheBoxComponent","currentIndent","itemOpts","indent","newItem","React","ItemControlledDrilldown","label","RightComponent","labelRightSection","itemLabelOverflow","labelOverflow","labelBold","labelColor","isOpened","items","leftNavLabelOverflow","leftNavProps","arrowIcon","useMemo","ArrowheadDown","ArrowheadRight","subitems","map","subitem","dsId","ItemRenderer","ariaExpanded","ariaRole","openable","closable","CollapsedComponent","Grid","StyledLabel","SimpleTruncatedTooltipText","StyledDate"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,IAAMA,6BAGL,2FACEC,oCAAU,CAACC,uBADb,EACuCC,6CADvC,8DAEEF,oCAAU,CAACG,uBAFb,EAEuCC,2CAFvC,yBAHD;;AAQA,IAAMC,qBAAqB,GAAG,SAAxBA,qBAAwB,CAACC,KAAD,EAAwC;AACpE,MACEC,IADF,GAIID,KAJ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UAAU,EAAC;AAdb,kBAgBEjB,wCAAC2B,wBAAD;AAAM,IAAA,EAAE,EAAC,KAAT;AAAe,IAAA,EAAE,EAAC;AAAlB,KACGd,SADH,CAhBF,eAmBEb,wCAAC4B,sDAAD;AACE,IAAA,EAAE,EAAC,MADL;AAEE,mBAAY,yBAFd;AAGE,IAAA,aAAa,EAAEtB,aAHjB;AAIE,IAAA,SAAS,EAAEC,SAJb;AAKE,IAAA,UAAU,EAAEC;AALd,KAOGF,aAAa,KAAK,UAAlB,gBACCN,wCAAC6B,iDAAD;AAA4B,IAAA,KAAK,EAAE3B,KAAnC;AAA0C,IAAA,SAAS,EAAC;AAApD,IADD,GAGCA,KAVJ,CAnBF,eAgCEF,wCAAC2B,wBAAD;AAAM,IAAA,EAAE,EAAC,MAAT;AAAgB,IAAA,IAAI,EAAE,CAAC,MAAD,EAAS,MAAT,CAAtB;AAAwC,IAAA,UAAU,EAAC;AAAnD,kBACE3B,wCAAC8B,qDAAD;AAAY,IAAA,EAAE,EAAC,KAAf;AAAqB,mBAAY;AAAjC,KACG1B,iBADH,CADF,eAIEJ,wCAAC2B,wBAAD;AACE,IAAA,EAAE,EAAExB,cAAc,GAAG,KAAH,GAAW,KAD/B;AAEE,mBAAY;AAFd,KAIGA,cAAc,iBAAIH,wCAAC,cAAD;AAAgB,IAAA,GAAG,EAAEN,GAArB;AAA0B,IAAA,IAAI,EAAEH;AAAhC,IAJrB,CAJF,CAhCF,CADF;AA8CD;;;;"}
|
|
@@ -43,7 +43,8 @@ var ItemSection = function ItemSection(props) {
|
|
|
43
43
|
item: _objectSpread(_objectSpread({}, item), {}, {
|
|
44
44
|
itemOpts: _objectSpread(_objectSpread({}, item.itemOpts), {}, {
|
|
45
45
|
selectable: false,
|
|
46
|
-
focuseable: false
|
|
46
|
+
focuseable: false,
|
|
47
|
+
ariaLive: 'polite'
|
|
47
48
|
}),
|
|
48
49
|
CollapsedComponent: null
|
|
49
50
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/outOfTheBox/ItemSection/index.tsx"],"sourcesContent":["import React from 'react';\nimport Grid from '@elliemae/ds-grid';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport { StyledLabel, StyledRightLabel, StyledVerticalSeparator } from './styled';\n\nexport const ItemSection = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n itemOpts: { label, LeftComponent, RightComponent, labelRightSection },\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 <Grid cols={['min-content', 'auto', 'min-content', 'auto']} pl=\"xxs\" alignItems=\"center\">\n {LeftComponent ? <LeftComponent ctx={ctx} item={item} /> : <div />}\n <StyledLabel>{label}</StyledLabel>\n <StyledVerticalSeparator />\n <StyledRightLabel>{labelRightSection}</StyledRightLabel>\n </Grid>\n <Grid\n ml=\"auto\"\n onFocus={(e) => {\n setFocusedItem(null);\n e.stopPropagation();\n }}\n onKeyDown={(e) => e.stopPropagation()}\n pr=\"xxs2\"\n alignItems=\"center\"\n data-testid=\"leftnav-right-component\"\n >\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </Grid>\n </ItemRenderer>\n );\n};\n"],"names":["ItemSection","props","item","itemOpts","label","LeftComponent","RightComponent","labelRightSection","ctx","setFocusedItem","React","ItemRenderer","selectable","focuseable","CollapsedComponent","Grid","StyledLabel","StyledVerticalSeparator","StyledRightLabel","e","stopPropagation"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAMaA,WAAW,GAAG,SAAdA,WAAc,CAACC,KAAD,EAAwC;AACjE,MACEC,IADF,GAOID,KAPJ,CACEC,IADF;AAAA,6BAOID,KAPJ,CAEEC,IAFF,CAGIC,QAHJ;AAAA,MAGgBC,KAHhB,wBAGgBA,KAHhB;AAAA,MAGuBC,aAHvB,wBAGuBA,aAHvB;AAAA,MAGsCC,cAHtC,wBAGsCA,cAHtC;AAAA,MAGsDC,iBAHtD,wBAGsDA,iBAHtD;AAAA,MAKEC,GALF,GAOIP,KAPJ,CAKEO,GALF;AAAA,MAMSC,cANT,GAOIR,KAPJ,CAMEO,GANF,CAMSC,cANT;AASA,sBACEC,wCAACC,+CAAD;AACE,IAAA,IAAI,kCACCT,IADD;AAEFC,MAAAA,QAAQ,kCAAOD,IAAI,CAACC,QAAZ;AAAsBS,QAAAA,UAAU,EAAE,KAAlC;AAAyCC,QAAAA,UAAU,EAAE;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/outOfTheBox/ItemSection/index.tsx"],"sourcesContent":["import React from 'react';\nimport Grid from '@elliemae/ds-grid';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport { StyledLabel, StyledRightLabel, StyledVerticalSeparator } from './styled';\n\nexport const ItemSection = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n itemOpts: { label, LeftComponent, RightComponent, labelRightSection },\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, ariaLive: 'polite' },\n CollapsedComponent: null,\n }}\n minHeight=\"32px\"\n paddingTop=\"8px\"\n >\n <Grid cols={['min-content', 'auto', 'min-content', 'auto']} pl=\"xxs\" alignItems=\"center\">\n {LeftComponent ? <LeftComponent ctx={ctx} item={item} /> : <div />}\n <StyledLabel>{label}</StyledLabel>\n <StyledVerticalSeparator />\n <StyledRightLabel>{labelRightSection}</StyledRightLabel>\n </Grid>\n <Grid\n ml=\"auto\"\n onFocus={(e) => {\n setFocusedItem(null);\n e.stopPropagation();\n }}\n onKeyDown={(e) => e.stopPropagation()}\n pr=\"xxs2\"\n alignItems=\"center\"\n data-testid=\"leftnav-right-component\"\n >\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </Grid>\n </ItemRenderer>\n );\n};\n"],"names":["ItemSection","props","item","itemOpts","label","LeftComponent","RightComponent","labelRightSection","ctx","setFocusedItem","React","ItemRenderer","selectable","focuseable","ariaLive","CollapsedComponent","Grid","StyledLabel","StyledVerticalSeparator","StyledRightLabel","e","stopPropagation"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAMaA,WAAW,GAAG,SAAdA,WAAc,CAACC,KAAD,EAAwC;AACjE,MACEC,IADF,GAOID,KAPJ,CACEC,IADF;AAAA,6BAOID,KAPJ,CAEEC,IAFF,CAGIC,QAHJ;AAAA,MAGgBC,KAHhB,wBAGgBA,KAHhB;AAAA,MAGuBC,aAHvB,wBAGuBA,aAHvB;AAAA,MAGsCC,cAHtC,wBAGsCA,cAHtC;AAAA,MAGsDC,iBAHtD,wBAGsDA,iBAHtD;AAAA,MAKEC,GALF,GAOIP,KAPJ,CAKEO,GALF;AAAA,MAMSC,cANT,GAOIR,KAPJ,CAMEO,GANF,CAMSC,cANT;AASA,sBACEC,wCAACC,+CAAD;AACE,IAAA,IAAI,kCACCT,IADD;AAEFC,MAAAA,QAAQ,kCAAOD,IAAI,CAACC,QAAZ;AAAsBS,QAAAA,UAAU,EAAE,KAAlC;AAAyCC,QAAAA,UAAU,EAAE,KAArD;AAA4DC,QAAAA,QAAQ,EAAE;AAAtE,QAFN;AAGFC,MAAAA,kBAAkB,EAAE;AAHlB,MADN;AAME,IAAA,SAAS,EAAC,MANZ;AAOE,IAAA,UAAU,EAAC;AAPb,kBASEL,wCAACM,wBAAD;AAAM,IAAA,IAAI,EAAE,CAAC,aAAD,EAAgB,MAAhB,EAAwB,aAAxB,EAAuC,MAAvC,CAAZ;AAA4D,IAAA,EAAE,EAAC,KAA/D;AAAqE,IAAA,UAAU,EAAC;AAAhF,KACGX,aAAa,gBAAGK,wCAAC,aAAD;AAAe,IAAA,GAAG,EAAEF,GAApB;AAAyB,IAAA,IAAI,EAAEN;AAA/B,IAAH,gBAA6CQ,oDAD7D,eAEEA,wCAACO,0CAAD,QAAcb,KAAd,CAFF,eAGEM,wCAACQ,sDAAD,OAHF,eAIER,wCAACS,+CAAD,QAAmBZ,iBAAnB,CAJF,CATF,eAeEG,wCAACM,wBAAD;AACE,IAAA,EAAE,EAAC,MADL;AAEE,IAAA,OAAO,EAAE,iBAACI,CAAD,EAAO;AACdX,MAAAA,cAAc,CAAC,IAAD,CAAd;AACAW,MAAAA,CAAC,CAACC,eAAF;AACD,KALH;AAME,IAAA,SAAS,EAAE,mBAACD,CAAD;AAAA,aAAOA,CAAC,CAACC,eAAF,EAAP;AAAA,KANb;AAOE,IAAA,EAAE,EAAC,MAPL;AAQE,IAAA,UAAU,EAAC,QARb;AASE,mBAAY;AATd,KAWGf,cAAc,iBAAII,wCAAC,cAAD;AAAgB,IAAA,GAAG,EAAEF,GAArB;AAA0B,IAAA,IAAI,EAAEN;AAAhC,IAXrB,CAfF,CADF;AA+BD;;;;"}
|
|
@@ -131,7 +131,7 @@ var ItemUncontrolledDrilldown = function ItemUncontrolledDrilldown(props) {
|
|
|
131
131
|
item: _objectSpread(_objectSpread({}, item), {}, {
|
|
132
132
|
itemOpts: _objectSpread(_objectSpread({
|
|
133
133
|
ariaExpanded: opened,
|
|
134
|
-
ariaRole: '
|
|
134
|
+
ariaRole: 'menuitem'
|
|
135
135
|
}, item.itemOpts), {}, {
|
|
136
136
|
openable: !opened,
|
|
137
137
|
closable: opened
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/outOfTheBox/ItemUncontrolledDrilldown/index.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nimport React, { useMemo, useCallback, useEffect } from 'react';\nimport Grid from '@elliemae/ds-grid';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport ArrowheadRight from '@elliemae/ds-icons/ArrowheadRight';\nimport ArrowheadDown from '@elliemae/ds-icons/ArrowheadDown';\nimport { ItemRenderer, ITEM_TYPES } from '../../exported-related/index';\nimport { StyledLabel, StyledDate } from './styled';\nimport { ItemSeparator } from '../ItemSeparator';\nimport { ItemWithDate } from '../ItemWithDate';\nimport { ItemTextLabel } from '../ItemTextLabel';\nimport type { ComponentProps } from '../../index.d';\n\n// Subitem mapping\nconst outOfTheBoxSubitemsComponents: Record<\n string,\n React.ComponentType<ComponentProps>\n> = {\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 = (props: ComponentProps): JSX.Element => {\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 // 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 ItemUncontrolledDrilldown = (\n props: ComponentProps,\n): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: {\n label,\n RightComponent,\n labelRightSection,\n labelOverflow: itemLabelOverflow,\n labelBold,\n labelColor,\n startOpened,\n items,\n },\n },\n ctx,\n ctx: {\n leftNavProps: { labelOverflow: leftNavLabelOverflow },\n openedDrilldowns,\n setOpenedDrilldowns,\n },\n } = props;\n\n // Start opened functionality\n useEffect(() => {\n if (startOpened) setOpenedDrilldowns([...openedDrilldowns, dsId]);\n }, []);\n\n const opened = openedDrilldowns.includes(dsId);\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const arrowIcon = useMemo(() => {\n const Component = opened ? ArrowheadDown : ArrowheadRight;\n return (\n <Component width=\"24px\" height=\"18px\" color={['brand-primary', '800']} />\n );\n }, [opened]);\n\n // Array of subitems\n const subitems = useMemo(() => {\n if (!opened || !items) return [];\n return items.map((subitem) => (\n <OutOfTheBoxMapSubitem item={subitem} ctx={ctx} key={subitem.dsId} />\n ));\n }, [items, opened]);\n\n const handleOnClick = useCallback(() => {\n if (opened)\n setOpenedDrilldowns(\n openedDrilldowns.filter((openedDrilldown) => openedDrilldown !== dsId),\n );\n else setOpenedDrilldowns([...openedDrilldowns, dsId]);\n }, [opened, setOpenedDrilldowns, openedDrilldowns]);\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaExpanded: opened,\n ariaRole: '
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/outOfTheBox/ItemUncontrolledDrilldown/index.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nimport React, { useMemo, useCallback, useEffect } from 'react';\nimport Grid from '@elliemae/ds-grid';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport ArrowheadRight from '@elliemae/ds-icons/ArrowheadRight';\nimport ArrowheadDown from '@elliemae/ds-icons/ArrowheadDown';\nimport { ItemRenderer, ITEM_TYPES } from '../../exported-related/index';\nimport { StyledLabel, StyledDate } from './styled';\nimport { ItemSeparator } from '../ItemSeparator';\nimport { ItemWithDate } from '../ItemWithDate';\nimport { ItemTextLabel } from '../ItemTextLabel';\nimport type { ComponentProps } from '../../index.d';\n\n// Subitem mapping\nconst outOfTheBoxSubitemsComponents: Record<\n string,\n React.ComponentType<ComponentProps>\n> = {\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 = (props: ComponentProps): JSX.Element => {\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 // 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 ItemUncontrolledDrilldown = (\n props: ComponentProps,\n): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: {\n label,\n RightComponent,\n labelRightSection,\n labelOverflow: itemLabelOverflow,\n labelBold,\n labelColor,\n startOpened,\n items,\n },\n },\n ctx,\n ctx: {\n leftNavProps: { labelOverflow: leftNavLabelOverflow },\n openedDrilldowns,\n setOpenedDrilldowns,\n },\n } = props;\n\n // Start opened functionality\n useEffect(() => {\n if (startOpened) setOpenedDrilldowns([...openedDrilldowns, dsId]);\n }, []);\n\n const opened = openedDrilldowns.includes(dsId);\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const arrowIcon = useMemo(() => {\n const Component = opened ? ArrowheadDown : ArrowheadRight;\n return (\n <Component width=\"24px\" height=\"18px\" color={['brand-primary', '800']} />\n );\n }, [opened]);\n\n // Array of subitems\n const subitems = useMemo(() => {\n if (!opened || !items) return [];\n return items.map((subitem) => (\n <OutOfTheBoxMapSubitem item={subitem} ctx={ctx} key={subitem.dsId} />\n ));\n }, [items, opened]);\n\n const handleOnClick = useCallback(() => {\n if (opened)\n setOpenedDrilldowns(\n openedDrilldowns.filter((openedDrilldown) => openedDrilldown !== dsId),\n );\n else setOpenedDrilldowns([...openedDrilldowns, dsId]);\n }, [opened, setOpenedDrilldowns, openedDrilldowns]);\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaExpanded: opened,\n ariaRole: 'menuitem',\n ...item.itemOpts,\n openable: !opened,\n closable: opened,\n },\n CollapsedComponent: null,\n }}\n subitems={subitems}\n minHeight=\"32px\"\n paddingTop=\"8px\"\n onClick={handleOnClick}\n >\n <Grid pl=\"xxs\" mt=\"-2px\">\n {arrowIcon}\n </Grid>\n <StyledLabel\n pb=\"xxxs\"\n data-testid=\"leftnav-list-item-label\"\n labelOverflow={labelOverflow}\n labelBold={labelBold}\n labelColor={labelColor}\n >\n {labelOverflow === 'truncate' ? (\n <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" />\n ) : (\n label\n )}\n </StyledLabel>\n <Grid pr=\"xxs2\" cols={['auto', 'auto']} alignItems=\"center\">\n <StyledDate ml=\"xxs\" data-testid=\"leftnav-list-item-date\">\n {labelRightSection}\n </StyledDate>\n <Grid pl={RightComponent ? 'xxs' : '0px'}>\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </Grid>\n </Grid>\n </ItemRenderer>\n );\n};\n"],"names":["outOfTheBoxSubitemsComponents","ITEM_TYPES","LEFT_NAV_ITEM_SEPARATOR","ItemSeparator","LEFT_NAV_ITEM_WITH_DATE","ItemWithDate","LEFT_NAV_ITEM_TEXT_LABEL","ItemTextLabel","OutOfTheBoxMapSubitem","props","item","type","Component","ctx","OutOfTheBoxComponent","currentIndent","itemOpts","indent","newItem","React","ItemUncontrolledDrilldown","dsId","label","RightComponent","labelRightSection","itemLabelOverflow","labelOverflow","labelBold","labelColor","startOpened","items","leftNavLabelOverflow","leftNavProps","openedDrilldowns","setOpenedDrilldowns","useEffect","opened","includes","arrowIcon","useMemo","ArrowheadDown","ArrowheadRight","subitems","map","subitem","handleOnClick","useCallback","filter","openedDrilldown","ItemRenderer","ariaExpanded","ariaRole","openable","closable","CollapsedComponent","Grid","StyledLabel","SimpleTruncatedTooltipText","StyledDate"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA;AACA,IAAMA,6BAGL,2FAC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AAEC;AALd,KAOGF,aAAa,KAAK,UAAlB,gBACCP,wCAACsC,iDAAD;AAA4B,IAAA,KAAK,EAAEnC,KAAnC;AAA0C,IAAA,SAAS,EAAC;AAApD,IADD,GAGCA,KAVJ,CApBF,eAiCEH,wCAACoC,wBAAD;AAAM,IAAA,EAAE,EAAC,MAAT;AAAgB,IAAA,IAAI,EAAE,CAAC,MAAD,EAAS,MAAT,CAAtB;AAAwC,IAAA,UAAU,EAAC;AAAnD,kBACEpC,wCAACuC,uDAAD;AAAY,IAAA,EAAE,EAAC,KAAf;AAAqB,mBAAY;AAAjC,KACGlC,iBADH,CADF,eAIEL,wCAACoC,wBAAD;AAAM,IAAA,EAAE,EAAEhC,cAAc,GAAG,KAAH,GAAW;AAAnC,KACGA,cAAc,iBAAIJ,wCAAC,cAAD;AAAgB,IAAA,GAAG,EAAEN,GAArB;AAA0B,IAAA,IAAI,EAAEH;AAAhC,IADrB,CAJF,CAjCF,CADF;AA4CD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/parts/LeftNavContent/index.tsx"],"sourcesContent":["import React from 'react';\nimport { LeftNavContext } from '../../LeftNavigationContext';\nimport { LeftNavFooterItem } from '../LeftNavFooterItem';\nimport { LeftNavContentWithScrollbar } from '../LeftNavContentWithScrollbar';\nimport { OutOfTheBoxMapItem } from '../OutOfTheBoxMapItem';\nimport {\n StyledLeftNavExpandAnimationWrapper,\n StyledLeftNavAreasContainer,\n StyledLeftNavHeaderArea,\n StyledLeftNavBodyAreasContainer,\n StyledLeftNavBodyHeaderArea,\n StyledLeftNavBodyItemsArea,\n StyledLeftNavFooterArea,\n} from './styled';\nimport { LeftNavLoading } from '../LeftNavLoading';\n\nconst leftNavScreenReaderInstructions =\n 'Left Navigation. You can navigate through the items using the Up/Down arrows. ' +\n 'To expand or select an item, use the Enter/Return or Space keys. ' +\n 'Expandable items can also be opened/closed with the Right/Left arrows. ' +\n 'The Home and End keys will take you to the first and last item respectively.';\n\nconst LeftNavInnerContent = () => {\n const {\n leftNavProps: { HeaderComponent, BodyHeaderComponent, openedItem, items },\n selectedItem,\n } = React.useContext(LeftNavContext);\n return (\n <>\n <StyledLeftNavHeaderArea\n data-testid=\"leftnav-header-area\"\n selected={
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/parts/LeftNavContent/index.tsx"],"sourcesContent":["import React from 'react';\nimport { LeftNavContext } from '../../LeftNavigationContext';\nimport { LeftNavFooterItem } from '../LeftNavFooterItem';\nimport { LeftNavContentWithScrollbar } from '../LeftNavContentWithScrollbar';\nimport { OutOfTheBoxMapItem } from '../OutOfTheBoxMapItem';\nimport {\n StyledLeftNavExpandAnimationWrapper,\n StyledLeftNavAreasContainer,\n StyledLeftNavHeaderArea,\n StyledLeftNavBodyAreasContainer,\n StyledLeftNavBodyHeaderArea,\n StyledLeftNavBodyItemsArea,\n StyledLeftNavFooterArea,\n} from './styled';\nimport { LeftNavLoading } from '../LeftNavLoading';\n\nconst leftNavScreenReaderInstructions =\n 'Left Navigation. You can navigate through the items using the Up/Down arrows. ' +\n 'To expand or select an item, use the Enter/Return or Space keys. ' +\n 'Expandable items can also be opened/closed with the Right/Left arrows. ' +\n 'The Home and End keys will take you to the first and last item respectively.';\n\nconst LeftNavInnerContent = () => {\n const {\n leftNavProps: { HeaderComponent, BodyHeaderComponent, openedItem, items },\n selectedItem,\n } = React.useContext(LeftNavContext);\n return (\n <>\n <StyledLeftNavHeaderArea\n data-testid=\"leftnav-header-area\"\n selected={HeaderComponent && [selectedItem, openedItem].includes(HeaderComponent.dsId)}\n >\n {HeaderComponent ? <OutOfTheBoxMapItem item={HeaderComponent} /> : null}\n </StyledLeftNavHeaderArea>\n <StyledLeftNavBodyAreasContainer>\n <StyledLeftNavBodyHeaderArea\n data-testid=\"leftnav-body-header-area\"\n selected={BodyHeaderComponent && [selectedItem, openedItem].includes(BodyHeaderComponent.dsId)}\n >\n {BodyHeaderComponent ? <OutOfTheBoxMapItem item={BodyHeaderComponent} /> : null}\n </StyledLeftNavBodyHeaderArea>\n <StyledLeftNavBodyItemsArea selected={openedItem !== null} data-testid=\"leftnav-body-items-area\" tabIndex={-1}>\n <LeftNavContentWithScrollbar>\n {items.map((item) => (\n <OutOfTheBoxMapItem item={item} key={item.dsId} />\n ))}\n </LeftNavContentWithScrollbar>\n </StyledLeftNavBodyItemsArea>\n </StyledLeftNavBodyAreasContainer>\n </>\n );\n};\n\nconst LeftNavContent: React.ComponentType = () => {\n const {\n expandedForAnimation,\n leftNavProps: { expanded, expandedWidth, footerLabel, onFooterExpand, onFooterClose, loading },\n } = React.useContext(LeftNavContext);\n\n return (\n <StyledLeftNavExpandAnimationWrapper\n expandedWidth={expandedWidth}\n expanded={expanded}\n data-testid=\"leftnav-component\"\n aria-label={leftNavScreenReaderInstructions}\n >\n <StyledLeftNavAreasContainer expandedWidth={expandedWidth} expanded={expandedForAnimation}>\n {loading && <LeftNavLoading expanded={expandedForAnimation} />}\n {!loading && <LeftNavInnerContent />}\n <StyledLeftNavFooterArea>\n <LeftNavFooterItem footerLabel={footerLabel} onFooterExpand={onFooterExpand} onFooterClose={onFooterClose} />\n </StyledLeftNavFooterArea>\n </StyledLeftNavAreasContainer>\n </StyledLeftNavExpandAnimationWrapper>\n );\n};\n\nexport default LeftNavContent;\n"],"names":["leftNavScreenReaderInstructions","LeftNavInnerContent","React","useContext","LeftNavContext","leftNavProps","HeaderComponent","BodyHeaderComponent","openedItem","items","selectedItem","StyledLeftNavHeaderArea","includes","dsId","OutOfTheBoxMapItem","StyledLeftNavBodyAreasContainer","StyledLeftNavBodyHeaderArea","StyledLeftNavBodyItemsArea","LeftNavContentWithScrollbar","map","item","LeftNavContent","expandedForAnimation","expanded","expandedWidth","footerLabel","onFooterExpand","onFooterClose","loading","StyledLeftNavExpandAnimationWrapper","StyledLeftNavAreasContainer","LeftNavLoading","StyledLeftNavFooterArea","LeftNavFooterItem"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;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EA,IAAI,CAACP;AAA1C,MADS;AAAA,GAAV,CADH,CADF,CAPF,CAPF,CADF;AAyBD,CA9BD;;IAgCMQ,cAAmC,GAAG,SAAtCA,cAAsC,GAAM;AAChD,2BAGInB,yBAAK,CAACC,UAAN,CAAiBC,oCAAjB,CAHJ;AAAA,MACEkB,oBADF,sBACEA,oBADF;AAAA,iDAEEjB,YAFF;AAAA,MAEkBkB,QAFlB,yBAEkBA,QAFlB;AAAA,MAE4BC,aAF5B,yBAE4BA,aAF5B;AAAA,MAE2CC,WAF3C,yBAE2CA,WAF3C;AAAA,MAEwDC,cAFxD,yBAEwDA,cAFxD;AAAA,MAEwEC,aAFxE,yBAEwEA,aAFxE;AAAA,MAEuFC,OAFvF,yBAEuFA,OAFvF;;AAKA,sBACE1B,wCAAC2B,+DAAD;AACE,IAAA,aAAa,EAAEL,aADjB;AAEE,IAAA,QAAQ,EAAED,QAFZ;AAGE,mBAAY,mBAHd;AAIE,kBAAYvB;AAJd,kBAMEE,wCAAC4B,uDAAD;AAA6B,IAAA,aAAa,EAAEN,aAA5C;AAA2D,IAAA,QAAQ,EAAEF;AAArE,KACGM,OAAO,iBAAI1B,wCAAC6B,yCAAD;AAAgB,IAAA,QAAQ,EAAET;AAA1B,IADd,EAEG,CAACM,OAAD,iBAAY1B,wCAAC,mBAAD,OAFf,eAGEA,wCAAC8B,mDAAD,qBACE9B,wCAAC+B,+CAAD;AAAmB,IAAA,WAAW,EAAER,WAAhC;AAA6C,IAAA,cAAc,EAAEC,cAA7D;AAA6E,IAAA,aAAa,EAAEC;AAA5F,IADF,CAHF,CANF,CADF;AAgBD;;;;"}
|
|
@@ -22,15 +22,15 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
22
22
|
var StyledHandle = /*#__PURE__*/styled__default['default'].div.withConfig({
|
|
23
23
|
componentId: "sc-yn7jj3-0"
|
|
24
24
|
})(["width:6px;border:1px solid rgba(0,0,0,0);background-color:rgba(105,116,137,0.5) !important;border-radius:7px;:hover{background-color:rgba(105,116,137,0.7) !important;}:active{background-color:rgba(105,116,137,0.7) !important;}"]);
|
|
25
|
+
var options = {
|
|
26
|
+
className: 'os-theme-dark',
|
|
27
|
+
scrollbars: {
|
|
28
|
+
autoHide: 'leave',
|
|
29
|
+
autoHideDelay: 0
|
|
30
|
+
}
|
|
31
|
+
};
|
|
25
32
|
var LeftNavContentWithScrollbar = function LeftNavContentWithScrollbar(props) {
|
|
26
33
|
var children = props.children;
|
|
27
|
-
var options = {
|
|
28
|
-
className: 'os-theme-dark',
|
|
29
|
-
scrollbars: {
|
|
30
|
-
autoHide: 'leave',
|
|
31
|
-
autoHideDelay: 0
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
34
|
var inheritBoxShadow = {
|
|
35
35
|
boxShadow: 'inherit'
|
|
36
36
|
};
|
|
@@ -62,7 +62,8 @@ var LeftNavContentWithScrollbar = function LeftNavContentWithScrollbar(props) {
|
|
|
62
62
|
style: inheritBoxShadow
|
|
63
63
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
64
64
|
className: "os-content",
|
|
65
|
-
style: inheritBoxShadow
|
|
65
|
+
style: inheritBoxShadow,
|
|
66
|
+
"aria-hidden": true
|
|
66
67
|
}, children))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
67
68
|
className: "os-scrollbar os-scrollbar-horizontal "
|
|
68
69
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/parts/LeftNavContentWithScrollbar/index.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\nimport React, { useEffect, useRef, useState } from 'react';\nimport OverlayScrollbars, { Options } from 'overlayscrollbars';\nimport styled from 'styled-components';\n\nexport interface OverlayScrollbarsComponentProps
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/parts/LeftNavContentWithScrollbar/index.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\nimport React, { useEffect, useRef, useState } from 'react';\nimport OverlayScrollbars, { Options } from 'overlayscrollbars';\nimport styled from 'styled-components';\n\nexport interface OverlayScrollbarsComponentProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n}\n\nconst StyledHandle = styled.div`\n width: 6px;\n border: 1px solid rgba(0, 0, 0, 0);\n background-color: rgba(105, 116, 137, 0.5) !important;\n border-radius: 7px;\n\n :hover {\n background-color: rgba(105, 116, 137, 0.7) !important;\n }\n\n :active {\n background-color: rgba(105, 116, 137, 0.7) !important;\n }\n`;\n\nconst options: Options = {\n className: 'os-theme-dark',\n scrollbars: {\n autoHide: 'leave',\n autoHideDelay: 0,\n },\n};\n\nexport const LeftNavContentWithScrollbar: React.ComponentType<OverlayScrollbarsComponentProps> = (props) => {\n const { children } = props;\n\n const inheritBoxShadow = { boxShadow: 'inherit' };\n const [osInstance, setOsInstance] = useState<OverlayScrollbars>();\n const osTargetRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const nextOsInstance: OverlayScrollbars = OverlayScrollbars(osTargetRef.current, options);\n setOsInstance(nextOsInstance);\n }, [osInstance]);\n\n return (\n <div className=\"os-host\" style={{ height: '100%', ...inheritBoxShadow }} tabIndex={-1} ref={osTargetRef}>\n <div className=\"os-resize-observer-host\" />\n <div className=\"os-padding\" style={inheritBoxShadow}>\n <div className=\"os-viewport\" style={inheritBoxShadow}>\n <div className=\"os-content\" style={inheritBoxShadow} aria-hidden>\n {children}\n </div>\n </div>\n </div>\n <div className=\"os-scrollbar os-scrollbar-horizontal \">\n <div className=\"os-scrollbar-track\">\n <div className=\"os-scrollbar-handle\" />\n </div>\n </div>\n <div className=\"os-scrollbar os-scrollbar-vertical\">\n <div className=\"os-scrollbar-track\">\n <StyledHandle className=\"os-scrollbar-handle\"></StyledHandle>\n </div>\n </div>\n <div className=\"os-scrollbar-corner\" />\n </div>\n );\n};\n"],"names":["StyledHandle","styled","div","options","className","scrollbars","autoHide","autoHideDelay","LeftNavContentWithScrollbar","props","children","inheritBoxShadow","boxShadow","useState","osInstance","setOsInstance","osTargetRef","useRef","useEffect","nextOsInstance","OverlayScrollbars","current","React","height"],"mappings":";;;;;;;;;;;;;;;;;;;;;AASA,IAAMA,YAAY,gBAAGC,0BAAM,CAACC,GAAV;AAAA;AAAA,0OAAlB;AAeA,IAAMC,OAAgB,GAAG;AACvBC,EAAAA,SAAS,EAAE,eADY;AAEvBC,EAAAA,UAAU,EAAE;AACVC,IAAAA,QAAQ,EAAE,OADA;AAEVC,IAAAA,aAAa,EAAE;AAFL;AAFW,CAAzB;IAQaC,2BAAiF,GAAG,SAApFA,2BAAoF,CAACC,KAAD,EAAW;AAC1G,MAAQC,QAAR,GAAqBD,KAArB,CAAQC,QAAR;AAEA,MAAMC,gBAAgB,GAAG;AAAEC,IAAAA,SAAS,EAAE;AAAb,GAAzB;;AACA,kBAAoCC,cAAQ,EAA5C;AAAA;AAAA,MAAOC,UAAP;AAAA,MAAmBC,aAAnB;;AACA,MAAMC,WAAW,GAAGC,YAAM,CAAiB,IAAjB,CAA1B;AAEAC,EAAAA,eAAS,CAAC,YAAM;AACd,QAAMC,cAAiC,GAAGC,qCAAiB,CAACJ,WAAW,CAACK,OAAb,EAAsBlB,OAAtB,CAA3D;AACAY,IAAAA,aAAa,CAACI,cAAD,CAAb;AACD,GAHQ,EAGN,CAACL,UAAD,CAHM,CAAT;AAKA,sBACEQ;AAAK,IAAA,SAAS,EAAC,SAAf;AAAyB,IAAA,KAAK;AAAIC,MAAAA,MAAM,EAAE;AAAZ,OAAuBZ,gBAAvB,CAA9B;AAAyE,IAAA,QAAQ,EAAE,CAAC,CAApF;AAAuF,IAAA,GAAG,EAAEK;AAA5F,kBACEM;AAAK,IAAA,SAAS,EAAC;AAAf,IADF,eAEEA;AAAK,IAAA,SAAS,EAAC,YAAf;AAA4B,IAAA,KAAK,EAAEX;AAAnC,kBACEW;AAAK,IAAA,SAAS,EAAC,aAAf;AAA6B,IAAA,KAAK,EAAEX;AAApC,kBACEW;AAAK,IAAA,SAAS,EAAC,YAAf;AAA4B,IAAA,KAAK,EAAEX,gBAAnC;AAAqD;AAArD,KACGD,QADH,CADF,CADF,CAFF,eASEY;AAAK,IAAA,SAAS,EAAC;AAAf,kBACEA;AAAK,IAAA,SAAS,EAAC;AAAf,kBACEA;AAAK,IAAA,SAAS,EAAC;AAAf,IADF,CADF,CATF,eAcEA;AAAK,IAAA,SAAS,EAAC;AAAf,kBACEA;AAAK,IAAA,SAAS,EAAC;AAAf,kBACEA,wCAAC,YAAD;AAAc,IAAA,SAAS,EAAC;AAAxB,IADF,CADF,CAdF,eAmBEA;AAAK,IAAA,SAAS,EAAC;AAAf,IAnBF,CADF;AAuBD;;;;"}
|
|
@@ -93,7 +93,8 @@ var LeftNavFooterItem = function LeftNavFooterItem(props) {
|
|
|
93
93
|
mr: "12px",
|
|
94
94
|
mb: "16px",
|
|
95
95
|
"data-testid": "leftnav-itemlabel",
|
|
96
|
-
labelOverflow: labelOverflow
|
|
96
|
+
labelOverflow: labelOverflow,
|
|
97
|
+
"aria-live": "polite"
|
|
97
98
|
}, labelOverflow === 'truncate' ? /*#__PURE__*/React__default['default'].createElement(dsTruncatedTooltipText.SimpleTruncatedTooltipText, {
|
|
98
99
|
value: footerLabel,
|
|
99
100
|
placement: "bottom-start"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/parts/LeftNavFooterItem/index.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nimport React, { useContext } from 'react';\nimport MenuExpand from '@elliemae/ds-icons/MenuExpand';\nimport { PropTypes } from 'react-desc';\nimport Grid from '@elliemae/ds-grid';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport {\n StyledFooterMenu,\n StyledItem,\n StyledItemWrapper,\n StyledLabel,\n StyledSeparator,\n StyledMenuCollapse,\n} from './styled';\nimport { useKeyboardNavigation } from '../../hooks';\nimport LeftNavigationContext from '../../LeftNavigationContext';\nimport {
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/parts/LeftNavFooterItem/index.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nimport React, { useContext } from 'react';\nimport MenuExpand from '@elliemae/ds-icons/MenuExpand';\nimport { PropTypes } from 'react-desc';\nimport Grid from '@elliemae/ds-grid';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport {\n StyledFooterMenu,\n StyledItem,\n StyledItemWrapper,\n StyledLabel,\n StyledSeparator,\n StyledMenuCollapse,\n} from './styled';\nimport { useKeyboardNavigation } from '../../hooks';\nimport LeftNavigationContext from '../../LeftNavigationContext';\nimport { FOOTER_DS_ID, FOOTER_MENU_CLOSE_DS_ID } from '../../exported-related/constants';\n\ntype LeftNavFooterItemProps = {\n footerLabel: string | JSX.Element;\n onFooterExpand: React.MouseEventHandler & React.KeyboardEventHandler;\n onFooterClose: React.MouseEventHandler & React.KeyboardEventHandler;\n};\n\nexport const LeftNavFooterItem: React.ComponentType<LeftNavFooterItemProps> = (props) => {\n const { footerLabel, onFooterExpand = () => null, onFooterClose = () => null } = props;\n const {\n leftNavProps: { labelOverflow, openedItem },\n expandedForAnimation,\n setSelectedItem,\n focusedItem,\n setFocusedItem,\n focusedByKey,\n visibleItemsRefs,\n } = useContext(LeftNavigationContext);\n\n const id = FOOTER_DS_ID;\n\n const handleOnClick = expandedForAnimation ? onFooterClose : onFooterExpand;\n\n const onKeyDown = useKeyboardNavigation({\n item: {\n dsId: id,\n itemOpts: {\n selectable: !expandedForAnimation,\n openable: false,\n closable: false,\n },\n },\n onClick: handleOnClick,\n });\n\n return (\n <StyledFooterMenu key={id} data-testid=\"leftnav-container\">\n <StyledItemWrapper>\n <StyledItem\n ref={visibleItemsRefs.current[id]}\n tabIndex={expandedForAnimation ? -1 : 0}\n expanded={expandedForAnimation}\n pt=\"xxs2\"\n height={expandedForAnimation ? 'auto' : '48px'}\n alignItems=\"flex-start\"\n pl=\"xxs\"\n cols={expandedForAnimation ? ['auto', '1fr', 'auto'] : ['38px']}\n onClick={expandedForAnimation ? () => null : handleOnClick}\n onKeyDown={onKeyDown}\n focused={focusedItem === id}\n focusedByKey={focusedByKey}\n onFocus={() => setFocusedItem(id)}\n data-testid=\"leftnav-item-container\"\n role=\"menuitem\"\n aria-label={expandedForAnimation ? `Footer, ${footerLabel}` : `Expand left navigation`}\n >\n {!expandedForAnimation ? (\n <MenuExpand size=\"m\" color={['brand-primary', 800]} data-testid=\"leftnav-footer-btn\" />\n ) : (\n <>\n <StyledLabel\n mt=\"5px\"\n mr=\"12px\"\n mb=\"16px\"\n data-testid=\"leftnav-itemlabel\"\n labelOverflow={labelOverflow}\n aria-live=\"polite\"\n >\n {labelOverflow === 'truncate' ? (\n <SimpleTruncatedTooltipText value={footerLabel} placement=\"bottom-start\" />\n ) : (\n footerLabel\n )}\n </StyledLabel>\n <StyledSeparator mt=\"xxxs\" />\n <Grid m=\"0 12px\">\n <StyledMenuCollapse\n size=\"m\"\n color={['brand-primary', 800]}\n onClick={(e) => {\n if (openedItem) setSelectedItem(openedItem);\n e.stopPropagation();\n handleOnClick(e);\n }}\n onKeyDown={(e) => {\n if (['Space', 'Enter'].includes(e.code) && openedItem) setSelectedItem(openedItem);\n }}\n data-testid=\"leftnav-footer-btn\"\n tabIndex={0}\n onFocus={(e) => {\n e.stopPropagation();\n setFocusedItem(FOOTER_MENU_CLOSE_DS_ID);\n }}\n role=\"button\"\n aria-label=\"Collapse left navigation\"\n />\n </Grid>\n </>\n )}\n </StyledItem>\n </StyledItemWrapper>\n </StyledFooterMenu>\n );\n};\n\nLeftNavFooterItem.propTypes = {\n footerLabel: PropTypes.any,\n onFooterExpand: PropTypes.func,\n onFooterClose: PropTypes.func,\n};\n\nexport default LeftNavFooterItem;\n"],"names":["LeftNavFooterItem","props","footerLabel","onFooterExpand","onFooterClose","useContext","LeftNavigationContext","leftNavProps","labelOverflow","openedItem","expandedForAnimation","setSelectedItem","focusedItem","setFocusedItem","focusedByKey","visibleItemsRefs","id","FOOTER_DS_ID","handleOnClick","onKeyDown","useKeyboardNavigation","item","dsId","itemOpts","selectable","openable","closable","onClick","React","StyledFooterMenu","StyledItemWrapper","StyledItem","current","MenuExpand","StyledLabel","SimpleTruncatedTooltipText","StyledSeparator","Grid","StyledMenuCollapse","e","stopPropagation","includes","code","FOOTER_MENU_CLOSE_DS_ID","propTypes","PropTypes","any","func"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;IAwBaA,iBAA8D,GAAG,SAAjEA,iBAAiE,CAACC,KAAD,EAAW;AACvF,MAAQC,WAAR,GAAiFD,KAAjF,CAAQC,WAAR;AAAA,8BAAiFD,KAAjF,CAAqBE,cAArB;AAAA,MAAqBA,cAArB,sCAAsC;AAAA,WAAM,IAAN;AAAA,GAAtC;AAAA,6BAAiFF,KAAjF,CAAkDG,aAAlD;AAAA,MAAkDA,aAAlD,qCAAkE;AAAA,WAAM,IAAN;AAAA,GAAlE;;AACA,oBAQIC,gBAAU,CAACC,oCAAD,CARd;AAAA,0CACEC,YADF;AAAA,MACkBC,aADlB,yBACkBA,aADlB;AAAA,MACiCC,UADjC,yBACiCA,UADjC;AAAA,MAEEC,oBAFF,eAEEA,oBAFF;AAAA,MAGEC,eAHF,eAGEA,eAHF;AAAA,MAIEC,WAJF,eAIEA,WAJF;AAAA,MAKEC,cALF,eAKEA,cALF;AAAA,MAMEC,YANF,eAMEA,YANF;AAAA,MAOEC,gBAPF,eAOEA,gBAPF;;AAUA,MAAMC,EAAE,GAAGC,sCAAX;AAEA,MAAMC,aAAa,GAAGR,oBAAoB,GAAGN,aAAH,GAAmBD,cAA7D;AAEA,MAAMgB,SAAS,GAAGC,iDAAqB,CAAC;AACtCC,IAAAA,IAAI,EAAE;AACJC,MAAAA,IAAI,EAAEN,EADF;AAEJO,MAAAA,QAAQ,EAAE;AACRC,QAAAA,UAAU,EAAE,CAACd,oBADL;AAERe,QAAAA,QAAQ,EAAE,KAFF;AAGRC,QAA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,EAAE0C,mBAAS,CAACE,IAFE;AAG5B3C,EAAAA,aAAa,EAAEyC,mBAAS,CAACE;AAHG,CAA9B;;;;;"}
|
|
@@ -8,7 +8,7 @@ import 'styled-components';
|
|
|
8
8
|
import '@babel/runtime/helpers/esm/defineProperty';
|
|
9
9
|
import '../constants.js';
|
|
10
10
|
|
|
11
|
-
/* eslint-disable
|
|
11
|
+
/* eslint-disable complexity */
|
|
12
12
|
var ItemRenderer = function ItemRenderer(props) {
|
|
13
13
|
var propsWithDefault = usePropsWithDefaults(props);
|
|
14
14
|
var item = propsWithDefault.item,
|
|
@@ -20,6 +20,7 @@ var ItemRenderer = function ItemRenderer(props) {
|
|
|
20
20
|
indent = _propsWithDefault$ite2.indent,
|
|
21
21
|
ariaLabel = _propsWithDefault$ite2.ariaLabel,
|
|
22
22
|
ariaRole = _propsWithDefault$ite2.ariaRole,
|
|
23
|
+
ariaLive = _propsWithDefault$ite2.ariaLive,
|
|
23
24
|
ariaExpanded = _propsWithDefault$ite2.ariaExpanded,
|
|
24
25
|
CollapsedComponent = _propsWithDefault$ite.CollapsedComponent,
|
|
25
26
|
subitems = propsWithDefault.subitems,
|
|
@@ -95,7 +96,8 @@ var ItemRenderer = function ItemRenderer(props) {
|
|
|
95
96
|
"aria-expanded": ariaExpanded,
|
|
96
97
|
role: ariaRole,
|
|
97
98
|
"aria-label": ariaLabel,
|
|
98
|
-
"aria-hidden": !focuseable
|
|
99
|
+
"aria-hidden": !focuseable,
|
|
100
|
+
"aria-live": ariaLive
|
|
99
101
|
}, !expandedForAnimation ? /*#__PURE__*/React.createElement(Grid, {
|
|
100
102
|
"data-testid": "leftnav-leftcomponent",
|
|
101
103
|
justifyContent: "center"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/exported-related/ItemRenderer/index.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nimport React, { useContext, useMemo, useCallback } from 'react';\nimport Grid from '@elliemae/ds-grid';\nimport { StyledItemWrapper, StyledItem } from './styled';\n\nimport { ItemRendererT } from '../../index.d';\nimport { LeftNavContext } from '../../LeftNavigationContext';\nimport { usePropsWithDefaults } from './usePropsWithDefaults';\nimport { useKeyboardNavigation } from '../../hooks';\n\nexport const ItemRenderer = (props: ItemRendererT): JSX.Element => {\n const propsWithDefault = usePropsWithDefaults(props);\n const {\n item,\n item: {\n dsId,\n itemOpts: {
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/exported-related/ItemRenderer/index.tsx"],"sourcesContent":["/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport React, { useContext, useMemo, useCallback } from 'react';\nimport Grid from '@elliemae/ds-grid';\nimport { StyledItemWrapper, StyledItem } from './styled';\n\nimport { ItemRendererT } from '../../index.d';\nimport { LeftNavContext } from '../../LeftNavigationContext';\nimport { usePropsWithDefaults } from './usePropsWithDefaults';\nimport { useKeyboardNavigation } from '../../hooks';\n\nexport const ItemRenderer = (props: ItemRendererT): JSX.Element => {\n const propsWithDefault = usePropsWithDefaults(props);\n const {\n item,\n item: {\n dsId,\n itemOpts: { selectable, focuseable, indent, ariaLabel, ariaRole, ariaLive, ariaExpanded },\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 focusedByKey,\n selectedItem,\n setSelectedItem,\n focusedItem,\n setFocusedItem,\n visibleItemsRefs,\n } = ctx;\n\n const opened = dsId === openedItem;\n\n const handleOnClick = useCallback(\n (e) => {\n if (onClick) onClick(); // used by uncontrolled drilldowns\n onItemClick(item, e);\n if (selectable) setSelectedItem(item.dsId);\n },\n [onItemClick, item, setSelectedItem, selectable, onClick],\n );\n\n const handleFocus = useCallback(() => {\n if (focuseable) setFocusedItem(dsId);\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 const isFocused = useMemo(() => focusedItem === dsId, [focusedItem, dsId]);\n\n if (!expandedForAnimation && !CollapsedComponent) {\n return null;\n }\n\n return (\n <>\n <StyledItemWrapper shadowStyle={shadowStyle} data-testid=\"leftnav-item-wrapper\">\n <StyledItem\n ref={visibleItemsRefs.current[dsId]}\n pt={paddingTop}\n pl={indent === undefined ? 'xxxs' : `${indent}px`}\n minHeight={minHeight}\n shadowStyle={shadowStyle}\n alignItems=\"flex-start\"\n cols={cols}\n onClick={!opened ? handleOnClick : () => null}\n onKeyDown={onKeyDown}\n selectable={selectable}\n selected={isSelected}\n opened={opened}\n focused={isFocused}\n focusedByKey={focusedByKey}\n onFocus={handleFocus}\n data-testid=\"leftnav-item-container\"\n tabIndex={focuseable ? 0 : -1}\n aria-expanded={ariaExpanded}\n role={ariaRole}\n aria-label={ariaLabel}\n aria-hidden={!focuseable}\n aria-live={ariaLive}\n >\n {!expandedForAnimation ? (\n <Grid data-testid=\"leftnav-leftcomponent\" justifyContent=\"center\">\n <CollapsedComponent item={item} ctx={ctx} />\n </Grid>\n ) : (\n children\n )}\n </StyledItem>\n {hasBorderBottom && (\n <div\n style={{\n marginLeft: opened ? '16px' : '0px',\n marginRight: borderBottomMr,\n height: '1px',\n width: `calc(100% - ${borderBottomMr} - ${opened ? '16px' : '0px'})`,\n backgroundColor: '#E0E3E8',\n }}\n />\n )}\n </StyledItemWrapper>\n {subitems}\n </>\n );\n};\n"],"names":["ItemRenderer","props","propsWithDefault","usePropsWithDefaults","item","dsId","itemOpts","selectable","focuseable","indent","ariaLabel","ariaRole","ariaLive","ariaExpanded","CollapsedComponent","subitems","minHeight","paddingTop","onClick","shadowStyle","hasBorderBottom","borderBottomMr","children","ctx","useContext","LeftNavContext","leftNavProps","onItemClick","openedItem","expandedForAnimation","focusedByKey","selectedItem","setSelectedItem","focusedItem","setFocusedItem","visibleItemsRefs","opened","handleOnClick","useCallback","e","handleFocus","onKeyDown","useKeyboardNavigation","cols","useMemo","isSelected","isFocused","current","undefined","marginLeft","marginRight","height","width","backgroundColor"],"mappings":";;;;;;;;;;AAAA;IAWaA,YAAY,GAAG,SAAfA,YAAe,CAACC,KAAD,EAAuC;AACjE,MAAMC,gBAAgB,GAAGC,oBAAoB,CAACF,KAAD,CAA7C;AACA,MACEG,IADF,GAeIF,gBAfJ,CACEE,IADF;AAAA,8BAeIF,gBAfJ,CAEEE,IAFF;AAAA,MAGIC,IAHJ,yBAGIA,IAHJ;AAAA,qDAIIC,QAJJ;AAAA,MAIgBC,UAJhB,0BAIgBA,UAJhB;AAAA,MAI4BC,UAJ5B,0BAI4BA,UAJ5B;AAAA,MAIwCC,MAJxC,0BAIwCA,MAJxC;AAAA,MAIgDC,SAJhD,0BAIgDA,SAJhD;AAAA,MAI2DC,QAJ3D,0BAI2DA,QAJ3D;AAAA,MAIqEC,QAJrE,0BAIqEA,QAJrE;AAAA,MAI+EC,YAJ/E,0BAI+EA,YAJ/E;AAAA,MAKIC,kBALJ,yBAKIA,kBALJ;AAAA,MAOEC,QAPF,GAeIb,gBAfJ,CAOEa,QAPF;AAAA,MAQEC,SARF,GAeId,gBAfJ,CAQEc,SARF;AAAA,MASEC,UATF,GAeIf,gBAfJ,CASEe,UATF;AAAA,MAUEC,OAVF,GAeIhB,gBAfJ,CAUEgB,OAVF;AAAA,MAWEC,WAXF,GAeIjB,gBAfJ,CAWEiB,WAXF;AAAA,MAYEC,eAZF,GAeIlB,gBAfJ,CAYEkB,eAZF;AAAA,MAaEC,cAbF,GAeInB,gBAfJ,CAaEmB,cAbF;AAAA,MAcEC,QAdF,GAeIpB,gBAfJ,CAcEoB,QAdF;AAiBA,MAAMC,GAAG,GAAGC,UAAU,CAACC,cAAD,CAAtB;AACA,0BASIF,GATJ,CACEG,YAD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nBR;AAoBE,kBAAYD,SApBd;AAqBE,mBAAa,CAACF,UArBhB;AAsBE,iBAAWI;AAtBb,KAwBG,CAACiB,oBAAD,gBACC,oBAAC,IAAD;AAAM,mBAAY,uBAAlB;AAA0C,IAAA,cAAc,EAAC;AAAzD,kBACE,oBAAC,kBAAD;AAAoB,IAAA,IAAI,EAAEzB,IAA1B;AAAgC,IAAA,GAAG,EAAEmB;AAArC,IADF,CADD,GAKCD,QA7BJ,CADF,EAiCGF,eAAe,iBACd;AACE,IAAA,KAAK,EAAE;AACL6B,MAAAA,UAAU,EAAEb,MAAM,GAAG,MAAH,GAAY,KADzB;AAELc,MAAAA,WAAW,EAAE7B,cAFR;AAGL8B,MAAAA,MAAM,EAAE,KAHH;AAILC,MAAAA,KAAK,wBAAiB/B,cAAjB,gBAAqCe,MAAM,GAAG,MAAH,GAAY,KAAvD,MAJA;AAKLiB,MAAAA,eAAe,EAAE;AALZ;AADT,IAlCJ,CADF,EA8CGtC,QA9CH,CADF;AAkDD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePropsWithDefaults.js","sources":["../../../../src/exported-related/ItemRenderer/usePropsWithDefaults.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport { itemOptsT, ItemRendererT } from '../../index.d';\n\nconst itemDefaultProps: itemOptsT = {\n label: '',\n labelOverflow: 'truncate',\n selectable: true,\n focuseable: true,\n openable: false,\n closable: false,\n ariaLabel: '',\n ariaRole: 'menuitem',\n ariaExpanded: undefined,\n};\n\n// Make use Item props with defaults\n\nexport const usePropsWithDefaults = (props: ItemRendererT): ItemRendererT => {\n const propsWithDefault = useMemo(() => {\n const itemWithDefaults = {\n CollapsedComponent: () => null,\n ...props.item,\n itemOpts: { ...itemDefaultProps, ...props.item.itemOpts },\n };\n return {\n minHeight: '48px',\n paddingTop: '12px',\n subitems: [],\n shadowStyle: () => 'box-shadow: inherit',\n hasBorderBottom: false,\n borderBottomMr: '0px',\n ...props,\n item: itemWithDefaults,\n };\n }, [props]);\n\n return propsWithDefault;\n};\n"],"names":["itemDefaultProps","label","labelOverflow","selectable","focuseable","openable","closable","ariaLabel","ariaRole","ariaExpanded","undefined","usePropsWithDefaults","props","propsWithDefault","useMemo","itemWithDefaults","CollapsedComponent","item","itemOpts","minHeight","paddingTop","subitems","shadowStyle","hasBorderBottom","borderBottomMr"],"mappings":";;;;;;AAGA,IAAMA,gBAA2B,GAAG;AAClCC,EAAAA,KAAK,EAAE,EAD2B;AAElCC,EAAAA,aAAa,EAAE,UAFmB;AAGlCC,EAAAA,UAAU,EAAE,IAHsB;AAIlCC,EAAAA,UAAU,EAAE,IAJsB;AAKlCC,EAAAA,QAAQ,EAAE,KALwB;AAMlCC,EAAAA,QAAQ,EAAE,KANwB;AAOlCC,EAAAA,SAAS,EAAE,EAPuB;AAQlCC,EAAAA,QAAQ,EAAE,UARwB;AASlCC,EAAAA,YAAY,EAAEC;
|
|
1
|
+
{"version":3,"file":"usePropsWithDefaults.js","sources":["../../../../src/exported-related/ItemRenderer/usePropsWithDefaults.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport { itemOptsT, ItemRendererT } from '../../index.d';\n\nconst itemDefaultProps: itemOptsT = {\n label: '',\n labelOverflow: 'truncate',\n selectable: true,\n focuseable: true,\n openable: false,\n closable: false,\n ariaLabel: '',\n ariaRole: 'menuitem',\n ariaLive: 'off',\n ariaExpanded: undefined,\n};\n\n// Make use Item props with defaults\n\nexport const usePropsWithDefaults = (props: ItemRendererT): ItemRendererT => {\n const propsWithDefault = useMemo(() => {\n const itemWithDefaults = {\n CollapsedComponent: () => null,\n ...props.item,\n itemOpts: { ...itemDefaultProps, ...props.item.itemOpts },\n };\n return {\n minHeight: '48px',\n paddingTop: '12px',\n subitems: [],\n shadowStyle: () => 'box-shadow: inherit',\n hasBorderBottom: false,\n borderBottomMr: '0px',\n ...props,\n item: itemWithDefaults,\n };\n }, [props]);\n\n return propsWithDefault;\n};\n"],"names":["itemDefaultProps","label","labelOverflow","selectable","focuseable","openable","closable","ariaLabel","ariaRole","ariaLive","ariaExpanded","undefined","usePropsWithDefaults","props","propsWithDefault","useMemo","itemWithDefaults","CollapsedComponent","item","itemOpts","minHeight","paddingTop","subitems","shadowStyle","hasBorderBottom","borderBottomMr"],"mappings":";;;;;;AAGA,IAAMA,gBAA2B,GAAG;AAClCC,EAAAA,KAAK,EAAE,EAD2B;AAElCC,EAAAA,aAAa,EAAE,UAFmB;AAGlCC,EAAAA,UAAU,EAAE,IAHsB;AAIlCC,EAAAA,UAAU,EAAE,IAJsB;AAKlCC,EAAAA,QAAQ,EAAE,KALwB;AAMlCC,EAAAA,QAAQ,EAAE,KANwB;AAOlCC,EAAAA,SAAS,EAAE,EAPuB;AAQlCC,EAAAA,QAAQ,EAAE,UARwB;AASlCC,EAAAA,QAAQ,EAAE,KATwB;AAUlCC,EAAAA,YAAY,EAAEC;AAVoB,CAApC;;IAeaC,oBAAoB,GAAG,SAAvBA,oBAAuB,CAACC,KAAD,EAAyC;AAC3E,MAAMC,gBAAgB,GAAGC,OAAO,CAAC,YAAM;AACrC,QAAMC,gBAAgB;AACpBC,MAAAA,kBAAkB,EAAE;AAAA,eAAM,IAAN;AAAA;AADA,OAEjBJ,KAAK,CAACK,IAFW;AAGpBC,MAAAA,QAAQ,kCAAOnB,gBAAP,GAA4Ba,KAAK,CAACK,IAAN,CAAWC,QAAvC;AAHY,MAAtB;;AAKA;AACEC,MAAAA,SAAS,EAAE,MADb;AAEEC,MAAAA,UAAU,EAAE,MAFd;AAGEC,MAAAA,QAAQ,EAAE,EAHZ;AAIEC,MAAAA,WAAW,EAAE;AAAA,eAAM,qBAAN;AAAA,OAJf;AAKEC,MAAAA,eAAe,EAAE,KALnB;AAMEC,MAAAA,cAAc,EAAE;AANlB,OAOKZ,KAPL;AAQEK,MAAAA,IAAI,EAAEF;AARR;AAUD,GAhB+B,EAgB7B,CAACH,KAAD,CAhB6B,CAAhC;AAkBA,SAAOC,gBAAP;AACD;;;;"}
|
|
@@ -98,7 +98,7 @@ var ItemControlledDrilldown = function ItemControlledDrilldown(props) {
|
|
|
98
98
|
item: _objectSpread(_objectSpread({}, item), {}, {
|
|
99
99
|
itemOpts: _objectSpread(_objectSpread({
|
|
100
100
|
ariaExpanded: isOpened,
|
|
101
|
-
ariaRole: '
|
|
101
|
+
ariaRole: 'menuitem'
|
|
102
102
|
}, item.itemOpts), {}, {
|
|
103
103
|
openable: !isOpened,
|
|
104
104
|
closable: isOpened
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/outOfTheBox/ItemControlledDrilldown/index.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport Grid from '@elliemae/ds-grid';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport ArrowheadRight from '@elliemae/ds-icons/ArrowheadRight';\nimport ArrowheadDown from '@elliemae/ds-icons/ArrowheadDown';\nimport { ItemRenderer, ITEM_TYPES } from '../../exported-related/index';\nimport { StyledLabel, StyledDate } from './styled';\nimport { ItemSeparator } from '../ItemSeparator';\nimport { ItemWithDate } from '../ItemWithDate';\nimport type { ComponentProps } from '../../index.d';\n\nconst outOfTheBoxSubitemsComponents: Record<\n string,\n React.ComponentType<ComponentProps>\n> = {\n [ITEM_TYPES.LEFT_NAV_ITEM_SEPARATOR]: ItemSeparator,\n [ITEM_TYPES.LEFT_NAV_ITEM_WITH_DATE]: ItemWithDate,\n};\n\nconst OutOfTheBoxMapSubitem = (props: ComponentProps): JSX.Element => {\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 // 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: 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 (\n <Component width=\"24px\" height=\"18px\" color={['brand-primary', '800']} />\n );\n }, [isOpened]);\n\n const subitems = useMemo(() => {\n if (!isOpened || !items) return [];\n return items.map((subitem) => (\n <OutOfTheBoxMapSubitem item={subitem} ctx={ctx} key={subitem.dsId} />\n ));\n }, [items, isOpened]);\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaExpanded: isOpened,\n ariaRole: '
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/outOfTheBox/ItemControlledDrilldown/index.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport Grid from '@elliemae/ds-grid';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport ArrowheadRight from '@elliemae/ds-icons/ArrowheadRight';\nimport ArrowheadDown from '@elliemae/ds-icons/ArrowheadDown';\nimport { ItemRenderer, ITEM_TYPES } from '../../exported-related/index';\nimport { StyledLabel, StyledDate } from './styled';\nimport { ItemSeparator } from '../ItemSeparator';\nimport { ItemWithDate } from '../ItemWithDate';\nimport type { ComponentProps } from '../../index.d';\n\nconst outOfTheBoxSubitemsComponents: Record<\n string,\n React.ComponentType<ComponentProps>\n> = {\n [ITEM_TYPES.LEFT_NAV_ITEM_SEPARATOR]: ItemSeparator,\n [ITEM_TYPES.LEFT_NAV_ITEM_WITH_DATE]: ItemWithDate,\n};\n\nconst OutOfTheBoxMapSubitem = (props: ComponentProps): JSX.Element => {\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 // 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: 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 (\n <Component width=\"24px\" height=\"18px\" color={['brand-primary', '800']} />\n );\n }, [isOpened]);\n\n const subitems = useMemo(() => {\n if (!isOpened || !items) return [];\n return items.map((subitem) => (\n <OutOfTheBoxMapSubitem item={subitem} ctx={ctx} key={subitem.dsId} />\n ));\n }, [items, isOpened]);\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 <Grid pl=\"xxs\" mt=\"-2px\">\n {arrowIcon}\n </Grid>\n <StyledLabel\n pb=\"xxxs\"\n data-testid=\"leftnav-list-item-label\"\n labelOverflow={labelOverflow}\n labelBold={labelBold}\n labelColor={labelColor}\n >\n {labelOverflow === 'truncate' ? (\n <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" />\n ) : (\n label\n )}\n </StyledLabel>\n <Grid pr=\"xxs2\" cols={['auto', 'auto']} alignItems=\"center\">\n <StyledDate ml=\"xxs\" data-testid=\"leftnav-list-item-date\">\n {labelRightSection}\n </StyledDate>\n <Grid\n pl={RightComponent ? 'xxs' : '0px'}\n data-testid=\"leftnav-right-component\"\n >\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </Grid>\n </Grid>\n </ItemRenderer>\n );\n};\n"],"names":["outOfTheBoxSubitemsComponents","ITEM_TYPES","LEFT_NAV_ITEM_SEPARATOR","ItemSeparator","LEFT_NAV_ITEM_WITH_DATE","ItemWithDate","OutOfTheBoxMapSubitem","props","item","type","Component","ctx","OutOfTheBoxComponent","currentIndent","itemOpts","indent","newItem","ItemControlledDrilldown","label","RightComponent","labelRightSection","itemLabelOverflow","labelOverflow","labelBold","labelColor","isOpened","items","leftNavLabelOverflow","leftNavProps","arrowIcon","useMemo","ArrowheadDown","ArrowheadRight","subitems","map","subitem","dsId","ariaExpanded","ariaRole","openable","closable","CollapsedComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,IAAMA,6BAGL,uEACEC,UAAU,CAACC,uBADb,EACuCC,aADvC,0CAEEF,UAAU,CAACG,uBAFb,EAEuCC,YAFvC,yBAHD;;AAQA,IAAMC,qBAAqB,GAAG,SAAxBA,qBAAwB,CAACC,KAAD,EAAwC;AACpE,MACEC,IADF,GAIID,KAJJ,CACEC,IADF;AAAA,oBAIID,KAJJ,CAEEC,IAFF;AAAA,MAEUC,IAFV,eAEUA,IAFV;AAAA,MAEgBC,SAFhB,eAEgBA,SAFhB;AAAA,MAGEC,GAHF,GAIIJ,KAJJ,CAGEI,GAHF;;AAMA,MAAI,OAAOF,IAAP,KAAgB,QAAhB,IAA4B,CAAC,CAACT,6BAA6B,CAACS,IAAD,CAA/D,EAAuE;AAAA;;AACrE,QAAMG,oBAAoB,GA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gBACC,oBAAC,0BAAD;AAA4B,IAAA,KAAK,EAAEJ,KAAnC;AAA0C,IAAA,SAAS,EAAC;AAApD,IADD,GAGCA,KAVJ,CAnBF,eAgCE,oBAAC,IAAD;AAAM,IAAA,EAAE,EAAC,MAAT;AAAgB,IAAA,IAAI,EAAE,CAAC,MAAD,EAAS,MAAT,CAAtB;AAAwC,IAAA,UAAU,EAAC;AAAnD,kBACE,oBAAC,UAAD;AAAY,IAAA,EAAE,EAAC,KAAf;AAAqB,mBAAY;AAAjC,KACGE,iBADH,CADF,eAIE,oBAAC,IAAD;AACE,IAAA,EAAE,EAAED,cAAc,GAAG,KAAH,GAAW,KAD/B;AAEE,mBAAY;AAFd,KAIGA,cAAc,iBAAI,oBAAC,cAAD;AAAgB,IAAA,GAAG,EAAER,GAArB;AAA0B,IAAA,IAAI,EAAEH;AAAhC,IAJrB,CAJF,CAhCF,CADF;AA8CD;;;;"}
|
|
@@ -33,7 +33,8 @@ var ItemSection = function ItemSection(props) {
|
|
|
33
33
|
item: _objectSpread(_objectSpread({}, item), {}, {
|
|
34
34
|
itemOpts: _objectSpread(_objectSpread({}, item.itemOpts), {}, {
|
|
35
35
|
selectable: false,
|
|
36
|
-
focuseable: false
|
|
36
|
+
focuseable: false,
|
|
37
|
+
ariaLive: 'polite'
|
|
37
38
|
}),
|
|
38
39
|
CollapsedComponent: null
|
|
39
40
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/outOfTheBox/ItemSection/index.tsx"],"sourcesContent":["import React from 'react';\nimport Grid from '@elliemae/ds-grid';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport { StyledLabel, StyledRightLabel, StyledVerticalSeparator } from './styled';\n\nexport const ItemSection = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n itemOpts: { label, LeftComponent, RightComponent, labelRightSection },\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 <Grid cols={['min-content', 'auto', 'min-content', 'auto']} pl=\"xxs\" alignItems=\"center\">\n {LeftComponent ? <LeftComponent ctx={ctx} item={item} /> : <div />}\n <StyledLabel>{label}</StyledLabel>\n <StyledVerticalSeparator />\n <StyledRightLabel>{labelRightSection}</StyledRightLabel>\n </Grid>\n <Grid\n ml=\"auto\"\n onFocus={(e) => {\n setFocusedItem(null);\n e.stopPropagation();\n }}\n onKeyDown={(e) => e.stopPropagation()}\n pr=\"xxs2\"\n alignItems=\"center\"\n data-testid=\"leftnav-right-component\"\n >\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </Grid>\n </ItemRenderer>\n );\n};\n"],"names":["ItemSection","props","item","itemOpts","label","LeftComponent","RightComponent","labelRightSection","ctx","setFocusedItem","selectable","focuseable","CollapsedComponent","e","stopPropagation"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAMaA,WAAW,GAAG,SAAdA,WAAc,CAACC,KAAD,EAAwC;AACjE,MACEC,IADF,GAOID,KAPJ,CACEC,IADF;AAAA,6BAOID,KAPJ,CAEEC,IAFF,CAGIC,QAHJ;AAAA,MAGgBC,KAHhB,wBAGgBA,KAHhB;AAAA,MAGuBC,aAHvB,wBAGuBA,aAHvB;AAAA,MAGsCC,cAHtC,wBAGsCA,cAHtC;AAAA,MAGsDC,iBAHtD,wBAGsDA,iBAHtD;AAAA,MAKEC,GALF,GAOIP,KAPJ,CAKEO,GALF;AAAA,MAMSC,cANT,GAOIR,KAPJ,CAMEO,GANF,CAMSC,cANT;AASA,sBACE,oBAAC,YAAD;AACE,IAAA,IAAI,kCACCP,IADD;AAEFC,MAAAA,QAAQ,kCAAOD,IAAI,CAACC,QAAZ;AAAsBO,QAAAA,UAAU,EAAE,KAAlC;AAAyCC,QAAAA,UAAU,EAAE;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/outOfTheBox/ItemSection/index.tsx"],"sourcesContent":["import React from 'react';\nimport Grid from '@elliemae/ds-grid';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport { StyledLabel, StyledRightLabel, StyledVerticalSeparator } from './styled';\n\nexport const ItemSection = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n itemOpts: { label, LeftComponent, RightComponent, labelRightSection },\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, ariaLive: 'polite' },\n CollapsedComponent: null,\n }}\n minHeight=\"32px\"\n paddingTop=\"8px\"\n >\n <Grid cols={['min-content', 'auto', 'min-content', 'auto']} pl=\"xxs\" alignItems=\"center\">\n {LeftComponent ? <LeftComponent ctx={ctx} item={item} /> : <div />}\n <StyledLabel>{label}</StyledLabel>\n <StyledVerticalSeparator />\n <StyledRightLabel>{labelRightSection}</StyledRightLabel>\n </Grid>\n <Grid\n ml=\"auto\"\n onFocus={(e) => {\n setFocusedItem(null);\n e.stopPropagation();\n }}\n onKeyDown={(e) => e.stopPropagation()}\n pr=\"xxs2\"\n alignItems=\"center\"\n data-testid=\"leftnav-right-component\"\n >\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </Grid>\n </ItemRenderer>\n );\n};\n"],"names":["ItemSection","props","item","itemOpts","label","LeftComponent","RightComponent","labelRightSection","ctx","setFocusedItem","selectable","focuseable","ariaLive","CollapsedComponent","e","stopPropagation"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAMaA,WAAW,GAAG,SAAdA,WAAc,CAACC,KAAD,EAAwC;AACjE,MACEC,IADF,GAOID,KAPJ,CACEC,IADF;AAAA,6BAOID,KAPJ,CAEEC,IAFF,CAGIC,QAHJ;AAAA,MAGgBC,KAHhB,wBAGgBA,KAHhB;AAAA,MAGuBC,aAHvB,wBAGuB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ATd,KAWGT,cAAc,iBAAI,oBAAC,cAAD;AAAgB,IAAA,GAAG,EAAEE,GAArB;AAA0B,IAAA,IAAI,EAAEN;AAAhC,IAXrB,CAfF,CADF;AA+BD;;;;"}
|
|
@@ -118,7 +118,7 @@ var ItemUncontrolledDrilldown = function ItemUncontrolledDrilldown(props) {
|
|
|
118
118
|
item: _objectSpread(_objectSpread({}, item), {}, {
|
|
119
119
|
itemOpts: _objectSpread(_objectSpread({
|
|
120
120
|
ariaExpanded: opened,
|
|
121
|
-
ariaRole: '
|
|
121
|
+
ariaRole: 'menuitem'
|
|
122
122
|
}, item.itemOpts), {}, {
|
|
123
123
|
openable: !opened,
|
|
124
124
|
closable: opened
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/outOfTheBox/ItemUncontrolledDrilldown/index.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nimport React, { useMemo, useCallback, useEffect } from 'react';\nimport Grid from '@elliemae/ds-grid';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport ArrowheadRight from '@elliemae/ds-icons/ArrowheadRight';\nimport ArrowheadDown from '@elliemae/ds-icons/ArrowheadDown';\nimport { ItemRenderer, ITEM_TYPES } from '../../exported-related/index';\nimport { StyledLabel, StyledDate } from './styled';\nimport { ItemSeparator } from '../ItemSeparator';\nimport { ItemWithDate } from '../ItemWithDate';\nimport { ItemTextLabel } from '../ItemTextLabel';\nimport type { ComponentProps } from '../../index.d';\n\n// Subitem mapping\nconst outOfTheBoxSubitemsComponents: Record<\n string,\n React.ComponentType<ComponentProps>\n> = {\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 = (props: ComponentProps): JSX.Element => {\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 // 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 ItemUncontrolledDrilldown = (\n props: ComponentProps,\n): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: {\n label,\n RightComponent,\n labelRightSection,\n labelOverflow: itemLabelOverflow,\n labelBold,\n labelColor,\n startOpened,\n items,\n },\n },\n ctx,\n ctx: {\n leftNavProps: { labelOverflow: leftNavLabelOverflow },\n openedDrilldowns,\n setOpenedDrilldowns,\n },\n } = props;\n\n // Start opened functionality\n useEffect(() => {\n if (startOpened) setOpenedDrilldowns([...openedDrilldowns, dsId]);\n }, []);\n\n const opened = openedDrilldowns.includes(dsId);\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const arrowIcon = useMemo(() => {\n const Component = opened ? ArrowheadDown : ArrowheadRight;\n return (\n <Component width=\"24px\" height=\"18px\" color={['brand-primary', '800']} />\n );\n }, [opened]);\n\n // Array of subitems\n const subitems = useMemo(() => {\n if (!opened || !items) return [];\n return items.map((subitem) => (\n <OutOfTheBoxMapSubitem item={subitem} ctx={ctx} key={subitem.dsId} />\n ));\n }, [items, opened]);\n\n const handleOnClick = useCallback(() => {\n if (opened)\n setOpenedDrilldowns(\n openedDrilldowns.filter((openedDrilldown) => openedDrilldown !== dsId),\n );\n else setOpenedDrilldowns([...openedDrilldowns, dsId]);\n }, [opened, setOpenedDrilldowns, openedDrilldowns]);\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaExpanded: opened,\n ariaRole: '
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/outOfTheBox/ItemUncontrolledDrilldown/index.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nimport React, { useMemo, useCallback, useEffect } from 'react';\nimport Grid from '@elliemae/ds-grid';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport ArrowheadRight from '@elliemae/ds-icons/ArrowheadRight';\nimport ArrowheadDown from '@elliemae/ds-icons/ArrowheadDown';\nimport { ItemRenderer, ITEM_TYPES } from '../../exported-related/index';\nimport { StyledLabel, StyledDate } from './styled';\nimport { ItemSeparator } from '../ItemSeparator';\nimport { ItemWithDate } from '../ItemWithDate';\nimport { ItemTextLabel } from '../ItemTextLabel';\nimport type { ComponentProps } from '../../index.d';\n\n// Subitem mapping\nconst outOfTheBoxSubitemsComponents: Record<\n string,\n React.ComponentType<ComponentProps>\n> = {\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 = (props: ComponentProps): JSX.Element => {\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 // 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 ItemUncontrolledDrilldown = (\n props: ComponentProps,\n): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: {\n label,\n RightComponent,\n labelRightSection,\n labelOverflow: itemLabelOverflow,\n labelBold,\n labelColor,\n startOpened,\n items,\n },\n },\n ctx,\n ctx: {\n leftNavProps: { labelOverflow: leftNavLabelOverflow },\n openedDrilldowns,\n setOpenedDrilldowns,\n },\n } = props;\n\n // Start opened functionality\n useEffect(() => {\n if (startOpened) setOpenedDrilldowns([...openedDrilldowns, dsId]);\n }, []);\n\n const opened = openedDrilldowns.includes(dsId);\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const arrowIcon = useMemo(() => {\n const Component = opened ? ArrowheadDown : ArrowheadRight;\n return (\n <Component width=\"24px\" height=\"18px\" color={['brand-primary', '800']} />\n );\n }, [opened]);\n\n // Array of subitems\n const subitems = useMemo(() => {\n if (!opened || !items) return [];\n return items.map((subitem) => (\n <OutOfTheBoxMapSubitem item={subitem} ctx={ctx} key={subitem.dsId} />\n ));\n }, [items, opened]);\n\n const handleOnClick = useCallback(() => {\n if (opened)\n setOpenedDrilldowns(\n openedDrilldowns.filter((openedDrilldown) => openedDrilldown !== dsId),\n );\n else setOpenedDrilldowns([...openedDrilldowns, dsId]);\n }, [opened, setOpenedDrilldowns, openedDrilldowns]);\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaExpanded: opened,\n ariaRole: 'menuitem',\n ...item.itemOpts,\n openable: !opened,\n closable: opened,\n },\n CollapsedComponent: null,\n }}\n subitems={subitems}\n minHeight=\"32px\"\n paddingTop=\"8px\"\n onClick={handleOnClick}\n >\n <Grid pl=\"xxs\" mt=\"-2px\">\n {arrowIcon}\n </Grid>\n <StyledLabel\n pb=\"xxxs\"\n data-testid=\"leftnav-list-item-label\"\n labelOverflow={labelOverflow}\n labelBold={labelBold}\n labelColor={labelColor}\n >\n {labelOverflow === 'truncate' ? (\n <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" />\n ) : (\n label\n )}\n </StyledLabel>\n <Grid pr=\"xxs2\" cols={['auto', 'auto']} alignItems=\"center\">\n <StyledDate ml=\"xxs\" data-testid=\"leftnav-list-item-date\">\n {labelRightSection}\n </StyledDate>\n <Grid pl={RightComponent ? 'xxs' : '0px'}>\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </Grid>\n </Grid>\n </ItemRenderer>\n );\n};\n"],"names":["outOfTheBoxSubitemsComponents","ITEM_TYPES","LEFT_NAV_ITEM_SEPARATOR","ItemSeparator","LEFT_NAV_ITEM_WITH_DATE","ItemWithDate","LEFT_NAV_ITEM_TEXT_LABEL","ItemTextLabel","OutOfTheBoxMapSubitem","props","item","type","Component","ctx","OutOfTheBoxComponent","currentIndent","itemOpts","indent","newItem","ItemUncontrolledDrilldown","dsId","label","RightComponent","labelRightSection","itemLabelOverflow","labelOverflow","labelBold","labelColor","startOpened","items","leftNavLabelOverflow","leftNavProps","openedDrilldowns","setOpenedDrilldowns","useEffect","opened","includes","arrowIcon","useMemo","ArrowheadDown","ArrowheadRight","subitems","map","subitem","handleOnClick","useCallback","filter","openedDrilldown","ariaExpanded","ariaRole","openable","closable","CollapsedComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA;AACA,IAAMA,6BAGL,uEACEC,UAAU,CAACC,uBADb,EACuCC,aADvC,0CAEEF,UAAU,CAACG,uBAFb,EAEuCC,YAFvC,0CAGEJ,UAAU,CAACK,wBAHb,EAGwCC,aAHxC,yBAHD;;AASA,IAAMC,qBAAqB,GAAG,SAAxBA,qBAAwB,CAACC,KAAD,EAAwC;AACpE,MACEC,IADF,GAIID,KAJJ,CACEC,IADF;AAAA,oBAIID,KAJJ,CAEEC,IAFF;AAAA,MAEUC,IAFV,eAEUA,IAFV;AAAA,MAEgBC,SAFhB,eAEgBA,SAFhB;AAAA,MAGEC,GAHF,GAIIJ,KAJJ,CAGEI,GAHF;;AAMA,MAAI,OAAOF,IAAP,KAAgB,QAAhB,IAA4B,CAAC,CAACX,6BAA6B,CAACW,IAAD,CAA/D,EAAuE;AAAA;;AACrE,QAAMG,oBAAoB,GAAGd,6BAA6B,CAACW,IAAD,CAA1D;AACA,QAAMI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
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/parts/LeftNavContent/index.tsx"],"sourcesContent":["import React from 'react';\nimport { LeftNavContext } from '../../LeftNavigationContext';\nimport { LeftNavFooterItem } from '../LeftNavFooterItem';\nimport { LeftNavContentWithScrollbar } from '../LeftNavContentWithScrollbar';\nimport { OutOfTheBoxMapItem } from '../OutOfTheBoxMapItem';\nimport {\n StyledLeftNavExpandAnimationWrapper,\n StyledLeftNavAreasContainer,\n StyledLeftNavHeaderArea,\n StyledLeftNavBodyAreasContainer,\n StyledLeftNavBodyHeaderArea,\n StyledLeftNavBodyItemsArea,\n StyledLeftNavFooterArea,\n} from './styled';\nimport { LeftNavLoading } from '../LeftNavLoading';\n\nconst leftNavScreenReaderInstructions =\n 'Left Navigation. You can navigate through the items using the Up/Down arrows. ' +\n 'To expand or select an item, use the Enter/Return or Space keys. ' +\n 'Expandable items can also be opened/closed with the Right/Left arrows. ' +\n 'The Home and End keys will take you to the first and last item respectively.';\n\nconst LeftNavInnerContent = () => {\n const {\n leftNavProps: { HeaderComponent, BodyHeaderComponent, openedItem, items },\n selectedItem,\n } = React.useContext(LeftNavContext);\n return (\n <>\n <StyledLeftNavHeaderArea\n data-testid=\"leftnav-header-area\"\n selected={
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/parts/LeftNavContent/index.tsx"],"sourcesContent":["import React from 'react';\nimport { LeftNavContext } from '../../LeftNavigationContext';\nimport { LeftNavFooterItem } from '../LeftNavFooterItem';\nimport { LeftNavContentWithScrollbar } from '../LeftNavContentWithScrollbar';\nimport { OutOfTheBoxMapItem } from '../OutOfTheBoxMapItem';\nimport {\n StyledLeftNavExpandAnimationWrapper,\n StyledLeftNavAreasContainer,\n StyledLeftNavHeaderArea,\n StyledLeftNavBodyAreasContainer,\n StyledLeftNavBodyHeaderArea,\n StyledLeftNavBodyItemsArea,\n StyledLeftNavFooterArea,\n} from './styled';\nimport { LeftNavLoading } from '../LeftNavLoading';\n\nconst leftNavScreenReaderInstructions =\n 'Left Navigation. You can navigate through the items using the Up/Down arrows. ' +\n 'To expand or select an item, use the Enter/Return or Space keys. ' +\n 'Expandable items can also be opened/closed with the Right/Left arrows. ' +\n 'The Home and End keys will take you to the first and last item respectively.';\n\nconst LeftNavInnerContent = () => {\n const {\n leftNavProps: { HeaderComponent, BodyHeaderComponent, openedItem, items },\n selectedItem,\n } = React.useContext(LeftNavContext);\n return (\n <>\n <StyledLeftNavHeaderArea\n data-testid=\"leftnav-header-area\"\n selected={HeaderComponent && [selectedItem, openedItem].includes(HeaderComponent.dsId)}\n >\n {HeaderComponent ? <OutOfTheBoxMapItem item={HeaderComponent} /> : null}\n </StyledLeftNavHeaderArea>\n <StyledLeftNavBodyAreasContainer>\n <StyledLeftNavBodyHeaderArea\n data-testid=\"leftnav-body-header-area\"\n selected={BodyHeaderComponent && [selectedItem, openedItem].includes(BodyHeaderComponent.dsId)}\n >\n {BodyHeaderComponent ? <OutOfTheBoxMapItem item={BodyHeaderComponent} /> : null}\n </StyledLeftNavBodyHeaderArea>\n <StyledLeftNavBodyItemsArea selected={openedItem !== null} data-testid=\"leftnav-body-items-area\" tabIndex={-1}>\n <LeftNavContentWithScrollbar>\n {items.map((item) => (\n <OutOfTheBoxMapItem item={item} key={item.dsId} />\n ))}\n </LeftNavContentWithScrollbar>\n </StyledLeftNavBodyItemsArea>\n </StyledLeftNavBodyAreasContainer>\n </>\n );\n};\n\nconst LeftNavContent: React.ComponentType = () => {\n const {\n expandedForAnimation,\n leftNavProps: { expanded, expandedWidth, footerLabel, onFooterExpand, onFooterClose, loading },\n } = React.useContext(LeftNavContext);\n\n return (\n <StyledLeftNavExpandAnimationWrapper\n expandedWidth={expandedWidth}\n expanded={expanded}\n data-testid=\"leftnav-component\"\n aria-label={leftNavScreenReaderInstructions}\n >\n <StyledLeftNavAreasContainer expandedWidth={expandedWidth} expanded={expandedForAnimation}>\n {loading && <LeftNavLoading expanded={expandedForAnimation} />}\n {!loading && <LeftNavInnerContent />}\n <StyledLeftNavFooterArea>\n <LeftNavFooterItem footerLabel={footerLabel} onFooterExpand={onFooterExpand} onFooterClose={onFooterClose} />\n </StyledLeftNavFooterArea>\n </StyledLeftNavAreasContainer>\n </StyledLeftNavExpandAnimationWrapper>\n );\n};\n\nexport default LeftNavContent;\n"],"names":["leftNavScreenReaderInstructions","LeftNavInnerContent","React","useContext","LeftNavContext","leftNavProps","HeaderComponent","BodyHeaderComponent","openedItem","items","selectedItem","includes","dsId","map","item","LeftNavContent","expandedForAnimation","expanded","expandedWidth","footerLabel","onFooterExpand","onFooterClose","loading"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,IAAMA,+BAA+B,GACnC,mFACA,mEADA,GAEA,yEAFA,GAGA,8EAJF;;AAMA,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAsB,GAAM;AAChC,0BAGIC,KAAK,CAACC,UAAN,CAAiBC,cAAjB,CAHJ;AAAA,gDACEC,YADF;AAAA,MACkBC,eADlB,yBACkBA,eADlB;AAAA,MACmCC,mBADnC,yBACmCA,mBADnC;AAAA,MACwDC,UADxD,yBACwDA,UADxD;AAAA,MACoEC,KADpE,yBACoEA,KADpE;AAAA,MAEEC,YAFF,qBAEEA,YAFF;;AAIA,sBACE,uDACE,oBAAC,uBAAD;AACE,mBAAY,qBADd;AAEE,IAAA,QAAQ,EAAEJ,eAAe,IAAI,CAACI,YAAD,EAAeF,UAAf,EAA2BG,QAA3B,CAAoCL,eAAe,CAACM,IAApD;AAF/B,KAIGN,eAAe,gBAAG,oBAAC,kBAAD;AAAoB,IAAA,IAAI,EAAEA;AAA1B,IAAH,GAAmD,IAJrE,CADF,eAOE,oBAAC,+BAAD,qBACE,oBAAC,2BAAD;AACE,mBAAY,0BADd;AAEE,IAAA,QAAQ,EAAEC,mBAAmB,IAAI,CAACG,YAAD,EAAeF,UAAf,EAA2BG,QAA3B,CAAoCJ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oBAAC,iBAAD;AAAmB,IAAA,WAAW,EAAEH,WAAhC;AAA6C,IAAA,cAAc,EAAEC,cAA7D;AAA6E,IAAA,aAAa,EAAEC;AAA5F,IADF,CAHF,CANF,CADF;AAgBD;;;;"}
|
|
@@ -10,15 +10,15 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
10
10
|
var StyledHandle = /*#__PURE__*/styled.div.withConfig({
|
|
11
11
|
componentId: "sc-yn7jj3-0"
|
|
12
12
|
})(["width:6px;border:1px solid rgba(0,0,0,0);background-color:rgba(105,116,137,0.5) !important;border-radius:7px;:hover{background-color:rgba(105,116,137,0.7) !important;}:active{background-color:rgba(105,116,137,0.7) !important;}"]);
|
|
13
|
+
var options = {
|
|
14
|
+
className: 'os-theme-dark',
|
|
15
|
+
scrollbars: {
|
|
16
|
+
autoHide: 'leave',
|
|
17
|
+
autoHideDelay: 0
|
|
18
|
+
}
|
|
19
|
+
};
|
|
13
20
|
var LeftNavContentWithScrollbar = function LeftNavContentWithScrollbar(props) {
|
|
14
21
|
var children = props.children;
|
|
15
|
-
var options = {
|
|
16
|
-
className: 'os-theme-dark',
|
|
17
|
-
scrollbars: {
|
|
18
|
-
autoHide: 'leave',
|
|
19
|
-
autoHideDelay: 0
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
22
|
var inheritBoxShadow = {
|
|
23
23
|
boxShadow: 'inherit'
|
|
24
24
|
};
|
|
@@ -50,7 +50,8 @@ var LeftNavContentWithScrollbar = function LeftNavContentWithScrollbar(props) {
|
|
|
50
50
|
style: inheritBoxShadow
|
|
51
51
|
}, /*#__PURE__*/React.createElement("div", {
|
|
52
52
|
className: "os-content",
|
|
53
|
-
style: inheritBoxShadow
|
|
53
|
+
style: inheritBoxShadow,
|
|
54
|
+
"aria-hidden": true
|
|
54
55
|
}, children))), /*#__PURE__*/React.createElement("div", {
|
|
55
56
|
className: "os-scrollbar os-scrollbar-horizontal "
|
|
56
57
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/parts/LeftNavContentWithScrollbar/index.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\nimport React, { useEffect, useRef, useState } from 'react';\nimport OverlayScrollbars, { Options } from 'overlayscrollbars';\nimport styled from 'styled-components';\n\nexport interface OverlayScrollbarsComponentProps
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/parts/LeftNavContentWithScrollbar/index.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\nimport React, { useEffect, useRef, useState } from 'react';\nimport OverlayScrollbars, { Options } from 'overlayscrollbars';\nimport styled from 'styled-components';\n\nexport interface OverlayScrollbarsComponentProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n}\n\nconst StyledHandle = styled.div`\n width: 6px;\n border: 1px solid rgba(0, 0, 0, 0);\n background-color: rgba(105, 116, 137, 0.5) !important;\n border-radius: 7px;\n\n :hover {\n background-color: rgba(105, 116, 137, 0.7) !important;\n }\n\n :active {\n background-color: rgba(105, 116, 137, 0.7) !important;\n }\n`;\n\nconst options: Options = {\n className: 'os-theme-dark',\n scrollbars: {\n autoHide: 'leave',\n autoHideDelay: 0,\n },\n};\n\nexport const LeftNavContentWithScrollbar: React.ComponentType<OverlayScrollbarsComponentProps> = (props) => {\n const { children } = props;\n\n const inheritBoxShadow = { boxShadow: 'inherit' };\n const [osInstance, setOsInstance] = useState<OverlayScrollbars>();\n const osTargetRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const nextOsInstance: OverlayScrollbars = OverlayScrollbars(osTargetRef.current, options);\n setOsInstance(nextOsInstance);\n }, [osInstance]);\n\n return (\n <div className=\"os-host\" style={{ height: '100%', ...inheritBoxShadow }} tabIndex={-1} ref={osTargetRef}>\n <div className=\"os-resize-observer-host\" />\n <div className=\"os-padding\" style={inheritBoxShadow}>\n <div className=\"os-viewport\" style={inheritBoxShadow}>\n <div className=\"os-content\" style={inheritBoxShadow} aria-hidden>\n {children}\n </div>\n </div>\n </div>\n <div className=\"os-scrollbar os-scrollbar-horizontal \">\n <div className=\"os-scrollbar-track\">\n <div className=\"os-scrollbar-handle\" />\n </div>\n </div>\n <div className=\"os-scrollbar os-scrollbar-vertical\">\n <div className=\"os-scrollbar-track\">\n <StyledHandle className=\"os-scrollbar-handle\"></StyledHandle>\n </div>\n </div>\n <div className=\"os-scrollbar-corner\" />\n </div>\n );\n};\n"],"names":["StyledHandle","styled","div","options","className","scrollbars","autoHide","autoHideDelay","LeftNavContentWithScrollbar","props","children","inheritBoxShadow","boxShadow","useState","osInstance","setOsInstance","osTargetRef","useRef","useEffect","nextOsInstance","OverlayScrollbars","current","height"],"mappings":";;;;;;;;;AASA,IAAMA,YAAY,gBAAGC,MAAM,CAACC,GAAV;AAAA;AAAA,0OAAlB;AAeA,IAAMC,OAAgB,GAAG;AACvBC,EAAAA,SAAS,EAAE,eADY;AAEvBC,EAAAA,UAAU,EAAE;AACVC,IAAAA,QAAQ,EAAE,OADA;AAEVC,IAAAA,aAAa,EAAE;AAFL;AAFW,CAAzB;IAQaC,2BAAiF,GAAG,SAApFA,2BAAoF,CAACC,KAAD,EAAW;AAC1G,MAAQC,QAAR,GAAqBD,KAArB,CAAQC,QAAR;AAEA,MAAMC,gBAAgB,GAAG;AAAEC,IAAAA,SAAS,EAAE;AAAb,GAAzB;;AACA,kBAAoCC,QAAQ,EAA5C;AAAA;AAAA,MAAOC,UAAP;AAAA,MAAmBC,aAAnB;;AACA,MAAMC,WAAW,GAAGC,MAAM,CAAiB,IAAjB,CAA1B;AAEAC,EAAAA,SAAS,CAAC,YAAM;AACd,QAAMC,cAAiC,GAAGC,iBAAiB,CAACJ,WAAW,CAACK,OAAb,EAAsBlB,OAAtB,CAA3D;AACAY,IAAAA,aAAa,CAACI,cAAD,CAAb;AACD,GAHQ,EAGN,CAACL,UAAD,CAHM,CAAT;AAKA,sBACE;AAAK,IAAA,SAAS,EAAC,SAAf;AAAyB,IAAA,KAAK;AAAIQ,MAAAA,MAAM,EAAE;AAAZ,OAAuBX,gBAAvB,CAA9B;AAAyE,IAAA,QAAQ,EAAE,CAAC,CAApF;AAAuF,IAAA,GAAG,EAAEK;AAA5F,kBACE;AAAK,IAAA,SAAS,EAAC;AAAf,IADF,eAEE;AAAK,IAAA,SAAS,EAAC,YAAf;AAA4B,IAAA,KAAK,EAAEL;AAAnC,kBACE;AAAK,IAAA,SAAS,EAAC,aAAf;AAA6B,IAAA,KAAK,EAAEA;AAApC,kBACE;AAAK,IAAA,SAAS,EAAC,YAAf;AAA4B,IAAA,KAAK,EAAEA,gBAAnC;AAAqD;AAArD,KACGD,QADH,CADF,CADF,CAFF,eASE;AAAK,IAAA,SAAS,EAAC;AAAf,kBACE;AAAK,IAAA,SAAS,EAAC;AAAf,kBACE;AAAK,IAAA,SAAS,EAAC;AAAf,IADF,CADF,CATF,eAcE;AAAK,IAAA,SAAS,EAAC;AAAf,kBACE;AAAK,IAAA,SAAS,EAAC;AAAf,kBACE,oBAAC,YAAD;AAAc,IAAA,SAAS,EAAC;AAAxB,IADF,CADF,CAdF,eAmBE;AAAK,IAAA,SAAS,EAAC;AAAf,IAnBF,CADF;AAuBD;;;;"}
|
|
@@ -83,7 +83,8 @@ var LeftNavFooterItem = function LeftNavFooterItem(props) {
|
|
|
83
83
|
mr: "12px",
|
|
84
84
|
mb: "16px",
|
|
85
85
|
"data-testid": "leftnav-itemlabel",
|
|
86
|
-
labelOverflow: labelOverflow
|
|
86
|
+
labelOverflow: labelOverflow,
|
|
87
|
+
"aria-live": "polite"
|
|
87
88
|
}, labelOverflow === 'truncate' ? /*#__PURE__*/React.createElement(SimpleTruncatedTooltipText, {
|
|
88
89
|
value: footerLabel,
|
|
89
90
|
placement: "bottom-start"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/parts/LeftNavFooterItem/index.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nimport React, { useContext } from 'react';\nimport MenuExpand from '@elliemae/ds-icons/MenuExpand';\nimport { PropTypes } from 'react-desc';\nimport Grid from '@elliemae/ds-grid';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport {\n StyledFooterMenu,\n StyledItem,\n StyledItemWrapper,\n StyledLabel,\n StyledSeparator,\n StyledMenuCollapse,\n} from './styled';\nimport { useKeyboardNavigation } from '../../hooks';\nimport LeftNavigationContext from '../../LeftNavigationContext';\nimport {
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/parts/LeftNavFooterItem/index.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nimport React, { useContext } from 'react';\nimport MenuExpand from '@elliemae/ds-icons/MenuExpand';\nimport { PropTypes } from 'react-desc';\nimport Grid from '@elliemae/ds-grid';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport {\n StyledFooterMenu,\n StyledItem,\n StyledItemWrapper,\n StyledLabel,\n StyledSeparator,\n StyledMenuCollapse,\n} from './styled';\nimport { useKeyboardNavigation } from '../../hooks';\nimport LeftNavigationContext from '../../LeftNavigationContext';\nimport { FOOTER_DS_ID, FOOTER_MENU_CLOSE_DS_ID } from '../../exported-related/constants';\n\ntype LeftNavFooterItemProps = {\n footerLabel: string | JSX.Element;\n onFooterExpand: React.MouseEventHandler & React.KeyboardEventHandler;\n onFooterClose: React.MouseEventHandler & React.KeyboardEventHandler;\n};\n\nexport const LeftNavFooterItem: React.ComponentType<LeftNavFooterItemProps> = (props) => {\n const { footerLabel, onFooterExpand = () => null, onFooterClose = () => null } = props;\n const {\n leftNavProps: { labelOverflow, openedItem },\n expandedForAnimation,\n setSelectedItem,\n focusedItem,\n setFocusedItem,\n focusedByKey,\n visibleItemsRefs,\n } = useContext(LeftNavigationContext);\n\n const id = FOOTER_DS_ID;\n\n const handleOnClick = expandedForAnimation ? onFooterClose : onFooterExpand;\n\n const onKeyDown = useKeyboardNavigation({\n item: {\n dsId: id,\n itemOpts: {\n selectable: !expandedForAnimation,\n openable: false,\n closable: false,\n },\n },\n onClick: handleOnClick,\n });\n\n return (\n <StyledFooterMenu key={id} data-testid=\"leftnav-container\">\n <StyledItemWrapper>\n <StyledItem\n ref={visibleItemsRefs.current[id]}\n tabIndex={expandedForAnimation ? -1 : 0}\n expanded={expandedForAnimation}\n pt=\"xxs2\"\n height={expandedForAnimation ? 'auto' : '48px'}\n alignItems=\"flex-start\"\n pl=\"xxs\"\n cols={expandedForAnimation ? ['auto', '1fr', 'auto'] : ['38px']}\n onClick={expandedForAnimation ? () => null : handleOnClick}\n onKeyDown={onKeyDown}\n focused={focusedItem === id}\n focusedByKey={focusedByKey}\n onFocus={() => setFocusedItem(id)}\n data-testid=\"leftnav-item-container\"\n role=\"menuitem\"\n aria-label={expandedForAnimation ? `Footer, ${footerLabel}` : `Expand left navigation`}\n >\n {!expandedForAnimation ? (\n <MenuExpand size=\"m\" color={['brand-primary', 800]} data-testid=\"leftnav-footer-btn\" />\n ) : (\n <>\n <StyledLabel\n mt=\"5px\"\n mr=\"12px\"\n mb=\"16px\"\n data-testid=\"leftnav-itemlabel\"\n labelOverflow={labelOverflow}\n aria-live=\"polite\"\n >\n {labelOverflow === 'truncate' ? (\n <SimpleTruncatedTooltipText value={footerLabel} placement=\"bottom-start\" />\n ) : (\n footerLabel\n )}\n </StyledLabel>\n <StyledSeparator mt=\"xxxs\" />\n <Grid m=\"0 12px\">\n <StyledMenuCollapse\n size=\"m\"\n color={['brand-primary', 800]}\n onClick={(e) => {\n if (openedItem) setSelectedItem(openedItem);\n e.stopPropagation();\n handleOnClick(e);\n }}\n onKeyDown={(e) => {\n if (['Space', 'Enter'].includes(e.code) && openedItem) setSelectedItem(openedItem);\n }}\n data-testid=\"leftnav-footer-btn\"\n tabIndex={0}\n onFocus={(e) => {\n e.stopPropagation();\n setFocusedItem(FOOTER_MENU_CLOSE_DS_ID);\n }}\n role=\"button\"\n aria-label=\"Collapse left navigation\"\n />\n </Grid>\n </>\n )}\n </StyledItem>\n </StyledItemWrapper>\n </StyledFooterMenu>\n );\n};\n\nLeftNavFooterItem.propTypes = {\n footerLabel: PropTypes.any,\n onFooterExpand: PropTypes.func,\n onFooterClose: PropTypes.func,\n};\n\nexport default LeftNavFooterItem;\n"],"names":["LeftNavFooterItem","props","footerLabel","onFooterExpand","onFooterClose","useContext","LeftNavigationContext","leftNavProps","labelOverflow","openedItem","expandedForAnimation","setSelectedItem","focusedItem","setFocusedItem","focusedByKey","visibleItemsRefs","id","FOOTER_DS_ID","handleOnClick","onKeyDown","useKeyboardNavigation","item","dsId","itemOpts","selectable","openable","closable","onClick","current","e","stopPropagation","includes","code","FOOTER_MENU_CLOSE_DS_ID","propTypes","PropTypes","any","func"],"mappings":";;;;;;;;;;;;;;;;AAAA;IAwBaA,iBAA8D,GAAG,SAAjEA,iBAAiE,CAACC,KAAD,EAAW;AACvF,MAAQC,WAAR,GAAiFD,KAAjF,CAAQC,WAAR;AAAA,8BAAiFD,KAAjF,CAAqBE,cAArB;AAAA,MAAqBA,cAArB,sCAAsC;AAAA,WAAM,IAAN;AAAA,GAAtC;AAAA,6BAAiFF,KAAjF,CAAkDG,aAAlD;AAAA,MAAkDA,aAAlD,qCAAkE;AAAA,WAAM,IAAN;AAAA,GAAlE;;AACA,oBAQIC,UAAU,CAACC,cAAD,CARd;AAAA,0CACEC,YADF;AAAA,MACkBC,aADlB,yBACkBA,aADlB;AAAA,MACiCC,UADjC,yBACiCA,UADjC;AAAA,MAEEC,oBAFF,eAEEA,oBAFF;AAAA,MAGEC,eAHF,eAGEA,eAHF;AAAA,MAIEC,WAJF,eAIEA,WAJF;AAAA,MAKEC,cALF,eAKEA,cALF;AAAA,MAMEC,YANF,eAMEA,YANF;AAAA,MAOEC,gBAPF,eAOEA,gBAPF;;AAUA,MAAMC,EAAE,GAAGC,YAAX;AAEA,MAAMC,aAAa,GAAGR,oBAAoB,GAAGN,aAAH,GAAmBD,cAA7D;AAEA,MAAMgB,SAAS,GAAGC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lBb,IADF,CAhBF,CArBJ,CADF,CADF,CADF;AAoED;AAEDjC,iBAAiB,CAACkC,SAAlB,GAA8B;AAC5BhC,EAAAA,WAAW,EAAEiC,SAAS,CAACC,GADK;AAE5BjC,EAAAA,cAAc,EAAEgC,SAAS,CAACE,IAFE;AAG5BjC,EAAAA,aAAa,EAAE+B,SAAS,CAACE;AAHG,CAA9B;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-left-navigation",
|
|
3
|
-
"version": "1.54.0-
|
|
3
|
+
"version": "1.54.0-rc.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Ellie Mae - Dim Sum - Left Navigation",
|
|
6
6
|
"main": "cjs/index.js",
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"directory": "dist"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@elliemae/ds-basic": "1.54.0-
|
|
20
|
-
"@elliemae/ds-icons": "1.54.0-
|
|
21
|
-
"@elliemae/ds-system": "1.54.0-
|
|
19
|
+
"@elliemae/ds-basic": "1.54.0-rc.1",
|
|
20
|
+
"@elliemae/ds-icons": "1.54.0-rc.1",
|
|
21
|
+
"@elliemae/ds-system": "1.54.0-rc.1",
|
|
22
22
|
"prop-types": "~15.7.2",
|
|
23
23
|
"react-virtual": "^2.3.2",
|
|
24
24
|
"tree-model": "^1.0.7"
|