@open-mercato/ui 0.6.4-develop.4178.1.aad9ddaa95 → 0.6.4-develop.4210.1.d412061cfe

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.
Files changed (92) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/AGENTS.md +14 -0
  3. package/dist/backend/DataTable.js +28 -62
  4. package/dist/backend/DataTable.js.map +2 -2
  5. package/dist/backend/detail/AttachmentMetadataDialog.js +1 -1
  6. package/dist/backend/detail/AttachmentMetadataDialog.js.map +2 -2
  7. package/dist/primitives/activity-feed.js +196 -0
  8. package/dist/primitives/activity-feed.js.map +7 -0
  9. package/dist/primitives/avatar.js +140 -14
  10. package/dist/primitives/avatar.js.map +3 -3
  11. package/dist/primitives/badge.js +94 -5
  12. package/dist/primitives/badge.js.map +2 -2
  13. package/dist/primitives/button-group.js +52 -0
  14. package/dist/primitives/button-group.js.map +7 -0
  15. package/dist/primitives/color-picker.js +520 -0
  16. package/dist/primitives/color-picker.js.map +7 -0
  17. package/dist/primitives/command-menu.js +355 -0
  18. package/dist/primitives/command-menu.js.map +7 -0
  19. package/dist/primitives/dialog.js +210 -35
  20. package/dist/primitives/dialog.js.map +2 -2
  21. package/dist/primitives/drawer.js +219 -0
  22. package/dist/primitives/drawer.js.map +7 -0
  23. package/dist/primitives/notification-feed.js +213 -0
  24. package/dist/primitives/notification-feed.js.map +7 -0
  25. package/dist/primitives/notification.js +23 -2
  26. package/dist/primitives/notification.js.map +2 -2
  27. package/dist/primitives/pagination.js +245 -0
  28. package/dist/primitives/pagination.js.map +7 -0
  29. package/dist/primitives/progress.js +178 -5
  30. package/dist/primitives/progress.js.map +2 -2
  31. package/dist/primitives/rating.js +174 -0
  32. package/dist/primitives/rating.js.map +7 -0
  33. package/dist/primitives/scroll-area.js +82 -0
  34. package/dist/primitives/scroll-area.js.map +7 -0
  35. package/dist/primitives/segmented-control.js +101 -0
  36. package/dist/primitives/segmented-control.js.map +7 -0
  37. package/dist/primitives/separator.js +103 -4
  38. package/dist/primitives/separator.js.map +2 -2
  39. package/dist/primitives/slider.js +115 -0
  40. package/dist/primitives/slider.js.map +7 -0
  41. package/dist/primitives/step-indicator.js +187 -0
  42. package/dist/primitives/step-indicator.js.map +7 -0
  43. package/dist/primitives/table.js +102 -10
  44. package/dist/primitives/table.js.map +2 -2
  45. package/dist/primitives/tabs.js +122 -14
  46. package/dist/primitives/tabs.js.map +2 -2
  47. package/dist/primitives/time-picker.js +9 -11
  48. package/dist/primitives/time-picker.js.map +2 -2
  49. package/package.json +8 -4
  50. package/src/backend/DataTable.tsx +43 -60
  51. package/src/backend/detail/AttachmentMetadataDialog.tsx +1 -1
  52. package/src/primitives/__tests__/activity-feed.test.tsx +216 -0
  53. package/src/primitives/__tests__/avatar.test.tsx +131 -0
  54. package/src/primitives/__tests__/badge.test.tsx +189 -0
  55. package/src/primitives/__tests__/button-group.test.tsx +117 -0
  56. package/src/primitives/__tests__/color-picker.test.tsx +589 -0
  57. package/src/primitives/__tests__/command-menu.test.tsx +231 -0
  58. package/src/primitives/__tests__/dialog.test.tsx +290 -0
  59. package/src/primitives/__tests__/drawer.test.tsx +264 -0
  60. package/src/primitives/__tests__/notification-feed.test.tsx +303 -0
  61. package/src/primitives/__tests__/notification.test.tsx +102 -2
  62. package/src/primitives/__tests__/pagination.test.tsx +268 -0
  63. package/src/primitives/__tests__/progress.test.tsx +222 -0
  64. package/src/primitives/__tests__/rating.test.tsx +164 -0
  65. package/src/primitives/__tests__/scroll-area.test.tsx +109 -0
  66. package/src/primitives/__tests__/segmented-control.test.tsx +129 -0
  67. package/src/primitives/__tests__/separator.test.tsx +143 -0
  68. package/src/primitives/__tests__/slider.test.tsx +86 -0
  69. package/src/primitives/__tests__/step-indicator.test.tsx +205 -0
  70. package/src/primitives/__tests__/table.test.tsx +199 -0
  71. package/src/primitives/__tests__/tabs.test.tsx +139 -0
  72. package/src/primitives/activity-feed.tsx +326 -0
  73. package/src/primitives/avatar.tsx +225 -22
  74. package/src/primitives/badge.tsx +141 -6
  75. package/src/primitives/button-group.tsx +100 -0
  76. package/src/primitives/color-picker.tsx +693 -0
  77. package/src/primitives/command-menu.tsx +503 -0
  78. package/src/primitives/dialog.tsx +315 -51
  79. package/src/primitives/drawer.tsx +338 -0
  80. package/src/primitives/notification-feed.tsx +358 -0
  81. package/src/primitives/notification.tsx +42 -2
  82. package/src/primitives/pagination.tsx +376 -0
  83. package/src/primitives/progress.tsx +267 -6
  84. package/src/primitives/rating.tsx +245 -0
  85. package/src/primitives/scroll-area.tsx +169 -0
  86. package/src/primitives/segmented-control.tsx +162 -0
  87. package/src/primitives/separator.tsx +163 -3
  88. package/src/primitives/slider.tsx +160 -0
  89. package/src/primitives/step-indicator.tsx +287 -0
  90. package/src/primitives/table.tsx +142 -11
  91. package/src/primitives/tabs.tsx +174 -12
  92. package/src/primitives/time-picker.tsx +9 -11
@@ -3,6 +3,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  import * as DialogPrimitive from "@radix-ui/react-dialog";
5
5
  import { X } from "lucide-react";
6
+ import { cva } from "class-variance-authority";
6
7
  import { cn } from "@open-mercato/shared/lib/utils";
7
8
  import { useT } from "@open-mercato/shared/lib/i18n/context";
8
9
  const Dialog = DialogPrimitive.Root;
