@assure-one/design-system 1.10.0 → 1.11.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.ts CHANGED
@@ -2092,7 +2092,7 @@ declare function StatusIcon({ state, progress, color, size, className, ...props
2092
2092
  *
2093
2093
  * Pass `children` to override the label while keeping the mapped variant.
2094
2094
  */
2095
- type PillStatus = "requested" | "in-review" | "needs-revision" | "accepted" | "signed" | "approved" | "paid" | "complete" | "received" | "draft" | "pending" | "overdue" | "declined";
2095
+ type PillStatus = "requested" | "in-review" | "needs-revision" | "accepted" | "signed" | "approved" | "paid" | "complete" | "received" | "draft" | "pending" | "overdue" | "declined" | "internal" | "shared";
2096
2096
  interface StatusPillProps extends Omit<BadgeProps, "variant"> {
2097
2097
  status: PillStatus;
2098
2098
  /** Show a leading dot. Default `true` (status atoms read better with one). */
@@ -3741,10 +3741,12 @@ interface DocumentRequestAssigneeOption {
3741
3741
  selected: boolean;
3742
3742
  }
3743
3743
  interface DocumentRequestReviewStatusOption {
3744
- /** Stored value (e.g. "approved"). */
3744
+ /** Stored value (e.g. "provided"). */
3745
3745
  value: string;
3746
- /** Human label (e.g. "Approved"). */
3746
+ /** Human label (e.g. "Provided"). */
3747
3747
  label: string;
3748
+ /** Tailwind background class for the leading status dot (e.g. "bg-info-fg"). */
3749
+ color?: string;
3748
3750
  }
3749
3751
  interface DocumentRequestDetailProps {
3750
3752
  /** Request headline. */
package/dist/index.js CHANGED
@@ -8798,7 +8798,10 @@ var statusMap = {
8798
8798
  draft: { variant: "secondary", label: "Draft" },
8799
8799
  pending: { variant: "secondary", label: "Pending" },
8800
8800
  overdue: { variant: "destructive", label: "Overdue" },
8801
- declined: { variant: "destructive", label: "Declined" }
8801
+ declined: { variant: "destructive", label: "Declined" },
8802
+ // Document visibility: firm-only (internal) vs shared with the client portal.
8803
+ internal: { variant: "secondary", label: "Internal" },
8804
+ shared: { variant: "info", label: "Shared" }
8802
8805
  };
8803
8806
  var StatusPill = forwardRef(function StatusPill2({ status, dot = true, children, ...props }, ref) {
8804
8807
  const { variant, label } = statusMap[status];
@@ -13193,19 +13196,37 @@ var DocumentRequestDetail = forwardRef(
13193
13196
  /* @__PURE__ */ jsx(FlagIcon, {}),
13194
13197
  "Status"
13195
13198
  ] }) }),
13196
- /* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", className: "w-48", children: [
13197
- /* @__PURE__ */ jsx(DropdownMenuLabel, { children: "Set status" }),
13198
- /* @__PURE__ */ jsxs(
13199
- DropdownMenuRadioGroup,
13200
- {
13201
- value: reviewStatus ?? "",
13202
- onValueChange: (v) => onSetReviewStatus(v || null),
13203
- children: [
13204
- reviewStatusOptions.map((opt) => /* @__PURE__ */ jsx(DropdownMenuRadioItem, { value: opt.value, children: opt.label }, opt.value)),
13205
- /* @__PURE__ */ jsx(DropdownMenuRadioItem, { value: "", children: "Auto (clear)" })
13206
- ]
13207
- }
13208
- )
13199
+ /* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", className: "w-60", children: [
13200
+ /* @__PURE__ */ jsx(DropdownMenuLabel, { children: "Set request status" }),
13201
+ reviewStatusOptions.map((opt) => {
13202
+ const checked = reviewStatus === opt.value;
13203
+ return /* @__PURE__ */ jsxs(
13204
+ DropdownMenuItem,
13205
+ {
13206
+ onSelect: (e) => {
13207
+ e.preventDefault();
13208
+ onSetReviewStatus(checked ? null : opt.value);
13209
+ },
13210
+ className: "flex items-center gap-2.5 py-2",
13211
+ children: [
13212
+ /* @__PURE__ */ jsx("span", { className: cn("size-2.5 shrink-0 rounded-full", opt.color ?? "bg-fg-4") }),
13213
+ /* @__PURE__ */ jsx("span", { className: "flex-1 text-sm", children: opt.label }),
13214
+ /* @__PURE__ */ jsx(
13215
+ "span",
13216
+ {
13217
+ "aria-hidden": "true",
13218
+ className: cn(
13219
+ "grid size-4 shrink-0 place-items-center rounded-[5px] border transition-colors duration-[var(--duration-fast)] motion-reduce:transition-none",
13220
+ checked ? "bg-pro-fg border-pro-fg text-fg-on-pro" : "border-rule"
13221
+ ),
13222
+ children: checked && /* @__PURE__ */ jsx(CheckIcon, { className: "size-3" })
13223
+ }
13224
+ )
13225
+ ]
13226
+ },
13227
+ opt.value
13228
+ );
13229
+ })
13209
13230
  ] })
13210
13231
  ] }),
13211
13232
  /* @__PURE__ */ jsxs(Button, { variant: "secondary", size: "sm", className: "text-danger-fg", onClick: onDelete, children: [
@@ -13238,39 +13259,45 @@ var DocumentRequestDetail = forwardRef(
13238
13259
  activity.length
13239
13260
  ] })
13240
13261
  ] }),
