@elliemae/ds-mobile 3.0.0-next.68 → 3.0.0-next.70
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/Accordion/{Accordion.js → DSMobileAccordion.js} +9 -9
- package/dist/cjs/Accordion/DSMobileAccordion.js.map +7 -0
- package/dist/cjs/Accordion/index.js +1 -1
- package/dist/cjs/Accordion/index.js.map +3 -3
- package/dist/cjs/Accordion/{propTypes.js → react-desc-prop-types.js} +7 -7
- package/dist/cjs/Accordion/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/CategoryBox/CategoryBox.js +1 -0
- package/dist/cjs/CategoryBox/CategoryBox.js.map +2 -2
- package/dist/cjs/CollectionBox/CollectionBox.js +1 -0
- package/dist/cjs/CollectionBox/CollectionBox.js.map +2 -2
- package/dist/cjs/GlobalHeader/MobileGlobalHeader.js +1 -0
- package/dist/cjs/GlobalHeader/MobileGlobalHeader.js.map +2 -2
- package/dist/cjs/GroupBox/GroupBox.js +1 -0
- package/dist/cjs/GroupBox/GroupBox.js.map +2 -2
- package/dist/cjs/InfiniteLoader/Infiniteloader.js +1 -0
- package/dist/cjs/InfiniteLoader/Infiniteloader.js.map +2 -2
- package/dist/cjs/InfiniteLoader/VirtualizedInfiniteLoader.js +1 -0
- package/dist/cjs/InfiniteLoader/VirtualizedInfiniteLoader.js.map +2 -2
- package/dist/cjs/MobileActionToolbar/MobileActionToolbar.js +1 -0
- package/dist/cjs/MobileActionToolbar/MobileActionToolbar.js.map +2 -2
- package/dist/cjs/MobileActionToolbar/MobileActionToolbarItem.js +1 -0
- package/dist/cjs/MobileActionToolbar/MobileActionToolbarItem.js.map +2 -2
- package/dist/cjs/MobileBanner/MobileBanner.js +1 -0
- package/dist/cjs/MobileBanner/MobileBanner.js.map +2 -2
- package/dist/cjs/MobileCard/Card.js +1 -0
- package/dist/cjs/MobileCard/Card.js.map +2 -2
- package/dist/cjs/MobileCard/Group.js +1 -0
- package/dist/cjs/MobileCard/Group.js.map +2 -2
- package/dist/cjs/MobileContextMenu/MobileContextMenu.js +1 -0
- package/dist/cjs/MobileContextMenu/MobileContextMenu.js.map +2 -2
- package/dist/cjs/MobileContextMenu/MobileContextMenuGroup.js +1 -0
- package/dist/cjs/MobileContextMenu/MobileContextMenuGroup.js.map +2 -2
- package/dist/cjs/MobileContextMenu/MobileContextMenuItem.js +1 -0
- package/dist/cjs/MobileContextMenu/MobileContextMenuItem.js.map +2 -2
- package/dist/cjs/MobileDatePicker/MobileDatePicker.js +1 -0
- package/dist/cjs/MobileDatePicker/MobileDatePicker.js.map +2 -2
- package/dist/cjs/MobileDropdownMenu/MobileDropdownMenu.js +1 -0
- package/dist/cjs/MobileDropdownMenu/MobileDropdownMenu.js.map +2 -2
- package/dist/cjs/MobileEmtpyState/MobileEmptyState.js +1 -0
- package/dist/cjs/MobileEmtpyState/MobileEmptyState.js.map +2 -2
- package/dist/cjs/MobileFilterbar/Filterbar.js +1 -0
- package/dist/cjs/MobileFilterbar/Filterbar.js.map +2 -2
- package/dist/cjs/MobileFilterbar/FilterbarItem.js +1 -0
- package/dist/cjs/MobileFilterbar/FilterbarItem.js.map +2 -2
- package/dist/cjs/MobileFilterbar/FilterbarSort.js +1 -0
- package/dist/cjs/MobileFilterbar/FilterbarSort.js.map +2 -2
- package/dist/cjs/MobileFooter/Action.js +1 -0
- package/dist/cjs/MobileFooter/Action.js.map +2 -2
- package/dist/cjs/MobileFooter/Footer.js +1 -0
- package/dist/cjs/MobileFooter/Footer.js.map +2 -2
- package/dist/cjs/MobileFooter/Text.js +1 -0
- package/dist/cjs/MobileFooter/Text.js.map +2 -2
- package/dist/cjs/MobileListItem/MobileListItem.js +1 -0
- package/dist/cjs/MobileListItem/MobileListItem.js.map +2 -2
- package/dist/cjs/MobilePageHeader/MobilePageHeader.js +1 -0
- package/dist/cjs/MobilePageHeader/MobilePageHeader.js.map +2 -2
- package/dist/cjs/MobileSeparator/Separator.js +1 -0
- package/dist/cjs/MobileSeparator/Separator.js.map +2 -2
- package/dist/cjs/MobileTimePicker/MobileTimePicker.js +1 -0
- package/dist/cjs/MobileTimePicker/MobileTimePicker.js.map +2 -2
- package/dist/cjs/Modal/Modal.js +1 -0
- package/dist/cjs/Modal/Modal.js.map +2 -2
- package/dist/cjs/SideNav/SideNav.js +1 -0
- package/dist/cjs/SideNav/SideNav.js.map +2 -2
- package/dist/cjs/SwipeToRefresh/SwipeToRefresh.js +1 -0
- package/dist/cjs/SwipeToRefresh/SwipeToRefresh.js.map +2 -2
- package/dist/cjs/Tabs/index.js +2 -0
- package/dist/cjs/Tabs/index.js.map +2 -2
- package/dist/esm/Accordion/{Accordion.js → DSMobileAccordion.js} +4 -4
- package/dist/esm/Accordion/DSMobileAccordion.js.map +7 -0
- package/dist/esm/Accordion/index.js +1 -1
- package/dist/esm/Accordion/index.js.map +2 -2
- package/dist/esm/Accordion/{propTypes.js → react-desc-prop-types.js} +4 -4
- package/dist/esm/Accordion/react-desc-prop-types.js.map +7 -0
- package/dist/esm/CategoryBox/CategoryBox.js +1 -0
- package/dist/esm/CategoryBox/CategoryBox.js.map +2 -2
- package/dist/esm/CollectionBox/CollectionBox.js +1 -0
- package/dist/esm/CollectionBox/CollectionBox.js.map +2 -2
- package/dist/esm/GlobalHeader/MobileGlobalHeader.js +1 -0
- package/dist/esm/GlobalHeader/MobileGlobalHeader.js.map +2 -2
- package/dist/esm/GroupBox/GroupBox.js +1 -0
- package/dist/esm/GroupBox/GroupBox.js.map +2 -2
- package/dist/esm/InfiniteLoader/Infiniteloader.js +1 -0
- package/dist/esm/InfiniteLoader/Infiniteloader.js.map +2 -2
- package/dist/esm/InfiniteLoader/VirtualizedInfiniteLoader.js +1 -0
- package/dist/esm/InfiniteLoader/VirtualizedInfiniteLoader.js.map +2 -2
- package/dist/esm/MobileActionToolbar/MobileActionToolbar.js +1 -0
- package/dist/esm/MobileActionToolbar/MobileActionToolbar.js.map +2 -2
- package/dist/esm/MobileActionToolbar/MobileActionToolbarItem.js +1 -0
- package/dist/esm/MobileActionToolbar/MobileActionToolbarItem.js.map +2 -2
- package/dist/esm/MobileBanner/MobileBanner.js +1 -0
- package/dist/esm/MobileBanner/MobileBanner.js.map +2 -2
- package/dist/esm/MobileCard/Card.js +1 -0
- package/dist/esm/MobileCard/Card.js.map +2 -2
- package/dist/esm/MobileCard/Group.js +1 -0
- package/dist/esm/MobileCard/Group.js.map +2 -2
- package/dist/esm/MobileContextMenu/MobileContextMenu.js +1 -0
- package/dist/esm/MobileContextMenu/MobileContextMenu.js.map +2 -2
- package/dist/esm/MobileContextMenu/MobileContextMenuGroup.js +1 -0
- package/dist/esm/MobileContextMenu/MobileContextMenuGroup.js.map +2 -2
- package/dist/esm/MobileContextMenu/MobileContextMenuItem.js +1 -0
- package/dist/esm/MobileContextMenu/MobileContextMenuItem.js.map +2 -2
- package/dist/esm/MobileDatePicker/MobileDatePicker.js +1 -0
- package/dist/esm/MobileDatePicker/MobileDatePicker.js.map +2 -2
- package/dist/esm/MobileDropdownMenu/MobileDropdownMenu.js +1 -0
- package/dist/esm/MobileDropdownMenu/MobileDropdownMenu.js.map +2 -2
- package/dist/esm/MobileEmtpyState/MobileEmptyState.js +1 -0
- package/dist/esm/MobileEmtpyState/MobileEmptyState.js.map +2 -2
- package/dist/esm/MobileFilterbar/Filterbar.js +1 -0
- package/dist/esm/MobileFilterbar/Filterbar.js.map +2 -2
- package/dist/esm/MobileFilterbar/FilterbarItem.js +1 -0
- package/dist/esm/MobileFilterbar/FilterbarItem.js.map +2 -2
- package/dist/esm/MobileFilterbar/FilterbarSort.js +1 -0
- package/dist/esm/MobileFilterbar/FilterbarSort.js.map +2 -2
- package/dist/esm/MobileFooter/Action.js +1 -0
- package/dist/esm/MobileFooter/Action.js.map +2 -2
- package/dist/esm/MobileFooter/Footer.js +1 -0
- package/dist/esm/MobileFooter/Footer.js.map +2 -2
- package/dist/esm/MobileFooter/Text.js +1 -0
- package/dist/esm/MobileFooter/Text.js.map +2 -2
- package/dist/esm/MobileListItem/MobileListItem.js +1 -0
- package/dist/esm/MobileListItem/MobileListItem.js.map +2 -2
- package/dist/esm/MobilePageHeader/MobilePageHeader.js +1 -0
- package/dist/esm/MobilePageHeader/MobilePageHeader.js.map +2 -2
- package/dist/esm/MobileSeparator/Separator.js +1 -0
- package/dist/esm/MobileSeparator/Separator.js.map +2 -2
- package/dist/esm/MobileTimePicker/MobileTimePicker.js +1 -0
- package/dist/esm/MobileTimePicker/MobileTimePicker.js.map +2 -2
- package/dist/esm/Modal/Modal.js +1 -0
- package/dist/esm/Modal/Modal.js.map +2 -2
- package/dist/esm/SideNav/SideNav.js +1 -0
- package/dist/esm/SideNav/SideNav.js.map +2 -2
- package/dist/esm/SwipeToRefresh/SwipeToRefresh.js +1 -0
- package/dist/esm/SwipeToRefresh/SwipeToRefresh.js.map +2 -2
- package/dist/esm/Tabs/index.js +2 -0
- package/dist/esm/Tabs/index.js.map +2 -2
- package/package.json +1 -1
- package/dist/cjs/Accordion/Accordion.js.map +0 -7
- package/dist/cjs/Accordion/propTypes.js.map +0 -7
- package/dist/esm/Accordion/Accordion.js.map +0 -7
- package/dist/esm/Accordion/propTypes.js.map +0 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileFooter/Action.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable jest/valid-describe */\n/* eslint-disable jest/valid-title */\nimport React from 'react';\nimport styled from 'styled-components';\nimport { typography } from '@xstyled/styled-components';\nimport { color, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { describe, PropTypes } from 'react-desc';\n\nconst Label = styled.span`\n ${typography}\n ${color('neutral', '800')}\n padding-bottom: ${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xxs)};\n padding-top: calc(${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xxs)} / 2);\n`;\n\nconst DSMobileFooterAction = ({ label, icon, onClick }) => (\n <Grid\n data-testid=\"ds-mobile-footer-action\"\n rows={['auto'].concat(label ? 'min-content' : 'none')}\n justifyContent=\"center\"\n role=\"button\"\n onClick={onClick}\n >\n <Grid justifyContent=\"center\" alignItems=\"center\">\n {React.cloneElement(icon, {\n 'data-testid': 'ds-mobile-footer-action-icon',\n size: !label ? 'l' : 'm',\n })}\n </Grid>\n\n {label && (\n <Grid justifyContent=\"center\">\n <Label fontSize=\"11px\">{label}</Label>\n </Grid>\n )}\n </Grid>\n);\n\nconst actionProps = {\n /** Action label */\n label: PropTypes.string.description('Action label'),\n /** Action icon */\n icon: PropTypes.element.description('Action icon'),\n /** onClick callback */\n onClick: PropTypes.func.description('onClick callback'),\n};\n\nDSMobileFooterAction.propTypes = actionProps;\
|
|
5
|
-
"mappings": "AAAA;ACEA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,QAAQ,OAAO;AAAA,IACjB;AAAA,IACA,MAAM,WAAW,KAAK;AAAA,oBACN,CAAC,UAAU,yBAAyB,MAAM,MAAM,MAAM,GAAG;AAAA,sBACvD,CAAC,UAAU,yBAAyB,MAAM,MAAM,MAAM,GAAG;AAAA;AAG/E,MAAM,uBAAuB,CAAC,EAAE,OAAO,MAAM,cAC3C,qCAAC;AAAA,EACC,eAAY;AAAA,EACZ,MAAM,CAAC,MAAM,EAAE,OAAO,QAAQ,gBAAgB,MAAM;AAAA,EACpD,gBAAe;AAAA,EACf,MAAK;AAAA,EACL;AAAA,GAEA,qCAAC;AAAA,EAAK,gBAAe;AAAA,EAAS,YAAW;AAAA,GACtC,OAAM,aAAa,MAAM;AAAA,EACxB,eAAe;AAAA,EACf,MAAM,CAAC,QAAQ,MAAM;AACvB,CAAC,CACH,GAEC,SACC,qCAAC;AAAA,EAAK,gBAAe;AAAA,GACnB,qCAAC;AAAA,EAAM,UAAS;AAAA,GAAQ,KAAM,CAChC,CAEJ;AAGF,MAAM,cAAc;AAAA,EAElB,OAAO,UAAU,OAAO,YAAY,cAAc;AAAA,EAElD,MAAM,UAAU,QAAQ,YAAY,aAAa;AAAA,EAEjD,SAAS,UAAU,KAAK,YAAY,kBAAkB;AACxD;AAEA,qBAAqB,YAAY;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable jest/valid-describe */\n/* eslint-disable jest/valid-title */\nimport React from 'react';\nimport styled from 'styled-components';\nimport { typography } from '@xstyled/styled-components';\nimport { color, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { describe, PropTypes } from 'react-desc';\n\nconst Label = styled.span`\n ${typography}\n ${color('neutral', '800')}\n padding-bottom: ${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xxs)};\n padding-top: calc(${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xxs)} / 2);\n`;\n\nconst DSMobileFooterAction = ({ label, icon, onClick }) => (\n <Grid\n data-testid=\"ds-mobile-footer-action\"\n rows={['auto'].concat(label ? 'min-content' : 'none')}\n justifyContent=\"center\"\n role=\"button\"\n onClick={onClick}\n >\n <Grid justifyContent=\"center\" alignItems=\"center\">\n {React.cloneElement(icon, {\n 'data-testid': 'ds-mobile-footer-action-icon',\n size: !label ? 'l' : 'm',\n })}\n </Grid>\n\n {label && (\n <Grid justifyContent=\"center\">\n <Label fontSize=\"11px\">{label}</Label>\n </Grid>\n )}\n </Grid>\n);\n\nconst actionProps = {\n /** Action label */\n label: PropTypes.string.description('Action label'),\n /** Action icon */\n icon: PropTypes.element.description('Action icon'),\n /** onClick callback */\n onClick: PropTypes.func.description('onClick callback'),\n};\n\nDSMobileFooterAction.propTypes = actionProps;\nDSMobileFooterAction.displayName = 'DSMobileFooterAction';\nconst DSMobileFooterActionWithSchema = describe(DSMobileFooterAction).description('Mobile footer action');\nDSMobileFooterActionWithSchema.propTypes = actionProps;\n\nexport { DSMobileFooterAction, DSMobileFooterActionWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA;ACEA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,QAAQ,OAAO;AAAA,IACjB;AAAA,IACA,MAAM,WAAW,KAAK;AAAA,oBACN,CAAC,UAAU,yBAAyB,MAAM,MAAM,MAAM,GAAG;AAAA,sBACvD,CAAC,UAAU,yBAAyB,MAAM,MAAM,MAAM,GAAG;AAAA;AAG/E,MAAM,uBAAuB,CAAC,EAAE,OAAO,MAAM,cAC3C,qCAAC;AAAA,EACC,eAAY;AAAA,EACZ,MAAM,CAAC,MAAM,EAAE,OAAO,QAAQ,gBAAgB,MAAM;AAAA,EACpD,gBAAe;AAAA,EACf,MAAK;AAAA,EACL;AAAA,GAEA,qCAAC;AAAA,EAAK,gBAAe;AAAA,EAAS,YAAW;AAAA,GACtC,OAAM,aAAa,MAAM;AAAA,EACxB,eAAe;AAAA,EACf,MAAM,CAAC,QAAQ,MAAM;AACvB,CAAC,CACH,GAEC,SACC,qCAAC;AAAA,EAAK,gBAAe;AAAA,GACnB,qCAAC;AAAA,EAAM,UAAS;AAAA,GAAQ,KAAM,CAChC,CAEJ;AAGF,MAAM,cAAc;AAAA,EAElB,OAAO,UAAU,OAAO,YAAY,cAAc;AAAA,EAElD,MAAM,UAAU,QAAQ,YAAY,aAAa;AAAA,EAEjD,SAAS,UAAU,KAAK,YAAY,kBAAkB;AACxD;AAEA,qBAAqB,YAAY;AACjC,qBAAqB,cAAc;AACnC,MAAM,iCAAiC,SAAS,oBAAoB,EAAE,YAAY,sBAAsB;AACxG,+BAA+B,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -33,6 +33,7 @@ const footerProps = {
|
|
|
33
33
|
children: PropTypes.oneOfType([PropTypes.element, PropTypes.arrayOf(PropTypes.element)]).isRequired.description("Instance of DSButton, DSMobileFooterText or DSMobileFooterAction")
|
|
34
34
|
};
|
|
35
35
|
MobileFooter.propTypes = footerProps;
|
|
36
|
+
MobileFooter.displayName = "MobileFooter";
|
|
36
37
|
const MobileFooterWithSchema = describe(MobileFooter);
|
|
37
38
|
MobileFooterWithSchema.propTypes = footerProps;
|
|
38
39
|
var Footer_default = MobileFooter;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileFooter/Footer.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable jest/valid-describe */\n/* eslint-disable jest/valid-title */\nimport React from 'react';\nimport styled from 'styled-components';\nimport { border, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport DSButton from '@elliemae/ds-button';\nimport { describe, PropTypes } from 'react-desc';\nimport { DSMobileFooterText } from './Text';\n\nconst FooterWrap = styled(Grid)`\n background-color: ${(props) => props.theme.colors.neutral['000']};\n border-top: ${(props) => border(props.theme.colors.neutral[100])};\n height: ${(props) => `calc(${__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs)} * 7)`};\n`;\n\nconst MobileFooter = ({ children }) => {\n const childArr = React.Children.toArray(children);\n const isButtonType = childArr[0].type === DSMobileFooterText || childArr[0].type === DSButton;\n const setCols = () => {\n if (isButtonType) {\n return childArr.length === 1 ? ['90%'] : ['45%', '45%'];\n }\n return childArr.map(() => `${100 / childArr.length}%`);\n };\n return (\n <FooterWrap>\n <Grid\n cols={setCols()}\n gutter={isButtonType ? 'xs' : undefined}\n justifyContent=\"center\"\n alignItems={isButtonType ? 'center' : undefined}\n >\n {childArr.map((c, i) => (\n // eslint-disable-next-line react/no-array-index-key\n <Grid key={i}>{c}</Grid>\n ))}\n </Grid>\n </FooterWrap>\n );\n};\n\nconst footerProps = {\n /**\n * Instance of DSButton, DSMobileFooterText or DSMobileFooterAction\n */\n children: PropTypes.oneOfType([PropTypes.element, PropTypes.arrayOf(PropTypes.element)]).isRequired.description(\n 'Instance of DSButton, DSMobileFooterText or DSMobileFooterAction',\n ),\n};\n\nMobileFooter.propTypes = footerProps;\
|
|
5
|
-
"mappings": "AAAA;ACEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,aAAa,OAAO,IAAI;AAAA,sBACR,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,gBAC5C,CAAC,UAAU,OAAO,MAAM,MAAM,OAAO,QAAQ,IAAI;AAAA,YACrD,CAAC,UAAU,QAAQ,yBAAyB,MAAM,MAAM,MAAM,EAAE;AAAA;AAG5E,MAAM,eAAe,CAAC,EAAE,eAAe;AACrC,QAAM,WAAW,OAAM,SAAS,QAAQ,QAAQ;AAChD,QAAM,eAAe,SAAS,GAAG,SAAS,sBAAsB,SAAS,GAAG,SAAS;AACrF,QAAM,UAAU,MAAM;AACpB,QAAI,cAAc;AAChB,aAAO,SAAS,WAAW,IAAI,CAAC,KAAK,IAAI,CAAC,OAAO,KAAK;AAAA,IACxD;AACA,WAAO,SAAS,IAAI,MAAM,GAAG,MAAM,SAAS,SAAS;AAAA,EACvD;AACA,SACE,qCAAC,kBACC,qCAAC;AAAA,IACC,MAAM,QAAQ;AAAA,IACd,QAAQ,eAAe,OAAO;AAAA,IAC9B,gBAAe;AAAA,IACf,YAAY,eAAe,WAAW;AAAA,KAErC,SAAS,IAAI,CAAC,GAAG,MAEhB,qCAAC;AAAA,IAAK,KAAK;AAAA,KAAI,CAAE,CAClB,CACH,CACF;AAEJ;AAEA,MAAM,cAAc;AAAA,EAIlB,UAAU,UAAU,UAAU,CAAC,UAAU,SAAS,UAAU,QAAQ,UAAU,OAAO,CAAC,CAAC,EAAE,WAAW,YAClG,kEACF;AACF;AAEA,aAAa,YAAY;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable jest/valid-describe */\n/* eslint-disable jest/valid-title */\nimport React from 'react';\nimport styled from 'styled-components';\nimport { border, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport DSButton from '@elliemae/ds-button';\nimport { describe, PropTypes } from 'react-desc';\nimport { DSMobileFooterText } from './Text';\n\nconst FooterWrap = styled(Grid)`\n background-color: ${(props) => props.theme.colors.neutral['000']};\n border-top: ${(props) => border(props.theme.colors.neutral[100])};\n height: ${(props) => `calc(${__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs)} * 7)`};\n`;\n\nconst MobileFooter = ({ children }) => {\n const childArr = React.Children.toArray(children);\n const isButtonType = childArr[0].type === DSMobileFooterText || childArr[0].type === DSButton;\n const setCols = () => {\n if (isButtonType) {\n return childArr.length === 1 ? ['90%'] : ['45%', '45%'];\n }\n return childArr.map(() => `${100 / childArr.length}%`);\n };\n return (\n <FooterWrap>\n <Grid\n cols={setCols()}\n gutter={isButtonType ? 'xs' : undefined}\n justifyContent=\"center\"\n alignItems={isButtonType ? 'center' : undefined}\n >\n {childArr.map((c, i) => (\n // eslint-disable-next-line react/no-array-index-key\n <Grid key={i}>{c}</Grid>\n ))}\n </Grid>\n </FooterWrap>\n );\n};\n\nconst footerProps = {\n /**\n * Instance of DSButton, DSMobileFooterText or DSMobileFooterAction\n */\n children: PropTypes.oneOfType([PropTypes.element, PropTypes.arrayOf(PropTypes.element)]).isRequired.description(\n 'Instance of DSButton, DSMobileFooterText or DSMobileFooterAction',\n ),\n};\n\nMobileFooter.propTypes = footerProps;\nMobileFooter.displayName = 'MobileFooter';\nconst MobileFooterWithSchema = describe(MobileFooter);\nMobileFooterWithSchema.propTypes = footerProps;\n\nexport default MobileFooter;\n\nexport { MobileFooterWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA;ACEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,aAAa,OAAO,IAAI;AAAA,sBACR,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,gBAC5C,CAAC,UAAU,OAAO,MAAM,MAAM,OAAO,QAAQ,IAAI;AAAA,YACrD,CAAC,UAAU,QAAQ,yBAAyB,MAAM,MAAM,MAAM,EAAE;AAAA;AAG5E,MAAM,eAAe,CAAC,EAAE,eAAe;AACrC,QAAM,WAAW,OAAM,SAAS,QAAQ,QAAQ;AAChD,QAAM,eAAe,SAAS,GAAG,SAAS,sBAAsB,SAAS,GAAG,SAAS;AACrF,QAAM,UAAU,MAAM;AACpB,QAAI,cAAc;AAChB,aAAO,SAAS,WAAW,IAAI,CAAC,KAAK,IAAI,CAAC,OAAO,KAAK;AAAA,IACxD;AACA,WAAO,SAAS,IAAI,MAAM,GAAG,MAAM,SAAS,SAAS;AAAA,EACvD;AACA,SACE,qCAAC,kBACC,qCAAC;AAAA,IACC,MAAM,QAAQ;AAAA,IACd,QAAQ,eAAe,OAAO;AAAA,IAC9B,gBAAe;AAAA,IACf,YAAY,eAAe,WAAW;AAAA,KAErC,SAAS,IAAI,CAAC,GAAG,MAEhB,qCAAC;AAAA,IAAK,KAAK;AAAA,KAAI,CAAE,CAClB,CACH,CACF;AAEJ;AAEA,MAAM,cAAc;AAAA,EAIlB,UAAU,UAAU,UAAU,CAAC,UAAU,SAAS,UAAU,QAAQ,UAAU,OAAO,CAAC,CAAC,EAAE,WAAW,YAClG,kEACF;AACF;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,yBAAyB,SAAS,YAAY;AACpD,uBAAuB,YAAY;AAEnC,IAAO,iBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -14,6 +14,7 @@ const props = {
|
|
|
14
14
|
children: PropTypes.string.isRequired.description("Children")
|
|
15
15
|
};
|
|
16
16
|
DSMobileFooterText.propTypes = props;
|
|
17
|
+
DSMobileFooterText.displayName = "DSMobileFooterText";
|
|
17
18
|
const DSMobileFooterTextWithSchema = describe(DSMobileFooterText);
|
|
18
19
|
DSMobileFooterTextWithSchema.propTypes = props;
|
|
19
20
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileFooter/Text.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable jest/valid-describe */\n/* eslint-disable jest/valid-title */\nimport React from 'react';\nimport styled from 'styled-components';\nimport { textStyle, truncate, color } from '@elliemae/ds-system';\nimport { describe, PropTypes } from 'react-desc';\n\nconst Text = styled.p`\n margin: auto 0;\n ${truncate()}\n ${textStyle('body')}\n ${color('neutral', '800')}\n`;\n\nconst DSMobileFooterText = ({ children }) => <Text>{children}</Text>;\n\nconst props = {\n children: PropTypes.string.isRequired.description('Children'),\n};\n\nDSMobileFooterText.propTypes = props;\
|
|
5
|
-
"mappings": "AAAA;ACEA;AACA;AACA;AACA;AAEA,MAAM,OAAO,OAAO;AAAA;AAAA,IAEhB,SAAS;AAAA,IACT,UAAU,MAAM;AAAA,IAChB,MAAM,WAAW,KAAK;AAAA;AAG1B,MAAM,qBAAqB,CAAC,EAAE,eAAe,qCAAC,YAAM,QAAS;AAE7D,MAAM,QAAQ;AAAA,EACZ,UAAU,UAAU,OAAO,WAAW,YAAY,UAAU;AAC9D;AAEA,mBAAmB,YAAY;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable jest/valid-describe */\n/* eslint-disable jest/valid-title */\nimport React from 'react';\nimport styled from 'styled-components';\nimport { textStyle, truncate, color } from '@elliemae/ds-system';\nimport { describe, PropTypes } from 'react-desc';\n\nconst Text = styled.p`\n margin: auto 0;\n ${truncate()}\n ${textStyle('body')}\n ${color('neutral', '800')}\n`;\n\nconst DSMobileFooterText = ({ children }) => <Text>{children}</Text>;\n\nconst props = {\n children: PropTypes.string.isRequired.description('Children'),\n};\n\nDSMobileFooterText.propTypes = props;\nDSMobileFooterText.displayName = 'DSMobileFooterText';\nconst DSMobileFooterTextWithSchema = describe(DSMobileFooterText);\nDSMobileFooterTextWithSchema.propTypes = props;\n\nexport { DSMobileFooterText, DSMobileFooterTextWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA;ACEA;AACA;AACA;AACA;AAEA,MAAM,OAAO,OAAO;AAAA;AAAA,IAEhB,SAAS;AAAA,IACT,UAAU,MAAM;AAAA,IAChB,MAAM,WAAW,KAAK;AAAA;AAG1B,MAAM,qBAAqB,CAAC,EAAE,eAAe,qCAAC,YAAM,QAAS;AAE7D,MAAM,QAAQ;AAAA,EACZ,UAAU,UAAU,OAAO,WAAW,YAAY,UAAU;AAC9D;AAEA,mBAAmB,YAAY;AAC/B,mBAAmB,cAAc;AACjC,MAAM,+BAA+B,SAAS,kBAAkB;AAChE,6BAA6B,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -55,6 +55,7 @@ const listItemProps = {
|
|
|
55
55
|
theme: PropTypes.object.description("")
|
|
56
56
|
};
|
|
57
57
|
MobileListItem.propTypes = listItemProps;
|
|
58
|
+
MobileListItem.displayName = "MobileListItem";
|
|
58
59
|
const ListItemWithSchema = describe(MobileListItem);
|
|
59
60
|
ListItemWithSchema.propTypes = listItemProps;
|
|
60
61
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileListItem/MobileListItem.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { border, truncate, withTheme, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\n\nconst StyledContainer = styled(Grid)`\n background: ${(props) => props.theme.colors.neutral['000']};\n border-bottom: ${(props) => border(props.theme.colors.neutral['300'])};\n`;\nconst StyledTitle = styled.div`\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n font-size: 13px;\n color: ${(props) => props.theme.colors.neutral['800']};\n ${truncate()}\n`;\n\nconst MobileListItem = ({\n leftAddon = null,\n rightAddon = null,\n title = '',\n value = '',\n dataTestid = 'mobile-list-item',\n theme,\n}) => {\n const cols = [1];\n if (leftAddon) cols.unshift(__UNSAFE_SPACE_TO_DIMSUM(theme.space.m));\n if (rightAddon) cols.push(__UNSAFE_SPACE_TO_DIMSUM(theme.space.m));\n return (\n <StyledContainer\n cols={cols}\n height={theme.space.m}\n width=\"100%\"\n pl={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}\n pr={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}\n gutter=\"xs\"\n data-testid={`${dataTestid}--${value}`}\n >\n {leftAddon && (\n <Grid alignItems=\"center\" justifyContent=\"center\">\n {leftAddon}\n </Grid>\n )}\n <Grid alignItems=\"center\">\n <StyledTitle>{title}</StyledTitle>\n </Grid>\n {rightAddon && (\n <Grid alignItems=\"center\" justifyContent=\"center\">\n {rightAddon}\n </Grid>\n )}\n </StyledContainer>\n );\n};\n\nconst DSMobileListItem = withTheme(MobileListItem);\n\nconst listItemProps = {\n leftAddon: PropTypes.element.description('Element placed at the left'),\n rightAddon: PropTypes.element.description('Element placed at the right'),\n title: PropTypes.string.description('Item s title').isRequired,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description(\n 'Item s value, used for data-testid attr',\n ),\n dataTestid: PropTypes.string.description('ID used for testing').defaultValue('mobile-list-item'),\n theme: PropTypes.object.description(''),\n};\n\nMobileListItem.propTypes = listItemProps;\
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AAEA,MAAM,kBAAkB,OAAO,IAAI;AAAA,gBACnB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,mBACnC,CAAC,UAAU,OAAO,MAAM,MAAM,OAAO,QAAQ,MAAM;AAAA;AAEtE,MAAM,cAAc,OAAO;AAAA,iBACV,CAAC,UAAU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C;AAEA,eAAe,YAAY;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { border, truncate, withTheme, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\n\nconst StyledContainer = styled(Grid)`\n background: ${(props) => props.theme.colors.neutral['000']};\n border-bottom: ${(props) => border(props.theme.colors.neutral['300'])};\n`;\nconst StyledTitle = styled.div`\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n font-size: 13px;\n color: ${(props) => props.theme.colors.neutral['800']};\n ${truncate()}\n`;\n\nconst MobileListItem = ({\n leftAddon = null,\n rightAddon = null,\n title = '',\n value = '',\n dataTestid = 'mobile-list-item',\n theme,\n}) => {\n const cols = [1];\n if (leftAddon) cols.unshift(__UNSAFE_SPACE_TO_DIMSUM(theme.space.m));\n if (rightAddon) cols.push(__UNSAFE_SPACE_TO_DIMSUM(theme.space.m));\n return (\n <StyledContainer\n cols={cols}\n height={theme.space.m}\n width=\"100%\"\n pl={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}\n pr={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}\n gutter=\"xs\"\n data-testid={`${dataTestid}--${value}`}\n >\n {leftAddon && (\n <Grid alignItems=\"center\" justifyContent=\"center\">\n {leftAddon}\n </Grid>\n )}\n <Grid alignItems=\"center\">\n <StyledTitle>{title}</StyledTitle>\n </Grid>\n {rightAddon && (\n <Grid alignItems=\"center\" justifyContent=\"center\">\n {rightAddon}\n </Grid>\n )}\n </StyledContainer>\n );\n};\n\nconst DSMobileListItem = withTheme(MobileListItem);\n\nconst listItemProps = {\n leftAddon: PropTypes.element.description('Element placed at the left'),\n rightAddon: PropTypes.element.description('Element placed at the right'),\n title: PropTypes.string.description('Item s title').isRequired,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description(\n 'Item s value, used for data-testid attr',\n ),\n dataTestid: PropTypes.string.description('ID used for testing').defaultValue('mobile-list-item'),\n theme: PropTypes.object.description(''),\n};\n\nMobileListItem.propTypes = listItemProps;\nMobileListItem.displayName = 'MobileListItem';\nconst ListItemWithSchema = describe(MobileListItem);\nListItemWithSchema.propTypes = listItemProps;\n\nexport { DSMobileListItem, ListItemWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AAEA,MAAM,kBAAkB,OAAO,IAAI;AAAA,gBACnB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,mBACnC,CAAC,UAAU,OAAO,MAAM,MAAM,OAAO,QAAQ,MAAM;AAAA;AAEtE,MAAM,cAAc,OAAO;AAAA,iBACV,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA;AAAA,WAEzC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,IAC7C,SAAS;AAAA;AAGb,MAAM,iBAAiB,CAAC;AAAA,EACtB,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,aAAa;AAAA,EACb;AAAA,MACI;AACJ,QAAM,OAAO,CAAC,CAAC;AACf,MAAI;AAAW,SAAK,QAAQ,yBAAyB,MAAM,MAAM,CAAC,CAAC;AACnE,MAAI;AAAY,SAAK,KAAK,yBAAyB,MAAM,MAAM,CAAC,CAAC;AACjE,SACE,qCAAC;AAAA,IACC;AAAA,IACA,QAAQ,MAAM,MAAM;AAAA,IACpB,OAAM;AAAA,IACN,IAAI,yBAAyB,MAAM,MAAM,CAAC;AAAA,IAC1C,IAAI,yBAAyB,MAAM,MAAM,CAAC;AAAA,IAC1C,QAAO;AAAA,IACP,eAAa,GAAG,eAAe;AAAA,KAE9B,aACC,qCAAC;AAAA,IAAK,YAAW;AAAA,IAAS,gBAAe;AAAA,KACtC,SACH,GAEF,qCAAC;AAAA,IAAK,YAAW;AAAA,KACf,qCAAC,mBAAa,KAAM,CACtB,GACC,cACC,qCAAC;AAAA,IAAK,YAAW;AAAA,IAAS,gBAAe;AAAA,KACtC,UACH,CAEJ;AAEJ;AAEA,MAAM,mBAAmB,UAAU,cAAc;AAEjD,MAAM,gBAAgB;AAAA,EACpB,WAAW,UAAU,QAAQ,YAAY,4BAA4B;AAAA,EACrE,YAAY,UAAU,QAAQ,YAAY,6BAA6B;AAAA,EACvE,OAAO,UAAU,OAAO,YAAY,cAAc,EAAE;AAAA,EACpD,OAAO,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EAAE,YAC/D,yCACF;AAAA,EACA,YAAY,UAAU,OAAO,YAAY,qBAAqB,EAAE,aAAa,kBAAkB;AAAA,EAC/F,OAAO,UAAU,OAAO,YAAY,EAAE;AACxC;AAEA,eAAe,YAAY;AAC3B,eAAe,cAAc;AAC7B,MAAM,qBAAqB,SAAS,cAAc;AAClD,mBAAmB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -163,6 +163,7 @@ const pageHeaderProps = {
|
|
|
163
163
|
theme: PropTypes.object.description("dimsum theme")
|
|
164
164
|
};
|
|
165
165
|
MobilePageHeader.propTypes = pageHeaderProps;
|
|
166
|
+
MobilePageHeader.displayName = "MobilePageHeader";
|
|
166
167
|
const PageHeaderWithSchema = describe(MobilePageHeader);
|
|
167
168
|
PageHeaderWithSchema.propTypes = pageHeaderProps;
|
|
168
169
|
const DSMobilePageHeader = withTheme(MobilePageHeader);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobilePageHeader/MobilePageHeader.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable import/no-unresolved */\n/* eslint-disable no-plusplus */\n/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport React, { useMemo, useState, useCallback } from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport styled from 'styled-components';\nimport { TruncatedExpandableText } from '@elliemae/ds-truncated-expandable-text';\nimport { Grid } from '@elliemae/ds-grid';\nimport { border, truncate, withTheme, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport { ChevronSmallDown } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport MobileSeparator from '../MobileSeparator';\n\nconst StyledTitle = styled(Grid)`\n font-size: 22px;\n font-weight: ${(props) => props.theme.fontWeights.regular};\n color: ${(props) => props.theme.colors.neutral['700']};\n min-height: ${(props) => (props.withBreadcrumb ? 'auto' : '44px')};\n padding-top: ${(props) => (props.withBreadcrumb ? '0' : '6px')};\n`;\n\nconst StyledBreadCrumb = styled.div`\n font-size: 16px;\n font-weight: ${(props) => props.theme.fontWeights.regular};\n color: ${(props) => props.theme.colors.neutral['600']};\n ${truncate()}\n`;\n\nconst Label = styled.div`\n color: ${(props) => props.theme.colors.neutral['500']};\n ${truncate()}\n`;\n\nconst Value = styled.div`\n ${truncate()}\n color: ${(props) => props.theme.colors.neutral['600']};\n ${(props) => (props.withMarginRight ? `margin-right: 4px;` : '')}\n margin-top: ${(props) => (props.withBreadcrumb ? '12px' : '0')};\n`;\n\nconst Wrapper = styled(Grid)`\n border-bottom: ${(props) => border(props.theme.colors.neutral['300'])};\n`;\n\nconst MobilePageHeader = ({\n pageTitle = null,\n contextMenu = null,\n firstAction = null,\n secondAction = null,\n backArrow = null,\n breadCrumb = null,\n onOpenContextMenu = () => null,\n value,\n label,\n theme,\n}) => {\n const hasValue = value === 0 || value;\n\n const countActions = useMemo(() => {\n let count = 0;\n if (firstAction) count++;\n if (secondAction) count++;\n return count;\n }, [firstAction, secondAction]);\n const [open, setOpen] = useState();\n const handleContext = useCallback(() => {\n setOpen(!open);\n }, [open]);\n\n const separator = (\n <Grid height=\"32px\" alignItems=\"center\">\n <Grid height=\"24px\">\n <MobileSeparator direction=\"vertical\" margin=\"xxs\" color={['neutral', '300']} />\n </Grid>\n </Grid>\n );\n const cols = [1, 'auto'];\n const cols2 = ['auto'];\n if (countActions) cols.push('auto');\n if (hasValue) cols2.push('auto');\n if (label) cols2.push('auto');\n\n return (\n <Wrapper\n cols={cols}\n pl={theme.space.xs}\n pr={theme.space.xs}\n alignItems=\"flex-start\"\n width=\"100%\"\n data-testid=\"page-header-wrapper\"\n >\n <Grid alignItems=\"flex-start\" justifyContent=\"flex-start\" cols={cols2}>\n <Grid\n cols={backArrow ? ['auto', 1] : [1]}\n alignItems=\"flex-start\"\n pr={countActions === 0 && !hasValue && !label ? __UNSAFE_SPACE_TO_DIMSUM(theme.space.s) : 0}\n >\n {backArrow && (\n <Grid height={breadCrumb ? '56px' : '44px'} alignItems=\"center\">\n {backArrow}\n </Grid>\n )}\n <Grid flexGrow={0} pt={!breadCrumb ? 0 : theme.space.xxs}>\n <Grid cols={['auto', 'auto']} alignItems=\"flex-start\">\n <Grid>\n {breadCrumb && <StyledBreadCrumb data-testid=\"page-header-breadcrum\">{breadCrumb}</StyledBreadCrumb>}\n <StyledTitle\n maxWidth=\"100%\"\n alignItems=\"flex-start\"\n withBreadcrumb={!!breadCrumb}\n data-testid=\"page-header-title\"\n >\n <Grid pt={breadCrumb ? 0 : theme.space.xxxs}>\n <TruncatedExpandableText value={pageTitle} />\n </Grid>\n </StyledTitle>\n </Grid>\n {contextMenu && (\n <Grid alignItems=\"center\" mt={breadCrumb ? '20px' : '8px'}>\n <DSButton\n buttonType=\"text\"\n icon={<ChevronSmallDown />}\n size=\"s\"\n onClick={() => {\n handleContext();\n onOpenContextMenu();\n }}\n containerProps={{ 'data-testid': 'trigger-context-menu' }}\n />\n {React.cloneElement(contextMenu, {\n open: contextMenu.props.open !== undefined ? contextMenu.props.open : open,\n onChange: (event, item) => {\n if (contextMenu.props.onChange) contextMenu.props.onChange(event, item);\n handleContext();\n },\n })}\n </Grid>\n )}\n </Grid>\n </Grid>\n </Grid>\n {hasValue && (\n <Grid height={breadCrumb ? '56px' : '44px'} alignItems=\"center\" cols={['auto', 'auto']}>\n {separator}\n <Value withMarginRight={!!label} data-testid=\"page-header-value\">\n {value}\n </Value>\n </Grid>\n )}\n {label && (\n <Grid height={breadCrumb ? '56px' : '44px'} alignItems=\"center\">\n <Label withBreadcrumb={!!breadCrumb} data-testid=\"page-header-label\">\n {label}\n </Label>\n </Grid>\n )}\n </Grid>\n {countActions > 0 && (\n <Grid\n height={breadCrumb ? '56px' : '44px'}\n alignItems=\"center\"\n cols={countActions === 1 ? ['auto'] : ['auto', 'auto', 'auto']}\n >\n {firstAction && <Grid>{firstAction}</Grid>}\n {countActions === 2 && separator}\n {secondAction && <Grid>{secondAction}</Grid>}\n </Grid>\n )}\n </Wrapper>\n );\n};\n\nconst pageHeaderProps = {\n pageTitle: PropTypes.string.description('Page title').isRequired,\n contextMenu: PropTypes.element.description('Context Menu to open'),\n onOpenContextMenu: PropTypes.func.description('function called when context menu opens'),\n firstAction: PropTypes.element.description('Action Button'),\n secondAction: PropTypes.element.description('Action Button'),\n backArrow: PropTypes.element.description('Back Arrow Button'),\n breadCrumb: PropTypes.string.description('BreadCrumbs title'),\n value: PropTypes.number.description('Page summary value'),\n label: PropTypes.string.description('Page summary label'),\n theme: PropTypes.object.description('dimsum theme'),\n};\n\nMobilePageHeader.propTypes = pageHeaderProps;\
|
|
5
|
-
"mappings": "AAAA;ACIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,cAAc,OAAO,IAAI;AAAA;AAAA,iBAEd,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,WACzC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,gBACjC,CAAC,UAAW,MAAM,iBAAiB,SAAS;AAAA,iBAC3C,CAAC,UAAW,MAAM,iBAAiB,MAAM;AAAA;AAG1D,MAAM,mBAAmB,OAAO;AAAA;AAAA,iBAEf,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,WACzC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,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A,EAC5D,YAAY,UAAU,OAAO,YAAY,mBAAmB;AAAA,EAC5D,OAAO,UAAU,OAAO,YAAY,oBAAoB;AAAA,EACxD,OAAO,UAAU,OAAO,YAAY,oBAAoB;AAAA,EACxD,OAAO,UAAU,OAAO,YAAY,cAAc;AACpD;AAEA,iBAAiB,YAAY;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable import/no-unresolved */\n/* eslint-disable no-plusplus */\n/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport React, { useMemo, useState, useCallback } from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport styled from 'styled-components';\nimport { TruncatedExpandableText } from '@elliemae/ds-truncated-expandable-text';\nimport { Grid } from '@elliemae/ds-grid';\nimport { border, truncate, withTheme, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport { ChevronSmallDown } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport MobileSeparator from '../MobileSeparator';\n\nconst StyledTitle = styled(Grid)`\n font-size: 22px;\n font-weight: ${(props) => props.theme.fontWeights.regular};\n color: ${(props) => props.theme.colors.neutral['700']};\n min-height: ${(props) => (props.withBreadcrumb ? 'auto' : '44px')};\n padding-top: ${(props) => (props.withBreadcrumb ? '0' : '6px')};\n`;\n\nconst StyledBreadCrumb = styled.div`\n font-size: 16px;\n font-weight: ${(props) => props.theme.fontWeights.regular};\n color: ${(props) => props.theme.colors.neutral['600']};\n ${truncate()}\n`;\n\nconst Label = styled.div`\n color: ${(props) => props.theme.colors.neutral['500']};\n ${truncate()}\n`;\n\nconst Value = styled.div`\n ${truncate()}\n color: ${(props) => props.theme.colors.neutral['600']};\n ${(props) => (props.withMarginRight ? `margin-right: 4px;` : '')}\n margin-top: ${(props) => (props.withBreadcrumb ? '12px' : '0')};\n`;\n\nconst Wrapper = styled(Grid)`\n border-bottom: ${(props) => border(props.theme.colors.neutral['300'])};\n`;\n\nconst MobilePageHeader = ({\n pageTitle = null,\n contextMenu = null,\n firstAction = null,\n secondAction = null,\n backArrow = null,\n breadCrumb = null,\n onOpenContextMenu = () => null,\n value,\n label,\n theme,\n}) => {\n const hasValue = value === 0 || value;\n\n const countActions = useMemo(() => {\n let count = 0;\n if (firstAction) count++;\n if (secondAction) count++;\n return count;\n }, [firstAction, secondAction]);\n const [open, setOpen] = useState();\n const handleContext = useCallback(() => {\n setOpen(!open);\n }, [open]);\n\n const separator = (\n <Grid height=\"32px\" alignItems=\"center\">\n <Grid height=\"24px\">\n <MobileSeparator direction=\"vertical\" margin=\"xxs\" color={['neutral', '300']} />\n </Grid>\n </Grid>\n );\n const cols = [1, 'auto'];\n const cols2 = ['auto'];\n if (countActions) cols.push('auto');\n if (hasValue) cols2.push('auto');\n if (label) cols2.push('auto');\n\n return (\n <Wrapper\n cols={cols}\n pl={theme.space.xs}\n pr={theme.space.xs}\n alignItems=\"flex-start\"\n width=\"100%\"\n data-testid=\"page-header-wrapper\"\n >\n <Grid alignItems=\"flex-start\" justifyContent=\"flex-start\" cols={cols2}>\n <Grid\n cols={backArrow ? ['auto', 1] : [1]}\n alignItems=\"flex-start\"\n pr={countActions === 0 && !hasValue && !label ? __UNSAFE_SPACE_TO_DIMSUM(theme.space.s) : 0}\n >\n {backArrow && (\n <Grid height={breadCrumb ? '56px' : '44px'} alignItems=\"center\">\n {backArrow}\n </Grid>\n )}\n <Grid flexGrow={0} pt={!breadCrumb ? 0 : theme.space.xxs}>\n <Grid cols={['auto', 'auto']} alignItems=\"flex-start\">\n <Grid>\n {breadCrumb && <StyledBreadCrumb data-testid=\"page-header-breadcrum\">{breadCrumb}</StyledBreadCrumb>}\n <StyledTitle\n maxWidth=\"100%\"\n alignItems=\"flex-start\"\n withBreadcrumb={!!breadCrumb}\n data-testid=\"page-header-title\"\n >\n <Grid pt={breadCrumb ? 0 : theme.space.xxxs}>\n <TruncatedExpandableText value={pageTitle} />\n </Grid>\n </StyledTitle>\n </Grid>\n {contextMenu && (\n <Grid alignItems=\"center\" mt={breadCrumb ? '20px' : '8px'}>\n <DSButton\n buttonType=\"text\"\n icon={<ChevronSmallDown />}\n size=\"s\"\n onClick={() => {\n handleContext();\n onOpenContextMenu();\n }}\n containerProps={{ 'data-testid': 'trigger-context-menu' }}\n />\n {React.cloneElement(contextMenu, {\n open: contextMenu.props.open !== undefined ? contextMenu.props.open : open,\n onChange: (event, item) => {\n if (contextMenu.props.onChange) contextMenu.props.onChange(event, item);\n handleContext();\n },\n })}\n </Grid>\n )}\n </Grid>\n </Grid>\n </Grid>\n {hasValue && (\n <Grid height={breadCrumb ? '56px' : '44px'} alignItems=\"center\" cols={['auto', 'auto']}>\n {separator}\n <Value withMarginRight={!!label} data-testid=\"page-header-value\">\n {value}\n </Value>\n </Grid>\n )}\n {label && (\n <Grid height={breadCrumb ? '56px' : '44px'} alignItems=\"center\">\n <Label withBreadcrumb={!!breadCrumb} data-testid=\"page-header-label\">\n {label}\n </Label>\n </Grid>\n )}\n </Grid>\n {countActions > 0 && (\n <Grid\n height={breadCrumb ? '56px' : '44px'}\n alignItems=\"center\"\n cols={countActions === 1 ? ['auto'] : ['auto', 'auto', 'auto']}\n >\n {firstAction && <Grid>{firstAction}</Grid>}\n {countActions === 2 && separator}\n {secondAction && <Grid>{secondAction}</Grid>}\n </Grid>\n )}\n </Wrapper>\n );\n};\n\nconst pageHeaderProps = {\n pageTitle: PropTypes.string.description('Page title').isRequired,\n contextMenu: PropTypes.element.description('Context Menu to open'),\n onOpenContextMenu: PropTypes.func.description('function called when context menu opens'),\n firstAction: PropTypes.element.description('Action Button'),\n secondAction: PropTypes.element.description('Action Button'),\n backArrow: PropTypes.element.description('Back Arrow Button'),\n breadCrumb: PropTypes.string.description('BreadCrumbs title'),\n value: PropTypes.number.description('Page summary value'),\n label: PropTypes.string.description('Page summary label'),\n theme: PropTypes.object.description('dimsum theme'),\n};\n\nMobilePageHeader.propTypes = pageHeaderProps;\nMobilePageHeader.displayName = 'MobilePageHeader';\nconst PageHeaderWithSchema = describe(MobilePageHeader);\nPageHeaderWithSchema.propTypes = pageHeaderProps;\n\nconst DSMobilePageHeader = withTheme(MobilePageHeader);\n\nexport { DSMobilePageHeader, PageHeaderWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA;ACIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,cAAc,OAAO,IAAI;AAAA;AAAA,iBAEd,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,WACzC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,gBACjC,CAAC,UAAW,MAAM,iBAAiB,SAAS;AAAA,iBAC3C,CAAC,UAAW,MAAM,iBAAiB,MAAM;AAAA;AAG1D,MAAM,mBAAmB,OAAO;AAAA;AAAA,iBAEf,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,WACzC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,IAC7C,SAAS;AAAA;AAGb,MAAM,QAAQ,OAAO;AAAA,WACV,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,IAC7C,SAAS;AAAA;AAGb,MAAM,QAAQ,OAAO;AAAA,IACjB,SAAS;AAAA,WACF,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,IAC7C,CAAC,UAAW,MAAM,kBAAkB,uBAAuB;AAAA,gBAC/C,CAAC,UAAW,MAAM,iBAAiB,SAAS;AAAA;AAG5D,MAAM,UAAU,OAAO,IAAI;AAAA,mBACR,CAAC,UAAU,OAAO,MAAM,MAAM,OAAO,QAAQ,MAAM;AAAA;AAGtE,MAAM,mBAAmB,CAAC;AAAA,EACxB,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,cAAc;AAAA,EACd,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,oBAAoB,MAAM;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,MACI;AACJ,QAAM,WAAW,UAAU,KAAK;AAEhC,QAAM,eAAe,QAAQ,MA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GACC,eAAe,KACd,qCAAC;AAAA,IACC,QAAQ,aAAa,SAAS;AAAA,IAC9B,YAAW;AAAA,IACX,MAAM,iBAAiB,IAAI,CAAC,MAAM,IAAI,CAAC,QAAQ,QAAQ,MAAM;AAAA,KAE5D,eAAe,qCAAC,YAAM,WAAY,GAClC,iBAAiB,KAAK,WACtB,gBAAgB,qCAAC,YAAM,YAAa,CACvC,CAEJ;AAEJ;AAEA,MAAM,kBAAkB;AAAA,EACtB,WAAW,UAAU,OAAO,YAAY,YAAY,EAAE;AAAA,EACtD,aAAa,UAAU,QAAQ,YAAY,sBAAsB;AAAA,EACjE,mBAAmB,UAAU,KAAK,YAAY,yCAAyC;AAAA,EACvF,aAAa,UAAU,QAAQ,YAAY,eAAe;AAAA,EAC1D,cAAc,UAAU,QAAQ,YAAY,eAAe;AAAA,EAC3D,WAAW,UAAU,QAAQ,YAAY,mBAAmB;AAAA,EAC5D,YAAY,UAAU,OAAO,YAAY,mBAAmB;AAAA,EAC5D,OAAO,UAAU,OAAO,YAAY,oBAAoB;AAAA,EACxD,OAAO,UAAU,OAAO,YAAY,oBAAoB;AAAA,EACxD,OAAO,UAAU,OAAO,YAAY,cAAc;AACpD;AAEA,iBAAiB,YAAY;AAC7B,iBAAiB,cAAc;AAC/B,MAAM,uBAAuB,SAAS,gBAAgB;AACtD,qBAAqB,YAAY;AAEjC,MAAM,qBAAqB,UAAU,gBAAgB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -43,6 +43,7 @@ const mobileSeparatorProps = {
|
|
|
43
43
|
margin: PropTypes.oneOf(["xxs", "xs", "s", "m", "l", "xl", "xxl"]).description("Margin of the separator").defaultValue("xs")
|
|
44
44
|
};
|
|
45
45
|
MobileSeparator.propTypes = mobileSeparatorProps;
|
|
46
|
+
MobileSeparator.displayName = "MobileSeparator";
|
|
46
47
|
const MobileSeparatorWithSchema = describe(MobileSeparator);
|
|
47
48
|
MobileSeparatorWithSchema.propTypes = mobileSeparatorProps;
|
|
48
49
|
var Separator_default = MobileSeparator;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileSeparator/Separator.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\n\nconst Separator = styled(Grid)`\n border-top: ${({ theme, color, borderType }) => `${theme.colors[color[0]][color[1]]} 1px ${borderType}`};\n border-left: ${({ theme, color, borderType }) => `${theme.colors[color[0]][color[1]]} 1px ${borderType}`};\n`;\n\nconst MobileSeparator = ({ color = ['neutral', '800'], direction = 'horizontal', type = 'solid', margin = 'xs' }) => {\n const orientation = direction === 'vertical' ? 'height' : 'width';\n const xORy = direction === 'vertical' ? 'mx' : 'my';\n const styles = {\n width: 0,\n height: 0,\n [orientation]: '100%',\n [xORy]: margin,\n borderType: type,\n color,\n };\n return <Separator {...styles} />;\n};\n\nconst mobileSeparatorProps = {\n type: PropTypes.oneOf(['solid', 'dashed']).description('Style type of separator').defaultValue('solid'),\n direction: PropTypes.oneOf(['vertical', 'horizontal'])\n .description('Direction of the separator')\n .defaultValue('horizontal'),\n color: PropTypes.array.description('Color of the separator').defaultValue(['neutral', '800']),\n margin: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'])\n .description('Margin of the separator')\n .defaultValue('xs'),\n};\n\nMobileSeparator.propTypes = mobileSeparatorProps;\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AAEA,MAAM,YAAY,OAAO,IAAI;AAAA,gBACb,CAAC,EAAE,OAAO,OAAO,iBAAiB,GAAG,MAAM,OAAO,MAAM,IAAI,MAAM,WAAW;AAAA,iBAC5E,CAAC,EAAE,OAAO,OAAO,iBAAiB,GAAG,MAAM,OAAO,MAAM,IAAI,MAAM,WAAW;AAAA;AAG9F,MAAM,kBAAkB,CAAC,EAAE,QAAQ,CAAC,WAAW,KAAK,GAAG,YAAY,cAAc,OAAO,SAAS,SAAS,WAAW;AACnH,QAAM,cAAc,cAAc,aAAa,WAAW;AAC1D,QAAM,OAAO,cAAc,aAAa,OAAO;AAC/C,QAAM,SAAS;AAAA,IACb,OAAO;AAAA,IACP,QAAQ;AAAA,KACP,cAAc;AAAA,KACd,OAAO;AAAA,IACR,YAAY;AAAA,IACZ;AAAA,EACF;AACA,SAAO,qCAAC,8BAAc,OAAQ;AAChC;AAEA,MAAM,uBAAuB;AAAA,EAC3B,MAAM,UAAU,MAAM,CAAC,SAAS,QAAQ,CAAC,EAAE,YAAY,yBAAyB,EAAE,aAAa,OAAO;AAAA,EACtG,WAAW,UAAU,MAAM,CAAC,YAAY,YAAY,CAAC,EAClD,YAAY,4BAA4B,EACxC,aAAa,YAAY;AAAA,EAC5B,OAAO,UAAU,MAAM,YAAY,wBAAwB,EAAE,aAAa,CAAC,WAAW,KAAK,CAAC;AAAA,EAC5F,QAAQ,UAAU,MAAM,CAAC,OAAO,MAAM,KAAK,KAAK,KAAK,MAAM,KAAK,CAAC,EAC9D,YAAY,yBAAyB,EACrC,aAAa,IAAI;AACtB;AAEA,gBAAgB,YAAY;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\n\nconst Separator = styled(Grid)`\n border-top: ${({ theme, color, borderType }) => `${theme.colors[color[0]][color[1]]} 1px ${borderType}`};\n border-left: ${({ theme, color, borderType }) => `${theme.colors[color[0]][color[1]]} 1px ${borderType}`};\n`;\n\nconst MobileSeparator = ({ color = ['neutral', '800'], direction = 'horizontal', type = 'solid', margin = 'xs' }) => {\n const orientation = direction === 'vertical' ? 'height' : 'width';\n const xORy = direction === 'vertical' ? 'mx' : 'my';\n const styles = {\n width: 0,\n height: 0,\n [orientation]: '100%',\n [xORy]: margin,\n borderType: type,\n color,\n };\n return <Separator {...styles} />;\n};\n\nconst mobileSeparatorProps = {\n type: PropTypes.oneOf(['solid', 'dashed']).description('Style type of separator').defaultValue('solid'),\n direction: PropTypes.oneOf(['vertical', 'horizontal'])\n .description('Direction of the separator')\n .defaultValue('horizontal'),\n color: PropTypes.array.description('Color of the separator').defaultValue(['neutral', '800']),\n margin: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'])\n .description('Margin of the separator')\n .defaultValue('xs'),\n};\n\nMobileSeparator.propTypes = mobileSeparatorProps;\nMobileSeparator.displayName = 'MobileSeparator';\nconst MobileSeparatorWithSchema = describe(MobileSeparator);\nMobileSeparatorWithSchema.propTypes = mobileSeparatorProps;\n\nexport { MobileSeparatorWithSchema };\nexport default MobileSeparator;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AAEA,MAAM,YAAY,OAAO,IAAI;AAAA,gBACb,CAAC,EAAE,OAAO,OAAO,iBAAiB,GAAG,MAAM,OAAO,MAAM,IAAI,MAAM,WAAW;AAAA,iBAC5E,CAAC,EAAE,OAAO,OAAO,iBAAiB,GAAG,MAAM,OAAO,MAAM,IAAI,MAAM,WAAW;AAAA;AAG9F,MAAM,kBAAkB,CAAC,EAAE,QAAQ,CAAC,WAAW,KAAK,GAAG,YAAY,cAAc,OAAO,SAAS,SAAS,WAAW;AACnH,QAAM,cAAc,cAAc,aAAa,WAAW;AAC1D,QAAM,OAAO,cAAc,aAAa,OAAO;AAC/C,QAAM,SAAS;AAAA,IACb,OAAO;AAAA,IACP,QAAQ;AAAA,KACP,cAAc;AAAA,KACd,OAAO;AAAA,IACR,YAAY;AAAA,IACZ;AAAA,EACF;AACA,SAAO,qCAAC,8BAAc,OAAQ;AAChC;AAEA,MAAM,uBAAuB;AAAA,EAC3B,MAAM,UAAU,MAAM,CAAC,SAAS,QAAQ,CAAC,EAAE,YAAY,yBAAyB,EAAE,aAAa,OAAO;AAAA,EACtG,WAAW,UAAU,MAAM,CAAC,YAAY,YAAY,CAAC,EAClD,YAAY,4BAA4B,EACxC,aAAa,YAAY;AAAA,EAC5B,OAAO,UAAU,MAAM,YAAY,wBAAwB,EAAE,aAAa,CAAC,WAAW,KAAK,CAAC;AAAA,EAC5F,QAAQ,UAAU,MAAM,CAAC,OAAO,MAAM,KAAK,KAAK,KAAK,MAAM,KAAK,CAAC,EAC9D,YAAY,yBAAyB,EACrC,aAAa,IAAI;AACtB;AAEA,gBAAgB,YAAY;AAC5B,gBAAgB,cAAc;AAC9B,MAAM,4BAA4B,SAAS,eAAe;AAC1D,0BAA0B,YAAY;AAGtC,IAAO,oBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -68,6 +68,7 @@ const pickerProps = {
|
|
|
68
68
|
value: PropTypes.string.description("HH:MM string representing the time or empty string")
|
|
69
69
|
};
|
|
70
70
|
DSMobileTimePicker.propTypes = pickerProps;
|
|
71
|
+
DSMobileTimePicker.displayName = "DSMobileTimePicker";
|
|
71
72
|
const DSMobileTimePickerWithSchema = describe(DSMobileTimePicker).description("Time picker for mobile & tablet");
|
|
72
73
|
DSMobileTimePickerWithSchema.propTypes = pickerProps;
|
|
73
74
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileTimePicker/MobileTimePicker.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useRef, useMemo, useEffect } from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { DSIconColors } from '@elliemae/ds-icon';\nimport { RecentDocuments } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport { DSInputGroup } from '@elliemae/ds-form';\nimport { Input } from './Input';\n\nconst DSMobileTimePicker = ({ disabled, value, tabIndex, placeholder, onChange }) => {\n const inputRef = useRef(null);\n const valueArr = value.split(':');\n useEffect(() => {\n /*\n necessary if value is being set in mount, \n otherwise the clear won't work on the first click\n [SEE input onChange comment]\n */\n if (inputRef.current) {\n inputRef.current.defaultValue = '';\n }\n }, [inputRef.current]);\n const displayValue = useMemo(() => {\n if (!value || !valueArr[0] || !valueArr[1]) return '';\n const ampm = valueArr[0] >= 12 ? 'pm' : 'am';\n const h = valueArr[0] > 12 ? valueArr[0] - 12 : valueArr[0];\n\n return `${h} : ${valueArr[1]} ${ampm}`;\n }, [value]);\n\n return (\n <DSInputGroup\n rightAddon={\n <DSButton\n aria-label=\"Time Picker Button\"\n color={!disabled ? DSIconColors.PRIMARY : DSIconColors.NEUTRAL}\n disabled={disabled}\n icon={<RecentDocuments />}\n type=\"button\"\n buttonType=\"secondary\"\n onClick={() => {\n inputRef.current.focus();\n inputRef.current.click();\n }}\n />\n }\n >\n <Input\n innerRef={inputRef}\n type=\"time\"\n data-testid=\"ds-mobile-time-picker\"\n aria-label=\"Time Picker Input Mask\"\n disabled={disabled}\n placeholder={placeholder}\n tabIndex={tabIndex}\n value={value}\n data-displayvalue={displayValue}\n onChange={(e) => {\n // https://github.com/facebook/react/issues/8938#issuecomment-360573204\n const { target } = e.nativeEvent;\n function iosClearDefault() {\n target.defaultValue = '';\n }\n window.setTimeout(iosClearDefault, 0);\n onChange(e);\n }}\n />\n </DSInputGroup>\n );\n};\n\nDSMobileTimePicker.defaultProps = {\n disabled: false,\n tabIndex: 0,\n placeholder: 'HH : MM am',\n value: '',\n};\n\nconst pickerProps = {\n /**\n * defaults to false\n */\n disabled: PropTypes.bool.description('disabled prop, defaults to false'),\n /**\n * 0 as default\n */\n tabIndex: PropTypes.number.description('focus order HTML property, 0 as default'),\n /**\n * HH : MM am as default\n */\n placeholder: PropTypes.string.description('HH : MM am as default'),\n /**\n * onChange handler, receives change event as first argument\n */\n onChange: PropTypes.func.description('onChange handler, receives change event as first argument'),\n /**\n * HH:MM string representing the time or empty string\n */\n value: PropTypes.string.description('HH:MM string representing the time or empty string'),\n};\n\nDSMobileTimePicker.propTypes = pickerProps;\
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,qBAAqB,CAAC,EAAE,UAAU,OAAO,UAAU,aAAa,eAAe;AACnF,QAAM,WAAW,OAAO,IAAI;AAC5B,QAAM,WAAW,MAAM,MAAM,GAAG;AAChC,YAAU,MAAM;AAMd,QAAI,SAAS,SAAS;AACpB,eAAS,QAAQ,eAAe;AAAA,IAClC;AAAA,EACF,GAAG,CAAC,SAAS,OAAO,CAAC;AACrB,QAAM,eAAe,QAAQ,MAAM;AACjC,QAAI,CAAC,SAAS,CAAC,SAAS,MAAM,CAAC,SAAS;AAAI,aAAO;AACnD,UAAM,OAAO,SAAS,MAAM,KAAK,OAAO;AACxC,UAAM,IAAI,SAAS,KAAK,KAAK,SAAS,KAAK,KAAK,SAAS;AAEzD,WAAO,GAAG,OAAO,SAAS,MAAM;AAAA,EAClC,GAAG,CAAC,KAAK,CAAC;AAEV,SACE,qCAAC;AAAA,IACC,YACE,qCAAC;AAAA,MACC,cAAW;AAAA,MACX,OAAO,CAAC,WAAW,aAAa,UAAU,aAAa;AAAA,MACvD;AAAA,MACA,MAAM,qCAAC,qBAAgB;AAAA,MACvB,MAAK;AAAA,MACL,YAAW;AAAA,MACX,SAAS,MAAM;AACb,iBAAS,QAAQ,MAAM;AACvB,iBAAS,QAAQ,MAAM;AAAA,MACzB;AAAA,KACF;AAAA,KAGF,qCAAC;AAAA,IACC,UAAU;AAAA,IACV,MAAK;AAAA,IACL,eAAY;AAAA,IACZ,cAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,qBAAmB;AAAA,IACnB,UAAU,CAAC,MAAM;AAEf,YAAM,EAAE,WAAW,EAAE;AACrB,iCAA2B;AACzB,eAAO,eAAe;AAAA,MACxB;AACA,aAAO,WAAW,iBAAiB,CAAC;AACpC,eAAS,CAAC;AAAA,IACZ;AAAA,GACF,CACF;AAEJ;AAEA,mBAAmB,eAAe;AAAA,EAChC,UAAU;AAAA,EACV,UAAU;AAAA,EACV,aAAa;AAAA,EACb,OAAO;AACT;AAEA,MAAM,cAAc;AAAA,EAIlB,UAAU,UAAU,KAAK,YAAY,kCAAkC;AAAA,EAIvE,UAAU,UAAU,OAAO,YAAY,yCAAyC;AAAA,EAIhF,aAAa,UAAU,OAAO,YAAY,uBAAuB;AAAA,EAIjE,UAAU,UAAU,KAAK,YAAY,2DAA2D;AAAA,EAIhG,OAAO,UAAU,OAAO,YAAY,oDAAoD;AAC1F;AAEA,mBAAmB,YAAY;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useRef, useMemo, useEffect } from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { DSIconColors } from '@elliemae/ds-icon';\nimport { RecentDocuments } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport { DSInputGroup } from '@elliemae/ds-form';\nimport { Input } from './Input';\n\nconst DSMobileTimePicker = ({ disabled, value, tabIndex, placeholder, onChange }) => {\n const inputRef = useRef(null);\n const valueArr = value.split(':');\n useEffect(() => {\n /*\n necessary if value is being set in mount, \n otherwise the clear won't work on the first click\n [SEE input onChange comment]\n */\n if (inputRef.current) {\n inputRef.current.defaultValue = '';\n }\n }, [inputRef.current]);\n const displayValue = useMemo(() => {\n if (!value || !valueArr[0] || !valueArr[1]) return '';\n const ampm = valueArr[0] >= 12 ? 'pm' : 'am';\n const h = valueArr[0] > 12 ? valueArr[0] - 12 : valueArr[0];\n\n return `${h} : ${valueArr[1]} ${ampm}`;\n }, [value]);\n\n return (\n <DSInputGroup\n rightAddon={\n <DSButton\n aria-label=\"Time Picker Button\"\n color={!disabled ? DSIconColors.PRIMARY : DSIconColors.NEUTRAL}\n disabled={disabled}\n icon={<RecentDocuments />}\n type=\"button\"\n buttonType=\"secondary\"\n onClick={() => {\n inputRef.current.focus();\n inputRef.current.click();\n }}\n />\n }\n >\n <Input\n innerRef={inputRef}\n type=\"time\"\n data-testid=\"ds-mobile-time-picker\"\n aria-label=\"Time Picker Input Mask\"\n disabled={disabled}\n placeholder={placeholder}\n tabIndex={tabIndex}\n value={value}\n data-displayvalue={displayValue}\n onChange={(e) => {\n // https://github.com/facebook/react/issues/8938#issuecomment-360573204\n const { target } = e.nativeEvent;\n function iosClearDefault() {\n target.defaultValue = '';\n }\n window.setTimeout(iosClearDefault, 0);\n onChange(e);\n }}\n />\n </DSInputGroup>\n );\n};\n\nDSMobileTimePicker.defaultProps = {\n disabled: false,\n tabIndex: 0,\n placeholder: 'HH : MM am',\n value: '',\n};\n\nconst pickerProps = {\n /**\n * defaults to false\n */\n disabled: PropTypes.bool.description('disabled prop, defaults to false'),\n /**\n * 0 as default\n */\n tabIndex: PropTypes.number.description('focus order HTML property, 0 as default'),\n /**\n * HH : MM am as default\n */\n placeholder: PropTypes.string.description('HH : MM am as default'),\n /**\n * onChange handler, receives change event as first argument\n */\n onChange: PropTypes.func.description('onChange handler, receives change event as first argument'),\n /**\n * HH:MM string representing the time or empty string\n */\n value: PropTypes.string.description('HH:MM string representing the time or empty string'),\n};\n\nDSMobileTimePicker.propTypes = pickerProps;\nDSMobileTimePicker.displayName = 'DSMobileTimePicker';\nconst DSMobileTimePickerWithSchema = describe(DSMobileTimePicker).description('Time picker for mobile & tablet');\n\nDSMobileTimePickerWithSchema.propTypes = pickerProps;\n\nexport { DSMobileTimePicker, DSMobileTimePickerWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,qBAAqB,CAAC,EAAE,UAAU,OAAO,UAAU,aAAa,eAAe;AACnF,QAAM,WAAW,OAAO,IAAI;AAC5B,QAAM,WAAW,MAAM,MAAM,GAAG;AAChC,YAAU,MAAM;AAMd,QAAI,SAAS,SAAS;AACpB,eAAS,QAAQ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K,YAAY,2DAA2D;AAAA,EAIhG,OAAO,UAAU,OAAO,YAAY,oDAAoD;AAC1F;AAEA,mBAAmB,YAAY;AAC/B,mBAAmB,cAAc;AACjC,MAAM,+BAA+B,SAAS,kBAAkB,EAAE,YAAY,iCAAiC;AAE/G,6BAA6B,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/Modal/Modal.js
CHANGED
|
@@ -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 'react-desc';\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';\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}) => {\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 <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 </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.propTypes = modalProps;\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,QAAQ,CAAC;AAAA,EACb,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,UAAU;AAAA,EACV,sBAAsB;AAAA,EACtB,uBAAuB;AAAA,IACr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IAEC,WAAW,qBAAqB,aAAa;AAAA,IAC7C,YAAW;AAAA,IACX,eAAY;AAAA,IACd,GAEF,qCAAC;AAAA,IACC,WAAW,mBAAmB,aAAa;AAAA,KACvC,qBAFL;AAAA,IAGC,YAAW;AAAA,IACX,eAAY;AAAA,IACd,CACF,CACF,CACF,CACF,CACF;AAEJ;AAEA,MAAM,aAAa;AAAA,EACjB,QAAQ,UAAU,KAAK,YAAY,oCAAoC,EAAE,aAAa,KAAK;AAAA,EAC3F,QAAQ,UAAU,OAAO,YAAY,eAAe,EAAE,aAAa,CAAC;AAAA,EACpE,OAAO,UAAU,OAAO,YAAY,eAAe,EAAE;AAAA,EACrD,aAAa,UAAU,OAAO,YAAY,iBAAiB,EAAE;AAAA,EAC7D,SAAS,UAAU,KAAK,YAAY,yCAAyC;AAAA,EAC7E,qBAAqB,UAAU,KAAK,YAAY,+CAA+C,EAAE,aAAa,IAAI;AAAA,EAClH,sBAAsB,UAAU,MAAM;AAAA,IACpC,SAAS,UAAU;AAAA,IACnB,WAAW,UAAU;AAAA,EACvB,CAAC,EAAE,YAAY,wBAAwB;AAAA,EACvC,oBAAoB,UAAU,MAAM;AAAA,IAClC,SAAS,UAAU;AAAA,IACnB,WAAW,UAAU;AAAA,EACvB,CAAC,EAAE,YAAY,sBAAsB;AACvC;AAEA,MAAM,YAAY;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { describe, PropTypes } from 'react-desc';\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';\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}) => {\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 <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 </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.propTypes = modalProps;\nModal.displayName = 'Modal';\nconst ModalWithSchema = describe(Modal);\nModalWithSchema.propTypes = modalProps;\n\nexport { Modal, ModalWithSchema };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,QAAQ,CAAC;AAAA,EACb,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,UAAU;AAAA,EACV,sBAAsB;AAAA,EACtB,uBAAuB;AAAA,IACrB,SAAS;AAAA,IACT,WAAW;AAAA,EACb;AAAA,EACA,qBAAqB;AAAA,IACnB,SAAS;AAAA,IACT,WAAW;AAAA,EACb;AAAA,EACA,SAAS;AAAA,MACL;AACJ,QAAM,QAAQ,SAAS;AACvB,MAAI,CAAC;AAAQ,WAAO;AACpB,SACE,4DACE,qCAAC;AAAA,IAAQ;AAAA,GAAgB,GACzB,qCAAC;AAAA,IAAW,SAAS;AAAA,IAAS;AAAA,GAAgB,GAC9C,qCAAC;AAAA,IAAc;AAAA,IAAgB,MAAM,CAAC,MAAM;AAAA,KAC1C,qCAAC;AAAA,IACC,WAAW,GAAG,OAAO,cAAc;AAAA,IACnC,MAAM,CAAC,GAAG,MAAM;AAAA,IAChB,OAAO;AAAA,MACL,UAAU;AAAA,IACZ;AAAA,KAEA,qCAAC;AAAA,IACC,IAAG;AAAA,IACH,IAAG;AAAA,IACH,OAAO;AAAA,MACL,UAAU;AAAA,IACZ;AAAA,KAEA,qCAAC;AAAA,IACC,MAAM,CAAC,QAAQ,QAAQ,CAAC;AAAA,IACxB,OAAO;AAAA,MACL,UAAU;AAAA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AAA,EACvC,oBAAoB,UAAU,MAAM;AAAA,IAClC,SAAS,UAAU;AAAA,IACnB,WAAW,UAAU;AAAA,EACvB,CAAC,EAAE,YAAY,sBAAsB;AACvC;AAEA,MAAM,YAAY;AAClB,MAAM,cAAc;AACpB,MAAM,kBAAkB,SAAS,KAAK;AACtC,gBAAgB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -62,6 +62,7 @@ const navProps = {
|
|
|
62
62
|
bottomMenuItems: menuProps.description("Bottom Menu items array")
|
|
63
63
|
};
|
|
64
64
|
DSSideNav.propTypes = navProps;
|
|
65
|
+
DSSideNav.displayName = "DSSideNav";
|
|
65
66
|
const DSSideNavWithSchema = describe(DSSideNav).description("Side navigation for mobile and tablet");
|
|
66
67
|
DSSideNavWithSchema.propTypes = navProps;
|
|
67
68
|
export {
|
|
@@ -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 'react-desc';\nimport { noop } from 'lodash';\nimport Logo from '../Icons/EM_logo';\nimport { Container, Menu, Heading, Icon, Hr, MenuList, BottomMenu, MenuWrapper } from './styles';\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 */\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C,mBACC,qCAAC,eACC,qCAAC,YAAM,KAAK,CAAE,GACd,qCAAC;AAAA,IAAI,WAAU;AAAA,KACb,qCAAC,eAAO,KAAM,GACd,qCAAC,YAAK,GACN,qCAAC;AAAA,IAAI,WAAU;AAAA,KACb,qCAAC;AAAA,IAAM,SAAS;AAAA,IAAS,MAAM,YAAY;AAAA,IAAG,OAAO,aAAa;AAAA,GAAO,CAC3E,CACF,CACF,GACA,qCAAC,QAAG,GACH,eAAe,GACf,gBAAgB,SAAS,IACxB,qCAAC,kBACC,qCAAC;AAAA,IAAI,WAAU;AAAA,KACb,qCAAC,UAAG,GACH,iBAAiB,CACpB,CACF,IACE,IACN,CACF,CACF;AAEJ;AAEA,MAAM,YAAY,UAAU,QAC1B,UAAU,MAAM;AAAA,EACd,MAAM,UAAU;AAAA,EAChB,MAAM,UAAU;AAClB,CAAC,CACH;AAEA,MAAM,WAAW;AAAA,EAEf,gBAAgB,UAAU,OAAO,YAAY,6CAA6C;AAAA,EAI1F,OAAO,UAAU,OAAO,WAAW,YAAY,eAAe;AAAA,EAI9D,SAAS,UAAU,KAAK,YAAY,mDAAmD;AAAA,EAIvF,WAAW,UAAU,YAAY,sBAAsB;AAAA,EAIvD,iBAAiB,UAAU,YAAY,yBAAyB;AAClE;AAEA,UAAU,YAAY;
|
|
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 'react-desc';\nimport { noop } from 'lodash';\nimport Logo from '../Icons/EM_logo';\nimport { Container, Menu, Heading, Icon, Hr, MenuList, BottomMenu, MenuWrapper } from './styles';\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.propTypes = navProps;\nDSSideNav.displayName = 'DSSideNav';\nconst DSSideNavWithSchema = describe(DSSideNav).description('Side navigation for mobile and tablet');\n\nDSSideNavWithSchema.propTypes = navProps;\n\nexport { DSSideNav, DSSideNavWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA;ACKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,YAAY,CAAC,EAAE,iBAAiB,CAAC,GAAG,OAAO,UAAU,MAAM,YAAY,CAAC,GAAG,kBAAkB,CAAC,QAAQ;AAC1G,QAAM,CAAC,qBAAqB,uBAAuB,SAAS,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,4DACG,UAAU,SAAS,IAClB,qCAAC,gBACE,UAAU,IAAI,CAAC,EAAE,MAAM,MAAM,WAAW,QACvC,qCAAC;AAAA,IAAI,KAAK;AAAA,IAAK,WAAU;AAAA,IAAW,SAAS,cAAc,KAAK,MAAM,KAAK,MAAM,OAAO;AAAA,KACtF,qCAAC;AAAA,IAAI,WAAU;AAAA,KAAQ,IAAK,GAC5B,qCAAC;AAAA,IAAI,WAAW,QAAQ,QAAQ,sBAAsB,WAAW;AAAA,KAAO,IAAK,CAC/E,CACD,CACH,IACE,IACN;AAGF,QAAM,mBAAmB,MACvB,qCAAC,gBACE,gBAAgB,IAAI,CAAC,EAAE,MAAM,MAAM,WAAW,QAC7C,qCAAC;AAAA,IAAI,KAAK;AAAA,IAAK,WAAU;AAAA,IAAW,SAAS,M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@@ -39,6 +39,7 @@ const props = {
|
|
|
39
39
|
onRefresh: PropTypes.func.description("callback on refresh swipe")
|
|
40
40
|
};
|
|
41
41
|
SwipeToRefresh.propTypes = props;
|
|
42
|
+
SwipeToRefresh.displayName = "SwipeToRefresh";
|
|
42
43
|
const SwipeToRefreshWithSchema = describe(SwipeToRefresh);
|
|
43
44
|
SwipeToRefreshWithSchema.propTypes = props;
|
|
44
45
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/SwipeToRefresh/SwipeToRefresh.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { DSCircularProgressIndicator } from '@elliemae/ds-circular-progress-indicator';\nimport { useTheme } from '@elliemae/ds-system';\nimport { useSwipe } from './useSwipe';\nimport { SwipeContainer, SwipeDrag, LoaderBox, PositionLoader } from './styled';\nimport { ProgressIndicator } from './ProgressIndicator';\n\nconst SwipeToRefresh = ({ children, loading, onRefresh }) => {\n const breakpoint = 60;\n const theme = useTheme();\n const swipe = useSwipe({ onRefresh, breakpoint });\n const progress = swipe.height > breakpoint ? 100 : (swipe.height * 100) / breakpoint;\n return (\n <SwipeContainer>\n <SwipeDrag\n onTouchStart={swipe.touchStart}\n onTouchEnd={swipe.touchEnd}\n onTouchCancel={swipe.touchCancel}\n onTouchMove={swipe.touchMove}\n ref={swipe.ref}\n >\n <LoaderBox\n height={loading ? theme.space.m : `${swipe.height}px`}\n alignItems=\"flex-start\"\n data-testid=\"loader-box\"\n >\n <PositionLoader\n height={theme.space.m}\n justifyContent=\"center\"\n alignItems=\"center\"\n mt={swipe.height > 40 || loading ? 0 : `${swipe.height - 40}px`}\n >\n {loading ? <DSCircularProgressIndicator /> : <ProgressIndicator progress={progress} />}\n </PositionLoader>\n </LoaderBox>\n <div ref={swipe.target} style={{ height: 1 }} />\n {children}\n </SwipeDrag>\n </SwipeContainer>\n );\n};\n\nconst props = {\n /** component inside swipe to refresh container */\n children: PropTypes.element.isRequired.description('component inside swipe to refresh container'),\n /** toggle loading state for swipe */\n loading: PropTypes.bool.description('toggle loading state for swipe'),\n /** callback on refresh swipe */\n onRefresh: PropTypes.func.description('callback on refresh swipe'),\n};\n\nSwipeToRefresh.propTypes = props;\
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,iBAAiB,CAAC,EAAE,UAAU,SAAS,gBAAgB;AAC3D,QAAM,aAAa;AACnB,QAAM,QAAQ,SAAS;AACvB,QAAM,QAAQ,SAAS,EAAE,WAAW,WAAW,CAAC;AAChD,QAAM,WAAW,MAAM,SAAS,aAAa,MAAO,MAAM,SAAS,MAAO;AAC1E,SACE,qCAAC,sBACC,qCAAC;AAAA,IACC,cAAc,MAAM;AAAA,IACpB,YAAY,MAAM;AAAA,IAClB,eAAe,MAAM;AAAA,IACrB,aAAa,MAAM;AAAA,IACnB,KAAK,MAAM;AAAA,KAEX,qCAAC;AAAA,IACC,QAAQ,UAAU,MAAM,MAAM,IAAI,GAAG,MAAM;AAAA,IAC3C,YAAW;AAAA,IACX,eAAY;AAAA,KAEZ,qCAAC;AAAA,IACC,QAAQ,MAAM,MAAM;AAAA,IACpB,gBAAe;AAAA,IACf,YAAW;AAAA,IACX,IAAI,MAAM,SAAS,MAAM,UAAU,IAAI,GAAG,MAAM,SAAS;AAAA,KAExD,UAAU,qCAAC,iCAA4B,IAAK,qCAAC;AAAA,IAAkB;AAAA,GAAoB,CACtF,CACF,GACA,qCAAC;AAAA,IAAI,KAAK,MAAM;AAAA,IAAQ,OAAO,EAAE,QAAQ,EAAE;AAAA,GAAG,GAC7C,QACH,CACF;AAEJ;AAEA,MAAM,QAAQ;AAAA,EAEZ,UAAU,UAAU,QAAQ,WAAW,YAAY,6CAA6C;AAAA,EAEhG,SAAS,UAAU,KAAK,YAAY,gCAAgC;AAAA,EAEpE,WAAW,UAAU,KAAK,YAAY,2BAA2B;AACnE;AAEA,eAAe,YAAY;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { DSCircularProgressIndicator } from '@elliemae/ds-circular-progress-indicator';\nimport { useTheme } from '@elliemae/ds-system';\nimport { useSwipe } from './useSwipe';\nimport { SwipeContainer, SwipeDrag, LoaderBox, PositionLoader } from './styled';\nimport { ProgressIndicator } from './ProgressIndicator';\n\nconst SwipeToRefresh = ({ children, loading, onRefresh }) => {\n const breakpoint = 60;\n const theme = useTheme();\n const swipe = useSwipe({ onRefresh, breakpoint });\n const progress = swipe.height > breakpoint ? 100 : (swipe.height * 100) / breakpoint;\n return (\n <SwipeContainer>\n <SwipeDrag\n onTouchStart={swipe.touchStart}\n onTouchEnd={swipe.touchEnd}\n onTouchCancel={swipe.touchCancel}\n onTouchMove={swipe.touchMove}\n ref={swipe.ref}\n >\n <LoaderBox\n height={loading ? theme.space.m : `${swipe.height}px`}\n alignItems=\"flex-start\"\n data-testid=\"loader-box\"\n >\n <PositionLoader\n height={theme.space.m}\n justifyContent=\"center\"\n alignItems=\"center\"\n mt={swipe.height > 40 || loading ? 0 : `${swipe.height - 40}px`}\n >\n {loading ? <DSCircularProgressIndicator /> : <ProgressIndicator progress={progress} />}\n </PositionLoader>\n </LoaderBox>\n <div ref={swipe.target} style={{ height: 1 }} />\n {children}\n </SwipeDrag>\n </SwipeContainer>\n );\n};\n\nconst props = {\n /** component inside swipe to refresh container */\n children: PropTypes.element.isRequired.description('component inside swipe to refresh container'),\n /** toggle loading state for swipe */\n loading: PropTypes.bool.description('toggle loading state for swipe'),\n /** callback on refresh swipe */\n onRefresh: PropTypes.func.description('callback on refresh swipe'),\n};\n\nSwipeToRefresh.propTypes = props;\nSwipeToRefresh.displayName = 'SwipeToRefresh';\nconst SwipeToRefreshWithSchema = describe(SwipeToRefresh);\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
|
7
7
|
}
|
package/dist/esm/Tabs/index.js
CHANGED
|
@@ -44,9 +44,11 @@ const DSMobileTab = (_c) => {
|
|
|
44
44
|
return /* @__PURE__ */ React.createElement(DSTab, __spreadValues({}, props), children);
|
|
45
45
|
};
|
|
46
46
|
DSMobileTabs.propTypes = MobileTabsPropTypes;
|
|
47
|
+
DSMobileTabs.displayName = "DSMobileTabs";
|
|
47
48
|
const DSMobileTabsWithSchema = describe(DSMobileTabs);
|
|
48
49
|
DSMobileTabsWithSchema.propTypes = MobileTabsPropTypes;
|
|
49
50
|
DSMobileTab.propTypes = MobileTabPropTypes;
|
|
51
|
+
DSMobileTab.displayName = "DSMobileTab";
|
|
50
52
|
const DSMobileTabWithSchema = describe(DSMobileTab);
|
|
51
53
|
DSMobileTabWithSchema.propTypes = MobileTabPropTypes;
|
|
52
54
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/Tabs/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { WeakValidationMap } from 'react';\nimport { describe } from 'react-desc';\nimport { DSTabs, DSTab } from '@elliemae/ds-tabs';\nimport type { DSTabsT, DSTabT } from '@elliemae/ds-tabs';\nimport { MobileTabsPropTypes, MobileTabPropTypes } from './propTypes';\n\ntype DSMobileTabsPropsT = Omit<\n DSTabsT.InternalProps,\n 'animated' | 'enableMouseEvents' | 'allowTextSelection' | 'type' | 'isDSMobile' | 'withCarousel'\n>;\n\ntype DSMobileTabPropsT = Omit<DSTabT.Props, 'isDSMobile'>;\n\nexport const DSMobileTabs = ({ children, ...props }: DSMobileTabsPropsT) => (\n <DSTabs {...props} isDSMobile>\n {children}\n </DSTabs>\n);\n\nexport const DSMobileTab = ({ children, ...props }: DSMobileTabPropsT) => <DSTab {...props}>{children}</DSTab>;\n\nDSMobileTabs.propTypes = MobileTabsPropTypes as WeakValidationMap<unknown>;\nconst DSMobileTabsWithSchema = describe(DSMobileTabs);\nDSMobileTabsWithSchema.propTypes = MobileTabsPropTypes;\n\nDSMobileTab.propTypes = MobileTabPropTypes as WeakValidationMap<unknown>;\nconst DSMobileTabWithSchema = describe(DSMobileTab);\nDSMobileTabWithSchema.propTypes = MobileTabPropTypes;\n\nexport { DSMobileTabsWithSchema, DSMobileTabWithSchema };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACCA;AACA;AAEA;AASO,MAAM,eAAe,CAAC,OAA4C;AAA5C,eAAE,eAAF,IAAe,kBAAf,IAAe,CAAb;AAC7B,6CAAC,yCAAW,QAAX;AAAA,IAAkB,YAAU;AAAA,MAC1B,QACH;AAAA;AAGK,MAAM,cAAc,CAAC,OAA2C;AAA3C,eAAE,eAAF,IAAe,kBAAf,IAAe,CAAb;AAA4C,6CAAC,0BAAU,QAAQ,QAAS;AAAA;AAEtG,aAAa,YAAY;AACzB,MAAM,yBAAyB,SAAS,YAAY;AACpD,uBAAuB,YAAY;AAEnC,YAAY,YAAY;AACxB,MAAM,wBAAwB,SAAS,WAAW;AAClD,sBAAsB,YAAY;",
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { WeakValidationMap } from 'react';\nimport { describe } from 'react-desc';\nimport { DSTabs, DSTab } from '@elliemae/ds-tabs';\nimport type { DSTabsT, DSTabT } from '@elliemae/ds-tabs';\nimport { MobileTabsPropTypes, MobileTabPropTypes } from './propTypes';\n\ntype DSMobileTabsPropsT = Omit<\n DSTabsT.InternalProps,\n 'animated' | 'enableMouseEvents' | 'allowTextSelection' | 'type' | 'isDSMobile' | 'withCarousel'\n>;\n\ntype DSMobileTabPropsT = Omit<DSTabT.Props, 'isDSMobile'>;\n\nexport const DSMobileTabs = ({ children, ...props }: DSMobileTabsPropsT) => (\n <DSTabs {...props} isDSMobile>\n {children}\n </DSTabs>\n);\n\nexport const DSMobileTab = ({ children, ...props }: DSMobileTabPropsT) => <DSTab {...props}>{children}</DSTab>;\n\nDSMobileTabs.propTypes = MobileTabsPropTypes as WeakValidationMap<unknown>;\nDSMobileTabs.displayName = 'DSMobileTabs';\nconst DSMobileTabsWithSchema = describe(DSMobileTabs);\nDSMobileTabsWithSchema.propTypes = MobileTabsPropTypes;\n\nDSMobileTab.propTypes = MobileTabPropTypes as WeakValidationMap<unknown>;\nDSMobileTab.displayName = 'DSMobileTab';\nconst DSMobileTabWithSchema = describe(DSMobileTab);\nDSMobileTabWithSchema.propTypes = MobileTabPropTypes;\n\nexport { DSMobileTabsWithSchema, DSMobileTabWithSchema };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACCA;AACA;AAEA;AASO,MAAM,eAAe,CAAC,OAA4C;AAA5C,eAAE,eAAF,IAAe,kBAAf,IAAe,CAAb;AAC7B,6CAAC,yCAAW,QAAX;AAAA,IAAkB,YAAU;AAAA,MAC1B,QACH;AAAA;AAGK,MAAM,cAAc,CAAC,OAA2C;AAA3C,eAAE,eAAF,IAAe,kBAAf,IAAe,CAAb;AAA4C,6CAAC,0BAAU,QAAQ,QAAS;AAAA;AAEtG,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,yBAAyB,SAAS,YAAY;AACpD,uBAAuB,YAAY;AAEnC,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,wBAAwB,SAAS,WAAW;AAClD,sBAAsB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/Accordion/Accordion.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport { describe } from 'react-desc';\nimport { DSAccordion, DSAccordionItem } from '@elliemae/ds-accordion';\nimport type { DSAccordionT } from '@elliemae/ds-accordion';\nimport { mobileAccordionItemPropTypes, mobileAccordionPropTypes } from './propTypes';\n\ntype DSMobileAccordionPropsT = Omit<DSAccordionT.Props, 'isDSMobile'>;\n\nexport const DSMobileAccordion = ({ children, ...props }: DSMobileAccordionPropsT) => (\n <DSAccordion {...props} isDSMobile>\n {children}\n </DSAccordion>\n);\n\nexport const DSMobileAccordionItem = ({ children, ...props }: DSAccordionT.ItemProps) => (\n <DSAccordionItem {...props}>{children}</DSAccordionItem>\n);\n\nDSMobileAccordionItem.propTypes = mobileAccordionItemPropTypes as WeakValidationMap<unknown>;\nconst DSMobileAccordionItemWithSchema = describe(DSMobileAccordionItem);\nDSMobileAccordionItemWithSchema.propTypes = mobileAccordionItemPropTypes;\n\nDSMobileAccordion.propTypes = mobileAccordionPropTypes as WeakValidationMap<unknown>;\nconst DSMobileAccordionWithSchema = describe(DSMobileAccordion);\nDSMobileAccordionWithSchema.propTypes = mobileAccordionPropTypes;\n\nexport { DSMobileAccordionItemWithSchema, DSMobileAccordionWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,wBAAyB;AACzB,0BAA6C;AAE7C,uBAAuE;AAIhE,MAAM,oBAAoB,CAAC,OAAiD;AAAjD,eAAE,eAAF,IAAe,kBAAf,IAAe,CAAb;AAClC,6CAAC,kEAAgB,QAAhB;AAAA,IAAuB,YAAU;AAAA,MAC/B,QACH;AAAA;AAGK,MAAM,wBAAwB,CAAC,OAAgD;AAAhD,eAAE,eAAF,IAAe,kBAAf,IAAe,CAAb;AACtC,6CAAC,wDAAoB,QAAQ,QAAS;AAAA;AAGxC,sBAAsB,YAAY;AAClC,MAAM,kCAAkC,gCAAS,qBAAqB;AACtE,gCAAgC,YAAY;AAE5C,kBAAkB,YAAY;AAC9B,MAAM,8BAA8B,gCAAS,iBAAiB;AAC9D,4BAA4B,YAAY;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/Accordion/propTypes.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-utilities';\n\nexport const mobileAccordionItemPropTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n children: PropTypes.node.description('Dimsum AccordionItem content.').isRequired,\n title: PropTypes.string.description('Set a primary title.'),\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description(\n 'Dimsum AccordionItem value, this value should be unique.',\n ).isRequired,\n iconClosed: PropTypes.node.description('Custom Dimsum Icon when it is closed.'),\n iconOpened: PropTypes.node.description('Custom Dimsum Icon when it is open.'),\n secondaryTitle: PropTypes.string.description('Set a secondary title'),\n customActions: PropTypes.arrayOf(PropTypes.object).description('Set Dimsum AccordionItem custom actions.'),\n renderCustomActions: PropTypes.func.description(\n 'This property will render any JSX in the custom actions area. You can access to all references and active values within the props.',\n ),\n};\n\nexport const mobileAccordionPropTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n containerProps: PropTypes.object.description('Adds props to the container.'),\n activeValue: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),\n PropTypes.string,\n PropTypes.number,\n ]).description('Selected active value. This property makes the component a controlled one.'),\n children: PropTypes.node.description('Dimsum AccordionItems to show.'),\n allowMultipleOpen: PropTypes.bool.description('Allows multiple Dimsum AccordionItems to be open at the same time.'),\n onChange: PropTypes.func.description('Callback function once the Dimsum Accordion changes.'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAuE;AAEhE,MAAM,+BAA+B,gDACvC,gDACA,uCAFuC;AAAA,EAG1C,UAAU,8BAAU,KAAK,YAAY,+BAA+B,EAAE;AAAA,EACtE,OAAO,8BAAU,OAAO,YAAY,sBAAsB;AAAA,EAC1D,OAAO,8BAAU,UAAU,CAAC,8BAAU,QAAQ,8BAAU,MAAM,CAAC,EAAE,YAC/D,0DACF,EAAE;AAAA,EACF,YAAY,8BAAU,KAAK,YAAY,uCAAuC;AAAA,EAC9E,YAAY,8BAAU,KAAK,YAAY,qCAAqC;AAAA,EAC5E,gBAAgB,8BAAU,OAAO,YAAY,uBAAuB;AAAA,EACpE,eAAe,8BAAU,QAAQ,8BAAU,MAAM,EAAE,YAAY,0CAA0C;AAAA,EACzG,qBAAqB,8BAAU,KAAK,YAClC,oIACF;AACF;AAEO,MAAM,2BAA2B,gDACnC,gDACA,uCAFmC;AAAA,EAGtC,gBAAgB,8BAAU,OAAO,YAAY,8BAA8B;AAAA,EAC3E,aAAa,8BAAU,UAAU;AAAA,IAC/B,8BAAU,QAAQ,8BAAU,UAAU,CAAC,8BAAU,QAAQ,8BAAU,MAAM,CAAC,CAAC;AAAA,IAC3E,8BAAU;AAAA,IACV,8BAAU;AAAA,EACZ,CAAC,EAAE,YAAY,4EAA4E;AAAA,EAC3F,UAAU,8BAAU,KAAK,YAAY,gCAAgC;AAAA,EACrE,mBAAmB,8BAAU,KAAK,YAAY,oEAAoE;AAAA,EAClH,UAAU,8BAAU,KAAK,YAAY,sDAAsD;AAC7F;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/Accordion/Accordion.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { WeakValidationMap } from 'react';\nimport { describe } from 'react-desc';\nimport { DSAccordion, DSAccordionItem } from '@elliemae/ds-accordion';\nimport type { DSAccordionT } from '@elliemae/ds-accordion';\nimport { mobileAccordionItemPropTypes, mobileAccordionPropTypes } from './propTypes';\n\ntype DSMobileAccordionPropsT = Omit<DSAccordionT.Props, 'isDSMobile'>;\n\nexport const DSMobileAccordion = ({ children, ...props }: DSMobileAccordionPropsT) => (\n <DSAccordion {...props} isDSMobile>\n {children}\n </DSAccordion>\n);\n\nexport const DSMobileAccordionItem = ({ children, ...props }: DSAccordionT.ItemProps) => (\n <DSAccordionItem {...props}>{children}</DSAccordionItem>\n);\n\nDSMobileAccordionItem.propTypes = mobileAccordionItemPropTypes as WeakValidationMap<unknown>;\nconst DSMobileAccordionItemWithSchema = describe(DSMobileAccordionItem);\nDSMobileAccordionItemWithSchema.propTypes = mobileAccordionItemPropTypes;\n\nDSMobileAccordion.propTypes = mobileAccordionPropTypes as WeakValidationMap<unknown>;\nconst DSMobileAccordionWithSchema = describe(DSMobileAccordion);\nDSMobileAccordionWithSchema.propTypes = mobileAccordionPropTypes;\n\nexport { DSMobileAccordionItemWithSchema, DSMobileAccordionWithSchema };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACCA;AACA;AAEA;AAIO,MAAM,oBAAoB,CAAC,OAAiD;AAAjD,eAAE,eAAF,IAAe,kBAAf,IAAe,CAAb;AAClC,6CAAC,8CAAgB,QAAhB;AAAA,IAAuB,YAAU;AAAA,MAC/B,QACH;AAAA;AAGK,MAAM,wBAAwB,CAAC,OAAgD;AAAhD,eAAE,eAAF,IAAe,kBAAf,IAAe,CAAb;AACtC,6CAAC,oCAAoB,QAAQ,QAAS;AAAA;AAGxC,sBAAsB,YAAY;AAClC,MAAM,kCAAkC,SAAS,qBAAqB;AACtE,gCAAgC,YAAY;AAE5C,kBAAkB,YAAY;AAC9B,MAAM,8BAA8B,SAAS,iBAAiB;AAC9D,4BAA4B,YAAY;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/Accordion/propTypes.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-utilities';\n\nexport const mobileAccordionItemPropTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n children: PropTypes.node.description('Dimsum AccordionItem content.').isRequired,\n title: PropTypes.string.description('Set a primary title.'),\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description(\n 'Dimsum AccordionItem value, this value should be unique.',\n ).isRequired,\n iconClosed: PropTypes.node.description('Custom Dimsum Icon when it is closed.'),\n iconOpened: PropTypes.node.description('Custom Dimsum Icon when it is open.'),\n secondaryTitle: PropTypes.string.description('Set a secondary title'),\n customActions: PropTypes.arrayOf(PropTypes.object).description('Set Dimsum AccordionItem custom actions.'),\n renderCustomActions: PropTypes.func.description(\n 'This property will render any JSX in the custom actions area. You can access to all references and active values within the props.',\n ),\n};\n\nexport const mobileAccordionPropTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n containerProps: PropTypes.object.description('Adds props to the container.'),\n activeValue: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),\n PropTypes.string,\n PropTypes.number,\n ]).description('Selected active value. This property makes the component a controlled one.'),\n children: PropTypes.node.description('Dimsum AccordionItems to show.'),\n allowMultipleOpen: PropTypes.bool.description('Allows multiple Dimsum AccordionItems to be open at the same time.'),\n onChange: PropTypes.func.description('Callback function once the Dimsum Accordion changes.'),\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACAA;AAEO,MAAM,+BAA+B,gDACvC,4BACA,mBAFuC;AAAA,EAG1C,UAAU,UAAU,KAAK,YAAY,+BAA+B,EAAE;AAAA,EACtE,OAAO,UAAU,OAAO,YAAY,sBAAsB;AAAA,EAC1D,OAAO,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EAAE,YAC/D,0DACF,EAAE;AAAA,EACF,YAAY,UAAU,KAAK,YAAY,uCAAuC;AAAA,EAC9E,YAAY,UAAU,KAAK,YAAY,qCAAqC;AAAA,EAC5E,gBAAgB,UAAU,OAAO,YAAY,uBAAuB;AAAA,EACpE,eAAe,UAAU,QAAQ,UAAU,MAAM,EAAE,YAAY,0CAA0C;AAAA,EACzG,qBAAqB,UAAU,KAAK,YAClC,oIACF;AACF;AAEO,MAAM,2BAA2B,gDACnC,4BACA,mBAFmC;AAAA,EAGtC,gBAAgB,UAAU,OAAO,YAAY,8BAA8B;AAAA,EAC3E,aAAa,UAAU,UAAU;AAAA,IAC/B,UAAU,QAAQ,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,CAAC;AAAA,IAC3E,UAAU;AAAA,IACV,UAAU;AAAA,EACZ,CAAC,EAAE,YAAY,4EAA4E;AAAA,EAC3F,UAAU,UAAU,KAAK,YAAY,gCAAgC;AAAA,EACrE,mBAAmB,UAAU,KAAK,YAAY,oEAAoE;AAAA,EAClH,UAAU,UAAU,KAAK,YAAY,sDAAsD;AAC7F;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|