@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/alert.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { tv } from "./lib/tv.js";
|
|
2
|
+
import { cn } from "./lib/cn.js";
|
|
3
|
+
import { displayLabel } from "./lib/text-styles.js";
|
|
4
|
+
import { surfaceTones } from "./lib/tones.js";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { Alert as Alert$1 } from "@journ/nude/alert";
|
|
7
|
+
//#region src/alert.tsx
|
|
8
|
+
const alertRoot = tv({
|
|
9
|
+
base: "rounded-bloom flex items-start gap-3 p-4",
|
|
10
|
+
variants: { tone: surfaceTones },
|
|
11
|
+
defaultVariants: { tone: "surface" }
|
|
12
|
+
});
|
|
13
|
+
const Root = ({ tone, className, ...props }) => /* @__PURE__ */ jsx(Alert$1.Root, {
|
|
14
|
+
role: "alert",
|
|
15
|
+
...props,
|
|
16
|
+
className: alertRoot({
|
|
17
|
+
tone,
|
|
18
|
+
class: className
|
|
19
|
+
})
|
|
20
|
+
});
|
|
21
|
+
const Icon = ({ className, ...props }) => /* @__PURE__ */ jsx(Alert$1.Icon, {
|
|
22
|
+
"aria-hidden": true,
|
|
23
|
+
...props,
|
|
24
|
+
className: cn("mt-0.5 shrink-0 [&>svg]:size-5", className)
|
|
25
|
+
});
|
|
26
|
+
const Body = ({ className, ...props }) => /* @__PURE__ */ jsx(Alert$1.Body, {
|
|
27
|
+
...props,
|
|
28
|
+
className: cn("flex min-w-0 flex-1 flex-col gap-1", className)
|
|
29
|
+
});
|
|
30
|
+
const Title = ({ className, ...props }) => /* @__PURE__ */ jsx(Alert$1.Title, {
|
|
31
|
+
...props,
|
|
32
|
+
className: cn(displayLabel, className)
|
|
33
|
+
});
|
|
34
|
+
const Description = ({ className, ...props }) => /* @__PURE__ */ jsx(Alert$1.Description, {
|
|
35
|
+
...props,
|
|
36
|
+
className: cn("text-sm/5 opacity-80", className)
|
|
37
|
+
});
|
|
38
|
+
const Actions = ({ className, ...props }) => /* @__PURE__ */ jsx(Alert$1.Actions, {
|
|
39
|
+
...props,
|
|
40
|
+
className: cn("mt-2 flex items-center gap-2", className)
|
|
41
|
+
});
|
|
42
|
+
const Alert = {
|
|
43
|
+
Root,
|
|
44
|
+
Icon,
|
|
45
|
+
Body,
|
|
46
|
+
Title,
|
|
47
|
+
Description,
|
|
48
|
+
Actions
|
|
49
|
+
};
|
|
50
|
+
//#endregion
|
|
51
|
+
export { Alert };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AnimatedSizeProps as AnimatedSizeProps$1 } from "@journ/nude/animated-size";
|
|
2
|
+
//#region src/animated-size.d.ts
|
|
3
|
+
type AnimatedSizeProps = Omit<AnimatedSizeProps$1, 'classNames'>;
|
|
4
|
+
declare const AnimatedSize: ({ width, className, ...props }: AnimatedSizeProps) => import("react").JSX.Element;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { AnimatedSize, type AnimatedSizeProps };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { cn } from "./lib/cn.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { AnimatedSize as AnimatedSize$1 } from "@journ/nude/animated-size";
|
|
4
|
+
//#region src/animated-size.tsx
|
|
5
|
+
const AnimatedSize = ({ width = false, className, ...props }) => /* @__PURE__ */ jsx(AnimatedSize$1, {
|
|
6
|
+
width,
|
|
7
|
+
...props,
|
|
8
|
+
className: cn("overflow-hidden", className),
|
|
9
|
+
classNames: { content: cn(width && "w-fit") }
|
|
10
|
+
});
|
|
11
|
+
//#endregion
|
|
12
|
+
export { AnimatedSize };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from "react";
|
|
2
|
+
import * as Nude from "@journ/nude/avatar-parts";
|
|
3
|
+
//#region src/avatar-parts.d.ts
|
|
4
|
+
declare const Root: ({ className, ...props }: ComponentPropsWithRef<typeof Nude.Root>) => import("react").JSX.Element;
|
|
5
|
+
declare const Image: ({ className, alt, ...props }: ComponentPropsWithRef<typeof Nude.Image> & {
|
|
6
|
+
alt: string;
|
|
7
|
+
}) => import("react").JSX.Element;
|
|
8
|
+
declare const Fallback: ({ className, ...props }: ComponentPropsWithRef<typeof Nude.Fallback>) => import("react").JSX.Element;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Fallback, Image, Root };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "./lib/cn.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import * as Nude from "@journ/nude/avatar-parts";
|
|
5
|
+
//#region src/avatar-parts.tsx
|
|
6
|
+
const Root = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Root, {
|
|
7
|
+
...props,
|
|
8
|
+
className: cn("grid size-10 shrink-0 place-items-center overflow-hidden rounded-full bg-current/10", className)
|
|
9
|
+
});
|
|
10
|
+
const Image = ({ className, alt, ...props }) => /* @__PURE__ */ jsx(Nude.Image, {
|
|
11
|
+
alt,
|
|
12
|
+
...props,
|
|
13
|
+
className: cn("size-full object-cover", className)
|
|
14
|
+
});
|
|
15
|
+
const Fallback = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Fallback, {
|
|
16
|
+
...props,
|
|
17
|
+
className: cn("text-xs font-medium uppercase", className)
|
|
18
|
+
});
|
|
19
|
+
//#endregion
|
|
20
|
+
export { Fallback, Image, Root };
|
package/dist/avatar.d.ts
ADDED
package/dist/avatar.js
ADDED
package/dist/badge.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { VariantProps } from "./lib/tv.js";
|
|
2
|
+
import { ComponentPropsWithRef } from "react";
|
|
3
|
+
//#region src/badge.d.ts
|
|
4
|
+
declare const badge: import("tailwind-variants").TVReturnType<{
|
|
5
|
+
tone: {
|
|
6
|
+
neutral: "bg-bloom-foreground/8 dark:bg-bloom-foreground-dark/10 text-bloom-foreground dark:text-bloom-foreground-dark";
|
|
7
|
+
coral: 'bg-bloom-coral/15 text-bloom-foreground dark:text-bloom-coral';
|
|
8
|
+
yellow: 'bg-bloom-yellow/25 text-bloom-foreground dark:bg-bloom-yellow/15 dark:text-bloom-yellow';
|
|
9
|
+
indigo: 'bg-bloom-indigo/15 text-bloom-foreground dark:text-bloom-indigo';
|
|
10
|
+
mint: 'bg-bloom-mint/20 text-bloom-foreground dark:bg-bloom-mint/15 dark:text-bloom-mint';
|
|
11
|
+
sky: 'bg-bloom-sky/15 text-bloom-foreground dark:text-bloom-sky';
|
|
12
|
+
ink: "bg-bloom-ink text-bloom-paper";
|
|
13
|
+
};
|
|
14
|
+
}, undefined, "inline-flex items-center rounded-full px-2.5 py-0.5 font-mono text-xs/5 tabular-nums", {
|
|
15
|
+
tone: {
|
|
16
|
+
neutral: "bg-bloom-foreground/8 dark:bg-bloom-foreground-dark/10 text-bloom-foreground dark:text-bloom-foreground-dark";
|
|
17
|
+
coral: 'bg-bloom-coral/15 text-bloom-foreground dark:text-bloom-coral';
|
|
18
|
+
yellow: 'bg-bloom-yellow/25 text-bloom-foreground dark:bg-bloom-yellow/15 dark:text-bloom-yellow';
|
|
19
|
+
indigo: 'bg-bloom-indigo/15 text-bloom-foreground dark:text-bloom-indigo';
|
|
20
|
+
mint: 'bg-bloom-mint/20 text-bloom-foreground dark:bg-bloom-mint/15 dark:text-bloom-mint';
|
|
21
|
+
sky: 'bg-bloom-sky/15 text-bloom-foreground dark:text-bloom-sky';
|
|
22
|
+
ink: "bg-bloom-ink text-bloom-paper";
|
|
23
|
+
};
|
|
24
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
25
|
+
tone: {
|
|
26
|
+
neutral: "bg-bloom-foreground/8 dark:bg-bloom-foreground-dark/10 text-bloom-foreground dark:text-bloom-foreground-dark";
|
|
27
|
+
coral: 'bg-bloom-coral/15 text-bloom-foreground dark:text-bloom-coral';
|
|
28
|
+
yellow: 'bg-bloom-yellow/25 text-bloom-foreground dark:bg-bloom-yellow/15 dark:text-bloom-yellow';
|
|
29
|
+
indigo: 'bg-bloom-indigo/15 text-bloom-foreground dark:text-bloom-indigo';
|
|
30
|
+
mint: 'bg-bloom-mint/20 text-bloom-foreground dark:bg-bloom-mint/15 dark:text-bloom-mint';
|
|
31
|
+
sky: 'bg-bloom-sky/15 text-bloom-foreground dark:text-bloom-sky';
|
|
32
|
+
ink: "bg-bloom-ink text-bloom-paper";
|
|
33
|
+
};
|
|
34
|
+
}, undefined>>;
|
|
35
|
+
type BadgeProps = ComponentPropsWithRef<'span'> & VariantProps<typeof badge>;
|
|
36
|
+
declare const Badge: ({ tone, className, ...props }: BadgeProps) => import("react").JSX.Element;
|
|
37
|
+
//#endregion
|
|
38
|
+
export { Badge, type BadgeProps };
|
package/dist/badge.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { tv } from "./lib/tv.js";
|
|
2
|
+
import { inkTone, labelTones } from "./lib/tones.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Badge as Badge$1 } from "@journ/nude/badge";
|
|
5
|
+
//#region src/badge.tsx
|
|
6
|
+
const badge = tv({
|
|
7
|
+
base: "inline-flex items-center rounded-full px-2.5 py-0.5 font-mono text-xs/5 tabular-nums",
|
|
8
|
+
variants: { tone: {
|
|
9
|
+
...labelTones,
|
|
10
|
+
ink: inkTone
|
|
11
|
+
} },
|
|
12
|
+
defaultVariants: { tone: "neutral" }
|
|
13
|
+
});
|
|
14
|
+
const Badge = ({ tone, className, ...props }) => /* @__PURE__ */ jsx(Badge$1, {
|
|
15
|
+
...props,
|
|
16
|
+
className: badge({
|
|
17
|
+
tone,
|
|
18
|
+
class: className
|
|
19
|
+
})
|
|
20
|
+
});
|
|
21
|
+
//#endregion
|
|
22
|
+
export { Badge };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from "react";
|
|
2
|
+
//#region src/breadcrumbs.d.ts
|
|
3
|
+
declare const Root: ({ className, ...props }: ComponentPropsWithRef<'nav'>) => import("react").JSX.Element;
|
|
4
|
+
declare const List: ({ className, ...props }: ComponentPropsWithRef<'ol'>) => import("react").JSX.Element;
|
|
5
|
+
declare const Item: ({ className, ...props }: ComponentPropsWithRef<'li'>) => import("react").JSX.Element;
|
|
6
|
+
declare const Link: ({ className, ...props }: ComponentPropsWithRef<'a'>) => import("react").JSX.Element;
|
|
7
|
+
declare const Page: ({ className, ...props }: ComponentPropsWithRef<'span'>) => import("react").JSX.Element;
|
|
8
|
+
declare const Separator: ({ className, ...props }: ComponentPropsWithRef<'li'>) => import("react").JSX.Element;
|
|
9
|
+
declare const Breadcrumbs: {
|
|
10
|
+
Root: typeof Root;
|
|
11
|
+
List: typeof List;
|
|
12
|
+
Item: typeof Item;
|
|
13
|
+
Link: typeof Link;
|
|
14
|
+
Page: typeof Page;
|
|
15
|
+
Separator: typeof Separator;
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { Breadcrumbs };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { cn } from "./lib/cn.js";
|
|
2
|
+
import { ChevronRight } from "lucide-react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Breadcrumbs as Breadcrumbs$1 } from "@journ/nude/breadcrumbs";
|
|
5
|
+
//#region src/breadcrumbs.tsx
|
|
6
|
+
const Root = ({ className, ...props }) => /* @__PURE__ */ jsx(Breadcrumbs$1.Root, {
|
|
7
|
+
"aria-label": "Breadcrumb",
|
|
8
|
+
...props,
|
|
9
|
+
className
|
|
10
|
+
});
|
|
11
|
+
const List = ({ className, ...props }) => /* @__PURE__ */ jsx(Breadcrumbs$1.List, {
|
|
12
|
+
...props,
|
|
13
|
+
className: cn("flex flex-wrap items-center gap-1.5 text-sm/6", className)
|
|
14
|
+
});
|
|
15
|
+
const Item = ({ className, ...props }) => /* @__PURE__ */ jsx(Breadcrumbs$1.Item, {
|
|
16
|
+
...props,
|
|
17
|
+
className: cn("inline-flex items-center gap-1.5", className)
|
|
18
|
+
});
|
|
19
|
+
const Link = ({ className, ...props }) => /* @__PURE__ */ jsx(Breadcrumbs$1.Link, {
|
|
20
|
+
...props,
|
|
21
|
+
className: cn("rounded-sm opacity-60 outline-none transition-opacity hover:opacity-100 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-bloom-sky", className)
|
|
22
|
+
});
|
|
23
|
+
const Page = ({ className, ...props }) => /* @__PURE__ */ jsx(Breadcrumbs$1.Page, {
|
|
24
|
+
"aria-current": "page",
|
|
25
|
+
...props,
|
|
26
|
+
className: cn("font-medium", className)
|
|
27
|
+
});
|
|
28
|
+
const Separator = ({ className, ...props }) => /* @__PURE__ */ jsx(Breadcrumbs$1.Separator, {
|
|
29
|
+
role: "presentation",
|
|
30
|
+
"aria-hidden": true,
|
|
31
|
+
...props,
|
|
32
|
+
className: cn("opacity-40 [&>svg]:size-4", className),
|
|
33
|
+
children: /* @__PURE__ */ jsx(ChevronRight, {})
|
|
34
|
+
});
|
|
35
|
+
const Breadcrumbs = {
|
|
36
|
+
Root,
|
|
37
|
+
List,
|
|
38
|
+
Item,
|
|
39
|
+
Link,
|
|
40
|
+
Page,
|
|
41
|
+
Separator
|
|
42
|
+
};
|
|
43
|
+
//#endregion
|
|
44
|
+
export { Breadcrumbs };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from "react";
|
|
2
|
+
//#region src/bulk-bar.d.ts
|
|
3
|
+
/** Render it while something is selected; it floats at the bottom of the page. */
|
|
4
|
+
declare const Root: ({ className, ...props }: ComponentPropsWithRef<'div'>) => import("react").JSX.Element;
|
|
5
|
+
declare const Count: ({ className, ...props }: ComponentPropsWithRef<'p'>) => import("react").JSX.Element;
|
|
6
|
+
declare const Actions: ({ className, ...props }: ComponentPropsWithRef<'div'>) => import("react").JSX.Element;
|
|
7
|
+
declare const BulkBar: {
|
|
8
|
+
Root: typeof Root;
|
|
9
|
+
Count: typeof Count;
|
|
10
|
+
Actions: typeof Actions;
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { BulkBar };
|
package/dist/bulk-bar.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { cn } from "./lib/cn.js";
|
|
2
|
+
import { raised } from "./lib/theme.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { BulkBar as BulkBar$1 } from "@journ/nude/bulk-bar";
|
|
5
|
+
//#region src/bulk-bar.tsx
|
|
6
|
+
/** Render it while something is selected; it floats at the bottom of the page. */
|
|
7
|
+
const Root = ({ className, ...props }) => /* @__PURE__ */ jsx(BulkBar$1.Root, {
|
|
8
|
+
role: "toolbar",
|
|
9
|
+
...props,
|
|
10
|
+
className: cn(raised, "sticky bottom-4 flex h-12 items-center gap-3 pr-2 pl-4 shadow-md", className)
|
|
11
|
+
});
|
|
12
|
+
const Count = ({ className, ...props }) => /* @__PURE__ */ jsx(BulkBar$1.Count, {
|
|
13
|
+
"aria-live": "polite",
|
|
14
|
+
...props,
|
|
15
|
+
className: cn("text-sm/6 font-medium tabular-nums", className)
|
|
16
|
+
});
|
|
17
|
+
const Actions = ({ className, ...props }) => /* @__PURE__ */ jsx(BulkBar$1.Actions, {
|
|
18
|
+
...props,
|
|
19
|
+
className: cn("ml-auto flex items-center gap-1", className)
|
|
20
|
+
});
|
|
21
|
+
const BulkBar = {
|
|
22
|
+
Root,
|
|
23
|
+
Count,
|
|
24
|
+
Actions
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { BulkBar };
|
package/dist/button.d.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { VariantProps } from "./lib/tv.js";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
import { ButtonProps as ButtonProps$1 } from "@journ/nude/button";
|
|
4
|
+
//#region src/button.d.ts
|
|
5
|
+
declare const button: import("tailwind-variants").TVReturnType<{
|
|
6
|
+
tone: {
|
|
7
|
+
neutral: "bg-bloom-foreground dark:bg-bloom-foreground-dark text-bloom-canvas dark:text-bloom-canvas-dark";
|
|
8
|
+
field: "border border-bloom-line dark:border-bloom-line-dark bg-transparent text-bloom-foreground dark:text-bloom-foreground-dark";
|
|
9
|
+
coral: "bg-bloom-coral text-bloom-paper";
|
|
10
|
+
yellow: "bg-bloom-yellow text-bloom-ink";
|
|
11
|
+
ink: "bg-bloom-ink text-bloom-paper";
|
|
12
|
+
ghost: "bg-transparent text-inherit";
|
|
13
|
+
outline: "border border-current/20 bg-transparent text-inherit";
|
|
14
|
+
};
|
|
15
|
+
}, undefined, string[], {
|
|
16
|
+
tone: {
|
|
17
|
+
neutral: "bg-bloom-foreground dark:bg-bloom-foreground-dark text-bloom-canvas dark:text-bloom-canvas-dark";
|
|
18
|
+
field: "border border-bloom-line dark:border-bloom-line-dark bg-transparent text-bloom-foreground dark:text-bloom-foreground-dark";
|
|
19
|
+
coral: "bg-bloom-coral text-bloom-paper";
|
|
20
|
+
yellow: "bg-bloom-yellow text-bloom-ink";
|
|
21
|
+
ink: "bg-bloom-ink text-bloom-paper";
|
|
22
|
+
ghost: "bg-transparent text-inherit";
|
|
23
|
+
outline: "border border-current/20 bg-transparent text-inherit";
|
|
24
|
+
};
|
|
25
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
26
|
+
tone: {
|
|
27
|
+
neutral: "bg-bloom-foreground dark:bg-bloom-foreground-dark text-bloom-canvas dark:text-bloom-canvas-dark";
|
|
28
|
+
field: "border border-bloom-line dark:border-bloom-line-dark bg-transparent text-bloom-foreground dark:text-bloom-foreground-dark";
|
|
29
|
+
coral: "bg-bloom-coral text-bloom-paper";
|
|
30
|
+
yellow: "bg-bloom-yellow text-bloom-ink";
|
|
31
|
+
ink: "bg-bloom-ink text-bloom-paper";
|
|
32
|
+
ghost: "bg-transparent text-inherit";
|
|
33
|
+
outline: "border border-current/20 bg-transparent text-inherit";
|
|
34
|
+
};
|
|
35
|
+
}, undefined>>;
|
|
36
|
+
type ButtonProps = VariantProps<typeof button> & ButtonProps$1;
|
|
37
|
+
declare const buttonContent: (children: ReactNode, pending?: boolean) => import("react").JSX.Element;
|
|
38
|
+
declare const Button: ({ tone, pending, className, children, ...props }: ButtonProps) => import("react").JSX.Element;
|
|
39
|
+
//#endregion
|
|
40
|
+
export { Button, type ButtonProps, button, buttonContent };
|
package/dist/button.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { tv } from "./lib/tv.js";
|
|
2
|
+
import { cn } from "./lib/cn.js";
|
|
3
|
+
import { interactive } from "./lib/interactive.js";
|
|
4
|
+
import { controlSize } from "./lib/text-styles.js";
|
|
5
|
+
import { control } from "./lib/theme.js";
|
|
6
|
+
import { inkTone, solidTones } from "./lib/tones.js";
|
|
7
|
+
import { Spinner } from "./spinner.js";
|
|
8
|
+
import { TouchTarget } from "./touch-target.js";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { Button as Button$1 } from "@journ/nude/button";
|
|
11
|
+
//#region src/button.tsx
|
|
12
|
+
const button = tv({
|
|
13
|
+
base: [
|
|
14
|
+
interactive,
|
|
15
|
+
controlSize,
|
|
16
|
+
"rounded-bloom inline-flex items-center justify-center gap-x-2 px-4 font-medium",
|
|
17
|
+
"[&>svg]:size-5 [&>svg]:shrink-0 sm:[&>svg]:size-4"
|
|
18
|
+
],
|
|
19
|
+
variants: { tone: {
|
|
20
|
+
neutral: solidTones.neutral,
|
|
21
|
+
field: control,
|
|
22
|
+
coral: solidTones.coral,
|
|
23
|
+
yellow: solidTones.yellow,
|
|
24
|
+
ink: inkTone,
|
|
25
|
+
ghost: "bg-transparent text-inherit",
|
|
26
|
+
outline: "border border-current/20 bg-transparent text-inherit"
|
|
27
|
+
} },
|
|
28
|
+
defaultVariants: { tone: "neutral" }
|
|
29
|
+
});
|
|
30
|
+
const buttonContent = (children, pending = false) => /* @__PURE__ */ jsxs(TouchTarget, { children: [pending && /* @__PURE__ */ jsx(Spinner, { "aria-hidden": true }), children] });
|
|
31
|
+
const Button = ({ tone, pending = false, className, children, ...props }) => /* @__PURE__ */ jsx(Button$1, {
|
|
32
|
+
...props,
|
|
33
|
+
pending,
|
|
34
|
+
className: button({
|
|
35
|
+
tone,
|
|
36
|
+
class: cn(pending && "aria-busy:pointer-events-none", className)
|
|
37
|
+
}),
|
|
38
|
+
children: buttonContent(children, pending)
|
|
39
|
+
});
|
|
40
|
+
//#endregion
|
|
41
|
+
export { Button, button, buttonContent };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IconButtonProps } from "./icon-button.js";
|
|
2
|
+
import { ComponentPropsWithRef } from "react";
|
|
3
|
+
import { CalendarActions, CalendarContextValue, CalendarMeta, CalendarRange, CalendarState, CalendarView, RootProps, Weekday } from "@journ/nude/calendar-parts";
|
|
4
|
+
//#region src/calendar-parts.d.ts
|
|
5
|
+
declare const YEAR_PAGE_SIZE: any, Provider: any, Root: any, useCalendar: any, useCalendarNavigation: any;
|
|
6
|
+
declare const Frame: ({ className, ...props }: ComponentPropsWithRef<'div'>) => import("react").JSX.Element;
|
|
7
|
+
declare const Header: ({ className, ...props }: ComponentPropsWithRef<'div'>) => import("react").JSX.Element;
|
|
8
|
+
declare const Heading: ({ className, ...props }: Omit<ComponentPropsWithRef<'button'>, 'children'>) => import("react").JSX.Element;
|
|
9
|
+
declare const Previous: ({ tone, size, className, children, ...props }: IconButtonProps) => import("react").JSX.Element;
|
|
10
|
+
declare const Next: ({ tone, size, className, children, ...props }: IconButtonProps) => import("react").JSX.Element;
|
|
11
|
+
type GridProps = Omit<ComponentPropsWithRef<'div'>, 'children'>;
|
|
12
|
+
declare const Weekdays: ({ className, ...props }: GridProps) => import("react").JSX.Element;
|
|
13
|
+
declare const Days: ({ className, ...props }: GridProps) => import("react").JSX.Element;
|
|
14
|
+
declare const Months: ({ className, ...props }: GridProps) => import("react").JSX.Element;
|
|
15
|
+
declare const Years: ({ className, ...props }: GridProps) => import("react").JSX.Element;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { type CalendarActions, type CalendarContextValue, type CalendarMeta, type CalendarRange, type CalendarState, type CalendarView, Days, Frame, Header, Heading, Months, Next, Previous, Provider, Root, type RootProps, type Weekday, Weekdays, YEAR_PAGE_SIZE, Years, useCalendar, useCalendarNavigation };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { tv } from "./lib/tv.js";
|
|
3
|
+
import { cn } from "./lib/cn.js";
|
|
4
|
+
import { interactive } from "./lib/interactive.js";
|
|
5
|
+
import { displayHeading } from "./lib/text-styles.js";
|
|
6
|
+
import { neutral } from "./lib/theme.js";
|
|
7
|
+
import { stepButton } from "./step-button.js";
|
|
8
|
+
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
import * as Nude from "@journ/nude/calendar-parts";
|
|
11
|
+
//#region src/calendar-parts.tsx
|
|
12
|
+
const { YEAR_PAGE_SIZE, Provider, Root, useCalendar, useCalendarNavigation } = Nude;
|
|
13
|
+
const Frame = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Frame, {
|
|
14
|
+
...props,
|
|
15
|
+
className: cn("flex w-full flex-col gap-3", className)
|
|
16
|
+
});
|
|
17
|
+
const Header = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Header, {
|
|
18
|
+
...props,
|
|
19
|
+
className: cn("flex items-center gap-2", className)
|
|
20
|
+
});
|
|
21
|
+
const Heading = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Heading, {
|
|
22
|
+
...props,
|
|
23
|
+
className: cn(interactive, displayHeading, "mr-auto -ml-3 px-3 py-1 disabled:opacity-100", className)
|
|
24
|
+
});
|
|
25
|
+
const Previous = ({ tone, size, className, children, ...props }) => /* @__PURE__ */ jsx(Nude.Previous, {
|
|
26
|
+
...props,
|
|
27
|
+
...stepButton(ChevronLeft, {
|
|
28
|
+
tone,
|
|
29
|
+
size,
|
|
30
|
+
className,
|
|
31
|
+
children
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
const Next = ({ tone, size, className, children, ...props }) => /* @__PURE__ */ jsx(Nude.Next, {
|
|
35
|
+
...props,
|
|
36
|
+
...stepButton(ChevronRight, {
|
|
37
|
+
tone,
|
|
38
|
+
size,
|
|
39
|
+
className,
|
|
40
|
+
children
|
|
41
|
+
})
|
|
42
|
+
});
|
|
43
|
+
const cell = tv({
|
|
44
|
+
base: [interactive, "w-full rounded-full text-base/6 tabular-nums data-[outside=true]:opacity-30 sm:text-sm/6"],
|
|
45
|
+
variants: {
|
|
46
|
+
shape: {
|
|
47
|
+
day: "aspect-square",
|
|
48
|
+
period: "h-11"
|
|
49
|
+
},
|
|
50
|
+
state: {
|
|
51
|
+
idle: "",
|
|
52
|
+
today: "font-semibold underline underline-offset-4",
|
|
53
|
+
selected: `${neutral} font-medium`,
|
|
54
|
+
inRange: "bg-current/8"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
defaultVariants: {
|
|
58
|
+
shape: "day",
|
|
59
|
+
state: "idle"
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
const Weekdays = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Weekdays, {
|
|
63
|
+
...props,
|
|
64
|
+
className: cn("grid grid-cols-7", className),
|
|
65
|
+
classNames: { weekday: "py-1 text-center text-xs opacity-50" }
|
|
66
|
+
});
|
|
67
|
+
const Days = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Days, {
|
|
68
|
+
...props,
|
|
69
|
+
className: cn("grid grid-cols-7 gap-y-1", className),
|
|
70
|
+
classNames: { day: (state) => cell({ state }) }
|
|
71
|
+
});
|
|
72
|
+
const Months = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Months, {
|
|
73
|
+
...props,
|
|
74
|
+
className: cn("grid grid-cols-3 gap-2", className),
|
|
75
|
+
classNames: { month: (state) => cell({
|
|
76
|
+
shape: "period",
|
|
77
|
+
state,
|
|
78
|
+
class: "capitalize"
|
|
79
|
+
}) }
|
|
80
|
+
});
|
|
81
|
+
const Years = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Years, {
|
|
82
|
+
...props,
|
|
83
|
+
className: cn("grid grid-cols-3 gap-2", className),
|
|
84
|
+
classNames: { year: (state) => cell({
|
|
85
|
+
shape: "period",
|
|
86
|
+
state
|
|
87
|
+
}) }
|
|
88
|
+
});
|
|
89
|
+
//#endregion
|
|
90
|
+
export { Days, Frame, Header, Heading, Months, Next, Previous, Provider, Root, Weekdays, YEAR_PAGE_SIZE, Years, useCalendar, useCalendarNavigation };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CalendarActions, CalendarContextValue, CalendarMeta, CalendarRange, CalendarState, CalendarView, Days, Frame, Header, Heading, Months, Next, Previous, RootProps, Weekday, Weekdays, Years, useCalendar } from "./calendar-parts.js";
|
|
2
|
+
//#region src/calendar.d.ts
|
|
3
|
+
declare const Calendar: {
|
|
4
|
+
Provider: any;
|
|
5
|
+
Root: any;
|
|
6
|
+
Frame: typeof Frame;
|
|
7
|
+
Header: typeof Header;
|
|
8
|
+
Heading: typeof Heading;
|
|
9
|
+
Previous: typeof Previous;
|
|
10
|
+
Next: typeof Next;
|
|
11
|
+
Weekdays: typeof Weekdays;
|
|
12
|
+
Days: typeof Days;
|
|
13
|
+
Months: typeof Months;
|
|
14
|
+
Years: typeof Years;
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Calendar, type CalendarActions, type CalendarContextValue, type CalendarMeta, type RootProps as CalendarProps, type CalendarRange, type CalendarState, type CalendarView, type Weekday, useCalendar };
|
package/dist/calendar.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Days, Frame, Header, Heading, Months, Next, Previous, Provider, Root, Weekdays, Years, useCalendar } from "./calendar-parts.js";
|
|
2
|
+
//#region src/calendar.tsx
|
|
3
|
+
const Calendar = {
|
|
4
|
+
Provider,
|
|
5
|
+
Root,
|
|
6
|
+
Frame,
|
|
7
|
+
Header,
|
|
8
|
+
Heading,
|
|
9
|
+
Previous,
|
|
10
|
+
Next,
|
|
11
|
+
Weekdays,
|
|
12
|
+
Days,
|
|
13
|
+
Months,
|
|
14
|
+
Years
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Calendar, useCalendar };
|
package/dist/card.d.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { VariantProps } from "./lib/tv.js";
|
|
2
|
+
import { ComponentPropsWithRef } from "react";
|
|
3
|
+
//#region src/card.d.ts
|
|
4
|
+
declare const cardRoot: import("tailwind-variants").TVReturnType<{
|
|
5
|
+
tone: {
|
|
6
|
+
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";
|
|
7
|
+
readonly coral: string;
|
|
8
|
+
readonly yellow: string;
|
|
9
|
+
readonly indigo: string;
|
|
10
|
+
readonly mint: string;
|
|
11
|
+
readonly sky: string;
|
|
12
|
+
};
|
|
13
|
+
}, undefined, "rounded-bloom flex flex-col gap-3 p-6", {
|
|
14
|
+
tone: {
|
|
15
|
+
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";
|
|
16
|
+
readonly coral: string;
|
|
17
|
+
readonly yellow: string;
|
|
18
|
+
readonly indigo: string;
|
|
19
|
+
readonly mint: string;
|
|
20
|
+
readonly sky: string;
|
|
21
|
+
};
|
|
22
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
23
|
+
tone: {
|
|
24
|
+
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";
|
|
25
|
+
readonly coral: string;
|
|
26
|
+
readonly yellow: string;
|
|
27
|
+
readonly indigo: string;
|
|
28
|
+
readonly mint: string;
|
|
29
|
+
readonly sky: string;
|
|
30
|
+
};
|
|
31
|
+
}, undefined>>;
|
|
32
|
+
type RootProps = ComponentPropsWithRef<'div'> & VariantProps<typeof cardRoot>;
|
|
33
|
+
declare const Root: ({ tone, className, ...props }: RootProps) => import("react").JSX.Element;
|
|
34
|
+
declare const Header: ({ className, ...props }: ComponentPropsWithRef<'div'>) => import("react").JSX.Element;
|
|
35
|
+
declare const Title: ({ className, ...props }: ComponentPropsWithRef<'h3'>) => import("react").JSX.Element;
|
|
36
|
+
declare const Description: ({ className, ...props }: ComponentPropsWithRef<'p'>) => import("react").JSX.Element;
|
|
37
|
+
declare const Content: ({ className, ...props }: ComponentPropsWithRef<'div'>) => import("react").JSX.Element;
|
|
38
|
+
declare const Footer: ({ className, ...props }: ComponentPropsWithRef<'footer'>) => import("react").JSX.Element;
|
|
39
|
+
declare const Icon: ({ className, ...props }: ComponentPropsWithRef<'span'>) => import("react").JSX.Element;
|
|
40
|
+
declare const Card: {
|
|
41
|
+
Root: typeof Root;
|
|
42
|
+
Icon: typeof Icon;
|
|
43
|
+
Header: typeof Header;
|
|
44
|
+
Title: typeof Title;
|
|
45
|
+
Description: typeof Description;
|
|
46
|
+
Content: typeof Content;
|
|
47
|
+
Footer: typeof Footer;
|
|
48
|
+
};
|
|
49
|
+
type CardProps = RootProps;
|
|
50
|
+
//#endregion
|
|
51
|
+
export { Card, type CardProps };
|
package/dist/card.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { tv } from "./lib/tv.js";
|
|
2
|
+
import { displayTitle, mutedText } from "./lib/text-styles.js";
|
|
3
|
+
import { surfaceTones } from "./lib/tones.js";
|
|
4
|
+
import { iconTile } from "./lib/icon-tile.js";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { Card as Card$1 } from "@journ/nude/card";
|
|
7
|
+
//#region src/card.tsx
|
|
8
|
+
const cardRoot = tv({
|
|
9
|
+
base: "rounded-bloom flex flex-col gap-3 p-6",
|
|
10
|
+
variants: { tone: surfaceTones },
|
|
11
|
+
defaultVariants: { tone: "surface" }
|
|
12
|
+
});
|
|
13
|
+
const cardHeader = tv({ base: "flex items-start justify-between gap-4" });
|
|
14
|
+
const cardTitle = tv({ base: displayTitle });
|
|
15
|
+
const cardDescription = tv({ base: mutedText });
|
|
16
|
+
const cardContent = tv({ base: "flex flex-col gap-2" });
|
|
17
|
+
const cardFooter = tv({ base: "flex flex-wrap items-center gap-2" });
|
|
18
|
+
const Root = ({ tone, className, ...props }) => /* @__PURE__ */ jsx(Card$1.Root, {
|
|
19
|
+
...props,
|
|
20
|
+
className: cardRoot({
|
|
21
|
+
tone,
|
|
22
|
+
class: className
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
|
+
const Header = ({ className, ...props }) => /* @__PURE__ */ jsx(Card$1.Header, {
|
|
26
|
+
...props,
|
|
27
|
+
className: cardHeader({ class: className })
|
|
28
|
+
});
|
|
29
|
+
const Title = ({ className, ...props }) => /* @__PURE__ */ jsx(Card$1.Title, {
|
|
30
|
+
...props,
|
|
31
|
+
className: cardTitle({ class: className })
|
|
32
|
+
});
|
|
33
|
+
const Description = ({ className, ...props }) => /* @__PURE__ */ jsx(Card$1.Description, {
|
|
34
|
+
...props,
|
|
35
|
+
className: cardDescription({ class: className })
|
|
36
|
+
});
|
|
37
|
+
const Content = ({ className, ...props }) => /* @__PURE__ */ jsx(Card$1.Content, {
|
|
38
|
+
...props,
|
|
39
|
+
className: cardContent({ class: className })
|
|
40
|
+
});
|
|
41
|
+
const Footer = ({ className, ...props }) => /* @__PURE__ */ jsx(Card$1.Footer, {
|
|
42
|
+
...props,
|
|
43
|
+
className: cardFooter({ class: className })
|
|
44
|
+
});
|
|
45
|
+
const Icon = ({ className, ...props }) => /* @__PURE__ */ jsx(Card$1.Icon, {
|
|
46
|
+
...props,
|
|
47
|
+
className: iconTile({
|
|
48
|
+
size: "md",
|
|
49
|
+
tone: "outline",
|
|
50
|
+
class: className
|
|
51
|
+
})
|
|
52
|
+
});
|
|
53
|
+
const Card = {
|
|
54
|
+
Root,
|
|
55
|
+
Icon,
|
|
56
|
+
Header,
|
|
57
|
+
Title,
|
|
58
|
+
Description,
|
|
59
|
+
Content,
|
|
60
|
+
Footer
|
|
61
|
+
};
|
|
62
|
+
//#endregion
|
|
63
|
+
export { Card };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IconButtonProps } from "./icon-button.js";
|
|
2
|
+
import { ComponentPropsWithRef } from "react";
|
|
3
|
+
import * as Nude from "@journ/nude/carousel-parts";
|
|
4
|
+
//#region src/carousel-parts.d.ts
|
|
5
|
+
declare const useCarousel: any;
|
|
6
|
+
type RootProps = Nude.RootProps;
|
|
7
|
+
declare const Root: ({ className, ...props }: RootProps) => import("react").JSX.Element;
|
|
8
|
+
declare const Content: ({ className, ...props }: ComponentPropsWithRef<'div'>) => import("react").JSX.Element;
|
|
9
|
+
declare const Item: ({ className, ...props }: ComponentPropsWithRef<'div'>) => import("react").JSX.Element;
|
|
10
|
+
declare const Previous: ({ tone, size, className, children, ...props }: IconButtonProps) => import("react").JSX.Element;
|
|
11
|
+
declare const Next: ({ tone, size, className, children, ...props }: IconButtonProps) => import("react").JSX.Element;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Content, Item, Next, Previous, Root, type RootProps, useCarousel };
|