@journ/nude 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/dist/accordion-parts.d.ts +6 -5
  2. package/dist/accordion.d.ts +4 -4
  3. package/dist/alert-dialog-parts.d.ts +9 -8
  4. package/dist/alert-dialog.d.ts +10 -9
  5. package/dist/alert.d.ts +13 -6
  6. package/dist/animated-size.d.ts +3 -3
  7. package/dist/animated-size.js +1 -1
  8. package/dist/avatar-parts.d.ts +5 -4
  9. package/dist/avatar.d.ts +3 -3
  10. package/dist/badge.d.ts +2 -1
  11. package/dist/breadcrumbs.d.ts +13 -6
  12. package/dist/bulk-bar.d.ts +8 -3
  13. package/dist/button.d.ts +4 -4
  14. package/dist/calendar-parts.d.ts +23 -26
  15. package/dist/calendar-parts.js +5 -3
  16. package/dist/card.d.ts +15 -7
  17. package/dist/carousel-parts.d.ts +20 -11
  18. package/dist/carousel-parts.js +3 -2
  19. package/dist/checkbox-parts.d.ts +3 -2
  20. package/dist/checkbox.d.ts +3 -2
  21. package/dist/chip.d.ts +9 -7
  22. package/dist/collapsible-parts.d.ts +4 -3
  23. package/dist/collapsible.d.ts +4 -3
  24. package/dist/combobox-parts.d.ts +19 -63
  25. package/dist/combobox-parts.js +8 -2
  26. package/dist/combobox.d.ts +13 -76
  27. package/dist/command-palette-parts.d.ts +3 -3
  28. package/dist/command-palette-parts.js +1 -1
  29. package/dist/command-palette.d.ts +8 -54
  30. package/dist/composer.d.ts +5 -2
  31. package/dist/context-menu-parts.d.ts +8 -4
  32. package/dist/context-menu-parts.js +5 -1
  33. package/dist/context-menu.d.ts +8 -7
  34. package/dist/currency-input-parts.d.ts +4 -3
  35. package/dist/currency-input-parts.js +5 -2
  36. package/dist/data-table-parts.d.ts +18 -25
  37. package/dist/data-table-parts.js +1 -2
  38. package/dist/date-input-parts.d.ts +4 -3
  39. package/dist/date-input-parts.js +3 -2
  40. package/dist/date-picker-parts.d.ts +11 -10
  41. package/dist/date-picker-parts.js +6 -1
  42. package/dist/date-picker.d.ts +7 -21
  43. package/dist/date-range-picker-parts.d.ts +11 -10
  44. package/dist/date-range-picker-parts.js +6 -1
  45. package/dist/date-range-picker.d.ts +7 -21
  46. package/dist/description-list.d.ts +7 -3
  47. package/dist/dialog-parts.d.ts +8 -7
  48. package/dist/dialog.d.ts +10 -9
  49. package/dist/divider.d.ts +2 -1
  50. package/dist/drawer-parts.d.ts +9 -20
  51. package/dist/drawer.d.ts +10 -22
  52. package/dist/dropdown-menu-parts.d.ts +8 -4
  53. package/dist/dropdown-menu-parts.js +5 -1
  54. package/dist/dropdown-menu.d.ts +8 -7
  55. package/dist/empty-state.d.ts +11 -5
  56. package/dist/field-parts.d.ts +8 -7
  57. package/dist/field-parts.js +1 -1
  58. package/dist/file-dropzone-parts.d.ts +8 -7
  59. package/dist/file-dropzone.d.ts +4 -4
  60. package/dist/heading.d.ts +3 -3
  61. package/dist/hover-card-parts.d.ts +4 -4
  62. package/dist/hover-card.d.ts +3 -3
  63. package/dist/icon-button.d.ts +3 -2
  64. package/dist/icon.d.ts +3 -3
  65. package/dist/index.d.ts +2 -1
  66. package/dist/index.js +2 -1
  67. package/dist/input.d.ts +2 -1
  68. package/dist/lib/commit-on.d.ts +6 -5
  69. package/dist/lib/menu-parts.d.ts +9 -7
  70. package/dist/lib/modal-content.d.ts +5 -4
  71. package/dist/lib/modal-parts.d.ts +3 -2
  72. package/dist/lib/part.d.ts +3 -2
  73. package/dist/lib/picker.d.ts +18 -15
  74. package/dist/lib/picker.js +2 -1
  75. package/dist/link.d.ts +3 -3
  76. package/dist/list-row.d.ts +22 -0
  77. package/dist/list-row.js +14 -0
  78. package/dist/markdown.d.ts +2 -2
  79. package/dist/message.d.ts +9 -6
  80. package/dist/month-picker-parts.d.ts +2 -2
  81. package/dist/month-picker-parts.js +2 -2
  82. package/dist/month-stepper-parts.d.ts +7 -6
  83. package/dist/month-stepper-parts.js +3 -2
  84. package/dist/multiple-selector-parts.d.ts +23 -11
  85. package/dist/multiple-selector-parts.js +8 -3
  86. package/dist/multiple-selector.d.ts +11 -64
  87. package/dist/nav-bar.d.ts +5 -2
  88. package/dist/navigation-menu-parts.d.ts +8 -7
  89. package/dist/navigation-menu.d.ts +6 -6
  90. package/dist/otp-input-parts.d.ts +4 -3
  91. package/dist/otp-input.d.ts +4 -3
  92. package/dist/page-header.d.ts +7 -3
  93. package/dist/page.d.ts +7 -3
  94. package/dist/pagination.d.ts +12 -7
  95. package/dist/pill-select.d.ts +2 -1
  96. package/dist/popover-parts.d.ts +5 -5
  97. package/dist/popover.d.ts +4 -4
  98. package/dist/portal.d.ts +1 -1
  99. package/dist/progress-parts.d.ts +5 -4
  100. package/dist/progress-parts.js +1 -1
  101. package/dist/quantity-input-parts.d.ts +7 -6
  102. package/dist/quantity-input-parts.js +5 -2
  103. package/dist/radio-parts.d.ts +4 -3
  104. package/dist/radio.d.ts +2 -2
  105. package/dist/scroll-area-parts.d.ts +7 -6
  106. package/dist/scroll-area.d.ts +4 -4
  107. package/dist/select-parts.d.ts +10 -9
  108. package/dist/select.d.ts +6 -6
  109. package/dist/sheet-parts.d.ts +5 -5
  110. package/dist/sheet.d.ts +9 -7
  111. package/dist/sidebar.d.ts +19 -9
  112. package/dist/skeleton.d.ts +2 -1
  113. package/dist/slider-parts.d.ts +5 -4
  114. package/dist/slider.d.ts +5 -4
  115. package/dist/spinner.d.ts +2 -2
  116. package/dist/stack-parts.d.ts +8 -7
  117. package/dist/stack-parts.js +2 -1
  118. package/dist/stat.d.ts +9 -4
  119. package/dist/step-button.d.ts +4 -3
  120. package/dist/stepper-parts.d.ts +15 -10
  121. package/dist/stepper-parts.js +3 -2
  122. package/dist/stepper.d.ts +3 -3
  123. package/dist/styled.d.ts +5 -0
  124. package/dist/styled.js +0 -0
  125. package/dist/switch-parts.d.ts +3 -2
  126. package/dist/switch.d.ts +3 -2
  127. package/dist/table.d.ts +15 -7
  128. package/dist/tabs-parts.d.ts +5 -4
  129. package/dist/tabs.d.ts +5 -4
  130. package/dist/tag-input-parts.d.ts +18 -8
  131. package/dist/tag-input-parts.js +4 -2
  132. package/dist/text-morph.d.ts +3 -3
  133. package/dist/text-morph.js +1 -1
  134. package/dist/text-shimmer.d.ts +3 -3
  135. package/dist/text.d.ts +2 -1
  136. package/dist/textarea.d.ts +2 -1
  137. package/dist/time-range-parts.d.ts +6 -6
  138. package/dist/time-range-parts.js +3 -2
  139. package/dist/toast-parts.d.ts +7 -6
  140. package/dist/toggle-group-parts.d.ts +3 -2
  141. package/dist/toggle-group.d.ts +3 -2
  142. package/dist/tooltip-parts.d.ts +5 -5
  143. package/dist/tooltip.d.ts +3 -3
  144. package/dist/touch-target.d.ts +2 -2
  145. package/package.json +3 -3
