@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/CHANGELOG.md +6 -0
- package/dist/index.cjs +4 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @discuss-ds/ui
|
|
2
2
|
|
|
3
|
+
## 0.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#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.
|
|
8
|
+
|
|
3
9
|
## 0.5.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -3407,7 +3407,7 @@ EditableTag.displayName = "EditableTag";
|
|
|
3407
3407
|
// src/components/Research-Specific/ActivityStructure.tsx
|
|
3408
3408
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
3409
3409
|
var ActivityStructure = React51.forwardRef(
|
|
3410
|
-
({ className, title = "Activity Structure", stats, sections, onRemoveTag, onAddTag, addTagLabel = "Add tag", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
3410
|
+
({ className, title = "Activity Structure", stats, sections, onRemoveTag, onAddTag, addTagLabel = "Add tag", children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
3411
3411
|
"section",
|
|
3412
3412
|
{
|
|
3413
3413
|
ref,
|
|
@@ -3415,7 +3415,7 @@ var ActivityStructure = React51.forwardRef(
|
|
|
3415
3415
|
...props,
|
|
3416
3416
|
children: [
|
|
3417
3417
|
/* @__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)) }),
|
|
3418
|
+
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
3419
|
sections?.map(({ id, heading, body, tags }) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
3420
3420
|
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h4", { className: "text-heading-h4 text-surface-foreground", children: heading }),
|
|
3421
3421
|
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "text-body-base text-surface-foreground", children: body }),
|
|
@@ -3423,7 +3423,8 @@ var ActivityStructure = React51.forwardRef(
|
|
|
3423
3423
|
tags?.map((tag) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(EditableTag, { type: "editable", onRemove: onRemoveTag && (() => onRemoveTag(id, tag)), children: tag }, tag)),
|
|
3424
3424
|
onAddTag && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(EditableTag, { type: "add", onClick: () => onAddTag(id), children: addTagLabel })
|
|
3425
3425
|
] })
|
|
3426
|
-
] }, id))
|
|
3426
|
+
] }, id)),
|
|
3427
|
+
children
|
|
3427
3428
|
]
|
|
3428
3429
|
}
|
|
3429
3430
|
)
|