@discuss-ds/ui 0.3.3 → 0.3.5

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,19 @@
1
1
  # @discuss-ds/ui
2
2
 
3
+ ## 0.3.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#19](https://github.com/TamyresLucas/Discuss-UI-Storybook/pull/19) [`1c64708`](https://github.com/TamyresLucas/Discuss-UI-Storybook/commit/1c647085c1f97bce822f81975a7e5a100b6250e1) Thanks [@TamyresLucas](https://github.com/TamyresLucas)! - `QuestionOption` (radio and checkbox answer cards): hovering now changes only the fill and shadow. The border changes only when the option is selected (accent). `RadioGroupItem` is now 16px (was 20px, matching the checkbox) with a proportionally smaller centre dot.
8
+
9
+ `ActivityStructure`: section text is rendered in a `div` instead of a `p`, so it can hold block-level content such as an `InlineEdit` without invalid HTML nesting.
10
+
11
+ ## 0.3.4
12
+
13
+ ### Patch Changes
14
+
15
+ - [#17](https://github.com/TamyresLucas/Discuss-UI-Storybook/pull/17) [`3b68a03`](https://github.com/TamyresLucas/Discuss-UI-Storybook/commit/3b68a0345b7b6b8289d62c2a59f2a35a873f46ec) Thanks [@TamyresLucas](https://github.com/TamyresLucas)! - `QuestionNavItem`: hovering a row that is not selected now only changes its fill; the border keeps the default colour. A selected row keeps its accent border.
16
+
3
17
  ## 0.3.3
4
18
 
5
19
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -526,14 +526,14 @@ var RadioGroupItem = React9.forwardRef(({ className, ...props }, ref) => /* @__P
526
526
  {
527
527
  ref,
528
528
  className: cn(
529
- "peer inline-flex size-5 shrink-0 items-center justify-center rounded-full border-2 border-input bg-surface transition-colors",
529
+ "peer inline-flex size-4 shrink-0 items-center justify-center rounded-full border-2 border-input bg-surface transition-colors",
530
530
  "disabled:cursor-not-allowed disabled:opacity-50",
531
531
  // Brand override: selected controls use `ring`, not `primary`/`accent`.
532
532
  "data-[state=checked]:border-ring",
533
533
  className
534
534
  ),
535
535
  ...props,
536
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_radix_ui7.RadioGroup.Indicator, { className: "size-2.5 rounded-full bg-ring" })
536
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_radix_ui7.RadioGroup.Indicator, { className: "size-2 rounded-full bg-ring" })
537
537
  }
538
538
  ));
539
539
  RadioGroupItem.displayName = "RadioGroupItem";
@@ -2893,7 +2893,8 @@ var QuestionNavItem = React43.forwardRef(
2893
2893
  className: cn(
2894
2894
  "group/nav flex h-9.5 w-full max-w-106.5 items-center gap-2 rounded-sm border bg-surface p-2 text-left text-body-small text-surface-foreground transition-colors focus-visible:outline-none",
2895
2895
  error ? ["hover:bg-destructive-soft focus-visible:border-destructive", selected ? "border-destructive" : "border-border"] : [
2896
- "hover:border-input-accent hover:bg-accent-soft focus-visible:border-input-accent",
2896
+ // Hover only changes the fill; the border stays as it is (default grey, or accent when selected).
2897
+ "hover:bg-accent-soft focus-visible:border-input-accent",
2897
2898
  selected ? "border-input-accent" : "border-border"
2898
2899
  ],
2899
2900
  className
@@ -2924,7 +2925,7 @@ QuestionNavItem.displayName = "QuestionNavItem";
2924
2925
  var React44 = __toESM(require("react"), 1);
2925
2926
  var import_react23 = require("@phosphor-icons/react");
2926
2927
  var import_jsx_runtime45 = require("react/jsx-runtime");
2927
- var optionClasses = "flex w-full max-w-150 cursor-pointer items-center gap-2 rounded-md border border-border bg-surface px-4 py-2 text-body-base text-surface-foreground transition-colors hover:border-input hover:bg-accent-soft hover:shadow-md has-[[data-state=checked]]:border-accent-foreground has-[[data-state=checked]]:hover:border-accent-foreground has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50";
2928
+ var optionClasses = "flex w-full max-w-150 cursor-pointer items-center gap-2 rounded-md border border-border bg-surface px-4 py-2 text-body-base text-surface-foreground transition-colors hover:bg-accent-soft hover:shadow-md has-[[data-state=checked]]:border-accent-foreground has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50";
2928
2929
  function QuestionOption(props) {
2929
2930
  const id = React44.useId();
2930
2931
  return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("label", { htmlFor: id, className: cn(optionClasses, props.className), children: [
@@ -3363,7 +3364,7 @@ var ActivityStructure = React51.forwardRef(
3363
3364
  /* @__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)) }),
3364
3365
  sections?.map(({ id, heading, body, tags }) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col gap-2", children: [
3365
3366
  /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h4", { className: "text-heading-h4 text-surface-foreground", children: heading }),
3366
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-body-base text-surface-foreground", children: body }),
3367
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "text-body-base text-surface-foreground", children: body }),
3367
3368
  (tags?.length || onAddTag) && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-wrap items-center gap-2", children: [
3368
3369
  tags?.map((tag) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(EditableTag, { type: "editable", onRemove: onRemoveTag && (() => onRemoveTag(id, tag)), children: tag }, tag)),
3369
3370
  onAddTag && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(EditableTag, { type: "add", onClick: () => onAddTag(id), children: addTagLabel })