@@ -1,4 +1,5 @@
1
+ import { Styled } from "./styled.js";
1
2
  //#region src/pill-select.d.ts
2
- declare const PillSelect: (props: import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>) => import("react").ReactNode;
3
+ declare const PillSelect: Styled<"select">;
3
4
  //#endregion
4
5
  export { PillSelect };
@@ -1,9 +1,9 @@
1
- import { ComponentPropsWithRef } from "react";
1
+ import { Styled } from "./styled.js";
2
2
  import * as RadixPopover from "@radix-ui/react-popover";
3
3
  //#region src/popover-parts.d.ts
4
- declare const Root: import("react").FC<RadixPopover.PopoverProps>;
5
- declare const Trigger: import("react").ForwardRefExoticComponent<RadixPopover.PopoverTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
6
- declare const Close: import("react").ForwardRefExoticComponent<RadixPopover.PopoverCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
7
- declare const Content: (props: ComponentPropsWithRef<typeof RadixPopover.Content>) => import("react").JSX.Element;
4
+ declare const Root: typeof RadixPopover.Root;
5
+ declare const Trigger: typeof RadixPopover.Trigger;
6
+ declare const Close: typeof RadixPopover.Close;
7
+ declare const Content: Styled<typeof RadixPopover.Content>;
8
8
  //#endregion
