@hex-core/components 1.3.1 → 1.4.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 (186) hide show
  1. package/README.md +183 -9
  2. package/dist/accordion.d.ts +13 -0
  3. package/dist/accordion.js +62 -0
  4. package/dist/accordion.js.map +1 -0
  5. package/dist/alert-dialog.d.ts +34 -0
  6. package/dist/alert-dialog.js +125 -0
  7. package/dist/alert-dialog.js.map +1 -0
  8. package/dist/alert.d.ts +17 -0
  9. package/dist/alert.js +54 -0
  10. package/dist/alert.js.map +1 -0
  11. package/dist/aspect-ratio.d.ts +7 -0
  12. package/dist/aspect-ratio.js +8 -0
  13. package/dist/aspect-ratio.js.map +1 -0
  14. package/dist/avatar.d.ts +11 -0
  15. package/dist/avatar.js +44 -0
  16. package/dist/avatar.js.map +1 -0
  17. package/dist/badge.d.ts +22 -0
  18. package/dist/badge.js +36 -0
  19. package/dist/badge.js.map +1 -0
  20. package/dist/breadcrumb.d.ts +27 -0
  21. package/dist/breadcrumb.js +120 -0
  22. package/dist/breadcrumb.js.map +1 -0
  23. package/dist/button-variants-Bx6gCUFp.d.ts +19 -0
  24. package/dist/button.d.ts +13 -0
  25. package/dist/button.js +113 -0
  26. package/dist/button.js.map +1 -0
  27. package/dist/calendar.d.ts +17 -0
  28. package/dist/calendar.js +126 -0
  29. package/dist/calendar.js.map +1 -0
  30. package/dist/card.d.ts +16 -0
  31. package/dist/card.js +68 -0
  32. package/dist/card.js.map +1 -0
  33. package/dist/checkbox.d.ts +11 -0
  34. package/dist/checkbox.js +65 -0
  35. package/dist/checkbox.js.map +1 -0
  36. package/dist/cluster.d.ts +34 -0
  37. package/dist/cluster.js +50 -0
  38. package/dist/cluster.js.map +1 -0
  39. package/dist/collapsible.d.ts +11 -0
  40. package/dist/collapsible.js +10 -0
  41. package/dist/collapsible.js.map +1 -0
  42. package/dist/color-picker.d.ts +44 -0
  43. package/dist/color-picker.js +321 -0
  44. package/dist/color-picker.js.map +1 -0
  45. package/dist/combobox.d.ts +45 -0
  46. package/dist/combobox.js +226 -0
  47. package/dist/combobox.js.map +1 -0
  48. package/dist/command.d.ts +111 -0
  49. package/dist/command.js +232 -0
  50. package/dist/command.js.map +1 -0
  51. package/dist/container.d.ts +41 -0
  52. package/dist/container.js +39 -0
  53. package/dist/container.js.map +1 -0
  54. package/dist/context-menu.d.ts +37 -0
  55. package/dist/context-menu.js +130 -0
  56. package/dist/context-menu.js.map +1 -0
  57. package/dist/data-table.d.ts +33 -0
  58. package/dist/data-table.js +103 -0
  59. package/dist/data-table.js.map +1 -0
  60. package/dist/date-picker.d.ts +43 -0
  61. package/dist/date-picker.js +221 -0
  62. package/dist/date-picker.js.map +1 -0
  63. package/dist/dialog.d.ts +46 -0
  64. package/dist/dialog.js +125 -0
  65. package/dist/dialog.js.map +1 -0
  66. package/dist/drawer.d.ts +41 -0
  67. package/dist/drawer.js +82 -0
  68. package/dist/drawer.js.map +1 -0
  69. package/dist/dropdown-menu.d.ts +39 -0
  70. package/dist/dropdown-menu.js +133 -0
  71. package/dist/dropdown-menu.js.map +1 -0
  72. package/dist/dropzone.d.ts +54 -0
  73. package/dist/dropzone.js +194 -0
  74. package/dist/dropzone.js.map +1 -0
  75. package/dist/file-tree.d.ts +53 -0
  76. package/dist/file-tree.js +322 -0
  77. package/dist/file-tree.js.map +1 -0
  78. package/dist/form.d.ts +45 -0
  79. package/dist/form.js +114 -0
  80. package/dist/form.js.map +1 -0
  81. package/dist/grid.d.ts +50 -0
  82. package/dist/grid.js +58 -0
  83. package/dist/grid.js.map +1 -0
  84. package/dist/hover-card.d.ts +11 -0
  85. package/dist/hover-card.js +34 -0
  86. package/dist/hover-card.js.map +1 -0
  87. package/dist/index.d.ts +98 -1571
  88. package/dist/index.js +527 -5536
  89. package/dist/index.js.map +1 -1
  90. package/dist/input-otp.d.ts +19 -0
  91. package/dist/input-otp.js +71 -0
  92. package/dist/input-otp.js.map +1 -0
  93. package/dist/input.d.ts +6 -0
  94. package/dist/input.js +40 -0
  95. package/dist/input.js.map +1 -0
  96. package/dist/label.d.ts +11 -0
  97. package/dist/label.js +22 -0
  98. package/dist/label.js.map +1 -0
  99. package/dist/menubar.d.ts +35 -0
  100. package/dist/menubar.js +106 -0
  101. package/dist/menubar.js.map +1 -0
  102. package/dist/multi-combobox.d.ts +51 -0
  103. package/dist/multi-combobox.js +258 -0
  104. package/dist/multi-combobox.js.map +1 -0
  105. package/dist/navigation-menu.d.ts +23 -0
  106. package/dist/navigation-menu.js +108 -0
  107. package/dist/navigation-menu.js.map +1 -0
  108. package/dist/pagination.d.ts +40 -0
  109. package/dist/pagination.js +195 -0
  110. package/dist/pagination.js.map +1 -0
  111. package/dist/popover.d.ts +13 -0
  112. package/dist/popover.js +35 -0
  113. package/dist/popover.js.map +1 -0
  114. package/dist/progress.d.ts +10 -0
  115. package/dist/progress.js +38 -0
  116. package/dist/progress.js.map +1 -0
  117. package/dist/radio-group.d.ts +9 -0
  118. package/dist/radio-group.js +44 -0
  119. package/dist/radio-group.js.map +1 -0
  120. package/dist/resizable.d.ts +28 -0
  121. package/dist/resizable.js +66 -0
  122. package/dist/resizable.js.map +1 -0
  123. package/dist/schemas.d.ts +121 -0
  124. package/dist/schemas.js +4643 -0
  125. package/dist/schemas.js.map +1 -0
  126. package/dist/scroll-area.d.ts +18 -0
  127. package/dist/scroll-area.js +55 -0
  128. package/dist/scroll-area.js.map +1 -0
  129. package/dist/select.d.ts +21 -0
  130. package/dist/select.js +136 -0
  131. package/dist/select.js.map +1 -0
  132. package/dist/separator.d.ts +11 -0
  133. package/dist/separator.js +29 -0
  134. package/dist/separator.js.map +1 -0
  135. package/dist/sheet.d.ts +39 -0
  136. package/dist/sheet.js +140 -0
  137. package/dist/sheet.js.map +1 -0
  138. package/dist/sidebar.d.ts +75 -0
  139. package/dist/sidebar.js +201 -0
  140. package/dist/sidebar.js.map +1 -0
  141. package/dist/skeleton.d.ts +11 -0
  142. package/dist/skeleton.js +21 -0
  143. package/dist/skeleton.js.map +1 -0
  144. package/dist/slider.d.ts +20 -0
  145. package/dist/slider.js +55 -0
  146. package/dist/slider.js.map +1 -0
  147. package/dist/sonner.d.ts +14 -0
  148. package/dist/sonner.js +27 -0
  149. package/dist/sonner.js.map +1 -0
  150. package/dist/spacer.d.ts +38 -0
  151. package/dist/spacer.js +43 -0
  152. package/dist/spacer.js.map +1 -0
  153. package/dist/stack.d.ts +34 -0
  154. package/dist/stack.js +49 -0
  155. package/dist/stack.js.map +1 -0
  156. package/dist/stepper.d.ts +48 -0
  157. package/dist/stepper.js +226 -0
  158. package/dist/stepper.js.map +1 -0
  159. package/dist/switch.d.ts +11 -0
  160. package/dist/switch.js +47 -0
  161. package/dist/switch.js.map +1 -0
  162. package/dist/table.d.ts +24 -0
  163. package/dist/table.js +85 -0
  164. package/dist/table.js.map +1 -0
  165. package/dist/tabs.d.ts +13 -0
  166. package/dist/tabs.js +57 -0
  167. package/dist/tabs.js.map +1 -0
  168. package/dist/textarea.d.ts +10 -0
  169. package/dist/textarea.js +36 -0
  170. package/dist/textarea.js.map +1 -0
  171. package/dist/time-picker.d.ts +34 -0
  172. package/dist/time-picker.js +50 -0
  173. package/dist/time-picker.js.map +1 -0
  174. package/dist/timeline.d.ts +42 -0
  175. package/dist/timeline.js +84 -0
  176. package/dist/timeline.js.map +1 -0
  177. package/dist/toggle-group.d.ts +17 -0
  178. package/dist/toggle-group.js +83 -0
  179. package/dist/toggle-group.js.map +1 -0
  180. package/dist/toggle.d.ts +19 -0
  181. package/dist/toggle.js +49 -0
  182. package/dist/toggle.js.map +1 -0
  183. package/dist/tooltip.d.ts +13 -0
  184. package/dist/tooltip.js +33 -0
  185. package/dist/tooltip.js.map +1 -0
  186. package/package.json +68 -16
