@discuss-ds/ui 0.11.0 → 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/dist/index.d.cts CHANGED
@@ -655,6 +655,8 @@ interface QuestionEditorCardProps extends Omit<React.HTMLAttributes<HTMLDivEleme
655
655
  onAdd?: () => void;
656
656
  /** Footer: opens paste-many-choices. */
657
657
  onPaste?: () => void;
658
+ /** Inline error shown at the bottom of the card, e.g. "Not available in Self-Paced". Keep it as short as possible. */
659
+ error?: React.ReactNode;
658
660
  /** Optional strip under the card body, e.g. an "Inferred" assumption note. */
659
661
  note?: React.ReactNode;
660
662
  /** Makes the "Question N" tag a drag handle for reordering. See `QuestionHeader`'s `dragHandleProps`. */
package/dist/index.d.ts CHANGED
@@ -655,6 +655,8 @@ interface QuestionEditorCardProps extends Omit<React.HTMLAttributes<HTMLDivEleme
655
655
  onAdd?: () => void;
656
656
  /** Footer: opens paste-many-choices. */
657
657
  onPaste?: () => void;
658
+ /** Inline error shown at the bottom of the card, e.g. "Not available in Self-Paced". Keep it as short as possible. */
659
+ error?: React.ReactNode;
658
660
  /** Optional strip under the card body, e.g. an "Inferred" assumption note. */
659
661
  note?: React.ReactNode;
660
662
  /** Makes the "Question N" tag a drag handle for reordering. See `QuestionHeader`'s `dragHandleProps`. */
package/dist/index.js CHANGED
@@ -2502,7 +2502,8 @@ import {
2502
2502
  Eye,
2503
2503
  Plus as Plus3,
2504
2504
  Sparkle as Sparkle2,
2505
- Trash as Trash3
2505
+ Trash as Trash3,
2506
+ Warning as Warning2
2506
2507
  } from "@phosphor-icons/react";
2507
2508
 
2508
2509
  // src/components/Question Types/QuestionHeader.tsx
@@ -2615,6 +2616,7 @@ var QuestionEditorCard = React41.forwardRef(
2615
2616
  onAdd,
2616
2617
  onPaste,
2617
2618
  note,
2619
+ error,
2618
2620
  dragHandleProps,
2619
2621
  children,
2620
2622
  ...props
@@ -2687,6 +2689,10 @@ var QuestionEditorCard = React41.forwardRef(
2687
2689
  ),
2688
2690
  children
2689
2691
  ] }),
2692
+ error && /* @__PURE__ */ jsxs29("p", { className: "flex items-center gap-1 text-ui-caption text-destructive-foreground", children: [
2693
+ /* @__PURE__ */ jsx42(Warning2, { size: 16, "aria-hidden": true, className: "shrink-0" }),
2694
+ error
2695
+ ] }),
2690
2696
  footer && /* @__PURE__ */ jsxs29("div", { className: "flex items-center justify-between", children: [
2691
2697
  /* @__PURE__ */ jsx42("p", { className: "text-ui-caption text-secondary-muted-foreground", children: countLabel }),
2692
2698
  /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2", children: [
@@ -2733,7 +2739,7 @@ QuestionEditorCard.displayName = "QuestionEditorCard";
2733
2739
 
2734
2740
  // src/components/Question Types/QuestionNavItem.tsx
2735
2741
  import * as React43 from "react";
2736
- import { DotsSixVertical as DotsSixVertical2, Warning as Warning2 } from "@phosphor-icons/react";
2742
+ import { DotsSixVertical as DotsSixVertical2, Warning as Warning3 } from "@phosphor-icons/react";
2737
2743
  import { Slot as Slot3 } from "radix-ui";
2738
2744
 
2739
2745
  // src/components/Question Types/QuestionTypeIcon.tsx
@@ -2778,7 +2784,7 @@ var QuestionNavItem = React43.forwardRef(
2778
2784
  children: [
2779
2785
  /* @__PURE__ */ jsxs30("span", { "aria-hidden": "true", className: "relative flex size-4 shrink-0 items-center justify-center", children: [
2780
2786
  /* @__PURE__ */ jsx44(DotsSixVertical2, { size: 16, className: "hidden group-hover/nav:block" }),
2781
- /* @__PURE__ */ jsx44("span", { className: "group-hover/nav:hidden", children: error ? /* @__PURE__ */ jsx44(Warning2, { size: 16, className: "text-destructive" }) : /* @__PURE__ */ jsx44(
2787
+ /* @__PURE__ */ jsx44("span", { className: "group-hover/nav:hidden", children: error ? /* @__PURE__ */ jsx44(Warning3, { size: 16, className: "text-destructive-foreground" }) : /* @__PURE__ */ jsx44(
2782
2788
  QuestionTypeIcon,
2783
2789
  {
2784
2790
  type: questionType,