9
9
  export { Close, Content, Root, Trigger };
package/dist/popover.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { Content } from "./popover-parts.js";
1
+ import { Close, Content, Root, Trigger } from "./popover-parts.js";
2
2
  //#region src/popover.d.ts
3
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>>;
4
+ Root: typeof Root;
5
+ Trigger: typeof Trigger;
6
6
  Content: typeof Content;
7
- Close: import("react").ForwardRefExoticComponent<import("@radix-ui/react-popover").PopoverCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
7
+ Close: typeof Close;
8
8
  };
9
9
  //#endregion
10
10
  export { Popover };
package/dist/portal.d.ts CHANGED
@@ -10,6 +10,6 @@ type PortalProps = {
10
10
  * cannot trap them. Waits for the client, so it renders nothing on the server.
11
11
  * Radix overlays already portal themselves; use this for your own floating UI.
12
12
  */
13
- declare const Portal: ({ children, container }: PortalProps) => import("react").ReactPortal | null;
13
+ declare const Portal: ({ children, container }: PortalProps) => ReactNode;
14
14
  //#endregion
15
15
  export { Portal, type PortalProps };
@@ -1,11 +1,12 @@
1
- import { ComponentPropsWithRef } from "react";
1
+ import { Styled } from "./styled.js";
2
+ import { ComponentPropsWithRef, JSX } from "react";
2
3
  import * as RadixProgress from "@radix-ui/react-progress";
3
4
  //#region src/progress-parts.d.ts
4
- type RootProps = Omit<ComponentPropsWithRef<typeof RadixProgress.Root>, 'value'> & {
5
+ type RootProps = Omit<ComponentPropsWithRef<typeof RadixProgress.Root>, "value"> & {
5
6
  value: number;
6
7
  };
7
- declare const Root: ({ value, max, ...props }: RootProps) => import("react").JSX.Element;
8
+ declare const Root: ({ value, max, ...props }: RootProps) => JSX.Element;
8
9
  /** Slides in from the left as the value grows. */
9
- declare const Indicator: ({ style, ...props }: ComponentPropsWithRef<typeof RadixProgress.Indicator>) => import("react").JSX.Element;
10
+ declare const Indicator: Styled<typeof RadixProgress.Indicator>;
10
11
  //#endregion
11
12
  export { Indicator, type RootProps as ProgressProps, Root };
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx } from "react/jsx-runtime";
3
- import { createRequiredContext } from "@journ/lift";
3
+ import { createRequiredContext } from "@journ/lift/required-context";
4
4
  import * as RadixProgress from "@radix-ui/react-progress";
5
5
  //#region src/progress-parts.tsx
6
6
  const [PercentageContext, usePercentage] = createRequiredContext("Progress.Root");
@@ -1,8 +1,9 @@
1
+ import { Styled } from "./styled.js";
1
2
  import { IconButtonProps } from "./icon-button.js";
2
3
  import { Composer } from "./composer.js";
3
- import { ComponentPropsWithRef, ReactNode } from "react";
4
+ import { ComponentPropsWithRef, JSX, ReactNode } from "react";
4
5
  //#region src/quantity-input-parts.d.ts
5
- type RootProps = Omit<ComponentPropsWithRef<'div'>, 'defaultValue' | 'onChange'> & {
6
+ type RootProps = Omit<ComponentPropsWithRef<"div">, "defaultValue" | "onChange"> & {
6
7
  value?: number;
7
8
  defaultValue?: number;
8
9
  onValueChange?: (value: number) => void;
@@ -13,9 +14,9 @@ type RootProps = Omit<ComponentPropsWithRef<'div'>, 'defaultValue' | 'onChange'>
13
14
  children?: ReactNode;
14
15
  };
15
16
  /** 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;
17
+ declare const Root: ({ value, defaultValue, onValueChange, min, max, step, disabled, children, ...props }: RootProps) => JSX.Element;
18
+ declare const Decrement: (props: IconButtonProps) => JSX.Element;
19
+ declare const Increment: (props: IconButtonProps) => JSX.Element;
20
+ declare const Field: Styled<typeof Composer.Input>;
20
21
  //#endregion
21
22
  export { Decrement, Field, Increment, Root, type RootProps };
@@ -3,8 +3,11 @@ import { StepButton } from "./step-button.js";
3
3
  import { Composer } from "./composer.js";
4
4
  import { commitOn } from "./lib/commit-on.js";
5
5
  import { jsx } from "react/jsx-runtime";
6
- import { createRequiredContext, useControllableState, useDraft } from "@journ/lift";
7
- import { clamp, parseNumber } from "@journ/fitter-happier";
6
+ import { createRequiredContext } from "@journ/lift/required-context";
7
+ import { useControllableState } from "@journ/lift/use-controllable-state";
8
+ import { clamp } from "@journ/fitter-happier/clamp";
9
+ import { parseNumber } from "@journ/fitter-happier/number";
10
+ import { useDraft } from "@journ/lift/use-draft";
8
11
  //#region src/quantity-input-parts.tsx
9
12
  const [QuantityContext, useQuantity] = createRequiredContext("QuantityInput.Root");
10
13
  /** A number with minus and plus. Typing is free until blur or Enter, then it snaps to the bounds. */
@@ -1,13 +1,14 @@
1
- import { ComponentPropsWithRef } from "react";
1
+ import { Styled } from "./styled.js";
2
+ import { ComponentPropsWithRef, JSX } from "react";
2
3
  import * as RadixRadio from "@radix-ui/react-radio-group";
3
4
  //#region src/radio-parts.d.ts
4
- declare const Group: (props: RadixRadio.RadioGroupProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactNode;
5
+ declare const Group: Styled<typeof RadixRadio.Root>;
5
6
  type ItemProps = ComponentPropsWithRef<typeof RadixRadio.Item> & {
6
7
  classNames?: {
7
8
  indicator?: string;
8
9
  };
9
10
  };
10
11
  /** Renders its own indicator after any children. */
11
- declare const Item: ({ classNames, children, ...props }: ItemProps) => import("react").JSX.Element;
12
+ declare const Item: ({ classNames, children, ...props }: ItemProps) => JSX.Element;
12
13
  //#endregion
13
14
  export { Group, Item };
package/dist/radio.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { Item } from "./radio-parts.js";
1
+ import { Group, Item } from "./radio-parts.js";
2
2
  //#region src/radio.d.ts
3
3
  declare const Radio: {
4
- Group: (props: import("@radix-ui/react-radio-group").RadioGroupProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactNode;
4
+ Group: typeof Group;
5
5
  Item: typeof Item;
6
6
  };
7
7
  //#endregion
@@ -1,9 +1,10 @@
1
- import { ComponentPropsWithRef, ReactNode } from "react";
1
+ import { Styled } from "./styled.js";
2
+ import { ComponentPropsWithRef, JSX, ReactNode } from "react";
2
3
  import * as RadixScrollArea from "@radix-ui/react-scroll-area";
3
4
  //#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'> & {
5
+ declare const Root: Styled<typeof RadixScrollArea.Root>;
6
+ declare const Viewport: Styled<typeof RadixScrollArea.Viewport>;
7
+ type ScrollbarProps = Omit<ComponentPropsWithRef<typeof RadixScrollArea.Scrollbar>, "children"> & {
7
8
  classNames?: {
8
9
  thumb?: string;
9
10
  };
@@ -11,7 +12,7 @@ type ScrollbarProps = Omit<ComponentPropsWithRef<typeof RadixScrollArea.Scrollba
11
12
  children?: ReactNode;
12
13
  };
13
14
  /** 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>>;
15
+ declare const Scrollbar: ({ classNames, children, ...props }: ScrollbarProps) => JSX.Element;
16
+ declare const Corner: typeof RadixScrollArea.Corner;
16
17
  //#endregion
17
18
  export { Corner, Root, Scrollbar, Viewport };
@@ -1,10 +1,10 @@
1
- import { Scrollbar } from "./scroll-area-parts.js";
1
+ import { Corner, Root, Scrollbar, Viewport } from "./scroll-area-parts.js";
2
2
  //#region src/scroll-area.d.ts
3
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;
4
+ Root: typeof Root;
5
+ Viewport: typeof Viewport;
6
6
  Scrollbar: typeof Scrollbar;
7
- Corner: import("react").ForwardRefExoticComponent<import("@radix-ui/react-scroll-area").ScrollAreaCornerProps & import("react").RefAttributes<HTMLDivElement>>;
7
+ Corner: typeof Corner;
8
8
  };
9
9
  //#endregion
10
10
  export { ScrollArea };
@@ -1,26 +1,27 @@
1
- import { ComponentPropsWithRef, ReactNode } from "react";
1
+ import { Styled } from "./styled.js";
2
+ import { ComponentPropsWithRef, JSX, ReactNode } from "react";
2
3
  import * as RadixSelect from "@radix-ui/react-select";
3
4
  //#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>>;
5
+ declare const Root: typeof RadixSelect.Root;
6
+ declare const Group: typeof RadixSelect.Group;
7
+ declare const Value: typeof RadixSelect.Value;
7
8
  type TriggerProps = ComponentPropsWithRef<typeof RadixSelect.Trigger> & {
8
9
  /** Rendered after the value, hidden from assistive tech. */
9
10
  icon?: ReactNode;
10
11
  };
11
- declare const Trigger: ({ icon, children, ...props }: TriggerProps) => import("react").JSX.Element;
12
+ declare const Trigger: ({ icon, children, ...props }: TriggerProps) => JSX.Element;
12
13
  type ContentProps = ComponentPropsWithRef<typeof RadixSelect.Content> & {
13
14
  classNames?: {
14
15
  viewport?: string;
15
16
  };
16
17
  };
17
- declare const Content: ({ classNames, children, position, ...props }: ContentProps) => import("react").JSX.Element;
18
+ declare const Content: ({ classNames, children, position, ...props }: ContentProps) => JSX.Element;
18
19
  type ItemProps = ComponentPropsWithRef<typeof RadixSelect.Item> & {
19
20
  /** Shown while the item is the selected one. */
20
21
  indicator?: ReactNode;
21
22
  };
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;
23
+ declare const Item: ({ indicator, children, ...props }: ItemProps) => JSX.Element;
24
+ declare const Label: Styled<typeof RadixSelect.Label>;
25
+ declare const Separator: Styled<typeof RadixSelect.Separator>;
25
26
  //#endregion
26
27
  export { Content, Group, Item, Label, Root, Separator, Trigger, Value };
package/dist/select.d.ts CHANGED
@@ -1,14 +1,14 @@
1
- import { Content, Item, Trigger } from "./select-parts.js";
1
+ import { Content, Group, Item, Label, Root, Separator, Trigger, Value } from "./select-parts.js";
2
2
  //#region src/select.d.ts
3
3
  declare const Select: {
4
- Root: import("react").FC<import("@radix-ui/react-select").SelectProps>;
4
+ Root: typeof Root;
5
5
  Trigger: typeof Trigger;
6
- Value: import("react").ForwardRefExoticComponent<import("@radix-ui/react-select").SelectValueProps & import("react").RefAttributes<HTMLSpanElement>>;
6
+ Value: typeof Value;
7
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;
8
+ Group: typeof Group;
9
+ Label: typeof Label;
10
10
  Item: typeof Item;
11
- Separator: (props: import("@radix-ui/react-select").SelectSeparatorProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactNode;
11
+ Separator: typeof Separator;
12
12
  };
13
13
  //#endregion
14
14
  export { Select };
@@ -1,15 +1,15 @@
1
- import { ModalContentProps } from "./lib/modal-content.js";
1
+ import { ModalContentPart } from "./lib/modal-content.js";
2
2
  import { Actions, Body } from "./lib/modal-parts.js";
3
3
  import { Close, Description, Root, Title, Trigger } from "./dialog-parts.js";
4
- import { ComponentPropsWithRef } from "react";
4
+ import { ComponentPropsWithRef, JSX } from "react";
5
5
  import * as RadixDialog from "@radix-ui/react-dialog";
6
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;
7
+ type Side = "top" | "right" | "bottom" | "left";
8
+ declare const SheetContent: ModalContentPart<typeof RadixDialog>;
9
9
  type ContentProps = ComponentPropsWithRef<typeof SheetContent> & {
10
10
  side?: Side;
11
11
  };
12
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;
13
+ declare const Content: ({ side, ...props }: ContentProps) => JSX.Element;
14
14
  //#endregion
15
15
  export { Actions, Body, Close, Content, Description, Root, type ContentProps as SheetContentProps, type Side as SheetSide, Title, Trigger };
package/dist/sheet.d.ts CHANGED
@@ -1,14 +1,16 @@
1
+ import { Actions, Body } from "./lib/modal-parts.js";
2
+ import { Close, Description, Root, Title, Trigger } from "./dialog-parts.js";
1
3
  import { Content, SheetContentProps as ContentProps, SheetSide as Side } from "./sheet-parts.js";
2
4
  //#region src/sheet.d.ts
3
5
  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>>;
6
+ Root: typeof Root;
7
+ Trigger: typeof Trigger;
8
+ Close: typeof Close;
7
9
  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;
10
+ Title: typeof Title;
11
+ Description: typeof Description;
12
+ Body: typeof Body;
13
+ Actions: typeof Actions;
12
14
  };
13
15
  //#endregion
14
16
  export { Sheet, type ContentProps as SheetContentProps, type Side as SheetSide };
package/dist/sidebar.d.ts CHANGED
@@ -1,14 +1,24 @@
1
+ import { Styled } from "./styled.js";
1
2
  //#region src/sidebar.d.ts
3
+ declare const Layout: Styled<"div">;
4
+ declare const Content: Styled<"main">;
5
+ declare const Root: Styled<"aside">;
6
+ declare const Header: Styled<"div">;
7
+ declare const Body: Styled<"nav">;
8
+ declare const Section: Styled<"div">;
9
+ declare const Heading: Styled<"h3">;
10
+ declare const Item: Styled<"a">;
11
+ declare const Footer: Styled<"div">;
2
12
  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;
13
+ Layout: typeof Layout;
14
+ Root: typeof Root;
15
+ Header: typeof Header;
16
+ Body: typeof Body;
17
+ Section: typeof Section;
18
+ Heading: typeof Heading;
19
+ Item: typeof Item;
20
+ Footer: typeof Footer;
21
+ Content: typeof Content;
12
22
  };
13
23
  //#endregion
14
24
  export { Sidebar };
@@ -1,4 +1,5 @@
1
+ import { Styled } from "./styled.js";
1
2
  //#region src/skeleton.d.ts
2
- declare const Skeleton: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>) => import("react").ReactNode;
3
+ declare const Skeleton: Styled<"div">;
3
4
  //#endregion
4
5
  export { Skeleton };
@@ -1,9 +1,10 @@
1
+ import { Styled } from "./styled.js";
1
2
  import * as RadixSlider from "@radix-ui/react-slider";
2
3
  //#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;
4
+ declare const Root: Styled<typeof RadixSlider.Root>;
5
+ declare const Track: Styled<typeof RadixSlider.Track>;
6
+ declare const Range: Styled<typeof RadixSlider.Range>;
6
7
  /** Render one thumb per value. */
7
- declare const Thumb: (props: RadixSlider.SliderThumbProps & import("react").RefAttributes<HTMLSpanElement>) => import("react").ReactNode;
8
+ declare const Thumb: Styled<typeof RadixSlider.Thumb>;
8
9
  //#endregion
9
10
  export { Range, Root, Thumb, Track };
package/dist/slider.d.ts CHANGED
@@ -1,9 +1,10 @@
1
+ import { Range, Root, Thumb, Track } from "./slider-parts.js";
1
2
  //#region src/slider.d.ts
2
3
  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;
4
+ Root: typeof Root;
5
+ Track: typeof Track;
6
+ Range: typeof Range;
7
+ Thumb: typeof Thumb;
7
8
  };