@@ -0,0 +1,19 @@
1
+ import { OTPInput } from 'input-otp';
2
+ import * as React from 'react';
3
+
4
+ /** Props for the root InputOTP component (mirrors input-otp's OTPInput). */
5
+ type InputOTPProps = React.ComponentPropsWithoutRef<typeof OTPInput>;
6
+ /** Root OTP input. Wraps input-otp's OTPInput and exposes slot context to children. */
7
+ declare const InputOTP: React.ForwardRefExoticComponent<InputOTPProps & React.RefAttributes<HTMLInputElement>>;
8
+ /** Groups slots together; place between runs of slots to add visual dividers. */
9
+ declare const InputOTPGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
+ interface InputOTPSlotProps extends React.ComponentPropsWithoutRef<"div"> {
11
+ /** Index of the slot in the underlying OTP value. */
12
+ index: number;
13
+ }
14
+ /** A single character slot. Reads its state from OTPInputContext. */
15
+ declare const InputOTPSlot: React.ForwardRefExoticComponent<InputOTPSlotProps & React.RefAttributes<HTMLDivElement>>;
16
+ /** Visual separator between slot groups (a bullet by default). */
17
+ declare const InputOTPSeparator: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
18
+
19
+ export { InputOTP, InputOTPGroup, type InputOTPProps, InputOTPSeparator, InputOTPSlot };
@@ -0,0 +1,71 @@
1
+ "use client";
2
+ import { OTPInput, OTPInputContext } from 'input-otp';
3
+ import * as React from 'react';
4
+ import { clsx } from 'clsx';
5
+ import { twMerge } from 'tailwind-merge';
6
+ import { jsx, jsxs } from 'react/jsx-runtime';
7
+
8
+ function cn(...inputs) {
9
+ return twMerge(clsx(inputs));
10
+ }
11
+ var InputOTP = React.forwardRef(
12
+ ({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx(
13
+ OTPInput,
14
+ {
15
+ ref,
16
+ containerClassName: cn(
17
+ "flex items-center gap-[var(--gap-sm,0.5rem)] has-[:disabled]:opacity-50",
18
+ containerClassName
19
+ ),
20
+ className: cn("disabled:cursor-not-allowed", className),
21
+ ...props
22
+ }
23
+ )
24
+ );
25
+ InputOTP.displayName = "InputOTP";
26
+ var InputOTPGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-center", className), ...props }));
27
+ InputOTPGroup.displayName = "InputOTPGroup";
28
+ var InputOTPSlot = React.forwardRef(
29
+ ({ index, className, ...props }, ref) => {
30
+ const inputOTPContext = React.useContext(OTPInputContext);
31
+ const slot = inputOTPContext.slots[index];
32
+ const char = slot?.char ?? null;
33
+ const hasFakeCaret = slot?.hasFakeCaret ?? false;
34
+ const isActive = slot?.isActive ?? false;
35
+ return /* @__PURE__ */ jsxs(
36
+ "div",
37
+ {
38
+ ref,
39
+ className: cn(
40
+ "relative flex h-[var(--control-height-md,2.5rem)] w-[var(--control-height-md,2.5rem)] items-center justify-center border-y border-r border-input text-sm transition-all duration-[var(--duration-normal,200ms)] ease-out",
41
+ "inset-ring-1 inset-ring-foreground/[0.06]",
42
+ "first:rounded-l-md first:border-l last:rounded-r-md",
43
+ isActive && "z-10 ring-2 ring-ring ring-offset-2 ring-offset-background",
44
+ className
45
+ ),
46
+ ...props,
47
+ children: [
48
+ char,
49
+ hasFakeCaret && /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "h-4 w-px animate-pulse bg-foreground duration-1000" }) })
50
+ ]
51
+ }
52
+ );
53
+ }
54
+ );
55
+ InputOTPSlot.displayName = "InputOTPSlot";
56
+ var InputOTPSeparator = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, role: "separator", ...props, children: /* @__PURE__ */ jsx(
57
+ "svg",
58
+ {
59
+ xmlns: "http://www.w3.org/2000/svg",
60
+ viewBox: "0 0 24 24",
61
+ fill: "currentColor",
62
+ className: "h-2 w-2 text-muted-foreground",
63
+ "aria-hidden": "true",
64
+ children: /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "6" })
65
+ }
66
+ ) }));
67
+ InputOTPSeparator.displayName = "InputOTPSeparator";
68
+
69
+ export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
70
+ //# sourceMappingURL=input-otp.js.map
71
+ //# sourceMappingURL=input-otp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/utils.ts","../src/components/input-otp/input-otp.tsx"],"names":[],"mappings":";;;;;;AAQO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;ACAA,IAAM,QAAA,GAAiB,KAAA,CAAA,UAAA;AAAA,EACtB,CAAC,EAAE,SAAA,EAAW,oBAAoB,GAAG,KAAA,IAAS,GAAA,qBAC9C,GAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACA,GAAA;AAAA,MACA,kBAAA,EAAoB,EAAA;AAAA,QACnB,yEAAA;AAAA,QACA;AAAA,OACD;AAAA,MACA,SAAA,EAAW,EAAA,CAAG,6BAAA,EAA+B,SAAS,CAAA;AAAA,MACrD,GAAG;AAAA;AAAA;AAEL;AACD,QAAA,CAAS,WAAA,GAAc,UAAA;AAGvB,IAAM,gBAAsB,KAAA,CAAA,UAAA,CAG1B,CAAC,EAAE,SAAA,EAAW,GAAG,OAAM,EAAG,GAAA,yBAC1B,KAAA,EAAA,EAAI,GAAA,EAAU,WAAW,EAAA,CAAG,mBAAA,EAAqB,SAAS,CAAA,EAAI,GAAG,OAAO,CACzE;AACD,aAAA,CAAc,WAAA,GAAc,eAAA;AAQ5B,IAAM,YAAA,GAAqB,KAAA,CAAA,UAAA;AAAA,EAC1B,CAAC,EAAE,KAAA,EAAO,WAAW,GAAG,KAAA,IAAS,GAAA,KAAQ;AACxC,IAAA,MAAM,eAAA,GAAwB,iBAAW,eAAe,CAAA;AACxD,IAAA,MAAM,IAAA,GAAO,eAAA,CAAgB,KAAA,CAAM,KAAK,CAAA;AACxC,IAAA,MAAM,IAAA,GAAO,MAAM,IAAA,IAAQ,IAAA;AAC3B,IAAA,MAAM,YAAA,GAAe,MAAM,YAAA,IAAgB,KAAA;AAC3C,IAAA,MAAM,QAAA,GAAW,MAAM,QAAA,IAAY,KAAA;AAEnC,IAAA,uBACC,IAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACA,GAAA;AAAA,QACA,SAAA,EAAW,EAAA;AAAA,UACV,0NAAA;AAAA,UACA,2CAAA;AAAA,UACA,qDAAA;AAAA,UACA,QAAA,IAAY,4DAAA;AAAA,UACZ;AAAA,SACD;AAAA,QACC,GAAG,KAAA;AAAA,QAEH,QAAA,EAAA;AAAA,UAAA,IAAA;AAAA,UACA,YAAA,wBACC,KAAA,EAAA,EAAI,SAAA,EAAU,yEACd,QAAA,kBAAA,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,oDAAA,EAAqD,CAAA,EACrE;AAAA;AAAA;AAAA,KAEF;AAAA,EAEF;AACD;AACA,YAAA,CAAa,WAAA,GAAc,cAAA;AAG3B,IAAM,iBAAA,GAA0B,KAAA,CAAA,UAAA,CAG9B,CAAC,EAAE,GAAG,KAAA,EAAM,EAAG,GAAA,qBAChB,GAAA,CAAC,KAAA,EAAA,EAAI,GAAA,EAAU,IAAA,EAAK,WAAA,EAAa,GAAG,KAAA,EACnC,QAAA,kBAAA,GAAA;AAAA,EAAC,KAAA;AAAA,EAAA;AAAA,IACA,KAAA,EAAM,4BAAA;AAAA,IACN,OAAA,EAAQ,WAAA;AAAA,IACR,IAAA,EAAK,cAAA;AAAA,IACL,SAAA,EAAU,+BAAA;AAAA,IACV,aAAA,EAAY,MAAA;AAAA,IAEZ,8BAAC,QAAA,EAAA,EAAO,EAAA,EAAG,MAAK,EAAA,EAAG,IAAA,EAAK,GAAE,GAAA,EAAI;AAAA;AAC/B,CAAA,EACD,CACA;AACD,iBAAA,CAAkB,WAAA,GAAc,mBAAA","file":"input-otp.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind CSS conflict resolution.\n * @param inputs - Class values (strings, arrays, objects) to merge\n * @returns A single merged class string with Tailwind conflicts resolved\n */\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","\"use client\";\n\nimport { OTPInput, OTPInputContext } from \"input-otp\";\nimport * as React from \"react\";\nimport { cn } from \"../../lib/utils.js\";\n\n/** Props for the root InputOTP component (mirrors input-otp's OTPInput). */\ntype InputOTPProps = React.ComponentPropsWithoutRef<typeof OTPInput>;\n\n/** Root OTP input. Wraps input-otp's OTPInput and exposes slot context to children. */\nconst InputOTP = React.forwardRef<React.ComponentRef<typeof OTPInput>, InputOTPProps>(\n\t({ className, containerClassName, ...props }, ref) => (\n\t<OTPInput\n\t\tref={ref}\n\t\tcontainerClassName={cn(\n\t\t\t\"flex items-center gap-[var(--gap-sm,0.5rem)] has-[:disabled]:opacity-50\",\n\t\t\tcontainerClassName,\n\t\t)}\n\t\tclassName={cn(\"disabled:cursor-not-allowed\", className)}\n\t\t{...props}\n\t/>\n));\nInputOTP.displayName = \"InputOTP\";\n\n/** Groups slots together; place between runs of slots to add visual dividers. */\nconst InputOTPGroup = React.forwardRef<\n\tReact.ComponentRef<\"div\">,\n\tReact.ComponentPropsWithoutRef<\"div\">\n>(({ className, ...props }, ref) => (\n\t<div ref={ref} className={cn(\"flex items-center\", className)} {...props} />\n));\nInputOTPGroup.displayName = \"InputOTPGroup\";\n\ninterface InputOTPSlotProps extends React.ComponentPropsWithoutRef<\"div\"> {\n\t/** Index of the slot in the underlying OTP value. */\n\tindex: number;\n}\n\n/** A single character slot. Reads its state from OTPInputContext. */\nconst InputOTPSlot = React.forwardRef<HTMLDivElement, InputOTPSlotProps>(\n\t({ index, className, ...props }, ref) => {\n\t\tconst inputOTPContext = React.useContext(OTPInputContext);\n\t\tconst slot = inputOTPContext.slots[index];\n\t\tconst char = slot?.char ?? null;\n\t\tconst hasFakeCaret = slot?.hasFakeCaret ?? false;\n\t\tconst isActive = slot?.isActive ?? false;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"relative flex h-[var(--control-height-md,2.5rem)] w-[var(--control-height-md,2.5rem)] items-center justify-center border-y border-r border-input text-sm transition-all duration-[var(--duration-normal,200ms)] ease-out\",\n\t\t\t\t\t\"inset-ring-1 inset-ring-foreground/[0.06]\",\n\t\t\t\t\t\"first:rounded-l-md first:border-l last:rounded-r-md\",\n\t\t\t\t\tisActive && \"z-10 ring-2 ring-ring ring-offset-2 ring-offset-background\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{char}\n\t\t\t\t{hasFakeCaret && (\n\t\t\t\t\t<div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n\t\t\t\t\t\t<div className=\"h-4 w-px animate-pulse bg-foreground duration-1000\" />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t},\n);\nInputOTPSlot.displayName = \"InputOTPSlot\";\n\n/** Visual separator between slot groups (a bullet by default). */\nconst InputOTPSeparator = React.forwardRef<\n\tReact.ComponentRef<\"div\">,\n\tReact.ComponentPropsWithoutRef<\"div\">\n>(({ ...props }, ref) => (\n\t<div ref={ref} role=\"separator\" {...props}>\n\t\t<svg\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\tviewBox=\"0 0 24 24\"\n\t\t\tfill=\"currentColor\"\n\t\t\tclassName=\"h-2 w-2 text-muted-foreground\"\n\t\t\taria-hidden=\"true\"\n\t\t>\n\t\t\t<circle cx=\"12\" cy=\"12\" r=\"6\" />\n\t\t</svg>\n\t</div>\n));\nInputOTPSeparator.displayName = \"InputOTPSeparator\";\n\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };\nexport type { InputOTPProps };\n"]}
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+
3
+ type InputProps = React.InputHTMLAttributes<HTMLInputElement>;
4
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
5
+
6
+ export { Input, type InputProps };
package/dist/input.js ADDED
@@ -0,0 +1,40 @@
1
+ import * as React from 'react';
2
+ import { clsx } from 'clsx';
3
+ import { twMerge } from 'tailwind-merge';
4
+ import { jsx } from 'react/jsx-runtime';
5
+
6
+ // src/primitives/input/input.tsx
7
+ function cn(...inputs) {
8
+ return twMerge(clsx(inputs));
9
+ }
10
+ var Input = React.forwardRef(
11
+ ({ className, type, ...props }, ref) => {
12
+ return /* @__PURE__ */ jsx(
13
+ "input",
14
+ {
15
+ type,
16
+ className: cn(
17
+ "flex h-[var(--control-height-md,2.5rem)] w-full rounded-md border border-input bg-background px-[var(--space-3,0.75rem)] py-[var(--space-2,0.5rem)] text-sm",
18
+ "transition-all duration-[var(--duration-normal,200ms)] ease-out",
19
+ // inset-ring gives a self-borne edge so the input field is visible on flat
20
+ // surfaces (token border alone is too low-contrast on bg-background=white).
21
+ "shadow-sm inset-ring-1 inset-ring-foreground/[0.06]",
22
+ "file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground",
23
+ "placeholder:text-muted-foreground",
24
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
25
+ "focus-visible:shadow-md focus-visible:border-ring/50",
26
+ "hover:border-ring/30 hover:shadow-md",
27
+ "disabled:cursor-not-allowed disabled:opacity-50",
28
+ className
29
+ ),
30
+ ref,
31
+ ...props
32
+ }
33
+ );
34
+ }
35
+ );
36
+ Input.displayName = "Input";
37
+
38
+ export { Input };
39
+ //# sourceMappingURL=input.js.map
40
+ //# sourceMappingURL=input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/utils.ts","../src/primitives/input/input.tsx"],"names":[],"mappings":";;;;;;AAQO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;ACLA,IAAM,KAAA,GAAc,KAAA,CAAA,UAAA;AAAA,EACnB,CAAC,EAAE,SAAA,EAAW,MAAM,GAAG,KAAA,IAAS,GAAA,KAAQ;AACvC,IAAA,uBACC,GAAA;AAAA,MAAC,OAAA;AAAA,MAAA;AAAA,QACA,IAAA;AAAA,QACA,SAAA,EAAW,EAAA;AAAA,UACV,6JAAA;AAAA,UACA,iEAAA;AAAA;AAAA;AAAA,UAGA,qDAAA;AAAA,UACA,sFAAA;AAAA,UACA,mCAAA;AAAA,UACA,qGAAA;AAAA,UACA,sDAAA;AAAA,UACA,sCAAA;AAAA,UACA,iDAAA;AAAA,UACA;AAAA,SACD;AAAA,QACA,GAAA;AAAA,QACC,GAAG;AAAA;AAAA,KACL;AAAA,EAEF;AACD;AACA,KAAA,CAAM,WAAA,GAAc,OAAA","file":"input.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind CSS conflict resolution.\n * @param inputs - Class values (strings, arrays, objects) to merge\n * @returns A single merged class string with Tailwind conflicts resolved\n */\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","import * as React from \"react\";\nimport { cn } from \"../../lib/utils.js\";\n\nexport type InputProps = React.InputHTMLAttributes<HTMLInputElement>;\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n\t({ className, type, ...props }, ref) => {\n\t\treturn (\n\t\t\t<input\n\t\t\t\ttype={type}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"flex h-[var(--control-height-md,2.5rem)] w-full rounded-md border border-input bg-background px-[var(--space-3,0.75rem)] py-[var(--space-2,0.5rem)] text-sm\",\n\t\t\t\t\t\"transition-all duration-[var(--duration-normal,200ms)] ease-out\",\n\t\t\t\t\t// inset-ring gives a self-borne edge so the input field is visible on flat\n\t\t\t\t\t// surfaces (token border alone is too low-contrast on bg-background=white).\n\t\t\t\t\t\"shadow-sm inset-ring-1 inset-ring-foreground/[0.06]\",\n\t\t\t\t\t\"file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground\",\n\t\t\t\t\t\"placeholder:text-muted-foreground\",\n\t\t\t\t\t\"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n\t\t\t\t\t\"focus-visible:shadow-md focus-visible:border-ring/50\",\n\t\t\t\t\t\"hover:border-ring/30 hover:shadow-md\",\n\t\t\t\t\t\"disabled:cursor-not-allowed disabled:opacity-50\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nInput.displayName = \"Input\";\n\nexport { Input };\n"]}
@@ -0,0 +1,11 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as LabelPrimitive from '@radix-ui/react-label';
3
+ import { VariantProps } from 'class-variance-authority';
4
+ import * as React from 'react';
5
+
6
+ declare const labelVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
7
+ interface LabelProps extends React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>, VariantProps<typeof labelVariants> {
8
+ }
9
+ declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLLabelElement>>;
10
+
11
+ export { Label, type LabelProps };
package/dist/label.js ADDED
@@ -0,0 +1,22 @@
1
+ "use client";
2
+ import * as LabelPrimitive from '@radix-ui/react-label';
3
+ import { cva } from 'class-variance-authority';
4
+ import * as React from 'react';
5
+ import { clsx } from 'clsx';
6
+ import { twMerge } from 'tailwind-merge';
7
+ import { jsx } from 'react/jsx-runtime';
8
+
9
+ function cn(...inputs) {
10
+ return twMerge(clsx(inputs));
11
+ }
12
+ var labelVariants = cva(
13
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
14
+ );
15
+ var Label = React.forwardRef(
16
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(LabelPrimitive.Root, { ref, className: cn(labelVariants(), className), ...props })
17
+ );
18
+ Label.displayName = "Label";
19
+
20
+ export { Label };
21
+ //# sourceMappingURL=label.js.map
22
+ //# sourceMappingURL=label.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/utils.ts","../src/primitives/label/label.tsx"],"names":[],"mappings":";;;;;;;AAQO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;ACHA,IAAM,aAAA,GAAgB,GAAA;AAAA,EACrB;AACD,CAAA;AAMA,IAAM,KAAA,GAAc,KAAA,CAAA,UAAA;AAAA,EACnB,CAAC,EAAE,SAAA,EAAW,GAAG,KAAA,EAAM,EAAG,wBACzB,GAAA,CAAgB,cAAA,CAAA,IAAA,EAAf,EAAoB,GAAA,EAAU,WAAW,EAAA,CAAG,aAAA,IAAiB,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO;AAEvF;AACA,KAAA,CAAM,WAAA,GAAc,OAAA","file":"label.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind CSS conflict resolution.\n * @param inputs - Class values (strings, arrays, objects) to merge\n * @returns A single merged class string with Tailwind conflicts resolved\n */\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","\"use client\";\n\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport * as React from \"react\";\nimport { cn } from \"../../lib/utils.js\";\n\nconst labelVariants = cva(\n\t\"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\",\n);\n\nexport interface LabelProps\n\textends React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>,\n\t\tVariantProps<typeof labelVariants> {}\n\nconst Label = React.forwardRef<React.ComponentRef<typeof LabelPrimitive.Root>, LabelProps>(\n\t({ className, ...props }, ref) => (\n\t\t<LabelPrimitive.Root ref={ref} className={cn(labelVariants(), className)} {...props} />\n\t),\n);\nLabel.displayName = \"Label\";\n\nexport { Label };\n"]}
@@ -0,0 +1,35 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as MenubarPrimitive from '@radix-ui/react-menubar';
3
+ import * as React from 'react';
4
+
5
+ /** Top-level menu bar (File / Edit / View style). */
6
+ declare const Menubar: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
+ /** A top-level menu in the bar (e.g. "File"). */
8
+ declare const MenubarMenu: typeof MenubarPrimitive.Menu;
9
+ /** Groups related items inside a menu content. */
10
+ declare const MenubarGroup: typeof MenubarPrimitive.Group;
11
+ /** Portals menu content into the body. */
12
+ declare const MenubarPortal: typeof MenubarPrimitive.Portal;
13
+ /** Group for checkable radio items. */
14
+ declare const MenubarRadioGroup: typeof MenubarPrimitive.RadioGroup;
15
+ /** The clickable menu label in the bar. */
16
+ declare const MenubarTrigger: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
17
+ /** The menu panel shown when a trigger opens. */
18
+ declare const MenubarContent: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
+ /** A clickable menu item. */
20
+ declare const MenubarItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
21
+ inset?: boolean;
22
+ } & React.RefAttributes<HTMLDivElement>>;
23
+ /** A non-interactive heading label. */
24
+ declare const MenubarLabel: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
25
+ inset?: boolean;
26
+ } & React.RefAttributes<HTMLDivElement>>;
27
+ /** Horizontal divider. */
28
+ declare const MenubarSeparator: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
29
+ /**
30
+ * Right-aligned keyboard shortcut text.
31
+ * @returns A span with muted typography
32
+ */
33
+ declare function MenubarShortcut({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
34
+
35
+ export { Menubar, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarSeparator, MenubarShortcut, MenubarTrigger };
@@ -0,0 +1,106 @@
1
+ "use client";
2
+ import * as MenubarPrimitive from '@radix-ui/react-menubar';
3
+ import * as React from 'react';
4
+ import { clsx } from 'clsx';
5
+ import { twMerge } from 'tailwind-merge';
6
+ import { jsx } from 'react/jsx-runtime';
7
+
8
+ function cn(...inputs) {
9
+ return twMerge(clsx(inputs));
10
+ }
11
+ var Menubar = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
12
+ MenubarPrimitive.Root,
13
+ {
14
+ ref,
15
+ className: cn(
16
+ "flex h-[var(--control-height-md,2.5rem)] items-center space-x-1 rounded-md border border-foreground/[0.08] bg-background p-[var(--space-1,0.25rem)]",
17
+ className
18
+ ),
19
+ ...props
20
+ }
21
+ ));
22
+ Menubar.displayName = "Menubar";
23
+ var MenubarMenu = MenubarPrimitive.Menu;
24
+ var MenubarGroup = MenubarPrimitive.Group;
25
+ var MenubarPortal = MenubarPrimitive.Portal;
26
+ var MenubarRadioGroup = MenubarPrimitive.RadioGroup;
27
+ var MenubarTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
28
+ MenubarPrimitive.Trigger,
29
+ {
30
+ ref,
31
+ className: cn(
32
+ "flex cursor-default select-none items-center rounded-sm px-[var(--space-3,0.75rem)] py-1.5 text-sm font-medium outline-none",
33
+ "transition-all duration-[var(--duration-normal,200ms)] ease-out",
34
+ "focus:bg-accent focus:text-accent-foreground",
35
+ "data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
36
+ className
37
+ ),
38
+ ...props
39
+ }
40
+ ));
41
+ MenubarTrigger.displayName = "MenubarTrigger";
42
+ var MenubarContent = React.forwardRef(({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, ref) => /* @__PURE__ */ jsx(MenubarPrimitive.Portal, { children: /* @__PURE__ */ jsx(
43
+ MenubarPrimitive.Content,
44
+ {
45
+ ref,
46
+ align,
47
+ alignOffset,
48
+ sideOffset,
49
+ className: cn(
50
+ "z-50 min-w-[12rem] overflow-hidden rounded-md border border-foreground/[0.08] bg-popover p-[var(--space-1,0.25rem)] text-popover-foreground shadow-md",
51
+ "data-[state=open]:animate-in data-[state=closed]:animate-out",
52
+ "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
53
+ "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
54
+ className
55
+ ),
56
+ ...props
57
+ }
58
+ ) }));
59
+ MenubarContent.displayName = "MenubarContent";
60
+ var MenubarItem = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
61
+ MenubarPrimitive.Item,
62
+ {
63
+ ref,
64
+ className: cn(
65
+ "relative flex cursor-default select-none items-center gap-[var(--gap-sm,0.5rem)] rounded-sm px-[var(--space-2,0.5rem)] py-1.5 text-sm outline-none",
66
+ "transition-all duration-[var(--duration-normal,200ms)] ease-out",
67
+ "focus:bg-accent focus:text-accent-foreground",
68
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
69
+ inset && "pl-[var(--space-8,2rem)]",
70
+ className
71
+ ),
72
+ ...props
73
+ }
74
+ ));
75
+ MenubarItem.displayName = "MenubarItem";
76
+ var MenubarLabel = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
77
+ MenubarPrimitive.Label,
78
+ {
79
+ ref,
80
+ className: cn("px-[var(--space-2,0.5rem)] py-1.5 text-sm font-semibold", inset && "pl-[var(--space-8,2rem)]", className),
81
+ ...props
82
+ }
83
+ ));
84
+ MenubarLabel.displayName = "MenubarLabel";
85
+ var MenubarSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
86
+ MenubarPrimitive.Separator,
87
+ {
88
+ ref,
89
+ className: cn("-mx-[var(--space-1,0.25rem)] my-[var(--space-1,0.25rem)] h-px bg-foreground/[0.12]", className),
90
+ ...props
91
+ }
92
+ ));
93
+ MenubarSeparator.displayName = "MenubarSeparator";
94
+ function MenubarShortcut({ className, ...props }) {
95
+ return /* @__PURE__ */ jsx(
96
+ "span",
97
+ {
98
+ className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className),
99
+ ...props
100
+ }
101
+ );
102
+ }
103
+
104
+ export { Menubar, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarSeparator, MenubarShortcut, MenubarTrigger };
105
+ //# sourceMappingURL=menubar.js.map
106
+ //# sourceMappingURL=menubar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/utils.ts","../src/components/menubar/menubar.tsx"],"names":[],"mappings":"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","file":"menubar.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind CSS conflict resolution.\n * @param inputs - Class values (strings, arrays, objects) to merge\n * @returns A single merged class string with Tailwind conflicts resolved\n */\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","\"use client\";\n\nimport * as MenubarPrimitive from \"@radix-ui/react-menubar\";\nimport * as React from \"react\";\nimport { cn } from \"../../lib/utils.js\";\n\n/** Top-level menu bar (File / Edit / View style). */\nconst Menubar = React.forwardRef<\n\tReact.ComponentRef<typeof MenubarPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n\t<MenubarPrimitive.Root\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex h-[var(--control-height-md,2.5rem)] items-center space-x-1 rounded-md border border-foreground/[0.08] bg-background p-[var(--space-1,0.25rem)]\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nMenubar.displayName = \"Menubar\";\n\n// The explicit `as typeof ...Primitive.X` casts below are load-bearing: without them,\n// tsup's dts build fails with TS2742 \"The inferred type of X cannot be named without a\n// reference to @radix-ui/react-context\" on direct re-exports of Radix primitives. Do not\n// remove without verifying `pnpm --filter @hex-core/components build` still succeeds.\n\n/** A top-level menu in the bar (e.g. \"File\"). */\nconst MenubarMenu = MenubarPrimitive.Menu as typeof MenubarPrimitive.Menu;\n\n/** Groups related items inside a menu content. */\nconst MenubarGroup = MenubarPrimitive.Group as typeof MenubarPrimitive.Group;\n\n/** Portals menu content into the body. */\nconst MenubarPortal = MenubarPrimitive.Portal as typeof MenubarPrimitive.Portal;\n\n/** Group for checkable radio items. */\nconst MenubarRadioGroup = MenubarPrimitive.RadioGroup as typeof MenubarPrimitive.RadioGroup;\n\n/** The clickable menu label in the bar. */\nconst MenubarTrigger = React.forwardRef<\n\tReact.ComponentRef<typeof MenubarPrimitive.Trigger>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n\t<MenubarPrimitive.Trigger\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex cursor-default select-none items-center rounded-sm px-[var(--space-3,0.75rem)] py-1.5 text-sm font-medium outline-none\",\n\t\t\t\"transition-all duration-[var(--duration-normal,200ms)] ease-out\",\n\t\t\t\"focus:bg-accent focus:text-accent-foreground\",\n\t\t\t\"data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nMenubarTrigger.displayName = \"MenubarTrigger\";\n\n/** The menu panel shown when a trigger opens. */\nconst MenubarContent = React.forwardRef<\n\tReact.ComponentRef<typeof MenubarPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\n>(({ className, align = \"start\", alignOffset = -4, sideOffset = 8, ...props }, ref) => (\n\t<MenubarPrimitive.Portal>\n\t\t<MenubarPrimitive.Content\n\t\t\tref={ref}\n\t\t\talign={align}\n\t\t\talignOffset={alignOffset}\n\t\t\tsideOffset={sideOffset}\n\t\t\tclassName={cn(\n\t\t\t\t\"z-50 min-w-[12rem] overflow-hidden rounded-md border border-foreground/[0.08] bg-popover p-[var(--space-1,0.25rem)] text-popover-foreground shadow-md\",\n\t\t\t\t\"data-[state=open]:animate-in data-[state=closed]:animate-out\",\n\t\t\t\t\"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n\t\t\t\t\"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t</MenubarPrimitive.Portal>\n));\nMenubarContent.displayName = \"MenubarContent\";\n\n/** A clickable menu item. */\nconst MenubarItem = React.forwardRef<\n\tReact.ComponentRef<typeof MenubarPrimitive.Item>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n\t<MenubarPrimitive.Item\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex cursor-default select-none items-center gap-[var(--gap-sm,0.5rem)] rounded-sm px-[var(--space-2,0.5rem)] py-1.5 text-sm outline-none\",\n\t\t\t\"transition-all duration-[var(--duration-normal,200ms)] ease-out\",\n\t\t\t\"focus:bg-accent focus:text-accent-foreground\",\n\t\t\t\"data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n\t\t\tinset && \"pl-[var(--space-8,2rem)]\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nMenubarItem.displayName = \"MenubarItem\";\n\n/** A non-interactive heading label. */\nconst MenubarLabel = React.forwardRef<\n\tReact.ComponentRef<typeof MenubarPrimitive.Label>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n\t<MenubarPrimitive.Label\n\t\tref={ref}\n\t\tclassName={cn(\"px-[var(--space-2,0.5rem)] py-1.5 text-sm font-semibold\", inset && \"pl-[var(--space-8,2rem)]\", className)}\n\t\t{...props}\n\t/>\n));\nMenubarLabel.displayName = \"MenubarLabel\";\n\n/** Horizontal divider. */\nconst MenubarSeparator = React.forwardRef<\n\tReact.ComponentRef<typeof MenubarPrimitive.Separator>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n\t<MenubarPrimitive.Separator\n\t\tref={ref}\n\t\tclassName={cn(\"-mx-[var(--space-1,0.25rem)] my-[var(--space-1,0.25rem)] h-px bg-foreground/[0.12]\", className)}\n\t\t{...props}\n\t/>\n));\nMenubarSeparator.displayName = \"MenubarSeparator\";\n\n/**\n * Right-aligned keyboard shortcut text.\n * @returns A span with muted typography\n */\nfunction MenubarShortcut({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) {\n\treturn (\n\t\t<span\n\t\t\tclassName={cn(\"ml-auto text-xs tracking-widest text-muted-foreground\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tMenubar,\n\tMenubarMenu,\n\tMenubarTrigger,\n\tMenubarContent,\n\tMenubarItem,\n\tMenubarLabel,\n\tMenubarSeparator,\n\tMenubarShortcut,\n\tMenubarGroup,\n\tMenubarPortal,\n\tMenubarRadioGroup,\n};\n"]}
@@ -0,0 +1,51 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ interface MultiComboboxOption {
4
+ /** The value returned in the onChange array (stable, unique). */
5
+ value: string;
6
+ /** The display label shown in the list and the trigger. */
7
+ label: string;
8
+ /** Mark as non-selectable. */
9
+ disabled?: boolean;
10
+ }
11
+ interface MultiComboboxProps {
12
+ /** The list of selectable options. */
13
+ options: MultiComboboxOption[];
14
+ /** Controlled selected values. */
15
+ value?: string[];
16
+ /** Fired when the user toggles an option: (values: string[]) => void */
17
+ onChange?: (values: string[]) => void;
18
+ /** Text shown on the trigger when nothing is selected. */
19
+ placeholder?: string;
20
+ /** Input placeholder inside the popover list. */
21
+ searchPlaceholder?: string;
22
+ /** Text shown when no options match the search. */
23
+ emptyText?: string;
24
+ /** Soft cap on selections. Once reached, unselected options become non-selectable. */
25
+ maxSelected?: number;
26
+ /** Close the popover after every pick. Default false (multi-select UX expects staying open). */
27
+ closeOnSelect?: boolean;
28
+ /** Disable the trigger. */
29
+ disabled?: boolean;
30
+ /** Extra class names on the trigger button. */
31
+ className?: string;
32
+ /** Accessible label for the trigger (required when no adjacent visible label). */
33
+ "aria-label"?: string;
34
+ /** Id of an external visible label that names this combobox. */
35
+ "aria-labelledby"?: string;
36
+ }
37
+ /**
38
+ * Searchable multi-select input built on Command + Popover.
39
+ *
40
+ * Pass `options` with `{ value, label }` and bind `value` (string[]) +
41
+ * `onChange`. The trigger shows "{n} selected" once any option is picked, with
42
+ * the comma-separated label list mirrored into the `title` attribute for
43
+ * pointer/screen-reader fallback. Each option is announced with `aria-selected`.
44
+ * @returns A trigger button that opens a multi-select option list.
45
+ */
46
+ declare function MultiCombobox({ options, value, onChange, placeholder, searchPlaceholder, emptyText, maxSelected, closeOnSelect, disabled, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, }: MultiComboboxProps): react_jsx_runtime.JSX.Element;
47
+ declare namespace MultiCombobox {
48
+ var displayName: string;
49
+ }
50
+
51
+ export { MultiCombobox, type MultiComboboxOption, type MultiComboboxProps };