@foundrykit/primitives 2.1.2 → 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 +198 -245
  46. package/package.json +4 -4
  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,224 +0,0 @@
1
- // src/components/field/index.tsx
2
- import { cn } from "@foundrykit/utils";
3
- import * as LabelPrimitive from "@radix-ui/react-label";
4
- import { cva } from "class-variance-authority";
5
- import * as React from "react";
6
- import { jsx, jsxs } from "react/jsx-runtime";
7
- var fieldVariants = cva(
8
- "group/field data-[invalid=true]:text-destructive flex w-full gap-3",
9
- {
10
- variants: {
11
- orientation: {
12
- vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
13
- horizontal: [
14
- "flex-row items-center",
15
- "[&>[data-slot=field-label]]:flex-auto",
16
- "has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox]]:mt-px has-[>[data-slot=field-content]]:[&>[role=radio]]:mt-px"
17
- ],
18
- responsive: [
19
- "flex-col @md/field-group:flex-row @md/field-group:items-center [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto",
20
- "@md/field-group:[&>[data-slot=field-label]]:flex-auto",
21
- "@md/field-group:has-[>[data-slot=field-content]]:items-start"
22
- ]
23
- }
24
- },
25
- defaultVariants: {
26
- orientation: "vertical"
27
- }
28
- }
29
- );
30
- function Field({
31
- className,
32
- orientation = "vertical",
33
- ...props
34
- }) {
35
- return /* @__PURE__ */ jsx(
36
- "div",
37
- {
38
- role: "group",
39
- "data-slot": "field",
40
- "data-orientation": orientation,
41
- className: cn(fieldVariants({ orientation }), className),
42
- ...props
43
- }
44
- );
45
- }
46
- function FieldSet({ className, ...props }) {
47
- return /* @__PURE__ */ jsx(
48
- "fieldset",
49
- {
50
- "data-slot": "field-set",
51
- className: cn(
52
- "flex flex-col gap-6",
53
- "has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
54
- className
55
- ),
56
- ...props
57
- }
58
- );
59
- }
60
- function FieldLegend({
61
- className,
62
- variant = "legend",
63
- ...props
64
- }) {
65
- return /* @__PURE__ */ jsx(
66
- "legend",
67
- {
68
- "data-slot": "field-legend",
69
- "data-variant": variant,
70
- className: cn(
71
- "mb-3 font-medium",
72
- "data-[variant=legend]:text-base",
73
- "data-[variant=label]:text-sm",
74
- className
75
- ),
76
- ...props
77
- }
78
- );
79
- }
80
- function FieldGroup({ className, ...props }) {
81
- return /* @__PURE__ */ jsx(
82
- "div",
83
- {
84
- "data-slot": "field-group",
85
- className: cn(
86
- "group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",
87
- className
88
- ),
89
- ...props
90
- }
91
- );
92
- }
93
- function FieldContent({ className, ...props }) {
94
- return /* @__PURE__ */ jsx(
95
- "div",
96
- {
97
- "data-slot": "field-content",
98
- className: cn(
99
- "group/field-content flex flex-1 flex-col gap-1.5 leading-snug",
100
- className
101
- ),
102
- ...props
103
- }
104
- );
105
- }
106
- function FieldLabel({
107
- className,
108
- ...props
109
- }) {
110
- return /* @__PURE__ */ jsx(
111
- LabelPrimitive.Root,
112
- {
113
- "data-slot": "field-label",
114
- className: cn(
115
- "group/field-label peer/field-label flex w-fit gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50",
116
- "has-[[data-slot=field]]:w-full has-[[data-slot=field]]:flex-col has-[[data-slot=field]]:rounded-md has-[[data-slot=field]]:border",
117
- className
118
- ),
119
- ...props
120
- }
121
- );
122
- }
123
- function FieldTitle({ className, ...props }) {
124
- return /* @__PURE__ */ jsx(
125
- "div",
126
- {
127
- "data-slot": "field-title",
128
- className: cn(
129
- "flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50",
130
- className
131
- ),
132
- ...props
133
- }
134
- );
135
- }
136
- function FieldDescription({ className, ...props }) {
137
- return /* @__PURE__ */ jsx(
138
- "p",
139
- {
140
- "data-slot": "field-description",
141
- className: cn(
142
- "text-muted-foreground text-sm leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance",
143
- "last:mt-0 [[data-variant=legend]+&]:-mt-1.5",
144
- "[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
145
- className
146
- ),
147
- ...props
148
- }
149
- );
150
- }
151
- function FieldSeparator({
152
- children,
153
- className,
154
- ...props
155
- }) {
156
- return /* @__PURE__ */ jsxs(
157
- "div",
158
- {
159
- "data-slot": "field-separator",
160
- "data-content": !!children,
161
- className: cn("relative -my-2 h-5 text-sm", className),
162
- ...props,
163
- children: [
164
- /* @__PURE__ */ jsx("div", { className: "bg-border absolute inset-0 top-1/2 h-px" }),
165
- children && /* @__PURE__ */ jsx(
166
- "span",
167
- {
168
- className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
169
- "data-slot": "field-separator-content",
170
- children
171
- }
172
- )
173
- ]
174
- }
175
- );
176
- }
177
- function FieldError({
178
- className,
179
- children,
180
- errors,
181
- ...props
182
- }) {
183
- const content = React.useMemo(() => {
184
- if (children) {
185
- return children;
186
- }
187
- if (!errors) {
188
- return null;
189
- }
190
- if (errors.length === 1 && errors[0]?.message) {
191
- return errors[0].message;
192
- }
193
- return /* @__PURE__ */ jsx("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map(
194
- (error, index) => error?.message && /* @__PURE__ */ jsx("li", { children: error.message }, index)
195
- ) });
196
- }, [children, errors]);
197
- if (!content) {
198
- return null;
199
- }
200
- return /* @__PURE__ */ jsx(
201
- "div",
202
- {
203
- role: "alert",
204
- "data-slot": "field-error",
205
- className: cn("text-destructive text-sm font-normal", className),
206
- ...props,
207
- children: content
208
- }
209
- );
210
- }
211
-
212
- export {
213
- fieldVariants,
214
- Field,
215
- FieldSet,
216
- FieldLegend,
217
- FieldGroup,
218
- FieldContent,
219
- FieldLabel,
220
- FieldTitle,
221
- FieldDescription,
222
- FieldSeparator,
223
- FieldError
224
- };
@@ -1,172 +0,0 @@
1
- // src/components/navigation-menu/index.tsx
2
- import { cn } from "@foundrykit/utils";
3
- import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
4
- import { cva } from "class-variance-authority";
5
- import { ChevronDownIcon } from "lucide-react";
6
- import { jsx, jsxs } from "react/jsx-runtime";
7
- function NavigationMenu({
8
- className,
9
- children,
10
- viewport = true,
11
- ...props
12
- }) {
13
- return /* @__PURE__ */ jsxs(
14
- NavigationMenuPrimitive.Root,
15
- {
16
- "data-slot": "navigation-menu",
17
- "data-viewport": viewport,
18
- className: cn(
19
- "group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
20
- className
21
- ),
22
- ...props,
23
- children: [
24
- children,
25
- viewport && /* @__PURE__ */ jsx(NavigationMenuViewport, {})
26
- ]
27
- }
28
- );
29
- }
30
- function NavigationMenuList({
31
- className,
32
- ...props
33
- }) {
34
- return /* @__PURE__ */ jsx(
35
- NavigationMenuPrimitive.List,
36
- {
37
- "data-slot": "navigation-menu-list",
38
- className: cn(
39
- "group flex flex-1 list-none items-center justify-center gap-1",
40
- className
41
- ),
42
- ...props
43
- }
44
- );
45
- }
46
- function NavigationMenuItem({
47
- className,
48
- ...props
49
- }) {
50
- return /* @__PURE__ */ jsx(
51
- NavigationMenuPrimitive.Item,
52
- {
53
- "data-slot": "navigation-menu-item",
54
- className: cn("relative", className),
55
- ...props
56
- }
57
- );
58
- }
59
- var navigationMenuTriggerStyle = cva(
60
- "group bg-background hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 inline-flex h-9 w-max items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50"
61
- );
62
- function NavigationMenuTrigger({
63
- className,
64
- children,
65
- ...props
66
- }) {
67
- return /* @__PURE__ */ jsxs(
68
- NavigationMenuPrimitive.Trigger,
69
- {
70
- "data-slot": "navigation-menu-trigger",
71
- className: cn(navigationMenuTriggerStyle(), "group", className),
72
- ...props,
73
- children: [
74
- children,
75
- " ",
76
- /* @__PURE__ */ jsx(
77
- ChevronDownIcon,
78
- {
79
- className: "relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",
80
- "aria-hidden": "true"
81
- }
82
- )
83
- ]
84
- }
85
- );
86
- }
87
- function NavigationMenuContent({
88
- className,
89
- ...props
90
- }) {
91
- return /* @__PURE__ */ jsx(
92
- NavigationMenuPrimitive.Content,
93
- {
94
- "data-slot": "navigation-menu-content",
95
- className: cn(
96
- "data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out motion-safe:data-[motion=from-end]:slide-in-from-right-52 motion-safe:data-[motion=from-start]:slide-in-from-left-52 motion-safe:data-[motion=to-end]:slide-out-to-right-52 motion-safe:data-[motion=to-start]:slide-out-to-left-52 top-0 left-0 w-full p-2 pr-2.5 md:absolute md:w-auto",
97
- "group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out motion-safe:group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 motion-safe:group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200",
98
- className
99
- ),
100
- ...props
101
- }
102
- );
103
- }
104
- function NavigationMenuViewport({
105
- className,
106
- ...props
107
- }) {
108
- return /* @__PURE__ */ jsx(
109
- "div",
110
- {
111
- className: cn(
112
- "absolute top-full left-0 isolate z-50 flex justify-center"
113
- ),
114
- children: /* @__PURE__ */ jsx(
115
- NavigationMenuPrimitive.Viewport,
116
- {
117
- "data-slot": "navigation-menu-viewport",
118
- className: cn(
119
- "origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out motion-safe:data-[state=closed]:zoom-out-95 motion-safe:data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]",
120
- className
121
- ),
122
- ...props
123
- }
124
- )
125
- }
126
- );
127
- }
128
- function NavigationMenuLink({
129
- className,
130
- ...props
131
- }) {
132
- return /* @__PURE__ */ jsx(
133
- NavigationMenuPrimitive.Link,
134
- {
135
- "data-slot": "navigation-menu-link",
136
- className: cn(
137
- "data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-ring/50 [&_svg:not([class*='text-'])]:text-muted-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4",
138
- className
139
- ),
140
- ...props
141
- }
142
- );
143
- }
144
- function NavigationMenuIndicator({
145
- className,
146
- ...props
147
- }) {
148
- return /* @__PURE__ */ jsx(
149
- NavigationMenuPrimitive.Indicator,
150
- {
151
- "data-slot": "navigation-menu-indicator",
152
- className: cn(
153
- "data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden",
154
- className
155
- ),
156
- ...props,
157
- children: /* @__PURE__ */ jsx("div", { className: "bg-border relative top-[60%] size-2 rotate-45 rounded-tl-sm shadow-md" })
158
- }
159
- );
160
- }
161
-
162
- export {
163
- NavigationMenu,
164
- NavigationMenuList,
165
- NavigationMenuItem,
166
- navigationMenuTriggerStyle,
167
- NavigationMenuTrigger,
168
- NavigationMenuContent,
169
- NavigationMenuViewport,
170
- NavigationMenuLink,
171
- NavigationMenuIndicator
172
- };
@@ -1,25 +0,0 @@
1
- // src/components/sonner/index.tsx
2
- import { useTheme } from "next-themes";
3
- import { Toaster as Sonner, toast } from "sonner";
4
- import { jsx } from "react/jsx-runtime";
5
- function Toaster({ ...props }) {
6
- const { theme = "system" } = useTheme();
7
- return /* @__PURE__ */ jsx(
8
- Sonner,
9
- {
10
- theme,
11
- className: "toaster group",
12
- style: {
13
- "--normal-bg": "var(--popover)",
14
- "--normal-text": "var(--popover-foreground)",
15
- "--normal-border": "var(--border)"
16
- },
17
- ...props
18
- }
19
- );
20
- }
21
-
22
- export {
23
- toast,
24
- Toaster
25
- };
@@ -1,40 +0,0 @@
1
- // src/components/hover-card/index.tsx
2
- import { cn } from "@foundrykit/utils";
3
- import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
4
- import { jsx } from "react/jsx-runtime";
5
- function HoverCard({
6
- ...props
7
- }) {
8
- return /* @__PURE__ */ jsx(HoverCardPrimitive.Root, { "data-slot": "hover-card", ...props });
9
- }
10
- function HoverCardTrigger({
11
- ...props
12
- }) {
13
- return /* @__PURE__ */ jsx(HoverCardPrimitive.Trigger, { "data-slot": "hover-card-trigger", ...props });
14
- }
15
- function HoverCardContent({
16
- className,
17
- align = "center",
18
- sideOffset = 4,
19
- ...props
20
- }) {
21
- return /* @__PURE__ */ jsx(HoverCardPrimitive.Portal, { "data-slot": "hover-card-portal", children: /* @__PURE__ */ jsx(
22
- HoverCardPrimitive.Content,
23
- {
24
- "data-slot": "hover-card-content",
25
- align,
26
- sideOffset,
27
- className: cn(
28
- "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 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
29
- className
30
- ),
31
- ...props
32
- }
33
- ) });
34
- }
35
-
36
- export {
37
- HoverCard,
38
- HoverCardTrigger,
39
- HoverCardContent
40
- };
@@ -1,16 +0,0 @@
1
- // src/components/direction/index.tsx
2
- import {
3
- DirectionProvider as DirectionProviderPrimitive,
4
- useDirection
5
- } from "@radix-ui/react-direction";
6
- import { jsx } from "react/jsx-runtime";
7
- function DirectionProvider({
8
- ...props
9
- }) {
10
- return /* @__PURE__ */ jsx(DirectionProviderPrimitive, { ...props });
11
- }
12
-
13
- export {
14
- useDirection,
15
- DirectionProvider
16
- };
@@ -1,104 +0,0 @@
1
- "use strict";
2
- "use client";
3
- var __create = Object.create;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __export = (target, all) => {
10
- for (var name in all)
11
- __defProp(target, name, { get: all[name], enumerable: true });
12
- };
13
- var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from))
16
- if (!__hasOwnProp.call(to, key) && key !== except)
17
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
- }
19
- return to;
20
- };
21
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
- // If the importer is in node compatibility mode or this is not an ESM
23
- // file that has been converted to a CommonJS file using a Babel-
24
- // compatible transform (i.e. "__esModule" has not been set), then set
25
- // "default" to the CommonJS "module.exports" for node compatibility.
26
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
- mod
28
- ));
29
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
-
31
- // src/components/accordion/index.tsx
32
- var accordion_exports = {};
33
- __export(accordion_exports, {
34
- Accordion: () => Accordion,
35
- AccordionContent: () => AccordionContent,
36
- AccordionItem: () => AccordionItem,
37
- AccordionTrigger: () => AccordionTrigger
38
- });
39
- module.exports = __toCommonJS(accordion_exports);
40
- var import_utils = require("@foundrykit/utils");
41
- var AccordionPrimitive = __toESM(require("@radix-ui/react-accordion"), 1);
42
- var import_lucide_react = require("lucide-react");
43
- var import_jsx_runtime = require("react/jsx-runtime");
44
- function Accordion({
45
- ...props
46
- }) {
47
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionPrimitive.Root, { "data-slot": "accordion", ...props });
48
- }
49
- function AccordionItem({
50
- className,
51
- ...props
52
- }) {
53
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
54
- AccordionPrimitive.Item,
55
- {
56
- "data-slot": "accordion-item",
57
- className: (0, import_utils.cn)("border-b last:border-b-0", className),
58
- ...props
59
- }
60
- );
61
- }
62
- function AccordionTrigger({
63
- className,
64
- children,
65
- ...props
66
- }) {
67
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
68
- AccordionPrimitive.Trigger,
69
- {
70
- "data-slot": "accordion-trigger",
71
- className: (0, import_utils.cn)(
72
- "focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
73
- className
74
- ),
75
- ...props,
76
- children: [
77
- children,
78
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ChevronDownIcon, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
79
- ]
80
- }
81
- ) });
82
- }
83
- function AccordionContent({
84
- className,
85
- children,
86
- ...props
87
- }) {
88
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
89
- AccordionPrimitive.Content,
90
- {
91
- "data-slot": "accordion-content",
92
- className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
93
- ...props,
94
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_utils.cn)("pt-0 pb-4", className), children })
95
- }
96
- );
97
- }
98
- // Annotate the CommonJS export names for ESM import in node:
99
- 0 && (module.exports = {
100
- Accordion,
101
- AccordionContent,
102
- AccordionItem,
103
- AccordionTrigger
104
- });
@@ -1,25 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as AccordionPrimitive from '@radix-ui/react-accordion';
3
- import * as React from 'react';
4
-
5
- /**
6
- * Vertically stacked set of interactive headings built on Radix
7
- * `Accordion.Root`. Compose with {@link AccordionItem},
8
- * {@link AccordionTrigger} and {@link AccordionContent}.
9
- *
10
- * @example
11
- * ```tsx
12
- * <Accordion type="single" collapsible>
13
- * <AccordionItem value="item-1">
14
- * <AccordionTrigger>Is it accessible?</AccordionTrigger>
15
- * <AccordionContent>Yes. It follows WAI-ARIA.</AccordionContent>
16
- * </AccordionItem>
17
- * </Accordion>
18
- * ```
19
- */
20
- declare function Accordion({ ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>): react_jsx_runtime.JSX.Element;
21
- declare function AccordionItem({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item>): react_jsx_runtime.JSX.Element;
22
- declare function AccordionTrigger({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
23
- declare function AccordionContent({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Content>): react_jsx_runtime.JSX.Element;
24
-
25
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };