@elliemae/ds-mobile 1.61.10 → 1.61.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/CategoryBox/CategoryBox.js.map +1 -1
- package/cjs/CollectionBox/CollectionBox.js.map +1 -1
- package/cjs/FullPageContainer/FullPageContainer.js.map +1 -1
- package/cjs/FullPageContainer/FullPageContainerScroll.js.map +1 -1
- package/cjs/FullPageContainer/useMobileHeight.js.map +1 -1
- package/cjs/GlobalHeader/MobileGlobalHeader.js.map +1 -1
- package/cjs/GlobalHeader/styles.js.map +1 -1
- package/cjs/GroupBox/GroupBox.js.map +1 -1
- package/cjs/Icons/EM_logo.js.map +1 -1
- package/cjs/InfiniteLoader/Infiniteloader.js.map +1 -1
- package/cjs/InfiniteLoader/Loader.js.map +1 -1
- package/cjs/InfiniteLoader/VirtualizedInfiniteLoader.js.map +1 -1
- package/cjs/InfiniteLoader/styled.js.map +1 -1
- package/cjs/LoadingPage/Page.js.map +1 -1
- package/cjs/MobileActionToolbar/MobileActionToolbar.js.map +1 -1
- package/cjs/MobileActionToolbar/MobileActionToolbarItem.js.map +1 -1
- package/cjs/MobileBanner/MobileBanner.js.map +1 -1
- package/cjs/MobileBanner/defaultProps.js.map +1 -1
- package/cjs/MobileBanner/propTypes.js.map +1 -1
- package/cjs/MobileBanner/styles.js.map +1 -1
- package/cjs/MobileBanner/utils/bannerTypes.js.map +1 -1
- package/cjs/MobileBanner/utils/icons.js.map +1 -1
- package/cjs/MobileBanner/utils/styleHelpers.js.map +1 -1
- package/cjs/MobileCard/ActionAddon.js.map +1 -1
- package/cjs/MobileCard/Card.js.map +1 -1
- package/cjs/MobileCard/CardIcons.js.map +1 -1
- package/cjs/MobileCard/ExpandChevron.js.map +1 -1
- package/cjs/MobileCard/ExpandableRegion.js.map +1 -1
- package/cjs/MobileCard/Group.js.map +1 -1
- package/cjs/MobileCard/StyledCard.js.map +1 -1
- package/cjs/MobileCard/useHeight.js.map +1 -1
- package/cjs/MobileContextMenu/MobileContextMenu.js.map +1 -1
- package/cjs/MobileContextMenu/MobileContextMenuGroup.js.map +1 -1
- package/cjs/MobileContextMenu/MobileContextMenuItem.js.map +1 -1
- package/cjs/MobileDatePicker/Input.js.map +1 -1
- package/cjs/MobileDatePicker/MobileDatePicker.js.map +1 -1
- package/cjs/MobileDropdownMenu/MobileDropdownInput.js.map +1 -1
- package/cjs/MobileDropdownMenu/MobileDropdownMenu.js.map +1 -1
- package/cjs/MobileEmtpyState/MobileEmptyState.js.map +1 -1
- package/cjs/MobileFilterbar/Filterbar.js.map +1 -1
- package/cjs/MobileFilterbar/FilterbarItem.js.map +1 -1
- package/cjs/MobileFilterbar/FilterbarSort.js.map +1 -1
- package/cjs/MobileFooter/Action.js.map +1 -1
- package/cjs/MobileFooter/Footer.js.map +1 -1
- package/cjs/MobileFooter/Text.js.map +1 -1
- package/cjs/MobileListItem/MobileListItem.js.map +1 -1
- package/cjs/MobilePageHeader/MobilePageHeader.js.map +1 -1
- package/cjs/MobileSelectList/MobileSelectList.js.map +1 -1
- package/cjs/MobileSelectList/styled.js.map +1 -1
- package/cjs/MobileSeparator/Separator.js.map +1 -1
- package/cjs/MobileTimePicker/Input.js.map +1 -1
- package/cjs/MobileTimePicker/MobileTimePicker.js.map +1 -1
- package/cjs/MobileTouchable/MobileTouchable.js.map +1 -1
- package/cjs/Modal/Modal.js.map +1 -1
- package/cjs/Modal/styled.js.map +1 -1
- package/cjs/PageFilter/PageFilter.js.map +1 -1
- package/cjs/PageForm/PageForm.js.map +1 -1
- package/cjs/PageList/PageList.js.map +1 -1
- package/cjs/PageSearch/PageSearch.js.map +1 -1
- package/cjs/PageSummary/PageSummary.js.map +1 -1
- package/cjs/PageSummary/Tags.js.map +1 -1
- package/cjs/SideNav/SideNav.js.map +1 -1
- package/cjs/SideNav/styles.js.map +1 -1
- package/cjs/SwipeToRefresh/ProgressIndicator.js.map +1 -1
- package/cjs/SwipeToRefresh/ProgressLoader.js.map +1 -1
- package/cjs/SwipeToRefresh/SwipeToRefresh.js.map +1 -1
- package/cjs/SwipeToRefresh/styled.js.map +1 -1
- package/cjs/SwipeToRefresh/useSwipe.js.map +1 -1
- package/cjs/Tabs/index.js.map +1 -1
- package/esm/CategoryBox/CategoryBox.js.map +1 -1
- package/esm/CollectionBox/CollectionBox.js.map +1 -1
- package/esm/FullPageContainer/FullPageContainer.js.map +1 -1
- package/esm/FullPageContainer/FullPageContainerScroll.js.map +1 -1
- package/esm/FullPageContainer/useMobileHeight.js.map +1 -1
- package/esm/GlobalHeader/MobileGlobalHeader.js.map +1 -1
- package/esm/GlobalHeader/styles.js.map +1 -1
- package/esm/GroupBox/GroupBox.js.map +1 -1
- package/esm/Icons/EM_logo.js.map +1 -1
- package/esm/InfiniteLoader/Infiniteloader.js.map +1 -1
- package/esm/InfiniteLoader/Loader.js.map +1 -1
- package/esm/InfiniteLoader/VirtualizedInfiniteLoader.js.map +1 -1
- package/esm/InfiniteLoader/styled.js.map +1 -1
- package/esm/LoadingPage/Page.js.map +1 -1
- package/esm/MobileActionToolbar/MobileActionToolbar.js.map +1 -1
- package/esm/MobileActionToolbar/MobileActionToolbarItem.js.map +1 -1
- package/esm/MobileBanner/MobileBanner.js.map +1 -1
- package/esm/MobileBanner/defaultProps.js.map +1 -1
- package/esm/MobileBanner/propTypes.js.map +1 -1
- package/esm/MobileBanner/styles.js.map +1 -1
- package/esm/MobileBanner/utils/bannerTypes.js.map +1 -1
- package/esm/MobileBanner/utils/icons.js.map +1 -1
- package/esm/MobileBanner/utils/styleHelpers.js.map +1 -1
- package/esm/MobileCard/ActionAddon.js.map +1 -1
- package/esm/MobileCard/Card.js.map +1 -1
- package/esm/MobileCard/CardIcons.js.map +1 -1
- package/esm/MobileCard/ExpandChevron.js.map +1 -1
- package/esm/MobileCard/ExpandableRegion.js.map +1 -1
- package/esm/MobileCard/Group.js.map +1 -1
- package/esm/MobileCard/StyledCard.js.map +1 -1
- package/esm/MobileCard/useHeight.js.map +1 -1
- package/esm/MobileContextMenu/MobileContextMenu.js.map +1 -1
- package/esm/MobileContextMenu/MobileContextMenuGroup.js.map +1 -1
- package/esm/MobileContextMenu/MobileContextMenuItem.js.map +1 -1
- package/esm/MobileDatePicker/Input.js.map +1 -1
- package/esm/MobileDatePicker/MobileDatePicker.js.map +1 -1
- package/esm/MobileDropdownMenu/MobileDropdownInput.js.map +1 -1
- package/esm/MobileDropdownMenu/MobileDropdownMenu.js.map +1 -1
- package/esm/MobileEmtpyState/MobileEmptyState.js.map +1 -1
- package/esm/MobileFilterbar/Filterbar.js.map +1 -1
- package/esm/MobileFilterbar/FilterbarItem.js.map +1 -1
- package/esm/MobileFilterbar/FilterbarSort.js.map +1 -1
- package/esm/MobileFooter/Action.js.map +1 -1
- package/esm/MobileFooter/Footer.js.map +1 -1
- package/esm/MobileFooter/Text.js.map +1 -1
- package/esm/MobileListItem/MobileListItem.js.map +1 -1
- package/esm/MobilePageHeader/MobilePageHeader.js.map +1 -1
- package/esm/MobileSelectList/MobileSelectList.js.map +1 -1
- package/esm/MobileSelectList/styled.js.map +1 -1
- package/esm/MobileSeparator/Separator.js.map +1 -1
- package/esm/MobileTimePicker/Input.js.map +1 -1
- package/esm/MobileTimePicker/MobileTimePicker.js.map +1 -1
- package/esm/MobileTouchable/MobileTouchable.js.map +1 -1
- package/esm/Modal/Modal.js.map +1 -1
- package/esm/Modal/styled.js.map +1 -1
- package/esm/PageFilter/PageFilter.js.map +1 -1
- package/esm/PageForm/PageForm.js.map +1 -1
- package/esm/PageList/PageList.js.map +1 -1
- package/esm/PageSearch/PageSearch.js.map +1 -1
- package/esm/PageSummary/PageSummary.js.map +1 -1
- package/esm/PageSummary/Tags.js.map +1 -1
- package/esm/SideNav/SideNav.js.map +1 -1
- package/esm/SideNav/styles.js.map +1 -1
- package/esm/SwipeToRefresh/ProgressIndicator.js.map +1 -1
- package/esm/SwipeToRefresh/ProgressLoader.js.map +1 -1
- package/esm/SwipeToRefresh/SwipeToRefresh.js.map +1 -1
- package/esm/SwipeToRefresh/styled.js.map +1 -1
- package/esm/SwipeToRefresh/useSwipe.js.map +1 -1
- package/esm/Tabs/index.js.map +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileEmptyState.js","sources":["../../../src/MobileEmtpyState/MobileEmptyState.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport { PropTypes, describe } from 'react-desc';\nimport { Search } from '@elliemae/ds-icons';\n\nconst Wrapper = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n`;\n\nconst Label = styled.p`\n color: ${(props) => props.theme.colors.neutral['600']};\n font-size: ${(props) => props.theme.space.xs};\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n min-width: 132px;\n`;\n\nconst DSMobileEmptyState = ({ label = 'No search results found.' }) => (\n <Wrapper>\n <Search size=\"xxl\" color={['neutral', 400]} />\n <Label>{label}</Label>\n </Wrapper>\n);\n\nconst props = {\n /** empty state label */\n label: PropTypes.string.description('empty state label'),\n};\n\nDSMobileEmptyState.propTypes = props;\n\nconst DSMobileEmptyStateWithSchema = describe(DSMobileEmptyState);\nDSMobileEmptyStateWithSchema.propTypes = props;\n\nexport { DSMobileEmptyState, DSMobileEmptyStateWithSchema };\n"],"names":["Wrapper","styled","div","Label","p","props","theme","colors","neutral","space","xs","fontWeights","semibold","DSMobileEmptyState","label","React","Search","PropTypes","string","description","propTypes","DSMobileEmptyStateWithSchema","describe"],"mappings":";;;;;;;;;;;;;;AAKA,IAAMA,OAAO,gBAAGC,0BAAM,CAACC,GAAV;
|
|
1
|
+
{"version":3,"file":"MobileEmptyState.js","sources":["../../../src/MobileEmtpyState/MobileEmptyState.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport { PropTypes, describe } from 'react-desc';\nimport { Search } from '@elliemae/ds-icons';\n\nconst Wrapper = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n`;\n\nconst Label = styled.p`\n color: ${(props) => props.theme.colors.neutral['600']};\n font-size: ${(props) => props.theme.space.xs};\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n min-width: 132px;\n`;\n\nconst DSMobileEmptyState = ({ label = 'No search results found.' }) => (\n <Wrapper>\n <Search size=\"xxl\" color={['neutral', 400]} />\n <Label>{label}</Label>\n </Wrapper>\n);\n\nconst props = {\n /** empty state label */\n label: PropTypes.string.description('empty state label'),\n};\n\nDSMobileEmptyState.propTypes = props;\n\nconst DSMobileEmptyStateWithSchema = describe(DSMobileEmptyState);\nDSMobileEmptyStateWithSchema.propTypes = props;\n\nexport { DSMobileEmptyState, DSMobileEmptyStateWithSchema };\n"],"names":["Wrapper","styled","div","Label","p","props","theme","colors","neutral","space","xs","fontWeights","semibold","DSMobileEmptyState","label","React","Search","PropTypes","string","description","propTypes","DSMobileEmptyStateWithSchema","describe"],"mappings":";;;;;;;;;;;;;;AAKA,IAAMA,OAAO,gBAAGC,0BAAM,CAACC,GAAV;EAAA;AAAA,iGAAb;AAQA,IAAMC,KAAK,gBAAGF,0BAAM,CAACG,CAAV;EAAA;AAAA,oEACA,UAACC,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CADA,EAEI,UAACH,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAN,CAAYG,KAAZ,CAAkBC,EAA7B;AAAA,CAFJ,EAGM,UAACL,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAN,CAAYK,WAAZ,CAAwBC,QAAnC;AAAA,CAHN,CAAX;;IAOMC,kBAAkB,GAAG,SAArBA,kBAAqB;EAAA,sBAAGC,KAAH;MAAGA,KAAH,2BAAW,0BAAX;EAAA,oBACzBC,wCAAC,OAAD,qBACEA,wCAACC,cAAD;IAAQ,IAAI,EAAC,KAAb;IAAmB,KAAK,EAAE,CAAC,SAAD,EAAY,GAAZ;IAD5B,eAEED,wCAAC,KAAD,QAAQD,KAAR,CAFF,CADyB;AAAA;;AAO3B,IAAMT,KAAK,GAAG;;EAEZS,KAAK,EAAEG,mBAAS,CAACC,MAAV,CAAiBC,WAAjB,CAA6B,mBAA7B;AAFK,CAAd;AAKAN,kBAAkB,CAACO,SAAnB,GAA+Bf,KAA/B;IAEMgB,4BAA4B,GAAGC,kBAAQ,CAACT,kBAAD;AAC7CQ,4BAA4B,CAACD,SAA7B,GAAyCf,KAAzC;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Filterbar.js","sources":["../../../src/MobileFilterbar/Filterbar.tsx"],"sourcesContent":["/* eslint-disable import/no-unresolved */\nimport React from 'react';\nimport styled from 'styled-components';\nimport { describe, PropTypes } from 'react-desc';\nimport { __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport MobileSeparator from '../MobileSeparator';\n\nconst Bar = styled.div`\n display: flex;\n overflow: auto;\n background-color: ${(props) => props.theme.colors.neutral['000']};\n padding-left: ${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs)};\n & > * {\n flex-shrink: 0;\n }\n\n &::-webkit-scrollbar {\n display: none;\n }\n`;\n\nconst Separator = styled.div`\n & > * {\n margin: 0;\n }\n`;\n\nconst DSMobileFilterbar = ({ children }) => (\n <Grid rows={['auto', 'auto']} data-testid=\"filter-bar-wrapper\">\n <Bar>{children}</Bar>\n <Separator>\n <MobileSeparator margin=\"xxs\" color={['neutral', '300']} />\n </Separator>\n </Grid>\n);\n\nconst filterbarProps = {\n children: PropTypes.element.description('FilterBar Items').isRequired,\n};\n\nDSMobileFilterbar.propTypes = filterbarProps;\n\nconst FilterbarWithSchema = describe(DSMobileFilterbar);\nFilterbarWithSchema.propTypes = filterbarProps;\n\nexport { DSMobileFilterbar, FilterbarWithSchema };\n"],"names":["Bar","styled","div","props","theme","colors","neutral","__UNSAFE_SPACE_TO_DIMSUM","space","xs","Separator","DSMobileFilterbar","children","React","Grid","MobileSeparator","filterbarProps","PropTypes","element","description","isRequired","propTypes","FilterbarWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAQA,IAAMA,GAAG,gBAAGC,0BAAM,CAACC,GAAV;
|
|
1
|
+
{"version":3,"file":"Filterbar.js","sources":["../../../src/MobileFilterbar/Filterbar.tsx"],"sourcesContent":["/* eslint-disable import/no-unresolved */\nimport React from 'react';\nimport styled from 'styled-components';\nimport { describe, PropTypes } from 'react-desc';\nimport { __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport MobileSeparator from '../MobileSeparator';\n\nconst Bar = styled.div`\n display: flex;\n overflow: auto;\n background-color: ${(props) => props.theme.colors.neutral['000']};\n padding-left: ${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs)};\n & > * {\n flex-shrink: 0;\n }\n\n &::-webkit-scrollbar {\n display: none;\n }\n`;\n\nconst Separator = styled.div`\n & > * {\n margin: 0;\n }\n`;\n\nconst DSMobileFilterbar = ({ children }) => (\n <Grid rows={['auto', 'auto']} data-testid=\"filter-bar-wrapper\">\n <Bar>{children}</Bar>\n <Separator>\n <MobileSeparator margin=\"xxs\" color={['neutral', '300']} />\n </Separator>\n </Grid>\n);\n\nconst filterbarProps = {\n children: PropTypes.element.description('FilterBar Items').isRequired,\n};\n\nDSMobileFilterbar.propTypes = filterbarProps;\n\nconst FilterbarWithSchema = describe(DSMobileFilterbar);\nFilterbarWithSchema.propTypes = filterbarProps;\n\nexport { DSMobileFilterbar, FilterbarWithSchema };\n"],"names":["Bar","styled","div","props","theme","colors","neutral","__UNSAFE_SPACE_TO_DIMSUM","space","xs","Separator","DSMobileFilterbar","children","React","Grid","MobileSeparator","filterbarProps","PropTypes","element","description","isRequired","propTypes","FilterbarWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAQA,IAAMA,GAAG,gBAAGC,0BAAM,CAACC,GAAV;EAAA;AAAA,oIAGa,UAACC,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAHb,EAIS,UAACH,KAAD;EAAA,OAAWI,iCAAwB,CAACJ,KAAK,CAACC,KAAN,CAAYI,KAAZ,CAAkBC,EAAnB,CAAnC;AAAA,CAJT,CAAT;AAcA,IAAMC,SAAS,gBAAGT,0BAAM,CAACC,GAAV;EAAA;AAAA,wBAAf;;IAMMS,iBAAiB,GAAG,SAApBA,iBAAoB;EAAA,IAAGC,QAAH,QAAGA,QAAH;EAAA,oBACxBC,wCAACC,WAAD;IAAM,IAAI,EAAE,CAAC,MAAD,EAAS,MAAT,CAAZ;IAA8B,eAAY;kBACxCD,wCAAC,GAAD,QAAMD,QAAN,CADF,eAEEC,wCAAC,SAAD,qBACEA,wCAACE,oCAAD;IAAiB,MAAM,EAAC,KAAxB;IAA8B,KAAK,EAAE,CAAC,SAAD,EAAY,KAAZ;IADvC,CAFF,CADwB;AAAA;;AAS1B,IAAMC,cAAc,GAAG;EACrBJ,QAAQ,EAAEK,mBAAS,CAACC,OAAV,CAAkBC,WAAlB,CAA8B,iBAA9B,EAAiDC;AADtC,CAAvB;AAIAT,iBAAiB,CAACU,SAAlB,GAA8BL,cAA9B;IAEMM,mBAAmB,GAAGC,kBAAQ,CAACZ,iBAAD;AACpCW,mBAAmB,CAACD,SAApB,GAAgCL,cAAhC;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterbarItem.js","sources":["../../../src/MobileFilterbar/FilterbarItem.tsx"],"sourcesContent":["import React from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport { Grid } from '@elliemae/ds-grid';\n\nconst DSMobileFilterbarItem = ({ children, onClick }) => (\n <Grid data-testid=\"filter-bar-item-wrapper\" cols={['min-content']} pr=\"xxs\" pt=\"xxs\" role=\"button\" onClick={onClick}>\n {children}\n </Grid>\n);\nconst filterbarItemProps = {\n children: PropTypes.element.description('FilterBar Items').isRequired,\n onClick: PropTypes.func.description('Function executed when clicking filterbar item'),\n};\n\nDSMobileFilterbarItem.propTypes = filterbarItemProps;\n\nconst FilterbarItemWithSchema = describe(DSMobileFilterbarItem);\nFilterbarItemWithSchema.propTypes = filterbarItemProps;\n\nexport { DSMobileFilterbarItem, FilterbarItemWithSchema };\n"],"names":["DSMobileFilterbarItem","children","onClick","React","Grid","filterbarItemProps","PropTypes","element","description","isRequired","func","propTypes","FilterbarItemWithSchema","describe"],"mappings":";;;;;;;;;;;;IAIMA,qBAAqB,GAAG,SAAxBA,qBAAwB;
|
|
1
|
+
{"version":3,"file":"FilterbarItem.js","sources":["../../../src/MobileFilterbar/FilterbarItem.tsx"],"sourcesContent":["import React from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport { Grid } from '@elliemae/ds-grid';\n\nconst DSMobileFilterbarItem = ({ children, onClick }) => (\n <Grid data-testid=\"filter-bar-item-wrapper\" cols={['min-content']} pr=\"xxs\" pt=\"xxs\" role=\"button\" onClick={onClick}>\n {children}\n </Grid>\n);\nconst filterbarItemProps = {\n children: PropTypes.element.description('FilterBar Items').isRequired,\n onClick: PropTypes.func.description('Function executed when clicking filterbar item'),\n};\n\nDSMobileFilterbarItem.propTypes = filterbarItemProps;\n\nconst FilterbarItemWithSchema = describe(DSMobileFilterbarItem);\nFilterbarItemWithSchema.propTypes = filterbarItemProps;\n\nexport { DSMobileFilterbarItem, FilterbarItemWithSchema };\n"],"names":["DSMobileFilterbarItem","children","onClick","React","Grid","filterbarItemProps","PropTypes","element","description","isRequired","func","propTypes","FilterbarItemWithSchema","describe"],"mappings":";;;;;;;;;;;;IAIMA,qBAAqB,GAAG,SAAxBA,qBAAwB;EAAA,IAAGC,QAAH,QAAGA,QAAH;MAAaC,OAAb,QAAaA,OAAb;EAAA,oBAC5BC,wCAACC,WAAD;IAAM,eAAY,yBAAlB;IAA4C,IAAI,EAAE,CAAC,aAAD,CAAlD;IAAmE,EAAE,EAAC,KAAtE;IAA4E,EAAE,EAAC,KAA/E;IAAqF,IAAI,EAAC,QAA1F;IAAmG,OAAO,EAAEF;KACzGD,QADH,CAD4B;AAAA;;AAK9B,IAAMI,kBAAkB,GAAG;EACzBJ,QAAQ,EAAEK,mBAAS,CAACC,OAAV,CAAkBC,WAAlB,CAA8B,iBAA9B,EAAiDC,UADlC;EAEzBP,OAAO,EAAEI,mBAAS,CAACI,IAAV,CAAeF,WAAf,CAA2B,gDAA3B;AAFgB,CAA3B;AAKAR,qBAAqB,CAACW,SAAtB,GAAkCN,kBAAlC;IAEMO,uBAAuB,GAAGC,kBAAQ,CAACb,qBAAD;AACxCY,uBAAuB,CAACD,SAAxB,GAAoCN,kBAApC;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterbarSort.js","sources":["../../../src/MobileFilterbar/FilterbarSort.tsx"],"sourcesContent":["import React from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport MobileSeparator from '../MobileSeparator';\n\nconst Separator = styled.div`\n & > * {\n margin-left: 0;\n }\n`;\n\nconst DSMobileFilterbarSort = ({ children }) => (\n <>\n {children}\n <Grid pb=\"xxs\" pt=\"xxs\" cols={['min-content']}>\n <Separator>\n <MobileSeparator margin=\"xxs\" direction=\"vertical\" color={['neutral', '300']} />\n </Separator>\n </Grid>\n </>\n);\n\nconst filterbarSortProps = {\n children: PropTypes.element.description('FilterBar Sort Item').isRequired,\n};\n\nDSMobileFilterbarSort.propTypes = filterbarSortProps;\n\nconst FilterbarSortWithSchema = describe(DSMobileFilterbarSort);\nFilterbarSortWithSchema.propTypes = filterbarSortProps;\n\nexport { DSMobileFilterbarSort, FilterbarSortWithSchema };\n"],"names":["Separator","styled","div","DSMobileFilterbarSort","children","React","Grid","MobileSeparator","filterbarSortProps","PropTypes","element","description","isRequired","propTypes","FilterbarSortWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;AAMA,IAAMA,SAAS,gBAAGC,0BAAM,CAACC,GAAV;
|
|
1
|
+
{"version":3,"file":"FilterbarSort.js","sources":["../../../src/MobileFilterbar/FilterbarSort.tsx"],"sourcesContent":["import React from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport MobileSeparator from '../MobileSeparator';\n\nconst Separator = styled.div`\n & > * {\n margin-left: 0;\n }\n`;\n\nconst DSMobileFilterbarSort = ({ children }) => (\n <>\n {children}\n <Grid pb=\"xxs\" pt=\"xxs\" cols={['min-content']}>\n <Separator>\n <MobileSeparator margin=\"xxs\" direction=\"vertical\" color={['neutral', '300']} />\n </Separator>\n </Grid>\n </>\n);\n\nconst filterbarSortProps = {\n children: PropTypes.element.description('FilterBar Sort Item').isRequired,\n};\n\nDSMobileFilterbarSort.propTypes = filterbarSortProps;\n\nconst FilterbarSortWithSchema = describe(DSMobileFilterbarSort);\nFilterbarSortWithSchema.propTypes = filterbarSortProps;\n\nexport { DSMobileFilterbarSort, FilterbarSortWithSchema };\n"],"names":["Separator","styled","div","DSMobileFilterbarSort","children","React","Grid","MobileSeparator","filterbarSortProps","PropTypes","element","description","isRequired","propTypes","FilterbarSortWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;AAMA,IAAMA,SAAS,gBAAGC,0BAAM,CAACC,GAAV;EAAA;AAAA,6BAAf;;IAMMC,qBAAqB,GAAG,SAAxBA,qBAAwB;EAAA,IAAGC,QAAH,QAAGA,QAAH;EAAA,oBAC5BC,kFACGD,QADH,eAEEC,wCAACC,WAAD;IAAM,EAAE,EAAC,KAAT;IAAe,EAAE,EAAC,KAAlB;IAAwB,IAAI,EAAE,CAAC,aAAD;kBAC5BD,wCAAC,SAAD,qBACEA,wCAACE,oCAAD;IAAiB,MAAM,EAAC,KAAxB;IAA8B,SAAS,EAAC,UAAxC;IAAmD,KAAK,EAAE,CAAC,SAAD,EAAY,KAAZ;IAD5D,CADF,CAFF,CAD4B;AAAA;;AAW9B,IAAMC,kBAAkB,GAAG;EACzBJ,QAAQ,EAAEK,mBAAS,CAACC,OAAV,CAAkBC,WAAlB,CAA8B,qBAA9B,EAAqDC;AADtC,CAA3B;AAIAT,qBAAqB,CAACU,SAAtB,GAAkCL,kBAAlC;IAEMM,uBAAuB,GAAGC,kBAAQ,CAACZ,qBAAD;AACxCW,uBAAuB,CAACD,SAAxB,GAAoCL,kBAApC;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Action.js","sources":["../../../src/MobileFooter/Action.tsx"],"sourcesContent":["/* eslint-disable jest/valid-describe */\n/* eslint-disable jest/valid-title */\nimport React from 'react';\nimport styled from 'styled-components';\nimport { typography } from 'styled-system';\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;\n\nconst DSMobileFooterActionWithSchema = describe(DSMobileFooterAction).description('Mobile footer action');\nDSMobileFooterActionWithSchema.propTypes = actionProps;\n\nexport { DSMobileFooterAction, DSMobileFooterActionWithSchema };\n"],"names":["Label","styled","span","typography","color","props","__UNSAFE_SPACE_TO_DIMSUM","theme","space","xxs","DSMobileFooterAction","label","icon","onClick","React","Grid","concat","cloneElement","size","actionProps","PropTypes","string","description","element","func","propTypes","DSMobileFooterActionWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;AAAA;AASA,IAAMA,KAAK,gBAAGC,0BAAM,CAACC,IAAV;
|
|
1
|
+
{"version":3,"file":"Action.js","sources":["../../../src/MobileFooter/Action.tsx"],"sourcesContent":["/* eslint-disable jest/valid-describe */\n/* eslint-disable jest/valid-title */\nimport React from 'react';\nimport styled from 'styled-components';\nimport { typography } from 'styled-system';\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;\n\nconst DSMobileFooterActionWithSchema = describe(DSMobileFooterAction).description('Mobile footer action');\nDSMobileFooterActionWithSchema.propTypes = actionProps;\n\nexport { DSMobileFooterAction, DSMobileFooterActionWithSchema };\n"],"names":["Label","styled","span","typography","color","props","__UNSAFE_SPACE_TO_DIMSUM","theme","space","xxs","DSMobileFooterAction","label","icon","onClick","React","Grid","concat","cloneElement","size","actionProps","PropTypes","string","description","element","func","propTypes","DSMobileFooterActionWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;AAAA;AASA,IAAMA,KAAK,gBAAGC,0BAAM,CAACC,IAAV;EAAA;AAAA,kEACPC,uBADO,EAEPC,cAAK,CAAC,SAAD,EAAY,KAAZ,CAFE,EAGS,UAACC,KAAD;EAAA,OAAWC,iCAAwB,CAACD,KAAK,CAACE,KAAN,CAAYC,KAAZ,CAAkBC,GAAnB,CAAnC;AAAA,CAHT,EAIW,UAACJ,KAAD;EAAA,OAAWC,iCAAwB,CAACD,KAAK,CAACE,KAAN,CAAYC,KAAZ,CAAkBC,GAAnB,CAAnC;AAAA,CAJX,CAAX;;IAOMC,oBAAoB,GAAG,SAAvBA,oBAAuB;EAAA,IAAGC,KAAH,QAAGA,KAAH;MAAUC,IAAV,QAAUA,IAAV;MAAgBC,OAAhB,QAAgBA,OAAhB;EAAA,oBAC3BC,wCAACC,WAAD;IACE,eAAY,yBADd;IAEE,IAAI,EAAE,CAAC,MAAD,EAASC,MAAT,CAAgBL,KAAK,GAAG,aAAH,GAAmB,MAAxC,CAFR;IAGE,cAAc,EAAC,QAHjB;IAIE,IAAI,EAAC,QAJP;IAKE,OAAO,EAAEE;kBAETC,wCAACC,WAAD;IAAM,cAAc,EAAC,QAArB;IAA8B,UAAU,EAAC;kBACtCD,yBAAK,CAACG,YAAN,CAAmBL,IAAnB,EAAyB;IACxB,eAAe,8BADS;IAExBM,IAAI,EAAE,CAACP,KAAD,GAAS,GAAT,GAAe;GAFtB,CADH,CAPF,EAcGA,KAAK,iBACJG,wCAACC,WAAD;IAAM,cAAc,EAAC;kBACnBD,wCAAC,KAAD;IAAO,QAAQ,EAAC;KAAQH,KAAxB,CADF,CAfJ,CAD2B;AAAA;;AAuB7B,IAAMQ,WAAW,GAAG;;EAElBR,KAAK,EAAES,mBAAS,CAACC,MAAV,CAAiBC,WAAjB,CAA6B,cAA7B,CAFW;;;EAIlBV,IAAI,EAAEQ,mBAAS,CAACG,OAAV,CAAkBD,WAAlB,CAA8B,aAA9B,CAJY;;;EAMlBT,OAAO,EAAEO,mBAAS,CAACI,IAAV,CAAeF,WAAf,CAA2B,kBAA3B;AANS,CAApB;AASAZ,oBAAoB,CAACe,SAArB,GAAiCN,WAAjC;IAEMO,8BAA8B,GAAGC,kBAAQ,CAACjB,oBAAD,CAAR,CAA+BY,WAA/B,CAA2C,sBAA3C;AACvCI,8BAA8B,CAACD,SAA/B,GAA2CN,WAA3C;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Footer.js","sources":["../../../src/MobileFooter/Footer.tsx"],"sourcesContent":["/* 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;\n\nconst MobileFooterWithSchema = describe(MobileFooter);\nMobileFooterWithSchema.propTypes = footerProps;\n\nexport default MobileFooter;\n\nexport { MobileFooterWithSchema };\n"],"names":["FooterWrap","styled","Grid","props","theme","colors","neutral","border","__UNSAFE_SPACE_TO_DIMSUM","space","xs","MobileFooter","children","childArr","React","Children","toArray","isButtonType","type","DSMobileFooterText","DSButton","setCols","length","map","undefined","c","i","footerProps","PropTypes","oneOfType","element","arrayOf","isRequired","description","propTypes","MobileFooterWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAUA,IAAMA,UAAU,gBAAGC,0BAAM,CAACC,WAAD,CAAT;
|
|
1
|
+
{"version":3,"file":"Footer.js","sources":["../../../src/MobileFooter/Footer.tsx"],"sourcesContent":["/* 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;\n\nconst MobileFooterWithSchema = describe(MobileFooter);\nMobileFooterWithSchema.propTypes = footerProps;\n\nexport default MobileFooter;\n\nexport { MobileFooterWithSchema };\n"],"names":["FooterWrap","styled","Grid","props","theme","colors","neutral","border","__UNSAFE_SPACE_TO_DIMSUM","space","xs","MobileFooter","children","childArr","React","Children","toArray","isButtonType","type","DSMobileFooterText","DSButton","setCols","length","map","undefined","c","i","footerProps","PropTypes","oneOfType","element","arrayOf","isRequired","description","propTypes","MobileFooterWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAUA,IAAMA,UAAU,gBAAGC,0BAAM,CAACC,WAAD,CAAT;EAAA;AAAA,2DACM,UAACC,KAAD;EAAA,O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G,EAAEwB;SAAID,CAAf;;GAFD,CANH,CADF,CADF;AAeD;;AAED,IAAME,WAAW,GAAG;;AAEpB;AACA;EACEf,QAAQ,EAAEgB,mBAAS,CAACC,SAAV,CAAoB,CAACD,mBAAS,CAACE,OAAX,EAAoBF,mBAAS,CAACG,OAAV,CAAkBH,mBAAS,CAACE,OAA5B,CAApB,CAApB,EAA+EE,UAA/E,CAA0FC,WAA1F,CACR,kEADQ;AAJQ,CAApB;AASAtB,YAAY,CAACuB,SAAb,GAAyBP,WAAzB;IAEMQ,sBAAsB,GAAGC,kBAAQ,CAACzB,YAAD;AACvCwB,sBAAsB,CAACD,SAAvB,GAAmCP,WAAnC;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.js","sources":["../../../src/MobileFooter/Text.tsx"],"sourcesContent":["/* 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;\n\nconst DSMobileFooterTextWithSchema = describe(DSMobileFooterText);\nDSMobileFooterTextWithSchema.propTypes = props;\n\nexport { DSMobileFooterText, DSMobileFooterTextWithSchema };\n"],"names":["Text","styled","p","truncate","textStyle","color","DSMobileFooterText","children","React","props","PropTypes","string","isRequired","description","propTypes","DSMobileFooterTextWithSchema","describe"],"mappings":";;;;;;;;;;;;;;AAAA;AAOA,IAAMA,IAAI,gBAAGC,0BAAM,CAACC,CAAV;
|
|
1
|
+
{"version":3,"file":"Text.js","sources":["../../../src/MobileFooter/Text.tsx"],"sourcesContent":["/* 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;\n\nconst DSMobileFooterTextWithSchema = describe(DSMobileFooterText);\nDSMobileFooterTextWithSchema.propTypes = props;\n\nexport { DSMobileFooterText, DSMobileFooterTextWithSchema };\n"],"names":["Text","styled","p","truncate","textStyle","color","DSMobileFooterText","children","React","props","PropTypes","string","isRequired","description","propTypes","DSMobileFooterTextWithSchema","describe"],"mappings":";;;;;;;;;;;;;;AAAA;AAOA,IAAMA,IAAI,gBAAGC,0BAAM,CAACC,CAAV;EAAA;AAAA,qCAENC,iBAAQ,EAFF,EAGNC,kBAAS,CAAC,MAAD,CAHH,EAINC,cAAK,CAAC,SAAD,EAAY,KAAZ,CAJC,CAAV;;IAOMC,kBAAkB,GAAG,SAArBA,kBAAqB;EAAA,IAAGC,QAAH,QAAGA,QAAH;EAAA,oBAAkBC,wCAAC,IAAD,QAAOD,QAAP,CAAlB;AAAA;;AAE3B,IAAME,KAAK,GAAG;EACZF,QAAQ,EAAEG,mBAAS,CAACC,MAAV,CAAiBC,UAAjB,CAA4BC,WAA5B,CAAwC,UAAxC;AADE,CAAd;AAIAP,kBAAkB,CAACQ,SAAnB,GAA+BL,KAA/B;IAEMM,4BAA4B,GAAGC,kBAAQ,CAACV,kBAAD;AAC7CS,4BAA4B,CAACD,SAA7B,GAAyCL,KAAzC;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileListItem.js","sources":["../../../src/MobileListItem/MobileListItem.tsx"],"sourcesContent":["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;\n\nconst ListItemWithSchema = describe(MobileListItem);\nListItemWithSchema.propTypes = listItemProps;\n\nexport { DSMobileListItem, ListItemWithSchema };\n"],"names":["StyledContainer","styled","Grid","props","theme","colors","neutral","border","StyledTitle","div","fontWeights","semibold","truncate","MobileListItem","leftAddon","rightAddon","title","value","dataTestid","cols","unshift","__UNSAFE_SPACE_TO_DIMSUM","space","m","push","React","s","DSMobileListItem","withTheme","listItemProps","PropTypes","element","description","string","isRequired","oneOfType","number","defaultValue","object","propTypes","ListItemWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;AAMA,IAAMA,eAAe,gBAAGC,0BAAM,CAACC,WAAD,CAAT;
|
|
1
|
+
{"version":3,"file":"MobileListItem.js","sources":["../../../src/MobileListItem/MobileListItem.tsx"],"sourcesContent":["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;\n\nconst ListItemWithSchema = describe(MobileListItem);\nListItemWithSchema.propTypes = listItemProps;\n\nexport { DSMobileListItem, ListItemWithSchema };\n"],"names":["StyledContainer","styled","Grid","props","theme","colors","neutral","border","StyledTitle","div","fontWeights","semibold","truncate","MobileListItem","leftAddon","rightAddon","title","value","dataTestid","cols","unshift","__UNSAFE_SPACE_TO_DIMSUM","space","m","push","React","s","DSMobileListItem","withTheme","listItemProps","PropTypes","element","description","string","isRequired","oneOfType","number","defaultValue","object","propTypes","ListItemWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;AAMA,IAAMA,eAAe,gBAAGC,0BAAM,CAACC,WAAD,CAAT;EAAA;AAAA,4CACL,UAACC,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CADK,EAEF,UAACH,KAAD;EAAA,OAAWI,eAAM,CAACJ,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAD,CAAjB;AAAA,CAFE,CAArB;AAIA,IAAME,WAAW,gBAAGP,0BAAM,CAACQ,GAAV;EAAA;AAAA,wDACA,UA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ACfuB,wCAAC,WAAD,QAAcT,KAAd,CADF,CAdF,EAiBGD,UAAU,iBACTU,wCAACvB,WAAD;IAAM,UAAU,EAAC,QAAjB;IAA0B,cAAc,EAAC;KACtCa,UADH,CAlBJ,CADF;AAyBD,CApCD;;IAsCMY,gBAAgB,GAAGC,kBAAS,CAACf,cAAD;AAElC,IAAMgB,aAAa,GAAG;EACpBf,SAAS,EAAEgB,mBAAS,CAACC,OAAV,CAAkBC,WAAlB,CAA8B,4BAA9B,CADS;EAEpBjB,UAAU,EAAEe,mBAAS,CAACC,OAAV,CAAkBC,WAAlB,CAA8B,6BAA9B,CAFQ;EAGpBhB,KAAK,EAAEc,mBAAS,CAACG,MAAV,CAAiBD,WAAjB,CAA6B,cAA7B,EAA6CE,UAHhC;EAIpBjB,KAAK,EAAEa,mBAAS,CAACK,SAAV,CAAoB,CAACL,mBAAS,CAACG,MAAX,EAAmBH,mBAAS,CAACM,MAA7B,CAApB,EAA0DJ,WAA1D,CACL,yCADK,CAJa;EAOpBd,UAAU,EAAEY,mBAAS,CAACG,MAAV,CAAiBD,WAAjB,CAA6B,qBAA7B,EAAoDK,YAApD,CAAiE,kBAAjE,CAPQ;EAQpBjC,KAAK,EAAE0B,mBAAS,CAACQ,MAAV,CAAiBN,WAAjB,CAA6B,EAA7B;AARa,CAAtB;AAWAnB,cAAc,CAAC0B,SAAf,GAA2BV,aAA3B;IAEMW,kBAAkB,GAAGC,kBAAQ,CAAC5B,cAAD;AACnC2B,kBAAkB,CAACD,SAAnB,GAA+BV,aAA/B;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobilePageHeader.js","sources":["../../../src/MobilePageHeader/MobilePageHeader.tsx"],"sourcesContent":["/* 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;\n\nconst PageHeaderWithSchema = describe(MobilePageHeader);\nPageHeaderWithSchema.propTypes = pageHeaderProps;\n\nconst DSMobilePageHeader = withTheme(MobilePageHeader);\n\nexport { DSMobilePageHeader, PageHeaderWithSchema };\n"],"names":["StyledTitle","styled","Grid","props","theme","fontWeights","regular","colors","neutral","withBreadcrumb","StyledBreadCrumb","div","truncate","Label","Value","withMarginRight","Wrapper","border","MobilePageHeader","pageTitle","contextMenu","firstAction","secondAction","backArrow","breadCrumb","onOpenContextMenu","value","label","hasValue","countActions","useMemo","count","useState","open","setOpen","handleContext","useCallback","separator","React","MobileSeparator","cols","cols2","push","space","xs","__UNSAFE_SPACE_TO_DIMSUM","s","xxs","xxxs","TruncatedExpandableText","DSButton","ChevronSmallDown","cloneElement","undefined","onChange","event","item","pageHeaderProps","PropTypes","string","description","isRequired","element","func","number","object","propTypes","PageHeaderWithSchema","describe","DSMobilePageHeader","withTheme"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAcA,IAAMA,WAAW,gBAAGC,0BAAM,CAACC,WAAD,CAAT;AAAA;AAAA,qFAEA,UAACC,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYC,WAAZ,CAAwBC,OAAnC;AAAA,CAFA,EAGN,UAACH,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYG,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAHM,EAID,UAACL,KAAD;AAAA,SAAYA,KAAK,CAACM,cAAN,GAAuB,MAAvB,GAAgC,MAA5C;AAAA,CAJC,EAKA,UAACN,KAAD;AAAA,SAAYA,KAAK,CAACM,cAAN,GAAuB,GAAvB,GAA6B,KAAzC;AAAA,CALA,CAAjB;AAQA,IAAMC,gBAAgB,gBAAGT,0BAAM,CAACU,GAAV;AAAA;AAAA,wDAEL,UAACR,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYC,WAAZ,CAAwBC,OAAnC;AAAA,CAFK,EAGX,UAACH,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYG,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAHW,EAIlBI,iBAAQ,EAJU,CAAtB;AAOA,IAAMC,KAAK,gBAAGZ,0BAAM,CAACU,GAAV;AAAA;AAAA,wBACA,UAACR,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYG,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CADA,EAEPI,iBAAQ,EAFD,CAAX;AAKA,IAAME,KAAK,gBAAGb,0BAAM,CAACU,GAAV;AAAA;AAAA,8CACPC,iBAAQ,EADD,EAEA,UAACT,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYG,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C,MAAV,CAAiBC,WAAjB,CAA6B,oBAA7B,CATe;AAUtBxD,EAAAA,KAAK,EAAEsD,mBAAS,CAACO,MAAV,CAAiBL,WAAjB,CAA6B,cAA7B;AAVe,CAAxB;AAaA1C,gBAAgB,CAACgD,SAAjB,GAA6BT,eAA7B;IAEMU,oBAAoB,GAAGC,kBAAQ,CAAClD,gBAAD;AACrCiD,oBAAoB,CAACD,SAArB,GAAiCT,eAAjC;IAEMY,kBAAkB,GAAGC,kBAAS,CAACpD,gBAAD;;;;;"}
|
|
1
|
+
{"version":3,"file":"MobilePageHeader.js","sources":["../../../src/MobilePageHeader/MobilePageHeader.tsx"],"sourcesContent":["/* 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;\n\nconst PageHeaderWithSchema = describe(MobilePageHeader);\nPageHeaderWithSchema.propTypes = pageHeaderProps;\n\nconst DSMobilePageHeader = withTheme(MobilePageHeader);\n\nexport { DSMobilePageHeader, PageHeaderWithSchema };\n"],"names":["StyledTitle","styled","Grid","props","theme","fontWeights","regular","colors","neutral","withBreadcrumb","StyledBreadCrumb","div","truncate","Label","Value","withMarginRight","Wrapper","border","MobilePageHeader","pageTitle","contextMenu","firstAction","secondAction","backArrow","breadCrumb","onOpenContextMenu","value","label","hasValue","countActions","useMemo","count","useState","open","setOpen","handleContext","useCallback","separator","React","MobileSeparator","cols","cols2","push","space","xs","__UNSAFE_SPACE_TO_DIMSUM","s","xxs","xxxs","TruncatedExpandableText","DSButton","ChevronSmallDown","cloneElement","undefined","onChange","event","item","pageHeaderProps","PropTypes","string","description","isRequired","element","func","number","object","propTypes","PageHeaderWithSchema","describe","DSMobilePageHeader","withTheme"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAcA,IAAMA,WAAW,gBAAGC,0BAAM,CAACC,WAAD,CAAT;EAAA;AAAA,qFAEA,UAACC,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAN,CAAYC,WAAZ,CAAwBC,OAAnC;AAAA,CAFA,EAGN,UAACH,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAN,CAAYG,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAHM,EAID,UAACL,KAAD;EAAA,OAAYA,KAAK,CAACM,cAAN,GAAuB,MAAvB,GAAgC,MAA5C;AAAA,CAJC,EAKA,UAACN,KAAD;EAAA,OAAYA,KAAK,CAACM,cAAN,GAAuB,GAAvB,GAA6B,KAAzC;AAAA,CALA,CAAjB;AAQA,IAAMC,gBAAgB,gBAAGT,0BAAM,CAACU,GAAV;EAA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AAS,CAACO,MAAV,CAAiBL,WAAjB,CAA6B,cAA7B;AAVe,CAAxB;AAaA1C,gBAAgB,CAACgD,SAAjB,GAA6BT,eAA7B;IAEMU,oBAAoB,GAAGC,kBAAQ,CAAClD,gBAAD;AACrCiD,oBAAoB,CAACD,SAArB,GAAiCT,eAAjC;IAEMY,kBAAkB,GAAGC,kBAAS,CAACpD,gBAAD;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileSelectList.js","sources":["../../../src/MobileSelectList/MobileSelectList.tsx"],"sourcesContent":["/* eslint react/jsx-no-bind:0 react/no-this-in-sfc:0 */\nimport React, { useState, useEffect } from 'react';\nimport { noop } from 'lodash';\nimport PropTypes from 'prop-types';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSTextBox } from '@elliemae/ds-form';\nimport { op, withTheme, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport { DSMobileTouchable } from '../MobileTouchable';\nimport { StyledContainer, HeaderContainer, Footer, ListContainer, checkbox, checked, selectedMark } from './styled';\n\nconst MobileSelectList = ({\n open = false,\n header = null,\n multiple = false,\n onChange = noop,\n children,\n theme,\n zIndex = 1,\n useSearch,\n onSearch = noop,\n dataTestid = 'mobile-select-list',\n buttonFooter = null,\n onApply = noop,\n selecteds: initSelecteds = [],\n}) => {\n const rows = ['auto', 1];\n const [selecteds, setSelected] = useState(initSelecteds);\n const [filter, setFilter] = useState('');\n useEffect(() => {\n setSelected(initSelecteds);\n }, [initSelecteds]);\n\n const handleSelection = (value) => {\n if (multiple) {\n const index = selecteds.findIndex((s) => s === value);\n if (index > -1) setSelected(selecteds.filter((s) => s !== value));\n else setSelected([...selecteds, value]);\n } else setSelected([value]);\n };\n const handleChange = function (event) {\n onChange(event, this);\n handleSelection(this.value);\n };\n const handleOnSearch = (e) => {\n setFilter(e.target.value);\n onSearch(e);\n };\n\n const handleApply = function (e) {\n if (this.onClick) this.onClick(e);\n onApply(e, selecteds);\n };\n if (buttonFooter) rows.push(op('*', __UNSAFE_SPACE_TO_DIMSUM(theme.space.xl), 1.16666));\n if (!open) return null;\n return (\n <>\n <StyledContainer data-testid={dataTestid} rows={rows} zIndex={zIndex}>\n <HeaderContainer>\n {header}\n {useSearch && (\n <Grid\n alignItems=\"center\"\n height={__UNSAFE_SPACE_TO_DIMSUM(theme.space.xl)}\n pl={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}\n pr={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}\n >\n <DSTextBox onChange={handleOnSearch} placeholder=\"Filter by name\" value={filter} />\n </Grid>\n )}\n </HeaderContainer>\n <Grid style={{ overflow: 'hidden' }}>\n <Grid style={{ overflow: 'auto' }}>\n <ListContainer data-testid={`${dataTestid}--list-container`}>\n {React.Children.map(children, (child) => {\n let leftAddon = null;\n let rightAddon = null;\n const { value, title } = child.props;\n const found = selecteds.findIndex((s) => String(s) === String(value));\n if (\n filter &&\n !String(value).toLocaleLowerCase().includes(filter.toLocaleLowerCase()) &&\n !String(title).toLocaleLowerCase().includes(filter.toLocaleLowerCase())\n )\n return null;\n if (multiple) {\n if (found > -1) leftAddon = checked;\n else leftAddon = checkbox;\n } else if (found > -1) {\n rightAddon = selectedMark;\n }\n return (\n <DSMobileTouchable onClick={handleChange.bind(child.props)}>\n {React.cloneElement(child, { leftAddon, rightAddon })}\n </DSMobileTouchable>\n );\n })}\n </ListContainer>\n </Grid>\n </Grid>\n {buttonFooter && (\n <Footer\n alignItems=\"center\"\n // eslint-disable-next-line max-lines\n pl={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}\n pr={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}\n >\n {React.cloneElement(buttonFooter, {\n ...buttonFooter.props,\n containerProps: {\n 'data-testid': `${dataTestid}--btn`,\n },\n buttonType: 'primary',\n size: 'l',\n onClick: handleApply.bind(buttonFooter.props),\n })}\n </Footer>\n )}\n </StyledContainer>\n </>\n );\n};\n\nconst DSMobileSelectList = withTheme(MobileSelectList);\n\nMobileSelectList.propTypes = {\n /** show select list */\n open: PropTypes.bool,\n /** DSMobilePageHeader instance */\n header: PropTypes.element,\n /** called when a DSMobileListItem is touched */\n onChange: PropTypes.func,\n /** allow multiple selection */\n multiple: PropTypes.bool,\n /** Array of DSMobileListItem instances */\n children: PropTypes.arrayOf(PropTypes.element),\n /** data test id for testing purposes */\n dataTestid: PropTypes.string,\n /** footer action, DSButton instance */\n buttonFooter: PropTypes.element,\n /** called when footer action is triggered */\n onApply: PropTypes.func,\n /** zIndex */\n zIndex: PropTypes.number,\n /** init selecteds */\n selecteds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),\n theme: PropTypes.object.isRequired,\n useSearch: PropTypes.bool,\n onSearch: PropTypes.func,\n};\n\nexport { DSMobileSelectList };\n"],"names":["MobileSelectList","open","header","multiple","onChange","noop","children","theme","zIndex","useSearch","onSearch","dataTestid","buttonFooter","onApply","selecteds","initSelecteds","rows","useState","setSelected","filter","setFilter","useEffect","handleSelection","value","index","findIndex","s","handleChange","event","handleOnSearch","e","target","handleApply","onClick","push","op","__UNSAFE_SPACE_TO_DIMSUM","space","xl","React","StyledContainer","HeaderContainer","Grid","DSTextBox","overflow","ListContainer","Children","map","child","leftAddon","rightAddon","props","title","found","String","toLocaleLowerCase","includes","checked","checkbox","selectedMark","DSMobileTouchable","bind","cloneElement","Footer","containerProps","buttonType","size","DSMobileSelectList","withTheme","propTypes","PropTypes","bool","element","func","arrayOf","string","number","oneOfType","object","isRequired"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,IAAMA,gBAAgB,GAAG,SAAnBA,gBAAmB,OAcnB;AAAA,uBAbJC,IAaI;AAAA,MAbJA,IAaI,0BAbG,KAaH;AAAA,yBAZJC,MAYI;AAAA,MAZJA,MAYI,4BAZK,IAYL;AAAA,2BAXJC,QAWI;AAAA,MAXJA,QAWI,8BAXO,KAWP;AAAA,2BAVJC,QAUI;AAA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,6BAAS,CAACE,OAA5B,CAViB;;AAW3B;AACA7D,EAAAA,UAAU,EAAE2D,6BAAS,CAACK,MAZK;;AAa3B;AACA/D,EAAAA,YAAY,EAAE0D,6BAAS,CAACE,OAdG;;AAe3B;AACA3D,EAAAA,OAAO,EAAEyD,6BAAS,CAACG,IAhBQ;;AAiB3B;AACAjE,EAAAA,MAAM,EAAE8D,6BAAS,CAACM,MAlBS;;AAmB3B;AACA9D,EAAAA,SAAS,EAAEwD,6BAAS,CAACI,OAAV,CAAkBJ,6BAAS,CAACO,SAAV,CAAoB,CAACP,6BAAS,CAACK,MAAX,EAAmBL,6BAAS,CAACM,MAA7B,CAApB,CAAlB,CApBgB;AAqB3BrE,EAAAA,KAAK,EAAE+D,6BAAS,CAACQ,MAAV,CAAiBC,UArBG;AAsB3BtE,EAAAA,SAAS,EAAE6D,6BAAS,CAACC,IAtBM;AAuB3B7D,EAAAA,QAAQ,EAAE4D,6BAAS,CAACG;AAvBO,CAA7B;;;;"}
|
|
1
|
+
{"version":3,"file":"MobileSelectList.js","sources":["../../../src/MobileSelectList/MobileSelectList.tsx"],"sourcesContent":["/* eslint react/jsx-no-bind:0 react/no-this-in-sfc:0 */\nimport React, { useState, useEffect } from 'react';\nimport { noop } from 'lodash';\nimport PropTypes from 'prop-types';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSTextBox } from '@elliemae/ds-form';\nimport { op, withTheme, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport { DSMobileTouchable } from '../MobileTouchable';\nimport { StyledContainer, HeaderContainer, Footer, ListContainer, checkbox, checked, selectedMark } from './styled';\n\nconst MobileSelectList = ({\n open = false,\n header = null,\n multiple = false,\n onChange = noop,\n children,\n theme,\n zIndex = 1,\n useSearch,\n onSearch = noop,\n dataTestid = 'mobile-select-list',\n buttonFooter = null,\n onApply = noop,\n selecteds: initSelecteds = [],\n}) => {\n const rows = ['auto', 1];\n const [selecteds, setSelected] = useState(initSelecteds);\n const [filter, setFilter] = useState('');\n useEffect(() => {\n setSelected(initSelecteds);\n }, [initSelecteds]);\n\n const handleSelection = (value) => {\n if (multiple) {\n const index = selecteds.findIndex((s) => s === value);\n if (index > -1) setSelected(selecteds.filter((s) => s !== value));\n else setSelected([...selecteds, value]);\n } else setSelected([value]);\n };\n const handleChange = function (event) {\n onChange(event, this);\n handleSelection(this.value);\n };\n const handleOnSearch = (e) => {\n setFilter(e.target.value);\n onSearch(e);\n };\n\n const handleApply = function (e) {\n if (this.onClick) this.onClick(e);\n onApply(e, selecteds);\n };\n if (buttonFooter) rows.push(op('*', __UNSAFE_SPACE_TO_DIMSUM(theme.space.xl), 1.16666));\n if (!open) return null;\n return (\n <>\n <StyledContainer data-testid={dataTestid} rows={rows} zIndex={zIndex}>\n <HeaderContainer>\n {header}\n {useSearch && (\n <Grid\n alignItems=\"center\"\n height={__UNSAFE_SPACE_TO_DIMSUM(theme.space.xl)}\n pl={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}\n pr={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}\n >\n <DSTextBox onChange={handleOnSearch} placeholder=\"Filter by name\" value={filter} />\n </Grid>\n )}\n </HeaderContainer>\n <Grid style={{ overflow: 'hidden' }}>\n <Grid style={{ overflow: 'auto' }}>\n <ListContainer data-testid={`${dataTestid}--list-container`}>\n {React.Children.map(children, (child) => {\n let leftAddon = null;\n let rightAddon = null;\n const { value, title } = child.props;\n const found = selecteds.findIndex((s) => String(s) === String(value));\n if (\n filter &&\n !String(value).toLocaleLowerCase().includes(filter.toLocaleLowerCase()) &&\n !String(title).toLocaleLowerCase().includes(filter.toLocaleLowerCase())\n )\n return null;\n if (multiple) {\n if (found > -1) leftAddon = checked;\n else leftAddon = checkbox;\n } else if (found > -1) {\n rightAddon = selectedMark;\n }\n return (\n <DSMobileTouchable onClick={handleChange.bind(child.props)}>\n {React.cloneElement(child, { leftAddon, rightAddon })}\n </DSMobileTouchable>\n );\n })}\n </ListContainer>\n </Grid>\n </Grid>\n {buttonFooter && (\n <Footer\n alignItems=\"center\"\n // eslint-disable-next-line max-lines\n pl={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}\n pr={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}\n >\n {React.cloneElement(buttonFooter, {\n ...buttonFooter.props,\n containerProps: {\n 'data-testid': `${dataTestid}--btn`,\n },\n buttonType: 'primary',\n size: 'l',\n onClick: handleApply.bind(buttonFooter.props),\n })}\n </Footer>\n )}\n </StyledContainer>\n </>\n );\n};\n\nconst DSMobileSelectList = withTheme(MobileSelectList);\n\nMobileSelectList.propTypes = {\n /** show select list */\n open: PropTypes.bool,\n /** DSMobilePageHeader instance */\n header: PropTypes.element,\n /** called when a DSMobileListItem is touched */\n onChange: PropTypes.func,\n /** allow multiple selection */\n multiple: PropTypes.bool,\n /** Array of DSMobileListItem instances */\n children: PropTypes.arrayOf(PropTypes.element),\n /** data test id for testing purposes */\n dataTestid: PropTypes.string,\n /** footer action, DSButton instance */\n buttonFooter: PropTypes.element,\n /** called when footer action is triggered */\n onApply: PropTypes.func,\n /** zIndex */\n zIndex: PropTypes.number,\n /** init selecteds */\n selecteds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),\n theme: PropTypes.object.isRequired,\n useSearch: PropTypes.bool,\n onSearch: PropTypes.func,\n};\n\nexport { DSMobileSelectList };\n"],"names":["MobileSelectList","open","header","multiple","onChange","noop","children","theme","zIndex","useSearch","onSearch","dataTestid","buttonFooter","onApply","selecteds","initSelecteds","rows","useState","setSelected","filter","setFilter","useEffect","handleSelection","value","index","findIndex","s","handleChange","event","handleOnSearch","e","target","handleApply","onClick","push","op","__UNSAFE_SPACE_TO_DIMSUM","space","xl","React","StyledContainer","HeaderContainer","Grid","DSTextBox","overflow","ListContainer","Children","map","child","leftAddon","rightAddon","props","title","found","String","toLocaleLowerCase","includes","checked","checkbox","selectedMark","DSMobileTouchable","bind","cloneElement","Footer","containerProps","buttonType","size","DSMobileSelectList","withTheme","propTypes","PropTypes","bool","element","func","arrayOf","string","number","oneOfType","object","isRequired"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,IAAMA,gBAAgB,GAAG,SAAnBA,gBAAmB,OAcnB;EAAA,qBAbJC,IAaI;MAbJA,IAaI,0BAbG,KAaH;yBAZJC,MAYI;MAZJA,MAYI,4BAZK,IAYL;2BAXJC,QAWI;MAXJA,QAWI,8BAXO,KAWP;2BAVJC,QAUI;MAVJA,QAUI,8BAVOC,WAUP;MATJC,QASI,QATJA,QASI;MARJC,KAQI,QARJA,KAQI;yBAPJC,MAOI;MAPJA,MAOI,4BAPK,CAOL;MANJC,SAMI,QANJA,SAMI;2BALJC,QAKI;MALJA,QAKI,8BALOL,WAKP;6BAJJM,UAII;MAJJA,UAII,gCAJS,oBAIT;+BAHJC,YAGI;MAHJA,YAGI,kCAHW,IAGX;0BAFJC,OAEI;MAFJA,OAEI,6BAFMR,WAEN;4BADJS,SACI;MADOC,aACP,+BADuB,EACvB;EACJ,IAAMC,IAAI,GAAG,CAAC,MAAD,EAAS,CAAT,CAAb;;EACA,gBAAiCC,cAAQ,CAACF,aAAD,CAAzC;;MAAOD,SAAP;MAAkBI,WAAlB;;EACA,iBAA4BD,cAAQ,CAAC,EAAD,CAApC;;MAAOE,MAAP;MAAeC,SAAf;;EACAC,eAAS,CAAC,YAAM;IACdH,WAAW,CAACH,aAAD,CAAX;GADO,EAEN,CAACA,aAAD,CAFM,CAAT;;EAIA,IAAMO,eAAe,GAAG,SAAlBA,eAAkB,CAACC,KAAD,EAAW;IACjC,IAAIpB,QAAJ,EAAc;MACZ,IAAMqB,KAAK,GAAGV,SAAS,CAACW,SAAV,CAAoB,UAACC,CAAD;QAAA,OAAOA,CAAC,KAAKH,KAAb;OAApB,CAAd;MACA,IAAIC,KAAK,GAAG,CAAC,CAAb,EAAgBN,WAAW,CAACJ,SAAS,CAACK,MAAV,CAAiB,UAACO,CAAD;QAAA,OAAOA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9D,SAAS,EAAEwD,6BAAS,CAACI,OAAV,CAAkBJ,6BAAS,CAACO,SAAV,CAAoB,CAACP,6BAAS,CAACK,MAAX,EAAmBL,6BAAS,CAACM,MAA7B,CAApB,CAAlB,CApBgB;EAqB3BrE,KAAK,EAAE+D,6BAAS,CAACQ,MAAV,CAAiBC,UArBG;EAsB3BtE,SAAS,EAAE6D,6BAAS,CAACC,IAtBM;EAuB3B7D,QAAQ,EAAE4D,6BAAS,CAACG;AAvBO,CAA7B;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sources":["../../../src/MobileSelectList/styled.tsx"],"sourcesContent":["import React from 'react';\nimport { noop } from 'lodash';\nimport styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSCheckbox } from '@elliemae/ds-form';\nimport { Checkmark } from '@elliemae/ds-icons';\nimport { border } from '@elliemae/ds-system';\nimport { DSMobileTouchable } from '../MobileTouchable';\nimport { DSMobileListItem } from '../MobileListItem';\n\nexport const StyledContainer = styled(Grid)`\n background: ${(props) => props.theme.colors.neutral['000']};\n z-index: ${(props) => props.zIndex};\n position: fixed;\n width: 100%;\n top: 0;\n left: 0;\n right: 0;\n height: 100%;\n`;\n\nexport const HeaderContainer = styled(Grid)`\n border-bottom: ${(props) => border(props.theme.colors.neutral['300'])};\n`;\n\nexport const Footer = styled(Grid)`\n border-top: ${(props) => border(props.theme.colors.neutral['300'])};\n`;\n\nexport const ListContainer = styled.div`\n & ${DSMobileTouchable}:last-child ${DSMobileListItem} {\n border: none;\n }\n`;\n\nexport const checkbox = <DSCheckbox checked={false} onChange={noop} style={{ pointerEvents: 'none' }} />;\nexport const checked = <DSCheckbox checked onChange={noop} style={{ pointerEvents: 'none' }} />;\nexport const selectedMark = <Checkmark color={['brand-primary', 600]} />;\n"],"names":["StyledContainer","styled","Grid","props","theme","colors","neutral","zIndex","HeaderContainer","border","Footer","ListContainer","div","DSMobileTouchable","DSMobileListItem","checkbox","React","DSCheckbox","noop","pointerEvents","checked","selectedMark","Checkmark"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;IAUaA,eAAe,gBAAGC,0BAAM,CAACC,WAAD,CAAT;
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../src/MobileSelectList/styled.tsx"],"sourcesContent":["import React from 'react';\nimport { noop } from 'lodash';\nimport styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSCheckbox } from '@elliemae/ds-form';\nimport { Checkmark } from '@elliemae/ds-icons';\nimport { border } from '@elliemae/ds-system';\nimport { DSMobileTouchable } from '../MobileTouchable';\nimport { DSMobileListItem } from '../MobileListItem';\n\nexport const StyledContainer = styled(Grid)`\n background: ${(props) => props.theme.colors.neutral['000']};\n z-index: ${(props) => props.zIndex};\n position: fixed;\n width: 100%;\n top: 0;\n left: 0;\n right: 0;\n height: 100%;\n`;\n\nexport const HeaderContainer = styled(Grid)`\n border-bottom: ${(props) => border(props.theme.colors.neutral['300'])};\n`;\n\nexport const Footer = styled(Grid)`\n border-top: ${(props) => border(props.theme.colors.neutral['300'])};\n`;\n\nexport const ListContainer = styled.div`\n & ${DSMobileTouchable}:last-child ${DSMobileListItem} {\n border: none;\n }\n`;\n\nexport const checkbox = <DSCheckbox checked={false} onChange={noop} style={{ pointerEvents: 'none' }} />;\nexport const checked = <DSCheckbox checked onChange={noop} style={{ pointerEvents: 'none' }} />;\nexport const selectedMark = <Checkmark color={['brand-primary', 600]} />;\n"],"names":["StyledContainer","styled","Grid","props","theme","colors","neutral","zIndex","HeaderContainer","border","Footer","ListContainer","div","DSMobileTouchable","DSMobileListItem","checkbox","React","DSCheckbox","noop","pointerEvents","checked","selectedMark","Checkmark"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;IAUaA,eAAe,gBAAGC,0BAAM,CAACC,WAAD,CAAT;EAAA;AAAA,iGACZ,UAACC,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CADY,EAEf,UAACH,KAAD;EAAA,OAAWA,KAAK,CAACI,MAAjB;AAAA,CAFe;IAWfC,eAAe,gBAAGP,0BAAM,CAACC,WAAD,CAAT;EAAA;AAAA,4BACT,UAACC,KAAD;EAAA,OAAWM,eAAM,CAACN,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAD,CAAjB;AAAA,CADS;IAIfI,MAAM,gBAAGT,0BAAM,CAACC,WAAD,CAAT;EAAA;AAAA,yBACH,UAACC,KAAD;EAAA,OAAWM,eAAM,CAACN,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAD,CAAjB;AAAA,CADG;IAINK,aAAa,gBAAGV,0BAAM,CAACW,GAAV;EAAA;AAAA,6CACpBC,iDADoB,EACYC,8CADZ;IAMbC,QAAQ,gBAAGC,wCAACC,iBAAD;EAAY,OAAO,EAAE,KAArB;EAA4B,QAAQ,EAAEC,WAAtC;EAA4C,KAAK,EAAE;IAAEC,aAAa,EAAE;;AAApE;IACXC,OAAO,gBAAGJ,wCAACC,iBAAD;EAAY,OAAO,MAAnB;EAAoB,QAAQ,EAAEC,WAA9B;EAAoC,KAAK,EAAE;IAAEC,aAAa,EAAE;;AAA5D;IACVE,YAAY,gBAAGL,wCAACM,iBAAD;EAAW,KAAK,EAAE,CAAC,eAAD,EAAkB,GAAlB;AAAlB;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Separator.js","sources":["../../../src/MobileSeparator/Separator.tsx"],"sourcesContent":["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;\n\nconst MobileSeparatorWithSchema = describe(MobileSeparator);\nMobileSeparatorWithSchema.propTypes = mobileSeparatorProps;\n\nexport { MobileSeparatorWithSchema };\nexport default MobileSeparator;\n"],"names":["Separator","styled","Grid","theme","color","borderType","colors","MobileSeparator","direction","type","margin","orientation","xORy","styles","width","height","React","mobileSeparatorProps","PropTypes","oneOf","description","defaultValue","array","propTypes","MobileSeparatorWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;AAKA,IAAMA,SAAS,gBAAGC,0BAAM,CAACC,WAAD,CAAT;
|
|
1
|
+
{"version":3,"file":"Separator.js","sources":["../../../src/MobileSeparator/Separator.tsx"],"sourcesContent":["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;\n\nconst MobileSeparatorWithSchema = describe(MobileSeparator);\nMobileSeparatorWithSchema.propTypes = mobileSeparatorProps;\n\nexport { MobileSeparatorWithSchema };\nexport default MobileSeparator;\n"],"names":["Separator","styled","Grid","theme","color","borderType","colors","MobileSeparator","direction","type","margin","orientation","xORy","styles","width","height","React","mobileSeparatorProps","PropTypes","oneOf","description","defaultValue","array","propTypes","MobileSeparatorWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;AAKA,IAAMA,SAAS,gBAAGC,0BAAM,CAACC,WAAD,CAAT;EAAA;AAAA,0CACC;EAAA,IAAGC,KAAH,QAAGA,KAAH;MAAUC,KAAV,QAAUA,KAAV;MAAiBC,UAAjB,QAAiBA,UAAjB;EAAA,iBAAqCF,KAAK,CAACG,MAAN,CAAaF,KAAK,CAAC,CAAD,CAAlB,EAAuBA,KAAK,CAAC,CAAD,CAA5B,CAArC,kBAA6EC,UAA7E;AAAA,CADD,EAEE;EAAA,IAAGF,KAAH,SAAGA,KAAH;MAAUC,KAAV,SAAUA,KAAV;MAAiBC,UAAjB,SAAiBA,UAAjB;EAAA,iBAAqCF,KAAK,CAACG,MAAN,CAAaF,KAAK,CAAC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AmB,GAAnB,EAAwB,GAAxB,EAA6B,IAA7B,EAAmC,KAAnC,CAAhB,EACLC,WADK,CACO,yBADP,EAELC,YAFK,CAEQ,IAFR;AANmB,CAA7B;AAWAd,eAAe,CAACgB,SAAhB,GAA4BN,oBAA5B;IAEMO,yBAAyB,GAAGC,kBAAQ,CAAClB,eAAD;AAC1CiB,yBAAyB,CAACD,SAA1B,GAAsCN,oBAAtC;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sources":["../../../src/MobileTimePicker/Input.tsx"],"sourcesContent":["import React from 'react';\nimport { focus, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport styled from 'styled-components';\n\nconst StyledInput = styled.input`\n input[type=time]& { \n -webkit-appearance: none;\n -moz-appearance: none;\n -webkit-tap-highlight-color: transparent;\n appearance: none;\n color: transparent;\n\n white-space: nowrap;\n position: relative;\n height: ${props => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.l)};\n width: 100%;\n max-width: calc(100% - 32px);\n outline: none;\n box-sizing: border-box;\n display: flex;\n background: ${props => props.theme.colors.neutral['000']};\n padding: 0 ${props => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs)};\n z-index: 1;\n border-radius: 2px;\n border: solid 1px ${props => props.theme.colors.neutral[200]};\n }\n\n input[type=time]&:active, input[type=time]&:focus {\n ${props => focus(props.theme.colors.brand[700])}\n }\n\n &:before {\n color: ${props =>\n props.value === ''\n ? props.theme.colors.neutral['500']\n : props.theme.colors.neutral['800']};\n content: '${props =>\n props.value === '' ? props.placeholder : props['data-displayvalue']}';\n }\n\n input[type=time]&::-webkit-datetime-edit, input[type=time]&::-webkit-inner-spin-button, input[type=time]&::-webkit-clear-button {\n -webkit-appearance: none;\n display: none;\n }\n`;\n\nexport const Input = ({ innerRef, ...props }) => (\n <StyledInput ref={innerRef} {...props} />\n);\n"],"names":["StyledInput","styled","input","props","__UNSAFE_SPACE_TO_DIMSUM","theme","space","l","colors","neutral","xs","focus","brand","value","placeholder","Input","innerRef","React"],"mappings":";;;;;;;;;;;;;;;;;;AAIA,IAAMA,WAAW,gBAAGC,0BAAM,CAACC,KAAV;
|
|
1
|
+
{"version":3,"file":"Input.js","sources":["../../../src/MobileTimePicker/Input.tsx"],"sourcesContent":["import React from 'react';\nimport { focus, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport styled from 'styled-components';\n\nconst StyledInput = styled.input`\n input[type=time]& { \n -webkit-appearance: none;\n -moz-appearance: none;\n -webkit-tap-highlight-color: transparent;\n appearance: none;\n color: transparent;\n\n white-space: nowrap;\n position: relative;\n height: ${props => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.l)};\n width: 100%;\n max-width: calc(100% - 32px);\n outline: none;\n box-sizing: border-box;\n display: flex;\n background: ${props => props.theme.colors.neutral['000']};\n padding: 0 ${props => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs)};\n z-index: 1;\n border-radius: 2px;\n border: solid 1px ${props => props.theme.colors.neutral[200]};\n }\n\n input[type=time]&:active, input[type=time]&:focus {\n ${props => focus(props.theme.colors.brand[700])}\n }\n\n &:before {\n color: ${props =>\n props.value === ''\n ? props.theme.colors.neutral['500']\n : props.theme.colors.neutral['800']};\n content: '${props =>\n props.value === '' ? props.placeholder : props['data-displayvalue']}';\n }\n\n input[type=time]&::-webkit-datetime-edit, input[type=time]&::-webkit-inner-spin-button, input[type=time]&::-webkit-clear-button {\n -webkit-appearance: none;\n display: none;\n }\n`;\n\nexport const Input = ({ innerRef, ...props }) => (\n <StyledInput ref={innerRef} {...props} />\n);\n"],"names":["StyledInput","styled","input","props","__UNSAFE_SPACE_TO_DIMSUM","theme","space","l","colors","neutral","xs","focus","brand","value","placeholder","Input","innerRef","React"],"mappings":";;;;;;;;;;;;;;;;;;AAIA,IAAMA,WAAW,gBAAGC,0BAAM,CAACC,KAAV;EAAA;AAAA,0mBAUH,UAAAC,KAAK;EAAA,OAAIC,iCA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Effect } 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;\n\nconst DSMobileTimePickerWithSchema = describe(DSMobileTimePicker).description('Time picker for mobile & tablet');\n\nDSMobileTimePickerWithSchema.propTypes = pickerProps;\n\nexport { DSMobileTimePicker, DSMobileTimePickerWithSchema };\n"],"names":["DSMobileTimePicker","disabled","value","tabIndex","placeholder","onChange","inputRef","useRef","valueArr","split","useEffect","current","defaultValue","displayValue","useMemo","ampm","h","React","DSInputGroup","DSButton","DSIconColors","PRIMARY","NEUTRAL","RecentDocuments","focus","click","Input","e","target","nativeEvent","iosClearDefault","window","setTimeout","defaultProps","pickerProps","PropTypes","bool","description","number","string","func","propTypes","DSMobileTimePickerWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;IAQMA,kBAAkB,GAAG,SAArBA,kBAAqB,OAA0D;
|
|
1
|
+
{"version":3,"file":"MobileTimePicker.js","sources":["../../../src/MobileTimePicker/MobileTimePicker.tsx"],"sourcesContent":["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;\n\nconst DSMobileTimePickerWithSchema = describe(DSMobileTimePicker).description('Time picker for mobile & tablet');\n\nDSMobileTimePickerWithSchema.propTypes = pickerProps;\n\nexport { DSMobileTimePicker, DSMobileTimePickerWithSchema };\n"],"names":["DSMobileTimePicker","disabled","value","tabIndex","placeholder","onChange","inputRef","useRef","valueArr","split","useEffect","current","defaultValue","displayValue","useMemo","ampm","h","React","DSInputGroup","DSButton","DSIconColors","PRIMARY","NEUTRAL","RecentDocuments","focus","click","Input","e","target","nativeEvent","iosClearDefault","window","setTimeout","defaultProps","pickerProps","PropTypes","bool","description","number","string","func","propTypes","DSMobileTimePickerWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;IAQMA,kBAAkB,GAAG,SAArBA,kBAAqB,OAA0D;EAAA,IAAvDC,QAAuD,QAAvDA,QAAuD;MAA7CC,KAA6C,QAA7CA,KAA6C;MAAtCC,QAAsC,QAAtCA,QAAsC;MAA5BC,WAA4B,QAA5BA,WAA4B;MAAfC,SAAe,QAAfA,QAAe;EACnF,IAAMC,QAAQ,GAAGC,YAAM,CAAC,IAAD,CAAvB;EACA,IAAMC,QAAQ,GAAGN,KAAK,CAACO,KAAN,CAAY,GAAZ,CAAjB;EACAC,eAAS,CAAC,YAAM;;AAElB;AACA;AACA;AACA;IACI,IAAIJ,QAAQ,CAACK,OAAb,EAAsB;MACpBL,QAAQ,CAACK,OAAT,CAAiBC,YAAjB,GAAgC,EAAhC;;GAPK,EASN,CAACN,QAAQ,CAACK,OAAV,CATM,CAAT;EAUA,IAAME,YAAY,GAAGC,aAAO,CAAC,YAAM;IACjC,IAAI,CAACZ,KAAD,IAAU,CAACM,QAAQ,CAAC,CAAD,CAAnB,IAA0B,CAACA,QAAQ,CAAC,CAAD,CAAvC,EAA4C,OAAO,EAAP;IAC5C,IAAMO,IAAI,GAAGP,QAAQ,CAAC,CAAD,CAAR,IAAe,EAAf,GAAoB,IAApB,GAA2B,IAAxC;IACA,IAAMQ,CAAC,GAAGR,QAAQ,CAAC,CAAD,CAAR,GAAc,EAAd,GAAmBA,QAAQ,CAAC,CA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IAAMgC,WAAW,GAAG;;AAEpB;AACA;EACEjC,QAAQ,EAAEkC,mBAAS,CAACC,IAAV,CAAeC,WAAf,CAA2B,kCAA3B,CAJQ;;;AAMpB;AACA;EACElC,QAAQ,EAAEgC,mBAAS,CAACG,MAAV,CAAiBD,WAAjB,CAA6B,yCAA7B,CARQ;;;AAUpB;AACA;EACEjC,WAAW,EAAE+B,mBAAS,CAACI,MAAV,CAAiBF,WAAjB,CAA6B,uBAA7B,CAZK;;;AAcpB;AACA;EACEhC,QAAQ,EAAE8B,mBAAS,CAACK,IAAV,CAAeH,WAAf,CAA2B,2DAA3B,CAhBQ;;;AAkBpB;AACA;EACEnC,KAAK,EAAEiC,mBAAS,CAACI,MAAV,CAAiBF,WAAjB,CAA6B,oDAA7B;AApBW,CAApB;AAuBArC,kBAAkB,CAACyC,SAAnB,GAA+BP,WAA/B;IAEMQ,4BAA4B,GAAGC,kBAAQ,CAAC3C,kBAAD,CAAR,CAA6BqC,WAA7B,CAAyC,iCAAzC;AAErCK,4BAA4B,CAACD,SAA7B,GAAyCP,WAAzC;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileTouchable.js","sources":["../../../src/MobileTouchable/MobileTouchable.tsx"],"sourcesContent":["import React, { useState, useCallback } from 'react';\nimport { noop } from 'lodash';\nimport PropTypes from 'prop-types';\nimport styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { withTheme } from '@elliemae/ds-system';\n\nconst StyledContainer = styled(Grid)`\n cursor: pointer;\n background: ${(props) => (props.touching ? props.theme.colors.brand['100'] : props.theme.colors.neutral['000'])};\n`;\n\nconst MobileTouchable = ({\n children,\n onClick = noop,\n theme,\n dataTestid = 'mobile-touchable',\n render,\n ...gridProps\n}) => {\n const [touching, setTouching] = useState(false);\n const handleStart = useCallback(() => setTouching(true));\n const handleEnd = useCallback(() => setTouching(false));\n return (\n <StyledContainer\n {...gridProps}\n touching={touching}\n onClick={onClick}\n onTouchStart={handleStart}\n onTouchEnd={handleEnd}\n data-testid={dataTestid}\n >\n {children || render(gridProps)}\n </StyledContainer>\n );\n};\n\nMobileTouchable.propTypes = {\n onClick: PropTypes.func,\n children: PropTypes.any,\n render: PropTypes.func,\n theme: PropTypes.any,\n dataTestid: PropTypes.string,\n};\n\nconst DSMobileTouchable = withTheme(MobileTouchable);\n\nexport { DSMobileTouchable };\n"],"names":["StyledContainer","styled","Grid","props","touching","theme","colors","brand","neutral","MobileTouchable","children","onClick","noop","dataTestid","render","gridProps","useState","setTouching","handleStart","useCallback","handleEnd","React","propTypes","PropTypes","func","any","string","DSMobileTouchable","withTheme"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAMA,eAAe,gBAAGC,0BAAM,CAACC,WAAD,CAAT;
|
|
1
|
+
{"version":3,"file":"MobileTouchable.js","sources":["../../../src/MobileTouchable/MobileTouchable.tsx"],"sourcesContent":["import React, { useState, useCallback } from 'react';\nimport { noop } from 'lodash';\nimport PropTypes from 'prop-types';\nimport styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { withTheme } from '@elliemae/ds-system';\n\nconst StyledContainer = styled(Grid)`\n cursor: pointer;\n background: ${(props) => (props.touching ? props.theme.colors.brand['100'] : props.theme.colors.neutral['000'])};\n`;\n\nconst MobileTouchable = ({\n children,\n onClick = noop,\n theme,\n dataTestid = 'mobile-touchable',\n render,\n ...gridProps\n}) => {\n const [touching, setTouching] = useState(false);\n const handleStart = useCallback(() => setTouching(true));\n const handleEnd = useCallback(() => setTouching(false));\n return (\n <StyledContainer\n {...gridProps}\n touching={touching}\n onClick={onClick}\n onTouchStart={handleStart}\n onTouchEnd={handleEnd}\n data-testid={dataTestid}\n >\n {children || render(gridProps)}\n </StyledContainer>\n );\n};\n\nMobileTouchable.propTypes = {\n onClick: PropTypes.func,\n children: PropTypes.any,\n render: PropTypes.func,\n theme: PropTypes.any,\n dataTestid: PropTypes.string,\n};\n\nconst DSMobileTouchable = withTheme(MobileTouchable);\n\nexport { DSMobileTouchable };\n"],"names":["StyledContainer","styled","Grid","props","touching","theme","colors","brand","neutral","MobileTouchable","children","onClick","noop","dataTestid","render","gridProps","useState","setTouching","handleStart","useCallback","handleEnd","React","propTypes","PropTypes","func","any","string","DSMobileTouchable","withTheme"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAMA,eAAe,gBAAGC,0BAAM,CAACC,WAAD,CAAT;EAAA;AAAA,wCAEL,UAACC,KAAD;EAAA,OAAYA,KAAK,CAACC,QAAN,GAAiBD,KAAK,CAACE,KAAN,CAAYC,MAAZ,CAAmBC,KAAnB,CAAyB,KAAzB,CAAjB,GAAmDJ,KAAK,CAACE,KAAN,CAAYC,MAAZ,CAAmBE,OAAnB,CAA2B,KAA3B,CAA/D;AAAA,CAFK,CAArB;;AAKA,IAAMC,eAAe,GAAG,SAAlBA,eAAkB,OAOlB;MANJC,QAMI,QANJA,QAMI;0BALJC,OAKI;MALJA,OAKI,6BALMC,WAKN;WAJJP,KAII;iCAHJQ,UAGI;MAHJA,UAGI,gCAHS,kBAGT;MAFJC,MAEI,QAFJA,MAEI;MADDC,SACC;;EACJ,gBAAgCC,cAAQ,CAAC,KAAD,CAAxC;;MAAOZ,QAAP;MAAiBa,WAAjB;;EACA,IAAMC,WAAW,GAAGC,iBAAW,CAAC;IAAA,OAAMF,WAAW,CAAC,IAAD,CAAjB;GAAD,CAA/B;EACA,IAAMG,SAAS,GAAGD,iBAAW,CAAC;IAAA,OAAMF,WAAW,CAAC,KAAD,CAAjB;GAAD,CAA7B;EACA,oBACEI,wCAAC,eAAD,mCACMN,SADN;IAEE,QAAQ,EAAEX,QAFZ;IAGE,OAAO,EAAEO,OAHX;IAIE,YAAY,EAAEO,WAJhB;IAKE,UAAU,EAAEE,SALd;IAME,eAAaP;MAEZH,QAAQ,IAAII,MAAM,CAACC,SAAD,CARrB,CADF;AAYD,CAvBD;;AAyBAN,eAAe,CAACa,SAAhB,GAA4B;EAC1BX,OAAO,EAAEY,6BAAS,CAACC,IADO;EAE1Bd,QAAQ,EAAEa,6BAAS,CAACE,GAFM;EAG1BX,MAAM,EAAES,6BAAS,CAACC,IAHQ;EAI1BnB,KAAK,EAAEkB,6BAAS,CAACE,GAJS;EAK1BZ,UAAU,EAAEU,6BAAS,CAACG;AALI,CAA5B;IAQMC,iBAAiB,GAAGC,kBAAS,CAACnB,eAAD;;;;"}
|
package/cjs/Modal/Modal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sources":["../../../src/Modal/Modal.tsx"],"sourcesContent":["/* 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;\n\nconst ModalWithSchema = describe(Modal);\nModalWithSchema.propTypes = modalProps;\n\nexport { Modal, ModalWithSchema };\n"],"names":["Modal","zIndex","title","description","onClose","noop","showSecondaryAction","secondaryActionProps","onClick","labelText","primaryActionProps","isOpen","theme","useTheme","React","BodyFix","BackShadow","ModalPosition","ModalBox","window","innerHeight","overflow","Grid","ModalIcon","WarningTriangle","ModalTitle","ModalDescription","borderTop","colors","neutral","DSButton","modalProps","PropTypes","bool","defaultValue","number","string","isRequired","func","shape","propTypes","ModalWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAUMA,KAAK,GAAG,SAARA,KAAQ,OAeR;
|
|
1
|
+
{"version":3,"file":"Modal.js","sources":["../../../src/Modal/Modal.tsx"],"sourcesContent":["/* 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;\n\nconst ModalWithSchema = describe(Modal);\nModalWithSchema.propTypes = modalProps;\n\nexport { Modal, ModalWithSchema };\n"],"names":["Modal","zIndex","title","description","onClose","noop","showSecondaryAction","secondaryActionProps","onClick","labelText","primaryActionProps","isOpen","theme","useTheme","React","BodyFix","BackShadow","ModalPosition","ModalBox","window","innerHeight","overflow","Grid","ModalIcon","WarningTriangle","ModalTitle","ModalDescription","borderTop","colors","neutral","DSButton","modalProps","PropTypes","bool","defaultValue","number","string","isRequired","func","shape","propTypes","ModalWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAUMA,KAAK,GAAG,SAARA,KAAQ,OAeR;EAAA,uBAdJC,MAcI;MAdJA,MAcI,4BAdK,CAcL;wBAbJC,KAaI;MAbJA,KAaI,2B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MjBG,mBAAmB,EAAE0B,mBAAS,CAACC,IAAV,CAAe9B,WAAf,CAA2B,+CAA3B,EAA4E+B,YAA5E,CAAyF,IAAzF,CANJ;EAOjB3B,oBAAoB,EAAEyB,mBAAS,CAACO,KAAV,CAAgB;IACpC/B,OAAO,EAAEwB,mBAAS,CAACM,IADiB;IAEpC7B,SAAS,EAAEuB,mBAAS,CAACI;GAFD,EAGnBjC,WAHmB,CAGP,wBAHO,CAPL;EAWjBO,kBAAkB,EAAEsB,mBAAS,CAACO,KAAV,CAAgB;IAClC/B,OAAO,EAAEwB,mBAAS,CAACM,IADe;IAElC7B,SAAS,EAAEuB,mBAAS,CAACI;GAFH,EAGjBjC,WAHiB,CAGL,sBAHK;AAXH,CAAnB;AAiBAH,KAAK,CAACwC,SAAN,GAAkBT,UAAlB;IAEMU,eAAe,GAAGC,kBAAQ,CAAC1C,KAAD;AAChCyC,eAAe,CAACD,SAAhB,GAA4BT,UAA5B;;;;;"}
|
package/cjs/Modal/styled.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sources":["../../../src/Modal/styled.tsx"],"sourcesContent":["import { Grid } from '@elliemae/ds-grid';\nimport styled from 'styled-components';\nimport { createGlobalStyle } from '@elliemae/ds-system';\n\nexport const BodyFix = createGlobalStyle`\n body{\n ${(props) => (props.isOpen ? 'overflow: hidden;' : '')};\n }\n`;\nexport const ModalBox = styled(Grid)`\n width: 100%;\n background: ${(props) => props.theme.colors.neutral['000']};\n max-height: ${(props) => props.maxHeight};\n box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.5);\n`;\nexport const ModalPosition = styled(Grid)`\n z-index: ${(props) => props.zIndex};\n background: ${(props) => props.theme.colors.neutral['000']};\n position: absolute;\n top: 12.5%;\n width: 80%;\n left: 10%;\n`;\n\nexport const BackShadow = styled(Grid)`\n z-index: ${(props) => props.zIndex};\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: rgba(0, 0, 0, 0.6);\n overflow: hidden;\n`;\n\nexport const ModalIcon = styled(Grid)`\n padding-top: 24px;\n justify-content: center;\n span.em-ds-icon svg,\n svg:not([fill]) {\n fill: ${(props) => props.theme.colors.warning[600]};\n }\n`;\n\nexport const ModalTitle = styled(Grid)`\n padding-top: 24px;\n font-size: 22px;\n font-weight: 600;\n color: ${(props) => props.theme.colors.neutral[600]};\n text-align: center;\n`;\nexport const ModalDescription = styled(Grid)`\n padding-top: ${(props) => props.theme.space.xxs};\n font-size: 16px;\n font-weight: 400;\n color: ${(props) => props.theme.colors.neutral[500]};\n text-align: center;\n`;\n"],"names":["BodyFix","createGlobalStyle","props","isOpen","ModalBox","styled","Grid","theme","colors","neutral","maxHeight","ModalPosition","zIndex","BackShadow","ModalIcon","warning","ModalTitle","ModalDescription","space","xxs"],"mappings":";;;;;;;;;;;;;;;IAIaA,OAAO,GAAGC,0BAAH,6HAEV,UAACC,KAAD;
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../src/Modal/styled.tsx"],"sourcesContent":["import { Grid } from '@elliemae/ds-grid';\nimport styled from 'styled-components';\nimport { createGlobalStyle } from '@elliemae/ds-system';\n\nexport const BodyFix = createGlobalStyle`\n body{\n ${(props) => (props.isOpen ? 'overflow: hidden;' : '')};\n }\n`;\nexport const ModalBox = styled(Grid)`\n width: 100%;\n background: ${(props) => props.theme.colors.neutral['000']};\n max-height: ${(props) => props.maxHeight};\n box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.5);\n`;\nexport const ModalPosition = styled(Grid)`\n z-index: ${(props) => props.zIndex};\n background: ${(props) => props.theme.colors.neutral['000']};\n position: absolute;\n top: 12.5%;\n width: 80%;\n left: 10%;\n`;\n\nexport const BackShadow = styled(Grid)`\n z-index: ${(props) => props.zIndex};\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: rgba(0, 0, 0, 0.6);\n overflow: hidden;\n`;\n\nexport const ModalIcon = styled(Grid)`\n padding-top: 24px;\n justify-content: center;\n span.em-ds-icon svg,\n svg:not([fill]) {\n fill: ${(props) => props.theme.colors.warning[600]};\n }\n`;\n\nexport const ModalTitle = styled(Grid)`\n padding-top: 24px;\n font-size: 22px;\n font-weight: 600;\n color: ${(props) => props.theme.colors.neutral[600]};\n text-align: center;\n`;\nexport const ModalDescription = styled(Grid)`\n padding-top: ${(props) => props.theme.space.xxs};\n font-size: 16px;\n font-weight: 400;\n color: ${(props) => props.theme.colors.neutral[500]};\n text-align: center;\n`;\n"],"names":["BodyFix","createGlobalStyle","props","isOpen","ModalBox","styled","Grid","theme","colors","neutral","maxHeight","ModalPosition","zIndex","BackShadow","ModalIcon","warning","ModalTitle","ModalDescription","space","xxs"],"mappings":";;;;;;;;;;;;;;;IAIaA,OAAO,GAAGC,0BAAH,6HAEV,UAACC,KAAD;EAAA,OAAYA,KAAK,CAACC,MAAN,GAAe,mBAAf,GAAqC,EAAjD;AAAA,CAFU;IAKPC,QAAQ,gBAAGC,0BAAM,CAACC,WAAD,CAAT;EAAA;AAAA,2FAEL,UAACJ,KAAD;EAAA,OAAWA,KAAK,CAACK,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAFK,EAGL,UAACP,KAAD;EAAA,OAAWA,KAAK,CAACQ,SAAjB;AAAA,CAHK;IAMRC,aAAa,gBAAGN,0BAAM,CAACC,WAAD,CAAT;EAAA;AAAA,qFACb,UAACJ,KAAD;EAAA,OAAWA,KAAK,CAACU,MAAjB;AAAA,CADa,EAEV,UAACV,KAAD;EAAA,OAAWA,KAAK,CAACK,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAFU;IASbI,UAAU,gBAAGR,0BAAM,CAACC,WAAD,CAAT;EAAA;AAAA,oHACV,UAACJ,KAAD;EAAA,OAAWA,KAAK,CAACU,MAAjB;AAAA,CADU;IAWVE,SAAS,gBAAGT,0BAAM,CAACC,WAAD,CAAT;EAAA;AAAA,gGAKV,UAACJ,KAAD;EAAA,OAAWA,KAAK,CAACK,KAAN,CAAYC,MAAZ,CAAmBO,OAAnB,CAA2B,GAA3B,CAAX;AAAA,CALU;IASTC,UAAU,gBAAGX,0BAAM,CAACC,WAAD,CAAT;EAAA;AAAA,sFAIZ,UAACJ,KAAD;EAAA,OAAWA,KAAK,CAACK,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,GAA3B,CAAX;AAAA,CAJY;IAOVQ,gBAAgB,gBAAGZ,0BAAM,CAACC,WAAD,CAAT;EAAA;AAAA,sFACZ,UAACJ,KAAD;EAAA,OAAWA,KAAK,CAACK,KAAN,CAAYW,KAAZ,CAAkBC,GAA7B;AAAA,CADY,EAIlB,UAACjB,KAAD;EAAA,OAAWA,KAAK,CAACK,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,GAA3B,CAAX;AAAA,CAJkB;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageFilter.js","sources":["../../../src/PageFilter/PageFilter.tsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { op, useTheme, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport { DSFullPageContainer } from '../FullPageContainer';\n\nconst Header = styled(Grid)`\n border-bottom: 1px solid ${(props) => props.theme.colors.neutral['300']};\n`;\nconst ButtonSlot = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n`;\nconst Title = styled.div`\n display: flex;\n justify-content: flex-start;\n align-items: center;\n font-size: 22px;\n`;\nconst BreadCrumb = styled(Grid)`\n align-items: flex-end;\n font-size: 16px;\n color: ${(props) => props.theme.colors.neutral[500]};\n`;\nconst Body = styled(Grid)`\n margin: 0 auto;\n width: 100%;\n overflow: auto;\n`;\nconst Footer = styled(Grid)`\n display: flex;\n justify-content: space-around;\n align-items: center;\n width: 100%;\n padding: 0.67rem;\n border-top: 1px solid ${(props) => props.theme.colors.neutral[300]};\n\n & > button {\n flex-grow: 1;\n margin: 0 0.33rem;\n }\n`;\n\nconst PageFilter = ({\n children = null,\n breadCrumb = null,\n pageTitle = null,\n leftProp = null,\n rightProp = null,\n footerButton = null,\n}) => {\n const theme = useTheme();\n const headerDimension = theme.space.l;\n const rows = [headerDimension, 1];\n if (footerButton) rows.push(op('*', __UNSAFE_SPACE_TO_DIMSUM(theme.space.xl), 1.167));\n const cols = ['auto'];\n if (leftProp) cols.unshift(headerDimension);\n if (rightProp) cols.push(headerDimension);\n const bodyStyle = {\n maxWidth: op('*', __UNSAFE_SPACE_TO_DIMSUM(theme.space.xxl), 6.25),\n };\n return (\n <DSFullPageContainer rows={rows}>\n <Header cols={cols} height={headerDimension}>\n {leftProp && <ButtonSlot ml={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}>{leftProp}</ButtonSlot>}\n <Grid>\n {breadCrumb && <BreadCrumb pl={!leftProp && '1rem'}>{breadCrumb}</BreadCrumb>}\n <Title style={leftProp ? {} : { paddingLeft: '1rem' }}>{pageTitle}</Title>\n </Grid>\n {rightProp && <ButtonSlot ml={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}>{rightProp}</ButtonSlot>}\n </Header>\n\n <Body style={bodyStyle}>{children}</Body>\n {footerButton && <Footer>{footerButton}</Footer>}\n </DSFullPageContainer>\n );\n};\n\nPageFilter.propTypes = {\n /**\n * Text to render in header title\n */\n pageTitle: PropTypes.string,\n /**\n * Pass an element to render left. For example a Button with an icon\n */\n leftProp: PropTypes.element,\n /**\n * Pass an element to render right. For example a Button with an icon\n */\n rightProp: PropTypes.element,\n /**\n * Pass an element to render in the body section\n */\n children: PropTypes.element,\n /**\n * Pass a button to render in the footer\n */\n footerButton: PropTypes.element,\n /**\n * BreadCrumb text\n */\n breadCrumb: PropTypes.string,\n};\n\nconst DSPageFilter = PageFilter;\n\nexport { DSPageFilter };\n"],"names":["Header","styled","Grid","props","theme","colors","neutral","ButtonSlot","div","Title","BreadCrumb","Body","Footer","PageFilter","children","breadCrumb","pageTitle","leftProp","rightProp","footerButton","useTheme","headerDimension","space","l","rows","push","op","__UNSAFE_SPACE_TO_DIMSUM","xl","cols","unshift","bodyStyle","maxWidth","xxl","React","DSFullPageContainer","s","paddingLeft","propTypes","PropTypes","string","element","DSPageFilter"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAMA,MAAM,gBAAGC,0BAAM,CAACC,WAAD,CAAT;
|
|
1
|
+
{"version":3,"file":"PageFilter.js","sources":["../../../src/PageFilter/PageFilter.tsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { op, useTheme, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport { DSFullPageContainer } from '../FullPageContainer';\n\nconst Header = styled(Grid)`\n border-bottom: 1px solid ${(props) => props.theme.colors.neutral['300']};\n`;\nconst ButtonSlot = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n`;\nconst Title = styled.div`\n display: flex;\n justify-content: flex-start;\n align-items: center;\n font-size: 22px;\n`;\nconst BreadCrumb = styled(Grid)`\n align-items: flex-end;\n font-size: 16px;\n color: ${(props) => props.theme.colors.neutral[500]};\n`;\nconst Body = styled(Grid)`\n margin: 0 auto;\n width: 100%;\n overflow: auto;\n`;\nconst Footer = styled(Grid)`\n display: flex;\n justify-content: space-around;\n align-items: center;\n width: 100%;\n padding: 0.67rem;\n border-top: 1px solid ${(props) => props.theme.colors.neutral[300]};\n\n & > button {\n flex-grow: 1;\n margin: 0 0.33rem;\n }\n`;\n\nconst PageFilter = ({\n children = null,\n breadCrumb = null,\n pageTitle = null,\n leftProp = null,\n rightProp = null,\n footerButton = null,\n}) => {\n const theme = useTheme();\n const headerDimension = theme.space.l;\n const rows = [headerDimension, 1];\n if (footerButton) rows.push(op('*', __UNSAFE_SPACE_TO_DIMSUM(theme.space.xl), 1.167));\n const cols = ['auto'];\n if (leftProp) cols.unshift(headerDimension);\n if (rightProp) cols.push(headerDimension);\n const bodyStyle = {\n maxWidth: op('*', __UNSAFE_SPACE_TO_DIMSUM(theme.space.xxl), 6.25),\n };\n return (\n <DSFullPageContainer rows={rows}>\n <Header cols={cols} height={headerDimension}>\n {leftProp && <ButtonSlot ml={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}>{leftProp}</ButtonSlot>}\n <Grid>\n {breadCrumb && <BreadCrumb pl={!leftProp && '1rem'}>{breadCrumb}</BreadCrumb>}\n <Title style={leftProp ? {} : { paddingLeft: '1rem' }}>{pageTitle}</Title>\n </Grid>\n {rightProp && <ButtonSlot ml={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}>{rightProp}</ButtonSlot>}\n </Header>\n\n <Body style={bodyStyle}>{children}</Body>\n {footerButton && <Footer>{footerButton}</Footer>}\n </DSFullPageContainer>\n );\n};\n\nPageFilter.propTypes = {\n /**\n * Text to render in header title\n */\n pageTitle: PropTypes.string,\n /**\n * Pass an element to render left. For example a Button with an icon\n */\n leftProp: PropTypes.element,\n /**\n * Pass an element to render right. For example a Button with an icon\n */\n rightProp: PropTypes.element,\n /**\n * Pass an element to render in the body section\n */\n children: PropTypes.element,\n /**\n * Pass a button to render in the footer\n */\n footerButton: PropTypes.element,\n /**\n * BreadCrumb text\n */\n breadCrumb: PropTypes.string,\n};\n\nconst DSPageFilter = PageFilter;\n\nexport { DSPageFilter };\n"],"names":["Header","styled","Grid","props","theme","colors","neutral","ButtonSlot","div","Title","BreadCrumb","Body","Footer","PageFilter","children","breadCrumb","pageTitle","leftProp","rightProp","footerButton","useTheme","headerDimension","space","l","rows","push","op","__UNSAFE_SPACE_TO_DIMSUM","xl","cols","unshift","bodyStyle","maxWidth","xxl","React","DSFullPageContainer","s","paddingLeft","propTypes","PropTypes","string","element","DSPageFilter"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAMA,MAAM,gBAAGC,0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;;AAMvB;AACA;EACEvB,QAAQ,EAAEsB,6BAAS,CAACE,OARC;;;AAUvB;AACA;EACEvB,SAAS,EAAEqB,6BAAS,CAACE,OAZA;;;AAcvB;AACA;EACE3B,QAAQ,EAAEyB,6BAAS,CAACE,OAhBC;;;AAkBvB;AACA;EACEtB,YAAY,EAAEoB,6BAAS,CAACE,OApBH;;;AAsBvB;AACA;EACE1B,UAAU,EAAEwB,6BAAS,CAACC;AAxBD,CAAvB;IA2BME,YAAY,GAAG7B;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageForm.js","sources":["../../../src/PageForm/PageForm.tsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Grid } from '@elliemae/ds-grid';\nimport styled from 'styled-components';\nimport { op, __UNSAFE_SPACE_TO_DIMSUM, useTheme } from '@elliemae/ds-system';\nimport { DSFullPageContainer, DSFullPageContainerScroll } from '../FullPageContainer';\n\nconst Body = styled(Grid)`\n margin: 0 auto;\n width: 100%;\n @media (min-width: ${({ theme }) => theme.breakpoints.small}) {\n ${({ theme }) => `width: ${op('*', __UNSAFE_SPACE_TO_DIMSUM(theme.space.xxl), 6.25)};`}\n }\n`;\n\nconst PageForm = ({ header = null, body = null, footer = null }) => {\n const theme = useTheme();\n const rows = [1];\n if (header) rows.unshift(op('*', __UNSAFE_SPACE_TO_DIMSUM(theme.space.xxl), 1.125));\n if (footer) rows.push(theme.space.l);\n return (\n <DSFullPageContainer rows={rows}>\n {header && <Grid>{header}</Grid>}\n <Grid style={{ overflow: 'hidden' }}>\n <DSFullPageContainerScroll>\n <Body>{body}</Body>\n </DSFullPageContainerScroll>\n </Grid>\n {footer && <Grid>{footer}</Grid>}\n </DSFullPageContainer>\n );\n};\n\nPageForm.propTypes = {\n header: PropTypes.element,\n body: PropTypes.element,\n footer: PropTypes.element,\n};\n\nconst DSPageForm = PageForm;\nconst DSMobilePageForm = DSPageForm;\n\nexport { DSPageForm, DSMobilePageForm };\n"],"names":["Body","styled","Grid","theme","breakpoints","small","op","__UNSAFE_SPACE_TO_DIMSUM","space","xxl","PageForm","header","body","footer","useTheme","rows","unshift","push","l","React","DSFullPageContainer","overflow","DSFullPageContainerScroll","propTypes","PropTypes","element","DSPageForm","DSMobilePageForm"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAMA,IAAI,gBAAGC,0BAAM,CAACC,WAAD,CAAT;
|
|
1
|
+
{"version":3,"file":"PageForm.js","sources":["../../../src/PageForm/PageForm.tsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Grid } from '@elliemae/ds-grid';\nimport styled from 'styled-components';\nimport { op, __UNSAFE_SPACE_TO_DIMSUM, useTheme } from '@elliemae/ds-system';\nimport { DSFullPageContainer, DSFullPageContainerScroll } from '../FullPageContainer';\n\nconst Body = styled(Grid)`\n margin: 0 auto;\n width: 100%;\n @media (min-width: ${({ theme }) => theme.breakpoints.small}) {\n ${({ theme }) => `width: ${op('*', __UNSAFE_SPACE_TO_DIMSUM(theme.space.xxl), 6.25)};`}\n }\n`;\n\nconst PageForm = ({ header = null, body = null, footer = null }) => {\n const theme = useTheme();\n const rows = [1];\n if (header) rows.unshift(op('*', __UNSAFE_SPACE_TO_DIMSUM(theme.space.xxl), 1.125));\n if (footer) rows.push(theme.space.l);\n return (\n <DSFullPageContainer rows={rows}>\n {header && <Grid>{header}</Grid>}\n <Grid style={{ overflow: 'hidden' }}>\n <DSFullPageContainerScroll>\n <Body>{body}</Body>\n </DSFullPageContainerScroll>\n </Grid>\n {footer && <Grid>{footer}</Grid>}\n </DSFullPageContainer>\n );\n};\n\nPageForm.propTypes = {\n header: PropTypes.element,\n body: PropTypes.element,\n footer: PropTypes.element,\n};\n\nconst DSPageForm = PageForm;\nconst DSMobilePageForm = DSPageForm;\n\nexport { DSPageForm, DSMobilePageForm };\n"],"names":["Body","styled","Grid","theme","breakpoints","small","op","__UNSAFE_SPACE_TO_DIMSUM","space","xxl","PageForm","header","body","footer","useTheme","rows","unshift","push","l","React","DSFullPageContainer","overflow","DSFullPageContainerScroll","propTypes","PropTypes","element","DSPageForm","DSMobilePageForm"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAMA,IAAI,gBAAGC,0BAAM,CAACC,WAAD,CAAT;EAAA;AAAA,+DAGa;EAAA,IAAGC,KAAH,QAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,WAAN,CAAkBC,KAAjC;AAAA,CAHb,EAIJ;EAAA,IAAGF,KAAH,SAAGA,KAAH;EAAA,wBAAyBG,WAAE,CAAC,GAAD,EAAMC,iCAAwB,CAACJ,KAAK,CAACK,KAAN,CAAYC,GAAb,CAA9B,EAAiD,IAAjD,CAA3B;AAAA,CAJI,CAAV;;AAQA,IAAMC,QAAQ,GAAG,SAAXA,QAAW,QAAmD;EAAA,yBAAhDC,MAAgD;MAAhDA,MAAgD,6BAAvC,IAAuC;yBAAjCC,IAAiC;MAAjCA,IAAiC,2BAA1B,IAA0B;2BAApBC,MAAoB;MAApBA,MAAoB,6BAAX,IAAW;EAClE,IAAMV,KAAK,GAAGW,iBAAQ,EAAtB;EACA,IAAMC,IAAI,GAAG,CAAC,CAAD,CAAb;EACA,IAAIJ,MAAJ,EAAYI,IAAI,CAACC,OAAL,CAAaV,WAAE,CAAC,GAAD,EAAMC,iCAAwB,CAACJ,KAAK,CAACK,KAAN,CAAYC,GAAb,CAA9B,EAAiD,KAAjD,CAAf;EACZ,IAAII,MAAJ,EAAYE,IAAI,CAACE,IAAL,CAAUd,KAAK,CAACK,KAAN,CAAYU,CAAtB;EACZ,oBACEC,wCAACC,uDAAD;IAAqB,IAAI,EAAEL;KACxBJ,MAAM,iBAAIQ,wCAACjB,WAAD,QAAOS,MAAP,CADb,eAEEQ,wCAACjB,WAAD;IAAM,KAAK,EAAE;MAAEmB,QAAQ,EAAE;;kBACvBF,wCAACG,mEAAD,qBACEH,wCAAC,IAAD,QAAOP,IAAP,CADF,CADF,CAFF,EAO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