@journ/bloom 0.1.1 → 0.1.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 (128) hide show
  1. package/dist/accordion-parts.d.ts +5 -5
  2. package/dist/accordion.d.ts +2 -2
  3. package/dist/alert-dialog-parts.d.ts +13 -11
  4. package/dist/alert-dialog.d.ts +5 -5
  5. package/dist/alert.d.ts +12 -37
  6. package/dist/animated-size.d.ts +3 -2
  7. package/dist/avatar-parts.d.ts +5 -4
  8. package/dist/badge.d.ts +7 -35
  9. package/dist/breadcrumbs.d.ts +7 -7
  10. package/dist/bulk-bar.d.ts +4 -4
  11. package/dist/button.d.ts +11 -36
  12. package/dist/calendar-parts.d.ts +18 -12
  13. package/dist/calendar-parts.js +5 -1
  14. package/dist/calendar.d.ts +3 -3
  15. package/dist/card.d.ts +13 -38
  16. package/dist/carousel-parts.d.ts +8 -7
  17. package/dist/carousel-parts.js +1 -1
  18. package/dist/checkbox-parts.d.ts +3 -3
  19. package/dist/chip.d.ts +11 -30
  20. package/dist/collapsible-parts.d.ts +4 -4
  21. package/dist/collapsible.d.ts +3 -3
  22. package/dist/combobox-parts.d.ts +17 -16
  23. package/dist/combobox-parts.js +7 -2
  24. package/dist/combobox.d.ts +5 -10
  25. package/dist/command-palette-parts.d.ts +4 -3
  26. package/dist/command-palette-parts.js +2 -1
  27. package/dist/command-palette.d.ts +3 -3
  28. package/dist/composer.d.ts +3 -3
  29. package/dist/context-menu-parts.d.ts +9 -12
  30. package/dist/context-menu-parts.js +5 -1
  31. package/dist/context-menu.d.ts +8 -15
  32. package/dist/currency-input-parts.d.ts +3 -3
  33. package/dist/currency-input.d.ts +2 -2
  34. package/dist/data-table-parts.d.ts +12 -5
  35. package/dist/data-table-parts.js +7 -1
  36. package/dist/data-table.d.ts +5 -5
  37. package/dist/date-input-parts.d.ts +3 -3
  38. package/dist/date-input.d.ts +2 -2
  39. package/dist/date-picker-parts.d.ts +9 -7
  40. package/dist/date-picker-parts.js +7 -2
  41. package/dist/date-picker.d.ts +6 -11
  42. package/dist/date-range-picker-parts.d.ts +9 -7
  43. package/dist/date-range-picker-parts.js +7 -2
  44. package/dist/date-range-picker.d.ts +6 -11
  45. package/dist/description-list.d.ts +4 -4
  46. package/dist/dialog-parts.d.ts +12 -10
  47. package/dist/dialog.d.ts +4 -4
  48. package/dist/divider.d.ts +2 -2
  49. package/dist/drawer-parts.d.ts +9 -8
  50. package/dist/drawer.d.ts +4 -4
  51. package/dist/dropdown-menu-parts.d.ts +9 -12
  52. package/dist/dropdown-menu-parts.js +5 -1
  53. package/dist/dropdown-menu.d.ts +8 -15
  54. package/dist/empty-state.d.ts +6 -6
  55. package/dist/field-parts.d.ts +6 -6
  56. package/dist/field.d.ts +2 -2
  57. package/dist/file-dropzone-parts.d.ts +8 -6
  58. package/dist/file-dropzone-parts.js +2 -1
  59. package/dist/heading.d.ts +5 -26
  60. package/dist/hover-card-parts.d.ts +4 -4
  61. package/dist/hover-card.d.ts +3 -3
  62. package/dist/icon-button.d.ts +11 -41
  63. package/dist/icon.d.ts +6 -26
  64. package/dist/index.d.ts +1 -1
  65. package/dist/input.d.ts +3 -3
  66. package/dist/lib/icon-tile.d.ts +5 -28
  67. package/dist/lib/menu-parts.d.ts +12 -16
  68. package/dist/lib/modal-content.d.ts +2 -2
  69. package/dist/lib/modal-parts.d.ts +3 -3
  70. package/dist/lib/overlay.d.ts +8 -31
  71. package/dist/lib/picker.d.ts +9 -7
  72. package/dist/lib/theme.d.ts +8 -8
  73. package/dist/lib/tones.d.ts +12 -42
  74. package/dist/lib/tv.d.ts +6 -1
  75. package/dist/lib/use-enter.d.ts +8 -11
  76. package/dist/link.d.ts +3 -3
  77. package/dist/markdown.d.ts +3 -2
  78. package/dist/message.d.ts +7 -6
  79. package/dist/month-picker.d.ts +2 -2
  80. package/dist/month-stepper-parts.d.ts +6 -5
  81. package/dist/multiple-selector-parts.d.ts +11 -12
  82. package/dist/multiple-selector-parts.js +5 -2
  83. package/dist/multiple-selector.d.ts +4 -9
  84. package/dist/nav-bar.d.ts +3 -3
  85. package/dist/navigation-menu-parts.d.ts +8 -7
  86. package/dist/navigation-menu.d.ts +2 -2
  87. package/dist/otp-input-parts.d.ts +4 -4
  88. package/dist/otp-input.d.ts +2 -2
  89. package/dist/page-header.d.ts +4 -4
  90. package/dist/page.d.ts +10 -37
  91. package/dist/pagination.d.ts +7 -7
  92. package/dist/pill-select.d.ts +2 -2
  93. package/dist/popover-parts.d.ts +5 -5
  94. package/dist/popover.d.ts +4 -4
  95. package/dist/progress-parts.d.ts +7 -33
  96. package/dist/quantity-input-parts.d.ts +6 -5
  97. package/dist/radio-parts.d.ts +4 -3
  98. package/dist/scroll-area-parts.d.ts +6 -5
  99. package/dist/scroll-area.d.ts +2 -2
  100. package/dist/select-parts.d.ts +10 -9
  101. package/dist/select.d.ts +4 -4
  102. package/dist/sheet-parts.d.ts +5 -26
  103. package/dist/sheet.d.ts +4 -4
  104. package/dist/sidebar.d.ts +10 -10
  105. package/dist/skeleton.d.ts +2 -2
  106. package/dist/slider-parts.d.ts +5 -5
  107. package/dist/spinner.d.ts +2 -2
  108. package/dist/stack-parts.d.ts +10 -35
  109. package/dist/stat.d.ts +5 -5
  110. package/dist/step-button.d.ts +5 -3
  111. package/dist/stepper-parts.d.ts +6 -6
  112. package/dist/switch-parts.d.ts +3 -3
  113. package/dist/table.d.ts +8 -8
  114. package/dist/tabs-parts.d.ts +5 -5
  115. package/dist/tag-input-parts.d.ts +8 -7
  116. package/dist/tag-input-parts.js +1 -1
  117. package/dist/text-morph.d.ts +3 -2
  118. package/dist/text-shimmer.d.ts +3 -3
  119. package/dist/text.d.ts +8 -35
  120. package/dist/textarea.d.ts +2 -2
  121. package/dist/time-range-parts.d.ts +5 -5
  122. package/dist/time-range.d.ts +2 -2
  123. package/dist/toast-parts.d.ts +6 -6
  124. package/dist/toggle-group-parts.d.ts +3 -3
  125. package/dist/tooltip-parts.d.ts +5 -5
  126. package/dist/tooltip.d.ts +4 -4
  127. package/dist/touch-target.d.ts +2 -1
  128. package/package.json +2 -2