@@ -13,6 +14,7 @@ const DialogOverlay = React.forwardRef(({ className, elevated, ...props }, ref)
13
14
  DialogPrimitive.Overlay,
14
15
  {
15
16
  ref,
17
+ "data-slot": "dialog-overlay",
16
18
  className: cn(
17
19
  "fixed inset-0 bg-black/50 backdrop-blur-sm transition-opacity data-[state=open]:animate-in data-[state=closed]:animate-out",
18
20
  elevated ? "z-modal-elevated" : "z-modal",
@@ -22,58 +24,230 @@ const DialogOverlay = React.forwardRef(({ className, elevated, ...props }, ref)
22
24
  }
23
25
  ));
24
26
  DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
25
- const DialogContent = React.forwardRef(({ className, children, elevated, ...props }, ref) => {
26
- const t = useT();
27
- React.useEffect(() => {
28
- return () => {
29
- if (typeof window === "undefined") return;
30
- window.setTimeout(() => {
31
- if (document.querySelector('[data-dialog-content][data-state="open"]')) return;
32
- document.body.style.removeProperty("overflow");
33
- document.body.style.removeProperty("pointer-events");
34
- }, 0);
35
- };
36
- }, []);
37
- return /* @__PURE__ */ jsxs(DialogPortal, { children: [
38
- /* @__PURE__ */ jsx(DialogOverlay, { elevated }),
39
- /* @__PURE__ */ jsxs(
40
- DialogPrimitive.Content,
27
+ const dialogContentVariants = cva(
28
+ "fixed inset-x-0 bottom-0 flex max-h-[90vh] w-full translate-x-0 translate-y-0 flex-col gap-4 overflow-y-auto rounded-t-xl border-t bg-card p-6 shadow-lg sm:inset-auto sm:left-1/2 sm:top-1/2 sm:min-h-0 sm:h-auto sm:w-full sm:max-h-[90vh] sm:-translate-x-1/2 sm:-translate-y-1/2 sm:rounded-xl sm:border focus-visible:outline-none data-[state=open]:animate-in data-[state=closed]:animate-out",
29
+ {
30
+ variants: {
31
+ size: {
32
+ sm: "sm:max-w-sm",
33
+ default: "sm:max-w-lg",
34
+ lg: "sm:max-w-2xl",
35
+ xl: "sm:max-w-4xl"
36
+ }
37
+ },
38
+ defaultVariants: {
39
+ size: "default"
40
+ }
41
+ }
42
+ );
43
+ const DialogContent = React.forwardRef(
44
+ ({
45
+ className,
46
+ children,
47
+ elevated,
48
+ size,
49
+ dismissible = true,
50
+ closeAriaLabel,
51
+ ...props
52
+ }, ref) => {
53
+ const t = useT();
54
+ React.useEffect(() => {
55
+ return () => {
56
+ if (typeof window === "undefined") return;
57
+ window.setTimeout(() => {
58
+ if (document.querySelector('[data-dialog-content][data-state="open"]')) return;
59
+ document.body.style.removeProperty("overflow");
60
+ document.body.style.removeProperty("pointer-events");
61
+ }, 0);
62
+ };
63
+ }, []);
64
+ return /* @__PURE__ */ jsxs(DialogPortal, { children: [
65
+ /* @__PURE__ */ jsx(DialogOverlay, { elevated }),
66
+ /* @__PURE__ */ jsxs(
67
+ DialogPrimitive.Content,
68
+ {
69
+ ref,
70
+ "data-dialog-content": "",
71
+ "data-slot": "dialog-content",
72
+ "data-size": size ?? "default",
73
+ className: cn(
74
+ dialogContentVariants({ size }),
75
+ elevated ? "z-modal-elevated" : "z-modal",
76
+ className
77
+ ),
78
+ ...props,
79
+ children: [
80
+ dismissible ? /* @__PURE__ */ jsx(
81
+ DialogClose,
82
+ {
83
+ "data-dialog-close": "",
84
+ "data-slot": "dialog-close-button",
85
+ className: "absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
86
+ "aria-label": closeAriaLabel ?? t("ui.dialog.close.ariaLabel", "Close"),
87
+ children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
88
+ }
89
+ ) : null,
90
+ children
91
+ ]
92
+ }
93
+ )
94
+ ] });
95
+ }
96
+ );
97
+ DialogContent.displayName = DialogPrimitive.Content.displayName;
98
+ const DIALOG_HEADER_TONE_CLASS = {
99
+ default: "border border-input bg-background text-muted-foreground",
100
+ accent: "bg-accent-indigo/10 text-accent-indigo",
101
+ success: "bg-status-success-bg text-status-success-icon",
102
+ warning: "bg-status-warning-bg text-status-warning-icon",
103
+ error: "bg-status-error-bg text-status-error-icon",
104
+ info: "bg-status-info-bg text-status-info-icon"
105
+ };
106
+ const DialogHeader = ({
107
+ className,
108
+ leading,
109
+ leadingTone = "default",
110
+ children,
111
+ ...props
112
+ }) => /* @__PURE__ */ jsxs(
113
+ "div",
114
+ {
115
+ "data-slot": "dialog-header",
116
+ className: cn(
117
+ leading ? "flex items-start gap-3 text-left" : "flex flex-col space-y-1.5 text-center sm:text-left",
118
+ className
119
+ ),
120
+ ...props,
121
+ children: [
122
+ leading ? /* @__PURE__ */ jsx(
123
+ "span",
124
+ {
125
+ "data-slot": "dialog-header-leading",
126
+ "data-tone": leadingTone,
127
+ "aria-hidden": "true",
128
+ className: cn(
129
+ "inline-flex size-10 shrink-0 items-center justify-center rounded-full",
130
+ DIALOG_HEADER_TONE_CLASS[leadingTone]
131
+ ),
132
+ children: leading
133
+ }
134
+ ) : null,
135
+ leading ? /* @__PURE__ */ jsx(
136
+ "div",
137
+ {
138
+ "data-slot": "dialog-header-text",
139
+ className: "flex min-w-0 flex-1 flex-col gap-1 text-left",
140
+ children
141
+ }
142
+ ) : children
143
+ ]
144
+ }
145
+ );
146
+ DialogHeader.displayName = "DialogHeader";
147
+ const DialogFooter = ({
148
+ className,
149
+ layout = "default",
150
+ bordered = true,
151
+ leading,
152
+ children,
153
+ ...props
154
+ }) => {
155
+ if (layout === "equal") {
156
+ return /* @__PURE__ */ jsx(
157
+ "div",
41
158
  {
42
- ref,
43
- "data-dialog-content": "",
159
+ "data-slot": "dialog-footer",
160
+ "data-layout": "equal",
161
+ "data-bordered": bordered ? "true" : void 0,
44
162
  className: cn(
45
- "fixed inset-x-0 bottom-0 flex max-h-[90vh] w-full translate-x-0 translate-y-0 flex-col gap-4 overflow-y-auto rounded-t-2xl border-t bg-card p-6 shadow-lg",
46
- elevated ? "z-modal-elevated" : "z-modal",
47
- "sm:inset-auto sm:left-1/2 sm:top-1/2 sm:min-h-0 sm:h-auto sm:w-full sm:max-w-lg sm:max-h-[90vh] sm:-translate-x-1/2 sm:-translate-y-1/2 sm:rounded-xl sm:border",
48
- "focus-visible:outline-none data-[state=open]:animate-in data-[state=closed]:animate-out",
163
+ // Per Figma: thin border-t separator above the footer in
164
+ // every Modal Footer [1.1] variant. Rule is inset inside
165
+ // the DialogContent's `p-6` padding — true edge-to-edge
166
+ // ran the footer's layout box past the parent's
167
+ // overflow-y-auto scrollbar gutter, pushing the scrollbar
168
+ // outside the rounded card (caught in QuickDeal modal
169
+ // testing). Edge-to-edge polish deferred to a v6 dialog
170
+ // restructure that splits scrolling body from sticky
171
+ // header/footer.
172
+ bordered ? "border-t border-input pt-4" : "",
173
+ "flex flex-row gap-2 [&>*]:flex-1",
174
+ className
175
+ ),
176
+ ...props,
177
+ children
178
+ }
179
+ );
180
+ }
181
+ if (leading) {
182
+ return /* @__PURE__ */ jsxs(
183
+ "div",
184
+ {
185
+ "data-slot": "dialog-footer",
186
+ "data-layout": "default",
187
+ "data-bordered": bordered ? "true" : void 0,
188
+ className: cn(
189
+ // Per Figma: thin border-t separator above the footer in
190
+ // every Modal Footer [1.1] variant. Rule is inset inside
191
+ // the DialogContent's `p-6` padding — true edge-to-edge
192
+ // ran the footer's layout box past the parent's
193
+ // overflow-y-auto scrollbar gutter, pushing the scrollbar
194
+ // outside the rounded card (caught in QuickDeal modal
195
+ // testing). Edge-to-edge polish deferred to a v6 dialog
196
+ // restructure that splits scrolling body from sticky
197
+ // header/footer.
198
+ bordered ? "border-t border-input pt-4" : "",
199
+ "flex flex-col gap-3 sm:flex-row sm:items-center",
49
200
  className
50
201
  ),
51
202
  ...props,
52
203
  children: [
53
204
  /* @__PURE__ */ jsx(
54
- DialogClose,
205
+ "div",
55
206
  {
56
- "data-dialog-close": "",
57
- className: "absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
58
- "aria-label": t("ui.dialog.close.ariaLabel", "Close"),
59
- children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
207
+ "data-slot": "dialog-footer-leading",
208
+ className: "inline-flex items-center gap-2 sm:mr-auto",
209
+ children: leading
60
210
  }
61
211
  ),
62
- children
212
+ /* @__PURE__ */ jsx(
213
+ "div",
214
+ {
215
+ "data-slot": "dialog-footer-trailing",
216
+ className: "flex flex-col-reverse gap-2 sm:flex-row sm:items-center",
217
+ children
218
+ }
219
+ )
63
220
  ]
64
221
  }
65
- )
66
- ] });
67
- });
68
- DialogContent.displayName = DialogPrimitive.Content.displayName;
69
- const DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
70
- DialogHeader.displayName = "DialogHeader";
71
- const DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className), ...props });
222
+ );
223
+ }
224
+ return /* @__PURE__ */ jsx(
225
+ "div",
226
+ {
227
+ "data-slot": "dialog-footer",
228
+ "data-layout": "default",
229
+ "data-bordered": bordered ? "true" : void 0,
230
+ className: cn(
231
+ // Per Figma: the border-t separator runs edge-to-edge across
232
+ // the modal card (terminates at the rounded corners), NOT
233
+ // inset inside the DialogContent's `p-6` padding. We escape
234
+ // the parent's horizontal padding with `-mx-6` and re-apply
235
+ // `px-6` so the button row keeps its inset position.
236
+ bordered ? "-mx-6 border-t border-input px-6 pt-4" : "",
237
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
238
+ className
239
+ ),
240
+ ...props,
241
+ children
242
+ }
243
+ );
244
+ };
72
245
  DialogFooter.displayName = "DialogFooter";
