@doist/reactist 29.0.0 → 29.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [29.1.0](https://github.com/Doist/reactist/compare/v29.0.0...v29.1.0) (2025-11-13)
4
+
5
+
6
+ ### 🚀 Features
7
+
8
+ * Add `children` prop to `<Banner>` component to pass extra content ([#985](https://github.com/Doist/reactist/issues/985)) ([bed2ebc](https://github.com/Doist/reactist/commit/bed2ebc881730fbde52444842e00162f4ba2d993))
9
+
3
10
  ## [29.0.0](https://github.com/Doist/reactist/compare/v28.7.4...v29.0.0) (2025-11-04)
4
11
 
5
12
 
@@ -479,7 +479,7 @@ function useId(providedId) {
479
479
  return ref.current;
480
480
  }
481
481
 
482
- var modules_afa80466 = {"banner":"e1b2ef74","image":"_8d3ff024","title":"_9ad57971","description":"_99daf106","secondary":"_59ea31f7","icon":"b1ae548b","closeButton":"c2e4ec08","copy":"cd270dad","inlineLink":"cbbd2929","staticContent":"d3bd2674","actions":"_1a63a5e1","content":"_1705b6ee"};
482
+ var modules_afa80466 = {"banner":"_84addf6f","image":"_95759431","title":"_4103765b","description":"cf9f3361","secondary":"f4b524bc","icon":"_423bcd02","closeButton":"_0f89a4a4","copy":"_141483aa","inlineLink":"fd918521","actions":"e16490a8","topContent":"b1b4f510","content":"_105440c8"};
483
483
 
484
484
  /**
485
485
  * Type guard to check if the action is an Action object (button or link)
@@ -491,30 +491,32 @@ function isActionObject$1(action) {
491
491
  (action.type === 'button' || action.type === 'link'));
492
492
  }
493
493
  var Banner = React__namespace.forwardRef(function Banner(_a, ref) {
494
- var id = _a.id, type = _a.type, title = _a.title, description = _a.description, action = _a.action, icon = _a.icon, image = _a.image, inlineLinks = _a.inlineLinks, closeLabel = _a.closeLabel, onClose = _a.onClose, props = tslib.__rest(_a, ["id", "type", "title", "description", "action", "icon", "image", "inlineLinks", "closeLabel", "onClose"]);
494
+ var id = _a.id, type = _a.type, title = _a.title, description = _a.description, children = _a.children, action = _a.action, icon = _a.icon, image = _a.image, inlineLinks = _a.inlineLinks, closeLabel = _a.closeLabel, onClose = _a.onClose, props = tslib.__rest(_a, ["id", "type", "title", "description", "children", "action", "icon", "image", "inlineLinks", "closeLabel", "onClose"]);
495
495
  var titleId = useId();
496
496
  var descriptionId = useId();
497
497
  var closeButton = onClose ? (React__namespace.createElement(IconButton, { exceptionallySetClassName: modules_afa80466.closeButton, variant: "quaternary", onClick: onClose, icon: React__namespace.createElement(CloseIcon, null), "aria-label": closeLabel !== null && closeLabel !== void 0 ? closeLabel : 'Close banner' })) : null;
498
498
  return (React__namespace.createElement(Box$1, tslib.__assign({}, props, { ref: ref, id: id, display: "flex", flexDirection: "column", justifyContent: "center", role: "status", "aria-labelledby": title ? titleId : descriptionId, "aria-describedby": title ? descriptionId : undefined, "aria-live": "polite", tabIndex: 0, borderRadius: "full", className: modules_afa80466.banner }),
499
499
  image ? React__namespace.createElement(Box$1, { className: modules_afa80466.image }, image) : null,
500
- React__namespace.createElement(Box$1, { className: modules_afa80466.content, display: "flex", gap: "small", alignItems: "center" },
501
- React__namespace.createElement(Box$1, { className: modules_afa80466.staticContent, display: "flex", gap: "small", flexGrow: 1 },
502
- React__namespace.createElement(Box$1, { className: modules_afa80466.icon },
503
- type === 'neutral' ? icon : React__namespace.createElement(BannerIcon, { type: type }),
504
- closeButton),
505
- React__namespace.createElement(Box$1, { className: modules_afa80466.copy, display: "flex", flexDirection: "column" },
506
- title ? (React__namespace.createElement(Box$1, { id: titleId, className: modules_afa80466.title }, title)) : null,
507
- React__namespace.createElement(Box$1, { id: descriptionId, className: [modules_afa80466.description, title ? modules_afa80466.secondary : null] },
508
- description, inlineLinks === null || inlineLinks === void 0 ? void 0 :
509
- inlineLinks.map(function (_a, index) {
510
- var label = _a.label, props = tslib.__rest(_a, ["label"]);
511
- return (React__namespace.createElement(React__namespace.Fragment, { key: index },
512
- React__namespace.createElement(TextLink, tslib.__assign({}, props, { exceptionallySetClassName: modules_afa80466.inlineLink }), label),
513
- index < inlineLinks.length - 1 ? React__namespace.createElement("span", null, " \u00B7 ") : ''));
514
- })))),
515
- action || closeButton ? (React__namespace.createElement(Box$1, { className: modules_afa80466.actions, display: "flex", gap: "small" },
516
- action ? (isActionObject$1(action) ? (action.type === 'button' ? (React__namespace.createElement(ActionButton, tslib.__assign({}, action))) : (React__namespace.createElement(ActionLink, tslib.__assign({}, action)))) : (action)) : null,
517
- closeButton)) : null)));
500
+ React__namespace.createElement(Box$1, { className: modules_afa80466.content, display: "flex", gap: "small" },
501
+ React__namespace.createElement(Box$1, { className: modules_afa80466.icon },
502
+ type === 'neutral' ? icon : React__namespace.createElement(BannerIcon, { type: type }),
503
+ closeButton),
504
+ React__namespace.createElement(Box$1, { display: "flex", flexDirection: "column", gap: "small", flexGrow: 1 },
505
+ React__namespace.createElement(Box$1, { className: modules_afa80466.topContent, display: "flex", gap: "small", alignItems: "flexStart" },
506
+ React__namespace.createElement(Box$1, { className: modules_afa80466.copy, display: "flex", flexDirection: "column", flexGrow: 1 },
507
+ title ? (React__namespace.createElement(Box$1, { id: titleId, className: modules_afa80466.title }, title)) : null,
508
+ React__namespace.createElement(Box$1, { id: descriptionId, className: [modules_afa80466.description, title ? modules_afa80466.secondary : null] },
509
+ description, inlineLinks === null || inlineLinks === void 0 ? void 0 :
510
+ inlineLinks.map(function (_a, index) {
511
+ var label = _a.label, props = tslib.__rest(_a, ["label"]);
512
+ return (React__namespace.createElement(React__namespace.Fragment, { key: index },
513
+ React__namespace.createElement(TextLink, tslib.__assign({}, props, { exceptionallySetClassName: modules_afa80466.inlineLink }), label),
514
+ index < inlineLinks.length - 1 ? React__namespace.createElement("span", null, " \u00B7 ") : ''));
515
+ }))),
516
+ action || closeButton ? (React__namespace.createElement(Box$1, { className: modules_afa80466.actions, display: "flex", gap: "small" },
517
+ action ? (isActionObject$1(action) ? (action.type === 'button' ? (React__namespace.createElement(ActionButton, tslib.__assign({}, action))) : (React__namespace.createElement(ActionLink, tslib.__assign({}, action)))) : (action)) : null,
518
+ closeButton)) : null),
519
+ children))));
518
520
  });
519
521
  function ActionButton(_a) {
520
522
  _a.type; var label = _a.label, props = tslib.__rest(_a, ["type", "label"]);