@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,10 @@
1
+ import { Content } from "./popover-parts.js";
2
+ //#region src/popover.d.ts
3
+ declare const Popover: {
4
+ Root: import("react").FC<import("@radix-ui/react-popover").PopoverProps>;
5
+ Trigger: import("react").ForwardRefExoticComponent<import("@radix-ui/react-popover").PopoverTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
6
+ Content: typeof Content;
7
+ Close: import("react").ForwardRefExoticComponent<import("@radix-ui/react-popover").PopoverCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
8
+ };
9
+ //#endregion
10
+ export { Popover };
@@ -0,0 +1,10 @@
1
+ import { Close, Content, Root, Trigger } from "./popover-parts.js";
2
+ //#region src/popover.tsx
3
+ const Popover = {
4
+ Root,
5
+ Trigger,
6
+ Content,
7
+ Close
8
+ };
9
+ //#endregion
10
+ export { Popover };
@@ -0,0 +1,15 @@
1
+ import { ReactNode } from "react";
2
+ //#region src/portal.d.ts
3
+ type PortalProps = {
4
+ children: ReactNode;
5
+ /** Where to render. Defaults to `document.body`. */
6
+ container?: Element | null;
7
+ };
8
+ /**
9
+ * Renders its children outside the current tree, so a sticky or clipped parent
10
+ * cannot trap them. Waits for the client, so it renders nothing on the server.
11
+ * Radix overlays already portal themselves; use this for your own floating UI.
12
+ */
13
+ declare const Portal: ({ children, container }: PortalProps) => import("react").ReactPortal | null;
14
+ //#endregion
15
+ export { Portal, type PortalProps };
package/dist/portal.js ADDED
@@ -0,0 +1,20 @@
1
+ "use client";
2
+ import { useEffect, useState } from "react";
3
+ import { createPortal } from "react-dom";
4
+ //#region src/portal.tsx
5
+ /**
6
+ * Renders its children outside the current tree, so a sticky or clipped parent
7
+ * cannot trap them. Waits for the client, so it renders nothing on the server.
8
+ * Radix overlays already portal themselves; use this for your own floating UI.
9
+ */
10
+ const Portal = ({ children, container }) => {
11
+ const [mounted, setMounted] = useState(false);
12
+ useEffect(() => {
13
+ setMounted(true);
14
+ return () => setMounted(false);
15
+ }, []);
16
+ if (!mounted) return null;
17
+ return createPortal(children, container ?? document.body);
18
+ };
19
+ //#endregion
20
+ export { Portal };
@@ -0,0 +1,11 @@
1
+ import { ComponentPropsWithRef } from "react";
2
+ import * as RadixProgress from "@radix-ui/react-progress";
3
+ //#region src/progress-parts.d.ts
4
+ type RootProps = Omit<ComponentPropsWithRef<typeof RadixProgress.Root>, 'value'> & {
5
+ value: number;
6
+ };
7
+ declare const Root: ({ value, max, ...props }: RootProps) => import("react").JSX.Element;
8
+ /** Slides in from the left as the value grows. */
9
+ declare const Indicator: ({ style, ...props }: ComponentPropsWithRef<typeof RadixProgress.Indicator>) => import("react").JSX.Element;
10
+ //#endregion
11
+ export { Indicator, type RootProps as ProgressProps, Root };
@@ -0,0 +1,32 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { createRequiredContext } from "@journ/lift";
4
+ import * as RadixProgress from "@radix-ui/react-progress";
5
+ //#region src/progress-parts.tsx
6
+ const [PercentageContext, usePercentage] = createRequiredContext("Progress.Root");
7
+ const Root = ({ value, max = 100, ...props }) => {
8
+ const percentage = Math.min(100, Math.max(0, value / max * 100));
9
+ return /* @__PURE__ */ jsx(PercentageContext, {
10
+ value: percentage,
11
+ children: /* @__PURE__ */ jsx(RadixProgress.Root, {
12
+ "data-slot": "progress",
13
+ value,
14
+ max,
15
+ ...props
16
+ })
17
+ });
18
+ };
19
+ /** Slides in from the left as the value grows. */
20
+ const Indicator = ({ style, ...props }) => {
21
+ const percentage = usePercentage();
22
+ return /* @__PURE__ */ jsx(RadixProgress.Indicator, {
23
+ "data-slot": "progress-indicator",
24
+ ...props,
25
+ style: {
26
+ ...style,
27
+ transform: `translateX(-${100 - percentage}%)`
28
+ }
29
+ });
30
+ };
31
+ //#endregion
32
+ export { Indicator, Root };
@@ -0,0 +1,8 @@
1
+ import { Indicator, Root } from "./progress-parts.js";
2
+ //#region src/progress.d.ts
3
+ declare const Progress: {
4
+ Root: typeof Root;
5
+ Indicator: typeof Indicator;
6
+ };
7
+ //#endregion
8
+ export { Progress };
@@ -0,0 +1,8 @@
1
+ import { Indicator, Root } from "./progress-parts.js";
2
+ //#region src/progress.tsx
3
+ const Progress = {
4
+ Root,
5
+ Indicator
6
+ };
7
+ //#endregion
8
+ export { Progress };
@@ -0,0 +1,21 @@
1
+ import { IconButtonProps } from "./icon-button.js";
2
+ import { Composer } from "./composer.js";
3
+ import { ComponentPropsWithRef, ReactNode } from "react";
4
+ //#region src/quantity-input-parts.d.ts
5
+ type RootProps = Omit<ComponentPropsWithRef<'div'>, 'defaultValue' | 'onChange'> & {
6
+ value?: number;
7
+ defaultValue?: number;
8
+ onValueChange?: (value: number) => void;
9
+ min?: number;
10
+ max?: number;
11
+ step?: number;
12
+ disabled?: boolean;
13
+ children?: ReactNode;
14
+ };
15
+ /** A number with minus and plus. Typing is free until blur or Enter, then it snaps to the bounds. */
16
+ declare const Root: ({ value, defaultValue, onValueChange, min, max, step, disabled, children, ...props }: RootProps) => import("react").JSX.Element;
17
+ declare const Decrement: (props: IconButtonProps) => import("react").JSX.Element;
18
+ declare const Increment: (props: IconButtonProps) => import("react").JSX.Element;
19
+ declare const Field: ({ onBlur, onKeyDown, ...props }: ComponentPropsWithRef<typeof Composer.Input>) => import("react").JSX.Element;
20
+ //#endregion
21
+ export { Decrement, Field, Increment, Root, type RootProps };
@@ -0,0 +1,86 @@
1
+ "use client";
2
+ import { StepButton } from "./step-button.js";
3
+ import { Composer } from "./composer.js";
4
+ import { commitOn } from "./lib/commit-on.js";
5
+ import { jsx } from "react/jsx-runtime";
6
+ import { createRequiredContext, useControllableState, useDraft } from "@journ/lift";
7
+ import { clamp, parseNumber } from "@journ/fitter-happier";
8
+ //#region src/quantity-input-parts.tsx
9
+ const [QuantityContext, useQuantity] = createRequiredContext("QuantityInput.Root");
10
+ /** A number with minus and plus. Typing is free until blur or Enter, then it snaps to the bounds. */
11
+ const Root = ({ value, defaultValue = 0, onValueChange, min = -Infinity, max = Infinity, step = 1, disabled = false, children, ...props }) => {
12
+ const [stored, setStored] = useControllableState(value, defaultValue, onValueChange);
13
+ const current = clamp(stored ?? 0, min, max);
14
+ const { text, edit, discard, commit } = useDraft({
15
+ value: current,
16
+ format: String,
17
+ parse: (typed) => parseNumber(typed) ?? void 0,
18
+ onCommit: (typed) => setStored(clamp(typed, min, max))
19
+ });
20
+ return /* @__PURE__ */ jsx(QuantityContext, {
21
+ value: {
22
+ value: current,
23
+ min,
24
+ max,
25
+ disabled,
26
+ text,
27
+ edit,
28
+ commit,
29
+ step: (direction) => {
30
+ discard();
31
+ setStored(clamp(current + direction * step, min, max));
32
+ }
33
+ },
34
+ children: /* @__PURE__ */ jsx(Composer.Root, {
35
+ "data-slot": "quantity-input",
36
+ "aria-disabled": disabled || void 0,
37
+ ...props,
38
+ children
39
+ })
40
+ });
41
+ };
42
+ const Decrement = (props) => {
43
+ const { value, min, disabled, step } = useQuantity();
44
+ return /* @__PURE__ */ jsx(StepButton, {
45
+ "data-slot": "quantity-input-decrement",
46
+ "aria-label": "Decrease",
47
+ disabled: disabled || value <= min,
48
+ ...props,
49
+ onStep: () => step(-1)
50
+ });
51
+ };
52
+ const Increment = (props) => {
53
+ const { value, max, disabled, step } = useQuantity();
54
+ return /* @__PURE__ */ jsx(StepButton, {
55
+ "data-slot": "quantity-input-increment",
56
+ "aria-label": "Increase",
57
+ disabled: disabled || value >= max,
58
+ ...props,
59
+ onStep: () => step(1)
60
+ });
61
+ };
62
+ const Field = ({ onBlur, onKeyDown, ...props }) => {
63
+ const { value, min, max, disabled, text, edit, step, commit } = useQuantity();
64
+ return /* @__PURE__ */ jsx(Composer.Input, {
65
+ "data-slot": "quantity-input-field",
66
+ inputMode: "decimal",
67
+ role: "spinbutton",
68
+ "aria-valuenow": value,
69
+ "aria-valuemin": Number.isFinite(min) ? min : void 0,
70
+ "aria-valuemax": Number.isFinite(max) ? max : void 0,
71
+ disabled,
72
+ ...props,
73
+ value: text,
74
+ onChange: (event) => edit(event.target.value),
75
+ ...commitOn(commit, {
76
+ onBlur,
77
+ onKeyDown: (event) => {
78
+ onKeyDown?.(event);
79
+ if (event.key === "ArrowUp") event.preventDefault(), step(1);
80
+ if (event.key === "ArrowDown") event.preventDefault(), step(-1);
81
+ }
82
+ })
83
+ });
84
+ };
85
+ //#endregion
86
+ export { Decrement, Field, Increment, Root };
@@ -0,0 +1,10 @@
1
+ import { Decrement, Field, Increment, Root, RootProps } from "./quantity-input-parts.js";
2
+ //#region src/quantity-input.d.ts
3
+ declare const QuantityInput: {
4
+ Root: typeof Root;
5
+ Decrement: typeof Decrement;
6
+ Field: typeof Field;
7
+ Increment: typeof Increment;
8
+ };
9
+ //#endregion
10
+ export { QuantityInput, type RootProps as QuantityInputProps };
@@ -0,0 +1,10 @@
1
+ import { Decrement, Field, Increment, Root } from "./quantity-input-parts.js";
2
+ //#region src/quantity-input.tsx
3
+ const QuantityInput = {
4
+ Root,
5
+ Decrement,
6
+ Field,
7
+ Increment
8
+ };
9
+ //#endregion
10
+ export { QuantityInput };
@@ -0,0 +1,13 @@
1
+ import { ComponentPropsWithRef } from "react";
2
+ import * as RadixRadio from "@radix-ui/react-radio-group";
3
+ //#region src/radio-parts.d.ts
4
+ declare const Group: (props: RadixRadio.RadioGroupProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactNode;
5
+ type ItemProps = ComponentPropsWithRef<typeof RadixRadio.Item> & {
6
+ classNames?: {
7
+ indicator?: string;
8
+ };
9
+ };
10
+ /** Renders its own indicator after any children. */
11
+ declare const Item: ({ classNames, children, ...props }: ItemProps) => import("react").JSX.Element;
12
+ //#endregion
13
+ export { Group, Item };
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ import { part } from "./lib/part.js";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import * as RadixRadio from "@radix-ui/react-radio-group";
5
+ //#region src/radio-parts.tsx
6
+ const Group = part(RadixRadio.Root, "radio-group");
7
+ /** Renders its own indicator after any children. */
8
+ const Item = ({ classNames, children, ...props }) => /* @__PURE__ */ jsxs(RadixRadio.Item, {
9
+ "data-slot": "radio",
10
+ ...props,
11
+ children: [children, /* @__PURE__ */ jsx(RadixRadio.Indicator, {
12
+ "data-slot": "radio-indicator",
13
+ className: classNames?.indicator
14
+ })]
15
+ });
16
+ //#endregion
17
+ export { Group, Item };
@@ -0,0 +1,8 @@
1
+ import { Item } from "./radio-parts.js";
2
+ //#region src/radio.d.ts
3
+ declare const Radio: {
4
+ Group: (props: import("@radix-ui/react-radio-group").RadioGroupProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactNode;
5
+ Item: typeof Item;
6
+ };
7
+ //#endregion
8
+ export { Radio };
package/dist/radio.js ADDED
@@ -0,0 +1,8 @@
1
+ import { Group, Item } from "./radio-parts.js";
2
+ //#region src/radio.tsx
3
+ const Radio = {
4
+ Group,
5
+ Item
6
+ };
7
+ //#endregion
8
+ export { Radio };
@@ -0,0 +1,17 @@
1
+ import { ComponentPropsWithRef, ReactNode } from "react";
2
+ import * as RadixScrollArea from "@radix-ui/react-scroll-area";
3
+ //#region src/scroll-area-parts.d.ts
4
+ declare const Root: (props: RadixScrollArea.ScrollAreaProps & import("react").RefAttributes<HTMLDivElement>) => ReactNode;
5
+ declare const Viewport: (props: RadixScrollArea.ScrollAreaViewportProps & import("react").RefAttributes<HTMLDivElement>) => ReactNode;
6
+ type ScrollbarProps = Omit<ComponentPropsWithRef<typeof RadixScrollArea.Scrollbar>, 'children'> & {
7
+ classNames?: {
8
+ thumb?: string;
9
+ };
10
+ /** Rendered inside the thumb. */
11
+ children?: ReactNode;
12
+ };
13
+ /** Draws its own thumb. */
14
+ declare const Scrollbar: ({ classNames, children, ...props }: ScrollbarProps) => import("react").JSX.Element;
15
+ declare const Corner: import("react").ForwardRefExoticComponent<RadixScrollArea.ScrollAreaCornerProps & import("react").RefAttributes<HTMLDivElement>>;
16
+ //#endregion
17
+ export { Corner, Root, Scrollbar, Viewport };
@@ -0,0 +1,21 @@
1
+ "use client";
2
+ import { part } from "./lib/part.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import * as RadixScrollArea from "@radix-ui/react-scroll-area";
5
+ //#region src/scroll-area-parts.tsx
6
+ const Root = part(RadixScrollArea.Root, "scroll-area", { type: "hover" });
7
+ const Viewport = part(RadixScrollArea.Viewport, "scroll-area-viewport");
8
+ /** Draws its own thumb. */
9
+ const Scrollbar = ({ classNames, children, ...props }) => /* @__PURE__ */ jsx(RadixScrollArea.Scrollbar, {
10
+ "data-slot": "scroll-area-scrollbar",
11
+ orientation: "vertical",
12
+ ...props,
13
+ children: /* @__PURE__ */ jsx(RadixScrollArea.Thumb, {
14
+ "data-slot": "scroll-area-thumb",
15
+ className: classNames?.thumb,
16
+ children
17
+ })
18
+ });
19
+ const Corner = RadixScrollArea.Corner;
20
+ //#endregion
21
+ export { Corner, Root, Scrollbar, Viewport };
@@ -0,0 +1,10 @@
1
+ import { Scrollbar } from "./scroll-area-parts.js";
2
+ //#region src/scroll-area.d.ts
3
+ declare const ScrollArea: {
4
+ Root: (props: import("@radix-ui/react-scroll-area").ScrollAreaProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactNode;
5
+ Viewport: (props: import("@radix-ui/react-scroll-area").ScrollAreaViewportProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactNode;
6
+ Scrollbar: typeof Scrollbar;
7
+ Corner: import("react").ForwardRefExoticComponent<import("@radix-ui/react-scroll-area").ScrollAreaCornerProps & import("react").RefAttributes<HTMLDivElement>>;
8
+ };
9
+ //#endregion
10
+ export { ScrollArea };
@@ -0,0 +1,10 @@
1
+ import { Corner, Root, Scrollbar, Viewport } from "./scroll-area-parts.js";
2
+ //#region src/scroll-area.tsx
3
+ const ScrollArea = {
4
+ Root,
5
+ Viewport,
6
+ Scrollbar,
7
+ Corner
8
+ };
9
+ //#endregion
10
+ export { ScrollArea };
@@ -0,0 +1,26 @@
1
+ import { ComponentPropsWithRef, ReactNode } from "react";
2
+ import * as RadixSelect from "@radix-ui/react-select";
3
+ //#region src/select-parts.d.ts
4
+ declare const Root: import("react").FC<RadixSelect.SelectProps>;
5
+ declare const Group: import("react").ForwardRefExoticComponent<RadixSelect.SelectGroupProps & import("react").RefAttributes<HTMLDivElement>>;
6
+ declare const Value: import("react").ForwardRefExoticComponent<RadixSelect.SelectValueProps & import("react").RefAttributes<HTMLSpanElement>>;
7
+ type TriggerProps = ComponentPropsWithRef<typeof RadixSelect.Trigger> & {
8
+ /** Rendered after the value, hidden from assistive tech. */
9
+ icon?: ReactNode;
10
+ };
11
+ declare const Trigger: ({ icon, children, ...props }: TriggerProps) => import("react").JSX.Element;
12
+ type ContentProps = ComponentPropsWithRef<typeof RadixSelect.Content> & {
13
+ classNames?: {
14
+ viewport?: string;
15
+ };
16
+ };
17
+ declare const Content: ({ classNames, children, position, ...props }: ContentProps) => import("react").JSX.Element;
18
+ type ItemProps = ComponentPropsWithRef<typeof RadixSelect.Item> & {
19
+ /** Shown while the item is the selected one. */
20
+ indicator?: ReactNode;
21
+ };
22
+ declare const Item: ({ indicator, children, ...props }: ItemProps) => import("react").JSX.Element;
23
+ declare const Label: (props: RadixSelect.SelectLabelProps & import("react").RefAttributes<HTMLDivElement>) => ReactNode;
24
+ declare const Separator: (props: RadixSelect.SelectSeparatorProps & import("react").RefAttributes<HTMLDivElement>) => ReactNode;
25
+ //#endregion
26
+ export { Content, Group, Item, Label, Root, Separator, Trigger, Value };
@@ -0,0 +1,38 @@
1
+ "use client";
2
+ import { part } from "./lib/part.js";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import * as RadixSelect from "@radix-ui/react-select";
5
+ //#region src/select-parts.tsx
6
+ const Root = RadixSelect.Root;
7
+ const Group = RadixSelect.Group;
8
+ const Value = RadixSelect.Value;
9
+ const Trigger = ({ icon, children, ...props }) => /* @__PURE__ */ jsxs(RadixSelect.Trigger, {
10
+ "data-slot": "select-trigger",
11
+ ...props,
12
+ children: [children, icon && /* @__PURE__ */ jsx(RadixSelect.Icon, {
13
+ "data-slot": "select-icon",
14
+ children: icon
15
+ })]
16
+ });
17
+ const Content = ({ classNames, children, position = "popper", ...props }) => /* @__PURE__ */ jsx(RadixSelect.Portal, { children: /* @__PURE__ */ jsx(RadixSelect.Content, {
18
+ "data-slot": "select-content",
19
+ position,
20
+ ...props,
21
+ children: /* @__PURE__ */ jsx(RadixSelect.Viewport, {
22
+ "data-slot": "select-viewport",
23
+ className: classNames?.viewport,
24
+ children
25
+ })
26
+ }) });
27
+ const Item = ({ indicator, children, ...props }) => /* @__PURE__ */ jsxs(RadixSelect.Item, {
28
+ "data-slot": "select-item",
29
+ ...props,
30
+ children: [/* @__PURE__ */ jsx(RadixSelect.ItemText, { children }), indicator && /* @__PURE__ */ jsx(RadixSelect.ItemIndicator, {
31
+ "data-slot": "select-item-indicator",
32
+ children: indicator
33
+ })]
34
+ });
35
+ const Label = part(RadixSelect.Label, "select-label");
36
+ const Separator = part(RadixSelect.Separator, "select-separator");
37
+ //#endregion
38
+ export { Content, Group, Item, Label, Root, Separator, Trigger, Value };
@@ -0,0 +1,14 @@
1
+ import { Content, Item, Trigger } from "./select-parts.js";
2
+ //#region src/select.d.ts
3
+ declare const Select: {
4
+ Root: import("react").FC<import("@radix-ui/react-select").SelectProps>;
5
+ Trigger: typeof Trigger;
6
+ Value: import("react").ForwardRefExoticComponent<import("@radix-ui/react-select").SelectValueProps & import("react").RefAttributes<HTMLSpanElement>>;
7
+ Content: typeof Content;
8
+ Group: import("react").ForwardRefExoticComponent<import("@radix-ui/react-select").SelectGroupProps & import("react").RefAttributes<HTMLDivElement>>;
9
+ Label: (props: import("@radix-ui/react-select").SelectLabelProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactNode;
10
+ Item: typeof Item;
11
+ Separator: (props: import("@radix-ui/react-select").SelectSeparatorProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactNode;
12
+ };
13
+ //#endregion
14
+ export { Select };
package/dist/select.js ADDED
@@ -0,0 +1,14 @@
1
+ import { Content, Group, Item, Label, Root, Separator, Trigger, Value } from "./select-parts.js";
2
+ //#region src/select.tsx
3
+ const Select = {
4
+ Root,
5
+ Trigger,
6
+ Value,
7
+ Content,
8
+ Group,
9
+ Label,
10
+ Item,
11
+ Separator
12
+ };
13
+ //#endregion
14
+ export { Select };
@@ -0,0 +1,15 @@
1
+ import { ModalContentProps } from "./lib/modal-content.js";
2
+ import { Actions, Body } from "./lib/modal-parts.js";
3
+ import { Close, Description, Root, Title, Trigger } from "./dialog-parts.js";
4
+ import { ComponentPropsWithRef } from "react";
5
+ import * as RadixDialog from "@radix-ui/react-dialog";
6
+ //#region src/sheet-parts.d.ts
7
+ type Side = 'top' | 'right' | 'bottom' | 'left';
8
+ declare const SheetContent: ({ classNames, overlayRef, ...props }: ModalContentProps<typeof RadixDialog>) => import("react").JSX.Element;
9
+ type ContentProps = ComponentPropsWithRef<typeof SheetContent> & {
10
+ side?: Side;
11
+ };
12
+ /** A dialog attached to one edge. `data-side` tells the styles which one. */
13
+ declare const Content: ({ side, ...props }: ContentProps) => import("react").JSX.Element;
14
+ //#endregion
15
+ export { Actions, Body, Close, Content, Description, Root, type ContentProps as SheetContentProps, type Side as SheetSide, Title, Trigger };
@@ -0,0 +1,15 @@
1
+ "use client";
2
+ import { createModalContent } from "./lib/modal-content.js";
3
+ import { Actions, Body } from "./lib/modal-parts.js";
4
+ import { Close, Description, Root, Title, Trigger } from "./dialog-parts.js";
5
+ import { jsx } from "react/jsx-runtime";
6
+ import * as RadixDialog from "@radix-ui/react-dialog";
7
+ //#region src/sheet-parts.tsx
8
+ const SheetContent = createModalContent(RadixDialog, "sheet");
9
+ /** A dialog attached to one edge. `data-side` tells the styles which one. */
10
+ const Content = ({ side = "right", ...props }) => /* @__PURE__ */ jsx(SheetContent, {
11
+ "data-side": side,
12
+ ...props
13
+ });
14
+ //#endregion
15
+ export { Actions, Body, Close, Content, Description, Root, Title, Trigger };
@@ -0,0 +1,14 @@
1
+ import { Content, SheetContentProps as ContentProps, SheetSide as Side } from "./sheet-parts.js";
2
+ //#region src/sheet.d.ts
3
+ declare const Sheet: {
4
+ Root: import("react").FC<import("@radix-ui/react-dialog").DialogProps>;
5
+ Trigger: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
6
+ Close: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
7
+ Content: typeof Content;
8
+ Title: (props: import("@radix-ui/react-dialog").DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>) => import("react").ReactNode;
9
+ Description: (props: import("@radix-ui/react-dialog").DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>) => import("react").ReactNode;
10
+ Body: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>) => import("react").ReactNode;
11
+ Actions: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>) => import("react").ReactNode;
12
+ };
13
+ //#endregion
14
+ export { Sheet, type ContentProps as SheetContentProps, type Side as SheetSide };
package/dist/sheet.js ADDED
@@ -0,0 +1,16 @@
1
+ import { Actions, Body } from "./lib/modal-parts.js";
2
+ import { Close, Description, Root, Title, Trigger } from "./dialog-parts.js";
3
+ import { Content } from "./sheet-parts.js";
4
+ //#region src/sheet.tsx
5
+ const Sheet = {
6
+ Root,
7
+ Trigger,
8
+ Close,
9
+ Content,
10
+ Title,
11
+ Description,
12
+ Body,
13
+ Actions
14
+ };
15
+ //#endregion
16
+ export { Sheet };
@@ -0,0 +1,14 @@
1
+ //#region src/sidebar.d.ts
2
+ declare const Sidebar: {
3
+ Layout: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>) => import("react").ReactNode;
4
+ Root: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>) => import("react").ReactNode;
5
+ Header: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>) => import("react").ReactNode;
6
+ Body: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>) => import("react").ReactNode;
7
+ Section: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>) => import("react").ReactNode;
8
+ Heading: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>) => import("react").ReactNode;
9
+ Item: (props: import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>) => import("react").ReactNode;
10
+ Footer: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>) => import("react").ReactNode;
11
+ Content: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>) => import("react").ReactNode;
12
+ };
13
+ //#endregion
14
+ export { Sidebar };
@@ -0,0 +1,17 @@
1
+ import { part } from "./lib/part.js";
2
+ //#region src/sidebar.tsx
3
+ const Layout = part("div", "sidebar-layout");
4
+ const Content = part("main", "sidebar-content");
5
+ const Sidebar = {
6
+ Layout,
7
+ Root: part("aside", "sidebar"),
8
+ Header: part("div", "sidebar-header"),
9
+ Body: part("nav", "sidebar-body"),
10
+ Section: part("div", "sidebar-section"),
11
+ Heading: part("h3", "sidebar-heading"),
12
+ Item: part("a", "sidebar-item"),
13
+ Footer: part("div", "sidebar-footer"),
14
+ Content
15
+ };
16
+ //#endregion
17
+ export { Sidebar };
@@ -0,0 +1,4 @@
1
+ //#region src/skeleton.d.ts
2
+ declare const Skeleton: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>) => import("react").ReactNode;
3
+ //#endregion
4
+ export { Skeleton };
@@ -0,0 +1,5 @@
1
+ import { part } from "./lib/part.js";
2
+ //#region src/skeleton.tsx
3
+ const Skeleton = part("div", "skeleton", { "aria-hidden": true });
4
+ //#endregion
5
+ export { Skeleton };
@@ -0,0 +1,9 @@
1
+ import * as RadixSlider from "@radix-ui/react-slider";
2
+ //#region src/slider-parts.d.ts
3
+ declare const Root: (props: RadixSlider.SliderProps & import("react").RefAttributes<HTMLSpanElement>) => import("react").ReactNode;
4
+ declare const Track: (props: RadixSlider.SliderTrackProps & import("react").RefAttributes<HTMLSpanElement>) => import("react").ReactNode;
5
+ declare const Range: (props: RadixSlider.SliderRangeProps & import("react").RefAttributes<HTMLSpanElement>) => import("react").ReactNode;
6
+ /** Render one thumb per value. */
7
+ declare const Thumb: (props: RadixSlider.SliderThumbProps & import("react").RefAttributes<HTMLSpanElement>) => import("react").ReactNode;
8
+ //#endregion
9
+ export { Range, Root, Thumb, Track };
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ import { part } from "./lib/part.js";
3
+ import * as RadixSlider from "@radix-ui/react-slider";
4
+ //#region src/slider-parts.tsx
5
+ const Root = part(RadixSlider.Root, "slider");
6
+ const Track = part(RadixSlider.Track, "slider-track");
7
+ const Range = part(RadixSlider.Range, "slider-range");
8
+ /** Render one thumb per value. */
9
+ const Thumb = part(RadixSlider.Thumb, "slider-thumb");
10
+ //#endregion
11
+ export { Range, Root, Thumb, Track };
@@ -0,0 +1,9 @@
1
+ //#region src/slider.d.ts
2
+ declare const Slider: {
3
+ Root: (props: import("@radix-ui/react-slider").SliderProps & import("react").RefAttributes<HTMLSpanElement>) => import("react").ReactNode;
4
+ Track: (props: import("@radix-ui/react-slider").SliderTrackProps & import("react").RefAttributes<HTMLSpanElement>) => import("react").ReactNode;
5
+ Range: (props: import("@radix-ui/react-slider").SliderRangeProps & import("react").RefAttributes<HTMLSpanElement>) => import("react").ReactNode;
6
+ Thumb: (props: import("@radix-ui/react-slider").SliderThumbProps & import("react").RefAttributes<HTMLSpanElement>) => import("react").ReactNode;
7
+ };
8
+ //#endregion
9
+ export { Slider };
package/dist/slider.js ADDED
@@ -0,0 +1,10 @@
1
+ import { Range, Root, Thumb, Track } from "./slider-parts.js";
2
+ //#region src/slider.tsx
3
+ const Slider = {
4
+ Root,
5
+ Track,
6
+ Range,
7
+ Thumb
8
+ };
9
+ //#endregion
10
+ export { Slider };
@@ -0,0 +1,6 @@
1
+ import { ComponentPropsWithRef } from "react";
2
+ //#region src/spinner.d.ts
3
+ /** Announces itself as "Loading" unless `aria-hidden` says another element already does. */
4
+ declare const Spinner: ({ 'aria-hidden': hidden, ...props }: ComponentPropsWithRef<'svg'>) => import("react").JSX.Element;
5
+ //#endregion
6
+ export { Spinner };