8
9
  //#endregion
9
10
  export { Slider };
package/dist/spinner.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { ComponentPropsWithRef } from "react";
1
+ import { Styled } from "./styled.js";
2
2
  //#region src/spinner.d.ts
3
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;
4
+ declare const Spinner: Styled<"svg">;
5
5
  //#endregion
6
6
  export { Spinner };
@@ -1,6 +1,7 @@
1
- import { ComponentPropsWithRef } from "react";
1
+ import { Styled } from "./styled.js";
2
+ import { ComponentPropsWithRef, JSX } from "react";
2
3
  //#region src/stack-parts.d.ts
3
- type RootProps = Omit<ComponentPropsWithRef<'div'>, 'defaultValue'> & {
4
+ type RootProps = Omit<ComponentPropsWithRef<"div">, "defaultValue"> & {
4
5
  defaultValue: string;
5
6
  onValueChange?: (value: string) => void;
6
7
  };
@@ -9,14 +10,14 @@ type RootProps = Omit<ComponentPropsWithRef<'div'>, 'defaultValue'> & {
9
10
  * remaining items keep their relative order. Positions are animated with a FLIP
10
11
  * transition so every item glides to its new place.
11
12
  */
12
- declare const Root: ({ defaultValue, onValueChange, ...props }: RootProps) => import("react").JSX.Element;
13
- type ItemProps = Omit<ComponentPropsWithRef<'div'>, 'ref'> & {
13
+ declare const Root: ({ defaultValue, onValueChange, ...props }: RootProps) => JSX.Element;
14
+ type ItemProps = Omit<ComponentPropsWithRef<"div">, "ref"> & {
14
15
  value: string;
15
16
  };
16
17
  /** Sets `order` and `z-index` inline, so the stack only reorders inside a flex or grid root. */
17
- declare const Item: ({ value, style, ...props }: ItemProps) => import("react").JSX.Element;
18
- declare const Trigger: ({ onClick, ...props }: ComponentPropsWithRef<'button'>) => import("react").JSX.Element;
18
+ declare const Item: ({ value, style, ...props }: ItemProps) => JSX.Element;
19
+ declare const Trigger: Styled<"button">;
19
20
  /** Inert and hidden while its item is not the active one. */
20
- declare const Content: (props: ComponentPropsWithRef<'div'>) => import("react").JSX.Element;
21
+ declare const Content: Styled<"div">;
21
22
  //#endregion
22
23
  export { Content, Item, type ItemProps, Root, type RootProps, Trigger };
@@ -1,8 +1,9 @@
1
1
  "use client";
2
2
  import { useCallback, useLayoutEffect, useRef, useState } from "react";
3
3
  import { jsx } from "react/jsx-runtime";
4
- import { createRequiredContext, prefersReducedMotion } from "@journ/lift";
4
+ import { prefersReducedMotion } from "@journ/lift/prefers-reduced-motion";
5
5
  import { animate } from "animejs";
6
+ import { createRequiredContext } from "@journ/lift/required-context";
6
7
  //#region src/stack-parts.tsx
7
8
  const [StackContext, useStack] = createRequiredContext("Stack.Root");
8
9
  const [ItemContext, useItemValue] = createRequiredContext("Stack.Item");
package/dist/stat.d.ts CHANGED
@@ -1,9 +1,14 @@
1
+ import { Styled } from "./styled.js";
1
2
  //#region src/stat.d.ts
3
+ declare const Root: Styled<"div">;
4
+ declare const Label: Styled<"p">;
5
+ declare const Value: Styled<"p">;
6
+ declare const Hint: Styled<"p">;
2
7
  declare const Stat: {
3
- Root: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>) => import("react").ReactNode;
4
- Label: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>) => import("react").ReactNode;
5
- Value: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>) => import("react").ReactNode;
6
- Hint: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>) => import("react").ReactNode;
8
+ Root: typeof Root;
9
+ Label: typeof Label;
10
+ Value: typeof Value;
11
+ Hint: typeof Hint;
7
12
  };
