@discuss-ds/ui 0.5.0 → 0.6.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/dist/index.d.cts CHANGED
@@ -867,6 +867,11 @@ interface ActivityStructureProps extends Omit<React.HTMLAttributes<HTMLElement>,
867
867
  /** Called with the section id by the dashed "Add tag" chip. Omit to hide it. */
868
868
  onAddTag?: (sectionId: string) => void;
869
869
  addTagLabel?: string;
870
+ /**
871
+ * Content shown under the stats and sections. With `stats={[]}` and `children` the card is a single-purpose widget
872
+ * (e.g. "Research Goal") with the same card, title style and colour as the full summary.
873
+ */
874
+ children?: React.ReactNode;
870
875
  }
871
876
  declare const ActivityStructure: React.ForwardRefExoticComponent<ActivityStructureProps & React.RefAttributes<HTMLElement>>;
872
877
 
package/dist/index.d.ts CHANGED
@@ -867,6 +867,11 @@ interface ActivityStructureProps extends Omit<React.HTMLAttributes<HTMLElement>,
867
867
  /** Called with the section id by the dashed "Add tag" chip. Omit to hide it. */
868
868
  onAddTag?: (sectionId: string) => void;
869
869
  addTagLabel?: string;
870
+ /**
871
+ * Content shown under the stats and sections. With `stats={[]}` and `children` the card is a single-purpose widget
872
+ * (e.g. "Research Goal") with the same card, title style and colour as the full summary.
873
+ */
874
+ children?: React.ReactNode;
870
875
  }
871
876
  declare const ActivityStructure: React.ForwardRefExoticComponent<ActivityStructureProps & React.RefAttributes<HTMLElement>>;
872
877
 
package/dist/index.js CHANGED
@@ -3261,7 +3261,7 @@ EditableTag.displayName = "EditableTag";
3261
3261
  // src/components/Research-Specific/ActivityStructure.tsx
3262
3262
  import { jsx as jsx52, jsxs as jsxs38 } from "react/jsx-runtime";
3263
3263
  var ActivityStructure = React51.forwardRef(
3264
- ({ className, title = "Activity Structure", stats, sections, onRemoveTag, onAddTag, addTagLabel = "Add tag", ...props }, ref) => /* @__PURE__ */ jsxs38(
3264
+ ({ className, title = "Activity Structure", stats, sections, onRemoveTag, onAddTag, addTagLabel = "Add tag", children, ...props }, ref) => /* @__PURE__ */ jsxs38(
3265
3265
  "section",
3266
3266
  {
3267
3267
  ref,
@@ -3269,7 +3269,7 @@ var ActivityStructure = React51.forwardRef(
3269
3269
  ...props,
3270
3270
  children: [
3271
3271
  /* @__PURE__ */ jsx52("h3", { className: "text-heading-h3 text-primary", children: title }),
3272
- /* @__PURE__ */ jsx52("div", { className: "grid grid-cols-2 gap-3", children: stats.map(({ id, ...stat }) => /* @__PURE__ */ jsx52(StatCard, { ...stat }, id)) }),
3272
+ stats.length > 0 && /* @__PURE__ */ jsx52("div", { className: "grid grid-cols-2 gap-3", children: stats.map(({ id, ...stat }) => /* @__PURE__ */ jsx52(StatCard, { ...stat }, id)) }),
3273
3273
  sections?.map(({ id, heading, body, tags }) => /* @__PURE__ */ jsxs38("div", { className: "flex flex-col gap-2", children: [
3274
3274
  /* @__PURE__ */ jsx52("h4", { className: "text-heading-h4 text-surface-foreground", children: heading }),
3275
3275
  /* @__PURE__ */ jsx52("div", { className: "text-body-base text-surface-foreground", children: body }),
@@ -3277,7 +3277,8 @@ var ActivityStructure = React51.forwardRef(
3277
3277
  tags?.map((tag) => /* @__PURE__ */ jsx52(EditableTag, { type: "editable", onRemove: onRemoveTag && (() => onRemoveTag(id, tag)), children: tag }, tag)),
3278
3278
  onAddTag && /* @__PURE__ */ jsx52(EditableTag, { type: "add", onClick: () => onAddTag(id), children: addTagLabel })
3279
3279
  ] })
3280
- ] }, id))
3280
+ ] }, id)),
3281
+ children
3281
3282
  ]
3282
3283
  }
3283
3284
  )