@foundrykit/primitives 2.1.3 → 2.3.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 (196) hide show
  1. package/README.md +11 -0
  2. package/dist/{chunk-SEDTBIZW.js → chunk-OMPTY5WQ.js} +1 -1
  3. package/dist/components/accordion/index.js +60 -6
  4. package/dist/components/alert/index.js +62 -6
  5. package/dist/components/alert-dialog/index.js +142 -13
  6. package/dist/components/aspect-ratio/index.js +9 -3
  7. package/dist/components/avatar/index.js +50 -5
  8. package/dist/components/badge/index.js +37 -4
  9. package/dist/components/breadcrumb/index.js +95 -9
  10. package/dist/components/button/index.js +1 -1
  11. package/dist/components/button-group/index.js +74 -6
  12. package/dist/components/card/index.js +66 -8
  13. package/dist/components/checkbox/index.js +30 -3
  14. package/dist/components/collapsible/index.js +33 -7
  15. package/dist/components/context-menu/index.js +208 -17
  16. package/dist/components/dialog/index.js +126 -12
  17. package/dist/components/direction/index.js +10 -2
  18. package/dist/components/drawer/index.js +118 -12
  19. package/dist/components/dropdown/index.js +216 -17
  20. package/dist/components/empty/index.js +95 -9
  21. package/dist/components/field/index.js +211 -13
  22. package/dist/components/hover-card/index.js +35 -5
  23. package/dist/components/input-group/index.d.ts +1 -1
  24. package/dist/components/input-group/index.js +1 -1
  25. package/dist/components/item/index.js +178 -14
  26. package/dist/components/kbd/index.js +27 -4
  27. package/dist/components/label/index.js +21 -3
  28. package/dist/components/menubar/index.js +235 -18
  29. package/dist/components/native-select/index.js +25 -3
  30. package/dist/components/navigation-menu/index.js +161 -11
  31. package/dist/components/popover/index.js +40 -6
  32. package/dist/components/progress/index.js +30 -3
  33. package/dist/components/radio-group/index.js +43 -4
  34. package/dist/components/resizable/index.js +43 -5
  35. package/dist/components/scroll-area/index.js +58 -4
  36. package/dist/components/section/index.js +13 -3
  37. package/dist/components/select/index.js +159 -12
  38. package/dist/components/sheet/index.js +118 -10
  39. package/dist/components/skeleton/index.js +13 -3
  40. package/dist/components/slider/index.js +64 -3
  41. package/dist/components/sonner/index.js +21 -4
  42. package/dist/components/spinner/index.js +19 -3
  43. package/dist/components/switch/index.js +30 -3
  44. package/dist/components/table/index.js +105 -10
  45. package/dist/components/tabs/index.js +63 -6
  46. package/dist/components/toggle/index.js +41 -4
  47. package/dist/components/toggle-group/index.js +80 -4
  48. package/dist/components/tooltip/index.js +51 -6
  49. package/dist/components/typography/index.js +147 -14
  50. package/dist/index.d.ts +1 -0
  51. package/dist/index.js +221 -254
  52. package/package.json +3 -3
  53. package/dist/chunk-25N35Z5M.js +0 -42
  54. package/dist/chunk-2JOT4DV4.js +0 -66
  55. package/dist/chunk-2SBGU5XA.js +0 -233
  56. package/dist/chunk-2UG6OCGA.js +0 -75
  57. package/dist/chunk-3BAO7TAS.js +0 -105
  58. package/dist/chunk-3NQR7JZR.js +0 -128
  59. package/dist/chunk-3QUMCM5K.js +0 -225
  60. package/dist/chunk-3TZXV53R.js +0 -55
  61. package/dist/chunk-3UKWAM5M.js +0 -33
  62. package/dist/chunk-44I6VK3H.js +0 -105
  63. package/dist/chunk-67UXTT4O.js +0 -116
  64. package/dist/chunk-727ACUWN.js +0 -82
  65. package/dist/chunk-76APYFRN.js +0 -29
  66. package/dist/chunk-AJAAMJYH.js +0 -12
  67. package/dist/chunk-B5YCE3UP.js +0 -57
  68. package/dist/chunk-BIFBYERK.js +0 -69
  69. package/dist/chunk-DXZ4GUQO.js +0 -33
  70. package/dist/chunk-ED6T7ZZN.js +0 -130
  71. package/dist/chunk-EEAK2RWF.js +0 -23
  72. package/dist/chunk-F2TEA6ER.js +0 -138
  73. package/dist/chunk-FF5D53KL.js +0 -69
  74. package/dist/chunk-FRIOQFPE.js +0 -171
  75. package/dist/chunk-G2YBCHWR.js +0 -46
  76. package/dist/chunk-GKCBSG2W.js +0 -67
  77. package/dist/chunk-GPEL656S.js +0 -84
  78. package/dist/chunk-JKKCRFYB.js +0 -36
  79. package/dist/chunk-JTSIBZS4.js +0 -194
  80. package/dist/chunk-MCXSVXO4.js +0 -24
  81. package/dist/chunk-MMZJQ7RW.js +0 -33
  82. package/dist/chunk-MYIUX3DT.js +0 -62
  83. package/dist/chunk-P5KEJOBH.js +0 -155
  84. package/dist/chunk-PAO3DSEF.js +0 -48
  85. package/dist/chunk-PLLG76QJ.js +0 -32
  86. package/dist/chunk-SDYKJVXX.js +0 -253
  87. package/dist/chunk-SIQHWNPH.js +0 -45
  88. package/dist/chunk-SKR3J46C.js +0 -17
  89. package/dist/chunk-STRBREHN.js +0 -17
  90. package/dist/chunk-SUEPE6OX.js +0 -47
  91. package/dist/chunk-TA23RNS4.js +0 -162
  92. package/dist/chunk-TRXU4SOJ.js +0 -224
  93. package/dist/chunk-U7JIOR7A.js +0 -172
  94. package/dist/chunk-VPBVKBZ7.js +0 -25
  95. package/dist/chunk-W4XY3SNY.js +0 -40
  96. package/dist/chunk-YT2ZIMZI.js +0 -16
  97. package/dist/components/accordion/index.cjs +0 -104
  98. package/dist/components/accordion/index.d.cts +0 -25
  99. package/dist/components/alert/index.cjs +0 -96
  100. package/dist/components/alert/index.d.cts +0 -28
  101. package/dist/components/alert-dialog/index.cjs +0 -200
  102. package/dist/components/alert-dialog/index.d.cts +0 -42
  103. package/dist/components/aspect-ratio/index.cjs +0 -47
  104. package/dist/components/aspect-ratio/index.d.cts +0 -19
  105. package/dist/components/avatar/index.cjs +0 -92
  106. package/dist/components/avatar/index.d.cts +0 -24
  107. package/dist/components/badge/index.cjs +0 -67
  108. package/dist/components/badge/index.d.cts +0 -24
  109. package/dist/components/breadcrumb/index.cjs +0 -135
  110. package/dist/components/breadcrumb/index.d.cts +0 -33
  111. package/dist/components/button/index.cjs +0 -87
  112. package/dist/components/button/index.d.cts +0 -28
  113. package/dist/components/button-group/index.cjs +0 -142
  114. package/dist/components/button-group/index.d.cts +0 -33
  115. package/dist/components/card/index.cjs +0 -104
  116. package/dist/components/card/index.d.cts +0 -27
  117. package/dist/components/checkbox/index.cjs +0 -68
  118. package/dist/components/checkbox/index.d.cts +0 -17
  119. package/dist/components/collapsible/index.cjs +0 -73
  120. package/dist/components/collapsible/index.d.cts +0 -22
  121. package/dist/components/context-menu/index.cjs +0 -274
  122. package/dist/components/context-menu/index.d.cts +0 -48
  123. package/dist/components/dialog/index.cjs +0 -182
  124. package/dist/components/dialog/index.d.cts +0 -38
  125. package/dist/components/direction/index.cjs +0 -39
  126. package/dist/components/direction/index.d.cts +0 -20
  127. package/dist/components/drawer/index.cjs +0 -164
  128. package/dist/components/drawer/index.d.cts +0 -35
  129. package/dist/components/dropdown/index.cjs +0 -282
  130. package/dist/components/dropdown/index.d.cts +0 -52
  131. package/dist/components/empty/index.cjs +0 -135
  132. package/dist/components/empty/index.d.cts +0 -38
  133. package/dist/components/field/index.cjs +0 -269
  134. package/dist/components/field/index.d.cts +0 -42
  135. package/dist/components/hover-card/index.cjs +0 -77
  136. package/dist/components/hover-card/index.d.cts +0 -22
  137. package/dist/components/input/index.cjs +0 -47
  138. package/dist/components/input/index.d.cts +0 -17
  139. package/dist/components/input-group/index.cjs +0 -270
  140. package/dist/components/input-group/index.d.cts +0 -44
  141. package/dist/components/item/index.cjs +0 -262
  142. package/dist/components/item/index.d.cts +0 -47
  143. package/dist/components/kbd/index.cjs +0 -57
  144. package/dist/components/kbd/index.d.cts +0 -19
  145. package/dist/components/label/index.cjs +0 -59
  146. package/dist/components/label/index.d.cts +0 -16
  147. package/dist/components/menubar/index.cjs +0 -303
  148. package/dist/components/menubar/index.d.cts +0 -49
  149. package/dist/components/native-select/index.cjs +0 -53
  150. package/dist/components/native-select/index.d.cts +0 -19
  151. package/dist/components/navigation-menu/index.cjs +0 -215
  152. package/dist/components/navigation-menu/index.d.cts +0 -37
  153. package/dist/components/popover/index.cjs +0 -84
  154. package/dist/components/popover/index.d.cts +0 -23
  155. package/dist/components/progress/index.cjs +0 -68
  156. package/dist/components/progress/index.d.cts +0 -16
  157. package/dist/components/radio-group/index.cjs +0 -83
  158. package/dist/components/radio-group/index.d.cts +0 -22
  159. package/dist/components/resizable/index.cjs +0 -75
  160. package/dist/components/resizable/index.d.cts +0 -25
  161. package/dist/components/scroll-area/index.cjs +0 -98
  162. package/dist/components/scroll-area/index.d.cts +0 -21
  163. package/dist/components/section/index.cjs +0 -41
  164. package/dist/components/section/index.d.cts +0 -27
  165. package/dist/components/select/index.cjs +0 -215
  166. package/dist/components/select/index.d.cts +0 -36
  167. package/dist/components/separator/index.cjs +0 -63
  168. package/dist/components/separator/index.d.cts +0 -18
  169. package/dist/components/sheet/index.cjs +0 -170
  170. package/dist/components/sheet/index.d.cts +0 -31
  171. package/dist/components/skeleton/index.cjs +0 -41
  172. package/dist/components/skeleton/index.d.cts +0 -14
  173. package/dist/components/slider/index.cjs +0 -102
  174. package/dist/components/slider/index.d.cts +0 -19
  175. package/dist/components/sonner/index.cjs +0 -51
  176. package/dist/components/sonner/index.d.cts +0 -18
  177. package/dist/components/spinner/index.cjs +0 -47
  178. package/dist/components/spinner/index.d.cts +0 -17
  179. package/dist/components/switch/index.cjs +0 -68
  180. package/dist/components/switch/index.d.cts +0 -17
  181. package/dist/components/table/index.cjs +0 -147
  182. package/dist/components/table/index.d.cts +0 -35
  183. package/dist/components/tabs/index.cjs +0 -107
  184. package/dist/components/tabs/index.d.cts +0 -27
  185. package/dist/components/textarea/index.cjs +0 -44
  186. package/dist/components/textarea/index.d.cts +0 -15
  187. package/dist/components/toggle/index.cjs +0 -81
  188. package/dist/components/toggle/index.d.cts +0 -26
  189. package/dist/components/toggle-group/index.cjs +0 -120
  190. package/dist/components/toggle-group/index.d.cts +0 -27
  191. package/dist/components/tooltip/index.cjs +0 -95
  192. package/dist/components/tooltip/index.d.cts +0 -25
  193. package/dist/components/typography/index.cjs +0 -197
  194. package/dist/components/typography/index.d.cts +0 -28
  195. package/dist/index.cjs +0 -4094
  196. package/dist/index.d.cts +0 -83
