@orangecheck/app-design 0.0.0-stage → 0.1.1

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 (48) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +39 -2
  3. package/dist/brand.d.mts +46 -0
  4. package/dist/brand.d.ts +46 -0
  5. package/dist/brand.js +144 -0
  6. package/dist/brand.js.map +1 -0
  7. package/dist/brand.mjs +136 -0
  8. package/dist/brand.mjs.map +1 -0
  9. package/dist/chrome.d.mts +64 -0
  10. package/dist/chrome.d.ts +64 -0
  11. package/dist/chrome.js +479 -0
  12. package/dist/chrome.js.map +1 -0
  13. package/dist/chrome.mjs +447 -0
  14. package/dist/chrome.mjs.map +1 -0
  15. package/dist/components.d.mts +474 -0
  16. package/dist/components.d.ts +474 -0
  17. package/dist/components.js +619 -0
  18. package/dist/components.js.map +1 -0
  19. package/dist/components.mjs +588 -0
  20. package/dist/components.mjs.map +1 -0
  21. package/dist/index.d.mts +21 -0
  22. package/dist/index.d.ts +21 -0
  23. package/dist/index.js +1597 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/index.mjs +1448 -0
  26. package/dist/index.mjs.map +1 -0
  27. package/dist/primitives.d.mts +140 -0
  28. package/dist/primitives.d.ts +140 -0
  29. package/dist/primitives.js +706 -0
  30. package/dist/primitives.js.map +1 -0
  31. package/dist/primitives.mjs +606 -0
  32. package/dist/primitives.mjs.map +1 -0
  33. package/dist/styles/fonts/inter-latin-ext.woff2 +0 -0
  34. package/dist/styles/fonts/inter-latin.woff2 +0 -0
  35. package/dist/styles/fonts/jetbrains-mono-latin-ext.woff2 +0 -0
  36. package/dist/styles/fonts/jetbrains-mono-latin.woff2 +0 -0
  37. package/dist/styles/fonts.css +74 -0
  38. package/dist/styles/motion.css +80 -0
  39. package/dist/styles/theme.css +227 -0
  40. package/dist/styles/tokens.css +152 -0
  41. package/dist/styles.css +14 -0
  42. package/dist/tokens.d.mts +42 -0
  43. package/dist/tokens.d.ts +42 -0
  44. package/dist/tokens.js +50 -0
  45. package/dist/tokens.js.map +1 -0
  46. package/dist/tokens.mjs +45 -0
  47. package/dist/tokens.mjs.map +1 -0
  48. package/package.json +114 -4
