@journ/bloom 0.1.1

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 (278) hide show
  1. package/DESIGN.md +287 -0
  2. package/LICENSE +21 -0
  3. package/README.md +59 -0
  4. package/dist/accordion-parts.d.ts +9 -0
  5. package/dist/accordion-parts.js +37 -0
  6. package/dist/accordion.d.ts +10 -0
  7. package/dist/accordion.js +10 -0
  8. package/dist/alert-dialog-parts.d.ts +16 -0
  9. package/dist/alert-dialog-parts.js +33 -0
  10. package/dist/alert-dialog.d.ts +15 -0
  11. package/dist/alert-dialog.js +15 -0
  12. package/dist/alert.d.ts +48 -0
  13. package/dist/alert.js +51 -0
  14. package/dist/animated-size.d.ts +6 -0
  15. package/dist/animated-size.js +12 -0
  16. package/dist/avatar-parts.d.ts +10 -0
  17. package/dist/avatar-parts.js +20 -0
  18. package/dist/avatar.d.ts +9 -0
  19. package/dist/avatar.js +9 -0
  20. package/dist/badge.d.ts +38 -0
  21. package/dist/badge.js +22 -0
  22. package/dist/breadcrumbs.d.ts +18 -0
  23. package/dist/breadcrumbs.js +44 -0
  24. package/dist/bulk-bar.d.ts +13 -0
  25. package/dist/bulk-bar.js +27 -0
  26. package/dist/button.d.ts +40 -0
  27. package/dist/button.js +41 -0
  28. package/dist/calendar-parts.d.ts +17 -0
  29. package/dist/calendar-parts.js +90 -0
  30. package/dist/calendar.d.ts +17 -0
  31. package/dist/calendar.js +17 -0
  32. package/dist/card.d.ts +51 -0
  33. package/dist/card.js +63 -0
  34. package/dist/carousel-parts.d.ts +13 -0
  35. package/dist/carousel-parts.js +53 -0
  36. package/dist/carousel.d.ts +11 -0
  37. package/dist/carousel.js +11 -0
  38. package/dist/checkbox-parts.d.ts +8 -0
  39. package/dist/checkbox-parts.js +21 -0
  40. package/dist/checkbox.d.ts +8 -0
  41. package/dist/checkbox.js +8 -0
  42. package/dist/chip.d.ts +45 -0
  43. package/dist/chip.js +55 -0
  44. package/dist/collapsible-parts.d.ts +8 -0
  45. package/dist/collapsible-parts.js +22 -0
  46. package/dist/collapsible.d.ts +9 -0
  47. package/dist/collapsible.js +9 -0
  48. package/dist/combobox-parts.d.ts +22 -0
  49. package/dist/combobox-parts.js +54 -0
  50. package/dist/combobox.d.ts +26 -0
  51. package/dist/combobox.js +21 -0
  52. package/dist/command-palette-parts.d.ts +13 -0
  53. package/dist/command-palette-parts.js +19 -0
  54. package/dist/command-palette.d.ts +17 -0
  55. package/dist/command-palette.js +17 -0
  56. package/dist/composer.d.ts +12 -0
  57. package/dist/composer.js +21 -0
  58. package/dist/context-menu-parts.d.ts +15 -0
  59. package/dist/context-menu-parts.js +10 -0
  60. package/dist/context-menu.d.ts +20 -0
  61. package/dist/context-menu.js +13 -0
  62. package/dist/currency-input-parts.d.ts +8 -0
  63. package/dist/currency-input-parts.js +13 -0
  64. package/dist/currency-input.d.ts +8 -0
  65. package/dist/currency-input.js +8 -0
  66. package/dist/data-table-parts.d.ts +10 -0
  67. package/dist/data-table-parts.js +65 -0
  68. package/dist/data-table.d.ts +12 -0
  69. package/dist/data-table.js +12 -0
  70. package/dist/date-input-parts.d.ts +7 -0
  71. package/dist/date-input-parts.js +12 -0
  72. package/dist/date-input.d.ts +8 -0
  73. package/dist/date-input.js +8 -0
  74. package/dist/date-picker-parts.d.ts +11 -0
  75. package/dist/date-picker-parts.js +8 -0
  76. package/dist/date-picker.d.ts +20 -0
  77. package/dist/date-picker.js +15 -0
  78. package/dist/date-range-picker-parts.d.ts +11 -0
  79. package/dist/date-range-picker-parts.js +8 -0
  80. package/dist/date-range-picker.d.ts +20 -0
  81. package/dist/date-range-picker.js +15 -0
  82. package/dist/description-list.d.ts +12 -0
  83. package/dist/description-list.js +23 -0
  84. package/dist/dialog-parts.d.ts +15 -0
  85. package/dist/dialog-parts.js +32 -0
  86. package/dist/dialog.d.ts +15 -0
  87. package/dist/dialog.js +15 -0
  88. package/dist/divider.d.ts +6 -0
  89. package/dist/divider.js +12 -0
  90. package/dist/drawer-parts.d.ts +13 -0
  91. package/dist/drawer-parts.js +31 -0
  92. package/dist/drawer.d.ts +15 -0
  93. package/dist/drawer.js +15 -0
  94. package/dist/dropdown-menu-parts.d.ts +15 -0
  95. package/dist/dropdown-menu-parts.js +10 -0
  96. package/dist/dropdown-menu.d.ts +20 -0
  97. package/dist/dropdown-menu.js +13 -0
  98. package/dist/empty-state.d.ts +16 -0
  99. package/dist/empty-state.js +40 -0
  100. package/dist/field-parts.d.ts +10 -0
  101. package/dist/field-parts.js +25 -0
  102. package/dist/field.d.ts +11 -0
  103. package/dist/field.js +11 -0
  104. package/dist/file-dropzone-parts.d.ts +12 -0
  105. package/dist/file-dropzone-parts.js +32 -0
  106. package/dist/file-dropzone.d.ts +10 -0
  107. package/dist/file-dropzone.js +10 -0
  108. package/dist/heading.d.ts +31 -0
  109. package/dist/heading.js +26 -0
  110. package/dist/hover-card-parts.d.ts +8 -0
  111. package/dist/hover-card-parts.js +20 -0
  112. package/dist/hover-card.d.ts +9 -0
  113. package/dist/hover-card.js +9 -0
  114. package/dist/icon-button.d.ts +44 -0
  115. package/dist/icon-button.js +39 -0
  116. package/dist/icon.d.ts +30 -0
  117. package/dist/icon.js +27 -0
  118. package/dist/index.d.ts +96 -0
  119. package/dist/index.js +89 -0
  120. package/dist/input.d.ts +7 -0
  121. package/dist/input.js +14 -0
  122. package/dist/lib/cn.d.ts +6 -0
  123. package/dist/lib/cn.js +7 -0
  124. package/dist/lib/icon-tile.d.ts +32 -0
  125. package/dist/lib/icon-tile.js +23 -0
  126. package/dist/lib/interactive.d.ts +11 -0
  127. package/dist/lib/interactive.js +19 -0
  128. package/dist/lib/menu-parts.d.ts +25 -0
  129. package/dist/lib/menu-parts.js +41 -0
  130. package/dist/lib/modal-content.d.ts +10 -0
  131. package/dist/lib/modal-content.js +17 -0
  132. package/dist/lib/modal-parts.d.ts +7 -0
  133. package/dist/lib/modal-parts.js +15 -0
  134. package/dist/lib/overlay.d.ts +41 -0
  135. package/dist/lib/overlay.js +22 -0
  136. package/dist/lib/picker.d.ts +18 -0
  137. package/dist/lib/picker.js +25 -0
  138. package/dist/lib/text-styles.d.ts +25 -0
  139. package/dist/lib/text-styles.js +25 -0
  140. package/dist/lib/theme.d.ts +43 -0
  141. package/dist/lib/theme.js +45 -0
  142. package/dist/lib/tones.d.ts +52 -0
  143. package/dist/lib/tones.js +55 -0
  144. package/dist/lib/tv.d.ts +2 -0
  145. package/dist/lib/tv.js +2 -0
  146. package/dist/lib/use-enter.d.ts +15 -0
  147. package/dist/lib/use-enter.js +54 -0
  148. package/dist/link.d.ts +8 -0
  149. package/dist/link.js +13 -0
  150. package/dist/markdown.d.ts +10 -0
  151. package/dist/markdown.js +70 -0
  152. package/dist/message.d.ts +15 -0
  153. package/dist/message.js +25 -0
  154. package/dist/month-picker-parts.d.ts +2 -0
  155. package/dist/month-picker-parts.js +3 -0
  156. package/dist/month-picker.d.ts +15 -0
  157. package/dist/month-picker.js +15 -0
  158. package/dist/month-stepper-parts.d.ts +11 -0
  159. package/dist/month-stepper-parts.js +37 -0
  160. package/dist/month-stepper.d.ts +10 -0
  161. package/dist/month-stepper.js +10 -0
  162. package/dist/multiple-selector-parts.d.ts +18 -0
  163. package/dist/multiple-selector-parts.js +28 -0
  164. package/dist/multiple-selector.d.ts +28 -0
  165. package/dist/multiple-selector.js +23 -0
  166. package/dist/nav-bar.d.ts +10 -0
  167. package/dist/nav-bar.js +23 -0
  168. package/dist/navigation-menu-parts.d.ts +12 -0
  169. package/dist/navigation-menu-parts.js +47 -0
  170. package/dist/navigation-menu.d.ts +12 -0
  171. package/dist/navigation-menu.js +12 -0
  172. package/dist/otp-input-parts.d.ts +8 -0
  173. package/dist/otp-input-parts.js +17 -0
  174. package/dist/otp-input.d.ts +9 -0
  175. package/dist/otp-input.js +9 -0
  176. package/dist/page-header.d.ts +12 -0
  177. package/dist/page-header.js +23 -0
  178. package/dist/page.d.ts +45 -0
  179. package/dist/page.js +41 -0
  180. package/dist/pagination.d.ts +18 -0
  181. package/dist/pagination.js +49 -0
  182. package/dist/pill-select.d.ts +5 -0
  183. package/dist/pill-select.js +21 -0
  184. package/dist/popover-parts.d.ts +9 -0
  185. package/dist/popover-parts.js +21 -0
  186. package/dist/popover.d.ts +10 -0
  187. package/dist/popover.js +10 -0
  188. package/dist/portal.d.ts +2 -0
  189. package/dist/portal.js +2 -0
  190. package/dist/progress-parts.d.ts +38 -0
  191. package/dist/progress-parts.js +25 -0
  192. package/dist/progress.d.ts +8 -0
  193. package/dist/progress.js +8 -0
  194. package/dist/quantity-input-parts.d.ts +11 -0
  195. package/dist/quantity-input-parts.js +36 -0
  196. package/dist/quantity-input.d.ts +10 -0
  197. package/dist/quantity-input.js +10 -0
  198. package/dist/radio-parts.d.ts +7 -0
  199. package/dist/radio-parts.js +19 -0
  200. package/dist/radio.d.ts +8 -0
  201. package/dist/radio.js +8 -0
  202. package/dist/scroll-area-parts.d.ts +9 -0
  203. package/dist/scroll-area-parts.js +23 -0
  204. package/dist/scroll-area.d.ts +10 -0
  205. package/dist/scroll-area.js +10 -0
  206. package/dist/select-parts.d.ts +13 -0
  207. package/dist/select-parts.js +46 -0
  208. package/dist/select.d.ts +14 -0
  209. package/dist/select.js +14 -0
  210. package/dist/sheet-parts.d.ts +33 -0
  211. package/dist/sheet-parts.js +41 -0
  212. package/dist/sheet.d.ts +16 -0
  213. package/dist/sheet.js +16 -0
  214. package/dist/sidebar.d.ts +24 -0
  215. package/dist/sidebar.js +58 -0
  216. package/dist/skeleton.d.ts +5 -0
  217. package/dist/skeleton.js +11 -0
  218. package/dist/slider-parts.d.ts +9 -0
  219. package/dist/slider-parts.js +26 -0
  220. package/dist/slider.d.ts +10 -0
  221. package/dist/slider.js +10 -0
  222. package/dist/spinner.d.ts +5 -0
  223. package/dist/spinner.js +10 -0
  224. package/dist/stack-parts.d.ts +39 -0
  225. package/dist/stack-parts.js +35 -0
  226. package/dist/stack.d.ts +10 -0
  227. package/dist/stack.js +10 -0
  228. package/dist/stat.d.ts +14 -0
  229. package/dist/stat.js +29 -0
  230. package/dist/step-button.d.ts +10 -0
  231. package/dist/step-button.js +14 -0
  232. package/dist/stepper-parts.d.ts +10 -0
  233. package/dist/stepper-parts.js +33 -0
  234. package/dist/stepper.d.ts +11 -0
  235. package/dist/stepper.js +11 -0
  236. package/dist/styles.css +2 -0
  237. package/dist/switch-parts.d.ts +7 -0
  238. package/dist/switch-parts.js +19 -0
  239. package/dist/switch.d.ts +8 -0
  240. package/dist/switch.js +8 -0
  241. package/dist/table.d.ts +20 -0
  242. package/dist/table.js +48 -0
  243. package/dist/tabs-parts.d.ts +9 -0
  244. package/dist/tabs-parts.js +25 -0
  245. package/dist/tabs.d.ts +10 -0
  246. package/dist/tabs.js +10 -0
  247. package/dist/tag-input-parts.d.ts +15 -0
  248. package/dist/tag-input-parts.js +24 -0
  249. package/dist/tag-input.d.ts +10 -0
  250. package/dist/tag-input.js +10 -0
  251. package/dist/text-morph.d.ts +6 -0
  252. package/dist/text-morph.js +14 -0
  253. package/dist/text-shimmer.d.ts +9 -0
  254. package/dist/text-shimmer.js +12 -0
  255. package/dist/text.d.ts +38 -0
  256. package/dist/text.js +32 -0
  257. package/dist/textarea.d.ts +5 -0
  258. package/dist/textarea.js +12 -0
  259. package/dist/time-range-parts.d.ts +10 -0
  260. package/dist/time-range-parts.js +22 -0
  261. package/dist/time-range.d.ts +10 -0
  262. package/dist/time-range.js +10 -0
  263. package/dist/toast-parts.d.ts +11 -0
  264. package/dist/toast-parts.js +39 -0
  265. package/dist/toast.d.ts +13 -0
  266. package/dist/toast.js +12 -0
  267. package/dist/toggle-group-parts.d.ts +7 -0
  268. package/dist/toggle-group-parts.js +17 -0
  269. package/dist/toggle-group.d.ts +8 -0
  270. package/dist/toggle-group.js +8 -0
  271. package/dist/tokens.css +64 -0
  272. package/dist/tooltip-parts.d.ts +9 -0
  273. package/dist/tooltip-parts.js +21 -0
  274. package/dist/tooltip.d.ts +10 -0
  275. package/dist/tooltip.js +10 -0
  276. package/dist/touch-target.d.ts +7 -0
  277. package/dist/touch-target.js +10 -0
  278. package/package.json +71 -0
