@doist/reactist 29.0.0 → 29.1.1

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,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [29.1.1](https://github.com/Doist/reactist/compare/v29.1.0...v29.1.1) (2025-12-01)
4
+
5
+
6
+ ### 🐛 Bug Fixes
7
+
8
+ * Prevent characterCountElement prop from being set on DOM elements ([#986](https://github.com/Doist/reactist/issues/986)) ([432e7c8](https://github.com/Doist/reactist/commit/432e7c8e1b7ec9496fc026ba141e51df9fb41425))
9
+
10
+ ## [29.1.0](https://github.com/Doist/reactist/compare/v29.0.0...v29.1.0) (2025-11-13)
11
+
12
+
13
+ ### 🚀 Features
14
+
15
+ * 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))
16
+
3
17
  ## [29.0.0](https://github.com/Doist/reactist/compare/v28.7.4...v29.0.0) (2025-11-04)
4
18
 
5
19
 
@@ -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"]);
@@ -1229,15 +1231,18 @@ var modules_1fa9b208 = {"selectWrapper":"_7f5f473c","bordered":"_63e2fa62","erro
1229
1231
 
1230
1232
  var SelectField = React__namespace.forwardRef(function SelectField(_a, ref) {
1231
1233
  var _b = _a.variant, variant = _b === void 0 ? 'default' : _b, id = _a.id, label = _a.label, value = _a.value, auxiliaryLabel = _a.auxiliaryLabel, message = _a.message, tone = _a.tone, maxWidth = _a.maxWidth, children = _a.children, hidden = _a.hidden, ariaDescribedBy = _a["aria-describedby"], originalOnChange = _a.onChange, props = tslib.__rest(_a, ["variant", "id", "label", "value", "auxiliaryLabel", "message", "tone", "maxWidth", "children", "hidden", 'aria-describedby', "onChange"]);
1232
- return (React__namespace.createElement(BaseField, { variant: variant, id: id, label: label, value: value, auxiliaryLabel: auxiliaryLabel, message: message, tone: tone, maxWidth: maxWidth, hidden: hidden, "aria-describedby": ariaDescribedBy }, function (extraProps) { return (React__namespace.createElement(Box$1, { "data-testid": "select-wrapper", className: [
1233
- modules_1fa9b208.selectWrapper,
1234
- tone === 'error' ? modules_1fa9b208.error : null,
1235
- variant === 'bordered' ? modules_1fa9b208.bordered : null,
1236
- ] },
1237
- React__namespace.createElement("select", tslib.__assign({}, props, extraProps, { ref: ref, onChange: function (event) {
1238
- originalOnChange === null || originalOnChange === void 0 ? void 0 : originalOnChange(event);
1239
- } }), children),
1240
- React__namespace.createElement(SelectChevron, { "aria-hidden": true }))); }));
1234
+ return (React__namespace.createElement(BaseField, { variant: variant, id: id, label: label, value: value, auxiliaryLabel: auxiliaryLabel, message: message, tone: tone, maxWidth: maxWidth, hidden: hidden, "aria-describedby": ariaDescribedBy }, function (_a) {
1235
+ _a.characterCountElement; var extraProps = tslib.__rest(_a, ["characterCountElement"]);
1236
+ return (React__namespace.createElement(Box$1, { "data-testid": "select-wrapper", className: [
1237
+ modules_1fa9b208.selectWrapper,
1238
+ tone === 'error' ? modules_1fa9b208.error : null,
1239
+ variant === 'bordered' ? modules_1fa9b208.bordered : null,
1240
+ ] },
1241
+ React__namespace.createElement("select", tslib.__assign({}, props, extraProps, { ref: ref, onChange: function (event) {
1242
+ originalOnChange === null || originalOnChange === void 0 ? void 0 : originalOnChange(event);
1243
+ } }), children),
1244
+ React__namespace.createElement(SelectChevron, { "aria-hidden": true })));
1245
+ }));
1241
1246
  });
1242
1247
  function SelectChevron(props) {
1243
1248
  return (React__namespace.createElement("svg", tslib.__assign({ width: "16", height: "16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
@@ -1302,7 +1307,7 @@ var TextArea = React__namespace.forwardRef(function TextArea(_a, ref) {
1302
1307
  tone === 'error' ? modules_2728c236.error : null,
1303
1308
  variant === 'bordered' ? modules_2728c236.bordered : null,
1304
1309
  ], maxWidth: maxWidth, maxLength: maxLength }, function (_a) {
1305
- var onChange = _a.onChange, extraProps = tslib.__rest(_a, ["onChange"]);
1310
+ var onChange = _a.onChange; _a.characterCountElement; var extraProps = tslib.__rest(_a, ["onChange", "characterCountElement"]);
1306
1311
  return (React__namespace.createElement(Box$1, { width: "full", display: "flex", className: modules_2728c236.innerContainer, ref: containerRef },
1307
1312
  React__namespace.createElement("textarea", tslib.__assign({}, props, extraProps, { ref: combinedRef, rows: rows, className: textAreaClassName, maxLength: maxLength, onChange: function (event) {
1308
1313
  originalOnChange === null || originalOnChange === void 0 ? void 0 : originalOnChange(event);