@elliemae/ds-mobile 3.35.0 → 3.36.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/CategoryBox/CategoryBox.js +1 -3
- package/dist/cjs/CategoryBox/CategoryBox.js.map +2 -2
- package/dist/cjs/CollectionBox/CollectionBox.js +5 -11
- package/dist/cjs/CollectionBox/CollectionBox.js.map +2 -2
- package/dist/cjs/GlobalHeader/MobileGlobalHeader.js +2 -3
- package/dist/cjs/GlobalHeader/MobileGlobalHeader.js.map +2 -2
- package/dist/cjs/GlobalHeader/styles.js.map +1 -1
- package/dist/cjs/GroupBox/GroupBox.js +1 -3
- package/dist/cjs/GroupBox/GroupBox.js.map +2 -2
- package/dist/cjs/Icons/EM_logo.js +1 -0
- package/dist/cjs/Icons/EM_logo.js.map +2 -2
- package/dist/cjs/InfiniteLoader/Infiniteloader.js +4 -7
- package/dist/cjs/InfiniteLoader/Infiniteloader.js.map +1 -1
- package/dist/cjs/InfiniteLoader/VirtualizedInfiniteLoader.js +1 -3
- package/dist/cjs/InfiniteLoader/VirtualizedInfiniteLoader.js.map +2 -2
- package/dist/cjs/LoadingPage/Page.js.map +1 -1
- package/dist/cjs/LoadingPage/index.js +1 -4
- package/dist/cjs/LoadingPage/index.js.map +2 -2
- package/dist/cjs/MobileActionToolbar/MobileActionToolbar.js +2 -5
- package/dist/cjs/MobileActionToolbar/MobileActionToolbar.js.map +3 -3
- package/dist/cjs/MobileActionToolbar/MobileActionToolbarItem.js +1 -3
- package/dist/cjs/MobileActionToolbar/MobileActionToolbarItem.js.map +2 -2
- package/dist/cjs/MobileActionToolbar/index.js +5 -3
- package/dist/cjs/MobileActionToolbar/index.js.map +2 -2
- package/dist/cjs/MobileBanner/MobileBanner.js +3 -7
- package/dist/cjs/MobileBanner/MobileBanner.js.map +2 -2
- package/dist/cjs/MobileBanner/styles.js.map +1 -1
- package/dist/cjs/MobileBanner/utils/styleHelpers.js.map +1 -1
- package/dist/cjs/MobileCard/ActionAddon.js.map +1 -1
- package/dist/cjs/MobileCard/Card.js +0 -1
- package/dist/cjs/MobileCard/Card.js.map +2 -2
- package/dist/cjs/MobileCard/CardIcons.js.map +1 -1
- package/dist/cjs/MobileCard/ExpandChevron.js.map +1 -1
- package/dist/cjs/MobileCard/ExpandableRegion.js +2 -4
- package/dist/cjs/MobileCard/ExpandableRegion.js.map +1 -1
- package/dist/cjs/MobileCard/Group.js +0 -1
- package/dist/cjs/MobileCard/Group.js.map +2 -2
- package/dist/cjs/MobileCard/StyledCard.js.map +1 -1
- package/dist/cjs/MobileCard/index.js +2 -6
- package/dist/cjs/MobileCard/index.js.map +2 -2
- package/dist/cjs/MobileCard/useHeight.js +2 -4
- package/dist/cjs/MobileCard/useHeight.js.map +1 -1
- package/dist/cjs/MobileContextMenu/MobileContextMenu.js +7 -15
- package/dist/cjs/MobileContextMenu/MobileContextMenu.js.map +2 -2
- package/dist/cjs/MobileContextMenu/MobileContextMenuGroup.js +2 -5
- package/dist/cjs/MobileContextMenu/MobileContextMenuGroup.js.map +2 -2
- package/dist/cjs/MobileContextMenu/MobileContextMenuItem.js +6 -13
- package/dist/cjs/MobileContextMenu/MobileContextMenuItem.js.map +2 -2
- package/dist/cjs/MobileContextMenu/index.js +15 -4
- package/dist/cjs/MobileContextMenu/index.js.map +2 -2
- package/dist/cjs/MobileDatePicker/Input.js.map +1 -1
- package/dist/cjs/MobileDatePicker/MobileDatePicker.js +0 -1
- package/dist/cjs/MobileDatePicker/MobileDatePicker.js.map +2 -2
- package/dist/cjs/MobileDatePicker/index.js +9 -2
- package/dist/cjs/MobileDatePicker/index.js.map +2 -2
- package/dist/cjs/MobileDropdownMenu/MobileDropdownInput.js.map +1 -1
- package/dist/cjs/MobileDropdownMenu/MobileDropdownMenu.js +0 -1
- package/dist/cjs/MobileDropdownMenu/MobileDropdownMenu.js.map +2 -2
- package/dist/cjs/MobileDropdownMenu/index.js +3 -2
- package/dist/cjs/MobileDropdownMenu/index.js.map +2 -2
- package/dist/cjs/MobileEmtpyState/MobileEmptyState.js +0 -1
- package/dist/cjs/MobileEmtpyState/MobileEmptyState.js.map +2 -2
- package/dist/cjs/MobileEmtpyState/index.js +2 -4
- package/dist/cjs/MobileEmtpyState/index.js.map +2 -2
- package/dist/cjs/MobileFilterbar/Filterbar.js +2 -3
- package/dist/cjs/MobileFilterbar/Filterbar.js.map +2 -2
- package/dist/cjs/MobileFilterbar/FilterbarItem.js +0 -1
- package/dist/cjs/MobileFilterbar/FilterbarItem.js.map +2 -2
- package/dist/cjs/MobileFilterbar/FilterbarSort.js +2 -3
- package/dist/cjs/MobileFilterbar/FilterbarSort.js.map +2 -2
- package/dist/cjs/MobileFooter/Action.js +0 -1
- package/dist/cjs/MobileFooter/Action.js.map +2 -2
- package/dist/cjs/MobileFooter/Footer.js +0 -1
- package/dist/cjs/MobileFooter/Footer.js.map +2 -2
- package/dist/cjs/MobileFooter/Text.js +0 -1
- package/dist/cjs/MobileFooter/Text.js.map +2 -2
- package/dist/cjs/MobileListItem/MobileListItem.js +2 -5
- package/dist/cjs/MobileListItem/MobileListItem.js.map +2 -2
- package/dist/cjs/MobileListItem/index.js +13 -4
- package/dist/cjs/MobileListItem/index.js.map +2 -2
- package/dist/cjs/MobileListItem/style.js.map +1 -1
- package/dist/cjs/MobilePageHeader/MobilePageHeader.js +8 -15
- package/dist/cjs/MobilePageHeader/MobilePageHeader.js.map +2 -2
- package/dist/cjs/MobilePageHeader/index.js +9 -2
- package/dist/cjs/MobilePageHeader/index.js.map +2 -2
- package/dist/cjs/MobileSelectList/MobileSelectList.js +8 -16
- package/dist/cjs/MobileSelectList/MobileSelectList.js.map +1 -1
- package/dist/cjs/MobileSelectList/index.js +8 -2
- package/dist/cjs/MobileSelectList/index.js.map +2 -2
- package/dist/cjs/MobileSelectList/styled.js.map +1 -1
- package/dist/cjs/MobileSeparator/Separator.js +0 -1
- package/dist/cjs/MobileSeparator/Separator.js.map +2 -2
- package/dist/cjs/MobileSeparator/index.js +2 -3
- package/dist/cjs/MobileSeparator/index.js.map +2 -2
- package/dist/cjs/MobileTimePicker/Input.js.map +1 -1
- package/dist/cjs/MobileTimePicker/MobileTimePicker.js +1 -3
- package/dist/cjs/MobileTimePicker/MobileTimePicker.js.map +2 -2
- package/dist/cjs/MobileTimePicker/index.js +9 -2
- package/dist/cjs/MobileTimePicker/index.js.map +2 -2
- package/dist/cjs/MobileTouchable/MobileTouchable.js.map +1 -1
- package/dist/cjs/MobileTouchable/index.js +8 -2
- package/dist/cjs/MobileTouchable/index.js.map +2 -2
- package/dist/cjs/Modal/Modal.js +1 -3
- package/dist/cjs/Modal/Modal.js.map +2 -2
- package/dist/cjs/Modal/styled.js.map +1 -1
- package/dist/cjs/PageFilter/PageFilter.js +3 -6
- package/dist/cjs/PageFilter/PageFilter.js.map +1 -1
- package/dist/cjs/PageForm/PageForm.js +2 -4
- package/dist/cjs/PageForm/PageForm.js.map +1 -1
- package/dist/cjs/PageList/PageList.js +4 -8
- package/dist/cjs/PageList/PageList.js.map +1 -1
- package/dist/cjs/PageSearch/PageSearch.js.map +1 -1
- package/dist/cjs/PageSummary/PageSummary.js.map +1 -1
- package/dist/cjs/PageSummary/Tags.js.map +1 -1
- package/dist/cjs/SideNav/SideNav.js +2 -3
- package/dist/cjs/SideNav/SideNav.js.map +2 -2
- package/dist/cjs/SideNav/styles.js.map +1 -1
- package/dist/cjs/SwipeToRefresh/ProgressIndicator.js.map +1 -1
- package/dist/cjs/SwipeToRefresh/SwipeToRefresh.js +0 -1
- package/dist/cjs/SwipeToRefresh/SwipeToRefresh.js.map +2 -2
- package/dist/cjs/SwipeToRefresh/useSwipe.js +3 -6
- package/dist/cjs/SwipeToRefresh/useSwipe.js.map +1 -1
- package/dist/cjs/Tabs/index.js +0 -2
- package/dist/cjs/Tabs/index.js.map +2 -2
- package/dist/cjs/index.js +83 -29
- package/dist/cjs/index.js.map +2 -2
- package/dist/esm/CategoryBox/CategoryBox.js +1 -3
- package/dist/esm/CategoryBox/CategoryBox.js.map +2 -2
- package/dist/esm/CollectionBox/CollectionBox.js +5 -11
- package/dist/esm/CollectionBox/CollectionBox.js.map +2 -2
- package/dist/esm/GlobalHeader/MobileGlobalHeader.js +1 -2
- package/dist/esm/GlobalHeader/MobileGlobalHeader.js.map +2 -2
- package/dist/esm/GlobalHeader/styles.js.map +1 -1
- package/dist/esm/GroupBox/GroupBox.js +1 -3
- package/dist/esm/GroupBox/GroupBox.js.map +2 -2
- package/dist/esm/Icons/EM_logo.js +1 -0
- package/dist/esm/Icons/EM_logo.js.map +2 -2
- package/dist/esm/InfiniteLoader/Infiniteloader.js +4 -7
- package/dist/esm/InfiniteLoader/Infiniteloader.js.map +1 -1
- package/dist/esm/InfiniteLoader/VirtualizedInfiniteLoader.js +1 -3
- package/dist/esm/InfiniteLoader/VirtualizedInfiniteLoader.js.map +2 -2
- package/dist/esm/LoadingPage/Page.js.map +1 -1
- package/dist/esm/LoadingPage/index.js +1 -3
- package/dist/esm/LoadingPage/index.js.map +2 -2
- package/dist/esm/MobileActionToolbar/MobileActionToolbar.js +2 -5
- package/dist/esm/MobileActionToolbar/MobileActionToolbar.js.map +2 -2
- package/dist/esm/MobileActionToolbar/MobileActionToolbarItem.js +1 -3
- package/dist/esm/MobileActionToolbar/MobileActionToolbarItem.js.map +2 -2
- package/dist/esm/MobileActionToolbar/index.js +5 -2
- package/dist/esm/MobileActionToolbar/index.js.map +2 -2
- package/dist/esm/MobileBanner/MobileBanner.js +3 -7
- package/dist/esm/MobileBanner/MobileBanner.js.map +2 -2
- package/dist/esm/MobileBanner/styles.js.map +1 -1
- package/dist/esm/MobileBanner/utils/styleHelpers.js.map +1 -1
- package/dist/esm/MobileCard/ActionAddon.js.map +1 -1
- package/dist/esm/MobileCard/Card.js +0 -1
- package/dist/esm/MobileCard/Card.js.map +2 -2
- package/dist/esm/MobileCard/CardIcons.js.map +1 -1
- package/dist/esm/MobileCard/ExpandChevron.js.map +1 -1
- package/dist/esm/MobileCard/ExpandableRegion.js +2 -4
- package/dist/esm/MobileCard/ExpandableRegion.js.map +1 -1
- package/dist/esm/MobileCard/Group.js +0 -1
- package/dist/esm/MobileCard/Group.js.map +2 -2
- package/dist/esm/MobileCard/StyledCard.js.map +1 -1
- package/dist/esm/MobileCard/index.js +2 -5
- package/dist/esm/MobileCard/index.js.map +2 -2
- package/dist/esm/MobileCard/useHeight.js +2 -4
- package/dist/esm/MobileCard/useHeight.js.map +1 -1
- package/dist/esm/MobileContextMenu/MobileContextMenu.js +7 -15
- package/dist/esm/MobileContextMenu/MobileContextMenu.js.map +2 -2
- package/dist/esm/MobileContextMenu/MobileContextMenuGroup.js +2 -5
- package/dist/esm/MobileContextMenu/MobileContextMenuGroup.js.map +2 -2
- package/dist/esm/MobileContextMenu/MobileContextMenuItem.js +6 -13
- package/dist/esm/MobileContextMenu/MobileContextMenuItem.js.map +2 -2
- package/dist/esm/MobileContextMenu/index.js +11 -3
- package/dist/esm/MobileContextMenu/index.js.map +2 -2
- package/dist/esm/MobileDatePicker/Input.js.map +1 -1
- package/dist/esm/MobileDatePicker/MobileDatePicker.js +0 -1
- package/dist/esm/MobileDatePicker/MobileDatePicker.js.map +2 -2
- package/dist/esm/MobileDatePicker/index.js +5 -1
- package/dist/esm/MobileDatePicker/index.js.map +2 -2
- package/dist/esm/MobileDropdownMenu/MobileDropdownInput.js.map +1 -1
- package/dist/esm/MobileDropdownMenu/MobileDropdownMenu.js +0 -1
- package/dist/esm/MobileDropdownMenu/MobileDropdownMenu.js.map +2 -2
- package/dist/esm/MobileDropdownMenu/index.js +3 -1
- package/dist/esm/MobileDropdownMenu/index.js.map +2 -2
- package/dist/esm/MobileEmtpyState/MobileEmptyState.js +0 -1
- package/dist/esm/MobileEmtpyState/MobileEmptyState.js.map +2 -2
- package/dist/esm/MobileEmtpyState/index.js +3 -4
- package/dist/esm/MobileEmtpyState/index.js.map +2 -2
- package/dist/esm/MobileFilterbar/Filterbar.js +1 -2
- package/dist/esm/MobileFilterbar/Filterbar.js.map +2 -2
- package/dist/esm/MobileFilterbar/FilterbarItem.js +0 -1
- package/dist/esm/MobileFilterbar/FilterbarItem.js.map +2 -2
- package/dist/esm/MobileFilterbar/FilterbarSort.js +1 -2
- package/dist/esm/MobileFilterbar/FilterbarSort.js.map +2 -2
- package/dist/esm/MobileFooter/Action.js +0 -1
- package/dist/esm/MobileFooter/Action.js.map +2 -2
- package/dist/esm/MobileFooter/Footer.js +0 -1
- package/dist/esm/MobileFooter/Footer.js.map +2 -2
- package/dist/esm/MobileFooter/Text.js +0 -1
- package/dist/esm/MobileFooter/Text.js.map +2 -2
- package/dist/esm/MobileListItem/MobileListItem.js +2 -5
- package/dist/esm/MobileListItem/MobileListItem.js.map +2 -2
- package/dist/esm/MobileListItem/index.js +9 -3
- package/dist/esm/MobileListItem/index.js.map +2 -2
- package/dist/esm/MobileListItem/style.js.map +1 -1
- package/dist/esm/MobilePageHeader/MobilePageHeader.js +7 -14
- package/dist/esm/MobilePageHeader/MobilePageHeader.js.map +2 -2
- package/dist/esm/MobilePageHeader/index.js +5 -1
- package/dist/esm/MobilePageHeader/index.js.map +2 -2
- package/dist/esm/MobileSelectList/MobileSelectList.js +8 -16
- package/dist/esm/MobileSelectList/MobileSelectList.js.map +1 -1
- package/dist/esm/MobileSelectList/index.js +4 -1
- package/dist/esm/MobileSelectList/index.js.map +2 -2
- package/dist/esm/MobileSelectList/styled.js.map +1 -1
- package/dist/esm/MobileSeparator/Separator.js +0 -1
- package/dist/esm/MobileSeparator/Separator.js.map +2 -2
- package/dist/esm/MobileSeparator/index.js +2 -3
- package/dist/esm/MobileSeparator/index.js.map +2 -2
- package/dist/esm/MobileTimePicker/Input.js.map +1 -1
- package/dist/esm/MobileTimePicker/MobileTimePicker.js +1 -3
- package/dist/esm/MobileTimePicker/MobileTimePicker.js.map +2 -2
- package/dist/esm/MobileTimePicker/index.js +5 -1
- package/dist/esm/MobileTimePicker/index.js.map +2 -2
- package/dist/esm/MobileTouchable/MobileTouchable.js.map +1 -1
- package/dist/esm/MobileTouchable/index.js +4 -1
- package/dist/esm/MobileTouchable/index.js.map +2 -2
- package/dist/esm/Modal/Modal.js +1 -3
- package/dist/esm/Modal/Modal.js.map +2 -2
- package/dist/esm/Modal/styled.js.map +1 -1
- package/dist/esm/PageFilter/PageFilter.js +3 -6
- package/dist/esm/PageFilter/PageFilter.js.map +1 -1
- package/dist/esm/PageForm/PageForm.js +2 -4
- package/dist/esm/PageForm/PageForm.js.map +1 -1
- package/dist/esm/PageList/PageList.js +4 -8
- package/dist/esm/PageList/PageList.js.map +1 -1
- package/dist/esm/PageSearch/PageSearch.js.map +1 -1
- package/dist/esm/PageSummary/PageSummary.js.map +1 -1
- package/dist/esm/PageSummary/Tags.js.map +1 -1
- package/dist/esm/SideNav/SideNav.js +1 -2
- package/dist/esm/SideNav/SideNav.js.map +2 -2
- package/dist/esm/SideNav/styles.js.map +1 -1
- package/dist/esm/SwipeToRefresh/ProgressIndicator.js.map +1 -1
- package/dist/esm/SwipeToRefresh/SwipeToRefresh.js +0 -1
- package/dist/esm/SwipeToRefresh/SwipeToRefresh.js.map +2 -2
- package/dist/esm/SwipeToRefresh/useSwipe.js +3 -6
- package/dist/esm/SwipeToRefresh/useSwipe.js.map +1 -1
- package/dist/esm/Tabs/index.js +0 -2
- package/dist/esm/Tabs/index.js.map +2 -2
- package/dist/esm/index.js +118 -28
- package/dist/esm/index.js.map +3 -3
- package/dist/types/CategoryBox/CategoryBox.d.ts +0 -22
- package/dist/types/CollectionBox/CollectionBox.d.ts +0 -22
- package/dist/types/GlobalHeader/MobileGlobalHeader.d.ts +0 -24
- package/dist/types/GroupBox/GroupBox.d.ts +0 -26
- package/dist/types/Icons/EM_logo.d.ts +1 -0
- package/dist/types/InfiniteLoader/VirtualizedInfiniteLoader.d.ts +0 -16
- package/dist/types/LoadingPage/Page.d.ts +13 -0
- package/dist/types/LoadingPage/index.d.ts +1 -2
- package/dist/types/MobileActionToolbar/MobileActionToolbar.d.ts +15 -0
- package/dist/types/MobileActionToolbar/MobileActionToolbarItem.d.ts +1 -6
- package/dist/types/MobileActionToolbar/index.d.ts +1 -1
- package/dist/types/MobileBanner/MobileBanner.d.ts +0 -463
- package/dist/types/MobileCard/Card.d.ts +21 -0
- package/dist/types/MobileCard/Group.d.ts +22 -0
- package/dist/types/MobileCard/index.d.ts +21 -0
- package/dist/types/MobileContextMenu/MobileContextMenu.d.ts +16 -0
- package/dist/types/MobileContextMenu/MobileContextMenuGroup.d.ts +0 -18
- package/dist/types/MobileContextMenu/MobileContextMenuItem.d.ts +0 -20
- package/dist/types/MobileContextMenu/index.d.ts +3 -3
- package/dist/types/MobileDatePicker/MobileDatePicker.d.ts +0 -22
- package/dist/types/MobileDatePicker/index.d.ts +1 -1
- package/dist/types/MobileDropdownMenu/MobileDropdownInput.d.ts +1 -1
- package/dist/types/MobileDropdownMenu/MobileDropdownMenu.d.ts +0 -8
- package/dist/types/MobileDropdownMenu/index.d.ts +1 -1
- package/dist/types/MobileEmtpyState/index.d.ts +1 -3
- package/dist/types/MobileFilterbar/Filterbar.d.ts +0 -3
- package/dist/types/MobileFilterbar/FilterbarItem.d.ts +0 -4
- package/dist/types/MobileFilterbar/FilterbarSort.d.ts +0 -3
- package/dist/types/MobileFooter/Action.d.ts +0 -8
- package/dist/types/MobileFooter/Footer.d.ts +0 -6
- package/dist/types/MobileFooter/Text.d.ts +0 -3
- package/dist/types/MobileListItem/MobileListItem.d.ts +19 -0
- package/dist/types/MobileListItem/index.d.ts +3 -3
- package/dist/types/MobilePageHeader/MobilePageHeader.d.ts +29 -0
- package/dist/types/MobilePageHeader/index.d.ts +1 -1
- package/dist/types/MobileSelectList/MobileSelectList.d.ts +19 -0
- package/dist/types/MobileSelectList/index.d.ts +1 -1
- package/dist/types/MobileSelectList/styled.d.ts +5 -3
- package/dist/types/MobileSeparator/Separator.d.ts +0 -6
- package/dist/types/MobileSeparator/index.d.ts +1 -2
- package/dist/types/MobileTimePicker/MobileTimePicker.d.ts +0 -22
- package/dist/types/MobileTimePicker/index.d.ts +1 -1
- package/dist/types/MobileTouchable/MobileTouchable.d.ts +8 -0
- package/dist/types/MobileTouchable/index.d.ts +1 -1
- package/dist/types/Modal/Modal.d.ts +0 -10
- package/dist/types/PageList/PageList.d.ts +16 -0
- package/dist/types/PageSearch/PageSearch.d.ts +16 -0
- package/dist/types/SideNav/SideNav.d.ts +0 -20
- package/dist/types/SwipeToRefresh/SwipeToRefresh.d.ts +0 -8
- package/dist/types/Tabs/index.d.ts +3 -6
- package/dist/types/index.d.ts +23 -27
- package/package.json +19 -415
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileFilterbar/FilterbarSort.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport MobileSeparator from '../MobileSeparator/index.js';\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.
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACarB,mBAIM,KAJN;AAZF,SAAS,UAAU,iBAAiB;AACpC,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSMobileSeparator as MobileSeparator} from '../MobileSeparator/index.js';\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.displayName = 'DSMobileFilterbarSort';\nconst FilterbarSortWithSchema = describe(DSMobileFilterbarSort);\nFilterbarSortWithSchema.propTypes = filterbarSortProps;\n\nexport { DSMobileFilterbarSort, FilterbarSortWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACarB,mBAIM,KAJN;AAZF,SAAS,UAAU,iBAAiB;AACpC,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,qBAAqB,uBAAsB;AAEpD,MAAM,YAAY,OAAO;AAAA;AAAA;AAAA;AAAA;AAMzB,MAAM,wBAAwB,CAAC,EAAE,SAAS,MACxC,iCACG;AAAA;AAAA,EACD,oBAAC,QAAK,IAAG,OAAM,IAAG,OAAM,MAAM,CAAC,aAAa,GAC1C,8BAAC,aACC,8BAAC,mBAAgB,QAAO,OAAM,WAAU,YAAW,OAAO,CAAC,WAAW,KAAK,GAAG,GAChF,GACF;AAAA,GACF;AAGF,MAAM,qBAAqB;AAAA,EACzB,UAAU,UAAU,QAAQ,YAAY,qBAAqB,EAAE;AACjE;AAEA,sBAAsB,cAAc;AACpC,MAAM,0BAA0B,SAAS,qBAAqB;AAC9D,wBAAwB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -35,7 +35,6 @@ const actionProps = {
|
|
|
35
35
|
/** onClick callback */
|
|
36
36
|
onClick: PropTypes.func.description("onClick callback")
|
|
37
37
|
};
|
|
38
|
-
DSMobileFooterAction.propTypes = actionProps;
|
|
39
38
|
DSMobileFooterAction.displayName = "DSMobileFooterAction";
|
|
40
39
|
const DSMobileFooterActionWithSchema = describe(DSMobileFooterAction).description("Mobile footer action");
|
|
41
40
|
DSMobileFooterActionWithSchema.propTypes = actionProps;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileFooter/Action.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable jest/valid-describe */\n/* eslint-disable jest/valid-title */\nimport React from 'react';\nimport { styled, typography, color, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\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.
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACerB,SAOE,KAPF;AAbF,OAAOA,YAAW;AAClB,SAAS,QAAQ,YAAY,OAAO,gCAAgC;AACpE,SAAS,YAAY;AACrB,SAAS,UAAU,iBAAiB;AAEpC,MAAM,QAAQ,OAAO;AAAA,IACjB;AAAA,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable jest/valid-describe */\n/* eslint-disable jest/valid-title */\nimport React from 'react';\nimport { styled, typography, color, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\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.displayName = 'DSMobileFooterAction';\nconst DSMobileFooterActionWithSchema = describe(DSMobileFooterAction).description('Mobile footer action');\nDSMobileFooterActionWithSchema.propTypes = actionProps;\n\nexport { DSMobileFooterAction, DSMobileFooter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or DSMobileFooterAction"
|
|
43
43
|
)
|
|
44
44
|
};
|
|
45
|
-
MobileFooter.propTypes = footerProps;
|
|
46
45
|
MobileFooter.displayName = "MobileFooter";
|
|
47
46
|
const MobileFooterWithSchema = describe(MobileFooter);
|
|
48
47
|
MobileFooterWithSchema.propTypes = footerProps;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileFooter/Footer.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable jest/valid-describe */\n/* eslint-disable jest/valid-title */\nimport React from 'react';\nimport { styled, 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 '@elliemae/ds-props-helpers';\nimport { DSMobileFooterText } from './Text.js';\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.
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACkCb;AAhCV,OAAOA,YAAW;AAClB,SAAS,QAAQ,QAAQ,gCAAgC;AACzD,SAAS,YAAY;AACrB,SAAS,gBAAgB;AACzB,SAAS,UAAU,iBAAiB;AACpC,SAAS,0BAA0B;AAEnC,MAAM,aAAa,OAAO,IAAI;AAAA,sBACR,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable jest/valid-describe */\n/* eslint-disable jest/valid-title */\nimport React from 'react';\nimport { styled, 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 '@elliemae/ds-props-helpers';\nimport { DSMobileFooterText } from './Text.js';\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.displayName = 'MobileFooter';\nconst MobileFooterWithSchema = describe(MobileFooter);\nMobileFooterWithSchema.propTypes = footerProps;\n\nexport default MobileFooter;\n\nexport { MobileFooterWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACkCb;AAhCV,OAAOA,YAAW;AAClB,SAAS,QAAQ,QAAQ,gCAAgC;AACzD,SAAS,YAAY;AACrB,SAAS,gBAAgB;AACzB,SAAS,UAAU,iBAAiB;AACpC,SAAS,0BAA0B;AAEnC,MAAM,aAAa,OAAO,IAAI;AAAA,sBACR,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,gBAClD,CAAC,UAAU,OAAO,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC,CAAC;AAAA,YACtD,CAAC,UAAU,QAAQ,yBAAyB,MAAM,MAAM,MAAM,EAAE,CAAC,OAAO;AAAA;AAGpF,MAAM,eAAe,CAAC,EAAE,SAAS,MAAM;AACrC,QAAM,WAAWA,OAAM,SAAS,QAAQ,QAAQ;AAChD,QAAM,eAAe,SAAS,CAAC,EAAE,SAAS,sBAAsB,SAAS,CAAC,EAAE,SAAS;AACrF,QAAM,UAAU,MAAM;AACpB,QAAI,cAAc;AAChB,aAAO,SAAS,WAAW,IAAI,CAAC,KAAK,IAAI,CAAC,OAAO,KAAK;AAAA,IACxD;AACA,WAAO,SAAS,IAAI,MAAM,GAAG,MAAM,SAAS,MAAM,GAAG;AAAA,EACvD;AACA,SACE,oBAAC,cACC;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,QAAQ;AAAA,MACd,QAAQ,eAAe,OAAO;AAAA,MAC9B,gBAAe;AAAA,MACf,YAAY,eAAe,WAAW;AAAA,MAErC,mBAAS,IAAI,CAAC,GAAG;AAAA;AAAA,QAEhB,oBAAC,QAAc,eAAJ,CAAM;AAAA,OAClB;AAAA;AAAA,EACH,GACF;AAEJ;AAEA,MAAM,cAAc;AAAA;AAAA;AAAA;AAAA,EAIlB,UAAU,UAAU,UAAU,CAAC,UAAU,SAAS,UAAU,QAAQ,UAAU,OAAO,CAAC,CAAC,EAAE,WAAW;AAAA,IAClG;AAAA,EACF;AACF;AAEA,aAAa,cAAc;AAC3B,MAAM,yBAAyB,SAAS,YAAY;AACpD,uBAAuB,YAAY;AAEnC,IAAO,iBAAQ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -12,7 +12,6 @@ const DSMobileFooterText = ({ children }) => /* @__PURE__ */ jsx(Text, { childre
|
|
|
12
12
|
const props = {
|
|
13
13
|
children: PropTypes.string.isRequired.description("Children")
|
|
14
14
|
};
|
|
15
|
-
DSMobileFooterText.propTypes = props;
|
|
16
15
|
DSMobileFooterText.displayName = "DSMobileFooterText";
|
|
17
16
|
const DSMobileFooterTextWithSchema = describe(DSMobileFooterText);
|
|
18
17
|
DSMobileFooterTextWithSchema.propTypes = props;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileFooter/Text.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable jest/valid-describe */\n/* eslint-disable jest/valid-title */\nimport React from 'react';\nimport { styled, textStyle, truncate, color } from '@elliemae/ds-system';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\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.
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACasB;AAV7C,SAAS,QAAQ,WAAW,UAAU,aAAa;AACnD,SAAS,UAAU,iBAAiB;AAEpC,MAAM,OAAO,OAAO;AAAA;AAAA,IAEhB,SAAS;AAAA,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable jest/valid-describe */\n/* eslint-disable jest/valid-title */\nimport React from 'react';\nimport { styled, textStyle, truncate, color } from '@elliemae/ds-system';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\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.displayName = 'DSMobileFooterText';\nconst DSMobileFooterTextWithSchema = describe(DSMobileFooterText);\nDSMobileFooterTextWithSchema.propTypes = props;\n\nexport { DSMobileFooterText, DSMobileFooterTextWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACasB;AAV7C,SAAS,QAAQ,WAAW,UAAU,aAAa;AACnD,SAAS,UAAU,iBAAiB;AAEpC,MAAM,OAAO,OAAO;AAAA;AAAA,IAEhB,SAAS,CAAC;AAAA,IACV,UAAU,MAAM,CAAC;AAAA,IACjB,MAAM,WAAW,KAAK,CAAC;AAAA;AAG3B,MAAM,qBAAqB,CAAC,EAAE,SAAS,MAAM,oBAAC,QAAM,UAAS;AAE7D,MAAM,QAAQ;AAAA,EACZ,UAAU,UAAU,OAAO,WAAW,YAAY,UAAU;AAC9D;AAEA,mBAAmB,cAAc;AACjC,MAAM,+BAA+B,SAAS,kBAAkB;AAChE,6BAA6B,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -22,10 +22,8 @@ const MobileListItem = ({
|
|
|
22
22
|
theme
|
|
23
23
|
}) => {
|
|
24
24
|
const cols = [1];
|
|
25
|
-
if (leftAddon)
|
|
26
|
-
|
|
27
|
-
if (rightAddon)
|
|
28
|
-
cols.push(__UNSAFE_SPACE_TO_DIMSUM(theme.space.m));
|
|
25
|
+
if (leftAddon) cols.unshift(__UNSAFE_SPACE_TO_DIMSUM(theme.space.m));
|
|
26
|
+
if (rightAddon) cols.push(__UNSAFE_SPACE_TO_DIMSUM(theme.space.m));
|
|
29
27
|
return /* @__PURE__ */ jsxs(
|
|
30
28
|
StyledContainer,
|
|
31
29
|
{
|
|
@@ -55,7 +53,6 @@ const listItemProps = {
|
|
|
55
53
|
dataTestid: PropTypes.string.description("ID used for testing").defaultValue("mobile-list-item"),
|
|
56
54
|
theme: PropTypes.object.description("")
|
|
57
55
|
};
|
|
58
|
-
MobileListItem.propTypes = listItemProps;
|
|
59
56
|
MobileListItem.displayName = "MobileListItem";
|
|
60
57
|
const ListItemWithSchema = describe(MobileListItem);
|
|
61
58
|
ListItemWithSchema.propTypes = listItemProps;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileListItem/MobileListItem.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { styled, border, truncate, withTheme, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\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=\"40px\"\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 && <Grid alignItems=\"center\">{leftAddon}</Grid>}\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.
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;AC4BnB,SASgB,KAThB;AA3BJ,SAAS,UAAU,iBAAiB;AACpC,SAAS,QAAQ,QAAQ,UAAU,WAAW,gCAAgC;AAC9E,SAAS,YAAY;AAErB,MAAM,kBAAkB,OAAO,IAAI;AAAA,gBACnB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { styled, border, truncate, withTheme, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\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=\"40px\"\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 && <Grid alignItems=\"center\">{leftAddon}</Grid>}\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.displayName = 'MobileListItem';\nconst ListItemWithSchema = describe(MobileListItem);\nListItemWithSchema.propTypes = listItemProps;\n\nexport { DSMobileListItem, ListItemWithSchema };\n"],
|
|
5
|
+
"mappings": "A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AAU,cAAc;AAEjD,MAAM,gBAAgB;AAAA,EACpB,WAAW,UAAU,QAAQ,YAAY,4BAA4B;AAAA,EACrE,YAAY,UAAU,QAAQ,YAAY,6BAA6B;AAAA,EACvE,OAAO,UAAU,OAAO,YAAY,cAAc,EAAE;AAAA,EACpD,OAAO,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EAAE;AAAA,IAC/D;AAAA,EACF;AAAA,EACA,YAAY,UAAU,OAAO,YAAY,qBAAqB,EAAE,aAAa,kBAAkB;AAAA,EAC/F,OAAO,UAAU,OAAO,YAAY,EAAE;AACxC;AAEA,eAAe,cAAc;AAC7B,MAAM,qBAAqB,SAAS,cAAc;AAClD,mBAAmB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { DSMobileListItem, ListItemWithSchema } from "./MobileListItem.js";
|
|
3
|
+
import { MobileListSingleItem } from "./MobileListSingleItem.js";
|
|
4
|
+
import { MobileListMultipleItem } from "./MobileListMultipleItem.js";
|
|
5
|
+
export {
|
|
6
|
+
DSMobileListItem,
|
|
7
|
+
ListItemWithSchema,
|
|
8
|
+
MobileListMultipleItem,
|
|
9
|
+
MobileListSingleItem
|
|
10
|
+
};
|
|
5
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileListItem/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { DSMobileListItem, ListItemWithSchema } from './MobileListItem.js';\nexport { MobileListSingleItem } from './MobileListSingleItem.js';\nexport { MobileListMultipleItem } from './MobileListMultipleItem.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,kBAAkB,0BAA0B;AACrD,SAAS,4BAA4B;AACrC,SAAS,8BAA8B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileListItem/style.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\n\nexport const StyledContainer = styled(Grid)`\n background: ${(props) => props.theme.colors.neutral['000']};\n`;\n\nexport const StyledTitle = styled.div`\n font-size: 16px;\n overflow-wrap: break-word;\n white-space: pre-wrap;\n`;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AACvB,SAAS,YAAY;AAEd,MAAM,kBAAkB,OAAO,IAAI;AAAA,gBAC1B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AACvB,SAAS,YAAY;AAEd,MAAM,kBAAkB,OAAO,IAAI;AAAA,gBAC1B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAGrD,MAAM,cAAc,OAAO;AAAA;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -7,7 +7,7 @@ import { TruncatedExpandableText } from "@elliemae/ds-truncated-expandable-text"
|
|
|
7
7
|
import { Grid } from "@elliemae/ds-grid";
|
|
8
8
|
import { ChevronSmallDown } from "@elliemae/ds-icons";
|
|
9
9
|
import { DSButton } from "@elliemae/ds-button";
|
|
10
|
-
import MobileSeparator from "../MobileSeparator/index.js";
|
|
10
|
+
import { DSMobileSeparator as MobileSeparator } from "../MobileSeparator/index.js";
|
|
11
11
|
const StyledTitle = styled(Grid)`
|
|
12
12
|
font-size: 22px;
|
|
13
13
|
font-weight: ${(props) => props.theme.fontWeights.regular};
|
|
@@ -51,10 +51,8 @@ const MobilePageHeader = ({
|
|
|
51
51
|
const hasValue = value === 0 || value;
|
|
52
52
|
const countActions = useMemo(() => {
|
|
53
53
|
let count = 0;
|
|
54
|
-
if (firstAction)
|
|
55
|
-
|
|
56
|
-
if (secondAction)
|
|
57
|
-
count++;
|
|
54
|
+
if (firstAction) count++;
|
|
55
|
+
if (secondAction) count++;
|
|
58
56
|
return count;
|
|
59
57
|
}, [firstAction, secondAction]);
|
|
60
58
|
const [open, setOpen] = useState();
|
|
@@ -64,12 +62,9 @@ const MobilePageHeader = ({
|
|
|
64
62
|
const separator = /* @__PURE__ */ jsx(Grid, { height: "32px", alignItems: "center", children: /* @__PURE__ */ jsx(Grid, { height: "24px", children: /* @__PURE__ */ jsx(MobileSeparator, { direction: "vertical", margin: "xxs", color: ["neutral", "300"] }) }) });
|
|
65
63
|
const cols = [1, "auto"];
|
|
66
64
|
const cols2 = ["auto"];
|
|
67
|
-
if (countActions)
|
|
68
|
-
|
|
69
|
-
if (
|
|
70
|
-
cols2.push("auto");
|
|
71
|
-
if (label)
|
|
72
|
-
cols2.push("auto");
|
|
65
|
+
if (countActions) cols.push("auto");
|
|
66
|
+
if (hasValue) cols2.push("auto");
|
|
67
|
+
if (label) cols2.push("auto");
|
|
73
68
|
return /* @__PURE__ */ jsxs(
|
|
74
69
|
Wrapper,
|
|
75
70
|
{
|
|
@@ -120,8 +115,7 @@ const MobilePageHeader = ({
|
|
|
120
115
|
React2.cloneElement(contextMenu, {
|
|
121
116
|
open: contextMenu.props.open !== void 0 ? contextMenu.props.open : open,
|
|
122
117
|
onChange: (event, item) => {
|
|
123
|
-
if (contextMenu.props.onChange)
|
|
124
|
-
contextMenu.props.onChange(event, item);
|
|
118
|
+
if (contextMenu.props.onChange) contextMenu.props.onChange(event, item);
|
|
125
119
|
handleContext();
|
|
126
120
|
}
|
|
127
121
|
})
|
|
@@ -168,7 +162,6 @@ const pageHeaderProps = {
|
|
|
168
162
|
label: PropTypes.string.description("Page summary label"),
|
|
169
163
|
theme: PropTypes.object.description("dimsum theme")
|
|
170
164
|
};
|
|
171
|
-
MobilePageHeader.propTypes = pageHeaderProps;
|
|
172
165
|
MobilePageHeader.displayName = "MobilePageHeader";
|
|
173
166
|
const PageHeaderWithSchema = describe(MobilePageHeader);
|
|
174
167
|
PageHeaderWithSchema.propTypes = pageHeaderProps;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobilePageHeader/MobilePageHeader.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable import/no-unresolved */\n/* eslint-disable no-plusplus */\n/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport React, { useMemo, useState, useCallback } from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { styled, border, truncate, withTheme, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport { TruncatedExpandableText } from '@elliemae/ds-truncated-expandable-text';\nimport { Grid } from '@elliemae/ds-grid';\nimport { ChevronSmallDown } from '@elliemae/ds-icons';\nimport { DSButton } from '@elliemae/ds-button';\nimport MobileSeparator from '../MobileSeparator/index.js';\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 line-height: 1.15;\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)<{ withBlueBorder: boolean }>`\n border-bottom: ${({ theme, withBlueBorder }) =>\n border(withBlueBorder ? theme.colors.brand['700'] : theme.colors.neutral['300'])};\n`;\n\nconst MobilePageHeader = ({\n pageTitle = null,\n withBlueBorder = false,\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 withBlueBorder={withBlueBorder}\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\" pr=\"16px\">\n {backArrow}\n </Grid>\n )}\n <Grid flexGrow={0} pt={!breadCrumb ? 0 : theme.space.xxs}>\n <Grid>\n <Grid>\n {breadCrumb && <StyledBreadCrumb data-testid=\"page-header-breadcrum\">{breadCrumb}</StyledBreadCrumb>}\n <StyledTitle\n cols={['auto', '1fr']}\n gutter=\"xxxs\"\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} alignItems=\"flex-start\" justifyItems=\"center\">\n <TruncatedExpandableText value={pageTitle} />\n </Grid>\n {contextMenu ? (\n <Grid alignItems=\"center\">\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 ) : null}\n </StyledTitle>\n </Grid>\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.
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;AC2Ef,cA+CY,YA/CZ;AAvER,OAAOA,UAAS,SAAS,UAAU,mBAAmB;AACtD,SAAS,UAAU,iBAAiB;AACpC,SAAS,QAAQ,QAAQ,UAAU,WAAW,gCAAgC;AAC9E,SAAS,+BAA+B;AACxC,SAAS,YAAY;AACrB,SAAS,wBAAwB;AACjC,SAAS,gBAAgB;AACzB,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable import/no-unresolved */\n/* eslint-disable no-plusplus */\n/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport React, { useMemo, useState, useCallback } from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { styled, border, truncate, withTheme, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport { TruncatedExpandableText } from '@elliemae/ds-truncated-expandable-text';\nimport { Grid } from '@elliemae/ds-grid';\nimport { ChevronSmallDown } from '@elliemae/ds-icons';\nimport { DSButton } from '@elliemae/ds-button';\nimport { DSMobileSeparator as MobileSeparator } from '../MobileSeparator/index.js';\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 line-height: 1.15;\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)<{ withBlueBorder: boolean }>`\n border-bottom: ${({ theme, withBlueBorder }) =>\n border(withBlueBorder ? theme.colors.brand['700'] : theme.colors.neutral['300'])};\n`;\n\nconst MobilePageHeader = ({\n pageTitle = null,\n withBlueBorder = false,\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 withBlueBorder={withBlueBorder}\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\" pr=\"16px\">\n {backArrow}\n </Grid>\n )}\n <Grid flexGrow={0} pt={!breadCrumb ? 0 : theme.space.xxs}>\n <Grid>\n <Grid>\n {breadCrumb && <StyledBreadCrumb data-testid=\"page-header-breadcrum\">{breadCrumb}</StyledBreadCrumb>}\n <StyledTitle\n cols={['auto', '1fr']}\n gutter=\"xxxs\"\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} alignItems=\"flex-start\" justifyItems=\"center\">\n <TruncatedExpandableText value={pageTitle} />\n </Grid>\n {contextMenu ? (\n <Grid alignItems=\"center\">\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 ) : null}\n </StyledTitle>\n </Grid>\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.displayName = 'MobilePageHeader';\nconst PageHeaderWithSchema = describe(MobilePageHeader);\nPageHeaderWithSchema.propTypes = pageHeaderProps;\n\nconst DSMobilePageHeader = withTheme(MobilePageHeader);\n\nexport { DSMobilePageHeader, PageHeaderWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC2Ef,cA+CY,YA/CZ;AAvER,OAAOA,UAAS,SAAS,UAAU,mBAAmB;AACtD,SAAS,UAAU,iBAAiB;AACpC,SAAS,QAAQ,QAAQ,UAAU,WAAW,gCAAgC;AAC9E,SAAS,+BAA+B;AACxC,SAAS,YAAY;AACrB,SAAS,wBAAwB;AACjC,SAAS,gBAAgB;AACzB,SAAS,qBAAqB,uBAAuB;AAErD,MAAM,cAAc,OAAO,IAAI;AAAA;AAAA,iBAEd,CAAC,UAAU,MAAM,MAAM,YAAY,OAAO;AAAA,WAChD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,gBACvC,CAAC,UAAW,MAAM,iBAAiB,SAAS,MAAO;AAAA,iBAClD,CAAC,UAAW,MAAM,iBAAiB,MAAM,KAAM;AAAA;A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B,oBAAC,QAAM,wBAAa;AAAA;AAAA;AAAA,QACvC;AAAA;AAAA;AAAA,EAEJ;AAEJ;AAEA,MAAM,kBAAkB;AAAA,EACtB,WAAW,UAAU,OAAO,YAAY,YAAY,EAAE;AAAA,EACtD,aAAa,UAAU,QAAQ,YAAY,sBAAsB;AAAA,EACjE,mBAAmB,UAAU,KAAK,YAAY,yCAAyC;AAAA,EACvF,aAAa,UAAU,QAAQ,YAAY,eAAe;AAAA,EAC1D,cAAc,UAAU,QAAQ,YAAY,eAAe;AAAA,EAC3D,WAAW,UAAU,QAAQ,YAAY,mBAAmB;AAAA,EAC5D,YAAY,UAAU,OAAO,YAAY,mBAAmB;AAAA,EAC5D,OAAO,UAAU,OAAO,YAAY,oBAAoB;AAAA,EACxD,OAAO,UAAU,OAAO,YAAY,oBAAoB;AAAA,EACxD,OAAO,UAAU,OAAO,YAAY,cAAc;AACpD;AAEA,iBAAiB,cAAc;AAC/B,MAAM,uBAAuB,SAAS,gBAAgB;AACtD,qBAAqB,YAAY;AAEjC,MAAM,qBAAqB,UAAU,gBAAgB;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobilePageHeader/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { DSMobilePageHeader, PageHeaderWithSchema } from './MobilePageHeader.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,oBAAoB,4BAA4B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -32,12 +32,9 @@ const MobileSelectList = ({
|
|
|
32
32
|
const handleSelection = (value) => {
|
|
33
33
|
if (multiple) {
|
|
34
34
|
const index = selecteds.findIndex((s) => s === value);
|
|
35
|
-
if (index > -1)
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
setSelected([...selecteds, value]);
|
|
39
|
-
} else
|
|
40
|
-
setSelected([value]);
|
|
35
|
+
if (index > -1) setSelected(selecteds.filter((s) => s !== value));
|
|
36
|
+
else setSelected([...selecteds, value]);
|
|
37
|
+
} else setSelected([value]);
|
|
41
38
|
};
|
|
42
39
|
const handleChange = function(event) {
|
|
43
40
|
onChange(event, this);
|
|
@@ -48,14 +45,11 @@ const MobileSelectList = ({
|
|
|
48
45
|
onSearch(e);
|
|
49
46
|
};
|
|
50
47
|
const handleApply = function(e) {
|
|
51
|
-
if (this.onClick)
|
|
52
|
-
this.onClick(e);
|
|
48
|
+
if (this.onClick) this.onClick(e);
|
|
53
49
|
onApply(e, selecteds);
|
|
54
50
|
};
|
|
55
|
-
if (buttonFooter)
|
|
56
|
-
|
|
57
|
-
if (!open)
|
|
58
|
-
return null;
|
|
51
|
+
if (buttonFooter) rows.push(op("*", __UNSAFE_SPACE_TO_DIMSUM(theme.space.xl), 1.16666));
|
|
52
|
+
if (!open) return null;
|
|
59
53
|
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(StyledContainer, { "data-testid": dataTestid, rows, zIndex, children: [
|
|
60
54
|
/* @__PURE__ */ jsxs(HeaderContainer, { children: [
|
|
61
55
|
header,
|
|
@@ -78,10 +72,8 @@ const MobileSelectList = ({
|
|
|
78
72
|
if (filter && !String(value).toLocaleLowerCase().includes(filter.toLocaleLowerCase()) && !String(title).toLocaleLowerCase().includes(filter.toLocaleLowerCase()))
|
|
79
73
|
return null;
|
|
80
74
|
if (multiple) {
|
|
81
|
-
if (found > -1)
|
|
82
|
-
|
|
83
|
-
else
|
|
84
|
-
leftAddon = checkbox;
|
|
75
|
+
if (found > -1) leftAddon = checked;
|
|
76
|
+
else leftAddon = checkbox;
|
|
85
77
|
} else if (found > -1) {
|
|
86
78
|
rightAddon = selectedMark;
|
|
87
79
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileSelectList/MobileSelectList.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint react/jsx-no-bind:0 react/no-this-in-sfc:0 */\nimport React, { useState, useEffect } from 'react';\nimport { noop } from 'lodash';\nimport PropTypes from 'prop-types';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSTextBox } from '@elliemae/ds-form';\nimport { op, withTheme, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport { DSMobileTouchable } from '../MobileTouchable/index.js';\nimport { StyledContainer, HeaderContainer, Footer, ListContainer, checkbox, checked, selectedMark } from './styled.js';\n\nconst MobileSelectList = ({\n open = false,\n header = null,\n multiple = false,\n onChange = noop,\n children,\n theme,\n zIndex = 1,\n useSearch,\n onSearch = noop,\n dataTestid = 'mobile-select-list',\n buttonFooter = null,\n 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"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACuDnB,mBAWU,KATN,YAFJ;AAtDJ,OAAOA,UAAS,UAAU,iBAAiB;AAC3C,SAAS,YAAY;AACrB,OAAO,eAAe;AACtB,SAAS,YAAY;AACrB,SAAS,iBAAiB;AAC1B,SAAS,IAAI,WAAW,gCAAgC;AACxD,SAAS,yBAAyB;AAClC,SAAS,iBAAiB,iBAAiB,QAAQ,eAAe,UAAU,SAAS,oBAAoB;AAEzG,MAAM,mBAAmB,CAAC;AAAA,EACxB,OAAO;AAAA,EACP,SAAS;AAAA,EACT,WAAW;AAAA,EACX,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA,SAAS;AAAA,EACT;AAAA,EACA,WAAW;AAAA,EACX,aAAa;AAAA,EACb,eAAe;AAAA,EACf,UAAU;AAAA,EACV,WAAW,gBAAgB,CAAC;AAC9B,MAAM;AACJ,QAAM,OAAO,CAAC,QAAQ,CAAC;AACvB,QAAM,CAAC,WAAW,WAAW,IAAI,SAAS,aAAa;AACvD,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,EAAE;AACvC,YAAU,MAAM;AACd,gBAAY,aAAa;AAAA,EAC3B,GAAG,CAAC,aAAa,CAAC;AAElB,QAAM,kBAAkB,CAAC,UAAU;AACjC,QAAI,UAAU;AACZ,YAAM,QAAQ,UAAU,UAAU,CAAC,MAAM,M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scripts/build/transpile/react-shim.js", "../../../src/MobileSelectList/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { DSMobileSelectList } from './MobileSelectList.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,0BAA0B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileSelectList/styled.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { noop } from 'lodash';\nimport { styled, border } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSCheckbox } from '@elliemae/ds-form';\nimport { Checkmark } from '@elliemae/ds-icons';\nimport { DSMobileTouchable } from '../MobileTouchable/index.js';\nimport { DSMobileListItem } from '../MobileListItem/index.js';\n\nexport const StyledContainer = styled(Grid)`\n background: ${(props) => props.theme.colors.neutral['000']};\n z-index: ${(props) => props.zIndex};\n position: fixed;\n width: 100%;\n top: 0;\n left: 0;\n right: 0;\n height: 100%;\n`;\n\nexport const HeaderContainer = styled(Grid)`\n border-bottom: ${(props) => border(props.theme.colors.neutral['300'])};\n`;\n\nexport const Footer = styled(Grid)`\n border-top: ${(props) => border(props.theme.colors.neutral['300'])};\n`;\n\nexport const ListContainer = styled.div`\n & ${DSMobileTouchable}:last-child ${DSMobileListItem} {\n border: none;\n }\n`;\n\nexport const checkbox = <DSCheckbox checked={false} onChange={noop} style={{ pointerEvents: 'none' }} />;\nexport const checked = <DSCheckbox checked onChange={noop} style={{ pointerEvents: 'none' }} />;\nexport const selectedMark = <Checkmark color={['brand-primary', 600]} />;\n"],
|
|
5
|
-
"mappings": "AAA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7 +26,6 @@ const mobileSeparatorProps = {
|
|
|
26
26
|
color: PropTypes.array.description("Color of the separator").defaultValue(["neutral", "800"]),
|
|
27
27
|
margin: PropTypes.oneOf(["xxs", "xs", "s", "m", "l", "xl", "xxl"]).description("Margin of the separator").defaultValue("xs")
|
|
28
28
|
};
|
|
29
|
-
MobileSeparator.propTypes = mobileSeparatorProps;
|
|
30
29
|
MobileSeparator.displayName = "MobileSeparator";
|
|
31
30
|
const MobileSeparatorWithSchema = describe(MobileSeparator);
|
|
32
31
|
MobileSeparatorWithSchema.propTypes = mobileSeparatorProps;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileSeparator/Separator.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { styled } from '@elliemae/ds-system';\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.
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACqBd;AApBT,SAAS,UAAU,iBAAiB;AACpC,SAAS,cAAc;AACvB,SAAS,YAAY;AAErB,MAAM,YAAY,OAAO,IAAI;AAAA,gBACb,CAAC,EAAE,OAAO,OAAO,WAAW,MAAM,GAAG,MAAM,OAAO,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { styled } from '@elliemae/ds-system';\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.displayName = 'MobileSeparator';\nconst MobileSeparatorWithSchema = describe(MobileSeparator);\nMobileSeparatorWithSchema.propTypes =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AAY,yBAAyB,EACrC,aAAa,IAAI;AACtB;AAEA,gBAAgB,cAAc;AAC9B,MAAM,4BAA4B,SAAS,eAAe;AAC1D,0BAA0B,YAAY;AAGtC,IAAO,oBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import DSMobileSeparator, { MobileSeparatorWithSchema } from "./Separator.js";
|
|
3
|
-
var MobileSeparator_default = DSMobileSeparator;
|
|
4
3
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
DSMobileSeparator,
|
|
5
|
+
MobileSeparatorWithSchema
|
|
7
6
|
};
|
|
8
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileSeparator/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import DSMobileSeparator, { MobileSeparatorWithSchema } from './Separator.js';\n\nexport { MobileSeparatorWithSchema };\
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAO,qBAAqB,iCAAiC;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import DSMobileSeparator, { MobileSeparatorWithSchema } from './Separator.js';\n\nexport { MobileSeparatorWithSchema, DSMobileSeparator };\n// export default DSMobileSeparator;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAO,qBAAqB,iCAAiC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileTimePicker/Input.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { focus, __UNSAFE_SPACE_TO_DIMSUM, styled } from '@elliemae/ds-system';\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,\n input[type='time']&:focus {\n ${(props) => focus(props.theme.colors.brand[700])}\n }\n\n &:before {\n color: ${(props) => (props.value === '' ? props.theme.colors.neutral['500'] : props.theme.colors.neutral['800'])};\n content: '${(props) => (props.value === '' ? props.placeholder : props['data-displayvalue'])}';\n }\n\n input[type='time']&::-webkit-datetime-edit,\n input[type='time']&::-webkit-inner-spin-button,\n input[type='time']&::-webkit-clear-button {\n -webkit-appearance: none;\n display: none;\n }\n`;\n\nexport const Input = ({ innerRef, ...props }) => <StyledInput innerRef={innerRef} {...props} />;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;AC4C0B;AA3CjD,SAAS,OAAO,0BAA0B,cAAc;AAExD,MAAM,cAAc,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAUb,CAAC,UAAU,yBAAyB,MAAM,MAAM,MAAM,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC4C0B;AA3CjD,SAAS,OAAO,0BAA0B,cAAc;AAExD,MAAM,cAAc,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAUb,CAAC,UAAU,yBAAyB,MAAM,MAAM,MAAM,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAMpD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,iBAC7C,CAAC,UAAU,yBAAyB,MAAM,MAAM,MAAM,EAAE,CAAC;AAAA;AAAA;AAAA,wBAGlD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,MAK5D,CAAC,UAAU,MAAM,MAAM,MAAM,OAAO,MAAM,GAAG,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA,aAIxC,CAAC,UAAW,MAAM,UAAU,KAAK,MAAM,MAAM,OAAO,QAAQ,KAAK,IAAI,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAE;AAAA,gBACpG,CAAC,UAAW,MAAM,UAAU,KAAK,MAAM,cAAc,MAAM,mBAAmB,CAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWzF,MAAM,QAAQ,CAAC,EAAE,UAAU,GAAG,MAAM,MAAM,oBAAC,eAAY,UAAqB,GAAG,OAAO;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -16,8 +16,7 @@ const DSMobileTimePicker = ({ disabled, value, tabIndex, placeholder, onChange }
|
|
|
16
16
|
}
|
|
17
17
|
}, [inputRef.current]);
|
|
18
18
|
const displayValue = useMemo(() => {
|
|
19
|
-
if (!value || !valueArr[0] || !valueArr[1])
|
|
20
|
-
return "";
|
|
19
|
+
if (!value || !valueArr[0] || !valueArr[1]) return "";
|
|
21
20
|
const ampm = valueArr[0] >= 12 ? "pm" : "am";
|
|
22
21
|
const h = valueArr[0] > 12 ? valueArr[0] - 12 : valueArr[0];
|
|
23
22
|
return `${h} : ${valueArr[1]} ${ampm}`;
|
|
@@ -93,7 +92,6 @@ const pickerProps = {
|
|
|
93
92
|
*/
|
|
94
93
|
value: PropTypes.string.description("HH:MM string representing the time or empty string")
|
|
95
94
|
};
|
|
96
|
-
DSMobileTimePicker.propTypes = pickerProps;
|
|
97
95
|
DSMobileTimePicker.displayName = "DSMobileTimePicker";
|
|
98
96
|
const DSMobileTimePickerWithSchema = describe(DSMobileTimePicker).description("Time picker for mobile & tablet");
|
|
99
97
|
DSMobileTimePickerWithSchema.propTypes = pickerProps;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileTimePicker/MobileTimePicker.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useRef, useMemo, useEffect } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\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.js';\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.
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACoCP;AApChB,SAAgB,QAAQ,SAAS,iBAAiB;AAClD,SAAS,WAAW,gBAAgB;AACpC,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAChC,SAAS,gBAAgB;AACzB,SAAS,oBAAoB;AAC7B,SAAS,aAAa;AAEtB,MAAM,qBAAqB,CAAC,EAAE,UAAU,OAAO,UAAU,aAAa,SAAS,MAAM;AACnF,QAAM,WAAW,OAAO,IAAI;AAC5B,QAAM,WAAW,MAAM,MAAM,GAAG;AAChC,YAAU,MAAM;AAMd,QAAI,SAAS,SAAS;AACpB,eAAS,QAAQ,eAAe;AAAA,IAClC;AAAA,EACF,GAAG,CAAC,SAAS,OAAO,CAAC;AACrB,QAAM,eAAe,QAAQ,MAAM;AACjC,QAAI,CAAC,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useRef, useMemo, useEffect } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\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.js';\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.displayName = 'DSMobileTimePicker';\nconst DSMobileTimePickerWithSchema = describe(DSMobileTimePicker).description('Time picker for mobile & tablet');\n\nDSMobileTimePickerWithSchema.propTypes = pickerProps;\n\nexport { DSMobileTimePicker, DSMobileTimePickerWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACoCP;AApChB,SAAgB,QAAQ,SAAS,iBAAiB;AAClD,SAAS,WAAW,gBAAgB;AACpC,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAChC,SAAS,gBAAgB;AACzB,SAAS,oBAAoB;AAC7B,SAAS,aAAa;AAEtB,MAAM,qBAAqB,CAAC,EAAE,UAAU,OAAO,UAAU,aAAa,SAAS,MAAM;AACnF,QAAM,WAAW,OAAO,IAAI;AAC5B,QAAM,WAAW,MAAM,MAAM,GAAG;AAChC,YAAU,MAAM;AAMd,QAAI,SAAS,SAAS;AACpB,eAAS,QAAQ,eAAe;AAAA,IAClC;AAAA,EACF,GAAG,CAAC,SAAS,OAAO,CAAC;AACrB,QAAM,eAAe,QAAQ,MAAM;AACjC,QAAI,CAAC,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,EAAG,QAAO;AACnD,UAAM,OAAO,SAAS,CAAC,KAAK,KAAK,OAAO;AACxC,UAAM,IAAI,SAAS,CAAC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