8
13
  //#endregion
9
14
  export { Stat };
@@ -1,11 +1,12 @@
1
1
  import { IconButtonProps } from "./icon-button.js";
2
+ import { JSX } from "react";
2
3
  //#region src/step-button.d.ts
3
- type StepButtonProps = Omit<IconButtonProps, 'onClick'> & {
4
+ type StepButtonProps = Omit<IconButtonProps, "onClick"> & {
4
5
  /** Runs after the caller's own `onClick`. */
5
6
  onStep: () => void;
6
- onClick?: IconButtonProps['onClick'];
7
+ onClick?: IconButtonProps["onClick"];
7
8
  };
8
9
  /** The icon button behind every previous, next, minus and plus control. */
9
- declare const StepButton: ({ onStep, onClick, ...props }: StepButtonProps) => import("react").JSX.Element;
10
+ declare const StepButton: ({ onStep, onClick, ...props }: StepButtonProps) => JSX.Element;
10
11
  //#endregion
11
12
  export { StepButton, type StepButtonProps };
@@ -1,19 +1,24 @@
1
- import { ComponentPropsWithRef } from "react";
1
+ import { Styled } from "./styled.js";
2
+ import { ComponentPropsWithRef, JSX } from "react";
2
3
  //#region src/stepper-parts.d.ts
3
- type StepStatus = 'complete' | 'current' | 'upcoming';
4
- declare const useStepperItem: any;
5
- type RootProps = ComponentPropsWithRef<'ol'> & {
4
+ type StepStatus = "complete" | "current" | "upcoming";
5
+ type ItemContextValue = {
6
+ step: number;
7
+ status: StepStatus;
8
+ };
9
+ declare const useStepperItem: () => ItemContextValue;
10
+ type RootProps = ComponentPropsWithRef<"ol"> & {
6
11
  /** The step the user is on, starting at 1. */
7
12
  value: number;
8
13
  };
9
- declare const Root: ({ value, ...props }: RootProps) => import("react").JSX.Element;
10
- type ItemProps = ComponentPropsWithRef<'li'> & {
14
+ declare const Root: ({ value, ...props }: RootProps) => JSX.Element;
15
+ type ItemProps = ComponentPropsWithRef<"li"> & {
11
16
  step: number;
12
17
  };
13
- declare const Item: ({ step, ...props }: ItemProps) => import("react").JSX.Element;
18
+ declare const Item: ({ step, ...props }: ItemProps) => JSX.Element;
14
19
  /** Shows the step number unless children are given. */
15
- declare const Indicator: ({ children, ...props }: ComponentPropsWithRef<'span'>) => import("react").JSX.Element;
16
- declare const Label: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>) => import("react").ReactNode;
17
- declare const Description: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>) => import("react").ReactNode;
20
+ declare const Indicator: Styled<"span">;
21
+ declare const Label: Styled<"span">;
22
+ declare const Description: Styled<"span">;
18
23
  //#endregion
19
24
  export { Description, Indicator, Item, Label, Root, type StepStatus, useStepperItem };
@@ -1,10 +1,11 @@
1
1
  "use client";
2
2
  import { part } from "./lib/part.js";
3
3
  import { jsx } from "react/jsx-runtime";
4
- import { createRequiredContext } from "@journ/lift";
4
+ import { createRequiredContext } from "@journ/lift/required-context";
5
5
  //#region src/stepper-parts.tsx
6
6
  const [StepperContext, useStepper] = createRequiredContext("Stepper.Root");
7
- const [ItemContext, useStepperItem] = createRequiredContext("Stepper.Item");
7
+ const [ItemContext, useStepperItemContext] = createRequiredContext("Stepper.Item");
8
+ const useStepperItem = useStepperItemContext;
8
9
  const Root = ({ value, ...props }) => /* @__PURE__ */ jsx(StepperContext, {
9
10
  value: { value },
10
11
  children: /* @__PURE__ */ jsx("ol", {
package/dist/stepper.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- import { Indicator, Item, Root } from "./stepper-parts.js";
1
+ import { Description, Indicator, Item, Label, Root } from "./stepper-parts.js";
2
2
  //#region src/stepper.d.ts
3
3
  declare const Stepper: {
4
4
  Root: typeof Root;
5
5
  Item: typeof Item;
6
6
  Indicator: typeof Indicator;
7
- Label: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>) => import("react").ReactNode;
8
- Description: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>) => import("react").ReactNode;
7
+ Label: typeof Label;
8
+ Description: typeof Description;
9
9
  };
10
10
  //#endregion
11
11
  export { Stepper };
@@ -0,0 +1,5 @@
1
+ import { ComponentPropsWithRef, ElementType, JSX } from "react";
2
+ //#region src/styled.d.ts
3
+ type Styled<T extends ElementType> = (props: ComponentPropsWithRef<T>) => JSX.Element;
4
+ //#endregion
5
+ export type { Styled };
package/dist/styled.js ADDED
File without changes
@@ -1,6 +1,7 @@
1
+ import { Styled } from "./styled.js";
1
2
  import * as RadixSwitch from "@radix-ui/react-switch";
2
3
  //#region src/switch-parts.d.ts
3
- declare const Root: (props: RadixSwitch.SwitchProps & import("react").RefAttributes<HTMLButtonElement>) => import("react").ReactNode;
4
- declare const Thumb: (props: RadixSwitch.SwitchThumbProps & import("react").RefAttributes<HTMLSpanElement>) => import("react").ReactNode;
4
+ declare const Root: Styled<typeof RadixSwitch.Root>;
5
+ declare const Thumb: Styled<typeof RadixSwitch.Thumb>;
5
6
  //#endregion
6
7
  export { Root, Thumb };
package/dist/switch.d.ts CHANGED
@@ -1,7 +1,8 @@
1
+ import { Root, Thumb } from "./switch-parts.js";
1
2
  //#region src/switch.d.ts
2
3
  declare const Switch: {
3
- Root: (props: import("@radix-ui/react-switch").SwitchProps & import("react").RefAttributes<HTMLButtonElement>) => import("react").ReactNode;
4
- Thumb: (props: import("@radix-ui/react-switch").SwitchThumbProps & import("react").RefAttributes<HTMLSpanElement>) => import("react").ReactNode;
4
+ Root: typeof Root;
5
+ Thumb: typeof Thumb;
5
6
  };
6
7
  //#endregion
7
8
  export { Switch };
package/dist/table.d.ts CHANGED
@@ -1,12 +1,20 @@
1
+ import { Styled } from "./styled.js";
1
2
  //#region src/table.d.ts
3
+ declare const Root: Styled<"table">;
4
+ declare const Caption: Styled<"caption">;
5
+ declare const Head: Styled<"thead">;
6
+ declare const Body: Styled<"tbody">;
7
+ declare const Row: Styled<"tr">;
8
+ declare const Header: Styled<"th">;
9
+ declare const Cell: Styled<"td">;
2
10
  declare const Table: {
3
- Root: (props: import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>) => import("react").ReactNode;
4
- Caption: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>) => import("react").ReactNode;
5
- Head: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>) => import("react").ReactNode;
6
- Body: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>) => import("react").ReactNode;
7
- Row: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>) => import("react").ReactNode;
8
- Header: (props: import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>) => import("react").ReactNode;
9
- Cell: (props: import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>) => import("react").ReactNode;
11
+ Root: typeof Root;
12
+ Caption: typeof Caption;
13
+ Head: typeof Head;
14
+ Body: typeof Body;
15
+ Row: typeof Row;
16
+ Header: typeof Header;
17
+ Cell: typeof Cell;
10
18
  };
11
19
  //#endregion
12
20
  export { Table };