@orangecheck/app-design 1.2.2 → 1.3.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.
@@ -4,11 +4,11 @@ import { extendTailwindMerge } from 'tailwind-merge';
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
  import { cva } from 'class-variance-authority';
6
6
  import * as TabsPrimitive from '@radix-ui/react-tabs';
7
- import { ChevronDown, Check, Search, Copy, ArrowUpRight, ArrowRight, ChevronRight, CornerDownLeft, Download, FileText, Upload, ArrowLeft, Lock, CircleDashed, CircleMinus, Clock, CircleX, CircleCheck } from 'lucide-react';
7
+ import { ChevronDown, Check, Search, Copy, ArrowUpRight, ArrowRight, ChevronRight, CornerDownLeft, Download, FileText, Upload, ArrowLeft, Lock, CircleDashed, CircleMinus, CircleSlash, Clock, CircleX, CircleCheck } from 'lucide-react';
8
8
  import { Slot } from '@radix-ui/react-slot';
9
9
  import * as SeparatorPrimitive from '@radix-ui/react-separator';
10
10
  import 'sonner';
11
- import Link from 'next/link.js';
11
+ import Link from 'next/link';
12
12
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
13
13
  import * as LabelPrimitive from '@radix-ui/react-label';
14
14
  import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
@@ -2941,16 +2941,17 @@ var Label = forwardRef(function Label2({ className, ...props }, ref) {
2941
2941
  }
2942
2942
  );
2943
2943
  });
2944
- function Field({ label, hint, optional, error, children, className, hideLabel, action }) {
2945
- const id = useId();
2944
+ function Field({ label, hint, optional, error, children, id: fixedId, className, hideLabel, action }) {
2945
+ const generated = useId();
2946
+ const id = fixedId ?? generated;
2946
2947
  const hintId = hint ? `${id}-hint` : void 0;
2947
2948
  const errorId = error ? `${id}-error` : void 0;
2948
- const describedBy = [hintId, errorId].filter(Boolean).join(" ") || void 0;
2949
- const control = isValidElement(children) ? cloneElement(children, {
2949
+ const wiring = {
2950
2950
  id,
2951
- "aria-describedby": describedBy,
2951
+ "aria-describedby": [hintId, errorId].filter(Boolean).join(" ") || void 0,
2952
2952
  "aria-invalid": error ? true : void 0
2953
- }) : children;
2953
+ };
2954
+ const control = typeof children === "function" ? children(wiring) : isValidElement(children) ? cloneElement(children, { ...wiring }) : children;
2954
2955
  const hintNode = hint ? /* @__PURE__ */ jsx("p", { id: hintId, className: "text-[0.8125rem] leading-snug text-muted-foreground", children: hint }) : null;
2955
2956
  return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-2", className), children: [
2956
2957
  /* @__PURE__ */ jsxs(Label, { htmlFor: id, className: hideLabel ? "sr-only" : "flex items-baseline gap-2", children: [
@@ -3323,6 +3324,7 @@ var CHECK = {
3323
3324
  ok: { word: "Passed", icon: /* @__PURE__ */ jsx(CircleCheck, {}), tone: "text-success" },
3324
3325
  fail: { word: "Failed", icon: /* @__PURE__ */ jsx(CircleX, {}), tone: "text-destructive" },
3325
3326
  pending: { word: "Pending", icon: /* @__PURE__ */ jsx(Clock, {}), tone: "text-oca-accent-ink" },
3327
+ none: { word: "None", icon: /* @__PURE__ */ jsx(CircleSlash, {}), tone: "text-muted-foreground" },
3326
3328
  skipped: { word: "Skipped", icon: /* @__PURE__ */ jsx(CircleMinus, {}), tone: "text-muted-foreground" },
3327
3329
  unchecked: { word: "Not checked", icon: /* @__PURE__ */ jsx(CircleDashed, {}), tone: "text-oca-subtle" }
3328
3330
  };
@@ -3345,8 +3347,8 @@ function VerifyReport({
3345
3347
  children: [
3346
3348
  /* @__PURE__ */ jsxs("header", { className: "flex flex-col items-start gap-3 p-6 md:p-8", children: [
3347
3349
  /* @__PURE__ */ jsx(StatusBadge, { status: verdict }),
3348
- /* @__PURE__ */ jsx(Heading, { className: "oca-display-3", children: title }),
3349
- summary ? /* @__PURE__ */ jsx("p", { className: "oca-body max-w-[40rem]", children: summary }) : null
3350
+ /* @__PURE__ */ jsx(Heading, { className: "oca-display-3 [overflow-wrap:anywhere]", children: title }),
3351
+ summary ? /* @__PURE__ */ jsx("p", { className: "oca-body max-w-[40rem] [overflow-wrap:anywhere]", children: summary }) : null
3350
3352
  ] }),
3351
3353
  /* @__PURE__ */ jsx("ul", { "aria-label": "Checks", className: "divide-y divide-border border-t border-border", children: checks.map((c, i) => {
3352
3354
  const k = CHECK[c.state];