@elliemae/ds-mobile 2.0.0-alpha.1 → 2.0.0-alpha.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/Accordion/Accordion.js +5 -13
- package/cjs/Accordion/index.js +5 -13
- package/cjs/CategoryBox/CategoryBox.js +17 -16
- package/cjs/CollectionBox/CollectionBox.js +21 -20
- package/cjs/FullPageContainer/FullPageContainer.js +9 -4
- package/cjs/FullPageContainer/FullPageContainerScroll.js +9 -4
- package/cjs/FullPageContainer/useMobileHeight.js +1 -0
- package/cjs/GlobalHeader/MobileGlobalHeader.js +34 -29
- package/cjs/GlobalHeader/styles.js +11 -17
- package/cjs/GroupBox/GroupBox.js +18 -17
- package/cjs/Icons/EM_logo.js +4 -4
- package/cjs/InfiniteLoader/Infiniteloader.js +12 -10
- package/cjs/InfiniteLoader/Loader.js +12 -9
- package/cjs/InfiniteLoader/VirtualizedInfiniteLoader.js +52 -24
- package/cjs/InfiniteLoader/styled.js +1 -1
- package/cjs/LoadingPage/Page.js +32 -19
- package/cjs/LoadingPage/index.js +1 -1
- package/cjs/MobileActionToolbar/MobileActionToolbar.js +11 -10
- package/cjs/MobileActionToolbar/MobileActionToolbarItem.js +11 -6
- package/cjs/MobileActionToolbar/index.js +2 -2
- package/cjs/MobileBanner/MobileBanner.js +27 -21
- package/cjs/MobileBanner/styles.js +139 -70
- package/cjs/MobileBanner/utils/icons.js +5 -10
- package/cjs/MobileBanner/utils/styleHelpers.js +20 -47
- package/cjs/MobileCard/ActionAddon.js +17 -15
- package/cjs/MobileCard/Card.js +51 -98
- package/cjs/MobileCard/CardIcons.js +21 -16
- package/cjs/MobileCard/ExpandChevron.js +11 -13
- package/cjs/MobileCard/ExpandableRegion.js +10 -10
- package/cjs/MobileCard/Group.js +29 -23
- package/cjs/MobileCard/StyledCard.js +1 -1
- package/cjs/MobileCard/index.js +3 -3
- package/cjs/MobileCard/props.js +62 -0
- package/cjs/MobileCard/useHeight.js +1 -0
- package/cjs/MobileContextMenu/MobileContextMenu.js +53 -45
- package/cjs/MobileContextMenu/MobileContextMenuGroup.js +37 -27
- package/cjs/MobileContextMenu/MobileContextMenuItem.js +40 -46
- package/cjs/MobileDatePicker/Input.js +8 -3
- package/cjs/MobileDatePicker/MobileDatePicker.js +18 -19
- package/cjs/MobileDropdownMenu/MobileDropdownInput.js +31 -21
- package/cjs/MobileDropdownMenu/MobileDropdownMenu.js +26 -22
- package/cjs/MobileEmtpyState/MobileEmptyState.js +12 -10
- package/cjs/MobileEmtpyState/index.js +1 -1
- package/cjs/MobileFilterbar/Filterbar.js +15 -12
- package/cjs/MobileFilterbar/FilterbarItem.js +15 -12
- package/cjs/MobileFilterbar/FilterbarSort.js +18 -15
- package/cjs/MobileFooter/Action.js +28 -25
- package/cjs/MobileFooter/Footer.js +20 -13
- package/cjs/MobileFooter/Text.js +7 -4
- package/cjs/MobileFooter/index.js +1 -1
- package/cjs/MobileListItem/MobileListItem.js +17 -16
- package/cjs/MobilePageHeader/MobilePageHeader.js +47 -46
- package/cjs/MobileSelectList/MobileSelectList.js +41 -33
- package/cjs/MobileSelectList/styled.js +10 -12
- package/cjs/MobileSeparator/Separator.js +32 -20
- package/cjs/MobileSeparator/index.js +1 -1
- package/cjs/MobileTimePicker/Input.js +8 -3
- package/cjs/MobileTimePicker/MobileTimePicker.js +18 -19
- package/cjs/MobileTimePicker/MobileTimePicker.stories.js +4 -4
- package/cjs/MobileTouchable/MobileTouchable.js +10 -4
- package/cjs/Modal/Modal.js +41 -36
- package/cjs/Modal/styled.js +11 -12
- package/cjs/PageFilter/PageFilter.js +29 -24
- package/cjs/PageForm/PageForm.js +23 -16
- package/cjs/PageList/PageList.js +13 -12
- package/cjs/PageSearch/PageSearch.js +14 -13
- package/cjs/PageSummary/PageSummary.js +34 -21
- package/cjs/PageSummary/Tags.js +16 -10
- package/cjs/SideNav/SideNav.js +50 -41
- package/cjs/SideNav/styles.js +8 -8
- package/cjs/SwipeToRefresh/ProgressIndicator.js +13 -12
- package/cjs/SwipeToRefresh/ProgressLoader.js +37 -37
- package/cjs/SwipeToRefresh/SwipeToRefresh.js +13 -12
- package/cjs/SwipeToRefresh/styled.js +5 -5
- package/cjs/SwipeToRefresh/useSwipe.js +6 -4
- package/cjs/Tabs/index.js +19 -8
- package/cjs/Tabs/propTypes.js +28 -0
- package/cjs/index.js +13 -15
- package/esm/Accordion/Accordion.js +1 -1
- package/esm/Accordion/index.js +1 -1
- package/esm/CategoryBox/CategoryBox.js +11 -10
- package/esm/CollectionBox/CollectionBox.js +10 -9
- package/esm/FullPageContainer/FullPageContainer.js +6 -1
- package/esm/FullPageContainer/FullPageContainerScroll.js +6 -1
- package/esm/FullPageContainer/useMobileHeight.js +1 -0
- package/esm/GlobalHeader/MobileGlobalHeader.js +21 -14
- package/esm/GlobalHeader/styles.js +4 -11
- package/esm/GroupBox/GroupBox.js +12 -11
- package/esm/InfiniteLoader/Infiniteloader.js +9 -7
- package/esm/InfiniteLoader/Loader.js +12 -9
- package/esm/InfiniteLoader/VirtualizedInfiniteLoader.js +51 -23
- package/esm/LoadingPage/Page.js +25 -12
- package/esm/MobileActionToolbar/MobileActionToolbar.js +7 -6
- package/esm/MobileActionToolbar/MobileActionToolbarItem.js +6 -1
- package/esm/MobileBanner/MobileBanner.js +21 -14
- package/esm/MobileBanner/styles.js +129 -60
- package/esm/MobileBanner/utils/icons.js +2 -4
- package/esm/MobileBanner/utils/styleHelpers.js +16 -47
- package/esm/MobileCard/ActionAddon.js +16 -13
- package/esm/MobileCard/Card.js +29 -76
- package/esm/MobileCard/CardIcons.js +20 -15
- package/esm/MobileCard/ExpandChevron.js +8 -8
- package/esm/MobileCard/ExpandableRegion.js +7 -7
- package/esm/MobileCard/Group.js +21 -15
- package/esm/MobileCard/props.js +58 -0
- package/esm/MobileCard/useHeight.js +1 -0
- package/esm/MobileContextMenu/MobileContextMenu.js +39 -31
- package/esm/MobileContextMenu/MobileContextMenuGroup.js +35 -25
- package/esm/MobileContextMenu/MobileContextMenuItem.js +26 -30
- package/esm/MobileDatePicker/Input.js +5 -0
- package/esm/MobileDatePicker/MobileDatePicker.js +13 -12
- package/esm/MobileDropdownMenu/MobileDropdownInput.js +27 -16
- package/esm/MobileDropdownMenu/MobileDropdownMenu.js +21 -17
- 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 +14 -7
- package/esm/MobileFooter/Text.js +6 -3
- package/esm/MobileListItem/MobileListItem.js +11 -10
- package/esm/MobilePageHeader/MobilePageHeader.js +19 -17
- package/esm/MobileSelectList/MobileSelectList.js +28 -19
- 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 +13 -12
- package/esm/MobileTimePicker/MobileTimePicker.stories.js +1 -1
- package/esm/MobileTouchable/MobileTouchable.js +7 -1
- package/esm/Modal/Modal.js +27 -21
- package/esm/Modal/styled.js +4 -6
- 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 +39 -29
- package/esm/SwipeToRefresh/ProgressIndicator.js +9 -8
- package/esm/SwipeToRefresh/SwipeToRefresh.js +9 -8
- package/esm/SwipeToRefresh/styled.js +1 -1
- package/esm/SwipeToRefresh/useSwipe.js +6 -4
- package/esm/Tabs/index.js +13 -4
- package/esm/Tabs/propTypes.js +23 -0
- package/esm/index.js +5 -4
- package/package.json +35 -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 +20 -13
- package/types/MobileCard/ExpandableRegion.d.ts +2 -2
- package/types/MobileCard/Group.d.ts +18 -8
- package/types/MobileCard/StyledCard.d.ts +3 -1
- package/types/MobileCard/index.d.ts +13 -12
- package/types/MobileCard/props.d.ts +118 -0
- 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/MobileTimePicker/MobileTimePicker.stories.d.ts +1 -0
- 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/Tabs/index.d.ts +24 -9
- package/types/Tabs/propTypes.d.ts +42 -0
- package/types/index.d.ts +5 -1
- package/cjs/package.json +0 -7
- package/esm/package.json +0 -7
|
@@ -3,31 +3,36 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
+
require('core-js/modules/esnext.async-iterator.map.js');
|
|
7
|
+
require('core-js/modules/esnext.iterator.map.js');
|
|
6
8
|
require('react');
|
|
7
9
|
var styled = require('styled-components');
|
|
8
|
-
var
|
|
10
|
+
var dsGrid = require('@elliemae/ds-grid');
|
|
9
11
|
|
|
10
12
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
13
|
|
|
12
14
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
13
15
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
14
16
|
|
|
15
|
-
const CardIconsWrapper = /*#__PURE__*/styled__default[
|
|
17
|
+
const CardIconsWrapper = /*#__PURE__*/styled__default["default"](dsGrid.Grid).withConfig({
|
|
16
18
|
componentId: "sc-1vqygz1-0"
|
|
17
19
|
})(["align-items:center;span,svg{width:12px !important;height:12px !important;}span.icon-color-muted svg,svg:not([fill]){fill:", ";height:12px !important;width:12px !important;& *{fill:", ";}}span.icon-color-warn svg,svg:not([fill]){fill:", ";height:12px !important;width:12px !important;& *{fill:", ";}}span.icon-color-error svg,svg:not([fill]){fill:", ";height:12px !important;width:12px !important;& *{fill:", ";}}span.icon-color-success svg,svg:not([fill]){fill:", ";height:12px !important;width:12px !important;& *{fill:", ";}}span.icon-color-primary svg,svg:not([fill]){fill:", ";}span.icon-color-primary svg,svg:not([fill]){fill:", ";}"], props => props.theme.colors.neutral['600'], props => props.theme.colors.neutral['600'], props => props.theme.colors.warning['600'], props => props.theme.colors.warning['600'], props => props.theme.colors.danger['900'], props => props.theme.colors.danger['900'], props => props.theme.colors.success['900'], props => props.theme.colors.success['900'], props => props.theme.colors.brand[600], props => props.theme.colors.brand[600]);
|
|
18
|
-
const SubIcons =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
20
|
+
const SubIcons = _ref => {
|
|
21
|
+
let {
|
|
22
|
+
icons = [],
|
|
23
|
+
colors = []
|
|
24
|
+
} = _ref;
|
|
25
|
+
return /*#__PURE__*/_jsx__default["default"](CardIconsWrapper, {
|
|
26
|
+
cols: icons.map(() => '12px'),
|
|
27
|
+
gutter: "6px",
|
|
28
|
+
height: "14px",
|
|
29
|
+
"data-testid": "card-subIcons"
|
|
30
|
+
}, void 0, icons.map((Icon, i) =>
|
|
31
|
+
/*#__PURE__*/
|
|
32
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
33
|
+
_jsx__default["default"](Icon, {
|
|
34
|
+
className: "icon-color-".concat(colors[i] || 'muted')
|
|
35
|
+
}, i)));
|
|
36
|
+
};
|
|
32
37
|
|
|
33
38
|
exports.SubIcons = SubIcons;
|
|
@@ -5,29 +5,27 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
6
|
require('react');
|
|
7
7
|
var styled = require('styled-components');
|
|
8
|
-
var
|
|
9
|
-
var ChevronRight = require('@elliemae/ds-icons/ChevronRight');
|
|
8
|
+
var dsIcons = require('@elliemae/ds-icons');
|
|
10
9
|
|
|
11
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
11
|
|
|
13
12
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
14
13
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
15
|
-
var ChevronDownIcon__default = /*#__PURE__*/_interopDefaultLegacy(ChevronDownIcon);
|
|
16
|
-
var ChevronRight__default = /*#__PURE__*/_interopDefaultLegacy(ChevronRight);
|
|
17
14
|
|
|
18
|
-
const ChevronWrap = /*#__PURE__*/styled__default[
|
|
15
|
+
const ChevronWrap = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
19
16
|
componentId: "sc-1l0ask2-0"
|
|
20
17
|
})(["margin-top:", ";align-self:", ";margin-left:", ";"], props => props.align === 'top' ? '18px' : '0', props => props.align === 'top' ? 'flex-start' : 'center', props => props.theme.space.xs);
|
|
21
|
-
const ExpandChevron =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
const ExpandChevron = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
isExpanded,
|
|
21
|
+
onClick,
|
|
22
|
+
align
|
|
23
|
+
} = _ref;
|
|
24
|
+
const Chevron = isExpanded ? dsIcons.ChevronDown : dsIcons.ChevronRight;
|
|
25
|
+
return /*#__PURE__*/_jsx__default["default"](ChevronWrap, {
|
|
28
26
|
"data-testid": "ds-card-expand-chevron",
|
|
29
27
|
align: align
|
|
30
|
-
}, void 0, /*#__PURE__*/_jsx__default[
|
|
28
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](Chevron, {
|
|
31
29
|
size: "s",
|
|
32
30
|
color: ['brand-primary', 800],
|
|
33
31
|
onClick: onClick
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
6
7
|
var React = require('react');
|
|
7
8
|
var styled = require('styled-components');
|
|
8
9
|
var dsSystem = require('@elliemae/ds-system');
|
|
@@ -13,20 +14,19 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
13
14
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
14
15
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
15
16
|
|
|
16
|
-
const RegionWrapper = /*#__PURE__*/styled__default[
|
|
17
|
+
const RegionWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
17
18
|
componentId: "sc-mduzz9-0"
|
|
18
19
|
})(["width:100%;height:100%;"]);
|
|
19
|
-
const Region = /*#__PURE__*/styled__default[
|
|
20
|
+
const Region = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
20
21
|
componentId: "sc-mduzz9-1"
|
|
21
|
-
})(["display:flex;", " transition:max-height ", " linear;max-height:0;", " align-items:center;", ";border-top:", ";font-weight:", ";"], props => props.hide ? 'visibility: hidden;' : '', props => props.animate ? '0.25s' : '0.20s', props => props.animate ?
|
|
22
|
-
|
|
23
|
-
` : '', dsSystem.truncate(), props => dsSystem.border(props.theme.colors.neutral['300']), props => props.theme.fontWeights.regular);
|
|
24
|
-
const ExpandableRegion = ({
|
|
25
|
-
show,
|
|
26
|
-
content
|
|
27
|
-
}) => {
|
|
22
|
+
})(["display:flex;", " transition:max-height ", " linear;max-height:0;", " align-items:center;", ";border-top:", ";font-weight:", ";"], props => props.hide ? 'visibility: hidden;' : '', props => props.animate ? '0.25s' : '0.20s', props => props.animate ? "\n max-height: ".concat(props.refHeight, "px;\n ") : '', dsSystem.truncate(), props => dsSystem.border(props.theme.colors.neutral['300']), props => props.theme.fontWeights.regular);
|
|
23
|
+
const ExpandableRegion = _ref => {
|
|
28
24
|
var _ref$current;
|
|
29
25
|
|
|
26
|
+
let {
|
|
27
|
+
show,
|
|
28
|
+
content
|
|
29
|
+
} = _ref;
|
|
30
30
|
const ref = React.useRef(null); // triggers transition
|
|
31
31
|
|
|
32
32
|
const [animate, setAnimate] = React.useState(show); // needed to properly handle the transition. Hide after transition ends
|
|
@@ -41,7 +41,7 @@ const ExpandableRegion = ({
|
|
|
41
41
|
if (!show) setHide(true);
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
-
return /*#__PURE__*/_jsx__default[
|
|
44
|
+
return /*#__PURE__*/_jsx__default["default"](Region, {
|
|
45
45
|
hide: hide // needed to handle transition, `auto` max-height isn't supported
|
|
46
46
|
,
|
|
47
47
|
refHeight: (ref === null || ref === void 0 ? void 0 : (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.scrollHeight) || 9999,
|
package/cjs/MobileCard/Group.js
CHANGED
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
+
require('core-js/modules/esnext.async-iterator.map.js');
|
|
7
|
+
require('core-js/modules/esnext.iterator.map.js');
|
|
6
8
|
var React = require('react');
|
|
7
9
|
var reactDesc = require('react-desc');
|
|
8
10
|
var styled = require('styled-components');
|
|
9
11
|
var Group = require('@elliemae/ds-shared/GroupContext/Group');
|
|
10
|
-
var
|
|
12
|
+
var dsGrid = require('@elliemae/ds-grid');
|
|
11
13
|
var dsSystem = require('@elliemae/ds-system');
|
|
12
14
|
var StyledCard = require('./StyledCard.js');
|
|
13
15
|
|
|
@@ -18,39 +20,43 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
18
20
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
19
21
|
var Group__default = /*#__PURE__*/_interopDefaultLegacy(Group);
|
|
20
22
|
|
|
21
|
-
const GroupGrid = /*#__PURE__*/styled__default[
|
|
23
|
+
const GroupGrid = /*#__PURE__*/styled__default["default"](dsGrid.Grid).withConfig({
|
|
22
24
|
componentId: "sc-17xukaf-0"
|
|
23
|
-
})(["", "{border-top:none;}", ""], StyledCard.StyledCard,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
})(["", "{border-top:none;}", ""], StyledCard.StyledCard, _ref => {
|
|
26
|
+
let {
|
|
27
|
+
theme,
|
|
28
|
+
withTopBorder
|
|
29
|
+
} = _ref;
|
|
30
|
+
return withTopBorder ? "border-top: ".concat(dsSystem.border(theme.colors.neutral['100'])) : '';
|
|
31
|
+
});
|
|
32
|
+
const GroupTitle = /*#__PURE__*/styled__default["default"].span.withConfig({
|
|
28
33
|
componentId: "sc-17xukaf-1"
|
|
29
34
|
})(["", ""], dsSystem.truncate());
|
|
30
|
-
const GroupTitleGrid = /*#__PURE__*/styled__default[
|
|
35
|
+
const GroupTitleGrid = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
31
36
|
componentId: "sc-17xukaf-2"
|
|
32
|
-
})(["display:flex;justify-content:space-between;padding:0 ", ";font-size:", ";", " font-weight:", ";background-color:", ";border-top:", ";line-height:", ";@media (min-width:1024px){background-color:", ";border-top:", ";}"], props => props.theme.space.xs, props =>
|
|
37
|
+
})(["display:flex;justify-content:space-between;padding:0 ", ";font-size:", ";", " font-weight:", ";background-color:", ";border-top:", ";line-height:", ";@media (min-width:1024px){background-color:", ";border-top:", ";}"], props => props.theme.space.xs, props => "calc(".concat(dsSystem.__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.m), " / 2)"), dsSystem.color('neutral', '700'), props => props.theme.fontWeights.semibold, props => props.theme.colors.brand['200'], props => dsSystem.border(props.theme.colors.brand['300']), props => dsSystem.__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.m), props => props.theme.colors.neutral['080'], props => dsSystem.border(props.theme.colors.neutral['080']));
|
|
33
38
|
|
|
34
|
-
const MobileCardGroup =
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
const MobileCardGroup = _ref2 => {
|
|
40
|
+
let {
|
|
41
|
+
children,
|
|
42
|
+
theme,
|
|
43
|
+
title,
|
|
44
|
+
action,
|
|
45
|
+
activeValue,
|
|
46
|
+
allowMultipleOpen = false,
|
|
47
|
+
onChange = () => null
|
|
48
|
+
} = _ref2;
|
|
43
49
|
const rows = !title ? ['auto'] : [dsSystem.__UNSAFE_SPACE_TO_DIMSUM(theme.space.m), 'auto'];
|
|
44
|
-
return /*#__PURE__*/_jsx__default[
|
|
50
|
+
return /*#__PURE__*/_jsx__default["default"](Group__default["default"], {
|
|
45
51
|
activeValue: activeValue,
|
|
46
52
|
multiple: allowMultipleOpen,
|
|
47
53
|
onChange: onChange
|
|
48
|
-
}, void 0, /*#__PURE__*/_jsx__default[
|
|
54
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](GroupGrid, {
|
|
49
55
|
withTopBorder: !title,
|
|
50
56
|
rows: rows
|
|
51
|
-
}, void 0, !!title && /*#__PURE__*/_jsx__default[
|
|
57
|
+
}, void 0, !!title && /*#__PURE__*/_jsx__default["default"](GroupTitleGrid, {
|
|
52
58
|
pl: "xxs"
|
|
53
|
-
}, void 0, /*#__PURE__*/_jsx__default[
|
|
59
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](GroupTitle, {}, void 0, title), action), /*#__PURE__*/_jsx__default["default"](dsGrid.Grid, {}, void 0, React__default["default"].Children.map(children, (child, idx) => /*#__PURE__*/React__default["default"].cloneElement(child, {
|
|
54
60
|
key: idx,
|
|
55
61
|
value: idx,
|
|
56
62
|
idx
|
|
@@ -89,4 +95,4 @@ DSMobileCardGroupWithSchema.propTypes = props;
|
|
|
89
95
|
var MobileGroup = dsSystem.withTheme(MobileCardGroup);
|
|
90
96
|
|
|
91
97
|
exports.DSMobileCardGroupWithSchema = DSMobileCardGroupWithSchema;
|
|
92
|
-
exports[
|
|
98
|
+
exports["default"] = MobileGroup;
|
|
@@ -9,7 +9,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
9
9
|
|
|
10
10
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
11
11
|
|
|
12
|
-
const StyledCard = /*#__PURE__*/styled__default[
|
|
12
|
+
const StyledCard = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
13
13
|
componentId: "sc-28g2t3-0"
|
|
14
14
|
})(["display:flex;align-items:center;height:fit-content;min-height:", ";border:", ";border-bottom:", ";"], props => props.minHeight, props => dsSystem.border(props.theme.colors.neutral['100']), props => dsSystem.border('.5px', props.theme.colors.neutral['500']));
|
|
15
15
|
|
package/cjs/MobileCard/index.js
CHANGED
|
@@ -7,11 +7,11 @@ var Group = require('./Group.js');
|
|
|
7
7
|
var ActionAddon = require('./ActionAddon.js');
|
|
8
8
|
var CardIcons = require('./CardIcons.js');
|
|
9
9
|
|
|
10
|
-
Card[
|
|
11
|
-
const DSMobileCard = Card[
|
|
10
|
+
Card["default"].Group = Group["default"];
|
|
11
|
+
const DSMobileCard = Card["default"];
|
|
12
12
|
|
|
13
13
|
exports.DSMobileCardWithSchema = Card.DSMobileCardWithSchema;
|
|
14
|
-
exports
|
|
14
|
+
exports["default"] = Card["default"];
|
|
15
15
|
exports.DSMobileCardGroupWithSchema = Group.DSMobileCardGroupWithSchema;
|
|
16
16
|
exports.ActionAddon = ActionAddon.ActionAddon;
|
|
17
17
|
exports.SubIcons = CardIcons.SubIcons;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var reactDesc = require('react-desc');
|
|
6
|
+
|
|
7
|
+
const cardPropsTypes = {
|
|
8
|
+
/**
|
|
9
|
+
* card height
|
|
10
|
+
*/
|
|
11
|
+
height: reactDesc.PropTypes.oneOf(['s', 'm']).description('card height'),
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Defines mobile card title
|
|
15
|
+
*/
|
|
16
|
+
children: reactDesc.PropTypes.string.description('Defines mobile card title').isRequired,
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Wheter if the card is expandable or not
|
|
20
|
+
*/
|
|
21
|
+
expandable: reactDesc.PropTypes.bool.description('Wheter if the card is expandable or not'),
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* content to display in expand card section
|
|
25
|
+
*/
|
|
26
|
+
expandedContent: reactDesc.PropTypes.element.description('content to display in expand card section'),
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Icon to the left of the card. Size is adjusted automatically.
|
|
30
|
+
*/
|
|
31
|
+
leftAddOn: reactDesc.PropTypes.element.description('Icon to the left of the card. Size is adjusted automatically.'),
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Pass an element to render left. For example a Button with an icon
|
|
35
|
+
*/
|
|
36
|
+
leftProp: reactDesc.PropTypes.element.description('Pass an element to render left. For example a Button with an icon'),
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Pass an array of 1 or 2 elements to render right. For example a Button with an icon
|
|
40
|
+
*/
|
|
41
|
+
rightProp: reactDesc.PropTypes.arrayOf(reactDesc.PropTypes.element).description('Pass an array of 1 or 2 elements to render right. For example a Button with an icon'),
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Pass an array of 1 or 2 strings
|
|
45
|
+
*/
|
|
46
|
+
subText: reactDesc.PropTypes.arrayOf(reactDesc.PropTypes.string).description('Pass an array of 1 or 2 strings'),
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* SubIcons component
|
|
50
|
+
*/
|
|
51
|
+
subIcons: reactDesc.PropTypes.element.description('SubIcons component'),
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Pass an array of 1, 2 or 3 strings
|
|
55
|
+
*/
|
|
56
|
+
details: reactDesc.PropTypes.arrayOf(reactDesc.PropTypes.string).description('Pass an array of 1, 2 or 3 strings'),
|
|
57
|
+
theme: reactDesc.PropTypes.object.description('').isRequired,
|
|
58
|
+
value: reactDesc.PropTypes.number.description(''),
|
|
59
|
+
cardContent: reactDesc.PropTypes.node.description('JSX content for the card')
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
exports.cardPropsTypes = cardPropsTypes;
|
|
@@ -4,12 +4,20 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
6
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
7
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
8
|
+
require('core-js/modules/esnext.async-iterator.map.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.map.js');
|
|
10
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
11
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
12
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
13
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
14
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
7
15
|
var React = require('react');
|
|
8
16
|
var lodash = require('lodash');
|
|
9
17
|
var reactDesc = require('react-desc');
|
|
10
18
|
var styled = require('styled-components');
|
|
11
|
-
var
|
|
12
|
-
var
|
|
19
|
+
var dsGrid = require('@elliemae/ds-grid');
|
|
20
|
+
var Backdrop = require('@elliemae/ds-backdrop');
|
|
13
21
|
var dsSystem = require('@elliemae/ds-system');
|
|
14
22
|
var Group = require('@elliemae/ds-shared/GroupContext/Group');
|
|
15
23
|
var MobileContextMenuGroup = require('./MobileContextMenuGroup.js');
|
|
@@ -27,46 +35,46 @@ var _ContextMenuGroup;
|
|
|
27
35
|
|
|
28
36
|
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; }
|
|
29
37
|
|
|
30
|
-
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__default[
|
|
31
|
-
const StyledContainer = /*#__PURE__*/styled__default[
|
|
38
|
+
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__default["default"](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; }
|
|
39
|
+
const StyledContainer = /*#__PURE__*/styled__default["default"](dsGrid.Grid).withConfig({
|
|
32
40
|
componentId: "sc-15ys5tq-0"
|
|
33
|
-
})(["background:", ";z-index:", ";width:", ";position:fixed;bottom:0;left:", ";max-height:90vh;border-top-left-radius:5px;border-top-right-radius:5px;box-shadow:0 0px 24px 0 rgba(0,0,0,0.5),0 0px 11px 0 rgba(0,0,0,0.5);"], props => props.theme.colors.neutral['000'], props => props.zIndex, props =>
|
|
34
|
-
const StyledTitle = /*#__PURE__*/styled__default[
|
|
41
|
+
})(["background:", ";z-index:", ";width:", ";position:fixed;bottom:0;left:", ";max-height:90vh;border-top-left-radius:5px;border-top-right-radius:5px;box-shadow:0 0px 24px 0 rgba(0,0,0,0.5),0 0px 11px 0 rgba(0,0,0,0.5);"], props => props.theme.colors.neutral['000'], props => props.zIndex, props => "calc(100% - ".concat(props.theme.space.xs, ")"), props => props.theme.space.xxs);
|
|
42
|
+
const StyledTitle = /*#__PURE__*/styled__default["default"](dsGrid.Grid).withConfig({
|
|
35
43
|
componentId: "sc-15ys5tq-1"
|
|
36
44
|
})(["font-size:16px;font-weight:", ";color:", ";", " & > span{height:20px;width:20px;}& > span > svg,svg:not([fill]){height:20px;width:20px;fill:", ";}"], props => props.theme.fontWeights.semibold, props => props.theme.colors.neutral['000'], dsSystem.truncate(), props => props.theme.colors.neutral['000']);
|
|
37
|
-
const HeaderContainer = /*#__PURE__*/styled__default[
|
|
45
|
+
const HeaderContainer = /*#__PURE__*/styled__default["default"](dsGrid.Grid).withConfig({
|
|
38
46
|
componentId: "sc-15ys5tq-2"
|
|
39
47
|
})(["border-top-left-radius:5px;border-top-right-radius:5px;background:", ";"], props => props.theme.colors.brand['600']);
|
|
40
48
|
|
|
41
49
|
const isArr = prop => Array.isArray(prop);
|
|
42
50
|
|
|
43
|
-
const DSMobileContextMenu = dsSystem.withTheme(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
51
|
+
const DSMobileContextMenu = dsSystem.withTheme(_ref => {
|
|
52
|
+
let {
|
|
53
|
+
open = false,
|
|
54
|
+
title = '',
|
|
55
|
+
multiple = false,
|
|
56
|
+
singleSelect = false,
|
|
57
|
+
onChange = lodash.noop,
|
|
58
|
+
onClickOutside = lodash.noop,
|
|
59
|
+
children,
|
|
60
|
+
theme,
|
|
61
|
+
backdropZIndex,
|
|
62
|
+
zIndex = 1,
|
|
63
|
+
dataTestid = 'mobile-context-menu',
|
|
64
|
+
buttonFooter = null,
|
|
65
|
+
onApply = lodash.noop,
|
|
66
|
+
selecteds: initSelecteds
|
|
67
|
+
} = _ref;
|
|
59
68
|
const [selectedItems, setSelectedItems] = React.useState([]);
|
|
69
|
+
const trueSelected = React.useMemo(() => initSelecteds !== undefined ? initSelecteds : [...selectedItems], [initSelecteds, selectedItems]);
|
|
60
70
|
const containerRef = React.useRef(null);
|
|
61
|
-
React.useEffect(() => {
|
|
62
|
-
if (typeof initSelecteds !== 'undefined') {
|
|
63
|
-
if (multiple) setSelectedItems(prev => [...prev, ...initSelecteds]);else if (singleSelect) setSelectedItems(initSelecteds);
|
|
64
|
-
}
|
|
65
|
-
}, [initSelecteds, multiple, singleSelect]);
|
|
66
71
|
|
|
67
72
|
const handleChange = (value, childProps, event) => {
|
|
68
73
|
onChange(value, childProps, event);
|
|
69
|
-
|
|
74
|
+
|
|
75
|
+
if (initSelecteds === undefined) {
|
|
76
|
+
if (multiple) setSelectedItems([...value]);else if (singleSelect) setSelectedItems(value);
|
|
77
|
+
}
|
|
70
78
|
};
|
|
71
79
|
|
|
72
80
|
const handleApply = function (e) {
|
|
@@ -78,7 +86,7 @@ const DSMobileContextMenu = dsSystem.withTheme(({
|
|
|
78
86
|
if (buttonFooter) rows.push('56px');
|
|
79
87
|
if (!open) return null;
|
|
80
88
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
81
|
-
children: [/*#__PURE__*/_jsx__default[
|
|
89
|
+
children: [/*#__PURE__*/_jsx__default["default"](Backdrop.DSBackdrop, {
|
|
82
90
|
type: "cover",
|
|
83
91
|
zIndex: backdropZIndex,
|
|
84
92
|
onClick: e => {
|
|
@@ -91,53 +99,53 @@ const DSMobileContextMenu = dsSystem.withTheme(({
|
|
|
91
99
|
rows: rows,
|
|
92
100
|
ref: containerRef,
|
|
93
101
|
"data-testid": "ds-mobile-context-menu",
|
|
94
|
-
children: [/*#__PURE__*/_jsx__default[
|
|
102
|
+
children: [/*#__PURE__*/_jsx__default["default"](HeaderContainer, {
|
|
95
103
|
justifyContent: "center",
|
|
96
104
|
alignItems: "center",
|
|
97
105
|
pl: "xs",
|
|
98
106
|
pr: "xs"
|
|
99
|
-
}, void 0, /*#__PURE__*/_jsx__default[
|
|
107
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](StyledTitle, {
|
|
100
108
|
alignItems: "center",
|
|
101
109
|
gutter: "xxs",
|
|
102
110
|
cols: Array(isArr(title) ? title.length : 1).fill('auto')
|
|
103
|
-
}, void 0, title)), /*#__PURE__*/_jsx__default[
|
|
111
|
+
}, void 0, title)), /*#__PURE__*/_jsx__default["default"](dsGrid.Grid, {
|
|
104
112
|
style: {
|
|
105
113
|
overflow: 'hidden'
|
|
106
114
|
}
|
|
107
|
-
}, void 0, /*#__PURE__*/_jsx__default[
|
|
115
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](dsGrid.Grid, {
|
|
108
116
|
style: {
|
|
109
117
|
overflow: 'auto'
|
|
110
118
|
}
|
|
111
|
-
}, void 0, /*#__PURE__*/_jsx__default[
|
|
112
|
-
activeValue:
|
|
119
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](Group__default["default"], {
|
|
120
|
+
activeValue: trueSelected,
|
|
113
121
|
multiple: multiple,
|
|
114
122
|
onChange: handleChange
|
|
115
|
-
}, void 0, React__default[
|
|
123
|
+
}, void 0, React__default["default"].Children.map(children, (child, ii) => {
|
|
116
124
|
var _child$type;
|
|
117
125
|
|
|
118
|
-
const isGroup = child.type === (_ContextMenuGroup || (_ContextMenuGroup = /*#__PURE__*/_jsx__default[
|
|
126
|
+
const isGroup = child.type === (_ContextMenuGroup || (_ContextMenuGroup = /*#__PURE__*/_jsx__default["default"](MobileContextMenuGroup.DSMobileContextMenuGroup, {}))).type || ((_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.name) === MobileContextMenuGroup.DSMobileContextMenuGroup.componentType || child.type === MobileContextMenuGroup.DSMobileContextMenuGroup.type;
|
|
119
127
|
const {
|
|
120
128
|
onClick = lodash.noop
|
|
121
129
|
} = child.props;
|
|
122
130
|
const value = ii;
|
|
123
131
|
let isSelected;
|
|
124
|
-
if (singleSelect) isSelected =
|
|
125
|
-
return /*#__PURE__*/React__default[
|
|
132
|
+
if (singleSelect) isSelected = trueSelected === value;else if (multiple) isSelected = trueSelected.includes(value);
|
|
133
|
+
return /*#__PURE__*/React__default["default"].cloneElement(child, {
|
|
126
134
|
value,
|
|
127
|
-
key:
|
|
135
|
+
key: "cm.".concat(ii),
|
|
128
136
|
isMulti: multiple,
|
|
129
137
|
singleSelect,
|
|
130
138
|
isSelected,
|
|
131
139
|
onClick: !isGroup ? e => onClick(e, child.props) : null,
|
|
132
|
-
selectedItems: isGroup ?
|
|
140
|
+
selectedItems: isGroup ? trueSelected : null
|
|
133
141
|
});
|
|
134
|
-
})))), buttonFooter && /*#__PURE__*/_jsx__default[
|
|
142
|
+
})))), buttonFooter && /*#__PURE__*/_jsx__default["default"](dsGrid.Grid, {
|
|
135
143
|
pl: "xs",
|
|
136
144
|
pr: "xs",
|
|
137
145
|
alignItems: "center"
|
|
138
|
-
}, void 0, /*#__PURE__*/React__default[
|
|
146
|
+
}, void 0, /*#__PURE__*/React__default["default"].cloneElement(buttonFooter, _objectSpread(_objectSpread({}, buttonFooter.props), {}, {
|
|
139
147
|
containerProps: {
|
|
140
|
-
'data-testid':
|
|
148
|
+
'data-testid': "".concat(dataTestid, "--btn")
|
|
141
149
|
},
|
|
142
150
|
buttonType: 'primary',
|
|
143
151
|
size: 'l',
|
|
@@ -4,9 +4,16 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
6
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
7
|
+
require('core-js/modules/esnext.async-iterator.map.js');
|
|
8
|
+
require('core-js/modules/esnext.iterator.map.js');
|
|
9
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
10
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
11
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
12
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
13
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
7
14
|
var React = require('react');
|
|
8
15
|
var styled = require('styled-components');
|
|
9
|
-
var
|
|
16
|
+
var dsGrid = require('@elliemae/ds-grid');
|
|
10
17
|
var lodash = require('lodash');
|
|
11
18
|
var reactDesc = require('react-desc');
|
|
12
19
|
|
|
@@ -19,37 +26,40 @@ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
|
19
26
|
|
|
20
27
|
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; }
|
|
21
28
|
|
|
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__default[
|
|
23
|
-
const Title = /*#__PURE__*/styled__default[
|
|
29
|
+
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__default["default"](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; }
|
|
30
|
+
const Title = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
24
31
|
componentId: "sc-atfpfh-0"
|
|
25
32
|
})(["height:24px;line-height:24px;font-size:12px;border-top:1px solid ", ";background:", ";padding:0 ", ";color:", ";font-weight:", ";"], props => props.theme.colors.brand['300'], props => props.theme.colors.brand['200'], props => props.theme.space.xs, props => props.theme.colors.neutral['700'], props => props.theme.fontWeights.semibold);
|
|
26
33
|
|
|
27
|
-
const DSMobileContextMenuGroup =
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
singleSelect,
|
|
31
|
-
children,
|
|
32
|
-
value: groupValue,
|
|
33
|
-
selectedItems
|
|
34
|
-
}) => /*#__PURE__*/_jsx__default['default'](dsBasic.Grid, {}, void 0, /*#__PURE__*/_jsx__default['default'](dsBasic.Grid, {}, void 0, /*#__PURE__*/_jsx__default['default'](Title, {}, void 0, title)), /*#__PURE__*/_jsx__default['default'](dsBasic.Grid, {}, void 0, React__default['default'].Children.map(children, (child, index) => {
|
|
35
|
-
const {
|
|
36
|
-
onClick = lodash.noop
|
|
37
|
-
} = child.props;
|
|
38
|
-
const value = `${groupValue}:${index}`;
|
|
39
|
-
let isSelected;
|
|
40
|
-
if (singleSelect) isSelected = selectedItems === value;else if (isMulti) isSelected = selectedItems.includes(value);
|
|
41
|
-
return /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
42
|
-
value,
|
|
43
|
-
key: 'group.'.concat(index),
|
|
44
|
-
isGroup: true,
|
|
34
|
+
const DSMobileContextMenuGroup = _ref => {
|
|
35
|
+
let {
|
|
36
|
+
title,
|
|
45
37
|
isMulti,
|
|
46
38
|
singleSelect,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
})
|
|
52
|
-
|
|
39
|
+
children,
|
|
40
|
+
value: groupValue,
|
|
41
|
+
selectedItems
|
|
42
|
+
} = _ref;
|
|
43
|
+
return /*#__PURE__*/_jsx__default["default"](dsGrid.Grid, {}, void 0, /*#__PURE__*/_jsx__default["default"](dsGrid.Grid, {}, void 0, /*#__PURE__*/_jsx__default["default"](Title, {}, void 0, title)), /*#__PURE__*/_jsx__default["default"](dsGrid.Grid, {}, void 0, React__default["default"].Children.map(children, (child, index) => {
|
|
44
|
+
const {
|
|
45
|
+
onClick = lodash.noop
|
|
46
|
+
} = child.props;
|
|
47
|
+
const value = "".concat(groupValue, ":").concat(index);
|
|
48
|
+
let isSelected;
|
|
49
|
+
if (singleSelect) isSelected = selectedItems === value;else if (isMulti) isSelected = selectedItems.includes(value);
|
|
50
|
+
return /*#__PURE__*/React__default["default"].cloneElement(child, {
|
|
51
|
+
value,
|
|
52
|
+
key: 'group.'.concat(index),
|
|
53
|
+
isGroup: true,
|
|
54
|
+
isMulti,
|
|
55
|
+
singleSelect,
|
|
56
|
+
isSelected,
|
|
57
|
+
onClick: e => onClick(e, _objectSpread({
|
|
58
|
+
value
|
|
59
|
+
}, child.props))
|
|
60
|
+
});
|
|
61
|
+
})));
|
|
62
|
+
};
|
|
53
63
|
|
|
54
64
|
const props = {
|
|
55
65
|
/**
|