@panneau/display-text-description 4.0.2 → 4.0.5
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/es/index.js +17 -9
- package/package.json +4 -4
package/es/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import get from 'lodash-es/get';
|
|
|
4
4
|
import isObject from 'lodash-es/isObject';
|
|
5
5
|
import { useMemo } from 'react';
|
|
6
6
|
import { useIntl } from 'react-intl';
|
|
7
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
7
8
|
|
|
8
9
|
function TextDescription(_ref) {
|
|
9
10
|
var _ref$value = _ref.value,
|
|
@@ -35,15 +36,22 @@ function TextDescription(_ref) {
|
|
|
35
36
|
}, [initialValue, descriptionPath, descriptionValues, item, locale, parentLocale]),
|
|
36
37
|
value = _useMemo.value,
|
|
37
38
|
label = _useMemo.label;
|
|
38
|
-
return label !== null ? /*#__PURE__*/
|
|
39
|
-
className: classNames([_defineProperty({}, className, className !== null)])
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
'text-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
return label !== null ? /*#__PURE__*/jsxs("div", {
|
|
40
|
+
className: classNames([_defineProperty({}, className, className !== null)]),
|
|
41
|
+
children: [/*#__PURE__*/jsx("p", {
|
|
42
|
+
className: "d-block m-0 p-0 lh-sm",
|
|
43
|
+
children: value || placeholder
|
|
44
|
+
}), /*#__PURE__*/jsx("p", {
|
|
45
|
+
className: classNames(['d-block m-0 p-0 text-opacity-50 lh-sm', {
|
|
46
|
+
'text-body': !selected
|
|
47
|
+
}]),
|
|
48
|
+
children: /*#__PURE__*/jsx("small", {
|
|
49
|
+
children: label
|
|
50
|
+
})
|
|
51
|
+
})]
|
|
52
|
+
}) : /*#__PURE__*/jsx(Fragment, {
|
|
53
|
+
children: value || placeholder
|
|
54
|
+
});
|
|
47
55
|
}
|
|
48
56
|
|
|
49
57
|
export { TextDescription as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/display-text-description",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.5",
|
|
4
4
|
"description": "Text with description in list",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@babel/runtime": "^7.12.5",
|
|
52
|
-
"@panneau/core": "^4.0.
|
|
53
|
-
"@panneau/themes": "^4.0.
|
|
52
|
+
"@panneau/core": "^4.0.5",
|
|
53
|
+
"@panneau/themes": "^4.0.5",
|
|
54
54
|
"classnames": "^2.5.1",
|
|
55
55
|
"lodash-es": "^4.17.21",
|
|
56
56
|
"prop-types": "^15.7.2",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"publishConfig": {
|
|
60
60
|
"access": "public"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "ac8b065e8c7ada1d176d15eff1c0fa53599ad31f"
|
|
63
63
|
}
|