@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.
- package/DESIGN.md +287 -0
- package/LICENSE +21 -0
- package/README.md +59 -0
- package/dist/accordion-parts.d.ts +9 -0
- package/dist/accordion-parts.js +37 -0
- package/dist/accordion.d.ts +10 -0
- package/dist/accordion.js +10 -0
- package/dist/alert-dialog-parts.d.ts +16 -0
- package/dist/alert-dialog-parts.js +33 -0
- package/dist/alert-dialog.d.ts +15 -0
- package/dist/alert-dialog.js +15 -0
- package/dist/alert.d.ts +48 -0
- package/dist/alert.js +51 -0
- package/dist/animated-size.d.ts +6 -0
- package/dist/animated-size.js +12 -0
- package/dist/avatar-parts.d.ts +10 -0
- package/dist/avatar-parts.js +20 -0
- package/dist/avatar.d.ts +9 -0
- package/dist/avatar.js +9 -0
- package/dist/badge.d.ts +38 -0
- package/dist/badge.js +22 -0
- package/dist/breadcrumbs.d.ts +18 -0
- package/dist/breadcrumbs.js +44 -0
- package/dist/bulk-bar.d.ts +13 -0
- package/dist/bulk-bar.js +27 -0
- package/dist/button.d.ts +40 -0
- package/dist/button.js +41 -0
- package/dist/calendar-parts.d.ts +17 -0
- package/dist/calendar-parts.js +90 -0
- package/dist/calendar.d.ts +17 -0
- package/dist/calendar.js +17 -0
- package/dist/card.d.ts +51 -0
- package/dist/card.js +63 -0
- package/dist/carousel-parts.d.ts +13 -0
- package/dist/carousel-parts.js +53 -0
- package/dist/carousel.d.ts +11 -0
- package/dist/carousel.js +11 -0
- package/dist/checkbox-parts.d.ts +8 -0
- package/dist/checkbox-parts.js +21 -0
- package/dist/checkbox.d.ts +8 -0
- package/dist/checkbox.js +8 -0
- package/dist/chip.d.ts +45 -0
- package/dist/chip.js +55 -0
- package/dist/collapsible-parts.d.ts +8 -0
- package/dist/collapsible-parts.js +22 -0
- package/dist/collapsible.d.ts +9 -0
- package/dist/collapsible.js +9 -0
- package/dist/combobox-parts.d.ts +22 -0
- package/dist/combobox-parts.js +54 -0
- package/dist/combobox.d.ts +26 -0
- package/dist/combobox.js +21 -0
- package/dist/command-palette-parts.d.ts +13 -0
- package/dist/command-palette-parts.js +19 -0
- package/dist/command-palette.d.ts +17 -0
- package/dist/command-palette.js +17 -0
- package/dist/composer.d.ts +12 -0
- package/dist/composer.js +21 -0
- package/dist/context-menu-parts.d.ts +15 -0
- package/dist/context-menu-parts.js +10 -0
- package/dist/context-menu.d.ts +20 -0
- package/dist/context-menu.js +13 -0
- package/dist/currency-input-parts.d.ts +8 -0
- package/dist/currency-input-parts.js +13 -0
- package/dist/currency-input.d.ts +8 -0
- package/dist/currency-input.js +8 -0
- package/dist/data-table-parts.d.ts +10 -0
- package/dist/data-table-parts.js +65 -0
- package/dist/data-table.d.ts +12 -0
- package/dist/data-table.js +12 -0
- package/dist/date-input-parts.d.ts +7 -0
- package/dist/date-input-parts.js +12 -0
- package/dist/date-input.d.ts +8 -0
- package/dist/date-input.js +8 -0
- package/dist/date-picker-parts.d.ts +11 -0
- package/dist/date-picker-parts.js +8 -0
- package/dist/date-picker.d.ts +20 -0
- package/dist/date-picker.js +15 -0
- package/dist/date-range-picker-parts.d.ts +11 -0
- package/dist/date-range-picker-parts.js +8 -0
- package/dist/date-range-picker.d.ts +20 -0
- package/dist/date-range-picker.js +15 -0
- package/dist/description-list.d.ts +12 -0
- package/dist/description-list.js +23 -0
- package/dist/dialog-parts.d.ts +15 -0
- package/dist/dialog-parts.js +32 -0
- package/dist/dialog.d.ts +15 -0
- package/dist/dialog.js +15 -0
- package/dist/divider.d.ts +6 -0
- package/dist/divider.js +12 -0
- package/dist/drawer-parts.d.ts +13 -0
- package/dist/drawer-parts.js +31 -0
- package/dist/drawer.d.ts +15 -0
- package/dist/drawer.js +15 -0
- package/dist/dropdown-menu-parts.d.ts +15 -0
- package/dist/dropdown-menu-parts.js +10 -0
- package/dist/dropdown-menu.d.ts +20 -0
- package/dist/dropdown-menu.js +13 -0
- package/dist/empty-state.d.ts +16 -0
- package/dist/empty-state.js +40 -0
- package/dist/field-parts.d.ts +10 -0
- package/dist/field-parts.js +25 -0
- package/dist/field.d.ts +11 -0
- package/dist/field.js +11 -0
- package/dist/file-dropzone-parts.d.ts +12 -0
- package/dist/file-dropzone-parts.js +32 -0
- package/dist/file-dropzone.d.ts +10 -0
- package/dist/file-dropzone.js +10 -0
- package/dist/heading.d.ts +31 -0
- package/dist/heading.js +26 -0
- package/dist/hover-card-parts.d.ts +8 -0
- package/dist/hover-card-parts.js +20 -0
- package/dist/hover-card.d.ts +9 -0
- package/dist/hover-card.js +9 -0
- package/dist/icon-button.d.ts +44 -0
- package/dist/icon-button.js +39 -0
- package/dist/icon.d.ts +30 -0
- package/dist/icon.js +27 -0
- package/dist/index.d.ts +96 -0
- package/dist/index.js +89 -0
- package/dist/input.d.ts +7 -0
- package/dist/input.js +14 -0
- package/dist/lib/cn.d.ts +6 -0
- package/dist/lib/cn.js +7 -0
- package/dist/lib/icon-tile.d.ts +32 -0
- package/dist/lib/icon-tile.js +23 -0
- package/dist/lib/interactive.d.ts +11 -0
- package/dist/lib/interactive.js +19 -0
- package/dist/lib/menu-parts.d.ts +25 -0
- package/dist/lib/menu-parts.js +41 -0
- package/dist/lib/modal-content.d.ts +10 -0
- package/dist/lib/modal-content.js +17 -0
- package/dist/lib/modal-parts.d.ts +7 -0
- package/dist/lib/modal-parts.js +15 -0
- package/dist/lib/overlay.d.ts +41 -0
- package/dist/lib/overlay.js +22 -0
- package/dist/lib/picker.d.ts +18 -0
- package/dist/lib/picker.js +25 -0
- package/dist/lib/text-styles.d.ts +25 -0
- package/dist/lib/text-styles.js +25 -0
- package/dist/lib/theme.d.ts +43 -0
- package/dist/lib/theme.js +45 -0
- package/dist/lib/tones.d.ts +52 -0
- package/dist/lib/tones.js +55 -0
- package/dist/lib/tv.d.ts +2 -0
- package/dist/lib/tv.js +2 -0
- package/dist/lib/use-enter.d.ts +15 -0
- package/dist/lib/use-enter.js +54 -0
- package/dist/link.d.ts +8 -0
- package/dist/link.js +13 -0
- package/dist/markdown.d.ts +10 -0
- package/dist/markdown.js +70 -0
- package/dist/message.d.ts +15 -0
- package/dist/message.js +25 -0
- package/dist/month-picker-parts.d.ts +2 -0
- package/dist/month-picker-parts.js +3 -0
- package/dist/month-picker.d.ts +15 -0
- package/dist/month-picker.js +15 -0
- package/dist/month-stepper-parts.d.ts +11 -0
- package/dist/month-stepper-parts.js +37 -0
- package/dist/month-stepper.d.ts +10 -0
- package/dist/month-stepper.js +10 -0
- package/dist/multiple-selector-parts.d.ts +18 -0
- package/dist/multiple-selector-parts.js +28 -0
- package/dist/multiple-selector.d.ts +28 -0
- package/dist/multiple-selector.js +23 -0
- package/dist/nav-bar.d.ts +10 -0
- package/dist/nav-bar.js +23 -0
- package/dist/navigation-menu-parts.d.ts +12 -0
- package/dist/navigation-menu-parts.js +47 -0
- package/dist/navigation-menu.d.ts +12 -0
- package/dist/navigation-menu.js +12 -0
- package/dist/otp-input-parts.d.ts +8 -0
- package/dist/otp-input-parts.js +17 -0
- package/dist/otp-input.d.ts +9 -0
- package/dist/otp-input.js +9 -0
- package/dist/page-header.d.ts +12 -0
- package/dist/page-header.js +23 -0
- package/dist/page.d.ts +45 -0
- package/dist/page.js +41 -0
- package/dist/pagination.d.ts +18 -0
- package/dist/pagination.js +49 -0
- package/dist/pill-select.d.ts +5 -0
- package/dist/pill-select.js +21 -0
- package/dist/popover-parts.d.ts +9 -0
- package/dist/popover-parts.js +21 -0
- package/dist/popover.d.ts +10 -0
- package/dist/popover.js +10 -0
- package/dist/portal.d.ts +2 -0
- package/dist/portal.js +2 -0
- package/dist/progress-parts.d.ts +38 -0
- package/dist/progress-parts.js +25 -0
- package/dist/progress.d.ts +8 -0
- package/dist/progress.js +8 -0
- package/dist/quantity-input-parts.d.ts +11 -0
- package/dist/quantity-input-parts.js +36 -0
- package/dist/quantity-input.d.ts +10 -0
- package/dist/quantity-input.js +10 -0
- package/dist/radio-parts.d.ts +7 -0
- package/dist/radio-parts.js +19 -0
- package/dist/radio.d.ts +8 -0
- package/dist/radio.js +8 -0
- package/dist/scroll-area-parts.d.ts +9 -0
- package/dist/scroll-area-parts.js +23 -0
- package/dist/scroll-area.d.ts +10 -0
- package/dist/scroll-area.js +10 -0
- package/dist/select-parts.d.ts +13 -0
- package/dist/select-parts.js +46 -0
- package/dist/select.d.ts +14 -0
- package/dist/select.js +14 -0
- package/dist/sheet-parts.d.ts +33 -0
- package/dist/sheet-parts.js +41 -0
- package/dist/sheet.d.ts +16 -0
- package/dist/sheet.js +16 -0
- package/dist/sidebar.d.ts +24 -0
- package/dist/sidebar.js +58 -0
- package/dist/skeleton.d.ts +5 -0
- package/dist/skeleton.js +11 -0
- package/dist/slider-parts.d.ts +9 -0
- package/dist/slider-parts.js +26 -0
- package/dist/slider.d.ts +10 -0
- package/dist/slider.js +10 -0
- package/dist/spinner.d.ts +5 -0
- package/dist/spinner.js +10 -0
- package/dist/stack-parts.d.ts +39 -0
- package/dist/stack-parts.js +35 -0
- package/dist/stack.d.ts +10 -0
- package/dist/stack.js +10 -0
- package/dist/stat.d.ts +14 -0
- package/dist/stat.js +29 -0
- package/dist/step-button.d.ts +10 -0
- package/dist/step-button.js +14 -0
- package/dist/stepper-parts.d.ts +10 -0
- package/dist/stepper-parts.js +33 -0
- package/dist/stepper.d.ts +11 -0
- package/dist/stepper.js +11 -0
- package/dist/styles.css +2 -0
- package/dist/switch-parts.d.ts +7 -0
- package/dist/switch-parts.js +19 -0
- package/dist/switch.d.ts +8 -0
- package/dist/switch.js +8 -0
- package/dist/table.d.ts +20 -0
- package/dist/table.js +48 -0
- package/dist/tabs-parts.d.ts +9 -0
- package/dist/tabs-parts.js +25 -0
- package/dist/tabs.d.ts +10 -0
- package/dist/tabs.js +10 -0
- package/dist/tag-input-parts.d.ts +15 -0
- package/dist/tag-input-parts.js +24 -0
- package/dist/tag-input.d.ts +10 -0
- package/dist/tag-input.js +10 -0
- package/dist/text-morph.d.ts +6 -0
- package/dist/text-morph.js +14 -0
- package/dist/text-shimmer.d.ts +9 -0
- package/dist/text-shimmer.js +12 -0
- package/dist/text.d.ts +38 -0
- package/dist/text.js +32 -0
- package/dist/textarea.d.ts +5 -0
- package/dist/textarea.js +12 -0
- package/dist/time-range-parts.d.ts +10 -0
- package/dist/time-range-parts.js +22 -0
- package/dist/time-range.d.ts +10 -0
- package/dist/time-range.js +10 -0
- package/dist/toast-parts.d.ts +11 -0
- package/dist/toast-parts.js +39 -0
- package/dist/toast.d.ts +13 -0
- package/dist/toast.js +12 -0
- package/dist/toggle-group-parts.d.ts +7 -0
- package/dist/toggle-group-parts.js +17 -0
- package/dist/toggle-group.d.ts +8 -0
- package/dist/toggle-group.js +8 -0
- package/dist/tokens.css +64 -0
- package/dist/tooltip-parts.d.ts +9 -0
- package/dist/tooltip-parts.js +21 -0
- package/dist/tooltip.d.ts +10 -0
- package/dist/tooltip.js +10 -0
- package/dist/touch-target.d.ts +7 -0
- package/dist/touch-target.js +10 -0
- package/package.json +71 -0
package/dist/markdown.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { cn } from "./lib/cn.js";
|
|
2
|
+
import { displayTitle } from "./lib/text-styles.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Markdown as Markdown$1 } from "@journ/nude/markdown";
|
|
5
|
+
//#region src/markdown.tsx
|
|
6
|
+
const components = {
|
|
7
|
+
h1: ({ className, ...props }) => /* @__PURE__ */ jsx("h1", {
|
|
8
|
+
...props,
|
|
9
|
+
className: cn(displayTitle, "mt-6 mb-2 text-3xl/9", className)
|
|
10
|
+
}),
|
|
11
|
+
h2: ({ className, ...props }) => /* @__PURE__ */ jsx("h2", {
|
|
12
|
+
...props,
|
|
13
|
+
className: cn(displayTitle, "mt-5 mb-2", className)
|
|
14
|
+
}),
|
|
15
|
+
h3: ({ className, ...props }) => /* @__PURE__ */ jsx("h3", {
|
|
16
|
+
...props,
|
|
17
|
+
className: cn("mt-4 mb-1 text-base/6 font-medium", className)
|
|
18
|
+
}),
|
|
19
|
+
p: ({ className, ...props }) => /* @__PURE__ */ jsx("p", {
|
|
20
|
+
...props,
|
|
21
|
+
className: cn("my-3 text-sm/6 text-pretty", className)
|
|
22
|
+
}),
|
|
23
|
+
a: ({ className, ...props }) => /* @__PURE__ */ jsx("a", {
|
|
24
|
+
...props,
|
|
25
|
+
className: cn("rounded-sm underline decoration-current/40 underline-offset-4 outline-none hover:decoration-current focus-visible:outline-2 focus-visible:outline-bloom-sky", className)
|
|
26
|
+
}),
|
|
27
|
+
ul: ({ className, ...props }) => /* @__PURE__ */ jsx("ul", {
|
|
28
|
+
...props,
|
|
29
|
+
className: cn("my-3 list-disc pl-5 text-sm/6 marker:opacity-50", className)
|
|
30
|
+
}),
|
|
31
|
+
ol: ({ className, ...props }) => /* @__PURE__ */ jsx("ol", {
|
|
32
|
+
...props,
|
|
33
|
+
className: cn("my-3 list-decimal pl-5 text-sm/6 marker:opacity-50", className)
|
|
34
|
+
}),
|
|
35
|
+
li: ({ className, ...props }) => /* @__PURE__ */ jsx("li", {
|
|
36
|
+
...props,
|
|
37
|
+
className: cn("my-1", className)
|
|
38
|
+
}),
|
|
39
|
+
blockquote: ({ className, ...props }) => /* @__PURE__ */ jsx("blockquote", {
|
|
40
|
+
...props,
|
|
41
|
+
className: cn("my-3 border-l-2 border-current/30 pl-4 text-sm/6 opacity-80", className)
|
|
42
|
+
}),
|
|
43
|
+
hr: ({ className, ...props }) => /* @__PURE__ */ jsx("hr", {
|
|
44
|
+
...props,
|
|
45
|
+
className: cn("my-6 border-0 border-t border-current/15", className)
|
|
46
|
+
}),
|
|
47
|
+
code: ({ className, ...props }) => /* @__PURE__ */ jsx("code", {
|
|
48
|
+
...props,
|
|
49
|
+
className: cn("bg-current/10 px-1 py-0.5 font-mono text-xs", className)
|
|
50
|
+
}),
|
|
51
|
+
pre: ({ className, ...props }) => /* @__PURE__ */ jsx("pre", {
|
|
52
|
+
...props,
|
|
53
|
+
className: cn("scrollbar-bloom my-3 overflow-x-auto border border-current/10 bg-current/5 p-4 font-mono text-xs/5 [&_code]:bg-transparent [&_code]:p-0", className)
|
|
54
|
+
}),
|
|
55
|
+
strong: ({ className, ...props }) => /* @__PURE__ */ jsx("strong", {
|
|
56
|
+
...props,
|
|
57
|
+
className: cn("font-semibold", className)
|
|
58
|
+
})
|
|
59
|
+
};
|
|
60
|
+
/** `className` goes to the wrapper, which keeps the element margins from stacking with a parent's gap. */
|
|
61
|
+
const Markdown = ({ components: overrides, className, ...props }) => /* @__PURE__ */ jsx(Markdown$1, {
|
|
62
|
+
...props,
|
|
63
|
+
components: {
|
|
64
|
+
...components,
|
|
65
|
+
...overrides
|
|
66
|
+
},
|
|
67
|
+
className: cn("[&>:first-child]:mt-0 [&>:last-child]:mb-0", className)
|
|
68
|
+
});
|
|
69
|
+
//#endregion
|
|
70
|
+
export { Markdown };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from "react";
|
|
2
|
+
//#region src/message.d.ts
|
|
3
|
+
type RootProps = ComponentPropsWithRef<'div'> & {
|
|
4
|
+
from?: 'agent' | 'user';
|
|
5
|
+
};
|
|
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;
|
|
9
|
+
declare const Message: {
|
|
10
|
+
Root: typeof Root;
|
|
11
|
+
Bubble: typeof Bubble;
|
|
12
|
+
Highlight: typeof Highlight;
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { Message };
|
package/dist/message.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { cn } from "./lib/cn.js";
|
|
2
|
+
import { accentText, dim } from "./lib/theme.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Message as Message$1 } from "@journ/nude/message";
|
|
5
|
+
//#region src/message.tsx
|
|
6
|
+
const Root = ({ from = "agent", className, ...props }) => /* @__PURE__ */ jsx(Message$1.Root, {
|
|
7
|
+
from,
|
|
8
|
+
...props,
|
|
9
|
+
className: cn("group flex items-start gap-3 data-[from=user]:justify-end", className)
|
|
10
|
+
});
|
|
11
|
+
const Bubble = ({ className, ...props }) => /* @__PURE__ */ jsx(Message$1.Bubble, {
|
|
12
|
+
...props,
|
|
13
|
+
className: cn(dim, "rounded-3xl px-4 py-2.5 text-sm/6 group-data-[from=user]:border group-data-[from=user]:border-current/15 group-data-[from=user]:bg-transparent", className)
|
|
14
|
+
});
|
|
15
|
+
const Highlight = ({ className, ...props }) => /* @__PURE__ */ jsx(Message$1.Highlight, {
|
|
16
|
+
...props,
|
|
17
|
+
className: cn(dim, accentText, "px-1 font-mono text-xs", className)
|
|
18
|
+
});
|
|
19
|
+
const Message = {
|
|
20
|
+
Root,
|
|
21
|
+
Bubble,
|
|
22
|
+
Highlight
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { Message };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Frame, Header, Heading, Months, Next, Previous, Years } from "./calendar-parts.js";
|
|
2
|
+
import { RootProps } from "./month-picker-parts.js";
|
|
3
|
+
//#region src/month-picker.d.ts
|
|
4
|
+
declare const MonthPicker: {
|
|
5
|
+
Root: any;
|
|
6
|
+
Frame: typeof Frame;
|
|
7
|
+
Header: typeof Header;
|
|
8
|
+
Heading: typeof Heading;
|
|
9
|
+
Previous: typeof Previous;
|
|
10
|
+
Next: typeof Next;
|
|
11
|
+
Months: typeof Months;
|
|
12
|
+
Years: typeof Years;
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { MonthPicker, type RootProps as MonthPickerProps };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Frame, Header, Heading, Months, Next, Previous, Years } from "./calendar-parts.js";
|
|
2
|
+
import { Root } from "./month-picker-parts.js";
|
|
3
|
+
//#region src/month-picker.tsx
|
|
4
|
+
const MonthPicker = {
|
|
5
|
+
Root,
|
|
6
|
+
Frame,
|
|
7
|
+
Header,
|
|
8
|
+
Heading,
|
|
9
|
+
Previous,
|
|
10
|
+
Next,
|
|
11
|
+
Months,
|
|
12
|
+
Years
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { MonthPicker };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IconButtonProps } from "./icon-button.js";
|
|
2
|
+
import { ComponentPropsWithRef } from "react";
|
|
3
|
+
import * as Nude from "@journ/nude/month-stepper-parts";
|
|
4
|
+
//#region src/month-stepper-parts.d.ts
|
|
5
|
+
/** Always reports the first day of the month. */
|
|
6
|
+
declare const Root: ({ className, ...props }: Nude.RootProps) => import("react").JSX.Element;
|
|
7
|
+
declare const Previous: ({ tone, size, className, children, ...props }: IconButtonProps) => import("react").JSX.Element;
|
|
8
|
+
declare const Next: ({ tone, size, className, children, ...props }: IconButtonProps) => import("react").JSX.Element;
|
|
9
|
+
declare const Label: ({ className, ...props }: ComponentPropsWithRef<'span'>) => import("react").JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Label, Next, Previous, Root };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "./lib/cn.js";
|
|
3
|
+
import { displayHeading } from "./lib/text-styles.js";
|
|
4
|
+
import { stepButton } from "./step-button.js";
|
|
5
|
+
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import * as Nude from "@journ/nude/month-stepper-parts";
|
|
8
|
+
//#region src/month-stepper-parts.tsx
|
|
9
|
+
/** Always reports the first day of the month. */
|
|
10
|
+
const Root = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Root, {
|
|
11
|
+
...props,
|
|
12
|
+
className: cn("inline-flex items-center gap-2", className)
|
|
13
|
+
});
|
|
14
|
+
const Previous = ({ tone, size, className, children, ...props }) => /* @__PURE__ */ jsx(Nude.Previous, {
|
|
15
|
+
...props,
|
|
16
|
+
...stepButton(ChevronLeft, {
|
|
17
|
+
tone,
|
|
18
|
+
size,
|
|
19
|
+
className,
|
|
20
|
+
children
|
|
21
|
+
})
|
|
22
|
+
});
|
|
23
|
+
const Next = ({ tone, size, className, children, ...props }) => /* @__PURE__ */ jsx(Nude.Next, {
|
|
24
|
+
...props,
|
|
25
|
+
...stepButton(ChevronRight, {
|
|
26
|
+
tone,
|
|
27
|
+
size,
|
|
28
|
+
className,
|
|
29
|
+
children
|
|
30
|
+
})
|
|
31
|
+
});
|
|
32
|
+
const Label = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Label, {
|
|
33
|
+
...props,
|
|
34
|
+
className: cn(displayHeading, "min-w-36 text-center tabular-nums", className)
|
|
35
|
+
});
|
|
36
|
+
//#endregion
|
|
37
|
+
export { Label, Next, Previous, Root };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Label, Next, Previous, Root } from "./month-stepper-parts.js";
|
|
2
|
+
//#region src/month-stepper.d.ts
|
|
3
|
+
declare const MonthStepper: {
|
|
4
|
+
Root: typeof Root;
|
|
5
|
+
Previous: typeof Previous;
|
|
6
|
+
Label: typeof Label;
|
|
7
|
+
Next: typeof Next;
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { MonthStepper };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ButtonProps } from "./button.js";
|
|
2
|
+
import { Empty, Frame, Group, Input as Input$1, ItemIndicator, List } from "./combobox-parts.js";
|
|
3
|
+
import { ComponentPropsWithRef } from "react";
|
|
4
|
+
import * as Nude from "@journ/nude/multiple-selector-parts";
|
|
5
|
+
import { RootProps } from "@journ/nude/multiple-selector-parts";
|
|
6
|
+
//#region src/multiple-selector-parts.d.ts
|
|
7
|
+
declare const Root: any, useMultipleSelector: any;
|
|
8
|
+
declare const Trigger: ({ tone, className, children, ...props }: import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
9
|
+
tone?: ButtonProps['tone'];
|
|
10
|
+
}) => import("react").JSX.Element, Value: ({ className, ...props }: {
|
|
11
|
+
className?: string;
|
|
12
|
+
}) => import("react").JSX.Element;
|
|
13
|
+
declare const Tags: () => import("react").JSX.Element;
|
|
14
|
+
declare const Input: (props: ComponentPropsWithRef<typeof Input$1>) => import("react").JSX.Element;
|
|
15
|
+
declare const Item: ({ className, ...props }: ComponentPropsWithRef<typeof Nude.Item>) => import("react").JSX.Element;
|
|
16
|
+
declare const Create: ({ className, ...props }: ComponentPropsWithRef<typeof Nude.Create>) => import("react").JSX.Element;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { Create, Empty, Frame, Group, Input, Item, ItemIndicator, List, Root, type RootProps, Tags, Trigger, Value, useMultipleSelector };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Chip } from "./chip.js";
|
|
3
|
+
import { stylePicker } from "./lib/picker.js";
|
|
4
|
+
import { Empty, Frame, Group, Input as Input$1, ItemIndicator, List, option } from "./combobox-parts.js";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import * as Nude from "@journ/nude/multiple-selector-parts";
|
|
7
|
+
//#region src/multiple-selector-parts.tsx
|
|
8
|
+
const { Root, useMultipleSelector } = Nude;
|
|
9
|
+
const { Trigger, Value } = stylePicker(Nude);
|
|
10
|
+
const Tags = () => /* @__PURE__ */ jsx(Nude.Tags, { components: { Tag: Chip.Tag } });
|
|
11
|
+
const Input = (props) => {
|
|
12
|
+
const { search, setSearch } = useMultipleSelector();
|
|
13
|
+
return /* @__PURE__ */ jsx(Input$1, {
|
|
14
|
+
...props,
|
|
15
|
+
value: search,
|
|
16
|
+
onValueChange: setSearch
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
const Item = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Item, {
|
|
20
|
+
...props,
|
|
21
|
+
className: option(className)
|
|
22
|
+
});
|
|
23
|
+
const Create = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Create, {
|
|
24
|
+
...props,
|
|
25
|
+
className: option(className)
|
|
26
|
+
});
|
|
27
|
+
//#endregion
|
|
28
|
+
export { Create, Empty, Frame, Group, Input, Item, ItemIndicator, List, Root, Tags, Trigger, Value, useMultipleSelector };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ButtonProps } from "./button.js";
|
|
2
|
+
import { Empty, Frame, Group, ItemIndicator, List } from "./combobox-parts.js";
|
|
3
|
+
import { Content, Description, Title } from "./drawer-parts.js";
|
|
4
|
+
import { Create, Input, Item, RootProps, Tags, useMultipleSelector } from "./multiple-selector-parts.js";
|
|
5
|
+
//#region src/multiple-selector.d.ts
|
|
6
|
+
declare const MultipleSelector: {
|
|
7
|
+
Root: any;
|
|
8
|
+
Trigger: ({ tone, className, children, ...props }: import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
9
|
+
tone?: ButtonProps['tone'];
|
|
10
|
+
}) => import("react").JSX.Element;
|
|
11
|
+
Value: ({ className, ...props }: {
|
|
12
|
+
className?: string;
|
|
13
|
+
}) => import("react").JSX.Element;
|
|
14
|
+
Tags: typeof Tags;
|
|
15
|
+
Content: typeof Content;
|
|
16
|
+
Title: typeof Title;
|
|
17
|
+
Description: typeof Description;
|
|
18
|
+
Frame: typeof Frame;
|
|
19
|
+
Input: typeof Input;
|
|
20
|
+
List: typeof List;
|
|
21
|
+
Empty: typeof Empty;
|
|
22
|
+
Group: typeof Group;
|
|
23
|
+
Item: typeof Item;
|
|
24
|
+
ItemIndicator: typeof ItemIndicator;
|
|
25
|
+
Create: typeof Create;
|
|
26
|
+
};
|
|
27
|
+
//#endregion
|
|
28
|
+
export { MultipleSelector, type RootProps as MultipleSelectorProps, useMultipleSelector };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Empty, Frame, Group, ItemIndicator, List } from "./combobox-parts.js";
|
|
2
|
+
import { Content, Description, Title } from "./drawer-parts.js";
|
|
3
|
+
import { Create, Input, Item, Root, Tags, Trigger, Value, useMultipleSelector } from "./multiple-selector-parts.js";
|
|
4
|
+
//#region src/multiple-selector.tsx
|
|
5
|
+
const MultipleSelector = {
|
|
6
|
+
Root,
|
|
7
|
+
Trigger,
|
|
8
|
+
Value,
|
|
9
|
+
Tags,
|
|
10
|
+
Content,
|
|
11
|
+
Title,
|
|
12
|
+
Description,
|
|
13
|
+
Frame,
|
|
14
|
+
Input,
|
|
15
|
+
List,
|
|
16
|
+
Empty,
|
|
17
|
+
Group,
|
|
18
|
+
Item,
|
|
19
|
+
ItemIndicator,
|
|
20
|
+
Create
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { MultipleSelector, useMultipleSelector };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from "react";
|
|
2
|
+
//#region src/nav-bar.d.ts
|
|
3
|
+
declare const Root: ({ className, ...props }: ComponentPropsWithRef<'nav'>) => import("react").JSX.Element;
|
|
4
|
+
declare const Item: ({ className, children, ...props }: ComponentPropsWithRef<'a'>) => import("react").JSX.Element;
|
|
5
|
+
declare const NavBar: {
|
|
6
|
+
Root: typeof Root;
|
|
7
|
+
Item: typeof Item;
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { NavBar };
|
package/dist/nav-bar.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { cn } from "./lib/cn.js";
|
|
2
|
+
import { interactive } from "./lib/interactive.js";
|
|
3
|
+
import { selectedWhenCurrent } from "./lib/text-styles.js";
|
|
4
|
+
import { foreground, raised } from "./lib/theme.js";
|
|
5
|
+
import { TouchTarget } from "./touch-target.js";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { NavBar as NavBar$1 } from "@journ/nude/nav-bar";
|
|
8
|
+
//#region src/nav-bar.tsx
|
|
9
|
+
const Root = ({ className, ...props }) => /* @__PURE__ */ jsx(NavBar$1.Root, {
|
|
10
|
+
...props,
|
|
11
|
+
className: cn(raised, "flex items-center justify-between p-1", className)
|
|
12
|
+
});
|
|
13
|
+
const Item = ({ className, children, ...props }) => /* @__PURE__ */ jsx(NavBar$1.Item, {
|
|
14
|
+
...props,
|
|
15
|
+
className: cn(interactive, foreground, "grid size-10 place-items-center [&>svg]:size-5", selectedWhenCurrent, className),
|
|
16
|
+
children: /* @__PURE__ */ jsx(TouchTarget, { children })
|
|
17
|
+
});
|
|
18
|
+
const NavBar = {
|
|
19
|
+
Root,
|
|
20
|
+
Item
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { NavBar };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from "react";
|
|
2
|
+
import * as Nude from "@journ/nude/navigation-menu-parts";
|
|
3
|
+
//#region src/navigation-menu-parts.d.ts
|
|
4
|
+
/** Includes the viewport, the panel that Content opens into. */
|
|
5
|
+
declare const Root: ({ className, ...props }: Omit<ComponentPropsWithRef<typeof Nude.Root>, 'classNames'>) => import("react").JSX.Element;
|
|
6
|
+
declare const List: ({ className, ...props }: ComponentPropsWithRef<typeof Nude.List>) => import("react").JSX.Element;
|
|
7
|
+
declare const Item: any;
|
|
8
|
+
declare const Trigger: ({ className, children, ...props }: ComponentPropsWithRef<typeof Nude.Trigger>) => import("react").JSX.Element;
|
|
9
|
+
declare const Content: ({ className, ...props }: ComponentPropsWithRef<typeof Nude.Content>) => import("react").JSX.Element;
|
|
10
|
+
declare const Link: ({ className, ...props }: ComponentPropsWithRef<typeof Nude.Link>) => import("react").JSX.Element;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Content, Item, Link, List, Root, Trigger };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "./lib/cn.js";
|
|
3
|
+
import { interactive } from "./lib/interactive.js";
|
|
4
|
+
import { useDropEnter } from "./lib/use-enter.js";
|
|
5
|
+
import { controlSize, selectedWhenCurrent } from "./lib/text-styles.js";
|
|
6
|
+
import { floatingSurface } from "./lib/overlay.js";
|
|
7
|
+
import { ChevronDown } from "lucide-react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import * as Nude from "@journ/nude/navigation-menu-parts";
|
|
10
|
+
//#region src/navigation-menu-parts.tsx
|
|
11
|
+
/** Includes the viewport, the panel that Content opens into. */
|
|
12
|
+
const Root = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Root, {
|
|
13
|
+
...props,
|
|
14
|
+
className: cn("relative flex max-w-max flex-1 items-center justify-center", className),
|
|
15
|
+
classNames: {
|
|
16
|
+
viewportPosition: "absolute top-full left-0 flex w-full justify-center pt-2",
|
|
17
|
+
viewport: cn(floatingSurface, "relative h-(--radix-navigation-menu-viewport-height) w-full origin-top overflow-hidden p-0 md:w-(--radix-navigation-menu-viewport-width)")
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
const List = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.List, {
|
|
21
|
+
...props,
|
|
22
|
+
className: cn("flex list-none items-center gap-1", className)
|
|
23
|
+
});
|
|
24
|
+
const Item = Nude.Item;
|
|
25
|
+
const pill = (className) => cn(interactive, controlSize, "inline-flex items-center gap-1.5 px-3 font-medium", className);
|
|
26
|
+
const Trigger = ({ className, children, ...props }) => /* @__PURE__ */ jsxs(Nude.Trigger, {
|
|
27
|
+
...props,
|
|
28
|
+
className: pill(cn("group", className)),
|
|
29
|
+
children: [children, /* @__PURE__ */ jsx(ChevronDown, {
|
|
30
|
+
"aria-hidden": true,
|
|
31
|
+
className: "size-4 transition-transform group-data-[state=open]:rotate-180"
|
|
32
|
+
})]
|
|
33
|
+
});
|
|
34
|
+
const Content = ({ className, ...props }) => {
|
|
35
|
+
const panel = useDropEnter();
|
|
36
|
+
return /* @__PURE__ */ jsx(Nude.Content, {
|
|
37
|
+
ref: panel,
|
|
38
|
+
...props,
|
|
39
|
+
className: cn("w-full p-2 md:w-96", className)
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
const Link = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Link, {
|
|
43
|
+
...props,
|
|
44
|
+
className: pill(cn(selectedWhenCurrent, className))
|
|
45
|
+
});
|
|
46
|
+
//#endregion
|
|
47
|
+
export { Content, Item, Link, List, Root, Trigger };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Content, Link, List, Root, Trigger } from "./navigation-menu-parts.js";
|
|
2
|
+
//#region src/navigation-menu.d.ts
|
|
3
|
+
declare const NavigationMenu: {
|
|
4
|
+
Root: typeof Root;
|
|
5
|
+
List: typeof List;
|
|
6
|
+
Item: any;
|
|
7
|
+
Trigger: typeof Trigger;
|
|
8
|
+
Content: typeof Content;
|
|
9
|
+
Link: typeof Link;
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { NavigationMenu };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from "react";
|
|
2
|
+
import * as Nude from "@journ/nude/otp-input-parts";
|
|
3
|
+
//#region src/otp-input-parts.d.ts
|
|
4
|
+
declare const Root: ({ className, ...props }: ComponentPropsWithRef<typeof Nude.Root>) => import("react").JSX.Element;
|
|
5
|
+
declare const Slot: ({ className, ...props }: ComponentPropsWithRef<typeof Nude.Slot>) => import("react").JSX.Element;
|
|
6
|
+
declare const Hidden: any;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { Hidden, Root, Slot };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "./lib/cn.js";
|
|
3
|
+
import { fieldRing, fieldText } from "./lib/text-styles.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import * as Nude from "@journ/nude/otp-input-parts";
|
|
6
|
+
//#region src/otp-input-parts.tsx
|
|
7
|
+
const Root = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Root, {
|
|
8
|
+
...props,
|
|
9
|
+
className: cn("flex items-center", className)
|
|
10
|
+
});
|
|
11
|
+
const Slot = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Slot, {
|
|
12
|
+
...props,
|
|
13
|
+
className: cn(fieldText, fieldRing, "relative size-14 border-y border-r border-current/15 bg-transparent text-center font-mono text-2xl tabular-nums first:border-l focus-visible:z-10", className)
|
|
14
|
+
});
|
|
15
|
+
const Hidden = Nude.Hidden;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Hidden, Root, Slot };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from "react";
|
|
2
|
+
//#region src/page-header.d.ts
|
|
3
|
+
declare const Root: ({ className, ...props }: ComponentPropsWithRef<'header'>) => import("react").JSX.Element;
|
|
4
|
+
declare const Title: ({ className, ...props }: ComponentPropsWithRef<'h1'>) => import("react").JSX.Element;
|
|
5
|
+
declare const Actions: ({ className, ...props }: ComponentPropsWithRef<'div'>) => import("react").JSX.Element;
|
|
6
|
+
declare const PageHeader: {
|
|
7
|
+
Root: typeof Root;
|
|
8
|
+
Title: typeof Title;
|
|
9
|
+
Actions: typeof Actions;
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { PageHeader };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { cn } from "./lib/cn.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { PageHeader as PageHeader$1 } from "@journ/nude/page-header";
|
|
4
|
+
//#region src/page-header.tsx
|
|
5
|
+
const Root = ({ className, ...props }) => /* @__PURE__ */ jsx(PageHeader$1.Root, {
|
|
6
|
+
...props,
|
|
7
|
+
className: cn("flex items-center gap-3", className)
|
|
8
|
+
});
|
|
9
|
+
const Title = ({ className, ...props }) => /* @__PURE__ */ jsx(PageHeader$1.Title, {
|
|
10
|
+
...props,
|
|
11
|
+
className: cn("flex-1 text-2xl/8 font-medium tracking-tight", className)
|
|
12
|
+
});
|
|
13
|
+
const Actions = ({ className, ...props }) => /* @__PURE__ */ jsx(PageHeader$1.Actions, {
|
|
14
|
+
...props,
|
|
15
|
+
className: cn("ml-auto flex items-center gap-2", className)
|
|
16
|
+
});
|
|
17
|
+
const PageHeader = {
|
|
18
|
+
Root,
|
|
19
|
+
Title,
|
|
20
|
+
Actions
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { PageHeader };
|
package/dist/page.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { VariantProps } from "./lib/tv.js";
|
|
2
|
+
import { ComponentPropsWithRef } from "react";
|
|
3
|
+
//#region src/page.d.ts
|
|
4
|
+
declare const pageRoot: import("tailwind-variants").TVReturnType<{
|
|
5
|
+
tone: {
|
|
6
|
+
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";
|
|
7
|
+
ink: "bg-bloom-ink text-bloom-paper";
|
|
8
|
+
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";
|
|
9
|
+
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";
|
|
10
|
+
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";
|
|
11
|
+
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";
|
|
12
|
+
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";
|
|
13
|
+
};
|
|
14
|
+
}, undefined, "min-h-dvh w-full", {
|
|
15
|
+
tone: {
|
|
16
|
+
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";
|
|
17
|
+
ink: "bg-bloom-ink text-bloom-paper";
|
|
18
|
+
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";
|
|
19
|
+
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";
|
|
20
|
+
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";
|
|
21
|
+
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";
|
|
22
|
+
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";
|
|
23
|
+
};
|
|
24
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
25
|
+
tone: {
|
|
26
|
+
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";
|
|
27
|
+
ink: "bg-bloom-ink text-bloom-paper";
|
|
28
|
+
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";
|
|
29
|
+
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";
|
|
30
|
+
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";
|
|
31
|
+
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";
|
|
32
|
+
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";
|
|
33
|
+
};
|
|
34
|
+
}, undefined>>;
|
|
35
|
+
type RootProps = ComponentPropsWithRef<'div'> & VariantProps<typeof pageRoot>;
|
|
36
|
+
declare const Root: ({ tone, className, ...props }: RootProps) => import("react").JSX.Element;
|
|
37
|
+
declare const Content: ({ className, ...props }: ComponentPropsWithRef<'main'>) => import("react").JSX.Element;
|
|
38
|
+
declare const Footer: ({ className, ...props }: ComponentPropsWithRef<'div'>) => import("react").JSX.Element;
|
|
39
|
+
declare const Page: {
|
|
40
|
+
Root: typeof Root;
|
|
41
|
+
Content: typeof Content;
|
|
42
|
+
Footer: typeof Footer;
|
|
43
|
+
};
|
|
44
|
+
//#endregion
|
|
45
|
+
export { Page, type RootProps as PageProps };
|
package/dist/page.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { tv } from "./lib/tv.js";
|
|
2
|
+
import { cn } from "./lib/cn.js";
|
|
3
|
+
import { canvasTone, inkTone, pageTints } from "./lib/tones.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { Page as Page$1 } from "@journ/nude/page";
|
|
6
|
+
//#region src/page.tsx
|
|
7
|
+
const pageRoot = tv({
|
|
8
|
+
base: "min-h-dvh w-full",
|
|
9
|
+
variants: { tone: {
|
|
10
|
+
canvas: canvasTone,
|
|
11
|
+
ink: inkTone,
|
|
12
|
+
indigo: pageTints.indigo,
|
|
13
|
+
mint: pageTints.mint,
|
|
14
|
+
sky: pageTints.sky,
|
|
15
|
+
yellow: pageTints.yellow,
|
|
16
|
+
coral: pageTints.coral
|
|
17
|
+
} },
|
|
18
|
+
defaultVariants: { tone: "canvas" }
|
|
19
|
+
});
|
|
20
|
+
const Root = ({ tone, className, ...props }) => /* @__PURE__ */ jsx(Page$1.Root, {
|
|
21
|
+
...props,
|
|
22
|
+
className: pageRoot({
|
|
23
|
+
tone,
|
|
24
|
+
class: className
|
|
25
|
+
})
|
|
26
|
+
});
|
|
27
|
+
const Content = ({ className, ...props }) => /* @__PURE__ */ jsx(Page$1.Content, {
|
|
28
|
+
...props,
|
|
29
|
+
className: cn("mx-auto flex min-h-dvh w-full max-w-sm flex-col gap-4 px-4 pt-[max(2rem,env(safe-area-inset-top))] pb-[max(1rem,env(safe-area-inset-bottom))]", className)
|
|
30
|
+
});
|
|
31
|
+
const Footer = ({ className, ...props }) => /* @__PURE__ */ jsx(Page$1.Footer, {
|
|
32
|
+
...props,
|
|
33
|
+
className: cn("sticky bottom-4 mt-auto", className)
|
|
34
|
+
});
|
|
35
|
+
const Page = {
|
|
36
|
+
Root,
|
|
37
|
+
Content,
|
|
38
|
+
Footer
|
|
39
|
+
};
|
|
40
|
+
//#endregion
|
|
41
|
+
export { Page };
|