raft-ui 0.0.9 → 0.0.11
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 +27 -0
- package/dist/index.d.mts +1128 -75
- package/dist/index.mjs +2082 -133
- package/dist/styles.css +40 -0
- package/dist/tv-UUMwNowu.d.mts +16 -0
- package/dist/use-theme-Y_h1DKll.mjs +34 -0
- package/dist/wip.d.mts +3 -156
- package/dist/wip.mjs +5 -337
- package/package.json +1 -1
- package/dist/button-jUlaK4eN.mjs +0 -722
- package/dist/index-lPUAF7fl.d.mts +0 -267
package/dist/styles.css
CHANGED
|
@@ -48,6 +48,36 @@
|
|
|
48
48
|
height: 200%;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
@utility toast-gradient-border {
|
|
52
|
+
position: relative;
|
|
53
|
+
|
|
54
|
+
&::before {
|
|
55
|
+
content: "";
|
|
56
|
+
position: absolute;
|
|
57
|
+
inset: 0;
|
|
58
|
+
border-radius: inherit;
|
|
59
|
+
padding: var(--toast-gradient-border-width, 1px);
|
|
60
|
+
background: var(
|
|
61
|
+
--toast-gradient-border,
|
|
62
|
+
linear-gradient(
|
|
63
|
+
var(--toast-gradient-border-angle, to bottom),
|
|
64
|
+
var(--toast-gradient-border-from, rgba(255, 255, 255, 0.24)),
|
|
65
|
+
var(--toast-gradient-border-via, rgba(255, 255, 255, 0.1)),
|
|
66
|
+
var(--toast-gradient-border-to, transparent)
|
|
67
|
+
)
|
|
68
|
+
);
|
|
69
|
+
-webkit-mask:
|
|
70
|
+
linear-gradient(#fff 0 0) content-box,
|
|
71
|
+
linear-gradient(#fff 0 0);
|
|
72
|
+
-webkit-mask-composite: xor;
|
|
73
|
+
mask:
|
|
74
|
+
linear-gradient(#fff 0 0) content-box,
|
|
75
|
+
linear-gradient(#fff 0 0);
|
|
76
|
+
mask-composite: exclude;
|
|
77
|
+
pointer-events: none;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
51
81
|
@keyframes fadeIn {
|
|
52
82
|
from {
|
|
53
83
|
opacity: 0;
|
|
@@ -264,6 +294,7 @@
|
|
|
264
294
|
--color-info-base: var(--state-info-base);
|
|
265
295
|
--color-info-light: var(--state-info-light);
|
|
266
296
|
--color-info-lighter: var(--state-info-lighter);
|
|
297
|
+
--color-soft-signal: var(--soft-signal);
|
|
267
298
|
|
|
268
299
|
--color-success-dark: var(--state-success-dark);
|
|
269
300
|
--color-success-base: var(--state-success-base);
|
|
@@ -285,6 +316,9 @@
|
|
|
285
316
|
--shadow-md: var(--theme-shadow-md);
|
|
286
317
|
--shadow-lg: var(--theme-shadow-lg);
|
|
287
318
|
--shadow-xl: var(--theme-shadow-xl);
|
|
319
|
+
--shadow-brutal-sm: var(--theme-shadow-sm);
|
|
320
|
+
--shadow-brutal: var(--theme-shadow-md);
|
|
321
|
+
--shadow-brutal-lg: var(--theme-shadow-xl);
|
|
288
322
|
|
|
289
323
|
--font-heading: var(--heading-font);
|
|
290
324
|
--font-sans: var(--sans-font);
|
|
@@ -353,6 +387,7 @@
|
|
|
353
387
|
--state-info-base: var(--color-brutal-cyan);
|
|
354
388
|
--state-info-light: var(--color-brutal-cyan-200);
|
|
355
389
|
--state-info-lighter: var(--color-brutal-cyan-100);
|
|
390
|
+
--soft-signal: var(--color-brutal-yellow);
|
|
356
391
|
|
|
357
392
|
--state-success-dark: oklch(0.366 0.09 153.079);
|
|
358
393
|
--state-success-base: oklch(0.714 0.176 153.079);
|
|
@@ -375,6 +410,11 @@
|
|
|
375
410
|
--theme-shadow-md: 4px 4px 0px var(--line-strong);
|
|
376
411
|
--theme-shadow-lg: 4px 4px 0px var(--color-black);
|
|
377
412
|
--theme-shadow-xl: 6px 6px 0px var(--line-strong);
|
|
413
|
+
--shadow-brutal-active: 1px 1px 0px #141111;
|
|
414
|
+
--shadow-brutal-hover: 2px 2px 0px #141111;
|
|
415
|
+
--shadow-brutal-sm: 2px 2px 0px #141111;
|
|
416
|
+
--shadow-brutal: 4px 4px 0px #141111;
|
|
417
|
+
--shadow-brutal-lg: 6px 6px 0px #141111;
|
|
378
418
|
|
|
379
419
|
--heading-font: "Hanken Grotesk", system-ui, sans-serif;
|
|
380
420
|
--sans-font: "Hanken Grotesk", system-ui, sans-serif;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { VariantProps } from "tailwind-variants/lite";
|
|
2
|
+
|
|
3
|
+
//#region src/lib/styled-props.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Base UI components type `className` as `string | ((state) => string)`, but our
|
|
6
|
+
* tv() recipes only accept a plain string. `StyledProps` narrows a Base UI
|
|
7
|
+
* component's props to a string `className` so they can flow into a recipe.
|
|
8
|
+
*
|
|
9
|
+
* The state-callback form is intentionally dropped: our components express every
|
|
10
|
+
* state through `data-*` variants in the recipe, so a caller never needs it.
|
|
11
|
+
*/
|
|
12
|
+
type StyledProps<P> = Omit<P, "className"> & {
|
|
13
|
+
className?: string;
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { StyledProps as n, VariantProps as t };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { cn } from "cnfast";
|
|
2
|
+
import { tv } from "tailwind-variants/lite";
|
|
3
|
+
import { createContext, use } from "react";
|
|
4
|
+
//#region src/lib/tv.ts
|
|
5
|
+
const tv$1 = ((options) => {
|
|
6
|
+
const recipe = tv(options);
|
|
7
|
+
const wrappedRecipe = ((props) => {
|
|
8
|
+
const result = recipe(props);
|
|
9
|
+
if (typeof result === "string") return cn(result);
|
|
10
|
+
return Object.fromEntries(Object.entries(result).map(([slotName, slot]) => [slotName, (slotProps) => cn(slot(slotProps))]));
|
|
11
|
+
});
|
|
12
|
+
return Object.assign(wrappedRecipe, recipe);
|
|
13
|
+
});
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/lib/theme/theme-context.ts
|
|
16
|
+
const ThemeContext = createContext("brutal");
|
|
17
|
+
const ThemeStateContext = createContext({
|
|
18
|
+
theme: "brutal",
|
|
19
|
+
setTheme: () => void 0,
|
|
20
|
+
mode: "light",
|
|
21
|
+
resolvedMode: "light"
|
|
22
|
+
});
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/lib/theme/use-theme.ts
|
|
25
|
+
/** Read the active style family for theme-aware component recipes. */
|
|
26
|
+
function useThemeFamily() {
|
|
27
|
+
return use(ThemeContext);
|
|
28
|
+
}
|
|
29
|
+
/** Read and update the application-level RUI theme selection. */
|
|
30
|
+
function useTheme() {
|
|
31
|
+
return use(ThemeStateContext);
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { tv$1 as a, ThemeStateContext as i, useThemeFamily as n, ThemeContext as r, useTheme as t };
|
package/dist/wip.d.mts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { ComponentProps, ComponentPropsWithRef, ReactElement, ReactNode } from "react";
|
|
1
|
+
import { n as StyledProps, t as VariantProps } from "./tv-UUMwNowu.mjs";
|
|
2
|
+
import { ComponentPropsWithRef } from "react";
|
|
4
3
|
import { useRender } from "@base-ui/react/use-render";
|
|
5
4
|
import { Toggle } from "@base-ui/react/toggle";
|
|
6
5
|
import { ToggleGroup as ToggleGroup$1 } from "@base-ui/react/toggle-group";
|
|
7
|
-
import { Drawer } from "vaul";
|
|
8
6
|
|
|
9
7
|
//#region src/components/toggle-group/toggle-group.d.ts
|
|
10
8
|
declare const toggleGroup: import("tailwind-variants/lite").TVReturnType<{
|
|
@@ -816,155 +814,4 @@ declare function DescriptionAction({
|
|
|
816
814
|
...props
|
|
817
815
|
}: DescriptionActionProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
818
816
|
//#endregion
|
|
819
|
-
|
|
820
|
-
type LightboxProps<Payload = unknown> = Omit<Dialog.Root.Props<Payload>, "actionsRef" | "children" | "handle"> & {
|
|
821
|
-
children?: ReactNode;
|
|
822
|
-
closeOnModW?: boolean;
|
|
823
|
-
};
|
|
824
|
-
declare function Lightbox<Payload = unknown>({
|
|
825
|
-
closeOnModW,
|
|
826
|
-
defaultOpen,
|
|
827
|
-
modal,
|
|
828
|
-
onOpenChange,
|
|
829
|
-
open,
|
|
830
|
-
children,
|
|
831
|
-
...props
|
|
832
|
-
}: LightboxProps<Payload>): import("react").JSX.Element;
|
|
833
|
-
type LightboxTriggerProps = Dialog.Trigger.Props;
|
|
834
|
-
declare function LightboxTrigger(props: LightboxTriggerProps): import("react").JSX.Element;
|
|
835
|
-
type LightboxPortalProps = Dialog.Portal.Props;
|
|
836
|
-
declare function LightboxPortal(props: LightboxPortalProps): import("react").JSX.Element;
|
|
837
|
-
type LightboxContentProps = StyledProps<Dialog.Popup.Props>;
|
|
838
|
-
declare function LightboxContent({
|
|
839
|
-
className,
|
|
840
|
-
initialFocus,
|
|
841
|
-
finalFocus,
|
|
842
|
-
...props
|
|
843
|
-
}: LightboxContentProps): import("react").JSX.Element;
|
|
844
|
-
type LightboxHeaderProps = useRender.ComponentProps<"div">;
|
|
845
|
-
declare function LightboxHeader({
|
|
846
|
-
render,
|
|
847
|
-
className,
|
|
848
|
-
...props
|
|
849
|
-
}: LightboxHeaderProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
850
|
-
type LightboxTitleProps = useRender.ComponentProps<"div">;
|
|
851
|
-
declare function LightboxTitle({
|
|
852
|
-
render,
|
|
853
|
-
className,
|
|
854
|
-
...props
|
|
855
|
-
}: LightboxTitleProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
856
|
-
type LightboxActionsProps = useRender.ComponentProps<"div">;
|
|
857
|
-
declare function LightboxActions({
|
|
858
|
-
render,
|
|
859
|
-
className,
|
|
860
|
-
...props
|
|
861
|
-
}: LightboxActionsProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
862
|
-
type LightboxStageProps = useRender.ComponentProps<"div">;
|
|
863
|
-
declare function LightboxStage({
|
|
864
|
-
render,
|
|
865
|
-
className,
|
|
866
|
-
...props
|
|
867
|
-
}: LightboxStageProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
868
|
-
type LightboxMediaProps = useRender.ComponentProps<"div">;
|
|
869
|
-
declare function LightboxMedia({
|
|
870
|
-
render,
|
|
871
|
-
className,
|
|
872
|
-
...props
|
|
873
|
-
}: LightboxMediaProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
874
|
-
type LightboxCloseProps = StyledProps<Dialog.Close.Props>;
|
|
875
|
-
declare function LightboxClose({
|
|
876
|
-
className,
|
|
877
|
-
...props
|
|
878
|
-
}: LightboxCloseProps): import("react").JSX.Element;
|
|
879
|
-
//#endregion
|
|
880
|
-
//#region src/components/bottom-sheet/bottom-sheet.d.ts
|
|
881
|
-
type BottomSheetProps = ComponentProps<typeof Drawer.Root>;
|
|
882
|
-
declare function BottomSheet({
|
|
883
|
-
direction,
|
|
884
|
-
...props
|
|
885
|
-
}: BottomSheetProps): import("react").JSX.Element;
|
|
886
|
-
type BottomSheetTriggerProps = Omit<ComponentProps<typeof Drawer.Trigger>, "asChild"> & {
|
|
887
|
-
render?: ReactElement<{
|
|
888
|
-
children?: ReactNode;
|
|
889
|
-
}>;
|
|
890
|
-
};
|
|
891
|
-
declare function BottomSheetTrigger({
|
|
892
|
-
children,
|
|
893
|
-
render,
|
|
894
|
-
...props
|
|
895
|
-
}: BottomSheetTriggerProps): import("react").JSX.Element;
|
|
896
|
-
type BottomSheetPortalProps = ComponentProps<typeof Drawer.Portal> & {
|
|
897
|
-
className?: string;
|
|
898
|
-
};
|
|
899
|
-
declare function BottomSheetPortal({
|
|
900
|
-
className,
|
|
901
|
-
children,
|
|
902
|
-
...props
|
|
903
|
-
}: BottomSheetPortalProps): import("react").JSX.Element;
|
|
904
|
-
type BottomSheetPositionerProps = ComponentPropsWithRef<"div">;
|
|
905
|
-
declare function BottomSheetPositioner({
|
|
906
|
-
className,
|
|
907
|
-
...props
|
|
908
|
-
}: BottomSheetPositionerProps): import("react").JSX.Element;
|
|
909
|
-
type BottomSheetOverlayProps = StyledProps<ComponentProps<typeof Drawer.Overlay>>;
|
|
910
|
-
declare function BottomSheetOverlay({
|
|
911
|
-
className,
|
|
912
|
-
...props
|
|
913
|
-
}: BottomSheetOverlayProps): import("react").JSX.Element;
|
|
914
|
-
type BottomSheetContentProps = StyledProps<ComponentProps<typeof Drawer.Content>>;
|
|
915
|
-
declare function BottomSheetContent({
|
|
916
|
-
className,
|
|
917
|
-
...props
|
|
918
|
-
}: BottomSheetContentProps): import("react").JSX.Element;
|
|
919
|
-
type BottomSheetCloseProps = Omit<ComponentProps<typeof Drawer.Close>, "asChild"> & Pick<ButtonProps, "variant" | "size"> & {
|
|
920
|
-
className?: string;
|
|
921
|
-
children?: ReactNode;
|
|
922
|
-
render?: ReactElement<{
|
|
923
|
-
children?: ReactNode;
|
|
924
|
-
}>;
|
|
925
|
-
};
|
|
926
|
-
declare function BottomSheetClose({
|
|
927
|
-
className,
|
|
928
|
-
variant,
|
|
929
|
-
size,
|
|
930
|
-
children,
|
|
931
|
-
render,
|
|
932
|
-
...props
|
|
933
|
-
}: BottomSheetCloseProps): import("react").JSX.Element;
|
|
934
|
-
type BottomSheetHeaderProps = useRender.ComponentProps<"div">;
|
|
935
|
-
declare function BottomSheetHeader({
|
|
936
|
-
className,
|
|
937
|
-
render,
|
|
938
|
-
...props
|
|
939
|
-
}: BottomSheetHeaderProps): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
940
|
-
type BottomSheetFooterProps = useRender.ComponentProps<"div">;
|
|
941
|
-
declare function BottomSheetFooter({
|
|
942
|
-
className,
|
|
943
|
-
render,
|
|
944
|
-
...props
|
|
945
|
-
}: BottomSheetFooterProps): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
946
|
-
type BottomSheetBodyProps = useRender.ComponentProps<"div">;
|
|
947
|
-
declare function BottomSheetBody({
|
|
948
|
-
className,
|
|
949
|
-
render,
|
|
950
|
-
...props
|
|
951
|
-
}: BottomSheetBodyProps): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
952
|
-
type BottomSheetActionsProps = useRender.ComponentProps<"div">;
|
|
953
|
-
declare function BottomSheetActions({
|
|
954
|
-
className,
|
|
955
|
-
render,
|
|
956
|
-
children,
|
|
957
|
-
...props
|
|
958
|
-
}: BottomSheetActionsProps): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
959
|
-
type BottomSheetTitleProps = StyledProps<ComponentProps<typeof Drawer.Title>>;
|
|
960
|
-
declare function BottomSheetTitle({
|
|
961
|
-
className,
|
|
962
|
-
...props
|
|
963
|
-
}: BottomSheetTitleProps): import("react").JSX.Element;
|
|
964
|
-
type BottomSheetDescriptionProps = StyledProps<ComponentProps<typeof Drawer.Description>>;
|
|
965
|
-
declare function BottomSheetDescription({
|
|
966
|
-
className,
|
|
967
|
-
...props
|
|
968
|
-
}: BottomSheetDescriptionProps): import("react").JSX.Element;
|
|
969
|
-
//#endregion
|
|
970
|
-
export { BottomSheet, BottomSheetActions, type BottomSheetActionsProps, BottomSheetBody, type BottomSheetBodyProps, BottomSheetClose, type BottomSheetCloseProps, BottomSheetContent, type BottomSheetContentProps, BottomSheetDescription, type BottomSheetDescriptionProps, BottomSheetFooter, type BottomSheetFooterProps, BottomSheetHeader, type BottomSheetHeaderProps, BottomSheetOverlay, type BottomSheetOverlayProps, BottomSheetPortal, type BottomSheetPortalProps, BottomSheetPositioner, type BottomSheetPositionerProps, 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 };
|
|
817
|
+
export { 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, 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,16 +1,12 @@
|
|
|
1
1
|
import { cn } from "./cn.mjs";
|
|
2
|
-
import { a as
|
|
3
|
-
import {
|
|
4
|
-
import { MessageSquare, X } from "lucide-react";
|
|
5
|
-
import { Children, Fragment, cloneElement, isValidElement, useCallback, useRef, useState } from "react";
|
|
2
|
+
import { a as tv, n as useThemeFamily } from "./use-theme-Y_h1DKll.mjs";
|
|
3
|
+
import { MessageSquare } from "lucide-react";
|
|
6
4
|
import { Button } from "@base-ui/react/button";
|
|
7
5
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
8
6
|
import { useRender } from "@base-ui/react/use-render";
|
|
9
|
-
import { Fragment
|
|
7
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
8
|
import { Toggle } from "@base-ui/react/toggle";
|
|
11
9
|
import { ToggleGroup as ToggleGroup$1 } from "@base-ui/react/toggle-group";
|
|
12
|
-
import { useHotkey } from "@tanstack/react-hotkeys";
|
|
13
|
-
import { Drawer } from "vaul";
|
|
14
10
|
//#region src/components/toggle-group/toggle-group.tsx
|
|
15
11
|
const toggleGroup = tv({
|
|
16
12
|
slots: {
|
|
@@ -639,7 +635,7 @@ function QuotedMessageCardThread({ className, render, children = "Thread", ...pr
|
|
|
639
635
|
render,
|
|
640
636
|
props: mergeProps({
|
|
641
637
|
className: thread({ className }),
|
|
642
|
-
children: /* @__PURE__ */ jsxs(Fragment
|
|
638
|
+
children: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(MessageSquare, {}), children] })
|
|
643
639
|
}, props),
|
|
644
640
|
state: { slot: "quoted-message-card-thread" }
|
|
645
641
|
});
|
|
@@ -1003,332 +999,4 @@ function DescriptionAction({ className, render, ...props }) {
|
|
|
1003
999
|
});
|
|
1004
1000
|
}
|
|
1005
1001
|
//#endregion
|
|
1006
|
-
|
|
1007
|
-
const lightbox = tv({
|
|
1008
|
-
slots: {
|
|
1009
|
-
backdrop: ["fixed inset-0 z-[70] bg-layer-backdrop data-[closed]:hidden"],
|
|
1010
|
-
content: ["pointer-events-none fixed inset-0 z-[71] data-[closed]:hidden"],
|
|
1011
|
-
header: ["safe-top safe-left safe-right pointer-events-auto shrink-0"],
|
|
1012
|
-
title: ["min-w-0 flex-1 truncate font-heading text-sm font-bold"],
|
|
1013
|
-
actions: ["flex shrink-0 items-center gap-1.5"],
|
|
1014
|
-
stage: ["pointer-events-none relative flex min-h-0 flex-1 items-center justify-center overflow-hidden"],
|
|
1015
|
-
media: ["pointer-events-auto max-h-[80vh] max-w-[86vw] border-2"],
|
|
1016
|
-
close: []
|
|
1017
|
-
},
|
|
1018
|
-
variants: { theme: {
|
|
1019
|
-
brutal: {
|
|
1020
|
-
header: ["border-b-2 border-line-strong bg-layer-panel"],
|
|
1021
|
-
title: ["text-foreground-strong"],
|
|
1022
|
-
media: ["border-line-strong bg-layer-panel shadow-xl"]
|
|
1023
|
-
},
|
|
1024
|
-
elegant: { backdrop: ["backdrop-blur-[2px]"] }
|
|
1025
|
-
} }
|
|
1026
|
-
});
|
|
1027
|
-
function Lightbox({ closeOnModW = true, defaultOpen = false, modal = true, onOpenChange, open, children, ...props }) {
|
|
1028
|
-
const dialogRef = useRef(null);
|
|
1029
|
-
const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);
|
|
1030
|
-
const effectiveOpen = open ?? uncontrolledOpen;
|
|
1031
|
-
const handleOpenChange = useCallback((nextOpen, eventDetails) => {
|
|
1032
|
-
if (open === void 0) setUncontrolledOpen(nextOpen);
|
|
1033
|
-
onOpenChange?.(nextOpen, eventDetails);
|
|
1034
|
-
}, [onOpenChange, open]);
|
|
1035
|
-
const modWClose = closeOnModW && effectiveOpen ? /* @__PURE__ */ jsx(LightboxModWClose, { dialogRef }) : null;
|
|
1036
|
-
return /* @__PURE__ */ jsxs(Dialog.Root, {
|
|
1037
|
-
actionsRef: dialogRef,
|
|
1038
|
-
defaultOpen,
|
|
1039
|
-
modal,
|
|
1040
|
-
onOpenChange: handleOpenChange,
|
|
1041
|
-
open,
|
|
1042
|
-
...props,
|
|
1043
|
-
children: [modWClose, children]
|
|
1044
|
-
});
|
|
1045
|
-
}
|
|
1046
|
-
function LightboxModWClose({ dialogRef }) {
|
|
1047
|
-
useHotkey("Mod+W", (event) => {
|
|
1048
|
-
event.preventDefault();
|
|
1049
|
-
event.stopPropagation();
|
|
1050
|
-
dialogRef.current?.close();
|
|
1051
|
-
}, { meta: {
|
|
1052
|
-
name: "Close lightbox",
|
|
1053
|
-
description: "Close the active lightbox before the browser closes the tab."
|
|
1054
|
-
} });
|
|
1055
|
-
return null;
|
|
1056
|
-
}
|
|
1057
|
-
function LightboxTrigger(props) {
|
|
1058
|
-
return /* @__PURE__ */ jsx(Dialog.Trigger, {
|
|
1059
|
-
"data-slot": "lightbox-trigger",
|
|
1060
|
-
...props
|
|
1061
|
-
});
|
|
1062
|
-
}
|
|
1063
|
-
function LightboxPortal(props) {
|
|
1064
|
-
return /* @__PURE__ */ jsx(Dialog.Portal, {
|
|
1065
|
-
"data-slot": "lightbox-portal",
|
|
1066
|
-
...props
|
|
1067
|
-
});
|
|
1068
|
-
}
|
|
1069
|
-
function LightboxContent({ className, initialFocus = false, finalFocus = false, ...props }) {
|
|
1070
|
-
const theme = useThemeFamily();
|
|
1071
|
-
const { backdrop, content } = lightbox({ theme });
|
|
1072
|
-
return /* @__PURE__ */ jsxs(LightboxPortal, { children: [/* @__PURE__ */ jsx(Dialog.Backdrop, {
|
|
1073
|
-
"data-slot": "lightbox-backdrop",
|
|
1074
|
-
"data-theme": theme,
|
|
1075
|
-
className: backdrop()
|
|
1076
|
-
}), /* @__PURE__ */ jsx(Dialog.Popup, {
|
|
1077
|
-
"data-slot": "lightbox-content",
|
|
1078
|
-
initialFocus,
|
|
1079
|
-
finalFocus,
|
|
1080
|
-
className: content({ className }),
|
|
1081
|
-
...props
|
|
1082
|
-
})] });
|
|
1083
|
-
}
|
|
1084
|
-
function LightboxHeader({ render, className, ...props }) {
|
|
1085
|
-
const { header } = lightbox({ theme: useThemeFamily() });
|
|
1086
|
-
return useRender({
|
|
1087
|
-
defaultTagName: "div",
|
|
1088
|
-
render,
|
|
1089
|
-
props: mergeProps({ className: header({ className }) }, props),
|
|
1090
|
-
state: { slot: "lightbox-header" }
|
|
1091
|
-
});
|
|
1092
|
-
}
|
|
1093
|
-
function LightboxTitle({ render, className, ...props }) {
|
|
1094
|
-
const { title } = lightbox({ theme: useThemeFamily() });
|
|
1095
|
-
return useRender({
|
|
1096
|
-
defaultTagName: "div",
|
|
1097
|
-
render,
|
|
1098
|
-
props: mergeProps({ className: title({ className }) }, props),
|
|
1099
|
-
state: { slot: "lightbox-title" }
|
|
1100
|
-
});
|
|
1101
|
-
}
|
|
1102
|
-
function LightboxActions({ render, className, ...props }) {
|
|
1103
|
-
const { actions } = lightbox({ theme: useThemeFamily() });
|
|
1104
|
-
return useRender({
|
|
1105
|
-
defaultTagName: "div",
|
|
1106
|
-
render,
|
|
1107
|
-
props: mergeProps({ className: actions({ className }) }, props),
|
|
1108
|
-
state: { slot: "lightbox-actions" }
|
|
1109
|
-
});
|
|
1110
|
-
}
|
|
1111
|
-
function LightboxStage({ render, className, ...props }) {
|
|
1112
|
-
const { stage } = lightbox({ theme: useThemeFamily() });
|
|
1113
|
-
return useRender({
|
|
1114
|
-
defaultTagName: "div",
|
|
1115
|
-
render,
|
|
1116
|
-
props: mergeProps({ className: stage({ className }) }, props),
|
|
1117
|
-
state: { slot: "lightbox-stage" }
|
|
1118
|
-
});
|
|
1119
|
-
}
|
|
1120
|
-
function LightboxMedia({ render, className, ...props }) {
|
|
1121
|
-
const { media } = lightbox({ theme: useThemeFamily() });
|
|
1122
|
-
return useRender({
|
|
1123
|
-
defaultTagName: "div",
|
|
1124
|
-
render,
|
|
1125
|
-
props: mergeProps({ className: media({ className }) }, props),
|
|
1126
|
-
state: { slot: "lightbox-media" }
|
|
1127
|
-
});
|
|
1128
|
-
}
|
|
1129
|
-
function LightboxClose({ className, ...props }) {
|
|
1130
|
-
const { close } = lightbox({ theme: useThemeFamily() });
|
|
1131
|
-
return /* @__PURE__ */ jsx(Dialog.Close, {
|
|
1132
|
-
"data-slot": "lightbox-close",
|
|
1133
|
-
className: close({ className }),
|
|
1134
|
-
...props
|
|
1135
|
-
});
|
|
1136
|
-
}
|
|
1137
|
-
//#endregion
|
|
1138
|
-
//#region src/components/bottom-sheet/bottom-sheet.tsx
|
|
1139
|
-
const bottomSheet = tv({
|
|
1140
|
-
slots: {
|
|
1141
|
-
portal: [],
|
|
1142
|
-
overlay: ["fixed inset-0 z-50", "![animation-duration:0.2s]"],
|
|
1143
|
-
positioner: ["contents"],
|
|
1144
|
-
content: [
|
|
1145
|
-
"fixed z-50 flex h-auto flex-col outline-none",
|
|
1146
|
-
"data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 md:data-[vaul-drawer-direction=bottom]:inset-x-3",
|
|
1147
|
-
"data-[vaul-drawer-direction=bottom]:mx-auto data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:min-h-64 data-[vaul-drawer-direction=bottom]:max-h-[82vh] data-[vaul-drawer-direction=bottom]:max-w-lg md:data-[vaul-drawer-direction=bottom]:max-w-md",
|
|
1148
|
-
"data-[vaul-drawer-direction=top]:inset-x-3 data-[vaul-drawer-direction=top]:top-3",
|
|
1149
|
-
"data-[vaul-drawer-direction=top]:mx-auto data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:max-w-md",
|
|
1150
|
-
"data-[vaul-drawer-direction=left]:inset-y-3 data-[vaul-drawer-direction=left]:left-3 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:max-w-sm",
|
|
1151
|
-
"data-[vaul-drawer-direction=right]:inset-y-3 data-[vaul-drawer-direction=right]:right-3 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:max-w-sm",
|
|
1152
|
-
"!duration-200 ![animation-duration:0.2s]"
|
|
1153
|
-
],
|
|
1154
|
-
header: ["flex flex-col items-center px-6 pt-8 pb-2 text-center"],
|
|
1155
|
-
body: ["flex flex-1 flex-col items-center px-6 pt-4 pb-6 text-center"],
|
|
1156
|
-
footer: ["mt-auto px-6 py-5 md:pb-11"],
|
|
1157
|
-
actions: ["mx-auto w-full items-center justify-center gap-2.5", "[&_[data-slot=button]]:w-full"],
|
|
1158
|
-
title: ["max-w-sm text-pretty text-center text-2xl leading-8 text-foreground-strong"],
|
|
1159
|
-
description: ["max-w-sm text-pretty text-center text-sm leading-5 text-foreground/60"]
|
|
1160
|
-
},
|
|
1161
|
-
variants: { theme: {
|
|
1162
|
-
brutal: {
|
|
1163
|
-
overlay: ["bg-layer-backdrop"],
|
|
1164
|
-
title: ["font-bold"],
|
|
1165
|
-
content: [
|
|
1166
|
-
"border-2 border-black bg-white text-black shadow-[var(--shadow-lg)]",
|
|
1167
|
-
"data-[vaul-drawer-direction=bottom]:border-x-0 md:data-[vaul-drawer-direction=bottom]:border-x-2",
|
|
1168
|
-
"data-[vaul-drawer-direction=bottom]:border-b-0 md:data-[vaul-drawer-direction=bottom]:border-b-2"
|
|
1169
|
-
]
|
|
1170
|
-
},
|
|
1171
|
-
elegant: {
|
|
1172
|
-
overlay: ["bg-layer-backdrop backdrop-blur-[2px]"],
|
|
1173
|
-
content: [
|
|
1174
|
-
"overflow-clip rounded-lg bg-layer-popover text-foreground shadow-xl md:rounded-xl",
|
|
1175
|
-
"data-[vaul-drawer-direction=bottom]:rounded-b-none",
|
|
1176
|
-
"md:data-[vaul-drawer-direction=bottom]:max-w-md",
|
|
1177
|
-
"md:data-[vaul-drawer-direction=top]:max-w-md",
|
|
1178
|
-
"md:data-[vaul-drawer-direction=left]:max-w-md",
|
|
1179
|
-
"md:data-[vaul-drawer-direction=right]:max-w-md"
|
|
1180
|
-
],
|
|
1181
|
-
header: ["bg-white px-8 pt-9 pb-2"],
|
|
1182
|
-
body: ["bg-white px-8 pt-4 pb-7"],
|
|
1183
|
-
footer: ["mt-0 px-8 py-5 md:pb-11"],
|
|
1184
|
-
actions: ["flex w-fit max-w-none flex-row justify-center", "[&_[data-slot=button]]:w-auto"],
|
|
1185
|
-
title: ["font-sans text-2xl leading-8 font-semibold text-[oklch(0.22_0_0)]"],
|
|
1186
|
-
description: ["font-sans text-sm leading-5 text-[oklch(0.48_0_0)]"]
|
|
1187
|
-
}
|
|
1188
|
-
} }
|
|
1189
|
-
});
|
|
1190
|
-
function BottomSheet({ direction = "bottom", ...props }) {
|
|
1191
|
-
return /* @__PURE__ */ jsx(Drawer.Root, {
|
|
1192
|
-
direction,
|
|
1193
|
-
...props
|
|
1194
|
-
});
|
|
1195
|
-
}
|
|
1196
|
-
function BottomSheetTrigger({ children, render, ...props }) {
|
|
1197
|
-
if (render) return /* @__PURE__ */ jsx(Drawer.Trigger, {
|
|
1198
|
-
"data-slot": "bottom-sheet-trigger",
|
|
1199
|
-
asChild: true,
|
|
1200
|
-
...props,
|
|
1201
|
-
children: cloneElement(render, void 0, children ?? render.props.children)
|
|
1202
|
-
});
|
|
1203
|
-
return /* @__PURE__ */ jsx(Drawer.Trigger, {
|
|
1204
|
-
"data-slot": "bottom-sheet-trigger",
|
|
1205
|
-
...props,
|
|
1206
|
-
children
|
|
1207
|
-
});
|
|
1208
|
-
}
|
|
1209
|
-
function BottomSheetPortal({ className, children, ...props }) {
|
|
1210
|
-
const portalChildren = Children.map(children, (child) => {
|
|
1211
|
-
if (isValidElement(child) && child.type === BottomSheetPositioner) return Children.map(child.props.children, (positionerChild) => withPortalClassName(positionerChild, className));
|
|
1212
|
-
return withPortalClassName(child, className);
|
|
1213
|
-
});
|
|
1214
|
-
return /* @__PURE__ */ jsx(Drawer.Portal, {
|
|
1215
|
-
...props,
|
|
1216
|
-
children: portalChildren
|
|
1217
|
-
});
|
|
1218
|
-
}
|
|
1219
|
-
function withPortalClassName(child, className) {
|
|
1220
|
-
if (!className || !isValidElement(child)) return child;
|
|
1221
|
-
return cloneElement(child, { className: cn(child.props.className, className) });
|
|
1222
|
-
}
|
|
1223
|
-
function BottomSheetPositioner({ className, ...props }) {
|
|
1224
|
-
const { positioner } = bottomSheet({ theme: useThemeFamily() });
|
|
1225
|
-
return /* @__PURE__ */ jsx("div", {
|
|
1226
|
-
"data-slot": "bottom-sheet-positioner",
|
|
1227
|
-
className: positioner({ className }),
|
|
1228
|
-
...props
|
|
1229
|
-
});
|
|
1230
|
-
}
|
|
1231
|
-
function BottomSheetOverlay({ className, ...props }) {
|
|
1232
|
-
const theme = useThemeFamily();
|
|
1233
|
-
const { overlay } = bottomSheet({ theme });
|
|
1234
|
-
return /* @__PURE__ */ jsx(Drawer.Overlay, {
|
|
1235
|
-
"data-slot": "bottom-sheet-overlay",
|
|
1236
|
-
"data-theme": theme,
|
|
1237
|
-
className: overlay({ className }),
|
|
1238
|
-
...props
|
|
1239
|
-
});
|
|
1240
|
-
}
|
|
1241
|
-
function BottomSheetContent({ className, ...props }) {
|
|
1242
|
-
const { content } = bottomSheet({ theme: useThemeFamily() });
|
|
1243
|
-
return /* @__PURE__ */ jsx(Drawer.Content, {
|
|
1244
|
-
"data-slot": "bottom-sheet-content",
|
|
1245
|
-
className: content({ className }),
|
|
1246
|
-
...props
|
|
1247
|
-
});
|
|
1248
|
-
}
|
|
1249
|
-
function BottomSheetClose({ className, variant, size, children, render, ...props }) {
|
|
1250
|
-
const isBrutal = useThemeFamily() === "brutal";
|
|
1251
|
-
if (render) return /* @__PURE__ */ jsx(Drawer.Close, {
|
|
1252
|
-
"data-slot": "bottom-sheet-close",
|
|
1253
|
-
asChild: true,
|
|
1254
|
-
...props,
|
|
1255
|
-
children: cloneElement(render, void 0, children ?? render.props.children)
|
|
1256
|
-
});
|
|
1257
|
-
return /* @__PURE__ */ jsx(Drawer.Close, {
|
|
1258
|
-
"data-slot": "bottom-sheet-close",
|
|
1259
|
-
asChild: true,
|
|
1260
|
-
...props,
|
|
1261
|
-
children: /* @__PURE__ */ jsx(Button$1, {
|
|
1262
|
-
variant: variant ?? (isBrutal ? "outline" : "ghost"),
|
|
1263
|
-
size: size ?? (isBrutal ? "icon-sm" : "icon-sm"),
|
|
1264
|
-
"aria-label": "Close",
|
|
1265
|
-
className: cn(isBrutal ? "absolute top-3 right-3" : "absolute top-4 right-6", isBrutal ? "bg-white" : "p-0 text-foreground-placeholder hover:bg-transparent hover:text-foreground", className),
|
|
1266
|
-
children: children ?? /* @__PURE__ */ jsx(X, { className: "size-4" })
|
|
1267
|
-
})
|
|
1268
|
-
});
|
|
1269
|
-
}
|
|
1270
|
-
function BottomSheetHeader({ className, render, ...props }) {
|
|
1271
|
-
const { header } = bottomSheet({ theme: useThemeFamily() });
|
|
1272
|
-
return useRender({
|
|
1273
|
-
defaultTagName: "div",
|
|
1274
|
-
render,
|
|
1275
|
-
props: mergeProps({ className: header({ className }) }, props),
|
|
1276
|
-
state: { slot: "bottom-sheet-header" }
|
|
1277
|
-
});
|
|
1278
|
-
}
|
|
1279
|
-
function BottomSheetFooter({ className, render, ...props }) {
|
|
1280
|
-
const { footer } = bottomSheet({ theme: useThemeFamily() });
|
|
1281
|
-
return useRender({
|
|
1282
|
-
defaultTagName: "div",
|
|
1283
|
-
render,
|
|
1284
|
-
props: mergeProps({ className: footer({ className }) }, props),
|
|
1285
|
-
state: { slot: "bottom-sheet-footer" }
|
|
1286
|
-
});
|
|
1287
|
-
}
|
|
1288
|
-
function BottomSheetBody({ className, render, ...props }) {
|
|
1289
|
-
const { body } = bottomSheet({ theme: useThemeFamily() });
|
|
1290
|
-
return useRender({
|
|
1291
|
-
defaultTagName: "div",
|
|
1292
|
-
render,
|
|
1293
|
-
props: mergeProps({ className: body({ className }) }, props),
|
|
1294
|
-
state: { slot: "bottom-sheet-body" }
|
|
1295
|
-
});
|
|
1296
|
-
}
|
|
1297
|
-
function BottomSheetActions({ className, render, children, ...props }) {
|
|
1298
|
-
const theme = useThemeFamily();
|
|
1299
|
-
const { actions } = bottomSheet({ theme });
|
|
1300
|
-
const count = Math.min(3, countActionChildren(children));
|
|
1301
|
-
return useRender({
|
|
1302
|
-
defaultTagName: "div",
|
|
1303
|
-
render,
|
|
1304
|
-
props: mergeProps({
|
|
1305
|
-
className: actions({ className: cn(theme === "elegant" ? "flex-row" : count <= 1 ? "flex max-w-64 flex-col" : count === 2 ? "flex max-w-64 flex-col-reverse" : "grid max-w-[32rem] grid-cols-3", className) }),
|
|
1306
|
-
children
|
|
1307
|
-
}, props),
|
|
1308
|
-
state: { slot: "bottom-sheet-actions" }
|
|
1309
|
-
});
|
|
1310
|
-
}
|
|
1311
|
-
function countActionChildren(children) {
|
|
1312
|
-
return Children.toArray(children).reduce((count, child) => {
|
|
1313
|
-
if (isValidElement(child) && child.type === Fragment) return count + countActionChildren(child.props.children);
|
|
1314
|
-
return count + 1;
|
|
1315
|
-
}, 0);
|
|
1316
|
-
}
|
|
1317
|
-
function BottomSheetTitle({ className, ...props }) {
|
|
1318
|
-
const { title } = bottomSheet({ theme: useThemeFamily() });
|
|
1319
|
-
return /* @__PURE__ */ jsx(Drawer.Title, {
|
|
1320
|
-
"data-slot": "bottom-sheet-title",
|
|
1321
|
-
className: title({ className }),
|
|
1322
|
-
...props
|
|
1323
|
-
});
|
|
1324
|
-
}
|
|
1325
|
-
function BottomSheetDescription({ className, ...props }) {
|
|
1326
|
-
const { description } = bottomSheet({ theme: useThemeFamily() });
|
|
1327
|
-
return /* @__PURE__ */ jsx(Drawer.Description, {
|
|
1328
|
-
"data-slot": "bottom-sheet-description",
|
|
1329
|
-
className: description({ className }),
|
|
1330
|
-
...props
|
|
1331
|
-
});
|
|
1332
|
-
}
|
|
1333
|
-
//#endregion
|
|
1334
|
-
export { BottomSheet, BottomSheetActions, BottomSheetBody, BottomSheetClose, BottomSheetContent, BottomSheetDescription, BottomSheetFooter, BottomSheetHeader, BottomSheetOverlay, BottomSheetPortal, BottomSheetPositioner, 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 };
|
|
1002
|
+
export { ConversationPreviewCard, ConversationPreviewCardAction, ConversationPreviewCardAuthor, ConversationPreviewCardAuthorName, ConversationPreviewCardAuthorSubtitle, ConversationPreviewCardChannel, ConversationPreviewCardContent, ConversationPreviewCardFooter, ConversationPreviewCardMeta, ConversationPreviewCardPreview, ConversationPreviewCardPreviewAuthor, ConversationPreviewCardPreviewLeading, ConversationPreviewCardSecondaryPreview, ConversationPreviewCardTimestamp, DescriptionAction, DescriptionDetails, DescriptionItem, DescriptionList, DescriptionTerm, 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 };
|