@reykjavik/hanna-react 0.10.149 → 0.10.150

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/CHANGELOG.md CHANGED
@@ -4,11 +4,19 @@
4
4
 
5
5
  - ... <!-- Add new lines here. -->
6
6
 
7
+ ## 0.10.150
8
+
9
+ _2025-05-08_
10
+
11
+ - `InfoBlock`:
12
+ - feat: Suppress rendering empty `div.InfoBlock__items` list element
13
+
7
14
  ## 0.10.149
8
15
 
9
16
  _2025-04-02_
10
17
 
11
- - perf: Don't render `Modal`s (and their contents) unless "visible"
18
+ - `Modal`:
19
+ - perf: Don't render `Modal`s (and their contents) unless "visible"
12
20
 
13
21
  ## 0.10.148
14
22
 
package/InfoBlock.js CHANGED
@@ -9,7 +9,7 @@ const InfoBlock = (props) => {
9
9
  return (react_1.default.createElement("div", Object.assign({}, wrapperProps, { className: (0, hanna_utils_1.modifiedClass)('InfoBlock', null, (wrapperProps || {}).className) }),
10
10
  react_1.default.createElement("h2", { className: "InfoBlock__title" }, title),
11
11
  subtitle && react_1.default.createElement("div", { className: "InfoBlock__subtitle" }, subtitle),
12
- react_1.default.createElement("ul", { className: "InfoBlock__items" }, items.map((item, i) => (react_1.default.createElement("li", { key: i, className: "InfoBlock__item" }, item)))),
12
+ items.length > 0 && (react_1.default.createElement("ul", { className: "InfoBlock__items" }, items.map((item, i) => (react_1.default.createElement("li", { key: i, className: "InfoBlock__item" }, item))))),
13
13
  'extraInfo' in props && (react_1.default.createElement("div", { className: "InfoBlock__extrainfo" }, props.extraInfo)),
14
14
  'attention' in props && (react_1.default.createElement("div", { className: "InfoBlock__attention" }, props.attention))));
15
15
  };
package/esm/InfoBlock.js CHANGED
@@ -5,7 +5,7 @@ export const InfoBlock = (props) => {
5
5
  return (React.createElement("div", Object.assign({}, wrapperProps, { className: modifiedClass('InfoBlock', null, (wrapperProps || {}).className) }),
6
6
  React.createElement("h2", { className: "InfoBlock__title" }, title),
7
7
  subtitle && React.createElement("div", { className: "InfoBlock__subtitle" }, subtitle),
8
- React.createElement("ul", { className: "InfoBlock__items" }, items.map((item, i) => (React.createElement("li", { key: i, className: "InfoBlock__item" }, item)))),
8
+ items.length > 0 && (React.createElement("ul", { className: "InfoBlock__items" }, items.map((item, i) => (React.createElement("li", { key: i, className: "InfoBlock__item" }, item))))),
9
9
  'extraInfo' in props && (React.createElement("div", { className: "InfoBlock__extrainfo" }, props.extraInfo)),
10
10
  'attention' in props && (React.createElement("div", { className: "InfoBlock__attention" }, props.attention))));
11
11
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reykjavik/hanna-react",
3
- "version": "0.10.149",
3
+ "version": "0.10.150",
4
4
  "author": "Reykjavík (http://www.reykjavik.is)",
5
5
  "contributors": [
6
6
  "Hugsmiðjan ehf (http://www.hugsmidjan.is)",
@@ -17,7 +17,7 @@
17
17
  "@floating-ui/react": "^0.19.2",
18
18
  "@hugsmidjan/qj": "^4.22.1",
19
19
  "@hugsmidjan/react": "^0.4.32",
20
- "@reykjavik/hanna-css": "^0.4.17",
20
+ "@reykjavik/hanna-css": "^0.4.18",
21
21
  "@reykjavik/hanna-utils": "^0.2.20",
22
22
  "@types/react-autosuggest": "^10.1.0",
23
23
  "@types/react-datepicker": "^4.8.0",