@journ/bloom 0.1.1

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 (278) hide show
  1. package/DESIGN.md +287 -0
  2. package/LICENSE +21 -0
  3. package/README.md +59 -0
  4. package/dist/accordion-parts.d.ts +9 -0
  5. package/dist/accordion-parts.js +37 -0
  6. package/dist/accordion.d.ts +10 -0
  7. package/dist/accordion.js +10 -0
  8. package/dist/alert-dialog-parts.d.ts +16 -0
  9. package/dist/alert-dialog-parts.js +33 -0
  10. package/dist/alert-dialog.d.ts +15 -0
  11. package/dist/alert-dialog.js +15 -0
  12. package/dist/alert.d.ts +48 -0
  13. package/dist/alert.js +51 -0
  14. package/dist/animated-size.d.ts +6 -0
  15. package/dist/animated-size.js +12 -0
  16. package/dist/avatar-parts.d.ts +10 -0
  17. package/dist/avatar-parts.js +20 -0
  18. package/dist/avatar.d.ts +9 -0
  19. package/dist/avatar.js +9 -0
  20. package/dist/badge.d.ts +38 -0
  21. package/dist/badge.js +22 -0
  22. package/dist/breadcrumbs.d.ts +18 -0
  23. package/dist/breadcrumbs.js +44 -0
  24. package/dist/bulk-bar.d.ts +13 -0
  25. package/dist/bulk-bar.js +27 -0
  26. package/dist/button.d.ts +40 -0
  27. package/dist/button.js +41 -0
  28. package/dist/calendar-parts.d.ts +17 -0
  29. package/dist/calendar-parts.js +90 -0
  30. package/dist/calendar.d.ts +17 -0
  31. package/dist/calendar.js +17 -0
  32. package/dist/card.d.ts +51 -0
  33. package/dist/card.js +63 -0
  34. package/dist/carousel-parts.d.ts +13 -0
  35. package/dist/carousel-parts.js +53 -0
  36. package/dist/carousel.d.ts +11 -0
  37. package/dist/carousel.js +11 -0
  38. package/dist/checkbox-parts.d.ts +8 -0
  39. package/dist/checkbox-parts.js +21 -0
  40. package/dist/checkbox.d.ts +8 -0
  41. package/dist/checkbox.js +8 -0
  42. package/dist/chip.d.ts +45 -0
  43. package/dist/chip.js +55 -0
  44. package/dist/collapsible-parts.d.ts +8 -0
  45. package/dist/collapsible-parts.js +22 -0
  46. package/dist/collapsible.d.ts +9 -0
  47. package/dist/collapsible.js +9 -0
  48. package/dist/combobox-parts.d.ts +22 -0
  49. package/dist/combobox-parts.js +54 -0
  50. package/dist/combobox.d.ts +26 -0
  51. package/dist/combobox.js +21 -0
  52. package/dist/command-palette-parts.d.ts +13 -0
  53. package/dist/command-palette-parts.js +19 -0
  54. package/dist/command-palette.d.ts +17 -0
  55. package/dist/command-palette.js +17 -0
  56. package/dist/composer.d.ts +12 -0
  57. package/dist/composer.js +21 -0
  58. package/dist/context-menu-parts.d.ts +15 -0
  59. package/dist/context-menu-parts.js +10 -0
  60. package/dist/context-menu.d.ts +20 -0
  61. package/dist/context-menu.js +13 -0
  62. package/dist/currency-input-parts.d.ts +8 -0
  63. package/dist/currency-input-parts.js +13 -0
  64. package/dist/currency-input.d.ts +8 -0
  65. package/dist/currency-input.js +8 -0
  66. package/dist/data-table-parts.d.ts +10 -0
  67. package/dist/data-table-parts.js +65 -0
  68. package/dist/data-table.d.ts +12 -0
  69. package/dist/data-table.js +12 -0
  70. package/dist/date-input-parts.d.ts +7 -0
  71. package/dist/date-input-parts.js +12 -0
  72. package/dist/date-input.d.ts +8 -0
  73. package/dist/date-input.js +8 -0
  74. package/dist/date-picker-parts.d.ts +11 -0
  75. package/dist/date-picker-parts.js +8 -0
  76. package/dist/date-picker.d.ts +20 -0
  77. package/dist/date-picker.js +15 -0
  78. package/dist/date-range-picker-parts.d.ts +11 -0
  79. package/dist/date-range-picker-parts.js +8 -0
  80. package/dist/date-range-picker.d.ts +20 -0
  81. package/dist/date-range-picker.js +15 -0
  82. package/dist/description-list.d.ts +12 -0
  83. package/dist/description-list.js +23 -0
  84. package/dist/dialog-parts.d.ts +15 -0
  85. package/dist/dialog-parts.js +32 -0
  86. package/dist/dialog.d.ts +15 -0
  87. package/dist/dialog.js +15 -0
  88. package/dist/divider.d.ts +6 -0
  89. package/dist/divider.js +12 -0
  90. package/dist/drawer-parts.d.ts +13 -0
  91. package/dist/drawer-parts.js +31 -0
  92. package/dist/drawer.d.ts +15 -0
  93. package/dist/drawer.js +15 -0
  94. package/dist/dropdown-menu-parts.d.ts +15 -0
  95. package/dist/dropdown-menu-parts.js +10 -0
  96. package/dist/dropdown-menu.d.ts +20 -0
  97. package/dist/dropdown-menu.js +13 -0
  98. package/dist/empty-state.d.ts +16 -0
  99. package/dist/empty-state.js +40 -0
  100. package/dist/field-parts.d.ts +10 -0
  101. package/dist/field-parts.js +25 -0
  102. package/dist/field.d.ts +11 -0
  103. package/dist/field.js +11 -0
  104. package/dist/file-dropzone-parts.d.ts +12 -0
  105. package/dist/file-dropzone-parts.js +32 -0
  106. package/dist/file-dropzone.d.ts +10 -0
  107. package/dist/file-dropzone.js +10 -0
  108. package/dist/heading.d.ts +31 -0
  109. package/dist/heading.js +26 -0
  110. package/dist/hover-card-parts.d.ts +8 -0
  111. package/dist/hover-card-parts.js +20 -0
  112. package/dist/hover-card.d.ts +9 -0
  113. package/dist/hover-card.js +9 -0
  114. package/dist/icon-button.d.ts +44 -0
  115. package/dist/icon-button.js +39 -0
  116. package/dist/icon.d.ts +30 -0
  117. package/dist/icon.js +27 -0
  118. package/dist/index.d.ts +96 -0
  119. package/dist/index.js +89 -0
  120. package/dist/input.d.ts +7 -0
  121. package/dist/input.js +14 -0
  122. package/dist/lib/cn.d.ts +6 -0
  123. package/dist/lib/cn.js +7 -0
  124. package/dist/lib/icon-tile.d.ts +32 -0
  125. package/dist/lib/icon-tile.js +23 -0
  126. package/dist/lib/interactive.d.ts +11 -0
  127. package/dist/lib/interactive.js +19 -0
  128. package/dist/lib/menu-parts.d.ts +25 -0
  129. package/dist/lib/menu-parts.js +41 -0
  130. package/dist/lib/modal-content.d.ts +10 -0
  131. package/dist/lib/modal-content.js +17 -0
  132. package/dist/lib/modal-parts.d.ts +7 -0
  133. package/dist/lib/modal-parts.js +15 -0
  134. package/dist/lib/overlay.d.ts +41 -0
  135. package/dist/lib/overlay.js +22 -0
  136. package/dist/lib/picker.d.ts +18 -0
  137. package/dist/lib/picker.js +25 -0
  138. package/dist/lib/text-styles.d.ts +25 -0
  139. package/dist/lib/text-styles.js +25 -0
  140. package/dist/lib/theme.d.ts +43 -0
  141. package/dist/lib/theme.js +45 -0
  142. package/dist/lib/tones.d.ts +52 -0
  143. package/dist/lib/tones.js +55 -0
  144. package/dist/lib/tv.d.ts +2 -0
  145. package/dist/lib/tv.js +2 -0
  146. package/dist/lib/use-enter.d.ts +15 -0
  147. package/dist/lib/use-enter.js +54 -0
  148. package/dist/link.d.ts +8 -0
  149. package/dist/link.js +13 -0
  150. package/dist/markdown.d.ts +10 -0
  151. package/dist/markdown.js +70 -0
  152. package/dist/message.d.ts +15 -0
  153. package/dist/message.js +25 -0
  154. package/dist/month-picker-parts.d.ts +2 -0
  155. package/dist/month-picker-parts.js +3 -0
  156. package/dist/month-picker.d.ts +15 -0
  157. package/dist/month-picker.js +15 -0
  158. package/dist/month-stepper-parts.d.ts +11 -0
  159. package/dist/month-stepper-parts.js +37 -0
  160. package/dist/month-stepper.d.ts +10 -0
  161. package/dist/month-stepper.js +10 -0
  162. package/dist/multiple-selector-parts.d.ts +18 -0
  163. package/dist/multiple-selector-parts.js +28 -0
  164. package/dist/multiple-selector.d.ts +28 -0
  165. package/dist/multiple-selector.js +23 -0
  166. package/dist/nav-bar.d.ts +10 -0
  167. package/dist/nav-bar.js +23 -0
  168. package/dist/navigation-menu-parts.d.ts +12 -0
  169. package/dist/navigation-menu-parts.js +47 -0
  170. package/dist/navigation-menu.d.ts +12 -0
  171. package/dist/navigation-menu.js +12 -0
  172. package/dist/otp-input-parts.d.ts +8 -0
  173. package/dist/otp-input-parts.js +17 -0
  174. package/dist/otp-input.d.ts +9 -0
  175. package/dist/otp-input.js +9 -0
  176. package/dist/page-header.d.ts +12 -0
  177. package/dist/page-header.js +23 -0
  178. package/dist/page.d.ts +45 -0
  179. package/dist/page.js +41 -0
  180. package/dist/pagination.d.ts +18 -0
  181. package/dist/pagination.js +49 -0
  182. package/dist/pill-select.d.ts +5 -0
  183. package/dist/pill-select.js +21 -0
  184. package/dist/popover-parts.d.ts +9 -0
  185. package/dist/popover-parts.js +21 -0
  186. package/dist/popover.d.ts +10 -0
  187. package/dist/popover.js +10 -0
  188. package/dist/portal.d.ts +2 -0
  189. package/dist/portal.js +2 -0
  190. package/dist/progress-parts.d.ts +38 -0
  191. package/dist/progress-parts.js +25 -0
  192. package/dist/progress.d.ts +8 -0
  193. package/dist/progress.js +8 -0
  194. package/dist/quantity-input-parts.d.ts +11 -0
  195. package/dist/quantity-input-parts.js +36 -0
  196. package/dist/quantity-input.d.ts +10 -0
  197. package/dist/quantity-input.js +10 -0
  198. package/dist/radio-parts.d.ts +7 -0
  199. package/dist/radio-parts.js +19 -0
  200. package/dist/radio.d.ts +8 -0
  201. package/dist/radio.js +8 -0
  202. package/dist/scroll-area-parts.d.ts +9 -0
  203. package/dist/scroll-area-parts.js +23 -0
  204. package/dist/scroll-area.d.ts +10 -0
  205. package/dist/scroll-area.js +10 -0
  206. package/dist/select-parts.d.ts +13 -0
  207. package/dist/select-parts.js +46 -0
  208. package/dist/select.d.ts +14 -0
  209. package/dist/select.js +14 -0
  210. package/dist/sheet-parts.d.ts +33 -0
  211. package/dist/sheet-parts.js +41 -0
  212. package/dist/sheet.d.ts +16 -0
  213. package/dist/sheet.js +16 -0
  214. package/dist/sidebar.d.ts +24 -0
  215. package/dist/sidebar.js +58 -0
  216. package/dist/skeleton.d.ts +5 -0
  217. package/dist/skeleton.js +11 -0
  218. package/dist/slider-parts.d.ts +9 -0
  219. package/dist/slider-parts.js +26 -0
  220. package/dist/slider.d.ts +10 -0
  221. package/dist/slider.js +10 -0
  222. package/dist/spinner.d.ts +5 -0
  223. package/dist/spinner.js +10 -0
  224. package/dist/stack-parts.d.ts +39 -0
  225. package/dist/stack-parts.js +35 -0
  226. package/dist/stack.d.ts +10 -0
  227. package/dist/stack.js +10 -0
  228. package/dist/stat.d.ts +14 -0
  229. package/dist/stat.js +29 -0
  230. package/dist/step-button.d.ts +10 -0
  231. package/dist/step-button.js +14 -0
  232. package/dist/stepper-parts.d.ts +10 -0
  233. package/dist/stepper-parts.js +33 -0
  234. package/dist/stepper.d.ts +11 -0
  235. package/dist/stepper.js +11 -0
  236. package/dist/styles.css +2 -0
  237. package/dist/switch-parts.d.ts +7 -0
  238. package/dist/switch-parts.js +19 -0
  239. package/dist/switch.d.ts +8 -0
  240. package/dist/switch.js +8 -0
  241. package/dist/table.d.ts +20 -0
  242. package/dist/table.js +48 -0
  243. package/dist/tabs-parts.d.ts +9 -0
  244. package/dist/tabs-parts.js +25 -0
  245. package/dist/tabs.d.ts +10 -0
  246. package/dist/tabs.js +10 -0
  247. package/dist/tag-input-parts.d.ts +15 -0
  248. package/dist/tag-input-parts.js +24 -0
  249. package/dist/tag-input.d.ts +10 -0
  250. package/dist/tag-input.js +10 -0
  251. package/dist/text-morph.d.ts +6 -0
  252. package/dist/text-morph.js +14 -0
  253. package/dist/text-shimmer.d.ts +9 -0
  254. package/dist/text-shimmer.js +12 -0
  255. package/dist/text.d.ts +38 -0
  256. package/dist/text.js +32 -0
  257. package/dist/textarea.d.ts +5 -0
  258. package/dist/textarea.js +12 -0
  259. package/dist/time-range-parts.d.ts +10 -0
  260. package/dist/time-range-parts.js +22 -0
  261. package/dist/time-range.d.ts +10 -0
  262. package/dist/time-range.js +10 -0
  263. package/dist/toast-parts.d.ts +11 -0
  264. package/dist/toast-parts.js +39 -0
  265. package/dist/toast.d.ts +13 -0
  266. package/dist/toast.js +12 -0
  267. package/dist/toggle-group-parts.d.ts +7 -0
  268. package/dist/toggle-group-parts.js +17 -0
  269. package/dist/toggle-group.d.ts +8 -0
  270. package/dist/toggle-group.js +8 -0
  271. package/dist/tokens.css +64 -0
  272. package/dist/tooltip-parts.d.ts +9 -0
  273. package/dist/tooltip-parts.js +21 -0
  274. package/dist/tooltip.d.ts +10 -0
  275. package/dist/tooltip.js +10 -0
  276. package/dist/touch-target.d.ts +7 -0
  277. package/dist/touch-target.js +10 -0
  278. package/package.json +71 -0
