@discuss-ds/ui 0.5.0 → 0.6.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/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
@@ -2676,17 +2676,10 @@ var QuestionEditorCard = React41.forwardRef(
2676
2676
  footer && /* @__PURE__ */ jsxs29("div", { className: "flex items-center justify-between", children: [
2677
2677
  /* @__PURE__ */ jsx42("p", { className: "text-ui-caption text-secondary-muted-foreground", children: countLabel }),
2678
2678
  /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2", children: [
2679
- onAdd && /* @__PURE__ */ jsx42(
2680
- Button,
2681
- {
2682
- type: "button",
2683
- variant: "ghost",
2684
- size: "icon",
2685
- "aria-label": "Add choice",
2686
- onClick: onAdd,
2687
- children: /* @__PURE__ */ jsx42(Plus3, { size: 16, "aria-hidden": true })
2688
- }
2689
- ),
2679
+ onAdd && /* @__PURE__ */ jsxs29(Button, { type: "button", variant: "outline", onClick: onAdd, children: [
2680
+ /* @__PURE__ */ jsx42(Plus3, { size: 16, "aria-hidden": true }),
2681
+ "Add choice"
2682
+ ] }),
2690
2683
  onPaste && /* @__PURE__ */ jsx42(
2691
2684
  Button,
2692
2685
  {
@@ -3261,7 +3254,7 @@ EditableTag.displayName = "EditableTag";
3261
3254
  // src/components/Research-Specific/ActivityStructure.tsx
3262
3255
  import { jsx as jsx52, jsxs as jsxs38 } from "react/jsx-runtime";
3263
3256
  var ActivityStructure = React51.forwardRef(
3264
- ({ className, title = "Activity Structure", stats, sections, onRemoveTag, onAddTag, addTagLabel = "Add tag", ...props }, ref) => /* @__PURE__ */ jsxs38(
3257
+ ({ className, title = "Activity Structure", stats, sections, onRemoveTag, onAddTag, addTagLabel = "Add tag", children, ...props }, ref) => /* @__PURE__ */ jsxs38(
3265
3258
  "section",
3266
3259
  {
3267
3260
  ref,
@@ -3269,7 +3262,7 @@ var ActivityStructure = React51.forwardRef(
3269
3262
  ...props,
3270
3263
  children: [
3271
3264
  /* @__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)) }),
3265
+ stats.length > 0 && /* @__PURE__ */ jsx52("div", { className: "grid grid-cols-2 gap-3", children: stats.map(({ id, ...stat }) => /* @__PURE__ */ jsx52(StatCard, { ...stat }, id)) }),
3273
3266
  sections?.map(({ id, heading, body, tags }) => /* @__PURE__ */ jsxs38("div", { className: "flex flex-col gap-2", children: [
3274
3267
  /* @__PURE__ */ jsx52("h4", { className: "text-heading-h4 text-surface-foreground", children: heading }),
3275
3268
  /* @__PURE__ */ jsx52("div", { className: "text-body-base text-surface-foreground", children: body }),
@@ -3277,7 +3270,8 @@ var ActivityStructure = React51.forwardRef(
3277
3270
  tags?.map((tag) => /* @__PURE__ */ jsx52(EditableTag, { type: "editable", onRemove: onRemoveTag && (() => onRemoveTag(id, tag)), children: tag }, tag)),
3278
3271
  onAddTag && /* @__PURE__ */ jsx52(EditableTag, { type: "add", onClick: () => onAddTag(id), children: addTagLabel })
3279
3272
  ] })
3280
- ] }, id))
3273
+ ] }, id)),
3274
+ children
3281
3275
  ]
3282
3276
  }
3283
3277
  )