13241
- /* @__PURE__ */ jsx(TabsContent, { value: "documents", className: "min-h-0 flex-1 overflow-y-auto px-5 py-4", children: /* @__PURE__ */ jsxs(DocumentList, { children: [
13242
- /* @__PURE__ */ jsx(DocumentListSection, { label: "Client uploads", count: clientUploads.length, children: clientUploads.length > 0 ? clientUploads.map((d) => /* @__PURE__ */ jsx(
13243
- DocumentRow,
13244
- {
13245
- fileName: d.fileName,
13246
- meta: d.meta,
13247
- className: d.active ? "bg-overlay-hover" : void 0,
13248
- actions: /* @__PURE__ */ jsx(FileRowActions, { doc: d })
13249
- },
13250
- d.id
13251
- )) : /* @__PURE__ */ jsx("p", { className: "text-fg-4 px-2.5 py-2 text-sm", children: "No client uploads yet." }) }),
13252
- /* @__PURE__ */ jsx(
13253
- DocumentListSection,
13254
- {
13255
- label: "Firm documents",
13256
- count: firmDocuments.length,
13257
- action: onUploadFirmDocument ? /* @__PURE__ */ jsxs(Button, { variant: "ghost", size: "sm", onClick: onUploadFirmDocument, children: [
13258
- /* @__PURE__ */ jsx(UploadIcon, {}),
13259
- "Upload"
13260
- ] }) : void 0,
13261
- children: firmDocuments.length > 0 ? firmDocuments.map((d) => /* @__PURE__ */ jsx(
13262
- DocumentRow,
13263
- {
13264
- fileName: d.fileName,
13265
- meta: d.meta,
13266
- className: d.active ? "bg-overlay-hover" : void 0,
13267
- actions: /* @__PURE__ */ jsx(FileRowActions, { doc: d })
13268
- },
13269
- d.id
13270
- )) : /* @__PURE__ */ jsx("p", { className: "text-fg-4 px-2.5 py-2 text-sm", children: "No firm documents attached." })
13271
- }
13272
- )
13273
- ] }) }),
13262
+ /* @__PURE__ */ jsxs(TabsContent, { value: "documents", className: "min-h-0 flex-1 overflow-y-auto px-5 py-4", children: [
13263
+ isLocked && /* @__PURE__ */ jsxs("div", { className: "bg-pro-bg text-pro-fg mb-4 flex items-center gap-2 rounded-lg px-3 py-2.5 text-[13px] font-medium", children: [
13264
+ /* @__PURE__ */ jsx(LockIcon, { size: 15, className: "shrink-0" }),
13265
+ "This request is locked \u2014 the client can no longer upload documents."
13266
+ ] }),
13267
+ /* @__PURE__ */ jsxs(DocumentList, { children: [
13268
+ /* @__PURE__ */ jsx(DocumentListSection, { label: "Client uploads", count: clientUploads.length, children: clientUploads.length > 0 ? clientUploads.map((d) => /* @__PURE__ */ jsx(
13269
+ DocumentRow,
13270
+ {
13271
+ fileName: d.fileName,
13272
+ meta: d.meta,
13273
+ className: d.active ? "bg-overlay-hover" : void 0,
13274
+ actions: /* @__PURE__ */ jsx(FileRowActions, { doc: d })
13275
+ },
13276
+ d.id
13277
+ )) : /* @__PURE__ */ jsx("p", { className: "text-fg-4 px-2.5 py-2 text-sm", children: "No client uploads yet." }) }),
13278
+ /* @__PURE__ */ jsx(
13279
+ DocumentListSection,
13280
+ {
13281
+ label: "Firm documents",
13282
+ count: firmDocuments.length,
13283
+ action: onUploadFirmDocument ? /* @__PURE__ */ jsxs(Button, { variant: "ghost", size: "sm", onClick: onUploadFirmDocument, children: [
13284
+ /* @__PURE__ */ jsx(UploadIcon, {}),
13285
+ "Upload"
13286
+ ] }) : void 0,
13287
+ children: firmDocuments.length > 0 ? firmDocuments.map((d) => /* @__PURE__ */ jsx(
13288
+ DocumentRow,
13289
+ {
13290
+ fileName: d.fileName,
13291
+ meta: d.meta,
13292
+ className: d.active ? "bg-overlay-hover" : void 0,
13293
+ actions: /* @__PURE__ */ jsx(FileRowActions, { doc: d })
13294
+ },
13295
+ d.id
13296
+ )) : /* @__PURE__ */ jsx("p", { className: "text-fg-4 px-2.5 py-2 text-sm", children: "No firm documents attached." })
13297
+ }
13298
+ )
13299
+ ] })
13300
+ ] }),
13274
13301
  /* @__PURE__ */ jsxs(TabsContent, { value: "comments", className: "flex min-h-0 flex-1 flex-col", children: [
13275
13302
  /* @__PURE__ */ jsx("div", { className: "min-h-0 flex-1 overflow-y-auto px-5 py-4", children: comments.length > 0 ? /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-4", children: comments.map((c) => /* @__PURE__ */ jsx(CommentRow, { comment: c }, c.id)) }) : /* @__PURE__ */ jsx("p", { className: "text-fg-4 text-sm", children: "No comments yet. Start the conversation below." }) }),
13276
13303
  /* @__PURE__ */ jsxs("div", { className: "border-rule shrink-0 border-t px-5 py-3", children: [