@elliemae/ds-accordion 2.0.0-rc.6 → 2.0.0
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/DSAccordionItem.js +2 -4
- package/esm/DSAccordionItem.js +2 -3
- package/package.json +13 -7
- package/types/DSAccordion.d.ts +43 -6
- package/types/DSAccordionItem.d.ts +6 -1
package/cjs/DSAccordionItem.js
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
-
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
7
6
|
var React = require('react');
|
|
8
7
|
var dsIcons = require('@elliemae/ds-icons');
|
|
9
8
|
var GroupItem = require('@elliemae/ds-shared/GroupContext/GroupItem');
|
|
@@ -15,7 +14,6 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
15
14
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
16
15
|
|
|
17
16
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
18
|
-
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
19
17
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
20
18
|
var GroupItem__default = /*#__PURE__*/_interopDefaultLegacy(GroupItem);
|
|
21
19
|
|
|
@@ -31,7 +29,7 @@ class DSAccordionItem extends React.Component {
|
|
|
31
29
|
constructor(props) {
|
|
32
30
|
super(props);
|
|
33
31
|
|
|
34
|
-
|
|
32
|
+
this.setHeight = element => {
|
|
35
33
|
const {
|
|
36
34
|
actualHeight
|
|
37
35
|
} = this.state;
|
|
@@ -49,7 +47,7 @@ class DSAccordionItem extends React.Component {
|
|
|
49
47
|
});
|
|
50
48
|
}
|
|
51
49
|
}, 0);
|
|
52
|
-
}
|
|
50
|
+
};
|
|
53
51
|
|
|
54
52
|
this.childElements = /*#__PURE__*/React__default["default"].createRef();
|
|
55
53
|
this.state = {
|
package/esm/DSAccordionItem.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
2
|
import React, { Component } from 'react';
|
|
4
3
|
import { ArrowheadRight, ArrowheadDown } from '@elliemae/ds-icons';
|
|
5
4
|
import GroupItem from '@elliemae/ds-shared/GroupContext/GroupItem';
|
|
@@ -20,7 +19,7 @@ class DSAccordionItem extends Component {
|
|
|
20
19
|
constructor(props) {
|
|
21
20
|
super(props);
|
|
22
21
|
|
|
23
|
-
|
|
22
|
+
this.setHeight = element => {
|
|
24
23
|
const {
|
|
25
24
|
actualHeight
|
|
26
25
|
} = this.state;
|
|
@@ -38,7 +37,7 @@ class DSAccordionItem extends Component {
|
|
|
38
37
|
});
|
|
39
38
|
}
|
|
40
39
|
}, 0);
|
|
41
|
-
}
|
|
40
|
+
};
|
|
42
41
|
|
|
43
42
|
this.childElements = /*#__PURE__*/React.createRef();
|
|
44
43
|
this.state = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-accordion",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Accordion",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -56,14 +56,20 @@
|
|
|
56
56
|
"build": "node ../../scripts/build/build.js"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@elliemae/ds-button": "2.0.0
|
|
60
|
-
"@elliemae/ds-classnames": "2.0.0
|
|
61
|
-
"@elliemae/ds-icons": "2.0.0
|
|
62
|
-
"@elliemae/ds-shared": "2.0.0
|
|
63
|
-
"@elliemae/ds-system": "2.0.0
|
|
64
|
-
"@elliemae/ds-truncated-tooltip-text": "2.0.0
|
|
59
|
+
"@elliemae/ds-button": "2.0.0",
|
|
60
|
+
"@elliemae/ds-classnames": "2.0.0",
|
|
61
|
+
"@elliemae/ds-icons": "2.0.0",
|
|
62
|
+
"@elliemae/ds-shared": "2.0.0",
|
|
63
|
+
"@elliemae/ds-system": "2.0.0",
|
|
64
|
+
"@elliemae/ds-truncated-tooltip-text": "2.0.0",
|
|
65
65
|
"react-desc": "^4.1.3"
|
|
66
66
|
},
|
|
67
|
+
"devDependencies": {
|
|
68
|
+
"@testing-library/jest-dom": "~5.15.0",
|
|
69
|
+
"@testing-library/react": "~12.1.2",
|
|
70
|
+
"react": "^17.0.2",
|
|
71
|
+
"react-dom": "^17.0.2"
|
|
72
|
+
},
|
|
67
73
|
"peerDependencies": {
|
|
68
74
|
"react": "^17.0.2",
|
|
69
75
|
"react-dom": "^17.0.2"
|
package/types/DSAccordion.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference path="../../../../shared/typings/react-desc.d.ts" />
|
|
1
2
|
/// <reference types="react" />
|
|
2
3
|
declare const DSAccordion: {
|
|
3
4
|
({ containerProps, activeValue, children, allowMultipleOpen, contentExpandable, onChange, }: {
|
|
@@ -10,11 +11,21 @@ declare const DSAccordion: {
|
|
|
10
11
|
}): JSX.Element;
|
|
11
12
|
propTypes: {
|
|
12
13
|
/** inject props to wrapper */
|
|
13
|
-
containerProps:
|
|
14
|
+
containerProps: {
|
|
15
|
+
defaultValue<T = unknown>(arg: T): {
|
|
16
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
17
|
+
};
|
|
18
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
19
|
+
};
|
|
14
20
|
/**
|
|
15
21
|
* Selected default active value
|
|
16
22
|
*/
|
|
17
|
-
activeValue:
|
|
23
|
+
activeValue: {
|
|
24
|
+
defaultValue<T = unknown>(arg: T): {
|
|
25
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
26
|
+
};
|
|
27
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
28
|
+
};
|
|
18
29
|
/**
|
|
19
30
|
* Accordion items to show
|
|
20
31
|
*/
|
|
@@ -22,17 +33,43 @@ declare const DSAccordion: {
|
|
|
22
33
|
/**
|
|
23
34
|
* Allows multiple accordion items to be open at the same time
|
|
24
35
|
*/
|
|
25
|
-
allowMultipleOpen:
|
|
36
|
+
allowMultipleOpen: {
|
|
37
|
+
defaultValue<T = unknown>(arg: T): {
|
|
38
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
39
|
+
};
|
|
40
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
41
|
+
};
|
|
26
42
|
/**
|
|
27
43
|
* Whether content is expandable or not
|
|
28
44
|
*/
|
|
29
|
-
contentExpandable:
|
|
45
|
+
contentExpandable: {
|
|
46
|
+
defaultValue<T = unknown>(arg: T): {
|
|
47
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
48
|
+
};
|
|
49
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
50
|
+
};
|
|
30
51
|
/**
|
|
31
52
|
* Allows a function that is triggered once the accordion changes
|
|
32
53
|
*/
|
|
33
|
-
onChange:
|
|
54
|
+
onChange: {
|
|
55
|
+
defaultValue<T = unknown>(arg: T): {
|
|
56
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
57
|
+
};
|
|
58
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
59
|
+
};
|
|
34
60
|
};
|
|
35
61
|
};
|
|
36
|
-
declare const DSAccordionWithSchema:
|
|
62
|
+
declare const DSAccordionWithSchema: {
|
|
63
|
+
(props?: {
|
|
64
|
+
containerProps?: {} | undefined;
|
|
65
|
+
activeValue?: string | undefined;
|
|
66
|
+
children: any;
|
|
67
|
+
allowMultipleOpen?: boolean | undefined;
|
|
68
|
+
contentExpandable?: boolean | undefined;
|
|
69
|
+
onChange?: (() => void) | undefined;
|
|
70
|
+
} | undefined): JSX.Element;
|
|
71
|
+
propTypes: unknown;
|
|
72
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
73
|
+
};
|
|
37
74
|
export { DSAccordion, DSAccordionWithSchema };
|
|
38
75
|
export default DSAccordion;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference path="../../../../shared/typings/react-desc.d.ts" />
|
|
1
2
|
import { Component } from 'react';
|
|
2
3
|
declare class DSAccordionItem extends Component {
|
|
3
4
|
constructor(props: any);
|
|
@@ -6,6 +7,10 @@ declare class DSAccordionItem extends Component {
|
|
|
6
7
|
setHeight: (element: any) => void;
|
|
7
8
|
render(): JSX.Element;
|
|
8
9
|
}
|
|
9
|
-
declare const DSAccordionItemWithSchema:
|
|
10
|
+
declare const DSAccordionItemWithSchema: {
|
|
11
|
+
(props?: unknown): JSX.Element;
|
|
12
|
+
propTypes: unknown;
|
|
13
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
14
|
+
};
|
|
10
15
|
export { DSAccordionItem, DSAccordionItemWithSchema };
|
|
11
16
|
export default DSAccordionItem;
|