@nsaa/core 0.1.0-alpha.1 → 0.1.0-alpha.3

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 (286) hide show
  1. package/README.md +30 -8
  2. package/dist/_virtual/_rolldown/runtime.js +13 -0
  3. package/dist/accordion/accordion.d.ts +7 -0
  4. package/dist/accordion/accordion.js +54 -0
  5. package/dist/accordion/index.d.ts +3 -0
  6. package/dist/alert/alert.d.ts +19 -0
  7. package/dist/alert/alert.js +58 -0
  8. package/dist/alert/index.d.ts +3 -0
  9. package/dist/alert-dialog/alert-dialog.d.ts +19 -0
  10. package/dist/alert-dialog/alert-dialog.js +106 -0
  11. package/dist/alert-dialog/index.d.ts +3 -0
  12. package/dist/avatar/avatar.d.ts +12 -0
  13. package/dist/avatar/avatar.js +50 -0
  14. package/dist/avatar/index.d.ts +3 -0
  15. package/dist/badge/badge.d.ts +8 -0
  16. package/dist/badge/badge.js +29 -0
  17. package/dist/badge/index.d.ts +3 -0
  18. package/dist/button/button.d.ts +25 -0
  19. package/dist/button/button.js +136 -0
  20. package/dist/button/index.d.ts +3 -0
  21. package/dist/calendar/calendar.d.ts +11 -0
  22. package/dist/calendar/calendar.js +131 -0
  23. package/dist/calendar/index.d.ts +3 -0
  24. package/dist/card/card.d.ts +12 -0
  25. package/dist/card/card.js +55 -0
  26. package/dist/card/index.d.ts +3 -0
  27. package/dist/checkbox/checkbox.d.ts +4 -0
  28. package/dist/checkbox/checkbox.js +35 -0
  29. package/dist/checkbox/index.d.ts +3 -0
  30. package/dist/collapsible/collapsible.d.ts +6 -0
  31. package/dist/collapsible/collapsible.js +24 -0
  32. package/dist/collapsible/index.d.ts +3 -0
  33. package/dist/combobox/combobox.d.ts +27 -0
  34. package/dist/combobox/combobox.js +226 -0
  35. package/dist/combobox/index.d.ts +3 -0
  36. package/dist/command/command.d.ts +20 -0
  37. package/dist/command/command.js +116 -0
  38. package/dist/command/index.d.ts +3 -0
  39. package/dist/context-menu/context-menu.d.ts +30 -0
  40. package/dist/context-menu/context-menu.js +173 -0
  41. package/dist/context-menu/index.d.ts +3 -0
  42. package/dist/dialog/dialog.d.ts +18 -0
  43. package/dist/dialog/dialog.js +112 -0
  44. package/dist/dialog/index.d.ts +3 -0
  45. package/dist/direction.d.ts +3 -0
  46. package/dist/direction.js +2 -0
  47. package/dist/drawer/drawer.d.ts +17 -0
  48. package/dist/drawer/drawer.js +136 -0
  49. package/dist/drawer/index.d.ts +3 -0
  50. package/dist/dropdown-menu/dropdown-menu.d.ts +30 -0
  51. package/dist/dropdown-menu/dropdown-menu.js +177 -0
  52. package/dist/dropdown-menu/index.d.ts +3 -0
  53. package/dist/empty/empty.d.ts +35 -0
  54. package/dist/empty/empty.js +93 -0
  55. package/dist/empty/index.d.ts +3 -0
  56. package/dist/field/field.d.ts +26 -0
  57. package/dist/field/field.js +109 -0
  58. package/dist/field/index.d.ts +3 -0
  59. package/dist/index.d.ts +90 -674
  60. package/dist/index.js +50 -3877
  61. package/dist/input/index.d.ts +3 -0
  62. package/dist/input/input.d.ts +4 -0
  63. package/dist/input/input.js +14 -0
  64. package/dist/input-group/index.d.ts +3 -0
  65. package/dist/input-group/input-group.d.ts +19 -0
  66. package/dist/input-group/input-group.js +78 -0
  67. package/dist/input-otp/index.d.ts +3 -0
  68. package/dist/input-otp/input-otp.d.ts +12 -0
  69. package/dist/input-otp/input-otp.js +73 -0
  70. package/dist/kbd/index.d.ts +3 -0
  71. package/dist/kbd/kbd.d.ts +5 -0
  72. package/dist/kbd/kbd.js +19 -0
  73. package/dist/label/index.d.ts +3 -0
  74. package/dist/label/label.d.ts +4 -0
  75. package/dist/label/label.js +13 -0
  76. package/dist/legacy/icon-button/icon-swap.js +58 -0
  77. package/dist/lib/cn.d.ts +3 -0
  78. package/dist/{cn-DxFBFdwT.js → lib/cn.js} +1 -1
  79. package/dist/lib/control-defaults.js +8 -0
  80. package/dist/lib/icon-swap.d.ts +15 -0
  81. package/dist/lib/icon-swap.js +26 -0
  82. package/dist/lib/input-modality.js +39 -0
  83. package/dist/lib/merge-refs.js +21 -0
  84. package/dist/lib/opener.js +29 -0
  85. package/dist/lib/shortcut.js +50 -0
  86. package/dist/lib/track-input-modality.d.ts +2 -0
  87. package/dist/lib/track-input-modality.js +4 -0
  88. package/dist/lib/tv.js +7 -0
  89. package/dist/lib/use-press.js +48 -0
  90. package/dist/lib/user-action.js +13 -0
  91. package/dist/loaders/arc.d.ts +6 -0
  92. package/dist/loaders/arc.js +31 -0
  93. package/dist/loaders/atom.d.ts +5 -0
  94. package/dist/loaders/atom.js +70 -0
  95. package/dist/loaders/blocks.d.ts +8 -0
  96. package/dist/loaders/blocks.js +74 -0
  97. package/dist/loaders/bouncing-dots.d.ts +3 -0
  98. package/dist/loaders/bouncing-dots.js +45 -0
  99. package/dist/loaders/cap.d.ts +6 -0
  100. package/dist/loaders/cap.js +7 -0
  101. package/dist/loaders/cascade.d.ts +5 -0
  102. package/dist/loaders/cascade.js +50 -0
  103. package/dist/loaders/circular-dots.d.ts +3 -0
  104. package/dist/loaders/circular-dots.js +40 -0
  105. package/dist/loaders/classic-v2.d.ts +3 -0
  106. package/dist/loaders/classic-v2.js +41 -0
  107. package/dist/loaders/classic.d.ts +3 -0
  108. package/dist/loaders/classic.js +48 -0
  109. package/dist/loaders/clock.d.ts +5 -0
  110. package/dist/loaders/clock.js +31 -0
  111. package/dist/loaders/comet.d.ts +5 -0
  112. package/dist/loaders/comet.js +52 -0
  113. package/dist/loaders/compass.d.ts +3 -0
  114. package/dist/loaders/compass.js +39 -0
  115. package/dist/loaders/dual.d.ts +6 -0
  116. package/dist/loaders/dual.js +47 -0
  117. package/dist/loaders/easing.d.ts +6 -0
  118. package/dist/loaders/easing.js +34 -0
  119. package/dist/loaders/eclipse.d.ts +3 -0
  120. package/dist/loaders/eclipse.js +69 -0
  121. package/dist/loaders/fade.js +28 -0
  122. package/dist/loaders/flip.d.ts +3 -0
  123. package/dist/loaders/flip.js +41 -0
  124. package/dist/{frame-CK9IBOZB.js → loaders/frame.js} +2 -50
  125. package/dist/loaders/gather.d.ts +3 -0
  126. package/dist/loaders/gather.js +85 -0
  127. package/dist/loaders/leap.d.ts +3 -0
  128. package/dist/loaders/leap.js +67 -0
  129. package/dist/loaders/linear-dots.d.ts +3 -0
  130. package/dist/loaders/linear-dots.js +54 -0
  131. package/dist/loaders/loading.d.ts +3 -0
  132. package/dist/loaders/loading.js +64 -0
  133. package/dist/loaders/morph.d.ts +3 -0
  134. package/dist/loaders/morph.js +40 -0
  135. package/dist/loaders/motion.d.ts +35 -0
  136. package/dist/loaders/motion.js +51 -0
  137. package/dist/loaders/orbit.d.ts +5 -0
  138. package/dist/loaders/orbit.js +44 -0
  139. package/dist/loaders/pulse.d.ts +3 -0
  140. package/dist/loaders/pulse.js +52 -0
  141. package/dist/loaders/radar.d.ts +5 -0
  142. package/dist/loaders/radar.js +64 -0
  143. package/dist/loaders/ring.d.ts +6 -0
  144. package/dist/loaders/ring.js +38 -0
  145. package/dist/loaders/ripple.d.ts +8 -0
  146. package/dist/loaders/ripple.js +57 -0
  147. package/dist/loaders/slide.d.ts +3 -0
  148. package/dist/loaders/slide.js +74 -0
  149. package/dist/loaders/snake.d.ts +6 -0
  150. package/dist/loaders/snake.js +59 -0
  151. package/dist/loaders/spinners.d.ts +61 -0
  152. package/dist/loaders/spinners.js +63 -0
  153. package/dist/loaders/swirl.d.ts +3 -0
  154. package/dist/loaders/swirl.js +50 -0
  155. package/dist/loaders/text/shared.js +25 -0
  156. package/dist/loaders/text/text-loaders.d.ts +48 -0
  157. package/dist/loaders/text/text-loaders.js +723 -0
  158. package/dist/loaders/trace.d.ts +6 -0
  159. package/dist/loaders/trace.js +46 -0
  160. package/dist/loaders/types.d.ts +10 -0
  161. package/dist/loaders/wave.d.ts +8 -0
  162. package/dist/loaders/wave.js +59 -0
  163. package/dist/loaders-text.d.ts +2 -47
  164. package/dist/loaders-text.js +1 -743
  165. package/dist/loaders.d.ts +36 -132
  166. package/dist/loaders.js +35 -1096
  167. package/dist/native-select/index.d.ts +3 -0
  168. package/dist/native-select/native-select.d.ts +9 -0
  169. package/dist/native-select/native-select.js +44 -0
  170. package/dist/pagination/index.d.ts +3 -0
  171. package/dist/pagination/pagination.d.ts +18 -0
  172. package/dist/pagination/pagination.js +134 -0
  173. package/dist/popover/index.d.ts +3 -0
  174. package/dist/popover/popover.d.ts +10 -0
  175. package/dist/popover/popover.js +54 -0
  176. package/dist/radio-group/index.d.ts +3 -0
  177. package/dist/radio-group/radio-group.d.ts +6 -0
  178. package/dist/radio-group/radio-group.js +33 -0
  179. package/dist/select/index.d.ts +3 -0
  180. package/dist/select/select.d.ts +16 -0
  181. package/dist/select/select.js +148 -0
  182. package/dist/separator/index.d.ts +3 -0
  183. package/dist/separator/separator.d.ts +4 -0
  184. package/dist/separator/separator.js +15 -0
  185. package/dist/skeleton/index.d.ts +3 -0
  186. package/dist/skeleton/skeleton.d.ts +10 -0
  187. package/dist/skeleton/skeleton.js +24 -0
  188. package/dist/slider/index.d.ts +3 -0
  189. package/dist/slider/slider.d.ts +4 -0
  190. package/dist/slider/slider.js +39 -0
  191. package/dist/sound/lazy-uisfx.d.ts +20 -0
  192. package/dist/sound/lazy-uisfx.js +68 -0
  193. package/dist/sound/sound-map.d.ts +72 -0
  194. package/dist/sound/sound-map.js +76 -0
  195. package/dist/sound/sound.d.ts +38 -0
  196. package/dist/sound/sound.js +136 -0
  197. package/dist/sound/uisfx.d.ts +41 -0
  198. package/dist/sound/uisfx.js +59 -0
  199. package/dist/sound-uisfx.d.ts +2 -37
  200. package/dist/sound-uisfx.js +1 -58
  201. package/dist/sources/accordion.css +3 -0
  202. package/dist/sources/alert-dialog.css +26 -0
  203. package/dist/sources/alert.css +8 -0
  204. package/dist/sources/avatar.css +3 -0
  205. package/dist/sources/badge.css +3 -0
  206. package/dist/sources/button.css +24 -0
  207. package/dist/sources/calendar.css +25 -0
  208. package/dist/sources/card.css +3 -0
  209. package/dist/sources/checkbox.css +6 -0
  210. package/dist/sources/collapsible.css +2 -0
  211. package/dist/sources/combobox.css +28 -0
  212. package/dist/sources/command.css +30 -0
  213. package/dist/sources/context-menu.css +6 -0
  214. package/dist/sources/dialog.css +26 -0
  215. package/dist/sources/drawer.css +6 -0
  216. package/dist/sources/dropdown-menu.css +6 -0
  217. package/dist/sources/empty.css +3 -0
  218. package/dist/sources/field.css +5 -0
  219. package/dist/sources/input-group.css +27 -0
  220. package/dist/sources/input-otp.css +8 -0
  221. package/dist/sources/input.css +3 -0
  222. package/dist/sources/kbd.css +3 -0
  223. package/dist/sources/label.css +3 -0
  224. package/dist/sources/loaders-text.css +8 -0
  225. package/dist/sources/loaders.css +40 -0
  226. package/dist/sources/native-select.css +3 -0
  227. package/dist/sources/pagination.css +25 -0
  228. package/dist/sources/popover.css +3 -0
  229. package/dist/sources/radio-group.css +6 -0
  230. package/dist/sources/select.css +6 -0
  231. package/dist/sources/separator.css +3 -0
  232. package/dist/sources/skeleton.css +3 -0
  233. package/dist/sources/slider.css +6 -0
  234. package/dist/sources/spinner.css +20 -0
  235. package/dist/sources/switch.css +6 -0
  236. package/dist/sources/table.css +3 -0
  237. package/dist/sources/tabs.css +3 -0
  238. package/dist/sources/textarea.css +3 -0
  239. package/dist/sources/toast.css +25 -0
  240. package/dist/sources/toggle-group.css +32 -0
  241. package/dist/sources/toolbar.css +34 -0
  242. package/dist/sources/tooltip.css +3 -0
  243. package/dist/spinner/index.d.ts +5 -0
  244. package/dist/spinner/loader-provider.d.ts +16 -0
  245. package/dist/spinner/loader-provider.js +28 -0
  246. package/dist/spinner/registry.d.ts +9 -0
  247. package/dist/spinner/registry.js +15 -0
  248. package/dist/spinner/spinner.d.ts +26 -0
  249. package/dist/spinner/spinner.js +143 -0
  250. package/dist/switch/index.d.ts +3 -0
  251. package/dist/switch/switch.d.ts +6 -0
  252. package/dist/switch/switch.js +25 -0
  253. package/dist/table/index.d.ts +3 -0
  254. package/dist/table/table.d.ts +17 -0
  255. package/dist/table/table.js +66 -0
  256. package/dist/tabs/index.d.ts +3 -0
  257. package/dist/tabs/tabs.d.ts +11 -0
  258. package/dist/tabs/tabs.js +46 -0
  259. package/dist/textarea/index.d.ts +3 -0
  260. package/dist/textarea/textarea.d.ts +4 -0
  261. package/dist/textarea/textarea.js +12 -0
  262. package/dist/toast/index.d.ts +3 -0
  263. package/dist/toast/toast.d.ts +17 -0
  264. package/dist/toast/toast.js +211 -0
  265. package/dist/toggle-group/index.d.ts +3 -0
  266. package/dist/toggle-group/toggle-group.d.ts +64 -0
  267. package/dist/toggle-group/toggle-group.js +95 -0
  268. package/dist/tokens/dist/motion.d.ts +24 -0
  269. package/dist/{motion-NQq2BA78.js → tokens/dist/motion.js} +1 -1
  270. package/dist/toolbar/index.d.ts +3 -0
  271. package/dist/toolbar/overflow.d.ts +4 -0
  272. package/dist/toolbar/overflow.js +242 -0
  273. package/dist/toolbar/toolbar-item.d.ts +29 -0
  274. package/dist/toolbar/toolbar-item.js +71 -0
  275. package/dist/toolbar/toolbar.d.ts +73 -0
  276. package/dist/toolbar/toolbar.js +250 -0
  277. package/dist/tooltip/index.d.ts +3 -0
  278. package/dist/tooltip/tooltip.d.ts +7 -0
  279. package/dist/tooltip/tooltip.js +41 -0
  280. package/package.json +9 -5
  281. package/src/feel.css +52 -0
  282. package/src/styles-base.css +142 -0
  283. package/src/styles.css +3 -133
  284. package/dist/registry-2PyPW9Xw.js +0 -390
  285. package/dist/registry-DjfWNw3R.d.ts +0 -18
  286. package/dist/sound-DiYNAnR_.d.ts +0 -61
@@ -0,0 +1,11 @@
1
+
2
+ import { Button } from "../button/button.js";
3
+ import * as React from "react";
4
+ import { DayButton, DayPicker, Locale } from "react-day-picker";
5
+ declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, locale, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
6
+ buttonVariant?: React.ComponentProps<typeof Button>["variant"];
7
+ }): React.JSX.Element;
8
+ declare function CalendarDayButton({ className, day, modifiers, locale, onClick, "aria-label": label, ...props }: React.ComponentProps<typeof DayButton> & {
9
+ locale?: Partial<Locale>;
10
+ }): React.JSX.Element;
11
+ export { Calendar, CalendarDayButton };
@@ -0,0 +1,131 @@
1
+ "use client";
2
+ "use client";
3
+ import { cn } from "../lib/cn.js";
4
+ import { useCue } from "../sound/sound-map.js";
5
+ import { Button, buttonVariants } from "../button/button.js";
6
+ import { jsx } from "react/jsx-runtime";
7
+ import * as React from "react";
8
+ import { DayPicker, getDefaultClassNames } from "react-day-picker";
9
+ // src/calendar/calendar.tsx
10
+ /** Lucide's chevrons, in place of shadcn's icon placeholder. */
11
+ function ChevronIcon({ className, orientation }) {
12
+ return /* @__PURE__ */ jsx("svg", {
13
+ xmlns: "http://www.w3.org/2000/svg",
14
+ viewBox: "0 0 24 24",
15
+ fill: "none",
16
+ stroke: "currentColor",
17
+ strokeWidth: "2",
18
+ strokeLinecap: "round",
19
+ strokeLinejoin: "round",
20
+ "aria-hidden": "true",
21
+ className,
22
+ children: /* @__PURE__ */ jsx("path", { d: orientation === "left" ? "m15 18-6-6 6-6" : orientation === "right" ? "m9 18 6-6-6-6" : "m6 9 6 6 6-6" })
23
+ });
24
+ }
25
+ function Calendar({ className, classNames, showOutsideDays = true, captionLayout = "label", buttonVariant = "ghost", locale, formatters, components, ...props }) {
26
+ const defaultClassNames = getDefaultClassNames();
27
+ return /* @__PURE__ */ jsx(DayPicker, {
28
+ showOutsideDays,
29
+ className: cn("group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent", String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`, className),
30
+ captionLayout,
31
+ locale,
32
+ formatters: {
33
+ formatMonthDropdown: (date) => date.toLocaleString(locale?.code, { month: "short" }),
34
+ ...formatters
35
+ },
36
+ classNames: {
37
+ root: cn("w-fit", defaultClassNames.root),
38
+ months: cn("relative flex flex-col gap-4 md:flex-row", defaultClassNames.months),
39
+ month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
40
+ nav: cn("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", defaultClassNames.nav),
41
+ button_previous: cn(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_previous),
42
+ button_next: cn(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_next),
43
+ month_caption: cn("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", defaultClassNames.month_caption),
44
+ dropdowns: cn("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium", defaultClassNames.dropdowns),
45
+ dropdown_root: cn("cn-calendar-dropdown-root relative rounded-(--cell-radius)", defaultClassNames.dropdown_root),
46
+ dropdown: cn("absolute inset-0 bg-popover opacity-0", defaultClassNames.dropdown),
47
+ caption_label: cn("font-medium select-none", captionLayout === "label" ? "cn-calendar-caption text-sm" : "cn-calendar-caption-label flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground", defaultClassNames.caption_label),
48
+ month_grid: cn("w-full border-collapse", defaultClassNames.month_grid),
49
+ weekdays: cn("flex", defaultClassNames.weekdays),
50
+ weekday: cn("flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none", defaultClassNames.weekday),
51
+ week: cn("mt-2 flex w-full", defaultClassNames.week),
52
+ week_number_header: cn("w-(--cell-size) select-none", defaultClassNames.week_number_header),
53
+ week_number: cn("text-[0.8rem] text-muted-foreground select-none", defaultClassNames.week_number),
54
+ day: cn("group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)", props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)", defaultClassNames.day),
55
+ range_start: cn("relative isolate z-0 rounded-l-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted", defaultClassNames.range_start),
56
+ range_middle: cn("rounded-none", defaultClassNames.range_middle),
57
+ range_end: cn("relative isolate z-0 rounded-r-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted", defaultClassNames.range_end),
58
+ today: cn("rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none", defaultClassNames.today),
59
+ outside: cn("text-muted-foreground aria-selected:text-muted-foreground", defaultClassNames.outside),
60
+ disabled: cn("text-muted-foreground opacity-50", defaultClassNames.disabled),
61
+ hidden: cn("invisible", defaultClassNames.hidden),
62
+ ...classNames
63
+ },
64
+ components: {
65
+ Root: ({ className, rootRef, ...props }) => {
66
+ return /* @__PURE__ */ jsx("div", {
67
+ "data-slot": "calendar",
68
+ ref: rootRef,
69
+ className: cn(className),
70
+ ...props
71
+ });
72
+ },
73
+ Chevron: ({ className, orientation }) => {
74
+ if (orientation === "left") return /* @__PURE__ */ jsx(ChevronIcon, {
75
+ orientation: "left",
76
+ className: cn("cn-rtl-flip size-4", className)
77
+ });
78
+ if (orientation === "right") return /* @__PURE__ */ jsx(ChevronIcon, {
79
+ orientation: "right",
80
+ className: cn("cn-rtl-flip size-4", className)
81
+ });
82
+ return /* @__PURE__ */ jsx(ChevronIcon, {
83
+ orientation: "down",
84
+ className: cn("size-4", className)
85
+ });
86
+ },
87
+ DayButton: ({ ...props }) => /* @__PURE__ */ jsx(CalendarDayButton, {
88
+ locale,
89
+ ...props
90
+ }),
91
+ WeekNumber: ({ children, ...props }) => {
92
+ return /* @__PURE__ */ jsx("td", {
93
+ ...props,
94
+ children: /* @__PURE__ */ jsx("div", {
95
+ className: "flex size-(--cell-size) items-center justify-center text-center",
96
+ children
97
+ })
98
+ });
99
+ },
100
+ ...components
101
+ },
102
+ ...props
103
+ });
104
+ }
105
+ function CalendarDayButton({ className, day, modifiers, locale, onClick, "aria-label": label, ...props }) {
106
+ const defaultClassNames = getDefaultClassNames();
107
+ const cue = useCue("calendar");
108
+ const ref = React.useRef(null);
109
+ React.useEffect(() => {
110
+ if (modifiers.focused) ref.current?.focus();
111
+ }, [modifiers.focused]);
112
+ return /* @__PURE__ */ jsx(Button, {
113
+ variant: "ghost",
114
+ size: "icon",
115
+ "data-day": day.date.toLocaleDateString(locale?.code),
116
+ "data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
117
+ "data-range-start": modifiers.range_start,
118
+ "data-range-end": modifiers.range_end,
119
+ "data-range-middle": modifiers.range_middle,
120
+ ref,
121
+ "aria-label": label?.replace(/\b(\d{1,2})(?:st|nd|rd|th)\b/, "$1"),
122
+ "aria-current": modifiers.today ? "date" : void 0,
123
+ onClick: (event) => {
124
+ onClick?.(event);
125
+ if (!modifiers.disabled) cue("select");
126
+ },
127
+ className: cn("relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70", defaultClassNames.day, className),
128
+ ...props
129
+ });
130
+ }
131
+ export { Calendar, CalendarDayButton };
@@ -0,0 +1,3 @@
1
+
2
+ import { Calendar, CalendarDayButton } from "./calendar.js";
3
+ export { Calendar, CalendarDayButton };
@@ -0,0 +1,12 @@
1
+
2
+ import * as React from "react";
3
+ declare function Card({ className, size, ...props }: React.ComponentProps<"div"> & {
4
+ size?: "default" | "sm";
5
+ }): React.JSX.Element;
6
+ declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
7
+ declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
8
+ declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
9
+ declare function CardAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
10
+ declare function CardContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
11
+ declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
12
+ export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
@@ -0,0 +1,55 @@
1
+ "use client";
2
+ import { cn } from "../lib/cn.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ // src/card/card.tsx
5
+ function Card({ className, size = "default", ...props }) {
6
+ return /* @__PURE__ */ jsx("div", {
7
+ "data-slot": "card",
8
+ "data-size": size,
9
+ className: cn("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl", className),
10
+ ...props
11
+ });
12
+ }
13
+ function CardHeader({ className, ...props }) {
14
+ return /* @__PURE__ */ jsx("div", {
15
+ "data-slot": "card-header",
16
+ className: cn("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)", className),
17
+ ...props
18
+ });
19
+ }
20
+ function CardTitle({ className, ...props }) {
21
+ return /* @__PURE__ */ jsx("div", {
22
+ "data-slot": "card-title",
23
+ className: cn("cn-font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm", className),
24
+ ...props
25
+ });
26
+ }
27
+ function CardDescription({ className, ...props }) {
28
+ return /* @__PURE__ */ jsx("div", {
29
+ "data-slot": "card-description",
30
+ className: cn("text-sm text-muted-foreground", className),
31
+ ...props
32
+ });
33
+ }
34
+ function CardAction({ className, ...props }) {
35
+ return /* @__PURE__ */ jsx("div", {
36
+ "data-slot": "card-action",
37
+ className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
38
+ ...props
39
+ });
40
+ }
41
+ function CardContent({ className, ...props }) {
42
+ return /* @__PURE__ */ jsx("div", {
43
+ "data-slot": "card-content",
44
+ className: cn("px-(--card-spacing)", className),
45
+ ...props
46
+ });
47
+ }
48
+ function CardFooter({ className, ...props }) {
49
+ return /* @__PURE__ */ jsx("div", {
50
+ "data-slot": "card-footer",
51
+ className: cn("flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)", className),
52
+ ...props
53
+ });
54
+ }
55
+ export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
@@ -0,0 +1,3 @@
1
+
2
+ import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "./card.js";
3
+ export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
@@ -0,0 +1,4 @@
1
+
2
+ import { Checkbox } from "@base-ui/react/checkbox";
3
+ declare function Checkbox$1({ className, onCheckedChange, ...props }: Checkbox.Root.Props): import("react").JSX.Element;
4
+ export { Checkbox$1 as Checkbox };
@@ -0,0 +1,35 @@
1
+ "use client";
2
+ "use client";
3
+ import { cn } from "../lib/cn.js";
4
+ import { useCue } from "../sound/sound-map.js";
5
+ import { jsx } from "react/jsx-runtime";
6
+ import { Checkbox } from "@base-ui/react/checkbox";
7
+ // src/checkbox/checkbox.tsx
8
+ function Checkbox$1({ className, onCheckedChange, ...props }) {
9
+ const cue = useCue("checkbox");
10
+ return /* @__PURE__ */ jsx(Checkbox.Root, {
11
+ "data-slot": "checkbox",
12
+ className: cn("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 data-disabled:cursor-not-allowed data-disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary", className),
13
+ onCheckedChange: (checked, details) => {
14
+ onCheckedChange?.(checked, details);
15
+ if (!details.isCanceled) cue(checked ? "on" : "off");
16
+ },
17
+ ...props,
18
+ children: /* @__PURE__ */ jsx(Checkbox.Indicator, {
19
+ "data-slot": "checkbox-indicator",
20
+ className: "grid place-content-center text-current transition-none [&>svg]:size-3.5",
21
+ children: /* @__PURE__ */ jsx("svg", {
22
+ xmlns: "http://www.w3.org/2000/svg",
23
+ viewBox: "0 0 24 24",
24
+ fill: "none",
25
+ stroke: "currentColor",
26
+ strokeWidth: "2",
27
+ strokeLinecap: "round",
28
+ strokeLinejoin: "round",
29
+ "aria-hidden": "true",
30
+ children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" })
31
+ })
32
+ })
33
+ });
34
+ }
35
+ export { Checkbox$1 as Checkbox };
@@ -0,0 +1,3 @@
1
+
2
+ import { Checkbox } from "./checkbox.js";
3
+ export { Checkbox };
@@ -0,0 +1,6 @@
1
+
2
+ import { Collapsible } from "@base-ui/react/collapsible";
3
+ declare function Collapsible$1({ ...props }: Collapsible.Root.Props): import("react").JSX.Element;
4
+ declare function CollapsibleTrigger({ ...props }: Collapsible.Trigger.Props): import("react").JSX.Element;
5
+ declare function CollapsibleContent({ ...props }: Collapsible.Panel.Props): import("react").JSX.Element;
6
+ export { Collapsible$1 as Collapsible, CollapsibleContent, CollapsibleTrigger };
@@ -0,0 +1,24 @@
1
+ "use client";
2
+ "use client";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { Collapsible } from "@base-ui/react/collapsible";
5
+ // src/collapsible/collapsible.tsx
6
+ function Collapsible$1({ ...props }) {
7
+ return /* @__PURE__ */ jsx(Collapsible.Root, {
8
+ "data-slot": "collapsible",
9
+ ...props
10
+ });
11
+ }
12
+ function CollapsibleTrigger({ ...props }) {
13
+ return /* @__PURE__ */ jsx(Collapsible.Trigger, {
14
+ "data-slot": "collapsible-trigger",
15
+ ...props
16
+ });
17
+ }
18
+ function CollapsibleContent({ ...props }) {
19
+ return /* @__PURE__ */ jsx(Collapsible.Panel, {
20
+ "data-slot": "collapsible-content",
21
+ ...props
22
+ });
23
+ }
24
+ export { Collapsible$1 as Collapsible, CollapsibleContent, CollapsibleTrigger };
@@ -0,0 +1,3 @@
1
+
2
+ import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "./collapsible.js";
3
+ export { Collapsible, CollapsibleContent, CollapsibleTrigger };
@@ -0,0 +1,27 @@
1
+
2
+ import * as React from "react";
3
+ import { Combobox } from "@base-ui/react/combobox";
4
+ declare function Combobox$1<Value, Multiple extends boolean | undefined = false, Item = Value>({ onValueChange, ...props }: Combobox.Root.Props<Value, Multiple, Item>): React.JSX.Element;
5
+ declare function ComboboxValue({ ...props }: Combobox.Value.Props): React.JSX.Element;
6
+ declare function ComboboxTrigger({ className, children, ...props }: Combobox.Trigger.Props): React.JSX.Element;
7
+ declare function ComboboxInput({ className, children, disabled, showTrigger, showClear, ...props }: Combobox.Input.Props & {
8
+ showTrigger?: boolean;
9
+ showClear?: boolean;
10
+ }): React.JSX.Element;
11
+ declare function ComboboxContent({ className, side, sideOffset, align, alignOffset, anchor, ...props }: Combobox.Popup.Props & Pick<Combobox.Positioner.Props, "side" | "align" | "sideOffset" | "alignOffset" | "anchor">): React.JSX.Element;
12
+ declare function ComboboxList({ className, ...props }: Combobox.List.Props): React.JSX.Element;
13
+ declare function ComboboxItem({ className, children, ...props }: Combobox.Item.Props): React.JSX.Element;
14
+ declare function ComboboxGroup({ className, ...props }: Combobox.Group.Props): React.JSX.Element;
15
+ declare function ComboboxLabel({ className, ...props }: Combobox.GroupLabel.Props): React.JSX.Element;
16
+ declare function ComboboxCollection({ ...props }: Combobox.Collection.Props): React.JSX.Element;
17
+ declare function ComboboxEmpty({ className, ...props }: Combobox.Empty.Props): React.JSX.Element;
18
+ declare function ComboboxSeparator({ className, ...props }: Combobox.Separator.Props): React.JSX.Element;
19
+ declare function ComboboxChips({ className, ...props }: React.ComponentPropsWithRef<typeof Combobox.Chips> & Combobox.Chips.Props): React.JSX.Element;
20
+ declare function ComboboxChip({ className, children, showRemove, removeLabel, ...props }: Combobox.Chip.Props & {
21
+ showRemove?: boolean;
22
+ /** Nsaa (#92, Proposed): the remove button's accessible name. */
23
+ removeLabel?: string;
24
+ }): React.JSX.Element;
25
+ declare function ComboboxChipsInput({ className, ...props }: Combobox.Input.Props): React.JSX.Element;
26
+ declare function useComboboxAnchor(): React.RefObject<HTMLDivElement | null>;
27
+ export { Combobox$1 as Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, useComboboxAnchor };
@@ -0,0 +1,226 @@
1
+ "use client";
2
+ "use client";
3
+ import { cn } from "../lib/cn.js";
4
+ import { useCue } from "../sound/sound-map.js";
5
+ import { Button } from "../button/button.js";
6
+ import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "../input-group/input-group.js";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ import * as React from "react";
9
+ import { Combobox } from "@base-ui/react/combobox";
10
+ // src/combobox/combobox.tsx
11
+ const COMBOBOX_CUE = {
12
+ "item-press": "choose",
13
+ "clear-press": "clear",
14
+ "escape-key": "clear",
15
+ "chip-remove-press": "chip-remove"
16
+ };
17
+ function Combobox$1({ onValueChange, ...props }) {
18
+ const cue = useCue("combobox");
19
+ return /* @__PURE__ */ jsx(Combobox.Root, {
20
+ onValueChange: (value, details) => {
21
+ onValueChange?.(value, details);
22
+ const reason = details.reason === "none" && Array.isArray(value) ? "chip-remove-press" : details.reason;
23
+ const event = COMBOBOX_CUE[reason];
24
+ if (!details.isCanceled && event) cue(event);
25
+ },
26
+ ...props
27
+ });
28
+ }
29
+ function ComboboxValue({ ...props }) {
30
+ return /* @__PURE__ */ jsx(Combobox.Value, {
31
+ "data-slot": "combobox-value",
32
+ ...props
33
+ });
34
+ }
35
+ function ComboboxTrigger({ className, children, ...props }) {
36
+ return /* @__PURE__ */ jsxs(Combobox.Trigger, {
37
+ "data-slot": "combobox-trigger",
38
+ "aria-label": "Show options",
39
+ className: cn("[&_svg:not([class*='size-'])]:size-4", className),
40
+ ...props,
41
+ children: [children, /* @__PURE__ */ jsx("svg", {
42
+ xmlns: "http://www.w3.org/2000/svg",
43
+ viewBox: "0 0 24 24",
44
+ fill: "none",
45
+ stroke: "currentColor",
46
+ strokeWidth: "2",
47
+ strokeLinecap: "round",
48
+ strokeLinejoin: "round",
49
+ className: "pointer-events-none size-4 text-muted-foreground",
50
+ "aria-hidden": "true",
51
+ children: /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" })
52
+ })]
53
+ });
54
+ }
55
+ function ComboboxClear({ className, ...props }) {
56
+ return /* @__PURE__ */ jsx(Combobox.Clear, {
57
+ "data-slot": "combobox-clear",
58
+ "aria-label": "Clear",
59
+ render: /* @__PURE__ */ jsx(InputGroupButton, {
60
+ variant: "ghost",
61
+ size: "icon-xs"
62
+ }),
63
+ className: cn(className),
64
+ ...props,
65
+ children: /* @__PURE__ */ jsxs("svg", {
66
+ xmlns: "http://www.w3.org/2000/svg",
67
+ viewBox: "0 0 24 24",
68
+ fill: "none",
69
+ stroke: "currentColor",
70
+ strokeWidth: "2",
71
+ strokeLinecap: "round",
72
+ strokeLinejoin: "round",
73
+ className: "pointer-events-none",
74
+ "aria-hidden": "true",
75
+ children: [/* @__PURE__ */ jsx("path", { d: "M18 6 6 18" }), /* @__PURE__ */ jsx("path", { d: "m6 6 12 12" })]
76
+ })
77
+ });
78
+ }
79
+ function ComboboxInput({ className, children, disabled = false, showTrigger = true, showClear = false, ...props }) {
80
+ return /* @__PURE__ */ jsxs(InputGroup, {
81
+ className: cn("w-auto", className),
82
+ children: [
83
+ /* @__PURE__ */ jsx(Combobox.Input, {
84
+ render: /* @__PURE__ */ jsx(InputGroupInput, { disabled }),
85
+ ...props
86
+ }),
87
+ /* @__PURE__ */ jsxs(InputGroupAddon, {
88
+ align: "inline-end",
89
+ children: [showTrigger && /* @__PURE__ */ jsx(InputGroupButton, {
90
+ size: "icon-xs",
91
+ variant: "ghost",
92
+ render: /* @__PURE__ */ jsx(ComboboxTrigger, {}),
93
+ "data-slot": "input-group-button",
94
+ className: "group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent",
95
+ disabled
96
+ }), showClear && /* @__PURE__ */ jsx(ComboboxClear, { disabled })]
97
+ }),
98
+ children
99
+ ]
100
+ });
101
+ }
102
+ function ComboboxContent({ className, side = "bottom", sideOffset = 6, align = "start", alignOffset = 0, anchor, ...props }) {
103
+ return /* @__PURE__ */ jsx(Combobox.Portal, { children: /* @__PURE__ */ jsx(Combobox.Positioner, {
104
+ side,
105
+ sideOffset,
106
+ align,
107
+ alignOffset,
108
+ anchor,
109
+ className: "isolate z-50",
110
+ children: /* @__PURE__ */ jsx(Combobox.Popup, {
111
+ "data-slot": "combobox-content",
112
+ "data-chips": !!anchor,
113
+ className: cn("cn-menu-target cn-menu-translucent group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
114
+ ...props
115
+ })
116
+ }) });
117
+ }
118
+ function ComboboxList({ className, ...props }) {
119
+ return /* @__PURE__ */ jsx(Combobox.List, {
120
+ "data-slot": "combobox-list",
121
+ className: cn("no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0", className),
122
+ ...props
123
+ });
124
+ }
125
+ function ComboboxItem({ className, children, ...props }) {
126
+ return /* @__PURE__ */ jsxs(Combobox.Item, {
127
+ "data-slot": "combobox-item",
128
+ className: cn("relative flex w-full cursor-default items-center gap-2 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
129
+ ...props,
130
+ children: [children, /* @__PURE__ */ jsx(Combobox.ItemIndicator, {
131
+ render: /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }),
132
+ children: /* @__PURE__ */ jsx("svg", {
133
+ xmlns: "http://www.w3.org/2000/svg",
134
+ viewBox: "0 0 24 24",
135
+ fill: "none",
136
+ stroke: "currentColor",
137
+ strokeWidth: "2",
138
+ strokeLinecap: "round",
139
+ strokeLinejoin: "round",
140
+ className: "pointer-events-none",
141
+ "aria-hidden": "true",
142
+ children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" })
143
+ })
144
+ })]
145
+ });
146
+ }
147
+ function ComboboxGroup({ className, ...props }) {
148
+ return /* @__PURE__ */ jsx(Combobox.Group, {
149
+ "data-slot": "combobox-group",
150
+ className: cn(className),
151
+ ...props
152
+ });
153
+ }
154
+ function ComboboxLabel({ className, ...props }) {
155
+ return /* @__PURE__ */ jsx(Combobox.GroupLabel, {
156
+ "data-slot": "combobox-label",
157
+ className: cn("px-2 py-1.5 text-xs text-muted-foreground", className),
158
+ ...props
159
+ });
160
+ }
161
+ function ComboboxCollection({ ...props }) {
162
+ return /* @__PURE__ */ jsx(Combobox.Collection, {
163
+ "data-slot": "combobox-collection",
164
+ ...props
165
+ });
166
+ }
167
+ function ComboboxEmpty({ className, ...props }) {
168
+ return /* @__PURE__ */ jsx(Combobox.Empty, {
169
+ "data-slot": "combobox-empty",
170
+ className: cn("hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex", className),
171
+ ...props
172
+ });
173
+ }
174
+ function ComboboxSeparator({ className, ...props }) {
175
+ return /* @__PURE__ */ jsx(Combobox.Separator, {
176
+ "data-slot": "combobox-separator",
177
+ className: cn("-mx-1 my-1 h-px bg-border", className),
178
+ ...props
179
+ });
180
+ }
181
+ function ComboboxChips({ className, ...props }) {
182
+ return /* @__PURE__ */ jsx(Combobox.Chips, {
183
+ "data-slot": "combobox-chips",
184
+ className: cn("flex min-h-8 flex-wrap items-center gap-1 rounded-lg border border-input bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40", className),
185
+ ...props
186
+ });
187
+ }
188
+ function ComboboxChip({ className, children, showRemove = true, removeLabel = typeof children === "string" ? `Remove ${children}` : "Remove", ...props }) {
189
+ return /* @__PURE__ */ jsxs(Combobox.Chip, {
190
+ "data-slot": "combobox-chip",
191
+ className: cn("flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0", className),
192
+ ...props,
193
+ children: [children, showRemove && /* @__PURE__ */ jsx(Combobox.ChipRemove, {
194
+ render: /* @__PURE__ */ jsx(Button, {
195
+ variant: "ghost",
196
+ size: "icon-xs"
197
+ }),
198
+ className: "-ml-1 opacity-50 hover:opacity-100",
199
+ "data-slot": "combobox-chip-remove",
200
+ "aria-label": removeLabel,
201
+ children: /* @__PURE__ */ jsxs("svg", {
202
+ xmlns: "http://www.w3.org/2000/svg",
203
+ viewBox: "0 0 24 24",
204
+ fill: "none",
205
+ stroke: "currentColor",
206
+ strokeWidth: "2",
207
+ strokeLinecap: "round",
208
+ strokeLinejoin: "round",
209
+ className: "pointer-events-none",
210
+ "aria-hidden": "true",
211
+ children: [/* @__PURE__ */ jsx("path", { d: "M18 6 6 18" }), /* @__PURE__ */ jsx("path", { d: "m6 6 12 12" })]
212
+ })
213
+ })]
214
+ });
215
+ }
216
+ function ComboboxChipsInput({ className, ...props }) {
217
+ return /* @__PURE__ */ jsx(Combobox.Input, {
218
+ "data-slot": "combobox-chip-input",
219
+ className: cn("min-w-16 flex-1 outline-none", className),
220
+ ...props
221
+ });
222
+ }
223
+ function useComboboxAnchor() {
224
+ return React.useRef(null);
225
+ }
226
+ export { Combobox$1 as Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, useComboboxAnchor };
@@ -0,0 +1,3 @@
1
+
2
+ import { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, useComboboxAnchor } from "./combobox.js";
3
+ export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, useComboboxAnchor };
@@ -0,0 +1,20 @@
1
+
2
+ import { Dialog } from "../dialog/dialog.js";
3
+ import * as React from "react";
4
+ import { Command } from "cmdk";
5
+ declare function Command$1({ className, ...props }: React.ComponentProps<typeof Command>): React.JSX.Element;
6
+ declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: Omit<React.ComponentProps<typeof Dialog>, "children"> & {
7
+ title?: string;
8
+ description?: string;
9
+ className?: string;
10
+ showCloseButton?: boolean;
11
+ children: React.ReactNode;
12
+ }): React.JSX.Element;
13
+ declare function CommandInput({ className, ...props }: React.ComponentProps<typeof Command.Input>): React.JSX.Element;
14
+ declare function CommandList({ className, ...props }: React.ComponentProps<typeof Command.List>): React.JSX.Element;
15
+ declare function CommandEmpty({ className, ...props }: React.ComponentProps<typeof Command.Empty>): React.JSX.Element;
16
+ declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof Command.Group>): React.JSX.Element;
17
+ declare function CommandSeparator({ className, alwaysRender, ...props }: React.ComponentProps<typeof Command.Separator>): React.JSX.Element | null;
18
+ declare function CommandItem({ className, children, ...props }: React.ComponentProps<typeof Command.Item>): React.JSX.Element;
19
+ declare function CommandShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
20
+ export { Command$1 as Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };