@elliemae/ds-mobile 3.52.0-rc.8 → 3.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/CategoryBox/CategoryBox.js +2 -2
- package/dist/cjs/CategoryBox/CategoryBox.js.map +2 -2
- package/dist/cjs/GlobalHeader/MobileGlobalHeader.js +3 -3
- package/dist/cjs/GlobalHeader/MobileGlobalHeader.js.map +2 -2
- package/dist/cjs/GroupBox/GroupBox.js +2 -2
- package/dist/cjs/GroupBox/GroupBox.js.map +2 -2
- package/dist/cjs/LoadingPage/Page.js +2 -2
- package/dist/cjs/LoadingPage/Page.js.map +2 -2
- package/dist/cjs/MobileContextMenu/MobileContextMenu.js +5 -5
- package/dist/cjs/MobileContextMenu/MobileContextMenu.js.map +2 -2
- package/dist/cjs/MobileContextMenu/MobileContextMenuGroup.js +2 -2
- package/dist/cjs/MobileContextMenu/MobileContextMenuGroup.js.map +2 -2
- package/dist/cjs/MobileSelectList/MobileSelectList.js +4 -4
- package/dist/cjs/MobileSelectList/MobileSelectList.js.map +2 -2
- package/dist/cjs/MobileSelectList/styled.js +3 -3
- package/dist/cjs/MobileSelectList/styled.js.map +2 -2
- package/dist/cjs/MobileTouchable/MobileTouchable.js +2 -2
- package/dist/cjs/MobileTouchable/MobileTouchable.js.map +2 -2
- package/dist/cjs/Modal/Modal.js +4 -4
- package/dist/cjs/Modal/Modal.js.map +2 -2
- package/dist/cjs/SideNav/SideNav.js +2 -2
- package/dist/cjs/SideNav/SideNav.js.map +2 -2
- package/dist/esm/CategoryBox/CategoryBox.js +1 -1
- package/dist/esm/CategoryBox/CategoryBox.js.map +1 -1
- package/dist/esm/GlobalHeader/MobileGlobalHeader.js +1 -1
- package/dist/esm/GlobalHeader/MobileGlobalHeader.js.map +1 -1
- package/dist/esm/GroupBox/GroupBox.js +1 -1
- package/dist/esm/GroupBox/GroupBox.js.map +1 -1
- package/dist/esm/LoadingPage/Page.js +1 -1
- package/dist/esm/LoadingPage/Page.js.map +1 -1
- package/dist/esm/MobileContextMenu/MobileContextMenu.js +1 -1
- package/dist/esm/MobileContextMenu/MobileContextMenu.js.map +1 -1
- package/dist/esm/MobileContextMenu/MobileContextMenuGroup.js +1 -1
- package/dist/esm/MobileContextMenu/MobileContextMenuGroup.js.map +1 -1
- package/dist/esm/MobileSelectList/MobileSelectList.js +1 -1
- package/dist/esm/MobileSelectList/MobileSelectList.js.map +1 -1
- package/dist/esm/MobileSelectList/styled.js +1 -1
- package/dist/esm/MobileSelectList/styled.js.map +1 -1
- package/dist/esm/MobileTouchable/MobileTouchable.js +1 -1
- package/dist/esm/MobileTouchable/MobileTouchable.js.map +1 -1
- package/dist/esm/Modal/Modal.js +1 -1
- package/dist/esm/Modal/Modal.js.map +1 -1
- package/dist/esm/SideNav/SideNav.js +1 -1
- package/dist/esm/SideNav/SideNav.js.map +1 -1
- package/package.json +22 -22
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/Modal/Modal.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\nimport React from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { noop } from 'lodash';\nimport { Grid } from '@elliemae/ds-grid';\nimport { WarningTriangle } from '@elliemae/ds-icons';\nimport { DSButton } from '@elliemae/ds-button';\nimport { useTheme } from '@elliemae/ds-system';\nimport { ModalPosition, ModalBox, BackShadow, ModalIcon, ModalTitle, ModalDescription, BodyFix } from './styled.js';\n\nconst Modal = ({\n zIndex = 1,\n title = '',\n description = '',\n onClose = noop,\n showSecondaryAction = true,\n secondaryActionProps = {\n onClick: noop,\n labelText: 'Cancel',\n },\n primaryActionProps = {\n onClick: noop,\n labelText: 'Accept',\n },\n isOpen = false,\n children = undefined,\n}) => {\n const theme = useTheme();\n if (!isOpen) return null;\n return (\n <>\n <BodyFix isOpen={isOpen} />\n <BackShadow onClick={onClose} zIndex={zIndex} />\n <ModalPosition zIndex={zIndex} cols={['auto']}>\n {children !== undefined ? (\n <>{children}</>\n ) : (\n <ModalBox\n maxHeight={`${window.innerHeight * 0.75}px`}\n rows={[1, '80px']}\n style={{\n overflow: 'hidden',\n }}\n >\n <Grid\n pl=\"xs\"\n pr=\"xs\"\n style={{\n overflow: 'hidden',\n }}\n >\n <Grid\n rows={['auto', 'auto', 1]}\n style={{\n overflow: 'hidden',\n }}\n >\n <ModalIcon>\n <WarningTriangle size=\"xxl\" />\n </ModalIcon>\n <ModalTitle data-testid=\"modal-title\">{title}</ModalTitle>\n <ModalDescription\n data-testid=\"modal-desc\"\n style={{\n overflow: 'auto',\n }}\n >\n {description}\n </ModalDescription>\n </Grid>\n </Grid>\n <Grid pt=\"24px\">\n <Grid\n pl=\"xs\"\n pr=\"xs\"\n cols={showSecondaryAction ? [1, 1] : [1]}\n gutter=\"xs\"\n justifyContent=\"center\"\n alignItems=\"center\"\n style={{\n borderTop: `1px solid ${theme.colors.neutral[100]}`,\n }}\n >\n {showSecondaryAction && (\n <DSButton\n {...secondaryActionProps}\n labelText={secondaryActionProps.labelText || ' Cancel'}\n buttonType=\"secondary\"\n data-testid=\"modal-secondary-btn\"\n />\n )}\n <DSButton\n labelText={primaryActionProps.labelText || ' Accept'}\n {...primaryActionProps}\n buttonType=\"primary\"\n data-testid=\"modal-primary-btn\"\n />\n </Grid>\n </Grid>\n </ModalBox>\n )}\n </ModalPosition>\n </>\n );\n};\n\nconst modalProps = {\n isOpen: PropTypes.bool.description('Wheter the modal is open or closed').defaultValue(false),\n zIndex: PropTypes.number.description('z-index value').defaultValue(1),\n title: PropTypes.string.description('Modal s title').isRequired,\n description: PropTypes.string.description('Modal s content').isRequired,\n onClose: PropTypes.func.description('Function executed when the modal closes'),\n showSecondaryAction: PropTypes.bool.description('Wheter to show secondary action button or not').defaultValue(true),\n secondaryActionProps: PropTypes.shape({\n onClick: PropTypes.func,\n labelText: PropTypes.string,\n }).description('Secondary action props'),\n primaryActionProps: PropTypes.shape({\n onClick: PropTypes.func,\n labelText: PropTypes.string,\n }).description('Primary action props'),\n};\n\nModal.displayName = 'Modal';\nconst ModalWithSchema = describe(Modal);\nModalWithSchema.propTypes = modalProps;\n\nexport { Modal, ModalWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+BjB;AA7BN,8BAAoC;AACpC,
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\nimport React from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { noop } from 'lodash-es';\nimport { Grid } from '@elliemae/ds-grid';\nimport { WarningTriangle } from '@elliemae/ds-icons';\nimport { DSButton } from '@elliemae/ds-button';\nimport { useTheme } from '@elliemae/ds-system';\nimport { ModalPosition, ModalBox, BackShadow, ModalIcon, ModalTitle, ModalDescription, BodyFix } from './styled.js';\n\nconst Modal = ({\n zIndex = 1,\n title = '',\n description = '',\n onClose = noop,\n showSecondaryAction = true,\n secondaryActionProps = {\n onClick: noop,\n labelText: 'Cancel',\n },\n primaryActionProps = {\n onClick: noop,\n labelText: 'Accept',\n },\n isOpen = false,\n children = undefined,\n}) => {\n const theme = useTheme();\n if (!isOpen) return null;\n return (\n <>\n <BodyFix isOpen={isOpen} />\n <BackShadow onClick={onClose} zIndex={zIndex} />\n <ModalPosition zIndex={zIndex} cols={['auto']}>\n {children !== undefined ? (\n <>{children}</>\n ) : (\n <ModalBox\n maxHeight={`${window.innerHeight * 0.75}px`}\n rows={[1, '80px']}\n style={{\n overflow: 'hidden',\n }}\n >\n <Grid\n pl=\"xs\"\n pr=\"xs\"\n style={{\n overflow: 'hidden',\n }}\n >\n <Grid\n rows={['auto', 'auto', 1]}\n style={{\n overflow: 'hidden',\n }}\n >\n <ModalIcon>\n <WarningTriangle size=\"xxl\" />\n </ModalIcon>\n <ModalTitle data-testid=\"modal-title\">{title}</ModalTitle>\n <ModalDescription\n data-testid=\"modal-desc\"\n style={{\n overflow: 'auto',\n }}\n >\n {description}\n </ModalDescription>\n </Grid>\n </Grid>\n <Grid pt=\"24px\">\n <Grid\n pl=\"xs\"\n pr=\"xs\"\n cols={showSecondaryAction ? [1, 1] : [1]}\n gutter=\"xs\"\n justifyContent=\"center\"\n alignItems=\"center\"\n style={{\n borderTop: `1px solid ${theme.colors.neutral[100]}`,\n }}\n >\n {showSecondaryAction && (\n <DSButton\n {...secondaryActionProps}\n labelText={secondaryActionProps.labelText || ' Cancel'}\n buttonType=\"secondary\"\n data-testid=\"modal-secondary-btn\"\n />\n )}\n <DSButton\n labelText={primaryActionProps.labelText || ' Accept'}\n {...primaryActionProps}\n buttonType=\"primary\"\n data-testid=\"modal-primary-btn\"\n />\n </Grid>\n </Grid>\n </ModalBox>\n )}\n </ModalPosition>\n </>\n );\n};\n\nconst modalProps = {\n isOpen: PropTypes.bool.description('Wheter the modal is open or closed').defaultValue(false),\n zIndex: PropTypes.number.description('z-index value').defaultValue(1),\n title: PropTypes.string.description('Modal s title').isRequired,\n description: PropTypes.string.description('Modal s content').isRequired,\n onClose: PropTypes.func.description('Function executed when the modal closes'),\n showSecondaryAction: PropTypes.bool.description('Wheter to show secondary action button or not').defaultValue(true),\n secondaryActionProps: PropTypes.shape({\n onClick: PropTypes.func,\n labelText: PropTypes.string,\n }).description('Secondary action props'),\n primaryActionProps: PropTypes.shape({\n onClick: PropTypes.func,\n labelText: PropTypes.string,\n }).description('Primary action props'),\n};\n\nModal.displayName = 'Modal';\nconst ModalWithSchema = describe(Modal);\nModalWithSchema.propTypes = modalProps;\n\nexport { Modal, ModalWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+BjB;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,kCAAU,MAAM;AAAA,IAClC,SAAS,kCAAU;AAAA,IACnB,WAAW,kCAAU;AAAA,EACvB,CAAC,EAAE,YAAY,sBAAsB;AACvC;AAEA,MAAM,cAAc;AACpB,MAAM,sBAAkB,kCAAS,KAAK;AACtC,gBAAgB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -39,10 +39,10 @@ var import_ds_backdrop = require("@elliemae/ds-backdrop");
|
|
|
39
39
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
40
40
|
var import_ds_icon = require("@elliemae/ds-icon");
|
|
41
41
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
42
|
-
var
|
|
42
|
+
var import_lodash_es = require("lodash-es");
|
|
43
43
|
var import_EM_logo = require("../Icons/EM_logo.js");
|
|
44
44
|
var import_styles = require("./styles.js");
|
|
45
|
-
const DSSideNav = ({ containerProps = {}, title, onClose =
|
|
45
|
+
const DSSideNav = ({ containerProps = {}, title, onClose = import_lodash_es.noop, menuItems = [], bottomMenuItems = [] }) => {
|
|
46
46
|
const [selectedMenuItemIdx, setSelectedMenuItem] = (0, import_react.useState)(-1);
|
|
47
47
|
const menuItemClick = (idx, text, cb) => {
|
|
48
48
|
if (cb) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/SideNav/SideNav.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable import/no-unresolved */\n/* eslint-disable max-lines */\n/* eslint-disable react/no-array-index-key */\n/* eslint-disable jsx-a11y/click-events-have-key-events */\n/* eslint-disable jsx-a11y/no-static-element-interactions */\nimport React, { useState } from 'react';\nimport { DSBackdrop } from '@elliemae/ds-backdrop';\nimport { Close } from '@elliemae/ds-icons';\nimport { DSIconSizes, DSIconColors } from '@elliemae/ds-icon';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { noop } from 'lodash';\nimport { SvgIcon as Logo } from '../Icons/EM_logo.js';\nimport { Container, Menu, Heading, Icon, Hr, MenuList, BottomMenu, MenuWrapper } from './styles.js';\n\nconst DSSideNav = ({ containerProps = {}, title, onClose = noop, menuItems = [], bottomMenuItems = [] }) => {\n const [selectedMenuItemIdx, setSelectedMenuItem] = useState(-1);\n\n const menuItemClick = (idx, text, cb) => {\n if (cb) {\n cb(idx, text);\n }\n setSelectedMenuItem(idx);\n };\n\n const renderMenuList = () => (\n <>\n {menuItems.length > 0 ? (\n <MenuList>\n {menuItems.map(({ icon, text, onClick }, idx) => (\n <div key={idx} className=\"menuitem\" onClick={menuItemClick.bind(null, idx, text, onClick)}>\n <div className=\"icon\">{icon}</div>\n <div className={`text ${idx === selectedMenuItemIdx ? 'active' : ''}`}>{text}</div>\n </div>\n ))}\n </MenuList>\n ) : null}\n </>\n );\n\n const renderBottomMenu = () => (\n <MenuList>\n {bottomMenuItems.map(({ icon, text, onClick }, idx) => (\n <div key={idx} className=\"menuitem\" onClick={() => onClick(idx, text)}>\n <div className=\"icon\">{icon}</div>\n <div className=\"text\">{text}</div>\n </div>\n ))}\n </MenuList>\n );\n\n return (\n <Container data-testid={containerProps['data-testid'] || 'global-header-menu'}>\n <DSBackdrop onClick={onClose} type=\"cover\"></DSBackdrop>\n\n <Menu>\n <MenuWrapper>\n <Heading>\n <Icon>{Logo()}</Icon>\n <div className=\"content\">\n <label>{title}</label>\n <span></span>\n <div className=\"icon\">\n <Close onClick={onClose} size={DSIconSizes.S} color={DSIconColors.WHITE} />\n </div>\n </div>\n </Heading>\n <Hr></Hr>\n {renderMenuList()}\n {bottomMenuItems.length > 0 ? (\n <BottomMenu>\n <div className=\"content\">\n <hr></hr>\n {renderBottomMenu()}\n </div>\n </BottomMenu>\n ) : null}\n </MenuWrapper>\n </Menu>\n </Container>\n );\n};\n\nconst menuProps = PropTypes.arrayOf(\n PropTypes.shape({\n icon: PropTypes.element,\n text: PropTypes.string,\n }),\n);\n\nconst navProps = {\n /** inject props to wrapper element of side nav */\n containerProps: PropTypes.object.description('inject props to wrapper element of side nav'),\n /**\n * Heading Title\n */\n title: PropTypes.string.isRequired.description('Heading Title'),\n /**\n * Callback function when close is menu is triggered\n */\n onClose: PropTypes.func.description('Callback function when close is menu is triggered'),\n /**\n * Top Menu items array\n */\n menuItems: menuProps.description('Top Menu items array'),\n /**\n * Bottom Menu items array\n */\n bottomMenuItems: menuProps.description('Bottom Menu items array'),\n};\n\nDSSideNav.displayName = 'DSSideNav';\nconst DSSideNavWithSchema = describe(DSSideNav).description('Side navigation for mobile and tablet');\n\nDSSideNavWithSchema.propTypes = navProps;\n\nexport { DSSideNav, DSSideNavWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADyBnB;AApBJ,mBAAgC;AAChC,yBAA2B;AAC3B,sBAAsB;AACtB,qBAA0C;AAC1C,8BAAoC;AACpC,
|
|
4
|
+
"sourcesContent": ["/* eslint-disable import/no-unresolved */\n/* eslint-disable max-lines */\n/* eslint-disable react/no-array-index-key */\n/* eslint-disable jsx-a11y/click-events-have-key-events */\n/* eslint-disable jsx-a11y/no-static-element-interactions */\nimport React, { useState } from 'react';\nimport { DSBackdrop } from '@elliemae/ds-backdrop';\nimport { Close } from '@elliemae/ds-icons';\nimport { DSIconSizes, DSIconColors } from '@elliemae/ds-icon';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { noop } from 'lodash-es';\nimport { SvgIcon as Logo } from '../Icons/EM_logo.js';\nimport { Container, Menu, Heading, Icon, Hr, MenuList, BottomMenu, MenuWrapper } from './styles.js';\n\nconst DSSideNav = ({ containerProps = {}, title, onClose = noop, menuItems = [], bottomMenuItems = [] }) => {\n const [selectedMenuItemIdx, setSelectedMenuItem] = useState(-1);\n\n const menuItemClick = (idx, text, cb) => {\n if (cb) {\n cb(idx, text);\n }\n setSelectedMenuItem(idx);\n };\n\n const renderMenuList = () => (\n <>\n {menuItems.length > 0 ? (\n <MenuList>\n {menuItems.map(({ icon, text, onClick }, idx) => (\n <div key={idx} className=\"menuitem\" onClick={menuItemClick.bind(null, idx, text, onClick)}>\n <div className=\"icon\">{icon}</div>\n <div className={`text ${idx === selectedMenuItemIdx ? 'active' : ''}`}>{text}</div>\n </div>\n ))}\n </MenuList>\n ) : null}\n </>\n );\n\n const renderBottomMenu = () => (\n <MenuList>\n {bottomMenuItems.map(({ icon, text, onClick }, idx) => (\n <div key={idx} className=\"menuitem\" onClick={() => onClick(idx, text)}>\n <div className=\"icon\">{icon}</div>\n <div className=\"text\">{text}</div>\n </div>\n ))}\n </MenuList>\n );\n\n return (\n <Container data-testid={containerProps['data-testid'] || 'global-header-menu'}>\n <DSBackdrop onClick={onClose} type=\"cover\"></DSBackdrop>\n\n <Menu>\n <MenuWrapper>\n <Heading>\n <Icon>{Logo()}</Icon>\n <div className=\"content\">\n <label>{title}</label>\n <span></span>\n <div className=\"icon\">\n <Close onClick={onClose} size={DSIconSizes.S} color={DSIconColors.WHITE} />\n </div>\n </div>\n </Heading>\n <Hr></Hr>\n {renderMenuList()}\n {bottomMenuItems.length > 0 ? (\n <BottomMenu>\n <div className=\"content\">\n <hr></hr>\n {renderBottomMenu()}\n </div>\n </BottomMenu>\n ) : null}\n </MenuWrapper>\n </Menu>\n </Container>\n );\n};\n\nconst menuProps = PropTypes.arrayOf(\n PropTypes.shape({\n icon: PropTypes.element,\n text: PropTypes.string,\n }),\n);\n\nconst navProps = {\n /** inject props to wrapper element of side nav */\n containerProps: PropTypes.object.description('inject props to wrapper element of side nav'),\n /**\n * Heading Title\n */\n title: PropTypes.string.isRequired.description('Heading Title'),\n /**\n * Callback function when close is menu is triggered\n */\n onClose: PropTypes.func.description('Callback function when close is menu is triggered'),\n /**\n * Top Menu items array\n */\n menuItems: menuProps.description('Top Menu items array'),\n /**\n * Bottom Menu items array\n */\n bottomMenuItems: menuProps.description('Bottom Menu items array'),\n};\n\nDSSideNav.displayName = 'DSSideNav';\nconst DSSideNavWithSchema = describe(DSSideNav).description('Side navigation for mobile and tablet');\n\nDSSideNavWithSchema.propTypes = navProps;\n\nexport { DSSideNav, DSSideNavWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADyBnB;AApBJ,mBAAgC;AAChC,yBAA2B;AAC3B,sBAAsB;AACtB,qBAA0C;AAC1C,8BAAoC;AACpC,uBAAqB;AACrB,qBAAgC;AAChC,oBAAsF;AAEtF,MAAM,YAAY,CAAC,EAAE,iBAAiB,CAAC,GAAG,OAAO,UAAU,uBAAM,YAAY,CAAC,GAAG,kBAAkB,CAAC,EAAE,MAAM;AAC1G,QAAM,CAAC,qBAAqB,mBAAmB,QAAI,uBAAS,EAAE;AAE9D,QAAM,gBAAgB,CAAC,KAAK,MAAM,OAAO;AACvC,QAAI,IAAI;AACN,SAAG,KAAK,IAAI;AAAA,IACd;AACA,wBAAoB,GAAG;AAAA,EACzB;AAEA,QAAM,iBAAiB,MACrB,2EACG,oBAAU,SAAS,IAClB,4CAAC,0BACE,oBAAU,IAAI,CAAC,EAAE,MAAM,MAAM,QAAQ,GAAG,QACvC,6CAAC,SAAc,WAAU,YAAW,SAAS,cAAc,KAAK,MAAM,KAAK,MAAM,OAAO,GACtF;AAAA,gDAAC,SAAI,WAAU,QAAQ,gBAAK;AAAA,IAC5B,4CAAC,SAAI,WAAW,QAAQ,QAAQ,sBAAsB,WAAW,EAAE,IAAK,gBAAK;AAAA,OAFrE,GAGV,CACD,GACH,IACE,MACN;AAGF,QAAM,mBAAmB,MACvB,4CAAC,0BACE,0BAAgB,IAAI,CAAC,EAAE,MAAM,MAAM,QAAQ,GAAG,QAC7C,6CAAC,SAAc,WAAU,YAAW,SAAS,MAAM,QAAQ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,MAAM,0BAAsB,kCAAS,SAAS,EAAE,YAAY,uCAAuC;AAEnG,oBAAoB,YAAY;",
|
|
6
6
|
"names": ["Logo"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import React2 from "react";
|
|
4
|
-
import { times } from "lodash";
|
|
4
|
+
import { times } from "lodash-es";
|
|
5
5
|
import { PropTypes, describe } from "@elliemae/ds-props-helpers";
|
|
6
6
|
import { styled, truncate } from "@elliemae/ds-system";
|
|
7
7
|
import { Grid } from "@elliemae/ds-grid";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/CategoryBox/CategoryBox.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { times } from 'lodash';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { styled, truncate } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\n\nconst Title = styled.h3`\n font-size: 18px;\n margin: 0;\n color: ${(props) => props.theme.colors.neutral['700']};\n line-height: inherit;\n ${truncate()}\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n`;\n\nconst CategoryBox = styled(Grid)`\n background: ${(props) => props.theme.colors.neutral['0']};\n border-top: ${(props) => (props.hasBorderTop ? `1px solid ${props.theme.colors.neutral['100']}` : 'none')};\n`;\n\nconst DSCategoryBox = ({ borderTop = true, actionsRight = [], title, headerLevel = 3, children }) => {\n const rows = ['auto'];\n const hasActions = actionsRight.length > 0;\n if (hasActions) rows.push('auto');\n\n const cols = React.useMemo(() => times(actionsRight.length, () => 'auto'), [actionsRight.length]);\n\n return (\n <Grid rows={['40px', 'auto']}>\n <CategoryBox\n cols={rows}\n hasBorderTop={borderTop}\n alignItems=\"center\"\n pl=\"xs\"\n pr={actionsRight.length > 0 ? 'xxs' : 'xs'}\n >\n <Title as={`h${headerLevel}`}>{title}</Title>\n {hasActions && (\n <Grid cols={cols} justifySelf=\"end\">\n {actionsRight}\n </Grid>\n )}\n </CategoryBox>\n {children}\n </Grid>\n );\n};\n\nconst props = {\n /**\n * Category Box title\n */\n title: PropTypes.string.isRequired.description('Category Box title'),\n /**\n * Toggle border top of category box\n */\n borderTop: PropTypes.bool.description('Toggle border top of category box'),\n /**\n * Array of button icons\n */\n actionsRight: PropTypes.arrayOf(PropTypes.element).description('Array of button icons'),\n /**\n * semantic level of header tag for the title\n */\n headerLevel: PropTypes.oneOf([1, 2, 3, 4, 5, 6]).description('semantic level of header tag for the title'),\n /**\n * In-box children\n */\n children: PropTypes.element.description('In-box children'),\n};\n\nDSCategoryBox.displayName = 'DSCategoryBox';\nconst DSCategoryBoxWithSchema = describe(DSCategoryBox);\nDSCategoryBoxWithSchema.propTypes = props;\n\nexport { DSCategoryBox, DSCategoryBoxWithSchema };\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { times } from 'lodash-es';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { styled, truncate } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\n\nconst Title = styled.h3`\n font-size: 18px;\n margin: 0;\n color: ${(props) => props.theme.colors.neutral['700']};\n line-height: inherit;\n ${truncate()}\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n`;\n\nconst CategoryBox = styled(Grid)`\n background: ${(props) => props.theme.colors.neutral['0']};\n border-top: ${(props) => (props.hasBorderTop ? `1px solid ${props.theme.colors.neutral['100']}` : 'none')};\n`;\n\nconst DSCategoryBox = ({ borderTop = true, actionsRight = [], title, headerLevel = 3, children }) => {\n const rows = ['auto'];\n const hasActions = actionsRight.length > 0;\n if (hasActions) rows.push('auto');\n\n const cols = React.useMemo(() => times(actionsRight.length, () => 'auto'), [actionsRight.length]);\n\n return (\n <Grid rows={['40px', 'auto']}>\n <CategoryBox\n cols={rows}\n hasBorderTop={borderTop}\n alignItems=\"center\"\n pl=\"xs\"\n pr={actionsRight.length > 0 ? 'xxs' : 'xs'}\n >\n <Title as={`h${headerLevel}`}>{title}</Title>\n {hasActions && (\n <Grid cols={cols} justifySelf=\"end\">\n {actionsRight}\n </Grid>\n )}\n </CategoryBox>\n {children}\n </Grid>\n );\n};\n\nconst props = {\n /**\n * Category Box title\n */\n title: PropTypes.string.isRequired.description('Category Box title'),\n /**\n * Toggle border top of category box\n */\n borderTop: PropTypes.bool.description('Toggle border top of category box'),\n /**\n * Array of button icons\n */\n actionsRight: PropTypes.arrayOf(PropTypes.element).description('Array of button icons'),\n /**\n * semantic level of header tag for the title\n */\n headerLevel: PropTypes.oneOf([1, 2, 3, 4, 5, 6]).description('semantic level of header tag for the title'),\n /**\n * In-box children\n */\n children: PropTypes.element.description('In-box children'),\n};\n\nDSCategoryBox.displayName = 'DSCategoryBox';\nconst DSCategoryBoxWithSchema = describe(DSCategoryBox);\nDSCategoryBoxWithSchema.propTypes = props;\n\nexport { DSCategoryBox, DSCategoryBoxWithSchema };\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;AC6BjB,SAOE,KAPF;AA7BN,OAAOA,YAAW;AAClB,SAAS,aAAa;AACtB,SAAS,WAAW,gBAAgB;AACpC,SAAS,QAAQ,gBAAgB;AACjC,SAAS,YAAY;AAErB,MAAM,QAAQ,OAAO;AAAA;AAAA;AAAA,WAGV,CAACC,WAAUA,OAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA,IAEnD,SAAS,CAAC;AAAA,iBACG,CAACA,WAAUA,OAAM,MAAM,YAAY,QAAQ;AAAA;AAG5D,MAAM,cAAc,OAAO,IAAI;AAAA,gBACf,CAACA,WAAUA,OAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA,gBAC1C,CAACA,WAAWA,OAAM,eAAe,aAAaA,OAAM,MAAM,OAAO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|
|
@@ -6,7 +6,7 @@ import { DSInput } from "@elliemae/ds-form";
|
|
|
6
6
|
import { PropTypes, describe } from "@elliemae/ds-props-helpers";
|
|
7
7
|
import { DSButton } from "@elliemae/ds-button";
|
|
8
8
|
import { DSIconSizes, DSIconColors } from "@elliemae/ds-icon";
|
|
9
|
-
import { debounce, noop } from "lodash";
|
|
9
|
+
import { debounce, noop } from "lodash-es";
|
|
10
10
|
import { Grid } from "@elliemae/ds-grid";
|
|
11
11
|
import { SvgIcon as Logo } from "../Icons/EM_logo.js";
|
|
12
12
|
import { Container, Label, SearchWrapper, Icon, RightSection, MainSection } from "./styles.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/GlobalHeader/MobileGlobalHeader.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/jsx-no-bind */\n/* eslint-disable import/no-unresolved */\n/* eslint-disable max-lines */\nimport React, { useState, useCallback } from 'react';\nimport { Search } from '@elliemae/ds-icons';\nimport { DSInput } from '@elliemae/ds-form';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { DSButton } from '@elliemae/ds-button';\nimport { DSIconSizes, DSIconColors } from '@elliemae/ds-icon';\nimport { debounce, noop } from 'lodash';\nimport { Grid } from '@elliemae/ds-grid';\nimport { SvgIcon as Logo } from '../Icons/EM_logo.js';\nimport { Container, Label, SearchWrapper, Icon, RightSection, MainSection } from './styles.js';\nimport { DSSideNav } from '../SideNav/index.js';\n\nconst DSGlobalHeader = ({\n containerProps = {},\n title,\n lastIcon,\n onSearchChange = noop,\n topMenuItems,\n bottomMenuItems,\n}) => {\n const [searchBarVisible, setSearchBarVisible] = useState(false);\n const [searchValue, setSearchValue] = useState();\n const [showMenu, setShowMenu] = useState(false);\n const searchClicked = () => {\n setSearchBarVisible(true);\n };\n\n const onSearchChangeDebounced = useCallback(debounce(onSearchChange, 250), []);\n const searchValueChanged = (e) => {\n const val = e.target.value;\n onSearchChangeDebounced(val);\n setSearchValue(val);\n };\n\n const searchCloseClicked = () => {\n setSearchBarVisible(false);\n };\n\n const menuToggle = (flag) => {\n setShowMenu(flag);\n };\n\n return (\n <>\n <Container data-testid={containerProps['data-testid'] || 'global-header-wrapper'} {...containerProps}>\n {!searchBarVisible ? (\n <>\n <MainSection>\n <Icon onClick={menuToggle.bind(null, true)}>{Logo()}</Icon>\n <Label>{title}</Label>\n <span></span>\n <RightSection>\n <Grid cols={lastIcon ? [1 / 2, 1 / 2] : [1]} gutter=\"xs\">\n <Grid>\n <Search\n data-testid=\"mobile-global-header-search\"\n size={DSIconSizes.M}\n color={DSIconColors.WHITE}\n onClick={searchClicked}\n />\n </Grid>\n {lastIcon && <Grid>{lastIcon}</Grid>}\n </Grid>\n </RightSection>\n </MainSection>\n </>\n ) : (\n <SearchWrapper>\n <DSInput\n clearable\n className=\"dsInput\"\n placeholder=\"Search here\"\n onChange={searchValueChanged}\n rightComponent={\n <DSButton\n buttonType=\"primary\"\n className=\"dsButton\"\n icon={<Search size={DSIconSizes.M} color={DSIconColors.WHITE} onClick={searchCloseClicked} />}\n />\n }\n value={searchValue}\n variant=\"variant-active\"\n />\n </SearchWrapper>\n )}\n </Container>\n {showMenu ? (\n <DSSideNav\n title={title}\n menuItems={topMenuItems}\n bottomMenuItems={bottomMenuItems}\n onClose={menuToggle.bind(null, false)}\n ></DSSideNav>\n ) : null}\n </>\n );\n};\n\nconst menuProps = PropTypes.arrayOf(\n PropTypes.shape({\n icon: PropTypes.element,\n text: PropTypes.string,\n }),\n).description('menu item array');\n\nconst props = {\n /** props to inject to wrapper */\n containerProps: PropTypes.object.description('props to inject to wrapper'),\n /**\n * Heading Title\n */\n title: PropTypes.string.isRequired.description('Heading Title'),\n /**\n * Dimsum icon Element\n */\n lastIcon: PropTypes.element.description('Dimsum icon Element'),\n /**\n * Callback function for search change\n */\n onSearchChange: PropTypes.func.description('Callback function for search change'),\n /**\n * Top Menu items array\n */\n topMenuItems: menuProps,\n /**\n * Bottom Menu items array\n */\n bottomMenuItems: menuProps,\n};\n\nDSGlobalHeader.displayName = 'DSGlobalHeader';\nconst DSGlobalHeaderWithSchema = describe(DSGlobalHeader);\nDSGlobalHeaderWithSchema.propTypes = props;\n\nexport { DSGlobalHeader, DSGlobalHeaderWithSchema };\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/jsx-no-bind */\n/* eslint-disable import/no-unresolved */\n/* eslint-disable max-lines */\nimport React, { useState, useCallback } from 'react';\nimport { Search } from '@elliemae/ds-icons';\nimport { DSInput } from '@elliemae/ds-form';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { DSButton } from '@elliemae/ds-button';\nimport { DSIconSizes, DSIconColors } from '@elliemae/ds-icon';\nimport { debounce, noop } from 'lodash-es';\nimport { Grid } from '@elliemae/ds-grid';\nimport { SvgIcon as Logo } from '../Icons/EM_logo.js';\nimport { Container, Label, SearchWrapper, Icon, RightSection, MainSection } from './styles.js';\nimport { DSSideNav } from '../SideNav/index.js';\n\nconst DSGlobalHeader = ({\n containerProps = {},\n title,\n lastIcon,\n onSearchChange = noop,\n topMenuItems,\n bottomMenuItems,\n}) => {\n const [searchBarVisible, setSearchBarVisible] = useState(false);\n const [searchValue, setSearchValue] = useState();\n const [showMenu, setShowMenu] = useState(false);\n const searchClicked = () => {\n setSearchBarVisible(true);\n };\n\n const onSearchChangeDebounced = useCallback(debounce(onSearchChange, 250), []);\n const searchValueChanged = (e) => {\n const val = e.target.value;\n onSearchChangeDebounced(val);\n setSearchValue(val);\n };\n\n const searchCloseClicked = () => {\n setSearchBarVisible(false);\n };\n\n const menuToggle = (flag) => {\n setShowMenu(flag);\n };\n\n return (\n <>\n <Container data-testid={containerProps['data-testid'] || 'global-header-wrapper'} {...containerProps}>\n {!searchBarVisible ? (\n <>\n <MainSection>\n <Icon onClick={menuToggle.bind(null, true)}>{Logo()}</Icon>\n <Label>{title}</Label>\n <span></span>\n <RightSection>\n <Grid cols={lastIcon ? [1 / 2, 1 / 2] : [1]} gutter=\"xs\">\n <Grid>\n <Search\n data-testid=\"mobile-global-header-search\"\n size={DSIconSizes.M}\n color={DSIconColors.WHITE}\n onClick={searchClicked}\n />\n </Grid>\n {lastIcon && <Grid>{lastIcon}</Grid>}\n </Grid>\n </RightSection>\n </MainSection>\n </>\n ) : (\n <SearchWrapper>\n <DSInput\n clearable\n className=\"dsInput\"\n placeholder=\"Search here\"\n onChange={searchValueChanged}\n rightComponent={\n <DSButton\n buttonType=\"primary\"\n className=\"dsButton\"\n icon={<Search size={DSIconSizes.M} color={DSIconColors.WHITE} onClick={searchCloseClicked} />}\n />\n }\n value={searchValue}\n variant=\"variant-active\"\n />\n </SearchWrapper>\n )}\n </Container>\n {showMenu ? (\n <DSSideNav\n title={title}\n menuItems={topMenuItems}\n bottomMenuItems={bottomMenuItems}\n onClose={menuToggle.bind(null, false)}\n ></DSSideNav>\n ) : null}\n </>\n );\n};\n\nconst menuProps = PropTypes.arrayOf(\n PropTypes.shape({\n icon: PropTypes.element,\n text: PropTypes.string,\n }),\n).description('menu item array');\n\nconst props = {\n /** props to inject to wrapper */\n containerProps: PropTypes.object.description('props to inject to wrapper'),\n /**\n * Heading Title\n */\n title: PropTypes.string.isRequired.description('Heading Title'),\n /**\n * Dimsum icon Element\n */\n lastIcon: PropTypes.element.description('Dimsum icon Element'),\n /**\n * Callback function for search change\n */\n onSearchChange: PropTypes.func.description('Callback function for search change'),\n /**\n * Top Menu items array\n */\n topMenuItems: menuProps,\n /**\n * Bottom Menu items array\n */\n bottomMenuItems: menuProps,\n};\n\nDSGlobalHeader.displayName = 'DSGlobalHeader';\nconst DSGlobalHeaderWithSchema = describe(DSGlobalHeader);\nDSGlobalHeaderWithSchema.propTypes = props;\n\nexport { DSGlobalHeader, DSGlobalHeaderWithSchema };\n"],
|
|
5
5
|
"mappings":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hF,cAAc;AAAA;AAAA;AAAA;AAAA,EAId,iBAAiB;AACnB;AAEA,eAAe,cAAc;AAC7B,MAAM,2BAA2B,SAAS,cAAc;AACxD,yBAAyB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { PropTypes, describe } from "@elliemae/ds-props-helpers";
|
|
4
|
-
import { times } from "lodash";
|
|
4
|
+
import { times } from "lodash-es";
|
|
5
5
|
import { truncate, styled } from "@elliemae/ds-system";
|
|
6
6
|
import { Grid } from "@elliemae/ds-grid";
|
|
7
7
|
const Title = styled.h3`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/GroupBox/GroupBox.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { times } from 'lodash';\nimport { truncate, styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\n\nconst Title = styled.h3`\n font-size: 14px;\n margin: 0;\n ${truncate()}\n color: ${(props) => props.theme.colors.neutral['700']};\n line-height: inherit;\n text-transform: capitalize;\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n`;\n\nconst GroupBox = styled(Grid)`\n background: ${(props) =>\n props.background === 'grey' ? props.theme.colors.neutral['050'] : props.theme.colors.neutral['000']};\n\n border-top: ${(props) => (props.borderTop ? `1px solid ${props.theme.colors.neutral['100']}` : 'none')};\n`;\n\nconst DSGroupBox = ({ children, title, background = 'grey', headerLevel = 3, actionsRight = [], borderTop }) => {\n const rows = ['auto'];\n const hasActions = actionsRight.length > 0;\n if (hasActions) rows.push('auto');\n return (\n <Grid rows={['32px', 'auto']}>\n <GroupBox\n background={background}\n cols={rows}\n borderTop={borderTop}\n alignItems=\"center\"\n pl=\"xs\"\n pr={hasActions ? 'xxs' : 'xs'}\n >\n <Title as={`h${headerLevel}`}>{title}</Title>\n {hasActions && (\n <Grid cols={times(actionsRight.length, () => 'auto')} justifySelf=\"end\">\n {actionsRight}\n </Grid>\n )}\n </GroupBox>\n {children}\n </Grid>\n );\n};\n\nconst props = {\n /**\n * In-box children\n */\n children: PropTypes.element.description('In-box children'),\n /**\n * Title background\n */\n background: PropTypes.oneOf(['white', 'grey']).description('Title background'),\n /**\n * Toggle border top of group box\n */\n borderTop: PropTypes.bool.description('Toggle border top of group box'),\n /**\n * Group Box title\n */\n title: PropTypes.string.isRequired.description('Group Box title'),\n /**\n * semantic level of header tag for the title\n */\n headerLevel: PropTypes.oneOf([1, 2, 3, 4, 5, 6]).description('semantic level of header tag for the title'),\n /**\n * Array of button icons\n */\n actionsRight: PropTypes.arrayOf(PropTypes.element).description('Array of button icons'),\n};\n\nDSGroupBox.displayName = 'DSGroupBox';\nconst DSGroupBoxWithSchema = describe(DSGroupBox);\nDSGroupBoxWithSchema.propTypes = props;\n\nexport { DSGroupBox, DSGroupBoxWithSchema };\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { times } from 'lodash-es';\nimport { truncate, styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\n\nconst Title = styled.h3`\n font-size: 14px;\n margin: 0;\n ${truncate()}\n color: ${(props) => props.theme.colors.neutral['700']};\n line-height: inherit;\n text-transform: capitalize;\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n`;\n\nconst GroupBox = styled(Grid)`\n background: ${(props) =>\n props.background === 'grey' ? props.theme.colors.neutral['050'] : props.theme.colors.neutral['000']};\n\n border-top: ${(props) => (props.borderTop ? `1px solid ${props.theme.colors.neutral['100']}` : 'none')};\n`;\n\nconst DSGroupBox = ({ children, title, background = 'grey', headerLevel = 3, actionsRight = [], borderTop }) => {\n const rows = ['auto'];\n const hasActions = actionsRight.length > 0;\n if (hasActions) rows.push('auto');\n return (\n <Grid rows={['32px', 'auto']}>\n <GroupBox\n background={background}\n cols={rows}\n borderTop={borderTop}\n alignItems=\"center\"\n pl=\"xs\"\n pr={hasActions ? 'xxs' : 'xs'}\n >\n <Title as={`h${headerLevel}`}>{title}</Title>\n {hasActions && (\n <Grid cols={times(actionsRight.length, () => 'auto')} justifySelf=\"end\">\n {actionsRight}\n </Grid>\n )}\n </GroupBox>\n {children}\n </Grid>\n );\n};\n\nconst props = {\n /**\n * In-box children\n */\n children: PropTypes.element.description('In-box children'),\n /**\n * Title background\n */\n background: PropTypes.oneOf(['white', 'grey']).description('Title background'),\n /**\n * Toggle border top of group box\n */\n borderTop: PropTypes.bool.description('Toggle border top of group box'),\n /**\n * Group Box title\n */\n title: PropTypes.string.isRequired.description('Group Box title'),\n /**\n * semantic level of header tag for the title\n */\n headerLevel: PropTypes.oneOf([1, 2, 3, 4, 5, 6]).description('semantic level of header tag for the title'),\n /**\n * Array of button icons\n */\n actionsRight: PropTypes.arrayOf(PropTypes.element).description('Array of button icons'),\n};\n\nDSGroupBox.displayName = 'DSGroupBox';\nconst DSGroupBoxWithSchema = describe(DSGroupBox);\nDSGroupBoxWithSchema.propTypes = props;\n\nexport { DSGroupBox, DSGroupBoxWithSchema };\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;AC6BjB,SAQE,KARF;AA5BN,SAAS,WAAW,gBAAgB;AACpC,SAAS,aAAa;AACtB,SAAS,UAAU,cAAc;AACjC,SAAS,YAAY;AAErB,MAAM,QAAQ,OAAO;AAAA;AAAA;AAAA,IAGjB,SAAS,CAAC;AAAA,WACH,CAACA,WAAUA,OAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA,iBAGtC,CAACA,WAAUA,OAAM,MAAM,YAAY,QAAQ;AAAA;AAG5D,MAAM,WAAW,OAAO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AAE,YAAY,4CAA4C;AAAA;AAAA;AAAA;AAAA,EAIzG,cAAc,UAAU,QAAQ,UAAU,OAAO,EAAE,YAAY,uBAAuB;AACxF;AAEA,WAAW,cAAc;AACzB,MAAM,uBAAuB,SAAS,UAAU;AAChD,qBAAqB,YAAY;",
|
|
6
6
|
"names": ["props"]
|
|
7
7
|
}
|
|
@@ -3,7 +3,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import React2, { useRef, useState, useEffect } from "react";
|
|
4
4
|
import PropTypes from "prop-types";
|
|
5
5
|
import { withTheme, styled } from "@elliemae/ds-system";
|
|
6
|
-
import { get } from "lodash";
|
|
6
|
+
import { get } from "lodash-es";
|
|
7
7
|
import { DSBackdrop } from "@elliemae/ds-backdrop";
|
|
8
8
|
const LoadingPageLoader = styled.div`
|
|
9
9
|
${({ type }) => type === "cover" ? "position: fixed" : "position: absolute"};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/LoadingPage/Page.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useRef, useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { withTheme, styled } from '@elliemae/ds-system';\nimport { get } from 'lodash';\nimport { DSBackdrop } from '@elliemae/ds-backdrop';\n\nconst LoadingPageLoader = styled.div`\n ${({ type }) => (type === 'cover' ? 'position: fixed' : 'position: absolute')};\n\n z-index: ${(props) => props.zIndex || props.theme.zIndex.loader};\n top: 25%;\n left: 15%;\n width: 70%;\n height: 75%;\n display: flex;\n flex-direction: column;\n align-items: center;\n`;\n\nconst LoadingPage = ({ backdropZIndex, children, loader, loading, type = 'fill', zIndex }) => {\n const [position, setPosition] = useState(null);\n const childRef = useRef(null);\n useEffect(() => {\n if (childRef && childRef.current) {\n const style = childRef && window.getComputedStyle(childRef.current);\n setPosition(style.getPropertyValue('position'));\n }\n }, [childRef]);\n\n const Back = loading && <DSBackdrop type={type} zIndex={backdropZIndex} />;\n const Loader = loader && loading && (\n <LoadingPageLoader zIndex={zIndex} type={type} hide={!loading}>\n {loader}\n </LoadingPageLoader>\n );\n\n const injectRefPosition = (child) =>\n React.cloneElement(React.Children.only(child), {\n ref: childRef,\n children: React.Children.toArray(child.props.children).concat([Loader, Back]),\n style: {\n ...get(child, 'props.style', {}),\n position: position === 'static' ? 'relative' : position,\n },\n });\n\n if (React.Children.count(children) === 0) {\n return (\n <>\n {Loader}\n {Back}\n </>\n );\n }\n return injectRefPosition(children);\n};\n\nLoadingPage.propTypes = {\n /**\n * z-index of dimmer background\n */\n backdropZIndex: PropTypes.number,\n /**\n * Children page to show behind the loader\n */\n children: PropTypes.element,\n /**\n * Array of elements centrally aligned\n */\n loader: PropTypes.arrayOf(PropTypes.element),\n /**\n * Show / hide loader\n */\n loading: PropTypes.bool,\n /**\n * ['cover', 'fill']\n */\n type: PropTypes.oneOf(['fill', 'cover']),\n /**\n * z-index of loader, should be higher than the backdropZIndex\n */\n zIndex: PropTypes.number,\n};\n\nconst DSMobileLoadingPage = withTheme(LoadingPage);\n\nexport { DSMobileLoadingPage };\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useRef, useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { withTheme, styled } from '@elliemae/ds-system';\nimport { get } from 'lodash-es';\nimport { DSBackdrop } from '@elliemae/ds-backdrop';\n\nconst LoadingPageLoader = styled.div`\n ${({ type }) => (type === 'cover' ? 'position: fixed' : 'position: absolute')};\n\n z-index: ${(props) => props.zIndex || props.theme.zIndex.loader};\n top: 25%;\n left: 15%;\n width: 70%;\n height: 75%;\n display: flex;\n flex-direction: column;\n align-items: center;\n`;\n\nconst LoadingPage = ({ backdropZIndex, children, loader, loading, type = 'fill', zIndex }) => {\n const [position, setPosition] = useState(null);\n const childRef = useRef(null);\n useEffect(() => {\n if (childRef && childRef.current) {\n const style = childRef && window.getComputedStyle(childRef.current);\n setPosition(style.getPropertyValue('position'));\n }\n }, [childRef]);\n\n const Back = loading && <DSBackdrop type={type} zIndex={backdropZIndex} />;\n const Loader = loader && loading && (\n <LoadingPageLoader zIndex={zIndex} type={type} hide={!loading}>\n {loader}\n </LoadingPageLoader>\n );\n\n const injectRefPosition = (child) =>\n React.cloneElement(React.Children.only(child), {\n ref: childRef,\n children: React.Children.toArray(child.props.children).concat([Loader, Back]),\n style: {\n ...get(child, 'props.style', {}),\n position: position === 'static' ? 'relative' : position,\n },\n });\n\n if (React.Children.count(children) === 0) {\n return (\n <>\n {Loader}\n {Back}\n </>\n );\n }\n return injectRefPosition(children);\n};\n\nLoadingPage.propTypes = {\n /**\n * z-index of dimmer background\n */\n backdropZIndex: PropTypes.number,\n /**\n * Children page to show behind the loader\n */\n children: PropTypes.element,\n /**\n * Array of elements centrally aligned\n */\n loader: PropTypes.arrayOf(PropTypes.element),\n /**\n * Show / hide loader\n */\n loading: PropTypes.bool,\n /**\n * ['cover', 'fill']\n */\n type: PropTypes.oneOf(['fill', 'cover']),\n /**\n * z-index of loader, should be higher than the backdropZIndex\n */\n zIndex: PropTypes.number,\n};\n\nconst DSMobileLoadingPage = withTheme(LoadingPage);\n\nexport { DSMobileLoadingPage };\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;AC6BG,SAmBpB,UAnBoB,KAmBpB,YAnBoB;AA7B1B,OAAOA,UAAS,QAAQ,UAAU,iBAAiB;AACnD,OAAO,eAAe;AACtB,SAAS,WAAW,cAAc;AAClC,SAAS,WAAW;AACpB,SAAS,kBAAkB;AAE3B,MAAM,oBAAoB,OAAO;AAAA,IAC7B,CAAC,EAAE,KAAK,MAAO,SAAS,UAAU,oBAAoB,oBAAqB;AAAA;AAAA,aAElE,CAAC,UAAU,MAAM,UAAU,MAAM,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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AO,CAAC;AAAA;AAAA;AAAA;AAAA,EAIvC,QAAQ,UAAU;AACpB;AAEA,MAAM,sBAAsB,UAAU,WAAW;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import React2, { useState, useRef, useMemo } from "react";
|
|
4
|
-
import { noop } from "lodash";
|
|
4
|
+
import { noop } from "lodash-es";
|
|
5
5
|
import { describe, PropTypes } from "@elliemae/ds-props-helpers";
|
|
6
6
|
import { styled, truncate, withTheme } from "@elliemae/ds-system";
|
|
7
7
|
import { Grid } from "@elliemae/ds-grid";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileContextMenu/MobileContextMenu.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unsafe-argument, max-params */\n/* eslint-disable @typescript-eslint/ban-ts-comment, @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any */\n/* eslint-disable max-lines, complexity, @typescript-eslint/no-unsafe-call */\n/* eslint-disable no-unused-vars, @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-assignment */\n/* tslint:disable */\n// @ts-nocheck\n// What's with all the above disables?\n// this is what a legacy 7 year old codebase looks like.\n\nimport React, { useState, useRef, useMemo } from 'react';\nimport { noop } from 'lodash';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { styled, truncate, withTheme } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSBackdrop } from '@elliemae/ds-backdrop';\nimport { Group } from '@elliemae/ds-shared';\nimport { DSMobileContextMenuGroup as ContextMenuGroup } from './MobileContextMenuGroup.js';\n\nconst StyledContainer = styled(Grid)`\n background: ${(props) => props.theme.colors.neutral['000']};\n z-index: ${(props) => props.zIndex};\n width: ${(props) => `calc(100% - ${props.theme.space.xs})`};\n position: fixed;\n bottom: 0;\n left: ${(props) => props.theme.space.xxs};\n max-height: 90vh;\n border-top-left-radius: 5px;\n border-top-right-radius: 5px;\n box-shadow:\n 0 0px 24px 0 rgba(0, 0, 0, 0.5),\n 0 0px 11px 0 rgba(0, 0, 0, 0.5);\n`;\n\nconst StyledTitle = styled(Grid)`\n font-size: 16px;\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n color: ${(props) => props.theme.colors.neutral['000']};\n ${truncate()}\n\n & > span {\n height: 20px;\n width: 20px;\n }\n\n & > span > svg,\n svg:not([fill]) {\n height: 20px;\n width: 20px;\n fill: ${(props) => props.theme.colors.neutral['000']};\n }\n`;\n\nconst HeaderContainer = styled(Grid)`\n border-top-left-radius: 5px;\n border-top-right-radius: 5px;\n background: ${(props) => props.theme.colors.brand['600']};\n`;\n\nconst isArr = (prop) => Array.isArray(prop);\n\nconst DSMobileContextMenu = withTheme(\n ({\n open = false,\n title = '',\n multiple = false,\n singleSelect = false,\n onChange = noop,\n onClickOutside = noop,\n children,\n theme,\n backdropZIndex = 1000,\n zIndex = 1001,\n dataTestid = 'mobile-context-menu',\n buttonFooter: ButtonFooter = null,\n onApply = noop,\n selecteds: initSelecteds,\n onKeyDown,\n }) => {\n const [selectedItems, setSelectedItems] = useState([]);\n const trueSelected = useMemo(\n () => (initSelecteds !== undefined ? initSelecteds : [...selectedItems]),\n [initSelecteds, selectedItems],\n );\n const containerRef = useRef(null);\n const handleChange = (value, childProps, event) => {\n onChange(value, childProps, event);\n if (initSelecteds === undefined) {\n if (multiple) setSelectedItems([...value]);\n else if (singleSelect) setSelectedItems(value);\n }\n };\n\n // this function is a mess, it is using \"this\" and invoking the onClick binded,\n // it was somehow working based on handleApply.bind(ButtonFooter.props)\n // which is arguably black magic\n // Converted to arrow function and converted \"this\" to ButtonFooter?.props\n const handleApply = (e) => {\n if (ButtonFooter?.props?.onClick) ButtonFooter?.props?.onClick?.(e);\n onApply(e, selectedItems);\n };\n\n const rows = [theme.space.s, 1];\n\n const footerProps = {\n containerProps: {\n 'data-testid': `${dataTestid}--btn`,\n },\n buttonType: 'primary',\n size: 'l',\n // keeping the binding for legacy code just in case, I have no idea what the intent was here,\n // composition based render-function will have no need for the binding, so only doing the binding for the React.cloneElement scenario\n onClick: (ButtonFooter?.props ?? false) === false ? handleApply : handleApply.bind(ButtonFooter.props),\n };\n if (ButtonFooter) rows.push('56px');\n\n if (!open) return null;\n\n return (\n <>\n <DSBackdrop\n type=\"cover\"\n zIndex={backdropZIndex}\n onClick={(e) => {\n // PUI-4481 prevent click on elements below backdrop\n e.stopPropagation();\n onClickOutside(e);\n }}\n />\n <StyledContainer\n zIndex={zIndex}\n rows={rows}\n innerRef={containerRef}\n data-testid=\"ds-mobile-context-menu\"\n onKeyDown={onKeyDown}\n >\n <HeaderContainer justifyContent=\"center\" alignItems=\"center\" pl=\"xs\" pr=\"xs\">\n <StyledTitle alignItems=\"center\" gutter=\"xxs\" cols={Array(isArr(title) ? title.length : 1).fill('auto')}>\n {title}\n </StyledTitle>\n </HeaderContainer>\n <Grid style={{ overflow: 'hidden' }}>\n <Grid style={{ overflow: 'auto' }}>\n <Group activeValue={trueSelected} multiple={multiple} onChange={handleChange}>\n {React.Children.map(children, (child, ii) => {\n const isGroup =\n child.type === (<ContextMenuGroup />).type ||\n child.type?.name === ContextMenuGroup.componentType ||\n child.type === ContextMenuGroup.type;\n const { onClick = noop } = child.props;\n const value = ii;\n let isSelected;\n if (singleSelect) isSelected = trueSelected === value;\n else if (multiple) isSelected = trueSelected.includes(value);\n return React.cloneElement(child, {\n value,\n // eslint-disable-next-line react/no-array-index-key\n key: `cm.${ii}`,\n isMulti: multiple,\n singleSelect,\n isSelected,\n onClick: !isGroup ? (e) => onClick(e, child.props) : null,\n selectedItems: isGroup ? trueSelected : null,\n });\n })}\n </Group>\n </Grid>\n </Grid>\n {ButtonFooter ? (\n <Grid pl=\"xs\" pr=\"xs\" alignItems=\"center\">\n {React.isValidElement(ButtonFooter) ? (\n React.cloneElement(ButtonFooter, footerProps)\n ) : (\n <ButtonFooter {...footerProps} />\n )}\n </Grid>\n ) : null}\n </StyledContainer>\n </>\n );\n },\n);\n\nconst props = {\n /** toggle open the menu */\n open: PropTypes.bool.description('toggle open the menu'),\n /** context menu title */\n title: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.node])),\n ]).description('context menu title'),\n /** change handler for selectable context menu */\n onChange: PropTypes.func.description('change handler for selectable context menu'),\n /** multi select */\n multiple: PropTypes.bool.description('multi select'),\n /** click outside callback handler */\n onClickOutside: PropTypes.func.description('click outside callback handler'),\n /** array of mobile context menu items */\n children: PropTypes.arrayOf(PropTypes.element).description('array of mobile context menu items'),\n /** z index for overlay div */\n backdropZIndex: PropTypes.number.description('z index for overlay div'),\n /** z index for menu container */\n zIndex: PropTypes.number.description('z index for menu container'),\n /** for e2e tests */\n dataTestid: PropTypes.string.description('for e2e tests'),\n /** bottom button */\n buttonFooter: PropTypes.element.description('bottom button'),\n /** callback */\n onApply: PropTypes.func.description('callback'),\n /** selected elements for multi and single select */\n selecteds: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),\n PropTypes.number,\n ]).description('selected elements for multi and single select'),\n onKeyDown: PropTypes.func.description('onKeyDown'),\n};\n\nDSMobileContextMenu.displayName = 'DSMobileContextMenu';\nconst DSMobileContextMenuWithSchema = describe(DSMobileContextMenu);\n\nDSMobileContextMenuWithSchema.propTypes = props;\n\nexport { DSMobileContextMenu, DSMobileContextMenuWithSchema };\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unsafe-argument, max-params */\n/* eslint-disable @typescript-eslint/ban-ts-comment, @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any */\n/* eslint-disable max-lines, complexity, @typescript-eslint/no-unsafe-call */\n/* eslint-disable no-unused-vars, @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-assignment */\n/* tslint:disable */\n// @ts-nocheck\n// What's with all the above disables?\n// this is what a legacy 7 year old codebase looks like.\n\nimport React, { useState, useRef, useMemo } from 'react';\nimport { noop } from 'lodash-es';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { styled, truncate, withTheme } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSBackdrop } from '@elliemae/ds-backdrop';\nimport { Group } from '@elliemae/ds-shared';\nimport { DSMobileContextMenuGroup as ContextMenuGroup } from './MobileContextMenuGroup.js';\n\nconst StyledContainer = styled(Grid)`\n background: ${(props) => props.theme.colors.neutral['000']};\n z-index: ${(props) => props.zIndex};\n width: ${(props) => `calc(100% - ${props.theme.space.xs})`};\n position: fixed;\n bottom: 0;\n left: ${(props) => props.theme.space.xxs};\n max-height: 90vh;\n border-top-left-radius: 5px;\n border-top-right-radius: 5px;\n box-shadow:\n 0 0px 24px 0 rgba(0, 0, 0, 0.5),\n 0 0px 11px 0 rgba(0, 0, 0, 0.5);\n`;\n\nconst StyledTitle = styled(Grid)`\n font-size: 16px;\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n color: ${(props) => props.theme.colors.neutral['000']};\n ${truncate()}\n\n & > span {\n height: 20px;\n width: 20px;\n }\n\n & > span > svg,\n svg:not([fill]) {\n height: 20px;\n width: 20px;\n fill: ${(props) => props.theme.colors.neutral['000']};\n }\n`;\n\nconst HeaderContainer = styled(Grid)`\n border-top-left-radius: 5px;\n border-top-right-radius: 5px;\n background: ${(props) => props.theme.colors.brand['600']};\n`;\n\nconst isArr = (prop) => Array.isArray(prop);\n\nconst DSMobileContextMenu = withTheme(\n ({\n open = false,\n title = '',\n multiple = false,\n singleSelect = false,\n onChange = noop,\n onClickOutside = noop,\n children,\n theme,\n backdropZIndex = 1000,\n zIndex = 1001,\n dataTestid = 'mobile-context-menu',\n buttonFooter: ButtonFooter = null,\n onApply = noop,\n selecteds: initSelecteds,\n onKeyDown,\n }) => {\n const [selectedItems, setSelectedItems] = useState([]);\n const trueSelected = useMemo(\n () => (initSelecteds !== undefined ? initSelecteds : [...selectedItems]),\n [initSelecteds, selectedItems],\n );\n const containerRef = useRef(null);\n const handleChange = (value, childProps, event) => {\n onChange(value, childProps, event);\n if (initSelecteds === undefined) {\n if (multiple) setSelectedItems([...value]);\n else if (singleSelect) setSelectedItems(value);\n }\n };\n\n // this function is a mess, it is using \"this\" and invoking the onClick binded,\n // it was somehow working based on handleApply.bind(ButtonFooter.props)\n // which is arguably black magic\n // Converted to arrow function and converted \"this\" to ButtonFooter?.props\n const handleApply = (e) => {\n if (ButtonFooter?.props?.onClick) ButtonFooter?.props?.onClick?.(e);\n onApply(e, selectedItems);\n };\n\n const rows = [theme.space.s, 1];\n\n const footerProps = {\n containerProps: {\n 'data-testid': `${dataTestid}--btn`,\n },\n buttonType: 'primary',\n size: 'l',\n // keeping the binding for legacy code just in case, I have no idea what the intent was here,\n // composition based render-function will have no need for the binding, so only doing the binding for the React.cloneElement scenario\n onClick: (ButtonFooter?.props ?? false) === false ? handleApply : handleApply.bind(ButtonFooter.props),\n };\n if (ButtonFooter) rows.push('56px');\n\n if (!open) return null;\n\n return (\n <>\n <DSBackdrop\n type=\"cover\"\n zIndex={backdropZIndex}\n onClick={(e) => {\n // PUI-4481 prevent click on elements below backdrop\n e.stopPropagation();\n onClickOutside(e);\n }}\n />\n <StyledContainer\n zIndex={zIndex}\n rows={rows}\n innerRef={containerRef}\n data-testid=\"ds-mobile-context-menu\"\n onKeyDown={onKeyDown}\n >\n <HeaderContainer justifyContent=\"center\" alignItems=\"center\" pl=\"xs\" pr=\"xs\">\n <StyledTitle alignItems=\"center\" gutter=\"xxs\" cols={Array(isArr(title) ? title.length : 1).fill('auto')}>\n {title}\n </StyledTitle>\n </HeaderContainer>\n <Grid style={{ overflow: 'hidden' }}>\n <Grid style={{ overflow: 'auto' }}>\n <Group activeValue={trueSelected} multiple={multiple} onChange={handleChange}>\n {React.Children.map(children, (child, ii) => {\n const isGroup =\n child.type === (<ContextMenuGroup />).type ||\n child.type?.name === ContextMenuGroup.componentType ||\n child.type === ContextMenuGroup.type;\n const { onClick = noop } = child.props;\n const value = ii;\n let isSelected;\n if (singleSelect) isSelected = trueSelected === value;\n else if (multiple) isSelected = trueSelected.includes(value);\n return React.cloneElement(child, {\n value,\n // eslint-disable-next-line react/no-array-index-key\n key: `cm.${ii}`,\n isMulti: multiple,\n singleSelect,\n isSelected,\n onClick: !isGroup ? (e) => onClick(e, child.props) : null,\n selectedItems: isGroup ? trueSelected : null,\n });\n })}\n </Group>\n </Grid>\n </Grid>\n {ButtonFooter ? (\n <Grid pl=\"xs\" pr=\"xs\" alignItems=\"center\">\n {React.isValidElement(ButtonFooter) ? (\n React.cloneElement(ButtonFooter, footerProps)\n ) : (\n <ButtonFooter {...footerProps} />\n )}\n </Grid>\n ) : null}\n </StyledContainer>\n </>\n );\n },\n);\n\nconst props = {\n /** toggle open the menu */\n open: PropTypes.bool.description('toggle open the menu'),\n /** context menu title */\n title: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.node])),\n ]).description('context menu title'),\n /** change handler for selectable context menu */\n onChange: PropTypes.func.description('change handler for selectable context menu'),\n /** multi select */\n multiple: PropTypes.bool.description('multi select'),\n /** click outside callback handler */\n onClickOutside: PropTypes.func.description('click outside callback handler'),\n /** array of mobile context menu items */\n children: PropTypes.arrayOf(PropTypes.element).description('array of mobile context menu items'),\n /** z index for overlay div */\n backdropZIndex: PropTypes.number.description('z index for overlay div'),\n /** z index for menu container */\n zIndex: PropTypes.number.description('z index for menu container'),\n /** for e2e tests */\n dataTestid: PropTypes.string.description('for e2e tests'),\n /** bottom button */\n buttonFooter: PropTypes.element.description('bottom button'),\n /** callback */\n onApply: PropTypes.func.description('callback'),\n /** selected elements for multi and single select */\n selecteds: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),\n PropTypes.number,\n ]).description('selected elements for multi and single select'),\n onKeyDown: PropTypes.func.description('onKeyDown'),\n};\n\nDSMobileContextMenu.displayName = 'DSMobileContextMenu';\nconst DSMobileContextMenuWithSchema = describe(DSMobileContextMenu);\n\nDSMobileContextMenuWithSchema.propTypes = props;\n\nexport { DSMobileContextMenu, DSMobileContextMenuWithSchema };\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACuHjB,mBACE,KASA,YAVF;AA7GN,OAAOA,UAAS,UAAU,QAAQ,eAAe;AACjD,SAAS,YAAY;AACrB,SAAS,UAAU,iBAAiB;AACpC,SAAS,QAAQ,UAAU,iBAAiB;AAC5C,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAC3B,SAAS,aAAa;AACtB,SAAS,4BAA4B,wBAAwB;AAE7D,MAAM,kBAAkB,OAAO,IAAI;AAAA,gBACnB,CAACC,WAAUA,OAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,aAC/C,CAACA,WAAUA,OAAM,MAAM;AAAA,WACzB,CAACA,WAAU,eAAeA,OAAM,MAAM,MAAM,EAAE,GAAG;AAAA;AAAA;AAAA,UAGlD,CAACA,WAAUA,OAAM,MAAM,MAAM,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS1C,MAAM,cAAc,OAAO,IAAI;AAAA;AAAA,iBAEd,CAACA,WAAUA,OAAM,MAAM,YAAY,QAAQ;AAAA,WACjD,CAACA,WAAUA,OAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,IACnD,SAAS,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAWF,CAACA,WAA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AAA,EACZ,CAAC,EAAE,YAAY,+CAA+C;AAAA,EAC9D,WAAW,UAAU,KAAK,YAAY,WAAW;AACnD;AAEA,oBAAoB,cAAc;AAClC,MAAM,gCAAgC,SAAS,mBAAmB;AAElE,8BAA8B,YAAY;",
|
|
6
6
|
"names": ["React", "props"]
|
|
7
7
|
}
|
|
@@ -3,7 +3,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import React2 from "react";
|
|
4
4
|
import { styled } from "@elliemae/ds-system";
|
|
5
5
|
import { Grid } from "@elliemae/ds-grid";
|
|
6
|
-
import { noop } from "lodash";
|
|
6
|
+
import { noop } from "lodash-es";
|
|
7
7
|
import { PropTypes, describe } from "@elliemae/ds-props-helpers";
|
|
8
8
|
const Title = styled.div`
|
|
9
9
|
height: 24px;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileContextMenu/MobileContextMenuGroup.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { noop } from 'lodash';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\n\nconst Title = styled.div`\n height: 24px;\n line-height: 24px;\n font-size: 12px;\n border-top: 1px solid ${(props) => props.theme.colors.brand['300']};\n background: ${(props) => props.theme.colors.brand['200']};\n padding: 0 ${(props) => props.theme.space.xs};\n color: ${(props) => props.theme.colors.neutral['700']};\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n`;\n\nconst DSMobileContextMenuGroup = ({ title, isMulti, singleSelect, children, value: groupValue, selectedItems }) => (\n <Grid>\n <Grid>\n <Title>{title}</Title>\n </Grid>\n <Grid>\n {React.Children.map(children, (child, index) => {\n const { onClick = noop } = child.props;\n const value = `${groupValue}:${index}`;\n let isSelected;\n if (singleSelect) isSelected = selectedItems === value;\n else if (isMulti) isSelected = selectedItems.includes(value);\n return React.cloneElement(child, {\n value,\n key: 'group.'.concat(index),\n isGroup: true,\n isMulti,\n singleSelect,\n isSelected,\n onClick: (e) => onClick(e, { value, ...child.props }),\n });\n })}\n </Grid>\n </Grid>\n);\n\nconst props = {\n /**\n * Group title\n */\n title: PropTypes.string.isRequired.description('group title'),\n /**\n * Array of MobileContextMenuItem\n */\n children: PropTypes.node.isRequired.description('Array of MobileContextMenuItem'),\n /** multi select */\n isMulti: PropTypes.bool.description('multi select'),\n /** single select */\n singleSelect: PropTypes.bool.description('single select'),\n /** value for select */\n value: PropTypes.string.description('value for select'),\n /** selected items, array for multi, string for single */\n selectedItems: PropTypes.oneOfType([PropTypes.array, PropTypes.string]).description(\n 'selected items, array for multi, string for single',\n ),\n};\n\nDSMobileContextMenuGroup.componentType = 'DSMobileContextMenuGroup';\nDSMobileContextMenuGroup.displayName = 'DSMobileContextMenuGroup';\nconst DSMobileContextMenuGroupWithSchema = describe(DSMobileContextMenuGroup);\n\nDSMobileContextMenuGroupWithSchema.propTypes = props;\n\nexport { DSMobileContextMenuGroup, DSMobileContextMenuGroupWithSchema };\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { noop } from 'lodash-es';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\n\nconst Title = styled.div`\n height: 24px;\n line-height: 24px;\n font-size: 12px;\n border-top: 1px solid ${(props) => props.theme.colors.brand['300']};\n background: ${(props) => props.theme.colors.brand['200']};\n padding: 0 ${(props) => props.theme.space.xs};\n color: ${(props) => props.theme.colors.neutral['700']};\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n`;\n\nconst DSMobileContextMenuGroup = ({ title, isMulti, singleSelect, children, value: groupValue, selectedItems }) => (\n <Grid>\n <Grid>\n <Title>{title}</Title>\n </Grid>\n <Grid>\n {React.Children.map(children, (child, index) => {\n const { onClick = noop } = child.props;\n const value = `${groupValue}:${index}`;\n let isSelected;\n if (singleSelect) isSelected = selectedItems === value;\n else if (isMulti) isSelected = selectedItems.includes(value);\n return React.cloneElement(child, {\n value,\n key: 'group.'.concat(index),\n isGroup: true,\n isMulti,\n singleSelect,\n isSelected,\n onClick: (e) => onClick(e, { value, ...child.props }),\n });\n })}\n </Grid>\n </Grid>\n);\n\nconst props = {\n /**\n * Group title\n */\n title: PropTypes.string.isRequired.description('group title'),\n /**\n * Array of MobileContextMenuItem\n */\n children: PropTypes.node.isRequired.description('Array of MobileContextMenuItem'),\n /** multi select */\n isMulti: PropTypes.bool.description('multi select'),\n /** single select */\n singleSelect: PropTypes.bool.description('single select'),\n /** value for select */\n value: PropTypes.string.description('value for select'),\n /** selected items, array for multi, string for single */\n selectedItems: PropTypes.oneOfType([PropTypes.array, PropTypes.string]).description(\n 'selected items, array for multi, string for single',\n ),\n};\n\nDSMobileContextMenuGroup.componentType = 'DSMobileContextMenuGroup';\nDSMobileContextMenuGroup.displayName = 'DSMobileContextMenuGroup';\nconst DSMobileContextMenuGroupWithSchema = describe(DSMobileContextMenuGroup);\n\nDSMobileContextMenuGroupWithSchema.propTypes = props;\n\nexport { DSMobileContextMenuGroup, DSMobileContextMenuGroupWithSchema };\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACkBrB,SAEI,KAFJ;AAlBF,OAAOA,YAAW;AAClB,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,SAAS,WAAW,gBAAgB;AAEpC,MAAM,QAAQ,OAAO;AAAA;AAAA;AAAA;AAAA,0BAIK,CAACC,WAAUA,OAAM,MAAM,OAAO,MAAM,KAAK,CAAC;AAAA,gBACpD,CAACA,WAAUA,OAAM,MAAM,OAAO,MAAM,KAAK,CAAC;AAAA,eAC3C,CAACA,WAAUA,OAAM,MAAM,MAAM,EAAE;AAAA,WACnC,CAACA,WAAUA,OAAM,M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CAAmC,YAAY;",
|
|
6
6
|
"names": ["React", "props"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import React2, { useState, useEffect } from "react";
|
|
4
|
-
import { noop } from "lodash";
|
|
4
|
+
import { noop } from "lodash-es";
|
|
5
5
|
import PropTypes from "prop-types";
|
|
6
6
|
import { Grid } from "@elliemae/ds-grid";
|
|
7
7
|
import { DSTextBox } from "@elliemae/ds-form";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileSelectList/MobileSelectList.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint react/jsx-no-bind:0 react/no-this-in-sfc:0 */\nimport React, { useState, useEffect } from 'react';\nimport { noop } from 'lodash';\nimport PropTypes from 'prop-types';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSTextBox } from '@elliemae/ds-form';\nimport { op, withTheme, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport { DSMobileTouchable } from '../MobileTouchable/index.js';\nimport { StyledContainer, HeaderContainer, Footer, ListContainer, checkbox, checked, selectedMark } from './styled.js';\n\nconst MobileSelectList = ({\n open = false,\n header = null,\n multiple = false,\n onChange = noop,\n children,\n theme,\n zIndex = 1,\n useSearch,\n onSearch = noop,\n dataTestid = 'mobile-select-list',\n buttonFooter = null,\n ButtonFooter,\n onApply = noop,\n selecteds: initSelecteds = [],\n}) => {\n const rows = ['auto', 1];\n const [selecteds, setSelected] = useState(initSelecteds);\n const [filter, setFilter] = useState('');\n useEffect(() => {\n setSelected(initSelecteds);\n }, [initSelecteds]);\n\n const handleSelection = (value) => {\n if (multiple) {\n const index = selecteds.findIndex((s) => s === value);\n if (index > -1) setSelected(selecteds.filter((s) => s !== value));\n else setSelected([...selecteds, value]);\n } else setSelected([value]);\n };\n const handleChange = function (event) {\n onChange(event, this);\n handleSelection(this.value);\n };\n const handleOnSearch = (e) => {\n setFilter(e.target.value);\n onSearch(e);\n };\n\n const handleApply = function (e) {\n if (this.onClick) this.onClick(e);\n onApply(e, selecteds);\n };\n if (buttonFooter || ButtonFooter) rows.push(op('*', __UNSAFE_SPACE_TO_DIMSUM(theme.space.xl), 1.16666));\n if (!open) return null;\n return (\n <StyledContainer data-testid={dataTestid} rows={rows} zIndex={zIndex}>\n <HeaderContainer>\n {header}\n {useSearch && (\n <Grid\n alignItems=\"center\"\n height={__UNSAFE_SPACE_TO_DIMSUM(theme.space.xl)}\n pl={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}\n pr={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}\n >\n <DSTextBox onChange={handleOnSearch} placeholder=\"Filter by name\" value={filter} />\n </Grid>\n )}\n </HeaderContainer>\n <Grid style={{ overflow: 'hidden' }}>\n <Grid style={{ overflow: 'auto' }}>\n <ListContainer data-testid={`${dataTestid}--list-container`}>\n {React.Children.map(children, (child) => {\n let leftAddon = null;\n let rightAddon = null;\n const { value, title } = child.props;\n const found = selecteds.findIndex((s) => String(s) === String(value));\n if (\n filter &&\n !String(value).toLocaleLowerCase().includes(filter.toLocaleLowerCase()) &&\n !String(title).toLocaleLowerCase().includes(filter.toLocaleLowerCase())\n )\n return null;\n if (multiple) {\n if (found > -1) leftAddon = checked;\n else leftAddon = checkbox;\n } else if (found > -1) {\n rightAddon = selectedMark;\n }\n return (\n <DSMobileTouchable onClick={handleChange.bind(child.props)}>\n {React.cloneElement(child, { leftAddon, rightAddon })}\n </DSMobileTouchable>\n );\n })}\n </ListContainer>\n </Grid>\n </Grid>\n {ButtonFooter || Boolean(buttonFooter) ? (\n <Footer\n alignItems=\"center\"\n // eslint-disable-next-line max-lines\n pl={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}\n pr={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}\n >\n {!ButtonFooter ? (\n React.cloneElement(buttonFooter, {\n ...buttonFooter.props,\n containerProps: {\n 'data-testid': `${dataTestid}--btn`,\n },\n buttonType: 'primary',\n size: 'l',\n onClick: handleApply.bind(buttonFooter.props),\n })\n ) : (\n <ButtonFooter\n containerProps={{\n 'data-testid': `${dataTestid}--btn`,\n }}\n buttonType=\"primary\"\n size=\"l\"\n onClick={handleApply}\n />\n )}\n </Footer>\n ) : null}\n </StyledContainer>\n );\n};\n\nconst DSMobileSelectList = withTheme(MobileSelectList);\n\nMobileSelectList.propTypes = {\n /** show select list */\n open: PropTypes.bool,\n /** DSMobilePageHeader instance */\n header: PropTypes.element,\n /** called when a DSMobileListItem is touched */\n onChange: PropTypes.func,\n /** allow multiple selection */\n multiple: PropTypes.bool,\n /** Array of DSMobileListItem instances */\n children: PropTypes.arrayOf(PropTypes.element),\n /** data test id for testing purposes */\n dataTestid: PropTypes.string,\n /** footer action, DSButton instance */\n buttonFooter: PropTypes.element,\n /** footer action, DSButton instance */\n ButtonFooter: PropTypes.func,\n /** called when footer action is triggered */\n onApply: PropTypes.func,\n /** zIndex */\n zIndex: PropTypes.number,\n /** init selecteds */\n selecteds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),\n theme: PropTypes.object.isRequired,\n useSearch: PropTypes.bool,\n onSearch: PropTypes.func,\n};\n\nexport { DSMobileSelectList };\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint react/jsx-no-bind:0 react/no-this-in-sfc:0 */\nimport React, { useState, useEffect } from 'react';\nimport { noop } from 'lodash-es';\nimport PropTypes from 'prop-types';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSTextBox } from '@elliemae/ds-form';\nimport { op, withTheme, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport { DSMobileTouchable } from '../MobileTouchable/index.js';\nimport { StyledContainer, HeaderContainer, Footer, ListContainer, checkbox, checked, selectedMark } from './styled.js';\n\nconst MobileSelectList = ({\n open = false,\n header = null,\n multiple = false,\n onChange = noop,\n children,\n theme,\n zIndex = 1,\n useSearch,\n onSearch = noop,\n dataTestid = 'mobile-select-list',\n buttonFooter = null,\n ButtonFooter,\n onApply = noop,\n selecteds: initSelecteds = [],\n}) => {\n const rows = ['auto', 1];\n const [selecteds, setSelected] = useState(initSelecteds);\n const [filter, setFilter] = useState('');\n useEffect(() => {\n setSelected(initSelecteds);\n }, [initSelecteds]);\n\n const handleSelection = (value) => {\n if (multiple) {\n const index = selecteds.findIndex((s) => s === value);\n if (index > -1) setSelected(selecteds.filter((s) => s !== value));\n else setSelected([...selecteds, value]);\n } else setSelected([value]);\n };\n const handleChange = function (event) {\n onChange(event, this);\n handleSelection(this.value);\n };\n const handleOnSearch = (e) => {\n setFilter(e.target.value);\n onSearch(e);\n };\n\n const handleApply = function (e) {\n if (this.onClick) this.onClick(e);\n onApply(e, selecteds);\n };\n if (buttonFooter || ButtonFooter) rows.push(op('*', __UNSAFE_SPACE_TO_DIMSUM(theme.space.xl), 1.16666));\n if (!open) return null;\n return (\n <StyledContainer data-testid={dataTestid} rows={rows} zIndex={zIndex}>\n <HeaderContainer>\n {header}\n {useSearch && (\n <Grid\n alignItems=\"center\"\n height={__UNSAFE_SPACE_TO_DIMSUM(theme.space.xl)}\n pl={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}\n pr={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}\n >\n <DSTextBox onChange={handleOnSearch} placeholder=\"Filter by name\" value={filter} />\n </Grid>\n )}\n </HeaderContainer>\n <Grid style={{ overflow: 'hidden' }}>\n <Grid style={{ overflow: 'auto' }}>\n <ListContainer data-testid={`${dataTestid}--list-container`}>\n {React.Children.map(children, (child) => {\n let leftAddon = null;\n let rightAddon = null;\n const { value, title } = child.props;\n const found = selecteds.findIndex((s) => String(s) === String(value));\n if (\n filter &&\n !String(value).toLocaleLowerCase().includes(filter.toLocaleLowerCase()) &&\n !String(title).toLocaleLowerCase().includes(filter.toLocaleLowerCase())\n )\n return null;\n if (multiple) {\n if (found > -1) leftAddon = checked;\n else leftAddon = checkbox;\n } else if (found > -1) {\n rightAddon = selectedMark;\n }\n return (\n <DSMobileTouchable onClick={handleChange.bind(child.props)}>\n {React.cloneElement(child, { leftAddon, rightAddon })}\n </DSMobileTouchable>\n );\n })}\n </ListContainer>\n </Grid>\n </Grid>\n {ButtonFooter || Boolean(buttonFooter) ? (\n <Footer\n alignItems=\"center\"\n // eslint-disable-next-line max-lines\n pl={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}\n pr={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}\n >\n {!ButtonFooter ? (\n React.cloneElement(buttonFooter, {\n ...buttonFooter.props,\n containerProps: {\n 'data-testid': `${dataTestid}--btn`,\n },\n buttonType: 'primary',\n size: 'l',\n onClick: handleApply.bind(buttonFooter.props),\n })\n ) : (\n <ButtonFooter\n containerProps={{\n 'data-testid': `${dataTestid}--btn`,\n }}\n buttonType=\"primary\"\n size=\"l\"\n onClick={handleApply}\n />\n )}\n </Footer>\n ) : null}\n </StyledContainer>\n );\n};\n\nconst DSMobileSelectList = withTheme(MobileSelectList);\n\nMobileSelectList.propTypes = {\n /** show select list */\n open: PropTypes.bool,\n /** DSMobilePageHeader instance */\n header: PropTypes.element,\n /** called when a DSMobileListItem is touched */\n onChange: PropTypes.func,\n /** allow multiple selection */\n multiple: PropTypes.bool,\n /** Array of DSMobileListItem instances */\n children: PropTypes.arrayOf(PropTypes.element),\n /** data test id for testing purposes */\n dataTestid: PropTypes.string,\n /** footer action, DSButton instance */\n buttonFooter: PropTypes.element,\n /** footer action, DSButton instance */\n ButtonFooter: PropTypes.func,\n /** called when footer action is triggered */\n onApply: PropTypes.func,\n /** zIndex */\n zIndex: PropTypes.number,\n /** init selecteds */\n selecteds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),\n theme: PropT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UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,CAAC;AAAA,EACtF,OAAO,UAAU,OAAO;AAAA,EACxB,WAAW,UAAU;AAAA,EACrB,UAAU,UAAU;AACtB;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { noop } from "lodash";
|
|
3
|
+
import { noop } from "lodash-es";
|
|
4
4
|
import { styled, border } from "@elliemae/ds-system";
|
|
5
5
|
import { Grid } from "@elliemae/ds-grid";
|
|
6
6
|
import { DSCheckbox } from "@elliemae/ds-form";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileSelectList/styled.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { noop } from 'lodash';\nimport { styled, border } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSCheckbox } from '@elliemae/ds-form';\nimport { Checkmark } from '@elliemae/ds-icons';\nimport { DSMobileTouchable } from '../MobileTouchable/index.js';\nimport { DSMobileListItem } from '../MobileListItem/index.js';\n\nexport const StyledContainer = styled(Grid)`\n background: ${(props) => props.theme.colors.neutral['000']};\n z-index: ${(props) => props.zIndex};\n position: fixed;\n width: 100%;\n top: 0;\n left: 0;\n right: 0;\n height: 100%;\n`;\n\nexport const HeaderContainer = styled(Grid)`\n border-bottom: ${(props) => border(props.theme.colors.neutral['300'])};\n`;\n\nexport const Footer = styled(Grid)`\n border-top: ${(props) => border(props.theme.colors.neutral['300'])};\n`;\n\nexport const ListContainer = styled.div`\n & ${DSMobileTouchable}:last-child ${DSMobileListItem} {\n border: none;\n }\n`;\n\nexport const checkbox = <DSCheckbox checked={false} onChange={noop} style={{ pointerEvents: 'none' }} />;\nexport const checked = <DSCheckbox checked onChange={noop} style={{ pointerEvents: 'none' }} />;\nexport const selectedMark = <Checkmark color={['brand-primary', 600]} />;\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { noop } from 'lodash-es';\nimport { styled, border } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSCheckbox } from '@elliemae/ds-form';\nimport { Checkmark } from '@elliemae/ds-icons';\nimport { DSMobileTouchable } from '../MobileTouchable/index.js';\nimport { DSMobileListItem } from '../MobileListItem/index.js';\n\nexport const StyledContainer = styled(Grid)`\n background: ${(props) => props.theme.colors.neutral['000']};\n z-index: ${(props) => props.zIndex};\n position: fixed;\n width: 100%;\n top: 0;\n left: 0;\n right: 0;\n height: 100%;\n`;\n\nexport const HeaderContainer = styled(Grid)`\n border-bottom: ${(props) => border(props.theme.colors.neutral['300'])};\n`;\n\nexport const Footer = styled(Grid)`\n border-top: ${(props) => border(props.theme.colors.neutral['300'])};\n`;\n\nexport const ListContainer = styled.div`\n & ${DSMobileTouchable}:last-child ${DSMobileListItem} {\n border: none;\n }\n`;\n\nexport const checkbox = <DSCheckbox checked={false} onChange={noop} style={{ pointerEvents: 'none' }} />;\nexport const checked = <DSCheckbox checked onChange={noop} style={{ pointerEvents: 'none' }} />;\nexport const selectedMark = <Checkmark color={['brand-primary', 600]} />;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACkCC;AAjCxB,SAAS,YAAY;AACrB,SAAS,QAAQ,cAAc;AAC/B,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAC1B,SAAS,yBAAyB;AAClC,SAAS,wBAAwB;AAE1B,MAAM,kBAAkB,OAAO,IAAI;AAAA,gBAC1B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,aAC/C,CAAC,UAAU,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS7B,MAAM,kBAAkB,OAAO,IAAI;AAAA,mBACvB,CAAC,UAAU,OAAO,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC,CAAC;AAAA;AAGhE,MAAM,SAAS,OAAO,IAAI;AAAA,gBACjB,CAAC,UAAU,OAAO,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC,CAAC;AAAA;AAG7D,MAAM,gBAAgB,OAAO;AAAA,MAC9B,iBAAiB,eAAe,gBAAgB;AAAA;AAAA;AAAA;AAK/C,MAAM,WAAW,oBAAC,cAAW,SAAS,OAAO,UAAU,MAAM,OAAO,EAAE,eAAe,OAAO,GAAG;AAC/F,MAAM,UAAU,oBAAC,cAAW,SAAO,MAAC,UAAU,MAAM,OAAO,EAAE,eAAe,OAAO,GAAG;AACtF,MAAM,eAAe,oBAAC,aAAU,OAAO,CAAC,iBAAiB,GAAG,GAAG;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useState, useCallback } from "react";
|
|
4
|
-
import { noop } from "lodash";
|
|
4
|
+
import { noop } from "lodash-es";
|
|
5
5
|
import PropTypes from "prop-types";
|
|
6
6
|
import { styled, withTheme } from "@elliemae/ds-system";
|
|
7
7
|
import { Grid } from "@elliemae/ds-grid";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileTouchable/MobileTouchable.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useState, useCallback } from 'react';\nimport { noop } from 'lodash';\nimport PropTypes from 'prop-types';\nimport { styled, withTheme } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\n\nconst StyledContainer = styled(Grid)`\n cursor: pointer;\n background: ${(props) => (props.touching ? props.theme.colors.brand['100'] : props.theme.colors.neutral['000'])};\n &:focus {\n position: relative;\n &:after {\n position: absolute;\n content: '';\n border: 2px solid brand-700;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n }\n`;\n\nconst MobileTouchable = ({\n children,\n onClick = noop,\n theme,\n dataTestid = 'mobile-touchable',\n render,\n innerRef,\n ...gridProps\n}) => {\n const [touching, setTouching] = useState(false);\n const handleStart = useCallback(() => setTouching(true));\n const handleEnd = useCallback(() => setTouching(false));\n console.log('AAA', innerRef);\n return (\n <StyledContainer\n {...gridProps}\n touching={touching}\n onClick={onClick}\n onTouchStart={handleStart}\n onTouchEnd={handleEnd}\n data-testid={dataTestid}\n innerRef={innerRef}\n tabIndex={0}\n >\n {children || render(gridProps)}\n </StyledContainer>\n );\n};\n\nMobileTouchable.propTypes = {\n onClick: PropTypes.func,\n children: PropTypes.any,\n render: PropTypes.func,\n theme: PropTypes.any,\n dataTestid: PropTypes.string,\n innerRef: PropTypes.any,\n};\n\nconst DSMobileTouchable = withTheme(MobileTouchable);\n\nexport { DSMobileTouchable };\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useState, useCallback } from 'react';\nimport { noop } from 'lodash-es';\nimport PropTypes from 'prop-types';\nimport { styled, withTheme } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\n\nconst StyledContainer = styled(Grid)`\n cursor: pointer;\n background: ${(props) => (props.touching ? props.theme.colors.brand['100'] : props.theme.colors.neutral['000'])};\n &:focus {\n position: relative;\n &:after {\n position: absolute;\n content: '';\n border: 2px solid brand-700;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n }\n`;\n\nconst MobileTouchable = ({\n children,\n onClick = noop,\n theme,\n dataTestid = 'mobile-touchable',\n render,\n innerRef,\n ...gridProps\n}) => {\n const [touching, setTouching] = useState(false);\n const handleStart = useCallback(() => setTouching(true));\n const handleEnd = useCallback(() => setTouching(false));\n console.log('AAA', innerRef);\n return (\n <StyledContainer\n {...gridProps}\n touching={touching}\n onClick={onClick}\n onTouchStart={handleStart}\n onTouchEnd={handleEnd}\n data-testid={dataTestid}\n innerRef={innerRef}\n tabIndex={0}\n >\n {children || render(gridProps)}\n </StyledContainer>\n );\n};\n\nMobileTouchable.propTypes = {\n onClick: PropTypes.func,\n children: PropTypes.any,\n render: PropTypes.func,\n theme: PropTypes.any,\n dataTestid: PropTypes.string,\n innerRef: PropTypes.any,\n};\n\nconst DSMobileTouchable = withTheme(MobileTouchable);\n\nexport { DSMobileTouchable };\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACqCnB;AArCJ,SAAgB,UAAU,mBAAmB;AAC7C,SAAS,YAAY;AACrB,OAAO,eAAe;AACtB,SAAS,QAAQ,iBAAiB;AAClC,SAAS,YAAY;AAErB,MAAM,kBAAkB,OAAO,IAAI;AAAA;AAAA,gBAEnB,CAAC,UAAW,MAAM,WAAW,MAAM,MAAM,OAAO,MAAM,KAAK,IAAI,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAejH,MAAM,kBAAkB,CAAC;AAAA,EACvB;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,KAAK;AAC9C,QAAM,cAAc,YAAY,MAAM,YAAY,IAAI,CAAC;AACvD,QAAM,YAAY,YAAY,MAAM,YAAY,KAAK,CAAC;AACtD,UAAQ,IAAI,OAAO,QAAQ;AAC3B,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA,cAAc;AAAA,MACd,YAAY;AAAA,MACZ,eAAa;AAAA,MACb;AAAA,MACA,UAAU;AAAA,MAET,sBAAY,OAAO,SAAS;AAAA;AAAA,EAC/B;AAEJ;AAEA,gBAAgB,YAAY;AAAA,EAC1B,SAAS,UAAU;AAAA,EACnB,UAAU,UAAU;AAAA,EACpB,QAAQ,UAAU;AAAA,EAClB,OAAO,UAAU;AAAA,EACjB,YAAY,UAAU;AAAA,EACtB,UAAU,UAAU;AACtB;AAEA,MAAM,oBAAoB,UAAU,eAAe;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/Modal/Modal.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { describe, PropTypes } from "@elliemae/ds-props-helpers";
|
|
4
|
-
import { noop } from "lodash";
|
|
4
|
+
import { noop } from "lodash-es";
|
|
5
5
|
import { Grid } from "@elliemae/ds-grid";
|
|
6
6
|
import { WarningTriangle } from "@elliemae/ds-icons";
|
|
7
7
|
import { DSButton } from "@elliemae/ds-button";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/Modal/Modal.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { noop } from 'lodash';\nimport { Grid } from '@elliemae/ds-grid';\nimport { WarningTriangle } from '@elliemae/ds-icons';\nimport { DSButton } from '@elliemae/ds-button';\nimport { useTheme } from '@elliemae/ds-system';\nimport { ModalPosition, ModalBox, BackShadow, ModalIcon, ModalTitle, ModalDescription, BodyFix } from './styled.js';\n\nconst Modal = ({\n zIndex = 1,\n title = '',\n description = '',\n onClose = noop,\n showSecondaryAction = true,\n secondaryActionProps = {\n onClick: noop,\n labelText: 'Cancel',\n },\n primaryActionProps = {\n onClick: noop,\n labelText: 'Accept',\n },\n isOpen = false,\n children = undefined,\n}) => {\n const theme = useTheme();\n if (!isOpen) return null;\n return (\n <>\n <BodyFix isOpen={isOpen} />\n <BackShadow onClick={onClose} zIndex={zIndex} />\n <ModalPosition zIndex={zIndex} cols={['auto']}>\n {children !== undefined ? (\n <>{children}</>\n ) : (\n <ModalBox\n maxHeight={`${window.innerHeight * 0.75}px`}\n rows={[1, '80px']}\n style={{\n overflow: 'hidden',\n }}\n >\n <Grid\n pl=\"xs\"\n pr=\"xs\"\n style={{\n overflow: 'hidden',\n }}\n >\n <Grid\n rows={['auto', 'auto', 1]}\n style={{\n overflow: 'hidden',\n }}\n >\n <ModalIcon>\n <WarningTriangle size=\"xxl\" />\n </ModalIcon>\n <ModalTitle data-testid=\"modal-title\">{title}</ModalTitle>\n <ModalDescription\n data-testid=\"modal-desc\"\n style={{\n overflow: 'auto',\n }}\n >\n {description}\n </ModalDescription>\n </Grid>\n </Grid>\n <Grid pt=\"24px\">\n <Grid\n pl=\"xs\"\n pr=\"xs\"\n cols={showSecondaryAction ? [1, 1] : [1]}\n gutter=\"xs\"\n justifyContent=\"center\"\n alignItems=\"center\"\n style={{\n borderTop: `1px solid ${theme.colors.neutral[100]}`,\n }}\n >\n {showSecondaryAction && (\n <DSButton\n {...secondaryActionProps}\n labelText={secondaryActionProps.labelText || ' Cancel'}\n buttonType=\"secondary\"\n data-testid=\"modal-secondary-btn\"\n />\n )}\n <DSButton\n labelText={primaryActionProps.labelText || ' Accept'}\n {...primaryActionProps}\n buttonType=\"primary\"\n data-testid=\"modal-primary-btn\"\n />\n </Grid>\n </Grid>\n </ModalBox>\n )}\n </ModalPosition>\n </>\n );\n};\n\nconst modalProps = {\n isOpen: PropTypes.bool.description('Wheter the modal is open or closed').defaultValue(false),\n zIndex: PropTypes.number.description('z-index value').defaultValue(1),\n title: PropTypes.string.description('Modal s title').isRequired,\n description: PropTypes.string.description('Modal s content').isRequired,\n onClose: PropTypes.func.description('Function executed when the modal closes'),\n showSecondaryAction: PropTypes.bool.description('Wheter to show secondary action button or not').defaultValue(true),\n secondaryActionProps: PropTypes.shape({\n onClick: PropTypes.func,\n labelText: PropTypes.string,\n }).description('Secondary action props'),\n primaryActionProps: PropTypes.shape({\n onClick: PropTypes.func,\n labelText: PropTypes.string,\n }).description('Primary action props'),\n};\n\nModal.displayName = 'Modal';\nconst ModalWithSchema = describe(Modal);\nModalWithSchema.propTypes = modalProps;\n\nexport { Modal, ModalWithSchema };\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { noop } from 'lodash-es';\nimport { Grid } from '@elliemae/ds-grid';\nimport { WarningTriangle } from '@elliemae/ds-icons';\nimport { DSButton } from '@elliemae/ds-button';\nimport { useTheme } from '@elliemae/ds-system';\nimport { ModalPosition, ModalBox, BackShadow, ModalIcon, ModalTitle, ModalDescription, BodyFix } from './styled.js';\n\nconst Modal = ({\n zIndex = 1,\n title = '',\n description = '',\n onClose = noop,\n showSecondaryAction = true,\n secondaryActionProps = {\n onClick: noop,\n labelText: 'Cancel',\n },\n primaryActionProps = {\n onClick: noop,\n labelText: 'Accept',\n },\n isOpen = false,\n children = undefined,\n}) => {\n const theme = useTheme();\n if (!isOpen) return null;\n return (\n <>\n <BodyFix isOpen={isOpen} />\n <BackShadow onClick={onClose} zIndex={zIndex} />\n <ModalPosition zIndex={zIndex} cols={['auto']}>\n {children !== undefined ? (\n <>{children}</>\n ) : (\n <ModalBox\n maxHeight={`${window.innerHeight * 0.75}px`}\n rows={[1, '80px']}\n style={{\n overflow: 'hidden',\n }}\n >\n <Grid\n pl=\"xs\"\n pr=\"xs\"\n style={{\n overflow: 'hidden',\n }}\n >\n <Grid\n rows={['auto', 'auto', 1]}\n style={{\n overflow: 'hidden',\n }}\n >\n <ModalIcon>\n <WarningTriangle size=\"xxl\" />\n </ModalIcon>\n <ModalTitle data-testid=\"modal-title\">{title}</ModalTitle>\n <ModalDescription\n data-testid=\"modal-desc\"\n style={{\n overflow: 'auto',\n }}\n >\n {description}\n </ModalDescription>\n </Grid>\n </Grid>\n <Grid pt=\"24px\">\n <Grid\n pl=\"xs\"\n pr=\"xs\"\n cols={showSecondaryAction ? [1, 1] : [1]}\n gutter=\"xs\"\n justifyContent=\"center\"\n alignItems=\"center\"\n style={{\n borderTop: `1px solid ${theme.colors.neutral[100]}`,\n }}\n >\n {showSecondaryAction && (\n <DSButton\n {...secondaryActionProps}\n labelText={secondaryActionProps.labelText || ' Cancel'}\n buttonType=\"secondary\"\n data-testid=\"modal-secondary-btn\"\n />\n )}\n <DSButton\n labelText={primaryActionProps.labelText || ' Accept'}\n {...primaryActionProps}\n buttonType=\"primary\"\n data-testid=\"modal-primary-btn\"\n />\n </Grid>\n </Grid>\n </ModalBox>\n )}\n </ModalPosition>\n </>\n );\n};\n\nconst modalProps = {\n isOpen: PropTypes.bool.description('Wheter the modal is open or closed').defaultValue(false),\n zIndex: PropTypes.number.description('z-index value').defaultValue(1),\n title: PropTypes.string.description('Modal s title').isRequired,\n description: PropTypes.string.description('Modal s content').isRequired,\n onClose: PropTypes.func.description('Function executed when the modal closes'),\n showSecondaryAction: PropTypes.bool.description('Wheter to show secondary action button or not').defaultValue(true),\n secondaryActionProps: PropTypes.shape({\n onClick: PropTypes.func,\n labelText: PropTypes.string,\n }).description('Secondary action props'),\n primaryActionProps: PropTypes.shape({\n onClick: PropTypes.func,\n labelText: PropTypes.string,\n }).description('Primary action props'),\n};\n\nModal.displayName = 'Modal';\nconst ModalWithSchema = describe(Modal);\nModalWithSchema.propTypes = modalProps;\n\nexport { Modal, ModalWithSchema };\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;AC+BjB,SAII,UAJJ,KAoBQ,YApBR;AA7BN,SAAS,UAAU,iBAAiB;AACpC,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,SAAS,uBAAuB;AAChC,SAAS,gBAAgB;AACzB,SAAS,gBAAgB;AACzB,SAAS,e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C,EAAE,YAAY,sBAAsB;AACvC;AAEA,MAAM,cAAc;AACpB,MAAM,kBAAkB,SAAS,KAAK;AACtC,gBAAgB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -5,7 +5,7 @@ import { DSBackdrop } from "@elliemae/ds-backdrop";
|
|
|
5
5
|
import { Close } from "@elliemae/ds-icons";
|
|
6
6
|
import { DSIconSizes, DSIconColors } from "@elliemae/ds-icon";
|
|
7
7
|
import { PropTypes, describe } from "@elliemae/ds-props-helpers";
|
|
8
|
-
import { noop } from "lodash";
|
|
8
|
+
import { noop } from "lodash-es";
|
|
9
9
|
import { SvgIcon as Logo } from "../Icons/EM_logo.js";
|
|
10
10
|
import { Container, Menu, Heading, Icon, Hr, MenuList, BottomMenu, MenuWrapper } from "./styles.js";
|
|
11
11
|
const DSSideNav = ({ containerProps = {}, title, onClose = noop, menuItems = [], bottomMenuItems = [] }) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/SideNav/SideNav.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable import/no-unresolved */\n/* eslint-disable max-lines */\n/* eslint-disable react/no-array-index-key */\n/* eslint-disable jsx-a11y/click-events-have-key-events */\n/* eslint-disable jsx-a11y/no-static-element-interactions */\nimport React, { useState } from 'react';\nimport { DSBackdrop } from '@elliemae/ds-backdrop';\nimport { Close } from '@elliemae/ds-icons';\nimport { DSIconSizes, DSIconColors } from '@elliemae/ds-icon';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { noop } from 'lodash';\nimport { SvgIcon as Logo } from '../Icons/EM_logo.js';\nimport { Container, Menu, Heading, Icon, Hr, MenuList, BottomMenu, MenuWrapper } from './styles.js';\n\nconst DSSideNav = ({ containerProps = {}, title, onClose = noop, menuItems = [], bottomMenuItems = [] }) => {\n const [selectedMenuItemIdx, setSelectedMenuItem] = useState(-1);\n\n const menuItemClick = (idx, text, cb) => {\n if (cb) {\n cb(idx, text);\n }\n setSelectedMenuItem(idx);\n };\n\n const renderMenuList = () => (\n <>\n {menuItems.length > 0 ? (\n <MenuList>\n {menuItems.map(({ icon, text, onClick }, idx) => (\n <div key={idx} className=\"menuitem\" onClick={menuItemClick.bind(null, idx, text, onClick)}>\n <div className=\"icon\">{icon}</div>\n <div className={`text ${idx === selectedMenuItemIdx ? 'active' : ''}`}>{text}</div>\n </div>\n ))}\n </MenuList>\n ) : null}\n </>\n );\n\n const renderBottomMenu = () => (\n <MenuList>\n {bottomMenuItems.map(({ icon, text, onClick }, idx) => (\n <div key={idx} className=\"menuitem\" onClick={() => onClick(idx, text)}>\n <div className=\"icon\">{icon}</div>\n <div className=\"text\">{text}</div>\n </div>\n ))}\n </MenuList>\n );\n\n return (\n <Container data-testid={containerProps['data-testid'] || 'global-header-menu'}>\n <DSBackdrop onClick={onClose} type=\"cover\"></DSBackdrop>\n\n <Menu>\n <MenuWrapper>\n <Heading>\n <Icon>{Logo()}</Icon>\n <div className=\"content\">\n <label>{title}</label>\n <span></span>\n <div className=\"icon\">\n <Close onClick={onClose} size={DSIconSizes.S} color={DSIconColors.WHITE} />\n </div>\n </div>\n </Heading>\n <Hr></Hr>\n {renderMenuList()}\n {bottomMenuItems.length > 0 ? (\n <BottomMenu>\n <div className=\"content\">\n <hr></hr>\n {renderBottomMenu()}\n </div>\n </BottomMenu>\n ) : null}\n </MenuWrapper>\n </Menu>\n </Container>\n );\n};\n\nconst menuProps = PropTypes.arrayOf(\n PropTypes.shape({\n icon: PropTypes.element,\n text: PropTypes.string,\n }),\n);\n\nconst navProps = {\n /** inject props to wrapper element of side nav */\n containerProps: PropTypes.object.description('inject props to wrapper element of side nav'),\n /**\n * Heading Title\n */\n title: PropTypes.string.isRequired.description('Heading Title'),\n /**\n * Callback function when close is menu is triggered\n */\n onClose: PropTypes.func.description('Callback function when close is menu is triggered'),\n /**\n * Top Menu items array\n */\n menuItems: menuProps.description('Top Menu items array'),\n /**\n * Bottom Menu items array\n */\n bottomMenuItems: menuProps.description('Bottom Menu items array'),\n};\n\nDSSideNav.displayName = 'DSSideNav';\nconst DSSideNavWithSchema = describe(DSSideNav).description('Side navigation for mobile and tablet');\n\nDSSideNavWithSchema.propTypes = navProps;\n\nexport { DSSideNav, DSSideNavWithSchema };\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable import/no-unresolved */\n/* eslint-disable max-lines */\n/* eslint-disable react/no-array-index-key */\n/* eslint-disable jsx-a11y/click-events-have-key-events */\n/* eslint-disable jsx-a11y/no-static-element-interactions */\nimport React, { useState } from 'react';\nimport { DSBackdrop } from '@elliemae/ds-backdrop';\nimport { Close } from '@elliemae/ds-icons';\nimport { DSIconSizes, DSIconColors } from '@elliemae/ds-icon';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { noop } from 'lodash-es';\nimport { SvgIcon as Logo } from '../Icons/EM_logo.js';\nimport { Container, Menu, Heading, Icon, Hr, MenuList, BottomMenu, MenuWrapper } from './styles.js';\n\nconst DSSideNav = ({ containerProps = {}, title, onClose = noop, menuItems = [], bottomMenuItems = [] }) => {\n const [selectedMenuItemIdx, setSelectedMenuItem] = useState(-1);\n\n const menuItemClick = (idx, text, cb) => {\n if (cb) {\n cb(idx, text);\n }\n setSelectedMenuItem(idx);\n };\n\n const renderMenuList = () => (\n <>\n {menuItems.length > 0 ? (\n <MenuList>\n {menuItems.map(({ icon, text, onClick }, idx) => (\n <div key={idx} className=\"menuitem\" onClick={menuItemClick.bind(null, idx, text, onClick)}>\n <div className=\"icon\">{icon}</div>\n <div className={`text ${idx === selectedMenuItemIdx ? 'active' : ''}`}>{text}</div>\n </div>\n ))}\n </MenuList>\n ) : null}\n </>\n );\n\n const renderBottomMenu = () => (\n <MenuList>\n {bottomMenuItems.map(({ icon, text, onClick }, idx) => (\n <div key={idx} className=\"menuitem\" onClick={() => onClick(idx, text)}>\n <div className=\"icon\">{icon}</div>\n <div className=\"text\">{text}</div>\n </div>\n ))}\n </MenuList>\n );\n\n return (\n <Container data-testid={containerProps['data-testid'] || 'global-header-menu'}>\n <DSBackdrop onClick={onClose} type=\"cover\"></DSBackdrop>\n\n <Menu>\n <MenuWrapper>\n <Heading>\n <Icon>{Logo()}</Icon>\n <div className=\"content\">\n <label>{title}</label>\n <span></span>\n <div className=\"icon\">\n <Close onClick={onClose} size={DSIconSizes.S} color={DSIconColors.WHITE} />\n </div>\n </div>\n </Heading>\n <Hr></Hr>\n {renderMenuList()}\n {bottomMenuItems.length > 0 ? (\n <BottomMenu>\n <div className=\"content\">\n <hr></hr>\n {renderBottomMenu()}\n </div>\n </BottomMenu>\n ) : null}\n </MenuWrapper>\n </Menu>\n </Container>\n );\n};\n\nconst menuProps = PropTypes.arrayOf(\n PropTypes.shape({\n icon: PropTypes.element,\n text: PropTypes.string,\n }),\n);\n\nconst navProps = {\n /** inject props to wrapper element of side nav */\n containerProps: PropTypes.object.description('inject props to wrapper element of side nav'),\n /**\n * Heading Title\n */\n title: PropTypes.string.isRequired.description('Heading Title'),\n /**\n * Callback function when close is menu is triggered\n */\n onClose: PropTypes.func.description('Callback function when close is menu is triggered'),\n /**\n * Top Menu items array\n */\n menuItems: menuProps.description('Top Menu items array'),\n /**\n * Bottom Menu items array\n */\n bottomMenuItems: menuProps.description('Bottom Menu items array'),\n};\n\nDSSideNav.displayName = 'DSSideNav';\nconst DSSideNavWithSchema = describe(DSSideNav).description('Side navigation for mobile and tablet');\n\nDSSideNavWithSchema.propTypes = navProps;\n\nexport { DSSideNav, DSSideNavWithSchema };\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACyBnB,mBAKU,KADF,YAJR;AApBJ,SAAgB,gBAAgB;AAChC,SAAS,kBAAkB;AAC3B,SAAS,aAAa;AACtB,SAAS,aAAa,oBAAoB;AAC1C,SAAS,WAAW,gBAAgB;AAC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