@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 +14 -0
- package/dist/index.cjs +6 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -835,6 +835,7 @@ interface ActivityStat extends Pick<StatCardProps, 'label' | 'value' | 'icon' |
|
|
|
835
835
|
interface ActivitySection {
|
|
836
836
|
id: string;
|
|
837
837
|
heading: React.ReactNode;
|
|
838
|
+
/** Section text. May contain block elements (e.g. an `InlineEdit`), so it is rendered in a `div`. */
|
|
838
839
|
body: React.ReactNode;
|
|
839
840
|
/** Removable tags shown under the body. */
|
|
840
841
|
tags?: string[];
|
package/dist/index.d.ts
CHANGED
|
@@ -835,6 +835,7 @@ interface ActivityStat extends Pick<StatCardProps, 'label' | 'value' | 'icon' |
|
|
|
835
835
|
interface ActivitySection {
|
|
836
836
|
id: string;
|
|
837
837
|
heading: React.ReactNode;
|
|
838
|
+
/** Section text. May contain block elements (e.g. an `InlineEdit`), so it is rendered in a `div`. */
|
|
838
839
|
body: React.ReactNode;
|
|
839
840
|
/** Removable tags shown under the body. */
|
|
840
841
|
tags?: string[];
|
package/dist/index.js
CHANGED
|
@@ -368,14 +368,14 @@ var RadioGroupItem = React9.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
368
368
|
{
|
|
369
369
|
ref,
|
|
370
370
|
className: cn(
|
|
371
|
-
"peer inline-flex size-
|
|
371
|
+
"peer inline-flex size-4 shrink-0 items-center justify-center rounded-full border-2 border-input bg-surface transition-colors",
|
|
372
372
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
373
373
|
// Brand override: selected controls use `ring`, not `primary`/`accent`.
|
|
374
374
|
"data-[state=checked]:border-ring",
|
|
375
375
|
className
|
|
376
376
|
),
|
|
377
377
|
...props,
|
|
378
|
-
children: /* @__PURE__ */ jsx9(RadioGroupPrimitive.Indicator, { className: "size-2
|
|
378
|
+
children: /* @__PURE__ */ jsx9(RadioGroupPrimitive.Indicator, { className: "size-2 rounded-full bg-ring" })
|
|
379
379
|
}
|
|
380
380
|
));
|
|
381
381
|
RadioGroupItem.displayName = "RadioGroupItem";
|
|
@@ -2747,7 +2747,8 @@ var QuestionNavItem = React43.forwardRef(
|
|
|
2747
2747
|
className: cn(
|
|
2748
2748
|
"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",
|
|
2749
2749
|
error ? ["hover:bg-destructive-soft focus-visible:border-destructive", selected ? "border-destructive" : "border-border"] : [
|
|
2750
|
-
|
|
2750
|
+
// Hover only changes the fill; the border stays as it is (default grey, or accent when selected).
|
|
2751
|
+
"hover:bg-accent-soft focus-visible:border-input-accent",
|
|
2751
2752
|
selected ? "border-input-accent" : "border-border"
|
|
2752
2753
|
],
|
|
2753
2754
|
className
|
|
@@ -2778,7 +2779,7 @@ QuestionNavItem.displayName = "QuestionNavItem";
|
|
|
2778
2779
|
import * as React44 from "react";
|
|
2779
2780
|
import { Check as Check4, DotsSixVertical as DotsSixVertical3, Plus as Plus4, Trash as Trash4 } from "@phosphor-icons/react";
|
|
2780
2781
|
import { jsx as jsx45, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
2781
|
-
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:
|
|
2782
|
+
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";
|
|
2782
2783
|
function QuestionOption(props) {
|
|
2783
2784
|
const id = React44.useId();
|
|
2784
2785
|
return /* @__PURE__ */ jsxs31("label", { htmlFor: id, className: cn(optionClasses, props.className), children: [
|
|
@@ -3217,7 +3218,7 @@ var ActivityStructure = React51.forwardRef(
|
|
|
3217
3218
|
/* @__PURE__ */ jsx52("div", { className: "grid grid-cols-2 gap-3", children: stats.map(({ id, ...stat }) => /* @__PURE__ */ jsx52(StatCard, { ...stat }, id)) }),
|
|
3218
3219
|
sections?.map(({ id, heading, body, tags }) => /* @__PURE__ */ jsxs38("div", { className: "flex flex-col gap-2", children: [
|
|
3219
3220
|
/* @__PURE__ */ jsx52("h4", { className: "text-heading-h4 text-surface-foreground", children: heading }),
|
|
3220
|
-
/* @__PURE__ */ jsx52("
|
|
3221
|
+
/* @__PURE__ */ jsx52("div", { className: "text-body-base text-surface-foreground", children: body }),
|
|
3221
3222
|
(tags?.length || onAddTag) && /* @__PURE__ */ jsxs38("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
3222
3223
|
tags?.map((tag) => /* @__PURE__ */ jsx52(EditableTag, { type: "editable", onRemove: onRemoveTag && (() => onRemoveTag(id, tag)), children: tag }, tag)),
|
|
3223
3224
|
onAddTag && /* @__PURE__ */ jsx52(EditableTag, { type: "add", onClick: () => onAddTag(id), children: addTagLabel })
|