@@ -0,0 +1,53 @@
1
+ "use client";
2
+ import { cn } from "./lib/cn.js";
3
+ import { stepButton } from "./step-button.js";
4
+ import { ChevronLeft, ChevronRight } from "lucide-react";
5
+ import { jsx } from "react/jsx-runtime";
6
+ import * as Nude from "@journ/nude/carousel-parts";
7
+ //#region src/carousel-parts.tsx
8
+ const { useCarousel } = Nude;
9
+ const Root = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Root, {
10
+ ...props,
11
+ className: cn("relative", className)
12
+ });
13
+ const Content = ({ className, ...props }) => {
14
+ const { orientation } = useCarousel();
15
+ return /* @__PURE__ */ jsx(Nude.Content, {
16
+ ...props,
17
+ classNames: { viewport: "overflow-hidden" },
18
+ className: cn("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className)
19
+ });
20
+ };
21
+ const Item = ({ className, ...props }) => {
22
+ const { orientation } = useCarousel();
23
+ return /* @__PURE__ */ jsx(Nude.Item, {
24
+ ...props,
25
+ className: cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "pl-4" : "pt-4", className)
26
+ });
27
+ };
28
+ const Previous = ({ tone, size, className, children, ...props }) => {
29
+ const { orientation } = useCarousel();
30
+ return /* @__PURE__ */ jsx(Nude.Previous, {
31
+ ...props,
32
+ ...stepButton(ChevronLeft, {
33
+ tone: tone ?? "outline",
34
+ size,
35
+ className: cn("rounded-full", orientation === "vertical" && "rotate-90", className),
36
+ children
37
+ })
38
+ });
39
+ };
40
+ const Next = ({ tone, size, className, children, ...props }) => {
41
+ const { orientation } = useCarousel();
42
+ return /* @__PURE__ */ jsx(Nude.Next, {
43
+ ...props,
44
+ ...stepButton(ChevronRight, {
45
+ tone: tone ?? "outline",
46
+ size,
47
+ className: cn("rounded-full", orientation === "vertical" && "rotate-90", className),
48
+ children
49
+ })
50
+ });
51
+ };
52
+ //#endregion
53
+ export { Content, Item, Next, Previous, Root, useCarousel };
@@ -0,0 +1,11 @@
1
+ import { Content, Item, Next, Previous, Root, RootProps, useCarousel } from "./carousel-parts.js";
2
+ //#region src/carousel.d.ts
3
+ declare const Carousel: {
4
+ Root: typeof Root;
5
+ Content: typeof Content;
6
+ Item: typeof Item;
7
+ Previous: typeof Previous;
8
+ Next: typeof Next;
9
+ };
10
+ //#endregion
11
+ export { Carousel, type RootProps as CarouselProps, useCarousel };
@@ -0,0 +1,11 @@
1
+ import { Content, Item, Next, Previous, Root, useCarousel } from "./carousel-parts.js";
2
+ //#region src/carousel.tsx
3
+ const Carousel = {
4
+ Root,
5
+ Content,
6
+ Item,
7
+ Previous,
8
+ Next
9
+ };
10
+ //#endregion
11
+ export { Carousel, useCarousel };
@@ -0,0 +1,8 @@
1
+ import { ComponentPropsWithRef } from "react";
2
+ import * as Nude from "@journ/nude/checkbox-parts";
3
+ //#region src/checkbox-parts.d.ts
4
+ declare const Root: ({ className, children, ...props }: ComponentPropsWithRef<typeof Nude.Root>) => import("react").JSX.Element;
5
+ /** Shows a check, or a minus when the root is indeterminate. Pass children to use your own icon. */
6
+ declare const Indicator: ({ className, children, ...props }: ComponentPropsWithRef<typeof Nude.Indicator>) => import("react").JSX.Element;
7
+ //#endregion
8
+ export { Indicator, Root };
@@ -0,0 +1,21 @@
1
+ "use client";
2
+ import { cn } from "./lib/cn.js";
3
+ import { pressReset } from "./lib/interactive.js";
4
+ import { TouchTarget } from "./touch-target.js";
5
+ import { Check, Minus } from "lucide-react";
6
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
+ import * as Nude from "@journ/nude/checkbox-parts";
8
+ //#region src/checkbox-parts.tsx
9
+ const Root = ({ className, children, ...props }) => /* @__PURE__ */ jsxs(Nude.Root, {
10
+ ...props,
11
+ className: cn(pressReset, "group relative grid size-4 shrink-0 cursor-default place-items-center border border-current/30 outline-none transition-colors", "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-bloom-sky", "data-[state=checked]:bg-current/10", "data-[state=indeterminate]:bg-current/10", "disabled:pointer-events-none disabled:opacity-50", className),
12
+ children: [/* @__PURE__ */ jsx(TouchTarget, {}), children]
13
+ });
14
+ /** Shows a check, or a minus when the root is indeterminate. Pass children to use your own icon. */
15
+ const Indicator = ({ className, children, ...props }) => /* @__PURE__ */ jsx(Nude.Indicator, {
16
+ ...props,
17
+ className: cn("grid place-items-center [&>svg]:size-3", className),
18
+ children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Check, { className: "group-data-[state=indeterminate]:hidden" }), /* @__PURE__ */ jsx(Minus, { className: "hidden group-data-[state=indeterminate]:block" })] })
19
+ });
20
+ //#endregion
21
+ export { Indicator, Root };
@@ -0,0 +1,8 @@
1
+ import { Indicator, Root } from "./checkbox-parts.js";
2
+ //#region src/checkbox.d.ts
3
+ declare const Checkbox: {
4
+ Root: typeof Root;
5
+ Indicator: typeof Indicator;
6
+ };
7
+ //#endregion
8
+ export { Checkbox };
@@ -0,0 +1,8 @@
1
+ import { Indicator, Root } from "./checkbox-parts.js";
2
+ //#region src/checkbox.tsx
3
+ const Checkbox = {
4
+ Root,
5
+ Indicator
6
+ };
7
+ //#endregion
8
+ export { Checkbox };
package/dist/chip.d.ts ADDED
@@ -0,0 +1,45 @@
1
+ import { VariantProps } from "./lib/tv.js";
2
+ import { ComponentPropsWithRef } from "react";
3
+ //#region src/chip.d.ts
4
+ declare const chipRoot: import("tailwind-variants").TVReturnType<{
5
+ tone: {
6
+ light: "border border-current/15";
7
+ ink: "bg-bloom-ink text-bloom-paper";
8
+ dim: "bg-bloom-foreground/8 dark:bg-bloom-foreground-dark/8 text-current/60";
9
+ sky: "bg-bloom-sky/15 text-bloom-foreground dark:text-bloom-sky";
10
+ };
11
+ }, undefined, "inline-flex items-center gap-1.5 px-2 py-0.5 text-xs/5", {
12
+ tone: {
13
+ light: "border border-current/15";
14
+ ink: "bg-bloom-ink text-bloom-paper";
15
+ dim: "bg-bloom-foreground/8 dark:bg-bloom-foreground-dark/8 text-current/60";
16
+ sky: "bg-bloom-sky/15 text-bloom-foreground dark:text-bloom-sky";
17
+ };
18
+ }, undefined, import("tailwind-variants").TVReturnTypeLike<{
19
+ tone: {
20
+ light: "border border-current/15";
21
+ ink: "bg-bloom-ink text-bloom-paper";
22
+ dim: "bg-bloom-foreground/8 dark:bg-bloom-foreground-dark/8 text-current/60";
23
+ sky: "bg-bloom-sky/15 text-bloom-foreground dark:text-bloom-sky";
24
+ };
25
+ }, undefined>>;
26
+ type RootProps = ComponentPropsWithRef<'span'> & VariantProps<typeof chipRoot>;
27
+ declare const Root: ({ tone, className, ...props }: RootProps) => import("react").JSX.Element;
28
+ declare const Dot: ({ className, ...props }: ComponentPropsWithRef<'span'>) => import("react").JSX.Element;
29
+ declare const Remove: ({ label, className, ...props }: ComponentPropsWithRef<'button'> & {
30
+ label: string;
31
+ }) => import("react").JSX.Element;
32
+ type TagProps = ComponentPropsWithRef<typeof Root> & {
33
+ /** Shows a remove button when given. Leave it out for a chip that cannot be dismissed. */
34
+ onRemove?: () => void;
35
+ removeLabel?: string;
36
+ };
37
+ declare const Tag: ({ onRemove, removeLabel, tone, className, children, ...props }: TagProps) => import("react").JSX.Element;
38
+ declare const Chip: {
39
+ Root: typeof Root;
40
+ Dot: typeof Dot;
41
+ Remove: typeof Remove;
42
+ Tag: typeof Tag;
43
+ };
44
+ //#endregion
45
+ export { Chip, type RootProps as ChipProps };
package/dist/chip.js ADDED
@@ -0,0 +1,55 @@
1
+ import { tv } from "./lib/tv.js";
2
+ import { cn } from "./lib/cn.js";
3
+ import { dim } from "./lib/theme.js";
4
+ import { inkTone, labelTones } from "./lib/tones.js";
5
+ import { X } from "lucide-react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ import { Chip as Chip$1 } from "@journ/nude/chip";
8
+ //#region src/chip.tsx
9
+ const chipRoot = tv({
10
+ base: "inline-flex items-center gap-1.5 px-2 py-0.5 text-xs/5",
11
+ variants: { tone: {
12
+ light: "border border-current/15",
13
+ ink: inkTone,
14
+ dim: `${dim} text-current/60`,
15
+ sky: labelTones.sky
16
+ } },
17
+ defaultVariants: { tone: "light" }
18
+ });
19
+ const Root = ({ tone, className, ...props }) => /* @__PURE__ */ jsx(Chip$1.Root, {
20
+ ...props,
21
+ className: chipRoot({
22
+ tone,
23
+ class: className
24
+ })
25
+ });
26
+ const Dot = ({ className, ...props }) => /* @__PURE__ */ jsx(Chip$1.Dot, {
27
+ "aria-hidden": true,
28
+ ...props,
29
+ className: cn("size-2.5 rounded-full bg-current", className)
30
+ });
31
+ const Remove = ({ label, className, ...props }) => /* @__PURE__ */ jsx(Chip$1.Remove, {
32
+ type: "button",
33
+ label,
34
+ ...props,
35
+ className: cn("grid size-5 cursor-default place-items-center outline-none hover:bg-current/15 focus-visible:outline-2 focus-visible:outline-bloom-sky [&>svg]:size-3", className),
36
+ children: /* @__PURE__ */ jsx(X, {})
37
+ });
38
+ const Tag = ({ onRemove, removeLabel = "Remove", tone = "dim", className, children, ...props }) => /* @__PURE__ */ jsxs(Root, {
39
+ "data-slot": "chip-tag",
40
+ tone,
41
+ ...props,
42
+ className: cn(onRemove && "gap-1 py-1 pr-1 pl-2.5", className),
43
+ children: [children, onRemove && /* @__PURE__ */ jsx(Remove, {
44
+ label: removeLabel,
45
+ onClick: onRemove
46
+ })]
47
+ });
48
+ const Chip = {
49
+ Root,
50
+ Dot,
51
+ Remove,
52
+ Tag
53
+ };
54
+ //#endregion
55
+ export { Chip };
@@ -0,0 +1,8 @@
1
+ import { ComponentPropsWithRef } from "react";
2
+ import * as Nude from "@journ/nude/collapsible-parts";
3
+ //#region src/collapsible-parts.d.ts
4
+ declare const Root: any;
5
+ declare const Trigger: any;
6
+ declare const Content: ({ className, children, ...props }: ComponentPropsWithRef<typeof Nude.Content>) => import("react").JSX.Element;
7
+ //#endregion
8
+ export { Content, Root, Trigger };
@@ -0,0 +1,22 @@
1
+ "use client";
2
+ import { cn } from "./lib/cn.js";
3
+ import { useExpand } from "./lib/use-enter.js";
4
+ import { jsx } from "react/jsx-runtime";
5
+ import * as Nude from "@journ/nude/collapsible-parts";
6
+ //#region src/collapsible-parts.tsx
7
+ const Root = Nude.Root;
8
+ const Trigger = Nude.Trigger;
9
+ const Content = ({ className, children, ...props }) => {
10
+ const element = useExpand();
11
+ return /* @__PURE__ */ jsx(Nude.Content, {
12
+ ref: element,
13
+ ...props,
14
+ className: "overflow-hidden",
15
+ children: /* @__PURE__ */ jsx("div", {
16
+ className: cn("py-2", className),
17
+ children
18
+ })
19
+ });
20
+ };
21
+ //#endregion
22
+ export { Content, Root, Trigger };
@@ -0,0 +1,9 @@
1
+ import { Content } from "./collapsible-parts.js";
2
+ //#region src/collapsible.d.ts
3
+ declare const Collapsible: {
4
+ Root: any;
5
+ Trigger: any;
6
+ Content: typeof Content;
7
+ };
8
+ //#endregion
9
+ export { Collapsible };
@@ -0,0 +1,9 @@
1
+ import { Content, Root, Trigger } from "./collapsible-parts.js";
2
+ //#region src/collapsible.tsx
3
+ const Collapsible = {
4
+ Root,
5
+ Trigger,
6
+ Content
7
+ };
8
+ //#endregion
9
+ export { Collapsible };
@@ -0,0 +1,22 @@
1
+ import { ButtonProps } from "./button.js";
2
+ import { ComponentPropsWithRef } from "react";
3
+ import * as Nude from "@journ/nude/combobox-parts";
4
+ import { ComboboxActions, ComboboxContextValue, ComboboxState, RootProps } from "@journ/nude/combobox-parts";
5
+ //#region src/combobox-parts.d.ts
6
+ declare const ContextProvider: any, Provider: any, Root: any, useCombobox: any;
7
+ declare const Trigger: ({ tone, className, children, ...props }: import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
8
+ tone?: ButtonProps['tone'];
9
+ }) => import("react").JSX.Element, Value: ({ className, ...props }: {
10
+ className?: string;
11
+ }) => import("react").JSX.Element;
12
+ declare const Frame: ({ className, ...props }: ComponentPropsWithRef<typeof Nude.Frame>) => import("react").JSX.Element;
13
+ declare const Input: ({ className, ...props }: ComponentPropsWithRef<typeof Nude.Input>) => import("react").JSX.Element;
14
+ declare const List: ({ className, ...props }: ComponentPropsWithRef<typeof Nude.List>) => import("react").JSX.Element;
15
+ declare const Empty: ({ className, ...props }: ComponentPropsWithRef<typeof Nude.Empty>) => import("react").JSX.Element;
16
+ declare const Group: ({ className, ...props }: ComponentPropsWithRef<typeof Nude.Group>) => import("react").JSX.Element;
17
+ declare const option: (className?: string) => string;
18
+ declare const Option: ({ className, ...props }: Nude.OptionProps) => import("react").JSX.Element;
19
+ declare const Item: ({ className, ...props }: Nude.ItemProps) => import("react").JSX.Element;
20
+ declare const ItemIndicator: ({ className, children, ...props }: ComponentPropsWithRef<'span'>) => import("react").JSX.Element;
21
+ //#endregion
22
+ export { type ComboboxActions, type ComboboxContextValue, type ComboboxState, ContextProvider, Empty, Frame, Group, Input, Item, ItemIndicator, List, Option, Provider, Root, type RootProps, Trigger, Value, option, useCombobox };
@@ -0,0 +1,54 @@
1
+ "use client";
2
+ import { cn } from "./lib/cn.js";
3
+ import { controlSize, mutedText } from "./lib/text-styles.js";
4
+ import { stylePicker } from "./lib/picker.js";
5
+ import { Check, Search } from "lucide-react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ import * as Nude from "@journ/nude/combobox-parts";
8
+ //#region src/combobox-parts.tsx
9
+ const { ContextProvider, Provider, Root, useCombobox } = Nude;
10
+ const { Trigger, Value } = stylePicker(Nude);
11
+ const Frame = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Frame, {
12
+ ...props,
13
+ className: cn("flex min-h-0 flex-col gap-3", className)
14
+ });
15
+ const Input = ({ className, ...props }) => /* @__PURE__ */ jsxs("div", {
16
+ "data-slot": "combobox-input",
17
+ className: "sm:focus-within:outline-bloom-sky flex items-center gap-2 border border-current/15 px-3 sm:focus-within:outline-2",
18
+ children: [/* @__PURE__ */ jsx(Search, {
19
+ "aria-hidden": true,
20
+ className: "size-4 shrink-0 opacity-70"
21
+ }), /* @__PURE__ */ jsx(Nude.Input, {
22
+ "data-slot": "combobox-input-field",
23
+ ...props,
24
+ className: cn(controlSize, "min-w-0 flex-1 bg-transparent outline-none placeholder:text-current/40", className)
25
+ })]
26
+ });
27
+ const List = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.List, {
28
+ ...props,
29
+ className: cn("scrollbar-bloom max-h-72 overflow-y-auto overscroll-contain", className)
30
+ });
31
+ const Empty = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Empty, {
32
+ ...props,
33
+ className: cn("py-6 text-center", mutedText, className)
34
+ });
35
+ const Group = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Group, {
36
+ ...props,
37
+ className: cn("**:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:pt-2 **:[[cmdk-group-heading]]:pb-1 **:[[cmdk-group-heading]]:font-mono **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:opacity-60", className)
38
+ });
39
+ const option = (className) => cn(controlSize, "relative isolate flex items-center gap-3 px-2 select-none [&>svg]:size-4 [&>svg]:shrink-0", "after:absolute after:inset-0 after:-z-10 after:rounded-[inherit] data-[selected=true]:after:bg-current/8", "data-[checked=true]:font-medium", "data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50", className);
40
+ const Option = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Option, {
41
+ ...props,
42
+ className: option(className)
43
+ });
44
+ const Item = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Item, {
45
+ ...props,
46
+ className: option(className)
47
+ });
48
+ const ItemIndicator = ({ className, children, ...props }) => /* @__PURE__ */ jsx(Nude.ItemIndicator, {
49
+ ...props,
50
+ className: cn("ml-auto grid place-items-center [&>svg]:size-4", className),
51
+ children: children ?? /* @__PURE__ */ jsx(Check, {})
52
+ });
53
+ //#endregion
54
+ export { ContextProvider, Empty, Frame, Group, Input, Item, ItemIndicator, List, Option, Provider, Root, Trigger, Value, option, useCombobox };
@@ -0,0 +1,26 @@
1
+ import { ButtonProps } from "./button.js";
2
+ import { ComboboxActions, ComboboxContextValue, ComboboxState, Empty, Frame, Group, Input, Item, ItemIndicator, List, RootProps, useCombobox } from "./combobox-parts.js";
3
+ import { Content, Description, Title } from "./drawer-parts.js";
4
+ //#region src/combobox.d.ts
5
+ declare const Combobox: {
6
+ Provider: any;
7
+ Root: any;
8
+ Trigger: ({ tone, className, children, ...props }: import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
9
+ tone?: ButtonProps['tone'];
10
+ }) => import("react").JSX.Element;
11
+ Value: ({ className, ...props }: {
12
+ className?: string;
13
+ }) => import("react").JSX.Element;
14
+ Content: typeof Content;
15
+ Title: typeof Title;
16
+ Description: typeof Description;
17
+ Frame: typeof Frame;
18
+ Input: typeof Input;
19
+ List: typeof List;
20
+ Empty: typeof Empty;
21
+ Group: typeof Group;
22
+ Item: typeof Item;
23
+ ItemIndicator: typeof ItemIndicator;
24
+ };
25
+ //#endregion
26
+ export { Combobox, type ComboboxActions, type ComboboxContextValue, type RootProps as ComboboxProps, type ComboboxState, useCombobox };
@@ -0,0 +1,21 @@
1
+ import { Empty, Frame, Group, Input, Item, ItemIndicator, List, Provider, Root, Trigger, Value, useCombobox } from "./combobox-parts.js";
2
+ import { Content, Description, Title } from "./drawer-parts.js";
3
+ //#region src/combobox.tsx
4
+ const Combobox = {
5
+ Provider,
6
+ Root,
7
+ Trigger,
8
+ Value,
9
+ Content,
10
+ Title,
11
+ Description,
12
+ Frame,
13
+ Input,
14
+ List,
15
+ Empty,
16
+ Group,
17
+ Item,
18
+ ItemIndicator
19
+ };
20
+ //#endregion
21
+ export { Combobox, useCombobox };
@@ -0,0 +1,13 @@
1
+ import { Content as Content$1 } from "./dialog-parts.js";
2
+ import { ComponentPropsWithRef } from "react";
3
+ import * as Nude from "@journ/nude/command-palette-parts";
4
+ //#region src/command-palette-parts.d.ts
5
+ declare const Root: any, Trigger: any;
6
+ type RootProps = Nude.RootProps;
7
+ type ContentProps = ComponentPropsWithRef<typeof Content$1> & {
8
+ /** Read by screen readers only. */
9
+ title?: string;
10
+ };
11
+ declare const Content: ({ title, className, children, ...props }: ContentProps) => import("react").JSX.Element;
12
+ //#endregion
13
+ export { Content, Root, type RootProps, Trigger };
@@ -0,0 +1,19 @@
1
+ "use client";
2
+ import { cn } from "./lib/cn.js";
3
+ import { displayTitle } from "./lib/text-styles.js";
4
+ import { Content as Content$1, Title } from "./dialog-parts.js";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ import * as Nude from "@journ/nude/command-palette-parts";
7
+ //#region src/command-palette-parts.tsx
8
+ const { Root, Trigger } = Nude;
9
+ const Content = ({ title = "Command palette", className, children, ...props }) => /* @__PURE__ */ jsxs(Content$1, {
10
+ "aria-describedby": void 0,
11
+ ...props,
12
+ className: cn("p-3", className),
13
+ children: [/* @__PURE__ */ jsx(Title, {
14
+ className: cn(displayTitle, "sr-only"),
15
+ children: title
16
+ }), children]
17
+ });
18
+ //#endregion
19
+ export { Content, Root, Trigger };
@@ -0,0 +1,17 @@
1
+ import { Empty, Frame, Group, Input, Item, ItemIndicator, List } from "./combobox-parts.js";
2
+ import { Content, RootProps } from "./command-palette-parts.js";
3
+ //#region src/command-palette.d.ts
4
+ declare const CommandPalette: {
5
+ Root: any;
6
+ Trigger: any;
7
+ Content: typeof Content;
8
+ Frame: typeof Frame;
9
+ Input: typeof Input;
10
+ List: typeof List;
11
+ Empty: typeof Empty;
12
+ Group: typeof Group;
13
+ Item: typeof Item;
14
+ ItemIndicator: typeof ItemIndicator;
15
+ };
16
+ //#endregion
17
+ export { CommandPalette, type RootProps as CommandPaletteProps };
@@ -0,0 +1,17 @@
1
+ import { Empty, Frame, Group, Input, Item, ItemIndicator, List } from "./combobox-parts.js";
2
+ import { Content, Root, Trigger } from "./command-palette-parts.js";
3
+ //#region src/command-palette.tsx
4
+ const CommandPalette = {
5
+ Root,
6
+ Trigger,
7
+ Content,
8
+ Frame,
9
+ Input,
10
+ List,
11
+ Empty,
12
+ Group,
13
+ Item,
14
+ ItemIndicator
15
+ };
16
+ //#endregion
17
+ export { CommandPalette };
@@ -0,0 +1,12 @@
1
+ import { ComponentPropsWithRef } from "react";
2
+ //#region src/composer.d.ts
3
+ declare const composerRoot: (className?: string) => string;
4
+ declare const composerInput: (className?: string) => string;
5
+ declare const Root: ({ className, ...props }: ComponentPropsWithRef<'div'>) => import("react").JSX.Element;
6
+ declare const Input: ({ className, ...props }: ComponentPropsWithRef<'input'>) => import("react").JSX.Element;
7
+ declare const Composer: {
8
+ Root: typeof Root;
9
+ Input: typeof Input;
10
+ };
11
+ //#endregion
12
+ export { Composer, composerInput, composerRoot };
@@ -0,0 +1,21 @@
1
+ import { cn } from "./lib/cn.js";
2
+ import { fieldText } from "./lib/text-styles.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { Composer as Composer$1 } from "@journ/nude/composer";
5
+ //#region src/composer.tsx
6
+ const composerRoot = (className) => cn("flex items-center gap-2 border border-current/15 p-1 has-disabled:opacity-50 sm:focus-within:outline-2 sm:focus-within:outline-bloom-sky", className);
7
+ const composerInput = (className) => cn(fieldText, "min-w-0 flex-1 bg-transparent px-3 py-1.5 text-base/6 outline-none aria-invalid:text-bloom-coral sm:text-sm/6", className);
8
+ const Root = ({ className, ...props }) => /* @__PURE__ */ jsx(Composer$1.Root, {
9
+ ...props,
10
+ className: composerRoot(className)
11
+ });
12
+ const Input = ({ className, ...props }) => /* @__PURE__ */ jsx(Composer$1.Input, {
13
+ ...props,
14
+ className: composerInput(className)
15
+ });
16
+ const Composer = {
17
+ Root,
18
+ Input
19
+ };
20
+ //#endregion
21
+ export { Composer, composerInput, composerRoot };
@@ -0,0 +1,15 @@
1
+ //#region src/context-menu-parts.d.ts
2
+ declare const Root: any;
3
+ declare const Trigger: any;
4
+ declare const Group: any;
5
+ declare const Content: ({ className, ...props }: import("react").ComponentPropsWithRef<any> & {
6
+ className?: string;
7
+ }) => import("react").JSX.Element, Item: ({ className, ...props }: import("react").ComponentPropsWithRef<any> & {
8
+ className?: string;
9
+ }) => import("react").JSX.Element, Label: ({ className, ...props }: import("react").ComponentPropsWithRef<any> & {
10
+ className?: string;
11
+ }) => import("react").JSX.Element, Separator: ({ className, ...props }: import("react").ComponentPropsWithRef<any> & {
12
+ className?: string;
13
+ }) => import("react").JSX.Element;
14
+ //#endregion
15
+ export { Content, Group, Item, Label, Root, Separator, Trigger };
@@ -0,0 +1,10 @@
1
+ "use client";
2
+ import { styleMenuParts } from "./lib/menu-parts.js";
3
+ import * as Nude from "@journ/nude/context-menu-parts";
4
+ //#region src/context-menu-parts.tsx
5
+ const Root = Nude.Root;
6
+ const Trigger = Nude.Trigger;
7
+ const Group = Nude.Group;
8
+ const { Content, Item, Label, Separator } = styleMenuParts(Nude);
9
+ //#endregion
10
+ export { Content, Group, Item, Label, Root, Separator, Trigger };
@@ -0,0 +1,20 @@
1
+ //#region src/context-menu.d.ts
2
+ declare const ContextMenu: {
3
+ Root: any;
4
+ Trigger: any;
5
+ Content: ({ className, ...props }: import("react").ComponentPropsWithRef<any> & {
6
+ className?: string;
7
+ }) => import("react").JSX.Element;
8
+ Group: any;
9
+ Label: ({ className, ...props }: import("react").ComponentPropsWithRef<any> & {
10
+ className?: string;
11
+ }) => import("react").JSX.Element;
12
+ Item: ({ className, ...props }: import("react").ComponentPropsWithRef<any> & {
13
+ className?: string;
14
+ }) => import("react").JSX.Element;
15
+ Separator: ({ className, ...props }: import("react").ComponentPropsWithRef<any> & {
16
+ className?: string;
17
+ }) => import("react").JSX.Element;
18
+ };
19
+ //#endregion
20
+ export { ContextMenu };
@@ -0,0 +1,13 @@
1
+ import { Content, Group, Item, Label, Root, Separator, Trigger } from "./context-menu-parts.js";
2
+ //#region src/context-menu.tsx
3
+ const ContextMenu = {
4
+ Root,
5
+ Trigger,
6
+ Content,
7
+ Group,
8
+ Label,
9
+ Item,
10
+ Separator
11
+ };
12
+ //#endregion
13
+ export { ContextMenu };
@@ -0,0 +1,8 @@
1
+ import { ComponentPropsWithRef } from "react";
2
+ import * as Nude from "@journ/nude/currency-input-parts";
3
+ import { RootProps } from "@journ/nude/currency-input-parts";
4
+ //#region src/currency-input-parts.d.ts
5
+ declare const Root: any;
6
+ declare const Field: ({ className, ...props }: ComponentPropsWithRef<typeof Nude.Field>) => import("react").JSX.Element;
7
+ //#endregion
8
+ export { Field, Root, type RootProps };
@@ -0,0 +1,13 @@
1
+ "use client";
2
+ import { cn } from "./lib/cn.js";
3
+ import { input } from "./input.js";
4
+ import { jsx } from "react/jsx-runtime";
5
+ import * as Nude from "@journ/nude/currency-input-parts";
6
+ //#region src/currency-input-parts.tsx
7
+ const Root = Nude.Root;
8
+ const Field = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Field, {
9
+ ...props,
10
+ className: input(cn("tabular-nums", className))
11
+ });
12
+ //#endregion
13
+ export { Field, Root };
@@ -0,0 +1,8 @@
1
+ import { Field, RootProps } from "./currency-input-parts.js";
2
+ //#region src/currency-input.d.ts
3
+ declare const CurrencyInput: {
4
+ Root: any;
5
+ Field: typeof Field;
6
+ };
7
+ //#endregion
8
+ export { CurrencyInput, type RootProps as CurrencyInputProps };
@@ -0,0 +1,8 @@
1
+ import { Field, Root } from "./currency-input-parts.js";
2
+ //#region src/currency-input.tsx
3
+ const CurrencyInput = {
4
+ Root,
5
+ Field
6
+ };
7
+ //#endregion
8
+ export { CurrencyInput };
@@ -0,0 +1,10 @@
1
+ import { ComponentPropsWithRef } from "react";
2
+ import * as Nude from "@journ/nude/data-table-parts";
3
+ import { DataTableColumn, RowData, TableViewProps } from "@journ/nude/data-table-parts";
4
+ //#region src/data-table-parts.d.ts
5
+ declare const dataTableColumns: any, selectColumn: any, useDataTable: any, ColumnPicker: any, View: any, Pager: any, SelectionBar: any;
6
+ type RootProps<TData extends RowData> = Omit<Nude.RootProps<TData>, 'components' | 'classNames' | 'icons'>;
7
+ declare const Root: <TData extends RowData>(props: RootProps<TData>) => import("react").JSX.Element;
8
+ declare const Toolbar: ({ className, ...props }: ComponentPropsWithRef<'div'>) => import("react").JSX.Element;
9
+ //#endregion
10
+ export { ColumnPicker, type DataTableColumn, Pager, Root, type RootProps, SelectionBar, type TableViewProps, Toolbar, View, dataTableColumns, selectColumn, useDataTable };