@discuss-ds/ui 0.10.1 → 0.12.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 +12 -0
- package/dist/index.cjs +11 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +14 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @discuss-ds/ui
|
|
2
2
|
|
|
3
|
+
## 0.12.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#60](https://github.com/TamyresLucas/Discuss-UI-Storybook/pull/60) [`503586f`](https://github.com/TamyresLucas/Discuss-UI-Storybook/commit/503586f5c36ed1379939234e45a83ea4c4b5409a) Thanks [@TamyresLucas](https://github.com/TamyresLucas)! - `QuestionEditorCard`: new optional `error` prop shows a short inline message at the bottom of the card (warning icon, destructive foreground). `QuestionNavItem`'s error warning icon now uses the destructive foreground token (same colour, correct token).
|
|
8
|
+
|
|
9
|
+
## 0.11.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#58](https://github.com/TamyresLucas/Discuss-UI-Storybook/pull/58) [`d73d2ac`](https://github.com/TamyresLucas/Discuss-UI-Storybook/commit/d73d2ac0ef56d834871562c243edcf420ceef57a) Thanks [@TamyresLucas](https://github.com/TamyresLucas)! - `ActivityStructure`: the title now uses the section text style (`text-body-section`, semibold 16px) in the default foreground colour (`text-surface-foreground`) instead of the purple h3 heading style, and a new optional `action` prop shows a control (e.g. a Settings button) at the right of the title. Without `action` the layout is unchanged apart from the title text style.
|
|
14
|
+
|
|
3
15
|
## 0.10.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -2762,6 +2762,7 @@ var QuestionEditorCard = React41.forwardRef(
|
|
|
2762
2762
|
onAdd,
|
|
2763
2763
|
onPaste,
|
|
2764
2764
|
note,
|
|
2765
|
+
error,
|
|
2765
2766
|
dragHandleProps,
|
|
2766
2767
|
children,
|
|
2767
2768
|
...props
|
|
@@ -2834,6 +2835,10 @@ var QuestionEditorCard = React41.forwardRef(
|
|
|
2834
2835
|
),
|
|
2835
2836
|
children
|
|
2836
2837
|
] }),
|
|
2838
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("p", { className: "flex items-center gap-1 text-ui-caption text-destructive-foreground", children: [
|
|
2839
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react20.Warning, { size: 16, "aria-hidden": true, className: "shrink-0" }),
|
|
2840
|
+
error
|
|
2841
|
+
] }),
|
|
2837
2842
|
footer && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
2838
2843
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "text-ui-caption text-secondary-muted-foreground", children: countLabel }),
|
|
2839
2844
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
@@ -2925,7 +2930,7 @@ var QuestionNavItem = React43.forwardRef(
|
|
|
2925
2930
|
children: [
|
|
2926
2931
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("span", { "aria-hidden": "true", className: "relative flex size-4 shrink-0 items-center justify-center", children: [
|
|
2927
2932
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react22.DotsSixVertical, { size: 16, className: "hidden group-hover/nav:block" }),
|
|
2928
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "group-hover/nav:hidden", children: error ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react22.Warning, { size: 16, className: "text-destructive" }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2933
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "group-hover/nav:hidden", children: error ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react22.Warning, { size: 16, className: "text-destructive-foreground" }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2929
2934
|
QuestionTypeIcon,
|
|
2930
2935
|
{
|
|
2931
2936
|
type: questionType,
|
|
@@ -3525,14 +3530,17 @@ EditableTag.displayName = "EditableTag";
|
|
|
3525
3530
|
// src/components/Research-Specific/ActivityStructure.tsx
|
|
3526
3531
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
3527
3532
|
var ActivityStructure = React52.forwardRef(
|
|
3528
|
-
({ className, title = "Activity Structure", stats, sections, onRemoveTag, onAddTag, addTagLabel = "Add tag", children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
3533
|
+
({ className, title = "Activity Structure", stats, sections, onRemoveTag, onAddTag, addTagLabel = "Add tag", action, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
3529
3534
|
"section",
|
|
3530
3535
|
{
|
|
3531
3536
|
ref,
|
|
3532
3537
|
className: cn("flex w-full max-w-96.5 flex-col gap-4 rounded-xl bg-surface p-4", className),
|
|
3533
3538
|
...props,
|
|
3534
3539
|
children: [
|
|
3535
|
-
/* @__PURE__ */ (0, import_jsx_runtime53.
|
|
3540
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
|
|
3541
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("h3", { className: "text-body-section text-surface-foreground", children: title }),
|
|
3542
|
+
action
|
|
3543
|
+
] }),
|
|
3536
3544
|
stats.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "grid grid-cols-2 gap-3", children: stats.map(({ id, ...stat }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(StatCard, { ...stat }, id)) }),
|
|
3537
3545
|
sections?.map(({ id, heading, body, tags }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
3538
3546
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("h4", { className: "text-heading-h4 text-surface-foreground", children: heading }),
|