@panneau/display-text-description 4.0.1 → 4.0.4

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.
Files changed (2) hide show
  1. package/es/index.js +18 -10
  2. package/package.json +4 -4
package/es/index.js CHANGED
@@ -2,8 +2,9 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import classNames from 'classnames';
3
3
  import get from 'lodash-es/get';
4
4
  import isObject from 'lodash-es/isObject';
5
- import React, { useMemo } from 'react';
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__*/React.createElement("div", {
39
- className: classNames([_defineProperty({}, className, className !== null)])
40
- }, /*#__PURE__*/React.createElement("p", {
41
- className: "d-block m-0 p-0 lh-sm"
42
- }, value || placeholder), /*#__PURE__*/React.createElement("p", {
43
- className: classNames(['d-block m-0 p-0 text-opacity-50 lh-sm', {
44
- 'text-body': !selected
45
- }])
46
- }, /*#__PURE__*/React.createElement("small", null, label))) : /*#__PURE__*/React.createElement(React.Fragment, null, value || placeholder);
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.1",
3
+ "version": "4.0.4",
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.1",
53
- "@panneau/themes": "^4.0.1",
52
+ "@panneau/core": "^4.0.4",
53
+ "@panneau/themes": "^4.0.4",
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": "dbdf65640625c027ecd56cf2b816b80a5c38cb8d"
62
+ "gitHead": "e854451a718c6bc7dcde2b804c9913d8ac0297ff"
63
63
  }