@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,98 +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/scroll-area/index.tsx
32
- var scroll_area_exports = {};
33
- __export(scroll_area_exports, {
34
- ScrollArea: () => ScrollArea,
35
- ScrollBar: () => ScrollBar
36
- });
37
- module.exports = __toCommonJS(scroll_area_exports);
38
- var import_utils = require("@foundrykit/utils");
39
- var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"), 1);
40
- var import_jsx_runtime = require("react/jsx-runtime");
41
- function ScrollArea({
42
- className,
43
- children,
44
- ...props
45
- }) {
46
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
47
- ScrollAreaPrimitive.Root,
48
- {
49
- "data-slot": "scroll-area",
50
- className: (0, import_utils.cn)("relative", className),
51
- ...props,
52
- children: [
53
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
54
- ScrollAreaPrimitive.Viewport,
55
- {
56
- "data-slot": "scroll-area-viewport",
57
- className: "focus-visible:ring-ring/50 size-full h-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
58
- children
59
- }
60
- ),
61
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScrollBar, {}),
62
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScrollAreaPrimitive.Corner, {})
63
- ]
64
- }
65
- );
66
- }
67
- function ScrollBar({
68
- className,
69
- orientation = "vertical",
70
- ...props
71
- }) {
72
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
73
- ScrollAreaPrimitive.ScrollAreaScrollbar,
74
- {
75
- "data-slot": "scroll-area-scrollbar",
76
- orientation,
77
- className: (0, import_utils.cn)(
78
- "flex touch-none p-px transition-colors select-none",
79
- orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
80
- orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
81
- className
82
- ),
83
- ...props,
84
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
85
- ScrollAreaPrimitive.ScrollAreaThumb,
86
- {
87
- "data-slot": "scroll-area-thumb",
88
- className: "bg-border relative flex-1 rounded-full"
89
- }
90
- )
91
- }
92
- );
93
- }
94
- // Annotate the CommonJS export names for ESM import in node:
95
- 0 && (module.exports = {
96
- ScrollArea,
97
- ScrollBar
98
- });
@@ -1,21 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
3
- import * as React from 'react';
4
-
5
- /**
6
- * Scrollable region with custom cross-browser scrollbars, built on Radix
7
- * `ScrollArea.Root`. Wraps children in a viewport and renders a {@link ScrollBar}
8
- * (vertical by default) plus a corner.
9
- *
10
- * @example
11
- * ```tsx
12
- * <ScrollArea className="h-72">
13
- * {items.map((i) => <div key={i}>{i}</div>)}
14
- * </ScrollArea>
15
- * ```
16
- */
17
- declare function ScrollArea({ className, children, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>): react_jsx_runtime.JSX.Element;
18
- /** Custom scrollbar for a {@link ScrollArea}; `orientation` may be `vertical` or `horizontal`. */
19
- declare function ScrollBar({ className, orientation, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): react_jsx_runtime.JSX.Element;
20
-
21
- export { ScrollArea, ScrollBar };
@@ -1,41 +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/section/index.tsx
21
- var section_exports = {};
22
- __export(section_exports, {
23
- Section: () => Section
24
- });
25
- module.exports = __toCommonJS(section_exports);
26
- var import_jsx_runtime = require("react/jsx-runtime");
27
- function Section({ theme, className, ...props }) {
28
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
29
- "section",
30
- {
31
- "data-slot": "section",
32
- "data-section-theme": theme && theme !== "default" ? theme : void 0,
33
- className: ["py-12 md:py-20", className].filter(Boolean).join(" "),
34
- ...props
35
- }
36
- );
37
- }
38
- // Annotate the CommonJS export names for ESM import in node:
39
- 0 && (module.exports = {
40
- Section
41
- });
@@ -1,27 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as React from 'react';
3
-
4
- /** Section themes @foundrykit/tailwind ships; a site can add its own names. */
5
- type SectionTheme = 'default' | 'light' | 'dark' | 'brand' | 'muted' | (string & {});
6
- interface SectionProps extends React.ComponentProps<'section'> {
7
- /**
8
- * Sets `data-section-theme`, which sets the `--section-*` tokens and points
9
- * the semantic colours (background, foreground, primary…) at them, so the
10
- * primitives inside follow. `default` (or none) inherits the page.
11
- */
12
- theme?: SectionTheme | null;
13
- }
14
- /**
15
- * A page section with a colour theme. Name it with `aria-labelledby` (its
16
- * heading's id) so assistive tech lists it as a region landmark.
17
- *
18
- * @example
19
- * ```tsx
20
- * <Section theme='dark' aria-labelledby='faq-heading'>
21
- * <h2 id='faq-heading'>Questions</h2>
22
- * </Section>
23
- * ```
24
- */
25
- declare function Section({ theme, className, ...props }: SectionProps): react_jsx_runtime.JSX.Element;
26
-
27
- export { Section, type SectionProps, type SectionTheme };
@@ -1,215 +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/select/index.tsx
32
- var select_exports = {};
33
- __export(select_exports, {
34
- Select: () => Select,
35
- SelectContent: () => SelectContent,
36
- SelectGroup: () => SelectGroup,
37
- SelectItem: () => SelectItem,
38
- SelectLabel: () => SelectLabel,
39
- SelectScrollDownButton: () => SelectScrollDownButton,
40
- SelectScrollUpButton: () => SelectScrollUpButton,
41
- SelectSeparator: () => SelectSeparator,
42
- SelectTrigger: () => SelectTrigger,
43
- SelectValue: () => SelectValue
44
- });
45
- module.exports = __toCommonJS(select_exports);
46
- var import_utils = require("@foundrykit/utils");
47
- var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
48
- var import_lucide_react = require("lucide-react");
49
- var import_jsx_runtime = require("react/jsx-runtime");
50
- function Select({
51
- ...props
52
- }) {
53
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectPrimitive.Root, { "data-slot": "select", ...props });
54
- }
55
- function SelectGroup({
56
- ...props
57
- }) {
58
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
59
- }
60
- function SelectValue({
61
- ...props
62
- }) {
63
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
64
- }
65
- function SelectTrigger({
66
- className,
67
- size = "default",
68
- children,
69
- ...props
70
- }) {
71
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
72
- SelectPrimitive.Trigger,
73
- {
74
- "data-slot": "select-trigger",
75
- "data-size": size,
76
- className: (0, import_utils.cn)(
77
- "border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
78
- className
79
- ),
80
- ...props,
81
- children: [
82
- children,
83
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ChevronDownIcon, { className: "size-4 opacity-50" }) })
84
- ]
85
- }
86
- );
87
- }
88
- function SelectContent({
89
- className,
90
- children,
91
- position = "popper",
92
- ...props
93
- }) {
94
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
95
- SelectPrimitive.Content,
96
- {
97
- "data-slot": "select-content",
98
- className: (0, import_utils.cn)(
99
- "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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
100
- position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
101
- className
102
- ),
103
- position,
104
- ...props,
105
- children: [
106
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectScrollUpButton, {}),
107
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
108
- SelectPrimitive.Viewport,
109
- {
110
- className: (0, import_utils.cn)(
111
- "p-1",
112
- position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
113
- ),
114
- children
115
- }
116
- ),
117
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectScrollDownButton, {})
118
- ]
119
- }
120
- ) });
121
- }
122
- function SelectLabel({
123
- className,
124
- ...props
125
- }) {
126
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
127
- SelectPrimitive.Label,
128
- {
129
- "data-slot": "select-label",
130
- className: (0, import_utils.cn)("text-muted-foreground px-2 py-1.5 text-xs", className),
131
- ...props
132
- }
133
- );
134
- }
135
- function SelectItem({
136
- className,
137
- children,
138
- ...props
139
- }) {
140
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
141
- SelectPrimitive.Item,
142
- {
143
- "data-slot": "select-item",
144
- className: (0, import_utils.cn)(
145
- "focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 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 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
146
- className
147
- ),
148
- ...props,
149
- children: [
150
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.CheckIcon, { className: "size-4" }) }) }),
151
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectPrimitive.ItemText, { children })
152
- ]
153
- }
154
- );
155
- }
156
- function SelectSeparator({
157
- className,
158
- ...props
159
- }) {
160
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
161
- SelectPrimitive.Separator,
162
- {
163
- "data-slot": "select-separator",
164
- className: (0, import_utils.cn)("bg-border pointer-events-none -mx-1 my-1 h-px", className),
165
- ...props
166
- }
167
- );
168
- }
169
- function SelectScrollUpButton({
170
- className,
171
- ...props
172
- }) {
173
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
174
- SelectPrimitive.ScrollUpButton,
175
- {
176
- "data-slot": "select-scroll-up-button",
177
- className: (0, import_utils.cn)(
178
- "flex cursor-default items-center justify-center py-1",
179
- className
180
- ),
181
- ...props,
182
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ChevronUpIcon, { className: "size-4" })
183
- }
184
- );
185
- }
186
- function SelectScrollDownButton({
187
- className,
188
- ...props
189
- }) {
190
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
191
- SelectPrimitive.ScrollDownButton,
192
- {
193
- "data-slot": "select-scroll-down-button",
194
- className: (0, import_utils.cn)(
195
- "flex cursor-default items-center justify-center py-1",
196
- className
197
- ),
198
- ...props,
199
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ChevronDownIcon, { className: "size-4" })
200
- }
201
- );
202
- }
203
- // Annotate the CommonJS export names for ESM import in node:
204
- 0 && (module.exports = {
205
- Select,
206
- SelectContent,
207
- SelectGroup,
208
- SelectItem,
209
- SelectLabel,
210
- SelectScrollDownButton,
211
- SelectScrollUpButton,
212
- SelectSeparator,
213
- SelectTrigger,
214
- SelectValue
215
- });
@@ -1,36 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as SelectPrimitive from '@radix-ui/react-select';
3
- import * as React from 'react';
4
-
5
- /**
6
- * Select (listbox) root built on Radix `Select.Root`. Compose with
7
- * {@link SelectTrigger} + {@link SelectValue}, {@link SelectContent} and options
8
- * ({@link SelectItem}, {@link SelectGroup}, {@link SelectLabel},
9
- * {@link SelectSeparator}); scroll buttons are included automatically.
10
- *
11
- * @example
12
- * ```tsx
13
- * <Select value={v} onValueChange={setV}>
14
- * <SelectTrigger><SelectValue placeholder="Pick" /></SelectTrigger>
15
- * <SelectContent>
16
- * <SelectItem value="a">A</SelectItem>
17
- * </SelectContent>
18
- * </Select>
19
- * ```
20
- */
21
- declare function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>): react_jsx_runtime.JSX.Element;
22
- declare function SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>): react_jsx_runtime.JSX.Element;
23
- declare function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>): react_jsx_runtime.JSX.Element;
24
- /** Trigger button that opens the select and shows the current {@link SelectValue}; `size` may be `sm` or `default`. */
25
- declare function SelectTrigger({ className, size, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
26
- size?: 'sm' | 'default';
27
- }): react_jsx_runtime.JSX.Element;
28
- /** Portalled, animated listbox panel holding the options; defaults to `position="popper"`. */
29
- declare function SelectContent({ className, children, position, ...props }: React.ComponentProps<typeof SelectPrimitive.Content>): react_jsx_runtime.JSX.Element;
30
- declare function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>): react_jsx_runtime.JSX.Element;
31
- declare function SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>): react_jsx_runtime.JSX.Element;
32
- declare function SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>): react_jsx_runtime.JSX.Element;
33
- declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): react_jsx_runtime.JSX.Element;
34
- declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): react_jsx_runtime.JSX.Element;
35
-
36
- export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
@@ -1,63 +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/separator/index.tsx
32
- var separator_exports = {};
33
- __export(separator_exports, {
34
- Separator: () => Separator
35
- });
36
- module.exports = __toCommonJS(separator_exports);
37
- var import_utils = require("@foundrykit/utils");
38
- var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
39
- var import_jsx_runtime = require("react/jsx-runtime");
40
- function Separator({
41
- className,
42
- orientation = "horizontal",
43
- decorative = true,
44
- ...props
45
- }) {
46
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
47
- SeparatorPrimitive.Root,
48
- {
49
- "data-slot": "separator",
50
- decorative,
51
- orientation,
52
- className: (0, import_utils.cn)(
53
- "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
54
- className
55
- ),
56
- ...props
57
- }
58
- );
59
- }
60
- // Annotate the CommonJS export names for ESM import in node:
61
- 0 && (module.exports = {
62
- Separator
63
- });
@@ -1,18 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as SeparatorPrimitive from '@radix-ui/react-separator';
3
- import * as React from 'react';
4
-
5
- /**
6
- * Thin dividing line built on Radix `Separator.Root`. `orientation` may be
7
- * `horizontal` (default) or `vertical`; `decorative` (default `true`) hides it
8
- * from assistive tech.
9
- *
10
- * @example
11
- * ```tsx
12
- * <Separator />
13
- * <Separator orientation="vertical" />
14
- * ```
15
- */
16
- declare function Separator({ className, orientation, decorative, ...props }: React.ComponentProps<typeof SeparatorPrimitive.Root>): react_jsx_runtime.JSX.Element;
17
-
18
- export { Separator };