raft-ui 0.0.4 → 0.0.6
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/CHANGELOG.md +11 -0
- package/README.md +5 -1
- package/dist/button-CJqMhTPQ.mjs +621 -0
- package/dist/index-CpGciYPW.d.mts +267 -0
- package/dist/index.d.mts +90 -254
- package/dist/index.mjs +121 -628
- package/dist/wip.d.mts +133 -15
- package/dist/wip.mjs +289 -16
- package/package.json +5 -9
- package/src/components/alert-dialog/alert-dialog.tsx +215 -0
- package/src/components/alert-dialog/index.ts +30 -0
- package/src/components/avatar/avatar.tsx +3 -3
- package/src/components/avatar/index.ts +2 -2
- package/src/components/badge/badge.tsx +2 -2
- package/src/components/badge/index.ts +2 -2
- package/src/components/banner/banner.tsx +2 -2
- package/src/components/banner/index.ts +2 -2
- package/src/components/bottom-sheet/bottom-sheet.tsx +3 -3
- package/src/components/bottom-sheet/index.ts +2 -2
- package/src/components/button/button.tsx +7 -5
- package/src/components/button/index.ts +2 -2
- package/src/components/checkbox/checkbox-indicator.tsx +2 -2
- package/src/components/checkbox/checkbox.tsx +4 -4
- package/src/components/checkbox/index.ts +2 -2
- package/src/components/combobox/combobox.tsx +4 -4
- package/src/components/combobox/index.ts +1 -1
- package/src/components/context-menu/context-menu.tsx +4 -4
- package/src/components/context-menu/index.ts +2 -2
- package/src/components/conversation-preview-card/conversation-preview-card.tsx +2 -2
- package/src/components/conversation-preview-card/index.ts +2 -2
- package/src/components/description-list/description-list.tsx +2 -2
- package/src/components/description-list/index.ts +2 -2
- package/src/components/dialog/dialog.tsx +152 -0
- package/src/components/dialog/index.ts +26 -0
- package/src/components/dropdown-menu/dropdown-menu.tsx +7 -7
- package/src/components/dropdown-menu/index.ts +2 -2
- package/src/components/empty-state/empty-state.tsx +2 -2
- package/src/components/empty-state/index.ts +2 -2
- package/src/components/field/field.tsx +4 -4
- package/src/components/field/index.ts +2 -2
- package/src/components/inline-code/index.ts +2 -2
- package/src/components/inline-code/inline-code.tsx +9 -7
- package/src/components/input/index.ts +2 -2
- package/src/components/input/input.tsx +4 -4
- package/src/components/input-group/index.ts +2 -2
- package/src/components/input-group/input-group.tsx +5 -5
- package/src/components/kbd/index.ts +2 -2
- package/src/components/kbd/kbd.tsx +2 -2
- package/src/components/label/index.ts +2 -7
- package/src/components/label/label.tsx +2 -2
- package/src/components/lightbox/index.ts +2 -2
- package/src/components/lightbox/lightbox.tsx +3 -3
- package/src/components/list-item/index.ts +2 -2
- package/src/components/list-item/list-item.tsx +2 -2
- package/src/components/media-list-item/index.ts +2 -2
- package/src/components/media-list-item/media-list-item.tsx +4 -4
- package/src/components/notification-center/index.ts +2 -2
- package/src/components/notification-center/notification-center.tsx +5 -5
- package/src/components/panel-header/index.ts +2 -2
- package/src/components/panel-header/panel-header.tsx +2 -2
- package/src/components/popover/index.ts +2 -2
- package/src/components/popover/popover.tsx +3 -3
- package/src/components/preview-shell/index.ts +2 -2
- package/src/components/preview-shell/preview-shell.tsx +2 -2
- package/src/components/quoted-message-card/index.ts +2 -2
- package/src/components/quoted-message-card/quoted-message-card.tsx +3 -3
- package/src/components/radio-group/index.ts +2 -6
- package/src/components/radio-group/radio-group.tsx +4 -4
- package/src/components/section-header/index.ts +2 -2
- package/src/components/section-header/section-header.tsx +2 -2
- package/src/components/section-label/index.ts +2 -2
- package/src/components/section-label/section-label.tsx +2 -2
- package/src/components/segmented-control/index.ts +2 -2
- package/src/components/segmented-control/segmented-control.tsx +3 -3
- package/src/components/select/index.ts +2 -2
- package/src/components/select/select.tsx +4 -4
- package/src/components/separator/index.ts +2 -0
- package/src/components/separator/separator.tsx +40 -0
- package/src/components/spinner/index.ts +2 -2
- package/src/components/spinner/spinner.tsx +3 -3
- package/src/components/status/index.ts +2 -2
- package/src/components/status/status.tsx +2 -2
- package/src/components/tabs/index.ts +2 -2
- package/src/components/tabs/tabs.tsx +43 -9
- package/src/components/text/index.ts +2 -2
- package/src/components/text/text.tsx +2 -1
- package/src/components/textarea/index.ts +2 -2
- package/src/components/textarea/textarea.tsx +3 -3
- package/src/components/toggle-group/index.ts +2 -7
- package/src/components/toggle-group/toggle-group.tsx +3 -3
- package/src/components/tooltip/index.ts +2 -8
- package/src/components/tooltip/tooltip.tsx +42 -16
- package/src/index.ts +60 -57
- package/src/legacy/AvatarListRow.tsx +1 -1
- package/src/legacy/Checkbox.tsx +1 -1
- package/src/legacy/ConversationPreviewCard.tsx +1 -1
- package/src/legacy/DismissBackdrop.tsx +1 -1
- package/src/legacy/ExperimentalBadge.tsx +1 -1
- package/src/legacy/NotificationCenter.tsx +2 -2
- package/src/legacy/PanelHeader.tsx +1 -1
- package/src/legacy/QuotedMessageCard.tsx +1 -1
- package/src/legacy/ReorderablePanelTabs.tsx +6 -1
- package/src/legacy/SectionHeader.tsx +1 -1
- package/src/legacy/Spinner.tsx +1 -1
- package/src/legacy/SurfaceListItem.tsx +1 -1
- package/src/legacy/selection-popover.tsx +2 -2
- package/src/legacy/server-switcher-menu.tsx +2 -2
- package/src/lib/theme/theme-provider.tsx +1 -1
- package/src/lib/theme/use-theme.ts +1 -1
- package/src/styles.css +5 -6
- package/src/wip.ts +82 -24
- package/dist/styled-props-B3SNekJg.d.mts +0 -16
- package/dist/use-theme-Y_h1DKll.mjs +0 -34
- package/src/fonts/brutal.css +0 -2
package/dist/wip.d.mts
CHANGED
|
@@ -1,10 +1,128 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as VariantProps, i as StyledProps, n as ButtonProps } from "./index-CpGciYPW.mjs";
|
|
2
2
|
import { ComponentPropsWithRef, ReactNode } from "react";
|
|
3
3
|
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
+
import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
|
|
4
5
|
import { Toggle } from "@base-ui/react/toggle";
|
|
5
6
|
import { ToggleGroup as ToggleGroup$1 } from "@base-ui/react/toggle-group";
|
|
6
|
-
import { Dialog } from "@base-ui/react/dialog";
|
|
7
7
|
|
|
8
|
+
//#region src/components/dialog/dialog.d.ts
|
|
9
|
+
type DialogProps = Dialog$1.Root.Props;
|
|
10
|
+
declare function Dialog(props: DialogProps): import("react").JSX.Element;
|
|
11
|
+
type DialogTriggerProps = Dialog$1.Trigger.Props;
|
|
12
|
+
declare function DialogTrigger(props: DialogTriggerProps): import("react").JSX.Element;
|
|
13
|
+
type DialogPortalProps = Dialog$1.Portal.Props;
|
|
14
|
+
declare function DialogPortal(props: DialogPortalProps): import("react").JSX.Element;
|
|
15
|
+
type DialogOverlayProps = StyledProps<Dialog$1.Backdrop.Props>;
|
|
16
|
+
declare function DialogOverlay({
|
|
17
|
+
className,
|
|
18
|
+
...props
|
|
19
|
+
}: DialogOverlayProps): import("react").JSX.Element;
|
|
20
|
+
type DialogContentProps = StyledProps<Dialog$1.Popup.Props> & {
|
|
21
|
+
portalProps?: DialogPortalProps;
|
|
22
|
+
overlay?: false | DialogOverlayProps;
|
|
23
|
+
};
|
|
24
|
+
declare function DialogContent({
|
|
25
|
+
className,
|
|
26
|
+
children,
|
|
27
|
+
portalProps,
|
|
28
|
+
overlay,
|
|
29
|
+
...props
|
|
30
|
+
}: DialogContentProps): import("react").JSX.Element;
|
|
31
|
+
type DialogCloseProps = Dialog$1.Close.Props;
|
|
32
|
+
declare function DialogClose(props: DialogCloseProps): import("react").JSX.Element;
|
|
33
|
+
type DialogHeaderProps = ComponentPropsWithRef<"div">;
|
|
34
|
+
declare function DialogHeader({
|
|
35
|
+
className,
|
|
36
|
+
...props
|
|
37
|
+
}: DialogHeaderProps): import("react").JSX.Element;
|
|
38
|
+
type DialogBodyProps = ComponentPropsWithRef<"div">;
|
|
39
|
+
declare function DialogBody({
|
|
40
|
+
className,
|
|
41
|
+
...props
|
|
42
|
+
}: DialogBodyProps): import("react").JSX.Element;
|
|
43
|
+
type DialogFooterProps = ComponentPropsWithRef<"div">;
|
|
44
|
+
declare function DialogFooter({
|
|
45
|
+
className,
|
|
46
|
+
...props
|
|
47
|
+
}: DialogFooterProps): import("react").JSX.Element;
|
|
48
|
+
type DialogTitleProps = StyledProps<Dialog$1.Title.Props>;
|
|
49
|
+
declare function DialogTitle({
|
|
50
|
+
className,
|
|
51
|
+
...props
|
|
52
|
+
}: DialogTitleProps): import("react").JSX.Element;
|
|
53
|
+
type DialogDescriptionProps = StyledProps<Dialog$1.Description.Props>;
|
|
54
|
+
declare function DialogDescription({
|
|
55
|
+
className,
|
|
56
|
+
...props
|
|
57
|
+
}: DialogDescriptionProps): import("react").JSX.Element;
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region src/components/alert-dialog/alert-dialog.d.ts
|
|
60
|
+
type AlertDialogProps = Dialog$1.Root.Props;
|
|
61
|
+
declare function AlertDialog(props: AlertDialogProps): import("react").JSX.Element;
|
|
62
|
+
type AlertDialogTriggerProps = Dialog$1.Trigger.Props;
|
|
63
|
+
declare function AlertDialogTrigger(props: AlertDialogTriggerProps): import("react").JSX.Element;
|
|
64
|
+
type AlertDialogPortalProps = Dialog$1.Portal.Props;
|
|
65
|
+
declare function AlertDialogPortal(props: AlertDialogPortalProps): import("react").JSX.Element;
|
|
66
|
+
type AlertDialogOverlayProps = StyledProps<Dialog$1.Backdrop.Props>;
|
|
67
|
+
declare function AlertDialogOverlay({
|
|
68
|
+
className,
|
|
69
|
+
...props
|
|
70
|
+
}: AlertDialogOverlayProps): import("react").JSX.Element;
|
|
71
|
+
type AlertDialogContentProps = StyledProps<Dialog$1.Popup.Props> & {
|
|
72
|
+
portalProps?: AlertDialogPortalProps;
|
|
73
|
+
overlay?: false | AlertDialogOverlayProps;
|
|
74
|
+
size?: "sm" | "md";
|
|
75
|
+
};
|
|
76
|
+
declare function AlertDialogContent({
|
|
77
|
+
className,
|
|
78
|
+
children,
|
|
79
|
+
portalProps,
|
|
80
|
+
overlay,
|
|
81
|
+
size,
|
|
82
|
+
...props
|
|
83
|
+
}: AlertDialogContentProps): import("react").JSX.Element;
|
|
84
|
+
type AlertDialogHeaderProps = ComponentPropsWithRef<"div">;
|
|
85
|
+
declare function AlertDialogHeader({
|
|
86
|
+
className,
|
|
87
|
+
...props
|
|
88
|
+
}: AlertDialogHeaderProps): import("react").JSX.Element;
|
|
89
|
+
type AlertDialogMediaProps = ComponentPropsWithRef<"div">;
|
|
90
|
+
declare function AlertDialogMedia({
|
|
91
|
+
className,
|
|
92
|
+
...props
|
|
93
|
+
}: AlertDialogMediaProps): import("react").JSX.Element;
|
|
94
|
+
type AlertDialogBodyProps = ComponentPropsWithRef<"div">;
|
|
95
|
+
declare function AlertDialogBody({
|
|
96
|
+
className,
|
|
97
|
+
...props
|
|
98
|
+
}: AlertDialogBodyProps): import("react").JSX.Element;
|
|
99
|
+
type AlertDialogFooterProps = ComponentPropsWithRef<"div">;
|
|
100
|
+
declare function AlertDialogFooter({
|
|
101
|
+
className,
|
|
102
|
+
...props
|
|
103
|
+
}: AlertDialogFooterProps): import("react").JSX.Element;
|
|
104
|
+
type AlertDialogTitleProps = StyledProps<Dialog$1.Title.Props>;
|
|
105
|
+
declare function AlertDialogTitle({
|
|
106
|
+
className,
|
|
107
|
+
...props
|
|
108
|
+
}: AlertDialogTitleProps): import("react").JSX.Element;
|
|
109
|
+
type AlertDialogDescriptionProps = StyledProps<Dialog$1.Description.Props>;
|
|
110
|
+
declare function AlertDialogDescription({
|
|
111
|
+
className,
|
|
112
|
+
...props
|
|
113
|
+
}: AlertDialogDescriptionProps): import("react").JSX.Element;
|
|
114
|
+
type AlertDialogActionProps = ButtonProps;
|
|
115
|
+
declare function AlertDialogAction(props: AlertDialogActionProps): import("react").JSX.Element;
|
|
116
|
+
type AlertDialogCancelProps = Omit<Dialog$1.Close.Props, "render"> & Pick<ButtonProps, "variant" | "size"> & {
|
|
117
|
+
className?: string;
|
|
118
|
+
};
|
|
119
|
+
declare function AlertDialogCancel({
|
|
120
|
+
className,
|
|
121
|
+
variant,
|
|
122
|
+
size,
|
|
123
|
+
...props
|
|
124
|
+
}: AlertDialogCancelProps): import("react").JSX.Element;
|
|
125
|
+
//#endregion
|
|
8
126
|
//#region src/components/toggle-group/toggle-group.d.ts
|
|
9
127
|
declare const toggleGroup: import("tailwind-variants/lite").TVReturnType<{
|
|
10
128
|
theme: {
|
|
@@ -816,7 +934,7 @@ declare function DescriptionAction({
|
|
|
816
934
|
}: DescriptionActionProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
817
935
|
//#endregion
|
|
818
936
|
//#region src/components/lightbox/lightbox.d.ts
|
|
819
|
-
type LightboxProps<Payload = unknown> = Omit<Dialog.Root.Props<Payload>, "actionsRef" | "children" | "handle"> & {
|
|
937
|
+
type LightboxProps<Payload = unknown> = Omit<Dialog$1.Root.Props<Payload>, "actionsRef" | "children" | "handle"> & {
|
|
820
938
|
children?: ReactNode;
|
|
821
939
|
closeOnModW?: boolean;
|
|
822
940
|
};
|
|
@@ -829,11 +947,11 @@ declare function Lightbox<Payload = unknown>({
|
|
|
829
947
|
children,
|
|
830
948
|
...props
|
|
831
949
|
}: LightboxProps<Payload>): import("react").JSX.Element;
|
|
832
|
-
type LightboxTriggerProps = Dialog.Trigger.Props;
|
|
950
|
+
type LightboxTriggerProps = Dialog$1.Trigger.Props;
|
|
833
951
|
declare function LightboxTrigger(props: LightboxTriggerProps): import("react").JSX.Element;
|
|
834
|
-
type LightboxPortalProps = Dialog.Portal.Props;
|
|
952
|
+
type LightboxPortalProps = Dialog$1.Portal.Props;
|
|
835
953
|
declare function LightboxPortal(props: LightboxPortalProps): import("react").JSX.Element;
|
|
836
|
-
type LightboxContentProps = StyledProps<Dialog.Popup.Props>;
|
|
954
|
+
type LightboxContentProps = StyledProps<Dialog$1.Popup.Props>;
|
|
837
955
|
declare function LightboxContent({
|
|
838
956
|
className,
|
|
839
957
|
initialFocus,
|
|
@@ -870,25 +988,25 @@ declare function LightboxMedia({
|
|
|
870
988
|
className,
|
|
871
989
|
...props
|
|
872
990
|
}: LightboxMediaProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
873
|
-
type LightboxCloseProps = StyledProps<Dialog.Close.Props>;
|
|
991
|
+
type LightboxCloseProps = StyledProps<Dialog$1.Close.Props>;
|
|
874
992
|
declare function LightboxClose({
|
|
875
993
|
className,
|
|
876
994
|
...props
|
|
877
995
|
}: LightboxCloseProps): import("react").JSX.Element;
|
|
878
996
|
//#endregion
|
|
879
997
|
//#region src/components/bottom-sheet/bottom-sheet.d.ts
|
|
880
|
-
type BottomSheetProps = Dialog.Root.Props;
|
|
998
|
+
type BottomSheetProps = Dialog$1.Root.Props;
|
|
881
999
|
declare function BottomSheet(props: BottomSheetProps): import("react").JSX.Element;
|
|
882
|
-
type BottomSheetTriggerProps = Dialog.Trigger.Props;
|
|
1000
|
+
type BottomSheetTriggerProps = Dialog$1.Trigger.Props;
|
|
883
1001
|
declare function BottomSheetTrigger(props: BottomSheetTriggerProps): import("react").JSX.Element;
|
|
884
|
-
type BottomSheetPortalProps = Dialog.Portal.Props;
|
|
1002
|
+
type BottomSheetPortalProps = Dialog$1.Portal.Props;
|
|
885
1003
|
declare function BottomSheetPortal(props: BottomSheetPortalProps): import("react").JSX.Element;
|
|
886
|
-
type BottomSheetContentProps = StyledProps<Dialog.Popup.Props>;
|
|
1004
|
+
type BottomSheetContentProps = StyledProps<Dialog$1.Popup.Props>;
|
|
887
1005
|
declare function BottomSheetContent({
|
|
888
1006
|
className,
|
|
889
1007
|
...props
|
|
890
1008
|
}: BottomSheetContentProps): import("react").JSX.Element;
|
|
891
|
-
type BottomSheetCloseProps = Dialog.Close.Props;
|
|
1009
|
+
type BottomSheetCloseProps = Dialog$1.Close.Props;
|
|
892
1010
|
declare function BottomSheetClose(props: BottomSheetCloseProps): import("react").JSX.Element;
|
|
893
1011
|
type BottomSheetHeaderProps = useRender.ComponentProps<"div">;
|
|
894
1012
|
declare function BottomSheetHeader({
|
|
@@ -902,15 +1020,15 @@ declare function BottomSheetFooter({
|
|
|
902
1020
|
render,
|
|
903
1021
|
...props
|
|
904
1022
|
}: BottomSheetFooterProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
905
|
-
type BottomSheetTitleProps = StyledProps<Dialog.Title.Props>;
|
|
1023
|
+
type BottomSheetTitleProps = StyledProps<Dialog$1.Title.Props>;
|
|
906
1024
|
declare function BottomSheetTitle({
|
|
907
1025
|
className,
|
|
908
1026
|
...props
|
|
909
1027
|
}: BottomSheetTitleProps): import("react").JSX.Element;
|
|
910
|
-
type BottomSheetDescriptionProps = StyledProps<Dialog.Description.Props>;
|
|
1028
|
+
type BottomSheetDescriptionProps = StyledProps<Dialog$1.Description.Props>;
|
|
911
1029
|
declare function BottomSheetDescription({
|
|
912
1030
|
className,
|
|
913
1031
|
...props
|
|
914
1032
|
}: BottomSheetDescriptionProps): import("react").JSX.Element;
|
|
915
1033
|
//#endregion
|
|
916
|
-
export { BottomSheet, BottomSheetClose, type BottomSheetCloseProps, BottomSheetContent, type BottomSheetContentProps, BottomSheetDescription, type BottomSheetDescriptionProps, BottomSheetFooter, type BottomSheetFooterProps, BottomSheetHeader, type BottomSheetHeaderProps, BottomSheetPortal, type BottomSheetPortalProps, type BottomSheetProps, BottomSheetTitle, type BottomSheetTitleProps, BottomSheetTrigger, type BottomSheetTriggerProps, ConversationPreviewCard, ConversationPreviewCardAction, type ConversationPreviewCardActionProps, ConversationPreviewCardAuthor, ConversationPreviewCardAuthorName, type ConversationPreviewCardAuthorNameProps, type ConversationPreviewCardAuthorProps, ConversationPreviewCardAuthorSubtitle, type ConversationPreviewCardAuthorSubtitleProps, ConversationPreviewCardChannel, type ConversationPreviewCardChannelProps, ConversationPreviewCardContent, type ConversationPreviewCardContentProps, ConversationPreviewCardFooter, type ConversationPreviewCardFooterProps, ConversationPreviewCardMeta, type ConversationPreviewCardMetaProps, ConversationPreviewCardPreview, ConversationPreviewCardPreviewAuthor, type ConversationPreviewCardPreviewAuthorProps, ConversationPreviewCardPreviewLeading, type ConversationPreviewCardPreviewLeadingProps, type ConversationPreviewCardPreviewProps, type ConversationPreviewCardProps, ConversationPreviewCardSecondaryPreview, type ConversationPreviewCardSecondaryPreviewProps, ConversationPreviewCardTimestamp, type ConversationPreviewCardTimestampProps, DescriptionAction, type DescriptionActionProps, DescriptionDetails, type DescriptionDetailsProps, DescriptionItem, type DescriptionItemProps, DescriptionList, type DescriptionListProps, DescriptionTerm, type DescriptionTermProps, Lightbox, LightboxActions, type LightboxActionsProps, LightboxClose, type LightboxCloseProps, LightboxContent, type LightboxContentProps, LightboxHeader, type LightboxHeaderProps, LightboxMedia, type LightboxMediaProps, LightboxPortal, type LightboxPortalProps, type LightboxProps, LightboxStage, type LightboxStageProps, LightboxTitle, type LightboxTitleProps, LightboxTrigger, type LightboxTriggerProps, ListItem, ListItemActionGroup, type ListItemActionGroupProps, ListItemBody, type ListItemBodyProps, ListItemDescription, type ListItemDescriptionProps, ListItemIcon, type ListItemIconProps, ListItemMeta, type ListItemMetaProps, type ListItemProps, ListItemRow, type ListItemRowProps, ListItemTitle, type ListItemTitleProps, MediaListItem, MediaListItemActionGroup, type MediaListItemActionGroupProps, MediaListItemAside, type MediaListItemAsideProps, MediaListItemBody, type MediaListItemBodyProps, type MediaListItemProps, MediaListItemSubtitle, type MediaListItemSubtitleProps, MediaListItemText, type MediaListItemTextProps, MediaListItemTitle, type MediaListItemTitleProps, MediaListItemVisual, type MediaListItemVisualProps, PanelHeader, PanelHeaderActions, type PanelHeaderActionsProps, PanelHeaderContent, type PanelHeaderContentProps, PanelHeaderIcon, type PanelHeaderIconProps, type PanelHeaderProps, PanelHeaderSubtitle, type PanelHeaderSubtitleProps, PanelHeaderSuffix, type PanelHeaderSuffixProps, PanelHeaderTitle, type PanelHeaderTitleProps, PanelHeaderTitleRow, type PanelHeaderTitleRowProps, PanelHeaderVisual, type PanelHeaderVisualProps, PreviewShell, type PreviewShellProps, QuotedMessageCard, QuotedMessageCardAttachments, type QuotedMessageCardAttachmentsProps, QuotedMessageCardAuthor, QuotedMessageCardAuthorName, type QuotedMessageCardAuthorNameProps, type QuotedMessageCardAuthorProps, QuotedMessageCardAuthorSubtitle, type QuotedMessageCardAuthorSubtitleProps, QuotedMessageCardBody, type QuotedMessageCardBodyProps, QuotedMessageCardChannel, type QuotedMessageCardChannelProps, QuotedMessageCardContent, type QuotedMessageCardContentProps, QuotedMessageCardContentWrap, type QuotedMessageCardContentWrapProps, QuotedMessageCardHeader, type QuotedMessageCardHeaderProps, QuotedMessageCardMeta, type QuotedMessageCardMetaProps, type QuotedMessageCardProps, QuotedMessageCardSeparator, type QuotedMessageCardSeparatorProps, QuotedMessageCardTag, type QuotedMessageCardTagProps, QuotedMessageCardThread, type QuotedMessageCardThreadProps, QuotedMessageCardTimestamp, type QuotedMessageCardTimestampProps, QuotedMessageCardUnavailable, type QuotedMessageCardUnavailableProps, SectionHeader, SectionHeaderActions, type SectionHeaderActionsProps, SectionHeaderContent, type SectionHeaderContentProps, SectionHeaderCount, type SectionHeaderCountProps, SectionHeaderIcon, type SectionHeaderIconProps, type SectionHeaderProps, SectionHeaderTitle, type SectionHeaderTitleProps, SectionLabel, type SectionLabelProps, ToggleGroup, ToggleGroupCount, type ToggleGroupCountProps, ToggleGroupItem, type ToggleGroupItemProps, ToggleGroupLabel, type ToggleGroupLabelProps, type ToggleGroupProps };
|
|
1034
|
+
export { AlertDialog, AlertDialogAction, type AlertDialogActionProps, AlertDialogBody, type AlertDialogBodyProps, AlertDialogCancel, type AlertDialogCancelProps, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, type AlertDialogDescriptionProps, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, AlertDialogMedia, type AlertDialogMediaProps, AlertDialogOverlay, type AlertDialogOverlayProps, AlertDialogPortal, type AlertDialogPortalProps, type AlertDialogProps, AlertDialogTitle, type AlertDialogTitleProps, AlertDialogTrigger, type AlertDialogTriggerProps, BottomSheet, BottomSheetClose, type BottomSheetCloseProps, BottomSheetContent, type BottomSheetContentProps, BottomSheetDescription, type BottomSheetDescriptionProps, BottomSheetFooter, type BottomSheetFooterProps, BottomSheetHeader, type BottomSheetHeaderProps, BottomSheetPortal, type BottomSheetPortalProps, type BottomSheetProps, BottomSheetTitle, type BottomSheetTitleProps, BottomSheetTrigger, type BottomSheetTriggerProps, ConversationPreviewCard, ConversationPreviewCardAction, type ConversationPreviewCardActionProps, ConversationPreviewCardAuthor, ConversationPreviewCardAuthorName, type ConversationPreviewCardAuthorNameProps, type ConversationPreviewCardAuthorProps, ConversationPreviewCardAuthorSubtitle, type ConversationPreviewCardAuthorSubtitleProps, ConversationPreviewCardChannel, type ConversationPreviewCardChannelProps, ConversationPreviewCardContent, type ConversationPreviewCardContentProps, ConversationPreviewCardFooter, type ConversationPreviewCardFooterProps, ConversationPreviewCardMeta, type ConversationPreviewCardMetaProps, ConversationPreviewCardPreview, ConversationPreviewCardPreviewAuthor, type ConversationPreviewCardPreviewAuthorProps, ConversationPreviewCardPreviewLeading, type ConversationPreviewCardPreviewLeadingProps, type ConversationPreviewCardPreviewProps, type ConversationPreviewCardProps, ConversationPreviewCardSecondaryPreview, type ConversationPreviewCardSecondaryPreviewProps, ConversationPreviewCardTimestamp, type ConversationPreviewCardTimestampProps, DescriptionAction, type DescriptionActionProps, DescriptionDetails, type DescriptionDetailsProps, DescriptionItem, type DescriptionItemProps, DescriptionList, type DescriptionListProps, DescriptionTerm, type DescriptionTermProps, Dialog, DialogBody, type DialogBodyProps, DialogClose, type DialogCloseProps, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogOverlay, type DialogOverlayProps, DialogPortal, type DialogPortalProps, type DialogProps, DialogTitle, type DialogTitleProps, DialogTrigger, type DialogTriggerProps, Lightbox, LightboxActions, type LightboxActionsProps, LightboxClose, type LightboxCloseProps, LightboxContent, type LightboxContentProps, LightboxHeader, type LightboxHeaderProps, LightboxMedia, type LightboxMediaProps, LightboxPortal, type LightboxPortalProps, type LightboxProps, LightboxStage, type LightboxStageProps, LightboxTitle, type LightboxTitleProps, LightboxTrigger, type LightboxTriggerProps, ListItem, ListItemActionGroup, type ListItemActionGroupProps, ListItemBody, type ListItemBodyProps, ListItemDescription, type ListItemDescriptionProps, ListItemIcon, type ListItemIconProps, ListItemMeta, type ListItemMetaProps, type ListItemProps, ListItemRow, type ListItemRowProps, ListItemTitle, type ListItemTitleProps, MediaListItem, MediaListItemActionGroup, type MediaListItemActionGroupProps, MediaListItemAside, type MediaListItemAsideProps, MediaListItemBody, type MediaListItemBodyProps, type MediaListItemProps, MediaListItemSubtitle, type MediaListItemSubtitleProps, MediaListItemText, type MediaListItemTextProps, MediaListItemTitle, type MediaListItemTitleProps, MediaListItemVisual, type MediaListItemVisualProps, PanelHeader, PanelHeaderActions, type PanelHeaderActionsProps, PanelHeaderContent, type PanelHeaderContentProps, PanelHeaderIcon, type PanelHeaderIconProps, type PanelHeaderProps, PanelHeaderSubtitle, type PanelHeaderSubtitleProps, PanelHeaderSuffix, type PanelHeaderSuffixProps, PanelHeaderTitle, type PanelHeaderTitleProps, PanelHeaderTitleRow, type PanelHeaderTitleRowProps, PanelHeaderVisual, type PanelHeaderVisualProps, PreviewShell, type PreviewShellProps, QuotedMessageCard, QuotedMessageCardAttachments, type QuotedMessageCardAttachmentsProps, QuotedMessageCardAuthor, QuotedMessageCardAuthorName, type QuotedMessageCardAuthorNameProps, type QuotedMessageCardAuthorProps, QuotedMessageCardAuthorSubtitle, type QuotedMessageCardAuthorSubtitleProps, QuotedMessageCardBody, type QuotedMessageCardBodyProps, QuotedMessageCardChannel, type QuotedMessageCardChannelProps, QuotedMessageCardContent, type QuotedMessageCardContentProps, QuotedMessageCardContentWrap, type QuotedMessageCardContentWrapProps, QuotedMessageCardHeader, type QuotedMessageCardHeaderProps, QuotedMessageCardMeta, type QuotedMessageCardMetaProps, type QuotedMessageCardProps, QuotedMessageCardSeparator, type QuotedMessageCardSeparatorProps, QuotedMessageCardTag, type QuotedMessageCardTagProps, QuotedMessageCardThread, type QuotedMessageCardThreadProps, QuotedMessageCardTimestamp, type QuotedMessageCardTimestampProps, QuotedMessageCardUnavailable, type QuotedMessageCardUnavailableProps, SectionHeader, SectionHeaderActions, type SectionHeaderActionsProps, SectionHeaderContent, type SectionHeaderContentProps, SectionHeaderCount, type SectionHeaderCountProps, SectionHeaderIcon, type SectionHeaderIconProps, type SectionHeaderProps, SectionHeaderTitle, type SectionHeaderTitleProps, SectionLabel, type SectionLabelProps, ToggleGroup, ToggleGroupCount, type ToggleGroupCountProps, ToggleGroupItem, type ToggleGroupItemProps, ToggleGroupLabel, type ToggleGroupLabelProps, type ToggleGroupProps };
|
package/dist/wip.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as tv,
|
|
1
|
+
import { a as useThemeFamily, c as tv, t as Button$1 } from "./button-CJqMhTPQ.mjs";
|
|
2
2
|
import { cn } from "./cn.mjs";
|
|
3
3
|
import { Button } from "@base-ui/react/button";
|
|
4
4
|
import { useCallback, useRef, useState } from "react";
|
|
@@ -6,10 +6,283 @@ import { mergeProps } from "@base-ui/react/merge-props";
|
|
|
6
6
|
import { useRender } from "@base-ui/react/use-render";
|
|
7
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { MessageSquare } from "lucide-react";
|
|
9
|
+
import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
|
|
9
10
|
import { Toggle } from "@base-ui/react/toggle";
|
|
10
11
|
import { ToggleGroup as ToggleGroup$1 } from "@base-ui/react/toggle-group";
|
|
11
|
-
import { Dialog } from "@base-ui/react/dialog";
|
|
12
12
|
import { useHotkey } from "@tanstack/react-hotkeys";
|
|
13
|
+
//#region src/components/dialog/dialog.tsx
|
|
14
|
+
const dialog = tv({
|
|
15
|
+
slots: {
|
|
16
|
+
overlay: [
|
|
17
|
+
"fixed inset-0 z-50",
|
|
18
|
+
"transition-opacity duration-100",
|
|
19
|
+
"data-[starting-style]:opacity-0 data-[ending-style]:opacity-0"
|
|
20
|
+
],
|
|
21
|
+
content: [
|
|
22
|
+
"fixed top-1/2 left-1/2 z-50 grid w-[calc(100%-2rem)] max-w-md -translate-x-1/2 -translate-y-1/2",
|
|
23
|
+
"outline-none transition-[opacity,transform] duration-100",
|
|
24
|
+
"data-[starting-style]:scale-95 data-[starting-style]:opacity-0",
|
|
25
|
+
"data-[ending-style]:scale-95 data-[ending-style]:opacity-0"
|
|
26
|
+
],
|
|
27
|
+
header: ["flex min-w-0 flex-col gap-1"],
|
|
28
|
+
body: ["min-w-0"],
|
|
29
|
+
footer: ["flex items-center justify-end gap-3"],
|
|
30
|
+
title: ["m-0 min-w-0 text-foreground-strong"],
|
|
31
|
+
description: ["m-0 text-foreground-muted"]
|
|
32
|
+
},
|
|
33
|
+
variants: { theme: {
|
|
34
|
+
brutal: {
|
|
35
|
+
overlay: ["bg-black/60"],
|
|
36
|
+
content: ["gap-4 border-2 border-line-strong bg-layer-panel p-6 shadow-xl"],
|
|
37
|
+
title: ["font-heading text-lg leading-none font-bold uppercase"],
|
|
38
|
+
description: ["font-sans text-sm leading-5 text-foreground/60"]
|
|
39
|
+
},
|
|
40
|
+
elegant: {
|
|
41
|
+
overlay: ["bg-black/20"],
|
|
42
|
+
content: ["gap-5 rounded-lg bg-layer-popover p-5", "shadow-[0_24px_48px_-24px_oklch(0.21_0.006_285_/_0.30),0_0_0_1px_oklch(0.21_0.006_285_/_0.08),0_1px_2px_oklch(0.21_0.006_285_/_0.08)]"],
|
|
43
|
+
title: ["font-sans text-base leading-5 font-medium tracking-[-0.005em]"],
|
|
44
|
+
description: ["font-sans text-sm leading-5 text-[oklch(0.48_0_0)] dark:text-[oklch(0.76_0_0)]"]
|
|
45
|
+
}
|
|
46
|
+
} }
|
|
47
|
+
});
|
|
48
|
+
function Dialog(props) {
|
|
49
|
+
return /* @__PURE__ */ jsx(Dialog$1.Root, {
|
|
50
|
+
"data-slot": "dialog",
|
|
51
|
+
...props
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function DialogTrigger(props) {
|
|
55
|
+
return /* @__PURE__ */ jsx(Dialog$1.Trigger, {
|
|
56
|
+
"data-slot": "dialog-trigger",
|
|
57
|
+
...props
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function DialogPortal(props) {
|
|
61
|
+
return /* @__PURE__ */ jsx(Dialog$1.Portal, {
|
|
62
|
+
"data-slot": "dialog-portal",
|
|
63
|
+
...props
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function DialogOverlay({ className, ...props }) {
|
|
67
|
+
const { overlay } = dialog({ theme: useThemeFamily() });
|
|
68
|
+
return /* @__PURE__ */ jsx(Dialog$1.Backdrop, {
|
|
69
|
+
"data-slot": "dialog-overlay",
|
|
70
|
+
className: overlay({ className }),
|
|
71
|
+
...props
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
function DialogContent({ className, children, portalProps, overlay, ...props }) {
|
|
75
|
+
const { content } = dialog({ theme: useThemeFamily() });
|
|
76
|
+
return /* @__PURE__ */ jsxs(DialogPortal, {
|
|
77
|
+
...portalProps,
|
|
78
|
+
children: [overlay === false ? null : /* @__PURE__ */ jsx(DialogOverlay, { ...overlay }), /* @__PURE__ */ jsx(Dialog$1.Popup, {
|
|
79
|
+
"data-slot": "dialog-content",
|
|
80
|
+
className: content({ className }),
|
|
81
|
+
...props,
|
|
82
|
+
children
|
|
83
|
+
})]
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
function DialogClose(props) {
|
|
87
|
+
return /* @__PURE__ */ jsx(Dialog$1.Close, {
|
|
88
|
+
"data-slot": "dialog-close",
|
|
89
|
+
...props
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
function DialogHeader({ className, ...props }) {
|
|
93
|
+
const { header } = dialog({ theme: useThemeFamily() });
|
|
94
|
+
return /* @__PURE__ */ jsx("div", {
|
|
95
|
+
"data-slot": "dialog-header",
|
|
96
|
+
className: header({ className }),
|
|
97
|
+
...props
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
function DialogBody({ className, ...props }) {
|
|
101
|
+
const { body } = dialog({ theme: useThemeFamily() });
|
|
102
|
+
return /* @__PURE__ */ jsx("div", {
|
|
103
|
+
"data-slot": "dialog-body",
|
|
104
|
+
className: body({ className }),
|
|
105
|
+
...props
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
function DialogFooter({ className, ...props }) {
|
|
109
|
+
const { footer } = dialog({ theme: useThemeFamily() });
|
|
110
|
+
return /* @__PURE__ */ jsx("div", {
|
|
111
|
+
"data-slot": "dialog-footer",
|
|
112
|
+
className: footer({ className }),
|
|
113
|
+
...props
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
function DialogTitle({ className, ...props }) {
|
|
117
|
+
const { title } = dialog({ theme: useThemeFamily() });
|
|
118
|
+
return /* @__PURE__ */ jsx(Dialog$1.Title, {
|
|
119
|
+
"data-slot": "dialog-title",
|
|
120
|
+
className: title({ className }),
|
|
121
|
+
...props
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
function DialogDescription({ className, ...props }) {
|
|
125
|
+
const { description } = dialog({ theme: useThemeFamily() });
|
|
126
|
+
return /* @__PURE__ */ jsx(Dialog$1.Description, {
|
|
127
|
+
"data-slot": "dialog-description",
|
|
128
|
+
className: description({ className }),
|
|
129
|
+
...props
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
//#endregion
|
|
133
|
+
//#region src/components/alert-dialog/alert-dialog.tsx
|
|
134
|
+
const alertDialog = tv({
|
|
135
|
+
slots: {
|
|
136
|
+
overlay: [
|
|
137
|
+
"fixed inset-0 z-50",
|
|
138
|
+
"transition-opacity duration-100",
|
|
139
|
+
"data-[starting-style]:opacity-0 data-[ending-style]:opacity-0"
|
|
140
|
+
],
|
|
141
|
+
content: [
|
|
142
|
+
"fixed top-1/2 left-1/2 z-50 grid w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2",
|
|
143
|
+
"outline-none transition-[opacity,transform] duration-100",
|
|
144
|
+
"data-[starting-style]:scale-95 data-[starting-style]:opacity-0",
|
|
145
|
+
"data-[ending-style]:scale-95 data-[ending-style]:opacity-0"
|
|
146
|
+
],
|
|
147
|
+
header: ["grid min-w-0 gap-1"],
|
|
148
|
+
media: ["flex size-10 shrink-0 items-center justify-center"],
|
|
149
|
+
body: ["min-w-0"],
|
|
150
|
+
footer: ["flex items-center justify-end gap-3"],
|
|
151
|
+
title: ["m-0 min-w-0 text-foreground-strong"],
|
|
152
|
+
description: ["m-0 text-foreground-muted"]
|
|
153
|
+
},
|
|
154
|
+
variants: {
|
|
155
|
+
theme: {
|
|
156
|
+
brutal: {
|
|
157
|
+
overlay: ["bg-black/60"],
|
|
158
|
+
content: ["gap-4 border-2 border-line-strong bg-layer-panel p-6 shadow-xl"],
|
|
159
|
+
media: ["border-2 border-line-strong bg-warning-base text-foreground-inverse"],
|
|
160
|
+
title: ["font-heading text-lg leading-none font-bold uppercase"],
|
|
161
|
+
description: ["font-sans text-sm leading-5 text-foreground/60"]
|
|
162
|
+
},
|
|
163
|
+
elegant: {
|
|
164
|
+
overlay: ["bg-black/20"],
|
|
165
|
+
content: ["gap-5 rounded-lg bg-layer-popover p-5", "shadow-[0_24px_48px_-24px_oklch(0.21_0.006_285_/_0.30),0_0_0_1px_oklch(0.21_0.006_285_/_0.08),0_1px_2px_oklch(0.21_0.006_285_/_0.08)]"],
|
|
166
|
+
media: ["rounded-md bg-danger-lighter text-danger-base"],
|
|
167
|
+
title: ["font-sans text-base leading-5 font-medium tracking-[-0.005em]"],
|
|
168
|
+
description: ["font-sans text-sm leading-5 text-[oklch(0.48_0_0)] dark:text-[oklch(0.76_0_0)]"]
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
size: {
|
|
172
|
+
sm: { content: ["max-w-sm"] },
|
|
173
|
+
md: { content: ["max-w-md"] }
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
defaultVariants: { size: "sm" }
|
|
177
|
+
});
|
|
178
|
+
function AlertDialog(props) {
|
|
179
|
+
return /* @__PURE__ */ jsx(Dialog$1.Root, {
|
|
180
|
+
"data-slot": "alert-dialog",
|
|
181
|
+
...props
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
function AlertDialogTrigger(props) {
|
|
185
|
+
return /* @__PURE__ */ jsx(Dialog$1.Trigger, {
|
|
186
|
+
"data-slot": "alert-dialog-trigger",
|
|
187
|
+
...props
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
function AlertDialogPortal(props) {
|
|
191
|
+
return /* @__PURE__ */ jsx(Dialog$1.Portal, {
|
|
192
|
+
"data-slot": "alert-dialog-portal",
|
|
193
|
+
...props
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
function AlertDialogOverlay({ className, ...props }) {
|
|
197
|
+
const { overlay } = alertDialog({ theme: useThemeFamily() });
|
|
198
|
+
return /* @__PURE__ */ jsx(Dialog$1.Backdrop, {
|
|
199
|
+
"data-slot": "alert-dialog-overlay",
|
|
200
|
+
className: overlay({ className }),
|
|
201
|
+
...props
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
function AlertDialogContent({ className, children, portalProps, overlay, size, ...props }) {
|
|
205
|
+
const { content } = alertDialog({
|
|
206
|
+
theme: useThemeFamily(),
|
|
207
|
+
size
|
|
208
|
+
});
|
|
209
|
+
return /* @__PURE__ */ jsxs(AlertDialogPortal, {
|
|
210
|
+
...portalProps,
|
|
211
|
+
children: [overlay === false ? null : /* @__PURE__ */ jsx(AlertDialogOverlay, { ...overlay }), /* @__PURE__ */ jsx(Dialog$1.Popup, {
|
|
212
|
+
"data-slot": "alert-dialog-content",
|
|
213
|
+
className: content({ className }),
|
|
214
|
+
...props,
|
|
215
|
+
role: "alertdialog",
|
|
216
|
+
children
|
|
217
|
+
})]
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
function AlertDialogHeader({ className, ...props }) {
|
|
221
|
+
const { header } = alertDialog({ theme: useThemeFamily() });
|
|
222
|
+
return /* @__PURE__ */ jsx("div", {
|
|
223
|
+
"data-slot": "alert-dialog-header",
|
|
224
|
+
className: header({ className }),
|
|
225
|
+
...props
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
function AlertDialogMedia({ className, ...props }) {
|
|
229
|
+
const { media } = alertDialog({ theme: useThemeFamily() });
|
|
230
|
+
return /* @__PURE__ */ jsx("div", {
|
|
231
|
+
"data-slot": "alert-dialog-media",
|
|
232
|
+
className: media({ className }),
|
|
233
|
+
...props
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
function AlertDialogBody({ className, ...props }) {
|
|
237
|
+
const { body } = alertDialog({ theme: useThemeFamily() });
|
|
238
|
+
return /* @__PURE__ */ jsx("div", {
|
|
239
|
+
"data-slot": "alert-dialog-body",
|
|
240
|
+
className: body({ className }),
|
|
241
|
+
...props
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
function AlertDialogFooter({ className, ...props }) {
|
|
245
|
+
const { footer } = alertDialog({ theme: useThemeFamily() });
|
|
246
|
+
return /* @__PURE__ */ jsx("div", {
|
|
247
|
+
"data-slot": "alert-dialog-footer",
|
|
248
|
+
className: footer({ className }),
|
|
249
|
+
...props
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
function AlertDialogTitle({ className, ...props }) {
|
|
253
|
+
const { title } = alertDialog({ theme: useThemeFamily() });
|
|
254
|
+
return /* @__PURE__ */ jsx(Dialog$1.Title, {
|
|
255
|
+
"data-slot": "alert-dialog-title",
|
|
256
|
+
className: title({ className }),
|
|
257
|
+
...props
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
function AlertDialogDescription({ className, ...props }) {
|
|
261
|
+
const { description } = alertDialog({ theme: useThemeFamily() });
|
|
262
|
+
return /* @__PURE__ */ jsx(Dialog$1.Description, {
|
|
263
|
+
"data-slot": "alert-dialog-description",
|
|
264
|
+
className: description({ className }),
|
|
265
|
+
...props
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
function AlertDialogAction(props) {
|
|
269
|
+
return /* @__PURE__ */ jsx(Button$1, {
|
|
270
|
+
"data-slot": "alert-dialog-action",
|
|
271
|
+
...props
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
function AlertDialogCancel({ className, variant = "outline", size = "sm", ...props }) {
|
|
275
|
+
return /* @__PURE__ */ jsx(Dialog$1.Close, {
|
|
276
|
+
"data-slot": "alert-dialog-cancel",
|
|
277
|
+
render: /* @__PURE__ */ jsx(Button$1, {
|
|
278
|
+
className,
|
|
279
|
+
variant,
|
|
280
|
+
size
|
|
281
|
+
}),
|
|
282
|
+
...props
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
//#endregion
|
|
13
286
|
//#region src/components/toggle-group/toggle-group.tsx
|
|
14
287
|
const toggleGroup = tv({
|
|
15
288
|
slots: {
|
|
@@ -1032,7 +1305,7 @@ function Lightbox({ closeOnModW = true, defaultOpen = false, modal = true, onOpe
|
|
|
1032
1305
|
onOpenChange?.(nextOpen, eventDetails);
|
|
1033
1306
|
}, [onOpenChange, open]);
|
|
1034
1307
|
const modWClose = closeOnModW && effectiveOpen ? /* @__PURE__ */ jsx(LightboxModWClose, { dialogRef }) : null;
|
|
1035
|
-
return /* @__PURE__ */ jsxs(Dialog.Root, {
|
|
1308
|
+
return /* @__PURE__ */ jsxs(Dialog$1.Root, {
|
|
1036
1309
|
actionsRef: dialogRef,
|
|
1037
1310
|
defaultOpen,
|
|
1038
1311
|
modal,
|
|
@@ -1054,23 +1327,23 @@ function LightboxModWClose({ dialogRef }) {
|
|
|
1054
1327
|
return null;
|
|
1055
1328
|
}
|
|
1056
1329
|
function LightboxTrigger(props) {
|
|
1057
|
-
return /* @__PURE__ */ jsx(Dialog.Trigger, {
|
|
1330
|
+
return /* @__PURE__ */ jsx(Dialog$1.Trigger, {
|
|
1058
1331
|
"data-slot": "lightbox-trigger",
|
|
1059
1332
|
...props
|
|
1060
1333
|
});
|
|
1061
1334
|
}
|
|
1062
1335
|
function LightboxPortal(props) {
|
|
1063
|
-
return /* @__PURE__ */ jsx(Dialog.Portal, {
|
|
1336
|
+
return /* @__PURE__ */ jsx(Dialog$1.Portal, {
|
|
1064
1337
|
"data-slot": "lightbox-portal",
|
|
1065
1338
|
...props
|
|
1066
1339
|
});
|
|
1067
1340
|
}
|
|
1068
1341
|
function LightboxContent({ className, initialFocus = false, finalFocus = false, ...props }) {
|
|
1069
1342
|
const { backdrop, content } = lightbox({ theme: useThemeFamily() });
|
|
1070
|
-
return /* @__PURE__ */ jsxs(LightboxPortal, { children: [/* @__PURE__ */ jsx(Dialog.Backdrop, {
|
|
1343
|
+
return /* @__PURE__ */ jsxs(LightboxPortal, { children: [/* @__PURE__ */ jsx(Dialog$1.Backdrop, {
|
|
1071
1344
|
"data-slot": "lightbox-backdrop",
|
|
1072
1345
|
className: backdrop()
|
|
1073
|
-
}), /* @__PURE__ */ jsx(Dialog.Popup, {
|
|
1346
|
+
}), /* @__PURE__ */ jsx(Dialog$1.Popup, {
|
|
1074
1347
|
"data-slot": "lightbox-content",
|
|
1075
1348
|
initialFocus,
|
|
1076
1349
|
finalFocus,
|
|
@@ -1125,7 +1398,7 @@ function LightboxMedia({ render, className, ...props }) {
|
|
|
1125
1398
|
}
|
|
1126
1399
|
function LightboxClose({ className, ...props }) {
|
|
1127
1400
|
const { close } = lightbox({ theme: useThemeFamily() });
|
|
1128
|
-
return /* @__PURE__ */ jsx(Dialog.Close, {
|
|
1401
|
+
return /* @__PURE__ */ jsx(Dialog$1.Close, {
|
|
1129
1402
|
"data-slot": "lightbox-close",
|
|
1130
1403
|
className: close({ className }),
|
|
1131
1404
|
...props
|
|
@@ -1147,23 +1420,23 @@ const bottomSheet = tv({
|
|
|
1147
1420
|
} }
|
|
1148
1421
|
});
|
|
1149
1422
|
function BottomSheet(props) {
|
|
1150
|
-
return /* @__PURE__ */ jsx(Dialog.Root, { ...props });
|
|
1423
|
+
return /* @__PURE__ */ jsx(Dialog$1.Root, { ...props });
|
|
1151
1424
|
}
|
|
1152
1425
|
function BottomSheetTrigger(props) {
|
|
1153
|
-
return /* @__PURE__ */ jsx(Dialog.Trigger, {
|
|
1426
|
+
return /* @__PURE__ */ jsx(Dialog$1.Trigger, {
|
|
1154
1427
|
"data-slot": "bottom-sheet-trigger",
|
|
1155
1428
|
...props
|
|
1156
1429
|
});
|
|
1157
1430
|
}
|
|
1158
1431
|
function BottomSheetPortal(props) {
|
|
1159
|
-
return /* @__PURE__ */ jsx(Dialog.Portal, {
|
|
1432
|
+
return /* @__PURE__ */ jsx(Dialog$1.Portal, {
|
|
1160
1433
|
"data-slot": "bottom-sheet-portal",
|
|
1161
1434
|
...props
|
|
1162
1435
|
});
|
|
1163
1436
|
}
|
|
1164
1437
|
function BottomSheetContent({ className, ...props }) {
|
|
1165
1438
|
const { content } = bottomSheet({ theme: useThemeFamily() });
|
|
1166
|
-
return /* @__PURE__ */ jsx(BottomSheetPortal, { children: /* @__PURE__ */ jsx(Dialog.Popup, {
|
|
1439
|
+
return /* @__PURE__ */ jsx(BottomSheetPortal, { children: /* @__PURE__ */ jsx(Dialog$1.Popup, {
|
|
1167
1440
|
"data-slot": "bottom-sheet-content",
|
|
1168
1441
|
"data-side": "bottom",
|
|
1169
1442
|
className: content({ className }),
|
|
@@ -1171,7 +1444,7 @@ function BottomSheetContent({ className, ...props }) {
|
|
|
1171
1444
|
}) });
|
|
1172
1445
|
}
|
|
1173
1446
|
function BottomSheetClose(props) {
|
|
1174
|
-
return /* @__PURE__ */ jsx(Dialog.Close, {
|
|
1447
|
+
return /* @__PURE__ */ jsx(Dialog$1.Close, {
|
|
1175
1448
|
"data-slot": "bottom-sheet-close",
|
|
1176
1449
|
...props
|
|
1177
1450
|
});
|
|
@@ -1196,7 +1469,7 @@ function BottomSheetFooter({ className, render, ...props }) {
|
|
|
1196
1469
|
}
|
|
1197
1470
|
function BottomSheetTitle({ className, ...props }) {
|
|
1198
1471
|
const { title } = bottomSheet({ theme: useThemeFamily() });
|
|
1199
|
-
return /* @__PURE__ */ jsx(Dialog.Title, {
|
|
1472
|
+
return /* @__PURE__ */ jsx(Dialog$1.Title, {
|
|
1200
1473
|
"data-slot": "bottom-sheet-title",
|
|
1201
1474
|
className: title({ className }),
|
|
1202
1475
|
...props
|
|
@@ -1204,11 +1477,11 @@ function BottomSheetTitle({ className, ...props }) {
|
|
|
1204
1477
|
}
|
|
1205
1478
|
function BottomSheetDescription({ className, ...props }) {
|
|
1206
1479
|
const { description } = bottomSheet({ theme: useThemeFamily() });
|
|
1207
|
-
return /* @__PURE__ */ jsx(Dialog.Description, {
|
|
1480
|
+
return /* @__PURE__ */ jsx(Dialog$1.Description, {
|
|
1208
1481
|
"data-slot": "bottom-sheet-description",
|
|
1209
1482
|
className: description({ className }),
|
|
1210
1483
|
...props
|
|
1211
1484
|
});
|
|
1212
1485
|
}
|
|
1213
1486
|
//#endregion
|
|
1214
|
-
export { BottomSheet, BottomSheetClose, BottomSheetContent, BottomSheetDescription, BottomSheetFooter, BottomSheetHeader, BottomSheetPortal, BottomSheetTitle, BottomSheetTrigger, ConversationPreviewCard, ConversationPreviewCardAction, ConversationPreviewCardAuthor, ConversationPreviewCardAuthorName, ConversationPreviewCardAuthorSubtitle, ConversationPreviewCardChannel, ConversationPreviewCardContent, ConversationPreviewCardFooter, ConversationPreviewCardMeta, ConversationPreviewCardPreview, ConversationPreviewCardPreviewAuthor, ConversationPreviewCardPreviewLeading, ConversationPreviewCardSecondaryPreview, ConversationPreviewCardTimestamp, DescriptionAction, DescriptionDetails, DescriptionItem, DescriptionList, DescriptionTerm, Lightbox, LightboxActions, LightboxClose, LightboxContent, LightboxHeader, LightboxMedia, LightboxPortal, LightboxStage, LightboxTitle, LightboxTrigger, ListItem, ListItemActionGroup, ListItemBody, ListItemDescription, ListItemIcon, ListItemMeta, ListItemRow, ListItemTitle, MediaListItem, MediaListItemActionGroup, MediaListItemAside, MediaListItemBody, MediaListItemSubtitle, MediaListItemText, MediaListItemTitle, MediaListItemVisual, PanelHeader, PanelHeaderActions, PanelHeaderContent, PanelHeaderIcon, PanelHeaderSubtitle, PanelHeaderSuffix, PanelHeaderTitle, PanelHeaderTitleRow, PanelHeaderVisual, PreviewShell, QuotedMessageCard, QuotedMessageCardAttachments, QuotedMessageCardAuthor, QuotedMessageCardAuthorName, QuotedMessageCardAuthorSubtitle, QuotedMessageCardBody, QuotedMessageCardChannel, QuotedMessageCardContent, QuotedMessageCardContentWrap, QuotedMessageCardHeader, QuotedMessageCardMeta, QuotedMessageCardSeparator, QuotedMessageCardTag, QuotedMessageCardThread, QuotedMessageCardTimestamp, QuotedMessageCardUnavailable, SectionHeader, SectionHeaderActions, SectionHeaderContent, SectionHeaderCount, SectionHeaderIcon, SectionHeaderTitle, SectionLabel, ToggleGroup, ToggleGroupCount, ToggleGroupItem, ToggleGroupLabel };
|
|
1487
|
+
export { AlertDialog, AlertDialogAction, AlertDialogBody, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, BottomSheet, BottomSheetClose, BottomSheetContent, BottomSheetDescription, BottomSheetFooter, BottomSheetHeader, BottomSheetPortal, BottomSheetTitle, BottomSheetTrigger, ConversationPreviewCard, ConversationPreviewCardAction, ConversationPreviewCardAuthor, ConversationPreviewCardAuthorName, ConversationPreviewCardAuthorSubtitle, ConversationPreviewCardChannel, ConversationPreviewCardContent, ConversationPreviewCardFooter, ConversationPreviewCardMeta, ConversationPreviewCardPreview, ConversationPreviewCardPreviewAuthor, ConversationPreviewCardPreviewLeading, ConversationPreviewCardSecondaryPreview, ConversationPreviewCardTimestamp, DescriptionAction, DescriptionDetails, DescriptionItem, DescriptionList, DescriptionTerm, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Lightbox, LightboxActions, LightboxClose, LightboxContent, LightboxHeader, LightboxMedia, LightboxPortal, LightboxStage, LightboxTitle, LightboxTrigger, ListItem, ListItemActionGroup, ListItemBody, ListItemDescription, ListItemIcon, ListItemMeta, ListItemRow, ListItemTitle, MediaListItem, MediaListItemActionGroup, MediaListItemAside, MediaListItemBody, MediaListItemSubtitle, MediaListItemText, MediaListItemTitle, MediaListItemVisual, PanelHeader, PanelHeaderActions, PanelHeaderContent, PanelHeaderIcon, PanelHeaderSubtitle, PanelHeaderSuffix, PanelHeaderTitle, PanelHeaderTitleRow, PanelHeaderVisual, PreviewShell, QuotedMessageCard, QuotedMessageCardAttachments, QuotedMessageCardAuthor, QuotedMessageCardAuthorName, QuotedMessageCardAuthorSubtitle, QuotedMessageCardBody, QuotedMessageCardChannel, QuotedMessageCardContent, QuotedMessageCardContentWrap, QuotedMessageCardHeader, QuotedMessageCardMeta, QuotedMessageCardSeparator, QuotedMessageCardTag, QuotedMessageCardThread, QuotedMessageCardTimestamp, QuotedMessageCardUnavailable, SectionHeader, SectionHeaderActions, SectionHeaderContent, SectionHeaderCount, SectionHeaderIcon, SectionHeaderTitle, SectionLabel, ToggleGroup, ToggleGroupCount, ToggleGroupItem, ToggleGroupLabel };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "raft-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "React UI components for Raft.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -9,24 +9,22 @@
|
|
|
9
9
|
"directory": "packages/ui"
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
12
|
+
"CHANGELOG.md",
|
|
12
13
|
"dist",
|
|
13
14
|
"src"
|
|
14
15
|
],
|
|
15
16
|
"type": "module",
|
|
16
17
|
"exports": {
|
|
17
18
|
".": {
|
|
18
|
-
"types": "./
|
|
19
|
-
"development": "./src/index.ts",
|
|
19
|
+
"types": "./dist/index.d.mts",
|
|
20
20
|
"default": "./dist/index.mjs"
|
|
21
21
|
},
|
|
22
22
|
"./cn": {
|
|
23
|
-
"types": "./
|
|
24
|
-
"development": "./src/lib/cn.ts",
|
|
23
|
+
"types": "./dist/cn.d.mts",
|
|
25
24
|
"default": "./dist/cn.mjs"
|
|
26
25
|
},
|
|
27
26
|
"./wip": {
|
|
28
|
-
"types": "./
|
|
29
|
-
"development": "./src/wip.ts",
|
|
27
|
+
"types": "./dist/wip.d.mts",
|
|
30
28
|
"default": "./dist/wip.mjs"
|
|
31
29
|
},
|
|
32
30
|
"./styles.css": "./src/styles.css",
|
|
@@ -40,8 +38,6 @@
|
|
|
40
38
|
"@dnd-kit/core": "^6.3.1",
|
|
41
39
|
"@dnd-kit/sortable": "^10.0.0",
|
|
42
40
|
"@dnd-kit/utilities": "^3.2.2",
|
|
43
|
-
"@fontsource-variable/geist-mono": "^5.2.8",
|
|
44
|
-
"@fontsource-variable/space-grotesk": "^5.2.10",
|
|
45
41
|
"@tanstack/react-hotkeys": "^0.10.0",
|
|
46
42
|
"cnfast": "^0.0.7",
|
|
47
43
|
"lucide-react": "^1.21.0",
|