73
246
  const DialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
74
247
  DialogPrimitive.Title,
75
248
  {
76
249
  ref,
250
+ "data-slot": "dialog-title",
77
251
  className: cn("text-lg font-semibold leading-none tracking-tight", className),
78
252
  ...props
79
253
  }
@@ -83,6 +257,7 @@ const DialogDescription = React.forwardRef(({ className, ...props }, ref) => /*
83
257
  DialogPrimitive.Description,
84
258
  {
85
259
  ref,
260
+ "data-slot": "dialog-description",
86
261
  className: cn("text-sm text-muted-foreground", className),
87
262
  ...props
88
263
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/primitives/dialog.tsx"],
4
- "sourcesContent": ["\"use client\"\n\nimport * as React from 'react'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { X } from 'lucide-react'\nimport { cn } from '@open-mercato/shared/lib/utils'\nimport { useT } from '@open-mercato/shared/lib/i18n/context'\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay> & {\n /** Render above popovers (z-modal-elevated, 55) instead of the default z-modal (40).\n * Use when this dialog is opened from inside a popover so it isn't occluded. */\n elevated?: boolean\n }\n>(({ className, elevated, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'fixed inset-0 bg-black/50 backdrop-blur-sm transition-opacity data-[state=open]:animate-in data-[state=closed]:animate-out',\n elevated ? 'z-modal-elevated' : 'z-modal',\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {\n /** Render above popovers (z-modal-elevated, 55) instead of the default z-modal (40).\n * Set on dialogs that open from inside another popover (e.g. the SaveFilterDialog\n * inside the AdvancedFilterPanel popover) so they aren't hidden behind the popover. */\n elevated?: boolean\n }\n>(({ className, children, elevated, ...props }, ref) => {\n const t = useT()\n\n React.useEffect(() => {\n return () => {\n if (typeof window === 'undefined') return\n window.setTimeout(() => {\n if (document.querySelector('[data-dialog-content][data-state=\"open\"]')) return\n document.body.style.removeProperty('overflow')\n document.body.style.removeProperty('pointer-events')\n }, 0)\n }\n }, [])\n\n return (\n <DialogPortal>\n <DialogOverlay elevated={elevated} />\n <DialogPrimitive.Content\n ref={ref}\n data-dialog-content=\"\"\n // Sizing: mobile uses a bottom-sheet (`fixed inset-x-0 bottom-0`) that resizes to\n // the form's content with a cap at 90% viewport height. The previous version forced\n // `min-h-[50vh]`, which made every short dialog (Quick deal, Add stage, Change\n // owner, etc.) render as a half-screen panel with an empty block below the form.\n // Desktop (`sm:`) already used `h-auto`/`min-h-0`, so it's unchanged here.\n className={cn(\n 'fixed inset-x-0 bottom-0 flex max-h-[90vh] w-full translate-x-0 translate-y-0 flex-col gap-4 overflow-y-auto rounded-t-2xl border-t bg-card p-6 shadow-lg',\n elevated ? 'z-modal-elevated' : 'z-modal',\n 'sm:inset-auto sm:left-1/2 sm:top-1/2 sm:min-h-0 sm:h-auto sm:w-full sm:max-w-lg sm:max-h-[90vh] sm:-translate-x-1/2 sm:-translate-y-1/2 sm:rounded-xl sm:border',\n 'focus-visible:outline-none data-[state=open]:animate-in data-[state=closed]:animate-out',\n className,\n )}\n {...props}\n >\n <DialogClose\n data-dialog-close=\"\"\n className=\"absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\"\n aria-label={t('ui.dialog.close.ariaLabel', 'Close')}\n >\n <X className=\"h-4 w-4\" />\n </DialogClose>\n {children}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n})\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-1.5 text-center sm:text-left', className)} {...props} />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className)} {...props} />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn('text-sm text-muted-foreground', className)}\n {...props}\n />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"],
5
- "mappings": ";AAwBE,cAqCI,YArCJ;AAtBF,YAAY,WAAW;AACvB,YAAY,qBAAqB;AACjC,SAAS,SAAS;AAClB,SAAS,UAAU;AACnB,SAAS,YAAY;AAErB,MAAM,SAAS,gBAAgB;AAE/B,MAAM,gBAAgB,gBAAgB;AAEtC,MAAM,eAAe,gBAAgB;AAErC,MAAM,cAAc,gBAAgB;AAEpC,MAAM,gBAAgB,MAAM,WAO1B,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QACpC;AAAA,EAAC,gBAAgB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA,WAAW,qBAAqB;AAAA,MAChC;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,cAAc,cAAc,gBAAgB,QAAQ;AAEpD,MAAM,gBAAgB,MAAM,WAQ1B,CAAC,EAAE,WAAW,UAAU,UAAU,GAAG,MAAM,GAAG,QAAQ;AACtD,QAAM,IAAI,KAAK;AAEf,QAAM,UAAU,MAAM;AACpB,WAAO,MAAM;AACX,UAAI,OAAO,WAAW,YAAa;AACnC,aAAO,WAAW,MAAM;AACtB,YAAI,SAAS,cAAc,0CAA0C,EAAG;AACxE,iBAAS,KAAK,MAAM,eAAe,UAAU;AAC7C,iBAAS,KAAK,MAAM,eAAe,gBAAgB;AAAA,MACrD,GAAG,CAAC;AAAA,IACN;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,SACE,qBAAC,gBACC;AAAA,wBAAC,iBAAc,UAAoB;AAAA,IACnC;AAAA,MAAC,gBAAgB;AAAA,MAAhB;AAAA,QACC;AAAA,QACA,uBAAoB;AAAA,QAMpB,WAAW;AAAA,UACT;AAAA,UACA,WAAW,qBAAqB;AAAA,UAChC;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACC,GAAG;AAAA,QAEJ;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,qBAAkB;AAAA,cAClB,WAAU;AAAA,cACV,cAAY,EAAE,6BAA6B,OAAO;AAAA,cAElD,8BAAC,KAAE,WAAU,WAAU;AAAA;AAAA,UACzB;AAAA,UACC;AAAA;AAAA;AAAA,IACH;AAAA,KACF;AAEJ,CAAC;AACD,cAAc,cAAc,gBAAgB,QAAQ;AAEpD,MAAM,eAAe,CAAC,EAAE,WAAW,GAAG,MAAM,MAC1C,oBAAC,SAAI,WAAW,GAAG,sDAAsD,SAAS,GAAI,GAAG,OAAO;AAElG,aAAa,cAAc;AAE3B,MAAM,eAAe,CAAC,EAAE,WAAW,GAAG,MAAM,MAC1C,oBAAC,SAAI,WAAW,GAAG,0DAA0D,SAAS,GAAI,GAAG,OAAO;AAEtG,aAAa,cAAc;AAE3B,MAAM,cAAc,MAAM,WAGxB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC,gBAAgB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,qDAAqD,SAAS;AAAA,IAC3E,GAAG;AAAA;AACN,CACD;AACD,YAAY,cAAc,gBAAgB,MAAM;AAEhD,MAAM,oBAAoB,MAAM,WAG9B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC,gBAAgB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,iCAAiC,SAAS;AAAA,IACvD,GAAG;AAAA;AACN,CACD;AACD,kBAAkB,cAAc,gBAAgB,YAAY;",
4
+ "sourcesContent": ["\"use client\"\n\nimport * as React from 'react'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { X } from 'lucide-react'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '@open-mercato/shared/lib/utils'\nimport { useT } from '@open-mercato/shared/lib/i18n/context'\n\n/**\n * Modal dialog primitive. Phase B.7 rewrite per Figma `Modals` page\n * (`466:4630`) \u2014 `Modal Header [1.1]` (`466:4778`, title + optional\n * leading icon badge + optional description), `Modal Footer [1.1]`\n * (`472:566`, right-aligned buttons or 50/50 stretched layout),\n * `Status Modals [1.1]` (`480:1372`, status-icon hero variant).\n *\n * Backward compatibility (40 import sites \u2014 every dialog in the\n * product). All existing exports (`Dialog`, `DialogTrigger`,\n * `DialogPortal`, `DialogOverlay`, `DialogClose`, `DialogContent`,\n * `DialogHeader`, `DialogFooter`, `DialogTitle`, `DialogDescription`)\n * stay callable verbatim. Default `size=\"default\"` reproduces the\n * original `sm:max-w-lg` width; default header has no leading badge;\n * default footer is right-aligned (current look).\n *\n * New (additive):\n * DialogContent:\n * - `size: 'sm' | 'default' | 'lg' | 'xl'` \u2014 max-width breakpoints\n * - `dismissible: boolean` (default `true`) \u2014 render the auto X\n * top-right close button\n *\n * DialogHeader:\n * - `leading?: ReactNode` \u2014 `size-10 rounded-full border` icon\n * badge to the left of the title block (matches Figma `Modal\n * Header [1.1]` icon-prefixed variants \u2014 same chrome as the\n * Drawer header leading slot)\n *\n * DialogFooter:\n * - `layout: 'default' | 'equal'` (default `default`) \u2014 `equal`\n * stretches children flex-1 for 50/50 confirmation footers\n * (Figma `Modal Footer [1.1]` variant 1)\n */\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay> & {\n /** Render above popovers (z-modal-elevated, 55) instead of the default z-modal (40).\n * Use when this dialog is opened from inside a popover so it isn't occluded. */\n elevated?: boolean\n }\n>(({ className, elevated, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n data-slot=\"dialog-overlay\"\n className={cn(\n 'fixed inset-0 bg-black/50 backdrop-blur-sm transition-opacity data-[state=open]:animate-in data-[state=closed]:animate-out',\n elevated ? 'z-modal-elevated' : 'z-modal',\n className,\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst dialogContentVariants = cva(\n 'fixed inset-x-0 bottom-0 flex max-h-[90vh] w-full translate-x-0 translate-y-0 flex-col gap-4 overflow-y-auto rounded-t-xl border-t bg-card p-6 shadow-lg sm:inset-auto sm:left-1/2 sm:top-1/2 sm:min-h-0 sm:h-auto sm:w-full sm:max-h-[90vh] sm:-translate-x-1/2 sm:-translate-y-1/2 sm:rounded-xl sm:border focus-visible:outline-none data-[state=open]:animate-in data-[state=closed]:animate-out',\n {\n variants: {\n size: {\n sm: 'sm:max-w-sm',\n default: 'sm:max-w-lg',\n lg: 'sm:max-w-2xl',\n xl: 'sm:max-w-4xl',\n },\n },\n defaultVariants: {\n size: 'default',\n },\n },\n)\n\nexport type DialogContentProps = React.ComponentPropsWithoutRef<\n typeof DialogPrimitive.Content\n> &\n VariantProps<typeof dialogContentVariants> & {\n /** Render above popovers (z-modal-elevated, 55) instead of the default z-modal (40).\n * Set on dialogs that open from inside another popover (e.g. the SaveFilterDialog\n * inside the AdvancedFilterPanel popover) so they aren't hidden behind the popover. */\n elevated?: boolean\n /** Render the auto X top-right close button. @default true */\n dismissible?: boolean\n /** Aria label for the auto X close button. Defaults to the\n * `ui.dialog.close.ariaLabel` translation (`\"Close\"`). */\n closeAriaLabel?: string\n }\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n DialogContentProps\n>(\n (\n {\n className,\n children,\n elevated,\n size,\n dismissible = true,\n closeAriaLabel,\n ...props\n },\n ref,\n ) => {\n const t = useT()\n\n React.useEffect(() => {\n return () => {\n if (typeof window === 'undefined') return\n window.setTimeout(() => {\n if (document.querySelector('[data-dialog-content][data-state=\"open\"]')) return\n document.body.style.removeProperty('overflow')\n document.body.style.removeProperty('pointer-events')\n }, 0)\n }\n }, [])\n\n return (\n <DialogPortal>\n <DialogOverlay elevated={elevated} />\n <DialogPrimitive.Content\n ref={ref}\n data-dialog-content=\"\"\n data-slot=\"dialog-content\"\n data-size={size ?? 'default'}\n className={cn(\n dialogContentVariants({ size }),\n elevated ? 'z-modal-elevated' : 'z-modal',\n className,\n )}\n {...props}\n >\n {dismissible ? (\n <DialogClose\n data-dialog-close=\"\"\n data-slot=\"dialog-close-button\"\n className=\"absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\"\n aria-label={closeAriaLabel ?? t('ui.dialog.close.ariaLabel', 'Close')}\n >\n <X className=\"h-4 w-4\" />\n </DialogClose>\n ) : null}\n {children}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n },\n)\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nexport type DialogHeaderTone =\n | 'default'\n | 'accent'\n | 'success'\n | 'warning'\n | 'error'\n | 'info'\n\n// Soft-tinted status leading badges per canonical Figma `Status\n// Modals [1.1]` (`480:1372`). Each status tone uses the soft tint\n// background paired with a saturated colored icon (red `!` on light\n// pink, amber triangle on light amber, green check on light green,\n// indigo `i` on light indigo). The bordered `default` tone keeps\n// the white-bg + border-input shell for generic settings icons per\n// `Modal Header [1.1]` (`466:4778`).\nconst DIALOG_HEADER_TONE_CLASS: Record<DialogHeaderTone, string> = {\n default: 'border border-input bg-background text-muted-foreground',\n accent: 'bg-accent-indigo/10 text-accent-indigo',\n success: 'bg-status-success-bg text-status-success-icon',\n warning: 'bg-status-warning-bg text-status-warning-icon',\n error: 'bg-status-error-bg text-status-error-icon',\n info: 'bg-status-info-bg text-status-info-icon',\n}\n\nexport type DialogHeaderProps = React.HTMLAttributes<HTMLDivElement> & {\n /** Optional leading icon \u2014 rendered inside a size-10 rounded-full\n * badge to the left of the title block. Matches Figma `Modal\n * Header [1.1]` icon-prefixed variants and `Status Modals [1.1]`\n * status-tinted badges. */\n leading?: React.ReactNode\n /** Visual tone for the leading badge. `default` keeps the\n * bordered white badge (generic settings icons); status tones\n * (`success`/`warning`/`error`/`info`) use the matching\n * `bg-status-*-bg text-status-*-icon` tint per Figma `Status\n * Modals [1.1]`. Use `error` / `warning` to signal destructive\n * flows via the badge instead of a red CTA button.\n * @default 'default' */\n leadingTone?: DialogHeaderTone\n}\n\nconst DialogHeader = ({\n className,\n leading,\n leadingTone = 'default',\n children,\n ...props\n}: DialogHeaderProps) => (\n <div\n data-slot=\"dialog-header\"\n className={cn(\n leading ? 'flex items-start gap-3 text-left' : 'flex flex-col space-y-1.5 text-center sm:text-left',\n className,\n )}\n {...props}\n >\n {leading ? (\n <span\n data-slot=\"dialog-header-leading\"\n data-tone={leadingTone}\n aria-hidden=\"true\"\n className={cn(\n 'inline-flex size-10 shrink-0 items-center justify-center rounded-full',\n DIALOG_HEADER_TONE_CLASS[leadingTone],\n )}\n >\n {leading}\n </span>\n ) : null}\n {leading ? (\n <div\n data-slot=\"dialog-header-text\"\n className=\"flex min-w-0 flex-1 flex-col gap-1 text-left\"\n >\n {children}\n </div>\n ) : (\n children\n )}\n </div>\n)\nDialogHeader.displayName = 'DialogHeader'\n\nexport type DialogFooterProps = React.HTMLAttributes<HTMLDivElement> & {\n /** Footer layout. `default` reproduces the original\n * `flex flex-col-reverse gap-2 sm:flex-row sm:justify-end` look.\n * `equal` stretches children flex-1 for 50/50 confirmation footers\n * per Figma `Modal Footer [1.1]` variant 1. */\n layout?: 'default' | 'equal'\n /** Render the canonical `border-t` separator above the button row.\n * Per Figma `Modal Footer [1.1]` every variant ships the rule.\n * @default true */\n bordered?: boolean\n /** Optional left-side slot \u2014 typically a \"Don't show it again\"\n * CheckboxField, a \"Remember me\" Switch, a left link button, or a\n * step-indicator. Per Figma `Modal Footer [1.1]` variants 2\u20136.\n * When provided, children stay right-aligned and the leading slot\n * anchors left. Mutually exclusive with `layout=\"equal\"` (the\n * 50/50 split is a confirmation-flow shape that doesn't combine\n * with the leading-content footers per Figma). */\n leading?: React.ReactNode\n}\n\nconst DialogFooter = ({\n className,\n layout = 'default',\n bordered = true,\n leading,\n children,\n ...props\n}: DialogFooterProps) => {\n if (layout === 'equal') {\n return (\n <div\n data-slot=\"dialog-footer\"\n data-layout=\"equal\"\n data-bordered={bordered ? 'true' : undefined}\n className={cn(\n // Per Figma: thin border-t separator above the footer in\n // every Modal Footer [1.1] variant. Rule is inset inside\n // the DialogContent's `p-6` padding \u2014 true edge-to-edge\n // ran the footer's layout box past the parent's\n // overflow-y-auto scrollbar gutter, pushing the scrollbar\n // outside the rounded card (caught in QuickDeal modal\n // testing). Edge-to-edge polish deferred to a v6 dialog\n // restructure that splits scrolling body from sticky\n // header/footer.\n bordered ? 'border-t border-input pt-4' : '',\n 'flex flex-row gap-2 [&>*]:flex-1',\n className,\n )}\n {...props}\n >\n {children}\n </div>\n )\n }\n\n if (leading) {\n return (\n <div\n data-slot=\"dialog-footer\"\n data-layout=\"default\"\n data-bordered={bordered ? 'true' : undefined}\n className={cn(\n // Per Figma: thin border-t separator above the footer in\n // every Modal Footer [1.1] variant. Rule is inset inside\n // the DialogContent's `p-6` padding \u2014 true edge-to-edge\n // ran the footer's layout box past the parent's\n // overflow-y-auto scrollbar gutter, pushing the scrollbar\n // outside the rounded card (caught in QuickDeal modal\n // testing). Edge-to-edge polish deferred to a v6 dialog\n // restructure that splits scrolling body from sticky\n // header/footer.\n bordered ? 'border-t border-input pt-4' : '',\n 'flex flex-col gap-3 sm:flex-row sm:items-center',\n className,\n )}\n {...props}\n >\n <div\n data-slot=\"dialog-footer-leading\"\n className=\"inline-flex items-center gap-2 sm:mr-auto\"\n >\n {leading}\n </div>\n <div\n data-slot=\"dialog-footer-trailing\"\n className=\"flex flex-col-reverse gap-2 sm:flex-row sm:items-center\"\n >\n {children}\n </div>\n </div>\n )\n }\n\n return (\n <div\n data-slot=\"dialog-footer\"\n data-layout=\"default\"\n data-bordered={bordered ? 'true' : undefined}\n className={cn(\n // Per Figma: the border-t separator runs edge-to-edge across\n // the modal card (terminates at the rounded corners), NOT\n // inset inside the DialogContent's `p-6` padding. We escape\n // the parent's horizontal padding with `-mx-6` and re-apply\n // `px-6` so the button row keeps its inset position.\n bordered ? '-mx-6 border-t border-input px-6 pt-4' : '',\n 'flex flex-col-reverse gap-2 sm:flex-row sm:justify-end',\n className,\n )}\n {...props}\n >\n {children}\n </div>\n )\n}\nDialogFooter.displayName = 'DialogFooter'\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n data-slot=\"dialog-title\"\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n data-slot=\"dialog-description\"\n className={cn('text-sm text-muted-foreground', className)}\n {...props}\n />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"],
5
+ "mappings": ";AA2DE,cA6EM,YA7EN;AAzDF,YAAY,WAAW;AACvB,YAAY,qBAAqB;AACjC,SAAS,SAAS;AAClB,SAAS,WAA8B;AAEvC,SAAS,UAAU;AACnB,SAAS,YAAY;AAmCrB,MAAM,SAAS,gBAAgB;AAE/B,MAAM,gBAAgB,gBAAgB;AAEtC,MAAM,e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YAAY,cAAc,gBAAgB,MAAM;AAEhD,MAAM,oBAAoB,MAAM,WAG9B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC,gBAAgB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,aAAU;AAAA,IACV,WAAW,GAAG,iCAAiC,SAAS;AAAA,IACvD,GAAG;AAAA;AACN,CACD;AACD,kBAAkB,cAAc,gBAAgB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,219 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
5
+ import { X } from "lucide-react";
6
+ import { cva } from "class-variance-authority";
7
+ import { cn } from "@open-mercato/shared/lib/utils";
8
+ const Drawer = DialogPrimitive.Root;
9
+ const DrawerTrigger = DialogPrimitive.Trigger;
10
+ const DrawerPortal = DialogPrimitive.Portal;
11
+ const DrawerClose = DialogPrimitive.Close;
12
+ const DrawerOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
13
+ DialogPrimitive.Overlay,
14
+ {
15
+ ref,
16
+ "data-slot": "drawer-overlay",
17
+ className: cn(
18
+ "fixed inset-0 z-overlay bg-foreground/40 backdrop-blur-sm",
19
+ "data-[state=open]:animate-in data-[state=closed]:animate-out",
20
+ "data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",
21
+ className
22
+ ),
23
+ ...props
24
+ }
25
+ ));
26
+ DrawerOverlay.displayName = DialogPrimitive.Overlay.displayName;
27
+ const drawerContentVariants = cva(
28
+ // Base layout — fixed position, flex column so DrawerHeader / Body
29
+ // / Footer compose vertically with the body filling free space.
30
+ // Per Figma the panel has rounded corners on the inner (viewport-
31
+ // facing) edges only, no border on the seam, and a generous shadow.
32
+ "fixed z-popover flex flex-col gap-0 bg-background shadow-2xl outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=open]:duration-200 data-[state=closed]:duration-150",
33
+ {
34
+ variants: {
35
+ side: {
36
+ right: "inset-y-0 right-0 h-full w-full max-w-md rounded-l-xl data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right",
37
+ left: "inset-y-0 left-0 h-full w-full max-w-md rounded-r-xl data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left",
38
+ top: "inset-x-0 top-0 max-h-[80vh] w-full rounded-b-xl data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top",
39
+ bottom: "inset-x-0 bottom-0 max-h-[80vh] w-full rounded-t-xl data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom"
40
+ }
41
+ },
42
+ defaultVariants: { side: "right" }
43
+ }
44
+ );
45
+ const DrawerContent = React.forwardRef(
46
+ ({
47
+ className,
48
+ side,
49
+ children,
50
+ hideCloseButton = false,
51
+ closeAriaLabel = "Close",
52
+ ...props
53
+ }, ref) => /* @__PURE__ */ jsxs(DrawerPortal, { children: [
54
+ /* @__PURE__ */ jsx(DrawerOverlay, {}),
55
+ /* @__PURE__ */ jsxs(
56
+ DialogPrimitive.Content,
57
+ {
58
+ ref,
59
+ "data-slot": "drawer-content",
60
+ "data-side": side ?? "right",
61
+ className: cn(drawerContentVariants({ side }), className),
62
+ ...props,
63
+ children: [
64
+ children,
65
+ !hideCloseButton ? /* @__PURE__ */ jsx(
66
+ DrawerClose,
67
+ {
68
+ "data-slot": "drawer-close-button",
69
+ "aria-label": closeAriaLabel,
70
+ className: cn(
71
+ "absolute right-4 top-4 inline-flex size-8 items-center justify-center rounded-md text-muted-foreground outline-none transition-colors",
72
+ "hover:bg-muted/40 hover:text-foreground",
73
+ "focus-visible:shadow-focus"
74
+ ),
75
+ children: /* @__PURE__ */ jsx(X, { "aria-hidden": "true", className: "size-4" })
76
+ }
77
+ ) : null
78
+ ]
79
+ }
80
+ )
81
+ ] })
82
+ );
83
+ DrawerContent.displayName = "DrawerContent";
84
+ const DrawerHeader = React.forwardRef(
85
+ ({ className, leading, children, ...props }, ref) => /* @__PURE__ */ jsxs(
86
+ "div",
87
+ {
88
+ ref,
89
+ "data-slot": "drawer-header",
90
+ className: cn(
91
+ // Per Figma: no chrome border below the header. Padding-right
92
+ // reserves room for the auto-close button at top-right.
93
+ "flex items-start gap-3 px-6 pt-5 pb-4 pr-14",
94
+ className
95
+ ),
96
+ ...props,
97
+ children: [
98
+ leading ? /* @__PURE__ */ jsx(
99
+ "span",
100
+ {
101
+ "data-slot": "drawer-header-leading",
102
+ "aria-hidden": "true",
103
+ className: "inline-flex size-10 shrink-0 items-center justify-center rounded-full border border-input bg-background text-muted-foreground",
104
+ children: leading
105
+ }
106
+ ) : null,
107
+ /* @__PURE__ */ jsx("div", { "data-slot": "drawer-header-text", className: "flex min-w-0 flex-1 flex-col gap-1", children })
108
+ ]
109
+ }
110
+ )
111
+ );
112
+ DrawerHeader.displayName = "DrawerHeader";
113
+ const DrawerBody = React.forwardRef(
114
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
115
+ "div",
116
+ {
117
+ ref,
118
+ "data-slot": "drawer-body",
119
+ className: cn("flex-1 overflow-y-auto px-6 py-2", className),
120
+ ...props
121
+ }
122
+ )
123
+ );
124
+ DrawerBody.displayName = "DrawerBody";
125
+ const DrawerFooter = React.forwardRef(
126
+ ({ className, layout = "default", leading, children, ...props }, ref) => {
127
+ const childArray = React.Children.toArray(children);
128
+ if (layout === "equal") {
129
+ return /* @__PURE__ */ jsx(
130
+ "div",
131
+ {
132
+ ref,
133
+ "data-slot": "drawer-footer",
134
+ "data-layout": "equal",
135
+ className: cn(
136
+ // Per Figma: no chrome top-border separator; equal-stretch
137
+ // children share the row (50/50 for two buttons).
138
+ "flex flex-row items-center gap-3 px-6 pt-4 pb-5 [&>*]:flex-1",
139
+ className
140
+ ),
141
+ ...props,
142
+ children: childArray
143
+ }
144
+ );
145
+ }
146
+ return /* @__PURE__ */ jsxs(
147
+ "div",
148
+ {
149
+ ref,
150
+ "data-slot": "drawer-footer",
151
+ "data-layout": "default",
152
+ className: cn(
153
+ // Per Figma: no chrome top-border. Optional `leading` anchors
154
+ // left (mr-auto sibling), buttons stay right-aligned.
155
+ "flex flex-row items-center gap-3 px-6 pt-4 pb-5",
156
+ className
157
+ ),
158
+ ...props,
159
+ children: [
160
+ leading ? /* @__PURE__ */ jsx(
161
+ "div",
162
+ {
163
+ "data-slot": "drawer-footer-leading",
164
+ className: "mr-auto inline-flex items-center gap-2",
165
+ children: leading
166
+ }
167
+ ) : null,
168
+ childArray.length > 0 ? /* @__PURE__ */ jsx(
169
+ "div",
170
+ {
171
+ "data-slot": "drawer-footer-trailing",
172
+ className: cn(
173
+ "inline-flex items-center gap-3",
174
+ leading ? "" : "ml-auto"
175
+ ),
176
+ children: childArray
177
+ }
178
+ ) : null
179
+ ]
180
+ }
181
+ );
182
+ }
183
+ );
184
+ DrawerFooter.displayName = "DrawerFooter";
185
+ const DrawerTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
186
+ DialogPrimitive.Title,
187
+ {
188
+ ref,
189
+ "data-slot": "drawer-title",
190
+ className: cn("text-base font-semibold leading-tight text-foreground", className),
191
+ ...props
192
+ }
193
+ ));
194
+ DrawerTitle.displayName = DialogPrimitive.Title.displayName;
195
+ const DrawerDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
196
+ DialogPrimitive.Description,
197
+ {
198
+ ref,
199
+ "data-slot": "drawer-description",
200
+ className: cn("text-sm text-muted-foreground", className),
201
+ ...props
202
+ }
203
+ ));
204
+ DrawerDescription.displayName = DialogPrimitive.Description.displayName;
205
+ export {
206
+ Drawer,
207
+ DrawerBody,
208
+ DrawerClose,
209
+ DrawerContent,
210
+ DrawerDescription,
211
+ DrawerFooter,
212
+ DrawerHeader,
213
+ DrawerOverlay,
214
+ DrawerPortal,
215
+ DrawerTitle,
216
+ DrawerTrigger,
217
+ drawerContentVariants
218
+ };
219
+ //# sourceMappingURL=drawer.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/primitives/drawer.tsx"],
4
+ "sourcesContent": ["\"use client\"\n\nimport * as React from 'react'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { X } from 'lucide-react'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '@open-mercato/shared/lib/utils'\n\n/**\n * Side-sheet primitive \u2014 slides in from `right` (default), `left`,\n * `top`, or `bottom`. Distinct from `Dialog`:\n *\n * `Drawer` \u2014 contextual / non-blocking-feeling. Used for detail\n * panes, secondary forms, mobile menus. The user can\n * glance at it while the surrounding page stays visible\n * at a glance behind the overlay.\n * `Dialog` \u2014 modal / focused. Used for confirmations, critical\n * forms, and full-content workflows that should fully\n * replace the page underneath.\n *\n * Built on `@radix-ui/react-dialog` (Radix Dialog under the hood \u2014\n * inherits role=\"dialog\", aria-modal, focus trap, ESC to close,\n * outside-click to dismiss).\n *\n * Figma source: DS Open Mercato `Drawer` page (`486:7366`) \u2014\n * `Drawer Header [1.1]` (`3187:2897`) covers 4 header variants\n * (title only / title + leading icon / title + description /\n * title + description + leading icon badge); `Drawer Footer [1.1]`\n * (`4096:21416`) covers 6 footer variants (50/50 stretched, right-\n * aligned compact, left checkbox + right buttons, left switch +\n * right buttons, left step dots + right buttons, left link button +\n * right buttons). Per the Figma examples the panel has rounded\n * corners on the inner (viewport-facing) edges only, no border on\n * the seam, and no chrome-level dividers between header / body /\n * footer (separators inside the body come from content, not the\n * Drawer).\n *\n * ```tsx\n * const [open, setOpen] = React.useState(false)\n * <Drawer open={open} onOpenChange={setOpen} side=\"right\">\n * <DrawerTrigger asChild>\n * <Button>Open drawer</Button>\n * </DrawerTrigger>\n * <DrawerContent>\n * <DrawerHeader leading={<Clock />}>\n * <DrawerTitle>Edit person</DrawerTitle>\n * <DrawerDescription>Update the person's contact info.</DrawerDescription>\n * </DrawerHeader>\n * <DrawerBody>{children}</DrawerBody>\n * <DrawerFooter layout=\"equal\">\n * <DrawerClose asChild>\n * <Button variant=\"outline\">Cancel</Button>\n * </DrawerClose>\n * <Button>Continue</Button>\n * </DrawerFooter>\n * </DrawerContent>\n * </Drawer>\n * ```\n */\n\nconst Drawer = DialogPrimitive.Root\nconst DrawerTrigger = DialogPrimitive.Trigger\nconst DrawerPortal = DialogPrimitive.Portal\nconst DrawerClose = DialogPrimitive.Close\n\nconst DrawerOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n data-slot=\"drawer-overlay\"\n className={cn(\n 'fixed inset-0 z-overlay bg-foreground/40 backdrop-blur-sm',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out',\n 'data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0',\n className,\n )}\n {...props}\n />\n))\nDrawerOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst drawerContentVariants = cva(\n // Base layout \u2014 fixed position, flex column so DrawerHeader / Body\n // / Footer compose vertically with the body filling free space.\n // Per Figma the panel has rounded corners on the inner (viewport-\n // facing) edges only, no border on the seam, and a generous shadow.\n 'fixed z-popover flex flex-col gap-0 bg-background shadow-2xl outline-none ' +\n 'data-[state=open]:animate-in data-[state=closed]:animate-out ' +\n 'data-[state=open]:duration-200 data-[state=closed]:duration-150',\n {\n variants: {\n side: {\n right:\n 'inset-y-0 right-0 h-full w-full max-w-md rounded-l-xl ' +\n 'data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right',\n left:\n 'inset-y-0 left-0 h-full w-full max-w-md rounded-r-xl ' +\n 'data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left',\n top:\n 'inset-x-0 top-0 max-h-[80vh] w-full rounded-b-xl ' +\n 'data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top',\n bottom:\n 'inset-x-0 bottom-0 max-h-[80vh] w-full rounded-t-xl ' +\n 'data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom',\n },\n },\n defaultVariants: { side: 'right' },\n },\n)\n\nexport type DrawerContentProps = React.ComponentPropsWithoutRef<\n typeof DialogPrimitive.Content\n> &\n VariantProps<typeof drawerContentVariants> & {\n /** Hide the default top-right close button. */\n hideCloseButton?: boolean\n /** ARIA label for the auto-rendered close button. Default `\"Close\"`. */\n closeAriaLabel?: string\n }\n\nconst DrawerContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n DrawerContentProps\n>(\n (\n {\n className,\n side,\n children,\n hideCloseButton = false,\n closeAriaLabel = 'Close',\n ...props\n },\n ref,\n ) => (\n <DrawerPortal>\n <DrawerOverlay />\n <DialogPrimitive.Content\n ref={ref}\n data-slot=\"drawer-content\"\n data-side={side ?? 'right'}\n className={cn(drawerContentVariants({ side }), className)}\n {...props}\n >\n {children}\n {!hideCloseButton ? (\n <DrawerClose\n data-slot=\"drawer-close-button\"\n aria-label={closeAriaLabel}\n className={cn(\n 'absolute right-4 top-4 inline-flex size-8 items-center justify-center rounded-md text-muted-foreground outline-none transition-colors',\n 'hover:bg-muted/40 hover:text-foreground',\n 'focus-visible:shadow-focus',\n )}\n >\n <X aria-hidden=\"true\" className=\"size-4\" />\n </DrawerClose>\n ) : null}\n </DialogPrimitive.Content>\n </DrawerPortal>\n ),\n)\nDrawerContent.displayName = 'DrawerContent'\n\nexport type DrawerHeaderProps = React.HTMLAttributes<HTMLDivElement> & {\n /**\n * Optional leading icon \u2014 rendered inside a size-10 bordered circle\n * badge to the left of the title block. Matches Figma `Drawer Header\n * [1.1]` variants 2 + 4 (icon-prefixed title). Pass a `lucide-react`\n * icon element (size-4 recommended) or any inline node.\n */\n leading?: React.ReactNode\n}\n\nconst DrawerHeader = React.forwardRef<HTMLDivElement, DrawerHeaderProps>(\n ({ className, leading, children, ...props }, ref) => (\n <div\n ref={ref}\n data-slot=\"drawer-header\"\n className={cn(\n // Per Figma: no chrome border below the header. Padding-right\n // reserves room for the auto-close button at top-right.\n 'flex items-start gap-3 px-6 pt-5 pb-4 pr-14',\n className,\n )}\n {...props}\n >\n {leading ? (\n <span\n data-slot=\"drawer-header-leading\"\n aria-hidden=\"true\"\n className=\"inline-flex size-10 shrink-0 items-center justify-center rounded-full border border-input bg-background text-muted-foreground\"\n >\n {leading}\n </span>\n ) : null}\n <div data-slot=\"drawer-header-text\" className=\"flex min-w-0 flex-1 flex-col gap-1\">\n {children}\n </div>\n </div>\n ),\n)\nDrawerHeader.displayName = 'DrawerHeader'\n\nconst DrawerBody = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-slot=\"drawer-body\"\n className={cn('flex-1 overflow-y-auto px-6 py-2', className)}\n {...props}\n />\n ),\n)\nDrawerBody.displayName = 'DrawerBody'\n\nexport type DrawerFooterProps = React.HTMLAttributes<HTMLDivElement> & {\n /**\n * Footer button layout per Figma `Drawer Footer [1.1]`:\n * `default` \u2014 right-aligned compact buttons (Cancel + Continue).\n * `equal` \u2014 children stretched to share the row equally (50/50\n * for two children). Matches Figma variant 1.\n * @default 'default'\n */\n layout?: 'default' | 'equal'\n /**\n * Optional left-side slot \u2014 checkbox (\"Don't show again\"), switch\n * (\"Remember me\"), step-indicator dots, link button, or any leading\n * content per Figma footer variants 3\u20136. When provided, children\n * stay right-aligned and the leading slot anchors left.\n * Mutually exclusive with `layout=\"equal\"` (Figma never combines\n * the two \u2014 the 50/50 split is a confirmation-flow shape).\n */\n leading?: React.ReactNode\n}\n\nconst DrawerFooter = React.forwardRef<HTMLDivElement, DrawerFooterProps>(\n ({ className, layout = 'default', leading, children, ...props }, ref) => {\n const childArray = React.Children.toArray(children)\n if (layout === 'equal') {\n return (\n <div\n ref={ref}\n data-slot=\"drawer-footer\"\n data-layout=\"equal\"\n className={cn(\n // Per Figma: no chrome top-border separator; equal-stretch\n // children share the row (50/50 for two buttons).\n 'flex flex-row items-center gap-3 px-6 pt-4 pb-5 [&>*]:flex-1',\n className,\n )}\n {...props}\n >\n {childArray}\n </div>\n )\n }\n return (\n <div\n ref={ref}\n data-slot=\"drawer-footer\"\n data-layout=\"default\"\n className={cn(\n // Per Figma: no chrome top-border. Optional `leading` anchors\n // left (mr-auto sibling), buttons stay right-aligned.\n 'flex flex-row items-center gap-3 px-6 pt-4 pb-5',\n className,\n )}\n {...props}\n >\n {leading ? (\n <div\n data-slot=\"drawer-footer-leading\"\n className=\"mr-auto inline-flex items-center gap-2\"\n >\n {leading}\n </div>\n ) : null}\n {childArray.length > 0 ? (\n <div\n data-slot=\"drawer-footer-trailing\"\n className={cn(\n 'inline-flex items-center gap-3',\n leading ? '' : 'ml-auto',\n )}\n >\n {childArray}\n </div>\n ) : null}\n </div>\n )\n },\n)\nDrawerFooter.displayName = 'DrawerFooter'\n\nconst DrawerTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n data-slot=\"drawer-title\"\n className={cn('text-base font-semibold leading-tight text-foreground', className)}\n {...props}\n />\n))\nDrawerTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DrawerDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n data-slot=\"drawer-description\"\n className={cn('text-sm text-muted-foreground', className)}\n {...props}\n />\n))\nDrawerDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Drawer,\n DrawerTrigger,\n DrawerPortal,\n DrawerClose,\n DrawerOverlay,\n DrawerContent,\n DrawerHeader,\n DrawerBody,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n drawerContentVariants,\n}\n"],
5
+ "mappings": ";AAsEE,cAsEI,YAtEJ;AApEF,YAAY,WAAW;AACvB,YAAY,qBAAqB;AACjC,SA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