@@ -0,0 +1,19 @@
1
+ //#region src/lib/interactive.ts
2
+ /**
3
+ * Shared affordances for anything pressable: keyboard-only focus ring, a
4
+ * currentColor hover/press overlay that sits between the background and the
5
+ * content, and a dimmed disabled state. Flat: nothing moves on press.
6
+ */
7
+ /** Stops text selection and the iOS tap flash on controls that are pressed, not read. */
8
+ const pressReset = "select-none [-webkit-tap-highlight-color:transparent]";
9
+ const interactive = [
10
+ pressReset,
11
+ "relative isolate cursor-default outline-none",
12
+ "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-bloom-sky",
13
+ "after:absolute after:inset-0 after:-z-10 after:rounded-[inherit] after:transition-colors",
14
+ "hover:after:bg-current/10 active:after:bg-current/15",
15
+ "disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50",
16
+ "forced-colors:outline-[Highlight]"
17
+ ].join(" ");
18
+ //#endregion
19
+ export { interactive, pressReset };
@@ -0,0 +1,25 @@
1
+ import { ComponentPropsWithRef, ElementType } from "react";
2
+ //#region src/lib/menu-parts.d.ts
3
+ type MenuParts = {
4
+ Content: ElementType;
5
+ Item: ElementType;
6
+ Label: ElementType;
7
+ Separator: ElementType;
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;
23
+ };
24
+ //#endregion
25
+ export { styleMenuParts };
@@ -0,0 +1,41 @@
1
+ import { cn } from "./cn.js";
2
+ import { usePopEnter } from "./use-enter.js";
3
+ import { floatingItem, floatingLabel, floatingSeparator, floatingSurface } from "./overlay.js";
4
+ import { jsx } from "react/jsx-runtime";
5
+ //#region src/lib/menu-parts.tsx
6
+ /** Styled Content, Item, Label and Separator over the nude parts of any menu (dropdown menu, context menu). */
7
+ const styleMenuParts = (parts) => {
8
+ const ContentPart = parts.Content;
9
+ const ItemPart = parts.Item;
10
+ const LabelPart = parts.Label;
11
+ const SeparatorPart = parts.Separator;
12
+ const Content = ({ className, ...props }) => {
13
+ const panel = usePopEnter();
14
+ return /* @__PURE__ */ jsx(ContentPart, {
15
+ ref: panel,
16
+ sideOffset: 6,
17
+ ...props,
18
+ className: cn(floatingSurface, className)
19
+ });
20
+ };
21
+ const Item = ({ className, ...props }) => /* @__PURE__ */ jsx(ItemPart, {
22
+ ...props,
23
+ className: cn(floatingItem, className)
24
+ });
25
+ const Label = ({ className, ...props }) => /* @__PURE__ */ jsx(LabelPart, {
26
+ ...props,
27
+ className: cn(floatingLabel, className)
28
+ });
29
+ const Separator = ({ className, ...props }) => /* @__PURE__ */ jsx(SeparatorPart, {
30
+ ...props,
31
+ className: cn(floatingSeparator, className)
32
+ });
33
+ return {
34
+ Content,
35
+ Item,
36
+ Label,
37
+ Separator
38
+ };
39
+ };
40
+ //#endregion
41
+ export { styleMenuParts };
@@ -0,0 +1,10 @@
1
+ import { animate } from "animejs";
2
+ import { ComponentPropsWithRef, ElementType } from "react";
3
+ //#region src/lib/modal-content.d.ts
4
+ /** Styles a nude modal content: a dimmed, fading overlay and a panel that animates in with `enter`. */
5
+ declare const ModalContent: <C extends ElementType>({ content: Content, enter, ...props }: ComponentPropsWithRef<C> & {
6
+ content: C;
7
+ enter: Parameters<typeof animate>[1];
8
+ }) => import("react").JSX.Element;
9
+ //#endregion
10
+ export { ModalContent };
@@ -0,0 +1,17 @@
1
+ import { useEnter, useOverlayEnter } from "./use-enter.js";
2
+ import { modalOverlay } from "./overlay.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ //#region src/lib/modal-content.tsx
5
+ /** Styles a nude modal content: a dimmed, fading overlay and a panel that animates in with `enter`. */
6
+ const ModalContent = ({ content: Content, enter, ...props }) => {
7
+ const overlay = useOverlayEnter();
8
+ const panel = useEnter(enter);
9
+ return /* @__PURE__ */ jsx(Content, {
10
+ ref: panel,
11
+ overlayRef: overlay,
12
+ classNames: { overlay: modalOverlay },
13
+ ...props
14
+ });
15
+ };
16
+ //#endregion
17
+ export { ModalContent };
@@ -0,0 +1,7 @@
1
+ import { ComponentPropsWithRef } from "react";
2
+ //#region src/lib/modal-parts.d.ts
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;
6
+ //#endregion
7
+ export { Actions, Body };
@@ -0,0 +1,15 @@
1
+ import { cn } from "./cn.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { Actions as Actions$1, Body as Body$1 } from "@journ/nude/dialog-parts";
4
+ //#region src/lib/modal-parts.tsx
5
+ /** Shared by Dialog, AlertDialog and Drawer. */
6
+ const Body = ({ className, ...props }) => /* @__PURE__ */ jsx(Body$1, {
7
+ ...props,
8
+ className: cn("scrollbar-bloom flex flex-col gap-3 overflow-y-auto", className)
9
+ });
10
+ const Actions = ({ className, ...props }) => /* @__PURE__ */ jsx(Actions$1, {
11
+ ...props,
12
+ className: cn("flex items-center justify-end gap-2", className)
13
+ });
14
+ //#endregion
15
+ export { Actions, Body };
@@ -0,0 +1,41 @@
1
+ //#region src/lib/overlay.d.ts
2
+ /** 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";
4
+ /** 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";
6
+ declare const floatingItem: string;
7
+ declare const floatingLabel = "px-2 py-1.5 text-sm font-medium";
8
+ declare const floatingSeparator = "-mx-1 my-1 h-px bg-current/10";
9
+ /** 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";
11
+ /** 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>>;
40
+ //#endregion
41
+ export { centeredPanel, floatingCard, floatingItem, floatingLabel, floatingSeparator, floatingSurface, modalOverlay };
@@ -0,0 +1,22 @@
1
+ import { tv } from "./tv.js";
2
+ import { controlSize } from "./text-styles.js";
3
+ import { raised, scrim } from "./theme.js";
4
+ import { surfaceTones } from "./tones.js";
5
+ //#region src/lib/overlay.ts
6
+ /** Surface and item styles shared by floating menus (select, dropdown menu, popover, hover card). */
7
+ const floatingSurface = `${raised} z-50 min-w-40 p-1 shadow-md outline-none`;
8
+ /** A floating surface that holds free-form content (popover, hover card). */
9
+ const floatingCard = `${floatingSurface} flex w-72 flex-col gap-2 p-4`;
10
+ const floatingItem = [`relative flex cursor-default items-center gap-2 px-2 ${controlSize} outline-none select-none`, "data-[highlighted]:bg-bloom-foreground/8 dark:data-[highlighted]:bg-bloom-foreground-dark/8 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0"].join(" ");
11
+ const floatingLabel = "px-2 py-1.5 text-sm font-medium";
12
+ const floatingSeparator = "-mx-1 my-1 h-px bg-current/10";
13
+ /** Backdrop behind dialogs, alert dialogs, sheets and drawers. */
14
+ const modalOverlay = `fixed inset-0 ${scrim}`;
15
+ /** Centered panel shared by Dialog and AlertDialog. */
16
+ const centeredPanel = tv({
17
+ base: "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",
18
+ variants: { tone: surfaceTones },
19
+ defaultVariants: { tone: "surface" }
20
+ });
21
+ //#endregion
22
+ export { centeredPanel, floatingCard, floatingItem, floatingLabel, floatingSeparator, floatingSurface, modalOverlay };
@@ -0,0 +1,18 @@
1
+ import { ButtonProps } from "../button.js";
2
+ import { ComponentPropsWithRef, ComponentType } from "react";
3
+ //#region src/lib/picker.d.ts
4
+ type TriggerProps = ComponentPropsWithRef<'button'> & {
5
+ tone?: ButtonProps['tone'];
6
+ };
7
+ /** Styles a nude picker's trigger as a field button and its value as truncating text. */
8
+ declare const stylePicker: <V extends {
9
+ className?: string;
10
+ }>(parts: {
11
+ Trigger: ComponentType<ComponentPropsWithRef<'button'>>;
12
+ Value: ComponentType<V>;
13
+ }) => {
14
+ Trigger: ({ tone, className, children, ...props }: TriggerProps) => import("react").JSX.Element;
15
+ Value: ({ className, ...props }: V) => import("react").JSX.Element;
16
+ };
17
+ //#endregion
18
+ export { stylePicker };
@@ -0,0 +1,25 @@
1
+ import { cn } from "./cn.js";
2
+ import { button, buttonContent } from "../button.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ //#region src/lib/picker.tsx
5
+ /** Styles a nude picker's trigger as a field button and its value as truncating text. */
6
+ const stylePicker = (parts) => {
7
+ const Trigger = ({ tone = "field", className, children, ...props }) => /* @__PURE__ */ jsx(parts.Trigger, {
8
+ ...props,
9
+ className: button({
10
+ tone,
11
+ class: cn("justify-start", className)
12
+ }),
13
+ children: buttonContent(children)
14
+ });
15
+ const Value = ({ className, ...props }) => /* @__PURE__ */ jsx(parts.Value, {
16
+ ...props,
17
+ className: cn("truncate data-[placeholder=true]:opacity-50", className)
18
+ });
19
+ return {
20
+ Trigger,
21
+ Value
22
+ };
23
+ };
24
+ //#endregion
25
+ export { stylePicker };
@@ -0,0 +1,25 @@
1
+ //#region src/lib/text-styles.d.ts
2
+ /** Heading used by every title in the package. */
3
+ declare const displayTitle = "text-lg/7 font-medium tracking-tight";
4
+ /** Small label: stat names, alert and toast titles. */
5
+ declare const displayLabel = "text-sm/6 font-medium";
6
+ /** Medium heading: accordion triggers, calendar and month headings. */
7
+ declare const displayHeading = "text-base/6 font-medium";
8
+ /** Secondary text: same color at reduced opacity, never a separate gray. */
9
+ declare const mutedText = "text-sm/5 opacity-60";
10
+ /** Touch-first control sizing: 16px on mobile, 14px from `sm` up. */
11
+ declare const controlSize = "py-2.5 text-base/6 sm:py-1.5 sm:text-sm/6";
12
+ /** Colour scheme and placeholder shared by every text field. */
13
+ declare const fieldText = "placeholder:text-current/40 scheme-light dark:scheme-dark";
14
+ /** Focus, invalid and disabled states shared by every text field. */
15
+ declare const fieldRing = "outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-bloom-sky aria-invalid:border-bloom-coral disabled:opacity-50";
16
+ /**
17
+ * The "you are here" fill, one string per state attribute because Tailwind needs full class names.
18
+ * Tabs and toggles sit in a dim track, so the selected one takes the canvas color; nav items sit on
19
+ * the page, so the current one takes the dim wash.
20
+ */
21
+ declare const selectedWhenActive = "data-[state=active]:bg-bloom-canvas dark:data-[state=active]:bg-bloom-canvas-dark";
22
+ declare const selectedWhenOn = "data-[state=on]:bg-bloom-canvas dark:data-[state=on]:bg-bloom-canvas-dark";
23
+ 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
+ //#endregion
25
+ export { controlSize, displayHeading, displayLabel, displayTitle, fieldRing, fieldText, mutedText, selectedWhenActive, selectedWhenCurrent, selectedWhenOn };
@@ -0,0 +1,25 @@
1
+ //#region src/lib/text-styles.ts
2
+ /** Heading used by every title in the package. */
3
+ const displayTitle = "text-lg/7 font-medium tracking-tight";
4
+ /** Small label: stat names, alert and toast titles. */
5
+ const displayLabel = "text-sm/6 font-medium";
6
+ /** Medium heading: accordion triggers, calendar and month headings. */
7
+ const displayHeading = "text-base/6 font-medium";
8
+ /** Secondary text: same color at reduced opacity, never a separate gray. */
9
+ const mutedText = "text-sm/5 opacity-60";
10
+ /** Touch-first control sizing: 16px on mobile, 14px from `sm` up. */
11
+ const controlSize = "py-2.5 text-base/6 sm:py-1.5 sm:text-sm/6";
12
+ /** Colour scheme and placeholder shared by every text field. */
13
+ const fieldText = "placeholder:text-current/40 scheme-light dark:scheme-dark";
14
+ /** Focus, invalid and disabled states shared by every text field. */
15
+ const fieldRing = "outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-bloom-sky aria-invalid:border-bloom-coral disabled:opacity-50";
16
+ /**
17
+ * The "you are here" fill, one string per state attribute because Tailwind needs full class names.
18
+ * Tabs and toggles sit in a dim track, so the selected one takes the canvas color; nav items sit on
19
+ * the page, so the current one takes the dim wash.
20
+ */
21
+ const selectedWhenActive = "data-[state=active]:bg-bloom-canvas dark:data-[state=active]:bg-bloom-canvas-dark";
22
+ const selectedWhenOn = "data-[state=on]:bg-bloom-canvas dark:data-[state=on]:bg-bloom-canvas-dark";
23
+ 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
+ //#endregion
25
+ export { controlSize, displayHeading, displayLabel, displayTitle, fieldRing, fieldText, mutedText, selectedWhenActive, selectedWhenCurrent, selectedWhenOn };
@@ -0,0 +1,43 @@
1
+ //#region src/lib/theme.d.ts
2
+ /**
3
+ * Every light and dark pairing in the package lives here, written with
4
+ * Tailwind's `dark:` variant. Components import these instead of repeating
5
+ * the pairs. Roles: canvas (page), surface (raised blocks), foreground (text),
6
+ * line (borders), accent (text accent on a surface).
7
+ */
8
+ /** Readable text on the canvas and on surfaces. */
9
+ declare const foreground = "text-bloom-foreground dark:text-bloom-foreground-dark";
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";
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";
14
+ /** The color of every hairline: card edges, field outlines, dividers. */
15
+ declare const line = "border-bloom-line dark:border-bloom-line-dark";
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";
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";
21
+ /** The canvas color as a fill, for marks that sit on a solid: the switch thumb. */
22
+ declare const canvasFill = "bg-bloom-canvas dark:bg-bloom-canvas-dark";
23
+ /** A dim layer over a surface: bubbles, hover states, selected items. */
24
+ declare const dim = "bg-bloom-foreground/8 dark:bg-bloom-foreground-dark/8";
25
+ /** The unchecked switch track: a light gray in light, a mid gray in dark. */
26
+ declare const trackFill = "bg-bloom-foreground/12 dark:bg-bloom-foreground-dark/40";
27
+ /** The handle of a drawer and other low-key marks. */
28
+ declare const mutedFill = "bg-bloom-foreground/30 dark:bg-bloom-foreground-dark/30";
29
+ /** A solid fill that inverts with the theme, for primary buttons and thumbs. */
30
+ declare const neutralFill = "bg-bloom-foreground dark:bg-bloom-foreground-dark";
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";
33
+ /** Text on a form control that opens something. */
34
+ declare const controlText = "text-bloom-foreground dark:text-bloom-foreground-dark";
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";
37
+ /** The backdrop behind modals: the canvas, mostly opaque. */
38
+ declare const scrim = "bg-bloom-canvas/60 dark:bg-bloom-canvas-dark/80";
39
+ /** A gradient of the text color that the shimmer animation slides across the letters. */
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
+ declare const accentText = "text-bloom-accent dark:text-bloom-accent-dark";
42
+ //#endregion
43
+ export { accentText, canvas, canvasFill, control, controlText, dim, faintBorder, foreground, line, mutedFill, neutral, neutralFill, neutralText, raised, scrim, shimmer, surface, surfaceFill, trackFill };
@@ -0,0 +1,45 @@
1
+ //#region src/lib/theme.ts
2
+ /**
3
+ * Every light and dark pairing in the package lives here, written with
4
+ * Tailwind's `dark:` variant. Components import these instead of repeating
5
+ * the pairs. Roles: canvas (page), surface (raised blocks), foreground (text),
6
+ * line (borders), accent (text accent on a surface).
7
+ */
8
+ /** Readable text on the canvas and on surfaces. */
9
+ const foreground = "text-bloom-foreground dark:text-bloom-foreground-dark";
10
+ /** The package typeface. Set on every root that paints its own background, portals included. */
11
+ const typeface = "font-bloom-display";
12
+ /** The page background with its text and native control scheme. */
13
+ const canvas = `bg-bloom-canvas scheme-light dark:bg-bloom-canvas-dark dark:scheme-dark ${typeface} ${foreground}`;
14
+ /** A raised block's fill and text, no edge. */
15
+ const surfaceFill = `bg-bloom-surface dark:bg-bloom-surface-dark ${typeface} ${foreground}`;
16
+ /** The color of every hairline: card edges, field outlines, dividers. */
17
+ const line = "border-bloom-line dark:border-bloom-line-dark";
18
+ /** Cards and panels: the canvas color by default, set apart by a hairline edge only. */
19
+ const surface = `${surfaceFill} border ${line}`;
20
+ /** Floating blocks: menus, toasts, the nav bar. Same edge as a card; the shadow is added where they float. */
21
+ const raised = surface;
22
+ const faintBorder = line;
23
+ /** The canvas color as a fill, for marks that sit on a solid: the switch thumb. */
24
+ const canvasFill = "bg-bloom-canvas dark:bg-bloom-canvas-dark";
25
+ /** A dim layer over a surface: bubbles, hover states, selected items. */
26
+ const dim = "bg-bloom-foreground/8 dark:bg-bloom-foreground-dark/8";
27
+ /** The unchecked switch track: a light gray in light, a mid gray in dark. */
28
+ const trackFill = "bg-bloom-foreground/12 dark:bg-bloom-foreground-dark/40";
29
+ /** The handle of a drawer and other low-key marks. */
30
+ const mutedFill = "bg-bloom-foreground/30 dark:bg-bloom-foreground-dark/30";
31
+ /** A solid fill that inverts with the theme, for primary buttons and thumbs. */
32
+ const neutralFill = "bg-bloom-foreground dark:bg-bloom-foreground-dark";
33
+ const neutralText = "text-bloom-canvas dark:text-bloom-canvas-dark";
34
+ const neutral = `${neutralFill} ${neutralText}`;
35
+ /** Text on a form control that opens something. */
36
+ const controlText = foreground;
37
+ /** Text fields, selects and pickers: no fill, a hairline outline. */
38
+ const control = `border ${line} bg-transparent ${controlText}`;
39
+ /** The backdrop behind modals: the canvas, mostly opaque. */
40
+ const scrim = "bg-bloom-canvas/60 dark:bg-bloom-canvas-dark/80";
41
+ /** A gradient of the text color that the shimmer animation slides across the letters. */
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
+ const accentText = "text-bloom-accent dark:text-bloom-accent-dark";
44
+ //#endregion
45
+ export { accentText, canvas, canvasFill, control, controlText, dim, faintBorder, foreground, line, mutedFill, neutral, neutralFill, neutralText, raised, scrim, shimmer, surface, surfaceFill, trackFill };
@@ -0,0 +1,52 @@
1
+ //#region src/lib/tones.d.ts
2
+ /** 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
+ };
12
+ /** 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
+ };
21
+ /** 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
+ };
30
+ /** The dark canvas color with light text, in both themes. */
31
+ declare const inkTone = "bg-bloom-ink text-bloom-paper";
32
+ /** 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";
34
+ /** 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
+ };
42
+ /** 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
+ };
51
+ //#endregion
52
+ export { canvasTone, fills, inkTone, labelTones, pageTints, solidTones, surfaceTones };
@@ -0,0 +1,55 @@
1
+ import { canvas, foreground, neutral, neutralFill, surface, surfaceFill } from "./theme.js";
2
+ //#region src/lib/tones.ts
3
+ /** Fill colors, the single source for every tone map in the package. */
4
+ const fills = {
5
+ /** Inverts with the theme: a dark fill in light mode, a light fill in dark mode. */
6
+ neutral: neutralFill,
7
+ coral: "bg-bloom-coral",
8
+ yellow: "bg-bloom-yellow",
9
+ indigo: "bg-bloom-indigo",
10
+ mint: "bg-bloom-mint",
11
+ sky: "bg-bloom-sky"
12
+ };
13
+ /** Fill plus readable text, for buttons. */
14
+ const solidTones = {
15
+ neutral,
16
+ coral: `${fills.coral} text-bloom-paper`,
17
+ yellow: `${fills.yellow} text-bloom-ink`,
18
+ indigo: `${fills.indigo} text-bloom-paper`,
19
+ mint: `${fills.mint} text-bloom-ink`,
20
+ sky: `${fills.sky} text-bloom-ink`
21
+ };
22
+ /** Status labels: a faint wash of the color, with the color as text in dark and plain text in light. */
23
+ const labelTones = {
24
+ neutral: `bg-bloom-foreground/8 dark:bg-bloom-foreground-dark/10 ${foreground}`,
25
+ coral: "bg-bloom-coral/15 text-bloom-foreground dark:text-bloom-coral",
26
+ yellow: "bg-bloom-yellow/25 text-bloom-foreground dark:bg-bloom-yellow/15 dark:text-bloom-yellow",
27
+ indigo: "bg-bloom-indigo/15 text-bloom-foreground dark:text-bloom-indigo",
28
+ mint: "bg-bloom-mint/20 text-bloom-foreground dark:bg-bloom-mint/15 dark:text-bloom-mint",
29
+ sky: "bg-bloom-sky/15 text-bloom-foreground dark:text-bloom-sky"
30
+ };
31
+ /** The dark canvas color with light text, in both themes. */
32
+ const inkTone = "bg-bloom-ink text-bloom-paper";
33
+ /** The page background and its readable text. Follows the theme. */
34
+ const canvasTone = canvas;
35
+ /** A page washed with a color: the wash is a flat gradient, so the canvas stays opaque under it. */
36
+ const pageTints = {
37
+ coral: `${canvas} bg-linear-to-b from-bloom-coral/10 to-bloom-coral/10`,
38
+ yellow: `${canvas} bg-linear-to-b from-bloom-yellow/10 to-bloom-yellow/10`,
39
+ indigo: `${canvas} bg-linear-to-b from-bloom-indigo/10 to-bloom-indigo/10`,
40
+ mint: `${canvas} bg-linear-to-b from-bloom-mint/10 to-bloom-mint/10`,
41
+ sky: `${canvas} bg-linear-to-b from-bloom-sky/10 to-bloom-sky/10`
42
+ };
43
+ /** The same wash on a surface, with the edge in the color. Opaque, so it also works for modals. */
44
+ const tint = (wash, edge) => `${surfaceFill} border ${edge} bg-linear-to-b ${wash}`;
45
+ /** Surface tones shared by every block that paints its own background. */
46
+ const surfaceTones = {
47
+ surface,
48
+ coral: tint("from-bloom-coral/10 to-bloom-coral/10", "border-bloom-coral/40"),
49
+ yellow: tint("from-bloom-yellow/10 to-bloom-yellow/10", "border-bloom-yellow/40"),
50
+ indigo: tint("from-bloom-indigo/10 to-bloom-indigo/10", "border-bloom-indigo/40"),
51
+ mint: tint("from-bloom-mint/10 to-bloom-mint/10", "border-bloom-mint/40"),
52
+ sky: tint("from-bloom-sky/10 to-bloom-sky/10", "border-bloom-sky/40")
53
+ };
54
+ //#endregion
55
+ export { canvasTone, fills, inkTone, labelTones, pageTints, solidTones, surfaceTones };
@@ -0,0 +1,2 @@
1
+ import { VariantProps, tv } from "tailwind-variants";
2
+ export { type VariantProps, tv };
package/dist/lib/tv.js ADDED
@@ -0,0 +1,2 @@
1
+ import { tv } from "tailwind-variants";
2
+ export { tv };
@@ -0,0 +1,15 @@
1
+ import { animate } from "animejs";
2
+ //#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>;
14
+ //#endregion
15
+ export { modalPanelEnter, useDropEnter, useEnter, useExpand, useOverlayEnter, usePopEnter };
@@ -0,0 +1,54 @@
1
+ import { prefersReducedMotion } from "@journ/lift";
2
+ import { animate } from "animejs";
3
+ import { useLayoutEffect, useRef } from "react";
4
+ //#region src/lib/use-enter.ts
5
+ const useEnter = (keyframes) => {
6
+ const element = useRef(null);
7
+ useLayoutEffect(() => {
8
+ if (!element.current || prefersReducedMotion()) return;
9
+ animate(element.current, keyframes);
10
+ }, []);
11
+ return element;
12
+ };
13
+ const usePopEnter = (duration = 200) => useEnter({
14
+ opacity: [0, 1],
15
+ scale: [.96, 1],
16
+ duration,
17
+ ease: "outQuad"
18
+ });
19
+ const useDropEnter = () => useEnter({
20
+ opacity: [0, 1],
21
+ translateY: [4, 0],
22
+ duration: 180,
23
+ ease: "outQuad"
24
+ });
25
+ const useOverlayEnter = () => useEnter({
26
+ opacity: [0, 1],
27
+ duration: 200,
28
+ ease: "outQuad"
29
+ });
30
+ const modalPanelEnter = {
31
+ opacity: [0, 1],
32
+ scale: [.97, 1],
33
+ duration: 100,
34
+ ease: "outQuad"
35
+ };
36
+ const useExpand = () => {
37
+ const element = useRef(null);
38
+ useLayoutEffect(() => {
39
+ const node = element.current;
40
+ if (!node || prefersReducedMotion()) return;
41
+ animate(node, {
42
+ height: [0, node.scrollHeight],
43
+ opacity: [0, 1],
44
+ duration: 200,
45
+ ease: "outQuad",
46
+ onComplete: () => {
47
+ node.style.height = "";
48
+ }
49
+ });
50
+ }, []);
51
+ return element;
52
+ };
53
+ //#endregion
54
+ export { modalPanelEnter, useDropEnter, useEnter, useExpand, useOverlayEnter, usePopEnter };
package/dist/link.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ import { ComponentPropsWithRef } from "react";
2
+ //#region src/link.d.ts
3
+ type LinkProps = ComponentPropsWithRef<'a'> & {
4
+ asChild?: boolean;
5
+ };
6
+ declare const Link: ({ asChild, className, ...props }: LinkProps) => import("react").JSX.Element;
7
+ //#endregion
8
+ export { Link, type LinkProps };
package/dist/link.js ADDED
@@ -0,0 +1,13 @@
1
+ import { cn } from "./lib/cn.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { Link as Link$1 } from "@journ/nude/link";
4
+ //#region src/link.tsx
5
+ const Link = ({ asChild, className, ...props }) => {
6
+ return /* @__PURE__ */ jsx(Link$1, {
7
+ asChild,
8
+ ...props,
9
+ className: cn("underline decoration-current/40 underline-offset-4 outline-none transition-colors hover:decoration-current", "rounded-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-bloom-sky", className)
10
+ });
11
+ };
12
+ //#endregion
13
+ export { Link };
@@ -0,0 +1,10 @@
1
+ import { MarkdownComponents, MarkdownProps as MarkdownProps$1 } from "@journ/nude/markdown";
2
+ //#region src/markdown.d.ts
3
+ type MarkdownProps = Omit<MarkdownProps$1, 'components'> & {
4
+ /** Override or add elements. Merged over the bloom defaults. */
5
+ components?: MarkdownComponents;
6
+ };
7
+ /** `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
+ //#endregion
10
+ export { Markdown, type MarkdownProps };