@yenio-pld/blocks 0.0.0-stage → 0.0.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.
Files changed (103) hide show
  1. package/README.md +100 -2
  2. package/dist/avatar.cjs +88 -0
  3. package/dist/avatar.cjs.map +1 -0
  4. package/dist/avatar.d.cts +18 -0
  5. package/dist/avatar.d.ts +18 -0
  6. package/dist/avatar.js +84 -0
  7. package/dist/avatar.js.map +1 -0
  8. package/dist/consent.cjs +85 -0
  9. package/dist/consent.cjs.map +1 -0
  10. package/dist/consent.d.cts +20 -0
  11. package/dist/consent.d.ts +20 -0
  12. package/dist/consent.js +73 -0
  13. package/dist/consent.js.map +1 -0
  14. package/dist/index.cjs +4053 -0
  15. package/dist/index.cjs.map +1 -0
  16. package/dist/index.d.cts +859 -0
  17. package/dist/index.d.ts +859 -0
  18. package/dist/index.js +3947 -0
  19. package/dist/index.js.map +1 -0
  20. package/dist/theme-init.cjs +12 -0
  21. package/dist/theme-init.cjs.map +1 -0
  22. package/dist/theme-init.d.cts +11 -0
  23. package/dist/theme-init.d.ts +11 -0
  24. package/dist/theme-init.js +8 -0
  25. package/dist/theme-init.js.map +1 -0
  26. package/dist/ui/alert-dialog.d.ts +15 -0
  27. package/dist/ui/alert-dialog.js +137 -0
  28. package/dist/ui/alert-dialog.js.map +1 -0
  29. package/dist/ui/alert.d.ts +11 -0
  30. package/dist/ui/alert.js +57 -0
  31. package/dist/ui/alert.js.map +1 -0
  32. package/dist/ui/avatar.d.ts +13 -0
  33. package/dist/ui/avatar.js +105 -0
  34. package/dist/ui/avatar.js.map +1 -0
  35. package/dist/ui/badge.d.ts +13 -0
  36. package/dist/ui/badge.js +33 -0
  37. package/dist/ui/badge.js.map +1 -0
  38. package/dist/ui/breadcrumb.d.ts +12 -0
  39. package/dist/ui/breadcrumb.js +121 -0
  40. package/dist/ui/breadcrumb.js.map +1 -0
  41. package/dist/ui/bubble.d.ts +19 -0
  42. package/dist/ui/bubble.js +120 -0
  43. package/dist/ui/bubble.js.map +1 -0
  44. package/dist/ui/button.d.ts +12 -0
  45. package/dist/ui/button.js +59 -0
  46. package/dist/ui/button.js.map +1 -0
  47. package/dist/ui/card.d.ts +10 -0
  48. package/dist/ui/card.js +55 -0
  49. package/dist/ui/card.js.map +1 -0
  50. package/dist/ui/collapsible.d.ts +8 -0
  51. package/dist/ui/collapsible.js +17 -0
  52. package/dist/ui/collapsible.js.map +1 -0
  53. package/dist/ui/dialog.d.ts +16 -0
  54. package/dist/ui/dialog.js +125 -0
  55. package/dist/ui/dialog.js.map +1 -0
  56. package/dist/ui/dropdown-menu.d.ts +31 -0
  57. package/dist/ui/dropdown-menu.js +244 -0
  58. package/dist/ui/dropdown-menu.js.map +1 -0
  59. package/dist/ui/input-otp.d.ts +39 -0
  60. package/dist/ui/input-otp.js +53 -0
  61. package/dist/ui/input-otp.js.map +1 -0
  62. package/dist/ui/input.d.ts +5 -0
  63. package/dist/ui/input.js +28 -0
  64. package/dist/ui/input.js.map +1 -0
  65. package/dist/ui/label.d.ts +7 -0
  66. package/dist/ui/label.js +29 -0
  67. package/dist/ui/label.js.map +1 -0
  68. package/dist/ui/message.d.ts +12 -0
  69. package/dist/ui/message.js +93 -0
  70. package/dist/ui/message.js.map +1 -0
  71. package/dist/ui/progress.d.ts +9 -0
  72. package/dist/ui/progress.js +41 -0
  73. package/dist/ui/progress.js.map +1 -0
  74. package/dist/ui/separator.d.ts +6 -0
  75. package/dist/ui/separator.js +31 -0
  76. package/dist/ui/separator.js.map +1 -0
  77. package/dist/ui/sheet.d.ts +16 -0
  78. package/dist/ui/sheet.js +127 -0
  79. package/dist/ui/sheet.js.map +1 -0
  80. package/dist/ui/sidebar.d.ts +69 -0
  81. package/dist/ui/sidebar.js +624 -0
  82. package/dist/ui/sidebar.js.map +1 -0
  83. package/dist/ui/skeleton.d.ts +5 -0
  84. package/dist/ui/skeleton.js +26 -0
  85. package/dist/ui/skeleton.js.map +1 -0
  86. package/dist/ui/sonner.d.ts +6 -0
  87. package/dist/ui/sonner.js +25 -0
  88. package/dist/ui/sonner.js.map +1 -0
  89. package/dist/ui/switch.d.ts +8 -0
  90. package/dist/ui/switch.js +38 -0
  91. package/dist/ui/switch.js.map +1 -0
  92. package/dist/ui/table.d.ts +11 -0
  93. package/dist/ui/table.js +85 -0
  94. package/dist/ui/table.js.map +1 -0
  95. package/dist/ui/tooltip.d.ts +9 -0
  96. package/dist/ui/tooltip.js +67 -0
  97. package/dist/ui/tooltip.js.map +1 -0
  98. package/dist/ui/use-mobile.d.ts +3 -0
  99. package/dist/ui/use-mobile.js +24 -0
  100. package/dist/ui/use-mobile.js.map +1 -0
  101. package/package.json +281 -5
  102. package/scripts/check-theme.mjs +74 -0
  103. package/src/theme.css +191 -0
