@journ/bloom 0.3.1 → 0.3.2

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 (58) hide show
  1. package/DESIGN.md +81 -80
  2. package/dist/avatar-parts.d.ts +2 -1
  3. package/dist/avatar-parts.js +6 -1
  4. package/dist/avatar.d.ts +2 -1
  5. package/dist/avatar.js +3 -2
  6. package/dist/breadcrumbs.d.ts +4 -0
  7. package/dist/breadcrumbs.js +15 -1
  8. package/dist/button.d.ts +7 -6
  9. package/dist/button.js +22 -13
  10. package/dist/card.d.ts +7 -2
  11. package/dist/card.js +2 -2
  12. package/dist/carousel-parts.d.ts +5 -2
  13. package/dist/carousel-parts.js +10 -1
  14. package/dist/carousel.d.ts +3 -1
  15. package/dist/carousel.js +4 -2
  16. package/dist/character-count-parts.d.ts +14 -0
  17. package/dist/character-count-parts.js +23 -0
  18. package/dist/character-count.d.ts +12 -0
  19. package/dist/character-count.js +12 -0
  20. package/dist/dropdown-menu-parts.d.ts +5 -1
  21. package/dist/dropdown-menu-parts.js +15 -1
  22. package/dist/dropdown-menu.d.ts +4 -1
  23. package/dist/dropdown-menu.js +5 -2
  24. package/dist/field-parts.d.ts +8 -1
  25. package/dist/field-parts.js +19 -1
  26. package/dist/field.d.ts +3 -1
  27. package/dist/field.js +4 -2
  28. package/dist/icon-button.d.ts +1 -1
  29. package/dist/icon-button.js +2 -1
  30. package/dist/lib/icon-tile.d.ts +3 -2
  31. package/dist/lib/icon-tile.js +6 -1
  32. package/dist/lib/text-styles.d.ts +3 -1
  33. package/dist/lib/text-styles.js +3 -1
  34. package/dist/lib/theme.d.ts +5 -1
  35. package/dist/lib/theme.js +5 -1
  36. package/dist/message.d.ts +6 -0
  37. package/dist/message.js +19 -1
  38. package/dist/nav-bar.js +2 -2
  39. package/dist/quantity-input-parts.d.ts +7 -3
  40. package/dist/quantity-input-parts.js +21 -4
  41. package/dist/quantity-input.d.ts +2 -1
  42. package/dist/quantity-input.js +3 -2
  43. package/dist/radio-parts.d.ts +7 -1
  44. package/dist/radio-parts.js +25 -2
  45. package/dist/radio.d.ts +3 -1
  46. package/dist/radio.js +4 -2
  47. package/dist/sidebar.d.ts +4 -0
  48. package/dist/sidebar.js +17 -0
  49. package/dist/stepper-parts.d.ts +4 -1
  50. package/dist/stepper-parts.js +17 -1
  51. package/dist/stepper.d.ts +4 -1
  52. package/dist/stepper.js +5 -2
  53. package/dist/styles.css +1 -1
  54. package/dist/toggle-group-parts.d.ts +3 -1
  55. package/dist/toggle-group-parts.js +12 -2
  56. package/dist/toggle-group.d.ts +3 -1
  57. package/dist/toggle-group.js +4 -2
  58. package/package.json +2 -2
@@ -1,5 +1,6 @@
1
1
  import { MenuPart } from "./lib/menu-parts.js";
2
2
  import * as Nude from "@journ/nude/dropdown-menu-parts";
3
+ import { Styled } from "@journ/nude/styled";
3
4
  //#region src/dropdown-menu-parts.d.ts
4
5
  declare const Root: typeof Nude.Root;
5
6
  declare const Trigger: typeof Nude.Trigger;
@@ -8,5 +9,8 @@ declare const Content: MenuPart<typeof Nude.Content>;
8
9
  declare const Item: MenuPart<typeof Nude.Item>;
9
10
  declare const Label: MenuPart<typeof Nude.Label>;
10
11
  declare const Separator: MenuPart<typeof Nude.Separator>;
12
+ declare const RadioGroup: typeof Nude.RadioGroup;
13
+ declare const RadioItem: Styled<typeof Nude.RadioItem>;
14
+ declare const ItemIndicator: Styled<typeof Nude.ItemIndicator>;
11
15
  //#endregion
12
- export { Content, Group, Item, Label, Root, Separator, Trigger };
16
+ export { Content, Group, Item, ItemIndicator, Label, RadioGroup, RadioItem, Root, Separator, Trigger };
@@ -1,5 +1,9 @@
1
1
  "use client";
2
+ import { cn } from "./lib/cn.js";
3
+ import { floatingItem } from "./lib/overlay.js";
2
4
  import { styleMenuParts } from "./lib/menu-parts.js";
5
+ import { Check } from "lucide-react";
6
+ import { jsx } from "react/jsx-runtime";
3
7
  import * as Nude from "@journ/nude/dropdown-menu-parts";
4
8
  //#region src/dropdown-menu-parts.tsx
5
9
  const Root = Nude.Root;
@@ -10,5 +14,15 @@ const Content = menu.Content;
10
14
  const Item = menu.Item;
11
15
  const Label = menu.Label;
12
16
  const Separator = menu.Separator;