@@ -0,0 +1,606 @@
1
+ import { Slot } from '@radix-ui/react-slot';
2
+ import { cva } from 'class-variance-authority';
3
+ import { forwardRef, createContext, useContext, useId, isValidElement, cloneElement } from 'react';
4
+ import { clsx } from 'clsx';
5
+ import { extendTailwindMerge } from 'tailwind-merge';
6
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
7
+ import { Toaster as Toaster$1 } from 'sonner';
8
+ export { toast } from 'sonner';
9
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
10
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
11
+ import * as LabelPrimitive from '@radix-ui/react-label';
12
+ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
13
+ import * as SelectPrimitive from '@radix-ui/react-select';
14
+ import * as SwitchPrimitive from '@radix-ui/react-switch';
15
+ import { ChevronDown, Check, X } from 'lucide-react';
16
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
17
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
18
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
19
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
20
+ import * as TabsPrimitive from '@radix-ui/react-tabs';
21
+
22
+ var merge = extendTailwindMerge({
23
+ extend: {
24
+ classGroups: {
25
+ "oca-type": [
26
+ "oca-display-1",
27
+ "oca-display-2",
28
+ "oca-display-3",
29
+ "oca-title",
30
+ "oca-title-sm",
31
+ "oca-eyebrow",
32
+ "oca-lead",
33
+ "oca-body",
34
+ "oca-numeral"
35
+ ]
36
+ }
37
+ }
38
+ });
39
+ function cn(...inputs) {
40
+ return merge(clsx(inputs));
41
+ }
42
+ function Spinner({ className, label }) {
43
+ return /* @__PURE__ */ jsxs(
44
+ "svg",
45
+ {
46
+ viewBox: "0 0 24 24",
47
+ fill: "none",
48
+ role: label ? "status" : void 0,
49
+ "aria-label": label,
50
+ "aria-hidden": label ? void 0 : true,
51
+ className: cn("size-4 animate-spin", className),
52
+ children: [
53
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9", stroke: "currentColor", strokeOpacity: "0.2", strokeWidth: "2.5" }),
54
+ /* @__PURE__ */ jsx("path", { d: "M21 12a9 9 0 0 0-9-9", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round" })
55
+ ]
56
+ }
57
+ );
58
+ }
59
+ function Skeleton({ className, ...props }) {
60
+ return /* @__PURE__ */ jsx("div", { "data-ui": "skeleton", className: cn("animate-pulse rounded-lg bg-muted", className), ...props });
61
+ }
62
+ var Separator = forwardRef(function Separator2({ className, orientation = "horizontal", decorative = true, ...props }, ref) {
63
+ return /* @__PURE__ */ jsx(
64
+ SeparatorPrimitive.Root,
65
+ {
66
+ ref,
67
+ decorative,
68
+ orientation,
69
+ className: cn(
70
+ "shrink-0 bg-border",
71
+ orientation === "horizontal" ? "h-px w-full" : "h-full w-px",
72
+ className
73
+ ),
74
+ ...props
75
+ }
76
+ );
77
+ });
78
+ function Kbd({ className, ...props }) {
79
+ return /* @__PURE__ */ jsx(
80
+ "kbd",
81
+ {
82
+ className: cn(
83
+ "inline-flex h-5 min-w-5 items-center justify-center rounded-md border border-border bg-card px-1.5 font-mono text-[11px] text-muted-foreground",
84
+ className
85
+ ),
86
+ ...props
87
+ }
88
+ );
89
+ }
90
+ function StatusDot({
91
+ tone = "neutral",
92
+ pulse = false,
93
+ className
94
+ }) {
95
+ const color = {
96
+ neutral: "bg-oca-subtle",
97
+ success: "bg-success",
98
+ warning: "bg-warning",
99
+ danger: "bg-destructive",
100
+ brand: "bg-brand"
101
+ }[tone];
102
+ return /* @__PURE__ */ jsx(
103
+ "span",
104
+ {
105
+ "aria-hidden": true,
106
+ className: cn("inline-block size-2 shrink-0 rounded-full", color, pulse && "oca-animate-pulse-dot", className)
107
+ }
108
+ );
109
+ }
110
+ function Toaster(props) {
111
+ return /* @__PURE__ */ jsx(
112
+ Toaster$1,
113
+ {
114
+ position: "bottom-right",
115
+ toastOptions: {
116
+ classNames: {
117
+ toast: "oca-toast rounded-2xl border border-border bg-popover text-popover-foreground shadow-lg font-sans",
118
+ title: "text-[0.9375rem] font-medium",
119
+ description: "text-sm text-muted-foreground",
120
+ actionButton: "rounded-full bg-primary text-primary-foreground",
121
+ cancelButton: "rounded-full bg-muted text-foreground"
122
+ }
123
+ },
124
+ ...props
125
+ }
126
+ );
127
+ }
128
+ var buttonVariants = cva(
129
+ [
130
+ "inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap rounded-full font-medium",
131
+ "transition-[background-color,border-color,color,box-shadow,transform] duration-150",
132
+ "outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
133
+ "active:translate-y-px disabled:pointer-events-none disabled:opacity-45",
134
+ "[&_svg]:pointer-events-none [&_svg]:size-[1.1em] [&_svg]:shrink-0"
135
+ ],
136
+ {
137
+ variants: {
138
+ variant: {
139
+ primary: "bg-primary text-primary-foreground hover:bg-primary/85",
140
+ secondary: "border border-border bg-secondary text-secondary-foreground hover:border-oca-hairline-strong hover:bg-accent",
141
+ brand: "bg-brand text-brand-foreground hover:bg-oca-orange-deep",
142
+ ghost: "text-foreground hover:bg-accent",
143
+ danger: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
144
+ link: "h-auto rounded-none px-0 text-foreground underline decoration-border underline-offset-4 hover:decoration-foreground",
145
+ onInk: "bg-white text-oca-ink hover:bg-white/90",
146
+ onInkOutline: "border border-white/20 text-white hover:bg-white/10"
147
+ },
148
+ size: {
149
+ sm: "h-9 px-4 text-sm",
150
+ md: "h-11 px-5 text-[0.9375rem]",
151
+ lg: "h-14 px-7 text-[1.0625rem]",
152
+ icon: "size-10",
153
+ "icon-sm": "size-8"
154
+ }
155
+ },
156
+ compoundVariants: [{ variant: "link", className: "h-auto px-0" }],
157
+ defaultVariants: { variant: "primary", size: "md" }
158
+ }
159
+ );
160
+ var Button = forwardRef(function Button2({ className, variant, size, asChild = false, loading = false, disabled, children, type, ...props }, ref) {
161
+ const Comp = asChild ? Slot : "button";
162
+ return /* @__PURE__ */ jsx(
163
+ Comp,
164
+ {
165
+ ref,
166
+ "data-ui": "button",
167
+ className: cn(buttonVariants({ variant, size }), className),
168
+ disabled: asChild ? void 0 : disabled || loading,
169
+ "aria-busy": loading || void 0,
170
+ type: asChild ? void 0 : type ?? "button",
171
+ ...props,
172
+ children: asChild ? children : /* @__PURE__ */ jsxs(Fragment, { children: [
173
+ loading ? /* @__PURE__ */ jsx(Spinner, { className: "size-[1.1em]" }) : null,
174
+ children
175
+ ] })
176
+ }
177
+ );
178
+ });
179
+ var badgeVariants = cva(
180
+ "inline-flex h-6 shrink-0 items-center gap-1.5 whitespace-nowrap rounded-full border px-2.5 text-[0.8125rem] font-medium leading-none",
181
+ {
182
+ variants: {
183
+ tone: {
184
+ neutral: "border-border bg-card text-foreground",
185
+ muted: "border-transparent bg-muted text-muted-foreground",
186
+ brand: "border-transparent bg-[color-mix(in_oklab,var(--oca-orange)_12%,var(--card))] text-oca-accent-ink",
187
+ success: "border-transparent bg-[color-mix(in_oklab,var(--success)_12%,var(--card))] text-success",
188
+ warning: "border-transparent bg-[color-mix(in_oklab,var(--warning)_14%,var(--card))] text-warning",
189
+ danger: "border-transparent bg-[color-mix(in_oklab,var(--destructive)_12%,var(--card))] text-destructive",
190
+ info: "border-transparent bg-[color-mix(in_oklab,var(--info)_12%,var(--card))] text-info",
191
+ ink: "border-transparent bg-oca-ink text-oca-ink-foreground",
192
+ onInk: "border-white/15 bg-white/5 text-white/90"
193
+ }
194
+ },
195
+ defaultVariants: { tone: "neutral" }
196
+ }
197
+ );
198
+ function Badge({ className, tone, ...props }) {
199
+ return /* @__PURE__ */ jsx("span", { "data-ui": "badge", className: cn(badgeVariants({ tone }), className), ...props });
200
+ }
201
+ var cardVariants = cva("relative rounded-[1.25rem] border", {
202
+ variants: {
203
+ tone: {
204
+ default: "border-border bg-card text-card-foreground",
205
+ sunken: "border-transparent bg-muted text-foreground",
206
+ ink: "border-oca-ink-line bg-oca-ink-card text-oca-ink-foreground",
207
+ outline: "border-border bg-transparent text-foreground"
208
+ },
209
+ padding: {
210
+ none: "",
211
+ sm: "p-5",
212
+ md: "p-6 md:p-8",
213
+ lg: "p-8 md:p-10"
214
+ },
215
+ interactive: {
216
+ true: "transition-colors hover:border-oca-hairline-strong focus-within:border-oca-hairline-strong",
217
+ false: ""
218
+ }
219
+ },
220
+ defaultVariants: { tone: "default", padding: "md", interactive: false }
221
+ });
222
+ var Card = forwardRef(function Card2({ className, tone, padding, interactive, ...props }, ref) {
223
+ return /* @__PURE__ */ jsx("div", { ref, "data-ui": "card", className: cn(cardVariants({ tone, padding, interactive }), className), ...props });
224
+ });
225
+ function CardHeader({ className, ...props }) {
226
+ return /* @__PURE__ */ jsx("div", { className: cn("flex flex-col gap-2", className), ...props });
227
+ }
228
+ function CardNumeral({ className, ...props }) {
229
+ return /* @__PURE__ */ jsx("span", { className: cn("oca-numeral block", className), ...props });
230
+ }
231
+ function CardTitle({ className, ...props }) {
232
+ return /* @__PURE__ */ jsx("h3", { className: cn("oca-title flex flex-wrap items-center gap-2.5", className), ...props });
233
+ }
234
+ function CardDescription({ className, ...props }) {
235
+ return /* @__PURE__ */ jsx("p", { className: cn("oca-body", className), ...props });
236
+ }
237
+ function CardContent({ className, ...props }) {
238
+ return /* @__PURE__ */ jsx("div", { className: cn("mt-5", className), ...props });
239
+ }
240
+ function CardFooter({ className, ...props }) {
241
+ return /* @__PURE__ */ jsx("div", { className: cn("mt-6 flex flex-wrap items-center gap-3", className), ...props });
242
+ }
243
+ var fieldBase = [
244
+ "w-full rounded-xl border border-input bg-card text-foreground placeholder:text-oca-subtle",
245
+ "text-base md:text-[0.9375rem] outline-none transition-[border-color,box-shadow]",
246
+ "focus:border-foreground/35 focus:ring-4 focus:ring-[color-mix(in_oklab,var(--oca-orange)_16%,transparent)]",
247
+ "disabled:cursor-not-allowed disabled:opacity-55",
248
+ "aria-[invalid=true]:border-destructive aria-[invalid=true]:focus:ring-[color-mix(in_oklab,var(--destructive)_14%,transparent)]"
249
+ ];
250
+ var Input = forwardRef(function Input2({ className, type = "text", ...props }, ref) {
251
+ return /* @__PURE__ */ jsx("input", { ref, type, "data-ui": "input", className: cn(fieldBase, "h-11 px-3.5", className), ...props });
252
+ });
253
+ var Textarea = forwardRef(
254
+ function Textarea2({ className, ...props }, ref) {
255
+ return /* @__PURE__ */ jsx(
256
+ "textarea",
257
+ {
258
+ ref,
259
+ "data-ui": "textarea",
260
+ className: cn(fieldBase, "min-h-28 px-3.5 py-3 leading-relaxed", className),
261
+ ...props
262
+ }
263
+ );
264
+ }
265
+ );
266
+ var Label = forwardRef(function Label2({ className, ...props }, ref) {
267
+ return /* @__PURE__ */ jsx(
268
+ LabelPrimitive.Root,
269
+ {
270
+ ref,
271
+ className: cn("text-sm font-medium leading-none text-foreground", className),
272
+ ...props
273
+ }
274
+ );
275
+ });
276
+ function Field({ label, hint, error, children, className, hideLabel }) {
277
+ const id = useId();
278
+ const hintId = hint ? `${id}-hint` : void 0;
279
+ const errorId = error ? `${id}-error` : void 0;
280
+ const describedBy = [hintId, errorId].filter(Boolean).join(" ") || void 0;
281
+ const control = isValidElement(children) ? cloneElement(children, {
282
+ id,
283
+ "aria-describedby": describedBy,
284
+ "aria-invalid": error ? true : void 0
285
+ }) : children;
286
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-2", className), children: [
287
+ /* @__PURE__ */ jsx(Label, { htmlFor: id, className: hideLabel ? "sr-only" : void 0, children: label }),
288
+ hint ? /* @__PURE__ */ jsx("p", { id: hintId, className: "text-[0.8125rem] leading-snug text-muted-foreground", children: hint }) : null,
289
+ control,
290
+ error ? /* @__PURE__ */ jsx("p", { id: errorId, role: "alert", className: "text-[0.8125rem] leading-snug text-destructive", children: error }) : null
291
+ ] });
292
+ }
293
+ var Select = SelectPrimitive.Root;
294
+ var SelectGroup = SelectPrimitive.Group;
295
+ var SelectValue = SelectPrimitive.Value;
296
+ var SelectTrigger = forwardRef(function SelectTrigger2({ className, children, ...props }, ref) {
297
+ return /* @__PURE__ */ jsxs(
298
+ SelectPrimitive.Trigger,
299
+ {
300
+ ref,
301
+ className: cn(fieldBase, "flex h-11 items-center justify-between gap-2 px-3.5 text-left", className),
302
+ ...props,
303
+ children: [
304
+ /* @__PURE__ */ jsx("span", { className: "truncate", children }),
305
+ /* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { className: "size-4 shrink-0 text-muted-foreground" }) })
306
+ ]
307
+ }
308
+ );
309
+ });
310
+ var SelectContent = forwardRef(function SelectContent2({ className, children, position = "popper", ...props }, ref) {
311
+ return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx(
312
+ SelectPrimitive.Content,
313
+ {
314
+ ref,
315
+ position,
316
+ sideOffset: 6,
317
+ className: cn(
318
+ "oca-animate-fade z-50 max-h-[min(24rem,var(--radix-select-content-available-height))] min-w-[var(--radix-select-trigger-width)] overflow-hidden rounded-xl border border-border bg-popover p-1 text-popover-foreground shadow-lg",
319
+ className
320
+ ),
321
+ ...props,
322
+ children: /* @__PURE__ */ jsx(SelectPrimitive.Viewport, { children })
323
+ }
324
+ ) });
325
+ });
326
+ var SelectItem = forwardRef(function SelectItem2({ className, children, ...props }, ref) {
327
+ return /* @__PURE__ */ jsxs(
328
+ SelectPrimitive.Item,
329
+ {
330
+ ref,
331
+ className: cn(
332
+ "relative flex h-10 cursor-default select-none items-center rounded-lg pl-3 pr-9 text-[0.9375rem] outline-none",
333
+ "data-[highlighted]:bg-accent data-[disabled]:opacity-50",
334
+ className
335
+ ),
336
+ ...props,
337
+ children: [
338
+ /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children }),
339
+ /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { className: "absolute right-3", children: /* @__PURE__ */ jsx(Check, { className: "size-4" }) })
340
+ ]
341
+ }
342
+ );
343
+ });
344
+ var Checkbox = forwardRef(function Checkbox2({ className, ...props }, ref) {
345
+ return /* @__PURE__ */ jsx(
346
+ CheckboxPrimitive.Root,
347
+ {
348
+ ref,
349
+ className: cn(
350
+ "peer inline-flex size-5 shrink-0 items-center justify-center rounded-[6px] border border-input bg-card",
351
+ "outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
352
+ "data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
353
+ "disabled:cursor-not-allowed disabled:opacity-50",
354
+ className
355
+ ),
356
+ ...props,
357
+ children: /* @__PURE__ */ jsx(CheckboxPrimitive.Indicator, { children: /* @__PURE__ */ jsx(Check, { className: "size-3.5", strokeWidth: 3 }) })
358
+ }
359
+ );
360
+ });
361
+ var Switch = forwardRef(function Switch2({ className, ...props }, ref) {
362
+ return /* @__PURE__ */ jsx(
363
+ SwitchPrimitive.Root,
364
+ {
365
+ ref,
366
+ className: cn(
367
+ "peer inline-flex h-6 w-11 shrink-0 items-center rounded-full border border-transparent bg-input p-0.5",
368
+ "outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
369
+ "data-[state=checked]:bg-brand disabled:cursor-not-allowed disabled:opacity-50",
370
+ className
371
+ ),
372
+ ...props,
373
+ children: /* @__PURE__ */ jsx(SwitchPrimitive.Thumb, { className: "pointer-events-none block size-5 rounded-full bg-white shadow-sm transition-transform data-[state=checked]:translate-x-5" })
374
+ }
375
+ );
376
+ });
377
+ var RadioGroup = forwardRef(function RadioGroup2({ className, ...props }, ref) {
378
+ return /* @__PURE__ */ jsx(RadioGroupPrimitive.Root, { ref, className: cn("grid gap-3", className), ...props });
379
+ });
380
+ var RadioGroupItem = forwardRef(function RadioGroupItem2({ className, ...props }, ref) {
381
+ return /* @__PURE__ */ jsx(
382
+ RadioGroupPrimitive.Item,
383
+ {
384
+ ref,
385
+ className: cn(
386
+ "inline-flex size-5 shrink-0 items-center justify-center rounded-full border border-input bg-card",
387
+ "outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
388
+ "data-[state=checked]:border-primary disabled:cursor-not-allowed disabled:opacity-50",
389
+ className
390
+ ),
391
+ ...props,
392
+ children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: "block size-2.5 rounded-full bg-primary" })
393
+ }
394
+ );
395
+ });
396
+ var Dialog = DialogPrimitive.Root;
397
+ var DialogTrigger = DialogPrimitive.Trigger;
398
+ var DialogClose = DialogPrimitive.Close;
399
+ var overlayClass = "oca-animate-fade fixed inset-0 z-50 bg-[rgb(10_10_10/0.38)] backdrop-blur-[2px] data-[state=closed]:opacity-0";
400
+ var DialogContent = forwardRef(function DialogContent2({ className, children, hideClose, ...props }, ref) {
401
+ return /* @__PURE__ */ jsxs(DialogPrimitive.Portal, { children: [
402
+ /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: overlayClass }),
403
+ /* @__PURE__ */ jsxs(
404
+ DialogPrimitive.Content,
405
+ {
406
+ ref,
407
+ className: cn(
408
+ "oca-animate-rise fixed left-1/2 top-1/2 z-50 w-[min(92vw,34rem)] -translate-x-1/2 -translate-y-1/2",
409
+ "max-h-[88vh] overflow-y-auto rounded-[1.5rem] border border-border bg-popover p-6 text-popover-foreground shadow-xl md:p-8",
410
+ "outline-none",
411
+ className
412
+ ),
413
+ ...props,
414
+ children: [
415
+ children,
416
+ hideClose ? null : /* @__PURE__ */ jsx(
417
+ DialogPrimitive.Close,
418
+ {
419
+ className: "absolute right-4 top-4 inline-flex size-9 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
420
+ "aria-label": "Close",
421
+ children: /* @__PURE__ */ jsx(X, { className: "size-4" })
422
+ }
423
+ )
424
+ ]
425
+ }
426
+ )
427
+ ] });
428
+ });
429
+ function DialogHeader({ className, ...props }) {
430
+ return /* @__PURE__ */ jsx("div", { className: cn("mb-5 flex flex-col gap-2 pr-8", className), ...props });
431
+ }
432
+ function DialogFooter({ className, ...props }) {
433
+ return /* @__PURE__ */ jsx("div", { className: cn("mt-7 flex flex-col-reverse gap-3 sm:flex-row sm:justify-end", className), ...props });
434
+ }
435
+ var DialogTitle = forwardRef(function DialogTitle2({ className, ...props }, ref) {
436
+ return /* @__PURE__ */ jsx(
437
+ DialogPrimitive.Title,
438
+ {
439
+ ref,
440
+ className: cn("text-[1.5rem] font-normal leading-tight tracking-[-0.02em]", className),
441
+ ...props
442
+ }
443
+ );
444
+ });
445
+ var DialogDescription = forwardRef(function DialogDescription2({ className, ...props }, ref) {
446
+ return /* @__PURE__ */ jsx(DialogPrimitive.Description, { ref, className: cn("oca-body", className), ...props });
447
+ });
448
+ var Sheet = DialogPrimitive.Root;
449
+ var SheetTrigger = DialogPrimitive.Trigger;
450
+ var SheetClose = DialogPrimitive.Close;
451
+ var SheetTitle = DialogTitle;
452
+ var SheetDescription = DialogDescription;
453
+ var sheetSide = {
454
+ right: "inset-y-0 right-0 h-full w-[min(88vw,24rem)] border-l",
455
+ left: "inset-y-0 left-0 h-full w-[min(88vw,24rem)] border-r",
456
+ bottom: "inset-x-0 bottom-0 max-h-[88vh] rounded-t-[1.5rem] border-t"
457
+ };
458
+ var SheetContent = forwardRef(function SheetContent2({ className, children, side = "right", ...props }, ref) {
459
+ return /* @__PURE__ */ jsxs(DialogPrimitive.Portal, { children: [
460
+ /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: overlayClass }),
461
+ /* @__PURE__ */ jsxs(
462
+ DialogPrimitive.Content,
463
+ {
464
+ ref,
465
+ className: cn(
466
+ "oca-animate-fade fixed z-50 flex flex-col gap-4 overflow-y-auto border-border bg-popover p-6 text-popover-foreground shadow-xl outline-none",
467
+ sheetSide[side],
468
+ className
469
+ ),
470
+ ...props,
471
+ children: [
472
+ children,
473
+ /* @__PURE__ */ jsx(
474
+ DialogPrimitive.Close,
475
+ {
476
+ className: "absolute right-4 top-4 inline-flex size-9 items-center justify-center rounded-full text-muted-foreground hover:bg-accent hover:text-foreground",
477
+ "aria-label": "Close",
478
+ children: /* @__PURE__ */ jsx(X, { className: "size-4" })
479
+ }
480
+ )
481
+ ]
482
+ }
483
+ )
484
+ ] });
485
+ });
486
+ var Popover = PopoverPrimitive.Root;
487
+ var PopoverTrigger = PopoverPrimitive.Trigger;
488
+ var PopoverAnchor = PopoverPrimitive.Anchor;
489
+ var PopoverContent = forwardRef(function PopoverContent2({ className, align = "center", sideOffset = 8, ...props }, ref) {
490
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
491
+ PopoverPrimitive.Content,
492
+ {
493
+ ref,
494
+ align,
495
+ sideOffset,
496
+ className: cn(
497
+ "oca-animate-fade z-50 w-72 rounded-2xl border border-border bg-popover p-4 text-popover-foreground shadow-lg outline-none",
498
+ className
499
+ ),
500
+ ...props
501
+ }
502
+ ) });
503
+ });
504
+ var TooltipProvider = TooltipPrimitive.Provider;
505
+ var Tooltip = TooltipPrimitive.Root;
506
+ var TooltipTrigger = TooltipPrimitive.Trigger;
507
+ var TooltipContent = forwardRef(function TooltipContent2({ className, sideOffset = 6, ...props }, ref) {
508
+ return /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx(
509
+ TooltipPrimitive.Content,
510
+ {
511
+ ref,
512
+ sideOffset,
513
+ className: cn(
514
+ "oca-animate-fade z-50 max-w-xs rounded-lg bg-oca-ink px-2.5 py-1.5 text-[0.8125rem] leading-snug text-oca-ink-foreground",
515
+ className
516
+ ),
517
+ ...props
518
+ }
519
+ ) });
520
+ });
521
+ var DropdownMenu = DropdownMenuPrimitive.Root;
522
+ var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
523
+ var DropdownMenuGroup = DropdownMenuPrimitive.Group;
524
+ var DropdownMenuContent = forwardRef(function DropdownMenuContent2({ className, sideOffset = 8, ...props }, ref) {
525
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
526
+ DropdownMenuPrimitive.Content,
527
+ {
528
+ ref,
529
+ sideOffset,
530
+ className: cn(
531
+ "oca-animate-fade z-50 min-w-56 overflow-hidden rounded-2xl border border-border bg-popover p-1.5 text-popover-foreground shadow-lg",
532
+ className
533
+ ),
534
+ ...props
535
+ }
536
+ ) });
537
+ });
538
+ var DropdownMenuItem = forwardRef(function DropdownMenuItem2({ className, destructive, ...props }, ref) {
539
+ return /* @__PURE__ */ jsx(
540
+ DropdownMenuPrimitive.Item,
541
+ {
542
+ ref,
543
+ className: cn(
544
+ "flex h-10 cursor-default select-none items-center gap-2.5 rounded-xl px-3 text-[0.9375rem] outline-none",
545
+ "data-[highlighted]:bg-accent data-[disabled]:opacity-50 [&_svg]:size-4 [&_svg]:text-muted-foreground",
546
+ destructive && "text-destructive [&_svg]:text-destructive",
547
+ className
548
+ ),
549
+ ...props
550
+ }
551
+ );
552
+ });
553
+ var DropdownMenuLabel = forwardRef(function DropdownMenuLabel2({ className, ...props }, ref) {
554
+ return /* @__PURE__ */ jsx(
555
+ DropdownMenuPrimitive.Label,
556
+ {
557
+ ref,
558
+ className: cn("px-3 pb-1.5 pt-2 text-[0.8125rem] text-muted-foreground", className),
559
+ ...props
560
+ }
561
+ );
562
+ });
563
+ var DropdownMenuSeparator = forwardRef(function DropdownMenuSeparator2({ className, ...props }, ref) {
564
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Separator, { ref, className: cn("my-1.5 h-px bg-border", className), ...props });
565
+ });
566
+ var LookContext = createContext("pill");
567
+ var Tabs = forwardRef(function Tabs2({ look = "pill", ...props }, ref) {
568
+ return /* @__PURE__ */ jsx(LookContext.Provider, { value: look, children: /* @__PURE__ */ jsx(TabsPrimitive.Root, { ref, ...props }) });
569
+ });
570
+ var TabsList = forwardRef(function TabsList2({ className, ...props }, ref) {
571
+ const look = useContext(LookContext);
572
+ return /* @__PURE__ */ jsx(
573
+ TabsPrimitive.List,
574
+ {
575
+ ref,
576
+ className: cn(
577
+ look === "pill" ? "inline-flex max-w-full items-center gap-1 overflow-x-auto rounded-full bg-muted p-1" : "flex max-w-full items-center gap-6 overflow-x-auto border-b border-border",
578
+ className
579
+ ),
580
+ ...props
581
+ }
582
+ );
583
+ });
584
+ var TabsTrigger = forwardRef(function TabsTrigger2({ className, ...props }, ref) {
585
+ const look = useContext(LookContext);
586
+ return /* @__PURE__ */ jsx(
587
+ TabsPrimitive.Trigger,
588
+ {
589
+ ref,
590
+ className: cn(
591
+ "inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap text-[0.9375rem] outline-none transition-colors",
592
+ "focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
593
+ look === "pill" ? "h-9 rounded-full px-4 text-muted-foreground hover:text-foreground data-[state=active]:bg-card data-[state=active]:text-foreground data-[state=active]:shadow-sm" : "-mb-px h-11 border-b-2 border-transparent text-muted-foreground hover:text-foreground data-[state=active]:border-foreground data-[state=active]:text-foreground",
594
+ className
595
+ ),
596
+ ...props
597
+ }
598
+ );
599
+ });
600
+ var TabsContent = forwardRef(function TabsContent2({ className, ...props }, ref) {
601
+ return /* @__PURE__ */ jsx(TabsPrimitive.Content, { ref, className: cn("mt-6 outline-none", className), ...props });
602
+ });
603
+
604
+ export { Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardNumeral, CardTitle, Checkbox, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, Field, Input, Kbd, Label, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, RadioGroup, RadioGroupItem, Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetTitle, SheetTrigger, Skeleton, Spinner, StatusDot, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cardVariants, cn };
605
+ //# sourceMappingURL=primitives.mjs.map
606
+ //# sourceMappingURL=primitives.mjs.map