@journ/nude 0.1.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 (263) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +59 -0
  3. package/dist/accordion-parts.d.ts +15 -0
  4. package/dist/accordion-parts.js +19 -0
  5. package/dist/accordion.d.ts +10 -0
  6. package/dist/accordion.js +10 -0
  7. package/dist/alert-dialog-parts.d.ts +13 -0
  8. package/dist/alert-dialog-parts.js +15 -0
  9. package/dist/alert-dialog.d.ts +14 -0
  10. package/dist/alert-dialog.js +15 -0
  11. package/dist/alert.d.ts +11 -0
  12. package/dist/alert.js +12 -0
  13. package/dist/animated-size.d.ts +18 -0
  14. package/dist/animated-size.js +55 -0
  15. package/dist/avatar-parts.d.ts +10 -0
  16. package/dist/avatar-parts.js +14 -0
  17. package/dist/avatar.d.ts +9 -0
  18. package/dist/avatar.js +9 -0
  19. package/dist/badge.d.ts +4 -0
  20. package/dist/badge.js +5 -0
  21. package/dist/breadcrumbs.d.ts +11 -0
  22. package/dist/breadcrumbs.js +15 -0
  23. package/dist/bulk-bar.d.ts +8 -0
  24. package/dist/bulk-bar.js +9 -0
  25. package/dist/button.d.ts +13 -0
  26. package/dist/button.js +21 -0
  27. package/dist/calendar-parts.d.ts +81 -0
  28. package/dist/calendar-parts.js +213 -0
  29. package/dist/calendar.d.ts +17 -0
  30. package/dist/calendar.js +17 -0
  31. package/dist/card.d.ts +12 -0
  32. package/dist/card.js +13 -0
  33. package/dist/carousel-parts.d.ts +29 -0
  34. package/dist/carousel-parts.js +98 -0
  35. package/dist/carousel.d.ts +11 -0
  36. package/dist/carousel.js +11 -0
  37. package/dist/checkbox-parts.d.ts +7 -0
  38. package/dist/checkbox-parts.js +9 -0
  39. package/dist/checkbox.d.ts +7 -0
  40. package/dist/checkbox.js +8 -0
  41. package/dist/chip.d.ts +22 -0
  42. package/dist/chip.js +29 -0
  43. package/dist/collapsible-parts.d.ts +7 -0
  44. package/dist/collapsible-parts.js +9 -0
  45. package/dist/collapsible.d.ts +8 -0
  46. package/dist/collapsible.js +9 -0
  47. package/dist/combobox-parts.d.ts +85 -0
  48. package/dist/combobox-parts.js +61 -0
  49. package/dist/combobox.d.ts +84 -0
  50. package/dist/combobox.js +21 -0
  51. package/dist/command-palette-parts.d.ts +22 -0
  52. package/dist/command-palette-parts.js +56 -0
  53. package/dist/command-palette.d.ts +64 -0
  54. package/dist/command-palette.js +18 -0
  55. package/dist/composer.d.ts +7 -0
  56. package/dist/composer.js +8 -0
  57. package/dist/context-menu-parts.d.ts +8 -0
  58. package/dist/context-menu-parts.js +10 -0
  59. package/dist/context-menu.d.ts +12 -0
  60. package/dist/context-menu.js +13 -0
  61. package/dist/currency-input-parts.d.ts +22 -0
  62. package/dist/currency-input-parts.js +57 -0
  63. package/dist/currency-input.d.ts +8 -0
  64. package/dist/currency-input.js +8 -0
  65. package/dist/data-table-parts.d.ts +101 -0
  66. package/dist/data-table-parts.js +220 -0
  67. package/dist/data-table.d.ts +12 -0
  68. package/dist/data-table.js +12 -0
  69. package/dist/date-input-parts.d.ts +15 -0
  70. package/dist/date-input-parts.js +54 -0
  71. package/dist/date-input.d.ts +8 -0
  72. package/dist/date-input.js +8 -0
  73. package/dist/date-picker-parts.d.ts +29 -0
  74. package/dist/date-picker-parts.js +33 -0
  75. package/dist/date-picker.d.ts +29 -0
  76. package/dist/date-picker.js +15 -0
  77. package/dist/date-range-picker-parts.d.ts +37 -0
  78. package/dist/date-range-picker-parts.js +63 -0
  79. package/dist/date-range-picker.d.ts +29 -0
  80. package/dist/date-range-picker.js +15 -0
  81. package/dist/description-list.d.ts +8 -0
  82. package/dist/description-list.js +9 -0
  83. package/dist/dialog-parts.d.ts +12 -0
  84. package/dist/dialog-parts.js +14 -0
  85. package/dist/dialog.d.ts +14 -0
  86. package/dist/dialog.js +15 -0
  87. package/dist/divider.d.ts +5 -0
  88. package/dist/divider.js +9 -0
  89. package/dist/drawer-parts.d.ts +24 -0
  90. package/dist/drawer-parts.js +14 -0
  91. package/dist/drawer.d.ts +27 -0
  92. package/dist/drawer.js +15 -0
  93. package/dist/dropdown-menu-parts.d.ts +8 -0
  94. package/dist/dropdown-menu-parts.js +10 -0
  95. package/dist/dropdown-menu.d.ts +12 -0
  96. package/dist/dropdown-menu.js +13 -0
  97. package/dist/empty-state.d.ts +10 -0
  98. package/dist/empty-state.js +11 -0
  99. package/dist/field-parts.d.ts +15 -0
  100. package/dist/field-parts.js +63 -0
  101. package/dist/field.d.ts +11 -0
  102. package/dist/field.js +11 -0
  103. package/dist/file-dropzone-parts.d.ts +34 -0
  104. package/dist/file-dropzone-parts.js +108 -0
  105. package/dist/file-dropzone.d.ts +10 -0
  106. package/dist/file-dropzone.js +10 -0
  107. package/dist/heading.d.ts +9 -0
  108. package/dist/heading.js +12 -0
  109. package/dist/hover-card-parts.d.ts +8 -0
  110. package/dist/hover-card-parts.js +12 -0
  111. package/dist/hover-card.d.ts +9 -0
  112. package/dist/hover-card.js +9 -0
  113. package/dist/icon-button.d.ts +6 -0
  114. package/dist/icon-button.js +5 -0
  115. package/dist/icon.d.ts +7 -0
  116. package/dist/icon.js +12 -0
  117. package/dist/index.d.ts +94 -0
  118. package/dist/index.js +87 -0
  119. package/dist/input.d.ts +4 -0
  120. package/dist/input.js +5 -0
  121. package/dist/lib/commit-on.d.ts +15 -0
  122. package/dist/lib/commit-on.js +17 -0
  123. package/dist/lib/menu-parts.d.ts +21 -0
  124. package/dist/lib/menu-parts.js +23 -0
  125. package/dist/lib/modal-content.d.ts +17 -0
  126. package/dist/lib/modal-content.js +17 -0
  127. package/dist/lib/modal-parts.d.ts +6 -0
  128. package/dist/lib/modal-parts.js +7 -0
  129. package/dist/lib/part.d.ts +6 -0
  130. package/dist/lib/part.js +13 -0
  131. package/dist/lib/picker.d.ts +44 -0
  132. package/dist/lib/picker.js +75 -0
  133. package/dist/lib/visually-hidden.d.ts +6 -0
  134. package/dist/lib/visually-hidden.js +15 -0
  135. package/dist/link.d.ts +9 -0
  136. package/dist/link.js +12 -0
  137. package/dist/markdown.d.ts +10 -0
  138. package/dist/markdown.js +10 -0
  139. package/dist/message.d.ts +13 -0
  140. package/dist/message.js +15 -0
  141. package/dist/month-picker-parts.d.ts +19 -0
  142. package/dist/month-picker-parts.js +38 -0
  143. package/dist/month-picker.d.ts +15 -0
  144. package/dist/month-picker.js +15 -0
  145. package/dist/month-stepper-parts.d.ts +16 -0
  146. package/dist/month-stepper-parts.js +52 -0
  147. package/dist/month-stepper.d.ts +10 -0
  148. package/dist/month-stepper.js +10 -0
  149. package/dist/multiple-selector-parts.d.ts +39 -0
  150. package/dist/multiple-selector-parts.js +118 -0
  151. package/dist/multiple-selector.d.ts +76 -0
  152. package/dist/multiple-selector.js +23 -0
  153. package/dist/nav-bar.d.ts +7 -0
  154. package/dist/nav-bar.js +8 -0
  155. package/dist/navigation-menu-parts.d.ts +18 -0
  156. package/dist/navigation-menu-parts.js +25 -0
  157. package/dist/navigation-menu.d.ts +12 -0
  158. package/dist/navigation-menu.js +12 -0
  159. package/dist/otp-input-parts.d.ts +9 -0
  160. package/dist/otp-input-parts.js +11 -0
  161. package/dist/otp-input.d.ts +8 -0
  162. package/dist/otp-input.js +9 -0
  163. package/dist/page-header.d.ts +8 -0
  164. package/dist/page-header.js +9 -0
  165. package/dist/page.d.ts +8 -0
  166. package/dist/page.js +9 -0
  167. package/dist/pagination.d.ts +13 -0
  168. package/dist/pagination.js +24 -0
  169. package/dist/pill-select.d.ts +4 -0
  170. package/dist/pill-select.js +5 -0
  171. package/dist/popover-parts.d.ts +9 -0
  172. package/dist/popover-parts.js +13 -0
  173. package/dist/popover.d.ts +10 -0
  174. package/dist/popover.js +10 -0
  175. package/dist/portal.d.ts +15 -0
  176. package/dist/portal.js +20 -0
  177. package/dist/progress-parts.d.ts +11 -0
  178. package/dist/progress-parts.js +32 -0
  179. package/dist/progress.d.ts +8 -0
  180. package/dist/progress.js +8 -0
  181. package/dist/quantity-input-parts.d.ts +21 -0
  182. package/dist/quantity-input-parts.js +86 -0
  183. package/dist/quantity-input.d.ts +10 -0
  184. package/dist/quantity-input.js +10 -0
  185. package/dist/radio-parts.d.ts +13 -0
  186. package/dist/radio-parts.js +17 -0
  187. package/dist/radio.d.ts +8 -0
  188. package/dist/radio.js +8 -0
  189. package/dist/scroll-area-parts.d.ts +17 -0
  190. package/dist/scroll-area-parts.js +21 -0
  191. package/dist/scroll-area.d.ts +10 -0
  192. package/dist/scroll-area.js +10 -0
  193. package/dist/select-parts.d.ts +26 -0
  194. package/dist/select-parts.js +38 -0
  195. package/dist/select.d.ts +14 -0
  196. package/dist/select.js +14 -0
  197. package/dist/sheet-parts.d.ts +15 -0
  198. package/dist/sheet-parts.js +15 -0
  199. package/dist/sheet.d.ts +14 -0
  200. package/dist/sheet.js +16 -0
  201. package/dist/sidebar.d.ts +14 -0
  202. package/dist/sidebar.js +17 -0
  203. package/dist/skeleton.d.ts +4 -0
  204. package/dist/skeleton.js +5 -0
  205. package/dist/slider-parts.d.ts +9 -0
  206. package/dist/slider-parts.js +11 -0
  207. package/dist/slider.d.ts +9 -0
  208. package/dist/slider.js +10 -0
  209. package/dist/spinner.d.ts +6 -0
  210. package/dist/spinner.js +23 -0
  211. package/dist/stack-parts.d.ts +22 -0
  212. package/dist/stack-parts.js +125 -0
  213. package/dist/stack.d.ts +10 -0
  214. package/dist/stack.js +10 -0
  215. package/dist/stat.d.ts +9 -0
  216. package/dist/stat.js +10 -0
  217. package/dist/step-button.d.ts +11 -0
  218. package/dist/step-button.js +13 -0
  219. package/dist/stepper-parts.d.ts +19 -0
  220. package/dist/stepper-parts.js +44 -0
  221. package/dist/stepper.d.ts +11 -0
  222. package/dist/stepper.js +11 -0
  223. package/dist/switch-parts.d.ts +6 -0
  224. package/dist/switch-parts.js +8 -0
  225. package/dist/switch.d.ts +7 -0
  226. package/dist/switch.js +8 -0
  227. package/dist/table.d.ts +12 -0
  228. package/dist/table.js +13 -0
  229. package/dist/tabs-parts.d.ts +8 -0
  230. package/dist/tabs-parts.js +10 -0
  231. package/dist/tabs.d.ts +9 -0
  232. package/dist/tabs.js +10 -0
  233. package/dist/tag-input-parts.d.ts +30 -0
  234. package/dist/tag-input-parts.js +99 -0
  235. package/dist/tag-input.d.ts +10 -0
  236. package/dist/tag-input.js +10 -0
  237. package/dist/text-morph.d.ts +17 -0
  238. package/dist/text-morph.js +62 -0
  239. package/dist/text-shimmer.d.ts +9 -0
  240. package/dist/text-shimmer.js +8 -0
  241. package/dist/text.d.ts +4 -0
  242. package/dist/text.js +5 -0
  243. package/dist/textarea.d.ts +4 -0
  244. package/dist/textarea.js +5 -0
  245. package/dist/time-range-parts.d.ts +22 -0
  246. package/dist/time-range-parts.js +56 -0
  247. package/dist/time-range.d.ts +10 -0
  248. package/dist/time-range.js +10 -0
  249. package/dist/toast-parts.d.ts +12 -0
  250. package/dist/toast-parts.js +21 -0
  251. package/dist/toast.d.ts +13 -0
  252. package/dist/toast.js +12 -0
  253. package/dist/toggle-group-parts.d.ts +6 -0
  254. package/dist/toggle-group-parts.js +8 -0
  255. package/dist/toggle-group.d.ts +7 -0
  256. package/dist/toggle-group.js +8 -0
  257. package/dist/tooltip-parts.d.ts +10 -0
  258. package/dist/tooltip-parts.js +17 -0
  259. package/dist/tooltip.d.ts +10 -0
  260. package/dist/tooltip.js +10 -0
  261. package/dist/touch-target.d.ts +6 -0
  262. package/dist/touch-target.js +10 -0
  263. package/package.json +83 -0
