@journ/nude 0.1.0
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/LICENSE +21 -0
- package/README.md +59 -0
- package/dist/accordion-parts.d.ts +15 -0
- package/dist/accordion-parts.js +19 -0
- package/dist/accordion.d.ts +10 -0
- package/dist/accordion.js +10 -0
- package/dist/alert-dialog-parts.d.ts +13 -0
- package/dist/alert-dialog-parts.js +15 -0
- package/dist/alert-dialog.d.ts +14 -0
- package/dist/alert-dialog.js +15 -0
- package/dist/alert.d.ts +11 -0
- package/dist/alert.js +12 -0
- package/dist/animated-size.d.ts +18 -0
- package/dist/animated-size.js +55 -0
- package/dist/avatar-parts.d.ts +10 -0
- package/dist/avatar-parts.js +14 -0
- package/dist/avatar.d.ts +9 -0
- package/dist/avatar.js +9 -0
- package/dist/badge.d.ts +4 -0
- package/dist/badge.js +5 -0
- package/dist/breadcrumbs.d.ts +11 -0
- package/dist/breadcrumbs.js +15 -0
- package/dist/bulk-bar.d.ts +8 -0
- package/dist/bulk-bar.js +9 -0
- package/dist/button.d.ts +13 -0
- package/dist/button.js +21 -0
- package/dist/calendar-parts.d.ts +81 -0
- package/dist/calendar-parts.js +213 -0
- package/dist/calendar.d.ts +17 -0
- package/dist/calendar.js +17 -0
- package/dist/card.d.ts +12 -0
- package/dist/card.js +13 -0
- package/dist/carousel-parts.d.ts +29 -0
- package/dist/carousel-parts.js +98 -0
- package/dist/carousel.d.ts +11 -0
- package/dist/carousel.js +11 -0
- package/dist/checkbox-parts.d.ts +7 -0
- package/dist/checkbox-parts.js +9 -0
- package/dist/checkbox.d.ts +7 -0
- package/dist/checkbox.js +8 -0
- package/dist/chip.d.ts +22 -0
- package/dist/chip.js +29 -0
- package/dist/collapsible-parts.d.ts +7 -0
- package/dist/collapsible-parts.js +9 -0
- package/dist/collapsible.d.ts +8 -0
- package/dist/collapsible.js +9 -0
- package/dist/combobox-parts.d.ts +85 -0
- package/dist/combobox-parts.js +61 -0
- package/dist/combobox.d.ts +84 -0
- package/dist/combobox.js +21 -0
- package/dist/command-palette-parts.d.ts +22 -0
- package/dist/command-palette-parts.js +56 -0
- package/dist/command-palette.d.ts +64 -0
- package/dist/command-palette.js +18 -0
- package/dist/composer.d.ts +7 -0
- package/dist/composer.js +8 -0
- package/dist/context-menu-parts.d.ts +8 -0
- package/dist/context-menu-parts.js +10 -0
- package/dist/context-menu.d.ts +12 -0
- package/dist/context-menu.js +13 -0
- package/dist/currency-input-parts.d.ts +22 -0
- package/dist/currency-input-parts.js +57 -0
- package/dist/currency-input.d.ts +8 -0
- package/dist/currency-input.js +8 -0
- package/dist/data-table-parts.d.ts +101 -0
- package/dist/data-table-parts.js +220 -0
- package/dist/data-table.d.ts +12 -0
- package/dist/data-table.js +12 -0
- package/dist/date-input-parts.d.ts +15 -0
- package/dist/date-input-parts.js +54 -0
- package/dist/date-input.d.ts +8 -0
- package/dist/date-input.js +8 -0
- package/dist/date-picker-parts.d.ts +29 -0
- package/dist/date-picker-parts.js +33 -0
- package/dist/date-picker.d.ts +29 -0
- package/dist/date-picker.js +15 -0
- package/dist/date-range-picker-parts.d.ts +37 -0
- package/dist/date-range-picker-parts.js +63 -0
- package/dist/date-range-picker.d.ts +29 -0
- package/dist/date-range-picker.js +15 -0
- package/dist/description-list.d.ts +8 -0
- package/dist/description-list.js +9 -0
- package/dist/dialog-parts.d.ts +12 -0
- package/dist/dialog-parts.js +14 -0
- package/dist/dialog.d.ts +14 -0
- package/dist/dialog.js +15 -0
- package/dist/divider.d.ts +5 -0
- package/dist/divider.js +9 -0
- package/dist/drawer-parts.d.ts +24 -0
- package/dist/drawer-parts.js +14 -0
- package/dist/drawer.d.ts +27 -0
- package/dist/drawer.js +15 -0
- package/dist/dropdown-menu-parts.d.ts +8 -0
- package/dist/dropdown-menu-parts.js +10 -0
- package/dist/dropdown-menu.d.ts +12 -0
- package/dist/dropdown-menu.js +13 -0
- package/dist/empty-state.d.ts +10 -0
- package/dist/empty-state.js +11 -0
- package/dist/field-parts.d.ts +15 -0
- package/dist/field-parts.js +63 -0
- package/dist/field.d.ts +11 -0
- package/dist/field.js +11 -0
- package/dist/file-dropzone-parts.d.ts +34 -0
- package/dist/file-dropzone-parts.js +108 -0
- package/dist/file-dropzone.d.ts +10 -0
- package/dist/file-dropzone.js +10 -0
- package/dist/heading.d.ts +9 -0
- package/dist/heading.js +12 -0
- package/dist/hover-card-parts.d.ts +8 -0
- package/dist/hover-card-parts.js +12 -0
- package/dist/hover-card.d.ts +9 -0
- package/dist/hover-card.js +9 -0
- package/dist/icon-button.d.ts +6 -0
- package/dist/icon-button.js +5 -0
- package/dist/icon.d.ts +7 -0
- package/dist/icon.js +12 -0
- package/dist/index.d.ts +94 -0
- package/dist/index.js +87 -0
- package/dist/input.d.ts +4 -0
- package/dist/input.js +5 -0
- package/dist/lib/commit-on.d.ts +15 -0
- package/dist/lib/commit-on.js +17 -0
- package/dist/lib/menu-parts.d.ts +21 -0
- package/dist/lib/menu-parts.js +23 -0
- package/dist/lib/modal-content.d.ts +17 -0
- package/dist/lib/modal-content.js +17 -0
- package/dist/lib/modal-parts.d.ts +6 -0
- package/dist/lib/modal-parts.js +7 -0
- package/dist/lib/part.d.ts +6 -0
- package/dist/lib/part.js +13 -0
- package/dist/lib/picker.d.ts +44 -0
- package/dist/lib/picker.js +75 -0
- package/dist/lib/visually-hidden.d.ts +6 -0
- package/dist/lib/visually-hidden.js +15 -0
- package/dist/link.d.ts +9 -0
- package/dist/link.js +12 -0
- package/dist/markdown.d.ts +10 -0
- package/dist/markdown.js +10 -0
- package/dist/message.d.ts +13 -0
- package/dist/message.js +15 -0
- package/dist/month-picker-parts.d.ts +19 -0
- package/dist/month-picker-parts.js +38 -0
- package/dist/month-picker.d.ts +15 -0
- package/dist/month-picker.js +15 -0
- package/dist/month-stepper-parts.d.ts +16 -0
- package/dist/month-stepper-parts.js +52 -0
- package/dist/month-stepper.d.ts +10 -0
- package/dist/month-stepper.js +10 -0
- package/dist/multiple-selector-parts.d.ts +39 -0
- package/dist/multiple-selector-parts.js +118 -0
- package/dist/multiple-selector.d.ts +76 -0
- package/dist/multiple-selector.js +23 -0
- package/dist/nav-bar.d.ts +7 -0
- package/dist/nav-bar.js +8 -0
- package/dist/navigation-menu-parts.d.ts +18 -0
- package/dist/navigation-menu-parts.js +25 -0
- package/dist/navigation-menu.d.ts +12 -0
- package/dist/navigation-menu.js +12 -0
- package/dist/otp-input-parts.d.ts +9 -0
- package/dist/otp-input-parts.js +11 -0
- package/dist/otp-input.d.ts +8 -0
- package/dist/otp-input.js +9 -0
- package/dist/page-header.d.ts +8 -0
- package/dist/page-header.js +9 -0
- package/dist/page.d.ts +8 -0
- package/dist/page.js +9 -0
- package/dist/pagination.d.ts +13 -0
- package/dist/pagination.js +24 -0
- package/dist/pill-select.d.ts +4 -0
- package/dist/pill-select.js +5 -0
- package/dist/popover-parts.d.ts +9 -0
- package/dist/popover-parts.js +13 -0
- package/dist/popover.d.ts +10 -0
- package/dist/popover.js +10 -0
- package/dist/portal.d.ts +15 -0
- package/dist/portal.js +20 -0
- package/dist/progress-parts.d.ts +11 -0
- package/dist/progress-parts.js +32 -0
- package/dist/progress.d.ts +8 -0
- package/dist/progress.js +8 -0
- package/dist/quantity-input-parts.d.ts +21 -0
- package/dist/quantity-input-parts.js +86 -0
- package/dist/quantity-input.d.ts +10 -0
- package/dist/quantity-input.js +10 -0
- package/dist/radio-parts.d.ts +13 -0
- package/dist/radio-parts.js +17 -0
- package/dist/radio.d.ts +8 -0
- package/dist/radio.js +8 -0
- package/dist/scroll-area-parts.d.ts +17 -0
- package/dist/scroll-area-parts.js +21 -0
- package/dist/scroll-area.d.ts +10 -0
- package/dist/scroll-area.js +10 -0
- package/dist/select-parts.d.ts +26 -0
- package/dist/select-parts.js +38 -0
- package/dist/select.d.ts +14 -0
- package/dist/select.js +14 -0
- package/dist/sheet-parts.d.ts +15 -0
- package/dist/sheet-parts.js +15 -0
- package/dist/sheet.d.ts +14 -0
- package/dist/sheet.js +16 -0
- package/dist/sidebar.d.ts +14 -0
- package/dist/sidebar.js +17 -0
- package/dist/skeleton.d.ts +4 -0
- package/dist/skeleton.js +5 -0
- package/dist/slider-parts.d.ts +9 -0
- package/dist/slider-parts.js +11 -0
- package/dist/slider.d.ts +9 -0
- package/dist/slider.js +10 -0
- package/dist/spinner.d.ts +6 -0
- package/dist/spinner.js +23 -0
- package/dist/stack-parts.d.ts +22 -0
- package/dist/stack-parts.js +125 -0
- package/dist/stack.d.ts +10 -0
- package/dist/stack.js +10 -0
- package/dist/stat.d.ts +9 -0
- package/dist/stat.js +10 -0
- package/dist/step-button.d.ts +11 -0
- package/dist/step-button.js +13 -0
- package/dist/stepper-parts.d.ts +19 -0
- package/dist/stepper-parts.js +44 -0
- package/dist/stepper.d.ts +11 -0
- package/dist/stepper.js +11 -0
- package/dist/switch-parts.d.ts +6 -0
- package/dist/switch-parts.js +8 -0
- package/dist/switch.d.ts +7 -0
- package/dist/switch.js +8 -0
- package/dist/table.d.ts +12 -0
- package/dist/table.js +13 -0
- package/dist/tabs-parts.d.ts +8 -0
- package/dist/tabs-parts.js +10 -0
- package/dist/tabs.d.ts +9 -0
- package/dist/tabs.js +10 -0
- package/dist/tag-input-parts.d.ts +30 -0
- package/dist/tag-input-parts.js +99 -0
- package/dist/tag-input.d.ts +10 -0
- package/dist/tag-input.js +10 -0
- package/dist/text-morph.d.ts +17 -0
- package/dist/text-morph.js +62 -0
- package/dist/text-shimmer.d.ts +9 -0
- package/dist/text-shimmer.js +8 -0
- package/dist/text.d.ts +4 -0
- package/dist/text.js +5 -0
- package/dist/textarea.d.ts +4 -0
- package/dist/textarea.js +5 -0
- package/dist/time-range-parts.d.ts +22 -0
- package/dist/time-range-parts.js +56 -0
- package/dist/time-range.d.ts +10 -0
- package/dist/time-range.js +10 -0
- package/dist/toast-parts.d.ts +12 -0
- package/dist/toast-parts.js +21 -0
- package/dist/toast.d.ts +13 -0
- package/dist/toast.js +12 -0
- package/dist/toggle-group-parts.d.ts +6 -0
- package/dist/toggle-group-parts.js +8 -0
- package/dist/toggle-group.d.ts +7 -0
- package/dist/toggle-group.js +8 -0
- package/dist/tooltip-parts.d.ts +10 -0
- package/dist/tooltip-parts.js +17 -0
- package/dist/tooltip.d.ts +10 -0
- package/dist/tooltip.js +10 -0
- package/dist/touch-target.d.ts +6 -0
- package/dist/touch-target.js +10 -0
- package/package.json +83 -0
package/dist/dialog.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ModalContentProps } from "./lib/modal-content.js";
|
|
2
|
+
//#region src/dialog.d.ts
|
|
3
|
+
declare const Dialog: {
|
|
4
|
+
Root: import("react").FC<import("@radix-ui/react-dialog").DialogProps>;
|
|
5
|
+
Trigger: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
Close: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
Content: ({ classNames, overlayRef, ...props }: ModalContentProps<typeof import("@radix-ui/react-dialog")>) => import("react").JSX.Element;
|
|
8
|
+
Title: (props: import("@radix-ui/react-dialog").DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>) => import("react").ReactNode;
|
|
9
|
+
Description: (props: import("@radix-ui/react-dialog").DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>) => import("react").ReactNode;
|
|
10
|
+
Body: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>) => import("react").ReactNode;
|
|
11
|
+
Actions: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>) => import("react").ReactNode;
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { Dialog };
|
package/dist/dialog.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Actions, Body } from "./lib/modal-parts.js";
|
|
2
|
+
import { Close, Content, Description, Root, Title, Trigger } from "./dialog-parts.js";
|
|
3
|
+
//#region src/dialog.tsx
|
|
4
|
+
const Dialog = {
|
|
5
|
+
Root,
|
|
6
|
+
Trigger,
|
|
7
|
+
Close,
|
|
8
|
+
Content,
|
|
9
|
+
Title,
|
|
10
|
+
Description,
|
|
11
|
+
Body,
|
|
12
|
+
Actions
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { Dialog };
|
package/dist/divider.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { part } from "./lib/part.js";
|
|
2
|
+
import * as Separator from "@radix-ui/react-separator";
|
|
3
|
+
//#region src/divider.tsx
|
|
4
|
+
const Divider = part(Separator.Root, "divider", {
|
|
5
|
+
orientation: "horizontal",
|
|
6
|
+
decorative: true
|
|
7
|
+
});
|
|
8
|
+
//#endregion
|
|
9
|
+
export { Divider };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ModalContentProps } from "./lib/modal-content.js";
|
|
2
|
+
import { Actions, Body } from "./lib/modal-parts.js";
|
|
3
|
+
//#region src/drawer-parts.d.ts
|
|
4
|
+
declare const Root: typeof import("vaul").Root;
|
|
5
|
+
declare const Trigger: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const Close: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const Content: ({ classNames, overlayRef, ...props }: ModalContentProps<{
|
|
8
|
+
Root: typeof import("vaul").Root;
|
|
9
|
+
NestedRoot: typeof import("vaul").NestedRoot;
|
|
10
|
+
Content: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
Overlay: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
Trigger: React.ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
Portal: typeof import("vaul").Portal;
|
|
14
|
+
Handle: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
15
|
+
preventCycle?: boolean | undefined;
|
|
16
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
Close: React.ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
18
|
+
Title: React.ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
19
|
+
Description: React.ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
20
|
+
}>) => import("react").JSX.Element;
|
|
21
|
+
declare const Title: (props: import("@radix-ui/react-dialog").DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>) => import("react").ReactNode;
|
|
22
|
+
declare const Description: (props: import("@radix-ui/react-dialog").DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>) => import("react").ReactNode;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { Actions, Body, Close, Content, Description, Root, Title, Trigger };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { part } from "./lib/part.js";
|
|
3
|
+
import { createModalContent } from "./lib/modal-content.js";
|
|
4
|
+
import { Actions, Body } from "./lib/modal-parts.js";
|
|
5
|
+
import { Drawer } from "vaul";
|
|
6
|
+
//#region src/drawer-parts.tsx
|
|
7
|
+
const Root = Drawer.Root;
|
|
8
|
+
const Trigger = Drawer.Trigger;
|
|
9
|
+
const Close = Drawer.Close;
|
|
10
|
+
const Content = createModalContent(Drawer, "drawer");
|
|
11
|
+
const Title = part(Drawer.Title, "drawer-title");
|
|
12
|
+
const Description = part(Drawer.Description, "drawer-description");
|
|
13
|
+
//#endregion
|
|
14
|
+
export { Actions, Body, Close, Content, Description, Root, Title, Trigger };
|
package/dist/drawer.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ModalContentProps } from "./lib/modal-content.js";
|
|
2
|
+
//#region src/drawer.d.ts
|
|
3
|
+
declare const Drawer: {
|
|
4
|
+
Root: typeof import("vaul").Root;
|
|
5
|
+
Trigger: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
Close: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
Content: ({ classNames, overlayRef, ...props }: ModalContentProps<{
|
|
8
|
+
Root: typeof import("vaul").Root;
|
|
9
|
+
NestedRoot: typeof import("vaul").NestedRoot;
|
|
10
|
+
Content: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
Overlay: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
Trigger: React.ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
Portal: typeof import("vaul").Portal;
|
|
14
|
+
Handle: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
15
|
+
preventCycle?: boolean | undefined;
|
|
16
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
Close: React.ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
18
|
+
Title: React.ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
19
|
+
Description: React.ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
20
|
+
}>) => import("react").JSX.Element;
|
|
21
|
+
Title: (props: import("@radix-ui/react-dialog").DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>) => import("react").ReactNode;
|
|
22
|
+
Description: (props: import("@radix-ui/react-dialog").DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>) => import("react").ReactNode;
|
|
23
|
+
Body: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>) => import("react").ReactNode;
|
|
24
|
+
Actions: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>) => import("react").ReactNode;
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { Drawer };
|
package/dist/drawer.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Actions, Body } from "./lib/modal-parts.js";
|
|
2
|
+
import { Close, Content, Description, Root, Title, Trigger } from "./drawer-parts.js";
|
|
3
|
+
//#region src/drawer.tsx
|
|
4
|
+
const Drawer = {
|
|
5
|
+
Root,
|
|
6
|
+
Trigger,
|
|
7
|
+
Close,
|
|
8
|
+
Content,
|
|
9
|
+
Title,
|
|
10
|
+
Description,
|
|
11
|
+
Body,
|
|
12
|
+
Actions
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { Drawer };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as RadixMenu from "@radix-ui/react-dropdown-menu";
|
|
2
|
+
//#region src/dropdown-menu-parts.d.ts
|
|
3
|
+
declare const Root: import("react").FC<RadixMenu.DropdownMenuProps>;
|
|
4
|
+
declare const Trigger: import("react").ForwardRefExoticComponent<RadixMenu.DropdownMenuTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const Group: import("react").ForwardRefExoticComponent<RadixMenu.DropdownMenuGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const Content: (props: RadixMenu.DropdownMenuContentProps & import("react").RefAttributes<HTMLDivElement>) => import("react").JSX.Element, Item: (props: RadixMenu.DropdownMenuItemProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactNode, Label: (props: RadixMenu.DropdownMenuLabelProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactNode, Separator: (props: RadixMenu.DropdownMenuSeparatorProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactNode;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { Content, Group, Item, Label, Root, Separator, Trigger };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createMenuParts } from "./lib/menu-parts.js";
|
|
3
|
+
import * as RadixMenu from "@radix-ui/react-dropdown-menu";
|
|
4
|
+
//#region src/dropdown-menu-parts.tsx
|
|
5
|
+
const Root = RadixMenu.Root;
|
|
6
|
+
const Trigger = RadixMenu.Trigger;
|
|
7
|
+
const Group = RadixMenu.Group;
|
|
8
|
+
const { Content, Item, Label, Separator } = createMenuParts(RadixMenu, "dropdown-menu");
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Content, Group, Item, Label, Root, Separator, Trigger };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/dropdown-menu.d.ts
|
|
2
|
+
declare const DropdownMenu: {
|
|
3
|
+
Root: import("react").FC<import("@radix-ui/react-dropdown-menu").DropdownMenuProps>;
|
|
4
|
+
Trigger: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dropdown-menu").DropdownMenuTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
Content: (props: import("@radix-ui/react-dropdown-menu").DropdownMenuContentProps & import("react").RefAttributes<HTMLDivElement>) => import("react").JSX.Element;
|
|
6
|
+
Group: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dropdown-menu").DropdownMenuGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
Label: (props: import("@radix-ui/react-dropdown-menu").DropdownMenuLabelProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactNode;
|
|
8
|
+
Item: (props: import("@radix-ui/react-dropdown-menu").DropdownMenuItemProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactNode;
|
|
9
|
+
Separator: (props: import("@radix-ui/react-dropdown-menu").DropdownMenuSeparatorProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactNode;
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { DropdownMenu };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Content, Group, Item, Label, Root, Separator, Trigger } from "./dropdown-menu-parts.js";
|
|
2
|
+
//#region src/dropdown-menu.tsx
|
|
3
|
+
const DropdownMenu = {
|
|
4
|
+
Root,
|
|
5
|
+
Trigger,
|
|
6
|
+
Content,
|
|
7
|
+
Group,
|
|
8
|
+
Label,
|
|
9
|
+
Item,
|
|
10
|
+
Separator
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { DropdownMenu };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/empty-state.d.ts
|
|
2
|
+
declare const EmptyState: {
|
|
3
|
+
Root: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>) => import("react").ReactNode;
|
|
4
|
+
Icon: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>) => import("react").ReactNode;
|
|
5
|
+
Title: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>) => import("react").ReactNode;
|
|
6
|
+
Description: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>) => import("react").ReactNode;
|
|
7
|
+
Actions: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>) => import("react").ReactNode;
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { EmptyState };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { part } from "./lib/part.js";
|
|
2
|
+
//#region src/empty-state.tsx
|
|
3
|
+
const EmptyState = {
|
|
4
|
+
Root: part("div", "empty-state"),
|
|
5
|
+
Icon: part("span", "empty-state-icon", { "aria-hidden": true }),
|
|
6
|
+
Title: part("h3", "empty-state-title"),
|
|
7
|
+
Description: part("p", "empty-state-description"),
|
|
8
|
+
Actions: part("div", "empty-state-actions")
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { EmptyState };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from "react";
|
|
2
|
+
import * as RadixLabel from "@radix-ui/react-label";
|
|
3
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
4
|
+
//#region src/field-parts.d.ts
|
|
5
|
+
type RootProps = ComponentPropsWithRef<'div'> & {
|
|
6
|
+
invalid?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const Root: ({ invalid, ...props }: RootProps) => import("react").JSX.Element;
|
|
9
|
+
declare const Label: (props: ComponentPropsWithRef<typeof RadixLabel.Root>) => import("react").JSX.Element;
|
|
10
|
+
declare const Description: (props: ComponentPropsWithRef<'p'>) => import("react").JSX.Element;
|
|
11
|
+
declare const FieldError: (props: ComponentPropsWithRef<'p'>) => import("react").JSX.Element | null;
|
|
12
|
+
/** Passes the id and aria wiring to its single child, which is usually the input. */
|
|
13
|
+
declare const Control: (props: ComponentPropsWithRef<typeof Slot>) => import("react").JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { Control, Description, FieldError as Error, type RootProps as FieldProps, Label, Root };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useId } from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { createRequiredContext } from "@journ/lift";
|
|
5
|
+
import * as RadixLabel from "@radix-ui/react-label";
|
|
6
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
7
|
+
//#region src/field-parts.tsx
|
|
8
|
+
const [FieldContext, useField] = createRequiredContext("Field.Root");
|
|
9
|
+
const Root = ({ invalid = false, ...props }) => {
|
|
10
|
+
const id = useId();
|
|
11
|
+
return /* @__PURE__ */ jsx(FieldContext, {
|
|
12
|
+
value: {
|
|
13
|
+
id,
|
|
14
|
+
descriptionId: `${id}-description`,
|
|
15
|
+
errorId: `${id}-error`,
|
|
16
|
+
invalid
|
|
17
|
+
},
|
|
18
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
19
|
+
"data-slot": "field",
|
|
20
|
+
"data-invalid": invalid || void 0,
|
|
21
|
+
...props
|
|
22
|
+
})
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
const Label = (props) => {
|
|
26
|
+
const { id } = useField();
|
|
27
|
+
return /* @__PURE__ */ jsx(RadixLabel.Root, {
|
|
28
|
+
"data-slot": "field-label",
|
|
29
|
+
htmlFor: id,
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
const Description = (props) => {
|
|
34
|
+
const { descriptionId } = useField();
|
|
35
|
+
return /* @__PURE__ */ jsx("p", {
|
|
36
|
+
"data-slot": "field-description",
|
|
37
|
+
id: descriptionId,
|
|
38
|
+
...props
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
const FieldError = (props) => {
|
|
42
|
+
const { errorId, invalid } = useField();
|
|
43
|
+
if (!invalid) return null;
|
|
44
|
+
return /* @__PURE__ */ jsx("p", {
|
|
45
|
+
"data-slot": "field-error",
|
|
46
|
+
id: errorId,
|
|
47
|
+
role: "alert",
|
|
48
|
+
...props
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
/** Passes the id and aria wiring to its single child, which is usually the input. */
|
|
52
|
+
const Control = (props) => {
|
|
53
|
+
const { id, descriptionId, errorId, invalid } = useField();
|
|
54
|
+
return /* @__PURE__ */ jsx(Slot, {
|
|
55
|
+
"data-slot": "field-control",
|
|
56
|
+
id,
|
|
57
|
+
"aria-describedby": invalid ? `${descriptionId} ${errorId}` : descriptionId,
|
|
58
|
+
"aria-invalid": invalid || void 0,
|
|
59
|
+
...props
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
//#endregion
|
|
63
|
+
export { Control, Description, FieldError as Error, Label, Root };
|
package/dist/field.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Control, Description, Error as FieldError, Label, Root } from "./field-parts.js";
|
|
2
|
+
//#region src/field.d.ts
|
|
3
|
+
declare const Field: {
|
|
4
|
+
Root: typeof Root;
|
|
5
|
+
Label: typeof Label;
|
|
6
|
+
Description: typeof Description;
|
|
7
|
+
Error: typeof FieldError;
|
|
8
|
+
Control: typeof Control;
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Field };
|
package/dist/field.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from "react";
|
|
2
|
+
//#region src/file-dropzone-parts.d.ts
|
|
3
|
+
type RejectionReason = 'type' | 'size' | 'count';
|
|
4
|
+
type FileRejection = {
|
|
5
|
+
file: File;
|
|
6
|
+
reason: RejectionReason;
|
|
7
|
+
};
|
|
8
|
+
declare const matchesAccept: (file: File, accept: string | undefined) => boolean;
|
|
9
|
+
/** Splits files into the ones that fit the rules and the ones that do not, with a reason each. */
|
|
10
|
+
declare const sortFiles: (files: File[], { accept, maxSize, multiple }: {
|
|
11
|
+
accept?: string;
|
|
12
|
+
maxSize?: number;
|
|
13
|
+
multiple: boolean;
|
|
14
|
+
}) => {
|
|
15
|
+
accepted: File[];
|
|
16
|
+
rejected: FileRejection[];
|
|
17
|
+
};
|
|
18
|
+
type RootProps = Omit<ComponentPropsWithRef<'div'>, 'onDrop' | 'onChange'> & {
|
|
19
|
+
/** Same syntax as the native input: `image/*,.pdf`. */
|
|
20
|
+
accept?: string;
|
|
21
|
+
/** Largest allowed file in bytes. */
|
|
22
|
+
maxSize?: number;
|
|
23
|
+
multiple?: boolean;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
onFilesAccepted?: (files: File[]) => void;
|
|
26
|
+
onFilesRejected?: (rejections: FileRejection[]) => void;
|
|
27
|
+
};
|
|
28
|
+
/** A drop target that is also a button: click or press Enter to open the file picker. */
|
|
29
|
+
declare const Root: ({ accept, maxSize, multiple, disabled, onFilesAccepted, onFilesRejected, children, ...props }: RootProps) => import("react").JSX.Element;
|
|
30
|
+
declare const Icon: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>) => import("react").ReactNode;
|
|
31
|
+
declare const Title: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>) => import("react").ReactNode;
|
|
32
|
+
declare const Description: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>) => import("react").ReactNode;
|
|
33
|
+
//#endregion
|
|
34
|
+
export { Description, type FileRejection, Icon, type RejectionReason, Root, type RootProps, Title, matchesAccept, sortFiles };
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { part } from "./lib/part.js";
|
|
3
|
+
import { useRef, useState } from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/file-dropzone-parts.tsx
|
|
6
|
+
const matchesAccept = (file, accept) => {
|
|
7
|
+
if (!accept) return true;
|
|
8
|
+
return accept.split(",").map((rule) => rule.trim().toLowerCase()).filter(Boolean).some((rule) => {
|
|
9
|
+
if (rule.startsWith(".")) return file.name.toLowerCase().endsWith(rule);
|
|
10
|
+
if (rule.endsWith("/*")) return file.type.toLowerCase().startsWith(rule.slice(0, -1));
|
|
11
|
+
return file.type.toLowerCase() === rule;
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
/** Splits files into the ones that fit the rules and the ones that do not, with a reason each. */
|
|
15
|
+
const sortFiles = (files, { accept, maxSize, multiple }) => {
|
|
16
|
+
const accepted = [];
|
|
17
|
+
const rejected = [];
|
|
18
|
+
for (const file of files) if (!matchesAccept(file, accept)) rejected.push({
|
|
19
|
+
file,
|
|
20
|
+
reason: "type"
|
|
21
|
+
});
|
|
22
|
+
else if (maxSize !== void 0 && file.size > maxSize) rejected.push({
|
|
23
|
+
file,
|
|
24
|
+
reason: "size"
|
|
25
|
+
});
|
|
26
|
+
else if (!multiple && accepted.length === 1) rejected.push({
|
|
27
|
+
file,
|
|
28
|
+
reason: "count"
|
|
29
|
+
});
|
|
30
|
+
else accepted.push(file);
|
|
31
|
+
return {
|
|
32
|
+
accepted,
|
|
33
|
+
rejected
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
/** A drop target that is also a button: click or press Enter to open the file picker. */
|
|
37
|
+
const Root = ({ accept, maxSize, multiple = true, disabled = false, onFilesAccepted, onFilesRejected, children, ...props }) => {
|
|
38
|
+
const input = useRef(null);
|
|
39
|
+
const depth = useRef(0);
|
|
40
|
+
const [dragging, setDragging] = useState(false);
|
|
41
|
+
const receive = (files) => {
|
|
42
|
+
if (disabled || files.length === 0) return;
|
|
43
|
+
const { accepted, rejected } = sortFiles(files, {
|
|
44
|
+
accept,
|
|
45
|
+
maxSize,
|
|
46
|
+
multiple
|
|
47
|
+
});
|
|
48
|
+
if (accepted.length > 0) onFilesAccepted?.(accepted);
|
|
49
|
+
if (rejected.length > 0) onFilesRejected?.(rejected);
|
|
50
|
+
};
|
|
51
|
+
const onDragEnter = (event) => {
|
|
52
|
+
event.preventDefault();
|
|
53
|
+
if (disabled) return;
|
|
54
|
+
depth.current += 1;
|
|
55
|
+
setDragging(true);
|
|
56
|
+
};
|
|
57
|
+
const onDragLeave = (event) => {
|
|
58
|
+
event.preventDefault();
|
|
59
|
+
depth.current = Math.max(0, depth.current - 1);
|
|
60
|
+
if (depth.current === 0) setDragging(false);
|
|
61
|
+
};
|
|
62
|
+
const onDrop = (event) => {
|
|
63
|
+
event.preventDefault();
|
|
64
|
+
depth.current = 0;
|
|
65
|
+
setDragging(false);
|
|
66
|
+
receive(Array.from(event.dataTransfer.files));
|
|
67
|
+
};
|
|
68
|
+
const onKeyDown = (event) => {
|
|
69
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
70
|
+
event.preventDefault();
|
|
71
|
+
input.current?.click();
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
75
|
+
"data-slot": "file-dropzone",
|
|
76
|
+
"data-dragging": dragging || void 0,
|
|
77
|
+
"data-disabled": disabled || void 0,
|
|
78
|
+
role: "button",
|
|
79
|
+
tabIndex: disabled ? -1 : 0,
|
|
80
|
+
"aria-disabled": disabled || void 0,
|
|
81
|
+
...props,
|
|
82
|
+
onClick: () => !disabled && input.current?.click(),
|
|
83
|
+
onKeyDown,
|
|
84
|
+
onDragEnter,
|
|
85
|
+
onDragOver: (event) => event.preventDefault(),
|
|
86
|
+
onDragLeave,
|
|
87
|
+
onDrop,
|
|
88
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
89
|
+
ref: input,
|
|
90
|
+
type: "file",
|
|
91
|
+
tabIndex: -1,
|
|
92
|
+
hidden: true,
|
|
93
|
+
accept,
|
|
94
|
+
multiple,
|
|
95
|
+
disabled,
|
|
96
|
+
onClick: (event) => event.stopPropagation(),
|
|
97
|
+
onChange: (event) => {
|
|
98
|
+
receive(Array.from(event.target.files ?? []));
|
|
99
|
+
event.target.value = "";
|
|
100
|
+
}
|
|
101
|
+
}), children]
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
const Icon = part("span", "file-dropzone-icon", { "aria-hidden": true });
|
|
105
|
+
const Title = part("p", "file-dropzone-title");
|
|
106
|
+
const Description = part("p", "file-dropzone-description");
|
|
107
|
+
//#endregion
|
|
108
|
+
export { Description, Icon, Root, Title, matchesAccept, sortFiles };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FileRejection, RejectionReason, Root } from "./file-dropzone-parts.js";
|
|
2
|
+
//#region src/file-dropzone.d.ts
|
|
3
|
+
declare const FileDropzone: {
|
|
4
|
+
Root: typeof Root;
|
|
5
|
+
Icon: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>) => import("react").ReactNode;
|
|
6
|
+
Title: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>) => import("react").ReactNode;
|
|
7
|
+
Description: (props: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>) => import("react").ReactNode;
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { FileDropzone, type FileRejection, type RejectionReason };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from "react";
|
|
2
|
+
//#region src/heading.d.ts
|
|
3
|
+
type HeadingProps = ComponentPropsWithRef<'h1'> & {
|
|
4
|
+
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
5
|
+
};
|
|
6
|
+
/** `level` sets the document outline. */
|
|
7
|
+
declare const Heading: ({ level, ...props }: HeadingProps) => import("react").JSX.Element;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { Heading, type HeadingProps };
|
package/dist/heading.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
//#region src/heading.tsx
|
|
3
|
+
/** `level` sets the document outline. */
|
|
4
|
+
const Heading = ({ level = 1, ...props }) => {
|
|
5
|
+
const Element = `h${level}`;
|
|
6
|
+
return /* @__PURE__ */ jsx(Element, {
|
|
7
|
+
"data-slot": "heading",
|
|
8
|
+
...props
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Heading };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from "react";
|
|
2
|
+
import * as RadixHoverCard from "@radix-ui/react-hover-card";
|
|
3
|
+
//#region src/hover-card-parts.d.ts
|
|
4
|
+
declare const Root: import("react").FC<RadixHoverCard.HoverCardProps>;
|
|
5
|
+
declare const Trigger: import("react").ForwardRefExoticComponent<RadixHoverCard.HoverCardTriggerProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
6
|
+
declare const Content: (props: ComponentPropsWithRef<typeof RadixHoverCard.Content>) => import("react").JSX.Element;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { Content, Root, Trigger };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as RadixHoverCard from "@radix-ui/react-hover-card";
|
|
4
|
+
//#region src/hover-card-parts.tsx
|
|
5
|
+
const Root = RadixHoverCard.Root;
|
|
6
|
+
const Trigger = RadixHoverCard.Trigger;
|
|
7
|
+
const Content = (props) => /* @__PURE__ */ jsx(RadixHoverCard.Portal, { children: /* @__PURE__ */ jsx(RadixHoverCard.Content, {
|
|
8
|
+
"data-slot": "hover-card-content",
|
|
9
|
+
...props
|
|
10
|
+
}) });
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Content, Root, Trigger };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Content } from "./hover-card-parts.js";
|
|
2
|
+
//#region src/hover-card.d.ts
|
|
3
|
+
declare const HoverCard: {
|
|
4
|
+
Root: import("react").FC<import("@radix-ui/react-hover-card").HoverCardProps>;
|
|
5
|
+
Trigger: import("react").ForwardRefExoticComponent<import("@radix-ui/react-hover-card").HoverCardTriggerProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
6
|
+
Content: typeof Content;
|
|
7
|
+
};
|
|
8
|
+
//#endregion
|
|
9
|
+
export { HoverCard };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from "react";
|
|
2
|
+
//#region src/icon-button.d.ts
|
|
3
|
+
type IconButtonProps = ComponentPropsWithRef<'button'>;
|
|
4
|
+
declare const IconButton: (props: import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>) => import("react").ReactNode;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { IconButton, type IconButtonProps };
|
package/dist/icon.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from "react";
|
|
2
|
+
//#region src/icon.d.ts
|
|
3
|
+
type IconProps = ComponentPropsWithRef<'span'>;
|
|
4
|
+
/** Wraps any svg child and hides it from assistive tech unless a label is given. */
|
|
5
|
+
declare const Icon: ({ 'aria-label': label, ...props }: IconProps) => import("react").JSX.Element;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { Icon, type IconProps };
|
package/dist/icon.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
//#region src/icon.tsx
|
|
3
|
+
/** Wraps any svg child and hides it from assistive tech unless a label is given. */
|
|
4
|
+
const Icon = ({ "aria-label": label, ...props }) => /* @__PURE__ */ jsx("span", {
|
|
5
|
+
"data-slot": "icon",
|
|
6
|
+
role: label ? "img" : void 0,
|
|
7
|
+
"aria-label": label,
|
|
8
|
+
"aria-hidden": label ? void 0 : true,
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Icon };
|