17
+ const RadioGroup = Nude.RadioGroup;
18
+ const RadioItem = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.RadioItem, {
19
+ ...props,
20
+ className: cn(floatingItem, className)
21
+ });
22
+ const ItemIndicator = ({ className, children, ...props }) => /* @__PURE__ */ jsx(Nude.ItemIndicator, {
23
+ ...props,
24
+ className: cn("ml-auto grid place-items-center [&>svg]:size-4", className),
25
+ children: children ?? /* @__PURE__ */ jsx(Check, {})
26
+ });
13
27
  //#endregion
14
- export { Content, Group, Item, Label, Root, Separator, Trigger };
28
+ export { Content, Group, Item, ItemIndicator, Label, RadioGroup, RadioItem, Root, Separator, Trigger };
@@ -1,4 +1,4 @@
1
- import { Content, Group, Item, Label, Root, Separator, Trigger } from "./dropdown-menu-parts.js";
1
+ import { Content, Group, Item, ItemIndicator, Label, RadioGroup, RadioItem, Root, Separator, Trigger } from "./dropdown-menu-parts.js";
2
2
  //#region src/dropdown-menu.d.ts
3
3
  declare const DropdownMenu: {
4
4
  Root: typeof Root;
@@ -8,6 +8,9 @@ declare const DropdownMenu: {
8
8
  Label: typeof Label;
9
9
  Item: typeof Item;
10
10
  Separator: typeof Separator;
11
+ RadioGroup: typeof RadioGroup;
12
+ RadioItem: typeof RadioItem;
13
+ ItemIndicator: typeof ItemIndicator;
11
14
  };
12
15
  //#endregion
13
16
  export { DropdownMenu };
@@ -1,4 +1,4 @@
1
- import { Content, Group, Item, Label, Root, Separator, Trigger } from "./dropdown-menu-parts.js";
1
+ import { Content, Group, Item, ItemIndicator, Label, RadioGroup, RadioItem, Root, Separator, Trigger } from "./dropdown-menu-parts.js";
2
2
  //#region src/dropdown-menu.tsx
3
3
  const DropdownMenu = {
4
4
  Root,
@@ -7,7 +7,10 @@ const DropdownMenu = {
7
7
  Group,
8
8
  Label,
9
9
  Item,
10
- Separator
10
+ Separator,
11
+ RadioGroup,
12
+ RadioItem,
13
+ ItemIndicator
11
14
  };
12
15
  //#endregion
13
16
  export { DropdownMenu };
@@ -1,10 +1,17 @@
1
+ import { SurfaceTone } from "./lib/tones.js";
2
+ import { ComponentPropsWithRef, JSX } from "react";
1
3
  import * as Nude from "@journ/nude/field-parts";
2
4
  import { Styled } from "@journ/nude/styled";
3
5
  //#region src/field-parts.d.ts
6
+ type FrameProps = ComponentPropsWithRef<"div"> & {
7
+ tone?: SurfaceTone;
8
+ };
4
9
  declare const Root: Styled<typeof Nude.Root>;
5
10
  declare const Label: Styled<typeof Nude.Label>;
6
11
  declare const Description: Styled<"p">;
7
12
  declare const FieldError: Styled<"p">;
8
13
  declare const Control: typeof Nude.Control;
14
+ declare const Frame: ({ tone, className, ...props }: FrameProps) => JSX.Element;
15
+ declare const Action: Styled<"div">;
9
16
  //#endregion
10
- export { Control, Description, FieldError as Error, Label, Root };
17
+ export { Action, Control, Description, FieldError as Error, type FrameProps as FieldFrameProps, Frame, Label, Root };
@@ -1,9 +1,16 @@
1
1
  "use client";
2
+ import { tv } from "./lib/tv.js";
2
3
  import { cn } from "./lib/cn.js";
3
4
  import { mutedText } from "./lib/text-styles.js";
5
+ import { surfaceTones } from "./lib/tones.js";
4
6
  import { jsx } from "react/jsx-runtime";
5
7
  import * as Nude from "@journ/nude/field-parts";
6
8
  //#region src/field-parts.tsx
9
+ const fieldFrame = tv({
10
+ base: `has-focus-visible:outline-bloom-sky data-invalid:border-bloom-coral rounded-bloom grid grid-cols-1 items-center gap-x-2.5 gap-y-0.5 px-4 py-3 has-focus-visible:outline-2 has-focus-visible:outline-offset-2 has-[[data-slot=field-action]]:grid-cols-[1fr_auto] [&_[data-slot=field-label]]:font-mono [&_[data-slot=field-label]]:text-[0.625rem]/[0.875rem] [&_[data-slot=field-label]]:font-normal [&_[data-slot=field-label]]:tracking-wider [&_[data-slot=field-label]]:uppercase [&_[data-slot=field-label]]:opacity-60 [&_:is(input,textarea)]:w-full [&_:is(input,textarea)]:border-0 [&_:is(input,textarea)]:bg-transparent [&_:is(input,textarea)]:p-0 [&_:is(input,textarea)]:text-[0.9375rem]/5 [&_:is(input,textarea)]:outline-none [&_:is(input,textarea)]:focus-visible:outline-none [&_:is(input,textarea)]:aria-invalid:outline-none`,
11
+ variants: { tone: surfaceTones },
12
+ defaultVariants: { tone: "surface" }
13
+ });
7
14
  const Root = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Root, {
8
15
  ...props,
9
16
  className: cn("flex flex-col gap-2", className)
@@ -21,5 +28,16 @@ const FieldError = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Error,
21
28
  className: cn("text-sm/5 font-medium text-bloom-coral", className)
22
29
  });
23
30
  const Control = Nude.Control;
31
+ const Frame = ({ tone, className, ...props }) => /* @__PURE__ */ jsx(Nude.Frame, {
32
+ ...props,
33
+ className: fieldFrame({
34
+ tone,
35
+ class: className
36
+ })
37
+ });
38
+ const Action = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Action, {
39
+ ...props,
40
+ className: cn("col-start-2 row-span-2 row-start-1 flex items-center gap-2 [&>svg]:size-4 [&>svg]:opacity-40", className)
41
+ });
24
42
  //#endregion