@@ -1,20 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { DirectionProvider as DirectionProvider$1 } from '@radix-ui/react-direction';
3
- export { useDirection } from '@radix-ui/react-direction';
4
- import * as React from 'react';
5
-
6
- /**
7
- * Provides reading direction (`ltr`/`rtl`) to all descendant Radix
8
- * primitives via context. Wrap your app (or a subtree) to control layout
9
- * direction; read the current value with the re-exported {@link useDirection}.
10
- *
11
- * @example
12
- * ```tsx
13
- * <DirectionProvider dir="rtl">
14
- * <App />
15
- * </DirectionProvider>
16
- * ```
17
- */
18
- declare function DirectionProvider({ ...props }: React.ComponentProps<typeof DirectionProvider$1>): react_jsx_runtime.JSX.Element;
19
-
20
- export { DirectionProvider };
@@ -1,164 +0,0 @@
1
- "use strict";
2
- "use client";
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // src/components/drawer/index.tsx
22
- var drawer_exports = {};
23
- __export(drawer_exports, {
24
- Drawer: () => Drawer,
25
- DrawerClose: () => DrawerClose,
26
- DrawerContent: () => DrawerContent,
27
- DrawerDescription: () => DrawerDescription,
28
- DrawerFooter: () => DrawerFooter,
29
- DrawerHeader: () => DrawerHeader,
30
- DrawerOverlay: () => DrawerOverlay,
31
- DrawerPortal: () => DrawerPortal,
32
- DrawerTitle: () => DrawerTitle,
33
- DrawerTrigger: () => DrawerTrigger
34
- });
35
- module.exports = __toCommonJS(drawer_exports);
36
- var import_utils = require("@foundrykit/utils");
37
- var import_vaul = require("vaul");
38
- var import_jsx_runtime = require("react/jsx-runtime");
39
- function Drawer({
40
- ...props
41
- }) {
42
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_vaul.Drawer.Root, { "data-slot": "drawer", ...props });
43
- }
44
- function DrawerTrigger({
45
- ...props
46
- }) {
47
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_vaul.Drawer.Trigger, { "data-slot": "drawer-trigger", ...props });
48
- }
49
- function DrawerPortal({
50
- ...props
51
- }) {
52
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_vaul.Drawer.Portal, { "data-slot": "drawer-portal", ...props });
53
- }
54
- function DrawerClose({
55
- ...props
56
- }) {
57
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_vaul.Drawer.Close, { "data-slot": "drawer-close", ...props });
58
- }
59
- function DrawerOverlay({
60
- className,
61
- ...props
62
- }) {
63
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
64
- import_vaul.Drawer.Overlay,
65
- {
66
- "data-slot": "drawer-overlay",
67
- className: (0, import_utils.cn)(
68
- "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",
69
- className
70
- ),
71
- ...props
72
- }
73
- );
74
- }
75
- function DrawerContent({
76
- className,
77
- children,
78
- ...props
79
- }) {
80
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DrawerPortal, { children: [
81
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DrawerOverlay, {}),
82
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
83
- import_vaul.Drawer.Content,
84
- {
85
- "data-slot": "drawer-content",
86
- className: (0, import_utils.cn)(
87
- "group/drawer-content bg-background fixed z-50 flex h-auto flex-col",
88
- "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",
89
- "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",
90
- "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",
91
- "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",
92
- className
93
- ),
94
- ...props,
95
- children: [
96
- /* @__PURE__ */ (0, import_jsx_runtime.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" }),
97
- children
98
- ]
99
- }
100
- )
101
- ] });
102
- }
103
- function DrawerHeader({ className, ...props }) {
104
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
105
- "div",
106
- {
107
- "data-slot": "drawer-header",
108
- className: (0, import_utils.cn)(
109
- "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",
110
- className
111
- ),
112
- ...props
113
- }
114
- );
115
- }
116
- function DrawerFooter({ className, ...props }) {
117
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
118
- "div",
119
- {
120
- "data-slot": "drawer-footer",
121
- className: (0, import_utils.cn)("mt-auto flex flex-col gap-2 p-4", className),
122
- ...props
123
- }
124
- );
125
- }
126
- function DrawerTitle({
127
- className,
128
- ...props
129
- }) {
130
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
131
- import_vaul.Drawer.Title,
132
- {
133
- "data-slot": "drawer-title",
134
- className: (0, import_utils.cn)("text-foreground font-semibold", className),
135
- ...props
136
- }
137
- );
138
- }
139
- function DrawerDescription({
140
- className,
141
- ...props
142
- }) {
143
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
144
- import_vaul.Drawer.Description,
145
- {
146
- "data-slot": "drawer-description",
147
- className: (0, import_utils.cn)("text-muted-foreground text-sm", className),
148
- ...props
149
- }
150
- );
151
- }
152
- // Annotate the CommonJS export names for ESM import in node:
153
- 0 && (module.exports = {
154
- Drawer,
155
- DrawerClose,
156
- DrawerContent,
157
- DrawerDescription,
158
- DrawerFooter,
159
- DrawerHeader,
160
- DrawerOverlay,
161
- DrawerPortal,
162
- DrawerTitle,
163
- DrawerTrigger
164
- });
@@ -1,35 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as React from 'react';
3
- import { Drawer as Drawer$1 } from 'vaul';
4
-
5
- /**
6
- * Drawer built on `vaul` for touch-friendly, swipe-dismissable panels that
7
- * slide in from any edge. Compose with {@link DrawerTrigger},
8
- * {@link DrawerContent}, {@link DrawerHeader}, {@link DrawerTitle},
9
- * {@link DrawerDescription} and {@link DrawerFooter}.
10
- *
11
- * @example
12
- * ```tsx
13
- * <Drawer>
14
- * <DrawerTrigger>Open</DrawerTrigger>
15
- * <DrawerContent>
16
- * <DrawerHeader>
17
- * <DrawerTitle>Are you sure?</DrawerTitle>
18
- * <DrawerDescription>This cannot be undone.</DrawerDescription>
19
- * </DrawerHeader>
20
- * </DrawerContent>
21
- * </Drawer>
22
- * ```
23
- */
24
- declare function Drawer({ ...props }: React.ComponentProps<typeof Drawer$1.Root>): react_jsx_runtime.JSX.Element;
25
- declare function DrawerTrigger({ ...props }: React.ComponentProps<typeof Drawer$1.Trigger>): react_jsx_runtime.JSX.Element;
26
- declare function DrawerPortal({ ...props }: React.ComponentProps<typeof Drawer$1.Portal>): react_jsx_runtime.JSX.Element;
27
- declare function DrawerClose({ ...props }: React.ComponentProps<typeof Drawer$1.Close>): react_jsx_runtime.JSX.Element;
28
- declare function DrawerOverlay({ className, ...props }: React.ComponentProps<typeof Drawer$1.Overlay>): react_jsx_runtime.JSX.Element;
29
- declare function DrawerContent({ className, children, ...props }: React.ComponentProps<typeof Drawer$1.Content>): react_jsx_runtime.JSX.Element;
30
- declare function DrawerHeader({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
31
- declare function DrawerFooter({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
32
- declare function DrawerTitle({ className, ...props }: React.ComponentProps<typeof Drawer$1.Title>): react_jsx_runtime.JSX.Element;
33
- declare function DrawerDescription({ className, ...props }: React.ComponentProps<typeof Drawer$1.Description>): react_jsx_runtime.JSX.Element;
34
-
35
- export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger };
@@ -1,282 +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/dropdown/index.tsx
32
- var dropdown_exports = {};
33
- __export(dropdown_exports, {
34
- DropdownMenu: () => DropdownMenu,
35
- DropdownMenuCheckboxItem: () => DropdownMenuCheckboxItem,
36
- DropdownMenuContent: () => DropdownMenuContent,
37
- DropdownMenuGroup: () => DropdownMenuGroup,
38
- DropdownMenuItem: () => DropdownMenuItem,
39
- DropdownMenuLabel: () => DropdownMenuLabel,
40
- DropdownMenuPortal: () => DropdownMenuPortal,
41
- DropdownMenuRadioGroup: () => DropdownMenuRadioGroup,
42
- DropdownMenuRadioItem: () => DropdownMenuRadioItem,
43
- DropdownMenuSeparator: () => DropdownMenuSeparator,
44
- DropdownMenuShortcut: () => DropdownMenuShortcut,
45
- DropdownMenuSub: () => DropdownMenuSub,
46
- DropdownMenuSubContent: () => DropdownMenuSubContent,
47
- DropdownMenuSubTrigger: () => DropdownMenuSubTrigger,
48
- DropdownMenuTrigger: () => DropdownMenuTrigger
49
- });
50
- module.exports = __toCommonJS(dropdown_exports);
51
- var import_utils = require("@foundrykit/utils");
52
- var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
53
- var import_lucide_react = require("lucide-react");
54
- var import_jsx_runtime = require("react/jsx-runtime");
55
- function DropdownMenu({
56
- ...props
57
- }) {
58
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
59
- }
60
- function DropdownMenuPortal({
61
- ...props
62
- }) {
63
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownMenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", ...props });
64
- }
65
- function DropdownMenuTrigger({
66
- ...props
67
- }) {
68
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
69
- DropdownMenuPrimitive.Trigger,
70
- {
71
- "data-slot": "dropdown-menu-trigger",
72
- ...props
73
- }
74
- );
75
- }
76
- function DropdownMenuContent({
77
- className,
78
- sideOffset = 4,
79
- ...props
80
- }) {
81
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
82
- DropdownMenuPrimitive.Content,
83
- {
84
- "data-slot": "dropdown-menu-content",
85
- sideOffset,
86
- className: (0, import_utils.cn)(
87
- "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-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
88
- className
89
- ),
90
- ...props
91
- }
92
- ) });
93
- }
94
- function DropdownMenuGroup({
95
- ...props
96
- }) {
97
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
98
- }
99
- function DropdownMenuItem({
100
- className,
101
- inset,
102
- variant = "default",
103
- ...props
104
- }) {
105
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
106
- DropdownMenuPrimitive.Item,
107
- {
108
- "data-slot": "dropdown-menu-item",
109
- "data-inset": inset,
110
- "data-variant": variant,
111
- className: (0, import_utils.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 DropdownMenuCheckboxItem({
120
- className,
121
- children,
122
- checked,
123
- ...props
124
- }) {
125
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
126
- DropdownMenuPrimitive.CheckboxItem,
127
- {
128
- "data-slot": "dropdown-menu-checkbox-item",
129
- className: (0, import_utils.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__ */ (0, import_jsx_runtime.jsx)("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.CheckIcon, { className: "size-4" }) }) }),
137
- children
138
- ]
139
- }
140
- );
141
- }
142
- function DropdownMenuRadioGroup({
143
- ...props
144
- }) {
145
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
146
- DropdownMenuPrimitive.RadioGroup,
147
- {
148
- "data-slot": "dropdown-menu-radio-group",
149
- ...props
150
- }
151
- );
152
- }
153
- function DropdownMenuRadioItem({
154
- className,
155
- children,
156
- ...props
157
- }) {
158
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
159
- DropdownMenuPrimitive.RadioItem,
160
- {
161
- "data-slot": "dropdown-menu-radio-item",
162
- className: (0, import_utils.cn)(
163
- "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",
164
- className
165
- ),
166
- ...props,
167
- children: [
168
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.CircleIcon, { className: "size-2 fill-current" }) }) }),
169
- children
170
- ]
171
- }
172
- );
173
- }
174
- function DropdownMenuLabel({
175
- className,
176
- inset,
177
- ...props
178
- }) {
179
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
180
- DropdownMenuPrimitive.Label,
181
- {
182
- "data-slot": "dropdown-menu-label",
183
- "data-inset": inset,
184
- className: (0, import_utils.cn)(
185
- "px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
186
- className
187
- ),
188
- ...props
189
- }
190
- );
191
- }
192
- function DropdownMenuSeparator({
193
- className,
194
- ...props
195
- }) {
196
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
197
- DropdownMenuPrimitive.Separator,
198
- {
199
- "data-slot": "dropdown-menu-separator",
200
- className: (0, import_utils.cn)("bg-border -mx-1 my-1 h-px", className),
201
- ...props
202
- }
203
- );
204
- }
205
- function DropdownMenuShortcut({
206
- className,
207
- ...props
208
- }) {
209
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
210
- "span",
211
- {
212
- "data-slot": "dropdown-menu-shortcut",
213
- className: (0, import_utils.cn)(
214
- "text-muted-foreground ml-auto text-xs tracking-widest",
215
- className
216
- ),
217
- ...props
218
- }
219
- );
220
- }
221
- function DropdownMenuSub({
222
- ...props
223
- }) {
224
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
225
- }
226
- function DropdownMenuSubTrigger({
227
- className,
228
- inset,
229
- children,
230
- ...props
231
- }) {
232
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
233
- DropdownMenuPrimitive.SubTrigger,
234
- {
235
- "data-slot": "dropdown-menu-sub-trigger",
236
- "data-inset": inset,
237
- className: (0, import_utils.cn)(
238
- "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",
239
- className
240
- ),
241
- ...props,
242
- children: [
243
- children,
244
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ChevronRightIcon, { className: "ml-auto size-4" })
245
- ]
246
- }
247
- );
248
- }
249
- function DropdownMenuSubContent({
250
- className,
251
- ...props
252
- }) {
253
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
254
- DropdownMenuPrimitive.SubContent,
255
- {
256
- "data-slot": "dropdown-menu-sub-content",
257
- className: (0, import_utils.cn)(
258
- "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-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
259
- className
260
- ),
261
- ...props
262
- }
263
- );
264
- }
265
- // Annotate the CommonJS export names for ESM import in node:
266
- 0 && (module.exports = {
267
- DropdownMenu,
268
- DropdownMenuCheckboxItem,
269
- DropdownMenuContent,
270
- DropdownMenuGroup,
271
- DropdownMenuItem,
272
- DropdownMenuLabel,
273
- DropdownMenuPortal,
274
- DropdownMenuRadioGroup,
275
- DropdownMenuRadioItem,
276
- DropdownMenuSeparator,
277
- DropdownMenuShortcut,
278
- DropdownMenuSub,
279
- DropdownMenuSubContent,
280
- DropdownMenuSubTrigger,
281
- DropdownMenuTrigger
282
- });
@@ -1,52 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
3
- import * as React from 'react';
4
-
5
- /**
6
- * Dropdown menu root built on Radix `DropdownMenu.Root`. Compose with
7
- * {@link DropdownMenuTrigger}, {@link DropdownMenuContent} and items such as
8
- * {@link DropdownMenuItem}, {@link DropdownMenuCheckboxItem},
9
- * {@link DropdownMenuRadioItem}, {@link DropdownMenuLabel},
10
- * {@link DropdownMenuSeparator}, {@link DropdownMenuShortcut} and submenus
11
- * ({@link DropdownMenuSub}, {@link DropdownMenuSubTrigger},
12
- * {@link DropdownMenuSubContent}).
13
- *
14
- * @example
15
- * ```tsx
16
- * <DropdownMenu>
17
- * <DropdownMenuTrigger>Open</DropdownMenuTrigger>
18
- * <DropdownMenuContent>
19
- * <DropdownMenuItem>Edit</DropdownMenuItem>
20
- * <DropdownMenuItem variant="destructive">Delete</DropdownMenuItem>
21
- * </DropdownMenuContent>
22
- * </DropdownMenu>
23
- * ```
24
- */
25
- declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): react_jsx_runtime.JSX.Element;
26
- declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): react_jsx_runtime.JSX.Element;
27
- declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
28
- declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): react_jsx_runtime.JSX.Element;
29
- declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): react_jsx_runtime.JSX.Element;
30
- /**
31
- * Selectable menu item. Use `variant="destructive"` for dangerous actions and
32
- * `inset` to align text with items that have leading icons.
33
- */
34
- declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
35
- inset?: boolean;
36
- variant?: 'default' | 'destructive';
37
- }): react_jsx_runtime.JSX.Element;
38
- declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): react_jsx_runtime.JSX.Element;
39
- declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): react_jsx_runtime.JSX.Element;
40
- declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): react_jsx_runtime.JSX.Element;
41
- declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
42
- inset?: boolean;
43
- }): react_jsx_runtime.JSX.Element;
44
- declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): react_jsx_runtime.JSX.Element;
45
- declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>): react_jsx_runtime.JSX.Element;
46
- declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): react_jsx_runtime.JSX.Element;
47
- declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
48
- inset?: boolean;
49
- }): react_jsx_runtime.JSX.Element;
50
- declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): react_jsx_runtime.JSX.Element;
51
-
52
- export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
@@ -1,135 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/components/empty/index.tsx
21
- var empty_exports = {};
22
- __export(empty_exports, {
23
- Empty: () => Empty,
24
- EmptyContent: () => EmptyContent,
25
- EmptyDescription: () => EmptyDescription,
26
- EmptyHeader: () => EmptyHeader,
27
- EmptyMedia: () => EmptyMedia,
28
- EmptyTitle: () => EmptyTitle,
29
- emptyMediaVariants: () => emptyMediaVariants
30
- });
31
- module.exports = __toCommonJS(empty_exports);
32
- var import_utils = require("@foundrykit/utils");
33
- var import_class_variance_authority = require("class-variance-authority");
34
- var import_jsx_runtime = require("react/jsx-runtime");
35
- function Empty({ className, ...props }) {
36
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
37
- "div",
38
- {
39
- "data-slot": "empty",
40
- className: (0, import_utils.cn)(
41
- "flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12",
42
- className
43
- ),
44
- ...props
45
- }
46
- );
47
- }
48
- function EmptyHeader({ className, ...props }) {
49
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
50
- "div",
51
- {
52
- "data-slot": "empty-header",
53
- className: (0, import_utils.cn)(
54
- "flex max-w-sm flex-col items-center gap-2 text-center",
55
- className
56
- ),
57
- ...props
58
- }
59
- );
60
- }
61
- var emptyMediaVariants = (0, import_class_variance_authority.cva)(
62
- "mb-2 flex shrink-0 items-center justify-center [&_svg:not([class*=size-])]:size-6",
63
- {
64
- variants: {
65
- variant: {
66
- default: "bg-transparent",
67
- icon: "bg-muted text-foreground flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*=size-])]:size-6"
68
- }
69
- },
70
- defaultVariants: {
71
- variant: "default"
72
- }
73
- }
74
- );
75
- function EmptyMedia({
76
- className,
77
- variant,
78
- ...props
79
- }) {
80
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
81
- "div",
82
- {
83
- "data-slot": "empty-media",
84
- "data-variant": variant,
85
- className: (0, import_utils.cn)(emptyMediaVariants({ variant }), className),
86
- ...props
87
- }
88
- );
89
- }
90
- function EmptyTitle({ className, ...props }) {
91
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
92
- "div",
93
- {
94
- "data-slot": "empty-title",
95
- className: (0, import_utils.cn)("text-lg font-medium tracking-tight", className),
96
- ...props
97
- }
98
- );
99
- }
100
- function EmptyDescription({ className, ...props }) {
101
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
102
- "p",
103
- {
104
- "data-slot": "empty-description",
105
- className: (0, import_utils.cn)(
106
- "text-muted-foreground [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4",
107
- className
108
- ),
109
- ...props
110
- }
111
- );
112
- }
113
- function EmptyContent({ className, ...props }) {
114
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
115
- "div",
116
- {
117
- "data-slot": "empty-content",
118
- className: (0, import_utils.cn)(
119
- "flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance",
120
- className
121
- ),
122
- ...props
123
- }
124
- );
125
- }
126
- // Annotate the CommonJS export names for ESM import in node:
127
- 0 && (module.exports = {
128
- Empty,
129
- EmptyContent,
130
- EmptyDescription,
131
- EmptyHeader,
132
- EmptyMedia,
133
- EmptyTitle,
134
- emptyMediaVariants
135
- });