@elliemae/ds-mobile 2.0.0-rc.11 → 2.0.0-rc.15
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/MobileCard/Card.js +9 -60
- package/cjs/MobileCard/props.js +62 -0
- package/cjs/Tabs/index.js +8 -2
- package/cjs/Tabs/propTypes.js +28 -0
- package/cjs/index.js +2 -0
- package/esm/MobileCard/Card.js +10 -61
- package/esm/MobileCard/props.js +58 -0
- package/esm/Tabs/index.js +7 -3
- package/esm/Tabs/propTypes.js +23 -0
- package/esm/index.js +1 -1
- package/package.json +23 -15
- package/types/MobileCard/Card.d.ts +14 -17
- package/types/MobileCard/ExpandableRegion.d.ts +2 -2
- package/types/MobileCard/StyledCard.d.ts +3 -1
- package/types/MobileCard/index.d.ts +12 -3
- package/types/MobileCard/props.d.ts +118 -0
- package/types/Tabs/index.d.ts +24 -9
- package/types/Tabs/propTypes.d.ts +42 -0
package/cjs/MobileCard/Card.js
CHANGED
|
@@ -16,6 +16,7 @@ var StyledCard = require('./StyledCard.js');
|
|
|
16
16
|
var ExpandChevron = require('./ExpandChevron.js');
|
|
17
17
|
var useHeight = require('./useHeight.js');
|
|
18
18
|
var ExpandableRegion = require('./ExpandableRegion.js');
|
|
19
|
+
var props = require('./props.js');
|
|
19
20
|
var jsxRuntime = require('react/jsx-runtime');
|
|
20
21
|
|
|
21
22
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -29,7 +30,7 @@ const TitleEllipsis = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
|
29
30
|
})(["", ""], dsSystem.truncate());
|
|
30
31
|
const Title = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
31
32
|
componentId: "sc-10tpzm8-1"
|
|
32
|
-
})(["", " ", " font-weight:", ";font-size:", ";width:100%;", ""], styledSystem.padding, dsSystem.truncate(), props => props.theme.fontWeights.semibold, props => dsSystem.toMobile(props.theme.fontSizes.title[600]), dsSystem.color('neutral',
|
|
33
|
+
})(["", " ", " font-weight:", ";font-size:", ";width:100%;", ""], styledSystem.padding, dsSystem.truncate(), props => props.theme.fontWeights.semibold, props => dsSystem.toMobile(props.theme.fontSizes.title[600]), dsSystem.color('neutral', 800));
|
|
33
34
|
const Detail = /*#__PURE__*/styled__default["default"].span.withConfig({
|
|
34
35
|
componentId: "sc-10tpzm8-2"
|
|
35
36
|
})(["", " ", " font-size:", ";font-weight:", ";"], styledSystem.padding, dsSystem.truncate(), props => dsSystem.toMobile(props.theme.fontSizes.title[500]), props => props.theme.fontWeights.regular);
|
|
@@ -38,7 +39,7 @@ const SubText = /*#__PURE__*/styled__default["default"].span.withConfig({
|
|
|
38
39
|
})(["margin-top:", ";", " &:nth-child(2){padding-left:", ";}"], props => dsSystem.__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs), dsSystem.truncate(), props => dsSystem.__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.s));
|
|
39
40
|
const SubTextWrap = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
40
41
|
componentId: "sc-10tpzm8-4"
|
|
41
|
-
})(["", " border-top:", ";margin-top:6px;margin-bottom:2px;padding-bottom:", ";font-size:", ";", " font-weight:", ";display:flex;justify-content:space-between;"], dsSystem.truncate(), props => dsSystem.border(props.theme.colors.neutral['300']), props => dsSystem.__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xxs), props => dsSystem.toMobile(props.theme.fontSizes.subTitle[400]), dsSystem.color('neutral',
|
|
42
|
+
})(["", " border-top:", ";margin-top:6px;margin-bottom:2px;padding-bottom:", ";font-size:", ";", " font-weight:", ";display:flex;justify-content:space-between;"], dsSystem.truncate(), props => dsSystem.border(props.theme.colors.neutral['300']), props => dsSystem.__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xxs), props => dsSystem.toMobile(props.theme.fontSizes.subTitle[400]), dsSystem.color('neutral', 500), props => props.theme.fontWeights.regular);
|
|
42
43
|
const LeftIcon = /*#__PURE__*/styled__default["default"](dsGrid.Grid).withConfig({
|
|
43
44
|
componentId: "sc-10tpzm8-5"
|
|
44
45
|
})(["& > span{height:", ";width:", ";}& > span > svg,svg:not([fill]){height:", ";width:", ";}"], props => props.halfM, props => props.halfM, props => props.halfM, props => props.halfM);
|
|
@@ -47,7 +48,7 @@ const CenterWrap = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
|
47
48
|
})(["display:flex;align-items:center;", ""], dsSystem.truncate());
|
|
48
49
|
|
|
49
50
|
const MobileCard = _ref => {
|
|
50
|
-
var _TitleEllipsis, _SubText;
|
|
51
|
+
var _TitleEllipsis, _SubText, _Grid;
|
|
51
52
|
|
|
52
53
|
let {
|
|
53
54
|
children,
|
|
@@ -61,7 +62,8 @@ const MobileCard = _ref => {
|
|
|
61
62
|
theme,
|
|
62
63
|
expandable = false,
|
|
63
64
|
expandedContent,
|
|
64
|
-
value
|
|
65
|
+
value,
|
|
66
|
+
cardContent
|
|
65
67
|
} = _ref;
|
|
66
68
|
const subTextRef = React.useRef(null);
|
|
67
69
|
const subTextHeight = useHeight.useHeight(subTextRef);
|
|
@@ -108,7 +110,7 @@ const MobileCard = _ref => {
|
|
|
108
110
|
}, void 0, _TitleEllipsis || (_TitleEllipsis = /*#__PURE__*/_jsx__default["default"](TitleEllipsis, {}, void 0, children)), details && /*#__PURE__*/_jsx__default["default"](dsGrid.Grid, {
|
|
109
111
|
"data-testid": "card-details",
|
|
110
112
|
cols: details.map(() => 'min-content'),
|
|
111
|
-
mb: !(subText || subIcons) && halfM,
|
|
113
|
+
mb: !(subText || subIcons) && halfM || 0,
|
|
112
114
|
pt: dsSystem.op('/', dsSystem.__UNSAFE_SPACE_TO_DIMSUM(theme.space.xxs), 2)
|
|
113
115
|
}, void 0, details.map((d, i) => /*#__PURE__*/_jsx__default["default"](Detail, {}, i, d, i < details.length - 1 && /*#__PURE__*/_jsx__default["default"](Detail, {
|
|
114
116
|
px: dsSystem.__UNSAFE_SPACE_TO_DIMSUM(theme.space.xxs)
|
|
@@ -127,66 +129,13 @@ const MobileCard = _ref => {
|
|
|
127
129
|
}), /*#__PURE__*/_jsx__default["default"](ExpandableRegion.ExpandableRegion, {
|
|
128
130
|
show: selected,
|
|
129
131
|
content: expandedContent
|
|
130
|
-
})));
|
|
132
|
+
}), cardContent && (_Grid || (_Grid = /*#__PURE__*/_jsx__default["default"](dsGrid.Grid, {}, void 0, cardContent)))));
|
|
131
133
|
}
|
|
132
134
|
});
|
|
133
135
|
};
|
|
134
136
|
|
|
135
|
-
const props = {
|
|
136
|
-
/**
|
|
137
|
-
* card height
|
|
138
|
-
*/
|
|
139
|
-
height: reactDesc.PropTypes.oneOf(['s', 'm']).description('card height'),
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Defines mobile card title
|
|
143
|
-
*/
|
|
144
|
-
children: reactDesc.PropTypes.string.isRequired.description('Defines mobile card title'),
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Wheter if the card is expandable or not
|
|
148
|
-
*/
|
|
149
|
-
expandable: reactDesc.PropTypes.bool.description('Wheter if the card is expandable or not'),
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* content to display in expand card section
|
|
153
|
-
*/
|
|
154
|
-
expandedContent: reactDesc.PropTypes.element.description('content to display in expand card section'),
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Icon to the left of the card. Size is adjusted automatically.
|
|
158
|
-
*/
|
|
159
|
-
leftAddOn: reactDesc.PropTypes.element.description('Icon to the left of the card. Size is adjusted automatically.'),
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Pass an element to render left. For example a Button with an icon
|
|
163
|
-
*/
|
|
164
|
-
leftProp: reactDesc.PropTypes.element.description('Pass an element to render left. For example a Button with an icon'),
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* Pass an array of 1 or 2 elements to render right. For example a Button with an icon
|
|
168
|
-
*/
|
|
169
|
-
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'),
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* Pass an array of 1 or 2 strings
|
|
173
|
-
*/
|
|
174
|
-
subText: reactDesc.PropTypes.arrayOf(reactDesc.PropTypes.string).description('Pass an array of 1 or 2 strings'),
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* SubIcons component
|
|
178
|
-
*/
|
|
179
|
-
subIcons: reactDesc.PropTypes.element.description('SubIcons component'),
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* Pass an array of 1, 2 or 3 strings
|
|
183
|
-
*/
|
|
184
|
-
details: reactDesc.PropTypes.arrayOf(reactDesc.PropTypes.string).description('Pass an array of 1, 2 or 3 strings'),
|
|
185
|
-
theme: reactDesc.PropTypes.object.isRequired.description(''),
|
|
186
|
-
value: reactDesc.PropTypes.number.description('')
|
|
187
|
-
};
|
|
188
137
|
const DSMobileCardWithSchema = reactDesc.describe(MobileCard);
|
|
189
|
-
DSMobileCardWithSchema.propTypes = props;
|
|
138
|
+
DSMobileCardWithSchema.propTypes = props.cardPropsTypes;
|
|
190
139
|
var MobileCard$1 = dsSystem.withTheme(MobileCard);
|
|
191
140
|
|
|
192
141
|
exports.DSMobileCardWithSchema = DSMobileCardWithSchema;
|
|
@@ -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;
|
package/cjs/Tabs/index.js
CHANGED
|
@@ -9,8 +9,9 @@ require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
|
9
9
|
require('core-js/modules/esnext.iterator.for-each.js');
|
|
10
10
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
11
11
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
12
|
-
require('react');
|
|
12
|
+
var reactDesc = require('react-desc');
|
|
13
13
|
var dsTabs = require('@elliemae/ds-tabs');
|
|
14
|
+
var propTypes = require('./propTypes.js');
|
|
14
15
|
var jsxRuntime = require('react/jsx-runtime');
|
|
15
16
|
|
|
16
17
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -42,10 +43,15 @@ const DSMobileTab = _ref2 => {
|
|
|
42
43
|
props = _objectWithoutProperties__default["default"](_ref2, _excluded2);
|
|
43
44
|
|
|
44
45
|
return /*#__PURE__*/jsxRuntime.jsx(dsTabs.DSTab, _objectSpread(_objectSpread({}, props), {}, {
|
|
45
|
-
isDSMobile: true,
|
|
46
46
|
children: children
|
|
47
47
|
}));
|
|
48
48
|
};
|
|
49
|
+
const DSMobileTabsWithSchema = reactDesc.describe(DSMobileTabs);
|
|
50
|
+
DSMobileTabsWithSchema.propTypes = propTypes.MobileTabsPropTypes;
|
|
51
|
+
const DSMobileTabWithSchema = reactDesc.describe(DSMobileTab);
|
|
52
|
+
DSMobileTabWithSchema.propTypes = propTypes.MobileTabPropTypes;
|
|
49
53
|
|
|
50
54
|
exports.DSMobileTab = DSMobileTab;
|
|
55
|
+
exports.DSMobileTabWithSchema = DSMobileTabWithSchema;
|
|
51
56
|
exports.DSMobileTabs = DSMobileTabs;
|
|
57
|
+
exports.DSMobileTabsWithSchema = DSMobileTabsWithSchema;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var reactDesc = require('react-desc');
|
|
6
|
+
|
|
7
|
+
const MobileTabPropTypes = {
|
|
8
|
+
tabId: reactDesc.PropTypes.string.description('Unique Tab id.').defaultValue(''),
|
|
9
|
+
title: reactDesc.PropTypes.string.description('Tab title.').defaultValue(''),
|
|
10
|
+
required: reactDesc.PropTypes.bool.description('Show a required mark next to the title.').defaultValue(false),
|
|
11
|
+
disabled: reactDesc.PropTypes.bool.description('Disables Tab.').defaultValue(false)
|
|
12
|
+
};
|
|
13
|
+
const MobileTabsPropTypes = {
|
|
14
|
+
onTabChange: reactDesc.PropTypes.func.description('Handler when a user clicks on a different Tab.').defaultValue('() => {}'),
|
|
15
|
+
tabBarExtraContent: reactDesc.PropTypes.element.description('Extra content next to the Tabs Bar.').defaultValue(undefined),
|
|
16
|
+
onlyRenderActiveTab: reactDesc.PropTypes.bool.description('Only renders the active Tab in the DOM.').defaultValue(false),
|
|
17
|
+
fixedTabsHeaders: reactDesc.PropTypes.bool.description('Enables fixed Tabs mode. Makes Tab Bar non scrollable and adds equal fixed widths.').defaultValue(false),
|
|
18
|
+
activeTab: reactDesc.PropTypes.string.description('Passing a value makes DSTabs a controlled component.').defaultValue('First DSTab children.'),
|
|
19
|
+
children: reactDesc.PropTypes.node.description('Use DSTab component as children.').isRequired,
|
|
20
|
+
tabsListAriaLabel: reactDesc.PropTypes.string.description('Aria label for the Tab list.').defaultValue('Tab list.'),
|
|
21
|
+
containerProps: reactDesc.PropTypes.object.description('Additional properties for the container.').defaultValue({}),
|
|
22
|
+
innerRef: reactDesc.PropTypes.oneOfType([reactDesc.PropTypes.func, reactDesc.PropTypes.shape({
|
|
23
|
+
current: reactDesc.PropTypes.any
|
|
24
|
+
})]).description('Ref to the container.').defaultValue(undefined)
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports.MobileTabPropTypes = MobileTabPropTypes;
|
|
28
|
+
exports.MobileTabsPropTypes = MobileTabsPropTypes;
|
package/cjs/index.js
CHANGED
|
@@ -114,7 +114,9 @@ exports.DSMobileDropdownMenu = MobileDropdownMenu.DSMobileDropdownMenu;
|
|
|
114
114
|
exports.DSMobileDropdownMenuWithSchema = MobileDropdownMenu.DSMobileDropdownMenuWithSchema;
|
|
115
115
|
exports.DSMobileDropdownTriggerInput = MobileDropdownInput.DSMobileDropdownTriggerInput;
|
|
116
116
|
exports.DSMobileTab = index$1.DSMobileTab;
|
|
117
|
+
exports.DSMobileTabWithSchema = index$1.DSMobileTabWithSchema;
|
|
117
118
|
exports.DSMobileTabs = index$1.DSMobileTabs;
|
|
119
|
+
exports.DSMobileTabsWithSchema = index$1.DSMobileTabsWithSchema;
|
|
118
120
|
exports.DSMobileCard = index.DSMobileCard;
|
|
119
121
|
exports.DSCollectionBox = CollectionBox.DSCollectionBox;
|
|
120
122
|
exports.DSCollectionBoxWithSchema = CollectionBox.DSCollectionBoxWithSchema;
|
package/esm/MobileCard/Card.js
CHANGED
|
@@ -2,7 +2,7 @@ import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
|
2
2
|
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
3
3
|
import 'core-js/modules/esnext.iterator.map.js';
|
|
4
4
|
import { useRef } from 'react';
|
|
5
|
-
import {
|
|
5
|
+
import { describe } from 'react-desc';
|
|
6
6
|
import styled from 'styled-components';
|
|
7
7
|
import { padding } from 'styled-system';
|
|
8
8
|
import { truncate, toMobile, color, __UNSAFE_SPACE_TO_DIMSUM, border, withTheme, op } from '@elliemae/ds-system';
|
|
@@ -12,6 +12,7 @@ import { StyledCard } from './StyledCard.js';
|
|
|
12
12
|
import { ExpandChevron } from './ExpandChevron.js';
|
|
13
13
|
import { useHeight } from './useHeight.js';
|
|
14
14
|
import { ExpandableRegion } from './ExpandableRegion.js';
|
|
15
|
+
import { cardPropsTypes } from './props.js';
|
|
15
16
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
16
17
|
|
|
17
18
|
const TitleEllipsis = /*#__PURE__*/styled.div.withConfig({
|
|
@@ -19,7 +20,7 @@ const TitleEllipsis = /*#__PURE__*/styled.div.withConfig({
|
|
|
19
20
|
})(["", ""], truncate());
|
|
20
21
|
const Title = /*#__PURE__*/styled.div.withConfig({
|
|
21
22
|
componentId: "sc-10tpzm8-1"
|
|
22
|
-
})(["", " ", " font-weight:", ";font-size:", ";width:100%;", ""], padding, truncate(), props => props.theme.fontWeights.semibold, props => toMobile(props.theme.fontSizes.title[600]), color('neutral',
|
|
23
|
+
})(["", " ", " font-weight:", ";font-size:", ";width:100%;", ""], padding, truncate(), props => props.theme.fontWeights.semibold, props => toMobile(props.theme.fontSizes.title[600]), color('neutral', 800));
|
|
23
24
|
const Detail = /*#__PURE__*/styled.span.withConfig({
|
|
24
25
|
componentId: "sc-10tpzm8-2"
|
|
25
26
|
})(["", " ", " font-size:", ";font-weight:", ";"], padding, truncate(), props => toMobile(props.theme.fontSizes.title[500]), props => props.theme.fontWeights.regular);
|
|
@@ -28,7 +29,7 @@ const SubText = /*#__PURE__*/styled.span.withConfig({
|
|
|
28
29
|
})(["margin-top:", ";", " &:nth-child(2){padding-left:", ";}"], props => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs), truncate(), props => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.s));
|
|
29
30
|
const SubTextWrap = /*#__PURE__*/styled.div.withConfig({
|
|
30
31
|
componentId: "sc-10tpzm8-4"
|
|
31
|
-
})(["", " border-top:", ";margin-top:6px;margin-bottom:2px;padding-bottom:", ";font-size:", ";", " font-weight:", ";display:flex;justify-content:space-between;"], truncate(), props => border(props.theme.colors.neutral['300']), props => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xxs), props => toMobile(props.theme.fontSizes.subTitle[400]), color('neutral',
|
|
32
|
+
})(["", " border-top:", ";margin-top:6px;margin-bottom:2px;padding-bottom:", ";font-size:", ";", " font-weight:", ";display:flex;justify-content:space-between;"], truncate(), props => border(props.theme.colors.neutral['300']), props => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xxs), props => toMobile(props.theme.fontSizes.subTitle[400]), color('neutral', 500), props => props.theme.fontWeights.regular);
|
|
32
33
|
const LeftIcon = /*#__PURE__*/styled(Grid).withConfig({
|
|
33
34
|
componentId: "sc-10tpzm8-5"
|
|
34
35
|
})(["& > span{height:", ";width:", ";}& > span > svg,svg:not([fill]){height:", ";width:", ";}"], props => props.halfM, props => props.halfM, props => props.halfM, props => props.halfM);
|
|
@@ -37,7 +38,7 @@ const CenterWrap = /*#__PURE__*/styled.div.withConfig({
|
|
|
37
38
|
})(["display:flex;align-items:center;", ""], truncate());
|
|
38
39
|
|
|
39
40
|
const MobileCard = _ref => {
|
|
40
|
-
var _TitleEllipsis, _SubText;
|
|
41
|
+
var _TitleEllipsis, _SubText, _Grid;
|
|
41
42
|
|
|
42
43
|
let {
|
|
43
44
|
children,
|
|
@@ -51,7 +52,8 @@ const MobileCard = _ref => {
|
|
|
51
52
|
theme,
|
|
52
53
|
expandable = false,
|
|
53
54
|
expandedContent,
|
|
54
|
-
value
|
|
55
|
+
value,
|
|
56
|
+
cardContent
|
|
55
57
|
} = _ref;
|
|
56
58
|
const subTextRef = useRef(null);
|
|
57
59
|
const subTextHeight = useHeight(subTextRef);
|
|
@@ -98,7 +100,7 @@ const MobileCard = _ref => {
|
|
|
98
100
|
}, void 0, _TitleEllipsis || (_TitleEllipsis = /*#__PURE__*/_jsx(TitleEllipsis, {}, void 0, children)), details && /*#__PURE__*/_jsx(Grid, {
|
|
99
101
|
"data-testid": "card-details",
|
|
100
102
|
cols: details.map(() => 'min-content'),
|
|
101
|
-
mb: !(subText || subIcons) && halfM,
|
|
103
|
+
mb: !(subText || subIcons) && halfM || 0,
|
|
102
104
|
pt: op('/', __UNSAFE_SPACE_TO_DIMSUM(theme.space.xxs), 2)
|
|
103
105
|
}, void 0, details.map((d, i) => /*#__PURE__*/_jsx(Detail, {}, i, d, i < details.length - 1 && /*#__PURE__*/_jsx(Detail, {
|
|
104
106
|
px: __UNSAFE_SPACE_TO_DIMSUM(theme.space.xxs)
|
|
@@ -117,66 +119,13 @@ const MobileCard = _ref => {
|
|
|
117
119
|
}), /*#__PURE__*/_jsx(ExpandableRegion, {
|
|
118
120
|
show: selected,
|
|
119
121
|
content: expandedContent
|
|
120
|
-
})));
|
|
122
|
+
}), cardContent && (_Grid || (_Grid = /*#__PURE__*/_jsx(Grid, {}, void 0, cardContent)))));
|
|
121
123
|
}
|
|
122
124
|
});
|
|
123
125
|
};
|
|
124
126
|
|
|
125
|
-
const props = {
|
|
126
|
-
/**
|
|
127
|
-
* card height
|
|
128
|
-
*/
|
|
129
|
-
height: PropTypes.oneOf(['s', 'm']).description('card height'),
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Defines mobile card title
|
|
133
|
-
*/
|
|
134
|
-
children: PropTypes.string.isRequired.description('Defines mobile card title'),
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Wheter if the card is expandable or not
|
|
138
|
-
*/
|
|
139
|
-
expandable: PropTypes.bool.description('Wheter if the card is expandable or not'),
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* content to display in expand card section
|
|
143
|
-
*/
|
|
144
|
-
expandedContent: PropTypes.element.description('content to display in expand card section'),
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Icon to the left of the card. Size is adjusted automatically.
|
|
148
|
-
*/
|
|
149
|
-
leftAddOn: PropTypes.element.description('Icon to the left of the card. Size is adjusted automatically.'),
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Pass an element to render left. For example a Button with an icon
|
|
153
|
-
*/
|
|
154
|
-
leftProp: PropTypes.element.description('Pass an element to render left. For example a Button with an icon'),
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Pass an array of 1 or 2 elements to render right. For example a Button with an icon
|
|
158
|
-
*/
|
|
159
|
-
rightProp: PropTypes.arrayOf(PropTypes.element).description('Pass an array of 1 or 2 elements to render right. For example a Button with an icon'),
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Pass an array of 1 or 2 strings
|
|
163
|
-
*/
|
|
164
|
-
subText: PropTypes.arrayOf(PropTypes.string).description('Pass an array of 1 or 2 strings'),
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* SubIcons component
|
|
168
|
-
*/
|
|
169
|
-
subIcons: PropTypes.element.description('SubIcons component'),
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* Pass an array of 1, 2 or 3 strings
|
|
173
|
-
*/
|
|
174
|
-
details: PropTypes.arrayOf(PropTypes.string).description('Pass an array of 1, 2 or 3 strings'),
|
|
175
|
-
theme: PropTypes.object.isRequired.description(''),
|
|
176
|
-
value: PropTypes.number.description('')
|
|
177
|
-
};
|
|
178
127
|
const DSMobileCardWithSchema = describe(MobileCard);
|
|
179
|
-
DSMobileCardWithSchema.propTypes =
|
|
128
|
+
DSMobileCardWithSchema.propTypes = cardPropsTypes;
|
|
180
129
|
var MobileCard$1 = withTheme(MobileCard);
|
|
181
130
|
|
|
182
131
|
export { DSMobileCardWithSchema, MobileCard$1 as default };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { PropTypes } from 'react-desc';
|
|
2
|
+
|
|
3
|
+
const cardPropsTypes = {
|
|
4
|
+
/**
|
|
5
|
+
* card height
|
|
6
|
+
*/
|
|
7
|
+
height: PropTypes.oneOf(['s', 'm']).description('card height'),
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Defines mobile card title
|
|
11
|
+
*/
|
|
12
|
+
children: PropTypes.string.description('Defines mobile card title').isRequired,
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Wheter if the card is expandable or not
|
|
16
|
+
*/
|
|
17
|
+
expandable: PropTypes.bool.description('Wheter if the card is expandable or not'),
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* content to display in expand card section
|
|
21
|
+
*/
|
|
22
|
+
expandedContent: PropTypes.element.description('content to display in expand card section'),
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Icon to the left of the card. Size is adjusted automatically.
|
|
26
|
+
*/
|
|
27
|
+
leftAddOn: PropTypes.element.description('Icon to the left of the card. Size is adjusted automatically.'),
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Pass an element to render left. For example a Button with an icon
|
|
31
|
+
*/
|
|
32
|
+
leftProp: PropTypes.element.description('Pass an element to render left. For example a Button with an icon'),
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Pass an array of 1 or 2 elements to render right. For example a Button with an icon
|
|
36
|
+
*/
|
|
37
|
+
rightProp: PropTypes.arrayOf(PropTypes.element).description('Pass an array of 1 or 2 elements to render right. For example a Button with an icon'),
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Pass an array of 1 or 2 strings
|
|
41
|
+
*/
|
|
42
|
+
subText: PropTypes.arrayOf(PropTypes.string).description('Pass an array of 1 or 2 strings'),
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* SubIcons component
|
|
46
|
+
*/
|
|
47
|
+
subIcons: PropTypes.element.description('SubIcons component'),
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Pass an array of 1, 2 or 3 strings
|
|
51
|
+
*/
|
|
52
|
+
details: PropTypes.arrayOf(PropTypes.string).description('Pass an array of 1, 2 or 3 strings'),
|
|
53
|
+
theme: PropTypes.object.description('').isRequired,
|
|
54
|
+
value: PropTypes.number.description(''),
|
|
55
|
+
cardContent: PropTypes.node.description('JSX content for the card')
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export { cardPropsTypes };
|
package/esm/Tabs/index.js
CHANGED
|
@@ -5,8 +5,9 @@ import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
|
5
5
|
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
6
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
7
7
|
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
8
|
-
import 'react';
|
|
8
|
+
import { describe } from 'react-desc';
|
|
9
9
|
import { DSTabs, DSTab } from '@elliemae/ds-tabs';
|
|
10
|
+
import { MobileTabsPropTypes, MobileTabPropTypes } from './propTypes.js';
|
|
10
11
|
import { jsx } from 'react/jsx-runtime';
|
|
11
12
|
|
|
12
13
|
const _excluded = ["children"],
|
|
@@ -33,9 +34,12 @@ const DSMobileTab = _ref2 => {
|
|
|
33
34
|
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
34
35
|
|
|
35
36
|
return /*#__PURE__*/jsx(DSTab, _objectSpread(_objectSpread({}, props), {}, {
|
|
36
|
-
isDSMobile: true,
|
|
37
37
|
children: children
|
|
38
38
|
}));
|
|
39
39
|
};
|
|
40
|
+
const DSMobileTabsWithSchema = describe(DSMobileTabs);
|
|
41
|
+
DSMobileTabsWithSchema.propTypes = MobileTabsPropTypes;
|
|
42
|
+
const DSMobileTabWithSchema = describe(DSMobileTab);
|
|
43
|
+
DSMobileTabWithSchema.propTypes = MobileTabPropTypes;
|
|
40
44
|
|
|
41
|
-
export { DSMobileTab, DSMobileTabs };
|
|
45
|
+
export { DSMobileTab, DSMobileTabWithSchema, DSMobileTabs, DSMobileTabsWithSchema };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PropTypes } from 'react-desc';
|
|
2
|
+
|
|
3
|
+
const MobileTabPropTypes = {
|
|
4
|
+
tabId: PropTypes.string.description('Unique Tab id.').defaultValue(''),
|
|
5
|
+
title: PropTypes.string.description('Tab title.').defaultValue(''),
|
|
6
|
+
required: PropTypes.bool.description('Show a required mark next to the title.').defaultValue(false),
|
|
7
|
+
disabled: PropTypes.bool.description('Disables Tab.').defaultValue(false)
|
|
8
|
+
};
|
|
9
|
+
const MobileTabsPropTypes = {
|
|
10
|
+
onTabChange: PropTypes.func.description('Handler when a user clicks on a different Tab.').defaultValue('() => {}'),
|
|
11
|
+
tabBarExtraContent: PropTypes.element.description('Extra content next to the Tabs Bar.').defaultValue(undefined),
|
|
12
|
+
onlyRenderActiveTab: PropTypes.bool.description('Only renders the active Tab in the DOM.').defaultValue(false),
|
|
13
|
+
fixedTabsHeaders: PropTypes.bool.description('Enables fixed Tabs mode. Makes Tab Bar non scrollable and adds equal fixed widths.').defaultValue(false),
|
|
14
|
+
activeTab: PropTypes.string.description('Passing a value makes DSTabs a controlled component.').defaultValue('First DSTab children.'),
|
|
15
|
+
children: PropTypes.node.description('Use DSTab component as children.').isRequired,
|
|
16
|
+
tabsListAriaLabel: PropTypes.string.description('Aria label for the Tab list.').defaultValue('Tab list.'),
|
|
17
|
+
containerProps: PropTypes.object.description('Additional properties for the container.').defaultValue({}),
|
|
18
|
+
innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
19
|
+
current: PropTypes.any
|
|
20
|
+
})]).description('Ref to the container.').defaultValue(undefined)
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { MobileTabPropTypes, MobileTabsPropTypes };
|
package/esm/index.js
CHANGED
|
@@ -26,7 +26,7 @@ export { DSMobileTimePicker, DSMobileTimePickerWithSchema } from './MobileTimePi
|
|
|
26
26
|
export { DSMobileEmptyState, DSMobileEmptyStateWithSchema } from './MobileEmtpyState/MobileEmptyState.js';
|
|
27
27
|
export { DSMobileDropdownMenu, DSMobileDropdownMenuWithSchema } from './MobileDropdownMenu/MobileDropdownMenu.js';
|
|
28
28
|
export { DSMobileDropdownTriggerInput } from './MobileDropdownMenu/MobileDropdownInput.js';
|
|
29
|
-
export { DSMobileTab, DSMobileTabs } from './Tabs/index.js';
|
|
29
|
+
export { DSMobileTab, DSMobileTabWithSchema, DSMobileTabs, DSMobileTabsWithSchema } from './Tabs/index.js';
|
|
30
30
|
export { DSMobileCard } from './MobileCard/index.js';
|
|
31
31
|
export { DSCollectionBox, DSCollectionBoxWithSchema } from './CollectionBox/CollectionBox.js';
|
|
32
32
|
export { DSCategoryBox, DSCategoryBoxWithSchema } from './CategoryBox/CategoryBox.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-mobile",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.15",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - System",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
"import": "./esm/index.js",
|
|
12
12
|
"require": "./cjs/index.js"
|
|
13
13
|
},
|
|
14
|
+
"./Tabs/propTypes": {
|
|
15
|
+
"import": "./esm/Tabs/propTypes.js",
|
|
16
|
+
"require": "./cjs/Tabs/propTypes.js"
|
|
17
|
+
},
|
|
14
18
|
"./Tabs": {
|
|
15
19
|
"import": "./esm/Tabs/index.js",
|
|
16
20
|
"require": "./cjs/Tabs/index.js"
|
|
@@ -231,6 +235,10 @@
|
|
|
231
235
|
"import": "./esm/MobileCard/StyledCard.js",
|
|
232
236
|
"require": "./cjs/MobileCard/StyledCard.js"
|
|
233
237
|
},
|
|
238
|
+
"./MobileCard/props": {
|
|
239
|
+
"import": "./esm/MobileCard/props.js",
|
|
240
|
+
"require": "./cjs/MobileCard/props.js"
|
|
241
|
+
},
|
|
234
242
|
"./MobileCard": {
|
|
235
243
|
"import": "./esm/MobileCard/index.js",
|
|
236
244
|
"require": "./cjs/MobileCard/index.js"
|
|
@@ -421,20 +429,20 @@
|
|
|
421
429
|
"generateSubmodules": true
|
|
422
430
|
},
|
|
423
431
|
"dependencies": {
|
|
424
|
-
"@elliemae/ds-accordion": "2.0.0-rc.
|
|
425
|
-
"@elliemae/ds-backdrop": "2.0.0-rc.
|
|
426
|
-
"@elliemae/ds-button": "2.0.0-rc.
|
|
427
|
-
"@elliemae/ds-circular-progress-indicator": "2.0.0-rc.
|
|
428
|
-
"@elliemae/ds-devutils": "2.0.0-rc.
|
|
429
|
-
"@elliemae/ds-form": "2.0.0-rc.
|
|
430
|
-
"@elliemae/ds-grid": "2.0.0-rc.
|
|
431
|
-
"@elliemae/ds-icon": "2.0.0-rc.
|
|
432
|
-
"@elliemae/ds-icons": "2.0.0-rc.
|
|
433
|
-
"@elliemae/ds-indeterminate-progress-indicator": "2.0.0-rc.
|
|
434
|
-
"@elliemae/ds-shared": "2.0.0-rc.
|
|
435
|
-
"@elliemae/ds-system": "2.0.0-rc.
|
|
436
|
-
"@elliemae/ds-tabs": "2.0.0-rc.
|
|
437
|
-
"@elliemae/ds-truncated-expandable-text": "2.0.0-rc.
|
|
432
|
+
"@elliemae/ds-accordion": "2.0.0-rc.15",
|
|
433
|
+
"@elliemae/ds-backdrop": "2.0.0-rc.15",
|
|
434
|
+
"@elliemae/ds-button": "2.0.0-rc.15",
|
|
435
|
+
"@elliemae/ds-circular-progress-indicator": "2.0.0-rc.15",
|
|
436
|
+
"@elliemae/ds-devutils": "2.0.0-rc.15",
|
|
437
|
+
"@elliemae/ds-form": "2.0.0-rc.15",
|
|
438
|
+
"@elliemae/ds-grid": "2.0.0-rc.15",
|
|
439
|
+
"@elliemae/ds-icon": "2.0.0-rc.15",
|
|
440
|
+
"@elliemae/ds-icons": "2.0.0-rc.15",
|
|
441
|
+
"@elliemae/ds-indeterminate-progress-indicator": "2.0.0-rc.15",
|
|
442
|
+
"@elliemae/ds-shared": "2.0.0-rc.15",
|
|
443
|
+
"@elliemae/ds-system": "2.0.0-rc.15",
|
|
444
|
+
"@elliemae/ds-tabs": "2.0.0-rc.15",
|
|
445
|
+
"@elliemae/ds-truncated-expandable-text": "2.0.0-rc.15",
|
|
438
446
|
"polished": "~3.6.7",
|
|
439
447
|
"prop-types": "~15.7.2",
|
|
440
448
|
"react-desc": "~4.1.3",
|
|
@@ -1,28 +1,25 @@
|
|
|
1
1
|
/// <reference path="../../../../../shared/typings/react-desc.d.ts" />
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { MobileCardProps } from './props';
|
|
3
4
|
declare const DSMobileCardWithSchema: {
|
|
4
|
-
(props?:
|
|
5
|
-
children: any;
|
|
6
|
-
height?: string | undefined;
|
|
7
|
-
leftAddOn: any;
|
|
8
|
-
leftProp: any;
|
|
9
|
-
rightProp: any;
|
|
10
|
-
subText: any;
|
|
11
|
-
subIcons: any;
|
|
12
|
-
details: any;
|
|
13
|
-
theme: any;
|
|
14
|
-
expandable?: boolean | undefined;
|
|
15
|
-
expandedContent: any;
|
|
16
|
-
value: any;
|
|
17
|
-
} | undefined): JSX.Element;
|
|
5
|
+
(props?: React.PropsWithChildren<MobileCardProps> | undefined): JSX.Element;
|
|
18
6
|
propTypes: unknown;
|
|
19
7
|
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
20
8
|
};
|
|
21
9
|
export { DSMobileCardWithSchema };
|
|
22
10
|
declare const _default: React.ForwardRefExoticComponent<{
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
11
|
+
height: "s" | "m";
|
|
12
|
+
children: ((string | number | boolean | {} | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal | React.ReactNode[]) & (boolean | React.ReactChild | React.ReactFragment | React.ReactPortal)) | null | undefined;
|
|
13
|
+
details: string[];
|
|
14
|
+
leftProp: JSX.Element | JSX.Element[];
|
|
15
|
+
rightProp: JSX.Element[];
|
|
16
|
+
value: number;
|
|
17
|
+
leftAddOn: JSX.Element | JSX.Element[];
|
|
18
|
+
subText: string[];
|
|
19
|
+
subIcons: JSX.Element | JSX.Element[];
|
|
20
|
+
expandable: boolean;
|
|
21
|
+
expandedContent: JSX.Element | JSX.Element[];
|
|
22
|
+
cardContent: JSX.Element | JSX.Element[];
|
|
26
23
|
} & {
|
|
27
24
|
theme?: import("styled-components").DefaultTheme | undefined;
|
|
28
25
|
}>;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
export declare const ExpandableRegion: {
|
|
4
4
|
({ show, content }: {
|
|
5
|
-
show:
|
|
6
|
-
content:
|
|
5
|
+
show: boolean;
|
|
6
|
+
content: JSX.Element | JSX.Element[];
|
|
7
7
|
}): JSX.Element;
|
|
8
8
|
propTypes: {
|
|
9
9
|
show: PropTypes.Requireable<boolean>;
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
export declare const StyledCard: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
1
|
+
export declare const StyledCard: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
2
|
+
minHeight: string;
|
|
3
|
+
}, never>;
|
|
@@ -3,9 +3,18 @@ import MobileCard, { DSMobileCardWithSchema } from './Card';
|
|
|
3
3
|
import { DSMobileCardGroupWithSchema } from './Group';
|
|
4
4
|
import { ActionAddon } from './ActionAddon';
|
|
5
5
|
declare const DSMobileCard: import("react").ForwardRefExoticComponent<{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
height: "s" | "m";
|
|
7
|
+
children: ((string | number | boolean | {} | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | import("react").ReactPortal | import("react").ReactNode[]) & (boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal)) | null | undefined;
|
|
8
|
+
details: string[];
|
|
9
|
+
leftProp: JSX.Element | JSX.Element[];
|
|
10
|
+
rightProp: JSX.Element[];
|
|
11
|
+
value: number;
|
|
12
|
+
leftAddOn: JSX.Element | JSX.Element[];
|
|
13
|
+
subText: string[];
|
|
14
|
+
subIcons: JSX.Element | JSX.Element[];
|
|
15
|
+
expandable: boolean;
|
|
16
|
+
expandedContent: JSX.Element | JSX.Element[];
|
|
17
|
+
cardContent: JSX.Element | JSX.Element[];
|
|
9
18
|
} & {
|
|
10
19
|
theme?: import("styled-components").DefaultTheme | undefined;
|
|
11
20
|
}>;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/// <reference path="../../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { Theme } from '@elliemae/pui-theme';
|
|
4
|
+
export interface MobileCardProps {
|
|
5
|
+
children: React.ReactNode | React.ReactNode[];
|
|
6
|
+
height: 's' | 'm';
|
|
7
|
+
leftAddOn: JSX.Element | JSX.Element[];
|
|
8
|
+
leftProp: JSX.Element | JSX.Element[];
|
|
9
|
+
rightProp: JSX.Element[];
|
|
10
|
+
subText: string[];
|
|
11
|
+
subIcons: JSX.Element | JSX.Element[];
|
|
12
|
+
details: string[];
|
|
13
|
+
theme: Theme;
|
|
14
|
+
value: number;
|
|
15
|
+
expandable: boolean;
|
|
16
|
+
expandedContent: JSX.Element | JSX.Element[];
|
|
17
|
+
cardContent: JSX.Element | JSX.Element[];
|
|
18
|
+
}
|
|
19
|
+
export declare const cardPropsTypes: {
|
|
20
|
+
/**
|
|
21
|
+
* card height
|
|
22
|
+
*/
|
|
23
|
+
height: {
|
|
24
|
+
defaultValue<T = unknown>(arg: T): {
|
|
25
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
26
|
+
};
|
|
27
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Defines mobile card title
|
|
31
|
+
*/
|
|
32
|
+
children: import("react-desc").PropTypesDescValidator;
|
|
33
|
+
/**
|
|
34
|
+
* Wheter if the card is expandable or not
|
|
35
|
+
*/
|
|
36
|
+
expandable: {
|
|
37
|
+
defaultValue<T = unknown>(arg: T): {
|
|
38
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
39
|
+
};
|
|
40
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* content to display in expand card section
|
|
44
|
+
*/
|
|
45
|
+
expandedContent: {
|
|
46
|
+
defaultValue<T = unknown>(arg: T): {
|
|
47
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
48
|
+
};
|
|
49
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Icon to the left of the card. Size is adjusted automatically.
|
|
53
|
+
*/
|
|
54
|
+
leftAddOn: {
|
|
55
|
+
defaultValue<T = unknown>(arg: T): {
|
|
56
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
57
|
+
};
|
|
58
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Pass an element to render left. For example a Button with an icon
|
|
62
|
+
*/
|
|
63
|
+
leftProp: {
|
|
64
|
+
defaultValue<T = unknown>(arg: T): {
|
|
65
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
66
|
+
};
|
|
67
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Pass an array of 1 or 2 elements to render right. For example a Button with an icon
|
|
71
|
+
*/
|
|
72
|
+
rightProp: {
|
|
73
|
+
defaultValue<T = unknown>(arg: T): {
|
|
74
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
75
|
+
};
|
|
76
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Pass an array of 1 or 2 strings
|
|
80
|
+
*/
|
|
81
|
+
subText: {
|
|
82
|
+
defaultValue<T = unknown>(arg: T): {
|
|
83
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
84
|
+
};
|
|
85
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* SubIcons component
|
|
89
|
+
*/
|
|
90
|
+
subIcons: {
|
|
91
|
+
defaultValue<T = unknown>(arg: T): {
|
|
92
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
93
|
+
};
|
|
94
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* Pass an array of 1, 2 or 3 strings
|
|
98
|
+
*/
|
|
99
|
+
details: {
|
|
100
|
+
defaultValue<T = unknown>(arg: T): {
|
|
101
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
102
|
+
};
|
|
103
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
104
|
+
};
|
|
105
|
+
theme: import("react-desc").PropTypesDescValidator;
|
|
106
|
+
value: {
|
|
107
|
+
defaultValue<T = unknown>(arg: T): {
|
|
108
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
109
|
+
};
|
|
110
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
111
|
+
};
|
|
112
|
+
cardContent: {
|
|
113
|
+
defaultValue<T = unknown>(arg: T): {
|
|
114
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
115
|
+
};
|
|
116
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
117
|
+
};
|
|
118
|
+
};
|
package/types/Tabs/index.d.ts
CHANGED
|
@@ -1,9 +1,24 @@
|
|
|
1
|
-
/// <reference
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export declare const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
1
|
+
/// <reference path="../../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
+
import type { WeakValidationMap } from 'react';
|
|
3
|
+
import type { DSTabsPropsT, DSTabPropsT } from '@elliemae/ds-tabs';
|
|
4
|
+
declare type DSMobileTabsPropsT = Omit<DSTabsPropsT, 'animated' | 'enableMouseEvents' | 'allowTextSelection' | 'type' | 'isDSMobile' | 'withCarousel'>;
|
|
5
|
+
declare type DSMobileTabPropsT = Omit<DSTabPropsT, 'isDSMobile'>;
|
|
6
|
+
export declare const DSMobileTabs: {
|
|
7
|
+
({ children, ...props }: DSMobileTabsPropsT): JSX.Element;
|
|
8
|
+
propTypes: WeakValidationMap<unknown>;
|
|
9
|
+
};
|
|
10
|
+
export declare const DSMobileTab: {
|
|
11
|
+
({ children, ...props }: DSMobileTabPropsT): JSX.Element;
|
|
12
|
+
propTypes: WeakValidationMap<unknown>;
|
|
13
|
+
};
|
|
14
|
+
declare const DSMobileTabsWithSchema: {
|
|
15
|
+
(props?: DSMobileTabsPropsT | undefined): JSX.Element;
|
|
16
|
+
propTypes: unknown;
|
|
17
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
18
|
+
};
|
|
19
|
+
declare const DSMobileTabWithSchema: {
|
|
20
|
+
(props?: DSMobileTabPropsT | undefined): JSX.Element;
|
|
21
|
+
propTypes: unknown;
|
|
22
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
23
|
+
};
|
|
24
|
+
export { DSMobileTabsWithSchema, DSMobileTabWithSchema };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/// <reference path="../../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
+
export declare const MobileTabPropTypes: {
|
|
3
|
+
tabId: {
|
|
4
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
5
|
+
};
|
|
6
|
+
title: {
|
|
7
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
8
|
+
};
|
|
9
|
+
required: {
|
|
10
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
11
|
+
};
|
|
12
|
+
disabled: {
|
|
13
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export declare const MobileTabsPropTypes: {
|
|
17
|
+
onTabChange: {
|
|
18
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
19
|
+
};
|
|
20
|
+
tabBarExtraContent: {
|
|
21
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
22
|
+
};
|
|
23
|
+
onlyRenderActiveTab: {
|
|
24
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
25
|
+
};
|
|
26
|
+
fixedTabsHeaders: {
|
|
27
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
28
|
+
};
|
|
29
|
+
activeTab: {
|
|
30
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
31
|
+
};
|
|
32
|
+
children: import("react-desc").PropTypesDescValidator;
|
|
33
|
+
tabsListAriaLabel: {
|
|
34
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
35
|
+
};
|
|
36
|
+
containerProps: {
|
|
37
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
38
|
+
};
|
|
39
|
+
innerRef: {
|
|
40
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
41
|
+
};
|
|
42
|
+
};
|