@@ -0,0 +1,19 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import { useRender } from '@base-ui/react/use-render';
4
+ import { VariantProps } from 'class-variance-authority';
5
+
6
+ declare function BubbleGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
7
+ declare const bubbleVariants: (props?: ({
8
+ variant?: "default" | "destructive" | "secondary" | "outline" | "muted" | "tinted" | "ghost" | null | undefined;
9
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
10
+ declare function Bubble({ variant, align, className, ...props }: React.ComponentProps<"div"> & VariantProps<typeof bubbleVariants> & {
11
+ align?: "start" | "end";
12
+ }): React.JSX.Element;
13
+ declare function BubbleContent({ className, render, ...props }: useRender.ComponentProps<"div">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
14
+ declare function BubbleReactions({ side, align, className, ...props }: React.ComponentProps<"div"> & {
15
+ align?: "start" | "end";
16
+ side?: "top" | "bottom";
17
+ }): React.JSX.Element;
18
+
19
+ export { Bubble, BubbleContent, BubbleGroup, BubbleReactions };
@@ -0,0 +1,120 @@
1
+ "use client";
2
+ import { mergeProps } from '@base-ui/react/merge-props';
3
+ import { useRender } from '@base-ui/react/use-render';
4
+ import { cva } from 'class-variance-authority';
5
+ import { clsx } from 'clsx';
6
+ import { twMerge } from 'tailwind-merge';
7
+ import { jsx } from 'react/jsx-runtime';
8
+
9
+ // src/ui/bubble.tsx
10
+ function cn(...inputs) {
11
+ return twMerge(clsx(inputs));
12
+ }
13
+ function BubbleGroup({ className, ...props }) {
14
+ return /* @__PURE__ */ jsx(
15
+ "div",
16
+ {
17
+ "data-slot": "bubble-group",
18
+ className: cn("flex min-w-0 flex-col gap-2", className),
19
+ ...props
20
+ }
21
+ );
22
+ }
23
+ var bubbleVariants = cva(
24
+ "group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full",
25
+ {
26
+ variants: {
27
+ variant: {
28
+ default: "*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80",
29
+ secondary: "*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]",
30
+ muted: "*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]",
31
+ tinted: "*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)]",
32
+ outline: "*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30",
33
+ ghost: "border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50",
34
+ destructive: "*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30"
35
+ }
36
+ },
37
+ defaultVariants: {
38
+ variant: "default"
39
+ }
40
+ }
41
+ );
42
+ function Bubble({
43
+ variant = "default",
44
+ align = "start",
45
+ className,
46
+ ...props
47
+ }) {
48
+ return /* @__PURE__ */ jsx(
49
+ "div",
50
+ {
51
+ "data-slot": "bubble",
52
+ "data-variant": variant,
53
+ "data-align": align,
54
+ className: cn(bubbleVariants({ variant }), className),
55
+ ...props
56
+ }
57
+ );
58
+ }
59
+ function BubbleContent({
60
+ className,
61
+ render,
62
+ ...props
63
+ }) {
64
+ return useRender({
65
+ defaultTagName: "div",
66
+ props: mergeProps(
67
+ {
68
+ className: cn(
69
+ "w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/50",
70
+ className
71
+ )
72
+ },
73
+ props
74
+ ),
75
+ render,
76
+ state: {
77
+ slot: "bubble-content"
78
+ }
79
+ });
80
+ }
81
+ var bubbleReactionsVariants = cva(
82
+ "absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0",
83
+ {
84
+ variants: {
85
+ side: {
86
+ top: "top-0 -translate-y-3/4",
87
+ bottom: "bottom-0 translate-y-3/4"
88
+ },
89
+ align: {
90
+ start: "left-3",
91
+ end: "right-3"
92
+ }
93
+ },
94
+ defaultVariants: {
95
+ side: "bottom",
96
+ align: "end"
97
+ }
98
+ }
99
+ );
100
+ function BubbleReactions({
101
+ side = "bottom",
102
+ align = "end",
103
+ className,
104
+ ...props
105
+ }) {
106
+ return /* @__PURE__ */ jsx(
107
+ "div",
108
+ {
109
+ "data-slot": "bubble-reactions",
110
+ "data-align": align,
111
+ "data-side": side,
112
+ className: cn(bubbleReactionsVariants({ side, align }), className),
113
+ ...props
114
+ }
115
+ );
116
+ }
117
+
118
+ export { Bubble, BubbleContent, BubbleGroup, BubbleReactions };
119
+ //# sourceMappingURL=bubble.js.map
120
+ //# sourceMappingURL=bubble.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/utils.ts","../../src/ui/bubble.tsx"],"names":[],"mappings":";;;;;;;;AAGO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;ACEA,SAAS,WAAA,CAAY,EAAE,SAAA,EAAW,GAAG,OAAM,EAAgC;AAC1E,EAAA,uBACC,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACA,WAAA,EAAU,cAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,6BAAA,EAA+B,SAAS,CAAA;AAAA,MACrD,GAAG;AAAA;AAAA,GACL;AAEF;AAEA,IAAM,cAAA,GAAiB,GAAA;AAAA,EACtB,uKAAA;AAAA,EACA;AAAA,IACC,QAAA,EAAU;AAAA,MACT,OAAA,EAAS;AAAA,QACR,OAAA,EACC,8JAAA;AAAA,QACD,SAAA,EACC,mNAAA;AAAA,QACD,KAAA,EACC,oJAAA;AAAA,QACD,MAAA,EACC,iaAAA;AAAA,QACD,OAAA,EACC,uRAAA;AAAA,QACD,KAAA,EACC,oUAAA;AAAA,QACD,WAAA,EACC;AAAA;AACF,KACD;AAAA,IACA,eAAA,EAAiB;AAAA,MAChB,OAAA,EAAS;AAAA;AACV;AAEF,CAAA;AAEA,SAAS,MAAA,CAAO;AAAA,EACf,OAAA,GAAU,SAAA;AAAA,EACV,KAAA,GAAQ,OAAA;AAAA,EACR,SAAA;AAAA,EACA,GAAG;AACJ,CAAA,EAGI;AACH,EAAA,uBACC,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACA,WAAA,EAAU,QAAA;AAAA,MACV,cAAA,EAAc,OAAA;AAAA,MACd,YAAA,EAAY,KAAA;AAAA,MACZ,WAAW,EAAA,CAAG,cAAA,CAAe,EAAE,OAAA,EAAS,GAAG,SAAS,CAAA;AAAA,MACnD,GAAG;AAAA;AAAA,GACL;AAEF;AAEA,SAAS,aAAA,CAAc;AAAA,EACtB,SAAA;AAAA,EACA,MAAA;AAAA,EACA,GAAG;AACJ,CAAA,EAAoC;AACnC,EAAA,OAAO,SAAA,CAAU;AAAA,IAChB,cAAA,EAAgB,KAAA;AAAA,IAChB,KAAA,EAAO,UAAA;AAAA,MACN;AAAA,QACC,SAAA,EAAW,EAAA;AAAA,UACV,2VAAA;AAAA,UACA;AAAA;AACD,OACD;AAAA,MACA;AAAA,KACD;AAAA,IACA,MAAA;AAAA,IACA,KAAA,EAAO;AAAA,MACN,IAAA,EAAM;AAAA;AACP,GACA,CAAA;AACF;AAEA,IAAM,uBAAA,GAA0B,GAAA;AAAA,EAC/B,mJAAA;AAAA,EACA;AAAA,IACC,QAAA,EAAU;AAAA,MACT,IAAA,EAAM;AAAA,QACL,GAAA,EAAK,wBAAA;AAAA,QACL,MAAA,EAAQ;AAAA,OACT;AAAA,MACA,KAAA,EAAO;AAAA,QACN,KAAA,EAAO,QAAA;AAAA,QACP,GAAA,EAAK;AAAA;AACN,KACD;AAAA,IACA,eAAA,EAAiB;AAAA,MAChB,IAAA,EAAM,QAAA;AAAA,MACN,KAAA,EAAO;AAAA;AACR;AAEF,CAAA;AAEA,SAAS,eAAA,CAAgB;AAAA,EACxB,IAAA,GAAO,QAAA;AAAA,EACP,KAAA,GAAQ,KAAA;AAAA,EACR,SAAA;AAAA,EACA,GAAG;AACJ,CAAA,EAGG;AACF,EAAA,uBACC,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACA,WAAA,EAAU,kBAAA;AAAA,MACV,YAAA,EAAY,KAAA;AAAA,MACZ,WAAA,EAAW,IAAA;AAAA,MACX,SAAA,EAAW,GAAG,uBAAA,CAAwB,EAAE,MAAM,KAAA,EAAO,GAAG,SAAS,CAAA;AAAA,MAChE,GAAG;AAAA;AAAA,GACL;AAEF","file":"bubble.js","sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","import * as React from \"react\";\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../lib/utils\";\n\nfunction BubbleGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"bubble-group\"\n\t\t\tclassName={cn(\"flex min-w-0 flex-col gap-2\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nconst bubbleVariants = cva(\n\t\"group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault:\n\t\t\t\t\t\"*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80\",\n\t\t\t\tsecondary:\n\t\t\t\t\t\"*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]\",\n\t\t\t\tmuted:\n\t\t\t\t\t\"*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]\",\n\t\t\t\ttinted:\n\t\t\t\t\t\"*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)]\",\n\t\t\t\toutline:\n\t\t\t\t\t\"*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30\",\n\t\t\t\tghost:\n\t\t\t\t\t\"border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50\",\n\t\t\t\tdestructive:\n\t\t\t\t\t\"*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"default\",\n\t\t},\n\t},\n);\n\nfunction Bubble({\n\tvariant = \"default\",\n\talign = \"start\",\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\"> &\n\tVariantProps<typeof bubbleVariants> & {\n\t\talign?: \"start\" | \"end\";\n\t}) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"bubble\"\n\t\t\tdata-variant={variant}\n\t\t\tdata-align={align}\n\t\t\tclassName={cn(bubbleVariants({ variant }), className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction BubbleContent({\n\tclassName,\n\trender,\n\t...props\n}: useRender.ComponentProps<\"div\">) {\n\treturn useRender({\n\t\tdefaultTagName: \"div\",\n\t\tprops: mergeProps<\"div\">(\n\t\t\t{\n\t\t\t\tclassName: cn(\n\t\t\t\t\t\"w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/50\",\n\t\t\t\t\tclassName,\n\t\t\t\t),\n\t\t\t},\n\t\t\tprops,\n\t\t),\n\t\trender,\n\t\tstate: {\n\t\t\tslot: \"bubble-content\",\n\t\t},\n\t});\n}\n\nconst bubbleReactionsVariants = cva(\n\t\"absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0\",\n\t{\n\t\tvariants: {\n\t\t\tside: {\n\t\t\t\ttop: \"top-0 -translate-y-3/4\",\n\t\t\t\tbottom: \"bottom-0 translate-y-3/4\",\n\t\t\t},\n\t\t\talign: {\n\t\t\t\tstart: \"left-3\",\n\t\t\t\tend: \"right-3\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tside: \"bottom\",\n\t\t\talign: \"end\",\n\t\t},\n\t},\n);\n\nfunction BubbleReactions({\n\tside = \"bottom\",\n\talign = \"end\",\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\"> & {\n\talign?: \"start\" | \"end\";\n\tside?: \"top\" | \"bottom\";\n}) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"bubble-reactions\"\n\t\t\tdata-align={align}\n\t\t\tdata-side={side}\n\t\t\tclassName={cn(bubbleReactionsVariants({ side, align }), className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { BubbleGroup, Bubble, BubbleContent, BubbleReactions };\n"]}
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import * as class_variance_authority_types from 'class-variance-authority/types';
3
+ import { Button as Button$1 } from '@base-ui/react/button';
4
+ import { VariantProps } from 'class-variance-authority';
5
+
6
+ declare const buttonVariants: (props?: ({
7
+ variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
8
+ size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
9
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
10
+ declare function Button({ className, variant, size, ...props }: Button$1.Props & VariantProps<typeof buttonVariants>): React.JSX.Element;
11
+
12
+ export { Button, buttonVariants };
@@ -0,0 +1,59 @@
1
+ "use client";
2
+ import { Button as Button$1 } from '@base-ui/react/button';
3
+ import { cva } from 'class-variance-authority';
4
+ import { clsx } from 'clsx';
5
+ import { twMerge } from 'tailwind-merge';
6
+ import { jsx } from 'react/jsx-runtime';
7
+
8
+ // src/ui/button.tsx
9
+ function cn(...inputs) {
10
+ return twMerge(clsx(inputs));
11
+ }
12
+ var buttonVariants = cva(
13
+ "group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
14
+ {
15
+ variants: {
16
+ variant: {
17
+ default: "bg-primary text-primary-foreground hover:bg-primary/80",
18
+ outline: "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
19
+ secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
20
+ ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
21
+ destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
22
+ link: "text-primary underline-offset-4 hover:underline"
23
+ },
24
+ size: {
25
+ default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
26
+ xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
27
+ sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
28
+ lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
29
+ icon: "size-8",
30
+ "icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
31
+ "icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
32
+ "icon-lg": "size-9"
33
+ }
34
+ },
35
+ defaultVariants: {
36
+ variant: "default",
37
+ size: "default"
38
+ }
39
+ }
40
+ );
41
+ function Button({
42
+ className,
43
+ variant = "default",
44
+ size = "default",
45
+ ...props
46
+ }) {
47
+ return /* @__PURE__ */ jsx(
48
+ Button$1,
49
+ {
50
+ "data-slot": "button",
51
+ className: cn(buttonVariants({ variant, size, className })),
52
+ ...props
53
+ }
54
+ );
55
+ }
56
+
57
+ export { Button, buttonVariants };
58
+ //# sourceMappingURL=button.js.map
59
+ //# sourceMappingURL=button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/utils.ts","../../src/ui/button.tsx"],"names":["ButtonPrimitive"],"mappings":";;;;;;;AAGO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;ACAA,IAAM,cAAA,GAAiB,GAAA;AAAA,EACtB,4lBAAA;AAAA,EACA;AAAA,IACC,QAAA,EAAU;AAAA,MACT,OAAA,EAAS;AAAA,QACR,OAAA,EAAS,wDAAA;AAAA,QACT,OAAA,EACC,iLAAA;AAAA,QACD,SAAA,EACC,gLAAA;AAAA,QACD,KAAA,EACC,kHAAA;AAAA,QACD,WAAA,EACC,6NAAA;AAAA,QACD,IAAA,EAAM;AAAA,OACP;AAAA,MACA,IAAA,EAAM;AAAA,QACL,OAAA,EACC,sFAAA;AAAA,QACD,EAAA,EAAI,+MAAA;AAAA,QACJ,EAAA,EAAI,yNAAA;AAAA,QACJ,EAAA,EAAI,sFAAA;AAAA,QACJ,IAAA,EAAM,QAAA;AAAA,QACN,SAAA,EACC,yHAAA;AAAA,QACD,SAAA,EACC,oFAAA;AAAA,QACD,SAAA,EAAW;AAAA;AACZ,KACD;AAAA,IACA,eAAA,EAAiB;AAAA,MAChB,OAAA,EAAS,SAAA;AAAA,MACT,IAAA,EAAM;AAAA;AACP;AAEF;AAEA,SAAS,MAAA,CAAO;AAAA,EACf,SAAA;AAAA,EACA,OAAA,GAAU,SAAA;AAAA,EACV,IAAA,GAAO,SAAA;AAAA,EACP,GAAG;AACJ,CAAA,EAAgE;AAC/D,EAAA,uBACC,GAAA;AAAA,IAACA,QAAA;AAAA,IAAA;AAAA,MACA,WAAA,EAAU,QAAA;AAAA,MACV,SAAA,EAAW,GAAG,cAAA,CAAe,EAAE,SAAS,IAAA,EAAM,SAAA,EAAW,CAAC,CAAA;AAAA,MACzD,GAAG;AAAA;AAAA,GACL;AAEF","file":"button.js","sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","import { Button as ButtonPrimitive } from \"@base-ui/react/button\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../lib/utils\";\n\nconst buttonVariants = cva(\n\t\"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault: \"bg-primary text-primary-foreground hover:bg-primary/80\",\n\t\t\t\toutline:\n\t\t\t\t\t\"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50\",\n\t\t\t\tsecondary:\n\t\t\t\t\t\"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground\",\n\t\t\t\tghost:\n\t\t\t\t\t\"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50\",\n\t\t\t\tdestructive:\n\t\t\t\t\t\"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40\",\n\t\t\t\tlink: \"text-primary underline-offset-4 hover:underline\",\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tdefault:\n\t\t\t\t\t\"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2\",\n\t\t\t\txs: \"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3\",\n\t\t\t\tsm: \"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5\",\n\t\t\t\tlg: \"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2\",\n\t\t\t\ticon: \"size-8\",\n\t\t\t\t\"icon-xs\":\n\t\t\t\t\t\"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3\",\n\t\t\t\t\"icon-sm\":\n\t\t\t\t\t\"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg\",\n\t\t\t\t\"icon-lg\": \"size-9\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"default\",\n\t\t\tsize: \"default\",\n\t\t},\n\t},\n);\n\nfunction Button({\n\tclassName,\n\tvariant = \"default\",\n\tsize = \"default\",\n\t...props\n}: ButtonPrimitive.Props & VariantProps<typeof buttonVariants>) {\n\treturn (\n\t\t<ButtonPrimitive\n\t\t\tdata-slot=\"button\"\n\t\t\tclassName={cn(buttonVariants({ variant, size, className }))}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Button, buttonVariants };\n"]}
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ import { HTMLAttributes } from 'react';
3
+
4
+ declare function Card({ className, ...props }: HTMLAttributes<HTMLDivElement>): React.JSX.Element;
5
+ declare function CardHeader({ className, ...props }: HTMLAttributes<HTMLDivElement>): React.JSX.Element;
6
+ declare function CardTitle({ className, ...props }: HTMLAttributes<HTMLHeadingElement>): React.JSX.Element;
7
+ declare function CardDescription({ className, ...props }: HTMLAttributes<HTMLParagraphElement>): React.JSX.Element;
8
+ declare function CardContent({ className, ...props }: HTMLAttributes<HTMLDivElement>): React.JSX.Element;
9
+
10
+ export { Card, CardContent, CardDescription, CardHeader, CardTitle };
@@ -0,0 +1,55 @@
1
+ "use client";
2
+ import { clsx } from 'clsx';
3
+ import { twMerge } from 'tailwind-merge';
4
+ import { jsx } from 'react/jsx-runtime';
5
+
6
+ // src/lib/utils.ts
7
+ function cn(...inputs) {
8
+ return twMerge(clsx(inputs));
9
+ }
10
+ function Card({ className, ...props }) {
11
+ return /* @__PURE__ */ jsx(
12
+ "div",
13
+ {
14
+ className: cn(
15
+ "bg-card text-card-foreground rounded-xl border shadow-sm",
16
+ className
17
+ ),
18
+ ...props
19
+ }
20
+ );
21
+ }
22
+ function CardHeader({ className, ...props }) {
23
+ return /* @__PURE__ */ jsx(
24
+ "div",
25
+ {
26
+ className: cn("flex flex-col space-y-1.5 p-6", className),
27
+ ...props
28
+ }
29
+ );
30
+ }
31
+ function CardTitle({
32
+ className,
33
+ ...props
34
+ }) {
35
+ return /* @__PURE__ */ jsx(
36
+ "h3",
37
+ {
38
+ className: cn("leading-none font-semibold tracking-tight", className),
39
+ ...props
40
+ }
41
+ );
42
+ }
43
+ function CardDescription({
44
+ className,
45
+ ...props
46
+ }) {
47
+ return /* @__PURE__ */ jsx("p", { className: cn("text-muted-foreground text-sm", className), ...props });
48
+ }
49
+ function CardContent({ className, ...props }) {
50
+ return /* @__PURE__ */ jsx("div", { className: cn("p-6 pt-0", className), ...props });
51
+ }
52
+
53
+ export { Card, CardContent, CardDescription, CardHeader, CardTitle };
54
+ //# sourceMappingURL=card.js.map
55
+ //# sourceMappingURL=card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/utils.ts","../../src/ui/card.tsx"],"names":[],"mappings":";;;;;AAGO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;ACFA,SAAS,IAAA,CAAK,EAAE,SAAA,EAAW,GAAG,OAAM,EAAmC;AACtE,EAAA,uBACC,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACA,SAAA,EAAW,EAAA;AAAA,QACV,0DAAA;AAAA,QACA;AAAA,OACD;AAAA,MACC,GAAG;AAAA;AAAA,GACL;AAEF;AAEA,SAAS,UAAA,CAAW,EAAE,SAAA,EAAW,GAAG,OAAM,EAAmC;AAC5E,EAAA,uBACC,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACA,SAAA,EAAW,EAAA,CAAG,+BAAA,EAAiC,SAAS,CAAA;AAAA,MACvD,GAAG;AAAA;AAAA,GACL;AAEF;AAEA,SAAS,SAAA,CAAU;AAAA,EAClB,SAAA;AAAA,EACA,GAAG;AACJ,CAAA,EAAuC;AACtC,EAAA,uBACC,GAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACA,SAAA,EAAW,EAAA,CAAG,2CAAA,EAA6C,SAAS,CAAA;AAAA,MACnE,GAAG;AAAA;AAAA,GACL;AAEF;AAEA,SAAS,eAAA,CAAgB;AAAA,EACxB,SAAA;AAAA,EACA,GAAG;AACJ,CAAA,EAAyC;AACxC,EAAA,uBACC,GAAA,CAAC,OAAE,SAAA,EAAW,EAAA,CAAG,iCAAiC,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AAE3E;AAEA,SAAS,WAAA,CAAY,EAAE,SAAA,EAAW,GAAG,OAAM,EAAmC;AAC7E,EAAA,uBAAO,GAAA,CAAC,SAAI,SAAA,EAAW,EAAA,CAAG,YAAY,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AAC9D","file":"card.js","sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","import type { HTMLAttributes } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nfunction Card({ className, ...props }: HTMLAttributes<HTMLDivElement>) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t\"bg-card text-card-foreground rounded-xl border shadow-sm\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction CardHeader({ className, ...props }: HTMLAttributes<HTMLDivElement>) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\"flex flex-col space-y-1.5 p-6\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction CardTitle({\n\tclassName,\n\t...props\n}: HTMLAttributes<HTMLHeadingElement>) {\n\treturn (\n\t\t<h3\n\t\t\tclassName={cn(\"leading-none font-semibold tracking-tight\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction CardDescription({\n\tclassName,\n\t...props\n}: HTMLAttributes<HTMLParagraphElement>) {\n\treturn (\n\t\t<p className={cn(\"text-muted-foreground text-sm\", className)} {...props} />\n\t);\n}\n\nfunction CardContent({ className, ...props }: HTMLAttributes<HTMLDivElement>) {\n\treturn <div className={cn(\"p-6 pt-0\", className)} {...props} />;\n}\n\nexport { Card, CardHeader, CardTitle, CardDescription, CardContent };\n"]}
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import { Collapsible as Collapsible$1 } from '@base-ui/react/collapsible';
3
+
4
+ declare function Collapsible({ ...props }: Collapsible$1.Root.Props): React.JSX.Element;
5
+ declare function CollapsibleTrigger({ ...props }: Collapsible$1.Trigger.Props): React.JSX.Element;
6
+ declare function CollapsibleContent({ ...props }: Collapsible$1.Panel.Props): React.JSX.Element;
7
+
8
+ export { Collapsible, CollapsibleContent, CollapsibleTrigger };
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ import { Collapsible as Collapsible$1 } from '@base-ui/react/collapsible';
3
+ import { jsx } from 'react/jsx-runtime';
4
+
5
+ function Collapsible({ ...props }) {
6
+ return /* @__PURE__ */ jsx(Collapsible$1.Root, { "data-slot": "collapsible", ...props });
7
+ }
8
+ function CollapsibleTrigger({ ...props }) {
9
+ return /* @__PURE__ */ jsx(Collapsible$1.Trigger, { "data-slot": "collapsible-trigger", ...props });
10
+ }
11
+ function CollapsibleContent({ ...props }) {
12
+ return /* @__PURE__ */ jsx(Collapsible$1.Panel, { "data-slot": "collapsible-content", ...props });
13
+ }
14
+
15
+ export { Collapsible, CollapsibleContent, CollapsibleTrigger };
16
+ //# sourceMappingURL=collapsible.js.map
17
+ //# sourceMappingURL=collapsible.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/ui/collapsible.tsx"],"names":["CollapsiblePrimitive"],"mappings":";;;AAIA,SAAS,WAAA,CAAY,EAAE,GAAG,KAAA,EAAM,EAAoC;AACnE,EAAA,2BAAQA,aAAA,CAAqB,IAAA,EAArB,EAA0B,WAAA,EAAU,aAAA,EAAe,GAAG,KAAA,EAAO,CAAA;AACtE;AAEA,SAAS,kBAAA,CAAmB,EAAE,GAAG,KAAA,EAAM,EAAuC;AAC7E,EAAA,2BACEA,aAAA,CAAqB,OAAA,EAArB,EAA6B,WAAA,EAAU,qBAAA,EAAuB,GAAG,KAAA,EAAO,CAAA;AAE3E;AAEA,SAAS,kBAAA,CAAmB,EAAE,GAAG,KAAA,EAAM,EAAqC;AAC3E,EAAA,2BACEA,aAAA,CAAqB,KAAA,EAArB,EAA2B,WAAA,EAAU,qBAAA,EAAuB,GAAG,KAAA,EAAO,CAAA;AAEzE","file":"collapsible.js","sourcesContent":["\"use client\";\n\nimport { Collapsible as CollapsiblePrimitive } from \"@base-ui/react/collapsible\";\n\nfunction Collapsible({ ...props }: CollapsiblePrimitive.Root.Props) {\n\treturn <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />;\n}\n\nfunction CollapsibleTrigger({ ...props }: CollapsiblePrimitive.Trigger.Props) {\n\treturn (\n\t\t<CollapsiblePrimitive.Trigger data-slot=\"collapsible-trigger\" {...props} />\n\t);\n}\n\nfunction CollapsibleContent({ ...props }: CollapsiblePrimitive.Panel.Props) {\n\treturn (\n\t\t<CollapsiblePrimitive.Panel data-slot=\"collapsible-content\" {...props} />\n\t);\n}\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent };\n"]}
@@ -0,0 +1,16 @@
1
+ import * as React from 'react';
2
+ import { ComponentProps } from 'react';
3
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
4
+
5
+ declare function Dialog({ ...props }: ComponentProps<typeof DialogPrimitive.Root>): React.JSX.Element;
6
+ declare function DialogTrigger({ ...props }: ComponentProps<typeof DialogPrimitive.Trigger>): React.JSX.Element;
7
+ declare function DialogClose({ ...props }: ComponentProps<typeof DialogPrimitive.Close>): React.JSX.Element;
8
+ declare function DialogContent({ className, children, showCloseButton, ...props }: ComponentProps<typeof DialogPrimitive.Content> & {
9
+ showCloseButton?: boolean;
10
+ }): React.JSX.Element;
11
+ declare function DialogHeader({ className, ...props }: ComponentProps<"div">): React.JSX.Element;
12
+ declare function DialogFooter({ className, ...props }: ComponentProps<"div">): React.JSX.Element;
13
+ declare function DialogTitle({ className, ...props }: ComponentProps<typeof DialogPrimitive.Title>): React.JSX.Element;
14
+ declare function DialogDescription({ className, ...props }: ComponentProps<typeof DialogPrimitive.Description>): React.JSX.Element;
15
+
16
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger };
@@ -0,0 +1,125 @@
1
+ "use client";
2
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
3
+ import { XIcon } from 'lucide-react';
4
+ import { clsx } from 'clsx';
5
+ import { twMerge } from 'tailwind-merge';
6
+ import { jsx, jsxs } from 'react/jsx-runtime';
7
+
8
+ function cn(...inputs) {
9
+ return twMerge(clsx(inputs));
10
+ }
11
+ function Dialog({ ...props }) {
12
+ return /* @__PURE__ */ jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
13
+ }
14
+ function DialogTrigger({
15
+ ...props
16
+ }) {
17
+ return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
18
+ }
19
+ function DialogPortal({
20
+ ...props
21
+ }) {
22
+ return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
23
+ }
24
+ function DialogClose({
25
+ ...props
26
+ }) {
27
+ return /* @__PURE__ */ jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
28
+ }
29
+ function DialogOverlay({
30
+ className,
31
+ ...props
32
+ }) {
33
+ return /* @__PURE__ */ jsx(
34
+ DialogPrimitive.Overlay,
35
+ {
36
+ "data-slot": "dialog-overlay",
37
+ className: cn(
38
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
39
+ className
40
+ ),
41
+ ...props
42
+ }
43
+ );
44
+ }
45
+ function DialogContent({
46
+ className,
47
+ children,
48
+ showCloseButton = true,
49
+ ...props
50
+ }) {
51
+ return /* @__PURE__ */ jsxs(DialogPortal, { children: [
52
+ /* @__PURE__ */ jsx(DialogOverlay, {}),
53
+ /* @__PURE__ */ jsxs(
54
+ DialogPrimitive.Content,
55
+ {
56
+ "data-slot": "dialog-content",
57
+ className: cn(
58
+ "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
59
+ className
60
+ ),
61
+ ...props,
62
+ children: [
63
+ children,
64
+ showCloseButton ? /* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "ring-offset-background focus:ring-ring absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
65
+ /* @__PURE__ */ jsx(XIcon, { className: "size-4" }),
66
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
67
+ ] }) : null
68
+ ]
69
+ }
70
+ )
71
+ ] });
72
+ }
73
+ function DialogHeader({ className, ...props }) {
74
+ return /* @__PURE__ */ jsx(
75
+ "div",
76
+ {
77
+ "data-slot": "dialog-header",
78
+ className: cn("flex flex-col gap-2 text-center sm:text-left", className),
79
+ ...props
80
+ }
81
+ );
82
+ }
83
+ function DialogFooter({ className, ...props }) {
84
+ return /* @__PURE__ */ jsx(
85
+ "div",
86
+ {
87
+ "data-slot": "dialog-footer",
88
+ className: cn(
89
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
90
+ className
91
+ ),
92
+ ...props
93
+ }
94
+ );
95
+ }
96
+ function DialogTitle({
97
+ className,
98
+ ...props
99
+ }) {
100
+ return /* @__PURE__ */ jsx(
101
+ DialogPrimitive.Title,
102
+ {
103
+ "data-slot": "dialog-title",
104
+ className: cn("text-lg leading-none font-semibold", className),
105
+ ...props
106
+ }
107
+ );
108
+ }
109
+ function DialogDescription({
110
+ className,
111
+ ...props
112
+ }) {
113
+ return /* @__PURE__ */ jsx(
114
+ DialogPrimitive.Description,
115
+ {
116
+ "data-slot": "dialog-description",
117
+ className: cn("text-muted-foreground text-sm", className),
118
+ ...props
119
+ }
120
+ );
121
+ }
122
+
123
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger };
124
+ //# sourceMappingURL=dialog.js.map
125
+ //# sourceMappingURL=dialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/utils.ts","../../src/ui/dialog.tsx"],"names":[],"mappings":"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","file":"dialog.js","sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","\"use client\";\n\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { XIcon } from \"lucide-react\";\nimport type { ComponentProps } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nfunction Dialog({ ...props }: ComponentProps<typeof DialogPrimitive.Root>) {\n\treturn <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\nfunction DialogTrigger({\n\t...props\n}: ComponentProps<typeof DialogPrimitive.Trigger>) {\n\treturn <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\nfunction DialogPortal({\n\t...props\n}: ComponentProps<typeof DialogPrimitive.Portal>) {\n\treturn <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\nfunction DialogClose({\n\t...props\n}: ComponentProps<typeof DialogPrimitive.Close>) {\n\treturn <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\nfunction DialogOverlay({\n\tclassName,\n\t...props\n}: ComponentProps<typeof DialogPrimitive.Overlay>) {\n\treturn (\n\t\t<DialogPrimitive.Overlay\n\t\t\tdata-slot=\"dialog-overlay\"\n\t\t\tclassName={cn(\n\t\t\t\t\"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction DialogContent({\n\tclassName,\n\tchildren,\n\tshowCloseButton = true,\n\t...props\n}: ComponentProps<typeof DialogPrimitive.Content> & {\n\tshowCloseButton?: boolean;\n}) {\n\treturn (\n\t\t<DialogPortal>\n\t\t\t<DialogOverlay />\n\t\t\t<DialogPrimitive.Content\n\t\t\t\tdata-slot=\"dialog-content\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t\t{showCloseButton ? (\n\t\t\t\t\t<DialogPrimitive.Close className=\"ring-offset-background focus:ring-ring absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none\">\n\t\t\t\t\t\t<XIcon className=\"size-4\" />\n\t\t\t\t\t\t<span className=\"sr-only\">Close</span>\n\t\t\t\t\t</DialogPrimitive.Close>\n\t\t\t\t) : null}\n\t\t\t</DialogPrimitive.Content>\n\t\t</DialogPortal>\n\t);\n}\n\nfunction DialogHeader({ className, ...props }: ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"dialog-header\"\n\t\t\tclassName={cn(\"flex flex-col gap-2 text-center sm:text-left\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction DialogFooter({ className, ...props }: ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"dialog-footer\"\n\t\t\tclassName={cn(\n\t\t\t\t\"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction DialogTitle({\n\tclassName,\n\t...props\n}: ComponentProps<typeof DialogPrimitive.Title>) {\n\treturn (\n\t\t<DialogPrimitive.Title\n\t\t\tdata-slot=\"dialog-title\"\n\t\t\tclassName={cn(\"text-lg leading-none font-semibold\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction DialogDescription({\n\tclassName,\n\t...props\n}: ComponentProps<typeof DialogPrimitive.Description>) {\n\treturn (\n\t\t<DialogPrimitive.Description\n\t\t\tdata-slot=\"dialog-description\"\n\t\t\tclassName={cn(\"text-muted-foreground text-sm\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tDialog,\n\tDialogClose,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n};\n"]}
@@ -0,0 +1,31 @@
1
+ import * as React from 'react';
2
+ import { Menu } from '@base-ui/react/menu';
3
+
4
+ declare function DropdownMenu({ ...props }: Menu.Root.Props): React.JSX.Element;
5
+ declare function DropdownMenuPortal({ ...props }: Menu.Portal.Props): React.JSX.Element;
6
+ declare function DropdownMenuTrigger({ ...props }: Menu.Trigger.Props): React.JSX.Element;
7
+ declare function DropdownMenuContent({ align, alignOffset, side, sideOffset, className, ...props }: Menu.Popup.Props & Pick<Menu.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): React.JSX.Element;
8
+ declare function DropdownMenuGroup({ ...props }: Menu.Group.Props): React.JSX.Element;
9
+ declare function DropdownMenuLabel({ className, inset, ...props }: Menu.GroupLabel.Props & {
10
+ inset?: boolean;
11
+ }): React.JSX.Element;
12
+ declare function DropdownMenuItem({ className, inset, variant, ...props }: Menu.Item.Props & {
13
+ inset?: boolean;
14
+ variant?: "default" | "destructive";
15
+ }): React.JSX.Element;
16
+ declare function DropdownMenuSub({ ...props }: Menu.SubmenuRoot.Props): React.JSX.Element;
17
+ declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: Menu.SubmenuTrigger.Props & {
18
+ inset?: boolean;
19
+ }): React.JSX.Element;
20
+ declare function DropdownMenuSubContent({ align, alignOffset, side, sideOffset, className, ...props }: React.ComponentProps<typeof DropdownMenuContent>): React.JSX.Element;
21
+ declare function DropdownMenuCheckboxItem({ className, children, checked, inset, ...props }: Menu.CheckboxItem.Props & {
22
+ inset?: boolean;
23
+ }): React.JSX.Element;
24
+ declare function DropdownMenuRadioGroup({ ...props }: Menu.RadioGroup.Props): React.JSX.Element;
25
+ declare function DropdownMenuRadioItem({ className, children, inset, ...props }: Menu.RadioItem.Props & {
26
+ inset?: boolean;
27
+ }): React.JSX.Element;
28
+ declare function DropdownMenuSeparator({ className, ...props }: Menu.Separator.Props): React.JSX.Element;
29
+ declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
30
+
31
+ export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };