@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
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "./lib/cn.js";
|
|
3
|
+
import { stepButton } from "./step-button.js";
|
|
4
|
+
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import * as Nude from "@journ/nude/carousel-parts";
|
|
7
|
+
//#region src/carousel-parts.tsx
|
|
8
|
+
const { useCarousel } = Nude;
|
|
9
|
+
const Root = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Root, {
|
|
10
|
+
...props,
|
|
11
|
+
className: cn("relative", className)
|
|
12
|
+
});
|
|
13
|
+
const Content = ({ className, ...props }) => {
|
|
14
|
+
const { orientation } = useCarousel();
|
|
15
|
+
return /* @__PURE__ */ jsx(Nude.Content, {
|
|
16
|
+
...props,
|
|
17
|
+
classNames: { viewport: "overflow-hidden" },
|
|
18
|
+
className: cn("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className)
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
const Item = ({ className, ...props }) => {
|
|
22
|
+
const { orientation } = useCarousel();
|
|
23
|
+
return /* @__PURE__ */ jsx(Nude.Item, {
|
|
24
|
+
...props,
|
|
25
|
+
className: cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "pl-4" : "pt-4", className)
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
const Previous = ({ tone, size, className, children, ...props }) => {
|
|
29
|
+
const { orientation } = useCarousel();
|
|
30
|
+
return /* @__PURE__ */ jsx(Nude.Previous, {
|
|
31
|
+
...props,
|
|
32
|
+
...stepButton(ChevronLeft, {
|
|
33
|
+
tone: tone ?? "outline",
|
|
34
|
+
size,
|
|
35
|
+
className: cn("rounded-full", orientation === "vertical" && "rotate-90", className),
|
|
36
|
+
children
|
|
37
|
+
})
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
const Next = ({ tone, size, className, children, ...props }) => {
|
|
41
|
+
const { orientation } = useCarousel();
|
|
42
|
+
return /* @__PURE__ */ jsx(Nude.Next, {
|
|
43
|
+
...props,
|
|
44
|
+
...stepButton(ChevronRight, {
|
|
45
|
+
tone: tone ?? "outline",
|
|
46
|
+
size,
|
|
47
|
+
className: cn("rounded-full", orientation === "vertical" && "rotate-90", className),
|
|
48
|
+
children
|
|
49
|
+
})
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
//#endregion
|
|
53
|
+
export { Content, Item, Next, Previous, Root, useCarousel };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Content, Item, Next, Previous, Root, RootProps, useCarousel } from "./carousel-parts.js";
|
|
2
|
+
//#region src/carousel.d.ts
|
|
3
|
+
declare const Carousel: {
|
|
4
|
+
Root: typeof Root;
|
|
5
|
+
Content: typeof Content;
|
|
6
|
+
Item: typeof Item;
|
|
7
|
+
Previous: typeof Previous;
|
|
8
|
+
Next: typeof Next;
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Carousel, type RootProps as CarouselProps, useCarousel };
|
package/dist/carousel.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from "react";
|
|
2
|
+
import * as Nude from "@journ/nude/checkbox-parts";
|
|
3
|
+
//#region src/checkbox-parts.d.ts
|
|
4
|
+
declare const Root: ({ className, children, ...props }: ComponentPropsWithRef<typeof Nude.Root>) => import("react").JSX.Element;
|
|
5
|
+
/** Shows a check, or a minus when the root is indeterminate. Pass children to use your own icon. */
|
|
6
|
+
declare const Indicator: ({ className, children, ...props }: ComponentPropsWithRef<typeof Nude.Indicator>) => import("react").JSX.Element;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { Indicator, Root };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "./lib/cn.js";
|
|
3
|
+
import { pressReset } from "./lib/interactive.js";
|
|
4
|
+
import { TouchTarget } from "./touch-target.js";
|
|
5
|
+
import { Check, Minus } from "lucide-react";
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import * as Nude from "@journ/nude/checkbox-parts";
|
|
8
|
+
//#region src/checkbox-parts.tsx
|
|
9
|
+
const Root = ({ className, children, ...props }) => /* @__PURE__ */ jsxs(Nude.Root, {
|
|
10
|
+
...props,
|
|
11
|
+
className: cn(pressReset, "group relative grid size-4 shrink-0 cursor-default place-items-center border border-current/30 outline-none transition-colors", "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-bloom-sky", "data-[state=checked]:bg-current/10", "data-[state=indeterminate]:bg-current/10", "disabled:pointer-events-none disabled:opacity-50", className),
|
|
12
|
+
children: [/* @__PURE__ */ jsx(TouchTarget, {}), children]
|
|
13
|
+
});
|
|
14
|
+
/** Shows a check, or a minus when the root is indeterminate. Pass children to use your own icon. */
|
|
15
|
+
const Indicator = ({ className, children, ...props }) => /* @__PURE__ */ jsx(Nude.Indicator, {
|
|
16
|
+
...props,
|
|
17
|
+
className: cn("grid place-items-center [&>svg]:size-3", className),
|
|
18
|
+
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Check, { className: "group-data-[state=indeterminate]:hidden" }), /* @__PURE__ */ jsx(Minus, { className: "hidden group-data-[state=indeterminate]:block" })] })
|
|
19
|
+
});
|
|
20
|
+
//#endregion
|
|
21
|
+
export { Indicator, Root };
|
package/dist/checkbox.js
ADDED
package/dist/chip.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { VariantProps } from "./lib/tv.js";
|
|
2
|
+
import { ComponentPropsWithRef } from "react";
|
|
3
|
+
//#region src/chip.d.ts
|
|
4
|
+
declare const chipRoot: import("tailwind-variants").TVReturnType<{
|
|
5
|
+
tone: {
|
|
6
|
+
light: "border border-current/15";
|
|
7
|
+
ink: "bg-bloom-ink text-bloom-paper";
|
|
8
|
+
dim: "bg-bloom-foreground/8 dark:bg-bloom-foreground-dark/8 text-current/60";
|
|
9
|
+
sky: "bg-bloom-sky/15 text-bloom-foreground dark:text-bloom-sky";
|
|
10
|
+
};
|
|
11
|
+
}, undefined, "inline-flex items-center gap-1.5 px-2 py-0.5 text-xs/5", {
|
|
12
|
+
tone: {
|
|
13
|
+
light: "border border-current/15";
|
|
14
|
+
ink: "bg-bloom-ink text-bloom-paper";
|
|
15
|
+
dim: "bg-bloom-foreground/8 dark:bg-bloom-foreground-dark/8 text-current/60";
|
|
16
|
+
sky: "bg-bloom-sky/15 text-bloom-foreground dark:text-bloom-sky";
|
|
17
|
+
};
|
|
18
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
19
|
+
tone: {
|
|
20
|
+
light: "border border-current/15";
|
|
21
|
+
ink: "bg-bloom-ink text-bloom-paper";
|
|
22
|
+
dim: "bg-bloom-foreground/8 dark:bg-bloom-foreground-dark/8 text-current/60";
|
|
23
|
+
sky: "bg-bloom-sky/15 text-bloom-foreground dark:text-bloom-sky";
|
|
24
|
+
};
|
|
25
|
+
}, undefined>>;
|
|
26
|
+
type RootProps = ComponentPropsWithRef<'span'> & VariantProps<typeof chipRoot>;
|
|
27
|
+
declare const Root: ({ tone, className, ...props }: RootProps) => import("react").JSX.Element;
|
|
28
|
+
declare const Dot: ({ className, ...props }: ComponentPropsWithRef<'span'>) => import("react").JSX.Element;
|
|
29
|
+
declare const Remove: ({ label, className, ...props }: ComponentPropsWithRef<'button'> & {
|
|
30
|
+
label: string;
|
|
31
|
+
}) => import("react").JSX.Element;
|
|
32
|
+
type TagProps = ComponentPropsWithRef<typeof Root> & {
|
|
33
|
+
/** Shows a remove button when given. Leave it out for a chip that cannot be dismissed. */
|
|
34
|
+
onRemove?: () => void;
|
|
35
|
+
removeLabel?: string;
|
|
36
|
+
};
|
|
37
|
+
declare const Tag: ({ onRemove, removeLabel, tone, className, children, ...props }: TagProps) => import("react").JSX.Element;
|
|
38
|
+
declare const Chip: {
|
|
39
|
+
Root: typeof Root;
|
|
40
|
+
Dot: typeof Dot;
|
|
41
|
+
Remove: typeof Remove;
|
|
42
|
+
Tag: typeof Tag;
|
|
43
|
+
};
|
|
44
|
+
//#endregion
|
|
45
|
+
export { Chip, type RootProps as ChipProps };
|
package/dist/chip.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { tv } from "./lib/tv.js";
|
|
2
|
+
import { cn } from "./lib/cn.js";
|
|
3
|
+
import { dim } from "./lib/theme.js";
|
|
4
|
+
import { inkTone, labelTones } from "./lib/tones.js";
|
|
5
|
+
import { X } from "lucide-react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { Chip as Chip$1 } from "@journ/nude/chip";
|
|
8
|
+
//#region src/chip.tsx
|
|
9
|
+
const chipRoot = tv({
|
|
10
|
+
base: "inline-flex items-center gap-1.5 px-2 py-0.5 text-xs/5",
|
|
11
|
+
variants: { tone: {
|
|
12
|
+
light: "border border-current/15",
|
|
13
|
+
ink: inkTone,
|
|
14
|
+
dim: `${dim} text-current/60`,
|
|
15
|
+
sky: labelTones.sky
|
|
16
|
+
} },
|
|
17
|
+
defaultVariants: { tone: "light" }
|
|
18
|
+
});
|
|
19
|
+
const Root = ({ tone, className, ...props }) => /* @__PURE__ */ jsx(Chip$1.Root, {
|
|
20
|
+
...props,
|
|
21
|
+
className: chipRoot({
|
|
22
|
+
tone,
|
|
23
|
+
class: className
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
const Dot = ({ className, ...props }) => /* @__PURE__ */ jsx(Chip$1.Dot, {
|
|
27
|
+
"aria-hidden": true,
|
|
28
|
+
...props,
|
|
29
|
+
className: cn("size-2.5 rounded-full bg-current", className)
|
|
30
|
+
});
|
|
31
|
+
const Remove = ({ label, className, ...props }) => /* @__PURE__ */ jsx(Chip$1.Remove, {
|
|
32
|
+
type: "button",
|
|
33
|
+
label,
|
|
34
|
+
...props,
|
|
35
|
+
className: cn("grid size-5 cursor-default place-items-center outline-none hover:bg-current/15 focus-visible:outline-2 focus-visible:outline-bloom-sky [&>svg]:size-3", className),
|
|
36
|
+
children: /* @__PURE__ */ jsx(X, {})
|
|
37
|
+
});
|
|
38
|
+
const Tag = ({ onRemove, removeLabel = "Remove", tone = "dim", className, children, ...props }) => /* @__PURE__ */ jsxs(Root, {
|
|
39
|
+
"data-slot": "chip-tag",
|
|
40
|
+
tone,
|
|
41
|
+
...props,
|
|
42
|
+
className: cn(onRemove && "gap-1 py-1 pr-1 pl-2.5", className),
|
|
43
|
+
children: [children, onRemove && /* @__PURE__ */ jsx(Remove, {
|
|
44
|
+
label: removeLabel,
|
|
45
|
+
onClick: onRemove
|
|
46
|
+
})]
|
|
47
|
+
});
|
|
48
|
+
const Chip = {
|
|
49
|
+
Root,
|
|
50
|
+
Dot,
|
|
51
|
+
Remove,
|
|
52
|
+
Tag
|
|
53
|
+
};
|
|
54
|
+
//#endregion
|
|
55
|
+
export { Chip };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from "react";
|
|
2
|
+
import * as Nude from "@journ/nude/collapsible-parts";
|
|
3
|
+
//#region src/collapsible-parts.d.ts
|
|
4
|
+
declare const Root: any;
|
|
5
|
+
declare const Trigger: any;
|
|
6
|
+
declare const Content: ({ className, children, ...props }: ComponentPropsWithRef<typeof Nude.Content>) => import("react").JSX.Element;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { Content, Root, Trigger };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "./lib/cn.js";
|
|
3
|
+
import { useExpand } from "./lib/use-enter.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import * as Nude from "@journ/nude/collapsible-parts";
|
|
6
|
+
//#region src/collapsible-parts.tsx
|
|
7
|
+
const Root = Nude.Root;
|
|
8
|
+
const Trigger = Nude.Trigger;
|
|
9
|
+
const Content = ({ className, children, ...props }) => {
|
|
10
|
+
const element = useExpand();
|
|
11
|
+
return /* @__PURE__ */ jsx(Nude.Content, {
|
|
12
|
+
ref: element,
|
|
13
|
+
...props,
|
|
14
|
+
className: "overflow-hidden",
|
|
15
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
16
|
+
className: cn("py-2", className),
|
|
17
|
+
children
|
|
18
|
+
})
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { Content, Root, Trigger };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ButtonProps } from "./button.js";
|
|
2
|
+
import { ComponentPropsWithRef } from "react";
|
|
3
|
+
import * as Nude from "@journ/nude/combobox-parts";
|
|
4
|
+
import { ComboboxActions, ComboboxContextValue, ComboboxState, RootProps } from "@journ/nude/combobox-parts";
|
|
5
|
+
//#region src/combobox-parts.d.ts
|
|
6
|
+
declare const ContextProvider: any, Provider: any, Root: any, useCombobox: any;
|
|
7
|
+
declare const Trigger: ({ tone, className, children, ...props }: import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
8
|
+
tone?: ButtonProps['tone'];
|
|
9
|
+
}) => import("react").JSX.Element, Value: ({ className, ...props }: {
|
|
10
|
+
className?: string;
|
|
11
|
+
}) => import("react").JSX.Element;
|
|
12
|
+
declare const Frame: ({ className, ...props }: ComponentPropsWithRef<typeof Nude.Frame>) => import("react").JSX.Element;
|
|
13
|
+
declare const Input: ({ className, ...props }: ComponentPropsWithRef<typeof Nude.Input>) => import("react").JSX.Element;
|
|
14
|
+
declare const List: ({ className, ...props }: ComponentPropsWithRef<typeof Nude.List>) => import("react").JSX.Element;
|
|
15
|
+
declare const Empty: ({ className, ...props }: ComponentPropsWithRef<typeof Nude.Empty>) => import("react").JSX.Element;
|
|
16
|
+
declare const Group: ({ className, ...props }: ComponentPropsWithRef<typeof Nude.Group>) => import("react").JSX.Element;
|
|
17
|
+
declare const option: (className?: string) => string;
|
|
18
|
+
declare const Option: ({ className, ...props }: Nude.OptionProps) => import("react").JSX.Element;
|
|
19
|
+
declare const Item: ({ className, ...props }: Nude.ItemProps) => import("react").JSX.Element;
|
|
20
|
+
declare const ItemIndicator: ({ className, children, ...props }: ComponentPropsWithRef<'span'>) => import("react").JSX.Element;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { type ComboboxActions, type ComboboxContextValue, type ComboboxState, ContextProvider, Empty, Frame, Group, Input, Item, ItemIndicator, List, Option, Provider, Root, type RootProps, Trigger, Value, option, useCombobox };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "./lib/cn.js";
|
|
3
|
+
import { controlSize, mutedText } from "./lib/text-styles.js";
|
|
4
|
+
import { stylePicker } from "./lib/picker.js";
|
|
5
|
+
import { Check, Search } from "lucide-react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import * as Nude from "@journ/nude/combobox-parts";
|
|
8
|
+
//#region src/combobox-parts.tsx
|
|
9
|
+
const { ContextProvider, Provider, Root, useCombobox } = Nude;
|
|
10
|
+
const { Trigger, Value } = stylePicker(Nude);
|
|
11
|
+
const Frame = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Frame, {
|
|
12
|
+
...props,
|
|
13
|
+
className: cn("flex min-h-0 flex-col gap-3", className)
|
|
14
|
+
});
|
|
15
|
+
const Input = ({ className, ...props }) => /* @__PURE__ */ jsxs("div", {
|
|
16
|
+
"data-slot": "combobox-input",
|
|
17
|
+
className: "sm:focus-within:outline-bloom-sky flex items-center gap-2 border border-current/15 px-3 sm:focus-within:outline-2",
|
|
18
|
+
children: [/* @__PURE__ */ jsx(Search, {
|
|
19
|
+
"aria-hidden": true,
|
|
20
|
+
className: "size-4 shrink-0 opacity-70"
|
|
21
|
+
}), /* @__PURE__ */ jsx(Nude.Input, {
|
|
22
|
+
"data-slot": "combobox-input-field",
|
|
23
|
+
...props,
|
|
24
|
+
className: cn(controlSize, "min-w-0 flex-1 bg-transparent outline-none placeholder:text-current/40", className)
|
|
25
|
+
})]
|
|
26
|
+
});
|
|
27
|
+
const List = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.List, {
|
|
28
|
+
...props,
|
|
29
|
+
className: cn("scrollbar-bloom max-h-72 overflow-y-auto overscroll-contain", className)
|
|
30
|
+
});
|
|
31
|
+
const Empty = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Empty, {
|
|
32
|
+
...props,
|
|
33
|
+
className: cn("py-6 text-center", mutedText, className)
|
|
34
|
+
});
|
|
35
|
+
const Group = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Group, {
|
|
36
|
+
...props,
|
|
37
|
+
className: cn("**:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:pt-2 **:[[cmdk-group-heading]]:pb-1 **:[[cmdk-group-heading]]:font-mono **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:opacity-60", className)
|
|
38
|
+
});
|
|
39
|
+
const option = (className) => cn(controlSize, "relative isolate flex items-center gap-3 px-2 select-none [&>svg]:size-4 [&>svg]:shrink-0", "after:absolute after:inset-0 after:-z-10 after:rounded-[inherit] data-[selected=true]:after:bg-current/8", "data-[checked=true]:font-medium", "data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50", className);
|
|
40
|
+
const Option = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Option, {
|
|
41
|
+
...props,
|
|
42
|
+
className: option(className)
|
|
43
|
+
});
|
|
44
|
+
const Item = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Item, {
|
|
45
|
+
...props,
|
|
46
|
+
className: option(className)
|
|
47
|
+
});
|
|
48
|
+
const ItemIndicator = ({ className, children, ...props }) => /* @__PURE__ */ jsx(Nude.ItemIndicator, {
|
|
49
|
+
...props,
|
|
50
|
+
className: cn("ml-auto grid place-items-center [&>svg]:size-4", className),
|
|
51
|
+
children: children ?? /* @__PURE__ */ jsx(Check, {})
|
|
52
|
+
});
|
|
53
|
+
//#endregion
|
|
54
|
+
export { ContextProvider, Empty, Frame, Group, Input, Item, ItemIndicator, List, Option, Provider, Root, Trigger, Value, option, useCombobox };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ButtonProps } from "./button.js";
|
|
2
|
+
import { ComboboxActions, ComboboxContextValue, ComboboxState, Empty, Frame, Group, Input, Item, ItemIndicator, List, RootProps, useCombobox } from "./combobox-parts.js";
|
|
3
|
+
import { Content, Description, Title } from "./drawer-parts.js";
|
|
4
|
+
//#region src/combobox.d.ts
|
|
5
|
+
declare const Combobox: {
|
|
6
|
+
Provider: any;
|
|
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
|
+
Content: typeof Content;
|
|
15
|
+
Title: typeof Title;
|
|
16
|
+
Description: typeof Description;
|
|
17
|
+
Frame: typeof Frame;
|
|
18
|
+
Input: typeof Input;
|
|
19
|
+
List: typeof List;
|
|
20
|
+
Empty: typeof Empty;
|
|
21
|
+
Group: typeof Group;
|
|
22
|
+
Item: typeof Item;
|
|
23
|
+
ItemIndicator: typeof ItemIndicator;
|
|
24
|
+
};
|
|
25
|
+
//#endregion
|
|
26
|
+
export { Combobox, type ComboboxActions, type ComboboxContextValue, type RootProps as ComboboxProps, type ComboboxState, useCombobox };
|
package/dist/combobox.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Empty, Frame, Group, Input, Item, ItemIndicator, List, Provider, Root, Trigger, Value, useCombobox } from "./combobox-parts.js";
|
|
2
|
+
import { Content, Description, Title } from "./drawer-parts.js";
|
|
3
|
+
//#region src/combobox.tsx
|
|
4
|
+
const Combobox = {
|
|
5
|
+
Provider,
|
|
6
|
+
Root,
|
|
7
|
+
Trigger,
|
|
8
|
+
Value,
|
|
9
|
+
Content,
|
|
10
|
+
Title,
|
|
11
|
+
Description,
|
|
12
|
+
Frame,
|
|
13
|
+
Input,
|
|
14
|
+
List,
|
|
15
|
+
Empty,
|
|
16
|
+
Group,
|
|
17
|
+
Item,
|
|
18
|
+
ItemIndicator
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { Combobox, useCombobox };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Content as Content$1 } from "./dialog-parts.js";
|
|
2
|
+
import { ComponentPropsWithRef } from "react";
|
|
3
|
+
import * as Nude from "@journ/nude/command-palette-parts";
|
|
4
|
+
//#region src/command-palette-parts.d.ts
|
|
5
|
+
declare const Root: any, Trigger: any;
|
|
6
|
+
type RootProps = Nude.RootProps;
|
|
7
|
+
type ContentProps = ComponentPropsWithRef<typeof Content$1> & {
|
|
8
|
+
/** Read by screen readers only. */
|
|
9
|
+
title?: string;
|
|
10
|
+
};
|
|
11
|
+
declare const Content: ({ title, className, children, ...props }: ContentProps) => import("react").JSX.Element;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Content, Root, type RootProps, Trigger };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "./lib/cn.js";
|
|
3
|
+
import { displayTitle } from "./lib/text-styles.js";
|
|
4
|
+
import { Content as Content$1, Title } from "./dialog-parts.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import * as Nude from "@journ/nude/command-palette-parts";
|
|
7
|
+
//#region src/command-palette-parts.tsx
|
|
8
|
+
const { Root, Trigger } = Nude;
|
|
9
|
+
const Content = ({ title = "Command palette", className, children, ...props }) => /* @__PURE__ */ jsxs(Content$1, {
|
|
10
|
+
"aria-describedby": void 0,
|
|
11
|
+
...props,
|
|
12
|
+
className: cn("p-3", className),
|
|
13
|
+
children: [/* @__PURE__ */ jsx(Title, {
|
|
14
|
+
className: cn(displayTitle, "sr-only"),
|
|
15
|
+
children: title
|
|
16
|
+
}), children]
|
|
17
|
+
});
|
|
18
|
+
//#endregion
|
|
19
|
+
export { Content, Root, Trigger };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Empty, Frame, Group, Input, Item, ItemIndicator, List } from "./combobox-parts.js";
|
|
2
|
+
import { Content, RootProps } from "./command-palette-parts.js";
|
|
3
|
+
//#region src/command-palette.d.ts
|
|
4
|
+
declare const CommandPalette: {
|
|
5
|
+
Root: any;
|
|
6
|
+
Trigger: any;
|
|
7
|
+
Content: typeof Content;
|
|
8
|
+
Frame: typeof Frame;
|
|
9
|
+
Input: typeof Input;
|
|
10
|
+
List: typeof List;
|
|
11
|
+
Empty: typeof Empty;
|
|
12
|
+
Group: typeof Group;
|
|
13
|
+
Item: typeof Item;
|
|
14
|
+
ItemIndicator: typeof ItemIndicator;
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { CommandPalette, type RootProps as CommandPaletteProps };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Empty, Frame, Group, Input, Item, ItemIndicator, List } from "./combobox-parts.js";
|
|
2
|
+
import { Content, Root, Trigger } from "./command-palette-parts.js";
|
|
3
|
+
//#region src/command-palette.tsx
|
|
4
|
+
const CommandPalette = {
|
|
5
|
+
Root,
|
|
6
|
+
Trigger,
|
|
7
|
+
Content,
|
|
8
|
+
Frame,
|
|
9
|
+
Input,
|
|
10
|
+
List,
|
|
11
|
+
Empty,
|
|
12
|
+
Group,
|
|
13
|
+
Item,
|
|
14
|
+
ItemIndicator
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { CommandPalette };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from "react";
|
|
2
|
+
//#region src/composer.d.ts
|
|
3
|
+
declare const composerRoot: (className?: string) => string;
|
|
4
|
+
declare const composerInput: (className?: string) => string;
|
|
5
|
+
declare const Root: ({ className, ...props }: ComponentPropsWithRef<'div'>) => import("react").JSX.Element;
|
|
6
|
+
declare const Input: ({ className, ...props }: ComponentPropsWithRef<'input'>) => import("react").JSX.Element;
|
|
7
|
+
declare const Composer: {
|
|
8
|
+
Root: typeof Root;
|
|
9
|
+
Input: typeof Input;
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Composer, composerInput, composerRoot };
|
package/dist/composer.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { cn } from "./lib/cn.js";
|
|
2
|
+
import { fieldText } from "./lib/text-styles.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Composer as Composer$1 } from "@journ/nude/composer";
|
|
5
|
+
//#region src/composer.tsx
|
|
6
|
+
const composerRoot = (className) => cn("flex items-center gap-2 border border-current/15 p-1 has-disabled:opacity-50 sm:focus-within:outline-2 sm:focus-within:outline-bloom-sky", className);
|
|
7
|
+
const composerInput = (className) => cn(fieldText, "min-w-0 flex-1 bg-transparent px-3 py-1.5 text-base/6 outline-none aria-invalid:text-bloom-coral sm:text-sm/6", className);
|
|
8
|
+
const Root = ({ className, ...props }) => /* @__PURE__ */ jsx(Composer$1.Root, {
|
|
9
|
+
...props,
|
|
10
|
+
className: composerRoot(className)
|
|
11
|
+
});
|
|
12
|
+
const Input = ({ className, ...props }) => /* @__PURE__ */ jsx(Composer$1.Input, {
|
|
13
|
+
...props,
|
|
14
|
+
className: composerInput(className)
|
|
15
|
+
});
|
|
16
|
+
const Composer = {
|
|
17
|
+
Root,
|
|
18
|
+
Input
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { Composer, composerInput, composerRoot };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/context-menu-parts.d.ts
|
|
2
|
+
declare const Root: any;
|
|
3
|
+
declare const Trigger: any;
|
|
4
|
+
declare const Group: any;
|
|
5
|
+
declare const Content: ({ className, ...props }: import("react").ComponentPropsWithRef<any> & {
|
|
6
|
+
className?: string;
|
|
7
|
+
}) => import("react").JSX.Element, Item: ({ className, ...props }: import("react").ComponentPropsWithRef<any> & {
|
|
8
|
+
className?: string;
|
|
9
|
+
}) => import("react").JSX.Element, Label: ({ className, ...props }: import("react").ComponentPropsWithRef<any> & {
|
|
10
|
+
className?: string;
|
|
11
|
+
}) => import("react").JSX.Element, Separator: ({ className, ...props }: import("react").ComponentPropsWithRef<any> & {
|
|
12
|
+
className?: string;
|
|
13
|
+
}) => import("react").JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { Content, Group, Item, Label, Root, Separator, Trigger };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { styleMenuParts } from "./lib/menu-parts.js";
|
|
3
|
+
import * as Nude from "@journ/nude/context-menu-parts";
|
|
4
|
+
//#region src/context-menu-parts.tsx
|
|
5
|
+
const Root = Nude.Root;
|
|
6
|
+
const Trigger = Nude.Trigger;
|
|
7
|
+
const Group = Nude.Group;
|
|
8
|
+
const { Content, Item, Label, Separator } = styleMenuParts(Nude);
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Content, Group, Item, Label, Root, Separator, Trigger };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region src/context-menu.d.ts
|
|
2
|
+
declare const ContextMenu: {
|
|
3
|
+
Root: any;
|
|
4
|
+
Trigger: any;
|
|
5
|
+
Content: ({ className, ...props }: import("react").ComponentPropsWithRef<any> & {
|
|
6
|
+
className?: string;
|
|
7
|
+
}) => import("react").JSX.Element;
|
|
8
|
+
Group: any;
|
|
9
|
+
Label: ({ className, ...props }: import("react").ComponentPropsWithRef<any> & {
|
|
10
|
+
className?: string;
|
|
11
|
+
}) => import("react").JSX.Element;
|
|
12
|
+
Item: ({ className, ...props }: import("react").ComponentPropsWithRef<any> & {
|
|
13
|
+
className?: string;
|
|
14
|
+
}) => import("react").JSX.Element;
|
|
15
|
+
Separator: ({ className, ...props }: import("react").ComponentPropsWithRef<any> & {
|
|
16
|
+
className?: string;
|
|
17
|
+
}) => import("react").JSX.Element;
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { ContextMenu };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Content, Group, Item, Label, Root, Separator, Trigger } from "./context-menu-parts.js";
|
|
2
|
+
//#region src/context-menu.tsx
|
|
3
|
+
const ContextMenu = {
|
|
4
|
+
Root,
|
|
5
|
+
Trigger,
|
|
6
|
+
Content,
|
|
7
|
+
Group,
|
|
8
|
+
Label,
|
|
9
|
+
Item,
|
|
10
|
+
Separator
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { ContextMenu };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from "react";
|
|
2
|
+
import * as Nude from "@journ/nude/currency-input-parts";
|
|
3
|
+
import { RootProps } from "@journ/nude/currency-input-parts";
|
|
4
|
+
//#region src/currency-input-parts.d.ts
|
|
5
|
+
declare const Root: any;
|
|
6
|
+
declare const Field: ({ className, ...props }: ComponentPropsWithRef<typeof Nude.Field>) => import("react").JSX.Element;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { Field, Root, type RootProps };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "./lib/cn.js";
|
|
3
|
+
import { input } from "./input.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import * as Nude from "@journ/nude/currency-input-parts";
|
|
6
|
+
//#region src/currency-input-parts.tsx
|
|
7
|
+
const Root = Nude.Root;
|
|
8
|
+
const Field = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Field, {
|
|
9
|
+
...props,
|
|
10
|
+
className: input(cn("tabular-nums", className))
|
|
11
|
+
});
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Field, Root };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from "react";
|
|
2
|
+
import * as Nude from "@journ/nude/data-table-parts";
|
|
3
|
+
import { DataTableColumn, RowData, TableViewProps } from "@journ/nude/data-table-parts";
|
|
4
|
+
//#region src/data-table-parts.d.ts
|
|
5
|
+
declare const dataTableColumns: any, selectColumn: any, useDataTable: any, ColumnPicker: any, View: any, Pager: any, SelectionBar: any;
|
|
6
|
+
type RootProps<TData extends RowData> = Omit<Nude.RootProps<TData>, 'components' | 'classNames' | 'icons'>;
|
|
7
|
+
declare const Root: <TData extends RowData>(props: RootProps<TData>) => import("react").JSX.Element;
|
|
8
|
+
declare const Toolbar: ({ className, ...props }: ComponentPropsWithRef<'div'>) => import("react").JSX.Element;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { ColumnPicker, type DataTableColumn, Pager, Root, type RootProps, SelectionBar, type TableViewProps, Toolbar, View, dataTableColumns, selectColumn, useDataTable };
|