@@ -0,0 +1,62 @@
1
+ "use client";
2
+ import { visuallyHidden } from "./lib/visually-hidden.js";
3
+ import { useLayoutEffect, useRef } from "react";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { prefersReducedMotion } from "@journ/lift";
6
+ import { animate } from "animejs";
7
+ //#region src/text-morph.tsx
8
+ /**
9
+ * Plays text one character at a time. When the text changes, only the characters
10
+ * that differ drop in again. Screen readers get the whole string once.
11
+ */
12
+ const TextMorph = ({ children: text, as: Component = "span", classNames, style, ...props }) => {
13
+ const root = useRef(null);
14
+ const previous = useRef(text);
15
+ useLayoutEffect(() => {
16
+ const before = [...previous.current];
17
+ previous.current = text;
18
+ if (!root.current || prefersReducedMotion()) return;
19
+ const chars = [...text];
20
+ const letters = root.current.querySelectorAll("[data-char]");
21
+ let order = 0;
22
+ for (const [index, char] of chars.entries()) {
23
+ const element = letters[index];
24
+ if (!element || char === before[index]) continue;
25
+ animate(element, {
26
+ opacity: [0, 1],
27
+ translateY: [6, 0],
28
+ duration: 220,
29
+ delay: order++ * 18,
30
+ ease: "outQuad"
31
+ });
32
+ }
33
+ }, [text]);
34
+ return /* @__PURE__ */ jsxs(Component, {
35
+ ref: root,
36
+ "data-slot": "text-morph",
37
+ ...props,
38
+ style: {
39
+ whiteSpace: "pre",
40
+ ...style
41
+ },
42
+ children: [/* @__PURE__ */ jsx("span", {
43
+ "data-slot": "text-morph-label",
44
+ className: classNames?.label,
45
+ style: visuallyHidden,
46
+ children: text
47
+ }), /* @__PURE__ */ jsx("span", {
48
+ "aria-hidden": true,
49
+ children: [...text].map((char, index) => /* @__PURE__ */ jsx("span", {
50
+ "data-char": true,
51
+ className: classNames?.char,
52
+ style: {
53
+ display: "inline-block",
54
+ whiteSpace: "pre"
55
+ },
56
+ children: char
57
+ }, index))
58
+ })]
59
+ });
60
+ };
61
+ //#endregion
62
+ export { TextMorph };
@@ -0,0 +1,9 @@
1
+ import { ComponentPropsWithRef, ElementType } from "react";
2
+ //#region src/text-shimmer.d.ts
3
+ type TextShimmerProps = ComponentPropsWithRef<'span'> & {
4
+ /** The element to render, `span` by default. */
5
+ as?: ElementType;
6
+ };
7
+ declare const TextShimmer: ({ as: Component, ...props }: TextShimmerProps) => import("react").JSX.Element;
8
+ //#endregion
9
+ export { TextShimmer, type TextShimmerProps };
@@ -0,0 +1,8 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ //#region src/text-shimmer.tsx
3
+ const TextShimmer = ({ as: Component = "span", ...props }) => /* @__PURE__ */ jsx(Component, {
4
+ "data-slot": "text-shimmer",
5
+ ...props
6
+ });
7
+ //#endregion
8
+ export { TextShimmer };
package/dist/text.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ //#region src/text.d.ts
2
+ declare const Text: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>) => import("react").ReactNode;
3
+ //#endregion
4
+ export { Text };
package/dist/text.js ADDED
@@ -0,0 +1,5 @@
1
+ import { part } from "./lib/part.js";
2
+ //#region src/text.tsx
3
+ const Text = part("p", "text");
4
+ //#endregion
5
+ export { Text };
@@ -0,0 +1,4 @@
1
+ //#region src/textarea.d.ts
2
+ declare const Textarea: (props: import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>) => import("react").ReactNode;
3
+ //#endregion
4
+ export { Textarea };
@@ -0,0 +1,5 @@
1
+ import { part } from "./lib/part.js";
2
+ //#region src/textarea.tsx
3
+ const Textarea = part("textarea", "textarea");
4
+ //#endregion
5
+ export { Textarea };
@@ -0,0 +1,22 @@
1
+ import { Input } from "./input.js";
2
+ import { ComponentPropsWithRef, ReactNode } from "react";
3
+ //#region src/time-range-parts.d.ts
4
+ type TimeRangeValue = {
5
+ start: string;
6
+ stop: string;
7
+ };
8
+ type RootProps = {
9
+ /** Times as "HH:mm". Empty strings while unset. */
10
+ value?: TimeRangeValue;
11
+ defaultValue?: TimeRangeValue;
12
+ onValueChange?: (value: TimeRangeValue) => void;
13
+ children?: ReactNode;
14
+ };
15
+ declare const Root: ({ value, defaultValue, onValueChange, children }: RootProps) => import("react").JSX.Element;
16
+ type TimeFieldProps = Omit<ComponentPropsWithRef<typeof Input>, 'type' | 'value'>;
17
+ declare const Start: (props: TimeFieldProps) => import("react").JSX.Element;
18
+ declare const Stop: (props: TimeFieldProps) => import("react").JSX.Element;
19
+ /** The time between start and stop. A stop before the start means the next day. */
20
+ declare const Duration: (props: Omit<ComponentPropsWithRef<'output'>, 'children'>) => import("react").JSX.Element;
21
+ //#endregion
22
+ export { Duration, Root, type RootProps, Start, Stop, type TimeRangeValue };
@@ -0,0 +1,56 @@
1
+ "use client";
2
+ import { Input } from "./input.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { createRequiredContext, useControllableState } from "@journ/lift";
5
+ import { formatDuration, minutesBetween } from "@journ/fitter-happier";
6
+ //#region src/time-range-parts.tsx
7
+ const [TimeRangeContext, useTimeRange] = createRequiredContext("TimeRange.Root");
8
+ const empty = {
9
+ start: "",
10
+ stop: ""
11
+ };
12
+ const Root = ({ value, defaultValue = empty, onValueChange, children }) => {
13
+ const [stored, setStored] = useControllableState(value, defaultValue, onValueChange);
14
+ const current = stored ?? empty;
15
+ return /* @__PURE__ */ jsx(TimeRangeContext, {
16
+ value: {
17
+ value: current,
18
+ change: (next) => setStored({
19
+ ...current,
20
+ ...next
21
+ })
22
+ },
23
+ children
24
+ });
25
+ };
26
+ /** Start and stop are the same field bound to a different edge of the range. */
27
+ const TimeField = ({ edge, ...props }) => {
28
+ const { value, change } = useTimeRange();
29
+ return /* @__PURE__ */ jsx(Input, {
30
+ "data-slot": `time-range-${edge}`,
31
+ type: "time",
32
+ ...props,
33
+ value: value[edge],
34
+ onChange: (event) => change({ [edge]: event.target.value })
35
+ });
36
+ };
37
+ const Start = (props) => /* @__PURE__ */ jsx(TimeField, {
38
+ edge: "start",
39
+ ...props
40
+ });
41
+ const Stop = (props) => /* @__PURE__ */ jsx(TimeField, {
42
+ edge: "stop",
43
+ ...props
44
+ });
45
+ /** The time between start and stop. A stop before the start means the next day. */
46
+ const Duration = (props) => {
47
+ const { value } = useTimeRange();
48
+ const minutes = minutesBetween(value.start, value.stop);
49
+ return /* @__PURE__ */ jsx("output", {
50
+ "data-slot": "time-range-duration",
51
+ ...props,
52
+ children: minutes === null ? "" : formatDuration(minutes)
53
+ });
54
+ };
55
+ //#endregion
56
+ export { Duration, Root, Start, Stop };
@@ -0,0 +1,10 @@
1
+ import { Duration, Root, RootProps, Start, Stop, TimeRangeValue } from "./time-range-parts.js";
2
+ //#region src/time-range.d.ts
3
+ declare const TimeRange: {
4
+ Root: typeof Root;
5
+ Start: typeof Start;
6
+ Stop: typeof Stop;
7
+ Duration: typeof Duration;
8
+ };
9
+ //#endregion
10
+ export { TimeRange, type RootProps as TimeRangeProps, type TimeRangeValue };
@@ -0,0 +1,10 @@
1
+ import { Duration, Root, Start, Stop } from "./time-range-parts.js";
2
+ //#region src/time-range.tsx
3
+ const TimeRange = {
4
+ Root,
5
+ Start,
6
+ Stop,
7
+ Duration
8
+ };
9
+ //#endregion
10
+ export { TimeRange };
@@ -0,0 +1,12 @@
1
+ import { ComponentProps } from "react";
2
+ import { Toaster, toast } from "sonner";
3
+ //#region src/toast-parts.d.ts
4
+ /** Unstyled: sonner's own look is turned off. Pass `toastOptions.classNames` to style it. */
5
+ declare const Provider: ({ toastOptions, ...props }: ComponentProps<typeof Toaster>) => import("react").JSX.Element;
6
+ declare const show: typeof toast;
7
+ declare const Root: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>) => import("react").ReactNode;
8
+ declare const Title: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>) => import("react").ReactNode;
9
+ declare const Description: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>) => import("react").ReactNode;
10
+ declare const Action: (props: import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>) => import("react").ReactNode;
11
+ //#endregion
12
+ export { Action, Description, Provider, Root, Title, show };
@@ -0,0 +1,21 @@
1
+ "use client";
2
+ import { part } from "./lib/part.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { Toaster, toast } from "sonner";
5
+ //#region src/toast-parts.tsx
6
+ /** Unstyled: sonner's own look is turned off. Pass `toastOptions.classNames` to style it. */
7
+ const Provider = ({ toastOptions, ...props }) => /* @__PURE__ */ jsx(Toaster, {
8
+ position: "top-center",
9
+ ...props,
10
+ toastOptions: {
11
+ unstyled: true,
12
+ ...toastOptions
13
+ }
14
+ });
15
+ const show = toast;
16
+ const Root = part("div", "toast");
17
+ const Title = part("p", "toast-title");
18
+ const Description = part("p", "toast-description");
19
+ const Action = part("button", "toast-action", { type: "button" });
20
+ //#endregion
21
+ export { Action, Description, Provider, Root, Title, show };
@@ -0,0 +1,13 @@
1
+ import { Action, Description, Provider, Root, Title, show } from "./toast-parts.js";
2
+ //#region src/toast.d.ts
3
+ type ToastParts = {
4
+ Provider: typeof Provider;
5
+ show: typeof show;
6
+ Root: typeof Root;
7
+ Title: typeof Title;
8
+ Description: typeof Description;
9
+ Action: typeof Action;
10
+ };
11
+ declare const Toast: ToastParts;
12
+ //#endregion
13
+ export { Toast };
package/dist/toast.js ADDED
@@ -0,0 +1,12 @@
1
+ import { Action, Description, Provider, Root, Title, show } from "./toast-parts.js";
2
+ //#region src/toast.tsx
3
+ const Toast = {
4
+ Provider,
5
+ show,
6
+ Root,
7
+ Title,
8
+ Description,
9
+ Action
10
+ };
11
+ //#endregion
12
+ export { Toast };
@@ -0,0 +1,6 @@
1
+ import * as RadixToggleGroup from "@radix-ui/react-toggle-group";
2
+ //#region src/toggle-group-parts.d.ts
3
+ declare const Root: (props: (RadixToggleGroup.ToggleGroupMultipleProps | RadixToggleGroup.ToggleGroupSingleProps) & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactNode;
4
+ declare const Item: (props: RadixToggleGroup.ToggleGroupItemProps & import("react").RefAttributes<HTMLButtonElement>) => import("react").ReactNode;
5
+ //#endregion
6
+ export { Item, Root };
@@ -0,0 +1,8 @@
1
+ "use client";
2
+ import { part } from "./lib/part.js";
3
+ import * as RadixToggleGroup from "@radix-ui/react-toggle-group";
4
+ //#region src/toggle-group-parts.tsx
5
+ const Root = part(RadixToggleGroup.Root, "toggle-group");
6
+ const Item = part(RadixToggleGroup.Item, "toggle-group-item");
7
+ //#endregion
8
+ export { Item, Root };
@@ -0,0 +1,7 @@
1
+ //#region src/toggle-group.d.ts
2
+ declare const ToggleGroup: {
3
+ Root: (props: (import("@radix-ui/react-toggle-group").ToggleGroupMultipleProps | import("@radix-ui/react-toggle-group").ToggleGroupSingleProps) & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactNode;
4
+ Item: (props: import("@radix-ui/react-toggle-group").ToggleGroupItemProps & import("react").RefAttributes<HTMLButtonElement>) => import("react").ReactNode;
5
+ };
6
+ //#endregion
7
+ export { ToggleGroup };
@@ -0,0 +1,8 @@
1
+ import { Item, Root } from "./toggle-group-parts.js";
2
+ //#region src/toggle-group.tsx
3
+ const ToggleGroup = {
4
+ Root,
5
+ Item
6
+ };
7
+ //#endregion
8
+ export { ToggleGroup };
@@ -0,0 +1,10 @@
1
+ import { ComponentPropsWithRef } from "react";
2
+ import * as RadixTooltip from "@radix-ui/react-tooltip";
3
+ //#region src/tooltip-parts.d.ts
4
+ declare const Provider: import("react").FC<RadixTooltip.TooltipProviderProps>;
5
+ /** Includes its own provider so a tooltip works without extra setup. */
6
+ declare const Root: ({ delayDuration, ...props }: ComponentPropsWithRef<typeof RadixTooltip.Root>) => import("react").JSX.Element;
7
+ declare const Trigger: import("react").ForwardRefExoticComponent<RadixTooltip.TooltipTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
8
+ declare const Content: (props: ComponentPropsWithRef<typeof RadixTooltip.Content>) => import("react").JSX.Element;
9
+ //#endregion
10
+ export { Content, Provider, Root, Trigger };
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import * as RadixTooltip from "@radix-ui/react-tooltip";
4
+ //#region src/tooltip-parts.tsx
5
+ const Provider = RadixTooltip.Provider;
6
+ /** Includes its own provider so a tooltip works without extra setup. */
7
+ const Root = ({ delayDuration = 300, ...props }) => /* @__PURE__ */ jsx(RadixTooltip.Provider, {
8
+ delayDuration,
9
+ children: /* @__PURE__ */ jsx(RadixTooltip.Root, { ...props })
10
+ });
11
+ const Trigger = RadixTooltip.Trigger;
12
+ const Content = (props) => /* @__PURE__ */ jsx(RadixTooltip.Portal, { children: /* @__PURE__ */ jsx(RadixTooltip.Content, {
13
+ "data-slot": "tooltip-content",
14
+ ...props
15
+ }) });
16
+ //#endregion
17
+ export { Content, Provider, Root, Trigger };
@@ -0,0 +1,10 @@
1
+ import { Content, Root } from "./tooltip-parts.js";
2
+ //#region src/tooltip.d.ts
3
+ declare const Tooltip: {
4
+ Provider: import("react").FC<import("@radix-ui/react-tooltip").TooltipProviderProps>;
5
+ Root: typeof Root;
6
+ Trigger: import("react").ForwardRefExoticComponent<import("@radix-ui/react-tooltip").TooltipTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
7
+ Content: typeof Content;
8
+ };
9
+ //#endregion
10
+ export { Tooltip };
@@ -0,0 +1,10 @@
1
+ import { Content, Provider, Root, Trigger } from "./tooltip-parts.js";
2
+ //#region src/tooltip.tsx
3
+ const Tooltip = {
4
+ Provider,
5
+ Root,
6
+ Trigger,
7
+ Content
8
+ };
9
+ //#endregion
10
+ export { Tooltip };
@@ -0,0 +1,6 @@
1
+ import { ComponentPropsWithRef } from "react";
2
+ //#region src/touch-target.d.ts
3
+ /** A hit-area element rendered before its children. Style it to grow the touch area without changing layout. */
4
+ declare const TouchTarget: ({ children, ...props }: ComponentPropsWithRef<'span'>) => import("react").JSX.Element;
5
+ //#endregion
6
+ export { TouchTarget };
@@ -0,0 +1,10 @@
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ //#region src/touch-target.tsx
3
+ /** A hit-area element rendered before its children. Style it to grow the touch area without changing layout. */
4
+ const TouchTarget = ({ children, ...props }) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
5
+ "aria-hidden": true,
6
+ "data-slot": "touch-target",
7
+ ...props
8
+ }), children] });
9
+ //#endregion
10
+ export { TouchTarget };
package/package.json ADDED
@@ -0,0 +1,83 @@
1
+ {
2
+ "name": "@journ/nude",
3
+ "version": "0.1.0",
4
+ "description": "Unstyled, accessible React primitives for the web. They own behavior, state, focus and ARIA, and leave every visual decision to you.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/thommorais/kid-a.git",
9
+ "directory": "packages/nude"
10
+ },
11
+ "files": [
12
+ "dist"
13
+ ],
14
+ "type": "module",
15
+ "sideEffects": false,
16
+ "exports": {
17
+ ".": {
18
+ "@journ/source": "./src/index.ts",
19
+ "types": "./dist/index.d.ts",
20
+ "default": "./dist/index.js"
21
+ },
22
+ "./*": {
23
+ "@journ/source": "./src/*.tsx",
24
+ "types": "./dist/*.d.ts",
25
+ "default": "./dist/*.js"
26
+ },
27
+ "./package.json": "./package.json"
28
+ },
29
+ "publishConfig": {
30
+ "access": "public"
31
+ },
32
+ "dependencies": {
33
+ "@radix-ui/react-accordion": "^1.2.20",
34
+ "@radix-ui/react-alert-dialog": "^1.1.23",
35
+ "@radix-ui/react-avatar": "^1.2.6",
36
+ "@radix-ui/react-checkbox": "^1.3.11",
37
+ "@radix-ui/react-collapsible": "^1.1.20",
38
+ "@radix-ui/react-context-menu": "^2.3.7",
39
+ "@radix-ui/react-dialog": "^1.1.23",
40
+ "@radix-ui/react-dropdown-menu": "^2.1.24",
41
+ "@radix-ui/react-hover-card": "^1.1.23",
42
+ "@radix-ui/react-label": "^2.1.15",
43
+ "@radix-ui/react-navigation-menu": "^1.2.22",
44
+ "@radix-ui/react-one-time-password-field": "^0.1.16",
45
+ "@radix-ui/react-popover": "^1.1.23",
46
+ "@radix-ui/react-progress": "^1.1.16",
47
+ "@radix-ui/react-radio-group": "^1.4.7",
48
+ "@radix-ui/react-scroll-area": "^1.2.18",
49
+ "@radix-ui/react-select": "^2.3.7",
50
+ "@radix-ui/react-separator": "^1.1.15",
51
+ "@radix-ui/react-slider": "^1.4.7",
52
+ "@radix-ui/react-slot": "^1.3.3",
53
+ "@radix-ui/react-switch": "^1.3.7",
54
+ "@radix-ui/react-tabs": "^1.1.21",
55
+ "@radix-ui/react-toggle-group": "^1.1.19",
56
+ "@radix-ui/react-tooltip": "^1.2.16",
57
+ "@tanstack/react-table": "^9.2.4",
58
+ "animejs": "^4.5.0",
59
+ "cmdk": "^1.1.1",
60
+ "embla-carousel-react": "^8.6.0",
61
+ "react-markdown": "^10.1.0",
62
+ "sonner": "^2.0.8",
63
+ "vaul": "^1.1.2",
64
+ "@journ/lift": "0.1.0",
65
+ "@journ/fitter-happier": "0.1.0"
66
+ },
67
+ "peerDependencies": {
68
+ "react": "^19.0.0",
69
+ "react-dom": "^19.0.0"
70
+ },
71
+ "nx": {
72
+ "tags": [
73
+ "scope:primitives"
74
+ ]
75
+ },
76
+ "scripts": {
77
+ "build": "tsdown",
78
+ "test": "vitest run",
79
+ "typecheck": "tsc -b",
80
+ "lint": "oxlint",
81
+ "format:check": "oxfmt --check"
82
+ }
83
+ }