package/dist/field.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- import { Description, Error as FieldError, Label, Root } from "./field-parts.js";
1
+ import { Control, Description, Error as FieldError, Label, Root } from "./field-parts.js";
2
2
  //#region src/field.d.ts
3
3
  declare const Field: {
4
4
  Root: typeof Root;
5
5
  Label: typeof Label;
6
6
  Description: typeof Description;
7
7
  Error: typeof FieldError;
8
- Control: any;
8
+ Control: typeof Control;
9
9
  };
10
10
  //#endregion
11
11
  export { Field };
@@ -1,12 +1,14 @@
1
- import { ComponentPropsWithRef } from "react";
1
+ import { JSX } from "react";
2
2
  import * as Nude from "@journ/nude/file-dropzone-parts";
3
3
  import { FileRejection, RejectionReason } from "@journ/nude/file-dropzone-parts";
4
+ import { Styled } from "@journ/nude/styled";
4
5
  //#region src/file-dropzone-parts.d.ts
5
- declare const matchesAccept: any, sortFiles: any;
6
+ declare const matchesAccept: typeof Nude.matchesAccept;
7
+ declare const sortFiles: typeof Nude.sortFiles;
6
8
  /** A drop target that is also a button: click or press Enter to open the file picker. */
7
- declare const Root: ({ className, ...props }: Nude.RootProps) => import("react").JSX.Element;
8
- declare const Icon: ({ className, ...props }: ComponentPropsWithRef<'span'>) => import("react").JSX.Element;
9
- declare const Title: ({ className, ...props }: ComponentPropsWithRef<'p'>) => import("react").JSX.Element;
10
- declare const Description: ({ className, ...props }: ComponentPropsWithRef<'p'>) => import("react").JSX.Element;
9
+ declare const Root: ({ className, ...props }: Nude.RootProps) => JSX.Element;
10
+ declare const Icon: Styled<"span">;
11
+ declare const Title: Styled<"p">;
12
+ declare const Description: Styled<"p">;
11
13
  //#endregion
12
14
  export { Description, type FileRejection, Icon, type RejectionReason, Root, Title, matchesAccept, sortFiles };
@@ -5,7 +5,8 @@ import { iconTile } from "./lib/icon-tile.js";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  import * as Nude from "@journ/nude/file-dropzone-parts";
7
7
  //#region src/file-dropzone-parts.tsx
8
- const { matchesAccept, sortFiles } = Nude;
8
+ const matchesAccept = Nude.matchesAccept;
9
+ const sortFiles = Nude.sortFiles;
9
10
  /** A drop target that is also a button: click or press Enter to open the file picker. */
