@foundrykit/primitives 2.1.3 → 2.2.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 (190) hide show
  1. package/dist/components/accordion/index.js +60 -6
  2. package/dist/components/alert/index.js +62 -6
  3. package/dist/components/alert-dialog/index.js +142 -13
  4. package/dist/components/aspect-ratio/index.js +9 -3
  5. package/dist/components/avatar/index.js +50 -5
  6. package/dist/components/badge/index.js +37 -4
  7. package/dist/components/breadcrumb/index.js +95 -9
  8. package/dist/components/button-group/index.js +74 -6
  9. package/dist/components/card/index.js +66 -8
  10. package/dist/components/checkbox/index.js +30 -3
  11. package/dist/components/collapsible/index.js +33 -7
  12. package/dist/components/context-menu/index.js +208 -17
  13. package/dist/components/dialog/index.js +126 -12
  14. package/dist/components/direction/index.js +10 -2
  15. package/dist/components/drawer/index.js +118 -12
  16. package/dist/components/dropdown/index.js +216 -17
  17. package/dist/components/empty/index.js +95 -9
  18. package/dist/components/field/index.js +211 -13
  19. package/dist/components/hover-card/index.js +35 -5
  20. package/dist/components/item/index.js +178 -14
  21. package/dist/components/kbd/index.js +27 -4
  22. package/dist/components/label/index.js +21 -3
  23. package/dist/components/menubar/index.js +235 -18
  24. package/dist/components/native-select/index.js +25 -3
  25. package/dist/components/navigation-menu/index.js +161 -11
  26. package/dist/components/popover/index.js +40 -6
  27. package/dist/components/progress/index.js +30 -3
  28. package/dist/components/radio-group/index.js +43 -4
  29. package/dist/components/resizable/index.js +43 -5
  30. package/dist/components/scroll-area/index.js +58 -4
  31. package/dist/components/section/index.js +13 -3
  32. package/dist/components/select/index.js +159 -12
  33. package/dist/components/sheet/index.js +118 -10
  34. package/dist/components/skeleton/index.js +13 -3
  35. package/dist/components/slider/index.js +64 -3
  36. package/dist/components/sonner/index.js +21 -4
  37. package/dist/components/spinner/index.js +19 -3
  38. package/dist/components/switch/index.js +30 -3
  39. package/dist/components/table/index.js +105 -10
  40. package/dist/components/tabs/index.js +63 -6
  41. package/dist/components/toggle/index.js +41 -4
  42. package/dist/components/toggle-group/index.js +80 -4
  43. package/dist/components/tooltip/index.js +51 -6
  44. package/dist/components/typography/index.js +147 -14
  45. package/dist/index.js +208 -255
  46. package/package.json +3 -3
  47. package/dist/chunk-25N35Z5M.js +0 -42
  48. package/dist/chunk-2JOT4DV4.js +0 -66
  49. package/dist/chunk-2SBGU5XA.js +0 -233
  50. package/dist/chunk-2UG6OCGA.js +0 -75
  51. package/dist/chunk-3BAO7TAS.js +0 -105
  52. package/dist/chunk-3NQR7JZR.js +0 -128
  53. package/dist/chunk-3QUMCM5K.js +0 -225
  54. package/dist/chunk-3TZXV53R.js +0 -55
  55. package/dist/chunk-3UKWAM5M.js +0 -33
  56. package/dist/chunk-44I6VK3H.js +0 -105
  57. package/dist/chunk-67UXTT4O.js +0 -116
  58. package/dist/chunk-727ACUWN.js +0 -82
  59. package/dist/chunk-76APYFRN.js +0 -29
  60. package/dist/chunk-AJAAMJYH.js +0 -12
  61. package/dist/chunk-B5YCE3UP.js +0 -57
  62. package/dist/chunk-BIFBYERK.js +0 -69
  63. package/dist/chunk-DXZ4GUQO.js +0 -33
  64. package/dist/chunk-ED6T7ZZN.js +0 -130
  65. package/dist/chunk-EEAK2RWF.js +0 -23
  66. package/dist/chunk-F2TEA6ER.js +0 -138
  67. package/dist/chunk-FF5D53KL.js +0 -69
  68. package/dist/chunk-FRIOQFPE.js +0 -171
  69. package/dist/chunk-G2YBCHWR.js +0 -46
  70. package/dist/chunk-GKCBSG2W.js +0 -67
  71. package/dist/chunk-GPEL656S.js +0 -84
  72. package/dist/chunk-JKKCRFYB.js +0 -36
  73. package/dist/chunk-JTSIBZS4.js +0 -194
  74. package/dist/chunk-MCXSVXO4.js +0 -24
  75. package/dist/chunk-MMZJQ7RW.js +0 -33
  76. package/dist/chunk-MYIUX3DT.js +0 -62
  77. package/dist/chunk-P5KEJOBH.js +0 -155
  78. package/dist/chunk-PAO3DSEF.js +0 -48
  79. package/dist/chunk-PLLG76QJ.js +0 -32
  80. package/dist/chunk-SDYKJVXX.js +0 -253
  81. package/dist/chunk-SIQHWNPH.js +0 -45
  82. package/dist/chunk-SKR3J46C.js +0 -17
  83. package/dist/chunk-STRBREHN.js +0 -17
  84. package/dist/chunk-SUEPE6OX.js +0 -47
  85. package/dist/chunk-TA23RNS4.js +0 -162
  86. package/dist/chunk-TRXU4SOJ.js +0 -224
  87. package/dist/chunk-U7JIOR7A.js +0 -172
  88. package/dist/chunk-VPBVKBZ7.js +0 -25
  89. package/dist/chunk-W4XY3SNY.js +0 -40
  90. package/dist/chunk-YT2ZIMZI.js +0 -16
  91. package/dist/components/accordion/index.cjs +0 -104
  92. package/dist/components/accordion/index.d.cts +0 -25
  93. package/dist/components/alert/index.cjs +0 -96
  94. package/dist/components/alert/index.d.cts +0 -28
  95. package/dist/components/alert-dialog/index.cjs +0 -200
  96. package/dist/components/alert-dialog/index.d.cts +0 -42
  97. package/dist/components/aspect-ratio/index.cjs +0 -47
  98. package/dist/components/aspect-ratio/index.d.cts +0 -19
  99. package/dist/components/avatar/index.cjs +0 -92
  100. package/dist/components/avatar/index.d.cts +0 -24
  101. package/dist/components/badge/index.cjs +0 -67
  102. package/dist/components/badge/index.d.cts +0 -24
  103. package/dist/components/breadcrumb/index.cjs +0 -135
  104. package/dist/components/breadcrumb/index.d.cts +0 -33
  105. package/dist/components/button/index.cjs +0 -87
  106. package/dist/components/button/index.d.cts +0 -28
  107. package/dist/components/button-group/index.cjs +0 -142
  108. package/dist/components/button-group/index.d.cts +0 -33
  109. package/dist/components/card/index.cjs +0 -104
  110. package/dist/components/card/index.d.cts +0 -27
  111. package/dist/components/checkbox/index.cjs +0 -68
  112. package/dist/components/checkbox/index.d.cts +0 -17
  113. package/dist/components/collapsible/index.cjs +0 -73
  114. package/dist/components/collapsible/index.d.cts +0 -22
  115. package/dist/components/context-menu/index.cjs +0 -274
  116. package/dist/components/context-menu/index.d.cts +0 -48
  117. package/dist/components/dialog/index.cjs +0 -182
  118. package/dist/components/dialog/index.d.cts +0 -38
  119. package/dist/components/direction/index.cjs +0 -39
  120. package/dist/components/direction/index.d.cts +0 -20
  121. package/dist/components/drawer/index.cjs +0 -164
  122. package/dist/components/drawer/index.d.cts +0 -35
  123. package/dist/components/dropdown/index.cjs +0 -282
  124. package/dist/components/dropdown/index.d.cts +0 -52
  125. package/dist/components/empty/index.cjs +0 -135
  126. package/dist/components/empty/index.d.cts +0 -38
  127. package/dist/components/field/index.cjs +0 -269
  128. package/dist/components/field/index.d.cts +0 -42
  129. package/dist/components/hover-card/index.cjs +0 -77
  130. package/dist/components/hover-card/index.d.cts +0 -22
  131. package/dist/components/input/index.cjs +0 -47
  132. package/dist/components/input/index.d.cts +0 -17
  133. package/dist/components/input-group/index.cjs +0 -270
  134. package/dist/components/input-group/index.d.cts +0 -44
  135. package/dist/components/item/index.cjs +0 -262
  136. package/dist/components/item/index.d.cts +0 -47
  137. package/dist/components/kbd/index.cjs +0 -57
  138. package/dist/components/kbd/index.d.cts +0 -19
  139. package/dist/components/label/index.cjs +0 -59
  140. package/dist/components/label/index.d.cts +0 -16
  141. package/dist/components/menubar/index.cjs +0 -303
  142. package/dist/components/menubar/index.d.cts +0 -49
  143. package/dist/components/native-select/index.cjs +0 -53
  144. package/dist/components/native-select/index.d.cts +0 -19
  145. package/dist/components/navigation-menu/index.cjs +0 -215
  146. package/dist/components/navigation-menu/index.d.cts +0 -37
  147. package/dist/components/popover/index.cjs +0 -84
  148. package/dist/components/popover/index.d.cts +0 -23
  149. package/dist/components/progress/index.cjs +0 -68
  150. package/dist/components/progress/index.d.cts +0 -16
  151. package/dist/components/radio-group/index.cjs +0 -83
  152. package/dist/components/radio-group/index.d.cts +0 -22
  153. package/dist/components/resizable/index.cjs +0 -75
  154. package/dist/components/resizable/index.d.cts +0 -25
  155. package/dist/components/scroll-area/index.cjs +0 -98
  156. package/dist/components/scroll-area/index.d.cts +0 -21
  157. package/dist/components/section/index.cjs +0 -41
  158. package/dist/components/section/index.d.cts +0 -27
  159. package/dist/components/select/index.cjs +0 -215
  160. package/dist/components/select/index.d.cts +0 -36
  161. package/dist/components/separator/index.cjs +0 -63
  162. package/dist/components/separator/index.d.cts +0 -18
  163. package/dist/components/sheet/index.cjs +0 -170
  164. package/dist/components/sheet/index.d.cts +0 -31
  165. package/dist/components/skeleton/index.cjs +0 -41
  166. package/dist/components/skeleton/index.d.cts +0 -14
  167. package/dist/components/slider/index.cjs +0 -102
  168. package/dist/components/slider/index.d.cts +0 -19
  169. package/dist/components/sonner/index.cjs +0 -51
  170. package/dist/components/sonner/index.d.cts +0 -18
  171. package/dist/components/spinner/index.cjs +0 -47
  172. package/dist/components/spinner/index.d.cts +0 -17
  173. package/dist/components/switch/index.cjs +0 -68
  174. package/dist/components/switch/index.d.cts +0 -17
  175. package/dist/components/table/index.cjs +0 -147
  176. package/dist/components/table/index.d.cts +0 -35
  177. package/dist/components/tabs/index.cjs +0 -107
  178. package/dist/components/tabs/index.d.cts +0 -27
  179. package/dist/components/textarea/index.cjs +0 -44
  180. package/dist/components/textarea/index.d.cts +0 -15
  181. package/dist/components/toggle/index.cjs +0 -81
  182. package/dist/components/toggle/index.d.cts +0 -26
  183. package/dist/components/toggle-group/index.cjs +0 -120
  184. package/dist/components/toggle-group/index.d.cts +0 -27
  185. package/dist/components/tooltip/index.cjs +0 -95
  186. package/dist/components/tooltip/index.d.cts +0 -25
  187. package/dist/components/typography/index.cjs +0 -197
  188. package/dist/components/typography/index.d.cts +0 -28
  189. package/dist/index.cjs +0 -4094
  190. package/dist/index.d.cts +0 -83
@@ -1,7 +1,34 @@
1
1
  "use client";
2
- import {
3
- Checkbox
4
- } from "../../chunk-3UKWAM5M.js";
2
+
3
+ // src/components/checkbox/index.tsx
4
+ import { cn } from "@foundrykit/utils";
5
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
6
+ import { CheckIcon } from "lucide-react";
7
+ import { jsx } from "react/jsx-runtime";
8
+ function Checkbox({
9
+ className,
10
+ ...props
11
+ }) {
12
+ return /* @__PURE__ */ jsx(
13
+ CheckboxPrimitive.Root,
14
+ {
15
+ "data-slot": "checkbox",
16
+ className: cn(
17
+ "border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive peer size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
18
+ className
19
+ ),
20
+ ...props,
21
+ children: /* @__PURE__ */ jsx(
22
+ CheckboxPrimitive.Indicator,
23
+ {
24
+ "data-slot": "checkbox-indicator",
25
+ className: "flex items-center justify-center text-current transition-none",
26
+ children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5" })
27
+ }
28
+ )
29
+ }
30
+ );
31
+ }
5
32
  export {
6
33
  Checkbox
7
34
  };
@@ -1,11 +1,37 @@
1
1
  "use client";
2
- import {
3
- Collapsible,
4
- CollapsibleContent,
5
- CollapsibleTrigger
6
- } from "../../chunk-JKKCRFYB.js";
2
+
3
+ // src/components/collapsible/index.tsx
4
+ import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
5
+ import { jsx } from "react/jsx-runtime";
6
+ function Collapsible({
7
+ ...props
8
+ }) {
9
+ return /* @__PURE__ */ jsx(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...props });
10
+ }
11
+ function CollapsibleTrigger2({
12
+ ...props
13
+ }) {
14
+ return /* @__PURE__ */ jsx(
15
+ CollapsiblePrimitive.CollapsibleTrigger,
16
+ {
17
+ "data-slot": "collapsible-trigger",
18
+ ...props
19
+ }
20
+ );
21
+ }
22
+ function CollapsibleContent2({
23
+ ...props
24
+ }) {
25
+ return /* @__PURE__ */ jsx(
26
+ CollapsiblePrimitive.CollapsibleContent,
27
+ {
28
+ "data-slot": "collapsible-content",
29
+ ...props
30
+ }
31
+ );
32
+ }
7
33
  export {
8
34
  Collapsible,
9
- CollapsibleContent,
10
- CollapsibleTrigger
35
+ CollapsibleContent2 as CollapsibleContent,
36
+ CollapsibleTrigger2 as CollapsibleTrigger
11
37
  };
