@elliemae/ds-read-more 2.4.2-rc.9 → 2.4.2
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/DSReadMore.js +1 -4
- package/cjs/MoreLessButton.js +2 -2
- package/esm/DSReadMore.js +1 -4
- package/esm/MoreLessButton.js +2 -2
- package/package.json +5 -5
package/cjs/DSReadMore.js
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _jsx2 = require('@babel/runtime/helpers/jsx');
|
|
6
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
7
6
|
var react = require('react');
|
|
8
7
|
var lodash = require('lodash');
|
|
9
8
|
var reactDesc = require('react-desc');
|
|
@@ -71,10 +70,8 @@ const DSReadMore = props => {
|
|
|
71
70
|
element.innerText = content.slice(0, textEnd);
|
|
72
71
|
}, [content]);
|
|
73
72
|
react.useLayoutEffect(() => {
|
|
74
|
-
var _ref$current;
|
|
75
|
-
|
|
76
73
|
const textElement = ref.current;
|
|
77
|
-
const parentElement =
|
|
74
|
+
const parentElement = ref.current?.parentElement;
|
|
78
75
|
|
|
79
76
|
if (parentElement && textElement) {
|
|
80
77
|
textElement.innerText = content;
|
package/cjs/MoreLessButton.js
CHANGED
|
@@ -19,13 +19,13 @@ const StyledButton = /*#__PURE__*/styled__default["default"](dsButton.DSButtonV2
|
|
|
19
19
|
withTooltip,
|
|
20
20
|
theme
|
|
21
21
|
} = _ref;
|
|
22
|
-
return withTooltip ? 'inherit' :
|
|
22
|
+
return withTooltip ? 'inherit' : `${theme.colors.brand['600']}`;
|
|
23
23
|
}, _ref2 => {
|
|
24
24
|
let {
|
|
25
25
|
withTooltip,
|
|
26
26
|
theme
|
|
27
27
|
} = _ref2;
|
|
28
|
-
return withTooltip ? 'inherit' :
|
|
28
|
+
return withTooltip ? 'inherit' : `${theme.colors.brand['600']}`;
|
|
29
29
|
}, _ref3 => {
|
|
30
30
|
let {
|
|
31
31
|
withTooltip
|
package/esm/DSReadMore.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _jsx2 from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
2
|
import { useRef, useState, useCallback, useLayoutEffect } from 'react';
|
|
4
3
|
import { noop } from 'lodash';
|
|
5
4
|
import { PropTypes, describe } from 'react-desc';
|
|
@@ -62,10 +61,8 @@ const DSReadMore = props => {
|
|
|
62
61
|
element.innerText = content.slice(0, textEnd);
|
|
63
62
|
}, [content]);
|
|
64
63
|
useLayoutEffect(() => {
|
|
65
|
-
var _ref$current;
|
|
66
|
-
|
|
67
64
|
const textElement = ref.current;
|
|
68
|
-
const parentElement =
|
|
65
|
+
const parentElement = ref.current?.parentElement;
|
|
69
66
|
|
|
70
67
|
if (parentElement && textElement) {
|
|
71
68
|
textElement.innerText = content;
|
package/esm/MoreLessButton.js
CHANGED
|
@@ -10,13 +10,13 @@ const StyledButton = /*#__PURE__*/styled(DSButtonV2).withConfig({
|
|
|
10
10
|
withTooltip,
|
|
11
11
|
theme
|
|
12
12
|
} = _ref;
|
|
13
|
-
return withTooltip ? 'inherit' :
|
|
13
|
+
return withTooltip ? 'inherit' : `${theme.colors.brand['600']}`;
|
|
14
14
|
}, _ref2 => {
|
|
15
15
|
let {
|
|
16
16
|
withTooltip,
|
|
17
17
|
theme
|
|
18
18
|
} = _ref2;
|
|
19
|
-
return withTooltip ? 'inherit' :
|
|
19
|
+
return withTooltip ? 'inherit' : `${theme.colors.brand['600']}`;
|
|
20
20
|
}, _ref3 => {
|
|
21
21
|
let {
|
|
22
22
|
withTooltip
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-read-more",
|
|
3
|
-
"version": "2.4.2
|
|
3
|
+
"version": "2.4.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Read More",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"build": "node ../../scripts/build/build.js"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@elliemae/ds-button": "2.4.2
|
|
44
|
-
"@elliemae/ds-shared": "2.4.2
|
|
45
|
-
"@elliemae/ds-system": "2.4.2
|
|
46
|
-
"@elliemae/ds-tooltip": "2.4.2
|
|
43
|
+
"@elliemae/ds-button": "2.4.2",
|
|
44
|
+
"@elliemae/ds-shared": "2.4.2",
|
|
45
|
+
"@elliemae/ds-system": "2.4.2",
|
|
46
|
+
"@elliemae/ds-tooltip": "2.4.2",
|
|
47
47
|
"react-desc": "~4.1.3"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|