@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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @discuss-ds/ui
2
2
 
3
+ ## 0.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#31](https://github.com/TamyresLucas/Discuss-UI-Storybook/pull/31) [`4dc82b8`](https://github.com/TamyresLucas/Discuss-UI-Storybook/commit/4dc82b890fb61f151efbb191793b733f45554913) Thanks [@TamyresLucas](https://github.com/TamyresLucas)! - `QuestionEditorCard`: the footer "Add choice" action is now an outline button with a plus icon and the visible label "Add choice" (it was an icon-only ghost button). Its accessible name and `onAdd` behaviour are unchanged; the paste button is untouched.
8
+
9
+ ## 0.6.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#29](https://github.com/TamyresLucas/Discuss-UI-Storybook/pull/29) [`1dd39c5`](https://github.com/TamyresLucas/Discuss-UI-Storybook/commit/1dd39c577a5fa4b96effedd38f1eb5003529c544) Thanks [@TamyresLucas](https://github.com/TamyresLucas)! - `ActivityStructure` can now be a single-purpose widget: it renders `children` under its title, stats and sections, and no longer renders an empty stats grid when `stats` is empty. `<ActivityStructure title="Research Goal" stats={[]}>…</ActivityStructure>` has the same card, title style and colour as the full Activity Summary. Existing usage is unchanged.
14
+
3
15
  ## 0.5.0
4
16
 
5
17
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -2822,17 +2822,10 @@ var QuestionEditorCard = React41.forwardRef(
2822
2822
  footer && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-center justify-between", children: [
2823
2823
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "text-ui-caption text-secondary-muted-foreground", children: countLabel }),
2824
2824
  /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-center gap-2", children: [
2825
- onAdd && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2826
- Button,
2827
- {
2828
- type: "button",
2829
- variant: "ghost",
2830
- size: "icon",
2831
- "aria-label": "Add choice",
2832
- onClick: onAdd,
2833
- children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react20.Plus, { size: 16, "aria-hidden": true })
2834
- }
2835
- ),
2825
+ onAdd && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Button, { type: "button", variant: "outline", onClick: onAdd, children: [
2826
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react20.Plus, { size: 16, "aria-hidden": true }),
2827
+ "Add choice"
2828
+ ] }),
2836
2829
  onPaste && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2837
2830
  Button,
2838
2831
  {
@@ -3407,7 +3400,7 @@ EditableTag.displayName = "EditableTag";
3407
3400
  // src/components/Research-Specific/ActivityStructure.tsx
3408
3401
  var import_jsx_runtime52 = require("react/jsx-runtime");
3409
3402
  var ActivityStructure = React51.forwardRef(
3410
- ({ className, title = "Activity Structure", stats, sections, onRemoveTag, onAddTag, addTagLabel = "Add tag", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
3403
+ ({ className, title = "Activity Structure", stats, sections, onRemoveTag, onAddTag, addTagLabel = "Add tag", children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
3411
3404
  "section",
3412
3405
  {
3413
3406
  ref,
@@ -3415,7 +3408,7 @@ var ActivityStructure = React51.forwardRef(
3415
3408
  ...props,
3416
3409
  children: [
3417
3410
  /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h3", { className: "text-heading-h3 text-primary", children: title }),
3418
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "grid grid-cols-2 gap-3", children: stats.map(({ id, ...stat }) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(StatCard, { ...stat }, id)) }),
3411
+ stats.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "grid grid-cols-2 gap-3", children: stats.map(({ id, ...stat }) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(StatCard, { ...stat }, id)) }),
3419
3412
  sections?.map(({ id, heading, body, tags }) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col gap-2", children: [
3420
3413
  /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h4", { className: "text-heading-h4 text-surface-foreground", children: heading }),
3421
3414
  /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "text-body-base text-surface-foreground", children: body }),
@@ -3423,7 +3416,8 @@ var ActivityStructure = React51.forwardRef(
3423
3416
  tags?.map((tag) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(EditableTag, { type: "editable", onRemove: onRemoveTag && (() => onRemoveTag(id, tag)), children: tag }, tag)),
3424
3417
  onAddTag && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(EditableTag, { type: "add", onClick: () => onAddTag(id), children: addTagLabel })
3425
3418
  ] })
3426
- ] }, id))
3419
+ ] }, id)),
3420
+ children
3427
3421
  ]
3428
3422
  }
3429
3423
  )