@@ -1,21 +1,212 @@
1
1
  "use client";
2
- import {
3
- ContextMenu,
4
- ContextMenuCheckboxItem,
5
- ContextMenuContent,
6
- ContextMenuGroup,
7
- ContextMenuItem,
8
- ContextMenuLabel,
9
- ContextMenuPortal,
10
- ContextMenuRadioGroup,
11
- ContextMenuRadioItem,
12
- ContextMenuSeparator,
13
- ContextMenuShortcut,
14
- ContextMenuSub,
15
- ContextMenuSubContent,
16
- ContextMenuSubTrigger,
17
- ContextMenuTrigger
18
- } from "../../chunk-3QUMCM5K.js";
2
+
3
+ // src/components/context-menu/index.tsx
4
+ import { cn } from "@foundrykit/utils";
5
+ import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
6
+ import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ function ContextMenu({
9
+ ...props
10
+ }) {
11
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Root, { "data-slot": "context-menu", ...props });
12
+ }
13
+ function ContextMenuTrigger({
14
+ ...props
15
+ }) {
16
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Trigger, { "data-slot": "context-menu-trigger", ...props });
17
+ }
18
+ function ContextMenuGroup({
19
+ ...props
20
+ }) {
21
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Group, { "data-slot": "context-menu-group", ...props });
22
+ }
23
+ function ContextMenuPortal({
24
+ ...props
25
+ }) {
26
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { "data-slot": "context-menu-portal", ...props });
27
+ }
28
+ function ContextMenuSub({
29
+ ...props
30
+ }) {
31
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Sub, { "data-slot": "context-menu-sub", ...props });
32
+ }
33
+ function ContextMenuRadioGroup({
34
+ ...props
35
+ }) {
36
+ return /* @__PURE__ */ jsx(
37
+ ContextMenuPrimitive.RadioGroup,
38
+ {
39
+ "data-slot": "context-menu-radio-group",
40
+ ...props
41
+ }
42
+ );
43
+ }
44
+ function ContextMenuSubTrigger({
45
+ className,
46
+ inset,
47
+ children,
48
+ ...props
49
+ }) {
50
+ return /* @__PURE__ */ jsxs(
51
+ ContextMenuPrimitive.SubTrigger,
52
+ {
53
+ "data-slot": "context-menu-sub-trigger",
54
+ "data-inset": inset,
55
+ className: cn(
56
+ "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
57
+ className
58
+ ),
59
+ ...props,
60
+ children: [
61
+ children,
62
+ /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto size-4" })
63
+ ]
64
+ }
65
+ );
66
+ }
67
+ function ContextMenuSubContent({
68
+ className,
69
+ ...props
70
+ }) {
71
+ return /* @__PURE__ */ jsx(
72
+ ContextMenuPrimitive.SubContent,
73
+ {
74
+ "data-slot": "context-menu-sub-content",
75
+ className: cn(
76
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 motion-safe:data-[state=closed]:zoom-out-95 motion-safe:data-[state=open]:zoom-in-95 motion-safe:data-[side=bottom]:slide-in-from-top-2 motion-safe:data-[side=left]:slide-in-from-right-2 motion-safe:data-[side=right]:slide-in-from-left-2 motion-safe:data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
77
+ className
78
+ ),
79
+ ...props
80
+ }
81
+ );
82
+ }
83
+ function ContextMenuContent({
84
+ className,
85
+ ...props
86
+ }) {
87
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
88
+ ContextMenuPrimitive.Content,
89
+ {
90
+ "data-slot": "context-menu-content",
91
+ className: cn(
92
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 motion-safe:data-[state=closed]:zoom-out-95 motion-safe:data-[state=open]:zoom-in-95 motion-safe:data-[side=bottom]:slide-in-from-top-2 motion-safe:data-[side=left]:slide-in-from-right-2 motion-safe:data-[side=right]:slide-in-from-left-2 motion-safe:data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
93
+ className
94
+ ),
95
+ ...props
96
+ }
97
+ ) });
98
+ }
99
+ function ContextMenuItem({
100
+ className,
101
+ inset,
102
+ variant = "default",
103
+ ...props
104
+ }) {
105
+ return /* @__PURE__ */ jsx(
106
+ ContextMenuPrimitive.Item,
107
+ {
108
+ "data-slot": "context-menu-item",
109
+ "data-inset": inset,
110
+ "data-variant": variant,
111
+ className: cn(
112
+ "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
113
+ className
114
+ ),
115
+ ...props
116
+ }
117
+ );
118
+ }
119
+ function ContextMenuCheckboxItem({
120
+ className,
121
+ children,
122
+ checked,
123
+ ...props
124
+ }) {
125
+ return /* @__PURE__ */ jsxs(
126
+ ContextMenuPrimitive.CheckboxItem,
127
+ {
128
+ "data-slot": "context-menu-checkbox-item",
129
+ className: cn(
130
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
131
+ className
132
+ ),
133
+ checked,
134
+ ...props,
135
+ children: [
136
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
137
+ children
138
+ ]
139
+ }
140
+ );
141
+ }
142
+ function ContextMenuRadioItem({
143
+ className,
144
+ children,
145
+ ...props
146
+ }) {
147
+ return /* @__PURE__ */ jsxs(
148
+ ContextMenuPrimitive.RadioItem,
149
+ {
150
+ "data-slot": "context-menu-radio-item",
151
+ className: cn(
152
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
153
+ className
154
+ ),
155
+ ...props,
156
+ children: [
157
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) }) }),
158
+ children
159
+ ]
160
+ }
161
+ );
162
+ }
163
+ function ContextMenuLabel({
164
+ className,
165
+ inset,
166
+ ...props
167
+ }) {
168
+ return /* @__PURE__ */ jsx(
169
+ ContextMenuPrimitive.Label,
170
+ {
171
+ "data-slot": "context-menu-label",
172
+ "data-inset": inset,
173
+ className: cn(
174
+ "text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
175
+ className
176
+ ),
177
+ ...props
178
+ }
179
+ );
180
+ }
181
+ function ContextMenuSeparator({
182
+ className,
183
+ ...props
184
+ }) {
185
+ return /* @__PURE__ */ jsx(
186
+ ContextMenuPrimitive.Separator,
187
+ {
188
+ "data-slot": "context-menu-separator",
189
+ className: cn("bg-border -mx-1 my-1 h-px", className),
190
+ ...props
191
+ }
192
+ );
193
+ }
194
+ function ContextMenuShortcut({
195
+ className,
196
+ ...props
197
+ }) {
198
+ return /* @__PURE__ */ jsx(
199
+ "span",
200
+ {
201
+ "data-slot": "context-menu-shortcut",
202
+ className: cn(
203
+ "text-muted-foreground ml-auto text-xs tracking-widest",
204
+ className
205
+ ),
206
+ ...props
207
+ }
208
+ );
209
+ }
19
210
  export {
20
211
  ContextMenu,
21
212
  ContextMenuCheckboxItem,
@@ -1,16 +1,130 @@
1
1
  "use client";
2
- import {
3
- Dialog,
4
- DialogClose,
5
- DialogContent,
6
- DialogDescription,
7
- DialogFooter,
8
- DialogHeader,
9
- DialogOverlay,
10
- DialogPortal,
11
- DialogTitle,
12
- DialogTrigger
13
- } from "../../chunk-F2TEA6ER.js";
2
+
3
+ // src/components/dialog/index.tsx
4
+ import { cn } from "@foundrykit/utils";
5
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
6
+ import { XIcon } from "lucide-react";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ function Dialog({
9
+ ...props
10
+ }) {
11
+ return /* @__PURE__ */ jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
12
+ }
13
+ function DialogTrigger({
14
+ ...props
15
+ }) {
16
+ return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
17
+ }
18
+ function DialogPortal({
19
+ ...props
20
+ }) {
21
+ return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
22
+ }
23
+ function DialogClose({
24
+ ...props
25
+ }) {
26
+ return /* @__PURE__ */ jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
27
+ }
28
+ function DialogOverlay({
29
+ className,
30
+ ...props
31
+ }) {
32
+ return /* @__PURE__ */ jsx(
33
+ DialogPrimitive.Overlay,
34
+ {
35
+ "data-slot": "dialog-overlay",
36
+ className: cn(
37
+ "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",
38
+ className
39
+ ),
40
+ ...props
41
+ }
42
+ );
43
+ }
44
+ function DialogContent({
45
+ className,
46
+ children,
47
+ showCloseButton = true,
48
+ ...props
49
+ }) {
50
+ return /* @__PURE__ */ jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [
51
+ /* @__PURE__ */ jsx(DialogOverlay, {}),
52
+ /* @__PURE__ */ jsxs(
53
+ DialogPrimitive.Content,
54
+ {
55
+ "data-slot": "dialog-content",
56
+ className: cn(
57
+ "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 motion-safe:data-[state=closed]:zoom-out-95 motion-safe: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",
58
+ className
59
+ ),
60
+ ...props,
61
+ children: [
62
+ children,
63
+ showCloseButton && /* @__PURE__ */ jsxs(
64
+ DialogPrimitive.Close,
65
+ {
66
+ "data-slot": "dialog-close",
67
+ className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground 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 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
68
+ children: [
69
+ /* @__PURE__ */ jsx(XIcon, {}),
70
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
71
+ ]
72
+ }
73
+ )
74
+ ]
75
+ }
76
+ )
77
+ ] });
78
+ }
79
+ function DialogHeader({ className, ...props }) {
80
+ return /* @__PURE__ */ jsx(
81
+ "div",
82
+ {
83
+ "data-slot": "dialog-header",
84
+ className: cn("flex flex-col gap-2 text-center sm:text-left", className),
85
+ ...props
86
+ }
87
+ );
88
+ }
89
+ function DialogFooter({ className, ...props }) {
90
+ return /* @__PURE__ */ jsx(
91
+ "div",
92
+ {
93
+ "data-slot": "dialog-footer",
94
+ className: cn(
95
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
96
+ className
97
+ ),
98
+ ...props
99
+ }
100
+ );
101
+ }
102
+ function DialogTitle({
103
+ className,
104
+ ...props
105
+ }) {
106
+ return /* @__PURE__ */ jsx(
107
+ DialogPrimitive.Title,
108
+ {
109
+ "data-slot": "dialog-title",
110
+ className: cn("text-lg leading-none font-semibold", className),
111
+ ...props
112
+ }
113
+ );
114
+ }
115
+ function DialogDescription({
116
+ className,
117
+ ...props
118
+ }) {
119
+ return /* @__PURE__ */ jsx(
120
+ DialogPrimitive.Description,
121
+ {
122
+ "data-slot": "dialog-description",
123
+ className: cn("text-muted-foreground text-sm", className),
124
+ ...props
125
+ }
126
+ );
127
+ }
14
128
  export {
15
129
  Dialog,
16
130
  DialogClose,
@@ -1,8 +1,16 @@
1
1
  "use client";
2
+
3
+ // src/components/direction/index.tsx
2
4
  import {
3
- DirectionProvider,
5
+ DirectionProvider as DirectionProviderPrimitive,
4
6
  useDirection
5
- } from "../../chunk-YT2ZIMZI.js";
7
+ } from "@radix-ui/react-direction";
8
+ import { jsx } from "react/jsx-runtime";
9
+ function DirectionProvider({
10
+ ...props
11
+ }) {
12
+ return /* @__PURE__ */ jsx(DirectionProviderPrimitive, { ...props });
13
+ }
6
14
  export {
7
15
  DirectionProvider,
8
16
  useDirection
@@ -1,16 +1,122 @@
1
1
  "use client";
2
- import {
3
- Drawer,
4
- DrawerClose,
5
- DrawerContent,
6
- DrawerDescription,
7
- DrawerFooter,
8
- DrawerHeader,
9
- DrawerOverlay,
10
- DrawerPortal,
11
- DrawerTitle,
12
- DrawerTrigger
13
- } from "../../chunk-ED6T7ZZN.js";
2
+
3
+ // src/components/drawer/index.tsx
4
+ import { cn } from "@foundrykit/utils";
5
+ import { Drawer as DrawerPrimitive } from "vaul";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ function Drawer({
8
+ ...props
9
+ }) {
10
+ return /* @__PURE__ */ jsx(DrawerPrimitive.Root, { "data-slot": "drawer", ...props });
11
+ }
12
+ function DrawerTrigger({
13
+ ...props
14
+ }) {
15
+ return /* @__PURE__ */ jsx(DrawerPrimitive.Trigger, { "data-slot": "drawer-trigger", ...props });
16
+ }
17
+ function DrawerPortal({
18
+ ...props
19
+ }) {
20
+ return /* @__PURE__ */ jsx(DrawerPrimitive.Portal, { "data-slot": "drawer-portal", ...props });
21
+ }
22
+ function DrawerClose({
23
+ ...props
24
+ }) {
25
+ return /* @__PURE__ */ jsx(DrawerPrimitive.Close, { "data-slot": "drawer-close", ...props });
26
+ }
27
+ function DrawerOverlay({
28
+ className,
29
+ ...props
30
+ }) {
31
+ return /* @__PURE__ */ jsx(
32
+ DrawerPrimitive.Overlay,
33
+ {
34
+ "data-slot": "drawer-overlay",
35
+ className: cn(
36
+ "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",
37
+ className
38
+ ),
39
+ ...props
40
+ }
41
+ );
42
+ }
43
+ function DrawerContent({
44
+ className,
45
+ children,
46
+ ...props
47
+ }) {
48
+ return /* @__PURE__ */ jsxs(DrawerPortal, { children: [
49
+ /* @__PURE__ */ jsx(DrawerOverlay, {}),
50
+ /* @__PURE__ */ jsxs(
51
+ DrawerPrimitive.Content,
52
+ {
53
+ "data-slot": "drawer-content",
54
+ className: cn(
55
+ "group/drawer-content bg-background fixed z-50 flex h-auto flex-col",
56
+ "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b",
57
+ "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t",
58
+ "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm",
59
+ "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",
60
+ className
61
+ ),
62
+ ...props,
63
+ children: [
64
+ /* @__PURE__ */ jsx("div", { className: "bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }),
65
+ children
66
+ ]
67
+ }
68
+ )
69
+ ] });
70
+ }
71
+ function DrawerHeader({ className, ...props }) {
72
+ return /* @__PURE__ */ jsx(
73
+ "div",
74
+ {
75
+ "data-slot": "drawer-header",
76
+ className: cn(
77
+ "flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left",
78
+ className
79
+ ),
80
+ ...props
81
+ }
82
+ );
83
+ }
84
+ function DrawerFooter({ className, ...props }) {
85
+ return /* @__PURE__ */ jsx(
86
+ "div",
87
+ {
88
+ "data-slot": "drawer-footer",
89
+ className: cn("mt-auto flex flex-col gap-2 p-4", className),
90
+ ...props
91
+ }
92
+ );
93
+ }
94
+ function DrawerTitle({
95
+ className,
96
+ ...props
97
+ }) {
98
+ return /* @__PURE__ */ jsx(
99
+ DrawerPrimitive.Title,
100
+ {
101
+ "data-slot": "drawer-title",
102
+ className: cn("text-foreground font-semibold", className),
103
+ ...props
104
+ }
105
+ );
106
+ }
107
+ function DrawerDescription({
108
+ className,
109
+ ...props
110
+ }) {
111
+ return /* @__PURE__ */ jsx(
112
+ DrawerPrimitive.Description,
113
+ {
114
+ "data-slot": "drawer-description",
115
+ className: cn("text-muted-foreground text-sm", className),
116
+ ...props
117
+ }
118
+ );
119
+ }
14
120
  export {
15
121
  Drawer,
16
122
  DrawerClose,