10
11
  const Root = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Root, {
11
12
  ...props,
package/dist/heading.d.ts CHANGED
@@ -1,31 +1,10 @@
1
- import { VariantProps } from "./lib/tv.js";
2
- import { ComponentPropsWithRef } from "react";
1
+ import { ComponentPropsWithRef, JSX } from "react";
3
2
  //#region src/heading.d.ts
4
- declare const heading: import("tailwind-variants").TVReturnType<{
5
- size: {
6
- sm: "text-lg/7";
7
- md: "text-2xl/8";
8
- lg: "text-3xl/9";
9
- xl: "text-5xl/none";
10
- };
11
- }, undefined, "font-medium tracking-tight", {
12
- size: {
13
- sm: "text-lg/7";
14
- md: "text-2xl/8";
15
- lg: "text-3xl/9";
16
- xl: "text-5xl/none";
17
- };
18
- }, undefined, import("tailwind-variants").TVReturnTypeLike<{
19
- size: {
20
- sm: "text-lg/7";
21
- md: "text-2xl/8";
22
- lg: "text-3xl/9";
23
- xl: "text-5xl/none";
24
- };
25
- }, undefined>>;
26
- type HeadingProps = ComponentPropsWithRef<'h1'> & VariantProps<typeof heading> & {
3
+ type HeadingSize = "sm" | "md" | "lg" | "xl";
4
+ type HeadingProps = ComponentPropsWithRef<"h1"> & {
5
+ size?: HeadingSize;
27
6
  level?: 1 | 2 | 3 | 4 | 5 | 6;
28
7
  };
29
- declare const Heading: ({ level, size, className, ...props }: HeadingProps) => import("react").JSX.Element;
8
+ declare const Heading: ({ level, size, className, ...props }: HeadingProps) => JSX.Element;
30
9
  //#endregion
31
10
  export { Heading, type HeadingProps };
@@ -1,8 +1,8 @@
1
- import { ComponentPropsWithRef } from "react";
2
1
  import * as Nude from "@journ/nude/hover-card-parts";
2
+ import { Styled } from "@journ/nude/styled";
3
3
  //#region src/hover-card-parts.d.ts
4
- declare const Root: any;
5
- declare const Trigger: any;
6
- declare const Content: ({ className, ...props }: ComponentPropsWithRef<typeof Nude.Content>) => import("react").JSX.Element;
4
+ declare const Root: typeof Nude.Root;
5
+ declare const Trigger: typeof Nude.Trigger;
6
+ declare const Content: Styled<typeof Nude.Content>;
7
7
  //#endregion
8
8
  export { Content, Root, Trigger };
@@ -1,8 +1,8 @@
1
- import { Content } from "./hover-card-parts.js";
1
+ import { Content, Root, Trigger } from "./hover-card-parts.js";
2
2
  //#region src/hover-card.d.ts
3
3
  declare const HoverCard: {
4
- Root: any;
5
- Trigger: any;
4
+ Root: typeof Root;
5
+ Trigger: typeof Trigger;
6
6
  Content: typeof Content;
7
7
  };
8
8
  //#endregion
@@ -1,44 +1,14 @@
1
- import { VariantProps } from "./lib/tv.js";
2
- import { ComponentPropsWithRef } from "react";
1
+ import { Recipe } from "./lib/tv.js";
2
+ import { ComponentPropsWithRef, JSX } from "react";
3
3
  //#region src/icon-button.d.ts
4
- declare const iconButton: import("tailwind-variants").TVReturnType<{
5
- tone: {
6
- neutral: "bg-bloom-foreground dark:bg-bloom-foreground-dark text-bloom-canvas dark:text-bloom-canvas-dark";
7
- ink: "bg-bloom-ink text-bloom-paper";
8
- coral: "bg-bloom-coral text-bloom-paper";
9
- ghost: "bg-transparent text-inherit";
10
- outline: "border border-current/15 bg-transparent text-inherit";
11
- };
12
- size: {
13
- sm: "size-8 [&>svg]:size-4";
14
- md: "size-9 [&>svg]:size-4";
15
- };
16
- }, undefined, string[], {
17
- tone: {
18
- neutral: "bg-bloom-foreground dark:bg-bloom-foreground-dark text-bloom-canvas dark:text-bloom-canvas-dark";
19
- ink: "bg-bloom-ink text-bloom-paper";
20
- coral: "bg-bloom-coral text-bloom-paper";
21
- ghost: "bg-transparent text-inherit";
22
- outline: "border border-current/15 bg-transparent text-inherit";
23
- };
24
- size: {
25
- sm: "size-8 [&>svg]:size-4";
26
- md: "size-9 [&>svg]:size-4";
27
- };
28
- }, undefined, import("tailwind-variants").TVReturnTypeLike<{
29
- tone: {
30
- neutral: "bg-bloom-foreground dark:bg-bloom-foreground-dark text-bloom-canvas dark:text-bloom-canvas-dark";
31
- ink: "bg-bloom-ink text-bloom-paper";
32
- coral: "bg-bloom-coral text-bloom-paper";
33
- ghost: "bg-transparent text-inherit";
34
- outline: "border border-current/15 bg-transparent text-inherit";
35
- };
36
- size: {
37
- sm: "size-8 [&>svg]:size-4";
38
- md: "size-9 [&>svg]:size-4";
39
- };
40
- }, undefined>>;
41
- type IconButtonProps = ComponentPropsWithRef<'button'> & VariantProps<typeof iconButton>;
42
- declare const IconButton: ({ tone, size, className, children, type, ...props }: IconButtonProps) => import("react").JSX.Element;
4
+ type IconButtonTone = "neutral" | "ink" | "coral" | "ghost" | "outline";
5
+ type IconButtonSize = "sm" | "md";
6
+ type IconButtonVariants = {
7
+ tone?: IconButtonTone;
8
+ size?: IconButtonSize;
9
+ };
10
+ declare const iconButton: Recipe<IconButtonVariants>;
11
+ type IconButtonProps = ComponentPropsWithRef<"button"> & IconButtonVariants;
12
+ declare const IconButton: ({ tone, size, className, children, type, ...props }: IconButtonProps) => JSX.Element;
43
13
  //#endregion
44
14
  export { IconButton, type IconButtonProps, iconButton };
package/dist/icon.d.ts CHANGED
@@ -1,30 +1,10 @@
1
- import { VariantProps } from "./lib/tv.js";
2
- import { ComponentPropsWithRef } from "react";
1
+ import { ComponentPropsWithRef, JSX } from "react";
3
2
  //#region src/icon.d.ts
4
- declare const icon: import("tailwind-variants").TVReturnType<{
5
- size: {
6
- sm: "[&>svg]:size-4";
7
- md: "[&>svg]:size-5";
8
- lg: "[&>svg]:size-6";
9
- xl: "[&>svg]:size-8";
10
- };
11
- }, undefined, "inline-flex shrink-0 items-center justify-center", {
12
- size: {
13
- sm: "[&>svg]:size-4";
14
- md: "[&>svg]:size-5";
15
- lg: "[&>svg]:size-6";
16
- xl: "[&>svg]:size-8";
17
- };
18
- }, undefined, import("tailwind-variants").TVReturnTypeLike<{
19
- size: {
20
- sm: "[&>svg]:size-4";
21
- md: "[&>svg]:size-5";
22
- lg: "[&>svg]:size-6";
23
- xl: "[&>svg]:size-8";
24
- };
25
- }, undefined>>;
26
- type IconProps = ComponentPropsWithRef<'span'> & VariantProps<typeof icon>;
3
+ type IconSize = "sm" | "md" | "lg" | "xl";
4
+ type IconProps = ComponentPropsWithRef<"span"> & {
5
+ size?: IconSize;
6
+ };
27
7
  /** Sizes any svg child and hides it from assistive tech unless a label is given. */
28
- declare const Icon: ({ size, className, 'aria-label': label, ...props }: IconProps) => import("react").JSX.Element;
8
+ declare const Icon: ({ size, className, "aria-label": label, ...props }: IconProps) => JSX.Element;
29
9
  //#endregion
30
10
  export { Icon, type IconProps };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Accordion } from "./accordion.js";
2
- import { VariantProps, tv } from "./lib/tv.js";
3
2
  import { AlertDialog } from "./alert-dialog.js";
4
3
  import { Alert } from "./alert.js";
5
4
  import { AnimatedSize, AnimatedSizeProps } from "./animated-size.js";
@@ -7,6 +6,7 @@ import { Avatar } from "./avatar.js";
7
6
  import { Badge } from "./badge.js";
8
7
  import { Breadcrumbs } from "./breadcrumbs.js";
9
8
  import { BulkBar } from "./bulk-bar.js";
9
+ import { VariantProps, tv } from "./lib/tv.js";
10
10
  import { Button, ButtonProps } from "./button.js";
11
11
  import { IconButton, IconButtonProps } from "./icon-button.js";
12
12
  import { CalendarActions, CalendarContextValue, CalendarMeta, CalendarState, CalendarView, RootProps, Weekday, useCalendar } from "./calendar-parts.js";
package/dist/input.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { ComponentPropsWithRef } from "react";
1
+ import { Styled } from "@journ/nude/styled";
2
2
  //#region src/input.d.ts
3
- declare const field = "block w-full rounded-bloom px-3 border border-bloom-line dark:border-bloom-line-dark bg-transparent text-bloom-foreground dark:text-bloom-foreground-dark py-2.5 text-base/6 sm:py-1.5 sm:text-sm/6 placeholder:text-current/40 scheme-light dark:scheme-dark outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-bloom-sky aria-invalid:border-bloom-coral disabled:opacity-50";
3
+ declare const field: string;
4
4
  declare const input: (className?: string) => string;
5
- declare const Input: ({ className, ...props }: ComponentPropsWithRef<'input'>) => import("react").JSX.Element;
5
+ declare const Input: Styled<"input">;
6
6
  //#endregion
7
7
  export { Input, field, input };
@@ -1,32 +1,9 @@
1
+ import { Recipe } from "./tv.js";
1
2
  //#region src/lib/icon-tile.d.ts
2
3
  /** A bordered square that holds an icon: card icons, empty states, dropzones. */
3
- declare const iconTile: import("tailwind-variants").TVReturnType<{
4
- size: {
5
- md: "size-10 [&>svg]:size-5";
6
- lg: "size-12 [&>svg]:size-6";
7
- };
8
- tone: {
9
- outline: "border border-bloom-line dark:border-bloom-line-dark";
10
- soft: "bg-current/8";
11
- };
12
- }, undefined, "grid shrink-0 place-items-center", {
13
- size: {
14
- md: "size-10 [&>svg]:size-5";
15
- lg: "size-12 [&>svg]:size-6";
16
- };
17
- tone: {
18
- outline: "border border-bloom-line dark:border-bloom-line-dark";
19
- soft: "bg-current/8";
20
- };
21
- }, undefined, import("tailwind-variants").TVReturnTypeLike<{
22
- size: {
23
- md: "size-10 [&>svg]:size-5";
24
- lg: "size-12 [&>svg]:size-6";
25
- };
26
- tone: {
27
- outline: "border border-bloom-line dark:border-bloom-line-dark";
28
- soft: "bg-current/8";
29
- };
30
- }, undefined>>;
4
+ declare const iconTile: Recipe<{
5
+ size?: "md" | "lg";
6
+ tone?: "outline" | "soft";
7
+ }>;
31
8
  //#endregion
32
9
  export { iconTile };
@@ -1,4 +1,4 @@
1
- import { ComponentPropsWithRef, ElementType } from "react";
1
+ import { ComponentPropsWithRef, ElementType, JSX } from "react";
2
2
  //#region src/lib/menu-parts.d.ts
3
3
  type MenuParts = {
4
4
  Content: ElementType;
@@ -6,20 +6,16 @@ type MenuParts = {
6
6
  Label: ElementType;
7
7
  Separator: ElementType;
8
8
  };
9
- /** Styled Content, Item, Label and Separator over the nude parts of any menu (dropdown menu, context menu). */
10
- declare const styleMenuParts: <P extends MenuParts>(parts: P) => {
11
- Content: ({ className, ...props }: ComponentPropsWithRef<P['Content']> & {
12
- className?: string;
13
- }) => import("react").JSX.Element;
14
- Item: ({ className, ...props }: ComponentPropsWithRef<P['Item']> & {
15
- className?: string;
16
- }) => import("react").JSX.Element;
17
- Label: ({ className, ...props }: ComponentPropsWithRef<P['Label']> & {
18
- className?: string;
19
- }) => import("react").JSX.Element;
20
- Separator: ({ className, ...props }: ComponentPropsWithRef<P['Separator']> & {
21
- className?: string;
22
- }) => import("react").JSX.Element;
9
+ type MenuPart<T extends ElementType> = (props: ComponentPropsWithRef<T> & {
10
+ className?: string;
11
+ }) => JSX.Element;
12
+ type StyledMenuParts<P extends MenuParts> = {
13
+ Content: MenuPart<P["Content"]>;
14
+ Item: MenuPart<P["Item"]>;
15
+ Label: MenuPart<P["Label"]>;
16
+ Separator: MenuPart<P["Separator"]>;
23
17
  };
18
+ /** Styled Content, Item, Label and Separator over the nude parts of any menu (dropdown menu, context menu). */
19
+ declare const styleMenuParts: <P extends MenuParts>(parts: P) => StyledMenuParts<P>;
24
20
  //#endregion
25
- export { styleMenuParts };
21
+ export { type MenuPart, styleMenuParts };
@@ -1,10 +1,10 @@
1
1
  import { animate } from "animejs";
2
- import { ComponentPropsWithRef, ElementType } from "react";
2
+ import { ComponentPropsWithRef, ElementType, JSX } from "react";
3
3
  //#region src/lib/modal-content.d.ts
4
4
  /** Styles a nude modal content: a dimmed, fading overlay and a panel that animates in with `enter`. */
5
5
  declare const ModalContent: <C extends ElementType>({ content: Content, enter, ...props }: ComponentPropsWithRef<C> & {
6
6
  content: C;
7
7
  enter: Parameters<typeof animate>[1];
8
- }) => import("react").JSX.Element;
8
+ }) => JSX.Element;
9
9
  //#endregion
10
10
  export { ModalContent };
@@ -1,7 +1,7 @@
1
- import { ComponentPropsWithRef } from "react";
1
+ import { Styled } from "@journ/nude/styled";
2
2
  //#region src/lib/modal-parts.d.ts
3
3
  /** Shared by Dialog, AlertDialog and Drawer. */
4
- declare const Body: ({ className, ...props }: ComponentPropsWithRef<'div'>) => import("react").JSX.Element;
5
- declare const Actions: ({ className, ...props }: ComponentPropsWithRef<'div'>) => import("react").JSX.Element;
4
+ declare const Body: Styled<"div">;
5
+ declare const Actions: Styled<"div">;
6
6
  //#endregion
7
7
  export { Actions, Body };
@@ -1,41 +1,18 @@
1
+ import { SurfaceTone } from "./tones.js";
2
+ import { Recipe } from "./tv.js";
1
3
  //#region src/lib/overlay.d.ts
2
4
  /** Surface and item styles shared by floating menus (select, dropdown menu, popover, hover card). */
3
- declare const floatingSurface = "bg-bloom-surface dark:bg-bloom-surface-dark font-bloom-display text-bloom-foreground dark:text-bloom-foreground-dark border border-bloom-line dark:border-bloom-line-dark z-50 min-w-40 p-1 shadow-md outline-none";
5
+ declare const floatingSurface: string;
4
6
  /** A floating surface that holds free-form content (popover, hover card). */
5
- declare const floatingCard = "bg-bloom-surface dark:bg-bloom-surface-dark font-bloom-display text-bloom-foreground dark:text-bloom-foreground-dark border border-bloom-line dark:border-bloom-line-dark z-50 min-w-40 p-1 shadow-md outline-none flex w-72 flex-col gap-2 p-4";
7
+ declare const floatingCard: string;
6
8
  declare const floatingItem: string;
7
9
  declare const floatingLabel = "px-2 py-1.5 text-sm font-medium";
8
10
  declare const floatingSeparator = "-mx-1 my-1 h-px bg-current/10";
9
11
  /** Backdrop behind dialogs, alert dialogs, sheets and drawers. */
10
- declare const modalOverlay = "fixed inset-0 bg-bloom-canvas/60 dark:bg-bloom-canvas-dark/80";
12
+ declare const modalOverlay: string;
11
13
  /** Centered panel shared by Dialog and AlertDialog. */
12
- declare const centeredPanel: import("tailwind-variants").TVReturnType<{
13
- tone: {
14
- readonly surface: "bg-bloom-surface dark:bg-bloom-surface-dark font-bloom-display text-bloom-foreground dark:text-bloom-foreground-dark border border-bloom-line dark:border-bloom-line-dark";
15
- readonly coral: string;
16
- readonly yellow: string;
17
- readonly indigo: string;
18
- readonly mint: string;
19
- readonly sky: string;
20
- };
21
- }, undefined, "rounded-bloom fixed top-1/2 left-1/2 flex w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 flex-col gap-4 p-6 outline-none", {
22
- tone: {
23
- readonly surface: "bg-bloom-surface dark:bg-bloom-surface-dark font-bloom-display text-bloom-foreground dark:text-bloom-foreground-dark border border-bloom-line dark:border-bloom-line-dark";
24
- readonly coral: string;
25
- readonly yellow: string;
26
- readonly indigo: string;
27
- readonly mint: string;
28
- readonly sky: string;
29
- };
30
- }, undefined, import("tailwind-variants").TVReturnTypeLike<{
31
- tone: {
32
- readonly surface: "bg-bloom-surface dark:bg-bloom-surface-dark font-bloom-display text-bloom-foreground dark:text-bloom-foreground-dark border border-bloom-line dark:border-bloom-line-dark";
33
- readonly coral: string;
34
- readonly yellow: string;
35
- readonly indigo: string;
36
- readonly mint: string;
37
- readonly sky: string;
38
- };
39
- }, undefined>>;
14
+ declare const centeredPanel: Recipe<{
15
+ tone?: SurfaceTone;
16
+ }>;
40
17
  //#endregion
41
18
  export { centeredPanel, floatingCard, floatingItem, floatingLabel, floatingSeparator, floatingSurface, modalOverlay };
@@ -1,18 +1,20 @@
1
1
  import { ButtonProps } from "../button.js";
2
- import { ComponentPropsWithRef, ComponentType } from "react";
2
+ import { ComponentPropsWithRef, ComponentType, JSX } from "react";
3
3
  //#region src/lib/picker.d.ts
4
- type TriggerProps = ComponentPropsWithRef<'button'> & {
5
- tone?: ButtonProps['tone'];
4
+ type TriggerProps = ComponentPropsWithRef<"button"> & {
5
+ tone?: ButtonProps["tone"];
6
6
  };
7
+ type PickerTrigger = (props: TriggerProps) => JSX.Element;
8
+ type PickerValue<V> = (props: V) => JSX.Element;
7
9
  /** Styles a nude picker's trigger as a field button and its value as truncating text. */
8
10
  declare const stylePicker: <V extends {
9
11
  className?: string;
10
12
  }>(parts: {
11
- Trigger: ComponentType<ComponentPropsWithRef<'button'>>;
13
+ Trigger: ComponentType<ComponentPropsWithRef<"button">>;
12
14
  Value: ComponentType<V>;
13
15
  }) => {
14
- Trigger: ({ tone, className, children, ...props }: TriggerProps) => import("react").JSX.Element;
15
- Value: ({ className, ...props }: V) => import("react").JSX.Element;
16
+ Trigger: PickerTrigger;
17
+ Value: PickerValue<V>;
16
18
  };
17
19
  //#endregion
18
- export { stylePicker };
20
+ export { type PickerTrigger, type PickerValue, stylePicker };
@@ -8,16 +8,16 @@
8
8
  /** Readable text on the canvas and on surfaces. */
9
9
  declare const foreground = "text-bloom-foreground dark:text-bloom-foreground-dark";
10
10
  /** The page background with its text and native control scheme. */
11
- declare const canvas = "bg-bloom-canvas scheme-light dark:bg-bloom-canvas-dark dark:scheme-dark font-bloom-display text-bloom-foreground dark:text-bloom-foreground-dark";
11
+ declare const canvas: string;
12
12
  /** A raised block's fill and text, no edge. */
13
- declare const surfaceFill = "bg-bloom-surface dark:bg-bloom-surface-dark font-bloom-display text-bloom-foreground dark:text-bloom-foreground-dark";
13
+ declare const surfaceFill: string;
14
14
  /** The color of every hairline: card edges, field outlines, dividers. */
15
15
  declare const line = "border-bloom-line dark:border-bloom-line-dark";
16
16
  /** Cards and panels: the canvas color by default, set apart by a hairline edge only. */
17
- declare const surface = "bg-bloom-surface dark:bg-bloom-surface-dark font-bloom-display text-bloom-foreground dark:text-bloom-foreground-dark border border-bloom-line dark:border-bloom-line-dark";
17
+ declare const surface: string;
18
18
  /** Floating blocks: menus, toasts, the nav bar. Same edge as a card; the shadow is added where they float. */
19
- declare const raised = "bg-bloom-surface dark:bg-bloom-surface-dark font-bloom-display text-bloom-foreground dark:text-bloom-foreground-dark border border-bloom-line dark:border-bloom-line-dark";
20
- declare const faintBorder = "border-bloom-line dark:border-bloom-line-dark";
19
+ declare const raised: string;
20
+ declare const faintBorder: string;
21
21
  /** The canvas color as a fill, for marks that sit on a solid: the switch thumb. */
22
22
  declare const canvasFill = "bg-bloom-canvas dark:bg-bloom-canvas-dark";
23
23
  /** A dim layer over a surface: bubbles, hover states, selected items. */
@@ -29,11 +29,11 @@ declare const mutedFill = "bg-bloom-foreground/30 dark:bg-bloom-foreground-dark/
29
29
  /** A solid fill that inverts with the theme, for primary buttons and thumbs. */
30
30
  declare const neutralFill = "bg-bloom-foreground dark:bg-bloom-foreground-dark";
31
31
  declare const neutralText = "text-bloom-canvas dark:text-bloom-canvas-dark";
32
- declare const neutral = "bg-bloom-foreground dark:bg-bloom-foreground-dark text-bloom-canvas dark:text-bloom-canvas-dark";
32
+ declare const neutral: string;
33
33
  /** Text on a form control that opens something. */
34
- declare const controlText = "text-bloom-foreground dark:text-bloom-foreground-dark";
34
+ declare const controlText: string;
35
35
  /** Text fields, selects and pickers: no fill, a hairline outline. */
36
- declare const control = "border border-bloom-line dark:border-bloom-line-dark bg-transparent text-bloom-foreground dark:text-bloom-foreground-dark";
36
+ declare const control: string;
37
37
  /** The backdrop behind modals: the canvas, mostly opaque. */
38
38
  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. */
@@ -1,52 +1,22 @@
1
1
  //#region src/lib/tones.d.ts
2
+ type Fill = "neutral" | "coral" | "yellow" | "indigo" | "mint" | "sky";
3
+ type SolidTone = Fill;
4
+ type LabelTone = Fill;
5
+ type PageTint = "coral" | "yellow" | "indigo" | "mint" | "sky";
6
+ type SurfaceTone = "surface" | "coral" | "yellow" | "indigo" | "mint" | "sky";
2
7
  /** Fill colors, the single source for every tone map in the package. */
3
- declare const fills: {
4
- /** Inverts with the theme: a dark fill in light mode, a light fill in dark mode. */
5
- readonly neutral: "bg-bloom-foreground dark:bg-bloom-foreground-dark";
6
- readonly coral: 'bg-bloom-coral';
7
- readonly yellow: 'bg-bloom-yellow';
8
- readonly indigo: 'bg-bloom-indigo';
9
- readonly mint: 'bg-bloom-mint';
10
- readonly sky: 'bg-bloom-sky';
11
- };
8
+ declare const fills: Record<Fill, string>;
12
9
  /** Fill plus readable text, for buttons. */
13
- declare const solidTones: {
14
- readonly neutral: "bg-bloom-foreground dark:bg-bloom-foreground-dark text-bloom-canvas dark:text-bloom-canvas-dark";
15
- readonly coral: "bg-bloom-coral text-bloom-paper";
16
- readonly yellow: "bg-bloom-yellow text-bloom-ink";
17
- readonly indigo: "bg-bloom-indigo text-bloom-paper";
18
- readonly mint: "bg-bloom-mint text-bloom-ink";
19
- readonly sky: "bg-bloom-sky text-bloom-ink";
20
- };
10
+ declare const solidTones: Record<SolidTone, string>;
21
11
  /** Status labels: a faint wash of the color, with the color as text in dark and plain text in light. */
22
- declare const labelTones: {
23
- readonly neutral: "bg-bloom-foreground/8 dark:bg-bloom-foreground-dark/10 text-bloom-foreground dark:text-bloom-foreground-dark";
24
- readonly coral: 'bg-bloom-coral/15 text-bloom-foreground dark:text-bloom-coral';
25
- readonly yellow: 'bg-bloom-yellow/25 text-bloom-foreground dark:bg-bloom-yellow/15 dark:text-bloom-yellow';
26
- readonly indigo: 'bg-bloom-indigo/15 text-bloom-foreground dark:text-bloom-indigo';
27
- readonly mint: 'bg-bloom-mint/20 text-bloom-foreground dark:bg-bloom-mint/15 dark:text-bloom-mint';
28
- readonly sky: 'bg-bloom-sky/15 text-bloom-foreground dark:text-bloom-sky';
29
- };
12
+ declare const labelTones: Record<LabelTone, string>;
30
13
  /** The dark canvas color with light text, in both themes. */
31
14
  declare const inkTone = "bg-bloom-ink text-bloom-paper";
32
15
  /** The page background and its readable text. Follows the theme. */
33
- declare const canvasTone = "bg-bloom-canvas scheme-light dark:bg-bloom-canvas-dark dark:scheme-dark font-bloom-display text-bloom-foreground dark:text-bloom-foreground-dark";
16
+ declare const canvasTone: string;
34
17
  /** A page washed with a color: the wash is a flat gradient, so the canvas stays opaque under it. */
35
- declare const pageTints: {
36
- readonly coral: "bg-bloom-canvas scheme-light dark:bg-bloom-canvas-dark dark:scheme-dark font-bloom-display text-bloom-foreground dark:text-bloom-foreground-dark bg-linear-to-b from-bloom-coral/10 to-bloom-coral/10";
37
- readonly yellow: "bg-bloom-canvas scheme-light dark:bg-bloom-canvas-dark dark:scheme-dark font-bloom-display text-bloom-foreground dark:text-bloom-foreground-dark bg-linear-to-b from-bloom-yellow/10 to-bloom-yellow/10";
38
- readonly indigo: "bg-bloom-canvas scheme-light dark:bg-bloom-canvas-dark dark:scheme-dark font-bloom-display text-bloom-foreground dark:text-bloom-foreground-dark bg-linear-to-b from-bloom-indigo/10 to-bloom-indigo/10";
39
- readonly mint: "bg-bloom-canvas scheme-light dark:bg-bloom-canvas-dark dark:scheme-dark font-bloom-display text-bloom-foreground dark:text-bloom-foreground-dark bg-linear-to-b from-bloom-mint/10 to-bloom-mint/10";
40
- readonly sky: "bg-bloom-canvas scheme-light dark:bg-bloom-canvas-dark dark:scheme-dark font-bloom-display text-bloom-foreground dark:text-bloom-foreground-dark bg-linear-to-b from-bloom-sky/10 to-bloom-sky/10";
41
- };
18
+ declare const pageTints: Record<PageTint, string>;
42
19
  /** Surface tones shared by every block that paints its own background. */
43
- declare const surfaceTones: {
44
- readonly surface: "bg-bloom-surface dark:bg-bloom-surface-dark font-bloom-display text-bloom-foreground dark:text-bloom-foreground-dark border border-bloom-line dark:border-bloom-line-dark";
45
- readonly coral: string;
46
- readonly yellow: string;
47
- readonly indigo: string;
48
- readonly mint: string;
49
- readonly sky: string;
50
- };
20
+ declare const surfaceTones: Record<SurfaceTone, string>;
51
21
  //#endregion
52
- export { canvasTone, fills, inkTone, labelTones, pageTints, solidTones, surfaceTones };
22
+ export { type Fill, type LabelTone, type PageTint, type SolidTone, type SurfaceTone, canvasTone, fills, inkTone, labelTones, pageTints, solidTones, surfaceTones };
package/dist/lib/tv.d.ts CHANGED
@@ -1,2 +1,7 @@
1
1
  import { VariantProps, tv } from "tailwind-variants";
2
- export { type VariantProps, tv };
2
+ //#region src/lib/tv.d.ts
3
+ type Recipe<V> = (props?: V & {
4
+ class?: string | undefined;
5
+ }) => string;
6
+ //#endregion
7
+ export { type Recipe, type VariantProps, tv };
@@ -1,15 +1,12 @@
1
1
  import { animate } from "animejs";
2
+ import { RefObject } from "react";
2
3
  //#region src/lib/use-enter.d.ts
3
- declare const useEnter: <T extends HTMLElement>(keyframes: Parameters<typeof animate>[1]) => import("react").RefObject<T | null>;
4
- declare const usePopEnter: (duration?: number) => import("react").RefObject<HTMLDivElement | null>;
5
- declare const useDropEnter: () => import("react").RefObject<HTMLDivElement | null>;
6
- declare const useOverlayEnter: () => import("react").RefObject<HTMLDivElement | null>;
7
- declare const modalPanelEnter: {
8
- readonly opacity: [0, 1];
9
- readonly scale: [0.97, 1];
10
- readonly duration: 100;
11
- readonly ease: 'outQuad';
12
- };
13
- declare const useExpand: <T extends HTMLElement>() => import("react").RefObject<T | null>;
4
+ type Keyframes = Parameters<typeof animate>[1];
5
+ declare const useEnter: <T extends HTMLElement>(keyframes: Keyframes) => RefObject<T | null>;
6
+ declare const usePopEnter: (duration?: number) => RefObject<HTMLDivElement | null>;
7
+ declare const useDropEnter: () => RefObject<HTMLDivElement | null>;
8
+ declare const useOverlayEnter: () => RefObject<HTMLDivElement | null>;
9
+ declare const modalPanelEnter: Keyframes;
10
+ declare const useExpand: <T extends HTMLElement>() => RefObject<T | null>;
14
11
  //#endregion
15
12
  export { modalPanelEnter, useDropEnter, useEnter, useExpand, useOverlayEnter, usePopEnter };
package/dist/link.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { ComponentPropsWithRef } from "react";
1
+ import { ComponentPropsWithRef, JSX } from "react";
2
2
  //#region src/link.d.ts
3
- type LinkProps = ComponentPropsWithRef<'a'> & {
3
+ type LinkProps = ComponentPropsWithRef<"a"> & {
4
4
  asChild?: boolean;
5
5
  };
6
- declare const Link: ({ asChild, className, ...props }: LinkProps) => import("react").JSX.Element;
6
+ declare const Link: ({ asChild, className, ...props }: LinkProps) => JSX.Element;
7
7
  //#endregion
8
8
  export { Link, type LinkProps };
@@ -1,10 +1,11 @@
1
+ import { JSX } from "react";
1
2
  import { MarkdownComponents, MarkdownProps as MarkdownProps$1 } from "@journ/nude/markdown";
2
3
  //#region src/markdown.d.ts
3
- type MarkdownProps = Omit<MarkdownProps$1, 'components'> & {
4
+ type MarkdownProps = Omit<MarkdownProps$1, "components"> & {
4
5
  /** Override or add elements. Merged over the bloom defaults. */
5
6
  components?: MarkdownComponents;
6
7
  };
7
8
  /** `className` goes to the wrapper, which keeps the element margins from stacking with a parent's gap. */
8
- declare const Markdown: ({ components: overrides, className, ...props }: MarkdownProps) => import("react").JSX.Element;
9
+ declare const Markdown: ({ components: overrides, className, ...props }: MarkdownProps) => JSX.Element;
9
10
  //#endregion
10
11
  export { Markdown, type MarkdownProps };
package/dist/message.d.ts CHANGED
@@ -1,11 +1,12 @@
1
- import { ComponentPropsWithRef } from "react";
1
+ import { ComponentPropsWithRef, JSX } from "react";
2
+ import { Styled } from "@journ/nude/styled";
2
3
  //#region src/message.d.ts
3
- type RootProps = ComponentPropsWithRef<'div'> & {
4
- from?: 'agent' | 'user';
4
+ type RootProps = ComponentPropsWithRef<"div"> & {
5
+ from?: "agent" | "user";
5
6
  };
6
- declare const Root: ({ from, className, ...props }: RootProps) => import("react").JSX.Element;
7
- declare const Bubble: ({ className, ...props }: ComponentPropsWithRef<'div'>) => import("react").JSX.Element;
8
- declare const Highlight: ({ className, ...props }: ComponentPropsWithRef<'span'>) => import("react").JSX.Element;
7
+ declare const Root: ({ from, className, ...props }: RootProps) => JSX.Element;
8
+ declare const Bubble: Styled<"div">;
9
+ declare const Highlight: Styled<"span">;
9
10
  declare const Message: {
10
11
  Root: typeof Root;
11
12
  Bubble: typeof Bubble;
@@ -1,8 +1,8 @@
1
1
  import { Frame, Header, Heading, Months, Next, Previous, Years } from "./calendar-parts.js";
2
- import { RootProps } from "./month-picker-parts.js";
2
+ import { Root, RootProps } from "./month-picker-parts.js";
3
3
  //#region src/month-picker.d.ts
4
4
  declare const MonthPicker: {
5
- Root: any;
5
+ Root: typeof Root;
6
6
  Frame: typeof Frame;
7
7
  Header: typeof Header;
8
8
  Heading: typeof Heading;