@elliemae/ds-mobile 2.0.0-next.9 → 2.0.0-rc.12
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/Accordion/Accordion.js +5 -5
- package/cjs/Accordion/index.js +5 -5
- package/cjs/CategoryBox/CategoryBox.js +12 -11
- package/cjs/CollectionBox/CollectionBox.js +14 -13
- package/cjs/FullPageContainer/FullPageContainer.js +7 -2
- package/cjs/FullPageContainer/FullPageContainerScroll.js +7 -2
- package/cjs/GlobalHeader/MobileGlobalHeader.js +28 -24
- package/cjs/GroupBox/GroupBox.js +13 -12
- package/cjs/InfiniteLoader/Infiniteloader.js +11 -9
- package/cjs/InfiniteLoader/Loader.js +12 -9
- package/cjs/InfiniteLoader/VirtualizedInfiniteLoader.js +49 -22
- package/cjs/LoadingPage/Page.js +24 -12
- package/cjs/MobileActionToolbar/MobileActionToolbar.js +8 -7
- package/cjs/MobileActionToolbar/MobileActionToolbarItem.js +6 -1
- package/cjs/MobileBanner/MobileBanner.js +21 -16
- package/cjs/MobileBanner/styles.js +128 -59
- package/cjs/MobileBanner/utils/icons.js +5 -12
- package/cjs/MobileBanner/utils/styleHelpers.js +8 -4
- package/cjs/MobileCard/ActionAddon.js +16 -14
- package/cjs/MobileCard/Card.js +26 -22
- package/cjs/MobileCard/CardIcons.js +21 -16
- package/cjs/MobileCard/ExpandChevron.js +8 -10
- package/cjs/MobileCard/ExpandableRegion.js +5 -4
- package/cjs/MobileCard/Group.js +22 -16
- package/cjs/MobileContextMenu/MobileContextMenu.js +33 -25
- package/cjs/MobileContextMenu/MobileContextMenuGroup.js +35 -25
- package/cjs/MobileContextMenu/MobileContextMenuItem.js +29 -25
- package/cjs/MobileDatePicker/Input.js +5 -0
- package/cjs/MobileDatePicker/MobileDatePicker.js +15 -16
- package/cjs/MobileDropdownMenu/MobileDropdownInput.js +27 -17
- package/cjs/MobileDropdownMenu/MobileDropdownMenu.js +19 -16
- package/cjs/MobileEmtpyState/MobileEmptyState.js +10 -8
- package/cjs/MobileFilterbar/Filterbar.js +13 -10
- package/cjs/MobileFilterbar/FilterbarItem.js +15 -12
- package/cjs/MobileFilterbar/FilterbarSort.js +17 -14
- package/cjs/MobileFooter/Action.js +27 -24
- package/cjs/MobileFooter/Footer.js +15 -8
- package/cjs/MobileFooter/Text.js +6 -3
- package/cjs/MobileListItem/MobileListItem.js +14 -13
- package/cjs/MobilePageHeader/MobilePageHeader.js +35 -35
- package/cjs/MobileSelectList/MobileSelectList.js +29 -22
- package/cjs/MobileSelectList/styled.js +9 -11
- package/cjs/MobileSeparator/Separator.js +30 -18
- package/cjs/MobileTimePicker/Input.js +5 -0
- package/cjs/MobileTimePicker/MobileTimePicker.js +15 -16
- package/cjs/MobileTimePicker/MobileTimePicker.stories.js +2 -2
- package/cjs/MobileTouchable/MobileTouchable.js +7 -2
- package/cjs/Modal/Modal.js +30 -25
- package/cjs/Modal/styled.js +7 -7
- package/cjs/PageFilter/PageFilter.js +20 -15
- package/cjs/PageForm/PageForm.js +22 -15
- package/cjs/PageList/PageList.js +12 -11
- package/cjs/PageSearch/PageSearch.js +14 -13
- package/cjs/PageSummary/PageSummary.js +34 -21
- package/cjs/PageSummary/Tags.js +12 -6
- package/cjs/SideNav/SideNav.js +42 -34
- package/cjs/SwipeToRefresh/ProgressIndicator.js +6 -5
- package/cjs/SwipeToRefresh/SwipeToRefresh.js +8 -7
- package/cjs/SwipeToRefresh/styled.js +4 -4
- package/cjs/SwipeToRefresh/useSwipe.js +5 -4
- package/cjs/Tabs/index.js +8 -3
- package/cjs/index.js +9 -5
- package/esm/Accordion/Accordion.js +1 -1
- package/esm/Accordion/index.js +1 -1
- package/esm/CategoryBox/CategoryBox.js +9 -8
- package/esm/CollectionBox/CollectionBox.js +9 -8
- package/esm/FullPageContainer/FullPageContainer.js +6 -1
- package/esm/FullPageContainer/FullPageContainerScroll.js +6 -1
- package/esm/GlobalHeader/MobileGlobalHeader.js +20 -14
- package/esm/GroupBox/GroupBox.js +10 -9
- package/esm/InfiniteLoader/Infiniteloader.js +9 -7
- package/esm/InfiniteLoader/Loader.js +12 -9
- package/esm/InfiniteLoader/VirtualizedInfiniteLoader.js +50 -23
- package/esm/LoadingPage/Page.js +24 -12
- package/esm/MobileActionToolbar/MobileActionToolbar.js +7 -6
- package/esm/MobileActionToolbar/MobileActionToolbarItem.js +6 -1
- package/esm/MobileBanner/MobileBanner.js +20 -14
- package/esm/MobileBanner/styles.js +128 -59
- package/esm/MobileBanner/utils/icons.js +1 -4
- package/esm/MobileBanner/utils/styleHelpers.js +8 -4
- package/esm/MobileCard/ActionAddon.js +16 -13
- package/esm/MobileCard/Card.js +20 -16
- package/esm/MobileCard/CardIcons.js +20 -15
- package/esm/MobileCard/ExpandChevron.js +8 -8
- package/esm/MobileCard/ExpandableRegion.js +5 -4
- package/esm/MobileCard/Group.js +20 -14
- package/esm/MobileContextMenu/MobileContextMenu.js +26 -18
- package/esm/MobileContextMenu/MobileContextMenuGroup.js +35 -25
- package/esm/MobileContextMenu/MobileContextMenuItem.js +25 -19
- package/esm/MobileDatePicker/Input.js +5 -0
- package/esm/MobileDatePicker/MobileDatePicker.js +12 -11
- package/esm/MobileDropdownMenu/MobileDropdownInput.js +27 -16
- package/esm/MobileDropdownMenu/MobileDropdownMenu.js +19 -16
- package/esm/MobileEmtpyState/MobileEmptyState.js +10 -7
- package/esm/MobileFilterbar/Filterbar.js +13 -10
- package/esm/MobileFilterbar/FilterbarItem.js +15 -12
- package/esm/MobileFilterbar/FilterbarSort.js +17 -14
- package/esm/MobileFooter/Action.js +26 -23
- package/esm/MobileFooter/Footer.js +12 -5
- package/esm/MobileFooter/Text.js +6 -3
- package/esm/MobileListItem/MobileListItem.js +10 -9
- package/esm/MobilePageHeader/MobilePageHeader.js +17 -16
- package/esm/MobileSelectList/MobileSelectList.js +25 -17
- package/esm/MobileSelectList/styled.js +4 -4
- package/esm/MobileSeparator/Separator.js +28 -16
- package/esm/MobileTimePicker/Input.js +5 -0
- package/esm/MobileTimePicker/MobileTimePicker.js +12 -11
- package/esm/MobileTimePicker/MobileTimePicker.stories.js +1 -1
- package/esm/MobileTouchable/MobileTouchable.js +6 -1
- package/esm/Modal/Modal.js +25 -19
- package/esm/Modal/styled.js +1 -1
- package/esm/PageFilter/PageFilter.js +15 -10
- package/esm/PageForm/PageForm.js +18 -11
- package/esm/PageList/PageList.js +10 -9
- package/esm/PageSearch/PageSearch.js +10 -9
- package/esm/PageSummary/PageSummary.js +32 -19
- package/esm/PageSummary/Tags.js +12 -6
- package/esm/SideNav/SideNav.js +38 -29
- package/esm/SwipeToRefresh/ProgressIndicator.js +5 -4
- package/esm/SwipeToRefresh/SwipeToRefresh.js +7 -6
- package/esm/SwipeToRefresh/styled.js +1 -1
- package/esm/SwipeToRefresh/useSwipe.js +5 -4
- package/esm/Tabs/index.js +6 -1
- package/esm/index.js +4 -3
- package/package.json +27 -7
- package/types/Accordion/Accordion.d.ts +1 -1
- package/types/CategoryBox/CategoryBox.d.ts +37 -6
- package/types/CollectionBox/CollectionBox.d.ts +37 -6
- package/types/GlobalHeader/MobileGlobalHeader.d.ts +43 -6
- package/types/GlobalHeader/styles.d.ts +6 -6
- package/types/GroupBox/GroupBox.d.ts +44 -7
- package/types/InfiniteLoader/Infiniteloader.d.ts +30 -5
- package/types/InfiniteLoader/VirtualizedInfiniteLoader.d.ts +56 -8
- package/types/InfiniteLoader/styled.d.ts +1 -1
- package/types/LoadingPage/Page.d.ts +1 -1
- package/types/MobileActionToolbar/MobileActionToolbar.d.ts +16 -4
- package/types/MobileActionToolbar/MobileActionToolbarItem.d.ts +15 -2
- package/types/MobileBanner/MobileBanner.d.ts +72 -12
- package/types/MobileBanner/propTypes.d.ts +67 -11
- package/types/MobileBanner/styles.d.ts +10 -10
- package/types/MobileCard/Card.d.ts +23 -13
- package/types/MobileCard/Group.d.ts +18 -8
- package/types/MobileCard/StyledCard.d.ts +1 -1
- package/types/MobileCard/index.d.ts +4 -12
- package/types/MobileContextMenu/MobileContextMenu.d.ts +13 -2
- package/types/MobileContextMenu/MobileContextMenuGroup.d.ts +37 -5
- package/types/MobileContextMenu/MobileContextMenuItem.d.ts +54 -9
- package/types/MobileDatePicker/MobileDatePicker.d.ts +43 -7
- package/types/MobileDropdownMenu/MobileDropdownInput.d.ts +2 -2
- package/types/MobileDropdownMenu/MobileDropdownMenu.d.ts +24 -4
- package/types/MobileEmtpyState/MobileEmptyState.d.ts +14 -2
- package/types/MobileFilterbar/Filterbar.d.ts +9 -2
- package/types/MobileFilterbar/FilterbarItem.d.ts +15 -2
- package/types/MobileFilterbar/FilterbarSort.d.ts +9 -2
- package/types/MobileFooter/Action.d.ts +19 -3
- package/types/MobileFooter/Footer.d.ts +8 -1
- package/types/MobileFooter/Text.d.ts +8 -1
- package/types/MobileListItem/MobileListItem.d.ts +17 -7
- package/types/MobilePageHeader/MobilePageHeader.d.ts +21 -11
- package/types/MobileSelectList/MobileSelectList.d.ts +3 -3
- package/types/MobileSelectList/styled.d.ts +5 -5
- package/types/MobileSeparator/Separator.d.ts +23 -5
- package/types/MobileTimePicker/MobileTimePicker.d.ts +32 -6
- package/types/MobileTouchable/MobileTouchable.d.ts +1 -1
- package/types/Modal/Modal.d.ts +50 -9
- package/types/Modal/styled.d.ts +7 -6
- package/types/PageList/PageList.d.ts +2 -2
- package/types/PageSearch/PageSearch.d.ts +2 -2
- package/types/PageSummary/Tags.d.ts +4 -4
- package/types/SideNav/SideNav.d.ts +26 -5
- package/types/SideNav/styles.d.ts +8 -8
- package/types/SwipeToRefresh/SwipeToRefresh.d.ts +22 -3
- package/types/SwipeToRefresh/styled.d.ts +5 -4
- package/types/index.d.ts +5 -1
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import 'react';
|
|
3
|
-
import DSIndeterminateProgressIndicator from '@elliemae/ds-
|
|
3
|
+
import DSIndeterminateProgressIndicator from '@elliemae/ds-indeterminate-progress-indicator';
|
|
4
4
|
import { LoaderBox } from './styled.js';
|
|
5
5
|
|
|
6
6
|
var _DSIndeterminateProgr;
|
|
7
|
-
const Loader =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
const Loader = _ref => {
|
|
8
|
+
let {
|
|
9
|
+
isOpen
|
|
10
|
+
} = _ref;
|
|
11
|
+
return /*#__PURE__*/_jsx(LoaderBox, {
|
|
12
|
+
className: isOpen && 'opened'
|
|
13
|
+
}, void 0, _DSIndeterminateProgr || (_DSIndeterminateProgr = /*#__PURE__*/_jsx(DSIndeterminateProgressIndicator, {
|
|
14
|
+
processing: true,
|
|
15
|
+
title: "Loading"
|
|
16
|
+
})));
|
|
17
|
+
};
|
|
15
18
|
|
|
16
19
|
export { Loader };
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
3
|
import { useState } from 'react';
|
|
4
|
-
import { describe } from 'react-desc';
|
|
4
|
+
import { PropTypes, describe } from 'react-desc';
|
|
5
5
|
import RWInfiniteLoader from 'react-window-infinite-loader';
|
|
6
6
|
import { VariableSizeList } from 'react-window';
|
|
7
7
|
import { jsx } from 'react/jsx-runtime';
|
|
8
8
|
|
|
9
|
-
const VirtualizedInfiniteLoader =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
const VirtualizedInfiniteLoader = _ref => {
|
|
10
|
+
let {
|
|
11
|
+
moreItemsLoading = false,
|
|
12
|
+
hasNextPage = false,
|
|
13
|
+
isItemLoaded = () => true,
|
|
14
|
+
loadMoreItems,
|
|
15
|
+
getItemSize = () => 38,
|
|
16
|
+
height,
|
|
17
|
+
item: Row
|
|
18
|
+
} = _ref;
|
|
18
19
|
const [itemCount, setItemCount] = useState(10);
|
|
19
20
|
|
|
20
21
|
const loadMore = (startIndex, stopIndex) => {
|
|
@@ -30,19 +31,22 @@ const VirtualizedInfiniteLoader = ({
|
|
|
30
31
|
isItemLoaded: isItemLoaded,
|
|
31
32
|
itemCount: itemCount,
|
|
32
33
|
loadMoreItems: loadMore
|
|
33
|
-
}, void 0,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
34
|
+
}, void 0, _ref2 => {
|
|
35
|
+
let {
|
|
36
|
+
onItemsRendered,
|
|
37
|
+
ref
|
|
38
|
+
} = _ref2;
|
|
39
|
+
return /*#__PURE__*/jsx(VariableSizeList, {
|
|
40
|
+
className: "List",
|
|
41
|
+
height: height,
|
|
42
|
+
itemCount: itemCount,
|
|
43
|
+
itemSize: getItemSize,
|
|
44
|
+
onItemsRendered: onItemsRendered,
|
|
45
|
+
ref: ref,
|
|
46
|
+
width: "100%",
|
|
47
|
+
children: Row
|
|
48
|
+
});
|
|
49
|
+
}), moreItemsLoading && /*#__PURE__*/_jsx("div", {
|
|
46
50
|
style: {
|
|
47
51
|
position: 'absolute',
|
|
48
52
|
bottom: 0,
|
|
@@ -52,6 +56,29 @@ const VirtualizedInfiniteLoader = ({
|
|
|
52
56
|
}, void 0, "Loading"));
|
|
53
57
|
};
|
|
54
58
|
|
|
59
|
+
const listProps = {
|
|
60
|
+
/** Function responsible for tracking the loaded state of each item. */
|
|
61
|
+
isItemLoaded: PropTypes.bool.description('Function responsible for tracking the loaded state of each item.'),
|
|
62
|
+
|
|
63
|
+
/** Callback to be invoked when more rows must be loaded. It should return a Promise that is resolved once all data has finished loading. */
|
|
64
|
+
loadMoreItems: PropTypes.func.description('Callback to be invoked when more rows must be loaded. It should return a Promise that is resolved once all data has finished loading.'),
|
|
65
|
+
|
|
66
|
+
/** callback to get row item size */
|
|
67
|
+
getItemSize: PropTypes.func.description('callback to get row item size'),
|
|
68
|
+
|
|
69
|
+
/** height for the list */
|
|
70
|
+
height: PropTypes.number.description('height for the list'),
|
|
71
|
+
|
|
72
|
+
/** flag to know if virtual list should be on loading state */
|
|
73
|
+
moreItemsLoading: PropTypes.bool.description('flag to know if virtual list s'),
|
|
74
|
+
|
|
75
|
+
/** Row item to render */
|
|
76
|
+
item: PropTypes.element.description('Row item to render'),
|
|
77
|
+
|
|
78
|
+
/** flag for virtualized list */
|
|
79
|
+
hasNextPage: PropTypes.bool.description('flag for virtualized list')
|
|
80
|
+
};
|
|
55
81
|
const VirtualizedInfiniteLoaderWithSchema = describe(VirtualizedInfiniteLoader);
|
|
82
|
+
VirtualizedInfiniteLoaderWithSchema.propTypes = listProps;
|
|
56
83
|
|
|
57
84
|
export { VirtualizedInfiniteLoader, VirtualizedInfiniteLoaderWithSchema };
|
package/esm/LoadingPage/Page.js
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
2
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
3
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.constructor.js';
|
|
5
|
+
import 'core-js/modules/esnext.async-iterator.to-array.js';
|
|
6
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
7
|
+
import 'core-js/modules/esnext.iterator.to-array.js';
|
|
8
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
9
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
10
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
11
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
4
12
|
import React, { useState, useRef, useEffect } from 'react';
|
|
5
13
|
import { withTheme } from '@elliemae/ds-system';
|
|
6
14
|
import { get } from 'lodash';
|
|
7
15
|
import styled from 'styled-components';
|
|
8
|
-
import Backdrop from '@elliemae/ds-
|
|
16
|
+
import Backdrop from '@elliemae/ds-backdrop';
|
|
9
17
|
import { jsxs, Fragment } from 'react/jsx-runtime';
|
|
10
18
|
|
|
11
19
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -13,18 +21,22 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
13
21
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
14
22
|
const LoadingPageLoader = /*#__PURE__*/styled.div.withConfig({
|
|
15
23
|
componentId: "sc-wx0z8k-0"
|
|
16
|
-
})(["", ";z-index:", ";top:25%;left:15%;width:70%;height:75%;display:flex;flex-direction:column;align-items:center;"],
|
|
17
|
-
|
|
18
|
-
|
|
24
|
+
})(["", ";z-index:", ";top:25%;left:15%;width:70%;height:75%;display:flex;flex-direction:column;align-items:center;"], _ref => {
|
|
25
|
+
let {
|
|
26
|
+
type
|
|
27
|
+
} = _ref;
|
|
28
|
+
return type === 'cover' ? 'position: fixed' : 'position: absolute';
|
|
29
|
+
}, props => props.zIndex);
|
|
19
30
|
|
|
20
|
-
const LoadingPage =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
31
|
+
const LoadingPage = _ref2 => {
|
|
32
|
+
let {
|
|
33
|
+
backdropZIndex,
|
|
34
|
+
children,
|
|
35
|
+
loader,
|
|
36
|
+
loading,
|
|
37
|
+
type = 'fill',
|
|
38
|
+
zIndex = 1
|
|
39
|
+
} = _ref2;
|
|
28
40
|
const [position, setPosition] = useState(null);
|
|
29
41
|
const childRef = useRef(null);
|
|
30
42
|
useEffect(() => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import 'react';
|
|
3
3
|
import { PropTypes, describe } from 'react-desc';
|
|
4
|
-
import { Grid } from '@elliemae/ds-
|
|
4
|
+
import { Grid } from '@elliemae/ds-grid';
|
|
5
5
|
import styled from 'styled-components';
|
|
6
6
|
import { withTheme } from '@elliemae/ds-system';
|
|
7
7
|
export { default as ToolbarItem } from './MobileActionToolbarItem.js';
|
|
@@ -10,11 +10,12 @@ const ToolStrip = /*#__PURE__*/styled(Grid).withConfig({
|
|
|
10
10
|
componentId: "sc-162vd15-0"
|
|
11
11
|
})(["display:flex;justify-content:space-around;align-items:center;background-color:", ";"], props => props.theme.colors.neutral['000']);
|
|
12
12
|
|
|
13
|
-
const Toolbar =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
const Toolbar = _ref => {
|
|
14
|
+
let {
|
|
15
|
+
withDepth = true,
|
|
16
|
+
buttons = [],
|
|
17
|
+
theme
|
|
18
|
+
} = _ref;
|
|
18
19
|
const rows = [1];
|
|
19
20
|
const toolbarHeight = theme.space.m;
|
|
20
21
|
const borderStyle = withDepth ? {
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
1
6
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
7
|
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
3
8
|
import React from 'react';
|
|
4
9
|
import { PropTypes, describe } from 'react-desc';
|
|
5
|
-
import DSButton from '@elliemae/ds-
|
|
10
|
+
import DSButton from '@elliemae/ds-button';
|
|
6
11
|
import { jsx } from 'react/jsx-runtime';
|
|
7
12
|
|
|
8
13
|
const _excluded = ["icon"];
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
1
6
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
7
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
8
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
4
9
|
import { useRef, useState, useEffect, useLayoutEffect } from 'react';
|
|
5
|
-
import CloseX from '@elliemae/ds-icons
|
|
10
|
+
import { CloseX } from '@elliemae/ds-icons';
|
|
6
11
|
import { describe } from 'react-desc';
|
|
7
12
|
import { icons } from './utils/icons.js';
|
|
8
13
|
import { propTypes } from './propTypes.js';
|
|
@@ -16,19 +21,20 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
16
21
|
|
|
17
22
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
18
23
|
|
|
19
|
-
const DSMobileBanner =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
const DSMobileBanner = _ref => {
|
|
25
|
+
let {
|
|
26
|
+
type,
|
|
27
|
+
isOpen,
|
|
28
|
+
closeButtonOnClick,
|
|
29
|
+
label,
|
|
30
|
+
body,
|
|
31
|
+
actionLinkLabel,
|
|
32
|
+
actionLinkHref,
|
|
33
|
+
actionLinkOnClick,
|
|
34
|
+
showCloseButton,
|
|
35
|
+
containerProps,
|
|
36
|
+
focusOnOpen
|
|
37
|
+
} = _ref;
|
|
32
38
|
const innerContainerRef = useRef(null);
|
|
33
39
|
const closeRef = useRef(null);
|
|
34
40
|
const [current, setCurrent] = useState(isOpen);
|
|
@@ -1,87 +1,156 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
import { toMobile } from '@elliemae/ds-system';
|
|
3
|
-
import DSButton from '@elliemae/ds-
|
|
3
|
+
import DSButton from '@elliemae/ds-button';
|
|
4
4
|
import { handleBorderColor, handleAnimation } from './utils/styleHelpers.js';
|
|
5
5
|
|
|
6
6
|
const StyledInnerContainer = /*#__PURE__*/styled.div.withConfig({
|
|
7
7
|
componentId: "sc-4jnp92-0"
|
|
8
|
-
})(["display:flex;min-height:68px;width:100%;background-color:", ";border-bottom:4px solid ", ";transform:translateY(", ");", ";"],
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
theme
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
})(["display:flex;min-height:68px;width:100%;background-color:", ";border-bottom:4px solid ", ";transform:translateY(", ");", ";"], _ref => {
|
|
9
|
+
let {
|
|
10
|
+
theme
|
|
11
|
+
} = _ref;
|
|
12
|
+
return theme.colors.neutral['000'];
|
|
13
|
+
}, _ref2 => {
|
|
14
|
+
let {
|
|
15
|
+
type,
|
|
16
|
+
theme
|
|
17
|
+
} = _ref2;
|
|
18
|
+
return handleBorderColor(type, theme);
|
|
19
|
+
}, _ref3 => {
|
|
20
|
+
let {
|
|
21
|
+
isOpen
|
|
22
|
+
} = _ref3;
|
|
23
|
+
return isOpen ? '0' : '-100%';
|
|
24
|
+
}, _ref4 => {
|
|
25
|
+
let {
|
|
26
|
+
isAnimating,
|
|
27
|
+
isOpen
|
|
28
|
+
} = _ref4;
|
|
29
|
+
return handleAnimation(isAnimating, isOpen);
|
|
30
|
+
});
|
|
19
31
|
const StyledTextContent = /*#__PURE__*/styled.div.withConfig({
|
|
20
32
|
componentId: "sc-4jnp92-1"
|
|
21
33
|
})(["width:100%;"]);
|
|
22
34
|
const StyledTitle = /*#__PURE__*/styled.div.withConfig({
|
|
23
35
|
componentId: "sc-4jnp92-2"
|
|
24
|
-
})(["color:", ";font-size:", ";font-weight:", ";margin-bottom:", ";@media not all and (min-resolution:0.001dpcm){@media{-webkit-font-smoothing:subpixel-antialiased;-webkit-text-stroke:0.4px ", ";}}@media screen and (min--moz-device-pixel-ratio:0){-webkit-font-smoothing:subpixel-antialiased;-webkit-text-stroke:0.4px ", ";}"],
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
theme
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
})(["color:", ";font-size:", ";font-weight:", ";margin-bottom:", ";@media not all and (min-resolution:0.001dpcm){@media{-webkit-font-smoothing:subpixel-antialiased;-webkit-text-stroke:0.4px ", ";}}@media screen and (min--moz-device-pixel-ratio:0){-webkit-font-smoothing:subpixel-antialiased;-webkit-text-stroke:0.4px ", ";}"], _ref5 => {
|
|
37
|
+
let {
|
|
38
|
+
theme
|
|
39
|
+
} = _ref5;
|
|
40
|
+
return theme.colors.neutral[700];
|
|
41
|
+
}, _ref6 => {
|
|
42
|
+
let {
|
|
43
|
+
theme
|
|
44
|
+
} = _ref6;
|
|
45
|
+
return toMobile(theme.fontSizes.title[700]);
|
|
46
|
+
}, _ref7 => {
|
|
47
|
+
let {
|
|
48
|
+
theme
|
|
49
|
+
} = _ref7;
|
|
50
|
+
return theme.fontWeights.semibold;
|
|
51
|
+
}, _ref8 => {
|
|
52
|
+
let {
|
|
53
|
+
theme
|
|
54
|
+
} = _ref8;
|
|
55
|
+
return theme.space.xxs;
|
|
56
|
+
}, _ref9 => {
|
|
57
|
+
let {
|
|
58
|
+
theme
|
|
59
|
+
} = _ref9;
|
|
60
|
+
return theme.colors.neutral[700];
|
|
61
|
+
}, _ref10 => {
|
|
62
|
+
let {
|
|
63
|
+
theme
|
|
64
|
+
} = _ref10;
|
|
65
|
+
return theme.colors.neutral[700];
|
|
66
|
+
});
|
|
37
67
|
const StyledSubTitle = /*#__PURE__*/styled.div.withConfig({
|
|
38
68
|
componentId: "sc-4jnp92-3"
|
|
39
|
-
})(["font-size:", ";font-weight:", ";"],
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
69
|
+
})(["font-size:", ";font-weight:", ";"], _ref11 => {
|
|
70
|
+
let {
|
|
71
|
+
theme
|
|
72
|
+
} = _ref11;
|
|
73
|
+
return toMobile(theme.fontSizes.title[600]);
|
|
74
|
+
}, _ref12 => {
|
|
75
|
+
let {
|
|
76
|
+
theme
|
|
77
|
+
} = _ref12;
|
|
78
|
+
return theme.fontWeights.regular;
|
|
79
|
+
});
|
|
44
80
|
const StyledIconContainer = /*#__PURE__*/styled.div.withConfig({
|
|
45
81
|
componentId: "sc-4jnp92-4"
|
|
46
|
-
})(["margin-top:10px;margin-right:", ";margin-left:", ";"],
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
82
|
+
})(["margin-top:10px;margin-right:", ";margin-left:", ";"], _ref13 => {
|
|
83
|
+
let {
|
|
84
|
+
theme
|
|
85
|
+
} = _ref13;
|
|
86
|
+
return theme.space.xxs;
|
|
87
|
+
}, _ref14 => {
|
|
88
|
+
let {
|
|
89
|
+
theme
|
|
90
|
+
} = _ref14;
|
|
91
|
+
return theme.space.xs;
|
|
92
|
+
});
|
|
51
93
|
const StyledContent = /*#__PURE__*/styled.div.withConfig({
|
|
52
94
|
componentId: "sc-4jnp92-5"
|
|
53
|
-
})(["width:100%;display:flex;flex-direction:column;margin:", " 0;margin-right:", ";"],
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
95
|
+
})(["width:100%;display:flex;flex-direction:column;margin:", " 0;margin-right:", ";"], _ref15 => {
|
|
96
|
+
let {
|
|
97
|
+
theme
|
|
98
|
+
} = _ref15;
|
|
99
|
+
return theme.space.xxs2;
|
|
100
|
+
}, _ref16 => {
|
|
101
|
+
let {
|
|
102
|
+
showCloseButton
|
|
103
|
+
} = _ref16;
|
|
104
|
+
return !showCloseButton ? '28px' : '0';
|
|
105
|
+
});
|
|
58
106
|
const StyledCloseButtonContainer = /*#__PURE__*/styled.div.withConfig({
|
|
59
107
|
componentId: "sc-4jnp92-6"
|
|
60
108
|
})(["display:flex;align-items:flex-start;margin-top:6px;margin-right:6px;"]);
|
|
61
109
|
const StyledCloseButton = /*#__PURE__*/styled(DSButton).withConfig({
|
|
62
110
|
componentId: "sc-4jnp92-7"
|
|
63
|
-
})(["position:relative;&:focus{&:after{display:block;content:' ';position:absolute;top:0;left:0;width:100%;height:100%;border:2px solid ", ";border-radius:2px;pointer-events:none;}}"],
|
|
64
|
-
|
|
65
|
-
|
|
111
|
+
})(["position:relative;&:focus{&:after{display:block;content:' ';position:absolute;top:0;left:0;width:100%;height:100%;border:2px solid ", ";border-radius:2px;pointer-events:none;}}"], _ref17 => {
|
|
112
|
+
let {
|
|
113
|
+
theme
|
|
114
|
+
} = _ref17;
|
|
115
|
+
return theme.colors.brand[700];
|
|
116
|
+
});
|
|
66
117
|
const StyledActionLink = /*#__PURE__*/styled.a.withConfig({
|
|
67
118
|
componentId: "sc-4jnp92-8"
|
|
68
|
-
})(["text-decoration:none;float:right;margin-left:", ";line-height:1.1;font-size:", ";font-weight:", ";color:", ";"],
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
119
|
+
})(["text-decoration:none;float:right;margin-left:", ";line-height:1.1;font-size:", ";font-weight:", ";color:", ";"], _ref18 => {
|
|
120
|
+
let {
|
|
121
|
+
theme
|
|
122
|
+
} = _ref18;
|
|
123
|
+
return theme.space.xs;
|
|
124
|
+
}, _ref19 => {
|
|
125
|
+
let {
|
|
126
|
+
theme
|
|
127
|
+
} = _ref19;
|
|
128
|
+
return toMobile(theme.fontSizes.title[600]);
|
|
129
|
+
}, _ref20 => {
|
|
130
|
+
let {
|
|
131
|
+
theme
|
|
132
|
+
} = _ref20;
|
|
133
|
+
return theme.fontWeights.regular;
|
|
134
|
+
}, _ref21 => {
|
|
135
|
+
let {
|
|
136
|
+
theme
|
|
137
|
+
} = _ref21;
|
|
138
|
+
return theme.colors.brand[600];
|
|
139
|
+
});
|
|
77
140
|
const StyledBannerContainer = /*#__PURE__*/styled.div.withConfig({
|
|
78
141
|
componentId: "sc-4jnp92-9"
|
|
79
|
-
})(["overflow:hidden;height:", ";", ";"],
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
isOpen
|
|
84
|
-
|
|
85
|
-
|
|
142
|
+
})(["overflow:hidden;height:", ";", ";"], _ref22 => {
|
|
143
|
+
let {
|
|
144
|
+
isOpen
|
|
145
|
+
} = _ref22;
|
|
146
|
+
return isOpen ? 'auto' : '0px';
|
|
147
|
+
}, _ref23 => {
|
|
148
|
+
let {
|
|
149
|
+
isAnimating,
|
|
150
|
+
isOpen,
|
|
151
|
+
height
|
|
152
|
+
} = _ref23;
|
|
153
|
+
return handleAnimation(isAnimating, isOpen, height);
|
|
154
|
+
});
|
|
86
155
|
|
|
87
156
|
export { StyledActionLink, StyledBannerContainer, StyledCloseButton, StyledCloseButtonContainer, StyledContent, StyledIconContainer, StyledInnerContainer, StyledSubTitle, StyledTextContent, StyledTitle };
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import 'react';
|
|
3
|
-
import SuccessFill from '@elliemae/ds-icons
|
|
4
|
-
import InfoFill from '@elliemae/ds-icons/InfoFill';
|
|
5
|
-
import AlertsDetailFill from '@elliemae/ds-icons/AlertsDetailFill';
|
|
6
|
-
import WarningSquare from '@elliemae/ds-icons/WarningSquare';
|
|
3
|
+
import { SuccessFill, InfoFill, AlertsDetailFill, WarningSquare } from '@elliemae/ds-icons';
|
|
7
4
|
|
|
8
5
|
const icons = {
|
|
9
6
|
success: /*#__PURE__*/_jsx(SuccessFill, {
|
|
@@ -7,9 +7,11 @@ const slideIn = kfrm(_templateObject || (_templateObject = _taggedTemplateLitera
|
|
|
7
7
|
const slideOut = kfrm(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n 0% {\n transform: translate3d(0, 0, 0);\n opacity: 1;\n }\n 60% {\n opacity: 0;\n }\n 100% {\n opacity: 0;\n transform: translate3d(0, -100%, 0);\n }\n"])));
|
|
8
8
|
const spanContainer = height => kfrm(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n 0% {\n height: 0px;\n }\n 100% {\n height: ", "px;\n }\n"])), height);
|
|
9
9
|
const shrinkContainer = height => kfrm(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n 0% {\n height: ", "px;\n }\n 100% {\n height: 0px;\n }\n"])), height);
|
|
10
|
-
const handleBorderColor = (type, {
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
const handleBorderColor = (type, _ref) => {
|
|
11
|
+
let {
|
|
12
|
+
colors
|
|
13
|
+
} = _ref;
|
|
14
|
+
|
|
13
15
|
switch (type) {
|
|
14
16
|
case MOBILE_BANNER_TYPES.SUCCESS:
|
|
15
17
|
return colors.success[900];
|
|
@@ -24,7 +26,9 @@ const handleBorderColor = (type, {
|
|
|
24
26
|
return colors.danger[900];
|
|
25
27
|
}
|
|
26
28
|
};
|
|
27
|
-
const handleAnimation = (isAnimating, isOpen
|
|
29
|
+
const handleAnimation = function (isAnimating, isOpen) {
|
|
30
|
+
let height = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
31
|
+
|
|
28
32
|
if (isAnimating) {
|
|
29
33
|
if (isOpen) {
|
|
30
34
|
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n animation: ", " 0.5s ease-in;\n "])), height ? spanContainer(height) : slideIn);
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import 'react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
|
-
import ChevronSmallDown from '@elliemae/ds-icons
|
|
5
|
-
import DSButton from '@elliemae/ds-
|
|
4
|
+
import { ChevronSmallDown } from '@elliemae/ds-icons';
|
|
5
|
+
import DSButton from '@elliemae/ds-button';
|
|
6
6
|
|
|
7
7
|
const Addon = /*#__PURE__*/styled(DSButton).withConfig({
|
|
8
8
|
componentId: "sc-afblfw-0"
|
|
9
9
|
})(["background-color:transparent;padding-right:4px;height:100%;border:none;font-size:12px;font-weight:", ";color:", ";cursor:pointer;&:focus,&::after{background-color:transparent;box-shadow:none !important;border:none !important;}"], props => props.theme.fontWeights.semibold, props => props.theme.colors.brand['700']);
|
|
10
|
-
const ActionAddon =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
const ActionAddon = _ref => {
|
|
11
|
+
let {
|
|
12
|
+
label,
|
|
13
|
+
onClick,
|
|
14
|
+
icon
|
|
15
|
+
} = _ref;
|
|
16
|
+
return /*#__PURE__*/_jsx(Addon, {
|
|
17
|
+
onClick: onClick,
|
|
18
|
+
labelText: label,
|
|
19
|
+
icon: icon || /*#__PURE__*/_jsx(ChevronSmallDown, {
|
|
20
|
+
color: ['brand-primary', 700]
|
|
21
|
+
})
|
|
22
|
+
});
|
|
23
|
+
};
|
|
21
24
|
|
|
22
25
|
export { ActionAddon };
|
package/esm/MobileCard/Card.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.map.js';
|
|
2
4
|
import { useRef } from 'react';
|
|
3
5
|
import { PropTypes, describe } from 'react-desc';
|
|
4
6
|
import styled from 'styled-components';
|
|
5
7
|
import { padding } from 'styled-system';
|
|
6
8
|
import { truncate, toMobile, color, __UNSAFE_SPACE_TO_DIMSUM, border, withTheme, op } from '@elliemae/ds-system';
|
|
7
9
|
import GroupItem from '@elliemae/ds-shared/GroupContext/GroupItem';
|
|
8
|
-
import { Grid } from '@elliemae/ds-
|
|
10
|
+
import { Grid } from '@elliemae/ds-grid';
|
|
9
11
|
import { StyledCard } from './StyledCard.js';
|
|
10
12
|
import { ExpandChevron } from './ExpandChevron.js';
|
|
11
13
|
import { useHeight } from './useHeight.js';
|
|
@@ -34,28 +36,30 @@ const CenterWrap = /*#__PURE__*/styled.div.withConfig({
|
|
|
34
36
|
componentId: "sc-10tpzm8-6"
|
|
35
37
|
})(["display:flex;align-items:center;", ""], truncate());
|
|
36
38
|
|
|
37
|
-
const MobileCard =
|
|
38
|
-
children,
|
|
39
|
-
height = 'm',
|
|
40
|
-
leftAddOn,
|
|
41
|
-
leftProp,
|
|
42
|
-
rightProp,
|
|
43
|
-
subText,
|
|
44
|
-
subIcons,
|
|
45
|
-
details,
|
|
46
|
-
theme,
|
|
47
|
-
expandable = false,
|
|
48
|
-
expandedContent,
|
|
49
|
-
value
|
|
50
|
-
}) => {
|
|
39
|
+
const MobileCard = _ref => {
|
|
51
40
|
var _TitleEllipsis, _SubText;
|
|
52
41
|
|
|
42
|
+
let {
|
|
43
|
+
children,
|
|
44
|
+
height = 'm',
|
|
45
|
+
leftAddOn,
|
|
46
|
+
leftProp,
|
|
47
|
+
rightProp,
|
|
48
|
+
subText,
|
|
49
|
+
subIcons,
|
|
50
|
+
details,
|
|
51
|
+
theme,
|
|
52
|
+
expandable = false,
|
|
53
|
+
expandedContent,
|
|
54
|
+
value
|
|
55
|
+
} = _ref;
|
|
53
56
|
const subTextRef = useRef(null);
|
|
54
57
|
const subTextHeight = useHeight(subTextRef);
|
|
55
58
|
const isJustChildren = !(subText || subIcons || details);
|
|
56
59
|
const halfM = op('/', __UNSAFE_SPACE_TO_DIMSUM(theme.space.m), 2);
|
|
57
60
|
return /*#__PURE__*/_jsx(GroupItem, {
|
|
58
|
-
render: (
|
|
61
|
+
render: function () {
|
|
62
|
+
let context = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
59
63
|
const {
|
|
60
64
|
activeValue,
|
|
61
65
|
onChange
|