25
- export { Control, Description, FieldError as Error, Label, Root };
43
+ export { Action, Control, Description, FieldError as Error, Frame, Label, Root };
package/dist/field.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Control, Description, Error as FieldError, Label, Root } from "./field-parts.js";
1
+ import { Action, Control, Description, Error as FieldError, Frame, Label, Root } from "./field-parts.js";
2
2
  //#region src/field.d.ts
3
3
  declare const Field: {
4
4
  Root: typeof Root;
@@ -6,6 +6,8 @@ declare const Field: {
6
6
  Description: typeof Description;
7
7
  Error: typeof FieldError;
8
8
  Control: typeof Control;
9
+ Frame: typeof Frame;
10
+ Action: typeof Action;
9
11
  };
10
12
  //#endregion
11
13
  export { Field };
package/dist/field.js CHANGED
@@ -1,11 +1,13 @@
1
- import { Control, Description, Error as FieldError, Label, Root } from "./field-parts.js";
1
+ import { Action, Control, Description, Error as FieldError, Frame, Label, Root } from "./field-parts.js";
2
2
  //#region src/field.tsx
3
3
  const Field = {
4
4
  Root,
5
5
  Label,
6
6
  Description,
7
7
  Error: FieldError,
8
- Control
8
+ Control,
9
+ Frame,
10
+ Action
9
11
  };
10
12
  //#endregion
11
13
  export { Field };
@@ -2,7 +2,7 @@ import { Recipe } from "./lib/tv.js";
2
2
  import { ComponentPropsWithRef, JSX } from "react";
3
3
  //#region src/icon-button.d.ts
4
4
  type IconButtonTone = "neutral" | "ink" | "coral" | "ghost" | "outline";
5
- type IconButtonSize = "sm" | "md";
5
+ type IconButtonSize = "sm" | "md" | "lg";
6
6
  type IconButtonVariants = {
7
7
  tone?: IconButtonTone;
8
8
  size?: IconButtonSize;
@@ -17,7 +17,8 @@ const iconButton = tv({
17
17
  },
18
18
  size: {
19
19
  sm: "size-8 [&>svg]:size-4",
20
- md: "size-9 [&>svg]:size-4"
20
+ md: "size-9 [&>svg]:size-4",
21
+ lg: "size-13.5 [&>svg]:size-5"
21
22
  }
22
23
  },
23
24
  defaultVariants: {
@@ -1,9 +1,10 @@
1
1
  import { Recipe } from "./tv.js";
2
2
  //#region src/lib/icon-tile.d.ts
3
3
  /** A bordered square that holds an icon: card icons, empty states, dropzones. */
4
+ type IconTileTone = "outline" | "coral" | "yellow" | "indigo" | "mint" | "sky" | "soft";
4
5
  declare const iconTile: Recipe<{
5
6
  size?: "md" | "lg";
6
- tone?: "outline" | "soft";
7
+ tone?: IconTileTone;
7
8
  }>;
8
9
  //#endregion
9
- export { iconTile };
10
+ export { type IconTileTone, iconTile };
@@ -1,7 +1,7 @@
1
1
  import { tv } from "./tv.js";
2
2
  import { line } from "./theme.js";
3
+ import { labelTones } from "./tones.js";
3
4
  //#region src/lib/icon-tile.ts
4
- /** A bordered square that holds an icon: card icons, empty states, dropzones. */
5
5
  const iconTile = tv({
6
6
  base: "grid shrink-0 place-items-center",
7
7
  variants: {
@@ -11,6 +11,11 @@ const iconTile = tv({
11
11
  },
12
12
  tone: {
13
13
  outline: `border ${line}`,
14
+ coral: labelTones.coral,
15
+ yellow: labelTones.yellow,
16
+ indigo: labelTones.indigo,
17
+ mint: labelTones.mint,
18
+ sky: labelTones.sky,
14
19
  soft: "bg-current/8"
15
20
  }
16
21
  },
@@ -20,6 +20,8 @@ declare const fieldRing = "outline-none focus-visible:outline-2 focus-visible:ou
20
20
  */
21
21
  declare const selectedWhenActive = "data-[state=active]:bg-bloom-canvas dark:data-[state=active]:bg-bloom-canvas-dark";
22
22
  declare const selectedWhenOn = "data-[state=on]:bg-bloom-canvas dark:data-[state=on]:bg-bloom-canvas-dark";
23
+ /** The selected filter chip: the neutral fill, which inverts with the theme. */
24
+ declare const neutralWhenOn = "data-[state=on]:bg-bloom-foreground data-[state=on]:text-bloom-canvas dark:data-[state=on]:bg-bloom-foreground-dark dark:data-[state=on]:text-bloom-canvas-dark";
23
25
  declare const selectedWhenCurrent = "border border-transparent aria-[current=page]:border-bloom-line aria-[current=page]:bg-bloom-foreground/4 dark:aria-[current=page]:border-bloom-line-dark dark:aria-[current=page]:bg-bloom-foreground-dark/4";
24
26
  //#endregion
25
- export { controlSize, displayHeading, displayLabel, displayTitle, fieldRing, fieldText, mutedText, selectedWhenActive, selectedWhenCurrent, selectedWhenOn };
27
+ export { controlSize, displayHeading, displayLabel, displayTitle, fieldRing, fieldText, mutedText, neutralWhenOn, selectedWhenActive, selectedWhenCurrent, selectedWhenOn };
@@ -20,6 +20,8 @@ const fieldRing = "outline-none focus-visible:outline-2 focus-visible:outline-of
20
20
  */
21
21
  const selectedWhenActive = "data-[state=active]:bg-bloom-canvas dark:data-[state=active]:bg-bloom-canvas-dark";
22
22
  const selectedWhenOn = "data-[state=on]:bg-bloom-canvas dark:data-[state=on]:bg-bloom-canvas-dark";
23
+ /** The selected filter chip: the neutral fill, which inverts with the theme. */
24
+ const neutralWhenOn = "data-[state=on]:bg-bloom-foreground data-[state=on]:text-bloom-canvas dark:data-[state=on]:bg-bloom-foreground-dark dark:data-[state=on]:text-bloom-canvas-dark";
23
25
  const selectedWhenCurrent = "border border-transparent aria-[current=page]:border-bloom-line aria-[current=page]:bg-bloom-foreground/4 dark:aria-[current=page]:border-bloom-line-dark dark:aria-[current=page]:bg-bloom-foreground-dark/4";
24
26
  //#endregion
25
- export { controlSize, displayHeading, displayLabel, displayTitle, fieldRing, fieldText, mutedText, selectedWhenActive, selectedWhenCurrent, selectedWhenOn };
27
+ export { controlSize, displayHeading, displayLabel, displayTitle, fieldRing, fieldText, mutedText, neutralWhenOn, selectedWhenActive, selectedWhenCurrent, selectedWhenOn };
@@ -39,5 +39,9 @@ declare const scrim = "bg-bloom-canvas/60 dark:bg-bloom-canvas-dark/80";
39
39
  /** A gradient of the text color that the shimmer animation slides across the letters. */
40
40
  declare const shimmer = "bg-linear-to-r from-bloom-foreground/40 via-bloom-foreground to-bloom-foreground/40 dark:from-bloom-foreground-dark/40 dark:via-bloom-foreground-dark dark:to-bloom-foreground-dark/40";
41
41
  declare const accentText = "text-bloom-accent dark:text-bloom-accent-dark";
42
+ /** A ring in the surface color on every child, so stacked items read as cut out of each other. */
43
+ declare const stackedRing = "[&>*]:ring-2 [&>*]:ring-bloom-surface dark:[&>*]:ring-bloom-surface-dark";
44
+ /** An opaque surface under each stacked child, so a translucent fill does not show its neighbor. */
45
+ declare const stackedFill = "[&>*]:bg-bloom-surface dark:[&>*]:bg-bloom-surface-dark";
42
46
  //#endregion
43
- export { accentText, canvas, canvasFill, control, controlText, dim, faintBorder, foreground, line, mutedFill, neutral, neutralFill, neutralText, raised, scrim, shimmer, surface, surfaceFill, trackFill };
47
+ export { accentText, canvas, canvasFill, control, controlText, dim, faintBorder, foreground, line, mutedFill, neutral, neutralFill, neutralText, raised, scrim, shimmer, stackedFill, stackedRing, surface, surfaceFill, trackFill };
package/dist/lib/theme.js CHANGED
@@ -41,5 +41,9 @@ const scrim = "bg-bloom-canvas/60 dark:bg-bloom-canvas-dark/80";
41
41
  /** A gradient of the text color that the shimmer animation slides across the letters. */
42
42
  const shimmer = "bg-linear-to-r from-bloom-foreground/40 via-bloom-foreground to-bloom-foreground/40 dark:from-bloom-foreground-dark/40 dark:via-bloom-foreground-dark dark:to-bloom-foreground-dark/40";
43
43
  const accentText = "text-bloom-accent dark:text-bloom-accent-dark";
44
+ /** A ring in the surface color on every child, so stacked items read as cut out of each other. */
45
+ const stackedRing = "[&>*]:ring-2 [&>*]:ring-bloom-surface dark:[&>*]:ring-bloom-surface-dark";
46
+ /** An opaque surface under each stacked child, so a translucent fill does not show its neighbor. */
47
+ const stackedFill = "[&>*]:bg-bloom-surface dark:[&>*]:bg-bloom-surface-dark";
44
48
  //#endregion
45
- export { accentText, canvas, canvasFill, control, controlText, dim, faintBorder, foreground, line, mutedFill, neutral, neutralFill, neutralText, raised, scrim, shimmer, surface, surfaceFill, trackFill };
49
+ export { accentText, canvas, canvasFill, control, controlText, dim, faintBorder, foreground, line, mutedFill, neutral, neutralFill, neutralText, raised, scrim, shimmer, stackedFill, stackedRing, surface, surfaceFill, trackFill };
package/dist/message.d.ts CHANGED
@@ -7,10 +7,16 @@ type RootProps = ComponentPropsWithRef<"div"> & {
7
7
  declare const Root: ({ from, className, ...props }: RootProps) => JSX.Element;
8
8
  declare const Bubble: Styled<"div">;
9
9
  declare const Highlight: Styled<"span">;
10
+ declare const Sources: Styled<"div">;
11
+ declare const Suggestions: Styled<"div">;
12
+ declare const Suggestion: Styled<"button">;
10
13
  declare const Message: {
11
14
  Root: typeof Root;
12
15
  Bubble: typeof Bubble;
13
16
  Highlight: typeof Highlight;
17
+ Sources: typeof Sources;
18
+ Suggestions: typeof Suggestions;
19
+ Suggestion: typeof Suggestion;
14
20
  };
15
21
  //#endregion
16
22
  export { Message };
package/dist/message.js CHANGED
@@ -1,5 +1,7 @@
1
1
  import { cn } from "./lib/cn.js";
2
+ import { interactive } from "./lib/interactive.js";
2
3
  import { accentText, dim } from "./lib/theme.js";
4
+ import { TouchTarget } from "./touch-target.js";
3
5
  import { jsx } from "react/jsx-runtime";
4
6
  import { Message as Message$1 } from "@journ/nude/message";
5
7
  //#region src/message.tsx
@@ -16,10 +18,26 @@ const Highlight = ({ className, ...props }) => /* @__PURE__ */ jsx(Message$1.Hig
16
18
  ...props,
17
19
  className: cn(dim, accentText, "px-1 font-mono text-xs", className)
18
20
  });
21
+ const Sources = ({ className, ...props }) => /* @__PURE__ */ jsx(Message$1.Sources, {
22
+ ...props,
23
+ className: cn("mt-2.5 flex flex-col gap-2", className)
24
+ });
25
+ const Suggestions = ({ className, ...props }) => /* @__PURE__ */ jsx(Message$1.Suggestions, {
26
+ ...props,
27
+ className: cn("flex flex-col items-start gap-2", className)
28
+ });
29
+ const Suggestion = ({ className, children, ...props }) => /* @__PURE__ */ jsx(Message$1.Suggestion, {
30
+ ...props,
31
+ className: cn(interactive, "rounded-bloom border border-current/15 px-3 py-1.5 text-left text-sm/5 opacity-75", className),
32
+ children: /* @__PURE__ */ jsx(TouchTarget, { children })
33
+ });
19
34
  const Message = {
20
35
  Root,
21
36
  Bubble,
22
- Highlight
37
+ Highlight,
38
+ Sources,
39
+ Suggestions,
40
+ Suggestion
23
41
  };
24
42
  //#endregion
25
43
  export { Message };
package/dist/nav-bar.js CHANGED
@@ -8,11 +8,11 @@ import { NavBar as NavBar$1 } from "@journ/nude/nav-bar";
8
8
  //#region src/nav-bar.tsx
9
9
  const Root = ({ className, ...props }) => /* @__PURE__ */ jsx(NavBar$1.Root, {
10
10
  ...props,
11
- className: cn(raised, "flex items-center justify-between p-1", className)
11
+ className: cn(raised, "flex items-center gap-1 p-1", className)
12
12
  });
13
13
  const Item = ({ className, children, ...props }) => /* @__PURE__ */ jsx(NavBar$1.Item, {
14
14
  ...props,
15
- className: cn(interactive, foreground, "grid size-10 place-items-center [&>svg]:size-5", selectedWhenCurrent, className),
15
+ className: cn(interactive, foreground, "grid h-10 min-w-10 flex-1 place-items-center [&>svg]:size-5", selectedWhenCurrent, className),
16
16
  children: /* @__PURE__ */ jsx(TouchTarget, { children })
17
17
  });
18
18
  const NavBar = {
@@ -3,10 +3,14 @@ import { JSX } from "react";
3
3
  import * as Nude from "@journ/nude/quantity-input-parts";
4
4
  import { Styled } from "@journ/nude/styled";
5
5
  //#region src/quantity-input-parts.d.ts
6
- type RootProps = Nude.RootProps;
7
- declare const Root: ({ className, ...props }: RootProps) => JSX.Element;
6
+ type QuantityInputSize = "md" | "lg";
7
+ type RootProps = Nude.RootProps & {
8
+ size?: QuantityInputSize;
9
+ };
10
+ declare const Root: ({ size, className, ...props }: RootProps) => JSX.Element;
8
11
  declare const Decrement: ({ tone, size, className, children, ...props }: IconButtonProps) => JSX.Element;
9
12
  declare const Increment: ({ tone, size, className, children, ...props }: IconButtonProps) => JSX.Element;
10
13
  declare const Field: Styled<typeof Nude.Field>;
14
+ declare const Unit: Styled<"span">;
11
15
  //#endregion
12
- export { Decrement, Field, Increment, Root, type RootProps };
16
+ export { Decrement, Field, Increment, type QuantityInputSize, Root, type RootProps, Unit };
@@ -1,4 +1,5 @@
1
1
  "use client";
2
+ import { tv } from "./lib/tv.js";
2
3
  import { cn } from "./lib/cn.js";
3
4
  import { stepButton } from "./step-button.js";
4
5
  import { composerInput, composerRoot } from "./composer.js";
@@ -6,9 +7,21 @@ import { Minus, Plus } from "lucide-react";
6
7
  import { jsx } from "react/jsx-runtime";
7
8
  import * as Nude from "@journ/nude/quantity-input-parts";
8
9
  //#region src/quantity-input-parts.tsx
9
- const Root = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Root, {
10
+ const quantityRoot = tv({
11
+ base: "group/quantity",
12
+ variants: { size: {
13
+ md: composerRoot(),
14
+ lg: "flex items-center gap-3.5 has-disabled:opacity-50"
15
+ } },
16
+ defaultVariants: { size: "md" }
17
+ });
18
+ const Root = ({ size = "md", className, ...props }) => /* @__PURE__ */ jsx(Nude.Root, {
10
19
  ...props,
11
- className: composerRoot(className)
20
+ "data-size": size,
21
+ className: quantityRoot({
22
+ size,
23
+ class: className
24
+ })
12
25
  });
13
26
  const Decrement = ({ tone, size, className, children, ...props }) => /* @__PURE__ */ jsx(Nude.Decrement, {
14
27
  ...props,
@@ -30,7 +43,11 @@ const Increment = ({ tone, size, className, children, ...props }) => /* @__PURE_
30
43
  });
31
44
  const Field = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Field, {
32
45
  ...props,
33
- className: composerInput(cn("text-center font-mono tabular-nums", className))
46
+ className: composerInput(cn("text-center font-mono tabular-nums group-data-[size=lg]/quantity:mx-auto group-data-[size=lg]/quantity:flex-none group-data-[size=lg]/quantity:field-sizing-content group-data-[size=lg]/quantity:p-0 group-data-[size=lg]/quantity:text-[3.5rem]/[0.95] group-data-[size=lg]/quantity:font-medium group-data-[size=lg]/quantity:tracking-tight group-data-[size=lg]/quantity:group-has-data-[slot=quantity-input-unit]/quantity:mr-0", className))
47
+ });
48
+ const Unit = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Unit, {
49
+ ...props,
50
+ className: cn("pr-1 font-mono text-[0.625rem]/[0.875rem] tracking-wider uppercase opacity-60 group-data-[size=lg]/quantity:mr-auto group-data-[size=lg]/quantity:-ml-2 group-data-[size=lg]/quantity:self-end group-data-[size=lg]/quantity:pr-0 group-data-[size=lg]/quantity:pb-1.5", className)
34
51
  });
35
52
  //#endregion
36
- export { Decrement, Field, Increment, Root };
53
+ export { Decrement, Field, Increment, Root, Unit };
@@ -1,10 +1,11 @@
1
- import { Decrement, Field, Increment, Root, RootProps } from "./quantity-input-parts.js";
1
+ import { Decrement, Field, Increment, Root, RootProps, Unit } from "./quantity-input-parts.js";
2
2
  //#region src/quantity-input.d.ts
3
3
  declare const QuantityInput: {
4
4
  Root: typeof Root;
5
5
  Decrement: typeof Decrement;
6
6
  Field: typeof Field;
7
7
  Increment: typeof Increment;
8
+ Unit: typeof Unit;
8
9
  };
9
10
  //#endregion
10
11
  export { QuantityInput, type RootProps as QuantityInputProps };
@@ -1,10 +1,11 @@
1
- import { Decrement, Field, Increment, Root } from "./quantity-input-parts.js";
1
+ import { Decrement, Field, Increment, Root, Unit } from "./quantity-input-parts.js";
2
2
  //#region src/quantity-input.tsx
3
3
  const QuantityInput = {
4
4
  Root,
5
5
  Decrement,
6
6
  Field,
7
- Increment
7
+ Increment,
8
+ Unit
8
9
  };
9
10
  //#endregion
10
11
  export { QuantityInput };
@@ -4,5 +4,11 @@ import { Styled } from "@journ/nude/styled";
4
4
  //#region src/radio-parts.d.ts
5
5
  declare const Group: Styled<typeof Nude.Group>;
6
6
  declare const Item: ({ className, ...props }: Omit<ComponentPropsWithRef<typeof Nude.Item>, "classNames" | "children">) => JSX.Element;
7
+ type RadioCardShape = "row" | "tile";
8
+ type CardProps = {
9
+ shape?: RadioCardShape;
10
+ } & ComponentPropsWithRef<typeof Nude.Card>;
11
+ declare const Card: ({ shape, className, children, ...props }: CardProps) => JSX.Element;
12
+ declare const CardIndicator: ({ className, ...props }: Omit<ComponentPropsWithRef<typeof Nude.CardIndicator>, "forceMount">) => JSX.Element;
7
13
  //#endregion
8
- export { Group, Item };
14
+ export { Card, CardIndicator, type CardProps, Group, Item, type RadioCardShape };
@@ -1,6 +1,8 @@
1
1
  "use client";
2
+ import { tv } from "./lib/tv.js";
2
3
  import { cn } from "./lib/cn.js";
3
- import { pressReset } from "./lib/interactive.js";
4
+ import { interactive, pressReset } from "./lib/interactive.js";
5
+ import { line } from "./lib/theme.js";
4
6
  import { TouchTarget } from "./touch-target.js";
5
7
  import { jsx } from "react/jsx-runtime";
6
8
  import * as Nude from "@journ/nude/radio-parts";
@@ -15,5 +17,26 @@ const Item = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Item, {
15
17
  className: cn(pressReset, "relative grid size-4 shrink-0 cursor-default place-items-center rounded-full border border-current outline-none transition-colors", "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-bloom-sky", "disabled:pointer-events-none disabled:opacity-50", className),
16
18
  children: /* @__PURE__ */ jsx(TouchTarget, {})
17
19
  });
20
+ const radioCard = tv({
21
+ base: `${interactive} ${line} rounded-bloom flex border text-left data-[state=checked]:border-current data-[state=checked]:bg-current/10`,
22
+ variants: { shape: {
23
+ row: "w-full items-center gap-3 px-4 py-3",
24
+ tile: "min-h-18 flex-col items-start justify-between gap-3 p-3 font-mono text-xs uppercase [&>svg]:size-4"
25
+ } },
26
+ defaultVariants: { shape: "row" }
27
+ });
28
+ const Card = ({ shape, className, children, ...props }) => /* @__PURE__ */ jsx(Nude.Card, {
29
+ ...props,
30
+ className: radioCard({
31
+ shape,
32
+ class: className
33
+ }),
34
+ children: /* @__PURE__ */ jsx(TouchTarget, { children })
35
+ });
36
+ const CardIndicator = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.CardIndicator, {
37
+ ...props,
38
+ forceMount: true,
39
+ className: cn("ml-auto grid size-4 shrink-0 place-items-center rounded-full border border-current [&>svg]:size-3", "data-[state=unchecked]:opacity-40 data-[state=unchecked]:[&>svg]:hidden", className)
40
+ });
18
41
  //#endregion
19
- export { Group, Item };
42
+ export { Card, CardIndicator, Group, Item };
package/dist/radio.d.ts CHANGED
@@ -1,8 +1,10 @@
1
- import { Group, Item } from "./radio-parts.js";
1
+ import { Card, CardIndicator, Group, Item } from "./radio-parts.js";
2
2
  //#region src/radio.d.ts
3
3
  declare const Radio: {
4
4
  Group: typeof Group;
5
5
  Item: typeof Item;
6
+ Card: typeof Card;
7
+ CardIndicator: typeof CardIndicator;
6
8
  };
7
9
  //#endregion
8
10
  export { Radio };
package/dist/radio.js CHANGED
@@ -1,8 +1,10 @@
1
- import { Group, Item } from "./radio-parts.js";
1
+ import { Card, CardIndicator, Group, Item } from "./radio-parts.js";
2
2
  //#region src/radio.tsx
3
3
  const Radio = {
4
4
  Group,
5
- Item
5
+ Item,
6
+ Card,
7
+ CardIndicator
6
8
  };
7
9
  //#endregion
8
10
  export { Radio };
package/dist/sidebar.d.ts CHANGED
@@ -3,20 +3,24 @@ import { Styled } from "@journ/nude/styled";
3
3
  declare const Layout: Styled<"div">;
4
4
  declare const Content: Styled<"main">;
5
5
  declare const Root: Styled<"aside">;
6
+ declare const Rail: Styled<"aside">;
6
7
  declare const Header: Styled<"div">;
7
8
  declare const Body: Styled<"nav">;
8
9
  declare const Section: Styled<"div">;
9
10
  declare const Heading: Styled<"h3">;
10
11
  declare const Item: Styled<"a">;
12
+ declare const RailItem: Styled<"a">;
11
13
  declare const Footer: Styled<"div">;
12
14
  declare const Sidebar: {
13
15
  Layout: typeof Layout;
14
16
  Root: typeof Root;
17
+ Rail: typeof Rail;
15
18
  Header: typeof Header;
16
19
  Body: typeof Body;
17
20
  Section: typeof Section;
18
21
  Heading: typeof Heading;
19
22
  Item: typeof Item;
23
+ RailItem: typeof RailItem;
20
24
  Footer: typeof Footer;
21
25
  Content: typeof Content;
22
26
  };
package/dist/sidebar.js CHANGED
@@ -18,6 +18,16 @@ const Root = ({ className, ...props }) => /* @__PURE__ */ jsx(Sidebar$1.Root, {
18
18
  ...props,
19
19
  className: cn(surfaceFill, faintBorder, "sticky top-0 flex h-dvh w-64 shrink-0 flex-col gap-4 border-r p-4", className)
20
20
  });
21
+ const railParts = [
22
+ "[&_[data-slot=sidebar-header]]:justify-center [&_[data-slot=sidebar-header]]:p-0 [&_[data-slot=sidebar-header]]:pb-3.5",
23
+ "[&_[data-slot=sidebar-body]]:items-center [&_[data-slot=sidebar-body]]:gap-2.5",
24
+ "[&_[data-slot=sidebar-section]]:items-center [&_[data-slot=sidebar-section]]:gap-2.5",
25
+ "[&_[data-slot=sidebar-footer]]:flex-col [&_[data-slot=sidebar-footer]]:gap-2.5 [&_[data-slot=sidebar-footer]]:border-0 [&_[data-slot=sidebar-footer]]:p-0"
26
+ ].join(" ");
27
+ const Rail = ({ className, ...props }) => /* @__PURE__ */ jsx(Sidebar$1.Root, {
28
+ ...props,
29
+ className: cn(faintBorder, "sticky top-0 flex h-dvh w-16 shrink-0 flex-col items-center gap-2 border-r py-4", railParts, className)
30
+ });
21
31
  const Header = ({ className, ...props }) => /* @__PURE__ */ jsx(Sidebar$1.Header, {
22
32
  ...props,
23
33
  className: cn("flex items-center gap-3 px-2 pt-2", className)
@@ -39,6 +49,11 @@ const Item = ({ className, children, ...props }) => /* @__PURE__ */ jsx(Sidebar$
39
49
  className: cn(interactive, "flex items-center gap-3 px-3 py-2 text-sm/6 font-medium [&>svg]:size-4 [&>svg]:shrink-0", selectedWhenCurrent, className),
40
50
  children: /* @__PURE__ */ jsx(TouchTarget, { children })
41
51
  });
52
+ const RailItem = ({ className, children, ...props }) => /* @__PURE__ */ jsx(Sidebar$1.Item, {
53
+ ...props,
54
+ className: cn(interactive, "grid size-10 shrink-0 place-items-center [&>svg]:size-5 [&>svg]:opacity-55 aria-[current=page]:[&>svg]:opacity-100", selectedWhenCurrent, className),
55
+ children: /* @__PURE__ */ jsx(TouchTarget, { children })
56
+ });
42
57
  const Footer = ({ className, ...props }) => /* @__PURE__ */ jsx(Sidebar$1.Footer, {
43
58
  ...props,
44
59
  className: cn("flex items-center gap-3 border-t border-current/10 px-2 pt-4", className)
@@ -46,11 +61,13 @@ const Footer = ({ className, ...props }) => /* @__PURE__ */ jsx(Sidebar$1.Footer
46
61
  const Sidebar = {
47
62
  Layout,
48
63
  Root,
64
+ Rail,
49
65
  Header,
50
66
  Body,
51
67
  Section,
52
68
  Heading,
53
69
  Item,
70
+ RailItem,
54
71
  Footer,
55
72
  Content
56
73
  };
@@ -6,5 +6,8 @@ declare const Item: Styled<typeof Nude.Item>;
6
6
  declare const Indicator: Styled<"span">;
7
7
  declare const Label: Styled<"span">;
8
8
  declare const Description: Styled<"span">;
9
+ declare const Pills: Styled<typeof Nude.Root>;
10
+ declare const PillItem: Styled<typeof Nude.Item>;
11
+ declare const Pill: Styled<"span">;
9
12
  //#endregion
10
- export { Description, Indicator, Item, Label, Root };
13
+ export { Description, Indicator, Item, Label, Pill, PillItem, Pills, Root };
@@ -29,5 +29,21 @@ const Description = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Descri
29
29
  ...props,
30
30
  className: cn("block", mutedText, className)
31
31
  });
32
+ const Pills = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Root, {
33
+ ...props,
34
+ className: cn("flex gap-1.5", className)
35
+ });
36
+ const PillItem = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Item, {
37
+ ...props,
38
+ className: cn("group flex min-w-0 flex-1 flex-col items-center gap-1.5", "[&_[data-slot=stepper-label]]:font-mono [&_[data-slot=stepper-label]]:text-[0.625rem]/[0.875rem] [&_[data-slot=stepper-label]]:font-normal [&_[data-slot=stepper-label]]:tracking-wider [&_[data-slot=stepper-label]]:uppercase [&_[data-slot=stepper-label]]:opacity-50 data-[status=current]:[&_[data-slot=stepper-label]]:opacity-100", className)
39
+ });
40
+ const Pill = ({ className, children, ...props }) => {
41
+ const { status } = Nude.useStepperItem();
42
+ return /* @__PURE__ */ jsx(Nude.Indicator, {
43
+ ...props,
44
+ className: cn("grid h-10 w-full place-items-center bg-current/5 font-mono text-[0.625rem]/[0.875rem] tracking-wider tabular-nums [&>svg]:size-4", "group-data-[status=upcoming]:text-current/30", "group-data-[status=current]:bg-transparent group-data-[status=current]:ring-1 group-data-[status=current]:ring-current", "group-data-[status=complete]:bg-bloom-mint group-data-[status=complete]:text-bloom-ink", className),
45
+ children: status === "complete" ? children ?? /* @__PURE__ */ jsx(Check, {}) : children ?? "–"
46
+ });
47
+ };
32
48
  //#endregion
33
- export { Description, Indicator, Item, Label, Root };
49
+ export { Description, Indicator, Item, Label, Pill, PillItem, Pills, Root };
package/dist/stepper.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Description, Indicator, Item, Label, Root } from "./stepper-parts.js";
1
+ import { Description, Indicator, Item, Label, Pill, PillItem, Pills, Root } from "./stepper-parts.js";
2
2
  //#region src/stepper.d.ts
3
3
  declare const Stepper: {
4
4
  Root: typeof Root;
@@ -6,6 +6,9 @@ declare const Stepper: {
6
6
  Indicator: typeof Indicator;
7
7
  Label: typeof Label;
8
8
  Description: typeof Description;
9
+ Pills: typeof Pills;
10
+ PillItem: typeof PillItem;
11
+ Pill: typeof Pill;
9
12
  };
10
13
  //#endregion
11
14
  export { Stepper };